PageSourceSearch

https://getstoked.web.app/_next/static/chunks/14g3a-oe6h75v.js

js getstoked.web.app collected 2026-10-03 12:25:43 UTC 197,319 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,285700,e=>{"use strict";var t=e.i(191788),r=e.i(391398),i=t.createContext(void 0);e.s(["QueryClientProvider",0,({client:e,children:a})=>(t.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,r.jsx)(i.Provider,{value:e,children:a})),"useQueryClient",0,e=>{let r=t.useContext(i);if(e)return e;if(!r)throw Error("No QueryClient set, use QueryClientProvider to set one");return r}])},456298,e=>{"use strict";var t="u"<typeof window||"Deno"in globalThis;function r(e,t){return(t?.queryKeyHashFn||i)(e)}function i(e){return JSON.stringify(e,(e,t)=>o(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function a(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(r=>!a(e[r],t[r]))}function s(e,t){if(e===t)return e;let r=n(e)&&n(t);if(r||o(e)&&o(t)){let i=r?e:Object.keys(e),a=i.length,n=r?t:Object.keys(t),o=n.length,l=r?[]:{},c=0;for(let a=0;a<o;a++){let o=r?a:n[a];(!r&&i.includes(o)||r)&&void 0===e[o]&&void 0===t[o]?(l[o]=void 0,c++):(l[o]=s(e[o],t[o]),l[o]===e[o]&&void 0!==e[o]&&c++)}return a===o&&c===a?e:l}return t}function n(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function o(e){if(!l(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!l(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function l(e){return"[object Object]"===Object.prototype.toString.call(e)}var c=Symbol();e.s(["addToEnd",0,function(e,t,r=0){let i=[...e,t];return r&&i.length>r?i.slice(1):i},"addToStart",0,function(e,t,r=0){let i=[t,...e];return r&&i.length>r?i.slice(0,-1):i},"ensureQueryFn",0,function(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==c?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))},"functionalUpdate",0,function(e,t){return"function"==typeof e?e(t):e},"hashKey",0,i,"hashQueryKeyByOptions",0,r,"isServer",0,t,"isValidTimeout",0,function(e){return"number"==typeof e&&e>=0&&e!==1/0},"keepPreviousData",0,function(e){return e},"matchMutation",0,function(e,t){let{exact:r,status:s,predicate:n,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(i(t.options.mutationKey)!==i(o))return!1}else if(!a(t.options.mutationKey,o))return!1}return(!s||t.state.status===s)&&(!n||!!n(t))},"matchQuery",0,function(e,t){let{type:i="all",exact:s,fetchStatus:n,predicate:o,queryKey:l,stale:c}=e;if(l){if(s){if(t.queryHash!==r(l,t.options))return!1}else if(!a(t.queryKey,l))return!1}if("all"!==i){let e=t.isActive();if("active"===i&&!e||"inactive"===i&&e)return!1}return("boolean"!=typeof c||t.isStale()===c)&&(!n||n===t.state.fetchStatus)&&(!o||!!o(t))},"noop",0,function(){},"partialMatchKey",0,a,"replaceData",0,function(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?s(e,t):t},"replaceEqualDeep",0,s,"resolveEnabled",0,function(e,t){return"function"==typeof e?e(t):e},"resolveStaleTime",0,function(e,t){return"function"==typeof e?e(t):e},"shallowEqualObjects",0,function(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0},"skipToken",0,c,"sleep",0,function(e){return new Promise(t=>{setTimeout(t,e)})},"timeUntilStale",0,function(e,t){return Math.max(e+(t||0)-Date.now(),0)}])},465235,e=>{"use strict";let t,r,i,a,s,n;var o=(t=[],r=0,i=e=>{e()},a=e=>{e()},s=e=>setTimeout(e,0),{batch:e=>{let n;r++;try{n=e()}finally{let e;--r||(e=t,t=[],e.length&&s(()=>{a(()=>{e.forEach(e=>{i(e)})})}))}return n},batchCalls:e=>(...t)=>{n(()=>{e(...t)})},schedule:n=e=>{r?t.push(e):s(()=>{i(e)})},setNotifyFunction:e=>{i=e},setBatchNotifyFunction:e=>{a=e},setScheduler:e=>{s=e}});e.s(["notifyManager",0,o])},895564,e=>{"use strict";e.s(["Subscribable",0,class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}])},879971,e=>{"use strict";var t=e.i(895564),r=e.i(456298),i=new class extends t.Subscribable{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!r.isServer&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();
1this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:globalThis.document?.visibilityState!=="hidden"}};e.s(["focusManager",0,i])},451415,490140,492363,e=>{"use strict";var t=e.i(879971),r=e.i(895564),i=e.i(456298),a=new class extends r.Subscribable{#i=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!i.isServer&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#i!==e&&(this.#i=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#i}};function s(){let e,t,r=new Promise((r,i)=>{e=r,t=i});function i(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{i({status:"fulfilled",value:t}),e(t)},r.reject=e=>{i({status:"rejected",reason:e}),t(e)},r}function n(e){return Math.min(1e3*2**e,3e4)}function o(e){return(e??"online")!=="online"||a.isOnline()}e.s(["onlineManager",0,a],490140),e.s(["pendingThenable",0,s],492363);var l=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};e.s(["canFetch",0,o,"createRetryer",0,function(e){let r,c=!1,u=0,d=!1,h=s(),p=()=>t.focusManager.isFocused()&&("always"===e.networkMode||a.isOnline())&&e.canRun(),m=()=>o(e.networkMode)&&e.canRun(),f=t=>{d||(d=!0,e.onSuccess?.(t),r?.(),h.resolve(t))},g=t=>{d||(d=!0,e.onError?.(t),r?.(),h.reject(t))},b=()=>new Promise(t=>{r=e=>{(d||p())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,d||e.onContinue?.()}),y=()=>{let t;if(d)return;let r=0===u?e.initialPromise:void 0;try{t=r??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(f).catch(t=>{if(d)return;let r=e.retry??3*!i.isServer,a=e.retryDelay??n,s="function"==typeof a?a(u,t):a,o=!0===r||"number"==typeof r&&u<r||"function"==typeof r&&r(u,t);c||!o?g(t):(u++,e.onFail?.(u,t),(0,i.sleep)(s).then(()=>p()?void 0:b()).then(()=>{c?g(t):y()}))})};return{promise:h,cancel:t=>{d||(g(new l(t)),e.abort?.())},continue:()=>(r?.(),h),cancelRetry:()=>{c=!0},continueRetry:()=>{c=!1},canStart:m,start:()=>(m()?y():b().then(y),h)}},"isCancelledError",0,function(e){return e instanceof l}],451415)},271585,e=>{"use strict";var t=e.i(456298),r=class{#a;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,t.isValidTimeout)(this.gcTime)&&(this.#a=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(t.isServer?1/0:3e5))}clearGcTimeout(){this.#a&&(clearTimeout(this.#a),this.#a=void 0)}};e.s(["Removable",0,r])},153435,e=>{"use strict";e.s(["noop",0,function(){},"shouldThrowError",0,function(e,t){return"function"==typeof e?e(...t):!!e}])},893930,84813,273340,540784,636277,222826,268082,122967,e=>{"use strict";let t;var r=e.i(879971),i=e.i(465235);e.i(350461);var a=e.i(456298),s=e.i(451415),n=e.i(271585),o=class extends n.Removable{#s;#n;#o;#l;#c;#u;#d;constructor(e){super(),this.#d=!1,this.#u=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#l=e.client,this.#o=this.#l.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#s=function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,i=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=e.state??this.#s,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#c?.promise}setOptions(e){this.options={...this.#u,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#o.remove(this)}setData(e,t){let r=(0,a.replaceData)(this.state.data,e,this.options);return this.#h({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#h({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#c?.promise;return this.#c?.cancel(e),t?t.then(a.noop).catch(a.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#s)}isActive(){return this.observers.some(e=>!1!==(0,a.resolveEnabled)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===a.skipToken||this.state.dataUpdateCount+this.state.errorUpdate
1Count===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!(0,a.timeUntilStale)(this.state.dataUpdatedAt,e)}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#c?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#c?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#o.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#c&&(this.#d?this.#c.cancel({revert:!0}):this.#c.cancelRetry()),this.scheduleGc()),this.#o.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#h({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#c)return this.#c.continueRetry(),this.#c.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let r=new AbortController,i=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#d=!0,r.signal)})},n=()=>{let e=(0,a.ensureQueryFn)(this.options,t),r={client:this.#l,queryKey:this.queryKey,meta:this.meta};return(i(r),this.#d=!1,this.options.persister)?this.options.persister(e,r,this):e(r)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#l,state:this.state,fetchFn:n};i(o),this.options.behavior?.onFetch(o,this),this.#n=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#h({type:"fetch",meta:o.fetchOptions?.meta});let l=e=>{(0,s.isCancelledError)(e)&&e.silent||this.#h({type:"error",error:e}),(0,s.isCancelledError)(e)||(this.#o.config.onError?.(e,this),this.#o.config.onSettled?.(this.state.data,e,this)),this.scheduleGc()};return this.#c=(0,s.createRetryer)({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:e=>{if(void 0===e)return void l(Error(`${this.queryHash} data is undefined`));try{this.setData(e)}catch(e){l(e);return}this.#o.config.onSuccess?.(e,this),this.#o.config.onSettled?.(e,this.state.error,this),this.scheduleGc()},onError:l,onFail:(e,t)=>{this.#h({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#h({type:"pause"})},onContinue:()=>{this.#h({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#c.start()}#h(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...l(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let r=e.error;if((0,s.isCancelledError)(r)&&r.revert&&this.#n)return{...this.#n,fetchStatus:"idle"};return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),i.notifyManager.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#o.notify({query:this,type:"updated",action:e})})}};function l(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,s.canFetch)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}e.s(["Query",0,o,"fetchState",0,l],84813);var c=e.i(895564),u=e.i(492363),d=class extends c.Subscribable{constructor(e,t){super(),this.options=t,this.#l=e,this.#p=null,this.#m=(0,u.pendingThenable)(),this.options.experimental_prefetchInRender||this.#m.reject(Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#l;
1#f=void 0;#g=void 0;#b=void 0;#y;#v;#m;#p;#x;#w;#k;#C;#P;#j;#N=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#f.addObserver(this),h(this.#f,this.options)?this.#S():this.updateResult(),this.#T())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return p(this.#f,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return p(this.#f,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#I(),this.#A(),this.#f.removeObserver(this)}setOptions(e,t){let r=this.options,i=this.#f;if(this.options=this.#l.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,a.resolveEnabled)(this.options.enabled,this.#f))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#E(),this.#f.setOptions(this.options),r._defaulted&&!(0,a.shallowEqualObjects)(this.options,r)&&this.#l.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#f,observer:this});let s=this.hasListeners();s&&m(this.#f,i,this.options,r)&&this.#S(),this.updateResult(t),s&&(this.#f!==i||(0,a.resolveEnabled)(this.options.enabled,this.#f)!==(0,a.resolveEnabled)(r.enabled,this.#f)||(0,a.resolveStaleTime)(this.options.staleTime,this.#f)!==(0,a.resolveStaleTime)(r.staleTime,this.#f))&&this.#R();let n=this.#O();s&&(this.#f!==i||(0,a.resolveEnabled)(this.options.enabled,this.#f)!==(0,a.resolveEnabled)(r.enabled,this.#f)||n!==this.#j)&&this.#L(n)}getOptimisticResult(e){var t,r;let i=this.#l.getQueryCache().build(this.#l,e),s=this.createResult(i,e);return t=this,r=s,(0,a.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#b=s,this.#v=this.options,this.#y=this.#f.state),s}getCurrentResult(){return this.#b}trackResult(e,t){let r={};return Object.keys(e).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),t?.(i),e[i])})}),r}trackProp(e){this.#N.add(e)}getCurrentQuery(){return this.#f}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#l.defaultQueryOptions(e),r=this.#l.getQueryCache().build(this.#l,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#S({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#b))}#S(e){this.#E();let t=this.#f.fetch(this.options,e);return e?.throwOnError||(t=t.catch(a.noop)),t}#R(){this.#I();let e=(0,a.resolveStaleTime)(this.options.staleTime,this.#f);if(a.isServer||this.#b.isStale||!(0,a.isValidTimeout)(e))return;let t=(0,a.timeUntilStale)(this.#b.dataUpdatedAt,e);this.#C=setTimeout(()=>{this.#b.isStale||this.updateResult()},t+1)}#O(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#f):this.options.refetchInterval)??!1}#L(e){this.#A(),this.#j=e,!a.isServer&&!1!==(0,a.resolveEnabled)(this.options.enabled,this.#f)&&(0,a.isValidTimeout)(this.#j)&&0!==this.#j&&(this.#P=setInterval(()=>{(this.options.refetchIntervalInBackground||r.focusManager.isFocused())&&this.#S()},this.#j))}#T(){this.#R(),this.#L(this.#O())}#I(){this.#C&&(clearTimeout(this.#C),this.#C=void 0)}#A(){this.#P&&(clearInterval(this.#P),this.#P=void 0)}createResult(e,t){let r,i=this.#f,s=this.options,n=this.#b,o=this.#y,c=this.#v,d=e!==i?e.state:this.#g,{state:p}=e,g={...p},b=!1;if(t._optimisticResults){let r=this.hasListeners(),a=!r&&h(e,t),n=r&&m(e,i,t,s);(a||n)&&(g={...g,...l(p.data,e.options)}),"isRestoring"===t._optimisticResults&&(g.fetchStatus="idle")}let{error:y,errorUpdatedAt:v,status:x}=g;if(t.select&&void 0!==g.data)if(n&&g.data===o?.data&&t.select===this.#x)r=this.#w;else try{this.#x=t.select,r=t.select(g.data),r=(0,a.replaceData)(n?.data,r,t),this.#w=r,this.#p=null}catch(e){this.#p=e}else r=g.data;if(void 0!==t.placeholderData&&void 0===r&&"pending"===x){let e;if(n?.isPlaceholderData&&t.placeholderData===c?.placeholderData)e=n.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(this.#k?.state.data,this.#k):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.#p=null}catch(e){this.#p=e}void 0!==e&&(x="success",r=(0,a.replaceData)(n?.data,e,t),b=!0)}this.#p&&(y=this.#p,r=this.#w,v=Date.now(),x="error");let w="fetching"===g.fetchStatus,k="pending"===x,C="error"===x,P=k&&w,j=void 0!==r,N={status:x,fetchStatus:g.fetchStatus,isPending:k,isSuccess:"success"===x,isError:C,isInitialLoading:P,isLoading:P,data:r,dataUpdatedAt:g.dataUpdatedAt,error:y,errorUpdatedAt:v,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdate
1Count:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:w,isRefetching:w&&!k,isLoadingError:C&&!j,isPaused:"paused"===g.fetchStatus,isPlaceholderData:b,isRefetchError:C&&j,isStale:f(e,t),refetch:this.refetch,promise:this.#m};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===N.status?e.reject(N.error):void 0!==N.data&&e.resolve(N.data)},r=()=>{t(this.#m=N.promise=(0,u.pendingThenable)())},a=this.#m;switch(a.status){case"pending":e.queryHash===i.queryHash&&t(a);break;case"fulfilled":("error"===N.status||N.data!==a.value)&&r();break;case"rejected":("error"!==N.status||N.error!==a.reason)&&r()}}return N}updateResult(e){let t=this.#b,r=this.createResult(this.#f,this.options);if(this.#y=this.#f.state,this.#v=this.options,void 0!==this.#y.data&&(this.#k=this.#f),(0,a.shallowEqualObjects)(r,t))return;this.#b=r;let i={},s=()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options,r="function"==typeof e?e():e;if("all"===r||!r&&!this.#N.size)return!0;let i=new Set(r??this.#N);return this.options.throwOnError&&i.add("error"),Object.keys(this.#b).some(e=>this.#b[e]!==t[e]&&i.has(e))};e?.listeners!==!1&&s()&&(i.listeners=!0),this.#_({...i,...e})}#E(){let e=this.#l.getQueryCache().build(this.#l,this.options);if(e===this.#f)return;let t=this.#f;this.#f=e,this.#g=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#T()}#_(e){i.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#b)}),this.#l.getQueryCache().notify({query:this.#f,type:"observerResultsUpdated"})})}};function h(e,t){return!1!==(0,a.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&p(e,t,t.refetchOnMount)}function p(e,t,r){if(!1!==(0,a.resolveEnabled)(t.enabled,e)){let i="function"==typeof r?r(e):r;return"always"===i||!1!==i&&f(e,t)}return!1}function m(e,t,r,i){return(e!==t||!1===(0,a.resolveEnabled)(i.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&f(e,r)}function f(e,t){return!1!==(0,a.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,a.resolveStaleTime)(t.staleTime,e))}e.s(["QueryObserver",0,d],273340);var g=e.i(191788),b=e.i(285700);e.i(391398);var y=g.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),v=()=>g.useContext(y);e.s(["useQueryErrorResetBoundary",0,v],540784);var x=e.i(153435),w=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&!t.isReset()&&(e.retryOnMount=!1)},k=e=>{g.useEffect(()=>{e.clearReset()},[e])},C=({result:e,errorResetBoundary:t,throwOnError:r,query:i,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(a&&void 0===e.data||(0,x.shouldThrowError)(r,[e.error,i]));e.s(["ensurePreventErrorBoundaryRetry",0,w,"getHasError",0,C,"useClearResetErrorBoundary",0,k],636277);var P=g.createContext(!1),j=()=>g.useContext(P);P.Provider,e.s(["useIsRestoring",0,j],222826);var N=e=>{let t=e.staleTime;e.suspense&&(e.staleTime="function"==typeof t?(...e)=>Math.max(t(...e),1e3):Math.max(t??1e3,1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))},S=(e,t)=>e.isLoading&&e.isFetching&&!t,T=(e,t)=>e?.suspense&&t.isPending,I=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function A(e,t,r){let s=(0,b.useQueryClient)(r),n=j(),o=v(),l=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(l),l._optimisticResults=n?"isRestoring":"optimistic",N(l),w(l,o),k(o);let c=!s.getQueryCache().get(l.queryHash),[u]=g.useState(()=>new t(s,l)),d=u.getOptimisticResult(l),h=!n&&!1!==e.subscribed;if(g.useSyncExternalStore(g.useCallback(e=>{let t=h?u.subscribe(i.notifyManager.batchCalls(e)):x.noop;return u.updateResult(),t},[u,h]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),g.useEffect(()=>{u.setOptions(l,{listeners:!1})},[l,u]),T(l,d))throw I(l,u,o);if(C({result:d,errorResetBoundary:o,throwOnError:l.throwOnError,query:s.getQueryCache().get(l.queryHash),suspense:l.suspense}))throw d.error;if(s.getDefaultOptions().queries?._experimental_afterQuery?.(l,d),l.experimental_prefetchInRender&&!a.isServer&&S(d,n)
1){let e=c?I(l,u,o):s.getQueryCache().get(l.queryHash)?.promise;e?.catch(x.noop).finally(()=>{u.updateResult()})}return l.notifyOnChangeProps?d:u.trackResult(d)}e.s(["ensureSuspenseTimers",0,N,"fetchOptimistic",0,I,"shouldSuspend",0,T,"willFetch",0,S],268082),e.s(["useBaseQuery",0,A],122967),e.s(["useQuery",0,function(e,t){return A(e,d,t)}],893930)},88567,e=>{"use strict";var t=e.i(391398),r=e.i(959751);e.s(["Chip",0,e=>(0,t.jsx)(r.Chip,{...e})])},663230,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let i=e.r(191788);function a(e,t){let r=(0,i.useRef)(null),a=(0,i.useRef)(null);return(0,i.useCallback)(i=>{if(null===i){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=s(e,i)),t&&(a.current=s(t,i))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},771914,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useIntersection",{enumerable:!0,get:function(){return l}});let i=e.r(191788),a=e.r(799604),s="function"==typeof IntersectionObserver,n=new Map,o=[];function l({rootRef:e,rootMargin:t,disabled:r}){let c=r||!s,[u,d]=(0,i.useState)(!1),h=(0,i.useRef)(null),p=(0,i.useCallback)(e=>{h.current=e},[]);return(0,i.useEffect)(()=>{if(s){if(c||u)return;let r=h.current;if(r&&r.tagName)return function(e,t,r){let{id:i,observer:a,elements:s}=function(e){let t,r={root:e.root||null,margin:e.rootMargin||""},i=o.find(e=>e.root===r.root&&e.margin===r.margin);if(i&&(t=n.get(i)))return t;let a=new Map;return t={id:r,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=a.get(e.target),r=e.isIntersecting||e.intersectionRatio>0;t&&r&&t(r)})},e),elements:a},o.push(r),n.set(r,t),t}(r);return s.set(e,t),a.observe(e),function(){if(s.delete(e),a.unobserve(e),0===s.size){a.disconnect(),n.delete(i);let e=o.findIndex(e=>e.root===i.root&&e.margin===i.margin);e>-1&&o.splice(e,1)}}}(r,e=>e&&d(e),{root:e?.current,rootMargin:t})}else if(!u){let e=(0,a.requestIdleCallback)(()=>d(!0));return()=>(0,a.cancelIdleCallback)(e)}},[c,t,e,u,h.current]),[p,u,(0,i.useCallback)(()=>{d(!1)},[])]}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},154471,(e,t,r)=>{"use strict";function i(e,t,r,i){return!1}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getDomainLocale",{enumerable:!0,get:function(){return i}}),e.r(270090),("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},548735,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return i}});let i=e=>{}},539149,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={default:function(){return P},useLinkStatus:function(){return C}};for(var a in i)Object.defineProperty(r,a,{enumerable:!0,get:i[a]});let s=e.r(952456),n=e.r(391398),o=s._(e.r(191788)),l=e.r(160472),c=e.r(471112),u=e.r(728169),d=e.r(889129),h=e.r(514862),p=e.r(425479),m=e.r(771914),f=e.r(154471),g=e.r(344113),b=e.r(663230);e.r(548735);let y=new Set;function v(e,t,r,i){if(!("u"<typeof window)&&(0,c.isLocalURL)(t)){if(!i.bypassPrefetchedCheck){let a=t+"%"+r+"%"+(void 0!==i.locale?i.locale:"locale"in e?e.locale:void 0);if(y.has(a))return;y.add(a)}e.prefetch(t,r,i).catch(e=>{})}}function x(e){return"string"==typeof e?e:(0,u.formatUrl)(e)}let w=o.default.forwardRef(function(e,t){let r,i,{href:a,as:s,children:u,prefetch:y=null,passHref:w,replace:k,shallow:C,scroll:P,locale:j,onClick:N,onNavigate:S,onMouseEnter:T,onTouchStart:I,legacyBehavior:A=!1,transitionTypes:E,...R}=e;r=u,A&&("string"==typeof r||"number"==typeof r)&&(r=(0,n.jsx)("a",{children:r}));let O=o.default.useContext(p.RouterContext),L=!1!==y,{href:_,as:M}=o.default.useMemo(()=>
1{if(!O){let e=x(a);return{href:e,as:s?x(s):e}}let[e,t]=(0,l.resolveHref)(O,a,!0);return{href:e,as:s?(0,l.resolveHref)(O,s):t||e}},[O,a,s]),D=o.default.useRef(_),U=o.default.useRef(M);A&&(i=o.default.Children.only(r));let B=A?i&&"object"==typeof i&&i.ref:t,[W,F,V]=(0,m.useIntersection)({rootMargin:"200px"}),z=o.default.useCallback(e=>{(U.current!==M||D.current!==_)&&(V(),U.current=M,D.current=_),W(e)},[M,_,V,W]),$=(0,b.useMergedRef)(z,B);o.default.useEffect(()=>{!O||F&&L&&v(O,_,M,{locale:j})},[M,_,F,j,L,O?.locale,O]);let K={ref:$,onClick(e){A||"function"!=typeof N||N(e),A&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),!O||e.defaultPrevented||function(e,t,r,i,a,s,n,o,l){let u,{nodeName:d}=e.currentTarget;if(!("A"===d.toUpperCase()&&((u=e.currentTarget.getAttribute("target"))&&"_self"!==u||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which)||e.currentTarget.hasAttribute("download"))){if(!(0,c.isLocalURL)(r)){a&&(e.preventDefault(),location.replace(r));return}e.preventDefault(),(()=>{if(l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let e=n??!0;"beforePopState"in t?t[a?"replace":"push"](r,i,{shallow:s,locale:o,scroll:e}):t[a?"replace":"push"](i||r,{scroll:e})})()}}(e,O,_,M,k,C,P,j,S)},onMouseEnter(e){A||"function"!=typeof T||T(e),A&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),O&&v(O,_,M,{locale:j,priority:!0,bypassPrefetchedCheck:!0})},onTouchStart:function(e){A||"function"!=typeof I||I(e),A&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),O&&v(O,_,M,{locale:j,priority:!0,bypassPrefetchedCheck:!0})}};if((0,d.isAbsoluteUrl)(M))K.href=M;else if(!A||w||"a"===i.type&&!("href"in i.props)){let e=void 0!==j?j:O?.locale;K.href=O?.isLocaleDomain&&(0,f.getDomainLocale)(M,e,O?.locales,O?.domainLocales)||(0,g.addBasePath)((0,h.addLocale)(M,e,O?.defaultLocale))}return A?o.default.cloneElement(i,K):(0,n.jsx)("a",{...R,...K,children:r})}),k=(0,o.createContext)({pending:!1}),C=()=>(0,o.useContext)(k),P=w;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},41158,(e,t,r)=>{t.exports=e.r(539149)},394941,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let i=e.r(191788),a="u"<typeof window,s=a?()=>{}:i.useLayoutEffect,n=a?()=>{}:i.useEffect;function o(e){let{headManager:t,reduceComponentsToState:r}=e;function o(){if(t&&t.mountedInstances){let e=i.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(e))}}return a&&(t?.mountedInstances?.add(e.children),o()),s(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),s(()=>(t&&(t._pendingUpdate=o),()=>{t&&(t._pendingUpdate=o)})),n(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},280963,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={default:function(){return f},defaultHead:function(){return d}};for(var a in i)Object.defineProperty(r,a,{enumerable:!0,get:i[a]});let s=e.r(741705),n=e.r(952456),o=e.r(391398),l=n._(e.r(191788)),c=s._(e.r(394941)),u=e.r(713584);function d(){return[(0,o.jsx)("meta",{charSet:"utf-8"},"charset"),(0,o.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function h(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===l.default.Fragment?e.concat(l.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(894470);let p=["name","httpEquiv","charSet","itemProp"];function m(e){let t,r,i,a;return e.reduce(h,[]).reverse().concat(d().reverse()).filter((t=new Set,r=new Set,i=new Set,a={},e=>{let s=!0,n=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){n=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?s=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?s=!1:r.add(e.type);break;case"meta":for(let t=0,r=p.length;t<r;t++){let r=p[t];if(e.props.hasOwnProperty(r))if("charSet"===r)i.has(r)?s=!1:i.add(r);else{let t=e.props[r],i=a[r]||new Set;("name"!==r||!n)&&i.has(t)?s=!1:(i.add(t),a[r]=i)}}}return s})).reverse().map((e,t)=>{let r=e.key||t;return l.default.cloneElement(e,{key:r})})}let f=function({children:e}){let t=(0,l.useContext)(u.HeadManagerContext);return(0,o.jsx)(c.default,{reduceComponentsToState:m,headManager:t,children:e})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esMo
1dule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},958678,(e,t,r)=>{t.exports=e.r(280963)},198311,e=>{"use strict";var t=e.i(395555),r=e.i(630519),i=e.i(119655),a=e.i(296643),s=e.i(695739),n=e.i(519902),o=e.i(414503);let l=(0,n.createMotionComponentFactory)({...r.animations,...a.gestureAnimations,...i.drag,...s.layout},o.createDomVisualElement),c=(0,t.createDOMMotionComponentProxy)(l);e.s(["motion",0,c],198311)},377639,e=>{"use strict";var t=e.i(618459),r=e.i(168750),i=e.i(150143),a=e.i(915560),s=e.i(391398),n=(0,r.forwardRef)((e,r)=>{var n;let{as:o,className:l,children:c,...u}=e,d=(0,i.useDOMRef)(r),{slots:h,classNames:p}=(0,t.useCardContext)(),m=(0,a.clsx)(null==p?void 0:p.header,l);return(0,s.jsx)(o||"div",{ref:d,className:null==(n=h.header)?void 0:n.call(h,{class:m}),...u,children:c})});n.displayName="NextUI.CardHeader",e.s(["CardHeader",0,n],377639)},13575,618459,e=>{"use strict";var[t,r]=(0,e.i(20465).createContext)({name:"CardContext",strict:!0,errorMessage:"useCardContext: `context` is undefined. Seems you forgot to wrap component within <Card />"});e.s(["CardProvider",0,t,"useCardContext",0,r],618459);var i=e.i(283524),a=e.i(655327),s=(0,i.tv)({slots:{base:["flex","flex-col","relative","overflow-hidden","h-auto","outline-none","text-foreground","box-border","bg-content1",...a.dataFocusVisibleClasses],header:["flex","p-3","z-10","w-full","justify-start","items-center","shrink-0","overflow-inherit","color-inherit","subpixel-antialiased"],body:["relative","flex","flex-1","w-full","p-3","flex-auto","flex-col","place-content-inherit","align-items-inherit","h-auto","break-words","text-left","overflow-y-auto","subpixel-antialiased"],footer:["p-3","h-auto","flex","w-full","items-center","overflow-hidden","color-inherit","subpixel-antialiased"]},variants:{shadow:{none:{base:"shadow-none"},sm:{base:"shadow-small"},md:{base:"shadow-medium"},lg:{base:"shadow-large"}},radius:{none:{base:"rounded-none",header:"rounded-none",footer:"rounded-none"},sm:{base:"rounded-small",header:"rounded-t-small",footer:"rounded-b-small"},md:{base:"rounded-medium",header:"rounded-t-medium",footer:"rounded-b-medium"},lg:{base:"rounded-large",header:"rounded-t-large",footer:"rounded-b-large"}},fullWidth:{true:{base:"w-full"}},isHoverable:{true:{base:"data-[hover=true]:bg-content2 dark:data-[hover=true]:bg-content2"}},isPressable:{true:{base:"cursor-pointer"}},isBlurred:{true:{base:["bg-background/80","dark:bg-background/20","backdrop-blur-md","backdrop-saturate-150"]}},isFooterBlurred:{true:{footer:["bg-background/10","backdrop-blur","backdrop-saturate-150"]}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:"",false:{base:"transition-transform-background motion-reduce:transition-none"}}},compoundVariants:[{isPressable:!0,class:"data-[pressed=true]:scale-[0.97] tap-highlight-transparent"}],defaultVariants:{radius:"lg",shadow:"md",fullWidth:!1,isHoverable:!1,isPressable:!1,isDisabled:!1,isFooterBlurred:!1}}),n=e.i(191788),o=e.i(74946),l=e.i(426188),c=e.i(578584),u=e.i(163529),d=e.i(665012),h=e.i(168750),p=e.i(303658),m=e.i(915560),f=e.i(793381),g=e.i(77453),b=e.i(783960),y=e.i(150143),v=e.i(354549),x=e.i(123654),w=e.i(391398),k=(0,h.forwardRef)((e,r)=>{let{children:i,context:a,Component:k,isPressable:C,disableAnimation:P,disableRipple:j,getCardProps:N,getRippleProps:S}=function(e){var t,r,i,a;let x=(0,p.useProviderContext)(),[w,k]=(0,h.mapPropsVariants)(e,s.variantKeys),{ref:C,as:P,children:j,onClick:N,onPress:S,autoFocus:T,className:I,classNames:A,allowTextSelectionOnPress:E=!0,...R}=w,O=(0,y.useDOMRef)(C),L=P||(e.isPressable?"button":"div"),_="string"==typeof L,M=null!=(r=null!=(t=e.disableAnimation)?t:null==x?void 0:x.disableAnimation)&&r,D=null!=(a=null!=(i=e.disableRipple)?i:null==x?void 0:x.disableRipple)&&a,U=(0,m.clsx)(null==A?void 0:A.base,I),{onClear:B,onPress:W,ripples:F}=(0,v.useRipple)(),V=(0,n.useCallback)(e=>{D||M||O.current&&W(e)},[D,M,O,W]),{buttonProps:z,isPressed:$}=(0,d.useAriaButton)({onPress:(0,o.chain)(S,V),elementType:P,isDisabled:!e.isPressable,onClick:N,allowTextSelectionOnPress:E,...R},O),{hoverProps:K,isHovered:G}=(0,u.useHover)({isDisabled:!e.isHoverable,...R}),{isFocusVisible:H,isFocused:q,focusProps:Q}=(0,c.useFocusRing)({autoFocus:T}),Y=(0,n.useMemo)(()=>s({...k,disableAnimation:M}),[(0,g.objectToDeps)(k),M]),J=(0,n.useMemo)(()=>({slots:Y,classNames:A,disableAnimation:M,isDisabled:e.isDisabled,isFooterBlurred:e.isFooterBlurred,fullWidth:e.fullWidth}),[Y,A,e.isDisabled,e.isFooterBlurred,M,e.fullWidth]),X=(0,n.useCallback)((t={})=>({ref:O,className:Y.base({class:U}),tabIndex:e.isPressable?0:-1,"data-hover":(0,f.dataAttr)(G),"data-pressed":(0,f.dataAttr)($),"data-focus":(0,f.dataAttr)(q),"data-focus-visible":(0,f.dataAttr)(H),"data-disabled":(0,f.dataAttr)(e.isDisabled),...(0,l.mergeProps)(e.isPressable?{...z,...Q,role:"button"}:{},e.isHoverable?K:{},(0,b.filterDOMProps)(R,{enabled:_}),(0,b.filterDOMProps)(t))}),[O,Y,U,_,e.isPressable,e.isHoverable,e.isDisabled,G,$,H,z,Q,K,R]),Z=(0,n.useCallback)(()=>({ripples:F,onClear:B}),[F,B]);return{context:J,domRef:O,Component:L,classNames:A,children:j,isHovered:G,isPressed:$,disableAnimation:M,isPressable:e.isPressable,isHoverable:e.isHoverable,disableRipple:D,handlePress:V,isFocusVisible:H,getCardProps:X,getRippleProps:Z}}({...e,ref:r});return(0,w.jsxs)(k,{...N(),children:[(0,w.jsx)(t,{value:a,children:i}),C&&!P&&!j&&(0,w.jsx)(x.Ripple,{...S()})]})});k.displayName="NextUI.Card",e.s(["Card",0,k],13575)},567712,e=>{"use strict";var t=e.i(618459),r=e.i(168750),i=e.i(150143),a=e.i(915560),s=e.i(391398),n=(0,r.forwardRef)((e,r)=>{var n;let{as:o,className:l,children:c,...u}=e,d=(0,i.useDOMRef)(r),{slots:h,classNames:p}=(0,t.useCardContext)(),m=(0,a.clsx)(null==p?void 0:p.body,l);return(0,s.jsx)(o||"div",{ref:d,className:null==(n=h.body)?void 0:n.call(h,{class:m}),...u,children:c})});n.displayName="NextUI.CardBody",e.s(["CardBody",0,n],567712)},518532,e=>{"use strict";var t=e.i(618459),r=e.i(168750),i=e.i(150143),a=e.i(915560),s=e.i(391398),n=(0,r.forwardRef)((e,r)=>{var n;let{as:o,className:l,children:c,...u}=e,d=(0,i.useDOMRef)(r),{slots:h,classNames:p}=(0,t.useCardContext)(),m=(0,a.clsx)(null==p?void 0:p.footer,l);return(0,s.jsx)(o||"div",{ref:d,className:null==(n=h.footer)?void 0:n.call(h,{class:m}),...u,children:c})});n.displayName="NextUI.CardFooter",e.s(["CardFooter",0,n],518532)},583901,e=>{"use strict";var t=e.i(13575),r=e.i(567712),i=e.i(518532),a=e.i(377639);let s=t.Card,n=r.CardBody,o=i.CardFooter,l=a.CardHeader;e.s(["Card",0,s,"CardBody",0,n,"CardFooter",0,o,"CardHeader",0,l])},180684,e=>{"use strict";var t,r,i,a,s=e.i(660333),n=e.i(245246);e.i(581516);var o=e.i(310339),l=((t={}).Cash="cash",t.Discount="discount",t.Personal="personal",t),c=((r={}).Percent="percent",r.Fixed="fixed",r),u=((i={}).Auto="auto",i.Manual="manual",i),d=((a={}).PendingPayment="pending_payment",a.Paid="paid",a.Cancelled="cancelled",a);class h{voucherCode;type;i18nTitle;i18nDescription;image;bgColor;bgIcon;locations;validFrom;validUntil;isActive;usageCount;minimumCartValue;maxTotalUsage;singleUse;allowStacking;codeGeneration;createdAt;updatedAt;createdBy;assignedUserId;assignedUserRef;emailHistory;docRef;constructor(e){this.isDocumentReference(e)?this.docRef=e:this.isVoucherProps(e)&&this.initFromProps(e)}isDocumentReference(e){return e&&"object"==typeof e&&"type"in e&&"document"===e.type}isVoucherProps(e){return"voucherCode"in e&&"type"in e&&"i18nTitle"in e&&"i18nDescription"in e&&"validUntil"in e}initFromProps(e){this.voucherCode=e.voucherCode,this.type=e.type,this.i18nTitle=e.i18nTitle,this.i18nDescription=e.i18nDescription,this.image=e.image,this.bgColor=e.bgColor,this.bgIcon=e.bgIcon,this.locations=e.locations,this.validFrom=e.validFrom,this.validUntil=e.validUntil,this.isActive=e.isActive,this.usageCount=e.usageCount,this.minimumCartValue=e.minimumCartValue,this.maxTotalUsage=e.maxTotalUsage,this.singleUse=e.singleUse,this.allowStacking=e.allowStacking,this.co
1deGeneration=e.codeGeneration,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt,this.createdBy=e.createdBy,this.assignedUserId=e.assignedUserId,this.assignedUserRef=e.assignedUserRef,this.emailHistory=e.emailHistory,e.docRef&&(this.docRef=e.docRef)}getTitle(e=s.Systemlanguage.En){return(0,n.getI18nText)(this.i18nTitle,e)}getDescription(e=s.Systemlanguage.En){return(0,n.getI18nText)(this.i18nDescription,e)}getImage(e){return this.image?this.image:e||"/images/voucherDefault.webp"}hasColorIcon(){return!this.image&&!!this.bgColor&&!!this.bgIcon}isGlobal(){return 0===this.locations.length}isValidForLocation(e){return!!this.isGlobal()||this.locations.some(t=>t.path===e.path)}isWithinValidDateRange(e=new Date){let t=o.Timestamp.fromDate(e),r=!this.validFrom||t.toMillis()>=this.validFrom.toMillis(),i=t.toMillis()<=this.validUntil.toMillis();return r&&i}toFirestore(){let{docRef:e,...t}=this;return t}static fromFirestore(e,t){let r=e.data(t);if(!r)return null;let i={...r,docRef:e.ref};switch(r.type){case"cash":return new p(i);case"discount":return new m(i);case"personal":return new f(i);default:return new h(i)}}}class p extends h{type="cash";originalAmount;availableAmount;currency;isPurchasable;validityDays;purchasedInstances;parentTemplateId;bundleRef;purchasedBy;purchaseDate;purchaseStatus;purchasePaymentType;purchaserEmail;purchaserName;purchaserPhone;recipientEmail;recipientName;personalMessage;voucherCodeSent;isFeatured;constructor(e){super(e),this.originalAmount=e.originalAmount,this.availableAmount=e.availableAmount,this.currency=e.currency,this.isPurchasable=e.isPurchasable,this.validityDays=e.validityDays,this.purchasedInstances=e.purchasedInstances,this.parentTemplateId=e.parentTemplateId,this.bundleRef=e.bundleRef,this.purchasedBy=e.purchasedBy,this.purchaseDate=e.purchaseDate,this.purchaseStatus=e.purchaseStatus,this.purchasePaymentType=e.purchasePaymentType,this.purchaserEmail=e.purchaserEmail,this.purchaserName=e.purchaserName,this.purchaserPhone=e.purchaserPhone,this.recipientEmail=e.recipientEmail,this.recipientName=e.recipientName,this.personalMessage=e.personalMessage,this.voucherCodeSent=e.voucherCodeSent,this.isFeatured=e.isFeatured??!1}isTemplate(){return!0===this.isPurchasable}isPurchasedVoucher(){return!!this.parentTemplateId}isGiftVoucher(){return!!this.recipientEmail}isPaymentConfirmed(){return"paid"===this.purchaseStatus}isPaymentPending(){return"pending_payment"===this.purchaseStatus}hasSufficientBalance(e){return this.availableAmount>=e}getBalancePercentage(){return 0===this.originalAmount?0:this.availableAmount/this.originalAmount*100}isDepleted(){return this.availableAmount<=0}}class m extends h{type="discount";discountType;discountValue;maxUsagePerUser;constructor(e){super(e),this.discountType=e.discountType,this.discountValue=e.discountValue,this.maxUsagePerUser=e.maxUsagePerUser}calculateDiscountAmount(e){return"percent"===this.discountType?e*this.discountValue/100:Math.min(this.discountValue,e)}isUnlimitedUsage(){return null===this.maxUsagePerUser}}class f extends h{type="personal";discountType;discountValue;assignedUserId;assignedUserRef;maxUsage;constructor(e){super(e),this.discountType=e.discountType,this.discountValue=e.discountValue,this.assignedUserId=e.assignedUserId,this.assignedUserRef
1=e.assignedUserRef,this.maxUsage=e.maxUsage}calculateDiscountAmount(e){return"percent"===this.discountType?e*this.discountValue/100:Math.min(this.discountValue,e)}isAssignedTo(e){return this.assignedUserId===e}}e.s(["CashVoucher",0,p,"CodeGeneration",()=>u,"DiscountType",()=>c,"DiscountVoucher",0,m,"PersonalVoucher",0,f,"Voucher",0,h,"VoucherPurchaseStatus",()=>d,"VoucherType",()=>l])},893945,e=>{"use strict";let t=e.i(26654).Progress;e.s(["Progress",0,t])},910184,e=>{"use strict";e.i(581516);var t=e.i(615351),r=e.i(207742);e.i(267909);var i=e.i(867603),a=e.i(742397),s=e.i(557931);function n(e,t){return!0!==t.includeArchived&&(!0===e.isArchived||!0===e.isDeactivated)}function o(e){let t=e.trim();return t.includes("@")?"email":[/^\d{4}-\d{2}-\d{2}$/,/^\d{2}-\d{2}-\d{4}$/,/^\d{2}\/\d{2}\/\d{4}$/,/^\d{4}\/\d{2}\/\d{2}$/,/^\d{2}\.\d{2}\.\d{4}$/,/^\d{4}\.\d{2}\.\d{2}$/].some(e=>e.test(t))?"birthday":/^[a-zA-Z0-9]{15,}$/.test(t)?"id":"name"}async function l(e){let{db:t,searchTerm:r,rolesToExclude:o,rolesToInclude:l,locationsToInclude:c,limit:u=20}=e,d=(0,s.buildTextSearchPattern)(r),h=t.pipeline().collection(a.COLLECTIONS.USER_METADATA.PUBLIC);h=h.where((0,i.or)((0,i.field)("firstName").regexContains(d),(0,i.field)("lastName").regexContains(d),(0,i.field)("displayName").regexContains(d))),c&&c.length>0&&(h=h.where((0,i.field)("locations").arrayContainsAny(c.map(e=>(0,i.constant)(e))))),l&&l.length>0&&(h=h.where((0,i.field)("role").equalAny(l.map(e=>(0,i.constant)(e))))),h=h.limit(u);let p=await (0,i.execute)(h),m=[];for(let t of p.results){let r=t.data(),i=r.role;if(n(r,e)||o?.includes(i))continue;let a=t.ref?.id??t.id??"";a&&m.push({id:a,firstName:r.firstName,lastName:r.lastName,displayName:r.displayName,photoUrl:r.photoUrl,avatarCode:"string"==typeof r.avatarCode?r.avatarCode:void 0,contactEmail:r.contactEmail})}return m}async function c(e){let{db:o,searchTerm:l,rolesToExclude:c,rolesToInclude:u,locationsToInclude:d,limit:h=20}=e,p=(0,s.buildTextSearchPattern)(l),m=o.pipeline().collectionGroup("private");m=(m=m.where((0,i.field)("email").regexContains(p))).limit(2*h);let f=await (0,i.execute)(m),g=[],b=new Set;for(let i of f.results){let s=i.data(),l=(i.ref?.path??i.path??"").split("/"),p=l.indexOf("user-metadata");if(-1===p||p+1>=l.length)continue;let m=l[p+1];if(b.has(m))continue;b.add(m);let f=await (0,r.getDoc)((0,t.doc)(o,a.COLLECTIONS.USER_METADATA.PUBLIC,m));if(!f.exists())continue;let y=f.data(),v=y.role;if(!(n(y,e)||c?.includes(v))&&(!u||u.includes(v))){if(d&&d.length>0){let e=y.locations;if(!e||!e.some(e=>d.includes(e)))continue}if(g.push({id:m,firstName:y.firstName,lastName:y.lastName,displayName:y.displayName,photoUrl:y.photoUrl,avatarCode:"string"==typeof y.avatarCode?y.avatarCode:void 0,contactEmail:y.contactEmail,email:s.email}),g.length>=h)break}}return g}async function u(e){let{db:i,searchTerm:s}=e,o=s.trim(),l=(0,t.doc)(i,a.COLLECTIONS.USER_METADATA.PUBLIC,o),c=await (0,r.getDoc)(l);if(!c.exists())return[];let u=c.data();return n(u,e)?[]:[{id:c.id,firstName:u.firstName,lastName:u.lastName,displayName:u.displayName,photoUrl:u.photoUrl,avatarCode:"string"==typeof u.avatarCode?u.avatarCode:void 0,contactEmail:u.contactEmail}]}async function d(e){let{db:s,searchTerm:o,rolesToExclude:l,rolesToInclude:c,locationsToInclude:u,limit:d=20}=e,h=function(e){let t=e.trim();if(/^\d{4}-\d{2}-\d{2}$/.test(t))return t;let r=t.match(/^(\d{2})[-/.](\d{2})[-/.](\d{4})$/);if(r){let[,e,t,i]=r;return`${i}-${t}-${e}`}let i=t.match(/^(\d{4})[\/.](\d{2})[\/.](\d{2})$/);if(i){let[,e,t,r]=i;return`${e}-${t}-${r}`}return null}(o);if(!h)return[];let p=s.pipeline().collectionGroup("private"),m=`^${h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`;p=(p=p.where((0,i.field)("birthday").regexContains(m))).limit(2*d);let f=await (0,i.execute)(p),g=[],b=new Set;for(let i of f.results){let o=i.data(),h=(i.ref?.path??i.path??"").split("/"),p=h.indexOf("user-metadata");if(-1===p||p+1>=h.length)continue;let m=h[p+1];if(b.has(m))continue;b.add(m);let f=await (0,r.getDoc)((0,t.doc)(s,a.COLLECTIONS.USER_METADATA.PUBLIC,m));if(!f.exists())continue;let y=f.data(),v=y.role;if(!(n(y,e)||l?.includes(v))&&(!c||c.includes(v))){if(u&&u.length>0){let e=y.locations;if(!e||!e.some(e=>u.includes(e)))continue}if(g.push({id:m,firstName:y.firstName,lastName:y.lastName,displayName:y.displayName,photoUrl:y.photoUrl,avatarCode:"string"==typeof y.avatarCode?y.avatarCode:void 0,contactEmail:y.contactEmail,birthday:o.birthday}),g.length>=d)break}}return g}async function h(e){let t,{searchTerm:r}=e;if(!r||r.trim().length<2)return[];switch(o(r)){case"email":t=await c(e);break;case"birthday":t=await d(e);break;case"id":t=await u(e);break;default:t=await l(e)}return t}async function p(e){let{searchTerm:t}=e;if(!t||t.trim().length<2)return[];let[r,i]=await Promise.all([l(e),c(e)]),a=new Map;for(let e of[...r,...i])a.has(e.id)||a.set(e.id,e);return Array.from(a.values())}e.s(["detectSearchType",0,o,"searchUsersAdvanced",0,h,"searchUsersCombined",0,p])},130477,e=>{"use strict";e.i(581516);var t=e.i(492025),r=e.i(615351),i=e.i(207742),a=e.i(742397),s=e.i(337153),n=e.i(910184),o=e.i(657312);function l(e){return e.trim().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")}function c(e){if(!e)return"";let t=e.trim();return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}e.s(["userService",0,{async searchUsersByTerm(e,r,n,u){var d=[];d=n&&n.length>0?[(0,i.query)((0,t.collection)(s.db,a.COLLECTIONS.USER_METADATA.PUBLIC),(0,i.where)("firstName",">=",c(e)),(0,i.where)("firstName","<=",c(e)+""),(0,i.where)("locations","array-contains-any",n)),(0,i.query)((0,t.collection)(s.db,a.COLLECTIONS.USER_METADATA.PUBLIC),(0,i.where)("lastName",">=",c(e)),(0,i.where)("lastName","<=",c(e)+""),(0,i.where)("locations","array-contains-any",n)),(0,i.query)((0,t.collection)(s.db,a.COLLECTIONS.USER_METADATA.PUBLIC),(0,i.where)("displayName",">=",l(e)),(0,i.where)("displayName","<=",l(e)+""),(0,i.where)("locations","array-contains-any",n))]:[(0,i.query)((0,t.collection)(s.db,a.COLLECTIONS.USER_METADATA.PUBLIC),(0,i.where)("firstName",">=",c(e)),(0,i.where)("firstName","<=",c(e)+"")),(0,i.query)((0,t.collection)(s.db,a.COLLECTIONS.USER_METADATA.PUBLIC),(0,i.where)("lastName",">=",c(e)),(0,i.where)("lastName","<=",c(e)+"")),(0,i.query)((0,t.collection)(s.db,a.COLLECTIONS.USER_METADATA.PUBLIC),(0,i.where)("displayName",">=",l(e)),(0,i.where)("displayName","<=",l(e)+""))];let h=new Map;for(let e of d)for(let t of(await (0,i.getDocs)(e)).docs){let e=t.id,i=t.data();if(!i.firstName||!i.lastName||!0===i.isArchived||!0===i.isDeactivated||r?.includes(i.role)||u&&!u.includes(i.role))continue;let a=(0,o.toDisplayName)(i.firstName,i.lastName);h.has(e)||h.set(e,{id:e,docRef:t.ref,photoUrl:i.photoUrl,firstName:i.firstName,lastName:i.lastName,displayName:a})}return Array.from(h.values())},async getKitingDataOfUser(e){let t=(0,r.doc)(s.db,"user-metadata",e,"private","kite-data"),a=await (0,i.getDoc)(t);if(!a.exists())throw Error(`Kiting data not found for user: ${e}`);return a.data()},async getUserDisplayNameByUserReference(e){let t=await (0,i.getDoc)(e);if(!t.exists())throw Error(`User not found for reference: ${e.path}`);return t.data().displayName},async searchUsersAdvanced(e,t,r,i,a){let o={db:s.db,searchTerm:e,rolesToExclude:t,rolesToInclude:i,locationsToInclude:r,limit:a??20};return(0,n.searchUsersAdvanced)(o)},async searchUsersCombined(e,t,r,i){let a={db:s.db,searchTerm:e,rolesToExclude:t,rolesToInclude:i,locationsToInclude:r,limit:20};return(0,n.searchUsersCombined)(a)}}])},576692,e=>{"use strict";var t=e.i(391398),r=e.i(418103),i=e.i(380300),a=e.i(298909),s=e.i(537857),n=e.i(130477),o=e.i(799523),l=e.i(191788),c=e.i(169520),u=e.i(910184),d=e.i(657312),h=e.i(552207);e.s(["UserSearch",0,({onUserSelect:e,defaultUserId:p,placeholder:m,rolesToExclude:f,rolesToInclude:g,className:b,size:y,locationsToInclude:v,autoClear:x=!1,useLegacySearch:w=!1,checkedInLocation:k,checkedInDate:C})=>{let[P,j]=(0,l.useState)(""),[N,S]=(0,l.useState)([]),[T,I]=(0,l.useState)(!1),[A,E]=(0,l.useState)(!!p),[R,O]=(0,l.useState)(""),[L,_]=(0,l.useState)(null),[M,D]=(0,l.useState)(-1),U=(0,l.useRef)(null),B=(0,s.default)(),W=async e=>{if(""===k)return[];if(!k)return e;let t=C&&(0,o.default)(C,"YYYY-MM-DD",!0).isValid()?(0,o.default)(C,"YYYY-MM-DD").startOf("day"):(0,o.default)().startOf("day"),r=e.filter(e=>"string"==typeof e.id&&e.id.length>0),i=await Promise.all(r.map(async e=>{let r=await (0,d.fetchUserById)(e.id,!0,!0,!0);if(!r)return null;let i=r.currentStay?.location;if(!i||i!==k)return null;let a=r.currentStay?.checkindate||r.checkindate,s=r.currentStay?.checkoutdate||r.checkoutdate,n=(0,o.default)(a).startOf("day"),l=(0,o.default)(s).startOf("day"),c=n.isValid()&&l.isValid()&&!n.isAfter(t)&&!l.isBefore(t);return!0===r.isCurrentlyCheckedIn||c?e:null})),a=[];
1return i.forEach(e=>{e&&a.push(e)}),a},F=(0,l.useMemo)(()=>P.length<2?"name":(0,u.detectSearchType)(P),[P,A,w,f,v,g,k,C]);(0,l.useEffect)(()=>{P.length>2&&!A?(I(!0),(async()=>{try{let e;e=w?await n.userService.searchUsersByTerm(P,f,v,g):await n.userService.searchUsersAdvanced(P,f,v,g);let t=await W(e);S(t)}catch(e){console.error("Error fetching users: ",e);try{let e=await n.userService.searchUsersByTerm(P,f,v,g),t=await W(e);S(t)}catch(e){console.error("Fallback search also failed: ",e)}}finally{I(!1)}})()):(S([]),D(-1))},[P]),(0,l.useEffect)(()=>{(async()=>{let e=!1;if(p&&!e){E(!0);try{let t=await (0,d.fetchUserById)(p,!0,!1,!1);if(t){let e=(0,d.toDisplayName)(t.firstName,t.lastName);S([{id:p,personal:t.personal,displayName:e}]),O(e),_({id:p,personal:t.personal,displayName:e})}e=!0}catch(e){console.error("Error fetching default user data: ",e)}}})()},[p]);let V=t=>{if(t.displayName){if(t.id&&e&&e(t.id),x){j(""),O(""),E(!1),_(null),S([]);return}O(t.displayName),E(!0),_(t),S([t])}};return(0,t.jsx)("div",{ref:U,className:(0,a.cn)("relative w-full",b),children:(0,t.jsx)(r.Autocomplete,{size:y,isLoading:T,placeholder:""!==R?R:m||B("common.search")+"...",selectedKey:L?.id,onInputChange:e=>{void 0===e||e.includes("undefined")||(E(!1),j(e))},"aria-label":"User Search Input",onKeyDown:e=>{if("Enter"===e.key){let e=M>=0?M:0;N[e]&&(j(N[e].displayName||P),V(N[e]))}else"ArrowDown"===e.key?D(e=>Math.min(e+1,N.length-1)):"ArrowUp"===e.key&&D(e=>Math.max(e-1,0))},defaultFilter:()=>!0,startContent:(0,t.jsx)(c.default,{name:function(e){switch(e){case"email":return"mail";case"birthday":return"cake";case"id":return"fingerprint";default:return"person_search"}}(F),color:"neutralsWaterloo-500",size:"20px"}),description:P.length>2&&!A?(0,t.jsxs)("span",{className:"text-xs text-neutralsWaterloo-400",children:["email"===F&&B("common.searchingByEmail"),"birthday"===F&&B("common.searchingByBirthday"),"id"===F&&B("common.searchingById"),"name"===F&&B("common.searchingByName")]}):void 0,classNames:{base:"w-full",selectorButton:"hidden",listboxWrapper:"rounded-xl border border-neutralsWaterloo-200 shadow-xl shadow-black/10 bg-white/90 backdrop-blur-xl",popoverContent:"rounded-xl bg-transparent shadow-none border-none p-0"},inputProps:{classNames:{inputWrapper:(0,a.cn)("bg-white/70 backdrop-blur-xl","border border-neutralsWaterloo-200","hover:border-neutralsWaterloo-300","data-[focused=true]:border-heroLavander-400","rounded-xl shadow-sm","transition-all duration-200","group-data-[focused=true]:shadow-md group-data-[focused=true]:shadow-heroLavander-200/30"),input:"text-neutralsWaterloo-800 placeholder:text-neutralsWaterloo-400"}},children:N.filter(e=>!!e.id).map((e,r)=>(0,t.jsx)(i.AutocompleteItem,{"aria-label":e.displayName,value:e.displayName,onPress:()=>V(e),onTouchEnd:()=>V(e),classNames:{base:(0,a.cn)("rounded-lg px-2 py-1.5 transition-colors duration-150","data-[hover=true]:bg-neutralsWaterloo-50","data-[focused=true]:bg-heroLavander-50",M===r&&"bg-neutralsWaterloo-100"),selectedIcon:"hidden"},children:(0,t.jsx)(h.UserCard,{userId:e.id,className:"bg-neutralsWaterloo-50 hover:bg-neutralsWaterloo-100 transition-colors duration-150 rounded-xl"})},e.id))})})}])},909718,e=>{"use strict";e.s(["isLoadedAccommodationItem",0,function(e){return"accommodation"===e.type},"isLoadedEventItem",0,function(e){return"event"===e.type},"isLoadedLockerItem",0,function(e){return"locker"===e.type},"isLoadedProductItem",0,function(e){return"product"===e.type},"isLoadedRentalItem",0,function(e){return"rental"===e.type}])},743165,e=>{"use strict";var t=e.i(7443);e.s(["openBookingWorkspace",0,function(e,r){let i=function(e){let t={};if(e.multiBookingId)t.multiBookingId=e.multiBookingId;else{if(!e.bookingId)return null;t.bookingId=e.bookingId}return e.locationId&&(t.location=e.locationId),t}(r);i&&e.push({pathname:t.PAGES.BOOKING_WORKSPACE,query:i})},"openPayrollWorkspace",0,function(e,r){let i=r.userId.trim();if(!i||i.length>128||/[\\/]/.test(i))return;let a=r.userName?.trim(),s=r.locationId?.trim(),n=!!s&&s.length<=128&&!s.includes("/")&&!s.includes("\\"),o=r.period,l=r.reportId?.trim(),c=!!l&&l.length<=128&&!l.includes("/")&&!l.includes("\\"),u="overview"===r.tab||"points"===r.tab||"reports"===r.tab,d=!!o&&Number.isInteger(o.month)&&o.month>=1&&o.month<=12&&Number.isInteger(o.year)&&o.year>=2e3&&o.year<=2200;e.push({pathname:t.PAGES.PAYROLL_WORKSPACE,query:{userId:i,...a?{userName:a.slice(0,160)}:{},...n?{location:s}:{},...d&&o?{month:String(o.month),year:String(o.year)}:{},...u?{tab:r.tab}:{},...c?{reportId:l}:{}}})}])},215125,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0});var i={VALID_LOADERS:function(){return s},imageConfigDefault:function(){return n}};for(var a in i)Object.defineProperty(r,a,{enumerable:!0,get:i[a]});let s=["default","imgix","cloudinary","akamai","custom"],n={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},813521,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return s}});let i=e.r(741705)._(e.r(191788)),a=e.r(215125),s=i.default.createContext(a.imageConfigDefault)},561814,56780,e=>{"use strict";e.i(581516);var t=e.i(207742),r=e.i(889703),i=e.i(742397),a=e.i(353533),s=e.i(245246);class n{id;docRef;locationRef;name;i18nName;description;i18nDescription;address;city;postalCode;country;coordinates;imageURL;imageURLs;amenities;hasElectricity;hasWater;hasSanitaryFacilities;hasShop;hasWifi;defaultAdultPricePerNight;defaultChildPricePerNight;defaultChildMaxAge;defaultTentPricePerNight;defaultCarPricePerNight;defaultElectricityPricePerNight;archived;archivedAt;isHiddenFromCatalog;createdAt;updatedAt;constructor(e){this.id=e.id,this.docRef=e.docRef,this.locationRef=e.locationRef,this.name=e.name,this.i18nName=e.i18nName,this.description=e.description,this.i18nDescription=e.i18nDescription,this.address=e.address,this.city=e.city,this.postalCode=e.postalCode,this.country=e.country,this.coordinates=e.coordinates,this.imageURL=e.imageURL,Array.isArray(e.imageURLs)?this.imageURLs=e.imageURLs:"string"==typeof e.imageURLs&&e.imageURLs?this.imageURLs=[e.imageURLs]:this.imageURLs=[],this.amenities=e.amenities??[],this.hasElectricity=e.hasElectricity,this.hasWater=e.hasWater,this.hasSanitaryFacilities=e.hasSanitaryFacilities,this.hasShop=e.hasShop,this.hasWifi=e.hasWifi,this.defaultAdultPricePerNight=e.defaultAdultPricePerNight,this.defaultChildPricePerNight=e.defaultChildPricePerNight,this.defaultChildMaxAge=e.defaultChildMaxAge??12,this.defaultTentPricePerNight=e.defaultTentPricePerNight,this.defaultCarPricePerNight=e.defaultCarPricePerNight,this.defaultElectricityPricePerNight=e.defaultElectricityPricePerNight,this.archived=e.archived??!1,this.archivedAt=e.archivedAt,this.isHiddenFromCatalog=e.isHiddenFromCatalog??!1,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt}getName(e){return this.i18nName&&(0,s.getI18nText)(this.i18nName,e)||this.name}getDescription(e){return this.i18nDescription?(0,s.getI18nText)(this.i18nDescription,e)||this.description||"":this.description||""}get locationId(){return this.locationRef.id}getPrimaryImage(){return this.imageURL||this.imageURLs?.[0]}getAllImages(){let e=[],t=new Set;if(this.imageURL&&!t.has(this.imageURL)&&(t.add(this.imageURL),e.push(this.imageURL)),this.imageURLs)for(let r of this.imageURLs)r&&!t.has(r)&&(t.add(r),e.push(r));return e}getFormattedAddress(){return[this.address,this.postalCode,this.city,this.country].filter(Boolean).join(", ")}isArchived(){return!0===this.archived}hasElectricityAvailable(){return!0===this.hasElectricity}hasWaterAvailable(){return!0===this.hasWater}getDefaultAdultPrice(){return this.defaultAdultPricePerNight??0}getDefaultChildPrice(){return this.defaultChildPricePerNight??0}getDefaultTentPrice(){return this.defaultTentPricePerNight??0}getDefaultCarPrice(){return this.defaultCarPricePerNight??0}getDefaultElectricityPrice(){return this.defaultElectricityPricePerNight??0}getChildMaxAge(){return this.defaultChildMaxAge??12}toFirestore(){return{locationRef:this.locationRef,name:this.name,i18nName:this.i18nName,description:this.description,i18nDescription:this.i18nDescription,address:this.address,city:this.city,postalCode:this.postalCode,country:this.country,coordinates:this.coordinates,imageURL:this.imageURL,imageURLs:this.imageURLs,amenities:this.amenities,hasElectricity:this.hasElectricity,hasWater:this.hasWater,hasSanitaryFacilities:this.hasSanitaryFacilities,hasShop:this.hasShop,hasWifi:this.hasWifi,defaultAdultPricePerNight:this.defaultAdultPricePerNight,defaultChildPricePerNight:this.defaultChildPricePerNight,defaultChildMaxAge:this.defaultChildMaxAge,defaultTentPricePerNight:this.defaultTentPricePerNight,defaultCarPricePerNight:this.defaultCarPricePerNight,defaultElectricityPricePerNight:this.defaultElectricityPricePerNight,archived:this.archived,archivedAt:this.archivedAt,isHiddenFromCatalog:this.isHiddenFromCatalog,createdAt:this.createdAt,updatedAt:this.updatedAt}}}e.s(["CampingGround",0,n],56780),e.s(["default",0,{async getCampingGroundById(e,r){let s=await (0,a.getDocRef)(i.COLLECTIONS.CAMPING_GROUNDS,e,r),o=await (0,t.getDoc)(s);return o.exists()?new n({id:o.id,docRef:o.ref,...o.data()}):null},async getAllCampingGrounds(e=!1,r){let s,o=await (0,a.getCollection)(i.COLLECTIONS.CAMPING_GROUNDS,r);if(e)s=await (0,t.getDocs)(o);
1else{let e=(0,t.query)(o,(0,t.where)("archived","==",!1));s=await (0,t.getDocs)(e)}return s.docs.map(e=>new n({id:e.id,docRef:e.ref,...e.data()}))},async getCampingGroundsByLocation(e,r=!1){let s=await (0,a.getCollection)(i.COLLECTIONS.CAMPING_GROUNDS),o=(0,t.query)(s,(0,t.where)("locationRef","==",e)),l=(await (0,t.getDocs)(o)).docs.map(e=>new n({id:e.id,docRef:e.ref,...e.data()}));return r?l.filter(e=>!0===e.archived):l.filter(e=>!e.archived)},async getCampingGroundsByLocationId(e,t=!1){let r=await (0,a.getDocRef)(i.COLLECTIONS.ACCOMMODATION_LOCATIONS,e);return this.getCampingGroundsByLocation(r,t)},async createCampingGround(e){let s=await (0,a.getCollection)(i.COLLECTIONS.CAMPING_GROUNDS),n={...(0,a.deleteUndefinedFields)(e),amenities:e.amenities??[],archived:e.archived??!1,createdAt:(0,r.serverTimestamp)(),updatedAt:(0,r.serverTimestamp)()};return await (0,t.addDoc)(s,n)},async updateCampingGround(e,s){let n=await (0,a.getDocRef)(i.COLLECTIONS.CAMPING_GROUNDS,e),o={...(0,a.deleteUndefinedFields)(s),updatedAt:(0,r.serverTimestamp)()};await (0,t.updateDoc)(n,o)},async archiveCampingGround(e){let s=await (0,a.getDocRef)(i.COLLECTIONS.CAMPING_GROUNDS,e);await (0,t.updateDoc)(s,{archived:!0,archivedAt:(0,r.serverTimestamp)(),updatedAt:(0,r.serverTimestamp)()})},async unarchiveCampingGround(e){let s=await (0,a.getDocRef)(i.COLLECTIONS.CAMPING_GROUNDS,e);await (0,t.updateDoc)(s,{archived:!1,archivedAt:null,updatedAt:(0,r.serverTimestamp)()})},async getCampingGroundsByIds(e,t){if(0===e.length)return[];let r=[];for(let i of e){let e=await this.getCampingGroundById(i,t);e&&!e.archived&&r.push(e)}return r},async copyCampingGround(t,r=" (Copy)"){let i=(await e.A(832158)).default,a=await this.getCampingGroundById(t);if(!a)throw Error(`Camping ground not found: ${t}`);let s=a.name+r,n=a.i18nName?{en:(a.i18nName.en||"")+r,...a.i18nName.de&&{de:a.i18nName.de+r},...a.i18nName.it&&{it:a.i18nName.it+r}}:void 0,o={locationRef:a.locationRef,name:s,i18nName:n,description:a.description,i18nDescription:a.i18nDescription?{...a.i18nDescription}:void 0,address:a.address,city:a.city,postalCode:a.postalCode,country:a.country,coordinates:a.coordinates,imageURL:a.imageURL,imageURLs:a.imageURLs?[...a.imageURLs]:[],amenities:a.amenities?[...a.amenities]:[],hasElectricity:a.hasElectricity,hasWater:a.hasWater,hasSanitaryFacilities:a.hasSanitaryFacilities,hasShop:a.hasShop,hasWifi:a.hasWifi,defaultAdultPricePerNight:a.defaultAdultPricePerNight,defaultChildPricePerNight:a.defaultChildPricePerNight,defaultChildMaxAge:a.defaultChildMaxAge,defaultTentPricePerNight:a.defaultTentPricePerNight,defaultCarPricePerNight:a.defaultCarPricePerNight,defaultElectricityPricePerNight:a.defaultElectricityPricePerNight,isHiddenFromCatalog:a.isHiddenFromCatalog,archived:!1},l=await this.createCampingGround(o),c=(await e.A(331121)).default,u=await c.getVariantsForCampingGround(a.docRef,!0),d=new Map;for(let e of u){let t={campingGroundRef:l,name:e.name,i18nName:e.i18nName?{...e.i18nName}:void 0,description:e.description,i18nDescription:e.i18nDescription?{...e.i18nDescription}:void 0,imageUrl:e.imageUrl,sortOrder:e.sortOrder,color:e.color},r=await c.create(t);r?.docRef&&e.docRef&&d.set(e.docRef.id,r.docRef)}for(let e of[...await i.getPitchesByCampingGroundId(t,!1),...await i.getPitchesByCampingGroundId(t,!0)]){let t={campingGroundRef:l,variantRef:e.variantRef?d.get(e.variantRef.id):void 0,name:e.name,i18nName:e.i18nName?{...e.i18nName}:void 0,description:e.description,i18nDescription:e.i18nDescription?{...e.i18nDescription}:void 0,imageURL:e.imageURL,imageURLs:e.imageURLs?[...e.imageURLs]:[],sizeCategory:e.sizeCategory,areaSqm:e.areaSqm,hasElectricity:e.hasElectricity,hasWater:e.hasWater,amenities:e.amenities?[...e.amenities]:[],surfaceType:e.surfaceType,basePitchPricePerNight:e.basePitchPricePerNight,adultPricePerNight:e.adultPricePerNight,childPricePerNight:e.childPricePerNight,childMaxAge:e.childMaxAge,tentPricePerNight:e.tentPricePerNight,carPricePerNight:e.carPricePerNight,electricityAvailable:e.electricityAvailable,electricityIncluded:e.electricityIncluded,electricityPricePerNight:e.electricityPricePerNight,optionalExtras:e.optionalExtras?e.optionalExtras.map(e=>({...e})):void 0,recommendedMaxAdults:e.recommendedMaxAdults,recommendedMaxTents:e.recommendedMaxTents,recommendedMaxCars:e.recommendedMaxCars,pricingTier:e.pricingTier,upgradePrice
1:e.upgradePrice,archived:!1};await i.createPitch(t)}return l},async deleteCampingGround(r){let i=(await e.A(832158)).default,a=(await e.A(331121)).default,s=await this.getCampingGroundById(r);if(!s)throw Error(`Camping ground not found: ${r}`);for(let e of(await i.getPitchesByCampingGroundId(r,!0)))e.docRef&&await (0,t.deleteDoc)(e.docRef);if(s.docRef)for(let e of(await a.getVariantsForCampingGround(s.docRef,!0)))e.docRef&&await (0,t.deleteDoc)(e.docRef);s.docRef&&await (0,t.deleteDoc)(s.docRef)}}],561814)},14989,e=>{"use strict";var t=e.i(336770);let r={showFooter:!0,showSidebar:!1},i=(0,t.create)(e=>({config:r,setConfig:t=>e({config:{...r,...t}}),updateConfig:t=>e(e=>({config:{...e.config,...t}})),resetConfig:()=>e({config:r}),lastCatalogUrl:null,setLastCatalogUrl:t=>e({lastCatalogUrl:t})}));e.s(["useBookingLayoutStore",0,i])},313219,67098,e=>{"use strict";var t=e.i(471830),r=e.i(191788),i=e.i(662091),a=e.i(686092);e.s(["usePublicLinkLanguage",0,function(){let{appConfig:e}=(0,t.useConfig)(),s=(0,a.useSettings)(e=>e.locale),n=(0,i.resolvePublicLinkLanguage)(e.defaultLanguage,s),[o,l]=(0,r.useState)(n),c=(0,r.useRef)(!1);return(0,r.useEffect)(()=>{c.current||l(n)},[n]),{language:o,tenantDefaultLanguage:n,setLanguage:(0,r.useCallback)(e=>{c.current=!0,l(e)},[])}}],313219);var s=e.i(391398),n=e.i(373013),o=e.i(537857),l=e.i(169520),c=e.i(353533);e.s(["default",0,function({value:e,onChange:t,className:a,compact:u=!1}){let d=(0,o.default)(),h=(0,r.useId)();return(0,s.jsxs)("label",{htmlFor:h,className:(0,c.cn)("flex items-center gap-2 text-sm text-neutralsWaterloo-700",u?"justify-between":"flex-col items-start",a),children:[(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 font-medium",children:[(0,s.jsx)(l.default,{name:"language",size:"17px",color:"inherit"}),d("common.language")]}),(0,s.jsx)("select",{id:h,"aria-label":d("common.chooseLanguage"),value:e,onChange:e=>{let r=(0,i.parseSystemLanguage)(e.target.value);r&&t(r)},className:(0,c.cn)("rounded-lg border border-neutralsWaterloo-200 bg-white px-3 py-2 font-medium text-neutralsWaterloo-900 outline-none transition-colors focus:border-bookingPrimary-500 focus:ring-2 focus:ring-bookingPrimary-100",u?"min-w-32 text-sm":"w-full"),children:(0,n.getSupportedLanguages)().map(e=>(0,s.jsx)("option",{value:e,children:(0,n.getLanguageLabel)(e)},e))})]})}],67098)},136635,e=>{"use strict";var t=e.i(283524),r=e.i(655327),i=(0,t.tv)({base:["relative inline-flex items-center outline-none tap-highlight-transparent",...r.dataFocusVisibleClasses],variants:{size:{sm:"text-small",md:"text-medium",lg:"text-large"},color:{foreground:"text-foreground",primary:"text-primary",secondary:"text-secondary",success:"text-success",warning:"text-warning",danger:"text-danger"},underline:{none:"no-underline",hover:"hover:underline",always:"underline",active:"active:underline",focus:"focus:underline"},isBlock:{true:["px-2","py-1","hover:after:opacity-100","after:content-['']","after:inset-0","after:opacity-0","after:w-full","after:h-full","after:rounded-xl","after:transition-background","after:absolute"],false:"hover:opacity-80 active:opacity-disabled transition-opacity"},isDisabled:{true:"opacity-disabled cursor-default pointer-events-none"},disableAnimation:{true:"after:transition-none transition-none"}},compoundVariants:[{isBlock:!0,color:"foreground",class:"hover:after:bg-foreground
1/10"},{isBlock:!0,color:"primary",class:"hover:after:bg-primary/20"},{isBlock:!0,color:"secondary",class:"hover:after:bg-secondary/20"},{isBlock:!0,color:"success",class:"hover:after:bg-success/20"},{isBlock:!0,color:"warning",class:"hover:after:bg-warning/20"},{isBlock:!0,color:"danger",class:"hover:after:bg-danger/20"},{underline:["hover","always","active","focus"],class:"underline-offset-4"}],defaultVariants:{color:"primary",size:"md",isBlock:!1,underline:"none",isDisabled:!1}}),a=e.i(527413),s=e.i(426188),n=e.i(557249),o=e.i(153953),l=e.i(401993),c=e.i(796208),u=e.i(442480),d=e.i(168750),h=e.i(303658),p=e.i(150143),m=e.i(578584),f=e.i(793381),g=e.i(77453),b=e.i(191788),y=e.i(391398),v=e=>(0,y.jsxs)("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"1em",...e,children:[(0,y.jsx)("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),(0,y.jsx)("path",{d:"M15 3h6v6"}),(0,y.jsx)("path",{d:"M10 14L21 3"})]}),x=(0,d.forwardRef)((e,t)=>{let{Component:r,children:x,showAnchorIcon:w,anchorIcon:k=(0,y.jsx)(v,{className:"flex mx-1 text-current self-center"}),getLinkProps:C}=function(e){var t,r,y,v;let x=(0,h.useProviderContext)(),[w,k]=(0,d.mapPropsVariants)(e,i.variantKeys),{ref:C,as:P,children:j,anchorIcon:N,isExternal:S=!1,showAnchorIcon:T=!1,autoFocus:I=!1,className:A,onPress:E,onPressStart:R,onPressEnd:O,onClick:L,..._}=w,M=(0,p.useDOMRef)(C),D=null!=(r=null!=(t=null==e?void 0:e.disableAnimation)?t:null==x?void 0:x.disableAnimation)&&r,{linkProps:U}=function(e,t){let{elementType:r="a",onPress:i,onPressStart:d,onPressEnd:h,onClick:p,role:m,isDisabled:f,...g}=e,b={};"a"!==r&&(b={role:"link",tabIndex:f?void 0:0});let y=(0,o.isIOS)()||(0,o.isAndroid)();p&&"function"==typeof p&&"button"!==m&&(0,l.warn)("onClick is deprecated, please use onPress instead. See: https://github.com/nextui-org/nextui/issues/4292","useLink");let{focusableProps:v}=(0,c.useFocusable)(e,t),{pressProps:x,isPressed:w}=(0,u.usePress)({onPress:e=>{y&&(null==p||p(e)),null==i||i(e)},onPressStart:d,onPressEnd:h,isDisabled:f,ref:t}),k=(0,a.filterDOMProps)(g,{labelable:!0,isLink:"a"===r}),C=(0,s.mergeProps)(v,x),P=(0,n.useRouter)(),j=(0,n.useLinkProps)(e);return{isPressed:w,linkProps:(0,s.mergeProps)(k,j,{...C,...b,"aria-disabled":f||void 0,"aria-current":e["aria-current"],onClick:t=>{var r;null==(r=x.onClick)||r.call(x,t),!y&&p&&p(t),!P.isNative&&t.currentTarget instanceof HTMLAnchorElement&&t.currentTarget.href&&!t.isDefaultPrevented()&&(0,n.shouldClientNavigate)(t.currentTarget,t)&&e.href&&(t.preventDefault(),P.open(t.currentTarget,t,e.href,e.routerOptions))}})}}({..._,onPress:E,onPressStart:R,onPressEnd:O,onClick:L,isDisabled:e.isDisabled,elementType:`${P}`},M),{isFocused:B,isFocusVisible:W,focusProps:F}=(0,m.useFocusRing)({autoFocus:I});S&&(_.rel=null!=(y=_.rel)?y:"noopener noreferrer",_.target=null!=(v=_.target)?v:"_blank");let V=(0,b.useMemo)(()=>i({...k,disableAnimation:D,className:A}),[(0,g.objectToDeps)(k),D,A]);return{Component:P||"a",children:j,anchorIcon:N,showAnchorIcon:T,getLinkProps:(0,b.useCallback)(()=>({ref:M,className:V,"data-focus":(0,f.dataAttr)(B),"data-disabled":(0,f.dataAttr)(e.isDisabled),"data-focus-visible":(0,f.dataAttr)(W),...(0,s.mergeProps)(F,U,_)}),[V,B,W,F,U,_])}}({ref:t,...e});return(0,y.jsx)(r,{...C(),children:(0,y.jsxs)(y.Fragment,{children:[x,w&&k]})})});x.displayName="NextUI.Link",e.s(["Link",0,x],136635)},460728,e=>{"use strict";var t=e.i(336770);let r={scrollPositions:{},scrollTitle:void 0,selectedActivity:void 0,availableActivityTypes:[],currentNavItem:"catalog"},i=(0,t.create)((e,t)=>({...r,saveScrollPosition:(t,r)=>e(e=>({scrollPositions:{...e.scrollPositions,[t]:r}})),getScrollPosition:e=>t().scrollPositions[e]??0,setScrollTitle:t=>e({scrollTitle:t}),setSelectedActivity:t=>e({selectedActivity:t}),setAvailableActivityTypes:t=>e({availableActivityTypes:t}),setCurrentNavItem:t=>e({currentNavItem:t}),reset:()=>e(r)}));e.s(["useMobileLayoutStore",0,i])},61107,e=>{"use strict";let t="WatchdogTimeoutError",r=()=>{let e=Error("The operation took too long to complete.");return e.name=t,e};e.s(["isWatchdogTimeoutError",0,e=>e instanceof Error&&e.name===t,"withWatchdogTimeout",0,(e,t,i=r)=>{let a;return Promise.race([e,new Promise((e,r)=>{a=setTimeout(()=>{r(i())},t)})]).finally(()=>{a&&clearTimeout(a)})}])},966098,e=>{"use strict";var t=e.i(336770);let r={os:"unknown",deviceType:"desktop",platform:"",userAgent:"",isMac:!1,isWindows:!1,isLinux:!1,isIOS:!1,isAndroid:!1,isMobile:!1,isTablet:!1,isDesktop:!0,hasTouch:!1,modifierKey:"Ctrl",modifierKeyName:"Ctrl"},i=(0,t.create)(e=>({...r,initialize:()=>{let t,r,i,a=navigator.platform||"",s=navigator.userAgent||"",n=(t=a.toUpperCase(),r=s.toLowerCase(),/iphone|ipad|ipod/.test(r)?"ios":/android/.test(r)?"android":t.includes("MAC")?"mac":t.includes("WIN")?"windows":t.includes("LINUX")||t.includes("X11")?"linux":"unknown"),o="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,l=(i=s.toLowerCase(),/ipad/.test(i)||/android/.test(i)&&!/mobile/.test(i)||/tablet/.test(i)?"tablet":/iphone|ipod|android.*mobile|blackberry|opera mini|mobile|windows phone/.test(i)?"mobile":"desktop"),c="mac"===n;e({os:n,deviceType:l,platform:a,userAgent:s,isMac:c,isWindows:"windows"===n,isLinux:"linux"===n,isIOS:"ios"===n,isAndroid:"android"===n,isMobile:"mobile"===l,isTablet:"tablet"===l,isDesktop:"desktop"===l,hasTouch:o,modifierKey:c?"⌘":"Ctrl",modifierKeyName:c?"Cmd":"Ctrl"})}}));i.getState().initialize(),e.s(["useSystemInfo",0,function(){return i()}],966098)},635244,e=>{"use strict";var t=e.i(923256),r=(0,e.i(283524).tv)({slots:{base:["relative","inline-flex","
1shrink-0"],badge:["flex","z-10","flex-wrap","absolute","box-border","rounded-full","whitespace-nowrap","place-content-center","origin-center","items-center","text-inherit","select-none","font-regular","scale-100","opacity-100","subpixel-antialiased","data-[invisible=true]:scale-0","data-[invisible=true]:opacity-0"]},variants:{variant:{solid:{},flat:{},faded:{badge:"border-medium"},shadow:{}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},size:{sm:{badge:"px-1 text-tiny"},md:{badge:"px-1 text-small"},lg:{badge:"px-1 text-small"}},placement:{"top-right":{},"top-left":{},"bottom-right":{},"bottom-left":{}},shape:{circle:{},rectangle:{}},isInvisible:{true:{}},isOneChar:{true:{badge:"px-0"}},isDot:{true:{}},disableAnimation:{true:{badge:"transition-none"},false:{badge:"transition-transform-opacity !ease-soft-spring !duration-300"}},showOutline:{true:{badge:"border-2 border-background"},false:{badge:"border-transparent border-0"}}},defaultVariants:{variant:"solid",color:"default",size:"md",shape:"rectangle",placement:"top-right",showOutline:!0,isInvisible:!1},compoundVariants:[{variant:"solid",color:"default",class:{badge:t.colorVariants.solid.default}},{variant:"solid",color:"primary",class:{badge:t.colorVariants.solid.primary}},{variant:"solid",color:"secondary",class:{badge:t.colorVariants.solid.secondary}},{variant:"solid",color:"success",class:{badge:t.colorVariants.solid.success}},{variant:"solid",color:"warning",class:{badge:t.colorVariants.solid.warning}},{variant:"solid",color:"danger",class:{badge:t.colorVariants.solid.danger}},{variant:"shadow",color:"default",class:{badge:t.colorVariants.shadow.default}},{variant:"shadow",color:"primary",class:{badge:t.colorVariants.shadow.primary}},{variant:"shadow",color:"secondary",class:{badge:t.colorVariants.shadow.secondary}},{variant:"shadow",color:"success",class:{badge:t.colorVariants.shadow.success}},{variant:"shadow",color:"warning",class:{badge:t.colorVariants.shadow.warning}},{variant:"shadow",color:"danger",class:{badge:t.colorVariants.shadow.danger}},{variant:"flat",color:"default",class:{badge:t.colorVariants.flat.default}},{variant:"flat",color:"primary",class:{badge:t.colorVariants.flat.primary}},{variant:"flat",color:"secondary",class:{badge:t.colorVariants.flat.secondary}},{variant:"flat",color:"success",class:{badge:t.colorVariants.flat.success}},{variant:"flat",color:"warning",class:{badge:t.colorVariants.flat.warning}},{variant:"flat",color:"danger",class:{badge:t.colorVariants.flat.danger}},{variant:"faded",color:"default",class:{badge:t.colorVariants.faded.default}},{variant:"faded",color:"primary",class:{badge:t.colorVariants.faded.primary}},{variant:"faded",color:"secondary",class:{badge:t.colorVariants.faded.secondary}},{variant:"faded",color:"success",class:{badge:t.colorVariants.faded.success}},{variant:"faded",color:"warning",class:{badge:t.colorVariants.faded.warning}},{variant:"faded",color:"danger",class:{badge:t.colorVariants.faded.danger}},{isOneChar:!0,size:"sm",class:{badge:"w-4 h-4 min-w-4 min-h-4"}},{isOneChar:!0,size:"md",class:{badge:"w-5 h-5 min-w-5 min-h-5"}},{isOneChar:!0,size:"lg",class:{badge:"w-6 h-6 min-w-6 min-h-6"}},{isDot:!0,size:"sm",class:{badge:"w-3 h-3 min-w-3 min-h-3"}},{isDot:!0,size:"md",class:{badge:"w-3.5 h-3.5 min-w-3.5 min-h-3.5"}},{isDot:!0,size:"lg",class:{badge:"w-4 h-4 min-w-4 min-h-4"}},{placement:"top-right",shape:"rectangle",class:{badge:"top-[5%] right-[5%] translate-x-1/2 -translate-y-1/2"}},{placement:"top-left",shape:"rectangle",class:{badge:"top-[5%] left-[5%] -translate-x-1/2 -translate-y-1/2"}},{placement:"bottom-right",shape:"rectangle",class:{badge:"bottom-[5%] right-[5%] translate-x-1/2 translate-y-1/2"}},{placement:"bottom-left",shape:"rectangle",class:{badge:"bottom-[5%] left-[5%] -translate-x-1/2 translate-y-1/2"}},{placement:"top-right",shape:"circle",class:{badge:"top-[10%] right-[10%] translate-x-1/2 -translate-y-1/2"}},{placement:"top-left",shape:"circle",class:{badge:"top-[10%] left-[10%] -translate-x-1/2 -translate-y-1/2"}},{placement:"bottom-right",shape:"circle",class:{badge:"bottom-[
110%] right-[10%] translate-x-1/2 translate-y-1/2"}},{placement:"bottom-left",shape:"circle",class:{badge:"bottom-[10%] left-[10%] -translate-x-1/2 translate-y-1/2"}}]}),i=e.i(168750),a=e.i(303658),s=e.i(915560),n=e.i(77453),o=e.i(191788),l=e.i(391398),c=(0,i.forwardRef)((e,t)=>{let{Component:c,children:u,content:d,slots:h,classNames:p,getBadgeProps:m}=function(e){var t,l;let c=(0,a.useProviderContext)(),u=null!=(l=null!=(t=null==e?void 0:e.disableAnimation)?t:null==c?void 0:c.disableAnimation)&&l,[d,h]=(0,i.mapPropsVariants)(e,r.variantKeys),{as:p,children:m,className:f,content:g,classNames:b,...y}=d,v=(0,o.useMemo)(()=>{var t;return(null==(t=String(g))?void 0:t.length)===1||(null==e?void 0:e.isOneChar)},[g,null==e?void 0:e.isOneChar]),x=(0,o.useMemo)(()=>{var e;return(null==(e=String(g))?void 0:e.length)===0},[g]),w=(0,s.clsx)(null==b?void 0:b.badge,f),k=(0,o.useMemo)(()=>r({...h,showOutline:(null==e?void 0:e.disableOutline)?!(null==e?void 0:e.disableOutline):null==e?void 0:e.showOutline,isOneChar:v,isDot:x}),[(0,n.objectToDeps)(h),v,x]);return{Component:p||"span",children:m,content:g,slots:k,classNames:b,disableAnimation:u,isInvisible:null==e?void 0:e.isInvisible,getBadgeProps:()=>({className:k.badge({class:w}),"data-invisible":e.isInvisible,...y})}}({...e});return(0,l.jsxs)("div",{className:h.base({class:null==p?void 0:p.base}),children:[u,(0,l.jsx)(c,{ref:t,...m(),children:d})]})});c.displayName="NextUI.Badge",e.s(["Badge",0,c],635244)},351773,e=>{"use strict";var t=e.i(456298);function r(e,{pages:t,pageParams:i}){let a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,i[a],i):void 0}function i(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}e.s(["hasNextPage",0,function(e,t){return!!t&&null!=r(e,t)},"hasPreviousPage",0,function(e,t){return!!t&&!!e.getPreviousPageParam&&null!=i(e,t)},"infiniteQueryBehavior",0,function(e){return{onFetch:(a,s)=>{let n=a.options,o=a.fetchOptions?.meta?.fetchMore?.direction,l=a.state.data?.pages||[],c=a.state.data?.pageParams||[],u={pages:[],pageParams:[]},d=0,h=async()=>{let s=!1,h=(0,t.ensureQueryFn)(a.options,a.fetchOptions),p=async(e,r,i)=>{if(s)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);let n={client:a.client,queryKey:a.queryKey,pageParam:r,direction:i?"backward":"forward",meta:a.options.meta};Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(a.signal.aborted?s=!0:a.signal.addEventListener("abort",()=>{s=!0}),a.signal)});let o=await h(n),{maxPages:l}=a.options,c=i?t.addToStart:t.addToEnd;return{pages:c(e.pages,o,l),pageParams:c(e.pageParams,r,l)}};if(o&&l.length){let e="backward"===o,t={pages:l,pageParams:c},a=(e?i:r)(n,t);u=await p(t,a,e)}else{let t=e??l.length;do{let e=0===d?c[0]??n.initialPageParam:r(n,u);if(d>0&&null==e)break;u=await p(u,e),d++}while(d<t)}return u};a.options.persister?a.fetchFn=()=>a.options.persister?.(h,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},s):a.fetchFn=h}}}])},485459,e=>{"use strict";var t=e.i(391398),r=e.i(298909),i=e.i(169520),a=e.i(642994);let s={heroLavander:{gradient:{from:"from-heroLavander-400",to:"to-heroLavander-600"},shadow:"rgba(111,90,238,0.3)"},bookingPrimary:{gradient:{from:"from-bookingPrimary-400",to:"to-bookingPrimary-600"},shadow:"rgb(var(--booking-primary-500, 111 90 238) / 0.3)"},goldenBell:{gradient:{from:"from-goldenBell-400",to:"to-goldenBell-600"},shadow:"rgba(222,155,27,0.3)"},malachite:{gradient:{from:"from-malachite-400",to:"to-malachite-600"},shadow:"rgba(11,218,81,0.3)"},carnation:{gradient:{from:"from-carnation-400",to:"to-carnation-600"},shadow:"rgba(251,86,90,0.3)"},pictionBlue:{gradient:{from:"from-pictionBlue-400",to:"to-pictionBlue-600"},shadow:"rgba(69,170,242,0.3)"},java:{gradient:{from:"from-java-400",to:"to-java-600"},shadow:"rgba(31,194,194,0.3)"},secondaryAquamarine:{gradient:{from:"from-secondaryAquamarine-400",to:"to-secondaryAquamarine-600"},shadow:"rgba(127,255,212,0.3)"},pinkFlamingo:{gradient:{from:"from-pinkFlamingo-400",to:"to-pinkFlamingo-600"},shadow:"rgba(255,102,178,0.3)"},neutralsWaterloo:{gradient:{from:"from-neutralsWaterloo-800",to:"to-neutralsWaterloo-950"},shadow:"rgba(0,0,0,0.2)"},arctic:{gradient:{from:"from-arctic-400",to:"to-arctic-600"},shadow:"rgba(100,149,237,0.3)"}},n={xs:{container:"w-6 h-6",iconSize:"12px",activityIconClass:"w-3 h-3"},sm:{container:"w-8 h-8",iconSize:"16px",activityIconClass:"w-4 h-4"},md:{container:"w-10 h-10",iconSize:"20px",activityIconClass:"w-5 h-5"},lg:{container:"w-12 h-12",iconSize:"24px",activityIconClass:"w-6 h-6"},xl:{container:"w-14 h-14",iconSize:"28px",activityIconClass:"w-7 h-7"}};function o({color:e="glassy",size:l="lg",isActive:c=!1,onClick:u,hoverFlip:d=!1,isDisabled:h=!1,className:p,children:m,...f}){let g,b=n[l],y="glassy"===e,v=y?null:s[e],x=u?"button":"div";return(0,t.jsx)(x,{type:u?"button":void 0,onClick:h?void 0:u,disabled:h,className:(0,r.cn)("group",u&&!h&&"cursor-pointer",h&&"opacity-50 cursor-not-allowed"),children:(0,t.jsx)("div",{className:(0,r.cn)("flex items-center justify-center rounded-full transition-all duration-300",b.container,y?c?"bg-gradient-to-b from-neutralsWaterloo-800 to-neutralsWaterloo-950 shadow-lg":"bg-gradient-to-b from-neutralsWaterloo-50 to-neutralsWaterloo-150 group-hover:from-neutralsWaterloo-100 group-hover:to-neutralsWaterloo-200":`bg-gradient-to-b ${v?.gradient.from} ${v?.gradient.to}`,u&&!h&&["group-hover:scale-110","group-hover:-translate-y-0.5",d&&"group-hover:[transform:rotateY(180deg)_translateY(-2px)]"],c&&"shadow-lg",!c&&!y&&"shadow-md",p),style:{transformStyle:d?"preserve-3d":void 0,boxShadow:y?c?"0 4px 12px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.15)":"0 2px 8px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.8), inset 0 -1px 0 rgba(0,0,0,0.05)":(g=v?.shadow||"rgba(0,0,0,0.15)",`0 4px 12px ${g}, inset 0 1px 0 rgba(255,255,255,0.3), inset 0 -1px 0 rgba(0,0,0,0.1)`)},children:m||("activityType"in f&&f.activityType?(0,t.jsx)(a.default,{activityType:f.activityType,showTooltip:!1,className:(0,r.cn)(b.activityIconClass,y&&!c?"[&_path]:fill-neutralsWaterloo-500":"[&_path]:fill-white")}):"icon"in f&&f.icon?(0,t.jsx)(i.default,{name:f.icon,size:b.iconSize,color:y?c?"white":"neutralsWaterloo-500":"white",filled:f.iconFilled}):null)})})}e.s(["ActivityCoin",0,function({activityType:e,isActive:r,onClick:i,size:a="lg"}){return e?(0,t.jsx)(o,{activityType:e,color:"glassy",isActive:r,onClick:i,hoverFlip:!0,size:a}):(0,t.jsx)(o,{icon:"apps",color:"glassy",isActive:r,onClick:i,hoverFlip:!0,size:a})},"StatCoin",0,function({icon:e,color:r,size:i="md",children:a}){return a?(0,t.jsx)(o,{color:r,size:i,children:a}):(0,t.jsx)(o,{icon:e||"star",color:r,size:i})},"default",0,o])},42634,624335,e=>{"use strict";e.i(485459);var t=e.i(391398),r=e.i(298909),i=e.i(169520);let a={sm:{padding:"px-3 py-1.5 sm:px-3.5 sm:py-2",iconSize:"16px",labelText:"text-[11px] sm:text-xs",gap:"gap-1.5",radius:"roun
1ded-full",minHeight:"min-h-[34px] sm:min-h-[38px]"},md:{padding:"px-3.5 py-2 sm:px-4 sm:py-2.5",iconSize:"20px",labelText:"text-xs sm:text-sm",gap:"gap-2 sm:gap-2.5",radius:"rounded-full",minHeight:"min-h-[38px] sm:min-h-[44px]"},lg:{padding:"px-4 py-2.5 sm:px-5 sm:py-3",iconSize:"22px",labelText:"text-sm sm:text-base",gap:"gap-2 sm:gap-2.5",radius:"rounded-full",minHeight:"min-h-[44px] sm:min-h-[50px]"}};e.s(["default",0,function({bedType:e,iconName:s,label:n,capacity:o,isSelected:l=!1,isFull:c=!1,bookedSpots:u=0,onClick:d,size:h="md",className:p}){let m=a[h];return(0,t.jsxs)("button",{type:"button",onClick:c?void 0:d,disabled:c,className:(0,r.cn)("group relative flex items-center border transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-bookingPrimary-200",m.padding,m.gap,m.radius,m.minHeight,l?"border-bookingPrimary-700 bg-bookingPrimary-700 hover:bg-bookingPrimary-800":c?"border-neutralsWaterloo-200 bg-neutralsWaterloo-50":"border-neutralsWaterloo-200 bg-white hover:border-bookingPrimary-200 hover:bg-bookingPrimary-50/60",!c&&"cursor-pointer",c&&"cursor-not-allowed opacity-60",p),children:[(0,t.jsx)(i.default,{name:s,size:m.iconSize,color:l?"white":c?"neutralsWaterloo-300":"neutralsWaterloo-500"}),(0,t.jsx)("span",{className:(0,r.cn)("max-w-[9rem] truncate whitespace-nowrap font-medium leading-tight sm:max-w-[12rem]",m.labelText,l?"text-white":c?"text-neutralsWaterloo-400":"text-neutralsWaterloo-700"),children:n}),l&&(0,t.jsx)("div",{className:"absolute -right-1.5 -top-1.5 flex h-[18px] w-[18px] items-center justify-center rounded-full border border-bookingPrimary-100 bg-white",children:(0,t.jsx)("div",{className:"flex h-3.5 w-3.5 items-center justify-center rounded-full bg-bookingPrimary-700",children:(0,t.jsx)(i.default,{name:"check",size:"9px",color:"white"})})}),c&&(0,t.jsx)("span",{className:"text-[9px] bg-neutralsWaterloo-200 text-neutralsWaterloo-500 font-semibold leading-none ml-auto px-1.5 py-0.5 rounded-md",children:"Booked"}),!c&&u>0&&(0,t.jsxs)("span",{className:"text-[9px] text-goldenBell-600 font-medium leading-none ml-auto",children:[o-u,"/",o]})]})}],624335),e.s([],42634)},534534,e=>{"use strict";e.s(["default",0,function(e,t){if(!e)throw Error("Invariant failed")}])},843096,e=>{"use strict";e.i(581516);var t=e.i(581356),r=e.i(207742),i=e.i(742397),a=e.i(353533);e.s(["trackingSettingsService",0,{async getTrackingSettings(e){let t=await (0,a.getDocRef)(i.COLLECTIONS.GENERAL.TRACKING_SETTINGS,void 0,e),s=await (0,r.getDoc)(t);return s.exists()?s.data():null},async saveTrackingSettings(e,s){let n=await (0,a.getDocRef)(i.COLLECTIONS.GENERAL.TRACKING_SETTINGS,void 0,e);if((await (0,r.getDoc)(n)).exists()){let e={};s.metaPixelId?.trim()?e.metaPixelId=s.metaPixelId.trim():e.metaPixelId=(0,t.deleteField)(),s.googleAnalyticsId?.trim()?e.googleAnalyticsId=s.googleAnalyticsId.trim():e.googleAnalyticsId=(0,t.deleteField)(),await (0,r.updateDoc)(n,e)}else{let e={};s.metaPixelId?.trim()&&(e.metaPixelId=s.metaPixelId.trim()),s.googleAnalyticsId?.trim()&&(e.googleAnalyticsId=s.googleAnalyticsId.trim()),await (0,r.setDoc)(n,e)}}}])},824689,192222,e=>{"use strict";e.i(131064);var t,r,i,a,s=e.i(502967),n=e.i(847475),o=e.i(872940),l=e.i(375984);let c="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",u="google.c.a.c_id";function d(e){return btoa(String.fromCharCode(...new Uint8Array(e))).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}(t=i||(i={}))[t.DATA_MESSAGE=1]="DATA_MESSAGE",t[t.DISPLAY_NOTIFICATION=3]="DISPLAY_NOTIFICATION",(r=a||(a={})).PUSH_RECEIVED="push-received",r.NOTIFICATION_CLICKED="notification-clicked";let h="fcm_token_details_db",p="fcm_token_object_Store";async function m(e){if("databases"in indexedDB&&!(await indexedDB.databases()).map(e=>e.name).includes(h))return null;let t=null;return(await (0,n.openDB)(h,5,{upgrade:async(r,i,a,s)=>{if(i<2||!r.objectStoreNames.contains(p))return;let n=s.objectStore(p),o=await n.index("fcmSenderId").get(e);if(await n.clear(),o)if(2===i){if(!o.auth||!o.p256dh||!o.endpoint)return;t={token:o.fcmToken,createTime:o.createTime??Date.now(),subscriptionOptions:{auth:o.auth,p256dh:o.p256dh,endpoint:o.endpoint,swScope:o.swScope,vapidKey:"string"==typeof o.vapidKey?o.vapidKey:d(o.vapidKey)}}}else 3===i?t={token:o.fcmToken,createTime:o.createTime,subscriptionOptions:{auth:d(o.auth),p256dh:d(o.p256dh),endpoint:o.endpoint,swScope:o.swScope,vapidKey:d(o.vapidKey)}}:4===i&&(t={token:o.fcmToken,createTime:o.createTime,subscriptionOptions:{auth:d(o.auth),p256dh:d(o.p256dh),endpoint:o.endpoint,swScope:o.swScope,vapidKey:d(o.vapidKey)}})}})).close(),await (0,n.deleteDB)(h),await (0,n.deleteDB)("fcm_vapid_details_db"),await (0,n.deleteDB)("undefined"),!function(e){if(!e||!e.subscriptionOptions)return!1;let{subscriptionOptions:t}=e;return"number"==typeof e.createTime&&e.createTime>0&&"string"==typeof e.token&&e.token.length>0&&"string"==typeof t.auth&&t.auth.length>0&&"string"==typeof t.p256dh&&t.p256dh.length>0&&"string"==typeof t.endpoint&&t.endpoint.length>0&&"string"==typeof t.swScope&&t.swScope.length>0&&"string"==typeof t.vapidKey&&t.vapidKey.length>0}(t)?null:t}let f="firebase-messaging-store",g=null;function b(){return g||(g=(0,n.openDB)("firebase-messaging-database",1,{upgrade:(e,t)=>{0===t&&e.createObjectStore(f)}})),g}async function y(e){let t=function({appConfig:e}){return e.appId}(e),r=await b(),i=await r.transaction(f).objectStore(f).get(t);if(i)return i;{let t=await m(e.appConfig.senderId);if(t)return await v(e,t),t}}async function v(e,t){let r=function({appConfig:e}){return e.appId}(e),i=(await b()).transaction(f,"readwrite");return await i.objectStore(f).put(t,r),await i.done,t}async function x(e){let t=function({appConfig:e}){return e.appId}(e),r=(await b()).transaction(f,"readwrite");await r.objectStore(f).delete(t),await r.done}let w=new o.ErrorFactory("messaging","Messaging",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"only-available-in-window":"This method is available in a Window context.","only-available-in-sw":"This method is available in a service worker context.","permission-default":"The notification permission was not granted and dismissed instead.","permission-blocked":"The notification permission was not granted and blocked instead.","unsupported-browser":"This browser doesn't support the API's required to use the Firebase SDK.","indexed-db-unsupported":"This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc)","failed-service-worker-registration":"We are unable to register the default service worker. {$browserErrorMessage}","token-subscribe-failed":"A problem occurred while subscribing the user to FCM: {$errorInfo}","token-subscribe-no-token":"FCM returned no token when subscribing the user to push.","token-unsubscribe-failed":"A problem occurred while unsubscribing the user from FCM: {$errorInfo}","token-update-failed":"A problem occurred while updating the user from FCM: {$errorInfo}","token-update-no-token":"FCM returned no token when updating the user to push.","use-sw-after-get-token":"The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.","invali
1d-sw-registration":"The input to useServiceWorker() must be a ServiceWorkerRegistration.","invalid-bg-handler":"The input to setBackgroundMessageHandler() must be a function.","invalid-vapid-key":"The public VAPID key must be a string.","use-vapid-key-after-get-token":"The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used."});async function k(e,t){let r,i={method:"POST",headers:await N(e),body:JSON.stringify(S(t))};try{let t=await fetch(j(e.appConfig),i);r=await t.json()}catch(e){throw w.create("token-subscribe-failed",{errorInfo:e?.toString()})}if(r.error){let e=r.error.message;throw w.create("token-subscribe-failed",{errorInfo:e})}if(!r.token)throw w.create("token-subscribe-no-token");return r.token}async function C(e,t){let r,i={method:"PATCH",headers:await N(e),body:JSON.stringify(S(t.subscriptionOptions))};try{let a=await fetch(`${j(e.appConfig)}/${t.token}`,i);r=await a.json()}catch(e){throw w.create("token-update-failed",{errorInfo:e?.toString()})}if(r.error){let e=r.error.message;throw w.create("token-update-failed",{errorInfo:e})}if(!r.token)throw w.create("token-update-no-token");return r.token}async function P(e,t){let r=await N(e);try{let i=await fetch(`${j(e.appConfig)}/${t}`,{method:"DELETE",headers:r}),a=await i.json();if(a.error){let e=a.error.message;throw w.create("token-unsubscribe-failed",{errorInfo:e})}}catch(e){throw w.create("token-unsubscribe-failed",{errorInfo:e?.toString()})}}function j({projectId:e}){return`https://fcmregistrations.googleapis.com/v1/projects/${e}/registrations`}async function N({appConfig:e,installations:t}){let r=await t.getToken();return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e.apiKey,"x-goog-firebase-installations-auth":`FIS ${r}`})}function S({p256dh:e,auth:t,endpoint:r,vapidKey:i}){let a={web:{endpoint:r,auth:t,p256dh:e}};return i!==c&&(a.web.applicationPubKey=i),a}async function T(e){var t,r;let i,a,s,n,o=await R(e.swRegistration,e.vapidKey),l={vapidKey:e.vapidKey,swScope:e.swRegistration.scope,endpoint:o.endpoint,auth:d(o.getKey("auth")),p256dh:d(o.getKey("p256dh"))},c=await y(e.firebaseDependencies);if(!c)return E(e.firebaseDependencies,l);if(t=c.subscriptionOptions,i=(r=l).vapidKey===t.vapidKey,a=r.endpoint===t.endpoint,s=r.auth===t.auth,n=r.p256dh===t.p256dh,i&&a&&s&&n)if(Date.now()>=c.createTime+6048e5)return A(e,{token:c.token,createTime:Date.now(),subscriptionOptions:l});else return c.token;try{await P(e.firebaseDependencies,c.token)}catch(e){console.warn(e)}return E(e.firebaseDependencies,l)}async function I(e){let t=await y(e.firebaseDependencies);t&&(await P(e.firebaseDependencies,t.token),await x(e.firebaseDependencies));let r=await e.swRegistration.pushManager.getSubscription();return!r||r.unsubscribe()}async function A(e,t){try{let r=await C(e.firebaseDependencies,t),i={...t,token:r,createTime:Date.now()};return await v(e.firebaseDependencies,i),r}catch(e){throw e}}async function E(e,t){let r={token:await k(e,t),createTime:Date.now(),subscriptionOptions:t};return await v(e,r),r.token}async function R(e,t){let r=await e.pushManager.getSubscription();return r||e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:function(e){let t="=".repeat((4-e.length%4)%4),r=atob((e+t).replace(/\-/g,"+").replace(/_/g,"/")),i=new Uint8Array(r.length);for(let e=0;e<r.length;++e)i[e]=r.charCodeAt(e);return i}(t)})}function O(e){var t,r;let i={from:e.from,collapseKey:e.collapse_key,messageId:e.fcmMessageId};return function(e,t){if(!t.notification)return;e.notification={};let r=t.notification.title;r&&(e.notification.title=r);let i=t.notification.body;i&&(e.notification.body=i);let a=t.notification.image;a&&(e.notification.image=a);let s=t.notification.icon;s&&(e.notification.icon=s)}(i,e),t=i,(r=e).data&&(t.data=r.data),function(e,t){if(!t.fcmOptions&&!t.notification?.click_action)return;e.fcmOptions={};let r=t.fcmOptions?.link??t.notification?.click_action;r&&(e.fcmOptions.link=r);let i=t.fcmOptions?.analytics_label;i&&(e.fcmOptions.analyticsLabel=i)}(i,e),i}var L="AzSCbw63g1R0nCw85jG8",_="Iaya3yLKwmgvh7cF0q4";let M=[];for(let e=0;e<L.length;e++)M.push(L.charAt(e)),e<_.length&&M.push(_.charAt(e));function D(e){return w.create("missing-app-config-values",{valueName:e})}M.join("");class U{constructor(e,t,r){this.deliveryMetricsExportedToBigQueryEnabled=!1,this.onBackgroun
1dMessageHandler=null,this.onMessageHandler=null,this.logEvents=[],this.isLogServiceStarted=!1;const i=function(e){if(!e||!e.options)throw D("App Configuration Object");if(!e.name)throw D("App Name");let{options:t}=e;for(let e of["projectId","apiKey","appId","messagingSenderId"])if(!t[e])throw D(e);return{appName:e.name,projectId:t.projectId,apiKey:t.apiKey,appId:t.appId,senderId:t.messagingSenderId}}(e);this.firebaseDependencies={app:e,appConfig:i,installations:t,analyticsProvider:r}}_delete(){return Promise.resolve()}}async function B(e){try{e.swRegistration=await navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"}),e.swRegistration.update().catch(()=>{}),await W(e.swRegistration)}catch(e){throw w.create("failed-service-worker-registration",{browserErrorMessage:e?.message})}}async function W(e){return new Promise((t,r)=>{let i=setTimeout(()=>r(Error("Service worker not registered after 10000 ms")),1e4),a=e.installing||e.waiting;e.active?(clearTimeout(i),t()):a?a.onstatechange=e=>{e.target?.state==="activated"&&(a.onstatechange=null,clearTimeout(i),t())}:(clearTimeout(i),r(Error("No incoming service worker found.")))})}async function F(e,t){if(t||e.swRegistration||await B(e),t||!e.swRegistration){if(!(t instanceof ServiceWorkerRegistration))throw w.create("invalid-sw-registration");e.swRegistration=t}}async function V(e,t){t?e.vapidKey=t:e.vapidKey||(e.vapidKey=c)}async function z(e,t){if(!navigator)throw w.create("only-available-in-window");if("default"===Notification.permission&&await Notification.requestPermission(),"granted"!==Notification.permission)throw w.create("permission-blocked");return await V(e,t?.vapidKey),await F(e,t?.serviceWorkerRegistration),T(e)}async function $(e,t,r){let i=function(e){switch(e){case a.NOTIFICATION_CLICKED:return"notification_open";case a.PUSH_RECEIVED:return"notification_foreground";default:throw Error()}}(t);(await e.firebaseDependencies.analyticsProvider.get()).logEvent(i,{message_id:r[u],message_name:r["google.c.a.c_l"],message_time:r["google.c.a.ts"],message_device_time:Math.floor(Date.now()/1e3)})}async function K(e,t){let r=t.data;if(!r.isFirebaseMessaging)return;e.onMessageHandler&&r.messageType===a.PUSH_RECEIVED&&("function"==typeof e.onMessageHandler?e.onMessageHandler(O(r)):e.onMessageHandler.next(O(r)));let i=r.data;"object"==typeof i&&i&&u in i&&"1"===i["google.c.a.e"]&&await $(e,r.messageType,i)}let G="@firebase/messaging",H="0.12.24";async function q(){try{await (0,o.validateIndexedDBOpenable)()}catch(e){return!1}return"u">typeof window&&(0,o.isIndexedDBAvailable)()&&(0,o.areCookiesEnabled)()&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}async function Q(e){if(!navigator)throw w.create("only-available-in-window");return e.swRegistration||await B(e),I(e)}async function Y(e,t){return z(e=(0,o.getModularInstance)(e),t)}(0,l._registerComponent)(new s.Component("messaging",e=>{let t=new U(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),e.getProvider("analytics-internal"));return navigator.serviceWorker.addEventListener("message",e=>K(t,e)),t},"PUBLIC")),(0,l._registerComponent)(new s.Component("messaging-internal",e=>{let t=e.getProvider("messaging").getImmediate();return{getToken:e=>z(t,e)}},"PRIVATE")),(0,l.registerVersion)(G,H),(0,l.registerVersion)(G,H,"esm2020"),e.s(["deleteToken",0,function(e){return Q(e=(0,o.getModularInstance)(e))},"getMessaging",0,function(e=(0,l.getApp)()){return q().then(e=>{if(!e)throw w.create("unsupported-browser")},e=>{throw w.create("indexed-db-unsupported")}),(0,l._getProvider)((0,o.getModularInstance)(e),"messaging").getImmediate()},"getToken",0,Y,"isSupported",0,q,"onMessage",0,function(e,t){var r=e=(0,o.getModularInstance)(e);if(!navigator)throw w.create("only-available-in-window");return r.onMessageHandler=t,()=>{r.onMessageHandler=null}}],192222),e.s([],824689)},435998,368514,e=>{"use strict";e.i(824689);var t=e.i(192222),r=e.i(191788);let i=()=>
1{if("u"<typeof navigator)return!1;let e=navigator.userAgent||"";return/iPad|iPhone|iPod/.test(e)||"MacIntel"===navigator.platform&&"number"==typeof navigator.maxTouchPoints&&(navigator.maxTouchPoints??0)>1},a=async()=>{if("u"<typeof navigator)return{status:"loading",canToggle:!1,showWarning:!1};let e="Notification"in window,r="serviceWorker"in navigator,a="PushManager"in window;if(!e||!r||!a)return i()?{status:"ios-not-installed",canToggle:!1,showWarning:!0,warningKey:"profile.pushIosInstallHint"}:{status:"unsupported",canToggle:!1,showWarning:!0,warningKey:"profile.pushUnsupported"};if(i()&&!(window.matchMedia("(display-mode: standalone)").matches||!0===navigator.standalone))return{status:"ios-not-installed",canToggle:!1,showWarning:!0,warningKey:"profile.pushIosInstallHint"};let s=!1;try{s=await (0,t.isSupported)()}catch{s=!1}return s?"denied"===Notification.permission?{status:"denied",canToggle:!1,showWarning:!0,warningKey:"profile.pushPermissionDenied"}:{status:"ready",canToggle:!0,showWarning:!1}:{status:"unsupported",canToggle:!1,showWarning:!0,warningKey:"profile.pushUnsupported"}};var s=e.i(477507),n=e.i(537857),o=e.i(231692),l=e.i(686092),c=e.i(284839);e.s(["usePushToggle",0,()=>{let e=(0,n.default)(),t=(()=>{let[e,t]=(0,r.useState)({status:"loading",canToggle:!1,showWarning:!1});return(0,r.useEffect)(()=>{let e=!1;a().then(r=>{e||t(r)});let r=()=>{"visible"===document.visibilityState&&a().then(r=>{e||t(r)})};return document.addEventListener("visibilitychange",r),()=>{e=!0,document.removeEventListener("visibilitychange",r)}},[]),e})(),[i,u]=(0,l.useSettings)(e=>[e.pushNotifications,e.setPushNotifications]),[d,h]=(0,r.useState)(!1),[p,m]=(0,r.useState)(!1),[f,g]=(0,r.useState)(!1),b=(0,r.useRef)(null),y=(0,r.useRef)(0),v=(0,r.useCallback)(async t=>{u(t),h(!0);try{let r=await (0,o.handlePushNotificationsToggle)(t,u,e);t&&r&&!r.success&&r.didFlipOff&&u(i)}catch(t){console.error("[usePushToggle] performToggle error:",t),u(i),s.toast.error(e("profile.notificationToggleError"))}finally{h(!1),y.current=Date.now()}},[i,u,e]),x=(0,r.useCallback)(async r=>{if(!(Date.now()-y.current<700)&&!d){if("ios-not-installed"===t.status)return void g(!0);if(!t.canToggle){t.warningKey&&s.toast.warning(e(t.warningKey));return}if(r&&"u">typeof Notification&&"default"===Notification.permission){b.current=r,m(!0);return}await v(r)}},[t,d,v,e]),w=(0,r.useCallback)(async()=>{m(!1);try{c.analyticsService.trackEvent("PUSH_RATIONALE_ACCEPTED")}catch(e){}let e=b.current;b.current=null,null!==e&&await v(e)},[v]),k=(0,r.useCallback)(()=>{m(!1),b.current=null;try{c.analyticsService.trackEvent("PUSH_RATIONALE_DECLINED")}catch(e){}},[]),C=(0,r.useCallback)(()=>g(!1),[]);return{pushNotifications:i,isToggling:d,pushCapability:t,requestToggle:x,openIosSheet:(0,r.useCallback)(()=>g(!0),[]),rationaleOpen:p,iosSheetOpen:f,acceptRationale:w,declineRationale:k,closeIosSheet:C}}],435998);var u=e.i(391398);e.i(963793);var d=e.i(113315),h=e.i(169520),p=e.i(433167);let m=({isOpen:e,onClose:t})=>{let r=(0,n.default)(),i=[{icon:"ios_share",label:r("profile.pushIosStep1Label"),description:r("profile.pushIosStep1Desc")},{icon:"add_box",label:r("profile.pushIosStep2Label"),description:r("profile.pushIosStep2Desc")},{icon:"open_in_new",label:r("profile.pushIosStep3Label"),description:r("profile.pushIosStep3Desc")}];return(0,u.jsx)(p.Modal,{isOpen:e,onClose:t,size:"sm",placement:"bottom",backdrop:"blur",scrollBehavior:"inside",children:(0,u.jsxs)(p.ModalContent,{children:[(0,u.jsxs)(p.ModalHeader,{className:"flex flex-col gap-2 items-center text-center pt-6",children:[(0,u.jsx)("div",{className:"w-14 h-14 rounded-full bg-heroLavander-100 flex items-center justify-center",children:(0,u.jsx)(h.default,{name:"install_mobile",size:"28px",color:"heroLavander-600"})}),(0,u.jsx)("h3",{className:"text-base font-semibold text-heroLavander-900",children:r("profile.pushIosTitle")}),(0,u.jsx)("p",{className:"text-xs text-neutralsWaterloo-600 font-normal",children:r("profile.pushIosSubtitle")})]}),(0,u.jsx)(p.ModalBody,{className:"pt-0",children:(0,u.jsx)("ol",{className:"flex flex-col gap-2.5",children:i.map((e,t)=>(0,u.jsxs)("li",{className:"flex items-start gap-3 px-3 py-2.5 rounded-lg bg-neutralsWaterloo-50",children:[(0,u.jsx)("div",{className:"w-7 h-7 rounded-full bg-white border border-neutralsWaterloo-200 flex items-center justify-center text-[11px] font-semibold text-heroLavander-700 flex-shrink-0",children:t+1}),(0,u.jsxs)("div",{className:"flex flex-col gap-0.5 min-w-0 flex-1",children:[(0,u.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,u.jsx)(h.default,{name:e.icon,size:"16px",color:"heroLavander-600"}),(0,u.jsx)("span",{className:"text-xs font-semibold text-neutralsWaterloo-900",children:e.label})]}),(0,u.jsx)("span",{className:"text-[11px] text-neutralsWaterloo-600 leading-snug",children:e.description})]})]},e.label))})}),(0,u.jsx)(p.ModalFooter,{className:"pt-0",children:(0,u.jsx)(d.TactileButton,{color:"primary",variant:"solid",fullWidth:!0,onClick:t,children:r("profile.pushIosGotIt")})})]})})},f=({isOpen:e,onAccept:t,onDecline:r})=>{let i=(0,n.default)();return(0,u.jsx)(p.Modal,{isOpen:e,onClose:r,size:"sm",placement:"center",backdrop:"blur",hideCloseButton:!0,classNames:{backdrop:"!z-[120] bg-black/30 backdrop-blur-md",wrapper:"!z-[130]"},children:(0,u.jsxs)(p.ModalContent,{children:[(0,u.jsxs)(p.ModalHeader,{className:"flex flex-col gap-2 items-center text-center pt-6",children:[(0,u.jsx)("div",{className:"w-14 h-14 roun
1ded-full bg-heroLavander-100 flex items-center justify-center",children:(0,u.jsx)(h.default,{name:"notifications_active",size:"28px",color:"heroLavander-600"})}),(0,u.jsx)("h3",{className:"text-base font-semibold text-heroLavander-900",children:i("profile.pushRationaleTitle")}),(0,u.jsx)("p",{className:"text-xs text-neutralsWaterloo-600 font-normal",children:i("profile.pushRationaleSubtitle")})]}),(0,u.jsxs)(p.ModalBody,{className:"pt-0",children:[(0,u.jsx)("ul",{className:"flex flex-col gap-2",children:[{icon:"event_available",key:"profile.pushBenefitSchedule"},{icon:"sync_alt",key:"profile.pushBenefitChanges"},{icon:"campaign",key:"profile.pushBenefitTeam"}].map(e=>(0,u.jsxs)("li",{className:"flex items-start gap-3 px-3 py-2 rounded-lg bg-neutralsWaterloo-50",children:[(0,u.jsx)(h.default,{name:e.icon,size:"18px",color:"heroLavander-600",className:"flex-shrink-0 mt-0.5"}),(0,u.jsx)("span",{className:"text-xs text-neutralsWaterloo-800 leading-snug",children:i(e.key)})]},e.key))}),(0,u.jsx)("p",{className:"text-[11px] text-neutralsWaterloo-500 mt-2 text-center",children:i("profile.pushRationaleNextStep")})]}),(0,u.jsxs)(p.ModalFooter,{className:"flex flex-col gap-2 pt-0",children:[(0,u.jsx)(d.TactileButton,{color:"primary",variant:"solid",fullWidth:!0,onClick:t,children:i("profile.pushRationaleAccept")}),(0,u.jsx)(d.TactileButton,{color:"neutral",variant:"ghost",fullWidth:!0,onClick:r,children:i("profile.pushRationaleDecline")})]})]})})};e.s(["PushDialogs",0,({control:e})=>(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(f,{isOpen:e.rationaleOpen,onAccept:e.acceptRationale,onDecline:e.declineRationale}),(0,u.jsx)(m,{isOpen:e.iosSheetOpen,onClose:e.closeIosSheet})]})],368514)},965019,e=>{"use strict";e.i(581516);var t=e.i(310339),r=e.i(207742),i=e.i(492025),a=e.i(581356),s=e.i(615351),n=e.i(742397),o=e.i(337153);let l=e=>(0,s.doc)(o.db,n.COLLECTIONS.USER_METADATA.PUBLIC,e),c=()=>({checkindate:"",checkoutdate:"",lockerNumber:null,isCurrentlyCheckedIn:!1,currentStay:(0,a.deleteField)()}),u=e=>{let t={checkindate:e.checkindate,checkoutdate:e.checkoutdate,location:e.location,checkInVerified:e.checkInVerified,checkOutVerified:e.checkOutVerified,bookingId:e.bookingIds&&e.bookingIds.length>0?e.bookingIds[0]:null};return e.checkInVerifiedAt&&(t.checkInVerifiedAt=e.checkInVerifiedAt),e.checkInVerifiedBy&&(t.checkInVerifiedBy=e.checkInVerifiedBy),e.checkOutVerifiedAt&&(t.checkOutVerifiedAt=e.checkOutVerifiedAt),e.checkOutVerifiedBy&&(t.checkOutVerifiedBy=e.checkOutVerifiedBy),t};async function d(e){let t=await (0,r.getDoc)(l(e));return t.exists()?t.data().currentStay??null:null}async function h(e,a){let s={checkindate:a.checkindate,checkoutdate:a.checkoutdate,location:a.location,checkInVerified:a.checkInVerified,checkOutVerified:a.checkOutVerified,checkInVerifiedBy:a.checkInVerifiedBy??"",checkInVerifiedAt:a.checkInVerifiedAt??t.Timestamp.now(),bookingId:a.bookingIds&&a.bookingIds.length>0?a.bookingIds[0]:null,bookingIds:a.bookingIds??[],archivedAt:t.Timestamp.now()};a.checkOutVerifiedBy&&(s.checkOutVerifiedBy=a.checkOutVerifiedBy),a.checkOutVerifiedAt&&(s.checkOutVerifiedAt=a.checkOutVerifiedAt),await (0,r.addDoc)((0,i.collection)(o.db,n.COLLECTIONS.USER_METADATA.PUBLIC,e,n.COLLECTIONS.USER_METADATA.CHECKINLOG),s)}async function p({userId:e,checkindate:i,checkoutdate:a,location:s}){let n=await d(e);n&&await h(e,n);let o=n&&n.checkindate===i&&n.checkoutdate===a&&n.location===s,c={checkindate:i,checkoutdate:a,location:s,checkInVerified:!!o&&(n?.checkInVerified??!1),checkOutVerified:!1,bookingIds:o?n?.bookingIds??[]:[],startedAt:o?n?.startedAt??t.Timestamp.now():t.Timestamp.now()};return o&&n?.checkInVerifiedAt&&(c.checkInVerifiedAt=n.checkInVerifiedAt),o&&n?.checkInVerifiedBy&&(c.checkInVerifiedBy=n.checkInVerifiedBy),await (0,r.setDoc)(l(e),{checkindate:i,checkoutdate:a,currentStay:c},{merge:!0}),c}async function m(e){let{userId:i,verifiedBy:a,bookingIds:s=[]}=e,n=await d(i);if(!n)throw Error(`Cannot verify check-in: user ${i} has no active stay.`);let o=Array.from(new Set([...n.bookingIds??[],...s]));await (0,r.updateDoc)(l(i),{"currentStay.checkInVerified":!0,"currentStay.checkInVerifiedAt":t.Timestamp.now(),"currentStay.checkInVerifiedBy":a,"currentStay.bookingIds":o})}async function f(e){let{userId:i,verifiedBy:a}=e,s=await d(i);if(!s)return void await g(i);let n={...s,checkOutVerified:!0,checkOutVerifiedAt:t.Timestamp.now(),checkOutVerifiedBy:a};await h(i,n),await (0,r.updateDoc)(l(i),{...c(),lastCheckIn:u(n)})}async function g(e,t){let i=null;t?.archiveCurrentStay&&(i=await d(e))&&await h(e,i),await (0,r.updateDoc)(l(e),{...c(),...i?{lastCheckIn:u(i)}:{}})}async function b(e,i){let a=await (0,r.getDoc)(l(e));if(!a.exists())throw Error(`User ${e} does not exist.`);let s=a.data();if(s.currentStay)return void await (0,r.updateDoc)(l(e),{"currentStay.location":i});let n=s.checkindate?.trim()??"",o=s.checkoutdate?.trim()??"";if(!n||!o)throw Error(`User ${e} has no check-in/check-out dates to assign a location to.`);let c={checkindate:n,checkoutdate:o,location:i,checkInVerified:!1,checkOutVerified:!1,bookingIds:[],startedAt:t.Timestamp.now()};await (0,r.setDoc)(l(e),{currentStay:c},{merge:!0})}e.s(["assignStayLocation",0,b,"clearUserStay",0,g,"startUserStay",0,p,"verifyUserCheckIn",0,m,"verifyUserCheckOut",0,f])},939413,e=>{"use strict";var t=e.i(391398);let r={width:"100%",height:"250px",borderRadius:"25px",overflow:"hidden"};e.s(["default",0,({lat:e,lng:i})=>{let a=`https://maps.google.com/maps?q=${e},${i}&z=14&output=embed`,s=`https://www.google.com/maps/search/?api=1&query=${e},${i}`;return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("iframe",{title:"Location map",src:a,width:"100%",height:"250",style:r,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"}),(0,t.jsx)("a",{href:s,target:"_blank",rel:"noreferrer",className:"absolute bottom-2 right-2 roun
1ded bg-white/90 px-2 py-1 text-xs font-medium text-neutralsWaterloo-700 shadow",children:"Open map"})]})}])},963291,e=>{"use strict";var t=e.i(391398),r=e.i(981052),i=e.i(889356),a=e.i(38553),s=e.i(191788),n=e.i(337153),o=e.i(353533);let l=null,c=null,u=e=>"object"==typeof e&&null!==e;async function d(){return null!==l?l:c||(c=(async()=>{try{let e=await (0,o.getLocation)(),t=(0,a.httpsCallable)(n.functions,"getTideforceGooglePlacesApiKey");return l=(await t({location:e})).data.apiKey??""}catch(a){let e,t,r,i;if(l="",e=u(a)?a.code:void 0,t=a instanceof Error||u(a)&&"string"==typeof a.message?a.message:"","deadline-exceeded"===e||"functions/deadline-exceeded"===e||t.toLowerCase().includes("deadline-exceeded"))return console.warn("[useGoogleMapsApiKey] Google Maps API key request timed out; maps features will stay disabled for this session."),l;if(r=u(a)?a.code:void 0,i=(a instanceof Error||u(a)&&"string"==typeof a.message?a.message:"").toLowerCase(),"unauthenticated"===r||"functions/unauthenticated"===r||"permission-denied"===r||"functions/permission-denied"===r||i.includes("authentication required")||i.includes("unauthenticated")||i.includes("permission-denied"))return console.info("[useGoogleMapsApiKey] Google Maps API key is unavailable for the current user; maps features that require this key are disabled."),l;return console.error("Error fetching Google Maps API key:",a),""}finally{c=null}})())}e.i(581516);var h=e.i(207742),p=e.i(537857),m=e.i(939413),f=e.i(433167),g=e.i(742397),b=e.i(320896);let y=async e=>{try{let t=await fetch(e,{method:"HEAD",redirect:"follow"});if(t.url&&t.url!==e)return t.url;return null}catch(e){return console.error("Failed to resolve short link:",e),null}};e.s(["default",0,({showCustomerInfoModal:e,onClose:a})=>{let n=(0,i.useMobile)().mobile,{apiKey:c}=function(){let[e,t]=(0,s.useState)(l??""),[r,i]=(0,s.useState)(null===l);return(0,s.useEffect)(()=>{if(null!==l){t(l),i(!1);return}let e=!1;return d().then(r=>{e||(t(r),i(!1))}),()=>{e=!0}},[]),{apiKey:e,loading:r,isLoading:r}}(),[u,v]=(0,s.useState)(48.678391),[x,w]=(0,s.useState)(10.15133),[k,C]=(0,s.useState)({phone:"",ph
1one_local:"",email:"",city:"",zip:"",address:"",website:"",conditions_link:"",disclaimer_link:"",terms_link:"",privacy_link:"",imprint_link:"",country:"",school_address:"",school_zip:"",school_city:"",school_google_maps_link:"",school_lat:"",school_lng:""}),[P,j]=(0,s.useState)(""),[N,S]=(0,s.useState)(""),[T,I]=(0,s.useState)(!1),A=(0,p.default)(),E=async()=>{let e=await (0,o.getDocRef)(g.GENERAL_COLLECTION,"appconfiguration"),t=(await (0,h.getDoc)(e)).data();if(void 0===t)return;C({phone:t.phone||"",phone_local:t.phone_local||"",email:t.email||"",city:t.city||"",zip:t.zip||"",address:t.address||"",website:t.website||"",conditions_link:t.conditions_link||"",disclaimer_link:t.disclaimer_link||"",terms_link:t.terms_link||"",privacy_link:t.privacy_link||"",imprint_link:t.imprint_link||"",country:t.country||"",school_address:t.school_address||"",school_zip:t.school_zip||"",school_city:t.school_city||"",school_google_maps_link:t.school_google_maps_link||"",school_lat:t.school_lat||"",school_lng:t.school_lng||""});let i=r.default.getInstance(),a=await i.getConfig();j(a.company_name||""),S(a.companyLogoSvgUrl||""),I(a.useCompanyLogo||!1)};return(0,s.useEffect)(()=>{E()},[]),(0,s.useEffect)(()=>{(async()=>{if(k.school_lat&&k.school_lng){let e=parseFloat(k.school_lat),t=parseFloat(k.school_lng);if(!isNaN(e)&&!isNaN(t)){console.log("Using explicit school coordinates:",e,t),v(e),w(t);return}}if(k.school_google_maps_link){let e,t=k.school_google_maps_link;if((e=t).includes("goo.gl/")||e.includes("maps.app.goo.gl/")){console.log("Short Google Maps link detected, trying to resolve...",t);let e=await y(t);e&&(console.log("Resolved to:",e),t=e)}let r=(e=>{try{let t=e.match(/@(-?[\d.]+),(-?[\d.]+)/);if(t){let e=parseFloat(t[1]),r=parseFloat(t[2]);if(!isNaN(e)&&!isNaN(r))return{lat:e,lng:r}}let r=e.match(/[?&]q=(-?[\d.]+),(-?[\d.]+)/);if(r){let e=parseFloat(r[1]),t=parseFloat(r[2]);if(!isNaN(e)&&!isNaN(t))return{lat:e,lng:t}}let i=e.match(/[?&]ll=(-?[\d.]+),(-?[\d.]+)/);if(i){let e=parseFloat(i[1]),t=parseFloat(i[2]);if(!isNaN(e)&&!isNaN(t))return{lat:e,lng:t}}let a=e.match(/!3d(-?[\d.]+)!4d(-?[\d.]+)/);if(a){let e=parseFloat(a[1]),t=parseFloat(a[2]);if(!isNaN(e)&&!isNaN(t))return{lat:e,lng:t}}return null}catch{return null}})(t);if(console.log("Google Maps link provided:",k.school_google_maps_link),console.log("Extracted coordinates:",r),r){v(r.lat),w(r.lng);return}console.log("Could not extract coordinates from link, falling back to address geocoding")}let e=k.school_address||k.address,t=k.school_zip||k.zip,r=k.school_city||k.city;if(e&&c){let i=`https://maps.googleapis.com/maps/api/geocode/json?address=${encodeURIComponent(e+", "+t+" "+r)}&components=country:${k.country}&key=${c}`;try{let e=await fetch(i),t=await e.json();"OK"===t.status?(v(t.results[0].geometry.location.lat),w(t.results[0].geometry.location.lng)):console.error("Geocoding fehlgeschlagen:",t.status,t.error_message)}catch(e){console.error("Fehler beim Abrufen der Koordinaten:",e)}}})()},[k.address,k.zip,k.city,k.country,k.school_address,k.school_zip,k.school_city,k.school_google_maps_link,k.school_lat,k.school_lng,c]),(0,t.jsx)(f.Modal,{isOpen:e,size:n?"xl":"3xl",scrollBehavior:"inside",isDismissable:!0,backdrop:"blur",onClose:a,placement:"bottom",children:(0,t.jsx)(f.ModalContent,{children:e=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(f.ModalHeader,{className:"flex flex-col justify-center items-center gap-2 pb-2",children:[T&&N?(0,t.jsx)("img",{src:N,alt:"Company Logo",className:"h-10 object-contain"}):P&&(0,t.jsx)("div",{className:"text-indigo-950 text-3xl font-bold",children:P}),(0,t.jsx)("div",{className:"text-slate-500 text-sm",children:A("customerInfo.title")})]}),(0,t.jsxs)(f.ModalBody,{className:"pb-6",children:[(0,t.jsxs)("div",{className:"w-full mb-4 relative",children:[(0,t.jsx)(m.default,{lat:u||47.793886,lng:x||11.841518}),(0,t.jsx)("div",{className:"absolute top-0 left-0 bottom-[40px] cursor-pointer",style:{right:"180px"},onClick:()=>{k.school_google_maps_link?window.open(k.school_google_maps_link):window.open(`https://www.google.com/maps/dir/?api=1&destination=${u},${x}`)}})]}),(0,t.jsxs)("div",{className:"flex flex-col w-full gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col w-full gap-3",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-indigo-950 text-center",children:A("common.contact")}),(0,t.jsxs)("div",{className:"flex justify-center items-center gap-6 flex-wrap",children:[k.phone&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-1 min-w-[80px]",children:[(0,t.jsx)(b.MaterialIconButton,{name:"phone",materialIconSize:"32px",onClick:()=>window.open(`tel:${k.phone}`)}),(0,t.jsx)("span",{className:"text-xs text-slate-600",children:A("common.call")}),(0,t.jsx)("span",{className:"text-xs font-semibold text-indigo-950",children:A("customerInfo.official")})]}),k.phone_local&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-1 min-w-[80px]",children:[(0,t.jsx)(b.MaterialIconButton,{name:"smartphone",materialIconSize:"32px",onClick:()=>window.open(`tel:${k.phone_local}`)}),(0,t.jsx)("span",{className:"text-xs text-slate-600",children:A("common.call")}),(0,t.jsx)("span",{className:"text-xs font-semibold text-indigo-950",children:A("customerInfo.local")})]}),(0,t.jsxs)("div",{className:"flex flex-col items-center gap-1 min-w-[80px]",children:[(0,t.jsx)(b.MaterialIconButton,{name:"alternate_email",materialIconSize:"32px",onClick:()=>window.open(`mailto:${k.email}`)}),(0,t.jsx)("span",{className:"text-xs text-slate-600",children:A("common.email")})]})]})]}),(0,t.jsx)("div",{className:"w-full h-px bg-slate-200"}),(0,t.jsxs)("div",{className:"flex flex-col w-full gap-3",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-indigo-950 text-center",children:A("common.information")}),(0,t.jsxs)("div",{className:"flex justify-center items-center gap-6 flex-wrap",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center gap-1 min-w-[80px]",children:[(0,t.jsx)(b.MaterialIconButton,{name:"location_on",materialIconSize:"32px",onClick:()=>{k.school_google_maps_link?window.open(k.school_google_maps_link):window.open(`https://www.google.com/maps/dir/?api=1&destination=${u},${x}`)}}),(0,t.jsx)("span",{className:"text-xs text-slate-600",children:A("common.route")})]}),k.disclaimer_link&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-1 min-w-[80px]",children:[(0,t.jsx)(b.MaterialIconButton,{name:"language",materialIconSize:"32px",onClick:()=>{window.open(k.disclaimer_link)}}),(0,t.jsx)("span",{className:"text-xs text-slate-600",children:A("common.website")})]})]})]}),(0,t.jsx)("div",{className:"w-full h-px bg-slate-200"}),(0,t.jsxs)("div",{className:"flex flex-col w-full gap-3",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-indigo-950 text-center",children:A("common.legal")}),(0,t.jsxs)("div",{className:"flex justify-center items-start gap-8 flex-wrap",children:[k.terms_link&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-1 min-w-[100px]",children:[(0,t.jsx)(b.MaterialIconButton,{name:"gavel",materialIconSize:"32px",onClick:()=>{window.open(k.terms_link)}}),(0,t.jsx)("span",{className:"text-xs text-slate-600 text-center",children:A("customerInfo.terms")})]}),k.privacy_link&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-1 min-w-[100px]",children:[(0,t.jsx)(b.MaterialIconButton,{name:"shield",materialIconSize:"32px",onClick:()=>{window.open(k.privacy_link)}}),(0,t.jsx)("span",{className:"text-xs text-slate-600 text-center",children:A("customerInfo.privacy")})]}),k.imprint_link&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-1 min-w-[100px]",children:[(0,t.jsx)(b.MaterialIconButton,{name:"account_balance",materialIconSize:"32px",onClick:()=>{window.open(k.imprint_link)}}),(0,t.jsx)("span",{className:"text-xs text-slate-600 text-center",children:A("customerInfo.imprint")})]}),k.conditions_link&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-1 min-w-[100px]",children:[(0,t.jsx)(b.MaterialIconButton,{name:"policy",materialIconSize:"32px",onClick:()=>{window.open(k.conditions_link)}}),(0,t.jsx)("span",{className:"text-xs text-slate-600 text-center",children:A("customerInfo.conditions")})]})]})]})]})]})]})})})}],963291)},463587,e=>{"use strict";var t=e.i(243434),r=e.i(191788);e.s(["useCustomerTierConfig",0,function(){let[e,i]=(0,r.useState)(null),[a,s]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{let e=null,r=!1;return(async()=>{try{e=await t.default.subscribe(e=>{r||(i(e),s(!1))})}catch(e){console.warn("useCustomerTierConfig: subscribe failed",e),r||(i(null),s(!1))}})(),()=>{r=!0,e&&e()}},[]),{config:e,isLoading:a}}])},625516,e=>{"use strict";e.s(["evaluateCustomerTier",0,function(e,t){if(!t?.enabled||!t.tiers?.length)return null;let r=e.totalPayments??0,i=e.totalBookings??0,a=t.tiers.filter(e=>{let t=e.minTotalPayments??0,a=e.minTotalBookings??0;return r>=t&&i>=a});return 0===a.length?null:(a.sort((e,t)=>
1t.rank!==e.rank?t.rank-e.rank:(t.minTotalPayments??0)-(e.minTotalPayments??0)),a[0])}])},243434,806475,e=>{"use strict";e.i(581516);var t=e.i(310339),r=e.i(207742),i=e.i(742397),a=e.i(353533);let s=[{id:"silver",name:"Silver",color:"neutralsWaterloo",icon:"workspace_premium",rank:1,minTotalPayments:250},{id:"gold",name:"Gold",color:"goldenBell",icon:"workspace_premium",rank:2,minTotalPayments:1e3},{id:"platinum",name:"Platinum",color:"heroLavander",icon:"diamond",rank:3,minTotalPayments:2500,minTotalBookings:5}];e.s(["DEFAULT_CUSTOMER_TIERS",0,s],806475);let n={enabled:!1,tiers:s};e.s(["default",0,{async getConfig(e){let t=await (0,a.getDocRef)(i.COLLECTIONS.GENERAL.CUSTOMER_TIERS,void 0,e),s=await (0,r.getDoc)(t);if(!s.exists())return{...n};let o=s.data();return{enabled:o.enabled??!1,tiers:Array.isArray(o.tiers)?o.tiers:[]}},async saveConfig(e,s){let n=await (0,a.getDocRef)(i.COLLECTIONS.GENERAL.CUSTOMER_TIERS,void 0,s);await (0,r.setDoc)(n,{enabled:!!e.enabled,tiers:e.tiers??[],updatedAt:t.Timestamp.now()},{merge:!1})},async subscribe(e,t){let s=await (0,a.getDocRef)(i.COLLECTIONS.GENERAL.CUSTOMER_TIERS,void 0,t);return(0,r.onSnapshot)(s,t=>{if(!t.exists())return void e({...n});let r=t.data();e({enabled:r.enabled??!1,tiers:Array.isArray(r.tiers)?r.tiers:[]})})}}],243434)},857107,e=>{"use strict";var t=e.i(391398),r=e.i(463587),i=e.i(537857),a=e.i(191788),s=e.i(487728),n=e.i(169520),o=e.i(625516),l=e.i(606957),c=e.i(806475),u=e.i(441143);let d=e=>`€ ${Math.round(e).toLocaleString()}`,h=e=>{switch(e){case"goldenBell":case"gold":return{chipColor:"goldenBell",badgeGradient:"from-goldenBell-300 via-goldenBell-400 to-goldenBell-600",badgeRing:"ring-goldenBell-100",softBadge:"border-goldenBell-200 bg-goldenBell-50 text-goldenBell-700",iconColor:"goldenBell-700",progressBar:"bg-gradient-to-r from-goldenBell-300 to-goldenBell-500"};case"heroLavander":case"electricViolet":return{chipColor:"electricViolet"===e?"electricViolet":"heroLavander",badgeGradient:"from-heroLavander-300 via-heroLavander-500 to-heroLavander-700",badgeRing:"ring-heroLavander-100",softBadge:"border-heroLavander-200 bg-heroLavander-50 text-heroLavander-700",iconColor:"heroLavander-700",progressBar:"bg-gradient-to-r from-heroLavander-300 to-heroLavander-600"};case"pictionBlue":case"lochmara":return{chipColor:"pictionBlue",badgeGradient:"from-pictionBlue-300 via-pictionBlue-500 to-pictionBlue-700",badgeRing:"ring-pictionBlue-100",softBadge:"border-pictionBlue-200 bg-pictionBlue-50 text-pictionBlue-700",iconColor:"pictionBlue-700",progressBar:"bg-gradient-to-r from-pictionBlue-300 to-pictionBlue-600"};case"java":case"secondaryAquamarine":return{chipColor:"secondaryAquamarine"===e?"secondaryAquamarine":"java",badgeGradient:"from-java-300 via-java-500 to-java-700",badgeRing:"ring-java-100",softBadge:"border-java-200 bg-java-50 text-java-700",iconColor:"java-700",progressBar:"bg-gradient-to-r from-java-300 to-java-600"};case"malachite":return{chipColor:"malachite",badgeGradient:"from-malachite-300 via-malachite-500 to-malachite-700",badgeRing:"ring-malachite-100",softBadge:"border-malachite-200 bg-malachite-50 text-malachite-700",iconColor:"malachite-700",progressBar:"bg-gradient-to-r from-malachite-300 to-malachite-600"};case"frenchRose":case"pinkFlamingo":case"carnation":return{chipColor:"carnation"===e?"carnation":"pinkFlamingo",badgeGradient:"from-pinkFlamingo-300 via-pinkFlamingo-500 to-pinkFlamingo-700",badgeRing:"ring-pinkFlamingo-100",softBadge:"border-pinkFlamingo-200 bg-pinkFlamingo-50 text-pinkFlamingo-700",iconColor:"pinkFlamingo-700",progressBar:"bg-gradient-to-r from-pinkFlamingo-300 to-pinkFlamingo-600"};default:return{chipColor:"neutralsWaterloo",badgeGradient:"from-neutralsWaterloo-200 via-neutralsWaterloo-300 to-neutralsWaterloo-500",badgeRing:"ring-neutralsWaterloo-100",softBadge:"border-neutralsWaterloo-200 bg-white text-neutralsWaterloo-600",iconColor:"neutralsWaterloo-700",progressBar:"bg-gradient-to-r from-neutralsWaterloo-300 to-neutralsWaterloo-500"}}},p=e=>e?.icon??"workspace_premium",m=e=>e.trim().replace(/[_-]+/g," ").replace(/\b\w/g,e=>e.toUpperCase()),f=(e,t)=>{let r=t.trim();return r?e.find(e=>e.id===r)??null:null},g=({user:e,compact:g=!1,appearance:b="card"})=>{let y=(0,i.default)(),{config:v}=(0,r.useCustomerTierConfig)(),x=(0,l.useAuth)(e=>e.accessLevel??0)>=(0,u.getAccessLevelForRole)(u.Role.Office),w=e.crmStats?.totalPayments??e.userTotalPayments??0,k=e.crmStats?.totalBookings??e.userTotalBookings??0,C=0;try{C=e.getAccessLevel()}catch{C=0}let P=!C||C<2,j=(0,a.useMemo)(()=>{var t;if(!P)return null;let r=!!(v?.enabled&&v.tiers?.length),i=[...r&&v?.tiers?v.tiers:c.DEFAULT_CUSTOMER_TIERS].sort((e,t)=>
1e.rank-t.rank),a=(t=e.customerTierSnapshot)?{id:t.id,name:t.name,color:t.color,icon:t.icon,rank:t.rank}:null,s=e.customerTierManual?.trim()??null,n=s?f(i,s)??(a?.id===s?a:null)??{id:s,name:m(s),color:"heroLavander",icon:"workspace_premium",rank:Number.MAX_SAFE_INTEGER}:null,l=v?.enabled&&v.tiers?.length?(0,o.evaluateCustomerTier)({totalPayments:w,totalBookings:k},v):null,u=e.customerTierId?f(i,e.customerTierId):null,d=l??u??a??null,h=n??d??null;if(!r&&!h)return null;let p=h?.rank??-1/0;return{current:h,next:r?i.find(e=>{if(e.rank<=p)return!1;let t=e.minTotalPayments??0,r=e.minTotalBookings??0;return w<t||k<r})??null:null,possibleTiers:r?i.filter(e=>e.rank>p):[],isManual:!!n,manualTierName:n?.name??null,calculatedTierName:d?.name??(e.customerTierId?m(e.customerTierId):null)}},[v,P,k,w,e.customerTierId,e.customerTierManual,e.customerTierSnapshot]);if(!j)return null;let{current:N,next:S,possibleTiers:T,isManual:I,manualTierName:A,calculatedTierName:E}=j,R=N??S,O=h(R?.color),L=h(S?.color),_=S?.minTotalPayments??0,M=S?.minTotalBookings??0,D=S?Math.max(0,_-w):0,U=S?Math.max(0,M-k):0,B=_>0?Math.min(100,Math.max(0,(_-D)/_*100)):100,W=y(1===U?"profile.customerTier.bookingLeft":"profile.customerTier.bookingsLeft"),F=U<=0?y("profile.customerTier.requirementMet"):W.replace("{count}",String(U)),V=N?.name??y("profile.customerTier.noTierYet"),z="editorial"===b;return(0,t.jsxs)("div",{className:`overflow-hidden border ${z?"rounded-sm border-neutralsWaterloo-200 bg-white p-4 shadow-sm":`border-white/80 bg-gradient-to-b from-white/95 to-neutralsWaterloo-50/80 backdrop-blur-xl ${g?"rounded-[28px] p-3.5":"rounded-2xl p-4"}`}`,style:z?void 0:{boxShadow:"0 18px 40px rgba(58,56,82,0.12), inset 0 1px 0 rgba(255,255,255,0.92)"},children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,t.jsxs)("div",{className:`relative flex shrink-0 items-center justify-center rounded-full ${z?`h-12 w-12 ${O.softBadge}`:`bg-gradient-to-b ${O.badgeGradient} ${O.badgeRing} ${g?"h-14 w-14 ring-3":"h-16 w-16 ring-4"}`}`,style:z?void 0:{boxShadow:"0 12px 24px rgba(58,56,82,0.18), inset 0 1px 0 rgba(255,255,255,0.45), inset 0 -6px 18px rgba(0,0,0,0.14)"},children:[!z&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"absolute inset-2 rounded-full border border-white/45 bg-white/10"}),(0,t.jsx)("div",{className:`absolute rounded-full bg-white/70 ${g?"inset-[15px]":"inset-[18px]"}`})]}),(0,t.jsx)(n.default,{name:p(R),size:g?"22px":"25px",color:O.iconColor,filled:!0,className:"relative z-10"})]}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"text-xs font-semibold text-neutralsWaterloo-500",children:y("profile.customerTier.title")}),(0,t.jsx)("h2",{className:`mt-0.5 truncate font-bold leading-tight text-neutralsWaterloo-900 ${g?"text-base":"text-lg"}`,children:V}),S?(0,t.jsx)("p",{className:"mt-1 truncate text-xs text-neutralsWaterloo-500",children:y("profile.customerTier.toTier").replace("{tier}",S.name)}):(0,t.jsx)("p",{className:"mt-1 truncate text-xs text-malachite-700",children:y("profile.customerTier.topTierReached")}),x&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-2 text-[11px]",children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full border border-neutralsWaterloo-200 bg-white/70 px-2 py-0.5 text-neutralsWaterloo-600",children:[(0,t.jsx)(n.default,{name:"tune",size:"12px",color:"neutralsWaterloo-600"}),y("profile.customerTier.setTierLabel"),": ",(0,t.jsx)("strong",{className:"text-neutralsWaterloo-800",children:A??y("profile.customerTier.autoTier")})]})}),(0,t.jsxs)("p",{className:"mt-1.5 flex items-center gap-1.5 text-[11px] text-neutralsWaterloo-500",children:[(0,t.jsx)(n.default,{name:"info",size:"12px",color:"neutralsWaterloo-500"}),(0,t.jsxs)("span",{children:[y("profile.customerTier.calculatedTierLabel"),": ",(0,t.jsx)("strong",{className:"font-semibold text-neutralsWaterloo-700",children:E??y("profile.customerTier.noTierYet")})]})]})]})]})]}),N?(0,t.jsx)(s.default,{color:O.chipColor,variant:"flat",size:"sm",icon:p(N),children:(0,t.jsxs)("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[N.name,I&&(0,t.jsx)(n.default,{name:"lock",size:"10px",color:"neutralsWaterloo-500"})]})}):null]}),S?(0,t.jsxs)("div",{className:z?"mt-4 border-t border-neutralsWaterloo-200 pt-3":`rounded-2xl border border-white/80 bg-white/70 ${g?"mt-3 p-2.5":"mt-4 p-3"}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"text-xs font-semibold text-neutralsWaterloo-500",children:y("profile.customerTier.nextTier")}),(0,t.jsxs)("div",{className:"mt-1 flex min-w-0 items-center gap-2",children:[(0,t.jsx)("span",{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-full border ${L.softBadge}`,children:(0,t.jsx)(n.default,{name:p(S),size:"16px",color:L.iconColor,filled:!0})}),(0,t.jsx)("span",{className:"truncate text-sm font-bold text-neutralsWaterloo-900",children:S.name})]})]}),(0,t.jsxs)("div",{className:`shrink-0 text-right ${z?"":`rounded-xl border border-white/90 bg-gradient-to-b from-white to-neutralsWaterloo-50 ${g?"px-2.5 py-1.5":"px-3 py-2"}`}`,children:[(0,t.jsx)("span",{className:"block text-[11px] font-semibold text-neutralsWaterloo-500",children:y("profile.customerTier.remaining")}),(0,t.jsx)("span",{className:`block font-bold leading-tight text-neutralsWaterloo-900 ${g?"text-lg":"text-xl"}`,children:d(D)})]})]}),_>0&&(0,t.jsx)("div",{className:"mt-3 h-2 overflow-hidden rounded-full bg-neutralsWaterloo-100",children:(0,t.jsx)("div",{className:`h-full rounded-full ${z?"bg-bookingPrimary-600":L.progressBar}`,style:{width:`${B}%`}})}),(0,t.jsxs)("div",{className:`grid grid-cols-2 ${z?"mt-3 divide-x divide-neutralsWaterloo-200 border-t border-neutralsWaterloo-200":`gap-2 ${g?"mt-2.5":"mt-3"}`}`,children:[_>0&&(0,t.jsxs)("div",{className:z?"px-2.5 pb-0 pt-3":"rounded-xl border border-white/80 bg-gradient-to-b from-white to-neutralsWaterloo-50 px-3 py-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-[11px] font-semibold text-neutralsWaterloo-500",children:[(0,t.jsx)(n.default,{name:"payments",size:"14px",color:"neutralsWaterloo-500"}),y("profile.customerTier.remainingSpend")]}),(0,t.jsx)("p",{className:"mt-1 text-sm font-bold text-neutralsWaterloo-900",children:D<=0?y("profile.customerTier.requirementMet"):d(D)})]}),M>0&&(0,t.jsxs)("div",{className:z?"px-3 pb-0 pt-3":"rounded-xl border border-white/80 bg-gradient-to-b from-white to-neutralsWaterloo-50 px-3 py-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-[11px] font-semibold text-neutralsWaterloo-500",children:[(0,t.jsx)(n.default,{name:"event_available",size:"14px",color:"neutralsWaterloo-500"}),y("profile.customerTier.bookingProgress")]}),(0,t.jsx)("p",{className:"mt-1 text-sm font-bold leading-tight text-neutralsWaterloo-900",children:F})]})]})]}):N?(0,t.jsx)("div",{className:`mt-4 border border-malachite-100 bg-malachite-50/70 p-3 ${z?"rounded-none":"rounded-2xl"}`,children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"flex h-9 w-9 items-center justify-center rounded-full bg-white/80",children:(0,t.jsx)(n.default,{name:"emoji_events",size:"18px",color:"malachite-700",filled:!0})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"text-sm font-bold text-malachite-700",children:y("profile.customerTier.topTierReached")}),(0,t.jsx)("p",{className:"truncate text-xs text-malachite-700/80",children:y("profile.customerTier.noMoreTiers")})]})]})}):null,!g&&T.length>0&&(0,t.jsxs)("div",{className:`mt-4 border-t pt-3 ${z?"border-neutralsWaterloo-200":"border-white/80"}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-neutralsWaterloo-600",children:y("profile.customerTier.possibleTiers")}),(0,t.jsx)("span",{className:"text-right text-[11px] text-neutralsWaterloo-400",children:y("profile.customerTier.privacyNote")})]}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:T.map(e=>{let r=h(e.color),i=S?.id===e.id;return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-full border px-2 py-1 text-[10px] font-semibold ${i?r.softBadge:"border-neutralsWaterloo-200 bg-white/60 text-neutralsWaterloo-500"}`,children:[(0,t.jsx)(n.default,{name:p(e),size:"11px",color:i?r.iconColor:"neutralsWaterloo-500",filled:i}),e.name]},e.id)})})]})]})};e.s(["UserTierProgressCard",0,g,"default",0,g])},121062,e=>{"use strict";var t=e.i(391398),r=e.i(471830),i=e.i(844764),a=e.i(115237),s=e.i(203828),n=e.i(798979),o=e.i(191788),l=e.i(537857),c=e.i(7443),u=e.i(92890);e.i(916955);var d=e.i(864984);e.i(555040);var h=e.i(833085),p=e.i(857107),m=e.i(606957),f=e.i(433167);e.s(["default",0,({open:e,onClose:g})=>{let[b]=(0,m.useAuth)(e=>[e.user]),y=(0,l.default)(),[v,x]=(0,o.useState)(!1),[w,k]=(0,o.useState)(),[C,P]=(0,o.useState)(!1),j=(0,r.useConfig)(),N=(0,s.useRouter)();return((0,o.useEffect)(()=>{let t=async()=>
1{if(b?.user)if(x(await b.user.isCheckedIn()),await b.user.getLatestCheckInLog(!0),b.user.checkInLog){let e=b.user.checkInLog.checkIns[0].bookingId;e?k(await a.bookingService.getBookingById(e)):k(void 0)}else k(void 0)};e&&t()},[e,b?.user]),b&&b.fbUser&&b.user)?(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(f.Modal,{isOpen:e,onClose:g,children:(0,t.jsx)(f.ModalContent,{children:(0,t.jsxs)(f.ModalBody,{className:"w-full",children:[(0,t.jsx)("div",{className:"flex flex-wrap gap-2 items-start mb-2",children:v?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.TactileChip,{color:"pictionBlue",variant:"flat",icon:"verified",children:y("profile.checkInVerified")}),b.user.lockerNumber&&(0,t.jsx)(d.TactileChip,{color:"pictionBlue",variant:"flat",icon:"key",children:b.user.lockerNumber})]}):(0,t.jsx)(d.TactileChip,{color:"neutral",variant:"flat",icon:"home",children:y("profile.yourQRCode")})}),(0,t.jsx)("div",{className:"relative mx-auto w-fit my-2",children:C?(0,t.jsxs)("div",{className:"relative",style:{width:"220px",height:"220px"},children:[(0,t.jsx)("div",{className:"absolute inset-0 rounded-full flex items-center justify-center p-10 bg-white/70 backdrop-blur-xl border border-white/50",style:{boxShadow:"0 8px 32px rgba(111, 90, 238, 0.12), inset 0 1px 0 rgba(255,255,255,0.9)"},children:(0,t.jsx)(n.QRCodeSVG,{value:b.fbUser.uid,bgColor:"transparent",fgColor:"#1a1a2e",width:150,height:150})}),(0,t.jsx)("button",{className:"absolute -bottom-1 -right-1 rounded-full border-4 border-white shadow-lg transition-transform active:scale-95",onClick:()=>P(!1),children:(0,t.jsx)(i.Avatar,{src:b.user.getPhoto(),className:"w-16 h-16"})})]}):(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"rounded-full overflow-hidden",style:{boxShadow:"0 8px 32px rgba(0,0,0,0.12), inset 0 -2px 0 rgba(0,0,0,0.05)"},children:(0,t.jsx)(i.Avatar,{src:b.user.getPhoto(),className:"w-[220px] h-[220px]"})}),(0,t.jsx)("button",{className:"absolute -bottom-1 -right-1 rounded-full p-3 border-4 border-white bg-white/70 backdrop-blur-xl shadow-lg transition-transform active:scale-95",style:{boxShadow:"0 4px 16px rgba(111, 90, 238, 0.15), inset 0 1px 0 rgba(255,255,255,0.9)"},onClick:()=>P(!0),children:(0,t.jsx)(n.QRCodeSVG,{value:b.fbUser.uid,bgColor:"transparent",fgColor:"#1a1a2e",width:36,height:36})})]})}),(0,t.jsxs)("p",{className:"text-center text-2xl font-bold text-neutralsWaterloo-900 mt-3",children:[b.user.firstName," ",b.user.lastName]}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(p.UserTierProgressCard,{user:b.user,compact:!0})}),v?(0,t.jsxs)("div",{className:"text-center mt-3 mb-2",children:[(0,t.jsx)("p",{className:"text-xs text-neutralsWaterloo-500 mb-0.5",children:j.appConfig.company_name}),(0,t.jsxs)("p",{className:"text-sm font-medium text-neutralsWaterloo-700",children:[y("common.from")," ",b.user.checkindate," –"," ",b.user.checkoutdate]})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-3 mt-4 mb-2",children:[(0,t.jsx)(u.default,{color:"primary",icon:"how_to_reg",fullWidth:!0,pill:!0,onClick:()=>{g(),N.push(c.PAGES.CHECKIN)},children:y("profile.checkInNow")}),(0,t.jsx)(u.default,{color:"neutral",variant:"ghost",icon:"event_upcoming",fullWidth:!0,pill:!0,onClick:()=>{N.push(c.PAGES.BOOK)},children:y("profile.bookNow")})]}),w&&b.user.checkInLog&&(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(h.UnifiedBookingCard,{bookingId:w.docRef.id})})]})})})}):null}])},605246,e=>{"use strict";var t=e.i(485459);e.s(["TactileCoin",()=>t.default])},680759,e=>{"use strict";var t=e.i(391398),r=e.i(809629),i=e.i(168489),a=e.i(191788);let s=(0,i.default)(()=>e.A(514200),{loadableGenerated:{modules:[275231]},ssr:!1}),n=(0,a.createContext)(void 0);e.s(["MaterialProfileModalProvider",0,({children:e})=>{let[i,o]=(0,a.useState)(null),l=()=>o(null),c=async(e,t)=>{try{let i=await r.materialService.getMaterialById(e,t);i?o(i):console.error(`[MaterialProfileModal] material ${e} not found`)}catch(e){console.error("[MaterialProfileModal] failed to open material",e)}};return(0,t.jsxs)(n.Provider,{value:{openMaterialModal:c,closeMaterialModal:l,isOpen:null!==i},children:[e,i&&(0,t.jsx)(s,{material:i,open:!0,onClose:l})]})},"useMaterialProfileModal",0,()=>{let e=(0,a.useContext)(n);return e||(console.error("[MaterialProfileModal] useMaterialProfileModal called outside MaterialProfileModalProvider"),{openMaterialModal:async()=>{},closeMaterialModal:()=>{},isOpen:!1})}])},343707,e=>{"use strict";var t=e.i(7443);let r="__tfRetainedRecord",i={[t.PAGES.BOOKING_WORKSPACE]:t.PAGES.HUB,[t.PAGES.PAYROLL_WORKSPACE]:t.PAGES.PROFILE,[t.PAGES.PERSON_WORKSPACE]:t.PAGES.PEOPLE},a=null,s=new Set,n=new Set;function o(e,t){if(e.add(t),e.size<=64)return;let r=e.values().next();r.done||e.delete(r.value)}function l(e){return"string"==typeof e&&e.length>0&&e.length<=128}function c(e){if("string"!=typeof e||!e.startsWith("/")||e.startsWith("//")||e.includes("\\"))return null;try{let t=new URL(e,"https://tideforce.local");if("https://tideforce.local"!==t.origin)return null;return t.pathname}catch{return null}}function u(e){return e===t.PAGES.BOOKING_WORKSPACE||e===t.PAGES.PAYROLL_WORKSPACE||e===t.PAGES.PERSON_WORKSPACE}function d(){let e=window.history.state;return e&&"object"==typeof e&&!0===e.__N&&l(e.key)?e.key:null}function h(e){let t=window.history.state;if(!t||"object"!=typeof t)return null;let i=t[r];
1if(!i||"object"!=typeof i)return null;let a=c(t.as);return!0===t.__N&&l(t.key)&&1===i.version&&l(i.originHistoryKey)&&l(i.recordHistoryKey)&&i.originHistoryKey!==i.recordHistoryKey&&i.recordHistoryKey===t.key&&u(i.recordPathname)&&i.recordPathname===a&&(void 0===e||i.recordPathname===e)?i:null}e.s(["canReturnToRetainedRecord",0,function(e){let t;return null!==a&&(void 0===e||a===e)||!!(null!==(t=d())&&s.has(t))||null!==h(e)},"getHistoryEntryKey",0,d,"getRetainedRecordEntry",0,h,"getRetainedRecordFallback",0,function(e){return i[e]},"getRetainedRecordPathname",0,function(e){let t=c(e);return u(t)?t:null},"isRetainedRecordPathname",0,u,"markRetainedRecordEntry",0,function({originHistoryKey:e,recordHistoryKey:t,recordPathname:i}){if(!l(e)||!l(t)||e===t||!u(i))return!1;let a=window.history.state;if(!a||"object"!=typeof a||!0!==a.__N||a.key!==t||c(a.as)!==i)return!1;try{return window.history.replaceState({...a,[r]:{version:1,originHistoryKey:e,recordHistoryKey:t,recordPathname:i}},""),!0}catch{return!1}},"recordHistoryTransition",0,function(e,t){null===t||null===e||t===e||n.has(t)||o(s,t),null!==e&&o(n,e),null!==t&&o(n,t)},"setMountedRetainedRecordOrigin",0,function(e){a=e}])},296621,e=>{"use strict";var t=e.i(391398),r=e.i(191788);let i=(0,r.createContext)(void 0);e.s(["LevelCardProvider",0,({children:e})=>{let[a,s]=(0,r.useState)(void 0);return(0,t.jsx)(i.Provider,{value:{levelCards:a,setLevelCards:s},children:e})},"useLevelCards",0,()=>{let e=(0,r.useContext)(i);if(!e)throw Error("useLevelCards must be used within a LevelCardProvider");return e}])},745392,e=>{"use strict";let t=[50,100,200,300,400,500,600,700,800,900,950],r={lavender:{label:"Lavender",heroColor:"#6F5AEE",description:"Default purple theme"},stone:{label:"Stone",heroColor:"#8C8A94",description:"Elegant warm gray"},violet:{label:"Violet",heroColor:"#B71FFF",description:"Vibrant electric purple"},alpine:{label:"Alpine",heroColor:"#4B9CD3",description:"Mountain blue"},court:{label:"Court",heroColor:"#88B04B",description:"Sporty olive green"},midnight:{label:"Midnight",heroColor:"#3A4A6B",description:"Dark slate blue"},rose:{label:"Rosé",heroColor:"#C45B8A",description:"Soft pink"},teal:{label:"Teal",heroColor:"#1DBBBD",description:"Fresh teal/cyan"}};function i(e){let t=e.replace("#",""),r=3===t.length?t.split("").map(e=>e+e).join(""):t;return[parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16)]}function a(e,t,r){let i=Math.max(e/=255,t/=255,r/=255),a=Math.min(e,t,r),s=(i+a)/2,n=0,o=0;if(i!==a){let l=i-a;switch(o=s>.5?l/(2-i-a):l/(i+a),i){case e:n=((t-r)/l+6*(t<r))/6;break;case t:n=((r-e)/l+2)/6;break;case r:n=((e-t)/l+4)/6}}return[Math.round(360*n),Math.round(100*o),Math.round(100*s)]}function s(e,t,r){let i=(t/=100)*Math.min(r/=100,1-r),a=t=>{let a=(t+e/30)%12;return Math.round(255*(r-i*Math.max(Math.min(a-3,9-a,1),-1))).toString(16).padStart(2,"0")};return`#${a(0)}${a(8)}${a(4)}`}function n(e){let[t,r,n]=i(e),[o,l,c]=a(t,r,n),u={};for(let[e,{lightness:t,satMod:r}]of Object.entries({50:{lightness:97,satMod:-30},100:{lightness:93,satMod:-20},200:{lightness:86,satMod:-10},300:{lightness:74,satMod:-5},400:{lightness:62,satMod:0},500:{lightness:c,satMod:0},600:{lightness:Math.max(c-10,25),satMod:5},700:{lightness:Math.max(c-20,20),satMod:8},800:{lightness:Math.max(c-28,16),satMod:5},900:{lightness:Math.max(c-35,12),satMod:3},950:{lightness:Math.max(c-45,8),satMod:0}})){let i=Math.max(0,Math.min(100,l+r));u[Number(e)]=s(o,i,t)}return u}function o(e){let[t,r,a]=i(e);return`${t} ${r} ${a}`}function l(e){let[t,r,s]=i(e),[n,o,l]=a(t,r,s);return`${n} ${o}% ${l}%`}e.s(["DEFAULT_THEME",0,{preset:"lavender",heroColor:"#6F5AEE"},"THEME_PRESETS",0,r,"generatePalette",0,n,"generateTheme",0,function(e){let t=n(e),[r,o,l]=i(e),[c,u]=a(r,o,l);return{primary:t,surface:{base:s(c,Math.max(u-60,5),97),card:"#ffffff",elevated:"#ffffff"}}},"injectShopThemeVars",0,function(e,r=document.documentElement){for(let i of t)r.style.setProperty(`--shop-primary-${i}`,o(e.primary[i]));r.style.setProperty("--shop-surface-base",e.surface.base),r.style.setProperty("--shop-surface-card",e.surface.card),r.style.setProperty("--shop-surface-elevated",e.surface.elevated)},"injectThemeVars",0,function(e,r=document.documentElement){for(let[i,a]of Object.entries(function(e){let r={};for(let i of t){let t=e.primary[i];if(r[`--booking-primary-${i}`]=o(t),i<=900){let e=l(t);r[`--nextui-primary-${i}`]=e,r[`--heroui-primary-${i}`]=e}}let i=l(e.primary[500]);
1return r["--nextui-primary"]=i,r["--heroui-primary"]=i,r["--booking-surface-base"]=e.surface.base,r["--booking-surface-card"]=e.surface.card,r["--booking-surface-elevated"]=e.surface.elevated,r}(e)))r.style.setProperty(i,a)},"removeShopThemeVars",0,function(e=document.documentElement){for(let r of t)e.style.removeProperty(`--shop-primary-${r}`);e.style.removeProperty("--shop-surface-base"),e.style.removeProperty("--shop-surface-card"),e.style.removeProperty("--shop-surface-elevated")},"removeThemeVars",0,function(e=document.documentElement){for(let r of t)e.style.removeProperty(`--booking-primary-${r}`),r<=900&&(e.style.removeProperty(`--nextui-primary-${r}`),e.style.removeProperty(`--heroui-primary-${r}`));e.style.removeProperty("--nextui-primary"),e.style.removeProperty("--heroui-primary"),e.style.removeProperty("--booking-surface-base"),e.style.removeProperty("--booking-surface-card"),e.style.removeProperty("--booking-surface-elevated")},"resolveHeroColor",0,function(e){return"custom"!==e.preset&&r[e.preset]?r[e.preset].heroColor:e.heroColor}])},360988,e=>{"use strict";var t=e.i(981052),r=e.i(191788),i=e.i(745392);e.s(["useBookingTheme",0,function(){let[e,a]=(0,r.useState)(i.DEFAULT_THEME),[s,n]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e;return(async()=>{let r=t.default.getInstance();e=await r.subscribeToConfig(e=>{e?.bookingTheme&&a(t=>{let r=e.bookingTheme.preset||i.DEFAULT_THEME.preset,a=e.bookingTheme.heroColor||i.DEFAULT_THEME.heroColor;return t.preset===r&&t.heroColor===a?t:{preset:r,heroColor:a}}),n(!0)})})(),()=>e?.()},[]);let o=(0,r.useMemo)(()=>{let t=(0,i.resolveHeroColor)(e);return(0,i.generateTheme)(t)},[e]);return(0,r.useEffect)(()=>{(0,i.injectThemeVars)(o)},[o]),(0,r.useEffect)(()=>()=>{(0,i.removeThemeVars)()},[]),{theme:o,themeConfig:e,isLoaded:s}}])},263201,e=>{"use strict";var t=e.i(7443);let r=["activity","category","level"],i=["/book/product/","/book/shuttle/","/book/event/","/book/accommodation/","/book/camping/","/book/locker/","/book/voucher/"],a=[`${t.default.BOOK_SHOP}/equipment/`,`${t.default.BOOK_SHOP}/merch/`,`${t.default.SHOP}/equipment/`,`${t.default.SHOP}/merch/`];e.s(["getLocationSwitchReloadHref",0,e=>{let s=new URL(e,"https://tideforce.local"),n=(e=>{let r=((e.split("#")[0]??"").split("?")[0]??"").replace(/\/+$/,"")||"/";return a.some(e=>r.startsWith(e))?t.default.BOOK_SHOP:r.startsWith(`${t.default.BOOK_GUIDEBOOK}/`)&&r!==t.default.BOOK_GUIDEBOOK?t.default.BOOK_GUIDEBOOK:"/book/rental"===r||r.startsWith("/book/rental/")||i.some(e=>r.startsWith(e))?t.default.BOOK:null})(`${s.pathname}${s.search}${s.hash}`);return n||(r.forEach(e=>{s.searchParams.delete(e)}),`${s.pathname}${s.search}${s.hash}`)}])},372024,e=>{"use strict";var t=e.i(391398),r=e.i(537857),i=e.i(117327),a=e.i(191788),s=e.i(169520),n=e.i(621565),o=e.i(263201),l=e.i(454765),c=e.i(606957),u=e.i(596945),d=e.i(686092),h=e.i(353533),p=e.i(245246);e.s(["default",0,({className:e,variant:m="default",setGlobalLocationOnSwitch:f=!0,allowAllLocationsSelection:g=!1,defaultSelectedLocation:b,onLocationSwitch:y,textColor:v,iconColor:x,isHighlighted:w=!1})=>{if(g&&f)throw Error("If you enable allowAllLocationsSelection the setGlobalLocationOnSwitch should be disabled");if(!f&&!y)throw Error("If you disable setGlobalLocationOnSwitch you should provide a onLocationSwitch method");let[k,C]=(0,a.useState)(g?["All"]:[]),[P,j]=(0,a.useState)(new Set),[N,S]=(0,a.useState)(new Map),[T,I]=(0,a.useState)(""),A=(0,c.useAuth)(e=>e.user?.fbUser??null),E=(0,c.useAuth)(e=>e.userFetched),R=(0,r.default)(),O=(0,d.useSettings)(e=>e.locale),L="headerCompact"===m,_=v||"text-white";(0,a.useEffect)(()=>{if(!E)return;let e=!0;return(async()=>{try{let t=await (0,h.getAvailableLocationsForCurrentUser)();g&&(t=[...t,"All"]);let r=await i.locationService.getAllLocations(),a=b||await (0,h.getLocation)();e&&(C(t),j(new Set(r.filter(e=>e.restrictedToOffice).map(e=>e.id))),S(new Map(r.map(e=>[e.id,e]))),I(a))}catch(e){console.error("Error fetching locations:",e)}})(),()=>{e=!1}},[g,A,b,E]);let M=async e=>{if(T&&T!==e&&"All"!==e){let e=u.useBookingCart.getState(),t=e.items.filter(e=>"shopProduct"!==e.type);if(t.length>0){if(!window.confirm(R("shop.cartLocationSwitchWarning")))return;t.forEach(t=>e.removeItem(t.id))}}I(e),y&&y(e),f&&(await (0,h.switchLocation)(e),window.location.href=(0,o.getL
1ocationSwitchReloadHref)(window.location.href))},D=e=>"All"===e?R("common.allLocations"):(0,p.getLocalizedText)(N.get(e)?.displayName,O)||e,U=e=>"All"===e?"ALL":(0,l.getLocationAbbreviation)(e),B=b||T;if(k.length<=1)return null;let W="text-white"===_||_.includes("white");return(0,t.jsx)("div",{className:`${"glassy"===m?w?"flex h-9 items-center rounded-xl border-2 border-bookingPrimary-400 px-3 shadow-2xl":W?"flex h-9 items-center rounded-xl border border-neutralsWaterloo-200/80 bg-white/75 px-3 shadow-xl backdrop-blur-xl transition-all hover:bg-white/90":"flex h-9 items-center rounded-xl border border-white/20 bg-black/40 px-3 shadow-xl backdrop-blur-xl transition-all hover:bg-black/50":""} ${e??""}`,style:"glassy"===m?{color:w?"#000000":W?"#111827":"#ffffff"}:void 0,children:(0,t.jsx)(n.Select,{"aria-label":"Select location",className:"header"===m?"!w-auto !min-w-max !max-w-none flex-none":void 0,selectedKeys:b?[b]:T?[T]:[],startContent:L?void 0:(0,t.jsx)(s.default,{name:"location_on",size:"20px",color:"glassy"===m?w||W?"black":"white":"bookingPrimary-600"}),renderValue:L?e=>(0,t.jsx)("div",{className:"flex w-full items-center justify-center",children:e.map(e=>{let r=e.key?.toString()??"";return(0,t.jsx)("span",{className:"text-[9px] font-bold uppercase leading-none text-bookingPrimary-600",children:U(r)},r||"location")})}):"header"===m?e=>(0,t.jsx)("div",{className:"flex min-w-max items-center overflow-visible",children:e.map(e=>{let r=e.key?.toString()??"";return(0,t.jsx)("span",{className:"whitespace-nowrap text-sm font-bold text-neutralsWaterloo-900",children:D(r)},r||"location")})}):void 0,onChange:e=>M(e.target.value),size:"sm",classNames:"glassy"===m?{trigger:"bg-transparent border-0 shadow-none h-6 min-h-0 text-sm font-medium transition-colors duration-300 [&>span]:transition-colors [&>span]:duration-300",value:"transition-colors duration-300 [&]:!text-current font-semibold",innerWrapper:"transition-colors duration-300",selectorIcon:"transition-colors duration-300 [&]:!text-current",listbox:"bg-white text-neutralsWaterloo-900",listboxWrapper:"p-1",popoverContent:"min-w-56 rounded-2xl border border-neutralsWaterloo-200 bg-white p-1 shadow-xl shadow-neutralsWaterloo-300/30"}:"header"===m?{base:"!w-auto !min-w-max !max-w-none flex-none",mainWrapper:"!w-auto !min-w-max !max-w-none flex-none",trigger:"h-10 min-h-10 !w-auto !min-w-max !max-w-none rounded-full border border-neutralsWaterloo-200 bg-white/90 px-3 pr-9 text-neutralsWaterloo-900 shadow-sm shadow-neutralsWaterloo-200/40 backdrop-blur-md transition-all data-[hover=true]:border-bookingPrimary-200 data-[hover=true]:bg-white data-[open=true]:border-bookingPrimary-300 data-[open=true]:bg-white data-[open=true]:shadow-md data-[open=true]:shadow-neutralsWaterloo-200/60",value:"!w-auto !min-w-max !max-w-none !overflow-visible !text-clip !whitespace-nowrap text-sm font-bold text-neutralsWaterloo-900",innerWrapper:"!w-auto !min-w-max !max-w-none !overflow-visible gap-2.5",selectorIcon:"text-neutralsWaterloo-500",listboxWrapper:"p-1",listbox:"gap-1",popoverContent:"min-w-64 rounded-2xl border border-neutralsWaterloo-200 bg-white p-1 shadow-xl shadow-neutralsWaterloo-300/30"}:"headerCompact"===m?{base:"w-full min-w-0",trigger:"h-8 min-h-8 w-8 min-w-8 rounded-full border border-neutralsWaterloo-200 bg-white px-0 text-bookingPrimary-600 shadow-sm shadow-neutralsWaterloo-200/40 transition-colors data-[hover=true]:border-bookingPrimary-200 data-[hover=true]:bg-bookingPrimary-50 data-[open=true]:border-bookingPrimary-200 data-[open=true]:bg-bookingPrimary-50",value:"w-full text-center text-[9px] font-bold text-bookingPrimary-600",innerWrapper:"w-full justify-center",selectorIcon:"hidden",listboxWrapper:"p-1",listbox:"gap-1",popoverContent:"min-w-56 rounded-2xl border border-neutralsWaterloo-200 bg-white p-1 shadow-xl shadow-neutralsWaterloo-300/30"}:{trigger:"rounded-xl border border-neutralsWaterloo-200 bg-white/90 text-neutralsWaterloo-900 shadow-sm shadow-neutralsWaterloo-200/40 data-[hover=true]:border-bookingPrimary-200 data-[hover=true]:bg-white data-[open=true]:border-bookingPrimary-300",value:"font-semibold text-neutralsWaterloo-900",listboxWrapper:"p-1",listbox:"gap-1",popoverContent:"min-w-56 rounded-2xl border border-neutralsWaterloo-200 bg-white p-1 shadow-xl shadow-neutralsWaterloo-300/30"},popoverProps:{placement:"header"===m||"default"===m?"bottom-end":"bottom-start"},disallowEmptySelection:!0,children:k.map(e=>(0,t.jsx)(n.SelectItem,{value:e,textValue:D(e),className:"rounded-xl px-2 py-2 text-neutralsWaterloo-800 data-[hover=true]:bg-neutralsWaterloo-50 data-[selected=true]:bg-bookingPrimary-50 data-[selected=true]:text-bookingPrimary-800",children:(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[(0,t.jsx)("span",{className:`flex h-7 w-7 shrink-0 items-center justify-center rounded-full border text-[10px] font-bold uppercase leading-none ${e===B?"border-bookingPrimary-200 bg-bookingPrimary-50 text-bookingPrimary-700":"border-neutralsWaterloo-200 bg-neutralsWaterloo-50 text-neutralsWaterloo-600"}`,children:U(e)}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:D(e)}),P.has(e)&&(0,t.jsx)(s.default,{name:"lock",size:"14px",color:"goldenBell-600"}),e===B&&(0,t.jsx)(s.default,{name:"check_circle",size:"17px",color:"bookingPrimary-600"})]})},e))})})}])},948123,e=>{"use strict";var t=e.i(465235),r=e.i(271585),i=e.i(451415),a=class extends r.Removable{#M;#D;#c;constructor(e){super(),this.mutationId=e.mutationId,this.#D=e.mutationCache,this.#M=[],this.state=e.state||s(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#M.includes(e)||(this.#M.push(e),this.clearGcTimeout(),this.#D.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#M=this.#M.filter(t=>t!==e),this.scheduleGc(),this.#D.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#M.length||("pending"===this.state.status?this.scheduleGc():this.#D.remove(this))}continue(){return this.#c?.continue()??this.execute(this.state.variables)}async execute(e){this.#c=(0,i.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#h({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#h({type:"pause"})},onContinue:()=>{this.#h({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#D.canRun(this)});let t="pending"===this.state.status,r=!this.#c.canStart();try{if(!t){this.#h({type:"pending",variables:e,isPaused:r}),await this.#D.config.onMutate?.(e,this);let t=await this.options.onMutate?.(e);t!==this.state.context&&this.#h({type:"pending",context:t,variables:e,isPaused:r})}let i=await this.#c.start();return await this.#D.config.onSuccess?.(i,e,this.state.context,this),await this.options.onSuccess?.(i,e,this.state.context),await this.#D.config.onSettled?.(i,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(i,null,e,this.state.context),this.#h({type:"success",data:i}),i}catch(t){try{throw await this.#D.config.onError?.(t,e,this.state.context,this),await this.options.onError?.(t,e,this.state.context),await this.#D.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,t,e,this.state.context),t}finally{this.#h({type:"error",error:t})}}finally{this.#D.runNext(this)}}#h(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};
1case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),t.notifyManager.batch(()=>{this.#M.forEach(t=>{t.onMutationUpdate(e)}),this.#D.notify({mutation:this,type:"updated",action:e})})}};function s(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}e.s(["Mutation",0,a,"getDefaultState",0,s])},268325,e=>{"use strict";let t="bug-report-modal-root",r=async()=>{if("u"<typeof navigator||!navigator.mediaDevices?.getDisplayMedia)throw Error("Screen capture is not supported in this browser.");let e=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser"},audio:!1,preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude",systemAudio:"exclude",monitorTypeSurfaces:"include"}),[t]=e.getVideoTracks();if(!t)throw e.getTracks().forEach(e=>e.stop()),Error("No video track returned from screen capture.");try{let r=window.ImageCapture;if(r)try{let e=new r(t),i=await e.grabFrame(),a=document.createElement("canvas");a.width=i.width,a.height=i.height;let s=a.getContext("2d");if(!s)throw Error("Unable to acquire 2D canvas context.");return s.drawImage(i,0,0),i.close?.(),a.toDataURL("image/png")}catch(e){console.warn("[BugReport] ImageCapture.grabFrame failed, falling back to <video>:",e)}let i=document.createElement("video");i.muted=!0,i.playsInline=!0,i.srcObject=e,await new Promise((e,t)=>{let r=()=>{i.removeEventListener("loadedmetadata",r),i.removeEventListener("error",a),e()},a=()=>{i.removeEventListener("loadedmetadata",r),i.removeEventListener("error",a),t(Error("Failed to load capture stream into <video>."))};i.addEventListener("loadedmetadata",r),i.addEventListener("error",a)}),await i.play(),await new Promise(e=>window.requestAnimationFrame(()=>window.requestAnimationFrame(()=>e(null))));let a=i.videoWidth,s=i.videoHeight;if(!a||!s)throw Error("Capture stream has no dimensions.");let n=document.createElement("canvas");n.width=a,n.height=s;let o=n.getContext("2d");if(!o)throw Error("Unable to acquire 2D canvas context.");return o.drawImage(i,0,0,a,s),n.toDataURL("image/png")}finally{e.getTracks().forEach(e=>e.stop())}},i=async()=>{let r={cacheBust:!0,pixelRatio:1,skipFonts:!0,imagePlaceholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",fetchRequestInit:{mode:"no-cors"},filter:e=>{if(!(e instanceof HTMLElement))return!0;if(e.classList?.contains(t)||e.classList?.contains("Toastify"))return!1;let r=e.tagName?.toLowerCase();if("iframe"===r||"video"===r)return!1;if("img"===r){let t=e.getAttribute("src")??"";if(t&&!t.startsWith("data:")&&!t.startsWith("blob:")&&!t.startsWith(window.location.origin))return!1}return!0}},{toPng:i}=await e.A(996849);try{return await i(document.documentElement,r)}catch(e){return console.warn("[BugReport] DOM fallback on <html> failed, retrying body only:",e),await i(document.body,r)}},a=async()=>{if("u"<typeof document)throw Error("Screenshot capture is only available in the browser.");try{return await r()}catch(e){if(e instanceof Error&&("NotAllowedError"===e.name||"AbortError"===e.name||/permission|denied|cancel/i.test(e.message)))throw e;return console.warn("[BugReport] Real screen capture failed, falling back to DOM render:",e),await i()}},s=async e=>{try{let t=await a();e({initialCaptureAttempted:!0,initialScreenshotDataUrl:t,initialCaptureError:null})}catch(t){console.warn("[BugReport] Screenshot capture before opening failed:",t),e({initialCaptureAttempted:!0,initialScreenshotDataUrl:null,initialCaptureError:t instanceof Error?t.message:String(t)})}};e.s(["BUG_REPORT_MODAL_ROOT_CLASS",0,t,"captureBugReportScreenshot",0,a,"openBugReportWithCurrentScreenshot",0,s])},997840,e=>{"use strict";var t=e.i(7443);let r="tf.hub.booking-return.v1",i=`${r}:active`,a=`${r}:pending`,s="__tfHubReturnToken",n="__tfRetainedWorkspaceOrigin",o=/^[A-Za-z0-9_-]{8,128}$/,l=new Map,c=null,u=null;function d(e){return`${r}:snapshot:${e}`}function h(){try{return window.sessionStorage}catch{return null}}function p(e){return"string"==typeof e&&o.test(e)}function m(e){return"string"==typeof e&&e.length>0&&e.length<=128}function f(e){if("string"!=typeof e||!e.startsWith("/")||e.startsWith("//")||e.includes("\\"))return!1;try{let r=new URL(e,"https://tideforce.local");return"https://tideforce.local"===r.origin&&r.pathname===t.PAGES.BOOKING_WORKSPACE}catch{return!1}}function g(){let e=window.history.state;if(!e||"object"!=typeof e)return null;let t=e[n];if(!t||"object"!=typeof t||!0!==e.__N||!m(e.key)||!f(e.as)||1!==t.version||!m(t.originHistoryKey)||!m(t.workspaceHistoryKey)||t.originHistoryKey===t.workspaceHistoryKey||t.w
1orkspaceHistoryKey!==e.key||null!==t.hubReturnToken&&!p(t.hubReturnToken))return null;let r=new URL(e.as,"https://tideforce.local").searchParams.get("hubReturn");if(t.hubReturnToken!==r)return null;let i=e[s];return void 0!==i&&i!==t.hubReturnToken?null:t}function b(e){if("string"!=typeof e||!e.startsWith("/")||e.startsWith("//")||e.includes("\\"))return!1;try{let r=new URL(e,"https://tideforce.local");return"https://tideforce.local"===r.origin&&r.pathname===t.PAGES.HUB}catch{return!1}}function y(e){return"string"==typeof e&&e.length>0&&e.length<=1024}function v(e,t=2e3){return Array.isArray(e)&&e.length<=t&&e.every(y)}function x(e,t){var r;return!!e&&"object"==typeof e&&1===e.version&&p(e.token)&&(!t||e.token===t)&&"number"==typeof e.createdAt&&Number.isFinite(e.createdAt)&&e.createdAt<=Date.now()+6e4&&Date.now()-e.createdAt<=144e5&&b(e.returnPath)&&("bundles"===e.viewMode||"products"===e.viewMode)&&"boolean"==typeof e.showArchived&&"boolean"==typeof e.isCrossLocation&&v(e.selectedIds,1e4)&&y(e.tableConfigDocumentName)&&(null===e.tableNavigationState||!!(r=e.tableNavigationState)&&"object"==typeof r&&Array.isArray(r.sorting)&&r.sorting.length<=2e3&&r.sorting.every(e=>!!e&&"object"==typeof e&&y(e.id)&&"boolean"==typeof e.desc)&&Array.isArray(r.columnFilters)&&r.columnFilters.length<=2e3&&r.columnFilters.every(e=>!!e&&"object"==typeof e&&y(e.id)&&function e(t,r=0,i={remaining:2e3}){if(i.remaining--<=0||r>12)return!1;if(null===t||"boolean"==typeof t)return!0;if("number"==typeof t)return Number.isFinite(t);if("string"==typeof t)return t.length<=1e4;if(Array.isArray(t))return t.length<=2e3&&t.every(t=>e(t,r+1,i));if(!t||"object"!=typeof t)return!1;let a=Object.entries(t);return a.length<=2e3&&a.every(([t,a])=>t.length>0&&t.length<=1024&&e(a,r+1,i))}(e.value))&&"string"==typeof r.globalFilter&&r.globalFilter.length<=1e4&&!!(r.columnVisibility&&"object"==typeof r.columnVisibility&&!Array.isArray(r.columnVisibility)&&Object.keys(r.columnVisibility).length<=2e3&&Object.entries(r.columnVisibility).every(([e,t])=>y(e)&&"boolean"==typeof t))&&v(r.columnOrder)&&"number"==typeof r.frozenColumnsCount&&Number.isInteger(r.frozenColumnsCount)&&r.frozenColumnsCount>=0&&r.frozenColumnsCount<=3&&"number"==typeof r.scrollTop&&Number.isFinite(r.scrollTop)&&r.scrollTop>=0&&r.scrollTop<=5e6&&"number"==typeof r.scrollLeft&&Number.isFinite(r.scrollLeft)&&r.scrollLeft>=0&&r.scrollLeft<=5e6&&"number"==typeof r.loadedPageCount&&Number.isInteger(r.loadedPageCount)&&r.loadedPageCount>=1&&r.loadedPageCount<=200)}function w(e){if(!p(e))return null;let t=h();if(t)try{let r=t.getItem(d(e));if(r){if(r.length>512e3)return t.removeItem(d(e)),null;let i=JSON.parse(r);if(x(i,e))return i;t.removeItem(d(e))}}catch{}let r=l.get(e);return x(r,e)?r:(l.delete(e),null)}function k(e,t){let r=h();if(r)try{let t=r.getItem(e);if(p(t))return t}catch{}return p(t)?t:null}function C(e,t){let r=h();if(r)try{r.setItem(e,t)}catch{}e===i&&(c=t),e===a&&(u=t)}function P(e){let t=h();if(t)try{t.removeItem(e)}catch{}e===i&&(c=null),e===a&&(u=null)}function j(e){if(!p(e))return;let t=h();if(t)try{t.removeItem(d(e)),t.getItem(i)===e&&t.removeItem(i),t.getItem(a)===e&&t.removeItem(a)}catch{}l.delete(e),c===e&&(c=null),u===e&&(u=null)}e.s(["canReturnToRetainedWorkspace",0,function(){return null!==g()},"clearHubReturn",0,function(){let e=k(i,c),t=k(a,u);e&&j(e),t&&t!==e&&j(t),P(i),P(a)},"completeHubReturn",0,j,"createHubReturn",0,function(e){if(!b(e.returnPath))return null;let t=k(i,c);t&&j(t);let r="u">typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now().toString(36)}_${Math.random().toString(36).slice(2,14)}`,s={version:1,token:r,createdAt:Date.now(),returnPath:e.returnPath,viewMode:e.viewMode,showArchived:e.showArchived,isCrossLocation:e.isCrossLocation,selectedIds:[...e.selectedIds],tableConfigDocumentName:e.tableConfigDocumentName,tableNavigationState:e.tableNavigationState},n=h();if(n)try{n.setItem(d(r),JSON.stringify(s))}catch{}return l.set(r,s),C(i,r),P(a),r},"getRetainedWorkspaceEntry",0,function(){return g()},"getValidHubReturnToken",0,function(e){return p(e)?e:null},"markHubReturnEntry",0,function(e){if(!w(e))return!1;try{return window.history.replaceState({...window.history.state??{},[s]:e},""),!0}catch{return!1}},"markRetainedWorkspaceEntry",0,function({originHistoryKey:e,workspaceHistoryKey:t,hubReturnToken:r}){if(!m(e)||!m(t)||e===t||null!==r&&!p(r))return!1;let i=window.history.state;if(!i||"object"!=typeof i||!0!==i.__N||i.key!==t||!f(i.as)||new URL(i.as,"https://tideforce.local").searchParams.get("hubReturn")!==r||void 0!==i[s]&&i[s]!==r)return!1;try{return window.history.replaceState({...i,[n]:{version:1,originHistoryKey:e,workspaceHistoryKey:t,hubReturnToken:r}},""),!0}catch{return!1}},"peekHubReturn",0,function(e){let t=k(a,u),r=k(i,c),s=t??r;if(!s)return null;let n=w(s);return n?void 0===e||b(e)&&n.returnPath===e?{token:s,snapshot:n}:null:(j(s),null)},"prepareHubReturn",0,function(e){return!!window.history.state&&window.history.state[s]===e&&!!w(e)&&(C(a,e),C(i,e),!0)}])},37103,e=>{"use strict";var t=e.i(438696);e.s(["onAuthStateChanged",()=>t.z])},724660,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useRouter",{enumerable:!0,get:function(){return s}});let i=e.r(191788),a=e.r(425479);function s(){return(0,i.useContext)(a.RouterContext)}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},148888,(e,t,r)=>{t.exports=e.r(724660)},681299,e=>{"use strict";let t=(0,e.i(336770).create)(e=>({isOpen:!1,initialCaptureAttempted:!1,initialScreenshotDataUrl:null,initialCaptureError:null,initialRequestType:null,initialDescription:"",open:t=>e({isOpen:!0,initialCaptureAttempted:t?.initialCaptureAttempted??!1,initialScreenshotDataUrl:t?.initialScreenshotDataUrl??null,initialCaptureError:t?.initialCaptureError??null,initialRequestType:t?.initialRequestType??null,initialDescription:t?.initialDescription??""}),close:()=>e({isOpen:!1,initialCaptureAttempted:!1,initialScreenshotDataUrl:null,initialCaptureError:null,initialRequestType:null,initialDescription:""})}));e.s(["useBugReport",0,t])},351728,e=>{"use strict";var t=e.i(284839),r=e.i(336770),i=e.i(196258);let a=(0,r.create)(e=>(t.analyticsService.subscribe(t=>e(t)),{consentState:"pending",consentPreferences:{...i.DEFAULT_CONSENT_PREFERENCES},isInitialized:!1,activeProviders:[],locationConfig:{},setConsentState:t=>e({consentState:t}),setConsentPreferences:t=>e({consentPreferences:t}),setInitialized:t=>e({isInitialized:t}),setActiveProviders:t=>e({activeProviders:t}),setLocationConfig:t=>e({locationConfig:t})}));e.s(["useAnalyticsStore",0,a])},782173,e=>{"use strict";var t=e.i(391398),r=e.i(168489),i=e.i(191788);let a=(0,r.default)(()=>e.A(621638).then(e=>
1e.BundleDetailsModal),{loadableGenerated:{modules:[305710]},ssr:!1}),s=(0,i.createContext)(void 0);e.s(["BundleProfileModalProvider",0,({children:e})=>{let[r,n]=(0,i.useState)(null),[o,l]=(0,i.useState)(),c=()=>{n(null),l(void 0)};return(0,t.jsxs)(s.Provider,{value:{openBundleModal:(e,t)=>{n(e),l(t)},closeBundleModal:c,isOpen:null!==r,bundleId:r,locationId:o},children:[e,r&&(0,t.jsx)(a,{bundleId:r,locationId:o,isOpen:!0,onClose:c})]})},"useBundleProfileModal",0,()=>{let e=(0,i.useContext)(s);return e||(console.error("[BundleProfileModal] useBundleProfileModal called outside BundleProfileModalProvider"),{openBundleModal:()=>{},closeBundleModal:()=>{},isOpen:!1,bundleId:null,locationId:void 0})}])},27006,e=>{"use strict";var t=e.i(391398),r=e.i(660333),i=e.i(537857),a=e.i(191788),s=e.i(169520),n=e.i(686092),o=e.i(353533);let l=[{value:r.Systemlanguage.En,label:"English"},{value:r.Systemlanguage.De,label:"Deutsch"},{value:r.Systemlanguage.It,label:"Italiano"}];e.s(["default",0,({className:e,menuPlacement:c="top"})=>{let u=(0,i.default)(),d=(0,a.useRef)(null),[h,p]=(0,a.useState)(!1),[m,f]=(0,a.useState)(!1),g=(0,n.useSettings)(e=>e.locale),b=(0,n.useSettings)(e=>e.setLocale),y=m?g:r.Systemlanguage.En,v=l.find(e=>e.value===y)??l[0];return(0,a.useEffect)(()=>{f(!0)},[]),(0,a.useEffect)(()=>{if(!h)return;let e=e=>{e.target instanceof Node&&!d.current?.contains(e.target)&&p(!1)},t=e=>{"Escape"===e.key&&p(!1)};return window.addEventListener("pointerdown",e),window.addEventListener("keydown",t),()=>{window.removeEventListener("pointerdown",e),window.removeEventListener("keydown",t)}},[h]),(0,t.jsxs)("div",{ref:d,className:(0,o.cn)("relative inline-flex",e),children:[(0,t.jsxs)("button",{type:"button","aria-label":u("common.chooseLanguage"),"aria-haspopup":"listbox","aria-expanded":h,onClick:()=>p(e=>!e),className:"inline-flex h-10 items-center gap-2 rounded-full border border-neutralsWaterloo-200 bg-white px-3 text-sm font-semibold text-black shadow-sm transition-colors duration-200 hover:border-neutralsWaterloo-400 focus:outline-none focus:ring-2 focus:ring-black focus:ring-offset-2",children:[(0,t.jsx)(s.default,{name:"language",size:"18px",color:"black"}),(0,t.jsx)("span",{children:v.label}),(0,t.jsx)(s.default,{name:"keyboard_arrow_down",size:"18px",color:"black",className:(0,o.cn)("transition-transform duration-200",h&&"rotate-180")})]}),h&&(0,t.jsx)("div",{role:"listbox","aria-label":u("common.language"),className:(0,o.cn)("absolute left-1/2 z-50 w-44 -translate-x-1/2 rounded-[5px] border border-neutralsWaterloo-200 bg-white p-1 shadow-lg","top"===c?"bottom-full mb-2":"top-full mt-2"),children:l.map(e=>{let r=e.value===y;return(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":r,onClick:()=>{b(e.value),p(!1)},className:(0,o.cn)("flex w-full items-center justify-between rounded-[4px] px-3 py-2 text-left text-sm font-semibold transition-colors duration-150 hover:bg-neutralsWaterloo-50 focus:bg-neutralsWaterloo-50 focus:outline-none",r?"text-black":"text-neutralsWaterloo-700"),children:[(0,t.jsx)("span",{children:e.label}),r&&(0,t.jsx)(s.default,{name:"check",size:"16px",color:"black"})]},e.value)})})]})}])},17190,e=>{"use strict";var t=e.i(391398),r=e.i(660333),i=e.i(537857),a=e.i(191788),s=e.i(169520),n=e.i(433167);let o={[r.Systemlanguage.En]:{label:"English"},[r.Systemlanguage.De]:{label:"Deutsch"},[r.Systemlanguage.It]:{label:"Italiano"}};e.s(["default",0,function({isOpen:e,onClose:r,currentLocale:l,onLocaleChange:c,locations:u,currentLocation:d,onLocationChange:h}){let p=(0,i.default)(),m=u.length>1,[f,g]=(0,a.useState)(m?"location":"language");(0,a.useEffect)(()=>{e&&g(m?"location":"language")},[e,m]);let b=[...m?[{key:"location",label:p("common.location"),icon:"location_on"}]:[],{key:"language",label:p("common.language"),icon:"translate"}];return(0,t.jsx)(n.Modal,{isOpen:e,onClose:r,size:"2xl",scrollBehavior:"inside",classNames:{base:"rounded-2xl shadow-xl",header:"pb-0 pt-5 px-6",body:"px-6 pb-6 pt-4",closeButton:"top-3 right-3 hover:bg-neutralsWaterloo-100 rounded-full transition-colors duration-200"},children:(0,t.jsxs)(n.ModalContent,{children:[(0,t.jsx)(n.ModalHeader,{className:"flex flex-col gap-0",children:(0,t.jsx)("div",{className:"flex gap-1 border-b border-neutralsWaterloo-200",children:b.map(e=>{let r=f===e.key;return(0,t.jsxs)("button",{onClick:()=>g(e.key),className:`relative flex items-center gap-2 px-4 py-3 text-sm font-semibold transition-all duration-200 rounded-t-lg cursor-pointer ${r?"text-bookingPrimary-700":"text-neutralsWaterloo-400 hover:text-neutralsWaterloo-600 hover:bg-neutralsWaterloo-50"}`,children:[(0,t.jsx)(s.default,{name:e.icon,size:"18px",color:r?"bookingPrimary-600":"neutralsWaterloo-400"}),e.label,(0,t.jsx)("div",{className:`absolute bottom-0 left-2 right-2 h-0.5 rounded-full transition-all duration-300 ${r?"bg-bookingPrimary-500":"bg-transparent"}`})]},e.key)})})}),(0,t.jsxs)(n.ModalBody,{children:["language"===f&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm text-neutralsWaterloo-500 mb-4",children:p("common.chooseLanguage")}),(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:Object.entries(o).map(([e,{label:i}])=>{let a=l===e;return(0,t.jsxs)("button",{className:`group relative flex items-center gap-3 px-4 py-3.5 rounded-xl border text-left transition-all duration-200 cursor-pointer ${a?"border-bookingPrimary-400 bg-bookingPrimary-50/80 ring-1 ring-bookingPrimary-400 shadow-sm":"border-neutralsWaterloo-200 hover:border-neutralsWaterloo-300 hover:bg-neutralsWaterloo-50 hover:-translate-y-0.5 hover:shadow-md"}`,onClick:()=>{c(e),r()},children:[(0,t.jsx)("span",{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-lg ${a?"bg-bookingPrimary-100 text-bookingPrimary-700":"bg-neutralsWaterloo-100 text-neutralsWaterloo-600"}`,children:(0,t.jsx)(s.default,{name:"translate",size:"14px",className:"text-inherit"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-neutralsWaterloo-800 flex-1",children:i}),a&&(0,t.jsx)(s.default,{name:"check_circle",color:"bookingPrimary-500",size:"20px"})]},e)})})]}),"location"===f&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm text-neutralsWaterloo-500 mb-4",children:p("common.chooseLocation")}),(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:u.map(e=>{let i=d===e;return(0,t.jsxs)("button",{className:`group relative flex items-center gap-3 px-4 py-3.5 rounded-xl border text-left transition-all duration-200 cursor-pointer ${i?"border-bookingPrimary-400 bg-bookingPrimary-50/80 ring-1 ring-bookingPrimary-400 shadow-sm":"border-neutralsWaterloo-200 hover:border-neutralsWaterloo-300 hover:bg-neutralsWaterloo-50 hover:-translate-y-0.5 hover:shadow-md"}`,onClick:()=>{h(e),r()},children:[(0,t.jsx)("div",{className:`w-8 h-8 rounded-lg flex items-center justify-center transition-colors duration-200 ${i?"bg-bookingPrimary-100":"bg-neutralsWaterloo-100 group-hover:bg-neutralsWaterloo-150"}`,children:(0,t.jsx)(s.default,{name:"location_on",color:i?"bookingPrimary-600":"neutralsWaterloo-500",size:"18px"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-neutralsWaterloo-800 flex-1",children:e}),i&&(0,t.jsx)(s.default,{name:"check_circle",color:"bookingPrimary-500",size:"20px"})]},e)})})]})]})]})})}])},717253,e=>{"use strict";var t=e.i(391398),r=e.i(145246),i=e.i(331988),a=e.i(537857),s=e.i(191788),n=e.i(515736),o=e.i(994037),l=e.i(323669);let c=()=>(0,t.jsx)("div",{className:"flex items-center justify-center gap-2","aria-hidden":"true",children:[0,1,2].map(e=>(0,t.jsx)("span",{className:"h-2 w-2 rounded-full bg-black",style:{animation:"auth-loading-dot 1.2s ease-in-out infinite",animationDelay:`${140*e}ms`}},e))}),u=({isVisible:e})=>(0,t.jsxs)("div",{className:`jsx-719f35a515c70e6c absolute inset-0 z-50 flex flex-col items-center justify-center bg-white transition-opacity duration-500 ${e?"opacity-100":"pointer-events-none opacity-0"}`,children:[(0,t.jsx)(l.TideforceLogoAnchor,{className:"inline-flex",children:(0,t.jsx)("img",{src:"/assets/TIDEFORCE_WORDMARK_BLACK.svg",alt:"Tideforce",className:"jsx-719f35a515c70e6c h-8 w-auto max-w-[210px] object-contain"})}),(0,t.jsx)("div",{className:"jsx-719f35a515c70e6c mt-5",children:(0,t.jsx)(c,{})}),(0,t.jsx)(r.default,{id:"719f35a515c70e6c",children:"@keyframes auth-loading-dot{0%,to{opacity:.28;transform:translateY(0)}50%{opacity:1;transform:translateY(-4px)}}"})]});e.s(["default",0,({mobile:e=!1,forceLogoFallback:l=!1})=>{let d=(0,a.default)(),{companyName:h,companyLogoUrl:p,bookingBackgroun
1dImage:m,authShowcaseSlides:f,isLoaded:g}=(0,i.useAuthPresentationConfig)(),[b,y]=(0,s.useState)(!1),v=(0,s.useMemo)(()=>g?((e,t)=>{let r=[...e].filter(e=>e.enabled).sort((e,t)=>(e.order??0)-(t.order??0))[0];if(!r)return[];let i=[];return("image"===r.mediaMode||"gif"===r.mediaMode)&&r.mediaUrl&&i.push(r.mediaUrl),"bookingBackground"===r.backgroundMode&&i.push(t),"image"===r.backgroundMode&&r.backgroundImageUrl&&i.push(r.backgroundImageUrl),Array.from(new Set(i.filter(Boolean)))})(f,m):[],[f,m,g]);(0,s.useEffect)(()=>{if(y(!1),!g)return;if(0===v.length)return void y(!0);let e=!1,t=v.length,r=()=>{t-=1,!e&&t<=0&&y(!0)},i=window.setTimeout(()=>{e||y(!0)},2800);return v.forEach(e=>{let t=new Image;t.onload=r,t.onerror=r,t.src=e}),()=>{e=!0,window.clearTimeout(i)}},[v,g]);let x=l||!b;return e?(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex h-[100dvh] flex-col overflow-hidden bg-white",children:[(0,t.jsx)(u,{isVisible:x}),(0,t.jsx)("div",{className:"relative z-10 flex shrink-0 justify-center px-5 pt-[max(env(safe-area-inset-top),28px)]",children:(0,t.jsx)(n.default,{companyName:h,companyLogoUrl:p,align:"center",compact:!0})}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden px-4 py-6",children:(0,t.jsx)("div",{className:"h-full overflow-hidden rounded-[5px] border border-neutralsWaterloo-100 shadow-lg shadow-neutralsWaterloo-200/50",children:(0,t.jsx)(o.default,{slides:f,companyName:h,bookingBackgroundImage:m,variant:"loading",heightMode:"parent"})})}),(0,t.jsxs)("div",{className:"relative z-10 flex shrink-0 flex-col items-center gap-3 px-5 pb-[max(env(safe-area-inset-bottom),28px)] text-center",children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-neutralsWaterloo-600",children:d("common.Loading")}),(0,t.jsx)(c,{})]})]}):(0,t.jsxs)("div",{className:"jsx-a63a4f3753baa690 fixed inset-0 z-50 grid min-h-screen bg-white lg:grid-cols-[minmax(380px,0.82fr)_minmax(560px,1.18fr)]",children:[(0,t.jsx)(u,{isVisible:x}),(0,t.jsx)("main",{className:"jsx-a63a4f3753baa690 flex min-h-screen flex-col bg-white px-8 py-7 xl:px-16 xl:py-10",children:(0,t.jsxs)("div",{className:"jsx-a63a4f3753baa690 mx-auto flex w-full max-w-[440px] flex-1 flex-col justify-center py-10",children:[(0,t.jsx)(n.default,{companyName:h,companyLogoUrl:p,className:"mb-10"}),(0,t.jsxs)("div",{className:"jsx-a63a4f3753baa690 space-y-4",children:[(0,t.jsx)("h1",{className:"jsx-a63a4f3753baa690 text-[30px] font-extrabold leading-tight tracking-normal text-black",children:d("common.Loading")}),(0,t.jsx)("div",{className:"jsx-a63a4f3753baa690 h-1.5 w-32 overflow-hidden rounded-full bg-neutralsWaterloo-100",children:(0,t.jsx)("span",{className:"jsx-a63a4f3753baa690 block h-full w-1/2 roun
1ded-full bg-black auth-loading-bar"})})]})]})}),(0,t.jsx)("aside",{className:"jsx-a63a4f3753baa690 hidden min-h-screen overflow-hidden lg:block",children:(0,t.jsx)(o.default,{slides:f,companyName:h,bookingBackgroundImage:m,variant:"loading",heightMode:"parent"})}),(0,t.jsx)(r.default,{id:"a63a4f3753baa690",children:"@keyframes auth-loading-bar{0%{transform:translate(-120%)}to{transform:translate(240%)}}.auth-loading-bar{animation:1.45s ease-in-out infinite auth-loading-bar}"})]})}])},718310,e=>{"use strict";var t=e.i(391398),r=e.i(471830),i=e.i(387818),a=e.i(313219),s=e.i(505817),n=e.i(191788),o=e.i(477507),l=e.i(537857),c=e.i(92890),u=e.i(169520),d=e.i(67098),h=e.i(433167),p=e.i(7443),m=e.i(662091),f=e.i(353533);let g=()=>{let e=(0,l.default)(),{appConfig:g}=(0,r.useConfig)(),{language:b,tenantDefaultLanguage:y,setLanguage:v}=(0,a.usePublicLinkLanguage)(),x=(0,s.useHasShopContent)(),w=(0,i.useHasGuidebookContent)(),[k,C]=(0,n.useState)(null),[P,j]=(0,n.useState)("");(0,n.useEffect)(()=>{let e=!1;return(0,f.getLocation)().then(t=>{e||j(t||"")}).catch(()=>{}),()=>{e=!0}},[]);let N=(0,n.useMemo)(()=>{let t=window.location.origin,r=(g?.tennantLink||"").replace(/\/+$/,""),i=t||r,a=P?`?location=${encodeURIComponent(P)}`:"",s=e=>(0,m.withPublicLinkLanguage)(`${i}${e}${a}`,b,y);return[{key:"register",title:e("profile.shareLinks.registerTitle"),description:e("profile.shareLinks.registerDesc"),url:s(p.default.REGISTER),icon:"person_add"},{key:"checkin",title:e("profile.shareLinks.checkinTitle"),description:e("profile.shareLinks.checkinDesc"),url:s(p.default.CHECKIN),icon:"how_to_reg"},{key:"booking",title:e("profile.shareLinks.bookingTitle"),description:e("profile.shareLinks.bookingDesc"),url:s(p.default.BOOK),icon:"calendar_add_on"},...x?[{key:"shop",title:e("profile.shareLinks.shopTitle"),description:e("profile.shareLinks.shopDesc"),url:s(p.default.BOOK_SHOP),icon:"shopping_cart"}]:[],...w?[{key:"guidebook",title:e("profile.shareLinks.guidebookTitle"),description:e("profile.shareLinks.guidebookDesc"),url:s(p.default.BOOK_GUIDEBOOK),icon:"menu_book"}]:[]]},[e,g?.tennantLink,b,P,y,x,w]),S=async t=>{try{await navigator.clipboard.writeText(t.url),C(t.key),o.toast.success(e("profile.shareLinks.copied")),setTimeout(()=>C(e=>e===t.key?null:e),2e3)}catch(t){console.error("Clipboard write failed",t),o.toast.error(e("profile.shareLinks.copyFailed"))}},T=async e=>{if("u">typeof navigator&&navigator.share)try{await navigator.share({title:e.title,text:e.description,url:e.url});return}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;console.error("Web Share failed",e)}await S(e)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(h.ModalHeader,{className:"flex flex-col gap-1 pb-1",children:[(0,t.jsx)("span",{className:"text-lg font-semibold text-neutralsWaterloo-900",children:e("profile.shareLinks.title")}),(0,t.jsx)("span",{className:"text-xs font-normal text-neutralsWaterloo-500",children:e("profile.shareLinks.subtitle")})]}),(0,t.jsxs)(h.ModalBody,{className:"pb-6 pt-2 flex flex-col gap-3",children:[(0,t.jsx)(d.default,{value:b,onChange:v,compact:!0,className:"rounded-xl border border-neutralsWaterloo-200 bg-neutralsWaterloo-50 p-3"}),(0,t.jsx)("ul",{className:"rounded-2xl border border-neutralsWaterloo-100 divide-y divide-neutralsWaterloo-100 bg-white",children:N.map(r=>{let i=k===r.key;return(0,t.jsxs)("li",{className:"flex items-center gap-3 p-2.5",children:[(0,t.jsx)("div",{className:"w-9 h-9 rounded-xl bg-bookingPrimary-50 flex items-center justify-center flex-shrink-0",children:(0,t.jsx)(u.default,{name:r.icon,color:"bookingPrimary-600",size:"20px"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-neutralsWaterloo-900 truncate",children:r.title}),(0,t.jsx)("p",{className:"text-xs text-neutralsWaterloo-500 truncate",children:r.description}),(0,t.jsx)("p",{className:"text-[11px] font-mono text-neutralsWaterloo-400 truncate mt-0.5",children:r.url.replace(/^https?:\/\//,"")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0",children:[(0,t.jsx)(c.TactileIconButton,{icon:i?"check":"content_copy",color:i?"success":"neutral",variant:"ghost",size:"lg",ariaLabel:`${i?e("profile.shareLinks.copied"):e("profile.shareLinks.copy")}: ${r.title}`,onClick:()=>S(r)}),(0,t.jsx)(c.TactileIconButton,{icon:"ios_share",color:"primary",variant:"solid",size:"lg",ariaLabel:`${e("profile.shareLinks.share")}: ${r.title}`,onClick:()=>T(r)})]})]},r.key)})})]})]})};e.s(["default",0,({open:e,onClose:r})=>(0,t.jsx)(h.Modal,{isOpen:e,onClose:r,placement:"center",backdrop:"opaque",scrollBehavior:"inside",classNames:{base:"mx-4 my-4 max-h-[88dvh]"},children:(0,t.jsx)(h.ModalContent,{children:(0,t.jsx)(g,{})})})])},791205,e=>{"use strict";var t=e.i(391398);e.i(966098),e.i(599367);var r=e.i(168750),i=(0,e.i(283524).tv)({slots:{base:["px-1.5","py-0.5","inline-flex","
1space-x-0.5","rtl:space-x-reverse","items-center","font-sans","font-normal","text-center","text-small","shadow-small","bg-default-100","text-foreground-600","rounded-small"],abbr:"no-underline",content:""},variants:{},defaultVariants:{}}),a=e.i(915560),s=e.i(77453),n=e.i(191788),o={command:"⌘",shift:"⇧",ctrl:"⌃",option:"⌥",enter:"↵",delete:"⌫",escape:"⎋",tab:"⇥",capslock:"⇪",up:"↑",right:"→",down:"↓",left:"←",pageup:"⇞",pagedown:"⇟",home:"↖",end:"↘",help:"?",space:"␣"},l={command:"Command",shift:"Shift",ctrl:"Control",option:"Option",enter:"Enter",delete:"Delete",escape:"Escape",tab:"Tab",capslock:"Caps Lock",up:"Up",right:"Right",down:"Down",left:"Left",pageup:"Page Up",pagedown:"Page Down",home:"Home",end:"End",help:"Help",space:"Space"};(0,r.forwardRef)((e,c)=>{let{Component:u,children:d,slots:h,classNames:p,keysToRender:m,getKbdProps:f}=function(e){let[t,o]=(0,r.mapPropsVariants)(e,i.variantKeys),{as:l,children:c,className:u,keys:d,title:h,classNames:p,...m}=t,f=(0,n.useMemo)(()=>i({...o}),[(0,s.objectToDeps)(o)]),g=(0,a.clsx)(null==p?void 0:p.base,u);return{Component:l||"kbd",slots:f,classNames:p,title:h,children:c,keysToRender:"string"==typeof d?[d]:Array.isArray(d)?d:[],getKbdProps:(e={})=>({...m,...e,className:(0,a.clsx)(f.base({class:(0,a.clsx)(g,e.className)}))})}}({...e}),g=(0,n.useMemo)(()=>m.map(e=>(0,t.jsx)("abbr",{className:h.abbr({class:null==p?void 0:p.abbr}),title:l[e],children:o[e]},e)),[m]);return(0,t.jsxs)(u,{ref:c,...f(),children:[g,d&&(0,t.jsx)("span",{className:h.content({class:null==p?void 0:p.content}),children:d})]})}).displayName="NextUI.Kbd",e.i(203828),e.i(537857);var c=e.i(336770);e.i(169520),e.i(433167);var u=e.i(606957),d=e.i(441143);let h=(0,c.create)(e=>({isOpen:!1,open:()=>e({isOpen:!0}),close:()=>e({isOpen:!1})}));e.s(["useQuickNav",0,function(){let{isOpen:e,open:t,close:r}=h();return(0,n.useEffect)(()=>{let e=e=>{if(e.repeat||!((e.metaKey||e.ctrlKey)&&"k"===e.key))return;let r=e.target;r instanceof HTMLElement&&(r.isContentEditable||"INPUT"===r.tagName||"TEXTAREA"===r.tagName||"SELECT"===r.tagName)||(u.useAuth.getState().accessLevel??0)<(0,d.getAccessLevelForRole)(d.Role.Trainee)||(e.preventDefault(),t())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t]),{isOpen:e,open:t,close:r}},"useQuickNavStore",0,h],791205)},648761,e=>{e.v(t=>Promise.all(["static/chunks/0n..hexfw6r85.js"].map(t=>e.l(t))).then(()=>t(493594)))},828805,e=>{e.v(t=>Promise.all(["static/chunks/18bztvpdorkth.js"].map(t=>e.l(t))).then(()=>t(879466)))},621638,e=>{e.v(t=>Promise.all(["static/chunks/0ldl81y~gdw-x.js"].map(t=>e.l(t))).then(()=>t(305710)))},815814,e=>{e.v(t=>Promise.all(["static/chunks/0rzdx~bqt_cp_.js"].map(t=>e.l(t))).then(()=>t(473033)))},117484,e=>{e.v(e=>Promise.resolve().then(()=>e(337153)))},444208,e=>{e.v(t=>Promise.all(["static/chunks/0eaj9seu0dmkd.js"].map(t=>e.l(t))).then(()=>t(631513)))},581806,e=>{e.v(e=>Promise.resolve().then(()=>e(603815)))},800448,e=>{e.v(t=>Promise.all(["static/chunks/0l~-q7.q_8af_.js"].map(t=>e.l(t))).then(()=>t(562429)))},664437,e=>{e.v(e=>Promise.resolve().then(()=>e(284839)))},840501,e=>{e.v(t=>Promise.all(["static/chunks/0-u.5o9-rq8qm.js"].map(t=>e.l(t))).then(()=>t(988493)))},621354,e=>{e.v(e=>Promise.resolve().then(()=>e(596945)))},514200,e=>{e.v(t=>Promise.all(["static/chunks/0.llzd2-7_k6q.js"].map(t=>e.l(t))).then(()=>t(275231)))},827757,e=>{e.v(e=>Promise.resolve().then(()=>e(5960)))},10601,e=>{e.v(e=>Promise.resolve().then(()=>e(293704)))},114370,e=>{e.v(e=>Promise.resolve().then(()=>e(695031)))},359240,e=>{e.v(t=>Promise.all(["static/chunks/0r9hnjprh0y7m.js"].map(t=>e.l(t))).then(()=>t(899281)))},494390,e=>{e.v(t=>Promise.all(["static/chunks/0i1vzv1a.jye2.js","static/chunks/17~3d47wn33eq.js","static/chunks/027n_.j-l37gv.js","static/chunks/0~3-n5lq571_-.js","static/chunks/05e6b5yb3whyt.js"].map(t=>e.l(t))).then(()=>t(767599)))},996849,e=>{e.v(t=>Promise.all(["static/chunks/05kbrpzmh6.85.js"].map(t=>e.l(t))).then(()=>t(28394)))},822276,e=>{e.v(t=>Promise.all(["static/chunks/0zqkin2666n31.js"].map(t=>e.l(t))).then(()=>t(630425)))},181882,e=>{e.v(t=>Promise.all(["static/chunks/0v7lnpvu-ndg6.js"].map(t=>e.l(t))).then(()=>t(604747)))},305630,e=>{e.v(t=>Promise.all(["static/chunks/0d-ldcexg00fz.js"].map(t=>e.l(t))).then(()=>t(277969)))},584859,e=>{e.v(e=>Promise.resolve().then(()=>e(115237)))},244766,e=>{e.v(e=>Promise.resolve().then(()=>e(935849)))},469799,e=>{e.v(t=>Promise.all(["static/chunks/0qrd~5f9e8eyx.js"].map(t=>e.l(t))).then(()=>t(552822)))},52844,e=>{e.v(e=>Promise.resolve().then(()=>e(954342)))},443242,e=>{e.v(t=>Promise.all(["static/chunks/0qc1xhl_m5fmm.js"].map(t=>e.l(t))).then(()=>t(24873)))},484766,e=>{e.v(e=>Promise.resolve().then(()=>e(663655)))},548029,e=>{e.v(e=>Promise.resolve().then(()=>e(382538)))},712080,e=>{e.v(e=>Promise.resolve().then(()=>e(353533)))},832158,e=>{e.v(e=>Promise.resolve().then(()=>e(734277)))},331121,e=>{e.v(t=>Promise.all(["static/chunks/119sxoi~7r.v0.js"].map(t=>e.l(t))).then(()=>t(809715)))},511838,e=>{e.v(e=>Promise.resolve().then(()=>e(515283)))},675733,e=>{e.v(t=>Promise.all(["static/chunks/0zafl35mo6wzz.js"].map(t=>e.l(t))).then(()=>t(99273)))},49677,e=>{e.v(t=>Promise.all(["static/chunks/0hzj7gmlpfzw3.js"].map(t=>e.l(t))).then(()=>t(78804)))},17050,e=>{e.v(t=>Promise.all(["static/chunks/0b~chsi1v1msh.js"].map(t=>e.l(t))).then(()=>t(949634)))},780832,e=>{e.v(t=>Promise.all(["static/chunks/0k4jdk7bxr1kx.js"].map(t=>e.l(t))).then(()=>t(525273)))},510637,e=>{e.v(t=>Promise.all(["static/chunks/0tc67wwb8kwy3.js"].map(t=>e.l(t))).then(()=>t(94474)))},126699,e=>{e.v(t=>Promise.all(["static/chunks/0kji-e.l4zeu6.js"].map(t=>e.l(t))).then(()=>
1t(165874)))},221621,e=>{e.v(e=>Promise.resolve().then(()=>e(650701)))},47972,e=>{e.v(e=>Promise.resolve().then(()=>e(117327)))},825876,e=>{e.v(t=>Promise.all(["static/chunks/16eguvr4qyuzm.js","static/chunks/06rau1k-8wzsl.js","static/chunks/0f290_u55icbj.js","static/chunks/084u56.zkcqle.js","static/chunks/0bjcejwf95ul~.js","static/chunks/0g71rfa_h1snm.js"].map(t=>e.l(t))).then(()=>t(485325)))},132110,e=>{e.v(t=>Promise.all(["static/chunks/0hes8ciibklfy.js"].map(t=>e.l(t))).then(()=>t(700837)))},581623,e=>{e.v(t=>Promise.all(["static/chunks/1318cth00a8h_.js"].map(t=>e.l(t))).then(()=>t(270145)))},247187,e=>{e.v(e=>Promise.resolve().then(()=>e(311549)))},967440,e=>{e.v(t=>Promise.all(["static/chunks/0h_n95~l.v5qx.js"].map(t=>e.l(t))).then(()=>t(224905)))},391539,e=>{e.v(t=>Promise.all(["static/chunks/0-o0~3.m6yqm7.js"].map(t=>e.l(t))).then(()=>t(847636)))},734271,e=>{e.v(t=>Promise.all(["static/chunks/16-6i41o4v-8p.js"].map(t=>e.l(t))).then(()=>t(778556)))},862316,e=>{e.v(t=>Promise.all(["static/chunks/0j3n4t_cpi3i4.js"].map(t=>e.l(t))).then(()=>t(566635)))},388543,e=>{e.v(t=>Promise.all(["static/chunks/1587wnfv8_tln.js"].map(t=>e.l(t))).then(()=>t(456836)))},77100,e=>{e.v(t=>Promise.all(["static/chunks/0eeb96mo66sis.js"].map(t=>e.l(t))).then(()=>t(194164)))},895207,e=>{e.v(t=>Promise.all(["static/chunks/17hsr.ki4faer.js"].map(t=>e.l(t))).then(()=>t(90663)))},531592,e=>{e.v(t=>Promise.all(["static/chunks/0.xn9a21sz..z.js"].map(t=>e.l(t))).then(()=>t(123576)))},477410,e=>{e.v(e=>Promise.resolve().then(()=>e(335409)))},697007,e=>{e.v(t=>Promise.all(["static/chunks/134zp3_b60mu-.js"].map(t=>e.l(t))).then(()=>t(48253)))},116351,e=>{e.v(t=>Promise.all(["static/chunks/0qy_rm78veivg.js","static/chunks/0lb5taar_em~v.js"].map(t=>e.l(t))).then(()=>t(685865)))},648948,e=>{e.v(t=>Promise.all(["static/chunks/0tgoo_~2mfzl2.js"].map(t=>e.l(t))).then(()=>t(721009)))},932760,e=>{e.v(t=>Promise.all(["static/chunks/0n_lrkq~ubcit.js"].map(t=>e.l(t))).then(()=>t(491694)))},575254,e=>{e.v(t=>Promise.all(["static/chunks/18c~5z2p.edle.js","static/chunks/063er_e8r-43i.js"].map(t=>e.l(t))).then(()=>t(493477)))},194386,e=>{e.v(t=>Promise.all(["static/chunks/0aib6bknyxao5.js"].map(t=>e.l(t))).then(()=>t(687231)))},794034,e=>{e.v(t=>Promise.all(["static/chunks/037gnc~yf-ss5.js","static/chunks/02m8q4ow~8oa~.js","static/chunks/0ccsexc2bdfyh.js","static/chunks/06xl2.l7tjoy..js","static/chunks/0rpr2z35j8iil.js","static/chunks/1817olur-p3s0.js","static/chunks/0cmn79riiutx5.js","static/chunks/0ym0qcd2nb~at.js"].map(t=>e.l(t))).then(()=>t(443697)))}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.