@qratilabs/qrati-connect 2.10.0 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/element/B6AogNwO.js +33 -0
  3. package/element/B6oCFVZ-.js +3 -0
  4. package/element/BQB7uJ0l.js +3 -0
  5. package/element/{Bne-JYrv.js → BgMQfcp1.js} +2 -2
  6. package/element/C-LQPZVK.js +3 -0
  7. package/element/{BWkuwF6Z.js → DnHHH-ld.js} +1 -1
  8. package/element/{DogkDZHs.js → X9ql78BJ.js} +4 -4
  9. package/element/kPqeZ-lH.js +1 -0
  10. package/element/web.es.js +140 -138
  11. package/package.json +1 -1
  12. package/react/{Bm62DiAH.js → 2dHdeOGi.js} +1 -1
  13. package/react/{DWRwa2Fn.js → B7CKBSvG.js} +1 -1
  14. package/react/B9zT46ds.js +1 -0
  15. package/react/BBE0yFbQ.js +3 -0
  16. package/react/{D6vuNvL3.js → BPczcQJn.js} +1 -1
  17. package/react/BVTf5URN.js +1 -0
  18. package/react/{C3CRpiGz.js → BkSX_NqE.js} +1 -1
  19. package/react/{Bs3UJ-hD.js → C02SORiV.js} +1 -1
  20. package/react/C3hgy73W.js +17 -0
  21. package/react/{CrNaafeg.js → CExWFXPu.js} +2 -2
  22. package/react/CO6S8f5W.js +33 -0
  23. package/react/{NoSlNVEN.js → Ca8RfX27.js} +1 -1
  24. package/react/D5c7A2zT.js +3 -0
  25. package/react/{BmDGVd70.js → DEkf_xei.js} +1 -1
  26. package/react/{7zAUTLKK.js → DLDA1Kjz.js} +1 -1
  27. package/react/{Da9in29D.js → DYg7XYHo.js} +1 -1
  28. package/react/{BUlvHALE.js → DdUmw-Lp.js} +1 -1
  29. package/react/{g2VmOrkM.js → DmnfzC9I.js} +1 -1
  30. package/react/{CFzwUndY.js → DpB434fd.js} +1 -1
  31. package/react/Dx3H0TXY.js +1 -0
  32. package/react/{Id8igRTR.js → I6Sstf1G.js} +1 -1
  33. package/react/ZJDrzcXm.js +1 -0
  34. package/react/index.cjs +1 -1
  35. package/react/index.mjs +416 -414
  36. package/react/{RLt-_yTh.js → q5E_UWxZ.js} +1 -1
  37. package/react/uiiSr1iu.js +3 -0
  38. package/umd/web.umd.js +1 -1
  39. package/element/BjErVDTT.js +0 -3
  40. package/element/CkL4awGJ.js +0 -32
  41. package/element/DCHPmhVN.js +0 -1
  42. package/element/Dmq9yGVz.js +0 -3
  43. package/element/Rv4qsNKr.js +0 -3
  44. package/react/BXejm9IG.js +0 -1
  45. package/react/BazbBBeL.js +0 -3
  46. package/react/Bl-1ewUW.js +0 -32
  47. package/react/C99gSj46.js +0 -17
  48. package/react/Cj-HturX.js +0 -3
  49. package/react/CkLeac_u.js +0 -1
  50. package/react/DCxodtId.js +0 -3
  51. package/react/Dn2VeA57.js +0 -1
  52. package/react/zlpzUxKr.js +0 -1
  53. /package/react/{Da6mFD8j.js → BSo7livb.js} +0 -0
  54. /package/react/{BNc3TD1G.js → Cpox5nFJ.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [2.10.0](https://github.com/qrati-labs/qrati-connect-ts/compare/v2.9.0...v2.10.0) (2026-04-09)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * comment out folder breadcrumb rendering logic in ContentsPage ([a04e6cc](https://github.com/qrati-labs/qrati-connect-ts/commit/a04e6cc9226388c50055f3d032f79f97984d7aed))
7
+ * remove tailwindcss plugin from Prettier configuration ([10486ee](https://github.com/qrati-labs/qrati-connect-ts/commit/10486eee2185c8a323d344f06d11cf8c68b97c3b))
8
+
9
+
10
+ ### Features
11
+
12
+ * (BH-26) add SearchResultCard component for enhanced content display in OrganizationSearchResults ([efdf3a9](https://github.com/qrati-labs/qrati-connect-ts/commit/efdf3a9b1d1385367c15cfb78b04228287034171))
13
+ * enhance OrganizationInlineSearch and OrganizationSearchResults components with improved styling and functionality ([056ada3](https://github.com/qrati-labs/qrati-connect-ts/commit/056ada3a4f7ef17ddd9515ccc5faa6a2965b5173))
14
+
1
15
  # [2.9.0](https://github.com/qrati-labs/qrati-connect-ts/compare/v2.8.0...v2.9.0) (2026-04-01)
2
16
 
3
17
 
@@ -0,0 +1,33 @@
1
+ import{G as e,L as t,M as r,P as s,R as n,_ as o,b as i,f as a,g as c,h as l,j as u,p as h,v as d,w as p,z as f}from"./DNlPVBFF.js";var y=class{constructor(){this.listeners=/* @__PURE__ */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(){}},m=new class extends y{#e;#t;#r;constructor(){super(),this.#r=e=>{if("undefined"!=typeof window&&window.addEventListener){const 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(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:"hidden"!==globalThis.document?.visibilityState}},g={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},w=new class{#s=g;#n=!1;setTimeoutProvider(e){this.#s=e}setTimeout(e,t){return this.#s.setTimeout(e,t)}clearTimeout(e){this.#s.clearTimeout(e)}setInterval(e,t){return this.#s.setInterval(e,t)}clearInterval(e){this.#s.clearInterval(e)}},b="undefined"==typeof window||"Deno"in globalThis;function v(){}function E(e,t){return"function"==typeof e?e(t):e}function R(e){return"number"==typeof e&&e>=0&&e!==1/0}function S(e,t){return Math.max(e+(t||0)-Date.now(),0)}function T(e,t){return"function"==typeof e?e(t):e}function O(e,t){return"function"==typeof e?e(t):e}function A(e,t){const{type:r="all",exact:s,fetchStatus:n,predicate:o,queryKey:i,stale:a}=e;if(i)if(s){if(t.queryHash!==C(i,t.options))return!1}else if(!N(t.queryKey,i))return!1;if("all"!==r){const e=t.isActive();if("active"===r&&!e)return!1;if("inactive"===r&&e)return!1}return!("boolean"==typeof a&&t.isStale()!==a||n&&n!==t.state.fetchStatus||o&&!o(t))}function I(e,t){const{exact:r,status:s,predicate:n,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(P(t.options.mutationKey)!==P(o))return!1}else if(!N(t.options.mutationKey,o))return!1}return!(s&&t.state.status!==s||n&&!n(t))}function C(e,t){return(t?.queryKeyHashFn||P)(e)}function P(e){return JSON.stringify(e,(e,t)=>L(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function N(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every(r=>N(e[r],t[r]))}var D=Object.prototype.hasOwnProperty;function x(e,t,r=0){if(e===t)return e;if(r>500)return t;const s=q(e)&&q(t);if(!(s||L(e)&&L(t)))return t;const n=(s?e:Object.keys(e)).length,o=s?t:Object.keys(t),i=o.length,a=s?new Array(i):{};let c=0;for(let l=0;l<i;l++){const i=s?l:o[l],u=e[i],h=t[i];if(u===h){a[i]=u,(s?l<n:D.call(e,i))&&c++;continue}if(null===u||null===h||"object"!=typeof u||"object"!=typeof h){a[i]=h;continue}const d=x(u,h,r+1);a[i]=d,d===u&&c++}return n===i&&c===n?e:a}function _(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function q(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function L(e){if(!U(e))return!1;const t=e.constructor;if(void 0===t)return!0;const r=t.prototype;return!!U(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function U(e){return"[object Object]"===Object.prototype.toString.call(e)}function M(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?x(e,t):t}function F(e,t,r=0){const s=[...e,t];return r&&s.length>r?s.slice(1):s}function k(e,t,r=0){const s=[t,...e];return r&&s.length>r?s.slice(0,-1):s}var j=/* @__PURE__ */Symbol();function $(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==j?e.queryFn:()=>Promise.reject(/* @__PURE__ */new Error(`Missing queryFn: '${e.queryHash}'`))}function G(e,t){return"function"==typeof e?e(...t):!!e}function V(e,t,r){let s,n=!1;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),n||(n=!0,s.aborted?r():s.addEventListener("abort",r,{once:!0})),s)}),e}var Q=/* @__PURE__ */(()=>{let e=()=>b;return{isServer:()=>e(),setIsServer(t){e=t}}})();function H(){let e,t;const r=new Promise((r,s)=>{e=r,t=s});function s(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{s({status:"fulfilled",value:t}),e(t)},r.reject=e=>{s({status:"rejected",reason:e}),t(e)},r}var W=function(e){setTimeout(e,0)},z=function(){let e=[],t=0,r=e=>{e()},s=e=>{e()},n=W;const o=s=>{t?e.push(s):n(()=>{r(s)})};return{batch:o=>{let i;t++;try{i=o()}finally{t--,t||(()=>{const t=e;e=[],t.length&&n(()=>{s(()=>{t.forEach(e=>{r(e)})})})})()}return i},batchCalls:e=>(...t)=>{o(()=>{e(...t)})},schedule:o,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{s=e},setScheduler:e=>{n=e}}}(),B=new class extends y{#o=!0;#t;#r;constructor(){super(),this.#r=e=>{if("undefined"!=typeof window&&window.addEventListener){const 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.#o!==e&&(this.#o=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#o}};function Z(e){return Math.min(1e3*2**e,3e4)}function K(e){return"online"!==(e??"online")||B.isOnline()}var J=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Y(e){let t,r=!1,s=0;const n=H(),o=()=>"pending"!==n.status,i=()=>m.isFocused()&&("always"===e.networkMode||B.isOnline())&&e.canRun(),a=()=>K(e.networkMode)&&e.canRun(),c=e=>{o()||(t?.(),n.resolve(e))},l=e=>{o()||(t?.(),n.reject(e))},u=()=>new Promise(r=>{t=e=>{(o()||i())&&r(e)},e.onPause?.()}).then(()=>{t=void 0,o()||e.onContinue?.()}),h=()=>{if(o())return;let t;const n=0===s?e.initialPromise:void 0;try{t=n??e.fn()}catch(a){t=Promise.reject(a)}Promise.resolve(t).then(c).catch(t=>{if(o())return;const n=e.retry??(Q.isServer()?0:3),a=e.retryDelay??Z,c="function"==typeof a?a(s,t):a,d=!0===n||"number"==typeof n&&s<n||"function"==typeof n&&n(s,t);var p;!r&&d?(s++,e.onFail?.(s,t),(p=c,new Promise(e=>{w.setTimeout(e,p)})).then(()=>i()?void 0:u()).then(()=>{r?l(t):h()})):l(t)})};return{promise:n,status:()=>n.status,cancel:t=>{if(!o()){const r=new J(t);l(r),e.onCancel?.(r)}},continue:()=>(t?.(),n),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:a,start:()=>(a()?h():u().then(h),n)}}var X=class{#i;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),R(this.gcTime)&&(this.#i=w.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Q.isServer()?1/0:3e5))}clearGcTimeout(){void 0!==this.#i&&(w.clearTimeout(this.#i),this.#i=void 0)}},ee=class extends X{#a;#c;#l;#u;#h;#d;#p;constructor(e){super(),this.#p=!1,this.#d=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#u=e.client,this.#l=this.#u.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#a=se(this.options),this.state=e.state??this.#a,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#h?.promise}setOptions(e){if(this.options={...this.#d,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const e=se(this.options);void 0!==e.data&&(this.setState(re(e.data,e.dataUpdatedAt)),this.#a=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#l.remove(this)}setData(e,t){const r=M(this.state.data,e,this.options);return this.#f({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#f({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#h?.promise;return this.#h?.cancel(e),t?t.then(v).catch(v):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#a}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>!1!==O(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===j||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===T(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!S(this.state.dataUpdatedAt,e))}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#h?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#h?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#l.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.#h&&(this.#p||this.#y()?this.#h.cancel({revert:!0}):this.#h.cancelRetry()),this.scheduleGc()),this.#l.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#y(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#f({type:"invalidate"})}async fetch(e,t){if("idle"!==this.state.fetchStatus&&"rejected"!==this.#h?.status())if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#h)return this.#h.continueRetry(),this.#h.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}const r=new AbortController,s=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#p=!0,r.signal)})},n=()=>{const e=$(this.options,t),r=(()=>{const e={client:this.#u,queryKey:this.queryKey,meta:this.meta};return s(e),e})();return this.#p=!1,this.options.persister?this.options.persister(e,r,this):e(r)},o=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#u,state:this.state,fetchFn:n};return s(e),e})();this.options.behavior?.onFetch(o,this),this.#c=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===o.fetchOptions?.meta||this.#f({type:"fetch",meta:o.fetchOptions?.meta}),this.#h=Y({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:e=>{e instanceof J&&e.revert&&this.setState({...this.#c,fetchStatus:"idle"}),r.abort()},onFail:(e,t)=>{this.#f({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#f({type:"pause"})},onContinue:()=>{this.#f({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const e=await this.#h.start();if(void 0===e)throw new Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#l.config.onSuccess?.(e,this),this.#l.config.onSettled?.(e,this.state.error,this),e}catch(i){if(i instanceof J){if(i.silent)return this.#h.promise;if(i.revert){if(void 0===this.state.data)throw i;return this.state.data}}throw this.#f({type:"error",error:i}),this.#l.config.onError?.(i,this),this.#l.config.onSettled?.(this.state.data,i,this),i}finally{this.scheduleGc()}}#f(e){this.state=(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,...te(t.data,this.options),fetchMeta:e.meta??null};case"success":const r={...t,...re(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#c=e.manual?r:void 0,r;case"error":const s=e.error;return{...t,error:s,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),z.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#l.notify({query:this,type:"updated",action:e})})}};function te(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:K(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function re(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function se(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,s=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var ne=class extends y{constructor(e,t){super(),this.options=t,this.#u=e,this.#m=null,this.#g=H(),this.bindMethods(),this.setOptions(t)}#u;#w=void 0;#b=void 0;#v=void 0;#E;#R;#g;#m;#S;#T;#O;#A;#I;#C;#P=/* @__PURE__ */new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#w.addObserver(this),oe(this.#w,this.options)?this.#N():this.updateResult(),this.#D())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ie(this.#w,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ie(this.#w,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=/* @__PURE__ */new Set,this.#x(),this.#_(),this.#w.removeObserver(this)}setOptions(e){const t=this.options,r=this.#w;if(this.options=this.#u.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof O(this.options.enabled,this.#w))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#q(),this.#w.setOptions(this.options),t._defaulted&&!_(this.options,t)&&this.#u.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#w,observer:this});const s=this.hasListeners();s&&ae(this.#w,r,this.options,t)&&this.#N(),this.updateResult(),!s||this.#w===r&&O(this.options.enabled,this.#w)===O(t.enabled,this.#w)&&T(this.options.staleTime,this.#w)===T(t.staleTime,this.#w)||this.#L();const n=this.#U();!s||this.#w===r&&O(this.options.enabled,this.#w)===O(t.enabled,this.#w)&&n===this.#C||this.#M(n)}getOptimisticResult(e){const t=this.#u.getQueryCache().build(this.#u,e),r=this.createResult(t,e);var s;return s=r,_(this.getCurrentResult(),s)||(this.#v=r,this.#R=this.options,this.#E=this.#w.state),r}getCurrentResult(){return this.#v}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#g.status||this.#g.reject(/* @__PURE__ */new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#P.add(e)}getCurrentQuery(){return this.#w}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#u.defaultQueryOptions(e),r=this.#u.getQueryCache().build(this.#u,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#N({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#v))}#N(e){this.#q();let t=this.#w.fetch(this.options,e);return e?.throwOnError||(t=t.catch(v)),t}#L(){this.#x();const e=T(this.options.staleTime,this.#w);if(Q.isServer()||this.#v.isStale||!R(e))return;const t=S(this.#v.dataUpdatedAt,e)+1;this.#A=w.setTimeout(()=>{this.#v.isStale||this.updateResult()},t)}#U(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#w):this.options.refetchInterval)??!1}#M(e){this.#_(),this.#C=e,!Q.isServer()&&!1!==O(this.options.enabled,this.#w)&&R(this.#C)&&0!==this.#C&&(this.#I=w.setInterval(()=>{(this.options.refetchIntervalInBackground||m.isFocused())&&this.#N()},this.#C))}#D(){this.#L(),this.#M(this.#U())}#x(){void 0!==this.#A&&(w.clearTimeout(this.#A),this.#A=void 0)}#_(){void 0!==this.#I&&(w.clearInterval(this.#I),this.#I=void 0)}createResult(e,t){const r=this.#w,s=this.options,n=this.#v,o=this.#E,i=this.#R,a=e!==r?e.state:this.#b,{state:c}=e;let l,u={...c},h=!1;if(t._optimisticResults){const n=this.hasListeners(),o=!n&&oe(e,t),i=n&&ae(e,r,t,s);(o||i)&&(u={...u,...te(c.data,e.options)}),"isRestoring"===t._optimisticResults&&(u.fetchStatus="idle")}let{error:d,errorUpdatedAt:p,status:f}=u;l=u.data;let y=!1;if(void 0!==t.placeholderData&&void 0===l&&"pending"===f){let e;n?.isPlaceholderData&&t.placeholderData===i?.placeholderData?(e=n.data,y=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#O?.state.data,this.#O):t.placeholderData,void 0!==e&&(f="success",l=M(n?.data,e,t),h=!0)}if(t.select&&void 0!==l&&!y)if(n&&l===o?.data&&t.select===this.#S)l=this.#T;else try{this.#S=t.select,l=t.select(l),l=M(n?.data,l,t),this.#T=l,this.#m=null}catch(R){this.#m=R}this.#m&&(d=this.#m,l=this.#T,p=Date.now(),f="error");const m="fetching"===u.fetchStatus,g="pending"===f,w="error"===f,b=g&&m,v=void 0!==l,E={status:f,fetchStatus:u.fetchStatus,isPending:g,isSuccess:"success"===f,isError:w,isInitialLoading:b,isLoading:b,data:l,dataUpdatedAt:u.dataUpdatedAt,error:d,errorUpdatedAt:p,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:u.dataUpdateCount>a.dataUpdateCount||u.errorUpdateCount>a.errorUpdateCount,isFetching:m,isRefetching:m&&!g,isLoadingError:w&&!v,isPaused:"paused"===u.fetchStatus,isPlaceholderData:h,isRefetchError:w&&v,isStale:ce(e,t),refetch:this.refetch,promise:this.#g,isEnabled:!1!==O(t.enabled,e)};if(this.options.experimental_prefetchInRender){const t=void 0!==E.data,s="error"===E.status&&!t,n=e=>{s?e.reject(E.error):t&&e.resolve(E.data)},o=()=>{n(this.#g=E.promise=H())},i=this.#g;switch(i.status){case"pending":e.queryHash===r.queryHash&&n(i);break;case"fulfilled":(s||E.data!==i.value)&&o();break;case"rejected":s&&E.error===i.reason||o()}}return E}updateResult(){const e=this.#v,t=this.createResult(this.#w,this.options);this.#E=this.#w.state,this.#R=this.options,void 0!==this.#E.data&&(this.#O=this.#w),_(t,e)||(this.#v=t,this.#F({listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#P.size)return!0;const s=new Set(r??this.#P);return this.options.throwOnError&&s.add("error"),Object.keys(this.#v).some(t=>{const r=t;return this.#v[r]!==e[r]&&s.has(r)})})()}))}#q(){const e=this.#u.getQueryCache().build(this.#u,this.options);if(e===this.#w)return;const t=this.#w;this.#w=e,this.#b=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#D()}#F(e){z.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#v)}),this.#u.getQueryCache().notify({query:this.#w,type:"observerResultsUpdated"})})}};function oe(e,t){return function(e,t){return!1!==O(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&ie(e,t,t.refetchOnMount)}function ie(e,t,r){if(!1!==O(t.enabled,e)&&"static"!==T(t.staleTime,e)){const s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&ce(e,t)}return!1}function ae(e,t,r,s){return(e!==t||!1===O(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&ce(e,r)}function ce(e,t){return!1!==O(t.enabled,e)&&e.isStaleByTime(T(t.staleTime,e))}var le=e(void 0),ue=e=>{const t=n(le);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},he=({client:e,children:t})=>(f(()=>(e.mount(),()=>{e.unmount()}),[e]),/* @__PURE__ */d(le.Provider,{value:e,children:t})),de=e(!1);de.Provider;var pe=e(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),fe=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function ye(e,r,o){const a=n(de),c=n(pe),l=ue(o),u=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(u);const h=l.getQueryCache().get(u.queryHash);u._optimisticResults=a?"isRestoring":"optimistic",(e=>{if(e.suspense){const t=1e3,r=e=>"static"===e?e:Math.max(e??t,t),s=e.staleTime;e.staleTime="function"==typeof s?(...e)=>r(s(...e)):r(s),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(u),((e,t,r)=>{const s=r?.state.error&&"function"==typeof e.throwOnError?G(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))})(u,c,h),(e=>{f(()=>{e.clearReset()},[e])})(c);const d=!l.getQueryCache().get(u.queryHash),[p]=s(()=>new r(l,u)),y=p.getOptimisticResult(u),m=!a&&!1!==e.subscribed;if(i(t(e=>{const t=m?p.subscribe(z.batchCalls(e)):v;return p.updateResult(),t},[p,m]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),f(()=>{p.setOptions(u)},[u,p]),((e,t)=>e?.suspense&&t.isPending)(u,y))throw fe(u,p,c);if((({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:n})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(n&&void 0===e.data||G(r,[e.error,s])))({result:y,errorResetBoundary:c,throwOnError:u.throwOnError,query:h,suspense:u.suspense}))throw y.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(u,y),u.experimental_prefetchInRender&&!Q.isServer()&&((e,t)=>e.isLoading&&e.isFetching&&!t)(y,a)&&(d?fe(u,p,c):h?.promise)?.catch(v).finally(()=>{p.updateResult()}),u.notifyOnChangeProps?y:p.trackResult(y)}function me(e,t){return ye(e,ne,t)}var ge=class extends Error{response;request;options;constructor(e,t,r){const s=`${e.status||0===e.status?e.status:""} ${e.statusText??""}`.trim();super(`Request failed with ${s?`status code ${s}`:"an unknown error"}: ${t.method} ${t.url}`),this.name="HTTPError",this.response=e,this.request=t,this.options=r}},we=class extends Error{name="NonError";value;constructor(e){let t="Non-error value was thrown";try{"string"==typeof e?t=e:e&&"object"==typeof e&&"message"in e&&"string"==typeof e.message&&(t=e.message)}catch{}super(t),this.value=e}},be=class extends Error{name="ForceRetryError";customDelay;code;customRequest;constructor(e){const t=e?.cause?e.cause instanceof Error?e.cause:new we(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:"Forced retry",t?{cause:t}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}},ve=(()=>{let e=!1,t=!1;const r="function"==typeof globalThis.ReadableStream,s="function"==typeof globalThis.Request;if(r&&s)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(n){if(n instanceof Error&&"unsupported BodyInit type"===n.message)return!1;throw n}return e&&!t})(),Ee="function"==typeof globalThis.AbortController,Re="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,Se="function"==typeof globalThis.ReadableStream,Te="function"==typeof globalThis.FormData,Oe=["get","post","put","patch","head","delete"],Ae={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},Ie=(new TextEncoder).encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,Ce=Symbol("stop"),Pe=class{options;constructor(e){this.options=e}},Ne=e=>new Pe(e),De={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},xe={next:!0},_e={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},qe=(e,t,r)=>{let s,n=0;return e.pipeThrough(new TransformStream({transform(e,o){if(o.enqueue(e),s){n+=s.byteLength;let e=0===t?0:n/t;e>=1&&(e=1-Number.EPSILON),r?.({percent:e,totalBytes:Math.max(t,n),transferredBytes:n},s)}s=e},flush(){s&&(n+=s.byteLength,r?.({percent:1,totalBytes:Math.max(t,n),transferredBytes:n},s))}}))},Le=e=>null!==e&&"object"==typeof e,Ue=(...e)=>{for(const t of e)if((!Le(t)||Array.isArray(t))&&void 0!==t)throw new TypeError("The `options` argument must be an object");return $e({},...e)},Me=(e={},t={})=>{const r=new globalThis.Headers(e),s=t instanceof globalThis.Headers,n=new globalThis.Headers(t);for(const[o,i]of n.entries())s&&"undefined"===i||void 0===i?r.delete(o):r.set(o,i);return r};function Fe(e,t,r){return Object.hasOwn(t,r)&&void 0===t[r]?[]:$e(e[r]??[],t[r]??[])}var ke=(e={},t={})=>({beforeRequest:Fe(e,t,"beforeRequest"),beforeRetry:Fe(e,t,"beforeRetry"),afterResponse:Fe(e,t,"afterResponse"),beforeError:Fe(e,t,"beforeError")}),je=(e,t)=>{const r=new URLSearchParams;for(const s of[e,t])if(void 0!==s)if(s instanceof URLSearchParams)for(const[e,t]of s.entries())r.append(e,t);else if(Array.isArray(s))for(const e of s){if(!Array.isArray(e)||2!==e.length)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");r.append(String(e[0]),String(e[1]))}else if(Le(s))for(const[e,t]of Object.entries(s))void 0!==t&&r.append(e,String(t));else{const e=new URLSearchParams(s);for(const[t,s]of e.entries())r.append(t,s)}return r},$e=(...e)=>{let t,r={},s={},n={};const o=[];for(const i of e)if(Array.isArray(i))Array.isArray(r)||(r=[]),r=[...r,...i];else if(Le(i)){for(let[e,s]of Object.entries(i))if("signal"===e&&s instanceof globalThis.AbortSignal)o.push(s);else if("context"!==e)"searchParams"!==e?(Le(s)&&e in r&&(s=$e(r[e],s)),r={...r,[e]:s}):t=null==s?void 0:void 0===t?s:je(t,s);else{if(null!=s&&(!Le(s)||Array.isArray(s)))throw new TypeError("The `context` option must be an object");r={...r,context:null==s?{}:{...r.context,...s}}}Le(i.hooks)&&(n=ke(n,i.hooks),r.hooks=n),Le(i.headers)&&(s=Me(s,i.headers),r.headers=s)}return void 0!==t&&(r.searchParams=t),o.length>0&&(1===o.length?r.signal=o[0]:r.signal=Re?AbortSignal.any(o):o.at(-1)),r},Ge=e=>Oe.includes(e)?e.toUpperCase():e,Ve={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},Qe=(e={})=>{if("number"==typeof e)return{...Ve,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.methods&&=e.methods.map(e=>e.toLowerCase()),e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");const t=Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e));return{...Ve,...t}},He=class extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}},We=class e{static create(t,r){const s=new e(t,r),n=s.#k(async()=>{if("number"==typeof s.#j.timeout&&s.#j.timeout>2147483647)throw new RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let e=await s.#$();for(const r of s.#j.hooks.afterResponse){const n=s.#G(e.clone());let o;try{o=await r(s.request,s.#V(),n,{retryCount:s.#Q})}catch(t){throw s.#H(n),s.#H(e),t}if(o instanceof Pe)throw s.#H(n),s.#H(e),new be(o.options);const i=o instanceof globalThis.Response?o:e;n!==i&&s.#H(n),e!==i&&s.#H(e),e=i}if(s.#G(e),!e.ok&&("function"==typeof s.#j.throwHttpErrors?s.#j.throwHttpErrors(e.status):s.#j.throwHttpErrors)){let t=new ge(e,s.request,s.#V());for(const e of s.#j.hooks.beforeError)t=await e(t,{retryCount:s.#Q});throw t}if(s.#j.onDownloadProgress){if("function"!=typeof s.#j.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!Se)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const t=e.clone();return s.#H(e),((e,t)=>{if(!e.body)return e;if(204===e.status)return new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers});const r=Math.max(0,Number(e.headers.get("content-length"))||0);return new Response(qe(e.body,r,t),{status:e.status,statusText:e.statusText,headers:e.headers})})(t,s.#j.onDownloadProgress)}return e}).finally(()=>{const e=s.#W;s.#z(e?.body??void 0),s.#z(s.request.body??void 0)});for(const[e,o]of Object.entries(Ae))"bytes"===e&&"function"!=typeof globalThis.Response?.prototype?.bytes||(n[e]=async()=>{s.request.headers.set("accept",s.request.headers.get("accept")||o);const t=await n;if("json"===e){if(204===t.status)return"";const e=await t.text();return""===e?"":r.parseJson?r.parseJson(e):JSON.parse(e)}return t[e]()});return n}static#B(e){return!e||"object"!=typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))}request;#Z;#Q=0;#K;#j;#W;#J;#Y;constructor(t,r={}){if(this.#K=t,this.#j={...r,headers:Me(this.#K.headers,r.headers),hooks:ke({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:Ge(r.method??this.#K.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:Qe(r.retry),throwHttpErrors:r.throwHttpErrors??!0,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis),context:r.context??{}},"string"!=typeof this.#K&&!(this.#K instanceof URL||this.#K instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this.#j.prefixUrl&&"string"==typeof this.#K){if(this.#K.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this.#j.prefixUrl.endsWith("/")||(this.#j.prefixUrl+="/"),this.#K=this.#j.prefixUrl+this.#K}Ee&&Re&&(this.#J=this.#j.signal??this.#K.signal,this.#Z=new globalThis.AbortController,this.#j.signal=this.#J?AbortSignal.any([this.#J,this.#Z.signal]):this.#Z.signal),ve&&(this.#j.duplex="half"),void 0!==this.#j.json&&(this.#j.body=this.#j.stringifyJson?.(this.#j.json)??JSON.stringify(this.#j.json),this.#j.headers.set("content-type",this.#j.headers.get("content-type")??"application/json"));const s=r.headers&&new globalThis.Headers(r.headers).has("content-type");if(this.#K instanceof globalThis.Request&&(Te&&this.#j.body instanceof globalThis.FormData||this.#j.body instanceof URLSearchParams)&&!s&&this.#j.headers.delete("content-type"),this.request=new globalThis.Request(this.#K,this.#j),void 0!==(n=this.#j.searchParams)&&(Array.isArray(n)?n.length>0:n instanceof URLSearchParams?n.size>0:"object"==typeof n?Object.keys(n).length>0:"string"==typeof n?n.trim().length>0:Boolean(n))){const t="?"+("string"==typeof this.#j.searchParams?this.#j.searchParams.replace(/^\?/,""):new URLSearchParams(e.#B(this.#j.searchParams)).toString()),r=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,t);this.request=new globalThis.Request(r,this.#j)}var n;if(this.#j.onUploadProgress){if("function"!=typeof this.#j.onUploadProgress)throw new TypeError("The `onUploadProgress` option must be a function");if(!ve)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#X(this.request,this.#j.body??void 0)}}#ee(){const e=this.#j.retry.delay(this.#Q);let t=e;!0===this.#j.retry.jitter?t=Math.random()*e:"function"==typeof this.#j.retry.jitter&&(t=this.#j.retry.jitter(e),(!Number.isFinite(t)||t<0)&&(t=e));const r=this.#j.retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(r,t)}async#te(e){if(this.#Q++,this.#Q>this.#j.retry.limit)throw e;const t=e instanceof Error?e:new we(e);if(t instanceof be)return t.customDelay??this.#ee();if(!this.#j.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(void 0!==this.#j.retry.shouldRetry){const r=await this.#j.retry.shouldRetry({error:t,retryCount:this.#Q});if(!1===r)throw e;if(!0===r)return this.#ee()}if(function(e){return e instanceof He||e?.name===He.name}(e)&&!this.#j.retry.retryOnTimeout)throw e;if(function(e){return e instanceof ge||e?.name===ge.name}(e)){if(!this.#j.retry.statusCodes.includes(e.response.status))throw e;const t=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Retry-After")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(t&&this.#j.retry.afterStatusCodes.includes(e.response.status)){let e=1e3*Number(t);Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse("2024-01-01")&&(e-=Date.now());const r=this.#j.retry.maxRetryAfter??e;return e<r?e:r}if(413===e.response.status)throw e}return this.#ee()}#G(e){return this.#j.parseJson&&(e.json=async()=>this.#j.parseJson(await e.text())),e}#z(e){e&&e.cancel().catch(()=>{})}#H(e){this.#z(e.body??void 0)}async#k(e){try{return await e()}catch(t){const r=Math.min(await this.#te(t),2147483647);if(this.#Q<1)throw t;if(await async function(e,{signal:t}){return new Promise((r,s)=>{function n(){clearTimeout(o),s(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",n,{once:!0}));const o=setTimeout(()=>{t?.removeEventListener("abort",n),r()},e)})}(r,this.#J?{signal:this.#J}:{}),t instanceof be&&t.customRequest){const e=this.#j.signal?new globalThis.Request(t.customRequest,{signal:this.#j.signal}):new globalThis.Request(t.customRequest);this.#re(e)}for(const e of this.#j.hooks.beforeRetry){const r=await e({request:this.request,options:this.#V(),error:t,retryCount:this.#Q});if(r instanceof globalThis.Request){this.#re(r);break}if(r instanceof globalThis.Response)return r;if(r===Ce)return}return this.#k(e)}}async#$(){this.#Z?.signal.aborted&&(this.#Z=new globalThis.AbortController,this.#j.signal=this.#J?AbortSignal.any([this.#J,this.#Z.signal]):this.#Z.signal,this.request=new globalThis.Request(this.request,{signal:this.#j.signal}));for(const t of this.#j.hooks.beforeRequest){const e=await t(this.request,this.#V(),{retryCount:this.#Q});if(e instanceof Response)return e;if(e instanceof globalThis.Request){this.#re(e);break}}const e=((e,t)=>{const r={};for(const s in t)Object.hasOwn(t,s)&&(s in _e||s in De||s in e&&!(s in xe)||(r[s]=t[s]));return r})(this.request,this.#j);return this.#W=this.request,this.request=this.#W.clone(),!1===this.#j.timeout?this.#j.fetch(this.#W,e):async function(e,t,r,s){return new Promise((n,o)=>{const i=setTimeout(()=>{r&&r.abort(),o(new He(e))},s.timeout);s.fetch(e,t).then(n).catch(o).then(()=>{clearTimeout(i)})})}(this.#W,e,this.#Z,this.#j)}#V(){if(!this.#Y){const{hooks:e,...t}=this.#j;this.#Y=Object.freeze(t)}return this.#Y}#re(e){this.#Y=void 0,this.request=this.#X(e)}#X(e,t){return this.#j.onUploadProgress&&e.body?((e,t,r)=>{if(!e.body)return e;const s=(e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(const[r,s]of e)t+=Ie,t+=(new TextEncoder).encode(`Content-Disposition: form-data; name="${r}"`).length,t+="string"==typeof s?(new TextEncoder).encode(s).length:s.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if("string"==typeof e)return(new TextEncoder).encode(e).length;if(e instanceof URLSearchParams)return(new TextEncoder).encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if("object"==typeof e&&null!==e)try{const t=JSON.stringify(e);return(new TextEncoder).encode(t).length}catch{return 0}return 0})(r??e.body);return new Request(e,{duplex:"half",body:qe(e.body,s,t)})})(e,this.#j.onUploadProgress,t??this.#j.body??void 0):e}},ze=e=>{const t=(t,r)=>We.create(t,Ue(e,r));for(const r of Oe)t[r]=(t,s)=>We.create(t,Ue(e,s,{method:r}));return t.create=e=>ze(Ue(e)),t.extend=t=>("function"==typeof t&&(t=t(e??{})),ze(Ue(e,t))),t.stop=Ce,t.retry=Ne,t},Be=ze(),Ze={PUBLIC_EVENTS:"/",FOLDER_EVENTS:e=>`/${e}`,LOGIN:"/auth/login",REGISTER:"/auth/register",FORGOT_PASSWORD:"/auth/forgot-password",RESET_PASSWORD:"/auth/reset-password",VERIFY_EMAIL:"/auth/verify-email",GALLERY:e=>`/event/${e}`,UPLOAD:e=>`/event/${e}/upload`,CURATE:e=>`/event/${e}/curate`,LEADERBOARD:e=>`/event/${e}/leaderboard`},Ke={ORGANIZATION_SETTINGS:e=>`https://qrati.com/org/${e}/settings`,ORGANIZATION_SETTINGS_INTEGRATION:e=>`https://qrati.com/org/${e}/settings/integration`,ORGANIZATION_DASHBOARD:e=>`https://qrati.com/org/${e}/dashboard`,ORGANIZATION_ADMINS:e=>`https://qrati.com/org/${e}/admins`,EVENT_SETTINGS_BASIC_DETAILS:e=>`https://qrati.com/event/${e}/settings`,EVENT_REVIEW_CONTENTS:e=>`https://qrati.com/event/${e}/review-contents`,EVENT_DEEP_SEARCH:e=>`https://qrati.com/event/${e}/deep-search`,EVENT_GENERATE_ARTICLE:e=>`https://qrati.com/event/${e}/generate-article`,EVENT_ACCESS_REQUESTS:e=>`https://qrati.com/event/${e}/access-requests`,EVENT_SHOT_INSPECTOR:e=>`https://qrati.com/event/${e}/shot-inspector`,EVENT_CURATION_DETAILS:e=>`https://qrati.com/event/${e}/curation-details`},Je={PUBLIC:"PUBLIC",PRIVATE:"PRIVATE",SECRET:"SECRET"},Ye="https://qrati.com/api/connect",Xe={INITIALIZE_SESSION:`${Ye}/session/initialize`,REGISTER:`${Ye}/auth/register`,LOGIN:`${Ye}/auth/login`,LOGOUT:`${Ye}/auth/logout`,UPDATE_SESSION:`${Ye}/session/update`,ACCEPT_TERMS:`${Ye}/auth/accept-terms`,EXTERNAL_LOGIN:`${Ye}/auth/external-login`,PUBLIC_EVENTS:`${Ye}/event/public-events`,SEARCH_EVENTS:`${Ye}/event/search`,FOLDER_DETAILS:`${Ye}/folder/details`,NESTED_FOLDERS:`${Ye}/folder/nested-folders`,GET_EVENT_POINTS:`${Ye}/event/points`,ELIGIBLE_TO_CURATE:`${Ye}/content/curation-eligibility`,CONTENT_FOR_CURATION:`${Ye}/content/for-curation`,CURATE_CONTENT:`${Ye}/content/curate`,GET_LEADERBOARD:`${Ye}/event/leaderboard`,GET_UPLOAD_COUNT:`${Ye}/event/upload-count`,SINGLE_UPLOAD:`${Ye}/content/single-upload`,UPDATE_REACTION:`${Ye}/content/update-reaction`,EVENT_DATA:`${Ye}/event/details-with-ads-parameters`,UPDATE_EVENT_LAYOUT:`${Ye}/event/update-layout`,GET_EVENT_STATISTICS:`${Ye}/event/statistics`,GET_CONTENTS:`${Ye}/content/for-gallery`,SEARCH_CONTENTS:`${Ye}/content/search`,GET_CONTENTS_COUNT:`${Ye}/content/count`,UPDATE_AD_ANALYTICS:`${Ye}/event/update-ad-analytics`,INCREMENT_EVENT_VIEW:`${Ye}/event/increment-view`,SEND_PASSWORD_RESET_CODE:`${Ye}/auth/send-password-reset-code`,VERIFY_PASSWORD_RESET_CODE:`${Ye}/auth/verify-password-reset-code`,RESET_PASSWORD:`${Ye}/auth/reset-password`,REPORT_ERROR:`${Ye}/session/report-error`},et={OWNER:"owner",ADMIN:"admin",MODERATOR:"moderator"},tt={IMAGE:"IMAGE",VIDEO:"VIDEO",AD:"AD"},rt={ROW:"ROW",COLUMN:"COLUMN",MASONRY:"MASONRY"},st={IN_REVIEW:"IN_REVIEW",APPROVED:"APPROVED",REJECTED:"REJECTED"},nt={WAITING:"Waiting",UPLOADING:"Uploading",RETRYING:"Retrying",DONE:"Done",FAILED:"Failed",ERROR:"Error"},ot=1048576,it={CLOSED:"CLOSED",OPEN:"OPEN",UPCOMING:"UPCOMING"},at={WAITING:"Waiting",PROCESSING:"Processing",DONE:"Done"},ct={TEXT:"text",IMAGE:"image",LOTTIE:"lottie"},lt={CONTEST:"CONTEST",REACTION:"REACTION"},ut={GRID:"grid",SINGLE:"single"},ht={POPULAR:"popular",UPLOAD_TIME:"upload",CAPTURE_TIME:"capture"},dt={[ht.POPULAR]:{label:"Popular",sortField:"score"},[ht.UPLOAD_TIME]:{label:"Uploaded",sortField:"createdAt"},[ht.CAPTURE_TIME]:{label:"Captured",sortField:"capturedAt"}},pt=ht.UPLOAD_TIME,ft={ASC:"asc",DESC:"desc"},yt={[ft.ASC]:{label:"Ascending",sortOrder:""},[ft.DESC]:{label:"Descending",sortOrder:"-"}},mt=ft.DESC,gt={OWN:"own",CURATED:"curated",ELIGIBLE:"eligible"},wt={NONE:null,LINK:"LINK",EMAIL:"EMAIL",PHONE:"PHONE",SMS:"SMS",WHATSAPP:"WHATSAPP",MESSENGER:"MESSENGER"},bt={[wt.LINK]:"material-symbols:open-in-new-rounded",[wt.EMAIL]:"material-symbols:alternate-email-rounded",[wt.PHONE]:"material-symbols:call-outline",[wt.SMS]:"material-symbols:sms-outline-rounded",[wt.WHATSAPP]:"logos:whatsapp-icon",[wt.MESSENGER]:"logos:messenger"},vt={AD_IMPRESSION:"impression",AD_ENGAGEMENT:"engagement",AD_CLICK:"click"},Et={QRATI_CONNECT_SESSION:"qrati-connect-session",EVENT_IN_REVIEW_COUNT:e=>`in-review-count-${e}`,CONTENTS_BY_EVENT:e=>`contents-by-event-${e}`};function Rt({title:e,children:t}){/* @__PURE__ */
2
+ return d("div",{className:"mx-auto mt-24 w-fit max-w-xl space-y-8",children:[/* @__PURE__ */d("svg",{xmlns:"http://www.w3.org/2000/svg",className:"mx-auto h-64 w-fit text-[#ff4800]",width:"800",height:"469.317",viewBox:"0 0 800 469.317",role:"img","aria-label":"Error illustration",children:/* @__PURE__ */d("g",{transform:"translate(-443.142 -257.876)",children:[
3
+ /* @__PURE__ */d("path",{d:"M898.247,664.1H371.155a30.276,30.276,0,0,1-30.241-30.241V352.525a30.276,30.276,0,0,1,30.241-30.241H898.247a30.276,30.276,0,0,1,30.241,30.241V633.862A30.276,30.276,0,0,1,898.247,664.1Z",transform:"translate(308.867 25.517)",fill:"#fff"}),
4
+ /* @__PURE__ */d("path",{d:"M557.334,341.82H30.241A30.276,30.276,0,0,1,0,311.578V30.241A30.276,30.276,0,0,1,30.241,0H557.334a30.276,30.276,0,0,1,30.241,30.241V311.578A30.276,30.276,0,0,1,557.334,341.82ZM30.241,1.833A28.441,28.441,0,0,0,1.833,30.241V311.578a28.441,28.441,0,0,0,28.409,28.409H557.334a28.441,28.441,0,0,0,28.409-28.409V30.241A28.441,28.441,0,0,0,557.334,1.833Z",transform:"matrix(0.999, -0.035, 0.035, 0.999, 643.995, 358.158)",fill:"#d6d6e3"}),
5
+ /* @__PURE__ */d("path",{d:"M754.171,630.2l-509.5-135.058a30.276,30.276,0,0,1-21.483-36.981L295.28,186.212a30.276,30.276,0,0,1,36.981-21.483l509.5,135.058a30.276,30.276,0,0,1,21.483,36.981L791.152,608.712A30.276,30.276,0,0,1,754.171,630.2Z",transform:"translate(220.958 94.156)",fill:"#f2f2f2"}),
6
+ /* @__PURE__ */d("path",{d:"M775.247,705.1H248.155a30.276,30.276,0,0,1-30.241-30.241V393.525a30.276,30.276,0,0,1,30.241-30.241H775.247a30.276,30.276,0,0,1,30.241,30.242V674.862A30.275,30.275,0,0,1,775.247,705.1Z",transform:"translate(319.149 22.09)",fill:"#fff"}),
7
+ /* @__PURE__ */d("path",{d:"M638.653,701.841H298.272c-.426,0-.852-.009-1.272-.033l160.985-90.663c3.065-1.762,9.943-2.382,15.361-1.385a13.912,13.912,0,0,1,4.26,1.385l108.041,60.842,5.176,2.911Z",transform:"translate(312.538 1.526)",fill:"#e6e6e6"}),
8
+ /* @__PURE__ */d("path",{d:"M760.145,704.279h-294.4l57.049-26.943L526.9,675.4l74.341-35.111c4.874-2.3,16.6-2.445,22.328-.434q.577.206,1.071.434Z",transform:"translate(298.432 -0.912)",fill:"#e6e6e6"}),
9
+ /* @__PURE__ */d("path",{d:"M248.322,365.284a28.441,28.441,0,0,0-28.409,28.409V675.03a28.441,28.441,0,0,0,28.409,28.409H775.415a28.441,28.441,0,0,0,28.409-28.409V393.693a28.441,28.441,0,0,0-28.409-28.409Z",transform:"translate(318.982 21.923)",fill:"#3f3d56"}),
10
+ /* @__PURE__ */d("path",{d:"M777.254,685.116H250.161a8.257,8.257,0,0,1-8.248-8.248V395.532a8.257,8.257,0,0,1,8.248-8.248H777.254a8.257,8.257,0,0,1,8.248,8.248V676.869a8.257,8.257,0,0,1-8.248,8.248Zm-527.092-296a6.422,6.422,0,0,0-6.415,6.415V676.869a6.422,6.422,0,0,0,6.415,6.415H777.254a6.422,6.422,0,0,0,6.415-6.415V395.532a6.422,6.422,0,0,0-6.415-6.415Z",transform:"translate(317.143 20.083)",fill:"#ccc"}),
11
+ /* @__PURE__ */d("ellipse",{cx:"71.849",cy:"89.934",rx:"71.849",ry:"89.934",transform:"translate(928.82 428.806)",fill:"#f2f2f2"}),
12
+ /* @__PURE__ */d("path",{d:"M505.77,325.365h.2l3.553,203.7h-7.5Z",transform:"translate(495.097 175.29)",fill:"#ccc"}),
13
+ /* @__PURE__ */d("path",{d:"M736.239,636.154h0a1.776,1.776,0,0,1-.744,2.4l-10.3,5.425-1.655-3.144,10.3-5.425A1.776,1.776,0,0,1,736.239,636.154Z",transform:"translate(276.882 -0.641)",fill:"#ccc"}),
14
+ /* @__PURE__ */d("ellipse",{cx:"71.849",cy:"89.934",rx:"71.849",ry:"89.934",transform:"translate(722.256 428.806)",fill:"#f2f2f2"}),
15
+ /* @__PURE__ */d("path",{d:"M510.532,627.307h0a1.777,1.777,0,0,0-2.4-.744l-7.194,3.788-2.464-141.27h-.2l-3.75,203.7h7.5l-1.02-58.456,8.78-4.622A1.777,1.777,0,0,0,510.532,627.307Z",transform:"translate(296.026 11.574)",fill:"#ccc"}),
16
+ /* @__PURE__ */d("path",{d:"M626.318,603.854a2.25,2.25,0,0,0-3.04-.943l-9.116,4.8-3.122-179h-.25l-4.752,258.115h9.5l-1.292-74.07,11.125-5.857a2.251,2.251,0,0,0,.943-3.04Z",transform:"translate(286.704 16.621)",fill:"#3f3d56"}),
17
+ /* @__PURE__ */d("path",{d:"M777.247,703.1H250.155a30.276,30.276,0,0,1-30.241-30.241V391.525a30.276,30.276,0,0,1,30.241-30.241H777.247a30.276,30.276,0,0,1,30.241,30.241V672.862A30.276,30.276,0,0,1,777.247,703.1Z",transform:"translate(318.982 22.257)",fill:"#fff"}),
18
+ /* @__PURE__ */d("path",{d:"M671.188,708.113h-370.8c-.464,0-.928-.01-1.386-.036l175.372-98.766c3.339-1.919,10.831-2.595,16.734-1.509a15.16,15.16,0,0,1,4.641,1.509l117.7,66.28,5.639,3.172Z",transform:"translate(288.046 16.168)",fill:"#f2f2f2"}),
19
+ /* @__PURE__ */d("path",{d:"M788.457,708.163H467.743l62.148-29.351,4.472-2.114,80.984-38.25c5.309-2.507,18.082-2.663,24.324-.473q.629.224,1.166.473Z",transform:"translate(287.761 16.118)",fill:"#f2f2f2"}),
20
+ /* @__PURE__ */d("path",{d:"M777.247,703.1H250.155a30.276,30.276,0,0,1-30.241-30.241V391.525a30.276,30.276,0,0,1,30.241-30.241H777.247a30.276,30.276,0,0,1,30.241,30.241V672.862A30.276,30.276,0,0,1,777.247,703.1ZM250.155,363.117a28.441,28.441,0,0,0-28.409,28.409V672.862a28.441,28.441,0,0,0,28.409,28.409H777.247a28.441,28.441,0,0,0,28.409-28.409V391.525a28.441,28.441,0,0,0-28.409-28.409Z",transform:"translate(318.982 22.257)",fill:"#3f3d56"}),
21
+ /* @__PURE__ */d("g",{transform:"translate(696.754 297.373)",children:[
22
+ /* @__PURE__ */d("ellipse",{cx:"61.798",cy:"61.798",rx:"61.798",ry:"61.798",transform:"translate(215.662 36.955)",fill:"#ff6584"}),
23
+ /* @__PURE__ */d("ellipse",{cx:"78.271",cy:"97.971",rx:"78.271",ry:"97.971",transform:"translate(225.025 127.808)",fill:"#e6e6e6"}),
24
+ /* @__PURE__ */d("path",{d:"M508.105,323.365h.215l3.87,221.909h-8.171Z",transform:"translate(-204.593 -117.286)",fill:"#ccc"}),
25
+ /* @__PURE__ */d("path",{d:"M739.374,634.239h0a1.935,1.935,0,0,1-.811,2.614l-11.226,5.91-1.8-3.425,11.226-5.91A1.935,1.935,0,0,1,739.374,634.239Z",transform:"translate(-422.513 -281.249)",fill:"#ccc"}),
26
+ /* @__PURE__ */d("ellipse",{cx:"78.271",cy:"97.971",rx:"78.271",ry:"97.971",transform:"translate(0 127.808)",fill:"#e6e6e6"}),
27
+ /* @__PURE__ */d("path",{d:"M513.962,637.661h0a1.936,1.936,0,0,0-2.614-.811l-7.837,4.126-2.684-153.9h-.215l-4.085,221.91H504.7l-1.111-63.68,9.565-5.036A1.936,1.936,0,0,0,513.962,637.661Z",transform:"translate(-422.126 -281.002)",fill:"#ccc"}),
28
+ /* @__PURE__ */d("path",{d:"M612.666,280.653c54.774,0,99.294,103.207,99.294,171.768s-44.4,124.14-99.177,124.14-99.177-55.579-99.177-124.14S557.892,280.653,612.666,280.653Z",transform:"translate(-422.155 -280.653)",fill:"currentColor"}),
29
+ /* @__PURE__ */d("path",{d:"M630.131,617.508a2.452,2.452,0,0,0-3.312-1.027l-9.931,5.228-3.4-195h-.272L608.039,707.89h10.353l-1.408-80.69,12.119-6.38A2.452,2.452,0,0,0,630.131,617.508Z",transform:"translate(-422.315 -280.9)",fill:"#3f3d56"})]})]})}),/* @__PURE__ */d("div",{className:"space-y-4",children:[/* @__PURE__ */d("h4",{className:"text-foreground text-center text-lg font-semibold",children:e}),/* @__PURE__ */d("p",{className:"text-muted-foreground text-center",children:t})]})]})}function St({organizationId:e,errorType:t}){/* @__PURE__ */
30
+ return d(Rt,"custom-auth-invalid"===t?{title:"Invalid input",children:"Custom auth mode requires uid, fname, lname. For more details please contact Qrati support."}:"service-unavailable"===t?{title:"We'll be right back!",children:"Our service is getting a quick tune-up. Hang tight — great things are coming your way soon!"}:{title:"page-not-registered"===t?"Page not registered":"Something went wrong",children:["If you are an admin of this organization, please add the current page URL in Allowed URLs under"," ",
31
+ /* @__PURE__ */d("a",{className:"font-medium text-blue-500",href:Ke.ORGANIZATION_SETTINGS(e),target:"_blank",rel:"noreferrer",children:"Organization Settings"})," ","⇨"," ",
32
+ /* @__PURE__ */d("a",{className:"font-medium text-blue-500",href:Ke.ORGANIZATION_SETTINGS_INTEGRATION(e),target:"_blank",rel:"noreferrer",children:"Integration Settings"}),". For more details please contact Qrati support."]})}var Tt=e=>({google:"Google",apple:"Apple"}[e]||e.charAt(0).toUpperCase()+e.slice(1)),Ot=async e=>{try{return await e()}catch{return null}},At=(e,t=1)=>{const r=(new TextEncoder).encode(e),s=3432918353,n=461845907;let o=t>>>0;const i=Math.floor(r.length/4),a=new DataView(r.buffer,r.byteOffset,r.byteLength);for(let h=0;h<i;h++){let e=a.getUint32(4*h,!0);e=Math.imul(e,s),e=e<<15|e>>>17,e=Math.imul(e,n),o^=e,o=o<<13|o>>>19,o=Math.imul(o,5)+3864292196>>>0}let c=0;const l=4*i,u=3&r.length;return 3===u&&(c^=r[l+2]<<16),u>=2&&(c^=r[l+1]<<8),u>=1&&(c^=r[l],c=Math.imul(c,s),c=c<<15|c>>>17,c=Math.imul(c,n),o^=c),o^=r.length,o^=o>>>16,o=Math.imul(o,2246822507)>>>0,o^=o>>>13,o=Math.imul(o,3266489909)>>>0,o^=o>>>16,o.toString(16).padStart(8,"0")},It=e=>{if(null===e||"object"!=typeof e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(It).join(",")}]`;const t=Object.keys(e).sort(),r=[];for(const s of t){const t=e[s];void 0!==t&&r.push(`${It(s)}:${It(t)}`)}return`{${r.join(",")}}`},Ct=async({debug:e=!1}={})=>{const t=performance.now(),r=await Ot(async()=>window.navigator.userAgentData&&"function"==typeof window.navigator.userAgentData.getHighEntropyValues?It(await window.navigator.userAgentData.getHighEntropyValues(["architecture","bitness","platformVersion","model","fullVersionList"])):null),s=await Ot(()=>(()=>{const e=document.createElement("video"),t=["video/webm","video/mp4","video/ogg","audio/mp4","audio/webm","audio/ogg","audio/mpeg"],r={};for(const s of t){const t=e.canPlayType(s);r[s]=""===t?"no":t}return It(r)})()),n=await Ot(()=>(()=>{const e=["monospace","serif","sans-serif"],t=["Arial","Helvetica","Verdana","Trebuchet MS","Comic Sans MS","Georgia","Times New Roman","Courier New","Segoe UI","Roboto","Open Sans","Noto Sans","system-ui","-apple-system","BlinkMacSystemFont"],r=document.createElement("span");r.style.fontSize="72px",r.style.position="absolute",r.style.visibility="hidden",r.style.whiteSpace="nowrap",r.textContent="mmmmmmmmmwwwwwww",document.body.appendChild(r);const s={};for(const o of e)r.style.fontFamily=o,s[o]=r.offsetWidth;const n=[];for(const o of t){let t=!1;for(const i of e)if(r.style.fontFamily=`"${o}", ${i}`,r.offsetWidth!==s[i]){n.push(o),t=!0;break}t||(r.style.fontFamily=`"${o}"`,r.offsetWidth!==s.monospace&&r.offsetWidth!==s.serif&&n.push(o))}return document.body.removeChild(r),n.length?n.sort().join(","):null})()),o=await Ot(()=>new Intl.NumberFormat(window.navigator.languages?.[0]||"en").resolvedOptions().numberingSystem),i=window.navigator.languages?Array.from(window.navigator.languages).join(","):window.navigator.language||null,a=Intl.DateTimeFormat().resolvedOptions(),c=a.timeZone,l=/* @__PURE__ */(new Date).getTimezoneOffset(),u=a.calendar||null,h=void 0!==a.hour12?a.hour12?"h12":"h23":a.hourCycle||null,d=window.matchMedia("(prefers-reduced-motion: reduce)").matches?"reduce":"no-preference",p=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",f=window.matchMedia("(prefers-contrast: more)").matches?"more":window.matchMedia("(prefers-contrast: less)").matches?"less":window.matchMedia("(prefers-contrast: custom)").matches?"custom":"no-preference",y=window.matchMedia("(prefers-reduced-transparency: reduce)").matches?"reduce":"no-preference",m=window.matchMedia("(forced-colors: active)").matches?"active":null,g="number"==typeof window.devicePixelRatio?Math.round(100*window.devicePixelRatio)/100:null,{pixelDepth:w,colorDepth:b}=window.screen,v="ontouchstart"in window||window.navigator.maxTouchPoints>0,E=await Ot(()=>(async e=>{const t=document.createElement("canvas");t.width=280,t.height=100;const r=t.getContext("2d"),s=r.createLinearGradient(0,0,280,100);return s.addColorStop(0,"#f60"),s.addColorStop(.4,"#09f"),s.addColorStop(.7,"#f09"),s.addColorStop(1,"#0f9"),r.fillStyle=s,r.fillRect(0,0,280,100),r.font='18px "Arial","Helvetica","DejaVu Sans",sans-serif',r.fillStyle="#000",r.textBaseline="alphabetic",r.fillText("Fingerprint ¼½¾™©®∆π∑€¶§",12,45),r.font='bold 22px "Georgia","Times New Roman",serif',r.fillStyle="#222",r.fillText("🦊🐱🚀 2026",12,78),r.globalAlpha=.7,r.fillStyle="rgba(255, 80, 0, 0.35)",r.fillRect(180,20,80,60),r.beginPath(),r.arc(220,50,32,0,2*Math.PI),r.strokeStyle="#fff",r.lineWidth=4,r.stroke(),r.beginPath(),r.moveTo(30,85),r.quadraticCurveTo(140,20,240,85),r.strokeStyle="#00f",r.lineWidth=3,r.stroke(),e&&(t.style.border="1px solid #444",document.body.appendChild(t)),At(t.toDataURL("image/png"))})(e)),R=await Ot(()=>(async()=>{const e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl"),r=t.getExtension("WEBGL_debug_renderer_info");return At(It({vendor:r?t.getParameter(r.UNMASKED_VENDOR_WEBGL):t.getParameter(t.VENDOR),renderer:r?t.getParameter(r.UNMASKED_RENDERER_WEBGL):t.getParameter(t.RENDERER)}))})()),S=await Ot(()=>(async e=>{const t=await navigator.gpu.requestAdapter({powerPreference:"high-performance"}),r={vendor:t.info?.vendor??"",architecture:t.info?.architecture??"",description:t.info?.description??"",features:Array.from(t.features).sort(),limits:Array.from(t.limits).sort()};if(e){const e=document.createElement("pre");e.style.margin="10px 0",e.style.padding="10px",e.style.border="1px solid #444",e.style.background="#111",e.style.color="#0f8",e.style.fontFamily="monospace",e.textContent=`WebGPU:\n${JSON.stringify(r,null,2)}`,document.body.appendChild(e)}return At(It(r))})(e)),T=await Ot(()=>(async e=>{const t=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,6e3,44100),r=t.createOscillator();r.type="sawtooth",r.frequency.value=8800;const s=t.createDynamicsCompressor();s.threshold.value=-48,s.knee.value=30,s.ratio.value=14,s.attack.value=0,s.release.value=.3;const n=t.createGain();n.gain.value=.4,r.connect(s),s.connect(n),n.connect(t.destination),r.start(0);const o=(await t.startRendering()).getChannelData(0);let i=0,a=0;for(let l=3e3;l<5800;l+=2){const e=o[l];i=31*i+Math.floor(1e5*(e+1))|0,a=Math.imul(a^Math.floor(98765*e),2246822519)}const c=i>>>0^a>>>0;if(e){const e=document.createElement("canvas");e.width=500,e.height=120,e.style.border="1px solid #444",e.style.margin="10px 0",e.title="Audio buffer snippet (4500–5000 samples)";const t=e.getContext("2d");t.fillStyle="#111",t.fillRect(0,0,e.width,e.height),t.font="14px monospace",t.fillStyle="#0f8",t.textAlign="left",t.fillText("AudioID",10,20),t.strokeStyle="#0f8",t.lineWidth=1.5,t.beginPath();const r=Array.from(o.slice(4500,5e3)),s=e.width/r.length;for(let n=0;n<r.length;n++){const o=n*s,i=(r[n]+1)/2*e.height;0===n?t.moveTo(o,i):t.lineTo(o,i)}t.stroke(),document.body.appendChild(e)}return At(c.toString(16))})(e)),O=window.screen.width&&window.screen.height?(window.screen.width/window.screen.height).toFixed(4):null,A=await Ot(()=>window.screen.orientation?.type||null),I=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection,C=I&&I.type||null,P=I?.effectiveType||null,N=!0===I?.saveData,D="boolean"==typeof window.navigator.pdfViewerEnabled?window.navigator.pdfViewerEnabled:null,x="boolean"==typeof window.navigator.webdriver?window.navigator.webdriver:null,_=await Ot(()=>"function"!=typeof Intl.supportedValuesOf?null:Intl.supportedValuesOf("calendar").join(",")),q=await Ot(async()=>{if(!window.navigator.permissions||"function"!=typeof window.navigator.permissions.query)return null;const e=["geolocation","notifications"],t={};for(const r of e)try{t[r]=(await window.navigator.permissions.query({name:r})).state}catch{t[r]="unsupported"}return It(t)}),L={vendor:window.navigator.vendor||null,platform:window.navigator.platform||null,userAgentHighEntropy:r||null,mediaCodecs:s||null,fonts:n,numberingSystem:o,languages:i,timezone:c,timezoneOffset:l,intlCalendar:u,hourCycle:h,reducedMotion:d,colorScheme:p,prefersContrast:f,prefersReducedTransparency:y,pdfViewerEnabled:D,webdriver:x,intlSupportedCalendars:_||null,permissionsState:q||null,hardwareConcurrency:window.navigator.hardwareConcurrency||null,deviceMemory:window.navigator.deviceMemory||null,forcedColors:m,devicePixelRatio:g,pixelDepth:w,colorDepth:b,touchSupport:v,screenOrientation:A||null,connectionType:C,effectiveType:P,saveData:N,canvasID:E,webglID:R,webgpuID:S,audioID:T},U={aspectRatio:O,width:window.screen.width,height:window.screen.height,maxTouchPoints:window.navigator.maxTouchPoints};(!0===navigator.userAgentData?.mobile||/Mobi|Android|iPhone|iPad|iPod|webOS|BlackBerry|Windows Phone/i.test(navigator.userAgent)||navigator.maxTouchPoints>0&&matchMedia("(pointer:coarse)").matches&&innerWidth<=1024)&&Object.assign(L,U);const M=At(It(L)),F=Math.round(performance.now()-t);return{fingerprint:M,...L,elapsedMs:F}};"undefined"!=typeof window&&(window.getBrowserFingerprint=Ct);var Pt=async(e,t)=>{if(e instanceof ge){try{const t=await e.response.json();if(t?.error)return t.error;if(t?.message)return t.message;if("INVALID_EMAIL_OR_PASSWORD"===t?.code)return"Invalid email or password"}catch{return t||e.message}return t||e.message}return e instanceof Error?t||e.message:t||String(e)},Nt=e(void 0),Dt=({props:e={},children:t})=>{const{organizationId:n,uid:i,fname:y,lname:m,theme:g="light"}=e,w=u(null),[b,v]=s(()=>{if("undefined"==typeof window)return null;if(i||y||m)return null;const e=localStorage.getItem("qrati_token");return e?{token:e}:null}),{isLoading:E,data:R,error:S}=me({queryKey:[Et.QRATI_CONNECT_SESSION,n,i??null,y??null,m??null],queryFn:async()=>{const e=await(async()=>{const e=await Ct();return"string"==typeof e?e:e?.fingerprint})();return(await Be.post(Xe.INITIALIZE_SESSION,{json:{uid:i,fname:y,lname:m,browserFingerprint:e},headers:{"x-org-id":n,Authorization:i||y||m||!localStorage.getItem("qrati_token")?void 0:`Bearer ${localStorage.getItem("qrati_token")}`}}).json()).data},enabled:!!n});f(()=>{const e=R?.authSession?.session?.token,t=R?.authSession?.user;t&&e?(v({...t,token:e}),R?.organization?.customAuth||localStorage.setItem("qrati_token",e)):R?.organization?.customAuth&&i&&y&&m&&v(e=>e??{uid:i,name:`${y} ${m}`,fname:y,lname:m})},[R]);const T=r(()=>{const e=R?.organization?.integrationSettings?.fontFamily,t=c("https://qrati.com",e),r=l("https://qrati.com",n);return o(R?.organization?.integrationSettings,R?.organization?.customFontUrl?r||R.organization.customFontUrl:void 0,t||void 0)},[R?.organization?.integrationSettings,R?.organization?.customFontUrl,n]),O=async e=>{try{const t=await((e,t,r)=>new Promise((s,n)=>{if(!e)return void n(/* @__PURE__ */new Error("Provider is required"));if(!t)return void n(/* @__PURE__ */new Error("Organization ID is required"));const o=new URL(`${r}/qc-social-auth`);o.searchParams.set("provider",e),o.searchParams.set("organizationId",t),o.searchParams.set("origin",window.location.origin);const i=(window.screen.width-500)/2,a=(window.screen.height-600)/2,c=window.open(o.toString(),"qrati_social_auth",`width=500,height=600,left=${i},top=${a},scrollbars=yes,resizable=yes,status=yes`);if(!c)return void n(/* @__PURE__ */new Error("Failed to open popup window. Please allow popups and try again."));const l=()=>{clearInterval(h),clearTimeout(d),window.removeEventListener("message",u)},u=e=>{try{const t=new URL(r).origin;if(e.origin!==t)return void console.warn("Origin mismatch:",e.origin,"expected:",t)}catch(h){console.warn("Could not parse origin for verification")}const{type:o,data:i,error:a,organizationId:u}=e.data||{};if(u===t)switch(o){case"QRATI_SOCIAL_AUTH_SUCCESS":l(),c.close(),s({user:i.user,session:i.session,token:i.token});break;case"QRATI_SOCIAL_AUTH_ERROR":console.error("Authentication error:",a),l(),c.close(),n(new Error(a||"Social authentication failed"));break;case"QRATI_SOCIAL_AUTH_CANCELLED":l(),c.close(),n(/* @__PURE__ */new Error("Authentication was cancelled"))}else console.warn("Organization ID mismatch:",u,"expected:",t)},h=setInterval(()=>{try{c.closed&&(l(),n(/* @__PURE__ */new Error("Authentication was cancelled")))}catch(e){}},1e3);window.addEventListener("message",u);const d=setTimeout(()=>{l(),c.closed||c.close(),n(/* @__PURE__ */new Error("Authentication timeout. Please try again."))},3e5)}))(e,n??"","https://qrati.com");return t?.user&&t?.token&&(v({...t.user,token:t.token}),localStorage.setItem("qrati_token",t.token)),t}catch(S){throw console.error("Social login error:",S),S}};if(S){const e=S;/* @__PURE__ */
33
+ return d(p,{fallback:null,children:/* @__PURE__ */d(St,{organizationId:n??"",errorType:401===e?.response?.status?"page-not-registered":e?.response?"generic-error":"service-unavailable"})})}return!R?.organization?.customAuth||i&&y&&m?/* @__PURE__ */d(Nt.Provider,{value:{props:e,initializing:E,sessionId:R?.sessionId,organization:R?.organization,folders:R?.folders,loadingUser:E,user:b,updateUser:async e=>{v(t=>{const r={...t,...e};return r?.token&&localStorage.setItem("qrati_token",r.token),r})},registerUsingEmail:async(e,t,r,s)=>{try{const o=await Be.post(Xe.REGISTER,{json:{email:e,password:t,fname:r,lname:s},headers:{"x-org-id":n}}).json();return o.error?{error:o.error}:(v({...o.user,token:o.token}),localStorage.setItem("qrati_token",o.token),o)}catch(S){return{error:await Pt(S,"Registration failed")}}},loginWithGoogle:async()=>{try{return await O("google")}catch(S){throw console.error("Google login error:",S),S}},loginWithApple:async()=>{try{return await O("apple")}catch(S){throw console.error("Apple login error:",S),S}},loginUsingEmail:async(e,t)=>{try{const r=await Be.post(Xe.LOGIN,{json:{email:e,password:t},headers:{"x-org-id":n}}).json();return r.error?{error:r.error}:(v({...r.user,token:r.token}),localStorage.setItem("qrati_token",r.token),r)}catch(S){return{error:await Pt(S,"Invalid email or password")}}},sendPasswordResetCode:async e=>{try{const t=await Be.post(Xe.SEND_PASSWORD_RESET_CODE,{json:{email:e.toLowerCase()},headers:{"x-org-id":n}}).json();return t.error?{error:t.error}:t}catch(S){return{error:await Pt(S,"Failed to send password reset code")}}},verifyPasswordResetCode:async(e,t)=>{try{const r=await Be.post(Xe.VERIFY_PASSWORD_RESET_CODE,{json:{email:e.toLowerCase(),code:t},headers:{"x-org-id":n}}).json();return r.error?{error:r.error}:r}catch(S){return{error:await Pt(S,"Invalid code, please check your email")}}},resetPassword:async(e,t)=>{try{const r=await Be.post(Xe.RESET_PASSWORD,{json:{passwordResetCodeId:e,newPassword:t},headers:{"x-org-id":n}}).json();return r.error?{error:r.error}:r}catch(S){return{error:S?.message}}},signout:async()=>{try{const e=await Be.post(Xe.LOGOUT,{headers:{"x-org-id":n,Authorization:`Bearer ${b?.token}`}}).json();return e.error?{error:e.error}:(localStorage.removeItem("qrati_token"),v(null),e)}catch(S){return console.error(S),{error:S?.message}}},error:S,portalContainer:w.current},children:/* @__PURE__ */d("div",{ref:w,id:"qrati-connect-container",style:{...h(R?.organization,g),fontFamily:"var(--font-family)"},className:a("bg-background text-foreground relative min-h-[80vh]"),children:[T?/* @__PURE__ */d("style",{children:T}):null,t]})}):/* @__PURE__ */d(p,{fallback:null,children:/* @__PURE__ */d(St,{organizationId:n??"",errorType:"custom-auth-invalid"})})},xt=()=>{const e=n(Nt);if(void 0===e)throw new Error("useSession must be used within SessionProvider");return e};export{T as $,yt as A,B,ot as C,gt as D,Et as E,ue as F,$ as G,V as H,ne as I,C as J,E as K,ee as L,me as M,ye as N,ct as O,he as P,N as Q,X as R,Ke as S,Ze as T,F as U,z as V,k as W,A as X,I as Y,v as Z,pt as _,et as a,it as b,bt as c,ht as d,j as et,dt as f,ut as g,nt as h,Tt as i,Be as j,ft as k,Xe as l,tt as m,xt as n,y as nt,vt as o,st as p,P as q,Ct as r,wt as s,Dt as t,m as tt,at as u,mt as v,rt as w,Je as x,lt as y,Y as z};
@@ -0,0 +1,3 @@
1
+ import{D as t,G as e,K as i,N as s,O as o,P as n,R as a,U as r,W as l,f as c,j as h,m as d,n as p,p as u,v as m,x as f,z as g}from"./DNlPVBFF.js";import{j as y,l as _,m as v,n as b,o as x,r as w,s as T}from"./B6AogNwO.js";import{t as S}from"./rlHVjK3t.js";var P=Object.freeze({left:0,top:0,width:16,height:16}),I=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),z=Object.freeze({...P,...I}),C=Object.freeze({...z,body:"",hidden:!1});function L(t,e){const i=function(t,e){const i={};!t.hFlip!=!e.hFlip&&(i.hFlip=!0),!t.vFlip!=!e.vFlip&&(i.vFlip=!0);const s=((t.rotate||0)+(e.rotate||0))%4;return s&&(i.rotate=s),i}(t,e);for(const s in C)s in I?s in t&&!(s in i)&&(i[s]=I[s]):s in e?i[s]=e[s]:s in t&&(i[s]=t[s]);return i}function k(t,e,i){const s=t.icons,o=t.aliases||Object.create(null);let n={};function a(t){n=L(s[t]||o[t],n)}return a(e),i.forEach(a),L(t,n)}function A(t,e){const i=[];if("object"!=typeof t||"object"!=typeof t.icons)return i;t.not_found instanceof Array&&t.not_found.forEach(t=>{e(t,null),i.push(t)});const s=function(t){const e=t.icons,i=t.aliases||Object.create(null),s=Object.create(null);return Object.keys(e).concat(Object.keys(i)).forEach(function t(o){if(e[o])return s[o]=[];if(!(o in s)){s[o]=null;const e=i[o]&&i[o].parent,n=e&&t(e);n&&(s[o]=[e].concat(n))}return s[o]}),s}(t);for(const o in s){const n=s[o];n&&(e(o,k(t,o,n)),i.push(o))}return i}var O={provider:"",aliases:{},not_found:{},...P};function E(t,e){for(const i in e)if(i in t&&typeof t[i]!=typeof e[i])return!1;return!0}function D(t){if("object"!=typeof t||null===t)return null;const e=t;if("string"!=typeof e.prefix||!t.icons||"object"!=typeof t.icons)return null;if(!E(t,O))return null;const i=e.icons;for(const o in i){const t=i[o];if(!o||"string"!=typeof t.body||!E(t,C))return null}const s=e.aliases||Object.create(null);for(const o in s){const t=s[o],e=t.parent;if(!o||"string"!=typeof e||!i[e]&&!s[e]||!E(t,C))return null}return e}var Z=Object.create(null);function F(t,e){const i=Z[t]||(Z[t]=Object.create(null));return i[e]||(i[e]=function(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:/* @__PURE__ */new Set}}(t,e))}function M(t,e){return D(e)?A(e,(e,i)=>{i?t.icons[e]=i:t.missing.add(e)}):[]}var N=/^[a-z0-9]+(-[a-z0-9]+)*$/,B=(t,e,i,s="")=>{const o=t.split(":");if("@"===t.slice(0,1)){if(o.length<2||o.length>3)return null;s=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const t=o.pop(),i=o.pop(),n={provider:o.length>0?o[0]:s,prefix:i,name:t};return e&&!R(n)?null:n}const n=o[0],a=n.split("-");if(a.length>1){const t={provider:s,prefix:a.shift(),name:a.join("-")};return e&&!R(t)?null:t}if(i&&""===s){const t={provider:s,prefix:"",name:n};return e&&!R(t,i)?null:t}return null},R=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),j=!1;function H(t){return"boolean"==typeof t&&(j=t),j}function W(t){const e="string"==typeof t?B(t,!0,j):t;if(e){const t=F(e.provider,e.prefix),i=e.name;return t.icons[i]||(t.missing.has(i)?null:void 0)}}var $=Object.freeze({width:null,height:null}),V=Object.freeze({...$,...I}),q=/(-?[0-9.]*[0-9]+[0-9.]*)/g,U=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function G(t,e,i){if(1===e)return t;if(i=i||100,"number"==typeof t)return Math.ceil(t*e*i)/i;if("string"!=typeof t)return t;const s=t.split(q);if(null===s||!s.length)return t;const o=[];let n=s.shift(),a=U.test(n);for(;;){if(a){const t=parseFloat(n);isNaN(t)?o.push(n):o.push(Math.ceil(t*e*i)/i)}else o.push(n);if(n=s.shift(),void 0===n)return o.join("");a=!a}}var X=/\sid="(\S+)"/g,K="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),Y=0;function Q(t,e=K){const i=[];let s;for(;s=X.exec(t);)i.push(s[1]);if(!i.length)return t;const o="suffix"+(16777216*Math.random()|Date.now()).toString(16);return i.forEach(i=>{const s="function"==typeof e?e(i):e+(Y++).toString(),n=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+s+o+"$3")}),t=t.replace(new RegExp(o,"g"),"")}var J=Object.create(null);function tt(t){return J[t]||J[""]}function et(t){let e;if("string"==typeof t.resources)e=[t.resources];else if(e=t.resources,!(e instanceof Array&&e.length))return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:!0===t.random,index:t.index||0,dataAfterTimeout:!1!==t.dataAfterTimeout}}for(var it=Object.create(null),st=["https://api.simplesvg.com","https://api.unisvg.com"],ot=[];st.length>0;)1===st.length||Math.random()>.5?ot.push(st.shift()):ot.push(st.pop());function nt(t,e){const i=et(e);return null!==i&&(it[t]=i,!0)}function at(t){return it[t]}it[""]=et({resources:["https://api.iconify.design"].concat(ot)});var rt=(()=>{let t;try{if(t=fetch,"function"==typeof t)return t}catch(e){}})(),lt={prepare:(t,e,i)=>{const s=[],o=function(t,e){const i=at(t);if(!i)return 0;let s;if(i.maxURL){let t=0;i.resources.forEach(e=>{t=Math.max(t,e.length)});const o=e+".json?icons=";s=i.maxURL-t-i.path.length-o.length}else s=0;return s}(t,e),n="icons";let a={type:n,provider:t,prefix:e,icons:[]},r=0;return i.forEach((i,l)=>{r+=i.length+1,r>=o&&l>0&&(s.push(a),a={type:n,provider:t,prefix:e,icons:[]},r=i.length),a.icons.push(i)}),s.push(a),s},send:(t,e,i)=>{if(!rt)return void i("abort",424);let s=function(t){if("string"==typeof t){const e=at(t);if(e)return e.path}return"/"}(e.provider);switch(e.type){case"icons":{const t=e.prefix,i=e.icons.join(",");s+=t+".json?"+new URLSearchParams({icons:i}).toString();break}case"custom":{const t=e.uri;s+="/"===t.slice(0,1)?t.slice(1):t;break}default:return void i("abort",400)}let o=503;rt(t+s).then(t=>{const e=t.status;if(200===e)return o=501,t.json();setTimeout(()=>{i(function(t){return 404===t}(e)?"abort":"next",e)})}).then(t=>{"object"==typeof t&&null!==t?setTimeout(()=>{i("success",t)}):setTimeout(()=>{404===t?i("abort",t):i("next",o)})}).catch(()=>{i("next",o)})}};function ct(t,e){t.forEach(t=>{const i=t.loaderCallbacks;i&&(t.loaderCallbacks=i.filter(t=>t.id!==e))})}var ht=0,dt={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function pt(t){const e={...dt,...t};let i=[];function s(){i=i.filter(t=>"pending"===t().status)}return{query:function(t,o,n){const a=function(t,e,i,s){const o=t.resources.length,n=t.random?Math.floor(Math.random()*o):t.index;let a;if(t.random){let e=t.resources.slice(0);for(a=[];e.length>1;){const t=Math.floor(Math.random()*e.length);a.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}a=a.concat(e)}else a=t.resources.slice(n).concat(t.resources.slice(0,n));const r=Date.now();let l,c="pending",h=0,d=null,p=[],u=[];function m(){d&&(clearTimeout(d),d=null)}function f(){"pending"===c&&(c="aborted"),m(),p.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),p=[]}function g(t,e){e&&(u=[]),"function"==typeof t&&u.push(t)}function y(){c="failed",u.forEach(t=>{t(void 0,l)})}function _(){p.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),p=[]}return"function"==typeof s&&u.push(s),setTimeout(function s(){if("pending"!==c)return;m();const o=a.shift();if(void 0===o)return p.length?void(d=setTimeout(()=>{m(),"pending"===c&&(_(),y())},t.timeout)):void y();const n={status:"pending",resource:o,callback:(e,i)=>{!function(e,i,o){const n="success"!==i;switch(p=p.filter(t=>t!==e),c){case"pending":break;case"failed":if(n||!t.dataAfterTimeout)return;break;default:return}if("abort"===i)return l=o,void y();if(n)return l=o,void(p.length||(a.length?s():y()));if(m(),_(),!t.random){const i=t.resources.indexOf(e.resource);-1!==i&&i!==t.index&&(t.index=i)}c="completed",u.forEach(t=>{t(o)})}(n,e,i)}};p.push(n),h++,d=setTimeout(s,t.rotate),i(o,e,n.callback)}),function(){return{startTime:r,payload:e,status:c,queriesSent:h,queriesPending:p.length,subscribe:g,abort:f}}}(e,t,o,(t,e)=>{s(),n&&n(t,e)});return i.push(a),a},find:function(t){return i.find(e=>t(e))||null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:s}}function ut(){}var mt=Object.create(null);function ft(){}function gt(t,e,i){function s(){const i=t.pendingIcons;e.forEach(e=>{i&&i.delete(e),t.icons[e]||t.missing.add(e)})}if(i&&"object"==typeof i)try{if(!M(t,i).length)return void s()}catch(o){console.error(o)}s(),function(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,function(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let i=!1;const s=t.provider,o=t.prefix;e.forEach(e=>{const n=e.icons,a=n.pending.length;n.pending=n.pending.filter(e=>{if(e.prefix!==o)return!0;const a=e.name;if(t.icons[a])n.loaded.push({provider:s,prefix:o,name:a});else{if(!t.missing.has(a))return i=!0,!0;n.missing.push({provider:s,prefix:o,name:a})}return!1}),n.pending.length!==a&&(i||ct([t],e.id),e.callback(n.loaded.slice(0),n.missing.slice(0),n.pending.slice(0),e.abort))})}))}(t)}))}(t)}function yt(t,e){t instanceof Promise?t.then(t=>{e(t)}).catch(()=>{e(null)}):e(t)}function _t(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:e,prefix:i}=t,s=t.iconsToLoad;if(delete t.iconsToLoad,!s||!s.length)return;const o=t.loadIcon;if(t.loadIcons&&(s.length>1||!o))return void yt(t.loadIcons(s,i,e),e=>{gt(t,s,e)});if(o)return void s.forEach(s=>{yt(o(s,i,e),e=>{gt(t,[s],e?{prefix:i,icons:{[s]:e}}:null)})});const{valid:n,invalid:a}=function(t){const e=[],i=[];return t.forEach(t=>{(t.match(N)?e:i).push(t)}),{valid:e,invalid:i}}(s);if(a.length&&gt(t,a,null),!n.length)return;const r=i.match(N)?tt(e):null;r?r.prepare(e,i,n).forEach(i=>{!function(t,e,i){let s,o;if("string"==typeof t){const e=tt(t);if(!e)return i(void 0,424),ut;o=e.send;const n=function(t){if(!mt[t]){const e=at(t);if(!e)return;mt[t]={config:e,redundancy:pt(e)}}return mt[t]}(t);n&&(s=n.redundancy)}else{const e=et(t);if(e){s=pt(e);const i=tt(t.resources?t.resources[0]:"");i&&(o=i.send)}}s&&o?s.query(e,o,i)().abort:i(void 0,424)}(e,i,e=>{gt(t,i.icons,e)})}):gt(t,n,null)}))}var vt,bt=(t,e)=>{const i=function(t){const e={loaded:[],missing:[],pending:[]},i=Object.create(null);t.sort((t,e)=>t.provider!==e.provider?t.provider.localeCompare(e.provider):t.prefix!==e.prefix?t.prefix.localeCompare(e.prefix):t.name.localeCompare(e.name));let s={provider:"",prefix:"",name:""};return t.forEach(t=>{if(s.name===t.name&&s.prefix===t.prefix&&s.provider===t.provider)return;s=t;const o=t.provider,n=t.prefix,a=t.name,r=i[o]||(i[o]=Object.create(null)),l=r[n]||(r[n]=F(o,n));let c;c=a in l.icons?e.loaded:""===n||l.missing.has(a)?e.missing:e.pending;const h={provider:o,prefix:n,name:a};c.push(h)}),e}(function(t,e=!0,i=!1){const s=[];return t.forEach(t=>{const o="string"==typeof t?B(t,e,i):t;o&&s.push(o)}),s}(t,!0,H()));if(!i.pending.length){let t=!0;return e&&setTimeout(()=>{t&&e(i.loaded,i.missing,i.pending,ft)}),()=>{t=!1}}const s=Object.create(null),o=[];let n,a;return i.pending.forEach(t=>{const{provider:e,prefix:i}=t;if(i===a&&e===n)return;n=e,a=i,o.push(F(e,i));const r=s[e]||(s[e]=Object.create(null));r[i]||(r[i]=[])}),i.pending.forEach(t=>{const{provider:e,prefix:i,name:o}=t,n=F(e,i),a=n.pendingIcons||(n.pendingIcons=/* @__PURE__ */new Set);a.has(o)||(a.add(o),s[e][i].push(o))}),o.forEach(t=>{const e=s[t.provider][t.prefix];e.length&&_t(t,e)}),e?function(t,e,i){const s=ht++,o=ct.bind(null,i,s);if(!e.pending.length)return o;const n={id:s,icons:e,callback:t,abort:o};return i.forEach(t=>{(t.loaderCallbacks||(t.loaderCallbacks=[])).push(n)}),o}(e,i,o):ft},xt=/[\s,]+/;function wt(t,e){e.split(xt).forEach(e=>{switch(e.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0}})}function Tt(t,e=0){const i=t.replace(/^-?[0-9.]*/,"");function s(t){for(;t<0;)t+=4;return t%4}if(""===i){const e=parseInt(t);return isNaN(e)?0:s(e)}if(i!==t){let e=0;switch(i){case"%":e=25;break;case"deg":e=90}if(e){let o=parseFloat(t.slice(0,t.length-i.length));return isNaN(o)?0:(o/=e,o%1==0?s(o):0)}}return e}function St(t){return void 0===vt&&function(){try{vt=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch(t){vt=null}}(),vt?vt.createHTML(t):t}var Pt={...V,inline:!1},It={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},zt={display:"inline-block"},Ct={backgroundColor:"currentColor"},Lt={backgroundColor:"transparent"},kt={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},At={WebkitMask:Ct,mask:Ct,background:Lt};for(const Di in At){const t=At[Di];for(const e in kt)t[Di+e]=kt[e]}var Ot={...Pt,inline:!0};function Et(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}var Dt;if(H(!0),Dt=lt,J[""]=Dt,"undefined"!=typeof document&&"undefined"!=typeof window){const t=window;if(void 0!==t.IconifyPreload){const e=t.IconifyPreload,i="Invalid IconifyPreload syntax.";"object"==typeof e&&null!==e&&(e instanceof Array?e:[e]).forEach(t=>{try{("object"!=typeof t||null===t||t instanceof Array||"object"!=typeof t.icons||"string"!=typeof t.prefix||!function(t,e){if("object"!=typeof t)return!1;if("string"!=typeof e&&(e=t.provider||""),j&&!e&&!t.prefix){let e=!1;return D(t)&&(t.prefix="",A(t,(t,s)=>{(function(t,e){const s=B(t,!0,j);if(!s)return!1;const o=F(s.provider,s.prefix);return e?function(t,e,s){try{if("string"==typeof s.body)return t.icons[e]={...s},!0}catch(i){}return!1}(o,s.name,e):(o.missing.add(s.name),!0)})(t,s)&&(e=!0)})),e}const s=t.prefix;return!!R({prefix:s,name:"a"})&&!!M(F(e,s),t)}(t))&&console.error(i)}catch(e){console.error(i)}})}if(void 0!==t.IconifyProviders){const e=t.IconifyProviders;if("object"==typeof e&&null!==e)for(let t in e){const i="IconifyProviders["+t+"] is invalid.";try{const s=e[t];if("object"!=typeof s||!s||void 0===s.resources)continue;nt(t,s)||console.error(i)}catch(Ei){console.error(i)}}}}function Zt(t){const[e,s]=n(!!t.ssr),[o,a]=n({}),[r,l]=n(function(e){if(e){const e=t.icon;if("object"==typeof e)return{name:"",data:e};const i=W(e);if(i)return{name:e,data:i}}return{name:""}}(!!t.ssr));function c(){const t=o.callback;t&&(t(),a({}))}function h(t){if(JSON.stringify(r)!==JSON.stringify(t))return c(),l(t),!0}function d(){var e;const i=t.icon;if("object"==typeof i)return void h({name:"",data:i});const s=W(i);h({name:i,data:s})&&(void 0===s?a({callback:bt([i],d)}):s&&(null===(e=t.onLoad)||void 0===e||e.call(t,i)))}g(()=>(s(!0),c),[]),g(()=>{e&&d()},[t.icon,e]);const{name:p,data:u}=r;return u?((t,e,s)=>{const o=e.inline?Ot:Pt,n=function(t,e){const i={...t};for(const s in e){const t=e[s],o=typeof t;s in $?(null===t||t&&("string"===o||"number"===o))&&(i[s]=t):o===typeof i[s]&&(i[s]="rotate"===s?t%4:t)}return i}(o,e),a=e.mode||"svg",r={},l=e.style||{},c={..."svg"===a?It:{}};if(s){const t=B(s,!1,!0);if(t){const e=["iconify"];for(const i of["provider","prefix"])t[i]&&e.push("iconify--"+t[i]);c.className=e.join(" ")}}for(let i in e){const t=e[i];if(void 0!==t)switch(i){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":c.ref=t;break;case"className":c[i]=(c[i]?c[i]+" ":"")+t;break;case"inline":case"hFlip":case"vFlip":n[i]=!0===t||"true"===t||1===t;break;case"flip":"string"==typeof t&&wt(n,t);break;case"color":r.color=t;break;case"rotate":"string"==typeof t?n[i]=Tt(t):"number"==typeof t&&(n[i]=t);break;case"ariaHidden":case"aria-hidden":!0!==t&&"true"!==t&&delete c["aria-hidden"];break;default:void 0===o[i]&&(c[i]=t)}}const h=function(t,e){const i={...z,...t},s={...V,...e},o={left:i.left,top:i.top,width:i.width,height:i.height};let n=i.body;[i,s].forEach(t=>{const e=[],i=t.hFlip,s=t.vFlip;let a,r=t.rotate;switch(i?s?r+=2:(e.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),e.push("scale(-1 1)"),o.top=o.left=0):s&&(e.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),e.push("scale(1 -1)"),o.top=o.left=0),r<0&&(r-=4*Math.floor(r/4)),r%=4,r){case 1:a=o.height/2+o.top,e.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:e.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:a=o.width/2+o.left,e.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}r%2==1&&(o.left!==o.top&&(a=o.left,o.left=o.top,o.top=a),o.width!==o.height&&(a=o.width,o.width=o.height,o.height=a)),e.length&&(n=function(t,e){const i=function(t,e="defs"){let i="";const s=t.indexOf("<"+e);for(;s>=0;){const o=t.indexOf(">",s),n=t.indexOf("</"+e);if(-1===o||-1===n)break;const a=t.indexOf(">",n);if(-1===a)break;i+=t.slice(o+1,n).trim(),t=t.slice(0,s).trim()+t.slice(a+1)}return{defs:i,content:t}}(t);return s=i.defs,o=e+i.content+"</g>",s?"<defs>"+s+"</defs>"+o:o;var s,o}(n,'<g transform="'+e.join(" ")+'">'))});const a=s.width,r=s.height,l=o.width,c=o.height;let h,d;null===a?(d=null===r?"1em":"auto"===r?c:r,h=G(d,l/c)):(h="auto"===a?l:a,d=null===r?G(h,c/l):"auto"===r?c:r);const p={},u=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};u("width",h),u("height",d);const m=[o.left,o.top,l,c];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:n}}(t,n),d=h.attributes;if(n.inline&&(r.verticalAlign="-0.125em"),"svg"===a){c.style={...r,...l},Object.assign(c,d);let t=0,s=e.id;return"string"==typeof s&&(s=s.replace(/-/g,"_")),c.dangerouslySetInnerHTML={__html:St(Q(h.body,s?()=>s+"ID"+t++:"iconifyReact"))},i("svg",c)}const{body:p,width:u,height:m}=t,f="mask"===a||"bg"!==a&&-1!==p.indexOf("currentColor"),g=function(t,e){let i=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const s in e)i+=" "+s+'="'+e[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+t+"</svg>"}(p,{...d,width:u+"",height:m+""});var y;return c.style={...r,"--svg":(y=g,'url("'+function(t){return"data:image/svg+xml,"+function(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(t)}(y)+'")'),width:Et(d.width),height:Et(d.height),...zt,...f?Ct:Lt,...l},i("span",c)})({...z,...u},t,p):t.children?t.children:t.fallback?t.fallback:i("span",{})}var Ft=f((t,e)=>Zt({...t,_ref:e})),Mt=(f((t,e)=>Zt({inline:!0,...t,_ref:e})),t=>"boolean"==typeof t?`${t}`:0===t?"0":t),Nt=d,Bt=(t,e)=>i=>{var s;if(null==(null==e?void 0:e.variants))return Nt(t,null==i?void 0:i.class,null==i?void 0:i.className);const{variants:o,defaultVariants:n}=e,a=Object.keys(o).map(t=>{const e=null==i?void 0:i[t],s=null==n?void 0:n[t];if(null===e)return null;const a=Mt(e)||Mt(s);return o[t][a]}),r=i&&Object.entries(i).reduce((t,e)=>{let[i,s]=e;return void 0===s||(t[i]=s),t},{});return Nt(t,a,null==e||null===(s=e.compoundVariants)||void 0===s?void 0:s.reduce((t,e)=>{let{class:i,className:s,...o}=e;return Object.entries(o).every(t=>{let[e,i]=t;return Array.isArray(i)?i.includes({...n,...r}[e]):{...n,...r}[e]===i})?[...t,i,s]:t},[]),null==i?void 0:i.class,null==i?void 0:i.className)},Rt=Bt("",{variants:{variant:{default:"border-none",outline:"rounded",solid:"bg-background"},size:{sm:"size-4",md:"size-5",lg:"size-6",xl:"size-7","2xl":"size-8","3xl":"size-9"},color:{foreground:"text-foreground",primary:"text-primary",secondary:"text-muted-foreground",info:"text-info",warning:"text-warning",success:"text-success",error:"text-destructive",a11y:"text-primary-foreground",inherit:""}},compoundVariants:[{variant:"outline",color:"primary",class:"border-primary"},{variant:"outline",color:"secondary",class:"border-border"},{variant:"outline",color:"info",class:"border-info"},{variant:"outline",color:"warning",class:"border-warning"},{variant:"outline",color:"success",class:"border-success"},{variant:"outline",color:"error",class:"border-destructive"},{variant:"solid",color:"primary",class:"bg-background text-foreground"},{variant:"solid",color:"secondary",class:"bg-background text-muted-foreground"},{variant:"solid",color:"info",class:"bg-info text-foreground text-text-primary-dark"},{variant:"solid",color:"warning",class:"bg-warning text-foreground text-text-primary-dark"},{variant:"solid",color:"success",class:"bg-success text-foreground text-text-primary-dark"},{variant:"solid",color:"error",class:"bg-destructive text-foreground text-text-primary-dark"}],defaultVariants:{variant:"default",size:"md",color:"foreground"}}),jt=({className:t,color:e="foreground",size:i="md",variant:s="default",name:o="line-md:iconify1",...n})=>/* @__PURE__ */m(Ft,{icon:o,className:c(Rt({color:e,size:i,variant:s,className:t})),...n});function Ht({children:t,asChild:e=!1,...i}){if(e){const e=Array.isArray(t)?t[0]:t;if(e&&e.type)return l(e,{...i,...e.props})}/* @__PURE__ */
2
+ return m("button",{...i,children:t})}var Wt=Bt("shadow-outer inline-flex size-fit cursor-pointer items-center justify-center rounded font-medium transition-all duration-200 active:scale-95 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"gap-1 p-2 text-sm",md:"gap-2 px-4 py-2 text-sm sm:text-base",lg:"gap-2 px-4 py-3 text-lg",icon:"h-9 w-9 p-0"},color:{foreground:"bg-background text-foreground hover:bg-muted active:bg-muted/80",primary:"bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80",info:"bg-info hover:bg-info/90 active:bg-info/80 text-white",warning:"bg-warning hover:bg-warning/90 active:bg-warning/80 text-white",success:"bg-success hover:bg-success/90 active:bg-success/80 text-white",error:"bg-destructive hover:bg-destructive/90 active:bg-destructive/80 text-white"},variant:{default:"",outlined:"bg-transparent hover:bg-current/10 active:bg-current/15",ghost:"border-transparent bg-transparent shadow-none hover:bg-current/10 active:bg-current/15"}},compoundVariants:[{variant:"default",color:"primary",class:"border-primary border"},{variant:"default",color:"info",class:"border-info border"},{variant:"default",color:"warning",class:"border-warning border"},{variant:"default",color:"success",class:"border-success border"},{variant:"default",color:"error",class:"border-destructive border"},{variant:"outlined",color:"foreground",class:"text-foreground border-muted-foreground hover:bg-foreground/10 border bg-transparent"},{variant:"outlined",color:"primary",class:"border-primary text-primary hover:bg-primary/10 border bg-transparent"},{variant:"outlined",color:"info",class:"border-info text-info hover:bg-info/10 border bg-transparent"},{variant:"outlined",color:"warning",class:"border-warning text-warning hover:bg-warning/10 border bg-transparent"},{variant:"outlined",color:"success",class:"border-success text-success hover:bg-success/10 border bg-transparent"},{variant:"outlined",color:"error",class:"border-destructive text-destructive hover:bg-destructive/10 border bg-transparent"},{variant:"ghost",color:"primary",class:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"info",class:"text-info hover:bg-info/10"},{variant:"ghost",color:"warning",class:"text-warning hover:bg-warning/10"},{variant:"ghost",color:"success",class:"text-success hover:bg-success/10"},{variant:"ghost",color:"error",class:"text-destructive hover:bg-destructive/10"}],defaultVariants:{variant:"default",size:"md",color:"primary"}}),$t=({className:t,type:e="button",disabled:i,loading:s,fullWidth:o,color:n,size:a,variant:r,icon:l,iconName:h,iconSvg:d,asChild:p=!1,immutable:u,elementRef:f,children:g,...y})=>{const _=p?Ht:"button",v=p?{asChild:!0}:{},b=d||l||(h?/* @__PURE__ */m(jt,{name:h,className:"text-primary-foreground"}):null);/* @__PURE__ */
3
+ return m(_,{ref:f,type:e,disabled:i||s,className:c(Wt({color:n,size:a,variant:r}),t,o&&"w-full"),...v,...y,children:[/* @__PURE__ */m("div",{className:c(s?"collapse":"visible flex items-center gap-3"),children:[b&&!s&&b,g]}),s&&/* @__PURE__ */m("span",{className:"icon-[eos-icons--three-dots-loading] absolute size-6"})]})},Vt={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",p:"p",blockquote:"blockquote",body1:"p",body2:"p",body3:"p",caption:"span",overline:"span",lead:"p"},qt=Bt("antialiased",{variants:{variant:{h1:"scroll-m-20 text-4xl font-bold tracking-tight lg:text-5xl",h2:"scroll-m-20 text-3xl font-bold tracking-tight lg:text-4xl",h3:"scroll-m-20 text-2xl font-semibold tracking-tight",h4:"scroll-m-20 text-xl font-semibold",h5:"scroll-m-20 text-lg font-semibold",h6:"scroll-m-20 text-base font-semibold",body1:"text-base leading-relaxed font-medium",body2:"text-sm leading-relaxed",body3:"text-sm leading-relaxed sm:text-base",p:"text-base leading-7",lead:"text-muted-foreground text-xl leading-relaxed",blockquote:"border-primary/30 text-muted-foreground border-l-4 pl-4 text-base italic",caption:"text-muted-foreground text-xs",overline:"text-muted-foreground text-xs font-medium tracking-widest uppercase"},color:{foreground:"text-foreground",muted:"text-muted-foreground",primary:"text-primary",info:"text-info",warning:"text-warning",success:"text-success",error:"text-destructive",inherit:"text-inherit",secondary:"text-muted-foreground",white:"text-white",black:"text-black",a11y:"text-primary-foreground",light:"text-text-primary-light"},align:{left:"text-left",right:"text-right",center:"text-center",justify:"text-justify"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{variant:"body1",color:"foreground",align:"left"}}),Ut=({variant:t="body1",color:e,align:i,weight:s,transform:o,lines:n,shadow:a,noWrap:r,className:l,immutable:h,...d})=>/* @__PURE__ */m(Vt[t],{className:c(qt({variant:t,color:e,align:i,weight:s}),o,n&&n>0?`line-clamp-${n}`:void 0,a&&"drop-shadow-[0_1px_2px_rgba(0,0,0,0.5)]",r&&"truncate",l),...d,children:d.children}),Gt=async()=>{const t=await w();return"string"==typeof t?t:t?.fingerprint},Xt=()=>{const t=h(null),{props:e,sessionId:i,user:s}=b(),o=e?.organizationId,n=h(null),a=h(null),r=async(e,i)=>{if(e&&i&&(t.current||(t.current=await Gt()),t.current))try{await y.post(_.UPDATE_AD_ANALYTICS,{json:{adId:e,type:i,browserFingerprint:t.current},headers:{"x-org-id":o}})}catch(Ei){console.error(Ei)}},l=async t=>{if(i)try{await y.post(_.UPDATE_SESSION,{headers:{"x-org-id":o},json:{sessionId:i,pageViews:t}})}catch(Ei){console.error(Ei)}};return{incrementEventView:async e=>{if(e&&(t.current||(t.current=await Gt()),t.current))try{await y.post(_.INCREMENT_EVENT_VIEW,{json:{eventSlug:e,browserFingerprint:t.current},headers:{"x-org-id":o,Authorization:s?`Bearer ${s.token}`:void 0}})}catch(Ei){console.error(Ei)}},captureAdImpression:async t=>r(t,x.AD_IMPRESSION),captureAdEngagement:async t=>r(t,x.AD_ENGAGEMENT),captureAdClick:(t,e,i)=>{if(r(t,x.AD_CLICK),i)switch(e){case T.LINK:window.open(String(i),"_blank");break;case T.EMAIL:window.location.href=`mailto:${String(i)}`;break;case T.PHONE:window.location.href=`tel:${String(i)}`;break;case T.SMS:window.location.href=`sms:${String(i)}`;break;case T.WHATSAPP:window.location.href=`https://wa.me/${String(i)}`;break;case T.MESSENGER:window.location.href=`https://m.me/${String(i)}`;break;default:window.open(String(i),"_blank")}},trackPageView:t=>{n.current&&a.current&&l([{page:n.current,entryTime:a.current,exitTime:Date.now()}]),n.current=t??null,a.current=Date.now()},exportPageViewsData:l}},Kt=e(null),Yt=({open:t,onOpenChange:e,children:i})=>{const[s,o]=n(!!t);return g(()=>{"boolean"==typeof t&&o(t)},[t]),/* @__PURE__ */m(Kt.Provider,{value:{open:s,setOpen:t=>{o(t),e?.(t)}},children:i})},Qt=({children:t})=>/* @__PURE__ */m(r,{children:t}),Jt=({className:t,...e})=>/* @__PURE__ */m("div",{"data-state":a(Kt)?.open?"open":"closed",className:c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-2001 bg-black/15 backdrop-blur-md",t),...e}),te=({className:t,children:e,...i})=>{const{organization:s}=b(),o=a(Kt);return g(()=>{if(!o?.open)return;const t=t=>{"Escape"===t.key&&o.setOpen(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[o?.open]),o?.open?/* @__PURE__ */m(Qt,{children:[/* @__PURE__ */m(Jt,{onClick:()=>o.setOpen(!1)}),/* @__PURE__ */m("div",{role:"dialog","aria-modal":"true","data-state":o?.open?"open":"closed",className:c("border-border bg-background shadow-outer data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95 max-sm:data-[state=open]:slide-in-from-bottom max-sm:data-[state=closed]:slide-out-to-bottom fixed top-[50%] left-[50%] z-2002 h-fit w-auto max-w-5xl translate-x-[-50%] translate-y-[-50%] rounded border duration-300 max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-3xl max-sm:border-x-0 max-sm:border-b-0",t),style:u(s),...i,children:e})]}):null},ee=({className:t,...e})=>/* @__PURE__ */m("div",{className:c("flex flex-col space-y-1 p-3 text-center sm:text-left",t),...e}),ie=({className:t,...e})=>/* @__PURE__ */m("div",{className:c("p- flex justify-end space-x-3",t),...e}),se=({className:t,...e})=>/* @__PURE__ */m("h2",{className:c("text-center text-lg font-semibold",t),...e}),oe=({className:t,...e})=>/* @__PURE__ */m("p",{className:c("text-muted-foreground text-center text-sm",t),...e});!function(t){if("undefined"==typeof document)return;let e=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",e.firstChild?e.insertBefore(i,e.firstChild):e.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}(':root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n');var ne=t=>"number"==typeof t&&!isNaN(t),ae=t=>"string"==typeof t,re=t=>"function"==typeof t;function le({enter:e,exit:i,appendPosition:o=!1,collapse:n=!0,collapseDuration:a=300}){return function({children:r,position:l,preventExitTransition:c,done:d,nodeRef:p,isIn:u,playToast:m}){let f=o?`${e}--${l}`:e,y=o?`${i}--${l}`:i,_=h(0);return s(()=>{let t=p.current,e=f.split(" "),i=s=>{s.target===p.current&&(m(),t.removeEventListener("animationend",i),t.removeEventListener("animationcancel",i),0===_.current&&"animationcancel"!==s.type&&t.classList.remove(...e))};t.classList.add(...e),t.addEventListener("animationend",i),t.addEventListener("animationcancel",i)},[]),g(()=>{let t=p.current,e=()=>{t.removeEventListener("animationend",e),n?function(t,e,i=300){let{scrollHeight:s,style:o}=t;requestAnimationFrame(()=>{o.minHeight="initial",o.height=s+"px",o.transition=`all ${i}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(e,i)})})}(t,d,a):d()};u||(c?e():(_.current=1,t.className+=` ${y}`,t.addEventListener("animationend",e)))},[u]),t.createElement(t.Fragment,null,r)}}var ce=1,he=()=>""+ce++,de=/* @__PURE__ */new Map,pe=[],ue=/* @__PURE__ */new Set,me=()=>de.size>0;function fe(t,e){de.forEach(i=>{(null==e||null==e||!e.containerId||(null==e?void 0:e.containerId)===i.id)&&i.toggle(t,null==e?void 0:e.id)})}function ge(t){return t&&(ae(t.toastId)||ne(t.toastId))?t.toastId:he()}function ye(t,e){return function(t,e){(t=>o(t)||ae(t)||re(t)||ne(t))(t)&&(me()||pe.push({content:t,options:e}),de.forEach(i=>{i.buildToast(t,e)}))}(t,e),e.toastId}function _e(t,e){return{...e,type:e&&e.type||t,toastId:ge(e)}}function ve(t){return(e,i)=>ye(e,_e(t,i))}function be(t,e){return ye(t,_e("default",e))}be.loading=(t,e)=>ye(t,_e("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),be.promise=function(t,{pending:e,error:i,success:s},o){let n;e&&(n=ae(e)?be.loading(e,o):be.loading(e.render,{...o,...e}));let a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},r=(t,e,i)=>{if(null==e)return void be.dismiss(n);let s={type:t,...a,...o,data:i},r=ae(e)?{render:e}:e;return n?be.update(n,{...s,...r}):be(r.render,{...s,...r}),i},l=re(t)?t():t;return l.then(t=>r("success",s,t)).catch(t=>r("error",i,t)),l},be.success=ve("success"),be.info=ve("info"),be.error=ve("error"),be.warning=ve("warning"),be.warn=be.warning,be.dark=(t,e)=>ye(t,_e("default",{theme:"dark",...e})),be.dismiss=function(t){!function(t){if(me()){if(null==t||(t=>ae(t)||ne(t))(t))de.forEach(e=>{e.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){let e=de.get(t.containerId);e?e.removeToast(t.id):de.forEach(e=>{e.removeToast(t.id)})}}else pe=pe.filter(e=>null!=t&&e.options.toastId!==t)}(t)},be.clearWaitingQueue=(t={})=>{de.forEach(e=>{e.props.limit&&(!t.containerId||e.id===t.containerId)&&e.clearQueue()})},be.isActive=function(t,e){var i;if(e)return!(null==(i=de.get(e))||!i.isToastActive(t));let s=!1;return de.forEach(e=>{e.isToastActive(t)&&(s=!0)}),s},be.update=(t,e={})=>{let i=((t,{containerId:e})=>{var i;return null==(i=de.get(e||1))?void 0:i.toasts.get(t)})(t,e);if(i){let{props:s,content:o}=i,n={delay:100,...s,...e,toastId:e.toastId||t,updateId:he()};n.toastId!==t&&(n.staleId=t);let a=n.render||o;delete n.render,ye(a,n)}},be.done=t=>{be.update(t,{progress:1})},be.onChange=function(t){return ue.add(t),()=>{ue.delete(t)}},be.play=t=>fe(!0,t),be.pause=t=>fe(!1,t);var xe=(t,e=!1)=>({enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}),we=(le(xe("bounce",!0)),le(xe("slide",!0)),le(xe("zoom")),le(xe("flip")),({url:t,alt:e="",thumbnailUrl:i,blurhash:s,pswpData:o={},curateLink:n,onClick:a})=>{const l=/* @__PURE__ */m(r,{children:[/* @__PURE__ */m(S,{threshold:.1,src:i||t,blurhash:s,alt:e}),o.type===v.VIDEO&&/* @__PURE__ */m("div",{className:"absolute inset-0 top-0 left-0 flex items-center justify-center opacity-75",children:/* @__PURE__ */m("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-16 text-white lg:w-24",viewBox:"0 0 24 24",children:/* @__PURE__ */m("path",{fill:"currentColor",d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"})})})]});return a?/* @__PURE__ */m("button",{className:"h-full w-full",onClick:a,children:l}):n?/* @__PURE__ */m(p,{to:n,className:"h-full w-full",children:l}):/* @__PURE__ */m("a",{href:t,className:"pswp-item block h-full w-full",...Object.keys(o).reduce((t,e)=>{var i;return t[`data-pswp-${i=e,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`]=String(o[e]),t},{}),target:"_blank",rel:"noreferrer",children:l})});function Te(t,e,i){const s=document.createElement(e);return t&&(s.className=t),i&&i.appendChild(s),s}function Se(t,e){return t.x=e.x,t.y=e.y,void 0!==e.id&&(t.id=e.id),t}function Pe(t){t.x=Math.round(t.x),t.y=Math.round(t.y)}function Ie(t,e){const i=Math.abs(t.x-e.x),s=Math.abs(t.y-e.y);return Math.sqrt(i*i+s*s)}function ze(t,e){return t.x===e.x&&t.y===e.y}function Ce(t,e,i){return Math.min(Math.max(t,e),i)}function Le(t,e,i){let s=`translate3d(${t}px,${e||0}px,0)`;return void 0!==i&&(s+=` scale3d(${i},${i},1)`),s}function ke(t,e,i,s){t.style.transform=Le(e,i,s)}function Ae(t,e,i,s){t.style.transition=e?`${e} ${i}ms ${s||"cubic-bezier(.4,0,.22,1)"}`:"none"}function Oe(t,e,i){t.style.width="number"==typeof e?`${e}px`:e,t.style.height="number"==typeof i?`${i}px`:i}var Ee="loading",De="loaded",Ze="error";function Fe(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}function Me(t,e,i=document){let s=[];if(t instanceof Element)s=[t];else if(t instanceof NodeList||Array.isArray(t))s=Array.from(t);else{const o="string"==typeof t?t:e;o&&(s=Array.from(i.querySelectorAll(o)))}return s}function Ne(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}var Be=class{constructor(t,e){if(this.element=Te("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const e=this.element;e.decoding="async",e.alt="",e.src=t,e.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&("IMG"===this.element.tagName?(Oe(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=Le(0,0,t/250)):Oe(this.element,t,e))}destroy(){this.element?.parentNode&&this.element.remove(),this.element=null}},Re=class{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state="idle",this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.hash=this.data.hash,this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){const t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else this.placeholder=new Be(this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this),this.slide.container);this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=Te("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=Te("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const e=this.element;this.updateSrcsetSizes(),this.data.srcset&&(e.srcset=this.data.srcset),e.src=this.data.src??"",e.alt=this.data.alt??"",this.state=Ee,e.complete?this.onLoaded():(e.onload=()=>{this.onLoaded()},e.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=De,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),this.state!==De&&this.state!==Ze||this.removePlaceholder())}onError(){this.state=Ze,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===Ee,this)}isError(){return this.state===Ze}isImageContent(){return"image"===this.type||"ad"===this.type}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(Oe(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==Ze,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=`${e}px`,t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented||(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){let t=Te("pswp__error-msg","div");t.innerText=this.instance.options?.errorMsg??"",t=this.instance.applyFilters("contentErrorElement",t,this),this.element=Te("pswp__content pswp__error-msg-container","div"),this.element.appendChild(t),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===Ze)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||Ne())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){!this.instance.dispatch("contentActivate",{content:this}).defaultPrevented&&this.slide&&(this.isImageContent()&&this.isDecoding&&!Ne()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,this.instance.dispatch("contentRemove",{content:this}).defaultPrevented||(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),this.state!==De&&this.state!==Ze||this.removePlaceholder()))}};function je(t,e){if(t.getViewportSizeFn){const i=t.getViewportSizeFn(t,e);if(i)return i}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function He(t,e,i,s,o){let n=0;if(e.paddingFn)n=e.paddingFn(i,s,o)[t];else if(e.padding)n=e.padding[t];else{const i=`padding${t[0].toUpperCase()}${t.slice(1)}`;e[i]&&(n=e[i])}return Number(n)||0}function We(t,e,i,s){return{x:e.x-He("left",t,e,i,s)-He("right",t,e,i,s),y:e.y-He("top",t,e,i,s)-He("bottom",t,e,i,s)}}var $e=class{constructor(t,e,i,s){this.pswp=s,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const s={x:t,y:e};this.elementSize=s,this.panAreaSize=i;const o=i.x/s.x,n=i.y/s.y;this.fit=Math.min(1,o<n?o:n),this.fill=Math.min(1,o>n?o:n),this.vFill=Math.min(1,n),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=`${t}ZoomLevel`,i=this.options[e];if(i)return"function"==typeof i?i(this):"fill"===i?this.fill:"fit"===i?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,3*this.fit),this.elementSize&&t*this.elementSize.x>4e3&&(t=4e3/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}};function Ve(t,e,i){const s=e.createContentFromData(t,i);let o;const{options:n}=e;if(n){let a;o=new $e(n,t,-1),a=e.pswp?e.pswp.viewportSize:je(n,e);const r=We(n,a,t,i);o.update(s.width,s.height,r)}return s.lazyLoad(),o&&s.setDisplayedSize(Math.ceil(s.width*o.initial),Math.ceil(s.height*o.initial)),s}function qe(t,e){const i=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:i}).defaultPrevented)return Ve(i,e,t)}var Ue=class{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,5),this._cachedItems=[]}updateLazy(t){const{pswp:e}=this;if(e.dispatch("lazyLoad").defaultPrevented)return;const{preload:i}=e.options,s=void 0===t||t>=0;let o;for(o=0;o<=i[1];o++)this.loadSlideByIndex(e.currIndex+(s?o:-o));for(o=1;o<=i[0];o++)this.loadSlideByIndex(e.currIndex+(s?-o:o))}loadSlideByIndex(t){const e=this.pswp.getLoopedIndex(t);let i=this.getContentByIndex(e);i||(i=qe(e,this.pswp),i&&this.addToCache(i))}getContentBySlide(t){let e=this.getContentByIndex(t.index);return e||(e=this.pswp.createContentFromData(t.data,t.index),this.addToCache(e)),e.setSlide(t),e}addToCache(t){if(this.removeByIndex(t.index),this._cachedItems.push(t),this._cachedItems.length>this.limit){const t=this._cachedItems.findIndex(t=>!t.isAttached&&!t.hasSlide);-1!==t&&this._cachedItems.splice(t,1)[0].destroy()}}removeByIndex(t){const e=this._cachedItems.findIndex(e=>e.index===t);-1!==e&&this._cachedItems.splice(e,1)}getContentByIndex(t){return this._cachedItems.find(e=>e.index===t)}destroy(){this._cachedItems.forEach(t=>t.destroy()),this._cachedItems=[]}},Ge=class{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}},Xe=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){this._filters[t]||(this._filters[t]=[]),this._filters[t]?.push({fn:e,priority:i}),this._filters[t]?.sort((t,e)=>t.priority-e.priority),this.pswp?.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(t=>t.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){return this._filters[t]?.forEach(t=>{e[0]=t.fn.apply(this,e)}),e[0]}on(t,e){this._listeners[t]||(this._listeners[t]=[]),this._listeners[t]?.push(e),this.pswp?.on(t,e)}off(t,e){this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(t=>e!==t)),this.pswp?.off(t,e)}dispatch(t,e){if(this.pswp)return this.pswp.dispatch(t,e);const i=new Ge(t,e);return this._listeners[t]?.forEach(t=>{t.call(this,i)}),i}},Ke=class extends Xe{getNumItems(){let t=0;const e=this.options?.dataSource;e&&"length"in e?t=e.length:e&&"gallery"in e&&(e.items||(e.items=this._getGalleryDOMElements(e.gallery)),e.items&&(t=e.items.length));const i=this.dispatch("numItems",{dataSource:e,numItems:t});return this.applyFilters("numItems",i.numItems,e)}createContentFromData(t,e){return new Re(t,this,e)}getItemData(t){const e=this.options?.dataSource;let i={};Array.isArray(e)?i=e[t]:e&&"gallery"in e&&(e.items||(e.items=this._getGalleryDOMElements(e.gallery)),i=e.items[t]);let s=i;s instanceof Element&&(s=this._domElementToItemData(s));const o=this.dispatch("itemData",{itemData:s||{},index:t});return this.applyFilters("itemData",o.itemData,t)}_getGalleryDOMElements(t){return this.options?.children||this.options?.childSelector?Me(this.options.children,this.options.childSelector,t)||[]:[t]}_toLowerCaseFirstLetter(t){return t?t.charAt(0).toLowerCase()+t.slice(1):t}_domElementToItemData(t){const e={element:t},i="A"===t.tagName?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,i.dataset.pswpType&&(e.type=i.dataset.pswpType.toLowerCase());const s=t.querySelector("img");s&&(e.msrc=s.currentSrc||s.src,e.alt=s.getAttribute("alt")??""),(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0);const o=["element","src","srcset","width","height","type","msrc","alt","thumbCropped"];Object.keys(i.dataset).filter(t=>t.startsWith("pswp")&&!o.includes(this._toLowerCaseFirstLetter(t.slice(4)))).forEach(t=>{e[this._toLowerCaseFirstLetter(t.slice(4))]=i.dataset[t]})}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return Ve(t,this,e)}},Ye=class extends Ke{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){Me(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(Fe(t)||window.pswp)return;let e={x:t.clientX,y:t.clientY};e.x||e.y||(e=null);let i=this.getClickedIndex(t);i=this.applyFilters("clickedIndex",i,t,this);const s={gallery:t.currentTarget};i>=0&&(t.preventDefault(),this.loadAndOpen(i,s,e))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const e=t.target,i=Me(this.options.children,this.options.childSelector,t.currentTarget).findIndex(t=>t===e||t.contains(e));return-1!==i?i:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,e,i){if(window.pswp||!this.options)return!1;if(!e&&this.options.gallery&&this.options.children){const t=Me(this.options.gallery);t[0]&&(e={gallery:t[0]})}return this.options.index=t,this.options.initialPointerPos=i,this.shouldOpen=!0,this.preload(t,e),!0}preload(t,e){const{options:i}=this;e&&(i.dataSource=e);const s=[],o=typeof i.pswpModule;if("function"==typeof(n=i.pswpModule)&&n.prototype&&n.prototype.goTo)s.push(Promise.resolve(i.pswpModule));else{if("string"===o)throw new Error("pswpModule as string is no longer supported");if("function"!==o)throw new Error("pswpModule is not valid");s.push(i.pswpModule())}var n;"function"==typeof i.openPromise&&s.push(i.openPromise()),!1!==i.preloadFirstSlide&&t>=0&&(this._preloadedContent=qe(t,this));const a=++this._uid;Promise.all(s).then(t=>{if(this.shouldOpen){const e=t[0];this._openPhotoswipe(e,a)}})}_openPhotoswipe(t,e){if(e!==this._uid&&this.shouldOpen)return;if(this.shouldOpen=!1,window.pswp)return;const i="object"==typeof t?new t.default(this.options):new t(this.options);this.pswp=i,window.pswp=i,Object.keys(this._listeners).forEach(t=>{this._listeners[t]?.forEach(e=>{i.on(t,e)})}),Object.keys(this._filters).forEach(t=>{this._filters[t]?.forEach(e=>{i.addFilter(t,e.fn,e.priority)})}),this._preloadedContent&&(i.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),i.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),i.init()}destroy(){this.pswp?.destroy(),this.shouldOpen=!1,this._listeners={},Me(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.removeEventListener("click",this.onThumbnailsClick,!1)})}},Qe=class{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&Se(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:e,dragAxis:i}=this.gestures,{currSlide:s}=this.pswp;if("y"===i&&this.pswp.options.closeOnVerticalDrag&&s&&s.currZoomLevel<=s.zoomLevels.fit&&!this.gestures.isMultitouch){const i=s.pan.y+(t.y-e.y);if(!this.pswp.dispatch("verticalDrag",{panY:i}).defaultPrevented){this._setPanWithFriction("y",i,.6);const t=1-Math.abs(this._getVerticalDragRatio(s.pan.y));this.pswp.applyBgOpacity(t),s.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),s&&(Pe(s.pan),s.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:e,currSlide:i}=this.pswp;let s=0;if(this.pswp.animations.stopAll(),e.isShifted()){const i=(e.x-e.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-.5&&i<0||t.x<.1&&i<-.5?(s=1,t.x=Math.min(t.x,0)):(t.x>.5&&i>0||t.x>-.1&&i>.5)&&(s=-1,t.x=Math.max(t.x,0)),e.moveIndexBy(s,!0,t.x,!0)}i&&i.currZoomLevel>i.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:e}=this.gestures,{currSlide:i}=this.pswp;if(!i)return;const{pan:s,bounds:o}=i,n=s[t],a=this.pswp.bgOpacity<1&&"y"===t,r=n+e[t]*.995/(1-.995);if(a){const t=this._getVerticalDragRatio(n),e=this._getVerticalDragRatio(r);if(t<0&&e<-.4||t>0&&e>.4)return void this.pswp.close()}const l=o.correctPan(t,r);if(n===l)return;const c=l===r?1:.82,h=this.pswp.bgOpacity,d=l-n;this.pswp.animations.startSpring({name:`panGesture${t}`,isPan:!0,start:n,end:l,velocity:e[t],dampingRatio:c,onUpdate:e=>{if(a&&this.pswp.bgOpacity<1){const t=1-(l-e)/d;this.pswp.applyBgOpacity(Ce(h+(1-h)*t,0,1))}s[t]=Math.floor(e),i.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:e,dragAxis:i,prevP1:s,isMultitouch:o}=this.gestures,{currSlide:n,mainScroll:a}=this.pswp,r=e[t]-s[t],l=a.x+r;if(!r||!n)return!1;if("x"===t&&!n.isPannable()&&!o)return a.moveTo(l,!0),!0;const{bounds:c}=n,h=n.pan[t]+r;if(this.pswp.options.allowPanToNext&&"x"===i&&"x"===t&&!o){const e=a.getCurrSlideX(),i=a.x-e,s=r>0,o=!s;if(h>c.min[t]&&s){if(c.min[t]<=this.startPan[t])return a.moveTo(l,!0),!0;this._setPanWithFriction(t,h)}else if(h<c.max[t]&&o){if(this.startPan[t]<=c.max[t])return a.moveTo(l,!0),!0;this._setPanWithFriction(t,h)}else if(0!==i){if(i>0)return a.moveTo(Math.max(l,e),!0),!0;if(i<0)return a.moveTo(Math.min(l,e),!0),!0}else this._setPanWithFriction(t,h)}else"y"===t&&(a.isShifted()||c.min.y===c.max.y)||this._setPanWithFriction(t,h);return!1}_getVerticalDragRatio(t){return(t-(this.pswp.currSlide?.bounds.center.y??0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,e,i){const{currSlide:s}=this.pswp;if(!s)return;const{pan:o,bounds:n}=s;if(n.correctPan(t,e)!==e||i){const s=Math.round(e-o[t]);o[t]+=s*(i||.35)}else o[t]=e}};function Je(t){return!!t.target.closest(".pswp__container")}var ti=class{constructor(t){this.gestures=t}click(t,e){const i=e.target.classList,s=i.contains("pswp__img"),o=i.contains("pswp__item")||i.contains("pswp__zoom-wrap");s?this._doClickOrTapAction("imageClick",t,e):o&&this._doClickOrTapAction("bgClick",t,e)}tap(t,e){Je(e)&&this._doClickOrTapAction("tap",t,e)}doubleTap(t,e){Je(e)&&this._doClickOrTapAction("doubleTap",t,e)}_doClickOrTapAction(t,e,i){const{pswp:s}=this.gestures,{currSlide:o}=s,n=`${t}Action`,a=s.options[n];if(!s.dispatch(n,{point:e,originalEvent:i}).defaultPrevented)if("function"!=typeof a)switch(a){case"close":case"next":s[a]();break;case"zoom":o?.toggleZoom(e);break;case"zoom-or-close":o?.isZoomable()&&o.zoomLevels.secondary!==o.zoomLevels.initial?o.toggleZoom(e):s.options.clickToCloseNonZoomable&&s.close();break;case"toggle-controls":this.gestures.pswp.element?.classList.toggle("pswp--ui-visible")}else a.call(s,e,i)}};function ei(t,e,i){return t.x=(e.x+i.x)/2,t.y=(e.y+i.y)/2,t}var ii=class{constructor(t){this.gestures=t,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:t}=this.gestures.pswp;t&&(this._startZoomLevel=t.currZoomLevel,Se(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:e,p2:i,startP2:s,pswp:o}=this.gestures,{currSlide:n}=o;if(!n)return;const a=n.zoomLevels.min,r=n.zoomLevels.max;if(!n.isZoomable()||o.mainScroll.isShifted())return;ei(this._startZoomPoint,e,s),ei(this._zoomPoint,t,i);let l=1/Ie(e,s)*Ie(t,i)*this._startZoomLevel;if(l>n.zoomLevels.initial+n.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),l<a)if(o.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=n.zoomLevels.initial){const t=1-(a-l)/(a/1.2);o.dispatch("pinchClose",{bgOpacity:t}).defaultPrevented||o.applyBgOpacity(t)}else l=a-.15*(a-l);else l>r&&(l=r+.05*(l-r));n.pan.x=this._calculatePanForZoomLevel("x",l),n.pan.y=this._calculatePanForZoomLevel("y",l),n.setZoomLevel(l),n.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:e}=t;(!e||e.currZoomLevel<e.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,e){const i=e/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*i}correctZoomPan(t){const{pswp:e}=this.gestures,{currSlide:i}=e;if(!i?.isZoomable())return;0===this._zoomPoint.x&&(t=!0);const s=i.currZoomLevel;let o,n=!0;s<i.zoomLevels.initial?o=i.zoomLevels.initial:s>i.zoomLevels.max?o=i.zoomLevels.max:(n=!1,o=s);const a=e.bgOpacity,r=e.bgOpacity<1,l=Se({x:0,y:0},i.pan);let c=Se({x:0,y:0},l);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=s,Se(this._startPan,l)),n&&(c={x:this._calculatePanForZoomLevel("x",o),y:this._calculatePanForZoomLevel("y",o)}),i.setZoomLevel(o),c={x:i.bounds.correctPan("x",c.x),y:i.bounds.correctPan("y",c.y)},i.setZoomLevel(s);const h=!ze(c,l);if(!h&&!n&&!r)return i._setResolution(o),void i.applyCurrentZoomPan();e.animations.stopAllPan(),e.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:t=>{if(t/=1e3,h||n){if(h&&(i.pan.x=l.x+(c.x-l.x)*t,i.pan.y=l.y+(c.y-l.y)*t),n){const e=s+(o-s)*t;i.setZoomLevel(e)}i.applyCurrentZoomPan()}r&&e.bgOpacity<1&&e.applyBgOpacity(Ce(a+(1-a)*t,0,1))},onComplete:()=>{i._setResolution(o),i.applyCurrentZoomPan()}})}},si=class{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new Qe(this),this.zoomLevels=new ii(this),this.tapHandler=new ti(this),t.on("bindEvents",()=>{t.events.add(t.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(t,e,i,s){const{pswp:o}=this,{events:n}=o,a=s?t+s:"";n.add(o.scrollWrap,t+e,this.onPointerDown.bind(this)),n.add(window,`${t}move`,this.onPointerMove.bind(this)),n.add(window,t+i,this.onPointerUp.bind(this)),a&&n.add(o.scrollWrap,a,this.onPointerUp.bind(this))}onPointerDown(t){const e="mousedown"===t.type||"mouse"===t.pointerType;if(e&&t.button>0)return;const{pswp:i}=this;i.opener.isOpen?i.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(e&&(i.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),i.animations.stopAll(),this._updatePoints(t,"down"),1===this._numActivePoints&&(this.dragAxis=null,Se(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1):t.preventDefault()}onPointerMove(t){this._preventPointerEventBehaviour(t,"move"),this._numActivePoints&&(this._updatePoints(t,"move"),this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented||(1!==this._numActivePoints||this.isDragging?this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop()):(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,Se(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop()))))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this._numActivePoints&&(this._updatePoints(t,"up"),this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented||(0===this._numActivePoints&&(this._rafStopLoop(),this.isDragging?this._finishDrag():this.isZooming||this.isMultitouch||this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),1===this._numActivePoints&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?ze(this.p1,this.prevP1)||this.drag.change():ze(this.p1,this.prevP1)&&ze(this.p2,this.prevP2)||this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){const e=Date.now(),i=e-this._intervalTime;i<50&&!t||(this.velocity.x=this._getVelocity("x",i),this.velocity.y=this._getVelocity("y",i),this._intervalTime=e,Se(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(t){const{mainScroll:e}=this.pswp;if(e.isShifted())return void e.moveIndexBy(0,!0);if(t.type.indexOf("cancel")>0)return;if("mouseup"===t.type||"mouse"===t.pointerType)return void this.tapHandler.click(this.startP1,t);const i=this.pswp.options.doubleTapAction?300:0;this._tapTimer?(this._clearTapTimer(),Ie(this._lastStartP1,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,t)):(Se(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,t),this._clearTapTimer()},i))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,e){const i=this.p1[t]-this._intervalP1[t];return Math.abs(i)>1&&e>5?i/e:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,e){this.pswp.applyFilters("preventPointerEvent",!0,t,e)&&t.preventDefault()}_updatePoints(t,e){if(this._pointerEventEnabled){const i=t,s=this._ongoingPointers.findIndex(t=>t.id===i.pointerId);"up"===e&&s>-1?this._ongoingPointers.splice(s,1):"down"===e&&-1===s?this._ongoingPointers.push(this._convertEventPosToPoint(i,{x:0,y:0})):s>-1&&this._convertEventPosToPoint(i,this._ongoingPointers[s]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&Se(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&Se(this.p2,this._ongoingPointers[1])}else{const i=t;this._numActivePoints=0,i.type.indexOf("touch")>-1?i.touches&&i.touches.length>0&&(this._convertEventPosToPoint(i.touches[0],this.p1),this._numActivePoints++,i.touches.length>1&&(this._convertEventPosToPoint(i.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),"up"===e?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){Se(this.prevP1,this.p1),Se(this.prevP2,this.p2)}_updateStartPoints(){Se(this.startP1,this.p1),Se(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(0!==t){const e=t>0?"x":"y";Math.abs(this.p1[e]-this.startP1[e])>=10&&(this.dragAxis=e)}}}_convertEventPosToPoint(t,e){return e.x=t.pageX-this.pswp.offset.x,e.y=t.pageY-this.pswp.offset.y,"pointerId"in t?e.id=t.pointerId:void 0!==t.identifier&&(e.id=t.identifier),e}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}},oi=class{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){const{pswp:e}=this.slide,i=this.slide["x"===t?"width":"height"]*this.currZoomLevel,s=He("x"===t?"left":"top",e.options,e.viewportSize,this.slide.data,this.slide.index),o=this.slide.panAreaSize[t];this.center[t]=Math.round((o-i)/2)+s,this.max[t]=i>o?Math.round(o-i)+s:this.center[t],this.min[t]=i>o?s:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,e){return Ce(e,this.max[t],this.min[t])}},ni=class{constructor(t,e,i){this.data=t,this.index=e,this.pswp=i,this.isActive=e===i.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!i.opener.isOpen,this.zoomLevels=new $e(i.options,t,e,i),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:e}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=Te("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new oi(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;!this.heavyAppended&&t.opener.isOpen&&!t.mainScroll.isShifted()&&(this.isActive,1)&&(this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this})))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel!==this.zoomLevels.initial&&this.isActive?(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y)):(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize())}updateContentSize(t){const e=this.currentResolution||this.zoomLevels.initial;if(!e)return;const i=Math.round(this.width*e)||this.pswp.viewportSize.x,s=Math.round(this.height*e)||this.pswp.viewportSize.y;(this.sizeChanged(i,s)||t)&&this.content.setDisplayedSize(i,s)}sizeChanged(t,e){return(t!==this.prevDisplayedWidth||e!==this.prevDisplayedHeight)&&(this.prevDisplayedWidth=t,this.prevDisplayedHeight=e,!0)}getPlaceholderElement(){return this.content.placeholder?.element}zoomTo(t,e,i,s){const{pswp:o}=this;if(!this.isZoomable()||o.mainScroll.isShifted())return;o.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:e,transitionDuration:i}),o.animations.stopAllPan();const n=this.currZoomLevel;s||(t=Ce(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",e,n),this.pan.y=this.calculateZoomToPanOffset("y",e,n),Pe(this.pan);const a=()=>{this._setResolution(t),this.applyCurrentZoomPan()};i?o.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:a,duration:i,easing:o.options.easing}):a()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,e,i){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];e||(e=this.pswp.getViewportCenterPoint()),i||(i=this.zoomLevels.initial);const s=this.currZoomLevel/i;return this.bounds.correctPan(t,(this.pan[t]-e[t])*s+e[t])}panTo(t,e){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",e),this.applyCurrentZoomPan()}isPannable(){return Boolean(this.width)&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return Boolean(this.width)&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),Se(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,e,i){i/=this.currentResolution||this.zoomLevels.initial,ke(this.container,t,e,i)}calculateSize(){const{pswp:t}=this;Se(this.panAreaSize,We(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return Le(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}};function ai(t,e,i){t.classList.add("pswp__button--arrow"),t.setAttribute("aria-controls","pswp__items"),e.on("change",()=>{e.options.loop||(t.disabled=i?!(e.currIndex<e.getNumItems()-1):!(e.currIndex>0))})}var ri={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:ai},li={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(t,e)=>{ai(t,e,!0)}},ci={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},hi={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},di={name:"counter",order:5,onInit:(t,e)=>{e.on("change",()=>{t.innerText=e.currIndex+1+e.options.indexIndicatorSep+e.getNumItems()})}},pi={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(t,e)=>{let i,s=null;const o=e=>{var s;i!==e&&(i=e,s=e,t.classList.toggle("pswp__preloader--active",s))},n=()=>{if(!e.currSlide?.content.isLoading())return o(!1),void(s&&(clearTimeout(s),s=null));s||(s=setTimeout(()=>{o(Boolean(e.currSlide?.content.isLoading())),s=null},e.options.preloaderDelay))};e.on("change",n),e.on("loadComplete",t=>{e.currSlide===t.slide&&n()}),e.ui&&(e.ui.updatePreloaderVisibility=n)}},ui=class{constructor(t,e){const i=e.name||e.className;let s=e.html;if(!1===t.options[i])return;"string"==typeof t.options[`${i}SVG`]&&(s=t.options[`${i}SVG`]),t.dispatch("uiElementCreate",{data:e});let o="";e.isButton?(o+="pswp__button ",o+=e.className||`pswp__button--${e.name}`):o+=e.className||`pswp__${e.name}`;let n=e.isButton?e.tagName||"button":e.tagName||"div";n=n.toLowerCase();const a=Te(o,n);if(e.isButton){"button"===n&&(a.type="button");let{title:s}=e;const{ariaLabel:o}=e;"string"==typeof t.options[`${i}Title`]&&(s=t.options[`${i}Title`]),s&&(a.title=s);const r=o||s;r&&a.setAttribute("aria-label",r)}a.innerHTML=function(t){if("string"==typeof t)return t;if(!t||!t.isCustomSVG)return"";const e=t;let i='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return i=i.split("%d").join(e.size||32),e.outlineID&&(i+=`<use class="pswp__icn-shadow" xlink:href="#${e.outlineID}"/>`),i+=e.inner,i+="</svg>",i}(s),e.onInit&&e.onInit(a,t),e.onClick&&(a.onclick=i=>{"string"==typeof e.onClick?t[e.onClick]():"function"==typeof e.onClick&&e.onClick(i,a,t)});const r=e.appendTo||"bar";let l=t.element;"bar"===r?(t.topBar||(t.topBar=Te("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),l=t.topBar):(a.classList.add("pswp__hide-on-close"),"wrapper"===r&&(l=t.scrollWrap)),l?.appendChild(t.applyFilters("uiElement",a,e))}};function mi(t,e){t.classList.toggle("pswp--zoomed-in",e)}var fi=class{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[ci,ri,li,hi,pi,di],t.dispatch("uiRegister"),this.uiElementsData.sort((t,e)=>(t.order||0)-(e.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(t=>{this.registerElement(t)}),t.on("change",()=>{t.element?.classList.toggle("pswp--one-slide",1===t.getNumItems())}),t.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(t){this.isRegistered?this.items.push(new ui(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:e,options:i}=this.pswp;if(this.pswp.opener.isClosing||!t||!e)return;let{currZoomLevel:s}=e;if(this.pswp.opener.isOpen||(s=e.zoomLevels.initial),s===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=s;const o=e.zoomLevels.initial-e.zoomLevels.secondary;if(Math.abs(o)<.01||!e.isZoomable())return mi(t,!1),void t.classList.remove("pswp--zoom-allowed");t.classList.add("pswp--zoom-allowed"),mi(t,(s===e.zoomLevels.initial?e.zoomLevels.secondary:e.zoomLevels.initial)<=s),"zoom"!==i.imageClickAction&&"zoom-or-close"!==i.imageClickAction||t.classList.add("pswp--click-to-zoom")}},gi="cubic-bezier(.4,0,.22,1)",yi=class{constructor(t){this.props=t;const{target:e,onComplete:i,transform:s,onFinish:o=()=>{},duration:n=333,easing:a=gi}=t;this.onFinish=o;const r=s?"transform":"opacity",l=t[r]??"";this._target=e,this._onComplete=i,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{Ae(e,r,n,a),this._helperTimeout=setTimeout(()=>{e.addEventListener("transitionend",this._onTransitionEnd,!1),e.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},n+500),e.style[r]=l},30)},0)}_onTransitionEnd(t){t.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&(clearTimeout(this._helperTimeout),this._helperTimeout=null),Ae(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}},_i=class{constructor(t,e,i){this.velocity=1e3*t,this._dampingRatio=e||.75,this._naturalFrequency=i||12,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,e){let i,s=0;e/=1e3;const o=Math.E**(-this._dampingRatio*this._naturalFrequency*e);if(1===this._dampingRatio)i=this.velocity+this._naturalFrequency*t,s=(t+i*e)*o,this.velocity=s*-this._naturalFrequency+i*o;else if(this._dampingRatio<1){i=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const n=Math.cos(this._dampedFrequency*e),a=Math.sin(this._dampedFrequency*e);s=o*(t*n+i*a),this.velocity=s*-this._naturalFrequency*this._dampingRatio+o*(-this._dampedFrequency*t*a+this._dampedFrequency*i*n)}return s}},vi=class{constructor(t){this.props=t,this._raf=0;const{start:e,end:i,velocity:s,onUpdate:o,onComplete:n,onFinish:a=()=>{},dampingRatio:r,naturalFrequency:l}=t;this.onFinish=a;const c=new _i(s,r,l);let h=Date.now(),d=e-i;const p=()=>{this._raf&&(d=c.easeFrame(d,Date.now()-h),Math.abs(d)<1&&Math.abs(c.velocity)<50?(o(i),n&&n(),this.onFinish()):(h=Date.now(),o(d+i),this._raf=requestAnimationFrame(p)))};this._raf=requestAnimationFrame(p)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}},bi=class{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,e){const i=e?new vi(t):new yi(t);return this.activeAnimations.push(i),i.onFinish=()=>this.stop(i),i}stop(t){t.destroy();const e=this.activeAnimations.indexOf(t);e>-1&&this.activeAnimations.splice(e,1)}stopAll(){this.activeAnimations.forEach(t=>{t.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(t=>!t.props.isPan||(t.destroy(),!1))}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(t=>!t.props.isMainScroll||(t.destroy(),!1))}isPanRunning(){return this.activeAnimations.some(t=>t.props.isPan)}},xi=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{xi=!0}}))}catch(Ei){}var wi=class{constructor(){this._pool=[]}add(t,e,i,s){this._toggleListener(t,e,i,s)}remove(t,e,i,s){this._toggleListener(t,e,i,s,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,e,i,s,o,n){if(!t)return;const a=o?"removeEventListener":"addEventListener";e.split(" ").forEach(e=>{if(e){n||(o?this._pool=this._pool.filter(s=>s.type!==e||s.listener!==i||s.target!==t):this._pool.push({target:t,type:e,listener:i,passive:s}));const r=!!xi&&{passive:s||!1};t[a](e,i,r)}})}},Ti={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},Si=(t,e)=>e?t:Ti[t],Pi=class{constructor(t){this.pswp=t,this._wasFocused=!1,t.on("bindEvents",()=>{t.options.trapFocus&&(t.options.initialPointerPos||this._focusRoot(),t.events.add(document,"focusin",this._onFocusIn.bind(this))),t.events.add(document,"keydown",this._onKeyDown.bind(this))});const e=document.activeElement;t.on("destroy",()=>{t.options.returnFocus&&e&&this._wasFocused&&e.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){const{pswp:e}=this;if(e.dispatch("keydown",{originalEvent:t}).defaultPrevented)return;if(Fe(t))return;let i,s,o=!1;const n="key"in t;switch(n?t.key:t.keyCode){case Si("Escape",n):e.options.escKey&&(i="close");break;case Si("z",n):i="toggleZoom";break;case Si("ArrowLeft",n):s="x";break;case Si("ArrowUp",n):s="y";break;case Si("ArrowRight",n):s="x",o=!0;break;case Si("ArrowDown",n):o=!0,s="y";break;case Si("Tab",n):this._focusRoot()}if(s){t.preventDefault();const{currSlide:n}=e;e.options.arrowKeys&&"x"===s&&e.getNumItems()>1?i=o?"next":"prev":n&&n.currZoomLevel>n.zoomLevels.fit&&(n.pan[s]+=o?-80:80,n.panTo(n.pan.x,n.pan.y))}i&&(t.preventDefault(),e[i]())}_onFocusIn(t){const{template:e}=this.pswp;e&&document!==t.target&&e!==t.target&&!e.contains(t.target)&&e.focus()}},Ii=class{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(t){const{pswp:e}=this,i=Math.round(e.viewportSize.x+e.viewportSize.x*e.options.spacing),s=i!==this.slideWidth;s&&(this.slideWidth=i,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((e,i)=>{s&&ke(e.el,(i+this._containerShiftIndex)*this.slideWidth),t&&e.slide&&e.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){const e=Te("pswp__item","div",this.pswp.container);e.setAttribute("role","group"),e.setAttribute("aria-roledescription","slide"),e.setAttribute("aria-hidden","true"),e.style.display=1===t?"block":"none",this.itemHolders.push({el:e})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,e,i){const{pswp:s}=this;let o=s.potentialIndex+t;const n=s.getNumItems();if(s.canLoop()){o=s.getLoopedIndex(o);const e=(t+n)%n;t=e<=n/2?e:e-n}else o<0?o=0:o>=n&&(o=n-1),t=o-s.potentialIndex;s.potentialIndex=o,this._currPositionIndex-=t,s.animations.stopMainScroll();const a=this.getCurrSlideX();if(e){s.animations.startSpring({isMainScroll:!0,start:this.x,end:a,velocity:i||0,naturalFrequency:30,dampingRatio:1,onUpdate:t=>{this.moveTo(t)},onComplete:()=>{this.updateCurrItem(),s.appendHeavy()}});let t=s.potentialIndex-s.currIndex;if(s.canLoop()){const e=(t+n)%n;t=e<=n/2?e:e-n}Math.abs(t)>1&&this.updateCurrItem()}else this.moveTo(a),this.updateCurrItem();return Boolean(t)}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){const{pswp:t}=this,e=this._prevPositionIndex-this._currPositionIndex;if(!e)return;this._prevPositionIndex=this._currPositionIndex,t.currIndex=t.potentialIndex;let i,s=Math.abs(e);s>=3&&(this._containerShiftIndex+=e+(e>0?-3:3),s=3,this.itemHolders.forEach(t=>{t.slide?.destroy(),t.slide=void 0}));for(let o=0;o<s;o++)e>0?(i=this.itemHolders.shift(),i&&(this.itemHolders[2]=i,this._containerShiftIndex++,ke(i.el,(this._containerShiftIndex+2)*this.slideWidth),t.setContent(i,t.currIndex-s+o+2))):(i=this.itemHolders.pop(),i&&(this.itemHolders.unshift(i),this._containerShiftIndex--,ke(i.el,this._containerShiftIndex*this.slideWidth),t.setContent(i,t.currIndex+s-o-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),t.animations.stopAllPan(),this.itemHolders.forEach((t,e)=>{t.slide&&t.slide.setIsActive(1===e)}),t.currSlide=this.itemHolders[1]?.slide,t.contentLoader.updateLazy(e),t.currSlide&&t.currSlide.applyCurrentZoomPan(),t.dispatch("change")}moveTo(t,e){if(!this.pswp.canLoop()&&e){let e=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;e+=this.pswp.currIndex;const i=Math.round(t-this.x);(e<0&&i>0||e>=this.pswp.getNumItems()-1&&i<0)&&(t=this.x+.35*i)}this.x=t,this.pswp.container&&ke(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:e??!1})}},zi=.003,Ci=class{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),t.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:t}=this,e=this.pswp.currSlide,{options:i}=t;if("fade"===i.showHideAnimationType?(i.showHideOpacity=!0,this._thumbBounds=void 0):"none"===i.showHideAnimationType?(i.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=e?.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=Boolean(this._duration&&this._duration>50),this._animateZoom=Boolean(this._thumbBounds)&&e?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),this._animateZoom?this._animateRootOpacity=i.showHideOpacity??!1:(this._animateRootOpacity=!0,this.isOpening&&e&&(e.zoomAndPanToInitial(),e.applyCurrentZoomPan())),this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>zi,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation)return this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,void(this.isOpening&&(t.element&&(t.element.style.opacity=String(zi)),t.applyBgOpacity(1)));this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect?(this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=this.pswp.currSlide?.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=`${t.viewportSize.x}px`)):this._croppedZoom=!1,this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String(zi)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(zi)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(zi)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&0!==t.mainScroll.x&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&"IMG"===this._placeholder.tagName?new Promise(t=>{let e=!1,i=!0;var s;(s=this._placeholder,"decode"in s?s.decode().catch(()=>{}):s.complete?Promise.resolve(s):new Promise((t,e)=>{s.onload=()=>t(s),s.onerror=e})).finally(()=>{e=!0,i||t(!0)}),setTimeout(()=>{i=!1,e&&t(!0)},50),setTimeout(t,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){this.pswp.element?.style.setProperty("--pswp-transition-duration",`${this._duration}ms`),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),this.pswp.element?.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:t}=this;this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed?t.destroy():this.isOpen&&(this._animateZoom&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),t.currSlide?.applyCurrentZoomPan())}_animateToOpenState(){const{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this._animateTo(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this._animateBgOpacity&&t.bg&&this._animateTo(t.bg,"opacity",String(t.options.bgOpacity)),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","1")}_animateToClosedState(){const{pswp:t}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&t.bgOpacity>.01&&t.bg&&this._animateTo(t.bg,"opacity","0"),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","0")}_setClosedStateZoomPan(t){if(!this._thumbBounds)return;const{pswp:e}=this,{innerRect:i}=this._thumbBounds,{currSlide:s,viewportSize:o}=e;if(this._croppedZoom&&i&&this._cropContainer1&&this._cropContainer2){const e=-o.x+(this._thumbBounds.x-i.x)+i.w,s=-o.y+(this._thumbBounds.y-i.y)+i.h,n=o.x-i.w,a=o.y-i.h;t?(this._animateTo(this._cropContainer1,"transform",Le(e,s)),this._animateTo(this._cropContainer2,"transform",Le(n,a))):(ke(this._cropContainer1,e,s),ke(this._cropContainer2,n,a))}s&&(Se(s.pan,i||this._thumbBounds),s.currZoomLevel=this._thumbBounds.w/s.width,t?this._animateTo(s.container,"transform",s.getCurrentTransform()):s.applyCurrentZoomPan())}_animateTo(t,e,i){if(!this._duration)return void(t.style[e]=i);const{animations:s}=this.pswp,o={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{s.activeAnimations.length||this._onAnimationComplete()},target:t};o[e]=i,s.startTransition(o)}},Li=class{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(t){t.preventDefault();const{currSlide:e}=this.pswp;let{deltaX:i,deltaY:s}=t;if(e&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(e.isZoomable()){let i=-s;1===t.deltaMode?i*=.05:i*=t.deltaMode?1:.002,i=2**i;const o=e.currZoomLevel*i;e.zoomTo(o,{x:t.clientX,y:t.clientY})}}else e.isPannable()&&(1===t.deltaMode&&(i*=18,s*=18),e.panTo(e.pan.x-i,e.pan.y-s))}},ki={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"},Ai=class extends Ke{constructor(t){super(),this.options=this._prepareOptions(t||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new wi,this.animations=new bi,this.mainScroll=new Ii(this),this.gestures=new si(this),this.opener=new Ci(this),this.keyboard=new Pi(this),this.contentLoader=new Ue(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=` ${this.options.mainClass}`),this.element&&(this.element.className+=` ${t}`),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new Li(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{const{itemHolders:t}=this.mainScroll;t[0]&&(t[0].el.style.display="block",this.setContent(t[0],this.currIndex-1)),t[2]&&(t[2].el.style.display="block",this.setContent(t[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const e=this.getNumItems();return this.options.loop&&(t>e-1&&(t-=e),t<0&&(t+=e)),Ce(t,0,e-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(t=>{t.slide?.appendHeavy()})}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex,!0)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){this.currSlide?.zoomTo(...t)}toggleZoom(){this.currSlide?.toggleZoom()}close(){this.opener.isOpen&&!this.isDestroying&&(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){if(!this.isDestroying)return this.options.showHideAnimationType="none",void this.close();this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),this.element?.remove(),this.mainScroll.itemHolders.forEach(t=>{t.slide?.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((e,i)=>{let s=(this.currSlide?.index??0)-1+i;this.canLoop()&&(s=this.getLoopedIndex(s)),s===t&&(this.setContent(e,t,!0),1===i&&(this.currSlide=e.slide,e.slide?.setIsActive(!0)))}),this.dispatch("change")}setContent(t,e,i){if(this.canLoop()&&(e=this.getLoopedIndex(e)),t.slide){if(t.slide.index===e&&!i)return;t.slide.destroy(),t.slide=void 0}!this.canLoop()&&(e<0||e>=this.getNumItems())||(t.slide=new ni(this.getItemData(e),e,this),e===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el))}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;const e=je(this.options,this);!t&&ze(e,this._prevViewportSize)||(Se(this._prevViewportSize,e),this.dispatch("beforeResize"),Se(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){this.hasMouse||(this.hasMouse=!0,this.element?.classList.add("pswp--has_mouse"))}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,e){this.offset.x=t,this.offset.y=e,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=Te("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=Te("pswp__bg","div",this.element),this.scrollWrap=Te("pswp__scroll-wrap","section",this.element),this.container=Te("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new fi(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return function(t,e,i){const s=i.dispatch("thumbBounds",{index:t,itemData:e,instance:i});if(s.thumbBounds)return s.thumbBounds;const{element:o}=e;let n,a;if(o&&!1!==i.options.thumbSelector){const t=i.options.thumbSelector||"img";a=o.matches(t)?o:o.querySelector(t)}return a=i.applyFilters("thumbEl",a,e,t),a&&(n=e.thumbCropped?function(t,e,i){const s=t.getBoundingClientRect(),o=s.width/e,n=s.height/i,a=o>n?o:n,r=(s.width-e*a)/2,l=(s.height-i*a)/2,c={x:s.left+r,y:s.top+l,w:e*a};return c.innerRect={w:s.width,h:s.height,x:r,y:l},c}(a,e.width||e.w||0,e.height||e.h||0):function(t){const e=t.getBoundingClientRect();return{x:e.left,y:e.top,w:e.width}}(a)),i.applyFilters("thumbBounds",n,e,t)}(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...ki,...t}}},Oi=()=>Promise.resolve(Ai);export{Yt as a,ie as c,Xt as d,Ut as f,Bt as g,jt as h,be as i,ee as l,$t as m,Ye as n,te as o,qt as p,we as r,oe as s,Oi as t,se as u};
@@ -0,0 +1,3 @@
1
+ import{a as e}from"./CKhiIZDr.js";import{H as t,P as r,j as o,r as n,v as s,z as l}from"./DNlPVBFF.js";import{P as a}from"./B6AogNwO.js";import{n as i}from"./DnHHH-ld.js";import{t as c}from"./Dlgiti9h.js";import{t as d}from"./kPqeZ-lH.js";var u=new i,f=(e,r,o)=>{t(/* @__PURE__ */s(a,{client:u,children:/* @__PURE__ */s(n,{children:/* @__PURE__ */s(c,{event:e,onExplore:o})})}),r)},p=({folderId:t,onExplore:n,apiKey:a,is3D:i,logoUrl:c})=>{const u=o(null),p=o(null),m=o(null),h=o(null),[b,x]=r(!1),{activeFolderId:v,visibleFolders:g,visibleEvents:y,folderFeatureCollection:w,breadcrumb:k,isBusy:j,setActiveFolderId:L,goBack:C,activeFolder:B,folderBounds:F}=d({folderId:t}),S=y?.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);return l(()=>{if(!u.current||p.current)return;let t;return(async()=>{const r=(await import("./D8mHDhEV.js").then(t=>/* @__PURE__ */e(t.default,1))).default;if(!document.querySelector("link[data-qrati-mapbox-css]")){const e=document.createElement("link");e.rel="stylesheet",e.href="https://unpkg.com/mapbox-gl@3.20.0/dist/mapbox-gl.css",e.setAttribute("data-qrati-mapbox-css",""),document.head.appendChild(e)}if(!u.current)return;r.accessToken=a;const o=new r.Map({container:u.current,style:"mapbox://styles/mapbox/streets-v12",center:[0,20],zoom:3,minZoom:2,pitch:i?30:0,bearing:i?-20:0,antialias:!0});p.current=o,o.on("load",()=>{if(0===S.length)return;const e=new r.LngLatBounds;for(const s of S){const t=s.location.x,l=s.location.y;e.extend([t,l]);const a=document.createElement("div");if(a.style.cssText="\n width: 36px; height: 36px; cursor: pointer;\n background: var(--primary, #ff4800);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n display: flex; align-items: center; justify-content: center; overflow: hidden;\n ",c){const e=document.createElement("img");e.src=c,e.style.cssText="width: 24px; height: 24px; border-radius: 50%; object-fit: cover; transform: rotate(45deg);",a.appendChild(e)}const i=document.createElement("div");f(s,i,n);const d=new r.Popup({closeButton:!0,closeOnClick:!1,maxWidth:"none",offset:[0,-20]}).setDOMContent(i);new r.Marker({element:a}).setLngLat([t,l]).setPopup(d).addTo(o)}e.isEmpty()||o.fitBounds(e,{padding:60,maxZoom:14,duration:1200}),x(!0),o.addSource("folder-areas",{type:"geojson",data:w}),o.addLayer({id:"folder-fill",type:"fill",source:"folder-areas",paint:{"fill-color":["case",["boolean",["feature-state","hover"],!1],"#ffb703","#ffb703"],"fill-opacity":.28}}),o.addLayer({id:"folder-border",type:"line",source:"folder-areas",paint:{"line-color":["case",["boolean",["feature-state","hover"],!1],"#fb8500","#fb8500"],"line-width":["case",["boolean",["feature-state","hover"],!1],3,2]}}),o.addLayer({id:"folder-point",type:"circle",source:"folder-areas",filter:["==",["geometry-type"],"Point"],paint:{"circle-radius":10,"circle-color":["case",["boolean",["feature-state","hover"],!1],"#fb8500","#ffb703"],"circle-stroke-color":"#fff","circle-stroke-width":2}}),o.on("mousemove","folder-fill",e=>{const t=e.features?.[0];if(!t)return;const n=String(t.properties?.folderId);h.current!==n&&(h.current&&o.setFeatureState({source:"folder-areas",id:h.current},{hover:!1}),h.current=n,o.setFeatureState({source:"folder-areas",id:n},{hover:!0})),o.getCanvas().style.cursor="pointer",((e,t)=>{const n=e.properties??{},s=String(n.name??"Folder"),l=Number(n.eventCount??0);m.current||(m.current=new r.Popup({closeButton:!1,closeOnClick:!1,offset:12})),m.current.setLngLat(t).setHTML(`<div class='text-sm font-semibold text-slate-900'>${s}</div><div class='text-xs text-slate-700'>${l} event${1===l?"":"s"}</div>`).addTo(o)})(t,e.lngLat)}),o.on("mouseleave","folder-fill",()=>{h.current&&(o.setFeatureState({source:"folder-areas",id:h.current},{hover:!1}),h.current=null,m.current?.remove()),o.getCanvas().style.cursor=""});const t=e=>{const t=(e.features?.[0])?.properties?.folderId;t&&L(String(t))};o.on("click","folder-fill",t),o.on("click","folder-border",t),o.on("click","folder-point",t)}),t=()=>{o.remove(),p.current=null,m.current=null}})(),()=>{t?.()}},[a,i,n,L]),l(()=>{if(!p.current||!b)return;const e=p.current;try{e.getSource("folder-areas")?.setData(w)}catch{}},[w,b]),l(()=>{(()=>{const e=p.current;if(!e||!b)return;const t=F;if(!t)return;const[r,o,n,s]=t;e.fitBounds([[r,o],[n,s]],{padding:72,duration:800,maxZoom:14})})()},[F,b]),l(()=>{p.current&&p.current.easeTo({pitch:i?30:0,bearing:i?-20:0,duration:800})},[i]),/* @__PURE__ */s("div",{class:"relative h-screen w-full sm:h-[calc(100vh-4rem)]",children:[
2
+ /* @__PURE__ */s("div",{class:"absolute top-4 left-4 z-20 flex w-[min(96%,420px)] flex-col gap-2 rounded-xl border border-slate-200 bg-white/95 p-3 shadow-lg backdrop-blur-sm",children:[/* @__PURE__ */s("div",{class:"flex items-center justify-between gap-3",children:[/* @__PURE__ */s("div",{children:[/* @__PURE__ */s("div",{class:"text-sm font-semibold text-slate-900",children:B?.name??"Home"}),/* @__PURE__ */s("div",{class:"text-xs text-slate-600",children:["Tap a folder region to drill into its contents. ",g?.length??0," folder",1===g?.length?"":"s",", ",S.length," event",1===S.length?"":"s"," total"]})]}),v&&/* @__PURE__ */s("button",{type:"button",onClick:C,class:"rounded bg-slate-100 px-3 py-1 text-xs font-semibold text-slate-700 hover:bg-slate-200",children:"Back"})]}),k.length>0&&/* @__PURE__ */s("div",{class:"flex flex-wrap gap-1 text-xs text-slate-500",children:[/* @__PURE__ */s("span",{children:"All folders"}),k.map(e=>/* @__PURE__ */s("span",{class:"inline-flex items-center gap-1",children:[/* @__PURE__ */s("span",{class:"text-slate-300",children:"/"}),/* @__PURE__ */s("span",{children:e.name})]},e._id))]})]}),j&&/* @__PURE__ */s("div",{class:"absolute inset-0 z-10 flex items-center justify-center bg-white/70",children:/* @__PURE__ */s("div",{class:"border-primary flex h-12 w-12 animate-spin items-center justify-center rounded-full border-4 border-t-transparent"})}),
3
+ /* @__PURE__ */s("div",{ref:u,class:"h-full w-full rounded-xl border border-slate-200"})]})};export{p as default};
@@ -1,8 +1,8 @@
1
- import{A as e,u as t,v as r,w as o}from"./DNlPVBFF.js";import{T as s,n as i}from"./CkL4awGJ.js";var l=e(()=>import("./Rv4qsNKr.js")),n=e(()=>import("./C__vUXvg.js")),a=e(()=>import("./BSP6ZAxM.js")),c=e(()=>import("./Dmq9yGVz.js")),p=({events:e,isLoading:p=!1})=>{const{organization:d}=i(),m=t(),g=d?.integrationSettings??{},x=g.mapProvider??"openstreetmap",u=g.mapTilerApiKey??"",f=g.googleMapsApiKey??"",h=g.mapboxApiKey??"",v=e.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y),y="openstreetmap"===x&&!u||"google"===x&&!f||"mapbox"===x&&!h,w=e=>{m(s.GALLERY(e))};/* @__PURE__ */
1
+ import{A as e,u as t,v as r,w as o}from"./DNlPVBFF.js";import{T as s,n as i}from"./B6AogNwO.js";var l=e(()=>import("./C-LQPZVK.js")),n=e(()=>import("./C__vUXvg.js")),a=e(()=>import("./BSP6ZAxM.js")),c=e(()=>import("./BQB7uJ0l.js")),p=({events:e,isLoading:p=!1})=>{const{organization:d}=i(),m=t(),g=d?.integrationSettings??{},x=g.mapProvider??"openstreetmap",u=g.mapTilerApiKey??"",f=g.googleMapsApiKey??"",h=g.mapboxApiKey??"",v=e.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y),y="openstreetmap"===x&&!u||"google"===x&&!f||"mapbox"===x&&!h,w=e=>{m(s.GALLERY(e))};/* @__PURE__ */
2
2
  return r("div",{class:"w relative mt-3 h-screen sm:mt-6",children:p?/* @__PURE__ */r("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */r("div",{class:"border-primary bt-transparent size-8 animate-spin rounded-full"})}):y?/* @__PURE__ */r("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */r("div",{class:"text-center",children:[
3
3
  /* @__PURE__ */r("svg",{xmlns:"http://www.w3.org/2000/svg",class:"text-muted-foreground mx-auto mb-3 size-10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:[/* @__PURE__ */r("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z"}),/* @__PURE__ */r("circle",{cx:"12",cy:"9",r:"2.5"})]}),
4
4
  /* @__PURE__ */r("p",{class:"text-foreground",children:"Map API Key Required"}),
5
5
  /* @__PURE__ */r("p",{class:"text-muted-foreground mt-1 text-xs",children:"Configure your map provider API key in the integration settings."})]})}):0===v.length?/* @__PURE__ */r("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */r("div",{class:"text-center",children:[
6
6
  /* @__PURE__ */r("svg",{xmlns:"http://www.w3.org/2000/svg",class:"text-muted-foreground mx-auto mb-3 size-10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:[/* @__PURE__ */r("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z"}),/* @__PURE__ */r("circle",{cx:"12",cy:"9",r:"2.5"})]}),
7
7
  /* @__PURE__ */r("p",{class:"text-foreground tex",children:"No events with location data"}),
8
- /* @__PURE__ */r("p",{class:"text-muted-foreground mt-1 text-xs",children:"Events need a location to appear on the map."})]})}):/* @__PURE__ */r(o,{fallback:/* @__PURE__ */r("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */r("div",{class:"border-primary rounde size-8 animate-spin border-t-transparent"})}),children:["openstreetmap_free"===x&&/* @__PURE__ */r(l,{events:v,onExplore:w,logoUrl:d?.logoUrl}),"openstreetmap"===x&&/* @__PURE__ */r(n,{is3D:!0,events:v,apiKey:u,onExplore:w,logoUrl:d?.logoUrl}),"mapbox"===x&&/* @__PURE__ */r(c,{events:v,onExplore:w,apiKey:h,is3D:!1,logoUrl:d?.logoUrl}),"google"===x&&/* @__PURE__ */r(a,{events:v,apiKey:f,onExplore:w,logoUrl:d?.logoUrl})]})})};export{p as default};
8
+ /* @__PURE__ */r("p",{class:"text-muted-foreground mt-1 text-xs",children:"Events need a location to appear on the map."})]})}):/* @__PURE__ */r(o,{fallback:/* @__PURE__ */r("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */r("div",{class:"border-primary rounde size-8 animate-spin border-t-transparent"})}),children:["openstreetmap_free"===x&&/* @__PURE__ */r(l,{events:v,onExplore:w,logoUrl:d?.logoUrl}),"openstreetmap"===x&&/* @__PURE__ */r(n,{is3D:!0,events:v,apiKey:u,onExplore:w,logoUrl:d?.logoUrl}),"mapbox"===x&&/* @__PURE__ */r(c,{onExplore:w,apiKey:h,is3D:!1,logoUrl:d?.logoUrl}),"google"===x&&/* @__PURE__ */r(a,{events:v,apiKey:f,onExplore:w,logoUrl:d?.logoUrl})]})})};export{p as default};
@@ -0,0 +1,3 @@
1
+ import{a as e}from"./CKhiIZDr.js";import{H as t,P as r,j as n,r as o,v as l,z as i}from"./DNlPVBFF.js";import{P as s}from"./B6AogNwO.js";import{n as a}from"./DnHHH-ld.js";import{t as c}from"./Dlgiti9h.js";import{t as d}from"./kPqeZ-lH.js";var u=new a,p=(e,r,n)=>{t(/* @__PURE__ */l(s,{client:u,children:/* @__PURE__ */l(o,{children:/* @__PURE__ */l(c,{event:e,onExplore:n})})}),r)},m=({folderId:t,onExplore:o,logoUrl:s})=>{const a=n(null),c=n(null),u=n(null),m=n(null),[f,h]=r(!1),{activeFolderId:x,visibleEvents:b,visibleFolders:g,folderFeatureCollection:v,breadcrumb:y,isBusy:w,setActiveFolderId:k,goBack:j,activeFolder:C,folderBounds:S}=d({folderId:t}),$=()=>{const e=c.current;if(e&&f&&S){const[t,r,n,o]=S;e.fitBounds([[r,t],[o,n]],{padding:[60,60],maxZoom:14})}};return i(()=>{if(!a.current||c.current)return;let t;return(async()=>{const r=await import("./C0dqRit2.js").then(t=>/* @__PURE__ */e(t.default,1));if(!document.querySelector("link[data-qrati-leaflet-css]")){const e=document.createElement("link");e.rel="stylesheet",e.href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css",e.setAttribute("data-qrati-leaflet-css",""),document.head.appendChild(e)}if(!a.current)return;const n=r.map(a.current,{center:[20,0],zoom:2,minZoom:2,zoomControl:!0,worldCopyJump:!0});r.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"&copy; OpenStreetMap contributors",maxZoom:19}).addTo(n),c.current=n;const l=b.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);if(l.length>0){const e=r.latLngBounds([]);for(const t of l){const l=t.location.x,i=t.location.y;e.extend([i,l]);const a=r.divIcon({className:"qrati-leaflet-marker-wrapper",html:`\n <div style="\n width: 36px;\n height: 36px;\n cursor: pointer;\n background: var(--primary, #6366f1);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n ">${s?`<img src="${s}" style="width: 24px; height: 24px; border-radius: 50%; object-fit: cover; transform: rotate(45deg);" />`:""}</div>\n `,iconSize:[36,36],iconAnchor:[18,36],popupAnchor:[0,-36]}),c=r.marker([i,l],{icon:a}).addTo(n),d=document.createElement("div");d.style.width="fit-content",p(t,d,o),c.bindPopup(d,{closeButton:!0,maxWidth:256})}e.isValid()&&n.fitBounds(e,{padding:[60,60],maxZoom:14})}t=()=>{n.remove(),c.current=null,u.current=null,m.current=null}})(),()=>{t?.()}},[]),i(()=>{if(!c.current||!f)return;const e=c.current,t=window.L;u.current&&(e.removeLayer(u.current),u.current=null),m.current&&(e.removeLayer(m.current),m.current=null),v.features.length>0&&(u.current=t.geoJSON(v,{style:e=>({color:"#fb8500",weight:2,opacity:1,fillColor:"#ffb703",fillOpacity:.28}),onEachFeature:(t,r)=>{const n=t.properties??{},o=String(n.name??"Folder"),l=Number(n.eventCount??0);r.bindTooltip(`<div class='text-sm font-semibold text-slate-900'>${o}</div><div class='text-xs text-slate-700'>${l} event${1===l?"":"s"}</div>`,{permanent:!1,sticky:!0}),r.on("click",()=>{const e=n.folderId;e&&k(String(e))}),r.on("mouseover",()=>{r.setStyle({fillOpacity:.4,weight:3}),e.getContainer().style.cursor="pointer"}),r.on("mouseout",()=>{r.setStyle({fillOpacity:.28,weight:2}),e.getContainer().style.cursor=""})},pointToLayer:(e,r)=>{const n=e.properties??{},o=String(n.name??"Folder"),l=Number(n.eventCount??0);return t.circleMarker(r,{color:"#fb8500",weight:2,fillColor:"#ffb703",fillOpacity:.28,radius:10}).bindTooltip(`<div class='text-sm font-semibold text-slate-900'>${o}</div><div class='text-xs text-slate-700'>${l} event${1===l?"":"s"}</div>`,{permanent:!1,sticky:!0}).on("click",()=>{const e=n.folderId;e&&k(String(e))})}}).addTo(e));const r=b.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);if(r.length>0){const n=r.map(e=>{const r=e.location.x,n=e.location.y,l=t.divIcon({className:"qrati-leaflet-marker-wrapper",html:`\n <div style="\n width: 36px;\n height: 36px;\n cursor: pointer;\n background: var(--primary, #ff4800);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n ">${s?`<img src="${s}" style="width: 24px; height: 24px; border-radius: 50%; object-fit: cover; transform: rotate(45deg);" />`:""}</div>\n `,iconSize:[36,36],iconAnchor:[18,36],popupAnchor:[0,-36]}),i=t.marker([n,r],{icon:l}),a=document.createElement("div");return a.style.width="fit-content",p(e,a,o),i.bindPopup(a,{closeButton:!0,maxWidth:256}),i});m.current=t.layerGroup(n).addTo(e)}$()},[v,b,f,k,o,s]),i(()=>{$()},[S,f]),/* @__PURE__ */l("div",{class:"relative h-screen w-full sm:h-[calc(100vh-4rem)]",children:[
2
+ /* @__PURE__ */l("div",{class:"absolute top-4 left-4 z-200 flex w-[min(96%,420px)] flex-col gap-2 rounded-xl border border-slate-200 bg-white/95 p-3 shadow-lg backdrop-blur-sm",children:[/* @__PURE__ */l("div",{class:"flex items-center justify-between gap-3",children:[/* @__PURE__ */l("div",{children:[/* @__PURE__ */l("div",{class:"text-sm font-semibold text-slate-900",children:C?.name??"Home"}),/* @__PURE__ */l("div",{class:"text-xs text-slate-600",children:["Tap a folder region to drill into its contents. ",g?.length??0," folder",1===g?.length?"":"s",", ",b.length," event",1===b.length?"":"s"," total"]})]}),x&&/* @__PURE__ */l("button",{type:"button",onClick:j,class:"rounded bg-slate-100 px-3 py-1 text-xs font-semibold text-slate-700 hover:bg-slate-200",children:"Back"})]}),y.length>0&&/* @__PURE__ */l("div",{class:"flex flex-wrap gap-1 text-xs text-slate-500",children:[/* @__PURE__ */l("span",{children:"All folders"}),y.map(e=>/* @__PURE__ */l("span",{class:"inline-flex items-center gap-1",children:[/* @__PURE__ */l("span",{class:"text-slate-300",children:"/"}),/* @__PURE__ */l("span",{children:e.name})]},e._id))]})]}),w&&/* @__PURE__ */l("div",{class:"absolute inset-0 z-10 flex items-center justify-center bg-white/70",children:/* @__PURE__ */l("div",{class:"border-primary flex h-12 w-12 animate-spin items-center justify-center rounded-full border-4 border-t-transparent"})}),
3
+ /* @__PURE__ */l("div",{ref:a,class:"h-full w-full rounded-xl border border-slate-200"})]})};export{m as default};