m.indexOf(b)?p===o?a.FOLLOWING|a.CONTAINED_BY:a.FOLLOWING:p===i?a.PRECEDING|a.CONTAINS:a.PRECEDING}e.compareDocumentPosition=r;function s(i){return i=i.filter(function(o,u,c){return!c.includes(o,u+1)}),i.sort(function(o,u){var c=r(o,u);return c&a.PRECEDING?-1:c&a.FOLLOWING?1:0}),i}e.uniqueSort=s})(ug);var ml={};Object.defineProperty(ml,"__esModule",{value:!0});ml.getFeed=void 0;var oSe=hn,yi=_n;function uSe(e){var t=yu(ESe,e);return t?t.name==="feed"?lSe(t):cSe(t):null}ml.getFeed=uSe;function lSe(e){var t,n=e.children,a={type:"atom",items:(0,yi.getElementsByTagName)("entry",n).map(function(i){var o,u=i.children,c={media:lg(u)};sn(c,"id","id",u),sn(c,"title","title",u);var l=(o=yu("link",u))===null||o===void 0?void 0:o.attribs.href;l&&(c.link=l);var f=ka("summary",u)||ka("content",u);f&&(c.description=f);var d=ka("updated",u);return d&&(c.pubDate=new Date(d)),c})};sn(a,"id","id",n),sn(a,"title","title",n);var r=(t=yu("link",n))===null||t===void 0?void 0:t.attribs.href;r&&(a.link=r),sn(a,"description","subtitle",n);var s=ka("updated",n);return s&&(a.updated=new Date(s)),sn(a,"author","email",n,!0),a}function cSe(e){var t,n,a=(n=(t=yu("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&n!==void 0?n:[],r={type:e.name.substr(0,3),id:"",items:(0,yi.getElementsByTagName)("item",e.children).map(function(i){var o=i.children,u={media:lg(o)};sn(u,"id","guid",o),sn(u,"title","title",o),sn(u,"link","link",o),sn(u,"description","description",o);var c=ka("pubDate",o)||ka("dc:date",o);return c&&(u.pubDate=new Date(c)),u})};sn(r,"title","title",a),sn(r,"link","link",a),sn(r,"description","description",a);var s=ka("lastBuildDate",a);return s&&(r.updated=new Date(s)),sn(r,"author","managingEditor",a,!0),r}var dSe=["url","type","lang"],fSe=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function lg(e){return(0,yi.getElementsByTagName)("media:content",e).map(function(t){for(var n=t.attribs,a={medium:n.medium,isDefault:!!n.isDefault},r=0,s=dSe;r{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")},Kf={};Object.defineProperty(Kf,"__esModule",{value:!0});/*!
+ c-17.796,4.581-28.535,22.711-23.964,40.535C290.439,120.476,308.599,131.205,326.395,126.625z`})])],-1),tge=[JTe,ege];function nge(e,t,n,a,r,s){return A(),v("svg",QTe,tge)}const age=ae(ZTe,[["render",nge]]),rge={name:"Walking"},sge={version:"1.1",id:"Capa_1",x:"0px",y:"0px",viewBox:"0 0 494.49 494.49",style:{"enable-background":"new 0 0 494.49 494.49"},"xml:space":"preserve",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg"},ige=Zn('silhouette of a walking person',3),oge=[ige];function uge(e,t,n,a,r,s){return A(),v("svg",sge,oge)}const lge=ae(rge,[["render",uge]]),cge=["title"],dge=Z({__name:"index",props:{sportLabel:{},color:{},title:{default:""}},setup(e){const t=e,{color:n,sportLabel:a,title:r}=_e(t),s=It("sportColors");return(i,o)=>(A(),v("div",{class:"sport-img",style:Va({fill:h(n)?h(n):h(s)[h(a)]}),title:h(r)?h(r):i.$t(`sports.${h(a)}.LABEL`)},[h(a)==="Cycling (Sport)"?(A(),te(E1e,{key:0})):x("",!0),h(a)==="Cycling (Trekking)"?(A(),te(N1e,{key:1})):x("",!0),h(a)==="Cycling (Transport)"?(A(),te(A1e,{key:2})):x("",!0),h(a)==="Cycling (Virtual)"?(A(),te(L1e,{key:3})):x("",!0),h(a)==="Hiking"?(A(),te(F1e,{key:4})):x("",!0),h(a)==="Mountain Biking"?(A(),te(j1e,{key:5})):x("",!0),h(a)==="Mountain Biking (Electric)"?(A(),te(Q1e,{key:6})):x("",!0),h(a)==="Mountaineering"?(A(),te(rTe,{key:7})):x("",!0),h(a)==="Paragliding"?(A(),te(hTe,{key:8})):x("",!0),h(a)==="Open Water Swimming"?(A(),te(cTe,{key:9})):x("",!0),h(a)==="Rowing"?(A(),te(ITe,{key:10})):x("",!0),h(a)==="Running"?(A(),te(DTe,{key:11})):x("",!0),h(a)==="Skiing (Alpine)"?(A(),te(MTe,{key:12})):x("",!0),h(a)==="Skiing (Cross Country)"?(A(),te(HTe,{key:13})):x("",!0),h(a)==="Snowshoes"?(A(),te(XTe,{key:14})):x("",!0),h(a)==="Trail"?(A(),te(age,{key:15})):x("",!0),h(a)==="Walking"?(A(),te(lge,{key:16})):x("",!0)],12,cge))}}),fge={},Ege={class:"loader"};function pge(e,t){return A(),v("div",Ege)}const mge=ae(fge,[["render",pge],["__scopeId","data-v-8b613881"]]),hge={class:"custom-modal"},_ge={key:0,class:"modal-message"},Tge={key:1,class:"modal-message"},gge={class:"modal-buttons"},Age=Z({__name:"Modal",props:{title:{},message:{},strongMessage:{default:()=>""}},emits:["cancelAction","confirmAction"],setup(e,{emit:t}){const n=e,a=t,r=Me(),{title:s,message:i,strongMessage:o}=_e(n),u=k(()=>r.getters[H.GETTERS.ERROR_MESSAGES]);let c=null,l=null,f=null;function d(p){var m;(p.key==="Tab"||p.keyCode===9)&&(p.preventDefault(),((m=document.activeElement)==null?void 0:m.id)==="cancel-button"?c==null||c.focus():l==null||l.focus())}return _t(()=>{f=document.activeElement,l=document.getElementById("cancel-button"),c=document.getElementById("confirm-button"),l&&l.focus(),document.addEventListener("keydown",d)}),Nt(()=>{r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),document.removeEventListener("keydown",d),f==null||f.focus()}),(p,m)=>{const I=oe("i18n-t"),b=oe("ErrorMessage"),R=oe("Card");return A(),v("div",{id:"modal",role:"dialog",onClick:m[2]||(m[2]=Je(N=>a("cancelAction"),["self"]))},[E("div",hge,[$(R,null,{title:ue(()=>[j(T(h(s)),1)]),content:ue(()=>[h(o)?(A(),v("div",_ge,[$(I,{keypath:h(i)},{default:ue(()=>[E("span",null,T(h(o)),1)]),_:1},8,["keypath"])])):(A(),v("div",Tge,T(h(i)),1)),u.value?(A(),te(b,{key:2,message:u.value},null,8,["message"])):x("",!0),E("div",gge,[u.value?x("",!0):(A(),v("button",{key:0,class:"confirm",id:"confirm-button",onClick:m[0]||(m[0]=N=>a("confirmAction"))},T(p.$t("buttons.YES")),1)),E("button",{tabindex:"0",id:"cancel-button",class:"cancel",onClick:m[1]||(m[1]=N=>a("cancelAction"))},T(p.$t(`buttons.${u.value?"CANCEL":"NO"}`)),1)])]),_:1})])])}}}),Sge=ae(Age,[["__scopeId","data-v-e277942a"]]),Oge=[{target:Lhe,name:"AlertMessage"},{target:_T,name:"Card"},{target:Ghe,name:"CustomTextArea"},{target:jhe,name:"Distance"},{target:t1e,name:"Dropdown"},{target:i1e,name:"ErrorMessage"},{target:mge,name:"Loader"},{target:Sge,name:"Modal"},{target:dge,name:"SportImage"}],Ige={mounted:(e,t)=>{e.clickOutsideEvent=function(n){e===n.target||e.contains(n.target)||t.value(n)},document.body.addEventListener("click",e.clickOutsideEvent),document.body.addEventListener("touchstart",e.clickOutsideEvent)},unmounted:function(e){e.clickOutsideEvent&&(document.body.removeEventListener("click",e.clickOutsideEvent),document.body.removeEventListener("touchstart",e.clickOutsideEvent),e.clickOutsideEvent=void 0)}};var Rge={"":["",""],_:["",""],"*":["",""],"~":["",""],"\n":["
"]," ":["
"],"-":["
"]};function Bp(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function Rs(e){return(e+"").replace(/"/g,""").replace(//g,">")}function lr(e,t){var n,a,r,s,i,o=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,u=[],c="",l=t||{},f=0;function d(m){var I=Rge[m[1]||""],b=u[u.length-1]==m;return I?I[1]?(b?u.pop():u.push(m),I[0|b]):I[0]:m}function p(){for(var m="";u.length;)m+=d(u[u.length-1]);return m}for(e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(m,I,b){return l[I.toLowerCase()]=b,""}).replace(/^\n+|\n+$/g,"");r=o.exec(e);)a=e.substring(f,r.index),f=o.lastIndex,n=r[0],a.match(/[^\\](\\\\)*\\$/)||((i=r[3]||r[4])?n='"+Bp(Rs(i).replace(/^\n+|\n+$/g,""))+"
":(i=r[6])?(i.match(/\./)&&(r[5]=r[5].replace(/^\d+/gm,"")),s=lr(Bp(r[5].replace(/^\s*[>*+.-]/gm,""))),i==">"?i="blockquote":(i=i.match(/\./)?"ol":"ul",s=s.replace(/^(.*)(\n|$)/gm,"$1")),n="<"+i+">"+s+""+i+">"):r[8]?n='':r[10]?(c=c.replace("",''),n=p()+""):r[9]?n="":r[12]||r[14]?n="<"+(i="h"+(r[14]?r[14].length:r[13]>"="?1:2))+">"+lr(r[12]||r[15],l)+""+i+">":r[16]?n=""+Rs(r[16])+"
":(r[17]||r[1])&&(n=d(r[17]||"--"))),c+=a,c+=n;return(c+e.substring(f)+p()).replace(/^\n+|\n+$/g,"")}const bge=["bytes","KB","MB","GB","TB"],CT=e=>{if(!e)return{size:"0",suffix:"bytes"};const t=Math.floor(Math.log(e)/Math.log(1024)),n=(e/Math.pow(1024,t)).toFixed(1),a=bge[t];return{size:n,suffix:a}},qo=e=>{if(!e)return"0 bytes";const t=CT(e);return`${t.size}${t.suffix}`},Nge=e=>{const t=e/1048576;return!e&&0||+t.toFixed(2)},vge="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Cge="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",es=(e,t)=>{for(const n in t)e[n]=t[n];return e},td="numeric",nd="ascii",ad="alpha",bo="asciinumeric",Vi="alphanumeric",rd="domain",yT="emoji",yge="scheme",Dge="slashscheme",Hp="whitespace";function Pge(e,t){return e in t||(t[e]=[]),t[e]}function ir(e,t,n){t[td]&&(t[bo]=!0,t[Vi]=!0),t[nd]&&(t[bo]=!0,t[ad]=!0),t[bo]&&(t[Vi]=!0),t[ad]&&(t[Vi]=!0),t[Vi]&&(t[rd]=!0),t[yT]&&(t[rd]=!0);for(const a in t){const r=Pge(a,n);r.indexOf(e)<0&&r.push(e)}}function Lge(e,t){const n={};for(const a in t)t[a].indexOf(e)>=0&&(n[a]=!0);return n}function mn(e){e===void 0&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}mn.groups={};mn.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let a=0;ae.ta(t,n,a,r),gn=(e,t,n,a,r)=>e.tr(t,n,a,r),Vp=(e,t,n,a,r)=>e.ts(t,n,a,r),Ee=(e,t,n,a,r)=>e.tt(t,n,a,r),sa="WORD",sd="UWORD",ti="LOCALHOST",id="TLD",od="UTLD",No="SCHEME",wr="SLASH_SCHEME",wf="NUM",DT="WS",kf="NL",xs="OPENBRACE",Fs="CLOSEBRACE",Xo="OPENBRACKET",Zo="CLOSEBRACKET",Qo="OPENPAREN",Jo="CLOSEPAREN",eu="OPENANGLEBRACKET",tu="CLOSEANGLEBRACKET",nu="FULLWIDTHLEFTPAREN",au="FULLWIDTHRIGHTPAREN",ru="LEFTCORNERBRACKET",su="RIGHTCORNERBRACKET",iu="LEFTWHITECORNERBRACKET",ou="RIGHTWHITECORNERBRACKET",uu="FULLWIDTHLESSTHAN",lu="FULLWIDTHGREATERTHAN",cu="AMPERSAND",du="APOSTROPHE",fu="ASTERISK",Da="AT",Eu="BACKSLASH",pu="BACKTICK",mu="CARET",wa="COLON",$f="COMMA",hu="DOLLAR",Wn="DOT",_u="EQUALS",Uf="EXCLAMATION",Gn="HYPHEN",Tu="PERCENT",gu="PIPE",Au="PLUS",Su="POUND",Ou="QUERY",Mf="QUOTE",xf="SEMI",Bn="SLASH",zs="TILDE",Iu="UNDERSCORE",PT="EMOJI",Ru="SYM";var LT=Object.freeze({__proto__:null,WORD:sa,UWORD:sd,LOCALHOST:ti,TLD:id,UTLD:od,SCHEME:No,SLASH_SCHEME:wr,NUM:wf,WS:DT,NL:kf,OPENBRACE:xs,CLOSEBRACE:Fs,OPENBRACKET:Xo,CLOSEBRACKET:Zo,OPENPAREN:Qo,CLOSEPAREN:Jo,OPENANGLEBRACKET:eu,CLOSEANGLEBRACKET:tu,FULLWIDTHLEFTPAREN:nu,FULLWIDTHRIGHTPAREN:au,LEFTCORNERBRACKET:ru,RIGHTCORNERBRACKET:su,LEFTWHITECORNERBRACKET:iu,RIGHTWHITECORNERBRACKET:ou,FULLWIDTHLESSTHAN:uu,FULLWIDTHGREATERTHAN:lu,AMPERSAND:cu,APOSTROPHE:du,ASTERISK:fu,AT:Da,BACKSLASH:Eu,BACKTICK:pu,CARET:mu,COLON:wa,COMMA:$f,DOLLAR:hu,DOT:Wn,EQUALS:_u,EXCLAMATION:Uf,HYPHEN:Gn,PERCENT:Tu,PIPE:gu,PLUS:Au,POUND:Su,QUERY:Ou,QUOTE:Mf,SEMI:xf,SLASH:Bn,TILDE:zs,UNDERSCORE:Iu,EMOJI:PT,SYM:Ru});const Nr=/[a-z]/,Xl=new RegExp("\\p{L}","u"),Zl=new RegExp("\\p{Emoji}","u"),Ql=/\d/,jp=/\s/,Kp=`
+`,wge="️",kge="";let ji=null,Ki=null;function $ge(e){e===void 0&&(e=[]);const t={};mn.groups=t;const n=new mn;ji==null&&(ji=Yp(vge)),Ki==null&&(Ki=Yp(Cge)),Ee(n,"'",du),Ee(n,"{",xs),Ee(n,"}",Fs),Ee(n,"[",Xo),Ee(n,"]",Zo),Ee(n,"(",Qo),Ee(n,")",Jo),Ee(n,"<",eu),Ee(n,">",tu),Ee(n,"(",nu),Ee(n,")",au),Ee(n,"「",ru),Ee(n,"」",su),Ee(n,"『",iu),Ee(n,"』",ou),Ee(n,"<",uu),Ee(n,">",lu),Ee(n,"&",cu),Ee(n,"*",fu),Ee(n,"@",Da),Ee(n,"`",pu),Ee(n,"^",mu),Ee(n,":",wa),Ee(n,",",$f),Ee(n,"$",hu),Ee(n,".",Wn),Ee(n,"=",_u),Ee(n,"!",Uf),Ee(n,"-",Gn),Ee(n,"%",Tu),Ee(n,"|",gu),Ee(n,"+",Au),Ee(n,"#",Su),Ee(n,"?",Ou),Ee(n,'"',Mf),Ee(n,"/",Bn),Ee(n,";",xf),Ee(n,"~",zs),Ee(n,"_",Iu),Ee(n,"\\",Eu);const a=gn(n,Ql,wf,{[td]:!0});gn(a,Ql,a);const r=gn(n,Nr,sa,{[nd]:!0});gn(r,Nr,r);const s=gn(n,Xl,sd,{[ad]:!0});gn(s,Nr),gn(s,Xl,s);const i=gn(n,jp,DT,{[Hp]:!0});Ee(n,Kp,kf,{[Hp]:!0}),Ee(i,Kp),gn(i,jp,i);const o=gn(n,Zl,PT,{[yT]:!0});gn(o,Zl,o),Ee(o,wge,o);const u=Ee(o,kge);gn(u,Zl,o);const c=[[Nr,r]],l=[[Nr,null],[Xl,s]];for(let f=0;ff[0]>d[0]?1:-1);for(let f=0;f=0?m[rd]=!0:Nr.test(d)?Ql.test(d)?m[bo]=!0:m[nd]=!0:m[td]=!0,Vp(n,d,d,m)}return Vp(n,"localhost",ti,{ascii:!0}),n.jd=new mn(Ru),{start:n,tokens:es({groups:t},LT)}}function Uge(e,t){const n=Mge(t.replace(/[A-Z]/g,o=>o.toLowerCase())),a=n.length,r=[];let s=0,i=0;for(;i=0&&(f+=n[i].length,d++),c+=n[i].length,s+=n[i].length,i++;s-=f,i-=d,c-=f,r.push({t:l.t,v:t.slice(s-c,s),s:s-c,e:s})}return r}function Mge(e){const t=[],n=e.length;let a=0;for(;a56319||a+1===n||(s=e.charCodeAt(a+1))<56320||s>57343?e[a]:e.slice(a,a+2);t.push(i),a+=i.length}return t}function ba(e,t,n,a,r){let s;const i=t.length;for(let o=0;o=0;)s++;if(s>0){t.push(n.join(""));for(let i=parseInt(e.substring(a,a+s),10);i>0;i--)n.pop();a+=s}else n.push(e[a]),a++}return t}const ni={defaultProtocol:"http",events:null,format:qp,formatHref:qp,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Ff(e,t){t===void 0&&(t=null);let n=es({},ni);e&&(n=es(n,e instanceof Ff?e.o:e));const a=n.ignoreTags,r=[];for(let s=0;sn?a.substring(0,n)+"…":a},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e){return e===void 0&&(e=ni.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),a=e.get("formatHref",n,this),r=e.get("tagName",n,t),s=this.toFormattedString(e),i={},o=e.get("className",n,t),u=e.get("target",n,t),c=e.get("rel",n,t),l=e.getObj("attributes",n,t),f=e.getObj("events",n,t);return i.href=a,o&&(i.class=o),u&&(i.target=u),c&&(i.rel=c),l&&es(i,l),{tagName:r,attributes:i,content:s,eventListeners:f}}};function ll(e,t){class n extends wT{constructor(r,s){super(r,s),this.t=e}}for(const a in t)n.prototype[a]=t[a];return n.t=e,n}const Xp=ll("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Zp=ll("text"),xge=ll("nl"),Yi=ll("url",{isLink:!0,toHref(e){return e===void 0&&(e=ni.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==ti&&e[1].t===wa}}),An=e=>new mn(e);function Fge(e){let{groups:t}=e;const n=t.domain.concat([cu,fu,Da,Eu,pu,mu,hu,_u,Gn,wf,Tu,gu,Au,Su,Bn,Ru,zs,Iu]),a=[du,wa,$f,Wn,Uf,Ou,Mf,xf,eu,tu,xs,Fs,Zo,Xo,Qo,Jo,nu,au,ru,su,iu,ou,uu,lu],r=[cu,du,fu,Eu,pu,mu,hu,_u,Gn,xs,Fs,Tu,gu,Au,Su,Ou,Bn,Ru,zs,Iu],s=An(),i=Ee(s,zs);Ve(i,r,i),Ve(i,t.domain,i);const o=An(),u=An(),c=An();Ve(s,t.domain,o),Ve(s,t.scheme,u),Ve(s,t.slashscheme,c),Ve(o,r,i),Ve(o,t.domain,o);const l=Ee(o,Da);Ee(i,Da,l),Ee(u,Da,l),Ee(c,Da,l);const f=Ee(i,Wn);Ve(f,r,i),Ve(f,t.domain,i);const d=An();Ve(l,t.domain,d),Ve(d,t.domain,d);const p=Ee(d,Wn);Ve(p,t.domain,d);const m=An(Xp);Ve(p,t.tld,m),Ve(p,t.utld,m),Ee(l,ti,m);const I=Ee(d,Gn);Ve(I,t.domain,d),Ve(m,t.domain,d),Ee(m,Wn,p),Ee(m,Gn,I);const b=Ee(m,wa);Ve(b,t.numeric,Xp);const R=Ee(o,Gn),N=Ee(o,Wn);Ve(R,t.domain,o),Ve(N,r,i),Ve(N,t.domain,o);const S=An(Yi);Ve(N,t.tld,S),Ve(N,t.utld,S),Ve(S,t.domain,o),Ve(S,r,i),Ee(S,Wn,N),Ee(S,Gn,R),Ee(S,Da,l);const O=Ee(S,wa),C=An(Yi);Ve(O,t.numeric,C);const P=An(Yi),M=An();Ve(P,n,P),Ve(P,a,M),Ve(M,n,P),Ve(M,a,M),Ee(S,Bn,P),Ee(C,Bn,P);const L=Ee(u,wa),W=Ee(c,wa),B=Ee(W,Bn),w=Ee(B,Bn);Ve(u,t.domain,o),Ee(u,Wn,N),Ee(u,Gn,R),Ve(c,t.domain,o),Ee(c,Wn,N),Ee(c,Gn,R),Ve(L,t.domain,P),Ee(L,Bn,P),Ve(w,t.domain,P),Ve(w,n,P),Ee(w,Bn,P);const X=[[xs,Fs],[Xo,Zo],[Qo,Jo],[eu,tu],[nu,au],[ru,su],[iu,ou],[uu,lu]];for(let J=0;J=0&&d++,r++,l++;if(d<0)r-=l,r0&&(s.push(Jl(Zp,t,i)),i=[]),r-=d,l-=d;const p=f.t,m=n.slice(r-l,r);s.push(Jl(p,t,m))}}return i.length>0&&s.push(Jl(Zp,t,i)),s}function Jl(e,t,n){const a=n[0].s,r=n[n.length-1].e,s=t.slice(a,r);return new e(s,n)}const Qt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Wge(){Qt.scanner=$ge(Qt.customSchemes);for(let e=0;e",lt:"<",nbsp:" ",quot:'"'},Hge=/^#[xX]([A-Fa-f0-9]+)$/,Vge=/^#([0-9]+)$/,jge=/^([A-Za-z0-9]+)$/,Kge=function(){function e(t){this.named=t}return e.prototype.parse=function(t){if(t){var n=t.match(Hge);if(n)return String.fromCharCode(parseInt(n[1],16));if(n=t.match(Vge),n)return String.fromCharCode(parseInt(n[1],10));if(n=t.match(jge),n)return this.named[n[1]]||"&"+n[1]+";"}},e}(),Yge=/[\t\n\f ]/,qge=/[A-Za-z]/,Xge=/\r\n?/g;function Vt(e){return Yge.test(e)}function Qp(e){return qge.test(e)}function Zge(e){return e.replace(Xge,`
+`)}var Qge=function(){function e(t,n,a){a===void 0&&(a="precompile"),this.delegate=t,this.entityParser=n,this.mode=a,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var r=this.peek();if(r==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&r===`
+`){var s=this.tagNameBuffer.toLowerCase();(s==="pre"||s==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var r=this.peek(),s=this.tagNameBuffer;r==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):r==="&"&&s!=="script"&&s!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(r))},tagOpen:function(){var r=this.consume();r==="!"?this.transitionTo("markupDeclarationOpen"):r==="/"?this.transitionTo("endTagOpen"):(r==="@"||r===":"||Qp(r))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(r))},markupDeclarationOpen:function(){var r=this.consume();if(r==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var s=r.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();s==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var r=this.consume();Vt(r)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var r=this.consume();Vt(r)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(r.toLowerCase()))},doctypeName:function(){var r=this.consume();Vt(r)?this.transitionTo("afterDoctypeName"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(r.toLowerCase())},afterDoctypeName:function(){var r=this.consume();if(!Vt(r))if(r===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var s=r.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),i=s.toUpperCase()==="PUBLIC",o=s.toUpperCase()==="SYSTEM";(i||o)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),i?this.transitionTo("afterDoctypePublicKeyword"):o&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var r=this.peek();Vt(r)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):r==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):r==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):r===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var r=this.consume();r==='"'?this.transitionTo("afterDoctypePublicIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(r)},doctypePublicIdentifierSingleQuoted:function(){var r=this.consume();r==="'"?this.transitionTo("afterDoctypePublicIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(r)},afterDoctypePublicIdentifier:function(){var r=this.consume();Vt(r)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):r==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):r==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var r=this.consume();Vt(r)||(r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):r==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):r==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var r=this.consume();r==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(r)},doctypeSystemIdentifierSingleQuoted:function(){var r=this.consume();r==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):r===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(r)},afterDoctypeSystemIdentifier:function(){var r=this.consume();Vt(r)||r===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var r=this.consume();r==="-"?this.transitionTo("commentStartDash"):r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(r),this.transitionTo("comment"))},commentStartDash:function(){var r=this.consume();r==="-"?this.transitionTo("commentEnd"):r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var r=this.consume();r==="-"?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(r)},commentEndDash:function(){var r=this.consume();r==="-"?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+r),this.transitionTo("comment"))},commentEnd:function(){var r=this.consume();r===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+r),this.transitionTo("comment"))},tagName:function(){var r=this.consume();Vt(r)?this.transitionTo("beforeAttributeName"):r==="/"?this.transitionTo("selfClosingStartTag"):r===">"?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(r)},endTagName:function(){var r=this.consume();Vt(r)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):r==="/"?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):r===">"?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(r)},beforeAttributeName:function(){var r=this.peek();if(Vt(r)){this.consume();return}else r==="/"?(this.transitionTo("selfClosingStartTag"),this.consume()):r===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):r==="="?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(r)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var r=this.peek();Vt(r)?(this.transitionTo("afterAttributeName"),this.consume()):r==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="="?(this.transitionTo("beforeAttributeValue"),this.consume()):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):r==='"'||r==="'"||r==="<"?(this.delegate.reportSyntaxError(r+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(r)):(this.consume(),this.delegate.appendToAttributeName(r))},afterAttributeName:function(){var r=this.peek();if(Vt(r)){this.consume();return}else r==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="="?(this.consume(),this.transitionTo("beforeAttributeValue")):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(r))},beforeAttributeValue:function(){var r=this.peek();Vt(r)?this.consume():r==='"'?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):r==="'"?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):r===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(r))},attributeValueDoubleQuoted:function(){var r=this.consume();r==='"'?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):r==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(r)},attributeValueSingleQuoted:function(){var r=this.consume();r==="'"?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):r==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(r)},attributeValueUnquoted:function(){var r=this.peek();Vt(r)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):r==="/"?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):r==="&"?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):r===">"?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(r))},afterAttributeValueQuoted:function(){var r=this.peek();Vt(r)?(this.consume(),this.transitionTo("beforeAttributeName")):r==="/"?(this.consume(),this.transitionTo("selfClosingStartTag")):r===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){var r=this.peek();r===">"?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var r=this.consume();(r==="@"||r===":"||Qp(r))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(r))}},this.reset()}return e.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},e.prototype.transitionTo=function(t){this.state=t},e.prototype.tokenize=function(t){this.reset(),this.tokenizePart(t),this.tokenizeEOF()},e.prototype.tokenizePart=function(t){for(this.input+=Zge(t);this.index"||t==="style"&&this.input.substring(this.index,this.index+8)!==""||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e}(),Jge=function(){function e(t,n){n===void 0&&(n={}),this.options=n,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new Qge(this,t,n.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var n=0;n=0))continue;let l=a.length;sAe(u,n,++i,a),i+=a.length-l-1}else if(o.type!==ud)a.push(o);else{const u=rAe(o.chars,s);a.push.apply(a,u)}}for(let i=0;i0&&(u+=" "+uAe(o.attributes).join(" ")),o.selfClosing&&(u+=" /"),u+=">",r.push(u);break}case $T:r.push(`${o.tagName}>`);break;case ud:r.push(ld(o.chars));break;case tAe:r.push(``);break;case nAe:{let u=`",r.push(u);break}}}return r.join("")}function rAe(e,t){const n=Gge(e),a=[];for(let r=0;r0;){let s=t[n];s.type===bu&&s.tagName.toUpperCase()===e?r++:s.type===$T&&s.tagName.toUpperCase()===e&&r--,a.push(s),n++}return a}function iAe(e){let{tagName:t,attributes:n,content:a}=e;return`<${t} ${oAe(n)}>${ld(a)}${t}>`}function ld(e){return e.replace(//g,">")}function UT(e){return e.replace(/"/g,""")}function oAe(e){const t=[];for(const n in e){const a=e[n]+"";t.push(`${n}="${UT(a)}"`)}return t.join(" ")}function uAe(e){const t=[];for(let n=0;n䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(function(e){return e.charCodeAt(0)}));var Gf={};Object.defineProperty(Gf,"__esModule",{value:!0});Gf.default=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(e){return e.charCodeAt(0)}));var cd={};(function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.replaceCodePoint=e.fromCodePoint=void 0;var n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);e.fromCodePoint=(t=String.fromCodePoint)!==null&&t!==void 0?t:function(s){var i="";return s>65535&&(s-=65536,i+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),i+=String.fromCharCode(s),i};function a(s){var i;return s>=55296&&s<=57343||s>1114111?65533:(i=n.get(s))!==null&&i!==void 0?i:s}e.replaceCodePoint=a;function r(s){return(0,e.fromCodePoint)(a(s))}e.default=r})(cd);(function(e){var t=ke&&ke.__createBinding||(Object.create?function(w,X,J,ne){ne===void 0&&(ne=J);var D=Object.getOwnPropertyDescriptor(X,J);(!D||("get"in D?!X.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return X[J]}}),Object.defineProperty(w,ne,D)}:function(w,X,J,ne){ne===void 0&&(ne=J),w[ne]=X[J]}),n=ke&&ke.__setModuleDefault||(Object.create?function(w,X){Object.defineProperty(w,"default",{enumerable:!0,value:X})}:function(w,X){w.default=X}),a=ke&&ke.__importStar||function(w){if(w&&w.__esModule)return w;var X={};if(w!=null)for(var J in w)J!=="default"&&Object.prototype.hasOwnProperty.call(w,J)&&t(X,w,J);return n(X,w),X},r=ke&&ke.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXML=e.decodeHTMLStrict=e.decodeHTMLAttribute=e.decodeHTML=e.determineBranch=e.EntityDecoder=e.DecodingMode=e.BinTrieFlags=e.fromCodePoint=e.replaceCodePoint=e.decodeCodePoint=e.xmlDecodeTree=e.htmlDecodeTree=void 0;var s=r(Wf);e.htmlDecodeTree=s.default;var i=r(Gf);e.xmlDecodeTree=i.default;var o=a(cd);e.decodeCodePoint=o.default;var u=cd;Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return u.replaceCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return u.fromCodePoint}});var c;(function(w){w[w.NUM=35]="NUM",w[w.SEMI=59]="SEMI",w[w.EQUALS=61]="EQUALS",w[w.ZERO=48]="ZERO",w[w.NINE=57]="NINE",w[w.LOWER_A=97]="LOWER_A",w[w.LOWER_F=102]="LOWER_F",w[w.LOWER_X=120]="LOWER_X",w[w.LOWER_Z=122]="LOWER_Z",w[w.UPPER_A=65]="UPPER_A",w[w.UPPER_F=70]="UPPER_F",w[w.UPPER_Z=90]="UPPER_Z"})(c||(c={}));var l=32,f;(function(w){w[w.VALUE_LENGTH=49152]="VALUE_LENGTH",w[w.BRANCH_LENGTH=16256]="BRANCH_LENGTH",w[w.JUMP_TABLE=127]="JUMP_TABLE"})(f=e.BinTrieFlags||(e.BinTrieFlags={}));function d(w){return w>=c.ZERO&&w<=c.NINE}function p(w){return w>=c.UPPER_A&&w<=c.UPPER_F||w>=c.LOWER_A&&w<=c.LOWER_F}function m(w){return w>=c.UPPER_A&&w<=c.UPPER_Z||w>=c.LOWER_A&&w<=c.LOWER_Z||d(w)}function I(w){return w===c.EQUALS||m(w)}var b;(function(w){w[w.EntityStart=0]="EntityStart",w[w.NumericStart=1]="NumericStart",w[w.NumericDecimal=2]="NumericDecimal",w[w.NumericHex=3]="NumericHex",w[w.NamedEntity=4]="NamedEntity"})(b||(b={}));var R;(function(w){w[w.Legacy=0]="Legacy",w[w.Strict=1]="Strict",w[w.Attribute=2]="Attribute"})(R=e.DecodingMode||(e.DecodingMode={}));var N=function(){function w(X,J,ne){this.decodeTree=X,this.emitCodePoint=J,this.errors=ne,this.state=b.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=R.Strict}return w.prototype.startEntity=function(X){this.decodeMode=X,this.state=b.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},w.prototype.write=function(X,J){switch(this.state){case b.EntityStart:return X.charCodeAt(J)===c.NUM?(this.state=b.NumericStart,this.consumed+=1,this.stateNumericStart(X,J+1)):(this.state=b.NamedEntity,this.stateNamedEntity(X,J));case b.NumericStart:return this.stateNumericStart(X,J);case b.NumericDecimal:return this.stateNumericDecimal(X,J);case b.NumericHex:return this.stateNumericHex(X,J);case b.NamedEntity:return this.stateNamedEntity(X,J)}},w.prototype.stateNumericStart=function(X,J){return J>=X.length?-1:(X.charCodeAt(J)|l)===c.LOWER_X?(this.state=b.NumericHex,this.consumed+=1,this.stateNumericHex(X,J+1)):(this.state=b.NumericDecimal,this.stateNumericDecimal(X,J))},w.prototype.addToNumericResult=function(X,J,ne,D){if(J!==ne){var G=ne-J;this.result=this.result*Math.pow(D,G)+parseInt(X.substr(J,G),D),this.consumed+=G}},w.prototype.stateNumericHex=function(X,J){for(var ne=J;J>14;J>14,G!==0){if(V===c.SEMI)return this.emitNamedEntityData(this.treeIndex,G,this.consumed+this.excess);this.decodeMode!==R.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},w.prototype.emitNotTerminatedNamedEntity=function(){var X,J=this,ne=J.result,D=J.decodeTree,G=(D[ne]&f.VALUE_LENGTH)>>14;return this.emitNamedEntityData(ne,G,this.consumed),(X=this.errors)===null||X===void 0||X.missingSemicolonAfterCharacterReference(),this.consumed},w.prototype.emitNamedEntityData=function(X,J,ne){var D=this.decodeTree;return this.emitCodePoint(J===1?D[X]&~f.VALUE_LENGTH:D[X+1],ne),J===3&&this.emitCodePoint(D[X+2],ne),ne},w.prototype.end=function(){var X;switch(this.state){case b.NamedEntity:return this.result!==0&&(this.decodeMode!==R.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case b.NumericDecimal:return this.emitNumericEntity(0,2);case b.NumericHex:return this.emitNumericEntity(0,3);case b.NumericStart:return(X=this.errors)===null||X===void 0||X.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case b.EntityStart:return 0}},w}();e.EntityDecoder=N;function S(w){var X="",J=new N(w,function(ne){return X+=(0,o.fromCodePoint)(ne)});return function(D,G){for(var V=0,re=0;(re=D.indexOf("&",re))>=0;){X+=D.slice(V,re),J.startEntity(G);var Be=J.write(D,re+1);if(Be<0){V=re+J.end();break}V=re+Be,re=Be===0?V+1:V}var $e=X+D.slice(V);return X="",$e}}function O(w,X,J,ne){var D=(X&f.BRANCH_LENGTH)>>7,G=X&f.JUMP_TABLE;if(D===0)return G!==0&&ne===G?J:-1;if(G){var V=ne-G;return V<0||V>=D?-1:w[J+V]-1}for(var re=J,Be=re+D-1;re<=Be;){var $e=re+Be>>>1,Oe=w[$e];if(Oene)Be=$e-1;else return w[$e+D]}return-1}e.determineBranch=O;var C=S(s.default),P=S(i.default);function M(w,X){return X===void 0&&(X=R.Legacy),C(w,X)}e.decodeHTML=M;function L(w){return C(w,R.Attribute)}e.decodeHTMLAttribute=L;function W(w){return C(w,R.Strict)}e.decodeHTMLStrict=W;function B(w){return P(w,R.Strict)}e.decodeXML=B})(ri);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QuoteType=void 0;var t=ri,n;(function(d){d[d.Tab=9]="Tab",d[d.NewLine=10]="NewLine",d[d.FormFeed=12]="FormFeed",d[d.CarriageReturn=13]="CarriageReturn",d[d.Space=32]="Space",d[d.ExclamationMark=33]="ExclamationMark",d[d.Number=35]="Number",d[d.Amp=38]="Amp",d[d.SingleQuote=39]="SingleQuote",d[d.DoubleQuote=34]="DoubleQuote",d[d.Dash=45]="Dash",d[d.Slash=47]="Slash",d[d.Zero=48]="Zero",d[d.Nine=57]="Nine",d[d.Semi=59]="Semi",d[d.Lt=60]="Lt",d[d.Eq=61]="Eq",d[d.Gt=62]="Gt",d[d.Questionmark=63]="Questionmark",d[d.UpperA=65]="UpperA",d[d.LowerA=97]="LowerA",d[d.UpperF=70]="UpperF",d[d.LowerF=102]="LowerF",d[d.UpperZ=90]="UpperZ",d[d.LowerZ=122]="LowerZ",d[d.LowerX=120]="LowerX",d[d.OpeningSquareBracket=91]="OpeningSquareBracket"})(n||(n={}));var a;(function(d){d[d.Text=1]="Text",d[d.BeforeTagName=2]="BeforeTagName",d[d.InTagName=3]="InTagName",d[d.InSelfClosingTag=4]="InSelfClosingTag",d[d.BeforeClosingTagName=5]="BeforeClosingTagName",d[d.InClosingTagName=6]="InClosingTagName",d[d.AfterClosingTagName=7]="AfterClosingTagName",d[d.BeforeAttributeName=8]="BeforeAttributeName",d[d.InAttributeName=9]="InAttributeName",d[d.AfterAttributeName=10]="AfterAttributeName",d[d.BeforeAttributeValue=11]="BeforeAttributeValue",d[d.InAttributeValueDq=12]="InAttributeValueDq",d[d.InAttributeValueSq=13]="InAttributeValueSq",d[d.InAttributeValueNq=14]="InAttributeValueNq",d[d.BeforeDeclaration=15]="BeforeDeclaration",d[d.InDeclaration=16]="InDeclaration",d[d.InProcessingInstruction=17]="InProcessingInstruction",d[d.BeforeComment=18]="BeforeComment",d[d.CDATASequence=19]="CDATASequence",d[d.InSpecialComment=20]="InSpecialComment",d[d.InCommentLike=21]="InCommentLike",d[d.BeforeSpecialS=22]="BeforeSpecialS",d[d.SpecialStartSequence=23]="SpecialStartSequence",d[d.InSpecialTag=24]="InSpecialTag",d[d.BeforeEntity=25]="BeforeEntity",d[d.BeforeNumericEntity=26]="BeforeNumericEntity",d[d.InNamedEntity=27]="InNamedEntity",d[d.InNumericEntity=28]="InNumericEntity",d[d.InHexEntity=29]="InHexEntity"})(a||(a={}));function r(d){return d===n.Space||d===n.NewLine||d===n.Tab||d===n.FormFeed||d===n.CarriageReturn}function s(d){return d===n.Slash||d===n.Gt||r(d)}function i(d){return d>=n.Zero&&d<=n.Nine}function o(d){return d>=n.LowerA&&d<=n.LowerZ||d>=n.UpperA&&d<=n.UpperZ}function u(d){return d>=n.UpperA&&d<=n.UpperF||d>=n.LowerA&&d<=n.LowerF}var c;(function(d){d[d.NoValue=0]="NoValue",d[d.Unquoted=1]="Unquoted",d[d.Single=2]="Single",d[d.Double=3]="Double"})(c=e.QuoteType||(e.QuoteType={}));var l={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},f=function(){function d(p,m){var I=p.xmlMode,b=I===void 0?!1:I,R=p.decodeEntities,N=R===void 0?!0:R;this.cbs=m,this.state=a.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=a.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=b,this.decodeEntities=N,this.entityTrie=b?t.xmlDecodeTree:t.htmlDecodeTree}return d.prototype.reset=function(){this.state=a.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=a.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},d.prototype.write=function(p){this.offset+=this.buffer.length,this.buffer=p,this.parse()},d.prototype.end=function(){this.running&&this.finish()},d.prototype.pause=function(){this.running=!1},d.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=a.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&p===n.Amp&&(this.state=a.BeforeEntity)},d.prototype.stateSpecialStartSequence=function(p){var m=this.sequenceIndex===this.currentSequence.length,I=m?s(p):(p|32)===this.currentSequence[this.sequenceIndex];if(!I)this.isSpecial=!1;else if(!m){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=a.InTagName,this.stateInTagName(p)},d.prototype.stateInSpecialTag=function(p){if(this.sequenceIndex===this.currentSequence.length){if(p===n.Gt||r(p)){var m=this.index-this.currentSequence.length;if(this.sectionStart>14)-1;if(!this.allowLegacyEntity()&&p!==n.Semi)this.trieIndex+=I;else{var b=this.index-this.entityExcess+1;b>this.sectionStart&&this.emitPartial(this.sectionStart,b),this.entityResult=this.trieIndex,this.trieIndex+=I,this.entityExcess=0,this.sectionStart=this.index+1,I===0&&this.emitNamedEntity()}}},d.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var p=(this.entityTrie[this.entityResult]&t.BinTrieFlags.VALUE_LENGTH)>>14;switch(p){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~t.BinTrieFlags.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}},d.prototype.stateBeforeNumericEntity=function(p){(p|32)===n.LowerX?(this.entityExcess++,this.state=a.InHexEntity):(this.state=a.InNumericEntity,this.stateInNumericEntity(p))},d.prototype.emitNumericEntity=function(p){var m=this.index-this.entityExcess-1,I=m+2+ +(this.state===a.InHexEntity);I!==this.index&&(m>this.sectionStart&&this.emitPartial(this.sectionStart,m),this.sectionStart=this.index+Number(p),this.emitCodePoint((0,t.replaceCodePoint)(this.entityResult))),this.state=this.baseState},d.prototype.stateInNumericEntity=function(p){p===n.Semi?this.emitNumericEntity(!0):i(p)?(this.entityResult=this.entityResult*10+(p-n.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},d.prototype.stateInHexEntity=function(p){p===n.Semi?this.emitNumericEntity(!0):i(p)?(this.entityResult=this.entityResult*16+(p-n.Zero),this.entityExcess++):u(p)?(this.entityResult=this.entityResult*16+((p|32)-n.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},d.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===a.Text||this.baseState===a.InSpecialTag)},d.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===a.Text||this.state===a.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===a.InAttributeValueDq||this.state===a.InAttributeValueSq||this.state===a.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},d.prototype.shouldContinue=function(){return this.index0&&i.has(this.stack[this.stack.length-1]);){var o=this.stack.pop();(a=(n=this.cbs).onclosetag)===null||a===void 0||a.call(n,o,!0)}this.isVoidElement(t)||(this.stack.push(t),am.has(t)?this.foreignContext.push(!0):rm.has(t)&&this.foreignContext.push(!1)),(s=(r=this.cbs).onopentagname)===null||s===void 0||s.call(r,t),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(t){var n,a;this.startIndex=this.openTagStart,this.attribs&&((a=(n=this.cbs).onopentag)===null||a===void 0||a.call(n,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1},e.prototype.onclosetag=function(t,n){var a,r,s,i,o,u;this.endIndex=n;var c=this.getSlice(t,n);if(this.lowerCaseTagNames&&(c=c.toLowerCase()),(am.has(c)||rm.has(c))&&this.foreignContext.pop(),this.isVoidElement(c))!this.options.xmlMode&&c==="br"&&((r=(a=this.cbs).onopentagname)===null||r===void 0||r.call(a,"br"),(i=(s=this.cbs).onopentag)===null||i===void 0||i.call(s,"br",{},!0),(u=(o=this.cbs).onclosetag)===null||u===void 0||u.call(o,"br",!1));else{var l=this.stack.lastIndexOf(c);if(l!==-1)if(this.cbs.onclosetag)for(var f=this.stack.length-l;f--;)this.cbs.onclosetag(this.stack.pop(),f!==0);else this.stack.length=l;else!this.options.xmlMode&&c==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=n+1},e.prototype.onselfclosingtag=function(t){this.endIndex=t,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)},e.prototype.closeCurrentTag=function(t){var n,a,r=this.tagname;this.endOpenTag(t),this.stack[this.stack.length-1]===r&&((a=(n=this.cbs).onclosetag)===null||a===void 0||a.call(n,r,!t),this.stack.pop())},e.prototype.onattribname=function(t,n){this.startIndex=t;var a=this.getSlice(t,n);this.attribname=this.lowerCaseAttributeNames?a.toLowerCase():a},e.prototype.onattribdata=function(t,n){this.attribvalue+=this.getSlice(t,n)},e.prototype.onattribentity=function(t){this.attribvalue+=(0,Jp.fromCodePoint)(t)},e.prototype.onattribend=function(t,n){var a,r;this.endIndex=n,(r=(a=this.cbs).onattribute)===null||r===void 0||r.call(a,this.attribname,this.attribvalue,t===qi.QuoteType.Double?'"':t===qi.QuoteType.Single?"'":t===qi.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(t){var n=t.search(pAe),a=n<0?t:t.substr(0,n);return this.lowerCaseTagNames&&(a=a.toLowerCase()),a},e.prototype.ondeclaration=function(t,n){this.endIndex=n;var a=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){var r=this.getInstructionName(a);this.cbs.onprocessinginstruction("!".concat(r),"!".concat(a))}this.startIndex=n+1},e.prototype.onprocessinginstruction=function(t,n){this.endIndex=n;var a=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){var r=this.getInstructionName(a);this.cbs.onprocessinginstruction("?".concat(r),"?".concat(a))}this.startIndex=n+1},e.prototype.oncomment=function(t,n,a){var r,s,i,o;this.endIndex=n,(s=(r=this.cbs).oncomment)===null||s===void 0||s.call(r,this.getSlice(t,n-a)),(o=(i=this.cbs).oncommentend)===null||o===void 0||o.call(i),this.startIndex=n+1},e.prototype.oncdata=function(t,n,a){var r,s,i,o,u,c,l,f,d,p;this.endIndex=n;var m=this.getSlice(t,n-a);this.options.xmlMode||this.options.recognizeCDATA?((s=(r=this.cbs).oncdatastart)===null||s===void 0||s.call(r),(o=(i=this.cbs).ontext)===null||o===void 0||o.call(i,m),(c=(u=this.cbs).oncdataend)===null||c===void 0||c.call(u)):((f=(l=this.cbs).oncomment)===null||f===void 0||f.call(l,"[CDATA[".concat(m,"]]")),(p=(d=this.cbs).oncommentend)===null||p===void 0||p.call(d)),this.startIndex=n+1},e.prototype.onend=function(){var t,n;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var a=this.stack.length;a>0;this.cbs.onclosetag(this.stack[--a],!0));}(n=(t=this.cbs).onend)===null||n===void 0||n.call(t)},e.prototype.reset=function(){var t,n,a,r;(n=(t=this.cbs).onreset)===null||n===void 0||n.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(r=(a=this.cbs).onparserinit)===null||r===void 0||r.call(a,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(t){this.reset(),this.end(t)},e.prototype.getSlice=function(t,n){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var a=this.buffers[0].slice(t-this.bufferOffset,n-this.bufferOffset);n-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),a+=this.buffers[0].slice(0,n-this.bufferOffset);return a},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(t){var n,a;if(this.ended){(a=(n=this.cbs).onerror)===null||a===void 0||a.call(n,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)},e.prototype.end=function(t){var n,a;if(this.ended){(a=(n=this.cbs).onerror)===null||a===void 0||a.call(n,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(n){this.children=n},enumerable:!1,configurable:!0}),t}(Bf);Qe.NodeWithChildren=dl;var WT=function(e){qa(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=ln.ElementType.CDATA,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(dl);Qe.CDATA=WT;var GT=function(e){qa(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=ln.ElementType.Root,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(dl);Qe.Document=GT;var BT=function(e){qa(t,e);function t(n,a,r,s){r===void 0&&(r=[]),s===void 0&&(s=n==="script"?ln.ElementType.Script:n==="style"?ln.ElementType.Style:ln.ElementType.Tag);var i=e.call(this,r)||this;return i.name=n,i.attribs=a,i.type=s,i}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(n){this.name=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var n=this;return Object.keys(this.attribs).map(function(a){var r,s;return{name:a,value:n.attribs[a],namespace:(r=n["x-attribsNamespace"])===null||r===void 0?void 0:r[a],prefix:(s=n["x-attribsPrefix"])===null||s===void 0?void 0:s[a]}})},enumerable:!1,configurable:!0}),t}(dl);Qe.Element=BT;function HT(e){return(0,ln.isTag)(e)}Qe.isTag=HT;function VT(e){return e.type===ln.ElementType.CDATA}Qe.isCDATA=VT;function jT(e){return e.type===ln.ElementType.Text}Qe.isText=jT;function KT(e){return e.type===ln.ElementType.Comment}Qe.isComment=KT;function YT(e){return e.type===ln.ElementType.Directive}Qe.isDirective=YT;function qT(e){return e.type===ln.ElementType.Root}Qe.isDocument=qT;function hAe(e){return Object.prototype.hasOwnProperty.call(e,"children")}Qe.hasChildren=hAe;function Hf(e,t){t===void 0&&(t=!1);var n;if(jT(e))n=new xT(e.data);else if(KT(e))n=new FT(e.data);else if(HT(e)){var a=t?ec(e.children):[],r=new BT(e.name,Ws({},e.attribs),a);a.forEach(function(u){return u.parent=r}),e.namespace!=null&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=Ws({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=Ws({},e["x-attribsPrefix"])),n=r}else if(VT(e)){var a=t?ec(e.children):[],s=new WT(a);a.forEach(function(c){return c.parent=s}),n=s}else if(qT(e)){var a=t?ec(e.children):[],i=new GT(a);a.forEach(function(c){return c.parent=i}),e["x-mode"]&&(i["x-mode"]=e["x-mode"]),n=i}else if(YT(e)){var o=new zT(e.name,e.data);e["x-name"]!=null&&(o["x-name"]=e["x-name"],o["x-publicId"]=e["x-publicId"],o["x-systemId"]=e["x-systemId"]),n=o}else throw new Error("Not implemented yet: ".concat(e.type));return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}Qe.cloneNode=Hf;function ec(e){for(var t=e.map(function(a){return Hf(a,!0)}),n=1;n$\x80-\uFFFF]/g;var t=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);e.getCodePoint=String.prototype.codePointAt!=null?function(r,s){return r.codePointAt(s)}:function(r,s){return(r.charCodeAt(s)&64512)===55296?(r.charCodeAt(s)-55296)*1024+r.charCodeAt(s+1)-56320+65536:r.charCodeAt(s)};function n(r){for(var s="",i=0,o;(o=e.xmlReplacer.exec(r))!==null;){var u=o.index,c=r.charCodeAt(u),l=t.get(c);l!==void 0?(s+=r.substring(i,u)+l,i=u+1):(s+="".concat(r.substring(i,u),"").concat((0,e.getCodePoint)(r,u).toString(16),";"),i=e.xmlReplacer.lastIndex+=+((c&64512)===55296))}return s+r.substr(i)}e.encodeXML=n,e.escape=n;function a(r,s){return function(o){for(var u,c=0,l="";u=r.exec(o);)c!==u.index&&(l+=o.substring(c,u.index)),l+=s.get(u[0].charCodeAt(0)),c=u.index+1;return l+o.substring(c)}}e.escapeUTF8=a(/[&<>'"]/g,t),e.escapeAttribute=a(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),e.escapeText=a(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(Nu);var _Ae=ke&&ke.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cr,"__esModule",{value:!0});cr.encodeNonAsciiHTML=cr.encodeHTML=void 0;var TAe=_Ae(Vf),ZT=Nu,gAe=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function AAe(e){return QT(gAe,e)}cr.encodeHTML=AAe;function SAe(e){return QT(ZT.xmlReplacer,e)}cr.encodeNonAsciiHTML=SAe;function QT(e,t){for(var n="",a=0,r;(r=e.exec(t))!==null;){var s=r.index;n+=t.substring(a,s);var i=t.charCodeAt(s),o=TAe.default.get(i);if(typeof o=="object"){if(s+1"):(a+=">",e.children.length>0&&(a+=fl(e.children,t)),(t.xmlMode||!sm.has(e.name))&&(a+="".concat(e.name,">"))),a}function LAe(e){return"<".concat(e.data,">")}function wAe(e,t){var n,a=e.data||"";return((n=t.encodeEntities)!==null&&n!==void 0?n:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&bAe.has(e.parent.name))&&(a=t.xmlMode||t.encodeEntities!=="utf8"?(0,vu.encodeXML)(a):(0,vu.escapeText)(a)),a}function kAe(e){return"")}function $Ae(e){return"")}var UAe=ke&&ke.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hn,"__esModule",{value:!0});hn.innerText=hn.textContent=hn.getText=hn.getInnerHTML=hn.getOuterHTML=void 0;var Yn=Ea,MAe=UAe(vi),xAe=fs;function eg(e,t){return(0,MAe.default)(e,t)}hn.getOuterHTML=eg;function FAe(e,t){return(0,Yn.hasChildren)(e)?e.children.map(function(n){return eg(n,t)}).join(""):""}hn.getInnerHTML=FAe;function Co(e){return Array.isArray(e)?e.map(Co).join(""):(0,Yn.isTag)(e)?e.name==="br"?`
+`:Co(e.children):(0,Yn.isCDATA)(e)?Co(e.children):(0,Yn.isText)(e)?e.data:""}hn.getText=Co;function dd(e){return Array.isArray(e)?e.map(dd).join(""):(0,Yn.hasChildren)(e)&&!(0,Yn.isComment)(e)?dd(e.children):(0,Yn.isText)(e)?e.data:""}hn.textContent=dd;function fd(e){return Array.isArray(e)?e.map(fd).join(""):(0,Yn.hasChildren)(e)&&(e.type===xAe.ElementType.Tag||(0,Yn.isCDATA)(e))?fd(e.children):(0,Yn.isText)(e)?e.data:""}hn.innerText=fd;var Ut={};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.prevElementSibling=Ut.nextElementSibling=Ut.getName=Ut.hasAttrib=Ut.getAttributeValue=Ut.getSiblings=Ut.getParent=Ut.getChildren=void 0;var jf=Ea;function tg(e){return(0,jf.hasChildren)(e)?e.children:[]}Ut.getChildren=tg;function ng(e){return e.parent||null}Ut.getParent=ng;function zAe(e){var t,n,a=ng(e);if(a!=null)return tg(a);for(var r=[e],s=e.prev,i=e.next;s!=null;)r.unshift(s),t=s,s=t.prev;for(;i!=null;)r.push(i),n=i,i=n.next;return r}Ut.getSiblings=zAe;function WAe(e,t){var n;return(n=e.attribs)===null||n===void 0?void 0:n[t]}Ut.getAttributeValue=WAe;function GAe(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}Ut.hasAttrib=GAe;function BAe(e){return e.name}Ut.getName=BAe;function HAe(e){for(var t,n=e.next;n!==null&&!(0,jf.isTag)(n);)t=n,n=t.next;return n}Ut.nextElementSibling=HAe;function VAe(e){for(var t,n=e.prev;n!==null&&!(0,jf.isTag)(n);)t=n,n=t.prev;return n}Ut.prevElementSibling=VAe;var un={};Object.defineProperty(un,"__esModule",{value:!0});un.prepend=un.prependChild=un.append=un.appendChild=un.replaceElement=un.removeElement=void 0;function Ci(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children,n=t.lastIndexOf(e);n>=0&&t.splice(n,1)}e.next=null,e.prev=null,e.parent=null}un.removeElement=Ci;function jAe(e,t){var n=t.prev=e.prev;n&&(n.next=t);var a=t.next=e.next;a&&(a.prev=t);var r=t.parent=e.parent;if(r){var s=r.children;s[s.lastIndexOf(e)]=t,e.parent=null}}un.replaceElement=jAe;function KAe(e,t){if(Ci(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null}un.appendChild=KAe;function YAe(e,t){Ci(t);var n=e.parent,a=e.next;if(t.next=a,t.prev=e,e.next=t,t.parent=n,a){if(a.prev=t,n){var r=n.children;r.splice(r.lastIndexOf(a),0,t)}}else n&&n.children.push(t)}un.append=YAe;function qAe(e,t){if(Ci(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){var n=e.children[1];n.prev=t,t.next=n}else t.next=null}un.prependChild=qAe;function XAe(e,t){Ci(t);var n=e.parent;if(n){var a=n.children;a.splice(a.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}un.prepend=XAe;var Jt={};Object.defineProperty(Jt,"__esModule",{value:!0});Jt.findAll=Jt.existsOne=Jt.findOne=Jt.findOneChild=Jt.find=Jt.filter=void 0;var El=Ea;function ZAe(e,t,n,a){return n===void 0&&(n=!0),a===void 0&&(a=1/0),ag(e,Array.isArray(t)?t:[t],n,a)}Jt.filter=ZAe;function ag(e,t,n,a){for(var r=[],s=[t],i=[0];;){if(i[0]>=s[0].length){if(i.length===1)return r;s.shift(),i.shift();continue}var o=s[0][i[0]++];if(e(o)&&(r.push(o),--a<=0))return r;n&&(0,El.hasChildren)(o)&&o.children.length>0&&(i.unshift(0),s.unshift(o.children))}}Jt.find=ag;function QAe(e,t){return t.find(e)}Jt.findOneChild=QAe;function rg(e,t,n){n===void 0&&(n=!0);for(var a=null,r=0;r0&&(a=rg(e,s.children,!0));else continue}return a}Jt.findOne=rg;function sg(e,t){return t.some(function(n){return(0,El.isTag)(n)&&(e(n)||sg(e,n.children))})}Jt.existsOne=sg;function JAe(e,t){for(var n=[],a=[t],r=[0];;){if(r[0]>=a[0].length){if(a.length===1)return n;a.shift(),r.shift();continue}var s=a[0][r[0]++];(0,El.isTag)(s)&&(e(s)&&n.push(s),s.children.length>0&&(r.unshift(0),a.unshift(s.children)))}}Jt.findAll=JAe;var _n={};Object.defineProperty(_n,"__esModule",{value:!0});_n.getElementsByTagType=_n.getElementsByTagName=_n.getElementById=_n.getElements=_n.testElement=void 0;var ar=Ea,pl=Jt,Cu={tag_name:function(e){return typeof e=="function"?function(t){return(0,ar.isTag)(t)&&e(t.name)}:e==="*"?ar.isTag:function(t){return(0,ar.isTag)(t)&&t.name===e}},tag_type:function(e){return typeof e=="function"?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return typeof e=="function"?function(t){return(0,ar.isText)(t)&&e(t.data)}:function(t){return(0,ar.isText)(t)&&t.data===e}}};function ig(e,t){return typeof t=="function"?function(n){return(0,ar.isTag)(n)&&t(n.attribs[e])}:function(n){return(0,ar.isTag)(n)&&n.attribs[e]===t}}function eSe(e,t){return function(n){return e(n)||t(n)}}function og(e){var t=Object.keys(e).map(function(n){var a=e[n];return Object.prototype.hasOwnProperty.call(Cu,n)?Cu[n](a):ig(n,a)});return t.length===0?null:t.reduce(eSe)}function tSe(e,t){var n=og(e);return n?n(t):!0}_n.testElement=tSe;function nSe(e,t,n,a){a===void 0&&(a=1/0);var r=og(e);return r?(0,pl.filter)(r,t,n,a):[]}_n.getElements=nSe;function aSe(e,t,n){return n===void 0&&(n=!0),Array.isArray(t)||(t=[t]),(0,pl.findOne)(ig("id",e),t,n)}_n.getElementById=aSe;function rSe(e,t,n,a){return n===void 0&&(n=!0),a===void 0&&(a=1/0),(0,pl.filter)(Cu.tag_name(e),t,n,a)}_n.getElementsByTagName=rSe;function sSe(e,t,n,a){return n===void 0&&(n=!0),a===void 0&&(a=1/0),(0,pl.filter)(Cu.tag_type(e),t,n,a)}_n.getElementsByTagType=sSe;var ug={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueSort=e.compareDocumentPosition=e.DocumentPosition=e.removeSubsets=void 0;var t=Ea;function n(i){for(var o=i.length;--o>=0;){var u=i[o];if(o>0&&i.lastIndexOf(u,o-1)>=0){i.splice(o,1);continue}for(var c=u.parent;c;c=c.parent)if(i.includes(c)){i.splice(o,1);break}}return i}e.removeSubsets=n;var a;(function(i){i[i.DISCONNECTED=1]="DISCONNECTED",i[i.PRECEDING=2]="PRECEDING",i[i.FOLLOWING=4]="FOLLOWING",i[i.CONTAINS=8]="CONTAINS",i[i.CONTAINED_BY=16]="CONTAINED_BY"})(a=e.DocumentPosition||(e.DocumentPosition={}));function r(i,o){var u=[],c=[];if(i===o)return 0;for(var l=(0,t.hasChildren)(i)?i:i.parent;l;)u.unshift(l),l=l.parent;for(l=(0,t.hasChildren)(o)?o:o.parent;l;)c.unshift(l),l=l.parent;for(var f=Math.min(u.length,c.length),d=0;dm.indexOf(b)?p===o?a.FOLLOWING|a.CONTAINED_BY:a.FOLLOWING:p===i?a.PRECEDING|a.CONTAINS:a.PRECEDING}e.compareDocumentPosition=r;function s(i){return i=i.filter(function(o,u,c){return!c.includes(o,u+1)}),i.sort(function(o,u){var c=r(o,u);return c&a.PRECEDING?-1:c&a.FOLLOWING?1:0}),i}e.uniqueSort=s})(ug);var ml={};Object.defineProperty(ml,"__esModule",{value:!0});ml.getFeed=void 0;var iSe=hn,yi=_n;function oSe(e){var t=yu(fSe,e);return t?t.name==="feed"?uSe(t):lSe(t):null}ml.getFeed=oSe;function uSe(e){var t,n=e.children,a={type:"atom",items:(0,yi.getElementsByTagName)("entry",n).map(function(i){var o,u=i.children,c={media:lg(u)};sn(c,"id","id",u),sn(c,"title","title",u);var l=(o=yu("link",u))===null||o===void 0?void 0:o.attribs.href;l&&(c.link=l);var f=ka("summary",u)||ka("content",u);f&&(c.description=f);var d=ka("updated",u);return d&&(c.pubDate=new Date(d)),c})};sn(a,"id","id",n),sn(a,"title","title",n);var r=(t=yu("link",n))===null||t===void 0?void 0:t.attribs.href;r&&(a.link=r),sn(a,"description","subtitle",n);var s=ka("updated",n);return s&&(a.updated=new Date(s)),sn(a,"author","email",n,!0),a}function lSe(e){var t,n,a=(n=(t=yu("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&n!==void 0?n:[],r={type:e.name.substr(0,3),id:"",items:(0,yi.getElementsByTagName)("item",e.children).map(function(i){var o=i.children,u={media:lg(o)};sn(u,"id","guid",o),sn(u,"title","title",o),sn(u,"link","link",o),sn(u,"description","description",o);var c=ka("pubDate",o)||ka("dc:date",o);return c&&(u.pubDate=new Date(c)),u})};sn(r,"title","title",a),sn(r,"link","link",a),sn(r,"description","description",a);var s=ka("lastBuildDate",a);return s&&(r.updated=new Date(s)),sn(r,"author","managingEditor",a,!0),r}var cSe=["url","type","lang"],dSe=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function lg(e){return(0,yi.getElementsByTagName)("media:content",e).map(function(t){for(var n=t.attribs,a={medium:n.medium,isDefault:!!n.isDefault},r=0,s=cSe;r{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")},Kf={};Object.defineProperty(Kf,"__esModule",{value:!0});/*!
* is-plain-object
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
- */function im(e){return Object.prototype.toString.call(e)==="[object Object]"}function mSe(e){var t,n;return im(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(im(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}Kf.isPlainObject=mSe;var hSe=function(t){return _Se(t)&&!TSe(t)};function _Se(e){return!!e&&typeof e=="object"}function TSe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||SSe(e)}var gSe=typeof Symbol=="function"&&Symbol.for,ASe=gSe?Symbol.for("react.element"):60103;function SSe(e){return e.$$typeof===ASe}function OSe(e){return Array.isArray(e)?[]:{}}function si(e,t){return t.clone!==!1&&t.isMergeableObject(e)?ns(OSe(e),e,t):e}function ISe(e,t,n){return e.concat(t).map(function(a){return si(a,n)})}function RSe(e,t){if(!t.customMerge)return ns;var n=t.customMerge(e);return typeof n=="function"?n:ns}function bSe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function om(e){return Object.keys(e).concat(bSe(e))}function cg(e,t){try{return t in e}catch{return!1}}function NSe(e,t){return cg(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function vSe(e,t,n){var a={};return n.isMergeableObject(e)&&om(e).forEach(function(r){a[r]=si(e[r],n)}),om(t).forEach(function(r){NSe(e,r)||(cg(e,r)&&n.isMergeableObject(t[r])?a[r]=RSe(r,n)(e[r],t[r],n):a[r]=si(t[r],n))}),a}function ns(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||ISe,n.isMergeableObject=n.isMergeableObject||hSe,n.cloneUnlessOtherwiseSpecified=si;var a=Array.isArray(t),r=Array.isArray(e),s=a===r;return s?a?n.arrayMerge(e,t,n):vSe(e,t,n):si(t,n)}ns.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(a,r){return ns(a,r,n)},{})};var CSe=ns,ySe=CSe,dg={exports:{}};(function(e){(function(t,n){e.exports?e.exports=n():t.parseSrcset=n()})(ke,function(){return function(t){function n(O){return O===" "||O===" "||O===`
-`||O==="\f"||O==="\r"}function a(O){var C,P=O.exec(t.substring(b));if(P)return C=P[0],b+=C.length,C}for(var r=t.length,s=/^[ \t\n\r\u000c]+/,i=/^[, \t\n\r\u000c]+/,o=/^[^ \t\n\r\u000c]+/,u=/[,]+$/,c=/^\d+$/,l=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,f,d,p,m,I,b=0,R=[];;){if(a(i),b>=r)return R;f=a(o),d=[],f.slice(-1)===","?(f=f.replace(u,""),S()):N()}function N(){for(a(s),p="",m="in descriptor";;){if(I=t.charAt(b),m==="in descriptor")if(n(I))p&&(d.push(p),p="",m="after descriptor");else if(I===","){b+=1,p&&d.push(p),S();return}else if(I==="(")p=p+I,m="in parens";else if(I===""){p&&d.push(p),S();return}else p=p+I;else if(m==="in parens")if(I===")")p=p+I,m="in descriptor";else if(I===""){d.push(p),S();return}else p=p+I;else if(m==="after descriptor"&&!n(I))if(I===""){S();return}else m="in descriptor",b-=1;b+=1}}function S(){var O=!1,C,P,M,L,W={},B,w,X,J,ne;for(L=0;L",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let n=this.source;t==null&&(t=um.isColorSupported),lm&&t&&(n=lm(n));let a=n.split(/\r?\n/),r=Math.max(this.line-3,0),s=Math.min(this.line+2,a.length),i=String(s).length,o,u;if(t){let{bold:c,gray:l,red:f}=um.createColors(!0);o=d=>c(f(d)),u=d=>l(d)}else o=u=c=>c;return a.slice(r,s).map((c,l)=>{let f=r+1+l,d=" "+(" "+f).slice(-i)+" | ";if(f===this.line){let p=u(d.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+u(d)+c+`
+ */function im(e){return Object.prototype.toString.call(e)==="[object Object]"}function pSe(e){var t,n;return im(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(im(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}Kf.isPlainObject=pSe;var mSe=function(t){return hSe(t)&&!_Se(t)};function hSe(e){return!!e&&typeof e=="object"}function _Se(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||ASe(e)}var TSe=typeof Symbol=="function"&&Symbol.for,gSe=TSe?Symbol.for("react.element"):60103;function ASe(e){return e.$$typeof===gSe}function SSe(e){return Array.isArray(e)?[]:{}}function si(e,t){return t.clone!==!1&&t.isMergeableObject(e)?ns(SSe(e),e,t):e}function OSe(e,t,n){return e.concat(t).map(function(a){return si(a,n)})}function ISe(e,t){if(!t.customMerge)return ns;var n=t.customMerge(e);return typeof n=="function"?n:ns}function RSe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function om(e){return Object.keys(e).concat(RSe(e))}function cg(e,t){try{return t in e}catch{return!1}}function bSe(e,t){return cg(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function NSe(e,t,n){var a={};return n.isMergeableObject(e)&&om(e).forEach(function(r){a[r]=si(e[r],n)}),om(t).forEach(function(r){bSe(e,r)||(cg(e,r)&&n.isMergeableObject(t[r])?a[r]=ISe(r,n)(e[r],t[r],n):a[r]=si(t[r],n))}),a}function ns(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||OSe,n.isMergeableObject=n.isMergeableObject||mSe,n.cloneUnlessOtherwiseSpecified=si;var a=Array.isArray(t),r=Array.isArray(e),s=a===r;return s?a?n.arrayMerge(e,t,n):NSe(e,t,n):si(t,n)}ns.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(a,r){return ns(a,r,n)},{})};var vSe=ns,CSe=vSe,dg={exports:{}};(function(e){(function(t,n){e.exports?e.exports=n():t.parseSrcset=n()})(ke,function(){return function(t){function n(O){return O===" "||O===" "||O===`
+`||O==="\f"||O==="\r"}function a(O){var C,P=O.exec(t.substring(b));if(P)return C=P[0],b+=C.length,C}for(var r=t.length,s=/^[ \t\n\r\u000c]+/,i=/^[, \t\n\r\u000c]+/,o=/^[^ \t\n\r\u000c]+/,u=/[,]+$/,c=/^\d+$/,l=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,f,d,p,m,I,b=0,R=[];;){if(a(i),b>=r)return R;f=a(o),d=[],f.slice(-1)===","?(f=f.replace(u,""),S()):N()}function N(){for(a(s),p="",m="in descriptor";;){if(I=t.charAt(b),m==="in descriptor")if(n(I))p&&(d.push(p),p="",m="after descriptor");else if(I===","){b+=1,p&&d.push(p),S();return}else if(I==="(")p=p+I,m="in parens";else if(I===""){p&&d.push(p),S();return}else p=p+I;else if(m==="in parens")if(I===")")p=p+I,m="in descriptor";else if(I===""){d.push(p),S();return}else p=p+I;else if(m==="after descriptor"&&!n(I))if(I===""){S();return}else m="in descriptor",b-=1;b+=1}}function S(){var O=!1,C,P,M,L,W={},B,w,X,J,ne;for(L=0;L",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let n=this.source;t==null&&(t=um.isColorSupported),lm&&t&&(n=lm(n));let a=n.split(/\r?\n/),r=Math.max(this.line-3,0),s=Math.min(this.line+2,a.length),i=String(s).length,o,u;if(t){let{bold:c,gray:l,red:f}=um.createColors(!0);o=d=>c(f(d)),u=d=>l(d)}else o=u=c=>c;return a.slice(r,s).map((c,l)=>{let f=r+1+l,d=" "+(" "+f).slice(-i)+" | ";if(f===this.line){let p=u(d.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+u(d)+c+`
`+p+o("^")}return" "+u(d)+c}).join(`
`)}toString(){let t=this.showSourceCode();return t&&(t=`
@@ -403,30 +403,30 @@ Wymagania prawne mogę być inne, jeśli ten serwer znajduje się w innej jurysd
`,beforeComment:`
`,beforeDecl:`
`,beforeOpen:" ",beforeRule:`
-`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function kSe(e){return e[0].toUpperCase()+e.slice(1)}let pd=class{constructor(t){this.builder=t}atrule(t,n){let a="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?a+=t.raws.afterName:r&&(a+=" "),t.nodes)this.block(t,a+r);else{let s=(t.raws.between||"")+(n?";":"");this.builder(a+r+s,t)}}beforeAfter(t,n){let a;t.type==="decl"?a=this.raw(t,null,"beforeDecl"):t.type==="comment"?a=this.raw(t,null,"beforeComment"):n==="before"?a=this.raw(t,null,"beforeRule"):a=this.raw(t,null,"beforeClose");let r=t.parent,s=0;for(;r&&r.type!=="root";)s+=1,r=r.parent;if(a.includes(`
-`)){let i=this.raw(t,null,"indent");if(i.length)for(let o=0;o0&&t.nodes[n].type==="comment";)n-=1;let a=this.raw(t,"semicolon");for(let r=0;r{if(r=u.raws[n],typeof r<"u")return!1})}return typeof r>"u"&&(r=cm[a]),i.rawCache[a]=r,r}rawBeforeClose(t){let n;return t.walk(a=>{if(a.nodes&&a.nodes.length>0&&typeof a.raws.after<"u")return n=a.raws.after,n.includes(`
+`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function wSe(e){return e[0].toUpperCase()+e.slice(1)}let pd=class{constructor(t){this.builder=t}atrule(t,n){let a="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?a+=t.raws.afterName:r&&(a+=" "),t.nodes)this.block(t,a+r);else{let s=(t.raws.between||"")+(n?";":"");this.builder(a+r+s,t)}}beforeAfter(t,n){let a;t.type==="decl"?a=this.raw(t,null,"beforeDecl"):t.type==="comment"?a=this.raw(t,null,"beforeComment"):n==="before"?a=this.raw(t,null,"beforeRule"):a=this.raw(t,null,"beforeClose");let r=t.parent,s=0;for(;r&&r.type!=="root";)s+=1,r=r.parent;if(a.includes(`
+`)){let i=this.raw(t,null,"indent");if(i.length)for(let o=0;o0&&t.nodes[n].type==="comment";)n-=1;let a=this.raw(t,"semicolon");for(let r=0;r{if(r=u.raws[n],typeof r<"u")return!1})}return typeof r>"u"&&(r=cm[a]),i.rawCache[a]=r,r}rawBeforeClose(t){let n;return t.walk(a=>{if(a.nodes&&a.nodes.length>0&&typeof a.raws.after<"u")return n=a.raws.after,n.includes(`
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(t,n){let a;return t.walkComments(r=>{if(typeof r.raws.before<"u")return a=r.raws.before,a.includes(`
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),typeof a>"u"?a=this.raw(n,null,"beforeDecl"):a&&(a=a.replace(/\S/g,"")),a}rawBeforeDecl(t,n){let a;return t.walkDecls(r=>{if(typeof r.raws.before<"u")return a=r.raws.before,a.includes(`
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),typeof a>"u"?a=this.raw(n,null,"beforeRule"):a&&(a=a.replace(/\S/g,"")),a}rawBeforeOpen(t){let n;return t.walk(a=>{if(a.type!=="decl"&&(n=a.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(t){let n;return t.walk(a=>{if(a.nodes&&(a.parent!==t||t.first!==a)&&typeof a.raws.before<"u")return n=a.raws.before,n.includes(`
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(t){let n;return t.walkDecls(a=>{if(typeof a.raws.between<"u")return n=a.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(t){let n;return t.walk(a=>{if(a.nodes&&a.nodes.length===0&&(n=a.raws.after,typeof n<"u"))return!1}),n}rawIndent(t){if(t.raws.indent)return t.raws.indent;let n;return t.walk(a=>{let r=a.parent;if(r&&r!==t&&r.parent&&r.parent===t&&typeof a.raws.before<"u"){let s=a.raws.before.split(`
-`);return n=s[s.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(t){let n;return t.walk(a=>{if(a.nodes&&a.nodes.length&&a.last.type==="decl"&&(n=a.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(t,n){let a=t[n],r=t.raws[n];return r&&r.value===a?r.raw:a}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,n){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,n)}};var pg=pd;pd.default=pd;let $Se=pg;function md(e,t){new $Se(t).stringify(e)}var hl=md;md.default=md;let{isClean:Zi,my:USe}=Di,MSe=qf,xSe=pg,FSe=hl;function hd(e,t){let n=new e.constructor;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||a==="proxyCache")continue;let r=e[a],s=typeof r;a==="parent"&&s==="object"?t&&(n[a]=t):a==="source"?n[a]=r:Array.isArray(r)?n[a]=r.map(i=>hd(i,n)):(s==="object"&&r!==null&&(r=hd(r)),n[a]=r)}return n}let _d=class{constructor(t={}){this.raws={},this[Zi]=!1,this[USe]=!0;for(let n in t)if(n==="nodes"){this.nodes=[];for(let a of t[n])typeof a.clone=="function"?this.append(a.clone()):this.append(a)}else this[n]=t[n]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let n=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let n in t)this[n]=t[n];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let n=hd(this);for(let a in t)n[a]=t[a];return n}cloneAfter(t={}){let n=this.clone(t);return this.parent.insertAfter(this,n),n}cloneBefore(t={}){let n=this.clone(t);return this.parent.insertBefore(this,n),n}error(t,n={}){if(this.source){let{end:a,start:r}=this.rangeBy(n);return this.source.input.error(t,{column:r.column,line:r.line},{column:a.column,line:a.line},n)}return new MSe(t)}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:n==="root"?()=>t.root().toProxy():t[n]},set(t,n,a){return t[n]===a||(t[n]=a,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&t.markDirty()),!0}}}markDirty(){if(this[Zi]){this[Zi]=!1;let t=this;for(;t=t.parent;)t[Zi]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,n){let a=this.source.start;if(t.index)a=this.positionInside(t.index,n);else if(t.word){n=this.toString();let r=n.indexOf(t.word);r!==-1&&(a=this.positionInside(r,n))}return a}positionInside(t,n){let a=n||this.toString(),r=this.source.start.column,s=this.source.start.line;for(let i=0;itypeof u=="object"&&u.toJSON?u.toJSON(null,n):u);else if(typeof o=="object"&&o.toJSON)a[i]=o.toJSON(null,n);else if(i==="source"){let u=n.get(o.input);u==null&&(u=s,n.set(o.input,s),s++),a[i]={end:o.end,inputId:u,start:o.start}}else a[i]=o}return r&&(a.inputs=[...n.keys()].map(i=>i.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=FSe){t.stringify&&(t=t.stringify);let n="";return t(this,a=>{n+=a}),n}warn(t,n,a){let r={node:this};for(let s in a)r[s]=a[s];return t.warn(n,r)}get proxyOf(){return this}};var _l=_d;_d.default=_d;let zSe=_l,Td=class extends zSe{constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Tl=Td;Td.default=Td;let WSe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",GSe=(e,t=21)=>(n=t)=>{let a="",r=n;for(;r--;)a+=e[Math.random()*e.length|0];return a},BSe=(e=21)=>{let t="",n=e;for(;n--;)t+=WSe[Math.random()*64|0];return t};var HSe={nanoid:BSe,customAlphabet:GSe};let{SourceMapConsumer:dm,SourceMapGenerator:fm}=kn,{existsSync:VSe,readFileSync:jSe}=kn,{dirname:tc,join:KSe}=kn;function YSe(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let gd=class{constructor(t,n){if(n.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let a=n.map?n.map.prev:void 0,r=this.loadMap(n.from,a);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=tc(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new dm(this.text)),this.consumerCache}decodeInline(t){let n=/^data:application\/json;charset=utf-?8;base64,/,a=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/;if(r.test(t)||s.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(n.test(t)||a.test(t))return YSe(t.substr(RegExp.lastMatch.length));let i=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let n=t.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let a=t.lastIndexOf(n.pop()),r=t.indexOf("*/",a);a>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(a,r)))}loadFile(t){if(this.root=tc(t),VSe(t))return this.mapFile=t,jSe(t,"utf-8").toString().trim()}loadMap(t,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let a=n(t);if(a){let r=this.loadFile(a);if(!r)throw new Error("Unable to load previous source map: "+a.toString());return r}}else{if(n instanceof dm)return fm.fromSourceMap(n).toString();if(n instanceof fm)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let a=this.annotation;return t&&(a=KSe(tc(t),a)),this.loadFile(a)}}}startWith(t,n){return t?t.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var mg=gd;gd.default=gd;let{SourceMapConsumer:qSe,SourceMapGenerator:XSe}=kn,{fileURLToPath:Em,pathToFileURL:Qi}=kn,{isAbsolute:Ad,resolve:Sd}=kn,{nanoid:ZSe}=HSe,nc=kn,pm=qf,QSe=mg,ac=Symbol("fromOffsetCache"),JSe=!!(qSe&&XSe),mm=!!(Sd&&Ad),Du=class{constructor(t,n={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!mm||/^\w+:\/\//.test(n.from)||Ad(n.from)?this.file=n.from:this.file=Sd(n.from)),mm&&JSe){let a=new QSe(this.css,n);if(a.text){this.map=a;let r=a.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(t,n,a,r={}){let s,i,o;if(n&&typeof n=="object"){let c=n,l=a;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);n=f.line,a=f.col}else n=c.line,a=c.column;if(typeof l.offset=="number"){let f=this.fromOffset(l.offset);i=f.line,o=f.col}else i=l.line,o=l.column}else if(!a){let c=this.fromOffset(n);n=c.line,a=c.col}let u=this.origin(n,a,i,o);return u?s=new pm(t,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,r.plugin):s=new pm(t,i===void 0?n:{column:a,line:n},i===void 0?a:{column:o,line:i},this.css,this.file,r.plugin),s.input={column:a,endColumn:o,endLine:i,line:n,source:this.css},this.file&&(Qi&&(s.input.url=Qi(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let n,a;if(this[ac])a=this[ac];else{let s=this.css.split(`
-`);a=new Array(s.length);let i=0;for(let o=0,u=s.length;o=n)r=a.length-1;else{let s=a.length-2,i;for(;r>1),t=a[i+1])r=i+1;else{r=i;break}}return{col:t-a[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Sd(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,n,a,r){if(!this.map)return!1;let s=this.map.consumer(),i=s.originalPositionFor({column:n,line:t});if(!i.source)return!1;let o;typeof a=="number"&&(o=s.originalPositionFor({column:r,line:a}));let u;Ad(i.source)?u=Qi(i.source):u=new URL(i.source,this.map.consumer().sourceRoot||Qi(this.map.mapFile));let c={column:i.column,endColumn:o&&o.column,endLine:o&&o.line,line:i.line,url:u.toString()};if(u.protocol==="file:")if(Em)c.file=Em(u);else throw new Error("file: protocol is not available in this PostCSS build");let l=s.sourceContentFor(i.source);return l&&(c.source=l),c}toJSON(){let t={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(t[n]=this[n]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}};var gl=Du;Du.default=Du;nc&&nc.registerInput&&nc.registerInput(Du);let{SourceMapConsumer:hg,SourceMapGenerator:yo}=kn,{dirname:Do,relative:_g,resolve:Tg,sep:gg}=kn,{pathToFileURL:hm}=kn,eOe=gl,tOe=!!(hg&&yo),nOe=!!(Do&&Tg&&_g&&gg),aOe=class{constructor(t,n,a,r){this.stringify=t,this.mapOpts=a.map||{},this.root=n,this.opts=a,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let n=`
+`);return n=s[s.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(t){let n;return t.walk(a=>{if(a.nodes&&a.nodes.length&&a.last.type==="decl"&&(n=a.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(t,n){let a=t[n],r=t.raws[n];return r&&r.value===a?r.raw:a}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,n){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,n)}};var pg=pd;pd.default=pd;let kSe=pg;function md(e,t){new kSe(t).stringify(e)}var hl=md;md.default=md;let{isClean:Zi,my:$Se}=Di,USe=qf,MSe=pg,xSe=hl;function hd(e,t){let n=new e.constructor;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||a==="proxyCache")continue;let r=e[a],s=typeof r;a==="parent"&&s==="object"?t&&(n[a]=t):a==="source"?n[a]=r:Array.isArray(r)?n[a]=r.map(i=>hd(i,n)):(s==="object"&&r!==null&&(r=hd(r)),n[a]=r)}return n}let _d=class{constructor(t={}){this.raws={},this[Zi]=!1,this[$Se]=!0;for(let n in t)if(n==="nodes"){this.nodes=[];for(let a of t[n])typeof a.clone=="function"?this.append(a.clone()):this.append(a)}else this[n]=t[n]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let n=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let n in t)this[n]=t[n];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let n=hd(this);for(let a in t)n[a]=t[a];return n}cloneAfter(t={}){let n=this.clone(t);return this.parent.insertAfter(this,n),n}cloneBefore(t={}){let n=this.clone(t);return this.parent.insertBefore(this,n),n}error(t,n={}){if(this.source){let{end:a,start:r}=this.rangeBy(n);return this.source.input.error(t,{column:r.column,line:r.line},{column:a.column,line:a.line},n)}return new USe(t)}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:n==="root"?()=>t.root().toProxy():t[n]},set(t,n,a){return t[n]===a||(t[n]=a,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&t.markDirty()),!0}}}markDirty(){if(this[Zi]){this[Zi]=!1;let t=this;for(;t=t.parent;)t[Zi]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,n){let a=this.source.start;if(t.index)a=this.positionInside(t.index,n);else if(t.word){n=this.toString();let r=n.indexOf(t.word);r!==-1&&(a=this.positionInside(r,n))}return a}positionInside(t,n){let a=n||this.toString(),r=this.source.start.column,s=this.source.start.line;for(let i=0;itypeof u=="object"&&u.toJSON?u.toJSON(null,n):u);else if(typeof o=="object"&&o.toJSON)a[i]=o.toJSON(null,n);else if(i==="source"){let u=n.get(o.input);u==null&&(u=s,n.set(o.input,s),s++),a[i]={end:o.end,inputId:u,start:o.start}}else a[i]=o}return r&&(a.inputs=[...n.keys()].map(i=>i.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=xSe){t.stringify&&(t=t.stringify);let n="";return t(this,a=>{n+=a}),n}warn(t,n,a){let r={node:this};for(let s in a)r[s]=a[s];return t.warn(n,r)}get proxyOf(){return this}};var _l=_d;_d.default=_d;let FSe=_l,Td=class extends FSe{constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Tl=Td;Td.default=Td;let zSe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",WSe=(e,t=21)=>(n=t)=>{let a="",r=n;for(;r--;)a+=e[Math.random()*e.length|0];return a},GSe=(e=21)=>{let t="",n=e;for(;n--;)t+=zSe[Math.random()*64|0];return t};var BSe={nanoid:GSe,customAlphabet:WSe};let{SourceMapConsumer:dm,SourceMapGenerator:fm}=kn,{existsSync:HSe,readFileSync:VSe}=kn,{dirname:tc,join:jSe}=kn;function KSe(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let gd=class{constructor(t,n){if(n.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let a=n.map?n.map.prev:void 0,r=this.loadMap(n.from,a);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=tc(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new dm(this.text)),this.consumerCache}decodeInline(t){let n=/^data:application\/json;charset=utf-?8;base64,/,a=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/;if(r.test(t)||s.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(n.test(t)||a.test(t))return KSe(t.substr(RegExp.lastMatch.length));let i=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let n=t.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let a=t.lastIndexOf(n.pop()),r=t.indexOf("*/",a);a>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(a,r)))}loadFile(t){if(this.root=tc(t),HSe(t))return this.mapFile=t,VSe(t,"utf-8").toString().trim()}loadMap(t,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let a=n(t);if(a){let r=this.loadFile(a);if(!r)throw new Error("Unable to load previous source map: "+a.toString());return r}}else{if(n instanceof dm)return fm.fromSourceMap(n).toString();if(n instanceof fm)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let a=this.annotation;return t&&(a=jSe(tc(t),a)),this.loadFile(a)}}}startWith(t,n){return t?t.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var mg=gd;gd.default=gd;let{SourceMapConsumer:YSe,SourceMapGenerator:qSe}=kn,{fileURLToPath:Em,pathToFileURL:Qi}=kn,{isAbsolute:Ad,resolve:Sd}=kn,{nanoid:XSe}=BSe,nc=kn,pm=qf,ZSe=mg,ac=Symbol("fromOffsetCache"),QSe=!!(YSe&&qSe),mm=!!(Sd&&Ad),Du=class{constructor(t,n={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!mm||/^\w+:\/\//.test(n.from)||Ad(n.from)?this.file=n.from:this.file=Sd(n.from)),mm&&QSe){let a=new ZSe(this.css,n);if(a.text){this.map=a;let r=a.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(t,n,a,r={}){let s,i,o;if(n&&typeof n=="object"){let c=n,l=a;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);n=f.line,a=f.col}else n=c.line,a=c.column;if(typeof l.offset=="number"){let f=this.fromOffset(l.offset);i=f.line,o=f.col}else i=l.line,o=l.column}else if(!a){let c=this.fromOffset(n);n=c.line,a=c.col}let u=this.origin(n,a,i,o);return u?s=new pm(t,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,r.plugin):s=new pm(t,i===void 0?n:{column:a,line:n},i===void 0?a:{column:o,line:i},this.css,this.file,r.plugin),s.input={column:a,endColumn:o,endLine:i,line:n,source:this.css},this.file&&(Qi&&(s.input.url=Qi(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let n,a;if(this[ac])a=this[ac];else{let s=this.css.split(`
+`);a=new Array(s.length);let i=0;for(let o=0,u=s.length;o=n)r=a.length-1;else{let s=a.length-2,i;for(;r>1),t=a[i+1])r=i+1;else{r=i;break}}return{col:t-a[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Sd(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,n,a,r){if(!this.map)return!1;let s=this.map.consumer(),i=s.originalPositionFor({column:n,line:t});if(!i.source)return!1;let o;typeof a=="number"&&(o=s.originalPositionFor({column:r,line:a}));let u;Ad(i.source)?u=Qi(i.source):u=new URL(i.source,this.map.consumer().sourceRoot||Qi(this.map.mapFile));let c={column:i.column,endColumn:o&&o.column,endLine:o&&o.line,line:i.line,url:u.toString()};if(u.protocol==="file:")if(Em)c.file=Em(u);else throw new Error("file: protocol is not available in this PostCSS build");let l=s.sourceContentFor(i.source);return l&&(c.source=l),c}toJSON(){let t={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(t[n]=this[n]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}};var gl=Du;Du.default=Du;nc&&nc.registerInput&&nc.registerInput(Du);let{SourceMapConsumer:hg,SourceMapGenerator:yo}=kn,{dirname:Do,relative:_g,resolve:Tg,sep:gg}=kn,{pathToFileURL:hm}=kn,JSe=gl,eOe=!!(hg&&yo),tOe=!!(Do&&Tg&&_g&&gg),nOe=class{constructor(t,n,a,r){this.stringify=t,this.mapOpts=a.map||{},this.root=n,this.opts=a,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let n=`
`;this.css.includes(`\r
`)&&(n=`\r
-`),this.css+=n+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let n=this.toUrl(this.path(t.file)),a=t.root||Do(t.file),r;this.mapOpts.sourcesContent===!1?(r=new hg(t.text),r.sourcesContent&&(r.sourcesContent=r.sourcesContent.map(()=>null))):r=t.consumer(),this.map.applySourceMap(r,n,this.toUrl(this.path(a)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let n=this.root.nodes.length-1;n>=0;n--)t=this.root.nodes[n],t.type==="comment"&&t.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),nOe&&tOe&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,n=>{t+=n}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=yo.fromSourceMap(t)}else this.map=new yo({file:this.outputFile()}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new yo({file:this.outputFile()});let t=1,n=1,a="",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,i;this.stringify(this.root,(o,u,c)=>{if(this.css+=o,u&&c!=="end"&&(r.generated.line=t,r.generated.column=n-1,u.source&&u.source.start?(r.source=this.sourcePath(u),r.original.line=u.source.start.line,r.original.column=u.source.start.column-1,this.map.addMapping(r)):(r.source=a,r.original.line=1,r.original.column=0,this.map.addMapping(r))),s=o.match(/\n/g),s?(t+=s.length,i=o.lastIndexOf(`
-`),n=o.length-i):n+=o.length,u&&c!=="start"){let l=u.parent||{raws:{}};(!(u.type==="decl"||u.type==="atrule"&&!u.nodes)||u!==l.last||l.raws.semicolon)&&(u.source&&u.source.end?(r.source=this.sourcePath(u),r.original.line=u.source.end.line,r.original.column=u.source.end.column-1,r.generated.line=t,r.generated.column=n-2,this.map.addMapping(r)):(r.source=a,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=n-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let n=this.memoizedPaths.get(t);if(n)return n;let a=this.opts.to?Do(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(a=Do(Tg(a,this.mapOpts.annotation)));let r=_g(a,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let n=t.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let t=new eOe(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(n=>{if(n.source){let a=n.source.input.from;if(a&&!t[a]){t[a]=!0;let r=this.usesFileUrls?this.toFileUrl(a):this.toUrl(this.path(a));this.map.setSourceContent(r,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(n,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let n=this.memoizedFileURLs.get(t);if(n)return n;if(hm){let a=hm(t).toString();return this.memoizedFileURLs.set(t,a),a}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let n=this.memoizedURLs.get(t);if(n)return n;gg==="\\"&&(t=t.replace(/\\/g,"/"));let a=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,a),a}};var Ag=aOe;let rOe=_l,Od=class extends rOe{constructor(t){super(t),this.type="comment"}};var Al=Od;Od.default=Od;let{isClean:Sg,my:Og}=Di,Ig=Tl,Rg=Al,sOe=_l,bg,Xf,Zf,Ng;function vg(e){return e.map(t=>(t.nodes&&(t.nodes=vg(t.nodes)),delete t.source,t))}function Cg(e){if(e[Sg]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Cg(t)}let pa=class yg extends sOe{append(...t){for(let n of t){let a=this.normalize(n,this.last);for(let r of a)this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let n of this.nodes)n.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let n=this.getIterator(),a,r;for(;this.indexes[n]t[n](...a.map(r=>typeof r=="function"?(s,i)=>r(s.toProxy(),i):r)):n==="every"||n==="some"?a=>t[n]((r,...s)=>a(r.toProxy(),...s)):n==="root"?()=>t.root().toProxy():n==="nodes"?t.nodes.map(a=>a.toProxy()):n==="first"||n==="last"?t[n].toProxy():t[n]:t[n]},set(t,n,a){return t[n]===a||(t[n]=a,(n==="name"||n==="params"||n==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,n){let a=this.index(t),r=this.normalize(n,this.proxyOf.nodes[a]).reverse();a=this.index(t);for(let i of r)this.proxyOf.nodes.splice(a+1,0,i);let s;for(let i in this.indexes)s=this.indexes[i],a"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new Ig(t)]}else if(t.selector)t=[new Xf(t)];else if(t.name)t=[new Zf(t)];else if(t.text)t=[new Rg(t)];else throw new Error("Unknown node type in node creation");return t.map(r=>(r[Og]||yg.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Sg]&&Cg(r),typeof r.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(r.raws.before=n.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...t){t=t.reverse();for(let n of t){let a=this.normalize(n,this.first,"prepend").reverse();for(let r of a)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+a.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let n;for(let a in this.indexes)n=this.indexes[a],n>=t&&(this.indexes[a]=n-1);return this.markDirty(),this}replaceValues(t,n,a){return a||(a=n,n={}),this.walkDecls(r=>{n.props&&!n.props.includes(r.prop)||n.fast&&!r.value.includes(n.fast)||(r.value=r.value.replace(t,a))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((n,a)=>{let r;try{r=t(n,a)}catch(s){throw n.addToError(s)}return r!==!1&&n.walk&&(r=n.walk(t)),r})}walkAtRules(t,n){return n?t instanceof RegExp?this.walk((a,r)=>{if(a.type==="atrule"&&t.test(a.name))return n(a,r)}):this.walk((a,r)=>{if(a.type==="atrule"&&a.name===t)return n(a,r)}):(n=t,this.walk((a,r)=>{if(a.type==="atrule")return n(a,r)}))}walkComments(t){return this.walk((n,a)=>{if(n.type==="comment")return t(n,a)})}walkDecls(t,n){return n?t instanceof RegExp?this.walk((a,r)=>{if(a.type==="decl"&&t.test(a.prop))return n(a,r)}):this.walk((a,r)=>{if(a.type==="decl"&&a.prop===t)return n(a,r)}):(n=t,this.walk((a,r)=>{if(a.type==="decl")return n(a,r)}))}walkRules(t,n){return n?t instanceof RegExp?this.walk((a,r)=>{if(a.type==="rule"&&t.test(a.selector))return n(a,r)}):this.walk((a,r)=>{if(a.type==="rule"&&a.selector===t)return n(a,r)}):(n=t,this.walk((a,r)=>{if(a.type==="rule")return n(a,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};pa.registerParse=e=>{bg=e};pa.registerRule=e=>{Xf=e};pa.registerAtRule=e=>{Zf=e};pa.registerRoot=e=>{Ng=e};var Tr=pa;pa.default=pa;pa.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,Zf.prototype):e.type==="rule"?Object.setPrototypeOf(e,Xf.prototype):e.type==="decl"?Object.setPrototypeOf(e,Ig.prototype):e.type==="comment"?Object.setPrototypeOf(e,Rg.prototype):e.type==="root"&&Object.setPrototypeOf(e,Ng.prototype),e[Og]=!0,e.nodes&&e.nodes.forEach(t=>{pa.rebuild(t)})};let iOe=Tr,Dg,Pg,ii=class extends iOe{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new Dg(new Pg,this,t).stringify()}};ii.registerLazyResult=e=>{Dg=e};ii.registerProcessor=e=>{Pg=e};var Qf=ii;ii.default=ii;let Id=class{constructor(t,n={}){if(this.type="warning",this.text=t,n.node&&n.node.source){let a=n.node.rangeBy(n);this.line=a.start.line,this.column=a.start.column,this.endLine=a.end.line,this.endColumn=a.end.column}for(let a in n)this[a]=n[a]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Lg=Id;Id.default=Id;let oOe=Lg,Rd=class{constructor(t,n,a){this.processor=t,this.messages=[],this.root=n,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let a=new oOe(t,n);return this.messages.push(a),a}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};var Jf=Rd;Rd.default=Rd;const rc=39,_m=34,Ji=92,Tm=47,eo=10,bs=32,to=12,no=9,ao=13,uOe=91,lOe=93,cOe=40,dOe=41,fOe=123,EOe=125,pOe=59,mOe=42,hOe=58,_Oe=64,ro=/[\t\n\f\r "#'()/;[\\\]{}]/g,so=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,TOe=/.[\r\n"'(/\\]/,gm=/[\da-f]/i;var gOe=function(t,n={}){let a=t.css.valueOf(),r=n.ignoreErrors,s,i,o,u,c,l,f,d,p,m,I=a.length,b=0,R=[],N=[];function S(){return b}function O(L){throw t.error("Unclosed "+L,b)}function C(){return N.length===0&&b>=I}function P(L){if(N.length)return N.pop();if(b>=I)return;let W=L?L.ignoreUnclosed:!1;switch(s=a.charCodeAt(b),s){case eo:case bs:case no:case ao:case to:{i=b;do i+=1,s=a.charCodeAt(i);while(s===bs||s===eo||s===no||s===ao||s===to);m=["space",a.slice(b,i)],b=i-1;break}case uOe:case lOe:case fOe:case EOe:case hOe:case pOe:case dOe:{let B=String.fromCharCode(s);m=[B,B,b];break}case cOe:{if(d=R.length?R.pop()[1]:"",p=a.charCodeAt(b+1),d==="url"&&p!==rc&&p!==_m&&p!==bs&&p!==eo&&p!==no&&p!==to&&p!==ao){i=b;do{if(l=!1,i=a.indexOf(")",i+1),i===-1)if(r||W){i=b;break}else O("bracket");for(f=i;a.charCodeAt(f-1)===Ji;)f-=1,l=!l}while(l);m=["brackets",a.slice(b,i+1),b,i],b=i}else i=a.indexOf(")",b+1),u=a.slice(b,i+1),i===-1||TOe.test(u)?m=["(","(",b]:(m=["brackets",u,b,i],b=i);break}case rc:case _m:{o=s===rc?"'":'"',i=b;do{if(l=!1,i=a.indexOf(o,i+1),i===-1)if(r||W){i=b+1;break}else O("string");for(f=i;a.charCodeAt(f-1)===Ji;)f-=1,l=!l}while(l);m=["string",a.slice(b,i+1),b,i],b=i;break}case _Oe:{ro.lastIndex=b+1,ro.test(a),ro.lastIndex===0?i=a.length-1:i=ro.lastIndex-2,m=["at-word",a.slice(b,i+1),b,i],b=i;break}case Ji:{for(i=b,c=!0;a.charCodeAt(i+1)===Ji;)i+=1,c=!c;if(s=a.charCodeAt(i+1),c&&s!==Tm&&s!==bs&&s!==eo&&s!==no&&s!==ao&&s!==to&&(i+=1,gm.test(a.charAt(i)))){for(;gm.test(a.charAt(i+1));)i+=1;a.charCodeAt(i+1)===bs&&(i+=1)}m=["word",a.slice(b,i+1),b,i],b=i;break}default:{s===Tm&&a.charCodeAt(b+1)===mOe?(i=a.indexOf("*/",b+2)+1,i===0&&(r||W?i=a.length:O("comment")),m=["comment",a.slice(b,i+1),b,i],b=i):(so.lastIndex=b+1,so.test(a),so.lastIndex===0?i=a.length-1:i=so.lastIndex-2,m=["word",a.slice(b,i+1),b,i],R.push(m),b=i);break}}return b++,m}function M(L){N.push(L)}return{back:M,endOfFile:C,nextToken:P,position:S}};let wg=Tr,Pu=class extends wg{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};var eE=Pu;Pu.default=Pu;wg.registerAtRule(Pu);let kg=Tr,$g,Ug,as=class extends kg{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,n,a){let r=super.normalize(t);if(n){if(a==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let s of r)s.raws.before=n.raws.before}return r}removeChild(t,n){let a=this.index(t);return!n&&a===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[a].raws.before),super.removeChild(t)}toResult(t={}){return new $g(new Ug,this,t).stringify()}};as.registerLazyResult=e=>{$g=e};as.registerProcessor=e=>{Ug=e};var Pi=as;as.default=as;kg.registerRoot(as);let oi={comma(e){return oi.split(e,[","],!0)},space(e){let t=[" ",`
-`," "];return oi.split(e,t)},split(e,t,n){let a=[],r="",s=!1,i=0,o=!1,u="",c=!1;for(let l of e)c?c=!1:l==="\\"?c=!0:o?l===u&&(o=!1):l==='"'||l==="'"?(o=!0,u=l):l==="("?i+=1:l===")"?i>0&&(i-=1):i===0&&t.includes(l)&&(s=!0),s?(r!==""&&a.push(r.trim()),r="",s=!1):r+=l;return(n||r!=="")&&a.push(r.trim()),a}};var Mg=oi;oi.default=oi;let xg=Tr,AOe=Mg,Lu=class extends xg{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return AOe.comma(this.selector)}set selectors(t){let n=this.selector?this.selector.match(/,\s*/):null,a=n?n[0]:","+this.raw("between","beforeOpen");this.selector=t.join(a)}};var tE=Lu;Lu.default=Lu;xg.registerRule(Lu);let SOe=Tl,OOe=gOe,IOe=Al,ROe=eE,bOe=Pi,Am=tE;const Sm={empty:!0,space:!0};function NOe(e){for(let t=e.length-1;t>=0;t--){let n=e[t],a=n[3]||n[2];if(a)return a}}let vOe=class{constructor(t){this.input=t,this.root=new bOe,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let n=new ROe;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let a,r,s,i=!1,o=!1,u=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),a=t[0],a==="("||a==="["?c.push(a==="("?")":"]"):a==="{"&&c.length>0?c.push("}"):a===c[c.length-1]&&c.pop(),c.length===0)if(a===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(a==="{"){o=!0;break}else if(a==="}"){if(u.length>0){for(s=u.length-1,r=u[s];r&&r[0]==="space";)r=u[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(t);break}else u.push(t);else u.push(t);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(n.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(n,"params",u),i&&(t=u[u.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){let n=this.colon(t);if(n===!1)return;let a=0,r;for(let s=n-1;s>=0&&(r=t[s],!(r[0]!=="space"&&(a+=1,a===2)));s--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let n=0,a,r,s;for(let[i,o]of t.entries()){if(a=o,r=a[0],r==="("&&(n+=1),r===")"&&(n-=1),n===0&&r===":")if(!s)this.doubleColon(a);else{if(s[0]==="word"&&s[1]==="progid")continue;return i}s=a}return!1}comment(t){let n=new IOe;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;let a=t[1].slice(2,-2);if(/^\s*$/.test(a))n.text="",n.raws.left=a,n.raws.right="";else{let r=a.match(/^(\s*)([^]*\S)(\s*)$/);n.text=r[2],n.raws.left=r[1],n.raws.right=r[3]}}createTokenizer(){this.tokenizer=OOe(this.input)}decl(t,n){let a=new SOe;this.init(a,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),a.source.end=this.getPosition(r[3]||r[2]||NOe(t)),a.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),a.raws.before+=t.shift()[1];for(a.source.start=this.getPosition(t[0][2]),a.prop="";t.length;){let c=t[0][0];if(c===":"||c==="space"||c==="comment")break;a.prop+=t.shift()[1]}a.raws.between="";let s;for(;t.length;)if(s=t.shift(),s[0]===":"){a.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),a.raws.between+=s[1];(a.prop[0]==="_"||a.prop[0]==="*")&&(a.raws.before+=a.prop[0],a.prop=a.prop.slice(1));let i=[],o;for(;t.length&&(o=t[0][0],!(o!=="space"&&o!=="comment"));)i.push(t.shift());this.precheckMissedSemicolon(t);for(let c=t.length-1;c>=0;c--){if(s=t[c],s[1].toLowerCase()==="!important"){a.important=!0;let l=this.stringFrom(t,c);l=this.spacesFromEnd(t)+l,l!==" !important"&&(a.raws.important=l);break}else if(s[1].toLowerCase()==="important"){let l=t.slice(0),f="";for(let d=c;d>0;d--){let p=l[d][0];if(f.trim().indexOf("!")===0&&p!=="space")break;f=l.pop()[1]+f}f.trim().indexOf("!")===0&&(a.important=!0,a.raws.important=f,t=l)}if(s[0]!=="space"&&s[0]!=="comment")break}t.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(a.raws.between+=i.map(c=>c[1]).join(""),i=[]),this.raw(a,"value",i.concat(t),n),a.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let n=new Am;this.init(n,t[2]),n.selector="",n.raws.between="",this.current=n}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let n=this.input.fromOffset(t);return{column:n.col,line:n.line,offset:t}}init(t,n){this.current.push(t),t.source={input:this.input,start:this.getPosition(n)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let n=!1,a=null,r=!1,s=null,i=[],o=t[1].startsWith("--"),u=[],c=t;for(;c;){if(a=c[0],u.push(c),a==="("||a==="[")s||(s=c),i.push(a==="("?")":"]");else if(o&&r&&a==="{")s||(s=c),i.push("}");else if(i.length===0)if(a===";")if(r){this.decl(u,o);return}else break;else if(a==="{"){this.rule(u);return}else if(a==="}"){this.tokenizer.back(u.pop()),n=!0;break}else a===":"&&(r=!0);else a===i[i.length-1]&&(i.pop(),i.length===0&&(s=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),i.length>0&&this.unclosedBracket(s),n&&r){if(!o)for(;u.length&&(c=u[u.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(u.pop());this.decl(u,o)}else this.unknownWord(u)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,n,a,r){let s,i,o=a.length,u="",c=!0,l,f;for(let d=0;dp+m[1],"");t.raws[n]={raw:d,value:u}}t[n]=u}rule(t){t.pop();let n=new Am;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n}spacesAndCommentsFromEnd(t){let n,a="";for(;t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)a=t.pop()[1]+a;return a}spacesAndCommentsFromStart(t){let n,a="";for(;t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)a+=t.shift()[1];return a}spacesFromEnd(t){let n,a="";for(;t.length&&(n=t[t.length-1][0],n==="space");)a=t.pop()[1]+a;return a}stringFrom(t,n){let a="";for(let r=n;rbd(t)),e}let Nd={},ss=class zg{constructor(t,n,a){this.stringified=!1,this.processed=!1;let r;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))r=bd(n);else if(n instanceof zg||n instanceof Om)r=bd(n.root),n.map&&(typeof a.map>"u"&&(a.map={}),a.map.inline||(a.map.inline=!1),a.map.prev=n.map);else{let s=MOe;a.syntax&&(s=a.syntax.parse),a.parser&&(s=a.parser),s.parse&&(s=s.parse);try{r=s(n,a)}catch(i){this.processed=!0,this.error=i}r&&!r[LOe]&&$Oe.rebuild(r)}this.result=new Om(t,r,a),this.helpers={...Nd,postcss:Nd,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,n){let a=this.result.lastPlugin;try{n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=a.postcssPlugin,t.setMessage()):a.postcssVersion}catch(r){console&&console.error&&console.error(r)}return t}prepareVisitors(){this.listeners={};let t=(n,a,r)=>{this.listeners[a]||(this.listeners[a]=[]),this.listeners[a].push([n,r])};for(let n of this.plugins)if(typeof n=="object")for(let a in n){if(!zOe[a]&&/^[A-Z]/.test(a))throw new Error(`Unknown event ${a} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!WOe[a])if(typeof n[a]=="object")for(let r in n[a])r==="*"?t(n,a,n[a][r]):t(n,a+"-"+r.toLowerCase(),n[a][r]);else typeof n[a]=="function"&&t(n,a,n[a])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t0;){let a=this.visitTick(n);if(Ns(a))try{await a}catch(r){let s=n[n.length-1].node;throw this.handleError(r,s)}}}if(this.listeners.OnceExit)for(let[n,a]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(t.type==="document"){let r=t.nodes.map(s=>a(s,this.helpers));await Promise.all(r)}else await a(t,this.helpers)}catch(r){throw this.handleError(r)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(a=>t.Once(a,this.helpers));return Ns(n[0])?Promise.all(n):n}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,n=kOe;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let r=new wOe(n,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let n=this.runOnRoot(t);if(Ns(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[zn];)t[zn]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let n of t.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,n){return this.async().then(t,n)}toString(){return this.css}visitSync(t,n){for(let[a,r]of t){this.result.lastPlugin=a;let s;try{s=r(n,this.helpers)}catch(i){throw this.handleError(i,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(Ns(s))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:a,visitors:r}=n;if(a.type!=="root"&&a.type!=="document"&&!a.parent){t.pop();return}if(r.length>0&&n.visitorIndex{r[zn]||this.walkSync(r)});else{let r=this.listeners[a];if(r&&this.visitSync(r,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ss.registerPostcss=e=>{Nd=e};var Wg=ss;ss.default=ss;xOe.registerLazyResult(ss);UOe.registerLazyResult(ss);let GOe=Ag,BOe=hl,HOe=nE;const VOe=Jf;let vd=class{constructor(t,n,a){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=a,this._map=void 0;let r,s=BOe;this.result=new VOe(this._processor,r,this._opts),this.result.css=n;let i=this;Object.defineProperty(this.result,"root",{get(){return i.root}});let o=new GOe(s,r,this._opts,n);if(o.isMap()){let[u,c]=o.generate();u&&(this.result.css=u),c&&(this.result.map=c)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,n){return this.async().then(t,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,n=HOe;try{t=n(this._css,this._opts)}catch(a){this.error=a}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};var jOe=vd;vd.default=vd;let KOe=jOe,YOe=Wg,qOe=Qf,XOe=Pi,ui=class{constructor(t=[]){this.version="8.4.33",this.plugins=this.normalize(t)}normalize(t){let n=[];for(let a of t)if(a.postcss===!0?a=a():a.postcss&&(a=a.postcss),typeof a=="object"&&Array.isArray(a.plugins))n=n.concat(a.plugins);else if(typeof a=="object"&&a.postcssPlugin)n.push(a);else if(typeof a=="function")n.push(a);else if(!(typeof a=="object"&&(a.parse||a.stringify)))throw new Error(a+" is not a PostCSS plugin");return n}process(t,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new KOe(this,t,n):new YOe(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var ZOe=ui;ui.default=ui;XOe.registerProcessor(ui);qOe.registerProcessor(ui);let QOe=Tl,JOe=mg,eIe=Al,tIe=eE,nIe=gl,aIe=Pi,rIe=tE;function li(e,t){if(Array.isArray(e))return e.map(r=>li(r));let{inputs:n,...a}=e;if(n){t=[];for(let r of n){let s={...r,__proto__:nIe.prototype};s.map&&(s.map={...s.map,__proto__:JOe.prototype}),t.push(s)}}if(a.nodes&&(a.nodes=e.nodes.map(r=>li(r,t))),a.source){let{inputId:r,...s}=a.source;a.source=s,r!=null&&(a.source.input=t[r])}if(a.type==="root")return new aIe(a);if(a.type==="decl")return new QOe(a);if(a.type==="rule")return new rIe(a);if(a.type==="comment")return new eIe(a);if(a.type==="atrule")return new tIe(a);throw new Error("Unknown node type: "+e.type)}var sIe=li;li.default=li;var Rm={};let iIe=qf,Gg=Tl,oIe=Wg,uIe=Tr,aE=ZOe,lIe=hl,cIe=sIe,Bg=Qf,dIe=Lg,Hg=Al,Vg=eE,fIe=Jf,EIe=gl,pIe=nE,mIe=Mg,jg=tE,Kg=Pi,hIe=_l;function Et(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new aE(e)}Et.plugin=function(t,n){let a=!1;function r(...i){console&&console.warn&&!a&&(a=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
+`),this.css+=n+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let n=this.toUrl(this.path(t.file)),a=t.root||Do(t.file),r;this.mapOpts.sourcesContent===!1?(r=new hg(t.text),r.sourcesContent&&(r.sourcesContent=r.sourcesContent.map(()=>null))):r=t.consumer(),this.map.applySourceMap(r,n,this.toUrl(this.path(a)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let n=this.root.nodes.length-1;n>=0;n--)t=this.root.nodes[n],t.type==="comment"&&t.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),tOe&&eOe&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,n=>{t+=n}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=yo.fromSourceMap(t)}else this.map=new yo({file:this.outputFile()}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new yo({file:this.outputFile()});let t=1,n=1,a="",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,i;this.stringify(this.root,(o,u,c)=>{if(this.css+=o,u&&c!=="end"&&(r.generated.line=t,r.generated.column=n-1,u.source&&u.source.start?(r.source=this.sourcePath(u),r.original.line=u.source.start.line,r.original.column=u.source.start.column-1,this.map.addMapping(r)):(r.source=a,r.original.line=1,r.original.column=0,this.map.addMapping(r))),s=o.match(/\n/g),s?(t+=s.length,i=o.lastIndexOf(`
+`),n=o.length-i):n+=o.length,u&&c!=="start"){let l=u.parent||{raws:{}};(!(u.type==="decl"||u.type==="atrule"&&!u.nodes)||u!==l.last||l.raws.semicolon)&&(u.source&&u.source.end?(r.source=this.sourcePath(u),r.original.line=u.source.end.line,r.original.column=u.source.end.column-1,r.generated.line=t,r.generated.column=n-2,this.map.addMapping(r)):(r.source=a,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=n-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let n=this.memoizedPaths.get(t);if(n)return n;let a=this.opts.to?Do(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(a=Do(Tg(a,this.mapOpts.annotation)));let r=_g(a,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let n=t.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let t=new JSe(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(n=>{if(n.source){let a=n.source.input.from;if(a&&!t[a]){t[a]=!0;let r=this.usesFileUrls?this.toFileUrl(a):this.toUrl(this.path(a));this.map.setSourceContent(r,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(n,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let n=this.memoizedFileURLs.get(t);if(n)return n;if(hm){let a=hm(t).toString();return this.memoizedFileURLs.set(t,a),a}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let n=this.memoizedURLs.get(t);if(n)return n;gg==="\\"&&(t=t.replace(/\\/g,"/"));let a=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,a),a}};var Ag=nOe;let aOe=_l,Od=class extends aOe{constructor(t){super(t),this.type="comment"}};var Al=Od;Od.default=Od;let{isClean:Sg,my:Og}=Di,Ig=Tl,Rg=Al,rOe=_l,bg,Xf,Zf,Ng;function vg(e){return e.map(t=>(t.nodes&&(t.nodes=vg(t.nodes)),delete t.source,t))}function Cg(e){if(e[Sg]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Cg(t)}let pa=class yg extends rOe{append(...t){for(let n of t){let a=this.normalize(n,this.last);for(let r of a)this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let n of this.nodes)n.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let n=this.getIterator(),a,r;for(;this.indexes[n]t[n](...a.map(r=>typeof r=="function"?(s,i)=>r(s.toProxy(),i):r)):n==="every"||n==="some"?a=>t[n]((r,...s)=>a(r.toProxy(),...s)):n==="root"?()=>t.root().toProxy():n==="nodes"?t.nodes.map(a=>a.toProxy()):n==="first"||n==="last"?t[n].toProxy():t[n]:t[n]},set(t,n,a){return t[n]===a||(t[n]=a,(n==="name"||n==="params"||n==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,n){let a=this.index(t),r=this.normalize(n,this.proxyOf.nodes[a]).reverse();a=this.index(t);for(let i of r)this.proxyOf.nodes.splice(a+1,0,i);let s;for(let i in this.indexes)s=this.indexes[i],a"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new Ig(t)]}else if(t.selector)t=[new Xf(t)];else if(t.name)t=[new Zf(t)];else if(t.text)t=[new Rg(t)];else throw new Error("Unknown node type in node creation");return t.map(r=>(r[Og]||yg.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Sg]&&Cg(r),typeof r.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(r.raws.before=n.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...t){t=t.reverse();for(let n of t){let a=this.normalize(n,this.first,"prepend").reverse();for(let r of a)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+a.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let n;for(let a in this.indexes)n=this.indexes[a],n>=t&&(this.indexes[a]=n-1);return this.markDirty(),this}replaceValues(t,n,a){return a||(a=n,n={}),this.walkDecls(r=>{n.props&&!n.props.includes(r.prop)||n.fast&&!r.value.includes(n.fast)||(r.value=r.value.replace(t,a))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((n,a)=>{let r;try{r=t(n,a)}catch(s){throw n.addToError(s)}return r!==!1&&n.walk&&(r=n.walk(t)),r})}walkAtRules(t,n){return n?t instanceof RegExp?this.walk((a,r)=>{if(a.type==="atrule"&&t.test(a.name))return n(a,r)}):this.walk((a,r)=>{if(a.type==="atrule"&&a.name===t)return n(a,r)}):(n=t,this.walk((a,r)=>{if(a.type==="atrule")return n(a,r)}))}walkComments(t){return this.walk((n,a)=>{if(n.type==="comment")return t(n,a)})}walkDecls(t,n){return n?t instanceof RegExp?this.walk((a,r)=>{if(a.type==="decl"&&t.test(a.prop))return n(a,r)}):this.walk((a,r)=>{if(a.type==="decl"&&a.prop===t)return n(a,r)}):(n=t,this.walk((a,r)=>{if(a.type==="decl")return n(a,r)}))}walkRules(t,n){return n?t instanceof RegExp?this.walk((a,r)=>{if(a.type==="rule"&&t.test(a.selector))return n(a,r)}):this.walk((a,r)=>{if(a.type==="rule"&&a.selector===t)return n(a,r)}):(n=t,this.walk((a,r)=>{if(a.type==="rule")return n(a,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};pa.registerParse=e=>{bg=e};pa.registerRule=e=>{Xf=e};pa.registerAtRule=e=>{Zf=e};pa.registerRoot=e=>{Ng=e};var Tr=pa;pa.default=pa;pa.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,Zf.prototype):e.type==="rule"?Object.setPrototypeOf(e,Xf.prototype):e.type==="decl"?Object.setPrototypeOf(e,Ig.prototype):e.type==="comment"?Object.setPrototypeOf(e,Rg.prototype):e.type==="root"&&Object.setPrototypeOf(e,Ng.prototype),e[Og]=!0,e.nodes&&e.nodes.forEach(t=>{pa.rebuild(t)})};let sOe=Tr,Dg,Pg,ii=class extends sOe{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new Dg(new Pg,this,t).stringify()}};ii.registerLazyResult=e=>{Dg=e};ii.registerProcessor=e=>{Pg=e};var Qf=ii;ii.default=ii;let Id=class{constructor(t,n={}){if(this.type="warning",this.text=t,n.node&&n.node.source){let a=n.node.rangeBy(n);this.line=a.start.line,this.column=a.start.column,this.endLine=a.end.line,this.endColumn=a.end.column}for(let a in n)this[a]=n[a]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Lg=Id;Id.default=Id;let iOe=Lg,Rd=class{constructor(t,n,a){this.processor=t,this.messages=[],this.root=n,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let a=new iOe(t,n);return this.messages.push(a),a}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};var Jf=Rd;Rd.default=Rd;const rc=39,_m=34,Ji=92,Tm=47,eo=10,bs=32,to=12,no=9,ao=13,oOe=91,uOe=93,lOe=40,cOe=41,dOe=123,fOe=125,EOe=59,pOe=42,mOe=58,hOe=64,ro=/[\t\n\f\r "#'()/;[\\\]{}]/g,so=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_Oe=/.[\r\n"'(/\\]/,gm=/[\da-f]/i;var TOe=function(t,n={}){let a=t.css.valueOf(),r=n.ignoreErrors,s,i,o,u,c,l,f,d,p,m,I=a.length,b=0,R=[],N=[];function S(){return b}function O(L){throw t.error("Unclosed "+L,b)}function C(){return N.length===0&&b>=I}function P(L){if(N.length)return N.pop();if(b>=I)return;let W=L?L.ignoreUnclosed:!1;switch(s=a.charCodeAt(b),s){case eo:case bs:case no:case ao:case to:{i=b;do i+=1,s=a.charCodeAt(i);while(s===bs||s===eo||s===no||s===ao||s===to);m=["space",a.slice(b,i)],b=i-1;break}case oOe:case uOe:case dOe:case fOe:case mOe:case EOe:case cOe:{let B=String.fromCharCode(s);m=[B,B,b];break}case lOe:{if(d=R.length?R.pop()[1]:"",p=a.charCodeAt(b+1),d==="url"&&p!==rc&&p!==_m&&p!==bs&&p!==eo&&p!==no&&p!==to&&p!==ao){i=b;do{if(l=!1,i=a.indexOf(")",i+1),i===-1)if(r||W){i=b;break}else O("bracket");for(f=i;a.charCodeAt(f-1)===Ji;)f-=1,l=!l}while(l);m=["brackets",a.slice(b,i+1),b,i],b=i}else i=a.indexOf(")",b+1),u=a.slice(b,i+1),i===-1||_Oe.test(u)?m=["(","(",b]:(m=["brackets",u,b,i],b=i);break}case rc:case _m:{o=s===rc?"'":'"',i=b;do{if(l=!1,i=a.indexOf(o,i+1),i===-1)if(r||W){i=b+1;break}else O("string");for(f=i;a.charCodeAt(f-1)===Ji;)f-=1,l=!l}while(l);m=["string",a.slice(b,i+1),b,i],b=i;break}case hOe:{ro.lastIndex=b+1,ro.test(a),ro.lastIndex===0?i=a.length-1:i=ro.lastIndex-2,m=["at-word",a.slice(b,i+1),b,i],b=i;break}case Ji:{for(i=b,c=!0;a.charCodeAt(i+1)===Ji;)i+=1,c=!c;if(s=a.charCodeAt(i+1),c&&s!==Tm&&s!==bs&&s!==eo&&s!==no&&s!==ao&&s!==to&&(i+=1,gm.test(a.charAt(i)))){for(;gm.test(a.charAt(i+1));)i+=1;a.charCodeAt(i+1)===bs&&(i+=1)}m=["word",a.slice(b,i+1),b,i],b=i;break}default:{s===Tm&&a.charCodeAt(b+1)===pOe?(i=a.indexOf("*/",b+2)+1,i===0&&(r||W?i=a.length:O("comment")),m=["comment",a.slice(b,i+1),b,i],b=i):(so.lastIndex=b+1,so.test(a),so.lastIndex===0?i=a.length-1:i=so.lastIndex-2,m=["word",a.slice(b,i+1),b,i],R.push(m),b=i);break}}return b++,m}function M(L){N.push(L)}return{back:M,endOfFile:C,nextToken:P,position:S}};let wg=Tr,Pu=class extends wg{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};var eE=Pu;Pu.default=Pu;wg.registerAtRule(Pu);let kg=Tr,$g,Ug,as=class extends kg{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,n,a){let r=super.normalize(t);if(n){if(a==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let s of r)s.raws.before=n.raws.before}return r}removeChild(t,n){let a=this.index(t);return!n&&a===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[a].raws.before),super.removeChild(t)}toResult(t={}){return new $g(new Ug,this,t).stringify()}};as.registerLazyResult=e=>{$g=e};as.registerProcessor=e=>{Ug=e};var Pi=as;as.default=as;kg.registerRoot(as);let oi={comma(e){return oi.split(e,[","],!0)},space(e){let t=[" ",`
+`," "];return oi.split(e,t)},split(e,t,n){let a=[],r="",s=!1,i=0,o=!1,u="",c=!1;for(let l of e)c?c=!1:l==="\\"?c=!0:o?l===u&&(o=!1):l==='"'||l==="'"?(o=!0,u=l):l==="("?i+=1:l===")"?i>0&&(i-=1):i===0&&t.includes(l)&&(s=!0),s?(r!==""&&a.push(r.trim()),r="",s=!1):r+=l;return(n||r!=="")&&a.push(r.trim()),a}};var Mg=oi;oi.default=oi;let xg=Tr,gOe=Mg,Lu=class extends xg{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return gOe.comma(this.selector)}set selectors(t){let n=this.selector?this.selector.match(/,\s*/):null,a=n?n[0]:","+this.raw("between","beforeOpen");this.selector=t.join(a)}};var tE=Lu;Lu.default=Lu;xg.registerRule(Lu);let AOe=Tl,SOe=TOe,OOe=Al,IOe=eE,ROe=Pi,Am=tE;const Sm={empty:!0,space:!0};function bOe(e){for(let t=e.length-1;t>=0;t--){let n=e[t],a=n[3]||n[2];if(a)return a}}let NOe=class{constructor(t){this.input=t,this.root=new ROe,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let n=new IOe;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let a,r,s,i=!1,o=!1,u=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),a=t[0],a==="("||a==="["?c.push(a==="("?")":"]"):a==="{"&&c.length>0?c.push("}"):a===c[c.length-1]&&c.pop(),c.length===0)if(a===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(a==="{"){o=!0;break}else if(a==="}"){if(u.length>0){for(s=u.length-1,r=u[s];r&&r[0]==="space";)r=u[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(t);break}else u.push(t);else u.push(t);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(n.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(n,"params",u),i&&(t=u[u.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){let n=this.colon(t);if(n===!1)return;let a=0,r;for(let s=n-1;s>=0&&(r=t[s],!(r[0]!=="space"&&(a+=1,a===2)));s--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let n=0,a,r,s;for(let[i,o]of t.entries()){if(a=o,r=a[0],r==="("&&(n+=1),r===")"&&(n-=1),n===0&&r===":")if(!s)this.doubleColon(a);else{if(s[0]==="word"&&s[1]==="progid")continue;return i}s=a}return!1}comment(t){let n=new OOe;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;let a=t[1].slice(2,-2);if(/^\s*$/.test(a))n.text="",n.raws.left=a,n.raws.right="";else{let r=a.match(/^(\s*)([^]*\S)(\s*)$/);n.text=r[2],n.raws.left=r[1],n.raws.right=r[3]}}createTokenizer(){this.tokenizer=SOe(this.input)}decl(t,n){let a=new AOe;this.init(a,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),a.source.end=this.getPosition(r[3]||r[2]||bOe(t)),a.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),a.raws.before+=t.shift()[1];for(a.source.start=this.getPosition(t[0][2]),a.prop="";t.length;){let c=t[0][0];if(c===":"||c==="space"||c==="comment")break;a.prop+=t.shift()[1]}a.raws.between="";let s;for(;t.length;)if(s=t.shift(),s[0]===":"){a.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),a.raws.between+=s[1];(a.prop[0]==="_"||a.prop[0]==="*")&&(a.raws.before+=a.prop[0],a.prop=a.prop.slice(1));let i=[],o;for(;t.length&&(o=t[0][0],!(o!=="space"&&o!=="comment"));)i.push(t.shift());this.precheckMissedSemicolon(t);for(let c=t.length-1;c>=0;c--){if(s=t[c],s[1].toLowerCase()==="!important"){a.important=!0;let l=this.stringFrom(t,c);l=this.spacesFromEnd(t)+l,l!==" !important"&&(a.raws.important=l);break}else if(s[1].toLowerCase()==="important"){let l=t.slice(0),f="";for(let d=c;d>0;d--){let p=l[d][0];if(f.trim().indexOf("!")===0&&p!=="space")break;f=l.pop()[1]+f}f.trim().indexOf("!")===0&&(a.important=!0,a.raws.important=f,t=l)}if(s[0]!=="space"&&s[0]!=="comment")break}t.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(a.raws.between+=i.map(c=>c[1]).join(""),i=[]),this.raw(a,"value",i.concat(t),n),a.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let n=new Am;this.init(n,t[2]),n.selector="",n.raws.between="",this.current=n}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let n=this.input.fromOffset(t);return{column:n.col,line:n.line,offset:t}}init(t,n){this.current.push(t),t.source={input:this.input,start:this.getPosition(n)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let n=!1,a=null,r=!1,s=null,i=[],o=t[1].startsWith("--"),u=[],c=t;for(;c;){if(a=c[0],u.push(c),a==="("||a==="[")s||(s=c),i.push(a==="("?")":"]");else if(o&&r&&a==="{")s||(s=c),i.push("}");else if(i.length===0)if(a===";")if(r){this.decl(u,o);return}else break;else if(a==="{"){this.rule(u);return}else if(a==="}"){this.tokenizer.back(u.pop()),n=!0;break}else a===":"&&(r=!0);else a===i[i.length-1]&&(i.pop(),i.length===0&&(s=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),i.length>0&&this.unclosedBracket(s),n&&r){if(!o)for(;u.length&&(c=u[u.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(u.pop());this.decl(u,o)}else this.unknownWord(u)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,n,a,r){let s,i,o=a.length,u="",c=!0,l,f;for(let d=0;dp+m[1],"");t.raws[n]={raw:d,value:u}}t[n]=u}rule(t){t.pop();let n=new Am;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n}spacesAndCommentsFromEnd(t){let n,a="";for(;t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)a=t.pop()[1]+a;return a}spacesAndCommentsFromStart(t){let n,a="";for(;t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)a+=t.shift()[1];return a}spacesFromEnd(t){let n,a="";for(;t.length&&(n=t[t.length-1][0],n==="space");)a=t.pop()[1]+a;return a}stringFrom(t,n){let a="";for(let r=n;rbd(t)),e}let Nd={},ss=class zg{constructor(t,n,a){this.stringified=!1,this.processed=!1;let r;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))r=bd(n);else if(n instanceof zg||n instanceof Om)r=bd(n.root),n.map&&(typeof a.map>"u"&&(a.map={}),a.map.inline||(a.map.inline=!1),a.map.prev=n.map);else{let s=UOe;a.syntax&&(s=a.syntax.parse),a.parser&&(s=a.parser),s.parse&&(s=s.parse);try{r=s(n,a)}catch(i){this.processed=!0,this.error=i}r&&!r[POe]&&kOe.rebuild(r)}this.result=new Om(t,r,a),this.helpers={...Nd,postcss:Nd,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,n){let a=this.result.lastPlugin;try{n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=a.postcssPlugin,t.setMessage()):a.postcssVersion}catch(r){console&&console.error&&console.error(r)}return t}prepareVisitors(){this.listeners={};let t=(n,a,r)=>{this.listeners[a]||(this.listeners[a]=[]),this.listeners[a].push([n,r])};for(let n of this.plugins)if(typeof n=="object")for(let a in n){if(!FOe[a]&&/^[A-Z]/.test(a))throw new Error(`Unknown event ${a} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!zOe[a])if(typeof n[a]=="object")for(let r in n[a])r==="*"?t(n,a,n[a][r]):t(n,a+"-"+r.toLowerCase(),n[a][r]);else typeof n[a]=="function"&&t(n,a,n[a])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t0;){let a=this.visitTick(n);if(Ns(a))try{await a}catch(r){let s=n[n.length-1].node;throw this.handleError(r,s)}}}if(this.listeners.OnceExit)for(let[n,a]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(t.type==="document"){let r=t.nodes.map(s=>a(s,this.helpers));await Promise.all(r)}else await a(t,this.helpers)}catch(r){throw this.handleError(r)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(a=>t.Once(a,this.helpers));return Ns(n[0])?Promise.all(n):n}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,n=wOe;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let r=new LOe(n,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let n=this.runOnRoot(t);if(Ns(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[zn];)t[zn]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let n of t.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,n){return this.async().then(t,n)}toString(){return this.css}visitSync(t,n){for(let[a,r]of t){this.result.lastPlugin=a;let s;try{s=r(n,this.helpers)}catch(i){throw this.handleError(i,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(Ns(s))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:a,visitors:r}=n;if(a.type!=="root"&&a.type!=="document"&&!a.parent){t.pop();return}if(r.length>0&&n.visitorIndex{r[zn]||this.walkSync(r)});else{let r=this.listeners[a];if(r&&this.visitSync(r,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ss.registerPostcss=e=>{Nd=e};var Wg=ss;ss.default=ss;MOe.registerLazyResult(ss);$Oe.registerLazyResult(ss);let WOe=Ag,GOe=hl,BOe=nE;const HOe=Jf;let vd=class{constructor(t,n,a){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=a,this._map=void 0;let r,s=GOe;this.result=new HOe(this._processor,r,this._opts),this.result.css=n;let i=this;Object.defineProperty(this.result,"root",{get(){return i.root}});let o=new WOe(s,r,this._opts,n);if(o.isMap()){let[u,c]=o.generate();u&&(this.result.css=u),c&&(this.result.map=c)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,n){return this.async().then(t,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,n=BOe;try{t=n(this._css,this._opts)}catch(a){this.error=a}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};var VOe=vd;vd.default=vd;let jOe=VOe,KOe=Wg,YOe=Qf,qOe=Pi,ui=class{constructor(t=[]){this.version="8.4.33",this.plugins=this.normalize(t)}normalize(t){let n=[];for(let a of t)if(a.postcss===!0?a=a():a.postcss&&(a=a.postcss),typeof a=="object"&&Array.isArray(a.plugins))n=n.concat(a.plugins);else if(typeof a=="object"&&a.postcssPlugin)n.push(a);else if(typeof a=="function")n.push(a);else if(!(typeof a=="object"&&(a.parse||a.stringify)))throw new Error(a+" is not a PostCSS plugin");return n}process(t,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new jOe(this,t,n):new KOe(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var XOe=ui;ui.default=ui;qOe.registerProcessor(ui);YOe.registerProcessor(ui);let ZOe=Tl,QOe=mg,JOe=Al,eIe=eE,tIe=gl,nIe=Pi,aIe=tE;function li(e,t){if(Array.isArray(e))return e.map(r=>li(r));let{inputs:n,...a}=e;if(n){t=[];for(let r of n){let s={...r,__proto__:tIe.prototype};s.map&&(s.map={...s.map,__proto__:QOe.prototype}),t.push(s)}}if(a.nodes&&(a.nodes=e.nodes.map(r=>li(r,t))),a.source){let{inputId:r,...s}=a.source;a.source=s,r!=null&&(a.source.input=t[r])}if(a.type==="root")return new nIe(a);if(a.type==="decl")return new ZOe(a);if(a.type==="rule")return new aIe(a);if(a.type==="comment")return new JOe(a);if(a.type==="atrule")return new eIe(a);throw new Error("Unknown node type: "+e.type)}var rIe=li;li.default=li;var Rm={};let sIe=qf,Gg=Tl,iIe=Wg,oIe=Tr,aE=XOe,uIe=hl,lIe=rIe,Bg=Qf,cIe=Lg,Hg=Al,Vg=eE,dIe=Jf,fIe=gl,EIe=nE,pIe=Mg,jg=tE,Kg=Pi,mIe=_l;function Et(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new aE(e)}Et.plugin=function(t,n){let a=!1;function r(...i){console&&console.warn&&!a&&(a=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),Rm.LANG&&Rm.LANG.startsWith("cn")&&console.warn(t+`: 里面 postcss.plugin 被弃用. 迁移指南:
-https://www.w3ctech.com/topic/2226`));let o=n(...i);return o.postcssPlugin=t,o.postcssVersion=new aE().version,o}let s;return Object.defineProperty(r,"postcss",{get(){return s||(s=r()),s}}),r.process=function(i,o,u){return Et([r(u)]).process(i,o)},r};Et.stringify=lIe;Et.parse=pIe;Et.fromJSON=cIe;Et.list=mIe;Et.comment=e=>new Hg(e);Et.atRule=e=>new Vg(e);Et.decl=e=>new Gg(e);Et.rule=e=>new jg(e);Et.root=e=>new Kg(e);Et.document=e=>new Bg(e);Et.CssSyntaxError=iIe;Et.Declaration=Gg;Et.Container=uIe;Et.Processor=aE;Et.Document=Bg;Et.Comment=Hg;Et.Warning=dIe;Et.AtRule=Vg;Et.Result=fIe;Et.Input=EIe;Et.Rule=jg;Et.Root=Kg;Et.Node=hIe;oIe.registerPostcss(Et);var _Ie=Et;Et.default=Et;const TIe=MT,bm=pSe,{isPlainObject:gIe}=Kf,Nm=ySe,AIe=DSe,{parse:SIe}=_Ie,OIe=["img","audio","video","picture","svg","object","map","iframe","embed"],IIe=["script","style"];function Ds(e,t){e&&Object.keys(e).forEach(function(n){t(e[n],n)})}function ia(e,t){return{}.hasOwnProperty.call(e,t)}function vm(e,t){const n=[];return Ds(e,function(a){t(a)&&n.push(a)}),n}function RIe(e){for(const t in e)if(ia(e,t))return!1;return!0}function bIe(e){return e.map(function(t){if(!t.url)throw new Error("URL missing");return t.url+(t.w?` ${t.w}w`:"")+(t.h?` ${t.h}h`:"")+(t.d?` ${t.d}x`:"")}).join(", ")}var NIe=ci;const vIe=/^[^\0\t\n\f\r /<=>]+$/;function ci(e,t,n){if(e==null)return"";typeof e=="number"&&(e=e.toString());let a="",r="";function s(D,G){const V=this;this.tag=D,this.attribs=G||{},this.tagPosition=a.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(b.length){const re=b[b.length-1];re.text+=V.text}},this.updateParentNodeMediaChildren=function(){b.length&&OIe.includes(this.tag)&&b[b.length-1].mediaChildren.push(this.tag)}}t=Object.assign({},ci.defaults,t),t.parser=Object.assign({},CIe,t.parser);const i=function(D){return t.allowedTags===!1||(t.allowedTags||[]).indexOf(D)>-1};IIe.forEach(function(D){i(D)&&!t.allowVulnerableTags&&console.warn(`
+https://www.w3ctech.com/topic/2226`));let o=n(...i);return o.postcssPlugin=t,o.postcssVersion=new aE().version,o}let s;return Object.defineProperty(r,"postcss",{get(){return s||(s=r()),s}}),r.process=function(i,o,u){return Et([r(u)]).process(i,o)},r};Et.stringify=uIe;Et.parse=EIe;Et.fromJSON=lIe;Et.list=pIe;Et.comment=e=>new Hg(e);Et.atRule=e=>new Vg(e);Et.decl=e=>new Gg(e);Et.rule=e=>new jg(e);Et.root=e=>new Kg(e);Et.document=e=>new Bg(e);Et.CssSyntaxError=sIe;Et.Declaration=Gg;Et.Container=oIe;Et.Processor=aE;Et.Document=Bg;Et.Comment=Hg;Et.Warning=cIe;Et.AtRule=Vg;Et.Result=dIe;Et.Input=fIe;Et.Rule=jg;Et.Root=Kg;Et.Node=mIe;iIe.registerPostcss(Et);var hIe=Et;Et.default=Et;const _Ie=MT,bm=ESe,{isPlainObject:TIe}=Kf,Nm=CSe,gIe=ySe,{parse:AIe}=hIe,SIe=["img","audio","video","picture","svg","object","map","iframe","embed"],OIe=["script","style"];function Ds(e,t){e&&Object.keys(e).forEach(function(n){t(e[n],n)})}function ia(e,t){return{}.hasOwnProperty.call(e,t)}function vm(e,t){const n=[];return Ds(e,function(a){t(a)&&n.push(a)}),n}function IIe(e){for(const t in e)if(ia(e,t))return!1;return!0}function RIe(e){return e.map(function(t){if(!t.url)throw new Error("URL missing");return t.url+(t.w?` ${t.w}w`:"")+(t.h?` ${t.h}h`:"")+(t.d?` ${t.d}x`:"")}).join(", ")}var bIe=ci;const NIe=/^[^\0\t\n\f\r /<=>]+$/;function ci(e,t,n){if(e==null)return"";typeof e=="number"&&(e=e.toString());let a="",r="";function s(D,G){const V=this;this.tag=D,this.attribs=G||{},this.tagPosition=a.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(b.length){const re=b[b.length-1];re.text+=V.text}},this.updateParentNodeMediaChildren=function(){b.length&&SIe.includes(this.tag)&&b[b.length-1].mediaChildren.push(this.tag)}}t=Object.assign({},ci.defaults,t),t.parser=Object.assign({},vIe,t.parser);const i=function(D){return t.allowedTags===!1||(t.allowedTags||[]).indexOf(D)>-1};OIe.forEach(function(D){i(D)&&!t.allowVulnerableTags&&console.warn(`
⚠️ Your \`allowedTags\` option includes, \`${D}\`, which is inherently
vulnerable to XSS attacks. Please remove it from \`allowedTags\`.
Or, to disable this warning, add the \`allowVulnerableTags\` option
and ensure you are accounting for this risk.
-`)});const o=t.nonTextTags||["script","style","textarea","option"];let u,c;t.allowedAttributes&&(u={},c={},Ds(t.allowedAttributes,function(D,G){u[G]=[];const V=[];D.forEach(function(re){typeof re=="string"&&re.indexOf("*")>=0?V.push(bm(re).replace(/\\\*/g,".*")):u[G].push(re)}),V.length&&(c[G]=new RegExp("^("+V.join("|")+")$"))}));const l={},f={},d={};Ds(t.allowedClasses,function(D,G){if(u&&(ia(u,G)||(u[G]=[]),u[G].push("class")),l[G]=D,Array.isArray(D)){const V=[];l[G]=[],d[G]=[],D.forEach(function(re){typeof re=="string"&&re.indexOf("*")>=0?V.push(bm(re).replace(/\\\*/g,".*")):re instanceof RegExp?d[G].push(re):l[G].push(re)}),V.length&&(f[G]=new RegExp("^("+V.join("|")+")$"))}});const p={};let m;Ds(t.transformTags,function(D,G){let V;typeof D=="function"?V=D:typeof D=="string"&&(V=ci.simpleTransform(D)),G==="*"?m=V:p[G]=V});let I,b,R,N,S,O,C=!1;M();const P=new TIe.Parser({onopentag:function(D,G){if(t.enforceHtmlBoundary&&D==="html"&&M(),S){O++;return}const V=new s(D,G);b.push(V);let re=!1;const Be=!!V.text;let $e;if(ia(p,D)&&($e=p[D](D,G),V.attribs=G=$e.attribs,$e.text!==void 0&&(V.innerText=$e.text),D!==$e.tagName&&(V.name=D=$e.tagName,N[I]=$e.tagName)),m&&($e=m(D,G),V.attribs=G=$e.attribs,D!==$e.tagName&&(V.name=D=$e.tagName,N[I]=$e.tagName)),(!i(D)||t.disallowedTagsMode==="recursiveEscape"&&!RIe(R)||t.nestingLimit!=null&&I>=t.nestingLimit)&&(re=!0,R[I]=!0,t.disallowedTagsMode==="discard"&&o.indexOf(D)!==-1&&(S=!0,O=1),R[I]=!0),I++,re){if(t.disallowedTagsMode==="discard")return;r=a,a=""}a+="<"+D,D==="script"&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(V.innerText=""),(!u||ia(u,D)||u["*"])&&Ds(G,function(Oe,we){if(!vIe.test(we)){delete V.attribs[we];return}if(Oe===""&&(t.nonBooleanAttributes.includes(we)||t.nonBooleanAttributes.includes("*"))){delete V.attribs[we];return}let Ht=!1;if(!u||ia(u,D)&&u[D].indexOf(we)!==-1||u["*"]&&u["*"].indexOf(we)!==-1||ia(c,D)&&c[D].test(we)||c["*"]&&c["*"].test(we))Ht=!0;else if(u&&u[D]){for(const xe of u[D])if(gIe(xe)&&xe.name&&xe.name===we){Ht=!0;let He="";if(xe.multiple===!0){const ct=Oe.split(" ");for(const q of ct)xe.values.indexOf(q)!==-1&&(He===""?He=q:He+=" "+q)}else xe.values.indexOf(Oe)>=0&&(He=Oe);Oe=He}}if(Ht){if(t.allowedSchemesAppliedToAttributes.indexOf(we)!==-1&&W(D,Oe)){delete V.attribs[we];return}if(D==="script"&&we==="src"){let xe=!0;try{const He=B(Oe);if(t.allowedScriptHostnames||t.allowedScriptDomains){const ct=(t.allowedScriptHostnames||[]).find(function(le){return le===He.url.hostname}),q=(t.allowedScriptDomains||[]).find(function(le){return He.url.hostname===le||He.url.hostname.endsWith(`.${le}`)});xe=ct||q}}catch{xe=!1}if(!xe){delete V.attribs[we];return}}if(D==="iframe"&&we==="src"){let xe=!0;try{const He=B(Oe);if(He.isRelativeUrl)xe=ia(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const ct=(t.allowedIframeHostnames||[]).find(function(le){return le===He.url.hostname}),q=(t.allowedIframeDomains||[]).find(function(le){return He.url.hostname===le||He.url.hostname.endsWith(`.${le}`)});xe=ct||q}}catch{xe=!1}if(!xe){delete V.attribs[we];return}}if(we==="srcset")try{let xe=AIe(Oe);if(xe.forEach(function(He){W("srcset",He.url)&&(He.evil=!0)}),xe=vm(xe,function(He){return!He.evil}),xe.length)Oe=bIe(vm(xe,function(He){return!He.evil})),V.attribs[we]=Oe;else{delete V.attribs[we];return}}catch{delete V.attribs[we];return}if(we==="class"){const xe=l[D],He=l["*"],ct=f[D],q=d[D],le=f["*"],de=[ct,le].concat(q).filter(function(ge){return ge});if(xe&&He?Oe=ne(Oe,Nm(xe,He),de):Oe=ne(Oe,xe||He,de),!Oe.length){delete V.attribs[we];return}}if(we==="style"){if(t.parseStyleAttributes)try{const xe=SIe(D+" {"+Oe+"}"),He=w(xe,t.allowedStyles);if(Oe=X(He),Oe.length===0){delete V.attribs[we];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+D+" {"+Oe+`}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`),delete V.attribs[we];return}else if(t.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}a+=" "+we,Oe&&Oe.length&&(a+='="'+L(Oe,!0)+'"')}else delete V.attribs[we]}),t.selfClosing.indexOf(D)!==-1?a+=" />":(a+=">",V.innerText&&!Be&&!t.textFilter&&(a+=L(V.innerText),C=!0)),re&&(a=r+L(a),r="")},ontext:function(D){if(S)return;const G=b[b.length-1];let V;if(G&&(V=G.tag,D=G.innerText!==void 0?G.innerText:D),t.disallowedTagsMode==="discard"&&(V==="script"||V==="style"))a+=D;else{const re=L(D,!1);t.textFilter&&!C?a+=t.textFilter(re,V):C||(a+=re)}if(b.length){const re=b[b.length-1];re.text+=D}},onclosetag:function(D,G){if(S)if(O--,!O)S=!1;else return;const V=b.pop();if(!V)return;if(V.tag!==D){b.push(V);return}S=t.enforceHtmlBoundary?D==="html":!1,I--;const re=R[I];if(re){if(delete R[I],t.disallowedTagsMode==="discard"){V.updateParentNodeText();return}r=a,a=""}if(N[I]&&(D=N[I],delete N[I]),t.exclusiveFilter&&t.exclusiveFilter(V)){a=a.substr(0,V.tagPosition);return}if(V.updateParentNodeMediaChildren(),V.updateParentNodeText(),t.selfClosing.indexOf(D)!==-1||G&&!i(D)&&["escape","recursiveEscape"].indexOf(t.disallowedTagsMode)>=0){re&&(a=r,r="");return}a+=""+D+">",re&&(a=r+L(a),r=""),C=!1}},t.parser);return P.write(e),P.end(),a;function M(){a="",I=0,b=[],R={},N={},S=!1,O=0}function L(D,G){return typeof D!="string"&&(D=D+""),t.parser.decodeEntities&&(D=D.replace(/&/g,"&").replace(//g,">"),G&&(D=D.replace(/"/g,"""))),D=D.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(//g,">"),G&&(D=D.replace(/"/g,""")),D}function W(D,G){for(G=G.replace(/[\x00-\x20]+/g,"");;){const Be=G.indexOf("",Be+4);if($e===-1)break;G=G.substring(0,Be)+G.substring($e+3)}const V=G.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!V)return G.match(/^[/\\]{2}/)?!t.allowProtocolRelative:!1;const re=V[1].toLowerCase();return ia(t.allowedSchemesByTag,D)?t.allowedSchemesByTag[D].indexOf(re)===-1:!t.allowedSchemes||t.allowedSchemes.indexOf(re)===-1}function B(D){if(D=D.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),D.startsWith("relative:"))throw new Error("relative: exploit attempt");let G="relative://relative-site";for(let Be=0;Be<100;Be++)G+=`/${Be}`;const V=new URL(D,G);return{isRelativeUrl:V&&V.hostname==="relative-site"&&V.protocol==="relative:",url:V}}function w(D,G){if(!G)return D;const V=D.nodes[0];let re;return G[V.selector]&&G["*"]?re=Nm(G[V.selector],G["*"]):re=G[V.selector]||G["*"],re&&(D.nodes[0].nodes=V.nodes.reduce(J(re),[])),D}function X(D){return D.nodes[0].nodes.reduce(function(G,V){return G.push(`${V.prop}:${V.value}${V.important?" !important":""}`),G},[]).join(";")}function J(D){return function(G,V){return ia(D,V.prop)&&D[V.prop].some(function(Be){return Be.test(V.value)})&&G.push(V),G}}function ne(D,G,V){return G?(D=D.split(/\s+/),D.filter(function(re){return G.indexOf(re)!==-1||V.some(function(Be){return Be.test(re)})}).join(" ")):D}}const CIe={decodeEntities:!0};ci.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0};ci.simpleTransform=function(e,t,n){return n=n===void 0?!0:n,t=t||{},function(a,r){let s;if(n)for(s in t)r[s]=t[s];else r=t;return{tagName:e,attribs:r}}};const yIe=xd(NIe),di=e=>yIe(rAe(e,{target:"_blank"}),{allowedTags:["a"],disallowedTagsMode:"escape"}),DIe=e=>(ut("data-v-a720b26e"),e=e(),lt(),e),PIe={id:"admin-app",class:"admin-card"},LIe={for:"admin_contact"},wIe=["value"],kIe=["disabled"],$Ie={for:"max_users"},UIe=["disabled"],MIe={class:"user-limit-help"},xIe={class:"info-box"},FIe=DIe(()=>E("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),zIe={for:"max_single_file_size"},WIe=["disabled"],GIe={for:"max_zip_file_size"},BIe=["disabled"],HIe={for:"gpx_limit_import"},VIe=["disabled"],jIe={class:"about-label",for:"about"},KIe={class:"textarea-description"},YIe=["innerHTML"],qIe={class:"privacy-policy-label",for:"privacy_policy"},XIe={class:"textarea-description"},ZIe=["innerHTML"],QIe={key:5,class:"form-buttons"},JIe={class:"confirm",type:"submit"},eRe={key:6,class:"form-buttons"},tRe=Z({__name:"AdminApplication",props:{appConfig:{},edition:{type:Boolean,default:!1}},setup(e){const t=e,{edition:n}=_e(t),a=Me(),r=Ya(),s=Gt({admin_contact:"",max_users:0,max_single_file_size:0,max_zip_file_size:0,gpx_limit_import:0,about:"",privacy_policy:""}),i=k(()=>a.getters[H.GETTERS.ERROR_MESSAGES]);Ct(()=>{t.appConfig&&o(t.appConfig)});function o(l){Object.keys(s).map(f=>{["max_single_file_size","max_zip_file_size"].includes(f)?s[f]=vge(l[f]):["about","privacy_policy"].includes(f)?s[f]=l[f]!==null?l[f]:"":s[f]=l[f]})}function u(){o(t.appConfig),a.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),r.push("/admin/application")}function c(){const l=Object.assign({},s);l.max_single_file_size*=1048576,l.max_zip_file_size*=1048576,a.dispatch(H.ACTIONS.UPDATE_APPLICATION_CONFIG,l)}return(l,f)=>{const d=oe("ErrorMessage"),p=oe("Card");return A(),v("div",PIe,[$(p,null,{title:ue(()=>[j(T(l.$t("admin.APP_CONFIG.TITLE")),1)]),content:ue(()=>[E("form",{class:"admin-form",onSubmit:Je(c,["prevent"])},[E("label",LIe,[j(T(l.$t("admin.APP_CONFIG.ADMIN_CONTACT"))+": ",1),!h(n)&&!s.admin_contact?(A(),v("input",{key:0,class:"no-contact",value:l.$t("admin.APP_CONFIG.NO_CONTACT_EMAIL"),disabled:""},null,8,wIe)):qe((A(),v("input",{key:1,id:"admin_contact",name:"admin_contact",type:"email","onUpdate:modelValue":f[0]||(f[0]=m=>s.admin_contact=m),disabled:!h(n)},null,8,kIe)),[[rt,s.admin_contact]])]),E("label",$Ie,[j(T(l.$t("admin.APP_CONFIG.MAX_USERS_LABEL"))+": ",1),qe(E("input",{id:"max_users",name:"max_users",type:"number",min:"0","onUpdate:modelValue":f[1]||(f[1]=m=>s.max_users=m),disabled:!h(n)},null,8,UIe),[[rt,s.max_users]])]),E("div",MIe,[E("span",xIe,[FIe,j(" "+T(l.$t("admin.APP_CONFIG.MAX_USERS_HELP")),1)])]),E("label",zIe,[j(T(l.$t("admin.APP_CONFIG.SINGLE_UPLOAD_MAX_SIZE_LABEL"))+": ",1),qe(E("input",{id:"max_single_file_size",name:"max_single_file_size",type:"number",step:"0.1",min:"0","onUpdate:modelValue":f[2]||(f[2]=m=>s.max_single_file_size=m),disabled:!h(n)},null,8,WIe),[[rt,s.max_single_file_size]])]),E("label",GIe,[j(T(l.$t("admin.APP_CONFIG.ZIP_UPLOAD_MAX_SIZE_LABEL"))+": ",1),qe(E("input",{id:"max_zip_file_size",name:"max_zip_file_size",type:"number",step:"0.1",min:"0","onUpdate:modelValue":f[3]||(f[3]=m=>s.max_zip_file_size=m),disabled:!h(n)},null,8,BIe),[[rt,s.max_zip_file_size]])]),E("label",HIe,[j(T(l.$t("admin.APP_CONFIG.MAX_FILES_IN_ZIP_LABEL"))+": ",1),qe(E("input",{id:"gpx_limit_import",name:"gpx_limit_import",type:"number",min:"0","onUpdate:modelValue":f[4]||(f[4]=m=>s.gpx_limit_import=m),disabled:!h(n)},null,8,VIe),[[rt,s.gpx_limit_import]])]),E("label",jIe,T(l.$t("admin.ABOUT.TEXT"))+": ",1),E("span",KIe,T(l.$t("admin.ABOUT.DESCRIPTION")),1),h(n)?qe((A(),v("textarea",{key:0,id:"about",name:"about",rows:"10","onUpdate:modelValue":f[5]||(f[5]=m=>s.about=m)},null,512)),[[rt,s.about]]):(A(),v("div",{key:1,innerHTML:h(lr)(h(di)(s.about?s.about:l.$t("admin.NO_TEXT_ENTERED"))),class:"textarea-content"},null,8,YIe)),E("label",qIe,T(bt(l.$t("privacy_policy.TITLE")))+": ",1),E("span",XIe,T(l.$t("admin.PRIVACY_POLICY_DESCRIPTION")),1),h(n)?qe((A(),v("textarea",{key:2,id:"privacy_policy",name:"privacy_policy",rows:"20","onUpdate:modelValue":f[6]||(f[6]=m=>s.privacy_policy=m)},null,512)),[[rt,s.privacy_policy]]):(A(),v("div",{key:3,innerHTML:h(lr)(h(di)(s.privacy_policy?s.privacy_policy:l.$t("admin.NO_TEXT_ENTERED"))),class:"textarea-content"},null,8,ZIe)),i.value?(A(),te(d,{key:4,message:i.value},null,8,["message"])):x("",!0),h(n)?(A(),v("div",QIe,[E("button",JIe,T(l.$t("buttons.SUBMIT")),1),E("button",{class:"cancel",onClick:Je(u,["prevent"])},T(l.$t("buttons.CANCEL")),1)])):(A(),v("div",eRe,[E("button",{class:"confirm",onClick:f[7]||(f[7]=Je(m=>l.$router.push("/admin/application/edit"),["prevent"]))},T(l.$t("buttons.EDIT")),1),E("button",{class:"cancel",onClick:f[8]||(f[8]=Je(m=>l.$router.push("/admin"),["prevent"]))},T(l.$t("admin.BACK_TO_ADMIN")),1)]))],32)]),_:1})])}}}),Cm=ae(tRe,[["__scopeId","data-v-a720b26e"]]),nRe={class:"stat-card"},aRe={class:"stat-content box"},rRe={class:"stat-icon"},sRe={class:"stat-details"},iRe={class:"stat-huge"},oRe={class:"stat"},ca=Z({__name:"StatCard",props:{icon:{},text:{},value:{}},setup(e){const t=e,{icon:n,text:a,value:r}=_e(t);return(s,i)=>(A(),v("div",nRe,[E("div",aRe,[E("div",rRe,[E("i",{class:Se(["fa",`fa-${h(n)}`])},null,2)]),E("div",sRe,[E("div",iRe,T(h(r)),1),E("div",oRe,T(h(a)),1)])])]))}}),uRe={id:"user-stats"},lRe=Z({__name:"AppStatsCards",props:{appStatistics:{}},setup(e){const t=e,{appStatistics:n}=_e(t),a=k(()=>CT(n.value.uploads_dir_size));return(r,s)=>(A(),v("div",uRe,[$(ca,{icon:"users",value:h(n).users,text:r.$t("admin.USER",h(n).users)},null,8,["value","text"]),$(ca,{icon:"tags",value:h(n).sports,text:r.$t("workouts.SPORT",h(n).sports)},null,8,["value","text"]),$(ca,{icon:"calendar",value:h(n).workouts,text:r.$t("workouts.WORKOUT",h(n).workouts)},null,8,["value","text"]),$(ca,{icon:"folder-open",value:a.value.size,text:a.value.suffix},null,8,["value","text"])]))}}),Yg=e=>(ut("data-v-91cfdfba"),e=e(),lt(),e),cRe={id:"admin-menu",class:"center-card"},dRe={class:"admin-menu description-list"},fRe={class:"application-config-details"},ERe=Yg(()=>E("br",null,null,-1)),pRe={class:"registration-status"},mRe={key:0,class:"email-sending-status"},hRe=Yg(()=>E("i",{class:"fa fa-exclamation-triangle","aria-hidden":"true"},null,-1)),_Re=Z({__name:"AdminMenu",props:{appConfig:{},appStatistics:{default:()=>({})}},setup(e){const t=e,{appConfig:n,appStatistics:a}=_e(t);return _t(()=>{const r=document.getElementById("adminLink");r&&r.focus()}),(r,s)=>{const i=oe("router-link");return A(),v("div",cRe,[$(_T,null,{title:ue(()=>[j(T(r.$t("admin.ADMINISTRATION")),1)]),content:ue(()=>[$(lRe,{appStatistics:h(a)},null,8,["appStatistics"]),E("div",dRe,[E("dl",null,[E("dt",null,[$(i,{id:"adminLink",to:"/admin/application"},{default:ue(()=>[j(T(r.$t("admin.APPLICATION")),1)]),_:1})]),E("dd",fRe,[j(T(r.$t("admin.UPDATE_APPLICATION_DESCRIPTION")),1),ERe,E("span",pRe,T(r.$t(`admin.REGISTRATION_${h(n).is_registration_enabled?"ENABLED":"DISABLED"}`)),1),h(n).is_email_sending_enabled?x("",!0):(A(),v("span",mRe,[hRe,j(" "+T(r.$t("admin.EMAIL_SENDING_DISABLED")),1)]))]),E("dt",null,[$(i,{to:"/admin/sports"},{default:ue(()=>[j(T(bt(r.$t("workouts.SPORT",0))),1)]),_:1})]),E("dd",null,T(r.$t("admin.ENABLE_DISABLE_SPORTS")),1),E("dt",null,[$(i,{to:"/admin/users"},{default:ue(()=>[j(T(bt(r.$t("admin.USER",0))),1)]),_:1})]),E("dd",null,T(r.$t("admin.ADMIN_RIGHTS_DELETE_USER_ACCOUNT")),1)])])]),_:1})])}}}),TRe=ae(_Re,[["__scopeId","data-v-91cfdfba"]]),rE={"Cycling (Sport)":"#4c9792","Cycling (Trekking)":"#a8af88","Cycling (Transport)":"#88af98","Cycling (Virtual)":"#64a360",Hiking:"#bb757c","Mountain Biking":"#d4b371","Mountain Biking (Electric)":"#fc9d6f",Mountaineering:"#48b3b7","Open Water Swimming":"#4058a4",Paragliding:"#c23c50",Rowing:"#fcce72",Running:"#835b83","Skiing (Alpine)":"#67a4bd","Skiing (Cross Country)":"#9498d0",Snowshoes:"#5780a8",Trail:"#09a98a",Walking:"#838383"},gRe=e=>{const t={};return e.map(n=>t[n.id]=n.color?n.color:rE[n.label]),t},ARe=(e,t)=>{const n=e.translatedLabel.toLowerCase(),a=t.translatedLabel.toLowerCase();return n>a?1:ne.filter(r=>n==="all"?!0:a.includes(r.id)||r[n]).map(r=>({...r,translatedLabel:t(`sports.${r.label}.LABEL`)})).sort(ARe),sE=(e,t)=>t.filter(n=>n.id===e.sport_id).map(n=>n.label)[0],iE=(e,t)=>t.filter(n=>n.id===e.sport_id).map(n=>n.color)[0],Sl=e=>(ut("data-v-203d96b8"),e=e(),lt(),e),SRe={id:"admin-sports",class:"admin-card"},ORe={class:"responsive-table"},IRe=Sl(()=>E("th",null,"#",-1)),RRe={class:"text-left"},bRe={class:"text-left sport-action"},NRe=Sl(()=>E("th",null,null,-1)),vRe={class:"text-center"},CRe=Sl(()=>E("span",{class:"cell-heading"},"id",-1)),yRe={class:"cell-heading"},DRe={class:"sport-label"},PRe={class:"cell-heading"},LRe={class:"text-center"},wRe={class:"cell-heading"},kRe={class:"sport-action"},$Re={class:"cell-heading"},URe={class:"action-button"},MRe=["onClick"],xRe={key:0,class:"has-workouts"},FRe=Sl(()=>E("i",{class:"fa fa-warning","aria-hidden":"true"},null,-1)),zRe=Z({__name:"AdminSports",setup(e){const{t}=Yt(),n=Me(),a=k(()=>Xa(n.getters[Mt.GETTERS.SPORTS],t)),r=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]);function s(i,o){n.dispatch(Mt.ACTIONS.UPDATE_SPORTS,{id:i,isActive:o})}return(i,o)=>{const u=oe("SportImage"),c=oe("ErrorMessage"),l=oe("Card");return A(),v("div",SRe,[$(l,null,{title:ue(()=>[j(T(i.$t("admin.SPORTS.TITLE")),1)]),content:ue(()=>[E("button",{class:"top-button",onClick:o[0]||(o[0]=Je(f=>i.$router.push("/admin"),["prevent"]))},T(i.$t("admin.BACK_TO_ADMIN")),1),E("div",ORe,[E("table",null,[E("thead",null,[E("tr",null,[IRe,E("th",null,T(i.$t("admin.SPORTS.TABLE.IMAGE")),1),E("th",RRe,T(i.$t("admin.SPORTS.TABLE.LABEL")),1),E("th",null,T(i.$t("admin.SPORTS.TABLE.ACTIVE")),1),E("th",bRe,T(i.$t("admin.ACTION")),1),NRe])]),E("tbody",null,[(A(!0),v(be,null,Ge(a.value,f=>(A(),v("tr",{key:f.id},[E("td",vRe,[CRe,j(" "+T(f.id),1)]),E("td",null,[E("span",yRe,T(i.$t("admin.SPORTS.TABLE.IMAGE")),1),$(u,{title:f.translatedLabel,"sport-label":f.label,color:f.color},null,8,["title","sport-label","color"])]),E("td",DRe,[E("span",PRe,T(i.$t("admin.SPORTS.TABLE.LABEL")),1),j(" "+T(f.translatedLabel),1)]),E("td",LRe,[E("span",wRe,T(i.$t("admin.SPORTS.TABLE.ACTIVE")),1),E("i",{class:Se(`fa fa${f.is_active?"-check":""}`),"aria-hidden":"true"},null,2)]),E("td",kRe,[E("span",$Re,T(i.$t("admin.ACTION")),1),E("div",URe,[E("button",{class:Se({danger:f.is_active}),onClick:d=>s(f.id,!f.is_active)},T(i.$t(`buttons.${f.is_active?"DIS":"EN"}ABLE`)),11,MRe),f.has_workouts?(A(),v("span",xRe,[FRe,j(" "+T(i.$t("admin.SPORTS.TABLE.HAS_WORKOUTS")),1)])):x("",!0)])])]))),128))])]),r.value?(A(),te(c,{key:0,message:r.value},null,8,["message"])):x("",!0),E("button",{onClick:o[1]||(o[1]=Je(f=>i.$router.push("/admin"),["prevent"]))},T(i.$t("admin.BACK_TO_ADMIN")),1)])]),_:1})])}}}),WRe=ae(zRe,[["__scopeId","data-v-203d96b8"]]),GRe={class:"table-selects"},BRe=["value"],HRe=["value"],VRe=["value"],jRe=["value"],KRe=["value"],YRe=["value"],qRe=Z({__name:"FilterSelects",props:{order_by:{},query:{},sort:{},message:{}},emits:["updateSelect"],setup(e,{emit:t}){const n=e,a=t,{order_by:r,query:s,sort:i,message:o}=_e(n),u=[10,25,50,100];function c(l){a("updateSelect",l.target.id,l.target.value)}return(l,f)=>(A(),v("div",GRe,[E("label",null,[j(T(l.$t("common.SELECTS.ORDER_BY.LABEL"))+": ",1),E("select",{name:"order_by",id:"order_by",value:h(s).order_by,onChange:c},[(A(!0),v(be,null,Ge(h(r),d=>(A(),v("option",{value:d,key:d},T(l.$t(`${h(o)}.${d.toUpperCase()}`)),9,HRe))),128))],40,BRe)]),E("label",null,[j(T(l.$t("common.SELECTS.ORDER.LABEL"))+": ",1),E("select",{name:"order",id:"order",value:h(s).order,onChange:c},[(A(!0),v(be,null,Ge(h(i),d=>(A(),v("option",{value:d,key:d},T(l.$t(`common.SELECTS.ORDER.${d.toUpperCase()}`)),9,jRe))),128))],40,VRe)]),E("label",null,[j(T(l.$t("common.SELECTS.PER_PAGE.LABEL"))+": ",1),E("select",{name:"per_page",id:"per_page",value:h(s).per_page,onChange:c},[(A(),v(be,null,Ge(u,d=>E("option",{value:d,key:d},T(d),9,YRe)),64))],40,KRe)])]))}}),qg=ae(qRe,[["__scopeId","data-v-fc86ab3c"]]),oE=["asc","desc"],Xg=1,XRe=10,Cd=(e,t)=>e&&typeof e=="string"&&+e>0?+e:t,ym=(e,t,n)=>e&&typeof e=="string"&&t.includes(e)?e:n,yd=(e,t,n,a)=>{const s=(a||{}).defaultSort||"asc",i={};return i.page=Cd(e.page,Xg),i.per_page=Cd(e.per_page,XRe),i.order=ym(e.order,oE,s),i.order_by=ym(e.order_by,t,n),typeof e.q=="string"?i.q=e.q:delete i.q,i},ZRe=["from","to","ave_speed_from","ave_speed_to","max_speed_from","max_speed_to","distance_from","distance_to","duration_from","duration_to","sport_id","title"],Cr=(e,t=1)=>Array.from({length:e-t+1},(n,a)=>t+a),QRe=(e,t)=>{if(e<0)return[];if(e<9)return Cr(e);let n=[1,2];return t<4?n=n.concat([3,4,5]):t<6?n=n.concat(Cr(t+2,3)):(n=n.concat(["..."]),t=e-2&&+n[n.length-1](ut("data-v-69dd9739"),e=e(),lt(),e),JRe={class:"pagination-center","aria-label":"navigation"},ebe={class:"pagination"},tbe=Zg(()=>E("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),nbe={key:0},abe=Zg(()=>E("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),rbe=Z({__name:"Pagination",props:{pagination:{},path:{},query:{}},setup(e){const t=e,{pagination:n,path:a,query:r}=_e(t);function s(i,o){const u=Object.assign({},r.value);return u.page=o?i+o:i,u}return(i,o)=>{const u=oe("router-link");return A(),v("nav",JRe,[E("ul",ebe,[E("li",{class:Se(["page-prev",{disabled:!h(n).has_prev}])},[$(u,{class:"page-link",to:{path:h(a),query:s(h(n).page,-1)},disabled:!h(n).has_prev,tabindex:h(n).has_prev?0:-1},{default:ue(({navigate:c})=>[Br(i.$slots,"default",{onClick:l=>h(n).has_next?c:null},()=>[j(T(i.$t("api.PAGINATION.PREVIOUS"))+" ",1),tbe],!0)]),_:3},8,["to","disabled","tabindex"])],2),(A(!0),v(be,null,Ge(h(QRe)(h(n).pages,h(n).page),c=>(A(),v("li",{key:c,class:Se(["page",{active:c===h(n).page}])},[c==="..."?(A(),v("span",nbe," ... ")):(A(),te(u,{key:1,class:"page-link",to:{path:h(a),query:s(+c)}},{default:ue(()=>[j(T(c),1)]),_:2},1032,["to"]))],2))),128)),E("li",{class:Se(["page-next",{disabled:!h(n).has_next}])},[$(u,{class:"page-link",to:{path:h(a),query:s(h(n).page,1)},disabled:!h(n).has_next,tabindex:h(n).has_next?0:-1},{default:ue(({navigate:c})=>[Br(i.$slots,"default",{onClick:l=>h(n).has_next?c:null},()=>[j(T(i.$t("api.PAGINATION.NEXT"))+" ",1),abe],!0)]),_:3},8,["to","disabled","tabindex"])],2)])])}}}),ku=ae(rbe,[["__scopeId","data-v-69dd9739"]]),sbe={class:"users-filters"},ibe={class:"search-username"},obe=["placeholder"],ube=Z({__name:"UsersNameFilter",emits:["filterOnUsername"],setup(e,{emit:t}){const n=qt(),a=ce(n.query.q?n.query.q:""),r=t;function s(){a.value!==""&&r("filterOnUsername",a)}function i(){a.value="",r("filterOnUsername",a.value)}return(o,u)=>(A(),v("div",sbe,[E("div",ibe,[qe(E("input",{id:"username",name:"username","onUpdate:modelValue":u[0]||(u[0]=c=>a.value=c),onKeyup:At(s,["enter"]),placeholder:o.$t("user.FILTER_ON_USERNAME")},null,40,obe),[[rt,a.value,void 0,{trim:!0}]]),a.value!==""?(A(),v("i",{key:0,class:"fa fa-times","aria-hidden":"true",onClick:i})):x("",!0)]),E("i",{class:Se(["fa fa-search",{"fa-disabled":a.value===""}]),"aria-hidden":"true",onClick:s},null,2)]))}}),lbe=ae(ube,[["__scopeId","data-v-553040c7"]]);var Dd={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(a){if(a===null||a===!0||a===!1)return NaN;var r=Number(a);return isNaN(r)?r:r<0?Math.ceil(r):Math.floor(r)}e.exports=t.default})(Dd,Dd.exports);var cbe=Dd.exports;const dbe=xd(cbe);var Pd={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(a){var r=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return r.setUTCFullYear(a.getFullYear()),a.getTime()-r.getTime()}e.exports=t.default})(Pd,Pd.exports);var fbe=Pd.exports;const Dm=xd(fbe);function Ebe(e,t){var n=_be(t);return n.formatToParts?mbe(n,e):hbe(n,e)}var pbe={year:0,month:1,day:2,hour:3,minute:4,second:5};function mbe(e,t){try{for(var n=e.formatToParts(t),a=[],r=0;r=0&&(a[s]=parseInt(n[r].value,10))}return a}catch(i){if(i instanceof RangeError)return[NaN];throw i}}function hbe(e,t){var n=e.format(t).replace(/\u200E/g,""),a=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[a[3],a[1],a[2],a[4],a[5],a[6]]}var sc={};function _be(e){if(!sc[e]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n=t==="06/25/2014, 00:00:00"||t==="06/25/2014 00:00:00";sc[e]=n?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return sc[e]}function Qg(e,t,n,a,r,s,i){var o=new Date(0);return o.setUTCFullYear(e,t,n),o.setUTCHours(a,r,s,i),o}var Pm=36e5,Tbe=6e4,ic={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function Jg(e,t,n){var a,r;if(!e||(a=ic.timezoneZ.exec(e),a))return 0;var s;if(a=ic.timezoneHH.exec(e),a)return s=parseInt(a[1],10),Lm(s)?-(s*Pm):NaN;if(a=ic.timezoneHHMM.exec(e),a){s=parseInt(a[1],10);var i=parseInt(a[2],10);return Lm(s,i)?(r=Math.abs(s)*Pm+i*Tbe,s>0?-r:r):NaN}if(Sbe(e)){t=new Date(t||Date.now());var o=n?t:gbe(t),u=Ld(o,e),c=n?u:Abe(t,u,e);return-c}return NaN}function gbe(e){return Qg(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function Ld(e,t){var n=Ebe(e,t),a=Qg(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),r=e.getTime(),s=r%1e3;return r-=s>=0?s:1e3+s,a-r}function Abe(e,t,n){var a=e.getTime(),r=a-t,s=Ld(new Date(r),n);if(t===s)return t;r-=s-t;var i=Ld(new Date(r),n);return s===i?s:Math.max(s,i)}function Lm(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}var wm={};function Sbe(e){if(wm[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),wm[e]=!0,!0}catch{return!1}}var Obe=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,oc=36e5,km=6e4,Ibe=2,en={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:Obe};function Rbe(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);var n=t||{},a=n.additionalDigits==null?Ibe:dbe(n.additionalDigits);if(a!==2&&a!==1&&a!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var r=bbe(e),s=Nbe(r.date,a),i=s.year,o=s.restDateString,u=vbe(o,i);if(isNaN(u))return new Date(NaN);if(u){var c=u.getTime(),l=0,f;if(r.time&&(l=Cbe(r.time),isNaN(l)))return new Date(NaN);if(r.timeZone||n.timeZone){if(f=Jg(r.timeZone||n.timeZone,new Date(c+l)),isNaN(f))return new Date(NaN)}else f=Dm(new Date(c+l)),f=Dm(new Date(c+l+f));return new Date(c+l+f)}else return new Date(NaN)}function bbe(e){var t={},n=en.dateTimePattern.exec(e),a;if(n?(t.date=n[1],a=n[3]):(n=en.datePattern.exec(e),n?(t.date=n[1],a=n[2]):(t.date=null,a=e)),a){var r=en.timeZone.exec(a);r?(t.time=a.replace(r[1],""),t.timeZone=r[1].trim()):t.time=a}return t}function Nbe(e,t){var n=en.YYY[t],a=en.YYYYY[t],r;if(r=en.YYYY.exec(e)||a.exec(e),r){var s=r[1];return{year:parseInt(s,10),restDateString:e.slice(s.length)}}if(r=en.YY.exec(e)||n.exec(e),r){var i=r[1];return{year:parseInt(i,10)*100,restDateString:e.slice(i.length)}}return{year:null}}function vbe(e,t){if(t===null)return null;var n,a,r,s;if(e.length===0)return a=new Date(0),a.setUTCFullYear(t),a;if(n=en.MM.exec(e),n)return a=new Date(0),r=parseInt(n[1],10)-1,Um(t,r)?(a.setUTCFullYear(t,r),a):new Date(NaN);if(n=en.DDD.exec(e),n){a=new Date(0);var i=parseInt(n[1],10);return Pbe(t,i)?(a.setUTCFullYear(t,0,i),a):new Date(NaN)}if(n=en.MMDD.exec(e),n){a=new Date(0),r=parseInt(n[1],10)-1;var o=parseInt(n[2],10);return Um(t,r,o)?(a.setUTCFullYear(t,r,o),a):new Date(NaN)}if(n=en.Www.exec(e),n)return s=parseInt(n[1],10)-1,Mm(t,s)?$m(t,s):new Date(NaN);if(n=en.WwwD.exec(e),n){s=parseInt(n[1],10)-1;var u=parseInt(n[2],10)-1;return Mm(t,s,u)?$m(t,s,u):new Date(NaN)}return null}function Cbe(e){var t,n,a;if(t=en.HH.exec(e),t)return n=parseFloat(t[1].replace(",",".")),uc(n)?n%24*oc:NaN;if(t=en.HHMM.exec(e),t)return n=parseInt(t[1],10),a=parseFloat(t[2].replace(",",".")),uc(n,a)?n%24*oc+a*km:NaN;if(t=en.HHMMSS.exec(e),t){n=parseInt(t[1],10),a=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return uc(n,a,r)?n%24*oc+a*km+r*1e3:NaN}return null}function $m(e,t,n){t=t||0,n=n||0;var a=new Date(0);a.setUTCFullYear(e,0,4);var r=a.getUTCDay()||7,s=t*7+n+1-r;return a.setUTCDate(a.getUTCDate()+s),a}var ybe=[31,28,31,30,31,30,31,31,30,31,30,31],Dbe=[31,29,31,30,31,30,31,31,30,31,30,31];function eA(e){return e%400===0||e%4===0&&e%100!==0}function Um(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;var a=eA(e);if(a&&n>Dbe[t]||!a&&n>ybe[t])return!1}return!0}function Pbe(e,t){if(t<1)return!1;var n=eA(e);return!(n&&t>366||!n&&t>365)}function Mm(e,t,n){return!(t<0||t>52||n!=null&&(n<0||n>6))}function uc(e,t,n){return!(e!=null&&(e<0||e>=25)||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}function Lbe(e,t,n){var a=Rbe(e,n),r=Jg(t,a,!0),s=new Date(a.getTime()-r),i=new Date(0);return i.setFullYear(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()),i.setHours(s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds()),i}const{locale:$u}=_r.global,wbe=(e,t,n)=>{switch(e){case"week":return tl(t,{weekStartsOn:n?1:0});case"year":return Sf(t);case"month":return bi(t);default:throw new Error(`Invalid duration, expected: "week", "month", "year", got: "${e}"`)}},kbe=(e,t)=>{switch(e){case"week":return Ii(t,7);case"year":return Ho(t,1);case"month":return Kr(t,1);default:throw new Error(`Invalid duration, expected: "week", "month", "year", got: "${e}"`)}},Ol=(e,t)=>Lbe(new Date(e),t),xm=(e,t)=>{const n=bi(e),a=Ri(e),r=t?1:0;return{start:tl(n,{weekStartsOn:r}),end:Of(a,{weekStartsOn:r})}},tA=(e,t=null,n=null)=>(t||(t="yyyy/MM/dd"),t=gr(t,$u.value),n||(n="HH:mm"),{workout_date:dn(e,t,{locale:Ni[$u.value]}),workout_time:dn(e,n)}),$be=["MM/dd/yyyy","dd/MM/yyyy","yyyy-MM-dd","date_string"],nA={de:"do MMM yyyy",en:"MMM. do, yyyy",es:"d MMM yyyy",eu:"d MMM yyyy",fr:"d MMM yyyy",gl:"d MMM yyyy",it:"d MMM yyyy",pl:"d MMM yyyy",nb:"do MMM yyyy",nl:"d MMM yyyy"},gr=(e,t)=>e==="date_string"?nA[t]:e,$n=(e,t,n,a=!0,r=null,s=!1)=>{r||(r=$u.value);const i=a?s?" HH:mm:ss":" HH:mm":"";return dn(Ol(e,t),`${gr(n,r)}${i}`,{locale:Ni[r]})},Ube=(e,t,n=null)=>{const a=n||$u.value,r=[];return $be.map(s=>{const i=gr(s,a);r.push({label:`${i} - ${$n(e,t,i,!1,a)}`,value:s})}),r},Mbe=e=>(ut("data-v-4beb3bfa"),e=e(),lt(),e),xbe={id:"admin-users",class:"admin-card"},Fbe={key:0,class:"no-users"},zbe={key:1,class:"responsive-table"},Wbe=Mbe(()=>E("th",null,"#",-1)),Gbe={class:"left-text"},Bbe={class:"left-text"},Hbe={class:"left-text"},Vbe={class:"cell-heading"},jbe={class:"cell-heading"},Kbe={class:"cell-heading"},Ybe={class:"cell-heading"},qbe={class:"text-center"},Xbe={class:"cell-heading"},Zbe={class:"text-center"},Qbe={class:"cell-heading"},Jbe={class:"text-center"},eNe={class:"cell-heading"},tNe={class:"text-center"},nNe={class:"cell-heading"},aNe=["disabled","onClick"],Fm="created_at",rNe=Z({__name:"AdminUsers",setup(e){const t=Me(),n=qt(),a=Ya(),r=["is_active","admin","created_at","username","workouts_count"];let s=Gt(yd(n.query,r,Fm));const i=k(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),o=k(()=>t.getters[Le.GETTERS.USERS]),u=k(()=>t.getters[Le.GETTERS.USERS_PAGINATION]),c=k(()=>t.getters[H.GETTERS.ERROR_MESSAGES]);Ct(()=>l(s));function l(m){t.dispatch(Le.ACTIONS.GET_USERS,m)}function f(m){p("q",m.value)}function d(m,I){t.dispatch(Le.ACTIONS.UPDATE_USER,{username:m,admin:I})}function p(m,I){s[m]=I,m==="per_page"&&(s.page=1),a.push({path:"/admin/users",query:s})}return Nt(()=>{t.dispatch(Le.ACTIONS.EMPTY_USERS)}),We(()=>n.query,m=>{s=yd(m,r,Fm,{query:s}),l(s)}),(m,I)=>{const b=oe("router-link"),R=oe("ErrorMessage"),N=oe("Card");return A(),v("div",xbe,[$(N,null,{title:ue(()=>[j(T(bt(m.$t("admin.USER",0))),1)]),content:ue(()=>[E("button",{class:"top-button",onClick:I[0]||(I[0]=Je(S=>m.$router.push("/admin"),["prevent"]))},T(m.$t("admin.BACK_TO_ADMIN")),1),$(lbe,{onFilterOnUsername:f}),$(qg,{sort:h(oE),order_by:r,query:h(s),message:"admin.USERS.SELECTS.ORDER_BY",onUpdateSelect:p},null,8,["sort","query"]),o.value.length===0?(A(),v("div",Fbe,T(m.$t("user.NO_USERS_FOUND")),1)):(A(),v("div",zbe,[E("table",null,[E("thead",null,[E("tr",null,[Wbe,E("th",Gbe,T(m.$t("user.USERNAME")),1),E("th",Bbe,T(m.$t("user.EMAIL")),1),E("th",Hbe,T(m.$t("user.PROFILE.REGISTRATION_DATE")),1),E("th",null,T(bt(m.$t("workouts.WORKOUT",0))),1),E("th",null,T(m.$t("admin.ACTIVE")),1),E("th",null,T(m.$t("user.ADMIN")),1),E("th",null,T(m.$t("admin.ACTION")),1)])]),E("tbody",null,[(A(!0),v(be,null,Ge(o.value,S=>(A(),v("tr",{key:S.username},[E("td",null,[E("span",Vbe,T(m.$t("user.PROFILE.PICTURE")),1),$(Oi,{user:S},null,8,["user"])]),E("td",null,[E("span",jbe,T(m.$t("user.USERNAME")),1),$(b,{to:`/admin/users/${S.username}`},{default:ue(()=>[j(T(S.username),1)]),_:2},1032,["to"])]),E("td",null,[E("span",Kbe,T(m.$t("user.EMAIL")),1),j(" "+T(S.email),1)]),E("td",null,[E("span",Ybe,T(m.$t("user.PROFILE.REGISTRATION_DATE")),1),E("time",null,T(h($n)(S.created_at,i.value.timezone,i.value.date_format)),1)]),E("td",qbe,[E("span",Xbe,T(bt(m.$t("workouts.WORKOUT",0))),1),j(" "+T(S.nb_workouts),1)]),E("td",Zbe,[E("span",Qbe,T(m.$t("admin.ACTIVE")),1),E("i",{class:Se(`fa fa${S.is_active?"-check":""}-square-o`),"aria-hidden":"true"},null,2)]),E("td",Jbe,[E("span",eNe,T(m.$t("user.ADMIN")),1),E("i",{class:Se(`fa fa${S.admin?"-check":""}-square-o`),"aria-hidden":"true"},null,2)]),E("td",tNe,[E("span",nNe,T(m.$t("admin.ACTION")),1),E("button",{class:Se({danger:S.admin}),disabled:S.username===i.value.username,onClick:O=>d(S.username,!S.admin)},T(m.$t(`admin.USERS.TABLE.${S.admin?"REMOVE":"ADD"}_ADMIN_RIGHTS`)),11,aNe)])]))),128))])]),u.value.page?(A(),te(ku,{key:0,path:"/admin/users",pagination:u.value,query:h(s)},null,8,["pagination","query"])):x("",!0),c.value?(A(),te(R,{key:1,message:c.value},null,8,["message"])):x("",!0),E("button",{onClick:I[1]||(I[1]=Je(S=>m.$router.push("/admin"),["prevent"]))},T(m.$t("admin.BACK_TO_ADMIN")),1)]))]),_:1})])}}}),sNe=ae(rNe,[["__scopeId","data-v-4beb3bfa"]]),iNe={class:"box user-header"},oNe={class:"user-details"},uNe={class:"user-name"},lNe={class:"user-stats"},cNe={class:"user-stat"},dNe={class:"stat-number"},fNe={class:"stat-label"},ENe={class:"user-stat"},pNe={class:"stat-label"},mNe={class:"user-stat hide-small"},hNe={class:"stat-number"},_Ne={class:"stat-label"},TNe=Z({__name:"UserHeader",props:{user:{}},setup(e){const t=e,{user:n}=_e(t),a=Me(),r=k(()=>a.getters[K.GETTERS.AUTH_USER_PROFILE]);return(s,i)=>{const o=oe("Distance");return A(),v("div",iNe,[$(Oi,{user:h(n)},null,8,["user"]),E("div",oNe,[E("div",uNe,T(h(n).username),1),E("div",lNe,[E("div",cNe,[E("span",dNe,T(h(n).nb_workouts),1),E("span",fNe,T(s.$t("workouts.WORKOUT",h(n).nb_workouts)),1)]),E("div",ENe,[$(o,{distance:h(n).total_distance,unitFrom:"km",digits:0,displayUnit:!1,useImperialUnits:r.value.imperial_units},null,8,["distance","useImperialUnits"]),E("span",pNe,T(r.value.imperial_units?"miles":"km"),1)]),E("div",mNe,[E("span",hNe,T(h(n).nb_sports),1),E("span",_Ne,T(s.$t("workouts.SPORT",h(n).nb_sports)),1)])])])])}}}),aA=ae(TNe,[["__scopeId","data-v-3abb1646"]]),gNe={class:"profile-tabs custom-checkboxes-group"},ANe={class:"profile-tabs-checkboxes custom-checkboxes"},SNe=["id","name","checked","disabled","onInput"],ONe=["id","onKeydown"],rA=Z({__name:"UserProfileTabs",props:{tabs:{},selectedTab:{},edition:{type:Boolean},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{tabs:n,selectedTab:a,disabled:r}=_e(t);_t(()=>{const i=document.getElementById(`tab-${n.value[0]}`);i&&i.focus()});function s(i){switch(i){case"ACCOUNT":case"PICTURE":case"PRIVACY-POLICY":return`/profile/edit/${i.toLocaleLowerCase()}`;case"APPS":case"PREFERENCES":case"SPORTS":return`/profile${t.edition?"/edit":""}/${i.toLocaleLowerCase()}`;default:case"PROFILE":return`/profile${t.edition?"/edit":""}`}}return(i,o)=>(A(),v("div",gNe,[E("div",ANe,[(A(!0),v(be,null,Ge(h(n),u=>(A(),v("div",{class:"profile-tab custom-checkbox",key:u},[E("label",null,[E("input",{type:"radio",id:u,name:u,checked:h(a).split("/")[0]===u,disabled:h(r),onInput:c=>i.$router.push(s(u))},null,40,SNe),E("span",{id:`tab-${u}`,tabindex:0,role:"button",onKeydown:At(c=>i.$router.push(s(u)),["enter"])},T(i.$t(`user.PROFILE.TABS.${u}`)),41,ONe)])]))),128))])]))}}),INe={id:"user-profile"},RNe={class:"box"},bNe=Z({__name:"index",props:{user:{},tab:{}},setup(e){const t=e,{user:n,tab:a}=_e(t),r=["PROFILE","PREFERENCES","SPORTS","APPS"];return(s,i)=>{const o=oe("router-view");return A(),v("div",INe,[$(aA,{user:h(n)},null,8,["user"]),E("div",RNe,[$(rA,{tabs:r,selectedTab:h(a),edition:!1},null,8,["selectedTab"]),$(o,{user:h(n)},null,8,["user"])])])}}}),NNe=ae(bNe,[["__scopeId","data-v-8a058d49"]]),vNe={id:"user-infos",class:"description-list"},CNe={key:1,class:"info-box success-message"},yNe={key:4,class:"email-form form-box"},DNe={class:"form-items",for:"email"},PNe={class:"form-items",for:"email"},LNe={class:"form-buttons"},wNe={class:"confirm",type:"submit"},kNe={key:5},$Ne={key:0},UNe={class:"user-bio"},MNe={key:0,class:"profile-buttons"},xNe={key:1,class:"profile-buttons"},FNe=Z({__name:"UserInfos",props:{user:{},fromAdmin:{type:Boolean,default:!1}},setup(e){const t=e,n=Me(),{user:a,fromAdmin:r}=_e(t),s=k(()=>n.getters[H.GETTERS.LANGUAGE]),i=k(()=>n.getters[K.GETTERS.AUTH_USER_PROFILE]),o=k(()=>t.user.created_at?$n(t.user.created_at,i.value.timezone,i.value.date_format):""),u=k(()=>t.user.birth_date?dn(new Date(t.user.birth_date),`${gr(i.value.date_format,s.value)}`,{locale:Ni[s.value]}):""),c=k(()=>n.getters[Le.GETTERS.USERS_IS_SUCCESS]),l=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),f=k(()=>n.getters[H.GETTERS.APP_CONFIG]),d=ce(""),p=ce(!1),m=ce(!1),I=ce(""),b=ce("");function R(W){d.value=W,W!==""&&n.commit(Le.MUTATIONS.UPDATE_IS_SUCCESS,!1)}function N(W){n.dispatch(Le.ACTIONS.DELETE_USER_ACCOUNT,{username:W})}function S(W){b.value="password-reset",n.dispatch(Le.ACTIONS.UPDATE_USER,{username:W,resetPassword:!0})}function O(W){n.dispatch(Le.ACTIONS.UPDATE_USER,{username:W,activate:!0})}function C(){L(),I.value=a.value.email_to_confirm?a.value.email_to_confirm:"",m.value=!0,b.value="email-update"}function P(){I.value="",m.value=!1}function M(W){n.dispatch(Le.ACTIONS.UPDATE_USER,{username:W,new_email:I.value})}function L(){n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),n.commit(Le.MUTATIONS.UPDATE_IS_SUCCESS,!1),b.value=""}return Nt(()=>L()),We(()=>c.value,W=>{W&&(R(""),P())}),(W,B)=>{const w=oe("Modal"),X=oe("AlertMessage"),J=oe("ErrorMessage");return A(),v("div",vNe,[d.value?(A(),te(w,{key:0,title:W.$t("common.CONFIRMATION"),message:d.value==="delete"?"admin.CONFIRM_USER_ACCOUNT_DELETION":"admin.CONFIRM_USER_PASSWORD_RESET",strongMessage:h(a).username,onConfirmAction:B[0]||(B[0]=ne=>d.value==="delete"?N(h(a).username):S(h(a).username)),onCancelAction:B[1]||(B[1]=ne=>R("")),onKeydown:B[2]||(B[2]=At(ne=>R(""),["esc"]))},null,8,["title","message","strongMessage"])):x("",!0),c.value?(A(),v("div",CNe,T(W.$t(`admin.${b.value==="password-reset"?"PASSWORD_RESET":"USER_EMAIL_UPDATE"}_SUCCESSFUL`)),1)):x("",!0),h(a).is_active?x("",!0):(A(),te(X,{key:2,message:"user.THIS_USER_ACCOUNT_IS_INACTIVE"})),l.value?(A(),te(J,{key:3,message:l.value},null,8,["message"])):x("",!0),m.value?(A(),v("div",yNe,[E("form",{class:Se({errors:p.value}),onSubmit:B[5]||(B[5]=Je(ne=>M(h(a).username),["prevent"]))},[E("label",DNe,[j(T(W.$t("admin.CURRENT_EMAIL"))+" ",1),qe(E("input",{id:"email",type:"email","onUpdate:modelValue":B[3]||(B[3]=ne=>h(a).email=ne),disabled:""},null,512),[[rt,h(a).email]])]),E("label",PNe,[j(T(W.$t("admin.NEW_EMAIL"))+"* ",1),qe(E("input",{id:"new-email",type:"email",required:"","onUpdate:modelValue":B[4]||(B[4]=ne=>I.value=ne)},null,512),[[rt,I.value]])]),E("div",LNe,[E("button",wNe,T(W.$t("buttons.SUBMIT")),1),E("button",{class:"cancel",onClick:Je(P,["prevent"])},T(W.$t("buttons.CANCEL")),1)])],34)])):(A(),v("div",kNe,[E("dl",null,[E("dt",null,T(W.$t("user.PROFILE.REGISTRATION_DATE"))+":",1),E("dd",null,[E("time",null,T(o.value),1)]),E("dt",null,T(W.$t("user.PROFILE.FIRST_NAME"))+":",1),E("dd",null,T(h(a).first_name),1),E("dt",null,T(W.$t("user.PROFILE.LAST_NAME"))+":",1),E("dd",null,T(h(a).last_name),1),E("dt",null,T(W.$t("user.PROFILE.BIRTH_DATE"))+":",1),E("dd",null,[u.value?(A(),v("time",$Ne,T(u.value),1)):x("",!0)]),E("dt",null,T(W.$t("user.PROFILE.LOCATION"))+":",1),E("dd",null,T(h(a).location),1),E("dt",null,T(W.$t("user.PROFILE.BIO"))+":",1),E("dd",UNe,T(h(a).bio),1)]),h(r)?(A(),v("div",MNe,[i.value.username!==h(a).username?(A(),v("button",{key:0,class:"danger",onClick:B[6]||(B[6]=Je(ne=>R("delete"),["prevent"]))},T(W.$t("admin.DELETE_USER")),1)):x("",!0),h(a).is_active?x("",!0):(A(),v("button",{key:1,onClick:B[7]||(B[7]=Je(ne=>O(h(a).username),["prevent"]))},T(W.$t("admin.ACTIVATE_USER_ACCOUNT")),1)),i.value.username!==h(a).username?(A(),v("button",{key:2,onClick:Je(C,["prevent"])},T(W.$t("admin.UPDATE_USER_EMAIL")),1)):x("",!0),i.value.username!==h(a).username&&f.value.is_email_sending_enabled?(A(),v("button",{key:3,onClick:B[8]||(B[8]=Je(ne=>R("reset"),["prevent"]))},T(W.$t("admin.RESET_USER_PASSWORD")),1)):x("",!0),E("button",{onClick:B[9]||(B[9]=ne=>W.$router.go(-1))},T(W.$t("buttons.BACK")),1)])):(A(),v("div",xNe,[E("button",{onClick:B[10]||(B[10]=ne=>W.$router.push("/profile/edit"))},T(W.$t("user.PROFILE.EDIT")),1),E("button",{onClick:B[11]||(B[11]=ne=>W.$router.push("/"))},T(W.$t("common.HOME")),1)]))]))])}}}),sA=ae(FNe,[["__scopeId","data-v-98220281"]]),zNe=e=>(ut("data-v-b0528e22"),e=e(),lt(),e),WNe={id:"user-preferences",class:"description-list"},GNe={class:"preferences-section"},BNe={class:"preferences-section"},HNe={class:"info-box raw-speed-help"},VNe=zNe(()=>E("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),jNe={class:"profile-buttons"},KNe=Z({__name:"UserPreferences",props:{user:{}},setup(e){const t=e,n=Me(),a=k(()=>n.getters[H.GETTERS.LANGUAGE]),r=k(()=>t.user.language?Xc[t.user.language]:Xc.en),s=k(()=>t.user.weekm?"MONDAY":"SUNDAY"),i=k(()=>t.user.timezone?t.user.timezone:"Europe/Paris"),o=k(()=>t.user.date_format?t.user.date_format:"MM/dd/yyyy"),u=k(()=>t.user.display_ascent?"DISPLAYED":"HIDDEN"),c=k(()=>t.user.use_dark_mode===!0?"DARK":t.user.use_dark_mode===!1?"LIGHT":"DEFAULT");return(l,f)=>(A(),v("div",WNe,[E("div",GNe,T(l.$t("user.PROFILE.INTERFACE")),1),E("dl",null,[E("dt",null,T(l.$t("user.PROFILE.LANGUAGE"))+":",1),E("dd",null,T(r.value),1),E("dt",null,T(l.$t("user.PROFILE.THEME_MODE.LABEL"))+":",1),E("dd",null,T(l.$t(`user.PROFILE.THEME_MODE.VALUES.${c.value}`)),1),E("dt",null,T(l.$t("user.PROFILE.TIMEZONE"))+":",1),E("dd",null,T(i.value),1),E("dt",null,T(l.$t("user.PROFILE.DATE_FORMAT"))+":",1),E("dd",null,T(h(gr)(o.value,a.value)),1),E("dt",null,T(l.$t("user.PROFILE.FIRST_DAY_OF_WEEK"))+":",1),E("dd",null,T(l.$t(`user.PROFILE.${s.value}`)),1)]),E("div",BNe,T(l.$t("workouts.WORKOUT",0)),1),E("dl",null,[E("dt",null,T(l.$t("user.PROFILE.UNITS.LABEL"))+":",1),E("dd",null,T(l.$t(`user.PROFILE.UNITS.${l.user.imperial_units?"IMPERIAL":"METRIC"}`)),1),E("dt",null,T(l.$t("user.PROFILE.ASCENT_DATA"))+":",1),E("dd",null,T(l.$t(`common.${u.value}`)),1),E("dt",null,T(l.$t("user.PROFILE.ELEVATION_CHART_START.LABEL"))+":",1),E("dd",null,T(l.$t(`user.PROFILE.ELEVATION_CHART_START.${l.user.start_elevation_at_zero?"ZERO":"MIN_ALT"}`)),1),E("dt",null,T(l.$t("user.PROFILE.USE_RAW_GPX_SPEED.LABEL"))+":",1),E("dd",null,T(l.$t(`user.PROFILE.USE_RAW_GPX_SPEED.${l.user.use_raw_gpx_speed?"RAW_SPEED":"FILTERED_SPEED"}`)),1),E("div",HNe,[E("span",null,[VNe,j(" "+T(l.$t("user.PROFILE.USE_RAW_GPX_SPEED.HELP")),1)])])]),E("div",jNe,[E("button",{onClick:f[0]||(f[0]=d=>l.$router.push("/profile/edit/preferences"))},T(l.$t("user.PROFILE.EDIT_PREFERENCES")),1),E("button",{onClick:f[1]||(f[1]=d=>l.$router.push("/"))},T(l.$t("common.HOME")),1)])]))}}),YNe=ae(KNe,[["__scopeId","data-v-b0528e22"]]),qNe={id:"user-profile-edition",class:"center-card"},XNe=Z({__name:"index",props:{user:{},tab:{}},setup(e){const t=e,n=Me(),{user:a,tab:r}=_e(t),s=["PROFILE","ACCOUNT","PICTURE","PREFERENCES","SPORTS","PRIVACY-POLICY"],i=k(()=>n.getters[K.GETTERS.USER_LOADING]);return(o,u)=>{const c=oe("router-view"),l=oe("Card");return A(),v("div",qNe,[$(l,null,{title:ue(()=>[j(T(o.$t(`user.PROFILE.${h(r)}_EDITION`)),1)]),content:ue(()=>[$(rA,{tabs:s,selectedTab:h(r),edition:!0,disabled:i.value},null,8,["selectedTab","disabled"]),$(c,{user:h(a)},null,8,["user"])]),_:1})])}}}),Gs=new Map,ZNe=e=>{const{method:t,url:n,params:a={},data:r={}}=e;return[t,n,JSON.stringify(a),JSON.stringify(r)].join("")},is=e=>{const t=ZNe(e);if(Gs.has(t)){const n=Gs.get(t)||{};n==null||n.abort(),Gs.delete(t)}return t},Pa=yt.create({baseURL:Si()});Pa.interceptors.request.use(e=>{const t=new AbortController;e.signal=t.signal;const n=is(e);return Gs.set(n,t),e},e=>Promise.reject(e));Pa.interceptors.response.use(e=>(is(e.config),e),e=>(e.message!=="canceled"&&e.response&&is(e.response.config),Promise.reject(e)));const iA=(e,t)=>{e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.delete(`users/${t.username}`).then(n=>{n.status===204?t.fromAdmin?Rt.push("/admin/users"):e.dispatch(K.ACTIONS.LOGOUT).then(()=>Rt.push("/")):me(e,null)}).catch(n=>me(e,n))},QNe={[Le.ACTIONS.EMPTY_USER](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Le.MUTATIONS.UPDATE_USER,{})},[Le.ACTIONS.EMPTY_USERS](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Le.MUTATIONS.UPDATE_USERS,[]),e.commit(Le.MUTATIONS.UPDATE_USERS_PAGINATION,{})},[Le.ACTIONS.GET_USER](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Le.MUTATIONS.UPDATE_USERS_LOADING,!0),je.get(`users/${t}`).then(n=>{n.data.status==="success"?e.commit(Le.MUTATIONS.UPDATE_USER,n.data.data.users[0]):me(e,null)}).catch(n=>me(e,n)).finally(()=>e.commit(Le.MUTATIONS.UPDATE_USERS_LOADING,!1))},[Le.ACTIONS.GET_USERS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Le.MUTATIONS.UPDATE_USERS_LOADING,!0),je.get("users",{params:t}).then(n=>{n.data.status==="success"?(e.commit(Le.MUTATIONS.UPDATE_USERS,n.data.data.users),e.commit(Le.MUTATIONS.UPDATE_USERS_PAGINATION,n.data.pagination)):me(e,null)}).catch(n=>me(e,n)).finally(()=>e.commit(Le.MUTATIONS.UPDATE_USERS_LOADING,!1))},[Le.ACTIONS.UPDATE_USER](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Le.MUTATIONS.UPDATE_IS_SUCCESS,!1);const n={};t.admin!==void 0&&(n.admin=t.admin),t.resetPassword&&(n.reset_password=t.resetPassword),t.activate&&(n.activate=t.activate),t.new_email!==void 0&&(n.new_email=t.new_email),je.patch(`users/${t.username}`,n).then(a=>{a.data.status==="success"?(e.commit(Le.MUTATIONS.UPDATE_USER_IN_USERS,a.data.data.users[0]),(t.resetPassword||t.new_email)&&e.commit(Le.MUTATIONS.UPDATE_IS_SUCCESS,!0),(t.activate||t.new_email)&&e.commit(Le.MUTATIONS.UPDATE_USER,a.data.data.users[0])):me(e,null)}).catch(a=>me(e,a)).finally(()=>e.commit(Le.MUTATIONS.UPDATE_USERS_LOADING,!1))},[Le.ACTIONS.DELETE_USER_ACCOUNT](e,t){iA(e,{username:t.username,fromAdmin:!0})}},io=e=>{localStorage.removeItem("authToken"),e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ba.MUTATIONS.EMPTY_USER_STATS),e.commit(K.MUTATIONS.CLEAR_AUTH_USER_TOKEN),e.commit(Le.MUTATIONS.UPDATE_USERS,[]),e.commit(Ae.MUTATIONS.EMPTY_WORKOUTS),e.commit(Ae.MUTATIONS.EMPTY_WORKOUT),Rt.push("/login")},JNe={[K.ACTIONS.CHECK_AUTH_USER](e){window.localStorage.authToken&&!e.getters[K.GETTERS.IS_AUTHENTICATED]&&(e.commit(K.MUTATIONS.UPDATE_AUTH_TOKEN,window.localStorage.authToken),e.dispatch(K.ACTIONS.GET_USER_PROFILE,!0)),!window.localStorage.authToken&&e.getters[K.GETTERS.IS_AUTHENTICATED]&&io(e)},[K.ACTIONS.CONFIRM_ACCOUNT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Pa.post("auth/account/confirm",{token:t.token}).then(n=>{if(n.data.status==="success"){const a=n.data.auth_token;window.localStorage.setItem("authToken",a),e.commit(K.MUTATIONS.UPDATE_AUTH_TOKEN,a),e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>Rt.push("/"))}else me(e,null)}).catch(n=>{me(e,n)})},[K.ACTIONS.CONFIRM_EMAIL](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!1),Pa.post("/auth/email/update",{token:t.token}).then(n=>{n.data.status==="success"?(e.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!0),t.refreshUser&&e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>Rt.push("/profile/edit/account")),Rt.push("/profile/edit/account")):me(e,null)}).catch(n=>{me(e,n)})},[K.ACTIONS.GET_USER_PROFILE](e,t=!1){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("auth/profile").then(n=>{if(n.data.status==="success"){const a=e.getters[K.GETTERS.IS_PROFILE_NOT_LOADED];e.commit(K.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),n.data.data.accepted_privacy_policy||e.dispatch(H.ACTIONS.GET_APPLICATION_PRIVACY_POLICY),(a||t)&&(n.data.data.language&&e.dispatch(H.ACTIONS.UPDATE_APPLICATION_LANGUAGE,n.data.data.language),e.commit(H.MUTATIONS.UPDATE_DARK_MODE,n.data.data.use_dark_mode)),e.dispatch(Mt.ACTIONS.GET_SPORTS)}else me(e,null),io(e)}).catch(n=>{n.message!=="canceled"&&(me(e,n),io(e))})},[K.ACTIONS.LOGIN_OR_REGISTER](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS,!1),Pa.post(`/auth/${t.actionType}`,t.formData).then(n=>{if(n.data.status==="success")if(t.actionType==="login"){const a=n.data.auth_token;window.localStorage.setItem("authToken",a),e.commit(K.MUTATIONS.UPDATE_AUTH_TOKEN,a),e.dispatch(K.ACTIONS.GET_USER_PROFILE,!0).then(()=>Rt.push(typeof t.redirectUrl=="string"?t.redirectUrl:"/"))}else Rt.push("/login").then(()=>e.commit(K.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS,!0));else me(e,null)}).catch(n=>me(e,n))},[K.ACTIONS.LOGOUT](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.post("auth/logout").then(t=>{t.data.status==="success"?io(e):me(e,null)}).catch(t=>me(e,t))},[K.ACTIONS.UPDATE_USER_PROFILE](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.post("auth/profile/edit",t).then(n=>{n.data.status==="success"?(e.commit(K.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),Rt.push("/profile")):me(e,null)}).catch(n=>me(e,n)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.UPDATE_USER_ACCOUNT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),e.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!1),je.patch("auth/profile/edit/account",t).then(n=>{n.data.status==="success"?(e.commit(K.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),e.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!0)):me(e,null)}).catch(n=>me(e,n)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.UPDATE_USER_PREFERENCES](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.post("auth/profile/edit/preferences",t).then(n=>{n.data.status==="success"?(e.commit(K.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),e.commit(H.MUTATIONS.UPDATE_DARK_MODE,n.data.data.use_dark_mode),e.dispatch(H.ACTIONS.UPDATE_APPLICATION_LANGUAGE,n.data.data.language).then(()=>Rt.push("/profile/preferences"))):me(e,null)}).catch(n=>me(e,n)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.RESET_USER_SPORT_PREFERENCES](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.delete(`auth/profile/reset/sports/${t}`).then(n=>{n.status===204?e.dispatch(Mt.ACTIONS.GET_SPORTS):me(e,null)}).catch(n=>{me(e,n),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1)})},[K.ACTIONS.UPDATE_USER_SPORT_PREFERENCES](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.post("auth/profile/edit/sports",t).then(n=>{n.data.status==="success"?e.dispatch(Mt.ACTIONS.GET_SPORTS):me(e,null)}).catch(n=>{me(e,n),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1)})},[K.ACTIONS.UPDATE_USER_PICTURE](e,t){if(e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),!t.picture)throw new Error("No file part");const n=new FormData;n.append("file",t.picture),je.post("auth/picture",n,{headers:{"content-type":"multipart/form-data"}}).then(a=>{a.data.status==="success"?e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>Rt.push("/profile")):me(e,null)}).catch(a=>me(e,a)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.DELETE_ACCOUNT](e,t){iA(e,t)},[K.ACTIONS.DELETE_PICTURE](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.delete("auth/picture").then(t=>{t.status===204?e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>Rt.push("/profile")):me(e,null)}).catch(t=>me(e,t)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.SEND_PASSWORD_RESET_REQUEST](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Pa.post("auth/password/reset-request",t).then(n=>{n.data.status==="success"?Rt.push("/password-reset/sent"):me(e,null)}).catch(n=>me(e,n))},[K.ACTIONS.RESEND_ACCOUNT_CONFIRMATION_EMAIL](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Pa.post("auth/account/resend-confirmation",t).then(n=>{n.data.status==="success"?Rt.push("/account-confirmation/email-sent"):me(e,null)}).catch(n=>me(e,n))},[K.ACTIONS.RESET_USER_PASSWORD](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Pa.post("auth/password/update",t).then(n=>{n.data.status==="success"?Rt.push("/password-reset/password-updated"):me(e,null)}).catch(n=>me(e,n))},[K.ACTIONS.ACCEPT_PRIVACY_POLICY](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.post("auth/account/privacy-policy",{accepted_policy:t}).then(n=>{n.data.status==="success"?e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>Rt.push("/profile")):me(e,null)}).catch(n=>me(e,n))},[K.ACTIONS.REQUEST_DATA_EXPORT](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.post("auth/account/export/request").then(t=>{t.data.status==="success"?e.commit(K.MUTATIONS.SET_EXPORT_REQUEST,t.data.request):me(e,null)}).catch(t=>me(e,t))},[K.ACTIONS.GET_REQUEST_DATA_EXPORT](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("auth/account/export").then(t=>{t.data.status==="success"?e.commit(K.MUTATIONS.SET_EXPORT_REQUEST,t.data.request):me(e,null)}).catch(t=>me(e,t))}},eve={[K.GETTERS.AUTH_TOKEN]:e=>e.authToken,[K.GETTERS.AUTH_USER_PROFILE]:e=>e.authUserProfile,[K.GETTERS.EXPORT_REQUEST]:e=>e.exportRequest,[K.GETTERS.IS_AUTHENTICATED]:e=>e.authToken!==null,[K.GETTERS.IS_ADMIN]:e=>e.authUserProfile&&e.authUserProfile.admin,[K.GETTERS.IS_REGISTRATION_SUCCESS]:e=>e.isRegistrationSuccess,[K.GETTERS.IS_SUCCESS]:e=>e.isSuccess,[K.GETTERS.USER_LOADING]:e=>e.loading,[K.GETTERS.IS_PROFILE_NOT_LOADED]:e=>e.authUserProfile.username===void 0},tve={[K.MUTATIONS.CLEAR_AUTH_USER_TOKEN](e){e.authToken=null,e.authUserProfile={}},[K.MUTATIONS.UPDATE_AUTH_TOKEN](e,t){e.authToken=t},[K.MUTATIONS.UPDATE_AUTH_USER_PROFILE](e,t){e.authUserProfile=t},[K.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS](e,t){e.isRegistrationSuccess=t},[K.MUTATIONS.UPDATE_IS_SUCCESS](e,t){e.isSuccess=t},[K.MUTATIONS.UPDATE_USER_LOADING](e,t){e.loading=t},[K.MUTATIONS.SET_EXPORT_REQUEST](e,t){e.exportRequest=t}},nve={authToken:null,authUserProfile:{},isSuccess:!1,isRegistrationSuccess:!1,loading:!1,exportRequest:null},ave={state:nve,actions:JNe,getters:eve,mutations:tve},zm=(e,t)=>{e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get(t).then(n=>{n.data.status==="success"?e.commit(Ye.MUTATIONS.SET_CLIENT,n.data.data.client):me(e,null)}).catch(n=>me(e,n))},rve={[Ye.ACTIONS.AUTHORIZE_CLIENT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES);const n=new FormData;n.set("client_id",t.client_id),n.set("response_type",t.response_type),n.set("scope",t.scope),n.set("confirm","true"),t.state&&n.set("state",t.state),t.code_challenge&&n.set("code_challenge",t.code_challenge),t.code_challenge_method&&n.set("code_challenge_method",t.code_challenge_method),je.post("oauth/authorize",n,{headers:{"Content-Type":"multipart/form-data"}}).then(a=>{a.status==200&&a.data.redirect_url?window.location.href=a.data.redirect_url:me(e,null)}).catch(a=>me(e,a))},[Ye.ACTIONS.CREATE_CLIENT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.post("oauth/apps",t).then(n=>{n.data.status==="created"?(e.commit(Ye.MUTATIONS.SET_CLIENT,n.data.data.client),Rt.push(`/profile/apps/${n.data.data.client.id}/created`)):me(e,null)}).catch(n=>me(e,n))},[Ye.ACTIONS.DELETE_CLIENT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.delete(`oauth/apps/${t}`).then(n=>{n.status===204?e.dispatch(Ye.ACTIONS.GET_CLIENTS).then(()=>Rt.push("/profile/apps")):me(e,null)}).catch(n=>me(e,n))},[Ye.ACTIONS.GET_CLIENT_BY_CLIENT_ID](e,t){zm(e,`oauth/apps/${t}`)},[Ye.ACTIONS.GET_CLIENT_BY_ID](e,t){zm(e,`oauth/apps/${t}/by_id`)},[Ye.ACTIONS.GET_CLIENTS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("oauth/apps",{params:t}).then(n=>{n.data.status==="success"?(e.commit(Ye.MUTATIONS.SET_CLIENTS,n.data.data.clients),e.commit(Ye.MUTATIONS.SET_CLIENTS_PAGINATION,n.data.pagination)):me(e,null)}).catch(n=>me(e,n))},[Ye.ACTIONS.REVOKE_ALL_TOKENS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ye.MUTATIONS.SET_REVOCATION_SUCCESSFUL,!1),je.post(`oauth/apps/${t}/revoke`).then(n=>{n.data.status==="success"?e.commit(Ye.MUTATIONS.SET_REVOCATION_SUCCESSFUL,!0):me(e,null)}).catch(n=>me(e,n))}},sve={[Ye.GETTERS.CLIENT]:e=>e.client,[Ye.GETTERS.CLIENTS]:e=>e.clients,[Ye.GETTERS.CLIENTS_PAGINATION]:e=>e.pagination,[Ye.GETTERS.REVOCATION_SUCCESSFUL]:e=>e.revocationSuccessful},ive={[Ye.MUTATIONS.SET_CLIENT](e,t){e.client=t},[Ye.MUTATIONS.EMPTY_CLIENT](e){e.client={}},[Ye.MUTATIONS.SET_CLIENTS](e,t){e.clients=t},[Ye.MUTATIONS.SET_CLIENTS_PAGINATION](e,t){e.pagination=t},[Ye.MUTATIONS.SET_REVOCATION_SUCCESSFUL](e,t){e.revocationSuccessful=t}},ove={client:{},clients:[],pagination:{},revocationSuccessful:!1},uve={state:ove,actions:rve,getters:sve,mutations:ive},{locale:lve}=_r.global,cve={[H.ACTIONS.GET_APPLICATION_CONFIG](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(H.MUTATIONS.UPDATE_APPLICATION_LOADING,!0),je.get("config").then(t=>{t.data.status==="success"?e.commit(H.MUTATIONS.UPDATE_APPLICATION_CONFIG,t.data.data):me(e,null)}).catch(t=>me(e,t)).finally(()=>e.commit(H.MUTATIONS.UPDATE_APPLICATION_LOADING,!1))},[H.ACTIONS.GET_APPLICATION_STATS](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("stats/all").then(t=>{t.data.status==="success"?e.commit(H.MUTATIONS.UPDATE_APPLICATION_STATS,t.data.data):me(e,null)}).catch(t=>me(e,t))},[H.ACTIONS.GET_APPLICATION_PRIVACY_POLICY](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("config").then(t=>{t.data.status==="success"?e.commit(H.MUTATIONS.UPDATE_APPLICATION_PRIVACY_POLICY,t.data.data):me(e,null)}).catch(t=>me(e,t))},[H.ACTIONS.UPDATE_APPLICATION_CONFIG](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.patch("config",t).then(n=>{n.data.status==="success"?(e.commit(H.MUTATIONS.UPDATE_APPLICATION_CONFIG,n.data.data),Rt.push("/admin/application")):me(e,null)}).catch(n=>me(e,n))},[H.ACTIONS.UPDATE_APPLICATION_LANGUAGE](e,t){var n;(n=document.querySelector("html"))==null||n.setAttribute("lang",t),e.commit(H.MUTATIONS.UPDATE_LANG,t),lve.value=t}},dve={[H.GETTERS.APP_CONFIG]:e=>e.application.config,[H.GETTERS.APP_LOADING]:e=>e.appLoading,[H.GETTERS.APP_STATS]:e=>e.application.statistics,[H.GETTERS.DARK_MODE]:e=>e.darkMode,[H.GETTERS.ERROR_MESSAGES]:e=>e.errorMessages,[H.GETTERS.LANGUAGE]:e=>e.language,[H.GETTERS.LOCALE]:e=>e.locale},fve={[H.MUTATIONS.EMPTY_ERROR_MESSAGES](e){e.errorMessages=null},[H.MUTATIONS.SET_ERROR_MESSAGES](e,t){e.errorMessages=t},[H.MUTATIONS.UPDATE_APPLICATION_CONFIG](e,t){e.application.config=t},[H.MUTATIONS.UPDATE_APPLICATION_LOADING](e,t){e.appLoading=t},[H.MUTATIONS.UPDATE_APPLICATION_PRIVACY_POLICY](e,t){e.application.config.privacy_policy=t.privacy_policy,e.application.config.privacy_policy_date=t.privacy_policy_date},[H.MUTATIONS.UPDATE_APPLICATION_STATS](e,t){e.application.statistics=t},[H.MUTATIONS.UPDATE_LANG](e,t){e.language=t,e.locale=Ni[t]},[H.MUTATIONS.UPDATE_DARK_MODE](e,t){e.darkMode=t}},Eve={root:!0,language:"en",locale:nl,errorMessages:null,application:{statistics:{sports:0,uploads_dir_size:0,users:0,workouts:0}},appLoading:!1,darkMode:null},pve={[Mt.ACTIONS.GET_SPORTS](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("sports").then(t=>{t.data.status==="success"?(e.commit(Mt.MUTATIONS.SET_SPORTS,t.data.data.sports),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1)):me(e,null)}).catch(t=>me(e,t))},[Mt.ACTIONS.UPDATE_SPORTS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.patch(`sports/${t.id}`,{is_active:t.isActive}).then(n=>{n.data.status==="success"?e.dispatch(Mt.ACTIONS.GET_SPORTS):me(e,null)}).catch(n=>me(e,n))}},mve={[Mt.GETTERS.SPORTS]:e=>e.sports},hve={[Mt.MUTATIONS.SET_SPORTS](e,t){e.sports=t}},_ve={sports:[]},Tve={state:_ve,actions:pve,getters:mve,mutations:hve},gve={[Ba.ACTIONS.GET_USER_STATS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get(`stats/${t.username}/${t.filterType}`,{params:t.params}).then(n=>{n.data.status==="success"?e.commit(Ba.MUTATIONS.UPDATE_USER_STATS,n.data.data.statistics):me(e,null)}).catch(n=>me(e,n))}},Ave={[Ba.GETTERS.USER_STATS]:e=>e.statistics},Sve={[Ba.MUTATIONS.UPDATE_USER_STATS](e,t){e.statistics=t},[Ba.MUTATIONS.EMPTY_USER_STATS](e){e.statistics={}}},Ove={statistics:{}},Ive={state:Ove,actions:gve,getters:Ave,mutations:Sve},Rve={[Le.GETTERS.USER]:e=>e.user,[Le.GETTERS.USERS]:e=>e.users,[Le.GETTERS.USERS_IS_SUCCESS]:e=>e.isSuccess,[Le.GETTERS.USERS_LOADING]:e=>e.loading,[Le.GETTERS.USERS_PAGINATION]:e=>e.pagination},bve={[Le.MUTATIONS.UPDATE_USER](e,t){e.user=t},[Le.MUTATIONS.UPDATE_USER_IN_USERS](e,t){e.users=e.users.map(n=>n.username===t.username?t:n)},[Le.MUTATIONS.UPDATE_USERS](e,t){e.users=t},[Le.MUTATIONS.UPDATE_USERS_LOADING](e,t){e.loading=t},[Le.MUTATIONS.UPDATE_USERS_PAGINATION](e,t){e.pagination=t},[Le.MUTATIONS.UPDATE_IS_SUCCESS](e,t){e.isSuccess=t}},Nve={user:{},users:[],loading:!1,isSuccess:!1,pagination:{}},vve={state:Nve,actions:QNe,getters:Rve,mutations:bve},oo=(e,t,n)=>{e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("workouts",{params:t}).then(a=>{a.data.status==="success"?(e.commit(Ae.MUTATIONS[n],a.data.data.workouts),n===sr.SET_USER_WORKOUTS&&e.commit(Ae.MUTATIONS.SET_WORKOUTS_PAGINATION,a.data.pagination)):me(e,null)}).catch(a=>me(e,a))},Cve={[Ae.ACTIONS.GET_CALENDAR_WORKOUTS](e,t){e.commit(Ae.MUTATIONS.EMPTY_CALENDAR_WORKOUTS),oo(e,t,sr.SET_CALENDAR_WORKOUTS)},[Ae.ACTIONS.GET_USER_WORKOUTS](e,t){oo(e,t,sr.SET_USER_WORKOUTS)},[Ae.ACTIONS.GET_TIMELINE_WORKOUTS](e,t){oo(e,t,sr.SET_TIMELINE_WORKOUTS)},[Ae.ACTIONS.GET_MORE_TIMELINE_WORKOUTS](e,t){oo(e,t,sr.ADD_TIMELINE_WORKOUTS)},[Ae.ACTIONS.GET_WORKOUT_DATA](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0);const n=t.segmentId?`/segment/${t.segmentId}`:"";je.get(`workouts/${t.workoutId}`).then(a=>{const r=a.data.data.workouts[0];if(a.data.status==="success"){if(t.segmentId&&(r.segments.length===0||!r.segments[+t.segmentId-1]))throw new Error("WORKOUT_NOT_FOUND");e.commit(Ae.MUTATIONS.SET_WORKOUT,a.data.data.workouts[0]),a.data.data.workouts[0].with_gpx&&(je.get(`workouts/${t.workoutId}/chart_data${n}`).then(s=>{s.data.status==="success"&&e.commit(Ae.MUTATIONS.SET_WORKOUT_CHART_DATA,s.data.data.chart_data)}),je.get(`workouts/${t.workoutId}/gpx${n}`).then(s=>{s.data.status==="success"&&e.commit(Ae.MUTATIONS.SET_WORKOUT_GPX,s.data.data.gpx)}))}else e.commit(Ae.MUTATIONS.EMPTY_WORKOUT),me(e,null)}).catch(a=>{e.commit(Ae.MUTATIONS.EMPTY_WORKOUT),me(e,a)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Ae.ACTIONS.DELETE_WORKOUT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0),je.delete(`workouts/${t.workoutId}`).then(()=>{e.commit(Ae.MUTATIONS.EMPTY_WORKOUT),e.dispatch(K.ACTIONS.GET_USER_PROFILE),Rt.push("/")}).catch(n=>{me(e,n)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Ae.ACTIONS.EDIT_WORKOUT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0),je.patch(`workouts/${t.workoutId}`,t.data).then(()=>{e.dispatch(K.ACTIONS.GET_USER_PROFILE),e.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,{workoutId:t.workoutId}).then(()=>{Rt.push({name:"Workout",params:{workoutId:t.workoutId}})})}).catch(n=>{me(e,n)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Ae.ACTIONS.ADD_WORKOUT](e,t){if(e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0),!t.file)throw new Error("No file part");const n=t.notes.replace(/"/g,'\\"'),a=new FormData;a.append("file",t.file),a.append("data",`{"sport_id": ${t.sport_id}, "notes": "${n}"}`),je.post("workouts",a,{headers:{"content-type":"multipart/form-data"}}).then(r=>{if(r.data.status==="created"){e.dispatch(K.ACTIONS.GET_USER_PROFILE);const s=r.data.data.workouts[0];Rt.push(r.data.data.workouts.length===1?`/workouts/${s.id}`:"/")}}).catch(r=>{me(e,r)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Ae.ACTIONS.ADD_WORKOUT_WITHOUT_GPX](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0),je.post("workouts/no_gpx",t).then(n=>{if(n.data.status==="created"){e.dispatch(K.ACTIONS.GET_USER_PROFILE);const a=n.data.data.workouts[0];Rt.push(`/workouts/${a.id}`)}}).catch(n=>{me(e,n)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))}},yve={[Ae.GETTERS.CALENDAR_WORKOUTS]:e=>e.calendar_workouts,[Ae.GETTERS.TIMELINE_WORKOUTS]:e=>e.timeline_workouts,[Ae.GETTERS.USER_WORKOUTS]:e=>e.user_workouts,[Ae.GETTERS.WORKOUT_DATA]:e=>e.workoutData,[Ae.GETTERS.WORKOUTS_PAGINATION]:e=>e.pagination},Dve={[Ae.MUTATIONS.ADD_TIMELINE_WORKOUTS](e,t){e.timeline_workouts=e.timeline_workouts.concat(t)},[Ae.MUTATIONS.SET_CALENDAR_WORKOUTS](e,t){e.calendar_workouts=t},[Ae.MUTATIONS.SET_TIMELINE_WORKOUTS](e,t){e.timeline_workouts=t},[Ae.MUTATIONS.SET_USER_WORKOUTS](e,t){e.user_workouts=t},[Ae.MUTATIONS.SET_WORKOUTS_PAGINATION](e,t){e.pagination=t},[Ae.MUTATIONS.SET_WORKOUT](e,t){e.workoutData.workout=t},[Ae.MUTATIONS.SET_WORKOUT_CHART_DATA](e,t){e.workoutData.chartData=t},[Ae.MUTATIONS.SET_WORKOUT_GPX](e,t){e.workoutData.gpx=t},[Ae.MUTATIONS.SET_WORKOUT_LOADING](e,t){e.workoutData.loading=t},[Ae.MUTATIONS.EMPTY_CALENDAR_WORKOUTS](e){e.calendar_workouts=[]},[Ae.MUTATIONS.EMPTY_WORKOUTS](e){e.calendar_workouts=[],e.user_workouts=[],e.timeline_workouts=[]},[Ae.MUTATIONS.EMPTY_WORKOUT](e){e.workoutData={gpx:"",loading:!1,workout:{},chartData:[]}}},Pve={calendar_workouts:[],timeline_workouts:[],pagination:{},user_workouts:[],workoutData:{gpx:"",loading:!1,workout:{},chartData:[]}},Lve={state:Pve,actions:Cve,getters:yve,mutations:Dve},wve={authUserModule:ave,oAuthModule:uve,sportsModule:Tve,statsModule:Ive,usersModule:vve,workoutsModule:Lve},kve={state:Eve,actions:cve,getters:dve,mutations:fve,modules:wve},Bs=vv(kve),uE=yt.create({baseURL:Si()});uE.interceptors.request.use(e=>{const t=new AbortController;e.signal=t.signal;const n=is(e);Gs.set(n,t);const a=Bs.getters[K.GETTERS.AUTH_TOKEN];if(a){const r=`Bearer ${a}`;e.headers&&e.headers.Authorization!==r&&(e.headers.Authorization=`Bearer ${a}`)}return e},e=>Promise.reject(e));uE.interceptors.response.use(e=>(is(e.config),e),e=>(e.message!=="canceled"&&e.response&&is(e.response.config),Promise.reject(e)));const je=uE,wd=(e,t)=>e.push.apply(e,t),os=e=>e.sort((t,n)=>t.i-n.i||t.j-n.j),Wm=e=>{const t={};let n=1;return e.forEach(a=>{t[a]=n,n+=1}),t};var $ve={4:[[1,2],[2,3]],5:[[1,3],[2,3],[2,4]],6:[[1,2],[2,4],[4,5]],7:[[1,3],[2,3],[4,5],[4,6]],8:[[2,4],[4,6]]};const Gm=2050,Bm=1e3,Uve=$ve,Mve=10,xve=1e4,oA=10,uA=50,lA=20,cA=/^[A-Z\xbf-\xdf][^A-Z\xbf-\xdf]+$/,Fve=/^[^A-Z\xbf-\xdf]+[A-Z\xbf-\xdf]$/,zve=/^[A-Z\xbf-\xdf]+$/,dA=/^[^a-z\xdf-\xff]+$/,Wve=/^[a-z\xdf-\xff]+$/,Gve=/^[^A-Z\xbf-\xdf]+$/,Bve=/[a-z\xdf-\xff]/,Hve=/[A-Z\xbf-\xdf]/,Vve=/[^A-Za-z\xbf-\xdf]/gi,jve=/^\d+$/,lE=new Date().getFullYear(),Kve={recentYear:/19\d\d|200\d|201\d|202\d/g},fA=[" ",",",";",":","|","/","\\","_",".","-"],Yve=fA.length;class qve{match({password:t}){const n=[...this.getMatchesWithoutSeparator(t),...this.getMatchesWithSeparator(t)],a=this.filterNoise(n);return os(a)}getMatchesWithSeparator(t){const n=[],a=/^(\d{1,4})([\s/\\_.-])(\d{1,2})\2(\d{1,4})$/;for(let r=0;r<=Math.abs(t.length-6);r+=1)for(let s=r+5;s<=r+9&&!(s>=t.length);s+=1){const i=t.slice(r,+s+1||9e9),o=a.exec(i);if(o!=null){const u=this.mapIntegersToDayMonthYear([parseInt(o[1],10),parseInt(o[3],10),parseInt(o[4],10)]);u!=null&&n.push({pattern:"date",token:i,i:r,j:s,separator:o[2],year:u.year,month:u.month,day:u.day})}}return n}getMatchesWithoutSeparator(t){const n=[],a=/^\d{4,8}$/,r=s=>Math.abs(s.year-lE);for(let s=0;s<=Math.abs(t.length-4);s+=1)for(let i=s+3;i<=s+7&&!(i>=t.length);i+=1){const o=t.slice(s,+i+1||9e9);if(a.exec(o)){const u=[],c=o.length;if(Uve[c].forEach(([f,d])=>{const p=this.mapIntegersToDayMonthYear([parseInt(o.slice(0,f),10),parseInt(o.slice(f,d),10),parseInt(o.slice(d),10)]);p!=null&&u.push(p)}),u.length>0){let f=u[0],d=r(u[0]);u.slice(1).forEach(p=>{const m=r(p);m{let a=!1;const r=t.length;for(let s=0;s=n.j){a=!0;break}}return!a})}mapIntegersToDayMonthYear(t){if(t[1]>31||t[1]<=0)return null;let n=0,a=0,r=0;for(let s=0,i=t.length;s99&&oGm)return null;o>31&&(a+=1),o>12&&(n+=1),o<=0&&(r+=1)}return a>=2||n===3||r>=2?null:this.getDayMonth(t)}getDayMonth(t){const n=[[t[2],t.slice(0,2)],[t[0],t.slice(1,3)]],a=n.length;for(let r=0;r=1&&s<=31&&i>=1&&i<=12)return{day:s,month:i}}return null}twoToFourDigitYear(t){return t>99?t:t>50?t+1900:t+2e3}}const oa=new Uint32Array(65536),Xve=(e,t)=>{const n=e.length,a=t.length,r=1<{const n=t.length,a=e.length,r=[],s=[],i=Math.ceil(n/32),o=Math.ceil(a/32);for(let m=0;m>>N&1,C=r[N/32|0]>>>N&1,P=S|m,M=((S|C)&I)+I^I|S|C;let L=m|~(M|I),W=I&M;L>>>31^O&&(s[N/32|0]^=1<>>31^C&&(r[N/32|0]^=1<>>m&1,R=r[m/32|0]>>>m&1,N=I|c,S=((I|R)&l)+l^l|I|R;let O=c|~(S|l),C=l&S;p+=O>>>a-1&1,p-=C>>>a-1&1,O>>>31^b&&(s[m/32|0]^=1<>>31^R&&(r[m/32|0]^=1<{if(e.length{const a=e.length<=t.length,r=e.length<=n;return a||r?Math.ceil(e.length/4):n},e2e=(e,t,n)=>{let a=0;const r=Object.keys(t).find(s=>{const i=Jve(e,s,n);if(Math.abs(e.length-s.length)>i)return!1;const o=Qve(e,s),u=o<=i;return u&&(a=o),u});return r?{levenshteinDistance:a,levenshteinDistanceEntry:r}:{}};var Hm={a:["4","@"],b:["8"],c:["(","{","[","<"],d:["6","|)"],e:["3"],f:["#"],g:["6","9","&"],h:["#","|-|"],i:["1","!","|"],k:["<","|<"],l:["!","1","|","7"],m:["^^","nn","2n","/\\\\/\\\\"],n:["//"],o:["0","()"],q:["9"],u:["|_|"],s:["$","5"],t:["+","7"],v:["<",">","/"],w:["^/","uu","vv","2u","2v","\\\\/\\\\/"],x:["%","><"],z:["2"]},lc={warnings:{straightRow:"straightRow",keyPattern:"keyPattern",simpleRepeat:"simpleRepeat",extendedRepeat:"extendedRepeat",sequences:"sequences",recentYears:"recentYears",dates:"dates",topTen:"topTen",topHundred:"topHundred",common:"common",similarToCommon:"similarToCommon",wordByItself:"wordByItself",namesByThemselves:"namesByThemselves",commonNames:"commonNames",userInputs:"userInputs",pwned:"pwned"},suggestions:{l33t:"l33t",reverseWords:"reverseWords",allUppercase:"allUppercase",capitalization:"capitalization",dates:"dates",recentYears:"recentYears",associatedYears:"associatedYears",sequences:"sequences",repeated:"repeated",longerKeyboardPattern:"longerKeyboardPattern",anotherWord:"anotherWord",useWords:"useWords",noNeed:"noNeed",pwned:"pwned"},timeEstimation:{ltSecond:"ltSecond",second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",day:"day",days:"days",month:"month",months:"months",year:"year",years:"years",centuries:"centuries"}};class fi{constructor(t=[]){this.parents=t,this.children=new Map}addSub(t,...n){const a=t.charAt(0);this.children.has(a)||this.children.set(a,new fi([...this.parents,a]));let r=this.children.get(a);for(let s=1;s(Object.entries(e).forEach(([n,a])=>{a.forEach(r=>{t.addSub(r,n)})}),t);class t2e{constructor(){this.matchers={},this.l33tTable=Hm,this.trieNodeRoot=Vm(Hm,new fi),this.dictionary={userInputs:[]},this.rankedDictionaries={},this.rankedDictionariesMaxWordSize={},this.translations=lc,this.graphs={},this.useLevenshteinDistance=!1,this.levenshteinThreshold=2,this.l33tMaxSubstitutions=100,this.maxLength=256,this.setRankedDictionaries()}setOptions(t={}){t.l33tTable&&(this.l33tTable=t.l33tTable,this.trieNodeRoot=Vm(t.l33tTable,new fi)),t.dictionary&&(this.dictionary=t.dictionary,this.setRankedDictionaries()),t.translations&&this.setTranslations(t.translations),t.graphs&&(this.graphs=t.graphs),t.useLevenshteinDistance!==void 0&&(this.useLevenshteinDistance=t.useLevenshteinDistance),t.levenshteinThreshold!==void 0&&(this.levenshteinThreshold=t.levenshteinThreshold),t.l33tMaxSubstitutions!==void 0&&(this.l33tMaxSubstitutions=t.l33tMaxSubstitutions),t.maxLength!==void 0&&(this.maxLength=t.maxLength)}setTranslations(t){if(this.checkCustomTranslations(t))this.translations=t;else throw new Error("Invalid translations object fallback to keys")}checkCustomTranslations(t){let n=!0;return Object.keys(lc).forEach(a=>{if(a in t){const r=a;Object.keys(lc[r]).forEach(s=>{s in t[r]||(n=!1)})}else n=!1}),n}setRankedDictionaries(){const t={},n={};Object.keys(this.dictionary).forEach(a=>{t[a]=Wm(this.dictionary[a]),n[a]=this.getRankedDictionariesMaxWordSize(this.dictionary[a])}),this.rankedDictionaries=t,this.rankedDictionariesMaxWordSize=n}getRankedDictionariesMaxWordSize(t){const n=t.map(a=>typeof a!="string"?a.toString().length:a.length);return n.length===0?0:n.reduce((a,r)=>Math.max(a,r),-1/0)}buildSanitizedRankedDictionary(t){const n=[];return t.forEach(a=>{const r=typeof a;(r==="string"||r==="number"||r==="boolean")&&n.push(a.toString().toLowerCase())}),Wm(n)}extendUserInputsDictionary(t){this.dictionary.userInputs||(this.dictionary.userInputs=[]);const n=[...this.dictionary.userInputs,...t];this.rankedDictionaries.userInputs=this.buildSanitizedRankedDictionary(n),this.rankedDictionariesMaxWordSize.userInputs=this.getRankedDictionariesMaxWordSize(n)}addMatcher(t,n){this.matchers[t]?console.info(`Matcher ${t} already exists`):this.matchers[t]=n}}const Ne=new t2e;class n2e{constructor(t){this.defaultMatch=t}match({password:t}){const n=t.split("").reverse().join("");return this.defaultMatch({password:n}).map(a=>({...a,token:a.token.split("").reverse().join(""),reversed:!0,i:t.length-1-a.j,j:t.length-1-a.i}))}}class a2e{constructor({substr:t,limit:n,trieRoot:a}){this.buffer=[],this.finalPasswords=[],this.substr=t,this.limit=n,this.trieRoot=a}getAllPossibleSubsAtIndex(t){const n=[];let a=this.trieRoot;for(let r=t;r=this.limit)return;if(a===this.substr.length){t===n&&this.finalPasswords.push({password:this.buffer.join(""),changes:s});return}const u=[...this.getAllPossibleSubsAtIndex(a)];let c=!1;for(let l=a+u.length-1;l>=a;l-=1){const f=u[l-a];if(f.isTerminal()){if(i===f.parents.join("")&&o>=3)continue;c=!0;const d=f.subs;for(const p of d){this.buffer.push(p);const m=s.concat({i:r,letter:p,substitution:f.parents.join("")});if(this.helper({onlyFullSub:t,isFullSub:n,index:l+1,subIndex:r+p.length,changes:m,lastSubLetter:f.parents.join(""),consecutiveSubCount:i===f.parents.join("")?o+1:1}),this.buffer.pop(),this.finalPasswords.length>=this.limit)return}}}if(!t||!c){const l=this.substr.charAt(a);this.buffer.push(l),this.helper({onlyFullSub:t,isFullSub:n&&!c,index:a+1,subIndex:r+1,changes:s,lastSubLetter:i,consecutiveSubCount:o}),this.buffer.pop()}}getAll(){return this.helper({onlyFullSub:!0,isFullSub:!0,index:0,subIndex:0,changes:[],lastSubLetter:void 0,consecutiveSubCount:0}),this.helper({onlyFullSub:!1,isFullSub:!0,index:0,subIndex:0,changes:[],lastSubLetter:void 0,consecutiveSubCount:0}),this.finalPasswords}}const r2e=(e,t,n)=>new a2e({substr:e,limit:t,trieRoot:n}).getAll(),s2e=(e,t,n)=>{const r=e.changes.filter(c=>c.ic-l.letter.length+l.substitution.length,t),s=e.changes.filter(c=>c.i>=t&&c.i<=n),i=s.reduce((c,l)=>c-l.letter.length+l.substitution.length,n-t+r),o=[],u=[];return s.forEach(c=>{o.findIndex(f=>f.letter===c.letter&&f.substitution===c.substitution)<0&&(o.push({letter:c.letter,substitution:c.substitution}),u.push(`${c.substitution} -> ${c.letter}`))}),{i:r,j:i,subs:o,subDisplay:u.join(", ")}};class i2e{constructor(t){this.defaultMatch=t}isAlreadyIncluded(t,n){return t.some(a=>Object.entries(a).every(([r,s])=>r==="subs"||s===n[r]))}match({password:t}){const n=[],a=r2e(t,Ne.l33tMaxSubstitutions,Ne.trieNodeRoot);let r=!1,s=!0;return a.forEach(i=>{if(r)return;const o=this.defaultMatch({password:i.password,useLevenshtein:s});s=!1,o.forEach(u=>{r||(r=u.i===0&&u.j===t.length-1);const c=s2e(i,u.i,u.j),l=t.slice(c.i,+c.j+1||9e9),f={...u,l33t:!0,token:l,...c},d=this.isAlreadyIncluded(n,f);l.toLowerCase()!==u.matchedWord&&!d&&n.push(f)})}),n.filter(i=>i.token.length>1)}}class o2e{constructor(){this.l33t=new i2e(this.defaultMatch),this.reverse=new n2e(this.defaultMatch)}match({password:t}){const n=[...this.defaultMatch({password:t}),...this.reverse.match({password:t}),...this.l33t.match({password:t})];return os(n)}defaultMatch({password:t,useLevenshtein:n=!0}){const a=[],r=t.length,s=t.toLowerCase();return Object.keys(Ne.rankedDictionaries).forEach(i=>{const o=Ne.rankedDictionaries[i],u=Ne.rankedDictionariesMaxWordSize[i],c=Math.min(u,r);for(let l=0;l{const s=n[r];s.lastIndex=0;let i;for(;i=s.exec(t);)if(i){const o=i[0];a.push({pattern:"regex",token:o,i:i.index,j:i.index+i[0].length-1,regexName:r,regexMatch:i})}}),os(a)}}var Ar={nCk(e,t){let n=e;if(t>n)return 0;if(t===0)return 1;let a=1;for(let r=1;r<=t;r+=1)a*=n,a/=r,n-=1;return a},log10(e){return e===0?0:Math.log(e)/Math.log(10)},log2(e){return Math.log(e)/Math.log(2)},factorial(e){let t=1;for(let n=2;n<=e;n+=1)t*=n;return t}},l2e=({token:e})=>{let t=Mve**e.length;t===Number.POSITIVE_INFINITY&&(t=Number.MAX_VALUE);let n;return e.length===1?n=oA+1:n=uA+1,Math.max(t,n)},c2e=({year:e,separator:t})=>{let a=Math.max(Math.abs(e-lE),lA)*365;return t&&(a*=4),a};const d2e=e=>{const t=e.split(""),n=t.filter(i=>i.match(Hve)).length,a=t.filter(i=>i.match(Bve)).length;let r=0;const s=Math.min(n,a);for(let i=1;i<=s;i+=1)r+=Ar.nCk(n+a,i);return r};var f2e=e=>{const t=e.replace(Vve,"");if(t.match(Gve)||t.toLowerCase()===t)return 1;const n=[cA,Fve,dA],a=n.length;for(let r=0;r{let n=0,a=e.indexOf(t);for(;a>=0;)n+=1,a=e.indexOf(t,a+t.length);return n},E2e=({sub:e,token:t})=>{const n=t.toLowerCase(),a=jm(n,e.substitution),r=jm(n,e.letter);return{subbedCount:a,unsubbedCount:r}};var p2e=({l33t:e,subs:t,token:n})=>{if(!e)return 1;let a=1;return t.forEach(r=>{const{subbedCount:s,unsubbedCount:i}=E2e({sub:r,token:n});if(s===0||i===0)a*=2;else{const o=Math.min(i,s);let u=0;for(let c=1;c<=o;c+=1)u+=Ar.nCk(i+s,c);a*=u}}),a},m2e=({rank:e,reversed:t,l33t:n,subs:a,token:r,dictionaryName:s})=>{const i=e,o=f2e(r),u=p2e({l33t:n,subs:a,token:r}),c=t&&2||1;let l;return s==="diceware"?l=6**5/2:l=i*o*u*c,{baseGuesses:i,uppercaseVariations:o,l33tVariations:u,calculation:l}},h2e=({regexName:e,regexMatch:t,token:n})=>{const a={alphaLower:26,alphaUpper:26,alpha:52,alphanumeric:62,digits:10,symbols:33};if(e in a)return a[e]**n.length;switch(e){case"recentYear":return Math.max(Math.abs(parseInt(t[0],10)-lE),lA)}return 0},_2e=({baseGuesses:e,repeatCount:t})=>e*t,T2e=({token:e,ascending:t})=>{const n=e.charAt(0);let a=0;return["a","A","z","Z","0","1","9"].includes(n)?a=4:n.match(/\d/)?a=10:a=26,t||(a*=2),a*e.length};const g2e=e=>{let t=0;return Object.keys(e).forEach(n=>{const a=e[n];t+=a.filter(r=>!!r).length}),t/=Object.entries(e).length,t},A2e=({token:e,graph:t,turns:n})=>{const a=Object.keys(Ne.graphs[t]).length,r=g2e(Ne.graphs[t]);let s=0;const i=e.length;for(let o=2;o<=i;o+=1){const u=Math.min(n,o-1);for(let c=1;c<=u;c+=1)s+=Ar.nCk(o-1,c-1)*a*r**c}return s};var S2e=({graph:e,token:t,shiftedCount:n,turns:a})=>{let r=A2e({token:t,graph:e,turns:a});if(n){const s=t.length-n;if(n===0||s===0)r*=2;else{let i=0;for(let o=1;o<=Math.min(n,s);o+=1)i+=Ar.nCk(n+s,o);r*=i}}return Math.round(r)},O2e=()=>Yve;const I2e=(e,t)=>{let n=1;return e.token.lengthKm[e]?Km[e](t):Ne.matchers[e]&&"scoring"in Ne.matchers[e]?Ne.matchers[e].scoring(t):0;var b2e=(e,t)=>{const n={};if("guesses"in e&&e.guesses!=null)return e;const a=I2e(e,t),r=R2e(e.pattern,e);let s=0;typeof r=="number"?s=r:e.pattern==="dictionary"&&(s=r.calculation,n.baseGuesses=r.baseGuesses,n.uppercaseVariations=r.uppercaseVariations,n.l33tVariations=r.l33tVariations);const i=Math.max(s,a);return{...e,...n,guesses:i,guessesLog10:Ar.log10(i)}};const pn={password:"",optimal:{},excludeAdditive:!1,separatorRegex:void 0,fillArray(e,t){const n=[];for(let a=0;a1&&(r*=this.optimal.pi[a.i-1][t-1]);let s=Ar.factorial(t)*r;this.excludeAdditive||(s+=xve**(t-1));let i=!1;Object.keys(this.optimal.g[n]).forEach(o=>{const u=this.optimal.g[n][o];parseInt(o,10)<=t&&u<=s&&(i=!0)}),i||(this.optimal.g[n][t]=s,this.optimal.m[n][t]=a,this.optimal.pi[n][t]=r)},bruteforceUpdate(e){let t=this.makeBruteforceMatch(0,e);this.update(t,1);for(let n=1;n<=e;n+=1){t=this.makeBruteforceMatch(n,e);const a=this.optimal.m[n-1];Object.keys(a).forEach(r=>{a[r].pattern!=="bruteforce"&&this.update(t,parseInt(r,10)+1)})}},unwind(e){const t=[];let n=e-1,a=0,r=1/0;const s=this.optimal.g[n];for(s&&Object.keys(s).forEach(i=>{const o=s[i];o=0;){const i=this.optimal.m[n][a];t.unshift(i),n=i.i-1,a-=1}return t}};var kd={mostGuessableMatchSequence(e,t,n=!1){pn.password=e,pn.excludeAdditive=n;const a=e.length;let r=pn.fillArray(a,"array");t.forEach(u=>{r[u.j].push(u)}),r=r.map(u=>u.sort((c,l)=>c.i-l.i)),pn.optimal={m:pn.fillArray(a,"object"),pi:pn.fillArray(a,"object"),g:pn.fillArray(a,"object")};for(let u=0;u{c.i>0?Object.keys(pn.optimal.m[c.i-1]).forEach(l=>{pn.update(c,parseInt(l,10)+1)}):pn.update(c,1)}),pn.bruteforceUpdate(u);const s=pn.unwind(a),i=s.length,o=this.getGuesses(e,i);return{password:e,guesses:o,guessesLog10:Ar.log10(o),sequence:s}},getGuesses(e,t){const n=e.length;let a=0;return e.length===0?a=1:a=pn.optimal.g[n-1][t],a}};class N2e{match({password:t,omniMatch:n}){const a=[];let r=0;for(;ri instanceof Promise)?Promise.all(a):a}normalizeMatch(t,n,a,r){const s={pattern:"repeat",i:a.index,j:n,token:a[0],baseToken:t,baseGuesses:0,repeatCount:a[0].length/t.length};return r instanceof Promise?r.then(i=>({...s,baseGuesses:i})):{...s,baseGuesses:r}}getGreedyMatch(t,n){const a=/(.+)\1+/g;return a.lastIndex=n,a.exec(t)}getLazyMatch(t,n){const a=/(.+?)\1+/g;return a.lastIndex=n,a.exec(t)}setMatchToken(t,n){const a=/^(.+?)\1+$/;let r,s="";if(n&&t[0].length>n[0].length){r=t;const i=a.exec(r[0]);i&&(s=i[1])}else r=n,r&&(s=r[1]);return{match:r,baseToken:s}}getBaseGuesses(t,n){const a=n.match(t);return a instanceof Promise?a.then(s=>kd.mostGuessableMatchSequence(t,s).guesses):kd.mostGuessableMatchSequence(t,a).guesses}}class v2e{constructor(){this.MAX_DELTA=5}match({password:t}){const n=[];if(t.length===1)return[];let a=0,r=null;const s=t.length;for(let i=1;i1||Math.abs(a)===1){const i=Math.abs(a);if(i>0&&i<=this.MAX_DELTA){const o=r.slice(t,+n+1||9e9),{sequenceName:u,sequenceSpace:c}=this.getSequence(o);return s.push({pattern:"sequence",i:t,j:n,token:r.slice(t,+n+1||9e9),sequenceName:u,sequenceSpace:c,ascending:a>0})}}return null}getSequence(t){let n="unicode",a=26;return Wve.test(t)?(n="lower",a=26):zve.test(t)?(n="upper",a=26):jve.test(t)&&(n="digits",a=10),{sequenceName:n,sequenceSpace:a}}}class C2e{constructor(){this.SHIFTED_RX=/[~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?]/}match({password:t}){const n=[];return Object.keys(Ne.graphs).forEach(a=>{const r=Ne.graphs[a];wd(n,this.helper(t,r,a))}),os(n)}checkIfShifted(t,n,a){return!t.includes("keypad")&&this.SHIFTED_RX.test(n.charAt(a))?1:0}helper(t,n,a){let r;const s=[];let i=0;const o=t.length;for(;i2&&s.push({pattern:"spatial",i,j:u-1,token:t.slice(i,u),graph:a,turns:l,shiftedCount:r}),i=u;break}}}return s}}const y2e=new RegExp(`[${fA.join("")}]`);class Uu{static getMostUsedSeparatorChar(t){const n=[...t.split("").filter(r=>y2e.test(r)).reduce((r,s)=>{const i=r.get(s);return i?r.set(s,i+1):r.set(s,1),r},new Map).entries()].sort(([r,s],[i,o])=>o-s);if(!n.length)return;const a=n[0];if(!(a[1]<2))return a[0]}static getSeparatorRegex(t){return new RegExp(`([^${t}
-])(${t})(?!${t})`,"g")}match({password:t}){const n=[];if(t.length===0)return n;const a=Uu.getMostUsedSeparatorChar(t);if(a===void 0)return n;const r=Uu.getSeparatorRegex(a);for(const s of t.matchAll(r)){if(s.index===void 0)continue;const i=s.index+1;n.push({pattern:"separator",token:a,i,j:i})}return n}}class D2e{constructor(){this.matchers={date:qve,dictionary:o2e,regex:u2e,repeat:N2e,sequence:v2e,spatial:C2e,separator:Uu}}match(t){const n=[],a=[];return[...Object.keys(this.matchers),...Object.keys(Ne.matchers)].forEach(s=>{if(!this.matchers[s]&&!Ne.matchers[s])return;const i=this.matchers[s]?this.matchers[s]:Ne.matchers[s].Matching,u=new i().match({password:t,omniMatch:this});u instanceof Promise?(u.then(c=>{wd(n,c)}),a.push(u)):wd(n,u)}),a.length>0?new Promise((s,i)=>{Promise.all(a).then(()=>{s(os(n))}).catch(o=>{i(o)})}):os(n)}}const EA=1,pA=EA*60,mA=pA*60,hA=mA*24,_A=hA*31,TA=_A*12,P2e=TA*100,cc={second:EA,minute:pA,hour:mA,day:hA,month:_A,year:TA,century:P2e};class L2e{translate(t,n){let a=t;n!==void 0&&n!==1&&(a+="s");const{timeEstimation:r}=Ne.translations;return r[a].replace("{base}",`${n}`)}estimateAttackTimes(t){const n={onlineThrottling100PerHour:t/.027777777777777776,onlineNoThrottling10PerSecond:t/10,offlineSlowHashing1e4PerSecond:t/1e4,offlineFastHashing1e10PerSecond:t/1e10},a={onlineThrottling100PerHour:"",onlineNoThrottling10PerSecond:"",offlineSlowHashing1e4PerSecond:"",offlineFastHashing1e10PerSecond:""};return Object.keys(n).forEach(r=>{const s=n[r];a[r]=this.displayTime(s)}),{crackTimesSeconds:n,crackTimesDisplay:a,score:this.guessesToScore(t)}}guessesToScore(t){return t<1005?0:t<1000005?1:t<100000005?2:t<1e10+5?3:4}displayTime(t){let n="centuries",a;const r=Object.keys(cc),s=r.findIndex(i=>t-1&&(n=r[s-1],s!==0?a=Math.round(t/cc[n]):n="ltSecond"),this.translate(n,a)}}var w2e=()=>null,k2e=()=>({warning:Ne.translations.warnings.dates,suggestions:[Ne.translations.suggestions.dates]});const $2e=(e,t)=>{let n=null;return t&&!e.l33t&&!e.reversed?e.rank<=10?n=Ne.translations.warnings.topTen:e.rank<=100?n=Ne.translations.warnings.topHundred:n=Ne.translations.warnings.common:e.guessesLog10<=4&&(n=Ne.translations.warnings.similarToCommon),n},U2e=(e,t)=>{let n=null;return t&&(n=Ne.translations.warnings.wordByItself),n},M2e=(e,t)=>t?Ne.translations.warnings.namesByThemselves:Ne.translations.warnings.commonNames,x2e=(e,t)=>{let n=null;const a=e.dictionaryName,r=a==="lastnames"||a.toLowerCase().includes("firstnames");return a==="passwords"?n=$2e(e,t):a.includes("wikipedia")?n=U2e(e,t):r?n=M2e(e,t):a==="userInputs"&&(n=Ne.translations.warnings.userInputs),n};var F2e=(e,t)=>{const n=x2e(e,t),a=[],r=e.token;return r.match(cA)?a.push(Ne.translations.suggestions.capitalization):r.match(dA)&&r.toLowerCase()!==r&&a.push(Ne.translations.suggestions.allUppercase),e.reversed&&e.token.length>=4&&a.push(Ne.translations.suggestions.reverseWords),e.l33t&&a.push(Ne.translations.suggestions.l33t),{warning:n,suggestions:a}},z2e=e=>e.regexName==="recentYear"?{warning:Ne.translations.warnings.recentYears,suggestions:[Ne.translations.suggestions.recentYears,Ne.translations.suggestions.associatedYears]}:{warning:null,suggestions:[]},W2e=e=>{let t=Ne.translations.warnings.extendedRepeat;return e.baseToken.length===1&&(t=Ne.translations.warnings.simpleRepeat),{warning:t,suggestions:[Ne.translations.suggestions.repeated]}},G2e=()=>({warning:Ne.translations.warnings.sequences,suggestions:[Ne.translations.suggestions.sequences]}),B2e=e=>{let t=Ne.translations.warnings.keyPattern;return e.turns===1&&(t=Ne.translations.warnings.straightRow),{warning:t,suggestions:[Ne.translations.suggestions.longerKeyboardPattern]}},H2e=()=>null;const Ym={warning:null,suggestions:[]};class V2e{constructor(){this.matchers={bruteforce:w2e,date:k2e,dictionary:F2e,regex:z2e,repeat:W2e,sequence:G2e,spatial:B2e,separator:H2e},this.defaultFeedback={warning:null,suggestions:[]},this.setDefaultSuggestions()}setDefaultSuggestions(){this.defaultFeedback.suggestions.push(Ne.translations.suggestions.useWords,Ne.translations.suggestions.noNeed)}getFeedback(t,n){if(n.length===0)return this.defaultFeedback;if(t>2)return Ym;const a=Ne.translations.suggestions.anotherWord,r=this.getLongestMatch(n);let s=this.getMatchFeedback(r,n.length===1);return s!=null?s.suggestions.unshift(a):s={warning:null,suggestions:[a]},s}getLongestMatch(t){let n=t[0];return t.slice(1).forEach(r=>{r.token.length>n.token.length&&(n=r)}),n}getMatchFeedback(t,n){return this.matchers[t.pattern]?this.matchers[t.pattern](t,n):Ne.matchers[t.pattern]&&"feedback"in Ne.matchers[t.pattern]?Ne.matchers[t.pattern].feedback(t,n):Ym}}const gA=()=>new Date().getTime(),j2e=(e,t,n)=>{const a=new V2e,r=new L2e,s=kd.mostGuessableMatchSequence(t,e),i=gA()-n,o=r.estimateAttackTimes(s.guesses);return{calcTime:i,...s,...o,feedback:a.getFeedback(o.score,s.sequence)}},K2e=(e,t)=>(t&&Ne.extendUserInputsDictionary(t),new D2e().match(e)),Y2e=(e,t)=>{const n=gA(),a=K2e(e,t);if(a instanceof Promise)throw new Error("You are using a Promised matcher, please use `zxcvbnAsync` for it.");return j2e(a,e,n)},q2e="modulepreload",X2e=function(e){return"/"+e},qm={},Dt=function(t,n,a){let r=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link");r=Promise.all(n.map(i=>{if(i=X2e(i),i in qm)return;qm[i]=!0;const o=i.endsWith(".css"),u=o?'[rel="stylesheet"]':"";if(!!a)for(let f=s.length-1;f>=0;f--){const d=s[f];if(d.href===i&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${u}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":q2e,o||(l.as="script",l.crossOrigin=""),l.href=i,document.head.appendChild(l),o)return new Promise((f,d)=>{l.addEventListener("load",f),l.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${i}`)))})}))}return r.then(()=>t()).catch(s=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=s,window.dispatchEvent(i),!i.defaultPrevented)throw s})},Z2e=async e=>{switch(e){case"fr":return await Dt(()=>import("./password.fr-1uJe1-pR.js"),__vite__mapDeps([]));case"de":return await Dt(()=>import("./password.de-qoep7B_f.js"),__vite__mapDeps([]));case"it":return await Dt(()=>import("./password.it-ImDc22WR.js"),__vite__mapDeps([]));case"es":return await Dt(()=>import("./password.es-es--6AdGpRj.js"),__vite__mapDeps([]));case"pl":return await Dt(()=>import("./password.pl-Ipz4x2MM.js"),__vite__mapDeps([]));default:return await Dt(()=>import("./password.en-lIq_N4yZ.js"),__vite__mapDeps([]))}},Xm=async e=>{const t=await Dt(()=>import("./password.common-7m77ow97.js"),__vite__mapDeps([])),n=await Z2e(e),a={graphs:t.adjacencyGraphs,dictionary:{...t.dictionary,...n.dictionary}};Ne.setOptions(a)},Q2e=e=>{switch(e){case 2:return"AVERAGE";case 3:return"GOOD";case 4:return"STRONG";default:return"WEAK"}},J2e={class:"password-strength"},e3e=["value"],t3e={key:0,class:"password-strength-details"},n3e={class:"password-strength-value"},a3e={key:0,class:"info-box"},r3e={class:"password-feedback"},s3e=Z({__name:"PasswordStength",props:{password:{}},setup(e){const t=e,{password:n}=_e(t),a=Me(),r=k(()=>a.getters[H.GETTERS.LANGUAGE]),s=k(()=>a.getters[K.GETTERS.IS_SUCCESS]),i=ce(0),o=ce(""),u=ce([]),c=ce("0% 100%");Ct(async()=>await Xm(r.value));function l(f){const d=Y2e(f);i.value=d.score,o.value=Q2e(i.value),u.value=d.feedback.suggestions,c.value=i.value*100/4+"% 100%"}return We(()=>r.value,async f=>{await Xm(f)}),We(()=>n.value,async f=>{s.value?o.value="":l(f)}),(f,d)=>(A(),v("div",J2e,[E("input",{class:Se(["password-slider",`strength-${i.value}`]),style:Va({backgroundSize:c.value}),type:"range",value:i.value,min:"0",max:"4",step:"1",tabindex:-1},null,14,e3e),o.value?(A(),v("div",t3e,[E("span",n3e,T(f.$t("user.PASSWORD_STRENGTH.LABEL"))+": "+T(f.$t(`user.PASSWORD_STRENGTH.${o.value}`)),1),u.value.length>0?(A(),v("div",a3e,[E("ul",r3e,[(A(!0),v(be,null,Ge(u.value,p=>(A(),v("li",{key:p},T(f.$t(`user.PASSWORD_STRENGTH.SUGGESTIONS.${p}`)),1))),128))])])):x("",!0)])):x("",!0)]))}}),i3e=ae(s3e,[["__scopeId","data-v-1affb508"]]),o3e=e=>(ut("data-v-ac528612"),e=e(),lt(),e),u3e={class:"password-input"},l3e=["id","disabled","placeholder","required","type"],c3e={class:"show-password"},d3e={key:0,class:"form-info"},f3e=o3e(()=>E("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),E3e=Z({__name:"PasswordInput",props:{checkStrength:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},id:{default:"password"},password:{default:""},placeholder:{},required:{type:Boolean,default:!1}},emits:["updatePassword","passwordError"],setup(e,{emit:t}){const n=e,{checkStrength:a,disabled:r,id:s,password:i,placeholder:o,required:u}=_e(n),c=ce(!1),l=ce(""),f=t;function d(){c.value=!c.value}function p(I){f("updatePassword",I.target.value)}function m(){f("passwordError")}return We(()=>i.value,I=>{I===""&&(l.value="",c.value=!1)}),(I,b)=>(A(),v("div",u3e,[qe(E("input",{id:h(s),disabled:h(r),placeholder:h(o),required:h(u),type:c.value?"text":"password","onUpdate:modelValue":b[0]||(b[0]=R=>l.value=R),minlength:"8",onInput:p,onInvalid:m},null,40,l3e),[[CI,l.value]]),E("div",c3e,[E("button",{class:"transparent",onClick:Je(d,["prevent"]),type:"button"},[j(T(I.$t(`user.${c.value?"HIDE":"SHOW"}_PASSWORD`))+" ",1),E("i",{class:Se(["fa",`fa-eye${c.value?"-slash":""}`]),"aria-hidden":"true"},null,2)])]),h(a)?(A(),v("div",d3e,[f3e,j(" "+T(I.$t("user.PASSWORD_INFO")),1)])):x("",!0),h(a)?(A(),te(i3e,{key:1,password:l.value},null,8,["password"])):x("",!0)]))}}),$d=ae(E3e,[["__scopeId","data-v-ac528612"]]),cE=e=>(ut("data-v-8ebb5cd3"),e=e(),lt(),e),p3e={id:"user-infos-edition"},m3e={class:"profile-form form-box"},h3e={key:1,class:"info-box success-message"},_3e={class:"form-items",for:"email"},T3e=["disabled"],g3e={class:"form-items",for:"password-field"},A3e={class:"form-items",for:"new-password-field"},S3e={class:"form-buttons"},O3e={class:"confirm",type:"submit"},I3e={class:"data-export"},R3e={class:"info-box"},b3e=cE(()=>E("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),N3e={key:0,class:"data-export-archive"},v3e=cE(()=>E("i",{class:"fa fa-download","aria-hidden":"true"},null,-1)),C3e={key:1},y3e={key:2},D3e=cE(()=>E("i",{class:"fa fa-spinner fa-pulse","aria-hidden":"true"},null,-1)),P3e=Z({__name:"UserAccountEdition",props:{user:{}},setup(e){const t=e,{user:n}=_e(t),a=Me(),r=Gt({email:"",password:"",new_password:""}),s=k(()=>a.getters[K.GETTERS.USER_LOADING]),i=k(()=>a.getters[H.GETTERS.APP_CONFIG]),o=k(()=>a.getters[K.GETTERS.IS_SUCCESS]),u=ce(!1),c=k(()=>a.getters[H.GETTERS.ERROR_MESSAGES]),l=ce(!1),f=ce(!1),d=k(()=>a.getters[K.GETTERS.EXPORT_REQUEST]),p=k(()=>S()),m=ce(!1);_t(()=>{t.user&&(a.dispatch(K.ACTIONS.GET_REQUEST_DATA_EXPORT),b(t.user))});function I(){l.value=!0}function b(B){r.email=B.email}function R(B){r.password=B}function N(B){r.new_password=B}function S(){return d.value?$n(d.value.created_at,n.value.timezone,n.value.date_format,!0,null,!0):null}function O(){return p.value?X2(new Date(p.value),J2(new Date,1)):!0}function C(){const B={email:r.email,password:r.password};r.new_password&&(B.new_password=r.new_password),u.value=r.email!==n.value.email,a.dispatch(K.ACTIONS.UPDATE_USER_ACCOUNT,B)}function P(B){f.value=B}function M(B){a.dispatch(K.ACTIONS.DELETE_ACCOUNT,{username:B})}function L(){a.dispatch(K.ACTIONS.REQUEST_DATA_EXPORT)}async function W(B){m.value=!0,await je.get(`/auth/account/export/${B}`,{responseType:"blob"}).then(w=>{const X=window.URL.createObjectURL(new Blob([w.data],{type:"application/zip"})),J=document.createElement("a");J.href=X,J.setAttribute("download",B),document.body.appendChild(J),J.click()}).finally(()=>m.value=!1)}return Nt(()=>{a.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!1),a.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),We(()=>o.value,async B=>{B&&(R(""),N(""),b(n.value),l.value=!1)}),We(()=>n.value.email,async()=>{b(n.value)}),(B,w)=>{const X=oe("Modal"),J=oe("ErrorMessage");return A(),v("div",p3e,[f.value?(A(),te(X,{key:0,title:B.$t("common.CONFIRMATION"),message:B.$t("user.CONFIRM_ACCOUNT_DELETION"),onConfirmAction:w[0]||(w[0]=ne=>M(h(n).username)),onCancelAction:w[1]||(w[1]=ne=>P(!1)),onKeydown:w[2]||(w[2]=At(ne=>P(!1),["esc"]))},null,8,["title","message"])):x("",!0),E("div",m3e,[c.value?(A(),te(J,{key:0,message:c.value},null,8,["message"])):x("",!0),o.value?(A(),v("div",h3e,T(B.$t(`user.PROFILE.SUCCESSFUL_${u.value&&i.value.is_email_sending_enabled?"EMAIL_":""}UPDATE`)),1)):x("",!0),E("form",{class:Se({errors:l.value}),onSubmit:Je(C,["prevent"])},[E("label",_3e,[j(T(B.$t("user.EMAIL"))+"* ",1),qe(E("input",{id:"email","onUpdate:modelValue":w[3]||(w[3]=ne=>r.email=ne),disabled:s.value,required:!0,onInvalid:I},null,40,T3e),[[rt,r.email]])]),E("label",g3e,[j(T(B.$t("user.CURRENT_PASSWORD"))+"* ",1),$($d,{id:"password-field",disabled:s.value,password:r.password,required:!0,onUpdatePassword:R,onPasswordError:I},null,8,["disabled","password"])]),E("label",A3e,[j(T(B.$t("user.NEW_PASSWORD"))+" ",1),$($d,{id:"new-password-field",disabled:s.value,checkStrength:!0,password:r.new_password,isSuccess:!1,onUpdatePassword:N,onPasswordError:I},null,8,["disabled","password"])]),E("div",S3e,[E("button",O3e,T(B.$t("buttons.SUBMIT")),1),E("button",{class:"cancel",onClick:w[4]||(w[4]=Je(ne=>B.$router.push("/profile"),["prevent"]))},T(B.$t("buttons.CANCEL")),1),E("button",{class:"danger",onClick:w[5]||(w[5]=Je(ne=>P(!0),["prevent"]))},T(B.$t("buttons.DELETE_MY_ACCOUNT")),1),O()?(A(),v("button",{key:0,class:"confirm",onClick:Je(L,["prevent"])},T(B.$t("buttons.REQUEST_DATA_EXPORT")),1)):x("",!0)])],34),E("div",I3e,[E("span",R3e,[b3e,j(" "+T(B.$t("user.EXPORT_REQUEST.ONLY_ONE_EXPORT_PER_DAY")),1)]),d.value?(A(),v("div",N3e,[j(T(B.$t("user.EXPORT_REQUEST.DATA_EXPORT"))+" ("+T(p.value)+"): ",1),d.value.status==="successful"?(A(),v("span",{key:0,class:"archive-link",onClick:w[6]||(w[6]=Je(ne=>W(d.value.file_name),["prevent"]))},[v3e,j(" "+T(B.$t("user.EXPORT_REQUEST.DOWNLOAD_ARCHIVE"))+" ("+T(h(qo)(d.value.file_size))+") ",1)])):(A(),v("span",C3e,T(B.$t(`user.EXPORT_REQUEST.STATUS.${d.value.status}`)),1)),m.value?(A(),v("span",y3e,[j(T(B.$t("user.EXPORT_REQUEST.GENERATING_LINK"))+" ",1),D3e])):x("",!0)])):x("",!0)])])])}}}),L3e=ae(P3e,[["__scopeId","data-v-8ebb5cd3"]]),w3e={id:"user-infos-edition"},k3e={class:"profile-form form-box"},$3e={class:"form-items",for:"registrationDate"},U3e=["value"],M3e={class:"form-items",for:"first_name"},x3e=["disabled"],F3e={class:"form-items",for:"last_name"},z3e={class:"form-items",for:"birth_date"},W3e=["disabled"],G3e={class:"form-items",for:"location"},B3e=["disabled"],H3e={class:"form-items"},V3e={class:"form-buttons"},j3e={class:"confirm",type:"submit"},K3e=Z({__name:"UserInfosEdition",props:{user:{}},setup(e){const t=e,n=Me(),a=Gt({first_name:"",last_name:"",birth_date:"",location:"",bio:""}),r=k(()=>t.user.created_at?$n(t.user.created_at,t.user.timezone,t.user.date_format):""),s=k(()=>n.getters[K.GETTERS.USER_LOADING]),i=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]);_t(()=>{t.user&&o(t.user)});function o(l){a.first_name=l.first_name?l.first_name:"",a.last_name=l.last_name?l.last_name:"",a.birth_date=l.birth_date?dn(new Date(l.birth_date),"yyyy-MM-dd"):"",a.location=l.location?l.location:"",a.bio=l.bio?l.bio:""}function u(l){a.bio=l}function c(){n.dispatch(K.ACTIONS.UPDATE_USER_PROFILE,a)}return Nt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(l,f)=>{const d=oe("ErrorMessage"),p=oe("CustomTextArea");return A(),v("div",w3e,[E("div",k3e,[i.value?(A(),te(d,{key:0,message:i.value},null,8,["message"])):x("",!0),E("form",{onSubmit:Je(c,["prevent"])},[E("label",$3e,[j(T(l.$t("user.PROFILE.REGISTRATION_DATE"))+" ",1),E("input",{id:"registrationDate",value:r.value,disabled:""},null,8,U3e)]),E("label",M3e,[j(T(l.$t("user.PROFILE.FIRST_NAME"))+" ",1),qe(E("input",{id:"first_name","onUpdate:modelValue":f[0]||(f[0]=m=>a.first_name=m),disabled:s.value},null,8,x3e),[[rt,a.first_name]])]),E("label",F3e,[j(T(l.$t("user.PROFILE.LAST_NAME"))+" ",1),qe(E("input",{id:"last_name","onUpdate:modelValue":f[1]||(f[1]=m=>a.last_name=m)},null,512),[[rt,a.last_name]])]),E("label",z3e,[j(T(l.$t("user.PROFILE.BIRTH_DATE"))+" ",1),qe(E("input",{id:"birth_date",type:"date",class:"birth-date","onUpdate:modelValue":f[2]||(f[2]=m=>a.birth_date=m),disabled:s.value},null,8,W3e),[[rt,a.birth_date]])]),E("label",G3e,[j(T(l.$t("user.PROFILE.LOCATION"))+" ",1),qe(E("input",{id:"location","onUpdate:modelValue":f[3]||(f[3]=m=>a.location=m),disabled:s.value},null,8,B3e),[[rt,a.location]])]),E("label",H3e,[j(T(l.$t("user.PROFILE.BIO"))+" ",1),$(p,{name:"bio",charLimit:200,input:a.bio,disabled:s.value,onUpdateValue:u},null,8,["input","disabled"])]),E("div",V3e,[E("button",j3e,T(l.$t("buttons.SUBMIT")),1),E("button",{class:"cancel",onClick:f[4]||(f[4]=Je(m=>l.$router.push("/profile"),["prevent"]))},T(l.$t("buttons.CANCEL")),1)])],32)])])}}}),Y3e=ae(K3e,[["__scopeId","data-v-5f5c8fca"]]),q3e=e=>(ut("data-v-8f62d42f"),e=e(),lt(),e),X3e={id:"user-picture-edition"},Z3e={class:"user-picture-form"},Q3e={class:"picture-help"},J3e={class:"info-box"},eCe=q3e(()=>E("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),tCe={class:"picture-buttons"},nCe=["disabled"],aCe=Z({__name:"UserPictureEdition",props:{user:{}},setup(e){const t=e,n=Me(),{user:a}=_e(t),r=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),s=k(()=>n.getters[H.GETTERS.APP_CONFIG]),i=s.value.max_single_file_size?qo(s.value.max_single_file_size):"",o=ce(null);function u(){n.dispatch(K.ACTIONS.DELETE_PICTURE)}function c(f){f.target.files!==null&&(o.value=f.target.files[0])}function l(){o.value&&n.dispatch(K.ACTIONS.UPDATE_USER_PICTURE,{picture:o.value})}return Nt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(f,d)=>{const p=oe("ErrorMessage");return A(),v("div",X3e,[E("div",Z3e,[r.value?(A(),te(p,{key:0,message:r.value},null,8,["message"])):x("",!0),$(Oi,{user:h(a)},null,8,["user"]),E("form",{onSubmit:Je(l,["prevent"])},[E("input",{type:"file",name:"picture",accept:".png,.jpg,.gif",onInput:c},null,32),E("div",Q3e,[E("span",J3e,[eCe,j(" "+T(f.$t("workouts.MAX_SIZE"))+": "+T(h(i)),1)])]),E("div",tCe,[E("button",{type:"submit",disabled:!o.value},T(f.$t("user.PROFILE.PICTURE_UPDATE")),9,nCe),h(a).picture?(A(),v("button",{key:0,class:"danger",onClick:u},T(f.$t("user.PROFILE.PICTURE_REMOVE")),1)):x("",!0),E("button",{class:"cancel",onClick:d[0]||(d[0]=m=>f.$router.push("/profile"))},T(f.$t("user.PROFILE.BACK_TO_PROFILE")),1)])],32)])])}}}),rCe=ae(aCe,[["__scopeId","data-v-8f62d42f"]]),Zm=["Africa/Abidjan","Africa/Accra","Africa/Algiers","Africa/Bissau","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/El_Aaiun","Africa/Johannesburg","Africa/Juba","Africa/Khartoum","Africa/Lagos","Africa/Maputo","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Asuncion","America/Atikokan","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Cayenne","America/Chicago","America/Chihuahua","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fortaleza","America/Fort_Nelson","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Inuvik","America/Iqaluit","America/Jamaica","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/La_Paz","America/Lima","America/Los_Angeles","America/Maceio","America/Managua","America/Manaus","America/Martinique","America/Matamoros","America/Mazatlan","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Johns","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kathmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Riyadh","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Helsinki","Europe/Istanbul","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/Saratov","Europe/Simferopol","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zaporozhye","Europe/Zurich","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Wake","Pacific/Wallis"],sCe={id:"tz-dropdown"},iCe=["value","disabled","aria-expanded"],oCe=["aria-label"],uCe=["id","onClick","onMouseover","autofocus"],lCe=Z({__name:"TimezoneDropdown",props:{input:{},disabled:{type:Boolean,default:!1}},emits:["updateTimezone"],setup(e,{emit:t}){const n=e,a=t,{input:r,disabled:s}=_e(n),i=ce(r.value),o=ce(!1),u=ce(0),c=k(()=>r.value?Zm.filter(O=>l(O)):Zm);function l(O){return O.toLowerCase().match(i.value.toLowerCase())}function f(O){u.value=O}function d(O){c.value.length>O&&(i.value=c.value[O],a("updateTimezone",i.value),o.value=!1)}function p(O){O.preventDefault(),c.value.length>0&&d(u.value)}function m(O){O.preventDefault(),o.value=!0,i.value=O.target.value.trim()}function I(){d(u.value)}function b(O){const C=document.getElementById(`tz-dropdown-item-${O}`);C&&(C.focus(),C.scrollIntoView({behavior:"smooth",block:"nearest"}))}function R(){o.value=!0,u.value=u.value===null?0:u.value+=1,u.value>=c.value.length&&(u.value=0),b(u.value)}function N(){o.value=!0,u.value=u.value===null?c.value.length-1:u.value-=1,u.value<=-1&&(u.value=c.value.length-1),b(u.value)}function S(){o.value&&(o.value=!1,i.value=r.value)}return We(()=>n.input,O=>{i.value=O}),(O,C)=>(A(),v("div",sCe,[E("input",{class:"tz-dropdown-input",id:"timezone",name:"timezone",value:i.value,disabled:h(s),required:"",role:"combobox","aria-autocomplete":"list","aria-controls":"tz-dropdown-list","aria-expanded":o.value,onKeydown:[C[0]||(C[0]=At(P=>S(),["esc"])),At(p,["enter"]),C[2]||(C[2]=At(P=>R(),["down"])),C[3]||(C[3]=At(P=>N(),["up"]))],onInput:m,onBlur:C[1]||(C[1]=P=>I())},null,40,iCe),o.value?(A(),v("ul",{key:0,class:"tz-dropdown-list",id:"tz-dropdown-list",role:"listbox",tabindex:"-1","aria-label":O.$t("user.PROFILE.TIMEZONE",0)},[(A(!0),v(be,null,Ge(c.value,(P,M)=>(A(),v("li",{key:P,id:`tz-dropdown-item-${M}`,class:Se(["tz-dropdown-item",{focus:M===u.value}]),onClick:L=>d(M),onMouseover:L=>f(M),autofocus:M===u.value,role:"option"},T(P),43,uCe))),128))],8,oCe)):x("",!0)]))}}),cCe=ae(lCe,[["__scopeId","data-v-3d9b6b6f"]]),dCe=e=>(ut("data-v-7b19a78b"),e=e(),lt(),e),fCe={id:"user-preferences-edition"},ECe={class:"profile-form form-box"},pCe={class:"preferences-section"},mCe={class:"form-items"},hCe=["disabled"],_Ce=["value"],TCe={class:"form-items"},gCe=["disabled"],ACe=["value"],SCe={class:"form-items"},OCe={class:"form-items"},ICe=["disabled"],RCe=["value"],bCe={class:"form-items form-checkboxes"},NCe={class:"checkboxes-label"},vCe={class:"checkboxes"},CCe=["id","name","checked","disabled","onInput"],yCe={class:"checkbox-label"},DCe={class:"preferences-section"},PCe={class:"form-items form-checkboxes"},LCe={class:"checkboxes-label"},wCe={class:"checkboxes"},kCe=["id","name","checked","disabled","onInput"],$Ce={class:"checkbox-label"},UCe={class:"form-items form-checkboxes"},MCe={class:"checkboxes-label"},xCe={class:"checkboxes"},FCe=["id","name","checked","disabled","onInput"],zCe={class:"checkbox-label"},WCe={class:"form-items form-checkboxes"},GCe={class:"checkboxes-label"},BCe={class:"checkboxes"},HCe=["id","name","checked","disabled","onInput"],VCe={class:"checkbox-label"},jCe={class:"form-items form-checkboxes"},KCe={class:"checkboxes-label"},YCe={class:"checkboxes"},qCe=["id","name","checked","disabled","onInput"],XCe={class:"checkbox-label"},ZCe={class:"info-box raw-speed-help"},QCe=dCe(()=>E("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),JCe={class:"form-buttons"},eye={class:"confirm",type:"submit"},tye=Z({__name:"UserPreferencesEdition",props:{user:{}},setup(e){const t=e,n=Me(),a=Gt({display_ascent:!0,imperial_units:!1,language:"en",timezone:"Europe/Paris",date_format:"dd/MM/yyyy",weekm:!1,start_elevation_at_zero:!1,use_raw_gpx_speed:!1,use_dark_mode:!1}),r=[{label:"SUNDAY",value:!1},{label:"MONDAY",value:!0}],s=[{label:"METRIC",value:!1},{label:"IMPERIAL",value:!0}],i=[{label:"DISPLAYED",value:!0},{label:"HIDDEN",value:!1}],o=[{label:"ZERO",value:!0},{label:"MIN_ALT",value:!1}],u=[{label:"FILTERED_SPEED",value:!1},{label:"RAW_SPEED",value:!0}],c=[{label:"DARK",value:!0},{label:"DEFAULT",value:null},{label:"LIGHT",value:!1}],l=k(()=>n.getters[K.GETTERS.USER_LOADING]),f=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),d=k(()=>Ube(new Date().toUTCString(),t.user.timezone,a.language));_t(()=>{t.user&&p(t.user)});function p(C){a.display_ascent=C.display_ascent,a.start_elevation_at_zero=C.start_elevation_at_zero?C.start_elevation_at_zero:!1,a.use_raw_gpx_speed=C.use_raw_gpx_speed?C.use_raw_gpx_speed:!1,a.imperial_units=C.imperial_units?C.imperial_units:!1,a.language=C.language?C.language:"en",a.timezone=C.timezone?C.timezone:"Europe/Paris",a.date_format=C.date_format?C.date_format:"dd/MM/yyyy",a.weekm=C.weekm?C.weekm:!1,a.use_dark_mode=C.use_dark_mode}function m(){n.dispatch(K.ACTIONS.UPDATE_USER_PREFERENCES,a)}function I(C){a.timezone=C}function b(C){a.start_elevation_at_zero=C}function R(C){a.use_raw_gpx_speed=C}function N(C){a.display_ascent=C}function S(C){a.imperial_units=C}function O(C){a.weekm=C}return Nt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(C,P)=>{const M=oe("ErrorMessage");return A(),v("div",fCe,[E("div",ECe,[f.value?(A(),te(M,{key:0,message:f.value},null,8,["message"])):x("",!0),E("form",{onSubmit:Je(m,["prevent"])},[E("div",pCe,T(C.$t("user.PROFILE.INTERFACE")),1),E("label",mCe,[j(T(C.$t("user.PROFILE.LANGUAGE"))+" ",1),qe(E("select",{id:"language","onUpdate:modelValue":P[0]||(P[0]=L=>a.language=L),disabled:l.value},[(A(!0),v(be,null,Ge(h(Zc),L=>(A(),v("option",{value:L.value,key:L.value},T(L.label),9,_Ce))),128))],8,hCe),[[$s,a.language]])]),E("label",TCe,[j(T(C.$t("user.PROFILE.THEME_MODE.LABEL"))+" ",1),qe(E("select",{id:"use_dark_mode","onUpdate:modelValue":P[1]||(P[1]=L=>a.use_dark_mode=L),disabled:l.value},[(A(),v(be,null,Ge(c,L=>E("option",{value:L.value,key:L.label},T(C.$t(`user.PROFILE.THEME_MODE.VALUES.${L.label}`)),9,ACe)),64))],8,gCe),[[$s,a.use_dark_mode]])]),E("label",SCe,[j(T(C.$t("user.PROFILE.TIMEZONE"))+" ",1),$(cCe,{input:a.timezone,disabled:l.value,onUpdateTimezone:I},null,8,["input","disabled"])]),E("label",OCe,[j(T(C.$t("user.PROFILE.DATE_FORMAT"))+" ",1),qe(E("select",{id:"date_format","onUpdate:modelValue":P[2]||(P[2]=L=>a.date_format=L),disabled:l.value},[(A(!0),v(be,null,Ge(d.value,L=>(A(),v("option",{value:L.value,key:L.value},T(L.label),9,RCe))),128))],8,ICe),[[$s,a.date_format]])]),E("div",bCe,[E("span",NCe,T(C.$t("user.PROFILE.FIRST_DAY_OF_WEEK")),1),E("div",vCe,[(A(),v(be,null,Ge(r,L=>E("label",{key:L.label},[E("input",{type:"radio",id:L.label,name:L.label,checked:L.value===a.weekm,disabled:l.value,onInput:W=>O(L.value)},null,40,CCe),E("span",yCe,T(C.$t(`user.PROFILE.${L.label}`)),1)])),64))])]),E("div",DCe,T(C.$t("workouts.WORKOUT",0)),1),E("div",PCe,[E("span",LCe,T(C.$t("user.PROFILE.UNITS.LABEL")),1),E("div",wCe,[(A(),v(be,null,Ge(s,L=>E("label",{key:L.label},[E("input",{type:"radio",id:L.label,name:L.label,checked:L.value===a.imperial_units,disabled:l.value,onInput:W=>S(L.value)},null,40,kCe),E("span",$Ce,T(C.$t(`user.PROFILE.UNITS.${L.label}`)),1)])),64))])]),E("div",UCe,[E("span",MCe,T(C.$t("user.PROFILE.ASCENT_DATA")),1),E("div",xCe,[(A(),v(be,null,Ge(i,L=>E("label",{key:L.label},[E("input",{type:"radio",id:L.label,name:L.label,checked:L.value===a.display_ascent,disabled:l.value,onInput:W=>N(L.value)},null,40,FCe),E("span",zCe,T(C.$t(`common.${L.label}`)),1)])),64))])]),E("div",WCe,[E("span",GCe,T(C.$t("user.PROFILE.ELEVATION_CHART_START.LABEL")),1),E("div",BCe,[(A(),v(be,null,Ge(o,L=>E("label",{key:L.label},[E("input",{type:"radio",id:L.label,name:L.label,checked:L.value===a.start_elevation_at_zero,disabled:l.value,onInput:W=>b(L.value)},null,40,HCe),E("span",VCe,T(C.$t(`user.PROFILE.ELEVATION_CHART_START.${L.label}`)),1)])),64))])]),E("div",jCe,[E("span",KCe,T(C.$t("user.PROFILE.USE_RAW_GPX_SPEED.LABEL")),1),E("div",YCe,[(A(),v(be,null,Ge(u,L=>E("label",{key:L.label},[E("input",{type:"radio",id:L.label,name:L.label,checked:L.value===a.use_raw_gpx_speed,disabled:l.value,onInput:W=>R(L.value)},null,40,qCe),E("span",XCe,T(C.$t(`user.PROFILE.USE_RAW_GPX_SPEED.${L.label}`)),1)])),64))]),E("div",ZCe,[E("span",null,[QCe,j(" "+T(C.$t("user.PROFILE.USE_RAW_GPX_SPEED.HELP")),1)])])]),E("div",JCe,[E("button",eye,T(C.$t("buttons.SUBMIT")),1),E("button",{class:"cancel",onClick:P[3]||(P[3]=Je(L=>C.$router.push("/profile/preferences"),["prevent"]))},T(C.$t("buttons.CANCEL")),1)])],32)])])}}}),nye=ae(tye,[["__scopeId","data-v-7b19a78b"]]),aye={class:"privacy-policy-text"},rye={class:"last-update"},sye=["innerHTML"],iye=["innerHTML"],oye="Sun, 26 Feb 2023 17:00:00 GMT",uye=Z({__name:"PrivacyPolicy",setup(e){const t=Me(),n=k(()=>t.getters[H.GETTERS.APP_CONFIG]),a=k(()=>t.getters[H.GETTERS.LANGUAGE]),r=k(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),s=k(()=>l()),i=k(()=>c()),o=k(()=>f()),u=["DATA_COLLECTED","INFORMATION_USAGE","INFORMATION_PROTECTION","INFORMATION_DISCLOSURE","SITE_USAGE_BY_CHILDREN","YOUR_CONSENT","ACCOUNT_DELETION","CHANGES_TO_OUR_PRIVACY_POLICY"];function c(){return r.value.timezone?r.value.timezone:Intl.DateTimeFormat().resolvedOptions().timeZone?Intl.DateTimeFormat().resolvedOptions().timeZone:"Europe/Paris"}function l(){return nA[a.value]}function f(){return $n(n.value.privacy_policy&&n.value.privacy_policy_date?`${n.value.privacy_policy_date}`:oye,i.value,s.value,!1)}return(d,p)=>(A(),v("div",aye,[E("h1",null,T(bt(d.$t("privacy_policy.TITLE"))),1),E("p",rye,[j(T(d.$t("privacy_policy.LAST_UPDATE"))+": ",1),E("time",null,T(o.value),1)]),n.value.privacy_policy?(A(),v("div",{key:0,innerHTML:h(lr)(h(di)(n.value.privacy_policy))},null,8,sye)):(A(),v(be,{key:1},Ge(u,m=>(A(),v(be,{key:m},[E("h2",null,T(d.$t(`privacy_policy.CONTENT.${m}.TITLE`)),1),E("p",{innerHTML:h(lr)(d.$t(`privacy_policy.CONTENT.${m}.CONTENT`))},null,8,iye)],64))),64))]))}}),AA=ae(uye,[["__scopeId","data-v-31d5cd27"]]),lye={id:"user-privacy-policy"},cye={key:1},dye={class:"policy-content"},fye={for:"accepted_policy",class:"accepted_policy"},Eye={class:"form-buttons"},pye={class:"confirm",type:"submit"},mye=Z({__name:"UserPrivacyPolicyValidation",props:{user:{}},setup(e){const t=e,{user:n}=_e(t),a=Me(),r=k(()=>a.getters[H.GETTERS.ERROR_MESSAGES]),s=ce(!1),i=ce(!1);function o(){a.dispatch(K.ACTIONS.ACCEPT_PRIVACY_POLICY,s.value)}function u(){i.value=!0}return Nt(()=>{a.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(c,l)=>{const f=oe("ErrorMessage"),d=oe("router-link"),p=oe("i18n-t");return A(),v("div",lye,[r.value?(A(),te(f,{key:0,message:r.value},null,8,["message"])):x("",!0),h(n).accepted_privacy_policy?(A(),v("div",cye,[E("p",null,[$(p,{keypath:"user.YOU_HAVE_ACCEPTED_PRIVACY_POLICY"},{default:ue(()=>[$(d,{to:"/privacy-policy"},{default:ue(()=>[j(T(c.$t("privacy_policy.TITLE")),1)]),_:1})]),_:1})]),E("button",{class:"cancel",onClick:l[0]||(l[0]=m=>c.$router.push("/profile"))},T(c.$t("user.PROFILE.BACK_TO_PROFILE")),1)])):(A(),v("form",{key:2,class:Se({errors:i.value}),onSubmit:l[3]||(l[3]=Je(m=>o(),["prevent"]))},[E("div",dye,[$(AA)]),E("label",fye,[qe(E("input",{type:"checkbox",id:"accepted_policy",required:"","onUpdate:modelValue":l[1]||(l[1]=m=>s.value=m),onInvalid:u},null,544),[[af,s.value]]),E("span",null,[$(p,{keypath:"user.READ_AND_ACCEPT_PRIVACY_POLICY"},{default:ue(()=>[j(T(c.$t("privacy_policy.TITLE")),1)]),_:1})])]),$(d,{to:"/profile/edit/account"},{default:ue(()=>[j(T(c.$t("user.I_WANT_TO_DELETE_MY_ACCOUNT")),1)]),_:1}),E("div",Eye,[E("button",pye,T(c.$t("buttons.SUBMIT")),1),E("button",{class:"cancel",onClick:l[2]||(l[2]=m=>c.$router.push("/profile"))},T(c.$t("user.PROFILE.BACK_TO_PROFILE")),1)])],34))])}}}),hye=ae(mye,[["__scopeId","data-v-9b1ceaf7"]]),_ye=["profile:read","profile:write","users:read","users:write","workouts:read","workouts:write"],Tye=["application:write"],gye={id:"new-oauth2-app"},Aye={id:"new-oauth2-title"},Sye={id:"apps-form"},Oye={class:"form-items"},Iye={class:"form-item"},Rye={for:"app-name"},bye={class:"form-item"},Nye={for:"app-description"},vye={class:"form-item"},Cye={for:"app-url"},yye={class:"form-item"},Dye={for:"app-redirect-uri"},Pye={class:"form-item-scope"},Lye={class:"form-item-scope-label"},wye={class:"scope-label"},kye=["name","checked","onChange"],$ye=["innerHTML"],Uye={class:"form-buttons"},Mye=["disabled"],xye=Z({__name:"AddUserApp",props:{authUser:{}},setup(e){const t=e,n=Me(),a=Gt({client_name:"",client_uri:"",client_description:"",description:"",redirect_uri:""}),r=Gt([]),s=k(()=>c(t.authUser,Tye,_ye));function i(){const l={client_name:a.client_name,client_description:a.client_description,client_uri:a.client_uri,redirect_uris:[a.redirect_uri],scope:r.sort().join(" ")};n.dispatch(Ye.ACTIONS.CREATE_CLIENT,l)}function o(l){a.client_description=l}function u(l){const f=r.indexOf(l);f>-1?r.splice(f,1):r.push(l)}function c(l,f,d){const p=[...d];return l.admin&&p.push(...f),p.sort()}return(l,f)=>{const d=oe("CustomTextArea");return A(),v("div",gye,[E("h1",Aye,T(l.$t("oauth2.ADD_A_NEW_APP")),1),E("div",Sye,[E("form",{onSubmit:Je(i,["prevent"])},[E("div",Oye,[E("div",Iye,[E("label",Rye,T(l.$t("oauth2.APP.NAME"))+"*",1),qe(E("input",{id:"app-name",type:"text",required:"","onUpdate:modelValue":f[0]||(f[0]=p=>a.client_name=p)},null,512),[[rt,a.client_name]])]),E("div",bye,[E("label",Nye,T(l.$t("oauth2.APP.DESCRIPTION")),1),$(d,{name:"app-description",charLimit:200,input:a.description,onUpdateValue:o},null,8,["input"])]),E("div",vye,[E("label",Cye,T(l.$t("oauth2.APP.URL"))+"*",1),qe(E("input",{id:"app-url",type:"text",required:"","onUpdate:modelValue":f[1]||(f[1]=p=>a.client_uri=p)},null,512),[[rt,a.client_uri]])]),E("div",yye,[E("label",Dye,T(l.$t("oauth2.APP.REDIRECT_URL"))+"* ",1),qe(E("input",{id:"app-redirect-uri",type:"text",required:"","onUpdate:modelValue":f[2]||(f[2]=p=>a.redirect_uri=p)},null,512),[[rt,a.redirect_uri]])]),E("div",Pye,[E("div",Lye,T(l.$t("oauth2.APP.SCOPE.LABEL"))+"* ",1),(A(!0),v(be,null,Ge(s.value,p=>(A(),v("div",{class:"form-item-scope-checkboxes",key:p},[E("label",wye,[E("input",{type:"checkbox",name:p,checked:r.includes(p),onChange:m=>u(p)},null,40,kye),E("code",null,T(p),1)]),E("p",{class:"scope-description",innerHTML:l.$t(`oauth2.APP.SCOPE.${p}_DESCRIPTION`)},null,8,$ye)]))),128))])]),E("div",Uye,[E("button",{class:"confirm",type:"submit",disabled:r.length===0},T(l.$t("buttons.SUBMIT")),9,Mye),E("button",{class:"cancel",onClick:f[3]||(f[3]=Je(()=>l.$router.push("/profile/apps"),["prevent"]))},T(l.$t("buttons.CANCEL")),1)])],32)])])}}}),Fye=ae(xye,[["__scopeId","data-v-e2284e06"]]),zye={id:"authorize-oauth2-app"},Wye={key:0},Gye={id:"authorize-oauth2-title"},Bye={class:"oauth2-access description-list"},Hye={class:"client-scope"},Vye=["innerHTML"],jye={class:"authorize-oauth2-buttons"},Kye={key:1},Yye={class:"no-app"},qye=Z({__name:"AuthorizeUserApp",setup(e){const t=qt(),n=Me(),a=k(()=>n.getters[Ye.GETTERS.CLIENT]),r=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]);Ct(()=>s());function s(){t.query.client_id&&typeof t.query.client_id=="string"&&n.dispatch(Ye.ACTIONS.GET_CLIENT_BY_CLIENT_ID,t.query.client_id)}function i(){n.dispatch(Ye.ACTIONS.AUTHORIZE_CLIENT,{client_id:`${t.query.client_id}`,redirect_uri:`${t.query.redirect_uri}`,response_type:`${t.query.response_type}`,scope:`${t.query.scope}`,state:`${t.query.state?t.query.state:""}`,code_challenge:`${t.query.code_challenge?t.query.code_challenge:""}`,code_challenge_method:`${t.query.code_challenge_method?t.query.code_challenge_method:""}`})}return(o,u)=>{const c=oe("router-link"),l=oe("i18n-t"),f=oe("ErrorMessage");return A(),v("div",zye,[a.value.client_id?(A(),v("div",Wye,[E("h1",Gye,[$(l,{keypath:"oauth2.AUTHORIZE_APP"},{default:ue(()=>[$(c,{to:{name:"UserApp",params:{id:a.value.id}}},{default:ue(()=>[j(T(a.value.name),1)]),_:1},8,["to"])]),_:1})]),r.value?(A(),te(f,{key:0,message:r.value},null,8,["message"])):x("",!0),E("div",Bye,[E("p",null,T(o.$t("oauth2.APP_REQUESTING_ACCESS")),1),E("dl",null,[(A(!0),v(be,null,Ge(a.value.scope.split(" "),d=>(A(),v(be,{key:d},[E("dt",Hye,[E("code",null,T(d),1)]),E("dd",{innerHTML:o.$t(`oauth2.APP.SCOPE.${d}_DESCRIPTION`)},null,8,Vye)],64))),128))]),E("div",jye,[E("button",{class:"danger",onClick:i},T(o.$t("buttons.AUTHORIZE")),1),E("button",{class:"cancel",onClick:u[0]||(u[0]=d=>o.$router.push("/profile/apps"))},T(o.$t("buttons.CANCEL")),1)])])])):(A(),v("div",Kye,[E("p",Yye,T(o.$t("oauth2.NO_APP")),1),E("button",{onClick:u[1]||(u[1]=d=>o.$router.push("/profile/apps"))},T(o.$t("buttons.BACK")),1)]))])}}}),Xye=ae(qye,[["__scopeId","data-v-a8ed6bf8"]]),Zye={id:"oauth2-apps"},Qye=Z({__name:"index",props:{user:{}},setup(e){const t=e,n=Me(),{user:a}=_e(t);return Nt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),n.commit(Ye.MUTATIONS.SET_CLIENTS,[])}),(r,s)=>{const i=oe("router-view");return A(),v("div",Zye,[$(i,{authUser:h(a)},null,8,["authUser"])])}}}),Jye={id:"oauth2-app",class:"description-list"},eDe={key:1},tDe={key:0,class:"info-box success-message"},nDe=["title"],aDe={key:0},rDe={key:1,class:"app-secret"},sDe=["title"],iDe={class:"client-scopes"},oDe={class:"app-buttons"},uDe={key:2},lDe={class:"no-app"},cDe=Z({__name:"UserApp",props:{authUser:{},afterCreation:{type:Boolean,default:!1}},setup(e){const t=e,n=qt(),a=Me(),{afterCreation:r,authUser:s}=_e(t),i=k(()=>a.getters[Ye.GETTERS.CLIENT]),o=k(()=>a.getters[Ye.GETTERS.REVOCATION_SUCCESSFUL]),u=ce(!1),c=ce(""),l=ce(!1),f=ce(!1),d=ce(!1);Ct(()=>{p(),navigator.clipboard&&(d.value=!0)});function p(){!r.value&&n.params.id&&typeof n.params.id=="string"&&a.dispatch(Ye.ACTIONS.GET_CLIENT_BY_ID,+n.params.id)}function m(S){c.value=S?"oauth2.APP_DELETION_CONFIRMATION":"oauth2.TOKENS_REVOCATION_CONFIRMATION",I(!0)}function I(S){u.value=S,S||(c.value="")}function b(S){c.value==="oauth2.APP_DELETION_CONFIRMATION"?a.dispatch(Ye.ACTIONS.DELETE_CLIENT,S):a.dispatch(Ye.ACTIONS.REVOKE_ALL_TOKENS,S)}function R(){navigator.clipboard.writeText(i.value.client_id),l.value=!0,f.value=!1,setTimeout(()=>{l.value=!1},3e3)}function N(){i.value.client_secret&&(navigator.clipboard.writeText(i.value.client_secret),f.value=!0,l.value=!1,setTimeout(()=>{f.value=!1},3e3))}return Nt(()=>{a.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),a.commit(Ye.MUTATIONS.EMPTY_CLIENT),a.commit(Ye.MUTATIONS.SET_REVOCATION_SUCCESSFUL,!1)}),We(()=>o.value,S=>{S&&I(!1)}),(S,O)=>{const C=oe("Modal");return A(),v("div",Jye,[u.value?(A(),te(C,{key:0,title:S.$t("common.CONFIRMATION"),message:S.$t(c.value),onConfirmAction:O[0]||(O[0]=P=>b(i.value.id)),onCancelAction:O[1]||(O[1]=P=>I(!1)),onKeydown:O[2]||(O[2]=At(P=>I(!1),["esc"]))},null,8,["title","message"])):x("",!0),i.value&&i.value.client_id?(A(),v("div",eDe,[h(r)||o.value?(A(),v("div",tDe,T(S.$t(h(r)?"oauth2.APP_CREATED_SUCCESSFULLY":"oauth2.TOKENS_REVOKED")),1)):x("",!0),E("dl",null,[E("dt",null,T(S.$t("oauth2.APP.CLIENT_ID"))+":",1),E("dd",null,[j(T(i.value.client_id)+" ",1),h(r)&&d.value?(A(),v("i",{key:0,class:Se(`fa fa-${l.value?"check":"copy"}`),"aria-hidden":"true",title:S.$t("oauth2.COPY_TO_CLIPBOARD"),onClick:R},null,10,nDe)):x("",!0)]),h(r)&&i.value.client_secret?(A(),v("dt",aDe,T(S.$t("oauth2.APP.CLIENT_SECRET"))+": ",1)):x("",!0),h(r)&&i.value.client_secret?(A(),v("dd",rDe,[j(T(i.value.client_secret)+" ",1),d.value?(A(),v("i",{key:0,class:Se(`fa fa-${f.value?"check":"copy"}`),"aria-hidden":"true",title:S.$t("oauth2.COPY_TO_CLIPBOARD"),onClick:N},null,10,sDe)):x("",!0)])):x("",!0),E("dt",null,T(bt(S.$t("oauth2.APP.ISSUE_AT")))+":",1),E("dd",null,[E("time",null,T(h($n)(i.value.issued_at,h(s).timezone,h(s).date_format)),1)]),E("dt",null,T(S.$t("oauth2.APP.NAME"))+":",1),E("dd",null,T(i.value.name),1),E("dt",null,T(S.$t("oauth2.APP.DESCRIPTION"))+":",1),E("dd",{class:Se({"no-description":!i.value.client_description})},T(i.value.client_description?i.value.client_description:S.$t("oauth2.NO_DESCRIPTION")),3),E("dt",null,T(S.$t("oauth2.APP.URL"))+":",1),E("dd",null,T(i.value.website),1),E("dt",null,T(S.$t("oauth2.APP.REDIRECT_URL"))+":",1),E("dd",null,T(i.value.redirect_uris.length>0?i.value.redirect_uris[0]:""),1),E("dt",null,T(S.$t("oauth2.APP.SCOPE.LABEL"))+":",1),E("dd",iDe,[(A(!0),v(be,null,Ge(i.value.scope.split(" "),P=>(A(),v("span",{class:"client-scope",key:P},[E("code",null,T(P),1)]))),128))])]),E("div",oDe,[E("button",{class:"danger",onClick:O[3]||(O[3]=P=>m(!1))},T(S.$t("oauth2.REVOKE_ALL_TOKENS")),1),E("button",{class:"danger",onClick:O[4]||(O[4]=P=>m(!0))},T(S.$t("oauth2.DELETE_APP")),1),E("button",{onClick:O[5]||(O[5]=P=>S.$router.push("/profile/apps"))},T(S.$t("buttons.BACK")),1)])])):(A(),v("div",uDe,[E("p",lDe,T(S.$t("oauth2.NO_APP")),1),E("button",{onClick:O[6]||(O[6]=P=>S.$router.push("/profile/apps"))},T(S.$t("buttons.BACK")),1)]))])}}}),Qm=ae(cDe,[["__scopeId","data-v-3a7d0f4a"]]),dDe={id:"oauth2-apps-list"},fDe={class:"apps-list"},EDe={key:0},pDe={class:"app-issued-at"},mDe={key:1,class:"no-apps"},hDe={class:"app-list-buttons"},_De=Z({__name:"UserAppsList",props:{authUser:{}},setup(e){const t=e,n=Me(),a=qt(),{authUser:r}=_e(t),s=k(()=>n.getters[Ye.GETTERS.CLIENTS]),i=k(()=>n.getters[Ye.GETTERS.CLIENTS_PAGINATION]);let o=u(a.query);Ct(()=>{c(o)});function u(l){const f={};return l.page&&(f.page=Cd(l.page,Xg)),f}function c(l){n.dispatch(Ye.ACTIONS.GET_CLIENTS,l)}return We(()=>a.query,async l=>{o=u(l),c(o)}),(l,f)=>{const d=oe("router-link");return A(),v("div",dDe,[E("p",fDe,T(l.$t("oauth2.APPS_LIST")),1),s.value.length>0?(A(),v("ul",EDe,[(A(!0),v(be,null,Ge(s.value,p=>(A(),v("li",{key:p.client_id},[$(d,{to:{name:"UserApp",params:{id:p.id}}},{default:ue(()=>[j(T(p.name),1)]),_:2},1032,["to"]),E("span",pDe,[j(T(l.$t("oauth2.APP.ISSUE_AT"))+" ",1),E("time",null,T(h($n)(p.issued_at,h(r).timezone,h(r).date_format)),1)])]))),128))])):(A(),v("div",mDe,T(l.$t("oauth2.NO_APPS")),1)),s.value.length>0?(A(),te(ku,{key:2,pagination:i.value,path:"/profile/apps",query:h(o)},null,8,["pagination","query"])):x("",!0),E("div",hDe,[E("button",{onClick:f[0]||(f[0]=p=>l.$router.push("/profile/apps/new"))},T(l.$t("oauth2.NEW_APP")),1),E("button",{onClick:f[1]||(f[1]=p=>l.$router.push("/"))},T(l.$t("common.HOME")),1)])])}}}),TDe=ae(_De,[["__scopeId","data-v-064a87b7"]]),gDe={id:"user-sport-preferences"},ADe={key:0,class:"responsive-table"},SDe={class:"mobile-display"},ODe={key:0,class:"profile-buttons mobile-display"},IDe={key:1,class:"profile-buttons"},RDe={class:"text-left"},bDe={key:0},NDe={class:"cell-heading"},vDe=["value"],CDe={class:"cell-heading"},yDe={key:0,class:"disabled-message"},DDe={key:1,class:"fa fa-refresh fa-spin fa-fw"},PDe={class:"cell-heading"},LDe={class:"cell-heading"},wDe=["checked"],kDe={class:"cell-heading"},$De=["value"],UDe={key:1},MDe={key:0,class:"action-buttons"},xDe={class:"cell-heading"},FDe=["onClick"],zDe={key:1,class:"edition-buttons"},WDe=["disabled"],GDe=["disabled","onClick"],BDe=["disabled"],HDe={key:0,class:"profile-buttons"},VDe={key:1,class:"profile-buttons"},jDe="#838383",KDe=Z({__name:"UserSportPreferences",props:{user:{},isEdition:{type:Boolean}},setup(e){const t=e,n=Me(),{t:a}=Yt(),{isEdition:r,user:s}=_e(t),i=It("sportColors"),o=k(()=>n.getters[Mt.GETTERS.SPORTS]),u=k(()=>Xa(o.value,a,"is_active",s.value.sports_list)),c=k(()=>n.getters[K.GETTERS.USER_LOADING]),l=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),f=Gt({sport_id:0,color:null,is_active:!0,stopped_speed_threshold:1});function d(O){O!==null?(f.sport_id=O.id,f.color=O.color?O.color:i?i[O.label]:jDe,f.is_active=O.is_active_for_user,f.stopped_speed_threshold=O.stopped_speed_threshold):R()}function p(O){return f.sport_id===O}function m(O){f.color=O.target.value}function I(O){f.stopped_speed_threshold=parseFloat(O.target.value)}function b(O){f.is_active=O.target.checked}function R(){f.sport_id=0,f.color=null,f.is_active=!0,f.stopped_speed_threshold=1,n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}function N(O){O.preventDefault(),n.dispatch(K.ACTIONS.UPDATE_USER_SPORT_PREFERENCES,f)}function S(O,C){O.preventDefault(),n.dispatch(K.ACTIONS.RESET_USER_SPORT_PREFERENCES,C)}return We(()=>c.value,O=>{!O&&!l.value&&R()}),(O,C)=>{const P=oe("SportImage"),M=oe("ErrorMessage");return A(),v("div",gDe,[o.value.length>0?(A(),v("div",ADe,[E("div",SDe,[h(r)?(A(),v("div",ODe,[E("button",{class:"cancel",onClick:C[0]||(C[0]=Je(L=>O.$router.push("/profile/sports"),["prevent"]))},T(O.$t("buttons.BACK")),1)])):(A(),v("div",IDe,[E("button",{onClick:C[1]||(C[1]=L=>O.$router.push("/profile/edit/sports"))},T(O.$t("user.PROFILE.EDIT_SPORTS_PREFERENCES")),1),E("button",{onClick:C[2]||(C[2]=L=>O.$router.push("/"))},T(O.$t("common.HOME")),1)]))]),E("table",null,[E("thead",null,[E("tr",null,[E("th",null,T(O.$t("user.PROFILE.SPORT.COLOR")),1),E("th",RDe,T(O.$t("workouts.SPORT",0)),1),E("th",null,T(O.$t("workouts.WORKOUT",0)),1),E("th",null,T(O.$t("user.PROFILE.SPORT.IS_ACTIVE")),1),E("th",null,T(O.$t("user.PROFILE.SPORT.STOPPED_SPEED_THRESHOLD")),1),h(r)?(A(),v("th",bDe,T(O.$t("user.PROFILE.SPORT.ACTION")),1)):x("",!0)])]),E("tbody",null,[(A(!0),v(be,null,Ge(u.value,L=>(A(),v("tr",{key:L.id},[E("td",null,[E("span",NDe,T(O.$t("user.PROFILE.SPORT.COLOR")),1),p(L.id)?(A(),v("input",{key:0,class:"sport-color",type:"color",value:f.color,onInput:m},null,40,vDe)):(A(),te(P,{key:1,title:L.translatedLabel,"sport-label":L.label,color:L.color?L.color:h(i)[L.label]},null,8,["title","sport-label","color"]))]),E("td",{class:Se(["sport-label",{"disabled-sport":!L.is_active}])},[E("span",CDe,T(O.$t("user.PROFILE.SPORT.LABEL")),1),j(" "+T(L.translatedLabel)+" ",1),L.is_active?x("",!0):(A(),v("span",yDe," ("+T(O.$t("user.PROFILE.SPORT.DISABLED_BY_ADMIN"))+") ",1)),c.value&&p(L.id)?(A(),v("i",DDe)):x("",!0),l.value&&f.sport_id===L.id?(A(),te(M,{key:2,message:l.value},null,8,["message"])):x("",!0)],2),E("td",{class:Se(["text-center",{"disabled-sport":!L.is_active}])},[E("span",PDe,T(O.$t("workouts.WORKOUT",0)),1),E("i",{class:Se(`fa fa${h(s).sports_list.includes(L.id)?"-check":""}`),"aria-hidden":"true"},null,2)],2),E("td",{class:Se(["text-center",{"disabled-sport":!L.is_active}])},[E("span",LDe,T(O.$t("user.PROFILE.SPORT.IS_ACTIVE")),1),p(L.id)&&L.is_active?(A(),v("input",{key:0,type:"checkbox",checked:L.is_active_for_user,onChange:b},null,40,wDe)):(A(),v("i",{key:1,class:Se(`fa fa${L.is_active_for_user?"-check":""}`),"aria-hidden":"true"},null,2))],2),E("td",{class:Se(["text-center",{"disabled-sport":!L.is_active}])},[E("span",kDe,T(O.$t("user.PROFILE.SPORT.STOPPED_SPEED_THRESHOLD")),1),p(L.id)&&L.is_active?(A(),v("input",{key:0,class:"threshold-input",type:"number",min:"0",step:"0.1",value:f.stopped_speed_threshold,onInput:I},null,40,$De)):(A(),v("span",UDe,T(L.stopped_speed_threshold),1))],2),h(r)?(A(),v("td",MDe,[E("span",xDe,T(O.$t("user.PROFILE.SPORT.ACTION")),1),f.sport_id===0?(A(),v("button",{key:0,onClick:W=>d(L)},T(O.$t("buttons.EDIT")),9,FDe)):x("",!0),p(L.id)?(A(),v("div",zDe,[E("button",{disabled:c.value,onClick:N},T(O.$t("buttons.SUBMIT")),9,WDe),E("button",{disabled:c.value,onClick:W=>S(W,L.id)},T(O.$t("buttons.RESET")),9,GDe),E("button",{disabled:c.value,onClick:C[3]||(C[3]=W=>d(null))},T(O.$t("buttons.CANCEL")),9,BDe)])):x("",!0)])):x("",!0)]))),128))])]),h(r)?(A(),v("div",HDe,[E("button",{class:"cancel",onClick:C[4]||(C[4]=Je(L=>O.$router.push("/profile/sports"),["prevent"]))},T(O.$t("buttons.BACK")),1)])):(A(),v("div",VDe,[E("button",{onClick:C[5]||(C[5]=L=>O.$router.push("/profile/edit/sports"))},T(O.$t("user.PROFILE.EDIT_SPORTS_PREFERENCES")),1),E("button",{onClick:C[6]||(C[6]=L=>O.$router.push("/"))},T(O.$t("common.HOME")),1)]))])):x("",!0)])}}}),Jm=ae(KDe,[["__scopeId","data-v-aa4857fe"]]),Li=e=>(ut("data-v-34b1686b"),e=e(),lt(),e),YDe={class:"about-text"},qDe=["innerHTML"],XDe=Li(()=>E("i",{class:"fa fa-book fa-padding","aria-hidden":"true"},null,-1)),ZDe=["href"],QDe=Li(()=>E("i",{class:"fa fa-github fa-padding","aria-hidden":"true"},null,-1)),JDe={href:"https://github.com/SamR1/FitTrackee",target:"_blank",rel:"noopener noreferrer"},ePe=Li(()=>E("i",{class:"fa fa-balance-scale fa-padding","aria-hidden":"true"},null,-1)),tPe=Li(()=>E("a",{href:"https://choosealicense.com/licenses/agpl-3.0/",target:"_blank",rel:"noopener noreferrer"},"AGPLv3",-1)),nPe={key:0},aPe=Li(()=>E("i",{class:"fa fa-envelope-o fa-padding","aria-hidden":"true"},null,-1)),rPe=["href"],sPe={key:1},iPe=["href"],oPe={class:"about-instance"},uPe=["innerHTML"],lPe=Z({__name:"About",setup(e){const t=Me(),n=k(()=>t.getters[H.GETTERS.APP_CONFIG]),a=k(()=>i()),r=k(()=>t.getters[H.GETTERS.LANGUAGE]),s=k(()=>o());function i(){const u={};return n.value.weather_provider==="visualcrossing"&&(u.name="Visual Crossing",u.url="https://www.visualcrossing.com"),u}function o(){let u="https://samr1.github.io/FitTrackee/";return r.value==="fr"&&(u+="fr/"),u}return(u,c)=>{const l=oe("i18n-t");return A(),v("div",YDe,[E("div",null,[E("p",{class:"error-message",innerHTML:u.$t("about.FITTRACKEE_DESCRIPTION")},null,8,qDe),E("p",null,[XDe,E("a",{class:"documentation-link",href:s.value,target:"_blank",rel:"noopener noreferrer"},T(bt(u.$t("common.DOCUMENTATION"))),9,ZDe)]),E("p",null,[QDe,E("a",JDe,T(u.$t("about.SOURCE_CODE")),1)]),E("p",null,[ePe,$(l,{keypath:"about.FITTRACKEE_LICENSE"},{default:ue(()=>[tPe]),_:1})]),n.value.admin_contact?(A(),v("div",nPe,[aPe,E("a",{href:`mailto:${n.value.admin_contact}`},T(u.$t("about.CONTACT_ADMIN")),9,rPe)])):x("",!0),a.value&&a.value.name?(A(),v("div",sPe,[j(T(u.$t("about.WEATHER_DATA_FROM"))+" ",1),E("a",{href:a.value.url,target:"_blank",rel:"nofollow noopener"},T(a.value.name),9,iPe)])):x("",!0),n.value.about?(A(),v(be,{key:2},[E("p",oPe,T(u.$t("about.ABOUT_THIS_INSTANCE")),1),E("div",{innerHTML:h(lr)(h(di)(n.value.about))},null,8,uPe)],64)):x("",!0)])])}}}),cPe=ae(lPe,[["__scopeId","data-v-34b1686b"]]),dPe={},fPe={id:"bike"},EPe=["src"];function pPe(e,t){return A(),v("div",fPe,[E("img",{class:"bike-img",src:"/img/bike.svg",alt:"mountain bike"},null,8,EPe)])}const SA=ae(dPe,[["render",pPe],["__scopeId","data-v-dc181e30"]]),mPe={id:"about",class:"view"},hPe={class:"container"},_Pe={class:"container-sub"},TPe={class:"container-sub about-details"},gPe=Z({__name:"AboutView",setup(e){return(t,n)=>(A(),v("div",mPe,[E("div",hPe,[E("div",_Pe,[$(SA)]),E("div",TPe,[$(cPe)])])]))}}),APe=ae(gPe,[["__scopeId","data-v-ef9c7198"]]),SPe={id:"error"},OPe={class:"error-content"},IPe=Z({__name:"Error",props:{title:{},message:{},buttonText:{},path:{default:"/"}},setup(e){const t=e,{buttonText:n,title:a,message:r,path:s}=_e(t);return(i,o)=>(A(),v("div",SPe,[E("div",OPe,[E("h1",null,T(h(a)),1),E("p",null,T(h(r)),1),h(n)?(A(),v("button",{key:0,onClick:o[0]||(o[0]=u=>i.$router.push(h(s))),class:"upper"},T(h(n)),1)):x("",!0)])]))}}),RPe=ae(IPe,[["__scopeId","data-v-48ec856d"]]),dE=Z({__name:"NotFound",props:{target:{default:"PAGE"}},setup(e){const t=e,{target:n}=_e(t),a=ce(),r=ce(!1);_t(()=>s());function s(){a.value=setTimeout(()=>{r.value=!0},500)}return Nt(()=>{a.value&&clearTimeout(a.value)}),(i,o)=>r.value?(A(),te(RPe,{key:0,title:"404",message:i.$t(`error.NOT_FOUND.${h(n)}`),"button-text":i.$t("common.HOME")},null,8,["message","button-text"])):x("",!0)}}),bPe=e=>(ut("data-v-5eee0876"),e=e(),lt(),e),NPe={id:"admin",class:"view"},vPe={key:0,class:"container"},CPe=bPe(()=>E("div",{id:"bottom"},null,-1)),yPe=Z({__name:"AdminView",setup(e){const t=Me(),n=k(()=>t.getters[H.GETTERS.APP_CONFIG]),a=k(()=>t.getters[H.GETTERS.APP_STATS]),r=k(()=>t.getters[K.GETTERS.IS_ADMIN]),s=k(()=>t.getters[K.GETTERS.USER_LOADING]);return Ct(()=>t.dispatch(H.ACTIONS.GET_APPLICATION_STATS)),(i,o)=>{const u=oe("router-view");return A(),v("div",NPe,[s.value?x("",!0):(A(),v("div",vPe,[r.value?(A(),te(u,{key:0,appConfig:n.value,appStatistics:a.value},null,8,["appConfig","appStatistics"])):(A(),te(dE,{key:1})),CPe]))])}}}),DPe=ae(yPe,[["__scopeId","data-v-5eee0876"]]),OA="/img/workouts/mountains.svg",PPe=E("div",{class:"map-attribution"},[E("span",{class:"map-attribution-text"},"©"),E("a",{class:"map-attribution-text",href:"https://www.openstreetmap.org/copyright",target:"_blank",rel:"noopener noreferrer"}," OpenStreetMap ")],-1),IA=Z({__name:"StaticMap",props:{workout:{},displayHover:{type:Boolean,default:!1}},setup(e){const t=e,{displayHover:n}=_e(t),a=`${Si()}workouts/map/${t.workout.map}`;return(r,s)=>(A(),v("div",{class:Se(["static-map",{"display-hover":h(n)}])},[h(n)?(A(),v("img",{key:0,src:a,alt:""})):(A(),v("div",{key:1,class:"bg-map-image",style:Va({backgroundImage:`url(${a})`})},null,4)),PPe],2))}}),fE=e=>(ut("data-v-0bcae633"),e=e(),lt(),e),LPe={class:"timeline-workout"},wPe={class:"box"},kPe={class:"workout-user-date"},$Pe={class:"workout-user"},UPe=["title"],MPe={key:0},xPe={key:1,class:"no-map"},FPe={class:"img"},zPe={class:"data"},WPe=fE(()=>E("i",{class:"fa fa-clock-o","aria-hidden":"true"},null,-1)),GPe={key:0},BPe={class:"data"},HPe=fE(()=>E("i",{class:"fa fa-road","aria-hidden":"true"},null,-1)),VPe={key:0,class:"data elevation"},jPe=["alt"],KPe={class:"data-values"},YPe={key:1,class:"data altitude"},qPe=fE(()=>E("i",{class:"fa fa-location-arrow","aria-hidden":"true"},null,-1)),XPe={class:"data-values"},ZPe=Z({__name:"WorkoutCard",props:{user:{},useImperialUnits:{type:Boolean},workout:{default:()=>({})},sport:{default:()=>({})}},setup(e){const t=e,n=Me(),{user:a,workout:r,sport:s,useImperialUnits:i}=_e(t),o=k(()=>n.getters[H.GETTERS.LOCALE]);function u(l){return l.with_gpx&&l.min_alt!==null&&l.max_alt!==null}function c(l){return u(l)&&l.ascent!==null&&l.descent!==null}return(l,f)=>{var I;const d=oe("router-link"),p=oe("SportImage"),m=oe("Distance");return A(),v("div",LPe,[E("div",wPe,[E("div",kPe,[E("div",$Pe,[$(Oi,{user:h(a)},null,8,["user"]),h(a).username?(A(),te(d,{key:0,class:"workout-user-name",to:{name:"User",params:{username:h(a).username}}},{default:ue(()=>[j(T(h(a).username),1)]),_:1},8,["to"])):x("",!0)]),h(r).id?(A(),te(d,{key:0,class:"workout-title",to:{name:"Workout",params:{workoutId:h(r).id}}},{default:ue(()=>[j(T(h(r).title),1)]),_:1},8,["to"])):x("",!0),h(r).workout_date&&h(a)?(A(),v("div",{key:1,class:"workout-date",title:h($n)(h(r).workout_date,h(a).timezone,h(a).date_format)},T(h(q2)(new Date(h(r).workout_date),new Date,{addSuffix:!0,locale:o.value})),9,UPe)):x("",!0)]),E("div",{class:Se(["workout-map",{"no-cursor":!h(r)}]),onClick:f[0]||(f[0]=b=>h(r).id?l.$router.push({name:"Workout",params:{workoutId:h(r).id}}):null)},[h(r)?(A(),v("div",MPe,[h(r).with_gpx?(A(),te(IA,{key:0,workout:h(r)},null,8,["workout"])):(A(),v("div",xPe,T(l.$t("workouts.NO_MAP")),1))])):x("",!0)],2),E("div",{class:Se(["workout-data",{"without-elevation":!u(h(r))}]),onClick:f[1]||(f[1]=b=>h(r).id?l.$router.push({name:"Workout",params:{workoutId:h(r).id}}):null)},[E("div",FPe,[(I=h(s))!=null&&I.label?(A(),te(p,{key:0,"sport-label":h(s).label,color:h(s).color},null,8,["sport-label","color"])):x("",!0)]),E("div",zPe,[WPe,h(r)?(A(),v("span",GPe,T(h(r).moving),1)):x("",!0)]),E("div",BPe,[HPe,h(r).id?(A(),te(m,{key:0,distance:h(r).distance,digits:3,unitFrom:"km",useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0)]),u(h(r))?(A(),v("div",VPe,[E("img",{class:"mountains",src:OA,alt:l.$t("workouts.ELEVATION")},null,8,jPe),E("div",KPe,[h(r).id?(A(),te(m,{key:0,distance:h(r).min_alt,unitFrom:"m",displayUnit:!1,useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0),j("/ "),h(r).id?(A(),te(m,{key:1,distance:h(r).max_alt,unitFrom:"m",useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0)])])):x("",!0),c(h(r))?(A(),v("div",YPe,[qPe,E("div",XPe,[j(" +"),h(r).id?(A(),te(m,{key:0,distance:h(r).ascent,unitFrom:"m",displayUnit:!1,useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0),j("/- "),h(r).id?(A(),te(m,{key:1,distance:h(r).descent,unitFrom:"m",useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0)])])):x("",!0)],2)])])}}}),eh=ae(ZPe,[["__scopeId","data-v-0bcae633"]]),QPe={},JPe={class:"no-workouts box"};function e4e(e,t){const n=oe("router-link");return A(),v("div",JPe,[E("div",null,[j(T(e.$t("workouts.NO_WORKOUTS"))+" ",1),$(n,{to:"/workouts/add"},{default:ue(()=>[j(T(e.$t("workouts.UPLOAD_FIRST_WORKOUT")),1)]),_:1})])])}const EE=ae(QPe,[["render",e4e],["__scopeId","data-v-b0c91cc6"]]),$a={ligthMode:{text:"#666",line:"rgba(0, 0, 0, 0.1)"},darkMode:{text:"#a1a1a1",line:"#3f3f3f"}},t4e=(e,t,n,a=!1)=>{const r={speed:{label:t("workouts.SPEED"),backgroundColor:["transparent"],borderColor:[a?"#5f5c97":"#8884d8"],borderWidth:2,data:[],yAxisID:"ySpeed"},elevation:{label:t("workouts.ELEVATION"),backgroundColor:[a?"#303030":"#e5e5e5"],borderColor:[a?"#222222":"#cccccc"],borderWidth:1,fill:!0,data:[],yAxisID:"yElevation"}},s=[],i=[],o=[];return e.map(u=>{s.push(Ro("km",u.distance,n)),i.push(u.duration),r.speed.data.push(Ro("km",u.speed,n)),u.elevation!==void 0&&r.elevation.data.push(Ro("m",u.elevation,n)),o.push({latitude:u.latitude,longitude:u.longitude})}),{distance_labels:s,duration_labels:i,datasets:r,coordinates:o}},n4e=e=>{const t=e.length;if(t===0)return{};const n={};return e.map(a=>{n[a.sport_id]||(n[a.sport_id]={count:0,percentage:0}),n[a.sport_id].count+=1,n[a.sport_id].percentage=n[a.sport_id].count/t}),n},Ei={order:"desc",order_by:"workout_date"},a4e={id:"timeline"},r4e={class:"section-title"},s4e={key:0},i4e={key:1},o4e={key:1,class:"more-workouts"},uo=5,u4e=Z({__name:"Timeline",props:{sports:{},user:{}},setup(e){const t=e,n=Me(),{sports:a,user:r}=_e(t),s=ce(1),i=t.user.nb_workouts>=uo?uo:t.user.nb_workouts;Ct(()=>c());const o=k(()=>n.getters[Ae.GETTERS.TIMELINE_WORKOUTS]),u=k(()=>o.value.length>0?o.value[o.value.length-1].previous_workout!==null:!1);function c(){n.dispatch(Ae.ACTIONS.GET_TIMELINE_WORKOUTS,{page:s.value,per_page:uo,...Ei})}function l(){s.value+=1,n.dispatch(Ae.ACTIONS.GET_MORE_TIMELINE_WORKOUTS,{page:s.value,per_page:uo,...Ei})}return(f,d)=>(A(),v("div",a4e,[E("div",r4e,T(f.$t("workouts.LATEST_WORKOUTS")),1),h(r).nb_workouts>0&&o.value.length===0?(A(),v("div",s4e,[(A(!0),v(be,null,Ge([...Array(h(i)).keys()],p=>(A(),te(eh,{user:h(r),useImperialUnits:h(r).imperial_units,key:p},null,8,["user","useImperialUnits"]))),128))])):(A(),v("div",i4e,[(A(!0),v(be,null,Ge(o.value,p=>(A(),te(eh,{workout:p,sport:o.value.length>0?h(a).filter(m=>m.id===p.sport_id)[0]:null,user:h(r),useImperialUnits:h(r).imperial_units,key:p.id},null,8,["workout","sport","user","useImperialUnits"]))),128)),o.value.length===0?(A(),te(EE,{key:0})):x("",!0),u.value?(A(),v("div",o4e,[E("button",{onClick:l},T(f.$t("workouts.LOAD_MORE_WORKOUT")),1)])):x("",!0)]))]))}}),l4e=ae(u4e,[["__scopeId","data-v-e0964959"]]),c4e=["title"],RA=Z({__name:"CalendarWorkout",props:{displayHARecord:{type:Boolean},workout:{},sportLabel:{},sportColor:{}},setup(e){const t=e,{displayHARecord:n,workout:a,sportLabel:r,sportColor:s}=_e(t);return(i,o)=>{const u=oe("SportImage"),c=oe("router-link");return A(),te(c,{class:"calendar-workout",to:{name:"Workout",params:{workoutId:h(a).id}}},{default:ue(()=>[$(u,{"sport-label":h(r),title:h(a).title,color:h(s)},null,8,["sport-label","title","color"]),E("sup",null,[h(a).records.length>0?(A(),v("i",{key:0,class:"fa fa-trophy custom-fa-small","aria-hidden":"true",title:h(a).records.filter(l=>h(n)?!0:l.record_type!=="HA").map(l=>` ${i.$t(`workouts.RECORD_${l.record_type}`)}`)[0]},null,8,c4e)):x("",!0)])]),_:1},8,["to"])}}}),d4e={class:"donut-chart"},f4e={height:"34",width:"34",viewBox:"0 0 34 34"},E4e=["stroke","stroke-dashoffset","transform"],th=16,nh=16,ah=14,p4e=Z({__name:"DonutChart",props:{colors:{},datasets:{}},setup(e){const t=e,{colors:n,datasets:a}=_e(t);let r=-90;const s=2*Math.PI*ah;function i(u,c){return c-u*c}function o(u,c){const l=`rotate(${r}, ${th}, ${nh})`;return r=c*360+r,l}return(u,c)=>(A(),v("div",d4e,[(A(),v("svg",f4e,[(A(!0),v(be,null,Ge(Object.entries(h(a)),(l,f)=>(A(),v("g",{key:f},[E("circle",{cx:th,cy:nh,r:ah,fill:"transparent",stroke:h(n)[+l[0]],"stroke-dashoffset":i(l[1].percentage,s),"stroke-dasharray":s,"stroke-width":"3","stroke-opacity":"0.8",transform:o(f,l[1].percentage)},null,8,E4e)]))),128))]))]))}}),m4e=e=>(ut("data-v-c143b24d"),e=e(),lt(),e),h4e={class:"calendar-workouts-chart"},_4e=["id"],T4e={class:"workouts-count"},g4e={key:0,class:"workouts-pane"},A4e=["id"],S4e=m4e(()=>E("i",{class:"fa fa-times","aria-hidden":"true"},null,-1)),O4e=[S4e],I4e=Z({__name:"CalendarWorkoutsChart",props:{colors:{},datasets:{},sports:{},workouts:{},displayHARecord:{type:Boolean},index:{}},setup(e){const t=e;let n=0;const{colors:a,datasets:r,index:s,sports:i,workouts:o}=_e(t),u=ce(!0);function c(){const d=document.getElementById(`workouts-pane-${s.value}`);return d!=null&&d.children&&(d==null?void 0:d.children.length)>0?d:null}async function l(d){var m;d.preventDefault(),d.stopPropagation(),u.value=!u.value,await nn();const p=c();u.value?(m=document.getElementById(`workouts-donut-${s.value}`))==null||m.focus():(p==null?void 0:p.children[0]).focus()}function f(d){if(!u.value){if(!u.value&&(d.key==="Tab"||d.keyCode===9)){d.preventDefault(),d.stopPropagation();const p=c();p&&(d.shiftKey?(n-=1,n<0&&(n=p.children.length-1)):(n+=1,n>=p.children.length&&(n=0)),p.children[n].focus())}d.key==="Escape"&&l(d)}}return _t(()=>{document.addEventListener("keydown",f)}),Nt(()=>{document.removeEventListener("keydown",f)}),(d,p)=>{const m=fO("click-outside");return A(),v("div",h4e,[E("button",{class:"workouts-chart transparent",id:`workouts-donut-${h(s)}`,onClick:l},[E("div",T4e,T(h(o).length),1),$(p4e,{datasets:h(r),colors:h(a)},null,8,["datasets","colors"])],8,_4e),u.value?x("",!0):(A(),v("div",g4e,[qe((A(),v("div",{class:"more-workouts",id:`workouts-pane-${h(s)}`},[E("button",{class:"calendar-more-close transparent",onClick:l},O4e),(A(!0),v(be,null,Ge(h(o),(I,b)=>(A(),te(RA,{key:b,displayHARecord:d.displayHARecord,workout:I,sportLabel:h(sE)(I,h(i)),sportColor:h(iE)(I,h(i))},null,8,["displayHARecord","workout","sportLabel","sportColor"]))),128))],8,A4e)),[[m,l]])]))])}}}),rh=ae(I4e,[["__scopeId","data-v-c143b24d"]]),R4e={class:"calendar-workouts"},b4e={class:"desktop-display"},N4e={key:0,class:"workouts-display"},v4e={key:1,class:"donut-display"},C4e={class:"mobile-display"},y4e={key:0,class:"donut-display"},sh=6,D4e=Z({__name:"CalendarWorkouts",props:{displayHARecord:{type:Boolean},workouts:{},sports:{},index:{}},setup(e){const t=e,{displayHARecord:n,index:a,sports:r,workouts:s}=_e(t),i=k(()=>n4e(t.workouts)),o=k(()=>gRe(t.sports));return(u,c)=>(A(),v("div",R4e,[E("div",b4e,[h(s).length<=sh?(A(),v("div",N4e,[(A(!0),v(be,null,Ge(h(s).slice(0,sh),(l,f)=>(A(),te(RA,{key:f,displayHARecord:h(n),workout:l,sportLabel:h(sE)(l,h(r)),sportColor:h(iE)(l,h(r))},null,8,["displayHARecord","workout","sportLabel","sportColor"]))),128))])):(A(),v("div",v4e,[$(rh,{workouts:h(s),sports:h(r),datasets:i.value,colors:o.value,displayHARecord:h(n),index:h(a)},null,8,["workouts","sports","datasets","colors","displayHARecord","index"])]))]),E("div",C4e,[h(s).length>0?(A(),v("div",y4e,[$(rh,{workouts:h(s),sports:h(r),datasets:i.value,colors:o.value,displayHARecord:h(n),index:h(a)},null,8,["workouts","sports","datasets","colors","displayHARecord","index"])])):x("",!0)])]))}}),P4e={class:"calendar-cells"},L4e={class:"calendar-cell-day"},w4e=Z({__name:"CalendarCells",props:{currentDay:{},displayHARecord:{type:Boolean},endDate:{},sports:{},startDate:{},timezone:{},weekStartingMonday:{type:Boolean},workouts:{}},setup(e){const t=e,{currentDay:n,displayHARecord:a,endDate:r,sports:s,startDate:i,timezone:o,weekStartingMonday:u,workouts:c}=_e(t),l=ce([]);_t(()=>f());function f(){l.value=[];let m=i.value;for(;m<=r.value;){const I=[];for(let b=0;b<7;b++)I.push(m),m=Ii(m,1);l.value.push(I)}}function d(m){return u.value?[5,6].includes(m):[0,6].includes(m)}function p(m,I){return I?I.filter(b=>z1(Ol(b.workout_date,o.value),m)).reverse():[]}return We(()=>t.currentDay,()=>f()),(m,I)=>(A(),v("div",P4e,[(A(!0),v(be,null,Ge(l.value,(b,R)=>(A(),v("div",{class:"calendar-row",key:R},[(A(!0),v(be,null,Ge(b,(N,S)=>(A(),v("div",{class:Se(["calendar-cell",{"disabled-cell":!h(Z2)(N,h(n)),"week-end":d(S),today:h(Q2)(N)}]),key:S},[$(D4e,{workouts:p(N,h(c)),sports:h(s),displayHARecord:h(a),index:S},null,8,["workouts","sports","displayHARecord","index"]),E("div",L4e,T(h(dn)(N,"d")),1)],2))),128))]))),128))]))}}),k4e={class:"calendar-days"},$4e=Z({__name:"CalendarDays",props:{startDate:{},localeOptions:{}},setup(e){const t=e,n=[];for(let a=0;a<7;a++)n.push(Ii(t.startDate,a));return(a,r)=>(A(),v("div",k4e,[(A(),v(be,null,Ge(n,(s,i)=>E("div",{class:"calendar-day",key:i},T(h(dn)(s,a.localeOptions.code==="eu"?"EEEEEE.":"EEE",{locale:a.localeOptions})),1)),64))]))}}),U4e={class:"calendar-header"},M4e=E("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1),x4e=[M4e],F4e={class:"calendar-month"},z4e=E("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1),W4e=[z4e],G4e=Z({__name:"CalendarHeader",props:{day:{},localeOptions:{}},emits:["displayNextMonth","displayPreviousMonth"],setup(e,{emit:t}){const n=e,a=t,{day:r,localeOptions:s}=_e(n);return(i,o)=>(A(),v("div",U4e,[E("button",{class:"calendar-arrow calendar-arrow-left transparent",onClick:o[0]||(o[0]=u=>a("displayPreviousMonth"))},x4e),E("div",F4e,[E("span",null,T(h(dn)(h(r),"MMM yyyy",{locale:h(s)})),1)]),E("button",{class:"calendar-arrow calendar-arrow-right transparent",onClick:o[1]||(o[1]=u=>a("displayNextMonth"))},W4e)]))}}),B4e={id:"user-calendar"},H4e={class:"calendar-card box"},ih="yyyy-MM-dd",V4e=Z({__name:"index",props:{sports:{},user:{}},setup(e){const t=e,n=Me(),{sports:a,user:r}=_e(t),s=ce(new Date),i=ce(xm(s.value,r.value.weekm)),o=k(()=>n.getters[Ae.GETTERS.CALENDAR_WORKOUTS]),u=k(()=>n.getters[H.GETTERS.LOCALE]);Ct(()=>c());function c(){i.value=xm(s.value,t.user.weekm);const d={from:dn(i.value.start,ih),to:dn(i.value.end,ih),page:1,per_page:100,...Ei};n.dispatch(Ae.ACTIONS.GET_CALENDAR_WORKOUTS,d)}function l(){s.value=Kr(s.value,1),c()}function f(){s.value=Zs(s.value,1),c()}return(d,p)=>(A(),v("div",B4e,[E("div",H4e,[$(G4e,{day:s.value,"locale-options":u.value,onDisplayNextMonth:l,onDisplayPreviousMonth:f},null,8,["day","locale-options"]),$($4e,{"start-date":i.value.start,"locale-options":u.value},null,8,["start-date","locale-options"]),$(w4e,{currentDay:s.value,displayHARecord:h(r).display_ascent,"end-date":i.value.end,sports:h(a),"start-date":i.value.start,timezone:h(r).timezone,workouts:o.value,weekStartingMonday:h(r).weekm},null,8,["currentDay","displayHARecord","end-date","sports","start-date","timezone","workouts","weekStartingMonday"])])]))}}),bA={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},j4e={ariaLabel:{type:String},ariaDescribedby:{type:String}},K4e={type:{type:String,required:!0},...bA,...j4e},Y4e=O_[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function yr(e){return zu(e)?et(e):e}function q4e(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return zu(t)?new Proxy(e,{}):e}function X4e(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function NA(e,t){e.labels=t}function vA(e,t,n){const a=[];e.datasets=t.map(r=>{const s=e.datasets.find(i=>i[n]===r[n]);return!s||!r.data||a.includes(s)?{...r}:(a.push(s),Object.assign(s,r),s)})}function Z4e(e,t){const n={labels:[],datasets:[]};return NA(n,e.labels),vA(n,e.datasets,t),n}const Q4e=Z({props:K4e,setup(e,t){let{expose:n,slots:a}=t;const r=ce(null),s=mi(null);n({chart:s});const i=()=>{if(!r.value)return;const{type:c,data:l,options:f,plugins:d,datasetIdKey:p}=e,m=Z4e(l,p),I=q4e(m,l);s.value=new Md(r.value,{type:c,data:I,options:{...f},plugins:d})},o=()=>{const c=et(s.value);c&&(c.destroy(),s.value=null)},u=c=>{c.update(e.updateMode)};return _t(i),hi(o),We([()=>e.options,()=>e.data],(c,l)=>{let[f,d]=c,[p,m]=l;const I=et(s.value);if(!I)return;let b=!1;if(f){const R=yr(f),N=yr(p);R&&R!==N&&(X4e(I,R),b=!0)}if(d){const R=yr(d.labels),N=yr(m.labels),S=yr(d.datasets),O=yr(m.datasets);R!==N&&(NA(I.config.data,R),b=!0),S&&S!==O&&(vA(I.config.data,S,e.datasetIdKey),b=!0)}b&&nn(()=>{u(I)})},{deep:!0}),()=>Tn("canvas",{role:"img",ariaLabel:e.ariaLabel,ariaDescribedby:e.ariaDescribedby,ref:r},[Tn("p",{},[a.default?a.default():""])])}});function CA(e,t){return Md.register(t),Z({props:bA,setup(n,a){let{expose:r}=a;const s=mi(null),i=o=>{s.value=o==null?void 0:o.chart};return r({chart:s}),()=>Tn(Q4e,Y4e({ref:i},{type:e,...n}))}})}const J4e=CA("bar",Oh),eLe=CA("line",Ih),tLe=(e,t=!1)=>{let n="0";t&&(n=String(Math.floor(e/86400)),e%=86400);const a=String(Math.floor(e/3600)).padStart(2,"0");e%=3600;const r=String(Math.floor(e/60)).padStart(2,"0"),s=String(e%60).padStart(2,"0");return t?`${n==="0"?"":`${n}d `}${a==="00"?"":`${a}h `}${r}m ${s}s`:`${a==="00"?"":`${a}:`}${r}:${s}`},vs=(e,t,n,a=!0,r="km")=>{const s=n?Pn[r].defaultTarget:r;switch(e){case"average_speed":return`${t.toFixed(2)} ${s}/h`;case"total_duration":return tLe(t,a);case"total_distance":case"total_ascent":case"total_descent":return`${t.toFixed(2)} ${s}`;default:return t.toString()}},nLe=Z({__name:"Chart",props:{datasets:{},labels:{},displayedData:{},displayedSportIds:{},fullStats:{type:Boolean},useImperialUnits:{type:Boolean}},setup(e){const t=e,{datasets:n,labels:a,displayedData:r,displayedSportIds:s,fullStats:i,useImperialUnits:o}=_e(t),u=_f(),{t:c}=Yt(),l=k(()=>u.getters[H.GETTERS.DARK_MODE]),f=k(()=>hf(l.value)),d=k(()=>({color:f.value?$a.darkMode.line:$a.ligthMode.line})),p=k(()=>({color:f.value?$a.darkMode.text:$a.ligthMode.text})),m=k(()=>({labels:a.value,datasets:JSON.parse(JSON.stringify(n.value))})),I=k(()=>({responsive:!0,maintainAspectRatio:!1,animation:!1,layout:{padding:{top:i.value?40:22}},scales:{x:{stacked:!0,grid:{drawOnChartArea:!1,...d.value},border:{...d.value},ticks:{...p.value}},y:{stacked:r.value!=="average_speed",grid:{drawOnChartArea:!1,...d.value},border:{...d.value},ticks:{maxTicksLimit:6,callback:function(S){return vs(r.value,+S,o.value,!1,N(r.value))},...p.value},afterFit:function(S){S.width=i.value?90:60}}},plugins:{datalabels:{anchor:"end",align:"end",color:function(S){return r.value==="average_speed"&&S.dataset.backgroundColor?S.dataset.backgroundColor[0]:p.value.color},rotation:function(S){return i.value&&S.chart.chartArea.width<580?310:0},display:function(S){return i.value&&S.chart.chartArea.width<300?!1:r.value==="average_speed"?s.value.length==1?"auto":!1:!0},formatter:function(S,O){if(r.value==="average_speed")return vs(r.value,S,o.value,!1);{const C=O.chart.data.datasets.map(P=>P.data[O.dataIndex]).reduce((P,M)=>R(P,M),0);return O.datasetIndex===s.value.length-1&&C>0?vs(r.value,C,o.value,!1,N(r.value)):null}}},legend:{display:!1},tooltip:{interaction:{intersect:!0,mode:"index",position:r.value==="average_speed"?"nearest":"average"},filter:function(S){return S.formattedValue!=="0"},callbacks:{label:function(S){let O=c(`sports.${S.dataset.label}.LABEL`)||"";return O&&(O+=": "),S.parsed.y!==null&&(O+=vs(r.value,S.parsed.y,o.value,!0,N(r.value))),O},footer:function(S){if(r.value==="average_speed")return"";let O=0;return S.map(C=>{O+=C.parsed.y}),`${c("common.TOTAL")}: `+vs(r.value,O,o.value,!0,N(r.value))}}}}}));function b(S){return isNaN(S)?0:+S}function R(S,O){return b(S)+b(O)}function N(S){return["total_ascent","total_descent"].includes(S)?"m":"km"}return(S,O)=>(A(),v("div",{class:Se(["bar-chart",{minimal:!h(i)}])},[$(h(J4e),{data:m.value,options:I.value},null,8,["data","options"])],2))}}),aLe=ae(nLe,[["__scopeId","data-v-d506f845"]]),{locale:oh}=_r.global,rLe={week:{api:"yyyy-MM-dd",chart:"MM/dd/yyyy"},month:{api:"yyyy-MM",chart:"MM/yyyy"},year:{api:"yyyy",chart:"yyyy"}},sLe=["average_speed","nb_workouts","total_duration","total_distance","total_ascent","total_descent"],iLe=(e,t)=>{const n=[];for(let a=wbe(e.duration,e.start,t);a<=e.end;a=kbe(e.duration,a))n.push(a);return n},Dr=(e,t,n=!1)=>{const a={label:e,backgroundColor:[t],data:[]};return n?(a.type="line",a.borderColor=[t],a.spanGaps=!0):a.type="bar",a},oLe=e=>{const t={average_speed:[],nb_workouts:[],total_distance:[],total_duration:[],total_ascent:[],total_descent:[]};return e.map(n=>{const a=n.color?n.color:rE[n.label];t.average_speed.push(Dr(n.label,a,!0)),t.nb_workouts.push(Dr(n.label,a)),t.total_distance.push(Dr(n.label,a)),t.total_duration.push(Dr(n.label,a)),t.total_ascent.push(Dr(n.label,a)),t.total_descent.push(Dr(n.label,a))}),t},uLe=(e,t,n)=>{switch(e){case"average_speed":case"total_distance":case"total_ascent":case"total_descent":return Ro(["average_speed","total_distance"].includes(e)?"km":"m",t,n);default:case"nb_workouts":case"total_duration":return t}},lLe=(e,t,n,a,r,s,i)=>{const o=iLe(e,t),u=rLe[e.duration],c=n.filter(p=>a.includes(p.id)),l=[],f=oLe(c),d={};return c.map(p=>d[p.label]=p.id),o.map(p=>{const m=dn(p,u.api),I=dn(p,e.duration==="week"?gr(i,oh.value):u.chart,{locale:Ni[oh.value]});l.push(I),sLe.map(b=>{f[b].map(R=>{R.data.push(m in r&&d[R.label]in r[m]?uLe(b,r[m][d[R.label]][b],s):b==="average_speed"?null:0)})})}),{labels:l,datasets:f}},cLe=(e,t,n)=>{const a=n?1:0,r=t==="year"?Sf(Mc(e,9)):t==="week"?tl(Zs(e,2),{weekStartsOn:a}):bi(Zs(e,11)),s=t==="year"?W1(e):t==="week"?Of(e,{weekStartsOn:a}):Ri(e);return{duration:t,end:s,start:r}},dLe=(e,t,n)=>{const{duration:a,start:r,end:s}=e,i=n?1:0;return{duration:a,end:a==="year"?W1(t?Mc(s,1):Ho(s,1)):a==="week"?Of(t?G0(s,1):Uc(s,1),{weekStartsOn:i}):Ri(t?Zs(s,1):Kr(s,1)),start:a==="year"?Sf(t?Mc(r,1):Ho(r,1)):a==="week"?tl(t?G0(r,1):Uc(r,1),{weekStartsOn:i}):bi(t?Zs(r,1):Kr(r,1))}},fLe={class:"stats-chart"},ELe={key:0},pLe={key:1},mLe={class:"chart-radio"},hLe=["checked","disabled"],_Le=["checked","disabled"],TLe=["checked","disabled"],gLe={key:0},ALe=["checked","disabled"],SLe={key:1},OLe=["checked","disabled"],ILe={key:2},RLe=["checked","disabled"],bLe=Z({__name:"index",props:{sports:{},user:{},chartParams:{},displayedSportIds:{default:()=>[]},fullStats:{type:Boolean,default:!1},hideChartIfNoData:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},setup(e){const t=e,{sports:n,user:a,chartParams:r,displayedSportIds:s,fullStats:i,hideChartIfNoData:o,isDisabled:u}=_e(t),c=Me(),l=ce("total_distance"),f=k(()=>c.getters[Ba.GETTERS.USER_STATS]),d=k(()=>lLe(r.value,a.value.weekm,n.value,s.value,f.value,a.value.imperial_units,a.value.date_format)),p=k(()=>d.value.datasets[l.value]),m=k(()=>d.value.labels),I=k(()=>Object.keys(f.value).length===0);Ct(()=>b(N(r.value,a.value)));function b(S){c.dispatch(Ba.ACTIONS.GET_USER_STATS,{username:a.value.username,filterType:"by_time",params:S})}function R(S){l.value=S.target.name}function N(S,O){return{from:dn(S.start,"yyyy-MM-dd"),to:dn(S.end,"yyyy-MM-dd"),time:S.duration==="week"?`week${O.weekm?"m":""}`:S.duration}}return We(()=>r.value,async S=>{b(N(S,a.value))}),(S,O)=>(A(),v("div",fLe,[h(o)&&I.value?(A(),v("div",ELe,T(S.$t("workouts.NO_WORKOUTS")),1)):(A(),v("div",pLe,[E("div",mLe,[E("label",null,[E("input",{type:"radio",name:"total_distance",checked:l.value==="total_distance",disabled:h(u),onClick:R},null,8,hLe),j(" "+T(S.$t("workouts.DISTANCE")),1)]),E("label",null,[E("input",{type:"radio",name:"total_duration",checked:l.value==="total_duration",disabled:h(u),onClick:R},null,8,_Le),j(" "+T(S.$t("workouts.DURATION")),1)]),E("label",null,[E("input",{type:"radio",name:"nb_workouts",checked:l.value==="nb_workouts",disabled:h(u),onClick:R},null,8,TLe),j(" "+T(S.$t("workouts.WORKOUT",2)),1)]),h(i)?(A(),v("label",gLe,[E("input",{type:"radio",name:"average_speed",checked:l.value==="average_speed",disabled:h(u),onClick:R},null,8,ALe),j(" "+T(S.$t("workouts.AVERAGE_SPEED")),1)])):x("",!0),h(i)?(A(),v("label",SLe,[E("input",{type:"radio",name:"total_ascent",checked:l.value==="total_ascent",disabled:h(u),onClick:R},null,8,OLe),j(" "+T(S.$t("workouts.ASCENT")),1)])):x("",!0),h(i)?(A(),v("label",ILe,[E("input",{type:"radio",name:"total_descent",checked:l.value==="total_descent",disabled:h(u),onClick:R},null,8,RLe),j(" "+T(S.$t("workouts.DESCENT")),1)])):x("",!0)]),m.value.length>0?(A(),te(aLe,{key:0,datasets:p.value,labels:m.value,displayedData:l.value,displayedSportIds:h(s),fullStats:h(i),useImperialUnits:h(a).imperial_units},null,8,["datasets","labels","displayedData","displayedSportIds","fullStats","useImperialUnits"])):x("",!0)]))]))}}),yA=ae(bLe,[["__scopeId","data-v-b8d7f5c9"]]),NLe={class:"user-month-stats"},vLe=Z({__name:"UserMonthStats",props:{sports:{},user:{}},setup(e){const t=e,{sports:n,user:a}=_e(t),r=new Date,s={duration:"week",start:bi(r),end:Ri(r)},i=n.value.map(o=>o.id);return(o,u)=>{const c=oe("Card");return A(),v("div",NLe,[$(c,null,{title:ue(()=>[j(T(o.$t("dashboard.THIS_MONTH")),1)]),content:ue(()=>[$(yA,{sports:h(n),user:h(a),"chart-params":s,"displayed-sport-ids":h(i),"hide-chart-if-no-data":!0},null,8,["sports","user","displayed-sport-ids"])]),_:1})])}}}),CLe=ae(vLe,[["__scopeId","data-v-8f59a282"]]),{locale:yLe}=_r.global,DLe=(e,t,n,a)=>{const r="km",s=n?Pn[r].defaultTarget:r,i="m",o=n?Pn[i].defaultTarget:i;let u;switch(e.record_type){case"AS":case"MS":u=`${on(+e.value,r,s,2)} ${s}/h`;break;case"FD":u=`${on(+e.value,r,s,3)} ${s}`;break;case"HA":u=`${on(+e.value,i,o,2)} ${o}`;break;case"LD":u=e.value;break;default:throw new Error(`Invalid record type, expected: "AS", "FD", "HA", "LD", "MD", got: "${e.record_type}"`)}return{id:e.id,record_type:e.record_type,sport_id:e.sport_id,value:u,user:e.user,workout_date:$n(e.workout_date,t,a,!1),workout_id:e.workout_id}},PLe=(e,t)=>{const n=e.label.toLowerCase(),a=t.label.toLowerCase();return n>a?1:n(s=gr(s,yLe.value),e.filter(i=>r?!0:i.record_type!=="HA").reduce((i,o)=>{const u=t.find(c=>c.id===o.sport_id);return u&&u.label&&(i[u.translatedLabel]===void 0&&(i[u.translatedLabel]={label:u.label,color:u.color,records:[]}),i[u.translatedLabel].records.push(DLe(o,n,a,s))),i},{})),wLe={class:"records-card"},kLe={class:"record-type"},$Le={class:"record-value"},ULe={class:"record-date"},MLe=Z({__name:"RecordsCard",props:{records:{},sportTranslatedLabel:{}},setup(e){const t=e,{records:n,sportTranslatedLabel:a}=_e(t),{t:r}=Yt();function s(i){const o=[];return i.map(u=>{o.push({...u,label:r(`workouts.RECORD_${u.record_type}`)})}),o.sort(PLe)}return(i,o)=>{const u=oe("SportImage"),c=oe("router-link"),l=oe("Card");return A(),v("div",wLe,[$(l,null,{title:ue(()=>[$(u,{"sport-label":h(n).label,color:h(n).color},null,8,["sport-label","color"]),j(" "+T(h(a)),1)]),content:ue(()=>[(A(!0),v(be,null,Ge(s(h(n).records),f=>(A(),v("div",{class:"record",key:f.id},[E("span",kLe,T(f.label),1),E("span",$Le,T(f.value),1),E("span",ULe,[$(c,{to:{name:"Workout",params:{workoutId:f.workout_id}}},{default:ue(()=>[E("time",null,T(f.workout_date),1)]),_:2},1032,["to"])])]))),128))]),_:1})])}}}),xLe=ae(MLe,[["__scopeId","data-v-64523a87"]]),FLe=e=>(ut("data-v-fff33919"),e=e(),lt(),e),zLe={class:"user-records-section"},WLe={class:"section-title"},GLe=FLe(()=>E("i",{class:"fa fa-trophy custom-fa-small","aria-hidden":"true"},null,-1)),BLe={class:"user-records"},HLe={key:0,class:"no-records"},VLe=Z({__name:"index",props:{sports:{},user:{}},setup(e){const t=e,{t:n}=Yt(),a=k(()=>LLe(t.user.records,Xa(t.sports,n),t.user.timezone,t.user.imperial_units,t.user.display_ascent,t.user.date_format));return(r,s)=>(A(),v("div",zLe,[E("div",WLe,[GLe,j(" "+T(r.$t("workouts.RECORD",2)),1)]),E("div",BLe,[Object.keys(a.value).length===0?(A(),v("div",HLe,T(r.$t("workouts.NO_RECORDS")),1)):x("",!0),(A(!0),v(be,null,Ge(Object.keys(a.value).sort(),i=>(A(),te(xLe,{sportTranslatedLabel:i,records:a.value[i],key:i,useImperialUnits:r.user.imperial_units},null,8,["sportTranslatedLabel","records","useImperialUnits"]))),128))])]))}}),jLe=ae(VLe,[["__scopeId","data-v-fff33919"]]),KLe={id:"user-stats"},dc="km",fc="m",YLe=Z({__name:"index",props:{user:{}},setup(e){const t=e,{t:n}=Yt(),{user:a}=_e(t),r=k(()=>t.user.total_duration),s=k(()=>l(r)),i=a.value.imperial_units?Pn[dc].defaultTarget:dc,o=k(()=>a.value.imperial_units?on(a.value.total_distance,dc,i,2):parseFloat(a.value.total_distance.toFixed(2))),u=a.value.imperial_units?Pn[fc].defaultTarget:fc,c=k(()=>a.value.imperial_units?on(a.value.total_ascent,fc,u,2):parseFloat(a.value.total_ascent.toFixed(2)));function l(f){const d=f.value.match(/day/g)?f.value.split(", ")[1]:f.value;return{days:f.value.match(/day/g)?`${f.value.split(" ")[0]} ${f.value.match(/days/g)?n("common.DAY",2):n("common.DAY",1)}`:`0 ${n("common.DAY",2)},`,duration:`${d.split(":")[0]}h ${d.split(":")[1]}min`}}return(f,d)=>(A(),v("div",KLe,[$(ca,{icon:"calendar",value:h(a).nb_workouts,text:f.$t("workouts.WORKOUT",h(a).nb_workouts)},null,8,["value","text"]),$(ca,{icon:"road",value:o.value,text:h(i)==="mi"?"miles":h(i)},null,8,["value","text"]),h(a).display_ascent?(A(),te(ca,{key:0,icon:"location-arrow",value:c.value,text:h(u)==="ft"?"feet":h(u)},null,8,["value","text"])):x("",!0),$(ca,{icon:"clock-o",value:s.value.days,text:s.value.duration},null,8,["value","text"]),h(a).display_ascent?x("",!0):(A(),te(ca,{key:1,icon:"tags",value:h(a).nb_sports,text:f.$t("workouts.SPORT",h(a).nb_sports)},null,8,["value","text"]))]))}}),qLe={},XLe={class:"privacy-policy-message"};function ZLe(e,t){const n=oe("router-link"),a=oe("i18n-t");return A(),v("div",XLe,[E("span",null,[$(a,{keypath:"user.LAST_PRIVACY_POLICY_TO_VALIDATE"},{default:ue(()=>[$(n,{to:"/profile/edit/privacy-policy",class:"policy-link"},{default:ue(()=>[j(T(e.$t("user.REVIEW")),1)]),_:1})]),_:1})])])}const QLe=ae(qLe,[["render",ZLe],["__scopeId","data-v-1b250692"]]),wi=e=>(ut("data-v-8f5da609"),e=e(),lt(),e),JLe={key:0,id:"dashboard",class:"view"},ewe={class:"container mobile-menu"},twe={class:"box"},nwe=wi(()=>E("i",{class:"fa fa-calendar","aria-hidden":"true"},null,-1)),awe=[nwe],rwe=wi(()=>E("i",{class:"fa fa-bar-chart","aria-hidden":"true"},null,-1)),swe=[rwe],iwe=wi(()=>E("i",{class:"fa fa-map-o","aria-hidden":"true"},null,-1)),owe=[iwe],uwe=wi(()=>E("i",{class:"fa fa-trophy","aria-hidden":"true"},null,-1)),lwe=[uwe],cwe={key:0,class:"container privacy-policy-message"},dwe={class:"container"},fwe={class:"container dashboard-container"},Ewe={class:"left-container dashboard-sub-container"},pwe={class:"right-container dashboard-sub-container"},mwe=wi(()=>E("div",{id:"bottom"},null,-1)),hwe={key:1,class:"app-loading"},_we=Z({__name:"Dashboard",setup(e){const t=Me(),n=k(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),a=k(()=>t.getters[Mt.GETTERS.SPORTS]),r=ce("calendar");Ct(()=>t.dispatch(K.ACTIONS.GET_USER_PROFILE));function s(i){r.value=i}return(i,o)=>{const u=oe("Loader");return n.value.username&&a.value.length>0?(A(),v("div",JLe,[E("div",ewe,[E("div",twe,[E("div",{class:Se(["mobile-menu-item",{"is-selected":r.value==="calendar"}]),onClick:o[0]||(o[0]=c=>s("calendar"))},awe,2),E("div",{class:Se(["mobile-menu-item",{"is-selected":r.value==="chart"}]),onClick:o[1]||(o[1]=c=>s("chart"))},swe,2),E("div",{class:Se(["mobile-menu-item",{"is-selected":r.value==="timeline"}]),onClick:o[2]||(o[2]=c=>s("timeline"))},owe,2),E("div",{class:Se(["mobile-menu-item",{"is-selected":r.value==="records"}]),onClick:o[3]||(o[3]=c=>s("records"))},lwe,2)])]),n.value.accepted_privacy_policy?x("",!0):(A(),v("div",cwe,[$(QLe)])),E("div",dwe,[$(YLe,{user:n.value},null,8,["user"])]),E("div",fwe,[E("div",Ewe,[$(CLe,{sports:a.value,user:n.value,class:Se({"is-hidden":r.value!=="chart"})},null,8,["sports","user","class"]),$(jLe,{sports:a.value,user:n.value,class:Se({"is-hidden":r.value!=="records"})},null,8,["sports","user","class"])]),E("div",pwe,[$(V4e,{sports:a.value,user:n.value,class:Se({"is-hidden":r.value!=="calendar"})},null,8,["sports","user","class"]),$(l4e,{sports:a.value,user:n.value,class:Se({"is-hidden":r.value!=="timeline"})},null,8,["sports","user","class"])])]),mwe])):(A(),v("div",hwe,[$(u)]))}}}),Twe=ae(_we,[["__scopeId","data-v-8f5da609"]]),gwe={class:"not-found view"},Awe=Z({__name:"NotFoundView",setup(e){return(t,n)=>(A(),v("div",gwe,[$(dE)]))}}),Swe={id:"privacy-policy",class:"view"},Owe={class:"container"},Iwe=E("div",{id:"bottom"},null,-1),Rwe=Z({__name:"PrivacyPolicyView",setup(e){const t=Me();return Ct(()=>{t.dispatch(H.ACTIONS.GET_APPLICATION_PRIVACY_POLICY)}),(n,a)=>(A(),v("div",Swe,[E("div",Owe,[$(AA)]),Iwe]))}}),DA=e=>(ut("data-v-174c91c4"),e=e(),lt(),e),bwe={class:"chart-menu"},Nwe=["disabled"],vwe=DA(()=>E("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),Cwe=[vwe],ywe={class:"time-frames custom-checkboxes-group"},Dwe={class:"time-frames-checkboxes custom-checkboxes"},Pwe=["id","name","checked","onInput","disabled"],Lwe=["id","tabindex","onKeydown"],wwe=["disabled"],kwe=DA(()=>E("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),$we=[kwe],Uwe=Z({__name:"StatsMenu",props:{isDisabled:{type:Boolean}},emits:["arrowClick","timeFrameUpdate"],setup(e,{emit:t}){const n=e,{isDisabled:a}=_e(n),r=t,s=ce("month"),i=["week","month","year"];function o(u){s.value=u,r("timeFrameUpdate",u)}return _t(()=>{if(!a.value){const u=document.getElementById("frame-month");u&&u.focus()}}),(u,c)=>(A(),v("div",bwe,[E("button",{class:"chart-arrow transparent",onClick:c[0]||(c[0]=l=>r("arrowClick",!0)),onKeydown:c[1]||(c[1]=At(l=>r("arrowClick",!0),["enter"])),disabled:h(a)},Cwe,40,Nwe),E("div",ywe,[E("div",Dwe,[(A(),v(be,null,Ge(i,l=>E("div",{class:"time-frame custom-checkbox",key:l},[E("label",null,[E("input",{type:"radio",id:l,name:l,checked:s.value===l,onInput:f=>o(l),disabled:h(a)},null,40,Pwe),E("span",{id:`frame-${l}`,tabindex:h(a)?-1:0,role:"button",onKeydown:At(f=>o(l),["enter"])},T(u.$t(`statistics.TIME_FRAMES.${l}`)),41,Lwe)])])),64))])]),E("button",{class:"chart-arrow transparent",onClick:c[2]||(c[2]=l=>r("arrowClick",!1)),onKeydown:c[3]||(c[3]=At(l=>r("arrowClick",!1),["enter"])),disabled:h(a)},$we,40,wwe)]))}}),Mwe=ae(Uwe,[["__scopeId","data-v-174c91c4"]]),xwe={class:"sports-menu"},Fwe=["id","name","checked","onInput"],zwe={class:"sport-label"},Wwe=Z({__name:"StatsSportsMenu",props:{userSports:{},selectedSportIds:{default:()=>[]}},emits:["selectedSportIdsUpdate"],setup(e,{emit:t}){const n=e,a=t,{t:r}=Yt(),s=It("sportColors"),{selectedSportIds:i}=_e(n),o=k(()=>Xa(n.userSports,r));function u(c){a("selectedSportIdsUpdate",c)}return(c,l)=>{const f=oe("SportImage");return A(),v("div",xwe,[(A(!0),v(be,null,Ge(o.value,d=>(A(),v("label",{type:"checkbox",key:d.id,style:Va({color:d.color?d.color:h(s)[d.label]})},[E("input",{type:"checkbox",id:`${d.id}`,name:d.label,checked:h(i).includes(d.id),onInput:p=>u(d.id)},null,40,Fwe),$(f,{"sport-label":d.label,color:d.color},null,8,["sport-label","color"]),E("span",zwe,T(d.translatedLabel),1)],4))),128))])}}}),Gwe={key:0,id:"user-statistics"},Bwe=Z({__name:"index",props:{sports:{},user:{},isDisabled:{type:Boolean}},setup(e){const t=e,{t:n}=Yt(),{sports:a,user:r}=_e(t),s=ce("month"),i=ce(l(s.value)),o=k(()=>Xa(t.sports,n)),u=ce(d(a.value));function c(m){s.value=m,i.value=l(s.value)}function l(m){return cLe(new Date,m,t.user.weekm)}function f(m){i.value=dLe(i.value,m,t.user.weekm)}function d(m){return m.map(I=>I.id)}function p(m){u.value.includes(m)?u.value=u.value.filter(I=>I!==m):u.value.push(m)}return We(()=>t.sports,m=>{u.value=d(m)}),(m,I)=>o.value?(A(),v("div",Gwe,[$(Mwe,{onTimeFrameUpdate:c,onArrowClick:f,isDisabled:m.isDisabled},null,8,["isDisabled"]),$(yA,{sports:h(a),user:h(r),chartParams:i.value,"displayed-sport-ids":u.value,fullStats:!0,isDisabled:m.isDisabled},null,8,["sports","user","chartParams","displayed-sport-ids","isDisabled"]),$(Wwe,{"selected-sport-ids":u.value,"user-sports":h(a),onSelectedSportIdsUpdate:p},null,8,["selected-sport-ids","user-sports"])])):x("",!0)}}),Hwe=ae(Bwe,[["__scopeId","data-v-b145e4ac"]]),Vwe={id:"statistics",class:"view"},jwe={key:0,class:"container"},Kwe=Z({__name:"StatisticsView",setup(e){const t=Me(),n=k(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),a=k(()=>t.getters[Mt.GETTERS.SPORTS].filter(s=>n.value.sports_list.includes(s.id))),r=k(()=>n.value.nb_workouts===0);return(s,i)=>{const o=oe("Card");return A(),v("div",Vwe,[n.value.username?(A(),v("div",jwe,[$(o,null,{title:ue(()=>[j(T(s.$t("statistics.STATISTICS")),1)]),content:ue(()=>[$(Hwe,{class:Se({"stats-disabled":r.value}),user:n.value,sports:a.value,isDisabled:r.value},null,8,["class","user","sports","isDisabled"])]),_:1}),n.value.nb_workouts===0?(A(),te(EE,{key:0})):x("",!0)])):x("",!0)])}}}),Ywe=ae(Kwe,[["__scopeId","data-v-0aa997fa"]]),qwe={name:"EmailSent"},Xwe={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 345.834 345.834",style:{"enable-background":"new 0 0 345.834 345.834"},"xml:space":"preserve"},Zwe=E("g",null,[E("path",{d:`M339.798,260.429c0.13-0.026,0.257-0.061,0.385-0.094c0.109-0.028,0.219-0.051,0.326-0.084
+`)});const o=t.nonTextTags||["script","style","textarea","option"];let u,c;t.allowedAttributes&&(u={},c={},Ds(t.allowedAttributes,function(D,G){u[G]=[];const V=[];D.forEach(function(re){typeof re=="string"&&re.indexOf("*")>=0?V.push(bm(re).replace(/\\\*/g,".*")):u[G].push(re)}),V.length&&(c[G]=new RegExp("^("+V.join("|")+")$"))}));const l={},f={},d={};Ds(t.allowedClasses,function(D,G){if(u&&(ia(u,G)||(u[G]=[]),u[G].push("class")),l[G]=D,Array.isArray(D)){const V=[];l[G]=[],d[G]=[],D.forEach(function(re){typeof re=="string"&&re.indexOf("*")>=0?V.push(bm(re).replace(/\\\*/g,".*")):re instanceof RegExp?d[G].push(re):l[G].push(re)}),V.length&&(f[G]=new RegExp("^("+V.join("|")+")$"))}});const p={};let m;Ds(t.transformTags,function(D,G){let V;typeof D=="function"?V=D:typeof D=="string"&&(V=ci.simpleTransform(D)),G==="*"?m=V:p[G]=V});let I,b,R,N,S,O,C=!1;M();const P=new _Ie.Parser({onopentag:function(D,G){if(t.enforceHtmlBoundary&&D==="html"&&M(),S){O++;return}const V=new s(D,G);b.push(V);let re=!1;const Be=!!V.text;let $e;if(ia(p,D)&&($e=p[D](D,G),V.attribs=G=$e.attribs,$e.text!==void 0&&(V.innerText=$e.text),D!==$e.tagName&&(V.name=D=$e.tagName,N[I]=$e.tagName)),m&&($e=m(D,G),V.attribs=G=$e.attribs,D!==$e.tagName&&(V.name=D=$e.tagName,N[I]=$e.tagName)),(!i(D)||t.disallowedTagsMode==="recursiveEscape"&&!IIe(R)||t.nestingLimit!=null&&I>=t.nestingLimit)&&(re=!0,R[I]=!0,t.disallowedTagsMode==="discard"&&o.indexOf(D)!==-1&&(S=!0,O=1),R[I]=!0),I++,re){if(t.disallowedTagsMode==="discard")return;r=a,a=""}a+="<"+D,D==="script"&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(V.innerText=""),(!u||ia(u,D)||u["*"])&&Ds(G,function(Oe,we){if(!NIe.test(we)){delete V.attribs[we];return}if(Oe===""&&(t.nonBooleanAttributes.includes(we)||t.nonBooleanAttributes.includes("*"))){delete V.attribs[we];return}let Ht=!1;if(!u||ia(u,D)&&u[D].indexOf(we)!==-1||u["*"]&&u["*"].indexOf(we)!==-1||ia(c,D)&&c[D].test(we)||c["*"]&&c["*"].test(we))Ht=!0;else if(u&&u[D]){for(const xe of u[D])if(TIe(xe)&&xe.name&&xe.name===we){Ht=!0;let He="";if(xe.multiple===!0){const ct=Oe.split(" ");for(const q of ct)xe.values.indexOf(q)!==-1&&(He===""?He=q:He+=" "+q)}else xe.values.indexOf(Oe)>=0&&(He=Oe);Oe=He}}if(Ht){if(t.allowedSchemesAppliedToAttributes.indexOf(we)!==-1&&W(D,Oe)){delete V.attribs[we];return}if(D==="script"&&we==="src"){let xe=!0;try{const He=B(Oe);if(t.allowedScriptHostnames||t.allowedScriptDomains){const ct=(t.allowedScriptHostnames||[]).find(function(le){return le===He.url.hostname}),q=(t.allowedScriptDomains||[]).find(function(le){return He.url.hostname===le||He.url.hostname.endsWith(`.${le}`)});xe=ct||q}}catch{xe=!1}if(!xe){delete V.attribs[we];return}}if(D==="iframe"&&we==="src"){let xe=!0;try{const He=B(Oe);if(He.isRelativeUrl)xe=ia(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const ct=(t.allowedIframeHostnames||[]).find(function(le){return le===He.url.hostname}),q=(t.allowedIframeDomains||[]).find(function(le){return He.url.hostname===le||He.url.hostname.endsWith(`.${le}`)});xe=ct||q}}catch{xe=!1}if(!xe){delete V.attribs[we];return}}if(we==="srcset")try{let xe=gIe(Oe);if(xe.forEach(function(He){W("srcset",He.url)&&(He.evil=!0)}),xe=vm(xe,function(He){return!He.evil}),xe.length)Oe=RIe(vm(xe,function(He){return!He.evil})),V.attribs[we]=Oe;else{delete V.attribs[we];return}}catch{delete V.attribs[we];return}if(we==="class"){const xe=l[D],He=l["*"],ct=f[D],q=d[D],le=f["*"],de=[ct,le].concat(q).filter(function(ge){return ge});if(xe&&He?Oe=ne(Oe,Nm(xe,He),de):Oe=ne(Oe,xe||He,de),!Oe.length){delete V.attribs[we];return}}if(we==="style"){if(t.parseStyleAttributes)try{const xe=AIe(D+" {"+Oe+"}"),He=w(xe,t.allowedStyles);if(Oe=X(He),Oe.length===0){delete V.attribs[we];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+D+" {"+Oe+`}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`),delete V.attribs[we];return}else if(t.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}a+=" "+we,Oe&&Oe.length&&(a+='="'+L(Oe,!0)+'"')}else delete V.attribs[we]}),t.selfClosing.indexOf(D)!==-1?a+=" />":(a+=">",V.innerText&&!Be&&!t.textFilter&&(a+=L(V.innerText),C=!0)),re&&(a=r+L(a),r="")},ontext:function(D){if(S)return;const G=b[b.length-1];let V;if(G&&(V=G.tag,D=G.innerText!==void 0?G.innerText:D),t.disallowedTagsMode==="discard"&&(V==="script"||V==="style"))a+=D;else{const re=L(D,!1);t.textFilter&&!C?a+=t.textFilter(re,V):C||(a+=re)}if(b.length){const re=b[b.length-1];re.text+=D}},onclosetag:function(D,G){if(S)if(O--,!O)S=!1;else return;const V=b.pop();if(!V)return;if(V.tag!==D){b.push(V);return}S=t.enforceHtmlBoundary?D==="html":!1,I--;const re=R[I];if(re){if(delete R[I],t.disallowedTagsMode==="discard"){V.updateParentNodeText();return}r=a,a=""}if(N[I]&&(D=N[I],delete N[I]),t.exclusiveFilter&&t.exclusiveFilter(V)){a=a.substr(0,V.tagPosition);return}if(V.updateParentNodeMediaChildren(),V.updateParentNodeText(),t.selfClosing.indexOf(D)!==-1||G&&!i(D)&&["escape","recursiveEscape"].indexOf(t.disallowedTagsMode)>=0){re&&(a=r,r="");return}a+=""+D+">",re&&(a=r+L(a),r=""),C=!1}},t.parser);return P.write(e),P.end(),a;function M(){a="",I=0,b=[],R={},N={},S=!1,O=0}function L(D,G){return typeof D!="string"&&(D=D+""),t.parser.decodeEntities&&(D=D.replace(/&/g,"&").replace(//g,">"),G&&(D=D.replace(/"/g,"""))),D=D.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(//g,">"),G&&(D=D.replace(/"/g,""")),D}function W(D,G){for(G=G.replace(/[\x00-\x20]+/g,"");;){const Be=G.indexOf("",Be+4);if($e===-1)break;G=G.substring(0,Be)+G.substring($e+3)}const V=G.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!V)return G.match(/^[/\\]{2}/)?!t.allowProtocolRelative:!1;const re=V[1].toLowerCase();return ia(t.allowedSchemesByTag,D)?t.allowedSchemesByTag[D].indexOf(re)===-1:!t.allowedSchemes||t.allowedSchemes.indexOf(re)===-1}function B(D){if(D=D.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),D.startsWith("relative:"))throw new Error("relative: exploit attempt");let G="relative://relative-site";for(let Be=0;Be<100;Be++)G+=`/${Be}`;const V=new URL(D,G);return{isRelativeUrl:V&&V.hostname==="relative-site"&&V.protocol==="relative:",url:V}}function w(D,G){if(!G)return D;const V=D.nodes[0];let re;return G[V.selector]&&G["*"]?re=Nm(G[V.selector],G["*"]):re=G[V.selector]||G["*"],re&&(D.nodes[0].nodes=V.nodes.reduce(J(re),[])),D}function X(D){return D.nodes[0].nodes.reduce(function(G,V){return G.push(`${V.prop}:${V.value}${V.important?" !important":""}`),G},[]).join(";")}function J(D){return function(G,V){return ia(D,V.prop)&&D[V.prop].some(function(Be){return Be.test(V.value)})&&G.push(V),G}}function ne(D,G,V){return G?(D=D.split(/\s+/),D.filter(function(re){return G.indexOf(re)!==-1||V.some(function(Be){return Be.test(re)})}).join(" ")):D}}const vIe={decodeEntities:!0};ci.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0};ci.simpleTransform=function(e,t,n){return n=n===void 0?!0:n,t=t||{},function(a,r){let s;if(n)for(s in t)r[s]=t[s];else r=t;return{tagName:e,attribs:r}}};const CIe=xd(bIe),di=e=>CIe(aAe(e,{target:"_blank"}),{allowedTags:["a"],disallowedTagsMode:"escape"}),yIe=e=>(ut("data-v-a720b26e"),e=e(),lt(),e),DIe={id:"admin-app",class:"admin-card"},PIe={for:"admin_contact"},LIe=["value"],wIe=["disabled"],kIe={for:"max_users"},$Ie=["disabled"],UIe={class:"user-limit-help"},MIe={class:"info-box"},xIe=yIe(()=>E("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),FIe={for:"max_single_file_size"},zIe=["disabled"],WIe={for:"max_zip_file_size"},GIe=["disabled"],BIe={for:"gpx_limit_import"},HIe=["disabled"],VIe={class:"about-label",for:"about"},jIe={class:"textarea-description"},KIe=["innerHTML"],YIe={class:"privacy-policy-label",for:"privacy_policy"},qIe={class:"textarea-description"},XIe=["innerHTML"],ZIe={key:5,class:"form-buttons"},QIe={class:"confirm",type:"submit"},JIe={key:6,class:"form-buttons"},eRe=Z({__name:"AdminApplication",props:{appConfig:{},edition:{type:Boolean,default:!1}},setup(e){const t=e,{edition:n}=_e(t),a=Me(),r=Ya(),s=Gt({admin_contact:"",max_users:0,max_single_file_size:0,max_zip_file_size:0,gpx_limit_import:0,about:"",privacy_policy:""}),i=k(()=>a.getters[H.GETTERS.ERROR_MESSAGES]);Ct(()=>{t.appConfig&&o(t.appConfig)});function o(l){Object.keys(s).map(f=>{["max_single_file_size","max_zip_file_size"].includes(f)?s[f]=Nge(l[f]):["about","privacy_policy"].includes(f)?s[f]=l[f]!==null?l[f]:"":s[f]=l[f]})}function u(){o(t.appConfig),a.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),r.push("/admin/application")}function c(){const l=Object.assign({},s);l.max_single_file_size*=1048576,l.max_zip_file_size*=1048576,a.dispatch(H.ACTIONS.UPDATE_APPLICATION_CONFIG,l)}return(l,f)=>{const d=oe("ErrorMessage"),p=oe("Card");return A(),v("div",DIe,[$(p,null,{title:ue(()=>[j(T(l.$t("admin.APP_CONFIG.TITLE")),1)]),content:ue(()=>[E("form",{class:"admin-form",onSubmit:Je(c,["prevent"])},[E("label",PIe,[j(T(l.$t("admin.APP_CONFIG.ADMIN_CONTACT"))+": ",1),!h(n)&&!s.admin_contact?(A(),v("input",{key:0,class:"no-contact",value:l.$t("admin.APP_CONFIG.NO_CONTACT_EMAIL"),disabled:""},null,8,LIe)):qe((A(),v("input",{key:1,id:"admin_contact",name:"admin_contact",type:"email","onUpdate:modelValue":f[0]||(f[0]=m=>s.admin_contact=m),disabled:!h(n)},null,8,wIe)),[[rt,s.admin_contact]])]),E("label",kIe,[j(T(l.$t("admin.APP_CONFIG.MAX_USERS_LABEL"))+": ",1),qe(E("input",{id:"max_users",name:"max_users",type:"number",min:"0","onUpdate:modelValue":f[1]||(f[1]=m=>s.max_users=m),disabled:!h(n)},null,8,$Ie),[[rt,s.max_users]])]),E("div",UIe,[E("span",MIe,[xIe,j(" "+T(l.$t("admin.APP_CONFIG.MAX_USERS_HELP")),1)])]),E("label",FIe,[j(T(l.$t("admin.APP_CONFIG.SINGLE_UPLOAD_MAX_SIZE_LABEL"))+": ",1),qe(E("input",{id:"max_single_file_size",name:"max_single_file_size",type:"number",step:"0.1",min:"0","onUpdate:modelValue":f[2]||(f[2]=m=>s.max_single_file_size=m),disabled:!h(n)},null,8,zIe),[[rt,s.max_single_file_size]])]),E("label",WIe,[j(T(l.$t("admin.APP_CONFIG.ZIP_UPLOAD_MAX_SIZE_LABEL"))+": ",1),qe(E("input",{id:"max_zip_file_size",name:"max_zip_file_size",type:"number",step:"0.1",min:"0","onUpdate:modelValue":f[3]||(f[3]=m=>s.max_zip_file_size=m),disabled:!h(n)},null,8,GIe),[[rt,s.max_zip_file_size]])]),E("label",BIe,[j(T(l.$t("admin.APP_CONFIG.MAX_FILES_IN_ZIP_LABEL"))+": ",1),qe(E("input",{id:"gpx_limit_import",name:"gpx_limit_import",type:"number",min:"0","onUpdate:modelValue":f[4]||(f[4]=m=>s.gpx_limit_import=m),disabled:!h(n)},null,8,HIe),[[rt,s.gpx_limit_import]])]),E("label",VIe,T(l.$t("admin.ABOUT.TEXT"))+": ",1),E("span",jIe,T(l.$t("admin.ABOUT.DESCRIPTION")),1),h(n)?qe((A(),v("textarea",{key:0,id:"about",name:"about",rows:"10","onUpdate:modelValue":f[5]||(f[5]=m=>s.about=m)},null,512)),[[rt,s.about]]):(A(),v("div",{key:1,innerHTML:h(lr)(h(di)(s.about?s.about:l.$t("admin.NO_TEXT_ENTERED"))),class:"textarea-content"},null,8,KIe)),E("label",YIe,T(bt(l.$t("privacy_policy.TITLE")))+": ",1),E("span",qIe,T(l.$t("admin.PRIVACY_POLICY_DESCRIPTION")),1),h(n)?qe((A(),v("textarea",{key:2,id:"privacy_policy",name:"privacy_policy",rows:"20","onUpdate:modelValue":f[6]||(f[6]=m=>s.privacy_policy=m)},null,512)),[[rt,s.privacy_policy]]):(A(),v("div",{key:3,innerHTML:h(lr)(h(di)(s.privacy_policy?s.privacy_policy:l.$t("admin.NO_TEXT_ENTERED"))),class:"textarea-content"},null,8,XIe)),i.value?(A(),te(d,{key:4,message:i.value},null,8,["message"])):x("",!0),h(n)?(A(),v("div",ZIe,[E("button",QIe,T(l.$t("buttons.SUBMIT")),1),E("button",{class:"cancel",onClick:Je(u,["prevent"])},T(l.$t("buttons.CANCEL")),1)])):(A(),v("div",JIe,[E("button",{class:"confirm",onClick:f[7]||(f[7]=Je(m=>l.$router.push("/admin/application/edit"),["prevent"]))},T(l.$t("buttons.EDIT")),1),E("button",{class:"cancel",onClick:f[8]||(f[8]=Je(m=>l.$router.push("/admin"),["prevent"]))},T(l.$t("admin.BACK_TO_ADMIN")),1)]))],32)]),_:1})])}}}),Cm=ae(eRe,[["__scopeId","data-v-a720b26e"]]),tRe={class:"stat-card"},nRe={class:"stat-content box"},aRe={class:"stat-icon"},rRe={class:"stat-details"},sRe={class:"stat-huge"},iRe={class:"stat"},ca=Z({__name:"StatCard",props:{icon:{},text:{},value:{}},setup(e){const t=e,{icon:n,text:a,value:r}=_e(t);return(s,i)=>(A(),v("div",tRe,[E("div",nRe,[E("div",aRe,[E("i",{class:Se(["fa",`fa-${h(n)}`])},null,2)]),E("div",rRe,[E("div",sRe,T(h(r)),1),E("div",iRe,T(h(a)),1)])])]))}}),oRe={id:"user-stats"},uRe=Z({__name:"AppStatsCards",props:{appStatistics:{}},setup(e){const t=e,{appStatistics:n}=_e(t),a=k(()=>CT(n.value.uploads_dir_size));return(r,s)=>(A(),v("div",oRe,[$(ca,{icon:"users",value:h(n).users,text:r.$t("admin.USER",h(n).users)},null,8,["value","text"]),$(ca,{icon:"tags",value:h(n).sports,text:r.$t("workouts.SPORT",h(n).sports)},null,8,["value","text"]),$(ca,{icon:"calendar",value:h(n).workouts,text:r.$t("workouts.WORKOUT",h(n).workouts)},null,8,["value","text"]),$(ca,{icon:"folder-open",value:a.value.size,text:a.value.suffix},null,8,["value","text"])]))}}),Yg=e=>(ut("data-v-91cfdfba"),e=e(),lt(),e),lRe={id:"admin-menu",class:"center-card"},cRe={class:"admin-menu description-list"},dRe={class:"application-config-details"},fRe=Yg(()=>E("br",null,null,-1)),ERe={class:"registration-status"},pRe={key:0,class:"email-sending-status"},mRe=Yg(()=>E("i",{class:"fa fa-exclamation-triangle","aria-hidden":"true"},null,-1)),hRe=Z({__name:"AdminMenu",props:{appConfig:{},appStatistics:{default:()=>({})}},setup(e){const t=e,{appConfig:n,appStatistics:a}=_e(t);return _t(()=>{const r=document.getElementById("adminLink");r&&r.focus()}),(r,s)=>{const i=oe("router-link");return A(),v("div",lRe,[$(_T,null,{title:ue(()=>[j(T(r.$t("admin.ADMINISTRATION")),1)]),content:ue(()=>[$(uRe,{appStatistics:h(a)},null,8,["appStatistics"]),E("div",cRe,[E("dl",null,[E("dt",null,[$(i,{id:"adminLink",to:"/admin/application"},{default:ue(()=>[j(T(r.$t("admin.APPLICATION")),1)]),_:1})]),E("dd",dRe,[j(T(r.$t("admin.UPDATE_APPLICATION_DESCRIPTION")),1),fRe,E("span",ERe,T(r.$t(`admin.REGISTRATION_${h(n).is_registration_enabled?"ENABLED":"DISABLED"}`)),1),h(n).is_email_sending_enabled?x("",!0):(A(),v("span",pRe,[mRe,j(" "+T(r.$t("admin.EMAIL_SENDING_DISABLED")),1)]))]),E("dt",null,[$(i,{to:"/admin/sports"},{default:ue(()=>[j(T(bt(r.$t("workouts.SPORT",0))),1)]),_:1})]),E("dd",null,T(r.$t("admin.ENABLE_DISABLE_SPORTS")),1),E("dt",null,[$(i,{to:"/admin/users"},{default:ue(()=>[j(T(bt(r.$t("admin.USER",0))),1)]),_:1})]),E("dd",null,T(r.$t("admin.ADMIN_RIGHTS_DELETE_USER_ACCOUNT")),1)])])]),_:1})])}}}),_Re=ae(hRe,[["__scopeId","data-v-91cfdfba"]]),rE={"Cycling (Sport)":"#4c9792","Cycling (Trekking)":"#a8af88","Cycling (Transport)":"#88af98","Cycling (Virtual)":"#64a360",Hiking:"#bb757c","Mountain Biking":"#d4b371","Mountain Biking (Electric)":"#fc9d6f",Mountaineering:"#48b3b7","Open Water Swimming":"#4058a4",Paragliding:"#c23c50",Rowing:"#fcce72",Running:"#835b83","Skiing (Alpine)":"#67a4bd","Skiing (Cross Country)":"#9498d0",Snowshoes:"#5780a8",Trail:"#09a98a",Walking:"#838383"},TRe=e=>{const t={};return e.map(n=>t[n.id]=n.color?n.color:rE[n.label]),t},gRe=(e,t)=>{const n=e.translatedLabel.toLowerCase(),a=t.translatedLabel.toLowerCase();return n>a?1:ne.filter(r=>n==="all"?!0:a.includes(r.id)||r[n]).map(r=>({...r,translatedLabel:t(`sports.${r.label}.LABEL`)})).sort(gRe),sE=(e,t)=>t.filter(n=>n.id===e.sport_id).map(n=>n.label)[0],iE=(e,t)=>t.filter(n=>n.id===e.sport_id).map(n=>n.color)[0],Sl=e=>(ut("data-v-203d96b8"),e=e(),lt(),e),ARe={id:"admin-sports",class:"admin-card"},SRe={class:"responsive-table"},ORe=Sl(()=>E("th",null,"#",-1)),IRe={class:"text-left"},RRe={class:"text-left sport-action"},bRe=Sl(()=>E("th",null,null,-1)),NRe={class:"text-center"},vRe=Sl(()=>E("span",{class:"cell-heading"},"id",-1)),CRe={class:"cell-heading"},yRe={class:"sport-label"},DRe={class:"cell-heading"},PRe={class:"text-center"},LRe={class:"cell-heading"},wRe={class:"sport-action"},kRe={class:"cell-heading"},$Re={class:"action-button"},URe=["onClick"],MRe={key:0,class:"has-workouts"},xRe=Sl(()=>E("i",{class:"fa fa-warning","aria-hidden":"true"},null,-1)),FRe=Z({__name:"AdminSports",setup(e){const{t}=Yt(),n=Me(),a=k(()=>Xa(n.getters[Mt.GETTERS.SPORTS],t)),r=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]);function s(i,o){n.dispatch(Mt.ACTIONS.UPDATE_SPORTS,{id:i,isActive:o})}return(i,o)=>{const u=oe("SportImage"),c=oe("ErrorMessage"),l=oe("Card");return A(),v("div",ARe,[$(l,null,{title:ue(()=>[j(T(i.$t("admin.SPORTS.TITLE")),1)]),content:ue(()=>[E("button",{class:"top-button",onClick:o[0]||(o[0]=Je(f=>i.$router.push("/admin"),["prevent"]))},T(i.$t("admin.BACK_TO_ADMIN")),1),E("div",SRe,[E("table",null,[E("thead",null,[E("tr",null,[ORe,E("th",null,T(i.$t("admin.SPORTS.TABLE.IMAGE")),1),E("th",IRe,T(i.$t("admin.SPORTS.TABLE.LABEL")),1),E("th",null,T(i.$t("admin.SPORTS.TABLE.ACTIVE")),1),E("th",RRe,T(i.$t("admin.ACTION")),1),bRe])]),E("tbody",null,[(A(!0),v(be,null,Ge(a.value,f=>(A(),v("tr",{key:f.id},[E("td",NRe,[vRe,j(" "+T(f.id),1)]),E("td",null,[E("span",CRe,T(i.$t("admin.SPORTS.TABLE.IMAGE")),1),$(u,{title:f.translatedLabel,"sport-label":f.label,color:f.color},null,8,["title","sport-label","color"])]),E("td",yRe,[E("span",DRe,T(i.$t("admin.SPORTS.TABLE.LABEL")),1),j(" "+T(f.translatedLabel),1)]),E("td",PRe,[E("span",LRe,T(i.$t("admin.SPORTS.TABLE.ACTIVE")),1),E("i",{class:Se(`fa fa${f.is_active?"-check":""}`),"aria-hidden":"true"},null,2)]),E("td",wRe,[E("span",kRe,T(i.$t("admin.ACTION")),1),E("div",$Re,[E("button",{class:Se({danger:f.is_active}),onClick:d=>s(f.id,!f.is_active)},T(i.$t(`buttons.${f.is_active?"DIS":"EN"}ABLE`)),11,URe),f.has_workouts?(A(),v("span",MRe,[xRe,j(" "+T(i.$t("admin.SPORTS.TABLE.HAS_WORKOUTS")),1)])):x("",!0)])])]))),128))])]),r.value?(A(),te(c,{key:0,message:r.value},null,8,["message"])):x("",!0),E("button",{onClick:o[1]||(o[1]=Je(f=>i.$router.push("/admin"),["prevent"]))},T(i.$t("admin.BACK_TO_ADMIN")),1)])]),_:1})])}}}),zRe=ae(FRe,[["__scopeId","data-v-203d96b8"]]),WRe={class:"table-selects"},GRe=["value"],BRe=["value"],HRe=["value"],VRe=["value"],jRe=["value"],KRe=["value"],YRe=Z({__name:"FilterSelects",props:{order_by:{},query:{},sort:{},message:{}},emits:["updateSelect"],setup(e,{emit:t}){const n=e,a=t,{order_by:r,query:s,sort:i,message:o}=_e(n),u=[10,25,50,100];function c(l){a("updateSelect",l.target.id,l.target.value)}return(l,f)=>(A(),v("div",WRe,[E("label",null,[j(T(l.$t("common.SELECTS.ORDER_BY.LABEL"))+": ",1),E("select",{name:"order_by",id:"order_by",value:h(s).order_by,onChange:c},[(A(!0),v(be,null,Ge(h(r),d=>(A(),v("option",{value:d,key:d},T(l.$t(`${h(o)}.${d.toUpperCase()}`)),9,BRe))),128))],40,GRe)]),E("label",null,[j(T(l.$t("common.SELECTS.ORDER.LABEL"))+": ",1),E("select",{name:"order",id:"order",value:h(s).order,onChange:c},[(A(!0),v(be,null,Ge(h(i),d=>(A(),v("option",{value:d,key:d},T(l.$t(`common.SELECTS.ORDER.${d.toUpperCase()}`)),9,VRe))),128))],40,HRe)]),E("label",null,[j(T(l.$t("common.SELECTS.PER_PAGE.LABEL"))+": ",1),E("select",{name:"per_page",id:"per_page",value:h(s).per_page,onChange:c},[(A(),v(be,null,Ge(u,d=>E("option",{value:d,key:d},T(d),9,KRe)),64))],40,jRe)])]))}}),qg=ae(YRe,[["__scopeId","data-v-fc86ab3c"]]),oE=["asc","desc"],Xg=1,qRe=10,Cd=(e,t)=>e&&typeof e=="string"&&+e>0?+e:t,ym=(e,t,n)=>e&&typeof e=="string"&&t.includes(e)?e:n,yd=(e,t,n,a)=>{const s=(a||{}).defaultSort||"asc",i={};return i.page=Cd(e.page,Xg),i.per_page=Cd(e.per_page,qRe),i.order=ym(e.order,oE,s),i.order_by=ym(e.order_by,t,n),typeof e.q=="string"?i.q=e.q:delete i.q,i},XRe=["from","to","ave_speed_from","ave_speed_to","max_speed_from","max_speed_to","distance_from","distance_to","duration_from","duration_to","sport_id","title"],Cr=(e,t=1)=>Array.from({length:e-t+1},(n,a)=>t+a),ZRe=(e,t)=>{if(e<0)return[];if(e<9)return Cr(e);let n=[1,2];return t<4?n=n.concat([3,4,5]):t<6?n=n.concat(Cr(t+2,3)):(n=n.concat(["..."]),t=e-2&&+n[n.length-1](ut("data-v-69dd9739"),e=e(),lt(),e),QRe={class:"pagination-center","aria-label":"navigation"},JRe={class:"pagination"},ebe=Zg(()=>E("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),tbe={key:0},nbe=Zg(()=>E("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),abe=Z({__name:"Pagination",props:{pagination:{},path:{},query:{}},setup(e){const t=e,{pagination:n,path:a,query:r}=_e(t);function s(i,o){const u=Object.assign({},r.value);return u.page=o?i+o:i,u}return(i,o)=>{const u=oe("router-link");return A(),v("nav",QRe,[E("ul",JRe,[E("li",{class:Se(["page-prev",{disabled:!h(n).has_prev}])},[$(u,{class:"page-link",to:{path:h(a),query:s(h(n).page,-1)},disabled:!h(n).has_prev,tabindex:h(n).has_prev?0:-1},{default:ue(({navigate:c})=>[Br(i.$slots,"default",{onClick:l=>h(n).has_next?c:null},()=>[j(T(i.$t("api.PAGINATION.PREVIOUS"))+" ",1),ebe],!0)]),_:3},8,["to","disabled","tabindex"])],2),(A(!0),v(be,null,Ge(h(ZRe)(h(n).pages,h(n).page),c=>(A(),v("li",{key:c,class:Se(["page",{active:c===h(n).page}])},[c==="..."?(A(),v("span",tbe," ... ")):(A(),te(u,{key:1,class:"page-link",to:{path:h(a),query:s(+c)}},{default:ue(()=>[j(T(c),1)]),_:2},1032,["to"]))],2))),128)),E("li",{class:Se(["page-next",{disabled:!h(n).has_next}])},[$(u,{class:"page-link",to:{path:h(a),query:s(h(n).page,1)},disabled:!h(n).has_next,tabindex:h(n).has_next?0:-1},{default:ue(({navigate:c})=>[Br(i.$slots,"default",{onClick:l=>h(n).has_next?c:null},()=>[j(T(i.$t("api.PAGINATION.NEXT"))+" ",1),nbe],!0)]),_:3},8,["to","disabled","tabindex"])],2)])])}}}),ku=ae(abe,[["__scopeId","data-v-69dd9739"]]),rbe={class:"users-filters"},sbe={class:"search-username"},ibe=["placeholder"],obe=Z({__name:"UsersNameFilter",emits:["filterOnUsername"],setup(e,{emit:t}){const n=qt(),a=ce(n.query.q?n.query.q:""),r=t;function s(){a.value!==""&&r("filterOnUsername",a)}function i(){a.value="",r("filterOnUsername",a.value)}return(o,u)=>(A(),v("div",rbe,[E("div",sbe,[qe(E("input",{id:"username",name:"username","onUpdate:modelValue":u[0]||(u[0]=c=>a.value=c),onKeyup:At(s,["enter"]),placeholder:o.$t("user.FILTER_ON_USERNAME")},null,40,ibe),[[rt,a.value,void 0,{trim:!0}]]),a.value!==""?(A(),v("i",{key:0,class:"fa fa-times","aria-hidden":"true",onClick:i})):x("",!0)]),E("i",{class:Se(["fa fa-search",{"fa-disabled":a.value===""}]),"aria-hidden":"true",onClick:s},null,2)]))}}),ube=ae(obe,[["__scopeId","data-v-553040c7"]]);var Dd={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(a){if(a===null||a===!0||a===!1)return NaN;var r=Number(a);return isNaN(r)?r:r<0?Math.ceil(r):Math.floor(r)}e.exports=t.default})(Dd,Dd.exports);var lbe=Dd.exports;const cbe=xd(lbe);var Pd={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(a){var r=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return r.setUTCFullYear(a.getFullYear()),a.getTime()-r.getTime()}e.exports=t.default})(Pd,Pd.exports);var dbe=Pd.exports;const Dm=xd(dbe);function fbe(e,t){var n=hbe(t);return n.formatToParts?pbe(n,e):mbe(n,e)}var Ebe={year:0,month:1,day:2,hour:3,minute:4,second:5};function pbe(e,t){try{for(var n=e.formatToParts(t),a=[],r=0;r=0&&(a[s]=parseInt(n[r].value,10))}return a}catch(i){if(i instanceof RangeError)return[NaN];throw i}}function mbe(e,t){var n=e.format(t).replace(/\u200E/g,""),a=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[a[3],a[1],a[2],a[4],a[5],a[6]]}var sc={};function hbe(e){if(!sc[e]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n=t==="06/25/2014, 00:00:00"||t==="06/25/2014 00:00:00";sc[e]=n?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return sc[e]}function Qg(e,t,n,a,r,s,i){var o=new Date(0);return o.setUTCFullYear(e,t,n),o.setUTCHours(a,r,s,i),o}var Pm=36e5,_be=6e4,ic={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function Jg(e,t,n){var a,r;if(!e||(a=ic.timezoneZ.exec(e),a))return 0;var s;if(a=ic.timezoneHH.exec(e),a)return s=parseInt(a[1],10),Lm(s)?-(s*Pm):NaN;if(a=ic.timezoneHHMM.exec(e),a){s=parseInt(a[1],10);var i=parseInt(a[2],10);return Lm(s,i)?(r=Math.abs(s)*Pm+i*_be,s>0?-r:r):NaN}if(Abe(e)){t=new Date(t||Date.now());var o=n?t:Tbe(t),u=Ld(o,e),c=n?u:gbe(t,u,e);return-c}return NaN}function Tbe(e){return Qg(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function Ld(e,t){var n=fbe(e,t),a=Qg(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),r=e.getTime(),s=r%1e3;return r-=s>=0?s:1e3+s,a-r}function gbe(e,t,n){var a=e.getTime(),r=a-t,s=Ld(new Date(r),n);if(t===s)return t;r-=s-t;var i=Ld(new Date(r),n);return s===i?s:Math.max(s,i)}function Lm(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}var wm={};function Abe(e){if(wm[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),wm[e]=!0,!0}catch{return!1}}var Sbe=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,oc=36e5,km=6e4,Obe=2,en={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:Sbe};function Ibe(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);var n=t||{},a=n.additionalDigits==null?Obe:cbe(n.additionalDigits);if(a!==2&&a!==1&&a!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var r=Rbe(e),s=bbe(r.date,a),i=s.year,o=s.restDateString,u=Nbe(o,i);if(isNaN(u))return new Date(NaN);if(u){var c=u.getTime(),l=0,f;if(r.time&&(l=vbe(r.time),isNaN(l)))return new Date(NaN);if(r.timeZone||n.timeZone){if(f=Jg(r.timeZone||n.timeZone,new Date(c+l)),isNaN(f))return new Date(NaN)}else f=Dm(new Date(c+l)),f=Dm(new Date(c+l+f));return new Date(c+l+f)}else return new Date(NaN)}function Rbe(e){var t={},n=en.dateTimePattern.exec(e),a;if(n?(t.date=n[1],a=n[3]):(n=en.datePattern.exec(e),n?(t.date=n[1],a=n[2]):(t.date=null,a=e)),a){var r=en.timeZone.exec(a);r?(t.time=a.replace(r[1],""),t.timeZone=r[1].trim()):t.time=a}return t}function bbe(e,t){var n=en.YYY[t],a=en.YYYYY[t],r;if(r=en.YYYY.exec(e)||a.exec(e),r){var s=r[1];return{year:parseInt(s,10),restDateString:e.slice(s.length)}}if(r=en.YY.exec(e)||n.exec(e),r){var i=r[1];return{year:parseInt(i,10)*100,restDateString:e.slice(i.length)}}return{year:null}}function Nbe(e,t){if(t===null)return null;var n,a,r,s;if(e.length===0)return a=new Date(0),a.setUTCFullYear(t),a;if(n=en.MM.exec(e),n)return a=new Date(0),r=parseInt(n[1],10)-1,Um(t,r)?(a.setUTCFullYear(t,r),a):new Date(NaN);if(n=en.DDD.exec(e),n){a=new Date(0);var i=parseInt(n[1],10);return Dbe(t,i)?(a.setUTCFullYear(t,0,i),a):new Date(NaN)}if(n=en.MMDD.exec(e),n){a=new Date(0),r=parseInt(n[1],10)-1;var o=parseInt(n[2],10);return Um(t,r,o)?(a.setUTCFullYear(t,r,o),a):new Date(NaN)}if(n=en.Www.exec(e),n)return s=parseInt(n[1],10)-1,Mm(t,s)?$m(t,s):new Date(NaN);if(n=en.WwwD.exec(e),n){s=parseInt(n[1],10)-1;var u=parseInt(n[2],10)-1;return Mm(t,s,u)?$m(t,s,u):new Date(NaN)}return null}function vbe(e){var t,n,a;if(t=en.HH.exec(e),t)return n=parseFloat(t[1].replace(",",".")),uc(n)?n%24*oc:NaN;if(t=en.HHMM.exec(e),t)return n=parseInt(t[1],10),a=parseFloat(t[2].replace(",",".")),uc(n,a)?n%24*oc+a*km:NaN;if(t=en.HHMMSS.exec(e),t){n=parseInt(t[1],10),a=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return uc(n,a,r)?n%24*oc+a*km+r*1e3:NaN}return null}function $m(e,t,n){t=t||0,n=n||0;var a=new Date(0);a.setUTCFullYear(e,0,4);var r=a.getUTCDay()||7,s=t*7+n+1-r;return a.setUTCDate(a.getUTCDate()+s),a}var Cbe=[31,28,31,30,31,30,31,31,30,31,30,31],ybe=[31,29,31,30,31,30,31,31,30,31,30,31];function eA(e){return e%400===0||e%4===0&&e%100!==0}function Um(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;var a=eA(e);if(a&&n>ybe[t]||!a&&n>Cbe[t])return!1}return!0}function Dbe(e,t){if(t<1)return!1;var n=eA(e);return!(n&&t>366||!n&&t>365)}function Mm(e,t,n){return!(t<0||t>52||n!=null&&(n<0||n>6))}function uc(e,t,n){return!(e!=null&&(e<0||e>=25)||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}function Pbe(e,t,n){var a=Ibe(e,n),r=Jg(t,a,!0),s=new Date(a.getTime()-r),i=new Date(0);return i.setFullYear(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()),i.setHours(s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds()),i}const{locale:$u}=_r.global,Lbe=(e,t,n)=>{switch(e){case"week":return tl(t,{weekStartsOn:n?1:0});case"year":return Sf(t);case"month":return bi(t);default:throw new Error(`Invalid duration, expected: "week", "month", "year", got: "${e}"`)}},wbe=(e,t)=>{switch(e){case"week":return Ii(t,7);case"year":return Ho(t,1);case"month":return Kr(t,1);default:throw new Error(`Invalid duration, expected: "week", "month", "year", got: "${e}"`)}},Ol=(e,t)=>Pbe(new Date(e),t),xm=(e,t)=>{const n=bi(e),a=Ri(e),r=t?1:0;return{start:tl(n,{weekStartsOn:r}),end:Of(a,{weekStartsOn:r})}},tA=(e,t=null,n=null)=>(t||(t="yyyy/MM/dd"),t=gr(t,$u.value),n||(n="HH:mm"),{workout_date:dn(e,t,{locale:Ni[$u.value]}),workout_time:dn(e,n)}),kbe=["MM/dd/yyyy","dd/MM/yyyy","yyyy-MM-dd","date_string"],nA={de:"do MMM yyyy",en:"MMM. do, yyyy",es:"d MMM yyyy",eu:"d MMM yyyy",fr:"d MMM yyyy",gl:"d MMM yyyy",it:"d MMM yyyy",pl:"d MMM yyyy",nb:"do MMM yyyy",nl:"d MMM yyyy"},gr=(e,t)=>e==="date_string"?nA[t]:e,$n=(e,t,n,a=!0,r=null,s=!1)=>{r||(r=$u.value);const i=a?s?" HH:mm:ss":" HH:mm":"";return dn(Ol(e,t),`${gr(n,r)}${i}`,{locale:Ni[r]})},$be=(e,t,n=null)=>{const a=n||$u.value,r=[];return kbe.map(s=>{const i=gr(s,a);r.push({label:`${i} - ${$n(e,t,i,!1,a)}`,value:s})}),r},Ube=e=>(ut("data-v-4beb3bfa"),e=e(),lt(),e),Mbe={id:"admin-users",class:"admin-card"},xbe={key:0,class:"no-users"},Fbe={key:1,class:"responsive-table"},zbe=Ube(()=>E("th",null,"#",-1)),Wbe={class:"left-text"},Gbe={class:"left-text"},Bbe={class:"left-text"},Hbe={class:"cell-heading"},Vbe={class:"cell-heading"},jbe={class:"cell-heading"},Kbe={class:"cell-heading"},Ybe={class:"text-center"},qbe={class:"cell-heading"},Xbe={class:"text-center"},Zbe={class:"cell-heading"},Qbe={class:"text-center"},Jbe={class:"cell-heading"},eNe={class:"text-center"},tNe={class:"cell-heading"},nNe=["disabled","onClick"],Fm="created_at",aNe=Z({__name:"AdminUsers",setup(e){const t=Me(),n=qt(),a=Ya(),r=["is_active","admin","created_at","username","workouts_count"];let s=Gt(yd(n.query,r,Fm));const i=k(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),o=k(()=>t.getters[Le.GETTERS.USERS]),u=k(()=>t.getters[Le.GETTERS.USERS_PAGINATION]),c=k(()=>t.getters[H.GETTERS.ERROR_MESSAGES]);Ct(()=>l(s));function l(m){t.dispatch(Le.ACTIONS.GET_USERS,m)}function f(m){p("q",m.value)}function d(m,I){t.dispatch(Le.ACTIONS.UPDATE_USER,{username:m,admin:I})}function p(m,I){s[m]=I,m==="per_page"&&(s.page=1),a.push({path:"/admin/users",query:s})}return Nt(()=>{t.dispatch(Le.ACTIONS.EMPTY_USERS)}),We(()=>n.query,m=>{s=yd(m,r,Fm,{query:s}),l(s)}),(m,I)=>{const b=oe("router-link"),R=oe("ErrorMessage"),N=oe("Card");return A(),v("div",Mbe,[$(N,null,{title:ue(()=>[j(T(bt(m.$t("admin.USER",0))),1)]),content:ue(()=>[E("button",{class:"top-button",onClick:I[0]||(I[0]=Je(S=>m.$router.push("/admin"),["prevent"]))},T(m.$t("admin.BACK_TO_ADMIN")),1),$(ube,{onFilterOnUsername:f}),$(qg,{sort:h(oE),order_by:r,query:h(s),message:"admin.USERS.SELECTS.ORDER_BY",onUpdateSelect:p},null,8,["sort","query"]),o.value.length===0?(A(),v("div",xbe,T(m.$t("user.NO_USERS_FOUND")),1)):(A(),v("div",Fbe,[E("table",null,[E("thead",null,[E("tr",null,[zbe,E("th",Wbe,T(m.$t("user.USERNAME")),1),E("th",Gbe,T(m.$t("user.EMAIL")),1),E("th",Bbe,T(m.$t("user.PROFILE.REGISTRATION_DATE")),1),E("th",null,T(bt(m.$t("workouts.WORKOUT",0))),1),E("th",null,T(m.$t("admin.ACTIVE")),1),E("th",null,T(m.$t("user.ADMIN")),1),E("th",null,T(m.$t("admin.ACTION")),1)])]),E("tbody",null,[(A(!0),v(be,null,Ge(o.value,S=>(A(),v("tr",{key:S.username},[E("td",null,[E("span",Hbe,T(m.$t("user.PROFILE.PICTURE")),1),$(Oi,{user:S},null,8,["user"])]),E("td",null,[E("span",Vbe,T(m.$t("user.USERNAME")),1),$(b,{to:`/admin/users/${S.username}`},{default:ue(()=>[j(T(S.username),1)]),_:2},1032,["to"])]),E("td",null,[E("span",jbe,T(m.$t("user.EMAIL")),1),j(" "+T(S.email),1)]),E("td",null,[E("span",Kbe,T(m.$t("user.PROFILE.REGISTRATION_DATE")),1),E("time",null,T(h($n)(S.created_at,i.value.timezone,i.value.date_format)),1)]),E("td",Ybe,[E("span",qbe,T(bt(m.$t("workouts.WORKOUT",0))),1),j(" "+T(S.nb_workouts),1)]),E("td",Xbe,[E("span",Zbe,T(m.$t("admin.ACTIVE")),1),E("i",{class:Se(`fa fa${S.is_active?"-check":""}-square-o`),"aria-hidden":"true"},null,2)]),E("td",Qbe,[E("span",Jbe,T(m.$t("user.ADMIN")),1),E("i",{class:Se(`fa fa${S.admin?"-check":""}-square-o`),"aria-hidden":"true"},null,2)]),E("td",eNe,[E("span",tNe,T(m.$t("admin.ACTION")),1),E("button",{class:Se({danger:S.admin}),disabled:S.username===i.value.username,onClick:O=>d(S.username,!S.admin)},T(m.$t(`admin.USERS.TABLE.${S.admin?"REMOVE":"ADD"}_ADMIN_RIGHTS`)),11,nNe)])]))),128))])]),u.value.page?(A(),te(ku,{key:0,path:"/admin/users",pagination:u.value,query:h(s)},null,8,["pagination","query"])):x("",!0),c.value?(A(),te(R,{key:1,message:c.value},null,8,["message"])):x("",!0),E("button",{onClick:I[1]||(I[1]=Je(S=>m.$router.push("/admin"),["prevent"]))},T(m.$t("admin.BACK_TO_ADMIN")),1)]))]),_:1})])}}}),rNe=ae(aNe,[["__scopeId","data-v-4beb3bfa"]]),sNe={class:"box user-header"},iNe={class:"user-details"},oNe={class:"user-name"},uNe={class:"user-stats"},lNe={class:"user-stat"},cNe={class:"stat-number"},dNe={class:"stat-label"},fNe={class:"user-stat"},ENe={class:"stat-label"},pNe={class:"user-stat hide-small"},mNe={class:"stat-number"},hNe={class:"stat-label"},_Ne=Z({__name:"UserHeader",props:{user:{}},setup(e){const t=e,{user:n}=_e(t),a=Me(),r=k(()=>a.getters[K.GETTERS.AUTH_USER_PROFILE]);return(s,i)=>{const o=oe("Distance");return A(),v("div",sNe,[$(Oi,{user:h(n)},null,8,["user"]),E("div",iNe,[E("div",oNe,T(h(n).username),1),E("div",uNe,[E("div",lNe,[E("span",cNe,T(h(n).nb_workouts),1),E("span",dNe,T(s.$t("workouts.WORKOUT",h(n).nb_workouts)),1)]),E("div",fNe,[$(o,{distance:h(n).total_distance,unitFrom:"km",digits:0,displayUnit:!1,useImperialUnits:r.value.imperial_units},null,8,["distance","useImperialUnits"]),E("span",ENe,T(r.value.imperial_units?"miles":"km"),1)]),E("div",pNe,[E("span",mNe,T(h(n).nb_sports),1),E("span",hNe,T(s.$t("workouts.SPORT",h(n).nb_sports)),1)])])])])}}}),aA=ae(_Ne,[["__scopeId","data-v-3abb1646"]]),TNe={class:"profile-tabs custom-checkboxes-group"},gNe={class:"profile-tabs-checkboxes custom-checkboxes"},ANe=["id","name","checked","disabled","onInput"],SNe=["id","onKeydown"],rA=Z({__name:"UserProfileTabs",props:{tabs:{},selectedTab:{},edition:{type:Boolean},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{tabs:n,selectedTab:a,disabled:r}=_e(t);_t(()=>{const i=document.getElementById(`tab-${n.value[0]}`);i&&i.focus()});function s(i){switch(i){case"ACCOUNT":case"PICTURE":case"PRIVACY-POLICY":return`/profile/edit/${i.toLocaleLowerCase()}`;case"APPS":case"PREFERENCES":case"SPORTS":return`/profile${t.edition?"/edit":""}/${i.toLocaleLowerCase()}`;default:case"PROFILE":return`/profile${t.edition?"/edit":""}`}}return(i,o)=>(A(),v("div",TNe,[E("div",gNe,[(A(!0),v(be,null,Ge(h(n),u=>(A(),v("div",{class:"profile-tab custom-checkbox",key:u},[E("label",null,[E("input",{type:"radio",id:u,name:u,checked:h(a).split("/")[0]===u,disabled:h(r),onInput:c=>i.$router.push(s(u))},null,40,ANe),E("span",{id:`tab-${u}`,tabindex:0,role:"button",onKeydown:At(c=>i.$router.push(s(u)),["enter"])},T(i.$t(`user.PROFILE.TABS.${u}`)),41,SNe)])]))),128))])]))}}),ONe={id:"user-profile"},INe={class:"box"},RNe=Z({__name:"index",props:{user:{},tab:{}},setup(e){const t=e,{user:n,tab:a}=_e(t),r=["PROFILE","PREFERENCES","SPORTS","APPS"];return(s,i)=>{const o=oe("router-view");return A(),v("div",ONe,[$(aA,{user:h(n)},null,8,["user"]),E("div",INe,[$(rA,{tabs:r,selectedTab:h(a),edition:!1},null,8,["selectedTab"]),$(o,{user:h(n)},null,8,["user"])])])}}}),bNe=ae(RNe,[["__scopeId","data-v-8a058d49"]]),NNe={id:"user-infos",class:"description-list"},vNe={key:1,class:"info-box success-message"},CNe={key:4,class:"email-form form-box"},yNe={class:"form-items",for:"email"},DNe={class:"form-items",for:"email"},PNe={class:"form-buttons"},LNe={class:"confirm",type:"submit"},wNe={key:5},kNe={key:0},$Ne={class:"user-bio"},UNe={key:0,class:"profile-buttons"},MNe={key:1,class:"profile-buttons"},xNe=Z({__name:"UserInfos",props:{user:{},fromAdmin:{type:Boolean,default:!1}},setup(e){const t=e,n=Me(),{user:a,fromAdmin:r}=_e(t),s=k(()=>n.getters[H.GETTERS.LANGUAGE]),i=k(()=>n.getters[K.GETTERS.AUTH_USER_PROFILE]),o=k(()=>t.user.created_at?$n(t.user.created_at,i.value.timezone,i.value.date_format):""),u=k(()=>t.user.birth_date?dn(new Date(t.user.birth_date),`${gr(i.value.date_format,s.value)}`,{locale:Ni[s.value]}):""),c=k(()=>n.getters[Le.GETTERS.USERS_IS_SUCCESS]),l=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),f=k(()=>n.getters[H.GETTERS.APP_CONFIG]),d=ce(""),p=ce(!1),m=ce(!1),I=ce(""),b=ce("");function R(W){d.value=W,W!==""&&n.commit(Le.MUTATIONS.UPDATE_IS_SUCCESS,!1)}function N(W){n.dispatch(Le.ACTIONS.DELETE_USER_ACCOUNT,{username:W})}function S(W){b.value="password-reset",n.dispatch(Le.ACTIONS.UPDATE_USER,{username:W,resetPassword:!0})}function O(W){n.dispatch(Le.ACTIONS.UPDATE_USER,{username:W,activate:!0})}function C(){L(),I.value=a.value.email_to_confirm?a.value.email_to_confirm:"",m.value=!0,b.value="email-update"}function P(){I.value="",m.value=!1}function M(W){n.dispatch(Le.ACTIONS.UPDATE_USER,{username:W,new_email:I.value})}function L(){n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),n.commit(Le.MUTATIONS.UPDATE_IS_SUCCESS,!1),b.value=""}return Nt(()=>L()),We(()=>c.value,W=>{W&&(R(""),P())}),(W,B)=>{const w=oe("Modal"),X=oe("AlertMessage"),J=oe("ErrorMessage");return A(),v("div",NNe,[d.value?(A(),te(w,{key:0,title:W.$t("common.CONFIRMATION"),message:d.value==="delete"?"admin.CONFIRM_USER_ACCOUNT_DELETION":"admin.CONFIRM_USER_PASSWORD_RESET",strongMessage:h(a).username,onConfirmAction:B[0]||(B[0]=ne=>d.value==="delete"?N(h(a).username):S(h(a).username)),onCancelAction:B[1]||(B[1]=ne=>R("")),onKeydown:B[2]||(B[2]=At(ne=>R(""),["esc"]))},null,8,["title","message","strongMessage"])):x("",!0),c.value?(A(),v("div",vNe,T(W.$t(`admin.${b.value==="password-reset"?"PASSWORD_RESET":"USER_EMAIL_UPDATE"}_SUCCESSFUL`)),1)):x("",!0),h(a).is_active?x("",!0):(A(),te(X,{key:2,message:"user.THIS_USER_ACCOUNT_IS_INACTIVE"})),l.value?(A(),te(J,{key:3,message:l.value},null,8,["message"])):x("",!0),m.value?(A(),v("div",CNe,[E("form",{class:Se({errors:p.value}),onSubmit:B[5]||(B[5]=Je(ne=>M(h(a).username),["prevent"]))},[E("label",yNe,[j(T(W.$t("admin.CURRENT_EMAIL"))+" ",1),qe(E("input",{id:"email",type:"email","onUpdate:modelValue":B[3]||(B[3]=ne=>h(a).email=ne),disabled:""},null,512),[[rt,h(a).email]])]),E("label",DNe,[j(T(W.$t("admin.NEW_EMAIL"))+"* ",1),qe(E("input",{id:"new-email",type:"email",required:"","onUpdate:modelValue":B[4]||(B[4]=ne=>I.value=ne)},null,512),[[rt,I.value]])]),E("div",PNe,[E("button",LNe,T(W.$t("buttons.SUBMIT")),1),E("button",{class:"cancel",onClick:Je(P,["prevent"])},T(W.$t("buttons.CANCEL")),1)])],34)])):(A(),v("div",wNe,[E("dl",null,[E("dt",null,T(W.$t("user.PROFILE.REGISTRATION_DATE"))+":",1),E("dd",null,[E("time",null,T(o.value),1)]),E("dt",null,T(W.$t("user.PROFILE.FIRST_NAME"))+":",1),E("dd",null,T(h(a).first_name),1),E("dt",null,T(W.$t("user.PROFILE.LAST_NAME"))+":",1),E("dd",null,T(h(a).last_name),1),E("dt",null,T(W.$t("user.PROFILE.BIRTH_DATE"))+":",1),E("dd",null,[u.value?(A(),v("time",kNe,T(u.value),1)):x("",!0)]),E("dt",null,T(W.$t("user.PROFILE.LOCATION"))+":",1),E("dd",null,T(h(a).location),1),E("dt",null,T(W.$t("user.PROFILE.BIO"))+":",1),E("dd",$Ne,T(h(a).bio),1)]),h(r)?(A(),v("div",UNe,[i.value.username!==h(a).username?(A(),v("button",{key:0,class:"danger",onClick:B[6]||(B[6]=Je(ne=>R("delete"),["prevent"]))},T(W.$t("admin.DELETE_USER")),1)):x("",!0),h(a).is_active?x("",!0):(A(),v("button",{key:1,onClick:B[7]||(B[7]=Je(ne=>O(h(a).username),["prevent"]))},T(W.$t("admin.ACTIVATE_USER_ACCOUNT")),1)),i.value.username!==h(a).username?(A(),v("button",{key:2,onClick:Je(C,["prevent"])},T(W.$t("admin.UPDATE_USER_EMAIL")),1)):x("",!0),i.value.username!==h(a).username&&f.value.is_email_sending_enabled?(A(),v("button",{key:3,onClick:B[8]||(B[8]=Je(ne=>R("reset"),["prevent"]))},T(W.$t("admin.RESET_USER_PASSWORD")),1)):x("",!0),E("button",{onClick:B[9]||(B[9]=ne=>W.$router.go(-1))},T(W.$t("buttons.BACK")),1)])):(A(),v("div",MNe,[E("button",{onClick:B[10]||(B[10]=ne=>W.$router.push("/profile/edit"))},T(W.$t("user.PROFILE.EDIT")),1),E("button",{onClick:B[11]||(B[11]=ne=>W.$router.push("/"))},T(W.$t("common.HOME")),1)]))]))])}}}),sA=ae(xNe,[["__scopeId","data-v-98220281"]]),FNe=e=>(ut("data-v-b0528e22"),e=e(),lt(),e),zNe={id:"user-preferences",class:"description-list"},WNe={class:"preferences-section"},GNe={class:"preferences-section"},BNe={class:"info-box raw-speed-help"},HNe=FNe(()=>E("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),VNe={class:"profile-buttons"},jNe=Z({__name:"UserPreferences",props:{user:{}},setup(e){const t=e,n=Me(),a=k(()=>n.getters[H.GETTERS.LANGUAGE]),r=k(()=>t.user.language?Xc[t.user.language]:Xc.en),s=k(()=>t.user.weekm?"MONDAY":"SUNDAY"),i=k(()=>t.user.timezone?t.user.timezone:"Europe/Paris"),o=k(()=>t.user.date_format?t.user.date_format:"MM/dd/yyyy"),u=k(()=>t.user.display_ascent?"DISPLAYED":"HIDDEN"),c=k(()=>t.user.use_dark_mode===!0?"DARK":t.user.use_dark_mode===!1?"LIGHT":"DEFAULT");return(l,f)=>(A(),v("div",zNe,[E("div",WNe,T(l.$t("user.PROFILE.INTERFACE")),1),E("dl",null,[E("dt",null,T(l.$t("user.PROFILE.LANGUAGE"))+":",1),E("dd",null,T(r.value),1),E("dt",null,T(l.$t("user.PROFILE.THEME_MODE.LABEL"))+":",1),E("dd",null,T(l.$t(`user.PROFILE.THEME_MODE.VALUES.${c.value}`)),1),E("dt",null,T(l.$t("user.PROFILE.TIMEZONE"))+":",1),E("dd",null,T(i.value),1),E("dt",null,T(l.$t("user.PROFILE.DATE_FORMAT"))+":",1),E("dd",null,T(h(gr)(o.value,a.value)),1),E("dt",null,T(l.$t("user.PROFILE.FIRST_DAY_OF_WEEK"))+":",1),E("dd",null,T(l.$t(`user.PROFILE.${s.value}`)),1)]),E("div",GNe,T(l.$t("workouts.WORKOUT",0)),1),E("dl",null,[E("dt",null,T(l.$t("user.PROFILE.UNITS.LABEL"))+":",1),E("dd",null,T(l.$t(`user.PROFILE.UNITS.${l.user.imperial_units?"IMPERIAL":"METRIC"}`)),1),E("dt",null,T(l.$t("user.PROFILE.ASCENT_DATA"))+":",1),E("dd",null,T(l.$t(`common.${u.value}`)),1),E("dt",null,T(l.$t("user.PROFILE.ELEVATION_CHART_START.LABEL"))+":",1),E("dd",null,T(l.$t(`user.PROFILE.ELEVATION_CHART_START.${l.user.start_elevation_at_zero?"ZERO":"MIN_ALT"}`)),1),E("dt",null,T(l.$t("user.PROFILE.USE_RAW_GPX_SPEED.LABEL"))+":",1),E("dd",null,T(l.$t(`user.PROFILE.USE_RAW_GPX_SPEED.${l.user.use_raw_gpx_speed?"RAW_SPEED":"FILTERED_SPEED"}`)),1),E("div",BNe,[E("span",null,[HNe,j(" "+T(l.$t("user.PROFILE.USE_RAW_GPX_SPEED.HELP")),1)])])]),E("div",VNe,[E("button",{onClick:f[0]||(f[0]=d=>l.$router.push("/profile/edit/preferences"))},T(l.$t("user.PROFILE.EDIT_PREFERENCES")),1),E("button",{onClick:f[1]||(f[1]=d=>l.$router.push("/"))},T(l.$t("common.HOME")),1)])]))}}),KNe=ae(jNe,[["__scopeId","data-v-b0528e22"]]),YNe={id:"user-profile-edition",class:"center-card"},qNe=Z({__name:"index",props:{user:{},tab:{}},setup(e){const t=e,n=Me(),{user:a,tab:r}=_e(t),s=["PROFILE","ACCOUNT","PICTURE","PREFERENCES","SPORTS","PRIVACY-POLICY"],i=k(()=>n.getters[K.GETTERS.USER_LOADING]);return(o,u)=>{const c=oe("router-view"),l=oe("Card");return A(),v("div",YNe,[$(l,null,{title:ue(()=>[j(T(o.$t(`user.PROFILE.${h(r)}_EDITION`)),1)]),content:ue(()=>[$(rA,{tabs:s,selectedTab:h(r),edition:!0,disabled:i.value},null,8,["selectedTab","disabled"]),$(c,{user:h(a)},null,8,["user"])]),_:1})])}}}),Gs=new Map,XNe=e=>{const{method:t,url:n,params:a={},data:r={}}=e;return[t,n,JSON.stringify(a),JSON.stringify(r)].join("")},is=e=>{const t=XNe(e);if(Gs.has(t)){const n=Gs.get(t)||{};n==null||n.abort(),Gs.delete(t)}return t},Pa=yt.create({baseURL:Si()});Pa.interceptors.request.use(e=>{const t=new AbortController;e.signal=t.signal;const n=is(e);return Gs.set(n,t),e},e=>Promise.reject(e));Pa.interceptors.response.use(e=>(is(e.config),e),e=>(e.message!=="canceled"&&e.response&&is(e.response.config),Promise.reject(e)));const iA=(e,t)=>{e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.delete(`users/${t.username}`).then(n=>{n.status===204?t.fromAdmin?Rt.push("/admin/users"):e.dispatch(K.ACTIONS.LOGOUT).then(()=>Rt.push("/")):me(e,null)}).catch(n=>me(e,n))},ZNe={[Le.ACTIONS.EMPTY_USER](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Le.MUTATIONS.UPDATE_USER,{})},[Le.ACTIONS.EMPTY_USERS](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Le.MUTATIONS.UPDATE_USERS,[]),e.commit(Le.MUTATIONS.UPDATE_USERS_PAGINATION,{})},[Le.ACTIONS.GET_USER](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Le.MUTATIONS.UPDATE_USERS_LOADING,!0),je.get(`users/${t}`).then(n=>{n.data.status==="success"?e.commit(Le.MUTATIONS.UPDATE_USER,n.data.data.users[0]):me(e,null)}).catch(n=>me(e,n)).finally(()=>e.commit(Le.MUTATIONS.UPDATE_USERS_LOADING,!1))},[Le.ACTIONS.GET_USERS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Le.MUTATIONS.UPDATE_USERS_LOADING,!0),je.get("users",{params:t}).then(n=>{n.data.status==="success"?(e.commit(Le.MUTATIONS.UPDATE_USERS,n.data.data.users),e.commit(Le.MUTATIONS.UPDATE_USERS_PAGINATION,n.data.pagination)):me(e,null)}).catch(n=>me(e,n)).finally(()=>e.commit(Le.MUTATIONS.UPDATE_USERS_LOADING,!1))},[Le.ACTIONS.UPDATE_USER](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Le.MUTATIONS.UPDATE_IS_SUCCESS,!1);const n={};t.admin!==void 0&&(n.admin=t.admin),t.resetPassword&&(n.reset_password=t.resetPassword),t.activate&&(n.activate=t.activate),t.new_email!==void 0&&(n.new_email=t.new_email),je.patch(`users/${t.username}`,n).then(a=>{a.data.status==="success"?(e.commit(Le.MUTATIONS.UPDATE_USER_IN_USERS,a.data.data.users[0]),(t.resetPassword||t.new_email)&&e.commit(Le.MUTATIONS.UPDATE_IS_SUCCESS,!0),(t.activate||t.new_email)&&e.commit(Le.MUTATIONS.UPDATE_USER,a.data.data.users[0])):me(e,null)}).catch(a=>me(e,a)).finally(()=>e.commit(Le.MUTATIONS.UPDATE_USERS_LOADING,!1))},[Le.ACTIONS.DELETE_USER_ACCOUNT](e,t){iA(e,{username:t.username,fromAdmin:!0})}},io=e=>{localStorage.removeItem("authToken"),e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ba.MUTATIONS.EMPTY_USER_STATS),e.commit(K.MUTATIONS.CLEAR_AUTH_USER_TOKEN),e.commit(Le.MUTATIONS.UPDATE_USERS,[]),e.commit(Ae.MUTATIONS.EMPTY_WORKOUTS),e.commit(Ae.MUTATIONS.EMPTY_WORKOUT),Rt.push("/login")},QNe={[K.ACTIONS.CHECK_AUTH_USER](e){window.localStorage.authToken&&!e.getters[K.GETTERS.IS_AUTHENTICATED]&&(e.commit(K.MUTATIONS.UPDATE_AUTH_TOKEN,window.localStorage.authToken),e.dispatch(K.ACTIONS.GET_USER_PROFILE,!0)),!window.localStorage.authToken&&e.getters[K.GETTERS.IS_AUTHENTICATED]&&io(e)},[K.ACTIONS.CONFIRM_ACCOUNT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Pa.post("auth/account/confirm",{token:t.token}).then(n=>{if(n.data.status==="success"){const a=n.data.auth_token;window.localStorage.setItem("authToken",a),e.commit(K.MUTATIONS.UPDATE_AUTH_TOKEN,a),e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>Rt.push("/"))}else me(e,null)}).catch(n=>{me(e,n)})},[K.ACTIONS.CONFIRM_EMAIL](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!1),Pa.post("/auth/email/update",{token:t.token}).then(n=>{n.data.status==="success"?(e.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!0),t.refreshUser&&e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>Rt.push("/profile/edit/account")),Rt.push("/profile/edit/account")):me(e,null)}).catch(n=>{me(e,n)})},[K.ACTIONS.GET_USER_PROFILE](e,t=!1){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("auth/profile").then(n=>{if(n.data.status==="success"){const a=e.getters[K.GETTERS.IS_PROFILE_NOT_LOADED];e.commit(K.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),n.data.data.accepted_privacy_policy||e.dispatch(H.ACTIONS.GET_APPLICATION_PRIVACY_POLICY),(a||t)&&(n.data.data.language&&e.dispatch(H.ACTIONS.UPDATE_APPLICATION_LANGUAGE,n.data.data.language),e.commit(H.MUTATIONS.UPDATE_DARK_MODE,n.data.data.use_dark_mode)),e.dispatch(Mt.ACTIONS.GET_SPORTS)}else me(e,null),io(e)}).catch(n=>{n.message!=="canceled"&&(me(e,n),io(e))})},[K.ACTIONS.LOGIN_OR_REGISTER](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS,!1),Pa.post(`/auth/${t.actionType}`,t.formData).then(n=>{if(n.data.status==="success")if(t.actionType==="login"){const a=n.data.auth_token;window.localStorage.setItem("authToken",a),e.commit(K.MUTATIONS.UPDATE_AUTH_TOKEN,a),e.dispatch(K.ACTIONS.GET_USER_PROFILE,!0).then(()=>Rt.push(typeof t.redirectUrl=="string"?t.redirectUrl:"/"))}else Rt.push("/login").then(()=>e.commit(K.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS,!0));else me(e,null)}).catch(n=>me(e,n))},[K.ACTIONS.LOGOUT](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.post("auth/logout").then(t=>{t.data.status==="success"?io(e):me(e,null)}).catch(t=>me(e,t))},[K.ACTIONS.UPDATE_USER_PROFILE](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.post("auth/profile/edit",t).then(n=>{n.data.status==="success"?(e.commit(K.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),Rt.push("/profile")):me(e,null)}).catch(n=>me(e,n)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.UPDATE_USER_ACCOUNT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),e.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!1),je.patch("auth/profile/edit/account",t).then(n=>{n.data.status==="success"?(e.commit(K.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),e.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!0)):me(e,null)}).catch(n=>me(e,n)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.UPDATE_USER_PREFERENCES](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.post("auth/profile/edit/preferences",t).then(n=>{n.data.status==="success"?(e.commit(K.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),e.commit(H.MUTATIONS.UPDATE_DARK_MODE,n.data.data.use_dark_mode),e.dispatch(H.ACTIONS.UPDATE_APPLICATION_LANGUAGE,n.data.data.language).then(()=>Rt.push("/profile/preferences"))):me(e,null)}).catch(n=>me(e,n)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.RESET_USER_SPORT_PREFERENCES](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.delete(`auth/profile/reset/sports/${t}`).then(n=>{n.status===204?e.dispatch(Mt.ACTIONS.GET_SPORTS):me(e,null)}).catch(n=>{me(e,n),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1)})},[K.ACTIONS.UPDATE_USER_SPORT_PREFERENCES](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.post("auth/profile/edit/sports",t).then(n=>{n.data.status==="success"?e.dispatch(Mt.ACTIONS.GET_SPORTS):me(e,null)}).catch(n=>{me(e,n),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1)})},[K.ACTIONS.UPDATE_USER_PICTURE](e,t){if(e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),!t.picture)throw new Error("No file part");const n=new FormData;n.append("file",t.picture),je.post("auth/picture",n,{headers:{"content-type":"multipart/form-data"}}).then(a=>{a.data.status==="success"?e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>Rt.push("/profile")):me(e,null)}).catch(a=>me(e,a)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.DELETE_ACCOUNT](e,t){iA(e,t)},[K.ACTIONS.DELETE_PICTURE](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.delete("auth/picture").then(t=>{t.status===204?e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>Rt.push("/profile")):me(e,null)}).catch(t=>me(e,t)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.SEND_PASSWORD_RESET_REQUEST](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Pa.post("auth/password/reset-request",t).then(n=>{n.data.status==="success"?Rt.push("/password-reset/sent"):me(e,null)}).catch(n=>me(e,n))},[K.ACTIONS.RESEND_ACCOUNT_CONFIRMATION_EMAIL](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Pa.post("auth/account/resend-confirmation",t).then(n=>{n.data.status==="success"?Rt.push("/account-confirmation/email-sent"):me(e,null)}).catch(n=>me(e,n))},[K.ACTIONS.RESET_USER_PASSWORD](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Pa.post("auth/password/update",t).then(n=>{n.data.status==="success"?Rt.push("/password-reset/password-updated"):me(e,null)}).catch(n=>me(e,n))},[K.ACTIONS.ACCEPT_PRIVACY_POLICY](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.post("auth/account/privacy-policy",{accepted_policy:t}).then(n=>{n.data.status==="success"?e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>Rt.push("/profile")):me(e,null)}).catch(n=>me(e,n))},[K.ACTIONS.REQUEST_DATA_EXPORT](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.post("auth/account/export/request").then(t=>{t.data.status==="success"?e.commit(K.MUTATIONS.SET_EXPORT_REQUEST,t.data.request):me(e,null)}).catch(t=>me(e,t))},[K.ACTIONS.GET_REQUEST_DATA_EXPORT](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("auth/account/export").then(t=>{t.data.status==="success"?e.commit(K.MUTATIONS.SET_EXPORT_REQUEST,t.data.request):me(e,null)}).catch(t=>me(e,t))}},JNe={[K.GETTERS.AUTH_TOKEN]:e=>e.authToken,[K.GETTERS.AUTH_USER_PROFILE]:e=>e.authUserProfile,[K.GETTERS.EXPORT_REQUEST]:e=>e.exportRequest,[K.GETTERS.IS_AUTHENTICATED]:e=>e.authToken!==null,[K.GETTERS.IS_ADMIN]:e=>e.authUserProfile&&e.authUserProfile.admin,[K.GETTERS.IS_REGISTRATION_SUCCESS]:e=>e.isRegistrationSuccess,[K.GETTERS.IS_SUCCESS]:e=>e.isSuccess,[K.GETTERS.USER_LOADING]:e=>e.loading,[K.GETTERS.IS_PROFILE_NOT_LOADED]:e=>e.authUserProfile.username===void 0},eve={[K.MUTATIONS.CLEAR_AUTH_USER_TOKEN](e){e.authToken=null,e.authUserProfile={}},[K.MUTATIONS.UPDATE_AUTH_TOKEN](e,t){e.authToken=t},[K.MUTATIONS.UPDATE_AUTH_USER_PROFILE](e,t){e.authUserProfile=t},[K.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS](e,t){e.isRegistrationSuccess=t},[K.MUTATIONS.UPDATE_IS_SUCCESS](e,t){e.isSuccess=t},[K.MUTATIONS.UPDATE_USER_LOADING](e,t){e.loading=t},[K.MUTATIONS.SET_EXPORT_REQUEST](e,t){e.exportRequest=t}},tve={authToken:null,authUserProfile:{},isSuccess:!1,isRegistrationSuccess:!1,loading:!1,exportRequest:null},nve={state:tve,actions:QNe,getters:JNe,mutations:eve},zm=(e,t)=>{e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get(t).then(n=>{n.data.status==="success"?e.commit(Ye.MUTATIONS.SET_CLIENT,n.data.data.client):me(e,null)}).catch(n=>me(e,n))},ave={[Ye.ACTIONS.AUTHORIZE_CLIENT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES);const n=new FormData;n.set("client_id",t.client_id),n.set("response_type",t.response_type),n.set("scope",t.scope),n.set("confirm","true"),t.state&&n.set("state",t.state),t.code_challenge&&n.set("code_challenge",t.code_challenge),t.code_challenge_method&&n.set("code_challenge_method",t.code_challenge_method),je.post("oauth/authorize",n,{headers:{"Content-Type":"multipart/form-data"}}).then(a=>{a.status==200&&a.data.redirect_url?window.location.href=a.data.redirect_url:me(e,null)}).catch(a=>me(e,a))},[Ye.ACTIONS.CREATE_CLIENT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.post("oauth/apps",t).then(n=>{n.data.status==="created"?(e.commit(Ye.MUTATIONS.SET_CLIENT,n.data.data.client),Rt.push(`/profile/apps/${n.data.data.client.id}/created`)):me(e,null)}).catch(n=>me(e,n))},[Ye.ACTIONS.DELETE_CLIENT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.delete(`oauth/apps/${t}`).then(n=>{n.status===204?e.dispatch(Ye.ACTIONS.GET_CLIENTS).then(()=>Rt.push("/profile/apps")):me(e,null)}).catch(n=>me(e,n))},[Ye.ACTIONS.GET_CLIENT_BY_CLIENT_ID](e,t){zm(e,`oauth/apps/${t}`)},[Ye.ACTIONS.GET_CLIENT_BY_ID](e,t){zm(e,`oauth/apps/${t}/by_id`)},[Ye.ACTIONS.GET_CLIENTS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("oauth/apps",{params:t}).then(n=>{n.data.status==="success"?(e.commit(Ye.MUTATIONS.SET_CLIENTS,n.data.data.clients),e.commit(Ye.MUTATIONS.SET_CLIENTS_PAGINATION,n.data.pagination)):me(e,null)}).catch(n=>me(e,n))},[Ye.ACTIONS.REVOKE_ALL_TOKENS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ye.MUTATIONS.SET_REVOCATION_SUCCESSFUL,!1),je.post(`oauth/apps/${t}/revoke`).then(n=>{n.data.status==="success"?e.commit(Ye.MUTATIONS.SET_REVOCATION_SUCCESSFUL,!0):me(e,null)}).catch(n=>me(e,n))}},rve={[Ye.GETTERS.CLIENT]:e=>e.client,[Ye.GETTERS.CLIENTS]:e=>e.clients,[Ye.GETTERS.CLIENTS_PAGINATION]:e=>e.pagination,[Ye.GETTERS.REVOCATION_SUCCESSFUL]:e=>e.revocationSuccessful},sve={[Ye.MUTATIONS.SET_CLIENT](e,t){e.client=t},[Ye.MUTATIONS.EMPTY_CLIENT](e){e.client={}},[Ye.MUTATIONS.SET_CLIENTS](e,t){e.clients=t},[Ye.MUTATIONS.SET_CLIENTS_PAGINATION](e,t){e.pagination=t},[Ye.MUTATIONS.SET_REVOCATION_SUCCESSFUL](e,t){e.revocationSuccessful=t}},ive={client:{},clients:[],pagination:{},revocationSuccessful:!1},ove={state:ive,actions:ave,getters:rve,mutations:sve},{locale:uve}=_r.global,lve={[H.ACTIONS.GET_APPLICATION_CONFIG](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(H.MUTATIONS.UPDATE_APPLICATION_LOADING,!0),je.get("config").then(t=>{t.data.status==="success"?e.commit(H.MUTATIONS.UPDATE_APPLICATION_CONFIG,t.data.data):me(e,null)}).catch(t=>me(e,t)).finally(()=>e.commit(H.MUTATIONS.UPDATE_APPLICATION_LOADING,!1))},[H.ACTIONS.GET_APPLICATION_STATS](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("stats/all").then(t=>{t.data.status==="success"?e.commit(H.MUTATIONS.UPDATE_APPLICATION_STATS,t.data.data):me(e,null)}).catch(t=>me(e,t))},[H.ACTIONS.GET_APPLICATION_PRIVACY_POLICY](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("config").then(t=>{t.data.status==="success"?e.commit(H.MUTATIONS.UPDATE_APPLICATION_PRIVACY_POLICY,t.data.data):me(e,null)}).catch(t=>me(e,t))},[H.ACTIONS.UPDATE_APPLICATION_CONFIG](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.patch("config",t).then(n=>{n.data.status==="success"?(e.commit(H.MUTATIONS.UPDATE_APPLICATION_CONFIG,n.data.data),Rt.push("/admin/application")):me(e,null)}).catch(n=>me(e,n))},[H.ACTIONS.UPDATE_APPLICATION_LANGUAGE](e,t){var n;(n=document.querySelector("html"))==null||n.setAttribute("lang",t),e.commit(H.MUTATIONS.UPDATE_LANG,t),uve.value=t}},cve={[H.GETTERS.APP_CONFIG]:e=>e.application.config,[H.GETTERS.APP_LOADING]:e=>e.appLoading,[H.GETTERS.APP_STATS]:e=>e.application.statistics,[H.GETTERS.DARK_MODE]:e=>e.darkMode,[H.GETTERS.ERROR_MESSAGES]:e=>e.errorMessages,[H.GETTERS.LANGUAGE]:e=>e.language,[H.GETTERS.LOCALE]:e=>e.locale},dve={[H.MUTATIONS.EMPTY_ERROR_MESSAGES](e){e.errorMessages=null},[H.MUTATIONS.SET_ERROR_MESSAGES](e,t){e.errorMessages=t},[H.MUTATIONS.UPDATE_APPLICATION_CONFIG](e,t){e.application.config=t},[H.MUTATIONS.UPDATE_APPLICATION_LOADING](e,t){e.appLoading=t},[H.MUTATIONS.UPDATE_APPLICATION_PRIVACY_POLICY](e,t){e.application.config.privacy_policy=t.privacy_policy,e.application.config.privacy_policy_date=t.privacy_policy_date},[H.MUTATIONS.UPDATE_APPLICATION_STATS](e,t){e.application.statistics=t},[H.MUTATIONS.UPDATE_LANG](e,t){e.language=t,e.locale=Ni[t]},[H.MUTATIONS.UPDATE_DARK_MODE](e,t){e.darkMode=t}},fve={root:!0,language:"en",locale:nl,errorMessages:null,application:{statistics:{sports:0,uploads_dir_size:0,users:0,workouts:0}},appLoading:!1,darkMode:null},Eve={[Mt.ACTIONS.GET_SPORTS](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("sports").then(t=>{t.data.status==="success"?(e.commit(Mt.MUTATIONS.SET_SPORTS,t.data.data.sports),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1)):me(e,null)}).catch(t=>me(e,t))},[Mt.ACTIONS.UPDATE_SPORTS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.patch(`sports/${t.id}`,{is_active:t.isActive}).then(n=>{n.data.status==="success"?e.dispatch(Mt.ACTIONS.GET_SPORTS):me(e,null)}).catch(n=>me(e,n))}},pve={[Mt.GETTERS.SPORTS]:e=>e.sports},mve={[Mt.MUTATIONS.SET_SPORTS](e,t){e.sports=t}},hve={sports:[]},_ve={state:hve,actions:Eve,getters:pve,mutations:mve},Tve={[Ba.ACTIONS.GET_USER_STATS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get(`stats/${t.username}/${t.filterType}`,{params:t.params}).then(n=>{n.data.status==="success"?e.commit(Ba.MUTATIONS.UPDATE_USER_STATS,n.data.data.statistics):me(e,null)}).catch(n=>me(e,n))}},gve={[Ba.GETTERS.USER_STATS]:e=>e.statistics},Ave={[Ba.MUTATIONS.UPDATE_USER_STATS](e,t){e.statistics=t},[Ba.MUTATIONS.EMPTY_USER_STATS](e){e.statistics={}}},Sve={statistics:{}},Ove={state:Sve,actions:Tve,getters:gve,mutations:Ave},Ive={[Le.GETTERS.USER]:e=>e.user,[Le.GETTERS.USERS]:e=>e.users,[Le.GETTERS.USERS_IS_SUCCESS]:e=>e.isSuccess,[Le.GETTERS.USERS_LOADING]:e=>e.loading,[Le.GETTERS.USERS_PAGINATION]:e=>e.pagination},Rve={[Le.MUTATIONS.UPDATE_USER](e,t){e.user=t},[Le.MUTATIONS.UPDATE_USER_IN_USERS](e,t){e.users=e.users.map(n=>n.username===t.username?t:n)},[Le.MUTATIONS.UPDATE_USERS](e,t){e.users=t},[Le.MUTATIONS.UPDATE_USERS_LOADING](e,t){e.loading=t},[Le.MUTATIONS.UPDATE_USERS_PAGINATION](e,t){e.pagination=t},[Le.MUTATIONS.UPDATE_IS_SUCCESS](e,t){e.isSuccess=t}},bve={user:{},users:[],loading:!1,isSuccess:!1,pagination:{}},Nve={state:bve,actions:ZNe,getters:Ive,mutations:Rve},oo=(e,t,n)=>{e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("workouts",{params:t}).then(a=>{a.data.status==="success"?(e.commit(Ae.MUTATIONS[n],a.data.data.workouts),n===sr.SET_USER_WORKOUTS&&e.commit(Ae.MUTATIONS.SET_WORKOUTS_PAGINATION,a.data.pagination)):me(e,null)}).catch(a=>me(e,a))},vve={[Ae.ACTIONS.GET_CALENDAR_WORKOUTS](e,t){e.commit(Ae.MUTATIONS.EMPTY_CALENDAR_WORKOUTS),oo(e,t,sr.SET_CALENDAR_WORKOUTS)},[Ae.ACTIONS.GET_USER_WORKOUTS](e,t){oo(e,t,sr.SET_USER_WORKOUTS)},[Ae.ACTIONS.GET_TIMELINE_WORKOUTS](e,t){oo(e,t,sr.SET_TIMELINE_WORKOUTS)},[Ae.ACTIONS.GET_MORE_TIMELINE_WORKOUTS](e,t){oo(e,t,sr.ADD_TIMELINE_WORKOUTS)},[Ae.ACTIONS.GET_WORKOUT_DATA](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0);const n=t.segmentId?`/segment/${t.segmentId}`:"";je.get(`workouts/${t.workoutId}`).then(a=>{const r=a.data.data.workouts[0];if(a.data.status==="success"){if(t.segmentId&&(r.segments.length===0||!r.segments[+t.segmentId-1]))throw new Error("WORKOUT_NOT_FOUND");e.commit(Ae.MUTATIONS.SET_WORKOUT,a.data.data.workouts[0]),a.data.data.workouts[0].with_gpx&&(je.get(`workouts/${t.workoutId}/chart_data${n}`).then(s=>{s.data.status==="success"&&e.commit(Ae.MUTATIONS.SET_WORKOUT_CHART_DATA,s.data.data.chart_data)}),je.get(`workouts/${t.workoutId}/gpx${n}`).then(s=>{s.data.status==="success"&&e.commit(Ae.MUTATIONS.SET_WORKOUT_GPX,s.data.data.gpx)}))}else e.commit(Ae.MUTATIONS.EMPTY_WORKOUT),me(e,null)}).catch(a=>{e.commit(Ae.MUTATIONS.EMPTY_WORKOUT),me(e,a)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Ae.ACTIONS.DELETE_WORKOUT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0),je.delete(`workouts/${t.workoutId}`).then(()=>{e.commit(Ae.MUTATIONS.EMPTY_WORKOUT),e.dispatch(K.ACTIONS.GET_USER_PROFILE),Rt.push("/")}).catch(n=>{me(e,n)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Ae.ACTIONS.EDIT_WORKOUT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0),je.patch(`workouts/${t.workoutId}`,t.data).then(()=>{e.dispatch(K.ACTIONS.GET_USER_PROFILE),e.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,{workoutId:t.workoutId}).then(()=>{Rt.push({name:"Workout",params:{workoutId:t.workoutId}})})}).catch(n=>{me(e,n)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Ae.ACTIONS.ADD_WORKOUT](e,t){if(e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0),!t.file)throw new Error("No file part");const n=t.notes.replace(/"/g,'\\"'),a=new FormData;a.append("file",t.file),a.append("data",`{"sport_id": ${t.sport_id}, "notes": "${n}"}`),je.post("workouts",a,{headers:{"content-type":"multipart/form-data"}}).then(r=>{if(r.data.status==="created"){e.dispatch(K.ACTIONS.GET_USER_PROFILE);const s=r.data.data.workouts[0];Rt.push(r.data.data.workouts.length===1?`/workouts/${s.id}`:"/")}}).catch(r=>{me(e,r)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Ae.ACTIONS.ADD_WORKOUT_WITHOUT_GPX](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0),je.post("workouts/no_gpx",t).then(n=>{if(n.data.status==="created"){e.dispatch(K.ACTIONS.GET_USER_PROFILE);const a=n.data.data.workouts[0];Rt.push(`/workouts/${a.id}`)}}).catch(n=>{me(e,n)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))}},Cve={[Ae.GETTERS.CALENDAR_WORKOUTS]:e=>e.calendar_workouts,[Ae.GETTERS.TIMELINE_WORKOUTS]:e=>e.timeline_workouts,[Ae.GETTERS.USER_WORKOUTS]:e=>e.user_workouts,[Ae.GETTERS.WORKOUT_DATA]:e=>e.workoutData,[Ae.GETTERS.WORKOUTS_PAGINATION]:e=>e.pagination},yve={[Ae.MUTATIONS.ADD_TIMELINE_WORKOUTS](e,t){e.timeline_workouts=e.timeline_workouts.concat(t)},[Ae.MUTATIONS.SET_CALENDAR_WORKOUTS](e,t){e.calendar_workouts=t},[Ae.MUTATIONS.SET_TIMELINE_WORKOUTS](e,t){e.timeline_workouts=t},[Ae.MUTATIONS.SET_USER_WORKOUTS](e,t){e.user_workouts=t},[Ae.MUTATIONS.SET_WORKOUTS_PAGINATION](e,t){e.pagination=t},[Ae.MUTATIONS.SET_WORKOUT](e,t){e.workoutData.workout=t},[Ae.MUTATIONS.SET_WORKOUT_CHART_DATA](e,t){e.workoutData.chartData=t},[Ae.MUTATIONS.SET_WORKOUT_GPX](e,t){e.workoutData.gpx=t},[Ae.MUTATIONS.SET_WORKOUT_LOADING](e,t){e.workoutData.loading=t},[Ae.MUTATIONS.EMPTY_CALENDAR_WORKOUTS](e){e.calendar_workouts=[]},[Ae.MUTATIONS.EMPTY_WORKOUTS](e){e.calendar_workouts=[],e.user_workouts=[],e.timeline_workouts=[]},[Ae.MUTATIONS.EMPTY_WORKOUT](e){e.workoutData={gpx:"",loading:!1,workout:{},chartData:[]}}},Dve={calendar_workouts:[],timeline_workouts:[],pagination:{},user_workouts:[],workoutData:{gpx:"",loading:!1,workout:{},chartData:[]}},Pve={state:Dve,actions:vve,getters:Cve,mutations:yve},Lve={authUserModule:nve,oAuthModule:ove,sportsModule:_ve,statsModule:Ove,usersModule:Nve,workoutsModule:Pve},wve={state:fve,actions:lve,getters:cve,mutations:dve,modules:Lve},Bs=vv(wve),uE=yt.create({baseURL:Si()});uE.interceptors.request.use(e=>{const t=new AbortController;e.signal=t.signal;const n=is(e);Gs.set(n,t);const a=Bs.getters[K.GETTERS.AUTH_TOKEN];if(a){const r=`Bearer ${a}`;e.headers&&e.headers.Authorization!==r&&(e.headers.Authorization=`Bearer ${a}`)}return e},e=>Promise.reject(e));uE.interceptors.response.use(e=>(is(e.config),e),e=>(e.message!=="canceled"&&e.response&&is(e.response.config),Promise.reject(e)));const je=uE,wd=(e,t)=>e.push.apply(e,t),os=e=>e.sort((t,n)=>t.i-n.i||t.j-n.j),Wm=e=>{const t={};let n=1;return e.forEach(a=>{t[a]=n,n+=1}),t};var kve={4:[[1,2],[2,3]],5:[[1,3],[2,3],[2,4]],6:[[1,2],[2,4],[4,5]],7:[[1,3],[2,3],[4,5],[4,6]],8:[[2,4],[4,6]]};const Gm=2050,Bm=1e3,$ve=kve,Uve=10,Mve=1e4,oA=10,uA=50,lA=20,cA=/^[A-Z\xbf-\xdf][^A-Z\xbf-\xdf]+$/,xve=/^[^A-Z\xbf-\xdf]+[A-Z\xbf-\xdf]$/,Fve=/^[A-Z\xbf-\xdf]+$/,dA=/^[^a-z\xdf-\xff]+$/,zve=/^[a-z\xdf-\xff]+$/,Wve=/^[^A-Z\xbf-\xdf]+$/,Gve=/[a-z\xdf-\xff]/,Bve=/[A-Z\xbf-\xdf]/,Hve=/[^A-Za-z\xbf-\xdf]/gi,Vve=/^\d+$/,lE=new Date().getFullYear(),jve={recentYear:/19\d\d|200\d|201\d|202\d/g},fA=[" ",",",";",":","|","/","\\","_",".","-"],Kve=fA.length;class Yve{match({password:t}){const n=[...this.getMatchesWithoutSeparator(t),...this.getMatchesWithSeparator(t)],a=this.filterNoise(n);return os(a)}getMatchesWithSeparator(t){const n=[],a=/^(\d{1,4})([\s/\\_.-])(\d{1,2})\2(\d{1,4})$/;for(let r=0;r<=Math.abs(t.length-6);r+=1)for(let s=r+5;s<=r+9&&!(s>=t.length);s+=1){const i=t.slice(r,+s+1||9e9),o=a.exec(i);if(o!=null){const u=this.mapIntegersToDayMonthYear([parseInt(o[1],10),parseInt(o[3],10),parseInt(o[4],10)]);u!=null&&n.push({pattern:"date",token:i,i:r,j:s,separator:o[2],year:u.year,month:u.month,day:u.day})}}return n}getMatchesWithoutSeparator(t){const n=[],a=/^\d{4,8}$/,r=s=>Math.abs(s.year-lE);for(let s=0;s<=Math.abs(t.length-4);s+=1)for(let i=s+3;i<=s+7&&!(i>=t.length);i+=1){const o=t.slice(s,+i+1||9e9);if(a.exec(o)){const u=[],c=o.length;if($ve[c].forEach(([f,d])=>{const p=this.mapIntegersToDayMonthYear([parseInt(o.slice(0,f),10),parseInt(o.slice(f,d),10),parseInt(o.slice(d),10)]);p!=null&&u.push(p)}),u.length>0){let f=u[0],d=r(u[0]);u.slice(1).forEach(p=>{const m=r(p);m{let a=!1;const r=t.length;for(let s=0;s=n.j){a=!0;break}}return!a})}mapIntegersToDayMonthYear(t){if(t[1]>31||t[1]<=0)return null;let n=0,a=0,r=0;for(let s=0,i=t.length;s99&&oGm)return null;o>31&&(a+=1),o>12&&(n+=1),o<=0&&(r+=1)}return a>=2||n===3||r>=2?null:this.getDayMonth(t)}getDayMonth(t){const n=[[t[2],t.slice(0,2)],[t[0],t.slice(1,3)]],a=n.length;for(let r=0;r=1&&s<=31&&i>=1&&i<=12)return{day:s,month:i}}return null}twoToFourDigitYear(t){return t>99?t:t>50?t+1900:t+2e3}}const oa=new Uint32Array(65536),qve=(e,t)=>{const n=e.length,a=t.length,r=1<{const n=t.length,a=e.length,r=[],s=[],i=Math.ceil(n/32),o=Math.ceil(a/32);for(let m=0;m>>N&1,C=r[N/32|0]>>>N&1,P=S|m,M=((S|C)&I)+I^I|S|C;let L=m|~(M|I),W=I&M;L>>>31^O&&(s[N/32|0]^=1<>>31^C&&(r[N/32|0]^=1<>>m&1,R=r[m/32|0]>>>m&1,N=I|c,S=((I|R)&l)+l^l|I|R;let O=c|~(S|l),C=l&S;p+=O>>>a-1&1,p-=C>>>a-1&1,O>>>31^b&&(s[m/32|0]^=1<>>31^R&&(r[m/32|0]^=1<{if(e.length{const a=e.length<=t.length,r=e.length<=n;return a||r?Math.ceil(e.length/4):n},Jve=(e,t,n)=>{let a=0;const r=Object.keys(t).find(s=>{const i=Qve(e,s,n);if(Math.abs(e.length-s.length)>i)return!1;const o=Zve(e,s),u=o<=i;return u&&(a=o),u});return r?{levenshteinDistance:a,levenshteinDistanceEntry:r}:{}};var Hm={a:["4","@"],b:["8"],c:["(","{","[","<"],d:["6","|)"],e:["3"],f:["#"],g:["6","9","&"],h:["#","|-|"],i:["1","!","|"],k:["<","|<"],l:["!","1","|","7"],m:["^^","nn","2n","/\\\\/\\\\"],n:["//"],o:["0","()"],q:["9"],u:["|_|"],s:["$","5"],t:["+","7"],v:["<",">","/"],w:["^/","uu","vv","2u","2v","\\\\/\\\\/"],x:["%","><"],z:["2"]},lc={warnings:{straightRow:"straightRow",keyPattern:"keyPattern",simpleRepeat:"simpleRepeat",extendedRepeat:"extendedRepeat",sequences:"sequences",recentYears:"recentYears",dates:"dates",topTen:"topTen",topHundred:"topHundred",common:"common",similarToCommon:"similarToCommon",wordByItself:"wordByItself",namesByThemselves:"namesByThemselves",commonNames:"commonNames",userInputs:"userInputs",pwned:"pwned"},suggestions:{l33t:"l33t",reverseWords:"reverseWords",allUppercase:"allUppercase",capitalization:"capitalization",dates:"dates",recentYears:"recentYears",associatedYears:"associatedYears",sequences:"sequences",repeated:"repeated",longerKeyboardPattern:"longerKeyboardPattern",anotherWord:"anotherWord",useWords:"useWords",noNeed:"noNeed",pwned:"pwned"},timeEstimation:{ltSecond:"ltSecond",second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",day:"day",days:"days",month:"month",months:"months",year:"year",years:"years",centuries:"centuries"}};class fi{constructor(t=[]){this.parents=t,this.children=new Map}addSub(t,...n){const a=t.charAt(0);this.children.has(a)||this.children.set(a,new fi([...this.parents,a]));let r=this.children.get(a);for(let s=1;s(Object.entries(e).forEach(([n,a])=>{a.forEach(r=>{t.addSub(r,n)})}),t);class e2e{constructor(){this.matchers={},this.l33tTable=Hm,this.trieNodeRoot=Vm(Hm,new fi),this.dictionary={userInputs:[]},this.rankedDictionaries={},this.rankedDictionariesMaxWordSize={},this.translations=lc,this.graphs={},this.useLevenshteinDistance=!1,this.levenshteinThreshold=2,this.l33tMaxSubstitutions=100,this.maxLength=256,this.setRankedDictionaries()}setOptions(t={}){t.l33tTable&&(this.l33tTable=t.l33tTable,this.trieNodeRoot=Vm(t.l33tTable,new fi)),t.dictionary&&(this.dictionary=t.dictionary,this.setRankedDictionaries()),t.translations&&this.setTranslations(t.translations),t.graphs&&(this.graphs=t.graphs),t.useLevenshteinDistance!==void 0&&(this.useLevenshteinDistance=t.useLevenshteinDistance),t.levenshteinThreshold!==void 0&&(this.levenshteinThreshold=t.levenshteinThreshold),t.l33tMaxSubstitutions!==void 0&&(this.l33tMaxSubstitutions=t.l33tMaxSubstitutions),t.maxLength!==void 0&&(this.maxLength=t.maxLength)}setTranslations(t){if(this.checkCustomTranslations(t))this.translations=t;else throw new Error("Invalid translations object fallback to keys")}checkCustomTranslations(t){let n=!0;return Object.keys(lc).forEach(a=>{if(a in t){const r=a;Object.keys(lc[r]).forEach(s=>{s in t[r]||(n=!1)})}else n=!1}),n}setRankedDictionaries(){const t={},n={};Object.keys(this.dictionary).forEach(a=>{t[a]=Wm(this.dictionary[a]),n[a]=this.getRankedDictionariesMaxWordSize(this.dictionary[a])}),this.rankedDictionaries=t,this.rankedDictionariesMaxWordSize=n}getRankedDictionariesMaxWordSize(t){const n=t.map(a=>typeof a!="string"?a.toString().length:a.length);return n.length===0?0:n.reduce((a,r)=>Math.max(a,r),-1/0)}buildSanitizedRankedDictionary(t){const n=[];return t.forEach(a=>{const r=typeof a;(r==="string"||r==="number"||r==="boolean")&&n.push(a.toString().toLowerCase())}),Wm(n)}extendUserInputsDictionary(t){this.dictionary.userInputs||(this.dictionary.userInputs=[]);const n=[...this.dictionary.userInputs,...t];this.rankedDictionaries.userInputs=this.buildSanitizedRankedDictionary(n),this.rankedDictionariesMaxWordSize.userInputs=this.getRankedDictionariesMaxWordSize(n)}addMatcher(t,n){this.matchers[t]?console.info(`Matcher ${t} already exists`):this.matchers[t]=n}}const Ne=new e2e;class t2e{constructor(t){this.defaultMatch=t}match({password:t}){const n=t.split("").reverse().join("");return this.defaultMatch({password:n}).map(a=>({...a,token:a.token.split("").reverse().join(""),reversed:!0,i:t.length-1-a.j,j:t.length-1-a.i}))}}class n2e{constructor({substr:t,limit:n,trieRoot:a}){this.buffer=[],this.finalPasswords=[],this.substr=t,this.limit=n,this.trieRoot=a}getAllPossibleSubsAtIndex(t){const n=[];let a=this.trieRoot;for(let r=t;r=this.limit)return;if(a===this.substr.length){t===n&&this.finalPasswords.push({password:this.buffer.join(""),changes:s});return}const u=[...this.getAllPossibleSubsAtIndex(a)];let c=!1;for(let l=a+u.length-1;l>=a;l-=1){const f=u[l-a];if(f.isTerminal()){if(i===f.parents.join("")&&o>=3)continue;c=!0;const d=f.subs;for(const p of d){this.buffer.push(p);const m=s.concat({i:r,letter:p,substitution:f.parents.join("")});if(this.helper({onlyFullSub:t,isFullSub:n,index:l+1,subIndex:r+p.length,changes:m,lastSubLetter:f.parents.join(""),consecutiveSubCount:i===f.parents.join("")?o+1:1}),this.buffer.pop(),this.finalPasswords.length>=this.limit)return}}}if(!t||!c){const l=this.substr.charAt(a);this.buffer.push(l),this.helper({onlyFullSub:t,isFullSub:n&&!c,index:a+1,subIndex:r+1,changes:s,lastSubLetter:i,consecutiveSubCount:o}),this.buffer.pop()}}getAll(){return this.helper({onlyFullSub:!0,isFullSub:!0,index:0,subIndex:0,changes:[],lastSubLetter:void 0,consecutiveSubCount:0}),this.helper({onlyFullSub:!1,isFullSub:!0,index:0,subIndex:0,changes:[],lastSubLetter:void 0,consecutiveSubCount:0}),this.finalPasswords}}const a2e=(e,t,n)=>new n2e({substr:e,limit:t,trieRoot:n}).getAll(),r2e=(e,t,n)=>{const r=e.changes.filter(c=>c.ic-l.letter.length+l.substitution.length,t),s=e.changes.filter(c=>c.i>=t&&c.i<=n),i=s.reduce((c,l)=>c-l.letter.length+l.substitution.length,n-t+r),o=[],u=[];return s.forEach(c=>{o.findIndex(f=>f.letter===c.letter&&f.substitution===c.substitution)<0&&(o.push({letter:c.letter,substitution:c.substitution}),u.push(`${c.substitution} -> ${c.letter}`))}),{i:r,j:i,subs:o,subDisplay:u.join(", ")}};class s2e{constructor(t){this.defaultMatch=t}isAlreadyIncluded(t,n){return t.some(a=>Object.entries(a).every(([r,s])=>r==="subs"||s===n[r]))}match({password:t}){const n=[],a=a2e(t,Ne.l33tMaxSubstitutions,Ne.trieNodeRoot);let r=!1,s=!0;return a.forEach(i=>{if(r)return;const o=this.defaultMatch({password:i.password,useLevenshtein:s});s=!1,o.forEach(u=>{r||(r=u.i===0&&u.j===t.length-1);const c=r2e(i,u.i,u.j),l=t.slice(c.i,+c.j+1||9e9),f={...u,l33t:!0,token:l,...c},d=this.isAlreadyIncluded(n,f);l.toLowerCase()!==u.matchedWord&&!d&&n.push(f)})}),n.filter(i=>i.token.length>1)}}class i2e{constructor(){this.l33t=new s2e(this.defaultMatch),this.reverse=new t2e(this.defaultMatch)}match({password:t}){const n=[...this.defaultMatch({password:t}),...this.reverse.match({password:t}),...this.l33t.match({password:t})];return os(n)}defaultMatch({password:t,useLevenshtein:n=!0}){const a=[],r=t.length,s=t.toLowerCase();return Object.keys(Ne.rankedDictionaries).forEach(i=>{const o=Ne.rankedDictionaries[i],u=Ne.rankedDictionariesMaxWordSize[i],c=Math.min(u,r);for(let l=0;l{const s=n[r];s.lastIndex=0;let i;for(;i=s.exec(t);)if(i){const o=i[0];a.push({pattern:"regex",token:o,i:i.index,j:i.index+i[0].length-1,regexName:r,regexMatch:i})}}),os(a)}}var Ar={nCk(e,t){let n=e;if(t>n)return 0;if(t===0)return 1;let a=1;for(let r=1;r<=t;r+=1)a*=n,a/=r,n-=1;return a},log10(e){return e===0?0:Math.log(e)/Math.log(10)},log2(e){return Math.log(e)/Math.log(2)},factorial(e){let t=1;for(let n=2;n<=e;n+=1)t*=n;return t}},u2e=({token:e})=>{let t=Uve**e.length;t===Number.POSITIVE_INFINITY&&(t=Number.MAX_VALUE);let n;return e.length===1?n=oA+1:n=uA+1,Math.max(t,n)},l2e=({year:e,separator:t})=>{let a=Math.max(Math.abs(e-lE),lA)*365;return t&&(a*=4),a};const c2e=e=>{const t=e.split(""),n=t.filter(i=>i.match(Bve)).length,a=t.filter(i=>i.match(Gve)).length;let r=0;const s=Math.min(n,a);for(let i=1;i<=s;i+=1)r+=Ar.nCk(n+a,i);return r};var d2e=e=>{const t=e.replace(Hve,"");if(t.match(Wve)||t.toLowerCase()===t)return 1;const n=[cA,xve,dA],a=n.length;for(let r=0;r{let n=0,a=e.indexOf(t);for(;a>=0;)n+=1,a=e.indexOf(t,a+t.length);return n},f2e=({sub:e,token:t})=>{const n=t.toLowerCase(),a=jm(n,e.substitution),r=jm(n,e.letter);return{subbedCount:a,unsubbedCount:r}};var E2e=({l33t:e,subs:t,token:n})=>{if(!e)return 1;let a=1;return t.forEach(r=>{const{subbedCount:s,unsubbedCount:i}=f2e({sub:r,token:n});if(s===0||i===0)a*=2;else{const o=Math.min(i,s);let u=0;for(let c=1;c<=o;c+=1)u+=Ar.nCk(i+s,c);a*=u}}),a},p2e=({rank:e,reversed:t,l33t:n,subs:a,token:r,dictionaryName:s})=>{const i=e,o=d2e(r),u=E2e({l33t:n,subs:a,token:r}),c=t&&2||1;let l;return s==="diceware"?l=6**5/2:l=i*o*u*c,{baseGuesses:i,uppercaseVariations:o,l33tVariations:u,calculation:l}},m2e=({regexName:e,regexMatch:t,token:n})=>{const a={alphaLower:26,alphaUpper:26,alpha:52,alphanumeric:62,digits:10,symbols:33};if(e in a)return a[e]**n.length;switch(e){case"recentYear":return Math.max(Math.abs(parseInt(t[0],10)-lE),lA)}return 0},h2e=({baseGuesses:e,repeatCount:t})=>e*t,_2e=({token:e,ascending:t})=>{const n=e.charAt(0);let a=0;return["a","A","z","Z","0","1","9"].includes(n)?a=4:n.match(/\d/)?a=10:a=26,t||(a*=2),a*e.length};const T2e=e=>{let t=0;return Object.keys(e).forEach(n=>{const a=e[n];t+=a.filter(r=>!!r).length}),t/=Object.entries(e).length,t},g2e=({token:e,graph:t,turns:n})=>{const a=Object.keys(Ne.graphs[t]).length,r=T2e(Ne.graphs[t]);let s=0;const i=e.length;for(let o=2;o<=i;o+=1){const u=Math.min(n,o-1);for(let c=1;c<=u;c+=1)s+=Ar.nCk(o-1,c-1)*a*r**c}return s};var A2e=({graph:e,token:t,shiftedCount:n,turns:a})=>{let r=g2e({token:t,graph:e,turns:a});if(n){const s=t.length-n;if(n===0||s===0)r*=2;else{let i=0;for(let o=1;o<=Math.min(n,s);o+=1)i+=Ar.nCk(n+s,o);r*=i}}return Math.round(r)},S2e=()=>Kve;const O2e=(e,t)=>{let n=1;return e.token.lengthKm[e]?Km[e](t):Ne.matchers[e]&&"scoring"in Ne.matchers[e]?Ne.matchers[e].scoring(t):0;var R2e=(e,t)=>{const n={};if("guesses"in e&&e.guesses!=null)return e;const a=O2e(e,t),r=I2e(e.pattern,e);let s=0;typeof r=="number"?s=r:e.pattern==="dictionary"&&(s=r.calculation,n.baseGuesses=r.baseGuesses,n.uppercaseVariations=r.uppercaseVariations,n.l33tVariations=r.l33tVariations);const i=Math.max(s,a);return{...e,...n,guesses:i,guessesLog10:Ar.log10(i)}};const pn={password:"",optimal:{},excludeAdditive:!1,separatorRegex:void 0,fillArray(e,t){const n=[];for(let a=0;a1&&(r*=this.optimal.pi[a.i-1][t-1]);let s=Ar.factorial(t)*r;this.excludeAdditive||(s+=Mve**(t-1));let i=!1;Object.keys(this.optimal.g[n]).forEach(o=>{const u=this.optimal.g[n][o];parseInt(o,10)<=t&&u<=s&&(i=!0)}),i||(this.optimal.g[n][t]=s,this.optimal.m[n][t]=a,this.optimal.pi[n][t]=r)},bruteforceUpdate(e){let t=this.makeBruteforceMatch(0,e);this.update(t,1);for(let n=1;n<=e;n+=1){t=this.makeBruteforceMatch(n,e);const a=this.optimal.m[n-1];Object.keys(a).forEach(r=>{a[r].pattern!=="bruteforce"&&this.update(t,parseInt(r,10)+1)})}},unwind(e){const t=[];let n=e-1,a=0,r=1/0;const s=this.optimal.g[n];for(s&&Object.keys(s).forEach(i=>{const o=s[i];o=0;){const i=this.optimal.m[n][a];t.unshift(i),n=i.i-1,a-=1}return t}};var kd={mostGuessableMatchSequence(e,t,n=!1){pn.password=e,pn.excludeAdditive=n;const a=e.length;let r=pn.fillArray(a,"array");t.forEach(u=>{r[u.j].push(u)}),r=r.map(u=>u.sort((c,l)=>c.i-l.i)),pn.optimal={m:pn.fillArray(a,"object"),pi:pn.fillArray(a,"object"),g:pn.fillArray(a,"object")};for(let u=0;u{c.i>0?Object.keys(pn.optimal.m[c.i-1]).forEach(l=>{pn.update(c,parseInt(l,10)+1)}):pn.update(c,1)}),pn.bruteforceUpdate(u);const s=pn.unwind(a),i=s.length,o=this.getGuesses(e,i);return{password:e,guesses:o,guessesLog10:Ar.log10(o),sequence:s}},getGuesses(e,t){const n=e.length;let a=0;return e.length===0?a=1:a=pn.optimal.g[n-1][t],a}};class b2e{match({password:t,omniMatch:n}){const a=[];let r=0;for(;ri instanceof Promise)?Promise.all(a):a}normalizeMatch(t,n,a,r){const s={pattern:"repeat",i:a.index,j:n,token:a[0],baseToken:t,baseGuesses:0,repeatCount:a[0].length/t.length};return r instanceof Promise?r.then(i=>({...s,baseGuesses:i})):{...s,baseGuesses:r}}getGreedyMatch(t,n){const a=/(.+)\1+/g;return a.lastIndex=n,a.exec(t)}getLazyMatch(t,n){const a=/(.+?)\1+/g;return a.lastIndex=n,a.exec(t)}setMatchToken(t,n){const a=/^(.+?)\1+$/;let r,s="";if(n&&t[0].length>n[0].length){r=t;const i=a.exec(r[0]);i&&(s=i[1])}else r=n,r&&(s=r[1]);return{match:r,baseToken:s}}getBaseGuesses(t,n){const a=n.match(t);return a instanceof Promise?a.then(s=>kd.mostGuessableMatchSequence(t,s).guesses):kd.mostGuessableMatchSequence(t,a).guesses}}class N2e{constructor(){this.MAX_DELTA=5}match({password:t}){const n=[];if(t.length===1)return[];let a=0,r=null;const s=t.length;for(let i=1;i1||Math.abs(a)===1){const i=Math.abs(a);if(i>0&&i<=this.MAX_DELTA){const o=r.slice(t,+n+1||9e9),{sequenceName:u,sequenceSpace:c}=this.getSequence(o);return s.push({pattern:"sequence",i:t,j:n,token:r.slice(t,+n+1||9e9),sequenceName:u,sequenceSpace:c,ascending:a>0})}}return null}getSequence(t){let n="unicode",a=26;return zve.test(t)?(n="lower",a=26):Fve.test(t)?(n="upper",a=26):Vve.test(t)&&(n="digits",a=10),{sequenceName:n,sequenceSpace:a}}}class v2e{constructor(){this.SHIFTED_RX=/[~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?]/}match({password:t}){const n=[];return Object.keys(Ne.graphs).forEach(a=>{const r=Ne.graphs[a];wd(n,this.helper(t,r,a))}),os(n)}checkIfShifted(t,n,a){return!t.includes("keypad")&&this.SHIFTED_RX.test(n.charAt(a))?1:0}helper(t,n,a){let r;const s=[];let i=0;const o=t.length;for(;i2&&s.push({pattern:"spatial",i,j:u-1,token:t.slice(i,u),graph:a,turns:l,shiftedCount:r}),i=u;break}}}return s}}const C2e=new RegExp(`[${fA.join("")}]`);class Uu{static getMostUsedSeparatorChar(t){const n=[...t.split("").filter(r=>C2e.test(r)).reduce((r,s)=>{const i=r.get(s);return i?r.set(s,i+1):r.set(s,1),r},new Map).entries()].sort(([r,s],[i,o])=>o-s);if(!n.length)return;const a=n[0];if(!(a[1]<2))return a[0]}static getSeparatorRegex(t){return new RegExp(`([^${t}
+])(${t})(?!${t})`,"g")}match({password:t}){const n=[];if(t.length===0)return n;const a=Uu.getMostUsedSeparatorChar(t);if(a===void 0)return n;const r=Uu.getSeparatorRegex(a);for(const s of t.matchAll(r)){if(s.index===void 0)continue;const i=s.index+1;n.push({pattern:"separator",token:a,i,j:i})}return n}}class y2e{constructor(){this.matchers={date:Yve,dictionary:i2e,regex:o2e,repeat:b2e,sequence:N2e,spatial:v2e,separator:Uu}}match(t){const n=[],a=[];return[...Object.keys(this.matchers),...Object.keys(Ne.matchers)].forEach(s=>{if(!this.matchers[s]&&!Ne.matchers[s])return;const i=this.matchers[s]?this.matchers[s]:Ne.matchers[s].Matching,u=new i().match({password:t,omniMatch:this});u instanceof Promise?(u.then(c=>{wd(n,c)}),a.push(u)):wd(n,u)}),a.length>0?new Promise((s,i)=>{Promise.all(a).then(()=>{s(os(n))}).catch(o=>{i(o)})}):os(n)}}const EA=1,pA=EA*60,mA=pA*60,hA=mA*24,_A=hA*31,TA=_A*12,D2e=TA*100,cc={second:EA,minute:pA,hour:mA,day:hA,month:_A,year:TA,century:D2e};class P2e{translate(t,n){let a=t;n!==void 0&&n!==1&&(a+="s");const{timeEstimation:r}=Ne.translations;return r[a].replace("{base}",`${n}`)}estimateAttackTimes(t){const n={onlineThrottling100PerHour:t/.027777777777777776,onlineNoThrottling10PerSecond:t/10,offlineSlowHashing1e4PerSecond:t/1e4,offlineFastHashing1e10PerSecond:t/1e10},a={onlineThrottling100PerHour:"",onlineNoThrottling10PerSecond:"",offlineSlowHashing1e4PerSecond:"",offlineFastHashing1e10PerSecond:""};return Object.keys(n).forEach(r=>{const s=n[r];a[r]=this.displayTime(s)}),{crackTimesSeconds:n,crackTimesDisplay:a,score:this.guessesToScore(t)}}guessesToScore(t){return t<1005?0:t<1000005?1:t<100000005?2:t<1e10+5?3:4}displayTime(t){let n="centuries",a;const r=Object.keys(cc),s=r.findIndex(i=>t-1&&(n=r[s-1],s!==0?a=Math.round(t/cc[n]):n="ltSecond"),this.translate(n,a)}}var L2e=()=>null,w2e=()=>({warning:Ne.translations.warnings.dates,suggestions:[Ne.translations.suggestions.dates]});const k2e=(e,t)=>{let n=null;return t&&!e.l33t&&!e.reversed?e.rank<=10?n=Ne.translations.warnings.topTen:e.rank<=100?n=Ne.translations.warnings.topHundred:n=Ne.translations.warnings.common:e.guessesLog10<=4&&(n=Ne.translations.warnings.similarToCommon),n},$2e=(e,t)=>{let n=null;return t&&(n=Ne.translations.warnings.wordByItself),n},U2e=(e,t)=>t?Ne.translations.warnings.namesByThemselves:Ne.translations.warnings.commonNames,M2e=(e,t)=>{let n=null;const a=e.dictionaryName,r=a==="lastnames"||a.toLowerCase().includes("firstnames");return a==="passwords"?n=k2e(e,t):a.includes("wikipedia")?n=$2e(e,t):r?n=U2e(e,t):a==="userInputs"&&(n=Ne.translations.warnings.userInputs),n};var x2e=(e,t)=>{const n=M2e(e,t),a=[],r=e.token;return r.match(cA)?a.push(Ne.translations.suggestions.capitalization):r.match(dA)&&r.toLowerCase()!==r&&a.push(Ne.translations.suggestions.allUppercase),e.reversed&&e.token.length>=4&&a.push(Ne.translations.suggestions.reverseWords),e.l33t&&a.push(Ne.translations.suggestions.l33t),{warning:n,suggestions:a}},F2e=e=>e.regexName==="recentYear"?{warning:Ne.translations.warnings.recentYears,suggestions:[Ne.translations.suggestions.recentYears,Ne.translations.suggestions.associatedYears]}:{warning:null,suggestions:[]},z2e=e=>{let t=Ne.translations.warnings.extendedRepeat;return e.baseToken.length===1&&(t=Ne.translations.warnings.simpleRepeat),{warning:t,suggestions:[Ne.translations.suggestions.repeated]}},W2e=()=>({warning:Ne.translations.warnings.sequences,suggestions:[Ne.translations.suggestions.sequences]}),G2e=e=>{let t=Ne.translations.warnings.keyPattern;return e.turns===1&&(t=Ne.translations.warnings.straightRow),{warning:t,suggestions:[Ne.translations.suggestions.longerKeyboardPattern]}},B2e=()=>null;const Ym={warning:null,suggestions:[]};class H2e{constructor(){this.matchers={bruteforce:L2e,date:w2e,dictionary:x2e,regex:F2e,repeat:z2e,sequence:W2e,spatial:G2e,separator:B2e},this.defaultFeedback={warning:null,suggestions:[]},this.setDefaultSuggestions()}setDefaultSuggestions(){this.defaultFeedback.suggestions.push(Ne.translations.suggestions.useWords,Ne.translations.suggestions.noNeed)}getFeedback(t,n){if(n.length===0)return this.defaultFeedback;if(t>2)return Ym;const a=Ne.translations.suggestions.anotherWord,r=this.getLongestMatch(n);let s=this.getMatchFeedback(r,n.length===1);return s!=null?s.suggestions.unshift(a):s={warning:null,suggestions:[a]},s}getLongestMatch(t){let n=t[0];return t.slice(1).forEach(r=>{r.token.length>n.token.length&&(n=r)}),n}getMatchFeedback(t,n){return this.matchers[t.pattern]?this.matchers[t.pattern](t,n):Ne.matchers[t.pattern]&&"feedback"in Ne.matchers[t.pattern]?Ne.matchers[t.pattern].feedback(t,n):Ym}}const gA=()=>new Date().getTime(),V2e=(e,t,n)=>{const a=new H2e,r=new P2e,s=kd.mostGuessableMatchSequence(t,e),i=gA()-n,o=r.estimateAttackTimes(s.guesses);return{calcTime:i,...s,...o,feedback:a.getFeedback(o.score,s.sequence)}},j2e=(e,t)=>(t&&Ne.extendUserInputsDictionary(t),new y2e().match(e)),K2e=(e,t)=>{const n=gA(),a=j2e(e,t);if(a instanceof Promise)throw new Error("You are using a Promised matcher, please use `zxcvbnAsync` for it.");return V2e(a,e,n)},Y2e="modulepreload",q2e=function(e){return"/"+e},qm={},Dt=function(t,n,a){let r=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link");r=Promise.all(n.map(i=>{if(i=q2e(i),i in qm)return;qm[i]=!0;const o=i.endsWith(".css"),u=o?'[rel="stylesheet"]':"";if(!!a)for(let f=s.length-1;f>=0;f--){const d=s[f];if(d.href===i&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${u}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":Y2e,o||(l.as="script",l.crossOrigin=""),l.href=i,document.head.appendChild(l),o)return new Promise((f,d)=>{l.addEventListener("load",f),l.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${i}`)))})}))}return r.then(()=>t()).catch(s=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=s,window.dispatchEvent(i),!i.defaultPrevented)throw s})},X2e=async e=>{switch(e){case"fr":return await Dt(()=>import("./password.fr-1uJe1-pR.js"),__vite__mapDeps([]));case"de":return await Dt(()=>import("./password.de-qoep7B_f.js"),__vite__mapDeps([]));case"it":return await Dt(()=>import("./password.it-ImDc22WR.js"),__vite__mapDeps([]));case"es":return await Dt(()=>import("./password.es-es--6AdGpRj.js"),__vite__mapDeps([]));case"pl":return await Dt(()=>import("./password.pl-Ipz4x2MM.js"),__vite__mapDeps([]));default:return await Dt(()=>import("./password.en-lIq_N4yZ.js"),__vite__mapDeps([]))}},Xm=async e=>{const t=await Dt(()=>import("./password.common-7m77ow97.js"),__vite__mapDeps([])),n=await X2e(e),a={graphs:t.adjacencyGraphs,dictionary:{...t.dictionary,...n.dictionary}};Ne.setOptions(a)},Z2e=e=>{switch(e){case 2:return"AVERAGE";case 3:return"GOOD";case 4:return"STRONG";default:return"WEAK"}},Q2e={class:"password-strength"},J2e=["value"],e3e={key:0,class:"password-strength-details"},t3e={class:"password-strength-value"},n3e={key:0,class:"info-box"},a3e={class:"password-feedback"},r3e=Z({__name:"PasswordStength",props:{password:{}},setup(e){const t=e,{password:n}=_e(t),a=Me(),r=k(()=>a.getters[H.GETTERS.LANGUAGE]),s=k(()=>a.getters[K.GETTERS.IS_SUCCESS]),i=ce(0),o=ce(""),u=ce([]),c=ce("0% 100%");Ct(async()=>await Xm(r.value));function l(f){const d=K2e(f);i.value=d.score,o.value=Z2e(i.value),u.value=d.feedback.suggestions,c.value=i.value*100/4+"% 100%"}return We(()=>r.value,async f=>{await Xm(f)}),We(()=>n.value,async f=>{s.value?o.value="":l(f)}),(f,d)=>(A(),v("div",Q2e,[E("input",{class:Se(["password-slider",`strength-${i.value}`]),style:Va({backgroundSize:c.value}),type:"range",value:i.value,min:"0",max:"4",step:"1",tabindex:-1},null,14,J2e),o.value?(A(),v("div",e3e,[E("span",t3e,T(f.$t("user.PASSWORD_STRENGTH.LABEL"))+": "+T(f.$t(`user.PASSWORD_STRENGTH.${o.value}`)),1),u.value.length>0?(A(),v("div",n3e,[E("ul",a3e,[(A(!0),v(be,null,Ge(u.value,p=>(A(),v("li",{key:p},T(f.$t(`user.PASSWORD_STRENGTH.SUGGESTIONS.${p}`)),1))),128))])])):x("",!0)])):x("",!0)]))}}),s3e=ae(r3e,[["__scopeId","data-v-1affb508"]]),i3e=e=>(ut("data-v-ac528612"),e=e(),lt(),e),o3e={class:"password-input"},u3e=["id","disabled","placeholder","required","type"],l3e={class:"show-password"},c3e={key:0,class:"form-info"},d3e=i3e(()=>E("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),f3e=Z({__name:"PasswordInput",props:{checkStrength:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},id:{default:"password"},password:{default:""},placeholder:{},required:{type:Boolean,default:!1}},emits:["updatePassword","passwordError"],setup(e,{emit:t}){const n=e,{checkStrength:a,disabled:r,id:s,password:i,placeholder:o,required:u}=_e(n),c=ce(!1),l=ce(""),f=t;function d(){c.value=!c.value}function p(I){f("updatePassword",I.target.value)}function m(){f("passwordError")}return We(()=>i.value,I=>{I===""&&(l.value="",c.value=!1)}),(I,b)=>(A(),v("div",o3e,[qe(E("input",{id:h(s),disabled:h(r),placeholder:h(o),required:h(u),type:c.value?"text":"password","onUpdate:modelValue":b[0]||(b[0]=R=>l.value=R),minlength:"8",onInput:p,onInvalid:m},null,40,u3e),[[CI,l.value]]),E("div",l3e,[E("button",{class:"transparent",onClick:Je(d,["prevent"]),type:"button"},[j(T(I.$t(`user.${c.value?"HIDE":"SHOW"}_PASSWORD`))+" ",1),E("i",{class:Se(["fa",`fa-eye${c.value?"-slash":""}`]),"aria-hidden":"true"},null,2)])]),h(a)?(A(),v("div",c3e,[d3e,j(" "+T(I.$t("user.PASSWORD_INFO")),1)])):x("",!0),h(a)?(A(),te(s3e,{key:1,password:l.value},null,8,["password"])):x("",!0)]))}}),$d=ae(f3e,[["__scopeId","data-v-ac528612"]]),cE=e=>(ut("data-v-8ebb5cd3"),e=e(),lt(),e),E3e={id:"user-infos-edition"},p3e={class:"profile-form form-box"},m3e={key:1,class:"info-box success-message"},h3e={class:"form-items",for:"email"},_3e=["disabled"],T3e={class:"form-items",for:"password-field"},g3e={class:"form-items",for:"new-password-field"},A3e={class:"form-buttons"},S3e={class:"confirm",type:"submit"},O3e={class:"data-export"},I3e={class:"info-box"},R3e=cE(()=>E("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),b3e={key:0,class:"data-export-archive"},N3e=cE(()=>E("i",{class:"fa fa-download","aria-hidden":"true"},null,-1)),v3e={key:1},C3e={key:2},y3e=cE(()=>E("i",{class:"fa fa-spinner fa-pulse","aria-hidden":"true"},null,-1)),D3e=Z({__name:"UserAccountEdition",props:{user:{}},setup(e){const t=e,{user:n}=_e(t),a=Me(),r=Gt({email:"",password:"",new_password:""}),s=k(()=>a.getters[K.GETTERS.USER_LOADING]),i=k(()=>a.getters[H.GETTERS.APP_CONFIG]),o=k(()=>a.getters[K.GETTERS.IS_SUCCESS]),u=ce(!1),c=k(()=>a.getters[H.GETTERS.ERROR_MESSAGES]),l=ce(!1),f=ce(!1),d=k(()=>a.getters[K.GETTERS.EXPORT_REQUEST]),p=k(()=>S()),m=ce(!1);_t(()=>{t.user&&(a.dispatch(K.ACTIONS.GET_REQUEST_DATA_EXPORT),b(t.user))});function I(){l.value=!0}function b(B){r.email=B.email}function R(B){r.password=B}function N(B){r.new_password=B}function S(){return d.value?$n(d.value.created_at,n.value.timezone,n.value.date_format,!0,null,!0):null}function O(){return p.value?X2(new Date(p.value),J2(new Date,1)):!0}function C(){const B={email:r.email,password:r.password};r.new_password&&(B.new_password=r.new_password),u.value=r.email!==n.value.email,a.dispatch(K.ACTIONS.UPDATE_USER_ACCOUNT,B)}function P(B){f.value=B}function M(B){a.dispatch(K.ACTIONS.DELETE_ACCOUNT,{username:B})}function L(){a.dispatch(K.ACTIONS.REQUEST_DATA_EXPORT)}async function W(B){m.value=!0,await je.get(`/auth/account/export/${B}`,{responseType:"blob"}).then(w=>{const X=window.URL.createObjectURL(new Blob([w.data],{type:"application/zip"})),J=document.createElement("a");J.href=X,J.setAttribute("download",B),document.body.appendChild(J),J.click()}).finally(()=>m.value=!1)}return Nt(()=>{a.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!1),a.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),We(()=>o.value,async B=>{B&&(R(""),N(""),b(n.value),l.value=!1)}),We(()=>n.value.email,async()=>{b(n.value)}),(B,w)=>{const X=oe("Modal"),J=oe("ErrorMessage");return A(),v("div",E3e,[f.value?(A(),te(X,{key:0,title:B.$t("common.CONFIRMATION"),message:B.$t("user.CONFIRM_ACCOUNT_DELETION"),onConfirmAction:w[0]||(w[0]=ne=>M(h(n).username)),onCancelAction:w[1]||(w[1]=ne=>P(!1)),onKeydown:w[2]||(w[2]=At(ne=>P(!1),["esc"]))},null,8,["title","message"])):x("",!0),E("div",p3e,[c.value?(A(),te(J,{key:0,message:c.value},null,8,["message"])):x("",!0),o.value?(A(),v("div",m3e,T(B.$t(`user.PROFILE.SUCCESSFUL_${u.value&&i.value.is_email_sending_enabled?"EMAIL_":""}UPDATE`)),1)):x("",!0),E("form",{class:Se({errors:l.value}),onSubmit:Je(C,["prevent"])},[E("label",h3e,[j(T(B.$t("user.EMAIL"))+"* ",1),qe(E("input",{id:"email","onUpdate:modelValue":w[3]||(w[3]=ne=>r.email=ne),disabled:s.value,required:!0,onInvalid:I},null,40,_3e),[[rt,r.email]])]),E("label",T3e,[j(T(B.$t("user.CURRENT_PASSWORD"))+"* ",1),$($d,{id:"password-field",disabled:s.value,password:r.password,required:!0,onUpdatePassword:R,onPasswordError:I},null,8,["disabled","password"])]),E("label",g3e,[j(T(B.$t("user.NEW_PASSWORD"))+" ",1),$($d,{id:"new-password-field",disabled:s.value,checkStrength:!0,password:r.new_password,isSuccess:!1,onUpdatePassword:N,onPasswordError:I},null,8,["disabled","password"])]),E("div",A3e,[E("button",S3e,T(B.$t("buttons.SUBMIT")),1),E("button",{class:"cancel",onClick:w[4]||(w[4]=Je(ne=>B.$router.push("/profile"),["prevent"]))},T(B.$t("buttons.CANCEL")),1),E("button",{class:"danger",onClick:w[5]||(w[5]=Je(ne=>P(!0),["prevent"]))},T(B.$t("buttons.DELETE_MY_ACCOUNT")),1),O()?(A(),v("button",{key:0,class:"confirm",onClick:Je(L,["prevent"])},T(B.$t("buttons.REQUEST_DATA_EXPORT")),1)):x("",!0)])],34),E("div",O3e,[E("span",I3e,[R3e,j(" "+T(B.$t("user.EXPORT_REQUEST.ONLY_ONE_EXPORT_PER_DAY")),1)]),d.value?(A(),v("div",b3e,[j(T(B.$t("user.EXPORT_REQUEST.DATA_EXPORT"))+" ("+T(p.value)+"): ",1),d.value.status==="successful"?(A(),v("span",{key:0,class:"archive-link",onClick:w[6]||(w[6]=Je(ne=>W(d.value.file_name),["prevent"]))},[N3e,j(" "+T(B.$t("user.EXPORT_REQUEST.DOWNLOAD_ARCHIVE"))+" ("+T(h(qo)(d.value.file_size))+") ",1)])):(A(),v("span",v3e,T(B.$t(`user.EXPORT_REQUEST.STATUS.${d.value.status}`)),1)),m.value?(A(),v("span",C3e,[j(T(B.$t("user.EXPORT_REQUEST.GENERATING_LINK"))+" ",1),y3e])):x("",!0)])):x("",!0)])])])}}}),P3e=ae(D3e,[["__scopeId","data-v-8ebb5cd3"]]),L3e={id:"user-infos-edition"},w3e={class:"profile-form form-box"},k3e={class:"form-items",for:"registrationDate"},$3e=["value"],U3e={class:"form-items",for:"first_name"},M3e=["disabled"],x3e={class:"form-items",for:"last_name"},F3e={class:"form-items",for:"birth_date"},z3e=["disabled"],W3e={class:"form-items",for:"location"},G3e=["disabled"],B3e={class:"form-items"},H3e={class:"form-buttons"},V3e={class:"confirm",type:"submit"},j3e=Z({__name:"UserInfosEdition",props:{user:{}},setup(e){const t=e,n=Me(),a=Gt({first_name:"",last_name:"",birth_date:"",location:"",bio:""}),r=k(()=>t.user.created_at?$n(t.user.created_at,t.user.timezone,t.user.date_format):""),s=k(()=>n.getters[K.GETTERS.USER_LOADING]),i=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]);_t(()=>{t.user&&o(t.user)});function o(l){a.first_name=l.first_name?l.first_name:"",a.last_name=l.last_name?l.last_name:"",a.birth_date=l.birth_date?dn(new Date(l.birth_date),"yyyy-MM-dd"):"",a.location=l.location?l.location:"",a.bio=l.bio?l.bio:""}function u(l){a.bio=l}function c(){n.dispatch(K.ACTIONS.UPDATE_USER_PROFILE,a)}return Nt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(l,f)=>{const d=oe("ErrorMessage"),p=oe("CustomTextArea");return A(),v("div",L3e,[E("div",w3e,[i.value?(A(),te(d,{key:0,message:i.value},null,8,["message"])):x("",!0),E("form",{onSubmit:Je(c,["prevent"])},[E("label",k3e,[j(T(l.$t("user.PROFILE.REGISTRATION_DATE"))+" ",1),E("input",{id:"registrationDate",value:r.value,disabled:""},null,8,$3e)]),E("label",U3e,[j(T(l.$t("user.PROFILE.FIRST_NAME"))+" ",1),qe(E("input",{id:"first_name","onUpdate:modelValue":f[0]||(f[0]=m=>a.first_name=m),disabled:s.value},null,8,M3e),[[rt,a.first_name]])]),E("label",x3e,[j(T(l.$t("user.PROFILE.LAST_NAME"))+" ",1),qe(E("input",{id:"last_name","onUpdate:modelValue":f[1]||(f[1]=m=>a.last_name=m)},null,512),[[rt,a.last_name]])]),E("label",F3e,[j(T(l.$t("user.PROFILE.BIRTH_DATE"))+" ",1),qe(E("input",{id:"birth_date",type:"date",class:"birth-date","onUpdate:modelValue":f[2]||(f[2]=m=>a.birth_date=m),disabled:s.value},null,8,z3e),[[rt,a.birth_date]])]),E("label",W3e,[j(T(l.$t("user.PROFILE.LOCATION"))+" ",1),qe(E("input",{id:"location","onUpdate:modelValue":f[3]||(f[3]=m=>a.location=m),disabled:s.value},null,8,G3e),[[rt,a.location]])]),E("label",B3e,[j(T(l.$t("user.PROFILE.BIO"))+" ",1),$(p,{name:"bio",charLimit:200,input:a.bio,disabled:s.value,onUpdateValue:u},null,8,["input","disabled"])]),E("div",H3e,[E("button",V3e,T(l.$t("buttons.SUBMIT")),1),E("button",{class:"cancel",onClick:f[4]||(f[4]=Je(m=>l.$router.push("/profile"),["prevent"]))},T(l.$t("buttons.CANCEL")),1)])],32)])])}}}),K3e=ae(j3e,[["__scopeId","data-v-5f5c8fca"]]),Y3e=e=>(ut("data-v-8f62d42f"),e=e(),lt(),e),q3e={id:"user-picture-edition"},X3e={class:"user-picture-form"},Z3e={class:"picture-help"},Q3e={class:"info-box"},J3e=Y3e(()=>E("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),eCe={class:"picture-buttons"},tCe=["disabled"],nCe=Z({__name:"UserPictureEdition",props:{user:{}},setup(e){const t=e,n=Me(),{user:a}=_e(t),r=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),s=k(()=>n.getters[H.GETTERS.APP_CONFIG]),i=s.value.max_single_file_size?qo(s.value.max_single_file_size):"",o=ce(null);function u(){n.dispatch(K.ACTIONS.DELETE_PICTURE)}function c(f){f.target.files!==null&&(o.value=f.target.files[0])}function l(){o.value&&n.dispatch(K.ACTIONS.UPDATE_USER_PICTURE,{picture:o.value})}return Nt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(f,d)=>{const p=oe("ErrorMessage");return A(),v("div",q3e,[E("div",X3e,[r.value?(A(),te(p,{key:0,message:r.value},null,8,["message"])):x("",!0),$(Oi,{user:h(a)},null,8,["user"]),E("form",{onSubmit:Je(l,["prevent"])},[E("input",{type:"file",name:"picture",accept:".png,.jpg,.gif",onInput:c},null,32),E("div",Z3e,[E("span",Q3e,[J3e,j(" "+T(f.$t("workouts.MAX_SIZE"))+": "+T(h(i)),1)])]),E("div",eCe,[E("button",{type:"submit",disabled:!o.value},T(f.$t("user.PROFILE.PICTURE_UPDATE")),9,tCe),h(a).picture?(A(),v("button",{key:0,class:"danger",onClick:u},T(f.$t("user.PROFILE.PICTURE_REMOVE")),1)):x("",!0),E("button",{class:"cancel",onClick:d[0]||(d[0]=m=>f.$router.push("/profile"))},T(f.$t("user.PROFILE.BACK_TO_PROFILE")),1)])],32)])])}}}),aCe=ae(nCe,[["__scopeId","data-v-8f62d42f"]]),Zm=["Africa/Abidjan","Africa/Accra","Africa/Algiers","Africa/Bissau","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/El_Aaiun","Africa/Johannesburg","Africa/Juba","Africa/Khartoum","Africa/Lagos","Africa/Maputo","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Asuncion","America/Atikokan","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Cayenne","America/Chicago","America/Chihuahua","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fortaleza","America/Fort_Nelson","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Inuvik","America/Iqaluit","America/Jamaica","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/La_Paz","America/Lima","America/Los_Angeles","America/Maceio","America/Managua","America/Manaus","America/Martinique","America/Matamoros","America/Mazatlan","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Johns","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kathmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Riyadh","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Helsinki","Europe/Istanbul","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/Saratov","Europe/Simferopol","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zaporozhye","Europe/Zurich","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Wake","Pacific/Wallis"],rCe={id:"tz-dropdown"},sCe=["value","disabled","aria-expanded"],iCe=["aria-label"],oCe=["id","onClick","onMouseover","autofocus"],uCe=Z({__name:"TimezoneDropdown",props:{input:{},disabled:{type:Boolean,default:!1}},emits:["updateTimezone"],setup(e,{emit:t}){const n=e,a=t,{input:r,disabled:s}=_e(n),i=ce(r.value),o=ce(!1),u=ce(0),c=k(()=>r.value?Zm.filter(O=>l(O)):Zm);function l(O){return O.toLowerCase().match(i.value.toLowerCase())}function f(O){u.value=O}function d(O){c.value.length>O&&(i.value=c.value[O],a("updateTimezone",i.value),o.value=!1)}function p(O){O.preventDefault(),c.value.length>0&&d(u.value)}function m(O){O.preventDefault(),o.value=!0,i.value=O.target.value.trim()}function I(){d(u.value)}function b(O){const C=document.getElementById(`tz-dropdown-item-${O}`);C&&(C.focus(),C.scrollIntoView({behavior:"smooth",block:"nearest"}))}function R(){o.value=!0,u.value=u.value===null?0:u.value+=1,u.value>=c.value.length&&(u.value=0),b(u.value)}function N(){o.value=!0,u.value=u.value===null?c.value.length-1:u.value-=1,u.value<=-1&&(u.value=c.value.length-1),b(u.value)}function S(){o.value&&(o.value=!1,i.value=r.value)}return We(()=>n.input,O=>{i.value=O}),(O,C)=>(A(),v("div",rCe,[E("input",{class:"tz-dropdown-input",id:"timezone",name:"timezone",value:i.value,disabled:h(s),required:"",role:"combobox","aria-autocomplete":"list","aria-controls":"tz-dropdown-list","aria-expanded":o.value,onKeydown:[C[0]||(C[0]=At(P=>S(),["esc"])),At(p,["enter"]),C[2]||(C[2]=At(P=>R(),["down"])),C[3]||(C[3]=At(P=>N(),["up"]))],onInput:m,onBlur:C[1]||(C[1]=P=>I())},null,40,sCe),o.value?(A(),v("ul",{key:0,class:"tz-dropdown-list",id:"tz-dropdown-list",role:"listbox",tabindex:"-1","aria-label":O.$t("user.PROFILE.TIMEZONE",0)},[(A(!0),v(be,null,Ge(c.value,(P,M)=>(A(),v("li",{key:P,id:`tz-dropdown-item-${M}`,class:Se(["tz-dropdown-item",{focus:M===u.value}]),onClick:L=>d(M),onMouseover:L=>f(M),autofocus:M===u.value,role:"option"},T(P),43,oCe))),128))],8,iCe)):x("",!0)]))}}),lCe=ae(uCe,[["__scopeId","data-v-3d9b6b6f"]]),cCe=e=>(ut("data-v-7b19a78b"),e=e(),lt(),e),dCe={id:"user-preferences-edition"},fCe={class:"profile-form form-box"},ECe={class:"preferences-section"},pCe={class:"form-items"},mCe=["disabled"],hCe=["value"],_Ce={class:"form-items"},TCe=["disabled"],gCe=["value"],ACe={class:"form-items"},SCe={class:"form-items"},OCe=["disabled"],ICe=["value"],RCe={class:"form-items form-checkboxes"},bCe={class:"checkboxes-label"},NCe={class:"checkboxes"},vCe=["id","name","checked","disabled","onInput"],CCe={class:"checkbox-label"},yCe={class:"preferences-section"},DCe={class:"form-items form-checkboxes"},PCe={class:"checkboxes-label"},LCe={class:"checkboxes"},wCe=["id","name","checked","disabled","onInput"],kCe={class:"checkbox-label"},$Ce={class:"form-items form-checkboxes"},UCe={class:"checkboxes-label"},MCe={class:"checkboxes"},xCe=["id","name","checked","disabled","onInput"],FCe={class:"checkbox-label"},zCe={class:"form-items form-checkboxes"},WCe={class:"checkboxes-label"},GCe={class:"checkboxes"},BCe=["id","name","checked","disabled","onInput"],HCe={class:"checkbox-label"},VCe={class:"form-items form-checkboxes"},jCe={class:"checkboxes-label"},KCe={class:"checkboxes"},YCe=["id","name","checked","disabled","onInput"],qCe={class:"checkbox-label"},XCe={class:"info-box raw-speed-help"},ZCe=cCe(()=>E("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),QCe={class:"form-buttons"},JCe={class:"confirm",type:"submit"},eye=Z({__name:"UserPreferencesEdition",props:{user:{}},setup(e){const t=e,n=Me(),a=Gt({display_ascent:!0,imperial_units:!1,language:"en",timezone:"Europe/Paris",date_format:"dd/MM/yyyy",weekm:!1,start_elevation_at_zero:!1,use_raw_gpx_speed:!1,use_dark_mode:!1}),r=[{label:"SUNDAY",value:!1},{label:"MONDAY",value:!0}],s=[{label:"METRIC",value:!1},{label:"IMPERIAL",value:!0}],i=[{label:"DISPLAYED",value:!0},{label:"HIDDEN",value:!1}],o=[{label:"ZERO",value:!0},{label:"MIN_ALT",value:!1}],u=[{label:"FILTERED_SPEED",value:!1},{label:"RAW_SPEED",value:!0}],c=[{label:"DARK",value:!0},{label:"DEFAULT",value:null},{label:"LIGHT",value:!1}],l=k(()=>n.getters[K.GETTERS.USER_LOADING]),f=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),d=k(()=>$be(new Date().toUTCString(),t.user.timezone,a.language));_t(()=>{t.user&&p(t.user)});function p(C){a.display_ascent=C.display_ascent,a.start_elevation_at_zero=C.start_elevation_at_zero?C.start_elevation_at_zero:!1,a.use_raw_gpx_speed=C.use_raw_gpx_speed?C.use_raw_gpx_speed:!1,a.imperial_units=C.imperial_units?C.imperial_units:!1,a.language=C.language?C.language:"en",a.timezone=C.timezone?C.timezone:"Europe/Paris",a.date_format=C.date_format?C.date_format:"dd/MM/yyyy",a.weekm=C.weekm?C.weekm:!1,a.use_dark_mode=C.use_dark_mode}function m(){n.dispatch(K.ACTIONS.UPDATE_USER_PREFERENCES,a)}function I(C){a.timezone=C}function b(C){a.start_elevation_at_zero=C}function R(C){a.use_raw_gpx_speed=C}function N(C){a.display_ascent=C}function S(C){a.imperial_units=C}function O(C){a.weekm=C}return Nt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(C,P)=>{const M=oe("ErrorMessage");return A(),v("div",dCe,[E("div",fCe,[f.value?(A(),te(M,{key:0,message:f.value},null,8,["message"])):x("",!0),E("form",{onSubmit:Je(m,["prevent"])},[E("div",ECe,T(C.$t("user.PROFILE.INTERFACE")),1),E("label",pCe,[j(T(C.$t("user.PROFILE.LANGUAGE"))+" ",1),qe(E("select",{id:"language","onUpdate:modelValue":P[0]||(P[0]=L=>a.language=L),disabled:l.value},[(A(!0),v(be,null,Ge(h(Zc),L=>(A(),v("option",{value:L.value,key:L.value},T(L.label),9,hCe))),128))],8,mCe),[[$s,a.language]])]),E("label",_Ce,[j(T(C.$t("user.PROFILE.THEME_MODE.LABEL"))+" ",1),qe(E("select",{id:"use_dark_mode","onUpdate:modelValue":P[1]||(P[1]=L=>a.use_dark_mode=L),disabled:l.value},[(A(),v(be,null,Ge(c,L=>E("option",{value:L.value,key:L.label},T(C.$t(`user.PROFILE.THEME_MODE.VALUES.${L.label}`)),9,gCe)),64))],8,TCe),[[$s,a.use_dark_mode]])]),E("label",ACe,[j(T(C.$t("user.PROFILE.TIMEZONE"))+" ",1),$(lCe,{input:a.timezone,disabled:l.value,onUpdateTimezone:I},null,8,["input","disabled"])]),E("label",SCe,[j(T(C.$t("user.PROFILE.DATE_FORMAT"))+" ",1),qe(E("select",{id:"date_format","onUpdate:modelValue":P[2]||(P[2]=L=>a.date_format=L),disabled:l.value},[(A(!0),v(be,null,Ge(d.value,L=>(A(),v("option",{value:L.value,key:L.value},T(L.label),9,ICe))),128))],8,OCe),[[$s,a.date_format]])]),E("div",RCe,[E("span",bCe,T(C.$t("user.PROFILE.FIRST_DAY_OF_WEEK")),1),E("div",NCe,[(A(),v(be,null,Ge(r,L=>E("label",{key:L.label},[E("input",{type:"radio",id:L.label,name:L.label,checked:L.value===a.weekm,disabled:l.value,onInput:W=>O(L.value)},null,40,vCe),E("span",CCe,T(C.$t(`user.PROFILE.${L.label}`)),1)])),64))])]),E("div",yCe,T(C.$t("workouts.WORKOUT",0)),1),E("div",DCe,[E("span",PCe,T(C.$t("user.PROFILE.UNITS.LABEL")),1),E("div",LCe,[(A(),v(be,null,Ge(s,L=>E("label",{key:L.label},[E("input",{type:"radio",id:L.label,name:L.label,checked:L.value===a.imperial_units,disabled:l.value,onInput:W=>S(L.value)},null,40,wCe),E("span",kCe,T(C.$t(`user.PROFILE.UNITS.${L.label}`)),1)])),64))])]),E("div",$Ce,[E("span",UCe,T(C.$t("user.PROFILE.ASCENT_DATA")),1),E("div",MCe,[(A(),v(be,null,Ge(i,L=>E("label",{key:L.label},[E("input",{type:"radio",id:L.label,name:L.label,checked:L.value===a.display_ascent,disabled:l.value,onInput:W=>N(L.value)},null,40,xCe),E("span",FCe,T(C.$t(`common.${L.label}`)),1)])),64))])]),E("div",zCe,[E("span",WCe,T(C.$t("user.PROFILE.ELEVATION_CHART_START.LABEL")),1),E("div",GCe,[(A(),v(be,null,Ge(o,L=>E("label",{key:L.label},[E("input",{type:"radio",id:L.label,name:L.label,checked:L.value===a.start_elevation_at_zero,disabled:l.value,onInput:W=>b(L.value)},null,40,BCe),E("span",HCe,T(C.$t(`user.PROFILE.ELEVATION_CHART_START.${L.label}`)),1)])),64))])]),E("div",VCe,[E("span",jCe,T(C.$t("user.PROFILE.USE_RAW_GPX_SPEED.LABEL")),1),E("div",KCe,[(A(),v(be,null,Ge(u,L=>E("label",{key:L.label},[E("input",{type:"radio",id:L.label,name:L.label,checked:L.value===a.use_raw_gpx_speed,disabled:l.value,onInput:W=>R(L.value)},null,40,YCe),E("span",qCe,T(C.$t(`user.PROFILE.USE_RAW_GPX_SPEED.${L.label}`)),1)])),64))]),E("div",XCe,[E("span",null,[ZCe,j(" "+T(C.$t("user.PROFILE.USE_RAW_GPX_SPEED.HELP")),1)])])]),E("div",QCe,[E("button",JCe,T(C.$t("buttons.SUBMIT")),1),E("button",{class:"cancel",onClick:P[3]||(P[3]=Je(L=>C.$router.push("/profile/preferences"),["prevent"]))},T(C.$t("buttons.CANCEL")),1)])],32)])])}}}),tye=ae(eye,[["__scopeId","data-v-7b19a78b"]]),nye={class:"privacy-policy-text"},aye={class:"last-update"},rye=["innerHTML"],sye=["innerHTML"],iye="Sun, 26 Feb 2023 17:00:00 GMT",oye=Z({__name:"PrivacyPolicy",setup(e){const t=Me(),n=k(()=>t.getters[H.GETTERS.APP_CONFIG]),a=k(()=>t.getters[H.GETTERS.LANGUAGE]),r=k(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),s=k(()=>l()),i=k(()=>c()),o=k(()=>f()),u=["DATA_COLLECTED","INFORMATION_USAGE","INFORMATION_PROTECTION","INFORMATION_DISCLOSURE","SITE_USAGE_BY_CHILDREN","YOUR_CONSENT","ACCOUNT_DELETION","CHANGES_TO_OUR_PRIVACY_POLICY"];function c(){return r.value.timezone?r.value.timezone:Intl.DateTimeFormat().resolvedOptions().timeZone?Intl.DateTimeFormat().resolvedOptions().timeZone:"Europe/Paris"}function l(){return nA[a.value]}function f(){return $n(n.value.privacy_policy&&n.value.privacy_policy_date?`${n.value.privacy_policy_date}`:iye,i.value,s.value,!1)}return(d,p)=>(A(),v("div",nye,[E("h1",null,T(bt(d.$t("privacy_policy.TITLE"))),1),E("p",aye,[j(T(d.$t("privacy_policy.LAST_UPDATE"))+": ",1),E("time",null,T(o.value),1)]),n.value.privacy_policy?(A(),v("div",{key:0,innerHTML:h(lr)(h(di)(n.value.privacy_policy))},null,8,rye)):(A(),v(be,{key:1},Ge(u,m=>(A(),v(be,{key:m},[E("h2",null,T(d.$t(`privacy_policy.CONTENT.${m}.TITLE`)),1),E("p",{innerHTML:h(lr)(d.$t(`privacy_policy.CONTENT.${m}.CONTENT`))},null,8,sye)],64))),64))]))}}),AA=ae(oye,[["__scopeId","data-v-31d5cd27"]]),uye={id:"user-privacy-policy"},lye={key:1},cye={class:"policy-content"},dye={for:"accepted_policy",class:"accepted_policy"},fye={class:"form-buttons"},Eye={class:"confirm",type:"submit"},pye=Z({__name:"UserPrivacyPolicyValidation",props:{user:{}},setup(e){const t=e,{user:n}=_e(t),a=Me(),r=k(()=>a.getters[H.GETTERS.ERROR_MESSAGES]),s=ce(!1),i=ce(!1);function o(){a.dispatch(K.ACTIONS.ACCEPT_PRIVACY_POLICY,s.value)}function u(){i.value=!0}return Nt(()=>{a.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(c,l)=>{const f=oe("ErrorMessage"),d=oe("router-link"),p=oe("i18n-t");return A(),v("div",uye,[r.value?(A(),te(f,{key:0,message:r.value},null,8,["message"])):x("",!0),h(n).accepted_privacy_policy?(A(),v("div",lye,[E("p",null,[$(p,{keypath:"user.YOU_HAVE_ACCEPTED_PRIVACY_POLICY"},{default:ue(()=>[$(d,{to:"/privacy-policy"},{default:ue(()=>[j(T(c.$t("privacy_policy.TITLE")),1)]),_:1})]),_:1})]),E("button",{class:"cancel",onClick:l[0]||(l[0]=m=>c.$router.push("/profile"))},T(c.$t("user.PROFILE.BACK_TO_PROFILE")),1)])):(A(),v("form",{key:2,class:Se({errors:i.value}),onSubmit:l[3]||(l[3]=Je(m=>o(),["prevent"]))},[E("div",cye,[$(AA)]),E("label",dye,[qe(E("input",{type:"checkbox",id:"accepted_policy",required:"","onUpdate:modelValue":l[1]||(l[1]=m=>s.value=m),onInvalid:u},null,544),[[af,s.value]]),E("span",null,[$(p,{keypath:"user.READ_AND_ACCEPT_PRIVACY_POLICY"},{default:ue(()=>[j(T(c.$t("privacy_policy.TITLE")),1)]),_:1})])]),$(d,{to:"/profile/edit/account"},{default:ue(()=>[j(T(c.$t("user.I_WANT_TO_DELETE_MY_ACCOUNT")),1)]),_:1}),E("div",fye,[E("button",Eye,T(c.$t("buttons.SUBMIT")),1),E("button",{class:"cancel",onClick:l[2]||(l[2]=m=>c.$router.push("/profile"))},T(c.$t("user.PROFILE.BACK_TO_PROFILE")),1)])],34))])}}}),mye=ae(pye,[["__scopeId","data-v-9b1ceaf7"]]),hye=["profile:read","profile:write","users:read","users:write","workouts:read","workouts:write"],_ye=["application:write"],Tye={id:"new-oauth2-app"},gye={id:"new-oauth2-title"},Aye={id:"apps-form"},Sye={class:"form-items"},Oye={class:"form-item"},Iye={for:"app-name"},Rye={class:"form-item"},bye={for:"app-description"},Nye={class:"form-item"},vye={for:"app-url"},Cye={class:"form-item"},yye={for:"app-redirect-uri"},Dye={class:"form-item-scope"},Pye={class:"form-item-scope-label"},Lye={class:"scope-label"},wye=["name","checked","onChange"],kye=["innerHTML"],$ye={class:"form-buttons"},Uye=["disabled"],Mye=Z({__name:"AddUserApp",props:{authUser:{}},setup(e){const t=e,n=Me(),a=Gt({client_name:"",client_uri:"",client_description:"",description:"",redirect_uri:""}),r=Gt([]),s=k(()=>c(t.authUser,_ye,hye));function i(){const l={client_name:a.client_name,client_description:a.client_description,client_uri:a.client_uri,redirect_uris:[a.redirect_uri],scope:r.sort().join(" ")};n.dispatch(Ye.ACTIONS.CREATE_CLIENT,l)}function o(l){a.client_description=l}function u(l){const f=r.indexOf(l);f>-1?r.splice(f,1):r.push(l)}function c(l,f,d){const p=[...d];return l.admin&&p.push(...f),p.sort()}return(l,f)=>{const d=oe("CustomTextArea");return A(),v("div",Tye,[E("h1",gye,T(l.$t("oauth2.ADD_A_NEW_APP")),1),E("div",Aye,[E("form",{onSubmit:Je(i,["prevent"])},[E("div",Sye,[E("div",Oye,[E("label",Iye,T(l.$t("oauth2.APP.NAME"))+"*",1),qe(E("input",{id:"app-name",type:"text",required:"","onUpdate:modelValue":f[0]||(f[0]=p=>a.client_name=p)},null,512),[[rt,a.client_name]])]),E("div",Rye,[E("label",bye,T(l.$t("oauth2.APP.DESCRIPTION")),1),$(d,{name:"app-description",charLimit:200,input:a.description,onUpdateValue:o},null,8,["input"])]),E("div",Nye,[E("label",vye,T(l.$t("oauth2.APP.URL"))+"*",1),qe(E("input",{id:"app-url",type:"text",required:"","onUpdate:modelValue":f[1]||(f[1]=p=>a.client_uri=p)},null,512),[[rt,a.client_uri]])]),E("div",Cye,[E("label",yye,T(l.$t("oauth2.APP.REDIRECT_URL"))+"* ",1),qe(E("input",{id:"app-redirect-uri",type:"text",required:"","onUpdate:modelValue":f[2]||(f[2]=p=>a.redirect_uri=p)},null,512),[[rt,a.redirect_uri]])]),E("div",Dye,[E("div",Pye,T(l.$t("oauth2.APP.SCOPE.LABEL"))+"* ",1),(A(!0),v(be,null,Ge(s.value,p=>(A(),v("div",{class:"form-item-scope-checkboxes",key:p},[E("label",Lye,[E("input",{type:"checkbox",name:p,checked:r.includes(p),onChange:m=>u(p)},null,40,wye),E("code",null,T(p),1)]),E("p",{class:"scope-description",innerHTML:l.$t(`oauth2.APP.SCOPE.${p}_DESCRIPTION`)},null,8,kye)]))),128))])]),E("div",$ye,[E("button",{class:"confirm",type:"submit",disabled:r.length===0},T(l.$t("buttons.SUBMIT")),9,Uye),E("button",{class:"cancel",onClick:f[3]||(f[3]=Je(()=>l.$router.push("/profile/apps"),["prevent"]))},T(l.$t("buttons.CANCEL")),1)])],32)])])}}}),xye=ae(Mye,[["__scopeId","data-v-e2284e06"]]),Fye={id:"authorize-oauth2-app"},zye={key:0},Wye={id:"authorize-oauth2-title"},Gye={class:"oauth2-access description-list"},Bye={class:"client-scope"},Hye=["innerHTML"],Vye={class:"authorize-oauth2-buttons"},jye={key:1},Kye={class:"no-app"},Yye=Z({__name:"AuthorizeUserApp",setup(e){const t=qt(),n=Me(),a=k(()=>n.getters[Ye.GETTERS.CLIENT]),r=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]);Ct(()=>s());function s(){t.query.client_id&&typeof t.query.client_id=="string"&&n.dispatch(Ye.ACTIONS.GET_CLIENT_BY_CLIENT_ID,t.query.client_id)}function i(){n.dispatch(Ye.ACTIONS.AUTHORIZE_CLIENT,{client_id:`${t.query.client_id}`,redirect_uri:`${t.query.redirect_uri}`,response_type:`${t.query.response_type}`,scope:`${t.query.scope}`,state:`${t.query.state?t.query.state:""}`,code_challenge:`${t.query.code_challenge?t.query.code_challenge:""}`,code_challenge_method:`${t.query.code_challenge_method?t.query.code_challenge_method:""}`})}return(o,u)=>{const c=oe("router-link"),l=oe("i18n-t"),f=oe("ErrorMessage");return A(),v("div",Fye,[a.value.client_id?(A(),v("div",zye,[E("h1",Wye,[$(l,{keypath:"oauth2.AUTHORIZE_APP"},{default:ue(()=>[$(c,{to:{name:"UserApp",params:{id:a.value.id}}},{default:ue(()=>[j(T(a.value.name),1)]),_:1},8,["to"])]),_:1})]),r.value?(A(),te(f,{key:0,message:r.value},null,8,["message"])):x("",!0),E("div",Gye,[E("p",null,T(o.$t("oauth2.APP_REQUESTING_ACCESS")),1),E("dl",null,[(A(!0),v(be,null,Ge(a.value.scope.split(" "),d=>(A(),v(be,{key:d},[E("dt",Bye,[E("code",null,T(d),1)]),E("dd",{innerHTML:o.$t(`oauth2.APP.SCOPE.${d}_DESCRIPTION`)},null,8,Hye)],64))),128))]),E("div",Vye,[E("button",{class:"danger",onClick:i},T(o.$t("buttons.AUTHORIZE")),1),E("button",{class:"cancel",onClick:u[0]||(u[0]=d=>o.$router.push("/profile/apps"))},T(o.$t("buttons.CANCEL")),1)])])])):(A(),v("div",jye,[E("p",Kye,T(o.$t("oauth2.NO_APP")),1),E("button",{onClick:u[1]||(u[1]=d=>o.$router.push("/profile/apps"))},T(o.$t("buttons.BACK")),1)]))])}}}),qye=ae(Yye,[["__scopeId","data-v-a8ed6bf8"]]),Xye={id:"oauth2-apps"},Zye=Z({__name:"index",props:{user:{}},setup(e){const t=e,n=Me(),{user:a}=_e(t);return Nt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),n.commit(Ye.MUTATIONS.SET_CLIENTS,[])}),(r,s)=>{const i=oe("router-view");return A(),v("div",Xye,[$(i,{authUser:h(a)},null,8,["authUser"])])}}}),Qye={id:"oauth2-app",class:"description-list"},Jye={key:1},eDe={key:0,class:"info-box success-message"},tDe=["title"],nDe={key:0},aDe={key:1,class:"app-secret"},rDe=["title"],sDe={class:"client-scopes"},iDe={class:"app-buttons"},oDe={key:2},uDe={class:"no-app"},lDe=Z({__name:"UserApp",props:{authUser:{},afterCreation:{type:Boolean,default:!1}},setup(e){const t=e,n=qt(),a=Me(),{afterCreation:r,authUser:s}=_e(t),i=k(()=>a.getters[Ye.GETTERS.CLIENT]),o=k(()=>a.getters[Ye.GETTERS.REVOCATION_SUCCESSFUL]),u=ce(!1),c=ce(""),l=ce(!1),f=ce(!1),d=ce(!1);Ct(()=>{p(),navigator.clipboard&&(d.value=!0)});function p(){!r.value&&n.params.id&&typeof n.params.id=="string"&&a.dispatch(Ye.ACTIONS.GET_CLIENT_BY_ID,+n.params.id)}function m(S){c.value=S?"oauth2.APP_DELETION_CONFIRMATION":"oauth2.TOKENS_REVOCATION_CONFIRMATION",I(!0)}function I(S){u.value=S,S||(c.value="")}function b(S){c.value==="oauth2.APP_DELETION_CONFIRMATION"?a.dispatch(Ye.ACTIONS.DELETE_CLIENT,S):a.dispatch(Ye.ACTIONS.REVOKE_ALL_TOKENS,S)}function R(){navigator.clipboard.writeText(i.value.client_id),l.value=!0,f.value=!1,setTimeout(()=>{l.value=!1},3e3)}function N(){i.value.client_secret&&(navigator.clipboard.writeText(i.value.client_secret),f.value=!0,l.value=!1,setTimeout(()=>{f.value=!1},3e3))}return Nt(()=>{a.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),a.commit(Ye.MUTATIONS.EMPTY_CLIENT),a.commit(Ye.MUTATIONS.SET_REVOCATION_SUCCESSFUL,!1)}),We(()=>o.value,S=>{S&&I(!1)}),(S,O)=>{const C=oe("Modal");return A(),v("div",Qye,[u.value?(A(),te(C,{key:0,title:S.$t("common.CONFIRMATION"),message:S.$t(c.value),onConfirmAction:O[0]||(O[0]=P=>b(i.value.id)),onCancelAction:O[1]||(O[1]=P=>I(!1)),onKeydown:O[2]||(O[2]=At(P=>I(!1),["esc"]))},null,8,["title","message"])):x("",!0),i.value&&i.value.client_id?(A(),v("div",Jye,[h(r)||o.value?(A(),v("div",eDe,T(S.$t(h(r)?"oauth2.APP_CREATED_SUCCESSFULLY":"oauth2.TOKENS_REVOKED")),1)):x("",!0),E("dl",null,[E("dt",null,T(S.$t("oauth2.APP.CLIENT_ID"))+":",1),E("dd",null,[j(T(i.value.client_id)+" ",1),h(r)&&d.value?(A(),v("i",{key:0,class:Se(`fa fa-${l.value?"check":"copy"}`),"aria-hidden":"true",title:S.$t("oauth2.COPY_TO_CLIPBOARD"),onClick:R},null,10,tDe)):x("",!0)]),h(r)&&i.value.client_secret?(A(),v("dt",nDe,T(S.$t("oauth2.APP.CLIENT_SECRET"))+": ",1)):x("",!0),h(r)&&i.value.client_secret?(A(),v("dd",aDe,[j(T(i.value.client_secret)+" ",1),d.value?(A(),v("i",{key:0,class:Se(`fa fa-${f.value?"check":"copy"}`),"aria-hidden":"true",title:S.$t("oauth2.COPY_TO_CLIPBOARD"),onClick:N},null,10,rDe)):x("",!0)])):x("",!0),E("dt",null,T(bt(S.$t("oauth2.APP.ISSUE_AT")))+":",1),E("dd",null,[E("time",null,T(h($n)(i.value.issued_at,h(s).timezone,h(s).date_format)),1)]),E("dt",null,T(S.$t("oauth2.APP.NAME"))+":",1),E("dd",null,T(i.value.name),1),E("dt",null,T(S.$t("oauth2.APP.DESCRIPTION"))+":",1),E("dd",{class:Se({"no-description":!i.value.client_description})},T(i.value.client_description?i.value.client_description:S.$t("oauth2.NO_DESCRIPTION")),3),E("dt",null,T(S.$t("oauth2.APP.URL"))+":",1),E("dd",null,T(i.value.website),1),E("dt",null,T(S.$t("oauth2.APP.REDIRECT_URL"))+":",1),E("dd",null,T(i.value.redirect_uris.length>0?i.value.redirect_uris[0]:""),1),E("dt",null,T(S.$t("oauth2.APP.SCOPE.LABEL"))+":",1),E("dd",sDe,[(A(!0),v(be,null,Ge(i.value.scope.split(" "),P=>(A(),v("span",{class:"client-scope",key:P},[E("code",null,T(P),1)]))),128))])]),E("div",iDe,[E("button",{class:"danger",onClick:O[3]||(O[3]=P=>m(!1))},T(S.$t("oauth2.REVOKE_ALL_TOKENS")),1),E("button",{class:"danger",onClick:O[4]||(O[4]=P=>m(!0))},T(S.$t("oauth2.DELETE_APP")),1),E("button",{onClick:O[5]||(O[5]=P=>S.$router.push("/profile/apps"))},T(S.$t("buttons.BACK")),1)])])):(A(),v("div",oDe,[E("p",uDe,T(S.$t("oauth2.NO_APP")),1),E("button",{onClick:O[6]||(O[6]=P=>S.$router.push("/profile/apps"))},T(S.$t("buttons.BACK")),1)]))])}}}),Qm=ae(lDe,[["__scopeId","data-v-3a7d0f4a"]]),cDe={id:"oauth2-apps-list"},dDe={class:"apps-list"},fDe={key:0},EDe={class:"app-issued-at"},pDe={key:1,class:"no-apps"},mDe={class:"app-list-buttons"},hDe=Z({__name:"UserAppsList",props:{authUser:{}},setup(e){const t=e,n=Me(),a=qt(),{authUser:r}=_e(t),s=k(()=>n.getters[Ye.GETTERS.CLIENTS]),i=k(()=>n.getters[Ye.GETTERS.CLIENTS_PAGINATION]);let o=u(a.query);Ct(()=>{c(o)});function u(l){const f={};return l.page&&(f.page=Cd(l.page,Xg)),f}function c(l){n.dispatch(Ye.ACTIONS.GET_CLIENTS,l)}return We(()=>a.query,async l=>{o=u(l),c(o)}),(l,f)=>{const d=oe("router-link");return A(),v("div",cDe,[E("p",dDe,T(l.$t("oauth2.APPS_LIST")),1),s.value.length>0?(A(),v("ul",fDe,[(A(!0),v(be,null,Ge(s.value,p=>(A(),v("li",{key:p.client_id},[$(d,{to:{name:"UserApp",params:{id:p.id}}},{default:ue(()=>[j(T(p.name),1)]),_:2},1032,["to"]),E("span",EDe,[j(T(l.$t("oauth2.APP.ISSUE_AT"))+" ",1),E("time",null,T(h($n)(p.issued_at,h(r).timezone,h(r).date_format)),1)])]))),128))])):(A(),v("div",pDe,T(l.$t("oauth2.NO_APPS")),1)),s.value.length>0?(A(),te(ku,{key:2,pagination:i.value,path:"/profile/apps",query:h(o)},null,8,["pagination","query"])):x("",!0),E("div",mDe,[E("button",{onClick:f[0]||(f[0]=p=>l.$router.push("/profile/apps/new"))},T(l.$t("oauth2.NEW_APP")),1),E("button",{onClick:f[1]||(f[1]=p=>l.$router.push("/"))},T(l.$t("common.HOME")),1)])])}}}),_De=ae(hDe,[["__scopeId","data-v-064a87b7"]]),TDe={id:"user-sport-preferences"},gDe={key:0,class:"responsive-table"},ADe={class:"mobile-display"},SDe={key:0,class:"profile-buttons mobile-display"},ODe={key:1,class:"profile-buttons"},IDe={class:"text-left"},RDe={key:0},bDe={class:"cell-heading"},NDe=["value"],vDe={class:"cell-heading"},CDe={key:0,class:"disabled-message"},yDe={key:1,class:"fa fa-refresh fa-spin fa-fw"},DDe={class:"cell-heading"},PDe={class:"cell-heading"},LDe=["checked"],wDe={class:"cell-heading"},kDe=["value"],$De={key:1},UDe={key:0,class:"action-buttons"},MDe={class:"cell-heading"},xDe=["onClick"],FDe={key:1,class:"edition-buttons"},zDe=["disabled"],WDe=["disabled","onClick"],GDe=["disabled"],BDe={key:0,class:"profile-buttons"},HDe={key:1,class:"profile-buttons"},VDe="#838383",jDe=Z({__name:"UserSportPreferences",props:{user:{},isEdition:{type:Boolean}},setup(e){const t=e,n=Me(),{t:a}=Yt(),{isEdition:r,user:s}=_e(t),i=It("sportColors"),o=k(()=>n.getters[Mt.GETTERS.SPORTS]),u=k(()=>Xa(o.value,a,"is_active",s.value.sports_list)),c=k(()=>n.getters[K.GETTERS.USER_LOADING]),l=k(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),f=Gt({sport_id:0,color:null,is_active:!0,stopped_speed_threshold:1});function d(O){O!==null?(f.sport_id=O.id,f.color=O.color?O.color:i?i[O.label]:VDe,f.is_active=O.is_active_for_user,f.stopped_speed_threshold=O.stopped_speed_threshold):R()}function p(O){return f.sport_id===O}function m(O){f.color=O.target.value}function I(O){f.stopped_speed_threshold=parseFloat(O.target.value)}function b(O){f.is_active=O.target.checked}function R(){f.sport_id=0,f.color=null,f.is_active=!0,f.stopped_speed_threshold=1,n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}function N(O){O.preventDefault(),n.dispatch(K.ACTIONS.UPDATE_USER_SPORT_PREFERENCES,f)}function S(O,C){O.preventDefault(),n.dispatch(K.ACTIONS.RESET_USER_SPORT_PREFERENCES,C)}return We(()=>c.value,O=>{!O&&!l.value&&R()}),(O,C)=>{const P=oe("SportImage"),M=oe("ErrorMessage");return A(),v("div",TDe,[o.value.length>0?(A(),v("div",gDe,[E("div",ADe,[h(r)?(A(),v("div",SDe,[E("button",{class:"cancel",onClick:C[0]||(C[0]=Je(L=>O.$router.push("/profile/sports"),["prevent"]))},T(O.$t("buttons.BACK")),1)])):(A(),v("div",ODe,[E("button",{onClick:C[1]||(C[1]=L=>O.$router.push("/profile/edit/sports"))},T(O.$t("user.PROFILE.EDIT_SPORTS_PREFERENCES")),1),E("button",{onClick:C[2]||(C[2]=L=>O.$router.push("/"))},T(O.$t("common.HOME")),1)]))]),E("table",null,[E("thead",null,[E("tr",null,[E("th",null,T(O.$t("user.PROFILE.SPORT.COLOR")),1),E("th",IDe,T(O.$t("workouts.SPORT",0)),1),E("th",null,T(O.$t("workouts.WORKOUT",0)),1),E("th",null,T(O.$t("user.PROFILE.SPORT.IS_ACTIVE")),1),E("th",null,T(O.$t("user.PROFILE.SPORT.STOPPED_SPEED_THRESHOLD")),1),h(r)?(A(),v("th",RDe,T(O.$t("user.PROFILE.SPORT.ACTION")),1)):x("",!0)])]),E("tbody",null,[(A(!0),v(be,null,Ge(u.value,L=>(A(),v("tr",{key:L.id},[E("td",null,[E("span",bDe,T(O.$t("user.PROFILE.SPORT.COLOR")),1),p(L.id)?(A(),v("input",{key:0,class:"sport-color",type:"color",value:f.color,onInput:m},null,40,NDe)):(A(),te(P,{key:1,title:L.translatedLabel,"sport-label":L.label,color:L.color?L.color:h(i)[L.label]},null,8,["title","sport-label","color"]))]),E("td",{class:Se(["sport-label",{"disabled-sport":!L.is_active}])},[E("span",vDe,T(O.$t("user.PROFILE.SPORT.LABEL")),1),j(" "+T(L.translatedLabel)+" ",1),L.is_active?x("",!0):(A(),v("span",CDe," ("+T(O.$t("user.PROFILE.SPORT.DISABLED_BY_ADMIN"))+") ",1)),c.value&&p(L.id)?(A(),v("i",yDe)):x("",!0),l.value&&f.sport_id===L.id?(A(),te(M,{key:2,message:l.value},null,8,["message"])):x("",!0)],2),E("td",{class:Se(["text-center",{"disabled-sport":!L.is_active}])},[E("span",DDe,T(O.$t("workouts.WORKOUT",0)),1),E("i",{class:Se(`fa fa${h(s).sports_list.includes(L.id)?"-check":""}`),"aria-hidden":"true"},null,2)],2),E("td",{class:Se(["text-center",{"disabled-sport":!L.is_active}])},[E("span",PDe,T(O.$t("user.PROFILE.SPORT.IS_ACTIVE")),1),p(L.id)&&L.is_active?(A(),v("input",{key:0,type:"checkbox",checked:L.is_active_for_user,onChange:b},null,40,LDe)):(A(),v("i",{key:1,class:Se(`fa fa${L.is_active_for_user?"-check":""}`),"aria-hidden":"true"},null,2))],2),E("td",{class:Se(["text-center",{"disabled-sport":!L.is_active}])},[E("span",wDe,T(O.$t("user.PROFILE.SPORT.STOPPED_SPEED_THRESHOLD")),1),p(L.id)&&L.is_active?(A(),v("input",{key:0,class:"threshold-input",type:"number",min:"0",step:"0.1",value:f.stopped_speed_threshold,onInput:I},null,40,kDe)):(A(),v("span",$De,T(L.stopped_speed_threshold),1))],2),h(r)?(A(),v("td",UDe,[E("span",MDe,T(O.$t("user.PROFILE.SPORT.ACTION")),1),f.sport_id===0?(A(),v("button",{key:0,onClick:W=>d(L)},T(O.$t("buttons.EDIT")),9,xDe)):x("",!0),p(L.id)?(A(),v("div",FDe,[E("button",{disabled:c.value,onClick:N},T(O.$t("buttons.SUBMIT")),9,zDe),E("button",{disabled:c.value,onClick:W=>S(W,L.id)},T(O.$t("buttons.RESET")),9,WDe),E("button",{disabled:c.value,onClick:C[3]||(C[3]=W=>d(null))},T(O.$t("buttons.CANCEL")),9,GDe)])):x("",!0)])):x("",!0)]))),128))])]),h(r)?(A(),v("div",BDe,[E("button",{class:"cancel",onClick:C[4]||(C[4]=Je(L=>O.$router.push("/profile/sports"),["prevent"]))},T(O.$t("buttons.BACK")),1)])):(A(),v("div",HDe,[E("button",{onClick:C[5]||(C[5]=L=>O.$router.push("/profile/edit/sports"))},T(O.$t("user.PROFILE.EDIT_SPORTS_PREFERENCES")),1),E("button",{onClick:C[6]||(C[6]=L=>O.$router.push("/"))},T(O.$t("common.HOME")),1)]))])):x("",!0)])}}}),Jm=ae(jDe,[["__scopeId","data-v-aa4857fe"]]),Li=e=>(ut("data-v-34b1686b"),e=e(),lt(),e),KDe={class:"about-text"},YDe=["innerHTML"],qDe=Li(()=>E("i",{class:"fa fa-book fa-padding","aria-hidden":"true"},null,-1)),XDe=["href"],ZDe=Li(()=>E("i",{class:"fa fa-github fa-padding","aria-hidden":"true"},null,-1)),QDe={href:"https://github.com/SamR1/FitTrackee",target:"_blank",rel:"noopener noreferrer"},JDe=Li(()=>E("i",{class:"fa fa-balance-scale fa-padding","aria-hidden":"true"},null,-1)),ePe=Li(()=>E("a",{href:"https://choosealicense.com/licenses/agpl-3.0/",target:"_blank",rel:"noopener noreferrer"},"AGPLv3",-1)),tPe={key:0},nPe=Li(()=>E("i",{class:"fa fa-envelope-o fa-padding","aria-hidden":"true"},null,-1)),aPe=["href"],rPe={key:1},sPe=["href"],iPe={class:"about-instance"},oPe=["innerHTML"],uPe=Z({__name:"About",setup(e){const t=Me(),n=k(()=>t.getters[H.GETTERS.APP_CONFIG]),a=k(()=>i()),r=k(()=>t.getters[H.GETTERS.LANGUAGE]),s=k(()=>o());function i(){const u={};return n.value.weather_provider==="visualcrossing"&&(u.name="Visual Crossing",u.url="https://www.visualcrossing.com"),u}function o(){let u="https://samr1.github.io/FitTrackee/";return r.value==="fr"&&(u+="fr/"),u}return(u,c)=>{const l=oe("i18n-t");return A(),v("div",KDe,[E("div",null,[E("p",{class:"error-message",innerHTML:u.$t("about.FITTRACKEE_DESCRIPTION")},null,8,YDe),E("p",null,[qDe,E("a",{class:"documentation-link",href:s.value,target:"_blank",rel:"noopener noreferrer"},T(bt(u.$t("common.DOCUMENTATION"))),9,XDe)]),E("p",null,[ZDe,E("a",QDe,T(u.$t("about.SOURCE_CODE")),1)]),E("p",null,[JDe,$(l,{keypath:"about.FITTRACKEE_LICENSE"},{default:ue(()=>[ePe]),_:1})]),n.value.admin_contact?(A(),v("div",tPe,[nPe,E("a",{href:`mailto:${n.value.admin_contact}`},T(u.$t("about.CONTACT_ADMIN")),9,aPe)])):x("",!0),a.value&&a.value.name?(A(),v("div",rPe,[j(T(u.$t("about.WEATHER_DATA_FROM"))+" ",1),E("a",{href:a.value.url,target:"_blank",rel:"nofollow noopener"},T(a.value.name),9,sPe)])):x("",!0),n.value.about?(A(),v(be,{key:2},[E("p",iPe,T(u.$t("about.ABOUT_THIS_INSTANCE")),1),E("div",{innerHTML:h(lr)(h(di)(n.value.about))},null,8,oPe)],64)):x("",!0)])])}}}),lPe=ae(uPe,[["__scopeId","data-v-34b1686b"]]),cPe={},dPe={id:"bike"},fPe=["src"];function EPe(e,t){return A(),v("div",dPe,[E("img",{class:"bike-img",src:"/img/bike.svg",alt:"mountain bike"},null,8,fPe)])}const SA=ae(cPe,[["render",EPe],["__scopeId","data-v-dc181e30"]]),pPe={id:"about",class:"view"},mPe={class:"container"},hPe={class:"container-sub"},_Pe={class:"container-sub about-details"},TPe=Z({__name:"AboutView",setup(e){return(t,n)=>(A(),v("div",pPe,[E("div",mPe,[E("div",hPe,[$(SA)]),E("div",_Pe,[$(lPe)])])]))}}),gPe=ae(TPe,[["__scopeId","data-v-ef9c7198"]]),APe={id:"error"},SPe={class:"error-content"},OPe=Z({__name:"Error",props:{title:{},message:{},buttonText:{},path:{default:"/"}},setup(e){const t=e,{buttonText:n,title:a,message:r,path:s}=_e(t);return(i,o)=>(A(),v("div",APe,[E("div",SPe,[E("h1",null,T(h(a)),1),E("p",null,T(h(r)),1),h(n)?(A(),v("button",{key:0,onClick:o[0]||(o[0]=u=>i.$router.push(h(s))),class:"upper"},T(h(n)),1)):x("",!0)])]))}}),IPe=ae(OPe,[["__scopeId","data-v-48ec856d"]]),dE=Z({__name:"NotFound",props:{target:{default:"PAGE"}},setup(e){const t=e,{target:n}=_e(t),a=ce(),r=ce(!1);_t(()=>s());function s(){a.value=setTimeout(()=>{r.value=!0},500)}return Nt(()=>{a.value&&clearTimeout(a.value)}),(i,o)=>r.value?(A(),te(IPe,{key:0,title:"404",message:i.$t(`error.NOT_FOUND.${h(n)}`),"button-text":i.$t("common.HOME")},null,8,["message","button-text"])):x("",!0)}}),RPe=e=>(ut("data-v-5eee0876"),e=e(),lt(),e),bPe={id:"admin",class:"view"},NPe={key:0,class:"container"},vPe=RPe(()=>E("div",{id:"bottom"},null,-1)),CPe=Z({__name:"AdminView",setup(e){const t=Me(),n=k(()=>t.getters[H.GETTERS.APP_CONFIG]),a=k(()=>t.getters[H.GETTERS.APP_STATS]),r=k(()=>t.getters[K.GETTERS.IS_ADMIN]),s=k(()=>t.getters[K.GETTERS.USER_LOADING]);return Ct(()=>t.dispatch(H.ACTIONS.GET_APPLICATION_STATS)),(i,o)=>{const u=oe("router-view");return A(),v("div",bPe,[s.value?x("",!0):(A(),v("div",NPe,[r.value?(A(),te(u,{key:0,appConfig:n.value,appStatistics:a.value},null,8,["appConfig","appStatistics"])):(A(),te(dE,{key:1})),vPe]))])}}}),yPe=ae(CPe,[["__scopeId","data-v-5eee0876"]]),OA="/img/workouts/mountains.svg",DPe=E("div",{class:"map-attribution"},[E("span",{class:"map-attribution-text"},"©"),E("a",{class:"map-attribution-text",href:"https://www.openstreetmap.org/copyright",target:"_blank",rel:"noopener noreferrer"}," OpenStreetMap ")],-1),IA=Z({__name:"StaticMap",props:{workout:{},displayHover:{type:Boolean,default:!1}},setup(e){const t=e,{displayHover:n}=_e(t),a=`${Si()}workouts/map/${t.workout.map}`;return(r,s)=>(A(),v("div",{class:Se(["static-map",{"display-hover":h(n)}])},[h(n)?(A(),v("img",{key:0,src:a,alt:""})):(A(),v("div",{key:1,class:"bg-map-image",style:Va({backgroundImage:`url(${a})`})},null,4)),DPe],2))}}),fE=e=>(ut("data-v-0bcae633"),e=e(),lt(),e),PPe={class:"timeline-workout"},LPe={class:"box"},wPe={class:"workout-user-date"},kPe={class:"workout-user"},$Pe=["title"],UPe={key:0},MPe={key:1,class:"no-map"},xPe={class:"img"},FPe={class:"data"},zPe=fE(()=>E("i",{class:"fa fa-clock-o","aria-hidden":"true"},null,-1)),WPe={key:0},GPe={class:"data"},BPe=fE(()=>E("i",{class:"fa fa-road","aria-hidden":"true"},null,-1)),HPe={key:0,class:"data elevation"},VPe=["alt"],jPe={class:"data-values"},KPe={key:1,class:"data altitude"},YPe=fE(()=>E("i",{class:"fa fa-location-arrow","aria-hidden":"true"},null,-1)),qPe={class:"data-values"},XPe=Z({__name:"WorkoutCard",props:{user:{},useImperialUnits:{type:Boolean},workout:{default:()=>({})},sport:{default:()=>({})}},setup(e){const t=e,n=Me(),{user:a,workout:r,sport:s,useImperialUnits:i}=_e(t),o=k(()=>n.getters[H.GETTERS.LOCALE]);function u(l){return l.with_gpx&&l.min_alt!==null&&l.max_alt!==null}function c(l){return u(l)&&l.ascent!==null&&l.descent!==null}return(l,f)=>{var I;const d=oe("router-link"),p=oe("SportImage"),m=oe("Distance");return A(),v("div",PPe,[E("div",LPe,[E("div",wPe,[E("div",kPe,[$(Oi,{user:h(a)},null,8,["user"]),h(a).username?(A(),te(d,{key:0,class:"workout-user-name",to:{name:"User",params:{username:h(a).username}}},{default:ue(()=>[j(T(h(a).username),1)]),_:1},8,["to"])):x("",!0)]),h(r).id?(A(),te(d,{key:0,class:"workout-title",to:{name:"Workout",params:{workoutId:h(r).id}}},{default:ue(()=>[j(T(h(r).title),1)]),_:1},8,["to"])):x("",!0),h(r).workout_date&&h(a)?(A(),v("div",{key:1,class:"workout-date",title:h($n)(h(r).workout_date,h(a).timezone,h(a).date_format)},T(h(q2)(new Date(h(r).workout_date),new Date,{addSuffix:!0,locale:o.value})),9,$Pe)):x("",!0)]),E("div",{class:Se(["workout-map",{"no-cursor":!h(r)}]),onClick:f[0]||(f[0]=b=>h(r).id?l.$router.push({name:"Workout",params:{workoutId:h(r).id}}):null)},[h(r)?(A(),v("div",UPe,[h(r).with_gpx?(A(),te(IA,{key:0,workout:h(r)},null,8,["workout"])):(A(),v("div",MPe,T(l.$t("workouts.NO_MAP")),1))])):x("",!0)],2),E("div",{class:Se(["workout-data",{"without-elevation":!u(h(r))}]),onClick:f[1]||(f[1]=b=>h(r).id?l.$router.push({name:"Workout",params:{workoutId:h(r).id}}):null)},[E("div",xPe,[(I=h(s))!=null&&I.label?(A(),te(p,{key:0,"sport-label":h(s).label,color:h(s).color},null,8,["sport-label","color"])):x("",!0)]),E("div",FPe,[zPe,h(r)?(A(),v("span",WPe,T(h(r).moving),1)):x("",!0)]),E("div",GPe,[BPe,h(r).id?(A(),te(m,{key:0,distance:h(r).distance,digits:3,unitFrom:"km",useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0)]),u(h(r))?(A(),v("div",HPe,[E("img",{class:"mountains",src:OA,alt:l.$t("workouts.ELEVATION")},null,8,VPe),E("div",jPe,[h(r).id?(A(),te(m,{key:0,distance:h(r).min_alt,unitFrom:"m",displayUnit:!1,useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0),j("/ "),h(r).id?(A(),te(m,{key:1,distance:h(r).max_alt,unitFrom:"m",useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0)])])):x("",!0),c(h(r))?(A(),v("div",KPe,[YPe,E("div",qPe,[j(" +"),h(r).id?(A(),te(m,{key:0,distance:h(r).ascent,unitFrom:"m",displayUnit:!1,useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0),j("/- "),h(r).id?(A(),te(m,{key:1,distance:h(r).descent,unitFrom:"m",useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0)])])):x("",!0)],2)])])}}}),eh=ae(XPe,[["__scopeId","data-v-0bcae633"]]),ZPe={},QPe={class:"no-workouts box"};function JPe(e,t){const n=oe("router-link");return A(),v("div",QPe,[E("div",null,[j(T(e.$t("workouts.NO_WORKOUTS"))+" ",1),$(n,{to:"/workouts/add"},{default:ue(()=>[j(T(e.$t("workouts.UPLOAD_FIRST_WORKOUT")),1)]),_:1})])])}const EE=ae(ZPe,[["render",JPe],["__scopeId","data-v-b0c91cc6"]]),$a={ligthMode:{text:"#666",line:"rgba(0, 0, 0, 0.1)"},darkMode:{text:"#a1a1a1",line:"#3f3f3f"}},e4e=(e,t,n,a=!1)=>{const r={speed:{label:t("workouts.SPEED"),backgroundColor:["transparent"],borderColor:[a?"#5f5c97":"#8884d8"],borderWidth:2,data:[],yAxisID:"ySpeed"},elevation:{label:t("workouts.ELEVATION"),backgroundColor:[a?"#303030":"#e5e5e5"],borderColor:[a?"#222222":"#cccccc"],borderWidth:1,fill:!0,data:[],yAxisID:"yElevation"}},s=[],i=[],o=[];return e.map(u=>{s.push(Ro("km",u.distance,n)),i.push(u.duration),r.speed.data.push(Ro("km",u.speed,n)),u.elevation!==void 0&&r.elevation.data.push(Ro("m",u.elevation,n)),o.push({latitude:u.latitude,longitude:u.longitude})}),{distance_labels:s,duration_labels:i,datasets:r,coordinates:o}},t4e=e=>{const t=e.length;if(t===0)return{};const n={};return e.map(a=>{n[a.sport_id]||(n[a.sport_id]={count:0,percentage:0}),n[a.sport_id].count+=1,n[a.sport_id].percentage=n[a.sport_id].count/t}),n},Ei={order:"desc",order_by:"workout_date"},n4e={id:"timeline"},a4e={class:"section-title"},r4e={key:0},s4e={key:1},i4e={key:1,class:"more-workouts"},uo=5,o4e=Z({__name:"Timeline",props:{sports:{},user:{}},setup(e){const t=e,n=Me(),{sports:a,user:r}=_e(t),s=ce(1),i=t.user.nb_workouts>=uo?uo:t.user.nb_workouts;Ct(()=>c());const o=k(()=>n.getters[Ae.GETTERS.TIMELINE_WORKOUTS]),u=k(()=>o.value.length>0?o.value[o.value.length-1].previous_workout!==null:!1);function c(){n.dispatch(Ae.ACTIONS.GET_TIMELINE_WORKOUTS,{page:s.value,per_page:uo,...Ei})}function l(){s.value+=1,n.dispatch(Ae.ACTIONS.GET_MORE_TIMELINE_WORKOUTS,{page:s.value,per_page:uo,...Ei})}return(f,d)=>(A(),v("div",n4e,[E("div",a4e,T(f.$t("workouts.LATEST_WORKOUTS")),1),h(r).nb_workouts>0&&o.value.length===0?(A(),v("div",r4e,[(A(!0),v(be,null,Ge([...Array(h(i)).keys()],p=>(A(),te(eh,{user:h(r),useImperialUnits:h(r).imperial_units,key:p},null,8,["user","useImperialUnits"]))),128))])):(A(),v("div",s4e,[(A(!0),v(be,null,Ge(o.value,p=>(A(),te(eh,{workout:p,sport:o.value.length>0?h(a).filter(m=>m.id===p.sport_id)[0]:null,user:h(r),useImperialUnits:h(r).imperial_units,key:p.id},null,8,["workout","sport","user","useImperialUnits"]))),128)),o.value.length===0?(A(),te(EE,{key:0})):x("",!0),u.value?(A(),v("div",i4e,[E("button",{onClick:l},T(f.$t("workouts.LOAD_MORE_WORKOUT")),1)])):x("",!0)]))]))}}),u4e=ae(o4e,[["__scopeId","data-v-e0964959"]]),l4e=["title"],RA=Z({__name:"CalendarWorkout",props:{displayHARecord:{type:Boolean},workout:{},sportLabel:{},sportColor:{}},setup(e){const t=e,{displayHARecord:n,workout:a,sportLabel:r,sportColor:s}=_e(t);return(i,o)=>{const u=oe("SportImage"),c=oe("router-link");return A(),te(c,{class:"calendar-workout",to:{name:"Workout",params:{workoutId:h(a).id}}},{default:ue(()=>[$(u,{"sport-label":h(r),title:h(a).title,color:h(s)},null,8,["sport-label","title","color"]),E("sup",null,[h(a).records.length>0?(A(),v("i",{key:0,class:"fa fa-trophy custom-fa-small","aria-hidden":"true",title:h(a).records.filter(l=>h(n)?!0:l.record_type!=="HA").map(l=>` ${i.$t(`workouts.RECORD_${l.record_type}`)}`)[0]},null,8,l4e)):x("",!0)])]),_:1},8,["to"])}}}),c4e={class:"donut-chart"},d4e={height:"34",width:"34",viewBox:"0 0 34 34"},f4e=["stroke","stroke-dashoffset","transform"],th=16,nh=16,ah=14,E4e=Z({__name:"DonutChart",props:{colors:{},datasets:{}},setup(e){const t=e,{colors:n,datasets:a}=_e(t);let r=-90;const s=2*Math.PI*ah;function i(u,c){return c-u*c}function o(u,c){const l=`rotate(${r}, ${th}, ${nh})`;return r=c*360+r,l}return(u,c)=>(A(),v("div",c4e,[(A(),v("svg",d4e,[(A(!0),v(be,null,Ge(Object.entries(h(a)),(l,f)=>(A(),v("g",{key:f},[E("circle",{cx:th,cy:nh,r:ah,fill:"transparent",stroke:h(n)[+l[0]],"stroke-dashoffset":i(l[1].percentage,s),"stroke-dasharray":s,"stroke-width":"3","stroke-opacity":"0.8",transform:o(f,l[1].percentage)},null,8,f4e)]))),128))]))]))}}),p4e=e=>(ut("data-v-c143b24d"),e=e(),lt(),e),m4e={class:"calendar-workouts-chart"},h4e=["id"],_4e={class:"workouts-count"},T4e={key:0,class:"workouts-pane"},g4e=["id"],A4e=p4e(()=>E("i",{class:"fa fa-times","aria-hidden":"true"},null,-1)),S4e=[A4e],O4e=Z({__name:"CalendarWorkoutsChart",props:{colors:{},datasets:{},sports:{},workouts:{},displayHARecord:{type:Boolean},index:{}},setup(e){const t=e;let n=0;const{colors:a,datasets:r,index:s,sports:i,workouts:o}=_e(t),u=ce(!0);function c(){const d=document.getElementById(`workouts-pane-${s.value}`);return d!=null&&d.children&&(d==null?void 0:d.children.length)>0?d:null}async function l(d){var m;d.preventDefault(),d.stopPropagation(),u.value=!u.value,await nn();const p=c();u.value?(m=document.getElementById(`workouts-donut-${s.value}`))==null||m.focus():(p==null?void 0:p.children[0]).focus()}function f(d){if(!u.value){if(!u.value&&(d.key==="Tab"||d.keyCode===9)){d.preventDefault(),d.stopPropagation();const p=c();p&&(d.shiftKey?(n-=1,n<0&&(n=p.children.length-1)):(n+=1,n>=p.children.length&&(n=0)),p.children[n].focus())}d.key==="Escape"&&l(d)}}return _t(()=>{document.addEventListener("keydown",f)}),Nt(()=>{document.removeEventListener("keydown",f)}),(d,p)=>{const m=fO("click-outside");return A(),v("div",m4e,[E("button",{class:"workouts-chart transparent",id:`workouts-donut-${h(s)}`,onClick:l},[E("div",_4e,T(h(o).length),1),$(E4e,{datasets:h(r),colors:h(a)},null,8,["datasets","colors"])],8,h4e),u.value?x("",!0):(A(),v("div",T4e,[qe((A(),v("div",{class:"more-workouts",id:`workouts-pane-${h(s)}`},[E("button",{class:"calendar-more-close transparent",onClick:l},S4e),(A(!0),v(be,null,Ge(h(o),(I,b)=>(A(),te(RA,{key:b,displayHARecord:d.displayHARecord,workout:I,sportLabel:h(sE)(I,h(i)),sportColor:h(iE)(I,h(i))},null,8,["displayHARecord","workout","sportLabel","sportColor"]))),128))],8,g4e)),[[m,l]])]))])}}}),rh=ae(O4e,[["__scopeId","data-v-c143b24d"]]),I4e={class:"calendar-workouts"},R4e={class:"desktop-display"},b4e={key:0,class:"workouts-display"},N4e={key:1,class:"donut-display"},v4e={class:"mobile-display"},C4e={key:0,class:"donut-display"},sh=6,y4e=Z({__name:"CalendarWorkouts",props:{displayHARecord:{type:Boolean},workouts:{},sports:{},index:{}},setup(e){const t=e,{displayHARecord:n,index:a,sports:r,workouts:s}=_e(t),i=k(()=>t4e(t.workouts)),o=k(()=>TRe(t.sports));return(u,c)=>(A(),v("div",I4e,[E("div",R4e,[h(s).length<=sh?(A(),v("div",b4e,[(A(!0),v(be,null,Ge(h(s).slice(0,sh),(l,f)=>(A(),te(RA,{key:f,displayHARecord:h(n),workout:l,sportLabel:h(sE)(l,h(r)),sportColor:h(iE)(l,h(r))},null,8,["displayHARecord","workout","sportLabel","sportColor"]))),128))])):(A(),v("div",N4e,[$(rh,{workouts:h(s),sports:h(r),datasets:i.value,colors:o.value,displayHARecord:h(n),index:h(a)},null,8,["workouts","sports","datasets","colors","displayHARecord","index"])]))]),E("div",v4e,[h(s).length>0?(A(),v("div",C4e,[$(rh,{workouts:h(s),sports:h(r),datasets:i.value,colors:o.value,displayHARecord:h(n),index:h(a)},null,8,["workouts","sports","datasets","colors","displayHARecord","index"])])):x("",!0)])]))}}),D4e={class:"calendar-cells"},P4e={class:"calendar-cell-day"},L4e=Z({__name:"CalendarCells",props:{currentDay:{},displayHARecord:{type:Boolean},endDate:{},sports:{},startDate:{},timezone:{},weekStartingMonday:{type:Boolean},workouts:{}},setup(e){const t=e,{currentDay:n,displayHARecord:a,endDate:r,sports:s,startDate:i,timezone:o,weekStartingMonday:u,workouts:c}=_e(t),l=ce([]);_t(()=>f());function f(){l.value=[];let m=i.value;for(;m<=r.value;){const I=[];for(let b=0;b<7;b++)I.push(m),m=Ii(m,1);l.value.push(I)}}function d(m){return u.value?[5,6].includes(m):[0,6].includes(m)}function p(m,I){return I?I.filter(b=>z1(Ol(b.workout_date,o.value),m)).reverse():[]}return We(()=>t.currentDay,()=>f()),(m,I)=>(A(),v("div",D4e,[(A(!0),v(be,null,Ge(l.value,(b,R)=>(A(),v("div",{class:"calendar-row",key:R},[(A(!0),v(be,null,Ge(b,(N,S)=>(A(),v("div",{class:Se(["calendar-cell",{"disabled-cell":!h(Z2)(N,h(n)),"week-end":d(S),today:h(Q2)(N)}]),key:S},[$(y4e,{workouts:p(N,h(c)),sports:h(s),displayHARecord:h(a),index:S},null,8,["workouts","sports","displayHARecord","index"]),E("div",P4e,T(h(dn)(N,"d")),1)],2))),128))]))),128))]))}}),w4e={class:"calendar-days"},k4e=Z({__name:"CalendarDays",props:{startDate:{},localeOptions:{}},setup(e){const t=e,n=[];for(let a=0;a<7;a++)n.push(Ii(t.startDate,a));return(a,r)=>(A(),v("div",w4e,[(A(),v(be,null,Ge(n,(s,i)=>E("div",{class:"calendar-day",key:i},T(h(dn)(s,a.localeOptions.code==="eu"?"EEEEEE.":"EEE",{locale:a.localeOptions})),1)),64))]))}}),$4e={class:"calendar-header"},U4e=E("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1),M4e=[U4e],x4e={class:"calendar-month"},F4e=E("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1),z4e=[F4e],W4e=Z({__name:"CalendarHeader",props:{day:{},localeOptions:{}},emits:["displayNextMonth","displayPreviousMonth"],setup(e,{emit:t}){const n=e,a=t,{day:r,localeOptions:s}=_e(n);return(i,o)=>(A(),v("div",$4e,[E("button",{class:"calendar-arrow calendar-arrow-left transparent",onClick:o[0]||(o[0]=u=>a("displayPreviousMonth"))},M4e),E("div",x4e,[E("span",null,T(h(dn)(h(r),"MMM yyyy",{locale:h(s)})),1)]),E("button",{class:"calendar-arrow calendar-arrow-right transparent",onClick:o[1]||(o[1]=u=>a("displayNextMonth"))},z4e)]))}}),G4e={id:"user-calendar"},B4e={class:"calendar-card box"},ih="yyyy-MM-dd",H4e=Z({__name:"index",props:{sports:{},user:{}},setup(e){const t=e,n=Me(),{sports:a,user:r}=_e(t),s=ce(new Date),i=ce(xm(s.value,r.value.weekm)),o=k(()=>n.getters[Ae.GETTERS.CALENDAR_WORKOUTS]),u=k(()=>n.getters[H.GETTERS.LOCALE]);Ct(()=>c());function c(){i.value=xm(s.value,t.user.weekm);const d={from:dn(i.value.start,ih),to:dn(i.value.end,ih),page:1,per_page:100,...Ei};n.dispatch(Ae.ACTIONS.GET_CALENDAR_WORKOUTS,d)}function l(){s.value=Kr(s.value,1),c()}function f(){s.value=Zs(s.value,1),c()}return(d,p)=>(A(),v("div",G4e,[E("div",B4e,[$(W4e,{day:s.value,"locale-options":u.value,onDisplayNextMonth:l,onDisplayPreviousMonth:f},null,8,["day","locale-options"]),$(k4e,{"start-date":i.value.start,"locale-options":u.value},null,8,["start-date","locale-options"]),$(L4e,{currentDay:s.value,displayHARecord:h(r).display_ascent,"end-date":i.value.end,sports:h(a),"start-date":i.value.start,timezone:h(r).timezone,workouts:o.value,weekStartingMonday:h(r).weekm},null,8,["currentDay","displayHARecord","end-date","sports","start-date","timezone","workouts","weekStartingMonday"])])]))}}),bA={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},V4e={ariaLabel:{type:String},ariaDescribedby:{type:String}},j4e={type:{type:String,required:!0},...bA,...V4e},K4e=O_[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function yr(e){return zu(e)?et(e):e}function Y4e(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return zu(t)?new Proxy(e,{}):e}function q4e(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function NA(e,t){e.labels=t}function vA(e,t,n){const a=[];e.datasets=t.map(r=>{const s=e.datasets.find(i=>i[n]===r[n]);return!s||!r.data||a.includes(s)?{...r}:(a.push(s),Object.assign(s,r),s)})}function X4e(e,t){const n={labels:[],datasets:[]};return NA(n,e.labels),vA(n,e.datasets,t),n}const Z4e=Z({props:j4e,setup(e,t){let{expose:n,slots:a}=t;const r=ce(null),s=mi(null);n({chart:s});const i=()=>{if(!r.value)return;const{type:c,data:l,options:f,plugins:d,datasetIdKey:p}=e,m=X4e(l,p),I=Y4e(m,l);s.value=new Md(r.value,{type:c,data:I,options:{...f},plugins:d})},o=()=>{const c=et(s.value);c&&(c.destroy(),s.value=null)},u=c=>{c.update(e.updateMode)};return _t(i),hi(o),We([()=>e.options,()=>e.data],(c,l)=>{let[f,d]=c,[p,m]=l;const I=et(s.value);if(!I)return;let b=!1;if(f){const R=yr(f),N=yr(p);R&&R!==N&&(q4e(I,R),b=!0)}if(d){const R=yr(d.labels),N=yr(m.labels),S=yr(d.datasets),O=yr(m.datasets);R!==N&&(NA(I.config.data,R),b=!0),S&&S!==O&&(vA(I.config.data,S,e.datasetIdKey),b=!0)}b&&nn(()=>{u(I)})},{deep:!0}),()=>Tn("canvas",{role:"img",ariaLabel:e.ariaLabel,ariaDescribedby:e.ariaDescribedby,ref:r},[Tn("p",{},[a.default?a.default():""])])}});function CA(e,t){return Md.register(t),Z({props:bA,setup(n,a){let{expose:r}=a;const s=mi(null),i=o=>{s.value=o==null?void 0:o.chart};return r({chart:s}),()=>Tn(Z4e,K4e({ref:i},{type:e,...n}))}})}const Q4e=CA("bar",Oh),J4e=CA("line",Ih),eLe=(e,t=!1)=>{let n="0";t&&(n=String(Math.floor(e/86400)),e%=86400);const a=String(Math.floor(e/3600)).padStart(2,"0");e%=3600;const r=String(Math.floor(e/60)).padStart(2,"0"),s=String(e%60).padStart(2,"0");return t?`${n==="0"?"":`${n}d `}${a==="00"?"":`${a}h `}${r}m ${s}s`:`${a==="00"?"":`${a}:`}${r}:${s}`},vs=(e,t,n,a=!0,r="km")=>{const s=n?Pn[r].defaultTarget:r;switch(e){case"average_speed":return`${t.toFixed(2)} ${s}/h`;case"total_duration":return eLe(t,a);case"total_distance":case"total_ascent":case"total_descent":return`${t.toFixed(2)} ${s}`;default:return t.toString()}},tLe=Z({__name:"Chart",props:{datasets:{},labels:{},displayedData:{},displayedSportIds:{},fullStats:{type:Boolean},useImperialUnits:{type:Boolean}},setup(e){const t=e,{datasets:n,labels:a,displayedData:r,displayedSportIds:s,fullStats:i,useImperialUnits:o}=_e(t),u=_f(),{t:c}=Yt(),l=k(()=>u.getters[H.GETTERS.DARK_MODE]),f=k(()=>hf(l.value)),d=k(()=>({color:f.value?$a.darkMode.line:$a.ligthMode.line})),p=k(()=>({color:f.value?$a.darkMode.text:$a.ligthMode.text})),m=k(()=>({labels:a.value,datasets:JSON.parse(JSON.stringify(n.value))})),I=k(()=>({responsive:!0,maintainAspectRatio:!1,animation:!1,layout:{padding:{top:i.value?40:22}},scales:{x:{stacked:!0,grid:{drawOnChartArea:!1,...d.value},border:{...d.value},ticks:{...p.value}},y:{stacked:r.value!=="average_speed",grid:{drawOnChartArea:!1,...d.value},border:{...d.value},ticks:{maxTicksLimit:6,callback:function(S){return vs(r.value,+S,o.value,!1,N(r.value))},...p.value},afterFit:function(S){S.width=i.value?90:60}}},plugins:{datalabels:{anchor:"end",align:"end",color:function(S){return r.value==="average_speed"&&S.dataset.backgroundColor?S.dataset.backgroundColor[0]:p.value.color},rotation:function(S){return i.value&&S.chart.chartArea.width<580?310:0},display:function(S){return i.value&&S.chart.chartArea.width<300?!1:r.value==="average_speed"?s.value.length==1?"auto":!1:!0},formatter:function(S,O){if(r.value==="average_speed")return vs(r.value,S,o.value,!1);{const C=O.chart.data.datasets.map(P=>P.data[O.dataIndex]).reduce((P,M)=>R(P,M),0);return O.datasetIndex===s.value.length-1&&C>0?vs(r.value,C,o.value,!1,N(r.value)):null}}},legend:{display:!1},tooltip:{interaction:{intersect:!0,mode:"index",position:r.value==="average_speed"?"nearest":"average"},filter:function(S){return S.formattedValue!=="0"},callbacks:{label:function(S){let O=c(`sports.${S.dataset.label}.LABEL`)||"";return O&&(O+=": "),S.parsed.y!==null&&(O+=vs(r.value,S.parsed.y,o.value,!0,N(r.value))),O},footer:function(S){if(r.value==="average_speed")return"";let O=0;return S.map(C=>{O+=C.parsed.y}),`${c("common.TOTAL")}: `+vs(r.value,O,o.value,!0,N(r.value))}}}}}));function b(S){return isNaN(S)?0:+S}function R(S,O){return b(S)+b(O)}function N(S){return["total_ascent","total_descent"].includes(S)?"m":"km"}return(S,O)=>(A(),v("div",{class:Se(["bar-chart",{minimal:!h(i)}])},[$(h(Q4e),{data:m.value,options:I.value},null,8,["data","options"])],2))}}),nLe=ae(tLe,[["__scopeId","data-v-d506f845"]]),{locale:oh}=_r.global,aLe={week:{api:"yyyy-MM-dd",chart:"MM/dd/yyyy"},month:{api:"yyyy-MM",chart:"MM/yyyy"},year:{api:"yyyy",chart:"yyyy"}},rLe=["average_speed","nb_workouts","total_duration","total_distance","total_ascent","total_descent"],sLe=(e,t)=>{const n=[];for(let a=Lbe(e.duration,e.start,t);a<=e.end;a=wbe(e.duration,a))n.push(a);return n},Dr=(e,t,n=!1)=>{const a={label:e,backgroundColor:[t],data:[]};return n?(a.type="line",a.borderColor=[t],a.spanGaps=!0):a.type="bar",a},iLe=e=>{const t={average_speed:[],nb_workouts:[],total_distance:[],total_duration:[],total_ascent:[],total_descent:[]};return e.map(n=>{const a=n.color?n.color:rE[n.label];t.average_speed.push(Dr(n.label,a,!0)),t.nb_workouts.push(Dr(n.label,a)),t.total_distance.push(Dr(n.label,a)),t.total_duration.push(Dr(n.label,a)),t.total_ascent.push(Dr(n.label,a)),t.total_descent.push(Dr(n.label,a))}),t},oLe=(e,t,n)=>{switch(e){case"average_speed":case"total_distance":case"total_ascent":case"total_descent":return Ro(["average_speed","total_distance"].includes(e)?"km":"m",t,n);default:case"nb_workouts":case"total_duration":return t}},uLe=(e,t,n,a,r,s,i)=>{const o=sLe(e,t),u=aLe[e.duration],c=n.filter(p=>a.includes(p.id)),l=[],f=iLe(c),d={};return c.map(p=>d[p.label]=p.id),o.map(p=>{const m=dn(p,u.api),I=dn(p,e.duration==="week"?gr(i,oh.value):u.chart,{locale:Ni[oh.value]});l.push(I),rLe.map(b=>{f[b].map(R=>{R.data.push(m in r&&d[R.label]in r[m]?oLe(b,r[m][d[R.label]][b],s):b==="average_speed"?null:0)})})}),{labels:l,datasets:f}},lLe=(e,t,n)=>{const a=n?1:0,r=t==="year"?Sf(Mc(e,9)):t==="week"?tl(Zs(e,2),{weekStartsOn:a}):bi(Zs(e,11)),s=t==="year"?W1(e):t==="week"?Of(e,{weekStartsOn:a}):Ri(e);return{duration:t,end:s,start:r}},cLe=(e,t,n)=>{const{duration:a,start:r,end:s}=e,i=n?1:0;return{duration:a,end:a==="year"?W1(t?Mc(s,1):Ho(s,1)):a==="week"?Of(t?G0(s,1):Uc(s,1),{weekStartsOn:i}):Ri(t?Zs(s,1):Kr(s,1)),start:a==="year"?Sf(t?Mc(r,1):Ho(r,1)):a==="week"?tl(t?G0(r,1):Uc(r,1),{weekStartsOn:i}):bi(t?Zs(r,1):Kr(r,1))}},dLe={class:"stats-chart"},fLe={key:0},ELe={key:1},pLe={class:"chart-radio"},mLe=["checked","disabled"],hLe=["checked","disabled"],_Le=["checked","disabled"],TLe={key:0},gLe=["checked","disabled"],ALe={key:1},SLe=["checked","disabled"],OLe={key:2},ILe=["checked","disabled"],RLe=Z({__name:"index",props:{sports:{},user:{},chartParams:{},displayedSportIds:{default:()=>[]},fullStats:{type:Boolean,default:!1},hideChartIfNoData:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},setup(e){const t=e,{sports:n,user:a,chartParams:r,displayedSportIds:s,fullStats:i,hideChartIfNoData:o,isDisabled:u}=_e(t),c=Me(),l=ce("total_distance"),f=k(()=>c.getters[Ba.GETTERS.USER_STATS]),d=k(()=>uLe(r.value,a.value.weekm,n.value,s.value,f.value,a.value.imperial_units,a.value.date_format)),p=k(()=>d.value.datasets[l.value]),m=k(()=>d.value.labels),I=k(()=>Object.keys(f.value).length===0);Ct(()=>b(N(r.value,a.value)));function b(S){c.dispatch(Ba.ACTIONS.GET_USER_STATS,{username:a.value.username,filterType:"by_time",params:S})}function R(S){l.value=S.target.name}function N(S,O){return{from:dn(S.start,"yyyy-MM-dd"),to:dn(S.end,"yyyy-MM-dd"),time:S.duration==="week"?`week${O.weekm?"m":""}`:S.duration}}return We(()=>r.value,async S=>{b(N(S,a.value))}),(S,O)=>(A(),v("div",dLe,[h(o)&&I.value?(A(),v("div",fLe,T(S.$t("workouts.NO_WORKOUTS")),1)):(A(),v("div",ELe,[E("div",pLe,[E("label",null,[E("input",{type:"radio",name:"total_distance",checked:l.value==="total_distance",disabled:h(u),onClick:R},null,8,mLe),j(" "+T(S.$t("workouts.DISTANCE")),1)]),E("label",null,[E("input",{type:"radio",name:"total_duration",checked:l.value==="total_duration",disabled:h(u),onClick:R},null,8,hLe),j(" "+T(S.$t("workouts.DURATION")),1)]),E("label",null,[E("input",{type:"radio",name:"nb_workouts",checked:l.value==="nb_workouts",disabled:h(u),onClick:R},null,8,_Le),j(" "+T(S.$t("workouts.WORKOUT",2)),1)]),h(i)?(A(),v("label",TLe,[E("input",{type:"radio",name:"average_speed",checked:l.value==="average_speed",disabled:h(u),onClick:R},null,8,gLe),j(" "+T(S.$t("workouts.AVERAGE_SPEED")),1)])):x("",!0),h(i)?(A(),v("label",ALe,[E("input",{type:"radio",name:"total_ascent",checked:l.value==="total_ascent",disabled:h(u),onClick:R},null,8,SLe),j(" "+T(S.$t("workouts.ASCENT")),1)])):x("",!0),h(i)?(A(),v("label",OLe,[E("input",{type:"radio",name:"total_descent",checked:l.value==="total_descent",disabled:h(u),onClick:R},null,8,ILe),j(" "+T(S.$t("workouts.DESCENT")),1)])):x("",!0)]),m.value.length>0?(A(),te(nLe,{key:0,datasets:p.value,labels:m.value,displayedData:l.value,displayedSportIds:h(s),fullStats:h(i),useImperialUnits:h(a).imperial_units},null,8,["datasets","labels","displayedData","displayedSportIds","fullStats","useImperialUnits"])):x("",!0)]))]))}}),yA=ae(RLe,[["__scopeId","data-v-b8d7f5c9"]]),bLe={class:"user-month-stats"},NLe=Z({__name:"UserMonthStats",props:{sports:{},user:{}},setup(e){const t=e,{sports:n,user:a}=_e(t),r=new Date,s={duration:"week",start:bi(r),end:Ri(r)},i=n.value.map(o=>o.id);return(o,u)=>{const c=oe("Card");return A(),v("div",bLe,[$(c,null,{title:ue(()=>[j(T(o.$t("dashboard.THIS_MONTH")),1)]),content:ue(()=>[$(yA,{sports:h(n),user:h(a),"chart-params":s,"displayed-sport-ids":h(i),"hide-chart-if-no-data":!0},null,8,["sports","user","displayed-sport-ids"])]),_:1})])}}}),vLe=ae(NLe,[["__scopeId","data-v-8f59a282"]]),{locale:CLe}=_r.global,yLe=(e,t,n,a)=>{const r="km",s=n?Pn[r].defaultTarget:r,i="m",o=n?Pn[i].defaultTarget:i;let u;switch(e.record_type){case"AS":case"MS":u=`${on(+e.value,r,s,2)} ${s}/h`;break;case"FD":u=`${on(+e.value,r,s,3)} ${s}`;break;case"HA":u=`${on(+e.value,i,o,2)} ${o}`;break;case"LD":u=e.value;break;default:throw new Error(`Invalid record type, expected: "AS", "FD", "HA", "LD", "MD", got: "${e.record_type}"`)}return{id:e.id,record_type:e.record_type,sport_id:e.sport_id,value:u,user:e.user,workout_date:$n(e.workout_date,t,a,!1),workout_id:e.workout_id}},DLe=(e,t)=>{const n=e.label.toLowerCase(),a=t.label.toLowerCase();return n>a?1:n(s=gr(s,CLe.value),e.filter(i=>r?!0:i.record_type!=="HA").reduce((i,o)=>{const u=t.find(c=>c.id===o.sport_id);return u&&u.label&&(i[u.translatedLabel]===void 0&&(i[u.translatedLabel]={label:u.label,color:u.color,records:[]}),i[u.translatedLabel].records.push(yLe(o,n,a,s))),i},{})),LLe={class:"records-card"},wLe={class:"record-type"},kLe={class:"record-value"},$Le={class:"record-date"},ULe=Z({__name:"RecordsCard",props:{records:{},sportTranslatedLabel:{}},setup(e){const t=e,{records:n,sportTranslatedLabel:a}=_e(t),{t:r}=Yt();function s(i){const o=[];return i.map(u=>{o.push({...u,label:r(`workouts.RECORD_${u.record_type}`)})}),o.sort(DLe)}return(i,o)=>{const u=oe("SportImage"),c=oe("router-link"),l=oe("Card");return A(),v("div",LLe,[$(l,null,{title:ue(()=>[$(u,{"sport-label":h(n).label,color:h(n).color},null,8,["sport-label","color"]),j(" "+T(h(a)),1)]),content:ue(()=>[(A(!0),v(be,null,Ge(s(h(n).records),f=>(A(),v("div",{class:"record",key:f.id},[E("span",wLe,T(f.label),1),E("span",kLe,T(f.value),1),E("span",$Le,[$(c,{to:{name:"Workout",params:{workoutId:f.workout_id}}},{default:ue(()=>[E("time",null,T(f.workout_date),1)]),_:2},1032,["to"])])]))),128))]),_:1})])}}}),MLe=ae(ULe,[["__scopeId","data-v-64523a87"]]),xLe=e=>(ut("data-v-fff33919"),e=e(),lt(),e),FLe={class:"user-records-section"},zLe={class:"section-title"},WLe=xLe(()=>E("i",{class:"fa fa-trophy custom-fa-small","aria-hidden":"true"},null,-1)),GLe={class:"user-records"},BLe={key:0,class:"no-records"},HLe=Z({__name:"index",props:{sports:{},user:{}},setup(e){const t=e,{t:n}=Yt(),a=k(()=>PLe(t.user.records,Xa(t.sports,n),t.user.timezone,t.user.imperial_units,t.user.display_ascent,t.user.date_format));return(r,s)=>(A(),v("div",FLe,[E("div",zLe,[WLe,j(" "+T(r.$t("workouts.RECORD",2)),1)]),E("div",GLe,[Object.keys(a.value).length===0?(A(),v("div",BLe,T(r.$t("workouts.NO_RECORDS")),1)):x("",!0),(A(!0),v(be,null,Ge(Object.keys(a.value).sort(),i=>(A(),te(MLe,{sportTranslatedLabel:i,records:a.value[i],key:i,useImperialUnits:r.user.imperial_units},null,8,["sportTranslatedLabel","records","useImperialUnits"]))),128))])]))}}),VLe=ae(HLe,[["__scopeId","data-v-fff33919"]]),jLe={id:"user-stats"},dc="km",fc="m",KLe=Z({__name:"index",props:{user:{}},setup(e){const t=e,{t:n}=Yt(),{user:a}=_e(t),r=k(()=>t.user.total_duration),s=k(()=>l(r)),i=a.value.imperial_units?Pn[dc].defaultTarget:dc,o=k(()=>a.value.imperial_units?on(a.value.total_distance,dc,i,2):parseFloat(a.value.total_distance.toFixed(2))),u=a.value.imperial_units?Pn[fc].defaultTarget:fc,c=k(()=>a.value.imperial_units?on(a.value.total_ascent,fc,u,2):parseFloat(a.value.total_ascent.toFixed(2)));function l(f){const d=f.value.match(/day/g)?f.value.split(", ")[1]:f.value;return{days:f.value.match(/day/g)?`${f.value.split(" ")[0]} ${f.value.match(/days/g)?n("common.DAY",2):n("common.DAY",1)}`:`0 ${n("common.DAY",2)},`,duration:`${d.split(":")[0]}h ${d.split(":")[1]}min`}}return(f,d)=>(A(),v("div",jLe,[$(ca,{icon:"calendar",value:h(a).nb_workouts,text:f.$t("workouts.WORKOUT",h(a).nb_workouts)},null,8,["value","text"]),$(ca,{icon:"road",value:o.value,text:h(i)==="mi"?"miles":h(i)},null,8,["value","text"]),h(a).display_ascent?(A(),te(ca,{key:0,icon:"location-arrow",value:c.value,text:h(u)==="ft"?"feet":h(u)},null,8,["value","text"])):x("",!0),$(ca,{icon:"clock-o",value:s.value.days,text:s.value.duration},null,8,["value","text"]),h(a).display_ascent?x("",!0):(A(),te(ca,{key:1,icon:"tags",value:h(a).nb_sports,text:f.$t("workouts.SPORT",h(a).nb_sports)},null,8,["value","text"]))]))}}),YLe={},qLe={class:"privacy-policy-message"};function XLe(e,t){const n=oe("router-link"),a=oe("i18n-t");return A(),v("div",qLe,[E("span",null,[$(a,{keypath:"user.LAST_PRIVACY_POLICY_TO_VALIDATE"},{default:ue(()=>[$(n,{to:"/profile/edit/privacy-policy",class:"policy-link"},{default:ue(()=>[j(T(e.$t("user.REVIEW")),1)]),_:1})]),_:1})])])}const ZLe=ae(YLe,[["render",XLe],["__scopeId","data-v-1b250692"]]),wi=e=>(ut("data-v-8f5da609"),e=e(),lt(),e),QLe={key:0,id:"dashboard",class:"view"},JLe={class:"container mobile-menu"},ewe={class:"box"},twe=wi(()=>E("i",{class:"fa fa-calendar","aria-hidden":"true"},null,-1)),nwe=[twe],awe=wi(()=>E("i",{class:"fa fa-bar-chart","aria-hidden":"true"},null,-1)),rwe=[awe],swe=wi(()=>E("i",{class:"fa fa-map-o","aria-hidden":"true"},null,-1)),iwe=[swe],owe=wi(()=>E("i",{class:"fa fa-trophy","aria-hidden":"true"},null,-1)),uwe=[owe],lwe={key:0,class:"container privacy-policy-message"},cwe={class:"container"},dwe={class:"container dashboard-container"},fwe={class:"left-container dashboard-sub-container"},Ewe={class:"right-container dashboard-sub-container"},pwe=wi(()=>E("div",{id:"bottom"},null,-1)),mwe={key:1,class:"app-loading"},hwe=Z({__name:"Dashboard",setup(e){const t=Me(),n=k(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),a=k(()=>t.getters[Mt.GETTERS.SPORTS]),r=ce("calendar");Ct(()=>t.dispatch(K.ACTIONS.GET_USER_PROFILE));function s(i){r.value=i}return(i,o)=>{const u=oe("Loader");return n.value.username&&a.value.length>0?(A(),v("div",QLe,[E("div",JLe,[E("div",ewe,[E("div",{class:Se(["mobile-menu-item",{"is-selected":r.value==="calendar"}]),onClick:o[0]||(o[0]=c=>s("calendar"))},nwe,2),E("div",{class:Se(["mobile-menu-item",{"is-selected":r.value==="chart"}]),onClick:o[1]||(o[1]=c=>s("chart"))},rwe,2),E("div",{class:Se(["mobile-menu-item",{"is-selected":r.value==="timeline"}]),onClick:o[2]||(o[2]=c=>s("timeline"))},iwe,2),E("div",{class:Se(["mobile-menu-item",{"is-selected":r.value==="records"}]),onClick:o[3]||(o[3]=c=>s("records"))},uwe,2)])]),n.value.accepted_privacy_policy?x("",!0):(A(),v("div",lwe,[$(ZLe)])),E("div",cwe,[$(KLe,{user:n.value},null,8,["user"])]),E("div",dwe,[E("div",fwe,[$(vLe,{sports:a.value,user:n.value,class:Se({"is-hidden":r.value!=="chart"})},null,8,["sports","user","class"]),$(VLe,{sports:a.value,user:n.value,class:Se({"is-hidden":r.value!=="records"})},null,8,["sports","user","class"])]),E("div",Ewe,[$(H4e,{sports:a.value,user:n.value,class:Se({"is-hidden":r.value!=="calendar"})},null,8,["sports","user","class"]),$(u4e,{sports:a.value,user:n.value,class:Se({"is-hidden":r.value!=="timeline"})},null,8,["sports","user","class"])])]),pwe])):(A(),v("div",mwe,[$(u)]))}}}),_we=ae(hwe,[["__scopeId","data-v-8f5da609"]]),Twe={class:"not-found view"},gwe=Z({__name:"NotFoundView",setup(e){return(t,n)=>(A(),v("div",Twe,[$(dE)]))}}),Awe={id:"privacy-policy",class:"view"},Swe={class:"container"},Owe=E("div",{id:"bottom"},null,-1),Iwe=Z({__name:"PrivacyPolicyView",setup(e){const t=Me();return Ct(()=>{t.dispatch(H.ACTIONS.GET_APPLICATION_PRIVACY_POLICY)}),(n,a)=>(A(),v("div",Awe,[E("div",Swe,[$(AA)]),Owe]))}}),DA=e=>(ut("data-v-174c91c4"),e=e(),lt(),e),Rwe={class:"chart-menu"},bwe=["disabled"],Nwe=DA(()=>E("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),vwe=[Nwe],Cwe={class:"time-frames custom-checkboxes-group"},ywe={class:"time-frames-checkboxes custom-checkboxes"},Dwe=["id","name","checked","onInput","disabled"],Pwe=["id","tabindex","onKeydown"],Lwe=["disabled"],wwe=DA(()=>E("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),kwe=[wwe],$we=Z({__name:"StatsMenu",props:{isDisabled:{type:Boolean}},emits:["arrowClick","timeFrameUpdate"],setup(e,{emit:t}){const n=e,{isDisabled:a}=_e(n),r=t,s=ce("month"),i=["week","month","year"];function o(u){s.value=u,r("timeFrameUpdate",u)}return _t(()=>{if(!a.value){const u=document.getElementById("frame-month");u&&u.focus()}}),(u,c)=>(A(),v("div",Rwe,[E("button",{class:"chart-arrow transparent",onClick:c[0]||(c[0]=l=>r("arrowClick",!0)),onKeydown:c[1]||(c[1]=At(l=>r("arrowClick",!0),["enter"])),disabled:h(a)},vwe,40,bwe),E("div",Cwe,[E("div",ywe,[(A(),v(be,null,Ge(i,l=>E("div",{class:"time-frame custom-checkbox",key:l},[E("label",null,[E("input",{type:"radio",id:l,name:l,checked:s.value===l,onInput:f=>o(l),disabled:h(a)},null,40,Dwe),E("span",{id:`frame-${l}`,tabindex:h(a)?-1:0,role:"button",onKeydown:At(f=>o(l),["enter"])},T(u.$t(`statistics.TIME_FRAMES.${l}`)),41,Pwe)])])),64))])]),E("button",{class:"chart-arrow transparent",onClick:c[2]||(c[2]=l=>r("arrowClick",!1)),onKeydown:c[3]||(c[3]=At(l=>r("arrowClick",!1),["enter"])),disabled:h(a)},kwe,40,Lwe)]))}}),Uwe=ae($we,[["__scopeId","data-v-174c91c4"]]),Mwe={class:"sports-menu"},xwe=["id","name","checked","onInput"],Fwe={class:"sport-label"},zwe=Z({__name:"StatsSportsMenu",props:{userSports:{},selectedSportIds:{default:()=>[]}},emits:["selectedSportIdsUpdate"],setup(e,{emit:t}){const n=e,a=t,{t:r}=Yt(),s=It("sportColors"),{selectedSportIds:i}=_e(n),o=k(()=>Xa(n.userSports,r));function u(c){a("selectedSportIdsUpdate",c)}return(c,l)=>{const f=oe("SportImage");return A(),v("div",Mwe,[(A(!0),v(be,null,Ge(o.value,d=>(A(),v("label",{type:"checkbox",key:d.id,style:Va({color:d.color?d.color:h(s)[d.label]})},[E("input",{type:"checkbox",id:`${d.id}`,name:d.label,checked:h(i).includes(d.id),onInput:p=>u(d.id)},null,40,xwe),$(f,{"sport-label":d.label,color:d.color},null,8,["sport-label","color"]),E("span",Fwe,T(d.translatedLabel),1)],4))),128))])}}}),Wwe={key:0,id:"user-statistics"},Gwe=Z({__name:"index",props:{sports:{},user:{},isDisabled:{type:Boolean}},setup(e){const t=e,{t:n}=Yt(),{sports:a,user:r}=_e(t),s=ce("month"),i=ce(l(s.value)),o=k(()=>Xa(t.sports,n)),u=ce(d(a.value));function c(m){s.value=m,i.value=l(s.value)}function l(m){return lLe(new Date,m,t.user.weekm)}function f(m){i.value=cLe(i.value,m,t.user.weekm)}function d(m){return m.map(I=>I.id)}function p(m){u.value.includes(m)?u.value=u.value.filter(I=>I!==m):u.value.push(m)}return We(()=>t.sports,m=>{u.value=d(m)}),(m,I)=>o.value?(A(),v("div",Wwe,[$(Uwe,{onTimeFrameUpdate:c,onArrowClick:f,isDisabled:m.isDisabled},null,8,["isDisabled"]),$(yA,{sports:h(a),user:h(r),chartParams:i.value,"displayed-sport-ids":u.value,fullStats:!0,isDisabled:m.isDisabled},null,8,["sports","user","chartParams","displayed-sport-ids","isDisabled"]),$(zwe,{"selected-sport-ids":u.value,"user-sports":h(a),onSelectedSportIdsUpdate:p},null,8,["selected-sport-ids","user-sports"])])):x("",!0)}}),Bwe=ae(Gwe,[["__scopeId","data-v-b145e4ac"]]),Hwe={id:"statistics",class:"view"},Vwe={key:0,class:"container"},jwe=Z({__name:"StatisticsView",setup(e){const t=Me(),n=k(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),a=k(()=>t.getters[Mt.GETTERS.SPORTS].filter(s=>n.value.sports_list.includes(s.id))),r=k(()=>n.value.nb_workouts===0);return(s,i)=>{const o=oe("Card");return A(),v("div",Hwe,[n.value.username?(A(),v("div",Vwe,[$(o,null,{title:ue(()=>[j(T(s.$t("statistics.STATISTICS")),1)]),content:ue(()=>[$(Bwe,{class:Se({"stats-disabled":r.value}),user:n.value,sports:a.value,isDisabled:r.value},null,8,["class","user","sports","isDisabled"])]),_:1}),n.value.nb_workouts===0?(A(),te(EE,{key:0})):x("",!0)])):x("",!0)])}}}),Kwe=ae(jwe,[["__scopeId","data-v-0aa997fa"]]),Ywe={name:"EmailSent"},qwe={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 345.834 345.834",style:{"enable-background":"new 0 0 345.834 345.834"},"xml:space":"preserve"},Xwe=E("g",null,[E("path",{d:`M339.798,260.429c0.13-0.026,0.257-0.061,0.385-0.094c0.109-0.028,0.219-0.051,0.326-0.084
c0.125-0.038,0.247-0.085,0.369-0.129c0.108-0.039,0.217-0.074,0.324-0.119c0.115-0.048,0.226-0.104,0.338-0.157
c0.109-0.052,0.22-0.1,0.327-0.158c0.107-0.057,0.208-0.122,0.312-0.184c0.107-0.064,0.215-0.124,0.319-0.194
c0.111-0.074,0.214-0.156,0.321-0.236c0.09-0.067,0.182-0.13,0.27-0.202c0.162-0.133,0.316-0.275,0.466-0.421
@@ -455,7 +455,7 @@ and ensure you are accounting for this risk.
V234.967z M185.878,179.888c0.535-0.535,0.969-1.131,1.308-1.765l28.051,24.835c1.418,1.255,3.194,1.885,4.972,1.885
c1.726,0,3.451-0.593,4.853-1.781l28.587-24.254c0.26,0.38,0.553,0.743,0.89,1.08l65.687,65.687H120.191L185.878,179.888z`}),E("path",{d:`M7.5,170.676h126.667c4.143,0,7.5-3.357,7.5-7.5s-3.357-7.5-7.5-7.5H7.5c-4.143,0-7.5,3.357-7.5,7.5
S3.357,170.676,7.5,170.676z`}),E("path",{d:`M20.625,129.345H77.5c4.143,0,7.5-3.357,7.5-7.5s-3.357-7.5-7.5-7.5H20.625c-4.143,0-7.5,3.357-7.5,7.5
- S16.482,129.345,20.625,129.345z`}),E("path",{d:"M62.5,226.51h-55c-4.143,0-7.5,3.357-7.5,7.5s3.357,7.5,7.5,7.5h55c4.143,0,7.5-3.357,7.5-7.5S66.643,226.51,62.5,226.51z"})],-1),Qwe=[Zwe];function Jwe(e,t,n,a,r,s){return A(),v("svg",Xwe,Qwe)}const PA=ae(qwe,[["render",Jwe]]),LA=e=>(ut("data-v-13388f00"),e=e(),lt(),e),e6e={id:"user-form"},t6e={key:2,class:"info-box success-message"},n6e={class:"form-items"},a6e=["disabled","placeholder"],r6e={key:1,class:"form-info"},s6e=LA(()=>E("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),i6e=["disabled","placeholder"],o6e={key:3,class:"form-info"},u6e=LA(()=>E("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),l6e={key:5,for:"accepted_policy",class:"accepted_policy"},c6e=["disabled"],d6e=["disabled"],f6e={key:3},E6e={key:0},p6e={key:4},m6e={class:"account"},h6e={key:5},_6e=Z({__name:"UserAuthForm",props:{action:{},token:{default:""}},setup(e){const t=e,n=qt(),a=Me(),{action:r}=_e(t),s=Gt({username:"",email:"",password:"",accepted_policy:!1}),i=k(()=>I(t.action)),o=k(()=>a.getters[H.GETTERS.ERROR_MESSAGES]),u=k(()=>a.getters[K.GETTERS.IS_REGISTRATION_SUCCESS]),c=k(()=>a.getters[K.GETTERS.IS_SUCCESS]),l=k(()=>a.getters[H.GETTERS.APP_CONFIG]),f=k(()=>a.getters[H.GETTERS.LANGUAGE]),d=k(()=>t.action==="register"&&!l.value.is_registration_enabled),p=k(()=>["reset-request","account-confirmation-resend"].includes(t.action)&&!l.value.is_email_sending_enabled),m=ce(!1);function I(O){switch(O){case"reset-request":case"reset":return"buttons.SUBMIT";default:return`buttons.${t.action.toUpperCase()}`}}function b(){m.value=!0}function R(O){s.password=O}function N(O){switch(O){case"reset":return t.token?a.dispatch(K.ACTIONS.RESET_USER_PASSWORD,{password:s.password,token:t.token}):a.commit(H.MUTATIONS.SET_ERROR_MESSAGES,"user.INVALID_TOKEN");case"reset-request":return a.dispatch(K.ACTIONS.SEND_PASSWORD_RESET_REQUEST,{email:s.email});case"account-confirmation-resend":return a.dispatch(K.ACTIONS.RESEND_ACCOUNT_CONFIRMATION_EMAIL,{email:s.email});default:s.language=f.value,a.dispatch(K.ACTIONS.LOGIN_OR_REGISTER,{actionType:O,formData:s,redirectUrl:n.query.from})}}function S(){s.username="",s.email="",s.password="",s.accepted_policy=!1}return Nt(()=>a.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),We(()=>n.path,async()=>{a.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),a.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!1),a.commit(K.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS,!1),m.value=!1,S()}),(O,C)=>{const P=oe("AlertMessage"),M=oe("router-link"),L=oe("i18n-t"),W=oe("ErrorMessage");return A(),v("div",{id:"user-auth-form",class:Se(`${["reset","reset-request"].includes(h(r))?h(r):"user-form"}`)},[E("div",e6e,[E("div",{class:Se(["form-box",{disabled:d.value}])},[d.value?(A(),te(P,{key:0,message:"user.REGISTER_DISABLED"})):x("",!0),p.value?(A(),te(P,{key:1,message:"admin.EMAIL_SENDING_DISABLED"})):x("",!0),c.value||u.value?(A(),v("div",t6e,T(O.$t(`user.PROFILE.SUCCESSFUL_${u.value?`REGISTRATION${l.value.is_email_sending_enabled?"_WITH_EMAIL":""}`:"UPDATE"}`)),1)):x("",!0),E("form",{class:Se({errors:m.value}),onSubmit:C[3]||(C[3]=Je(B=>N(h(r)),["prevent"]))},[E("div",n6e,[h(r)==="register"?qe((A(),v("input",{key:0,id:"username",disabled:d.value,required:"",pattern:"[a-zA-Z0-9_]+",minlength:"3",maxlength:"30",onInvalid:b,"onUpdate:modelValue":C[0]||(C[0]=B=>s.username=B),placeholder:O.$t("user.USERNAME")},null,40,a6e)),[[rt,s.username]]):x("",!0),h(r)==="register"?(A(),v("div",r6e,[s6e,j(" "+T(O.$t("user.USERNAME_INFO")),1)])):x("",!0),h(r)!=="reset"?qe((A(),v("input",{key:2,id:"email",disabled:d.value||p.value,required:"",onInvalid:b,type:"email","onUpdate:modelValue":C[1]||(C[1]=B=>s.email=B),placeholder:O.$t("user.EMAIL")},null,40,i6e)),[[rt,s.email]]):x("",!0),["reset-request","register","account-confirmation-resend"].includes(h(r))?(A(),v("div",o6e,[u6e,j(" "+T(O.$t("user.EMAIL_INFO")),1)])):x("",!0),["account-confirmation-resend","reset-request"].includes(h(r))?x("",!0):(A(),te($d,{key:4,disabled:d.value,required:!0,placeholder:h(r)==="reset"?O.$t("user.ENTER_PASSWORD"):O.$t("user.PASSWORD"),password:s.password,checkStrength:["reset","register"].includes(h(r)),onUpdatePassword:R,onPasswordError:b},null,8,["disabled","placeholder","password","checkStrength"])),h(r)==="register"?(A(),v("label",l6e,[qe(E("input",{type:"checkbox",id:"accepted_policy",disabled:d.value,required:"",onInvalid:b,"onUpdate:modelValue":C[2]||(C[2]=B=>s.accepted_policy=B)},null,40,c6e),[[af,s.accepted_policy]]),E("span",null,[$(L,{keypath:"user.READ_AND_ACCEPT_PRIVACY_POLICY"},{default:ue(()=>[$(M,{to:"/privacy-policy",target:"_blank"},{default:ue(()=>[j(T(O.$t("privacy_policy.TITLE")),1)]),_:1})]),_:1})])])):x("",!0)]),E("button",{type:"submit",disabled:d.value||p.value},T(O.$t(i.value)),9,d6e)],34),h(r)==="login"?(A(),v("div",f6e,[$(M,{class:"links",to:"/register"},{default:ue(()=>[j(T(O.$t("user.REGISTER")),1)]),_:1}),l.value.is_email_sending_enabled?(A(),v("span",E6e,"-")):x("",!0),l.value.is_email_sending_enabled?(A(),te(M,{key:1,class:"links",to:"/password-reset/request"},{default:ue(()=>[j(T(O.$t("user.PASSWORD_FORGOTTEN")),1)]),_:1})):x("",!0)])):x("",!0),h(r)==="register"?(A(),v("div",p6e,[E("span",m6e,T(O.$t("user.ALREADY_HAVE_ACCOUNT")),1),$(M,{class:"links",to:"/login"},{default:ue(()=>[j(T(O.$t("user.LOGIN")),1)]),_:1})])):x("",!0),["login","register"].includes(h(r))&&l.value.is_email_sending_enabled?(A(),v("div",h6e,[$(M,{class:"links",to:"/account-confirmation/resend"},{default:ue(()=>[j(T(O.$t("user.ACCOUNT_CONFIRMATION_NOT_RECEIVED")),1)]),_:1})])):x("",!0),o.value?(A(),te(W,{key:6,message:o.value},null,8,["message"])):x("",!0)],2)])],2)}}}),pE=ae(_6e,[["__scopeId","data-v-13388f00"]]),T6e={id:"account-confirmation-email",class:"center-card with-margin"},g6e={key:0,class:"email-sent"},A6e={class:"email-sent-message"},S6e={key:1},O6e=Z({__name:"AccountConfirmationEmail",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(a,r)=>{const s=oe("Card");return A(),v("div",T6e,[h(n)==="email-sent"?(A(),v("div",g6e,[$(PA),E("div",A6e,T(a.$t("user.ACCOUNT_CONFIRMATION_SENT")),1)])):(A(),v("div",S6e,[$(s,null,{title:ue(()=>[j(T(a.$t("user.RESENT_ACCOUNT_CONFIRMATION")),1)]),content:ue(()=>[$(pE,{action:h(n)},null,8,["action"])]),_:1})]))])}}}),I6e=ae(O6e,[["__scopeId","data-v-b0299010"]]),R6e={id:"account-confirmation",class:"view"},b6e={class:"container"},N6e=Z({__name:"AccountConfirmationResendView",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(a,r)=>(A(),v("div",R6e,[E("div",b6e,[$(I6e,{action:h(n)},null,8,["action"])])]))}}),uh=ae(N6e,[["__scopeId","data-v-9a9c1644"]]),v6e={key:0,id:"account-confirmation",class:"center-card with-margin"},C6e={class:"error-message"},y6e=Z({__name:"AccountConfirmationView",setup(e){const t=qt(),n=Ya(),a=Me(),r=k(()=>a.getters[H.GETTERS.ERROR_MESSAGES]),s=k(()=>t.query.token);Ct(()=>i());function i(){s.value?a.dispatch(K.ACTIONS.CONFIRM_ACCOUNT,{token:s.value}):n.push("/")}return Nt(()=>a.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),(o,u)=>{const c=oe("router-link");return r.value?(A(),v("div",v6e,[$(Df),E("p",C6e,[E("span",null,T(o.$t("error.SOMETHING_WRONG"))+".",1),$(c,{class:"links",to:"/account-confirmation/resend"},{default:ue(()=>[j(T(o.$t("buttons.ACCOUNT-CONFIRMATION-RESEND"))+"? ",1)]),_:1})])])):x("",!0)}}}),D6e=ae(y6e,[["__scopeId","data-v-a0fa0b62"]]),P6e={key:0,id:"email-update",class:"center-card with-margin"},L6e={class:"error-message"},w6e=Z({__name:"EmailUpdateView",setup(e){const t=qt(),n=Ya(),a=Me(),r=k(()=>a.getters[K.GETTERS.AUTH_USER_PROFILE]),s=k(()=>a.getters[K.GETTERS.IS_AUTHENTICATED]),i=k(()=>a.getters[H.GETTERS.ERROR_MESSAGES]),o=k(()=>t.query.token);Ct(()=>u());function u(){o.value?a.dispatch(K.ACTIONS.CONFIRM_EMAIL,{token:o.value,refreshUser:s.value}):n.push("/")}return Nt(()=>a.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),We(()=>i.value,c=>{r.value.username&&c&&n.push("/")}),(c,l)=>{const f=oe("router-link"),d=oe("i18n-t");return i.value&&!r.value.username?(A(),v("div",P6e,[$(Df),E("p",L6e,[E("span",null,T(c.$t("error.SOMETHING_WRONG"))+".",1),E("span",null,[$(d,{keypath:"user.PROFILE.ERRORED_EMAIL_UPDATE"},{default:ue(()=>[$(f,{to:"/login"},{default:ue(()=>[j(T(c.$t("user.LOG_IN")),1)]),_:1})]),_:1})])])])):x("",!0)}}}),k6e=ae(w6e,[["__scopeId","data-v-b8fbd32f"]]),$6e={id:"loginOrRegister",class:"view"},U6e={class:"container"},M6e={class:"container-sub"},x6e={class:"container-sub"},F6e=Z({__name:"LoginOrRegister",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(a,r)=>(A(),v("div",$6e,[E("div",U6e,[E("div",M6e,[$(SA)]),E("div",x6e,[$(pE,{action:h(n)},null,8,["action"])])])]))}}),lh=ae(F6e,[["__scopeId","data-v-84d61340"]]),z6e={name:"Password"},W6e={version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512.001 512.001",style:{"enable-background":"new 0 0 512.001 512.001"},"xml:space":"preserve"},G6e=Zn(`(ut("data-v-13388f00"),e=e(),lt(),e),Jwe={id:"user-form"},e6e={key:2,class:"info-box success-message"},t6e={class:"form-items"},n6e=["disabled","placeholder"],a6e={key:1,class:"form-info"},r6e=LA(()=>E("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),s6e=["disabled","placeholder"],i6e={key:3,class:"form-info"},o6e=LA(()=>E("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),u6e={key:5,for:"accepted_policy",class:"accepted_policy"},l6e=["disabled"],c6e=["disabled"],d6e={key:3},f6e={key:0},E6e={key:4},p6e={class:"account"},m6e={key:5},h6e=Z({__name:"UserAuthForm",props:{action:{},token:{default:""}},setup(e){const t=e,n=qt(),a=Me(),{action:r}=_e(t),s=Gt({username:"",email:"",password:"",accepted_policy:!1}),i=k(()=>I(t.action)),o=k(()=>a.getters[H.GETTERS.ERROR_MESSAGES]),u=k(()=>a.getters[K.GETTERS.IS_REGISTRATION_SUCCESS]),c=k(()=>a.getters[K.GETTERS.IS_SUCCESS]),l=k(()=>a.getters[H.GETTERS.APP_CONFIG]),f=k(()=>a.getters[H.GETTERS.LANGUAGE]),d=k(()=>t.action==="register"&&!l.value.is_registration_enabled),p=k(()=>["reset-request","account-confirmation-resend"].includes(t.action)&&!l.value.is_email_sending_enabled),m=ce(!1);function I(O){switch(O){case"reset-request":case"reset":return"buttons.SUBMIT";default:return`buttons.${t.action.toUpperCase()}`}}function b(){m.value=!0}function R(O){s.password=O}function N(O){switch(O){case"reset":return t.token?a.dispatch(K.ACTIONS.RESET_USER_PASSWORD,{password:s.password,token:t.token}):a.commit(H.MUTATIONS.SET_ERROR_MESSAGES,"user.INVALID_TOKEN");case"reset-request":return a.dispatch(K.ACTIONS.SEND_PASSWORD_RESET_REQUEST,{email:s.email});case"account-confirmation-resend":return a.dispatch(K.ACTIONS.RESEND_ACCOUNT_CONFIRMATION_EMAIL,{email:s.email});default:s.language=f.value,a.dispatch(K.ACTIONS.LOGIN_OR_REGISTER,{actionType:O,formData:s,redirectUrl:n.query.from})}}function S(){s.username="",s.email="",s.password="",s.accepted_policy=!1}return Nt(()=>a.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),We(()=>n.path,async()=>{a.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),a.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!1),a.commit(K.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS,!1),m.value=!1,S()}),(O,C)=>{const P=oe("AlertMessage"),M=oe("router-link"),L=oe("i18n-t"),W=oe("ErrorMessage");return A(),v("div",{id:"user-auth-form",class:Se(`${["reset","reset-request"].includes(h(r))?h(r):"user-form"}`)},[E("div",Jwe,[E("div",{class:Se(["form-box",{disabled:d.value}])},[d.value?(A(),te(P,{key:0,message:"user.REGISTER_DISABLED"})):x("",!0),p.value?(A(),te(P,{key:1,message:"admin.EMAIL_SENDING_DISABLED"})):x("",!0),c.value||u.value?(A(),v("div",e6e,T(O.$t(`user.PROFILE.SUCCESSFUL_${u.value?`REGISTRATION${l.value.is_email_sending_enabled?"_WITH_EMAIL":""}`:"UPDATE"}`)),1)):x("",!0),E("form",{class:Se({errors:m.value}),onSubmit:C[3]||(C[3]=Je(B=>N(h(r)),["prevent"]))},[E("div",t6e,[h(r)==="register"?qe((A(),v("input",{key:0,id:"username",disabled:d.value,required:"",pattern:"[a-zA-Z0-9_]+",minlength:"3",maxlength:"30",onInvalid:b,"onUpdate:modelValue":C[0]||(C[0]=B=>s.username=B),placeholder:O.$t("user.USERNAME")},null,40,n6e)),[[rt,s.username]]):x("",!0),h(r)==="register"?(A(),v("div",a6e,[r6e,j(" "+T(O.$t("user.USERNAME_INFO")),1)])):x("",!0),h(r)!=="reset"?qe((A(),v("input",{key:2,id:"email",disabled:d.value||p.value,required:"",onInvalid:b,type:"email","onUpdate:modelValue":C[1]||(C[1]=B=>s.email=B),placeholder:O.$t("user.EMAIL")},null,40,s6e)),[[rt,s.email]]):x("",!0),["reset-request","register","account-confirmation-resend"].includes(h(r))?(A(),v("div",i6e,[o6e,j(" "+T(O.$t("user.EMAIL_INFO")),1)])):x("",!0),["account-confirmation-resend","reset-request"].includes(h(r))?x("",!0):(A(),te($d,{key:4,disabled:d.value,required:!0,placeholder:h(r)==="reset"?O.$t("user.ENTER_PASSWORD"):O.$t("user.PASSWORD"),password:s.password,checkStrength:["reset","register"].includes(h(r)),onUpdatePassword:R,onPasswordError:b},null,8,["disabled","placeholder","password","checkStrength"])),h(r)==="register"?(A(),v("label",u6e,[qe(E("input",{type:"checkbox",id:"accepted_policy",disabled:d.value,required:"",onInvalid:b,"onUpdate:modelValue":C[2]||(C[2]=B=>s.accepted_policy=B)},null,40,l6e),[[af,s.accepted_policy]]),E("span",null,[$(L,{keypath:"user.READ_AND_ACCEPT_PRIVACY_POLICY"},{default:ue(()=>[$(M,{to:"/privacy-policy",target:"_blank"},{default:ue(()=>[j(T(O.$t("privacy_policy.TITLE")),1)]),_:1})]),_:1})])])):x("",!0)]),E("button",{type:"submit",disabled:d.value||p.value},T(O.$t(i.value)),9,c6e)],34),h(r)==="login"?(A(),v("div",d6e,[$(M,{class:"links",to:"/register"},{default:ue(()=>[j(T(O.$t("user.REGISTER")),1)]),_:1}),l.value.is_email_sending_enabled?(A(),v("span",f6e,"-")):x("",!0),l.value.is_email_sending_enabled?(A(),te(M,{key:1,class:"links",to:"/password-reset/request"},{default:ue(()=>[j(T(O.$t("user.PASSWORD_FORGOTTEN")),1)]),_:1})):x("",!0)])):x("",!0),h(r)==="register"?(A(),v("div",E6e,[E("span",p6e,T(O.$t("user.ALREADY_HAVE_ACCOUNT")),1),$(M,{class:"links",to:"/login"},{default:ue(()=>[j(T(O.$t("user.LOGIN")),1)]),_:1})])):x("",!0),["login","register"].includes(h(r))&&l.value.is_email_sending_enabled?(A(),v("div",m6e,[$(M,{class:"links",to:"/account-confirmation/resend"},{default:ue(()=>[j(T(O.$t("user.ACCOUNT_CONFIRMATION_NOT_RECEIVED")),1)]),_:1})])):x("",!0),o.value?(A(),te(W,{key:6,message:o.value},null,8,["message"])):x("",!0)],2)])],2)}}}),pE=ae(h6e,[["__scopeId","data-v-13388f00"]]),_6e={id:"account-confirmation-email",class:"center-card with-margin"},T6e={key:0,class:"email-sent"},g6e={class:"email-sent-message"},A6e={key:1},S6e=Z({__name:"AccountConfirmationEmail",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(a,r)=>{const s=oe("Card");return A(),v("div",_6e,[h(n)==="email-sent"?(A(),v("div",T6e,[$(PA),E("div",g6e,T(a.$t("user.ACCOUNT_CONFIRMATION_SENT")),1)])):(A(),v("div",A6e,[$(s,null,{title:ue(()=>[j(T(a.$t("user.RESENT_ACCOUNT_CONFIRMATION")),1)]),content:ue(()=>[$(pE,{action:h(n)},null,8,["action"])]),_:1})]))])}}}),O6e=ae(S6e,[["__scopeId","data-v-b0299010"]]),I6e={id:"account-confirmation",class:"view"},R6e={class:"container"},b6e=Z({__name:"AccountConfirmationResendView",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(a,r)=>(A(),v("div",I6e,[E("div",R6e,[$(O6e,{action:h(n)},null,8,["action"])])]))}}),uh=ae(b6e,[["__scopeId","data-v-9a9c1644"]]),N6e={key:0,id:"account-confirmation",class:"center-card with-margin"},v6e={class:"error-message"},C6e=Z({__name:"AccountConfirmationView",setup(e){const t=qt(),n=Ya(),a=Me(),r=k(()=>a.getters[H.GETTERS.ERROR_MESSAGES]),s=k(()=>t.query.token);Ct(()=>i());function i(){s.value?a.dispatch(K.ACTIONS.CONFIRM_ACCOUNT,{token:s.value}):n.push("/")}return Nt(()=>a.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),(o,u)=>{const c=oe("router-link");return r.value?(A(),v("div",N6e,[$(Df),E("p",v6e,[E("span",null,T(o.$t("error.SOMETHING_WRONG"))+".",1),$(c,{class:"links",to:"/account-confirmation/resend"},{default:ue(()=>[j(T(o.$t("buttons.ACCOUNT-CONFIRMATION-RESEND"))+"? ",1)]),_:1})])])):x("",!0)}}}),y6e=ae(C6e,[["__scopeId","data-v-a0fa0b62"]]),D6e={key:0,id:"email-update",class:"center-card with-margin"},P6e={class:"error-message"},L6e=Z({__name:"EmailUpdateView",setup(e){const t=qt(),n=Ya(),a=Me(),r=k(()=>a.getters[K.GETTERS.AUTH_USER_PROFILE]),s=k(()=>a.getters[K.GETTERS.IS_AUTHENTICATED]),i=k(()=>a.getters[H.GETTERS.ERROR_MESSAGES]),o=k(()=>t.query.token);Ct(()=>u());function u(){o.value?a.dispatch(K.ACTIONS.CONFIRM_EMAIL,{token:o.value,refreshUser:s.value}):n.push("/")}return Nt(()=>a.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),We(()=>i.value,c=>{r.value.username&&c&&n.push("/")}),(c,l)=>{const f=oe("router-link"),d=oe("i18n-t");return i.value&&!r.value.username?(A(),v("div",D6e,[$(Df),E("p",P6e,[E("span",null,T(c.$t("error.SOMETHING_WRONG"))+".",1),E("span",null,[$(d,{keypath:"user.PROFILE.ERRORED_EMAIL_UPDATE"},{default:ue(()=>[$(f,{to:"/login"},{default:ue(()=>[j(T(c.$t("user.LOG_IN")),1)]),_:1})]),_:1})])])])):x("",!0)}}}),w6e=ae(L6e,[["__scopeId","data-v-b8fbd32f"]]),k6e={id:"loginOrRegister",class:"view"},$6e={class:"container"},U6e={class:"container-sub"},M6e={class:"container-sub"},x6e=Z({__name:"LoginOrRegister",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(a,r)=>(A(),v("div",k6e,[E("div",$6e,[E("div",U6e,[$(SA)]),E("div",M6e,[$(pE,{action:h(n)},null,8,["action"])])])]))}}),lh=ae(x6e,[["__scopeId","data-v-84d61340"]]),F6e={name:"Password"},z6e={version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512.001 512.001",style:{"enable-background":"new 0 0 512.001 512.001"},"xml:space":"preserve"},W6e=Zn(``,7),B6e=[G6e];function H6e(e,t,n,a,r,s){return A(),v("svg",W6e,B6e)}const V6e=ae(z6e,[["render",H6e]]),j6e={id:"password-action-done",class:"center-card with-margin"},K6e={class:"password-message"},Y6e={key:0},q6e=Z({__name:"PasswordActionDone",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(a,r)=>{const s=oe("router-link"),i=oe("i18n-t");return A(),v("div",j6e,[h(n)==="request-sent"?(A(),te(PA,{key:0})):(A(),te(V6e,{key:1})),E("div",K6e,[h(n)==="request-sent"?(A(),v("span",Y6e,T(a.$t("user.PASSWORD_SENT_EMAIL_TEXT")),1)):(A(),te(i,{key:1,keypath:"user.PASSWORD_UPDATED"},{default:ue(()=>[$(s,{to:"/login"},{default:ue(()=>[j(T(a.$t("common.HERE")),1)]),_:1})]),_:1}))])])}}}),X6e=ae(q6e,[["__scopeId","data-v-ee1004fc"]]),Z6e={id:"password-reset-request",class:"center-card with-margin"},Q6e=Z({__name:"PasswordResetForm",props:{action:{},token:{default:""}},setup(e){const t=e,{action:n,token:a}=_e(t);return(r,s)=>{const i=oe("Card");return A(),v("div",Z6e,[$(i,null,{title:ue(()=>[j(T(r.$t("user.RESET_PASSWORD")),1)]),content:ue(()=>[$(pE,{action:h(n),token:h(a)},null,8,["action","token"])]),_:1})])}}}),J6e=ae(Q6e,[["__scopeId","data-v-97f01ba1"]]),eke={id:"password-reset",class:"view"},tke={class:"container"},nke=Z({__name:"PasswordResetView",props:{action:{}},setup(e){const t=e,n=qt(),a=Ya(),{action:r}=_e(t),s=k(()=>n.query.token);return Ct(()=>{t.action==="reset"&&!s.value&&a.push("/")}),(i,o)=>(A(),v("div",eke,[E("div",tke,[h(r).startsWith("reset")?(A(),te(J6e,{key:0,action:h(r),token:s.value},null,8,["action","token"])):(A(),te(X6e,{key:1,action:h(r)},null,8,["action"]))])]))}}),lo=ae(nke,[["__scopeId","data-v-5cbe9029"]]),ake=e=>(ut("data-v-af92ad3a"),e=e(),lt(),e),rke={key:0,id:"profile",class:"view"},ske=ake(()=>E("div",{id:"bottom"},null,-1)),ike=Z({__name:"ProfileView",setup(e){const t=Me(),n=k(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]);return(a,r)=>{const s=oe("router-view");return n.value.username?(A(),v("div",rke,[$(s,{user:n.value},null,8,["user"]),ske])):x("",!0)}}}),oke=ae(ike,[["__scopeId","data-v-af92ad3a"]]),uke={key:0,id:"user",class:"view"},lke={class:"box"},cke=Z({__name:"UserView",props:{fromAdmin:{type:Boolean}},setup(e){const t=e,{fromAdmin:n}=_e(t),a=qt(),r=Me(),s=k(()=>r.getters[Le.GETTERS.USER]);return Ct(()=>{a.params.username&&typeof a.params.username=="string"&&r.dispatch(Le.ACTIONS.GET_USER,a.params.username)}),hi(()=>{r.dispatch(Le.ACTIONS.EMPTY_USER)}),(i,o)=>s.value.username?(A(),v("div",uke,[$(aA,{user:s.value},null,8,["user"]),E("div",lke,[$(sA,{user:s.value,"from-admin":h(n)},null,8,["user","from-admin"])])])):x("",!0)}}),ch=ae(cke,[["__scopeId","data-v-1b7a0b4f"]]),dke={id:"workout-form"},fke={class:"form-items"},Eke={key:0,class:"form-item-radio"},pke=["checked","disabled"],mke={for:"withGpx"},hke=["checked","disabled"],_ke={for:"withoutGpx"},Tke={class:"form-item"},gke=["disabled"],Ake=["value"],Ske={key:1,class:"form-item"},Oke={for:"gpxFile"},Ike=["disabled"],Rke={class:"files-help info-box"},bke={key:2,class:"form-item"},Nke={for:"title"},vke=["required","disabled"],Cke={key:3},yke={class:"workout-date-duration"},Dke={class:"form-item"},Pke={class:"workout-date-time"},Lke=["disabled"],wke=["disabled"],kke={class:"form-item"},$ke=["disabled"],Uke=["disabled"],Mke=["disabled"],xke={class:"workout-data"},Fke={class:"form-item"},zke=["disabled"],Wke={class:"form-item"},Gke=["disabled"],Bke={class:"form-item"},Hke=["disabled"],Vke={class:"form-item"},jke={key:1},Kke={key:2,class:"form-buttons"},Yke=["disabled"],qke=Z({__name:"WorkoutEdition",props:{authUser:{},sports:{},isCreation:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},workout:{default:()=>({})}},setup(e){const t=e,{t:n}=Yt(),a=Me(),r=Ya(),{authUser:s,workout:i,isCreation:o,loading:u}=_e(t),c=k(()=>Xa(t.sports,n,"is_active_for_user",i.value.id?[i.value.sport_id]:[])),l=k(()=>a.getters[H.GETTERS.APP_CONFIG]),f=l.value.max_single_file_size?qo(l.value.max_single_file_size):"",d=l.value.gpx_limit_import,p=l.value.max_zip_file_size?qo(l.value.max_zip_file_size):"",m=k(()=>a.getters[H.GETTERS.ERROR_MESSAGES]),I=Gt({sport_id:"",title:"",notes:"",workoutDate:"",workoutTime:"",workoutDurationHour:"",workoutDurationMinutes:"",workoutDurationSeconds:"",workoutDistance:"",workoutAscent:"",workoutDescent:""}),b=ce(i.value.id?i.value.with_gpx:o.value);let R=null;const N=ce(!1),S=ce([]);_t(()=>{let D;t.workout.id?(M(t.workout),D=document.getElementById("sport")):D=document.getElementById("withGpx"),D&&D.focus()});function O(D){I.notes=D}function C(){b.value=!b.value,N.value=!1}function P(D){D.target.files&&(R=D.target.files[0])}function M(D){if(I.sport_id=`${D.sport_id}`,I.title=D.title,I.notes=D.notes,!D.with_gpx){const G=tA(Ol(D.workout_date,t.authUser.timezone),"yyyy-MM-dd"),V=D.duration.split(":");I.workoutDistance=`${s.value.imperial_units?on(D.distance,"km","mi",3):parseFloat(D.distance.toFixed(3))}`,I.workoutDate=G.workout_date,I.workoutTime=G.workout_time,I.workoutDurationHour=V[0],I.workoutDurationMinutes=V[1],I.workoutDurationSeconds=V[2],I.workoutAscent=D.ascent===null?"":`${s.value.imperial_units?on(D.ascent,"m","ft",2):parseFloat(D.ascent.toFixed(2))}`,I.workoutDescent=D.descent===null?"":`${s.value.imperial_units?on(D.descent,"m","ft",2):parseFloat(D.descent.toFixed(2))}`}}function L(){return S.value.includes("workouts.INVALID_DISTANCE")}function W(){return S.value.includes("workouts.INVALID_DURATION")}function B(){return S.value.includes("workouts.INVALID_ASCENT_OR_DESCENT")}function w(D){S.value=[],D.title=I.title,D.duration=+I.workoutDurationHour*3600+ +I.workoutDurationMinutes*60+ +I.workoutDurationSeconds,D.duration<=0&&S.value.push("workouts.INVALID_DURATION"),D.distance=s.value.imperial_units?on(+I.workoutDistance,"mi","km",3):+I.workoutDistance,D.distance<=0&&S.value.push("workouts.INVALID_DISTANCE"),D.workout_date=`${I.workoutDate} ${I.workoutTime}`,D.ascent=I.workoutAscent===""?null:s.value.imperial_units?on(+I.workoutAscent,"ft","m",3):+I.workoutAscent,D.descent=I.workoutDescent===""?null:s.value.imperial_units?on(+I.workoutDescent,"ft","m",3):+I.workoutDescent,(D.ascent!==null&&D.descent===null||D.ascent===null&&D.descent!==null)&&S.value.push("workouts.INVALID_ASCENT_OR_DESCENT")}function X(){const D={sport_id:+I.sport_id,notes:I.notes};if(t.workout.id)t.workout.with_gpx?D.title=I.title:w(D),S.value.length>0?a.commit(H.MUTATIONS.SET_ERROR_MESSAGES,S.value):a.dispatch(Ae.ACTIONS.EDIT_WORKOUT,{workoutId:t.workout.id,data:D});else if(b.value){if(!R){a.commit(H.MUTATIONS.SET_ERROR_MESSAGES,"workouts.NO_FILE_PROVIDED");return}D.file=R,a.dispatch(Ae.ACTIONS.ADD_WORKOUT,D)}else w(D),S.value.length>0?a.commit(H.MUTATIONS.SET_ERROR_MESSAGES,S.value):a.dispatch(Ae.ACTIONS.ADD_WORKOUT_WITHOUT_GPX,D)}function J(){t.workout.id?r.push({name:"Workout",params:{workoutId:t.workout.id}}):r.go(-1)}function ne(){N.value=!0}return Nt(()=>a.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),We(()=>t.workout,async(D,G)=>{D!==G&&D&&D.id&&M(D)}),(D,G)=>{const V=oe("CustomTextArea"),re=oe("ErrorMessage"),Be=oe("Loader"),$e=oe("Card");return A(),v("div",{id:"workout-edition",class:Se(["center-card with-margin",{"center-form":h(i)&&h(i).with_gpx}])},[$($e,null,{title:ue(()=>[j(T(D.$t(`workouts.${h(o)?"ADD":"EDIT"}_WORKOUT`)),1)]),content:ue(()=>[E("div",dke,[E("form",{class:Se({errors:N.value}),onSubmit:Je(X,["prevent"])},[E("div",fke,[h(o)?(A(),v("div",Eke,[E("div",null,[E("input",{id:"withGpx",type:"radio",checked:b.value,disabled:h(u),onClick:C},null,8,pke),E("label",mke,T(D.$t("workouts.WITH_GPX")),1)]),E("div",null,[E("input",{id:"withoutGpx",type:"radio",checked:!b.value,disabled:h(u),onClick:C},null,8,hke),E("label",_ke,T(D.$t("workouts.WITHOUT_GPX")),1)])])):x("",!0),E("div",Tke,[E("label",null,T(D.$t("workouts.SPORT",1))+"*: ",1),qe(E("select",{id:"sport",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[0]||(G[0]=Oe=>I.sport_id=Oe)},[(A(!0),v(be,null,Ge(c.value,Oe=>(A(),v("option",{value:Oe.id,key:Oe.id},T(Oe.translatedLabel),9,Ake))),128))],40,gke),[[$s,I.sport_id]])]),h(o)&&b.value?(A(),v("div",Ske,[E("label",Oke,T(D.$t("workouts.GPX_FILE"))+" "+T(D.$t("workouts.ZIP_ARCHIVE_DESCRIPTION"))+"*: ",1),E("input",{id:"gpxFile",name:"gpxFile",type:"file",accept:".gpx, .zip",disabled:h(u),required:"",onInvalid:ne,onInput:P},null,40,Ike),E("div",Rke,[E("div",null,[E("strong",null,T(D.$t("workouts.GPX_FILE"))+":",1),E("ul",null,[E("li",null,T(D.$t("workouts.MAX_SIZE"))+": "+T(h(f)),1)])]),E("div",null,[E("strong",null,T(D.$t("workouts.ZIP_ARCHIVE"))+":",1),E("ul",null,[E("li",null,T(D.$t("workouts.NO_FOLDER")),1),E("li",null,T(D.$t("workouts.MAX_FILES"))+": "+T(h(d)),1),E("li",null,T(D.$t("workouts.MAX_SIZE"))+": "+T(h(p)),1)])])])])):(A(),v("div",bke,[E("label",Nke,T(D.$t("workouts.TITLE"))+": ",1),qe(E("input",{id:"title",name:"title",type:"text",required:!h(o),onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[1]||(G[1]=Oe=>I.title=Oe)},null,40,vke),[[rt,I.title]])])),b.value?x("",!0):(A(),v("div",Cke,[E("div",yke,[E("div",Dke,[E("label",null,T(D.$t("workouts.WORKOUT_DATE"))+"*:",1),E("div",Pke,[qe(E("input",{id:"workout-date",name:"workout-date",type:"date",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[2]||(G[2]=Oe=>I.workoutDate=Oe)},null,40,Lke),[[rt,I.workoutDate]]),qe(E("input",{id:"workout-time",name:"workout-time",class:"workout-time",type:"time",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[3]||(G[3]=Oe=>I.workoutTime=Oe)},null,40,wke),[[rt,I.workoutTime]])])]),E("div",kke,[E("label",null,T(D.$t("workouts.DURATION"))+"*:",1),E("div",null,[qe(E("input",{id:"workout-duration-hour",name:"workout-duration-hour",class:Se(["workout-duration",{errored:W()}]),type:"text",placeholder:"HH",minlength:"1",maxlength:"2",pattern:"^([0-1]?[0-9]|2[0-3])$",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[4]||(G[4]=Oe=>I.workoutDurationHour=Oe)},null,42,$ke),[[rt,I.workoutDurationHour]]),j(" : "),qe(E("input",{id:"workout-duration-minutes",name:"workout-duration-minutes",class:Se(["workout-duration",{errored:W()}]),type:"text",pattern:"^([0-5][0-9])$",minlength:"2",maxlength:"2",placeholder:"MM",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[5]||(G[5]=Oe=>I.workoutDurationMinutes=Oe)},null,42,Uke),[[rt,I.workoutDurationMinutes]]),j(" : "),qe(E("input",{id:"workout-duration-seconds",name:"workout-duration-seconds",class:Se(["workout-duration",{errored:W()}]),type:"text",pattern:"^([0-5][0-9])$",minlength:"2",maxlength:"2",placeholder:"SS",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[6]||(G[6]=Oe=>I.workoutDurationSeconds=Oe)},null,42,Mke),[[rt,I.workoutDurationSeconds]])])])]),E("div",xke,[E("div",Fke,[E("label",null,T(D.$t("workouts.DISTANCE"))+" ("+T(h(s).imperial_units?"mi":"km")+")*: ",1),qe(E("input",{class:Se({errored:L()}),name:"workout-distance",type:"number",min:"0",step:"0.001",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[7]||(G[7]=Oe=>I.workoutDistance=Oe)},null,42,zke),[[rt,I.workoutDistance]])]),E("div",Wke,[E("label",null,T(D.$t("workouts.ASCENT"))+" ("+T(h(s).imperial_units?"ft":"m")+"): ",1),qe(E("input",{class:Se({errored:B()}),name:"workout-ascent",type:"number",min:"0",step:"0.01",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[8]||(G[8]=Oe=>I.workoutAscent=Oe)},null,42,Gke),[[rt,I.workoutAscent]])]),E("div",Bke,[E("label",null,T(D.$t("workouts.DESCENT"))+" ("+T(h(s).imperial_units?"ft":"m")+"): ",1),qe(E("input",{class:Se({errored:B()}),name:"workout-descent",type:"number",min:"0",step:"0.01",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[9]||(G[9]=Oe=>I.workoutDescent=Oe)},null,42,Hke),[[rt,I.workoutDescent]])])])])),E("div",Vke,[E("label",null,T(D.$t("workouts.NOTES"))+": ",1),$(V,{name:"notes",input:I.notes,disabled:h(u),onUpdateValue:O},null,8,["input","disabled"])])]),m.value?(A(),te(re,{key:0,message:m.value},null,8,["message"])):x("",!0),h(u)?(A(),v("div",jke,[$(Be)])):(A(),v("div",Kke,[E("button",{class:"confirm",type:"submit",disabled:h(u)},T(D.$t("buttons.SUBMIT")),9,Yke),E("button",{class:"cancel",onClick:Je(J,["prevent"])},T(D.$t("buttons.CANCEL")),1)]))],34)])]),_:1})],2)}}}),wA=ae(qke,[["__scopeId","data-v-4c5a9cd1"]]),Xke={id:"add-workout",class:"view"},Zke={class:"container"},Qke=Z({__name:"AddWorkout",setup(e){const t=Me(),n=k(()=>t.getters[Mt.GETTERS.SPORTS]),a=k(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),r=k(()=>t.getters[Ae.GETTERS.WORKOUT_DATA]);return(s,i)=>(A(),v("div",Xke,[E("div",Zke,[$(wA,{authUser:a.value,sports:n.value,isCreation:!0,loading:r.value.loading},null,8,["authUser","sports","loading"])])]))}}),Jke={id:"edit-workout",class:"view"},e$e={class:"container"},t$e=Z({__name:"EditWorkout",setup(e){const t=qt(),n=Me(),a=k(()=>n.getters[K.GETTERS.AUTH_USER_PROFILE]),r=k(()=>n.getters[Mt.GETTERS.SPORTS]),s=k(()=>n.getters[Ae.GETTERS.WORKOUT_DATA]);return Ct(()=>{n.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,{workoutId:t.params.workoutId})}),We(()=>t.params.workoutId,async i=>{i||n.commit(Ae.MUTATIONS.EMPTY_WORKOUT)}),(i,o)=>(A(),v("div",Jke,[E("div",e$e,[s.value.workout.id?(A(),te(wA,{key:0,authUser:a.value,sports:r.value,workout:s.value.workout,loading:s.value.loading},null,8,["authUser","sports","workout","loading"])):x("",!0)])]))}}),Es=e=>(ut("data-v-e1628a52"),e=e(),lt(),e),n$e={id:"workout-card-title"},a$e=["disabled","title"],r$e=Es(()=>E("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),s$e=[r$e],i$e={class:"workout-card-title"},o$e={class:"workout-title-date"},u$e={key:0,class:"workout-title"},l$e=["aria-label"],c$e=Es(()=>E("i",{class:"fa fa-edit","aria-hidden":"true"},null,-1)),d$e=[c$e],f$e=["aria-label"],E$e=Es(()=>E("i",{class:"fa fa-download","aria-hidden":"true"},null,-1)),p$e=[E$e],m$e=["aria-label"],h$e=Es(()=>E("i",{class:"fa fa-trash","aria-hidden":"true"},null,-1)),_$e=[h$e],T$e={key:1,class:"workout-title"},g$e={class:"workout-segment"},A$e=Es(()=>E("i",{class:"fa fa-map-marker","aria-hidden":"true"},null,-1)),S$e={class:"workout-date"},O$e={class:"workout-link"},I$e=["disabled","title"],R$e=Es(()=>E("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),b$e=[R$e],N$e=Z({__name:"WorkoutCardTitle",props:{sport:{},workoutObject:{}},emits:["displayModal"],setup(e,{emit:t}){const n=e,a=t,{sport:r,workoutObject:s}=_e(n);async function i(u){await je.get(`workouts/${u}/gpx/download`,{responseType:"blob"}).then(c=>{const l=window.URL.createObjectURL(new Blob([c.data],{type:"application/gpx+xml"})),f=document.createElement("a");f.href=l,f.setAttribute("download",`${u}.gpx`),document.body.appendChild(f),f.click()})}function o(){a("displayModal",!0)}return(u,c)=>{const l=oe("SportImage"),f=oe("router-link");return A(),v("div",n$e,[E("button",{class:Se(["workout-previous workout-arrow transparent",{inactive:!h(s).previousUrl}]),disabled:!h(s).previousUrl,title:h(s).previousUrl?u.$t(`workouts.PREVIOUS_${h(s).type}`):u.$t(`workouts.NO_PREVIOUS_${h(s).type}`),onClick:c[0]||(c[0]=d=>h(s).previousUrl?u.$router.push(h(s).previousUrl):null)},s$e,10,a$e),E("div",i$e,[$(l,{"sport-label":h(r).label,color:h(r).color},null,8,["sport-label","color"]),E("div",o$e,[h(s).type==="WORKOUT"?(A(),v("div",u$e,[E("span",null,T(h(s).title),1),E("button",{class:"transparent icon-button",onClick:c[1]||(c[1]=d=>u.$router.push({name:"EditWorkout",params:{workoutId:h(s).workoutId}})),"aria-label":u.$t("workouts.EDIT_WORKOUT")},d$e,8,l$e),h(s).with_gpx?(A(),v("button",{key:0,class:"transparent icon-button",onClick:c[2]||(c[2]=Je(d=>i(h(s).workoutId),["prevent"])),"aria-label":u.$t("workouts.DOWNLOAD_WORKOUT")},p$e,8,f$e)):x("",!0),E("button",{id:"delete-workout-button",class:"transparent icon-button",onClick:Je(o,["prevent"]),"aria-label":u.$t("workouts.DELETE_WORKOUT")},_$e,8,m$e)])):h(s).segmentId!==null?(A(),v("div",T$e,[j(T(h(s).title)+" ",1),E("span",g$e,[j(" — "),A$e,j(" "+T(u.$t("workouts.SEGMENT"))+" "+T(h(s).segmentId+1),1)])])):x("",!0),E("div",S$e,[E("time",null,T(h(s).workoutDate)+" - "+T(h(s).workoutTime),1),E("span",O$e,[h(s).type==="SEGMENT"?(A(),te(f,{key:0,to:{name:"Workout",params:{workoutId:h(s).workoutId}}},{default:ue(()=>[j(" > "+T(u.$t("workouts.BACK_TO_WORKOUT")),1)]),_:1},8,["to"])):x("",!0)])])])]),E("button",{class:Se(["workout-next workout-arrow transparent",{inactive:!h(s).nextUrl}]),disabled:!h(s).nextUrl,title:h(s).nextUrl?u.$t(`workouts.NEXT_${h(s).type}`):u.$t(`workouts.NO_NEXT_${h(s).type}`),onClick:c[3]||(c[3]=d=>h(s).nextUrl?u.$router.push(h(s).nextUrl):null)},b$e,10,I$e)])}}}),v$e=ae(N$e,[["__scopeId","data-v-e1628a52"]]),C$e=e=>(ut("data-v-1b247cbe"),e=e(),lt(),e),y$e={key:0,class:"workout-record"},D$e=C$e(()=>E("sup",null,[E("i",{class:"fa fa-trophy","aria-hidden":"true"})],-1)),P$e=[D$e],L$e=Z({__name:"WorkoutRecord",props:{recordType:{},workoutObject:{}},setup(e){const t=e,{recordType:n,workoutObject:a}=_e(t);return(r,s)=>h(a).records&&h(a).records.find(i=>i.record_type===h(n))?(A(),v("span",y$e,P$e)):x("",!0)}}),Cs=ae(L$e,[["__scopeId","data-v-1b247cbe"]]),w$e="/img/weather/temperature.svg",k$e="/img/weather/pour-rain.svg",$$e="/img/weather/breeze.svg",U$e=["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"],M$e=e=>{const t=Math.floor(e/22.5+.5);return U$e[t%16]},x$e={class:"wind"},F$e={class:"wind-bearing"},z$e=["title"],W$e=Z({__name:"WeatherWind",props:{weather:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{useImperialUnits:n,weather:a}=_e(t),{t:r}=Yt();function s(i){return r(`workouts.WEATHER.WIND_DIRECTIONS.${M$e(i)}`)}return(i,o)=>(A(),v("div",x$e,[j(T(h(Vhe)(h(a).wind,h(n)))+" ",1),E("div",F$e,[h(a).windBearing?(A(),v("i",{key:0,class:"fa fa-long-arrow-down",style:Va({transform:`rotate(${h(a).windBearing}deg)`}),"aria-hidden":"true",title:s(h(a).windBearing)},null,12,z$e)):x("",!0)])]))}}),dh=ae(W$e,[["__scopeId","data-v-e1f7f9cc"]]),G$e=e=>(ut("data-v-be2fffb0"),e=e(),lt(),e),B$e={key:0,id:"workout-weather"},H$e={class:"weather-table"},V$e=G$e(()=>E("th",null,null,-1)),j$e={class:"weather-th"},K$e=["src","alt","title"],Y$e={class:"weather-th"},q$e=["src","alt","title"],X$e=["alt","title"],Z$e=["alt","title"],Q$e=["alt","title"],J$e=Z({__name:"WorkoutWeather",props:{workoutObject:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{useImperialUnits:n,workoutObject:a}=_e(t);return(r,s)=>h(a).weatherStart&&h(a).weatherEnd?(A(),v("div",B$e,[E("table",H$e,[E("thead",null,[E("tr",null,[V$e,E("th",null,[E("div",j$e,[j(T(r.$t("workouts.START"))+" ",1),E("img",{class:"weather-img",src:`/img/weather/${h(a).weatherStart.icon}.svg`,alt:r.$t(`workouts.WEATHER.DARK_SKY.${h(a).weatherStart.icon}`),title:r.$t(`workouts.WEATHER.DARK_SKY.${h(a).weatherStart.icon}`)},null,8,K$e)])]),E("th",null,[E("div",Y$e,[j(T(r.$t("workouts.END"))+" ",1),E("img",{class:"weather-img",src:`/img/weather/${h(a).weatherEnd.icon}.svg`,alt:r.$t(`workouts.WEATHER.DARK_SKY.${h(a).weatherEnd.icon}`),title:r.$t(`workouts.WEATHER.DARK_SKY.${h(a).weatherEnd.icon}`)},null,8,q$e)])])])]),E("tbody",null,[E("tr",null,[E("td",null,[E("img",{class:"weather-img weather-img-small",src:w$e,alt:r.$t("workouts.WEATHER.TEMPERATURE"),title:r.$t("workouts.WEATHER.TEMPERATURE")},null,8,X$e)]),E("td",null,T(h(Np)(h(a).weatherStart.temperature,h(n))),1),E("td",null,T(h(Np)(h(a).weatherEnd.temperature,h(n))),1)]),E("tr",null,[E("td",null,[E("img",{class:"weather-img weather-img-small",src:k$e,alt:r.$t("workouts.WEATHER.HUMIDITY"),title:r.$t("workouts.WEATHER.HUMIDITY")},null,8,Z$e)]),E("td",null,T(Number(h(a).weatherStart.humidity*100).toFixed(1))+"% ",1),E("td",null,T(Number(h(a).weatherEnd.humidity*100).toFixed(1))+"% ",1)]),E("tr",null,[E("td",null,[E("img",{class:"weather-img weather-img-small",src:$$e,alt:r.$t("workouts.WEATHER.WIND"),title:r.$t("workouts.WEATHER.WIND")},null,8,Q$e)]),E("td",null,[$(dh,{weather:h(a).weatherStart,useImperialUnits:h(n)},null,8,["weather","useImperialUnits"])]),E("td",null,[$(dh,{weather:h(a).weatherEnd,useImperialUnits:h(n)},null,8,["weather","useImperialUnits"])])])])])])):x("",!0)}}),e8e=ae(J$e,[["__scopeId","data-v-be2fffb0"]]),Sr=e=>(ut("data-v-9341b3e8"),e=e(),lt(),e),t8e={id:"workout-info"},n8e={class:"workout-data"},a8e=Sr(()=>E("i",{class:"fa fa-clock-o","aria-hidden":"true"},null,-1)),r8e={class:"label"},s8e={class:"value"},i8e={key:0},o8e={class:"value"},u8e={class:"value"},l8e={key:0,class:"workout-data"},c8e=Sr(()=>E("i",{class:"fa fa-road","aria-hidden":"true"},null,-1)),d8e={class:"label"},f8e={key:1,class:"workout-data"},E8e=Sr(()=>E("i",{class:"fa fa-tachometer","aria-hidden":"true"},null,-1)),p8e={class:"label"},m8e=Sr(()=>E("br",null,null,-1)),h8e={class:"label"},_8e={key:2,class:"workout-data"},T8e=["alt"],g8e={class:"label"},A8e=Sr(()=>E("br",null,null,-1)),S8e={class:"label"},O8e={key:3,class:"workout-data"},I8e=Sr(()=>E("i",{class:"fa fa-location-arrow","aria-hidden":"true"},null,-1)),R8e={class:"label"},b8e=Sr(()=>E("br",null,null,-1)),N8e={class:"label"},v8e=Z({__name:"WorkoutData",props:{workoutObject:{},useImperialUnits:{type:Boolean},displayHARecord:{type:Boolean}},setup(e){const t=e,{displayHARecord:n,workoutObject:a,useImperialUnits:r}=_e(t),s=k(()=>t.workoutObject.pauses!=="0:00:00"&&t.workoutObject.pauses!==null);return(i,o)=>{const u=oe("Distance");return A(),v("div",t8e,[E("div",n8e,[a8e,E("span",r8e,T(i.$t("workouts.DURATION")),1),j(": "),E("span",s8e,T(h(a).moving),1),$(Cs,{workoutObject:h(a),recordType:"LD"},null,8,["workoutObject"]),s.value?(A(),v("div",i8e,[j(" ("+T(i.$t("workouts.PAUSES"))+": ",1),E("span",o8e,T(h(a).pauses),1),j(" - "+T(i.$t("workouts.TOTAL_DURATION"))+": ",1),E("span",u8e,T(h(a).duration)+")",1)])):x("",!0)]),h(a).distance!==null?(A(),v("div",l8e,[c8e,E("span",d8e,T(i.$t("workouts.DISTANCE")),1),j(": "),$(u,{distance:h(a).distance,digits:3,unitFrom:"km",strong:!0,useImperialUnits:h(r)},null,8,["distance","useImperialUnits"]),$(Cs,{workoutObject:h(a),recordType:"FD"},null,8,["workoutObject"])])):x("",!0),h(a).aveSpeed!==null&&h(a).maxSpeed!==null?(A(),v("div",f8e,[E8e,E("span",p8e,T(i.$t("workouts.AVERAGE_SPEED")),1),j(": "),$(u,{distance:h(a).aveSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:h(r)},null,8,["distance","useImperialUnits"]),$(Cs,{workoutObject:h(a),recordType:"AS"},null,8,["workoutObject"]),m8e,E("span",h8e,T(i.$t("workouts.MAX_SPEED")),1),j(": "),$(u,{distance:h(a).maxSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:h(r)},null,8,["distance","useImperialUnits"]),$(Cs,{workoutObject:h(a),recordType:"MS"},null,8,["workoutObject"])])):x("",!0),h(a).maxAlt!==null&&h(a).minAlt!==null?(A(),v("div",_8e,[E("img",{class:"mountains",src:OA,alt:i.$t("workouts.ELEVATION")},null,8,T8e),E("span",g8e,T(i.$t("workouts.MIN_ALTITUDE")),1),j(": "),$(u,{distance:h(a).minAlt,unitFrom:"m",strong:!0,useImperialUnits:h(r)},null,8,["distance","useImperialUnits"]),A8e,E("span",S8e,T(i.$t("workouts.MAX_ALTITUDE")),1),j(": "),$(u,{distance:h(a).maxAlt,unitFrom:"m",strong:!0,useImperialUnits:h(r)},null,8,["distance","useImperialUnits"])])):x("",!0),h(a).ascent!==null&&h(a).descent!==null?(A(),v("div",O8e,[I8e,E("span",R8e,T(i.$t("workouts.ASCENT")),1),j(": "),$(u,{distance:h(a).ascent,unitFrom:"m",strong:!0,useImperialUnits:h(r)},null,8,["distance","useImperialUnits"]),h(n)?(A(),te(Cs,{key:0,workoutObject:h(a),recordType:"HA"},null,8,["workoutObject"])):x("",!0),b8e,E("span",N8e,T(i.$t("workouts.DESCENT")),1),j(": "),$(u,{distance:h(a).descent,unitFrom:"m",strong:!0,useImperialUnits:h(r)},null,8,["distance","useImperialUnits"])])):x("",!0),$(e8e,{workoutObject:h(a),useImperialUnits:h(r)},null,8,["workoutObject","useImperialUnits"])])}}}),C8e=ae(v8e,[["__scopeId","data-v-9341b3e8"]]);function Wr(e,t){return Array.from(e.getElementsByTagName(t))}function ps(e){return e==null||e.normalize(),e&&e.textContent||""}function dr(e,t,n){const a=e.getElementsByTagName(t),r=a.length?a[0]:null;return r&&n&&n(r),r}function y8e(e,t,n){const a={};if(!e)return a;const r=e.getElementsByTagName(t),s=r.length?r[0]:null;return s&&n?n(s,a):a}function kA(e,t,n){const a=ps(dr(e,t));return a&&n?n(a)||{}:{}}function fh(e,t,n){const a=parseFloat(ps(dr(e,t)));if(!isNaN(a))return a&&n?n(a)||{}:{}}function D8e(e,t,n){const a=parseFloat(ps(dr(e,t)));if(!isNaN(a))return n&&n(a),a}function Ud(e,t){const n={};for(const a of t)kA(e,a,r=>{n[a]=r});return n}function P8e(e){return(e==null?void 0:e.nodeType)===1}function $A(e){return y8e(e,"line",t=>Object.assign({},kA(t,"color",a=>({stroke:`#${a}`})),fh(t,"opacity",a=>({"stroke-opacity":a})),fh(t,"width",a=>({"stroke-width":a*96/25.4}))))}function UA(e){let t=[];if(e===null)return t;for(const n of Array.from(e.childNodes)){if(!P8e(n))continue;const a=L8e(n.nodeName);if(a==="gpxtpx:TrackPointExtension")t=t.concat(UA(n));else{const r=ps(n);t.push([a,w8e(r)])}}return t}function L8e(e){return["heart","gpxtpx:hr","hr"].includes(e)?"heart":e}function w8e(e){const t=parseFloat(e);return isNaN(t)?e:t}function MA(e){const t=[parseFloat(e.getAttribute("lon")||""),parseFloat(e.getAttribute("lat")||"")];if(isNaN(t[0])||isNaN(t[1]))return null;D8e(e,"ele",a=>{t.push(a)});const n=dr(e,"time");return{coordinates:t,time:n?ps(n):null,extendedValues:UA(dr(e,"extensions"))}}function mE(e){var r;const t=Ud(e,["name","cmt","desc","type","time","keywords"]),n=Array.from(e.getElementsByTagNameNS("http://www.garmin.com/xmlschemas/GpxExtensions/v3","*"));for(const s of n)((r=s.parentNode)==null?void 0:r.parentNode)===e&&(t[s.tagName.replace(":","_")]=ps(s));const a=Wr(e,"link");return a.length&&(t.links=a.map(s=>Object.assign({href:s.getAttribute("href")},Ud(s,["text","type"])))),t}function xA(e,t){const n=Wr(e,t),a=[],r=[],s={};for(let i=0;i1,i=Object.assign({_gpxType:"trk"},mE(e),$A(dr(e,"extensions")),a.length?{coordinateProperties:{times:s?a:a[0]}}:{});for(const o of r){n.push(o.line),i.coordinateProperties||(i.coordinateProperties={});const u=i.coordinateProperties,c=Object.entries(o.extendedValues);for(let l=0;lnew Array(p.line.length).fill(null))),u[f][l]=d):u[f]=d}}return{type:"Feature",properties:i,geometry:s?{type:"MultiLineString",coordinates:n}:{type:"LineString",coordinates:n[0]}}}function U8e(e){const t=Object.assign(mE(e),Ud(e,["sym"])),n=MA(e);return n?{type:"Feature",properties:t,geometry:{type:"Point",coordinates:n.coordinates}}:null}function*M8e(e){for(const t of Wr(e,"trk")){const n=$8e(t);n&&(yield n)}for(const t of Wr(e,"rte")){const n=k8e(t);n&&(yield n)}for(const t of Wr(e,"wpt")){const n=U8e(t);n&&(yield n)}}function x8e(e){return{type:"FeatureCollection",features:Array.from(M8e(e))}}const Eh=(e,t)=>{for(const n of Object.keys(t))e.on(n,t[n])},FA=e=>{for(const t of Object.keys(e)){const n=e[t];n&&La(n.cancel)&&n.cancel()}},F8e=e=>!e||typeof e.charAt!="function"?e:e.charAt(0).toUpperCase()+e.slice(1),La=e=>typeof e=="function",ha=(e,t,n)=>{for(const a in n){const r="set"+F8e(a);e[r]?We(()=>n[a],(s,i)=>{e[r](s,i)}):t[r]&&We(()=>n[a],s=>{t[r](s)})}},ea=(e,t,n={})=>{const a={...n};for(const r in e){const s=t[r],i=e[r];s&&(s&&s.custom===!0||i!==void 0&&(a[r]=i))}return a},Or=e=>{const t={},n={};for(const a in e)if(a.startsWith("on")&&!a.startsWith("onUpdate")&&a!=="onReady"){const r=a.slice(2).toLocaleLowerCase();t[r]=e[a]}else n[a]=e[a];return{listeners:t,attrs:n}},z8e=async e=>{const t=await Promise.all([Dt(()=>import("./maps-ZyuCPqes.js").then(n=>n.m),__vite__mapDeps([0,1])),Dt(()=>import("./maps-ZyuCPqes.js").then(n=>n.b),__vite__mapDeps([0,1])),Dt(()=>import("./maps-ZyuCPqes.js").then(n=>n.d),__vite__mapDeps([0,1]))]);delete e.Default.prototype._getIconUrl,e.Default.mergeOptions({iconRetinaUrl:t[0].default,iconUrl:t[1].default,shadowUrl:t[2].default})},co=e=>{const t=ce((...a)=>console.warn(`Method ${e} has been invoked without being replaced`)),n=(...a)=>t.value(...a);return n.wrapped=t,tn(e,n),n},fo=(e,t)=>e.wrapped.value=t,Dn=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||globalThis,bn=e=>{const t=It(e);if(t===void 0)throw new Error(`Attempt to inject ${e.description} before it was provided.`);return t},_a=Symbol("useGlobalLeaflet"),Za=Symbol("addLayer"),hE=Symbol("removeLayer"),zA=Symbol("registerControl"),WA=Symbol("registerLayerControl"),GA=Symbol("canSetParentHtml"),BA=Symbol("setParentHtml"),HA=Symbol("setIcon"),W8e=Symbol("bindPopup"),G8e=Symbol("bindTooltip"),B8e=Symbol("unbindPopup"),H8e=Symbol("unbindTooltip"),ki={options:{type:Object,default:()=>({}),custom:!0}},Il=e=>({options:e.options,methods:{}}),ms={...ki,pane:{type:String},attribution:{type:String},name:{type:String,custom:!0},layerType:{type:String,custom:!0},visible:{type:Boolean,custom:!0,default:!0}},_E=(e,t,n)=>{const a=bn(Za),r=bn(hE),{options:s,methods:i}=Il(e),o=ea(e,ms,s),u=()=>a({leafletObject:t.value}),c=()=>r({leafletObject:t.value}),l={...i,setAttribution(f){c(),t.value.options.attribution=f,e.visible&&u()},setName(){c(),e.visible&&u()},setLayerType(){c(),e.visible&&u()},setVisible(f){t.value&&(f?u():c())},bindPopup(f){if(!t.value||!La(t.value.bindPopup)){console.warn("Attempt to bind popup before bindPopup method available on layer.");return}t.value.bindPopup(f)},bindTooltip(f){if(!t.value||!La(t.value.bindTooltip)){console.warn("Attempt to bind tooltip before bindTooltip method available on layer.");return}t.value.bindTooltip(f)},unbindTooltip(){t.value&&(La(t.value.closeTooltip)&&t.value.closeTooltip(),La(t.value.unbindTooltip)&&t.value.unbindTooltip())},unbindPopup(){t.value&&(La(t.value.closePopup)&&t.value.closePopup(),La(t.value.unbindPopup)&&t.value.unbindPopup())},updateVisibleProp(f){n.emit("update:visible",f)}};return tn(W8e,l.bindPopup),tn(G8e,l.bindTooltip),tn(B8e,l.unbindPopup),tn(H8e,l.unbindTooltip),Nt(()=>{l.unbindPopup(),l.unbindTooltip(),c()}),{options:o,methods:l}},TE=(e,t)=>{if(e&&t.default)return Tn("div",{style:{display:"none"}},t.default())},V8e={...ms,interactive:{type:Boolean,default:void 0},bubblingMouseEvents:{type:Boolean,default:void 0}},VA={...V8e,stroke:{type:Boolean,default:void 0},color:{type:String},weight:{type:Number},opacity:{type:Number},lineCap:{type:String},lineJoin:{type:String},dashArray:{type:String},dashOffset:{type:String},fill:{type:Boolean,default:void 0},fillColor:{type:String},fillOpacity:{type:Number},fillRule:{type:String},className:{type:String}},j8e={...VA,radius:{type:Number},latLng:{type:[Object,Array],required:!0,custom:!0}};({...j8e});const hs={...ki,position:{type:String}},jA=(e,t)=>{const{options:n,methods:a}=Il(e),r=ea(e,hs,n),s={...a,setPosition(i){t.value&&t.value.setPosition(i)}};return Nt(()=>{t.value&&t.value.remove()}),{options:r,methods:s}},K8e=e=>e.default?Tn("div",{ref:"root"},e.default()):null,ph=Z({name:"LControl",props:{...hs,disableClickPropagation:{type:Boolean,custom:!0,default:!0},disableScrollPropagation:{type:Boolean,custom:!0,default:!1}},setup(e,t){const n=ce(),a=ce(),r=It(_a),s=bn(zA),{options:i,methods:o}=jA(e,n);return _t(async()=>{const{Control:u,DomEvent:c}=r?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(f=>f.e),__vite__mapDeps([0,1])),l=u.extend({onAdd(){return a.value}});n.value=Xn(new l(i)),ha(o,n.value,e),s({leafletObject:n.value}),e.disableClickPropagation&&a.value&&c.disableClickPropagation(a.value),e.disableScrollPropagation&&a.value&&c.disableScrollPropagation(a.value),nn(()=>t.emit("ready",n.value))}),{root:a,leafletObject:n}},render(){return K8e(this.$slots)}});({...hs});const KA={...hs,collapsed:{type:Boolean,default:void 0},autoZIndex:{type:Boolean,default:void 0},hideSingleBase:{type:Boolean,default:void 0},sortLayers:{type:Boolean,default:void 0},sortFunction:{type:Function}},Y8e=(e,t)=>{const{options:n}=jA(e,t);return{options:ea(e,KA,n),methods:{addLayer(a){a.layerType==="base"?t.value.addBaseLayer(a.leafletObject,a.name):a.layerType==="overlay"&&t.value.addOverlay(a.leafletObject,a.name)},removeLayer(a){t.value.removeLayer(a.leafletObject)}}}},q8e=Z({name:"LControlLayers",props:KA,setup(e,t){const n=ce(),a=It(_a),r=bn(WA),{options:s,methods:i}=Y8e(e,n);return _t(async()=>{const{control:o}=a?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(u=>u.e),__vite__mapDeps([0,1]));n.value=Xn(o.layers(void 0,void 0,s)),ha(i,n.value,e),r({...e,...i,leafletObject:n.value}),nn(()=>t.emit("ready",n.value))}),{leafletObject:n}},render(){return null}});({...hs});({...hs});const Rl={...ms},YA=(e,t,n)=>{const{options:a,methods:r}=_E(e,t,n),s=ea(e,Rl,a),i={...r,addLayer(o){t.value.addLayer(o.leafletObject)},removeLayer(o){t.value.removeLayer(o.leafletObject)}};return tn(Za,i.addLayer),tn(hE,i.removeLayer),{options:s,methods:i}};({...Rl});const qA={...Rl,geojson:{type:[Object,Array],custom:!0},optionsStyle:{type:Function,custom:!0}},X8e=(e,t,n)=>{const{options:a,methods:r}=YA(e,t,n),s=ea(e,qA,a);Object.prototype.hasOwnProperty.call(e,"optionsStyle")&&(s.style=e.optionsStyle);const i={...r,setGeojson(o){t.value.clearLayers(),t.value.addData(o)},setOptionsStyle(o){t.value.setStyle(o)},getGeoJSONData(){return t.value.toGeoJSON()},getBounds(){return t.value.getBounds()}};return{options:s,methods:i}},Z8e=Z({props:qA,setup(e,t){const n=ce(),a=ce(!1),r=It(_a),s=bn(Za),{methods:i,options:o}=X8e(e,n,t);return _t(async()=>{const{geoJSON:u}=r?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(l=>l.e),__vite__mapDeps([0,1]));n.value=Xn(u(e.geojson,o));const{listeners:c}=Or(t.attrs);n.value.on(c),ha(i,n.value,e),s({...e,...i,leafletObject:n.value}),a.value=!0,nn(()=>t.emit("ready",n.value))}),{ready:a,leafletObject:n}},render(){return TE(this.ready,this.$slots)}}),gE={...ms,opacity:{type:Number},zIndex:{type:Number},tileSize:{type:[Number,Array,Object]},noWrap:{type:Boolean,default:void 0},minZoom:{type:Number},maxZoom:{type:Number},className:{type:String}},XA=(e,t,n)=>{const{options:a,methods:r}=_E(e,t,n),s=ea(e,gE,a),i={...r,setTileComponent(){var o;(o=t.value)==null||o.redraw()}};return Nt(()=>{t.value.off()}),{options:s,methods:i}},Q8e=(e,t,n,a)=>e.extend({initialize(r){this.tileComponents={},this.on("tileunload",this._unloadTile),n.setOptions(this,r)},createTile(r){const s=this._tileCoordsToKey(r);this.tileComponents[s]=t.create("div");const i=Tn({setup:a,props:["coords"]},{coords:r});return kI(i,this.tileComponents[s]),this.tileComponents[s]},_unloadTile(r){const s=this._tileCoordsToKey(r.coords);this.tileComponents[s]&&(this.tileComponents[s].innerHTML="",this.tileComponents[s]=void 0)}});({...gE});const mh={iconUrl:{type:String},iconRetinaUrl:{type:String},iconSize:{type:[Object,Array]},iconAnchor:{type:[Object,Array]},popupAnchor:{type:[Object,Array]},tooltipAnchor:{type:[Object,Array]},shadowUrl:{type:String},shadowRetinaUrl:{type:String},shadowSize:{type:[Object,Array]},shadowAnchor:{type:[Object,Array]},bgPos:{type:[Object,Array]},className:{type:String}},J8e=Z({name:"LIcon",props:{...mh,...ki},setup(e,t){const n=ce(),a=It(_a),r=bn(GA),s=bn(BA),i=bn(HA);let o,u,c,l,f;const d=(b,R,N)=>{const S=b&&b.innerHTML;if(!R){N&&f&&r()&&s(S);return}const{listeners:O}=Or(t.attrs);f&&u(f,O);const{options:C}=Il(e),P=ea(e,mh,C);S&&(P.html=S),f=P.html?c(P):l(P),o(f,O),i(f)},p=()=>{nn(()=>d(n.value,!0,!1))},m=()=>{nn(()=>d(n.value,!1,!0))},I={setIconUrl:p,setIconRetinaUrl:p,setIconSize:p,setIconAnchor:p,setPopupAnchor:p,setTooltipAnchor:p,setShadowUrl:p,setShadowRetinaUrl:p,setShadowAnchor:p,setBgPos:p,setClassName:p,setHtml:p};return _t(async()=>{const{DomEvent:b,divIcon:R,icon:N}=a?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(S=>S.e),__vite__mapDeps([0,1]));o=b.on,u=b.off,c=R,l=N,ha(I,{},e),new MutationObserver(m).observe(n.value,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),p()}),{root:n}},render(){const e=this.$slots.default?this.$slots.default():void 0;return Tn("div",{ref:"root"},e)}});({...ms});const e5e=Z({props:Rl,setup(e,t){const n=ce(),a=ce(!1),r=It(_a),s=bn(Za),{methods:i}=YA(e,n,t);return _t(async()=>{const{layerGroup:o}=r?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(c=>c.e),__vite__mapDeps([0,1]));n.value=Xn(o(void 0,e.options));const{listeners:u}=Or(t.attrs);n.value.on(u),ha(i,n.value,e),s({...e,...i,leafletObject:n.value}),a.value=!0,nn(()=>t.emit("ready",n.value))}),{ready:a,leafletObject:n}},render(){return TE(this.ready,this.$slots)}});function ZA(e,t,n){var a,r,s;t===void 0&&(t=50),n===void 0&&(n={});var i=(a=n.isImmediate)!=null&&a,o=(r=n.callback)!=null&&r,u=n.maxWait,c=Date.now(),l=[];function f(){if(u!==void 0){var p=Date.now()-c;if(p+t>=u)return u-p}return t}var d=function(){var p=[].slice.call(arguments),m=this;return new Promise(function(I,b){var R=i&&s===void 0;if(s!==void 0&&clearTimeout(s),s=setTimeout(function(){if(s=void 0,c=Date.now(),!i){var S=e.apply(m,p);o&&o(S),l.forEach(function(O){return(0,O.resolve)(S)}),l=[]}},f()),R){var N=e.apply(m,p);return o&&o(N),I(N)}l.push({resolve:I,reject:b})})};return d.cancel=function(p){s!==void 0&&clearTimeout(s),l.forEach(function(m){return(0,m.reject)(p)}),l=[]},d}const hh={...ki,center:{type:[Object,Array]},bounds:{type:[Array,Object]},maxBounds:{type:[Array,Object]},zoom:{type:Number},minZoom:{type:Number},maxZoom:{type:Number},paddingBottomRight:{type:[Object,Array]},paddingTopLeft:{type:Object},padding:{type:Object},worldCopyJump:{type:Boolean,default:void 0},crs:{type:[String,Object]},maxBoundsViscosity:{type:Number},inertia:{type:Boolean,default:void 0},inertiaDeceleration:{type:Number},inertiaMaxSpeed:{type:Number},easeLinearity:{type:Number},zoomAnimation:{type:Boolean,default:void 0},zoomAnimationThreshold:{type:Number},fadeAnimation:{type:Boolean,default:void 0},markerZoomAnimation:{type:Boolean,default:void 0},noBlockingAnimations:{type:Boolean,default:void 0},useGlobalLeaflet:{type:Boolean,default:!0,custom:!0}},t5e=Z({inheritAttrs:!1,emits:["ready","update:zoom","update:center","update:bounds"],props:hh,setup(e,t){const n=ce(),a=Gt({ready:!1,layersToAdd:[],layersInControl:[]}),{options:r}=Il(e),s=ea(e,hh,r),{listeners:i,attrs:o}=Or(t.attrs),u=co(Za),c=co(hE),l=co(zA),f=co(WA);tn(_a,e.useGlobalLeaflet);const d=k(()=>{const R={};return e.noBlockingAnimations&&(R.animate=!1),R}),p=k(()=>{const R=d.value;return e.padding&&(R.padding=e.padding),e.paddingTopLeft&&(R.paddingTopLeft=e.paddingTopLeft),e.paddingBottomRight&&(R.paddingBottomRight=e.paddingBottomRight),R}),m={moveend:ZA(R=>{a.leafletRef&&(t.emit("update:zoom",a.leafletRef.getZoom()),t.emit("update:center",a.leafletRef.getCenter()),t.emit("update:bounds",a.leafletRef.getBounds()))}),overlayadd(R){const N=a.layersInControl.find(S=>S.name===R.name);N&&N.updateVisibleProp(!0)},overlayremove(R){const N=a.layersInControl.find(S=>S.name===R.name);N&&N.updateVisibleProp(!1)}};_t(async()=>{e.useGlobalLeaflet&&(Dn.L=Dn.L||await Dt(()=>import("./maps-ZyuCPqes.js").then(W=>W.l),__vite__mapDeps([0,1])));const{map:R,CRS:N,Icon:S,latLngBounds:O,latLng:C,stamp:P}=e.useGlobalLeaflet?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(W=>W.e),__vite__mapDeps([0,1]));try{s.beforeMapMount&&await s.beforeMapMount()}catch(W){console.error(`The following error occurred running the provided beforeMapMount hook ${W.message}`)}await z8e(S);const M=typeof s.crs=="string"?N[s.crs]:s.crs;s.crs=M||N.EPSG3857;const L={addLayer(W){W.layerType!==void 0&&(a.layerControl===void 0?a.layersToAdd.push(W):a.layersInControl.find(B=>P(B.leafletObject)===P(W.leafletObject))||(a.layerControl.addLayer(W),a.layersInControl.push(W))),W.visible!==!1&&a.leafletRef.addLayer(W.leafletObject)},removeLayer(W){W.layerType!==void 0&&(a.layerControl===void 0?a.layersToAdd=a.layersToAdd.filter(B=>B.name!==W.name):(a.layerControl.removeLayer(W.leafletObject),a.layersInControl=a.layersInControl.filter(B=>P(B.leafletObject)!==P(W.leafletObject)))),a.leafletRef.removeLayer(W.leafletObject)},registerLayerControl(W){a.layerControl=W,a.layersToAdd.forEach(B=>{a.layerControl.addLayer(B)}),a.layersToAdd=[],l(W)},registerControl(W){a.leafletRef.addControl(W.leafletObject)},setZoom(W){const B=a.leafletRef.getZoom();W!==B&&a.leafletRef.setZoom(W,d.value)},setCrs(W){const B=a.leafletRef.getBounds();a.leafletRef.options.crs=W,a.leafletRef.fitBounds(B,{animate:!1,padding:[0,0]})},fitBounds(W){a.leafletRef.fitBounds(W,p.value)},setBounds(W){if(!W)return;const B=O(W);B.isValid()&&!(a.lastSetBounds||a.leafletRef.getBounds()).equals(B,0)&&(a.lastSetBounds=B,a.leafletRef.fitBounds(B))},setCenter(W){if(W==null)return;const B=C(W),w=a.lastSetCenter||a.leafletRef.getCenter();(w.lat!==B.lat||w.lng!==B.lng)&&(a.lastSetCenter=B,a.leafletRef.panTo(B,d.value))}};fo(u,L.addLayer),fo(c,L.removeLayer),fo(l,L.registerControl),fo(f,L.registerLayerControl),a.leafletRef=Xn(R(n.value,s)),ha(L,a.leafletRef,e),Eh(a.leafletRef,m),Eh(a.leafletRef,i),a.ready=!0,nn(()=>t.emit("ready",a.leafletRef))}),hi(()=>{FA(m),a.leafletRef&&(a.leafletRef.off(),a.leafletRef.remove())});const I=k(()=>a.leafletRef),b=k(()=>a.ready);return{root:n,ready:b,leafletObject:I,attrs:o}},render({attrs:e}){return e.style||(e.style={}),e.style.width||(e.style.width="100%"),e.style.height||(e.style.height="100%"),Tn("div",{...e,ref:"root"},this.ready&&this.$slots.default?this.$slots.default():{})}}),n5e=["Symbol(Comment)","Symbol(Text)"],a5e=["LTooltip","LPopup"],QA={...ms,draggable:{type:Boolean,default:void 0},icon:{type:[Object]},zIndexOffset:{type:Number},latLng:{type:[Object,Array],custom:!0,required:!0}},r5e=(e,t,n)=>{const{options:a,methods:r}=_E(e,t,n),s=ea(e,QA,a),i={...r,setDraggable(o){t.value.dragging&&(o?t.value.dragging.enable():t.value.dragging.disable())},latLngSync(o){n.emit("update:latLng",o.latlng),n.emit("update:lat-lng",o.latlng)},setLatLng(o){if(o!=null&&t.value){const u=t.value.getLatLng();(!u||!u.equals(o))&&t.value.setLatLng(o)}}};return{options:s,methods:i}},s5e=(e,t)=>{const n=t.slots.default&&t.slots.default();return n&&n.length&&n.some(i5e)};function i5e(e){return!(n5e.includes(e.type.toString())||a5e.includes(e.type.name))}const JA=Z({name:"LMarker",props:QA,setup(e,t){const n=ce(),a=ce(!1),r=It(_a),s=bn(Za);tn(GA,()=>{var c;return!!((c=n.value)!=null&&c.getElement())}),tn(BA,c=>{var l,f;const d=La((l=n.value)==null?void 0:l.getElement)&&((f=n.value)==null?void 0:f.getElement());d&&(d.innerHTML=c)}),tn(HA,c=>{var l;return((l=n.value)==null?void 0:l.setIcon)&&n.value.setIcon(c)});const{options:i,methods:o}=r5e(e,n,t),u={moveHandler:ZA(o.latLngSync)};return _t(async()=>{const{marker:c,divIcon:l}=r?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(d=>d.e),__vite__mapDeps([0,1]));s5e(i,t)&&(i.icon=l({className:""})),n.value=Xn(c(e.latLng,i));const{listeners:f}=Or(t.attrs);n.value.on(f),n.value.on("move",u.moveHandler),ha(o,n.value,e),s({...e,...o,leafletObject:n.value}),a.value=!0,nn(()=>t.emit("ready",n.value))}),hi(()=>FA(u)),{ready:a,leafletObject:n}},render(){return TE(this.ready,this.$slots)}}),o5e={...VA,smoothFactor:{type:Number},noClip:{type:Boolean,default:void 0},latLngs:{type:Array,required:!0,custom:!0}},_h={...o5e},eS={...ki,content:{type:String,default:null}};({...eS});({..._h,latLngs:{..._h.latLngs}});const AE={...gE,tms:{type:Boolean,default:void 0},subdomains:{type:[String,Array],validator:e=>typeof e=="string"?!0:Array.isArray(e)?e.every(t=>typeof t=="string"):!1},detectRetina:{type:Boolean,default:void 0},url:{type:String,required:!0,custom:!0}},u5e=(e,t,n)=>{const{options:a,methods:r}=XA(e,t,n),s=ea(e,AE,a),i={...r};return{options:s,methods:i}},l5e=Z({props:AE,setup(e,t){const n=ce(),a=It(_a),r=bn(Za),{options:s,methods:i}=u5e(e,n,t);return _t(async()=>{const{tileLayer:o}=a?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(c=>c.e),__vite__mapDeps([0,1]));n.value=Xn(o(e.url,s));const{listeners:u}=Or(t.attrs);n.value.on(u),ha(i,n.value,e),r({...e,...i,leafletObject:n.value}),nn(()=>t.emit("ready",n.value))}),{leafletObject:n}},render(){return null}});({...eS});({...AE});const Th=Z({__name:"CustomMarker",props:{markerCoordinates:{},isStart:{type:Boolean}},setup(e){const t=e,{isStart:n,markerCoordinates:a}=_e(t);return(r,s)=>h(a).latitude?(A(),te(h(JA),{key:0,"lat-lng":[h(a).latitude,h(a).longitude]},{default:ue(()=>[$(h(J8e),{"icon-url":`/img/workouts/${h(n)?"start":"finish"}.svg`,iconSize:[15,15]},null,8,["icon-url"])]),_:1},8,["lat-lng"])):x("",!0)}}),c5e=e=>(ut("data-v-dac2dfa0"),e=e(),lt(),e),d5e={id:"workout-map"},f5e={key:0,class:"leaflet-container"},E5e={key:1},p5e=c5e(()=>E("i",{class:"fa fa-refresh","aria-hidden":"true"},null,-1)),m5e={key:1,class:"no-map"},h5e=Z({__name:"index",props:{workoutData:{},markerCoordinates:{default:()=>({})}},setup(e){const t=e,n=Me(),{workoutData:a,markerCoordinates:r}=_e(t),s=ce(null),i=k(()=>b()),o=k(()=>n.getters[H.GETTERS.APP_CONFIG]),u=k(()=>m(i)),c=k(()=>t.workoutData&&t.workoutData.gpx?p(t.workoutData.gpx):{}),l=k(()=>t.workoutData&&t.workoutData.chartData.length>0?{latitude:t.workoutData.chartData[0].latitude,longitude:t.workoutData.chartData[0].longitude}:{}),f=k(()=>t.workoutData&&t.workoutData.chartData.length>0?{latitude:t.workoutData.chartData[t.workoutData.chartData.length-1].latitude,longitude:t.workoutData.chartData[t.workoutData.chartData.length-1].longitude}:{}),d=ce(!1);function p(S){if(!S||S!=="")try{return{jsonData:x8e(new DOMParser().parseFromString(S,"text/xml"))}}catch{return console.error("Invalid gpx content"),{}}return{}}function m(S){return[(S.value[0][0]+S.value[1][0])/2,(S.value[0][1]+S.value[1][1])/2]}function I(S){var O,C;(O=s.value)!=null&&O.leafletObject&&((C=s.value)==null||C.leafletObject.fitBounds(S))}function b(){return t.workoutData?[[t.workoutData.workout.bounds[0],t.workoutData.workout.bounds[1]],[t.workoutData.workout.bounds[2],t.workoutData.workout.bounds[3]]]:[]}function R(){var S;(S=s.value)==null||S.leafletObject.fitBounds(b())}function N(){d.value=!d.value,d.value||setTimeout(()=>{R()},100)}return(S,O)=>{const C=oe("VFullscreen");return A(),v("div",d5e,[h(a).loading?(A(),v("div",f5e)):(A(),v("div",E5e,[h(a).workout.with_gpx?(A(),te(C,{key:0,modelValue:d.value,"onUpdate:modelValue":O[1]||(O[1]=P=>d.value=P)},{default:ue(()=>[E("div",{class:Se(["leaflet-container",{"fullscreen-map":d.value}])},[c.value.jsonData&&u.value&&i.value.length===2?(A(),te(h(t5e),{key:0,zoom:13,maxZoom:19,center:u.value,bounds:i.value,zoomAnimation:!1,ref_key:"workoutMap",ref:s,onReady:O[0]||(O[0]=P=>I(i.value)),"use-global-leaflet":!1,class:"map"},{default:ue(()=>[$(h(q8e)),$(h(ph),{position:"topleft",class:"map-control",tabindex:"0",role:"button","aria-label":S.$t("workouts.RESET_ZOOM"),onClick:R},{default:ue(()=>[p5e]),_:1},8,["aria-label"]),$(h(ph),{position:"topleft",class:"map-control",tabindex:"0",role:"button","aria-label":S.$t(`workouts.${d.value?"EXIT":"VIEW"}_FULLSCREEN`),onClick:N},{default:ue(()=>[E("i",{class:Se(`fa fa-${d.value?"compress":"arrows-alt"}`),"aria-hidden":"true"},null,2)]),_:1},8,["aria-label"]),$(h(l5e),{url:`${h(Si)()}workouts/map_tile/{s}/{z}/{x}/{y}.png`,attribution:o.value.map_attribution,bounds:i.value},null,8,["url","attribution","bounds"]),$(h(Z8e),{geojson:c.value.jsonData},null,8,["geojson"]),h(r).latitude?(A(),te(h(JA),{key:0,"lat-lng":[h(r).latitude,h(r).longitude]},null,8,["lat-lng"])):x("",!0),$(h(e5e),{name:S.$t("workouts.START_AND_FINISH"),"layer-type":"overlay"},{default:ue(()=>[l.value.latitude?(A(),te(Th,{key:0,markerCoordinates:l.value,isStart:!0},null,8,["markerCoordinates"])):x("",!0),f.value.latitude?(A(),te(Th,{key:1,markerCoordinates:f.value,isStart:!1},null,8,["markerCoordinates"])):x("",!0)]),_:1},8,["name"])]),_:1},8,["center","bounds"])):x("",!0)],2)]),_:1},8,["modelValue"])):(A(),v("div",m5e,T(S.$t("workouts.NO_MAP")),1))]))])}}}),_5e=ae(h5e,[["__scopeId","data-v-dac2dfa0"]]),T5e={class:"workout-detail"},g5e=Z({__name:"index",props:{authUser:{},displaySegment:{type:Boolean},sports:{},workoutData:{},markerCoordinates:{default:()=>({})}},setup(e){const t=e,n=qt(),a=Me(),{authUser:r,markerCoordinates:s,workoutData:i}=_e(t),o=k(()=>t.workoutData.workout),u=ce(n.params.workoutId?+n.params.segmentId:null),c=k(()=>o.value.segments.length>0&&u.value?o.value.segments[+u.value-1]:null),l=ce(!1),f=k(()=>t.sports?t.sports.find(S=>S.id===t.workoutData.workout.sport_id):{}),d=k(()=>m(o.value,c.value));function p(S,O,C){const P=O&&C&&C!==1?`/workouts/${S.id}/segment/${C-1}`:!O&&S.previous_workout?`/workouts/${S.previous_workout}`:null,M=O&&C&&Cn.params.segmentId,async S=>{S&&(u.value=+S,N())}),We(()=>n.params.workoutId,async S=>{S&&(l.value=!1,N())}),(S,O)=>{const C=oe("Modal"),P=oe("Card");return A(),v("div",T5e,[l.value?(A(),te(C,{key:0,title:S.$t("common.CONFIRMATION"),message:S.$t("workouts.WORKOUT_DELETION_CONFIRMATION"),onConfirmAction:O[0]||(O[0]=M=>R(d.value.workoutId)),onCancelAction:b,onKeydown:At(b,["esc"])},null,8,["title","message"])):x("",!0),$(P,null,{title:ue(()=>[f.value?(A(),te(v$e,{key:0,sport:f.value,workoutObject:d.value,onDisplayModal:O[1]||(O[1]=M=>I(!0))},null,8,["sport","workoutObject"])):x("",!0)]),content:ue(()=>[$(_5e,{workoutData:h(i),markerCoordinates:h(s)},null,8,["workoutData","markerCoordinates"]),$(C8e,{workoutObject:d.value,useImperialUnits:h(r).imperial_units,displayHARecord:h(r).display_ascent},null,8,["workoutObject","useImperialUnits","displayHARecord"])]),_:1})])}}}),A5e=ae(g5e,[["__scopeId","data-v-f8b05eca"]]),S5e=e=>{const t=document.getElementById(e);if(t){let n=t.querySelector("ul");return n||(n=document.createElement("ul"),t.appendChild(n)),n}throw new Error("No legend container")},O5e={id:"htmlLegend",afterUpdate(e,t,n){var s,i,o,u,c,l;const a=S5e(n.containerID);for(;a.firstChild;)a.firstChild.remove();((o=(i=(s=e.options.plugins)==null?void 0:s.legend)==null?void 0:i.labels)!=null&&o.generateLabels?(l=(c=(u=e.options.plugins)==null?void 0:u.legend)==null?void 0:c.labels)==null?void 0:l.generateLabels(e):[]).forEach(f=>{var b,R,N;if(!((N=(R=(b=e.config.options)==null?void 0:b.scales)==null?void 0:R.yElevation)!=null&&N.display)&&f.datasetIndex===1)return;const d=document.createElement("li");d.onclick=()=>{f.datasetIndex!==void 0&&(e.setDatasetVisibility(f.datasetIndex,!e.isDatasetVisible(f.datasetIndex)),e.update())};const p=document.createElement("input");p&&(p.type="checkbox",p.id=f.text,p.checked=!f.hidden);const m=document.createTextNode(f.text),I=document.createElement("span");I&&(I.style.background=String(f.fillStyle),I.style.borderColor=String(f.strokeStyle)),d.appendChild(p),d.appendChild(m),d.appendChild(I),a.appendChild(d)})}},I5e=e=>(ut("data-v-b15bb69d"),e=e(),lt(),e),R5e={id:"workout-chart"},b5e={class:"chart-radio"},N5e=["checked"],v5e=["checked"],C5e=I5e(()=>E("div",{id:"chart-legend"},null,-1)),y5e={class:"line-chart"},D5e={class:"chart-info"},P5e={class:"no-data-cleaning"},L5e={key:0,class:"elevation-start"},w5e=["checked"],k5e=Z({__name:"index",props:{authUser:{},workoutData:{}},emits:["getCoordinates"],setup(e,{emit:t}){const n=e,a=t,r=_f(),{t:s}=Yt(),{authUser:i,workoutData:o}=_e(n),u=k(()=>r.getters[H.GETTERS.DARK_MODE]),c=k(()=>hf(u.value)),l=ce(!0),f=ce(i.value.start_elevation_at_zero),d=k(()=>t4e(o.value.chartData,s,i.value.imperial_units,c.value)),p=k(()=>d.value&&d.value.datasets.elevation.data.length>0),m=B("km"),I=B("m"),b=k(()=>({labels:l.value?d.value.distance_labels:d.value.duration_labels,datasets:JSON.parse(JSON.stringify([d.value.datasets.speed,d.value.datasets.elevation]))})),R=k(()=>d.value.coordinates),N=k(()=>({color:c.value?$a.darkMode.line:$a.ligthMode.line})),S=k(()=>({color:c.value?$a.darkMode.text:$a.ligthMode.text})),O=k(()=>({responsive:!0,maintainAspectRatio:!1,animation:!1,layout:{padding:{top:22}},scales:{x:{grid:{drawOnChartArea:!1,...N.value},border:{...N.value},ticks:{count:10,callback:function(w){return l.value?Number(w).toFixed(2):M(w)},...S.value},type:"linear",bounds:"data",title:{display:!0,text:l.value?s("workouts.DISTANCE")+` (${m})`:s("workouts.DURATION"),...S.value}},ySpeed:{grid:{drawOnChartArea:!1,...N.value},border:{...N.value},position:"left",title:{display:!0,text:s("workouts.SPEED")+` (${m}/h)`,...S.value},ticks:{...S.value}},yElevation:{beginAtZero:f.value,display:p.value,grid:{drawOnChartArea:!1,...N.value},border:{...N.value},position:"right",title:{display:!0,text:s("workouts.ELEVATION")+` (${I})`,...S.value},ticks:{...S.value}}},elements:{point:{pointStyle:"circle",pointRadius:0}},plugins:{datalabels:{display:!1},tooltip:{interaction:{intersect:!1,mode:"index"},callbacks:{label:function(w){const X=` ${w.dataset.label}: ${w.formattedValue}`;return w.dataset.yAxisID==="yElevation"?X+` ${I}`:X+` ${m}/h`},title:function(w){return w.length>0&&L(R.value[w[0].dataIndex]),w.length===0?"":l.value?`${s("workouts.DISTANCE")}: ${w[0].label} ${m}`:`${s("workouts.DURATION")}: ${M(w[0].label.replace(",",""))}`}}},legend:{display:!1},htmlLegend:{containerID:"chart-legend",displayElevation:p.value}}})),C=[O5e];function P(){l.value=!l.value}function M(w){return new Date(+w*1e3).toISOString().substr(11,8)}function L(w){a("getCoordinates",w)}function W(){L({latitude:null,longitude:null})}function B(w){return n.authUser.imperial_units?Pn[w].defaultTarget:w}return(w,X)=>{const J=oe("Card");return A(),v("div",R5e,[$(J,null,{title:ue(()=>[j(T(w.$t("workouts.ANALYSIS")),1)]),content:ue(()=>[E("div",b5e,[E("label",null,[E("input",{type:"radio",name:"distance",checked:l.value,onClick:P},null,8,N5e),j(" "+T(w.$t("workouts.DISTANCE")),1)]),E("label",null,[E("input",{type:"radio",name:"duration",checked:!l.value,onClick:P},null,8,v5e),j(" "+T(w.$t("workouts.DURATION")),1)])]),C5e,E("div",y5e,[$(h(eLe),{data:b.value,options:O.value,plugins:C,onMouseleave:W},null,8,["data","options"])]),E("div",D5e,[E("div",P5e,T(w.$t("workouts.NO_DATA_CLEANING")),1),p.value?(A(),v("div",L5e,[E("label",null,[E("input",{type:"checkbox",checked:f.value,onClick:X[0]||(X[0]=ne=>f.value=!f.value)},null,8,w5e),j(" "+T(w.$t("workouts.START_ELEVATION_AT_ZERO")),1)])])):x("",!0)])]),_:1})])}}}),$5e=ae(k5e,[["__scopeId","data-v-b15bb69d"]]),U5e={id:"workout-note"},M5e=["innerHTML"],x5e=Z({__name:"WorkoutNotes",props:{notes:{default:()=>""}},setup(e){const t=e,{notes:n}=_e(t);return(a,r)=>{const s=oe("Card");return A(),v("div",U5e,[$(s,null,{title:ue(()=>[j(T(a.$t("workouts.NOTES")),1)]),content:ue(()=>[E("span",{innerHTML:h(n)&&h(n)!==""?h(di)(h(n)):a.$t("workouts.NO_NOTES")},null,8,M5e)]),_:1})])}}}),F5e=ae(x5e,[["__scopeId","data-v-f3e81eff"]]),z5e={id:"workout-segments"},W5e=Z({__name:"WorkoutSegments",props:{segments:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{segments:n,useImperialUnits:a}=_e(t);return(r,s)=>{const i=oe("router-link"),o=oe("Distance"),u=oe("Card");return A(),v("div",z5e,[$(u,null,{title:ue(()=>[j(T(r.$t("workouts.SEGMENT",2)),1)]),content:ue(()=>[E("ul",null,[(A(!0),v(be,null,Ge(h(n),(c,l)=>(A(),v("li",{key:c.segment_id},[$(i,{to:{name:"WorkoutSegment",params:{workoutId:c.workout_id,segmentId:l+1}}},{default:ue(()=>[j(T(r.$t("workouts.SEGMENT",1))+" "+T(l+1),1)]),_:2},1032,["to"]),j(" ("+T(r.$t("workouts.DISTANCE"))+": ",1),$(o,{distance:c.distance,unitFrom:"km",useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),j(", "+T(r.$t("workouts.DURATION"))+": "+T(c.duration)+") ",1)]))),128))])]),_:1})])}}}),G5e=ae(W5e,[["__scopeId","data-v-15725c61"]]),B5e=e=>(ut("data-v-eac6aa4b"),e=e(),lt(),e),H5e={id:"workout",class:"view"},V5e={class:"container"},j5e={key:0,class:"workout-container"},K5e={key:0},Y5e=B5e(()=>E("div",{id:"bottom"},null,-1)),q5e={key:1},X5e=Z({__name:"Workout",props:{displaySegment:{type:Boolean}},setup(e){const t=e,n=qt(),a=Me(),{displaySegment:r}=_e(t),s=k(()=>a.getters[Ae.GETTERS.WORKOUT_DATA]),i=k(()=>a.getters[K.GETTERS.AUTH_USER_PROFILE]),o=k(()=>a.getters[Mt.GETTERS.SPORTS]),u=ce({latitude:null,longitude:null});Ct(()=>{const l={workoutId:n.params.workoutId};t.displaySegment&&(l.segmentId=n.params.segmentId),a.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,l)}),Nt(()=>{a.commit(Ae.MUTATIONS.EMPTY_WORKOUT)});function c(l){u.value={latitude:l.latitude,longitude:l.longitude}}return We(()=>n.params.workoutId,async l=>{l&&a.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,{workoutId:l})}),We(()=>n.params.segmentId,async l=>{if(n.params.workoutId){const f={workoutId:n.params.workoutId};l&&(f.segmentId=l),a.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,f)}}),(l,f)=>(A(),v("div",H5e,[E("div",V5e,[o.value.length>0?(A(),v("div",j5e,[s.value.workout.id?(A(),v("div",K5e,[$(A5e,{workoutData:s.value,sports:o.value,authUser:i.value,markerCoordinates:u.value,displaySegment:h(r)},null,8,["workoutData","sports","authUser","markerCoordinates","displaySegment"]),s.value.workout.with_gpx&&s.value.chartData.length>0?(A(),te($5e,{key:0,workoutData:s.value,authUser:i.value,displaySegment:h(r),onGetCoordinates:c},null,8,["workoutData","authUser","displaySegment"])):x("",!0),!h(r)&&s.value.workout.segments.length>1?(A(),te(G5e,{key:1,segments:s.value.workout.segments,useImperialUnits:i.value.imperial_units},null,8,["segments","useImperialUnits"])):x("",!0),h(r)?x("",!0):(A(),te(F5e,{key:2,notes:s.value.workout.notes},null,8,["notes"])),Y5e])):(A(),v("div",q5e,[s.value.loading?x("",!0):(A(),te(dE,{key:0,target:"WORKOUT"}))]))])):x("",!0)])]))}}),gh=ae(X5e,[["__scopeId","data-v-eac6aa4b"]]),Z5e=e=>(ut("data-v-29caaf8f"),e=e(),lt(),e),Q5e={class:"workouts-filters"},J5e={class:"box"},eUe={class:"form-all-items"},tUe={class:"form-items-group"},nUe={class:"form-item"},aUe=["value"],rUe={class:"form-item"},sUe=["value"],iUe={class:"form-items-group"},oUe={class:"form-item"},uUe=["value"],lUe=Z5e(()=>E("option",{value:""},null,-1)),cUe=["value"],dUe={class:"form-item form-item-title"},fUe={class:"form-inputs-group"},EUe=["value"],pUe={class:"form-items-group"},mUe={class:"form-item"},hUe={class:"form-inputs-group"},_Ue=["value"],TUe=["value"],gUe={class:"form-items-group"},AUe={class:"form-item"},SUe={class:"form-inputs-group"},OUe=["value"],IUe=["value"],RUe={class:"form-items-group"},bUe={class:"form-item"},NUe={class:"form-inputs-group"},vUe=["value"],CUe=["value"],yUe={class:"form-items-group"},DUe={class:"form-item"},PUe={class:"form-inputs-group"},LUe=["value"],wUe=["value"],kUe={class:"form-button"},$Ue=Z({__name:"WorkoutsFilters",props:{authUser:{},sports:{}},emits:["filter"],setup(e,{emit:t}){const n=e,a=t,{t:r}=Yt(),s=qt(),i=Ya(),{authUser:o}=_e(n),u=o.value.imperial_units?Pn.km.defaultTarget:"km",c=k(()=>Xa(n.sports,r));let l=Object.assign({},s.query);_t(()=>{const m=document.getElementById("from");m&&m.focus()});function f(m){const I=m.target.name,b=m.target.value;b===""?delete l[I]:l[I]=b}function d(){a("filter"),"page"in l&&(l.page="1"),i.push({path:"/workouts",query:l})}function p(){a("filter"),i.push({path:"/workouts",query:{}})}return We(()=>s.query,m=>{l=Object.assign({},m)}),(m,I)=>(A(),v("div",Q5e,[E("div",J5e,[E("form",{onSubmit:Je(d,["prevent"]),class:"form"},[E("div",eUe,[E("div",tUe,[E("div",nUe,[E("label",null,T(m.$t("workouts.FROM"))+": ",1),E("input",{id:"from",name:"from",type:"date",value:m.$route.query.from,onChange:f},null,40,aUe)]),E("div",rUe,[E("label",null,T(m.$t("workouts.TO"))+": ",1),E("input",{name:"to",type:"date",value:m.$route.query.to,onChange:f},null,40,sUe)])]),E("div",iUe,[E("div",oUe,[E("label",null,T(m.$t("workouts.SPORT",1))+":",1),E("select",{name:"sport_id",value:m.$route.query.sport_id,onChange:f,onKeyup:At(d,["enter"])},[lUe,(A(!0),v(be,null,Ge(c.value.filter(b=>h(o).sports_list.includes(b.id)),b=>(A(),v("option",{value:b.id,key:b.id},T(b.translatedLabel),9,cUe))),128))],40,uUe)]),E("div",dUe,[E("label",null,T(m.$t("workouts.TITLE",1))+":",1),E("div",fUe,[E("input",{class:"title",name:"title",value:m.$route.query.title,onChange:f,placeholder:"",type:"text",onKeyup:At(d,["enter"])},null,40,EUe)])])]),E("div",pUe,[E("div",mUe,[E("label",null,T(m.$t("workouts.DISTANCE"))+" ("+T(h(u))+"): ",1),E("div",hUe,[E("input",{name:"distance_from",type:"number",min:"0",step:"0.1",value:m.$route.query.distance_from,onChange:f,onKeyup:At(d,["enter"])},null,40,_Ue),E("span",null,T(m.$t("workouts.TO")),1),E("input",{name:"distance_to",type:"number",min:"0",step:"0.1",value:m.$route.query.distance_to,onChange:f,onKeyup:At(d,["enter"])},null,40,TUe)])])]),E("div",gUe,[E("div",AUe,[E("label",null,T(m.$t("workouts.DURATION"))+": ",1),E("div",SUe,[E("input",{name:"duration_from",value:m.$route.query.duration_from,onChange:f,pattern:"^([0-9]*[0-9]):([0-5][0-9])$",placeholder:"hh:mm",type:"text",onKeyup:At(d,["enter"])},null,40,OUe),E("span",null,T(m.$t("workouts.TO")),1),E("input",{name:"duration_to",value:m.$route.query.duration_to,onChange:f,pattern:"^([0-9]*[0-9]):([0-5][0-9])$",placeholder:"hh:mm",type:"text",onKeyup:At(d,["enter"])},null,40,IUe)])])]),E("div",RUe,[E("div",bUe,[E("label",null,T(m.$t("workouts.AVE_SPEED"))+" ("+T(h(u))+"/h): ",1),E("div",NUe,[E("input",{min:"0",name:"ave_speed_from",value:m.$route.query.ave_speed_from,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,vUe),E("span",null,T(m.$t("workouts.TO")),1),E("input",{min:"0",name:"ave_speed_to",value:m.$route.query.ave_speed_to,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,CUe)])])]),E("div",yUe,[E("div",DUe,[E("label",null,T(m.$t("workouts.MAX_SPEED"))+" ("+T(h(u))+"/h): ",1),E("div",PUe,[E("input",{min:"0",name:"max_speed_from",value:m.$route.query.max_speed_from,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,LUe),E("span",null,T(m.$t("workouts.TO")),1),E("input",{min:"0",name:"max_speed_to",value:m.$route.query.max_speed_to,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,wUe)])])])]),E("div",kUe,[E("button",{type:"submit",class:"confirm",onClick:d},T(m.$t("buttons.FILTER")),1),E("button",{class:"confirm",onClick:p},T(m.$t("buttons.CLEAR_FILTER")),1)])],32)])]))}}),UUe=ae($Ue,[["__scopeId","data-v-29caaf8f"]]),tS=e=>(ut("data-v-bb980a00"),e=e(),lt(),e),MUe={class:"workouts-list"},xUe={class:"total"},FUe={class:"total-label"},zUe={key:0},WUe={key:0,class:"workouts-table responsive-table"},GUe=tS(()=>E("th",{class:"sport-col"},null,-1)),BUe={class:"sport-col"},HUe={class:"cell-heading"},VUe=["onMouseover"],jUe={class:"cell-heading"},KUe={key:0,class:"fa fa-map-o","aria-hidden":"true"},YUe={class:"title"},qUe={class:"workout-date"},XUe={class:"cell-heading"},ZUe={class:"text-right"},QUe={class:"cell-heading"},JUe={class:"text-right"},e7e={class:"cell-heading"},t7e={class:"text-right"},n7e={class:"cell-heading"},a7e={class:"text-right"},r7e={class:"cell-heading"},s7e={class:"text-right"},i7e={class:"cell-heading"},o7e={class:"text-right"},u7e={class:"cell-heading"},l7e=tS(()=>E("div",{id:"bottom"},null,-1)),c7e=Z({__name:"WorkoutsList",props:{user:{},sports:{}},setup(e){const t=e,n=Me(),a=qt(),r=Ya(),{user:s,sports:i}=_e(t),o=["ave_speed","distance","duration","workout_date"],u=k(()=>n.getters[Ae.GETTERS.USER_WORKOUTS]),c=k(()=>n.getters[Ae.GETTERS.WORKOUTS_PAGINATION]),l=k(()=>n.getters[H.GETTERS.LANGUAGE]);let f=I(a.query);const d=ce(null);Ct(()=>{p(f)});function p(N){n.dispatch(Ae.ACTIONS.GET_USER_WORKOUTS,s.value.imperial_units?b(N):N)}function m(N,S){const O=Object.assign({},a.query);O[N]=S,N==="per_page"&&(O.page="1"),f=I(O),r.push({path:"/workouts",query:f})}function I(N){const S=yd(N,o,Ei.order_by,{defaultSort:Ei.order});return Object.keys(N).filter(O=>ZRe.includes(O)).map(O=>{typeof N[O]=="string"&&(S[O]=N[O])}),S}function b(N){const S={...N};return Object.entries(S).map(O=>{O[0].match("speed|distance")&&O[1]&&(S[O[0]]=on(+O[1],"mi","km"))}),S}function R(N){d.value=N}return We(()=>a.query,async N=>{f=I(N),p(f)}),(N,S)=>{const O=oe("SportImage"),C=oe("router-link"),P=oe("Distance");return A(),v("div",MUe,[E("div",{class:Se(["box",{"empty-table":u.value.length===0}])},[E("div",xUe,[E("span",FUe,T(N.$t("common.TOTAL").toLowerCase())+": ",1),c.value.total?(A(),v("span",zUe,T(c.value.total)+" "+T(N.$t("workouts.WORKOUT",c.value.total)),1)):x("",!0)]),$(qg,{sort:h(oE),order_by:o,query:h(f),message:"workouts",onUpdateSelect:m},null,8,["sort","query"]),u.value.length>0?(A(),v("div",WUe,[$(ku,{class:"top-pagination",pagination:c.value,path:"/workouts",query:h(f)},null,8,["pagination","query"]),E("table",null,[E("thead",{class:Se({smaller:l.value==="de"})},[E("tr",null,[GUe,E("th",null,T(bt(N.$t("workouts.WORKOUT",1))),1),E("th",null,T(bt(N.$t("workouts.DATE"))),1),E("th",null,T(bt(N.$t("workouts.DISTANCE"))),1),E("th",null,T(bt(N.$t("workouts.DURATION"))),1),E("th",null,T(bt(N.$t("workouts.AVE_SPEED"))),1),E("th",null,T(bt(N.$t("workouts.MAX_SPEED"))),1),E("th",null,T(bt(N.$t("workouts.ASCENT"))),1),E("th",null,T(bt(N.$t("workouts.DESCENT"))),1)])],2),E("tbody",null,[(A(!0),v(be,null,Ge(u.value,M=>(A(),v("tr",{key:M.id},[E("td",BUe,[E("span",HUe,T(N.$t("workouts.SPORT",1)),1),h(i).length>0?(A(),te(O,{key:0,title:h(i).filter(L=>L.id===M.sport_id)[0].translatedLabel,"sport-label":h(sE)(M,h(i)),color:h(iE)(M,h(i))},null,8,["title","sport-label","color"])):x("",!0)]),E("td",{class:"workout-title",onMouseover:L=>R(M.id),onMouseleave:S[0]||(S[0]=L=>R(null))},[E("span",jUe,T(bt(N.$t("workouts.WORKOUT",1))),1),$(C,{class:"nav-item",to:{name:"Workout",params:{workoutId:M.id}}},{default:ue(()=>[M.with_gpx?(A(),v("i",KUe)):x("",!0),E("span",YUe,T(M.title),1)]),_:2},1032,["to"]),M.with_gpx&&d.value===M.id?(A(),te(IA,{key:0,workout:M,"display-hover":!0},null,8,["workout"])):x("",!0)],40,VUe),E("td",qUe,[E("span",XUe,T(N.$t("workouts.DATE")),1),E("time",null,T(h($n)(M.workout_date,h(s).timezone,h(s).date_format)),1)]),E("td",ZUe,[E("span",QUe,T(N.$t("workouts.DISTANCE")),1),M.distance!==null?(A(),te(P,{key:0,distance:M.distance,unitFrom:"km",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)]),E("td",JUe,[E("span",e7e,T(N.$t("workouts.DURATION")),1),j(" "+T(M.moving),1)]),E("td",t7e,[E("span",n7e,T(N.$t("workouts.AVE_SPEED")),1),M.ave_speed!==null?(A(),te(P,{key:0,distance:M.ave_speed,unitFrom:"km",speed:!0,useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)]),E("td",a7e,[E("span",r7e,T(N.$t("workouts.MAX_SPEED")),1),M.max_speed!==null?(A(),te(P,{key:0,distance:M.max_speed,unitFrom:"km",speed:!0,useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)]),E("td",s7e,[E("span",i7e,T(N.$t("workouts.ASCENT")),1),M.ascent!==null?(A(),te(P,{key:0,distance:M.ascent,unitFrom:"m",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)]),E("td",o7e,[E("span",u7e,T(N.$t("workouts.DESCENT")),1),M.descent!==null?(A(),te(P,{key:0,distance:M.descent,unitFrom:"m",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)])]))),128))])]),$(ku,{pagination:c.value,path:"/workouts",query:h(f)},null,8,["pagination","query"])])):x("",!0)],2),u.value.length===0?(A(),te(EE,{key:0})):x("",!0),l7e])}}}),d7e=ae(c7e,[["__scopeId","data-v-bb980a00"]]),f7e={key:0,id:"workouts",class:"view"},E7e={class:"container workouts-container"},p7e={class:"display-filters"},m7e={class:"list-container"},h7e=Z({__name:"WorkoutsView",setup(e){const{t}=Yt(),n=Me(),a=k(()=>n.getters[K.GETTERS.AUTH_USER_PROFILE]),r=k(()=>n.getters[Mt.GETTERS.SPORTS]),s=k(()=>Xa(r.value,t)),i=ce(!0);function o(){i.value=!i.value}return(u,c)=>a.value.username?(A(),v("div",f7e,[E("div",E7e,[E("div",{class:Se(["filters-container",{hidden:i.value}])},[$(UUe,{sports:s.value,authUser:a.value,onFilter:o},null,8,["sports","authUser"])],2),E("div",p7e,[E("div",{onClick:o},[E("i",{class:Se(`fa fa-caret-${i.value?"down":"up"}`),"aria-hidden":"true"},null,2),E("span",null,T(u.$t(`workouts.${i.value?"DISPLAY":"HIDE"}_FILTERS`)),1)])]),E("div",m7e,[$(d7e,{user:a.value,sports:s.value},null,8,["user","sports"])])])])):x("",!0)}}),_7e=ae(h7e,[["__scopeId","data-v-3fa59b88"]]),{t:Ah}=_r.global,Sh=e=>{const t=/(\/profile)(\/edit)*(\/*)/,n=e.replace(t,"").toUpperCase();return n===""?"PROFILE":n.toUpperCase()},T7e=[{path:"/",name:"Dashboard",component:Twe,meta:{title:"dashboard.DASHBOARD"}},{path:"/login",name:"Login",component:lh,props:{action:"login"},meta:{title:"user.LOGIN",withoutAuth:!0}},{path:"/register",name:"Register",component:lh,props:{action:"register"},meta:{title:"user.REGISTER",withoutAuth:!0}},{path:"/account-confirmation",name:"AccountConfirmation",component:D6e,meta:{title:"user.ACCOUNT_CONFIRMATION",withoutAuth:!0}},{path:"/account-confirmation/resend",name:"AccountConfirmationResend",component:uh,props:{action:"account-confirmation-resend"},meta:{title:"buttons.ACCOUNT-CONFIRMATION-RESEND",withoutAuth:!0}},{path:"/account-confirmation/email-sent",name:"AccountConfirmationEmailSend",component:uh,props:{action:"email-sent"},meta:{title:"buttons.ACCOUNT-CONFIRMATION-RESEND",withoutAuth:!0}},{path:"/password-reset/sent",name:"PasswordEmailSent",component:lo,props:{action:"request-sent"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset/request",name:"PasswordResetRequest",component:lo,props:{action:"reset-request"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset/password-updated",name:"PasswordUpdated",component:lo,props:{action:"password-updated"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset",name:"PasswordReset",component:lo,props:{action:"reset"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/email-update",name:"EmailUpdate",component:k6e,meta:{title:"user.EMAIL_UPDATE",withoutChecks:!0}},{path:"/profile",name:"Profile",component:oke,children:[{path:"",name:"UserProfile",component:NNe,props:e=>({tab:Sh(e.path)}),children:[{path:"",name:"UserInfos",component:sA,meta:{title:"user.PROFILE.TABS.PROFILE"}},{path:"preferences",name:"UserPreferences",component:YNe,meta:{title:"user.PROFILE.TABS.PREFERENCES"}},{path:"sports",name:"UserSportPreferences",component:Jm,props:{isEdition:!1},meta:{title:"user.PROFILE.TABS.SPORTS"}},{path:"apps",name:"UserApps",component:Qye,children:[{path:"",name:"UserAppsList",component:TDe,meta:{title:"user.PROFILE.TABS.APPS"}},{path:":id",name:"UserApp",component:Qm,meta:{title:"user.PROFILE.TABS.APPS"}},{path:":id/created",name:"CreatedUserApp",component:Qm,props:{afterCreation:!0},meta:{title:"user.PROFILE.TABS.APPS"}},{path:"new",name:"AddUserApp",component:Fye,meta:{title:"user.PROFILE.TABS.APPS"}},{path:"authorize",name:"AuthorizeUserApp",component:Xye,meta:{title:"user.PROFILE.TABS.APPS"}}]}]},{path:"edit",name:"UserProfileEdition",component:XNe,props:e=>({tab:Sh(e.path)}),children:[{path:"",name:"UserInfosEdition",component:Y3e,meta:{title:"user.PROFILE.EDIT"}},{path:"account",name:"UserAccountEdition",component:L3e,meta:{title:"user.PROFILE.ACCOUNT_EDITION"}},{path:"picture",name:"UserPictureEdition",component:rCe,meta:{title:"user.PROFILE.PICTURE_EDITION"}},{path:"preferences",name:"UserPreferencesEdition",component:nye,meta:{title:"user.PROFILE.EDIT_PREFERENCES"}},{path:"sports",name:"UserSportPreferencesEdition",component:Jm,props:{isEdition:!0},meta:{title:"user.PROFILE.EDIT_SPORTS_PREFERENCES"}},{path:"privacy-policy",name:"UserPrivacyPolicy",component:hye,meta:{title:"user.PROFILE.PRIVACY-POLICY_EDITION"}}]}]},{path:"/statistics",name:"Statistics",component:Ywe,meta:{title:"statistics.STATISTICS"}},{path:"/users/:username",name:"User",component:ch,meta:{title:"administration.USER"}},{path:"/workouts",name:"Workouts",component:_7e,meta:{title:"workouts.WORKOUT",count:0}},{path:"/workouts/:workoutId",name:"Workout",component:gh,props:{displaySegment:!1},meta:{title:"workouts.WORKOUT"}},{path:"/workouts/:workoutId/edit",name:"EditWorkout",component:t$e,meta:{title:"workouts.EDIT_WORKOUT"}},{path:"/workouts/:workoutId/segment/:segmentId",name:"WorkoutSegment",component:gh,props:{displaySegment:!0},meta:{title:"workouts.SEGMENT",count:0}},{path:"/workouts/add",name:"AddWorkout",component:Qke,meta:{title:"workouts.ADD_WORKOUT"}},{path:"/admin",name:"Administration",component:DPe,children:[{path:"",name:"AdministrationMenu",component:TRe,meta:{title:"admin.ADMINISTRATION"}},{path:"application",name:"ApplicationAdministration",component:Cm,meta:{title:"admin.APP_CONFIG.TITLE"}},{path:"application/edit",name:"ApplicationAdministrationEdition",component:Cm,props:{edition:!0},meta:{title:"admin.APPLICATION"}},{path:"sports",name:"SportsAdministration",component:WRe,meta:{title:"admin.SPORTS.TITLE"}},{path:"users/:username",name:"UserFromAdmin",component:ch,props:{fromAdmin:!0},meta:{title:"admin.USER",count:1}},{path:"users",name:"UsersAdministration",component:sNe,meta:{title:"admin.USERS.TITLE"}}]},{path:"/about",name:"About",component:APe,meta:{title:"common.ABOUT",withoutChecks:!0}},{path:"/privacy-policy",name:"PrivacyPolicy",component:Rwe,meta:{title:"privacy_policy.TITLE",withoutChecks:!0}},{path:"/:pathMatch(.*)*",name:"not-found",component:Awe,meta:{title:"error.NOT_FOUND.PAGE"}}],nS=q_e({history:d_e("/"),routes:T7e});nS.beforeEach((e,t,n)=>{if("title"in e.meta){const a=typeof e.meta.title=="string"?e.meta.title:"",r=a?typeof e.meta.count=="number"?Ah(a,+e.meta.count):Ah(a):"";window.document.title=`FitTrackee${a?` - ${bt(r)}`:""}`}Bs.dispatch(K.ACTIONS.CHECK_AUTH_USER).then(()=>{if(e.meta.withoutChecks)return n();if(Bs.getters[K.GETTERS.IS_AUTHENTICATED]&&e.meta.withoutAuth)return n("/");if(!Bs.getters[K.GETTERS.IS_AUTHENTICATED]&&!e.meta.withoutAuth){const a=e.path==="/"?{path:"/login"}:{path:"/login",query:{from:e.fullPath}};n(a)}else n()}).catch(a=>{console.error(a),n()})});const Rt=nS;Md.register(rS,sS,iS,oS,uS,lS,cS,Oh,dS,Ih,fS,ES);const aS=$I(yhe).provide("sportColors",rE).use(_r).use(Bs).use(Rt).use(Sb,{name:"VFullscreen"}).directive("click-outside",Rge);Ige.forEach(e=>{aS.component(e.name,e.target)});aS.mount("#app");
+ C512.001,172.24,506.387,166.626,499.487,166.626z">`,7),G6e=[W6e];function B6e(e,t,n,a,r,s){return A(),v("svg",z6e,G6e)}const H6e=ae(F6e,[["render",B6e]]),V6e={id:"password-action-done",class:"center-card with-margin"},j6e={class:"password-message"},K6e={key:0},Y6e=Z({__name:"PasswordActionDone",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(a,r)=>{const s=oe("router-link"),i=oe("i18n-t");return A(),v("div",V6e,[h(n)==="request-sent"?(A(),te(PA,{key:0})):(A(),te(H6e,{key:1})),E("div",j6e,[h(n)==="request-sent"?(A(),v("span",K6e,T(a.$t("user.PASSWORD_SENT_EMAIL_TEXT")),1)):(A(),te(i,{key:1,keypath:"user.PASSWORD_UPDATED"},{default:ue(()=>[$(s,{to:"/login"},{default:ue(()=>[j(T(a.$t("common.HERE")),1)]),_:1})]),_:1}))])])}}}),q6e=ae(Y6e,[["__scopeId","data-v-ee1004fc"]]),X6e={id:"password-reset-request",class:"center-card with-margin"},Z6e=Z({__name:"PasswordResetForm",props:{action:{},token:{default:""}},setup(e){const t=e,{action:n,token:a}=_e(t);return(r,s)=>{const i=oe("Card");return A(),v("div",X6e,[$(i,null,{title:ue(()=>[j(T(r.$t("user.RESET_PASSWORD")),1)]),content:ue(()=>[$(pE,{action:h(n),token:h(a)},null,8,["action","token"])]),_:1})])}}}),Q6e=ae(Z6e,[["__scopeId","data-v-97f01ba1"]]),J6e={id:"password-reset",class:"view"},eke={class:"container"},tke=Z({__name:"PasswordResetView",props:{action:{}},setup(e){const t=e,n=qt(),a=Ya(),{action:r}=_e(t),s=k(()=>n.query.token);return Ct(()=>{t.action==="reset"&&!s.value&&a.push("/")}),(i,o)=>(A(),v("div",J6e,[E("div",eke,[h(r).startsWith("reset")?(A(),te(Q6e,{key:0,action:h(r),token:s.value},null,8,["action","token"])):(A(),te(q6e,{key:1,action:h(r)},null,8,["action"]))])]))}}),lo=ae(tke,[["__scopeId","data-v-5cbe9029"]]),nke=e=>(ut("data-v-af92ad3a"),e=e(),lt(),e),ake={key:0,id:"profile",class:"view"},rke=nke(()=>E("div",{id:"bottom"},null,-1)),ske=Z({__name:"ProfileView",setup(e){const t=Me(),n=k(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]);return(a,r)=>{const s=oe("router-view");return n.value.username?(A(),v("div",ake,[$(s,{user:n.value},null,8,["user"]),rke])):x("",!0)}}}),ike=ae(ske,[["__scopeId","data-v-af92ad3a"]]),oke={key:0,id:"user",class:"view"},uke={class:"box"},lke=Z({__name:"UserView",props:{fromAdmin:{type:Boolean}},setup(e){const t=e,{fromAdmin:n}=_e(t),a=qt(),r=Me(),s=k(()=>r.getters[Le.GETTERS.USER]);return Ct(()=>{a.params.username&&typeof a.params.username=="string"&&r.dispatch(Le.ACTIONS.GET_USER,a.params.username)}),hi(()=>{r.dispatch(Le.ACTIONS.EMPTY_USER)}),(i,o)=>s.value.username?(A(),v("div",oke,[$(aA,{user:s.value},null,8,["user"]),E("div",uke,[$(sA,{user:s.value,"from-admin":h(n)},null,8,["user","from-admin"])])])):x("",!0)}}),ch=ae(lke,[["__scopeId","data-v-1b7a0b4f"]]),cke={id:"workout-form"},dke={class:"form-items"},fke={key:0,class:"form-item-radio"},Eke=["checked","disabled"],pke={for:"withGpx"},mke=["checked","disabled"],hke={for:"withoutGpx"},_ke={class:"form-item"},Tke=["disabled"],gke=["value"],Ake={key:1,class:"form-item"},Ske={for:"gpxFile"},Oke=["disabled"],Ike={class:"files-help info-box"},Rke={key:2,class:"form-item"},bke={for:"title"},Nke=["required","disabled"],vke={key:3},Cke={class:"workout-date-duration"},yke={class:"form-item"},Dke={class:"workout-date-time"},Pke=["disabled"],Lke=["disabled"],wke={class:"form-item"},kke=["disabled"],$ke=["disabled"],Uke=["disabled"],Mke={class:"workout-data"},xke={class:"form-item"},Fke=["disabled"],zke={class:"form-item"},Wke=["disabled"],Gke={class:"form-item"},Bke=["disabled"],Hke={class:"form-item"},Vke={key:1},jke={key:2,class:"form-buttons"},Kke=["disabled"],Yke=Z({__name:"WorkoutEdition",props:{authUser:{},sports:{},isCreation:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},workout:{default:()=>({})}},setup(e){const t=e,{t:n}=Yt(),a=Me(),r=Ya(),{authUser:s,workout:i,isCreation:o,loading:u}=_e(t),c=k(()=>Xa(t.sports,n,"is_active_for_user",i.value.id?[i.value.sport_id]:[])),l=k(()=>a.getters[H.GETTERS.APP_CONFIG]),f=l.value.max_single_file_size?qo(l.value.max_single_file_size):"",d=l.value.gpx_limit_import,p=l.value.max_zip_file_size?qo(l.value.max_zip_file_size):"",m=k(()=>a.getters[H.GETTERS.ERROR_MESSAGES]),I=Gt({sport_id:"",title:"",notes:"",workoutDate:"",workoutTime:"",workoutDurationHour:"",workoutDurationMinutes:"",workoutDurationSeconds:"",workoutDistance:"",workoutAscent:"",workoutDescent:""}),b=ce(i.value.id?i.value.with_gpx:o.value);let R=null;const N=ce(!1),S=ce([]);_t(()=>{let D;t.workout.id?(M(t.workout),D=document.getElementById("sport")):D=document.getElementById("withGpx"),D&&D.focus()});function O(D){I.notes=D}function C(){b.value=!b.value,N.value=!1}function P(D){D.target.files&&(R=D.target.files[0])}function M(D){if(I.sport_id=`${D.sport_id}`,I.title=D.title,I.notes=D.notes,!D.with_gpx){const G=tA(Ol(D.workout_date,t.authUser.timezone),"yyyy-MM-dd"),V=D.duration.split(":");I.workoutDistance=`${s.value.imperial_units?on(D.distance,"km","mi",3):parseFloat(D.distance.toFixed(3))}`,I.workoutDate=G.workout_date,I.workoutTime=G.workout_time,I.workoutDurationHour=V[0],I.workoutDurationMinutes=V[1],I.workoutDurationSeconds=V[2],I.workoutAscent=D.ascent===null?"":`${s.value.imperial_units?on(D.ascent,"m","ft",2):parseFloat(D.ascent.toFixed(2))}`,I.workoutDescent=D.descent===null?"":`${s.value.imperial_units?on(D.descent,"m","ft",2):parseFloat(D.descent.toFixed(2))}`}}function L(){return S.value.includes("workouts.INVALID_DISTANCE")}function W(){return S.value.includes("workouts.INVALID_DURATION")}function B(){return S.value.includes("workouts.INVALID_ASCENT_OR_DESCENT")}function w(D){S.value=[],D.title=I.title,D.duration=+I.workoutDurationHour*3600+ +I.workoutDurationMinutes*60+ +I.workoutDurationSeconds,D.duration<=0&&S.value.push("workouts.INVALID_DURATION"),D.distance=s.value.imperial_units?on(+I.workoutDistance,"mi","km",3):+I.workoutDistance,D.distance<=0&&S.value.push("workouts.INVALID_DISTANCE"),D.workout_date=`${I.workoutDate} ${I.workoutTime}`,D.ascent=I.workoutAscent===""?null:s.value.imperial_units?on(+I.workoutAscent,"ft","m",3):+I.workoutAscent,D.descent=I.workoutDescent===""?null:s.value.imperial_units?on(+I.workoutDescent,"ft","m",3):+I.workoutDescent,(D.ascent!==null&&D.descent===null||D.ascent===null&&D.descent!==null)&&S.value.push("workouts.INVALID_ASCENT_OR_DESCENT")}function X(){const D={sport_id:+I.sport_id,notes:I.notes};if(t.workout.id)t.workout.with_gpx?D.title=I.title:w(D),S.value.length>0?a.commit(H.MUTATIONS.SET_ERROR_MESSAGES,S.value):a.dispatch(Ae.ACTIONS.EDIT_WORKOUT,{workoutId:t.workout.id,data:D});else if(b.value){if(!R){a.commit(H.MUTATIONS.SET_ERROR_MESSAGES,"workouts.NO_FILE_PROVIDED");return}D.file=R,a.dispatch(Ae.ACTIONS.ADD_WORKOUT,D)}else w(D),S.value.length>0?a.commit(H.MUTATIONS.SET_ERROR_MESSAGES,S.value):a.dispatch(Ae.ACTIONS.ADD_WORKOUT_WITHOUT_GPX,D)}function J(){t.workout.id?r.push({name:"Workout",params:{workoutId:t.workout.id}}):r.go(-1)}function ne(){N.value=!0}return Nt(()=>a.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),We(()=>t.workout,async(D,G)=>{D!==G&&D&&D.id&&M(D)}),(D,G)=>{const V=oe("CustomTextArea"),re=oe("ErrorMessage"),Be=oe("Loader"),$e=oe("Card");return A(),v("div",{id:"workout-edition",class:Se(["center-card with-margin",{"center-form":h(i)&&h(i).with_gpx}])},[$($e,null,{title:ue(()=>[j(T(D.$t(`workouts.${h(o)?"ADD":"EDIT"}_WORKOUT`)),1)]),content:ue(()=>[E("div",cke,[E("form",{class:Se({errors:N.value}),onSubmit:Je(X,["prevent"])},[E("div",dke,[h(o)?(A(),v("div",fke,[E("div",null,[E("input",{id:"withGpx",type:"radio",checked:b.value,disabled:h(u),onClick:C},null,8,Eke),E("label",pke,T(D.$t("workouts.WITH_GPX")),1)]),E("div",null,[E("input",{id:"withoutGpx",type:"radio",checked:!b.value,disabled:h(u),onClick:C},null,8,mke),E("label",hke,T(D.$t("workouts.WITHOUT_GPX")),1)])])):x("",!0),E("div",_ke,[E("label",null,T(D.$t("workouts.SPORT",1))+"*: ",1),qe(E("select",{id:"sport",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[0]||(G[0]=Oe=>I.sport_id=Oe)},[(A(!0),v(be,null,Ge(c.value,Oe=>(A(),v("option",{value:Oe.id,key:Oe.id},T(Oe.translatedLabel),9,gke))),128))],40,Tke),[[$s,I.sport_id]])]),h(o)&&b.value?(A(),v("div",Ake,[E("label",Ske,T(D.$t("workouts.GPX_FILE"))+" "+T(D.$t("workouts.ZIP_ARCHIVE_DESCRIPTION"))+"*: ",1),E("input",{id:"gpxFile",name:"gpxFile",type:"file",accept:".gpx, .zip",disabled:h(u),required:"",onInvalid:ne,onInput:P},null,40,Oke),E("div",Ike,[E("div",null,[E("strong",null,T(D.$t("workouts.GPX_FILE"))+":",1),E("ul",null,[E("li",null,T(D.$t("workouts.MAX_SIZE"))+": "+T(h(f)),1)])]),E("div",null,[E("strong",null,T(D.$t("workouts.ZIP_ARCHIVE"))+":",1),E("ul",null,[E("li",null,T(D.$t("workouts.NO_FOLDER")),1),E("li",null,T(D.$t("workouts.MAX_FILES"))+": "+T(h(d)),1),E("li",null,T(D.$t("workouts.MAX_SIZE"))+": "+T(h(p)),1)])])])])):(A(),v("div",Rke,[E("label",bke,T(D.$t("workouts.TITLE"))+": ",1),qe(E("input",{id:"title",name:"title",type:"text",required:!h(o),onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[1]||(G[1]=Oe=>I.title=Oe)},null,40,Nke),[[rt,I.title]])])),b.value?x("",!0):(A(),v("div",vke,[E("div",Cke,[E("div",yke,[E("label",null,T(D.$t("workouts.WORKOUT_DATE"))+"*:",1),E("div",Dke,[qe(E("input",{id:"workout-date",name:"workout-date",type:"date",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[2]||(G[2]=Oe=>I.workoutDate=Oe)},null,40,Pke),[[rt,I.workoutDate]]),qe(E("input",{id:"workout-time",name:"workout-time",class:"workout-time",type:"time",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[3]||(G[3]=Oe=>I.workoutTime=Oe)},null,40,Lke),[[rt,I.workoutTime]])])]),E("div",wke,[E("label",null,T(D.$t("workouts.DURATION"))+"*:",1),E("div",null,[qe(E("input",{id:"workout-duration-hour",name:"workout-duration-hour",class:Se(["workout-duration",{errored:W()}]),type:"text",placeholder:"HH",minlength:"1",maxlength:"2",pattern:"^([0-1]?[0-9]|2[0-3])$",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[4]||(G[4]=Oe=>I.workoutDurationHour=Oe)},null,42,kke),[[rt,I.workoutDurationHour]]),j(" : "),qe(E("input",{id:"workout-duration-minutes",name:"workout-duration-minutes",class:Se(["workout-duration",{errored:W()}]),type:"text",pattern:"^([0-5][0-9])$",minlength:"2",maxlength:"2",placeholder:"MM",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[5]||(G[5]=Oe=>I.workoutDurationMinutes=Oe)},null,42,$ke),[[rt,I.workoutDurationMinutes]]),j(" : "),qe(E("input",{id:"workout-duration-seconds",name:"workout-duration-seconds",class:Se(["workout-duration",{errored:W()}]),type:"text",pattern:"^([0-5][0-9])$",minlength:"2",maxlength:"2",placeholder:"SS",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[6]||(G[6]=Oe=>I.workoutDurationSeconds=Oe)},null,42,Uke),[[rt,I.workoutDurationSeconds]])])])]),E("div",Mke,[E("div",xke,[E("label",null,T(D.$t("workouts.DISTANCE"))+" ("+T(h(s).imperial_units?"mi":"km")+")*: ",1),qe(E("input",{class:Se({errored:L()}),name:"workout-distance",type:"number",min:"0",step:"0.001",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[7]||(G[7]=Oe=>I.workoutDistance=Oe)},null,42,Fke),[[rt,I.workoutDistance]])]),E("div",zke,[E("label",null,T(D.$t("workouts.ASCENT"))+" ("+T(h(s).imperial_units?"ft":"m")+"): ",1),qe(E("input",{class:Se({errored:B()}),name:"workout-ascent",type:"number",min:"0",step:"0.01",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[8]||(G[8]=Oe=>I.workoutAscent=Oe)},null,42,Wke),[[rt,I.workoutAscent]])]),E("div",Gke,[E("label",null,T(D.$t("workouts.DESCENT"))+" ("+T(h(s).imperial_units?"ft":"m")+"): ",1),qe(E("input",{class:Se({errored:B()}),name:"workout-descent",type:"number",min:"0",step:"0.01",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":G[9]||(G[9]=Oe=>I.workoutDescent=Oe)},null,42,Bke),[[rt,I.workoutDescent]])])])])),E("div",Hke,[E("label",null,T(D.$t("workouts.NOTES"))+": ",1),$(V,{name:"notes",input:I.notes,disabled:h(u),onUpdateValue:O},null,8,["input","disabled"])])]),m.value?(A(),te(re,{key:0,message:m.value},null,8,["message"])):x("",!0),h(u)?(A(),v("div",Vke,[$(Be)])):(A(),v("div",jke,[E("button",{class:"confirm",type:"submit",disabled:h(u)},T(D.$t("buttons.SUBMIT")),9,Kke),E("button",{class:"cancel",onClick:Je(J,["prevent"])},T(D.$t("buttons.CANCEL")),1)]))],34)])]),_:1})],2)}}}),wA=ae(Yke,[["__scopeId","data-v-4c5a9cd1"]]),qke={id:"add-workout",class:"view"},Xke={class:"container"},Zke=Z({__name:"AddWorkout",setup(e){const t=Me(),n=k(()=>t.getters[Mt.GETTERS.SPORTS]),a=k(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),r=k(()=>t.getters[Ae.GETTERS.WORKOUT_DATA]);return(s,i)=>(A(),v("div",qke,[E("div",Xke,[$(wA,{authUser:a.value,sports:n.value,isCreation:!0,loading:r.value.loading},null,8,["authUser","sports","loading"])])]))}}),Qke={id:"edit-workout",class:"view"},Jke={class:"container"},e$e=Z({__name:"EditWorkout",setup(e){const t=qt(),n=Me(),a=k(()=>n.getters[K.GETTERS.AUTH_USER_PROFILE]),r=k(()=>n.getters[Mt.GETTERS.SPORTS]),s=k(()=>n.getters[Ae.GETTERS.WORKOUT_DATA]);return Ct(()=>{n.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,{workoutId:t.params.workoutId})}),We(()=>t.params.workoutId,async i=>{i||n.commit(Ae.MUTATIONS.EMPTY_WORKOUT)}),(i,o)=>(A(),v("div",Qke,[E("div",Jke,[s.value.workout.id?(A(),te(wA,{key:0,authUser:a.value,sports:r.value,workout:s.value.workout,loading:s.value.loading},null,8,["authUser","sports","workout","loading"])):x("",!0)])]))}}),Es=e=>(ut("data-v-e1628a52"),e=e(),lt(),e),t$e={id:"workout-card-title"},n$e=["disabled","title"],a$e=Es(()=>E("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),r$e=[a$e],s$e={class:"workout-card-title"},i$e={class:"workout-title-date"},o$e={key:0,class:"workout-title"},u$e=["aria-label"],l$e=Es(()=>E("i",{class:"fa fa-edit","aria-hidden":"true"},null,-1)),c$e=[l$e],d$e=["aria-label"],f$e=Es(()=>E("i",{class:"fa fa-download","aria-hidden":"true"},null,-1)),E$e=[f$e],p$e=["aria-label"],m$e=Es(()=>E("i",{class:"fa fa-trash","aria-hidden":"true"},null,-1)),h$e=[m$e],_$e={key:1,class:"workout-title"},T$e={class:"workout-segment"},g$e=Es(()=>E("i",{class:"fa fa-map-marker","aria-hidden":"true"},null,-1)),A$e={class:"workout-date"},S$e={class:"workout-link"},O$e=["disabled","title"],I$e=Es(()=>E("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),R$e=[I$e],b$e=Z({__name:"WorkoutCardTitle",props:{sport:{},workoutObject:{}},emits:["displayModal"],setup(e,{emit:t}){const n=e,a=t,{sport:r,workoutObject:s}=_e(n);async function i(u){await je.get(`workouts/${u}/gpx/download`,{responseType:"blob"}).then(c=>{const l=window.URL.createObjectURL(new Blob([c.data],{type:"application/gpx+xml"})),f=document.createElement("a");f.href=l,f.setAttribute("download",`${u}.gpx`),document.body.appendChild(f),f.click()})}function o(){a("displayModal",!0)}return(u,c)=>{const l=oe("SportImage"),f=oe("router-link");return A(),v("div",t$e,[E("button",{class:Se(["workout-previous workout-arrow transparent",{inactive:!h(s).previousUrl}]),disabled:!h(s).previousUrl,title:h(s).previousUrl?u.$t(`workouts.PREVIOUS_${h(s).type}`):u.$t(`workouts.NO_PREVIOUS_${h(s).type}`),onClick:c[0]||(c[0]=d=>h(s).previousUrl?u.$router.push(h(s).previousUrl):null)},r$e,10,n$e),E("div",s$e,[$(l,{"sport-label":h(r).label,color:h(r).color},null,8,["sport-label","color"]),E("div",i$e,[h(s).type==="WORKOUT"?(A(),v("div",o$e,[E("span",null,T(h(s).title),1),E("button",{class:"transparent icon-button",onClick:c[1]||(c[1]=d=>u.$router.push({name:"EditWorkout",params:{workoutId:h(s).workoutId}})),"aria-label":u.$t("workouts.EDIT_WORKOUT")},c$e,8,u$e),h(s).with_gpx?(A(),v("button",{key:0,class:"transparent icon-button",onClick:c[2]||(c[2]=Je(d=>i(h(s).workoutId),["prevent"])),"aria-label":u.$t("workouts.DOWNLOAD_WORKOUT")},E$e,8,d$e)):x("",!0),E("button",{id:"delete-workout-button",class:"transparent icon-button",onClick:Je(o,["prevent"]),"aria-label":u.$t("workouts.DELETE_WORKOUT")},h$e,8,p$e)])):h(s).segmentId!==null?(A(),v("div",_$e,[j(T(h(s).title)+" ",1),E("span",T$e,[j(" — "),g$e,j(" "+T(u.$t("workouts.SEGMENT"))+" "+T(h(s).segmentId+1),1)])])):x("",!0),E("div",A$e,[E("time",null,T(h(s).workoutDate)+" - "+T(h(s).workoutTime),1),E("span",S$e,[h(s).type==="SEGMENT"?(A(),te(f,{key:0,to:{name:"Workout",params:{workoutId:h(s).workoutId}}},{default:ue(()=>[j(" > "+T(u.$t("workouts.BACK_TO_WORKOUT")),1)]),_:1},8,["to"])):x("",!0)])])])]),E("button",{class:Se(["workout-next workout-arrow transparent",{inactive:!h(s).nextUrl}]),disabled:!h(s).nextUrl,title:h(s).nextUrl?u.$t(`workouts.NEXT_${h(s).type}`):u.$t(`workouts.NO_NEXT_${h(s).type}`),onClick:c[3]||(c[3]=d=>h(s).nextUrl?u.$router.push(h(s).nextUrl):null)},R$e,10,O$e)])}}}),N$e=ae(b$e,[["__scopeId","data-v-e1628a52"]]),v$e=e=>(ut("data-v-1b247cbe"),e=e(),lt(),e),C$e={key:0,class:"workout-record"},y$e=v$e(()=>E("sup",null,[E("i",{class:"fa fa-trophy","aria-hidden":"true"})],-1)),D$e=[y$e],P$e=Z({__name:"WorkoutRecord",props:{recordType:{},workoutObject:{}},setup(e){const t=e,{recordType:n,workoutObject:a}=_e(t);return(r,s)=>h(a).records&&h(a).records.find(i=>i.record_type===h(n))?(A(),v("span",C$e,D$e)):x("",!0)}}),Cs=ae(P$e,[["__scopeId","data-v-1b247cbe"]]),L$e="/img/weather/temperature.svg",w$e="/img/weather/pour-rain.svg",k$e="/img/weather/breeze.svg",$$e=["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"],U$e=e=>{const t=Math.floor(e/22.5+.5);return $$e[t%16]},M$e={class:"wind"},x$e={class:"wind-bearing"},F$e=["title"],z$e=Z({__name:"WeatherWind",props:{weather:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{useImperialUnits:n,weather:a}=_e(t),{t:r}=Yt();function s(i){return r(`workouts.WEATHER.WIND_DIRECTIONS.${U$e(i)}`)}return(i,o)=>(A(),v("div",M$e,[j(T(h(Hhe)(h(a).wind,h(n)))+" ",1),E("div",x$e,[h(a).windBearing?(A(),v("i",{key:0,class:"fa fa-long-arrow-down",style:Va({transform:`rotate(${h(a).windBearing}deg)`}),"aria-hidden":"true",title:s(h(a).windBearing)},null,12,F$e)):x("",!0)])]))}}),dh=ae(z$e,[["__scopeId","data-v-e1f7f9cc"]]),W$e=e=>(ut("data-v-be2fffb0"),e=e(),lt(),e),G$e={key:0,id:"workout-weather"},B$e={class:"weather-table"},H$e=W$e(()=>E("th",null,null,-1)),V$e={class:"weather-th"},j$e=["src","alt","title"],K$e={class:"weather-th"},Y$e=["src","alt","title"],q$e=["alt","title"],X$e=["alt","title"],Z$e=["alt","title"],Q$e=Z({__name:"WorkoutWeather",props:{workoutObject:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{useImperialUnits:n,workoutObject:a}=_e(t);return(r,s)=>h(a).weatherStart&&h(a).weatherEnd?(A(),v("div",G$e,[E("table",B$e,[E("thead",null,[E("tr",null,[H$e,E("th",null,[E("div",V$e,[j(T(r.$t("workouts.START"))+" ",1),E("img",{class:"weather-img",src:`/img/weather/${h(a).weatherStart.icon}.svg`,alt:r.$t(`workouts.WEATHER.DARK_SKY.${h(a).weatherStart.icon}`),title:r.$t(`workouts.WEATHER.DARK_SKY.${h(a).weatherStart.icon}`)},null,8,j$e)])]),E("th",null,[E("div",K$e,[j(T(r.$t("workouts.END"))+" ",1),E("img",{class:"weather-img",src:`/img/weather/${h(a).weatherEnd.icon}.svg`,alt:r.$t(`workouts.WEATHER.DARK_SKY.${h(a).weatherEnd.icon}`),title:r.$t(`workouts.WEATHER.DARK_SKY.${h(a).weatherEnd.icon}`)},null,8,Y$e)])])])]),E("tbody",null,[E("tr",null,[E("td",null,[E("img",{class:"weather-img weather-img-small",src:L$e,alt:r.$t("workouts.WEATHER.TEMPERATURE"),title:r.$t("workouts.WEATHER.TEMPERATURE")},null,8,q$e)]),E("td",null,T(h(Np)(h(a).weatherStart.temperature,h(n))),1),E("td",null,T(h(Np)(h(a).weatherEnd.temperature,h(n))),1)]),E("tr",null,[E("td",null,[E("img",{class:"weather-img weather-img-small",src:w$e,alt:r.$t("workouts.WEATHER.HUMIDITY"),title:r.$t("workouts.WEATHER.HUMIDITY")},null,8,X$e)]),E("td",null,T(Number(h(a).weatherStart.humidity*100).toFixed(1))+"% ",1),E("td",null,T(Number(h(a).weatherEnd.humidity*100).toFixed(1))+"% ",1)]),E("tr",null,[E("td",null,[E("img",{class:"weather-img weather-img-small",src:k$e,alt:r.$t("workouts.WEATHER.WIND"),title:r.$t("workouts.WEATHER.WIND")},null,8,Z$e)]),E("td",null,[$(dh,{weather:h(a).weatherStart,useImperialUnits:h(n)},null,8,["weather","useImperialUnits"])]),E("td",null,[$(dh,{weather:h(a).weatherEnd,useImperialUnits:h(n)},null,8,["weather","useImperialUnits"])])])])])])):x("",!0)}}),J$e=ae(Q$e,[["__scopeId","data-v-be2fffb0"]]),Sr=e=>(ut("data-v-9341b3e8"),e=e(),lt(),e),e8e={id:"workout-info"},t8e={class:"workout-data"},n8e=Sr(()=>E("i",{class:"fa fa-clock-o","aria-hidden":"true"},null,-1)),a8e={class:"label"},r8e={class:"value"},s8e={key:0},i8e={class:"value"},o8e={class:"value"},u8e={key:0,class:"workout-data"},l8e=Sr(()=>E("i",{class:"fa fa-road","aria-hidden":"true"},null,-1)),c8e={class:"label"},d8e={key:1,class:"workout-data"},f8e=Sr(()=>E("i",{class:"fa fa-tachometer","aria-hidden":"true"},null,-1)),E8e={class:"label"},p8e=Sr(()=>E("br",null,null,-1)),m8e={class:"label"},h8e={key:2,class:"workout-data"},_8e=["alt"],T8e={class:"label"},g8e=Sr(()=>E("br",null,null,-1)),A8e={class:"label"},S8e={key:3,class:"workout-data"},O8e=Sr(()=>E("i",{class:"fa fa-location-arrow","aria-hidden":"true"},null,-1)),I8e={class:"label"},R8e=Sr(()=>E("br",null,null,-1)),b8e={class:"label"},N8e=Z({__name:"WorkoutData",props:{workoutObject:{},useImperialUnits:{type:Boolean},displayHARecord:{type:Boolean}},setup(e){const t=e,{displayHARecord:n,workoutObject:a,useImperialUnits:r}=_e(t),s=k(()=>t.workoutObject.pauses!=="0:00:00"&&t.workoutObject.pauses!==null);return(i,o)=>{const u=oe("Distance");return A(),v("div",e8e,[E("div",t8e,[n8e,E("span",a8e,T(i.$t("workouts.DURATION")),1),j(": "),E("span",r8e,T(h(a).moving),1),$(Cs,{workoutObject:h(a),recordType:"LD"},null,8,["workoutObject"]),s.value?(A(),v("div",s8e,[j(" ("+T(i.$t("workouts.PAUSES"))+": ",1),E("span",i8e,T(h(a).pauses),1),j(" - "+T(i.$t("workouts.TOTAL_DURATION"))+": ",1),E("span",o8e,T(h(a).duration)+")",1)])):x("",!0)]),h(a).distance!==null?(A(),v("div",u8e,[l8e,E("span",c8e,T(i.$t("workouts.DISTANCE")),1),j(": "),$(u,{distance:h(a).distance,digits:3,unitFrom:"km",strong:!0,useImperialUnits:h(r)},null,8,["distance","useImperialUnits"]),$(Cs,{workoutObject:h(a),recordType:"FD"},null,8,["workoutObject"])])):x("",!0),h(a).aveSpeed!==null&&h(a).maxSpeed!==null?(A(),v("div",d8e,[f8e,E("span",E8e,T(i.$t("workouts.AVERAGE_SPEED")),1),j(": "),$(u,{distance:h(a).aveSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:h(r)},null,8,["distance","useImperialUnits"]),$(Cs,{workoutObject:h(a),recordType:"AS"},null,8,["workoutObject"]),p8e,E("span",m8e,T(i.$t("workouts.MAX_SPEED")),1),j(": "),$(u,{distance:h(a).maxSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:h(r)},null,8,["distance","useImperialUnits"]),$(Cs,{workoutObject:h(a),recordType:"MS"},null,8,["workoutObject"])])):x("",!0),h(a).maxAlt!==null&&h(a).minAlt!==null?(A(),v("div",h8e,[E("img",{class:"mountains",src:OA,alt:i.$t("workouts.ELEVATION")},null,8,_8e),E("span",T8e,T(i.$t("workouts.MIN_ALTITUDE")),1),j(": "),$(u,{distance:h(a).minAlt,unitFrom:"m",strong:!0,useImperialUnits:h(r)},null,8,["distance","useImperialUnits"]),g8e,E("span",A8e,T(i.$t("workouts.MAX_ALTITUDE")),1),j(": "),$(u,{distance:h(a).maxAlt,unitFrom:"m",strong:!0,useImperialUnits:h(r)},null,8,["distance","useImperialUnits"])])):x("",!0),h(a).ascent!==null&&h(a).descent!==null?(A(),v("div",S8e,[O8e,E("span",I8e,T(i.$t("workouts.ASCENT")),1),j(": "),$(u,{distance:h(a).ascent,unitFrom:"m",strong:!0,useImperialUnits:h(r)},null,8,["distance","useImperialUnits"]),h(n)?(A(),te(Cs,{key:0,workoutObject:h(a),recordType:"HA"},null,8,["workoutObject"])):x("",!0),R8e,E("span",b8e,T(i.$t("workouts.DESCENT")),1),j(": "),$(u,{distance:h(a).descent,unitFrom:"m",strong:!0,useImperialUnits:h(r)},null,8,["distance","useImperialUnits"])])):x("",!0),$(J$e,{workoutObject:h(a),useImperialUnits:h(r)},null,8,["workoutObject","useImperialUnits"])])}}}),v8e=ae(N8e,[["__scopeId","data-v-9341b3e8"]]);function Wr(e,t){return Array.from(e.getElementsByTagName(t))}function ps(e){return e==null||e.normalize(),e&&e.textContent||""}function dr(e,t,n){const a=e.getElementsByTagName(t),r=a.length?a[0]:null;return r&&n&&n(r),r}function C8e(e,t,n){const a={};if(!e)return a;const r=e.getElementsByTagName(t),s=r.length?r[0]:null;return s&&n?n(s,a):a}function kA(e,t,n){const a=ps(dr(e,t));return a&&n?n(a)||{}:{}}function fh(e,t,n){const a=parseFloat(ps(dr(e,t)));if(!isNaN(a))return a&&n?n(a)||{}:{}}function y8e(e,t,n){const a=parseFloat(ps(dr(e,t)));if(!isNaN(a))return n&&n(a),a}function Ud(e,t){const n={};for(const a of t)kA(e,a,r=>{n[a]=r});return n}function D8e(e){return(e==null?void 0:e.nodeType)===1}function $A(e){return C8e(e,"line",t=>Object.assign({},kA(t,"color",a=>({stroke:`#${a}`})),fh(t,"opacity",a=>({"stroke-opacity":a})),fh(t,"width",a=>({"stroke-width":a*96/25.4}))))}function UA(e){let t=[];if(e===null)return t;for(const n of Array.from(e.childNodes)){if(!D8e(n))continue;const a=P8e(n.nodeName);if(a==="gpxtpx:TrackPointExtension")t=t.concat(UA(n));else{const r=ps(n);t.push([a,L8e(r)])}}return t}function P8e(e){return["heart","gpxtpx:hr","hr"].includes(e)?"heart":e}function L8e(e){const t=parseFloat(e);return isNaN(t)?e:t}function MA(e){const t=[parseFloat(e.getAttribute("lon")||""),parseFloat(e.getAttribute("lat")||"")];if(isNaN(t[0])||isNaN(t[1]))return null;y8e(e,"ele",a=>{t.push(a)});const n=dr(e,"time");return{coordinates:t,time:n?ps(n):null,extendedValues:UA(dr(e,"extensions"))}}function mE(e){var r;const t=Ud(e,["name","cmt","desc","type","time","keywords"]),n=Array.from(e.getElementsByTagNameNS("http://www.garmin.com/xmlschemas/GpxExtensions/v3","*"));for(const s of n)((r=s.parentNode)==null?void 0:r.parentNode)===e&&(t[s.tagName.replace(":","_")]=ps(s));const a=Wr(e,"link");return a.length&&(t.links=a.map(s=>Object.assign({href:s.getAttribute("href")},Ud(s,["text","type"])))),t}function xA(e,t){const n=Wr(e,t),a=[],r=[],s={};for(let i=0;i1,i=Object.assign({_gpxType:"trk"},mE(e),$A(dr(e,"extensions")),a.length?{coordinateProperties:{times:s?a:a[0]}}:{});for(const o of r){n.push(o.line),i.coordinateProperties||(i.coordinateProperties={});const u=i.coordinateProperties,c=Object.entries(o.extendedValues);for(let l=0;lnew Array(p.line.length).fill(null))),u[f][l]=d):u[f]=d}}return{type:"Feature",properties:i,geometry:s?{type:"MultiLineString",coordinates:n}:{type:"LineString",coordinates:n[0]}}}function $8e(e){const t=Object.assign(mE(e),Ud(e,["sym"])),n=MA(e);return n?{type:"Feature",properties:t,geometry:{type:"Point",coordinates:n.coordinates}}:null}function*U8e(e){for(const t of Wr(e,"trk")){const n=k8e(t);n&&(yield n)}for(const t of Wr(e,"rte")){const n=w8e(t);n&&(yield n)}for(const t of Wr(e,"wpt")){const n=$8e(t);n&&(yield n)}}function M8e(e){return{type:"FeatureCollection",features:Array.from(U8e(e))}}const Eh=(e,t)=>{for(const n of Object.keys(t))e.on(n,t[n])},FA=e=>{for(const t of Object.keys(e)){const n=e[t];n&&La(n.cancel)&&n.cancel()}},x8e=e=>!e||typeof e.charAt!="function"?e:e.charAt(0).toUpperCase()+e.slice(1),La=e=>typeof e=="function",ha=(e,t,n)=>{for(const a in n){const r="set"+x8e(a);e[r]?We(()=>n[a],(s,i)=>{e[r](s,i)}):t[r]&&We(()=>n[a],s=>{t[r](s)})}},ea=(e,t,n={})=>{const a={...n};for(const r in e){const s=t[r],i=e[r];s&&(s&&s.custom===!0||i!==void 0&&(a[r]=i))}return a},Or=e=>{const t={},n={};for(const a in e)if(a.startsWith("on")&&!a.startsWith("onUpdate")&&a!=="onReady"){const r=a.slice(2).toLocaleLowerCase();t[r]=e[a]}else n[a]=e[a];return{listeners:t,attrs:n}},F8e=async e=>{const t=await Promise.all([Dt(()=>import("./maps-ZyuCPqes.js").then(n=>n.m),__vite__mapDeps([0,1])),Dt(()=>import("./maps-ZyuCPqes.js").then(n=>n.b),__vite__mapDeps([0,1])),Dt(()=>import("./maps-ZyuCPqes.js").then(n=>n.d),__vite__mapDeps([0,1]))]);delete e.Default.prototype._getIconUrl,e.Default.mergeOptions({iconRetinaUrl:t[0].default,iconUrl:t[1].default,shadowUrl:t[2].default})},co=e=>{const t=ce((...a)=>console.warn(`Method ${e} has been invoked without being replaced`)),n=(...a)=>t.value(...a);return n.wrapped=t,tn(e,n),n},fo=(e,t)=>e.wrapped.value=t,Dn=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||globalThis,bn=e=>{const t=It(e);if(t===void 0)throw new Error(`Attempt to inject ${e.description} before it was provided.`);return t},_a=Symbol("useGlobalLeaflet"),Za=Symbol("addLayer"),hE=Symbol("removeLayer"),zA=Symbol("registerControl"),WA=Symbol("registerLayerControl"),GA=Symbol("canSetParentHtml"),BA=Symbol("setParentHtml"),HA=Symbol("setIcon"),z8e=Symbol("bindPopup"),W8e=Symbol("bindTooltip"),G8e=Symbol("unbindPopup"),B8e=Symbol("unbindTooltip"),ki={options:{type:Object,default:()=>({}),custom:!0}},Il=e=>({options:e.options,methods:{}}),ms={...ki,pane:{type:String},attribution:{type:String},name:{type:String,custom:!0},layerType:{type:String,custom:!0},visible:{type:Boolean,custom:!0,default:!0}},_E=(e,t,n)=>{const a=bn(Za),r=bn(hE),{options:s,methods:i}=Il(e),o=ea(e,ms,s),u=()=>a({leafletObject:t.value}),c=()=>r({leafletObject:t.value}),l={...i,setAttribution(f){c(),t.value.options.attribution=f,e.visible&&u()},setName(){c(),e.visible&&u()},setLayerType(){c(),e.visible&&u()},setVisible(f){t.value&&(f?u():c())},bindPopup(f){if(!t.value||!La(t.value.bindPopup)){console.warn("Attempt to bind popup before bindPopup method available on layer.");return}t.value.bindPopup(f)},bindTooltip(f){if(!t.value||!La(t.value.bindTooltip)){console.warn("Attempt to bind tooltip before bindTooltip method available on layer.");return}t.value.bindTooltip(f)},unbindTooltip(){t.value&&(La(t.value.closeTooltip)&&t.value.closeTooltip(),La(t.value.unbindTooltip)&&t.value.unbindTooltip())},unbindPopup(){t.value&&(La(t.value.closePopup)&&t.value.closePopup(),La(t.value.unbindPopup)&&t.value.unbindPopup())},updateVisibleProp(f){n.emit("update:visible",f)}};return tn(z8e,l.bindPopup),tn(W8e,l.bindTooltip),tn(G8e,l.unbindPopup),tn(B8e,l.unbindTooltip),Nt(()=>{l.unbindPopup(),l.unbindTooltip(),c()}),{options:o,methods:l}},TE=(e,t)=>{if(e&&t.default)return Tn("div",{style:{display:"none"}},t.default())},H8e={...ms,interactive:{type:Boolean,default:void 0},bubblingMouseEvents:{type:Boolean,default:void 0}},VA={...H8e,stroke:{type:Boolean,default:void 0},color:{type:String},weight:{type:Number},opacity:{type:Number},lineCap:{type:String},lineJoin:{type:String},dashArray:{type:String},dashOffset:{type:String},fill:{type:Boolean,default:void 0},fillColor:{type:String},fillOpacity:{type:Number},fillRule:{type:String},className:{type:String}},V8e={...VA,radius:{type:Number},latLng:{type:[Object,Array],required:!0,custom:!0}};({...V8e});const hs={...ki,position:{type:String}},jA=(e,t)=>{const{options:n,methods:a}=Il(e),r=ea(e,hs,n),s={...a,setPosition(i){t.value&&t.value.setPosition(i)}};return Nt(()=>{t.value&&t.value.remove()}),{options:r,methods:s}},j8e=e=>e.default?Tn("div",{ref:"root"},e.default()):null,ph=Z({name:"LControl",props:{...hs,disableClickPropagation:{type:Boolean,custom:!0,default:!0},disableScrollPropagation:{type:Boolean,custom:!0,default:!1}},setup(e,t){const n=ce(),a=ce(),r=It(_a),s=bn(zA),{options:i,methods:o}=jA(e,n);return _t(async()=>{const{Control:u,DomEvent:c}=r?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(f=>f.e),__vite__mapDeps([0,1])),l=u.extend({onAdd(){return a.value}});n.value=Xn(new l(i)),ha(o,n.value,e),s({leafletObject:n.value}),e.disableClickPropagation&&a.value&&c.disableClickPropagation(a.value),e.disableScrollPropagation&&a.value&&c.disableScrollPropagation(a.value),nn(()=>t.emit("ready",n.value))}),{root:a,leafletObject:n}},render(){return j8e(this.$slots)}});({...hs});const KA={...hs,collapsed:{type:Boolean,default:void 0},autoZIndex:{type:Boolean,default:void 0},hideSingleBase:{type:Boolean,default:void 0},sortLayers:{type:Boolean,default:void 0},sortFunction:{type:Function}},K8e=(e,t)=>{const{options:n}=jA(e,t);return{options:ea(e,KA,n),methods:{addLayer(a){a.layerType==="base"?t.value.addBaseLayer(a.leafletObject,a.name):a.layerType==="overlay"&&t.value.addOverlay(a.leafletObject,a.name)},removeLayer(a){t.value.removeLayer(a.leafletObject)}}}},Y8e=Z({name:"LControlLayers",props:KA,setup(e,t){const n=ce(),a=It(_a),r=bn(WA),{options:s,methods:i}=K8e(e,n);return _t(async()=>{const{control:o}=a?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(u=>u.e),__vite__mapDeps([0,1]));n.value=Xn(o.layers(void 0,void 0,s)),ha(i,n.value,e),r({...e,...i,leafletObject:n.value}),nn(()=>t.emit("ready",n.value))}),{leafletObject:n}},render(){return null}});({...hs});({...hs});const Rl={...ms},YA=(e,t,n)=>{const{options:a,methods:r}=_E(e,t,n),s=ea(e,Rl,a),i={...r,addLayer(o){t.value.addLayer(o.leafletObject)},removeLayer(o){t.value.removeLayer(o.leafletObject)}};return tn(Za,i.addLayer),tn(hE,i.removeLayer),{options:s,methods:i}};({...Rl});const qA={...Rl,geojson:{type:[Object,Array],custom:!0},optionsStyle:{type:Function,custom:!0}},q8e=(e,t,n)=>{const{options:a,methods:r}=YA(e,t,n),s=ea(e,qA,a);Object.prototype.hasOwnProperty.call(e,"optionsStyle")&&(s.style=e.optionsStyle);const i={...r,setGeojson(o){t.value.clearLayers(),t.value.addData(o)},setOptionsStyle(o){t.value.setStyle(o)},getGeoJSONData(){return t.value.toGeoJSON()},getBounds(){return t.value.getBounds()}};return{options:s,methods:i}},X8e=Z({props:qA,setup(e,t){const n=ce(),a=ce(!1),r=It(_a),s=bn(Za),{methods:i,options:o}=q8e(e,n,t);return _t(async()=>{const{geoJSON:u}=r?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(l=>l.e),__vite__mapDeps([0,1]));n.value=Xn(u(e.geojson,o));const{listeners:c}=Or(t.attrs);n.value.on(c),ha(i,n.value,e),s({...e,...i,leafletObject:n.value}),a.value=!0,nn(()=>t.emit("ready",n.value))}),{ready:a,leafletObject:n}},render(){return TE(this.ready,this.$slots)}}),gE={...ms,opacity:{type:Number},zIndex:{type:Number},tileSize:{type:[Number,Array,Object]},noWrap:{type:Boolean,default:void 0},minZoom:{type:Number},maxZoom:{type:Number},className:{type:String}},XA=(e,t,n)=>{const{options:a,methods:r}=_E(e,t,n),s=ea(e,gE,a),i={...r,setTileComponent(){var o;(o=t.value)==null||o.redraw()}};return Nt(()=>{t.value.off()}),{options:s,methods:i}},Z8e=(e,t,n,a)=>e.extend({initialize(r){this.tileComponents={},this.on("tileunload",this._unloadTile),n.setOptions(this,r)},createTile(r){const s=this._tileCoordsToKey(r);this.tileComponents[s]=t.create("div");const i=Tn({setup:a,props:["coords"]},{coords:r});return kI(i,this.tileComponents[s]),this.tileComponents[s]},_unloadTile(r){const s=this._tileCoordsToKey(r.coords);this.tileComponents[s]&&(this.tileComponents[s].innerHTML="",this.tileComponents[s]=void 0)}});({...gE});const mh={iconUrl:{type:String},iconRetinaUrl:{type:String},iconSize:{type:[Object,Array]},iconAnchor:{type:[Object,Array]},popupAnchor:{type:[Object,Array]},tooltipAnchor:{type:[Object,Array]},shadowUrl:{type:String},shadowRetinaUrl:{type:String},shadowSize:{type:[Object,Array]},shadowAnchor:{type:[Object,Array]},bgPos:{type:[Object,Array]},className:{type:String}},Q8e=Z({name:"LIcon",props:{...mh,...ki},setup(e,t){const n=ce(),a=It(_a),r=bn(GA),s=bn(BA),i=bn(HA);let o,u,c,l,f;const d=(b,R,N)=>{const S=b&&b.innerHTML;if(!R){N&&f&&r()&&s(S);return}const{listeners:O}=Or(t.attrs);f&&u(f,O);const{options:C}=Il(e),P=ea(e,mh,C);S&&(P.html=S),f=P.html?c(P):l(P),o(f,O),i(f)},p=()=>{nn(()=>d(n.value,!0,!1))},m=()=>{nn(()=>d(n.value,!1,!0))},I={setIconUrl:p,setIconRetinaUrl:p,setIconSize:p,setIconAnchor:p,setPopupAnchor:p,setTooltipAnchor:p,setShadowUrl:p,setShadowRetinaUrl:p,setShadowAnchor:p,setBgPos:p,setClassName:p,setHtml:p};return _t(async()=>{const{DomEvent:b,divIcon:R,icon:N}=a?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(S=>S.e),__vite__mapDeps([0,1]));o=b.on,u=b.off,c=R,l=N,ha(I,{},e),new MutationObserver(m).observe(n.value,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),p()}),{root:n}},render(){const e=this.$slots.default?this.$slots.default():void 0;return Tn("div",{ref:"root"},e)}});({...ms});const J8e=Z({props:Rl,setup(e,t){const n=ce(),a=ce(!1),r=It(_a),s=bn(Za),{methods:i}=YA(e,n,t);return _t(async()=>{const{layerGroup:o}=r?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(c=>c.e),__vite__mapDeps([0,1]));n.value=Xn(o(void 0,e.options));const{listeners:u}=Or(t.attrs);n.value.on(u),ha(i,n.value,e),s({...e,...i,leafletObject:n.value}),a.value=!0,nn(()=>t.emit("ready",n.value))}),{ready:a,leafletObject:n}},render(){return TE(this.ready,this.$slots)}});function ZA(e,t,n){var a,r,s;t===void 0&&(t=50),n===void 0&&(n={});var i=(a=n.isImmediate)!=null&&a,o=(r=n.callback)!=null&&r,u=n.maxWait,c=Date.now(),l=[];function f(){if(u!==void 0){var p=Date.now()-c;if(p+t>=u)return u-p}return t}var d=function(){var p=[].slice.call(arguments),m=this;return new Promise(function(I,b){var R=i&&s===void 0;if(s!==void 0&&clearTimeout(s),s=setTimeout(function(){if(s=void 0,c=Date.now(),!i){var S=e.apply(m,p);o&&o(S),l.forEach(function(O){return(0,O.resolve)(S)}),l=[]}},f()),R){var N=e.apply(m,p);return o&&o(N),I(N)}l.push({resolve:I,reject:b})})};return d.cancel=function(p){s!==void 0&&clearTimeout(s),l.forEach(function(m){return(0,m.reject)(p)}),l=[]},d}const hh={...ki,center:{type:[Object,Array]},bounds:{type:[Array,Object]},maxBounds:{type:[Array,Object]},zoom:{type:Number},minZoom:{type:Number},maxZoom:{type:Number},paddingBottomRight:{type:[Object,Array]},paddingTopLeft:{type:Object},padding:{type:Object},worldCopyJump:{type:Boolean,default:void 0},crs:{type:[String,Object]},maxBoundsViscosity:{type:Number},inertia:{type:Boolean,default:void 0},inertiaDeceleration:{type:Number},inertiaMaxSpeed:{type:Number},easeLinearity:{type:Number},zoomAnimation:{type:Boolean,default:void 0},zoomAnimationThreshold:{type:Number},fadeAnimation:{type:Boolean,default:void 0},markerZoomAnimation:{type:Boolean,default:void 0},noBlockingAnimations:{type:Boolean,default:void 0},useGlobalLeaflet:{type:Boolean,default:!0,custom:!0}},e5e=Z({inheritAttrs:!1,emits:["ready","update:zoom","update:center","update:bounds"],props:hh,setup(e,t){const n=ce(),a=Gt({ready:!1,layersToAdd:[],layersInControl:[]}),{options:r}=Il(e),s=ea(e,hh,r),{listeners:i,attrs:o}=Or(t.attrs),u=co(Za),c=co(hE),l=co(zA),f=co(WA);tn(_a,e.useGlobalLeaflet);const d=k(()=>{const R={};return e.noBlockingAnimations&&(R.animate=!1),R}),p=k(()=>{const R=d.value;return e.padding&&(R.padding=e.padding),e.paddingTopLeft&&(R.paddingTopLeft=e.paddingTopLeft),e.paddingBottomRight&&(R.paddingBottomRight=e.paddingBottomRight),R}),m={moveend:ZA(R=>{a.leafletRef&&(t.emit("update:zoom",a.leafletRef.getZoom()),t.emit("update:center",a.leafletRef.getCenter()),t.emit("update:bounds",a.leafletRef.getBounds()))}),overlayadd(R){const N=a.layersInControl.find(S=>S.name===R.name);N&&N.updateVisibleProp(!0)},overlayremove(R){const N=a.layersInControl.find(S=>S.name===R.name);N&&N.updateVisibleProp(!1)}};_t(async()=>{e.useGlobalLeaflet&&(Dn.L=Dn.L||await Dt(()=>import("./maps-ZyuCPqes.js").then(W=>W.l),__vite__mapDeps([0,1])));const{map:R,CRS:N,Icon:S,latLngBounds:O,latLng:C,stamp:P}=e.useGlobalLeaflet?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(W=>W.e),__vite__mapDeps([0,1]));try{s.beforeMapMount&&await s.beforeMapMount()}catch(W){console.error(`The following error occurred running the provided beforeMapMount hook ${W.message}`)}await F8e(S);const M=typeof s.crs=="string"?N[s.crs]:s.crs;s.crs=M||N.EPSG3857;const L={addLayer(W){W.layerType!==void 0&&(a.layerControl===void 0?a.layersToAdd.push(W):a.layersInControl.find(B=>P(B.leafletObject)===P(W.leafletObject))||(a.layerControl.addLayer(W),a.layersInControl.push(W))),W.visible!==!1&&a.leafletRef.addLayer(W.leafletObject)},removeLayer(W){W.layerType!==void 0&&(a.layerControl===void 0?a.layersToAdd=a.layersToAdd.filter(B=>B.name!==W.name):(a.layerControl.removeLayer(W.leafletObject),a.layersInControl=a.layersInControl.filter(B=>P(B.leafletObject)!==P(W.leafletObject)))),a.leafletRef.removeLayer(W.leafletObject)},registerLayerControl(W){a.layerControl=W,a.layersToAdd.forEach(B=>{a.layerControl.addLayer(B)}),a.layersToAdd=[],l(W)},registerControl(W){a.leafletRef.addControl(W.leafletObject)},setZoom(W){const B=a.leafletRef.getZoom();W!==B&&a.leafletRef.setZoom(W,d.value)},setCrs(W){const B=a.leafletRef.getBounds();a.leafletRef.options.crs=W,a.leafletRef.fitBounds(B,{animate:!1,padding:[0,0]})},fitBounds(W){a.leafletRef.fitBounds(W,p.value)},setBounds(W){if(!W)return;const B=O(W);B.isValid()&&!(a.lastSetBounds||a.leafletRef.getBounds()).equals(B,0)&&(a.lastSetBounds=B,a.leafletRef.fitBounds(B))},setCenter(W){if(W==null)return;const B=C(W),w=a.lastSetCenter||a.leafletRef.getCenter();(w.lat!==B.lat||w.lng!==B.lng)&&(a.lastSetCenter=B,a.leafletRef.panTo(B,d.value))}};fo(u,L.addLayer),fo(c,L.removeLayer),fo(l,L.registerControl),fo(f,L.registerLayerControl),a.leafletRef=Xn(R(n.value,s)),ha(L,a.leafletRef,e),Eh(a.leafletRef,m),Eh(a.leafletRef,i),a.ready=!0,nn(()=>t.emit("ready",a.leafletRef))}),hi(()=>{FA(m),a.leafletRef&&(a.leafletRef.off(),a.leafletRef.remove())});const I=k(()=>a.leafletRef),b=k(()=>a.ready);return{root:n,ready:b,leafletObject:I,attrs:o}},render({attrs:e}){return e.style||(e.style={}),e.style.width||(e.style.width="100%"),e.style.height||(e.style.height="100%"),Tn("div",{...e,ref:"root"},this.ready&&this.$slots.default?this.$slots.default():{})}}),t5e=["Symbol(Comment)","Symbol(Text)"],n5e=["LTooltip","LPopup"],QA={...ms,draggable:{type:Boolean,default:void 0},icon:{type:[Object]},zIndexOffset:{type:Number},latLng:{type:[Object,Array],custom:!0,required:!0}},a5e=(e,t,n)=>{const{options:a,methods:r}=_E(e,t,n),s=ea(e,QA,a),i={...r,setDraggable(o){t.value.dragging&&(o?t.value.dragging.enable():t.value.dragging.disable())},latLngSync(o){n.emit("update:latLng",o.latlng),n.emit("update:lat-lng",o.latlng)},setLatLng(o){if(o!=null&&t.value){const u=t.value.getLatLng();(!u||!u.equals(o))&&t.value.setLatLng(o)}}};return{options:s,methods:i}},r5e=(e,t)=>{const n=t.slots.default&&t.slots.default();return n&&n.length&&n.some(s5e)};function s5e(e){return!(t5e.includes(e.type.toString())||n5e.includes(e.type.name))}const JA=Z({name:"LMarker",props:QA,setup(e,t){const n=ce(),a=ce(!1),r=It(_a),s=bn(Za);tn(GA,()=>{var c;return!!((c=n.value)!=null&&c.getElement())}),tn(BA,c=>{var l,f;const d=La((l=n.value)==null?void 0:l.getElement)&&((f=n.value)==null?void 0:f.getElement());d&&(d.innerHTML=c)}),tn(HA,c=>{var l;return((l=n.value)==null?void 0:l.setIcon)&&n.value.setIcon(c)});const{options:i,methods:o}=a5e(e,n,t),u={moveHandler:ZA(o.latLngSync)};return _t(async()=>{const{marker:c,divIcon:l}=r?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(d=>d.e),__vite__mapDeps([0,1]));r5e(i,t)&&(i.icon=l({className:""})),n.value=Xn(c(e.latLng,i));const{listeners:f}=Or(t.attrs);n.value.on(f),n.value.on("move",u.moveHandler),ha(o,n.value,e),s({...e,...o,leafletObject:n.value}),a.value=!0,nn(()=>t.emit("ready",n.value))}),hi(()=>FA(u)),{ready:a,leafletObject:n}},render(){return TE(this.ready,this.$slots)}}),i5e={...VA,smoothFactor:{type:Number},noClip:{type:Boolean,default:void 0},latLngs:{type:Array,required:!0,custom:!0}},_h={...i5e},eS={...ki,content:{type:String,default:null}};({...eS});({..._h,latLngs:{..._h.latLngs}});const AE={...gE,tms:{type:Boolean,default:void 0},subdomains:{type:[String,Array],validator:e=>typeof e=="string"?!0:Array.isArray(e)?e.every(t=>typeof t=="string"):!1},detectRetina:{type:Boolean,default:void 0},url:{type:String,required:!0,custom:!0}},o5e=(e,t,n)=>{const{options:a,methods:r}=XA(e,t,n),s=ea(e,AE,a),i={...r};return{options:s,methods:i}},u5e=Z({props:AE,setup(e,t){const n=ce(),a=It(_a),r=bn(Za),{options:s,methods:i}=o5e(e,n,t);return _t(async()=>{const{tileLayer:o}=a?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(c=>c.e),__vite__mapDeps([0,1]));n.value=Xn(o(e.url,s));const{listeners:u}=Or(t.attrs);n.value.on(u),ha(i,n.value,e),r({...e,...i,leafletObject:n.value}),nn(()=>t.emit("ready",n.value))}),{leafletObject:n}},render(){return null}});({...eS});({...AE});const Th=Z({__name:"CustomMarker",props:{markerCoordinates:{},isStart:{type:Boolean}},setup(e){const t=e,{isStart:n,markerCoordinates:a}=_e(t);return(r,s)=>h(a).latitude?(A(),te(h(JA),{key:0,"lat-lng":[h(a).latitude,h(a).longitude]},{default:ue(()=>[$(h(Q8e),{"icon-url":`/img/workouts/${h(n)?"start":"finish"}.svg`,iconSize:[15,15]},null,8,["icon-url"])]),_:1},8,["lat-lng"])):x("",!0)}}),l5e=e=>(ut("data-v-dac2dfa0"),e=e(),lt(),e),c5e={id:"workout-map"},d5e={key:0,class:"leaflet-container"},f5e={key:1},E5e=l5e(()=>E("i",{class:"fa fa-refresh","aria-hidden":"true"},null,-1)),p5e={key:1,class:"no-map"},m5e=Z({__name:"index",props:{workoutData:{},markerCoordinates:{default:()=>({})}},setup(e){const t=e,n=Me(),{workoutData:a,markerCoordinates:r}=_e(t),s=ce(null),i=k(()=>b()),o=k(()=>n.getters[H.GETTERS.APP_CONFIG]),u=k(()=>m(i)),c=k(()=>t.workoutData&&t.workoutData.gpx?p(t.workoutData.gpx):{}),l=k(()=>t.workoutData&&t.workoutData.chartData.length>0?{latitude:t.workoutData.chartData[0].latitude,longitude:t.workoutData.chartData[0].longitude}:{}),f=k(()=>t.workoutData&&t.workoutData.chartData.length>0?{latitude:t.workoutData.chartData[t.workoutData.chartData.length-1].latitude,longitude:t.workoutData.chartData[t.workoutData.chartData.length-1].longitude}:{}),d=ce(!1);function p(S){if(!S||S!=="")try{return{jsonData:M8e(new DOMParser().parseFromString(S,"text/xml"))}}catch{return console.error("Invalid gpx content"),{}}return{}}function m(S){return[(S.value[0][0]+S.value[1][0])/2,(S.value[0][1]+S.value[1][1])/2]}function I(S){var O,C;(O=s.value)!=null&&O.leafletObject&&((C=s.value)==null||C.leafletObject.fitBounds(S))}function b(){return t.workoutData?[[t.workoutData.workout.bounds[0],t.workoutData.workout.bounds[1]],[t.workoutData.workout.bounds[2],t.workoutData.workout.bounds[3]]]:[]}function R(){var S;(S=s.value)==null||S.leafletObject.fitBounds(b())}function N(){d.value=!d.value,d.value||setTimeout(()=>{R()},100)}return(S,O)=>{const C=oe("VFullscreen");return A(),v("div",c5e,[h(a).loading?(A(),v("div",d5e)):(A(),v("div",f5e,[h(a).workout.with_gpx?(A(),te(C,{key:0,modelValue:d.value,"onUpdate:modelValue":O[1]||(O[1]=P=>d.value=P)},{default:ue(()=>[E("div",{class:Se(["leaflet-container",{"fullscreen-map":d.value}])},[c.value.jsonData&&u.value&&i.value.length===2?(A(),te(h(e5e),{key:0,zoom:13,maxZoom:19,center:u.value,bounds:i.value,zoomAnimation:!1,ref_key:"workoutMap",ref:s,onReady:O[0]||(O[0]=P=>I(i.value)),"use-global-leaflet":!1,class:"map"},{default:ue(()=>[$(h(Y8e)),$(h(ph),{position:"topleft",class:"map-control",tabindex:"0",role:"button","aria-label":S.$t("workouts.RESET_ZOOM"),onClick:R},{default:ue(()=>[E5e]),_:1},8,["aria-label"]),$(h(ph),{position:"topleft",class:"map-control",tabindex:"0",role:"button","aria-label":S.$t(`workouts.${d.value?"EXIT":"VIEW"}_FULLSCREEN`),onClick:N},{default:ue(()=>[E("i",{class:Se(`fa fa-${d.value?"compress":"arrows-alt"}`),"aria-hidden":"true"},null,2)]),_:1},8,["aria-label"]),$(h(u5e),{url:`${h(Si)()}workouts/map_tile/{s}/{z}/{x}/{y}.png`,attribution:o.value.map_attribution,bounds:i.value},null,8,["url","attribution","bounds"]),$(h(X8e),{geojson:c.value.jsonData},null,8,["geojson"]),h(r).latitude?(A(),te(h(JA),{key:0,"lat-lng":[h(r).latitude,h(r).longitude]},null,8,["lat-lng"])):x("",!0),$(h(J8e),{name:S.$t("workouts.START_AND_FINISH"),"layer-type":"overlay"},{default:ue(()=>[l.value.latitude?(A(),te(Th,{key:0,markerCoordinates:l.value,isStart:!0},null,8,["markerCoordinates"])):x("",!0),f.value.latitude?(A(),te(Th,{key:1,markerCoordinates:f.value,isStart:!1},null,8,["markerCoordinates"])):x("",!0)]),_:1},8,["name"])]),_:1},8,["center","bounds"])):x("",!0)],2)]),_:1},8,["modelValue"])):(A(),v("div",p5e,T(S.$t("workouts.NO_MAP")),1))]))])}}}),h5e=ae(m5e,[["__scopeId","data-v-dac2dfa0"]]),_5e={class:"workout-detail"},T5e=Z({__name:"index",props:{authUser:{},displaySegment:{type:Boolean},sports:{},workoutData:{},markerCoordinates:{default:()=>({})}},setup(e){const t=e,n=qt(),a=Me(),{authUser:r,markerCoordinates:s,workoutData:i}=_e(t),o=k(()=>t.workoutData.workout),u=ce(n.params.workoutId?+n.params.segmentId:null),c=k(()=>o.value.segments.length>0&&u.value?o.value.segments[+u.value-1]:null),l=ce(!1),f=k(()=>t.sports?t.sports.find(S=>S.id===t.workoutData.workout.sport_id):{}),d=k(()=>m(o.value,c.value));function p(S,O,C){const P=O&&C&&C!==1?`/workouts/${S.id}/segment/${C-1}`:!O&&S.previous_workout?`/workouts/${S.previous_workout}`:null,M=O&&C&&Cn.params.segmentId,async S=>{S&&(u.value=+S,N())}),We(()=>n.params.workoutId,async S=>{S&&(l.value=!1,N())}),(S,O)=>{const C=oe("Modal"),P=oe("Card");return A(),v("div",_5e,[l.value?(A(),te(C,{key:0,title:S.$t("common.CONFIRMATION"),message:S.$t("workouts.WORKOUT_DELETION_CONFIRMATION"),onConfirmAction:O[0]||(O[0]=M=>R(d.value.workoutId)),onCancelAction:b,onKeydown:At(b,["esc"])},null,8,["title","message"])):x("",!0),$(P,null,{title:ue(()=>[f.value?(A(),te(N$e,{key:0,sport:f.value,workoutObject:d.value,onDisplayModal:O[1]||(O[1]=M=>I(!0))},null,8,["sport","workoutObject"])):x("",!0)]),content:ue(()=>[$(h5e,{workoutData:h(i),markerCoordinates:h(s)},null,8,["workoutData","markerCoordinates"]),$(v8e,{workoutObject:d.value,useImperialUnits:h(r).imperial_units,displayHARecord:h(r).display_ascent},null,8,["workoutObject","useImperialUnits","displayHARecord"])]),_:1})])}}}),g5e=ae(T5e,[["__scopeId","data-v-f8b05eca"]]),A5e=e=>{const t=document.getElementById(e);if(t){let n=t.querySelector("ul");return n||(n=document.createElement("ul"),t.appendChild(n)),n}throw new Error("No legend container")},S5e={id:"htmlLegend",afterUpdate(e,t,n){var s,i,o,u,c,l;const a=A5e(n.containerID);for(;a.firstChild;)a.firstChild.remove();((o=(i=(s=e.options.plugins)==null?void 0:s.legend)==null?void 0:i.labels)!=null&&o.generateLabels?(l=(c=(u=e.options.plugins)==null?void 0:u.legend)==null?void 0:c.labels)==null?void 0:l.generateLabels(e):[]).forEach(f=>{var b,R,N;if(!((N=(R=(b=e.config.options)==null?void 0:b.scales)==null?void 0:R.yElevation)!=null&&N.display)&&f.datasetIndex===1)return;const d=document.createElement("li");d.onclick=()=>{f.datasetIndex!==void 0&&(e.setDatasetVisibility(f.datasetIndex,!e.isDatasetVisible(f.datasetIndex)),e.update())};const p=document.createElement("input");p&&(p.type="checkbox",p.id=f.text,p.checked=!f.hidden);const m=document.createTextNode(f.text),I=document.createElement("span");I&&(I.style.background=String(f.fillStyle),I.style.borderColor=String(f.strokeStyle)),d.appendChild(p),d.appendChild(m),d.appendChild(I),a.appendChild(d)})}},O5e=e=>(ut("data-v-b15bb69d"),e=e(),lt(),e),I5e={id:"workout-chart"},R5e={class:"chart-radio"},b5e=["checked"],N5e=["checked"],v5e=O5e(()=>E("div",{id:"chart-legend"},null,-1)),C5e={class:"line-chart"},y5e={class:"chart-info"},D5e={class:"no-data-cleaning"},P5e={key:0,class:"elevation-start"},L5e=["checked"],w5e=Z({__name:"index",props:{authUser:{},workoutData:{}},emits:["getCoordinates"],setup(e,{emit:t}){const n=e,a=t,r=_f(),{t:s}=Yt(),{authUser:i,workoutData:o}=_e(n),u=k(()=>r.getters[H.GETTERS.DARK_MODE]),c=k(()=>hf(u.value)),l=ce(!0),f=ce(i.value.start_elevation_at_zero),d=k(()=>e4e(o.value.chartData,s,i.value.imperial_units,c.value)),p=k(()=>d.value&&d.value.datasets.elevation.data.length>0),m=B("km"),I=B("m"),b=k(()=>({labels:l.value?d.value.distance_labels:d.value.duration_labels,datasets:JSON.parse(JSON.stringify([d.value.datasets.speed,d.value.datasets.elevation]))})),R=k(()=>d.value.coordinates),N=k(()=>({color:c.value?$a.darkMode.line:$a.ligthMode.line})),S=k(()=>({color:c.value?$a.darkMode.text:$a.ligthMode.text})),O=k(()=>({responsive:!0,maintainAspectRatio:!1,animation:!1,layout:{padding:{top:22}},scales:{x:{grid:{drawOnChartArea:!1,...N.value},border:{...N.value},ticks:{count:10,callback:function(w){return l.value?Number(w).toFixed(2):M(w)},...S.value},type:"linear",bounds:"data",title:{display:!0,text:l.value?s("workouts.DISTANCE")+` (${m})`:s("workouts.DURATION"),...S.value}},ySpeed:{grid:{drawOnChartArea:!1,...N.value},border:{...N.value},position:"left",title:{display:!0,text:s("workouts.SPEED")+` (${m}/h)`,...S.value},ticks:{...S.value}},yElevation:{beginAtZero:f.value,display:p.value,grid:{drawOnChartArea:!1,...N.value},border:{...N.value},position:"right",title:{display:!0,text:s("workouts.ELEVATION")+` (${I})`,...S.value},ticks:{...S.value}}},elements:{point:{pointStyle:"circle",pointRadius:0}},plugins:{datalabels:{display:!1},tooltip:{interaction:{intersect:!1,mode:"index"},callbacks:{label:function(w){const X=` ${w.dataset.label}: ${w.formattedValue}`;return w.dataset.yAxisID==="yElevation"?X+` ${I}`:X+` ${m}/h`},title:function(w){return w.length>0&&L(R.value[w[0].dataIndex]),w.length===0?"":l.value?`${s("workouts.DISTANCE")}: ${w[0].label} ${m}`:`${s("workouts.DURATION")}: ${M(w[0].label.replace(",",""))}`}}},legend:{display:!1},htmlLegend:{containerID:"chart-legend",displayElevation:p.value}}})),C=[S5e];function P(){l.value=!l.value}function M(w){return new Date(+w*1e3).toISOString().substr(11,8)}function L(w){a("getCoordinates",w)}function W(){L({latitude:null,longitude:null})}function B(w){return n.authUser.imperial_units?Pn[w].defaultTarget:w}return(w,X)=>{const J=oe("Card");return A(),v("div",I5e,[$(J,null,{title:ue(()=>[j(T(w.$t("workouts.ANALYSIS")),1)]),content:ue(()=>[E("div",R5e,[E("label",null,[E("input",{type:"radio",name:"distance",checked:l.value,onClick:P},null,8,b5e),j(" "+T(w.$t("workouts.DISTANCE")),1)]),E("label",null,[E("input",{type:"radio",name:"duration",checked:!l.value,onClick:P},null,8,N5e),j(" "+T(w.$t("workouts.DURATION")),1)])]),v5e,E("div",C5e,[$(h(J4e),{data:b.value,options:O.value,plugins:C,onMouseleave:W},null,8,["data","options"])]),E("div",y5e,[E("div",D5e,T(w.$t("workouts.NO_DATA_CLEANING")),1),p.value?(A(),v("div",P5e,[E("label",null,[E("input",{type:"checkbox",checked:f.value,onClick:X[0]||(X[0]=ne=>f.value=!f.value)},null,8,L5e),j(" "+T(w.$t("workouts.START_ELEVATION_AT_ZERO")),1)])])):x("",!0)])]),_:1})])}}}),k5e=ae(w5e,[["__scopeId","data-v-b15bb69d"]]),$5e={id:"workout-note"},U5e=["innerHTML"],M5e=Z({__name:"WorkoutNotes",props:{notes:{default:()=>""}},setup(e){const t=e,{notes:n}=_e(t);return(a,r)=>{const s=oe("Card");return A(),v("div",$5e,[$(s,null,{title:ue(()=>[j(T(a.$t("workouts.NOTES")),1)]),content:ue(()=>[E("span",{innerHTML:h(n)&&h(n)!==""?h(di)(h(n)):a.$t("workouts.NO_NOTES")},null,8,U5e)]),_:1})])}}}),x5e=ae(M5e,[["__scopeId","data-v-f3e81eff"]]),F5e={id:"workout-segments"},z5e=Z({__name:"WorkoutSegments",props:{segments:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{segments:n,useImperialUnits:a}=_e(t);return(r,s)=>{const i=oe("router-link"),o=oe("Distance"),u=oe("Card");return A(),v("div",F5e,[$(u,null,{title:ue(()=>[j(T(r.$t("workouts.SEGMENT",2)),1)]),content:ue(()=>[E("ul",null,[(A(!0),v(be,null,Ge(h(n),(c,l)=>(A(),v("li",{key:c.segment_id},[$(i,{to:{name:"WorkoutSegment",params:{workoutId:c.workout_id,segmentId:l+1}}},{default:ue(()=>[j(T(r.$t("workouts.SEGMENT",1))+" "+T(l+1),1)]),_:2},1032,["to"]),j(" ("+T(r.$t("workouts.DISTANCE"))+": ",1),$(o,{distance:c.distance,unitFrom:"km",useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),j(", "+T(r.$t("workouts.DURATION"))+": "+T(c.duration)+") ",1)]))),128))])]),_:1})])}}}),W5e=ae(z5e,[["__scopeId","data-v-15725c61"]]),G5e=e=>(ut("data-v-eac6aa4b"),e=e(),lt(),e),B5e={id:"workout",class:"view"},H5e={class:"container"},V5e={key:0,class:"workout-container"},j5e={key:0},K5e=G5e(()=>E("div",{id:"bottom"},null,-1)),Y5e={key:1},q5e=Z({__name:"Workout",props:{displaySegment:{type:Boolean}},setup(e){const t=e,n=qt(),a=Me(),{displaySegment:r}=_e(t),s=k(()=>a.getters[Ae.GETTERS.WORKOUT_DATA]),i=k(()=>a.getters[K.GETTERS.AUTH_USER_PROFILE]),o=k(()=>a.getters[Mt.GETTERS.SPORTS]),u=ce({latitude:null,longitude:null});Ct(()=>{const l={workoutId:n.params.workoutId};t.displaySegment&&(l.segmentId=n.params.segmentId),a.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,l)}),Nt(()=>{a.commit(Ae.MUTATIONS.EMPTY_WORKOUT)});function c(l){u.value={latitude:l.latitude,longitude:l.longitude}}return We(()=>n.params.workoutId,async l=>{l&&a.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,{workoutId:l})}),We(()=>n.params.segmentId,async l=>{if(n.params.workoutId){const f={workoutId:n.params.workoutId};l&&(f.segmentId=l),a.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,f)}}),(l,f)=>(A(),v("div",B5e,[E("div",H5e,[o.value.length>0?(A(),v("div",V5e,[s.value.workout.id?(A(),v("div",j5e,[$(g5e,{workoutData:s.value,sports:o.value,authUser:i.value,markerCoordinates:u.value,displaySegment:h(r)},null,8,["workoutData","sports","authUser","markerCoordinates","displaySegment"]),s.value.workout.with_gpx&&s.value.chartData.length>0?(A(),te(k5e,{key:0,workoutData:s.value,authUser:i.value,displaySegment:h(r),onGetCoordinates:c},null,8,["workoutData","authUser","displaySegment"])):x("",!0),!h(r)&&s.value.workout.segments.length>1?(A(),te(W5e,{key:1,segments:s.value.workout.segments,useImperialUnits:i.value.imperial_units},null,8,["segments","useImperialUnits"])):x("",!0),h(r)?x("",!0):(A(),te(x5e,{key:2,notes:s.value.workout.notes},null,8,["notes"])),K5e])):(A(),v("div",Y5e,[s.value.loading?x("",!0):(A(),te(dE,{key:0,target:"WORKOUT"}))]))])):x("",!0)])]))}}),gh=ae(q5e,[["__scopeId","data-v-eac6aa4b"]]),X5e=e=>(ut("data-v-29caaf8f"),e=e(),lt(),e),Z5e={class:"workouts-filters"},Q5e={class:"box"},J5e={class:"form-all-items"},eUe={class:"form-items-group"},tUe={class:"form-item"},nUe=["value"],aUe={class:"form-item"},rUe=["value"],sUe={class:"form-items-group"},iUe={class:"form-item"},oUe=["value"],uUe=X5e(()=>E("option",{value:""},null,-1)),lUe=["value"],cUe={class:"form-item form-item-title"},dUe={class:"form-inputs-group"},fUe=["value"],EUe={class:"form-items-group"},pUe={class:"form-item"},mUe={class:"form-inputs-group"},hUe=["value"],_Ue=["value"],TUe={class:"form-items-group"},gUe={class:"form-item"},AUe={class:"form-inputs-group"},SUe=["value"],OUe=["value"],IUe={class:"form-items-group"},RUe={class:"form-item"},bUe={class:"form-inputs-group"},NUe=["value"],vUe=["value"],CUe={class:"form-items-group"},yUe={class:"form-item"},DUe={class:"form-inputs-group"},PUe=["value"],LUe=["value"],wUe={class:"form-button"},kUe=Z({__name:"WorkoutsFilters",props:{authUser:{},sports:{}},emits:["filter"],setup(e,{emit:t}){const n=e,a=t,{t:r}=Yt(),s=qt(),i=Ya(),{authUser:o}=_e(n),u=o.value.imperial_units?Pn.km.defaultTarget:"km",c=k(()=>Xa(n.sports,r));let l=Object.assign({},s.query);_t(()=>{const m=document.getElementById("from");m&&m.focus()});function f(m){const I=m.target.name,b=m.target.value;b===""?delete l[I]:l[I]=b}function d(){a("filter"),"page"in l&&(l.page="1"),i.push({path:"/workouts",query:l})}function p(){a("filter"),i.push({path:"/workouts",query:{}})}return We(()=>s.query,m=>{l=Object.assign({},m)}),(m,I)=>(A(),v("div",Z5e,[E("div",Q5e,[E("form",{onSubmit:Je(d,["prevent"]),class:"form"},[E("div",J5e,[E("div",eUe,[E("div",tUe,[E("label",null,T(m.$t("workouts.FROM"))+": ",1),E("input",{id:"from",name:"from",type:"date",value:m.$route.query.from,onChange:f},null,40,nUe)]),E("div",aUe,[E("label",null,T(m.$t("workouts.TO"))+": ",1),E("input",{name:"to",type:"date",value:m.$route.query.to,onChange:f},null,40,rUe)])]),E("div",sUe,[E("div",iUe,[E("label",null,T(m.$t("workouts.SPORT",1))+":",1),E("select",{name:"sport_id",value:m.$route.query.sport_id,onChange:f,onKeyup:At(d,["enter"])},[uUe,(A(!0),v(be,null,Ge(c.value.filter(b=>h(o).sports_list.includes(b.id)),b=>(A(),v("option",{value:b.id,key:b.id},T(b.translatedLabel),9,lUe))),128))],40,oUe)]),E("div",cUe,[E("label",null,T(m.$t("workouts.TITLE",1))+":",1),E("div",dUe,[E("input",{class:"title",name:"title",value:m.$route.query.title,onChange:f,placeholder:"",type:"text",onKeyup:At(d,["enter"])},null,40,fUe)])])]),E("div",EUe,[E("div",pUe,[E("label",null,T(m.$t("workouts.DISTANCE"))+" ("+T(h(u))+"): ",1),E("div",mUe,[E("input",{name:"distance_from",type:"number",min:"0",step:"0.1",value:m.$route.query.distance_from,onChange:f,onKeyup:At(d,["enter"])},null,40,hUe),E("span",null,T(m.$t("workouts.TO")),1),E("input",{name:"distance_to",type:"number",min:"0",step:"0.1",value:m.$route.query.distance_to,onChange:f,onKeyup:At(d,["enter"])},null,40,_Ue)])])]),E("div",TUe,[E("div",gUe,[E("label",null,T(m.$t("workouts.DURATION"))+": ",1),E("div",AUe,[E("input",{name:"duration_from",value:m.$route.query.duration_from,onChange:f,pattern:"^([0-9]*[0-9]):([0-5][0-9])$",placeholder:"hh:mm",type:"text",onKeyup:At(d,["enter"])},null,40,SUe),E("span",null,T(m.$t("workouts.TO")),1),E("input",{name:"duration_to",value:m.$route.query.duration_to,onChange:f,pattern:"^([0-9]*[0-9]):([0-5][0-9])$",placeholder:"hh:mm",type:"text",onKeyup:At(d,["enter"])},null,40,OUe)])])]),E("div",IUe,[E("div",RUe,[E("label",null,T(m.$t("workouts.AVE_SPEED"))+" ("+T(h(u))+"/h): ",1),E("div",bUe,[E("input",{min:"0",name:"ave_speed_from",value:m.$route.query.ave_speed_from,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,NUe),E("span",null,T(m.$t("workouts.TO")),1),E("input",{min:"0",name:"ave_speed_to",value:m.$route.query.ave_speed_to,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,vUe)])])]),E("div",CUe,[E("div",yUe,[E("label",null,T(m.$t("workouts.MAX_SPEED"))+" ("+T(h(u))+"/h): ",1),E("div",DUe,[E("input",{min:"0",name:"max_speed_from",value:m.$route.query.max_speed_from,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,PUe),E("span",null,T(m.$t("workouts.TO")),1),E("input",{min:"0",name:"max_speed_to",value:m.$route.query.max_speed_to,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,LUe)])])])]),E("div",wUe,[E("button",{type:"submit",class:"confirm",onClick:d},T(m.$t("buttons.FILTER")),1),E("button",{class:"confirm",onClick:p},T(m.$t("buttons.CLEAR_FILTER")),1)])],32)])]))}}),$Ue=ae(kUe,[["__scopeId","data-v-29caaf8f"]]),tS=e=>(ut("data-v-bb980a00"),e=e(),lt(),e),UUe={class:"workouts-list"},MUe={class:"total"},xUe={class:"total-label"},FUe={key:0},zUe={key:0,class:"workouts-table responsive-table"},WUe=tS(()=>E("th",{class:"sport-col"},null,-1)),GUe={class:"sport-col"},BUe={class:"cell-heading"},HUe=["onMouseover"],VUe={class:"cell-heading"},jUe={key:0,class:"fa fa-map-o","aria-hidden":"true"},KUe={class:"title"},YUe={class:"workout-date"},qUe={class:"cell-heading"},XUe={class:"text-right"},ZUe={class:"cell-heading"},QUe={class:"text-right"},JUe={class:"cell-heading"},e7e={class:"text-right"},t7e={class:"cell-heading"},n7e={class:"text-right"},a7e={class:"cell-heading"},r7e={class:"text-right"},s7e={class:"cell-heading"},i7e={class:"text-right"},o7e={class:"cell-heading"},u7e=tS(()=>E("div",{id:"bottom"},null,-1)),l7e=Z({__name:"WorkoutsList",props:{user:{},sports:{}},setup(e){const t=e,n=Me(),a=qt(),r=Ya(),{user:s,sports:i}=_e(t),o=["ave_speed","distance","duration","workout_date"],u=k(()=>n.getters[Ae.GETTERS.USER_WORKOUTS]),c=k(()=>n.getters[Ae.GETTERS.WORKOUTS_PAGINATION]),l=k(()=>n.getters[H.GETTERS.LANGUAGE]);let f=I(a.query);const d=ce(null);Ct(()=>{p(f)});function p(N){n.dispatch(Ae.ACTIONS.GET_USER_WORKOUTS,s.value.imperial_units?b(N):N)}function m(N,S){const O=Object.assign({},a.query);O[N]=S,N==="per_page"&&(O.page="1"),f=I(O),r.push({path:"/workouts",query:f})}function I(N){const S=yd(N,o,Ei.order_by,{defaultSort:Ei.order});return Object.keys(N).filter(O=>XRe.includes(O)).map(O=>{typeof N[O]=="string"&&(S[O]=N[O])}),S}function b(N){const S={...N};return Object.entries(S).map(O=>{O[0].match("speed|distance")&&O[1]&&(S[O[0]]=on(+O[1],"mi","km"))}),S}function R(N){d.value=N}return We(()=>a.query,async N=>{f=I(N),p(f)}),(N,S)=>{const O=oe("SportImage"),C=oe("router-link"),P=oe("Distance");return A(),v("div",UUe,[E("div",{class:Se(["box",{"empty-table":u.value.length===0}])},[E("div",MUe,[E("span",xUe,T(N.$t("common.TOTAL").toLowerCase())+": ",1),c.value.total?(A(),v("span",FUe,T(c.value.total)+" "+T(N.$t("workouts.WORKOUT",c.value.total)),1)):x("",!0)]),$(qg,{sort:h(oE),order_by:o,query:h(f),message:"workouts",onUpdateSelect:m},null,8,["sort","query"]),u.value.length>0?(A(),v("div",zUe,[$(ku,{class:"top-pagination",pagination:c.value,path:"/workouts",query:h(f)},null,8,["pagination","query"]),E("table",null,[E("thead",{class:Se({smaller:l.value==="de"})},[E("tr",null,[WUe,E("th",null,T(bt(N.$t("workouts.WORKOUT",1))),1),E("th",null,T(bt(N.$t("workouts.DATE"))),1),E("th",null,T(bt(N.$t("workouts.DISTANCE"))),1),E("th",null,T(bt(N.$t("workouts.DURATION"))),1),E("th",null,T(bt(N.$t("workouts.AVE_SPEED"))),1),E("th",null,T(bt(N.$t("workouts.MAX_SPEED"))),1),E("th",null,T(bt(N.$t("workouts.ASCENT"))),1),E("th",null,T(bt(N.$t("workouts.DESCENT"))),1)])],2),E("tbody",null,[(A(!0),v(be,null,Ge(u.value,M=>(A(),v("tr",{key:M.id},[E("td",GUe,[E("span",BUe,T(N.$t("workouts.SPORT",1)),1),h(i).length>0?(A(),te(O,{key:0,title:h(i).filter(L=>L.id===M.sport_id)[0].translatedLabel,"sport-label":h(sE)(M,h(i)),color:h(iE)(M,h(i))},null,8,["title","sport-label","color"])):x("",!0)]),E("td",{class:"workout-title",onMouseover:L=>R(M.id),onMouseleave:S[0]||(S[0]=L=>R(null))},[E("span",VUe,T(bt(N.$t("workouts.WORKOUT",1))),1),$(C,{class:"nav-item",to:{name:"Workout",params:{workoutId:M.id}}},{default:ue(()=>[M.with_gpx?(A(),v("i",jUe)):x("",!0),E("span",KUe,T(M.title),1)]),_:2},1032,["to"]),M.with_gpx&&d.value===M.id?(A(),te(IA,{key:0,workout:M,"display-hover":!0},null,8,["workout"])):x("",!0)],40,HUe),E("td",YUe,[E("span",qUe,T(N.$t("workouts.DATE")),1),E("time",null,T(h($n)(M.workout_date,h(s).timezone,h(s).date_format)),1)]),E("td",XUe,[E("span",ZUe,T(N.$t("workouts.DISTANCE")),1),M.distance!==null?(A(),te(P,{key:0,distance:M.distance,unitFrom:"km",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)]),E("td",QUe,[E("span",JUe,T(N.$t("workouts.DURATION")),1),j(" "+T(M.moving),1)]),E("td",e7e,[E("span",t7e,T(N.$t("workouts.AVE_SPEED")),1),M.ave_speed!==null?(A(),te(P,{key:0,distance:M.ave_speed,unitFrom:"km",speed:!0,useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)]),E("td",n7e,[E("span",a7e,T(N.$t("workouts.MAX_SPEED")),1),M.max_speed!==null?(A(),te(P,{key:0,distance:M.max_speed,unitFrom:"km",speed:!0,useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)]),E("td",r7e,[E("span",s7e,T(N.$t("workouts.ASCENT")),1),M.ascent!==null?(A(),te(P,{key:0,distance:M.ascent,unitFrom:"m",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)]),E("td",i7e,[E("span",o7e,T(N.$t("workouts.DESCENT")),1),M.descent!==null?(A(),te(P,{key:0,distance:M.descent,unitFrom:"m",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)])]))),128))])]),$(ku,{pagination:c.value,path:"/workouts",query:h(f)},null,8,["pagination","query"])])):x("",!0)],2),u.value.length===0?(A(),te(EE,{key:0})):x("",!0),u7e])}}}),c7e=ae(l7e,[["__scopeId","data-v-bb980a00"]]),d7e={key:0,id:"workouts",class:"view"},f7e={class:"container workouts-container"},E7e={class:"display-filters"},p7e={class:"list-container"},m7e=Z({__name:"WorkoutsView",setup(e){const{t}=Yt(),n=Me(),a=k(()=>n.getters[K.GETTERS.AUTH_USER_PROFILE]),r=k(()=>n.getters[Mt.GETTERS.SPORTS]),s=k(()=>Xa(r.value,t)),i=ce(!0);function o(){i.value=!i.value}return(u,c)=>a.value.username?(A(),v("div",d7e,[E("div",f7e,[E("div",{class:Se(["filters-container",{hidden:i.value}])},[$($Ue,{sports:s.value,authUser:a.value,onFilter:o},null,8,["sports","authUser"])],2),E("div",E7e,[E("div",{onClick:o},[E("i",{class:Se(`fa fa-caret-${i.value?"down":"up"}`),"aria-hidden":"true"},null,2),E("span",null,T(u.$t(`workouts.${i.value?"DISPLAY":"HIDE"}_FILTERS`)),1)])]),E("div",p7e,[$(c7e,{user:a.value,sports:s.value},null,8,["user","sports"])])])])):x("",!0)}}),h7e=ae(m7e,[["__scopeId","data-v-3fa59b88"]]),{t:Ah}=_r.global,Sh=e=>{const t=/(\/profile)(\/edit)*(\/*)/,n=e.replace(t,"").toUpperCase();return n===""?"PROFILE":n.toUpperCase()},_7e=[{path:"/",name:"Dashboard",component:_we,meta:{title:"dashboard.DASHBOARD"}},{path:"/login",name:"Login",component:lh,props:{action:"login"},meta:{title:"user.LOGIN",withoutAuth:!0}},{path:"/register",name:"Register",component:lh,props:{action:"register"},meta:{title:"user.REGISTER",withoutAuth:!0}},{path:"/account-confirmation",name:"AccountConfirmation",component:y6e,meta:{title:"user.ACCOUNT_CONFIRMATION",withoutAuth:!0}},{path:"/account-confirmation/resend",name:"AccountConfirmationResend",component:uh,props:{action:"account-confirmation-resend"},meta:{title:"buttons.ACCOUNT-CONFIRMATION-RESEND",withoutAuth:!0}},{path:"/account-confirmation/email-sent",name:"AccountConfirmationEmailSend",component:uh,props:{action:"email-sent"},meta:{title:"buttons.ACCOUNT-CONFIRMATION-RESEND",withoutAuth:!0}},{path:"/password-reset/sent",name:"PasswordEmailSent",component:lo,props:{action:"request-sent"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset/request",name:"PasswordResetRequest",component:lo,props:{action:"reset-request"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset/password-updated",name:"PasswordUpdated",component:lo,props:{action:"password-updated"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset",name:"PasswordReset",component:lo,props:{action:"reset"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/email-update",name:"EmailUpdate",component:w6e,meta:{title:"user.EMAIL_UPDATE",withoutChecks:!0}},{path:"/profile",name:"Profile",component:ike,children:[{path:"",name:"UserProfile",component:bNe,props:e=>({tab:Sh(e.path)}),children:[{path:"",name:"UserInfos",component:sA,meta:{title:"user.PROFILE.TABS.PROFILE"}},{path:"preferences",name:"UserPreferences",component:KNe,meta:{title:"user.PROFILE.TABS.PREFERENCES"}},{path:"sports",name:"UserSportPreferences",component:Jm,props:{isEdition:!1},meta:{title:"user.PROFILE.TABS.SPORTS"}},{path:"apps",name:"UserApps",component:Zye,children:[{path:"",name:"UserAppsList",component:_De,meta:{title:"user.PROFILE.TABS.APPS"}},{path:":id",name:"UserApp",component:Qm,meta:{title:"user.PROFILE.TABS.APPS"}},{path:":id/created",name:"CreatedUserApp",component:Qm,props:{afterCreation:!0},meta:{title:"user.PROFILE.TABS.APPS"}},{path:"new",name:"AddUserApp",component:xye,meta:{title:"user.PROFILE.TABS.APPS"}},{path:"authorize",name:"AuthorizeUserApp",component:qye,meta:{title:"user.PROFILE.TABS.APPS"}}]}]},{path:"edit",name:"UserProfileEdition",component:qNe,props:e=>({tab:Sh(e.path)}),children:[{path:"",name:"UserInfosEdition",component:K3e,meta:{title:"user.PROFILE.EDIT"}},{path:"account",name:"UserAccountEdition",component:P3e,meta:{title:"user.PROFILE.ACCOUNT_EDITION"}},{path:"picture",name:"UserPictureEdition",component:aCe,meta:{title:"user.PROFILE.PICTURE_EDITION"}},{path:"preferences",name:"UserPreferencesEdition",component:tye,meta:{title:"user.PROFILE.EDIT_PREFERENCES"}},{path:"sports",name:"UserSportPreferencesEdition",component:Jm,props:{isEdition:!0},meta:{title:"user.PROFILE.EDIT_SPORTS_PREFERENCES"}},{path:"privacy-policy",name:"UserPrivacyPolicy",component:mye,meta:{title:"user.PROFILE.PRIVACY-POLICY_EDITION"}}]}]},{path:"/statistics",name:"Statistics",component:Kwe,meta:{title:"statistics.STATISTICS"}},{path:"/users/:username",name:"User",component:ch,meta:{title:"administration.USER"}},{path:"/workouts",name:"Workouts",component:h7e,meta:{title:"workouts.WORKOUT",count:0}},{path:"/workouts/:workoutId",name:"Workout",component:gh,props:{displaySegment:!1},meta:{title:"workouts.WORKOUT"}},{path:"/workouts/:workoutId/edit",name:"EditWorkout",component:e$e,meta:{title:"workouts.EDIT_WORKOUT"}},{path:"/workouts/:workoutId/segment/:segmentId",name:"WorkoutSegment",component:gh,props:{displaySegment:!0},meta:{title:"workouts.SEGMENT",count:0}},{path:"/workouts/add",name:"AddWorkout",component:Zke,meta:{title:"workouts.ADD_WORKOUT"}},{path:"/admin",name:"Administration",component:yPe,children:[{path:"",name:"AdministrationMenu",component:_Re,meta:{title:"admin.ADMINISTRATION"}},{path:"application",name:"ApplicationAdministration",component:Cm,meta:{title:"admin.APP_CONFIG.TITLE"}},{path:"application/edit",name:"ApplicationAdministrationEdition",component:Cm,props:{edition:!0},meta:{title:"admin.APPLICATION"}},{path:"sports",name:"SportsAdministration",component:zRe,meta:{title:"admin.SPORTS.TITLE"}},{path:"users/:username",name:"UserFromAdmin",component:ch,props:{fromAdmin:!0},meta:{title:"admin.USER",count:1}},{path:"users",name:"UsersAdministration",component:rNe,meta:{title:"admin.USERS.TITLE"}}]},{path:"/about",name:"About",component:gPe,meta:{title:"common.ABOUT",withoutChecks:!0}},{path:"/privacy-policy",name:"PrivacyPolicy",component:Iwe,meta:{title:"privacy_policy.TITLE",withoutChecks:!0}},{path:"/:pathMatch(.*)*",name:"not-found",component:gwe,meta:{title:"error.NOT_FOUND.PAGE"}}],nS=Y_e({history:c_e("/"),routes:_7e});nS.beforeEach((e,t,n)=>{if("title"in e.meta){const a=typeof e.meta.title=="string"?e.meta.title:"",r=a?typeof e.meta.count=="number"?Ah(a,+e.meta.count):Ah(a):"";window.document.title=`FitTrackee${a?` - ${bt(r)}`:""}`}Bs.dispatch(K.ACTIONS.CHECK_AUTH_USER).then(()=>{if(e.meta.withoutChecks)return n();if(Bs.getters[K.GETTERS.IS_AUTHENTICATED]&&e.meta.withoutAuth)return n("/");if(!Bs.getters[K.GETTERS.IS_AUTHENTICATED]&&!e.meta.withoutAuth){const a=e.path==="/"?{path:"/login"}:{path:"/login",query:{from:e.fullPath}};n(a)}else n()}).catch(a=>{console.error(a),n()})});const Rt=nS;Md.register(rS,sS,iS,oS,uS,lS,cS,Oh,dS,Ih,fS,ES);const aS=$I(Che).provide("sportColors",rE).use(_r).use(Bs).use(Rt).use(Sb,{name:"VFullscreen"}).directive("click-outside",Ige);Oge.forEach(e=>{aS.component(e.name,e.target)});aS.mount("#app");
function __vite__mapDeps(indexes) {
if (!__vite__mapDeps.viteFileDeps) {
__vite__mapDeps.viteFileDeps = ["static/maps-ZyuCPqes.js","static/css/maps-B7qTrBCW.css"]