(()=>{var Sa=Object.create;var tt=Object.defineProperty,ka=Object.defineProperties,ci=Object.getOwnPropertyDescriptor,Ca=Object.getOwnPropertyDescriptors,Aa=Object.getOwnPropertyNames,li=Object.getOwnPropertySymbols,Oa=Object.getPrototypeOf,di=Object.prototype.hasOwnProperty,Ta=Object.prototype.propertyIsEnumerable,ui=Math.pow,pi=(t,e,r)=>e in t?tt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,w=(t,e)=>{for(var r in e||(e={}))di.call(e,r)&&pi(t,r,e[r]);if(li)for(var r of li(e))Ta.call(e,r)&&pi(t,r,e[r]);return t},H=(t,e)=>ka(t,Ca(e)),Pa=t=>tt(t,"__esModule",{value:!0});var fi=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(e,r)=>(typeof require!="undefined"?require:e)[r]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var S=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ea=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Aa(e))!di.call(t,n)&&n!=="default"&&tt(t,n,{get:()=>e[n],enumerable:!(r=ci(e,n))||r.enumerable});return t},I=t=>Ea(Pa(tt(t!=null?Sa(Oa(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),A=(t,e,r,n)=>{for(var i=n>1?void 0:n?ci(e,r):e,s=t.length-1,a;s>=0;s--)(a=t[s])&&(i=(n?a(e,r,i):a(i))||i);return n&&i&&tt(e,r,i),i};var u=(t,e,r)=>new Promise((n,i)=>{var s=d=>{try{c(r.next(d))}catch(f){i(f)}},a=d=>{try{c(r.throw(d))}catch(f){i(f)}},c=d=>d.done?n(d.value):Promise.resolve(d.value).then(s,a);c((r=r.apply(t,e)).next())});var R=S((zd,jt)=>{var mi,gi,yi,hi,bi,vi,xi,wi,Si,Dt,Lr,ki,Ci,Ai,ke,Oi,Ti,Pi,Ei,Ii,Ri,_i,Mi,Hi,qt;(function(t){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&undefined?define("tslib",["exports"],function(n){t(r(e,r(n)))}):typeof jt=="object"&&typeof jt.exports=="object"?t(r(e,r(jt.exports))):t(r(e));function r(n,i){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(s,a){return n[s]=i?i(s,a):a}}})(function(t){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])};mi=function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(n,i);function s(){this.constructor=n}n.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)},gi=Object.assign||function(n){for(var i,s=1,a=arguments.length;s=0;g--)(f=n[g])&&(d=(c<3?f(d):c>3?f(i,s,d):f(i,s))||d);return c>3&&d&&Object.defineProperty(i,s,d),d},bi=function(n,i){return function(s,a){i(s,a,n)}},vi=function(n,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,i)},xi=function(n,i,s,a){function c(d){return d instanceof s?d:new s(function(f){f(d)})}return new(s||(s=Promise))(function(d,f){function g(h){try{v(a.next(h))}catch(oe){f(oe)}}function C(h){try{v(a.throw(h))}catch(oe){f(oe)}}function v(h){h.done?d(h.value):c(h.value).then(g,C)}v((a=a.apply(n,i||[])).next())})},wi=function(n,i){var s={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},a,c,d,f;return f={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function g(v){return function(h){return C([v,h])}}function C(v){if(a)throw new TypeError("Generator is already executing.");for(;s;)try{if(a=1,c&&(d=v[0]&2?c.return:v[0]?c.throw||((d=c.return)&&d.call(c),0):c.next)&&!(d=d.call(c,v[1])).done)return d;switch(c=0,d&&(v=[v[0]&2,d.value]),v[0]){case 0:case 1:d=v;break;case 4:return s.label++,{value:v[1],done:!1};case 5:s.label++,c=v[1],v=[0];continue;case 7:v=s.ops.pop(),s.trys.pop();continue;default:if(d=s.trys,!(d=d.length>0&&d[d.length-1])&&(v[0]===6||v[0]===2)){s=0;continue}if(v[0]===3&&(!d||v[1]>d[0]&&v[1]=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},Lr=function(n,i){var s=typeof Symbol=="function"&&n[Symbol.iterator];if(!s)return n;var a=s.call(n),c,d=[],f;try{for(;(i===void 0||i-- >0)&&!(c=a.next()).done;)d.push(c.value)}catch(g){f={error:g}}finally{try{c&&!c.done&&(s=a.return)&&s.call(a)}finally{if(f)throw f.error}}return d},ki=function(){for(var n=[],i=0;i1||g(M,Se)})})}function g(M,Se){try{C(a[M](Se))}catch(Rr){oe(d[0][3],Rr)}}function C(M){M.value instanceof ke?Promise.resolve(M.value.v).then(v,h):oe(d[0][2],M)}function v(M){g("next",M)}function h(M){g("throw",M)}function oe(M,Se){M(Se),d.shift(),d.length&&g(d[0][0],d[0][1])}},Ti=function(n){var i,s;return i={},a("next"),a("throw",function(c){throw c}),a("return"),i[Symbol.iterator]=function(){return this},i;function a(c,d){i[c]=n[c]?function(f){return(s=!s)?{value:ke(n[c](f)),done:c==="return"}:d?d(f):f}:d}},Pi=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=n[Symbol.asyncIterator],s;return i?i.call(n):(n=typeof Dt=="function"?Dt(n):n[Symbol.iterator](),s={},a("next"),a("throw"),a("return"),s[Symbol.asyncIterator]=function(){return this},s);function a(d){s[d]=n[d]&&function(f){return new Promise(function(g,C){f=n[d](f),c(g,C,f.done,f.value)})}}function c(d,f,g,C){Promise.resolve(C).then(function(v){d({value:v,done:g})},f)}},Ei=function(n,i){return Object.defineProperty?Object.defineProperty(n,"raw",{value:i}):n.raw=i,n};var r=Object.create?function(n,i){Object.defineProperty(n,"default",{enumerable:!0,value:i})}:function(n,i){n.default=i};Ii=function(n){if(n&&n.__esModule)return n;var i={};if(n!=null)for(var s in n)s!=="default"&&Object.prototype.hasOwnProperty.call(n,s)&&qt(i,n,s);return r(i,n),i},Ri=function(n){return n&&n.__esModule?n:{default:n}},_i=function(n,i,s,a){if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?n!==i||!a:!i.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?a:s==="a"?a.call(n):a?a.value:i.get(n)},Mi=function(n,i,s,a,c){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!c)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?n!==i||!c:!i.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?c.call(n,s):c?c.value=s:i.set(n,s),s},Hi=function(n,i){if(i===null||typeof i!="object"&&typeof i!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?i===n:n.has(i)},t("__extends",mi),t("__assign",gi),t("__rest",yi),t("__decorate",hi),t("__param",bi),t("__metadata",vi),t("__awaiter",xi),t("__generator",wi),t("__exportStar",Si),t("__createBinding",qt),t("__values",Dt),t("__read",Lr),t("__spread",ki),t("__spreadArrays",Ci),t("__spreadArray",Ai),t("__await",ke),t("__asyncGenerator",Oi),t("__asyncDelegator",Ti),t("__asyncValues",Pi),t("__makeTemplateObject",Ei),t("__importStar",Ii),t("__importDefault",Ri),t("__classPrivateFieldGet",_i),t("__classPrivateFieldSet",Mi),t("__classPrivateFieldIn",Hi)})});var rt=S(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.compose=Ce.CompositeTransducer=void 0;var Dr=class{constructor(e,r){this.a=e,this.b=r}async_(e){return this.b.async_(this.a.async_(e))}sync(e){return this.b.sync(this.a.sync(e))}};Ce.CompositeTransducer=Dr;function Ia(t,e){return new Dr(t,e)}Ce.compose=Ia});var Li=S(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.decompose=void 0;var Ra=rt();function*qr(t){t instanceof Ra.CompositeTransducer?(yield*qr(t.a),yield*qr(t.b)):yield t}Ut.decompose=qr});var N=S(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.syncReturned=x.asyncReturned=x.isReturned=x.isYielded=x.AsyncIteratorHandler=x.by=x.toAsyncIterable=x.isArrayLike=x.asyncIterable=x.iterable=x.toIterable=x.isPromiseLike=x.isAsyncIterable=x.isIterable=x.value=x.key=x.comparators=x.descending=x.ascending=void 0;var se=R();function Bt(t,e){return te?1:0}x.ascending=Bt;function _a(t,e){return te?-1:0}x.descending=_a;function Ma(...t){return(e,r)=>{for(let n of t){let i=n(e,r);if(i!=0)return i}return 0}}x.comparators=Ma;function Ha(t){return Object.assign(e=>e[t],{name:t})}x.key=Ha;function La(t){return e=>e[t]}x.value=La;function Da(t){return typeof t=="object"&&Symbol.iterator in t}x.isIterable=Da;function qa(t){return typeof t=="object"&&Symbol.asyncIterator in t}x.isAsyncIterable=qa;function ja(t){return typeof t=="object"&&"then"in t}x.isPromiseLike=ja;function Ua(...t){return t}x.toIterable=Ua;function*Ba(t){for(let e=0;ee(r[t],n[t])}function Va(t,e=Bt){return(r,n)=>e(t(r),t(n))}var Di=class{constructor(){this.handlers=[],this.state=[]}value(e){this.newState({value:e,done:!1})}error(e){this.newState(e)}close(e){this.newState({value:e,done:!0})}[Symbol.asyncIterator](){return this}next(){return new Promise((e,r)=>{this.newHandler([e,r])})}newState(e){let r=this.handlers.shift();if(typeof r=="undefined")return this.state.push(e);let n=this.state.shift();if(typeof n=="undefined")return this.consume(e,r);this.consume(n,r),this.newState(e)}newHandler(e){let r=this.state.shift();if(typeof r=="undefined")return this.handlers.push(e);let n=this.handlers.shift();if(typeof n=="undefined")return this.consume(r,e);this.consume(r,n),this.newHandler(e)}consume(e,[r,n]){e instanceof Error?n(e):r(e)}};x.AsyncIteratorHandler=Di;function Na(t){return t&&typeof t=="object"&&"yielded"in t}x.isYielded=Na;function $a(t){return t&&typeof t=="object"&&"returned"in t}x.isReturned=$a;function Ja(t){return se.__asyncGenerator(this,arguments,function*(){for(;;){let{value:r,done:n}=yield se.__await(t.next());if(n){yield yield se.__await({returned:r});break}else yield yield se.__await({yielded:r})}})}x.asyncReturned=Ja;function*Ya(t){for(;;){let{value:e,done:r}=t.next();if(r){yield{returned:e};break}else yield{yielded:e}}}x.syncReturned=Ya});var qi=S(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.dedupe=Oe.DedupeTransducer=void 0;var Ae=R(),Za=N(),jr=class{constructor(e){this.comparator=e}async_(e){return Ae.__asyncGenerator(this,arguments,function*(){var n,i;let s;try{for(var a=Ae.__asyncValues(e),c;c=yield Ae.__await(a.next()),!c.done;){let d=c.value;typeof s=="undefined"?yield yield Ae.__await(d):this.comparator(d,s)!==0&&(yield yield Ae.__await(d)),s=d}}catch(d){n={error:d}}finally{try{c&&!c.done&&(i=a.return)&&(yield Ae.__await(i.call(a)))}finally{if(n)throw n.error}}})}*sync(e){let r;for(let n of e)typeof r=="undefined"?yield n:this.comparator(n,r)!==0&&(yield n),r=n}};Oe.DedupeTransducer=jr;function Qa(t=Za.ascending){return new jr(t)}Oe.dedupe=Qa});var ji=S(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.drop=Te.DropTransducer=void 0;var nt=R(),Ur=class{constructor(e){if(this.count=e,typeof e=="undefined")throw new Error("Count can not be undefined")}async_(e){return nt.__asyncGenerator(this,arguments,function*(){var n,i;try{for(var s=nt.__asyncValues(e),a;a=yield nt.__await(s.next()),!a.done;){let c=a.value;--this.count<0&&(yield yield nt.__await(c))}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=s.return)&&(yield nt.__await(i.call(s)))}finally{if(n)throw n.error}}})}*sync(e){for(let r of e)--this.count<0&&(yield r)}};Te.DropTransducer=Ur;function Xa(t){return new Ur(t)}Te.drop=Xa});var Ui=S(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.dropWhile=Pe.DropWhileTransducer=void 0;var it=R(),Br=class{constructor(e){this.predicate=e}async_(e){return it.__asyncGenerator(this,arguments,function*(){var n,i;let s=!0;try{for(var a=it.__asyncValues(e),c;c=yield it.__await(a.next()),!c.done;){let d=c.value;s&&(s=this.predicate(d)),s||(yield yield it.__await(d))}}catch(d){n={error:d}}finally{try{c&&!c.done&&(i=a.return)&&(yield it.__await(i.call(a)))}finally{if(n)throw n.error}}})}*sync(e){let r=!0;for(let n of e)r&&(r=this.predicate(n)),r||(yield n)}};Pe.DropWhileTransducer=Br;function ec(t){return new Br(t)}Pe.dropWhile=ec});var Gt=S(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.accept=ae.filter=ae.FilterTransducer=void 0;var ot=R(),Gr=class{constructor(e){this.predicate=e}async_(e){return ot.__asyncGenerator(this,arguments,function*(){var n,i;try{for(var s=ot.__asyncValues(e),a;a=yield ot.__await(s.next()),!a.done;){let c=a.value;this.predicate(c)&&(yield yield ot.__await(c))}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=s.return)&&(yield ot.__await(i.call(s)))}finally{if(n)throw n.error}}})}*sync(e){for(let r of e)this.predicate(r)&&(yield r)}};ae.FilterTransducer=Gr;function Bi(t){return new Gr(t)}ae.filter=Bi;ae.accept=Bi});var Fr=S(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.first=Ie.FirstTransducer=void 0;var Ee=R(),Wr=class{async_(e){return Ee.__asyncGenerator(this,arguments,function*(){var n,i;try{for(var s=Ee.__asyncValues(e),a;a=yield Ee.__await(s.next()),!a.done;){let c=a.value;return yield Ee.__await(yield yield Ee.__await(c))}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=s.return)&&(yield Ee.__await(i.call(s)))}finally{if(n)throw n.error}}})}*sync(e){for(let r of e)return yield r}};Ie.FirstTransducer=Wr;function tc(){return new Wr}Ie.first=tc});var Gi=S(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.find=void 0;var rc=Gt(),nc=Fr(),ic=rt();function oc(t){return(0,ic.compose)((0,rc.filter)(t),(0,nc.first)())}Wt.find=oc});var Wi=S(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.flatMap=Re.FlatMapTransducer=void 0;var me=R(),Kr=class{constructor(e){this.mapper=e}async_(e){return me.__asyncGenerator(this,arguments,function*(){var n,i;try{for(var s=me.__asyncValues(e),a;a=yield me.__await(s.next()),!a.done;){let c=a.value;yield me.__await(yield*me.__asyncDelegator(me.__asyncValues(this.mapper(c))))}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=s.return)&&(yield me.__await(i.call(s)))}finally{if(n)throw n.error}}})}*sync(e){for(let r of e)yield*this.mapper(r)}};Re.FlatMapTransducer=Kr;function sc(t){return new Kr(t)}Re.flatMap=sc});var Ki=S(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.transducer=ce.identity=ce.IdentityTransducer=void 0;var zr=class{async_(e){return e}sync(e){return e}};ce.IdentityTransducer=zr;function Fi(){return new zr}ce.identity=Fi;ce.transducer=Fi});var Nr=S(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.last=_e.LastTransducer=void 0;var st=R(),Vr=class{async_(e){return st.__asyncGenerator(this,arguments,function*(){var n,i;let s;try{for(var a=st.__asyncValues(e),c;c=yield st.__await(a.next()),!c.done;)s=c.value}catch(d){n={error:d}}finally{try{c&&!c.done&&(i=a.return)&&(yield st.__await(i.call(a)))}finally{if(n)throw n.error}}s!==void 0&&(yield yield st.__await(s))})}*sync(e){let r;for(r of e);r!==void 0&&(yield r)}};_e.LastTransducer=Vr;function ac(){return new Vr}_e.last=ac});var zi=S(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.map=Me.MapTransducer=void 0;var at=R(),$r=class{constructor(e){this.mapper=e}async_(e){return at.__asyncGenerator(this,arguments,function*(){var n,i;try{for(var s=at.__asyncValues(e),a;a=yield at.__await(s.next()),!a.done;){let c=a.value;yield yield at.__await(this.mapper(c))}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=s.return)&&(yield at.__await(i.call(s)))}finally{if(n)throw n.error}}})}*sync(e){for(let r of e)yield this.mapper(r)}};Me.MapTransducer=$r;function cc(t){return new $r(t)}Me.map=cc});var Yr=S(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.scan=Le.ScanTransducer=void 0;var He=R(),Jr=class{constructor(e,r){this.reducer=e,this.seed=r}async_(e){return He.__asyncGenerator(this,arguments,function*(){var n,i;let s=this.seed;yield yield He.__await(s);try{for(var a=He.__asyncValues(e),c;c=yield He.__await(a.next()),!c.done;){let d=c.value;yield yield He.__await(s=this.reducer(s,d))}}catch(d){n={error:d}}finally{try{c&&!c.done&&(i=a.return)&&(yield He.__await(i.call(a)))}finally{if(n)throw n.error}}})}*sync(e){let r=this.seed;yield r;for(let n of e)yield r=this.reducer(r,n)}};Le.ScanTransducer=Jr;function lc(t,e){return new Jr(t,e)}Le.scan=lc});var Vi=S(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.reduce=void 0;var dc=rt(),uc=Nr(),pc=Yr();function fc(t,e){return(0,dc.compose)((0,pc.scan)(t,e),(0,uc.last)())}Ft.reduce=fc});var Ni=S(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.reject=void 0;var mc=Gt();function gc(t){return new mc.FilterTransducer(e=>!t(e))}Kt.reject=gc});var $i=S(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.sum=Y.subtract=Y.add=Y.increment=void 0;function yc(t){return t+1}Y.increment=yc;function hc(t,e){return e===void 0?r=>t+r:t+e}Y.add=hc;function bc(t,e){return e===void 0?r=>r-t:t-e}Y.subtract=bc;var vc=(t,e)=>t+e;Y.sum=vc});var Nt=S(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.AsyncSequence=G.Sequence=G.sequence=G.range=G.repeat=G.iterate=void 0;var Zr=$i(),Qr=N(),Ji=ct();function*zt(t,e){for(;;)yield e,e=t(e)}G.iterate=zt;function*xc(t){for(;;)yield t()}G.repeat=xc;function*wc(t,e,r=1){if(r===0)throw new Error("step can not be 0");if(e===void 0)yield*zt((0,Zr.add)(r),t);else{let n=Math.abs(r);ei>=e)):yield*Xr(zt((0,Zr.add)(n),t),(0,Ji.takeWhile)(i=>i<=e))}}G.range=wc;function Xr(t,...e){return(0,Qr.isIterable)(t)?new Vt(t,e):(0,Qr.isArrayLike)(t)?new Vt((0,Qr.iterable)(t),e):new en(t,e)}G.sequence=Xr;var Vt=class{constructor(e,r){this.source=e,this.transducers=r}[Symbol.iterator](){return this.transducers.reduce((e,r)=>r.sync(e),this.source)[Symbol.iterator]()}};G.Sequence=Vt;var en=class{constructor(e,r){this.source=e,this.transducers=r}[Symbol.asyncIterator](){return this.transducers.reduce((e,r)=>r.async_(e),this.source)[Symbol.asyncIterator]()}};G.AsyncSequence=en});var Qi=S($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.single=void 0;var Yi=R(),Sc=N(),Zi=Nt();function kc(t,...e){return(0,Sc.isIterable)(t)?Cc((0,Zi.sequence)(t,...e)):Ac((0,Zi.sequence)(t,...e))}$t.single=kc;function Cc(t){for(let e of t)return e;throw new Error("Expected a single value")}function Ac(t){var e,r,n,i;return Yi.__awaiter(this,void 0,void 0,function*(){try{for(e=Yi.__asyncValues(t);r=yield e.next(),!r.done;)return r.value}catch(s){n={error:s}}finally{try{r&&!r.done&&(i=e.return)&&(yield i.call(e))}finally{if(n)throw n.error}}throw new Error("Expected a single value")})}});var tn=S(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.array=void 0;var Xi=R(),eo=N(),to=Nt();function Oc(t,...e){return(0,eo.isIterable)(t)||(0,eo.isArrayLike)(t)?Tc((0,to.sequence)(t,...e)):Pc((0,to.sequence)(t,...e))}Jt.array=Oc;function Tc(t){let e=[];for(let r of t)e.push(r);return e}function Pc(t){var e,r,n,i;return Xi.__awaiter(this,void 0,void 0,function*(){let s=[];try{for(e=Xi.__asyncValues(t);r=yield e.next(),!r.done;){let a=r.value;s.push(a)}}catch(a){n={error:a}}finally{try{r&&!r.done&&(i=e.return)&&(yield i.call(e))}finally{if(n)throw n.error}}return s})}});var no=S(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.sort=De.SortTransducer=void 0;var lt=R(),Ec=N(),ro=tn(),rn=class{constructor(e){this.comparator=e}async_(e){return lt.__asyncGenerator(this,arguments,function*(){let n=yield lt.__await((0,ro.array)(e));n.sort(this.comparator),yield lt.__await(yield*lt.__asyncDelegator(lt.__asyncValues(n)))})}*sync(e){let r=(0,ro.array)(e);r.sort(this.comparator),yield*r}};De.SortTransducer=rn;function Ic(t=Ec.ascending){return new rn(t)}De.sort=Ic});var io=S(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.take=qe.TakeTransducer=void 0;var ge=R(),nn=class{constructor(e){if(this.count=e,typeof e=="undefined")throw new Error("Count can not be undefined")}async_(e){return ge.__asyncGenerator(this,arguments,function*(){var n,i;if(this.count<1)return yield ge.__await(void 0);try{for(var s=ge.__asyncValues(e),a;a=yield ge.__await(s.next()),!a.done;){let c=a.value;if(yield yield ge.__await(c),--this.count<1)return yield ge.__await(void 0)}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=s.return)&&(yield ge.__await(i.call(s)))}finally{if(n)throw n.error}}})}*sync(e){if(!(this.count<1)){for(let r of e)if(yield r,--this.count<1)return}}};qe.TakeTransducer=nn;function Rc(t){return new nn(t)}qe.take=Rc});var oo=S(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.takeWhile=Ue.TakeWhileTransducer=void 0;var je=R(),on=class{constructor(e){this.predicate=e}async_(e){return je.__asyncGenerator(this,arguments,function*(){var n,i;try{for(var s=je.__asyncValues(e),a;a=yield je.__await(s.next()),!a.done;){let c=a.value;if(this.predicate(c))yield yield je.__await(c);else return yield je.__await(void 0)}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=s.return)&&(yield je.__await(i.call(s)))}finally{if(n)throw n.error}}})}*sync(e){for(let r of e)if(this.predicate(r))yield r;else return}};Ue.TakeWhileTransducer=on;function _c(t){return new on(t)}Ue.takeWhile=_c});var ao=S(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0})});var Be=S(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.container=le.lazy=le.replace=void 0;function co(t,e,r){return Object.defineProperty(t,e,{value:r})}le.replace=co;function lo(t,e,r){if(typeof r.get=="undefined")throw new Error("@lazy can only decorate getter methods");return Object.defineProperty(t,e,Object.assign(Object.assign({},r),{get(){return co(this,e,r.get.call(this))[e]}}))}le.lazy=lo;function Mc(t){return Object.keys(t).reduce((e,r)=>lo(e,r,{configurable:!0,get:()=>t[r](e)}),{})}le.container=Mc});var bo=S(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.AVLTree=void 0;var uo=R(),Yt=N(),po=Be(),Z=class{constructor(e){this.comparator=e}static empty(e=Yt.ascending){return new fo(e)}static create(e,r,n=Yt.ascending){let i=Z.empty(n);return new K(n,e,r,i,i)}static of(e,r=Yt.ascending){return Z.preSorted(e.sort((0,Yt.by)(0)),r,Z.empty(r))}static preSorted(e,r,n){let i=e.length;switch(i){case 0:return n;case 1:{let[[s,a]]=e;return new K(r,s,a,n,n)}default:{let s=Math.floor(i/2),a=Z.preSorted(e.slice(0,s),r,n),c=Z.preSorted(e.slice(s+1),r,n),[d,f]=e[s];return new K(r,d,f,a,c)}}}};Zt.AVLTree=Z;var fo=class extends Z{constructor(e){super(e);this.isEmpty=!0,this.height=0,this.balance=0}insert(e,r){return new K(this.comparator,e,r,this,this)}contains(e){return!1}lookup(e){}delete(e){return{tree:this}}first(){}last(){}removeFirst(){return{tree:this}}removeLast(){return{tree:this}}toString(){return""}*keys(){}*values(){}*entries(){return[]}},K=class extends Z{constructor(e,r,n,i,s){super(e);this.key=r,this.value=n,this.left=i,this.right=s,this.isEmpty=!1}insert(e,r){let n=this.comparator(e,this.key);return n===0?new K(this.comparator,e,r,this.left,this.right):n<0?this.replaceLeft(this.left.insert(e,r)):this.replaceRight(this.right.insert(e,r))}contains(e){let r=this.comparator(e,this.key);return r===0?!0:r<0?this.left.contains(e):this.right.contains(e)}lookup(e){let r=this.comparator(e,this.key);return r===0?this.value:r<0?this.left.lookup(e):this.right.lookup(e)}delete(e){let r=this.comparator(e,this.key);if(r===0){if(this.left.isEmpty)return{tree:this.right,key:this.key,value:this.value};if(this.right.isEmpty)return{tree:this.left,key:this.key,value:this.value};let{tree:a,key:c,value:d}=this.left.removeLast();return{tree:sn(new K(this.comparator,c,d,a,this.right)),key:this.key,value:this.value}}if(r<0){let{tree:a,key:c,value:d}=this.left.delete(e);return{tree:this.replaceLeft(a),key:c,value:d}}let{tree:n,key:i,value:s}=this.right.delete(e);return{tree:this.replaceRight(n),key:i,value:s}}first(){return this.left.isEmpty?this.value:this.left.first()}last(){return this.right.isEmpty?this.value:this.right.last()}removeFirst(){if(this.left.isEmpty)return{tree:this.right,key:this.key,value:this.value};let{tree:e,key:r,value:n}=this.left.removeFirst();return{tree:this.replaceLeft(e),key:r,value:n}}removeLast(){if(this.right.isEmpty)return{tree:this.left,key:this.key,value:this.value};let{tree:e,key:r,value:n}=this.right.removeLast();return{tree:this.replaceRight(e),key:r,value:n}}replaceLeft(e){return sn(new K(this.comparator,this.key,this.value,e,this.right))}replaceRight(e){return sn(new K(this.comparator,this.key,this.value,this.left,e))}toString(){return`(${this.left} ${this.key}=${this.value} ${this.right})`}get balance(){return this.left.height-this.right.height}get height(){return Math.max(this.left.height,this.right.height)+1}*keys(){yield*this.left.keys(),yield this.key,yield*this.right.keys()}*values(){yield*this.left.values(),yield this.value,yield*this.right.values()}*entries(){yield*this.left.entries(),yield[this.key,this.value],yield*this.right.entries()}};uo.__decorate([po.lazy],K.prototype,"balance",null);uo.__decorate([po.lazy],K.prototype,"height",null);function sn(t){let e=t.balance;return e==-2?Lc(t):e==2?Hc(t):t}function Hc(t){let e=t.left.balance;return e==-1?Dc(t):e==1?mo(t):t}function Lc(t){let e=t.right.balance;return e==1?qc(t):e==-1?go(t):t}function mo(t){return ho(t)}function Dc(t){let e=yo(t.left);return mo(t.replaceLeft(e))}function go(t){return yo(t)}function qc(t){let e=ho(t.right);return go(t.replaceRight(e))}function yo(t){let e=t.right,r=e.left,n=t.replaceRight(r);return e.replaceLeft(n)}function ho(t){let e=t.left,r=e.right,n=t.replaceLeft(r);return e.replaceRight(n)}});var xo=S(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.unique=Ge.UniqueTransducer=void 0;var dt=R(),jc=N(),vo=bo(),an=class{constructor(e){this.comparator=e}async_(e){return dt.__asyncGenerator(this,arguments,function*(){var n,i;let s=vo.AVLTree.empty(this.comparator);try{for(var a=dt.__asyncValues(e),c;c=yield dt.__await(a.next()),!c.done;){let d=c.value;s.contains(d)||(s=s.insert(d,void 0),yield yield dt.__await(d))}}catch(d){n={error:d}}finally{try{c&&!c.done&&(i=a.return)&&(yield dt.__await(i.call(a)))}finally{if(n)throw n.error}}})}*sync(e){let r=vo.AVLTree.empty(this.comparator);for(let n of e)r.contains(n)||(r=r.insert(n,void 0),yield n)}};Ge.UniqueTransducer=an;function Uc(t=jc.ascending){return new an(t)}Ge.unique=Uc});var wo=S(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.WindowedTransducer=Fe.windowed=void 0;var We=R();function Bc(t,e=1,r=!1){return new cn(t,e,r)}Fe.windowed=Bc;var cn=class{constructor(e,r,n){this.size=e,this.step=r,this.remainder=n}async_(e){return We.__asyncGenerator(this,arguments,function*(){var n,i;let s=[],a=0;try{for(var c=We.__asyncValues(e),d;d=yield We.__await(c.next()),!d.done;){let f=d.value;if(a>0){a--;continue}s.push(f),s.length===this.size&&(yield yield We.__await([...s]),s=s.slice(this.step),this.step>this.size&&(a=this.step-this.size))}}catch(f){n={error:f}}finally{try{d&&!d.done&&(i=c.return)&&(yield We.__await(i.call(c)))}finally{if(n)throw n.error}}this.remainder&&(yield yield We.__await([...s]))})}*sync(e){let r=[],n=0;for(let i of e){if(n>0){n--;continue}r.push(i),r.length===this.size&&(yield[...r],r=r.slice(this.step),this.step>this.size&&(n=this.step-this.size))}this.remainder&&(yield[...r])}};Fe.WindowedTransducer=cn});var ko=S(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.zipWithIndex=de.zip=de.ZipTransducer=void 0;var Qt=R(),So=N(),Gc=Nt(),Xt=class{constructor(e){this.other=e}async_(e){return Qt.__asyncGenerator(this,arguments,function*(){if(!(0,So.isAsyncIterable)(this.other))throw new Error("Unsupported operation exception");let n=e[Symbol.asyncIterator](),i=this.other[Symbol.asyncIterator]();for(;;){let[s,a]=yield Qt.__await(Promise.all([n.next(),i.next()]));if(s.done||a.done)return yield Qt.__await(void 0);yield yield Qt.__await([s.value,a.value])}})}*sync(e){if(!(0,So.isIterable)(this.other))throw new Error("Unsupported operation exception");let r=e[Symbol.iterator](),n=this.other[Symbol.iterator]();for(;;){let i=r.next(),s=n.next();if(i.done||s.done)return;yield[i.value,s.value]}}};de.ZipTransducer=Xt;function Wc(t){return new Xt(t)}de.zip=Wc;function Fc(){return new Xt((0,Gc.range)(0))}de.zipWithIndex=Fc});var ct=S(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});var E=R();E.__exportStar(rt(),O);E.__exportStar(Li(),O);E.__exportStar(qi(),O);E.__exportStar(ji(),O);E.__exportStar(Ui(),O);E.__exportStar(Gt(),O);E.__exportStar(Gi(),O);E.__exportStar(Fr(),O);E.__exportStar(Wi(),O);E.__exportStar(Ki(),O);E.__exportStar(Nr(),O);E.__exportStar(zi(),O);E.__exportStar(Vi(),O);E.__exportStar(Ni(),O);E.__exportStar(Yr(),O);E.__exportStar(Qi(),O);E.__exportStar(no(),O);E.__exportStar(io(),O);E.__exportStar(oo(),O);E.__exportStar(ao(),O);E.__exportStar(xo(),O);E.__exportStar(wo(),O);E.__exportStar(ko(),O)});var ye=S(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.caching=ze.cache=void 0;function Nc(t,e,r){if(typeof r.value!="function")throw new Error("@cache can only decorate methods");let n=new WeakMap;function i(s){let a=n.get(s);if(a)return a;let c=new Map;return n.set(s,c),c}return Object.defineProperty(t,e,Object.assign(Object.assign({},r),{value:function(...s){let a=JSON.stringify(s),c=i(this),d=c.get(a);if(typeof d!="undefined"||c.has(a))return d;let f=r.value.call(this,...s);return c.set(a,f),f}}))}ze.cache=Nc;function $c(t){let e=new Map;return function(...r){let n=JSON.stringify(r),i=e.get(n);if(typeof i!="undefined"||e.has(n))return i;let s=t(...r);return e.set(n,s),s}}ze.caching=$c});var Sr=S(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.StoppedClock=Je.SystemClock=void 0;var Zs=class{now(){return new Date}};Je.SystemClock=Zs;var Qs=class{constructor(e){this.value=e}now(){return this.value}};Je.StoppedClock=Qs});var ii=S(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.get=Xe.identity=void 0;function _d(){return t=>t}Xe.identity=_d;function Md(t,e=void 0){try{let r=t();return typeof r=="undefined"?e:r}catch(r){return e}}Xe.get=Md});var Mr=class{constructor(e){let r=Mr.RFC_3986.exec(e);if(!r)throw new Error(`Invalid Uri: ${e}`);let[,,n,,i,s,,a,,c]=r;this.scheme=n,this.authority=i?new _r(i):void 0,this.path=s,this.query=a,this.fragment=c}toString(){let e=[];return typeof this.scheme!="undefined"&&e.push(this.scheme,":"),typeof this.authority!="undefined"&&e.push("//",this.authority.toString()),e.push(this.path),typeof this.query!="undefined"&&e.push("?",this.query),typeof this.fragment!="undefined"&&e.push("#",this.fragment),e.join("")}get host(){return this.authority&&this.authority.host}get port(){return this.authority&&this.authority.port}get userInfo(){return this.authority&&this.authority.userInfo}},P=Mr;P.RFC_3986=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;var Hr=class{constructor(e){let r=Hr.RFC_3986.exec(e);if(!r)throw new Error(`Invalid Authority: ${e}`);let[,n,i,s]=r;this.userInfo=n,this.host=i,this.port=s}toString(){let e=[];return typeof this.userInfo!="undefined"&&e.push(this.userInfo,"@"),typeof this.host!="undefined"&&e.push(this.host),typeof this.port!="undefined"&&e.push(":",this.port),e.join("")}},_r=Hr;_r.RFC_3986=/(?:([^@]+)@)?([^:]+)(?::([\d]+))?/;var Co=I(ct()),Ao=I(N()),Kc=I(ct());function zc(t){switch(typeof t){case"undefined":return!0;case"string":return t.trim()==="";case"number":return isNaN(t);case"object":{if(t==null)return!0;if(m.isObject(t))return Object.keys(t).length===0;if(Array.isArray(t))return t.length===0}}return!1}var ln=class{static parse(e){if(typeof e!="number"&&Q.isEmpty(e))return;let r=Number(e);if(!isNaN(r))return r}static isNumber(e){return typeof e=="number"&&!isNaN(e)}};var Ke=class{static noWhitespace(e){return e&&typeof e=="string"?e.replace(/\s+/g,""):""}static startWith(e,r){return e?e.substring(0,r.length)===r:e===r}static endsWith(e,r){return e.substring(e.length-r.length,e.length)===r}static isEmpty(e){return e===void 0||e===null?!0:e.trim().length===0}static isEmail(e){return typeof e=="string"&&this.validEmailPattern.test(e)}static isLowerCase(e){return e===e.toLowerCase()&&e!==e.toUpperCase()}static isUpperCase(e){return e===e.toUpperCase()&&e!==e.toLowerCase()}static kebabCase(e){return Ke.delimiterCase(e,"-")}static snakeCase(e){return Ke.delimiterCase(e,"_")}static delimiterCase(e,r){return e.replace(/([A-Z][a-z]+|\d+)/gm,`${r}$1`).replace(new RegExp(`^${r}`),"").toLowerCase()}static titleCase(e){return Ke.isEmpty(e)?"":e.replace(/\w\S*/g,r=>r.charAt(0).toUpperCase()+r.substr(1).toLowerCase())}static camelCase(e){return Ke.isEmpty(e)?"":e.replace(/([A-Za-z]+|\d+)/gm,r=>r.charAt(0).toUpperCase()+r.substr(1).toLowerCase()).replace(new RegExp("^."),r=>r.toLowerCase()).replace(new RegExp(/[_\-\s]/g),"")}},Q=Ke;Q.validEmailPattern=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/;function ut(t,e,r){if(e(t))return r(t);switch(typeof t){case"undefined":return;case"object":{if(t===null)return null;if(Array.isArray(t))return t.map(n=>ut(n,e,r));if(m.isObject(t))return m.keys(t).sort().reduce((n,i)=>{let s=t[i];return n[i]=ut(s,e,r),n},{})}}return t}function er(t,e){switch(typeof t){case"undefined":return;case"object":{if(t===null)return null;if(Array.isArray(t))return t.map(r=>er(r,e));if(m.isObject(t))return m.keys(t).sort().reduce((r,n)=>{let i=t[n];return r[e(String(n))]=er(i,e),r},{})}}return t}var m=class{static isObject(e){return e&&typeof e=="object"&&(e.constructor===Object||/Object.*native/.test(e.constructor.toString()))}static keys(e){return Object.keys(e)}static values(e){return Object.keys(e).map(r=>e[r])}static entries(e){return Object.keys(e).map(r=>[r,e[r]])}static removeEmpty(e){return e&&(m.isObject(e)?Object.keys(e).reduce((r,n)=>{let i=m.removeEmpty(e[n]);return zc(i)||(r[n]=i),r},{}):e)}static sort(e){return e&&(Array.isArray(e)?e.map(m.sort):m.isObject(e)?Object.keys(e).sort().reduce((r,n)=>{let i=e[n];return r[n]=m.sort(i),r},{}):e)}static toLowerCase(e){return typeof e=="string"?e.toLowerCase():Array.isArray(e)?e.map(m.toLowerCase):p(()=>m.isObject(e))?Object.entries(e).reduce((r,[n,i])=>(r[n]=m.toLowerCase(i),r),{}):e}static snakeCase(e){return er(e,Q.snakeCase)}static camelCase(e){return er(e,Q.camelCase)}static filter(e,r){let n=m.keys(e).filter(r);return m.pick(e,...n)}static omit(e,...r){return r.reduce((n,i)=>(Reflect.deleteProperty(n,i),n),e)}static pick(e,...r){return r.reduce((n,i)=>(n[i]=e[i],n),{})}};var k=class{static from(e){return Array.from(e)}static find(e,r){if(e.find)return e.find(r);let[n]=e.filter(r);return n}static findLastIndex(e,r){let n=[...e].reverse().findIndex(r);return n===-1?n:e.length-n-1}static toObject(e){return e.reduce((r,n)=>(Object.keys(n).forEach(i=>{i in r||(r[i]=n[i])}),r),{})}static flatten(e){return e.reduce((r,n)=>r.concat(n),[])}static flatMap(e,r){return e.flatMap?e.flatMap(r):k.flatten(e.map(r))}static unique(e){return Array.from(new Set(e))}static clean(e){return e.filter(Boolean)}static trim(e){return e.map(r=>r.trim())}static includes(e,r){return"includes"in e?e.includes(r):e.indexOf(r)!==-1}static first(e){return e[0]}static last(e){return e[e.length-1]}static safeReverse(e){return e?e.slice().reverse():[]}static shuffle(e){return e.map(r=>({value:r,order:Math.random()})).sort((0,Ao.by)("order")).map(({value:r})=>r)}};function p(t,e=void 0){try{let r=t();return typeof r=="undefined"?e:r}catch(r){return e}}function X(t,e=void 0){return u(this,null,function*(){try{let r=yield t();return typeof r=="undefined"?e:r}catch(r){return e}})}function Vc(t,e){let r=e.toLowerCase(),n=k.find(Object.keys(t),s=>s.toLowerCase()===r);if(!n)return;let i=t[n];return typeof i=="string"?i.trim():i}function tr(t,...e){if(!t)return[];if(Array.isArray(t))return k.clean(k.flatten(t.map(r=>tr(r,...e))));if(typeof t=="object"){let[r,...n]=e,i=Vc(t,r);return typeof i=="object"?tr(i,...n):n.length===0&&Boolean(i)?[i]:[]}return[]}var L=(()=>typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof module!="undefined"?module:Function("return this")())();function Oo(t,e,r){let n=t[e];return typeof n=="undefined"?t[e]=r:Array.isArray(n)?n.indexOf(r)==-1&&n.push(r):t[e]=[n,r],t}function To(t,e,r,n=i=>i){let i=[],s=0,a;for(;(a=t.exec(e))!=null;)i.push(n(e.substring(s,a.index))),i.push(r(a)),s=t.lastIndex;return i.push(n(e.substring(s))),i.join("")}function Po(t,e){return t.slice(0,e)}var Eo=I(ye()),Io=I(Be());function T(t=L){return t.triptease=t.triptease||{},t.triptease.onboard=t.triptease.onboard||{},{triptease:t.triptease,onboard:t.triptease.onboard}}var he;(function(n){n.Native="native",n.NonNative="non-native",n.NotImplemented="not-implemented"})(he||(he={}));function dn(t,e){return p(()=>e.split(".").reduce((r,n)=>r[n],t))}function Ro(t){return t==null?he.NotImplemented:typeof t=="function"?t.toString().includes("native code")?he.Native:he.NonNative:he.Native}function _o(t,...e){return e.reduce((r,n)=>(r[n]=Ro(dn(t,n)),r),{})}var rr=class{static exposeApi(){let e=T(L).triptease;e.native||(e.native=rr)}static getProperty(e){let r=dn(L,e);return Ro(r)!==he.NonNative?r:dn(rr.window,e)}static get window(){let e=L;if(!e.document)return e;try{let r=e.document,n=r.querySelector("[name='triptease.native']");if(n)return n.contentWindow;let i=r.createElement("iframe");return i.style.display="none",i.setAttribute("title","blank"),i.setAttribute("aria-hidden","true"),i.setAttribute("name","triptease.native"),r.documentElement.appendChild(i),i.contentWindow}catch(r){return e}}},D=rr;A([Eo.cache],D,"getProperty",1),A([Io.lazy],D,"window",1);var Jc=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}\.\d{3}Z)?$/;function Yc(t){return ut(t,e=>typeof e=="string"&&Jc.test(e),e=>{let r=new Date(e);return isNaN(r.valueOf())?e:r})}var Zc=D.getProperty("JSON.parse"),Mo=D.getProperty("JSON.stringify"),Qc=D.getProperty("Date.prototype.toISOString"),Xc=D.getProperty("atob"),el=D.getProperty("btoa"),q=class{static parse(e){return Zc(e)}static parseWithDates(e){return Yc(q.parse(e))}static stringify(e){return Mo(this.clean(e))}static clean(e){return ut(e,r=>{let n=typeof r;switch(n){case"undefined":case"string":case"number":case"boolean":return!0;case"object":{if(r===null)return!0;if(Array.isArray(r)||m.isObject(r))return!1;if("toJSON"in r)return!0}}throw new Error(`Illegal JsonValue: ${n} ${r} `)},r=>r instanceof Date?Qc.call(r):r)}static atob(e){try{let r=Xc(e);return q.parseWithDates(r)}catch(r){}}static btoa(e){try{if(!m.isObject(e))return;let r=Mo(e);return el(r)}catch(r){}}},_=class{static same(e,r){return q.stringify(e)===q.stringify(r)}static isSuperset(e,r){return e===null||r===null?_.same(e,r):Array.isArray(e)&&Array.isArray(r)?e.length>r.length?!1:e.every(n=>r.some(i=>_.isSuperset(n,i))):p(()=>m.isObject(e))&&p(()=>m.isObject(r))?Object.keys(e).reduce((n,i)=>n&&_.isSuperset(e[i],r[i]),!0):_.same(e,r)}static compress(e){let r=_.groupValues(e);return this.compressGrouped(r)}static compressGrouped(e){return Object.entries(e).reduce(({shared:r,unique:n},[i,s])=>{if(p(()=>m.isObject(s))){let a=_.compressGrouped(s);Object.keys(a.shared).length>0&&(r[i]=a.shared),a.unique.forEach((c,d)=>{n[d]=n[d]||{},Object.keys(c).length>0&&(n[d][i]=c)})}return Array.isArray(s)&&s.forEach((a,c)=>{n[c]=n[c]||{},k.unique(s.map(d=>q.stringify(d))).length===1?r[i]=a:a!==void 0&&(n[c][i]=a)}),{shared:r,unique:n}},{shared:{},unique:[]})}static groupValues(e){let r=Array.from(e.reduce((a,c)=>Object.keys(c).reduce((d,f)=>d.add(f),a),new Set)),[n,i]=e.reduce((a,c)=>r.reduce(([d,f],g)=>{let C=c[g];return p(()=>m.isObject(C))?(f[g]=f[g]||[],f[g].push(C)):(d[g]=d[g]||[],d[g].push(C)),[d,f]},a),[{},{}]),s=Object.entries(i).reduce((a,[c,d])=>(a[c]=_.groupValues(d),a),{});return w(w({},n),s)}static decompress(e){return e.unique.map(r=>this.merge(e.shared,r))}static merge(e,r){return[...Object.keys(e),...Object.keys(r)].reduce((i,s)=>{let a=e[s],c=r[s];return p(()=>m.isObject(a))&&p(()=>m.isObject(c))?i[s]=_.merge(a,c):i[s]=c!=null?c:a,i},{})}};function B(t,e=!0){return t?(t.indexOf("?")==0&&(t=t.substring(1,t.length)),t.split("&").map(function(r){return r.split("=")}).reduce(function(r,n){let i=n[0],s=n[1];if(!i)return r;let a=Ho(s),c=e?tl(a):a;return Oo(r,Ho(i),c)},{})):{}}function Ho(t){return p(()=>decodeURIComponent(t.replace(/\+/g,"%20")),t)}function tl(t){try{return q.parse(t)}catch(e){return t}}function rl(t){return typeof t=="string"?t:JSON.stringify(t)}function Lo(t,e=!0){return Object.keys(m.removeEmpty(t)).map(r=>{let n=t[r],i=e?rl(n):n;return`${r}=${encodeURIComponent(i)}`}).join("&")}var Do=D.getProperty("console.log"),nl=D.getProperty("console.error"),il=D.getProperty("console.debug"),qo=class{constructor(e=Do,r=nl,n=il||Do){this.log=e;this.error=r;this.debug=n}},jo=class{constructor(){this.log=()=>{};this.error=()=>{};this.debug=()=>{}}},nr="triptease-debug",ol=256;function ir(t,e=nr){let r=p(()=>{var n;return B((n=t.location)==null?void 0:n.search,!1)[e]})||p(()=>{var n;return B(new P((n=t.location)==null?void 0:n.originalHref).query,!1)[e]})||p(()=>{var n,i;return(i=(n=t.process)==null?void 0:n.env)==null?void 0:i.DEBUG})||p(()=>{var n;return((n=t.localStorage)==null?void 0:n.getItem)&&t.localStorage.getItem(e)})||p(()=>{var n;return((n=t.sessionStorage)==null?void 0:n.getItem)&&t.sessionStorage.getItem(e)})||"";return p(()=>r.substring(0,ol),"")}function Uo(t=L){let e=ir(t,nr);return Q.isEmpty(e)?"":Lo({[nr]:e})}function sl(t){return ir(t,nr).split(",").map(e=>e.trim())}function Bo(t){let e=t.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp("^"+e+"$")}function al(t,e=L){try{let r=sl(e),n=r.filter(i=>i[0]==="!").map(i=>i.substr(1));return n.length>0?!n.some(i=>Bo(i).test(t)):r.some(i=>i==="true"||Bo(i).test(t))}catch(r){return!1}}var Go=class{constructor(e){this.name=e;this.console=new qo}debug(e,...r){this.console.debug(`[${this.name}] ${e}`,...r)}log(e,...r){this.console.log(`[${this.name}] ${e}`,...r)}error(e,...r){this.console.error(`[${this.name}] ${e}`,...r)}};function y(t,e=L){return al(t,e)?new Go(t):new jo}function cl(t){try{let{target:e,method:r}=pn(t.type);if(e&&r)return!0}catch(e){}return!1}var un=class{constructor(e,r){this.name=e;this.trackingApi=r;this.logger=y(e)}debug(e,...r){this.logger.debug(e,...r)}error(e,...r){this.logger.error(e,...r);try{this.trackingApi.trackError({name:this.name,message:e,args:r.map(n=>pt(n)?pl(n):n)})}catch(n){this.logger.error("Failed to track error",n)}}log(e,...r){this.logger.log(e,...r)}};var $=class{constructor(e,r,n=ll,i=y("messaging")){this.listener=e;this.allowedOrigins=n;this.logger=i;this.target=this.listener!==r?r:void 0}addListener(e){this.listener&&this.listener.addEventListener("message",r=>{this.disallowedOrigin(r)||!cl(r.data)||e(r.data,new $(void 0,r.source||this.target))})}disallowedOrigin(e){return e.origin&&this.allowedOrigins.length>0&&this.allowedOrigins.indexOf(new P(e.origin).host)===-1}send(e){if(this.target)try{this.target.postMessage(e,"*")}catch(r){this.target.postMessage(JSON.parse(JSON.stringify(e)),"*")}}},ll=["onboard.triptease.io","localhost"],dl=/^(.*)\.([^.]+)$/;function pn(t){let[,e,r]=t.match(dl)||[];return{target:e,method:r}}function or(t){let e={};return function(...r){let n=JSON.stringify(r),i=e[n];return typeof i!="undefined"?i:e[n]=t(...r)}}function ul(t){return t.document.querySelector('iframe[name="triptease.onboard.kernel"]')}function Wo(t){let e=ul(t);if(e&&e.contentWindow)return new $(t,e.contentWindow)}function pt(t){return t&&typeof t=="object"&&"name"in t&&typeof t.name=="string"&&"message"in t&&typeof t.message=="string"&&"stack"in t&&typeof t.stack=="string"}function pl(t){return{name:t.name,message:t.message,stack:t.stack}}function fn(t,e,r){return{name:t,message:e,stack:r!=null?r:""}}var $u=new Set(["Unknown","PossibleIdentifier"]),Ju=new Set(["HotelName","HotelCode","ChainCode"]);var ee={cookieBot:"cookieBot",klaro:"klaro",google:"google",defaultNoConsentMode:"defaultNoConsentMode",defaultAutoConsentMode:"defaultAutoConsentMode"};var F;(function(f){f.Search="Search",f.RoomsAndRates="RoomsAndRates",f.Confirmation="Confirmation",f.Checkout="Checkout",f.Payment="Payment",f.Group="Group",f.Advert="Advert",f.Partial="Partial",f.Unknown="Unknown"})(F||(F={}));var Yu=[F.Payment,F.Confirmation,F.RoomsAndRates,F.Checkout,F.Search,F.Partial,F.Group,F.Unknown,F.Advert];var Fo;(function(i){i.Room="Room",i.Fee="Fee",i.Tax="Tax",i.Unknown="Unknown"})(Fo||(Fo={}));var Ko;(function(n){n.Singleton="Singleton",n.ApplicationHost="ApplicationHost",n.DataSource="DataSource"})(Ko||(Ko={}));var j;(function(i){i.PENDING="Pending",i.SKIPPED="Skipped",i.FAILED="Failed",i.PASSED="Passed"})(j||(j={}));var ue;(function(s){s.SCRIPT_PRESENT="Script Present",s.SCRIPT_LOADED="Script Loaded",s.INTEGRATION_ID_MATCHES="Integration Id Matches",s.PAGE_EVALUATED="Page Evaluated",s.MESSAGING_ACTIVE="Messaging Active"})(ue||(ue={}));var zo="triptease.onboard.kernel",Vo;(function(i){i.Enabled="Enabled",i.Disabled="Disabled",i.Strict="Strict",i.NotConfigured="NotConfigured"})(Vo||(Vo={}));var te=class{static get(){return p(()=>{let e="8961.130595";return e?"v"+e:"latest"})}};var mn=class{static application(e){let r=Uo();return{name:zo,url:`https://onboard.triptease.io/kernel/${te.get()}/kernel-host.html?originHost=${e}${r?"&"+r:""}`,type:"iframe",startMessage:"triptease.onboard.kernel-host-started",enabled:!0}}};var fl=D.getProperty("Date"),gn=class{now(){return new fl}},ft=class{now(){return new Date}};function No(t){return new Promise(e=>{this.setTimeout(()=>{e()},t)})}var W=class{constructor(e=new ft){this.clock=e;this.delay=No.bind(this);this.delay=No}task(e){return u(this,null,function*(){return yield this.delay(0),e()})}setTimeout(e,r){return setTimeout(e,r)}clearTimeout(e){clearTimeout(e)}setInterval(e,r){return setInterval(e,r)}clearInterval(e){clearInterval(e)}requestIdleCallback(e,r){let n=r?r.timeout:1,i=this.clock.now().getTime()+n,s=this;return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining(){return Math.max(0,50-(s.clock.now().getTime()-i))}})},n)}cancelIdleCallback(e){this.clearTimeout(e)}};var cp=new W;function $o(t,e,r=new W){return n=>u(this,null,function*(){let i=yield Promise.race([e(n),r.delay(t)]);return i||{status:504,statusDescription:"Client timeout",body:`Request to ${n.url} timeout after ${t}`}})}function Ve(t={credentials:!1}){return e=>u(this,null,function*(){if(typeof fetch!="undefined"){let r=yield fetch(e.url,{method:e.method,headers:e.headers,body:e.body,credentials:t.credentials?"include":"omit"});return{status:r.status,statusDescription:r.statusText,body:yield r.text()}}else{let r=new XMLHttpRequest;return r.open(e.method,e.url,!0),e.headers&&Object.keys(e.headers).forEach(n=>{r.setRequestHeader(n,e.headers[n])}),r.withCredentials=t.credentials,r.send(e.body),new Promise((n,i)=>{r.addEventListener("load",s=>{n({status:r.status,statusDescription:r.statusText,body:r.responseText})}),r.addEventListener("error",s=>{i(s)})})}})}var Zo=I(ye());function ml(t){return t&&typeof t=="object"&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.enabled=="boolean"}function Jo(t){return ml(t)&&t.type!=="other"&&typeof t.url=="string"}var gl=/\${([^}]+)}/g;function Yo(t,e){return To(gl,t,([,r])=>{var n;return(n=e[r])!=null?n:`\${${r}}`})}var Qo=class{constructor(e,r=Ve()){this.logger=e;this.httpHandler=r;this.workers={}}createWorker(e,r){return u(this,null,function*(){let n=this.workers[e];return n||(this.workers[e]=yield this.create(r,{name:e}))})}create(e,r){return u(this,null,function*(){try{return new Worker(e,r)}catch(n){this.logger.debug("Failed to create Worker switching to Blob Worker because:",n.message);let i=`location.originalHref = "${e}"; `,a=(yield this.httpHandler({method:"GET",url:e})).body,c=new Blob([i,a],{type:"application/javascript"});return new Worker(URL.createObjectURL(c),r)}})}},sr=class{constructor(e,r=y("application-starter"),n=new Qo(r),i=new Xo(e,r)){this.window=e;this.logging=r;this.workerFactory=n;this.waiter=i}start(e){return u(this,null,function*(){this.logging.debug(`ApplicationStarter starting app "${e.name}" (${e.type}), ${e.url}`);let r=this.window.document;if(e.type==="worker"){let s=yield this.workerFactory.createWorker(e.name,e.url);return e.startMessage&&(yield this.waiter.waitForMessage(e.startMessage,s)),this.logging.debug("ApplicationStarter returning worker"),s}let n=r.createElement(e.type);n.setAttribute("name",e.name),n.src=Yo(e.url,{onboard_version:te.get()});let i=sr.DefaultOptions[e.type]||{};return Object.keys(i).forEach(s=>{n.setAttribute(s.toLowerCase(),i[s])}),this.addElement(n),e.startMessage?yield this.waiter.waitForMessage(e.startMessage):e.type==="script"&&(yield this.waiter.waitForLoadEvent(n)),n})}addElement(e){(this.window.document.body||this.window.document.documentElement).appendChild(e)}static create(e){var n;let r=T(e).triptease.onboard;return r.applicationStarter=(n=r.applicationStarter)!=null?n:new sr(e)}},be=sr;be.DefaultOptions={script:{defer:"",async:"",crossOrigin:"anonymous"},iframe:{style:"display: none;",sandbox:"allow-scripts allow-same-origin",title:"blank","aria-hidden":"true"}},A([Zo.cache],be.prototype,"start",1);var Xo=class{constructor(e,r){this.window=e;this.logging=r}waitForLoadEvent(e){return this.logging.debug("MessageWaiter waiting for load/error event for",e),new Promise((r,n)=>{e.addEventListener("load",r),e.addEventListener("error",i=>n({name:"ScriptError",message:i.message||`Failed to load script "${e.src}"`}))})}waitForMessage(e,r=this.window){return this.logging.debug("MessageWaiter waiting for message",e),new Promise(n=>{this.logging.debug("MessageWaiter creating handler");let i=s=>{try{let a=s.data&&s.data.type,c=a===e;this.logging.debug(`ApplicationStarter message received "${a}", expecting "${e}", matched: ${c}`),c&&(r.removeEventListener("message",i),n(s.data))}catch(a){this.logging.debug("ApplicationStarter error in parsing message",a,s)}};this.logging.debug("MessageWaiter adding listener"),r.addEventListener("message",i)})}};var ar,yl=new Uint8Array(16);function yn(){if(!ar&&(ar=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!ar))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ar(yl)}var es=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function hl(t){return typeof t=="string"&&es.test(t)}var ts=hl;var U=[];for(cr=0;cr<256;++cr)U.push((cr+256).toString(16).substr(1));var cr;function bl(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(U[t[e+0]]+U[t[e+1]]+U[t[e+2]]+U[t[e+3]]+"-"+U[t[e+4]]+U[t[e+5]]+"-"+U[t[e+6]]+U[t[e+7]]+"-"+U[t[e+8]]+U[t[e+9]]+"-"+U[t[e+10]]+U[t[e+11]]+U[t[e+12]]+U[t[e+13]]+U[t[e+14]]+U[t[e+15]]).toLowerCase();if(!ts(r))throw TypeError("Stringified UUID is invalid");return r}var rs=bl;function vl(t,e,r){t=t||{};var n=t.random||(t.rng||yn)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(var i=0;i<16;++i)e[r+i]=n[i];return e}return rs(n)}var hn=vl;var mt=()=>p(()=>crypto.randomUUID())||hn(),bn=class{generate(e){if(typeof e!="undefined")throw new Error("UuidGenerator does not support custom lengths");return mt().replace(/-/g,"")}};var ns=class{constructor(e,r){this.messaging=e;this.idGenerator=r}get(e,r,n){return(...i)=>u(this,null,function*(){let s=this.idGenerator.generate(),{payload:a}=yield this.messaging.handle({type:"triptease.onboard.request",requestType:String(r),payload:i,correlationId:s});if(pt(a))throw a;return a})}};function re(t,e=new bn){return new Proxy({},new ns(t,e))}var vn=class{constructor(e,r=re(e)){this.proxy=r;this.applicationConfig=or(e=>u(this,null,function*(){return yield this.proxy.applicationConfig(e)}));this.generateClientConfig=or(e=>u(this,null,function*(){return yield this.proxy.generateClientConfig(e)}));this.generateConfig=or(e=>u(this,null,function*(){return yield this.proxy.generateConfig(e)}))}};var Ne=class{constructor(e){this.window=e;this.scripts=new Set}static create(e){let r=T(e).onboard,n=r.stackScriptFinder;return n||(r.stackScriptFinder=new Ne(e))}capture(){let e=wl();e&&this.scripts.add(e);let r=this.window.document.currentScript;r&&"src"in r&&this.scripts.add(r.src)}get(){return Array.from(this.scripts).map(e=>new P(e))}},xl=/(https?.*):\d+:\d+/;function wl(){try{throw new Error}catch(t){if(!t.stack)return;let e=t.stack.match(xl);return e?e[1]:void 0}}function is(t){let e=Ne.create(t);e.capture();let r=e.get();return m.removeEmpty({scripts:r.map(n=>n.toString()),domains:r.map(n=>n.host).filter(Boolean),paths:r.map(n=>n.path)})}function os({method:t="POST",url:e,body:r}){let n=q.stringify(r);if(typeof navigator.sendBeacon!="undefined"&&t==="POST")navigator.sendBeacon(e,n);else if(typeof fetch!="undefined")fetch(e,{method:t,body:n});else if(XMLHttpRequest){let i=new XMLHttpRequest;i.open(t,e,!0),i.send(n)}}var gt={name:"onboard",version:te.get()},Sl="https://onboard.triptease.io";var xn=class{constructor(e,r,n=y("analytics"),i=50){this.window=e;this.clock=r;this.logger=n;this.batchSize=i;this.queued=[];this.interval=setInterval(()=>u(this,null,function*(){return yield this.flush()}),1e3),this.window.addEventListener("pagehide",()=>u(this,null,function*(){return yield this.flush()}))}stop(){clearInterval(this.interval)}send(e){return u(this,null,function*(){this.queued.push(kl(this.clock,e)),this.queued.length>this.batchSize&&(yield this.flush())})}flush(){return u(this,null,function*(){if(this.queued.length===0)return;let e=this.queued.splice(0,this.batchSize);this.logger.log(`Flushing batch of ${e.length}, remaining in queue ${this.queued.length}`);let r={type:"triptease.onboard.batch",sentAt:this.clock.now(),payload:e};os({url:`${Sl}/message/batch`,body:r})})}};function kl(t,e){return w({messageId:mt(),createdAt:t.now()},e)}var Is=I(Be());function Cl(t){return t&&typeof t=="function"&&typeof t.getAll=="function"}function ss(n,i){return u(this,arguments,function*(t,e,r=new W){let s=t[t.GoogleAnalyticsObject||"ga"];return Cl(s)?X(()=>u(this,null,function*(){let a=new Promise(c=>s(()=>c(k.unique(s.getAll().map(d=>d.get(e))))));return yield Promise.race([a,r.delay(50).then(()=>[])])})):[]})}function as(t){return u(this,null,function*(){return{trackingIds:yield ss(t,"trackingId"),clientIds:yield ss(t,"clientId")}})}function cs(t){return{containerIds:k.unique(Array.from(t.document.querySelectorAll("script[src*=googletagmanager]")).map(r=>{let{query:n}=new P(r.src),{id:i}=B(n);return i}))}}function ls(t){let e=Object.fromEntries(t.document.cookie.split(";").map(r=>r.split("=").map(n=>n.trim())));return m.removeEmpty({fbp:e._fbp,fbc:e._fbc})}function ds(t){return{appId:p(()=>t.duetto.initialConfig.appId),tld:p(()=>t.duetto.initialConfig.tld)}}function us(t){var n;let e=!!t.document.querySelector("script[src*=revinate], .revinate-form, #revinate_contact_api_form"),r=(n=t.document.querySelector("#revinate_contact_api_form"))==null?void 0:n.getAttribute("token");if(e)return{exists:e,contactApiFormToken:r}}function ps(t){return m.removeEmpty({accountKey:p(()=>t.thn.__init.account_key),productAccess:p(()=>t.thn.__init.product_access)})}function fs(t){let e=t.document.querySelector("#hv[data-hvhotelid], #hv[data-hvexthotelid]");if(e)return m.removeEmpty({hotelId:e.dataset.hvhotelid,extHotelId:e.dataset.hvexthotelid,clientId:e.dataset.hvclientid,language:e.dataset.hvlanguage,product:e.dataset.hvproduct})}var ms="triptease.onboard.response";function wn(t){return t&&typeof t=="object"&&t.type==="triptease.onboard.request"&&typeof t.requestType=="string"&&typeof t.correlationId=="string"&&Array.isArray(t.payload)}function lr(t){return t&&typeof t=="object"&&t.type==="triptease.onboard.response"&&typeof t.correlationId=="string"}function dr(t,e){return{type:"triptease.onboard.response",correlationId:t,payload:e}}function ur(t,e){return dr(t,fn("NotFound","No handler found for "+e))}function gs(t){return p(()=>t.payload.name==="NotFound",!1)}function ys(t,e){return dr(t,fn(e.name,e.message,e.stack))}var yt=class{constructor(e,r=60*1e3,n=new W){this.handler=e;this.timeout=r;this.timers=n}handle(e){return u(this,null,function*(){let r=yield Promise.race([this.handler.handle(e),this.timers.delay(this.timeout)]);return r||{type:ms,payload:new Error(`Request ${e.requestType} timed out after ${this.timeout}`),correlationId:e.correlationId}})}};var hs=y("messaging"),pe=class{constructor(e){this.messageHandler=e;this.promises=new Map;e&&e.addListener(r=>{if(lr(r)){let{correlationId:n}=r,i=this.promises.get(n);i&&(hs.debug("Sender matched response",r),i.resolve(r),this.promises.delete(n))}})}handle(e){return u(this,null,function*(){return hs.debug("Sending request",e),this.messageHandler&&this.messageHandler.send(e),new Promise((r,n)=>{this.promises.set(e.correlationId,{resolve:r,reject:n})})})}};function bs(t){return u(this,null,function*(){return{browsingTopics:yield X(()=>Ol(t)),attributionSrc:k.unique(Array.from(t.document.querySelectorAll("a[attributionSrc], img[attributionSrc], script[attributionSrc]")).map(e=>e.getAttribute("attributionSrc"))),attributionSourceId:k.unique(Array.from(t.document.querySelectorAll("a[attributionSourceId]")).map(e=>e.getAttribute("attributionSourceId"))),attributionDestination:k.unique(Array.from(t.document.querySelectorAll("a[attributionDestination]")).map(e=>e.getAttribute("attributionDestination")))}})}function Al(t){return re(new yt(new pe(Wo(t)),50))}var Ol=t=>u(void 0,null,function*(){return Al(t).browserTopics()});function vs(t){return u(this,null,function*(){return m.removeEmpty({googleAnalytics:yield X(()=>as(t),{}),googleTagManager:p(()=>cs(t),{}),facebook:p(()=>ls(t),{}),duetto:ds(t),revinate:us(t),thn:ps(t),hotelVerse:fs(t),adtech:yield X(()=>bs(t))})})}var xs=["page","referrer","redirectSource","redirectDestination","source"];function ws(t){return!!t.trackingId}function J(t){if(!t)return{};let{scheme:e,host:r,path:n,query:i,fragment:s}=new P(t);return m.removeEmpty({scheme:e,host:r,path:n,query:i,queryParsed:B(i,!1),fragment:s})}var pr;(function(b){b.Config="triptease.config",b.Event="triptease.event",b.Log="triptease.logs",b.Error="triptease.onboard.error",b.Message="triptease.onboard.message",b.PageDisplayedSearch="triptease.integration.page_displayed_search",b.PageDisplayedRoomsAndRates="triptease.integration.page_displayed_rooms-and-rates",b.PageDisplayedConfirmation="triptease.integration.page_displayed_confirmation",b.PageDisplayedCheckout="triptease.integration.page_displayed_checkout",b.PageDisplayedUnknown="triptease.integration.page_displayed_unknown",b.PageDisplayedGroup="triptease.integration.page_displayed_group",b.PageDisplayedPartial="triptease.integration.page_displayed_partial",b.PageErroredRoomsAndRates="triptease.integration.page_errored_rooms-and-rates",b.PageErroredConfirmation="triptease.integration.page_errored_confirmation",b.IntegrationData="triptease.integration.integration_data",b.PartialConfirmationPageData="triptease.integration.partial_confirmation_data",b.InvalidConfirmationData="triptease.integration.invalid_confirmation_data",b.InvalidPage="triptease.integration.invalid_page",b.GenericScript="triptease.integration.generic_script",b.DataCapture="triptease.integration.data_capture",b.GenericAnalysisConfirmation="triptease.integration.generic_analysis_confirmation",b.EntityUpdate="triptease.entity.update",b.StatusChanged="triptease.onboard.status-changed"})(pr||(pr={}));var fe;(function(h){h.PageDisplayedAdvert="page_displayed_advert",h.PageDisplayedEmail="page_displayed_email",h.PageDisplayedMessage="page_displayed_message",h.UserClickedAdvert="user_clicked_advert",h.UserClickedEmailCTA="user_clicked_email-cta",h.UserClickedMessageClose="user_clicked_message-close",h.UserClickedMessageCTA="user_clicked_message-cta",h.UserSubmittedPII="user_submitted_pii",h.UserClickedBookingEngineLink="user_clicked_booking-engine-link",h.UserClickedEmailAddress="user_clicked_email-address",h.UserClickedLink="user_clicked_link",h.UserClickedOutboundLink="user_clicked_outbound-link",h.UserClickedPhoneNumber="user_clicked_phone-number"})(fe||(fe={}));var Tl=[fe.UserClickedBookingEngineLink,fe.UserClickedEmailAddress,fe.UserClickedLink,fe.UserClickedOutboundLink,fe.UserClickedPhoneNumber];function Ss(t){var e,r,n,i;try{if(((r=(e=t==null?void 0:t.context)==null?void 0:e.app)==null?void 0:r.name)==="MessageEngine")return{channel:"Messages",provider:"Triptease"};if(Tl.includes(t.event))return{channel:"Direct",provider:"Unknown"};let{eventCounter:s,trafficSource:a}=(i=(n=t==null?void 0:t.context)==null?void 0:n.tab)!=null?i:{};if(s===1)return{channel:a==null?void 0:a.channel,provider:a==null?void 0:a.provider}}catch(s){}return{channel:"Unknown",provider:"Unknown"}}var ne=I(Be());var Os=I(ye());var ks=["utm_campaign","utm_content","utm_medium","utm_source","utm_term","tt_ad_type","tt_auid","tt_channel","tt_cid","tt_meta","tt_pmd","tt_ps_tid","tt_rt","dclid","fbclid","gbraid ","gclid","gclsrc","msclkid","wbraid","wh_token"];function Sn(t,e,r){var d,f;let{queryParsed:n,fragment:i}=J(t),s=i?B((d=i.split("?")[1])!=null?d:i,!1):{},a=(f=q.atob(n==null?void 0:n.data))!=null?f:{},c=w(w(w({},s),n),a==null?void 0:a.payload);return m.removeEmpty(r.reduce((g,C)=>{let v=c[C];if(!v)return g;let h=Array.isArray(v)?v.filter(Boolean)[0]:v;if(h.includes("?")&&h.includes("="))return Sn(h,g,r);if(h.includes("&")&&h.includes("=")){let[oe,M]=h.split(/&(.*)/);return g[C]=oe,Sn(`?${M}`,g,r)}return g[C]=h,g},e))}function fr(t,e){return typeof t!="string"?{}:Sn(t,{},e)}function Cs(t){return fr(t,ks)}function As(t){return t.filter(Boolean).reverse().reduce((r,n)=>_.merge(r,n),{})}var Pl=new Map([["facebook","Facebook"],["facebook.com","Facebook"],["fb","Facebook"],["ig","Instagram"],["instagram","Instagram"],["line","Line"],["linkedin","LinkedIn"],["pinterest","Pinterest"],["reddit","Reddit"],["snapchat","SnapChat"],["tiktok","TikTok"],["tripadvisor","TripAdvisor"],["tripadvisor.com","TripAdvisor"],["twitter","Twitter"],["twitter.com","Twitter"],["wechat","WeChat"],["yelp","Yelp"],["zalo","Zalo"]]),El=new Map([["facebook","Facebook"],["instagram","Instagram"],["twitter","Twitter"],["snapchat","SnapChat"]]),Ts=new Map([["baidu","Baidu"],["bing","Bing"],["duckduckgo","DuckDuckGo"],["google","Google"],["google.com","Google"],["googlemybusiness","Google"],["gha","Google"],["kayak","Kayak"],["msn","MSN"],["naver","Naver"],["rakuten","Rakuten"],["seznam","Seznam"],["skyscanner","SkyScanner"],["trivago","Trivago"],["wego","Wego"],["yahoo","Yahoo"],["yandex","Yandex"]]),Il=new Set(["display","banner","expandable","interstitial","cpm"]),Rl=/^(.*cp.*|ppc|paid.*)$/,_l=/^social[-_ ]?(?:network|media)?$/,Ps=/^e[-_\s]?mail$/;function Es(t){return/metai.*o/.test(t)}function Ml(t,e,r,n){return t?!0:/google.*hpa/.test(e)&&Es(r)&&n}function Hl(t,e){return!!t||e==="display"}function Ll(t){return t==="paidsearch"}function Dl(t){return t==="paidsocial"}function ql(t){return!!(t==null?void 0:t.startsWith("email"))}function jl(t){return t==="messages"}var z=class{constructor(e){this.wihpDomains=new Set(["secure-hotel-tracker.com","secure-relay.com"]);this.dEdgeDomains=["redir.book-secure.com",".official-rates.com"];this.travelclickDomains=["tcgms.net","travelclick.com","zmaildirect.com"];this.cendynDomains=["guestfolio.net","contact-client.com"];this.history=e.map(r=>m.removeEmpty(H(w({},r),{urlParsed:J(r.url),wellKnownParams:Cs(r.url)}))),this.wellKnownParams=As(this.history.map(r=>r.wellKnownParams))}get referrer(){var e;return J((e=this.history.find(r=>r.urlSource==="referrer"))==null?void 0:e.url)}get page(){var e;return J((e=this.history.find(r=>r.urlSource==="page"))==null?void 0:e.url)}getParameter(e){let r=this.wellKnownParams[e];return p(()=>r.toLowerCase().trim())}get linkType(){var r;let e=(r=this.getParameter("tt_ad_type"))==null?void 0:r.toLowerCase();return e==="paid"?"Paid":e==="free"?"Free":Rl.test(this.getParameter("utm_medium"))?"Paid":"Unknown"}get searchEngine(){var s;let e=this.getParameter("utm_source"),r=this.getParameter("tt_meta"),[,n]=(s=Array.from(Ts.entries()).find(([a])=>(e==null?void 0:e.startsWith(a))||(r==null?void 0:r.startsWith(a))))!=null?s:[];if(n)return n;let[i]=p(()=>this.referrer.host.split(".").flatMap(a=>[Ts.get(a)].filter(Boolean)),[]);return i||"Unknown"}get social(){let e=Pl.get(this.getParameter("utm_source"));if(e)return e;let[r="Unknown"]=p(()=>this.referrer.host.split(".").flatMap(n=>[El.get(n)].filter(Boolean)),[]);return r}get tripteaseChannels(){let e=this.getParameter("utm_source"),r=this.getParameter("utm_campaign"),n=this.getParameter("tt_meta"),i=this.getParameter("tt_rt"),s=this.getParameter("tt_channel"),a=!!this.history.find(c=>["redirectSource","redirectDestination"].includes(c.urlSource));if(Ml(n,e,r,a))return{channel:"Metasearch",provider:"Triptease",adType:this.linkType};if(Hl(i,s))return{channel:"Display",provider:"Triptease",adType:"Retargeting"};if(Ll(s))return{channel:"Paid Search",provider:"Triptease",adType:"Unknown"};if(Dl(s))return{channel:"Paid Social",provider:"Triptease",adType:"Unknown"};if(ql(s))return{channel:"Email",provider:"Triptease",adType:"Unknown"};if(jl(s))return{channel:"Messages",provider:"Triptease",adType:"Unknown"}}get thirdPartyChannels(){var s;let e=((s=this.referrer)==null?void 0:s.host)||"",r=this.getParameter("utm_campaign"),n=this.getParameter("utm_source"),i=this.getParameter("utm_medium");if(this.wihpDomains.has(e)||Es(r))return{channel:"Metasearch",provider:"WIHP",adType:this.linkType};if(this.dEdgeDomains.some(a=>e.endsWith(a)))return{channel:this.channel,provider:"D-Edge",adType:this.linkType};if(this.travelclickDomains.some(a=>e.endsWith(a))&&e!==this.page.host)return{channel:this.channel,provider:"Travelclick",adType:this.linkType};if((e==null?void 0:e.endsWith("revinate.com"))||n==="revinate")return{channel:this.channel,provider:"Revinate",adType:this.linkType};if(this.cendynDomains.some(a=>e.endsWith(a))||n==="cendyn")return{channel:this.channel,provider:"Cendyn",adType:this.linkType};if(i==="channel_connect")return{channel:this.channel,provider:"Sabre",adType:this.linkType}}get channel(){let e=this.getParameter("utm_source"),r=this.getParameter("utm_medium");return e==="direct"||!r&&!e?"Direct":Il.has(r)?"Display":Ps.test(e)||Ps.test(r)?"Email":this.searchEngine!=="Unknown"?this.linkType==="Paid"?"Paid Search":"Organic Search":this.social!=="Unknown"?this.linkType?"Paid Social":"Organic Social":_l.test(r)?"Organic Social":"Unknown"}standardChannels(){return{channel:this.channel,provider:"Unknown",adType:"Unknown"}}get trafficSource(){var r,n;let e=(n=(r=this.tripteaseChannels)!=null?r:this.thirdPartyChannels)!=null?n:this.standardChannels();return H(w({},e),{social:this.social,searchEngine:this.searchEngine})}};A([ne.lazy],z.prototype,"referrer",1),A([ne.lazy],z.prototype,"page",1),A([Os.cache],z.prototype,"getParameter",1),A([ne.lazy],z.prototype,"linkType",1),A([ne.lazy],z.prototype,"searchEngine",1),A([ne.lazy],z.prototype,"social",1),A([ne.lazy],z.prototype,"tripteaseChannels",1),A([ne.lazy],z.prototype,"channel",1),A([ne.lazy],z.prototype,"trafficSource",1);function Ul(t){return{title:t.document.title,locale:t.document.documentElement.lang||t.document.documentElement.getAttribute("xml:lang")||"",url:t.location.href,urlParsed:J(t.location.href),referrer:t.document.referrer,referrerParsed:J(t.document.referrer),characterSet:t.document.characterSet,opener:p(()=>Boolean(t.opener),!1)}}function Bl(t){var e;return(e=t.find(r=>ws(r)))==null?void 0:e.trackingId}var kn=class{constructor(e,r,n){this.browserMessageBuilder=e;this.sessionTracker=r;this.identityCombiner=n}buildMessage(e){return u(this,null,function*(){var c;let r=yield this.browserMessageBuilder.buildMessage(e),n=yield this.identityCombiner.getIdentity(),i=yield this.sessionTracker.urls((c=r.payload)==null?void 0:c.apiKey,n.serverTime),s=new z(i),a=m.removeEmpty(_.merge(H(w({},H(w({},n),{serverTime:void 0})),{trackingId:Bl(i),context:{page:{urls:s.history},tab:{history:s.history,wellKnownParams:s.wellKnownParams,trafficSource:s.trafficSource},trafficSource:s.trafficSource}}),r));return m.removeEmpty(_.merge({context:{eventSource:Ss(a)}},a))})}},mr=class{constructor(e,r=new ft){this.window=e;this.clock=r}get timezone(){return p(()=>Intl.DateTimeFormat().resolvedOptions().timeZone,"")}buildMessage(e){return u(this,null,function*(){let r=this.clock.now(),n=Ul(this.window);return m.removeEmpty(_.merge({createdAt:r,messageId:mt(),context:{library:gt,userAgent:this.window.navigator.userAgent,locale:this.window.navigator.language,page:n,screen:{width:this.window.screen.width,height:this.window.screen.height},timezone:this.timezone,thirdParty:yield vs(this.window),scripts:is(this.window),features:_o(this.window,...Gl),performance:p(()=>PerformanceObserver.supportedEntryTypes,[])}},e))})}};A([Is.lazy],mr.prototype,"timezone",1);var Gl=["fbq","fetch","Set","Map","WebAssembly.constructor","PerformanceObserver","Date","Date.now","Date.prototype.toISOString","Date.prototype.toJSON","Date.prototype.getTime","crypto.randomUUID","crypto.getRandomValues","crypto.subtle.digest","Intl.Collator","Intl.NumberFormat","Intl.NumberFormat.prototype.formatToParts","Intl.DateTimeFormat","Intl.DateTimeFormat.prototype.formatToParts","console.log","navigator.share","navigator.serviceWorker","EventSource","customElements","__tcfapi","__cmp","_etmc","IntersectionObserver","IntersectionObserverEntry","IntersectionObserverEntry.prototype.intersectionRatio","document.browsingTopics","navigator.joinAdInterestGroup","navigator.runAdAuction","navigator.adAuctionComponents","navigator.createAuctionNonce","HTMLFencedFrameElement"];var Wl=y("messaging"),gr=class{constructor(){this.handlers=new Map}register(e,r){return e.forEach(n=>{if(this.hasHandlerFor(n))throw new Error(`Method name "${n}" already registered to a handler`);this.handlers.set(n,r)}),this}handle(e){return u(this,null,function*(){let r=this.handlers.get(e.requestType);return r?(Wl.debug("Matched message to handler",e,r),yield r.handle(e)):ur(e.correlationId,e.requestType)})}hasHandlerFor(e){return this.handlers.has(e)}};var Cn=y("messaging"),$e=class{constructor(e){this.target=e}handle(e){return u(this,null,function*(){let r=this.target[e.requestType];if(!r)return Cn.debug("No method found that matches method",e.requestType,this.target),ur(e.correlationId,e.requestType);try{Cn.debug("Found method",e.requestType);let n=yield r.apply(this.target,e.payload);return dr(e.correlationId,n)}catch(n){return Cn.debug("Error trying to in invoke method",e.requestType,n),ys(e.correlationId,n)}})}};var Fl=te.get();function Kl(t){return`https://onboard.triptease.io/integrations/${Fl}/${t}.js`}function An(t){return typeof t!="string"?"":t.split(/[^A-Za-z0-9-]/)[0].replace(/-/g,"").toLowerCase()}var l=class{constructor(e){this.name=e;if(!/[A-Za-z0-9]/.test(e))throw new Error("Only alpha numeric allowed");l.Lookup.set(An(e),this)}static values(){return Array.from(l.Lookup.values())}static parse(e){let r=l.Lookup.get(An(e));if(!r)throw new Error(`Invalid booking engine name: ${e}`);return r}toString(){return this.name}get canonical(){return An(this.name)}get folder(){return this.isSelfIntegration()?l.Default.folder:Q.kebabCase(this.name)}get script(){return Kl(this.folder)}isSelfIntegration(){return l.SelfIntegration.has(this)}},o=l;o.Lookup=new Map,o.AboveProperty=new l("AboveProperty"),o.AfricaAlbida=new l("AfricaAlbida"),o.Alaric=new l("Alaric"),o.Ascott=new l("Ascott"),o.ASIWebRes=new l("ASIWebRes"),o.AtlantisORS=new l("AtlantisORS"),o.Auberge=new l("Auberge"),o.AvailPro=new l("AvailPro"),o.Avvio=new l("Avvio"),o.Ayana=new l("Ayana"),o.AZDS=new l("AZDS"),o.BestWesternFrance=new l("BestWesternFrance"),o.BestWesternItaly=new l("BestWesternItaly"),o.BestWesternUk=new l("BestWesternUk"),o.Betsy=new l("Betsy"),o.Bloom=new l("Bloom"),o.BookAssist=new l("BookAssist"),o.BookEasy=new l("BookEasy"),o.Bookolo=new l("Bookolo"),o.BookOnlineNow=new l("BookOnlineNow"),o.BookVisit=new l("BookVisit"),o.Booking=new l("Booking"),o.Booking2Hotels=new l("Booking2Hotels"),o.BookingExpert=new l("BookingExpert"),o.BrochnerHotels=new l("BrochnerHotels"),o.BusyRooms=new l("BusyRooms"),o.BWHHotelGroup=new l("BWHHotelGroup"),o.CenterHotels=new l("CenterHotels"),o.CityExpress=new l("CityExpress"),o.Clink=new l("Clink"),o.Clock=new l("Clock"),o.CloudBeds=new l("CloudBeds"),o.Cocotel=new l("Cocotel"),o.CompuRez=new l("CompuRez"),o.Comwell=new l("Comwell"),o.ConstanceHotels=new l("ConstanceHotels"),o.Default=new l("Default"),o.DerqueBooking=new l("DerqueBooking"),o.DeutscheHospitality=new l("DeutscheHospitality"),o.Dingus=new l("Dingus"),o.Dirs21=new l("Dirs21"),o.DoyleCollection=new l("DoyleCollection"),o.EasyBooking=new l("EasyBooking"),o.EasyConsulting=new l("EasyConsulting"),o.Erez=new l("Erez"),o.EGds=new l("EGds"),o.Evancy=new l("Evancy"),o.Exely=new l("Exely"),o.Everly=new l("Everly"),o.ExtendedStayAmerica=new l("ExtendedStayAmerica"),o.Ezee=new l("Ezee"),o.FastBooking=new l("FastBooking"),o.Firmdale=new l("Firmdale"),o.FourSeasons=new l("FourSeasons"),o.FrontDeskMaster=new l("FrontDeskMaster"),o.FullertonHotels=new l("FullertonHotels"),o.Furama=new l("Furama"),o.GemHotels=new l("GemHotels"),o.Generic=new l("Generic"),o.GlenEagles=new l("GlenEagles"),o.GothiaTowers=new l("GothiaTowers"),o.GuestCentric=new l("GuestCentric"),o.GuestDesk=new l("GuestDesk"),o.GuestLine=new l("GuestLine"),o.GuestPro=new l("GuestPro"),o.Guild=new l("Guild"),o.HamiltonIsland=new l("HamiltonIsland"),o.HamiltonIslandHolidayHomes=new l("HamiltonIslandHolidayHomes"),o.HandPickedHotels=new l("HandPickedHotels"),o.Hart=new l("Hart"),o.HHotels=new l("HHotels"),o.HighLevelSoftware=new l("HighLevelSoftware"),o.Hipotels=new l("Hipotels"),o.HiUsa=new l("HiUsa"),o.Hoteliers=new l("Hoteliers"),o.HoteliersGuru=new l("HoteliersGuru"),o.HotelKeyApp=new l("HotelKeyApp"),o.HotelNetSolutions=new l("HotelNetSolutions"),o.HotelPartner=new l("HotelPartner"),o.Hotetec=new l("Hotetec"),o.Hotusa=new l("Hotusa"),o.Hoxton=new l("Hoxton"),o.HtiSystems=new l("HtiSystems"),o.Hyatt=new l("Hyatt"),o.GHS=new l("GHS"),o.GuestRez=new l("GuestRez"),o.Iberostar=new l("Iberostar"),o.Infotera=new l("Infotera"),o.Inkaterra=new l("Inkaterra"),o.InnQuest=new l("InnQuest"),o.InnRoad=new l("InnRoad"),o.InnStyle=new l("InnStyle"),o.Inntopia=new l("Inntopia"),o.Iperbooking=new l("Iperbooking"),o.IRM=new l("IRM"),o.JazHotels=new l("JazHotels"),o.Journey=new l("Journey"),o.Kasa=new l("Kasa"),o.KeaHotels=new l("KeaHotels"),o.Kempinski=new l("Kempinski"),o.Kerzner=new l("Kerzner"),o.LatourHotelsAndResorts=new l("LatourHotelsAndResorts"),o.LHW=new l("LHW"),o.LifeHouse=new l("LifeHouse"),o.Loews=new l("Loews"),o.Lotte=new l("Lotte"),o.LumaHotels=new l("LumaHotels"),o.Luxscapia=new l("Luxscapia"),o.McDreams=new l("McDreams"),o.Mews=new l("Mews"),o.MgmResorts=new l("MgmResorts"),o.MillenniumHotels=new l("MillenniumHotels"),o.MinorHotels=new l("MinorHotels"),o.Mirai=new l("Mirai"),o.Namastay=new l("Namastay"),o.NativePlaces=new l("NativePlaces"),o.NeoBookings=new l("NeoBookings"),o.NetAffinity=new l("NetAffinity"),o.NHHotels=new l("NHHotels"),o.OKU=new l("OKU"),o.OmegaHotelManagement=new l("OmegaHotelManagement"),o.Omnibees=new l("Omnibees"),o.OneHotels=new l("OneHotels"),o.Opera=new l("Opera"),o.OpenHotel=new l("OpenHotel"),o.P3=new l("P3"),o.PalaceResorts=new l("PalaceResorts"),o.PanHospitality=new l("PanHospitality"),o.Paraty=new l("Paraty"),o.Pegasus=new l("Pegasus"),o.Pelican=new l("Pelican"),o.Phobs=new l("Phobs"),o.Planet=new l("Planet"),o.PointAHotels=new l("PointAHotels"),o.Prestige=new l("Prestige"),o.ProfitRoom=new l("ProfitRoom"),o.Protel=new l("Protel"),o.PursuitCollection=new l("PursuitCollection"),o.RedPlanet=new l("RedPlanet"),o.RegalHotels=new l("RegalHotels"),o.ReserveHotel=new l("ReserveHotel"),o.ReserveOnline=new l("ReserveOnline"),o.ReservationResources=new l("ReservationResources"),o.Reservit=new l("Reservit"),o.Reseze=new l("Reseze"),o.ResNexus=new l("ResNexus"),o.ResOnTheWeb=new l("ResOnTheWeb"),o.Retargeting=new l("Retargeting"),o.Revenatium=new l("Revenatium"),o.Reztrip=new l("Reztrip"),o.RGuest=new l("RGuest"),o.RMSCloud=new l("RMSCloud"),o.Roiback=new l("Roiback"),o.RoomKey=new l("RoomKey"),o.RoomMaster=new l("RoomMaster"),o.RoomSome=new l("RoomSome"),o.RoomStay=new l("RoomStay"),o.SandsVegas=new l("SandsVegas"),o.Sandrix=new l("Sandrix"),o.Sbe=new l("Sbe"),o.SeamillHydro=new l("SeamillHydro"),o.Seekda=new l("Seekda"),o.Selfbook=new l("Selfbook"),o.Shr=new l("Shr"),o.SimpleBooking=new l("SimpleBooking"),o.SiteMinder=new l("SiteMinder"),o.Skipper=new l("Skipper"),o.Staah=new l("Staah"),o.StationCasinos=new l("StationCasinos"),o.Stayntouch=new l("Stayntouch"),o.Sweett=new l("Sweett"),o.Synxis=new l("Synxis"),o.SysHotelOnline=new l("SysHotelOnline"),o.Taj=new l("Taj"),o.ThinkReservations=new l("ThinkReservations"),o.Travelanium=new l("Travelanium"),o.TravelClick=new l("TravelClick"),o.Uibscrs=new l("Uibscrs"),o.Up=new l("Up"),o.VacationMarbella=new l("VacationMarbella"),o.Valamar=new l("Valamar"),o.VerticalBooking=new l("VerticalBooking"),o.Viato=new l("Viato"),o.Vinpearl=new l("Vinpearl"),o.WebRezPro=new l("WebRezPro"),o.WestCordHotels=new l("WestCordHotels"),o.Witbooking=new l("Witbooking"),o.Youngs=new l("Youngs"),o.Zafiro=new l("Zafiro"),o.SelfIntegration=new Set([l.Dirs21,l.HtiSystems,l.ExtendedStayAmerica]);function Rs(t,...e){let r=tr(t,...e);if(!r)return;let[n]=[...r].reverse();return n}function On(t){let e=p(()=>t.host.toLowerCase(),""),r=t.toString().toLowerCase();if(e==="gc.synxis.com")return o.Synxis;if(e==="be.synxis.com")return o.Synxis;if(e.indexOf("travelclick")!==-1)return o.TravelClick;if(e.indexOf("bookingbutton")!==-1||e.indexOf("book-directonline")!==-1||e.indexOf("direct-book.com")!==-1)return o.SiteMinder;if(e.indexOf(".hyatt.")!==-1)return o.Hyatt;if(e.indexOf(".bookonthenet.")!==-1)return o.RoomKey;if(e.indexOf("firmdalehotels")!==-1)return o.Firmdale;if(e.indexOf("apxhotelsapartments")!==-1||e.indexOf("mews.li")!==-1)return o.Mews;if(e.indexOf(".guestline.")!==-1||e.indexOf(".roomlynx.")!==-1)return o.GuestLine;if(e.indexOf("book-onlinenow.net")!==-1)return o.BookOnlineNow;if(e.indexOf("windsurfercrs.com")!==-1)return o.Shr;if(e.indexOf("bestwestern.fr")!==-1)return o.BestWesternFrance;if(r.indexOf("webrez.com")!==-1||e.indexOf("worldweb.com")!==-1||e.indexOf("webrez.com/v")!==-1)return o.WebRezPro;if(e.indexOf("hoteliers.com")!==-1)return o.Hoteliers;if(e.indexOf("doylecollection")!==-1)return o.DoyleCollection;if(r.indexOf("/bookcore/")!==-1)return o.Roiback;if(e.indexOf("nativeplaces.com")!==-1)return o.NativePlaces;if(r.indexOf("/cgi-bin/lansaweb")!==-1)return o.StationCasinos;if(e==="www.palms.com")return o.StationCasinos;if(e.indexOf(".webhotel.")!==-1)return o.Opera;if(e.indexOf("online.bookvisit.")!==-1)return o.BookVisit;if(e.indexOf("direct-reservation")!==-1)return o.BusyRooms;if(e.indexOf("youngshotels")!==-1)return o.Youngs;if(e.indexOf("loewshotels")!==-1)return o.Loews;if(e.indexOf("regalhotel")!==-1)return o.RegalHotels;if(e.indexOf("live.high-level-software")!==-1)return o.HighLevelSoftware;if(e.indexOf("premiereserve.com")!==-1||e.indexOf("teg-hotels.com")!==-1)return o.Everly;if(e.indexOf("simplebooking")!==-1||e.indexOf("booking.crimsonhotel")!==-1)return o.SimpleBooking;if(e.indexOf("bookassist.com")!==-1)return o.BookAssist;if(e.indexOf("booking.africaalbidatourism.com")!==-1)return o.AfricaAlbida;if(e.indexOf("onepagebooking.com")!==-1)return o.HotelNetSolutions;if(e.indexOf("reservhotel.com")!==-1)return o.ReserveHotel;if(r.indexOf("/irmng")!==-1)return o.IRM;if(e.indexOf("booking-channel.com")!==-1)return o.Hotusa;if(e.includes(".venetian.")||e.includes(".venetianlasvegas."))return o.SandsVegas;if(e.indexOf("clock-software.com")!==-1||e.indexOf("villasriomar.com")!==-1)return o.Clock;if(e.indexOf("tajinnercircle.com")!==-1||e.indexOf("tajhotels.com")!==-1||e.indexOf("gateway-hotels.")!==-1)return o.Taj;if(e.indexOf("booking.iberostartheclub.com")!==-1)return o.Iberostar;if(e.indexOf("services.comwell.com")!==-1)return o.Comwell;if(e.indexOf(".profitroom.")!==-1)return o.ProfitRoom;if(e.indexOf("bookingexpert.it")!==-1)return o.BookingExpert;if(e.indexOf("cloud-reservations.net")!==-1)return o.Hart;if(e.indexOf("pr.palaceresorts.com")!==-1||e.indexOf("pr.moonpalace.com")!==-1||e.indexOf("pr.leblancsparesorts.com")!==-1||e.indexOf(".palaceelite.com")!==-1)return o.PalaceResorts;if(e.indexOf(".iqwebbook.com")!==-1)return o.InnQuest;if(e.indexOf("theguild.co")!==-1)return o.Guild;if(e.indexOf(".innroad.com")!==-1)return o.InnRoad;if(e.indexOf(".furama.com")!==-1)return o.Furama;if(e.indexOf(".reztrip.com")!==-1)return o.Reztrip;if(e.indexOf("nisekoportfolio.com")!==-1)return o.BookEasy;if(e.indexOf(".steigenberger.com")!==-1||e.indexOf(".intercityhotel.com")!==-1||e.indexOf(".maxxhotel.com")!==-1||e.indexOf(".jaz-hotel.com")!==-1)return o.DeutscheHospitality;if(e.indexOf(".cloudbeds.com")!==-1)return o.CloudBeds;if(e.indexOf(".thehoxton.com")!==-1)return o.Hoxton;if(e.indexOf(".lottehotel.com")!==-1)return o.Lotte;if(e.indexOf("kempinski.com")!==-1)return o.Kempinski;if(e.indexOf("derquebooking")!==-1)return o.DerqueBooking;if(e.indexOf(".gfhoteles.")!==-1)return o.DerqueBooking;if(e.indexOf(".gleneagles.com")!==-1)return o.GlenEagles;if(e.indexOf(".redplanethotels.com")!==-1)return o.RedPlanet;if(e.indexOf(".banffjaspercollection.com")!==-1||e.indexOf(".glacierparkcollection.com")!==-1)return o.PursuitCollection;if(e.indexOf(".bestwestern.co.uk")!==-1)return o.BestWesternUk;if(e.indexOf(".sbe.com")!==-1)return o.Sbe;if(e.indexOf(".reserve-online.net")!==-1)return o.ReserveOnline;if(e.indexOf("secure-hotel-booking.com")!==-1)return o.AvailPro;if(e.indexOf(".syshotelonline.it")!==-1)return o.SysHotelOnline;if(e.indexOf(".reservit.com")!==-1)return o.Reservit;if(e.indexOf("vinpearl.com")!==-1)return o.Vinpearl;if(e.indexOf(".omnibees.com")!==-1)return o.Omnibees;if(e.indexOf(".hipotels.com")!==-1)return o.Hipotels;if(e.indexOf(".handpickedhotels.co.uk")!==-1)return o.HandPickedHotels;if(e.indexOf("bookings.zafirohotels.com")!==-1)return o.Zafiro;if(e.indexOf(".viatocrs.de")!==-1)return o.Viato;if(e.indexOf(".easy-booking.")!==-1)return o.EasyBooking;if(e.indexOf(".ipms247.")!==-1||e.indexOf("reservas.hotelkokai.com")!==-1)return o.Ezee;if(e.indexOf(".innstyle.")!==-1)return o.InnStyle;if(e.indexOf(".book-secure.")!==-1)return o.FastBooking;if(e.indexOf(".cityexpress.")!==-1)return o.CityExpress;if(e.indexOf(".hoteleasyreservations.")!==-1)return o.EasyConsulting;if(e.indexOf(".travelanium.")!==-1)return o.Travelanium;if(e.indexOf(".e-gds.")!==-1)return o.EGds;if(e.indexOf(".booking.com")!==-1)return o.Booking;if(e.indexOf(".iperbooking.")!==-1)return o.Iperbooking;if(e.indexOf(".okuhotels.")!==-1)return o.OKU;if(e.indexOf(".pegsbe.")!==-1)return o.Pegasus;if(e.indexOf(".the-ascott.")!==-1||e.indexOf(".discoverasr.")!==-1)return o.Ascott;if(e.indexOf("kasa.")!==-1)return o.Kasa;if(e.indexOf("verticalbooking.")!==-1)return o.VerticalBooking;if(e.indexOf(".avvio.")!==-1)return o.Avvio;if(e.indexOf(".bestwestern.it")!==-1)return o.BestWesternItaly;if(e.indexOf("extendedstayamerica.")!==-1)return o.ExtendedStayAmerica;if(e.indexOf(".fourseasons.")!==-1||e.indexOf(".fourseasonscountryclub.")!==-1||e.indexOf(".fsweb.")!==-1)return o.FourSeasons;if(e.indexOf(".hti-systems.")!==-1)return o.HtiSystems;if(e.indexOf("lhw.")!==-1)return o.LHW;if(e.indexOf("nh-hotels.")!==-1||e.indexOf(".nh-hoteles.")!==-1||e.indexOf("nh-collection.")!==-1)return o.NHHotels;if(e.indexOf(".h-hotels.")!==-1)return o.HHotels;if(e.indexOf(".gothiatowers.")!==-1||e.indexOf(".upperhouse.")!==-1)return o.GothiaTowers;if(e.indexOf(".1hotels.")!==-1)return o.OneHotels;if(e.indexOf(".asiwebres.")!==-1)return o.ASIWebRes;if(e.indexOf(".bwhhotelgroup.")!==-1)return o.BWHHotelGroup;if(e.indexOf(".frontdeskmaster.")!==-1)return o.FrontDeskMaster;if(e.indexOf(".evancy.")!==-1)return o.Evancy;if(e.indexOf(".brochner-hotels.")!==-1)return o.BrochnerHotels;if(e.indexOf(".welcome-anywhere.")!==-1)return o.RoomMaster;if(e.indexOf("staybloom.")!==-1)return o.Bloom;if(e.indexOf(".keahotels.")!==-1)return o.KeaHotels;if(e.indexOf("westcordhotels.")!==-1)return o.WestCordHotels;if(e.indexOf(".lumahotels.")!==-1)return o.LumaHotels;if(e.indexOf(".reservation-system.")!==-1||e.indexOf(".allhandsmarketing.")!==-1)return o.Pelican;if(e.indexOf(".pointahotels.")!==-1)return o.PointAHotels;if(e.indexOf(".hoteliers.guru")!==-1)return o.HoteliersGuru;if(e.indexOf(".reseze.")!==-1)return o.Reseze;if(e.indexOf(".aboveproperty.")!==-1)return o.AboveProperty;if(e.indexOf(".superghs.")!==-1)return o.GHS;if(e.indexOf(".rguest.")!==-1)return o.RGuest;if(e.indexOf(".ayana.")!==-1)return o.Ayana;if(e.indexOf("erez.")!==-1)return o.Erez;if(e.indexOf(".valamar.")!==-1)return o.Valamar;if(e.indexOf(".stayntouch.")!==-1)return o.Stayntouch;if(e.indexOf("resnexus.com")!==-1)return o.ResNexus;if(e.indexOf(".namastay.io")!==-1)return o.Namastay;if(e.indexOf("guestrez.")!==-1)return o.GuestRez;if(e.indexOf(".phobs.")!==-1)return o.Phobs;if(e.indexOf(".staah.")!==-1||e.indexOf(".swiftbook.")!==-1)return o.Staah;if(e.indexOf(".hamiltonisland.")!==-1||e.indexOf(".qualia.")!==-1)return o.HamiltonIsland;if(e.indexOf(".hamiltonislandholidayhomes.")!==-1)return o.HamiltonIslandHolidayHomes;if(r.indexOf("luxguests")!==-1)return o.Luxscapia;if(r.indexOf(".thinkreservations.")!==-1)return o.ThinkReservations;if(r.indexOf(".witbooking.")!==-1)return o.Witbooking;if(r.indexOf(".onejourney.")!==-1)return o.Journey;if(r.indexOf(".resontheweb.")!==-1)return o.ResOnTheWeb;if(e.indexOf(".bookoloengine.")!==-1)return o.Bookolo;if(e.indexOf(".openhotel.")!==-1)return o.OpenHotel;if(e.indexOf(".revenatium.")!==-1)return o.Revenatium;if(e.indexOf(".millenniumhotels.")!==-1)return o.MillenniumHotels;if(e.indexOf(".hotelkeyapp.")!==-1)return o.HotelKeyApp;if(e.indexOf(".omegahotelmanagement.")!==-1)return o.OmegaHotelManagement;if(e.indexOf(".panhospitality.")!==-1)return o.PanHospitality;if(e.indexOf("honeycomb.rt.triptease.io")!==-1||e.indexOf("b.triptease.io")!==-1)return o.Retargeting}function zl(t){var e,r;if(t.document.querySelector('link[href*="synxis.com"]'))return o.Synxis;if(p(()=>Object.values(t.process.env).some(n=>p(()=>String(n).includes("synxis")))))return o.Synxis;if(p(()=>Object.keys(t).filter(i=>i.endsWith("Url")).map(i=>t[i]).some(i=>String(i).includes("travelclick.com")))||p(()=>!!Rs(t.dataLayer,"ihHotelID"),!1))return o.TravelClick;if(p(()=>t.document.querySelector('link[href*="vendors~about~booking~cancellation~checkout~confirmation~contact~policies~reservation"]'))||p(()=>t.dataLayer.find(n=>n.property_siteminder_property_id||n.booking_engine==="Modern"||n.tbb_prefix||n.virtual_url))||p(()=>t.document.querySelector('meta[name="occupancy-includes-infants"]'))||p(()=>!!t.digitalPartner.triptease))return o.SiteMinder;if(p(()=>t.dataLayer.some(n=>n.neobookings),!1))return o.NeoBookings;if(p(()=>Rs(t.dataLayer,"context.application")==="smart",!1))return o.AvailPro;if(t.document.querySelector("iframe.mews-distributor"))return o.Mews;if(t.WSMAIN||t.WsVars)return o.Shr;if(p(()=>t.document.querySelector("#clienId"),void 0))return o.RMSCloud;if(t.document.getElementById("bookingGadget")!==null)return o.GuestCentric;if(Boolean(t.document.querySelector('script[src*="UiBSJs"]')))return o.Uibscrs;if(p(()=>Boolean(t.Mirai),!1))return o.Mirai;if(t.MAIN_SITE==="paraty"||t.document.querySelector(".paraty-booking-form")||t.document.querySelector('img[src*=".paraty."]'))return o.Paraty;if(!!t.document.querySelector('[href^="https://www.booking2hotels.com"]')||t.document.querySelector('.booking-engine img[src*="booking2hotels"]'))return o.Booking2Hotels;if(t.document.querySelector('script[src*="seekda"]'))return o.Seekda;if(t.document.querySelector('meta[name="author"][content*="alaric"], [href*="alaric."]'))return o.Alaric;if(p(()=>t.document.cookie.split(/[=; ]/).find(n=>n==="alrcBasicToken")))return o.Alaric;if(p(()=>t.document.querySelector('meta[name="description"]').content.indexOf("reztrip")!==-1,!1))return o.Reztrip;if(p(()=>!!t.PROTELWBE5,!1))return o.Protel;if(p(()=>t.document.querySelector('link[href*="/bookvisit/"], meta[content*=".bookvisit."]')))return o.BookVisit;if(p(()=>t.document.querySelector('link[href*="webhotelier.net"]')))return o.ReserveOnline;if(p(()=>t.document.querySelector("#availpro-tracker")))return o.AvailPro;if(p(()=>t.document.querySelector("meta[name=Author][content*=RESERVIT]")))return o.Reservit;if(p(()=>t.document.querySelector("#eZee_BookingContainer, #eZee_BookingHeader, #eZee_BookingFilter, #eZ_BookingRooms")))return o.Ezee;if(p(()=>t.document.querySelector("img[src*=hotetec],a[href*=hotetec]")))return o.Hotetec;if(p(()=>t.document.querySelector("link[href*=cityexpress]")))return o.CityExpress;if(p(()=>t.document.querySelector("link[href*=travelanium]")||t.document.querySelector("input#ibe-base-url")))return o.Travelanium;if(p(()=>t.document.querySelector('a[href*=".e-gds."],img[src*=".e-gds."]')))return o.EGds;if(p(()=>t.document.querySelector('img[src*=".pegsbe."],img[src*=".bookingdirect."]')))return o.Pegasus;if(p(()=>t.document.querySelector("a[href*=verticalbooking], a[href*=VerticalBooking], script[src*=verticalbooking]"))||p(()=>typeof t.b_params.booking_engine_default_url=="string"))return o.VerticalBooking;if(p(()=>t.document.querySelector("guestdesk")))return o.GuestDesk;if(t.document.querySelector("img[src*=booking-channel],div[style*=booking-channel]"))return o.Hotusa;if(t.document.querySelector('img[src*=".asiwebres."]'))return o.ASIWebRes;if(t.document.querySelector("[class*=azds-booking]"))return o.AZDS;if(t.document.querySelector('[href*="compurez"]')||p(()=>t.document.querySelector("#footer").textContent.includes("CompuRez")))return o.CompuRez;if(t.document.querySelector('img[src*=".roommaster."],div[style*=".roommaster."]'))return o.RoomMaster;if(t.document.querySelector("[ng-app=PelicanApp]")||p(()=>t.myApp.name)==="PelicanApp")return o.Pelican;if(t.document.querySelector('#avvio, [href*="avvio.com"], [src*="avvio.com"]'))return o.Avvio;if(t.document.querySelector('[src*=".shrglobal."],[href*=".shrglobal."]'))return o.Shr;if(t.document.querySelector('[href*=".infotera."]'))return o.Infotera;if(t.document.querySelector('img[src*=".hoteliers.guru"]'))return o.HoteliersGuru;if(p(()=>typeof t.iBooking.hotel_alias=="string"))return o.GHS;if(t.document.querySelector('[src*=".omnibees."]'))return o.Omnibees;if(t.document.querySelector('[src*=".roomstay."],[href*=".roomstay."],[id*=roomstay-],[name*=roomstay-]'))return o.RoomStay;if(t.document.querySelector('[src*=".guestpro."],[href*="guestpro."]'))return o.GuestPro;if(p(()=>t.BookingEngine.SiteSettings.ApiUri,"").includes(".frontdeskmaster."))return o.FrontDeskMaster;if(t.location.host.indexOf(".opalcollection.")!==-1||typeof t.showOpalKeyPolicy=="function")return o.Sandrix;if(t.document.querySelector('[id^=erez],img[src*="erez."]'))return o.Erez;if(t.document.querySelector('ibe-up,[src*="ibe.uphotel.agency"]'))return o.Up;if(t.document.querySelector('[src*=".profitroom."]'))return o.ProfitRoom;if(p(()=>t.rt4Datalayer.ArrivalDtYYYYMMDD))return o.Pegasus;if(t.document.querySelector('[src*=".neobookings."]'))return o.NeoBookings;if(t.document.querySelector('a[href*="roomsome.hu"]'))return o.RoomSome;if(t.document.querySelector('[src*=".phobs."]'))return o.Phobs;if(t.document.querySelector('link[href*=".selfbook."]'))return o.Selfbook;if(t.document.querySelector("#PSBookEngine"))return o.Prestige;if(t.clockPmsWbePageViewCallback||t.document.querySelector('[src*=".clock-software."]'))return o.Clock;if(p(()=>{var n;return JSON.parse((n=t.sessionStorage.getItem("bookingengine"))!=null?n:"").session.chainData.booking_engine_configuration}))return o.Dingus;if(t.document.querySelector('link[href*="/luxscapia/"]'))return o.Luxscapia;if(t.document.querySelector('link[href*=".skipperhospitality."]'))return o.Skipper;if(!!((e=t.d21)==null?void 0:e.host)||!!((r=t.d21)==null?void 0:r.currentChannel))return o.Dirs21;if(p(()=>t.jsConfig.clientId))return o.Planet;if(t.document.querySelector('[href*="witbooking."]')||p(()=>t.wit_IntegrationId))return o.Witbooking;if(t.document.querySelector('a[href*=".p3hotels."]')||t.document.querySelector('script[src*="p3core"]'))return o.P3;if(p(()=>t.InntopiaManager))return o.Inntopia;if(t.document.querySelector('[href*=".netaffinity."]'))return o.NetAffinity;if(t.document.querySelector('a[href*=".atlantis.asia"]'))return o.AtlantisORS;if(t.document.querySelector('iframe[src*=".bookoloengine."]'))return o.Bookolo;if(t.document.querySelector('script[src*="res-online."]'))return o.HotelPartner;if(t.document.querySelector('script[src*=".hopenapi."]'))return o.Exely;if(p(()=>!!t.STAAHBookingTracker))return o.Staah;if(p(()=>t.__NEXT_DATA__.props.pageProps.siteConfig.publicPath.includes(".revenatium.")))return o.Revenatium;if(t.document.querySelector('img[src*="b.triptease.io/assets"]'))return o.Retargeting}function Vl(t){let e=p(()=>new P(t.location.href).host.toLowerCase(),"");if(e.indexOf("constancehotels.com")!==-1)return o.ConstanceHotels;if(e.indexOf("vacationmarbella.")!==-1)return o.VacationMarbella;if(t.document.querySelector("[src*=life-house],[href*=life-house]"))return o.LifeHouse;if(e.indexOf("cocotel.")!==-1)return o.Cocotel;if(t.document.querySelector('[href*=".latourhotelsandresorts."]')||["parkplazaresort.","cabinsatgreenmountain.","atlanticbeachresortnc.","sandpebblebeachclub."].find(r=>e.indexOf(r)!==-1))return o.LatourHotelsAndResorts;if(e.indexOf(".seamillhydro.")!==-1)return o.SeamillHydro;if(e.indexOf(".inkaterra.")!==-1)return o.Inkaterra;if(e.indexOf("reservationresources.")!==-1)return o.ReservationResources;if(e.indexOf(".mcdreamshotels.")!==-1)return o.McDreams;if(e.indexOf(".minorhotels.")!==-1)return o.MinorHotels;if(e.indexOf(".hiusa.")!==-1)return o.HiUsa;if(e.indexOf(".thebetsyhotel.")!==-1)return o.Betsy;if(e.indexOf(".centerhotels.")!==-1)return o.CenterHotels;if(e.indexOf(".clinkhostels.")!==-1)return o.Clink;if(e.indexOf(".jazhotels.")!==-1)return o.JazHotels;if(e.indexOf("sweett.")!==-1)return o.Sweett;if(e.indexOf(".mgmresorts.")!==-1||e.indexOf(".devtest.vegas")!==-1)return o.MgmResorts;if(t.document.querySelector('[href*=".kerzner"],[src*=".kerzner"]'))return o.Kerzner;if(e.indexOf(".gemhotels.")!==-1)return o.GemHotels}function Nl(t){let e=t.querySelector('script[src*="static.triptease.io/client-integrations/"]');if(!e)return;let[,r]=p(()=>e.src.match(/\/([^/]+).js$/))||[];if(!!r)return p(()=>o.parse(r))}function $l(t){return p(()=>{let r=t.document.querySelector('script[src*="onboard.triptease.io/bootstrap.js"]').src.match(/fallback=([a-zA-Z]+)/)[1];return o.parse(r)})}function Jl(t){let e=p(()=>new P(t.location.href).host.toLowerCase(),""),r=t.location.href.toString().toLowerCase();if(e.indexOf(".bachmann-hotels.")!==-1&&r.indexOf("confirmation")!==-1)return o.Protel;if(e.indexOf("aubergeresorts.")!==-1&&e.indexOf("reserve.aubergeresorts.")===-1)return o.Auberge;if(e.indexOf(".fullertonhotels.")!==-1)return o.FullertonHotels}function _s(t){return p(()=>On(new P(t.location.href)))||p(()=>zl(t))||p(()=>Vl(t))||Nl(t.document)||$l(t)||Jl(t)||o.Default}var yr=class{constructor(e,r,n=y("messaging")){this.listen=e;this.router=r;this.logger=n;this.rules=[];e.addListener(this.handler.bind(this)),this.addRule(wn,i=>i,i=>i),this.addRule(Zl,Xl,Ms)}registerAlias(e,r){if(!this.router.hasHandlerFor(r))throw new Error(`Illegal alias: Method "${r}" is not registered with router`);return this.addRule(Yl(e),Ql(r),Ms)}handler(e,r){return u(this,null,function*(){if(lr(e))return;this.logger.debug("listenOn received request",e);let n=this.rules.find(a=>a.predicate(e));if(!n)return;let i=n.requestConverter(e),s=yield this.router.handle(i);if(gs(s)){this.logger.debug(`Handler not found for request "${i.requestType}", potentially for another listener`);return}e.correlationId&&e.correlationId===s.correlationId&&(this.logger.debug("listenOn sending response to sender",s),r.send(n.responseConverter(s)))})}addRule(e,r,n){return this.rules.push({predicate:e,requestConverter:r,responseConverter:n}),this}};function Yl(t){return e=>e.type===t}function Zl(t){return!wn(t)&&!!t.correlationId}function Ql(t){return e=>({type:"triptease.onboard.request",requestType:String(t),payload:[e],correlationId:e.correlationId||"fire-and-forget"})}function Xl(t){let{value:e,correlationId:r}=t,{method:n}=pn(t.type);return{type:"triptease.onboard.request",requestType:n,payload:[e],correlationId:r}}function Ms(t){return{type:"triptease.onboard.response",correlationId:t.correlationId,value:t.payload}}var ht=class{static find(e){return this.scripts(e).map(r=>new P(r.src))}static scripts(e){let n=["bootstrap.js","/paperboy/","/identity-service/confirm"].map(s=>`script[src*="${s}"][src*="triptease.io"]`);n.push('script[src*="triptease.net"]');let i=n.join(", ");return e.querySelectorAll(i)}};var hr=class{static difference(e,r){return Array.from(e).reduce((n,i)=>r.has(i)?n:n.add(i),new Set)}};var bt=y("events"),Tn=class{constructor(e,r){this.timers=e;this.handle=r;this.finders=new Set;this.keepers=new Set;this.handleEvent=e=>u(this,null,function*(){try{bt.debug("CreatedOrDeletedEvents: Checking for new created items");let r=new Set(Array.from(this.finders).flatMap(s=>s())),n=hr.difference(r,this.keepers),i=hr.difference(this.keepers,r);this.keepers=r,(n.size>0||i.size>0)&&(bt.log(`CreatedOrDeletedEvents: ${n.size} created, ${i.size} deleted element detected - firing event`),yield this.handle(e))}catch(r){bt.error("CreatedOrDeletedEvents.handleEvent threw while polling",r)}})}start(){return u(this,null,function*(){bt.log("Start polling for created items"),this.id=this.timers.setInterval(this.handleEvent,1e3)})}stop(){return u(this,null,function*(){bt.log("Stop polling for created items"),this.id&&(this.timers.clearInterval(this.id),this.id=void 0)})}watch(e){e().forEach(n=>this.keepers.add(n)),this.finders.add(e)}};function Hs(t,e){return()=>Array.from(t.querySelectorAll(e))}var ed=y("events"),Pn=class{constructor(e,r){this.window=e;this.delegate=r;this.first=!0;this.fire=e=>u(this,null,function*(){if(this.window.document.hidden&&!this.first){ed.log("Document hidden - skipping",e);return}yield this.delegate.fire(e),this.first=!1})}listen(e){return u(this,null,function*(){yield this.delegate.listen(e)})}removeListener(e){this.delegate.removeListener(e)}};var En=y("events"),In=class{constructor(e,r){this.delegate=e;this.running=r;this.fire=e=>u(this,null,function*(){if(this.running.value){En.log("Already running - skipping",e);return}this.running.value=!0,yield this.delegate.fire(e),this.running.value=!1})}listen(e){return u(this,null,function*(){if(yield this.delegate.listen(e),this.running.value){En.log("Already running - firing immediately");try{yield e()}catch(r){En.log(r)}}})}removeListener(e){this.delegate.removeListener(e)}};var Ls=y("events"),Rn=class{constructor(){this.handlers=[];this.fire=e=>u(this,null,function*(){Ls.log(`Firing handlers(${this.handlers.length})`,e),yield Promise.all(this.handlers.map(r=>u(this,null,function*(){try{yield r()}catch(n){Ls.log("Error while firing handler",n)}})))})}listen(e){return u(this,null,function*(){this.handlers.push(e)})}removeListener(e){this.handlers=this.handlers.filter(r=>r!==e)}};var Ds=y("events"),_n=class{constructor(e,r){this.timers=e;this.delegate=r;this.timeoutMs=1e3;this.timerId=0;this.fire=e=>u(this,null,function*(){Ds.log(`Event observed, waiting for ${this.timeoutMs} ms quiet`,e),this.timers.clearInterval(this.timerId),this.timerId=this.timers.setTimeout(()=>u(this,null,function*(){Ds.log("Event quiet period ended, firing event",e),yield this.delegate(e)}),this.timeoutMs)})}};var td=y("events"),Mn=class{constructor(e,r,n=.2,i=new W){this.handle=e;this.running=r;this.idleThreshold=n;this.timers=i;this.lastState=!1;this.busy=!1;this.average=new vt;this.idleHandler=e=>{let r=e.timeRemaining();this.running.value?this.busy=!1:r===0?this.busy=!0:(this.average=this.average.calculate(r),this.busy=this.average.percentage<-this.idleThreshold),this.busy?this.idleId=void 0:this.idleId=this.timers.requestIdleCallback(this.idleHandler,r===0?void 0:{timeout:r})};this.intervalHandler=()=>u(this,null,function*(){this.stateHasChanged()&&this.isIdle()&&(td.log("Browser idle"),yield this.handle("Idle")),this.average=new vt,this.lastState=this.busy,this.idleId||(this.idleId=this.timers.requestIdleCallback(this.idleHandler))})}start(){return u(this,null,function*(){this.intervalId=this.timers.setInterval(this.intervalHandler,1e3),this.idleId=this.timers.requestIdleCallback(this.idleHandler)})}stop(){return u(this,null,function*(){this.intervalId&&this.timers.clearInterval(this.intervalId),this.idleId&&this.timers.cancelIdleCallback(this.idleId)})}isIdle(){return!this.busy}stateHasChanged(){return this.lastState!==this.busy}},vt=class{constructor(e=0,r=0,n=0,i=0){this.value=e;this.count=r;this.difference=n;this.percentage=i}calculate(e){let r=this.count+1,n=e-this.value,i=n/this.value,s=this.value+n/r;return new vt(s,r,n,i)}};var Hn=class{constructor(e,r){this.window=e;this.handle=r}start(){return u(this,null,function*(){this.window.addEventListener("visibilitychange",this.handle),this.window.addEventListener("popstate",this.handle),this.window.addEventListener("hashchange",this.handle),this.window.addEventListener("pageshow",this.handle),this.window.addEventListener("pagehide",this.handle),this.window.document.readyState!=="complete"?this.window.document.addEventListener("DOMContentLoaded",this.handle):yield this.handle("Document already loaded")})}stop(){return u(this,null,function*(){this.window.removeEventListener("visibilitychange",this.handle),this.window.removeEventListener("popstate",this.handle),this.window.removeEventListener("hashchange",this.handle),this.window.removeEventListener("pageshow",this.handle),this.window.removeEventListener("pagehide",this.handle),this.window.document.removeEventListener("DOMContentLoaded",this.handle)})}};var Ln=class{constructor(){this.value=!1}};var qs=class{constructor(e,r=new W){this.window=e;let n=new Ln;this.sink=new Pn(e,new In(new Rn,n)),this.fire=new _n(r,this.sink.fire).fire,this.mutation=new xt(this.fire),this.created=new Tn(r,this.fire),this.sources=[new Mn(this.fire,n),this.mutation,this.created,new Hn(e,this.fire)]}watch(e){this.created.watch(e)}listen(e){return u(this,null,function*(){yield this.sink.listen(e)})}start(){return u(this,null,function*(){yield Promise.all(this.sources.map(e=>e.start()))})}stop(){return u(this,null,function*(){this.sources.forEach(e=>e.stop())})}removeListener(e){this.sink.removeListener(e)}};function br(t){let e=T(t).triptease;return e.events=e.events||new qs(t)}var rd={characterData:!0,attributes:!0,childList:!0},xt=class{constructor(e){this.handle=e;this.observer=new MutationObserver(this.handle)}start(){return u(this,null,function*(){})}stop(){return u(this,null,function*(){this.observer.disconnect()})}static observe(e,r=rd){if(!("MutationObserver"in L))return e;let n=br(L).mutation;return e instanceof HTMLInputElement||e instanceof HTMLSelectElement?e.addEventListener("change",n.handle):n.observer.observe(e,r),e}};function Dn(t,e=L){return p(()=>br(e).watch(Hs(e.document,t))),t}var qn=class{constructor(e){this.parent=e}querySelector(e,r){let n=this.parent.querySelector(e);return n||void 0}querySelectorAll(e,r){return Array.from(this.parent.querySelectorAll(e))}},jn=class{constructor(e){this.parent=e}querySelector(e,r){var i;Dn(e,(i=this.parent.ownerDocument)==null?void 0:i.defaultView);let n=this.parent.querySelector(e);return n?xt.observe(n,r):void 0}querySelectorAll(e,r){var n;return Dn(e,(n=this.parent.ownerDocument)==null?void 0:n.defaultView),Array.from(this.parent.querySelectorAll(e)).map(i=>xt.observe(i,r)).filter(Boolean)}};function vr(t){let e=ir(t,"triptease-applications")||"auto";return p(()=>{let[r]=ht.find(new qn(t.document)),{applications:n}=B(r.query);return n},e).toLowerCase()}var wt=class{constructor(e,r,n){this.window=e;this.messageBatcher=r;this.messageBuilder=n}static create(e,r,n){var s;let i=T(e).onboard;return i.trackingApi=(s=i.trackingApi)!=null?s:new wt(e,r,n)}get isEnabled(){return vr(this.window)!=="none"}trackConfig(e){return u(this,null,function*(){!this.isEnabled||p(()=>e.payload.type===F.Payment)||(yield this.messageBatcher.send(m.removeEmpty(e)))})}trackEvent(e){return u(this,null,function*(){!this.isEnabled||(yield this.messageBatcher.send(e))})}trackError(e){return u(this,null,function*(){yield this.trackLog({context:{app:gt},payload:e,errorType:pt(e)?"exception":"console",level:"error"})})}trackMessage(e){return u(this,null,function*(){yield this.trackLog({context:{app:gt},payload:e,level:"info"})})}trackLog(e){return u(this,null,function*(){!this.isEnabled||(yield this.messageBatcher.send(yield this.messageBuilder.buildMessage(H(w({},e),{type:pr.Log}))))})}};var St=class{constructor(e,r,n,i=be.create(e),s=y("integration-executor")){this.window=e;this.kernel=r;this.consent=n;this.starter=i;this.logger=s;s.debug("DefaultApplicationLoader constructor called")}loadApplications(e){return u(this,null,function*(){var f;let r=vr(this.window);if(r==="none"||r==="tracking")return this.logger.log(`applications set to "${r}", skipping loading`),{};let{integrationId:n,clientKey:i,apiKey:s}=e,{applications:a}=(f=nd(yield this.kernel.applicationConfig({integrationId:n,clientKey:i,apiKey:s,includeDisabled:!0})))!=null?f:{applications:[]},c=this.filterApplications(r,a);return(yield Promise.all(c.map(g=>u(this,null,function*(){let C=this.consent.for(g);try{if(Jo(g)&&g.enabled&&C==="Granted")return yield this.starter.start(g),H(w({},g),{started:!0,consent:C})}catch(v){return H(w({},g),{started:!1,consent:C,error:v.message})}return H(w({},g),{consent:C})})))).reduce((g,C)=>(g[C.name]=m.removeEmpty({enabled:C.enabled,started:C.started,consent:C.consent,error:C.error}),g),{})})}filterApplications(e,r){return e==="auto"?r:r.filter(n=>n.name.toLowerCase()===e)}static create(e,r,n){var s;let i=T(e).triptease.onboard;return i.applicationLoader=(s=i.applicationLoader)!=null?s:new St(e,r,n)}};function nd(t){if(!!t)return{applications:t.applications.map(e=>e.name!=="Audiences"?e:H(w({},e),{enabled:e.enabled||t.applications.some(r=>["Meta","PaidSearch"].includes(r.name)&&r.enabled)}))}}var ha=I(ye());function xr(t){return t&&p(()=>t instanceof HTMLAnchorElement,t.tagName==="A")}var js=I(tn()),Us=I(ct());function Un(t){var e;return((e=t.host)==null?void 0:e.split("."))||[]}function wr(t,e){let r=Un(t).reverse(),n=Un(e).reverse(),i=0;for(let[s,a]of(0,js.array)(r,(0,Us.zip)(n)))if(s===a)i++;else break;return i>=3?!0:i===2?[r[i],n[i]].filter(s=>![void 0,"www"].includes(s)).length<=1:!1}function Bs(t){let[e]=Un(t);return e}var id=new Set([void 0,o.Default]);function Gs(t){return!id.has(On(t))}function Ws(t,e){if(t.host===e.host)return!1;let r=wr(t,e);return!!(!r&&Gs(e)||r&&od(e))}function od(t){let e=Bs(t);return e&&(e.includes("book")||e.includes("reservation"))}var sd=new Set(["book now","book","book room","book your stay","booking","check rates","check availability","cancel reservation","my reservations","reservations","reserve agora"]);function Fs(t){return ld(t).some(e=>sd.has(e))}function ad(t,e){let r=new P(e.href);return!!(Ws(t,r)||Fs(e))}function cd(t,e){let r=e.form;if(!r)return!1;let n=new P(e.formAction||e.getAttribute("formaction")||r.action);return!!(Ws(t,n)||Fs(e))}function Ks(t,e){return Gs(t)?!1:xr(e)?ad(t,e):cd(t,e)}function ld(t){return[t.innerText||t.textContent,t.value,t.title,t.getAttribute("alt")].filter(Boolean).map(e=>e.trim().toLowerCase())}function dd(t){var e,r;return(r=(e=t.innerText)!=null?e:t.textContent)==null?void 0:r.trim()}function zs(t){var e;return m.removeEmpty({element:t.tagName.toLowerCase(),classes:Array.from(t.classList),id:t.id,target:t.target.trim(),url:t.href.trim(),urlParsed:J(t.href),text:dd(t),title:t.title.trim(),alt:(e=t.getAttribute("alt"))==null?void 0:e.trim(),rel:Array.from(t.relList)})}function Vs(t){var r,n;let{text:e=""}=(r=t==null?void 0:t.click)!=null?r:{};return!(e.length<4||(t==null?void 0:t.integrationName)!==o.Default.canonical||!((n=t==null?void 0:t.language)==null?void 0:n.startsWith("en")))}var ud=y("click-tracking"),Bn=class{constructor(e,r){this.window=e;this.bootstrap=r;this.clickHandler=e=>u(this,null,function*(){try{let r=e.target;if(xr(r)){let n=new P(this.window.location.href),i=new P(r.href);if(i.scheme==="javascript"||i.scheme==="about")return;let s=T(this.window).triptease.config,a={integrationId:s==null?void 0:s.integrationId,integrationName:s==null?void 0:s.integrationName,clientKey:s==null?void 0:s.clientKey,clientName:s==null?void 0:s.clientName,apiKey:s==null?void 0:s.apiKey,hotelName:s==null?void 0:s.hotelName,language:s==null?void 0:s.language,click:zs(r)};i.scheme==="tel"?yield this.fireClickEvent("user_clicked_phone-number",a):i.scheme==="mailto"?yield this.fireClickEvent("user_clicked_email-address",a):Ks(n,r)?yield this.fireClickEvent("user_clicked_booking-engine-link",a):r.href&&!wr(n,i)?yield this.fireClickEvent("user_clicked_outbound-link",a):Vs(a)&&(yield this.fireClickEvent("user_clicked_link",a))}}catch(r){ud.error("clickHandler: Error ",r)}})}start(){this.window.addEventListener("click",this.clickHandler,{capture:!0,passive:!0})}stop(){this.window.removeEventListener("click",this.clickHandler)}fireClickEvent(e,r){return u(this,null,function*(){yield this.bootstrap.processEvent(m.removeEmpty({type:"triptease.event",event:e,payload:r}))})}};function Ns(t){switch(t){case"essential":case"necessary":return"essential";case"functionality":case"personalisation":case"preferences":return"functionality";case"performance":case"statistics":case"analytics":return"performance";case"marketing":case"advertising":return"marketing"}}var Gn=class{constructor(e){this.window=e}find(){let e=["necessary","preferences","statistics","marketing"].map(r=>p(()=>this.window.Cookiebot.consent[r])?Ns(r):void 0).filter(Boolean);if(e.length>0)return{type:"cmp",source:ee.cookieBot,values:e}}};var $s=new Set(["all"]);function Js(t){let e=new Set(t.filter(Boolean));return e.size===0||e.has("all")?$s:(e.has("none")&&e.size!==1&&e.delete("none"),e.has("auto")&&e.size!==1&&e.delete("auto"),e)}var pd=new Map([["ad_storage",["marketing"]],["ad_user_data",["marketing"]],["ad_personalization",["marketing","functionality"]],["analytics_storage",["performance"]],["functionality_storage",["functionality"]],["personalization_storage",["functionality"]],["security_storage",["essential"]]]),Wn=class{constructor(e){this.window=e}find(){if(Array.isArray(this.window.dataLayer)){let e=this.window.dataLayer.filter(a=>a[0]==="consent"&&a[1]==="default").reduce((a,c)=>w(w({},a),c[2]),{}),r=this.window.dataLayer.filter(a=>a[0]==="consent"&&a[1]==="update").reduce((a,c)=>w(w({},a),c[2]),e),i=Object.entries(r).filter(([a,c])=>c==="granted").map(([a])=>a).reduce((a,c)=>{let d=pd.get(c)||[];return[...a,...d]},[]),s=k.unique(i);if(s.length>0)return{type:"cmp",source:ee.google,values:s};if(s.length===0&&Object.keys(r).length>0)return{type:"cmp",source:ee.google,values:["none"]}}}};var fd={app_basics:"essential",app_preference:"functionality",app_analytics:"performance",app_marketing:"marketing"},Fn=class{constructor(e){this.window=e}find(){let{consents:e}=p(()=>this.window.klaro.getManager(),{consents:{}}),r=Object.entries(fd).reduce((n,[i,s])=>e[i]?[...n,s]:n,[]);if(r.length>0)return{type:"cmp",source:ee.klaro,values:r}}};var kt=class{constructor(e,r,n){this.window=e;this.key=r;this.parser=n}values(){return this.scripts().map(r=>r.dataset[this.key]).filter(Boolean).flatMap(r=>r.split(/\s*,\s*/g).map(n=>this.parser.parse(n))).filter(r=>!!r)}scripts(){let e=ht.scripts(new jn(this.window.document)),r=e.filter(n=>!n.src.includes("partner="));return r.length>0?r:e}};var Kn=class{constructor(e){this.lookup=e.reduce((r,n)=>r.set(n,n),new Map)}parse(e){if(!!e)return this.lookup.get(e.toLowerCase().trim())}},zn=class extends Kn{constructor(){super(["none","first-party","third-party","all"])}},Vn=class extends Kn{constructor(){super(["none","essential","functionality","performance","marketing","all","auto"])}};var md=y("consent"),Ys=class extends kt{constructor(e){super(e,"storageConsent",new Vn)}find(){let e=this.values();if(e.length>0)return{type:"script",source:"script",values:e}}},Nn=class{constructor(e,r=[new Ys(e),new Gn(e),new Fn(e),new Wn(e)]){this.finders=r}find(){return this.allConsents.overall}findAll(){return this.allConsents}get allConsents(){let e=this.finders.map(n=>n.find()).filter(Boolean);md.log("individual consents",e);let r=this.getOverallConsent(e);return[...e,r].reduce((n,i)=>{let s=i.type==="overall"?i.type:i.source;return n[s]=i,n},{})}getOverallConsent(e){let r=e.find(i=>i.type==="script"),n=e.find(i=>i.type==="cmp"&&i.values.length>0);return r?r.values.includes("auto")?n?{type:"overall",source:n.source,values:this.cleaned(n.values)}:{type:"overall",source:ee.defaultAutoConsentMode,values:["none"]}:{type:"overall",source:r.source,values:this.cleaned(r.values)}:{type:"overall",source:ee.defaultNoConsentMode,values:["all"]}}cleaned(e){return Array.from(Js(e))}};var Ct=I(N());var $n=class extends kt{constructor(e){super(e,"storage",new zn)}find(){let e=this.values();if(e.length>0)return{values:e}}};var Jn=y("consent"),At=class{constructor(e,r){this.callbacks=new Set;this.set(e,r)}onChange(e){this.callbacks.add(e)}set(e,r){Jn.debug("Setting Consent and Storage");let n=this.consent,i=this.storage;if(this.consent=new Set(e),this.storage=new Set(r),!n||!i)return this.fireChanged();let s=!_.same(Array.from(n).sort(Ct.ascending),Array.from(this.consent).sort(Ct.ascending)),a=!_.same(Array.from(i).sort(Ct.ascending),Array.from(this.storage).sort(Ct.ascending));if(s||a)return Jn.debug("Consent / Storage has changed"),this.fireChanged()}fireChanged(){this.callbacks.forEach(e=>{try{e()}catch(r){Jn.error(r)}})}toArray(){return Array.from(this.consent)}get applications(){let e=this.consent.has("functionality"),r=this.consent.has("performance"),n=this.consent.has("marketing"),i=this.consent.has("all");return new Map([["Chat",e||i?"Granted":"Denied"],["CrossOriginTracking","Granted"],["GoogleAnalyticsPrototype",r||n||i?"Granted":"Denied"],["Messages",e||n||i?"Granted":"Denied"],["Meta",r||n||i?"Granted":"Denied"],["PaidSearch",r||n||i?"Granted":"Denied"],["Parity",e||r||n||i?"Granted":"Denied"],["Retargeting",n||i?"Granted":"Denied"],["Audiences",n||i?"Granted":"Denied"],["PaidSocial",n||i?"Granted":"Denied"]])}for(e){return this.consent.has("all")?"Granted":this.applications.get(e.name)||(e.type==="other"?"Granted":"Denied")}get firstPartyStorage(){return this.storage.size===0?["functionality","performance","marketing","all"].some(e=>this.consent.has(e)):["first-party","all"].some(e=>this.storage.has(e))}get thirdPartyStorage(){return this.storage.size===0?["functionality","performance","marketing","all"].some(e=>this.consent.has(e)):["third-party","all"].some(e=>this.storage.has(e))}static create(e){var s,a,c,d;let r=new Nn(e),n=new $n(e),i=new At(((s=r.find())==null?void 0:s.values)||[],((a=n.find())==null?void 0:a.values)||[]);return(d=(c=T(e).triptease)==null?void 0:c.events)==null||d.listen(()=>u(this,null,function*(){var f,g;return i.set(((f=r.find())==null?void 0:f.values)||[],((g=n.find())==null?void 0:g.values)||[])})),i}};var Xs=I(Sr());var Ot=class{generate(e){return ta(e)()}};function Yn(t){let e=new Error(t);return e.source="ulid",e}var Zn="0123456789ABCDEFGHJKMNPQRSTVWXYZ",Tt=Zn.length,ea=Math.pow(2,48)-1,kr=10;function gd(t){let e=Math.floor(t()*Tt);return e===Tt&&(e=Tt-1),Zn.charAt(e)}function yd(t,e){if(isNaN(t))throw new Error(t+" must be a number");if(t>ea)throw Yn("cannot encode time greater than "+ea);if(t<0)throw Yn("time must be positive");if(!Number.isInteger(t))throw Yn("time must be an integer");let r,n="";for(;e>0;e--)r=t%Tt,n=Zn.charAt(r)+n,t=(t-r)/Tt;return n}function hd(t,e){let r="";for(;t>0;t--)r=gd(e)+r;return r}var bd=L;function vd(t=bd.crypto){return()=>{try{let e=new Uint8Array(1);return t.getRandomValues(e),e[0]/255}catch(e){return Math.random()}}}function xd(t){if(tp(()=>e.getAnonymousIds(),[])))))})}setAnonymousId(e){return u(this,null,function*(){yield Promise.all(this.providers.map(r=>p(()=>r.setAnonymousId(e))))})}syncAnonymousIds(e){return u(this,null,function*(){return k.unique(k.flatten(yield Promise.all(this.providers.map(r=>p(()=>r.syncAnonymousIds(e),[])))))})}};var ra="triptease-anonymous-id",Et=class{constructor(e){this.storage=e}getAnonymousIds(){return u(this,null,function*(){return this.get()})}setAnonymousId(e){return u(this,null,function*(){this.syncAnonymousIds([e])})}get(){let e=this.storage.get(ra);return e?Array.isArray(e)?e.flat():[e]:[]}syncAnonymousIds(e){return u(this,null,function*(){let r=this.get(),n=k.unique([...r,...e].flat());return this.storage.set(ra,n),n})}};var Ye=class{constructor(e){this.storage=e}get(e){let r=this.storage.getItem(e);if(r)return q.parseWithDates(r)}set(e,r){return this.storage.setItem(e,JSON.stringify(r)),this}clear(){this.storage.clear()}},It=class{constructor(){this.data=new Map}get(e){return this.data.get(e)}set(e,r){return this.data.set(e,r)}clear(){this.data.clear()}},Qn=class{constructor(e){this.stores=e}clear(){this.stores.forEach(e=>p(()=>e.clear()))}get(e){for(let r of this.stores){let n=p(()=>r.get(e));if(n)return n}}set(e,r){return this.stores.forEach(n=>p(()=>n.set(e,r))),this}};var Rt=I(Be()),na=I(ye()),ia=I(Sr());var Xn=class{static add(e,r){let n=new Date(e.getTime());return n.setUTCDate(e.getUTCDate()+r),n}};Xn.milliseconds=24*60*60*1e3;function*Sd(t,e){for(;t>=e;)yield t%e,t=Math.floor(t/e);yield t}function ei(t,e){return Array.from(t).reduce((r,n,i)=>r+ui(e,i)*n,0)}function*kd(t,e){for(let r of Ad(t,e))yield ei(r,2)}function*Cd(t,e){for(let r of t)for(let n=0;n0&&(yield r)}function*Od(t){let e=t.BYTES_PER_ELEMENT*8;for(let r of t)for(let n=0;nthis.digits[r]).join("")}get lookup(){return[...this.digits].reduce((e,r,n)=>e.set(r,n),new Map)}decodeInteger(e){return ei(this.decode(e),this.base)}decodeBits(e){return Cd(this.decode(e),this.bitsPerCharacter)}decode(e){return[...e].map(r=>this.lookup.get(r))}};A([Rt.lazy],Ze.prototype,"base",1),A([Rt.lazy],Ze.prototype,"bitsPerCharacter",1),A([Rt.lazy],Ze.prototype,"lookup",1);var xe=new Ze("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),Td=new Ze("0123456789ABCDEF"),sa=class{static get detect(){try{let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),new Int16Array(e)[0]===256?"LittleEndian":"BigEndian"}catch(e){return"Unknown"}}};A([Rt.lazy],sa,"detect",1);var V=class{constructor(e,r){this.timestamp=e;this.entropy=r;if(r.length%xe.bitsPerCharacter!=0)throw Error(`entropy bit length must be a multiple of ${xe.bitsPerCharacter}`)}toString(){let e=Ar(xe.encodeInteger(this.timestamp.getTime())).padStart(V.TIMESTAMP_LENGTH,"0"),r=Ar(xe.encodeBits(this.entropy));return e+r}static parse(e){if(!e)throw new Error("Invalid ULID");let r=e.slice(0,V.TIMESTAMP_LENGTH),n=e.slice(V.TIMESTAMP_LENGTH),i=xe.decodeInteger(Ar(r));if(!ln.isNumber(i))throw new Error("Invalid ULID");let s=xe.decodeBits(Ar(n)),a=new Date(i);return new V(a,Array.from(s))}static create(e=V.DEFAULT_LENGTH,r=aa,n=new ia.SystemClock){if(eu(this,null,function*(){Qe.debug("TimeoutIdentityProvider delegate.syncAnonymousIds called",r);let n=yield this.delegate.syncAnonymousIds(e);return Qe.debug("TimeoutIdentityProvider delegate.syncAnonymousIds returned",n,r),n}))(),this.wait(r)])}getAnonymousIds(){let e=++this.raceCounter;return Promise.race([(()=>u(this,null,function*(){Qe.debug("TimeoutIdentityProvider delegate.getAnonymousIds called",e);let r=yield this.delegate.getAnonymousIds();return Qe.debug("TimeoutIdentityProvider delegate.getAnonymousIds returned",r,e),r}))(),this.wait(e)])}setAnonymousId(e){return u(this,null,function*(){Qe.debug("TimeoutIdentityProvider delegate.setAnonymousId called",e),this.delegate.setAnonymousId(e)})}wait(e){return u(this,null,function*(){return yield this.timers.delay(this.delay),Qe.debug(`TimeoutIdentityProvider waited for ${this.delay} ms`,e),[]})}};var ri=class{getAnonymousIds(){return u(this,null,function*(){return[]})}setAnonymousId(e){return u(this,null,function*(){})}syncAnonymousIds(e){return u(this,null,function*(){return e})}};function ca(t){return t.opener&&t.opener!==t?new _t(800,re(new pe(new $(t,t.opener,[])))):new ri}var Rd=y("identity"),ni=class{constructor(e,r=3){this.delegate=e;this.limit=r}getAnonymousIds(){return u(this,null,function*(){return yield this.delegate.getAnonymousIds()})}setAnonymousId(e){return this.delegate.setAnonymousId(e)}internalSync(e,r=0){return u(this,null,function*(){if(r>this.limit)return Rd.error(`SynchronisingProvider syncAnonymousIds attempted more than ${this.limit} times`),e;let n=k.unique(e),i=k.unique(yield this.delegate.syncAnonymousIds(n));return n.length!==i.length?this.internalSync(i,r+1):i})}syncAnonymousIds(e){return u(this,null,function*(){return this.internalSync(e)})}};var la=I(Sr());var da=I(ye()),Or=class{constructor(e,r=new la.SystemClock,n=Ve({credentials:!0})){this.window=e;this.clock=r;this.httpClient=n}getQueryString(e,r){let n=`?userId=${e}`;return r?`${n}&sessionId=${r}`:n}getIdentityClientData(e,r){return u(this,null,function*(){let n=yield this.httpClient({url:`https://onboard.triptease.io/identity${this.getQueryString(e,r)}`,method:"GET"});if(n.status!==200)return{};let i=q.parseWithDates(n.body),s=p(()=>{let a=i.serverTime;return this.clock.now().getTime()-a.getTime()});return H(w({},i),{timeOffset:s})})}};A([da.cache],Or.prototype,"getIdentityClientData",1);var oi=I(ii()),et=class{constructor(e,r,n=new Or(e),i=new Ot){this.window=e;this.consent=r;this.identityClient=n;this.idGenerator=i}getIdentity(e){return u(this,null,function*(){let r=this.getIds();if(this.consent.thirdPartyStorage){let s=yield this.identityClient.getIdentityClientData(e,r.sessionId);return this.setIds(s),s}let n=r.userId||e||(0,oi.get)(()=>this.idGenerator.generate()),i=r.sessionId||(0,oi.get)(()=>this.idGenerator.generate());return this.setIds({sessionId:i,userId:n}),{isFreshUser:!r.userId,isFreshSession:!r.sessionId,userId:n,sessionId:i}})}getIds(){var e,r;try{return{userId:(e=this.window.sessionStorage.getItem(et.USER_ID_KEY))!=null?e:void 0,sessionId:(r=this.window.sessionStorage.getItem(et.SESSION_ID_KEY))!=null?r:void 0}}catch(n){}return{}}setIds({sessionId:e,userId:r}){try{this.window.sessionStorage.setItem(et.SESSION_ID_KEY,e),this.window.sessionStorage.setItem(et.USER_ID_KEY,r)}catch(n){}}},Mt=et;Mt.USER_ID_KEY="triptease-user-id",Mt.SESSION_ID_KEY="triptease-session-id";var ua=y("identity"),si=class{constructor(e,r,n,i=new Mt(e,n),s=new Cr(e,n),a=new It){this.window=e;this.kernelHost=r;this.consent=n;this.identityStore=i;this.domainUserId=s;this.inMemoryStorage=a;this._ids=new Set;this.build=()=>{ua.debug("Building identity providers");let e=[new Et(this.inMemoryStorage),ca(this.window)];e.push(new ti(this.domainUserId)),this.consent.firstPartyStorage&&(e.push(p(()=>new Et(new Ye(this.window.sessionStorage)))),e.push(p(()=>new Et(new Ye(this.window.localStorage))))),this.consent.thirdPartyStorage&&e.push(new _t(100,this.kernelHost)),this.identityProvider=new ni(Pt.create(...e))};this.consent.onChange(this.build),this.build()}getIdentity(){return u(this,null,function*(){ua.debug("getIdentity called");let{domainUserId:e}=this.domainUserId.getId();return m.removeEmpty((yield Promise.all([{domainUserId:e},X(()=>u(this,null,function*(){let r=yield this.identityStore.getIdentity(e);return this.ids=[r.userId],r}),{}),X(()=>u(this,null,function*(){this.ids=yield this.identityProvider.syncAnonymousIds(this.ids)}),{})])).reduce((r,n)=>w(w({},r),n),{anonymousId:k.first(this.ids),anonymousIds:this.ids}))})}get ids(){return Array.from(this._ids).sort()}set ids(e){(Array.isArray(e)?e:[e]).filter(n=>p(()=>ie.parse(n))).forEach(n=>this._ids.add(n))}getAnonymousIds(){return this.identityProvider.getAnonymousIds()}setAnonymousId(e){return this.identityProvider.setAnonymousId(e)}syncAnonymousIds(e){return this.identityProvider.syncAnonymousIds(e)}};var Hd=y("bootstrap"),Pr=class{constructor(e=$o(1e3*6,Ve({credentials:!0}))){this.fetch=e}isClaim(e){return e&&typeof e=="object"&&Array.isArray(e.urls)&&e.urls.every(r=>r&&typeof r=="object"&&typeof r.url=="string"&&typeof r.urlSource=="string"&&typeof r.timestamp=="string"&&typeof r.trackingId=="string")}parseMessage(e){let r=p(()=>JSON.parse(e),{});return this.isClaim(r)?r:Pr.DefaultResponse}lookupClaim(e){return u(this,null,function*(){try{let{apiKey:r,claimKey:n}=e,i=new URL("https://onboard.triptease.io/claim");r&&i.searchParams.append("apiKey",r),n&&i.searchParams.append("claimKey",n);let s=yield this.fetch({method:"GET",url:i.toString()});if(s&&s.status===200)return this.parseMessage(s.body)}catch(r){Hd.debug("call to redirect /claim failed",r)}return Pr.DefaultResponse})}},Tr=Pr;Tr.DefaultResponse={urls:[]};function Er(t){if(!t)return;let e=t instanceof Date?t:new Date(t);return isNaN(e.getTime())?void 0:e}var Ht="triptease.integration.previous-urls",pa="triptease.integration.previous-pages";function fa(t,e){if(typeof e!="object")return t;let{url:r,urlSource:n,timestamp:i,trackingId:s}=e!=null?e:{};return typeof r=="string"&&r.length!==0&&xs.includes(n)&&t.push(m.removeEmpty({url:r,urlSource:n,timestamp:Er(i),trackingId:s})),t}var we=class{constructor(e){this.storage=e}static create(e){let r=new Qn([p(()=>new Ye(e.sessionStorage)),we.backupStorage]),n=new we(r);return n.exists()&&(n.data=n.data),n}append(e){let r=this.data;return r.push(e),this.data=r,e}prepend(e){let r=this.data;return r.unshift(e),this.data=r,e}set data(e){this.storage.set(we.storageKey,Po(e.reduce(fa,[]),10))}get data(){let e=this.storage.get(we.storageKey);return(Array.isArray(e)?e:[]).reduce(fa,[])}exists(){return!!this.storage.get(we.storageKey)}clear(){this.storage.clear()}},Lt=we;Lt.storageKey=Ht,Lt.backupStorage=new It;var ai=class{constructor(e,r=new Tr,n=Lt.create(e)){this.window=e;this.claimClient=r;this.urlHistory=n}urls(e,r){return u(this,null,function*(){if(!this.hasClaim()){let n=p(()=>{var s;return(s=Er(r))==null?void 0:s.toISOString()});this.urlHistory.append({url:this.window.document.referrer,urlSource:"referrer",timestamp:n}),this.urlHistory.append({url:this.window.location.href,urlSource:"page",timestamp:n});let{tt_claim_key:i}=B(this.window.location.search);if(i||e){let{urls:s}=yield this.claimClient.lookupClaim({apiKey:e,claimKey:i});s.forEach(a=>this.urlHistory.prepend(a))}}return this.urlHistory.data})}hasClaim(){return this.urlHistory.exists()}};var ma=["app.triptease.io","gtm-spike.launchpad.triptease.io"];function Ld(t,e){return j.PASSED}function Dd(t,e){return e?j.PASSED:j.FAILED}function qd(t,e){return e?e.config?j.PASSED:j.PENDING:j.FAILED}function jd(t,e){return e?(t==null?void 0:t.integrationId)?e.config?t.integrationId===e.config.integrationId?j.PASSED:j.FAILED:j.PENDING:j.SKIPPED:j.FAILED}function Ud(t,e){return e?e.message?j.PASSED:j.PENDING:j.FAILED}var Bd={[ue.SCRIPT_PRESENT]:Ld,[ue.SCRIPT_LOADED]:Dd,[ue.PAGE_EVALUATED]:qd,[ue.INTEGRATION_ID_MATCHES]:jd,[ue.MESSAGING_ACTIVE]:Ud};function ga(t,e){try{let r=Object.entries(Bd).reduce((n,[i,s])=>{let a=s(t,e);return[...n,{name:i,status:a}]},[]);return{type:"success",checks:r}}catch(r){return{type:"error",error:r.message}}}function ya(t,e){var s;if(!t.includes("tt_claim_key")||!e.length)return!1;let r=(s=e.find(({url:a})=>a.includes("tt_claim_key")))==null?void 0:s.url;if(!r)return!0;let{tt_claim_key:n}=fr(t,["tt_claim_key"]),{tt_claim_key:i}=fr(r,["tt_claim_key"]);return!!(n&&i&&n!==i)}var ba=I(ii());var Gd=y("bootstrap"),Ir=class{constructor(e,r=new gn,n=br(e),i=At.create(e),s=new xn(e,r),a=be.create(e),c=Ne.create(e)){this.window=e;this.clock=r;this.events=n;this.consent=i;this.messageBatcher=s;this.starter=a;this.stackScripts=c;this.integrate=()=>u(this,null,function*(){try{this.logger.log("Starting integrate()");let e=_s(this.window);T(this.window).onboard.integrationName=e;let r=Wd(e);yield this.starter.start(r)}catch(e){this.logger.error("Bootstrap.integrate: unhandled exception",e)}});T(this.window).onboard.bootstrap=this,this.clickTracking=new Bn(this.window,this)}get logger(){return this.trackingApi?new un("bootstrap",this.trackingApi):Gd}start(){return u(this,null,function*(){try{this.logger.debug("Bootstrap starting"),D.exposeApi(),this.stackScripts.capture();let r=(yield this.kernelFrame()).contentWindow;if(!r){this.logger.log("Kernel frame did not generate a content window, aborting");return}let n=new $(this.window,r,[]),i=new yt(new pe(n));if(this.kernel=new vn(i),this.kernelHost=re(i),this.clearStaleSessionStorage(),this.identityCombiner=new si(this.window,this.kernelHost,this.consent),T(this.window).onboard.messageBuilder=this.messageBuilder=new kn(new mr(this.window),new ai(this.window),this.identityCombiner),this.trackingApi=wt.create(this.window,this.messageBatcher,this.messageBuilder),new yr(n,new gr().register(["processEvent","processConfig","processNavigation","updateKernelMode"],new $e(this)).register(["getAnonymousIds","setAnonymousId","syncAnonymousIds"],new $e(this.identityCombiner)).register(["trackConfig","trackEvent","trackError","trackMessage","trackLog"],new $e(this.trackingApi))).registerAlias("triptease.event","processEvent").registerAlias("triptease.navigation","processNavigation").registerAlias("triptease.config","trackConfig").registerAlias("triptease.logs","trackLog"),this.window.opener&&this.window.opener!==this.window){let s=new $(this.window,this.window.opener,ma);new yr(s,new gr().register(["evaluateHealth"],new $e(this)))}this.applicationLoader=St.create(this.window,this.kernel,this.consent),this.clickTracking.start(),yield this.events.listen(this.integrate),yield this.events.start()}catch(e){this.logger.error("Bootstrap.start: unhandled exception",e)}})}stop(){this.messageBatcher.stop()}reload(){return u(this,null,function*(){yield this.start(),this.logger.debug("Bootstrap reloading"),this.stackScripts.capture(),yield this.integrate()})}kernelFrame(){return u(this,null,function*(){let e=mn.application(this.window.location.hostname);return yield this.starter.start(e)})}updateKernelMode(e){return u(this,null,function*(){yield T(this.window).triptease.integration.updateKernelMode(e)})}processEvent(e){return u(this,null,function*(){let r=yield this.kernelHost.getPageState(),n=yield this.messageBuilder.buildMessage(_.merge(e,r));yield re(new pe(new $(void 0,window,[]))).trackEvent(n)})}processConfig(e){return u(this,null,function*(){let r=yield this.applicationLoader.loadApplications(e.payload);T(this.window).triptease.config=e.payload;let n=H(w({},e),{applications:r});T(this.window).triptease.message=n,this.logger.log("Broadcasting triptease.config message",{payload:n.payload,message:n}),new $(void 0,this.window).send(n)})}processNavigation(e){return u(this,null,function*(){let r=this.window.document.createElement("a");r.style.display="none",r.classList.add("triptease-navigation");for(let[n,i]of Object.entries(e))r[n]=i;this.window.document.documentElement.appendChild(r),r.click(),this.window.document.documentElement.removeChild(r)})}evaluateHealth(e){return u(this,null,function*(){var r;return ga(e,(r=T(this.window))==null?void 0:r.triptease)})}clearStaleSessionStorage(){try{let e=(0,ba.get)(()=>{var n;return JSON.parse((n=this.window.sessionStorage.getItem(Ht))!=null?n:"[]")},[]);ya(this.window.location.href,e)&&(this.logger.log("Clearing stale session storage"),this.window.sessionStorage.removeItem(Ht),this.window.sessionStorage.removeItem(pa))}catch(e){}}};A([ha.cache],Ir.prototype,"start",1);function Wd(t){return{name:t.name,url:t.script,type:"script",enabled:!0}}var va=y("bootstrap"),xa=p(()=>window.triptease.onboard.bootstrap);(()=>u(void 0,null,function*(){let{"triptease-bootstrap-version":t=""}=B(window.location.search);["none","noop"].includes(t.toLowerCase())||(xa?(va.log("Bootstrap reloading"),yield xa.reload()):(va.log("Creating new bootstrap"),yield new Ir(window).start()))}))();})();