@konnectio/core 4.11.3 → 4.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ActionField-dg0RS8gf.js → ActionField-DBxduvRT.js} +1 -1
- package/dist/ActionField-DBxduvRT.js.br +0 -0
- package/dist/ActionField-DBxduvRT.js.gz +0 -0
- package/dist/{AvailabilitySkeleton-uoeeP_5d.js → AvailabilitySkeleton-DoVzHCoF.js} +2 -2
- package/dist/AvailabilitySkeleton-DoVzHCoF.js.br +0 -0
- package/dist/AvailabilitySkeleton-DoVzHCoF.js.gz +0 -0
- package/dist/{CheckoutWindow-DXRVoh-J.js → CheckoutWindow-CJq8smYV.js} +4 -4
- package/dist/CheckoutWindow-CJq8smYV.js.br +0 -0
- package/dist/CheckoutWindow-CJq8smYV.js.gz +0 -0
- package/dist/{ErrorMessage-OQ4r9QGR.js → ErrorMessage-voedvcXr.js} +1 -1
- package/dist/ErrorMessage-voedvcXr.js.br +0 -0
- package/dist/ErrorMessage-voedvcXr.js.gz +0 -0
- package/dist/{EventAvailabilityForm-B4pOCkcm.js → EventAvailabilityForm-BjLCcN_W.js} +2 -2
- package/dist/EventAvailabilityForm-BjLCcN_W.js.br +0 -0
- package/dist/EventAvailabilityForm-BjLCcN_W.js.gz +0 -0
- package/dist/{Field-DpRx5gtJ.js → Field-2Hbk9ahl.js} +1 -1
- package/dist/Field-2Hbk9ahl.js.br +0 -0
- package/dist/Field-2Hbk9ahl.js.gz +0 -0
- package/dist/{HotelAvailabilityForm-BSM-KcqG.js → HotelAvailabilityForm-v-z9AFWI.js} +2 -2
- package/dist/HotelAvailabilityForm-v-z9AFWI.js.br +0 -0
- package/dist/HotelAvailabilityForm-v-z9AFWI.js.gz +0 -0
- package/dist/{SelectField-CEEffgaQ.js → SelectField-w9Labj2W.js} +2913 -2907
- package/dist/SelectField-w9Labj2W.js.br +0 -0
- package/dist/SelectField-w9Labj2W.js.gz +0 -0
- package/dist/{TermsOfService-C4YZ5zhE.js → TermsOfService-D8q2gi5I.js} +2 -2
- package/dist/TermsOfService-D8q2gi5I.js.br +0 -0
- package/dist/TermsOfService-D8q2gi5I.js.gz +4 -0
- package/dist/{_-DM-h5BQz.js → _-Cpgd04rM.js} +1 -1
- package/dist/_-Cpgd04rM.js.br +0 -0
- package/dist/_-Cpgd04rM.js.gz +0 -0
- package/dist/availability.js +7 -7
- package/dist/availability.js.br +0 -0
- package/dist/availability.js.gz +0 -0
- package/dist/cancel-reservation.js +4 -4
- package/dist/cancel-reservation.js.br +0 -0
- package/dist/cancel-reservation.js.gz +0 -0
- package/dist/core.css +1 -1
- package/dist/core.css.br +0 -0
- package/dist/core.css.gz +0 -0
- package/dist/{dist-BQy2-bMP.js → dist-0CoL4k9r.js} +4 -4
- package/dist/dist-0CoL4k9r.js.br +0 -0
- package/dist/dist-0CoL4k9r.js.gz +0 -0
- package/dist/{dist-Q9kXoafy.js → dist-Drv0vus3.js} +2 -2
- package/dist/dist-Drv0vus3.js.br +0 -0
- package/dist/dist-Drv0vus3.js.gz +0 -0
- package/dist/event.js +10 -10
- package/dist/event.js.br +0 -0
- package/dist/event.js.gz +0 -0
- package/dist/gift-card-validation.js +7 -7
- package/dist/gift-card-validation.js.br +0 -0
- package/dist/gift-card-validation.js.gz +0 -0
- package/dist/gift-card.js +182 -83
- package/dist/gift-card.js.br +0 -0
- package/dist/gift-card.js.gz +0 -0
- package/dist/giftCard-6oDMPMDe.js +134 -0
- package/dist/giftCard-6oDMPMDe.js.br +0 -0
- package/dist/giftCard-6oDMPMDe.js.gz +0 -0
- package/dist/hotel.js +145 -145
- package/dist/hotel.js.br +0 -0
- package/dist/hotel.js.gz +0 -0
- package/dist/polyfill.js +1 -1
- package/dist/polyfill.js.br +0 -0
- package/dist/polyfill.js.gz +0 -0
- package/dist/{style-xK2dve9W.js → style-BJBxZSi0.js} +1 -1
- package/dist/style-BJBxZSi0.js.br +0 -0
- package/dist/style-BJBxZSi0.js.gz +0 -0
- package/dist-wix/availability.js +2 -2
- package/dist-wix/event.js +2 -2
- package/dist-wix/gift-card-validation.js +23 -23
- package/dist-wix/gift-card.js +37 -37
- package/dist-wix/hotel.js +4 -4
- package/package.json +1 -1
- package/dist/ActionField-dg0RS8gf.js.br +0 -0
- package/dist/ActionField-dg0RS8gf.js.gz +0 -0
- package/dist/AvailabilitySkeleton-uoeeP_5d.js.br +0 -0
- package/dist/AvailabilitySkeleton-uoeeP_5d.js.gz +0 -0
- package/dist/CheckoutWindow-DXRVoh-J.js.br +0 -0
- package/dist/CheckoutWindow-DXRVoh-J.js.gz +0 -0
- package/dist/ErrorMessage-OQ4r9QGR.js.br +0 -0
- package/dist/ErrorMessage-OQ4r9QGR.js.gz +0 -0
- package/dist/EventAvailabilityForm-B4pOCkcm.js.br +0 -0
- package/dist/EventAvailabilityForm-B4pOCkcm.js.gz +0 -0
- package/dist/Field-DpRx5gtJ.js.br +0 -0
- package/dist/Field-DpRx5gtJ.js.gz +0 -0
- package/dist/HotelAvailabilityForm-BSM-KcqG.js.br +0 -0
- package/dist/HotelAvailabilityForm-BSM-KcqG.js.gz +0 -0
- package/dist/SelectField-CEEffgaQ.js.br +0 -0
- package/dist/SelectField-CEEffgaQ.js.gz +0 -0
- package/dist/TermsOfService-C4YZ5zhE.js.br +0 -0
- package/dist/TermsOfService-C4YZ5zhE.js.gz +0 -0
- package/dist/_-DM-h5BQz.js.br +0 -0
- package/dist/_-DM-h5BQz.js.gz +0 -0
- package/dist/dist-BQy2-bMP.js.br +0 -0
- package/dist/dist-BQy2-bMP.js.gz +0 -0
- package/dist/dist-Q9kXoafy.js.br +0 -0
- package/dist/dist-Q9kXoafy.js.gz +0 -0
- package/dist/giftCard-DO4ELDIx.js +0 -113
- package/dist/giftCard-DO4ELDIx.js.br +0 -0
- package/dist/giftCard-DO4ELDIx.js.gz +0 -0
- package/dist/style-xK2dve9W.js.br +0 -0
- package/dist/style-xK2dve9W.js.gz +0 -0
package/dist-wix/event.js
CHANGED
|
@@ -30,7 +30,7 @@ Content-Type: `+String(xe.type||`application/octet-stream`).replace(/[\r\n]/g,``
|
|
|
30
30
|
`,EMOJI_VARIATION=`️`,EMOJI_JOINER=``,OBJECT_REPLACEMENT=``,tlds=null,utlds=null;function init$2(te=[]){let oe={};State$1.groups=oe;let xe=new State$1;tlds??=decodeTlds(encodedTlds),utlds??=decodeTlds(encodedUtlds),tt$1(xe,`'`,APOSTROPHE),tt$1(xe,`{`,OPENBRACE),tt$1(xe,`}`,CLOSEBRACE),tt$1(xe,`[`,OPENBRACKET),tt$1(xe,`]`,CLOSEBRACKET),tt$1(xe,`(`,OPENPAREN),tt$1(xe,`)`,CLOSEPAREN),tt$1(xe,`<`,OPENANGLEBRACKET),tt$1(xe,`>`,CLOSEANGLEBRACKET),tt$1(xe,`(`,FULLWIDTHLEFTPAREN),tt$1(xe,`)`,FULLWIDTHRIGHTPAREN),tt$1(xe,`「`,LEFTCORNERBRACKET),tt$1(xe,`」`,RIGHTCORNERBRACKET),tt$1(xe,`『`,LEFTWHITECORNERBRACKET),tt$1(xe,`』`,RIGHTWHITECORNERBRACKET),tt$1(xe,`<`,FULLWIDTHLESSTHAN),tt$1(xe,`>`,FULLWIDTHGREATERTHAN),tt$1(xe,`&`,AMPERSAND),tt$1(xe,`*`,ASTERISK),tt$1(xe,`@`,AT),tt$1(xe,"`",BACKTICK),tt$1(xe,`^`,CARET),tt$1(xe,`:`,COLON),tt$1(xe,`,`,COMMA),tt$1(xe,`$`,DOLLAR),tt$1(xe,`.`,DOT),tt$1(xe,`=`,EQUALS),tt$1(xe,`!`,EXCLAMATION),tt$1(xe,`-`,HYPHEN),tt$1(xe,`%`,PERCENT),tt$1(xe,`|`,PIPE),tt$1(xe,`+`,PLUS),tt$1(xe,`#`,POUND),tt$1(xe,`?`,QUERY),tt$1(xe,`"`,QUOTE),tt$1(xe,`/`,SLASH),tt$1(xe,`;`,SEMI),tt$1(xe,`~`,TILDE),tt$1(xe,`_`,UNDERSCORE),tt$1(xe,`\\`,BACKSLASH),tt$1(xe,`・`,FULLWIDTHMIDDLEDOT);let Se=tr$1(xe,DIGIT,NUM,{[numeric]:!0});tr$1(Se,DIGIT,Se);let Te=tr$1(Se,ASCII_LETTER,ASCIINUMERICAL,{[asciinumeric]:!0}),Ee=tr$1(Se,LETTER,ALPHANUMERICAL,{[alphanumeric]:!0}),De=tr$1(xe,ASCII_LETTER,WORD,{[ascii]:!0});tr$1(De,DIGIT,Te),tr$1(De,ASCII_LETTER,De),tr$1(Te,DIGIT,Te),tr$1(Te,ASCII_LETTER,Te);let ke=tr$1(xe,LETTER,UWORD,{[alpha]:!0});tr$1(ke,ASCII_LETTER),tr$1(ke,DIGIT,Ee),tr$1(ke,LETTER,ke),tr$1(Ee,DIGIT,Ee),tr$1(Ee,ASCII_LETTER),tr$1(Ee,LETTER,Ee);let Ae=tt$1(xe,LF,NL,{[whitespace]:!0}),je=tt$1(xe,CR,WS,{[whitespace]:!0}),Me=tr$1(xe,SPACE,WS,{[whitespace]:!0});tt$1(xe,OBJECT_REPLACEMENT,Me),tt$1(je,LF,Ae),tt$1(je,OBJECT_REPLACEMENT,Me),tr$1(je,SPACE,Me),tt$1(Me,CR),tt$1(Me,LF),tr$1(Me,SPACE,Me),tt$1(Me,OBJECT_REPLACEMENT,Me);let Ne=tr$1(xe,EMOJI,EMOJI$1,{[emoji]:!0});tt$1(Ne,`#`),tr$1(Ne,EMOJI,Ne),tt$1(Ne,EMOJI_VARIATION,Ne);let Pe=tt$1(Ne,EMOJI_JOINER);tt$1(Pe,`#`),tr$1(Pe,EMOJI,Ne);let Fe=[[ASCII_LETTER,De],[DIGIT,Te]],Ie=[[ASCII_LETTER,null],[LETTER,ke],[DIGIT,Ee]];for(let te=0;te<tlds.length;te++)fastts(xe,tlds[te],TLD,WORD,Fe);for(let te=0;te<utlds.length;te++)fastts(xe,utlds[te],UTLD,UWORD,Ie);addToGroups(TLD,{tld:!0,ascii:!0},oe),addToGroups(UTLD,{utld:!0,alpha:!0},oe),fastts(xe,`file`,SCHEME,WORD,Fe),fastts(xe,`mailto`,SCHEME,WORD,Fe),fastts(xe,`http`,SLASH_SCHEME,WORD,Fe),fastts(xe,`https`,SLASH_SCHEME,WORD,Fe),fastts(xe,`ftp`,SLASH_SCHEME,WORD,Fe),fastts(xe,`ftps`,SLASH_SCHEME,WORD,Fe),addToGroups(SCHEME,{scheme:!0,ascii:!0},oe),addToGroups(SLASH_SCHEME,{slashscheme:!0,ascii:!0},oe),te=te.sort((te,oe)=>te[0]>oe[0]?1:-1);for(let oe=0;oe<te.length;oe++){let Se=te[oe][0],Te=te[oe][1]?{[scheme]:!0}:{[slashscheme]:!0};Se.indexOf(`-`)>=0?Te[domain]=!0:ASCII_LETTER.test(Se)?DIGIT.test(Se)?Te[asciinumeric]=!0:Te[ascii]=!0:Te[numeric]=!0,ts(xe,Se,Se,Te)}return ts(xe,`localhost`,LOCALHOST,{ascii:!0}),xe.jd=new State$1(SYM),{start:xe,tokens:Object.assign({groups:oe},tk)}}function run$1(te,oe){let xe=stringToArray(oe.replace(/[A-Z]/g,te=>te.toLowerCase())),Se=xe.length,Te=[],Ee=0,De=0;for(;De<Se;){let ke=te,Ae=null,je=0,Me=null,Ne=-1,Pe=-1;for(;De<Se&&(Ae=ke.go(xe[De]));)ke=Ae,ke.accepts()?(Ne=0,Pe=0,Me=ke):Ne>=0&&(Ne+=xe[De].length,Pe++),je+=xe[De].length,Ee+=xe[De].length,De++;Ee-=Ne,De-=Pe,je-=Ne,Te.push({t:Me.t,v:oe.slice(Ee-je,Ee),s:Ee-je,e:Ee})}return Te}function stringToArray(te){let oe=[],xe=te.length,Se=0;for(;Se<xe;){let Te=te.charCodeAt(Se),Ee,De=Te<55296||Te>56319||Se+1===xe||(Ee=te.charCodeAt(Se+1))<56320||Ee>57343?te[Se]:te.slice(Se,Se+2);oe.push(De),Se+=De.length}return oe}function fastts(te,oe,xe,Se,Te){let Ee,De=oe.length;for(let xe=0;xe<De-1;xe++){let De=oe[xe];te.j[De]?Ee=te.j[De]:(Ee=new State$1(Se),Ee.jr=Te.slice(),te.j[De]=Ee),te=Ee}return Ee=new State$1(xe),Ee.jr=Te.slice(),te.j[oe[De-1]]=Ee,Ee}function decodeTlds(te){let oe=[],xe=[],Se=0,Te=`0123456789`;for(;Se<te.length;){let Te=0;for(;`0123456789`.indexOf(te[Se+Te])>=0;)Te++;if(Te>0){oe.push(xe.join(``));for(let oe=parseInt(te.substring(Se,Se+Te),10);oe>0;oe--)xe.pop();Se+=Te}else xe.push(te[Se]),Se++}return oe}var defaults={defaultProtocol:`http`,events:null,format:noop$4,formatHref:noop$4,nl2br:!1,tagName:`a`,target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Options(te,oe=null){let xe=Object.assign({},defaults);te&&(xe=Object.assign(xe,te instanceof Options?te.o:te));let Se=xe.ignoreTags,Te=[];for(let te=0;te<Se.length;te++)Te.push(Se[te].toUpperCase());this.o=xe,oe&&(this.defaultRender=oe),this.ignoreTags=Te}Options.prototype={o:defaults,ignoreTags:[],defaultRender(te){return te},check(te){return this.get(`validate`,te.toString(),te)},get(te,oe,xe){let Se=oe!=null,Te=this.o[te];return Te&&(typeof Te==`object`?(Te=xe.t in Te?Te[xe.t]:defaults[te],typeof Te==`function`&&Se&&(Te=Te(oe,xe))):typeof Te==`function`&&Se&&(Te=Te(oe,xe.t,xe)),Te)},getObj(te,oe,xe){let Se=this.o[te];return typeof Se==`function`&&oe!=null&&(Se=Se(oe,xe.t,xe)),Se},render(te){let oe=te.render(this);return(this.get(`render`,null,te)||this.defaultRender)(oe,te.t,te)}};function noop$4(te){return te}function MultiToken(te,oe){this.t=`token`,this.v=te,this.tk=oe}MultiToken.prototype={isLink:!1,toString(){return this.v},toHref(te){return this.toString()},toFormattedString(te){let oe=this.toString(),xe=te.get(`truncate`,oe,this),Se=te.get(`format`,oe,this);return xe&&Se.length>xe?Se.substring(0,xe)+`…`:Se},toFormattedHref(te){return te.get(`formatHref`,this.toHref(te.get(`defaultProtocol`)),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(te=defaults.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(te),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(te){return{type:this.t,value:this.toFormattedString(te),isLink:this.isLink,href:this.toFormattedHref(te),start:this.startIndex(),end:this.endIndex()}},validate(te){return te.get(`validate`,this.toString(),this)},render(te){let oe=this,xe=this.toHref(te.get(`defaultProtocol`)),Se=te.get(`formatHref`,xe,this),Te=te.get(`tagName`,xe,oe),Ee=this.toFormattedString(te),De={},ke=te.get(`className`,xe,oe),Ae=te.get(`target`,xe,oe),je=te.get(`rel`,xe,oe),Me=te.getObj(`attributes`,xe,oe),Ne=te.getObj(`events`,xe,oe);return De.href=Se,ke&&(De.class=ke),Ae&&(De.target=Ae),je&&(De.rel=je),Me&&Object.assign(De,Me),{tagName:Te,attributes:De,content:Ee,eventListeners:Ne}}};function createTokenClass(te,oe){class xe extends MultiToken{constructor(oe,xe){super(oe,xe),this.t=te}}for(let te in oe)xe.prototype[te]=oe[te];return xe.t=te,xe}var Email=createTokenClass(`email`,{isLink:!0,toHref(){return`mailto:`+this.toString()}}),Text=createTokenClass(`text`),Nl=createTokenClass(`nl`),Url=createTokenClass(`url`,{isLink:!0,toHref(te=defaults.defaultProtocol){return this.hasProtocol()?this.v:`${te}://${this.v}`},hasProtocol(){let te=this.tk;return te.length>=2&&te[0].t!==LOCALHOST&&te[1].t===COLON}}),makeState=te=>new State$1(te);function init$1({groups:te}){let oe=te.domain.concat([AMPERSAND,ASTERISK,AT,BACKSLASH,BACKTICK,CARET,DOLLAR,EQUALS,HYPHEN,NUM,PERCENT,PIPE,PLUS,POUND,SLASH,SYM,TILDE,UNDERSCORE]),xe=[APOSTROPHE,COLON,COMMA,DOT,EXCLAMATION,PERCENT,QUERY,QUOTE,SEMI,OPENANGLEBRACKET,CLOSEANGLEBRACKET,OPENBRACE,CLOSEBRACE,CLOSEBRACKET,OPENBRACKET,OPENPAREN,CLOSEPAREN,FULLWIDTHLEFTPAREN,FULLWIDTHRIGHTPAREN,LEFTCORNERBRACKET,RIGHTCORNERBRACKET,LEFTWHITECORNERBRACKET,RIGHTWHITECORNERBRACKET,FULLWIDTHLESSTHAN,FULLWIDTHGREATERTHAN],Se=[AMPERSAND,APOSTROPHE,ASTERISK,BACKSLASH,BACKTICK,CARET,DOLLAR,EQUALS,HYPHEN,OPENBRACE,CLOSEBRACE,PERCENT,PIPE,PLUS,POUND,QUERY,SLASH,SYM,TILDE,UNDERSCORE],Te=makeState(),Ee=tt$1(Te,TILDE);ta(Ee,Se,Ee),ta(Ee,te.domain,Ee);let De=makeState(),ke=makeState(),Ae=makeState();ta(Te,te.domain,De),ta(Te,te.scheme,ke),ta(Te,te.slashscheme,Ae),ta(De,Se,Ee),ta(De,te.domain,De);let je=tt$1(De,AT);tt$1(Ee,AT,je),tt$1(ke,AT,je),tt$1(Ae,AT,je);let Me=tt$1(Ee,DOT);ta(Me,Se,Ee),ta(Me,te.domain,Ee);let Ne=makeState();ta(je,te.domain,Ne),ta(Ne,te.domain,Ne);let Pe=tt$1(Ne,DOT);ta(Pe,te.domain,Ne);let Fe=makeState(Email);ta(Pe,te.tld,Fe),ta(Pe,te.utld,Fe),tt$1(je,LOCALHOST,Fe);let Ie=tt$1(Ne,HYPHEN);tt$1(Ie,HYPHEN,Ie),ta(Ie,te.domain,Ne),ta(Fe,te.domain,Ne),tt$1(Fe,DOT,Pe),tt$1(Fe,HYPHEN,Ie);let Le=tt$1(De,HYPHEN),Re=tt$1(De,DOT);tt$1(Le,HYPHEN,Le),ta(Le,te.domain,De),ta(Re,Se,Ee),ta(Re,te.domain,De);let ze=makeState(Url);ta(Re,te.tld,ze),ta(Re,te.utld,ze),ta(ze,te.domain,De),ta(ze,Se,Ee),tt$1(ze,DOT,Re),tt$1(ze,HYPHEN,Le),tt$1(ze,AT,je);let Be=tt$1(ze,COLON),Ve=makeState(Url);ta(Be,te.numeric,Ve);let He=makeState(Url),Ue=makeState();ta(He,oe,He),ta(He,xe,Ue),ta(Ue,oe,He),ta(Ue,xe,Ue),tt$1(ze,SLASH,He),tt$1(Ve,SLASH,He);let We=tt$1(ke,COLON),Ge=tt$1(tt$1(tt$1(Ae,COLON),SLASH),SLASH);ta(ke,te.domain,De),tt$1(ke,DOT,Re),tt$1(ke,HYPHEN,Le),ta(Ae,te.domain,De),tt$1(Ae,DOT,Re),tt$1(Ae,HYPHEN,Le),ta(We,te.domain,He),tt$1(We,SLASH,He),tt$1(We,QUERY,He),ta(Ge,te.domain,He),ta(Ge,oe,He),tt$1(Ge,SLASH,He);let st=[[OPENBRACE,CLOSEBRACE],[OPENBRACKET,CLOSEBRACKET],[OPENPAREN,CLOSEPAREN],[OPENANGLEBRACKET,CLOSEANGLEBRACKET],[FULLWIDTHLEFTPAREN,FULLWIDTHRIGHTPAREN],[LEFTCORNERBRACKET,RIGHTCORNERBRACKET],[LEFTWHITECORNERBRACKET,RIGHTWHITECORNERBRACKET],[FULLWIDTHLESSTHAN,FULLWIDTHGREATERTHAN]];for(let te=0;te<st.length;te++){let[Se,Te]=st[te],Ee=tt$1(He,Se);tt$1(Ue,Se,Ee);let De=makeState(Url);ta(Ee,oe,De);let ke=makeState();ta(Ee,xe,ke),tt$1(Ee,Te,He),ta(De,oe,De),ta(De,xe,ke),ta(ke,oe,De),ta(ke,xe,ke),tt$1(De,Te,He),tt$1(ke,Te,He)}return tt$1(Te,LOCALHOST,ze),tt$1(Te,NL,Nl),{start:Te,tokens:tk}}function run(te,oe,xe){let Se=xe.length,Te=0,Ee=[],De=[];for(;Te<Se;){let ke=te,Ae=null,je=null,Me=0,Ne=null,Pe=-1;for(;Te<Se&&!(Ae=ke.go(xe[Te].t));)De.push(xe[Te++]);for(;Te<Se&&(je=Ae||ke.go(xe[Te].t));)Ae=null,ke=je,ke.accepts()?(Pe=0,Ne=ke):Pe>=0&&Pe++,Te++,Me++;if(Pe<0)Te-=Me,Te<Se&&(De.push(xe[Te]),Te++);else{De.length>0&&(Ee.push(initMultiToken(Text,oe,De)),De=[]),Te-=Pe,Me-=Pe;let te=Ne.t,Se=xe.slice(Te-Me,Te);Ee.push(initMultiToken(te,oe,Se))}}return De.length>0&&Ee.push(initMultiToken(Text,oe,De)),Ee}function initMultiToken(te,oe,xe){let Se=xe[0].s,Te=xe[xe.length-1].e;return new te(oe.slice(Se,Te),xe)}var INIT={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function init(){INIT.scanner=init$2(INIT.customSchemes);for(let te=0;te<INIT.tokenQueue.length;te++)INIT.tokenQueue[te][1]({scanner:INIT.scanner});INIT.parser=init$1(INIT.scanner.tokens);for(let te=0;te<INIT.pluginQueue.length;te++)INIT.pluginQueue[te][1]({scanner:INIT.scanner,parser:INIT.parser});return INIT.initialized=!0,INIT}function tokenize$1(te){return INIT.initialized||init(),run(INIT.parser.start,te,run$1(INIT.scanner.start,te))}tokenize$1.scan=run$1;var HTML5NamedCharRefs={amp:`&`,gt:`>`,lt:`<`,nbsp:`\xA0`,quot:`"`},HEXCHARCODE=/^#[xX]([A-Fa-f0-9]+)$/,CHARCODE=/^#([0-9]+)$/,NAMED=/^([A-Za-z0-9]+)$/,EntityParser=function(){function te(te){this.named=te}return te.prototype.parse=function(te){if(te){var oe=te.match(HEXCHARCODE);if(oe)return String.fromCharCode(parseInt(oe[1],16));if(oe=te.match(CHARCODE),oe)return String.fromCharCode(parseInt(oe[1],10));if(oe=te.match(NAMED),oe)return this.named[oe[1]]||`&`+oe[1]+`;`}},te}(),WSP=/[\t\n\f ]/,ALPHA=/[A-Za-z]/,CRLF=/\r\n?/g;function isSpace(te){return WSP.test(te)}function isAlpha(te){return ALPHA.test(te)}function preprocessInput(te){return te.replace(CRLF,`
|
|
31
31
|
`)}var EventedTokenizer=function(){function te(te,oe,xe){xe===void 0&&(xe=`precompile`),this.delegate=te,this.entityParser=oe,this.mode=xe,this.state=`beforeData`,this.line=-1,this.column=-1,this.input=``,this.index=-1,this.tagNameBuffer=``,this.states={beforeData:function(){var te=this.peek();if(te===`<`&&!this.isIgnoredEndTag())this.transitionTo(`tagOpen`),this.markTagStart(),this.consume();else{if(this.mode===`precompile`&&te===`
|
|
32
32
|
`){var oe=this.tagNameBuffer.toLowerCase();(oe===`pre`||oe===`textarea`)&&this.consume()}this.transitionTo(`data`),this.delegate.beginData()}},data:function(){var te=this.peek(),oe=this.tagNameBuffer;te===`<`&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo(`tagOpen`),this.markTagStart(),this.consume()):te===`&`&&oe!==`script`&&oe!==`style`?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||`&`)):(this.consume(),this.delegate.appendToData(te))},tagOpen:function(){var te=this.consume();te===`!`?this.transitionTo(`markupDeclarationOpen`):te===`/`?this.transitionTo(`endTagOpen`):(te===`@`||te===`:`||isAlpha(te))&&(this.transitionTo(`tagName`),this.tagNameBuffer=``,this.delegate.beginStartTag(),this.appendToTagName(te))},markupDeclarationOpen:function(){var te=this.consume();te===`-`&&this.peek()===`-`?(this.consume(),this.transitionTo(`commentStart`),this.delegate.beginComment()):te.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase()===`DOCTYPE`&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo(`doctype`),this.delegate.beginDoctype&&this.delegate.beginDoctype())},doctype:function(){isSpace(this.consume())&&this.transitionTo(`beforeDoctypeName`)},beforeDoctypeName:function(){var te=this.consume();isSpace(te)||(this.transitionTo(`doctypeName`),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(te.toLowerCase()))},doctypeName:function(){var te=this.consume();isSpace(te)?this.transitionTo(`afterDoctypeName`):te===`>`?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo(`beforeData`)):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(te.toLowerCase())},afterDoctypeName:function(){var te=this.consume();if(!isSpace(te)){if(te===`>`)this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo(`beforeData`);else{var oe=te.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),xe=oe.toUpperCase()===`PUBLIC`,Se=oe.toUpperCase()===`SYSTEM`;(xe||Se)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),xe?this.transitionTo(`afterDoctypePublicKeyword`):Se&&this.transitionTo(`afterDoctypeSystemKeyword`)}}},afterDoctypePublicKeyword:function(){var te=this.peek();isSpace(te)?(this.transitionTo(`beforeDoctypePublicIdentifier`),this.consume()):te===`"`?(this.transitionTo(`doctypePublicIdentifierDoubleQuoted`),this.consume()):te===`'`?(this.transitionTo(`doctypePublicIdentifierSingleQuoted`),this.consume()):te===`>`&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo(`beforeData`))},doctypePublicIdentifierDoubleQuoted:function(){var te=this.consume();te===`"`?this.transitionTo(`afterDoctypePublicIdentifier`):te===`>`?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo(`beforeData`)):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(te)},doctypePublicIdentifierSingleQuoted:function(){var te=this.consume();te===`'`?this.transitionTo(`afterDoctypePublicIdentifier`):te===`>`?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo(`beforeData`)):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(te)},afterDoctypePublicIdentifier:function(){var te=this.consume();isSpace(te)?this.transitionTo(`betweenDoctypePublicAndSystemIdentifiers`):te===`>`?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo(`beforeData`)):te===`"`?this.transitionTo(`doctypeSystemIdentifierDoubleQuoted`):te===`'`&&this.transitionTo(`doctypeSystemIdentifierSingleQuoted`)},betweenDoctypePublicAndSystemIdentifiers:function(){var te=this.consume();isSpace(te)||(te===`>`?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo(`beforeData`)):te===`"`?this.transitionTo(`doctypeSystemIdentifierDoubleQuoted`):te===`'`&&this.transitionTo(`doctypeSystemIdentifierSingleQuoted`))},doctypeSystemIdentifierDoubleQuoted:function(){var te=this.consume();te===`"`?this.transitionTo(`afterDoctypeSystemIdentifier`):te===`>`?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo(`beforeData`)):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(te)},doctypeSystemIdentifierSingleQuoted:function(){var te=this.consume();te===`'`?this.transitionTo(`afterDoctypeSystemIdentifier`):te===`>`?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo(`beforeData`)):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(te)},afterDoctypeSystemIdentifier:function(){var te=this.consume();isSpace(te)||te===`>`&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo(`beforeData`))},commentStart:function(){var te=this.consume();te===`-`&&this.peek()===`-`?this.transitionTo(`commentStartDash`):te===`>`?(this.delegate.finishComment(),this.transitionTo(`beforeData`)):(this.delegate.appendToCommentData(te),this.transitionTo(`comment`))},commentStartDash:function(){var te=this.consume();te===`-`?this.transitionTo(`commentEnd`):te===`>`?(this.delegate.finishComment(),this.transitionTo(`beforeData`)):(this.delegate.appendToCommentData(`-`),this.transitionTo(`comment`))},comment:function(){var te=this.consume();te===`-`?this.transitionTo(`commentEndDash`):this.delegate.appendToCommentData(te)},commentEndDash:function(){var te=this.consume();te===`-`&&this.peek()===`-`?this.delegate.appendToCommentData(te):te===`-`?this.transitionTo(`commentEnd`):(this.delegate.appendToCommentData(`-`+te),this.transitionTo(`comment`))},commentEnd:function(){var te=this.consume();te===`>`?(this.delegate.finishComment(),this.transitionTo(`beforeData`)):(this.delegate.appendToCommentData(`--`+te),this.transitionTo(`comment`))},tagName:function(){var te=this.consume();isSpace(te)?this.transitionTo(`beforeAttributeName`):te===`/`?this.transitionTo(`selfClosingStartTag`):te===`>`?(this.delegate.finishTag(),this.transitionTo(`beforeData`)):this.appendToTagName(te)},endTagName:function(){var te=this.consume();isSpace(te)?(this.transitionTo(`beforeAttributeName`),this.tagNameBuffer=``):te===`/`?(this.transitionTo(`selfClosingStartTag`),this.tagNameBuffer=``):te===`>`?(this.delegate.finishTag(),this.transitionTo(`beforeData`),this.tagNameBuffer=``):this.appendToTagName(te)},beforeAttributeName:function(){var te=this.peek();isSpace(te)?this.consume():te===`/`?(this.transitionTo(`selfClosingStartTag`),this.consume()):te===`>`?(this.consume(),this.delegate.finishTag(),this.transitionTo(`beforeData`)):te===`=`?(this.delegate.reportSyntaxError(`attribute name cannot start with equals sign`),this.transitionTo(`attributeName`),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(te)):(this.transitionTo(`attributeName`),this.delegate.beginAttribute())},attributeName:function(){var te=this.peek();isSpace(te)?(this.transitionTo(`afterAttributeName`),this.consume()):te===`/`?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo(`selfClosingStartTag`)):te===`=`?(this.transitionTo(`beforeAttributeValue`),this.consume()):te===`>`?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo(`beforeData`)):te===`"`||te===`'`||te===`<`?(this.delegate.reportSyntaxError(te+` is not a valid character within attribute names`),this.consume(),this.delegate.appendToAttributeName(te)):(this.consume(),this.delegate.appendToAttributeName(te))},afterAttributeName:function(){var te=this.peek();isSpace(te)?this.consume():te===`/`?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo(`selfClosingStartTag`)):te===`=`?(this.consume(),this.transitionTo(`beforeAttributeValue`)):te===`>`?(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(te))},beforeAttributeValue:function(){var te=this.peek();isSpace(te)?this.consume():te===`"`?(this.transitionTo(`attributeValueDoubleQuoted`),this.delegate.beginAttributeValue(!0),this.consume()):te===`'`?(this.transitionTo(`attributeValueSingleQuoted`),this.delegate.beginAttributeValue(!0),this.consume()):te===`>`?(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(te))},attributeValueDoubleQuoted:function(){var te=this.consume();te===`"`?(this.delegate.finishAttributeValue(),this.transitionTo(`afterAttributeValueQuoted`)):te===`&`?this.delegate.appendToAttributeValue(this.consumeCharRef()||`&`):this.delegate.appendToAttributeValue(te)},attributeValueSingleQuoted:function(){var te=this.consume();te===`'`?(this.delegate.finishAttributeValue(),this.transitionTo(`afterAttributeValueQuoted`)):te===`&`?this.delegate.appendToAttributeValue(this.consumeCharRef()||`&`):this.delegate.appendToAttributeValue(te)},attributeValueUnquoted:function(){var te=this.peek();isSpace(te)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo(`beforeAttributeName`)):te===`/`?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo(`selfClosingStartTag`)):te===`&`?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||`&`)):te===`>`?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo(`beforeData`)):(this.consume(),this.delegate.appendToAttributeValue(te))},afterAttributeValueQuoted:function(){var te=this.peek();isSpace(te)?(this.consume(),this.transitionTo(`beforeAttributeName`)):te===`/`?(this.consume(),this.transitionTo(`selfClosingStartTag`)):te===`>`?(this.consume(),this.delegate.finishTag(),this.transitionTo(`beforeData`)):this.transitionTo(`beforeAttributeName`)},selfClosingStartTag:function(){this.peek()===`>`?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo(`beforeData`)):this.transitionTo(`beforeAttributeName`)},endTagOpen:function(){var te=this.consume();(te===`@`||te===`:`||isAlpha(te))&&(this.transitionTo(`endTagName`),this.tagNameBuffer=``,this.delegate.beginEndTag(),this.appendToTagName(te))}},this.reset()}return te.prototype.reset=function(){this.transitionTo(`beforeData`),this.input=``,this.tagNameBuffer=``,this.index=0,this.line=1,this.column=0,this.delegate.reset()},te.prototype.transitionTo=function(te){this.state=te},te.prototype.tokenize=function(te){this.reset(),this.tokenizePart(te),this.tokenizeEOF()},te.prototype.tokenizePart=function(te){for(this.input+=preprocessInput(te);this.index<this.input.length;){var oe=this.states[this.state];if(oe!==void 0)oe.call(this);else throw Error(`unhandled state `+this.state)}},te.prototype.tokenizeEOF=function(){this.flushData()},te.prototype.flushData=function(){this.state===`data`&&(this.delegate.finishData(),this.transitionTo(`beforeData`))},te.prototype.peek=function(){return this.input.charAt(this.index)},te.prototype.consume=function(){var te=this.peek();return this.index++,te===`
|
|
33
|
-
`?(this.line++,this.column=0):this.column++,te},te.prototype.consumeCharRef=function(){var te=this.input.indexOf(`;`,this.index);if(te!==-1){var oe=this.input.slice(this.index,te),xe=this.entityParser.parse(oe);if(xe){for(var Se=oe.length;Se;)this.consume(),Se--;return this.consume(),xe}}},te.prototype.markTagStart=function(){this.delegate.tagOpen()},te.prototype.appendToTagName=function(te){this.tagNameBuffer+=te,this.delegate.appendToTagName(te)},te.prototype.isIgnoredEndTag=function(){var te=this.tagNameBuffer;return te===`title`&&this.input.substring(this.index,this.index+8)!==`</title>`||te===`style`&&this.input.substring(this.index,this.index+8)!==`</style>`||te===`script`&&this.input.substring(this.index,this.index+9)!==`<\/script>`},te}(),Tokenizer=function(){function te(te,oe){oe===void 0&&(oe={}),this.options=oe,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new EventedTokenizer(this,te,oe.mode),this._currentAttribute=void 0}return te.prototype.tokenize=function(te){return this.tokens=[],this.tokenizer.tokenize(te),this.tokens},te.prototype.tokenizePart=function(te){return this.tokens=[],this.tokenizer.tokenizePart(te),this.tokens},te.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},te.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},te.prototype.current=function(){var te=this.token;if(te===null)throw Error(`token was unexpectedly null`);if(arguments.length===0)return te;for(var oe=0;oe<arguments.length;oe++)if(te.type===arguments[oe])return te;throw Error(`token type was unexpectedly `+te.type)},te.prototype.push=function(te){this.token=te,this.tokens.push(te)},te.prototype.currentAttribute=function(){return this._currentAttribute},te.prototype.addLocInfo=function(){this.options.loc&&(this.current().loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},te.prototype.beginDoctype=function(){this.push({type:`Doctype`,name:``})},te.prototype.appendToDoctypeName=function(te){this.current(`Doctype`).name+=te},te.prototype.appendToDoctypePublicIdentifier=function(te){var oe=this.current(`Doctype`);oe.publicIdentifier===void 0?oe.publicIdentifier=te:oe.publicIdentifier+=te},te.prototype.appendToDoctypeSystemIdentifier=function(te){var oe=this.current(`Doctype`);oe.systemIdentifier===void 0?oe.systemIdentifier=te:oe.systemIdentifier+=te},te.prototype.endDoctype=function(){this.addLocInfo()},te.prototype.beginData=function(){this.push({type:`Chars`,chars:``})},te.prototype.appendToData=function(te){this.current(`Chars`).chars+=te},te.prototype.finishData=function(){this.addLocInfo()},te.prototype.beginComment=function(){this.push({type:`Comment`,chars:``})},te.prototype.appendToCommentData=function(te){this.current(`Comment`).chars+=te},te.prototype.finishComment=function(){this.addLocInfo()},te.prototype.tagOpen=function(){},te.prototype.beginStartTag=function(){this.push({type:`StartTag`,tagName:``,attributes:[],selfClosing:!1})},te.prototype.beginEndTag=function(){this.push({type:`EndTag`,tagName:``})},te.prototype.finishTag=function(){this.addLocInfo()},te.prototype.markTagAsSelfClosing=function(){this.current(`StartTag`).selfClosing=!0},te.prototype.appendToTagName=function(te){this.current(`StartTag`,`EndTag`).tagName+=te},te.prototype.beginAttribute=function(){this._currentAttribute=[``,``,!1]},te.prototype.appendToAttributeName=function(te){this.currentAttribute()[0]+=te},te.prototype.beginAttributeValue=function(te){this.currentAttribute()[2]=te},te.prototype.appendToAttributeValue=function(te){this.currentAttribute()[1]+=te},te.prototype.finishAttributeValue=function(){this.current(`StartTag`).attributes.push(this._currentAttribute)},te.prototype.reportSyntaxError=function(te){this.current().syntaxError=te},te}();function tokenize(te,oe){return new Tokenizer(new EntityParser(HTML5NamedCharRefs),oe).tokenize(te)}var LinkifyResult=`LinkifyResult`,StartTag=`StartTag`,EndTag=`EndTag`,Chars=`Chars`,Comment=`Comment`,Doctype=`Doctype`;function linkifyHtml(te,oe={}){let xe=tokenize(te),Se=[],Te=[],Ee=new Options(oe,defaultRender);for(let te=0;te<xe.length;te++){let oe=xe[te];if(oe.type===StartTag){Se.push(oe);let Te=oe.tagName.toUpperCase();if(!(Te===`A`||Ee.ignoreTags.indexOf(Te)>=0||Ee.isIgnoredClass(getAttribute$1(oe.attributes,`class`)))||oe.selfClosing)continue;let De=Se.length;skipTagTokens(Te,xe,++te,Se),te+=Se.length-De-1}else if(oe.type!==Chars)Se.push(oe);else{let te=linkifyChars(oe.chars,Ee);Se.push.apply(Se,te)}}for(let te=0;te<Se.length;te++){let oe=Se[te];switch(oe.type){case LinkifyResult:Te.push(oe.rendered);break;case StartTag:{let te=`<`+oe.tagName;oe.attributes.length>0&&(te+=` `+attributeArrayToStrings(oe.attributes).join(` `)),oe.selfClosing&&(te+=` /`),te+=`>`,Te.push(te);break}case EndTag:Te.push(`</${oe.tagName}>`);break;case Chars:Te.push(escapeText(oe.chars));break;case Comment:Te.push(`<!--${escapeText(oe.chars)}-->`);break;case Doctype:{let te=`<!DOCTYPE ${oe.name}`;oe.publicIdentifier&&(te+=` PUBLIC "${oe.publicIdentifier}"`),oe.systemIdentifier&&(te+=` "${oe.systemIdentifier}"`),te+=`>`,Te.push(te);break}}}return Te.join(``)}function linkifyChars(te,oe){let xe=tokenize$1(te),Se=[];for(let te=0;te<xe.length;te++){let Te=xe[te];Te.t===`nl`&&oe.get(`nl2br`)?Se.push({type:StartTag,tagName:`br`,attributes:[],selfClosing:!0}):!Te.isLink||!oe.check(Te)?Se.push({type:Chars,chars:Te.toString()}):Se.push({type:LinkifyResult,rendered:oe.render(Te)})}return Se}function skipTagTokens(te,oe,xe,Se){let Te=1;for(;xe<oe.length&&Te>0;){let Ee=oe[xe];Ee.type===StartTag&&Ee.tagName.toUpperCase()===te?Te++:Ee.type===EndTag&&Ee.tagName.toUpperCase()===te&&Te--,Se.push(Ee),xe++}return Se}function defaultRender({tagName:te,attributes:oe,content:xe}){return`<${te} ${attributesToString(oe)}>${escapeText(xe)}</${te}>`}function escapeText(te){return te.replace(/</g,`<`).replace(/>/g,`>`)}function escapeAttr(te){return te.replace(/"/g,`"`)}function attributesToString(te){let oe=[];for(let xe in te){let Se=te[xe]+``;oe.push(`${xe}="${escapeAttr(Se)}"`)}return oe.join(` `)}function attributeArrayToStrings(te){let oe=[];for(let xe=0;xe<te.length;xe++){let Se=te[xe][0],Te=te[xe][1]+``;oe.push(`${Se}="${escapeAttr(Te)}"`)}return oe}function getAttribute$1(te,oe){for(let xe=0;xe<te.length;xe++)if(te[xe][0].toLowerCase()===oe)return te[xe][1];return null}var fallbackLocale=`en`,locale=document.documentElement.lang.slice(0,2)||fallbackLocale,instance=createI18n({warnHtmlMessage:!1,fallbackRootWithEmptyString:!1,silentTranslationWarn:!0,allowComposition:!0,legacy:!1,globalInjection:!0,locale,fallbackLocale}),i18n=instance.global;function setupI18n(te){for(let oe in te)i18n.setLocaleMessage(oe,te[oe])}function getAddonMaxQuantity(te,oe){return te===OctopusCardinality.OptionalSingle||te===OctopusCardinality.DefaultSingle?1:oe||1/0}function getPriceQuantityLabel(te){switch(te){case QuantityStrategy.PerUnit:return i18n.t(`general.perUnit`);case QuantityStrategy.PerPerson:return i18n.t(`general.perPerson`);case QuantityStrategy.PerAdult:return i18n.t(`general.perAdult`);case QuantityStrategy.PerChild:return i18n.t(`general.perChild`);case QuantityStrategy.PerNight:return i18n.t(`general.perNight`);case QuantityStrategy.PerPersonPerNight:return i18n.t(`general.perPersonPerNight`);case QuantityStrategy.PerAdultPerNight:return i18n.t(`general.perAdultPerNight`);case QuantityStrategy.PerChildPerNight:return i18n.t(`general.perChildPerNight`)}}function getQuantityStrategyPrice(te,oe,xe,Se=0,Te=0){switch(oe){case QuantityStrategy.PerUnit:return te;case QuantityStrategy.PerPerson:return te*(Se+Te);case QuantityStrategy.PerAdult:return te*Se;case QuantityStrategy.PerChild:return te*Te;case QuantityStrategy.PerNight:return te*xe;case QuantityStrategy.PerPersonPerNight:return te*(Se+Te)*xe;case QuantityStrategy.PerAdultPerNight:return te*Se*xe;case QuantityStrategy.PerChildPerNight:return te*Te*xe;case QuantityStrategy.OneTimePayment:return te;case QuantityStrategy.PerBooking:return te;default:return te}}function getTemplateUnitPrice(te,oe,xe,Se,Te){if(oe===Se&&xe===Te)return te.extraPrice;let Ee=te.otherPriceOptions?.find(te=>te.includedAdults===oe),De=Ee?.extraChildPrice??te.otherPriceOptions?.[0]?.extraChildPrice??0;return oe===Se?te.extraPrice+(xe-Te)*De:(Ee?.price??te.extraPrice)+xe*De}function createTestName(te){return te===void 0?te:te.replace(/([!?.])([a-z])/g,function(te,oe,xe){return xe.toUpperCase()})}function convertDescription(te){return te===void 0?``:linkifyHtml(te,{defaultProtocol:`https`,target:`_blank`,rel:`noopener`,nl2br:!0})}function convertIdToNameTitle(te){switch(te){case 2:return i18n.t(`booking.reservation.nameTitleMr`);case 3:return i18n.t(`booking.reservation.nameTitleMs`);case 4:return i18n.t(`booking.reservation.nameTitleMrs`);case 5:return i18n.t(`booking.reservation.nameTitleDr`);default:return``}}function lowercase(te){return te.toLowerCase()}function convertTimestampToISOString(te){return Number.isNaN(te)?``:new Date(te).toISOString()}function daysBetweenDates(te,oe){let xe=new Date(te),Se=new Date(oe).getTime()-xe.getTime();return Math.round(Se/864e5)}function getUserLanguage(te=!1){return te?document.documentElement.lang||`en-US`:document.documentElement.lang.slice(0,2)||`en`}function ranId(te=10){let oe=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`,xe=62,Se=``;for(let oe=0;oe<te;oe++)Se+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`.charAt(Math.floor(Math.random()*62));return Se}function parseDate(te){if(typeof te==`string`&&/^\d{4}-\d{2}-\d{2}$/.test(te)){let[oe,xe,Se]=te.split(`-`).map(Number);return new Date(oe,xe-1,Se)}return new Date(te)}function showDate(te,oe=0,xe=!1){let Se=parseDate(te);Se=new Date(Se.setDate(Se.getDate()+oe));let Te;switch(getUserLanguage()){case`da`:case`se`:Te={0:`jan`,1:`feb`,2:`mar`,3:`apr`,4:`maj`,5:`jun`,6:`jul`,7:`aug`,8:`sep`,9:`okt`,10:`nov`,11:`dec`};break;case`no`:Te={0:`jan`,1:`feb`,2:`mar`,3:`apr`,4:`mai`,5:`jun`,6:`jul`,7:`aug`,8:`sep`,9:`okt`,10:`nov`,11:`des`};break;case`de`:Te={0:`jan`,1:`feb`,2:`mär`,3:`apr`,4:`mai`,5:`jun`,6:`jul`,7:`aug`,8:`sep`,9:`okt`,10:`nov`,11:`dez`};break;case`fi`:Te={0:`tam`,1:`hel`,2:`maa`,3:`huh`,4:`tou`,5:`kes`,6:`hei`,7:`elo`,8:`syy`,9:`lok`,10:`mar`,11:`jou`};break;case`fr`:Te={0:`jan`,1:`feb`,2:`mar`,3:`apr`,4:`mai`,5:`jun`,6:`jui`,7:`aoû`,8:`sep`,9:`okt`,10:`nov`,11:`dec`};break;case`it`:Te={0:`gen`,1:`feb`,2:`mar`,3:`apr`,4:`mag`,5:`giu`,6:`lug`,7:`ago`,8:`set`,9:`ott`,10:`nov`,11:`dic`};break;default:Te={0:`Jan`,1:`Feb`,2:`Mar`,3:`Apr`,4:`May`,5:`Jun`,6:`Jul`,7:`Aug`,8:`Sep`,9:`Oct`,10:`Nov`,11:`Dec`}}return xe?`${Se.getDate()} ${Te[Se.getMonth()]}`:`${Se.getDate()} ${Te[Se.getMonth()]} ${Se.getFullYear()}`}function isDateValid(te){return!isNaN(new Date(te).getTime())}function areConsecutive(te){let oe=te.sort();for(let te=1;te<oe.length;te++)if(oe[te]!=oe[te-1]+1)return!1;return!0}function isArrEqual(te,oe){return JSON.stringify(te.sort())===JSON.stringify(oe.sort())}function formatDaysString(te,oe=!0){return oe?te.replace(/7/g,`0`).replace(/,\s*$/,``).split(`,`).map(Number):te.replace(/,\s*$/,``).split(`,`).map(Number)}function showDays(te){let oe=`-`,xe=[6,7],Se=formatDaysString(te,!1),Te;switch(getUserLanguage()){case`da`:Te={1:`Mandage`,2:`Tirsdage`,3:`Onsdage`,4:`Torsdage`,5:`Fredage`,6:`Lørdage`,7:`Søndage`};break;default:Te={1:`Mondays`,2:`Tuedays`,3:`Wednesdays`,4:`Thusdays`,5:`Fridays`,6:`Saturdays`,7:`Sundays`}}return oe=Se.map(te=>Te[te]).join(`, `),Se.length===1?oe=`${Te[Se[0]]}`:Se.length===7?oe=i18n.t(`general.everyday`):isArrEqual(xe,Se)?oe=i18n.t(`general.weekends`):areConsecutive(Se)&&Se.length>1&&(oe=`${Te[Se[0]]} - ${Te[Se[Se.length-1]]}`),oe}function showTime(te){let oe=te,xe=te.split(`:`);return xe[2]&&(oe=`${xe[0]}:${xe[1]}`),oe}function formatDate(te){let oe=parseDate(te),xe=``+oe.getFullYear(),Se=``+(oe.getMonth()+1),Te=``+oe.getDate();return Se.length<2&&(Se=`0`+Se),Te.length<2&&(Te=`0`+Te),[xe,Se,Te].join(`-`)}function getSelectFieldValue(te){return Number.isNaN(te)?null:te}function showTimes(te,oe){return te===oe?showTime(te):`${showTime(te)} - ${showTime(oe)}`}function showPrice(te,oe){if(oe)return new Intl.NumberFormat(getUserLanguage(!0),{style:`currency`,currency:oe}).format(te)}function showNumber(te){return new Intl.NumberFormat(getUserLanguage(!0),{maximumFractionDigits:0}).format(te)}function capitalized(te){return te?te.charAt(0).toUpperCase()+te.slice(1):``}var useAlertStore=defineStore(`alert`,()=>{let te=ref(``),oe=ref(`default`),xe=ref(`NotActive`),Se=ref(NaN),Te=ref(`global`);function Ee({message:Te,type:Ee=`default`}){te.value=Te,oe.value=Ee,xe.value===`NotActive`?(xe.value=`StartActive`,Se.value=window.setTimeout(()=>{xe.value=`NotActive`},5e3)):(xe.value=`KeepActive`,clearTimeout(Se.value),Se.value=window.setTimeout(()=>{xe.value=`NotActive`},5e3))}return{message:te,type:oe,status:xe,timer:Se,domain:Te,display:Ee}});function tzName(te,oe,xe=`long`){return new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,timeZone:te,timeZoneName:xe}).format(oe).split(/\s/g).slice(2).join(` `)}var offsetFormatCache={},offsetCache={};function tzOffset(te,oe){try{let xe=(offsetFormatCache[te]||=new Intl.DateTimeFormat(`en-US`,{timeZone:te,timeZoneName:`longOffset`}).format)(oe).split(`GMT`)[1];return xe in offsetCache?offsetCache[xe]:calcOffset(xe,xe.split(`:`))}catch{if(te in offsetCache)return offsetCache[te];let oe=te?.match(offsetRe);return oe?calcOffset(te,oe.slice(1)):NaN}}var offsetRe=/([+-]\d\d):?(\d\d)?/;function calcOffset(te,oe){let xe=+(oe[0]||0),Se=+(oe[1]||0),Te=(oe[2]||0)/60;return offsetCache[te]=xe*60+Se>0?xe*60+Se+Te:xe*60-Se-Te}var TZDateMini=class te extends Date{constructor(...te){super(),te.length>1&&typeof te[te.length-1]==`string`&&(this.timeZone=te.pop()),this.internal=new Date,isNaN(tzOffset(this.timeZone,this))?this.setTime(NaN):te.length?typeof te[0]==`number`&&(te.length===1||te.length===2&&typeof te[1]!=`number`)?this.setTime(te[0]):typeof te[0]==`string`?this.setTime(+new Date(te[0])):te[0]instanceof Date?this.setTime(+te[0]):(this.setTime(+new Date(...te)),adjustToSystemTZ(this,te)):this.setTime(Date.now())}static tz(oe,...xe){return xe.length?new te(...xe,oe):new te(Date.now(),oe)}withTimeZone(oe){return new te(+this,oe)}getTimezoneOffset(){let te=-tzOffset(this.timeZone,this);return te>0?Math.floor(te):Math.ceil(te)}setTime(te){return Date.prototype.setTime.apply(this,arguments),syncToInternal(this),+this}[Symbol.for(`constructDateFrom`)](oe){return new te(+new Date(oe),this.timeZone)}},re$1=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(te=>{if(!re$1.test(te))return;let oe=te.replace(re$1,`$1UTC`);TZDateMini.prototype[oe]&&(te.startsWith(`get`)?TZDateMini.prototype[te]=function(){return this.internal[oe]()}:(TZDateMini.prototype[te]=function(){return Date.prototype[oe].apply(this.internal,arguments),syncFromInternal(this),+this},TZDateMini.prototype[oe]=function(){return Date.prototype[oe].apply(this,arguments),syncToInternal(this),+this}))});function syncToInternal(te){te.internal.setTime(+te),te.internal.setUTCSeconds(te.internal.getUTCSeconds()-Math.round(-tzOffset(te.timeZone,te)*60))}function syncFromInternal(te){Date.prototype.setFullYear.call(te,te.internal.getUTCFullYear(),te.internal.getUTCMonth(),te.internal.getUTCDate()),Date.prototype.setHours.call(te,te.internal.getUTCHours(),te.internal.getUTCMinutes(),te.internal.getUTCSeconds(),te.internal.getUTCMilliseconds()),adjustToSystemTZ(te)}function adjustToSystemTZ(te,oe){let xe=Array.isArray(oe)?constructorArgsToInternalTime(oe):+te.internal,Se=tzOffset(te.timeZone,te),Te=Se>0?Math.floor(Se):Math.ceil(Se),Ee=new Date(+te);Ee.setUTCHours(Ee.getUTCHours()-1);let De=-new Date(+te).getTimezoneOffset(),ke=-new Date(+Ee).getTimezoneOffset(),Ae=De-ke,je=De;if(Ae&&De!==Te&&Date.prototype.getHours.apply(te)!==(Array.isArray(oe)?oe[3]||0:te.internal.getUTCHours())){let oe=new Date(+te),xe=De-Te;xe&&oe.setUTCMinutes(oe.getUTCMinutes()+xe);let Se=tzOffset(te.timeZone,oe);(Se>0?Math.floor(Se):Math.ceil(Se))===Te&&(je=ke)}let Me=je-Te;Me&&Date.prototype.setUTCMinutes.call(te,Date.prototype.getUTCMinutes.call(te)+Me);let Ne=new Date(+te);Ne.setUTCSeconds(0);let Pe=De>0?Ne.getSeconds():(Ne.getSeconds()-60)%60,Fe=Math.round(-(tzOffset(te.timeZone,te)*60))%60;(Fe||Pe)&&Date.prototype.setUTCSeconds.call(te,Date.prototype.getUTCSeconds.call(te)+Fe+Pe);let Ie=tzOffset(te.timeZone,te),Le=Ie>0?Math.floor(Ie):Math.ceil(Ie),Re=-new Date(+te).getTimezoneOffset()-Le,ze=Le!==Te,Be=Re-Me,Ve=Le-Te,He=xe-Le*60*1e3,Ue=Ve>0&&targetInternalTime(te)-xe===Ve*60*1e3&&targetInternalTime(te,He)!==xe;if(ze&&Be&&!Ue){Date.prototype.setUTCMinutes.call(te,Date.prototype.getUTCMinutes.call(te)+Be);let oe=tzOffset(te.timeZone,te),xe=Le-(oe>0?Math.floor(oe):Math.ceil(oe));xe&&Be<0&&Date.prototype.setUTCMinutes.call(te,Date.prototype.getUTCMinutes.call(te)+xe)}syncToInternal(te);let We=(oe?xe:xe+Fe*1e3)-+te.internal;We&&Math.abs(We)<18e5&&(Date.prototype.setTime.call(te,+te+We),syncToInternal(te))}function constructorArgsToInternalTime(te){return Date.UTC(te[0],te.length>1?te[1]:0,te.length>2?te[2]:1,...te.slice(3))}function targetInternalTime(te,oe){let xe=new Date(oe??+te);return xe.setUTCSeconds(xe.getUTCSeconds()-Math.round(-tzOffset(te.timeZone,xe)*60)),+xe}var TZDate=class te extends TZDateMini{static tz(oe,...xe){return xe.length?new te(...xe,oe):new te(Date.now(),oe)}toISOString(){let[te,oe,xe]=this.tzComponents(),Se=`${te}${oe}:${xe}`;return this.internal.toISOString().slice(0,-1)+Se}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[te,oe,xe,Se]=this.internal.toUTCString().split(` `);return`${te?.slice(0,-1)} ${xe} ${oe} ${Se}`}toTimeString(){let te=this.internal.toUTCString().split(` `)[4],[oe,xe,Se]=this.tzComponents();return`${te} GMT${oe}${xe}${Se} (${tzName(this.timeZone,this)})`}toLocaleString(te,oe){return Date.prototype.toLocaleString.call(this,te,{...oe,timeZone:oe?.timeZone||this.timeZone})}toLocaleDateString(te,oe){return Date.prototype.toLocaleDateString.call(this,te,{...oe,timeZone:oe?.timeZone||this.timeZone})}toLocaleTimeString(te,oe){return Date.prototype.toLocaleTimeString.call(this,te,{...oe,timeZone:oe?.timeZone||this.timeZone})}tzComponents(){let te=this.getTimezoneOffset();return[te>0?`-`:`+`,String(Math.floor(Math.abs(te)/60)).padStart(2,`0`),String(Math.abs(te)%60).padStart(2,`0`)]}withTimeZone(oe){return new te(+this,oe)}[Symbol.for(`constructDateFrom`)](oe){return new te(+new Date(oe),this.timeZone)}};function t$1(){return typeof window>`u`||typeof document>`u`}async function n$2(te,oe){return new Promise((xe,Se)=>{if(t$1())return xe();let Te=document.head,Ee=document.createElement(`script`);if(Ee.async=!0,Ee.src=te,Ee.type=oe?.type??`text/javascript`,oe?.defer&&(Ee.defer=!0),oe?.nonce&&Ee.setAttribute(`nonce`,oe.nonce),oe?.preconnect){let oe=document.createElement(`link`);oe.href=new URL(te).origin,oe.rel=`preconnect`,Te.appendChild(oe)}Te.appendChild(Ee),Ee.onload=()=>xe(),Ee.onerror=te=>Se(te)})}function r$1(te){return typeof te==`object`&&!!te&&!Array.isArray(te)}function i$1(te,oe){let xe={...te};for(let Se in oe)if(Object.prototype.hasOwnProperty.call(oe,Se)){let Te=oe[Se],Ee=te[Se];xe[Se]=r$1(Te)&&r$1(Ee)?i$1(Ee,Te):Te}return xe}function a$2(te){if(t$1())return;let oe=new URL(window.location.href);oe.search=``;for(let[xe,Se]of Object.entries(te))oe.searchParams.set(xe,Se);window.history.replaceState({},``,oe.toString())}var o$2=`utm_`;function s$1(te){let oe=new URL(te),xe={},Se=[],Te={};oe.searchParams.forEach((te,oe)=>{oe.includes(o$2)?(xe[oe.replace(o$2,``).replace(`campaign`,`id`)]=te,Se.push(oe)):Te[oe]=te});for(let te of Se)oe.searchParams.delete(te);return{utmParams:xe,cleanQueryParams:Te,cleanUrl:oe.toString()}}function c$2(te){let oe=RegExp(`[?&]${o$2}`);return!!te.match(oe)}function l$2(te,oe){return`${oe.endsWith(`/`)?oe:`${oe}/`}${te.startsWith(`/`)?te.substring(1):te}`}var p$1={resource:{url:`https://www.googletagmanager.com/gtag/js`,inject:!0},dataLayerName:`dataLayer`,gtagName:`gtag`,groupName:`default`,initMode:`auto`};function m$2(){return p$1}function h$1(te){p$1=i$1(p$1,te)}function g$1(...te){let{dataLayerName:oe,gtagName:xe}=m$2();t$1()||(window[oe]=window[oe]||[],window[xe]=function(){window[oe].push(arguments)},window[xe](...te))}function v$1(te,oe){g$1(`consent`,te,oe)}function y$1(te=`default`){v$1(te,{ad_user_data:`granted`,ad_personalization:`granted`,ad_storage:`granted`,analytics_storage:`granted`})}function b$1(te=`default`){v$1(te,{ad_user_data:`denied`,ad_personalization:`denied`,ad_storage:`denied`,analytics_storage:`denied`})}function S$2(te,oe={}){let{groupName:xe,additionalAccounts:Se}=m$2();oe.send_to===void 0&&Se?.length&&(oe.send_to=xe),g$1(`event`,te,oe)}function C$2(te,oe={}){S$2(te,oe)}function T$2(te){g$1(`set`,`linker`,te)}function A$1(...te){g$1(`set`,...te)}function j$1(te){let{pageTracker:oe}=m$2(),xe;if(typeof te==`string`)xe={page_path:te};else if(`path`in te){let Se=oe?.router.options.history.base??``,Te=oe?.useRouteFullPath?te.fullPath:te.path;xe={...te.name?{page_title:te.name.toString()}:{},page_path:oe?.useRouterBasePath?l$2(Te,Se):Te}}else xe=te;if(xe.page_location===void 0&&(xe.page_location=window.location.href),xe.send_page_view===void 0&&(xe.send_page_view=oe?.sendPageView??!0),xe.page_path!==`/`&&xe.page_path?.endsWith(`/`)&&(xe.page_path=xe.page_path.slice(0,-1)),c$2(xe.page_location)){let{utmParams:te,cleanUrl:oe,cleanQueryParams:Se}=s$1(xe.page_location);xe.page_location=oe,a$2(Se),A$1(`campaign`,te)}g$1(`event`,`page_view`,xe)}function M$2(te){let{appName:oe}=m$2(),xe={};typeof te==`string`?xe.screen_name=te:`path`in te?xe.screen_name=te.name??te.path:xe=te,oe&&xe?.app_name===void 0&&(xe.app_name=oe),g$1(`event`,`screen_view`,xe)}function P$1(te={}){return{send_page_view:!1,anonymize_ip:!0,...te}}function F$1(){let{tagId:te,config:oe,groupName:xe,linker:Se,additionalAccounts:Te,hooks:Ee,consentMode:De}=m$2();if(te){if(Ee?.[`config:init:before`]?.(),De===`granted`?y$1():De===`denied`&&b$1(),Se&&T$2(Se),g$1(`js`,new Date),g$1(`config`,te,P$1(oe)),Te)for(let te of Te)g$1(`config`,te.tagId,P$1({groups:xe,...te.config}));Ee?.[`config:init:after`]?.()}}function I$2(te){let{pageTracker:oe}=m$2();return oe?.exclude?typeof oe.exclude==`function`?oe.exclude(te):oe.exclude?.some(({name:oe,path:xe}={})=>oe&&oe===te.name||xe&&xe===te.path):!1}function L$1(te){let{pageTracker:oe,hooks:xe}=m$2();if(I$2(te))return;xe?.[`router:track:before`]?.(te);let Se;oe?.template&&(Se=typeof oe.template==`function`?oe.template(te):oe.template),oe?.useScreenview?M$2(Se&&`screen_name`in Se?Se:te):j$1(Se&&`page_path`in Se?Se:te),xe?.[`router:track:after`]?.(te)}async function R$1(){let{pageTracker:te}=m$2();if(!te?.router)return;let{router:oe}=te;await oe.isReady(),L$1(oe.currentRoute.value),oe.afterEach((te,oe)=>{te.path!==oe.path&&L$1(te)})}async function z$1(){let{resource:te,dataLayerName:oe,tagId:xe,pageTracker:Se,hooks:Te}=m$2();if(xe&&(F$1(),Se?.router&&R$1(),te.inject))try{await n$2(`${te.url}?id=${xe}&l=${oe}`,{preconnect:te.preconnect,defer:te.defer,nonce:te.nonce}),Te?.[`script:loaded`]?.()}catch(te){Te?.[`script:error`]?.(te)}}function H$1(){let{initMode:te}=m$2();te!==`manual`&&z$1()}function U$2(te){h$1(te),H$1()}var useApplyGiftCardStore=defineStore(`applyGiftCard`,()=>{let{display:te}=useAlertStore(),oe=ref(0),xe=ref(``),Se=ref(``),Te=ref(``),Ee=ref(!1),De=ref(!1);async function ke(){xe.value===``?te({message:i18n.t(`alert.error.giftCardEmpty`),type:`error`}):(De.value=!0,await useApi().get(`/gift-card/validate`,{params:{giftcardCode:xe.value,lang:getUserLanguage()}}).then(xe=>{let{valid:De,amount:ke,expirationDate:Ae,productName:je}=xe.data;De?(oe.value=ke,Se.value=Ae,Te.value=je,Ee.value=!0,te({message:i18n.t(`alert.success.giftCardApplied`),type:`success`})):(Ee.value=!1,te({message:i18n.t(`alert.error.giftCardInvalid`),type:`warning`}))}),De.value=!1)}function Ae(){oe.value=0,xe.value=``,Ee.value=!1,te({message:i18n.t(`alert.success.giftCardRemoved`),type:`success`})}return{amount:oe,voucher:xe,expirationDate:Se,productName:Te,isValid:Ee,isLoading:De,apply:ke,reset:Ae}}),REEPAY_HOSTED_URL=`https://checkout.konnectio.com/checkout.html`,REEPAY_MESSAGE_SOURCE=`konnectio-reepay`;function getReepayHostedUrl(){return window.KONNECTIO_CHECKOUT_URL_OVERRIDE??`https://checkout.konnectio.com/checkout.html`}function buildReepayHostedUrl(te){let oe=new URL(getReepayHostedUrl());return oe.searchParams.set(`session`,te.session),oe.searchParams.set(`confirm`,te.confirmationId),oe.searchParams.set(`origin`,te.parentOrigin),oe.searchParams.set(`token`,te.token),oe.searchParams.set(`locale`,te.locale),oe.toString()}function parseReepayHostedMessage(te){if(typeof te!=`object`||!te)return null;let oe=te;return oe.source!==`konnectio-reepay`||![`accept`,`cancel`,`close`,`error`].includes(oe.event)||typeof oe.session!=`string`||typeof oe.confirmationId!=`string`?null:oe}function normalizeEmail(te){return te.trim().toLowerCase()}function normalizePhone(te){let oe=te.replace(/[^\d+]/g,``);return oe.startsWith(`+`)?oe:oe.replaceAll(`+`,``)}async function sha256Hex(te){let oe=await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(te));return Array.from(new Uint8Array(oe),te=>te.toString(16).padStart(2,`0`)).join(``)}async function buildUserData(te){if(typeof crypto>`u`||!crypto.subtle)return;let oe=normalizeEmail(te.email||``),xe=normalizePhone(te.phone||``);if(!oe&&!xe)return;let Se={};return oe&&(Se.email=await sha256Hex(oe)),xe&&(Se.phone_number=await sha256Hex(xe)),Se}var reepayScriptUrl=`https://checkout.reepay.com/checkout.js`,reepayReady=null;function ensureReepayLoaded(te=4e3){return typeof window<`u`&&window.Reepay?Promise.resolve(!0):reepayReady||(reepayReady=new Promise(oe=>{let xe=()=>oe(typeof window<`u`&&!!window.Reepay),Se=Object.assign(document.createElement(`script`),{src:reepayScriptUrl});Se.addEventListener(`load`,xe,{once:!0}),Se.addEventListener(`error`,xe,{once:!0}),document.head.appendChild(Se),setTimeout(xe,te)}),reepayReady)}function offerDue(te){if(typeof te.offerDue==`number`)return te.offerDue;let oe=(te.payments??[]).reduce((te,oe)=>te+(oe.amount??0),0);return(te.totalPrice||0)-oe}var usePaymentStore=defineStore(`payment`,()=>{let{display:te}=useAlertStore(),{paymentGatewayId:oe,bearerToken:xe}=storeToRefs(useUtilityStore()),Se=ref({}),Te=ref(),Ee=ref(NaN),De=ref(!1),ke=computed$2(()=>oe.value!==PaymentGateway.None),Ae=computed$2(()=>Se.value&&Se.value.guest?Se.value.guest.name:``),je=computed$2(()=>Se.value&&Se.value.guest?Se.value.guest.email:``),Me=computed$2(()=>Se.value&&Se.value.guest?Se.value.guest.phone:``),Ne=computed$2(()=>Se.value.adults),Pe=computed$2(()=>Se.value.children),Fe=computed$2(()=>offerDue(Se.value)),Ie=computed$2(()=>Se.value.totalVAT||0),Le=computed$2(()=>Se.value.offerDate),Re=computed$2(()=>Fe.value-Ie.value),ze=computed$2(()=>Se.value.orderLines),Be=computed$2(()=>ze.value?ze.value.length>0:!1);async function Ve(){useApi().put(`/capture/confirm`,{confirmationId:Te.value});let te={transaction_id:Se.value.uniqueID,affiliation:`Konnectio Reservation`,value:Fe.value,tax:Se.value.totalVAT,shipping:0,items:[]};if(Se.value.rooms&&(te.items=Se.value.rooms.map(te=>({item_id:te.id,item_name:`${te.roomGroupName} (${te.roomGroupRatePlanName})`,quantity:1,price:te.totalPrice,start_date:te.arriveDate,end_date:te.leaveDate}))),Se.value.events){let oe=Se.value.events.map(te=>({item_id:te.id,item_name:te.eventName||te.templateName||`Event`,quantity:te.numberOfPeople||1,price:te.totalPrice,start_date:te.eventDate,end_date:te.eventDate}));te.items=te.items.concat(oe)}let oe=await buildUserData({email:je.value,phone:Me.value});oe&&A$1(`user_data`,oe),C$2(`purchase`,te)}let He=ref(!1),Ue=ref(null),We=null,Ge;function st(te){We=window.open(te,`konnectio-reepay`,`popup=yes,width=520,height=800`),He.value=!!We,We||(window.location.href=te)}function Pr(){Ue.value&&De.value&&st(Ue.value)}function Fr(oe,Se,Te){let Ee=buildReepayHostedUrl({session:oe,confirmationId:Se,parentOrigin:window.location.origin,token:xe.value,locale:getUserLanguage()}),ke=new URL(getReepayHostedUrl()).origin;Ue.value=Ee,De.value=!0;let Ae=xe=>{if(xe.origin!==ke)return;let Se=parseReepayHostedMessage(xe.data);Se&&Se.session===oe&&(Se.event===`accept`?(window.removeEventListener(`message`,Ae),clearInterval(Ge),De.value=!1,Ue.value=null,Ve(),te({message:i18n.t(`alert.success.payment`),type:`success`}),Te(2)):Se.event===`error`&&te({message:i18n.t(`alert.error.payment`),type:`warning`}))};clearInterval(Ge),Ge=setInterval(()=>{We?.closed&&(He.value=!1)},500),window.addEventListener(`message`,Ae),st(Ee)}async function Ir({callback:xe,response:De,enableHostedRedirect:ke}){if(!De.error){if(!De.offer)te({message:i18n.t(`booking.other.errorMessage`),type:`warning`});else if(Se.value=De.offer,Te.value=De.confirmationId,Ee.value=De.offer.id,De.easyPayment){if(offerDue(De.offer)===0){Ve(),xe(2);return}if(oe.value===PaymentGateway.ReePay&&!await ensureReepayLoaded()&&ke){Fr(De.easyPayment.paymentID,De.confirmationId,xe);return}if(xe(),oe.value===PaymentGateway.ReePay)try{let oe=new Reepay.EmbeddedCheckout(De.easyPayment.paymentID,{html_element:`konnectio-payment-checkout`});oe.addEventHandler(ReepayEvent.Accept,()=>{Ve(),te({message:i18n.t(`alert.success.payment`),type:`success`}),xe()}),oe.addEventHandler(ReepayEvent.Error,()=>{te({message:i18n.t(`alert.error.payment`),type:`warning`})})}catch{te({message:i18n.t(`alert.error.payment`),type:`warning`})}else{let oe={checkoutKey:De.easyPayment.checkoutSecretKey,paymentId:De.easyPayment.paymentID,containerId:`konnectio-payment-checkout`,language:getUserLanguage()===`da`?`da-DK`:`en-GB`},Se=new Dibs.Checkout(oe);Se.on(`payment-completed`,()=>{console.log(`Konnectio: Payment completed!`),Ve(),te({message:i18n.t(`alert.success.payment`),type:`success`}),xe()}),Se.on(`pay-initialized`,()=>{Se.send(`payment-order-finalized`,!0)})}}else Ve(),xe(2)}}function Lr(){Ee.value=NaN}return{offerId:Ee,offerData:Se,hasPaymentGateway:ke,isHostedCheckoutActive:De,isHostedPopupOpen:He,reopenHostedCheckout:Pr,name:Ae,email:je,phone:Me,adults:Ne,children:Pe,totalPrice:Fe,totalVAT:Ie,offerDate:Le,subTotalPrice:Re,orderSummary:ze,hasOrderLines:Be,pay:Ir,clearOfferId:Lr}}),ForcedDateChange=Symbol(`forcedDateChange`),ScrollToTop=Symbol(`scrollToTop`),useHotelStore=defineStore(`hotel`,()=>{let te=useAvailabilityStore(),oe=useTrackingStore(),xe=usePaymentStore(),{voucher:Se,amount:Te}=storeToRefs(useApplyGiftCardStore()),{display:Ee}=useAlertStore(),{metaData:De}=storeToRefs(useUtilityStore()),ke=useUtilityStore(),Ae=ref({}),je=computed$2(()=>{let oe=[];for(let xe in Ae.value){let Se=parseInt(xe),Te=Wr.value.roomGroups.find(te=>te.id===Se),Ee={roomGroupID:Se,title:Te?.title||``},De=[];Ae.value[Se].forEach(oe=>{let xe=oe.id,ke=Te?.rates.find(te=>te.id===xe);if(ke){let{name:Ee,occupantRates:Ae,addons:je}=ke,Me={ratePlanID:xe??0,name:Ee,addons:je},Ne=[];oe.config.forEach((oe,Ee)=>{let De=oe.units,ke=oe.addons;if(De>0)for(let Me=0;Me<De;Me++){let De=Ae.find(te=>te.index===oe.id);if(!De)continue;let{adultsCount:Pe,childrenCount:Fe}=De,{totalPrice:Ie}=De;if(xa.value){let te=xa.value.offer.rooms.find(te=>te.ratePlanID===xe&&te.roomGroupID===Se)?.totalPrice;te!==void 0&&(Ie=te)}let Le=[];if(!je)continue;for(let oe in ke[Me]){let xe=parseInt(oe),Se=ke[Me][xe];if(Se>0){let{name:oe,price:Te,quantityStrategy:Ee}=je.find(te=>te.id===xe);Le.push({addonID:xe,name:oe,price:Te,quantity:Se,totalPrice:getQuantityStrategyPrice(Te,Ee,te.nights,Pe,Fe)*Se})}}let Re=oe.roomId,ze;Re&&(ze=Te?.roomList.find(te=>te.id===Re)?.name),Ne.push({configIdx:Ee,roomIdx:Me,adultsCount:Pe,childrenCount:Fe,totalPrice:Ie,roomAddons:Le,roomId:Re,roomName:ze})}}),Ne.length>0&&(Me.rooms=Ne,De.push(Me))}De.length>0&&(Ee.variants=De)}),Ee.variants&&oe.push(Ee)}return oe});function Me(te=!1){for(let oe in Ae.value){let xe=parseInt(oe);Ae.value[xe].forEach(oe=>{oe.config.forEach(oe=>{te&&oe.roomId===void 0||(oe.units=0)})})}}let Ne=computed$2(()=>Qi.value.length>0?Qi.value.every(te=>te.addons.length===0):je.value.every(te=>!Pe(te)));function Pe(te){return!te.variants?.every(te=>te.rooms?.every(oe=>ia(te.addons,oe.childrenCount).length===0))}let Fe=computed$2(()=>je.value.length>0);function Ie(te,oe,xe){Ae.value[te][oe].config[xe].units=Ae.value[te][oe].config[xe].units-1}function Le(te){return Wr.value.roomGroups.find(oe=>oe.id===te)?.addons.filter(te=>te.cardinality===OctopusCardinality.Mandatory).map(te=>({addonID:te.id,name:te.name,price:te.price,quantity:1,totalPrice:te.price}))}let Re=computed$2(()=>{let oe=[];for(let xe in Yr.value){let Se=parseInt(xe),Te=Yr.value[Se];if(Te>0){let{price:xe,name:Ee,quantityStrategy:De}=Qi.value.flatMap(te=>te.addons).find(te=>te.id===Se);oe.push({addonID:Se,name:Ee,price:xe,quantity:Te,totalPrice:getQuantityStrategyPrice(xe,De,te.nights,te.adults,te.children)*Te})}}return oe});function ze(oe,xe){let Se=[];for(let Te in oe){let Ee=parseInt(Te),De=oe[Ee];if(De>0){let oe=Qi.value.find(te=>te.id===xe)?.addons.find(te=>te.id===Ee);oe&&Se.push({addonID:Ee,name:oe.name,price:oe.price,quantity:De,totalPrice:getQuantityStrategyPrice(oe.price,oe.quantityStrategy,te.nights,te.adults,te.children)*De})}}return Se}let Be=computed$2(()=>Zr.value.length>0?Zr.value.reduce((te,oe)=>te+oe.unitConfigs.reduce((te,xe)=>te+ze(xe.addons,oe.roomGroupId).reduce((te,{totalPrice:oe})=>te+oe,0),0),0):Re.value.reduce((te,{totalPrice:oe})=>te+oe,0)),Ve=computed$2(()=>{let te=0,oe=0-Te.value;if(Oi.value&&Qi.value.length>0){let xe=Qi.value.flatMap(te=>Le(te.id)||[]);te=oe+na.value+Be.value+He.value*$i.value.length+xe.reduce((te,{totalPrice:oe})=>te+oe,0)}else{let xe=je.value.flatMap(({variants:te})=>te).flatMap(({rooms:te})=>te).reduce((te,{totalPrice:oe})=>te+oe,oe);te=je.value.flatMap(({variants:te})=>te).flatMap(({rooms:te})=>te).flatMap(({roomAddons:te})=>te).reduce((te,{totalPrice:oe})=>te+oe,xe)}return Ui.value&&Ui.value?.providesDiscount&&(te-=te*(Ui.value.discountPercent/100)),te}),He=computed$2(()=>Zi.value?Zi.value.weekendFee:0),Ue=computed$2(()=>je.value.flatMap(({variants:te})=>te).flatMap(({rooms:te})=>te)),We=computed$2(()=>Oi.value?$i.value.length:Ue.value.length),Ge=computed$2(()=>Oi.value?$i.value.reduce((te,oe)=>te+oe.adults,0):Ue.value.reduce((te,{adultsCount:oe})=>te+oe,0)),st=computed$2(()=>Oi.value?$i.value.reduce((te,oe)=>te+oe.children,0):Ue.value.reduce((te,{childrenCount:oe})=>te+oe,0)),Pr=computed$2(()=>Ge.value>0&&Ge.value!==te.adults),Fr=computed$2(()=>st.value>0&&st.value!==te.children),Ir=ref(te.arrivalDate),Lr=ref(te.departureDate),Rr=ref(te.adults),zr=ref(te.children),Br=ref(te.location||NaN),Vr=computed$2(()=>formatDate(Ir.value)!==formatDate(te.arrivalDate)||formatDate(Lr.value)!==formatDate(te.departureDate)),Hr=computed$2(()=>Br.value!==te.location),Ur=computed$2(()=>Vr.value||Hr.value),Wr=ref({}),Gr=ref(!1),Kr=ref(!0),qr=ref(0),Jr=ref(NaN),Yr=ref({}),Xr=ref(NaN),Zr=ref([]),Qr=ref(``),$r=ref(``),ei=ref(``),ti=ref(``),ni=ref(``),ri=ref(null),ii=ref(null),ai=ref(!1),oi=ref(!1),si=ref(!1),ci=useStorage(`konnectio_name`,``,void 0,{serializer:StorageSerializers.string}),li=useStorage(`konnectio_nameTitle`,2,void 0,{serializer:StorageSerializers.number}),ui=useStorage(`konnectio_email`,``,void 0,{serializer:StorageSerializers.string}),di=useStorage(`konnectio_confirm_email`,``,void 0,{serializer:StorageSerializers.string}),fi=useStorage(`konnectio_phone`,``,void 0,{serializer:StorageSerializers.string}),pi=useStorage(`konnectio_company`,``,void 0,{serializer:StorageSerializers.string}),mi=useStorage(`konnectio_postal`,``,void 0,{serializer:StorageSerializers.string}),hi=useStorage(`konnectio_city`,``,void 0,{serializer:StorageSerializers.string}),gi=useStorage(`konnectio_country`,57,void 0,{serializer:StorageSerializers.number}),_i=useStorage(`konnectio_address`,``,void 0,{serializer:StorageSerializers.string}),vi=useStorage(`konnectio_sortingKeys`,{pricesFrom:!1},void 0,{serializer:StorageSerializers.object}),yi=ref(``),bi=ref(``),xi=ref(!1),Si=ref(!1),Ci=ref(!1),wi=ref(null),Ti=ref(void 0),Ei=ref(),Di=ref(),Oi=computed$2(()=>!isNaN(Jr.value)),ki=computed$2(()=>ke.metaData.hotels?.findIndex(oe=>oe.id===te.location)||0),Ai=computed$2(()=>ke.metaData.hotels?.[ki.value]),ji=computed$2(()=>ke.metaData.hotels&&ke.metaData.hotels.length>1),Mi=computed$2(()=>ke.metaData.hotels?ke.metaData.hotels.flatMap(te=>({id:te.id,name:te.name})):[]),Ni=computed$2(()=>!!ri.value),Pi=computed$2(()=>!!ii.value),Fi=computed$2(()=>Ai.value?.termsOfService?Ai.value.termsOfService:``),Ii=computed$2(()=>Ai.value?.hotelMapImage?Ai.value.hotelMapImage:null),Li=computed$2(()=>!!(Ai.value?.useDiscountCard&&ke.hasMemberCards(te.location))),Ri=computed$2(()=>Fi.value!==``),zi=computed$2(()=>Ai.value?.country?Ai.value.country.name:``),Bi=computed$2(()=>ke.metaData.countries?ke.metaData.countries:[]),Vi=computed$2(()=>ke.metaData.cardTypes?ke.metaData.cardTypes:[]),Hi=computed$2(()=>Vi.value.map(te=>({value:te.name,label:te.shortDescription}))),Ui=computed$2(()=>Vi.value.find(te=>te.name===Ti.value?.cardType)),Wi=computed$2(()=>Ai.value?.name?Ai.value.name:``),Gi=computed$2(()=>ke.metaData&&Object.keys(ke.metaData).length!==0),Ki=computed$2(()=>Object.keys(Wr.value).length!==0),qi=computed$2(()=>!(!ci.value[1]||!ui.value||ke.requireEmailConfirmation&&di.value!==ui.value||!(fi.value.length>=5)||!mi.value||!hi.value||!_i.value)),Ji=computed$2(()=>qr.value===1&&Kr.value),Yi=computed$2(()=>qr.value===3&&Kr.value),Xi=computed$2(()=>Ki.value?Wr.value.templates.concat(Wr.value.specialTemplates):[]),Zi=computed$2(()=>{if(Xi.value.length>0)return Xi.value.find(te=>te.id===Jr.value)}),Qi=computed$2(()=>!Zi.value||!Zr.value?[]:Zr.value.map(te=>Zi.value.templateRoomGroups.find(oe=>oe.id===te.roomGroupId)).filter(te=>te!==void 0)),$i=computed$2(()=>{let te=[];return Zr.value.forEach((oe,xe)=>{oe.unitConfigs.forEach((Se,Te)=>{te.push({roomGroupId:oe.roomGroupId,adults:Se.adults,children:Se.children,selectionIdx:xe,configIdx:Te})})}),te});function ea(oe,xe,Se){let Te=Qi.value.find(te=>te.id===oe);return Te?getTemplateUnitPrice(Te,xe,Se,te.adults||1,te.children||0):0}let na=computed$2(()=>xa.value&&xa.value.offer.offerTemplates?xa.value.offer.offerTemplates[0].totalPrice:Qi.value.length===0?0:Zr.value.reduce((te,oe)=>te+oe.unitConfigs.reduce((te,xe)=>te+ea(oe.roomGroupId,xe.adults,xe.children),0),0));function ia(te,oe){let xe=[];return te&&(xe=te.filter(te=>te.quantityStrategy!==QuantityStrategy.PerChild&&te.quantityStrategy!==QuantityStrategy.PerChildPerNight||oe!=0)),xe.filter(te=>!!te.image).concat(xe.filter(te=>!te.image))}function aa(te){return Wr.value.roomGroups.find(oe=>oe.id===te)}function oa(te,oe){return`[REMARKS]: ${yi.value} \r\n [ALLERGIES]: ${bi.value} \r\n [REQUESTED ARRIVAL]: ${te} \r\n [REQUESTED DEPARTURE]: ${oe}`}function sa(te,oe,xe,Se){let Te=(oe?xe:Se?$r.value:ei.value).split(`:`);return convertTimestampToISOString(new Date(te).setUTCHours(parseInt(Te[0]),parseInt(Te[1]),0,0))}function ca(oe){return daysBetweenDates(te.arrivalDate,te.departureDate)*oe}async function la(){Kr.value=!0;try{let te=(await useApi().get(`/hotel/metadata`,{params:{language:getUserLanguage()}})).data;De.value=te}catch{Ee({message:i18n.t(`alert.error.couldntFetchMetadata`),type:`warning`})}Kr.value=!1}let fa=ref(),pa=computed$2(()=>fa.value?.name);async function ma(oe){try{let xe=await useApi().post(`/hotel/check-guest-discount`,{guestDiscountId:oe});if(xe.data.isValid){Ee({message:i18n.t(`alert.success.guestDiscountCodeApplied`),type:`success`});let oe=xe.data.guestDiscount;fa.value=oe,ja(oe.id);let Se=new Date(parseDate(oe.periods[0].fromDate).setHours(12,0,0,0)),Te=new Date(new Date().setHours(12,0,0,0));return Se>Te?(te.updateDates(new Date(parseDate(oe.periods[0].fromDate))),!0):(te.updateDates(Te),!0)}return Ee({message:i18n.t(`alert.error.guestDiscountCodeInvalid`),type:`error`}),!1}catch{return Ee({message:i18n.t(`booking.other.errorMessage`),type:`error`}),!1}}async function _a(){if(!ii.value)return!1;let xe=te.location??null;(xe===null||isNaN(xe))&&(xe=null);try{let Se=await useApi().post(`/hotel/deal-template-offer`,{discountCode:ii.value,fromDate:formatDate(te.arrivalDate),toDate:formatDate(te.departureDate),adultsCount:te.adults,childrenCount:te.children,language:getUserLanguage(),hotelId:xe,searchFirstAvailable:si.value});if(Se.status!==200)return!1;let Te=Se.data.fromDate,Ee=Se.data.toDate;return Te&&Ee&&(Te!==formatDate(te.arrivalDate)&&(te.arrivalDate=new Date(parseDate(Te).setHours(12,0,0,0))),Ee!==formatDate(te.departureDate)&&(te.departureDate=new Date(parseDate(Ee).setHours(12,0,0,0)))),Wr.value={roomGroups:[],templates:[Se.data],specialTemplates:[],nextAvailableDates:[]},ai.value=!0,oi.value=!1,ni.value=ii.value,Rr.value=te.adults,zr.value=te.children,Ir.value=te.arrivalDate,Lr.value=te.departureDate,Br.value=te.location??NaN,$r.value=ke.defaultArrivalTime(Br.value),ei.value=ke.defaultDepartureTime(Br.value),useEventBus(ScrollToTop).emit(),oe.viewItemList(),!0}catch(te){let oe=te?.response?.data?.error_code,xe=te?.response?.status;return xe===503?(oi.value=!0,Ee({message:i18n.t(`alert.error.couldntFetchListings`),type:`warning`}),ai.value=!0,!0):(xe===422&&oe&&oe!==`deal_code.invalid`&&(Ee({message:i18n.t(`alert.error.discountCodeInvalid`),type:`error`}),Ea(),ai.value=!1,oi.value=!1),!1)}}async function va(){if(qr.value=1,Kr.value=!0,Gr.value=!1,await _a()){Kr.value=!1;return}if(ai.value=!1,oi.value=!1,si.value){ii.value&&(Ee({message:i18n.t(`alert.error.discountCodeInvalid`),type:`error`}),Ea()),Kr.value=!1;return}let xe=te.location??null;(xe===null||isNaN(xe))&&(xe=null);try{let Se=await useApi().get(`/hotel/availability`,{params:{fromDate:formatDate(te.arrivalDate),toDate:formatDate(te.departureDate),adultsCount:te.adults,childrenCount:te.children,roomCount:te.roomCount,roomGroupIds:ke.hasActiveIdFilter?ke.activeIdFilter:null,guestDiscountId:ri.value,guestDiscountCode:ii.value,language:getUserLanguage(),hotelId:xe}});Se.status===200?(Wr.value=Se.data,Gr.value=!1,Rr.value=te.adults,zr.value=te.children,Ir.value=te.arrivalDate,Lr.value=te.departureDate,Br.value=te.location??NaN,$r.value=ke.defaultArrivalTime(Br.value),ei.value=ke.defaultDepartureTime(Br.value),useEventBus(ScrollToTop).emit(),oe.viewItemList()):Ee({message:`${i18n.t(`booking.other.errorMessage`)} (HTTP: ${Se.status})`,type:`warning`})}catch{Gr.value=!0,Ee({message:i18n.t(`alert.error.couldntFetchListings`),type:`warning`})}Kr.value=!1}async function ya(){await Promise.all([la(),te.fetchMetadata()])}function ba(te=!1){let oe=[];isNaN(Jr.value)?je.value.forEach(({variants:te,roomGroupID:xe})=>{let Se=Le(xe);te?.forEach(({rooms:te,ratePlanID:Te})=>{te?.forEach(({adultsCount:te,childrenCount:Ee,roomAddons:De,roomId:ke})=>{oe.push({roomGroupID:xe,ratePlanID:Te,adultsCount:te,childrenCount:Ee,guest:{name:ci.value,phone:fi.value,email:ui.value},roomAddons:De.concat(Se||[]),selectedRoomID:ke})})})}):Zr.value.length>0?$i.value.forEach(te=>{let xe=Zr.value[te.selectionIdx].unitConfigs[te.configIdx],Se=ze(xe.addons,te.roomGroupId);oe.push({templateID:Jr.value,roomGroupID:te.roomGroupId,ratePlanID:null,adultsCount:te.adults,childrenCount:te.children,roomAddons:Se.concat(Le(te.roomGroupId)||[]),guest:{title:convertIdToNameTitle(li.value),guestID:0,name:ci.value,email:ui.value,phone:fi.value,newsmails:xi.value}})}):oe.push({templateID:Jr.value,roomGroupID:Xr.value,ratePlanID:null,adultsCount:Rr.value,childrenCount:zr.value,roomAddons:Re.value.concat(Le(Xr.value)||[]),guest:{title:convertIdToNameTitle(li.value),guestID:0,name:ci.value,email:ui.value,phone:fi.value,newsmails:xi.value}});let xe=Br.value;return isNaN(xe)&&(xe=null),{offerID:xa.value?xa.value.offer.id:null,totalPrice:Ve.value,fromDate:formatDate(Ir.value),toDate:formatDate(Lr.value),hotelId:xe,guest:{travellingFor:Qr.value,title:convertIdToNameTitle(li.value),guestID:0,name:ci.value,email:ui.value,firmName:pi.value,phone:fi.value,country:gi.value,address1:_i.value,postal:String(mi.value),city:hi.value,newsmails:xi.value},giftCardCode:Se.value,discountCode:te?ni.value:ti.value,selectedRooms:oe,remark:oa(sa(Ir.value,!ke.hasUserArrivalSelection(Br.value),ke.defaultArrivalTime(Br.value),!0),sa(Lr.value,!ke.hasUserDepartureSelection(Br.value),ke.defaultDepartureTime(Br.value),!1)),checkoutUrl:window.location.origin,privacyUrl:window.location.origin,termsOfserviceURL:window.location.origin,memberCard:Ti.value}}let xa=ref(),Sa=ref(!1);async function Ca(){if(ti.value!==``){Sa.value=!0;let te=ti.value;useApi().post(`/hotel/validate-discount-code`,ba()).then(oe=>{Sa.value=!1;let xe=oe.data;xe.discountApplyed===!0?(xe.offer&&(xa.value=xe),ni.value=te,ii.value=te,ti.value=``,Ee({message:i18n.t(`alert.success.discountCodeApplied`),type:`success`})):(ii.value===te&&(ii.value=null),xe.error==`CodeNotApplicable`?Ee({message:i18n.t(`alert.error.discountCodeNotApplicable`),type:`error`}):Ee({message:i18n.t(`alert.error.discountCodeInvalid`),type:`error`}))}).catch(()=>{Sa.value=!1,ii.value===te&&(ii.value=null),Ee({message:`${i18n.t(`alert.error.discountCodeValidation`)}`,type:`warning`})})}else Ee({message:i18n.t(`alert.error.discountCodeEmpty`),type:`error`})}let Ta=computed$2(()=>xa.value?.offer.properties);function Ea(){xa.value=void 0,ti.value=``,ni.value=``,ii.value=null}function Da(){Ea(),ai.value=!1,oi.value=!1}async function Oa(){if(wi.value&&Ei.value){let te={cardType:wi.value,cardNumber:String(Ei.value),controlNr:Di.value,postalCode:String(mi.value)};useApi().post(`/hotel/validate-card-number`,te).then(oe=>{oe.status===200&&(oe.data.success===!0?(Ti.value=te,Ee({message:i18n.t(`alert.success.memberCardValid`),type:`success`})):Ee({message:i18n.t(`alert.error.memberCardInvalid`),type:`error`}))}).catch(()=>{Ee({message:i18n.t(`alert.error.memberCardInvalid`),type:`error`})})}else Ee({message:i18n.t(`alert.error.memberCardEmpty`),type:`error`})}async function ka(te,oe){if(Ci.value===!1&&Ri.value)Ee({message:i18n.t(`alert.error.acceptTerms`,{terms:i18n.t(`general.termsAndConditions`)}),type:`error`});else return qr.value=3,Kr.value=!0,await useApi().post(`/hotel/create-reservation`,ba(!0)).then(oe=>{Si.value=!1,Kr.value=!1;try{xe.pay({callback:te,response:oe.data,enableHostedRedirect:!0})}catch{qr.value=2,Ee({message:i18n.t(`booking.other.errorMessage`),type:`warning`})}}).catch(te=>{Kr.value=!1;let{status:xe}=te.response??{};if(xe===422)return qr.value=2,te.response.data.errors;xe===503?(qr.value=1,Ee({message:i18n.t(`alert.error.noRoomAvailable`),type:`warning`}),oe(),Ia()):(qr.value=2,Ee({message:i18n.t(`booking.other.errorMessage`),type:`warning`}))})}async function Aa({id:te,reason:oe,remark:xe}){await useApi().post(`/hotel/cancel-reservation`,{id:te,reason:oe,remark:xe})}function ja(te){ri.value=te}function Ma(te){ii.value=te}function Na(){ri.value=null}function Pa(){ii.value=null}function Fa(){Jr.value=NaN,Xr.value=NaN,Yr.value={},Zr.value=[]}function Ia(){Me(),Ea(),Fa(),ai.value=!1}function La(){Fa(),Me(!0)}function Ra(){ya()}return{adultsMismatch:Pr,childrenMismatch:Fr,totalRooms:We,totalAdults:Ge,totalChildren:st,isSearchOutdated:Ur,locationMismatch:Hr,totalTemplateAddonPrice:Be,hasTermOfService:Ri,currentDepartureDate:Lr,currentArrivalDate:Ir,currentAdults:Rr,currentChildren:zr,currentLocation:Br,isValidatingDiscountCode:Sa,discountVouchers:Ta,discountCode:ti,datesMismatch:Vr,appliedDiscountCode:ni,hasGuestDiscountId:Ni,hasGuestDiscountCode:Pi,guestDiscountId:ri,guestDiscountCode:ii,dealResolved:ai,dealNoAvailability:oi,requireDealCode:si,hasMemberCards:Li,getMandatoryRoomGroupAddons:Le,getTemplateRoomUnitPrice:ea,resetDiscountVoucher:Ea,resetDealFlow:Da,clearRoomSelection:Me,validateDiscountCode:Ca,setGuestDiscountId:ja,setGuestDiscountCode:Ma,clearGuestDiscountId:Na,clearGuestDiscountCode:Pa,validateMemberCard:Oa,selectedMemberCardData:Ui,selectedMemberCardObject:Ti,isTemplateReservation:Oi,selectionHasNoAddons:Ne,guestDiscountName:pa,hasHotelList:ji,hotelList:Mi,areListingsLoading:Ji,roomSelect:Ae,removeRoom:Ie,termsOfService:Fi,metaData:De,availabilityData:Wr,availabilityFetchFailed:Gr,isLoading:Kr,moduleState:qr,templateAddons:Yr,templateID:Jr,roomGroupID:Xr,templateRoomSelections:Zr,templateRoomUnits:$i,travelingFor:Qr,arrivalTime:$r,departureTime:ei,name:ci,nameTitle:li,email:ui,confirmEmail:di,phone:fi,firmName:pi,postal:mi,city:hi,country:gi,address:_i,remark:yi,allergies:bi,newsMails:xi,roomDisplay:je,isPaymentInitialized:Si,hotelCountry:zi,countries:Bi,title:Wi,isMetadataAvailable:Gi,isAvailabilityDataAvailable:Ki,totalPrice:Ve,selectedPackage:Zi,isPaymentLoading:Yi,getSingleListing:aa,getBasePrice:ca,getSelectedPackageRooms:Qi,isReservationFormFilled:qi,hasValidRoomSelection:Fe,fetchMetadata:ya,fetchAvailabilityData:va,fetchDealTemplateOffer:_a,createReservation:ka,resetTemplate:Fa,initialize:Ra,reservationPayload:ba,filterAddons:ia,cancelReservation:Aa,hasAvailableRoomAddons:Pe,checkGuestDiscount:ma,onOverviewReset:La,templateRoomTotalPrice:na,discountPayload:xa,acceptTerms:Ci,sortingKeys:vi,weekendFee:He,hotelMapImage:Ii,memberCards:Vi,memberCardList:Hi,selectedMemberCard:wi,memberCardControlNumber:Di,memberCardNumber:Ei}}),useTrackingStore=defineStore(`tracking`,()=>{let te=useUtilityStore(),oe=useHotelStore(),xe=useEventStore(),Se=computed$2(()=>{let te=[];return oe.roomDisplay.forEach(({variants:oe})=>{oe?.forEach(({rooms:oe,name:xe})=>{oe?.forEach(({totalPrice:oe})=>{te.push({name:xe,quantity:1,price:oe})})})}),{items:te,value:oe.totalPrice}}),Te=computed$2(()=>{let te=[];if(xe.isTemplateEvent)xe.getTemplateData?.forEach(oe=>{let Se=xe.getEventData;te.push({name:Se?.name||`Template Event`,quantity:oe.count||1,price:oe.totalPrice||0})});else{let oe=xe.getEventData;oe&&te.push({name:oe.name||`Event`,quantity:1,price:xe.totalPrice})}return{items:te,value:xe.totalPrice}}),Ee=computed$2(()=>[...oe.availabilityData.roomGroups.map(te=>({item_id:te.id.toString(),item_name:te.title})),...oe.availabilityData.templates.map(te=>({item_id:te.id.toString(),item_name:te.name}))]);function De(){U$2({appName:`Konnectio Booking Engine`,tagId:te.googleApiKey,config:{params:{send_page_view:!1}}})}function ke(){S$2(`view_item_list`,{item_list_id:`hotel_rooms`,item_list_name:`Hotel rooms`,event_label:`Fetched hotel room list`,event_category:`ecommerce`,items:Ee.value})}function Ae({id:oe,name:xe,value:Se,label:Te,category:Ee=`general`}){return{items:[{item_id:oe.toString(),item_name:xe}],event_label:Te,event_category:Ee,value:Se,currency:te.currency}}function je(te,oe){S$2(te,Ae(oe))}function Me({id:te,name:oe,value:xe}){je(`add_to_cart`,{id:te,name:oe,value:xe,label:`Added to cart`,category:`ecommerce`})}function Ne({id:te,name:oe,value:xe}){je(`remove_from_cart`,{id:te,name:oe,value:xe,label:`Removed to cart`,category:`ecommerce`})}function Pe(te){S$2(`view_item`,{items:[{item_name:te}]})}async function Fe(){let te=await buildUserData({email:oe.email,phone:oe.phone});te&&A$1(`user_data`,te),C$2(`begin_checkout`,Se.value)}async function Ie(){let te=await buildUserData({email:xe.email,phone:xe.phone});te&&A$1(`user_data`,te),C$2(`begin_checkout`,Te.value)}return{hotelItems:Ee,hotelCart:Se,eventCart:Te,setup:De,viewItem:Pe,addToCart:Me,removeFromCart:Ne,beginCheckout:Fe,beginEventCheckout:Ie,viewItemList:ke}}),useUtilityStore=defineStore(`utilities`,()=>{let te=useAvailabilityStore(),oe=useTrackingStore(),{display:xe}=useAlertStore(),Se=useStorage(`k_utils_settings`,{},void 0,{serializer:StorageSerializers.object}),Te=ref([]),Ee=ref({}),De=computed$2(()=>te=>te!==void 0&&Te.value[te]?!Te.value[te].disableChildSelection:!0),ke=computed$2(()=>te=>te!==void 0&&Te.value[te]?!Te.value[te].hideArrivalDepartureInputs:!1),Ae=computed$2(()=>te=>te!==void 0&&Te.value[te]?!Te.value[te].disableArrivalUserSelection:!1),je=computed$2(()=>te=>te!==void 0&&Te.value[te]?!Te.value[te].disableDepartureUserSelection:!1),Me=computed$2(()=>te=>te!==void 0&&Te.value[te]?Te.value[te].enableRoomAmountSearch:!1),Ne=computed$2(()=>te=>te!==void 0&&Te.value[te]?!Te.value[te].hideMemberCards:!0),Pe=computed$2(()=>te=>te!==void 0&&Te.value[te]?Te.value[te].sharedAddonSelection:!1),Fe=computed$2(()=>te=>te!==void 0&&Te.value[te]?Te.value[te].arrivalEarliest:``),Ie=computed$2(()=>te=>te!==void 0&&Te.value[te]?Te.value[te].arrivalDefault:``),Le=computed$2(()=>te=>te!==void 0&&Te.value[te]?Te.value[te].arrivalLatest:``),Re=computed$2(()=>te=>te!==void 0&&Te.value[te]?Te.value[te].departureEarliest:``),ze=computed$2(()=>te=>te!==void 0&&Te.value[te]?Te.value[te].departureDefault:``),Be=computed$2(()=>te=>te!==void 0&&Te.value[te]?Te.value[te].departureLatest:``),Ve=computed$2(()=>Se.value.maximumNightsAvailable),He=computed$2(()=>Se.value.enableTracking),Ue=computed$2(()=>Se.value.googleApiKey),We=computed$2(()=>Se.value.recaptchaSiteKey),Ge=computed$2(()=>Se.value.defaultAdultAmount),st=computed$2(()=>Se.value.defaultChildAmount),Pr=computed$2(()=>Se.value.maxAdultAmount),Fr=computed$2(()=>Se.value.maxChildAmount),Ir=computed$2(()=>Se.value.firstSelectableDateOffset),Lr=computed$2(()=>Se.value.lastSelectableDateOffset),Rr=computed$2(()=>Se.value.hideTitle),zr=computed$2(()=>Se.value.headerHeight),Br=computed$2(()=>Se.value.enableStickyHeader),Vr=computed$2(()=>Se.value.disableNamePrefix),Hr=computed$2(()=>Se.value.disableGiftCardVoucher),Ur=computed$2(()=>Se.value.disableDiscountVoucher),Wr=computed$2(()=>Se.value.disablePricesFrom),Gr=computed$2(()=>Se.value.disableCalendarPricesAvailability),Kr=computed$2(()=>Se.value.hideAvailableRoomAmount),qr=computed$2(()=>Se.value.disableNewsletterSignup),Jr=computed$2(()=>Se.value.disableTravelingFor),Yr=computed$2(()=>Se.value.disableTravelingForBleasure),Xr=computed$2(()=>Se.value.disableCompanyField),Zr=computed$2(()=>Se.value.hideEventLength),Qr=computed$2(()=>Se.value.hideEventEndTime),$r=computed$2(()=>Se.value.hideAvailabilityNotice),ei=computed$2(()=>Se.value.autoSelectRateId),ti=computed$2(()=>Se.value.splitBookingCalendar),ni=computed$2(()=>Se.value.hideEventGuestAmount),ri=computed$2(()=>Se.value.hideOptionalLabel),ii=computed$2(()=>Se.value.enableMultipleConfigurations),ai=computed$2(()=>Se.value.selectGiftCardAsDefault),oi=computed$2(()=>Se.value.requireEmailConfirmation),si=ref(null),ci=ref(``),li=ref(!1),ui=ref(!1),di=computed$2(()=>`Bearer ${ci.value}`),fi=computed$2(()=>!!Ee.value&&!!Ee.value.hotels),pi=computed$2(()=>fi.value?Ee.value.hotels[0].currency.currencyCode:``),mi=computed$2(()=>fi.value?Ee.value.hotels[0].currency.id:NaN),hi=computed$2(()=>fi.value?Ee.value.hotels[0].name:``),gi=computed$2(()=>fi.value&&Ee.value.hotels[0].paymentGatewayId||PaymentGateway.None),_i=computed$2(()=>!!We.value),vi=computed$2(()=>!!si.value),yi=computed$2(()=>{let te=!0;return(gi.value===PaymentGateway.None||gi.value===PaymentGateway.AskForCreditCard)&&(te=!1),te}),bi=()=>new Date(new Date(new Date().setDate(new Date().getDate()+Ir.value)).setHours(12,0,0,0)),xi=()=>new Date(new Date(new Date().setDate(new Date().getDate()+Ir.value+1)).setHours(12,0,0,0));async function Si(te){ci.value=te,await initApi()}async function Ci(te=`none`){try{if(te!==`none`){let oe=(await useApi().get(`/${te}/metadata`,{params:{language:getUserLanguage()}})).data;Ee.value=oe,oe.success===void 0?ui.value=!1:ui.value=!oe.success}}catch{xe({message:i18n.t(`alert.error.couldntFetchMetadata`),type:`warning`})}}async function wi(){await useApi().get(`/utility/get-settings-and-translations`).then(xe=>{let{settings:Ee,hotelSettings:De,translations:ke}=xe.data;Ee&&(Se.value=Ee,Te.value=De,isNaN(te.adults)&&(te.adults=Ee.defaultAdultAmount),isNaN(te.children)&&(te.children=Ee.defaultChildAmount),te.arrivalDate===null&&(te.arrivalDate=bi()),te.departureDate===null&&(te.departureDate=xi()),setupI18n(ke),Se.value.enableTracking&&oe.setup())}).catch(()=>{xe({message:i18n.t(`alert.error.couldntFetchMetadata`),type:`warning`})})}function Ti(te){si.value=te}function Ei(){si.value=null}return{activeIdFilter:si,autoSelectRateId:ei,bearerToken:di,bookingDisabled:li,currency:pi,currencyId:mi,defaultAdultAmount:Ge,defaultArrivalTime:Ie,defaultChildAmount:st,defaultDepartureTime:ze,disableCompanyField:Xr,disableDiscountVoucher:Ur,disableGiftCardVoucher:Hr,disableNamePrefix:Vr,disableNewsletterSignup:qr,disablePricesFrom:Wr,disableCalendarPricesAvailability:Gr,disableTravelingFor:Jr,disableTravelingForBleasure:Yr,earliestArrivalTime:Fe,earliestDepartureTime:Re,enableMultipleConfigurations:ii,enableStickyHeader:Br,enableTracking:He,firstSelectableDateOffset:Ir,googleApiKey:Ue,hasActiveIdFilter:vi,hasArrivalDepartureInputs:ke,hasChildSelection:De,hasError:ui,hasMemberCards:Ne,hasMetadata:fi,hasPaymentGateway:yi,hasRoomAmountSelection:Me,hasSharedAddonSelection:Pe,hasUserArrivalSelection:Ae,hasUserDepartureSelection:je,headerHeight:zr,hideAvailabilityNotice:$r,hideAvailableRoomAmount:Kr,hideEventEndTime:Qr,hideEventGuestAmount:ni,hideEventLength:Zr,hideOptionalLabel:ri,hideTitle:Rr,hotelSettings:Te,isRecaptchaEnabled:_i,lastSelectableDateOffset:Lr,latestArrivalTime:Le,latestDepartureTime:Be,maxAdultAmount:Pr,maxChildAmount:Fr,maximumNightsAvailable:Ve,metaData:Ee,name:hi,paymentGatewayId:gi,recaptchaSiteKey:We,requireEmailConfirmation:oi,selectGiftCardAsDefault:ai,settings:Se,splitBookingCalendar:ti,clearActiveIdFilter:Ei,defaultArrivalDate:bi,defaultDepartureDate:xi,fetchMetadata:Ci,fetchUtilities:wi,setAccessToken:Si,setActiveIdFilter:Ti}}),token=ref(``),params=useUrlSearchParams(`history`,{removeNullishValues:!0});async function initApi(){return token.value=useUtilityStore().bearerToken,Promise.resolve()}function useApi(){let te=window.KONNECTIO_API_URL_OVERRIDE??`https://production.hotel-service.konnectio.com`,oe=axios.create({baseURL:`${te}/api`,timeout:15e3,headers:{Accept:`application/json`,"Konnectio-Version":`4.11.3`,"Konnectio-Ref":params.ref}});if(oe.interceptors.request.use(te=>(te.method!==`get`&&(te.timeout=Math.max(te.timeout??0,3e4)),te.headers.Authorization=token.value,te.headers[`Accept-Language`]=document.documentElement.lang.slice(0,2)||`en`,te)),window.KONNECTIO_SIMULATE_OUTAGE){let te=window.KONNECTIO_SIMULATE_OUTAGE;oe.interceptors.request.use(oe=>{let xe=oe.url??``;if(xe.includes(`/metadata`)||xe.startsWith(`/utility/`))return oe;if(te===`hang`)return new Promise((te,xe)=>{setTimeout(()=>xe(new axios.AxiosError(`timeout of ${oe.timeout}ms exceeded`,`ECONNABORTED`,oe)),oe.timeout??15e3)});throw new axios.AxiosError(`Request failed with status code 502`,axios.AxiosError.ERR_BAD_RESPONSE,oe,void 0,{status:502,statusText:`Bad Gateway`,headers:{},config:oe,data:{msg:`External booking provider is temporarily unavailable. Please try again later.`}})})}return oe.interceptors.response.use(void 0,te=>{let xe=te?.config,Se=te?.response?.status;Se===454&&(useUtilityStore().bookingDisabled=!0);let Te=!te.response||Se===502||Se===504;if(xe?.method===`get`&&Te&&te.code!==`ECONNABORTED`&&(xe.__retryCount??0)<1)return xe.__retryCount=(xe.__retryCount??0)+1,new Promise(te=>setTimeout(te,1e3*2**xe.__retryCount)).then(()=>oe.request(xe));if(Se===429&&xe&&(xe.__retryCount??0)<2){xe.__retryCount=(xe.__retryCount??0)+1;let Se=te.response.headers?.[`retry-after`],Te=Se&&/^\d+$/.test(Se)?Math.min(Number(Se)*1e3,5e3):Math.min(1e3*2**xe.__retryCount,5e3);return new Promise(te=>setTimeout(te,Te)).then(()=>oe.request(xe))}return Promise.reject(te)}),oe}var useEventStore=defineStore(`event`,()=>{let te=usePaymentStore(),{voucher:oe}=storeToRefs(useApplyGiftCardStore()),{display:xe}=useAlertStore(),{metaData:Se}=storeToRefs(useUtilityStore()),Te=useUtilityStore(),Ee=useAvailabilityStore(),De=ref({}),ke=computed$2(()=>Object.keys(De.value).length>0),Ae=ref(!1),je=ref(void 0),Me=ref(!0),Ne=ref(EventModuleState.InitialState),Pe=ref(NaN),Fe=ref(1),Ie=ref(NaN),Le=ref(NaN),Re=ref(``),ze=useStorage(`konnectio_name`,``,void 0,{serializer:StorageSerializers.string}),Be=useStorage(`konnectio_phone`,``,void 0,{serializer:StorageSerializers.string}),Ve=useStorage(`konnectio_email`,``,void 0,{serializer:StorageSerializers.string}),He=ref(``),Ue=ref(``),We=ref(!1),Ge=ref(0),st=ref({}),Pr=ref({}),Fr=ref(``),Ir=ref(``),Lr=ref(``);function Rr(te){return te?te.templateId!==void 0:!1}let zr=computed$2(()=>Te.metaData.hotels?.findIndex(te=>te.id===Ee.eventLocation)||0),Br=computed$2(()=>Te.metaData.hotels?.[zr.value]),Vr=computed$2(()=>Br.value?Br.value.maxNumberPerBooking:1/0),Hr=computed$2(()=>Br.value?.name?Br.value.name:``),Ur=computed$2(()=>Br.value?.subtitle?Br.value.subtitle:``),Wr=computed$2(()=>Br.value?.timezone?Br.value.timezone:``),Gr=ref(Ee.eventDate??new Date),Kr=ref(Ee.eventLocation),qr=computed$2(()=>Gr.value!==Ee.eventDate),Jr=computed$2(()=>Kr.value!==Ee.eventLocation),Yr=computed$2(()=>qr.value||Jr.value),Xr=computed$2(()=>(Ee.eventDate??new Date).toISOString()),Zr=computed$2(()=>Rr(je.value)),Qr=computed$2(()=>Rr(je.value)?je.value.numberOfDays:Fe.value),$r=computed$2(()=>Rr(je.value)?je.value.packageCount:0),ei=computed$2(()=>Rr(je.value)?je.value.fromDate:``),ti=computed$2(()=>De.value.events===void 0?void 0:De.value.events.flatMap(te=>te.events??[]).find(te=>te.id===Ie.value)),ni=computed$2(()=>ti.value?ti.value.length:void 0),ri=computed$2(()=>Rr(je.value)?je.value.templateId:0),ii=computed$2(()=>De.value.events.map(te=>({...te,events:te.events?.filter(te=>te.isAvailable===!0||te.isAvailable===!1&&formatDate(te.fromDate)===formatDate(Gr.value))})).filter(te=>te.events&&te.events.length>0)),ai=computed$2(()=>De.value.events.map(te=>({...te,events:te.events?.filter(te=>te.isAvailable===!1&&formatDate(te.fromDate)!==formatDate(Gr.value)).sort((te,oe)=>te.fromDate>oe.fromDate?1:-1)})).filter(te=>te.events&&te.events.length>0)),oi=computed$2(()=>De.value.templates);function si(te=`asc`){return[...ii.value].sort((oe,xe)=>te===`asc`?oe.id-xe.id:xe.id-oe.id)}let ci=computed$2(()=>De.value.fallbackEvents),li=computed$2(()=>De.value.events.length>0),ui=computed$2(()=>De.value.fallbackEvents.length>0),di=computed$2(()=>De.value.templates.length>0),fi=computed$2(()=>ti.value&&ti.value.eventRateType?ti.value.eventRateType:OctopusEventRateType.None),pi=computed$2(()=>{if(!Rr(je.value))return je.value}),mi=computed$2(()=>{if(pi.value!==void 0){let te=pi.value.find(te=>te.time===Re.value);if(te&&te.price)return te.price}return 0}),hi=computed$2(()=>{if(Rr(je.value))return je.value.rooms});function gi(te,oe,xe){let Se=0;if(Rr(je.value)){let Te=je.value.rooms[xe];if(Te){let Ee=Te.addons,De=st.value[`${oe}.${te}.${xe}`]||0;if(De>0){let oe=Ee?.find(oe=>oe.id===te),xe=typeof De==`boolean`?1:De;Se+=getQuantityStrategyPrice(oe?.price,oe?.quantityStrategy,Qr.value,Te.adultPerRoom)*xe}}}else{let oe=Pr.value[te]||0;if(oe>0){let xe=ti.value?.products?.find(oe=>oe.id===te);xe&&(Se+=xe.price*oe)}}return Se}function _i(te,oe){let xe=0;if(Rr(je.value))for(let Se in st.value){let Te=Se.split(`.`);parseInt(Te[0])===te&&parseInt(Te[2])===oe&&(xe+=gi(parseInt(Te[1]),te,oe))}else for(let te in Pr.value)xe+=gi(parseInt(te))*Fe.value;return xe}let vi=computed$2(()=>Rr(je.value)&&je.value.totalPrice||0),yi=computed$2(()=>{if(Ri.value)return Ri.value;let te=NaN;return Rr(je.value)?je.value.rooms!==void 0&&(te=je.value.rooms.flatMap(te=>te.roomGroupId).reduce((te,oe,xe)=>te+_i(oe,xe),vi.value)||0):(te=_i(),te+=mi.value),te}),bi=computed$2(()=>Rr(je.value)&&je.value.rooms!==void 0&&je.value.rooms.flatMap(te=>te.weekendFee).reduce((te,oe)=>te+oe,0)||0),xi=computed$2(()=>Rr(je.value)&&je.value.rooms!==void 0&&je.value.rooms.flatMap(te=>te.roomUpgrade).reduce((te,oe)=>te+oe,0)||0),Si=computed$2(()=>{let te=Pr.value,oe=0;for(let xe in te)oe+=Number.isNaN(te[xe])?0:te[xe];return oe}),Ci=computed$2(()=>Si.value>0),wi=computed$2(()=>!Rr(je.value)&&ti.value?ti.value.products.length>0:!1),Ti=computed$2(()=>!wi.value||Ci.value),Ei=computed$2(()=>fi.value!==OctopusEventRateType.FullDayEvent&&!Zr.value),Di=computed$2(()=>!!(ze.value!==``&&Ve.value!==``&&Be.value.length>=5&&Ti.value&&(!Ei.value||Re.value!==``)));function Oi(te){return Ne.value===EventModuleState.ReservationState&&Ie.value===te&&Me.value}let ki=computed$2(()=>!(Ne.value===EventModuleState.InitialState&&Me.value)),Ai=computed$2(()=>!(Ne.value===EventModuleState.AvailabilityState&&Me.value)),ji=computed$2(()=>je.value!==void 0),Mi=computed$2(()=>Ne.value===EventModuleState.PaymentState&&Me.value);async function Ni(){try{let te=(await useApi().get(`/event/metadata`,{params:{language:getUserLanguage()}})).data;Se.value=te}catch{xe({message:i18n.t(`alert.error.couldntFetchMetadata`),type:`warning`})}}async function Pi(){if(Ne.value=EventModuleState.AvailabilityState,Me.value=!0,Ae.value=!1,TZDate.tz(Wr.value,new Date(Ee.eventDate)).setHours(12,0,0,0)<TZDate.tz(Wr.value).setHours(12,0,0,0)&&(Ee.eventDate=TZDate.tz(Wr.value)),isNaN(Ee.eventLocation))Me.value=!1,xe({message:i18n.t(`alert.error.selectEventId`),type:`warning`});else try{let te=(await useApi().get(`/event/v3/get`,{params:{language:getUserLanguage(),date:formatDate(Ee.eventDate),restaurantId:Ee.eventLocation,eventId:Te.hasActiveIdFilter?Te.activeIdFilter:null,excludeEventId:!Te.hasActiveIdFilter&&Lr.value?Lr.value:null}})).data;De.value=te,Gr.value=Ee.eventDate,Kr.value=Ee.eventLocation,useEventBus(ScrollToTop).emit(),Me.value=!1}catch{Me.value=!1,Ae.value=!0,xe({message:i18n.t(`alert.error.couldntFetchListings`),type:`warning`})}}async function Fi(te){Ne.value=EventModuleState.ReservationState,Me.value=!0;try{let oe=(await useApi().get(`/event/get-template`,{params:{language:getUserLanguage(),date:formatDate(Gr.value),templateId:Ie.value,restaurantId:Kr.value,numberOfPeople:isNaN(Pe.value)?0:Pe.value}})).data;oe.rooms.length===0?xe({message:i18n.t(`alert.error.eventNotAvailable`),type:`warning`}):(je.value=oe,oe.rooms.forEach((te,oe)=>{te.addons.forEach(xe=>{(xe.cardinality===OctopusCardinality.DefaultSingle||xe.cardinality===OctopusCardinality.DefaultMultiple)&&(st.value[`${te.roomGroupId}.${xe.id}.${oe}`]=1)})}),te()),Me.value=!1}catch{Me.value=!1,Ne.value=EventModuleState.AvailabilityState,xe({message:i18n.t(`alert.error.couldntFetchEvent`),type:`warning`})}}async function Ii(te){Ne.value=EventModuleState.ReservationState,Me.value=!0;try{let oe=(await useApi().get(`/event/vacant-times`,{params:{language:getUserLanguage(),date:formatDate(Gr.value),numberOfPeople:isNaN(Pe.value)?1:Pe.value,eventId:Ie.value,tableGroupId:Le.value,restaurantId:Kr.value}})).data;je.value=oe,Me.value=!1,wi.value?te():te(2)}catch{Me.value=!1,Ne.value=EventModuleState.AvailabilityState,xe({message:i18n.t(`alert.error.couldntFetchEvent`),type:`warning`})}}function Li(){let te=[];for(let oe in Pr.value){let xe=Pr.value[parseInt(oe)];xe>0&&te.push({id:parseInt(oe),quantity:xe})}return te}let Ri=ref();async function zi(){if(Fr.value!==``)try{let te=(await useApi().post(`/event/validate-discount-code`,{language:getUserLanguage(),date:formatDate(Gr.value),onlineDiscountCode:Fr.value,products:Li(),restaurantId:Kr.value})).data;te.total?(Ri.value=te.total,Ir.value=Fr.value,Fr.value=``,xe({message:i18n.t(`alert.success.discountCodeApplied`),type:`success`})):xe({message:i18n.t(`alert.error.discountCodeValidation`),type:`warning`})}catch{xe({message:i18n.t(`alert.error.discountCodeValidation`),type:`warning`})}else xe({message:i18n.t(`alert.error.discountCodeEmpty`),type:`error`})}function Bi(){let te,xe,Se,Te=[];Rr(je.value)?(hi.value?.forEach((te,oe)=>{let xe=[],Se=0;for(let Te in st.value){let Ee=Te.split(`.`),De=st.value[Te];parseInt(Ee[0])===te.roomGroupId&&parseInt(Ee[2])===oe&&De>0&&(xe.push({id:Se,addonID:parseInt(Ee[1]),quantity:De}),Se++)}Te.push({adultPerRoom:te.adultPerRoom,count:te.count,roomGroupID:te.roomGroupId,addons:xe})}),te={totalPerson:isNaN(Pe.value)?Si.value:Pe.value,templateID:ri.value,numberOfDays:Fe.value,templateCounts:Te,fromDate:formatDate(Gr.value)}):(xe=Li(),Se=Re.value);let Ee={language:getUserLanguage(),restaurantId:Kr.value,date:formatDate(Gr.value),name:ze.value,email:Ve.value,phone:Be.value,remark:He.value,numberOfPeople:isNaN(Pe.value)?Si.value:Pe.value,days:Qr.value>0?Qr.value:1,allergyFood:Ue.value,discountCode:Ir.value,giftCardCode:oe.value,numberOfHighChairs:Ge.value,flagOnTable:We.value,checkoutUrl:window.location.origin,privacyUrl:window.location.origin},De=`/event/book-template`;return Rr(je.value)?Ee.templateGroup=te:(Ee.time=Se,Ee.eventId=Ie.value,Ee.products=xe,De=`/event/book-event`),{url:De,data:Ee}}async function Vi(oe){Ne.value=EventModuleState.PaymentState,Me.value=!0;let Se=()=>{Me.value=!1,Ne.value=EventModuleState.ReservationState,xe({message:i18n.t(`booking.other.errorMessage`),type:`warning`})},{url:Te,data:Ee}=Bi();return await useApi().post(Te,Ee).then(xe=>{Me.value=!1,te.pay({callback:oe,response:xe.data,enableHostedRedirect:!0})}).catch(te=>{let{status:oe}=te.response??{};if(oe===422)return Me.value=!1,Ne.value=EventModuleState.ReservationState,te.response.data.errors;Se()})}function Hi(){Ri.value=void 0,Fr.value=``,Ir.value=``}function Ui(te=!1){je.value=void 0,st.value={},Pr.value={},Re.value=``,Hi(),te&&Ee.resetEventDate()}function Wi(te){Zr.value||wi.value?te():te(2),Hi()}async function Gi(){await Promise.all([Ni(),Ee.fetchMetadata()])}return{flagOnTable:We,allergies:Ue,isSearchOutdated:Yr,currentEventDate:Gr,currentEventLocation:Kr,metaData:Se,listingData:De,listingsFetchFailed:Ae,tableBasePrice:mi,availabilityData:je,isLoading:Me,moduleState:Ne,numberOfPeople:Pe,numberOfDays:Fe,eventId:Ie,tableGroupId:Le,arrivalTime:Re,addons:st,products:Pr,discountCode:Fr,name:ze,phone:Be,email:Ve,remark:He,isTemplateEvent:Zr,maxNumberOfPeople:Vr,title:Hr,subtitle:Ur,date:Xr,numberOfTotalDays:Qr,numberOfRooms:$r,fromDate:ei,getEventData:ti,length:ni,templateId:ri,getEvents:ii,getTemplates:oi,hasEvents:li,hasFallbackEvents:ui,hasTemplates:di,basePrice:vi,totalPrice:yi,getTemplateData:hi,getEventTableData:pi,roomUpgrade:xi,weekendFee:bi,hasProducts:wi,eventRateType:fi,isReservationFormFilled:Di,isMetadataAvailable:ki,areListingsAvailable:Ai,isAvailabilityDataAvailable:ji,isPaymentLoading:Mi,isEventListingLoading:Oi,fetchMetadata:Ni,fetchListings:Pi,getTemplateAvailability:Fi,getEventAvailability:Ii,validateDiscountCode:zi,localAddonPrice:gi,totalAddonPrice:_i,bookingPayload:Bi,createBooking:Vi,reset:Ui,initialize:Gi,goBack:Wi,getFallbackEvents:ci,hasListingData:ke,hasSelectedProducts:Ci,totalSelectedProducts:Si,requiresArrivalTime:Ei,hasSelectedRequiredProducts:Ti,getUnavailableEvents:ai,timezone:Wr,numberOfHighChairs:Ge,discountValue:Ri,appliedDiscountCode:Ir,excludeEventIds:Lr,getSortedEvents:si}}),defaultEventDate=()=>new Date,defaultExpirationDate=()=>new Date(new Date().getTime()+432e5),defaultArrival=()=>new Date(new Date().setHours(12,0,0,0)),defaultDeparture=()=>new Date(new Date(new Date().setDate(new Date().getDate()+1)).setHours(12,0,0,0)),useAvailabilityStore=defineStore(`availability`,()=>{let te=useEventStore(),oe=useHotelStore(),xe=useUtilityStore(),{display:Se}=useAlertStore(),Te=ref({}),Ee=useStorage(`k_avail_expiry`,defaultExpirationDate(),void 0,{serializer:StorageSerializers.date}),De=computed$2(()=>Ee.value!==void 0&&Ee.value<new Date),ke=useStorage(`k_hotel_adults`,NaN,void 0,{serializer:StorageSerializers.number}),Ae=useStorage(`k_hotel_children`,NaN,void 0,{serializer:StorageSerializers.number}),je=useStorage(`k_hotel_room_count`,1,void 0,{serializer:StorageSerializers.number}),Me=useStorage(`k_hotel_arrival`,defaultArrival(),void 0,{serializer:StorageSerializers.date}),Ne=useStorage(`k_hotel_departure`,defaultDeparture(),void 0,{serializer:StorageSerializers.date}),Pe=useStorage(`k_hotel_loc`,void 0,void 0,{serializer:StorageSerializers.number}),Fe=useStorage(`k_hotel_loc_c`,NaN,void 0,{serializer:StorageSerializers.number}),Ie=useStorage(`k_hotel_has_selected_loc`,!1,void 0,{serializer:StorageSerializers.boolean}),Le=computed$2(()=>Object.keys(Te.value).length>0),Re=computed$2(()=>(Te.value.hotels?.length??0)>1),ze=computed$2(()=>Te.value.hotels??[]),Be=computed$2(()=>daysBetweenDates(Me.value,Ne.value));function Ve(te){if(Le.value)return Te.value.hotels.some(oe=>oe.id===te)}let He=useStorage(`k_event_loc`,NaN,void 0,{serializer:StorageSerializers.number}),Ue=useStorage(`k_event_loc_c`,NaN,void 0,{serializer:StorageSerializers.number}),We=ref(defaultEventDate()),Ge=computed$2(()=>!!Te.value&&Te.value.events&&Te.value.events.length>1),st=computed$2(()=>Te.value.events??[]);function Pr(te){if(Le.value)return Te.value.events.some(oe=>oe.id===te)}function Fr(te){let oe=ze.value.find(({id:oe})=>oe===te);return oe?oe.name:``}function Ir(){Ee.value=defaultExpirationDate()}function Lr(oe){We.value=oe,te.fetchListings()}function Rr(te,xe){Me.value=te,xe&&(Ne.value=xe),useEventBus(ForcedDateChange).emit(),oe.fetchAvailabilityData()}function zr({adults:te,children:oe,arrivalDate:xe,departureDate:Se,location:Te=NaN}){Ir(),ke.value=te,Ae.value=oe,Me.value=xe,Ne.value=Se,Pe.value=Te}function Br({date:te,location:oe}){We.value=te,He.value=oe}function Vr(){We.value=defaultEventDate()}function Hr(){ke.value=xe.defaultAdultAmount,Ae.value=xe.defaultChildAmount,Me.value=xe.defaultArrivalDate(),Vr(),Ne.value=xe.defaultDepartureDate(),Pe.value=void 0,He.value=NaN,Ie.value=!1,Ir()}async function Ur(){try{let te=(await useApi().get(`/availability/metadata`,{params:{language:getUserLanguage()}})).data;Te.value=te,De.value&&Hr(),te.defaultHotelId&&(isNaN(Fe.value)?Fe.value=te.defaultHotelId:Fe.value!==te.defaultHotelId&&(Fe.value=te.defaultHotelId,Pe.value=Fe.value),(Pe.value===void 0||isNaN(Pe.value))&&(Pe.value=te.defaultHotelId)),te.defaultEventId&&(isNaN(Ue.value)?Ue.value=te.defaultEventId:Ue.value!==te.defaultEventId&&(Ue.value=te.defaultEventId,He.value=Ue.value),isNaN(He.value)&&(He.value=te.defaultEventId))}catch{Se({message:i18n.t(`alert.error.couldntFetchMetadata`),type:`warning`})}}return{expiryDate:Ee,adults:ke,children:Ae,roomCount:je,arrivalDate:Me,departureDate:Ne,location:Pe,isExpired:De,nights:Be,eventLocation:He,eventDate:We,metadata:Te,hasHotelLocations:Re,hasEventLocations:Ge,hotelLocations:ze,eventLocations:st,eventLocationControl:Ue,controlLocation:Fe,hasSelectedLocation:Ie,setNewExpiryDate:Ir,reset:Hr,updateDates:Rr,updateHotelAvailability:zr,updateEventAvailability:Br,fetchMetadata:Ur,isValidHotelId:Ve,isValidRestaurantId:Pr,getHotelLocationName:Fr,resetEventDate:Vr,updateEventDate:Lr}});function _arrayLikeToArray$1(te,oe){(oe==null||oe>te.length)&&(oe=te.length);for(var xe=0,Se=Array(oe);xe<oe;xe++)Se[xe]=te[xe];return Se}function _arrayWithHoles(te){if(Array.isArray(te))return te}function _arrayWithoutHoles$1(te){if(Array.isArray(te))return _arrayLikeToArray$1(te)}function _classCallCheck(te,oe){if(!(te instanceof oe))throw TypeError(`Cannot call a class as a function`)}function _defineProperties(te,oe){for(var xe=0;xe<oe.length;xe++){var Se=oe[xe];Se.enumerable=Se.enumerable||!1,Se.configurable=!0,`value`in Se&&(Se.writable=!0),Object.defineProperty(te,_toPropertyKey$1(Se.key),Se)}}function _createClass(te,oe,xe){return oe&&_defineProperties(te.prototype,oe),xe&&_defineProperties(te,xe),Object.defineProperty(te,"prototype",{writable:!1}),te}function _createForOfIteratorHelper(te,oe){var xe=typeof Symbol<`u`&&te[Symbol.iterator]||te[`@@iterator`];if(!xe){if(Array.isArray(te)||(xe=_unsupportedIterableToArray$1(te))||oe&&te&&typeof te.length==`number`){xe&&(te=xe);var Se=0,Te=function(){};return{s:Te,n:function(){return Se>=te.length?{done:!0}:{done:!1,value:te[Se++]}},e:function(te){throw te},f:Te}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
33
|
+
`?(this.line++,this.column=0):this.column++,te},te.prototype.consumeCharRef=function(){var te=this.input.indexOf(`;`,this.index);if(te!==-1){var oe=this.input.slice(this.index,te),xe=this.entityParser.parse(oe);if(xe){for(var Se=oe.length;Se;)this.consume(),Se--;return this.consume(),xe}}},te.prototype.markTagStart=function(){this.delegate.tagOpen()},te.prototype.appendToTagName=function(te){this.tagNameBuffer+=te,this.delegate.appendToTagName(te)},te.prototype.isIgnoredEndTag=function(){var te=this.tagNameBuffer;return te===`title`&&this.input.substring(this.index,this.index+8)!==`</title>`||te===`style`&&this.input.substring(this.index,this.index+8)!==`</style>`||te===`script`&&this.input.substring(this.index,this.index+9)!==`<\/script>`},te}(),Tokenizer=function(){function te(te,oe){oe===void 0&&(oe={}),this.options=oe,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new EventedTokenizer(this,te,oe.mode),this._currentAttribute=void 0}return te.prototype.tokenize=function(te){return this.tokens=[],this.tokenizer.tokenize(te),this.tokens},te.prototype.tokenizePart=function(te){return this.tokens=[],this.tokenizer.tokenizePart(te),this.tokens},te.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},te.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},te.prototype.current=function(){var te=this.token;if(te===null)throw Error(`token was unexpectedly null`);if(arguments.length===0)return te;for(var oe=0;oe<arguments.length;oe++)if(te.type===arguments[oe])return te;throw Error(`token type was unexpectedly `+te.type)},te.prototype.push=function(te){this.token=te,this.tokens.push(te)},te.prototype.currentAttribute=function(){return this._currentAttribute},te.prototype.addLocInfo=function(){this.options.loc&&(this.current().loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},te.prototype.beginDoctype=function(){this.push({type:`Doctype`,name:``})},te.prototype.appendToDoctypeName=function(te){this.current(`Doctype`).name+=te},te.prototype.appendToDoctypePublicIdentifier=function(te){var oe=this.current(`Doctype`);oe.publicIdentifier===void 0?oe.publicIdentifier=te:oe.publicIdentifier+=te},te.prototype.appendToDoctypeSystemIdentifier=function(te){var oe=this.current(`Doctype`);oe.systemIdentifier===void 0?oe.systemIdentifier=te:oe.systemIdentifier+=te},te.prototype.endDoctype=function(){this.addLocInfo()},te.prototype.beginData=function(){this.push({type:`Chars`,chars:``})},te.prototype.appendToData=function(te){this.current(`Chars`).chars+=te},te.prototype.finishData=function(){this.addLocInfo()},te.prototype.beginComment=function(){this.push({type:`Comment`,chars:``})},te.prototype.appendToCommentData=function(te){this.current(`Comment`).chars+=te},te.prototype.finishComment=function(){this.addLocInfo()},te.prototype.tagOpen=function(){},te.prototype.beginStartTag=function(){this.push({type:`StartTag`,tagName:``,attributes:[],selfClosing:!1})},te.prototype.beginEndTag=function(){this.push({type:`EndTag`,tagName:``})},te.prototype.finishTag=function(){this.addLocInfo()},te.prototype.markTagAsSelfClosing=function(){this.current(`StartTag`).selfClosing=!0},te.prototype.appendToTagName=function(te){this.current(`StartTag`,`EndTag`).tagName+=te},te.prototype.beginAttribute=function(){this._currentAttribute=[``,``,!1]},te.prototype.appendToAttributeName=function(te){this.currentAttribute()[0]+=te},te.prototype.beginAttributeValue=function(te){this.currentAttribute()[2]=te},te.prototype.appendToAttributeValue=function(te){this.currentAttribute()[1]+=te},te.prototype.finishAttributeValue=function(){this.current(`StartTag`).attributes.push(this._currentAttribute)},te.prototype.reportSyntaxError=function(te){this.current().syntaxError=te},te}();function tokenize(te,oe){return new Tokenizer(new EntityParser(HTML5NamedCharRefs),oe).tokenize(te)}var LinkifyResult=`LinkifyResult`,StartTag=`StartTag`,EndTag=`EndTag`,Chars=`Chars`,Comment=`Comment`,Doctype=`Doctype`;function linkifyHtml(te,oe={}){let xe=tokenize(te),Se=[],Te=[],Ee=new Options(oe,defaultRender);for(let te=0;te<xe.length;te++){let oe=xe[te];if(oe.type===StartTag){Se.push(oe);let Te=oe.tagName.toUpperCase();if(!(Te===`A`||Ee.ignoreTags.indexOf(Te)>=0||Ee.isIgnoredClass(getAttribute$1(oe.attributes,`class`)))||oe.selfClosing)continue;let De=Se.length;skipTagTokens(Te,xe,++te,Se),te+=Se.length-De-1}else if(oe.type!==Chars)Se.push(oe);else{let te=linkifyChars(oe.chars,Ee);Se.push.apply(Se,te)}}for(let te=0;te<Se.length;te++){let oe=Se[te];switch(oe.type){case LinkifyResult:Te.push(oe.rendered);break;case StartTag:{let te=`<`+oe.tagName;oe.attributes.length>0&&(te+=` `+attributeArrayToStrings(oe.attributes).join(` `)),oe.selfClosing&&(te+=` /`),te+=`>`,Te.push(te);break}case EndTag:Te.push(`</${oe.tagName}>`);break;case Chars:Te.push(escapeText(oe.chars));break;case Comment:Te.push(`<!--${escapeText(oe.chars)}-->`);break;case Doctype:{let te=`<!DOCTYPE ${oe.name}`;oe.publicIdentifier&&(te+=` PUBLIC "${oe.publicIdentifier}"`),oe.systemIdentifier&&(te+=` "${oe.systemIdentifier}"`),te+=`>`,Te.push(te);break}}}return Te.join(``)}function linkifyChars(te,oe){let xe=tokenize$1(te),Se=[];for(let te=0;te<xe.length;te++){let Te=xe[te];Te.t===`nl`&&oe.get(`nl2br`)?Se.push({type:StartTag,tagName:`br`,attributes:[],selfClosing:!0}):!Te.isLink||!oe.check(Te)?Se.push({type:Chars,chars:Te.toString()}):Se.push({type:LinkifyResult,rendered:oe.render(Te)})}return Se}function skipTagTokens(te,oe,xe,Se){let Te=1;for(;xe<oe.length&&Te>0;){let Ee=oe[xe];Ee.type===StartTag&&Ee.tagName.toUpperCase()===te?Te++:Ee.type===EndTag&&Ee.tagName.toUpperCase()===te&&Te--,Se.push(Ee),xe++}return Se}function defaultRender({tagName:te,attributes:oe,content:xe}){return`<${te} ${attributesToString(oe)}>${escapeText(xe)}</${te}>`}function escapeText(te){return te.replace(/</g,`<`).replace(/>/g,`>`)}function escapeAttr(te){return te.replace(/"/g,`"`)}function attributesToString(te){let oe=[];for(let xe in te){let Se=te[xe]+``;oe.push(`${xe}="${escapeAttr(Se)}"`)}return oe.join(` `)}function attributeArrayToStrings(te){let oe=[];for(let xe=0;xe<te.length;xe++){let Se=te[xe][0],Te=te[xe][1]+``;oe.push(`${Se}="${escapeAttr(Te)}"`)}return oe}function getAttribute$1(te,oe){for(let xe=0;xe<te.length;xe++)if(te[xe][0].toLowerCase()===oe)return te[xe][1];return null}var fallbackLocale=`en`,locale=document.documentElement.lang.slice(0,2)||fallbackLocale,instance=createI18n({warnHtmlMessage:!1,fallbackRootWithEmptyString:!1,silentTranslationWarn:!0,allowComposition:!0,legacy:!1,globalInjection:!0,locale,fallbackLocale}),i18n=instance.global;function setupI18n(te){for(let oe in te)i18n.setLocaleMessage(oe,te[oe])}function getAddonMaxQuantity(te,oe){return te===OctopusCardinality.OptionalSingle||te===OctopusCardinality.DefaultSingle?1:oe||1/0}function getPriceQuantityLabel(te){switch(te){case QuantityStrategy.PerUnit:return i18n.t(`general.perUnit`);case QuantityStrategy.PerPerson:return i18n.t(`general.perPerson`);case QuantityStrategy.PerAdult:return i18n.t(`general.perAdult`);case QuantityStrategy.PerChild:return i18n.t(`general.perChild`);case QuantityStrategy.PerNight:return i18n.t(`general.perNight`);case QuantityStrategy.PerPersonPerNight:return i18n.t(`general.perPersonPerNight`);case QuantityStrategy.PerAdultPerNight:return i18n.t(`general.perAdultPerNight`);case QuantityStrategy.PerChildPerNight:return i18n.t(`general.perChildPerNight`)}}function getQuantityStrategyPrice(te,oe,xe,Se=0,Te=0){switch(oe){case QuantityStrategy.PerUnit:return te;case QuantityStrategy.PerPerson:return te*(Se+Te);case QuantityStrategy.PerAdult:return te*Se;case QuantityStrategy.PerChild:return te*Te;case QuantityStrategy.PerNight:return te*xe;case QuantityStrategy.PerPersonPerNight:return te*(Se+Te)*xe;case QuantityStrategy.PerAdultPerNight:return te*Se*xe;case QuantityStrategy.PerChildPerNight:return te*Te*xe;case QuantityStrategy.OneTimePayment:return te;case QuantityStrategy.PerBooking:return te;default:return te}}function getTemplateUnitPrice(te,oe,xe,Se,Te){if(oe===Se&&xe===Te)return te.extraPrice;let Ee=te.otherPriceOptions?.find(te=>te.includedAdults===oe),De=Ee?.extraChildPrice??te.otherPriceOptions?.[0]?.extraChildPrice??0;return oe===Se?te.extraPrice+(xe-Te)*De:(Ee?.price??te.extraPrice)+xe*De}function createTestName(te){return te===void 0?te:te.replace(/([!?.])([a-z])/g,function(te,oe,xe){return xe.toUpperCase()})}function convertDescription(te){return te===void 0?``:linkifyHtml(te,{defaultProtocol:`https`,target:`_blank`,rel:`noopener`,nl2br:!0})}function convertIdToNameTitle(te){switch(te){case 2:return i18n.t(`booking.reservation.nameTitleMr`);case 3:return i18n.t(`booking.reservation.nameTitleMs`);case 4:return i18n.t(`booking.reservation.nameTitleMrs`);case 5:return i18n.t(`booking.reservation.nameTitleDr`);default:return``}}function lowercase(te){return te.toLowerCase()}function convertTimestampToISOString(te){return Number.isNaN(te)?``:new Date(te).toISOString()}function daysBetweenDates(te,oe){let xe=new Date(te),Se=new Date(oe).getTime()-xe.getTime();return Math.round(Se/864e5)}function getUserLanguage(te=!1){return te?document.documentElement.lang||`en-US`:document.documentElement.lang.slice(0,2)||`en`}function ranId(te=10){let oe=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`,xe=62,Se=``;for(let oe=0;oe<te;oe++)Se+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`.charAt(Math.floor(Math.random()*62));return Se}function parseDate(te){if(typeof te==`string`&&/^\d{4}-\d{2}-\d{2}$/.test(te)){let[oe,xe,Se]=te.split(`-`).map(Number);return new Date(oe,xe-1,Se)}return new Date(te)}function showDate(te,oe=0,xe=!1){let Se=parseDate(te);Se=new Date(Se.setDate(Se.getDate()+oe));let Te;switch(getUserLanguage()){case`da`:case`se`:Te={0:`jan`,1:`feb`,2:`mar`,3:`apr`,4:`maj`,5:`jun`,6:`jul`,7:`aug`,8:`sep`,9:`okt`,10:`nov`,11:`dec`};break;case`no`:Te={0:`jan`,1:`feb`,2:`mar`,3:`apr`,4:`mai`,5:`jun`,6:`jul`,7:`aug`,8:`sep`,9:`okt`,10:`nov`,11:`des`};break;case`de`:Te={0:`jan`,1:`feb`,2:`mär`,3:`apr`,4:`mai`,5:`jun`,6:`jul`,7:`aug`,8:`sep`,9:`okt`,10:`nov`,11:`dez`};break;case`fi`:Te={0:`tam`,1:`hel`,2:`maa`,3:`huh`,4:`tou`,5:`kes`,6:`hei`,7:`elo`,8:`syy`,9:`lok`,10:`mar`,11:`jou`};break;case`fr`:Te={0:`jan`,1:`feb`,2:`mar`,3:`apr`,4:`mai`,5:`jun`,6:`jui`,7:`aoû`,8:`sep`,9:`okt`,10:`nov`,11:`dec`};break;case`it`:Te={0:`gen`,1:`feb`,2:`mar`,3:`apr`,4:`mag`,5:`giu`,6:`lug`,7:`ago`,8:`set`,9:`ott`,10:`nov`,11:`dic`};break;default:Te={0:`Jan`,1:`Feb`,2:`Mar`,3:`Apr`,4:`May`,5:`Jun`,6:`Jul`,7:`Aug`,8:`Sep`,9:`Oct`,10:`Nov`,11:`Dec`}}return xe?`${Se.getDate()} ${Te[Se.getMonth()]}`:`${Se.getDate()} ${Te[Se.getMonth()]} ${Se.getFullYear()}`}function isDateValid(te){return!isNaN(new Date(te).getTime())}function areConsecutive(te){let oe=te.sort();for(let te=1;te<oe.length;te++)if(oe[te]!=oe[te-1]+1)return!1;return!0}function isArrEqual(te,oe){return JSON.stringify(te.sort())===JSON.stringify(oe.sort())}function formatDaysString(te,oe=!0){return oe?te.replace(/7/g,`0`).replace(/,\s*$/,``).split(`,`).map(Number):te.replace(/,\s*$/,``).split(`,`).map(Number)}function showDays(te){let oe=`-`,xe=[6,7],Se=formatDaysString(te,!1),Te;switch(getUserLanguage()){case`da`:Te={1:`Mandage`,2:`Tirsdage`,3:`Onsdage`,4:`Torsdage`,5:`Fredage`,6:`Lørdage`,7:`Søndage`};break;default:Te={1:`Mondays`,2:`Tuedays`,3:`Wednesdays`,4:`Thusdays`,5:`Fridays`,6:`Saturdays`,7:`Sundays`}}return oe=Se.map(te=>Te[te]).join(`, `),Se.length===1?oe=`${Te[Se[0]]}`:Se.length===7?oe=i18n.t(`general.everyday`):isArrEqual(xe,Se)?oe=i18n.t(`general.weekends`):areConsecutive(Se)&&Se.length>1&&(oe=`${Te[Se[0]]} - ${Te[Se[Se.length-1]]}`),oe}function showTime(te){let oe=te,xe=te.split(`:`);return xe[2]&&(oe=`${xe[0]}:${xe[1]}`),oe}function formatDate(te){let oe=parseDate(te),xe=``+oe.getFullYear(),Se=``+(oe.getMonth()+1),Te=``+oe.getDate();return Se.length<2&&(Se=`0`+Se),Te.length<2&&(Te=`0`+Te),[xe,Se,Te].join(`-`)}function getSelectFieldValue(te){return Number.isNaN(te)?null:te}function showTimes(te,oe){return te===oe?showTime(te):`${showTime(te)} - ${showTime(oe)}`}function showPrice(te,oe){if(oe)return new Intl.NumberFormat(getUserLanguage(!0),{style:`currency`,currency:oe}).format(te)}function showNumber(te){return new Intl.NumberFormat(getUserLanguage(!0),{maximumFractionDigits:0}).format(te)}function capitalized(te){return te?te.charAt(0).toUpperCase()+te.slice(1):``}var useAlertStore=defineStore(`alert`,()=>{let te=ref(``),oe=ref(`default`),xe=ref(`NotActive`),Se=ref(NaN),Te=ref(`global`);function Ee({message:Te,type:Ee=`default`}){te.value=Te,oe.value=Ee,xe.value===`NotActive`?(xe.value=`StartActive`,Se.value=window.setTimeout(()=>{xe.value=`NotActive`},5e3)):(xe.value=`KeepActive`,clearTimeout(Se.value),Se.value=window.setTimeout(()=>{xe.value=`NotActive`},5e3))}return{message:te,type:oe,status:xe,timer:Se,domain:Te,display:Ee}});function tzName(te,oe,xe=`long`){return new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,timeZone:te,timeZoneName:xe}).format(oe).split(/\s/g).slice(2).join(` `)}var offsetFormatCache={},offsetCache={};function tzOffset(te,oe){try{let xe=(offsetFormatCache[te]||=new Intl.DateTimeFormat(`en-US`,{timeZone:te,timeZoneName:`longOffset`}).format)(oe).split(`GMT`)[1];return xe in offsetCache?offsetCache[xe]:calcOffset(xe,xe.split(`:`))}catch{if(te in offsetCache)return offsetCache[te];let oe=te?.match(offsetRe);return oe?calcOffset(te,oe.slice(1)):NaN}}var offsetRe=/([+-]\d\d):?(\d\d)?/;function calcOffset(te,oe){let xe=+(oe[0]||0),Se=+(oe[1]||0),Te=(oe[2]||0)/60;return offsetCache[te]=xe*60+Se>0?xe*60+Se+Te:xe*60-Se-Te}var TZDateMini=class te extends Date{constructor(...te){super(),te.length>1&&typeof te[te.length-1]==`string`&&(this.timeZone=te.pop()),this.internal=new Date,isNaN(tzOffset(this.timeZone,this))?this.setTime(NaN):te.length?typeof te[0]==`number`&&(te.length===1||te.length===2&&typeof te[1]!=`number`)?this.setTime(te[0]):typeof te[0]==`string`?this.setTime(+new Date(te[0])):te[0]instanceof Date?this.setTime(+te[0]):(this.setTime(+new Date(...te)),adjustToSystemTZ(this,te)):this.setTime(Date.now())}static tz(oe,...xe){return xe.length?new te(...xe,oe):new te(Date.now(),oe)}withTimeZone(oe){return new te(+this,oe)}getTimezoneOffset(){let te=-tzOffset(this.timeZone,this);return te>0?Math.floor(te):Math.ceil(te)}setTime(te){return Date.prototype.setTime.apply(this,arguments),syncToInternal(this),+this}[Symbol.for(`constructDateFrom`)](oe){return new te(+new Date(oe),this.timeZone)}},re$1=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(te=>{if(!re$1.test(te))return;let oe=te.replace(re$1,`$1UTC`);TZDateMini.prototype[oe]&&(te.startsWith(`get`)?TZDateMini.prototype[te]=function(){return this.internal[oe]()}:(TZDateMini.prototype[te]=function(){return Date.prototype[oe].apply(this.internal,arguments),syncFromInternal(this),+this},TZDateMini.prototype[oe]=function(){return Date.prototype[oe].apply(this,arguments),syncToInternal(this),+this}))});function syncToInternal(te){te.internal.setTime(+te),te.internal.setUTCSeconds(te.internal.getUTCSeconds()-Math.round(-tzOffset(te.timeZone,te)*60))}function syncFromInternal(te){Date.prototype.setFullYear.call(te,te.internal.getUTCFullYear(),te.internal.getUTCMonth(),te.internal.getUTCDate()),Date.prototype.setHours.call(te,te.internal.getUTCHours(),te.internal.getUTCMinutes(),te.internal.getUTCSeconds(),te.internal.getUTCMilliseconds()),adjustToSystemTZ(te)}function adjustToSystemTZ(te,oe){let xe=Array.isArray(oe)?constructorArgsToInternalTime(oe):+te.internal,Se=tzOffset(te.timeZone,te),Te=Se>0?Math.floor(Se):Math.ceil(Se),Ee=new Date(+te);Ee.setUTCHours(Ee.getUTCHours()-1);let De=-new Date(+te).getTimezoneOffset(),ke=-new Date(+Ee).getTimezoneOffset(),Ae=De-ke,je=De;if(Ae&&De!==Te&&Date.prototype.getHours.apply(te)!==(Array.isArray(oe)?oe[3]||0:te.internal.getUTCHours())){let oe=new Date(+te),xe=De-Te;xe&&oe.setUTCMinutes(oe.getUTCMinutes()+xe);let Se=tzOffset(te.timeZone,oe);(Se>0?Math.floor(Se):Math.ceil(Se))===Te&&(je=ke)}let Me=je-Te;Me&&Date.prototype.setUTCMinutes.call(te,Date.prototype.getUTCMinutes.call(te)+Me);let Ne=new Date(+te);Ne.setUTCSeconds(0);let Pe=De>0?Ne.getSeconds():(Ne.getSeconds()-60)%60,Fe=Math.round(-(tzOffset(te.timeZone,te)*60))%60;(Fe||Pe)&&Date.prototype.setUTCSeconds.call(te,Date.prototype.getUTCSeconds.call(te)+Fe+Pe);let Ie=tzOffset(te.timeZone,te),Le=Ie>0?Math.floor(Ie):Math.ceil(Ie),Re=-new Date(+te).getTimezoneOffset()-Le,ze=Le!==Te,Be=Re-Me,Ve=Le-Te,He=xe-Le*60*1e3,Ue=Ve>0&&targetInternalTime(te)-xe===Ve*60*1e3&&targetInternalTime(te,He)!==xe;if(ze&&Be&&!Ue){Date.prototype.setUTCMinutes.call(te,Date.prototype.getUTCMinutes.call(te)+Be);let oe=tzOffset(te.timeZone,te),xe=Le-(oe>0?Math.floor(oe):Math.ceil(oe));xe&&Be<0&&Date.prototype.setUTCMinutes.call(te,Date.prototype.getUTCMinutes.call(te)+xe)}syncToInternal(te);let We=(oe?xe:xe+Fe*1e3)-+te.internal;We&&Math.abs(We)<18e5&&(Date.prototype.setTime.call(te,+te+We),syncToInternal(te))}function constructorArgsToInternalTime(te){return Date.UTC(te[0],te.length>1?te[1]:0,te.length>2?te[2]:1,...te.slice(3))}function targetInternalTime(te,oe){let xe=new Date(oe??+te);return xe.setUTCSeconds(xe.getUTCSeconds()-Math.round(-tzOffset(te.timeZone,xe)*60)),+xe}var TZDate=class te extends TZDateMini{static tz(oe,...xe){return xe.length?new te(...xe,oe):new te(Date.now(),oe)}toISOString(){let[te,oe,xe]=this.tzComponents(),Se=`${te}${oe}:${xe}`;return this.internal.toISOString().slice(0,-1)+Se}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[te,oe,xe,Se]=this.internal.toUTCString().split(` `);return`${te?.slice(0,-1)} ${xe} ${oe} ${Se}`}toTimeString(){let te=this.internal.toUTCString().split(` `)[4],[oe,xe,Se]=this.tzComponents();return`${te} GMT${oe}${xe}${Se} (${tzName(this.timeZone,this)})`}toLocaleString(te,oe){return Date.prototype.toLocaleString.call(this,te,{...oe,timeZone:oe?.timeZone||this.timeZone})}toLocaleDateString(te,oe){return Date.prototype.toLocaleDateString.call(this,te,{...oe,timeZone:oe?.timeZone||this.timeZone})}toLocaleTimeString(te,oe){return Date.prototype.toLocaleTimeString.call(this,te,{...oe,timeZone:oe?.timeZone||this.timeZone})}tzComponents(){let te=this.getTimezoneOffset();return[te>0?`-`:`+`,String(Math.floor(Math.abs(te)/60)).padStart(2,`0`),String(Math.abs(te)%60).padStart(2,`0`)]}withTimeZone(oe){return new te(+this,oe)}[Symbol.for(`constructDateFrom`)](oe){return new te(+new Date(oe),this.timeZone)}};function t$1(){return typeof window>`u`||typeof document>`u`}async function n$2(te,oe){return new Promise((xe,Se)=>{if(t$1())return xe();let Te=document.head,Ee=document.createElement(`script`);if(Ee.async=!0,Ee.src=te,Ee.type=oe?.type??`text/javascript`,oe?.defer&&(Ee.defer=!0),oe?.nonce&&Ee.setAttribute(`nonce`,oe.nonce),oe?.preconnect){let oe=document.createElement(`link`);oe.href=new URL(te).origin,oe.rel=`preconnect`,Te.appendChild(oe)}Te.appendChild(Ee),Ee.onload=()=>xe(),Ee.onerror=te=>Se(te)})}function r$1(te){return typeof te==`object`&&!!te&&!Array.isArray(te)}function i$1(te,oe){let xe={...te};for(let Se in oe)if(Object.prototype.hasOwnProperty.call(oe,Se)){let Te=oe[Se],Ee=te[Se];xe[Se]=r$1(Te)&&r$1(Ee)?i$1(Ee,Te):Te}return xe}function a$2(te){if(t$1())return;let oe=new URL(window.location.href);oe.search=``;for(let[xe,Se]of Object.entries(te))oe.searchParams.set(xe,Se);window.history.replaceState({},``,oe.toString())}var o$2=`utm_`;function s$1(te){let oe=new URL(te),xe={},Se=[],Te={};oe.searchParams.forEach((te,oe)=>{oe.includes(o$2)?(xe[oe.replace(o$2,``).replace(`campaign`,`id`)]=te,Se.push(oe)):Te[oe]=te});for(let te of Se)oe.searchParams.delete(te);return{utmParams:xe,cleanQueryParams:Te,cleanUrl:oe.toString()}}function c$2(te){let oe=RegExp(`[?&]${o$2}`);return!!te.match(oe)}function l$2(te,oe){return`${oe.endsWith(`/`)?oe:`${oe}/`}${te.startsWith(`/`)?te.substring(1):te}`}var p$1={resource:{url:`https://www.googletagmanager.com/gtag/js`,inject:!0},dataLayerName:`dataLayer`,gtagName:`gtag`,groupName:`default`,initMode:`auto`};function m$2(){return p$1}function h$1(te){p$1=i$1(p$1,te)}function g$1(...te){let{dataLayerName:oe,gtagName:xe}=m$2();t$1()||(window[oe]=window[oe]||[],window[xe]=function(){window[oe].push(arguments)},window[xe](...te))}function v$1(te,oe){g$1(`consent`,te,oe)}function y$1(te=`default`){v$1(te,{ad_user_data:`granted`,ad_personalization:`granted`,ad_storage:`granted`,analytics_storage:`granted`})}function b$1(te=`default`){v$1(te,{ad_user_data:`denied`,ad_personalization:`denied`,ad_storage:`denied`,analytics_storage:`denied`})}function S$2(te,oe={}){let{groupName:xe,additionalAccounts:Se}=m$2();oe.send_to===void 0&&Se?.length&&(oe.send_to=xe),g$1(`event`,te,oe)}function C$2(te,oe={}){S$2(te,oe)}function T$2(te){g$1(`set`,`linker`,te)}function A$1(...te){g$1(`set`,...te)}function j$1(te){let{pageTracker:oe}=m$2(),xe;if(typeof te==`string`)xe={page_path:te};else if(`path`in te){let Se=oe?.router.options.history.base??``,Te=oe?.useRouteFullPath?te.fullPath:te.path;xe={...te.name?{page_title:te.name.toString()}:{},page_path:oe?.useRouterBasePath?l$2(Te,Se):Te}}else xe=te;if(xe.page_location===void 0&&(xe.page_location=window.location.href),xe.send_page_view===void 0&&(xe.send_page_view=oe?.sendPageView??!0),xe.page_path!==`/`&&xe.page_path?.endsWith(`/`)&&(xe.page_path=xe.page_path.slice(0,-1)),c$2(xe.page_location)){let{utmParams:te,cleanUrl:oe,cleanQueryParams:Se}=s$1(xe.page_location);xe.page_location=oe,a$2(Se),A$1(`campaign`,te)}g$1(`event`,`page_view`,xe)}function M$2(te){let{appName:oe}=m$2(),xe={};typeof te==`string`?xe.screen_name=te:`path`in te?xe.screen_name=te.name??te.path:xe=te,oe&&xe?.app_name===void 0&&(xe.app_name=oe),g$1(`event`,`screen_view`,xe)}function P$1(te={}){return{send_page_view:!1,anonymize_ip:!0,...te}}function F$1(){let{tagId:te,config:oe,groupName:xe,linker:Se,additionalAccounts:Te,hooks:Ee,consentMode:De}=m$2();if(te){if(Ee?.[`config:init:before`]?.(),De===`granted`?y$1():De===`denied`&&b$1(),Se&&T$2(Se),g$1(`js`,new Date),g$1(`config`,te,P$1(oe)),Te)for(let te of Te)g$1(`config`,te.tagId,P$1({groups:xe,...te.config}));Ee?.[`config:init:after`]?.()}}function I$2(te){let{pageTracker:oe}=m$2();return oe?.exclude?typeof oe.exclude==`function`?oe.exclude(te):oe.exclude?.some(({name:oe,path:xe}={})=>oe&&oe===te.name||xe&&xe===te.path):!1}function L$1(te){let{pageTracker:oe,hooks:xe}=m$2();if(I$2(te))return;xe?.[`router:track:before`]?.(te);let Se;oe?.template&&(Se=typeof oe.template==`function`?oe.template(te):oe.template),oe?.useScreenview?M$2(Se&&`screen_name`in Se?Se:te):j$1(Se&&`page_path`in Se?Se:te),xe?.[`router:track:after`]?.(te)}async function R$1(){let{pageTracker:te}=m$2();if(!te?.router)return;let{router:oe}=te;await oe.isReady(),L$1(oe.currentRoute.value),oe.afterEach((te,oe)=>{te.path!==oe.path&&L$1(te)})}async function z$1(){let{resource:te,dataLayerName:oe,tagId:xe,pageTracker:Se,hooks:Te}=m$2();if(xe&&(F$1(),Se?.router&&R$1(),te.inject))try{await n$2(`${te.url}?id=${xe}&l=${oe}`,{preconnect:te.preconnect,defer:te.defer,nonce:te.nonce}),Te?.[`script:loaded`]?.()}catch(te){Te?.[`script:error`]?.(te)}}function H$1(){let{initMode:te}=m$2();te!==`manual`&&z$1()}function U$2(te){h$1(te),H$1()}var useApplyGiftCardStore=defineStore(`applyGiftCard`,()=>{let{display:te}=useAlertStore(),oe=ref(0),xe=ref(``),Se=ref(``),Te=ref(``),Ee=ref(!1),De=ref(!1);async function ke(){xe.value===``?te({message:i18n.t(`alert.error.giftCardEmpty`),type:`error`}):(De.value=!0,await useApi().get(`/gift-card/validate`,{params:{giftcardCode:xe.value,lang:getUserLanguage()}}).then(xe=>{let{valid:De,amount:ke,expirationDate:Ae,productName:je}=xe.data;De?(oe.value=ke,Se.value=Ae,Te.value=je,Ee.value=!0,te({message:i18n.t(`alert.success.giftCardApplied`),type:`success`})):(Ee.value=!1,te({message:i18n.t(`alert.error.giftCardInvalid`),type:`warning`}))}),De.value=!1)}function Ae(){oe.value=0,xe.value=``,Ee.value=!1,te({message:i18n.t(`alert.success.giftCardRemoved`),type:`success`})}return{amount:oe,voucher:xe,expirationDate:Se,productName:Te,isValid:Ee,isLoading:De,apply:ke,reset:Ae}}),REEPAY_HOSTED_URL=`https://checkout.konnectio.com/checkout.html`,REEPAY_MESSAGE_SOURCE=`konnectio-reepay`;function getReepayHostedUrl(){return window.KONNECTIO_CHECKOUT_URL_OVERRIDE??`https://checkout.konnectio.com/checkout.html`}function buildReepayHostedUrl(te){let oe=new URL(getReepayHostedUrl());return oe.searchParams.set(`session`,te.session),oe.searchParams.set(`confirm`,te.confirmationId),oe.searchParams.set(`origin`,te.parentOrigin),oe.searchParams.set(`token`,te.token),oe.searchParams.set(`locale`,te.locale),oe.toString()}function parseReepayHostedMessage(te){if(typeof te!=`object`||!te)return null;let oe=te;return oe.source!==`konnectio-reepay`||![`accept`,`cancel`,`close`,`error`].includes(oe.event)||typeof oe.session!=`string`||typeof oe.confirmationId!=`string`?null:oe}function normalizeEmail(te){return te.trim().toLowerCase()}function normalizePhone(te){let oe=te.replace(/[^\d+]/g,``);return oe.startsWith(`+`)?oe:oe.replaceAll(`+`,``)}async function sha256Hex(te){let oe=await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(te));return Array.from(new Uint8Array(oe),te=>te.toString(16).padStart(2,`0`)).join(``)}async function buildUserData(te){if(typeof crypto>`u`||!crypto.subtle)return;let oe=normalizeEmail(te.email||``),xe=normalizePhone(te.phone||``);if(!oe&&!xe)return;let Se={};return oe&&(Se.email=await sha256Hex(oe)),xe&&(Se.phone_number=await sha256Hex(xe)),Se}var reepayScriptUrl=`https://checkout.reepay.com/checkout.js`,reepayReady=null;function ensureReepayLoaded(te=4e3){return typeof window<`u`&&window.Reepay?Promise.resolve(!0):reepayReady||(reepayReady=new Promise(oe=>{let xe=()=>oe(typeof window<`u`&&!!window.Reepay),Se=Object.assign(document.createElement(`script`),{src:reepayScriptUrl});Se.addEventListener(`load`,xe,{once:!0}),Se.addEventListener(`error`,xe,{once:!0}),document.head.appendChild(Se),setTimeout(xe,te)}),reepayReady)}function offerDue(te){if(typeof te.offerDue==`number`)return te.offerDue;let oe=(te.payments??[]).reduce((te,oe)=>te+(oe.amount??0),0);return(te.totalPrice||0)-oe}var usePaymentStore=defineStore(`payment`,()=>{let{display:te}=useAlertStore(),{paymentGatewayId:oe,bearerToken:xe}=storeToRefs(useUtilityStore()),Se=ref({}),Te=ref(),Ee=ref(NaN),De=ref(!1),ke=computed$2(()=>oe.value!==PaymentGateway.None),Ae=computed$2(()=>Se.value&&Se.value.guest?Se.value.guest.name:``),je=computed$2(()=>Se.value&&Se.value.guest?Se.value.guest.email:``),Me=computed$2(()=>Se.value&&Se.value.guest?Se.value.guest.phone:``),Ne=computed$2(()=>Se.value.adults),Pe=computed$2(()=>Se.value.children),Fe=computed$2(()=>offerDue(Se.value)),Ie=computed$2(()=>Se.value.totalVAT||0),Le=computed$2(()=>Se.value.offerDate),Re=computed$2(()=>Fe.value-Ie.value),ze=computed$2(()=>Se.value.orderLines),Be=computed$2(()=>ze.value?ze.value.length>0:!1);async function Ve(){useApi().put(`/capture/confirm`,{confirmationId:Te.value});let te={transaction_id:Se.value.uniqueID,affiliation:`Konnectio Reservation`,value:Fe.value,tax:Se.value.totalVAT,shipping:0,items:[]};if(Se.value.rooms&&(te.items=Se.value.rooms.map(te=>({item_id:te.id,item_name:`${te.roomGroupName} (${te.roomGroupRatePlanName})`,quantity:1,price:te.totalPrice,start_date:te.arriveDate,end_date:te.leaveDate}))),Se.value.events){let oe=Se.value.events.map(te=>({item_id:te.id,item_name:te.eventName||te.templateName||`Event`,quantity:te.numberOfPeople||1,price:te.totalPrice,start_date:te.eventDate,end_date:te.eventDate}));te.items=te.items.concat(oe)}let oe=await buildUserData({email:je.value,phone:Me.value});oe&&A$1(`user_data`,oe),C$2(`purchase`,te)}let He=ref(!1),Ue=ref(null),We=null,Ge;function st(te){We=window.open(te,`konnectio-reepay`,`popup=yes,width=520,height=800`),He.value=!!We,We||(window.location.href=te)}function Pr(){Ue.value&&De.value&&st(Ue.value)}function Fr(oe,Se,Te){let Ee=buildReepayHostedUrl({session:oe,confirmationId:Se,parentOrigin:window.location.origin,token:xe.value,locale:getUserLanguage()}),ke=new URL(getReepayHostedUrl()).origin;Ue.value=Ee,De.value=!0;let Ae=xe=>{if(xe.origin!==ke)return;let Se=parseReepayHostedMessage(xe.data);Se&&Se.session===oe&&(Se.event===`accept`?(window.removeEventListener(`message`,Ae),clearInterval(Ge),De.value=!1,Ue.value=null,Ve(),te({message:i18n.t(`alert.success.payment`),type:`success`}),Te(2)):Se.event===`error`&&te({message:i18n.t(`alert.error.payment`),type:`warning`}))};clearInterval(Ge),Ge=setInterval(()=>{We?.closed&&(He.value=!1)},500),window.addEventListener(`message`,Ae),st(Ee)}async function Ir({callback:xe,response:De,enableHostedRedirect:ke}){if(!De.error){if(!De.offer)te({message:i18n.t(`booking.other.errorMessage`),type:`warning`});else if(Se.value=De.offer,Te.value=De.confirmationId,Ee.value=De.offer.id,De.easyPayment){if(offerDue(De.offer)===0){Ve(),xe(2);return}if(oe.value===PaymentGateway.ReePay&&!await ensureReepayLoaded()&&ke){Fr(De.easyPayment.paymentID,De.confirmationId,xe);return}if(xe(),oe.value===PaymentGateway.ReePay)try{let oe=new Reepay.EmbeddedCheckout(De.easyPayment.paymentID,{html_element:`konnectio-payment-checkout`});oe.addEventHandler(ReepayEvent.Accept,()=>{Ve(),te({message:i18n.t(`alert.success.payment`),type:`success`}),xe()}),oe.addEventHandler(ReepayEvent.Error,()=>{te({message:i18n.t(`alert.error.payment`),type:`warning`})})}catch{te({message:i18n.t(`alert.error.payment`),type:`warning`})}else{let oe={checkoutKey:De.easyPayment.checkoutSecretKey,paymentId:De.easyPayment.paymentID,containerId:`konnectio-payment-checkout`,language:getUserLanguage()===`da`?`da-DK`:`en-GB`},Se=new Dibs.Checkout(oe);Se.on(`payment-completed`,()=>{console.log(`Konnectio: Payment completed!`),Ve(),te({message:i18n.t(`alert.success.payment`),type:`success`}),xe()}),Se.on(`pay-initialized`,()=>{Se.send(`payment-order-finalized`,!0)})}}else Ve(),xe(2)}}function Lr(){Ee.value=NaN}return{offerId:Ee,offerData:Se,hasPaymentGateway:ke,isHostedCheckoutActive:De,isHostedPopupOpen:He,reopenHostedCheckout:Pr,name:Ae,email:je,phone:Me,adults:Ne,children:Pe,totalPrice:Fe,totalVAT:Ie,offerDate:Le,subTotalPrice:Re,orderSummary:ze,hasOrderLines:Be,pay:Ir,clearOfferId:Lr}}),ForcedDateChange=Symbol(`forcedDateChange`),ScrollToTop=Symbol(`scrollToTop`),useHotelStore=defineStore(`hotel`,()=>{let te=useAvailabilityStore(),oe=useTrackingStore(),xe=usePaymentStore(),{voucher:Se,amount:Te}=storeToRefs(useApplyGiftCardStore()),{display:Ee}=useAlertStore(),{metaData:De}=storeToRefs(useUtilityStore()),ke=useUtilityStore(),Ae=ref({}),je=computed$2(()=>{let oe=[];for(let xe in Ae.value){let Se=parseInt(xe),Te=Wr.value.roomGroups.find(te=>te.id===Se),Ee={roomGroupID:Se,title:Te?.title||``},De=[];Ae.value[Se].forEach(oe=>{let xe=oe.id,ke=Te?.rates.find(te=>te.id===xe);if(ke){let{name:Ee,occupantRates:Ae,addons:je}=ke,Me={ratePlanID:xe??0,name:Ee,addons:je},Ne=[];oe.config.forEach((oe,Ee)=>{let De=oe.units,ke=oe.addons;if(De>0)for(let Me=0;Me<De;Me++){let De=Ae.find(te=>te.index===oe.id);if(!De)continue;let{adultsCount:Pe,childrenCount:Fe}=De,{totalPrice:Ie}=De;if(xa.value){let te=xa.value.offer.rooms.find(te=>te.ratePlanID===xe&&te.roomGroupID===Se)?.totalPrice;te!==void 0&&(Ie=te)}let Le=[];if(!je)continue;for(let oe in ke[Me]){let xe=parseInt(oe),Se=ke[Me][xe];if(Se>0){let{name:oe,price:Te,quantityStrategy:Ee}=je.find(te=>te.id===xe);Le.push({addonID:xe,name:oe,price:Te,quantity:Se,totalPrice:getQuantityStrategyPrice(Te,Ee,te.nights,Pe,Fe)*Se})}}let Re=oe.roomId,ze;Re&&(ze=Te?.roomList.find(te=>te.id===Re)?.name),Ne.push({configIdx:Ee,roomIdx:Me,adultsCount:Pe,childrenCount:Fe,totalPrice:Ie,roomAddons:Le,roomId:Re,roomName:ze})}}),Ne.length>0&&(Me.rooms=Ne,De.push(Me))}De.length>0&&(Ee.variants=De)}),Ee.variants&&oe.push(Ee)}return oe});function Me(te=!1){for(let oe in Ae.value){let xe=parseInt(oe);Ae.value[xe].forEach(oe=>{oe.config.forEach(oe=>{te&&oe.roomId===void 0||(oe.units=0)})})}}let Ne=computed$2(()=>Qi.value.length>0?Qi.value.every(te=>te.addons.length===0):je.value.every(te=>!Pe(te)));function Pe(te){return!te.variants?.every(te=>te.rooms?.every(oe=>ia(te.addons,oe.childrenCount).length===0))}let Fe=computed$2(()=>je.value.length>0);function Ie(te,oe,xe){Ae.value[te][oe].config[xe].units=Ae.value[te][oe].config[xe].units-1}function Le(te){return Wr.value.roomGroups.find(oe=>oe.id===te)?.addons.filter(te=>te.cardinality===OctopusCardinality.Mandatory).map(te=>({addonID:te.id,name:te.name,price:te.price,quantity:1,totalPrice:te.price}))}let Re=computed$2(()=>{let oe=[];for(let xe in Yr.value){let Se=parseInt(xe),Te=Yr.value[Se];if(Te>0){let{price:xe,name:Ee,quantityStrategy:De}=Qi.value.flatMap(te=>te.addons).find(te=>te.id===Se);oe.push({addonID:Se,name:Ee,price:xe,quantity:Te,totalPrice:getQuantityStrategyPrice(xe,De,te.nights,te.adults,te.children)*Te})}}return oe});function ze(oe,xe){let Se=[];for(let Te in oe){let Ee=parseInt(Te),De=oe[Ee];if(De>0){let oe=Qi.value.find(te=>te.id===xe)?.addons.find(te=>te.id===Ee);oe&&Se.push({addonID:Ee,name:oe.name,price:oe.price,quantity:De,totalPrice:getQuantityStrategyPrice(oe.price,oe.quantityStrategy,te.nights,te.adults,te.children)*De})}}return Se}let Be=computed$2(()=>Zr.value.length>0?Zr.value.reduce((te,oe)=>te+oe.unitConfigs.reduce((te,xe)=>te+ze(xe.addons,oe.roomGroupId).reduce((te,{totalPrice:oe})=>te+oe,0),0),0):Re.value.reduce((te,{totalPrice:oe})=>te+oe,0)),Ve=computed$2(()=>{let te=0,oe=0-Te.value;if(Oi.value&&Qi.value.length>0){let xe=Qi.value.flatMap(te=>Le(te.id)||[]);te=oe+na.value+Be.value+He.value*$i.value.length+xe.reduce((te,{totalPrice:oe})=>te+oe,0)}else{let xe=je.value.flatMap(({variants:te})=>te).flatMap(({rooms:te})=>te).reduce((te,{totalPrice:oe})=>te+oe,oe);te=je.value.flatMap(({variants:te})=>te).flatMap(({rooms:te})=>te).flatMap(({roomAddons:te})=>te).reduce((te,{totalPrice:oe})=>te+oe,xe)}return Ui.value&&Ui.value?.providesDiscount&&(te-=te*(Ui.value.discountPercent/100)),te}),He=computed$2(()=>Zi.value?Zi.value.weekendFee:0),Ue=computed$2(()=>je.value.flatMap(({variants:te})=>te).flatMap(({rooms:te})=>te)),We=computed$2(()=>Oi.value?$i.value.length:Ue.value.length),Ge=computed$2(()=>Oi.value?$i.value.reduce((te,oe)=>te+oe.adults,0):Ue.value.reduce((te,{adultsCount:oe})=>te+oe,0)),st=computed$2(()=>Oi.value?$i.value.reduce((te,oe)=>te+oe.children,0):Ue.value.reduce((te,{childrenCount:oe})=>te+oe,0)),Pr=computed$2(()=>Ge.value>0&&Ge.value!==te.adults),Fr=computed$2(()=>st.value>0&&st.value!==te.children),Ir=ref(te.arrivalDate),Lr=ref(te.departureDate),Rr=ref(te.adults),zr=ref(te.children),Br=ref(te.location||NaN),Vr=computed$2(()=>formatDate(Ir.value)!==formatDate(te.arrivalDate)||formatDate(Lr.value)!==formatDate(te.departureDate)),Hr=computed$2(()=>Br.value!==te.location),Ur=computed$2(()=>Vr.value||Hr.value),Wr=ref({}),Gr=ref(!1),Kr=ref(!0),qr=ref(0),Jr=ref(NaN),Yr=ref({}),Xr=ref(NaN),Zr=ref([]),Qr=ref(``),$r=ref(``),ei=ref(``),ti=ref(``),ni=ref(``),ri=ref(null),ii=ref(null),ai=ref(!1),oi=ref(!1),si=ref(!1),ci=useStorage(`konnectio_name`,``,void 0,{serializer:StorageSerializers.string}),li=useStorage(`konnectio_nameTitle`,2,void 0,{serializer:StorageSerializers.number}),ui=useStorage(`konnectio_email`,``,void 0,{serializer:StorageSerializers.string}),di=useStorage(`konnectio_confirm_email`,``,void 0,{serializer:StorageSerializers.string}),fi=useStorage(`konnectio_phone`,``,void 0,{serializer:StorageSerializers.string}),pi=useStorage(`konnectio_company`,``,void 0,{serializer:StorageSerializers.string}),mi=useStorage(`konnectio_postal`,``,void 0,{serializer:StorageSerializers.string}),hi=useStorage(`konnectio_city`,``,void 0,{serializer:StorageSerializers.string}),gi=useStorage(`konnectio_country`,57,void 0,{serializer:StorageSerializers.number}),_i=useStorage(`konnectio_address`,``,void 0,{serializer:StorageSerializers.string}),vi=useStorage(`konnectio_sortingKeys`,{pricesFrom:!1},void 0,{serializer:StorageSerializers.object}),yi=ref(``),bi=ref(``),xi=ref(!1),Si=ref(!1),Ci=ref(!1),wi=ref(null),Ti=ref(void 0),Ei=ref(),Di=ref(),Oi=computed$2(()=>!isNaN(Jr.value)),ki=computed$2(()=>ke.metaData.hotels?.findIndex(oe=>oe.id===te.location)||0),Ai=computed$2(()=>ke.metaData.hotels?.[ki.value]),ji=computed$2(()=>ke.metaData.hotels&&ke.metaData.hotels.length>1),Mi=computed$2(()=>ke.metaData.hotels?ke.metaData.hotels.flatMap(te=>({id:te.id,name:te.name})):[]),Ni=computed$2(()=>!!ri.value),Pi=computed$2(()=>!!ii.value),Fi=computed$2(()=>Ai.value?.termsOfService?Ai.value.termsOfService:``),Ii=computed$2(()=>Ai.value?.hotelMapImage?Ai.value.hotelMapImage:null),Li=computed$2(()=>!!(Ai.value?.useDiscountCard&&ke.hasMemberCards(te.location))),Ri=computed$2(()=>Fi.value!==``),zi=computed$2(()=>Ai.value?.country?Ai.value.country.name:``),Bi=computed$2(()=>ke.metaData.countries?ke.metaData.countries:[]),Vi=computed$2(()=>ke.metaData.cardTypes?ke.metaData.cardTypes:[]),Hi=computed$2(()=>Vi.value.map(te=>({value:te.name,label:te.shortDescription}))),Ui=computed$2(()=>Vi.value.find(te=>te.name===Ti.value?.cardType)),Wi=computed$2(()=>Ai.value?.name?Ai.value.name:``),Gi=computed$2(()=>ke.metaData&&Object.keys(ke.metaData).length!==0),Ki=computed$2(()=>Object.keys(Wr.value).length!==0),qi=computed$2(()=>!(!ci.value[1]||!ui.value||ke.requireEmailConfirmation&&di.value!==ui.value||!(fi.value.length>=5)||!mi.value||!hi.value||!_i.value)),Ji=computed$2(()=>qr.value===1&&Kr.value),Yi=computed$2(()=>qr.value===3&&Kr.value),Xi=computed$2(()=>Ki.value?Wr.value.templates.concat(Wr.value.specialTemplates):[]),Zi=computed$2(()=>{if(Xi.value.length>0)return Xi.value.find(te=>te.id===Jr.value)}),Qi=computed$2(()=>!Zi.value||!Zr.value?[]:Zr.value.map(te=>Zi.value.templateRoomGroups.find(oe=>oe.id===te.roomGroupId)).filter(te=>te!==void 0)),$i=computed$2(()=>{let te=[];return Zr.value.forEach((oe,xe)=>{oe.unitConfigs.forEach((Se,Te)=>{te.push({roomGroupId:oe.roomGroupId,adults:Se.adults,children:Se.children,selectionIdx:xe,configIdx:Te})})}),te});function ea(oe,xe,Se){let Te=Qi.value.find(te=>te.id===oe);return Te?getTemplateUnitPrice(Te,xe,Se,te.adults||1,te.children||0):0}let na=computed$2(()=>xa.value&&xa.value.offer.offerTemplates?xa.value.offer.offerTemplates[0].totalPrice:Qi.value.length===0?0:Zr.value.reduce((te,oe)=>te+oe.unitConfigs.reduce((te,xe)=>te+ea(oe.roomGroupId,xe.adults,xe.children),0),0));function ia(te,oe){let xe=[];return te&&(xe=te.filter(te=>te.quantityStrategy!==QuantityStrategy.PerChild&&te.quantityStrategy!==QuantityStrategy.PerChildPerNight||oe!=0)),xe.filter(te=>!!te.image).concat(xe.filter(te=>!te.image))}function aa(te){return Wr.value.roomGroups.find(oe=>oe.id===te)}function oa(te,oe){return`[REMARKS]: ${yi.value} \r\n [ALLERGIES]: ${bi.value} \r\n [REQUESTED ARRIVAL]: ${te} \r\n [REQUESTED DEPARTURE]: ${oe}`}function sa(te,oe,xe,Se){let Te=(oe?xe:Se?$r.value:ei.value).split(`:`);return convertTimestampToISOString(new Date(te).setUTCHours(parseInt(Te[0]),parseInt(Te[1]),0,0))}function ca(oe){return daysBetweenDates(te.arrivalDate,te.departureDate)*oe}async function la(){Kr.value=!0;try{let te=(await useApi().get(`/hotel/metadata`,{params:{language:getUserLanguage()}})).data;De.value=te}catch{Ee({message:i18n.t(`alert.error.couldntFetchMetadata`),type:`warning`})}Kr.value=!1}let fa=ref(),pa=computed$2(()=>fa.value?.name);async function ma(oe){try{let xe=await useApi().post(`/hotel/check-guest-discount`,{guestDiscountId:oe});if(xe.data.isValid){Ee({message:i18n.t(`alert.success.guestDiscountCodeApplied`),type:`success`});let oe=xe.data.guestDiscount;fa.value=oe,ja(oe.id);let Se=new Date(parseDate(oe.periods[0].fromDate).setHours(12,0,0,0)),Te=new Date(new Date().setHours(12,0,0,0));return Se>Te?(te.updateDates(new Date(parseDate(oe.periods[0].fromDate))),!0):(te.updateDates(Te),!0)}return Ee({message:i18n.t(`alert.error.guestDiscountCodeInvalid`),type:`error`}),!1}catch{return Ee({message:i18n.t(`booking.other.errorMessage`),type:`error`}),!1}}async function _a(){if(!ii.value)return!1;let xe=te.location??null;(xe===null||isNaN(xe))&&(xe=null);try{let Se=await useApi().post(`/hotel/deal-template-offer`,{discountCode:ii.value,fromDate:formatDate(te.arrivalDate),toDate:formatDate(te.departureDate),adultsCount:te.adults,childrenCount:te.children,language:getUserLanguage(),hotelId:xe,searchFirstAvailable:si.value});if(Se.status!==200)return!1;let Te=Se.data.fromDate,Ee=Se.data.toDate;return Te&&Ee&&(Te!==formatDate(te.arrivalDate)&&(te.arrivalDate=new Date(parseDate(Te).setHours(12,0,0,0))),Ee!==formatDate(te.departureDate)&&(te.departureDate=new Date(parseDate(Ee).setHours(12,0,0,0)))),Wr.value={roomGroups:[],templates:[Se.data],specialTemplates:[],nextAvailableDates:[]},ai.value=!0,oi.value=!1,ni.value=ii.value,Rr.value=te.adults,zr.value=te.children,Ir.value=te.arrivalDate,Lr.value=te.departureDate,Br.value=te.location??NaN,$r.value=ke.defaultArrivalTime(Br.value),ei.value=ke.defaultDepartureTime(Br.value),useEventBus(ScrollToTop).emit(),oe.viewItemList(),!0}catch(te){let oe=te?.response?.data?.error_code,xe=te?.response?.status;return xe===503?(oi.value=!0,Ee({message:i18n.t(`alert.error.couldntFetchListings`),type:`warning`}),ai.value=!0,!0):(xe===422&&oe&&oe!==`deal_code.invalid`&&(Ee({message:i18n.t(`alert.error.discountCodeInvalid`),type:`error`}),Ea(),ai.value=!1,oi.value=!1),!1)}}async function va(){if(qr.value=1,Kr.value=!0,Gr.value=!1,await _a()){Kr.value=!1;return}if(ai.value=!1,oi.value=!1,si.value){ii.value&&(Ee({message:i18n.t(`alert.error.discountCodeInvalid`),type:`error`}),Ea()),Kr.value=!1;return}let xe=te.location??null;(xe===null||isNaN(xe))&&(xe=null);try{let Se=await useApi().get(`/hotel/availability`,{params:{fromDate:formatDate(te.arrivalDate),toDate:formatDate(te.departureDate),adultsCount:te.adults,childrenCount:te.children,roomCount:te.roomCount,roomGroupIds:ke.hasActiveIdFilter?ke.activeIdFilter:null,guestDiscountId:ri.value,guestDiscountCode:ii.value,language:getUserLanguage(),hotelId:xe}});Se.status===200?(Wr.value=Se.data,Gr.value=!1,Rr.value=te.adults,zr.value=te.children,Ir.value=te.arrivalDate,Lr.value=te.departureDate,Br.value=te.location??NaN,$r.value=ke.defaultArrivalTime(Br.value),ei.value=ke.defaultDepartureTime(Br.value),useEventBus(ScrollToTop).emit(),oe.viewItemList()):Ee({message:`${i18n.t(`booking.other.errorMessage`)} (HTTP: ${Se.status})`,type:`warning`})}catch{Gr.value=!0,Ee({message:i18n.t(`alert.error.couldntFetchListings`),type:`warning`})}Kr.value=!1}async function ya(){await Promise.all([la(),te.fetchMetadata()])}function ba(te=!1){let oe=[];isNaN(Jr.value)?je.value.forEach(({variants:te,roomGroupID:xe})=>{let Se=Le(xe);te?.forEach(({rooms:te,ratePlanID:Te})=>{te?.forEach(({adultsCount:te,childrenCount:Ee,roomAddons:De,roomId:ke})=>{oe.push({roomGroupID:xe,ratePlanID:Te,adultsCount:te,childrenCount:Ee,guest:{name:ci.value,phone:fi.value,email:ui.value},roomAddons:De.concat(Se||[]),selectedRoomID:ke})})})}):Zr.value.length>0?$i.value.forEach(te=>{let xe=Zr.value[te.selectionIdx].unitConfigs[te.configIdx],Se=ze(xe.addons,te.roomGroupId);oe.push({templateID:Jr.value,roomGroupID:te.roomGroupId,ratePlanID:null,adultsCount:te.adults,childrenCount:te.children,roomAddons:Se.concat(Le(te.roomGroupId)||[]),guest:{title:convertIdToNameTitle(li.value),guestID:0,name:ci.value,email:ui.value,phone:fi.value,newsmails:xi.value}})}):oe.push({templateID:Jr.value,roomGroupID:Xr.value,ratePlanID:null,adultsCount:Rr.value,childrenCount:zr.value,roomAddons:Re.value.concat(Le(Xr.value)||[]),guest:{title:convertIdToNameTitle(li.value),guestID:0,name:ci.value,email:ui.value,phone:fi.value,newsmails:xi.value}});let xe=Br.value;return isNaN(xe)&&(xe=null),{offerID:xa.value?xa.value.offer.id:null,totalPrice:Ve.value,fromDate:formatDate(Ir.value),toDate:formatDate(Lr.value),hotelId:xe,guest:{travellingFor:Qr.value,title:convertIdToNameTitle(li.value),guestID:0,name:ci.value,email:ui.value,firmName:pi.value,phone:fi.value,country:gi.value,address1:_i.value,postal:String(mi.value),city:hi.value,newsmails:xi.value},giftCardCode:Se.value,discountCode:te?ni.value:ti.value,selectedRooms:oe,remark:oa(sa(Ir.value,!ke.hasUserArrivalSelection(Br.value),ke.defaultArrivalTime(Br.value),!0),sa(Lr.value,!ke.hasUserDepartureSelection(Br.value),ke.defaultDepartureTime(Br.value),!1)),checkoutUrl:window.location.origin,privacyUrl:window.location.origin,termsOfserviceURL:window.location.origin,memberCard:Ti.value}}let xa=ref(),Sa=ref(!1);async function Ca(){if(ti.value!==``){Sa.value=!0;let te=ti.value;useApi().post(`/hotel/validate-discount-code`,ba()).then(oe=>{Sa.value=!1;let xe=oe.data;xe.discountApplyed===!0?(xe.offer&&(xa.value=xe),ni.value=te,ii.value=te,ti.value=``,Ee({message:i18n.t(`alert.success.discountCodeApplied`),type:`success`})):(ii.value===te&&(ii.value=null),xe.error==`CodeNotApplicable`?Ee({message:i18n.t(`alert.error.discountCodeNotApplicable`),type:`error`}):Ee({message:i18n.t(`alert.error.discountCodeInvalid`),type:`error`}))}).catch(()=>{Sa.value=!1,ii.value===te&&(ii.value=null),Ee({message:`${i18n.t(`alert.error.discountCodeValidation`)}`,type:`warning`})})}else Ee({message:i18n.t(`alert.error.discountCodeEmpty`),type:`error`})}let Ta=computed$2(()=>xa.value?.offer.properties);function Ea(){xa.value=void 0,ti.value=``,ni.value=``,ii.value=null}function Da(){Ea(),ai.value=!1,oi.value=!1}async function Oa(){if(wi.value&&Ei.value){let te={cardType:wi.value,cardNumber:String(Ei.value),controlNr:Di.value,postalCode:String(mi.value)};useApi().post(`/hotel/validate-card-number`,te).then(oe=>{oe.status===200&&(oe.data.success===!0?(Ti.value=te,Ee({message:i18n.t(`alert.success.memberCardValid`),type:`success`})):Ee({message:i18n.t(`alert.error.memberCardInvalid`),type:`error`}))}).catch(()=>{Ee({message:i18n.t(`alert.error.memberCardInvalid`),type:`error`})})}else Ee({message:i18n.t(`alert.error.memberCardEmpty`),type:`error`})}async function ka(te,oe){if(Ci.value===!1&&Ri.value)Ee({message:i18n.t(`alert.error.acceptTerms`,{terms:i18n.t(`general.termsAndConditions`)}),type:`error`});else return qr.value=3,Kr.value=!0,await useApi().post(`/hotel/create-reservation`,ba(!0)).then(oe=>{Si.value=!1,Kr.value=!1;try{xe.pay({callback:te,response:oe.data,enableHostedRedirect:!0})}catch{qr.value=2,Ee({message:i18n.t(`booking.other.errorMessage`),type:`warning`})}}).catch(te=>{Kr.value=!1;let{status:xe}=te.response??{};if(xe===422)return qr.value=2,te.response.data.errors;xe===503?(qr.value=1,Ee({message:i18n.t(`alert.error.noRoomAvailable`),type:`warning`}),oe(),Ia()):(qr.value=2,Ee({message:i18n.t(`booking.other.errorMessage`),type:`warning`}))})}async function Aa({id:te,reason:oe,remark:xe}){await useApi().post(`/hotel/cancel-reservation`,{id:te,reason:oe,remark:xe})}function ja(te){ri.value=te}function Ma(te){ii.value=te}function Na(){ri.value=null}function Pa(){ii.value=null}function Fa(){Jr.value=NaN,Xr.value=NaN,Yr.value={},Zr.value=[]}function Ia(){Me(),Ea(),Fa(),ai.value=!1}function La(){Fa(),Me(!0)}function Ra(){ya()}return{adultsMismatch:Pr,childrenMismatch:Fr,totalRooms:We,totalAdults:Ge,totalChildren:st,isSearchOutdated:Ur,locationMismatch:Hr,totalTemplateAddonPrice:Be,hasTermOfService:Ri,currentDepartureDate:Lr,currentArrivalDate:Ir,currentAdults:Rr,currentChildren:zr,currentLocation:Br,isValidatingDiscountCode:Sa,discountVouchers:Ta,discountCode:ti,datesMismatch:Vr,appliedDiscountCode:ni,hasGuestDiscountId:Ni,hasGuestDiscountCode:Pi,guestDiscountId:ri,guestDiscountCode:ii,dealResolved:ai,dealNoAvailability:oi,requireDealCode:si,hasMemberCards:Li,getMandatoryRoomGroupAddons:Le,getTemplateRoomUnitPrice:ea,resetDiscountVoucher:Ea,resetDealFlow:Da,clearRoomSelection:Me,validateDiscountCode:Ca,setGuestDiscountId:ja,setGuestDiscountCode:Ma,clearGuestDiscountId:Na,clearGuestDiscountCode:Pa,validateMemberCard:Oa,selectedMemberCardData:Ui,selectedMemberCardObject:Ti,isTemplateReservation:Oi,selectionHasNoAddons:Ne,guestDiscountName:pa,hasHotelList:ji,hotelList:Mi,areListingsLoading:Ji,roomSelect:Ae,removeRoom:Ie,termsOfService:Fi,metaData:De,availabilityData:Wr,availabilityFetchFailed:Gr,isLoading:Kr,moduleState:qr,templateAddons:Yr,templateID:Jr,roomGroupID:Xr,templateRoomSelections:Zr,templateRoomUnits:$i,travelingFor:Qr,arrivalTime:$r,departureTime:ei,name:ci,nameTitle:li,email:ui,confirmEmail:di,phone:fi,firmName:pi,postal:mi,city:hi,country:gi,address:_i,remark:yi,allergies:bi,newsMails:xi,roomDisplay:je,isPaymentInitialized:Si,hotelCountry:zi,countries:Bi,title:Wi,isMetadataAvailable:Gi,isAvailabilityDataAvailable:Ki,totalPrice:Ve,selectedPackage:Zi,isPaymentLoading:Yi,getSingleListing:aa,getBasePrice:ca,getSelectedPackageRooms:Qi,isReservationFormFilled:qi,hasValidRoomSelection:Fe,fetchMetadata:ya,fetchAvailabilityData:va,fetchDealTemplateOffer:_a,createReservation:ka,resetTemplate:Fa,initialize:Ra,reservationPayload:ba,filterAddons:ia,cancelReservation:Aa,hasAvailableRoomAddons:Pe,checkGuestDiscount:ma,onOverviewReset:La,templateRoomTotalPrice:na,discountPayload:xa,acceptTerms:Ci,sortingKeys:vi,weekendFee:He,hotelMapImage:Ii,memberCards:Vi,memberCardList:Hi,selectedMemberCard:wi,memberCardControlNumber:Di,memberCardNumber:Ei}}),useTrackingStore=defineStore(`tracking`,()=>{let te=useUtilityStore(),oe=useHotelStore(),xe=useEventStore(),Se=computed$2(()=>{let te=[];return oe.roomDisplay.forEach(({variants:oe})=>{oe?.forEach(({rooms:oe,name:xe})=>{oe?.forEach(({totalPrice:oe})=>{te.push({name:xe,quantity:1,price:oe})})})}),{items:te,value:oe.totalPrice}}),Te=computed$2(()=>{let te=[];if(xe.isTemplateEvent)xe.getTemplateData?.forEach(oe=>{let Se=xe.getEventData;te.push({name:Se?.name||`Template Event`,quantity:oe.count||1,price:oe.totalPrice||0})});else{let oe=xe.getEventData;oe&&te.push({name:oe.name||`Event`,quantity:1,price:xe.totalPrice})}return{items:te,value:xe.totalPrice}}),Ee=computed$2(()=>[...oe.availabilityData.roomGroups.map(te=>({item_id:te.id.toString(),item_name:te.title})),...oe.availabilityData.templates.map(te=>({item_id:te.id.toString(),item_name:te.name}))]);function De(){U$2({appName:`Konnectio Booking Engine`,tagId:te.googleApiKey,config:{params:{send_page_view:!1}}})}function ke(){S$2(`view_item_list`,{item_list_id:`hotel_rooms`,item_list_name:`Hotel rooms`,event_label:`Fetched hotel room list`,event_category:`ecommerce`,items:Ee.value})}function Ae({id:oe,name:xe,value:Se,label:Te,category:Ee=`general`}){return{items:[{item_id:oe.toString(),item_name:xe}],event_label:Te,event_category:Ee,value:Se,currency:te.currency}}function je(te,oe){S$2(te,Ae(oe))}function Me({id:te,name:oe,value:xe}){je(`add_to_cart`,{id:te,name:oe,value:xe,label:`Added to cart`,category:`ecommerce`})}function Ne({id:te,name:oe,value:xe}){je(`remove_from_cart`,{id:te,name:oe,value:xe,label:`Removed to cart`,category:`ecommerce`})}function Pe(te){S$2(`view_item`,{items:[{item_name:te}]})}async function Fe(){let te=await buildUserData({email:oe.email,phone:oe.phone});te&&A$1(`user_data`,te),C$2(`begin_checkout`,Se.value)}async function Ie(){let te=await buildUserData({email:xe.email,phone:xe.phone});te&&A$1(`user_data`,te),C$2(`begin_checkout`,Te.value)}return{hotelItems:Ee,hotelCart:Se,eventCart:Te,setup:De,viewItem:Pe,addToCart:Me,removeFromCart:Ne,beginCheckout:Fe,beginEventCheckout:Ie,viewItemList:ke}}),useUtilityStore=defineStore(`utilities`,()=>{let te=useAvailabilityStore(),oe=useTrackingStore(),{display:xe}=useAlertStore(),Se=useStorage(`k_utils_settings`,{},void 0,{serializer:StorageSerializers.object}),Te=ref([]),Ee=ref({}),De=computed$2(()=>te=>te!==void 0&&Te.value[te]?!Te.value[te].disableChildSelection:!0),ke=computed$2(()=>te=>te!==void 0&&Te.value[te]?!Te.value[te].hideArrivalDepartureInputs:!1),Ae=computed$2(()=>te=>te!==void 0&&Te.value[te]?!Te.value[te].disableArrivalUserSelection:!1),je=computed$2(()=>te=>te!==void 0&&Te.value[te]?!Te.value[te].disableDepartureUserSelection:!1),Me=computed$2(()=>te=>te!==void 0&&Te.value[te]?Te.value[te].enableRoomAmountSearch:!1),Ne=computed$2(()=>te=>te!==void 0&&Te.value[te]?!Te.value[te].hideMemberCards:!0),Pe=computed$2(()=>te=>te!==void 0&&Te.value[te]?Te.value[te].sharedAddonSelection:!1),Fe=computed$2(()=>te=>te!==void 0&&Te.value[te]?Te.value[te].arrivalEarliest:``),Ie=computed$2(()=>te=>te!==void 0&&Te.value[te]?Te.value[te].arrivalDefault:``),Le=computed$2(()=>te=>te!==void 0&&Te.value[te]?Te.value[te].arrivalLatest:``),Re=computed$2(()=>te=>te!==void 0&&Te.value[te]?Te.value[te].departureEarliest:``),ze=computed$2(()=>te=>te!==void 0&&Te.value[te]?Te.value[te].departureDefault:``),Be=computed$2(()=>te=>te!==void 0&&Te.value[te]?Te.value[te].departureLatest:``),Ve=computed$2(()=>Se.value.maximumNightsAvailable),He=computed$2(()=>Se.value.enableTracking),Ue=computed$2(()=>Se.value.googleApiKey),We=computed$2(()=>Se.value.recaptchaSiteKey),Ge=computed$2(()=>Se.value.defaultAdultAmount),st=computed$2(()=>Se.value.defaultChildAmount),Pr=computed$2(()=>Se.value.maxAdultAmount),Fr=computed$2(()=>Se.value.maxChildAmount),Ir=computed$2(()=>Se.value.firstSelectableDateOffset),Lr=computed$2(()=>Se.value.lastSelectableDateOffset),Rr=computed$2(()=>Se.value.hideTitle),zr=computed$2(()=>Se.value.headerHeight),Br=computed$2(()=>Se.value.enableStickyHeader),Vr=computed$2(()=>Se.value.disableNamePrefix),Hr=computed$2(()=>Se.value.disableGiftCardVoucher),Ur=computed$2(()=>Se.value.disableDiscountVoucher),Wr=computed$2(()=>Se.value.disablePricesFrom),Gr=computed$2(()=>Se.value.disableCalendarPricesAvailability),Kr=computed$2(()=>Se.value.hideAvailableRoomAmount),qr=computed$2(()=>Se.value.disableNewsletterSignup),Jr=computed$2(()=>Se.value.disableTravelingFor),Yr=computed$2(()=>Se.value.disableTravelingForBleasure),Xr=computed$2(()=>Se.value.disableCompanyField),Zr=computed$2(()=>Se.value.hideEventLength),Qr=computed$2(()=>Se.value.hideEventEndTime),$r=computed$2(()=>Se.value.hideAvailabilityNotice),ei=computed$2(()=>Se.value.autoSelectRateId),ti=computed$2(()=>Se.value.splitBookingCalendar),ni=computed$2(()=>Se.value.hideEventGuestAmount),ri=computed$2(()=>Se.value.hideOptionalLabel),ii=computed$2(()=>Se.value.enableMultipleConfigurations),ai=computed$2(()=>Se.value.selectGiftCardAsDefault),oi=computed$2(()=>Se.value.requireEmailConfirmation),si=ref(null),ci=ref(``),li=ref(!1),ui=ref(!1),di=computed$2(()=>`Bearer ${ci.value}`),fi=computed$2(()=>!!Ee.value&&!!Ee.value.hotels),pi=computed$2(()=>fi.value?Ee.value.hotels[0].currency.currencyCode:``),mi=computed$2(()=>fi.value?Ee.value.hotels[0].currency.id:NaN),hi=computed$2(()=>fi.value?Ee.value.hotels[0].name:``),gi=computed$2(()=>fi.value&&Ee.value.hotels[0].paymentGatewayId||PaymentGateway.None),_i=computed$2(()=>!!We.value),vi=computed$2(()=>!!si.value),yi=computed$2(()=>{let te=!0;return(gi.value===PaymentGateway.None||gi.value===PaymentGateway.AskForCreditCard)&&(te=!1),te}),bi=()=>new Date(new Date(new Date().setDate(new Date().getDate()+Ir.value)).setHours(12,0,0,0)),xi=()=>new Date(new Date(new Date().setDate(new Date().getDate()+Ir.value+1)).setHours(12,0,0,0));async function Si(te){ci.value=te,await initApi()}async function Ci(te=`none`){try{if(te!==`none`){let oe=(await useApi().get(`/${te}/metadata`,{params:{language:getUserLanguage()}})).data;Ee.value=oe,oe.success===void 0?ui.value=!1:ui.value=!oe.success}}catch{xe({message:i18n.t(`alert.error.couldntFetchMetadata`),type:`warning`})}}async function wi(){await useApi().get(`/utility/get-settings-and-translations`).then(xe=>{let{settings:Ee,hotelSettings:De,translations:ke}=xe.data;Ee&&(Se.value=Ee,Te.value=De,isNaN(te.adults)&&(te.adults=Ee.defaultAdultAmount),isNaN(te.children)&&(te.children=Ee.defaultChildAmount),te.arrivalDate===null&&(te.arrivalDate=bi()),te.departureDate===null&&(te.departureDate=xi()),setupI18n(ke),Se.value.enableTracking&&oe.setup())}).catch(()=>{xe({message:i18n.t(`alert.error.couldntFetchMetadata`),type:`warning`})})}function Ti(te){si.value=te}function Ei(){si.value=null}return{activeIdFilter:si,autoSelectRateId:ei,bearerToken:di,bookingDisabled:li,currency:pi,currencyId:mi,defaultAdultAmount:Ge,defaultArrivalTime:Ie,defaultChildAmount:st,defaultDepartureTime:ze,disableCompanyField:Xr,disableDiscountVoucher:Ur,disableGiftCardVoucher:Hr,disableNamePrefix:Vr,disableNewsletterSignup:qr,disablePricesFrom:Wr,disableCalendarPricesAvailability:Gr,disableTravelingFor:Jr,disableTravelingForBleasure:Yr,earliestArrivalTime:Fe,earliestDepartureTime:Re,enableMultipleConfigurations:ii,enableStickyHeader:Br,enableTracking:He,firstSelectableDateOffset:Ir,googleApiKey:Ue,hasActiveIdFilter:vi,hasArrivalDepartureInputs:ke,hasChildSelection:De,hasError:ui,hasMemberCards:Ne,hasMetadata:fi,hasPaymentGateway:yi,hasRoomAmountSelection:Me,hasSharedAddonSelection:Pe,hasUserArrivalSelection:Ae,hasUserDepartureSelection:je,headerHeight:zr,hideAvailabilityNotice:$r,hideAvailableRoomAmount:Kr,hideEventEndTime:Qr,hideEventGuestAmount:ni,hideEventLength:Zr,hideOptionalLabel:ri,hideTitle:Rr,hotelSettings:Te,isRecaptchaEnabled:_i,lastSelectableDateOffset:Lr,latestArrivalTime:Le,latestDepartureTime:Be,maxAdultAmount:Pr,maxChildAmount:Fr,maximumNightsAvailable:Ve,metaData:Ee,name:hi,paymentGatewayId:gi,recaptchaSiteKey:We,requireEmailConfirmation:oi,selectGiftCardAsDefault:ai,settings:Se,splitBookingCalendar:ti,clearActiveIdFilter:Ei,defaultArrivalDate:bi,defaultDepartureDate:xi,fetchMetadata:Ci,fetchUtilities:wi,setAccessToken:Si,setActiveIdFilter:Ti}}),token=ref(``),params=useUrlSearchParams(`history`,{removeNullishValues:!0});async function initApi(){return token.value=useUtilityStore().bearerToken,Promise.resolve()}function useApi(){let te=window.KONNECTIO_API_URL_OVERRIDE??`https://production.hotel-service.konnectio.com`,oe=axios.create({baseURL:`${te}/api`,timeout:15e3,headers:{Accept:`application/json`,"Konnectio-Version":`4.11.5`,"Konnectio-Ref":params.ref}});if(oe.interceptors.request.use(te=>(te.method!==`get`&&(te.timeout=Math.max(te.timeout??0,3e4)),te.headers.Authorization=token.value,te.headers[`Accept-Language`]=document.documentElement.lang.slice(0,2)||`en`,te)),window.KONNECTIO_SIMULATE_OUTAGE){let te=window.KONNECTIO_SIMULATE_OUTAGE;oe.interceptors.request.use(oe=>{let xe=oe.url??``;if(xe.includes(`/metadata`)||xe.startsWith(`/utility/`))return oe;if(te===`hang`)return new Promise((te,xe)=>{setTimeout(()=>xe(new axios.AxiosError(`timeout of ${oe.timeout}ms exceeded`,`ECONNABORTED`,oe)),oe.timeout??15e3)});throw new axios.AxiosError(`Request failed with status code 502`,axios.AxiosError.ERR_BAD_RESPONSE,oe,void 0,{status:502,statusText:`Bad Gateway`,headers:{},config:oe,data:{msg:`External booking provider is temporarily unavailable. Please try again later.`}})})}return oe.interceptors.response.use(void 0,te=>{let xe=te?.config,Se=te?.response?.status;Se===454&&(useUtilityStore().bookingDisabled=!0);let Te=!te.response||Se===502||Se===504;if(xe?.method===`get`&&Te&&te.code!==`ECONNABORTED`&&(xe.__retryCount??0)<1)return xe.__retryCount=(xe.__retryCount??0)+1,new Promise(te=>setTimeout(te,1e3*2**xe.__retryCount)).then(()=>oe.request(xe));if(Se===429&&xe&&(xe.__retryCount??0)<2){xe.__retryCount=(xe.__retryCount??0)+1;let Se=te.response.headers?.[`retry-after`],Te=Se&&/^\d+$/.test(Se)?Math.min(Number(Se)*1e3,5e3):Math.min(1e3*2**xe.__retryCount,5e3);return new Promise(te=>setTimeout(te,Te)).then(()=>oe.request(xe))}return Promise.reject(te)}),oe}var useEventStore=defineStore(`event`,()=>{let te=usePaymentStore(),{voucher:oe}=storeToRefs(useApplyGiftCardStore()),{display:xe}=useAlertStore(),{metaData:Se}=storeToRefs(useUtilityStore()),Te=useUtilityStore(),Ee=useAvailabilityStore(),De=ref({}),ke=computed$2(()=>Object.keys(De.value).length>0),Ae=ref(!1),je=ref(void 0),Me=ref(!0),Ne=ref(EventModuleState.InitialState),Pe=ref(NaN),Fe=ref(1),Ie=ref(NaN),Le=ref(NaN),Re=ref(``),ze=useStorage(`konnectio_name`,``,void 0,{serializer:StorageSerializers.string}),Be=useStorage(`konnectio_phone`,``,void 0,{serializer:StorageSerializers.string}),Ve=useStorage(`konnectio_email`,``,void 0,{serializer:StorageSerializers.string}),He=ref(``),Ue=ref(``),We=ref(!1),Ge=ref(0),st=ref({}),Pr=ref({}),Fr=ref(``),Ir=ref(``),Lr=ref(``);function Rr(te){return te?te.templateId!==void 0:!1}let zr=computed$2(()=>Te.metaData.hotels?.findIndex(te=>te.id===Ee.eventLocation)||0),Br=computed$2(()=>Te.metaData.hotels?.[zr.value]),Vr=computed$2(()=>Br.value?Br.value.maxNumberPerBooking:1/0),Hr=computed$2(()=>Br.value?.name?Br.value.name:``),Ur=computed$2(()=>Br.value?.subtitle?Br.value.subtitle:``),Wr=computed$2(()=>Br.value?.timezone?Br.value.timezone:``),Gr=ref(Ee.eventDate??new Date),Kr=ref(Ee.eventLocation),qr=computed$2(()=>Gr.value!==Ee.eventDate),Jr=computed$2(()=>Kr.value!==Ee.eventLocation),Yr=computed$2(()=>qr.value||Jr.value),Xr=computed$2(()=>(Ee.eventDate??new Date).toISOString()),Zr=computed$2(()=>Rr(je.value)),Qr=computed$2(()=>Rr(je.value)?je.value.numberOfDays:Fe.value),$r=computed$2(()=>Rr(je.value)?je.value.packageCount:0),ei=computed$2(()=>Rr(je.value)?je.value.fromDate:``),ti=computed$2(()=>De.value.events===void 0?void 0:De.value.events.flatMap(te=>te.events??[]).find(te=>te.id===Ie.value)),ni=computed$2(()=>ti.value?ti.value.length:void 0),ri=computed$2(()=>Rr(je.value)?je.value.templateId:0),ii=computed$2(()=>De.value.events.map(te=>({...te,events:te.events?.filter(te=>te.isAvailable===!0||te.isAvailable===!1&&formatDate(te.fromDate)===formatDate(Gr.value))})).filter(te=>te.events&&te.events.length>0)),ai=computed$2(()=>De.value.events.map(te=>({...te,events:te.events?.filter(te=>te.isAvailable===!1&&formatDate(te.fromDate)!==formatDate(Gr.value)).sort((te,oe)=>te.fromDate>oe.fromDate?1:-1)})).filter(te=>te.events&&te.events.length>0)),oi=computed$2(()=>De.value.templates);function si(te=`asc`){return[...ii.value].sort((oe,xe)=>te===`asc`?oe.id-xe.id:xe.id-oe.id)}let ci=computed$2(()=>De.value.fallbackEvents),li=computed$2(()=>De.value.events.length>0),ui=computed$2(()=>De.value.fallbackEvents.length>0),di=computed$2(()=>De.value.templates.length>0),fi=computed$2(()=>ti.value&&ti.value.eventRateType?ti.value.eventRateType:OctopusEventRateType.None),pi=computed$2(()=>{if(!Rr(je.value))return je.value}),mi=computed$2(()=>{if(pi.value!==void 0){let te=pi.value.find(te=>te.time===Re.value);if(te&&te.price)return te.price}return 0}),hi=computed$2(()=>{if(Rr(je.value))return je.value.rooms});function gi(te,oe,xe){let Se=0;if(Rr(je.value)){let Te=je.value.rooms[xe];if(Te){let Ee=Te.addons,De=st.value[`${oe}.${te}.${xe}`]||0;if(De>0){let oe=Ee?.find(oe=>oe.id===te),xe=typeof De==`boolean`?1:De;Se+=getQuantityStrategyPrice(oe?.price,oe?.quantityStrategy,Qr.value,Te.adultPerRoom)*xe}}}else{let oe=Pr.value[te]||0;if(oe>0){let xe=ti.value?.products?.find(oe=>oe.id===te);xe&&(Se+=xe.price*oe)}}return Se}function _i(te,oe){let xe=0;if(Rr(je.value))for(let Se in st.value){let Te=Se.split(`.`);parseInt(Te[0])===te&&parseInt(Te[2])===oe&&(xe+=gi(parseInt(Te[1]),te,oe))}else for(let te in Pr.value)xe+=gi(parseInt(te))*Fe.value;return xe}let vi=computed$2(()=>Rr(je.value)&&je.value.totalPrice||0),yi=computed$2(()=>{if(Ri.value)return Ri.value;let te=NaN;return Rr(je.value)?je.value.rooms!==void 0&&(te=je.value.rooms.flatMap(te=>te.roomGroupId).reduce((te,oe,xe)=>te+_i(oe,xe),vi.value)||0):(te=_i(),te+=mi.value),te}),bi=computed$2(()=>Rr(je.value)&&je.value.rooms!==void 0&&je.value.rooms.flatMap(te=>te.weekendFee).reduce((te,oe)=>te+oe,0)||0),xi=computed$2(()=>Rr(je.value)&&je.value.rooms!==void 0&&je.value.rooms.flatMap(te=>te.roomUpgrade).reduce((te,oe)=>te+oe,0)||0),Si=computed$2(()=>{let te=Pr.value,oe=0;for(let xe in te)oe+=Number.isNaN(te[xe])?0:te[xe];return oe}),Ci=computed$2(()=>Si.value>0),wi=computed$2(()=>!Rr(je.value)&&ti.value?ti.value.products.length>0:!1),Ti=computed$2(()=>!wi.value||Ci.value),Ei=computed$2(()=>fi.value!==OctopusEventRateType.FullDayEvent&&!Zr.value),Di=computed$2(()=>!!(ze.value!==``&&Ve.value!==``&&Be.value.length>=5&&Ti.value&&(!Ei.value||Re.value!==``)));function Oi(te){return Ne.value===EventModuleState.ReservationState&&Ie.value===te&&Me.value}let ki=computed$2(()=>!(Ne.value===EventModuleState.InitialState&&Me.value)),Ai=computed$2(()=>!(Ne.value===EventModuleState.AvailabilityState&&Me.value)),ji=computed$2(()=>je.value!==void 0),Mi=computed$2(()=>Ne.value===EventModuleState.PaymentState&&Me.value);async function Ni(){try{let te=(await useApi().get(`/event/metadata`,{params:{language:getUserLanguage()}})).data;Se.value=te}catch{xe({message:i18n.t(`alert.error.couldntFetchMetadata`),type:`warning`})}}async function Pi(){if(Ne.value=EventModuleState.AvailabilityState,Me.value=!0,Ae.value=!1,TZDate.tz(Wr.value,new Date(Ee.eventDate)).setHours(12,0,0,0)<TZDate.tz(Wr.value).setHours(12,0,0,0)&&(Ee.eventDate=TZDate.tz(Wr.value)),isNaN(Ee.eventLocation))Me.value=!1,xe({message:i18n.t(`alert.error.selectEventId`),type:`warning`});else try{let te=(await useApi().get(`/event/v3/get`,{params:{language:getUserLanguage(),date:formatDate(Ee.eventDate),restaurantId:Ee.eventLocation,eventId:Te.hasActiveIdFilter?Te.activeIdFilter:null,excludeEventId:!Te.hasActiveIdFilter&&Lr.value?Lr.value:null}})).data;De.value=te,Gr.value=Ee.eventDate,Kr.value=Ee.eventLocation,useEventBus(ScrollToTop).emit(),Me.value=!1}catch{Me.value=!1,Ae.value=!0,xe({message:i18n.t(`alert.error.couldntFetchListings`),type:`warning`})}}async function Fi(te){Ne.value=EventModuleState.ReservationState,Me.value=!0;try{let oe=(await useApi().get(`/event/get-template`,{params:{language:getUserLanguage(),date:formatDate(Gr.value),templateId:Ie.value,restaurantId:Kr.value,numberOfPeople:isNaN(Pe.value)?0:Pe.value}})).data;oe.rooms.length===0?xe({message:i18n.t(`alert.error.eventNotAvailable`),type:`warning`}):(je.value=oe,oe.rooms.forEach((te,oe)=>{te.addons.forEach(xe=>{(xe.cardinality===OctopusCardinality.DefaultSingle||xe.cardinality===OctopusCardinality.DefaultMultiple)&&(st.value[`${te.roomGroupId}.${xe.id}.${oe}`]=1)})}),te()),Me.value=!1}catch{Me.value=!1,Ne.value=EventModuleState.AvailabilityState,xe({message:i18n.t(`alert.error.couldntFetchEvent`),type:`warning`})}}async function Ii(te){Ne.value=EventModuleState.ReservationState,Me.value=!0;try{let oe=(await useApi().get(`/event/vacant-times`,{params:{language:getUserLanguage(),date:formatDate(Gr.value),numberOfPeople:isNaN(Pe.value)?1:Pe.value,eventId:Ie.value,tableGroupId:Le.value,restaurantId:Kr.value}})).data;je.value=oe,Me.value=!1,wi.value?te():te(2)}catch{Me.value=!1,Ne.value=EventModuleState.AvailabilityState,xe({message:i18n.t(`alert.error.couldntFetchEvent`),type:`warning`})}}function Li(){let te=[];for(let oe in Pr.value){let xe=Pr.value[parseInt(oe)];xe>0&&te.push({id:parseInt(oe),quantity:xe})}return te}let Ri=ref();async function zi(){if(Fr.value!==``)try{let te=(await useApi().post(`/event/validate-discount-code`,{language:getUserLanguage(),date:formatDate(Gr.value),onlineDiscountCode:Fr.value,products:Li(),restaurantId:Kr.value})).data;te.total?(Ri.value=te.total,Ir.value=Fr.value,Fr.value=``,xe({message:i18n.t(`alert.success.discountCodeApplied`),type:`success`})):xe({message:i18n.t(`alert.error.discountCodeValidation`),type:`warning`})}catch{xe({message:i18n.t(`alert.error.discountCodeValidation`),type:`warning`})}else xe({message:i18n.t(`alert.error.discountCodeEmpty`),type:`error`})}function Bi(){let te,xe,Se,Te=[];Rr(je.value)?(hi.value?.forEach((te,oe)=>{let xe=[],Se=0;for(let Te in st.value){let Ee=Te.split(`.`),De=st.value[Te];parseInt(Ee[0])===te.roomGroupId&&parseInt(Ee[2])===oe&&De>0&&(xe.push({id:Se,addonID:parseInt(Ee[1]),quantity:De}),Se++)}Te.push({adultPerRoom:te.adultPerRoom,count:te.count,roomGroupID:te.roomGroupId,addons:xe})}),te={totalPerson:isNaN(Pe.value)?Si.value:Pe.value,templateID:ri.value,numberOfDays:Fe.value,templateCounts:Te,fromDate:formatDate(Gr.value)}):(xe=Li(),Se=Re.value);let Ee={language:getUserLanguage(),restaurantId:Kr.value,date:formatDate(Gr.value),name:ze.value,email:Ve.value,phone:Be.value,remark:He.value,numberOfPeople:isNaN(Pe.value)?Si.value:Pe.value,days:Qr.value>0?Qr.value:1,allergyFood:Ue.value,discountCode:Ir.value,giftCardCode:oe.value,numberOfHighChairs:Ge.value,flagOnTable:We.value,checkoutUrl:window.location.origin,privacyUrl:window.location.origin},De=`/event/book-template`;return Rr(je.value)?Ee.templateGroup=te:(Ee.time=Se,Ee.eventId=Ie.value,Ee.products=xe,De=`/event/book-event`),{url:De,data:Ee}}async function Vi(oe){Ne.value=EventModuleState.PaymentState,Me.value=!0;let Se=()=>{Me.value=!1,Ne.value=EventModuleState.ReservationState,xe({message:i18n.t(`booking.other.errorMessage`),type:`warning`})},{url:Te,data:Ee}=Bi();return await useApi().post(Te,Ee).then(xe=>{Me.value=!1,te.pay({callback:oe,response:xe.data,enableHostedRedirect:!0})}).catch(te=>{let{status:oe}=te.response??{};if(oe===422)return Me.value=!1,Ne.value=EventModuleState.ReservationState,te.response.data.errors;Se()})}function Hi(){Ri.value=void 0,Fr.value=``,Ir.value=``}function Ui(te=!1){je.value=void 0,st.value={},Pr.value={},Re.value=``,Hi(),te&&Ee.resetEventDate()}function Wi(te){Zr.value||wi.value?te():te(2),Hi()}async function Gi(){await Promise.all([Ni(),Ee.fetchMetadata()])}return{flagOnTable:We,allergies:Ue,isSearchOutdated:Yr,currentEventDate:Gr,currentEventLocation:Kr,metaData:Se,listingData:De,listingsFetchFailed:Ae,tableBasePrice:mi,availabilityData:je,isLoading:Me,moduleState:Ne,numberOfPeople:Pe,numberOfDays:Fe,eventId:Ie,tableGroupId:Le,arrivalTime:Re,addons:st,products:Pr,discountCode:Fr,name:ze,phone:Be,email:Ve,remark:He,isTemplateEvent:Zr,maxNumberOfPeople:Vr,title:Hr,subtitle:Ur,date:Xr,numberOfTotalDays:Qr,numberOfRooms:$r,fromDate:ei,getEventData:ti,length:ni,templateId:ri,getEvents:ii,getTemplates:oi,hasEvents:li,hasFallbackEvents:ui,hasTemplates:di,basePrice:vi,totalPrice:yi,getTemplateData:hi,getEventTableData:pi,roomUpgrade:xi,weekendFee:bi,hasProducts:wi,eventRateType:fi,isReservationFormFilled:Di,isMetadataAvailable:ki,areListingsAvailable:Ai,isAvailabilityDataAvailable:ji,isPaymentLoading:Mi,isEventListingLoading:Oi,fetchMetadata:Ni,fetchListings:Pi,getTemplateAvailability:Fi,getEventAvailability:Ii,validateDiscountCode:zi,localAddonPrice:gi,totalAddonPrice:_i,bookingPayload:Bi,createBooking:Vi,reset:Ui,initialize:Gi,goBack:Wi,getFallbackEvents:ci,hasListingData:ke,hasSelectedProducts:Ci,totalSelectedProducts:Si,requiresArrivalTime:Ei,hasSelectedRequiredProducts:Ti,getUnavailableEvents:ai,timezone:Wr,numberOfHighChairs:Ge,discountValue:Ri,appliedDiscountCode:Ir,excludeEventIds:Lr,getSortedEvents:si}}),defaultEventDate=()=>new Date,defaultExpirationDate=()=>new Date(new Date().getTime()+432e5),defaultArrival=()=>new Date(new Date().setHours(12,0,0,0)),defaultDeparture=()=>new Date(new Date(new Date().setDate(new Date().getDate()+1)).setHours(12,0,0,0)),useAvailabilityStore=defineStore(`availability`,()=>{let te=useEventStore(),oe=useHotelStore(),xe=useUtilityStore(),{display:Se}=useAlertStore(),Te=ref({}),Ee=useStorage(`k_avail_expiry`,defaultExpirationDate(),void 0,{serializer:StorageSerializers.date}),De=computed$2(()=>Ee.value!==void 0&&Ee.value<new Date),ke=useStorage(`k_hotel_adults`,NaN,void 0,{serializer:StorageSerializers.number}),Ae=useStorage(`k_hotel_children`,NaN,void 0,{serializer:StorageSerializers.number}),je=useStorage(`k_hotel_room_count`,1,void 0,{serializer:StorageSerializers.number}),Me=useStorage(`k_hotel_arrival`,defaultArrival(),void 0,{serializer:StorageSerializers.date}),Ne=useStorage(`k_hotel_departure`,defaultDeparture(),void 0,{serializer:StorageSerializers.date}),Pe=useStorage(`k_hotel_loc`,void 0,void 0,{serializer:StorageSerializers.number}),Fe=useStorage(`k_hotel_loc_c`,NaN,void 0,{serializer:StorageSerializers.number}),Ie=useStorage(`k_hotel_has_selected_loc`,!1,void 0,{serializer:StorageSerializers.boolean}),Le=computed$2(()=>Object.keys(Te.value).length>0),Re=computed$2(()=>(Te.value.hotels?.length??0)>1),ze=computed$2(()=>Te.value.hotels??[]),Be=computed$2(()=>daysBetweenDates(Me.value,Ne.value));function Ve(te){if(Le.value)return Te.value.hotels.some(oe=>oe.id===te)}let He=useStorage(`k_event_loc`,NaN,void 0,{serializer:StorageSerializers.number}),Ue=useStorage(`k_event_loc_c`,NaN,void 0,{serializer:StorageSerializers.number}),We=ref(defaultEventDate()),Ge=computed$2(()=>!!Te.value&&Te.value.events&&Te.value.events.length>1),st=computed$2(()=>Te.value.events??[]);function Pr(te){if(Le.value)return Te.value.events.some(oe=>oe.id===te)}function Fr(te){let oe=ze.value.find(({id:oe})=>oe===te);return oe?oe.name:``}function Ir(){Ee.value=defaultExpirationDate()}function Lr(oe){We.value=oe,te.fetchListings()}function Rr(te,xe){Me.value=te,xe&&(Ne.value=xe),useEventBus(ForcedDateChange).emit(),oe.fetchAvailabilityData()}function zr({adults:te,children:oe,arrivalDate:xe,departureDate:Se,location:Te=NaN}){Ir(),ke.value=te,Ae.value=oe,Me.value=xe,Ne.value=Se,Pe.value=Te}function Br({date:te,location:oe}){We.value=te,He.value=oe}function Vr(){We.value=defaultEventDate()}function Hr(){Me.value=xe.defaultArrivalDate(),Ne.value=xe.defaultDepartureDate()}function Ur(){ke.value=xe.defaultAdultAmount,Ae.value=xe.defaultChildAmount,Me.value=xe.defaultArrivalDate(),Vr(),Ne.value=xe.defaultDepartureDate(),Pe.value=void 0,He.value=NaN,Ie.value=!1,Ir()}async function Wr(){try{let te=(await useApi().get(`/availability/metadata`,{params:{language:getUserLanguage()}})).data;Te.value=te,De.value&&Ur(),te.defaultHotelId&&(isNaN(Fe.value)?Fe.value=te.defaultHotelId:Fe.value!==te.defaultHotelId&&(Fe.value=te.defaultHotelId,Pe.value=Fe.value),(Pe.value===void 0||isNaN(Pe.value))&&(Pe.value=te.defaultHotelId)),te.defaultEventId&&(isNaN(Ue.value)?Ue.value=te.defaultEventId:Ue.value!==te.defaultEventId&&(Ue.value=te.defaultEventId,He.value=Ue.value),isNaN(He.value)&&(He.value=te.defaultEventId))}catch{Se({message:i18n.t(`alert.error.couldntFetchMetadata`),type:`warning`})}}return{expiryDate:Ee,adults:ke,children:Ae,roomCount:je,arrivalDate:Me,departureDate:Ne,location:Pe,isExpired:De,nights:Be,eventLocation:He,eventDate:We,metadata:Te,hasHotelLocations:Re,hasEventLocations:Ge,hotelLocations:ze,eventLocations:st,eventLocationControl:Ue,controlLocation:Fe,hasSelectedLocation:Ie,setNewExpiryDate:Ir,reset:Ur,resetSearchDates:Hr,updateDates:Rr,updateHotelAvailability:zr,updateEventAvailability:Br,fetchMetadata:Wr,isValidHotelId:Ve,isValidRestaurantId:Pr,getHotelLocationName:Fr,resetEventDate:Vr,updateEventDate:Lr}});function _arrayLikeToArray$1(te,oe){(oe==null||oe>te.length)&&(oe=te.length);for(var xe=0,Se=Array(oe);xe<oe;xe++)Se[xe]=te[xe];return Se}function _arrayWithHoles(te){if(Array.isArray(te))return te}function _arrayWithoutHoles$1(te){if(Array.isArray(te))return _arrayLikeToArray$1(te)}function _classCallCheck(te,oe){if(!(te instanceof oe))throw TypeError(`Cannot call a class as a function`)}function _defineProperties(te,oe){for(var xe=0;xe<oe.length;xe++){var Se=oe[xe];Se.enumerable=Se.enumerable||!1,Se.configurable=!0,`value`in Se&&(Se.writable=!0),Object.defineProperty(te,_toPropertyKey$1(Se.key),Se)}}function _createClass(te,oe,xe){return oe&&_defineProperties(te.prototype,oe),xe&&_defineProperties(te,xe),Object.defineProperty(te,"prototype",{writable:!1}),te}function _createForOfIteratorHelper(te,oe){var xe=typeof Symbol<`u`&&te[Symbol.iterator]||te[`@@iterator`];if(!xe){if(Array.isArray(te)||(xe=_unsupportedIterableToArray$1(te))||oe&&te&&typeof te.length==`number`){xe&&(te=xe);var Se=0,Te=function(){};return{s:Te,n:function(){return Se>=te.length?{done:!0}:{done:!1,value:te[Se++]}},e:function(te){throw te},f:Te}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
34
34
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ee,De=!0,ke=!1;return{s:function(){xe=xe.call(te)},n:function(){var te=xe.next();return De=te.done,te},e:function(te){ke=!0,Ee=te},f:function(){try{De||xe.return==null||xe.return()}finally{if(ke)throw Ee}}}}function _defineProperty$1(te,oe,xe){return(oe=_toPropertyKey$1(oe))in te?Object.defineProperty(te,oe,{value:xe,enumerable:!0,configurable:!0,writable:!0}):te[oe]=xe,te}function _iterableToArray$1(te){if(typeof Symbol<`u`&&te[Symbol.iterator]!=null||te[`@@iterator`]!=null)return Array.from(te)}function _iterableToArrayLimit(te,oe){var xe=te==null?null:typeof Symbol<`u`&&te[Symbol.iterator]||te[`@@iterator`];if(xe!=null){var Se,Te,Ee,De,ke=[],Ae=!0,je=!1;try{if(Ee=(xe=xe.call(te)).next,oe===0){if(Object(xe)!==xe)return;Ae=!1}else for(;!(Ae=(Se=Ee.call(xe)).done)&&(ke.push(Se.value),ke.length!==oe);Ae=!0);}catch(te){je=!0,Te=te}finally{try{if(!Ae&&xe.return!=null&&(De=xe.return(),Object(De)!==De))return}finally{if(je)throw Te}}return ke}}function _nonIterableRest(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
35
35
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _nonIterableSpread$1(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
36
36
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ownKeys$1(te,oe){var xe=Object.keys(te);if(Object.getOwnPropertySymbols){var Se=Object.getOwnPropertySymbols(te);oe&&(Se=Se.filter(function(oe){return Object.getOwnPropertyDescriptor(te,oe).enumerable})),xe.push.apply(xe,Se)}return xe}function _objectSpread2$1(te){for(var oe=1;oe<arguments.length;oe++){var xe=arguments[oe]==null?{}:arguments[oe];oe%2?ownKeys$1(Object(xe),!0).forEach(function(oe){_defineProperty$1(te,oe,xe[oe])}):Object.getOwnPropertyDescriptors?Object.defineProperties(te,Object.getOwnPropertyDescriptors(xe)):ownKeys$1(Object(xe)).forEach(function(oe){Object.defineProperty(te,oe,Object.getOwnPropertyDescriptor(xe,oe))})}return te}function _slicedToArray(te,oe){return _arrayWithHoles(te)||_iterableToArrayLimit(te,oe)||_unsupportedIterableToArray$1(te,oe)||_nonIterableRest()}function _toConsumableArray$2(te){return _arrayWithoutHoles$1(te)||_iterableToArray$1(te)||_unsupportedIterableToArray$1(te)||_nonIterableSpread$1()}function _toPrimitive$1(te,oe){if(typeof te!=`object`||!te)return te;var xe=te[Symbol.toPrimitive];if(xe!==void 0){var Se=xe.call(te,oe||`default`);if(typeof Se!=`object`)return Se;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(oe===`string`?String:Number)(te)}function _toPropertyKey$1(te){var oe=_toPrimitive$1(te,`string`);return typeof oe==`symbol`?oe:oe+``}function _typeof$1(te){"@babel/helpers - typeof";return _typeof$1=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(te){return typeof te}:function(te){return te&&typeof Symbol==`function`&&te.constructor===Symbol&&te!==Symbol.prototype?`symbol`:typeof te},_typeof$1(te)}function _unsupportedIterableToArray$1(te,oe){if(te){if(typeof te==`string`)return _arrayLikeToArray$1(te,oe);var xe={}.toString.call(te).slice(8,-1);return xe===`Object`&&te.constructor&&(xe=te.constructor.name),xe===`Map`||xe===`Set`?Array.from(te):xe===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(xe)?_arrayLikeToArray$1(te,oe):void 0}}var noop$3=function(){},_WINDOW={},_DOCUMENT={},_MUTATION_OBSERVER=null,_PERFORMANCE={mark:noop$3,measure:noop$3};try{typeof window<`u`&&(_WINDOW=window),typeof document<`u`&&(_DOCUMENT=document),typeof MutationObserver<`u`&&(_MUTATION_OBSERVER=MutationObserver),typeof performance<`u`&&(_PERFORMANCE=performance)}catch{}var _ref$userAgent=(_WINDOW.navigator||{}).userAgent,userAgent=_ref$userAgent===void 0?``:_ref$userAgent,WINDOW=_WINDOW,DOCUMENT=_DOCUMENT,MUTATION_OBSERVER=_MUTATION_OBSERVER,PERFORMANCE=_PERFORMANCE;WINDOW.document;var IS_DOM=!!DOCUMENT.documentElement&&!!DOCUMENT.head&&typeof DOCUMENT.addEventListener==`function`&&typeof DOCUMENT.createElement==`function`,IS_IE$1=~userAgent.indexOf(`MSIE`)||~userAgent.indexOf(`Trident/`),_cl,Z$1=/fa(k|kd|s|r|l|t|d|dr|dl|dt|b|slr|slpr|wsb|tl|ns|nds|es|gt|jr|jfr|jdr|usb|ufsb|udsb|cr|ss|sr|sl|st|sds|sdr|sdl|sdt|sldr|slpdr|pr|ms|vs)?[\-\ ]/,$$2=/Font ?Awesome ?([567 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit|Notdog Duo|Notdog|Chisel|Etch|Graphite|Thumbprint|Jelly Fill|Jelly Duo|Jelly|Utility|Utility Fill|Utility Duo|Slab Press|Slab|Slab Duo|Slab Press Duo|Pixel|Mosaic|Vellum|Whiteboard)?.*/i,rl={classic:{fa:`solid`,fas:`solid`,"fa-solid":`solid`,far:`regular`,"fa-regular":`regular`,fal:`light`,"fa-light":`light`,fat:`thin`,"fa-thin":`thin`,fab:`brands`,"fa-brands":`brands`},duotone:{fa:`solid`,fad:`solid`,"fa-solid":`solid`,"fa-duotone":`solid`,fadr:`regular`,"fa-regular":`regular`,fadl:`light`,"fa-light":`light`,fadt:`thin`,"fa-thin":`thin`},sharp:{fa:`solid`,fass:`solid`,"fa-solid":`solid`,fasr:`regular`,"fa-regular":`regular`,fasl:`light`,"fa-light":`light`,fast:`thin`,"fa-thin":`thin`},"sharp-duotone":{fa:`solid`,fasds:`solid`,"fa-solid":`solid`,fasdr:`regular`,"fa-regular":`regular`,fasdl:`light`,"fa-light":`light`,fasdt:`thin`,"fa-thin":`thin`},slab:{"fa-regular":`regular`,faslr:`regular`},"slab-press":{"fa-regular":`regular`,faslpr:`regular`},"slab-duo":{"fa-regular":`regular`,fasldr:`regular`},"slab-press-duo":{"fa-regular":`regular`,faslpdr:`regular`},thumbprint:{"fa-light":`light`,fatl:`light`},vellum:{"fa-solid":`solid`,favs:`solid`},pixel:{"fa-regular":`regular`,fapr:`regular`},mosaic:{"fa-solid":`solid`,fams:`solid`},whiteboard:{"fa-semibold":`semibold`,fawsb:`semibold`},notdog:{"fa-solid":`solid`,fans:`solid`},"notdog-duo":{"fa-solid":`solid`,fands:`solid`},etch:{"fa-solid":`solid`,faes:`solid`},graphite:{"fa-thin":`thin`,fagt:`thin`},jelly:{"fa-regular":`regular`,fajr:`regular`},"jelly-fill":{"fa-regular":`regular`,fajfr:`regular`},"jelly-duo":{"fa-regular":`regular`,fajdr:`regular`},chisel:{"fa-regular":`regular`,facr:`regular`},utility:{"fa-semibold":`semibold`,fausb:`semibold`},"utility-duo":{"fa-semibold":`semibold`,faudsb:`semibold`},"utility-fill":{"fa-semibold":`semibold`,faufsb:`semibold`}},il={GROUP:`duotone-group`,SWAP_OPACITY:`swap-opacity`,PRIMARY:`primary`,SECONDARY:`secondary`},dl=[`fa-classic`,`fa-duotone`,`fa-sharp`,`fa-sharp-duotone`,`fa-thumbprint`,`fa-whiteboard`,`fa-notdog`,`fa-notdog-duo`,`fa-chisel`,`fa-etch`,`fa-graphite`,`fa-jelly`,`fa-jelly-fill`,`fa-jelly-duo`,`fa-slab`,`fa-slab-press`,`fa-slab-press-duo`,`fa-slab-duo`,`fa-mosaic`,`fa-pixel`,`fa-vellum`,`fa-utility`,`fa-utility-duo`,`fa-utility-fill`],u=`classic`,l=`duotone`,h=`sharp`,t=`sharp-duotone`,g=`chisel`,n=`etch`,m$1=`graphite`,p=`jelly`,s=`jelly-duo`,y=`jelly-fill`,w=`mosaic`,x$1=`notdog`,e=`notdog-duo`,b=`pixel`,c$1=`slab`,o$1=`slab-duo`,I$1=`slab-press`,a$1=`slab-press-duo`,r=`thumbprint`,v=`utility`,i=`utility-duo`,F=`utility-fill`,d=`vellum`,S$1=`whiteboard`,A=`Classic`,P=`Duotone`,j=`Sharp`,B=`Sharp Duotone`,N$1=`Chisel`,D=`Etch`,k=`Graphite`,T$1=`Jelly`,C$1=`Jelly Duo`,W$1=`Jelly Fill`,R=`Mosaic`,K=`Notdog`,L=`Notdog Duo`,U$1=`Pixel`,J$1=`Slab`,_=`Slab Duo`,M$1=`Slab Press`,E$1=`Slab Press Duo`,G$1=`Thumbprint`,V$1=`Utility`,z=`Utility Duo`,O=`Utility Fill`,Y=`Vellum`,q$1=`Whiteboard`,xl=[u,l,h,t,g,n,m$1,p,s,y,w,x$1,e,b,c$1,o$1,I$1,a$1,r,v,i,F,d,S$1];_cl={},_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_cl,u,A),l,P),h,j),t,B),g,N$1),n,D),m$1,k),p,T$1),s,C$1),y,W$1),_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_cl,w,R),x$1,K),e,L),b,U$1),c$1,J$1),o$1,_),I$1,M$1),a$1,E$1),r,G$1),v,V$1),_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_cl,i,z),F,O),d,Y),S$1,q$1);var Al={classic:{900:`fas`,400:`far`,normal:`far`,300:`fal`,100:`fat`},duotone:{900:`fad`,400:`fadr`,300:`fadl`,100:`fadt`},sharp:{900:`fass`,400:`fasr`,300:`fasl`,100:`fast`},"sharp-duotone":{900:`fasds`,400:`fasdr`,300:`fasdl`,100:`fasdt`},slab:{400:`faslr`},"slab-press":{400:`faslpr`},"slab-duo":{400:`fasldr`},"slab-press-duo":{400:`faslpdr`},vellum:{900:`favs`},mosaic:{900:`fams`},pixel:{400:`fapr`},whiteboard:{600:`fawsb`},thumbprint:{300:`fatl`},notdog:{900:`fans`},"notdog-duo":{900:`fands`},etch:{900:`faes`},graphite:{100:`fagt`},chisel:{400:`facr`},jelly:{400:`fajr`},"jelly-fill":{400:`fajfr`},"jelly-duo":{400:`fajdr`},utility:{600:`fausb`},"utility-duo":{600:`faudsb`},"utility-fill":{600:`faufsb`}},zl={"Font Awesome 7 Free":{900:`fas`,400:`far`},"Font Awesome 7 Pro":{900:`fas`,400:`far`,normal:`far`,300:`fal`,100:`fat`},"Font Awesome 7 Brands":{400:`fab`,normal:`fab`},"Font Awesome 7 Duotone":{900:`fad`,400:`fadr`,normal:`fadr`,300:`fadl`,100:`fadt`},"Font Awesome 7 Sharp":{900:`fass`,400:`fasr`,normal:`fasr`,300:`fasl`,100:`fast`},"Font Awesome 7 Sharp Duotone":{900:`fasds`,400:`fasdr`,normal:`fasdr`,300:`fasdl`,100:`fasdt`},"Font Awesome 7 Jelly":{400:`fajr`,normal:`fajr`},"Font Awesome 7 Jelly Fill":{400:`fajfr`,normal:`fajfr`},"Font Awesome 7 Jelly Duo":{400:`fajdr`,normal:`fajdr`},"Font Awesome 7 Slab":{400:`faslr`,normal:`faslr`},"Font Awesome 7 Slab Press":{400:`faslpr`,normal:`faslpr`},"Font Awesome 7 Slab Duo":{400:`fasldr`,normal:`fasldr`},"Font Awesome 7 Slab Press Duo":{400:`faslpdr`,normal:`faslpdr`},"Font Awesome 7 Pixel":{400:`fapr`,normal:`fapr`},"Font Awesome 7 Mosaic":{900:`fams`,normal:`fams`},"Font Awesome 7 Vellum":{900:`favs`,normal:`favs`},"Font Awesome 7 Thumbprint":{300:`fatl`,normal:`fatl`},"Font Awesome 7 Notdog":{900:`fans`,normal:`fans`},"Font Awesome 7 Notdog Duo":{900:`fands`,normal:`fands`},"Font Awesome 7 Etch":{900:`faes`,normal:`faes`},"Font Awesome 7 Graphite":{100:`fagt`,normal:`fagt`},"Font Awesome 7 Chisel":{400:`facr`,normal:`facr`},"Font Awesome 7 Whiteboard":{600:`fawsb`,normal:`fawsb`},"Font Awesome 7 Utility":{600:`fausb`,normal:`fausb`},"Font Awesome 7 Utility Duo":{600:`faudsb`,normal:`faudsb`},"Font Awesome 7 Utility Fill":{600:`faufsb`,normal:`faufsb`}},Ql=new Map([[`classic`,{defaultShortPrefixId:`fas`,defaultStyleId:`solid`,styleIds:[`solid`,`regular`,`light`,`thin`,`brands`],futureStyleIds:[],defaultFontWeight:900}],[`duotone`,{defaultShortPrefixId:`fad`,defaultStyleId:`solid`,styleIds:[`solid`,`regular`,`light`,`thin`],futureStyleIds:[],defaultFontWeight:900}],[`sharp`,{defaultShortPrefixId:`fass`,defaultStyleId:`solid`,styleIds:[`solid`,`regular`,`light`,`thin`],futureStyleIds:[],defaultFontWeight:900}],[`sharp-duotone`,{defaultShortPrefixId:`fasds`,defaultStyleId:`solid`,styleIds:[`solid`,`regular`,`light`,`thin`],futureStyleIds:[],defaultFontWeight:900}],[`chisel`,{defaultShortPrefixId:`facr`,defaultStyleId:`regular`,styleIds:[`regular`],futureStyleIds:[],defaultFontWeight:400}],[`etch`,{defaultShortPrefixId:`faes`,defaultStyleId:`solid`,styleIds:[`solid`],futureStyleIds:[],defaultFontWeight:900}],[`graphite`,{defaultShortPrefixId:`fagt`,defaultStyleId:`thin`,styleIds:[`thin`],futureStyleIds:[],defaultFontWeight:100}],[`jelly`,{defaultShortPrefixId:`fajr`,defaultStyleId:`regular`,styleIds:[`regular`],futureStyleIds:[],defaultFontWeight:400}],[`jelly-duo`,{defaultShortPrefixId:`fajdr`,defaultStyleId:`regular`,styleIds:[`regular`],futureStyleIds:[],defaultFontWeight:400}],[`jelly-fill`,{defaultShortPrefixId:`fajfr`,defaultStyleId:`regular`,styleIds:[`regular`],futureStyleIds:[],defaultFontWeight:400}],[`mosaic`,{defaultShortPrefixId:`fams`,defaultStyleId:`solid`,styleIds:[`solid`],futureStyleIds:[],defaultFontWeight:900}],[`notdog`,{defaultShortPrefixId:`fans`,defaultStyleId:`solid`,styleIds:[`solid`],futureStyleIds:[],defaultFontWeight:900}],[`notdog-duo`,{defaultShortPrefixId:`fands`,defaultStyleId:`solid`,styleIds:[`solid`],futureStyleIds:[],defaultFontWeight:900}],[`pixel`,{defaultShortPrefixId:`fapr`,defaultStyleId:`regular`,styleIds:[`regular`],futureStyleIds:[],defaultFontWeight:400}],[`slab`,{defaultShortPrefixId:`faslr`,defaultStyleId:`regular`,styleIds:[`regular`],futureStyleIds:[],defaultFontWeight:400}],[`slab-duo`,{defaultShortPrefixId:`fasldr`,defaultStyleId:`regular`,styleIds:[`regular`],futureStyleIds:[],defaultFontWeight:400}],[`slab-press`,{defaultShortPrefixId:`faslpr`,defaultStyleId:`regular`,styleIds:[`regular`],futureStyleIds:[],defaultFontWeight:400}],[`slab-press-duo`,{defaultShortPrefixId:`faslpdr`,defaultStyleId:`regular`,styleIds:[`regular`],futureStyleIds:[],defaultFontWeight:400}],[`thumbprint`,{defaultShortPrefixId:`fatl`,defaultStyleId:`light`,styleIds:[`light`],futureStyleIds:[],defaultFontWeight:300}],[`utility`,{defaultShortPrefixId:`fausb`,defaultStyleId:`semibold`,styleIds:[`semibold`],futureStyleIds:[],defaultFontWeight:600}],[`utility-duo`,{defaultShortPrefixId:`faudsb`,defaultStyleId:`semibold`,styleIds:[`semibold`],futureStyleIds:[],defaultFontWeight:600}],[`utility-fill`,{defaultShortPrefixId:`faufsb`,defaultStyleId:`semibold`,styleIds:[`semibold`],futureStyleIds:[],defaultFontWeight:600}],[`vellum`,{defaultShortPrefixId:`favs`,defaultStyleId:`solid`,styleIds:[`solid`],futureStyleIds:[],defaultFontWeight:900}],[`whiteboard`,{defaultShortPrefixId:`fawsb`,defaultStyleId:`semibold`,styleIds:[`semibold`],futureStyleIds:[],defaultFontWeight:600}]]),$l={chisel:{regular:`facr`},classic:{brands:`fab`,light:`fal`,regular:`far`,solid:`fas`,thin:`fat`},duotone:{light:`fadl`,regular:`fadr`,solid:`fad`,thin:`fadt`},etch:{solid:`faes`},graphite:{thin:`fagt`},jelly:{regular:`fajr`},"jelly-duo":{regular:`fajdr`},"jelly-fill":{regular:`fajfr`},mosaic:{solid:`fams`},notdog:{solid:`fans`},"notdog-duo":{solid:`fands`},pixel:{regular:`fapr`},sharp:{light:`fasl`,regular:`fasr`,solid:`fass`,thin:`fast`},"sharp-duotone":{light:`fasdl`,regular:`fasdr`,solid:`fasds`,thin:`fasdt`},slab:{regular:`faslr`},"slab-duo":{regular:`fasldr`},"slab-press":{regular:`faslpr`},"slab-press-duo":{regular:`faslpdr`},thumbprint:{light:`fatl`},utility:{semibold:`fausb`},"utility-duo":{semibold:`faudsb`},"utility-fill":{semibold:`faufsb`},vellum:{solid:`favs`},whiteboard:{semibold:`fawsb`}},at$1=[`fak`,`fa-kit`,`fakd`,`fa-kit-duotone`],rt$1={kit:{fak:`kit`,"fa-kit":`kit`},"kit-duotone":{fakd:`kit-duotone`,"fa-kit-duotone":`kit-duotone`}},it$1=[`kit`];_defineProperty$1(_defineProperty$1({},`kit`,`Kit`),`kit-duotone`,`Kit Duotone`);var mt$1={kit:{"fa-kit":`fak`},"kit-duotone":{"fa-kit-duotone":`fakd`}},ct$1={"Font Awesome Kit":{400:`fak`,normal:`fak`},"Font Awesome Kit Duotone":{400:`fakd`,normal:`fakd`}},It$1={kit:{fak:`fa-kit`},"kit-duotone":{fakd:`fa-kit-duotone`}},St$1={kit:{kit:`fak`},"kit-duotone":{"kit-duotone":`fakd`}},_jl,l$1={GROUP:`duotone-group`,SWAP_OPACITY:`swap-opacity`,PRIMARY:`primary`,SECONDARY:`secondary`},n$1=[`fa-classic`,`fa-duotone`,`fa-sharp`,`fa-sharp-duotone`,`fa-thumbprint`,`fa-whiteboard`,`fa-notdog`,`fa-notdog-duo`,`fa-chisel`,`fa-etch`,`fa-graphite`,`fa-jelly`,`fa-jelly-fill`,`fa-jelly-duo`,`fa-slab`,`fa-slab-press`,`fa-slab-press-duo`,`fa-slab-duo`,`fa-mosaic`,`fa-pixel`,`fa-vellum`,`fa-utility`,`fa-utility-duo`,`fa-utility-fill`];_jl={},_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_jl,`classic`,`Classic`),`duotone`,`Duotone`),`sharp`,`Sharp`),`sharp-duotone`,`Sharp Duotone`),`chisel`,`Chisel`),`etch`,`Etch`),`graphite`,`Graphite`),`jelly`,`Jelly`),`jelly-duo`,`Jelly Duo`),`jelly-fill`,`Jelly Fill`),_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_jl,`mosaic`,`Mosaic`),`notdog`,`Notdog`),`notdog-duo`,`Notdog Duo`),`pixel`,`Pixel`),`slab`,`Slab`),`slab-duo`,`Slab Duo`),`slab-press`,`Slab Press`),`slab-press-duo`,`Slab Press Duo`),`thumbprint`,`Thumbprint`),`utility`,`Utility`),_defineProperty$1(_defineProperty$1(_defineProperty$1(_defineProperty$1(_jl,`utility-duo`,`Utility Duo`),`utility-fill`,`Utility Fill`),`vellum`,`Vellum`),`whiteboard`,`Whiteboard`),_defineProperty$1(_defineProperty$1({},`kit`,`Kit`),`kit-duotone`,`Kit Duotone`);var ra={classic:{"fa-brands":`fab`,"fa-duotone":`fad`,"fa-light":`fal`,"fa-regular":`far`,"fa-solid":`fas`,"fa-thin":`fat`},duotone:{"fa-regular":`fadr`,"fa-light":`fadl`,"fa-thin":`fadt`},sharp:{"fa-solid":`fass`,"fa-regular":`fasr`,"fa-light":`fasl`,"fa-thin":`fast`},"sharp-duotone":{"fa-solid":`fasds`,"fa-regular":`fasdr`,"fa-light":`fasdl`,"fa-thin":`fasdt`},slab:{"fa-regular":`faslr`},"slab-press":{"fa-regular":`faslpr`},"slab-duo":{"fa-regular":`fasldr`},"slab-press-duo":{"fa-regular":`faslpdr`},pixel:{"fa-regular":`fapr`},mosaic:{"fa-solid":`fams`},vellum:{"fa-solid":`favs`},whiteboard:{"fa-semibold":`fawsb`},thumbprint:{"fa-light":`fatl`},notdog:{"fa-solid":`fans`},"notdog-duo":{"fa-solid":`fands`},etch:{"fa-solid":`faes`},graphite:{"fa-thin":`fagt`},jelly:{"fa-regular":`fajr`},"jelly-fill":{"fa-regular":`fajfr`},"jelly-duo":{"fa-regular":`fajdr`},chisel:{"fa-regular":`facr`},utility:{"fa-semibold":`fausb`},"utility-duo":{"fa-semibold":`faudsb`},"utility-fill":{"fa-semibold":`faufsb`}},al$1={classic:[`fas`,`far`,`fal`,`fat`,`fad`],duotone:[`fadr`,`fadl`,`fadt`],sharp:[`fass`,`fasr`,`fasl`,`fast`],"sharp-duotone":[`fasds`,`fasdr`,`fasdl`,`fasdt`],slab:[`faslr`],"slab-press":[`faslpr`],"slab-duo":[`fasldr`],"slab-press-duo":[`faslpdr`],pixel:[`fapr`],mosaic:[`fams`],vellum:[`favs`],whiteboard:[`fawsb`],thumbprint:[`fatl`],notdog:[`fans`],"notdog-duo":[`fands`],etch:[`faes`],graphite:[`fagt`],jelly:[`fajr`],"jelly-fill":[`fajfr`],"jelly-duo":[`fajdr`],chisel:[`facr`],utility:[`fausb`],"utility-duo":[`faudsb`],"utility-fill":[`faufsb`]},da$1={classic:{fab:`fa-brands`,fad:`fa-duotone`,fal:`fa-light`,far:`fa-regular`,fas:`fa-solid`,fat:`fa-thin`},duotone:{fadr:`fa-regular`,fadl:`fa-light`,fadt:`fa-thin`},sharp:{fass:`fa-solid`,fasr:`fa-regular`,fasl:`fa-light`,fast:`fa-thin`},"sharp-duotone":{fasds:`fa-solid`,fasdr:`fa-regular`,fasdl:`fa-light`,fasdt:`fa-thin`},slab:{faslr:`fa-regular`},"slab-press":{faslpr:`fa-regular`},"slab-duo":{fasldr:`fa-regular`},"slab-press-duo":{faslpdr:`fa-regular`},pixel:{fapr:`fa-regular`},mosaic:{fams:`fa-solid`},vellum:{favs:`fa-solid`},whiteboard:{fawsb:`fa-semibold`},thumbprint:{fatl:`fa-light`},notdog:{fans:`fa-solid`},"notdog-duo":{fands:`fa-solid`},etch:{faes:`fa-solid`},graphite:{fagt:`fa-thin`},jelly:{fajr:`fa-regular`},"jelly-fill":{fajfr:`fa-regular`},"jelly-duo":{fajdr:`fa-regular`},chisel:{facr:`fa-regular`},utility:{fausb:`fa-semibold`},"utility-duo":{faudsb:`fa-semibold`},"utility-fill":{faufsb:`fa-semibold`}},ha=`fa.fas.far.fal.fat.fad.fadr.fadl.fadt.fab.fass.fasr.fasl.fast.fasds.fasdr.fasdl.fasdt.faslr.faslpr.fasldr.faslpdr.fapr.fams.favs.fawsb.fatl.fans.fands.faes.fagt.fajr.fajfr.fajdr.facr.fausb.faudsb.faufsb`.split(`.`).concat(n$1,[`fa-solid`,`fa-regular`,`fa-light`,`fa-thin`,`fa-duotone`,`fa-brands`,`fa-semibold`]),el$1=[`solid`,`regular`,`light`,`thin`,`duotone`,`brands`,`semibold`],sl$1=[1,2,3,4,5,6,7,8,9,10],ol$1=sl$1.concat([11,12,13,14,15,16,17,18,19,20]),ga=[].concat(_toConsumableArray$2(Object.keys(al$1)),el$1,[`aw`,`fw`,`pull-left`,`pull-right`],[`2xs`,`xs`,`sm`,`lg`,`xl`,`2xl`,`beat`,`beat-fade`,`border`,`bounce`,`buzz`,`canvas-square`,`canvas-roomy`,`fade`,`flip-360`,`flip-both`,`flip-horizontal`,`flip-vertical`,`flip`,`float`,`inverse`,`jello`,`layers`,`layers-bottom-left`,`layers-bottom-right`,`layers-counter`,`layers-text`,`layers-top-left`,`layers-top-right`,`li`,`pull-end`,`pull-start`,`pulse`,`rotate-180`,`rotate-270`,`rotate-90`,`rotate-by`,`shake`,`spin-pulse`,`spin-reverse`,`spin`,`spin-snap`,`spin-snap-4`,`spin-snap-8`,`stack-1x`,`stack-2x`,`stack`,`swing`,`ul`,`wag`,`width-auto`,`width-fixed`,l$1.GROUP,l$1.SWAP_OPACITY,l$1.PRIMARY,l$1.SECONDARY],sl$1.map(function(te){return`${te}x`}),ol$1.map(function(te){return`w-${te}`})),wa={"Font Awesome 5 Free":{900:`fas`,400:`far`},"Font Awesome 5 Pro":{900:`fas`,400:`far`,normal:`far`,300:`fal`},"Font Awesome 5 Brands":{400:`fab`,normal:`fab`},"Font Awesome 5 Duotone":{900:`fad`}},NAMESPACE_IDENTIFIER=`___FONT_AWESOME___`,UNITS_IN_GRID=16,DEFAULT_CSS_PREFIX=`fa`,DEFAULT_REPLACEMENT_CLASS=`svg-inline--fa`,DATA_FA_I2SVG=`data-fa-i2svg`,DATA_FA_PSEUDO_ELEMENT=`data-fa-pseudo-element`,DATA_FA_PSEUDO_ELEMENT_PENDING=`data-fa-pseudo-element-pending`,DATA_PREFIX=`data-prefix`,DATA_ICON=`data-icon`,HTML_CLASS_I2SVG_BASE_CLASS=`fontawesome-i2svg`,MUTATION_APPROACH_ASYNC=`async`,TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS=[`HTML`,`HEAD`,`STYLE`,`SCRIPT`],PSEUDO_ELEMENTS=[`::before`,`::after`,`:before`,`:after`],PRODUCTION$1=function(){try{return!0}catch{return!1}}();function familyProxy(te){return new Proxy(te,{get:function(te,oe){return oe in te?te[oe]:te[u]}})}var _PREFIX_TO_STYLE=_objectSpread2$1({},rl);_PREFIX_TO_STYLE[u]=_objectSpread2$1(_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},{"fa-duotone":`duotone`}),rl[u]),rt$1.kit),rt$1[`kit-duotone`]);var PREFIX_TO_STYLE=familyProxy(_PREFIX_TO_STYLE),_STYLE_TO_PREFIX=_objectSpread2$1({},$l);_STYLE_TO_PREFIX[u]=_objectSpread2$1(_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({},{duotone:`fad`}),_STYLE_TO_PREFIX[u]),St$1.kit),St$1[`kit-duotone`]);var STYLE_TO_PREFIX=familyProxy(_STYLE_TO_PREFIX),_PREFIX_TO_LONG_STYLE=_objectSpread2$1({},da$1);_PREFIX_TO_LONG_STYLE[u]=_objectSpread2$1(_objectSpread2$1({},_PREFIX_TO_LONG_STYLE[u]),It$1.kit);var PREFIX_TO_LONG_STYLE=familyProxy(_PREFIX_TO_LONG_STYLE),_LONG_STYLE_TO_PREFIX=_objectSpread2$1({},ra);_LONG_STYLE_TO_PREFIX[u]=_objectSpread2$1(_objectSpread2$1({},_LONG_STYLE_TO_PREFIX[u]),mt$1.kit),familyProxy(_LONG_STYLE_TO_PREFIX);var ICON_SELECTION_SYNTAX_PATTERN=Z$1,LAYERS_TEXT_CLASSNAME=`fa-layers-text`,FONT_FAMILY_PATTERN=$$2;familyProxy(_objectSpread2$1({},Al));var ATTRIBUTES_WATCHED_FOR_MUTATION=[`class`,`data-prefix`,`data-icon`,`data-fa-transform`,`data-fa-mask`],DUOTONE_CLASSES=il,RESERVED_CLASSES=[].concat(_toConsumableArray$2(it$1),_toConsumableArray$2(ga)),initial=WINDOW.FontAwesomeConfig||{};function getAttrConfig(te){var oe=DOCUMENT.querySelector(`script[`+te+`]`);if(oe)return oe.getAttribute(te)}function coerce(te){return te===``?!0:te===`false`?!1:te===`true`||te}DOCUMENT&&typeof DOCUMENT.querySelector==`function`&&[[`data-family-prefix`,`familyPrefix`],[`data-css-prefix`,`cssPrefix`],[`data-family-default`,`familyDefault`],[`data-style-default`,`styleDefault`],[`data-replacement-class`,`replacementClass`],[`data-auto-replace-svg`,`autoReplaceSvg`],[`data-auto-add-css`,`autoAddCss`],[`data-search-pseudo-elements`,`searchPseudoElements`],[`data-search-pseudo-elements-warnings`,`searchPseudoElementsWarnings`],[`data-search-pseudo-elements-full-scan`,`searchPseudoElementsFullScan`],[`data-observe-mutations`,`observeMutations`],[`data-mutate-approach`,`mutateApproach`],[`data-keep-original-source`,`keepOriginalSource`],[`data-measure-performance`,`measurePerformance`],[`data-show-missing-icons`,`showMissingIcons`]].forEach(function(te){var oe=_slicedToArray(te,2),xe=oe[0],Se=oe[1],Te=coerce(getAttrConfig(xe));Te!=null&&(initial[Se]=Te)});var _default={styleDefault:`solid`,familyDefault:u,cssPrefix:DEFAULT_CSS_PREFIX,replacementClass:DEFAULT_REPLACEMENT_CLASS,autoReplaceSvg:!0,autoAddCss:!0,searchPseudoElements:!1,searchPseudoElementsWarnings:!0,searchPseudoElementsFullScan:!1,observeMutations:!0,mutateApproach:`async`,keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};initial.familyPrefix&&(initial.cssPrefix=initial.familyPrefix);var _config=_objectSpread2$1(_objectSpread2$1({},_default),initial);_config.autoReplaceSvg||(_config.observeMutations=!1);var config={};Object.keys(_default).forEach(function(te){Object.defineProperty(config,te,{enumerable:!0,set:function(oe){_config[te]=oe,_onChangeCb.forEach(function(te){return te(config)})},get:function(){return _config[te]}})}),Object.defineProperty(config,"familyPrefix",{enumerable:!0,set:function(te){_config.cssPrefix=te,_onChangeCb.forEach(function(te){return te(config)})},get:function(){return _config.cssPrefix}}),WINDOW.FontAwesomeConfig=config;var _onChangeCb=[];function onChange(te){return _onChangeCb.push(te),function(){_onChangeCb.splice(_onChangeCb.indexOf(te),1)}}var d$2=UNITS_IN_GRID,meaninglessTransform={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function insertCss(te){if(te&&IS_DOM){var oe=DOCUMENT.createElement(`style`);oe.setAttribute(`type`,`text/css`),oe.innerHTML=te;for(var xe=DOCUMENT.head.childNodes,Se=null,Te=xe.length-1;Te>-1;Te--){var Ee=xe[Te],De=(Ee.tagName||``).toUpperCase();[`STYLE`,`LINK`].indexOf(De)>-1&&(Se=Ee)}return DOCUMENT.head.insertBefore(oe,Se),te}}var idPool=`0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`;function nextUniqueId(){for(var te=12,oe=``;te-->0;)oe+=idPool[Math.random()*62|0];return oe}function toArray$4(te){for(var oe=[],xe=(te||[]).length>>>0;xe--;)oe[xe]=te[xe];return oe}function classArray(te){return te.classList?toArray$4(te.classList):(te.getAttribute(`class`)||``).split(` `).filter(function(te){return te})}function htmlEscape(te){return`${te}`.replace(/&/g,`&`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/</g,`<`).replace(/>/g,`>`)}function joinAttributes(te){return Object.keys(te||{}).reduce(function(oe,xe){return oe+`${xe}="${htmlEscape(te[xe])}" `},``).trim()}function joinStyles(te){return Object.keys(te||{}).reduce(function(oe,xe){return oe+`${xe}: ${te[xe].trim()};`},``)}function transformIsMeaningful(te){return te.size!==meaninglessTransform.size||te.x!==meaninglessTransform.x||te.y!==meaninglessTransform.y||te.rotate!==meaninglessTransform.rotate||te.flipX||te.flipY}function transformForSvg(te){var oe=te.transform,xe=te.containerWidth,Se=te.iconWidth;return{outer:{transform:`translate(${xe/2} 256)`},inner:{transform:`${`translate(${oe.x*32}, ${oe.y*32}) `} ${`scale(${oe.size/16*(oe.flipX?-1:1)}, ${oe.size/16*(oe.flipY?-1:1)}) `} ${`rotate(${oe.rotate} 0 0)`}`},path:{transform:`translate(${Se/2*-1} -256)`}}}function transformForCss(te){var oe=te.transform,xe=te.width,Se=xe===void 0?UNITS_IN_GRID:xe,Te=te.height,Ee=Te===void 0?UNITS_IN_GRID:Te,De=te.startCentered,ke=De!==void 0&&De,Ae=``;return Ae+=ke&&IS_IE$1?`translate(${oe.x/d$2-Se/2}em, ${oe.y/d$2-Ee/2}em) `:ke?`translate(calc(-50% + ${oe.x/d$2}em), calc(-50% + ${oe.y/d$2}em)) `:`translate(${oe.x/d$2}em, ${oe.y/d$2}em) `,Ae+=`scale(${oe.size/d$2*(oe.flipX?-1:1)}, ${oe.size/d$2*(oe.flipY?-1:1)}) `,Ae+=`rotate(${oe.rotate}deg) `,Ae}var baseStyles=`:root, :host {
|
|
@@ -1129,4 +1129,4 @@ What: two things tried to add headers to outgoing requests. Only one can.
|
|
|
1129
1129
|
|
|
1130
1130
|
Why it matters: the first one stopped. Requests can now go out without a traceparent header, so Flare cannot link a browser request to its server trace.
|
|
1131
1131
|
|
|
1132
|
-
How to fix: use one Flare instance, and check your bundle for two copies of @flareapp/js.`,`background:#e11d48;color:#fff;font-weight:bold;font-size:14px;padding:2px 6px`,`color:#e11d48;font-size:13px`),mutator=te,()=>{mutator===te&&(mutator=null)}}function hasRequestSubscribers(){return subscribers.size>0||mutator!==null}function publishRequestStart(te){let oe=[];for(let xe of subscribers)try{let Se=xe(te);Se&&oe.push(Se)}catch{}let xe=te.init,Se;if(mutator)try{let Te=mutator(te);Te&&(oe.push(Te),Te.init!==void 0&&(xe=Te.init),Se=Te.headers)}catch{}return oe.length===0&&xe===te.init&&Se===void 0?null:{init:xe,headers:Se,settle(te){for(let xe of oe)try{xe.onSettle?.(te)}catch{}}}}var INTERNAL_REQUEST_KEY=`__flare_internal_request__`;function internalRequestInit(te){return{...te,[INTERNAL_REQUEST_KEY]:!0}}function isInternalRequest(te){return te?.[INTERNAL_REQUEST_KEY]===!0}function isNativeFetch(te){return typeof te==`function`&&/native code/.test(Function.prototype.toString.call(te))}function supportsNativeFetch(){let te=globalThis;if(typeof te.fetch!=`function`)return!1;if(isNativeFetch(te.fetch))return!0;let oe=!1,xe=te.document;if(xe&&typeof xe.createElement==`function`){let te=null;try{te=xe.createElement(`iframe`),te.hidden=!0,xe.head.appendChild(te);let Se=te.contentWindow;Se&&typeof Se.fetch==`function`&&(oe=isNativeFetch(Se.fetch))}catch{oe=!1}finally{try{te?.remove()}catch{}}}return oe}function createPatcher(){let te=!1,oe=[];return{get installed(){return te},install(xe,Se){if(te)return;function Te(te){let oe=Se[te];oe&&fill(xe,te,oe)}oe=Object.keys(Se);for(let te of oe)Te(te);te=!0},uninstall(xe){if(te&&oe.every(te=>{let oe=xe[te];return typeof oe!=`function`||!!oe.__flare_original__})){for(let te of oe)unfill(xe,te);te=!1}}}}function resolveRequest(te,oe){let xe,Se=oe?.method;return typeof Request<`u`&&te instanceof Request?(xe=te.url,Se??=te.method):xe=typeof te==`string`?te:String(te),{method:(Se??`GET`).toUpperCase(),url:xe}}function createFetchWrapper(te){return function(oe,xe){let Se=xe=>te.call(this,oe,xe),Te=null;try{if(hasRequestSubscribers()&&!isInternalRequest(xe)){let te=resolveRequest(oe,xe);Te=publishRequestStart({kind:`fetch`,method:te.method,url:te.url,input:oe,init:xe})}}catch{Te=null}if(!Te)return Se(xe);let Ee=Te.settle,De=te=>(Ee({error:te}),Promise.reject(te)),ke;try{ke=Se(Te.init)}catch(te){return De(te)}return ke.then(te=>(Ee({status:te.status}),te),De)}}var patcher$1=createPatcher();function instrumentFetch(){if(patcher$1.installed)return;let te=globalThis;typeof te.fetch==`function`&&supportsNativeFetch()&&patcher$1.install(te,{fetch:te=>createFetchWrapper(te)})}function unpatchFetch(){patcher$1.uninstall(globalThis)}var XHR_DONE=4,xhrState=new WeakMap;function releaseRequestRefs(te){te.watched=void 0,te.onDone=void 0}function settleOnce(te,oe){te.ended=!0,te.watched?.settle(oe),releaseRequestRefs(te)}function createXHROpen(te){return function(oe,xe,...Se){let Te=xhrState.get(this);Te&&Te.watched&&!Te.ended&&(Te.onDone&&this.removeEventListener(`readystatechange`,Te.onDone),settleOnce(Te,{aborted:!0}));try{oe&&xe!=null?xhrState.set(this,{method:String(oe).toUpperCase(),url:String(xe),appHeaders:new Set,ended:!1}):xhrState.delete(this)}catch{xhrState.delete(this)}return te.apply(this,[oe,xe,...Se])}}function createXHRSetRequestHeader(te){return function(oe,xe){te.call(this,oe,xe),typeof oe==`string`&&xhrState.get(this)?.appHeaders.add(oe.toLowerCase())}}function applyHeaders(te,oe){let xe=oe.watched?.headers;if(xe){for(let[Se,Te]of Object.entries(xe))if(!oe.appHeaders.has(Se.toLowerCase()))try{te.setRequestHeader(Se,Te)}catch{}}}function createXHRSend(te){return function(oe){let xe=()=>te.call(this,oe),Se=xhrState.get(this);if(!Se||!hasRequestSubscribers()||Se.ended)return xe();let Te=null;try{Te=publishRequestStart({kind:`xhr`,method:Se.method,url:Se.url})}catch{Te=null}if(!Te)return xe();Se.watched=Te,applyHeaders(this,Se);let Ee=()=>{if(this.readyState!==XHR_DONE||(this.removeEventListener(`readystatechange`,Ee),Se.ended))return;let te=0;try{te=this.status}catch{}settleOnce(Se,{status:te})};this.addEventListener(`readystatechange`,Ee),Se.onDone=Ee;try{return xe()}catch(te){throw this.removeEventListener(`readystatechange`,Ee),settleOnce(Se,{error:te}),te}}}var patcher=createPatcher(),patchedPrototype=null;function instrumentXHR(){if(patcher.installed)return;let te=globalThis.XMLHttpRequest;typeof te==`function`&&te.prototype&&(patcher.install(te.prototype,{open:te=>createXHROpen(te),setRequestHeader:te=>createXHRSetRequestHeader(te),send:te=>createXHRSend(te)}),patchedPrototype=te.prototype)}function unpatchXHR(){patchedPrototype&&(patcher.uninstall(patchedPrototype),patcher.installed||(patchedPrototype=null))}var subscriptions=0;function withRequestPatches(te){subscriptions===0&&(instrumentFetch(),instrumentXHR()),subscriptions++;let oe=te(),xe=!1;return()=>{xe||(xe=!0,oe(),subscriptions--,subscriptions===0&&(unpatchFetch(),unpatchXHR()))}}function shouldPropagate(te,oe,xe,Se){return Se?Se.length!==0&&Se.some(oe=>typeof oe==`string`?te.includes(oe):oe.test(te)):oe!==null&&oe.origin===xe}function headerPairsFrom(te){try{let oe=[];for(let xe of te){if(typeof xe!=`object`||!xe)return null;let te=Array.from(xe);if(te.length!==2)return null;oe.push([String(te[0]),String(te[1])])}return oe}catch{return null}}function isIterable(te){return te!==null&&(typeof te==`object`||typeof te==`function`)&&typeof te[Symbol.iterator]==`function`}function mergeTraceparentHeader(te,oe,xe){let Se=oe?.headers??(typeof Request<`u`&&te instanceof Request?te.headers:void 0),Te;if(Se instanceof Headers){if(Se.has(`traceparent`))return oe;Te=new Headers(Se),Te.set(`traceparent`,xe)}else if(Array.isArray(Se)){if(Se.some(([te])=>String(te).toLowerCase()===`traceparent`))return oe;Te=[...Se,[`traceparent`,xe]]}else if(isIterable(Se)){let te=headerPairsFrom(Se);if(te===null)Te=Se;else if(te.some(([te])=>te.toLowerCase()===`traceparent`))return oe;else Te=[...te,[`traceparent`,xe]]}else if(Se){if(Object.keys(Se).some(te=>te.toLowerCase()===`traceparent`))return oe;Te={...Se,traceparent:xe}}else Te={traceparent:xe};let Ee={headers:Te};if(oe){let te=Object.getOwnPropertyDescriptors(oe);delete te.headers,Object.defineProperties(Ee,te)}return Ee.duplex===void 0&&typeof Request<`u`&&te instanceof Request&&te.body!=null&&(Ee.duplex=`half`),Ee}var REQUEST_SPAN_TYPES={fetch:BrowserSpanType.Fetch,xhr:BrowserSpanType.Xhr},INLINE_SCHEMES=new Set([`data:`,`blob:`]);function browserUrlContext(){let te=globalThis.location?.origin??``;return{origin:te,base:()=>globalThis.document?.baseURI||te}}function safeAbsolute(te,oe){try{return new URL(te,oe||void 0)}catch{return null}}var ingestCacheKey=null,ingestCacheHrefs=[];function resolvedIngestHrefs(te,oe){let xe=[te.ingestUrl,te.logsIngestUrl,te.tracesIngestUrl],Se=`${oe} ${xe.join(` `)}`;return Se!==ingestCacheKey&&(ingestCacheKey=Se,ingestCacheHrefs=xe.filter(te=>typeof te==`string`&&te.length>0).map(te=>safeAbsolute(te,oe)).filter(te=>te!==null).map(te=>te.href)),ingestCacheHrefs}function matchesIngestHref(te,oe){if(!te.startsWith(oe))return!1;let xe=te.charAt(oe.length);return xe===``||xe===`/`||xe===`?`||xe===`#`}function isFlareIngestUrl(te,oe,xe){return te?resolvedIngestHrefs(oe,xe).some(oe=>matchesIngestHref(te.href,oe)):!1}function requestSpanAttributes(te,oe,xe,Se){return{"http.request.method":te,...urlAttributes(oe?oe.href:xe,Se.urlDenylist),...oe?{"server.address":oe.hostname}:{},...oe&&oe.port?{"server.port":Number(oe.port)}:{}}}function endHttpRequestSpan(te,oe,xe){te.setAttribute(`http.response.status_code`,oe),(oe>=500||xe?.zeroIsError&&oe===0)&&te.setStatus({code:SpanStatusCode.Error}),te.end()}function finishHttpSpanError(te,oe){te.setStatus({code:SpanStatusCode.Error,message:oe instanceof Error?oe.message:String(oe)}),te.end()}function traceparentFor(te,oe,xe,Se,Te){return shouldPropagate(oe?oe.href:xe,oe,Se,Te.tracePropagationTargets)?buildTraceparent(te.traceId,te.spanId,te.isRecording):null}function startHttpRequestSpan(te,oe){let{method:xe,url:Se,urls:Te,spanType:Ee}=oe,De=te.config,ke=Te.base(),Ae=safeAbsolute(Se,ke);if(isFlareIngestUrl(Ae,De,ke)||Ae&&INLINE_SCHEMES.has(Ae.protocol))return null;let je=Ae?Ae.pathname:Se;return{span:te.startSpan(`${xe} ${je}`,{spanType:Ee,attributes:requestSpanAttributes(xe,Ae,Se,De)}),absoluteUrl:Ae}}function zeroIsError(te){return te!==null&&(te.protocol===`http:`||te.protocol===`https:`)}function propagate(te,oe,xe,Se,Te){let Ee=traceparentFor(te,oe,xe.url,Se.origin,Te.config);return Ee?xe.kind===`xhr`?{headers:{traceparent:Ee}}:xe.input===void 0?{}:{init:mergeTraceparentHeader(xe.input,xe.init,Ee)}:{}}function traceRequests(te,oe){return claimRequestMutation(xe=>{if(!te.config.enableTracing)return;let Se=startHttpRequestSpan(te,{method:xe.method,url:xe.url,urls:oe,spanType:REQUEST_SPAN_TYPES[xe.kind]});if(!Se)return;let{span:Te,absoluteUrl:Ee}=Se,De={};try{De=propagate(Te,Ee,xe,oe,te)}catch{De={}}return{...De,onSettle({status:te,error:oe,aborted:Se}){Se?(Te.setStatus({code:SpanStatusCode.Error}),Te.end()):oe===void 0?xe.kind===`xhr`?endHttpRequestSpan(Te,te??0,{zeroIsError:zeroIsError(Ee)}):endHttpRequestSpan(Te,te??0):finishHttpSpanError(Te,oe)}}})}var RequestRecorder=class{type=`browser_request`;constructor(te){this.host=te,this.subscribe=this.subscribe.bind(this),this.onStart=this.onStart.bind(this),this.onSettle=this.onSettle.bind(this)}install(){return withRequestPatches(this.subscribe)}subscribe(){return subscribeToRequests(this.onStart)}onStart(te){let oe=browserUrlContext().base(),xe=safeAbsolute(te.url,oe);if(!isFlareIngestUrl(xe,this.host.config(),oe))return{onSettle:this.onSettle.bind(this,te,xe)}}onSettle(te,oe,xe){let Se=oe?oe.href:te.url,Te={"http.request.method":te.method,"url.full":breadcrumbUrl(Se,this.host.config().urlDenylist)};oe?.hostname&&(Te[`server.address`]=oe.hostname),xe.status!==void 0&&(Te[`http.response.status_code`]=xe.status),this.host.record(REQUEST_SPAN_TYPES[te.kind],Te,defaultNowNano())}};function startBreadcrumbs(te){if(typeof document>`u`)return()=>{};let oe=[new ClickRecorder(te),new FormChangeRecorder(te),new RequestRecorder(te),new NavigationRecorder(te)],xe=[];for(let te of oe)try{xe.push(te.install())}catch{}return()=>{for(let te of xe)try{te()}catch{}}}var BrowserFlushScheduler=class{register(te){typeof document<`u`&&document&&(document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&te({keepalive:!0})}),typeof window<`u`&&window&&window.addEventListener(`pagehide`,()=>te({keepalive:!0})))}};function cookie(te){if(!window.document.cookie)return{};let oe=Object.create(null);return window.document.cookie.split(`; `).forEach(xe=>{let Se=xe.indexOf(`=`);if(Se===-1){oe[xe]=te.test(xe)?`[redacted]`:``;return}let Te=xe.slice(0,Se),Ee=xe.slice(Se+1);oe[Te]=te.test(Te)?`[redacted]`:Ee}),{"http.request.cookies":oe}}var EFFECTIVE_TYPES=[`slow-2g`,`2g`,`3g`,`4g`];function readScreen(){if(typeof screen>`u`||typeof screen.width!=`number`||typeof screen.height!=`number`)return null;let te=typeof devicePixelRatio==`number`?devicePixelRatio:void 0;return te==null?{width:screen.width,height:screen.height}:{width:screen.width,height:screen.height,scale:te}}function readNetwork(te){let oe={};typeof te.onLine==`boolean`&&(oe.online=te.onLine);let xe=te.connection;if(xe){let{effectiveType:te,downlink:Se,rtt:Te}=xe;te&&EFFECTIVE_TYPES.includes(te)&&(oe.effectiveType=te),typeof Se==`number`&&(oe.downlinkMbps=Se),typeof Te==`number`&&(oe.rttMs=Te)}return Object.keys(oe).length>0?oe:null}function readTimezone(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||void 0}catch{return}}var BrowserDeviceInfoProvider=class{staticInfo=null;collect(){if(typeof window>`u`||typeof navigator>`u`)return{};let te=navigator,oe={},xe=this.readStatic(te),Se=readScreen(),Te={...xe.device,...Se?{screen:Se}:{}};Object.keys(Te).length>0&&(oe.device=Te),xe.locale&&(oe.locale=xe.locale);let Ee=readNetwork(te);return Ee&&(oe.network=Ee),oe}readStatic(te){if(this.staticInfo)return this.staticInfo;let oe={};typeof te.deviceMemory==`number`&&(oe.memoryGb=te.deviceMemory),typeof te.hardwareConcurrency==`number`&&(oe.cpuCores=te.hardwareConcurrency);let xe={};te.language&&(xe.language=te.language);let Se=readTimezone();return Se&&(xe.timezone=Se),this.staticInfo={device:Object.keys(oe).length>0?oe:void 0,locale:Object.keys(xe).length>0?xe:void 0},this.staticInfo}},browserDeviceInfoProvider=new BrowserDeviceInfoProvider;function request(te,oe){return{...urlAttributes(oe??window.location.href,te),"user_agent.original":window.navigator.userAgent,"http.request.referrer":redactUrlQuery(window.document.referrer,te),"document.ready_state":window.document.readyState}}function browserEntryPoint(te,oe){if(typeof window>`u`)return{"flare.entry_point.type":`web`};let xe={"flare.entry_point.type":`web`},Se=oe?oe.href:window?.location?.href;if(Se){xe[`flare.entry_point.value`]=redactUrlQuery(Se,te.urlDenylist);let Te=oe?oe.pathname:window?.location?.pathname;Te&&(xe[`flare.entry_point.handler.identifier`]=Te,xe[`http.route`]=Te,xe[`flare.entry_point.handler.type`]=`browser`)}return xe}var collectBrowser=te=>{let oe={...browserEntryPoint(te)};return Object.assign(oe,deviceInfoToAttributes(browserDeviceInfoProvider.collect())),typeof window>`u`||(window?.location?.hostname&&(oe[`host.name`]=window.location.hostname),Object.assign(oe,request(te.urlDenylist)),Object.assign(oe,cookie(te.urlDenylist))),oe},FetchFileReader=class{read(te){return/^https?:\/\//i.test(te)?fetch(te,internalRequestInit()).then(te=>te.status===200?te.text():null).catch(()=>null):Promise.resolve(null)}},CLIENT_VERSION=`2.13.0`;function insulate(te){return(...oe)=>{try{te(...oe)}catch{}}}function safeInvoke(te){try{te?.()}catch{}}var instrumented=new WeakMap;function instrumentOnce(te,oe){instrumented.get(te)?.();let xe=[];function Se(){for(let te=xe.length-1;te>=0;te--)safeInvoke(xe[te])}try{oe(te=>{xe.push(te)})}catch{return Se(),()=>{}}function Te(){Se(),instrumented.get(te)===Te&&instrumented.delete(te)}return instrumented.set(te,Te),Te}function collectBrowserSpanContext(te,oe){if(typeof window>`u`)return{};let xe=absoluteUrl(oe);return{...browserEntryPoint(te,xe),...request(te.urlDenylist,xe?.href)}}function browserSpanUrlAttributes(te,oe){if(typeof window>`u`)return{};let xe=absoluteUrl(oe);if(!xe)return{};let Se=urlAttributes(xe.href,te.urlDenylist);return{"url.query":``,...Se,"flare.entry_point.value":Se[`url.full`]}}var bfcacheRestoreTime=-1,getBFCacheRestoreTime=()=>bfcacheRestoreTime,onBFCacheRestore=te=>{addEventListener(`pageshow`,oe=>{oe.persisted&&(bfcacheRestoreTime=oe.timeStamp,te(oe))},!0)},getRating=(te,oe)=>te>oe[1]?`poor`:te>oe[0]?`needs-improvement`:`good`,bindReporter=(te,oe,xe,Se)=>{let Te,Ee;return De=>{oe.value>=0&&(De||Se)&&(Ee=oe.value-(Te??0),(Ee||Te===void 0)&&(Te=oe.value,oe.delta=Ee,oe.rating=getRating(oe.value,xe),te(oe)))}},doubleRAF=te=>{requestAnimationFrame(()=>requestAnimationFrame(te))},getNavigationEntry=()=>{let te=performance.getEntriesByType(`navigation`)[0];if(te&&te.responseStart>0&&te.responseStart<performance.now())return te},getActivationStart=()=>getNavigationEntry()?.activationStart??0,firstHiddenTime=-1,onHiddenFunctions=new Set,initHiddenTime=()=>document.visibilityState===`hidden`&&!document.prerendering?0:1/0,onVisibilityUpdate=te=>{if(document.visibilityState===`hidden`){if(te.type===`visibilitychange`)for(let te of onHiddenFunctions)te();isFinite(firstHiddenTime)||(firstHiddenTime=te.type===`visibilitychange`?te.timeStamp:0,removeEventListener(`prerenderingchange`,onVisibilityUpdate,!0))}},getVisibilityWatcher=(te=!1)=>{if(te&&(firstHiddenTime=1/0),firstHiddenTime<0){let te=getActivationStart();firstHiddenTime=(document.prerendering?void 0:globalThis.performance.getEntriesByType(`visibility-state`).find(oe=>oe.name===`hidden`&&oe.startTime>=te)?.startTime)??initHiddenTime(),addEventListener(`visibilitychange`,onVisibilityUpdate,!0),addEventListener(`prerenderingchange`,onVisibilityUpdate,!0),onBFCacheRestore(()=>{setTimeout(()=>{firstHiddenTime=initHiddenTime()})})}return{get firstHiddenTime(){return firstHiddenTime},onHidden(te){onHiddenFunctions.add(te)}}},generateUniqueID=()=>`v6-${Date.now()}-${Math.floor(Math.random()*8999999999999)+0xe8d4a51000}`,initMetric=(te,oe=-1,xe,Se=0,Te,Ee,De)=>{let ke=getNavigationEntry(),Ae=ke?.navigationId||0,je=`navigate`;return xe?je=xe:getBFCacheRestoreTime()>=0?je=`back-forward-cache`:ke&&(document.prerendering||getActivationStart()>0?je=`prerender`:document.wasDiscarded?je=`restore`:ke.type&&(je=ke.type.replace(/_/g,`-`))),{name:te,value:oe,rating:`good`,delta:0,entries:[],id:generateUniqueID(),navigationType:je,navigationId:Se||Ae,navigationInteractionId:Te,navigationURL:Ee||ke?.name,navigationStartTime:De||0}},instanceMap=new WeakMap;function initUnique(te,oe){let xe=instanceMap.get(oe);return xe||(xe=new WeakMap,instanceMap.set(oe,xe)),xe.get(te)||xe.set(te,new oe),xe.get(te)}var LayoutShiftManager=class{_onAfterProcessingUnexpectedShift;_sessionValue=0;_sessionEntries=[];_processEntry(te){if(te.hadRecentInput)return;let oe=this._sessionEntries[0],xe=this._sessionEntries.at(-1);this._sessionValue&&oe&&xe&&te.startTime-xe.startTime<1e3&&te.startTime-oe.startTime<5e3?(this._sessionValue+=te.value,this._sessionEntries.push(te)):(this._sessionValue=te.value,this._sessionEntries=[te]),this._onAfterProcessingUnexpectedShift?.(te)}},observe=(te,oe,xe={})=>{try{let Se=te.filter(te=>PerformanceObserver.supportedEntryTypes.includes(te));if(Se.length>0){let te=new PerformanceObserver(te=>{queueMicrotask(()=>{let xe=te.getEntries();Se.length>1&&xe.sort((te,oe)=>te.startTime+te.duration-(oe.startTime+oe.duration)),oe(xe)})});for(let oe of Se)te.observe({type:oe,buffered:!0,...xe});return te}}catch{}},checkSoftNavsEnabled=te=>globalThis.PerformanceObserver?.supportedEntryTypes.includes(`soft-navigation`)&&typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint==`function`&&te&&te.reportSoftNavs,storeSoftNavEntry=(te,oe)=>{if(te.set(oe.navigationId,oe),te.size>2){let oe=te.keys().next().value;oe!==void 0&&te.delete(oe)}},runOnce=te=>{let oe=!1;return()=>{oe||=(te(),!0)}},FCPEntryManager=class{_softNavigationEntryMap},whenActivated=te=>{document.prerendering?addEventListener(`prerenderingchange`,te,!0):te()},FCPThresholds=[1800,3e3],onFCP=(te,oe={})=>{let xe=checkSoftNavsEnabled(oe);whenActivated(()=>{let Se=initUnique(oe,FCPEntryManager),Te=getVisibilityWatcher(),Ee=initMetric(`FCP`),De,ke=observe([`paint`],te=>{for(let oe of te)oe.name===`first-contentful-paint`&&(ke.disconnect(),oe.startTime<Te.firstHiddenTime&&(Ee.value=Math.max(oe.startTime-getActivationStart(),0),Ee.entries.push(oe),Ee.navigationId=oe.navigationId||Ee.navigationId,De(!0)))});ke&&(De=bindReporter(te,Ee,FCPThresholds,oe.reportAllChanges),onBFCacheRestore(xe=>{Ee=initMetric(`FCP`,-1,`back-forward-cache`,Ee.navigationId,Ee.navigationInteractionId,Ee.navigationURL,getBFCacheRestoreTime()),De=bindReporter(te,Ee,FCPThresholds,oe.reportAllChanges),doubleRAF(()=>{Ee.value=performance.now()-xe.timeStamp,De(!0)})})),xe&&observe([`soft-navigation`],xe=>{xe.forEach(xe=>{Se._softNavigationEntryMap&&xe.navigationId&&storeSoftNavEntry(Se._softNavigationEntryMap,xe),Ee=initMetric(`FCP`,Math.max((xe.presentationTime||xe.paintTime||0)-xe.startTime,0),`soft-navigation`,xe.navigationId,xe.interactionId,xe.name,xe.startTime),De=bindReporter(te,Ee,FCPThresholds,oe.reportAllChanges),De(!0)})},oe)})},CLSThresholds=[.1,.25],onCLS=(te,oe={})=>{let xe=getVisibilityWatcher();onFCP(runOnce(()=>{let Se=initMetric(`CLS`,0),Te,Ee=initUnique(oe,LayoutShiftManager),De=(xe,De,ke,Ae,je)=>{Se=initMetric(`CLS`,0,xe,De,ke,Ae,je),Ee._sessionValue=0,Te=bindReporter(te,Se,CLSThresholds,oe.reportAllChanges)},ke=(te=!1)=>{Ee._sessionValue>Se.value&&(Se.value=Ee._sessionValue,Se.entries=Ee._sessionEntries),Te(te)},Ae=te=>{ke(!0),De(`soft-navigation`,te.navigationId,te.interactionId,te.name,te.startTime)},je=te=>{for(let oe of te)oe.entryType===`soft-navigation`?Ae(oe):Ee._processEntry(oe);ke()},Me=[`layout-shift`];checkSoftNavsEnabled(oe)&&Me.push(`soft-navigation`);let Ne=observe(Me,je);Ne&&(Te=bindReporter(te,Se,CLSThresholds,oe.reportAllChanges),xe.onHidden(()=>{je(Ne.takeRecords()),Te(!0)}),onBFCacheRestore(()=>{De(`back-forward-cache`,Se.navigationId,Se.navigationInteractionId,Se.navigationURL,getBFCacheRestoreTime()),doubleRAF(Te)}),setTimeout(Te))}))},interactionCountEstimate=0,minKnownInteractionId=1/0,maxKnownInteractionId=0,updateEstimate=te=>{for(let oe of te)oe.interactionId&&(minKnownInteractionId=Math.min(minKnownInteractionId,oe.interactionId),maxKnownInteractionId=Math.max(maxKnownInteractionId,oe.interactionId),interactionCountEstimate=maxKnownInteractionId?(maxKnownInteractionId-minKnownInteractionId)/7+1:0)},po,getInteractionCount=()=>po?interactionCountEstimate:performance.interactionCount??0,initInteractionCountPolyfill=()=>{`interactionCount`in performance||po||(po=observe([`event`],updateEstimate,{durationThreshold:0}))},MAX_INTERACTIONS_TO_CONSIDER=10,prevInteractionCount=0,getInteractionCountForNavigation=()=>getInteractionCount()-prevInteractionCount,InteractionManager=class{_longestInteractionList=[];_longestInteractionMap=new Map;_onBeforeProcessingEntry;_onAfterProcessingINPCandidate;_resetInteractions(){prevInteractionCount=getInteractionCount(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(te){let oe=getInteractionCountForNavigation(),xe=Math.min(this._longestInteractionList.length-1,Math.floor(oe/50));return oe&&xe===-1&&(te===`soft-navigation`||te===`back-forward-cache`)?{_latency:8,id:-1,entries:[]}:this._longestInteractionList[xe]}_processEntry(te){if(this._onBeforeProcessingEntry?.(te),!(te.interactionId||te.entryType===`first-input`))return;let oe=this._longestInteractionList.at(-1),xe=this._longestInteractionMap.get(te.interactionId);if(xe||this._longestInteractionList.length<MAX_INTERACTIONS_TO_CONSIDER||te.duration>oe._latency){if(xe?te.duration>xe._latency?(xe.entries=[te],xe._latency=te.duration):te.duration===xe._latency&&te.startTime===xe.entries[0].startTime&&xe.entries.push(te):(xe={id:te.interactionId,entries:[te],_latency:te.duration},this._longestInteractionMap.set(xe.id,xe),this._longestInteractionList.push(xe)),this._longestInteractionList.sort((te,oe)=>oe._latency-te._latency),this._longestInteractionList.length>MAX_INTERACTIONS_TO_CONSIDER){let te=this._longestInteractionList.splice(MAX_INTERACTIONS_TO_CONSIDER);for(let oe of te)this._longestInteractionMap.delete(oe.id)}this._onAfterProcessingINPCandidate?.(xe)}}},whenIdleOrHidden=te=>{let oe=`requestIdleCallback`in globalThis?1e3:0,xe=globalThis.requestIdleCallback||setTimeout,Se=globalThis.cancelIdleCallback||clearTimeout;if(document.visibilityState===`hidden`)te();else{let Te=runOnce(te),Ee=-1,De=()=>{Se(Ee),Te()};addEventListener(`visibilitychange`,De,{once:!0,capture:!0}),Ee=xe(()=>{removeEventListener(`visibilitychange`,De,{capture:!0}),Te()},{timeout:oe})}},INPThresholds=[200,500],DEFAULT_DURATION_THRESHOLD=40,onINP=(te,oe={})=>{if(!(globalThis.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype))return;let xe=getVisibilityWatcher();whenActivated(()=>{initInteractionCountPolyfill();let Se=initMetric(`INP`),Te,Ee=initUnique(oe,InteractionManager),De=(xe,De,ke,Ae,je)=>{Ee._resetInteractions(),Se=initMetric(`INP`,-1,xe,De,ke,Ae,je),Te=bindReporter(te,Se,INPThresholds,oe.reportAllChanges)},ke=()=>{let te=Ee._estimateP98LongestInteraction(Se.navigationType);te&&te._latency!==Se.value&&(Se.value=te._latency,Se.entries=te.entries,Te())},Ae=te=>{ke(),Te(!0),De(`soft-navigation`,te.navigationId,te.interactionId,te.name,te.startTime)},je=(te,oe=!1)=>{whenIdleOrHidden(()=>{for(let oe of te)oe.entryType===`soft-navigation`?Ae(oe):Ee._processEntry(oe);ke(),oe&&Te(!0)})},Me=[`event`,`first-input`];checkSoftNavsEnabled(oe)&&Me.push(`soft-navigation`);let Ne=observe(Me,je,{...oe,durationThreshold:oe.durationThreshold??DEFAULT_DURATION_THRESHOLD});Te=bindReporter(te,Se,INPThresholds,oe.reportAllChanges),Ne&&(xe.onHidden(()=>{je(Ne.takeRecords(),!0)}),onBFCacheRestore(()=>{De(`back-forward-cache`,Se.navigationId,Se.navigationInteractionId,Se.navigationURL,getBFCacheRestoreTime())}))})},LCPEntryManager=class{_onBeforeProcessingEntry;_softNavigationEntryMap;_processEntry(te){this._onBeforeProcessingEntry?.(te)}},LCPThresholds=[2500,4e3],onLCP=(te,oe={})=>{let xe=!1,Se=checkSoftNavsEnabled(oe);whenActivated(()=>{let Te=getVisibilityWatcher(),Ee=initMetric(`LCP`),De,ke=initUnique(oe,LCPEntryManager),Ae=(Se,ke,Ae,je,Me)=>{Ee=initMetric(`LCP`,-1,Se,ke,Ae,je,Me),De=bindReporter(te,Ee,LCPThresholds,oe.reportAllChanges),xe=!1,Se===`soft-navigation`&&(Te=getVisibilityWatcher(!0))},je=te=>{ke._softNavigationEntryMap&&te.navigationId&&storeSoftNavEntry(ke._softNavigationEntryMap,te),xe||De(!0),Ae(`soft-navigation`,te.navigationId,te.interactionId,te.name,te.startTime);let oe=te.getLargestInteractionContentfulPaint?.();oe&&Me([oe])},Me=te=>{!oe.reportAllChanges&&!Se&&(te=te.slice(-1));for(let oe of te){if(!oe)continue;if(oe.entryType===`soft-navigation`){je(oe);continue}let te=0,xe=[],Se=oe.startTime;if(oe.entryType===`largest-contentful-paint`)te=Math.max(oe.startTime-getActivationStart(),0),ke._processEntry(oe),xe=[oe];else if(oe.entryType===`interaction-contentful-paint`){let Te=oe;if(!Ee.navigationId||`interactionId`in Te&&Te.interactionId!=Ee.navigationInteractionId)continue;Se=Te.largestContentfulPaint?.renderTime||0,te=Math.max(Se-oe.startTime,0),Te.largestContentfulPaint&&(ke._processEntry(Te.largestContentfulPaint),xe=[Te.largestContentfulPaint])}Se<Te.firstHiddenTime&&(Ee.value=te,Ee.entries=xe,De())}},Ne=[`largest-contentful-paint`];Se&&Ne.push(`interaction-contentful-paint`,`soft-navigation`);let Pe=observe(Ne,Me);if(Pe){De=bindReporter(te,Ee,LCPThresholds,oe.reportAllChanges);let Te=[`keydown`,`click`,`visibilitychange`],ke=te=>{if(te.isTrusted&&!xe){let te=Ee.id;whenIdleOrHidden(()=>{if(!xe){if(!Se){Pe.disconnect();for(let te of Te)removeEventListener(te,ke,{capture:!0})}te===Ee.id&&(xe=!0,De(!0))}})}};for(let te of Te)addEventListener(te,ke,{capture:!0});onBFCacheRestore(Se=>{Ae(`back-forward-cache`,Ee.navigationId,Ee.navigationInteractionId,Ee.navigationURL,getBFCacheRestoreTime()),De=bindReporter(te,Ee,LCPThresholds,oe.reportAllChanges),doubleRAF(()=>{Ee.value=performance.now()-Se.timeStamp,xe=!0,De(!0)})})}})},TTFBThresholds=[800,1800],whenReady=te=>{document.prerendering?whenActivated(()=>whenReady(te)):document.readyState===`complete`?setTimeout(te):addEventListener(`load`,()=>whenReady(te),!0)},onTTFB=(te,oe={})=>{let xe=checkSoftNavsEnabled(oe),Se=initMetric(`TTFB`),Te=bindReporter(te,Se,TTFBThresholds,oe.reportAllChanges);whenReady(()=>{let Ee=getNavigationEntry();if(Ee){let De=Ee.responseStart;Se.value=Math.max(De-getActivationStart(),0),Se.entries=[Ee],Te(!0),onBFCacheRestore(()=>{Se=initMetric(`TTFB`,0,`back-forward-cache`,Se.navigationId,Se.navigationInteractionId,Se.navigationURL,getBFCacheRestoreTime()),Te=bindReporter(te,Se,TTFBThresholds,oe.reportAllChanges),Te(!0)}),xe&&observe([`soft-navigation`],xe=>{xe.forEach(xe=>{xe.navigationId&&(Se=initMetric(`TTFB`,0,`soft-navigation`,xe.navigationId,xe.interactionId,xe.name,xe.startTime),Se.entries=[xe],Te=bindReporter(te,Se,TTFBThresholds,oe.reportAllChanges),Te(!0))})},oe)}})},EARLY_VITALS=[`ttfb`,`fcp`];function vitalAttributes(te){let oe={};for(let[xe,Se]of Object.entries(te))typeof Se==`number`&&(oe[`browser.web_vital.${xe}`]=Se);return oe}function buildVitalsSpan(te){let oe=vitalAttributes(te.vitals);return Object.keys(oe).length===0?null:{name:te.routeName,startTimeUnixNano:te.rootStartTimeUnixNano,endTimeUnixNano:te.rootStartTimeUnixNano,attributes:{...te.contextAttributes,"flare.entry_point.handler.identifier":te.routeName,"http.route":te.routeName,"flare.route.source":te.routeSource,...oe}}}var collected={},subscribed=!1,recording=!1,taken=!1;function defaultSubscribers(){return{onTTFB:te=>onTTFB(te),onFCP:te=>onFCP(te),onLCP:te=>onLCP(te,{reportAllChanges:!0}),onCLS:te=>onCLS(te,{reportAllChanges:!0}),onINP:te=>onINP(te,{reportAllChanges:!0})}}function startWebVitals(te=defaultSubscribers()){recording=!0,subscribed||(subscribed=!0,subscribe(te.onTTFB,`ttfb`),subscribe(te.onFCP,`fcp`),subscribe(te.onLCP,`lcp`),subscribe(te.onCLS,`cls`),subscribe(te.onINP,`inp`))}function subscribe(te,oe){try{te(te=>record(oe,te))}catch{}}function record(te,oe){recording&&typeof oe?.value==`number`&&(collected[te]=oe.value)}function stopWebVitals(){recording=!1,collected={}}function takeEarlyVitals(){if(!recording)return null;let te={};for(let oe of EARLY_VITALS){let xe=collected[oe];xe!==void 0&&(te[oe]=xe,delete collected[oe])}return Object.keys(te).length===0?null:te}function takeWebVitals(){if(taken||!recording||Object.keys(collected).length===0)return null;taken=!0;let te=collected;return collected={},te}function restoreWebVitals(te){collected=te,taken=!1}var MAX_TRACKED_PARENTS=256,childIntervals=new Map;function trackChildInterval(te,oe,xe){let Se=childIntervals.get(te);Se?Se.push([oe,xe]):(evictLruIfNew(childIntervals,te,MAX_TRACKED_PARENTS),childIntervals.set(te,[[oe,xe]]))}function takeSelfTime(te,oe,xe){let Se=childIntervals.get(te);childIntervals.delete(te);let Te=xe-oe;return Se?Math.max(0,Te-coveredTime(Se,oe,xe)):Math.max(0,Te)}function resetComponentSelfTime(){childIntervals.clear()}function coveredTime(te,oe,xe){te.sort((te,oe)=>te[0]-oe[0]);let Se=0,Te=oe;for(let[oe,Ee]of te){let te=Math.max(oe,Te),De=Math.min(Ee,xe);De>te&&(Se+=De-te,Te=De)}return Se}var DEFAULT_IDLE_TIMEOUTS={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},IdleRootController=class{openChildren=0;lastChildEndTime=null;settleTime=null;idleTimer=null;finalTimer=null;childTimer=null;ended=!1;held=!1;unsubscribe;constructor(te,oe){this.deps=te,this.timeouts=oe,te.setActiveRoot(te.root),this.unsubscribe=te.addSpanListener(te=>this.onSpanEvent(te.phase,te.span));let xe=Math.max(0,(te.now()-te.rootStartTime)/1e6),Se=Math.max(0,oe.finalTimeout-xe);this.finalTimer=te.setTimeout(()=>this.finish(te.now()),Se),this.held=!!te.held,this.armIdle()}get isEnded(){return this.ended}endNow(){this.finish(this.openChildren>0||this.held?this.deps.now():this.trimmedEnd())}releaseHold(){!this.ended&&this.held&&(this.held=!1,this.openChildren===0&&(this.settleTime=this.deps.now()),this.armIdle())}onSpanEvent(te,oe){this.ended||oe!==this.deps.root&&oe.traceId===this.deps.root.traceId&&(te===`start`?this.onChildStarted():this.onChildEnded(oe))}onChildStarted(){this.openChildren++,this.clearIdle(),this.openChildren===1&&this.armChildTimeout()}onChildEnded(te){this.openChildren=Math.max(0,this.openChildren-1),this.lastChildEndTime=te.endTimeUnixNano||this.deps.now(),this.openChildren>0||(this.clearChildTimeout(),this.armIdle())}armIdle(){this.clearIdle(),this.held||(this.idleTimer=this.deps.setTimeout(()=>{this.openChildren>0||this.finish(this.trimmedEnd())},this.timeouts.idleTimeout))}trimmedEnd(){return Math.max(this.deps.endFloor(),this.settleTime??0,this.lastChildEndTime??0)}clearIdle(){this.idleTimer!==null&&(this.deps.clearTimeout(this.idleTimer),this.idleTimer=null)}armChildTimeout(){this.childTimer=this.deps.setTimeout(()=>this.finish(this.deps.now()),this.timeouts.childSpanTimeout)}clearChildTimeout(){this.childTimer!==null&&(this.deps.clearTimeout(this.childTimer),this.childTimer=null)}finish(te){this.ended||(this.ended=!0,te=Math.max(te,this.deps.rootStartTime),this.clearIdle(),this.clearChildTimeout(),this.finalTimer!==null&&(this.deps.clearTimeout(this.finalTimer),this.finalTimer=null),this.unsubscribe(),this.deps.beforeEnd?.(),this.deps.root.end(te),this.deps.setActiveRoot(void 0))}};function computePageloadStartNano(te,oe){return Math.round((te+(oe??0))*1e6)}function resolvePageloadStartNano(te,oe,xe,Se){return Se||oe-te>xe?oe:te}function navigationTiming(){let te=globalThis.performance;return!te||typeof te.getEntriesByType!=`function`||typeof te.timeOrigin!=`number`?null:te}function navigationEntry(te){return te.getEntriesByType(`navigation`)[0]}function pageloadStartNano(){let te=navigationTiming();return te?computePageloadStartNano(te.timeOrigin,navigationEntry(te)?.startTime):defaultNowNano()}function computePageloadEndNano(te,oe,xe,Se){let Te=oe||xe||0;return Te?Math.round((te+Te)*1e6):Se}function pageloadEndNano(){let te=navigationTiming();if(!te)return defaultNowNano();let oe=navigationEntry(te);return computePageloadEndNano(te.timeOrigin,oe?.loadEventEnd,oe?.domContentLoadedEventEnd,defaultNowNano())}var controller=null,uninstall=null,removeNavigationSubscription=null,pageloadTraced=!1,activeFlare=null,currentRoot=null,pendingRouteName=null,pendingRouteNameOwner=null,pageloadRoot=null,pageloadRootStartNano=0,pageloadRoute=null,pageloadContext={};function resolveTimeouts(te){return{idleTimeout:te.idleTimeout??DEFAULT_IDLE_TIMEOUTS.idleTimeout,finalTimeout:te.finalTimeout??DEFAULT_IDLE_TIMEOUTS.finalTimeout,childSpanTimeout:te.childSpanTimeout??DEFAULT_IDLE_TIMEOUTS.childSpanTimeout}}function withLiveController(te){if(controller&&!controller.isEnded)try{te(controller)}catch(te){activeFlare?.config.debug&&console.error(`Flare: browser tracing controller callback failed`,te)}}function ifRootLive(te){withLiveController(()=>te())}function startRoot(te,oe){let{spanType:xe,startTimeUnixNano:Se,name:Te=location.pathname,urlOverride:Ee,hold:De,backdated:ke}=oe,Ae;resetComponentSelfTime();try{let oe=collectBrowserSpanContext(te.config,Ee);Ae=te.startSpan(Te,{spanType:xe,startTimeUnixNano:Se,forceRoot:!0,attributes:{...oe,"flare.route.source":`url`}}),controller=new IdleRootController({root:Ae,addSpanListener:oe=>te.tracer.addSpanListener(oe),setActiveRoot:oe=>te.tracer.setActiveRoot(oe),now:defaultNowNano,setTimeout:(te,oe)=>setTimeout(te,oe),clearTimeout:te=>clearTimeout(te),rootStartTime:Se,endFloor:xe===BrowserSpanType.Pageload&&ke?pageloadEndNano:()=>Se,held:De,beforeEnd:xe===BrowserSpanType.Pageload?()=>stampEarlyVitals(Ae,te):void 0},resolveTimeouts(te.config)),currentRoot=Ae,xe===BrowserSpanType.Pageload&&(pageloadRoot=Ae,pageloadRootStartNano=Se,pageloadRoute={name:Te,source:`url`},pageloadContext={...oe})}catch(oe){controller=null,currentRoot=null,xe===BrowserSpanType.Pageload&&(pageloadRoot=null,pageloadRootStartNano=0,pageloadRoute=null,pageloadContext={});try{Ae?.end()}catch{}try{te.tracer.setActiveRoot(void 0)}catch{}te.config.debug&&console.error(`Flare: failed to start browser tracing root`,oe)}}function openNavigationRoot(te,oe){withLiveController(te=>te.endNow()),startRoot(te,{spanType:BrowserSpanType.Navigation,startTimeUnixNano:defaultNowNano(),name:oe.path,urlOverride:oe.url,hold:oe.hold})}function stampEarlyVitals(te,oe){try{let oe=takeEarlyVitals();if(!oe)return;for(let[xe,Se]of Object.entries(vitalAttributes(oe)))te.setAttribute(xe,Se)}catch(te){oe.config.debug&&console.error(`Flare: failed to stamp web vitals on the pageload root`,te)}}function emitWebVitals(te){let oe=pageloadRoot,xe=pageloadRoute;if(!oe||!xe)return;let Se=takeWebVitals();if(Se)try{let Te=buildVitalsSpan({vitals:Se,rootStartTimeUnixNano:pageloadRootStartNano,routeName:xe.name,routeSource:xe.source,contextAttributes:pageloadContext});if(!Te)return;te.startSpan(Te.name,{parent:oe,forceRoot:!0,spanType:BrowserSpanType.WebVital,startTimeUnixNano:Te.startTimeUnixNano,attributes:Te.attributes}).end(Te.endTimeUnixNano)}catch(oe){restoreWebVitals(Se),te.config.debug&&console.error(`Flare: failed to emit web vitals`,oe)}}function startBrowserTracing(te){if(typeof window>`u`||typeof history>`u`||typeof location>`u`||uninstall)return;activeFlare=te,removeNavigationSubscription=subscribeToNavigation({onUrlChanged:oe=>openNavigationRoot(te,{path:oe}),onNavigationStart:oe=>openNavigationRoot(te,oe),onRouteName:(te,oe)=>applyRouteName(te,oe),onNavigationSettle:(te,oe)=>{applyRouteName(te,oe),withLiveController(te=>te.releaseHold())},onSourceUnregistered:()=>{withLiveController(te=>te.releaseHold()),pendingRouteName=null,pendingRouteNameOwner=null}});let oe=resolveTimeouts(te.config).finalTimeout*1e6,xe=pageloadStartNano(),Se=resolvePageloadStartNano(xe,defaultNowNano(),oe,pageloadTraced);if(pageloadTraced=!0,startRoot(te,{spanType:BrowserSpanType.Pageload,startTimeUnixNano:Se,backdated:Se===xe}),startWebVitals(),pendingRouteName){let te=pendingRouteName,oe=pendingRouteNameOwner;pendingRouteName=null,pendingRouteNameOwner=null,isActiveNavigationSource(oe)&&applyRouteName(te)}function Te(){if(controller&&!controller.isEnded)try{controller.endNow()}catch(oe){te.config.debug&&console.error(`Flare: failed to end tracing root on page hide`,oe)}emitWebVitals(te);try{te.tracer.flush({keepalive:!0})}catch(oe){te.config.debug&&console.error(`Flare: failed to flush spans on page hide`,oe)}}let Ee=()=>Te(),De=()=>{document.visibilityState===`hidden`&&Te()};window.addEventListener(`pagehide`,Ee),document.addEventListener(`visibilitychange`,De),uninstall=()=>{window.removeEventListener(`pagehide`,Ee),document.removeEventListener(`visibilitychange`,De)}}function stopBrowserTracing(){withLiveController(te=>te.endNow()),controller=null,uninstall&&=(uninstall(),null),removeNavigationSubscription?.(),removeNavigationSubscription=null,activeFlare=null,currentRoot=null,pendingRouteName=null,pendingRouteNameOwner=null,stopWebVitals(),resetComponentSelfTime(),pageloadRoot=null,pageloadRootStartNano=0,pageloadRoute=null,pageloadContext={}}function urlAttributesFor(te){if(te.url===void 0||!activeFlare)return null;try{return browserSpanUrlAttributes(activeFlare.config,te.url)}catch{return null}}function applyRouteName(te,oe){let xe=currentRoot;if(!xe){pendingRouteName=te,pendingRouteNameOwner=oe??null;return}let Se=urlAttributesFor(te);ifRootLive(()=>{if(xe.name=te.name,xe.setAttribute(`flare.entry_point.handler.identifier`,te.name),xe.setAttribute(`http.route`,te.name),xe.setAttribute(`flare.route.source`,te.source),Se)for(let[te,oe]of Object.entries(Se))xe.setAttribute(te,oe)}),xe===pageloadRoot&&(pageloadRoute={name:te.name,source:te.source},Se&&(pageloadContext={...pageloadContext,...Se}))}function activeTracingFlare(){return activeFlare}var nowNano=defaultNowNano;function reserveSpanId(te){return te!==void 0&&!activeTracingFlare()?.tracer.claimSpanSlot(te)?null:spanId()}function activeComponentRoot(){try{let te=activeTracingFlare()?.tracer.getActiveSpan();return!te||!te.isRecording?null:{traceId:te.traceId,parentSpanId:te.spanId}}catch{return null}}function resolveComponentParent(te,oe){return te&&oe&&te.traceId===oe.traceId?te:oe}function recordComponentSpan(te){try{let oe=activeTracingFlare();if(!oe)return;let xe=oe.tracer.getActiveSpan();if(!xe||xe.traceId!==te.parent.traceId||!xe.isRecording)return;let Se=takeSelfTime(te.spanId,te.startTimeUnixNano,te.endTimeUnixNano);oe.startSpan(te.name,{spanId:te.spanId,parent:{traceId:te.parent.traceId,spanId:te.parent.parentSpanId},spanType:BrowserSpanType.Component,startTimeUnixNano:te.startTimeUnixNano,attributes:{...te.attributes,"flare.component.name":te.name,"flare.component.self_time_ns":Se},claimed:!0}).end(te.endTimeUnixNano),trackChildInterval(te.parent.parentSpanId,te.startTimeUnixNano,te.endTimeUnixNano)}catch{}}function isDevMode(){try{return!1}catch{return!1}}function createFlareResolver(te){let{packageName:oe}=te,xe=te.injectInstruction??`Import ${oe}/inject and pass the @flareapp/electron/renderer instance instead.`,Se=null;function Te(te){if(typeof window<`u`&&window.__flare){let te=`[flare] ${oe} (web root) was imported in a renderer where the Electron bridge is present, pulling the keyed @flareapp/js singleton into the renderer. `+xe;if(isDevMode())throw Error(te);console.warn(te)}Se=te}function Ee(te){if(te)return te;if(Se)return Se();throw Error(`[flare] No Flare instance available. Pass \`flare\` (e.g. from @flareapp/electron/renderer), or import ${oe} (the package root) to use the @flareapp/js default singleton.`)}return{registerDefaultFlare:Te,resolveFlare:Ee}}function catchWindowErrors(){typeof window<`u`&&(window.addEventListener(`error`,te=>{let oe=window.flare;oe&&te.error instanceof Error&&oe.reportSilently(te.error)}),window.addEventListener(`unhandledrejection`,te=>{let oe=window.flare;oe&&routeRejection(oe,te.reason)}))}var Flare=class extends Flare$1{constructor(te=new Api,oe=collectBrowser,xe=new FetchFileReader,Se=new GlobalScopeProvider){super(te,oe,xe,Se,new BrowserFlushScheduler),this.setSdkInfo({name:`@flareapp/js`,version:CLIENT_VERSION}),this.setFramework({name:FrameworkName.Js})}removeTracingSubscription=null;stopBreadcrumbs=null;configure(te){let oe=this.config.enableTracing,xe=this.config.enableBreadcrumbs;super.configure(te);let Se=this.config.enableTracing,Te=this.config.enableBreadcrumbs;return!xe&&Te?this.stopBreadcrumbs=startBreadcrumbs({config:()=>this.config,record:(te,oe,xe)=>this.addBreadcrumb(te,oe,xe)}):xe&&!Te&&(this.stopBreadcrumbs?.(),this.stopBreadcrumbs=null),!oe&&Se?(this.removeTracingSubscription=withRequestPatches(()=>traceRequests(this,browserUrlContext())),startBrowserTracing(this)):oe&&!Se&&(stopBrowserTracing(),this.removeTracingSubscription?.(),this.removeTracingSubscription=null),this}},flare=new Flare;typeof window<`u`&&window&&(window.flare=flare,catchWindowErrors());var ignoreList=`fancybox,jQuery,Modernizr,cssua,ScrollTrigger,calcSelectArrowDimensions,this.elements.$menu.smartmenus,woocommerce,elementor,avadaAddQuantityBoxes,fusion,FLBuilderAccordion,_initLayerSlider,Divi,gsap,Swiper,mailchimp,_AutofillCallbackHandler,$(...),imagesLoaded,masonry,accessing a cross-origin frame,scrollspy,No layout mode: packery,Vimeo,Network Error,Request aborted,timeout exceeded,Loading chunk,TrackerStorageType,Failed to load because no supported source was found.,The element has no supported sources.,grecaptcha,reCAPTCHA Timeout,lightbox,priceCalcElement,AwesomeMenu,breakdance,Maximum call stack size exceeded.,Cookies is not defined,getUniqId,Cannot read properties of null (reading 'classList'),n.getModal,e.target.closest is not a function,Cannot read properties of undefined (reading 'Item'),Cannot read properties of undefined (reading 'clientHeight'),refreshFsLightbox,fbq,FacebookSignal,Cannot assign to read only property 'push' of object '[object Array]',naturalWidth,Request failed with status code,Can't find variable: _,astraNavMenuTogglePro,The operation was aborted.,Failed to fetch dynamically imported module:,Importing a module script failed.,The request is not allowed by the user agent,this.Vi.close,The operation is insecure.,gformValidateFileSize,BreakdanceEntrance,Cannot read properties of undefined (reading '__'),The play() request was interrupted because video-only,Animation is interrupted by user input.,Animation is already playing.,Position "NaN" is not reachable.,Cannot redefine property: onbeforeunload,e.remove is not a function,Can't find variable: Cookies,Load failed,wp is not defined,Backbone,Invalid attempt to destructure non-iterable instance,Can't find variable: EmptyRanges,Cannot read properties of undefined (reading 'setLocaleData'),Function snaptr not implemented.,window.sbi_init is not a function,thehotelsnetwork,Reepay,wpcf7,et_pb_,mediaelementplayer,pys_generate_token,webkit.messageHandlers,__firefox__,window.ethereum,Blocked a frame with origin,NetworkError when attempting to fetch resource,play() failed because the user didn,Error invoking postMessage: Java exception,Failed to load CSS,Failed to load script,removeAttribute is not a function,Invalid site key,Handling is disabled`.split(`,`);/(meta-external|facebookexternalhit|googlebot|bingbot|slurp|duckduckbot|baiduspider|yandexbot|twitterbot|linkedinbot|semrushbot|ahrefsbot|applebot|bytespider|crawler|spider|HeadlessChrome|lightpanda)/i.test(navigator.userAgent)||(flare.light(`5pqzBljrmDvquWZYSrSUKldIUREtPyB3`),flare.addContext(`version`,`4.11.3`),flare.configure({beforeEvaluate:te=>{for(let oe=0;oe<ignoreList.length;oe++)if(te.message.toLowerCase().includes(ignoreList[oe].toLowerCase()))return!1;return te}}));var{registerDefaultFlare,resolveFlare}=createFlareResolver({packageName:`@flareapp/vue`}),PACKAGE_VERSION=`2.13.0`,MAX_HIERARCHY_DEPTH=50,DEFAULT_PROPS_DENYLIST=/password|passwd|pwd|token|secret|authorization|\bauth\b|bearer|oauth|credentials?|cookie|api[-_]?key|private[-_]?key|session|csrf|xsrf|\bpin\b|\bssn\b|card[-_]?number|\bcvv\b/i;function resolveDenylist$1(te,oe=!1){return resolveDenylist(te,oe,DEFAULT_PROPS_DENYLIST)}var MAX_PROP_STRING_LENGTH=1e3,MAX_PROP_ARRAY_LENGTH=100,MAX_PROP_OBJECT_KEYS=100,INFO_TO_ORIGIN={"setup function":`setup`,"render function":`render`,"component update":`render`,"watcher getter":`watcher`,"watcher callback":`watcher`,"watcher cleanup function":`watcher`,"native event handler":`event`,"component event handler":`event`,"beforeCreate hook":`lifecycle`,"created hook":`lifecycle`,"beforeMount hook":`lifecycle`,"mounted hook":`lifecycle`,"beforeUpdate hook":`lifecycle`,"updated hook":`lifecycle`,"beforeUnmount hook":`lifecycle`,"unmounted hook":`lifecycle`,"activated hook":`lifecycle`,"deactivated hook":`lifecycle`,"errorCaptured hook":`lifecycle`,"renderTracked hook":`lifecycle`,"renderTriggered hook":`lifecycle`,"serverPrefetch hook":`lifecycle`,"vnode hook":`lifecycle`,"directive hook":`lifecycle`,"transition hook":`lifecycle`,"ref function":`setup`,"async component loader":`setup`,"scheduler flush":`render`,"app errorHandler":`lifecycle`,"app warnHandler":`lifecycle`,"app unmount cleanup function":`lifecycle`,0:`setup`,1:`render`,2:`watcher`,3:`watcher`,4:`watcher`,5:`event`,6:`event`,7:`lifecycle`,8:`lifecycle`,9:`lifecycle`,10:`lifecycle`,11:`lifecycle`,12:`setup`,13:`setup`,14:`render`,15:`render`,16:`lifecycle`,sp:`lifecycle`,bc:`lifecycle`,c:`lifecycle`,bm:`lifecycle`,m:`lifecycle`,bu:`lifecycle`,u:`lifecycle`,bum:`lifecycle`,um:`lifecycle`,a:`lifecycle`,da:`lifecycle`,ec:`lifecycle`,rtc:`lifecycle`,rtg:`lifecycle`};function getComponentName(te){if(!te)return`AnonymousComponent`;let oe=te.$options;return oe.__name||oe.name||`AnonymousComponent`}function buildComponentHierarchy(te){let oe=[],xe=te;for(;xe&&oe.length<MAX_HIERARCHY_DEPTH;)oe.push(getComponentName(xe)),xe=xe.$parent;return oe}function serializeProps(te,oe,xe=DEFAULT_PROPS_DENYLIST){return safeClone(te,{mode:`display`,maxDepth:oe,arrayCap:MAX_PROP_ARRAY_LENGTH,objectKeyCap:MAX_PROP_OBJECT_KEYS,stringCap:MAX_PROP_STRING_LENGTH,denylist:xe})}function buildComponentHierarchyFrames(te,oe){let xe=[],Se=te;for(;Se&&xe.length<MAX_HIERARCHY_DEPTH;){let te=Se.$options,Te={component:getComponentName(Se),file:te.__file??null};oe.attachProps&&Se.$props&&(Te.props=serializeProps(Se.$props,oe.propsMaxDepth,oe.propsDenylist)),xe.push(Te),Se=Se.$parent}return xe}function getErrorOrigin(te){return INFO_TO_ORIGIN[te]??`unknown`}var ROUTE_PARAMS_DEPTH=2;function routeNameOf(te){return typeof te==`string`?te:typeof te==`symbol`?te.toString():null}function matchedNames(te){return Array.isArray(te)?te.map(te=>!te||typeof te!=`object`?`unknown`:routeNameOf(te.name)??`unknown`):[]}function recordOrEmpty(te){return!te||typeof te!=`object`?{}:te}function getRouteContext(te,oe={}){if(!te||typeof te!=`object`||!(`currentRoute`in te))return null;let xe=te.currentRoute;if(!xe||typeof xe!=`object`||!(`value`in xe))return null;let Se=xe.value;if(!Se||typeof Se!=`object`)return null;let Te=Se,Ee=oe.denylist??DEFAULT_PROPS_DENYLIST,De=redactObjectValues(recordOrEmpty(Te.params),Ee),ke=redactObjectValues(recordOrEmpty(Te.query),Ee);return{name:routeNameOf(Te.name),path:typeof Te.path==`string`?Te.path:``,fullPath:typeof Te.fullPath==`string`?redactUrlQuery(Te.fullPath,Ee):``,params:serializeProps(De,ROUTE_PARAMS_DEPTH,Ee),query:serializeProps(ke,ROUTE_PARAMS_DEPTH,Ee),hash:typeof Te.hash==`string`?Te.hash:``,matched:matchedNames(Te.matched)}}var tagger=createIdentityTagger({sdkName:`@flareapp/vue`,sdkVersion:PACKAGE_VERSION,frameworkName:FrameworkName.Vue});function registerVueSdkInfo(te){tagger.registerSdkIdentity(te)}function tagVueFramework(te,oe){tagger.tagFramework(te,oe)}var PROFILE=Symbol(`flareComponentProfile`);function nearestMarker(te){for(let oe=te.parent;oe;oe=oe.parent){let te=oe[PROFILE];if(te)return te.marker}return null}function createComponentProfilerMixin(te){return{beforeMount(){try{let oe=activeComponentRoot();if(!oe)return;let xe=getComponentName(this);if(!te(xe))return;let Se=this.$,Te=resolveComponentParent(nearestMarker(Se),oe)??oe,Ee=reserveSpanId(Te.traceId);if(!Ee)return;Se[PROFILE]={marker:{traceId:Te.traceId,parentSpanId:Ee},pending:{name:xe,spanId:Ee,startNano:nowNano(),parent:Te}}}catch{}},mounted(){try{let te=this.$[PROFILE],oe=te?.pending;if(!te||!oe)return;te.pending=null,recordComponentSpan({name:oe.name,spanId:oe.spanId,parent:oe.parent,startTimeUnixNano:oe.startNano,endTimeUnixNano:nowNano()})}catch{}}}}var NAVIGATION_CANCELLED=8;function traceVueRouter(te,oe={}){return isVueRouter(te)?instrumentOnce(te,xe=>install(te,xe,oe)):()=>{}}function isVueRouter(te){return typeof te!=`object`||!te?!1:`beforeEach`in te&&typeof te.beforeEach==`function`&&`afterEach`in te&&typeof te.afterEach==`function`}function install(te,oe,xe){let Se=registerNavigationSource();oe(()=>Se.unregister());let Te=xe.includeRouterBase?normalizeRouteBase(te.options?.history?.base):``;function Ee(te){return routeName(()=>te.matched?.[te.matched.length-1]?.path,te.path,De(te),Te)}function De(oe){let xe=oe.fullPath??oe.path;if(xe)return resolveHref(()=>te.resolve?.(xe)?.href,xe)}function ke(te){return!te||!te.matched||te.matched.length===0}let Ae=!1,je=!1;try{let oe=te.currentRoute?.value;oe&&oe.matched&&oe.matched.length>0&&(Se.setActiveRouteName(Ee(oe)),Ae=!0)}catch{}oe(te.beforeEach(insulate((te,oe)=>{!Ae&&ke(oe)?Se.setActiveRouteName(Ee(te)):te.fullPath&&oe?.fullPath&&te.fullPath===oe.fullPath||(je||(je=!0,Se.startNavigation({path:te.path,url:De(te),hold:!0})),Se.setActiveRouteName(Ee(te)))}))),oe(te.afterEach(insulate((te,oe,xe)=>{!Ae&&ke(oe)?xe||(Ae=!0,Se.setActiveRouteName(Ee(te))):je&&(xe?xe.type!==NAVIGATION_CANCELLED&&(je=!1,Se.settleNavigation(Ee(oe))):(je=!1,Se.settleNavigation(Ee(te))))}))),typeof te.onError==`function`&&oe(te.onError(insulate(()=>{if(!je)return;je=!1;let oe=te.currentRoute?.value;Se.settleNavigation(oe?Ee(oe):{name:``,source:`url`})})))}function vueContextToAttributes(te){let oe={info:te.vue.info,errorOrigin:te.vue.errorOrigin,componentName:te.vue.componentName,componentHierarchy:te.vue.componentHierarchy,componentHierarchyFrames:te.vue.componentHierarchyFrames};return te.vue.componentProps&&(oe.componentProps=te.vue.componentProps),te.vue.route&&(oe.route=te.vue.route),toCustomContext(`vue`,oe)}function vueWarningContextToAttributes(te){let oe={type:te.vue.type,info:te.vue.info,componentName:te.vue.componentName,componentTrace:te.vue.componentTrace};return te.vue.route&&(oe.route=te.vue.route),toCustomContext(`vue`,oe)}var installedApps=new WeakSet,flareVue=(te,oe)=>{if(installedApps.has(te))return;let xe=resolveFlare(oe?.flare);installedApps.add(te),oe?.flare||registerVueSdkInfo(xe),tagVueFramework(xe,te.version);let Se=oe?.attachProps??!1,Te=oe?.propsMaxDepth??2,Ee=resolveDenylist$1(oe?.propsDenylist,oe?.replaceDefaultDenylist),De=te.config.errorHandler;if(te.config.errorHandler=(ke,Ae,je)=>{let Me=convertToError(ke);oe?.beforeEvaluate?.({error:Me,instance:Ae,info:je});let Ne=getErrorOrigin(je),Pe=getComponentName(Ae),Fe=Se&&Ae?.$props?serializeProps(Ae.$props,Te,Ee):void 0,Ie=buildComponentHierarchy(Ae),Le=buildComponentHierarchyFrames(Ae,{attachProps:Se,propsMaxDepth:Te,propsDenylist:Ee}),Re=getRouteContext(te.config.globalProperties.$router,{denylist:Ee}),ze={vue:{info:je,errorOrigin:Ne,componentName:Pe,...Fe&&{componentProps:Fe},componentHierarchy:Ie,componentHierarchyFrames:Le,...Re&&{route:Re}}},Be=oe?.beforeSubmit?.({error:Me,instance:Ae,info:je,context:ze})??ze;xe.reportSilently(Me,vueContextToAttributes(Be)),oe?.afterSubmit?.({error:Me,instance:Ae,info:je,context:Be}),typeof De==`function`?De(ke,Ae,je):console.error(ke)},oe?.captureWarnings){let oe=te.config.warnHandler;te.config.warnHandler=(Se,Te,De)=>{let ke=getComponentName(Te),Ae=getRouteContext(te.config.globalProperties.$router,{denylist:Ee}),je={vue:{type:`warning`,info:Se,componentName:ke,componentTrace:De,...Ae&&{route:Ae}}};Promise.resolve(xe.reportMessage(Se,`warning`,vueWarningContextToAttributes(je))).catch(()=>{}),typeof oe==`function`&&oe(Se,Te,De)}}if(oe?.router)try{let xe=traceVueRouter(oe.router,{includeRouterBase:oe.includeRouterBase});typeof te.onUnmount==`function`&&te.onUnmount(xe)}catch{}let ke=oe?.profileComponents;if(ke===!0||Array.isArray(ke)&&ke.length>0)try{te.mixin(createComponentProfilerMixin(createComponentMatcher(ke)))}catch{}},FlareErrorBoundary=defineComponent({name:`FlareErrorBoundary`,props:{flare:{type:Object,default:void 0},beforeEvaluate:{type:Function,default:void 0},beforeSubmit:{type:Function,default:void 0},afterSubmit:{type:Function,default:void 0},onReset:{type:Function,default:void 0},resetKeys:{type:Array,default:void 0},attachProps:{type:Boolean,default:!1},propsMaxDepth:{type:Number,default:2},propsDenylist:{type:RegExp,default:void 0},replaceDefaultDenylist:{type:Boolean,default:!1}},setup(te,{slots:oe}){let xe=resolveFlare(te.flare);tagVueFramework(xe,getCurrentInstance$1()?.appContext.app.version);let Se=getCurrentInstance$1(),Te=ref(null),Ee=ref(void 0),De=ref([]),ke=ref([]),Ae=()=>{te.onReset?.(Te.value),Te.value=null,Ee.value=void 0,De.value=[],ke.value=[]};return watch(()=>te.resetKeys,(te,oe)=>{if(Te.value===null||!te||!oe)return;let xe=oe.length!==te.length,Se=te.some((te,xe)=>!Object.is(te,oe[xe]));(xe||Se)&&Ae()}),onErrorCaptured((oe,Ae,je)=>{let Me=convertToError(oe);te.beforeEvaluate?.({error:Me,instance:Ae,info:je});let Ne=resolveDenylist$1(te.propsDenylist,te.replaceDefaultDenylist),Pe=buildComponentHierarchy(Ae),Fe=buildComponentHierarchyFrames(Ae,{attachProps:te.attachProps,propsMaxDepth:te.propsMaxDepth,propsDenylist:Ne}),Ie=getComponentName(Ae);Te.value=Me;let Le=te.attachProps&&Ae?.$props?serializeProps(Ae.$props,te.propsMaxDepth,Ne):void 0,Re=getErrorOrigin(je),ze=getRouteContext(Se?.appContext.config.globalProperties.$router,{denylist:Ne}),Be={vue:{info:je,errorOrigin:Re,...ze&&{route:ze},componentName:Ie,...Le&&{componentProps:Le},componentHierarchy:Pe,componentHierarchyFrames:Fe}},Ve=te.beforeSubmit?.({error:Me,instance:Ae,info:je,context:Be})??Be;return Ee.value=Ve.vue.componentProps,De.value=Ve.vue.componentHierarchy,ke.value=Ve.vue.componentHierarchyFrames,xe.reportSilently(Me,vueContextToAttributes(Ve)),te.afterSubmit?.({error:Me,instance:Ae,info:je,context:Ve}),!1}),()=>Te.value===null?oe.default?.():oe.fallback?oe.fallback({error:Te.value,...Ee.value&&{componentProps:Ee.value},componentHierarchy:De.value,componentHierarchyFrames:ke.value,resetErrorBoundary:Ae}):null}});registerDefaultFlare(()=>flare);var a=Object.defineProperty,c=(te,oe,xe)=>oe in te?a(te,oe,{enumerable:!0,configurable:!0,writable:!0,value:xe}):te[oe]=xe,o=(te,oe,xe)=>(c(te,typeof oe==`symbol`?oe:oe+``,xe),xe),namespace=`@@vue3-sticky-directive`,events=[`resize`,`scroll`,`touchstart`,`touchmove`,`touchend`,`pageshow`,`load`],batchStyle=(te,oe={},xe={})=>{for(let xe in oe)te.style[xe]=oe[xe];for(let oe in xe)xe[oe]&&!te.classList.contains(oe)?te.classList.add(oe):!xe[oe]&&te.classList.contains(oe)&&te.classList.remove(oe)},Sticky=class{constructor(te,oe){o(this,`el`),o(this,`vm`),o(this,`unSubscribers`),o(this,`isPending`),o(this,`state`),o(this,`lastState`),o(this,`options`),o(this,`placeholderEl`),o(this,`containerEl`),this.el=te,this.vm=oe,this.unSubscribers=[],this.isPending=!1,this.state={isTopSticky:null,isBottomSticky:null,height:null,width:null,xOffset:null},this.lastState={top:null,bottom:null,sticked:!1};let xe=this.getAttribute(`sticky-offset`)||{},Se=this.getAttribute(`sticky-side`)||`top`,Te=this.getAttribute(`sticky-z-index`)||`10`,Ee=this.getAttribute(`on-stick`)||null;this.options={topOffset:Number(xe.top)||0,bottomOffset:Number(xe.bottom)||0,shouldTopSticky:Se===`top`||Se===`both`,shouldBottomSticky:Se===`bottom`||Se===`both`,zIndex:Te,onStick:Ee}}doBind(){if(this.unSubscribers.length>0)return;let{el:te,vm:oe}=this;oe.$nextTick(()=>{this.placeholderEl=document.createElement(`div`),this.containerEl=this.getContainerEl(),te.parentElement.insertBefore(this.placeholderEl,te),events.forEach(te=>{let oe=this.update.bind(this);this.unSubscribers.push(()=>window.removeEventListener(te,oe)),this.unSubscribers.push(()=>this.containerEl.removeEventListener(te,oe)),window.addEventListener(te,oe,{passive:!0}),this.containerEl.addEventListener(te,oe,{passive:!0})})})}doUnbind(){this.unSubscribers.forEach(te=>te()),this.unSubscribers=[],this.resetElement()}update(){this.isPending||=(requestAnimationFrame(()=>{this.isPending=!1,this.recomputeState(),this.updateElements()}),!0)}isTopSticky(){if(!this.options.shouldTopSticky)return!1;let te=this.state.placeholderElRect.top,oe=this.state.containerElRect.bottom,xe=this.options.topOffset,Se=this.options.bottomOffset;return te<=xe&&oe>=Se}isBottomSticky(){if(!this.options.shouldBottomSticky)return!1;let te=window.innerHeight-this.state.placeholderElRect.top-this.state.height,oe=window.innerHeight-this.state.containerElRect.top,xe=this.options.topOffset;return te<=this.options.bottomOffset&&oe>=xe}recomputeState(){this.state=Object.assign({},this.state,{height:this.getHeight(),width:this.getWidth(),xOffset:this.getXOffset(),placeholderElRect:this.getPlaceholderElRect(),containerElRect:this.getContainerElRect()}),this.state.isTopSticky=this.isTopSticky(),this.state.isBottomSticky=this.isBottomSticky()}fireEvents(){typeof this.options.onStick==`function`&&(this.lastState.top!==this.state.isTopSticky||this.lastState.bottom!==this.state.isBottomSticky||this.lastState.sticked!==(this.state.isTopSticky||this.state.isBottomSticky))&&(this.lastState={top:this.state.isTopSticky,bottom:this.state.isBottomSticky,sticked:this.state.isBottomSticky||this.state.isTopSticky},this.options.onStick(this.lastState))}updateElements(){let te={paddingTop:0},oe={position:`static`,top:`auto`,bottom:`auto`,left:`auto`,width:`auto`,zIndex:this.options.zIndex},xe={"vue-sticky-placeholder":!0},Se={"vue-sticky-el":!0,"top-sticky":!1,"bottom-sticky":!1};if(this.state.isTopSticky){oe.position=`fixed`,oe.top=this.options.topOffset+`px`,oe.left=this.state.xOffset+`px`,oe.width=this.state.width+`px`;let xe=this.state.containerElRect.bottom-this.state.height-this.options.bottomOffset-this.options.topOffset;xe<0&&(oe.top=xe+this.options.topOffset+`px`),te.paddingTop=this.state.height+`px`,Se[`top-sticky`]=!0}else if(this.state.isBottomSticky){oe.position=`fixed`,oe.bottom=this.options.bottomOffset+`px`,oe.left=this.state.xOffset+`px`,oe.width=this.state.width+`px`;let xe=window.innerHeight-this.state.containerElRect.top-this.state.height-this.options.bottomOffset-this.options.topOffset;xe<0&&(oe.bottom=xe+this.options.bottomOffset+`px`),te.paddingTop=this.state.height+`px`,Se[`bottom-sticky`]=!0}else te.paddingTop=0;batchStyle(this.el,oe,Se),batchStyle(this.placeholderEl,te,xe),this.fireEvents()}resetElement(){[`position`,`top`,`bottom`,`left`,`width`,`zIndex`].forEach(te=>{this.el.style.removeProperty(te)}),this.el.classList.remove(`bottom-sticky`,`top-sticky`);let{parentElement:te}=this.placeholderEl;te&&te.removeChild(this.placeholderEl)}getContainerEl(){let te=this.el.parentElement;for(;te&&te.tagName!==`HTML`&&te.tagName!==`BODY`&&te.nodeType===1;){if(te.hasAttribute(`sticky-container`))return te;te=te.parentElement}return this.el.parentElement}getXOffset(){return this.placeholderEl.getBoundingClientRect().left}getWidth(){return this.placeholderEl.getBoundingClientRect().width}getHeight(){return this.el.getBoundingClientRect().height}getPlaceholderElRect(){return this.placeholderEl.getBoundingClientRect()}getContainerElRect(){return this.containerEl.getBoundingClientRect()}getAttribute(name){const expr=this.el.getAttribute(name);let result;if(expr){if(this.vm[expr])result=this.vm[expr];else try{result=eval(`(${expr})`)}catch{result=expr}}return result}},Sticky$1={mounted(te,oe){(typeof oe.value>`u`||oe.value)&&(te[namespace]=new Sticky(te,oe.instance),te[namespace].doBind())},unmounted(te){te[namespace]&&(te[namespace].doUnbind(),te[namespace]=void 0)},updated(te,oe){typeof oe.value>`u`||oe.value?(te[namespace]||(te[namespace]=new Sticky(te,oe.instance)),te[namespace].doBind()):te[namespace]&&te[namespace].doUnbind()}},StickyPlugin={install(te){te.directive(`Sticky`,Sticky$1)}},pinia=createPinia(),event_default=defineKonnectioElement(`konnectio-event`,Event_default,te=>{te.use(flareVue),te.use(instance),te.use(pinia),te.use(plugin),te.use(StickyPlugin)});return event_default})();
|
|
1132
|
+
How to fix: use one Flare instance, and check your bundle for two copies of @flareapp/js.`,`background:#e11d48;color:#fff;font-weight:bold;font-size:14px;padding:2px 6px`,`color:#e11d48;font-size:13px`),mutator=te,()=>{mutator===te&&(mutator=null)}}function hasRequestSubscribers(){return subscribers.size>0||mutator!==null}function publishRequestStart(te){let oe=[];for(let xe of subscribers)try{let Se=xe(te);Se&&oe.push(Se)}catch{}let xe=te.init,Se;if(mutator)try{let Te=mutator(te);Te&&(oe.push(Te),Te.init!==void 0&&(xe=Te.init),Se=Te.headers)}catch{}return oe.length===0&&xe===te.init&&Se===void 0?null:{init:xe,headers:Se,settle(te){for(let xe of oe)try{xe.onSettle?.(te)}catch{}}}}var INTERNAL_REQUEST_KEY=`__flare_internal_request__`;function internalRequestInit(te){return{...te,[INTERNAL_REQUEST_KEY]:!0}}function isInternalRequest(te){return te?.[INTERNAL_REQUEST_KEY]===!0}function isNativeFetch(te){return typeof te==`function`&&/native code/.test(Function.prototype.toString.call(te))}function supportsNativeFetch(){let te=globalThis;if(typeof te.fetch!=`function`)return!1;if(isNativeFetch(te.fetch))return!0;let oe=!1,xe=te.document;if(xe&&typeof xe.createElement==`function`){let te=null;try{te=xe.createElement(`iframe`),te.hidden=!0,xe.head.appendChild(te);let Se=te.contentWindow;Se&&typeof Se.fetch==`function`&&(oe=isNativeFetch(Se.fetch))}catch{oe=!1}finally{try{te?.remove()}catch{}}}return oe}function createPatcher(){let te=!1,oe=[];return{get installed(){return te},install(xe,Se){if(te)return;function Te(te){let oe=Se[te];oe&&fill(xe,te,oe)}oe=Object.keys(Se);for(let te of oe)Te(te);te=!0},uninstall(xe){if(te&&oe.every(te=>{let oe=xe[te];return typeof oe!=`function`||!!oe.__flare_original__})){for(let te of oe)unfill(xe,te);te=!1}}}}function resolveRequest(te,oe){let xe,Se=oe?.method;return typeof Request<`u`&&te instanceof Request?(xe=te.url,Se??=te.method):xe=typeof te==`string`?te:String(te),{method:(Se??`GET`).toUpperCase(),url:xe}}function createFetchWrapper(te){return function(oe,xe){let Se=xe=>te.call(this,oe,xe),Te=null;try{if(hasRequestSubscribers()&&!isInternalRequest(xe)){let te=resolveRequest(oe,xe);Te=publishRequestStart({kind:`fetch`,method:te.method,url:te.url,input:oe,init:xe})}}catch{Te=null}if(!Te)return Se(xe);let Ee=Te.settle,De=te=>(Ee({error:te}),Promise.reject(te)),ke;try{ke=Se(Te.init)}catch(te){return De(te)}return ke.then(te=>(Ee({status:te.status}),te),De)}}var patcher$1=createPatcher();function instrumentFetch(){if(patcher$1.installed)return;let te=globalThis;typeof te.fetch==`function`&&supportsNativeFetch()&&patcher$1.install(te,{fetch:te=>createFetchWrapper(te)})}function unpatchFetch(){patcher$1.uninstall(globalThis)}var XHR_DONE=4,xhrState=new WeakMap;function releaseRequestRefs(te){te.watched=void 0,te.onDone=void 0}function settleOnce(te,oe){te.ended=!0,te.watched?.settle(oe),releaseRequestRefs(te)}function createXHROpen(te){return function(oe,xe,...Se){let Te=xhrState.get(this);Te&&Te.watched&&!Te.ended&&(Te.onDone&&this.removeEventListener(`readystatechange`,Te.onDone),settleOnce(Te,{aborted:!0}));try{oe&&xe!=null?xhrState.set(this,{method:String(oe).toUpperCase(),url:String(xe),appHeaders:new Set,ended:!1}):xhrState.delete(this)}catch{xhrState.delete(this)}return te.apply(this,[oe,xe,...Se])}}function createXHRSetRequestHeader(te){return function(oe,xe){te.call(this,oe,xe),typeof oe==`string`&&xhrState.get(this)?.appHeaders.add(oe.toLowerCase())}}function applyHeaders(te,oe){let xe=oe.watched?.headers;if(xe){for(let[Se,Te]of Object.entries(xe))if(!oe.appHeaders.has(Se.toLowerCase()))try{te.setRequestHeader(Se,Te)}catch{}}}function createXHRSend(te){return function(oe){let xe=()=>te.call(this,oe),Se=xhrState.get(this);if(!Se||!hasRequestSubscribers()||Se.ended)return xe();let Te=null;try{Te=publishRequestStart({kind:`xhr`,method:Se.method,url:Se.url})}catch{Te=null}if(!Te)return xe();Se.watched=Te,applyHeaders(this,Se);let Ee=()=>{if(this.readyState!==XHR_DONE||(this.removeEventListener(`readystatechange`,Ee),Se.ended))return;let te=0;try{te=this.status}catch{}settleOnce(Se,{status:te})};this.addEventListener(`readystatechange`,Ee),Se.onDone=Ee;try{return xe()}catch(te){throw this.removeEventListener(`readystatechange`,Ee),settleOnce(Se,{error:te}),te}}}var patcher=createPatcher(),patchedPrototype=null;function instrumentXHR(){if(patcher.installed)return;let te=globalThis.XMLHttpRequest;typeof te==`function`&&te.prototype&&(patcher.install(te.prototype,{open:te=>createXHROpen(te),setRequestHeader:te=>createXHRSetRequestHeader(te),send:te=>createXHRSend(te)}),patchedPrototype=te.prototype)}function unpatchXHR(){patchedPrototype&&(patcher.uninstall(patchedPrototype),patcher.installed||(patchedPrototype=null))}var subscriptions=0;function withRequestPatches(te){subscriptions===0&&(instrumentFetch(),instrumentXHR()),subscriptions++;let oe=te(),xe=!1;return()=>{xe||(xe=!0,oe(),subscriptions--,subscriptions===0&&(unpatchFetch(),unpatchXHR()))}}function shouldPropagate(te,oe,xe,Se){return Se?Se.length!==0&&Se.some(oe=>typeof oe==`string`?te.includes(oe):oe.test(te)):oe!==null&&oe.origin===xe}function headerPairsFrom(te){try{let oe=[];for(let xe of te){if(typeof xe!=`object`||!xe)return null;let te=Array.from(xe);if(te.length!==2)return null;oe.push([String(te[0]),String(te[1])])}return oe}catch{return null}}function isIterable(te){return te!==null&&(typeof te==`object`||typeof te==`function`)&&typeof te[Symbol.iterator]==`function`}function mergeTraceparentHeader(te,oe,xe){let Se=oe?.headers??(typeof Request<`u`&&te instanceof Request?te.headers:void 0),Te;if(Se instanceof Headers){if(Se.has(`traceparent`))return oe;Te=new Headers(Se),Te.set(`traceparent`,xe)}else if(Array.isArray(Se)){if(Se.some(([te])=>String(te).toLowerCase()===`traceparent`))return oe;Te=[...Se,[`traceparent`,xe]]}else if(isIterable(Se)){let te=headerPairsFrom(Se);if(te===null)Te=Se;else if(te.some(([te])=>te.toLowerCase()===`traceparent`))return oe;else Te=[...te,[`traceparent`,xe]]}else if(Se){if(Object.keys(Se).some(te=>te.toLowerCase()===`traceparent`))return oe;Te={...Se,traceparent:xe}}else Te={traceparent:xe};let Ee={headers:Te};if(oe){let te=Object.getOwnPropertyDescriptors(oe);delete te.headers,Object.defineProperties(Ee,te)}return Ee.duplex===void 0&&typeof Request<`u`&&te instanceof Request&&te.body!=null&&(Ee.duplex=`half`),Ee}var REQUEST_SPAN_TYPES={fetch:BrowserSpanType.Fetch,xhr:BrowserSpanType.Xhr},INLINE_SCHEMES=new Set([`data:`,`blob:`]);function browserUrlContext(){let te=globalThis.location?.origin??``;return{origin:te,base:()=>globalThis.document?.baseURI||te}}function safeAbsolute(te,oe){try{return new URL(te,oe||void 0)}catch{return null}}var ingestCacheKey=null,ingestCacheHrefs=[];function resolvedIngestHrefs(te,oe){let xe=[te.ingestUrl,te.logsIngestUrl,te.tracesIngestUrl],Se=`${oe} ${xe.join(` `)}`;return Se!==ingestCacheKey&&(ingestCacheKey=Se,ingestCacheHrefs=xe.filter(te=>typeof te==`string`&&te.length>0).map(te=>safeAbsolute(te,oe)).filter(te=>te!==null).map(te=>te.href)),ingestCacheHrefs}function matchesIngestHref(te,oe){if(!te.startsWith(oe))return!1;let xe=te.charAt(oe.length);return xe===``||xe===`/`||xe===`?`||xe===`#`}function isFlareIngestUrl(te,oe,xe){return te?resolvedIngestHrefs(oe,xe).some(oe=>matchesIngestHref(te.href,oe)):!1}function requestSpanAttributes(te,oe,xe,Se){return{"http.request.method":te,...urlAttributes(oe?oe.href:xe,Se.urlDenylist),...oe?{"server.address":oe.hostname}:{},...oe&&oe.port?{"server.port":Number(oe.port)}:{}}}function endHttpRequestSpan(te,oe,xe){te.setAttribute(`http.response.status_code`,oe),(oe>=500||xe?.zeroIsError&&oe===0)&&te.setStatus({code:SpanStatusCode.Error}),te.end()}function finishHttpSpanError(te,oe){te.setStatus({code:SpanStatusCode.Error,message:oe instanceof Error?oe.message:String(oe)}),te.end()}function traceparentFor(te,oe,xe,Se,Te){return shouldPropagate(oe?oe.href:xe,oe,Se,Te.tracePropagationTargets)?buildTraceparent(te.traceId,te.spanId,te.isRecording):null}function startHttpRequestSpan(te,oe){let{method:xe,url:Se,urls:Te,spanType:Ee}=oe,De=te.config,ke=Te.base(),Ae=safeAbsolute(Se,ke);if(isFlareIngestUrl(Ae,De,ke)||Ae&&INLINE_SCHEMES.has(Ae.protocol))return null;let je=Ae?Ae.pathname:Se;return{span:te.startSpan(`${xe} ${je}`,{spanType:Ee,attributes:requestSpanAttributes(xe,Ae,Se,De)}),absoluteUrl:Ae}}function zeroIsError(te){return te!==null&&(te.protocol===`http:`||te.protocol===`https:`)}function propagate(te,oe,xe,Se,Te){let Ee=traceparentFor(te,oe,xe.url,Se.origin,Te.config);return Ee?xe.kind===`xhr`?{headers:{traceparent:Ee}}:xe.input===void 0?{}:{init:mergeTraceparentHeader(xe.input,xe.init,Ee)}:{}}function traceRequests(te,oe){return claimRequestMutation(xe=>{if(!te.config.enableTracing)return;let Se=startHttpRequestSpan(te,{method:xe.method,url:xe.url,urls:oe,spanType:REQUEST_SPAN_TYPES[xe.kind]});if(!Se)return;let{span:Te,absoluteUrl:Ee}=Se,De={};try{De=propagate(Te,Ee,xe,oe,te)}catch{De={}}return{...De,onSettle({status:te,error:oe,aborted:Se}){Se?(Te.setStatus({code:SpanStatusCode.Error}),Te.end()):oe===void 0?xe.kind===`xhr`?endHttpRequestSpan(Te,te??0,{zeroIsError:zeroIsError(Ee)}):endHttpRequestSpan(Te,te??0):finishHttpSpanError(Te,oe)}}})}var RequestRecorder=class{type=`browser_request`;constructor(te){this.host=te,this.subscribe=this.subscribe.bind(this),this.onStart=this.onStart.bind(this),this.onSettle=this.onSettle.bind(this)}install(){return withRequestPatches(this.subscribe)}subscribe(){return subscribeToRequests(this.onStart)}onStart(te){let oe=browserUrlContext().base(),xe=safeAbsolute(te.url,oe);if(!isFlareIngestUrl(xe,this.host.config(),oe))return{onSettle:this.onSettle.bind(this,te,xe)}}onSettle(te,oe,xe){let Se=oe?oe.href:te.url,Te={"http.request.method":te.method,"url.full":breadcrumbUrl(Se,this.host.config().urlDenylist)};oe?.hostname&&(Te[`server.address`]=oe.hostname),xe.status!==void 0&&(Te[`http.response.status_code`]=xe.status),this.host.record(REQUEST_SPAN_TYPES[te.kind],Te,defaultNowNano())}};function startBreadcrumbs(te){if(typeof document>`u`)return()=>{};let oe=[new ClickRecorder(te),new FormChangeRecorder(te),new RequestRecorder(te),new NavigationRecorder(te)],xe=[];for(let te of oe)try{xe.push(te.install())}catch{}return()=>{for(let te of xe)try{te()}catch{}}}var BrowserFlushScheduler=class{register(te){typeof document<`u`&&document&&(document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&te({keepalive:!0})}),typeof window<`u`&&window&&window.addEventListener(`pagehide`,()=>te({keepalive:!0})))}};function cookie(te){if(!window.document.cookie)return{};let oe=Object.create(null);return window.document.cookie.split(`; `).forEach(xe=>{let Se=xe.indexOf(`=`);if(Se===-1){oe[xe]=te.test(xe)?`[redacted]`:``;return}let Te=xe.slice(0,Se),Ee=xe.slice(Se+1);oe[Te]=te.test(Te)?`[redacted]`:Ee}),{"http.request.cookies":oe}}var EFFECTIVE_TYPES=[`slow-2g`,`2g`,`3g`,`4g`];function readScreen(){if(typeof screen>`u`||typeof screen.width!=`number`||typeof screen.height!=`number`)return null;let te=typeof devicePixelRatio==`number`?devicePixelRatio:void 0;return te==null?{width:screen.width,height:screen.height}:{width:screen.width,height:screen.height,scale:te}}function readNetwork(te){let oe={};typeof te.onLine==`boolean`&&(oe.online=te.onLine);let xe=te.connection;if(xe){let{effectiveType:te,downlink:Se,rtt:Te}=xe;te&&EFFECTIVE_TYPES.includes(te)&&(oe.effectiveType=te),typeof Se==`number`&&(oe.downlinkMbps=Se),typeof Te==`number`&&(oe.rttMs=Te)}return Object.keys(oe).length>0?oe:null}function readTimezone(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||void 0}catch{return}}var BrowserDeviceInfoProvider=class{staticInfo=null;collect(){if(typeof window>`u`||typeof navigator>`u`)return{};let te=navigator,oe={},xe=this.readStatic(te),Se=readScreen(),Te={...xe.device,...Se?{screen:Se}:{}};Object.keys(Te).length>0&&(oe.device=Te),xe.locale&&(oe.locale=xe.locale);let Ee=readNetwork(te);return Ee&&(oe.network=Ee),oe}readStatic(te){if(this.staticInfo)return this.staticInfo;let oe={};typeof te.deviceMemory==`number`&&(oe.memoryGb=te.deviceMemory),typeof te.hardwareConcurrency==`number`&&(oe.cpuCores=te.hardwareConcurrency);let xe={};te.language&&(xe.language=te.language);let Se=readTimezone();return Se&&(xe.timezone=Se),this.staticInfo={device:Object.keys(oe).length>0?oe:void 0,locale:Object.keys(xe).length>0?xe:void 0},this.staticInfo}},browserDeviceInfoProvider=new BrowserDeviceInfoProvider;function request(te,oe){return{...urlAttributes(oe??window.location.href,te),"user_agent.original":window.navigator.userAgent,"http.request.referrer":redactUrlQuery(window.document.referrer,te),"document.ready_state":window.document.readyState}}function browserEntryPoint(te,oe){if(typeof window>`u`)return{"flare.entry_point.type":`web`};let xe={"flare.entry_point.type":`web`},Se=oe?oe.href:window?.location?.href;if(Se){xe[`flare.entry_point.value`]=redactUrlQuery(Se,te.urlDenylist);let Te=oe?oe.pathname:window?.location?.pathname;Te&&(xe[`flare.entry_point.handler.identifier`]=Te,xe[`http.route`]=Te,xe[`flare.entry_point.handler.type`]=`browser`)}return xe}var collectBrowser=te=>{let oe={...browserEntryPoint(te)};return Object.assign(oe,deviceInfoToAttributes(browserDeviceInfoProvider.collect())),typeof window>`u`||(window?.location?.hostname&&(oe[`host.name`]=window.location.hostname),Object.assign(oe,request(te.urlDenylist)),Object.assign(oe,cookie(te.urlDenylist))),oe},FetchFileReader=class{read(te){return/^https?:\/\//i.test(te)?fetch(te,internalRequestInit()).then(te=>te.status===200?te.text():null).catch(()=>null):Promise.resolve(null)}},CLIENT_VERSION=`2.13.0`;function insulate(te){return(...oe)=>{try{te(...oe)}catch{}}}function safeInvoke(te){try{te?.()}catch{}}var instrumented=new WeakMap;function instrumentOnce(te,oe){instrumented.get(te)?.();let xe=[];function Se(){for(let te=xe.length-1;te>=0;te--)safeInvoke(xe[te])}try{oe(te=>{xe.push(te)})}catch{return Se(),()=>{}}function Te(){Se(),instrumented.get(te)===Te&&instrumented.delete(te)}return instrumented.set(te,Te),Te}function collectBrowserSpanContext(te,oe){if(typeof window>`u`)return{};let xe=absoluteUrl(oe);return{...browserEntryPoint(te,xe),...request(te.urlDenylist,xe?.href)}}function browserSpanUrlAttributes(te,oe){if(typeof window>`u`)return{};let xe=absoluteUrl(oe);if(!xe)return{};let Se=urlAttributes(xe.href,te.urlDenylist);return{"url.query":``,...Se,"flare.entry_point.value":Se[`url.full`]}}var bfcacheRestoreTime=-1,getBFCacheRestoreTime=()=>bfcacheRestoreTime,onBFCacheRestore=te=>{addEventListener(`pageshow`,oe=>{oe.persisted&&(bfcacheRestoreTime=oe.timeStamp,te(oe))},!0)},getRating=(te,oe)=>te>oe[1]?`poor`:te>oe[0]?`needs-improvement`:`good`,bindReporter=(te,oe,xe,Se)=>{let Te,Ee;return De=>{oe.value>=0&&(De||Se)&&(Ee=oe.value-(Te??0),(Ee||Te===void 0)&&(Te=oe.value,oe.delta=Ee,oe.rating=getRating(oe.value,xe),te(oe)))}},doubleRAF=te=>{requestAnimationFrame(()=>requestAnimationFrame(te))},getNavigationEntry=()=>{let te=performance.getEntriesByType(`navigation`)[0];if(te&&te.responseStart>0&&te.responseStart<performance.now())return te},getActivationStart=()=>getNavigationEntry()?.activationStart??0,firstHiddenTime=-1,onHiddenFunctions=new Set,initHiddenTime=()=>document.visibilityState===`hidden`&&!document.prerendering?0:1/0,onVisibilityUpdate=te=>{if(document.visibilityState===`hidden`){if(te.type===`visibilitychange`)for(let te of onHiddenFunctions)te();isFinite(firstHiddenTime)||(firstHiddenTime=te.type===`visibilitychange`?te.timeStamp:0,removeEventListener(`prerenderingchange`,onVisibilityUpdate,!0))}},getVisibilityWatcher=(te=!1)=>{if(te&&(firstHiddenTime=1/0),firstHiddenTime<0){let te=getActivationStart();firstHiddenTime=(document.prerendering?void 0:globalThis.performance.getEntriesByType(`visibility-state`).find(oe=>oe.name===`hidden`&&oe.startTime>=te)?.startTime)??initHiddenTime(),addEventListener(`visibilitychange`,onVisibilityUpdate,!0),addEventListener(`prerenderingchange`,onVisibilityUpdate,!0),onBFCacheRestore(()=>{setTimeout(()=>{firstHiddenTime=initHiddenTime()})})}return{get firstHiddenTime(){return firstHiddenTime},onHidden(te){onHiddenFunctions.add(te)}}},generateUniqueID=()=>`v6-${Date.now()}-${Math.floor(Math.random()*8999999999999)+0xe8d4a51000}`,initMetric=(te,oe=-1,xe,Se=0,Te,Ee,De)=>{let ke=getNavigationEntry(),Ae=ke?.navigationId||0,je=`navigate`;return xe?je=xe:getBFCacheRestoreTime()>=0?je=`back-forward-cache`:ke&&(document.prerendering||getActivationStart()>0?je=`prerender`:document.wasDiscarded?je=`restore`:ke.type&&(je=ke.type.replace(/_/g,`-`))),{name:te,value:oe,rating:`good`,delta:0,entries:[],id:generateUniqueID(),navigationType:je,navigationId:Se||Ae,navigationInteractionId:Te,navigationURL:Ee||ke?.name,navigationStartTime:De||0}},instanceMap=new WeakMap;function initUnique(te,oe){let xe=instanceMap.get(oe);return xe||(xe=new WeakMap,instanceMap.set(oe,xe)),xe.get(te)||xe.set(te,new oe),xe.get(te)}var LayoutShiftManager=class{_onAfterProcessingUnexpectedShift;_sessionValue=0;_sessionEntries=[];_processEntry(te){if(te.hadRecentInput)return;let oe=this._sessionEntries[0],xe=this._sessionEntries.at(-1);this._sessionValue&&oe&&xe&&te.startTime-xe.startTime<1e3&&te.startTime-oe.startTime<5e3?(this._sessionValue+=te.value,this._sessionEntries.push(te)):(this._sessionValue=te.value,this._sessionEntries=[te]),this._onAfterProcessingUnexpectedShift?.(te)}},observe=(te,oe,xe={})=>{try{let Se=te.filter(te=>PerformanceObserver.supportedEntryTypes.includes(te));if(Se.length>0){let te=new PerformanceObserver(te=>{queueMicrotask(()=>{let xe=te.getEntries();Se.length>1&&xe.sort((te,oe)=>te.startTime+te.duration-(oe.startTime+oe.duration)),oe(xe)})});for(let oe of Se)te.observe({type:oe,buffered:!0,...xe});return te}}catch{}},checkSoftNavsEnabled=te=>globalThis.PerformanceObserver?.supportedEntryTypes.includes(`soft-navigation`)&&typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint==`function`&&te&&te.reportSoftNavs,storeSoftNavEntry=(te,oe)=>{if(te.set(oe.navigationId,oe),te.size>2){let oe=te.keys().next().value;oe!==void 0&&te.delete(oe)}},runOnce=te=>{let oe=!1;return()=>{oe||=(te(),!0)}},FCPEntryManager=class{_softNavigationEntryMap},whenActivated=te=>{document.prerendering?addEventListener(`prerenderingchange`,te,!0):te()},FCPThresholds=[1800,3e3],onFCP=(te,oe={})=>{let xe=checkSoftNavsEnabled(oe);whenActivated(()=>{let Se=initUnique(oe,FCPEntryManager),Te=getVisibilityWatcher(),Ee=initMetric(`FCP`),De,ke=observe([`paint`],te=>{for(let oe of te)oe.name===`first-contentful-paint`&&(ke.disconnect(),oe.startTime<Te.firstHiddenTime&&(Ee.value=Math.max(oe.startTime-getActivationStart(),0),Ee.entries.push(oe),Ee.navigationId=oe.navigationId||Ee.navigationId,De(!0)))});ke&&(De=bindReporter(te,Ee,FCPThresholds,oe.reportAllChanges),onBFCacheRestore(xe=>{Ee=initMetric(`FCP`,-1,`back-forward-cache`,Ee.navigationId,Ee.navigationInteractionId,Ee.navigationURL,getBFCacheRestoreTime()),De=bindReporter(te,Ee,FCPThresholds,oe.reportAllChanges),doubleRAF(()=>{Ee.value=performance.now()-xe.timeStamp,De(!0)})})),xe&&observe([`soft-navigation`],xe=>{xe.forEach(xe=>{Se._softNavigationEntryMap&&xe.navigationId&&storeSoftNavEntry(Se._softNavigationEntryMap,xe),Ee=initMetric(`FCP`,Math.max((xe.presentationTime||xe.paintTime||0)-xe.startTime,0),`soft-navigation`,xe.navigationId,xe.interactionId,xe.name,xe.startTime),De=bindReporter(te,Ee,FCPThresholds,oe.reportAllChanges),De(!0)})},oe)})},CLSThresholds=[.1,.25],onCLS=(te,oe={})=>{let xe=getVisibilityWatcher();onFCP(runOnce(()=>{let Se=initMetric(`CLS`,0),Te,Ee=initUnique(oe,LayoutShiftManager),De=(xe,De,ke,Ae,je)=>{Se=initMetric(`CLS`,0,xe,De,ke,Ae,je),Ee._sessionValue=0,Te=bindReporter(te,Se,CLSThresholds,oe.reportAllChanges)},ke=(te=!1)=>{Ee._sessionValue>Se.value&&(Se.value=Ee._sessionValue,Se.entries=Ee._sessionEntries),Te(te)},Ae=te=>{ke(!0),De(`soft-navigation`,te.navigationId,te.interactionId,te.name,te.startTime)},je=te=>{for(let oe of te)oe.entryType===`soft-navigation`?Ae(oe):Ee._processEntry(oe);ke()},Me=[`layout-shift`];checkSoftNavsEnabled(oe)&&Me.push(`soft-navigation`);let Ne=observe(Me,je);Ne&&(Te=bindReporter(te,Se,CLSThresholds,oe.reportAllChanges),xe.onHidden(()=>{je(Ne.takeRecords()),Te(!0)}),onBFCacheRestore(()=>{De(`back-forward-cache`,Se.navigationId,Se.navigationInteractionId,Se.navigationURL,getBFCacheRestoreTime()),doubleRAF(Te)}),setTimeout(Te))}))},interactionCountEstimate=0,minKnownInteractionId=1/0,maxKnownInteractionId=0,updateEstimate=te=>{for(let oe of te)oe.interactionId&&(minKnownInteractionId=Math.min(minKnownInteractionId,oe.interactionId),maxKnownInteractionId=Math.max(maxKnownInteractionId,oe.interactionId),interactionCountEstimate=maxKnownInteractionId?(maxKnownInteractionId-minKnownInteractionId)/7+1:0)},po,getInteractionCount=()=>po?interactionCountEstimate:performance.interactionCount??0,initInteractionCountPolyfill=()=>{`interactionCount`in performance||po||(po=observe([`event`],updateEstimate,{durationThreshold:0}))},MAX_INTERACTIONS_TO_CONSIDER=10,prevInteractionCount=0,getInteractionCountForNavigation=()=>getInteractionCount()-prevInteractionCount,InteractionManager=class{_longestInteractionList=[];_longestInteractionMap=new Map;_onBeforeProcessingEntry;_onAfterProcessingINPCandidate;_resetInteractions(){prevInteractionCount=getInteractionCount(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(te){let oe=getInteractionCountForNavigation(),xe=Math.min(this._longestInteractionList.length-1,Math.floor(oe/50));return oe&&xe===-1&&(te===`soft-navigation`||te===`back-forward-cache`)?{_latency:8,id:-1,entries:[]}:this._longestInteractionList[xe]}_processEntry(te){if(this._onBeforeProcessingEntry?.(te),!(te.interactionId||te.entryType===`first-input`))return;let oe=this._longestInteractionList.at(-1),xe=this._longestInteractionMap.get(te.interactionId);if(xe||this._longestInteractionList.length<MAX_INTERACTIONS_TO_CONSIDER||te.duration>oe._latency){if(xe?te.duration>xe._latency?(xe.entries=[te],xe._latency=te.duration):te.duration===xe._latency&&te.startTime===xe.entries[0].startTime&&xe.entries.push(te):(xe={id:te.interactionId,entries:[te],_latency:te.duration},this._longestInteractionMap.set(xe.id,xe),this._longestInteractionList.push(xe)),this._longestInteractionList.sort((te,oe)=>oe._latency-te._latency),this._longestInteractionList.length>MAX_INTERACTIONS_TO_CONSIDER){let te=this._longestInteractionList.splice(MAX_INTERACTIONS_TO_CONSIDER);for(let oe of te)this._longestInteractionMap.delete(oe.id)}this._onAfterProcessingINPCandidate?.(xe)}}},whenIdleOrHidden=te=>{let oe=`requestIdleCallback`in globalThis?1e3:0,xe=globalThis.requestIdleCallback||setTimeout,Se=globalThis.cancelIdleCallback||clearTimeout;if(document.visibilityState===`hidden`)te();else{let Te=runOnce(te),Ee=-1,De=()=>{Se(Ee),Te()};addEventListener(`visibilitychange`,De,{once:!0,capture:!0}),Ee=xe(()=>{removeEventListener(`visibilitychange`,De,{capture:!0}),Te()},{timeout:oe})}},INPThresholds=[200,500],DEFAULT_DURATION_THRESHOLD=40,onINP=(te,oe={})=>{if(!(globalThis.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype))return;let xe=getVisibilityWatcher();whenActivated(()=>{initInteractionCountPolyfill();let Se=initMetric(`INP`),Te,Ee=initUnique(oe,InteractionManager),De=(xe,De,ke,Ae,je)=>{Ee._resetInteractions(),Se=initMetric(`INP`,-1,xe,De,ke,Ae,je),Te=bindReporter(te,Se,INPThresholds,oe.reportAllChanges)},ke=()=>{let te=Ee._estimateP98LongestInteraction(Se.navigationType);te&&te._latency!==Se.value&&(Se.value=te._latency,Se.entries=te.entries,Te())},Ae=te=>{ke(),Te(!0),De(`soft-navigation`,te.navigationId,te.interactionId,te.name,te.startTime)},je=(te,oe=!1)=>{whenIdleOrHidden(()=>{for(let oe of te)oe.entryType===`soft-navigation`?Ae(oe):Ee._processEntry(oe);ke(),oe&&Te(!0)})},Me=[`event`,`first-input`];checkSoftNavsEnabled(oe)&&Me.push(`soft-navigation`);let Ne=observe(Me,je,{...oe,durationThreshold:oe.durationThreshold??DEFAULT_DURATION_THRESHOLD});Te=bindReporter(te,Se,INPThresholds,oe.reportAllChanges),Ne&&(xe.onHidden(()=>{je(Ne.takeRecords(),!0)}),onBFCacheRestore(()=>{De(`back-forward-cache`,Se.navigationId,Se.navigationInteractionId,Se.navigationURL,getBFCacheRestoreTime())}))})},LCPEntryManager=class{_onBeforeProcessingEntry;_softNavigationEntryMap;_processEntry(te){this._onBeforeProcessingEntry?.(te)}},LCPThresholds=[2500,4e3],onLCP=(te,oe={})=>{let xe=!1,Se=checkSoftNavsEnabled(oe);whenActivated(()=>{let Te=getVisibilityWatcher(),Ee=initMetric(`LCP`),De,ke=initUnique(oe,LCPEntryManager),Ae=(Se,ke,Ae,je,Me)=>{Ee=initMetric(`LCP`,-1,Se,ke,Ae,je,Me),De=bindReporter(te,Ee,LCPThresholds,oe.reportAllChanges),xe=!1,Se===`soft-navigation`&&(Te=getVisibilityWatcher(!0))},je=te=>{ke._softNavigationEntryMap&&te.navigationId&&storeSoftNavEntry(ke._softNavigationEntryMap,te),xe||De(!0),Ae(`soft-navigation`,te.navigationId,te.interactionId,te.name,te.startTime);let oe=te.getLargestInteractionContentfulPaint?.();oe&&Me([oe])},Me=te=>{!oe.reportAllChanges&&!Se&&(te=te.slice(-1));for(let oe of te){if(!oe)continue;if(oe.entryType===`soft-navigation`){je(oe);continue}let te=0,xe=[],Se=oe.startTime;if(oe.entryType===`largest-contentful-paint`)te=Math.max(oe.startTime-getActivationStart(),0),ke._processEntry(oe),xe=[oe];else if(oe.entryType===`interaction-contentful-paint`){let Te=oe;if(!Ee.navigationId||`interactionId`in Te&&Te.interactionId!=Ee.navigationInteractionId)continue;Se=Te.largestContentfulPaint?.renderTime||0,te=Math.max(Se-oe.startTime,0),Te.largestContentfulPaint&&(ke._processEntry(Te.largestContentfulPaint),xe=[Te.largestContentfulPaint])}Se<Te.firstHiddenTime&&(Ee.value=te,Ee.entries=xe,De())}},Ne=[`largest-contentful-paint`];Se&&Ne.push(`interaction-contentful-paint`,`soft-navigation`);let Pe=observe(Ne,Me);if(Pe){De=bindReporter(te,Ee,LCPThresholds,oe.reportAllChanges);let Te=[`keydown`,`click`,`visibilitychange`],ke=te=>{if(te.isTrusted&&!xe){let te=Ee.id;whenIdleOrHidden(()=>{if(!xe){if(!Se){Pe.disconnect();for(let te of Te)removeEventListener(te,ke,{capture:!0})}te===Ee.id&&(xe=!0,De(!0))}})}};for(let te of Te)addEventListener(te,ke,{capture:!0});onBFCacheRestore(Se=>{Ae(`back-forward-cache`,Ee.navigationId,Ee.navigationInteractionId,Ee.navigationURL,getBFCacheRestoreTime()),De=bindReporter(te,Ee,LCPThresholds,oe.reportAllChanges),doubleRAF(()=>{Ee.value=performance.now()-Se.timeStamp,xe=!0,De(!0)})})}})},TTFBThresholds=[800,1800],whenReady=te=>{document.prerendering?whenActivated(()=>whenReady(te)):document.readyState===`complete`?setTimeout(te):addEventListener(`load`,()=>whenReady(te),!0)},onTTFB=(te,oe={})=>{let xe=checkSoftNavsEnabled(oe),Se=initMetric(`TTFB`),Te=bindReporter(te,Se,TTFBThresholds,oe.reportAllChanges);whenReady(()=>{let Ee=getNavigationEntry();if(Ee){let De=Ee.responseStart;Se.value=Math.max(De-getActivationStart(),0),Se.entries=[Ee],Te(!0),onBFCacheRestore(()=>{Se=initMetric(`TTFB`,0,`back-forward-cache`,Se.navigationId,Se.navigationInteractionId,Se.navigationURL,getBFCacheRestoreTime()),Te=bindReporter(te,Se,TTFBThresholds,oe.reportAllChanges),Te(!0)}),xe&&observe([`soft-navigation`],xe=>{xe.forEach(xe=>{xe.navigationId&&(Se=initMetric(`TTFB`,0,`soft-navigation`,xe.navigationId,xe.interactionId,xe.name,xe.startTime),Se.entries=[xe],Te=bindReporter(te,Se,TTFBThresholds,oe.reportAllChanges),Te(!0))})},oe)}})},EARLY_VITALS=[`ttfb`,`fcp`];function vitalAttributes(te){let oe={};for(let[xe,Se]of Object.entries(te))typeof Se==`number`&&(oe[`browser.web_vital.${xe}`]=Se);return oe}function buildVitalsSpan(te){let oe=vitalAttributes(te.vitals);return Object.keys(oe).length===0?null:{name:te.routeName,startTimeUnixNano:te.rootStartTimeUnixNano,endTimeUnixNano:te.rootStartTimeUnixNano,attributes:{...te.contextAttributes,"flare.entry_point.handler.identifier":te.routeName,"http.route":te.routeName,"flare.route.source":te.routeSource,...oe}}}var collected={},subscribed=!1,recording=!1,taken=!1;function defaultSubscribers(){return{onTTFB:te=>onTTFB(te),onFCP:te=>onFCP(te),onLCP:te=>onLCP(te,{reportAllChanges:!0}),onCLS:te=>onCLS(te,{reportAllChanges:!0}),onINP:te=>onINP(te,{reportAllChanges:!0})}}function startWebVitals(te=defaultSubscribers()){recording=!0,subscribed||(subscribed=!0,subscribe(te.onTTFB,`ttfb`),subscribe(te.onFCP,`fcp`),subscribe(te.onLCP,`lcp`),subscribe(te.onCLS,`cls`),subscribe(te.onINP,`inp`))}function subscribe(te,oe){try{te(te=>record(oe,te))}catch{}}function record(te,oe){recording&&typeof oe?.value==`number`&&(collected[te]=oe.value)}function stopWebVitals(){recording=!1,collected={}}function takeEarlyVitals(){if(!recording)return null;let te={};for(let oe of EARLY_VITALS){let xe=collected[oe];xe!==void 0&&(te[oe]=xe,delete collected[oe])}return Object.keys(te).length===0?null:te}function takeWebVitals(){if(taken||!recording||Object.keys(collected).length===0)return null;taken=!0;let te=collected;return collected={},te}function restoreWebVitals(te){collected=te,taken=!1}var MAX_TRACKED_PARENTS=256,childIntervals=new Map;function trackChildInterval(te,oe,xe){let Se=childIntervals.get(te);Se?Se.push([oe,xe]):(evictLruIfNew(childIntervals,te,MAX_TRACKED_PARENTS),childIntervals.set(te,[[oe,xe]]))}function takeSelfTime(te,oe,xe){let Se=childIntervals.get(te);childIntervals.delete(te);let Te=xe-oe;return Se?Math.max(0,Te-coveredTime(Se,oe,xe)):Math.max(0,Te)}function resetComponentSelfTime(){childIntervals.clear()}function coveredTime(te,oe,xe){te.sort((te,oe)=>te[0]-oe[0]);let Se=0,Te=oe;for(let[oe,Ee]of te){let te=Math.max(oe,Te),De=Math.min(Ee,xe);De>te&&(Se+=De-te,Te=De)}return Se}var DEFAULT_IDLE_TIMEOUTS={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},IdleRootController=class{openChildren=0;lastChildEndTime=null;settleTime=null;idleTimer=null;finalTimer=null;childTimer=null;ended=!1;held=!1;unsubscribe;constructor(te,oe){this.deps=te,this.timeouts=oe,te.setActiveRoot(te.root),this.unsubscribe=te.addSpanListener(te=>this.onSpanEvent(te.phase,te.span));let xe=Math.max(0,(te.now()-te.rootStartTime)/1e6),Se=Math.max(0,oe.finalTimeout-xe);this.finalTimer=te.setTimeout(()=>this.finish(te.now()),Se),this.held=!!te.held,this.armIdle()}get isEnded(){return this.ended}endNow(){this.finish(this.openChildren>0||this.held?this.deps.now():this.trimmedEnd())}releaseHold(){!this.ended&&this.held&&(this.held=!1,this.openChildren===0&&(this.settleTime=this.deps.now()),this.armIdle())}onSpanEvent(te,oe){this.ended||oe!==this.deps.root&&oe.traceId===this.deps.root.traceId&&(te===`start`?this.onChildStarted():this.onChildEnded(oe))}onChildStarted(){this.openChildren++,this.clearIdle(),this.openChildren===1&&this.armChildTimeout()}onChildEnded(te){this.openChildren=Math.max(0,this.openChildren-1),this.lastChildEndTime=te.endTimeUnixNano||this.deps.now(),this.openChildren>0||(this.clearChildTimeout(),this.armIdle())}armIdle(){this.clearIdle(),this.held||(this.idleTimer=this.deps.setTimeout(()=>{this.openChildren>0||this.finish(this.trimmedEnd())},this.timeouts.idleTimeout))}trimmedEnd(){return Math.max(this.deps.endFloor(),this.settleTime??0,this.lastChildEndTime??0)}clearIdle(){this.idleTimer!==null&&(this.deps.clearTimeout(this.idleTimer),this.idleTimer=null)}armChildTimeout(){this.childTimer=this.deps.setTimeout(()=>this.finish(this.deps.now()),this.timeouts.childSpanTimeout)}clearChildTimeout(){this.childTimer!==null&&(this.deps.clearTimeout(this.childTimer),this.childTimer=null)}finish(te){this.ended||(this.ended=!0,te=Math.max(te,this.deps.rootStartTime),this.clearIdle(),this.clearChildTimeout(),this.finalTimer!==null&&(this.deps.clearTimeout(this.finalTimer),this.finalTimer=null),this.unsubscribe(),this.deps.beforeEnd?.(),this.deps.root.end(te),this.deps.setActiveRoot(void 0))}};function computePageloadStartNano(te,oe){return Math.round((te+(oe??0))*1e6)}function resolvePageloadStartNano(te,oe,xe,Se){return Se||oe-te>xe?oe:te}function navigationTiming(){let te=globalThis.performance;return!te||typeof te.getEntriesByType!=`function`||typeof te.timeOrigin!=`number`?null:te}function navigationEntry(te){return te.getEntriesByType(`navigation`)[0]}function pageloadStartNano(){let te=navigationTiming();return te?computePageloadStartNano(te.timeOrigin,navigationEntry(te)?.startTime):defaultNowNano()}function computePageloadEndNano(te,oe,xe,Se){let Te=oe||xe||0;return Te?Math.round((te+Te)*1e6):Se}function pageloadEndNano(){let te=navigationTiming();if(!te)return defaultNowNano();let oe=navigationEntry(te);return computePageloadEndNano(te.timeOrigin,oe?.loadEventEnd,oe?.domContentLoadedEventEnd,defaultNowNano())}var controller=null,uninstall=null,removeNavigationSubscription=null,pageloadTraced=!1,activeFlare=null,currentRoot=null,pendingRouteName=null,pendingRouteNameOwner=null,pageloadRoot=null,pageloadRootStartNano=0,pageloadRoute=null,pageloadContext={};function resolveTimeouts(te){return{idleTimeout:te.idleTimeout??DEFAULT_IDLE_TIMEOUTS.idleTimeout,finalTimeout:te.finalTimeout??DEFAULT_IDLE_TIMEOUTS.finalTimeout,childSpanTimeout:te.childSpanTimeout??DEFAULT_IDLE_TIMEOUTS.childSpanTimeout}}function withLiveController(te){if(controller&&!controller.isEnded)try{te(controller)}catch(te){activeFlare?.config.debug&&console.error(`Flare: browser tracing controller callback failed`,te)}}function ifRootLive(te){withLiveController(()=>te())}function startRoot(te,oe){let{spanType:xe,startTimeUnixNano:Se,name:Te=location.pathname,urlOverride:Ee,hold:De,backdated:ke}=oe,Ae;resetComponentSelfTime();try{let oe=collectBrowserSpanContext(te.config,Ee);Ae=te.startSpan(Te,{spanType:xe,startTimeUnixNano:Se,forceRoot:!0,attributes:{...oe,"flare.route.source":`url`}}),controller=new IdleRootController({root:Ae,addSpanListener:oe=>te.tracer.addSpanListener(oe),setActiveRoot:oe=>te.tracer.setActiveRoot(oe),now:defaultNowNano,setTimeout:(te,oe)=>setTimeout(te,oe),clearTimeout:te=>clearTimeout(te),rootStartTime:Se,endFloor:xe===BrowserSpanType.Pageload&&ke?pageloadEndNano:()=>Se,held:De,beforeEnd:xe===BrowserSpanType.Pageload?()=>stampEarlyVitals(Ae,te):void 0},resolveTimeouts(te.config)),currentRoot=Ae,xe===BrowserSpanType.Pageload&&(pageloadRoot=Ae,pageloadRootStartNano=Se,pageloadRoute={name:Te,source:`url`},pageloadContext={...oe})}catch(oe){controller=null,currentRoot=null,xe===BrowserSpanType.Pageload&&(pageloadRoot=null,pageloadRootStartNano=0,pageloadRoute=null,pageloadContext={});try{Ae?.end()}catch{}try{te.tracer.setActiveRoot(void 0)}catch{}te.config.debug&&console.error(`Flare: failed to start browser tracing root`,oe)}}function openNavigationRoot(te,oe){withLiveController(te=>te.endNow()),startRoot(te,{spanType:BrowserSpanType.Navigation,startTimeUnixNano:defaultNowNano(),name:oe.path,urlOverride:oe.url,hold:oe.hold})}function stampEarlyVitals(te,oe){try{let oe=takeEarlyVitals();if(!oe)return;for(let[xe,Se]of Object.entries(vitalAttributes(oe)))te.setAttribute(xe,Se)}catch(te){oe.config.debug&&console.error(`Flare: failed to stamp web vitals on the pageload root`,te)}}function emitWebVitals(te){let oe=pageloadRoot,xe=pageloadRoute;if(!oe||!xe)return;let Se=takeWebVitals();if(Se)try{let Te=buildVitalsSpan({vitals:Se,rootStartTimeUnixNano:pageloadRootStartNano,routeName:xe.name,routeSource:xe.source,contextAttributes:pageloadContext});if(!Te)return;te.startSpan(Te.name,{parent:oe,forceRoot:!0,spanType:BrowserSpanType.WebVital,startTimeUnixNano:Te.startTimeUnixNano,attributes:Te.attributes}).end(Te.endTimeUnixNano)}catch(oe){restoreWebVitals(Se),te.config.debug&&console.error(`Flare: failed to emit web vitals`,oe)}}function startBrowserTracing(te){if(typeof window>`u`||typeof history>`u`||typeof location>`u`||uninstall)return;activeFlare=te,removeNavigationSubscription=subscribeToNavigation({onUrlChanged:oe=>openNavigationRoot(te,{path:oe}),onNavigationStart:oe=>openNavigationRoot(te,oe),onRouteName:(te,oe)=>applyRouteName(te,oe),onNavigationSettle:(te,oe)=>{applyRouteName(te,oe),withLiveController(te=>te.releaseHold())},onSourceUnregistered:()=>{withLiveController(te=>te.releaseHold()),pendingRouteName=null,pendingRouteNameOwner=null}});let oe=resolveTimeouts(te.config).finalTimeout*1e6,xe=pageloadStartNano(),Se=resolvePageloadStartNano(xe,defaultNowNano(),oe,pageloadTraced);if(pageloadTraced=!0,startRoot(te,{spanType:BrowserSpanType.Pageload,startTimeUnixNano:Se,backdated:Se===xe}),startWebVitals(),pendingRouteName){let te=pendingRouteName,oe=pendingRouteNameOwner;pendingRouteName=null,pendingRouteNameOwner=null,isActiveNavigationSource(oe)&&applyRouteName(te)}function Te(){if(controller&&!controller.isEnded)try{controller.endNow()}catch(oe){te.config.debug&&console.error(`Flare: failed to end tracing root on page hide`,oe)}emitWebVitals(te);try{te.tracer.flush({keepalive:!0})}catch(oe){te.config.debug&&console.error(`Flare: failed to flush spans on page hide`,oe)}}let Ee=()=>Te(),De=()=>{document.visibilityState===`hidden`&&Te()};window.addEventListener(`pagehide`,Ee),document.addEventListener(`visibilitychange`,De),uninstall=()=>{window.removeEventListener(`pagehide`,Ee),document.removeEventListener(`visibilitychange`,De)}}function stopBrowserTracing(){withLiveController(te=>te.endNow()),controller=null,uninstall&&=(uninstall(),null),removeNavigationSubscription?.(),removeNavigationSubscription=null,activeFlare=null,currentRoot=null,pendingRouteName=null,pendingRouteNameOwner=null,stopWebVitals(),resetComponentSelfTime(),pageloadRoot=null,pageloadRootStartNano=0,pageloadRoute=null,pageloadContext={}}function urlAttributesFor(te){if(te.url===void 0||!activeFlare)return null;try{return browserSpanUrlAttributes(activeFlare.config,te.url)}catch{return null}}function applyRouteName(te,oe){let xe=currentRoot;if(!xe){pendingRouteName=te,pendingRouteNameOwner=oe??null;return}let Se=urlAttributesFor(te);ifRootLive(()=>{if(xe.name=te.name,xe.setAttribute(`flare.entry_point.handler.identifier`,te.name),xe.setAttribute(`http.route`,te.name),xe.setAttribute(`flare.route.source`,te.source),Se)for(let[te,oe]of Object.entries(Se))xe.setAttribute(te,oe)}),xe===pageloadRoot&&(pageloadRoute={name:te.name,source:te.source},Se&&(pageloadContext={...pageloadContext,...Se}))}function activeTracingFlare(){return activeFlare}var nowNano=defaultNowNano;function reserveSpanId(te){return te!==void 0&&!activeTracingFlare()?.tracer.claimSpanSlot(te)?null:spanId()}function activeComponentRoot(){try{let te=activeTracingFlare()?.tracer.getActiveSpan();return!te||!te.isRecording?null:{traceId:te.traceId,parentSpanId:te.spanId}}catch{return null}}function resolveComponentParent(te,oe){return te&&oe&&te.traceId===oe.traceId?te:oe}function recordComponentSpan(te){try{let oe=activeTracingFlare();if(!oe)return;let xe=oe.tracer.getActiveSpan();if(!xe||xe.traceId!==te.parent.traceId||!xe.isRecording)return;let Se=takeSelfTime(te.spanId,te.startTimeUnixNano,te.endTimeUnixNano);oe.startSpan(te.name,{spanId:te.spanId,parent:{traceId:te.parent.traceId,spanId:te.parent.parentSpanId},spanType:BrowserSpanType.Component,startTimeUnixNano:te.startTimeUnixNano,attributes:{...te.attributes,"flare.component.name":te.name,"flare.component.self_time_ns":Se},claimed:!0}).end(te.endTimeUnixNano),trackChildInterval(te.parent.parentSpanId,te.startTimeUnixNano,te.endTimeUnixNano)}catch{}}function isDevMode(){try{return!1}catch{return!1}}function createFlareResolver(te){let{packageName:oe}=te,xe=te.injectInstruction??`Import ${oe}/inject and pass the @flareapp/electron/renderer instance instead.`,Se=null;function Te(te){if(typeof window<`u`&&window.__flare){let te=`[flare] ${oe} (web root) was imported in a renderer where the Electron bridge is present, pulling the keyed @flareapp/js singleton into the renderer. `+xe;if(isDevMode())throw Error(te);console.warn(te)}Se=te}function Ee(te){if(te)return te;if(Se)return Se();throw Error(`[flare] No Flare instance available. Pass \`flare\` (e.g. from @flareapp/electron/renderer), or import ${oe} (the package root) to use the @flareapp/js default singleton.`)}return{registerDefaultFlare:Te,resolveFlare:Ee}}function catchWindowErrors(){typeof window<`u`&&(window.addEventListener(`error`,te=>{let oe=window.flare;oe&&te.error instanceof Error&&oe.reportSilently(te.error)}),window.addEventListener(`unhandledrejection`,te=>{let oe=window.flare;oe&&routeRejection(oe,te.reason)}))}var Flare=class extends Flare$1{constructor(te=new Api,oe=collectBrowser,xe=new FetchFileReader,Se=new GlobalScopeProvider){super(te,oe,xe,Se,new BrowserFlushScheduler),this.setSdkInfo({name:`@flareapp/js`,version:CLIENT_VERSION}),this.setFramework({name:FrameworkName.Js})}removeTracingSubscription=null;stopBreadcrumbs=null;configure(te){let oe=this.config.enableTracing,xe=this.config.enableBreadcrumbs;super.configure(te);let Se=this.config.enableTracing,Te=this.config.enableBreadcrumbs;return!xe&&Te?this.stopBreadcrumbs=startBreadcrumbs({config:()=>this.config,record:(te,oe,xe)=>this.addBreadcrumb(te,oe,xe)}):xe&&!Te&&(this.stopBreadcrumbs?.(),this.stopBreadcrumbs=null),!oe&&Se?(this.removeTracingSubscription=withRequestPatches(()=>traceRequests(this,browserUrlContext())),startBrowserTracing(this)):oe&&!Se&&(stopBrowserTracing(),this.removeTracingSubscription?.(),this.removeTracingSubscription=null),this}},flare=new Flare;typeof window<`u`&&window&&(window.flare=flare,catchWindowErrors());var ignoreList=`fancybox,jQuery,Modernizr,cssua,ScrollTrigger,calcSelectArrowDimensions,this.elements.$menu.smartmenus,woocommerce,elementor,avadaAddQuantityBoxes,fusion,FLBuilderAccordion,_initLayerSlider,Divi,gsap,Swiper,mailchimp,_AutofillCallbackHandler,$(...),imagesLoaded,masonry,accessing a cross-origin frame,scrollspy,No layout mode: packery,Vimeo,Network Error,Request aborted,timeout exceeded,Loading chunk,TrackerStorageType,Failed to load because no supported source was found.,The element has no supported sources.,grecaptcha,reCAPTCHA Timeout,lightbox,priceCalcElement,AwesomeMenu,breakdance,Maximum call stack size exceeded.,Cookies is not defined,getUniqId,Cannot read properties of null (reading 'classList'),n.getModal,e.target.closest is not a function,Cannot read properties of undefined (reading 'Item'),Cannot read properties of undefined (reading 'clientHeight'),refreshFsLightbox,fbq,FacebookSignal,Cannot assign to read only property 'push' of object '[object Array]',naturalWidth,Request failed with status code,Can't find variable: _,astraNavMenuTogglePro,The operation was aborted.,Failed to fetch dynamically imported module:,Importing a module script failed.,The request is not allowed by the user agent,this.Vi.close,The operation is insecure.,gformValidateFileSize,BreakdanceEntrance,Cannot read properties of undefined (reading '__'),The play() request was interrupted because video-only,Animation is interrupted by user input.,Animation is already playing.,Position "NaN" is not reachable.,Cannot redefine property: onbeforeunload,e.remove is not a function,Can't find variable: Cookies,Load failed,wp is not defined,Backbone,Invalid attempt to destructure non-iterable instance,Can't find variable: EmptyRanges,Cannot read properties of undefined (reading 'setLocaleData'),Function snaptr not implemented.,window.sbi_init is not a function,thehotelsnetwork,Reepay,wpcf7,et_pb_,mediaelementplayer,pys_generate_token,webkit.messageHandlers,__firefox__,window.ethereum,Blocked a frame with origin,NetworkError when attempting to fetch resource,play() failed because the user didn,Error invoking postMessage: Java exception,Failed to load CSS,Failed to load script,removeAttribute is not a function,Invalid site key,Handling is disabled`.split(`,`);/(meta-external|facebookexternalhit|googlebot|bingbot|slurp|duckduckbot|baiduspider|yandexbot|twitterbot|linkedinbot|semrushbot|ahrefsbot|applebot|bytespider|crawler|spider|HeadlessChrome|lightpanda)/i.test(navigator.userAgent)||(flare.light(`5pqzBljrmDvquWZYSrSUKldIUREtPyB3`),flare.addContext(`version`,`4.11.5`),flare.configure({beforeEvaluate:te=>{for(let oe=0;oe<ignoreList.length;oe++)if(te.message.toLowerCase().includes(ignoreList[oe].toLowerCase()))return!1;return te}}));var{registerDefaultFlare,resolveFlare}=createFlareResolver({packageName:`@flareapp/vue`}),PACKAGE_VERSION=`2.13.0`,MAX_HIERARCHY_DEPTH=50,DEFAULT_PROPS_DENYLIST=/password|passwd|pwd|token|secret|authorization|\bauth\b|bearer|oauth|credentials?|cookie|api[-_]?key|private[-_]?key|session|csrf|xsrf|\bpin\b|\bssn\b|card[-_]?number|\bcvv\b/i;function resolveDenylist$1(te,oe=!1){return resolveDenylist(te,oe,DEFAULT_PROPS_DENYLIST)}var MAX_PROP_STRING_LENGTH=1e3,MAX_PROP_ARRAY_LENGTH=100,MAX_PROP_OBJECT_KEYS=100,INFO_TO_ORIGIN={"setup function":`setup`,"render function":`render`,"component update":`render`,"watcher getter":`watcher`,"watcher callback":`watcher`,"watcher cleanup function":`watcher`,"native event handler":`event`,"component event handler":`event`,"beforeCreate hook":`lifecycle`,"created hook":`lifecycle`,"beforeMount hook":`lifecycle`,"mounted hook":`lifecycle`,"beforeUpdate hook":`lifecycle`,"updated hook":`lifecycle`,"beforeUnmount hook":`lifecycle`,"unmounted hook":`lifecycle`,"activated hook":`lifecycle`,"deactivated hook":`lifecycle`,"errorCaptured hook":`lifecycle`,"renderTracked hook":`lifecycle`,"renderTriggered hook":`lifecycle`,"serverPrefetch hook":`lifecycle`,"vnode hook":`lifecycle`,"directive hook":`lifecycle`,"transition hook":`lifecycle`,"ref function":`setup`,"async component loader":`setup`,"scheduler flush":`render`,"app errorHandler":`lifecycle`,"app warnHandler":`lifecycle`,"app unmount cleanup function":`lifecycle`,0:`setup`,1:`render`,2:`watcher`,3:`watcher`,4:`watcher`,5:`event`,6:`event`,7:`lifecycle`,8:`lifecycle`,9:`lifecycle`,10:`lifecycle`,11:`lifecycle`,12:`setup`,13:`setup`,14:`render`,15:`render`,16:`lifecycle`,sp:`lifecycle`,bc:`lifecycle`,c:`lifecycle`,bm:`lifecycle`,m:`lifecycle`,bu:`lifecycle`,u:`lifecycle`,bum:`lifecycle`,um:`lifecycle`,a:`lifecycle`,da:`lifecycle`,ec:`lifecycle`,rtc:`lifecycle`,rtg:`lifecycle`};function getComponentName(te){if(!te)return`AnonymousComponent`;let oe=te.$options;return oe.__name||oe.name||`AnonymousComponent`}function buildComponentHierarchy(te){let oe=[],xe=te;for(;xe&&oe.length<MAX_HIERARCHY_DEPTH;)oe.push(getComponentName(xe)),xe=xe.$parent;return oe}function serializeProps(te,oe,xe=DEFAULT_PROPS_DENYLIST){return safeClone(te,{mode:`display`,maxDepth:oe,arrayCap:MAX_PROP_ARRAY_LENGTH,objectKeyCap:MAX_PROP_OBJECT_KEYS,stringCap:MAX_PROP_STRING_LENGTH,denylist:xe})}function buildComponentHierarchyFrames(te,oe){let xe=[],Se=te;for(;Se&&xe.length<MAX_HIERARCHY_DEPTH;){let te=Se.$options,Te={component:getComponentName(Se),file:te.__file??null};oe.attachProps&&Se.$props&&(Te.props=serializeProps(Se.$props,oe.propsMaxDepth,oe.propsDenylist)),xe.push(Te),Se=Se.$parent}return xe}function getErrorOrigin(te){return INFO_TO_ORIGIN[te]??`unknown`}var ROUTE_PARAMS_DEPTH=2;function routeNameOf(te){return typeof te==`string`?te:typeof te==`symbol`?te.toString():null}function matchedNames(te){return Array.isArray(te)?te.map(te=>!te||typeof te!=`object`?`unknown`:routeNameOf(te.name)??`unknown`):[]}function recordOrEmpty(te){return!te||typeof te!=`object`?{}:te}function getRouteContext(te,oe={}){if(!te||typeof te!=`object`||!(`currentRoute`in te))return null;let xe=te.currentRoute;if(!xe||typeof xe!=`object`||!(`value`in xe))return null;let Se=xe.value;if(!Se||typeof Se!=`object`)return null;let Te=Se,Ee=oe.denylist??DEFAULT_PROPS_DENYLIST,De=redactObjectValues(recordOrEmpty(Te.params),Ee),ke=redactObjectValues(recordOrEmpty(Te.query),Ee);return{name:routeNameOf(Te.name),path:typeof Te.path==`string`?Te.path:``,fullPath:typeof Te.fullPath==`string`?redactUrlQuery(Te.fullPath,Ee):``,params:serializeProps(De,ROUTE_PARAMS_DEPTH,Ee),query:serializeProps(ke,ROUTE_PARAMS_DEPTH,Ee),hash:typeof Te.hash==`string`?Te.hash:``,matched:matchedNames(Te.matched)}}var tagger=createIdentityTagger({sdkName:`@flareapp/vue`,sdkVersion:PACKAGE_VERSION,frameworkName:FrameworkName.Vue});function registerVueSdkInfo(te){tagger.registerSdkIdentity(te)}function tagVueFramework(te,oe){tagger.tagFramework(te,oe)}var PROFILE=Symbol(`flareComponentProfile`);function nearestMarker(te){for(let oe=te.parent;oe;oe=oe.parent){let te=oe[PROFILE];if(te)return te.marker}return null}function createComponentProfilerMixin(te){return{beforeMount(){try{let oe=activeComponentRoot();if(!oe)return;let xe=getComponentName(this);if(!te(xe))return;let Se=this.$,Te=resolveComponentParent(nearestMarker(Se),oe)??oe,Ee=reserveSpanId(Te.traceId);if(!Ee)return;Se[PROFILE]={marker:{traceId:Te.traceId,parentSpanId:Ee},pending:{name:xe,spanId:Ee,startNano:nowNano(),parent:Te}}}catch{}},mounted(){try{let te=this.$[PROFILE],oe=te?.pending;if(!te||!oe)return;te.pending=null,recordComponentSpan({name:oe.name,spanId:oe.spanId,parent:oe.parent,startTimeUnixNano:oe.startNano,endTimeUnixNano:nowNano()})}catch{}}}}var NAVIGATION_CANCELLED=8;function traceVueRouter(te,oe={}){return isVueRouter(te)?instrumentOnce(te,xe=>install(te,xe,oe)):()=>{}}function isVueRouter(te){return typeof te!=`object`||!te?!1:`beforeEach`in te&&typeof te.beforeEach==`function`&&`afterEach`in te&&typeof te.afterEach==`function`}function install(te,oe,xe){let Se=registerNavigationSource();oe(()=>Se.unregister());let Te=xe.includeRouterBase?normalizeRouteBase(te.options?.history?.base):``;function Ee(te){return routeName(()=>te.matched?.[te.matched.length-1]?.path,te.path,De(te),Te)}function De(oe){let xe=oe.fullPath??oe.path;if(xe)return resolveHref(()=>te.resolve?.(xe)?.href,xe)}function ke(te){return!te||!te.matched||te.matched.length===0}let Ae=!1,je=!1;try{let oe=te.currentRoute?.value;oe&&oe.matched&&oe.matched.length>0&&(Se.setActiveRouteName(Ee(oe)),Ae=!0)}catch{}oe(te.beforeEach(insulate((te,oe)=>{!Ae&&ke(oe)?Se.setActiveRouteName(Ee(te)):te.fullPath&&oe?.fullPath&&te.fullPath===oe.fullPath||(je||(je=!0,Se.startNavigation({path:te.path,url:De(te),hold:!0})),Se.setActiveRouteName(Ee(te)))}))),oe(te.afterEach(insulate((te,oe,xe)=>{!Ae&&ke(oe)?xe||(Ae=!0,Se.setActiveRouteName(Ee(te))):je&&(xe?xe.type!==NAVIGATION_CANCELLED&&(je=!1,Se.settleNavigation(Ee(oe))):(je=!1,Se.settleNavigation(Ee(te))))}))),typeof te.onError==`function`&&oe(te.onError(insulate(()=>{if(!je)return;je=!1;let oe=te.currentRoute?.value;Se.settleNavigation(oe?Ee(oe):{name:``,source:`url`})})))}function vueContextToAttributes(te){let oe={info:te.vue.info,errorOrigin:te.vue.errorOrigin,componentName:te.vue.componentName,componentHierarchy:te.vue.componentHierarchy,componentHierarchyFrames:te.vue.componentHierarchyFrames};return te.vue.componentProps&&(oe.componentProps=te.vue.componentProps),te.vue.route&&(oe.route=te.vue.route),toCustomContext(`vue`,oe)}function vueWarningContextToAttributes(te){let oe={type:te.vue.type,info:te.vue.info,componentName:te.vue.componentName,componentTrace:te.vue.componentTrace};return te.vue.route&&(oe.route=te.vue.route),toCustomContext(`vue`,oe)}var installedApps=new WeakSet,flareVue=(te,oe)=>{if(installedApps.has(te))return;let xe=resolveFlare(oe?.flare);installedApps.add(te),oe?.flare||registerVueSdkInfo(xe),tagVueFramework(xe,te.version);let Se=oe?.attachProps??!1,Te=oe?.propsMaxDepth??2,Ee=resolveDenylist$1(oe?.propsDenylist,oe?.replaceDefaultDenylist),De=te.config.errorHandler;if(te.config.errorHandler=(ke,Ae,je)=>{let Me=convertToError(ke);oe?.beforeEvaluate?.({error:Me,instance:Ae,info:je});let Ne=getErrorOrigin(je),Pe=getComponentName(Ae),Fe=Se&&Ae?.$props?serializeProps(Ae.$props,Te,Ee):void 0,Ie=buildComponentHierarchy(Ae),Le=buildComponentHierarchyFrames(Ae,{attachProps:Se,propsMaxDepth:Te,propsDenylist:Ee}),Re=getRouteContext(te.config.globalProperties.$router,{denylist:Ee}),ze={vue:{info:je,errorOrigin:Ne,componentName:Pe,...Fe&&{componentProps:Fe},componentHierarchy:Ie,componentHierarchyFrames:Le,...Re&&{route:Re}}},Be=oe?.beforeSubmit?.({error:Me,instance:Ae,info:je,context:ze})??ze;xe.reportSilently(Me,vueContextToAttributes(Be)),oe?.afterSubmit?.({error:Me,instance:Ae,info:je,context:Be}),typeof De==`function`?De(ke,Ae,je):console.error(ke)},oe?.captureWarnings){let oe=te.config.warnHandler;te.config.warnHandler=(Se,Te,De)=>{let ke=getComponentName(Te),Ae=getRouteContext(te.config.globalProperties.$router,{denylist:Ee}),je={vue:{type:`warning`,info:Se,componentName:ke,componentTrace:De,...Ae&&{route:Ae}}};Promise.resolve(xe.reportMessage(Se,`warning`,vueWarningContextToAttributes(je))).catch(()=>{}),typeof oe==`function`&&oe(Se,Te,De)}}if(oe?.router)try{let xe=traceVueRouter(oe.router,{includeRouterBase:oe.includeRouterBase});typeof te.onUnmount==`function`&&te.onUnmount(xe)}catch{}let ke=oe?.profileComponents;if(ke===!0||Array.isArray(ke)&&ke.length>0)try{te.mixin(createComponentProfilerMixin(createComponentMatcher(ke)))}catch{}},FlareErrorBoundary=defineComponent({name:`FlareErrorBoundary`,props:{flare:{type:Object,default:void 0},beforeEvaluate:{type:Function,default:void 0},beforeSubmit:{type:Function,default:void 0},afterSubmit:{type:Function,default:void 0},onReset:{type:Function,default:void 0},resetKeys:{type:Array,default:void 0},attachProps:{type:Boolean,default:!1},propsMaxDepth:{type:Number,default:2},propsDenylist:{type:RegExp,default:void 0},replaceDefaultDenylist:{type:Boolean,default:!1}},setup(te,{slots:oe}){let xe=resolveFlare(te.flare);tagVueFramework(xe,getCurrentInstance$1()?.appContext.app.version);let Se=getCurrentInstance$1(),Te=ref(null),Ee=ref(void 0),De=ref([]),ke=ref([]),Ae=()=>{te.onReset?.(Te.value),Te.value=null,Ee.value=void 0,De.value=[],ke.value=[]};return watch(()=>te.resetKeys,(te,oe)=>{if(Te.value===null||!te||!oe)return;let xe=oe.length!==te.length,Se=te.some((te,xe)=>!Object.is(te,oe[xe]));(xe||Se)&&Ae()}),onErrorCaptured((oe,Ae,je)=>{let Me=convertToError(oe);te.beforeEvaluate?.({error:Me,instance:Ae,info:je});let Ne=resolveDenylist$1(te.propsDenylist,te.replaceDefaultDenylist),Pe=buildComponentHierarchy(Ae),Fe=buildComponentHierarchyFrames(Ae,{attachProps:te.attachProps,propsMaxDepth:te.propsMaxDepth,propsDenylist:Ne}),Ie=getComponentName(Ae);Te.value=Me;let Le=te.attachProps&&Ae?.$props?serializeProps(Ae.$props,te.propsMaxDepth,Ne):void 0,Re=getErrorOrigin(je),ze=getRouteContext(Se?.appContext.config.globalProperties.$router,{denylist:Ne}),Be={vue:{info:je,errorOrigin:Re,...ze&&{route:ze},componentName:Ie,...Le&&{componentProps:Le},componentHierarchy:Pe,componentHierarchyFrames:Fe}},Ve=te.beforeSubmit?.({error:Me,instance:Ae,info:je,context:Be})??Be;return Ee.value=Ve.vue.componentProps,De.value=Ve.vue.componentHierarchy,ke.value=Ve.vue.componentHierarchyFrames,xe.reportSilently(Me,vueContextToAttributes(Ve)),te.afterSubmit?.({error:Me,instance:Ae,info:je,context:Ve}),!1}),()=>Te.value===null?oe.default?.():oe.fallback?oe.fallback({error:Te.value,...Ee.value&&{componentProps:Ee.value},componentHierarchy:De.value,componentHierarchyFrames:ke.value,resetErrorBoundary:Ae}):null}});registerDefaultFlare(()=>flare);var a=Object.defineProperty,c=(te,oe,xe)=>oe in te?a(te,oe,{enumerable:!0,configurable:!0,writable:!0,value:xe}):te[oe]=xe,o=(te,oe,xe)=>(c(te,typeof oe==`symbol`?oe:oe+``,xe),xe),namespace=`@@vue3-sticky-directive`,events=[`resize`,`scroll`,`touchstart`,`touchmove`,`touchend`,`pageshow`,`load`],batchStyle=(te,oe={},xe={})=>{for(let xe in oe)te.style[xe]=oe[xe];for(let oe in xe)xe[oe]&&!te.classList.contains(oe)?te.classList.add(oe):!xe[oe]&&te.classList.contains(oe)&&te.classList.remove(oe)},Sticky=class{constructor(te,oe){o(this,`el`),o(this,`vm`),o(this,`unSubscribers`),o(this,`isPending`),o(this,`state`),o(this,`lastState`),o(this,`options`),o(this,`placeholderEl`),o(this,`containerEl`),this.el=te,this.vm=oe,this.unSubscribers=[],this.isPending=!1,this.state={isTopSticky:null,isBottomSticky:null,height:null,width:null,xOffset:null},this.lastState={top:null,bottom:null,sticked:!1};let xe=this.getAttribute(`sticky-offset`)||{},Se=this.getAttribute(`sticky-side`)||`top`,Te=this.getAttribute(`sticky-z-index`)||`10`,Ee=this.getAttribute(`on-stick`)||null;this.options={topOffset:Number(xe.top)||0,bottomOffset:Number(xe.bottom)||0,shouldTopSticky:Se===`top`||Se===`both`,shouldBottomSticky:Se===`bottom`||Se===`both`,zIndex:Te,onStick:Ee}}doBind(){if(this.unSubscribers.length>0)return;let{el:te,vm:oe}=this;oe.$nextTick(()=>{this.placeholderEl=document.createElement(`div`),this.containerEl=this.getContainerEl(),te.parentElement.insertBefore(this.placeholderEl,te),events.forEach(te=>{let oe=this.update.bind(this);this.unSubscribers.push(()=>window.removeEventListener(te,oe)),this.unSubscribers.push(()=>this.containerEl.removeEventListener(te,oe)),window.addEventListener(te,oe,{passive:!0}),this.containerEl.addEventListener(te,oe,{passive:!0})})})}doUnbind(){this.unSubscribers.forEach(te=>te()),this.unSubscribers=[],this.resetElement()}update(){this.isPending||=(requestAnimationFrame(()=>{this.isPending=!1,this.recomputeState(),this.updateElements()}),!0)}isTopSticky(){if(!this.options.shouldTopSticky)return!1;let te=this.state.placeholderElRect.top,oe=this.state.containerElRect.bottom,xe=this.options.topOffset,Se=this.options.bottomOffset;return te<=xe&&oe>=Se}isBottomSticky(){if(!this.options.shouldBottomSticky)return!1;let te=window.innerHeight-this.state.placeholderElRect.top-this.state.height,oe=window.innerHeight-this.state.containerElRect.top,xe=this.options.topOffset;return te<=this.options.bottomOffset&&oe>=xe}recomputeState(){this.state=Object.assign({},this.state,{height:this.getHeight(),width:this.getWidth(),xOffset:this.getXOffset(),placeholderElRect:this.getPlaceholderElRect(),containerElRect:this.getContainerElRect()}),this.state.isTopSticky=this.isTopSticky(),this.state.isBottomSticky=this.isBottomSticky()}fireEvents(){typeof this.options.onStick==`function`&&(this.lastState.top!==this.state.isTopSticky||this.lastState.bottom!==this.state.isBottomSticky||this.lastState.sticked!==(this.state.isTopSticky||this.state.isBottomSticky))&&(this.lastState={top:this.state.isTopSticky,bottom:this.state.isBottomSticky,sticked:this.state.isBottomSticky||this.state.isTopSticky},this.options.onStick(this.lastState))}updateElements(){let te={paddingTop:0},oe={position:`static`,top:`auto`,bottom:`auto`,left:`auto`,width:`auto`,zIndex:this.options.zIndex},xe={"vue-sticky-placeholder":!0},Se={"vue-sticky-el":!0,"top-sticky":!1,"bottom-sticky":!1};if(this.state.isTopSticky){oe.position=`fixed`,oe.top=this.options.topOffset+`px`,oe.left=this.state.xOffset+`px`,oe.width=this.state.width+`px`;let xe=this.state.containerElRect.bottom-this.state.height-this.options.bottomOffset-this.options.topOffset;xe<0&&(oe.top=xe+this.options.topOffset+`px`),te.paddingTop=this.state.height+`px`,Se[`top-sticky`]=!0}else if(this.state.isBottomSticky){oe.position=`fixed`,oe.bottom=this.options.bottomOffset+`px`,oe.left=this.state.xOffset+`px`,oe.width=this.state.width+`px`;let xe=window.innerHeight-this.state.containerElRect.top-this.state.height-this.options.bottomOffset-this.options.topOffset;xe<0&&(oe.bottom=xe+this.options.bottomOffset+`px`),te.paddingTop=this.state.height+`px`,Se[`bottom-sticky`]=!0}else te.paddingTop=0;batchStyle(this.el,oe,Se),batchStyle(this.placeholderEl,te,xe),this.fireEvents()}resetElement(){[`position`,`top`,`bottom`,`left`,`width`,`zIndex`].forEach(te=>{this.el.style.removeProperty(te)}),this.el.classList.remove(`bottom-sticky`,`top-sticky`);let{parentElement:te}=this.placeholderEl;te&&te.removeChild(this.placeholderEl)}getContainerEl(){let te=this.el.parentElement;for(;te&&te.tagName!==`HTML`&&te.tagName!==`BODY`&&te.nodeType===1;){if(te.hasAttribute(`sticky-container`))return te;te=te.parentElement}return this.el.parentElement}getXOffset(){return this.placeholderEl.getBoundingClientRect().left}getWidth(){return this.placeholderEl.getBoundingClientRect().width}getHeight(){return this.el.getBoundingClientRect().height}getPlaceholderElRect(){return this.placeholderEl.getBoundingClientRect()}getContainerElRect(){return this.containerEl.getBoundingClientRect()}getAttribute(name){const expr=this.el.getAttribute(name);let result;if(expr){if(this.vm[expr])result=this.vm[expr];else try{result=eval(`(${expr})`)}catch{result=expr}}return result}},Sticky$1={mounted(te,oe){(typeof oe.value>`u`||oe.value)&&(te[namespace]=new Sticky(te,oe.instance),te[namespace].doBind())},unmounted(te){te[namespace]&&(te[namespace].doUnbind(),te[namespace]=void 0)},updated(te,oe){typeof oe.value>`u`||oe.value?(te[namespace]||(te[namespace]=new Sticky(te,oe.instance)),te[namespace].doBind()):te[namespace]&&te[namespace].doUnbind()}},StickyPlugin={install(te){te.directive(`Sticky`,Sticky$1)}},pinia=createPinia(),event_default=defineKonnectioElement(`konnectio-event`,Event_default,te=>{te.use(flareVue),te.use(instance),te.use(pinia),te.use(plugin),te.use(StickyPlugin)});return event_default})();
|