@qratilabs/qrati-connect 2.5.4 → 2.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/element/{B59V0Mhr.js → B28y50Bi.js} +1 -1
- package/element/{DhcdFi7M.js → C93INkHE.js} +2 -2
- package/element/{D_N6wPLS.js → CH2f_afH.js} +1 -1
- package/element/{D43BQzpf.js → CUOOhGTj.js} +1 -1
- package/element/{BwemkCCJ.js → Cf1QDu0i.js} +1 -1
- package/element/{DhfeoyBz.js → D4xTzxjA.js} +1 -1
- package/element/{J72K45YE.js → DODG2TX4.js} +1 -1
- package/element/{CPPs7pi-.js → DPOkh0eJ.js} +1 -1
- package/element/{OucaMSbY.js → DbhqPPiL.js} +1 -1
- package/element/{DLz0G_z2.js → DtFKft47.js} +1 -1
- package/element/{kdp9oLRU.js → DuQAOcHp.js} +1 -1
- package/element/{BrMlCiWh.js → wHbQZdly.js} +1 -1
- package/element/web.es.js +3 -3
- package/package.json +1 -1
- package/react/{DVhoieUG.js → BXiO9Rt2.js} +1 -1
- package/react/{Bh_3jcgw.js → B_oJkm7C.js} +1 -1
- package/react/{B-MiXFkt.js → BaT1o9UO.js} +1 -1
- package/react/{BaqVlxbd.js → BlZs1n_V.js} +1 -1
- package/react/{DXg0jviV.js → Bxg_NMbJ.js} +1 -1
- package/react/{CYK5EdMk.js → C4TTO8j2.js} +1 -1
- package/react/{BQ7Q_1WB.js → C83Z_RKp.js} +1 -1
- package/react/{DQq5P5kz.js → CNAEfadS.js} +1 -1
- package/react/{yjP1jdU0.js → CT_Cvh8-.js} +1 -1
- package/react/{DQRcftrx.js → Cs3wia2w.js} +1 -1
- package/react/{BBNhso7S.js → Czrz88CD.js} +1 -1
- package/react/{B9vdeEQv.js → D7c4q3kj.js} +1 -1
- package/react/{HzUDi5NE.js → D7ez44M5.js} +1 -1
- package/react/{t-ii7Ss0.js → DEIcfk-y.js} +1 -1
- package/react/{DMqKxwcb.js → DOw70z3P.js} +1 -1
- package/react/DV6DJ1Br.js +1 -0
- package/react/{q8ln6Sqn.js → DgTTvPGB.js} +2 -2
- package/react/{-k-ffFwP.js → DhOWed_t.js} +1 -1
- package/react/{r0vUVZIh.js → Dljj3ToS.js} +1 -1
- package/react/QPXxc9eb.js +1 -0
- package/react/{Rx2eXHSy.js → YOBwf9_O.js} +1 -1
- package/react/{Fhq5zLvg.js → aragUG-J.js} +1 -1
- package/react/{BRLq62Uv.js → e8YBtYhk.js} +1 -1
- package/react/index.cjs +1 -1
- package/react/index.mjs +3 -3
- package/react/{BTW-b-Wo.js → pIx9IeV5.js} +1 -1
- package/umd/web.umd.js +1 -1
- package/react/BJBX47Jb.js +0 -1
- package/react/C9yNmSQ8.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Ct as t,_t as e,a as o,bt as r,c as n,gt as a,n as i,pt as s,r as c,s as l,t as f,u as d,ut as u,xt as p}from"./BJBX47Jb.js";import{a as m,n as g,r as y}from"./q8ln6Sqn.js";import{b as h,m as b,p as v,r as x,t as _}from"./DHTkVJH6.js";import w,{createElement as T,forwardRef as k,isValidElement as I,useEffect as E,useLayoutEffect as O,useRef as j,useState as z}from"react";var S=Object.freeze({left:0,top:0,width:16,height:16}),C=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),N=Object.freeze({...S,...C}),L=Object.freeze({...N,body:"",hidden:!1});function A(t,e){const o=function(t,e){const o={};!t.hFlip!=!e.hFlip&&(o.hFlip=!0),!t.vFlip!=!e.vFlip&&(o.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(o.rotate=r),o}(t,e);for(const r in L)r in C?r in t&&!(r in o)&&(o[r]=C[r]):r in e?o[r]=e[r]:r in t&&(o[r]=t[r]);return o}function F(t,e,o){const r=t.icons,n=t.aliases||Object.create(null);let a={};function i(t){a=A(r[t]||n[t],a)}return i(e),o.forEach(i),A(t,a)}function P(t,e){const o=[];if("object"!=typeof t||"object"!=typeof t.icons)return o;t.not_found instanceof Array&&t.not_found.forEach(t=>{e(t,null),o.push(t)});const r=function(t){const e=t.icons,o=t.aliases||Object.create(null),r=Object.create(null);return Object.keys(e).concat(Object.keys(o)).forEach(function t(n){if(e[n])return r[n]=[];if(!(n in r)){r[n]=null;const e=o[n]&&o[n].parent,a=e&&t(e);a&&(r[n]=[e].concat(a))}return r[n]}),r}(t);for(const n in r){const a=r[n];a&&(e(n,F(t,n,a)),o.push(n))}return o}var M={provider:"",aliases:{},not_found:{},...S};function D(t,e){for(const o in e)if(o in t&&typeof t[o]!=typeof e[o])return!1;return!0}function $(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(!D(t,M))return null;const o=e.icons;for(const n in o){const t=o[n];if(!n||"string"!=typeof t.body||!D(t,L))return null}const r=e.aliases||Object.create(null);for(const n in r){const t=r[n],e=t.parent;if(!n||"string"!=typeof e||!o[e]&&!r[e]||!D(t,L))return null}return e}var R=Object.create(null);function U(t,e){const o=R[t]||(R[t]=Object.create(null));return o[e]||(o[e]=function(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:/* @__PURE__ */new Set}}(t,e))}function V(t,e){return $(e)?P(e,(e,o)=>{o?t.icons[e]=o:t.missing.add(e)}):[]}var X=/^[a-z0-9]+(-[a-z0-9]+)*$/,q=(t,e,o,r="")=>{const n=t.split(":");if("@"===t.slice(0,1)){if(n.length<2||n.length>3)return null;r=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const t=n.pop(),o=n.pop(),a={provider:n.length>0?n[0]:r,prefix:o,name:t};return e&&!H(a)?null:a}const a=n[0],i=a.split("-");if(i.length>1){const t={provider:r,prefix:i.shift(),name:i.join("-")};return e&&!H(t)?null:t}if(o&&""===r){const t={provider:r,prefix:"",name:a};return e&&!H(t,o)?null:t}return null},H=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),B=!1;function W(t){return"boolean"==typeof t&&(B=t),B}function Q(t){const e="string"==typeof t?q(t,!0,B):t;if(e){const t=U(e.provider,e.prefix),o=e.name;return t.icons[o]||(t.missing.has(o)?null:void 0)}}var G=Object.freeze({width:null,height:null}),Y=Object.freeze({...G,...C}),J=/(-?[0-9.]*[0-9]+[0-9.]*)/g,K=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Z(t,e,o){if(1===e)return t;if(o=o||100,"number"==typeof t)return Math.ceil(t*e*o)/o;if("string"!=typeof t)return t;const r=t.split(J);if(null===r||!r.length)return t;const n=[];let a=r.shift(),i=K.test(a);for(;;){if(i){const t=parseFloat(a);isNaN(t)?n.push(a):n.push(Math.ceil(t*e*o)/o)}else n.push(a);if(a=r.shift(),void 0===a)return n.join("");i=!i}}var tt=/\sid="(\S+)"/g,et="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),ot=0;function rt(t,e=et){const o=[];let r;for(;r=tt.exec(t);)o.push(r[1]);if(!o.length)return t;const n="suffix"+(16777216*Math.random()|Date.now()).toString(16);return o.forEach(o=>{const r="function"==typeof e?e(o):e+(ot++).toString(),a=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+r+n+"$3")}),t=t.replace(new RegExp(n,"g"),"")}var nt=Object.create(null);function at(t){return nt[t]||nt[""]}function it(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 st=Object.create(null),ct=["https://api.simplesvg.com","https://api.unisvg.com"],lt=[];ct.length>0;)1===ct.length||Math.random()>.5?lt.push(ct.shift()):lt.push(ct.pop());function ft(t,e){const o=it(e);return null!==o&&(st[t]=o,!0)}function dt(t){return st[t]}st[""]=it({resources:["https://api.iconify.design"].concat(lt)});var ut=(()=>{let t;try{if(t=fetch,"function"==typeof t)return t}catch(e){}})(),pt={prepare:(t,e,o)=>{const r=[],n=function(t,e){const o=dt(t);if(!o)return 0;let r;if(o.maxURL){let t=0;o.resources.forEach(e=>{t=Math.max(t,e.length)});const n=e+".json?icons=";r=o.maxURL-t-o.path.length-n.length}else r=0;return r}(t,e),a="icons";let i={type:a,provider:t,prefix:e,icons:[]},s=0;return o.forEach((o,c)=>{s+=o.length+1,s>=n&&c>0&&(r.push(i),i={type:a,provider:t,prefix:e,icons:[]},s=o.length),i.icons.push(o)}),r.push(i),r},send:(t,e,o)=>{if(!ut)return void o("abort",424);let r=function(t){if("string"==typeof t){const e=dt(t);if(e)return e.path}return"/"}(e.provider);switch(e.type){case"icons":{const t=e.prefix,o=e.icons.join(",");r+=t+".json?"+new URLSearchParams({icons:o}).toString();break}case"custom":{const t=e.uri;r+="/"===t.slice(0,1)?t.slice(1):t;break}default:return void o("abort",400)}let n=503;ut(t+r).then(t=>{const e=t.status;if(200===e)return n=501,t.json();setTimeout(()=>{o(function(t){return 404===t}(e)?"abort":"next",e)})}).then(t=>{"object"==typeof t&&null!==t?setTimeout(()=>{o("success",t)}):setTimeout(()=>{404===t?o("abort",t):o("next",n)})}).catch(()=>{o("next",n)})}};function mt(t,e){t.forEach(t=>{const o=t.loaderCallbacks;o&&(t.loaderCallbacks=o.filter(t=>t.id!==e))})}var gt=0,yt={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ht(t){const e={...yt,...t};let o=[];function r(){o=o.filter(t=>"pending"===t().status)}return{query:function(t,n,a){const i=function(t,e,o,r){const n=t.resources.length,a=t.random?Math.floor(Math.random()*n):t.index;let i;if(t.random){let e=t.resources.slice(0);for(i=[];e.length>1;){const t=Math.floor(Math.random()*e.length);i.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}i=i.concat(e)}else i=t.resources.slice(a).concat(t.resources.slice(0,a));const s=Date.now();let c,l="pending",f=0,d=null,u=[],p=[];function m(){d&&(clearTimeout(d),d=null)}function g(){"pending"===l&&(l="aborted"),m(),u.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),u=[]}function y(t,e){e&&(p=[]),"function"==typeof t&&p.push(t)}function h(){l="failed",p.forEach(t=>{t(void 0,c)})}function b(){u.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),u=[]}return"function"==typeof r&&p.push(r),setTimeout(function r(){if("pending"!==l)return;m();const n=i.shift();if(void 0===n)return u.length?void(d=setTimeout(()=>{m(),"pending"===l&&(b(),h())},t.timeout)):void h();const a={status:"pending",resource:n,callback:(e,o)=>{!function(e,o,n){const a="success"!==o;switch(u=u.filter(t=>t!==e),l){case"pending":break;case"failed":if(a||!t.dataAfterTimeout)return;break;default:return}if("abort"===o)return c=n,void h();if(a)return c=n,void(u.length||(i.length?r():h()));if(m(),b(),!t.random){const o=t.resources.indexOf(e.resource);-1!==o&&o!==t.index&&(t.index=o)}l="completed",p.forEach(t=>{t(n)})}(a,e,o)}};u.push(a),f++,d=setTimeout(r,t.rotate),o(n,e,a.callback)}),function(){return{startTime:s,payload:e,status:l,queriesSent:f,queriesPending:u.length,subscribe:y,abort:g}}}(e,t,n,(t,e)=>{r(),a&&a(t,e)});return o.push(i),i},find:function(t){return o.find(e=>t(e))||null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:r}}function bt(){}var vt=Object.create(null);function xt(){}function _t(t,e,o){function r(){const o=t.pendingIcons;e.forEach(e=>{o&&o.delete(e),t.icons[e]||t.missing.add(e)})}if(o&&"object"==typeof o)try{if(!V(t,o).length)return void r()}catch(n){console.error(n)}r(),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 o=!1;const r=t.provider,n=t.prefix;e.forEach(e=>{const a=e.icons,i=a.pending.length;a.pending=a.pending.filter(e=>{if(e.prefix!==n)return!0;const i=e.name;if(t.icons[i])a.loaded.push({provider:r,prefix:n,name:i});else{if(!t.missing.has(i))return o=!0,!0;a.missing.push({provider:r,prefix:n,name:i})}return!1}),a.pending.length!==i&&(o||mt([t],e.id),e.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),e.abort))})}))}(t)}))}(t)}function wt(t,e){t instanceof Promise?t.then(t=>{e(t)}).catch(()=>{e(null)}):e(t)}function Tt(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:o}=t,r=t.iconsToLoad;if(delete t.iconsToLoad,!r||!r.length)return;const n=t.loadIcon;if(t.loadIcons&&(r.length>1||!n))return void wt(t.loadIcons(r,o,e),e=>{_t(t,r,e)});if(n)return void r.forEach(r=>{wt(n(r,o,e),e=>{_t(t,[r],e?{prefix:o,icons:{[r]:e}}:null)})});const{valid:a,invalid:i}=function(t){const e=[],o=[];return t.forEach(t=>{(t.match(X)?e:o).push(t)}),{valid:e,invalid:o}}(r);if(i.length&&_t(t,i,null),!a.length)return;const s=o.match(X)?at(e):null;s?s.prepare(e,o,a).forEach(o=>{!function(t,e,o){let r,n;if("string"==typeof t){const e=at(t);if(!e)return o(void 0,424),bt;n=e.send;const a=function(t){if(!vt[t]){const e=dt(t);if(!e)return;vt[t]={config:e,redundancy:ht(e)}}return vt[t]}(t);a&&(r=a.redundancy)}else{const e=it(t);if(e){r=ht(e);const o=at(t.resources?t.resources[0]:"");o&&(n=o.send)}}r&&n?r.query(e,n,o)().abort:o(void 0,424)}(e,o,e=>{_t(t,o.icons,e)})}):_t(t,a,null)}))}var kt,It=(t,e)=>{const o=function(t){const e={loaded:[],missing:[],pending:[]},o=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 r={provider:"",prefix:"",name:""};return t.forEach(t=>{if(r.name===t.name&&r.prefix===t.prefix&&r.provider===t.provider)return;r=t;const n=t.provider,a=t.prefix,i=t.name,s=o[n]||(o[n]=Object.create(null)),c=s[a]||(s[a]=U(n,a));let l;l=i in c.icons?e.loaded:""===a||c.missing.has(i)?e.missing:e.pending;const f={provider:n,prefix:a,name:i};l.push(f)}),e}(function(t,e=!0,o=!1){const r=[];return t.forEach(t=>{const n="string"==typeof t?q(t,e,o):t;n&&r.push(n)}),r}(t,!0,W()));if(!o.pending.length){let t=!0;return e&&setTimeout(()=>{t&&e(o.loaded,o.missing,o.pending,xt)}),()=>{t=!1}}const r=Object.create(null),n=[];let a,i;return o.pending.forEach(t=>{const{provider:e,prefix:o}=t;if(o===i&&e===a)return;a=e,i=o,n.push(U(e,o));const s=r[e]||(r[e]=Object.create(null));s[o]||(s[o]=[])}),o.pending.forEach(t=>{const{provider:e,prefix:o,name:n}=t,a=U(e,o),i=a.pendingIcons||(a.pendingIcons=/* @__PURE__ */new Set);i.has(n)||(i.add(n),r[e][o].push(n))}),n.forEach(t=>{const e=r[t.provider][t.prefix];e.length&&Tt(t,e)}),e?function(t,e,o){const r=gt++,n=mt.bind(null,o,r);if(!e.pending.length)return n;const a={id:r,icons:e,callback:t,abort:n};return o.forEach(t=>{(t.loaderCallbacks||(t.loaderCallbacks=[])).push(a)}),n}(e,o,n):xt},Et=/[\s,]+/;function Ot(t,e){e.split(Et).forEach(e=>{switch(e.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0}})}function jt(t,e=0){const o=t.replace(/^-?[0-9.]*/,"");function r(t){for(;t<0;)t+=4;return t%4}if(""===o){const e=parseInt(t);return isNaN(e)?0:r(e)}if(o!==t){let e=0;switch(o){case"%":e=25;break;case"deg":e=90}if(e){let n=parseFloat(t.slice(0,t.length-o.length));return isNaN(n)?0:(n/=e,n%1==0?r(n):0)}}return e}function zt(t){return void 0===kt&&function(){try{kt=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch(t){kt=null}}(),kt?kt.createHTML(t):t}var St={...Y,inline:!1},Ct={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Nt={display:"inline-block"},Lt={backgroundColor:"currentColor"},At={backgroundColor:"transparent"},Ft={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Pt={WebkitMask:Lt,mask:Lt,background:At};for(const ze in Pt){const t=Pt[ze];for(const e in Ft)t[ze+e]=Ft[e]}var Mt={...St,inline:!0};function Dt(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}var $t;if(W(!0),$t=pt,nt[""]=$t,"undefined"!=typeof document&&"undefined"!=typeof window){const t=window;if(void 0!==t.IconifyPreload){const e=t.IconifyPreload,o="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||""),B&&!e&&!t.prefix){let e=!1;return $(t)&&(t.prefix="",P(t,(t,r)=>{(function(t,e){const r=q(t,!0,B);if(!r)return!1;const n=U(r.provider,r.prefix);return e?function(t,e,r){try{if("string"==typeof r.body)return t.icons[e]={...r},!0}catch(o){}return!1}(n,r.name,e):(n.missing.add(r.name),!0)})(t,r)&&(e=!0)})),e}const r=t.prefix;return!!H({prefix:r,name:"a"})&&!!V(U(e,r),t)}(t))&&console.error(o)}catch(e){console.error(o)}})}if(void 0!==t.IconifyProviders){const e=t.IconifyProviders;if("object"==typeof e&&null!==e)for(let t in e){const o="IconifyProviders["+t+"] is invalid.";try{const r=e[t];if("object"!=typeof r||!r||void 0===r.resources)continue;ft(t,r)||console.error(o)}catch(je){console.error(o)}}}}function Rt(t){const[e,o]=z(!!t.ssr),[r,n]=z({}),[a,i]=z(function(e){if(e){const e=t.icon;if("object"==typeof e)return{name:"",data:e};const o=Q(e);if(o)return{name:e,data:o}}return{name:""}}(!!t.ssr));function s(){const t=r.callback;t&&(t(),n({}))}function c(t){if(JSON.stringify(a)!==JSON.stringify(t))return s(),i(t),!0}function l(){var e;const o=t.icon;if("object"==typeof o)return void c({name:"",data:o});const r=Q(o);c({name:o,data:r})&&(void 0===r?n({callback:It([o],l)}):r&&(null===(e=t.onLoad)||void 0===e||e.call(t,o)))}E(()=>(o(!0),s),[]),E(()=>{e&&l()},[t.icon,e]);const{name:f,data:d}=a;return d?((t,e,o)=>{const r=e.inline?Mt:St,n=function(t,e){const o={...t};for(const r in e){const t=e[r],n=typeof t;r in G?(null===t||t&&("string"===n||"number"===n))&&(o[r]=t):n===typeof o[r]&&(o[r]="rotate"===r?t%4:t)}return o}(r,e),a=e.mode||"svg",i={},s=e.style||{},c={..."svg"===a?Ct:{}};if(o){const t=q(o,!1,!0);if(t){const e=["iconify"];for(const o of["provider","prefix"])t[o]&&e.push("iconify--"+t[o]);c.className=e.join(" ")}}for(let h in e){const t=e[h];if(void 0!==t)switch(h){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":c.ref=t;break;case"className":c[h]=(c[h]?c[h]+" ":"")+t;break;case"inline":case"hFlip":case"vFlip":n[h]=!0===t||"true"===t||1===t;break;case"flip":"string"==typeof t&&Ot(n,t);break;case"color":i.color=t;break;case"rotate":"string"==typeof t?n[h]=jt(t):"number"==typeof t&&(n[h]=t);break;case"ariaHidden":case"aria-hidden":!0!==t&&"true"!==t&&delete c["aria-hidden"];break;default:void 0===r[h]&&(c[h]=t)}}const l=function(t,e){const o={...N,...t},r={...Y,...e},n={left:o.left,top:o.top,width:o.width,height:o.height};let a=o.body;[o,r].forEach(t=>{const e=[],o=t.hFlip,r=t.vFlip;let i,s=t.rotate;switch(o?r?s+=2:(e.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),e.push("scale(-1 1)"),n.top=n.left=0):r&&(e.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),e.push("scale(1 -1)"),n.top=n.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:i=n.height/2+n.top,e.unshift("rotate(90 "+i.toString()+" "+i.toString()+")");break;case 2:e.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:i=n.width/2+n.left,e.unshift("rotate(-90 "+i.toString()+" "+i.toString()+")")}s%2==1&&(n.left!==n.top&&(i=n.left,n.left=n.top,n.top=i),n.width!==n.height&&(i=n.width,n.width=n.height,n.height=i)),e.length&&(a=function(t,e){const o=function(t,e="defs"){let o="";const r=t.indexOf("<"+e);for(;r>=0;){const n=t.indexOf(">",r),a=t.indexOf("</"+e);if(-1===n||-1===a)break;const i=t.indexOf(">",a);if(-1===i)break;o+=t.slice(n+1,a).trim(),t=t.slice(0,r).trim()+t.slice(i+1)}return{defs:o,content:t}}(t);return r=o.defs,n=e+o.content+"</g>",r?"<defs>"+r+"</defs>"+n:n;var r,n}(a,'<g transform="'+e.join(" ")+'">'))});const i=r.width,s=r.height,c=n.width,l=n.height;let f,d;null===i?(d=null===s?"1em":"auto"===s?l:s,f=Z(d,c/l)):(f="auto"===i?c:i,d=null===s?Z(f,l/c):"auto"===s?l:s);const u={},p=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(u[t]=e.toString())};p("width",f),p("height",d);const m=[n.left,n.top,c,l];return u.viewBox=m.join(" "),{attributes:u,viewBox:m,body:a}}(t,n),f=l.attributes;if(n.inline&&(i.verticalAlign="-0.125em"),"svg"===a){c.style={...i,...s},Object.assign(c,f);let t=0,o=e.id;return"string"==typeof o&&(o=o.replace(/-/g,"_")),c.dangerouslySetInnerHTML={__html:zt(rt(l.body,o?()=>o+"ID"+t++:"iconifyReact"))},T("svg",c)}const{body:d,width:u,height:p}=t,m="mask"===a||"bg"!==a&&-1!==d.indexOf("currentColor"),g=function(t,e){let o=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)o+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+o+">"+t+"</svg>"}(d,{...f,width:u+"",height:p+""});var y;return c.style={...i,"--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:Dt(f.width),height:Dt(f.height),...Nt,...m?Lt:At,...s},T("span",c)})({...N,...d},t,f):t.children?t.children:t.fallback?t.fallback:T("span",{})}var Ut=k((t,e)=>Rt({...t,_ref:e})),Vt=(k((t,e)=>Rt({inline:!0,...t,_ref:e})),t=>"boolean"==typeof t?`${t}`:0===t?"0":t),Xt=c,qt=(t,e)=>o=>{var r;if(null==(null==e?void 0:e.variants))return Xt(t,null==o?void 0:o.class,null==o?void 0:o.className);const{variants:n,defaultVariants:a}=e,i=Object.keys(n).map(t=>{const e=null==o?void 0:o[t],r=null==a?void 0:a[t];if(null===e)return null;const i=Vt(e)||Vt(r);return n[t][i]}),s=o&&Object.entries(o).reduce((t,e)=>{let[o,r]=e;return void 0===r||(t[o]=r),t},{});return Xt(t,i,null==e||null===(r=e.compoundVariants)||void 0===r?void 0:r.reduce((t,e)=>{let{class:o,className:r,...n}=e;return Object.entries(n).every(t=>{let[e,o]=t;return Array.isArray(o)?o.includes({...a,...s}[e]):{...a,...s}[e]===o})?[...t,o,r]:t},[]),null==o?void 0:o.class,null==o?void 0:o.className)},Ht=qt("",{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"}}),Bt=({className:t,color:e="foreground",size:r="md",variant:n="default",name:a="line-md:iconify1",...i})=>/* @__PURE__ */o(Ut,{icon:a,className:f(Ht({color:e,size:r,variant:n,className:t})),...i});function Wt({children:t,asChild:e=!1,...n}){if(e){const e=Array.isArray(t)?t[0]:t;if(e&&e.type)return r(e,{...n,...e.props})}/* @__PURE__ */
|
|
1
|
+
import{Ct as t,_t as e,a as o,bt as r,c as n,gt as a,n as i,pt as s,r as c,s as l,t as f,u as d,ut as u,xt as p}from"./QPXxc9eb.js";import{a as m,n as g,r as y}from"./DgTTvPGB.js";import{b as h,m as b,p as v,r as x,t as _}from"./DHTkVJH6.js";import w,{createElement as T,forwardRef as k,isValidElement as I,useEffect as E,useLayoutEffect as O,useRef as j,useState as z}from"react";var S=Object.freeze({left:0,top:0,width:16,height:16}),C=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),N=Object.freeze({...S,...C}),L=Object.freeze({...N,body:"",hidden:!1});function A(t,e){const o=function(t,e){const o={};!t.hFlip!=!e.hFlip&&(o.hFlip=!0),!t.vFlip!=!e.vFlip&&(o.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(o.rotate=r),o}(t,e);for(const r in L)r in C?r in t&&!(r in o)&&(o[r]=C[r]):r in e?o[r]=e[r]:r in t&&(o[r]=t[r]);return o}function F(t,e,o){const r=t.icons,n=t.aliases||Object.create(null);let a={};function i(t){a=A(r[t]||n[t],a)}return i(e),o.forEach(i),A(t,a)}function P(t,e){const o=[];if("object"!=typeof t||"object"!=typeof t.icons)return o;t.not_found instanceof Array&&t.not_found.forEach(t=>{e(t,null),o.push(t)});const r=function(t){const e=t.icons,o=t.aliases||Object.create(null),r=Object.create(null);return Object.keys(e).concat(Object.keys(o)).forEach(function t(n){if(e[n])return r[n]=[];if(!(n in r)){r[n]=null;const e=o[n]&&o[n].parent,a=e&&t(e);a&&(r[n]=[e].concat(a))}return r[n]}),r}(t);for(const n in r){const a=r[n];a&&(e(n,F(t,n,a)),o.push(n))}return o}var M={provider:"",aliases:{},not_found:{},...S};function D(t,e){for(const o in e)if(o in t&&typeof t[o]!=typeof e[o])return!1;return!0}function $(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(!D(t,M))return null;const o=e.icons;for(const n in o){const t=o[n];if(!n||"string"!=typeof t.body||!D(t,L))return null}const r=e.aliases||Object.create(null);for(const n in r){const t=r[n],e=t.parent;if(!n||"string"!=typeof e||!o[e]&&!r[e]||!D(t,L))return null}return e}var R=Object.create(null);function U(t,e){const o=R[t]||(R[t]=Object.create(null));return o[e]||(o[e]=function(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:/* @__PURE__ */new Set}}(t,e))}function V(t,e){return $(e)?P(e,(e,o)=>{o?t.icons[e]=o:t.missing.add(e)}):[]}var X=/^[a-z0-9]+(-[a-z0-9]+)*$/,q=(t,e,o,r="")=>{const n=t.split(":");if("@"===t.slice(0,1)){if(n.length<2||n.length>3)return null;r=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const t=n.pop(),o=n.pop(),a={provider:n.length>0?n[0]:r,prefix:o,name:t};return e&&!H(a)?null:a}const a=n[0],i=a.split("-");if(i.length>1){const t={provider:r,prefix:i.shift(),name:i.join("-")};return e&&!H(t)?null:t}if(o&&""===r){const t={provider:r,prefix:"",name:a};return e&&!H(t,o)?null:t}return null},H=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),B=!1;function W(t){return"boolean"==typeof t&&(B=t),B}function Q(t){const e="string"==typeof t?q(t,!0,B):t;if(e){const t=U(e.provider,e.prefix),o=e.name;return t.icons[o]||(t.missing.has(o)?null:void 0)}}var G=Object.freeze({width:null,height:null}),Y=Object.freeze({...G,...C}),J=/(-?[0-9.]*[0-9]+[0-9.]*)/g,K=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Z(t,e,o){if(1===e)return t;if(o=o||100,"number"==typeof t)return Math.ceil(t*e*o)/o;if("string"!=typeof t)return t;const r=t.split(J);if(null===r||!r.length)return t;const n=[];let a=r.shift(),i=K.test(a);for(;;){if(i){const t=parseFloat(a);isNaN(t)?n.push(a):n.push(Math.ceil(t*e*o)/o)}else n.push(a);if(a=r.shift(),void 0===a)return n.join("");i=!i}}var tt=/\sid="(\S+)"/g,et="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),ot=0;function rt(t,e=et){const o=[];let r;for(;r=tt.exec(t);)o.push(r[1]);if(!o.length)return t;const n="suffix"+(16777216*Math.random()|Date.now()).toString(16);return o.forEach(o=>{const r="function"==typeof e?e(o):e+(ot++).toString(),a=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+r+n+"$3")}),t=t.replace(new RegExp(n,"g"),"")}var nt=Object.create(null);function at(t){return nt[t]||nt[""]}function it(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 st=Object.create(null),ct=["https://api.simplesvg.com","https://api.unisvg.com"],lt=[];ct.length>0;)1===ct.length||Math.random()>.5?lt.push(ct.shift()):lt.push(ct.pop());function ft(t,e){const o=it(e);return null!==o&&(st[t]=o,!0)}function dt(t){return st[t]}st[""]=it({resources:["https://api.iconify.design"].concat(lt)});var ut=(()=>{let t;try{if(t=fetch,"function"==typeof t)return t}catch(e){}})(),pt={prepare:(t,e,o)=>{const r=[],n=function(t,e){const o=dt(t);if(!o)return 0;let r;if(o.maxURL){let t=0;o.resources.forEach(e=>{t=Math.max(t,e.length)});const n=e+".json?icons=";r=o.maxURL-t-o.path.length-n.length}else r=0;return r}(t,e),a="icons";let i={type:a,provider:t,prefix:e,icons:[]},s=0;return o.forEach((o,c)=>{s+=o.length+1,s>=n&&c>0&&(r.push(i),i={type:a,provider:t,prefix:e,icons:[]},s=o.length),i.icons.push(o)}),r.push(i),r},send:(t,e,o)=>{if(!ut)return void o("abort",424);let r=function(t){if("string"==typeof t){const e=dt(t);if(e)return e.path}return"/"}(e.provider);switch(e.type){case"icons":{const t=e.prefix,o=e.icons.join(",");r+=t+".json?"+new URLSearchParams({icons:o}).toString();break}case"custom":{const t=e.uri;r+="/"===t.slice(0,1)?t.slice(1):t;break}default:return void o("abort",400)}let n=503;ut(t+r).then(t=>{const e=t.status;if(200===e)return n=501,t.json();setTimeout(()=>{o(function(t){return 404===t}(e)?"abort":"next",e)})}).then(t=>{"object"==typeof t&&null!==t?setTimeout(()=>{o("success",t)}):setTimeout(()=>{404===t?o("abort",t):o("next",n)})}).catch(()=>{o("next",n)})}};function mt(t,e){t.forEach(t=>{const o=t.loaderCallbacks;o&&(t.loaderCallbacks=o.filter(t=>t.id!==e))})}var gt=0,yt={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ht(t){const e={...yt,...t};let o=[];function r(){o=o.filter(t=>"pending"===t().status)}return{query:function(t,n,a){const i=function(t,e,o,r){const n=t.resources.length,a=t.random?Math.floor(Math.random()*n):t.index;let i;if(t.random){let e=t.resources.slice(0);for(i=[];e.length>1;){const t=Math.floor(Math.random()*e.length);i.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}i=i.concat(e)}else i=t.resources.slice(a).concat(t.resources.slice(0,a));const s=Date.now();let c,l="pending",f=0,d=null,u=[],p=[];function m(){d&&(clearTimeout(d),d=null)}function g(){"pending"===l&&(l="aborted"),m(),u.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),u=[]}function y(t,e){e&&(p=[]),"function"==typeof t&&p.push(t)}function h(){l="failed",p.forEach(t=>{t(void 0,c)})}function b(){u.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),u=[]}return"function"==typeof r&&p.push(r),setTimeout(function r(){if("pending"!==l)return;m();const n=i.shift();if(void 0===n)return u.length?void(d=setTimeout(()=>{m(),"pending"===l&&(b(),h())},t.timeout)):void h();const a={status:"pending",resource:n,callback:(e,o)=>{!function(e,o,n){const a="success"!==o;switch(u=u.filter(t=>t!==e),l){case"pending":break;case"failed":if(a||!t.dataAfterTimeout)return;break;default:return}if("abort"===o)return c=n,void h();if(a)return c=n,void(u.length||(i.length?r():h()));if(m(),b(),!t.random){const o=t.resources.indexOf(e.resource);-1!==o&&o!==t.index&&(t.index=o)}l="completed",p.forEach(t=>{t(n)})}(a,e,o)}};u.push(a),f++,d=setTimeout(r,t.rotate),o(n,e,a.callback)}),function(){return{startTime:s,payload:e,status:l,queriesSent:f,queriesPending:u.length,subscribe:y,abort:g}}}(e,t,n,(t,e)=>{r(),a&&a(t,e)});return o.push(i),i},find:function(t){return o.find(e=>t(e))||null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:r}}function bt(){}var vt=Object.create(null);function xt(){}function _t(t,e,o){function r(){const o=t.pendingIcons;e.forEach(e=>{o&&o.delete(e),t.icons[e]||t.missing.add(e)})}if(o&&"object"==typeof o)try{if(!V(t,o).length)return void r()}catch(n){console.error(n)}r(),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 o=!1;const r=t.provider,n=t.prefix;e.forEach(e=>{const a=e.icons,i=a.pending.length;a.pending=a.pending.filter(e=>{if(e.prefix!==n)return!0;const i=e.name;if(t.icons[i])a.loaded.push({provider:r,prefix:n,name:i});else{if(!t.missing.has(i))return o=!0,!0;a.missing.push({provider:r,prefix:n,name:i})}return!1}),a.pending.length!==i&&(o||mt([t],e.id),e.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),e.abort))})}))}(t)}))}(t)}function wt(t,e){t instanceof Promise?t.then(t=>{e(t)}).catch(()=>{e(null)}):e(t)}function Tt(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:o}=t,r=t.iconsToLoad;if(delete t.iconsToLoad,!r||!r.length)return;const n=t.loadIcon;if(t.loadIcons&&(r.length>1||!n))return void wt(t.loadIcons(r,o,e),e=>{_t(t,r,e)});if(n)return void r.forEach(r=>{wt(n(r,o,e),e=>{_t(t,[r],e?{prefix:o,icons:{[r]:e}}:null)})});const{valid:a,invalid:i}=function(t){const e=[],o=[];return t.forEach(t=>{(t.match(X)?e:o).push(t)}),{valid:e,invalid:o}}(r);if(i.length&&_t(t,i,null),!a.length)return;const s=o.match(X)?at(e):null;s?s.prepare(e,o,a).forEach(o=>{!function(t,e,o){let r,n;if("string"==typeof t){const e=at(t);if(!e)return o(void 0,424),bt;n=e.send;const a=function(t){if(!vt[t]){const e=dt(t);if(!e)return;vt[t]={config:e,redundancy:ht(e)}}return vt[t]}(t);a&&(r=a.redundancy)}else{const e=it(t);if(e){r=ht(e);const o=at(t.resources?t.resources[0]:"");o&&(n=o.send)}}r&&n?r.query(e,n,o)().abort:o(void 0,424)}(e,o,e=>{_t(t,o.icons,e)})}):_t(t,a,null)}))}var kt,It=(t,e)=>{const o=function(t){const e={loaded:[],missing:[],pending:[]},o=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 r={provider:"",prefix:"",name:""};return t.forEach(t=>{if(r.name===t.name&&r.prefix===t.prefix&&r.provider===t.provider)return;r=t;const n=t.provider,a=t.prefix,i=t.name,s=o[n]||(o[n]=Object.create(null)),c=s[a]||(s[a]=U(n,a));let l;l=i in c.icons?e.loaded:""===a||c.missing.has(i)?e.missing:e.pending;const f={provider:n,prefix:a,name:i};l.push(f)}),e}(function(t,e=!0,o=!1){const r=[];return t.forEach(t=>{const n="string"==typeof t?q(t,e,o):t;n&&r.push(n)}),r}(t,!0,W()));if(!o.pending.length){let t=!0;return e&&setTimeout(()=>{t&&e(o.loaded,o.missing,o.pending,xt)}),()=>{t=!1}}const r=Object.create(null),n=[];let a,i;return o.pending.forEach(t=>{const{provider:e,prefix:o}=t;if(o===i&&e===a)return;a=e,i=o,n.push(U(e,o));const s=r[e]||(r[e]=Object.create(null));s[o]||(s[o]=[])}),o.pending.forEach(t=>{const{provider:e,prefix:o,name:n}=t,a=U(e,o),i=a.pendingIcons||(a.pendingIcons=/* @__PURE__ */new Set);i.has(n)||(i.add(n),r[e][o].push(n))}),n.forEach(t=>{const e=r[t.provider][t.prefix];e.length&&Tt(t,e)}),e?function(t,e,o){const r=gt++,n=mt.bind(null,o,r);if(!e.pending.length)return n;const a={id:r,icons:e,callback:t,abort:n};return o.forEach(t=>{(t.loaderCallbacks||(t.loaderCallbacks=[])).push(a)}),n}(e,o,n):xt},Et=/[\s,]+/;function Ot(t,e){e.split(Et).forEach(e=>{switch(e.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0}})}function jt(t,e=0){const o=t.replace(/^-?[0-9.]*/,"");function r(t){for(;t<0;)t+=4;return t%4}if(""===o){const e=parseInt(t);return isNaN(e)?0:r(e)}if(o!==t){let e=0;switch(o){case"%":e=25;break;case"deg":e=90}if(e){let n=parseFloat(t.slice(0,t.length-o.length));return isNaN(n)?0:(n/=e,n%1==0?r(n):0)}}return e}function zt(t){return void 0===kt&&function(){try{kt=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch(t){kt=null}}(),kt?kt.createHTML(t):t}var St={...Y,inline:!1},Ct={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Nt={display:"inline-block"},Lt={backgroundColor:"currentColor"},At={backgroundColor:"transparent"},Ft={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Pt={WebkitMask:Lt,mask:Lt,background:At};for(const ze in Pt){const t=Pt[ze];for(const e in Ft)t[ze+e]=Ft[e]}var Mt={...St,inline:!0};function Dt(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}var $t;if(W(!0),$t=pt,nt[""]=$t,"undefined"!=typeof document&&"undefined"!=typeof window){const t=window;if(void 0!==t.IconifyPreload){const e=t.IconifyPreload,o="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||""),B&&!e&&!t.prefix){let e=!1;return $(t)&&(t.prefix="",P(t,(t,r)=>{(function(t,e){const r=q(t,!0,B);if(!r)return!1;const n=U(r.provider,r.prefix);return e?function(t,e,r){try{if("string"==typeof r.body)return t.icons[e]={...r},!0}catch(o){}return!1}(n,r.name,e):(n.missing.add(r.name),!0)})(t,r)&&(e=!0)})),e}const r=t.prefix;return!!H({prefix:r,name:"a"})&&!!V(U(e,r),t)}(t))&&console.error(o)}catch(e){console.error(o)}})}if(void 0!==t.IconifyProviders){const e=t.IconifyProviders;if("object"==typeof e&&null!==e)for(let t in e){const o="IconifyProviders["+t+"] is invalid.";try{const r=e[t];if("object"!=typeof r||!r||void 0===r.resources)continue;ft(t,r)||console.error(o)}catch(je){console.error(o)}}}}function Rt(t){const[e,o]=z(!!t.ssr),[r,n]=z({}),[a,i]=z(function(e){if(e){const e=t.icon;if("object"==typeof e)return{name:"",data:e};const o=Q(e);if(o)return{name:e,data:o}}return{name:""}}(!!t.ssr));function s(){const t=r.callback;t&&(t(),n({}))}function c(t){if(JSON.stringify(a)!==JSON.stringify(t))return s(),i(t),!0}function l(){var e;const o=t.icon;if("object"==typeof o)return void c({name:"",data:o});const r=Q(o);c({name:o,data:r})&&(void 0===r?n({callback:It([o],l)}):r&&(null===(e=t.onLoad)||void 0===e||e.call(t,o)))}E(()=>(o(!0),s),[]),E(()=>{e&&l()},[t.icon,e]);const{name:f,data:d}=a;return d?((t,e,o)=>{const r=e.inline?Mt:St,n=function(t,e){const o={...t};for(const r in e){const t=e[r],n=typeof t;r in G?(null===t||t&&("string"===n||"number"===n))&&(o[r]=t):n===typeof o[r]&&(o[r]="rotate"===r?t%4:t)}return o}(r,e),a=e.mode||"svg",i={},s=e.style||{},c={..."svg"===a?Ct:{}};if(o){const t=q(o,!1,!0);if(t){const e=["iconify"];for(const o of["provider","prefix"])t[o]&&e.push("iconify--"+t[o]);c.className=e.join(" ")}}for(let h in e){const t=e[h];if(void 0!==t)switch(h){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":c.ref=t;break;case"className":c[h]=(c[h]?c[h]+" ":"")+t;break;case"inline":case"hFlip":case"vFlip":n[h]=!0===t||"true"===t||1===t;break;case"flip":"string"==typeof t&&Ot(n,t);break;case"color":i.color=t;break;case"rotate":"string"==typeof t?n[h]=jt(t):"number"==typeof t&&(n[h]=t);break;case"ariaHidden":case"aria-hidden":!0!==t&&"true"!==t&&delete c["aria-hidden"];break;default:void 0===r[h]&&(c[h]=t)}}const l=function(t,e){const o={...N,...t},r={...Y,...e},n={left:o.left,top:o.top,width:o.width,height:o.height};let a=o.body;[o,r].forEach(t=>{const e=[],o=t.hFlip,r=t.vFlip;let i,s=t.rotate;switch(o?r?s+=2:(e.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),e.push("scale(-1 1)"),n.top=n.left=0):r&&(e.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),e.push("scale(1 -1)"),n.top=n.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:i=n.height/2+n.top,e.unshift("rotate(90 "+i.toString()+" "+i.toString()+")");break;case 2:e.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:i=n.width/2+n.left,e.unshift("rotate(-90 "+i.toString()+" "+i.toString()+")")}s%2==1&&(n.left!==n.top&&(i=n.left,n.left=n.top,n.top=i),n.width!==n.height&&(i=n.width,n.width=n.height,n.height=i)),e.length&&(a=function(t,e){const o=function(t,e="defs"){let o="";const r=t.indexOf("<"+e);for(;r>=0;){const n=t.indexOf(">",r),a=t.indexOf("</"+e);if(-1===n||-1===a)break;const i=t.indexOf(">",a);if(-1===i)break;o+=t.slice(n+1,a).trim(),t=t.slice(0,r).trim()+t.slice(i+1)}return{defs:o,content:t}}(t);return r=o.defs,n=e+o.content+"</g>",r?"<defs>"+r+"</defs>"+n:n;var r,n}(a,'<g transform="'+e.join(" ")+'">'))});const i=r.width,s=r.height,c=n.width,l=n.height;let f,d;null===i?(d=null===s?"1em":"auto"===s?l:s,f=Z(d,c/l)):(f="auto"===i?c:i,d=null===s?Z(f,l/c):"auto"===s?l:s);const u={},p=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(u[t]=e.toString())};p("width",f),p("height",d);const m=[n.left,n.top,c,l];return u.viewBox=m.join(" "),{attributes:u,viewBox:m,body:a}}(t,n),f=l.attributes;if(n.inline&&(i.verticalAlign="-0.125em"),"svg"===a){c.style={...i,...s},Object.assign(c,f);let t=0,o=e.id;return"string"==typeof o&&(o=o.replace(/-/g,"_")),c.dangerouslySetInnerHTML={__html:zt(rt(l.body,o?()=>o+"ID"+t++:"iconifyReact"))},T("svg",c)}const{body:d,width:u,height:p}=t,m="mask"===a||"bg"!==a&&-1!==d.indexOf("currentColor"),g=function(t,e){let o=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)o+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+o+">"+t+"</svg>"}(d,{...f,width:u+"",height:p+""});var y;return c.style={...i,"--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:Dt(f.width),height:Dt(f.height),...Nt,...m?Lt:At,...s},T("span",c)})({...N,...d},t,f):t.children?t.children:t.fallback?t.fallback:T("span",{})}var Ut=k((t,e)=>Rt({...t,_ref:e})),Vt=(k((t,e)=>Rt({inline:!0,...t,_ref:e})),t=>"boolean"==typeof t?`${t}`:0===t?"0":t),Xt=c,qt=(t,e)=>o=>{var r;if(null==(null==e?void 0:e.variants))return Xt(t,null==o?void 0:o.class,null==o?void 0:o.className);const{variants:n,defaultVariants:a}=e,i=Object.keys(n).map(t=>{const e=null==o?void 0:o[t],r=null==a?void 0:a[t];if(null===e)return null;const i=Vt(e)||Vt(r);return n[t][i]}),s=o&&Object.entries(o).reduce((t,e)=>{let[o,r]=e;return void 0===r||(t[o]=r),t},{});return Xt(t,i,null==e||null===(r=e.compoundVariants)||void 0===r?void 0:r.reduce((t,e)=>{let{class:o,className:r,...n}=e;return Object.entries(n).every(t=>{let[e,o]=t;return Array.isArray(o)?o.includes({...a,...s}[e]):{...a,...s}[e]===o})?[...t,o,r]:t},[]),null==o?void 0:o.class,null==o?void 0:o.className)},Ht=qt("",{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"}}),Bt=({className:t,color:e="foreground",size:r="md",variant:n="default",name:a="line-md:iconify1",...i})=>/* @__PURE__ */o(Ut,{icon:a,className:f(Ht({color:e,size:r,variant:n,className:t})),...i});function Wt({children:t,asChild:e=!1,...n}){if(e){const e=Array.isArray(t)?t[0]:t;if(e&&e.type)return r(e,{...n,...e.props})}/* @__PURE__ */
|
|
2
2
|
return o("button",{...n,children:t})}var Qt=qt("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"}}),Gt=({className:t,type:e="button",disabled:r,loading:n,fullWidth:a,color:i,size:s,variant:c,icon:l,iconName:d,iconSvg:u,asChild:p=!1,immutable:m,elementRef:g,children:y,...h})=>{const b=p?Wt:"button",v=p?{asChild:!0}:{},x=u||l||(d?/* @__PURE__ */o(Bt,{name:d,className:"text-primary-foreground"}):null);/* @__PURE__ */
|
|
3
3
|
return o(b,{ref:g,type:e,disabled:r||n,className:f(Qt({color:i,size:s,variant:c}),t,a&&"w-full"),...v,...h,children:[/* @__PURE__ */o("div",{className:f(n?"collapse":"visible flex items-center gap-3"),children:[x&&!n&&x,y]}),n&&/* @__PURE__ */o("span",{className:"icon-[eos-icons--three-dots-loading] absolute size-6"})]})},Yt={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"},Jt=qt("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"}}),Kt=({variant:t="body1",color:e,align:r,weight:n,transform:a,lines:i,shadow:s,noWrap:c,className:l,immutable:d,...u})=>/* @__PURE__ */o(Yt[t],{className:f(Jt({variant:t,color:e,align:r,weight:n}),a,i&&i>0?`line-clamp-${i}`:void 0,s&&"drop-shadow-[0_1px_2px_rgba(0,0,0,0.5)]",c&&"truncate",l),...u,children:u.children}),Zt=async()=>{const t=await y();return"string"==typeof t?t:t?.fingerprint},te=()=>{const t=u(null),{props:e,sessionId:o,user:r}=g(),a=e?.organizationId,i=u(null),s=u(null),c=async(e,o)=>{if(e&&o&&(t.current||(t.current=await Zt()),t.current))try{await m.post(d.UPDATE_AD_ANALYTICS,{json:{adId:e,type:o,browserFingerprint:t.current},headers:{"x-org-id":a}})}catch(je){console.error(je)}},f=async t=>{if(o)try{await m.post(d.UPDATE_SESSION,{headers:{"x-org-id":a},json:{sessionId:o,pageViews:t}})}catch(je){console.error(je)}};return{incrementEventView:async e=>{if(e&&(t.current||(t.current=await Zt()),t.current))try{await m.post(d.INCREMENT_EVENT_VIEW,{json:{eventSlug:e,browserFingerprint:t.current},headers:{"x-org-id":a,Authorization:r?`Bearer ${r.token}`:void 0}})}catch(je){console.error(je)}},captureAdImpression:async t=>c(t,l.AD_IMPRESSION),captureAdEngagement:async t=>c(t,l.AD_ENGAGEMENT),captureAdClick:(t,e,o)=>{if(c(t,l.AD_CLICK),o)switch(e){case n.LINK:window.open(String(o),"_blank");break;case n.EMAIL:window.location.href=`mailto:${String(o)}`;break;case n.PHONE:window.location.href=`tel:${String(o)}`;break;case n.SMS:window.location.href=`sms:${String(o)}`;break;case n.WHATSAPP:window.location.href=`https://wa.me/${String(o)}`;break;case n.MESSENGER:window.location.href=`https://m.me/${String(o)}`;break;default:window.open(String(o),"_blank")}},trackPageView:t=>{i.current&&s.current&&f([{page:i.current,entryTime:s.current,exitTime:Date.now()}]),i.current=t??null,s.current=Date.now()},exportPageViewsData:f}},ee=p(null),oe=({open:t,onOpenChange:r,children:n})=>{const[a,i]=s(!!t);return e(()=>{"boolean"==typeof t&&i(t)},[t]),/* @__PURE__ */o(ee.Provider,{value:{open:a,setOpen:t=>{i(t),r?.(t)}},children:n})},re=({children:e})=>/* @__PURE__ */o(t,{children:e}),ne=({className:t,...e})=>{const r=a(ee);/* @__PURE__ */
|
|
4
4
|
return o("div",{"data-state":r?.open?"open":"closed",className:f("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})},ae=({className:t,children:r,...n})=>{const{organization:s}=g(),c=a(ee);return e(()=>{if(!c?.open)return;const t=t=>{"Escape"===t.key&&c.setOpen(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[c?.open]),c?.open?/* @__PURE__ */o(re,{children:[/* @__PURE__ */o(ne,{onClick:()=>c.setOpen(!1)}),/* @__PURE__ */o("div",{role:"dialog","aria-modal":"true","data-state":c?.open?"open":"closed",className:f("shadow-outer border-border bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed bottom-0 left-0 z-2002 w-full max-w-5xl rounded-3xl border border-x-0 border-b-0 duration-300 sm:top-[50%] sm:left-[50%] sm:h-fit sm:w-auto sm:translate-x-[-50%] sm:translate-y-[-50%] sm:rounded sm:border",t),style:i(s),...n,children:r})]}):null},ie=({className:t,...e})=>/* @__PURE__ */o("div",{className:f("flex flex-col space-y-1 p-3 text-center sm:text-left",t),...e}),se=({className:t,...e})=>/* @__PURE__ */o("div",{className:f("flex flex-col-reverse p-4 sm:flex-row sm:justify-end sm:space-x-4",t),...e}),ce=({className:t,...e})=>/* @__PURE__ */o("h2",{className:f("text-center text-lg font-semibold",t),...e}),le=({className:t,...e})=>/* @__PURE__ */o("p",{className:f("text-muted-foreground text-center text-sm",t),...e});!function(t){if("undefined"==typeof document)return;let e=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e.firstChild?e.insertBefore(o,e.firstChild):e.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.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 fe=t=>"number"==typeof t&&!isNaN(t),de=t=>"string"==typeof t,ue=t=>"function"==typeof t;function pe({enter:t,exit:e,appendPosition:o=!1,collapse:r=!0,collapseDuration:n=300}){return function({children:a,position:i,preventExitTransition:s,done:c,nodeRef:l,isIn:f,playToast:d}){let u=o?`${t}--${i}`:t,p=o?`${e}--${i}`:e,m=j(0);return O(()=>{let t=l.current,e=u.split(" "),o=r=>{r.target===l.current&&(d(),t.removeEventListener("animationend",o),t.removeEventListener("animationcancel",o),0===m.current&&"animationcancel"!==r.type&&t.classList.remove(...e))};t.classList.add(...e),t.addEventListener("animationend",o),t.addEventListener("animationcancel",o)},[]),E(()=>{let t=l.current,e=()=>{t.removeEventListener("animationend",e),r?function(t,e,o=300){let{scrollHeight:r,style:n}=t;requestAnimationFrame(()=>{n.minHeight="initial",n.height=r+"px",n.transition=`all ${o}ms`,requestAnimationFrame(()=>{n.height="0",n.padding="0",n.margin="0",setTimeout(e,o)})})}(t,c,n):c()};f||(s?e():(m.current=1,t.className+=` ${p}`,t.addEventListener("animationend",e)))},[f]),w.createElement(w.Fragment,null,a)}}var me=1,ge=()=>""+me++,ye=/* @__PURE__ */new Map,he=[],be=/* @__PURE__ */new Set,ve=()=>ye.size>0;function xe(t,e){ye.forEach(o=>{(null==e||null==e||!e.containerId||(null==e?void 0:e.containerId)===o.id)&&o.toggle(t,null==e?void 0:e.id)})}function _e(t){return t&&(de(t.toastId)||fe(t.toastId))?t.toastId:ge()}function we(t,e){return function(t,e){(t=>I(t)||de(t)||ue(t)||fe(t))(t)&&(ve()||he.push({content:t,options:e}),ye.forEach(o=>{o.buildToast(t,e)}))}(t,e),e.toastId}function Te(t,e){return{...e,type:e&&e.type||t,toastId:_e(e)}}function ke(t){return(e,o)=>we(e,Te(t,o))}function Ie(t,e){return we(t,Te("default",e))}Ie.loading=(t,e)=>we(t,Te("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),Ie.promise=function(t,{pending:e,error:o,success:r},n){let a;e&&(a=de(e)?Ie.loading(e,n):Ie.loading(e.render,{...n,...e}));let i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=(t,e,o)=>{if(null==e)return void Ie.dismiss(a);let r={type:t,...i,...n,data:o},s=de(e)?{render:e}:e;return a?Ie.update(a,{...r,...s}):Ie(s.render,{...r,...s}),o},c=ue(t)?t():t;return c.then(t=>s("success",r,t)).catch(t=>s("error",o,t)),c},Ie.success=ke("success"),Ie.info=ke("info"),Ie.error=ke("error"),Ie.warning=ke("warning"),Ie.warn=Ie.warning,Ie.dark=(t,e)=>we(t,Te("default",{theme:"dark",...e})),Ie.dismiss=function(t){!function(t){if(ve()){if(null==t||(t=>de(t)||fe(t))(t))ye.forEach(e=>{e.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){let e=ye.get(t.containerId);e?e.removeToast(t.id):ye.forEach(e=>{e.removeToast(t.id)})}}else he=he.filter(e=>null!=t&&e.options.toastId!==t)}(t)},Ie.clearWaitingQueue=(t={})=>{ye.forEach(e=>{e.props.limit&&(!t.containerId||e.id===t.containerId)&&e.clearQueue()})},Ie.isActive=function(t,e){var o;if(e)return!(null==(o=ye.get(e))||!o.isToastActive(t));let r=!1;return ye.forEach(e=>{e.isToastActive(t)&&(r=!0)}),r},Ie.update=(t,e={})=>{let o=((t,{containerId:e})=>{var o;return null==(o=ye.get(e||1))?void 0:o.toasts.get(t)})(t,e);if(o){let{props:r,content:n}=o,a={delay:100,...r,...e,toastId:e.toastId||t,updateId:ge()};a.toastId!==t&&(a.staleId=t);let i=a.render||n;delete a.render,we(i,a)}},Ie.done=t=>{Ie.update(t,{progress:1})},Ie.onChange=function(t){return be.add(t),()=>{be.delete(t)}},Ie.play=t=>xe(!0,t),Ie.pause=t=>xe(!1,t);var Ee=(t,e=!1)=>({enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}),Oe=(pe(Ee("bounce",!0)),pe(Ee("slide",!0)),pe(Ee("zoom")),pe(Ee("flip")),class extends _{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){v(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(h(t)||window.pswp)return;let e={x:t.clientX,y:t.clientY};e.x||e.y||(e=null);let o=this.getClickedIndex(t);o=this.applyFilters("clickedIndex",o,t,this);const r={gallery:t.currentTarget};o>=0&&(t.preventDefault(),this.loadAndOpen(o,r,e))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const e=t.target,o=v(this.options.children,this.options.childSelector,t.currentTarget).findIndex(t=>t===e||t.contains(e));return-1!==o?o:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,e,o){if(window.pswp||!this.options)return!1;if(!e&&this.options.gallery&&this.options.children){const t=v(this.options.gallery);t[0]&&(e={gallery:t[0]})}return this.options.index=t,this.options.initialPointerPos=o,this.shouldOpen=!0,this.preload(t,e),!0}preload(t,e){const{options:o}=this;e&&(o.dataSource=e);const r=[],n=typeof o.pswpModule;if(b(o.pswpModule))r.push(Promise.resolve(o.pswpModule));else{if("string"===n)throw new Error("pswpModule as string is no longer supported");if("function"!==n)throw new Error("pswpModule is not valid");r.push(o.pswpModule())}"function"==typeof o.openPromise&&r.push(o.openPromise()),!1!==o.preloadFirstSlide&&t>=0&&(this._preloadedContent=x(t,this));const a=++this._uid;Promise.all(r).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 o="object"==typeof t?new t.default(this.options):new t(this.options);this.pswp=o,window.pswp=o,Object.keys(this._listeners).forEach(t=>{this._listeners[t]?.forEach(e=>{o.on(t,e)})}),Object.keys(this._filters).forEach(t=>{this._filters[t]?.forEach(e=>{o.addFilter(t,e.fn,e.priority)})}),this._preloadedContent&&(o.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),o.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),o.init()}destroy(){this.pswp?.destroy(),this.shouldOpen=!1,this._listeners={},v(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.removeEventListener("click",this.onThumbnailsClick,!1)})}});export{le as a,ce as c,Jt as d,Gt as f,ae as i,te as l,qt as m,Ie as n,se as o,Bt as p,oe as r,ie as s,Oe as t,Kt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=require("./C9yNmSQ8.js");function e(e){return{onFetch:(a,n)=>{const r=a.options,o=a.fetchOptions?.meta?.fetchMore?.direction,u=a.state.data?.pages||[],h=a.state.data?.pageParams||[];let c={pages:[],pageParams:[]},l=0;const y=async()=>{let n=!1;const y=t.ensureQueryFn(a.options,a.fetchOptions),d=async(e,s,i)=>{if(n)return Promise.reject();if(null==s&&e.pages.length)return Promise.resolve(e);const r=await y((()=>{const e={client:a.client,queryKey:a.queryKey,pageParam:s,direction:i?"backward":"forward",meta:a.options.meta};var r;return r=e,t.addConsumeAwareSignal(r,()=>a.signal,()=>n=!0),e})()),{maxPages:o}=a.options,u=i?t.addToStart:t.addToEnd;return{pages:u(e.pages,r,o),pageParams:u(e.pageParams,s,o)}};if(o&&u.length){const t="backward"===o,e=t?i:s,a={pages:u,pageParams:h};c=await d(a,e(r,a),t)}else{const t=e??u.length;do{const t=0===l?h[0]??r.initialPageParam:s(r,c);if(l>0&&null==t)break;c=await d(c,t),l++}while(l<t)}return c};a.options.persister?a.fetchFn=()=>a.options.persister?.(y,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},n):a.fetchFn=y}}}function s(t,{pages:e,pageParams:s}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,s[i],s):void 0}function i(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}function a(t,e){return!!e&&null!=s(t,e)}function n(t,e){return!(!e||!t.getPreviousPageParam)&&null!=i(t,e)}var r=class extends t.Removable{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const s=()=>{this.#a({type:"continue"})},i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=t.createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(new Error("No mutationFn found")),onFail:(t,e)=>{this.#a({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#a({type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const a="pending"===this.state.status,n=!this.#i.canStart();try{if(a)s();else{this.#a({type:"pending",variables:e,isPaused:n}),this.#s.config.onMutate&&await this.#s.config.onMutate(e,this,i);const t=await(this.options.onMutate?.(e,i));t!==this.state.context&&this.#a({type:"pending",context:t,variables:e,isPaused:n})}const t=await this.#i.start();return await(this.#s.config.onSuccess?.(t,e,this.state.context,this,i)),await(this.options.onSuccess?.(t,e,this.state.context,i)),await(this.#s.config.onSettled?.(t,null,this.state.variables,this.state.context,this,i)),await(this.options.onSettled?.(t,null,e,this.state.context,i)),this.#a({type:"success",data:t}),t}catch(r){try{await(this.#s.config.onError?.(r,e,this.state.context,this,i))}catch(o){Promise.reject(o)}try{await(this.options.onError?.(r,e,this.state.context,i))}catch(o){Promise.reject(o)}try{await(this.#s.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,i))}catch(o){Promise.reject(o)}try{await(this.options.onSettled?.(void 0,r,e,this.state.context,i))}catch(o){Promise.reject(o)}throw this.#a({type:"error",error:r}),r}finally{this.#s.runNext(this)}}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),t.notifyManager.batch(()=>{this.#e.forEach(t=>{t.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}},o=class extends t.Subscribable{constructor(t={}){super(),this.config=t,this.#n=new Set,this.#r=new Map,this.#o=0}#n;#r;#o;build(t,e,s){const i=new r({client:t,mutationCache:this,mutationId:++this.#o,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#n.add(t);const e=u(t);if("string"==typeof e){const s=this.#r.get(e);s?s.push(t):this.#r.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#n.delete(t)){const e=u(t);if("string"==typeof e){const s=this.#r.get(e);if(s)if(s.length>1){const e=s.indexOf(t);-1!==e&&s.splice(e,1)}else s[0]===t&&this.#r.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=u(t);if("string"==typeof e){const s=this.#r.get(e)?.find(t=>"pending"===t.state.status);return!s||s===t}return!0}runNext(t){const e=u(t);return"string"==typeof e?(this.#r.get(e)?.find(e=>e!==t&&e.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){t.notifyManager.batch(()=>{this.#n.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#n.clear(),this.#r.clear()})}getAll(){return Array.from(this.#n)}find(e){const s={exact:!0,...e};return this.getAll().find(e=>t.matchMutation(s,e))}findAll(e={}){return this.getAll().filter(s=>t.matchMutation(e,s))}notify(e){t.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return t.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(t.noop))))}};function u(t){return t.options.scope?.id}var h=class extends t.Subscribable{constructor(t={}){super(),this.config=t,this.#u=new Map}#u;build(e,s,i){const a=s.queryKey,n=s.queryHash??t.hashQueryKeyByOptions(a,s);let r=this.get(n);return r||(r=new t.Query({client:e,queryKey:a,queryHash:n,options:e.defaultQueryOptions(s),state:i,defaultOptions:e.getQueryDefaults(a)}),this.add(r)),r}add(t){this.#u.has(t.queryHash)||(this.#u.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#u.get(t.queryHash);e&&(t.destroy(),e===t&&this.#u.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){t.notifyManager.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#u.get(t)}getAll(){return[...this.#u.values()]}find(e){const s={exact:!0,...e};return this.getAll().find(e=>t.matchQuery(s,e))}findAll(e={}){const s=this.getAll();return Object.keys(e).length>0?s.filter(s=>t.matchQuery(e,s)):s}notify(e){t.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){t.notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){t.notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},c=class{#h;#s;#c;#l;#y;#d;#f;#p;constructor(t={}){this.#h=t.queryCache||new h,this.#s=t.mutationCache||new o,this.#c=t.defaultOptions||{},this.#l=new Map,this.#y=new Map,this.#d=0}mount(){this.#d++,1===this.#d&&(this.#f=t.focusManager.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onFocus())}),this.#p=t.onlineManager.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onOnline())}))}unmount(){this.#d--,0===this.#d&&(this.#f?.(),this.#f=void 0,this.#p?.(),this.#p=void 0)}isFetching(t){return this.#h.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#s.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state.data}ensureQueryData(e){const s=this.defaultQueryOptions(e),i=this.#h.build(this,s),a=i.state.data;return void 0===a?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(t.resolveStaleTime(s.staleTime,i))&&this.prefetchQuery(s),Promise.resolve(a))}getQueriesData(t){return this.#h.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(e,s,i){const a=this.defaultQueryOptions({queryKey:e}),n=this.#h.get(a.queryHash)?.state.data,r=t.functionalUpdate(s,n);if(void 0!==r)return this.#h.build(this,a).setData(r,{...i,manual:!0})}setQueriesData(e,s,i){return t.notifyManager.batch(()=>this.#h.findAll(e).map(({queryKey:t})=>[t,this.setQueryData(t,s,i)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state}removeQueries(e){const s=this.#h;t.notifyManager.batch(()=>{s.findAll(e).forEach(t=>{s.remove(t)})})}resetQueries(e,s){const i=this.#h;return t.notifyManager.batch(()=>(i.findAll(e).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...e},s)))}cancelQueries(e,s={}){const i={revert:!0,...s},a=t.notifyManager.batch(()=>this.#h.findAll(e).map(t=>t.cancel(i)));return Promise.all(a).then(t.noop).catch(t.noop)}invalidateQueries(e,s={}){return t.notifyManager.batch(()=>(this.#h.findAll(e).forEach(t=>{t.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},s)))}refetchQueries(e,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},a=t.notifyManager.batch(()=>this.#h.findAll(e).filter(t=>!t.isDisabled()&&!t.isStatic()).map(e=>{let s=e.fetch(void 0,i);return i.throwOnError||(s=s.catch(t.noop)),"paused"===e.state.fetchStatus?Promise.resolve():s}));return Promise.all(a).then(t.noop)}fetchQuery(e){const s=this.defaultQueryOptions(e);void 0===s.retry&&(s.retry=!1);const i=this.#h.build(this,s);return i.isStaleByTime(t.resolveStaleTime(s.staleTime,i))?i.fetch(s):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(t.noop).catch(t.noop)}fetchInfiniteQuery(t){return t.behavior=e(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(t.noop).catch(t.noop)}ensureInfiniteQueryData(t){return t.behavior=e(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return t.onlineManager.isOnline()?this.#s.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#h}getMutationCache(){return this.#s}getDefaultOptions(){return this.#c}setDefaultOptions(t){this.#c=t}setQueryDefaults(e,s){this.#l.set(t.hashKey(e),{queryKey:e,defaultOptions:s})}getQueryDefaults(e){const s=[...this.#l.values()],i={};return s.forEach(s=>{t.partialMatchKey(e,s.queryKey)&&Object.assign(i,s.defaultOptions)}),i}setMutationDefaults(e,s){this.#y.set(t.hashKey(e),{mutationKey:e,defaultOptions:s})}getMutationDefaults(e){const s=[...this.#y.values()],i={};return s.forEach(s=>{t.partialMatchKey(e,s.mutationKey)&&Object.assign(i,s.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const s={...this.#c.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return s.queryHash||(s.queryHash=t.hashQueryKeyByOptions(s.queryKey,s)),void 0===s.refetchOnReconnect&&(s.refetchOnReconnect="always"!==s.networkMode),void 0===s.throwOnError&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===t.skipToken&&(s.enabled=!1),s}defaultMutationOptions(t){return t?._defaulted?t:{...this.#c.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#h.clear(),this.#s.clear()}};Object.defineProperty(exports,"QueryClient",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"hasNextPage",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"hasPreviousPage",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"infiniteQueryBehavior",{enumerable:!0,get:function(){return e}});
|
|
1
|
+
const t=require("./DV6DJ1Br.js");function e(e){return{onFetch:(a,n)=>{const r=a.options,o=a.fetchOptions?.meta?.fetchMore?.direction,u=a.state.data?.pages||[],h=a.state.data?.pageParams||[];let c={pages:[],pageParams:[]},l=0;const y=async()=>{let n=!1;const y=t.ensureQueryFn(a.options,a.fetchOptions),d=async(e,s,i)=>{if(n)return Promise.reject();if(null==s&&e.pages.length)return Promise.resolve(e);const r=await y((()=>{const e={client:a.client,queryKey:a.queryKey,pageParam:s,direction:i?"backward":"forward",meta:a.options.meta};var r;return r=e,t.addConsumeAwareSignal(r,()=>a.signal,()=>n=!0),e})()),{maxPages:o}=a.options,u=i?t.addToStart:t.addToEnd;return{pages:u(e.pages,r,o),pageParams:u(e.pageParams,s,o)}};if(o&&u.length){const t="backward"===o,e=t?i:s,a={pages:u,pageParams:h};c=await d(a,e(r,a),t)}else{const t=e??u.length;do{const t=0===l?h[0]??r.initialPageParam:s(r,c);if(l>0&&null==t)break;c=await d(c,t),l++}while(l<t)}return c};a.options.persister?a.fetchFn=()=>a.options.persister?.(y,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},n):a.fetchFn=y}}}function s(t,{pages:e,pageParams:s}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,s[i],s):void 0}function i(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}function a(t,e){return!!e&&null!=s(t,e)}function n(t,e){return!(!e||!t.getPreviousPageParam)&&null!=i(t,e)}var r=class extends t.Removable{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const s=()=>{this.#a({type:"continue"})},i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=t.createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(new Error("No mutationFn found")),onFail:(t,e)=>{this.#a({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#a({type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const a="pending"===this.state.status,n=!this.#i.canStart();try{if(a)s();else{this.#a({type:"pending",variables:e,isPaused:n}),this.#s.config.onMutate&&await this.#s.config.onMutate(e,this,i);const t=await(this.options.onMutate?.(e,i));t!==this.state.context&&this.#a({type:"pending",context:t,variables:e,isPaused:n})}const t=await this.#i.start();return await(this.#s.config.onSuccess?.(t,e,this.state.context,this,i)),await(this.options.onSuccess?.(t,e,this.state.context,i)),await(this.#s.config.onSettled?.(t,null,this.state.variables,this.state.context,this,i)),await(this.options.onSettled?.(t,null,e,this.state.context,i)),this.#a({type:"success",data:t}),t}catch(r){try{await(this.#s.config.onError?.(r,e,this.state.context,this,i))}catch(o){Promise.reject(o)}try{await(this.options.onError?.(r,e,this.state.context,i))}catch(o){Promise.reject(o)}try{await(this.#s.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,i))}catch(o){Promise.reject(o)}try{await(this.options.onSettled?.(void 0,r,e,this.state.context,i))}catch(o){Promise.reject(o)}throw this.#a({type:"error",error:r}),r}finally{this.#s.runNext(this)}}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),t.notifyManager.batch(()=>{this.#e.forEach(t=>{t.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}},o=class extends t.Subscribable{constructor(t={}){super(),this.config=t,this.#n=new Set,this.#r=new Map,this.#o=0}#n;#r;#o;build(t,e,s){const i=new r({client:t,mutationCache:this,mutationId:++this.#o,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#n.add(t);const e=u(t);if("string"==typeof e){const s=this.#r.get(e);s?s.push(t):this.#r.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#n.delete(t)){const e=u(t);if("string"==typeof e){const s=this.#r.get(e);if(s)if(s.length>1){const e=s.indexOf(t);-1!==e&&s.splice(e,1)}else s[0]===t&&this.#r.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=u(t);if("string"==typeof e){const s=this.#r.get(e)?.find(t=>"pending"===t.state.status);return!s||s===t}return!0}runNext(t){const e=u(t);return"string"==typeof e?(this.#r.get(e)?.find(e=>e!==t&&e.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){t.notifyManager.batch(()=>{this.#n.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#n.clear(),this.#r.clear()})}getAll(){return Array.from(this.#n)}find(e){const s={exact:!0,...e};return this.getAll().find(e=>t.matchMutation(s,e))}findAll(e={}){return this.getAll().filter(s=>t.matchMutation(e,s))}notify(e){t.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return t.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(t.noop))))}};function u(t){return t.options.scope?.id}var h=class extends t.Subscribable{constructor(t={}){super(),this.config=t,this.#u=new Map}#u;build(e,s,i){const a=s.queryKey,n=s.queryHash??t.hashQueryKeyByOptions(a,s);let r=this.get(n);return r||(r=new t.Query({client:e,queryKey:a,queryHash:n,options:e.defaultQueryOptions(s),state:i,defaultOptions:e.getQueryDefaults(a)}),this.add(r)),r}add(t){this.#u.has(t.queryHash)||(this.#u.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#u.get(t.queryHash);e&&(t.destroy(),e===t&&this.#u.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){t.notifyManager.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#u.get(t)}getAll(){return[...this.#u.values()]}find(e){const s={exact:!0,...e};return this.getAll().find(e=>t.matchQuery(s,e))}findAll(e={}){const s=this.getAll();return Object.keys(e).length>0?s.filter(s=>t.matchQuery(e,s)):s}notify(e){t.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){t.notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){t.notifyManager.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},c=class{#h;#s;#c;#l;#y;#d;#f;#p;constructor(t={}){this.#h=t.queryCache||new h,this.#s=t.mutationCache||new o,this.#c=t.defaultOptions||{},this.#l=new Map,this.#y=new Map,this.#d=0}mount(){this.#d++,1===this.#d&&(this.#f=t.focusManager.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onFocus())}),this.#p=t.onlineManager.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#h.onOnline())}))}unmount(){this.#d--,0===this.#d&&(this.#f?.(),this.#f=void 0,this.#p?.(),this.#p=void 0)}isFetching(t){return this.#h.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#s.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state.data}ensureQueryData(e){const s=this.defaultQueryOptions(e),i=this.#h.build(this,s),a=i.state.data;return void 0===a?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(t.resolveStaleTime(s.staleTime,i))&&this.prefetchQuery(s),Promise.resolve(a))}getQueriesData(t){return this.#h.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(e,s,i){const a=this.defaultQueryOptions({queryKey:e}),n=this.#h.get(a.queryHash)?.state.data,r=t.functionalUpdate(s,n);if(void 0!==r)return this.#h.build(this,a).setData(r,{...i,manual:!0})}setQueriesData(e,s,i){return t.notifyManager.batch(()=>this.#h.findAll(e).map(({queryKey:t})=>[t,this.setQueryData(t,s,i)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#h.get(e.queryHash)?.state}removeQueries(e){const s=this.#h;t.notifyManager.batch(()=>{s.findAll(e).forEach(t=>{s.remove(t)})})}resetQueries(e,s){const i=this.#h;return t.notifyManager.batch(()=>(i.findAll(e).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...e},s)))}cancelQueries(e,s={}){const i={revert:!0,...s},a=t.notifyManager.batch(()=>this.#h.findAll(e).map(t=>t.cancel(i)));return Promise.all(a).then(t.noop).catch(t.noop)}invalidateQueries(e,s={}){return t.notifyManager.batch(()=>(this.#h.findAll(e).forEach(t=>{t.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},s)))}refetchQueries(e,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},a=t.notifyManager.batch(()=>this.#h.findAll(e).filter(t=>!t.isDisabled()&&!t.isStatic()).map(e=>{let s=e.fetch(void 0,i);return i.throwOnError||(s=s.catch(t.noop)),"paused"===e.state.fetchStatus?Promise.resolve():s}));return Promise.all(a).then(t.noop)}fetchQuery(e){const s=this.defaultQueryOptions(e);void 0===s.retry&&(s.retry=!1);const i=this.#h.build(this,s);return i.isStaleByTime(t.resolveStaleTime(s.staleTime,i))?i.fetch(s):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(t.noop).catch(t.noop)}fetchInfiniteQuery(t){return t.behavior=e(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(t.noop).catch(t.noop)}ensureInfiniteQueryData(t){return t.behavior=e(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return t.onlineManager.isOnline()?this.#s.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#h}getMutationCache(){return this.#s}getDefaultOptions(){return this.#c}setDefaultOptions(t){this.#c=t}setQueryDefaults(e,s){this.#l.set(t.hashKey(e),{queryKey:e,defaultOptions:s})}getQueryDefaults(e){const s=[...this.#l.values()],i={};return s.forEach(s=>{t.partialMatchKey(e,s.queryKey)&&Object.assign(i,s.defaultOptions)}),i}setMutationDefaults(e,s){this.#y.set(t.hashKey(e),{mutationKey:e,defaultOptions:s})}getMutationDefaults(e){const s=[...this.#y.values()],i={};return s.forEach(s=>{t.partialMatchKey(e,s.mutationKey)&&Object.assign(i,s.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const s={...this.#c.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return s.queryHash||(s.queryHash=t.hashQueryKeyByOptions(s.queryKey,s)),void 0===s.refetchOnReconnect&&(s.refetchOnReconnect="always"!==s.networkMode),void 0===s.throwOnError&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===t.skipToken&&(s.enabled=!1),s}defaultMutationOptions(t){return t?._defaulted?t:{...this.#c.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#h.clear(),this.#s.clear()}};Object.defineProperty(exports,"QueryClient",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"hasNextPage",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"hasPreviousPage",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"infiniteQueryBehavior",{enumerable:!0,get:function(){return e}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./D4geS7mP.js"),t=require("./C9yNmSQ8.js");let r=require("react");r=e.__toESM(r),require("react/jsx-runtime");var n=class extends t.Subscribable{constructor(e,r){super(),this.options=r,this.#e=e,this.#t=null,this.#r=t.pendingThenable(),this.bindMethods(),this.setOptions(r)}#e;#n=void 0;#o=void 0;#s=void 0;#i;#a;#r;#t;#l;#c;#u;#h;#d;#f;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#n.addObserver(this),o(this.#n,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return s(this.#n,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return s(this.#n,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#g(),this.#b(),this.#n.removeObserver(this)}setOptions(e){const r=this.options,n=this.#n;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof t.resolveEnabled(this.options.enabled,this.#n))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#n.setOptions(this.options),r._defaulted&&!t.shallowEqualObjects(this.options,r)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#n,observer:this});const o=this.hasListeners();o&&i(this.#n,n,this.options,r)&&this.#m(),this.updateResult(),!o||this.#n===n&&t.resolveEnabled(this.options.enabled,this.#n)===t.resolveEnabled(r.enabled,this.#n)&&t.resolveStaleTime(this.options.staleTime,this.#n)===t.resolveStaleTime(r.staleTime,this.#n)||this.#v();const s=this.#_();!o||this.#n===n&&t.resolveEnabled(this.options.enabled,this.#n)===t.resolveEnabled(r.enabled,this.#n)&&s===this.#f||this.#R(s)}getOptimisticResult(e){const r=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(r,e);var o;return o=n,t.shallowEqualObjects(this.getCurrentResult(),o)||(this.#s=n,this.#a=this.options,this.#i=this.#n.state),n}getCurrentResult(){return this.#s}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.#r.status||this.#r.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#n}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#m(e){this.#w();let r=this.#n.fetch(this.options,e);return e?.throwOnError||(r=r.catch(t.noop)),r}#v(){this.#g();const e=t.resolveStaleTime(this.options.staleTime,this.#n);if(t.environmentManager.isServer()||this.#s.isStale||!t.isValidTimeout(e))return;const r=t.timeUntilStale(this.#s.dataUpdatedAt,e)+1;this.#h=t.timeoutManager.setTimeout(()=>{this.#s.isStale||this.updateResult()},r)}#_(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#n):this.options.refetchInterval)??!1}#R(e){this.#b(),this.#f=e,!t.environmentManager.isServer()&&!1!==t.resolveEnabled(this.options.enabled,this.#n)&&t.isValidTimeout(this.#f)&&0!==this.#f&&(this.#d=t.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||t.focusManager.isFocused())&&this.#m()},this.#f))}#y(){this.#v(),this.#R(this.#_())}#g(){this.#h&&(t.timeoutManager.clearTimeout(this.#h),this.#h=void 0)}#b(){this.#d&&(t.timeoutManager.clearInterval(this.#d),this.#d=void 0)}createResult(e,r){const n=this.#n,s=this.options,l=this.#s,c=this.#i,u=this.#a,h=e!==n?e.state:this.#o,{state:d}=e;let f,p={...d},m=!1;if(r._optimisticResults){const a=this.hasListeners(),l=!a&&o(e,r),c=a&&i(e,n,r,s);(l||c)&&(p={...p,...t.fetchState(d.data,e.options)}),"isRestoring"===r._optimisticResults&&(p.fetchStatus="idle")}let{error:y,errorUpdatedAt:g,status:b}=p;f=p.data;let w=!1;if(void 0!==r.placeholderData&&void 0===f&&"pending"===b){let e;l?.isPlaceholderData&&r.placeholderData===u?.placeholderData?(e=l.data,w=!0):e="function"==typeof r.placeholderData?r.placeholderData(this.#u?.state.data,this.#u):r.placeholderData,void 0!==e&&(b="success",f=t.replaceData(l?.data,e,r),m=!0)}if(r.select&&void 0!==f&&!w)if(l&&f===c?.data&&r.select===this.#l)f=this.#c;else try{this.#l=r.select,f=r.select(f),f=t.replaceData(l?.data,f,r),this.#c=f,this.#t=null}catch(E){this.#t=E}this.#t&&(y=this.#t,f=this.#c,g=Date.now(),b="error");const v="fetching"===p.fetchStatus,_="pending"===b,R="error"===b,S=_&&v,T=void 0!==f,x={status:b,fetchStatus:p.fetchStatus,isPending:_,isSuccess:"success"===b,isError:R,isInitialLoading:S,isLoading:S,data:f,dataUpdatedAt:p.dataUpdatedAt,error:y,errorUpdatedAt:g,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:p.dataUpdateCount>h.dataUpdateCount||p.errorUpdateCount>h.errorUpdateCount,isFetching:v,isRefetching:v&&!_,isLoadingError:R&&!T,isPaused:"paused"===p.fetchStatus,isPlaceholderData:m,isRefetchError:R&&T,isStale:a(e,r),refetch:this.refetch,promise:this.#r,isEnabled:!1!==t.resolveEnabled(r.enabled,e)};if(this.options.experimental_prefetchInRender){const r=void 0!==x.data,o="error"===x.status&&!r,s=e=>{o?e.reject(x.error):r&&e.resolve(x.data)},i=()=>{s(this.#r=x.promise=t.pendingThenable())},a=this.#r;switch(a.status){case"pending":e.queryHash===n.queryHash&&s(a);break;case"fulfilled":(o||x.data!==a.value)&&i();break;case"rejected":o&&x.error===a.reason||i()}}return x}updateResult(){const e=this.#s,r=this.createResult(this.#n,this.options);this.#i=this.#n.state,this.#a=this.options,void 0!==this.#i.data&&(this.#u=this.#n),t.shallowEqualObjects(r,e)||(this.#s=r,this.#S({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 n=new Set(r??this.#p);return this.options.throwOnError&&n.add("error"),Object.keys(this.#s).some(t=>{const r=t;return this.#s[r]!==e[r]&&n.has(r)})})()}))}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#n)return;const t=this.#n;this.#n=e,this.#o=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#S(e){t.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#s)}),this.#e.getQueryCache().notify({query:this.#n,type:"observerResultsUpdated"})})}};function o(e,r){return function(e,r){return!1!==t.resolveEnabled(r.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===r.retryOnMount)}(e,r)||void 0!==e.state.data&&s(e,r,r.refetchOnMount)}function s(e,r,n){if(!1!==t.resolveEnabled(r.enabled,e)&&"static"!==t.resolveStaleTime(r.staleTime,e)){const t="function"==typeof n?n(e):n;return"always"===t||!1!==t&&a(e,r)}return!1}function i(e,r,n,o){return(e!==r||!1===t.resolveEnabled(o.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&a(e,n)}function a(e,r){return!1!==t.resolveEnabled(r.enabled,e)&&e.isStaleByTime(t.resolveStaleTime(r.staleTime,e))}var l=r.createContext(!1);l.Provider;var c=r.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),u=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function h(e,n,o){if("production"!==process.env.NODE_ENV&&("object"!=typeof e||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const s=r.useContext(l),i=r.useContext(c),a=t.useQueryClient(o),h=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(h);const d=a.getQueryCache().get(h.queryHash);"production"!==process.env.NODE_ENV&&(h.queryFn||console.error(`[${h.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),h._optimisticResults=s?"isRestoring":"optimistic",(e=>{if(e.suspense){const t=1e3,r=e=>"static"===e?e:Math.max(e??t,t),n=e.staleTime;e.staleTime="function"==typeof n?(...e)=>r(n(...e)):r(n),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(h),((e,r,n)=>{const o=n?.state.error&&"function"==typeof e.throwOnError?t.shouldThrowError(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||o)&&(r.isReset()||(e.retryOnMount=!1))})(h,i,d),(e=>{r.useEffect(()=>{e.clearReset()},[e])})(i);const f=!a.getQueryCache().get(h.queryHash),[p]=r.useState(()=>new n(a,h)),m=p.getOptimisticResult(h),y=!s&&!1!==e.subscribed;if(r.useSyncExternalStore(r.useCallback(e=>{const r=y?p.subscribe(t.notifyManager.batchCalls(e)):t.noop;return p.updateResult(),r},[p,y]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),r.useEffect(()=>{p.setOptions(h)},[h,p]),((e,t)=>e?.suspense&&t.isPending)(h,m))throw u(h,p,i);if((({result:e,errorResetBoundary:r,throwOnError:n,query:o,suspense:s})=>e.isError&&!r.isReset()&&!e.isFetching&&o&&(s&&void 0===e.data||t.shouldThrowError(n,[e.error,o])))({result:m,errorResetBoundary:i,throwOnError:h.throwOnError,query:d,suspense:h.suspense}))throw m.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(h,m),h.experimental_prefetchInRender&&!t.environmentManager.isServer()&&((e,t)=>e.isLoading&&e.isFetching&&!t)(m,s)&&(f?u(h,p,i):d?.promise)?.catch(t.noop).finally(()=>{p.updateResult()}),h.notifyOnChangeProps?m:p.trackResult(m)}function d(e,t){return h(e,n,t)}function f(e,t){for(var r in e)if("__source"!==r&&!(r in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}function p(e,t){this.props=e,this.context=t}(p.prototype=new t.x$1).isPureReactComponent=!0,p.prototype.shouldComponentUpdate=function(e,t){return f(this.props,e)||f(this.state,t)};var m=t.l.__b;t.l.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),m&&m(e)},"undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref"),t.L;var y=t.l.__e;t.l.__e=function(e,t,r,n){if(e.then)for(var o,s=t;s=s.__;)if((o=s.__c)&&o.__c)return t.__e??(t.__e=r.__e,t.__k=r.__k),o.__c(e,t);y(e,t,r,n)};var g=t.l.unmount;function b(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=function(e,t){for(var r in t)e[r]=t[r];return e}({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return b(e,t,r)})),e}function w(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return w(e,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function v(){this.__u=0,this.o=null,this.__b=null}function _(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function R(e){var r,n,o,s=null;function i(i){if(r||(r=e()).then(function(e){e&&(s=e.default||e),o=!0},function(e){n=e,o=!0}),n)throw n;if(!o)throw r;return s?t._$1(s,i):null}return i.displayName="Lazy",i.__f=!0,i}function S(){this.i=null,this.l=null}t.l.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),g&&g(e)},(v.prototype=new t.x$1).__c=function(e,t){var r=t.__c,n=this;n.o??=[],n.o.push(r);var o=_(n.__v),s=!1,i=function(){s||n.__z||(s=!0,r.__R=null,o?o(l):l())};r.__R=i;var a=r.__P;r.__P=null;var l=function(){if(! --n.__u){if(n.state.__a){var e=n.state.__a;n.__v.__k[0]=w(e,e.__c.__P,e.__c.__O)}var t;for(n.setState({__a:n.__b=null});t=n.o.pop();)t.__P=a,t.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(i,i)},v.prototype.componentWillUnmount=function(){this.o=[]},v.prototype.render=function(e,r){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=b(this.__b,n,o.__O=o.__P)}this.__b=null}var s=r.__a&&t._$1(t.k,null,e.fallback);return s&&(s.__u&=-33),[t._$1(t.k,null,r.__a?null:e.children),s]};var T=function(e,t,r){if(++r[1]===r[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.i=r=r[2]}};function x(e){return this.getChildContext=function(){return e.context},e.children}function E(e){var r=this,n=e.h;if(r.componentWillUnmount=function(){t.J(null,r.v),r.v=null,r.h=null},r.h&&r.h!==n&&r.componentWillUnmount(),!r.v){for(var o=r.__v;null!==o&&!o.__m&&null!==o.__;)o=o.__;r.h=n,r.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:o.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(e,t){this.childNodes.push(e),r.h.insertBefore(e,t)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),r.h.removeChild(e)}}}t.J(t._$1(x,{context:r.context},e.__v),r.v)}function O(e,r){var n=t._$1(E,{__v:e,h:r});return n.containerInfo=r,n}(S.prototype=new t.x$1).__a=function(e){var t=this,r=_(t.__v),n=t.l.get(e);return n[0]++,function(o){var s=function(){t.props.revealOrder?(n.push(o),T(t,e,n)):o()};r?r(s):s()}},S.prototype.render=function(e){this.i=null,this.l=new Map;var r=t.L(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&r.reverse();for(var n=r.length;n--;)this.l.set(r[n],this.i=[1,0,this.i]);return e.children},S.prototype.componentDidUpdate=S.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,r){T(e,r,t)})};var A="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,P=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,C=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,I=/[A-Z0-9]/g,q="undefined"!=typeof document,k=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};t.x$1.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(t.x$1.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var N=t.l.event;t.l.event=function(e){return N&&(e=N(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var U={configurable:!0,get:function(){return this.class}},M=t.l.vnode;t.l.vnode=function(e){"string"==typeof e.type&&function(e){var r=e.props,n=e.type,o={},s=-1==n.indexOf("-");for(var i in r){var a=r[i];if(!("value"===i&&"defaultValue"in r&&null==a||q&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var l=i.toLowerCase();"defaultValue"===i&&"value"in r&&null==r.value?i="value":"download"===i&&!0===a?a="":"translate"===l&&"no"===a?a=!1:"o"===l[0]&&"n"===l[1]?"ondoubleclick"===l?i="ondblclick":"onchange"!==l||"input"!==n&&"textarea"!==n||k(r.type)?"onfocus"===l?i="onfocusin":"onblur"===l?i="onfocusout":C.test(i)&&(i=l):l=i="oninput":s&&P.test(i)?i=i.replace(I,"-$&").toLowerCase():null===a&&(a=void 0),"oninput"===l&&o[i=l]&&(i="oninputCapture"),o[i]=a}}"select"==n&&(o.multiple&&Array.isArray(o.value)&&(o.value=t.L(r.children).forEach(function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)})),null!=o.defaultValue&&(o.value=t.L(r.children).forEach(function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value}))),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",U)):r.className&&(o.class=o.className=r.className),e.props=o}(e),e.$$typeof=A,M&&M(e)};var D=t.l.__r;t.l.__r=function(e){D&&D(e),e.__c};var j=t.l.diffed;t.l.diffed=function(e){j&&j(e);var t=e.props,r=e.__e;null!=r&&"textarea"===e.type&&"value"in t&&t.value!==r.value&&(r.value=null==t.value?"":t.value)};var L=class extends Error{response;request;options;constructor(e,t,r){const n=`${e.status||0===e.status?e.status:""} ${e.statusText??""}`.trim();super(`Request failed with ${n?`status code ${n}`:"an unknown error"}: ${t.method} ${t.url}`),this.name="HTTPError",this.response=e,this.request=t,this.options=r}},Q=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}},F=class extends Error{name="ForceRetryError";customDelay;code;customRequest;constructor(e){const t=e?.cause?e.cause instanceof Error?e.cause:new Q(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}},z=(()=>{let e=!1,t=!1;const r="function"==typeof globalThis.ReadableStream,n="function"==typeof globalThis.Request;if(r&&n)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(o){if(o instanceof Error&&"unsupported BodyInit type"===o.message)return!1;throw o}return e&&!t})(),B="function"==typeof globalThis.AbortController,H="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,$="function"==typeof globalThis.ReadableStream,V="function"==typeof globalThis.FormData,W=["get","post","put","patch","head","delete"],Z={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},G=(new TextEncoder).encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,J=Symbol("stop"),X=class{options;constructor(e){this.options=e}},K=e=>new X(e),Y={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},ee={next:!0},te={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},re=(e,t,r)=>{let n,o=0;return e.pipeThrough(new TransformStream({transform(e,s){if(s.enqueue(e),n){o+=n.byteLength;let e=0===t?0:o/t;e>=1&&(e=1-Number.EPSILON),r?.({percent:e,totalBytes:Math.max(t,o),transferredBytes:o},n)}n=e},flush(){n&&(o+=n.byteLength,r?.({percent:1,totalBytes:Math.max(t,o),transferredBytes:o},n))}}))},ne=e=>null!==e&&"object"==typeof e,oe=(...e)=>{for(const t of e)if((!ne(t)||Array.isArray(t))&&void 0!==t)throw new TypeError("The `options` argument must be an object");return ce({},...e)},se=(e={},t={})=>{const r=new globalThis.Headers(e),n=t instanceof globalThis.Headers,o=new globalThis.Headers(t);for(const[s,i]of o.entries())n&&"undefined"===i||void 0===i?r.delete(s):r.set(s,i);return r};function ie(e,t,r){return Object.hasOwn(t,r)&&void 0===t[r]?[]:ce(e[r]??[],t[r]??[])}var ae=(e={},t={})=>({beforeRequest:ie(e,t,"beforeRequest"),beforeRetry:ie(e,t,"beforeRetry"),afterResponse:ie(e,t,"afterResponse"),beforeError:ie(e,t,"beforeError")}),le=(e,t)=>{const r=new URLSearchParams;for(const n of[e,t])if(void 0!==n)if(n instanceof URLSearchParams)for(const[e,t]of n.entries())r.append(e,t);else if(Array.isArray(n))for(const e of n){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(ne(n))for(const[e,t]of Object.entries(n))void 0!==t&&r.append(e,String(t));else{const e=new URLSearchParams(n);for(const[t,n]of e.entries())r.append(t,n)}return r},ce=(...e)=>{let t,r={},n={},o={};const s=[];for(const i of e)if(Array.isArray(i))Array.isArray(r)||(r=[]),r=[...r,...i];else if(ne(i)){for(let[e,n]of Object.entries(i))if("signal"===e&&n instanceof globalThis.AbortSignal)s.push(n);else if("context"!==e)"searchParams"!==e?(ne(n)&&e in r&&(n=ce(r[e],n)),r={...r,[e]:n}):t=null==n?void 0:void 0===t?n:le(t,n);else{if(null!=n&&(!ne(n)||Array.isArray(n)))throw new TypeError("The `context` option must be an object");r={...r,context:null==n?{}:{...r.context,...n}}}ne(i.hooks)&&(o=ae(o,i.hooks),r.hooks=o),ne(i.headers)&&(n=se(n,i.headers),r.headers=n)}return void 0!==t&&(r.searchParams=t),s.length>0&&(1===s.length?r.signal=s[0]:r.signal=H?AbortSignal.any(s):s.at(-1)),r},ue=e=>W.includes(e)?e.toUpperCase():e,he={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},de=(e={})=>{if("number"==typeof e)return{...he,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{...he,...t}},fe=class extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}},pe=class e{static create(t,r){const n=new e(t,r),o=n.#T(async()=>{if("number"==typeof n.#x.timeout&&n.#x.timeout>2147483647)throw new RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let e=await n.#E();for(const r of n.#x.hooks.afterResponse){const o=n.#O(e.clone());let s;try{s=await r(n.request,n.#A(),o,{retryCount:n.#P})}catch(t){throw n.#C(o),n.#C(e),t}if(s instanceof X)throw n.#C(o),n.#C(e),new F(s.options);const i=s instanceof globalThis.Response?s:e;o!==i&&n.#C(o),e!==i&&n.#C(e),e=i}if(n.#O(e),!e.ok&&("function"==typeof n.#x.throwHttpErrors?n.#x.throwHttpErrors(e.status):n.#x.throwHttpErrors)){let t=new L(e,n.request,n.#A());for(const e of n.#x.hooks.beforeError)t=await e(t,{retryCount:n.#P});throw t}if(n.#x.onDownloadProgress){if("function"!=typeof n.#x.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!$)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const t=e.clone();return n.#C(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(re(e.body,r,t),{status:e.status,statusText:e.statusText,headers:e.headers})})(t,n.#x.onDownloadProgress)}return e}).finally(()=>{const e=n.#I;n.#q(e?.body??void 0),n.#q(n.request.body??void 0)});for(const[e,s]of Object.entries(Z))"bytes"===e&&"function"!=typeof globalThis.Response?.prototype?.bytes||(o[e]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||s);const t=await o;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 o}static#k(e){return!e||"object"!=typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))}request;#N;#P=0;#U;#x;#I;#M;#D;constructor(t,r={}){if(this.#U=t,this.#x={...r,headers:se(this.#U.headers,r.headers),hooks:ae({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:ue(r.method??this.#U.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:de(r.retry),throwHttpErrors:r.throwHttpErrors??!0,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis),context:r.context??{}},"string"!=typeof this.#U&&!(this.#U instanceof URL||this.#U instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this.#x.prefixUrl&&"string"==typeof this.#U){if(this.#U.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this.#x.prefixUrl.endsWith("/")||(this.#x.prefixUrl+="/"),this.#U=this.#x.prefixUrl+this.#U}B&&H&&(this.#M=this.#x.signal??this.#U.signal,this.#N=new globalThis.AbortController,this.#x.signal=this.#M?AbortSignal.any([this.#M,this.#N.signal]):this.#N.signal),z&&(this.#x.duplex="half"),void 0!==this.#x.json&&(this.#x.body=this.#x.stringifyJson?.(this.#x.json)??JSON.stringify(this.#x.json),this.#x.headers.set("content-type",this.#x.headers.get("content-type")??"application/json"));const n=r.headers&&new globalThis.Headers(r.headers).has("content-type");if(this.#U instanceof globalThis.Request&&(V&&this.#x.body instanceof globalThis.FormData||this.#x.body instanceof URLSearchParams)&&!n&&this.#x.headers.delete("content-type"),this.request=new globalThis.Request(this.#U,this.#x),void 0!==(o=this.#x.searchParams)&&(Array.isArray(o)?o.length>0:o instanceof URLSearchParams?o.size>0:"object"==typeof o?Object.keys(o).length>0:"string"==typeof o?o.trim().length>0:Boolean(o))){const t="?"+("string"==typeof this.#x.searchParams?this.#x.searchParams.replace(/^\?/,""):new URLSearchParams(e.#k(this.#x.searchParams)).toString()),r=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,t);this.request=new globalThis.Request(r,this.#x)}var o;if(this.#x.onUploadProgress){if("function"!=typeof this.#x.onUploadProgress)throw new TypeError("The `onUploadProgress` option must be a function");if(!z)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#j(this.request,this.#x.body??void 0)}}#L(){const e=this.#x.retry.delay(this.#P);let t=e;!0===this.#x.retry.jitter?t=Math.random()*e:"function"==typeof this.#x.retry.jitter&&(t=this.#x.retry.jitter(e),(!Number.isFinite(t)||t<0)&&(t=e));const r=this.#x.retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(r,t)}async#Q(e){if(this.#P++,this.#P>this.#x.retry.limit)throw e;const t=e instanceof Error?e:new Q(e);if(t instanceof F)return t.customDelay??this.#L();if(!this.#x.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(void 0!==this.#x.retry.shouldRetry){const r=await this.#x.retry.shouldRetry({error:t,retryCount:this.#P});if(!1===r)throw e;if(!0===r)return this.#L()}if(function(e){return e instanceof fe||e?.name===fe.name}(e)&&!this.#x.retry.retryOnTimeout)throw e;if(function(e){return e instanceof L||e?.name===L.name}(e)){if(!this.#x.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.#x.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.#x.retry.maxRetryAfter??e;return e<r?e:r}if(413===e.response.status)throw e}return this.#L()}#O(e){return this.#x.parseJson&&(e.json=async()=>this.#x.parseJson(await e.text())),e}#q(e){e&&e.cancel().catch(()=>{})}#C(e){this.#q(e.body??void 0)}async#T(e){try{return await e()}catch(t){const r=Math.min(await this.#Q(t),2147483647);if(this.#P<1)throw t;if(await async function(e,{signal:t}){return new Promise((r,n)=>{function o(){clearTimeout(s),n(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",o,{once:!0}));const s=setTimeout(()=>{t?.removeEventListener("abort",o),r()},e)})}(r,this.#M?{signal:this.#M}:{}),t instanceof F&&t.customRequest){const e=this.#x.signal?new globalThis.Request(t.customRequest,{signal:this.#x.signal}):new globalThis.Request(t.customRequest);this.#F(e)}for(const e of this.#x.hooks.beforeRetry){const r=await e({request:this.request,options:this.#A(),error:t,retryCount:this.#P});if(r instanceof globalThis.Request){this.#F(r);break}if(r instanceof globalThis.Response)return r;if(r===J)return}return this.#T(e)}}async#E(){this.#N?.signal.aborted&&(this.#N=new globalThis.AbortController,this.#x.signal=this.#M?AbortSignal.any([this.#M,this.#N.signal]):this.#N.signal,this.request=new globalThis.Request(this.request,{signal:this.#x.signal}));for(const t of this.#x.hooks.beforeRequest){const e=await t(this.request,this.#A(),{retryCount:this.#P});if(e instanceof Response)return e;if(e instanceof globalThis.Request){this.#F(e);break}}const e=((e,t)=>{const r={};for(const n in t)Object.hasOwn(t,n)&&(n in te||n in Y||n in e&&!(n in ee)||(r[n]=t[n]));return r})(this.request,this.#x);return this.#I=this.request,this.request=this.#I.clone(),!1===this.#x.timeout?this.#x.fetch(this.#I,e):async function(e,t,r,n){return new Promise((o,s)=>{const i=setTimeout(()=>{r&&r.abort(),s(new fe(e))},n.timeout);n.fetch(e,t).then(o).catch(s).then(()=>{clearTimeout(i)})})}(this.#I,e,this.#N,this.#x)}#A(){if(!this.#D){const{hooks:e,...t}=this.#x;this.#D=Object.freeze(t)}return this.#D}#F(e){this.#D=void 0,this.request=this.#j(e)}#j(e,t){return this.#x.onUploadProgress&&e.body?((e,t,r)=>{if(!e.body)return e;const n=(e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(const[r,n]of e)t+=G,t+=(new TextEncoder).encode(`Content-Disposition: form-data; name="${r}"`).length,t+="string"==typeof n?(new TextEncoder).encode(n).length:n.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:re(e.body,n,t)})})(e,this.#x.onUploadProgress,t??this.#x.body??void 0):e}},me=e=>{const t=(t,r)=>pe.create(t,oe(e,r));for(const r of W)t[r]=(t,n)=>pe.create(t,oe(e,n,{method:r}));return t.create=e=>me(oe(e)),t.extend=t=>("function"==typeof t&&(t=t(e??{})),me(oe(e,t))),t.stop=J,t.retry=K,t},ye=me();function ge({title:e,children:r}){return t.u("div",{className:"mx-auto mt-24 w-fit max-w-xl space-y-8",children:[t.u("svg",{xmlns:"http://www.w3.org/2000/svg",className:"mx-auto h-64 w-fit",width:"800",height:"469.317",viewBox:"0 0 800 469.317",role:"img","aria-label":"Error illustration",children:t.u("g",{transform:"translate(-443.142 -257.876)",children:[t.u("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"}),t.u("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"}),t.u("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"}),t.u("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"}),t.u("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"}),t.u("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"}),t.u("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"}),t.u("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"}),t.u("ellipse",{cx:"71.849",cy:"89.934",rx:"71.849",ry:"89.934",transform:"translate(928.82 428.806)",fill:"#f2f2f2"}),t.u("path",{d:"M505.77,325.365h.2l3.553,203.7h-7.5Z",transform:"translate(495.097 175.29)",fill:"#ccc"}),t.u("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"}),t.u("ellipse",{cx:"71.849",cy:"89.934",rx:"71.849",ry:"89.934",transform:"translate(722.256 428.806)",fill:"#f2f2f2"}),t.u("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"}),t.u("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"}),t.u("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"}),t.u("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"}),t.u("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"}),t.u("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"}),t.u("g",{transform:"translate(696.754 297.373)",children:[t.u("ellipse",{cx:"61.798",cy:"61.798",rx:"61.798",ry:"61.798",transform:"translate(215.662 36.955)",fill:"#ff6584"}),t.u("ellipse",{cx:"78.271",cy:"97.971",rx:"78.271",ry:"97.971",transform:"translate(225.025 127.808)",fill:"#e6e6e6"}),t.u("path",{d:"M508.105,323.365h.215l3.87,221.909h-8.171Z",transform:"translate(-204.593 -117.286)",fill:"#ccc"}),t.u("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"}),t.u("ellipse",{cx:"78.271",cy:"97.971",rx:"78.271",ry:"97.971",transform:"translate(0 127.808)",fill:"#e6e6e6"}),t.u("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"}),t.u("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"}),t.u("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"})]})]})}),t.u("div",{className:"space-y-4",children:[t.u("h4",{className:"text-foreground text-center text-lg font-semibold",children:e}),t.u("p",{className:"text-muted-foreground text-center",children:r})]})]})}function be({organizationId:e,errorType:r}){return"custom-auth-invalid"===r?t.u(ge,{title:"Invalid input",children:"Custom auth mode requires uid, fname, lname. For more details please contact Qrati support."}):t.u(ge,{title:"page-not-registered"===r?"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"," ",t.u("a",{className:"font-medium text-blue-500",href:t.EXTERNAL_ROUTES.ORGANIZATION_SETTINGS(e),target:"_blank",rel:"noreferrer",children:"Organization Settings"})," ","⇨"," ",t.u("a",{className:"font-medium text-blue-500",href:t.EXTERNAL_ROUTES.ORGANIZATION_SETTINGS_INTEGRATION(e),target:"_blank",rel:"noreferrer",children:"Integration Settings"}),". For more details please contact Qrati support."]})}var we=e=>({google:"Google",apple:"Apple"}[e]||e.charAt(0).toUpperCase()+e.slice(1)),ve=(e,t=0)=>{let r=t^e.length,n=0;const o=e.length;for(;n+3<o;){let t=255&e.charCodeAt(n)|(255&e.charCodeAt(n+1))<<8|(255&e.charCodeAt(n+2))<<16|(255&e.charCodeAt(n+3))<<24;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),r^=t,r=r<<13|r>>>19,r=Math.imul(r,5)+3864292196,n+=4}let s=0;switch(o-n){case 3:s^=(255&e.charCodeAt(n+2))<<16;case 2:s^=(255&e.charCodeAt(n+1))<<8;case 1:s^=255&e.charCodeAt(n),s=Math.imul(s,3432918353),s=s<<15|s>>>17,s=Math.imul(s,461845907),r^=s}return r^=r>>>16,r=Math.imul(r,2246822507),r^=r>>>13,r=Math.imul(r,3266489909),r^=r>>>16,r>>>=0,r.toString(16).padStart(8,"0")},_e=async e=>{try{return await e()}catch{return null}},Re=e=>{if(null===e||"object"!=typeof e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(Re).join(",")}]`;const t=Object.keys(e).sort(),r=[];for(const n of t){const t=e[n];void 0!==t&&r.push(`${Re(n)}:${Re(t)}`)}return`{${r.join(",")}}`},Se=async({debug:e=!1}={})=>{const t=await _e(()=>Ae()),r=await _e(()=>new Intl.NumberFormat(window.navigator.languages?.[0]||"en").resolvedOptions().numberingSystem),n=window.navigator.languages?Array.from(window.navigator.languages).join(","):window.navigator.language||null,o=Intl.DateTimeFormat().resolvedOptions().timeZone,s=(new Date).getTimezoneOffset(),i=window.matchMedia("(prefers-reduced-motion: reduce)").matches?"reduce":"no-preference",a=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",l=window.matchMedia("(forced-colors: active)").matches?"active":null,{pixelDepth:c,colorDepth:u}=window.screen,h="ontouchstart"in window||window.navigator.maxTouchPoints>0,d=await _e(()=>Te(e)),f=await _e(()=>xe()),p=await _e(()=>Ee(e)),m=await _e(()=>Oe(e)),y=window.screen.width&&window.screen.height?(window.screen.width/window.screen.height).toFixed(4):null,g={vendor:window.navigator.vendor||null,platform:window.navigator.platform||null,fonts:t,numberingSystem:r,languages:n,timezone:o,timezoneOffset:s,reducedMotion:i,colorScheme:a,hardwareConcurrency:window.navigator.hardwareConcurrency||null,deviceMemory:window.navigator.deviceMemory||null,forcedColors:l,pixelDepth:c,colorDepth:u,touchSupport:h,canvasID:d,webglID:f,webgpuID:p,audioID:m},b={aspectRatio:y,width:window.screen.width,height:window.screen.height,maxTouchPoints:window.navigator.maxTouchPoints};return(!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(g,b),{fingerprint:ve(Re(g)),...g}},Te=async e=>{const t=document.createElement("canvas");t.width=280,t.height=100;const r=t.getContext("2d"),n=r.createLinearGradient(0,0,280,100);return n.addColorStop(0,"#f60"),n.addColorStop(.4,"#09f"),n.addColorStop(.7,"#f09"),n.addColorStop(1,"#0f9"),r.fillStyle=n,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)),ve(t.toDataURL("image/png"))},xe=()=>{const e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl"),r=t.getExtension("WEBGL_debug_renderer_info");return ve(Re({vendor:r?t.getParameter(r.UNMASKED_VENDOR_WEBGL):t.getParameter(t.VENDOR),renderer:r?t.getParameter(r.UNMASKED_RENDERER_WEBGL):t.getParameter(t.RENDERER)}))},Ee=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 ve(Re(r))},Oe=async e=>{const t=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,6e3,44100),r=t.createOscillator();r.type="sawtooth",r.frequency.value=8800;const n=t.createDynamicsCompressor();n.threshold.value=-48,n.knee.value=30,n.ratio.value=14,n.attack.value=0,n.release.value=.3;const o=t.createGain();o.gain.value=.4,r.connect(n),n.connect(o),o.connect(t.destination),r.start(0);const s=(await t.startRendering()).getChannelData(0);let i=0,a=0;for(let c=3e3;c<5800;c+=2){const e=s[c];i=31*i+Math.floor(1e5*(e+1))|0,a=Math.imul(a^Math.floor(98765*e),2246822519)}const l=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(s.slice(4500,5e3)),n=e.width/r.length;for(let o=0;o<r.length;o++){const s=o*n,i=(r[o]+1)/2*e.height;0===o?t.moveTo(s,i):t.lineTo(s,i)}t.stroke(),document.body.appendChild(e)}return ve(l.toString(16))},Ae=()=>{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 n={};for(const s of e)r.style.fontFamily=s,n[s]=r.offsetWidth;const o=[];for(const s of t){let t=!1;for(const i of e)if(r.style.fontFamily=`"${s}", ${i}`,r.offsetWidth!==n[i]){o.push(s),t=!0;break}t||(r.style.fontFamily=`"${s}"`,r.offsetWidth!==n.monospace&&r.offsetWidth!==n.serif&&o.push(s))}return document.body.removeChild(r),o.length?o.sort().join(","):null};"undefined"!=typeof window&&(window.getBrowserFingerprint=Se);var Pe=t.R(void 0),Ce=({props:e={},children:r})=>{const{organizationId:n,uid:o,fname:s,lname:i,theme:a="light"}=e,[l,c]=t.d(()=>{if("undefined"==typeof window)return null;if(o||s||i)return null;const e=localStorage.getItem("qrati_token");return e?{token:e}:null}),{isLoading:u,data:h,error:f}=d({queryKey:["qrati-connect-session",n],queryFn:async()=>{const e=await(async()=>{const e=await Se();return"string"==typeof e?e:e?.fingerprint})();return(await ye.post(t.API_ROUTES.INITIALIZE_SESSION,{json:{uid:o,fname:s,lname:i,browserFingerprint:e},headers:{"x-org-id":n,Authorization:o||s||i||!localStorage.getItem("qrati_token")?void 0:`Bearer ${localStorage.getItem("qrati_token")}`}}).json()).data},enabled:!!n});t.y(()=>{const e=h?.authSession?.session?.token,t=h?.authSession?.user;t&&e&&(c({...t,token:e}),h?.organization?.customAuth||localStorage.setItem("qrati_token",e))},[h]);const p=t.T(()=>t.getFontCss(h?.organization?.integrationSettings,h?.organization?.customFontUrl),[h?.organization?.integrationSettings,h?.organization?.customFontUrl]),m=async e=>{try{const t=await((e,t,r)=>new Promise((n,o)=>{if(!e)return void o(new Error("Provider is required"));if(!t)return void o(new Error("Organization ID is required"));const s=new URL(`${r}/qc-social-auth`);s.searchParams.set("provider",e),s.searchParams.set("organizationId",t),s.searchParams.set("origin",window.location.origin);const i=(window.screen.width-500)/2,a=(window.screen.height-600)/2,l=window.open(s.toString(),"qrati_social_auth",`width=500,height=600,left=${i},top=${a},scrollbars=yes,resizable=yes,status=yes`);if(!l)return void o(new Error("Failed to open popup window. Please allow popups and try again."));const c=()=>{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:s,data:i,error:a,organizationId:u}=e.data||{};if(u===t)switch(s){case"QRATI_SOCIAL_AUTH_SUCCESS":c(),l.close(),n({user:i.user,session:i.session,token:i.token});break;case"QRATI_SOCIAL_AUTH_ERROR":console.error("Authentication error:",a),c(),l.close(),o(new Error(a||"Social authentication failed"));break;case"QRATI_SOCIAL_AUTH_CANCELLED":c(),l.close(),o(new Error("Authentication was cancelled"))}else console.warn("Organization ID mismatch:",u,"expected:",t)},h=setInterval(()=>{try{l.closed&&(c(),o(new Error("Authentication was cancelled")))}catch(e){}},1e3);window.addEventListener("message",u);const d=setTimeout(()=>{c(),l.closed||l.close(),o(new Error("Authentication timeout. Please try again."))},3e5)}))(e,n??"","'https://qrati.com");return t?.user&&t?.token&&(c({...t.user,token:t.token}),localStorage.setItem("qrati_token",t.token)),t}catch(f){throw console.error("Social login error:",f),f}};return f?t.u(v,{fallback:null,children:t.u(be,{organizationId:n??"",errorType:401===f?.response?.status?"page-not-registered":"generic-error"})}):!h?.organization?.customAuth||o&&s&&i?t.u(Pe.Provider,{value:{props:e,initializing:u,sessionId:h?.sessionId,organization:h?.organization,folders:h?.folders,loadingUser:u,user:l,registerUsingEmail:async(e,r,o,s)=>{try{const i=await ye.post(t.API_ROUTES.REGISTER,{json:{email:e,password:r,fname:o,lname:s},headers:{"x-org-id":n}}).json();return i.error?{error:i.error}:(c({...i.user,token:i.token}),localStorage.setItem("qrati_token",i.token),i)}catch(f){return{error:f?.message}}},loginWithGoogle:async()=>{try{return await m("google")}catch(f){throw console.error("Google login error:",f),f}},loginWithApple:async()=>{try{return await m("apple")}catch(f){throw console.error("Apple login error:",f),f}},loginUsingEmail:async(e,r)=>{try{const o=await ye.post(t.API_ROUTES.LOGIN,{json:{email:e,password:r},headers:{"x-org-id":n}}).json();return o.error?{error:o.error}:(c({...o.user,token:o.token}),localStorage.setItem("qrati_token",o.token),o)}catch(f){return{error:f?.message}}},signout:async()=>{try{const e=await ye.post(t.API_ROUTES.LOGOUT,{headers:{"x-org-id":n,Authorization:`Bearer ${l?.token}`}}).json();return e.error?{error:e.error}:(localStorage.removeItem("qrati_token"),c(null),e)}catch(f){return console.error(f),{error:f?.message}}},error:f},children:t.u("div",{id:"qrati-connect-container",style:{...t.getStyleObject(h?.organization,a),fontFamily:"var(--font-family)"},className:t.cn("bg-background text-foreground relative min-h-[80vh]"),children:[p?t.u("style",{children:p}):null,r]})}):t.u(v,{fallback:null,children:t.u(be,{organizationId:n??"",errorType:"custom-auth-invalid"})})},Ie=()=>{const e=t.x(Pe);if(void 0===e)throw new Error("useSession must be used within SessionProvider");return e};Object.defineProperty(exports,"$",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"QueryObserver",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"SessionProvider",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,"getBrowserFingerprint",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(exports,"getProviderDisplayName",{enumerable:!0,get:function(){return we}}),Object.defineProperty(exports,"ky",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,"useBaseQuery",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"useQuery",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"useSession",{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return R}});
|
|
1
|
+
const e=require("./D4geS7mP.js"),t=require("./DV6DJ1Br.js");let r=require("react");r=e.__toESM(r),require("react/jsx-runtime");var n=class extends t.Subscribable{constructor(e,r){super(),this.options=r,this.#e=e,this.#t=null,this.#r=t.pendingThenable(),this.bindMethods(),this.setOptions(r)}#e;#n=void 0;#o=void 0;#s=void 0;#i;#a;#r;#t;#l;#c;#u;#h;#d;#f;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#n.addObserver(this),o(this.#n,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return s(this.#n,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return s(this.#n,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#g(),this.#b(),this.#n.removeObserver(this)}setOptions(e){const r=this.options,n=this.#n;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof t.resolveEnabled(this.options.enabled,this.#n))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#n.setOptions(this.options),r._defaulted&&!t.shallowEqualObjects(this.options,r)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#n,observer:this});const o=this.hasListeners();o&&i(this.#n,n,this.options,r)&&this.#m(),this.updateResult(),!o||this.#n===n&&t.resolveEnabled(this.options.enabled,this.#n)===t.resolveEnabled(r.enabled,this.#n)&&t.resolveStaleTime(this.options.staleTime,this.#n)===t.resolveStaleTime(r.staleTime,this.#n)||this.#v();const s=this.#_();!o||this.#n===n&&t.resolveEnabled(this.options.enabled,this.#n)===t.resolveEnabled(r.enabled,this.#n)&&s===this.#f||this.#R(s)}getOptimisticResult(e){const r=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(r,e);var o;return o=n,t.shallowEqualObjects(this.getCurrentResult(),o)||(this.#s=n,this.#a=this.options,this.#i=this.#n.state),n}getCurrentResult(){return this.#s}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.#r.status||this.#r.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#n}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#m(e){this.#w();let r=this.#n.fetch(this.options,e);return e?.throwOnError||(r=r.catch(t.noop)),r}#v(){this.#g();const e=t.resolveStaleTime(this.options.staleTime,this.#n);if(t.environmentManager.isServer()||this.#s.isStale||!t.isValidTimeout(e))return;const r=t.timeUntilStale(this.#s.dataUpdatedAt,e)+1;this.#h=t.timeoutManager.setTimeout(()=>{this.#s.isStale||this.updateResult()},r)}#_(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#n):this.options.refetchInterval)??!1}#R(e){this.#b(),this.#f=e,!t.environmentManager.isServer()&&!1!==t.resolveEnabled(this.options.enabled,this.#n)&&t.isValidTimeout(this.#f)&&0!==this.#f&&(this.#d=t.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||t.focusManager.isFocused())&&this.#m()},this.#f))}#y(){this.#v(),this.#R(this.#_())}#g(){this.#h&&(t.timeoutManager.clearTimeout(this.#h),this.#h=void 0)}#b(){this.#d&&(t.timeoutManager.clearInterval(this.#d),this.#d=void 0)}createResult(e,r){const n=this.#n,s=this.options,l=this.#s,c=this.#i,u=this.#a,h=e!==n?e.state:this.#o,{state:d}=e;let f,p={...d},m=!1;if(r._optimisticResults){const a=this.hasListeners(),l=!a&&o(e,r),c=a&&i(e,n,r,s);(l||c)&&(p={...p,...t.fetchState(d.data,e.options)}),"isRestoring"===r._optimisticResults&&(p.fetchStatus="idle")}let{error:y,errorUpdatedAt:g,status:b}=p;f=p.data;let w=!1;if(void 0!==r.placeholderData&&void 0===f&&"pending"===b){let e;l?.isPlaceholderData&&r.placeholderData===u?.placeholderData?(e=l.data,w=!0):e="function"==typeof r.placeholderData?r.placeholderData(this.#u?.state.data,this.#u):r.placeholderData,void 0!==e&&(b="success",f=t.replaceData(l?.data,e,r),m=!0)}if(r.select&&void 0!==f&&!w)if(l&&f===c?.data&&r.select===this.#l)f=this.#c;else try{this.#l=r.select,f=r.select(f),f=t.replaceData(l?.data,f,r),this.#c=f,this.#t=null}catch(E){this.#t=E}this.#t&&(y=this.#t,f=this.#c,g=Date.now(),b="error");const v="fetching"===p.fetchStatus,_="pending"===b,R="error"===b,S=_&&v,T=void 0!==f,x={status:b,fetchStatus:p.fetchStatus,isPending:_,isSuccess:"success"===b,isError:R,isInitialLoading:S,isLoading:S,data:f,dataUpdatedAt:p.dataUpdatedAt,error:y,errorUpdatedAt:g,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:p.dataUpdateCount>h.dataUpdateCount||p.errorUpdateCount>h.errorUpdateCount,isFetching:v,isRefetching:v&&!_,isLoadingError:R&&!T,isPaused:"paused"===p.fetchStatus,isPlaceholderData:m,isRefetchError:R&&T,isStale:a(e,r),refetch:this.refetch,promise:this.#r,isEnabled:!1!==t.resolveEnabled(r.enabled,e)};if(this.options.experimental_prefetchInRender){const r=void 0!==x.data,o="error"===x.status&&!r,s=e=>{o?e.reject(x.error):r&&e.resolve(x.data)},i=()=>{s(this.#r=x.promise=t.pendingThenable())},a=this.#r;switch(a.status){case"pending":e.queryHash===n.queryHash&&s(a);break;case"fulfilled":(o||x.data!==a.value)&&i();break;case"rejected":o&&x.error===a.reason||i()}}return x}updateResult(){const e=this.#s,r=this.createResult(this.#n,this.options);this.#i=this.#n.state,this.#a=this.options,void 0!==this.#i.data&&(this.#u=this.#n),t.shallowEqualObjects(r,e)||(this.#s=r,this.#S({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 n=new Set(r??this.#p);return this.options.throwOnError&&n.add("error"),Object.keys(this.#s).some(t=>{const r=t;return this.#s[r]!==e[r]&&n.has(r)})})()}))}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#n)return;const t=this.#n;this.#n=e,this.#o=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#S(e){t.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#s)}),this.#e.getQueryCache().notify({query:this.#n,type:"observerResultsUpdated"})})}};function o(e,r){return function(e,r){return!1!==t.resolveEnabled(r.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===r.retryOnMount)}(e,r)||void 0!==e.state.data&&s(e,r,r.refetchOnMount)}function s(e,r,n){if(!1!==t.resolveEnabled(r.enabled,e)&&"static"!==t.resolveStaleTime(r.staleTime,e)){const t="function"==typeof n?n(e):n;return"always"===t||!1!==t&&a(e,r)}return!1}function i(e,r,n,o){return(e!==r||!1===t.resolveEnabled(o.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&a(e,n)}function a(e,r){return!1!==t.resolveEnabled(r.enabled,e)&&e.isStaleByTime(t.resolveStaleTime(r.staleTime,e))}var l=r.createContext(!1);l.Provider;var c=r.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),u=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function h(e,n,o){if("production"!==process.env.NODE_ENV&&("object"!=typeof e||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const s=r.useContext(l),i=r.useContext(c),a=t.useQueryClient(o),h=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(h);const d=a.getQueryCache().get(h.queryHash);"production"!==process.env.NODE_ENV&&(h.queryFn||console.error(`[${h.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),h._optimisticResults=s?"isRestoring":"optimistic",(e=>{if(e.suspense){const t=1e3,r=e=>"static"===e?e:Math.max(e??t,t),n=e.staleTime;e.staleTime="function"==typeof n?(...e)=>r(n(...e)):r(n),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(h),((e,r,n)=>{const o=n?.state.error&&"function"==typeof e.throwOnError?t.shouldThrowError(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||o)&&(r.isReset()||(e.retryOnMount=!1))})(h,i,d),(e=>{r.useEffect(()=>{e.clearReset()},[e])})(i);const f=!a.getQueryCache().get(h.queryHash),[p]=r.useState(()=>new n(a,h)),m=p.getOptimisticResult(h),y=!s&&!1!==e.subscribed;if(r.useSyncExternalStore(r.useCallback(e=>{const r=y?p.subscribe(t.notifyManager.batchCalls(e)):t.noop;return p.updateResult(),r},[p,y]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),r.useEffect(()=>{p.setOptions(h)},[h,p]),((e,t)=>e?.suspense&&t.isPending)(h,m))throw u(h,p,i);if((({result:e,errorResetBoundary:r,throwOnError:n,query:o,suspense:s})=>e.isError&&!r.isReset()&&!e.isFetching&&o&&(s&&void 0===e.data||t.shouldThrowError(n,[e.error,o])))({result:m,errorResetBoundary:i,throwOnError:h.throwOnError,query:d,suspense:h.suspense}))throw m.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(h,m),h.experimental_prefetchInRender&&!t.environmentManager.isServer()&&((e,t)=>e.isLoading&&e.isFetching&&!t)(m,s)&&(f?u(h,p,i):d?.promise)?.catch(t.noop).finally(()=>{p.updateResult()}),h.notifyOnChangeProps?m:p.trackResult(m)}function d(e,t){return h(e,n,t)}function f(e,t){for(var r in e)if("__source"!==r&&!(r in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}function p(e,t){this.props=e,this.context=t}(p.prototype=new t.x$1).isPureReactComponent=!0,p.prototype.shouldComponentUpdate=function(e,t){return f(this.props,e)||f(this.state,t)};var m=t.l.__b;t.l.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),m&&m(e)},"undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref"),t.L;var y=t.l.__e;t.l.__e=function(e,t,r,n){if(e.then)for(var o,s=t;s=s.__;)if((o=s.__c)&&o.__c)return t.__e??(t.__e=r.__e,t.__k=r.__k),o.__c(e,t);y(e,t,r,n)};var g=t.l.unmount;function b(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=function(e,t){for(var r in t)e[r]=t[r];return e}({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return b(e,t,r)})),e}function w(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return w(e,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function v(){this.__u=0,this.o=null,this.__b=null}function _(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function R(e){var r,n,o,s=null;function i(i){if(r||(r=e()).then(function(e){e&&(s=e.default||e),o=!0},function(e){n=e,o=!0}),n)throw n;if(!o)throw r;return s?t._$1(s,i):null}return i.displayName="Lazy",i.__f=!0,i}function S(){this.i=null,this.l=null}t.l.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),g&&g(e)},(v.prototype=new t.x$1).__c=function(e,t){var r=t.__c,n=this;n.o??=[],n.o.push(r);var o=_(n.__v),s=!1,i=function(){s||n.__z||(s=!0,r.__R=null,o?o(l):l())};r.__R=i;var a=r.__P;r.__P=null;var l=function(){if(! --n.__u){if(n.state.__a){var e=n.state.__a;n.__v.__k[0]=w(e,e.__c.__P,e.__c.__O)}var t;for(n.setState({__a:n.__b=null});t=n.o.pop();)t.__P=a,t.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(i,i)},v.prototype.componentWillUnmount=function(){this.o=[]},v.prototype.render=function(e,r){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=b(this.__b,n,o.__O=o.__P)}this.__b=null}var s=r.__a&&t._$1(t.k,null,e.fallback);return s&&(s.__u&=-33),[t._$1(t.k,null,r.__a?null:e.children),s]};var T=function(e,t,r){if(++r[1]===r[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.i=r=r[2]}};function x(e){return this.getChildContext=function(){return e.context},e.children}function E(e){var r=this,n=e.h;if(r.componentWillUnmount=function(){t.J(null,r.v),r.v=null,r.h=null},r.h&&r.h!==n&&r.componentWillUnmount(),!r.v){for(var o=r.__v;null!==o&&!o.__m&&null!==o.__;)o=o.__;r.h=n,r.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:o.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(e,t){this.childNodes.push(e),r.h.insertBefore(e,t)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),r.h.removeChild(e)}}}t.J(t._$1(x,{context:r.context},e.__v),r.v)}function O(e,r){var n=t._$1(E,{__v:e,h:r});return n.containerInfo=r,n}(S.prototype=new t.x$1).__a=function(e){var t=this,r=_(t.__v),n=t.l.get(e);return n[0]++,function(o){var s=function(){t.props.revealOrder?(n.push(o),T(t,e,n)):o()};r?r(s):s()}},S.prototype.render=function(e){this.i=null,this.l=new Map;var r=t.L(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&r.reverse();for(var n=r.length;n--;)this.l.set(r[n],this.i=[1,0,this.i]);return e.children},S.prototype.componentDidUpdate=S.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,r){T(e,r,t)})};var A="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,P=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,C=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,I=/[A-Z0-9]/g,q="undefined"!=typeof document,k=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};t.x$1.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(t.x$1.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var N=t.l.event;t.l.event=function(e){return N&&(e=N(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var U={configurable:!0,get:function(){return this.class}},M=t.l.vnode;t.l.vnode=function(e){"string"==typeof e.type&&function(e){var r=e.props,n=e.type,o={},s=-1==n.indexOf("-");for(var i in r){var a=r[i];if(!("value"===i&&"defaultValue"in r&&null==a||q&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var l=i.toLowerCase();"defaultValue"===i&&"value"in r&&null==r.value?i="value":"download"===i&&!0===a?a="":"translate"===l&&"no"===a?a=!1:"o"===l[0]&&"n"===l[1]?"ondoubleclick"===l?i="ondblclick":"onchange"!==l||"input"!==n&&"textarea"!==n||k(r.type)?"onfocus"===l?i="onfocusin":"onblur"===l?i="onfocusout":C.test(i)&&(i=l):l=i="oninput":s&&P.test(i)?i=i.replace(I,"-$&").toLowerCase():null===a&&(a=void 0),"oninput"===l&&o[i=l]&&(i="oninputCapture"),o[i]=a}}"select"==n&&(o.multiple&&Array.isArray(o.value)&&(o.value=t.L(r.children).forEach(function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)})),null!=o.defaultValue&&(o.value=t.L(r.children).forEach(function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value}))),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",U)):r.className&&(o.class=o.className=r.className),e.props=o}(e),e.$$typeof=A,M&&M(e)};var D=t.l.__r;t.l.__r=function(e){D&&D(e),e.__c};var j=t.l.diffed;t.l.diffed=function(e){j&&j(e);var t=e.props,r=e.__e;null!=r&&"textarea"===e.type&&"value"in t&&t.value!==r.value&&(r.value=null==t.value?"":t.value)};var L=class extends Error{response;request;options;constructor(e,t,r){const n=`${e.status||0===e.status?e.status:""} ${e.statusText??""}`.trim();super(`Request failed with ${n?`status code ${n}`:"an unknown error"}: ${t.method} ${t.url}`),this.name="HTTPError",this.response=e,this.request=t,this.options=r}},Q=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}},F=class extends Error{name="ForceRetryError";customDelay;code;customRequest;constructor(e){const t=e?.cause?e.cause instanceof Error?e.cause:new Q(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}},z=(()=>{let e=!1,t=!1;const r="function"==typeof globalThis.ReadableStream,n="function"==typeof globalThis.Request;if(r&&n)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(o){if(o instanceof Error&&"unsupported BodyInit type"===o.message)return!1;throw o}return e&&!t})(),B="function"==typeof globalThis.AbortController,H="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,$="function"==typeof globalThis.ReadableStream,V="function"==typeof globalThis.FormData,W=["get","post","put","patch","head","delete"],Z={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},G=(new TextEncoder).encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,J=Symbol("stop"),X=class{options;constructor(e){this.options=e}},K=e=>new X(e),Y={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},ee={next:!0},te={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},re=(e,t,r)=>{let n,o=0;return e.pipeThrough(new TransformStream({transform(e,s){if(s.enqueue(e),n){o+=n.byteLength;let e=0===t?0:o/t;e>=1&&(e=1-Number.EPSILON),r?.({percent:e,totalBytes:Math.max(t,o),transferredBytes:o},n)}n=e},flush(){n&&(o+=n.byteLength,r?.({percent:1,totalBytes:Math.max(t,o),transferredBytes:o},n))}}))},ne=e=>null!==e&&"object"==typeof e,oe=(...e)=>{for(const t of e)if((!ne(t)||Array.isArray(t))&&void 0!==t)throw new TypeError("The `options` argument must be an object");return ce({},...e)},se=(e={},t={})=>{const r=new globalThis.Headers(e),n=t instanceof globalThis.Headers,o=new globalThis.Headers(t);for(const[s,i]of o.entries())n&&"undefined"===i||void 0===i?r.delete(s):r.set(s,i);return r};function ie(e,t,r){return Object.hasOwn(t,r)&&void 0===t[r]?[]:ce(e[r]??[],t[r]??[])}var ae=(e={},t={})=>({beforeRequest:ie(e,t,"beforeRequest"),beforeRetry:ie(e,t,"beforeRetry"),afterResponse:ie(e,t,"afterResponse"),beforeError:ie(e,t,"beforeError")}),le=(e,t)=>{const r=new URLSearchParams;for(const n of[e,t])if(void 0!==n)if(n instanceof URLSearchParams)for(const[e,t]of n.entries())r.append(e,t);else if(Array.isArray(n))for(const e of n){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(ne(n))for(const[e,t]of Object.entries(n))void 0!==t&&r.append(e,String(t));else{const e=new URLSearchParams(n);for(const[t,n]of e.entries())r.append(t,n)}return r},ce=(...e)=>{let t,r={},n={},o={};const s=[];for(const i of e)if(Array.isArray(i))Array.isArray(r)||(r=[]),r=[...r,...i];else if(ne(i)){for(let[e,n]of Object.entries(i))if("signal"===e&&n instanceof globalThis.AbortSignal)s.push(n);else if("context"!==e)"searchParams"!==e?(ne(n)&&e in r&&(n=ce(r[e],n)),r={...r,[e]:n}):t=null==n?void 0:void 0===t?n:le(t,n);else{if(null!=n&&(!ne(n)||Array.isArray(n)))throw new TypeError("The `context` option must be an object");r={...r,context:null==n?{}:{...r.context,...n}}}ne(i.hooks)&&(o=ae(o,i.hooks),r.hooks=o),ne(i.headers)&&(n=se(n,i.headers),r.headers=n)}return void 0!==t&&(r.searchParams=t),s.length>0&&(1===s.length?r.signal=s[0]:r.signal=H?AbortSignal.any(s):s.at(-1)),r},ue=e=>W.includes(e)?e.toUpperCase():e,he={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},de=(e={})=>{if("number"==typeof e)return{...he,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{...he,...t}},fe=class extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}},pe=class e{static create(t,r){const n=new e(t,r),o=n.#T(async()=>{if("number"==typeof n.#x.timeout&&n.#x.timeout>2147483647)throw new RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let e=await n.#E();for(const r of n.#x.hooks.afterResponse){const o=n.#O(e.clone());let s;try{s=await r(n.request,n.#A(),o,{retryCount:n.#P})}catch(t){throw n.#C(o),n.#C(e),t}if(s instanceof X)throw n.#C(o),n.#C(e),new F(s.options);const i=s instanceof globalThis.Response?s:e;o!==i&&n.#C(o),e!==i&&n.#C(e),e=i}if(n.#O(e),!e.ok&&("function"==typeof n.#x.throwHttpErrors?n.#x.throwHttpErrors(e.status):n.#x.throwHttpErrors)){let t=new L(e,n.request,n.#A());for(const e of n.#x.hooks.beforeError)t=await e(t,{retryCount:n.#P});throw t}if(n.#x.onDownloadProgress){if("function"!=typeof n.#x.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!$)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const t=e.clone();return n.#C(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(re(e.body,r,t),{status:e.status,statusText:e.statusText,headers:e.headers})})(t,n.#x.onDownloadProgress)}return e}).finally(()=>{const e=n.#I;n.#q(e?.body??void 0),n.#q(n.request.body??void 0)});for(const[e,s]of Object.entries(Z))"bytes"===e&&"function"!=typeof globalThis.Response?.prototype?.bytes||(o[e]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||s);const t=await o;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 o}static#k(e){return!e||"object"!=typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))}request;#N;#P=0;#U;#x;#I;#M;#D;constructor(t,r={}){if(this.#U=t,this.#x={...r,headers:se(this.#U.headers,r.headers),hooks:ae({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:ue(r.method??this.#U.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:de(r.retry),throwHttpErrors:r.throwHttpErrors??!0,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis),context:r.context??{}},"string"!=typeof this.#U&&!(this.#U instanceof URL||this.#U instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this.#x.prefixUrl&&"string"==typeof this.#U){if(this.#U.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this.#x.prefixUrl.endsWith("/")||(this.#x.prefixUrl+="/"),this.#U=this.#x.prefixUrl+this.#U}B&&H&&(this.#M=this.#x.signal??this.#U.signal,this.#N=new globalThis.AbortController,this.#x.signal=this.#M?AbortSignal.any([this.#M,this.#N.signal]):this.#N.signal),z&&(this.#x.duplex="half"),void 0!==this.#x.json&&(this.#x.body=this.#x.stringifyJson?.(this.#x.json)??JSON.stringify(this.#x.json),this.#x.headers.set("content-type",this.#x.headers.get("content-type")??"application/json"));const n=r.headers&&new globalThis.Headers(r.headers).has("content-type");if(this.#U instanceof globalThis.Request&&(V&&this.#x.body instanceof globalThis.FormData||this.#x.body instanceof URLSearchParams)&&!n&&this.#x.headers.delete("content-type"),this.request=new globalThis.Request(this.#U,this.#x),void 0!==(o=this.#x.searchParams)&&(Array.isArray(o)?o.length>0:o instanceof URLSearchParams?o.size>0:"object"==typeof o?Object.keys(o).length>0:"string"==typeof o?o.trim().length>0:Boolean(o))){const t="?"+("string"==typeof this.#x.searchParams?this.#x.searchParams.replace(/^\?/,""):new URLSearchParams(e.#k(this.#x.searchParams)).toString()),r=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,t);this.request=new globalThis.Request(r,this.#x)}var o;if(this.#x.onUploadProgress){if("function"!=typeof this.#x.onUploadProgress)throw new TypeError("The `onUploadProgress` option must be a function");if(!z)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#j(this.request,this.#x.body??void 0)}}#L(){const e=this.#x.retry.delay(this.#P);let t=e;!0===this.#x.retry.jitter?t=Math.random()*e:"function"==typeof this.#x.retry.jitter&&(t=this.#x.retry.jitter(e),(!Number.isFinite(t)||t<0)&&(t=e));const r=this.#x.retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(r,t)}async#Q(e){if(this.#P++,this.#P>this.#x.retry.limit)throw e;const t=e instanceof Error?e:new Q(e);if(t instanceof F)return t.customDelay??this.#L();if(!this.#x.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(void 0!==this.#x.retry.shouldRetry){const r=await this.#x.retry.shouldRetry({error:t,retryCount:this.#P});if(!1===r)throw e;if(!0===r)return this.#L()}if(function(e){return e instanceof fe||e?.name===fe.name}(e)&&!this.#x.retry.retryOnTimeout)throw e;if(function(e){return e instanceof L||e?.name===L.name}(e)){if(!this.#x.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.#x.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.#x.retry.maxRetryAfter??e;return e<r?e:r}if(413===e.response.status)throw e}return this.#L()}#O(e){return this.#x.parseJson&&(e.json=async()=>this.#x.parseJson(await e.text())),e}#q(e){e&&e.cancel().catch(()=>{})}#C(e){this.#q(e.body??void 0)}async#T(e){try{return await e()}catch(t){const r=Math.min(await this.#Q(t),2147483647);if(this.#P<1)throw t;if(await async function(e,{signal:t}){return new Promise((r,n)=>{function o(){clearTimeout(s),n(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",o,{once:!0}));const s=setTimeout(()=>{t?.removeEventListener("abort",o),r()},e)})}(r,this.#M?{signal:this.#M}:{}),t instanceof F&&t.customRequest){const e=this.#x.signal?new globalThis.Request(t.customRequest,{signal:this.#x.signal}):new globalThis.Request(t.customRequest);this.#F(e)}for(const e of this.#x.hooks.beforeRetry){const r=await e({request:this.request,options:this.#A(),error:t,retryCount:this.#P});if(r instanceof globalThis.Request){this.#F(r);break}if(r instanceof globalThis.Response)return r;if(r===J)return}return this.#T(e)}}async#E(){this.#N?.signal.aborted&&(this.#N=new globalThis.AbortController,this.#x.signal=this.#M?AbortSignal.any([this.#M,this.#N.signal]):this.#N.signal,this.request=new globalThis.Request(this.request,{signal:this.#x.signal}));for(const t of this.#x.hooks.beforeRequest){const e=await t(this.request,this.#A(),{retryCount:this.#P});if(e instanceof Response)return e;if(e instanceof globalThis.Request){this.#F(e);break}}const e=((e,t)=>{const r={};for(const n in t)Object.hasOwn(t,n)&&(n in te||n in Y||n in e&&!(n in ee)||(r[n]=t[n]));return r})(this.request,this.#x);return this.#I=this.request,this.request=this.#I.clone(),!1===this.#x.timeout?this.#x.fetch(this.#I,e):async function(e,t,r,n){return new Promise((o,s)=>{const i=setTimeout(()=>{r&&r.abort(),s(new fe(e))},n.timeout);n.fetch(e,t).then(o).catch(s).then(()=>{clearTimeout(i)})})}(this.#I,e,this.#N,this.#x)}#A(){if(!this.#D){const{hooks:e,...t}=this.#x;this.#D=Object.freeze(t)}return this.#D}#F(e){this.#D=void 0,this.request=this.#j(e)}#j(e,t){return this.#x.onUploadProgress&&e.body?((e,t,r)=>{if(!e.body)return e;const n=(e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(const[r,n]of e)t+=G,t+=(new TextEncoder).encode(`Content-Disposition: form-data; name="${r}"`).length,t+="string"==typeof n?(new TextEncoder).encode(n).length:n.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:re(e.body,n,t)})})(e,this.#x.onUploadProgress,t??this.#x.body??void 0):e}},me=e=>{const t=(t,r)=>pe.create(t,oe(e,r));for(const r of W)t[r]=(t,n)=>pe.create(t,oe(e,n,{method:r}));return t.create=e=>me(oe(e)),t.extend=t=>("function"==typeof t&&(t=t(e??{})),me(oe(e,t))),t.stop=J,t.retry=K,t},ye=me();function ge({title:e,children:r}){return t.u("div",{className:"mx-auto mt-24 w-fit max-w-xl space-y-8",children:[t.u("svg",{xmlns:"http://www.w3.org/2000/svg",className:"mx-auto h-64 w-fit",width:"800",height:"469.317",viewBox:"0 0 800 469.317",role:"img","aria-label":"Error illustration",children:t.u("g",{transform:"translate(-443.142 -257.876)",children:[t.u("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"}),t.u("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"}),t.u("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"}),t.u("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"}),t.u("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"}),t.u("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"}),t.u("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"}),t.u("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"}),t.u("ellipse",{cx:"71.849",cy:"89.934",rx:"71.849",ry:"89.934",transform:"translate(928.82 428.806)",fill:"#f2f2f2"}),t.u("path",{d:"M505.77,325.365h.2l3.553,203.7h-7.5Z",transform:"translate(495.097 175.29)",fill:"#ccc"}),t.u("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"}),t.u("ellipse",{cx:"71.849",cy:"89.934",rx:"71.849",ry:"89.934",transform:"translate(722.256 428.806)",fill:"#f2f2f2"}),t.u("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"}),t.u("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"}),t.u("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"}),t.u("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"}),t.u("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"}),t.u("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"}),t.u("g",{transform:"translate(696.754 297.373)",children:[t.u("ellipse",{cx:"61.798",cy:"61.798",rx:"61.798",ry:"61.798",transform:"translate(215.662 36.955)",fill:"#ff6584"}),t.u("ellipse",{cx:"78.271",cy:"97.971",rx:"78.271",ry:"97.971",transform:"translate(225.025 127.808)",fill:"#e6e6e6"}),t.u("path",{d:"M508.105,323.365h.215l3.87,221.909h-8.171Z",transform:"translate(-204.593 -117.286)",fill:"#ccc"}),t.u("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"}),t.u("ellipse",{cx:"78.271",cy:"97.971",rx:"78.271",ry:"97.971",transform:"translate(0 127.808)",fill:"#e6e6e6"}),t.u("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"}),t.u("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"}),t.u("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"})]})]})}),t.u("div",{className:"space-y-4",children:[t.u("h4",{className:"text-foreground text-center text-lg font-semibold",children:e}),t.u("p",{className:"text-muted-foreground text-center",children:r})]})]})}function be({organizationId:e,errorType:r}){return"custom-auth-invalid"===r?t.u(ge,{title:"Invalid input",children:"Custom auth mode requires uid, fname, lname. For more details please contact Qrati support."}):t.u(ge,{title:"page-not-registered"===r?"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"," ",t.u("a",{className:"font-medium text-blue-500",href:t.EXTERNAL_ROUTES.ORGANIZATION_SETTINGS(e),target:"_blank",rel:"noreferrer",children:"Organization Settings"})," ","⇨"," ",t.u("a",{className:"font-medium text-blue-500",href:t.EXTERNAL_ROUTES.ORGANIZATION_SETTINGS_INTEGRATION(e),target:"_blank",rel:"noreferrer",children:"Integration Settings"}),". For more details please contact Qrati support."]})}var we=e=>({google:"Google",apple:"Apple"}[e]||e.charAt(0).toUpperCase()+e.slice(1)),ve=(e,t=0)=>{let r=t^e.length,n=0;const o=e.length;for(;n+3<o;){let t=255&e.charCodeAt(n)|(255&e.charCodeAt(n+1))<<8|(255&e.charCodeAt(n+2))<<16|(255&e.charCodeAt(n+3))<<24;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),r^=t,r=r<<13|r>>>19,r=Math.imul(r,5)+3864292196,n+=4}let s=0;switch(o-n){case 3:s^=(255&e.charCodeAt(n+2))<<16;case 2:s^=(255&e.charCodeAt(n+1))<<8;case 1:s^=255&e.charCodeAt(n),s=Math.imul(s,3432918353),s=s<<15|s>>>17,s=Math.imul(s,461845907),r^=s}return r^=r>>>16,r=Math.imul(r,2246822507),r^=r>>>13,r=Math.imul(r,3266489909),r^=r>>>16,r>>>=0,r.toString(16).padStart(8,"0")},_e=async e=>{try{return await e()}catch{return null}},Re=e=>{if(null===e||"object"!=typeof e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(Re).join(",")}]`;const t=Object.keys(e).sort(),r=[];for(const n of t){const t=e[n];void 0!==t&&r.push(`${Re(n)}:${Re(t)}`)}return`{${r.join(",")}}`},Se=async({debug:e=!1}={})=>{const t=await _e(()=>Ae()),r=await _e(()=>new Intl.NumberFormat(window.navigator.languages?.[0]||"en").resolvedOptions().numberingSystem),n=window.navigator.languages?Array.from(window.navigator.languages).join(","):window.navigator.language||null,o=Intl.DateTimeFormat().resolvedOptions().timeZone,s=(new Date).getTimezoneOffset(),i=window.matchMedia("(prefers-reduced-motion: reduce)").matches?"reduce":"no-preference",a=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",l=window.matchMedia("(forced-colors: active)").matches?"active":null,{pixelDepth:c,colorDepth:u}=window.screen,h="ontouchstart"in window||window.navigator.maxTouchPoints>0,d=await _e(()=>Te(e)),f=await _e(()=>xe()),p=await _e(()=>Ee(e)),m=await _e(()=>Oe(e)),y=window.screen.width&&window.screen.height?(window.screen.width/window.screen.height).toFixed(4):null,g={vendor:window.navigator.vendor||null,platform:window.navigator.platform||null,fonts:t,numberingSystem:r,languages:n,timezone:o,timezoneOffset:s,reducedMotion:i,colorScheme:a,hardwareConcurrency:window.navigator.hardwareConcurrency||null,deviceMemory:window.navigator.deviceMemory||null,forcedColors:l,pixelDepth:c,colorDepth:u,touchSupport:h,canvasID:d,webglID:f,webgpuID:p,audioID:m},b={aspectRatio:y,width:window.screen.width,height:window.screen.height,maxTouchPoints:window.navigator.maxTouchPoints};return(!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(g,b),{fingerprint:ve(Re(g)),...g}},Te=async e=>{const t=document.createElement("canvas");t.width=280,t.height=100;const r=t.getContext("2d"),n=r.createLinearGradient(0,0,280,100);return n.addColorStop(0,"#f60"),n.addColorStop(.4,"#09f"),n.addColorStop(.7,"#f09"),n.addColorStop(1,"#0f9"),r.fillStyle=n,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)),ve(t.toDataURL("image/png"))},xe=()=>{const e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl"),r=t.getExtension("WEBGL_debug_renderer_info");return ve(Re({vendor:r?t.getParameter(r.UNMASKED_VENDOR_WEBGL):t.getParameter(t.VENDOR),renderer:r?t.getParameter(r.UNMASKED_RENDERER_WEBGL):t.getParameter(t.RENDERER)}))},Ee=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 ve(Re(r))},Oe=async e=>{const t=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,6e3,44100),r=t.createOscillator();r.type="sawtooth",r.frequency.value=8800;const n=t.createDynamicsCompressor();n.threshold.value=-48,n.knee.value=30,n.ratio.value=14,n.attack.value=0,n.release.value=.3;const o=t.createGain();o.gain.value=.4,r.connect(n),n.connect(o),o.connect(t.destination),r.start(0);const s=(await t.startRendering()).getChannelData(0);let i=0,a=0;for(let c=3e3;c<5800;c+=2){const e=s[c];i=31*i+Math.floor(1e5*(e+1))|0,a=Math.imul(a^Math.floor(98765*e),2246822519)}const l=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(s.slice(4500,5e3)),n=e.width/r.length;for(let o=0;o<r.length;o++){const s=o*n,i=(r[o]+1)/2*e.height;0===o?t.moveTo(s,i):t.lineTo(s,i)}t.stroke(),document.body.appendChild(e)}return ve(l.toString(16))},Ae=()=>{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 n={};for(const s of e)r.style.fontFamily=s,n[s]=r.offsetWidth;const o=[];for(const s of t){let t=!1;for(const i of e)if(r.style.fontFamily=`"${s}", ${i}`,r.offsetWidth!==n[i]){o.push(s),t=!0;break}t||(r.style.fontFamily=`"${s}"`,r.offsetWidth!==n.monospace&&r.offsetWidth!==n.serif&&o.push(s))}return document.body.removeChild(r),o.length?o.sort().join(","):null};"undefined"!=typeof window&&(window.getBrowserFingerprint=Se);var Pe=t.R(void 0),Ce=({props:e={},children:r})=>{const{organizationId:n,uid:o,fname:s,lname:i,theme:a="light"}=e,[l,c]=t.d(()=>{if("undefined"==typeof window)return null;if(o||s||i)return null;const e=localStorage.getItem("qrati_token");return e?{token:e}:null}),{isLoading:u,data:h,error:f}=d({queryKey:["qrati-connect-session",n],queryFn:async()=>{const e=await(async()=>{const e=await Se();return"string"==typeof e?e:e?.fingerprint})();return(await ye.post(t.API_ROUTES.INITIALIZE_SESSION,{json:{uid:o,fname:s,lname:i,browserFingerprint:e},headers:{"x-org-id":n,Authorization:o||s||i||!localStorage.getItem("qrati_token")?void 0:`Bearer ${localStorage.getItem("qrati_token")}`}}).json()).data},enabled:!!n});t.y(()=>{const e=h?.authSession?.session?.token,t=h?.authSession?.user;t&&e&&(c({...t,token:e}),h?.organization?.customAuth||localStorage.setItem("qrati_token",e))},[h]);const p=t.T(()=>t.getFontCss(h?.organization?.integrationSettings,h?.organization?.customFontUrl),[h?.organization?.integrationSettings,h?.organization?.customFontUrl]),m=async e=>{try{const t=await((e,t,r)=>new Promise((n,o)=>{if(!e)return void o(new Error("Provider is required"));if(!t)return void o(new Error("Organization ID is required"));const s=new URL(`${r}/qc-social-auth`);s.searchParams.set("provider",e),s.searchParams.set("organizationId",t),s.searchParams.set("origin",window.location.origin);const i=(window.screen.width-500)/2,a=(window.screen.height-600)/2,l=window.open(s.toString(),"qrati_social_auth",`width=500,height=600,left=${i},top=${a},scrollbars=yes,resizable=yes,status=yes`);if(!l)return void o(new Error("Failed to open popup window. Please allow popups and try again."));const c=()=>{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:s,data:i,error:a,organizationId:u}=e.data||{};if(u===t)switch(s){case"QRATI_SOCIAL_AUTH_SUCCESS":c(),l.close(),n({user:i.user,session:i.session,token:i.token});break;case"QRATI_SOCIAL_AUTH_ERROR":console.error("Authentication error:",a),c(),l.close(),o(new Error(a||"Social authentication failed"));break;case"QRATI_SOCIAL_AUTH_CANCELLED":c(),l.close(),o(new Error("Authentication was cancelled"))}else console.warn("Organization ID mismatch:",u,"expected:",t)},h=setInterval(()=>{try{l.closed&&(c(),o(new Error("Authentication was cancelled")))}catch(e){}},1e3);window.addEventListener("message",u);const d=setTimeout(()=>{c(),l.closed||l.close(),o(new Error("Authentication timeout. Please try again."))},3e5)}))(e,n??"","https://qrati.com");return t?.user&&t?.token&&(c({...t.user,token:t.token}),localStorage.setItem("qrati_token",t.token)),t}catch(f){throw console.error("Social login error:",f),f}};return f?t.u(v,{fallback:null,children:t.u(be,{organizationId:n??"",errorType:401===f?.response?.status?"page-not-registered":"generic-error"})}):!h?.organization?.customAuth||o&&s&&i?t.u(Pe.Provider,{value:{props:e,initializing:u,sessionId:h?.sessionId,organization:h?.organization,folders:h?.folders,loadingUser:u,user:l,registerUsingEmail:async(e,r,o,s)=>{try{const i=await ye.post(t.API_ROUTES.REGISTER,{json:{email:e,password:r,fname:o,lname:s},headers:{"x-org-id":n}}).json();return i.error?{error:i.error}:(c({...i.user,token:i.token}),localStorage.setItem("qrati_token",i.token),i)}catch(f){return{error:f?.message}}},loginWithGoogle:async()=>{try{return await m("google")}catch(f){throw console.error("Google login error:",f),f}},loginWithApple:async()=>{try{return await m("apple")}catch(f){throw console.error("Apple login error:",f),f}},loginUsingEmail:async(e,r)=>{try{const o=await ye.post(t.API_ROUTES.LOGIN,{json:{email:e,password:r},headers:{"x-org-id":n}}).json();return o.error?{error:o.error}:(c({...o.user,token:o.token}),localStorage.setItem("qrati_token",o.token),o)}catch(f){return{error:f?.message}}},signout:async()=>{try{const e=await ye.post(t.API_ROUTES.LOGOUT,{headers:{"x-org-id":n,Authorization:`Bearer ${l?.token}`}}).json();return e.error?{error:e.error}:(localStorage.removeItem("qrati_token"),c(null),e)}catch(f){return console.error(f),{error:f?.message}}},error:f},children:t.u("div",{id:"qrati-connect-container",style:{...t.getStyleObject(h?.organization,a),fontFamily:"var(--font-family)"},className:t.cn("bg-background text-foreground relative min-h-[80vh]"),children:[p?t.u("style",{children:p}):null,r]})}):t.u(v,{fallback:null,children:t.u(be,{organizationId:n??"",errorType:"custom-auth-invalid"})})},Ie=()=>{const e=t.x(Pe);if(void 0===e)throw new Error("useSession must be used within SessionProvider");return e};Object.defineProperty(exports,"$",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"QueryObserver",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"SessionProvider",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,"getBrowserFingerprint",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(exports,"getProviderDisplayName",{enumerable:!0,get:function(){return we}}),Object.defineProperty(exports,"ky",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,"useBaseQuery",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"useQuery",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"useSession",{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return R}});
|