@yoast/ai-insights-client 1.4.34 → 1.4.36
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var ox=Object.defineProperty;var Lh=e=>{throw TypeError(e)};var ax=(e,t,n)=>t in e?ox(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var pe=(e,t,n)=>ax(e,typeof t!="symbol"?t+"":t,n),ic=(e,t,n)=>t.has(e)||Lh("Cannot "+n);var $=(e,t,n)=>(ic(e,t,"read from private field"),n?n.call(e):t.get(e)),de=(e,t,n)=>t.has(e)?Lh("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Z=(e,t,n,r)=>(ic(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Me=(e,t,n)=>(ic(e,t,"access private method"),n);var Za=(e,t,n,r)=>({set _(i){Z(e,t,i,n)},get _(){return $(e,t,r)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),P=require("@yoast/ui-library"),z=require("react"),lx=require("styled-components");function ux(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const I=ux(z);function yp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var uo={},Ih;function cx(){if(Ih)return uo;Ih=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.parse=o,uo.serialize=u;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,i=Object.prototype.toString,s=(()=>{const f=function(){};return f.prototype=Object.create(null),f})();function o(f,h){const g=new s,m=f.length;if(m<2)return g;const p=(h==null?void 0:h.decode)||c;let v=0;do{const b=f.indexOf("=",v);if(b===-1)break;const S=f.indexOf(";",v),C=S===-1?m:S;if(b>C){v=f.lastIndexOf(";",b-1)+1;continue}const x=a(f,v,b),k=l(f,b,x),w=f.slice(x,k);if(g[w]===void 0){let _=a(f,b+1,C),O=l(f,C,_);const E=p(f.slice(_,O));g[w]=E}v=C+1}while(v<m);return g}function a(f,h,g){do{const m=f.charCodeAt(h);if(m!==32&&m!==9)return h}while(++h<g);return g}function l(f,h,g){for(;h>g;){const m=f.charCodeAt(--h);if(m!==32&&m!==9)return h+1}return g}function u(f,h,g){const m=(g==null?void 0:g.encode)||encodeURIComponent;if(!e.test(f))throw new TypeError(`argument name is invalid: ${f}`);const p=m(h);if(!t.test(p))throw new TypeError(`argument val is invalid: ${h}`);let v=f+"="+p;if(!g)return v;if(g.maxAge!==void 0){if(!Number.isInteger(g.maxAge))throw new TypeError(`option maxAge is invalid: ${g.maxAge}`);v+="; Max-Age="+g.maxAge}if(g.domain){if(!n.test(g.domain))throw new TypeError(`option domain is invalid: ${g.domain}`);v+="; Domain="+g.domain}if(g.path){if(!r.test(g.path))throw new TypeError(`option path is invalid: ${g.path}`);v+="; Path="+g.path}if(g.expires){if(!d(g.expires)||!Number.isFinite(g.expires.valueOf()))throw new TypeError(`option expires is invalid: ${g.expires}`);v+="; Expires="+g.expires.toUTCString()}if(g.httpOnly&&(v+="; HttpOnly"),g.secure&&(v+="; Secure"),g.partitioned&&(v+="; Partitioned"),g.priority)switch(typeof g.priority=="string"?g.priority.toLowerCase():void 0){case"low":v+="; Priority=Low";break;case"medium":v+="; Priority=Medium";break;case"high":v+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${g.priority}`)}if(g.sameSite)switch(typeof g.sameSite=="string"?g.sameSite.toLowerCase():g.sameSite){case!0:case"strict":v+="; SameSite=Strict";break;case"lax":v+="; SameSite=Lax";break;case"none":v+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${g.sameSite}`)}return v}function c(f){if(f.indexOf("%")===-1)return f;try{return decodeURIComponent(f)}catch(h){return f}}function d(f){return i.call(f)==="[object Date]"}return uo}cx();/**
|
|
2
2
|
* react-router v7.6.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
@@ -7,75 +7,75 @@
|
|
|
7
7
|
* LICENSE.md file in the root directory of this source tree.
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
|
-
*/function sx(e={}){let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((h,g)=>u(h,typeof h=="string"?null:h.state,g===0?"default":void 0));let s=l(n==null?i.length-1:n),o="POP",a=null;function l(h){return Math.min(Math.max(h,0),i.length-1)}function c(){return i[s]}function u(h,g=null,m){let p=ax(i?c().pathname:"/",h,g,m);return wn(p.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(h)}`),p}function d(h){return typeof h=="string"?h:Nl(h)}return{get index(){return s},get action(){return o},get location(){return c()},createHref:d,createURL(h){return new URL(d(h),"http://localhost")},encodeLocation(h){let g=typeof h=="string"?Bi(h):h;return{pathname:g.pathname||"",search:g.search||"",hash:g.hash||""}},push(h,g){o="PUSH";let m=u(h,g);s+=1,i.splice(s,i.length,m),r&&a&&a({action:o,location:m,delta:1})},replace(h,g){o="REPLACE";let m=u(h,g);i[s]=m,r&&a&&a({action:o,location:m,delta:0})},go(h){o="POP";let g=l(s+h),m=i[g];s=g,a&&a({action:o,location:m,delta:h})},listen(h){return a=h,()=>{a=null}}}}function it(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}function wn(e,t){if(!e){typeof console!="undefined"&&console.warn(t);try{throw new Error(t)}catch(n){}}}function ox(){return Math.random().toString(36).substring(2,10)}function ax(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Bi(t):t,state:n,key:t&&t.key||r||ox()}}function Nl({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Bi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function cp(e,t,n="/"){return lx(e,t,n,!1)}function lx(e,t,n,r){let i=typeof t=="string"?Bi(t):t,s=pr(i.pathname||"/",n);if(s==null)return null;let o=up(e);cx(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=fp(s);a=vx(o[l],c,r)}return a}function up(e,t=[],n=[],r=""){let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(it(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length));let c=hr([r,l.relativePath]),u=n.concat(l);s.children&&s.children.length>0&&(it(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),up(s.children,t,u,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:mx(c,s.index),routesMeta:u})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of dp(s.path))i(s,o,l)}),t}function dp(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=dp(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function cx(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:px(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var ux=/^:[\w-]+$/,dx=3,fx=2,hx=1,gx=10,yx=-2,jh=e=>e==="*";function mx(e,t){let n=e.split("/"),r=n.length;return n.some(jh)&&(r+=yx),t&&(r+=fx),n.filter(i=>!jh(i)).reduce((i,s)=>i+(ux.test(s)?dx:s===""?hx:gx),r)}function px(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function vx(e,t,n=!1){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=s==="/"?t:t.slice(s.length)||"/",d=Ns({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),f=l.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Ns({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:hr([s,d.pathname]),pathnameBase:Cx(hr([s,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(s=hr([s,d.pathnameBase]))}return o}function Ns(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=bx(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((c,{paramName:u,isOptional:d},f)=>{if(u==="*"){let g=a[f]||"";o=s.slice(0,s.length-g.length).replace(/(.)\/+$/,"$1")}const h=a[f];return d&&!h?c[u]=void 0:c[u]=(h||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:e}}function bx(e,t=!1,n=!0){wn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function fp(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return wn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function pr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function xx(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Bi(e):e;return{pathname:n?n.startsWith("/")?n:wx(n,t):t,search:_x(r),hash:kx(i)}}function wx(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function nu(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Sx(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function df(e){let t=Sx(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function ff(e,t,n,r=!1){let i;typeof e=="string"?i=Bi(e):(i={...e},it(!i.pathname||!i.pathname.includes("?"),nu("?","pathname","search",i)),it(!i.pathname||!i.pathname.includes("#"),nu("#","pathname","hash",i)),it(!i.search||!i.search.includes("#"),nu("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=xx(i,a),c=o&&o!=="/"&&o.endsWith("/"),u=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}var hr=e=>e.join("/").replace(/\/\/+/g,"/"),Cx=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_x=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,kx=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Ox(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var hp=["POST","PUT","PATCH","DELETE"];new Set(hp);var Ex=["GET",...hp];new Set(Ex);var Vs=L.createContext(null);Vs.displayName="DataRouter";var mc=L.createContext(null);mc.displayName="DataRouterState";var gp=L.createContext({isTransitioning:!1});gp.displayName="ViewTransition";var Ax=L.createContext(new Map);Ax.displayName="Fetchers";var Px=L.createContext(null);Px.displayName="Await";var Dn=L.createContext(null);Dn.displayName="Navigation";var Da=L.createContext(null);Da.displayName="Location";var Sn=L.createContext({outlet:null,matches:[],isDataRoute:!1});Sn.displayName="Route";var hf=L.createContext(null);hf.displayName="RouteError";function Tx(e,{relative:t}={}){it(qi(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=L.useContext(Dn),{hash:i,pathname:s,search:o}=La(e,{relative:t}),a=s;return n!=="/"&&(a=s==="/"?n:hr([n,s])),r.createHref({pathname:a,search:o,hash:i})}function qi(){return L.useContext(Da)!=null}function Ht(){return it(qi(),"useLocation() may be used only in the context of a <Router> component."),L.useContext(Da).location}function Za(e){it(qi(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=Ht();return L.useMemo(()=>Ns(e,fp(t)),[t,e])}var yp="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function mp(e){L.useContext(Dn).static||L.useLayoutEffect(e)}function cn(){let{isDataRoute:e}=L.useContext(Sn);return e?Gx():Mx()}function Mx(){it(qi(),"useNavigate() may be used only in the context of a <Router> component.");let e=L.useContext(Vs),{basename:t,navigator:n}=L.useContext(Dn),{matches:r}=L.useContext(Sn),{pathname:i}=Ht(),s=JSON.stringify(df(r)),o=L.useRef(!1);return mp(()=>{o.current=!0}),L.useCallback((l,c={})=>{if(wn(o.current,yp),!o.current)return;if(typeof l=="number"){n.go(l);return}let u=ff(l,JSON.parse(s),i,c.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:hr([t,u.pathname])),(c.replace?n.replace:n.push)(u,c.state,c)},[t,n,s,i,e])}var jx=L.createContext(null);function $x(e){let t=L.useContext(Sn).outlet;return t&&L.createElement(jx.Provider,{value:e},t)}function pc(){let{matches:e}=L.useContext(Sn),t=e[e.length-1];return t?t.params:{}}function La(e,{relative:t}={}){let{matches:n}=L.useContext(Sn),{pathname:r}=Ht(),i=JSON.stringify(df(n));return L.useMemo(()=>ff(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function Dx(e,t){return pp(e,t)}function pp(e,t,n,r){var v;it(qi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=L.useContext(Dn),{matches:s}=L.useContext(Sn),o=s[s.length-1],a=o?o.params:{},l=o?o.pathname:"/",c=o?o.pathnameBase:"/",u=o&&o.route;{let b=u&&u.path||"";vp(l,!u||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
10
|
+
*/function dx(e={}){let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((h,g)=>c(h,typeof h=="string"?null:h.state,g===0?"default":void 0));let s=l(n==null?i.length-1:n),o="POP",a=null;function l(h){return Math.min(Math.max(h,0),i.length-1)}function u(){return i[s]}function c(h,g=null,m){let p=hx(i?u().pathname:"/",h,g,m);return Cn(p.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(h)}`),p}function d(h){return typeof h=="string"?h:Fl(h)}return{get index(){return s},get action(){return o},get location(){return u()},createHref:d,createURL(h){return new URL(d(h),"http://localhost")},encodeLocation(h){let g=typeof h=="string"?zi(h):h;return{pathname:g.pathname||"",search:g.search||"",hash:g.hash||""}},push(h,g){o="PUSH";let m=c(h,g);s+=1,i.splice(s,i.length,m),r&&a&&a({action:o,location:m,delta:1})},replace(h,g){o="REPLACE";let m=c(h,g);i[s]=m,r&&a&&a({action:o,location:m,delta:0})},go(h){o="POP";let g=l(s+h),m=i[g];s=g,a&&a({action:o,location:m,delta:h})},listen(h){return a=h,()=>{a=null}}}}function rt(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}function Cn(e,t){if(!e){typeof console!="undefined"&&console.warn(t);try{throw new Error(t)}catch(n){}}}function fx(){return Math.random().toString(36).substring(2,10)}function hx(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?zi(t):t,state:n,key:t&&t.key||r||fx()}}function Fl({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function zi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function mp(e,t,n="/"){return gx(e,t,n,!1)}function gx(e,t,n,r){let i=typeof t=="string"?zi(t):t,s=vr(i.pathname||"/",n);if(s==null)return null;let o=pp(e);yx(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=bp(s);a=_x(o[l],u,r)}return a}function pp(e,t=[],n=[],r=""){let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(rt(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length));let u=gr([r,l.relativePath]),c=n.concat(l);s.children&&s.children.length>0&&(rt(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),pp(s.children,t,c,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:Sx(u,s.index),routesMeta:c})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of vp(s.path))i(s,o,l)}),t}function vp(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=vp(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function yx(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Cx(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var mx=/^:[\w-]+$/,px=3,vx=2,bx=1,xx=10,wx=-2,Rh=e=>e==="*";function Sx(e,t){let n=e.split("/"),r=n.length;return n.some(Rh)&&(r+=wx),t&&(r+=vx),n.filter(i=>!Rh(i)).reduce((i,s)=>i+(mx.test(s)?px:s===""?bx:xx),r)}function Cx(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function _x(e,t,n=!1){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,c=s==="/"?t:t.slice(s.length)||"/",d=Fs({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),f=l.route;if(!d&&u&&n&&!r[r.length-1].route.index&&(d=Fs({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:gr([s,d.pathname]),pathnameBase:Px(gr([s,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(s=gr([s,d.pathnameBase]))}return o}function Fs(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=kx(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((u,{paramName:c,isOptional:d},f)=>{if(c==="*"){let g=a[f]||"";o=s.slice(0,s.length-g.length).replace(/(.)\/+$/,"$1")}const h=a[f];return d&&!h?u[c]=void 0:u[c]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function kx(e,t=!1,n=!0){Cn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function bp(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Cn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function vr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Ox(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?zi(e):e;return{pathname:n?n.startsWith("/")?n:Ex(n,t):t,search:Tx(r),hash:Mx(i)}}function Ex(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function sc(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ax(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function yf(e){let t=Ax(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function mf(e,t,n,r=!1){let i;typeof e=="string"?i=zi(e):(i={...e},rt(!i.pathname||!i.pathname.includes("?"),sc("?","pathname","search",i)),rt(!i.pathname||!i.pathname.includes("#"),sc("#","pathname","hash",i)),rt(!i.search||!i.search.includes("#"),sc("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=Ox(i,a),u=o&&o!=="/"&&o.endsWith("/"),c=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var gr=e=>e.join("/").replace(/\/\/+/g,"/"),Px=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Tx=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Mx=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function jx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var xp=["POST","PUT","PATCH","DELETE"];new Set(xp);var $x=["GET",...xp];new Set($x);var Ws=I.createContext(null);Ws.displayName="DataRouter";var bu=I.createContext(null);bu.displayName="DataRouterState";var wp=I.createContext({isTransitioning:!1});wp.displayName="ViewTransition";var Dx=I.createContext(new Map);Dx.displayName="Fetchers";var Lx=I.createContext(null);Lx.displayName="Await";var Ln=I.createContext(null);Ln.displayName="Navigation";var La=I.createContext(null);La.displayName="Location";var _n=I.createContext({outlet:null,matches:[],isDataRoute:!1});_n.displayName="Route";var pf=I.createContext(null);pf.displayName="RouteError";function Ix(e,{relative:t}={}){rt(Hi(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=I.useContext(Ln),{hash:i,pathname:s,search:o}=Ia(e,{relative:t}),a=s;return n!=="/"&&(a=s==="/"?n:gr([n,s])),r.createHref({pathname:a,search:o,hash:i})}function Hi(){return I.useContext(La)!=null}function Ut(){return rt(Hi(),"useLocation() may be used only in the context of a <Router> component."),I.useContext(La).location}function Ja(e){rt(Hi(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=Ut();return I.useMemo(()=>Fs(e,bp(t)),[t,e])}var Sp="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Cp(e){I.useContext(Ln).static||I.useLayoutEffect(e)}function dn(){let{isDataRoute:e}=I.useContext(_n);return e?Xx():Rx()}function Rx(){rt(Hi(),"useNavigate() may be used only in the context of a <Router> component.");let e=I.useContext(Ws),{basename:t,navigator:n}=I.useContext(Ln),{matches:r}=I.useContext(_n),{pathname:i}=Ut(),s=JSON.stringify(yf(r)),o=I.useRef(!1);return Cp(()=>{o.current=!0}),I.useCallback((l,u={})=>{if(Cn(o.current,Sp),!o.current)return;if(typeof l=="number"){n.go(l);return}let c=mf(l,JSON.parse(s),i,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:gr([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,s,i,e])}var Nx=I.createContext(null);function Fx(e){let t=I.useContext(_n).outlet;return t&&I.createElement(Nx.Provider,{value:e},t)}function xu(){let{matches:e}=I.useContext(_n),t=e[e.length-1];return t?t.params:{}}function Ia(e,{relative:t}={}){let{matches:n}=I.useContext(_n),{pathname:r}=Ut(),i=JSON.stringify(yf(n));return I.useMemo(()=>mf(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function Bx(e,t){return _p(e,t)}function _p(e,t,n,r){var v;rt(Hi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=I.useContext(Ln),{matches:s}=I.useContext(_n),o=s[s.length-1],a=o?o.params:{},l=o?o.pathname:"/",u=o?o.pathnameBase:"/",c=o&&o.route;{let b=c&&c.path||"";kp(l,!c||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
11
11
|
|
|
12
|
-
Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let d=Ht(),f;if(t){let b=typeof t=="string"?Bi(t):t;it(c==="/"||((v=b.pathname)==null?void 0:v.startsWith(c)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${b.pathname}" was given in the \`location\` prop.`),f=b}else f=d;let h=f.pathname||"/",g=h;if(c!=="/"){let b=c.replace(/^\//,"").split("/");g="/"+h.replace(/^\//,"").split("/").slice(b.length).join("/")}let m=cp(e,{pathname:g});wn(u||m!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),wn(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let p=Fx(m&&m.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:hr([c,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?c:hr([c,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&p?L.createElement(Da.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...f},navigationType:"POP"}},p):p}function Lx(){let e=Ux(),t=Ox(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=L.createElement(L.Fragment,null,L.createElement("p",null,"💿 Hey developer 👋"),L.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",L.createElement("code",{style:s},"ErrorBoundary")," or"," ",L.createElement("code",{style:s},"errorElement")," prop on your route.")),L.createElement(L.Fragment,null,L.createElement("h2",null,"Unexpected Application Error!"),L.createElement("h3",{style:{fontStyle:"italic"}},t),n?L.createElement("pre",{style:i},n):null,o)}var Ix=L.createElement(Lx,null),Rx=class extends L.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?L.createElement(Sn.Provider,{value:this.props.routeContext},L.createElement(hf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Nx({routeContext:e,match:t,children:n}){let r=L.useContext(Vs);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),L.createElement(Sn.Provider,{value:e},n)}function Fx(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,s=n==null?void 0:n.errors;if(s!=null){let l=i.findIndex(c=>c.route.id&&(s==null?void 0:s[c.route.id])!==void 0);it(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,l+1))}let o=!1,a=-1;if(n)for(let l=0;l<i.length;l++){let c=i[l];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(a=l),c.route.id){let{loaderData:u,errors:d}=n,f=c.route.loader&&!u.hasOwnProperty(c.route.id)&&(!d||d[c.route.id]===void 0);if(c.route.lazy||f){o=!0,a>=0?i=i.slice(0,a+1):i=[i[0]];break}}}return i.reduceRight((l,c,u)=>{let d,f=!1,h=null,g=null;n&&(d=s&&c.route.id?s[c.route.id]:void 0,h=c.route.errorElement||Ix,o&&(a<0&&u===0?(vp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,g=null):a===u&&(f=!0,g=c.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,u+1)),p=()=>{let v;return d?v=h:f?v=g:c.route.Component?v=L.createElement(c.route.Component,null):c.route.element?v=c.route.element:v=l,L.createElement(Nx,{match:c,routeContext:{outlet:l,matches:m,isDataRoute:n!=null},children:v})};return n&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?L.createElement(Rx,{location:n.location,revalidation:n.revalidation,component:h,error:d,children:p(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):p()},null)}function gf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Bx(e){let t=L.useContext(Vs);return it(t,gf(e)),t}function qx(e){let t=L.useContext(mc);return it(t,gf(e)),t}function zx(e){let t=L.useContext(Sn);return it(t,gf(e)),t}function yf(e){let t=zx(e),n=t.matches[t.matches.length-1];return it(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Hx(){return yf("useRouteId")}function Ux(){var r;let e=L.useContext(hf),t=qx("useRouteError"),n=yf("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function Gx(){let{router:e}=Bx("useNavigate"),t=yf("useNavigate"),n=L.useRef(!1);return mp(()=>{n.current=!0}),L.useCallback(async(i,s={})=>{wn(n.current,yp),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...s}))},[e,t])}var $h={};function vp(e,t,n){!t&&!$h[e]&&($h[e]=!0,wn(!1,n))}L.memo(Kx);function Kx({routes:e,future:t,state:n}){return pp(e,void 0,n,t)}function Vx({basename:e,children:t,initialEntries:n,initialIndex:r}){let i=L.useRef();i.current==null&&(i.current=sx({initialEntries:n,initialIndex:r,v5Compat:!0}));let s=i.current,[o,a]=L.useState({action:s.action,location:s.location}),l=L.useCallback(c=>{L.startTransition(()=>a(c))},[a]);return L.useLayoutEffect(()=>s.listen(l),[s,l]),L.createElement(Wx,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:s})}function hi({to:e,replace:t,state:n,relative:r}){it(qi(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=L.useContext(Dn);wn(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=L.useContext(Sn),{pathname:o}=Ht(),a=cn(),l=ff(e,df(s),o,r==="path"),c=JSON.stringify(l);return L.useEffect(()=>{a(JSON.parse(c),{replace:t,state:n,relative:r})},[a,c,r,t,n]),null}function Fs(e){return $x(e.context)}function Ct(e){it(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Wx({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:s=!1}){it(!qi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),a=L.useMemo(()=>({basename:o,navigator:i,static:s,future:{}}),[o,i,s]);typeof n=="string"&&(n=Bi(n));let{pathname:l="/",search:c="",hash:u="",state:d=null,key:f="default"}=n,h=L.useMemo(()=>{let g=pr(l,o);return g==null?null:{location:{pathname:g,search:c,hash:u,state:d,key:f},navigationType:r}},[o,l,c,u,d,f,r]);return wn(h!=null,`<Router basename="${o}"> is not able to match the URL "${l}${c}${u}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:L.createElement(Dn.Provider,{value:a},L.createElement(Da.Provider,{children:t,value:h}))}function Qx({children:e,location:t}){return Dx(Ku(e),t)}function Ku(e,t=[]){let n=[];return L.Children.forEach(e,(r,i)=>{if(!L.isValidElement(r))return;let s=[...t,i];if(r.type===L.Fragment){n.push.apply(n,Ku(r.props.children,s));return}it(r.type===Ct,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),it(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Ku(r.props.children,s)),n.push(o)}),n}var Ol="get",El="application/x-www-form-urlencoded";function vc(e){return e!=null&&typeof e.tagName=="string"}function Yx(e){return vc(e)&&e.tagName.toLowerCase()==="button"}function Xx(e){return vc(e)&&e.tagName.toLowerCase()==="form"}function Zx(e){return vc(e)&&e.tagName.toLowerCase()==="input"}function Jx(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ew(e,t){return e.button===0&&(!t||t==="_self")&&!Jx(e)}var Ja=null;function tw(){if(Ja===null)try{new FormData(document.createElement("form"),0),Ja=!1}catch(e){Ja=!0}return Ja}var nw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ru(e){return e!=null&&!nw.has(e)?(wn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${El}"`),null):e}function rw(e,t){let n,r,i,s,o;if(Xx(e)){let a=e.getAttribute("action");r=a?pr(a,t):null,n=e.getAttribute("method")||Ol,i=ru(e.getAttribute("enctype"))||El,s=new FormData(e)}else if(Yx(e)||Zx(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(r=l?pr(l,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||Ol,i=ru(e.getAttribute("formenctype"))||ru(a.getAttribute("enctype"))||El,s=new FormData(a,e),!tw()){let{name:c,type:u,value:d}=e;if(u==="image"){let f=c?`${c}.`:"";s.append(`${f}x`,"0"),s.append(`${f}y`,"0")}else c&&s.append(c,d)}}else{if(vc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ol,r=null,i=El,o=e}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}function mf(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}async function iw(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function sw(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function ow(e,t,n){let r=await Promise.all(e.map(async i=>{let s=t.routes[i.route.id];if(s){let o=await iw(s,n);return o.links?o.links():[]}return[]}));return uw(r.flat(1).filter(sw).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Dh(e,t,n,r,i,s){let o=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,a=(l,c)=>{var u;return n[c].pathname!==l.pathname||((u=n[c].route.path)==null?void 0:u.endsWith("*"))&&n[c].params["*"]!==l.params["*"]};return s==="assets"?t.filter((l,c)=>o(l,c)||a(l,c)):s==="data"?t.filter((l,c)=>{var d;let u=r.routes[l.route.id];if(!u||!u.hasLoader)return!1;if(o(l,c)||a(l,c))return!0;if(l.route.shouldRevalidate){let f=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function aw(e,t,{includeHydrateFallback:n}={}){return lw(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function lw(e){return[...new Set(e)]}function cw(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function uw(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let s=JSON.stringify(cw(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var dw=new Set([100,101,204,205]);function fw(e,t){let n=typeof e=="string"?new URL(e,typeof window=="undefined"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname="_root.data":t&&pr(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function bp(){let e=L.useContext(Vs);return mf(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function hw(){let e=L.useContext(mc);return mf(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var pf=L.createContext(void 0);pf.displayName="FrameworkContext";function xp(){let e=L.useContext(pf);return mf(e,"You must render this element inside a <HydratedRouter> element"),e}function gw(e,t){let n=L.useContext(pf),[r,i]=L.useState(!1),[s,o]=L.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:c,onMouseLeave:u,onTouchStart:d}=t,f=L.useRef(null);L.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let m=v=>{v.forEach(b=>{o(b.isIntersecting)})},p=new IntersectionObserver(m,{threshold:.5});return f.current&&p.observe(f.current),()=>{p.disconnect()}}},[e]),L.useEffect(()=>{if(r){let m=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(m)}}},[r]);let h=()=>{i(!0)},g=()=>{i(!1),o(!1)};return n?e!=="intent"?[s,f,{}]:[s,f,{onFocus:co(a,h),onBlur:co(l,g),onMouseEnter:co(c,h),onMouseLeave:co(u,g),onTouchStart:co(d,h)}]:[!1,f,{}]}function co(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function yw({page:e,...t}){let{router:n}=bp(),r=L.useMemo(()=>cp(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?L.createElement(pw,{page:e,matches:r,...t}):null}function mw(e){let{manifest:t,routeModules:n}=xp(),[r,i]=L.useState([]);return L.useEffect(()=>{let s=!1;return ow(e,t,n).then(o=>{s||i(o)}),()=>{s=!0}},[e,t,n]),r}function pw({page:e,matches:t,...n}){let r=Ht(),{manifest:i,routeModules:s}=xp(),{basename:o}=bp(),{loaderData:a,matches:l}=hw(),c=L.useMemo(()=>Dh(e,t,l,i,r,"data"),[e,t,l,i,r]),u=L.useMemo(()=>Dh(e,t,l,i,r,"assets"),[e,t,l,i,r]),d=L.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let g=new Set,m=!1;if(t.forEach(v=>{var S;let b=i.routes[v.route.id];!b||!b.hasLoader||(!c.some(C=>C.route.id===v.route.id)&&v.route.id in a&&((S=s[v.route.id])!=null&&S.shouldRevalidate)||b.hasClientLoader?m=!0:g.add(v.route.id))}),g.size===0)return[];let p=fw(e,o);return m&&g.size>0&&p.searchParams.set("_routes",t.filter(v=>g.has(v.route.id)).map(v=>v.route.id).join(",")),[p.pathname+p.search]},[o,a,r,i,c,t,e,s]),f=L.useMemo(()=>aw(u,i),[u,i]),h=mw(u);return L.createElement(L.Fragment,null,d.map(g=>L.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...n})),f.map(g=>L.createElement("link",{key:g,rel:"modulepreload",href:g,...n})),h.map(({key:g,link:m})=>L.createElement("link",{key:g,...m})))}function vw(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var wp=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";try{wp&&(window.__reactRouterVersion="7.6.3")}catch(e){}var Sp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ei=L.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:d,...f},h){let{basename:g}=L.useContext(Dn),m=typeof c=="string"&&Sp.test(c),p,v=!1;if(typeof c=="string"&&m&&(p=c,wp))try{let O=new URL(window.location.href),E=c.startsWith("//")?new URL(O.protocol+c):new URL(c),j=pr(E.pathname,g);E.origin===O.origin&&j!=null?c=j+E.search+E.hash:v=!0}catch(O){wn(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let b=Tx(c,{relative:i}),[S,C,x]=gw(r,f),k=Sw(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:i,viewTransition:d});function w(O){t&&t(O),O.defaultPrevented||k(O)}let _=L.createElement("a",{...f,...x,href:p||b,onClick:v||s?t:w,ref:vw(h,C),target:l,"data-discover":!m&&n==="render"?"true":void 0});return S&&!m?L.createElement(L.Fragment,null,_,L.createElement(yw,{page:b})):_});ei.displayName="Link";var bw=L.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:o,viewTransition:a,children:l,...c},u){let d=La(o,{relative:c.relative}),f=Ht(),h=L.useContext(mc),{navigator:g,basename:m}=L.useContext(Dn),p=h!=null&&Ew(d)&&a===!0,v=g.encodeLocation?g.encodeLocation(d).pathname:d.pathname,b=f.pathname,S=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(b=b.toLowerCase(),S=S?S.toLowerCase():null,v=v.toLowerCase()),S&&m&&(S=pr(S,m)||S);const C=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let x=b===v||!i&&b.startsWith(v)&&b.charAt(C)==="/",k=S!=null&&(S===v||!i&&S.startsWith(v)&&S.charAt(v.length)==="/"),w={isActive:x,isPending:k,isTransitioning:p},_=x?t:void 0,O;typeof r=="function"?O=r(w):O=[r,x?"active":null,k?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let E=typeof s=="function"?s(w):s;return L.createElement(ei,{...c,"aria-current":_,className:O,ref:u,style:E,to:o,viewTransition:a},typeof l=="function"?l(w):l)});bw.displayName="NavLink";var xw=L.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:s,method:o=Ol,action:a,onSubmit:l,relative:c,preventScrollReset:u,viewTransition:d,...f},h)=>{let g=kw(),m=Ow(a,{relative:c}),p=o.toLowerCase()==="get"?"get":"post",v=typeof a=="string"&&Sp.test(a),b=S=>{if(l&&l(S),S.defaultPrevented)return;S.preventDefault();let C=S.nativeEvent.submitter,x=(C==null?void 0:C.getAttribute("formmethod"))||o;g(C||S.currentTarget,{fetcherKey:t,method:x,navigate:n,replace:i,state:s,relative:c,preventScrollReset:u,viewTransition:d})};return L.createElement("form",{ref:h,method:p,action:m,onSubmit:r?l:b,...f,"data-discover":!v&&e==="render"?"true":void 0})});xw.displayName="Form";function ww(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Cp(e){let t=L.useContext(Vs);return it(t,ww(e)),t}function Sw(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:o}={}){let a=cn(),l=Ht(),c=La(e,{relative:s});return L.useCallback(u=>{if(ew(u,t)){u.preventDefault();let d=n!==void 0?n:Nl(l)===Nl(c);a(e,{replace:d,state:r,preventScrollReset:i,relative:s,viewTransition:o})}},[l,a,c,n,r,t,e,i,s,o])}var Cw=0,_w=()=>`__${String(++Cw)}__`;function kw(){let{router:e}=Cp("useSubmit"),{basename:t}=L.useContext(Dn),n=Hx();return L.useCallback(async(r,i={})=>{let{action:s,method:o,encType:a,formData:l,body:c}=rw(r,t);if(i.navigate===!1){let u=i.fetcherKey||_w();await e.fetch(u,n,i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||o,formEncType:i.encType||a,flushSync:i.flushSync})}else await e.navigate(i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||o,formEncType:i.encType||a,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}function Ow(e,{relative:t}={}){let{basename:n}=L.useContext(Dn),r=L.useContext(Sn);it(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...La(e||".",{relative:t})},o=Ht();if(e==null){s.search=o.search;let a=new URLSearchParams(s.search),l=a.getAll("index");if(l.some(u=>u==="")){a.delete("index"),l.filter(d=>d).forEach(d=>a.append("index",d));let u=a.toString();s.search=u?`?${u}`:""}}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:hr([n,s.pathname])),Nl(s)}function Ew(e,t={}){let n=L.useContext(gp);it(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Cp("useViewTransitionState"),i=La(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=pr(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=pr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ns(i.pathname,o)!=null||Ns(i.pathname,s)!=null}[...dw];var Ws=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Mi=typeof window=="undefined"||"Deno"in globalThis;function $t(){}function Aw(e,t){return typeof e=="function"?e(t):e}function Vu(e){return typeof e=="number"&&e>=0&&e!==1/0}function _p(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Gr(e,t){return typeof e=="function"?e(t):e}function mn(e,t){return typeof e=="function"?e(t):e}function Lh(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==vf(o,t.options))return!1}else if(!Ko(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function Ih(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(ji(t.options.mutationKey)!==ji(s))return!1}else if(!Ko(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function vf(e,t){return((t==null?void 0:t.queryKeyHashFn)||ji)(e)}function ji(e){return JSON.stringify(e,(t,n)=>Qu(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ko(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ko(e[n],t[n])):!1}function Wu(e,t){if(e===t)return e;const n=Rh(e)&&Rh(t);if(n||Qu(e)&&Qu(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{},l=new Set(r);let c=0;for(let u=0;u<o;u++){const d=n?u:s[u];(!n&&l.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,c++):(a[d]=Wu(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&c++)}return i===o&&c===i?e:a}return t}function Fl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Rh(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Qu(e){if(!Nh(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Nh(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Nh(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pw(e){return new Promise(t=>{setTimeout(t,e)})}function Yu(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Wu(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return Wu(e,t)}return t}function Tw(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Mw(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Bl=Symbol();function kp(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Bl&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Bl?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Op(e,t){return typeof e=="function"?e(...t):!!e}var pi,Mr,ds,Ym,jw=(Ym=class extends Ws{constructor(){super();ae(this,pi);ae(this,Mr);ae(this,ds);Z(this,ds,t=>{if(!Mi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){M(this,Mr)||this.setEventListener(M(this,ds))}onUnsubscribe(){var t;this.hasListeners()||((t=M(this,Mr))==null||t.call(this),Z(this,Mr,void 0))}setEventListener(t){var n;Z(this,ds,t),(n=M(this,Mr))==null||n.call(this),Z(this,Mr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){M(this,pi)!==t&&(Z(this,pi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof M(this,pi)=="boolean"?M(this,pi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},pi=new WeakMap,Mr=new WeakMap,ds=new WeakMap,Ym),bf=new jw,fs,jr,hs,Xm,$w=(Xm=class extends Ws{constructor(){super();ae(this,fs,!0);ae(this,jr);ae(this,hs);Z(this,hs,t=>{if(!Mi&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){M(this,jr)||this.setEventListener(M(this,hs))}onUnsubscribe(){var t;this.hasListeners()||((t=M(this,jr))==null||t.call(this),Z(this,jr,void 0))}setEventListener(t){var n;Z(this,hs,t),(n=M(this,jr))==null||n.call(this),Z(this,jr,t(this.setOnline.bind(this)))}setOnline(t){M(this,fs)!==t&&(Z(this,fs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return M(this,fs)}},fs=new WeakMap,jr=new WeakMap,hs=new WeakMap,Xm),Bs=new $w;function Xu(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function Dw(e){return Math.min(1e3*2**e,3e4)}function Ep(e){return(e!=null?e:"online")==="online"?Bs.isOnline():!0}var Ap=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function iu(e){return e instanceof Ap}function Pp(e){let t=!1,n=0,r=!1,i;const s=Xu(),o=m=>{var p;r||(f(new Ap(m)),(p=e.abort)==null||p.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>bf.isFocused()&&(e.networkMode==="always"||Bs.isOnline())&&e.canRun(),u=()=>Ep(e.networkMode)&&e.canRun(),d=m=>{var p;r||(r=!0,(p=e.onSuccess)==null||p.call(e,m),i==null||i(),s.resolve(m))},f=m=>{var p;r||(r=!0,(p=e.onError)==null||p.call(e,m),i==null||i(),s.reject(m))},h=()=>new Promise(m=>{var p;i=v=>{(r||c())&&m(v)},(p=e.onPause)==null||p.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(r)return;let m;const p=n===0?e.initialPromise:void 0;try{m=p!=null?p:e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(d).catch(v=>{var k,w,_;if(r)return;const b=(k=e.retry)!=null?k:Mi?0:3,S=(w=e.retryDelay)!=null?w:Dw,C=typeof S=="function"?S(n,v):S,x=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,v);if(t||!x){f(v);return}n++,(_=e.onFail)==null||_.call(e,n,v),Pw(C).then(()=>c()?void 0:h()).then(()=>{t?f(v):g()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?g():h().then(g),s)}}var Lw=e=>setTimeout(e,0);function Iw(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=Lw;const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var gt=Iw(),vi,Zm,Tp=(Zm=class{constructor(){ae(this,vi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Vu(this.gcTime)&&Z(this,vi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e!=null?e:Mi?1/0:5*60*1e3)}clearGcTimeout(){M(this,vi)&&(clearTimeout(M(this,vi)),Z(this,vi,void 0))}},vi=new WeakMap,Zm),gs,bi,yn,xi,_t,xa,wi,An,ir,Jm,Rw=(Jm=class extends Tp{constructor(t){var n;super();ae(this,An);ae(this,gs);ae(this,bi);ae(this,yn);ae(this,xi);ae(this,_t);ae(this,xa);ae(this,wi);Z(this,wi,!1),Z(this,xa,t.defaultOptions),this.setOptions(t.options),this.observers=[],Z(this,xi,t.client),Z(this,yn,M(this,xi).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Z(this,gs,Nw(this.options)),this.state=(n=t.state)!=null?n:M(this,gs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=M(this,_t))==null?void 0:t.promise}setOptions(t){this.options={...M(this,xa),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&M(this,yn).remove(this)}setData(t,n){const r=Yu(this.state.data,t,this.options);return Te(this,An,ir).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Te(this,An,ir).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=M(this,_t))==null?void 0:r.promise;return(i=M(this,_t))==null||i.cancel(t),n?n.then($t).catch($t):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(M(this,gs))}isActive(){return this.observers.some(t=>mn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Bl||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Gr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!_p(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=M(this,_t))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=M(this,_t))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),M(this,yn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(M(this,_t)&&(M(this,wi)?M(this,_t).cancel({revert:!0}):M(this,_t).cancelRetry()),this.scheduleGc()),M(this,yn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Te(this,An,ir).call(this,{type:"invalidate"})}fetch(t,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(M(this,_t))return M(this,_t).continueRetry(),M(this,_t).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(Z(this,wi,!0),r.signal)})},s=()=>{const f=kp(this.options,n),g=(()=>{const m={client:M(this,xi),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return Z(this,wi,!1),this.options.persister?this.options.persister(f,g,this):f(g)},a=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:M(this,xi),state:this.state,fetchFn:s};return i(f),f})();(c=this.options.behavior)==null||c.onFetch(a,this),Z(this,bi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&Te(this,An,ir).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,g,m,p;iu(f)&&f.silent||Te(this,An,ir).call(this,{type:"error",error:f}),iu(f)||((g=(h=M(this,yn).config).onError)==null||g.call(h,f,this),(p=(m=M(this,yn).config).onSettled)==null||p.call(m,this.state.data,f,this)),this.scheduleGc()};return Z(this,_t,Pp({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var h,g,m,p;if(f===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(v){l(v);return}(g=(h=M(this,yn).config).onSuccess)==null||g.call(h,f,this),(p=(m=M(this,yn).config).onSettled)==null||p.call(m,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{Te(this,An,ir).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{Te(this,An,ir).call(this,{type:"pause"})},onContinue:()=>{Te(this,An,ir).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),M(this,_t).start()}},gs=new WeakMap,bi=new WeakMap,yn=new WeakMap,xi=new WeakMap,_t=new WeakMap,xa=new WeakMap,wi=new WeakMap,An=new WeakSet,ir=function(t){const n=r=>{var i,s;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Mp(r.data,this.options),fetchMeta:(i=t.meta)!=null?i:null};case"success":return Z(this,bi,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(s=t.dataUpdatedAt)!=null?s:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return iu(o)&&o.revert&&M(this,bi)?{...M(this,bi),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),gt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),M(this,yn).notify({query:this,type:"updated",action:t})})},Jm);function Mp(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ep(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Nw(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r!=null?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Gn,ep,Fw=(ep=class extends Ws{constructor(t={}){super();ae(this,Gn);this.config=t,Z(this,Gn,new Map)}build(t,n,r){var a;const i=n.queryKey,s=(a=n.queryHash)!=null?a:vf(i,n);let o=this.get(s);return o||(o=new Rw({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){M(this,Gn).has(t.queryHash)||(M(this,Gn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=M(this,Gn).get(t.queryHash);n&&(t.destroy(),n===t&&M(this,Gn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){gt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return M(this,Gn).get(t)}getAll(){return[...M(this,Gn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Lh(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Lh(t,r)):n}notify(t){gt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){gt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){gt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Gn=new WeakMap,ep),Kn,Mt,Si,Vn,Tr,tp,Bw=(tp=class extends Tp{constructor(t){super();ae(this,Vn);ae(this,Kn);ae(this,Mt);ae(this,Si);this.mutationId=t.mutationId,Z(this,Mt,t.mutationCache),Z(this,Kn,[]),this.state=t.state||jp(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){M(this,Kn).includes(t)||(M(this,Kn).push(t),this.clearGcTimeout(),M(this,Mt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Z(this,Kn,M(this,Kn).filter(n=>n!==t)),this.scheduleGc(),M(this,Mt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){M(this,Kn).length||(this.state.status==="pending"?this.scheduleGc():M(this,Mt).remove(this))}continue(){var t,n;return(n=(t=M(this,Si))==null?void 0:t.continue())!=null?n:this.execute(this.state.variables)}async execute(t){var s,o,a,l,c,u,d,f,h,g,m,p,v,b,S,C,x,k,w,_,O;const n=()=>{Te(this,Vn,Tr).call(this,{type:"continue"})};Z(this,Si,Pp({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(E,j)=>{Te(this,Vn,Tr).call(this,{type:"failed",failureCount:E,error:j})},onPause:()=>{Te(this,Vn,Tr).call(this,{type:"pause"})},onContinue:n,retry:(s=this.options.retry)!=null?s:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>M(this,Mt).canRun(this)}));const r=this.state.status==="pending",i=!M(this,Si).canStart();try{if(r)n();else{Te(this,Vn,Tr).call(this,{type:"pending",variables:t,isPaused:i}),await((a=(o=M(this,Mt).config).onMutate)==null?void 0:a.call(o,t,this));const j=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));j!==this.state.context&&Te(this,Vn,Tr).call(this,{type:"pending",context:j,variables:t,isPaused:i})}const E=await M(this,Si).start();return await((d=(u=M(this,Mt).config).onSuccess)==null?void 0:d.call(u,E,t,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,E,t,this.state.context)),await((m=(g=M(this,Mt).config).onSettled)==null?void 0:m.call(g,E,null,this.state.variables,this.state.context,this)),await((v=(p=this.options).onSettled)==null?void 0:v.call(p,E,null,t,this.state.context)),Te(this,Vn,Tr).call(this,{type:"success",data:E}),E}catch(E){try{throw await((S=(b=M(this,Mt).config).onError)==null?void 0:S.call(b,E,t,this.state.context,this)),await((x=(C=this.options).onError)==null?void 0:x.call(C,E,t,this.state.context)),await((w=(k=M(this,Mt).config).onSettled)==null?void 0:w.call(k,void 0,E,this.state.variables,this.state.context,this)),await((O=(_=this.options).onSettled)==null?void 0:O.call(_,void 0,E,t,this.state.context)),E}finally{Te(this,Vn,Tr).call(this,{type:"error",error:E})}}finally{M(this,Mt).runNext(this)}}},Kn=new WeakMap,Mt=new WeakMap,Si=new WeakMap,Vn=new WeakSet,Tr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),gt.batch(()=>{M(this,Kn).forEach(r=>{r.onMutationUpdate(t)}),M(this,Mt).notify({mutation:this,type:"updated",action:t})})},tp);function jp(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var cr,Pn,wa,np,qw=(np=class extends Ws{constructor(t={}){super();ae(this,cr);ae(this,Pn);ae(this,wa);this.config=t,Z(this,cr,new Set),Z(this,Pn,new Map),Z(this,wa,0)}build(t,n,r){const i=new Bw({mutationCache:this,mutationId:++Xa(this,wa)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){M(this,cr).add(t);const n=el(t);if(typeof n=="string"){const r=M(this,Pn).get(n);r?r.push(t):M(this,Pn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(M(this,cr).delete(t)){const n=el(t);if(typeof n=="string"){const r=M(this,Pn).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&M(this,Pn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=el(t);if(typeof n=="string"){const r=M(this,Pn).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r,i;const n=el(t);if(typeof n=="string"){const s=(r=M(this,Pn).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(i=s==null?void 0:s.continue())!=null?i:Promise.resolve()}else return Promise.resolve()}clear(){gt.batch(()=>{M(this,cr).forEach(t=>{this.notify({type:"removed",mutation:t})}),M(this,cr).clear(),M(this,Pn).clear()})}getAll(){return Array.from(M(this,cr))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ih(n,r))}findAll(t={}){return this.getAll().filter(n=>Ih(t,n))}notify(t){gt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return gt.batch(()=>Promise.all(t.map(n=>n.continue().catch($t))))}},cr=new WeakMap,Pn=new WeakMap,wa=new WeakMap,np);function el(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Fh(e){return{onFetch:(t,n)=>{var u,d,f,h,g;const r=t.options,i=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{var S;let m=!1;const p=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=kp(t.options,t.fetchOptions),b=async(C,x,k)=>{if(m)return Promise.reject();if(x==null&&C.pages.length)return Promise.resolve(C);const _=(()=>{const $={client:t.client,queryKey:t.queryKey,pageParam:x,direction:k?"backward":"forward",meta:t.options.meta};return p($),$})(),O=await v(_),{maxPages:E}=t.options,j=k?Mw:Tw;return{pages:j(C.pages,O,E),pageParams:j(C.pageParams,x,E)}};if(i&&s.length){const C=i==="backward",x=C?zw:Bh,k={pages:s,pageParams:o},w=x(r,k);a=await b(k,w,C)}else{const C=e!=null?e:s.length;do{const x=l===0?(S=o[0])!=null?S:r.initialPageParam:Bh(r,a);if(l>0&&x==null)break;a=await b(a,x),l++}while(l<C)}return a};t.options.persister?t.fetchFn=()=>{var m,p;return(p=(m=t.options).persister)==null?void 0:p.call(m,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Bh(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function zw(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var ut,$r,Dr,ys,ms,Lr,ps,vs,rp,Hw=(rp=class{constructor(e={}){ae(this,ut);ae(this,$r);ae(this,Dr);ae(this,ys);ae(this,ms);ae(this,Lr);ae(this,ps);ae(this,vs);Z(this,ut,e.queryCache||new Fw),Z(this,$r,e.mutationCache||new qw),Z(this,Dr,e.defaultOptions||{}),Z(this,ys,new Map),Z(this,ms,new Map),Z(this,Lr,0)}mount(){Xa(this,Lr)._++,M(this,Lr)===1&&(Z(this,ps,bf.subscribe(async e=>{e&&(await this.resumePausedMutations(),M(this,ut).onFocus())})),Z(this,vs,Bs.subscribe(async e=>{e&&(await this.resumePausedMutations(),M(this,ut).onOnline())})))}unmount(){var e,t;Xa(this,Lr)._--,M(this,Lr)===0&&((e=M(this,ps))==null||e.call(this),Z(this,ps,void 0),(t=M(this,vs))==null||t.call(this),Z(this,vs,void 0))}isFetching(e){return M(this,ut).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return M(this,$r).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=M(this,ut).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=M(this,ut).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Gr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return M(this,ut).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=M(this,ut).get(r.queryHash),s=i==null?void 0:i.state.data,o=Aw(t,s);if(o!==void 0)return M(this,ut).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return gt.batch(()=>M(this,ut).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=M(this,ut).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=M(this,ut);gt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=M(this,ut);return gt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=gt.batch(()=>M(this,ut).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then($t).catch($t)}invalidateQueries(e,t={}){return gt.batch(()=>{var n,r;return M(this,ut).findAll(e).forEach(i=>{i.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(r=(n=e==null?void 0:e.refetchType)!=null?n:e==null?void 0:e.type)!=null?r:"active"},t)})}refetchQueries(e,t={}){var i;const n={...t,cancelRefetch:(i=t.cancelRefetch)!=null?i:!0},r=gt.batch(()=>M(this,ut).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch($t)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then($t)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=M(this,ut).build(this,t);return n.isStaleByTime(Gr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then($t).catch($t)}fetchInfiniteQuery(e){return e.behavior=Fh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then($t).catch($t)}ensureInfiniteQueryData(e){return e.behavior=Fh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Bs.isOnline()?M(this,$r).resumePausedMutations():Promise.resolve()}getQueryCache(){return M(this,ut)}getMutationCache(){return M(this,$r)}getDefaultOptions(){return M(this,Dr)}setDefaultOptions(e){Z(this,Dr,e)}setQueryDefaults(e,t){M(this,ys).set(ji(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...M(this,ys).values()],n={};return t.forEach(r=>{Ko(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){M(this,ms).set(ji(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...M(this,ms).values()],n={};return t.forEach(r=>{Ko(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...M(this,Dr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=vf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Bl&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...M(this,Dr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){M(this,ut).clear(),M(this,$r).clear()}},ut=new WeakMap,$r=new WeakMap,Dr=new WeakMap,ys=new WeakMap,ms=new WeakMap,Lr=new WeakMap,ps=new WeakMap,vs=new WeakMap,rp),Rt,Fe,Sa,jt,Ci,bs,Ir,Rr,Ca,xs,ws,_i,ki,Nr,Ss,Ke,Eo,Zu,Ju,ed,td,nd,rd,id,$p,ip,Uw=(ip=class extends Ws{constructor(t,n){super();ae(this,Ke);ae(this,Rt);ae(this,Fe);ae(this,Sa);ae(this,jt);ae(this,Ci);ae(this,bs);ae(this,Ir);ae(this,Rr);ae(this,Ca);ae(this,xs);ae(this,ws);ae(this,_i);ae(this,ki);ae(this,Nr);ae(this,Ss,new Set);this.options=n,Z(this,Rt,t),Z(this,Rr,null),Z(this,Ir,Xu()),this.options.experimental_prefetchInRender||M(this,Ir).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(M(this,Fe).addObserver(this),qh(M(this,Fe),this.options)?Te(this,Ke,Eo).call(this):this.updateResult(),Te(this,Ke,td).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return sd(M(this,Fe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return sd(M(this,Fe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Te(this,Ke,nd).call(this),Te(this,Ke,rd).call(this),M(this,Fe).removeObserver(this)}setOptions(t){const n=this.options,r=M(this,Fe);if(this.options=M(this,Rt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof mn(this.options.enabled,M(this,Fe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Te(this,Ke,id).call(this),M(this,Fe).setOptions(this.options),n._defaulted&&!Fl(this.options,n)&&M(this,Rt).getQueryCache().notify({type:"observerOptionsUpdated",query:M(this,Fe),observer:this});const i=this.hasListeners();i&&zh(M(this,Fe),r,this.options,n)&&Te(this,Ke,Eo).call(this),this.updateResult(),i&&(M(this,Fe)!==r||mn(this.options.enabled,M(this,Fe))!==mn(n.enabled,M(this,Fe))||Gr(this.options.staleTime,M(this,Fe))!==Gr(n.staleTime,M(this,Fe)))&&Te(this,Ke,Zu).call(this);const s=Te(this,Ke,Ju).call(this);i&&(M(this,Fe)!==r||mn(this.options.enabled,M(this,Fe))!==mn(n.enabled,M(this,Fe))||s!==M(this,Nr))&&Te(this,Ke,ed).call(this,s)}getOptimisticResult(t){const n=M(this,Rt).getQueryCache().build(M(this,Rt),t),r=this.createResult(n,t);return Kw(this,r)&&(Z(this,jt,r),Z(this,bs,this.options),Z(this,Ci,M(this,Fe).state)),r}getCurrentResult(){return M(this,jt)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),Reflect.get(r,i))})}trackProp(t){M(this,Ss).add(t)}getCurrentQuery(){return M(this,Fe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=M(this,Rt).defaultQueryOptions(t),r=M(this,Rt).getQueryCache().build(M(this,Rt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return Te(this,Ke,Eo).call(this,{...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),M(this,jt)))}createResult(t,n){var O;const r=M(this,Fe),i=this.options,s=M(this,jt),o=M(this,Ci),a=M(this,bs),c=t!==r?t.state:M(this,Sa),{state:u}=t;let d={...u},f=!1,h;if(n._optimisticResults){const E=this.hasListeners(),j=!E&&qh(t,n),$=E&&zh(t,r,n,i);(j||$)&&(d={...d,...Mp(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:p}=d;h=d.data;let v=!1;if(n.placeholderData!==void 0&&h===void 0&&p==="pending"){let E;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(E=s.data,v=!0):E=typeof n.placeholderData=="function"?n.placeholderData((O=M(this,ws))==null?void 0:O.state.data,M(this,ws)):n.placeholderData,E!==void 0&&(p="success",h=Yu(s==null?void 0:s.data,E,n),f=!0)}if(n.select&&h!==void 0&&!v)if(s&&h===(o==null?void 0:o.data)&&n.select===M(this,Ca))h=M(this,xs);else try{Z(this,Ca,n.select),h=n.select(h),h=Yu(s==null?void 0:s.data,h,n),Z(this,xs,h),Z(this,Rr,null)}catch(E){Z(this,Rr,E)}M(this,Rr)&&(g=M(this,Rr),h=M(this,xs),m=Date.now(),p="error");const b=d.fetchStatus==="fetching",S=p==="pending",C=p==="error",x=S&&b,k=h!==void 0,_={status:p,fetchStatus:d.fetchStatus,isPending:S,isSuccess:p==="success",isError:C,isInitialLoading:x,isLoading:x,data:h,dataUpdatedAt:d.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!S,isLoadingError:C&&!k,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:C&&k,isStale:xf(t,n),refetch:this.refetch,promise:M(this,Ir),isEnabled:mn(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const E=B=>{_.status==="error"?B.reject(_.error):_.data!==void 0&&B.resolve(_.data)},j=()=>{const B=Z(this,Ir,_.promise=Xu());E(B)},$=M(this,Ir);switch($.status){case"pending":t.queryHash===r.queryHash&&E($);break;case"fulfilled":(_.status==="error"||_.data!==$.value)&&j();break;case"rejected":(_.status!=="error"||_.error!==$.reason)&&j();break}}return _}updateResult(){const t=M(this,jt),n=this.createResult(M(this,Fe),this.options);if(Z(this,Ci,M(this,Fe).state),Z(this,bs,this.options),M(this,Ci).data!==void 0&&Z(this,ws,M(this,Fe)),Fl(n,t))return;Z(this,jt,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!M(this,Ss).size)return!0;const o=new Set(s!=null?s:M(this,Ss));return this.options.throwOnError&&o.add("error"),Object.keys(M(this,jt)).some(a=>{const l=a;return M(this,jt)[l]!==t[l]&&o.has(l)})};Te(this,Ke,$p).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Te(this,Ke,td).call(this)}},Rt=new WeakMap,Fe=new WeakMap,Sa=new WeakMap,jt=new WeakMap,Ci=new WeakMap,bs=new WeakMap,Ir=new WeakMap,Rr=new WeakMap,Ca=new WeakMap,xs=new WeakMap,ws=new WeakMap,_i=new WeakMap,ki=new WeakMap,Nr=new WeakMap,Ss=new WeakMap,Ke=new WeakSet,Eo=function(t){Te(this,Ke,id).call(this);let n=M(this,Fe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch($t)),n},Zu=function(){Te(this,Ke,nd).call(this);const t=Gr(this.options.staleTime,M(this,Fe));if(Mi||M(this,jt).isStale||!Vu(t))return;const r=_p(M(this,jt).dataUpdatedAt,t)+1;Z(this,_i,setTimeout(()=>{M(this,jt).isStale||this.updateResult()},r))},Ju=function(){var t;return(t=typeof this.options.refetchInterval=="function"?this.options.refetchInterval(M(this,Fe)):this.options.refetchInterval)!=null?t:!1},ed=function(t){Te(this,Ke,rd).call(this),Z(this,Nr,t),!(Mi||mn(this.options.enabled,M(this,Fe))===!1||!Vu(M(this,Nr))||M(this,Nr)===0)&&Z(this,ki,setInterval(()=>{(this.options.refetchIntervalInBackground||bf.isFocused())&&Te(this,Ke,Eo).call(this)},M(this,Nr)))},td=function(){Te(this,Ke,Zu).call(this),Te(this,Ke,ed).call(this,Te(this,Ke,Ju).call(this))},nd=function(){M(this,_i)&&(clearTimeout(M(this,_i)),Z(this,_i,void 0))},rd=function(){M(this,ki)&&(clearInterval(M(this,ki)),Z(this,ki,void 0))},id=function(){const t=M(this,Rt).getQueryCache().build(M(this,Rt),this.options);if(t===M(this,Fe))return;const n=M(this,Fe);Z(this,Fe,t),Z(this,Sa,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},$p=function(t){gt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(M(this,jt))}),M(this,Rt).getQueryCache().notify({query:M(this,Fe),type:"observerResultsUpdated"})})},ip);function Gw(e,t){return mn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function qh(e,t){return Gw(e,t)||e.state.data!==void 0&&sd(e,t,t.refetchOnMount)}function sd(e,t,n){if(mn(t.enabled,e)!==!1&&Gr(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&xf(e,t)}return!1}function zh(e,t,n,r){return(e!==t||mn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&xf(e,n)}function xf(e,t){return mn(t.enabled,e)!==!1&&e.isStaleByTime(Gr(t.staleTime,e))}function Kw(e,t){return!Fl(e.getCurrentResult(),t)}var Fr,Br,Nt,ur,mr,Al,od,sp,Vw=(sp=class extends Ws{constructor(n,r){super();ae(this,mr);ae(this,Fr);ae(this,Br);ae(this,Nt);ae(this,ur);Z(this,Fr,n),this.setOptions(r),this.bindMethods(),Te(this,mr,Al).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=M(this,Fr).defaultMutationOptions(n),Fl(this.options,r)||M(this,Fr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:M(this,Nt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ji(r.mutationKey)!==ji(this.options.mutationKey)?this.reset():((i=M(this,Nt))==null?void 0:i.state.status)==="pending"&&M(this,Nt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=M(this,Nt))==null||n.removeObserver(this)}onMutationUpdate(n){Te(this,mr,Al).call(this),Te(this,mr,od).call(this,n)}getCurrentResult(){return M(this,Br)}reset(){var n;(n=M(this,Nt))==null||n.removeObserver(this),Z(this,Nt,void 0),Te(this,mr,Al).call(this),Te(this,mr,od).call(this)}mutate(n,r){var i;return Z(this,ur,r),(i=M(this,Nt))==null||i.removeObserver(this),Z(this,Nt,M(this,Fr).getMutationCache().build(M(this,Fr),this.options)),M(this,Nt).addObserver(this),M(this,Nt).execute(n)}},Fr=new WeakMap,Br=new WeakMap,Nt=new WeakMap,ur=new WeakMap,mr=new WeakSet,Al=function(){var r,i;const n=(i=(r=M(this,Nt))==null?void 0:r.state)!=null?i:jp();Z(this,Br,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},od=function(n){gt.batch(()=>{var r,i,s,o,a,l,c,u;if(M(this,ur)&&this.hasListeners()){const d=M(this,Br).variables,f=M(this,Br).context;(n==null?void 0:n.type)==="success"?((i=(r=M(this,ur)).onSuccess)==null||i.call(r,n.data,d,f),(o=(s=M(this,ur)).onSettled)==null||o.call(s,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((l=(a=M(this,ur)).onError)==null||l.call(a,n.error,d,f),(u=(c=M(this,ur)).onSettled)==null||u.call(c,void 0,n.error,d,f))}this.listeners.forEach(d=>{d(M(this,Br))})})},sp),Dp=L.createContext(void 0),Ut=e=>{const t=L.useContext(Dp);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Ww=({client:e,children:t})=>(L.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(Dp.Provider,{value:e,children:t})),Lp=L.createContext(!1),Qw=()=>L.useContext(Lp);Lp.Provider;function Yw(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Xw=L.createContext(Yw()),Zw=()=>L.useContext(Xw),Jw=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},e3=e=>{L.useEffect(()=>{e.clearReset()},[e])},t3=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Op(n,[e.error,r])),n3=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r!=null?r:1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},r3=(e,t)=>e.isLoading&&e.isFetching&&!t,i3=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Hh=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function s3(e,t,n){var d,f,h,g,m;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||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 r=Qw(),i=Zw(),s=Ut(n),o=s.defaultQueryOptions(e);(f=(d=s.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.call(d,o),process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.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`)),o._optimisticResults=r?"isRestoring":"optimistic",n3(o),Jw(o,i),e3(i);const a=!s.getQueryCache().get(o.queryHash),[l]=L.useState(()=>new t(s,o)),c=l.getOptimisticResult(o),u=!r&&e.subscribed!==!1;if(L.useSyncExternalStore(L.useCallback(p=>{const v=u?l.subscribe(gt.batchCalls(p)):$t;return l.updateResult(),v},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),L.useEffect(()=>{l.setOptions(o)},[o,l]),i3(o,c))throw Hh(o,l,i);if(t3({result:c,errorResetBoundary:i,throwOnError:o.throwOnError,query:s.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw c.error;if((g=(h=s.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||g.call(h,o,c),o.experimental_prefetchInRender&&!Mi&&r3(c,r)){const p=a?Hh(o,l,i):(m=s.getQueryCache().get(o.queryHash))==null?void 0:m.promise;p==null||p.catch($t).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function ti(e,t){return s3(e,Uw,t)}function wr(e,t){const n=Ut(t),[r]=L.useState(()=>new Vw(n,e));L.useEffect(()=>{r.setOptions(e)},[r,e]);const i=L.useSyncExternalStore(L.useCallback(o=>r.subscribe(gt.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=L.useCallback((o,a)=>{r.mutate(o,a).catch($t)},[r]);if(i.error&&Op(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}var Ee={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Uh(this.context.count)},getNextContextId(){return Uh(this.context.count++)}};function Uh(e){const t=String(e),n=t.length-1;return Ee.context.id+(n?String.fromCharCode(96+n):"")+t}function Ao(e){Ee.context=e}var Ip=!1,o3=(e,t)=>e===t,ql=Symbol("solid-proxy"),Rp=typeof Proxy=="function",bc=Symbol("solid-track"),zl={equals:o3},Np=Up,Sr=1,Hl=2,Fp={owned:null,cleanups:null,context:null,owner:null},su={},He=null,ou=null,a3=null,Ze=null,Pt=null,gr=null,xc=0;function yr(e,t){const n=Ze,r=He,i=e.length===0,s=t===void 0?r:t,o=i?Fp:{owned:null,cleanups:null,context:s?s.context:null,owner:s},a=i?e:()=>e(()=>lt(()=>Vo(o)));He=o,Ze=null;try{return Yn(a,!0)}finally{Ze=n,He=r}}function se(e,t){t=t?Object.assign({},zl,t):zl;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=i=>(typeof i=="function"&&(i=i(n.value)),Hp(n,i));return[zp.bind(n),r]}function Bp(e,t,n){const r=wc(e,t,!0,Sr);Qs(r)}function xe(e,t,n){const r=wc(e,t,!1,Sr);Qs(r)}function we(e,t,n){Np=v3;const r=wc(e,t,!1,Sr);(!n||!n.render)&&(r.user=!0),gr?gr.push(r):Qs(r)}function U(e,t,n){n=n?Object.assign({},zl,n):zl;const r=wc(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Qs(r),zp.bind(r)}function l3(e){return e&&typeof e=="object"&&"then"in e}function c3(e,t,n){let r,i,s;r=!0,i=e,s={};let o=null,a=su,l=null,c=!1,u="initialValue"in s,d=typeof r=="function"&&U(r);const f=new Set,[h,g]=(s.storage||se)(s.initialValue),[m,p]=se(void 0),[v,b]=se(void 0,{equals:!1}),[S,C]=se(u?"ready":"unresolved");Ee.context&&(l=Ee.getNextContextId(),s.ssrLoadFrom==="initial"?a=s.initialValue:Ee.load&&Ee.has(l)&&(a=Ee.load(l)));function x(O,E,j,$){return o===O&&(o=null,$!==void 0&&(u=!0),(O===a||E===a)&&s.onHydrated&&queueMicrotask(()=>s.onHydrated($,{value:E})),a=su,k(E,j)),E}function k(O,E){Yn(()=>{E===void 0&&g(()=>O),C(E!==void 0?"errored":u?"ready":"unresolved"),p(E);for(const j of f.keys())j.decrement();f.clear()},!1)}function w(){const O=y3,E=h(),j=m();if(j!==void 0&&!o)throw j;return Ze&&Ze.user,E}function _(O=!0){if(O!==!1&&c)return;c=!1;const E=d?d():r;if(E==null||E===!1){x(o,lt(h));return}const j=a!==su?a:lt(()=>i(E,{value:h(),refetching:O}));return l3(j)?(o=j,"value"in j?(j.status==="success"?x(o,j.value,void 0,E):x(o,void 0,ad(j.value),E),j):(c=!0,queueMicrotask(()=>c=!1),Yn(()=>{C(u?"refreshing":"pending"),b()},!1),j.then($=>x(j,$,void 0,E),$=>x(j,void 0,ad($),E)))):(x(o,j,void 0,E),j)}return Object.defineProperties(w,{state:{get:()=>S()},error:{get:()=>m()},loading:{get(){const O=S();return O==="pending"||O==="refreshing"}},latest:{get(){if(!u)return w();const O=m();if(O&&!o)throw O;return h()}}}),d?Bp(()=>_(!1)):_(!1),[w,{refetch:_,mutate:g}]}function u3(e){return Yn(e,!1)}function lt(e){if(Ze===null)return e();const t=Ze;Ze=null;try{return e()}finally{Ze=t}}function vr(e,t,n){const r=Array.isArray(e);let i,s=n&&n.defer;return o=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]()}else a=e();if(s)return s=!1,o;const l=lt(()=>t(a,i,o));return i=a,l}}function br(e){we(()=>lt(e))}function Ce(e){return He===null||(He.cleanups===null?He.cleanups=[e]:He.cleanups.push(e)),e}function Gh(){return He}function d3(e,t){const n=He,r=Ze;He=e,Ze=null;try{return Yn(t,!0)}catch(i){wf(i)}finally{He=n,Ze=r}}function f3(e){const t=Ze,n=He;return Promise.resolve().then(()=>{Ze=t,He=n;let r;return Yn(e,!1),Ze=He=null,r?r.done:void 0})}var[h3,KL]=se(!1);function g3(){return[h3,f3]}function xt(e,t){const n=Symbol("context");return{id:n,Provider:b3(n),defaultValue:e}}function wt(e){let t;return He&&He.context&&(t=He.context[e.id])!==void 0?t:e.defaultValue}function qp(e){const t=U(e),n=U(()=>ld(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}var y3;function zp(){if(this.sources&&this.state)if(this.state===Sr)Qs(this);else{const e=Pt;Pt=null,Yn(()=>Gl(this),!1),Pt=e}if(Ze){const e=this.observers?this.observers.length:0;Ze.sources?(Ze.sources.push(this),Ze.sourceSlots.push(e)):(Ze.sources=[this],Ze.sourceSlots=[e]),this.observers?(this.observers.push(Ze),this.observerSlots.push(Ze.sources.length-1)):(this.observers=[Ze],this.observerSlots=[Ze.sources.length-1])}return this.value}function Hp(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Yn(()=>{for(let i=0;i<e.observers.length;i+=1){const s=e.observers[i],o=ou&&ou.running;o&&ou.disposed.has(s),(o?!s.tState:!s.state)&&(s.pure?Pt.push(s):gr.push(s),s.observers&&Gp(s)),o||(s.state=Sr)}if(Pt.length>1e6)throw Pt=[],new Error},!1)),t}function Qs(e){if(!e.fn)return;Vo(e);const t=xc;m3(e,e.value,t)}function m3(e,t,n){let r;const i=He,s=Ze;Ze=He=e;try{r=e.fn(t)}catch(o){return e.pure&&(e.state=Sr,e.owned&&e.owned.forEach(Vo),e.owned=null),e.updatedAt=n+1,wf(o)}finally{Ze=s,He=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Hp(e,r):e.value=r,e.updatedAt=n)}function wc(e,t,n,r=Sr,i){const s={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:He,context:He?He.context:null,pure:n};return He===null||He!==Fp&&(He.owned?He.owned.push(s):He.owned=[s]),s}function Ul(e){if(e.state===0)return;if(e.state===Hl)return Gl(e);if(e.suspense&<(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<xc);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===Sr)Qs(e);else if(e.state===Hl){const r=Pt;Pt=null,Yn(()=>Gl(e,t[0]),!1),Pt=r}}function Yn(e,t){if(Pt)return e();let n=!1;t||(Pt=[]),gr?n=!0:gr=[],xc++;try{const r=e();return p3(n),r}catch(r){n||(gr=null),Pt=null,wf(r)}}function p3(e){if(Pt&&(Up(Pt),Pt=null),e)return;const t=gr;gr=null,t.length&&Yn(()=>Np(t),!1)}function Up(e){for(let t=0;t<e.length;t++)Ul(e[t])}function v3(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Ul(r)}if(Ee.context){if(Ee.count){Ee.effects||(Ee.effects=[]),Ee.effects.push(...e.slice(0,n));return}Ao()}for(Ee.effects&&(Ee.done||!Ee.count)&&(e=[...Ee.effects,...e],n+=Ee.effects.length,delete Ee.effects),t=0;t<n;t++)Ul(e[t])}function Gl(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const i=r.state;i===Sr?r!==t&&(!r.updatedAt||r.updatedAt<xc)&&Ul(r):i===Hl&&Gl(r,t)}}}function Gp(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=Hl,n.pure?Pt.push(n):gr.push(n),n.observers&&Gp(n))}}function Vo(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),i=n.observers;if(i&&i.length){const s=i.pop(),o=n.observerSlots.pop();r<i.length&&(s.sourceSlots[o]=r,i[r]=s,n.observerSlots[r]=o)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Vo(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Vo(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function ad(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function wf(e,t=He){throw ad(e)}function ld(e){if(typeof e=="function"&&!e.length)return ld(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=ld(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function b3(e,t){return function(r){let i;return xe(()=>i=lt(()=>(He.context={...He.context,[e]:r.value},qp(()=>r.children))),void 0),i}}var cd=Symbol("fallback");function Kl(e){for(let t=0;t<e.length;t++)e[t]()}function x3(e,t,n={}){let r=[],i=[],s=[],o=0,a=t.length>1?[]:null;return Ce(()=>Kl(s)),()=>{let l=e()||[],c=l.length,u,d;return l[bc],lt(()=>{let h,g,m,p,v,b,S,C,x;if(c===0)o!==0&&(Kl(s),s=[],r=[],i=[],o=0,a&&(a=[])),n.fallback&&(r=[cd],i[0]=yr(k=>(s[0]=k,n.fallback())),o=1);else if(o===0){for(i=new Array(c),d=0;d<c;d++)r[d]=l[d],i[d]=yr(f);o=c}else{for(m=new Array(c),p=new Array(c),a&&(v=new Array(c)),b=0,S=Math.min(o,c);b<S&&r[b]===l[b];b++);for(S=o-1,C=c-1;S>=b&&C>=b&&r[S]===l[C];S--,C--)m[C]=i[S],p[C]=s[S],a&&(v[C]=a[S]);for(h=new Map,g=new Array(C+1),d=C;d>=b;d--)x=l[d],u=h.get(x),g[d]=u===void 0?-1:u,h.set(x,d);for(u=b;u<=S;u++)x=r[u],d=h.get(x),d!==void 0&&d!==-1?(m[d]=i[u],p[d]=s[u],a&&(v[d]=a[u]),d=g[d],h.set(x,d)):s[u]();for(d=b;d<c;d++)d in m?(i[d]=m[d],s[d]=p[d],a&&(a[d]=v[d],a[d](d))):i[d]=yr(f);i=i.slice(0,o=c),r=l.slice(0)}return i});function f(h){if(s[d]=h,a){const[g,m]=se(d);return a[d]=m,t(l[d],g)}return t(l[d])}}}function w3(e,t,n={}){let r=[],i=[],s=[],o=[],a=0,l;return Ce(()=>Kl(s)),()=>{const c=e()||[],u=c.length;return c[bc],lt(()=>{if(u===0)return a!==0&&(Kl(s),s=[],r=[],i=[],a=0,o=[]),n.fallback&&(r=[cd],i[0]=yr(f=>(s[0]=f,n.fallback())),a=1),i;for(r[0]===cd&&(s[0](),s=[],r=[],i=[],a=0),l=0;l<u;l++)l<r.length&&r[l]!==c[l]?o[l](()=>c[l]):l>=r.length&&(i[l]=yr(d));for(;l<r.length;l++)s[l]();return a=o.length=s.length=u,r=c.slice(0),i=i.slice(0,a)});function d(f){s[l]=f;const[h,g]=se(c[l]);return o[l]=g,t(h,l)}}}function D(e,t){return lt(()=>e(t||{}))}function tl(){return!0}var ud={get(e,t,n){return t===ql?n:e.get(t)},has(e,t){return t===ql?!0:e.has(t)},set:tl,deleteProperty:tl,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:tl,deleteProperty:tl}},ownKeys(e){return e.keys()}};function au(e){return(e=typeof e=="function"?e():e)?e:{}}function S3(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function Ae(...e){let t=!1;for(let o=0;o<e.length;o++){const a=e[o];t=t||!!a&&ql in a,e[o]=typeof a=="function"?(t=!0,U(a)):a}if(Rp&&t)return new Proxy({get(o){for(let a=e.length-1;a>=0;a--){const l=au(e[a])[o];if(l!==void 0)return l}},has(o){for(let a=e.length-1;a>=0;a--)if(o in au(e[a]))return!0;return!1},keys(){const o=[];for(let a=0;a<e.length;a++)o.push(...Object.keys(au(e[a])));return[...new Set(o)]}},ud);const n={},r=Object.create(null);for(let o=e.length-1;o>=0;o--){const a=e[o];if(!a)continue;const l=Object.getOwnPropertyNames(a);for(let c=l.length-1;c>=0;c--){const u=l[c];if(u==="__proto__"||u==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,u);if(!r[u])r[u]=d.get?{enumerable:!0,configurable:!0,get:S3.bind(n[u]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const f=n[u];f&&(d.get?f.push(d.get.bind(a)):d.value!==void 0&&f.push(()=>d.value))}}}const i={},s=Object.keys(r);for(let o=s.length-1;o>=0;o--){const a=s[o],l=r[a];l&&l.get?Object.defineProperty(i,a,l):i[a]=l?l.value:void 0}return i}function Ve(e,...t){if(Rp&&ql in e){const i=new Set(t.length>1?t.flat():t[0]),s=t.map(o=>new Proxy({get(a){return o.includes(a)?e[a]:void 0},has(a){return o.includes(a)&&a in e},keys(){return o.filter(a=>a in e)}},ud));return s.push(new Proxy({get(o){return i.has(o)?void 0:e[o]},has(o){return i.has(o)?!1:o in e},keys(){return Object.keys(e).filter(o=>!i.has(o))}},ud)),s}const n={},r=t.map(()=>({}));for(const i of Object.getOwnPropertyNames(e)){const s=Object.getOwnPropertyDescriptor(e,i),o=!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable;let a=!1,l=0;for(const c of t)c.includes(i)&&(a=!0,o?r[l][i]=s.value:Object.defineProperty(r[l],i,s)),++l;a||(o?n[i]=s.value:Object.defineProperty(n,i,s))}return[...r,n]}function Kp(e){let t,n;const r=i=>{const s=Ee.context;if(s){const[a,l]=se();Ee.count||(Ee.count=0),Ee.count++,(n||(n=e())).then(c=>{!Ee.done&&Ao(s),Ee.count--,l(()=>c.default),Ao()}),t=a}else if(!t){const[a]=c3(()=>(n||(n=e())).then(l=>l.default));t=a}let o;return U(()=>(o=t())?lt(()=>{if(!s||Ee.done)return o(i);const a=Ee.context;Ao(s);const l=o(i);return Ao(a),l}):"")};return r.preload=()=>n||((n=e()).then(i=>t=()=>i.default),n),r}var C3=0;function Cn(){return Ee.context?Ee.getNextContextId():`cl-${C3++}`}var Vp=e=>`Stale read from <${e}>.`;function _3(e){const t="fallback"in e&&{fallback:()=>e.fallback};return U(x3(()=>e.each,e.children,t||void 0))}function k3(e){const t="fallback"in e&&{fallback:()=>e.fallback};return U(w3(()=>e.each,e.children,t||void 0))}function be(e){const t=e.keyed,n=U(()=>e.when,void 0,void 0),r=t?n:U(n,void 0,{equals:(i,s)=>!i==!s});return U(()=>{const i=r();if(i){const s=e.children;return typeof s=="function"&&s.length>0?lt(()=>s(t?i:()=>{if(!lt(r))throw Vp("Show");return n()})):s}return e.fallback},void 0,void 0)}function O3(e){const t=qp(()=>e.children),n=U(()=>{const r=t(),i=Array.isArray(r)?r:[r];let s=()=>{};for(let o=0;o<i.length;o++){const a=o,l=i[o],c=s,u=U(()=>c()?void 0:l.when,void 0,void 0),d=l.keyed?u:U(u,void 0,{equals:(f,h)=>!f==!h});s=()=>c()||(d()?[a,u,l]:void 0)}return s});return U(()=>{const r=n()();if(!r)return e.fallback;const[i,s,o]=r,a=o.children;return typeof a=="function"&&a.length>0?lt(()=>a(o.keyed?s():()=>{var c;if(((c=lt(n)())==null?void 0:c[0])!==i)throw Vp("Match");return s()})):a},void 0,void 0)}function lu(e){return e}var E3=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],A3=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...E3]),P3=new Set(["innerHTML","textContent","innerText","children"]),T3=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),M3=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function j3(e,t){const n=M3[e];return typeof n=="object"?n[t]?n.$:void 0:n}var $3=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),D3=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),L3={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function I3(e,t,n){let r=n.length,i=t.length,s=r,o=0,a=0,l=t[i-1].nextSibling,c=null;for(;o<i||a<s;){if(t[o]===n[a]){o++,a++;continue}for(;t[i-1]===n[s-1];)i--,s--;if(i===o){const u=s<r?a?n[a-1].nextSibling:n[s-a]:l;for(;a<s;)e.insertBefore(n[a++],u)}else if(s===a)for(;o<i;)(!c||!c.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[s-1]&&n[a]===t[i-1]){const u=t[--i].nextSibling;e.insertBefore(n[a++],t[o++].nextSibling),e.insertBefore(n[--s],u),t[i]=n[s]}else{if(!c){c=new Map;let d=a;for(;d<s;)c.set(n[d],d++)}const u=c.get(t[o]);if(u!=null)if(a<u&&u<s){let d=o,f=1,h;for(;++d<i&&d<s&&!((h=c.get(t[d]))==null||h!==u+f);)f++;if(f>u-a){const g=t[o];for(;a<u;)e.insertBefore(n[a++],g)}else e.replaceChild(n[a++],t[o++])}else o++;else t[o++].remove()}}}var Fo="_$DX_DELEGATE";function Wp(e,t,n,r={}){let i;return yr(s=>{i=s,t===document?e():V(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=""}}function ue(e,t,n,r){let i;const s=()=>{const a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},o=()=>(i||(i=s())).cloneNode(!0);return o.cloneNode=o,o}function Sc(e,t=window.document){const n=t[Fo]||(t[Fo]=new Set);for(let r=0,i=e.length;r<i;r++){const s=e[r];n.has(s)||(n.add(s),t.addEventListener(s,Xp))}}function R3(e=window.document){if(e[Fo]){for(let t of e[Fo].keys())e.removeEventListener(t,Xp);delete e[Fo]}}function ee(e,t,n){zi(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function N3(e,t,n,r){zi(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function F3(e,t,n){zi(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function ne(e,t){zi(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Qp(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const i=n[0];e.addEventListener(t,n[0]=s=>i.call(e,n[1],s))}else e.addEventListener(t,n,typeof n!="function"&&n)}function B3(e,t,n={}){const r=Object.keys(t||{}),i=Object.keys(n);let s,o;for(s=0,o=i.length;s<o;s++){const a=i[s];!a||a==="undefined"||t[a]||(Kh(e,a,!1),delete n[a])}for(s=0,o=r.length;s<o;s++){const a=r[s],l=!!t[a];!a||a==="undefined"||n[a]===l||!l||(Kh(e,a,!0),n[a]=l)}return n}function q3(e,t,n){if(!t)return n?ee(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let i,s;for(s in n)t[s]==null&&r.removeProperty(s),delete n[s];for(s in t)i=t[s],i!==n[s]&&(r.setProperty(s,i),n[s]=i);return n}function Yp(e,t={},n,r){const i={};return r||xe(()=>i.children=Wo(e,t.children,i.children)),xe(()=>typeof t.ref=="function"&&Ys(t.ref,e)),xe(()=>z3(e,t,n,!0,i,!0)),i}function Ys(e,t,n){return lt(()=>e(t,n))}function V(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Wo(e,t,r,n);xe(i=>Wo(e,t(),i,n),r)}function z3(e,t,n,r,i={},s=!1){t||(t={});for(const o in i)if(!(o in t)){if(o==="children")continue;i[o]=Vh(e,o,null,i[o],n,s,t)}for(const o in t){if(o==="children")continue;const a=t[o];i[o]=Vh(e,o,a,i[o],n,s,t)}}function H3(e){let t,n;return!zi()||!(t=Ee.registry.get(n=G3()))?e():(Ee.completed&&Ee.completed.add(t),Ee.registry.delete(n),t)}function zi(e){return!!Ee.context&&!Ee.done&&(!e||e.isConnected)}function U3(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Kh(e,t,n){const r=t.trim().split(/\s+/);for(let i=0,s=r.length;i<s;i++)e.classList.toggle(r[i],n)}function Vh(e,t,n,r,i,s,o){let a,l,c,u,d;if(t==="style")return q3(e,n,r);if(t==="classList")return B3(e,n,r);if(n===r)return r;if(t==="ref")s||n(e);else if(t.slice(0,3)==="on:"){const f=t.slice(3);r&&e.removeEventListener(f,r,typeof r!="function"&&r),n&&e.addEventListener(f,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const f=t.slice(10);r&&e.removeEventListener(f,r,!0),n&&e.addEventListener(f,n,!0)}else if(t.slice(0,2)==="on"){const f=t.slice(2).toLowerCase(),h=$3.has(f);if(!h&&r){const g=Array.isArray(r)?r[0]:r;e.removeEventListener(f,g)}(h||n)&&(Qp(e,f,n,h),h&&Sc([f]))}else if(t.slice(0,5)==="attr:")ee(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")F3(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=P3.has(t))||!i&&((u=j3(t,e.tagName))||(l=A3.has(t)))||(a=e.nodeName.includes("-")||"is"in o)){if(d)t=t.slice(5),l=!0;else if(zi(e))return n;t==="class"||t==="className"?ne(e,n):a&&!l&&!c?e[U3(t)]=n:e[u||t]=n}else{const f=i&&t.indexOf(":")>-1&&L3[t.split(":")[0]];f?N3(e,f,t,n):ee(e,T3[t]||t,n)}return n}function Xp(e){if(Ee.registry&&Ee.events&&Ee.events.find(([l,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,i=e.currentTarget,s=l=>Object.defineProperty(e,"target",{configurable:!0,value:l}),o=()=>{const l=t[n];if(l&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?l.call(t,c,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&s(t.host),!0},a=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),Ee.registry&&!Ee.done&&(Ee.done=_$HY.done=!0),e.composedPath){const l=e.composedPath();s(l[0]);for(let c=0;c<l.length-2&&(t=l[c],!!o());c++){if(t._$host){t=t._$host,a();break}if(t.parentNode===i)break}}else a();s(r)}function Wo(e,t,n,r,i){const s=zi(e);if(s){!n&&(n=[...e.childNodes]);let l=[];for(let c=0;c<n.length;c++){const u=n[c];u.nodeType===8&&u.data.slice(0,2)==="!$"?u.remove():l.push(u)}n=l}for(;typeof n=="function";)n=n();if(t===n)return n;const o=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,o==="string"||o==="number"){if(s||o==="number"&&(t=t.toString(),t===n))return n;if(a){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=Qi(e,n,r,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||o==="boolean"){if(s)return n;n=Qi(e,n,r)}else{if(o==="function")return xe(()=>{let l=t();for(;typeof l=="function";)l=l();n=Wo(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],c=n&&Array.isArray(n);if(dd(l,t,n,i))return xe(()=>n=Wo(e,l,n,r,!0)),()=>n;if(s){if(!l.length)return n;if(r===void 0)return n=[...e.childNodes];let u=l[0];if(u.parentNode!==e)return n;const d=[u];for(;(u=u.nextSibling)!==r;)d.push(u);return n=d}if(l.length===0){if(n=Qi(e,n,r),a)return n}else c?n.length===0?Wh(e,l,r):I3(e,n,l):(n&&Qi(e),Wh(e,l));n=l}else if(t.nodeType){if(s&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=Qi(e,n,r,t);Qi(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function dd(e,t,n,r){let i=!1;for(let s=0,o=t.length;s<o;s++){let a=t[s],l=n&&n[e.length],c;if(!(a==null||a===!0||a===!1))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))i=dd(e,a,l)||i;else if(c==="function")if(r){for(;typeof a=="function";)a=a();i=dd(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||i}else e.push(a),i=!0;else{const u=String(a);l&&l.nodeType===3&&l.data===u?e.push(l):e.push(document.createTextNode(u))}}return i}function Wh(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Qi(e,t,n,r){if(n===void 0)return e.textContent="";const i=r||document.createTextNode("");if(t.length){let s=!1;for(let o=t.length-1;o>=0;o--){const a=t[o];if(i!==a){const l=a.parentNode===e;!s&&!o?l?e.replaceChild(i,a):e.insertBefore(i,n):l&&a.remove()}else s=!0}}else e.insertBefore(i,n);return[i]}function G3(){return Ee.getNextContextId()}var K3="http://www.w3.org/2000/svg";function Zp(e,t=!1){return t?document.createElementNS(K3,e):document.createElement(e)}function Jp(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,i=Gh();let s,o=!!Ee.context;return we(()=>{o&&(Gh().user=o=!1),s||(s=d3(i,()=>U(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[l,c]=se(!1),u=()=>c(!0);yr(d=>V(a,()=>l()?d():s(),null)),Ce(u)}else{const l=Zp(e.isSVG?"g":"div",e.isSVG),c=t&&l.attachShadow?l.attachShadow({mode:"open"}):l;Object.defineProperty(l,"_$host",{get(){return n.parentNode},configurable:!0}),V(c,s),a.appendChild(l),e.ref&&e.ref(l),Ce(()=>a.removeChild(l))}},void 0,{render:!o}),n}function V3(e,t){const n=U(e);return U(()=>{const r=n();switch(typeof r){case"function":return lt(()=>r(t));case"string":const i=D3.has(r),s=Ee.context?H3():Zp(r,i);return Yp(s,t,i),s}})}function W3(e){const[,t]=Ve(e,["component"]);return V3(()=>e.component,t)}var Q3=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},ev=class{constructor(t){this.generateIdentifier=t,this.kv=new Q3}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}},Y3=class extends ev{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t=="object"?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};function X3(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function Z3(e,t){const n=X3(e);if("find"in n)return n.find(t);const r=n;for(let i=0;i<r.length;i++){const s=r[i];if(t(s))return s}}function qs(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function Pl(e,t){return e.indexOf(t)!==-1}function Qh(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}var J3=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return Z3(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}},eS=e=>Object.prototype.toString.call(e).slice(8,-1),tv=e=>typeof e=="undefined",tS=e=>e===null,Qo=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,fd=e=>Qo(e)&&Object.keys(e).length===0,Qr=e=>Array.isArray(e),nS=e=>typeof e=="string",rS=e=>typeof e=="number"&&!isNaN(e),iS=e=>typeof e=="boolean",sS=e=>e instanceof RegExp,Yo=e=>e instanceof Map,Xo=e=>e instanceof Set,nv=e=>eS(e)==="Symbol",oS=e=>e instanceof Date&&!isNaN(e.valueOf()),aS=e=>e instanceof Error,Yh=e=>typeof e=="number"&&isNaN(e),lS=e=>iS(e)||tS(e)||tv(e)||rS(e)||nS(e)||nv(e),cS=e=>typeof e=="bigint",uS=e=>e===1/0||e===-1/0,dS=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),fS=e=>e instanceof URL,rv=e=>e.replace(/\./g,"\\."),cu=e=>e.map(String).map(rv).join("."),Bo=e=>{const t=[];let n="";for(let i=0;i<e.length;i++){let s=e.charAt(i);if(s==="\\"&&e.charAt(i+1)==="."){n+=".",i++;continue}if(s==="."){t.push(n),n="";continue}n+=s}const r=n;return t.push(r),t};function Rn(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var iv=[Rn(tv,"undefined",()=>null,()=>{}),Rn(cS,"bigint",e=>e.toString(),e=>typeof BigInt!="undefined"?BigInt(e):e),Rn(oS,"Date",e=>e.toISOString(),e=>new Date(e)),Rn(aS,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n}),Rn(sS,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),Rn(Xo,"set",e=>[...e.values()],e=>new Set(e)),Rn(Yo,"map",e=>[...e.entries()],e=>new Map(e)),Rn(e=>Yh(e)||uS(e),"number",e=>Yh(e)?"NaN":e>0?"Infinity":"-Infinity",Number),Rn(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),Rn(fS,"URL",e=>e.toString(),e=>new URL(e))];function Cc(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var sv=Cc((e,t)=>nv(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),hS=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),ov=Cc(dS,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=hS[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function av(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var lv=Cc(av,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const r={};return n.forEach(i=>{r[i]=e[i]}),r},(e,t,n)=>{const r=n.classRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(r.prototype),e)}),cv=Cc((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),gS=[lv,sv,cv,ov],Xh=(e,t)=>{const n=Qh(gS,i=>i.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=Qh(iv,i=>i.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},uv={};iv.forEach(e=>{uv[e.annotation]=e});var yS=(e,t,n)=>{if(Qr(t))switch(t[0]){case"symbol":return sv.untransform(e,t,n);case"class":return lv.untransform(e,t,n);case"custom":return cv.untransform(e,t,n);case"typed-array":return ov.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=uv[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}},is=(e,t)=>{const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function dv(e){if(Pl(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Pl(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Pl(e,"constructor"))throw new Error("constructor is not allowed as a property")}var mS=(e,t)=>{dv(t);for(let n=0;n<t.length;n++){const r=t[n];if(Xo(e))e=is(e,+r);else if(Yo(e)){const i=+r,s=+t[++n]==0?"key":"value",o=is(e,i);switch(s){case"key":e=o;break;case"value":e=e.get(o);break}}else e=e[r]}return e},hd=(e,t,n)=>{if(dv(t),t.length===0)return n(e);let r=e;for(let s=0;s<t.length-1;s++){const o=t[s];if(Qr(r)){const a=+o;r=r[a]}else if(Qo(r))r=r[o];else if(Xo(r)){const a=+o;r=is(r,a)}else if(Yo(r)){if(s===t.length-2)break;const l=+o,c=+t[++s]==0?"key":"value",u=is(r,l);switch(c){case"key":r=u;break;case"value":r=r.get(u);break}}}const i=t[t.length-1];if(Qr(r)?r[+i]=n(r[+i]):Qo(r)&&(r[i]=n(r[i])),Xo(r)){const s=is(r,+i),o=n(s);s!==o&&(r.delete(s),r.add(o))}if(Yo(r)){const s=+t[t.length-2],o=is(r,s);switch(+i==0?"key":"value"){case"key":{const l=n(o);r.set(l,r.get(o)),l!==o&&r.delete(o);break}case"value":{r.set(o,n(r.get(o)));break}}}return e};function gd(e,t,n=[]){if(!e)return;if(!Qr(e)){qs(e,(s,o)=>gd(s,t,[...n,...Bo(o)]));return}const[r,i]=e;i&&qs(i,(s,o)=>{gd(s,t,[...n,...Bo(o)])}),t(r,n)}function pS(e,t,n){return gd(t,(r,i)=>{e=hd(e,i,s=>yS(s,r,n))}),e}function vS(e,t){function n(r,i){const s=mS(e,Bo(i));r.map(Bo).forEach(o=>{e=hd(e,o,()=>s)})}if(Qr(t)){const[r,i]=t;r.forEach(s=>{e=hd(e,Bo(s),()=>e)}),i&&qs(i,n)}else qs(t,n);return e}var bS=(e,t)=>Qo(e)||Qr(e)||Yo(e)||Xo(e)||av(e,t);function xS(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function wS(e,t){const n={};let r;return e.forEach(i=>{if(i.length<=1)return;t||(i=i.map(a=>a.map(String)).sort((a,l)=>a.length-l.length));const[s,...o]=i;s.length===0?r=o.map(cu):n[cu(s)]=o.map(cu)}),r?fd(n)?[r]:[r,n]:fd(n)?void 0:n}var fv=(e,t,n,r,i=[],s=[],o=new Map)=>{var h;const a=lS(e);if(!a){xS(e,i,t);const g=o.get(e);if(g)return r?{transformedValue:null}:g}if(!bS(e,n)){const g=Xh(e,n),m=g?{transformedValue:g.value,annotations:[g.type]}:{transformedValue:e};return a||o.set(e,m),m}if(Pl(s,e))return{transformedValue:null};const l=Xh(e,n),c=(h=l==null?void 0:l.value)!=null?h:e,u=Qr(c)?[]:{},d={};qs(c,(g,m)=>{if(m==="__proto__"||m==="constructor"||m==="prototype")throw new Error(`Detected property ${m}. This is a prototype pollution risk, please remove it from your object.`);const p=fv(g,t,n,r,[...i,m],[...s,e],o);u[m]=p.transformedValue,Qr(p.annotations)?d[m]=p.annotations:Qo(p.annotations)&&qs(p.annotations,(v,b)=>{d[rv(m)+"."+b]=v})});const f=fd(d)?{transformedValue:u,annotations:l?[l.type]:void 0}:{transformedValue:u,annotations:l?[l.type,d]:d};return a||o.set(e,f),f};function hv(e){return Object.prototype.toString.call(e).slice(8,-1)}function Zh(e){return hv(e)==="Array"}function SS(e){if(hv(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function CS(e,t,n,r,i){const s={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";s==="enumerable"&&(e[t]=n),i&&s==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function yd(e,t={}){if(Zh(e))return e.map(i=>yd(i,t));if(!SS(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((i,s)=>{if(Zh(t.props)&&!t.props.includes(s))return i;const o=e[s],a=yd(o,t);return CS(i,s,a,e,t.nonenumerable),i},{})}var Je=class{constructor({dedupe:e=!1}={}){this.classRegistry=new Y3,this.symbolRegistry=new ev(t=>{var n;return(n=t.description)!=null?n:""}),this.customTransformerRegistry=new J3,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=fv(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});const i=wS(t,this.dedupe);return i&&(r.meta={...r.meta,referentialEqualities:i}),r}deserialize(e){const{json:t,meta:n}=e;let r=yd(t);return n!=null&&n.values&&(r=pS(r,n.values,this)),n!=null&&n.referentialEqualities&&(r=vS(r,n.referentialEqualities)),r}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};Je.defaultInstance=new Je;Je.serialize=Je.defaultInstance.serialize.bind(Je.defaultInstance);Je.deserialize=Je.defaultInstance.deserialize.bind(Je.defaultInstance);Je.stringify=Je.defaultInstance.stringify.bind(Je.defaultInstance);Je.parse=Je.defaultInstance.parse.bind(Je.defaultInstance);Je.registerClass=Je.defaultInstance.registerClass.bind(Je.defaultInstance);Je.registerSymbol=Je.defaultInstance.registerSymbol.bind(Je.defaultInstance);Je.registerCustom=Je.defaultInstance.registerCustom.bind(Je.defaultInstance);Je.allowErrorProps=Je.defaultInstance.allowErrorProps.bind(Je.defaultInstance);var gv=Je.serialize,_S=Je.stringify;function es(e){return e.state.fetchStatus==="fetching"?"fetching":e.getObserversCount()?e.state.fetchStatus==="paused"?"paused":e.isStale()?"stale":"fresh":"inactive"}function kS(e,t){return`${e}${t.charAt(0).toUpperCase()+t.slice(1)}`}function OS({queryState:e,observerCount:t,isStale:n}){return e.fetchStatus==="fetching"?"blue":t?e.fetchStatus==="paused"?"purple":n?"yellow":"green":"gray"}function ss({status:e,isPaused:t}){return t?"purple":e==="error"?"red":e==="pending"?"yellow":e==="success"?"green":"gray"}function ES(e){return e==="fresh"?"green":e==="stale"?"yellow":e==="paused"?"purple":e==="inactive"?"gray":"blue"}var Vl=(e,t=!1)=>{const{json:n}=gv(e);return JSON.stringify(n,null,t?2:void 0)},nl=e=>e.state.fetchStatus!=="idle"?0:e.getObserversCount()?e.isStale()?2:1:3,AS=(e,t)=>e.queryHash.localeCompare(t.queryHash),yv=(e,t)=>e.state.dataUpdatedAt<t.state.dataUpdatedAt?1:-1,PS=(e,t)=>nl(e)===nl(t)?yv(e,t):nl(e)>nl(t)?1:-1,md={status:PS,"query hash":AS,"last updated":yv},rl=e=>e.state.isPaused?0:e.state.status==="error"?2:e.state.status==="pending"?1:3,mv=(e,t)=>e.state.submittedAt<t.state.submittedAt?1:-1,TS=(e,t)=>rl(e)===rl(t)?mv(e,t):rl(e)>rl(t)?1:-1,pd={status:TS,"last updated":mv},Jh=e=>e*parseFloat(getComputedStyle(document.documentElement).fontSize),pv=()=>{const[e,t]=se("dark");return br(()=>{const n=window.matchMedia("(prefers-color-scheme: dark)");t(n.matches?"dark":"light");const r=i=>{t(i.matches?"dark":"light")};n.addEventListener("change",r),Ce(()=>n.removeEventListener("change",r))}),e},gi=(e,t,n)=>{if(t.length===0)return n;if(e instanceof Map){const r=new Map(e);if(t.length===1)return r.set(t[0],n),r;const[i,...s]=t;return r.set(i,gi(r.get(i),s,n)),r}if(e instanceof Set){const r=gi(Array.from(e),t,n);return new Set(r)}if(Array.isArray(e)){const r=[...e];if(t.length===1)return r[t[0]]=n,r;const[i,...s]=t;return r[i]=gi(r[i],s,n),r}if(e instanceof Object){const r={...e};if(t.length===1)return r[t[0]]=n,r;const[i,...s]=t;return r[i]=gi(r[i],s,n),r}return e},Po=(e,t)=>{if(e instanceof Map){const n=new Map(e);if(t.length===1)return n.delete(t[0]),n;const[r,...i]=t;return n.set(r,Po(n.get(r),i)),n}if(e instanceof Set){const n=Po(Array.from(e),t);return new Set(n)}if(Array.isArray(e)){const n=[...e];if(t.length===1)return n.filter((s,o)=>o.toString()!==t[0]);const[r,...i]=t;return n[r]=Po(n[r],i),n}if(e instanceof Object){const n={...e};if(t.length===1)return delete n[t[0]],n;const[r,...i]=t;return n[r]=Po(n[r],i),n}return e},vv=(e,t)=>{if(!e||document.querySelector("#_goober")||(t==null?void 0:t.querySelector("#_goober")))return;const r=document.createElement("style"),i=document.createTextNode("");r.appendChild(i),r.id="_goober",r.setAttribute("nonce",e),t?t.appendChild(r):document.head.appendChild(r)},Cs,_a,ka,Oa,Oi,Ea,_s,ks,Os,Es,As,Ps,Aa,op,MS=(op=class{constructor(e){ae(this,Cs);ae(this,_a);ae(this,ka);ae(this,Oa);ae(this,Oi,!1);ae(this,Ea);ae(this,_s);ae(this,ks);ae(this,Os);ae(this,Es);ae(this,As);ae(this,Ps);ae(this,Aa);const{client:t,queryFlavor:n,version:r,onlineManager:i,buttonPosition:s,position:o,initialIsOpen:a,errorTypes:l,styleNonce:c,shadowDOMTarget:u}=e;Z(this,Cs,se(t)),Z(this,ka,n),Z(this,Oa,r),Z(this,_a,i),Z(this,Ea,c),Z(this,_s,u),Z(this,ks,se(s)),Z(this,Os,se(o)),Z(this,Es,se(a)),Z(this,As,se(l))}setButtonPosition(e){M(this,ks)[1](e)}setPosition(e){M(this,Os)[1](e)}setInitialIsOpen(e){M(this,Es)[1](e)}setErrorTypes(e){M(this,As)[1](e)}setClient(e){M(this,Cs)[1](e)}mount(e){if(M(this,Oi))throw new Error("Devtools is already mounted");const t=Wp(()=>{const n=this,[r]=M(this,ks),[i]=M(this,Os),[s]=M(this,Es),[o]=M(this,As),[a]=M(this,Cs);let l;return M(this,Ps)?l=M(this,Ps):(l=Kp(()=>Promise.resolve().then(()=>sD)),Z(this,Ps,l)),vv(M(this,Ea),M(this,_s)),D(l,Ae({get queryFlavor(){return M(n,ka)},get version(){return M(n,Oa)},get onlineManager(){return M(n,_a)},get shadowDOMTarget(){return M(n,_s)}},{get client(){return a()},get buttonPosition(){return r()},get position(){return i()},get initialIsOpen(){return s()},get errorTypes(){return o()}}))},e);Z(this,Oi,!0),Z(this,Aa,t)}unmount(){var e;if(!M(this,Oi))throw new Error("Devtools is not mounted");(e=M(this,Aa))==null||e.call(this),Z(this,Oi,!1)}},Cs=new WeakMap,_a=new WeakMap,ka=new WeakMap,Oa=new WeakMap,Oi=new WeakMap,Ea=new WeakMap,_s=new WeakMap,ks=new WeakMap,Os=new WeakMap,Es=new WeakMap,As=new WeakMap,Ps=new WeakMap,Aa=new WeakMap,op),Ts,Pa,Ta,Ma,Ei,ja,Ms,js,$s,Ds,Ls,Is,Rs,$a,ap,jS=(ap=class{constructor(e){ae(this,Ts);ae(this,Pa);ae(this,Ta);ae(this,Ma);ae(this,Ei,!1);ae(this,ja);ae(this,Ms);ae(this,js);ae(this,$s);ae(this,Ds);ae(this,Ls);ae(this,Is);ae(this,Rs);ae(this,$a);const{client:t,queryFlavor:n,version:r,onlineManager:i,buttonPosition:s,position:o,initialIsOpen:a,errorTypes:l,styleNonce:c,shadowDOMTarget:u,onClose:d}=e;Z(this,Ts,se(t)),Z(this,Ta,n),Z(this,Ma,r),Z(this,Pa,i),Z(this,ja,c),Z(this,Ms,u),Z(this,js,se(s)),Z(this,$s,se(o)),Z(this,Ds,se(a)),Z(this,Ls,se(l)),Z(this,Is,se(d))}setButtonPosition(e){M(this,js)[1](e)}setPosition(e){M(this,$s)[1](e)}setInitialIsOpen(e){M(this,Ds)[1](e)}setErrorTypes(e){M(this,Ls)[1](e)}setClient(e){M(this,Ts)[1](e)}setOnClose(e){M(this,Is)[1](()=>e)}mount(e){if(M(this,Ei))throw new Error("Devtools is already mounted");const t=Wp(()=>{const n=this,[r]=M(this,js),[i]=M(this,$s),[s]=M(this,Ds),[o]=M(this,Ls),[a]=M(this,Ts),[l]=M(this,Is);let c;return M(this,Rs)?c=M(this,Rs):(c=Kp(()=>Promise.resolve().then(()=>lD)),Z(this,Rs,c)),vv(M(this,ja),M(this,Ms)),D(c,Ae({get queryFlavor(){return M(n,Ta)},get version(){return M(n,Ma)},get onlineManager(){return M(n,Pa)},get shadowDOMTarget(){return M(n,Ms)}},{get client(){return a()},get buttonPosition(){return r()},get position(){return i()},get initialIsOpen(){return s()},get errorTypes(){return o()},get onClose(){return l()}}))},e);Z(this,Ei,!0),Z(this,$a,t)}unmount(){var e;if(!M(this,Ei))throw new Error("Devtools is not mounted");(e=M(this,$a))==null||e.call(this),Z(this,Ei,!1)}},Ts=new WeakMap,Pa=new WeakMap,Ta=new WeakMap,Ma=new WeakMap,Ei=new WeakMap,ja=new WeakMap,Ms=new WeakMap,js=new WeakMap,$s=new WeakMap,Ds=new WeakMap,Ls=new WeakMap,Is=new WeakMap,Rs=new WeakMap,$a=new WeakMap,ap);function $S(e){const t=Ut(e.client),n=L.useRef(null),{buttonPosition:r,position:i,initialIsOpen:s,errorTypes:o,styleNonce:a,shadowDOMTarget:l}=e,[c]=L.useState(new MS({client:t,queryFlavor:"React Query",version:"5",onlineManager:Bs,buttonPosition:r,position:i,initialIsOpen:s,errorTypes:o,styleNonce:a,shadowDOMTarget:l}));return L.useEffect(()=>{c.setClient(t)},[t,c]),L.useEffect(()=>{r&&c.setButtonPosition(r)},[r,c]),L.useEffect(()=>{i&&c.setPosition(i)},[i,c]),L.useEffect(()=>{c.setInitialIsOpen(s||!1)},[s,c]),L.useEffect(()=>{c.setErrorTypes(o||[])},[o,c]),L.useEffect(()=>(n.current&&c.mount(n.current),()=>{c.unmount()}),[c]),y.jsx("div",{dir:"ltr",className:"tsqd-parent-container",ref:n})}function DS(e){const t=Ut(e.client),n=L.useRef(null),{errorTypes:r,styleNonce:i,shadowDOMTarget:s}=e,[o]=L.useState(new jS({client:t,queryFlavor:"React Query",version:"5",onlineManager:Bs,buttonPosition:"bottom-left",position:"bottom",initialIsOpen:!0,errorTypes:r,styleNonce:i,shadowDOMTarget:s,onClose:e.onClose}));return L.useEffect(()=>{o.setClient(t)},[t,o]),L.useEffect(()=>{var a;o.setOnClose((a=e.onClose)!=null?a:()=>{})},[e.onClose,o]),L.useEffect(()=>{o.setErrorTypes(r||[])},[r,o]),L.useEffect(()=>(n.current&&o.mount(n.current),()=>{o.unmount()}),[o]),y.jsx("div",{style:{height:"500px",...e.style},className:"tsqd-parent-container",ref:n})}var LS=process.env.NODE_ENV!=="development"?function(){return null}:$S;process.env.NODE_ENV;function bv(e,t){return function(){return e.apply(t,arguments)}}const{toString:IS}=Object.prototype,{getPrototypeOf:Sf}=Object,{iterator:_c,toStringTag:xv}=Symbol,kc=(e=>t=>{const n=IS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ln=e=>(e=e.toLowerCase(),t=>kc(t)===e),Oc=e=>t=>typeof t===e,{isArray:Xs}=Array,Zo=Oc("undefined");function RS(e){return e!==null&&!Zo(e)&&e.constructor!==null&&!Zo(e.constructor)&&qt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const wv=Ln("ArrayBuffer");function NS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&wv(e.buffer),t}const FS=Oc("string"),qt=Oc("function"),Sv=Oc("number"),Ec=e=>e!==null&&typeof e=="object",BS=e=>e===!0||e===!1,Tl=e=>{if(kc(e)!=="object")return!1;const t=Sf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(xv in e)&&!(_c in e)},qS=Ln("Date"),zS=Ln("File"),HS=Ln("Blob"),US=Ln("FileList"),GS=e=>Ec(e)&&qt(e.pipe),KS=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||qt(e.append)&&((t=kc(e))==="formdata"||t==="object"&&qt(e.toString)&&e.toString()==="[object FormData]"))},VS=Ln("URLSearchParams"),[WS,QS,YS,XS]=["ReadableStream","Request","Response","Headers"].map(Ln),ZS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ia(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,i;if(typeof e!="object"&&(e=[e]),Xs(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let a;for(r=0;r<o;r++)a=s[r],t.call(null,e[a],a,e)}}function Cv(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const yi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,_v=e=>!Zo(e)&&e!==yi;function vd(){const{caseless:e}=_v(this)&&this||{},t={},n=(r,i)=>{const s=e&&Cv(t,i)||i;Tl(t[s])&&Tl(r)?t[s]=vd(t[s],r):Tl(r)?t[s]=vd({},r):Xs(r)?t[s]=r.slice():t[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Ia(arguments[r],n);return t}const JS=(e,t,n,{allOwnKeys:r}={})=>(Ia(t,(i,s)=>{n&&qt(i)?e[s]=bv(i,n):e[s]=i},{allOwnKeys:r}),e),eC=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),tC=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},nC=(e,t,n,r)=>{let i,s,o;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&Sf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},rC=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},iC=e=>{if(!e)return null;if(Xs(e))return e;let t=e.length;if(!Sv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},sC=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Sf(Uint8Array)),oC=(e,t)=>{const r=(e&&e[_c]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},aC=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},lC=Ln("HTMLFormElement"),cC=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),e0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),uC=Ln("RegExp"),kv=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ia(n,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(r[s]=o||i)}),Object.defineProperties(e,r)},dC=e=>{kv(e,(t,n)=>{if(qt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(qt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},fC=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return Xs(e)?r(e):r(String(e).split(t)),n},hC=()=>{},gC=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function yC(e){return!!(e&&qt(e.append)&&e[xv]==="FormData"&&e[_c])}const mC=e=>{const t=new Array(10),n=(r,i)=>{if(Ec(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const s=Xs(r)?[]:{};return Ia(r,(o,a)=>{const l=n(o,i+1);!Zo(l)&&(s[a]=l)}),t[i]=void 0,s}}return r};return n(e,0)},pC=Ln("AsyncFunction"),vC=e=>e&&(Ec(e)||qt(e))&&qt(e.then)&&qt(e.catch),Ov=((e,t)=>e?setImmediate:t?((n,r)=>(yi.addEventListener("message",({source:i,data:s})=>{i===yi&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),yi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",qt(yi.postMessage)),bC=typeof queueMicrotask!="undefined"?queueMicrotask.bind(yi):typeof process!="undefined"&&process.nextTick||Ov,xC=e=>e!=null&&qt(e[_c]),q={isArray:Xs,isArrayBuffer:wv,isBuffer:RS,isFormData:KS,isArrayBufferView:NS,isString:FS,isNumber:Sv,isBoolean:BS,isObject:Ec,isPlainObject:Tl,isReadableStream:WS,isRequest:QS,isResponse:YS,isHeaders:XS,isUndefined:Zo,isDate:qS,isFile:zS,isBlob:HS,isRegExp:uC,isFunction:qt,isStream:GS,isURLSearchParams:VS,isTypedArray:sC,isFileList:US,forEach:Ia,merge:vd,extend:JS,trim:ZS,stripBOM:eC,inherits:tC,toFlatObject:nC,kindOf:kc,kindOfTest:Ln,endsWith:rC,toArray:iC,forEachEntry:oC,matchAll:aC,isHTMLForm:lC,hasOwnProperty:e0,hasOwnProp:e0,reduceDescriptors:kv,freezeMethods:dC,toObjectSet:fC,toCamelCase:cC,noop:hC,toFiniteNumber:gC,findKey:Cv,global:yi,isContextDefined:_v,isSpecCompliantForm:yC,toJSONObject:mC,isAsyncFn:pC,isThenable:vC,setImmediate:Ov,asap:bC,isIterable:xC};function Pe(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}q.inherits(Pe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.status}}});const Ev=Pe.prototype,Av={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Av[e]={value:e}});Object.defineProperties(Pe,Av);Object.defineProperty(Ev,"isAxiosError",{value:!0});Pe.from=(e,t,n,r,i,s)=>{const o=Object.create(Ev);return q.toFlatObject(e,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Pe.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const wC=null;function bd(e){return q.isPlainObject(e)||q.isArray(e)}function Pv(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function t0(e,t,n){return e?e.concat(t).map(function(i,s){return i=Pv(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function SC(e){return q.isArray(e)&&!e.some(bd)}const CC=q.toFlatObject(q,{},null,function(t){return/^is[A-Z]/.test(t)});function Ac(e,t,n){if(!q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!q.isUndefined(p[m])});const r=n.metaTokens,i=n.visitor||u,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob!="undefined"&&Blob)&&q.isSpecCompliantForm(t);if(!q.isFunction(i))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(q.isDate(g))return g.toISOString();if(q.isBoolean(g))return g.toString();if(!l&&q.isBlob(g))throw new Pe("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(g)||q.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,m,p){let v=g;if(g&&!p&&typeof g=="object"){if(q.endsWith(m,"{}"))m=r?m:m.slice(0,-2),g=JSON.stringify(g);else if(q.isArray(g)&&SC(g)||(q.isFileList(g)||q.endsWith(m,"[]"))&&(v=q.toArray(g)))return m=Pv(m),v.forEach(function(S,C){!(q.isUndefined(S)||S===null)&&t.append(o===!0?t0([m],C,s):o===null?m:m+"[]",c(S))}),!1}return bd(g)?!0:(t.append(t0(p,m,s),c(g)),!1)}const d=[],f=Object.assign(CC,{defaultVisitor:u,convertValue:c,isVisitable:bd});function h(g,m){if(!q.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(g),q.forEach(g,function(v,b){(!(q.isUndefined(v)||v===null)&&i.call(t,v,q.isString(b)?b.trim():b,m,f))===!0&&h(v,m?m.concat(b):[b])}),d.pop()}}if(!q.isObject(e))throw new TypeError("data must be an object");return h(e),t}function n0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Cf(e,t){this._pairs=[],e&&Ac(e,this,t)}const Tv=Cf.prototype;Tv.append=function(t,n){this._pairs.push([t,n])};Tv.toString=function(t){const n=t?function(r){return t.call(this,r,n0)}:n0;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function _C(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Mv(e,t,n){if(!t)return e;const r=n&&n.encode||_C;q.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=q.isURLSearchParams(t)?t.toString():new Cf(t,n).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class r0{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){q.forEach(this.handlers,function(r){r!==null&&t(r)})}}const jv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kC=typeof URLSearchParams!="undefined"?URLSearchParams:Cf,OC=typeof FormData!="undefined"?FormData:null,EC=typeof Blob!="undefined"?Blob:null,AC={isBrowser:!0,classes:{URLSearchParams:kC,FormData:OC,Blob:EC},protocols:["http","https","file","blob","url","data"]},_f=typeof window!="undefined"&&typeof document!="undefined",xd=typeof navigator=="object"&&navigator||void 0,PC=_f&&(!xd||["ReactNative","NativeScript","NS"].indexOf(xd.product)<0),TC=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",MC=_f&&window.location.href||"http://localhost",jC=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_f,hasStandardBrowserEnv:PC,hasStandardBrowserWebWorkerEnv:TC,navigator:xd,origin:MC},Symbol.toStringTag,{value:"Module"})),At={...jC,...AC};function $C(e,t){return Ac(e,new At.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return At.isNode&&q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function DC(e){return q.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function LC(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}function $v(e){function t(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=s>=n.length;return o=!o&&q.isArray(i)?i.length:o,l?(q.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!q.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&q.isArray(i[o])&&(i[o]=LC(i[o])),!a)}if(q.isFormData(e)&&q.isFunction(e.entries)){const n={};return q.forEachEntry(e,(r,i)=>{t(DC(r),i,n,0)}),n}return null}function IC(e,t,n){if(q.isString(e))try{return(t||JSON.parse)(e),q.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ra={transitional:jv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=q.isObject(t);if(s&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return i?JSON.stringify($v(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t)||q.isReadableStream(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return $C(t,this.formSerializer).toString();if((a=q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ac(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),IC(t)):t}],transformResponse:[function(t){const n=this.transitional||Ra.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(q.isResponse(t)||q.isReadableStream(t))return t;if(t&&q.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?Pe.from(a,Pe.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:At.classes.FormData,Blob:At.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],e=>{Ra.headers[e]={}});const RC=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),NC=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
13
|
-
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&
|
|
14
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[i0]=this[i0]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=uo(o);r[a]||(zC(i,o),r[a]=!0)}return q.isArray(t)?t.forEach(s):s(t),this}};zt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.reduceDescriptors(zt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});q.freezeMethods(zt);function du(e,t){const n=this||Ra,r=t||n,i=zt.from(r.headers);let s=r.data;return q.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Dv(e){return!!(e&&e.__CANCEL__)}function Zs(e,t,n){Pe.call(this,e==null?"canceled":e,Pe.ERR_CANCELED,t,n),this.name="CanceledError"}q.inherits(Zs,Pe,{__CANCEL__:!0});function Lv(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Pe("Request failed with status code "+n.status,[Pe.ERR_BAD_REQUEST,Pe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function HC(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function UC(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[s];o||(o=c),n[i]=l,r[i]=c;let d=s,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const h=u&&c-u;return h?Math.round(f*1e3/h):void 0}}function GC(e,t){let n=0,r=1e3/t,i,s;const o=(c,u=Date.now())=>{n=u,i=null,s&&(clearTimeout(s),s=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?o(c,u):(i=c,s||(s=setTimeout(()=>{s=null,o(i)},r-d)))},()=>i&&o(i)]}const Wl=(e,t,n=3)=>{let r=0;const i=UC(50,250);return GC(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,c=i(l),u=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-o)/c:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},s0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},o0=e=>(...t)=>q.asap(()=>e(...t)),KC=At.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,At.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(At.origin),At.navigator&&/(msie|trident)/i.test(At.navigator.userAgent)):()=>!0,VC=At.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const o=[e+"="+encodeURIComponent(t)];q.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),q.isString(r)&&o.push("path="+r),q.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function WC(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function QC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Iv(e,t,n){let r=!WC(t);return e&&(r||n==!1)?QC(e,t):t}const a0=e=>e instanceof zt?{...e}:e;function $i(e,t){t=t||{};const n={};function r(c,u,d,f){return q.isPlainObject(c)&&q.isPlainObject(u)?q.merge.call({caseless:f},c,u):q.isPlainObject(u)?q.merge({},u):q.isArray(u)?u.slice():u}function i(c,u,d,f){if(q.isUndefined(u)){if(!q.isUndefined(c))return r(void 0,c,d,f)}else return r(c,u,d,f)}function s(c,u){if(!q.isUndefined(u))return r(void 0,u)}function o(c,u){if(q.isUndefined(u)){if(!q.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,u,d)=>i(a0(c),a0(u),d,!0)};return q.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||i,f=d(e[u],t[u],u);q.isUndefined(f)&&d!==a||(n[u]=f)}),n}const Rv=e=>{const t=$i({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;t.headers=o=zt.from(o),t.url=Mv(Iv(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(q.isFormData(n)){if(At.hasStandardBrowserEnv||At.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...u].join("; "))}}if(At.hasStandardBrowserEnv&&(r&&q.isFunction(r)&&(r=r(t)),r||r!==!1&&KC(t.url))){const c=i&&s&&VC.read(s);c&&o.set(i,c)}return t},YC=typeof XMLHttpRequest!="undefined",XC=YC&&function(e){return new Promise(function(n,r){const i=Rv(e);let s=i.data;const o=zt.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=i,u,d,f,h,g;function m(){h&&h(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let p=new XMLHttpRequest;p.open(i.method.toUpperCase(),i.url,!0),p.timeout=i.timeout;function v(){if(!p)return;const S=zt.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),x={data:!a||a==="text"||a==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:S,config:e,request:p};Lv(function(w){n(w),m()},function(w){r(w),m()},x),p=null}"onloadend"in p?p.onloadend=v:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(v)},p.onabort=function(){p&&(r(new Pe("Request aborted",Pe.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new Pe("Network Error",Pe.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let C=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const x=i.transitional||jv;i.timeoutErrorMessage&&(C=i.timeoutErrorMessage),r(new Pe(C,x.clarifyTimeoutError?Pe.ETIMEDOUT:Pe.ECONNABORTED,e,p)),p=null},s===void 0&&o.setContentType(null),"setRequestHeader"in p&&q.forEach(o.toJSON(),function(C,x){p.setRequestHeader(x,C)}),q.isUndefined(i.withCredentials)||(p.withCredentials=!!i.withCredentials),a&&a!=="json"&&(p.responseType=i.responseType),c&&([f,g]=Wl(c,!0),p.addEventListener("progress",f)),l&&p.upload&&([d,h]=Wl(l),p.upload.addEventListener("progress",d),p.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(u=S=>{p&&(r(!S||S.type?new Zs(null,e,p):S),p.abort(),p=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const b=HC(i.url);if(b&&At.protocols.indexOf(b)===-1){r(new Pe("Unsupported protocol "+b+":",Pe.ERR_BAD_REQUEST,e));return}p.send(s||null)})},ZC=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const s=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;r.abort(u instanceof Pe?u:new Zs(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,s(new Pe(`timeout ${t} of ms exceeded`,Pe.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>q.asap(a),l}},JC=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},e4=async function*(e,t){for await(const n of t4(e))yield*JC(n,t)},t4=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},l0=(e,t,n,r)=>{const i=e4(e,t);let s=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){a(),l.close();return}let d=u.byteLength;if(n){let f=s+=d;n(f)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},Pc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Nv=Pc&&typeof ReadableStream=="function",n4=Pc&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Fv=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},r4=Nv&&Fv(()=>{let e=!1;const t=new Request(At.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),c0=64*1024,wd=Nv&&Fv(()=>q.isReadableStream(new Response("").body)),Ql={stream:wd&&(e=>e.body)};Pc&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ql[t]&&(Ql[t]=q.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Pe(`Response type '${t}' is not supported`,Pe.ERR_NOT_SUPPORT,r)})})})(new Response);const i4=async e=>{if(e==null)return 0;if(q.isBlob(e))return e.size;if(q.isSpecCompliantForm(e))return(await new Request(At.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(q.isArrayBufferView(e)||q.isArrayBuffer(e))return e.byteLength;if(q.isURLSearchParams(e)&&(e=e+""),q.isString(e))return(await n4(e)).byteLength},s4=async(e,t)=>{const n=q.toFiniteNumber(e.getContentLength());return n==null?i4(t):n},o4=Pc&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=Rv(e);c=c?(c+"").toLowerCase():"text";let h=ZC([i,s&&s.toAbortSignal()],o),g;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let p;try{if(l&&r4&&n!=="get"&&n!=="head"&&(p=await s4(u,r))!==0){let x=new Request(t,{method:"POST",body:r,duplex:"half"}),k;if(q.isFormData(r)&&(k=x.headers.get("content-type"))&&u.setContentType(k),x.body){const[w,_]=s0(p,Wl(o0(l)));r=l0(x.body,c0,w,_)}}q.isString(d)||(d=d?"include":"omit");const v="credentials"in Request.prototype;g=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:v?d:void 0});let b=await fetch(g,f);const S=wd&&(c==="stream"||c==="response");if(wd&&(a||S&&m)){const x={};["status","statusText","headers"].forEach(O=>{x[O]=b[O]});const k=q.toFiniteNumber(b.headers.get("content-length")),[w,_]=a&&s0(k,Wl(o0(a),!0))||[];b=new Response(l0(b.body,c0,w,()=>{_&&_(),m&&m()}),x)}c=c||"text";let C=await Ql[q.findKey(Ql,c)||"text"](b,e);return!S&&m&&m(),await new Promise((x,k)=>{Lv(x,k,{data:C,headers:zt.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:g})})}catch(v){throw m&&m(),v&&v.name==="TypeError"&&/Load failed|fetch/i.test(v.message)?Object.assign(new Pe("Network Error",Pe.ERR_NETWORK,e,g),{cause:v.cause||v}):Pe.from(v,v&&v.code,e,g)}}),Sd={http:wC,xhr:XC,fetch:o4};q.forEach(Sd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const u0=e=>`- ${e}`,a4=e=>q.isFunction(e)||e===null||e===!1,Bv={getAdapter:e=>{e=q.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let s=0;s<t;s++){n=e[s];let o;if(r=n,!a4(n)&&(r=Sd[(o=String(n)).toLowerCase()],r===void 0))throw new Pe(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+s]=r}if(!r){const s=Object.entries(i).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?s.length>1?`since :
|
|
15
|
-
`+s.map(
|
|
16
|
-
`):" "+
|
|
17
|
-
`+s):r.stack=s}catch(o){}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=$i(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&jl.assertOptions(r,{silentJSONParsing:Nn.transitional(Nn.boolean),forcedJSONParsing:Nn.transitional(Nn.boolean),clarifyTimeoutError:Nn.transitional(Nn.boolean)},!1),i!=null&&(q.isFunction(i)?n.paramsSerializer={serialize:i}:jl.assertOptions(i,{encode:Nn.function,serialize:Nn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),jl.assertOptions(n,{baseUrl:Nn.spelling("baseURL"),withXsrfToken:Nn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&q.merge(s.common,s[n.method]);s&&q.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),n.headers=zt.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,f;if(!l){const g=[d0.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,c),f=g.length,u=Promise.resolve(n);d<f;)u=u.then(g[d++],g[d++]);return u}f=a.length;let h=n;for(d=0;d<f;){const g=a[d++],m=a[d++];try{h=g(h)}catch(p){m.call(this,p);break}}try{u=d0.call(this,h)}catch(g){return Promise.reject(g)}for(d=0,f=c.length;d<f;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=$i(this.defaults,t);const n=Iv(t.baseURL,t.url,t.allowAbsoluteUrls);return Mv(n,t.params,t.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(t){Ai.prototype[t]=function(n,r){return this.request($i(r||{},{method:t,url:n,data:(r||{}).data}))}});q.forEach(["post","put","patch"],function(t){function n(r){return function(s,o,a){return this.request($i(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Ai.prototype[t]=n(),Ai.prototype[t+"Form"]=n(!0)});let c4=class zv{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,a){r.reason||(r.reason=new Zs(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new zv(function(i){t=i}),cancel:t}}};function u4(e){return function(n){return e.apply(null,n)}}function d4(e){return q.isObject(e)&&e.isAxiosError===!0}const Cd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Cd).forEach(([e,t])=>{Cd[t]=e});function Hv(e){const t=new Ai(e),n=bv(Ai.prototype.request,t);return q.extend(n,Ai.prototype,t,{allOwnKeys:!0}),q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Hv($i(e,i))},n}const st=Hv(Ra);st.Axios=Ai;st.CanceledError=Zs;st.CancelToken=c4;st.isCancel=Dv;st.VERSION=qv;st.toFormData=Ac;st.AxiosError=Pe;st.Cancel=st.CanceledError;st.all=function(t){return Promise.all(t)};st.spread=u4;st.isAxiosError=d4;st.mergeConfig=$i;st.AxiosHeaders=zt;st.formToJSON=e=>$v(q.isHTMLForm(e)?new FormData(e):e);st.getAdapter=Bv.getAdapter;st.HttpStatusCode=Cd;st.default=st;const{Axios:YL,AxiosError:XL,CanceledError:ZL,isCancel:JL,CancelToken:eI,VERSION:tI,all:nI,Cancel:rI,isAxiosError:iI,spread:sI,toFormData:oI,AxiosHeaders:aI,HttpStatusCode:lI,formToJSON:cI,getAdapter:uI,mergeConfig:dI}=st,f4={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};function Jo(e){"@babel/helpers - typeof";return Jo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jo(e)}function Dt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,g,m,p){var v=g&&g.prototype instanceof a?g:a,b=Object.create(v.prototype);return Wt(b,"_invoke",function(S,C,x){var k,w,_,O=0,E=x||[],j=!1,$={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(A,T){return k=A,w=0,_=e,$.n=T,o}};function B(R,A){for(w=R,_=A,t=0;!j&&O&&!T&&t<E.length;t++){var T,I=E[t],G=$.p,X=I[2];R>3?(T=X===A)&&(_=I[(w=I[4])?5:(w=3,3)],I[4]=I[5]=e):I[0]<=G&&((T=R<2&&G<I[1])?(w=0,$.v=A,$.n=I[1]):G<X&&(T=R<3||I[0]>A||A>X)&&(I[4]=R,I[5]=A,$.n=X,w=0))}if(T||R>1)return o;throw j=!0,A}return function(R,A,T){if(O>1)throw TypeError("Generator is already running");for(j&&A===1&&B(A,T),w=A,_=T;(t=w<2?e:_)||!j;){k||(w?w<3?(w>1&&($.n=-1),B(w,_)):$.n=_:$.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(j=$.n<0)?_:S.call(C,$))!==o)break}catch(I){k=e,w=1,_=I}finally{O=1}}return{value:t,done:j}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(Wt(t={},r,function(){return this}),t),d=c.prototype=a.prototype=Object.create(u);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,Wt(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=c,Wt(d,"constructor",c),Wt(c,"constructor",l),l.displayName="GeneratorFunction",Wt(c,i,"GeneratorFunction"),Wt(d),Wt(d,i,"Generator"),Wt(d,r,function(){return this}),Wt(d,"toString",function(){return"[object Generator]"}),(Dt=function(){return{w:s,m:f}})()}function Wt(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Wt=function(o,a,l,c){if(a)i?i(o,a,{value:l,enumerable:!c,configurable:!c,writable:!c}):o[a]=l;else{var u=function(f,h){Wt(o,f,function(g){return this._invoke(f,h,g)})};u("next",0),u("throw",1),u("return",2)}},Wt(e,t,n,r)}function h0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h0(Object(n),!0).forEach(function(r){h4(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function h4(e,t,n){return(t=g4(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g4(e){var t=y4(e,"string");return Jo(t)=="symbol"?t:t+""}function y4(e,t){if(Jo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function g0(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(c){return void n(c)}a.done?t(l):Promise.resolve(l).then(r,i)}function Di(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){g0(s,r,i,o,a,"next",l)}function a(l){g0(s,r,i,o,a,"throw",l)}o(void 0)})}}var Uv=function(){var t;return((t=f4)===null||t===void 0?void 0:t.VITE_MYYOAST_ACCESS_TOKEN)||""};function y0(e){var t;if(typeof document!="undefined"){var n="; ".concat(document.cookie),r=n.split("; ".concat(e,"="));if(r.length===2)return(t=r.pop())===null||t===void 0?void 0:t.split(";").shift()}}var m4="yst-insights-token",Js=st.create({withCredentials:!0});Js.interceptors.request.use(function(){var e=Di(Dt().m(function t(n){var r,i;return Dt().w(function(s){for(;;)switch(s.n){case 0:return s.n=1,v4();case 1:return r=s.v,s.n=2,Kv();case 2:return i=s.v,n.headers=Pi(Pi(Pi({},n.headers||{}),i?{"X-XSRF-TOKEN":i}:{}),r?{Authorization:"Bearer ".concat(r)}:{}),s.a(2,n)}},t)}));return function(t){return e.apply(this,arguments)}}(),function(e){return Promise.reject(e)},{synchronous:!1});Js.interceptors.response.use(function(e){return e},function(){var e=Di(Dt().m(function t(n){var r;return Dt().w(function(i){for(;;)switch(i.n){case 0:return n==null||(r=n.response)===null||r===void 0||r.status,i.a(2,Promise.reject(n))}},t)}));return function(t){return e.apply(this,arguments)}}());function St(e){return _d.apply(this,arguments)}function _d(){return _d=Di(Dt().m(function e(t){var n;return Dt().w(function(r){for(;;)switch(r.n){case 0:return n=Pi({},t),delete n.baseURL,r.a(2,Js.request(Pi(Pi({},n),{},{withCredentials:!0})))}},e)})),_d.apply(this,arguments)}function Gv(e){Js.defaults.baseURL=e}function m0(){return Js.defaults.baseURL}function p4(e){Uv=e}var fo=null;function v4(){return kd.apply(this,arguments)}function kd(){return kd=Di(Dt().m(function e(){var t,n,r,i,s;return Dt().w(function(o){for(;;)switch(o.p=o.n){case 0:if(t=Uv(),n=Js.defaults.baseURL,r=b4(t,n),i=sessionStorage.getItem(r),!i){o.n=4;break}if(o.p=1,s=JSON.parse(i),!((s==null?void 0:s.validUntil)>Date.now()&&s.value)){o.n=2;break}return o.a(2,String(s.value));case 2:o.n=4;break;case 3:o.p=3,o.v;case 4:if(!fo){o.n=5;break}return o.a(2,fo);case 5:return fo=Di(Dt().m(function a(){var l,c,u,d,f;return Dt().w(function(h){for(;;)switch(h.p=h.n){case 0:return h.p=0,h.n=1,Kv();case 1:return l=h.v,h.n=2,st.post(n+"/users/getToken",{},{headers:Pi({Authorization:"Bearer "+t},l?{"X-XSRF-TOKEN":l}:{}),withCredentials:!0});case 2:if(c=h.v,u=c.data,!(u!=null&&u.plainTextToken)){h.n=3;break}return sessionStorage.setItem(r,JSON.stringify({value:u.plainTextToken,validUntil:Date.parse(((d=u.accessToken)===null||d===void 0?void 0:d.expires_at)||"")||Date.now()+15*60*1e3})),h.a(2,u.plainTextToken);case 3:h.n=5;break;case 4:h.p=4,f=h.v,st.isAxiosError(f)?f.response?console.error("Login failed with status",f.response.status,f.response.data):f.request?console.error("Login request made but no response received",f.request):console.error("Error setting up login request",f.message):console.error("Non-Axios error during login",f);case 5:return h.p=5,fo=null,h.f(5);case 6:return h.a(2,"")}},a,null,[[0,4,5,6]])}))(),o.a(2,fo)}},e,null,[[1,3]])})),kd.apply(this,arguments)}function b4(e,t){var n=Array.from(e+t).reduce(function(r,i){return(r<<5)-r+i.charCodeAt(0)},0);return m4+":"+n}var ho=null;function Kv(){return Od.apply(this,arguments)}function Od(){return Od=Di(Dt().m(function e(){var t;return Dt().w(function(n){for(;;)switch(n.n){case 0:if(window.location.hostname===new URL(m0()||window.location.href).hostname){n.n=1;break}return n.a(2,"");case 1:if(t=y0("XSRF-TOKEN"),!t){n.n=2;break}return n.a(2,decodeURIComponent(t));case 2:if(!ho){n.n=3;break}return n.a(2,ho);case 3:return ho=Di(Dt().m(function r(){var i;return Dt().w(function(s){for(;;)switch(s.p=s.n){case 0:return s.p=0,s.n=1,st.get(((i=m0())===null||i===void 0?void 0:i.replace("/api/v1",""))+"/sanctum/csrf-cookie",{withCredentials:!0});case 1:return s.a(2,decodeURIComponent(y0("XSRF-TOKEN")||""));case 2:return s.p=2,ho=null,s.f(2);case 3:return s.a(2)}},r,null,[[0,,2,3]])}))(),n.a(2,ho)}},e)})),Od.apply(this,arguments)}function ea(e){"@babel/helpers - typeof";return ea=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ea(e)}function p0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p0(Object(n),!0).forEach(function(r){x4(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function x4(e,t,n){return(t=w4(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w4(e){var t=S4(e,"string");return ea(t)=="symbol"?t:t+""}function S4(e,t){if(ea(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ea(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var C4=function(t,n){return St({url:"/brands/".concat(t,"/analysis"),method:"GET",signal:n})},Vv=function(t){return["/brands/".concat(t,"/analysis")]},_4=function(t,n){var r,i=n!=null?n:{},s=i.query,o=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:Vv(t),a=function(c){var u=c.signal;return C4(t,u)};return _e({queryKey:o,queryFn:a,enabled:!!t},s)};function Wv(e,t,n){var r=_4(e,t),i=ti(r,n);return i.queryKey=r.queryKey,i}var k4=function(t,n,r){return St({url:"/brands/".concat(t,"/analysis/").concat(n),method:"GET",signal:r})},Qv=function(t,n){return["/brands/".concat(t,"/analysis/").concat(n)]},O4=function(t,n,r){var i,s=r!=null?r:{},o=s.query,a=(i=o==null?void 0:o.queryKey)!==null&&i!==void 0?i:Qv(t,n),l=function(u){var d=u.signal;return k4(t,n,d)};return _e({queryKey:a,queryFn:l,enabled:!!(t&&n)},o)};function Mc(e,t,n,r){var i=O4(e,t,n),s=ti(i,r);return s.queryKey=i.queryKey,s}var E4=function(t,n){return St({url:"/brands/".concat(t,"/analysis/").concat(n),method:"DELETE"})},A4=function(t){var n=["deleteSingleAnalysis"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},c=l.brandId,u=l.analysisId;return E4(c,u)};return _e({mutationFn:s},i)},P4=function(t,n){var r=A4(t);return wr(r,n)},T4=function(t,n,r){return St({url:"/brands/".concat(t,"/analysis/").concat(n,"/status"),method:"GET",signal:r})},M4=function(t,n){return["/brands/".concat(t,"/analysis/").concat(n,"/status")]},j4=function(t,n,r){var i,s=r!=null?r:{},o=s.query,a=(i=o==null?void 0:o.queryKey)!==null&&i!==void 0?i:M4(t,n),l=function(u){var d=u.signal;return T4(t,n,d)};return _e({queryKey:a,queryFn:l,enabled:!!(t&&n)},o)};function $4(e,t,n,r){var i=j4(e,t,n),s=ti(i,r);return s.queryKey=i.queryKey,s}var D4=function(t){return St({url:"/users/logout",method:"POST",signal:t})},L4=function(t){var n=["logout"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(){return D4()};return _e({mutationFn:s},i)},I4=function(t,n){var r=L4(t);return wr(r,n)},R4=function(t,n){return St({url:"/brands/".concat(t,"/associated-brands"),method:"GET",signal:n})},Yl=function(t){return["/brands/".concat(t,"/associated-brands")]},N4=function(t,n){var r,i=n!=null?n:{},s=i.query,o=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:Yl(t),a=function(c){var u=c.signal;return R4(t,u)};return _e({queryKey:o,queryFn:a,enabled:!!t},s)};function F4(e,t,n){var r=N4(e,t),i=ti(r,n);return i.queryKey=r.queryKey,i}var B4=function(t,n,r){return St({url:"/brands/".concat(t,"/associated-brand-groups"),method:"POST",headers:{"Content-Type":"application/json"},data:n,signal:r})},q4=function(t){var n=["createBrandAssociationGroup"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},c=l.brandId,u=l.data;return B4(c,u)};return _e({mutationFn:s},i)},Yv=function(t,n){var r=q4(t);return wr(r,n)},z4=function(t,n){return St({url:"/brands/".concat(t,"/associated-brand-groups/").concat(n),method:"DELETE"})},H4=function(t){var n=["deleteBrandAssociationGroup"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},c=l.brandId,u=l.brandGroupId;return z4(c,u)};return _e({mutationFn:s},i)},U4=function(t,n){var r=H4(t);return wr(r,n)},G4=function(t){return St({url:"/brands",method:"GET",signal:t})},Wn=function(){return["/brands"]},K4=function(t){var n,r=t!=null?t:{},i=r.query,s=(n=i==null?void 0:i.queryKey)!==null&&n!==void 0?n:Wn(),o=function(l){var c=l.signal;return G4(c)};return _e({queryKey:s,queryFn:o},i)};function Hi(e,t){var n=K4(e),r=ti(n,t);return r.queryKey=n.queryKey,r}var V4=function(t,n){return St({url:"/brands",method:"POST",headers:{"Content-Type":"application/json"},data:t,signal:n})},W4=function(t){var n=["createBrand"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},c=l.data;return V4(c)};return _e({mutationFn:s},i)},Q4=function(t,n){var r=W4(t);return wr(r,n)},Y4=function(t,n){return St({url:"/brands/".concat(t),method:"GET",signal:n})},kf=function(t){return["/brands/".concat(t)]},X4=function(t,n){var r,i=n!=null?n:{},s=i.query,o=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:kf(t),a=function(c){var u=c.signal;return Y4(t,u)};return _e({queryKey:o,queryFn:a,enabled:!!t},s)};function Ed(e,t,n){var r=X4(e,t),i=ti(r,n);return i.queryKey=r.queryKey,i}var Z4=function(t){return St({url:"/brands/".concat(t),method:"DELETE"})},J4=function(t){var n=["deleteBrand"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},c=l.brandId;return Z4(c)};return _e({mutationFn:s},i)},e5=function(t,n){var r=J4(t);return wr(r,n)},t5=function(t,n){return St({url:"/brands/".concat(t,"/settings"),method:"PATCH",headers:{"Content-Type":"application/json"},data:n})},n5=function(t){var n=["updateBrandSettings"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},c=l.brandId,u=l.data;return t5(c,u)};return _e({mutationFn:s},i)},Xv=function(t,n){var r=n5(t);return wr(r,n)},r5=function(t,n){return St({url:"/brands/".concat(t,"/queries"),method:"PUT",headers:{"Content-Type":"application/json"},data:n})},i5=function(t){var n=["updateBrandQueries"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},c=l.brandId,u=l.data;return r5(c,u)};return _e({mutationFn:s},i)},s5=function(t,n){var r=i5(t);return wr(r,n)},o5=function(t,n){return St({url:"/brands/".concat(t,"/query-suggestions"),method:"GET",signal:n})},a5=function(t){return["/brands/".concat(t,"/query-suggestions")]},l5=function(t,n){var r,i=n!=null?n:{},s=i.query,o=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:a5(t),a=function(c){var u=c.signal;return o5(t,u)};return _e({queryKey:o,queryFn:a,enabled:!!t},s)};function c5(e,t,n){var r=l5(e,t),i=ti(r,n);return i.queryKey=r.queryKey,i}var u5=function(t){return St({url:"/users/current",method:"GET",signal:t})},jc=function(){return["/users/current"]},d5=function(t){var n,r=t!=null?t:{},i=r.query,s=(n=i==null?void 0:i.queryKey)!==null&&n!==void 0?n:jc(),o=function(l){var c=l.signal;return u5(c)};return _e({queryKey:s,queryFn:o},i)};function $c(e,t){var n=d5(e),r=ti(n,t);return r.queryKey=n.queryKey,r}var f5=function(){return St({url:"/users/data",method:"DELETE"})},h5=function(t){var n=["deleteUserData"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(){return f5()};return _e({mutationFn:s},i)},g5=function(t,n){var r=h5(t);return wr(r,n)},Zv=z.createContext(void 0),y5=function(t){var n,r,i,s,o,a,l,c,u=t.children,d=t.brandId,f=t.analysisId,h=t.model,g=t.hostAppProps,m=g===void 0?{}:g,p=Za("/brands/:brandId"),v=Za("/brands/:brandId/*"),b=Za("/brands/:brandId/analysis/:analysisId"),S=Za("/brands/:brandId/analysis/:analysisId/*"),C=(b==null||(n=b.params)===null||n===void 0?void 0:n.brandId)||(S==null||(r=S.params)===null||r===void 0?void 0:r.brandId)||(v==null||(i=v.params)===null||i===void 0?void 0:i.brandId)||(p==null||(s=p.params)===null||s===void 0?void 0:s.brandId),x=b!=null&&(o=b.params)!==null&&o!==void 0&&o.analysisId||S!=null&&(a=S.params)!==null&&a!==void 0&&a.analysisId?Number((b==null||(l=b.params)===null||l===void 0?void 0:l.analysisId)||(S==null||(c=S.params)===null||c===void 0?void 0:c.analysisId)):void 0,k=z.useMemo(function(){return{brandId:C||d||"",analysisId:x||f||"latest",model:h||"openai",hostAppProps:m}},[C,d,x,f,h,m]),w=z.useMemo(function(){return{data:k}},[k]);return y.jsx(Zv.Provider,{value:w,children:u})},Jv=z.createContext(void 0),m5=function(t){var n=t.children,r=t.setBrandId,i=t.setAnalysisId,s=t.setModel,o=z.useCallback(function(d){r(d),i("latest")},[r,i]),a=z.useCallback(function(d){i(d)},[i]),l=z.useCallback(function(d){s(d)},[s]),c=z.useMemo(function(){return{setBrandId:o,setAnalysisId:a,setModel:l}},[o,a,l]),u=z.useMemo(function(){return{mutations:c}},[c]);return y.jsx(Jv.Provider,{value:u,children:n})};function hu(e,t){return x5(e)||b5(e,t)||v5(e,t)||p5()}function p5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
18
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
12
|
+
Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let d=Ut(),f;if(t){let b=typeof t=="string"?zi(t):t;rt(u==="/"||((v=b.pathname)==null?void 0:v.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${b.pathname}" was given in the \`location\` prop.`),f=b}else f=d;let h=f.pathname||"/",g=h;if(u!=="/"){let b=u.replace(/^\//,"").split("/");g="/"+h.replace(/^\//,"").split("/").slice(b.length).join("/")}let m=mp(e,{pathname:g});Cn(c||m!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),Cn(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let p=Gx(m&&m.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:gr([u,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:gr([u,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&p?I.createElement(La.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...f},navigationType:"POP"}},p):p}function qx(){let e=Yx(),t=jx(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=I.createElement(I.Fragment,null,I.createElement("p",null,"💿 Hey developer 👋"),I.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",I.createElement("code",{style:s},"ErrorBoundary")," or"," ",I.createElement("code",{style:s},"errorElement")," prop on your route.")),I.createElement(I.Fragment,null,I.createElement("h2",null,"Unexpected Application Error!"),I.createElement("h3",{style:{fontStyle:"italic"}},t),n?I.createElement("pre",{style:i},n):null,o)}var zx=I.createElement(qx,null),Hx=class extends I.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?I.createElement(_n.Provider,{value:this.props.routeContext},I.createElement(pf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Ux({routeContext:e,match:t,children:n}){let r=I.useContext(Ws);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),I.createElement(_n.Provider,{value:e},n)}function Gx(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,s=n==null?void 0:n.errors;if(s!=null){let l=i.findIndex(u=>u.route.id&&(s==null?void 0:s[u.route.id])!==void 0);rt(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,l+1))}let o=!1,a=-1;if(n)for(let l=0;l<i.length;l++){let u=i[l];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(a=l),u.route.id){let{loaderData:c,errors:d}=n,f=u.route.loader&&!c.hasOwnProperty(u.route.id)&&(!d||d[u.route.id]===void 0);if(u.route.lazy||f){o=!0,a>=0?i=i.slice(0,a+1):i=[i[0]];break}}}return i.reduceRight((l,u,c)=>{let d,f=!1,h=null,g=null;n&&(d=s&&u.route.id?s[u.route.id]:void 0,h=u.route.errorElement||zx,o&&(a<0&&c===0?(kp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,g=null):a===c&&(f=!0,g=u.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),p=()=>{let v;return d?v=h:f?v=g:u.route.Component?v=I.createElement(u.route.Component,null):u.route.element?v=u.route.element:v=l,I.createElement(Ux,{match:u,routeContext:{outlet:l,matches:m,isDataRoute:n!=null},children:v})};return n&&(u.route.ErrorBoundary||u.route.errorElement||c===0)?I.createElement(Hx,{location:n.location,revalidation:n.revalidation,component:h,error:d,children:p(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):p()},null)}function vf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kx(e){let t=I.useContext(Ws);return rt(t,vf(e)),t}function Vx(e){let t=I.useContext(bu);return rt(t,vf(e)),t}function Wx(e){let t=I.useContext(_n);return rt(t,vf(e)),t}function bf(e){let t=Wx(e),n=t.matches[t.matches.length-1];return rt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Qx(){return bf("useRouteId")}function Yx(){var r;let e=I.useContext(pf),t=Vx("useRouteError"),n=bf("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function Xx(){let{router:e}=Kx("useNavigate"),t=bf("useNavigate"),n=I.useRef(!1);return Cp(()=>{n.current=!0}),I.useCallback(async(i,s={})=>{Cn(n.current,Sp),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...s}))},[e,t])}var Nh={};function kp(e,t,n){!t&&!Nh[e]&&(Nh[e]=!0,Cn(!1,n))}I.memo(Zx);function Zx({routes:e,future:t,state:n}){return _p(e,void 0,n,t)}function Jx({basename:e,children:t,initialEntries:n,initialIndex:r}){let i=I.useRef();i.current==null&&(i.current=dx({initialEntries:n,initialIndex:r,v5Compat:!0}));let s=i.current,[o,a]=I.useState({action:s.action,location:s.location}),l=I.useCallback(u=>{I.startTransition(()=>a(u))},[a]);return I.useLayoutEffect(()=>s.listen(l),[s,l]),I.createElement(ew,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:s})}function yi({to:e,replace:t,state:n,relative:r}){rt(Hi(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=I.useContext(Ln);Cn(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=I.useContext(_n),{pathname:o}=Ut(),a=dn(),l=mf(e,yf(s),o,r==="path"),u=JSON.stringify(l);return I.useEffect(()=>{a(JSON.parse(u),{replace:t,state:n,relative:r})},[a,u,r,t,n]),null}function Bs(e){return Fx(e.context)}function _t(e){rt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function ew({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:s=!1}){rt(!Hi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),a=I.useMemo(()=>({basename:o,navigator:i,static:s,future:{}}),[o,i,s]);typeof n=="string"&&(n=zi(n));let{pathname:l="/",search:u="",hash:c="",state:d=null,key:f="default"}=n,h=I.useMemo(()=>{let g=vr(l,o);return g==null?null:{location:{pathname:g,search:u,hash:c,state:d,key:f},navigationType:r}},[o,l,u,c,d,f,r]);return Cn(h!=null,`<Router basename="${o}"> is not able to match the URL "${l}${u}${c}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:I.createElement(Ln.Provider,{value:a},I.createElement(La.Provider,{children:t,value:h}))}function tw({children:e,location:t}){return Bx(Qc(e),t)}function Qc(e,t=[]){let n=[];return I.Children.forEach(e,(r,i)=>{if(!I.isValidElement(r))return;let s=[...t,i];if(r.type===I.Fragment){n.push.apply(n,Qc(r.props.children,s));return}rt(r.type===_t,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),rt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Qc(r.props.children,s)),n.push(o)}),n}var El="get",Al="application/x-www-form-urlencoded";function wu(e){return e!=null&&typeof e.tagName=="string"}function nw(e){return wu(e)&&e.tagName.toLowerCase()==="button"}function rw(e){return wu(e)&&e.tagName.toLowerCase()==="form"}function iw(e){return wu(e)&&e.tagName.toLowerCase()==="input"}function sw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ow(e,t){return e.button===0&&(!t||t==="_self")&&!sw(e)}var el=null;function aw(){if(el===null)try{new FormData(document.createElement("form"),0),el=!1}catch(e){el=!0}return el}var lw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function oc(e){return e!=null&&!lw.has(e)?(Cn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Al}"`),null):e}function uw(e,t){let n,r,i,s,o;if(rw(e)){let a=e.getAttribute("action");r=a?vr(a,t):null,n=e.getAttribute("method")||El,i=oc(e.getAttribute("enctype"))||Al,s=new FormData(e)}else if(nw(e)||iw(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(r=l?vr(l,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||El,i=oc(e.getAttribute("formenctype"))||oc(a.getAttribute("enctype"))||Al,s=new FormData(a,e),!aw()){let{name:u,type:c,value:d}=e;if(c==="image"){let f=u?`${u}.`:"";s.append(`${f}x`,"0"),s.append(`${f}y`,"0")}else u&&s.append(u,d)}}else{if(wu(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=El,r=null,i=Al,o=e}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}function xf(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}async function cw(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function dw(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function fw(e,t,n){let r=await Promise.all(e.map(async i=>{let s=t.routes[i.route.id];if(s){let o=await cw(s,n);return o.links?o.links():[]}return[]}));return mw(r.flat(1).filter(dw).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Fh(e,t,n,r,i,s){let o=(l,u)=>n[u]?l.route.id!==n[u].route.id:!0,a=(l,u)=>{var c;return n[u].pathname!==l.pathname||((c=n[u].route.path)==null?void 0:c.endsWith("*"))&&n[u].params["*"]!==l.params["*"]};return s==="assets"?t.filter((l,u)=>o(l,u)||a(l,u)):s==="data"?t.filter((l,u)=>{var d;let c=r.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(o(l,u)||a(l,u))return!0;if(l.route.shouldRevalidate){let f=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function hw(e,t,{includeHydrateFallback:n}={}){return gw(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function gw(e){return[...new Set(e)]}function yw(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function mw(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let s=JSON.stringify(yw(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var pw=new Set([100,101,204,205]);function vw(e,t){let n=typeof e=="string"?new URL(e,typeof window=="undefined"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname="_root.data":t&&vr(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function Op(){let e=I.useContext(Ws);return xf(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function bw(){let e=I.useContext(bu);return xf(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var wf=I.createContext(void 0);wf.displayName="FrameworkContext";function Ep(){let e=I.useContext(wf);return xf(e,"You must render this element inside a <HydratedRouter> element"),e}function xw(e,t){let n=I.useContext(wf),[r,i]=I.useState(!1),[s,o]=I.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,f=I.useRef(null);I.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let m=v=>{v.forEach(b=>{o(b.isIntersecting)})},p=new IntersectionObserver(m,{threshold:.5});return f.current&&p.observe(f.current),()=>{p.disconnect()}}},[e]),I.useEffect(()=>{if(r){let m=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(m)}}},[r]);let h=()=>{i(!0)},g=()=>{i(!1),o(!1)};return n?e!=="intent"?[s,f,{}]:[s,f,{onFocus:co(a,h),onBlur:co(l,g),onMouseEnter:co(u,h),onMouseLeave:co(c,g),onTouchStart:co(d,h)}]:[!1,f,{}]}function co(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ww({page:e,...t}){let{router:n}=Op(),r=I.useMemo(()=>mp(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?I.createElement(Cw,{page:e,matches:r,...t}):null}function Sw(e){let{manifest:t,routeModules:n}=Ep(),[r,i]=I.useState([]);return I.useEffect(()=>{let s=!1;return fw(e,t,n).then(o=>{s||i(o)}),()=>{s=!0}},[e,t,n]),r}function Cw({page:e,matches:t,...n}){let r=Ut(),{manifest:i,routeModules:s}=Ep(),{basename:o}=Op(),{loaderData:a,matches:l}=bw(),u=I.useMemo(()=>Fh(e,t,l,i,r,"data"),[e,t,l,i,r]),c=I.useMemo(()=>Fh(e,t,l,i,r,"assets"),[e,t,l,i,r]),d=I.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let g=new Set,m=!1;if(t.forEach(v=>{var S;let b=i.routes[v.route.id];!b||!b.hasLoader||(!u.some(C=>C.route.id===v.route.id)&&v.route.id in a&&((S=s[v.route.id])!=null&&S.shouldRevalidate)||b.hasClientLoader?m=!0:g.add(v.route.id))}),g.size===0)return[];let p=vw(e,o);return m&&g.size>0&&p.searchParams.set("_routes",t.filter(v=>g.has(v.route.id)).map(v=>v.route.id).join(",")),[p.pathname+p.search]},[o,a,r,i,u,t,e,s]),f=I.useMemo(()=>hw(c,i),[c,i]),h=Sw(c);return I.createElement(I.Fragment,null,d.map(g=>I.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...n})),f.map(g=>I.createElement("link",{key:g,rel:"modulepreload",href:g,...n})),h.map(({key:g,link:m})=>I.createElement("link",{key:g,...m})))}function _w(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Ap=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";try{Ap&&(window.__reactRouterVersion="7.6.3")}catch(e){}var Pp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ti=I.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:d,...f},h){let{basename:g}=I.useContext(Ln),m=typeof u=="string"&&Pp.test(u),p,v=!1;if(typeof u=="string"&&m&&(p=u,Ap))try{let O=new URL(window.location.href),E=u.startsWith("//")?new URL(O.protocol+u):new URL(u),T=vr(E.pathname,g);E.origin===O.origin&&T!=null?u=T+E.search+E.hash:v=!0}catch(O){Cn(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let b=Ix(u,{relative:i}),[S,C,x]=xw(r,f),k=Aw(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:i,viewTransition:d});function w(O){t&&t(O),O.defaultPrevented||k(O)}let _=I.createElement("a",{...f,...x,href:p||b,onClick:v||s?t:w,ref:_w(h,C),target:l,"data-discover":!m&&n==="render"?"true":void 0});return S&&!m?I.createElement(I.Fragment,null,_,I.createElement(ww,{page:b})):_});ti.displayName="Link";var kw=I.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:o,viewTransition:a,children:l,...u},c){let d=Ia(o,{relative:u.relative}),f=Ut(),h=I.useContext(bu),{navigator:g,basename:m}=I.useContext(Ln),p=h!=null&&$w(d)&&a===!0,v=g.encodeLocation?g.encodeLocation(d).pathname:d.pathname,b=f.pathname,S=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(b=b.toLowerCase(),S=S?S.toLowerCase():null,v=v.toLowerCase()),S&&m&&(S=vr(S,m)||S);const C=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let x=b===v||!i&&b.startsWith(v)&&b.charAt(C)==="/",k=S!=null&&(S===v||!i&&S.startsWith(v)&&S.charAt(v.length)==="/"),w={isActive:x,isPending:k,isTransitioning:p},_=x?t:void 0,O;typeof r=="function"?O=r(w):O=[r,x?"active":null,k?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let E=typeof s=="function"?s(w):s;return I.createElement(ti,{...u,"aria-current":_,className:O,ref:c,style:E,to:o,viewTransition:a},typeof l=="function"?l(w):l)});kw.displayName="NavLink";var Ow=I.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:s,method:o=El,action:a,onSubmit:l,relative:u,preventScrollReset:c,viewTransition:d,...f},h)=>{let g=Mw(),m=jw(a,{relative:u}),p=o.toLowerCase()==="get"?"get":"post",v=typeof a=="string"&&Pp.test(a),b=S=>{if(l&&l(S),S.defaultPrevented)return;S.preventDefault();let C=S.nativeEvent.submitter,x=(C==null?void 0:C.getAttribute("formmethod"))||o;g(C||S.currentTarget,{fetcherKey:t,method:x,navigate:n,replace:i,state:s,relative:u,preventScrollReset:c,viewTransition:d})};return I.createElement("form",{ref:h,method:p,action:m,onSubmit:r?l:b,...f,"data-discover":!v&&e==="render"?"true":void 0})});Ow.displayName="Form";function Ew(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Tp(e){let t=I.useContext(Ws);return rt(t,Ew(e)),t}function Aw(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:o}={}){let a=dn(),l=Ut(),u=Ia(e,{relative:s});return I.useCallback(c=>{if(ow(c,t)){c.preventDefault();let d=n!==void 0?n:Fl(l)===Fl(u);a(e,{replace:d,state:r,preventScrollReset:i,relative:s,viewTransition:o})}},[l,a,u,n,r,t,e,i,s,o])}var Pw=0,Tw=()=>`__${String(++Pw)}__`;function Mw(){let{router:e}=Tp("useSubmit"),{basename:t}=I.useContext(Ln),n=Qx();return I.useCallback(async(r,i={})=>{let{action:s,method:o,encType:a,formData:l,body:u}=uw(r,t);if(i.navigate===!1){let c=i.fetcherKey||Tw();await e.fetch(c,n,i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||o,formEncType:i.encType||a,flushSync:i.flushSync})}else await e.navigate(i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||o,formEncType:i.encType||a,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}function jw(e,{relative:t}={}){let{basename:n}=I.useContext(Ln),r=I.useContext(_n);rt(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...Ia(e||".",{relative:t})},o=Ut();if(e==null){s.search=o.search;let a=new URLSearchParams(s.search),l=a.getAll("index");if(l.some(c=>c==="")){a.delete("index"),l.filter(d=>d).forEach(d=>a.append("index",d));let c=a.toString();s.search=c?`?${c}`:""}}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:gr([n,s.pathname])),Fl(s)}function $w(e,t={}){let n=I.useContext(wp);rt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Tp("useViewTransitionState"),i=Ia(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=vr(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=vr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Fs(i.pathname,o)!=null||Fs(i.pathname,s)!=null}[...pw];var Qs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},$i=typeof window=="undefined"||"Deno"in globalThis;function Dt(){}function Dw(e,t){return typeof e=="function"?e(t):e}function Yc(e){return typeof e=="number"&&e>=0&&e!==1/0}function Mp(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Kr(e,t){return typeof e=="function"?e(t):e}function vn(e,t){return typeof e=="function"?e(t):e}function Bh(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Sf(o,t.options))return!1}else if(!Vo(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function qh(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Di(t.options.mutationKey)!==Di(s))return!1}else if(!Vo(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Sf(e,t){return((t==null?void 0:t.queryKeyHashFn)||Di)(e)}function Di(e){return JSON.stringify(e,(t,n)=>Zc(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Vo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Vo(e[n],t[n])):!1}function Xc(e,t){if(e===t)return e;const n=zh(e)&&zh(t);if(n||Zc(e)&&Zc(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{},l=new Set(r);let u=0;for(let c=0;c<o;c++){const d=n?c:s[c];(!n&&l.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,u++):(a[d]=Xc(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&u++)}return i===o&&u===i?e:a}return t}function Bl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function zh(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Zc(e){if(!Hh(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Hh(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Hh(e){return Object.prototype.toString.call(e)==="[object Object]"}function Lw(e){return new Promise(t=>{setTimeout(t,e)})}function Jc(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Xc(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return Xc(e,t)}return t}function Iw(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Rw(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ql=Symbol();function jp(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===ql&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ql?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function $p(e,t){return typeof e=="function"?e(...t):!!e}var bi,jr,fs,rp,Nw=(rp=class extends Qs{constructor(){super();de(this,bi);de(this,jr);de(this,fs);Z(this,fs,t=>{if(!$i&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){$(this,jr)||this.setEventListener($(this,fs))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,jr))==null||t.call(this),Z(this,jr,void 0))}setEventListener(t){var n;Z(this,fs,t),(n=$(this,jr))==null||n.call(this),Z(this,jr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){$(this,bi)!==t&&(Z(this,bi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof $(this,bi)=="boolean"?$(this,bi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},bi=new WeakMap,jr=new WeakMap,fs=new WeakMap,rp),Cf=new Nw,hs,$r,gs,ip,Fw=(ip=class extends Qs{constructor(){super();de(this,hs,!0);de(this,$r);de(this,gs);Z(this,gs,t=>{if(!$i&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){$(this,$r)||this.setEventListener($(this,gs))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,$r))==null||t.call(this),Z(this,$r,void 0))}setEventListener(t){var n;Z(this,gs,t),(n=$(this,$r))==null||n.call(this),Z(this,$r,t(this.setOnline.bind(this)))}setOnline(t){$(this,hs)!==t&&(Z(this,hs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return $(this,hs)}},hs=new WeakMap,$r=new WeakMap,gs=new WeakMap,ip),qs=new Fw;function ed(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function Bw(e){return Math.min(1e3*2**e,3e4)}function Dp(e){return(e!=null?e:"online")==="online"?qs.isOnline():!0}var Lp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ac(e){return e instanceof Lp}function Ip(e){let t=!1,n=0,r=!1,i;const s=ed(),o=m=>{var p;r||(f(new Lp(m)),(p=e.abort)==null||p.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Cf.isFocused()&&(e.networkMode==="always"||qs.isOnline())&&e.canRun(),c=()=>Dp(e.networkMode)&&e.canRun(),d=m=>{var p;r||(r=!0,(p=e.onSuccess)==null||p.call(e,m),i==null||i(),s.resolve(m))},f=m=>{var p;r||(r=!0,(p=e.onError)==null||p.call(e,m),i==null||i(),s.reject(m))},h=()=>new Promise(m=>{var p;i=v=>{(r||u())&&m(v)},(p=e.onPause)==null||p.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(r)return;let m;const p=n===0?e.initialPromise:void 0;try{m=p!=null?p:e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(d).catch(v=>{var k,w,_;if(r)return;const b=(k=e.retry)!=null?k:$i?0:3,S=(w=e.retryDelay)!=null?w:Bw,C=typeof S=="function"?S(n,v):S,x=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,v);if(t||!x){f(v);return}n++,(_=e.onFail)==null||_.call(e,n,v),Lw(C).then(()=>u()?void 0:h()).then(()=>{t?f(v):g()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?g():h().then(g),s)}}var qw=e=>setTimeout(e,0);function zw(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=qw;const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var yt=zw(),xi,sp,Rp=(sp=class{constructor(){de(this,xi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Yc(this.gcTime)&&Z(this,xi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e!=null?e:$i?1/0:5*60*1e3)}clearGcTimeout(){$(this,xi)&&(clearTimeout($(this,xi)),Z(this,xi,void 0))}},xi=new WeakMap,sp),ys,wi,pn,Si,kt,wa,Ci,Pn,sr,op,Hw=(op=class extends Rp{constructor(t){var n;super();de(this,Pn);de(this,ys);de(this,wi);de(this,pn);de(this,Si);de(this,kt);de(this,wa);de(this,Ci);Z(this,Ci,!1),Z(this,wa,t.defaultOptions),this.setOptions(t.options),this.observers=[],Z(this,Si,t.client),Z(this,pn,$(this,Si).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Z(this,ys,Uw(this.options)),this.state=(n=t.state)!=null?n:$(this,ys),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=$(this,kt))==null?void 0:t.promise}setOptions(t){this.options={...$(this,wa),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&$(this,pn).remove(this)}setData(t,n){const r=Jc(this.state.data,t,this.options);return Me(this,Pn,sr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Me(this,Pn,sr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=$(this,kt))==null?void 0:r.promise;return(i=$(this,kt))==null||i.cancel(t),n?n.then(Dt).catch(Dt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState($(this,ys))}isActive(){return this.observers.some(t=>vn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ql||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Kr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Mp(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=$(this,kt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=$(this,kt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),$(this,pn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||($(this,kt)&&($(this,Ci)?$(this,kt).cancel({revert:!0}):$(this,kt).cancelRetry()),this.scheduleGc()),$(this,pn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Me(this,Pn,sr).call(this,{type:"invalidate"})}fetch(t,n){var u,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if($(this,kt))return $(this,kt).continueRetry(),$(this,kt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(Z(this,Ci,!0),r.signal)})},s=()=>{const f=jp(this.options,n),g=(()=>{const m={client:$(this,Si),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return Z(this,Ci,!1),this.options.persister?this.options.persister(f,g,this):f(g)},a=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:$(this,Si),state:this.state,fetchFn:s};return i(f),f})();(u=this.options.behavior)==null||u.onFetch(a,this),Z(this,wi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&Me(this,Pn,sr).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,g,m,p;ac(f)&&f.silent||Me(this,Pn,sr).call(this,{type:"error",error:f}),ac(f)||((g=(h=$(this,pn).config).onError)==null||g.call(h,f,this),(p=(m=$(this,pn).config).onSettled)==null||p.call(m,this.state.data,f,this)),this.scheduleGc()};return Z(this,kt,Ip({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var h,g,m,p;if(f===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(v){l(v);return}(g=(h=$(this,pn).config).onSuccess)==null||g.call(h,f,this),(p=(m=$(this,pn).config).onSettled)==null||p.call(m,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{Me(this,Pn,sr).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{Me(this,Pn,sr).call(this,{type:"pause"})},onContinue:()=>{Me(this,Pn,sr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),$(this,kt).start()}},ys=new WeakMap,wi=new WeakMap,pn=new WeakMap,Si=new WeakMap,kt=new WeakMap,wa=new WeakMap,Ci=new WeakMap,Pn=new WeakSet,sr=function(t){const n=r=>{var i,s;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Np(r.data,this.options),fetchMeta:(i=t.meta)!=null?i:null};case"success":return Z(this,wi,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(s=t.dataUpdatedAt)!=null?s:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return ac(o)&&o.revert&&$(this,wi)?{...$(this,wi),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),yt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),$(this,pn).notify({query:this,type:"updated",action:t})})},op);function Np(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Dp(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Uw(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r!=null?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Vn,ap,Gw=(ap=class extends Qs{constructor(t={}){super();de(this,Vn);this.config=t,Z(this,Vn,new Map)}build(t,n,r){var a;const i=n.queryKey,s=(a=n.queryHash)!=null?a:Sf(i,n);let o=this.get(s);return o||(o=new Hw({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){$(this,Vn).has(t.queryHash)||($(this,Vn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=$(this,Vn).get(t.queryHash);n&&(t.destroy(),n===t&&$(this,Vn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){yt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return $(this,Vn).get(t)}getAll(){return[...$(this,Vn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Bh(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Bh(t,r)):n}notify(t){yt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){yt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){yt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Vn=new WeakMap,ap),Wn,jt,_i,Qn,Mr,lp,Kw=(lp=class extends Rp{constructor(t){super();de(this,Qn);de(this,Wn);de(this,jt);de(this,_i);this.mutationId=t.mutationId,Z(this,jt,t.mutationCache),Z(this,Wn,[]),this.state=t.state||Fp(),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,Wn).includes(t)||($(this,Wn).push(t),this.clearGcTimeout(),$(this,jt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Z(this,Wn,$(this,Wn).filter(n=>n!==t)),this.scheduleGc(),$(this,jt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){$(this,Wn).length||(this.state.status==="pending"?this.scheduleGc():$(this,jt).remove(this))}continue(){var t,n;return(n=(t=$(this,_i))==null?void 0:t.continue())!=null?n:this.execute(this.state.variables)}async execute(t){var s,o,a,l,u,c,d,f,h,g,m,p,v,b,S,C,x,k,w,_,O;const n=()=>{Me(this,Qn,Mr).call(this,{type:"continue"})};Z(this,_i,Ip({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(E,T)=>{Me(this,Qn,Mr).call(this,{type:"failed",failureCount:E,error:T})},onPause:()=>{Me(this,Qn,Mr).call(this,{type:"pause"})},onContinue:n,retry:(s=this.options.retry)!=null?s:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>$(this,jt).canRun(this)}));const r=this.state.status==="pending",i=!$(this,_i).canStart();try{if(r)n();else{Me(this,Qn,Mr).call(this,{type:"pending",variables:t,isPaused:i}),await((a=(o=$(this,jt).config).onMutate)==null?void 0:a.call(o,t,this));const T=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t));T!==this.state.context&&Me(this,Qn,Mr).call(this,{type:"pending",context:T,variables:t,isPaused:i})}const E=await $(this,_i).start();return await((d=(c=$(this,jt).config).onSuccess)==null?void 0:d.call(c,E,t,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,E,t,this.state.context)),await((m=(g=$(this,jt).config).onSettled)==null?void 0:m.call(g,E,null,this.state.variables,this.state.context,this)),await((v=(p=this.options).onSettled)==null?void 0:v.call(p,E,null,t,this.state.context)),Me(this,Qn,Mr).call(this,{type:"success",data:E}),E}catch(E){try{throw await((S=(b=$(this,jt).config).onError)==null?void 0:S.call(b,E,t,this.state.context,this)),await((x=(C=this.options).onError)==null?void 0:x.call(C,E,t,this.state.context)),await((w=(k=$(this,jt).config).onSettled)==null?void 0:w.call(k,void 0,E,this.state.variables,this.state.context,this)),await((O=(_=this.options).onSettled)==null?void 0:O.call(_,void 0,E,t,this.state.context)),E}finally{Me(this,Qn,Mr).call(this,{type:"error",error:E})}}finally{$(this,jt).runNext(this)}}},Wn=new WeakMap,jt=new WeakMap,_i=new WeakMap,Qn=new WeakSet,Mr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),yt.batch(()=>{$(this,Wn).forEach(r=>{r.onMutationUpdate(t)}),$(this,jt).notify({mutation:this,type:"updated",action:t})})},lp);function Fp(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var cr,Tn,Sa,up,Vw=(up=class extends Qs{constructor(t={}){super();de(this,cr);de(this,Tn);de(this,Sa);this.config=t,Z(this,cr,new Set),Z(this,Tn,new Map),Z(this,Sa,0)}build(t,n,r){const i=new Kw({mutationCache:this,mutationId:++Za(this,Sa)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){$(this,cr).add(t);const n=tl(t);if(typeof n=="string"){const r=$(this,Tn).get(n);r?r.push(t):$(this,Tn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if($(this,cr).delete(t)){const n=tl(t);if(typeof n=="string"){const r=$(this,Tn).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&$(this,Tn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=tl(t);if(typeof n=="string"){const r=$(this,Tn).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r,i;const n=tl(t);if(typeof n=="string"){const s=(r=$(this,Tn).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(i=s==null?void 0:s.continue())!=null?i:Promise.resolve()}else return Promise.resolve()}clear(){yt.batch(()=>{$(this,cr).forEach(t=>{this.notify({type:"removed",mutation:t})}),$(this,cr).clear(),$(this,Tn).clear()})}getAll(){return Array.from($(this,cr))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>qh(n,r))}findAll(t={}){return this.getAll().filter(n=>qh(t,n))}notify(t){yt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return yt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Dt))))}},cr=new WeakMap,Tn=new WeakMap,Sa=new WeakMap,up);function tl(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Uh(e){return{onFetch:(t,n)=>{var c,d,f,h,g;const r=t.options,i=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{var S;let m=!1;const p=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=jp(t.options,t.fetchOptions),b=async(C,x,k)=>{if(m)return Promise.reject();if(x==null&&C.pages.length)return Promise.resolve(C);const _=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:x,direction:k?"backward":"forward",meta:t.options.meta};return p(j),j})(),O=await v(_),{maxPages:E}=t.options,T=k?Rw:Iw;return{pages:T(C.pages,O,E),pageParams:T(C.pageParams,x,E)}};if(i&&s.length){const C=i==="backward",x=C?Ww:Gh,k={pages:s,pageParams:o},w=x(r,k);a=await b(k,w,C)}else{const C=e!=null?e:s.length;do{const x=l===0?(S=o[0])!=null?S:r.initialPageParam:Gh(r,a);if(l>0&&x==null)break;a=await b(a,x),l++}while(l<C)}return a};t.options.persister?t.fetchFn=()=>{var m,p;return(p=(m=t.options).persister)==null?void 0:p.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Gh(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Ww(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var ut,Dr,Lr,ms,ps,Ir,vs,bs,cp,Qw=(cp=class{constructor(e={}){de(this,ut);de(this,Dr);de(this,Lr);de(this,ms);de(this,ps);de(this,Ir);de(this,vs);de(this,bs);Z(this,ut,e.queryCache||new Gw),Z(this,Dr,e.mutationCache||new Vw),Z(this,Lr,e.defaultOptions||{}),Z(this,ms,new Map),Z(this,ps,new Map),Z(this,Ir,0)}mount(){Za(this,Ir)._++,$(this,Ir)===1&&(Z(this,vs,Cf.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,ut).onFocus())})),Z(this,bs,qs.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,ut).onOnline())})))}unmount(){var e,t;Za(this,Ir)._--,$(this,Ir)===0&&((e=$(this,vs))==null||e.call(this),Z(this,vs,void 0),(t=$(this,bs))==null||t.call(this),Z(this,bs,void 0))}isFetching(e){return $(this,ut).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return $(this,Dr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=$(this,ut).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=$(this,ut).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Kr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return $(this,ut).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=$(this,ut).get(r.queryHash),s=i==null?void 0:i.state.data,o=Dw(t,s);if(o!==void 0)return $(this,ut).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return yt.batch(()=>$(this,ut).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=$(this,ut).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=$(this,ut);yt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=$(this,ut);return yt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=yt.batch(()=>$(this,ut).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Dt).catch(Dt)}invalidateQueries(e,t={}){return yt.batch(()=>{var n,r;return $(this,ut).findAll(e).forEach(i=>{i.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(r=(n=e==null?void 0:e.refetchType)!=null?n:e==null?void 0:e.type)!=null?r:"active"},t)})}refetchQueries(e,t={}){var i;const n={...t,cancelRefetch:(i=t.cancelRefetch)!=null?i:!0},r=yt.batch(()=>$(this,ut).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(Dt)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Dt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=$(this,ut).build(this,t);return n.isStaleByTime(Kr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Dt).catch(Dt)}fetchInfiniteQuery(e){return e.behavior=Uh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Dt).catch(Dt)}ensureInfiniteQueryData(e){return e.behavior=Uh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return qs.isOnline()?$(this,Dr).resumePausedMutations():Promise.resolve()}getQueryCache(){return $(this,ut)}getMutationCache(){return $(this,Dr)}getDefaultOptions(){return $(this,Lr)}setDefaultOptions(e){Z(this,Lr,e)}setQueryDefaults(e,t){$(this,ms).set(Di(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...$(this,ms).values()],n={};return t.forEach(r=>{Vo(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){$(this,ps).set(Di(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...$(this,ps).values()],n={};return t.forEach(r=>{Vo(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...$(this,Lr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Sf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ql&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...$(this,Lr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){$(this,ut).clear(),$(this,Dr).clear()}},ut=new WeakMap,Dr=new WeakMap,Lr=new WeakMap,ms=new WeakMap,ps=new WeakMap,Ir=new WeakMap,vs=new WeakMap,bs=new WeakMap,cp),Nt,Le,Ca,$t,ki,xs,Rr,Nr,_a,ws,Ss,Oi,Ei,Fr,Cs,Ke,Ao,td,nd,rd,id,sd,od,ad,Bp,dp,Yw=(dp=class extends Qs{constructor(t,n){super();de(this,Ke);de(this,Nt);de(this,Le);de(this,Ca);de(this,$t);de(this,ki);de(this,xs);de(this,Rr);de(this,Nr);de(this,_a);de(this,ws);de(this,Ss);de(this,Oi);de(this,Ei);de(this,Fr);de(this,Cs,new Set);this.options=n,Z(this,Nt,t),Z(this,Nr,null),Z(this,Rr,ed()),this.options.experimental_prefetchInRender||$(this,Rr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&($(this,Le).addObserver(this),Kh($(this,Le),this.options)?Me(this,Ke,Ao).call(this):this.updateResult(),Me(this,Ke,id).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ld($(this,Le),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ld($(this,Le),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Me(this,Ke,sd).call(this),Me(this,Ke,od).call(this),$(this,Le).removeObserver(this)}setOptions(t){const n=this.options,r=$(this,Le);if(this.options=$(this,Nt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof vn(this.options.enabled,$(this,Le))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Me(this,Ke,ad).call(this),$(this,Le).setOptions(this.options),n._defaulted&&!Bl(this.options,n)&&$(this,Nt).getQueryCache().notify({type:"observerOptionsUpdated",query:$(this,Le),observer:this});const i=this.hasListeners();i&&Vh($(this,Le),r,this.options,n)&&Me(this,Ke,Ao).call(this),this.updateResult(),i&&($(this,Le)!==r||vn(this.options.enabled,$(this,Le))!==vn(n.enabled,$(this,Le))||Kr(this.options.staleTime,$(this,Le))!==Kr(n.staleTime,$(this,Le)))&&Me(this,Ke,td).call(this);const s=Me(this,Ke,nd).call(this);i&&($(this,Le)!==r||vn(this.options.enabled,$(this,Le))!==vn(n.enabled,$(this,Le))||s!==$(this,Fr))&&Me(this,Ke,rd).call(this,s)}getOptimisticResult(t){const n=$(this,Nt).getQueryCache().build($(this,Nt),t),r=this.createResult(n,t);return Zw(this,r)&&(Z(this,$t,r),Z(this,xs,this.options),Z(this,ki,$(this,Le).state)),r}getCurrentResult(){return $(this,$t)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),Reflect.get(r,i))})}trackProp(t){$(this,Cs).add(t)}getCurrentQuery(){return $(this,Le)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=$(this,Nt).defaultQueryOptions(t),r=$(this,Nt).getQueryCache().build($(this,Nt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return Me(this,Ke,Ao).call(this,{...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),$(this,$t)))}createResult(t,n){var O;const r=$(this,Le),i=this.options,s=$(this,$t),o=$(this,ki),a=$(this,xs),u=t!==r?t.state:$(this,Ca),{state:c}=t;let d={...c},f=!1,h;if(n._optimisticResults){const E=this.hasListeners(),T=!E&&Kh(t,n),j=E&&Vh(t,r,n,i);(T||j)&&(d={...d,...Np(c.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:p}=d;h=d.data;let v=!1;if(n.placeholderData!==void 0&&h===void 0&&p==="pending"){let E;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(E=s.data,v=!0):E=typeof n.placeholderData=="function"?n.placeholderData((O=$(this,Ss))==null?void 0:O.state.data,$(this,Ss)):n.placeholderData,E!==void 0&&(p="success",h=Jc(s==null?void 0:s.data,E,n),f=!0)}if(n.select&&h!==void 0&&!v)if(s&&h===(o==null?void 0:o.data)&&n.select===$(this,_a))h=$(this,ws);else try{Z(this,_a,n.select),h=n.select(h),h=Jc(s==null?void 0:s.data,h,n),Z(this,ws,h),Z(this,Nr,null)}catch(E){Z(this,Nr,E)}$(this,Nr)&&(g=$(this,Nr),h=$(this,ws),m=Date.now(),p="error");const b=d.fetchStatus==="fetching",S=p==="pending",C=p==="error",x=S&&b,k=h!==void 0,_={status:p,fetchStatus:d.fetchStatus,isPending:S,isSuccess:p==="success",isError:C,isInitialLoading:x,isLoading:x,data:h,dataUpdatedAt:d.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!S,isLoadingError:C&&!k,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:C&&k,isStale:_f(t,n),refetch:this.refetch,promise:$(this,Rr),isEnabled:vn(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const E=B=>{_.status==="error"?B.reject(_.error):_.data!==void 0&&B.resolve(_.data)},T=()=>{const B=Z(this,Rr,_.promise=ed());E(B)},j=$(this,Rr);switch(j.status){case"pending":t.queryHash===r.queryHash&&E(j);break;case"fulfilled":(_.status==="error"||_.data!==j.value)&&T();break;case"rejected":(_.status!=="error"||_.error!==j.reason)&&T();break}}return _}updateResult(){const t=$(this,$t),n=this.createResult($(this,Le),this.options);if(Z(this,ki,$(this,Le).state),Z(this,xs,this.options),$(this,ki).data!==void 0&&Z(this,Ss,$(this,Le)),Bl(n,t))return;Z(this,$t,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!$(this,Cs).size)return!0;const o=new Set(s!=null?s:$(this,Cs));return this.options.throwOnError&&o.add("error"),Object.keys($(this,$t)).some(a=>{const l=a;return $(this,$t)[l]!==t[l]&&o.has(l)})};Me(this,Ke,Bp).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Me(this,Ke,id).call(this)}},Nt=new WeakMap,Le=new WeakMap,Ca=new WeakMap,$t=new WeakMap,ki=new WeakMap,xs=new WeakMap,Rr=new WeakMap,Nr=new WeakMap,_a=new WeakMap,ws=new WeakMap,Ss=new WeakMap,Oi=new WeakMap,Ei=new WeakMap,Fr=new WeakMap,Cs=new WeakMap,Ke=new WeakSet,Ao=function(t){Me(this,Ke,ad).call(this);let n=$(this,Le).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Dt)),n},td=function(){Me(this,Ke,sd).call(this);const t=Kr(this.options.staleTime,$(this,Le));if($i||$(this,$t).isStale||!Yc(t))return;const r=Mp($(this,$t).dataUpdatedAt,t)+1;Z(this,Oi,setTimeout(()=>{$(this,$t).isStale||this.updateResult()},r))},nd=function(){var t;return(t=typeof this.options.refetchInterval=="function"?this.options.refetchInterval($(this,Le)):this.options.refetchInterval)!=null?t:!1},rd=function(t){Me(this,Ke,od).call(this),Z(this,Fr,t),!($i||vn(this.options.enabled,$(this,Le))===!1||!Yc($(this,Fr))||$(this,Fr)===0)&&Z(this,Ei,setInterval(()=>{(this.options.refetchIntervalInBackground||Cf.isFocused())&&Me(this,Ke,Ao).call(this)},$(this,Fr)))},id=function(){Me(this,Ke,td).call(this),Me(this,Ke,rd).call(this,Me(this,Ke,nd).call(this))},sd=function(){$(this,Oi)&&(clearTimeout($(this,Oi)),Z(this,Oi,void 0))},od=function(){$(this,Ei)&&(clearInterval($(this,Ei)),Z(this,Ei,void 0))},ad=function(){const t=$(this,Nt).getQueryCache().build($(this,Nt),this.options);if(t===$(this,Le))return;const n=$(this,Le);Z(this,Le,t),Z(this,Ca,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Bp=function(t){yt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n($(this,$t))}),$(this,Nt).getQueryCache().notify({query:$(this,Le),type:"observerResultsUpdated"})})},dp);function Xw(e,t){return vn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Kh(e,t){return Xw(e,t)||e.state.data!==void 0&&ld(e,t,t.refetchOnMount)}function ld(e,t,n){if(vn(t.enabled,e)!==!1&&Kr(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&_f(e,t)}return!1}function Vh(e,t,n,r){return(e!==t||vn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&_f(e,n)}function _f(e,t){return vn(t.enabled,e)!==!1&&e.isStaleByTime(Kr(t.staleTime,e))}function Zw(e,t){return!Bl(e.getCurrentResult(),t)}var Br,qr,Ft,dr,pr,Pl,ud,fp,Jw=(fp=class extends Qs{constructor(n,r){super();de(this,pr);de(this,Br);de(this,qr);de(this,Ft);de(this,dr);Z(this,Br,n),this.setOptions(r),this.bindMethods(),Me(this,pr,Pl).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=$(this,Br).defaultMutationOptions(n),Bl(this.options,r)||$(this,Br).getMutationCache().notify({type:"observerOptionsUpdated",mutation:$(this,Ft),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Di(r.mutationKey)!==Di(this.options.mutationKey)?this.reset():((i=$(this,Ft))==null?void 0:i.state.status)==="pending"&&$(this,Ft).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=$(this,Ft))==null||n.removeObserver(this)}onMutationUpdate(n){Me(this,pr,Pl).call(this),Me(this,pr,ud).call(this,n)}getCurrentResult(){return $(this,qr)}reset(){var n;(n=$(this,Ft))==null||n.removeObserver(this),Z(this,Ft,void 0),Me(this,pr,Pl).call(this),Me(this,pr,ud).call(this)}mutate(n,r){var i;return Z(this,dr,r),(i=$(this,Ft))==null||i.removeObserver(this),Z(this,Ft,$(this,Br).getMutationCache().build($(this,Br),this.options)),$(this,Ft).addObserver(this),$(this,Ft).execute(n)}},Br=new WeakMap,qr=new WeakMap,Ft=new WeakMap,dr=new WeakMap,pr=new WeakSet,Pl=function(){var r,i;const n=(i=(r=$(this,Ft))==null?void 0:r.state)!=null?i:Fp();Z(this,qr,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},ud=function(n){yt.batch(()=>{var r,i,s,o,a,l,u,c;if($(this,dr)&&this.hasListeners()){const d=$(this,qr).variables,f=$(this,qr).context;(n==null?void 0:n.type)==="success"?((i=(r=$(this,dr)).onSuccess)==null||i.call(r,n.data,d,f),(o=(s=$(this,dr)).onSettled)==null||o.call(s,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((l=(a=$(this,dr)).onError)==null||l.call(a,n.error,d,f),(c=(u=$(this,dr)).onSettled)==null||c.call(u,void 0,n.error,d,f))}this.listeners.forEach(d=>{d($(this,qr))})})},fp),qp=I.createContext(void 0),Gt=e=>{const t=I.useContext(qp);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},e3=({client:e,children:t})=>(I.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(qp.Provider,{value:e,children:t})),zp=I.createContext(!1),t3=()=>I.useContext(zp);zp.Provider;function n3(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var r3=I.createContext(n3()),i3=()=>I.useContext(r3),s3=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},o3=e=>{I.useEffect(()=>{e.clearReset()},[e])},a3=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||$p(n,[e.error,r])),l3=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r!=null?r:1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},u3=(e,t)=>e.isLoading&&e.isFetching&&!t,c3=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Wh=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function d3(e,t,n){var d,f,h,g,m;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||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 r=t3(),i=i3(),s=Gt(n),o=s.defaultQueryOptions(e);(f=(d=s.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.call(d,o),process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.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`)),o._optimisticResults=r?"isRestoring":"optimistic",l3(o),s3(o,i),o3(i);const a=!s.getQueryCache().get(o.queryHash),[l]=I.useState(()=>new t(s,o)),u=l.getOptimisticResult(o),c=!r&&e.subscribed!==!1;if(I.useSyncExternalStore(I.useCallback(p=>{const v=c?l.subscribe(yt.batchCalls(p)):Dt;return l.updateResult(),v},[l,c]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),I.useEffect(()=>{l.setOptions(o)},[o,l]),c3(o,u))throw Wh(o,l,i);if(a3({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((g=(h=s.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||g.call(h,o,u),o.experimental_prefetchInRender&&!$i&&u3(u,r)){const p=a?Wh(o,l,i):(m=s.getQueryCache().get(o.queryHash))==null?void 0:m.promise;p==null||p.catch(Dt).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function ni(e,t){return d3(e,Yw,t)}function Sr(e,t){const n=Gt(t),[r]=I.useState(()=>new Jw(n,e));I.useEffect(()=>{r.setOptions(e)},[r,e]);const i=I.useSyncExternalStore(I.useCallback(o=>r.subscribe(yt.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=I.useCallback((o,a)=>{r.mutate(o,a).catch(Dt)},[r]);if(i.error&&$p(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}var Ee={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Qh(this.context.count)},getNextContextId(){return Qh(this.context.count++)}};function Qh(e){const t=String(e),n=t.length-1;return Ee.context.id+(n?String.fromCharCode(96+n):"")+t}function Po(e){Ee.context=e}var Hp=!1,f3=(e,t)=>e===t,zl=Symbol("solid-proxy"),Up=typeof Proxy=="function",Su=Symbol("solid-track"),Hl={equals:f3},Gp=Xp,Cr=1,Ul=2,Kp={owned:null,cleanups:null,context:null,owner:null},lc={},qe=null,uc=null,h3=null,Xe=null,Tt=null,yr=null,Cu=0;function mr(e,t){const n=Xe,r=qe,i=e.length===0,s=t===void 0?r:t,o=i?Kp:{owned:null,cleanups:null,context:s?s.context:null,owner:s},a=i?e:()=>e(()=>at(()=>Wo(o)));qe=o,Xe=null;try{return Zn(a,!0)}finally{Xe=n,qe=r}}function ce(e,t){t=t?Object.assign({},Hl,t):Hl;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=i=>(typeof i=="function"&&(i=i(n.value)),Yp(n,i));return[Qp.bind(n),r]}function Vp(e,t,n){const r=_u(e,t,!0,Cr);Ys(r)}function be(e,t,n){const r=_u(e,t,!1,Cr);Ys(r)}function xe(e,t,n){Gp=_3;const r=_u(e,t,!1,Cr);(!n||!n.render)&&(r.user=!0),yr?yr.push(r):Ys(r)}function U(e,t,n){n=n?Object.assign({},Hl,n):Hl;const r=_u(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Ys(r),Qp.bind(r)}function g3(e){return e&&typeof e=="object"&&"then"in e}function y3(e,t,n){let r,i,s;r=!0,i=e,s={};let o=null,a=lc,l=null,u=!1,c="initialValue"in s,d=typeof r=="function"&&U(r);const f=new Set,[h,g]=(s.storage||ce)(s.initialValue),[m,p]=ce(void 0),[v,b]=ce(void 0,{equals:!1}),[S,C]=ce(c?"ready":"unresolved");Ee.context&&(l=Ee.getNextContextId(),s.ssrLoadFrom==="initial"?a=s.initialValue:Ee.load&&Ee.has(l)&&(a=Ee.load(l)));function x(O,E,T,j){return o===O&&(o=null,j!==void 0&&(c=!0),(O===a||E===a)&&s.onHydrated&&queueMicrotask(()=>s.onHydrated(j,{value:E})),a=lc,k(E,T)),E}function k(O,E){Zn(()=>{E===void 0&&g(()=>O),C(E!==void 0?"errored":c?"ready":"unresolved"),p(E);for(const T of f.keys())T.decrement();f.clear()},!1)}function w(){const O=w3,E=h(),T=m();if(T!==void 0&&!o)throw T;return Xe&&Xe.user,E}function _(O=!0){if(O!==!1&&u)return;u=!1;const E=d?d():r;if(E==null||E===!1){x(o,at(h));return}const T=a!==lc?a:at(()=>i(E,{value:h(),refetching:O}));return g3(T)?(o=T,"value"in T?(T.status==="success"?x(o,T.value,void 0,E):x(o,void 0,cd(T.value),E),T):(u=!0,queueMicrotask(()=>u=!1),Zn(()=>{C(c?"refreshing":"pending"),b()},!1),T.then(j=>x(T,j,void 0,E),j=>x(T,void 0,cd(j),E)))):(x(o,T,void 0,E),T)}return Object.defineProperties(w,{state:{get:()=>S()},error:{get:()=>m()},loading:{get(){const O=S();return O==="pending"||O==="refreshing"}},latest:{get(){if(!c)return w();const O=m();if(O&&!o)throw O;return h()}}}),d?Vp(()=>_(!1)):_(!1),[w,{refetch:_,mutate:g}]}function m3(e){return Zn(e,!1)}function at(e){if(Xe===null)return e();const t=Xe;Xe=null;try{return e()}finally{Xe=t}}function br(e,t,n){const r=Array.isArray(e);let i,s=n&&n.defer;return o=>{let a;if(r){a=Array(e.length);for(let u=0;u<e.length;u++)a[u]=e[u]()}else a=e();if(s)return s=!1,o;const l=at(()=>t(a,i,o));return i=a,l}}function xr(e){xe(()=>at(e))}function _e(e){return qe===null||(qe.cleanups===null?qe.cleanups=[e]:qe.cleanups.push(e)),e}function Yh(){return qe}function p3(e,t){const n=qe,r=Xe;qe=e,Xe=null;try{return Zn(t,!0)}catch(i){kf(i)}finally{qe=n,Xe=r}}function v3(e){const t=Xe,n=qe;return Promise.resolve().then(()=>{Xe=t,qe=n;let r;return Zn(e,!1),Xe=qe=null,r?r.done:void 0})}var[b3,XL]=ce(!1);function x3(){return[b3,v3]}function wt(e,t){const n=Symbol("context");return{id:n,Provider:k3(n),defaultValue:e}}function St(e){let t;return qe&&qe.context&&(t=qe.context[e.id])!==void 0?t:e.defaultValue}function Wp(e){const t=U(e),n=U(()=>dd(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}var w3;function Qp(){if(this.sources&&this.state)if(this.state===Cr)Ys(this);else{const e=Tt;Tt=null,Zn(()=>Kl(this),!1),Tt=e}if(Xe){const e=this.observers?this.observers.length:0;Xe.sources?(Xe.sources.push(this),Xe.sourceSlots.push(e)):(Xe.sources=[this],Xe.sourceSlots=[e]),this.observers?(this.observers.push(Xe),this.observerSlots.push(Xe.sources.length-1)):(this.observers=[Xe],this.observerSlots=[Xe.sources.length-1])}return this.value}function Yp(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Zn(()=>{for(let i=0;i<e.observers.length;i+=1){const s=e.observers[i],o=uc&&uc.running;o&&uc.disposed.has(s),(o?!s.tState:!s.state)&&(s.pure?Tt.push(s):yr.push(s),s.observers&&Zp(s)),o||(s.state=Cr)}if(Tt.length>1e6)throw Tt=[],new Error},!1)),t}function Ys(e){if(!e.fn)return;Wo(e);const t=Cu;S3(e,e.value,t)}function S3(e,t,n){let r;const i=qe,s=Xe;Xe=qe=e;try{r=e.fn(t)}catch(o){return e.pure&&(e.state=Cr,e.owned&&e.owned.forEach(Wo),e.owned=null),e.updatedAt=n+1,kf(o)}finally{Xe=s,qe=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Yp(e,r):e.value=r,e.updatedAt=n)}function _u(e,t,n,r=Cr,i){const s={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:qe,context:qe?qe.context:null,pure:n};return qe===null||qe!==Kp&&(qe.owned?qe.owned.push(s):qe.owned=[s]),s}function Gl(e){if(e.state===0)return;if(e.state===Ul)return Kl(e);if(e.suspense&&at(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Cu);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===Cr)Ys(e);else if(e.state===Ul){const r=Tt;Tt=null,Zn(()=>Kl(e,t[0]),!1),Tt=r}}function Zn(e,t){if(Tt)return e();let n=!1;t||(Tt=[]),yr?n=!0:yr=[],Cu++;try{const r=e();return C3(n),r}catch(r){n||(yr=null),Tt=null,kf(r)}}function C3(e){if(Tt&&(Xp(Tt),Tt=null),e)return;const t=yr;yr=null,t.length&&Zn(()=>Gp(t),!1)}function Xp(e){for(let t=0;t<e.length;t++)Gl(e[t])}function _3(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Gl(r)}if(Ee.context){if(Ee.count){Ee.effects||(Ee.effects=[]),Ee.effects.push(...e.slice(0,n));return}Po()}for(Ee.effects&&(Ee.done||!Ee.count)&&(e=[...Ee.effects,...e],n+=Ee.effects.length,delete Ee.effects),t=0;t<n;t++)Gl(e[t])}function Kl(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const i=r.state;i===Cr?r!==t&&(!r.updatedAt||r.updatedAt<Cu)&&Gl(r):i===Ul&&Kl(r,t)}}}function Zp(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=Ul,n.pure?Tt.push(n):yr.push(n),n.observers&&Zp(n))}}function Wo(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),i=n.observers;if(i&&i.length){const s=i.pop(),o=n.observerSlots.pop();r<i.length&&(s.sourceSlots[o]=r,i[r]=s,n.observerSlots[r]=o)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Wo(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Wo(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function cd(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function kf(e,t=qe){throw cd(e)}function dd(e){if(typeof e=="function"&&!e.length)return dd(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=dd(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function k3(e,t){return function(r){let i;return be(()=>i=at(()=>(qe.context={...qe.context,[e]:r.value},Wp(()=>r.children))),void 0),i}}var fd=Symbol("fallback");function Vl(e){for(let t=0;t<e.length;t++)e[t]()}function O3(e,t,n={}){let r=[],i=[],s=[],o=0,a=t.length>1?[]:null;return _e(()=>Vl(s)),()=>{let l=e()||[],u=l.length,c,d;return l[Su],at(()=>{let h,g,m,p,v,b,S,C,x;if(u===0)o!==0&&(Vl(s),s=[],r=[],i=[],o=0,a&&(a=[])),n.fallback&&(r=[fd],i[0]=mr(k=>(s[0]=k,n.fallback())),o=1);else if(o===0){for(i=new Array(u),d=0;d<u;d++)r[d]=l[d],i[d]=mr(f);o=u}else{for(m=new Array(u),p=new Array(u),a&&(v=new Array(u)),b=0,S=Math.min(o,u);b<S&&r[b]===l[b];b++);for(S=o-1,C=u-1;S>=b&&C>=b&&r[S]===l[C];S--,C--)m[C]=i[S],p[C]=s[S],a&&(v[C]=a[S]);for(h=new Map,g=new Array(C+1),d=C;d>=b;d--)x=l[d],c=h.get(x),g[d]=c===void 0?-1:c,h.set(x,d);for(c=b;c<=S;c++)x=r[c],d=h.get(x),d!==void 0&&d!==-1?(m[d]=i[c],p[d]=s[c],a&&(v[d]=a[c]),d=g[d],h.set(x,d)):s[c]();for(d=b;d<u;d++)d in m?(i[d]=m[d],s[d]=p[d],a&&(a[d]=v[d],a[d](d))):i[d]=mr(f);i=i.slice(0,o=u),r=l.slice(0)}return i});function f(h){if(s[d]=h,a){const[g,m]=ce(d);return a[d]=m,t(l[d],g)}return t(l[d])}}}function E3(e,t,n={}){let r=[],i=[],s=[],o=[],a=0,l;return _e(()=>Vl(s)),()=>{const u=e()||[],c=u.length;return u[Su],at(()=>{if(c===0)return a!==0&&(Vl(s),s=[],r=[],i=[],a=0,o=[]),n.fallback&&(r=[fd],i[0]=mr(f=>(s[0]=f,n.fallback())),a=1),i;for(r[0]===fd&&(s[0](),s=[],r=[],i=[],a=0),l=0;l<c;l++)l<r.length&&r[l]!==u[l]?o[l](()=>u[l]):l>=r.length&&(i[l]=mr(d));for(;l<r.length;l++)s[l]();return a=o.length=s.length=c,r=u.slice(0),i=i.slice(0,a)});function d(f){s[l]=f;const[h,g]=ce(u[l]);return o[l]=g,t(h,l)}}}function L(e,t){return at(()=>e(t||{}))}function nl(){return!0}var hd={get(e,t,n){return t===zl?n:e.get(t)},has(e,t){return t===zl?!0:e.has(t)},set:nl,deleteProperty:nl,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:nl,deleteProperty:nl}},ownKeys(e){return e.keys()}};function cc(e){return(e=typeof e=="function"?e():e)?e:{}}function A3(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function Ae(...e){let t=!1;for(let o=0;o<e.length;o++){const a=e[o];t=t||!!a&&zl in a,e[o]=typeof a=="function"?(t=!0,U(a)):a}if(Up&&t)return new Proxy({get(o){for(let a=e.length-1;a>=0;a--){const l=cc(e[a])[o];if(l!==void 0)return l}},has(o){for(let a=e.length-1;a>=0;a--)if(o in cc(e[a]))return!0;return!1},keys(){const o=[];for(let a=0;a<e.length;a++)o.push(...Object.keys(cc(e[a])));return[...new Set(o)]}},hd);const n={},r=Object.create(null);for(let o=e.length-1;o>=0;o--){const a=e[o];if(!a)continue;const l=Object.getOwnPropertyNames(a);for(let u=l.length-1;u>=0;u--){const c=l[u];if(c==="__proto__"||c==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,c);if(!r[c])r[c]=d.get?{enumerable:!0,configurable:!0,get:A3.bind(n[c]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const f=n[c];f&&(d.get?f.push(d.get.bind(a)):d.value!==void 0&&f.push(()=>d.value))}}}const i={},s=Object.keys(r);for(let o=s.length-1;o>=0;o--){const a=s[o],l=r[a];l&&l.get?Object.defineProperty(i,a,l):i[a]=l?l.value:void 0}return i}function Ve(e,...t){if(Up&&zl in e){const i=new Set(t.length>1?t.flat():t[0]),s=t.map(o=>new Proxy({get(a){return o.includes(a)?e[a]:void 0},has(a){return o.includes(a)&&a in e},keys(){return o.filter(a=>a in e)}},hd));return s.push(new Proxy({get(o){return i.has(o)?void 0:e[o]},has(o){return i.has(o)?!1:o in e},keys(){return Object.keys(e).filter(o=>!i.has(o))}},hd)),s}const n={},r=t.map(()=>({}));for(const i of Object.getOwnPropertyNames(e)){const s=Object.getOwnPropertyDescriptor(e,i),o=!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable;let a=!1,l=0;for(const u of t)u.includes(i)&&(a=!0,o?r[l][i]=s.value:Object.defineProperty(r[l],i,s)),++l;a||(o?n[i]=s.value:Object.defineProperty(n,i,s))}return[...r,n]}function Jp(e){let t,n;const r=i=>{const s=Ee.context;if(s){const[a,l]=ce();Ee.count||(Ee.count=0),Ee.count++,(n||(n=e())).then(u=>{!Ee.done&&Po(s),Ee.count--,l(()=>u.default),Po()}),t=a}else if(!t){const[a]=y3(()=>(n||(n=e())).then(l=>l.default));t=a}let o;return U(()=>(o=t())?at(()=>{if(!s||Ee.done)return o(i);const a=Ee.context;Po(s);const l=o(i);return Po(a),l}):"")};return r.preload=()=>n||((n=e()).then(i=>t=()=>i.default),n),r}var P3=0;function kn(){return Ee.context?Ee.getNextContextId():`cl-${P3++}`}var ev=e=>`Stale read from <${e}>.`;function T3(e){const t="fallback"in e&&{fallback:()=>e.fallback};return U(O3(()=>e.each,e.children,t||void 0))}function M3(e){const t="fallback"in e&&{fallback:()=>e.fallback};return U(E3(()=>e.each,e.children,t||void 0))}function ve(e){const t=e.keyed,n=U(()=>e.when,void 0,void 0),r=t?n:U(n,void 0,{equals:(i,s)=>!i==!s});return U(()=>{const i=r();if(i){const s=e.children;return typeof s=="function"&&s.length>0?at(()=>s(t?i:()=>{if(!at(r))throw ev("Show");return n()})):s}return e.fallback},void 0,void 0)}function j3(e){const t=Wp(()=>e.children),n=U(()=>{const r=t(),i=Array.isArray(r)?r:[r];let s=()=>{};for(let o=0;o<i.length;o++){const a=o,l=i[o],u=s,c=U(()=>u()?void 0:l.when,void 0,void 0),d=l.keyed?c:U(c,void 0,{equals:(f,h)=>!f==!h});s=()=>u()||(d()?[a,c,l]:void 0)}return s});return U(()=>{const r=n()();if(!r)return e.fallback;const[i,s,o]=r,a=o.children;return typeof a=="function"&&a.length>0?at(()=>a(o.keyed?s():()=>{var u;if(((u=at(n)())==null?void 0:u[0])!==i)throw ev("Match");return s()})):a},void 0,void 0)}function dc(e){return e}var $3=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],D3=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...$3]),L3=new Set(["innerHTML","textContent","innerText","children"]),I3=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),R3=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function N3(e,t){const n=R3[e];return typeof n=="object"?n[t]?n.$:void 0:n}var F3=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),B3=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),q3={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function z3(e,t,n){let r=n.length,i=t.length,s=r,o=0,a=0,l=t[i-1].nextSibling,u=null;for(;o<i||a<s;){if(t[o]===n[a]){o++,a++;continue}for(;t[i-1]===n[s-1];)i--,s--;if(i===o){const c=s<r?a?n[a-1].nextSibling:n[s-a]:l;for(;a<s;)e.insertBefore(n[a++],c)}else if(s===a)for(;o<i;)(!u||!u.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[s-1]&&n[a]===t[i-1]){const c=t[--i].nextSibling;e.insertBefore(n[a++],t[o++].nextSibling),e.insertBefore(n[--s],c),t[i]=n[s]}else{if(!u){u=new Map;let d=a;for(;d<s;)u.set(n[d],d++)}const c=u.get(t[o]);if(c!=null)if(a<c&&c<s){let d=o,f=1,h;for(;++d<i&&d<s&&!((h=u.get(t[d]))==null||h!==c+f);)f++;if(f>c-a){const g=t[o];for(;a<c;)e.insertBefore(n[a++],g)}else e.replaceChild(n[a++],t[o++])}else o++;else t[o++].remove()}}}var Bo="_$DX_DELEGATE";function tv(e,t,n,r={}){let i;return mr(s=>{i=s,t===document?e():V(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=""}}function he(e,t,n,r){let i;const s=()=>{const a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},o=()=>(i||(i=s())).cloneNode(!0);return o.cloneNode=o,o}function ku(e,t=window.document){const n=t[Bo]||(t[Bo]=new Set);for(let r=0,i=e.length;r<i;r++){const s=e[r];n.has(s)||(n.add(s),t.addEventListener(s,iv))}}function H3(e=window.document){if(e[Bo]){for(let t of e[Bo].keys())e.removeEventListener(t,iv);delete e[Bo]}}function re(e,t,n){Ui(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function U3(e,t,n,r){Ui(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function G3(e,t,n){Ui(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function se(e,t){Ui(e)||(t==null?e.removeAttribute("class"):e.className=t)}function nv(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const i=n[0];e.addEventListener(t,n[0]=s=>i.call(e,n[1],s))}else e.addEventListener(t,n,typeof n!="function"&&n)}function K3(e,t,n={}){const r=Object.keys(t||{}),i=Object.keys(n);let s,o;for(s=0,o=i.length;s<o;s++){const a=i[s];!a||a==="undefined"||t[a]||(Xh(e,a,!1),delete n[a])}for(s=0,o=r.length;s<o;s++){const a=r[s],l=!!t[a];!a||a==="undefined"||n[a]===l||!l||(Xh(e,a,!0),n[a]=l)}return n}function V3(e,t,n){if(!t)return n?re(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let i,s;for(s in n)t[s]==null&&r.removeProperty(s),delete n[s];for(s in t)i=t[s],i!==n[s]&&(r.setProperty(s,i),n[s]=i);return n}function rv(e,t={},n,r){const i={};return r||be(()=>i.children=Qo(e,t.children,i.children)),be(()=>typeof t.ref=="function"&&Xs(t.ref,e)),be(()=>W3(e,t,n,!0,i,!0)),i}function Xs(e,t,n){return at(()=>e(t,n))}function V(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Qo(e,t,r,n);be(i=>Qo(e,t(),i,n),r)}function W3(e,t,n,r,i={},s=!1){t||(t={});for(const o in i)if(!(o in t)){if(o==="children")continue;i[o]=Zh(e,o,null,i[o],n,s,t)}for(const o in t){if(o==="children")continue;const a=t[o];i[o]=Zh(e,o,a,i[o],n,s,t)}}function Q3(e){let t,n;return!Ui()||!(t=Ee.registry.get(n=X3()))?e():(Ee.completed&&Ee.completed.add(t),Ee.registry.delete(n),t)}function Ui(e){return!!Ee.context&&!Ee.done&&(!e||e.isConnected)}function Y3(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Xh(e,t,n){const r=t.trim().split(/\s+/);for(let i=0,s=r.length;i<s;i++)e.classList.toggle(r[i],n)}function Zh(e,t,n,r,i,s,o){let a,l,u,c,d;if(t==="style")return V3(e,n,r);if(t==="classList")return K3(e,n,r);if(n===r)return r;if(t==="ref")s||n(e);else if(t.slice(0,3)==="on:"){const f=t.slice(3);r&&e.removeEventListener(f,r,typeof r!="function"&&r),n&&e.addEventListener(f,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const f=t.slice(10);r&&e.removeEventListener(f,r,!0),n&&e.addEventListener(f,n,!0)}else if(t.slice(0,2)==="on"){const f=t.slice(2).toLowerCase(),h=F3.has(f);if(!h&&r){const g=Array.isArray(r)?r[0]:r;e.removeEventListener(f,g)}(h||n)&&(nv(e,f,n,h),h&&ku([f]))}else if(t.slice(0,5)==="attr:")re(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")G3(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(u=L3.has(t))||!i&&((c=N3(t,e.tagName))||(l=D3.has(t)))||(a=e.nodeName.includes("-")||"is"in o)){if(d)t=t.slice(5),l=!0;else if(Ui(e))return n;t==="class"||t==="className"?se(e,n):a&&!l&&!u?e[Y3(t)]=n:e[c||t]=n}else{const f=i&&t.indexOf(":")>-1&&q3[t.split(":")[0]];f?U3(e,f,t,n):re(e,I3[t]||t,n)}return n}function iv(e){if(Ee.registry&&Ee.events&&Ee.events.find(([l,u])=>u===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,i=e.currentTarget,s=l=>Object.defineProperty(e,"target",{configurable:!0,value:l}),o=()=>{const l=t[n];if(l&&!t.disabled){const u=t[`${n}Data`];if(u!==void 0?l.call(t,u,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&s(t.host),!0},a=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),Ee.registry&&!Ee.done&&(Ee.done=_$HY.done=!0),e.composedPath){const l=e.composedPath();s(l[0]);for(let u=0;u<l.length-2&&(t=l[u],!!o());u++){if(t._$host){t=t._$host,a();break}if(t.parentNode===i)break}}else a();s(r)}function Qo(e,t,n,r,i){const s=Ui(e);if(s){!n&&(n=[...e.childNodes]);let l=[];for(let u=0;u<n.length;u++){const c=n[u];c.nodeType===8&&c.data.slice(0,2)==="!$"?c.remove():l.push(c)}n=l}for(;typeof n=="function";)n=n();if(t===n)return n;const o=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,o==="string"||o==="number"){if(s||o==="number"&&(t=t.toString(),t===n))return n;if(a){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=Xi(e,n,r,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||o==="boolean"){if(s)return n;n=Xi(e,n,r)}else{if(o==="function")return be(()=>{let l=t();for(;typeof l=="function";)l=l();n=Qo(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],u=n&&Array.isArray(n);if(gd(l,t,n,i))return be(()=>n=Qo(e,l,n,r,!0)),()=>n;if(s){if(!l.length)return n;if(r===void 0)return n=[...e.childNodes];let c=l[0];if(c.parentNode!==e)return n;const d=[c];for(;(c=c.nextSibling)!==r;)d.push(c);return n=d}if(l.length===0){if(n=Xi(e,n,r),a)return n}else u?n.length===0?Jh(e,l,r):z3(e,n,l):(n&&Xi(e),Jh(e,l));n=l}else if(t.nodeType){if(s&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=Xi(e,n,r,t);Xi(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function gd(e,t,n,r){let i=!1;for(let s=0,o=t.length;s<o;s++){let a=t[s],l=n&&n[e.length],u;if(!(a==null||a===!0||a===!1))if((u=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))i=gd(e,a,l)||i;else if(u==="function")if(r){for(;typeof a=="function";)a=a();i=gd(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||i}else e.push(a),i=!0;else{const c=String(a);l&&l.nodeType===3&&l.data===c?e.push(l):e.push(document.createTextNode(c))}}return i}function Jh(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Xi(e,t,n,r){if(n===void 0)return e.textContent="";const i=r||document.createTextNode("");if(t.length){let s=!1;for(let o=t.length-1;o>=0;o--){const a=t[o];if(i!==a){const l=a.parentNode===e;!s&&!o?l?e.replaceChild(i,a):e.insertBefore(i,n):l&&a.remove()}else s=!0}}else e.insertBefore(i,n);return[i]}function X3(){return Ee.getNextContextId()}var Z3="http://www.w3.org/2000/svg";function sv(e,t=!1){return t?document.createElementNS(Z3,e):document.createElement(e)}function ov(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,i=Yh();let s,o=!!Ee.context;return xe(()=>{o&&(Yh().user=o=!1),s||(s=p3(i,()=>U(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[l,u]=ce(!1),c=()=>u(!0);mr(d=>V(a,()=>l()?d():s(),null)),_e(c)}else{const l=sv(e.isSVG?"g":"div",e.isSVG),u=t&&l.attachShadow?l.attachShadow({mode:"open"}):l;Object.defineProperty(l,"_$host",{get(){return n.parentNode},configurable:!0}),V(u,s),a.appendChild(l),e.ref&&e.ref(l),_e(()=>a.removeChild(l))}},void 0,{render:!o}),n}function J3(e,t){const n=U(e);return U(()=>{const r=n();switch(typeof r){case"function":return at(()=>r(t));case"string":const i=B3.has(r),s=Ee.context?Q3():sv(r,i);return rv(s,t,i),s}})}function eS(e){const[,t]=Ve(e,["component"]);return J3(()=>e.component,t)}var tS=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},av=class{constructor(t){this.generateIdentifier=t,this.kv=new tS}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}},nS=class extends av{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t=="object"?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};function rS(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function iS(e,t){const n=rS(e);if("find"in n)return n.find(t);const r=n;for(let i=0;i<r.length;i++){const s=r[i];if(t(s))return s}}function zs(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function Tl(e,t){return e.indexOf(t)!==-1}function e0(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}var sS=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return iS(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}},oS=e=>Object.prototype.toString.call(e).slice(8,-1),lv=e=>typeof e=="undefined",aS=e=>e===null,Yo=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,yd=e=>Yo(e)&&Object.keys(e).length===0,Yr=e=>Array.isArray(e),lS=e=>typeof e=="string",uS=e=>typeof e=="number"&&!isNaN(e),cS=e=>typeof e=="boolean",dS=e=>e instanceof RegExp,Xo=e=>e instanceof Map,Zo=e=>e instanceof Set,uv=e=>oS(e)==="Symbol",fS=e=>e instanceof Date&&!isNaN(e.valueOf()),hS=e=>e instanceof Error,t0=e=>typeof e=="number"&&isNaN(e),gS=e=>cS(e)||aS(e)||lv(e)||uS(e)||lS(e)||uv(e),yS=e=>typeof e=="bigint",mS=e=>e===1/0||e===-1/0,pS=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),vS=e=>e instanceof URL,cv=e=>e.replace(/\./g,"\\."),fc=e=>e.map(String).map(cv).join("."),qo=e=>{const t=[];let n="";for(let i=0;i<e.length;i++){let s=e.charAt(i);if(s==="\\"&&e.charAt(i+1)==="."){n+=".",i++;continue}if(s==="."){t.push(n),n="";continue}n+=s}const r=n;return t.push(r),t};function Fn(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var dv=[Fn(lv,"undefined",()=>null,()=>{}),Fn(yS,"bigint",e=>e.toString(),e=>typeof BigInt!="undefined"?BigInt(e):e),Fn(fS,"Date",e=>e.toISOString(),e=>new Date(e)),Fn(hS,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n}),Fn(dS,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),Fn(Zo,"set",e=>[...e.values()],e=>new Set(e)),Fn(Xo,"map",e=>[...e.entries()],e=>new Map(e)),Fn(e=>t0(e)||mS(e),"number",e=>t0(e)?"NaN":e>0?"Infinity":"-Infinity",Number),Fn(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),Fn(vS,"URL",e=>e.toString(),e=>new URL(e))];function Ou(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var fv=Ou((e,t)=>uv(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),bS=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),hv=Ou(pS,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=bS[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function gv(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var yv=Ou(gv,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const r={};return n.forEach(i=>{r[i]=e[i]}),r},(e,t,n)=>{const r=n.classRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(r.prototype),e)}),mv=Ou((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),xS=[yv,fv,mv,hv],n0=(e,t)=>{const n=e0(xS,i=>i.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=e0(dv,i=>i.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},pv={};dv.forEach(e=>{pv[e.annotation]=e});var wS=(e,t,n)=>{if(Yr(t))switch(t[0]){case"symbol":return fv.untransform(e,t,n);case"class":return yv.untransform(e,t,n);case"custom":return mv.untransform(e,t,n);case"typed-array":return hv.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=pv[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}},ss=(e,t)=>{const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function vv(e){if(Tl(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Tl(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Tl(e,"constructor"))throw new Error("constructor is not allowed as a property")}var SS=(e,t)=>{vv(t);for(let n=0;n<t.length;n++){const r=t[n];if(Zo(e))e=ss(e,+r);else if(Xo(e)){const i=+r,s=+t[++n]==0?"key":"value",o=ss(e,i);switch(s){case"key":e=o;break;case"value":e=e.get(o);break}}else e=e[r]}return e},md=(e,t,n)=>{if(vv(t),t.length===0)return n(e);let r=e;for(let s=0;s<t.length-1;s++){const o=t[s];if(Yr(r)){const a=+o;r=r[a]}else if(Yo(r))r=r[o];else if(Zo(r)){const a=+o;r=ss(r,a)}else if(Xo(r)){if(s===t.length-2)break;const l=+o,u=+t[++s]==0?"key":"value",c=ss(r,l);switch(u){case"key":r=c;break;case"value":r=r.get(c);break}}}const i=t[t.length-1];if(Yr(r)?r[+i]=n(r[+i]):Yo(r)&&(r[i]=n(r[i])),Zo(r)){const s=ss(r,+i),o=n(s);s!==o&&(r.delete(s),r.add(o))}if(Xo(r)){const s=+t[t.length-2],o=ss(r,s);switch(+i==0?"key":"value"){case"key":{const l=n(o);r.set(l,r.get(o)),l!==o&&r.delete(o);break}case"value":{r.set(o,n(r.get(o)));break}}}return e};function pd(e,t,n=[]){if(!e)return;if(!Yr(e)){zs(e,(s,o)=>pd(s,t,[...n,...qo(o)]));return}const[r,i]=e;i&&zs(i,(s,o)=>{pd(s,t,[...n,...qo(o)])}),t(r,n)}function CS(e,t,n){return pd(t,(r,i)=>{e=md(e,i,s=>wS(s,r,n))}),e}function _S(e,t){function n(r,i){const s=SS(e,qo(i));r.map(qo).forEach(o=>{e=md(e,o,()=>s)})}if(Yr(t)){const[r,i]=t;r.forEach(s=>{e=md(e,qo(s),()=>e)}),i&&zs(i,n)}else zs(t,n);return e}var kS=(e,t)=>Yo(e)||Yr(e)||Xo(e)||Zo(e)||gv(e,t);function OS(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function ES(e,t){const n={};let r;return e.forEach(i=>{if(i.length<=1)return;t||(i=i.map(a=>a.map(String)).sort((a,l)=>a.length-l.length));const[s,...o]=i;s.length===0?r=o.map(fc):n[fc(s)]=o.map(fc)}),r?yd(n)?[r]:[r,n]:yd(n)?void 0:n}var bv=(e,t,n,r,i=[],s=[],o=new Map)=>{var h;const a=gS(e);if(!a){OS(e,i,t);const g=o.get(e);if(g)return r?{transformedValue:null}:g}if(!kS(e,n)){const g=n0(e,n),m=g?{transformedValue:g.value,annotations:[g.type]}:{transformedValue:e};return a||o.set(e,m),m}if(Tl(s,e))return{transformedValue:null};const l=n0(e,n),u=(h=l==null?void 0:l.value)!=null?h:e,c=Yr(u)?[]:{},d={};zs(u,(g,m)=>{if(m==="__proto__"||m==="constructor"||m==="prototype")throw new Error(`Detected property ${m}. This is a prototype pollution risk, please remove it from your object.`);const p=bv(g,t,n,r,[...i,m],[...s,e],o);c[m]=p.transformedValue,Yr(p.annotations)?d[m]=p.annotations:Yo(p.annotations)&&zs(p.annotations,(v,b)=>{d[cv(m)+"."+b]=v})});const f=yd(d)?{transformedValue:c,annotations:l?[l.type]:void 0}:{transformedValue:c,annotations:l?[l.type,d]:d};return a||o.set(e,f),f};function xv(e){return Object.prototype.toString.call(e).slice(8,-1)}function r0(e){return xv(e)==="Array"}function AS(e){if(xv(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function PS(e,t,n,r,i){const s={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";s==="enumerable"&&(e[t]=n),i&&s==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function vd(e,t={}){if(r0(e))return e.map(i=>vd(i,t));if(!AS(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((i,s)=>{if(r0(t.props)&&!t.props.includes(s))return i;const o=e[s],a=vd(o,t);return PS(i,s,a,e,t.nonenumerable),i},{})}var Ze=class{constructor({dedupe:e=!1}={}){this.classRegistry=new nS,this.symbolRegistry=new av(t=>{var n;return(n=t.description)!=null?n:""}),this.customTransformerRegistry=new sS,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=bv(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});const i=ES(t,this.dedupe);return i&&(r.meta={...r.meta,referentialEqualities:i}),r}deserialize(e){const{json:t,meta:n}=e;let r=vd(t);return n!=null&&n.values&&(r=CS(r,n.values,this)),n!=null&&n.referentialEqualities&&(r=_S(r,n.referentialEqualities)),r}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};Ze.defaultInstance=new Ze;Ze.serialize=Ze.defaultInstance.serialize.bind(Ze.defaultInstance);Ze.deserialize=Ze.defaultInstance.deserialize.bind(Ze.defaultInstance);Ze.stringify=Ze.defaultInstance.stringify.bind(Ze.defaultInstance);Ze.parse=Ze.defaultInstance.parse.bind(Ze.defaultInstance);Ze.registerClass=Ze.defaultInstance.registerClass.bind(Ze.defaultInstance);Ze.registerSymbol=Ze.defaultInstance.registerSymbol.bind(Ze.defaultInstance);Ze.registerCustom=Ze.defaultInstance.registerCustom.bind(Ze.defaultInstance);Ze.allowErrorProps=Ze.defaultInstance.allowErrorProps.bind(Ze.defaultInstance);var wv=Ze.serialize,TS=Ze.stringify;function ts(e){return e.state.fetchStatus==="fetching"?"fetching":e.getObserversCount()?e.state.fetchStatus==="paused"?"paused":e.isStale()?"stale":"fresh":"inactive"}function MS(e,t){return`${e}${t.charAt(0).toUpperCase()+t.slice(1)}`}function jS({queryState:e,observerCount:t,isStale:n}){return e.fetchStatus==="fetching"?"blue":t?e.fetchStatus==="paused"?"purple":n?"yellow":"green":"gray"}function os({status:e,isPaused:t}){return t?"purple":e==="error"?"red":e==="pending"?"yellow":e==="success"?"green":"gray"}function $S(e){return e==="fresh"?"green":e==="stale"?"yellow":e==="paused"?"purple":e==="inactive"?"gray":"blue"}var Wl=(e,t=!1)=>{const{json:n}=wv(e);return JSON.stringify(n,null,t?2:void 0)},rl=e=>e.state.fetchStatus!=="idle"?0:e.getObserversCount()?e.isStale()?2:1:3,DS=(e,t)=>e.queryHash.localeCompare(t.queryHash),Sv=(e,t)=>e.state.dataUpdatedAt<t.state.dataUpdatedAt?1:-1,LS=(e,t)=>rl(e)===rl(t)?Sv(e,t):rl(e)>rl(t)?1:-1,bd={status:LS,"query hash":DS,"last updated":Sv},il=e=>e.state.isPaused?0:e.state.status==="error"?2:e.state.status==="pending"?1:3,Cv=(e,t)=>e.state.submittedAt<t.state.submittedAt?1:-1,IS=(e,t)=>il(e)===il(t)?Cv(e,t):il(e)>il(t)?1:-1,xd={status:IS,"last updated":Cv},i0=e=>e*parseFloat(getComputedStyle(document.documentElement).fontSize),_v=()=>{const[e,t]=ce("dark");return xr(()=>{const n=window.matchMedia("(prefers-color-scheme: dark)");t(n.matches?"dark":"light");const r=i=>{t(i.matches?"dark":"light")};n.addEventListener("change",r),_e(()=>n.removeEventListener("change",r))}),e},mi=(e,t,n)=>{if(t.length===0)return n;if(e instanceof Map){const r=new Map(e);if(t.length===1)return r.set(t[0],n),r;const[i,...s]=t;return r.set(i,mi(r.get(i),s,n)),r}if(e instanceof Set){const r=mi(Array.from(e),t,n);return new Set(r)}if(Array.isArray(e)){const r=[...e];if(t.length===1)return r[t[0]]=n,r;const[i,...s]=t;return r[i]=mi(r[i],s,n),r}if(e instanceof Object){const r={...e};if(t.length===1)return r[t[0]]=n,r;const[i,...s]=t;return r[i]=mi(r[i],s,n),r}return e},To=(e,t)=>{if(e instanceof Map){const n=new Map(e);if(t.length===1)return n.delete(t[0]),n;const[r,...i]=t;return n.set(r,To(n.get(r),i)),n}if(e instanceof Set){const n=To(Array.from(e),t);return new Set(n)}if(Array.isArray(e)){const n=[...e];if(t.length===1)return n.filter((s,o)=>o.toString()!==t[0]);const[r,...i]=t;return n[r]=To(n[r],i),n}if(e instanceof Object){const n={...e};if(t.length===1)return delete n[t[0]],n;const[r,...i]=t;return n[r]=To(n[r],i),n}return e},kv=(e,t)=>{if(!e||document.querySelector("#_goober")||(t==null?void 0:t.querySelector("#_goober")))return;const r=document.createElement("style"),i=document.createTextNode("");r.appendChild(i),r.id="_goober",r.setAttribute("nonce",e),t?t.appendChild(r):document.head.appendChild(r)},_s,ka,Oa,Ea,Ai,Aa,ks,Os,Es,As,Ps,Ts,Pa,hp,RS=(hp=class{constructor(e){de(this,_s);de(this,ka);de(this,Oa);de(this,Ea);de(this,Ai,!1);de(this,Aa);de(this,ks);de(this,Os);de(this,Es);de(this,As);de(this,Ps);de(this,Ts);de(this,Pa);const{client:t,queryFlavor:n,version:r,onlineManager:i,buttonPosition:s,position:o,initialIsOpen:a,errorTypes:l,styleNonce:u,shadowDOMTarget:c}=e;Z(this,_s,ce(t)),Z(this,Oa,n),Z(this,Ea,r),Z(this,ka,i),Z(this,Aa,u),Z(this,ks,c),Z(this,Os,ce(s)),Z(this,Es,ce(o)),Z(this,As,ce(a)),Z(this,Ps,ce(l))}setButtonPosition(e){$(this,Os)[1](e)}setPosition(e){$(this,Es)[1](e)}setInitialIsOpen(e){$(this,As)[1](e)}setErrorTypes(e){$(this,Ps)[1](e)}setClient(e){$(this,_s)[1](e)}mount(e){if($(this,Ai))throw new Error("Devtools is already mounted");const t=tv(()=>{const n=this,[r]=$(this,Os),[i]=$(this,Es),[s]=$(this,As),[o]=$(this,Ps),[a]=$(this,_s);let l;return $(this,Ts)?l=$(this,Ts):(l=Jp(()=>Promise.resolve().then(()=>uD)),Z(this,Ts,l)),kv($(this,Aa),$(this,ks)),L(l,Ae({get queryFlavor(){return $(n,Oa)},get version(){return $(n,Ea)},get onlineManager(){return $(n,ka)},get shadowDOMTarget(){return $(n,ks)}},{get client(){return a()},get buttonPosition(){return r()},get position(){return i()},get initialIsOpen(){return s()},get errorTypes(){return o()}}))},e);Z(this,Ai,!0),Z(this,Pa,t)}unmount(){var e;if(!$(this,Ai))throw new Error("Devtools is not mounted");(e=$(this,Pa))==null||e.call(this),Z(this,Ai,!1)}},_s=new WeakMap,ka=new WeakMap,Oa=new WeakMap,Ea=new WeakMap,Ai=new WeakMap,Aa=new WeakMap,ks=new WeakMap,Os=new WeakMap,Es=new WeakMap,As=new WeakMap,Ps=new WeakMap,Ts=new WeakMap,Pa=new WeakMap,hp),Ms,Ta,Ma,ja,Pi,$a,js,$s,Ds,Ls,Is,Rs,Ns,Da,gp,NS=(gp=class{constructor(e){de(this,Ms);de(this,Ta);de(this,Ma);de(this,ja);de(this,Pi,!1);de(this,$a);de(this,js);de(this,$s);de(this,Ds);de(this,Ls);de(this,Is);de(this,Rs);de(this,Ns);de(this,Da);const{client:t,queryFlavor:n,version:r,onlineManager:i,buttonPosition:s,position:o,initialIsOpen:a,errorTypes:l,styleNonce:u,shadowDOMTarget:c,onClose:d}=e;Z(this,Ms,ce(t)),Z(this,Ma,n),Z(this,ja,r),Z(this,Ta,i),Z(this,$a,u),Z(this,js,c),Z(this,$s,ce(s)),Z(this,Ds,ce(o)),Z(this,Ls,ce(a)),Z(this,Is,ce(l)),Z(this,Rs,ce(d))}setButtonPosition(e){$(this,$s)[1](e)}setPosition(e){$(this,Ds)[1](e)}setInitialIsOpen(e){$(this,Ls)[1](e)}setErrorTypes(e){$(this,Is)[1](e)}setClient(e){$(this,Ms)[1](e)}setOnClose(e){$(this,Rs)[1](()=>e)}mount(e){if($(this,Pi))throw new Error("Devtools is already mounted");const t=tv(()=>{const n=this,[r]=$(this,$s),[i]=$(this,Ds),[s]=$(this,Ls),[o]=$(this,Is),[a]=$(this,Ms),[l]=$(this,Rs);let u;return $(this,Ns)?u=$(this,Ns):(u=Jp(()=>Promise.resolve().then(()=>fD)),Z(this,Ns,u)),kv($(this,$a),$(this,js)),L(u,Ae({get queryFlavor(){return $(n,Ma)},get version(){return $(n,ja)},get onlineManager(){return $(n,Ta)},get shadowDOMTarget(){return $(n,js)}},{get client(){return a()},get buttonPosition(){return r()},get position(){return i()},get initialIsOpen(){return s()},get errorTypes(){return o()},get onClose(){return l()}}))},e);Z(this,Pi,!0),Z(this,Da,t)}unmount(){var e;if(!$(this,Pi))throw new Error("Devtools is not mounted");(e=$(this,Da))==null||e.call(this),Z(this,Pi,!1)}},Ms=new WeakMap,Ta=new WeakMap,Ma=new WeakMap,ja=new WeakMap,Pi=new WeakMap,$a=new WeakMap,js=new WeakMap,$s=new WeakMap,Ds=new WeakMap,Ls=new WeakMap,Is=new WeakMap,Rs=new WeakMap,Ns=new WeakMap,Da=new WeakMap,gp);function FS(e){const t=Gt(e.client),n=I.useRef(null),{buttonPosition:r,position:i,initialIsOpen:s,errorTypes:o,styleNonce:a,shadowDOMTarget:l}=e,[u]=I.useState(new RS({client:t,queryFlavor:"React Query",version:"5",onlineManager:qs,buttonPosition:r,position:i,initialIsOpen:s,errorTypes:o,styleNonce:a,shadowDOMTarget:l}));return I.useEffect(()=>{u.setClient(t)},[t,u]),I.useEffect(()=>{r&&u.setButtonPosition(r)},[r,u]),I.useEffect(()=>{i&&u.setPosition(i)},[i,u]),I.useEffect(()=>{u.setInitialIsOpen(s||!1)},[s,u]),I.useEffect(()=>{u.setErrorTypes(o||[])},[o,u]),I.useEffect(()=>(n.current&&u.mount(n.current),()=>{u.unmount()}),[u]),y.jsx("div",{dir:"ltr",className:"tsqd-parent-container",ref:n})}function BS(e){const t=Gt(e.client),n=I.useRef(null),{errorTypes:r,styleNonce:i,shadowDOMTarget:s}=e,[o]=I.useState(new NS({client:t,queryFlavor:"React Query",version:"5",onlineManager:qs,buttonPosition:"bottom-left",position:"bottom",initialIsOpen:!0,errorTypes:r,styleNonce:i,shadowDOMTarget:s,onClose:e.onClose}));return I.useEffect(()=>{o.setClient(t)},[t,o]),I.useEffect(()=>{var a;o.setOnClose((a=e.onClose)!=null?a:()=>{})},[e.onClose,o]),I.useEffect(()=>{o.setErrorTypes(r||[])},[r,o]),I.useEffect(()=>(n.current&&o.mount(n.current),()=>{o.unmount()}),[o]),y.jsx("div",{style:{height:"500px",...e.style},className:"tsqd-parent-container",ref:n})}var qS=process.env.NODE_ENV!=="development"?function(){return null}:FS;process.env.NODE_ENV;function Ov(e,t){return function(){return e.apply(t,arguments)}}const{toString:zS}=Object.prototype,{getPrototypeOf:Of}=Object,{iterator:Eu,toStringTag:Ev}=Symbol,Au=(e=>t=>{const n=zS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),In=e=>(e=e.toLowerCase(),t=>Au(t)===e),Pu=e=>t=>typeof t===e,{isArray:Zs}=Array,Jo=Pu("undefined");function HS(e){return e!==null&&!Jo(e)&&e.constructor!==null&&!Jo(e.constructor)&&zt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Av=In("ArrayBuffer");function US(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Av(e.buffer),t}const GS=Pu("string"),zt=Pu("function"),Pv=Pu("number"),Tu=e=>e!==null&&typeof e=="object",KS=e=>e===!0||e===!1,Ml=e=>{if(Au(e)!=="object")return!1;const t=Of(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ev in e)&&!(Eu in e)},VS=In("Date"),WS=In("File"),QS=In("Blob"),YS=In("FileList"),XS=e=>Tu(e)&&zt(e.pipe),ZS=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||zt(e.append)&&((t=Au(e))==="formdata"||t==="object"&&zt(e.toString)&&e.toString()==="[object FormData]"))},JS=In("URLSearchParams"),[eC,tC,nC,rC]=["ReadableStream","Request","Response","Headers"].map(In),iC=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ra(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,i;if(typeof e!="object"&&(e=[e]),Zs(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let a;for(r=0;r<o;r++)a=s[r],t.call(null,e[a],a,e)}}function Tv(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const pi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Mv=e=>!Jo(e)&&e!==pi;function wd(){const{caseless:e}=Mv(this)&&this||{},t={},n=(r,i)=>{const s=e&&Tv(t,i)||i;Ml(t[s])&&Ml(r)?t[s]=wd(t[s],r):Ml(r)?t[s]=wd({},r):Zs(r)?t[s]=r.slice():t[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Ra(arguments[r],n);return t}const sC=(e,t,n,{allOwnKeys:r}={})=>(Ra(t,(i,s)=>{n&&zt(i)?e[s]=Ov(i,n):e[s]=i},{allOwnKeys:r}),e),oC=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),aC=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},lC=(e,t,n,r)=>{let i,s,o;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&Of(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},uC=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},cC=e=>{if(!e)return null;if(Zs(e))return e;let t=e.length;if(!Pv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},dC=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Of(Uint8Array)),fC=(e,t)=>{const r=(e&&e[Eu]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},hC=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},gC=In("HTMLFormElement"),yC=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),s0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),mC=In("RegExp"),jv=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ra(n,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(r[s]=o||i)}),Object.defineProperties(e,r)},pC=e=>{jv(e,(t,n)=>{if(zt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(zt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},vC=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return Zs(e)?r(e):r(String(e).split(t)),n},bC=()=>{},xC=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function wC(e){return!!(e&&zt(e.append)&&e[Ev]==="FormData"&&e[Eu])}const SC=e=>{const t=new Array(10),n=(r,i)=>{if(Tu(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const s=Zs(r)?[]:{};return Ra(r,(o,a)=>{const l=n(o,i+1);!Jo(l)&&(s[a]=l)}),t[i]=void 0,s}}return r};return n(e,0)},CC=In("AsyncFunction"),_C=e=>e&&(Tu(e)||zt(e))&&zt(e.then)&&zt(e.catch),$v=((e,t)=>e?setImmediate:t?((n,r)=>(pi.addEventListener("message",({source:i,data:s})=>{i===pi&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),pi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",zt(pi.postMessage)),kC=typeof queueMicrotask!="undefined"?queueMicrotask.bind(pi):typeof process!="undefined"&&process.nextTick||$v,OC=e=>e!=null&&zt(e[Eu]),q={isArray:Zs,isArrayBuffer:Av,isBuffer:HS,isFormData:ZS,isArrayBufferView:US,isString:GS,isNumber:Pv,isBoolean:KS,isObject:Tu,isPlainObject:Ml,isReadableStream:eC,isRequest:tC,isResponse:nC,isHeaders:rC,isUndefined:Jo,isDate:VS,isFile:WS,isBlob:QS,isRegExp:mC,isFunction:zt,isStream:XS,isURLSearchParams:JS,isTypedArray:dC,isFileList:YS,forEach:Ra,merge:wd,extend:sC,trim:iC,stripBOM:oC,inherits:aC,toFlatObject:lC,kindOf:Au,kindOfTest:In,endsWith:uC,toArray:cC,forEachEntry:fC,matchAll:hC,isHTMLForm:gC,hasOwnProperty:s0,hasOwnProp:s0,reduceDescriptors:jv,freezeMethods:pC,toObjectSet:vC,toCamelCase:yC,noop:bC,toFiniteNumber:xC,findKey:Tv,global:pi,isContextDefined:Mv,isSpecCompliantForm:wC,toJSONObject:SC,isAsyncFn:CC,isThenable:_C,setImmediate:$v,asap:kC,isIterable:OC};function Te(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}q.inherits(Te,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.status}}});const Dv=Te.prototype,Lv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Lv[e]={value:e}});Object.defineProperties(Te,Lv);Object.defineProperty(Dv,"isAxiosError",{value:!0});Te.from=(e,t,n,r,i,s)=>{const o=Object.create(Dv);return q.toFlatObject(e,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Te.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const EC=null;function Sd(e){return q.isPlainObject(e)||q.isArray(e)}function Iv(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function o0(e,t,n){return e?e.concat(t).map(function(i,s){return i=Iv(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function AC(e){return q.isArray(e)&&!e.some(Sd)}const PC=q.toFlatObject(q,{},null,function(t){return/^is[A-Z]/.test(t)});function Mu(e,t,n){if(!q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!q.isUndefined(p[m])});const r=n.metaTokens,i=n.visitor||c,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob!="undefined"&&Blob)&&q.isSpecCompliantForm(t);if(!q.isFunction(i))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(q.isDate(g))return g.toISOString();if(q.isBoolean(g))return g.toString();if(!l&&q.isBlob(g))throw new Te("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(g)||q.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,m,p){let v=g;if(g&&!p&&typeof g=="object"){if(q.endsWith(m,"{}"))m=r?m:m.slice(0,-2),g=JSON.stringify(g);else if(q.isArray(g)&&AC(g)||(q.isFileList(g)||q.endsWith(m,"[]"))&&(v=q.toArray(g)))return m=Iv(m),v.forEach(function(S,C){!(q.isUndefined(S)||S===null)&&t.append(o===!0?o0([m],C,s):o===null?m:m+"[]",u(S))}),!1}return Sd(g)?!0:(t.append(o0(p,m,s),u(g)),!1)}const d=[],f=Object.assign(PC,{defaultVisitor:c,convertValue:u,isVisitable:Sd});function h(g,m){if(!q.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(g),q.forEach(g,function(v,b){(!(q.isUndefined(v)||v===null)&&i.call(t,v,q.isString(b)?b.trim():b,m,f))===!0&&h(v,m?m.concat(b):[b])}),d.pop()}}if(!q.isObject(e))throw new TypeError("data must be an object");return h(e),t}function a0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ef(e,t){this._pairs=[],e&&Mu(e,this,t)}const Rv=Ef.prototype;Rv.append=function(t,n){this._pairs.push([t,n])};Rv.toString=function(t){const n=t?function(r){return t.call(this,r,a0)}:a0;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function TC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Nv(e,t,n){if(!t)return e;const r=n&&n.encode||TC;q.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=q.isURLSearchParams(t)?t.toString():new Ef(t,n).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class l0{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){q.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Fv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},MC=typeof URLSearchParams!="undefined"?URLSearchParams:Ef,jC=typeof FormData!="undefined"?FormData:null,$C=typeof Blob!="undefined"?Blob:null,DC={isBrowser:!0,classes:{URLSearchParams:MC,FormData:jC,Blob:$C},protocols:["http","https","file","blob","url","data"]},Af=typeof window!="undefined"&&typeof document!="undefined",Cd=typeof navigator=="object"&&navigator||void 0,LC=Af&&(!Cd||["ReactNative","NativeScript","NS"].indexOf(Cd.product)<0),IC=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",RC=Af&&window.location.href||"http://localhost",NC=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Af,hasStandardBrowserEnv:LC,hasStandardBrowserWebWorkerEnv:IC,navigator:Cd,origin:RC},Symbol.toStringTag,{value:"Module"})),Pt={...NC,...DC};function FC(e,t){return Mu(e,new Pt.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return Pt.isNode&&q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function BC(e){return q.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function qC(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}function Bv(e){function t(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=s>=n.length;return o=!o&&q.isArray(i)?i.length:o,l?(q.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!q.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&q.isArray(i[o])&&(i[o]=qC(i[o])),!a)}if(q.isFormData(e)&&q.isFunction(e.entries)){const n={};return q.forEachEntry(e,(r,i)=>{t(BC(r),i,n,0)}),n}return null}function zC(e,t,n){if(q.isString(e))try{return(t||JSON.parse)(e),q.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Na={transitional:Fv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=q.isObject(t);if(s&&q.isHTMLForm(t)&&(t=new FormData(t)),q.isFormData(t))return i?JSON.stringify(Bv(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t)||q.isReadableStream(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return FC(t,this.formSerializer).toString();if((a=q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Mu(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),zC(t)):t}],transformResponse:[function(t){const n=this.transitional||Na.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(q.isResponse(t)||q.isReadableStream(t))return t;if(t&&q.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?Te.from(a,Te.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pt.classes.FormData,Blob:Pt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],e=>{Na.headers[e]={}});const HC=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),UC=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
13
|
+
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&HC[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},u0=Symbol("internals");function fo(e){return e&&String(e).trim().toLowerCase()}function jl(e){return e===!1||e==null?e:q.isArray(e)?e.map(jl):String(e)}function GC(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const KC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function hc(e,t,n,r,i){if(q.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!q.isString(t)){if(q.isString(r))return t.indexOf(r)!==-1;if(q.isRegExp(r))return r.test(t)}}function VC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function WC(e,t){const n=q.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,s,o){return this[r].call(this,t,i,s,o)},configurable:!0})})}let Ht=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(a,l,u){const c=fo(l);if(!c)throw new Error("header name must be a non-empty string");const d=q.findKey(i,c);(!d||i[d]===void 0||u===!0||u===void 0&&i[d]!==!1)&&(i[d||l]=jl(a))}const o=(a,l)=>q.forEach(a,(u,c)=>s(u,c,l));if(q.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(q.isString(t)&&(t=t.trim())&&!KC(t))o(UC(t),n);else if(q.isObject(t)&&q.isIterable(t)){let a={},l,u;for(const c of t){if(!q.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[u=c[0]]=(l=a[u])?q.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=fo(t),t){const r=q.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return GC(i);if(q.isFunction(n))return n.call(this,i,r);if(q.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=fo(t),t){const r=q.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||hc(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(o){if(o=fo(o),o){const a=q.findKey(r,o);a&&(!n||hc(r,r[a],a,n))&&(delete r[a],i=!0)}}return q.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!t||hc(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return q.forEach(this,(i,s)=>{const o=q.findKey(r,s);if(o){n[o]=jl(i),delete n[s];return}const a=t?VC(s):String(s).trim();a!==s&&delete n[s],n[a]=jl(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return q.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&q.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
14
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[u0]=this[u0]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=fo(o);r[a]||(WC(i,o),r[a]=!0)}return q.isArray(t)?t.forEach(s):s(t),this}};Ht.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.reduceDescriptors(Ht.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});q.freezeMethods(Ht);function gc(e,t){const n=this||Na,r=t||n,i=Ht.from(r.headers);let s=r.data;return q.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function qv(e){return!!(e&&e.__CANCEL__)}function Js(e,t,n){Te.call(this,e==null?"canceled":e,Te.ERR_CANCELED,t,n),this.name="CanceledError"}q.inherits(Js,Te,{__CANCEL__:!0});function zv(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Te("Request failed with status code "+n.status,[Te.ERR_BAD_REQUEST,Te.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function QC(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function YC(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[s];o||(o=u),n[i]=l,r[i]=u;let d=s,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-o<t)return;const h=c&&u-c;return h?Math.round(f*1e3/h):void 0}}function XC(e,t){let n=0,r=1e3/t,i,s;const o=(u,c=Date.now())=>{n=c,i=null,s&&(clearTimeout(s),s=null),e.apply(null,u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?o(u,c):(i=u,s||(s=setTimeout(()=>{s=null,o(i)},r-d)))},()=>i&&o(i)]}const Ql=(e,t,n=3)=>{let r=0;const i=YC(50,250);return XC(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,u=i(l),c=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-o)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},c0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},d0=e=>(...t)=>q.asap(()=>e(...t)),ZC=Pt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Pt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Pt.origin),Pt.navigator&&/(msie|trident)/i.test(Pt.navigator.userAgent)):()=>!0,JC=Pt.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const o=[e+"="+encodeURIComponent(t)];q.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),q.isString(r)&&o.push("path="+r),q.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function e5(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function t5(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Hv(e,t,n){let r=!e5(t);return e&&(r||n==!1)?t5(e,t):t}const f0=e=>e instanceof Ht?{...e}:e;function Li(e,t){t=t||{};const n={};function r(u,c,d,f){return q.isPlainObject(u)&&q.isPlainObject(c)?q.merge.call({caseless:f},u,c):q.isPlainObject(c)?q.merge({},c):q.isArray(c)?c.slice():c}function i(u,c,d,f){if(q.isUndefined(c)){if(!q.isUndefined(u))return r(void 0,u,d,f)}else return r(u,c,d,f)}function s(u,c){if(!q.isUndefined(c))return r(void 0,c)}function o(u,c){if(q.isUndefined(c)){if(!q.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,c,d)=>i(f0(u),f0(c),d,!0)};return q.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=l[c]||i,f=d(e[c],t[c],c);q.isUndefined(f)&&d!==a||(n[c]=f)}),n}const Uv=e=>{const t=Li({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;t.headers=o=Ht.from(o),t.url=Nv(Hv(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(q.isFormData(n)){if(Pt.hasStandardBrowserEnv||Pt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Pt.hasStandardBrowserEnv&&(r&&q.isFunction(r)&&(r=r(t)),r||r!==!1&&ZC(t.url))){const u=i&&s&&JC.read(s);u&&o.set(i,u)}return t},n5=typeof XMLHttpRequest!="undefined",r5=n5&&function(e){return new Promise(function(n,r){const i=Uv(e);let s=i.data;const o=Ht.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=i,c,d,f,h,g;function m(){h&&h(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let p=new XMLHttpRequest;p.open(i.method.toUpperCase(),i.url,!0),p.timeout=i.timeout;function v(){if(!p)return;const S=Ht.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),x={data:!a||a==="text"||a==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:S,config:e,request:p};zv(function(w){n(w),m()},function(w){r(w),m()},x),p=null}"onloadend"in p?p.onloadend=v:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(v)},p.onabort=function(){p&&(r(new Te("Request aborted",Te.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new Te("Network Error",Te.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let C=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const x=i.transitional||Fv;i.timeoutErrorMessage&&(C=i.timeoutErrorMessage),r(new Te(C,x.clarifyTimeoutError?Te.ETIMEDOUT:Te.ECONNABORTED,e,p)),p=null},s===void 0&&o.setContentType(null),"setRequestHeader"in p&&q.forEach(o.toJSON(),function(C,x){p.setRequestHeader(x,C)}),q.isUndefined(i.withCredentials)||(p.withCredentials=!!i.withCredentials),a&&a!=="json"&&(p.responseType=i.responseType),u&&([f,g]=Ql(u,!0),p.addEventListener("progress",f)),l&&p.upload&&([d,h]=Ql(l),p.upload.addEventListener("progress",d),p.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(c=S=>{p&&(r(!S||S.type?new Js(null,e,p):S),p.abort(),p=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const b=QC(i.url);if(b&&Pt.protocols.indexOf(b)===-1){r(new Te("Unsupported protocol "+b+":",Te.ERR_BAD_REQUEST,e));return}p.send(s||null)})},i5=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const s=function(u){if(!i){i=!0,a();const c=u instanceof Error?u:this.reason;r.abort(c instanceof Te?c:new Js(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,s(new Te(`timeout ${t} of ms exceeded`,Te.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>q.asap(a),l}},s5=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},o5=async function*(e,t){for await(const n of a5(e))yield*s5(n,t)},a5=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},h0=(e,t,n,r)=>{const i=o5(e,t);let s=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await i.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let f=s+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},ju=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Gv=ju&&typeof ReadableStream=="function",l5=ju&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Kv=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},u5=Gv&&Kv(()=>{let e=!1;const t=new Request(Pt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),g0=64*1024,_d=Gv&&Kv(()=>q.isReadableStream(new Response("").body)),Yl={stream:_d&&(e=>e.body)};ju&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Yl[t]&&(Yl[t]=q.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Te(`Response type '${t}' is not supported`,Te.ERR_NOT_SUPPORT,r)})})})(new Response);const c5=async e=>{if(e==null)return 0;if(q.isBlob(e))return e.size;if(q.isSpecCompliantForm(e))return(await new Request(Pt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(q.isArrayBufferView(e)||q.isArrayBuffer(e))return e.byteLength;if(q.isURLSearchParams(e)&&(e=e+""),q.isString(e))return(await l5(e)).byteLength},d5=async(e,t)=>{const n=q.toFiniteNumber(e.getContentLength());return n==null?c5(t):n},f5=ju&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:f}=Uv(e);u=u?(u+"").toLowerCase():"text";let h=i5([i,s&&s.toAbortSignal()],o),g;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let p;try{if(l&&u5&&n!=="get"&&n!=="head"&&(p=await d5(c,r))!==0){let x=new Request(t,{method:"POST",body:r,duplex:"half"}),k;if(q.isFormData(r)&&(k=x.headers.get("content-type"))&&c.setContentType(k),x.body){const[w,_]=c0(p,Ql(d0(l)));r=h0(x.body,g0,w,_)}}q.isString(d)||(d=d?"include":"omit");const v="credentials"in Request.prototype;g=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:v?d:void 0});let b=await fetch(g,f);const S=_d&&(u==="stream"||u==="response");if(_d&&(a||S&&m)){const x={};["status","statusText","headers"].forEach(O=>{x[O]=b[O]});const k=q.toFiniteNumber(b.headers.get("content-length")),[w,_]=a&&c0(k,Ql(d0(a),!0))||[];b=new Response(h0(b.body,g0,w,()=>{_&&_(),m&&m()}),x)}u=u||"text";let C=await Yl[q.findKey(Yl,u)||"text"](b,e);return!S&&m&&m(),await new Promise((x,k)=>{zv(x,k,{data:C,headers:Ht.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:g})})}catch(v){throw m&&m(),v&&v.name==="TypeError"&&/Load failed|fetch/i.test(v.message)?Object.assign(new Te("Network Error",Te.ERR_NETWORK,e,g),{cause:v.cause||v}):Te.from(v,v&&v.code,e,g)}}),kd={http:EC,xhr:r5,fetch:f5};q.forEach(kd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const y0=e=>`- ${e}`,h5=e=>q.isFunction(e)||e===null||e===!1,Vv={getAdapter:e=>{e=q.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let s=0;s<t;s++){n=e[s];let o;if(r=n,!h5(n)&&(r=kd[(o=String(n)).toLowerCase()],r===void 0))throw new Te(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+s]=r}if(!r){const s=Object.entries(i).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?s.length>1?`since :
|
|
15
|
+
`+s.map(y0).join(`
|
|
16
|
+
`):" "+y0(s[0]):"as no adapter specified";throw new Te("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:kd};function yc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Js(null,e)}function m0(e){return yc(e),e.headers=Ht.from(e.headers),e.data=gc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vv.getAdapter(e.adapter||Na.adapter)(e).then(function(r){return yc(e),r.data=gc.call(e,e.transformResponse,r),r.headers=Ht.from(r.headers),r},function(r){return qv(r)||(yc(e),r&&r.response&&(r.response.data=gc.call(e,e.transformResponse,r.response),r.response.headers=Ht.from(r.response.headers))),Promise.reject(r)})}const Wv="1.10.0",$u={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{$u[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const p0={};$u.transitional=function(t,n,r){function i(s,o){return"[Axios v"+Wv+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(t===!1)throw new Te(i(o," has been removed"+(n?" in "+n:"")),Te.ERR_DEPRECATED);return n&&!p0[o]&&(p0[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,o,a):!0}};$u.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function g5(e,t,n){if(typeof e!="object")throw new Te("options must be an object",Te.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const a=e[s],l=a===void 0||o(a,s,e);if(l!==!0)throw new Te("option "+s+" must be "+l,Te.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Te("Unknown option "+s,Te.ERR_BAD_OPTION)}}const $l={assertOptions:g5,validators:$u},Bn=$l.validators;let Ti=class{constructor(t){this.defaults=t||{},this.interceptors={request:new l0,response:new l0}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
17
|
+
`+s):r.stack=s}catch(o){}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Li(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&$l.assertOptions(r,{silentJSONParsing:Bn.transitional(Bn.boolean),forcedJSONParsing:Bn.transitional(Bn.boolean),clarifyTimeoutError:Bn.transitional(Bn.boolean)},!1),i!=null&&(q.isFunction(i)?n.paramsSerializer={serialize:i}:$l.assertOptions(i,{encode:Bn.function,serialize:Bn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),$l.assertOptions(n,{baseUrl:Bn.spelling("baseURL"),withXsrfToken:Bn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&q.merge(s.common,s[n.method]);s&&q.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),n.headers=Ht.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,d=0,f;if(!l){const g=[m0.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,u),f=g.length,c=Promise.resolve(n);d<f;)c=c.then(g[d++],g[d++]);return c}f=a.length;let h=n;for(d=0;d<f;){const g=a[d++],m=a[d++];try{h=g(h)}catch(p){m.call(this,p);break}}try{c=m0.call(this,h)}catch(g){return Promise.reject(g)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Li(this.defaults,t);const n=Hv(t.baseURL,t.url,t.allowAbsoluteUrls);return Nv(n,t.params,t.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(t){Ti.prototype[t]=function(n,r){return this.request(Li(r||{},{method:t,url:n,data:(r||{}).data}))}});q.forEach(["post","put","patch"],function(t){function n(r){return function(s,o,a){return this.request(Li(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Ti.prototype[t]=n(),Ti.prototype[t+"Form"]=n(!0)});let y5=class Qv{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,a){r.reason||(r.reason=new Js(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Qv(function(i){t=i}),cancel:t}}};function m5(e){return function(n){return e.apply(null,n)}}function p5(e){return q.isObject(e)&&e.isAxiosError===!0}const Od={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Od).forEach(([e,t])=>{Od[t]=e});function Yv(e){const t=new Ti(e),n=Ov(Ti.prototype.request,t);return q.extend(n,Ti.prototype,t,{allOwnKeys:!0}),q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Yv(Li(e,i))},n}const it=Yv(Na);it.Axios=Ti;it.CanceledError=Js;it.CancelToken=y5;it.isCancel=qv;it.VERSION=Wv;it.toFormData=Mu;it.AxiosError=Te;it.Cancel=it.CanceledError;it.all=function(t){return Promise.all(t)};it.spread=m5;it.isAxiosError=p5;it.mergeConfig=Li;it.AxiosHeaders=Ht;it.formToJSON=e=>Bv(q.isHTMLForm(e)?new FormData(e):e);it.getAdapter=Vv.getAdapter;it.HttpStatusCode=Od;it.default=it;const{Axios:tI,AxiosError:nI,CanceledError:rI,isCancel:iI,CancelToken:sI,VERSION:oI,all:aI,Cancel:lI,isAxiosError:uI,spread:cI,toFormData:dI,AxiosHeaders:fI,HttpStatusCode:hI,formToJSON:gI,getAdapter:yI,mergeConfig:mI}=it,v5={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};function ea(e){"@babel/helpers - typeof";return ea=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ea(e)}function Lt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,g,m,p){var v=g&&g.prototype instanceof a?g:a,b=Object.create(v.prototype);return Qt(b,"_invoke",function(S,C,x){var k,w,_,O=0,E=x||[],T=!1,j={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(A,M){return k=A,w=0,_=e,j.n=M,o}};function B(R,A){for(w=R,_=A,t=0;!T&&O&&!M&&t<E.length;t++){var M,D=E[t],H=j.p,Q=D[2];R>3?(M=Q===A)&&(_=D[(w=D[4])?5:(w=3,3)],D[4]=D[5]=e):D[0]<=H&&((M=R<2&&H<D[1])?(w=0,j.v=A,j.n=D[1]):H<Q&&(M=R<3||D[0]>A||A>Q)&&(D[4]=R,D[5]=A,j.n=Q,w=0))}if(M||R>1)return o;throw T=!0,A}return function(R,A,M){if(O>1)throw TypeError("Generator is already running");for(T&&A===1&&B(A,M),w=A,_=M;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(j.n=-1),B(w,_)):j.n=_:j.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=j.n<0)?_:S.call(C,j))!==o)break}catch(D){k=e,w=1,_=D}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(Qt(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,Qt(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,Qt(d,"constructor",u),Qt(u,"constructor",l),l.displayName="GeneratorFunction",Qt(u,i,"GeneratorFunction"),Qt(d),Qt(d,i,"Generator"),Qt(d,r,function(){return this}),Qt(d,"toString",function(){return"[object Generator]"}),(Lt=function(){return{w:s,m:f}})()}function Qt(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Qt=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){Qt(o,f,function(g){return this._invoke(f,h,g)})};c("next",0),c("throw",1),c("return",2)}},Qt(e,t,n,r)}function v0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Mi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v0(Object(n),!0).forEach(function(r){b5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function b5(e,t,n){return(t=x5(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x5(e){var t=w5(e,"string");return ea(t)=="symbol"?t:t+""}function w5(e,t){if(ea(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ea(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function b0(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function Ii(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){b0(s,r,i,o,a,"next",l)}function a(l){b0(s,r,i,o,a,"throw",l)}o(void 0)})}}var Xv=function(){var t;return((t=v5)===null||t===void 0?void 0:t.VITE_MYYOAST_ACCESS_TOKEN)||""};function x0(e){var t;if(typeof document!="undefined"){var n="; ".concat(document.cookie),r=n.split("; ".concat(e,"="));if(r.length===2)return(t=r.pop())===null||t===void 0?void 0:t.split(";").shift()}}var S5="yst-insights-token",eo=it.create({withCredentials:!0});eo.interceptors.request.use(function(){var e=Ii(Lt().m(function t(n){var r,i;return Lt().w(function(s){for(;;)switch(s.n){case 0:return s.n=1,_5();case 1:return r=s.v,s.n=2,Jv();case 2:return i=s.v,n.headers=Mi(Mi(Mi({},n.headers||{}),i?{"X-XSRF-TOKEN":i}:{}),r?{Authorization:"Bearer ".concat(r)}:{}),s.a(2,n)}},t)}));return function(t){return e.apply(this,arguments)}}(),function(e){return Promise.reject(e)},{synchronous:!1});eo.interceptors.response.use(function(e){return e},function(){var e=Ii(Lt().m(function t(n){var r;return Lt().w(function(i){for(;;)switch(i.n){case 0:return n==null||(r=n.response)===null||r===void 0||r.status,i.a(2,Promise.reject(n))}},t)}));return function(t){return e.apply(this,arguments)}}());function Ct(e){return Ed.apply(this,arguments)}function Ed(){return Ed=Ii(Lt().m(function e(t){var n;return Lt().w(function(r){for(;;)switch(r.n){case 0:return n=Mi({},t),delete n.baseURL,r.a(2,eo.request(Mi(Mi({},n),{},{withCredentials:!0})))}},e)})),Ed.apply(this,arguments)}function Zv(e){eo.defaults.baseURL=e}function w0(){return eo.defaults.baseURL}function C5(e){Xv=e}var ho=null;function _5(){return Ad.apply(this,arguments)}function Ad(){return Ad=Ii(Lt().m(function e(){var t,n,r,i,s;return Lt().w(function(o){for(;;)switch(o.p=o.n){case 0:if(t=Xv(),n=eo.defaults.baseURL,r=k5(t,n),i=sessionStorage.getItem(r),!i){o.n=4;break}if(o.p=1,s=JSON.parse(i),!((s==null?void 0:s.validUntil)>Date.now()&&s.value)){o.n=2;break}return o.a(2,String(s.value));case 2:o.n=4;break;case 3:o.p=3,o.v;case 4:if(!ho){o.n=5;break}return o.a(2,ho);case 5:return ho=Ii(Lt().m(function a(){var l,u,c,d,f;return Lt().w(function(h){for(;;)switch(h.p=h.n){case 0:return h.p=0,h.n=1,Jv();case 1:return l=h.v,h.n=2,it.post(n+"/users/getToken",{},{headers:Mi({Authorization:"Bearer "+t},l?{"X-XSRF-TOKEN":l}:{}),withCredentials:!0});case 2:if(u=h.v,c=u.data,!(c!=null&&c.plainTextToken)){h.n=3;break}return sessionStorage.setItem(r,JSON.stringify({value:c.plainTextToken,validUntil:Date.parse(((d=c.accessToken)===null||d===void 0?void 0:d.expires_at)||"")||Date.now()+15*60*1e3})),h.a(2,c.plainTextToken);case 3:h.n=5;break;case 4:h.p=4,f=h.v,it.isAxiosError(f)?f.response?console.error("Login failed with status",f.response.status,f.response.data):f.request?console.error("Login request made but no response received",f.request):console.error("Error setting up login request",f.message):console.error("Non-Axios error during login",f);case 5:return h.p=5,ho=null,h.f(5);case 6:return h.a(2,"")}},a,null,[[0,4,5,6]])}))(),o.a(2,ho)}},e,null,[[1,3]])})),Ad.apply(this,arguments)}function k5(e,t){var n=Array.from(e+t).reduce(function(r,i){return(r<<5)-r+i.charCodeAt(0)},0);return S5+":"+n}var go=null;function Jv(){return Pd.apply(this,arguments)}function Pd(){return Pd=Ii(Lt().m(function e(){var t;return Lt().w(function(n){for(;;)switch(n.n){case 0:if(window.location.hostname===new URL(w0()||window.location.href).hostname){n.n=1;break}return n.a(2,"");case 1:if(t=x0("XSRF-TOKEN"),!t){n.n=2;break}return n.a(2,decodeURIComponent(t));case 2:if(!go){n.n=3;break}return n.a(2,go);case 3:return go=Ii(Lt().m(function r(){var i;return Lt().w(function(s){for(;;)switch(s.p=s.n){case 0:return s.p=0,s.n=1,it.get(((i=w0())===null||i===void 0?void 0:i.replace("/api/v1",""))+"/sanctum/csrf-cookie",{withCredentials:!0});case 1:return s.a(2,decodeURIComponent(x0("XSRF-TOKEN")||""));case 2:return s.p=2,go=null,s.f(2);case 3:return s.a(2)}},r,null,[[0,,2,3]])}))(),n.a(2,go)}},e)})),Pd.apply(this,arguments)}function ta(e){"@babel/helpers - typeof";return ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ta(e)}function S0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?S0(Object(n),!0).forEach(function(r){O5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O5(e,t,n){return(t=E5(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E5(e){var t=A5(e,"string");return ta(t)=="symbol"?t:t+""}function A5(e,t){if(ta(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ta(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var P5=function(t,n){return Ct({url:"/brands/".concat(t,"/analysis"),method:"GET",signal:n})},Pf=function(t){return["/brands/".concat(t,"/analysis")]},T5=function(t,n){var r,i=n!=null?n:{},s=i.query,o=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:Pf(t),a=function(u){var c=u.signal;return P5(t,c)};return ke({queryKey:o,queryFn:a,enabled:!!t},s)};function e2(e,t,n){var r=T5(e,t),i=ni(r,n);return i.queryKey=r.queryKey,i}var M5=function(t,n,r){return Ct({url:"/brands/".concat(t,"/analysis/").concat(n),method:"GET",signal:r})},Xl=function(t,n){return["/brands/".concat(t,"/analysis/").concat(n)]},j5=function(t,n,r){var i,s=r!=null?r:{},o=s.query,a=(i=o==null?void 0:o.queryKey)!==null&&i!==void 0?i:Xl(t,n),l=function(c){var d=c.signal;return M5(t,n,d)};return ke({queryKey:a,queryFn:l,enabled:!!(t&&n)},o)};function Du(e,t,n,r){var i=j5(e,t,n),s=ni(i,r);return s.queryKey=i.queryKey,s}var $5=function(t,n){return Ct({url:"/brands/".concat(t,"/analysis/").concat(n),method:"DELETE"})},D5=function(t){var n=["deleteSingleAnalysis"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:ke(ke({},t),{},{mutation:ke(ke({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.brandId,c=l.analysisId;return $5(u,c)};return ke({mutationFn:s},i)},L5=function(t,n){var r=D5(t);return Sr(r,n)},I5=function(t,n,r){return Ct({url:"/brands/".concat(t,"/analysis/").concat(n,"/status"),method:"GET",signal:r})},Td=function(t,n){return["/brands/".concat(t,"/analysis/").concat(n,"/status")]},R5=function(t,n,r){var i,s=r!=null?r:{},o=s.query,a=(i=o==null?void 0:o.queryKey)!==null&&i!==void 0?i:Td(t,n),l=function(c){var d=c.signal;return I5(t,n,d)};return ke({queryKey:a,queryFn:l,enabled:!!(t&&n)},o)};function N5(e,t,n,r){var i=R5(e,t,n),s=ni(i,r);return s.queryKey=i.queryKey,s}var F5=function(t){return Ct({url:"/users/logout",method:"POST",signal:t})},B5=function(t){var n=["logout"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:ke(ke({},t),{},{mutation:ke(ke({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(){return F5()};return ke({mutationFn:s},i)},q5=function(t,n){var r=B5(t);return Sr(r,n)},z5=function(t,n){return Ct({url:"/brands/".concat(t,"/associated-brands"),method:"GET",signal:n})},Zl=function(t){return["/brands/".concat(t,"/associated-brands")]},H5=function(t,n){var r,i=n!=null?n:{},s=i.query,o=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:Zl(t),a=function(u){var c=u.signal;return z5(t,c)};return ke({queryKey:o,queryFn:a,enabled:!!t},s)};function U5(e,t,n){var r=H5(e,t),i=ni(r,n);return i.queryKey=r.queryKey,i}var G5=function(t,n,r){return Ct({url:"/brands/".concat(t,"/associated-brand-groups"),method:"POST",headers:{"Content-Type":"application/json"},data:n,signal:r})},K5=function(t){var n=["createBrandAssociationGroup"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:ke(ke({},t),{},{mutation:ke(ke({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.brandId,c=l.data;return G5(u,c)};return ke({mutationFn:s},i)},t2=function(t,n){var r=K5(t);return Sr(r,n)},V5=function(t,n){return Ct({url:"/brands/".concat(t,"/associated-brand-groups/").concat(n),method:"DELETE"})},W5=function(t){var n=["deleteBrandAssociationGroup"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:ke(ke({},t),{},{mutation:ke(ke({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.brandId,c=l.brandGroupId;return V5(u,c)};return ke({mutationFn:s},i)},Q5=function(t,n){var r=W5(t);return Sr(r,n)},Y5=function(t){return Ct({url:"/brands",method:"GET",signal:t})},Yn=function(){return["/brands"]},X5=function(t){var n,r=t!=null?t:{},i=r.query,s=(n=i==null?void 0:i.queryKey)!==null&&n!==void 0?n:Yn(),o=function(l){var u=l.signal;return Y5(u)};return ke({queryKey:s,queryFn:o},i)};function Gi(e,t){var n=X5(e),r=ni(n,t);return r.queryKey=n.queryKey,r}var Z5=function(t,n){return Ct({url:"/brands",method:"POST",headers:{"Content-Type":"application/json"},data:t,signal:n})},J5=function(t){var n=["createBrand"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:ke(ke({},t),{},{mutation:ke(ke({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.data;return Z5(u)};return ke({mutationFn:s},i)},e4=function(t,n){var r=J5(t);return Sr(r,n)},t4=function(t,n){return Ct({url:"/brands/".concat(t),method:"GET",signal:n})},Tf=function(t){return["/brands/".concat(t)]},n4=function(t,n){var r,i=n!=null?n:{},s=i.query,o=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:Tf(t),a=function(u){var c=u.signal;return t4(t,c)};return ke({queryKey:o,queryFn:a,enabled:!!t},s)};function Jl(e,t,n){var r=n4(e,t),i=ni(r,n);return i.queryKey=r.queryKey,i}var r4=function(t){return Ct({url:"/brands/".concat(t),method:"DELETE"})},i4=function(t){var n=["deleteBrand"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:ke(ke({},t),{},{mutation:ke(ke({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.brandId;return r4(u)};return ke({mutationFn:s},i)},s4=function(t,n){var r=i4(t);return Sr(r,n)},o4=function(t,n){return Ct({url:"/brands/".concat(t,"/settings"),method:"PATCH",headers:{"Content-Type":"application/json"},data:n})},a4=function(t){var n=["updateBrandSettings"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:ke(ke({},t),{},{mutation:ke(ke({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.brandId,c=l.data;return o4(u,c)};return ke({mutationFn:s},i)},n2=function(t,n){var r=a4(t);return Sr(r,n)},l4=function(t,n){return Ct({url:"/brands/".concat(t,"/queries"),method:"PUT",headers:{"Content-Type":"application/json"},data:n})},u4=function(t){var n=["updateBrandQueries"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:ke(ke({},t),{},{mutation:ke(ke({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.brandId,c=l.data;return l4(u,c)};return ke({mutationFn:s},i)},c4=function(t,n){var r=u4(t);return Sr(r,n)},d4=function(t,n){return Ct({url:"/brands/".concat(t,"/query-suggestions"),method:"GET",signal:n})},f4=function(t){return["/brands/".concat(t,"/query-suggestions")]},h4=function(t,n){var r,i=n!=null?n:{},s=i.query,o=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:f4(t),a=function(u){var c=u.signal;return d4(t,c)};return ke({queryKey:o,queryFn:a,enabled:!!t},s)};function g4(e,t,n){var r=h4(e,t),i=ni(r,n);return i.queryKey=r.queryKey,i}var y4=function(t){return Ct({url:"/users/current",method:"GET",signal:t})},Lu=function(){return["/users/current"]},m4=function(t){var n,r=t!=null?t:{},i=r.query,s=(n=i==null?void 0:i.queryKey)!==null&&n!==void 0?n:Lu(),o=function(l){var u=l.signal;return y4(u)};return ke({queryKey:s,queryFn:o},i)};function Iu(e,t){var n=m4(e),r=ni(n,t);return r.queryKey=n.queryKey,r}var p4=function(){return Ct({url:"/users/data",method:"DELETE"})},v4=function(t){var n=["deleteUserData"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:ke(ke({},t),{},{mutation:ke(ke({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(){return p4()};return ke({mutationFn:s},i)},b4=function(t,n){var r=v4(t);return Sr(r,n)},r2=z.createContext(void 0),x4=function(t){var n,r,i,s,o,a,l,u,c=t.children,d=t.brandId,f=t.analysisId,h=t.model,g=t.hostAppProps,m=g===void 0?{}:g,p=Ja("/brands/:brandId"),v=Ja("/brands/:brandId/*"),b=Ja("/brands/:brandId/analysis/:analysisId"),S=Ja("/brands/:brandId/analysis/:analysisId/*"),C=(b==null||(n=b.params)===null||n===void 0?void 0:n.brandId)||(S==null||(r=S.params)===null||r===void 0?void 0:r.brandId)||(v==null||(i=v.params)===null||i===void 0?void 0:i.brandId)||(p==null||(s=p.params)===null||s===void 0?void 0:s.brandId),x=b!=null&&(o=b.params)!==null&&o!==void 0&&o.analysisId||S!=null&&(a=S.params)!==null&&a!==void 0&&a.analysisId?Number((b==null||(l=b.params)===null||l===void 0?void 0:l.analysisId)||(S==null||(u=S.params)===null||u===void 0?void 0:u.analysisId)):void 0,k=z.useMemo(function(){return{brandId:C||d||"",analysisId:x||f||"latest",model:h||"openai",hostAppProps:m}},[C,d,x,f,h,m]),w=z.useMemo(function(){return{data:k}},[k]);return y.jsx(r2.Provider,{value:w,children:c})},i2=z.createContext(void 0),w4=function(t){var n=t.children,r=t.setBrandId,i=t.setAnalysisId,s=t.setModel,o=z.useCallback(function(d){r(d),i("latest")},[r,i]),a=z.useCallback(function(d){i(d)},[i]),l=z.useCallback(function(d){s(d)},[s]),u=z.useMemo(function(){return{setBrandId:o,setAnalysisId:a,setModel:l}},[o,a,l]),c=z.useMemo(function(){return{mutations:u}},[u]);return y.jsx(i2.Provider,{value:c,children:n})};function mc(e,t){return k4(e)||_4(e,t)||C4(e,t)||S4()}function S4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
18
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C4(e,t){if(e){if(typeof e=="string")return C0(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C0(e,t):void 0}}function C0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _4(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function k4(e){if(Array.isArray(e))return e}var O4=function(t){var n=t.children,r=t.hostAppProps,i=r===void 0?{}:r,s=z.useState(void 0),o=mc(s,2),a=o[0],l=o[1],u=z.useState("latest"),c=mc(u,2),d=c[0],f=c[1],h=z.useState(void 0),g=mc(h,2),m=g[0],p=g[1];return y.jsx(w4,{brandId:a,setBrandId:l,analysisId:d,setAnalysisId:f,model:m,setModel:p,children:y.jsx(x4,{brandId:a,analysisId:d,model:m,hostAppProps:i,children:n})})},Rn=function(){var t=z.useContext(r2);if(t===void 0)throw new Error("useBrandAnalysisData must be used within a BrandAnalysisDataProvider");return t.data},Fa=function(){var t=z.useContext(i2);if(t===void 0)throw new Error("useBrandAnalysisMutations must be used within a BrandAnalysisMutationsProvider");return t.mutations},pc={exports:{}};/*!
|
|
19
19
|
Copyright (c) 2018 Jed Watson.
|
|
20
20
|
Licensed under the MIT License (MIT), see
|
|
21
21
|
http://jedwatson.github.io/classnames
|
|
22
|
-
*/var b0;function S5(){return b0||(b0=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)t.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(gu)),gu.exports}var C5=S5();const ke=lp(C5);var _5=function(t){return I4({mutation:{onSettled:function(){t&&t()}}})};function k5(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"}))}const O5=L.forwardRef(k5);function E5(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))}const A5=L.forwardRef(E5);function P5(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"}))}const T5=L.forwardRef(P5);function M5(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))}const j5=L.forwardRef(M5);function $5(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))}const D5=L.forwardRef($5);function L5(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"}))}const I5=L.forwardRef(L5);function R5(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"}))}const N5=L.forwardRef(R5);function F5(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))}const B5=L.forwardRef(F5);function q5(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))}const z5=L.forwardRef(q5);function H5(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))}const e2=L.forwardRef(H5);function U5(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))}const t2=L.forwardRef(U5);function G5(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 12l3-3 3 3 4-4M8 21l4-4 4 4M3 4h18M4 4h16v12a1 1 0 01-1 1H5a1 1 0 01-1-1V4z"}))}const K5=L.forwardRef(G5);function V5(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))}const W5=L.forwardRef(V5);function Q5(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"}))}const Y5=L.forwardRef(Q5);function X5(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))}const Of=L.forwardRef(X5);function Z5(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))}const J5=L.forwardRef(Z5);var e6=function(){return[{label:"Brand analysis",href:"/",Icon:K5,isActive:function(n){return n.startsWith("/setup")||n==="/"},showInMenu:!0},{label:"Settings",href:"/settings",Icon:D5,isActive:function(n){return n.startsWith("/settings")},showInMenu:!0}]},x0;function t6(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var w0=function(t){var n=t.className,r=Ht(),i=r.pathname,s=e6();return y.jsx("div",{className:ke("yst-flex yst-flex-col yst-gap-10",n),children:y.jsx(P.SidebarNavigation.Sidebar,{children:y.jsx(P.SidebarNavigation.List,{className:"yst-space-y-2",children:s.filter(function(o){return o.showInMenu!==!1}).map(function(o){var a=o.isActive?o.isActive(i):!1;return y.jsx(P.SidebarNavigation.SubmenuItem,{className:ke("yst-flex yst-gap-x-3",{"yst-sidebar-navigation__item--active":a}),href:o.href,to:o.href,as:ei,label:y.jsxs(y.Fragment,{children:[y.jsx(o.Icon,{className:ke(x0||(x0=t6(["yst-sidebar-navigation__icon yst-h-6 yst-w-6"])))}),o.label]})},o.label)})})})})};const n6="data:image/svg+xml,%3csvg%20width='208'%20height='42'%20viewBox='0%200%20208%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='169'%20width='39'%20height='16'%20rx='8'%20fill='%23BFDBFE'/%3e%3cpath%20d='M177.869%2012V4.9541H180.813C182.151%204.9541%20182.957%205.62793%20182.957%206.70703V6.7168C182.957%207.4541%20182.41%208.1084%20181.702%208.2207V8.30859C182.649%208.39648%20183.304%209.08008%20183.304%209.99316V10.0029C183.304%2011.2383%20182.386%2012%20180.882%2012H177.869ZM180.506%205.93555H179.129V7.92285H180.345C181.238%207.92285%20181.712%207.57617%20181.712%206.93652V6.92676C181.712%206.30176%20181.268%205.93555%20180.506%205.93555ZM180.545%208.81641H179.129V11.0186H180.594C181.521%2011.0186%20182.015%2010.6328%20182.015%209.91504V9.90527C182.015%209.19238%20181.507%208.81641%20180.545%208.81641ZM186.834%2012.1074C185.247%2012.1074%20184.285%2011.043%20184.285%209.34375V9.33887C184.285%207.65918%20185.257%206.56055%20186.775%206.56055C188.294%206.56055%20189.231%207.625%20189.231%209.23633V9.63672H185.501C185.516%2010.5938%20186.033%2011.1504%20186.858%2011.1504C187.518%2011.1504%20187.894%2010.8184%20188.011%2010.5742L188.025%2010.54H189.183L189.168%2010.584C188.997%2011.2725%20188.284%2012.1074%20186.834%2012.1074ZM186.79%207.5127C186.111%207.5127%20185.604%207.97168%20185.511%208.82129H188.045C187.962%207.94727%20187.469%207.5127%20186.79%207.5127ZM192.547%2012.0244C191.321%2012.0244%20190.818%2011.6143%20190.818%2010.584V7.60547H189.988V6.66309H190.818V5.35449H192.054V6.66309H193.182V7.60547H192.054V10.2959C192.054%2010.8281%20192.264%2011.0527%20192.771%2011.0527C192.942%2011.0527%20193.035%2011.0479%20193.182%2011.0332V11.9707C193.006%2012.0049%20192.781%2012.0244%20192.547%2012.0244ZM195.848%2012.0879C194.832%2012.0879%20194.095%2011.4629%20194.095%2010.4912V10.4814C194.095%209.5293%20194.822%208.97266%20196.121%208.89453L197.493%208.81152V8.35254C197.493%207.82031%20197.146%207.52734%20196.492%207.52734C195.936%207.52734%20195.574%207.72754%20195.452%208.0791L195.447%208.09863H194.3L194.305%208.05469C194.422%207.15625%20195.281%206.56055%20196.551%206.56055C197.923%206.56055%20198.694%207.22461%20198.694%208.35254V12H197.493V11.2676H197.41C197.117%2011.7852%20196.551%2012.0879%20195.848%2012.0879ZM195.296%2010.4326C195.296%2010.8867%20195.682%2011.1553%20196.219%2011.1553C196.951%2011.1553%20197.493%2010.6768%20197.493%2010.042V9.6123L196.292%209.69043C195.613%209.73438%20195.296%209.9834%20195.296%2010.4229V10.4326Z'%20fill='%231E3A8A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M22.5037%2019.2842C22.9203%2019.2842%2023.2881%2019.5608%2023.402%2019.9612L24.4143%2023.5057C24.857%2025.0583%2026.071%2026.2724%2027.6236%2026.715L31.1682%2027.7273C31.6629%2027.8705%2031.9526%2028.3881%2031.8094%2028.8828C31.7215%2029.192%2031.4774%2029.4361%2031.1682%2029.524L27.6236%2030.5363C26.071%2030.9789%2024.857%2032.193%2024.4143%2033.7456L23.402%2037.2901C23.2588%2037.7849%2022.7413%2038.0745%2022.2466%2037.9313C21.9373%2037.8434%2021.6932%2037.5993%2021.6053%2037.2901L20.5931%2033.7456C20.1504%2032.193%2018.9364%2030.9789%2017.3838%2030.5363L13.8392%2029.524C13.3445%2029.3808%2013.0548%2028.8633%2013.198%2028.3685C13.2859%2028.0593%2013.53%2027.8152%2013.8392%2027.7273L17.3838%2026.715C18.9364%2026.2724%2020.1504%2025.0583%2020.5931%2023.5057L21.6053%2019.9612C21.7193%2019.5608%2022.0871%2019.2842%2022.5037%2019.2842Z'%20fill='url(%23paint0_radial_4548_14216)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13.3742%2012C13.6573%2012%2013.9047%2012.192%2013.9731%2012.4654L14.1846%2013.315C14.3799%2014.0864%2014.9821%2014.6918%2015.7535%2014.8838L16.603%2015.0954C16.9318%2015.1768%2017.1335%2015.512%2017.0522%2015.8407C16.9968%2016.0621%2016.8243%2016.2346%2016.603%2016.2899L15.7535%2016.5015C14.9821%2016.6968%2014.3767%2017.2989%2014.1846%2018.0703L13.9731%2018.9199C13.8917%2019.2486%2013.5564%2019.4504%2013.2277%2019.369C13.0064%2019.3137%2012.8339%2019.1412%2012.7785%2018.9199L12.567%2018.0703C12.3749%2017.2989%2011.7695%2016.6935%2010.9981%2016.5015L10.1486%2016.2899C9.81986%2016.2085%209.61805%2015.8733%209.69943%2015.5446C9.75476%2015.3232%209.92727%2015.1507%2010.1486%2015.0954L10.9981%2014.8838C11.7695%2014.6918%2012.3749%2014.0864%2012.567%2013.315L12.7785%2012.4654C12.8469%2012.192%2013.0943%2012%2013.3774%2012H13.3742Z'%20fill='url(%23paint1_radial_4548_14216)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.39254%2026.8813C6.54226%2026.8813%206.67571%2026.979%206.72453%2027.1189L6.90681%2027.669C6.97516%2027.8773%207.1379%2028.0401%207.34947%2028.1117L7.89954%2028.294C8.08181%2028.3558%208.17946%2028.5543%208.12087%2028.7366C8.08507%2028.8408%208.0037%2028.9222%207.89954%2028.958L7.34947%2029.1402C7.14116%2029.2086%206.97841%2029.3713%206.90681%2029.5829L6.72453%2030.133C6.66269%2030.3152%206.46414%2030.4129%206.28187%2030.3543C6.17771%2030.3185%206.09634%2030.2371%206.06054%2030.133L5.87827%2029.5829C5.80992%2029.3746%205.64392%2029.2118%205.4356%2029.1402L4.88553%2028.958C4.70326%2028.8961%204.60561%2028.6976%204.6642%2028.5153C4.7%2028.4111%204.78138%2028.3298%204.88553%2028.294L5.4356%2028.1117C5.64392%2028.0433%205.80666%2027.8806%205.87827%2027.669L6.06054%2027.1189C6.10936%2026.9757%206.24281%2026.8813%206.39254%2026.8813Z'%20fill='url(%23paint2_radial_4548_14216)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.80904%2033.5596C2.95876%2033.5596%203.09221%2033.6572%203.14104%2033.7972L3.32331%2034.3473C3.39166%2034.5556%203.5544%2034.7183%203.76597%2034.7899L4.31604%2034.9722C4.49832%2035.034%204.59596%2035.2326%204.53737%2035.4148C4.50157%2035.519%204.4202%2035.6004%204.31604%2035.6362L3.76597%2035.8185C3.55766%2035.8868%203.39492%2036.0495%203.32331%2036.2611L3.14104%2036.8112C3.07919%2036.9935%202.88065%2037.0911%202.69837%2037.0325C2.59422%2036.9967%202.51285%2036.9153%202.47704%2036.8112L2.29477%2036.2611C2.22642%2036.0528%202.06042%2035.8901%201.85211%2035.8185L1.30204%2035.6362C1.11976%2035.5743%201.02212%2035.3758%201.0807%2035.1935C1.11651%2035.0894%201.19788%2035.008%201.30204%2034.9722L1.85211%2034.7899C2.06042%2034.7216%202.22316%2034.5588%202.29477%2034.3473L2.47704%2033.7972C2.52587%2033.654%202.65931%2033.5596%202.80904%2033.5596Z'%20fill='url(%23paint3_radial_4548_14216)'/%3e%3cpath%20d='M2.42488%2032.7235C1.94641%2031.4476%201.68277%2030.0676%201.68277%2028.6256C1.68277%2023.5806%204.89532%2019.2712%209.38379%2017.634L8.79466%2016.0586C3.66498%2017.9269%200%2022.8483%200%2028.6256C0%2030.2661%200.296193%2031.835%200.836502%2033.2866L2.42488%2032.7268V32.7235Z'%20fill='url(%23paint4_radial_4548_14216)'/%3e%3cpath%20d='M20.6587%2037.7652C18.6602%2039.3633%2016.1279%2040.3202%2013.3743%2040.3202C10.0023%2040.3202%206.96221%2038.8849%204.82702%2036.5967L3.58691%2037.7359C6.02807%2040.3593%209.51078%2041.9998%2013.3776%2041.9998C16.5218%2041.9998%2019.4121%2040.9159%2021.6938%2039.0997L20.662%2037.7684L20.6587%2037.7652Z'%20fill='url(%23paint5_radial_4548_14216)'/%3e%3cpath%20d='M13.3739%2022.3664C15.0436%2022.3664%2016.5604%2023.0238%2017.6833%2024.0914L18.8095%2022.8383C17.3904%2021.5038%2015.4798%2020.6836%2013.3771%2020.6836C9.89444%2020.6836%206.93902%2022.9262%205.86816%2026.0476L7.44678%2026.627C8.28328%2024.1533%2010.6235%2022.3631%2013.3771%2022.3631L13.3739%2022.3664Z'%20fill='url(%23paint6_radial_4548_14216)'/%3e%3cpath%20d='M17.6737%2033.1658C16.5508%2034.2301%2015.0373%2034.8843%2013.3741%2034.8843C10.6074%2034.8843%208.2574%2033.0811%207.43392%2030.5879L5.84229%2031.1249C6.89035%2034.2822%209.8653%2036.5638%2013.3773%2036.5638C15.4832%2036.5638%2017.3971%2035.7436%2018.8162%2034.4059L17.677%2033.169L17.6737%2033.1658Z'%20fill='url(%23paint7_radial_4548_14216)'/%3e%3cpath%20d='M39.169%2021.2891H43.677C45.7666%2021.2891%2047.2802%2021.595%2048.2111%2022.2037C49.142%2022.8123%2049.6074%2023.7758%2049.6074%2025.0908C49.6074%2025.9761%2049.3796%2026.7149%2048.9206%2027.3041C48.4617%2027.8932%2047.8075%2028.2642%2046.9482%2028.414V28.5181C48.0158%2028.7199%2048.8002%2029.1138%2049.3014%2029.7062C49.8027%2030.2985%2050.0533%2031.0992%2050.0533%2032.1115C50.0533%2033.4753%2049.5781%2034.5429%2048.6244%2035.3143C47.6707%2036.0857%2046.3493%2036.473%2044.6502%2036.473H39.1658V21.2891H39.169ZM41.6525%2027.5645H44.0416C45.0799%2027.5645%2045.8383%2027.3985%2046.3167%2027.0697C46.7952%2026.741%2047.0328%2026.1811%2047.0328%2025.3935C47.0328%2024.6806%2046.7757%2024.1631%2046.2581%2023.8474C45.7406%2023.5284%2044.9236%2023.3689%2043.8007%2023.3689H41.6492V27.5645H41.6525ZM41.6525%2029.5792V34.3867H44.2889C45.3272%2034.3867%2046.1117%2034.1881%2046.6422%2033.791C47.1728%2033.3939%2047.4364%2032.7657%2047.4364%2031.9065C47.4364%2031.1188%2047.1662%2030.5329%2046.6259%2030.1521C46.0856%2029.7713%2045.2654%2029.5792%2044.1653%2029.5792H41.6525Z'%20fill='url(%23paint8_linear_4548_14216)'/%3e%3cpath%20d='M58.7762%2024.7817C59.2677%2024.7817%2059.6713%2024.8175%2059.9902%2024.8859L59.7526%2027.161C59.4076%2027.0764%2059.0463%2027.0374%2058.672%2027.0374C57.6955%2027.0374%2056.9046%2027.3563%2056.2992%2027.9943C55.6938%2028.6322%2055.3911%2029.459%2055.3911%2030.4778V36.4797H52.95V24.9933H54.8606L55.1828%2027.0178H55.3065C55.6873%2026.3311%2056.1853%2025.7908%2056.7972%2025.3871C57.4091%2024.9868%2058.0699%2024.785%2058.7762%2024.785V24.7817Z'%20fill='url(%23paint9_linear_4548_14216)'/%3e%3cpath%20d='M69.309%2036.4734L68.8208%2034.8753H68.7394C68.1861%2035.575%2067.6295%2036.0503%2067.0664%2036.3041C66.5065%2036.558%2065.784%2036.685%2064.9051%2036.685C63.7757%2036.685%2062.8969%2036.379%2062.2622%2035.7703C61.6275%2035.1617%2061.3118%2034.2991%2061.3118%2033.186C61.3118%2032.0012%2061.7512%2031.1094%2062.63%2030.5072C63.5088%2029.9051%2064.8498%2029.5763%2066.6498%2029.521L68.632%2029.4591V28.8472C68.632%2028.1116%2068.4595%2027.5648%2068.1177%2027.2003C67.7759%2026.8357%2067.2421%2026.6534%2066.5228%2026.6534C65.9337%2026.6534%2065.3706%2026.7413%2064.8303%2026.9138C64.29%2027.0864%2063.7692%2027.2914%2063.2712%2027.5258L62.4803%2025.7811C63.1019%2025.4557%2063.7855%2025.2083%2064.5276%2025.039C65.2697%2024.8698%2065.9662%2024.7852%2066.627%2024.7852C68.0884%2024.7852%2069.1918%2025.1041%2069.9339%2025.7421C70.6793%2026.38%2071.0503%2027.3793%2071.0503%2028.7431V36.4799H69.3057L69.309%2036.4734ZM65.6733%2034.8134C66.5586%2034.8134%2067.2714%2034.566%2067.8085%2034.0713C68.3455%2033.5766%2068.6124%2032.8833%2068.6124%2031.9882V30.9922L67.138%2031.054C65.989%2031.0963%2065.1525%2031.2884%2064.6285%2031.6301C64.1044%2031.9719%2063.8441%2032.4992%2063.8441%2033.2055C63.8441%2033.7165%2063.997%2034.1136%2064.2997%2034.3935C64.6057%2034.6734%2065.0614%2034.8134%2065.67%2034.8134H65.6733Z'%20fill='url(%23paint10_linear_4548_14216)'/%3e%3cpath%20d='M84.5646%2036.4732H82.1137V29.4102C82.1137%2028.5248%2081.9347%2027.8641%2081.5799%2027.4279C81.2219%2026.9918%2080.6588%2026.7737%2079.8809%2026.7737C78.8491%2026.7737%2078.0939%2027.0797%2077.6155%2027.6883C77.137%2028.297%2076.8994%2029.319%2076.8994%2030.7512V36.4732H74.4583V24.9868H76.3689L76.7106%2026.4938H76.8343C77.1793%2025.947%2077.6708%2025.5238%2078.3088%2025.2277C78.9467%2024.9315%2079.653%2024.7817%2080.4277%2024.7817C83.1846%2024.7817%2084.5614%2026.1846%2084.5614%2028.987V36.4765L84.5646%2036.4732Z'%20fill='url(%23paint11_linear_4548_14216)'/%3e%3cpath%20d='M91.836%2036.6814C90.4038%2036.6814%2089.2841%2036.1606%2088.4802%2035.1223C87.6762%2034.084%2087.2759%2032.6258%2087.2759%2030.751C87.2759%2028.8762%2087.6827%2027.4018%2088.4965%2026.3537C89.3102%2025.3056%2090.4364%2024.7816%2091.8783%2024.7816C93.3202%2024.7816%2094.5375%2025.3382%2095.3252%2026.4546H95.4489C95.3317%2025.6311%2095.2731%2024.9802%2095.2731%2024.5017V20.3159H97.724V36.4763H95.8134L95.387%2034.9693H95.2731C94.4919%2036.1118%2093.3462%2036.6847%2091.836%2036.6847V36.6814ZM92.4902%2034.709C93.4927%2034.709%2094.225%2034.4258%2094.6807%2033.8627C95.1364%2033.2996%2095.374%2032.3817%2095.387%2031.1156V30.7738C95.387%2029.3254%2095.1527%2028.2969%2094.6807%2027.6882C94.2088%2027.0795%2093.4732%2026.7736%2092.4674%2026.7736C91.6081%2026.7736%2090.9474%2027.1219%2090.4852%2027.8184C90.023%2028.5149%2089.7886%2029.5044%2089.7886%2030.7933C89.7886%2032.0823%2090.0132%2033.0392%2090.4624%2033.7065C90.9116%2034.3737%2091.5886%2034.709%2092.4869%2034.709H92.4902Z'%20fill='url(%23paint12_linear_4548_14216)'/%3e%3cpath%20d='M106.997%2036.473V21.2891H109.481V36.473H106.997Z'%20fill='url(%23paint13_linear_4548_14216)'/%3e%3cpath%20d='M123.334%2036.4732H120.883V29.4102C120.883%2028.5248%20120.704%2027.8641%20120.349%2027.4279C119.991%2026.9918%20119.428%2026.7737%20118.65%2026.7737C117.618%2026.7737%20116.863%2027.0797%20116.385%2027.6883C115.906%2028.297%20115.668%2029.319%20115.668%2030.7512V36.4732H113.227V24.9868H115.138L115.48%2026.4938H115.603C115.948%2025.947%20116.44%2025.5238%20117.078%2025.2277C117.716%2024.9315%20118.422%2024.7817%20119.197%2024.7817C121.954%2024.7817%20123.33%2026.1846%20123.33%2028.987V36.4765L123.334%2036.4732Z'%20fill='url(%23paint14_linear_4548_14216)'/%3e%3cpath%20d='M134.449%2033.2019C134.449%2034.3249%20134.039%2035.1841%20133.222%2035.783C132.405%2036.3819%20131.233%2036.6814%20129.71%2036.6814C128.187%2036.6814%20126.95%2036.4503%20126.022%2035.9848V33.8757C127.373%2034.4974%20128.629%2034.8098%20129.791%2034.8098C131.295%2034.8098%20132.044%2034.3574%20132.044%2033.4493C132.044%2033.1596%20131.959%2032.9155%20131.793%2032.7235C131.627%2032.5314%20131.354%2032.3296%20130.973%2032.1213C130.592%2031.913%20130.062%2031.6786%20129.385%2031.415C128.063%2030.904%20127.168%2030.3897%20126.699%2029.8787C126.231%2029.3677%20126%2028.7004%20126%2027.8835C126%2026.9005%20126.397%2026.1389%20127.188%2025.592C127.982%2025.0485%20129.059%2024.7783%20130.423%2024.7783C131.787%2024.7783%20133.05%2025.0517%20134.254%2025.5986L133.466%2027.4376C132.226%2026.9265%20131.185%2026.6694%20130.342%2026.6694C129.053%2026.6694%20128.411%2027.0372%20128.411%2027.7695C128.411%2028.1308%20128.581%2028.4335%20128.916%2028.6842C129.251%2028.9348%20129.983%2029.2766%20131.113%2029.7127C132.06%2030.0805%20132.75%2030.4158%20133.18%2030.7217C133.609%2031.0277%20133.928%2031.3792%20134.137%2031.7763C134.345%2032.1734%20134.449%2032.6519%20134.449%2033.2052V33.2019Z'%20fill='url(%23paint15_linear_4548_14216)'/%3e%3cpath%20d='M136.939%2021.9434C136.939%2021.5072%20137.059%2021.172%20137.297%2020.9344C137.535%2020.6968%20137.876%2020.5796%20138.319%2020.5796C138.762%2020.5796%20139.081%2020.6968%20139.322%2020.9344C139.562%2021.1687%20139.68%2021.504%20139.68%2021.9434C139.68%2022.3828%20139.559%2022.6855%20139.322%2022.9264C139.084%2023.164%20138.749%2023.2844%20138.319%2023.2844C137.889%2023.2844%20137.535%2023.164%20137.297%2022.9264C137.059%2022.6887%20136.939%2022.36%20136.939%2021.9434ZM139.527%2036.4731H137.085V24.9867H139.527V36.4731Z'%20fill='url(%23paint16_linear_4548_14216)'/%3e%3cpath%20d='M152.715%2024.987V26.328L150.752%2026.6925C150.931%2026.9334%20151.081%2027.2328%20151.198%2027.5843C151.316%2027.9359%20151.374%2028.3102%20151.374%2028.7073C151.374%2029.892%20150.964%2030.8229%20150.147%2031.5C149.33%2032.177%20148.204%2032.5187%20146.772%2032.5187C146.404%2032.5187%20146.072%2032.4927%20145.776%2032.4373C145.248%2032.7628%20144.988%2033.1437%20144.988%2033.5798C144.988%2033.8435%20145.112%2034.0387%20145.356%2034.1722C145.603%2034.3024%20146.052%2034.3707%20146.71%2034.3707H148.715C149.981%2034.3707%20150.945%2034.6409%20151.602%2035.1812C152.259%2035.7215%20152.588%2036.4994%20152.588%2037.5182C152.588%2038.8202%20152.051%2039.8227%20150.977%2040.529C149.903%2041.2353%20148.354%2041.5868%20146.326%2041.5868C144.76%2041.5868%20143.566%2041.3101%20142.742%2040.7568C141.919%2040.2035%20141.505%2039.4125%20141.505%2038.3905C141.505%2037.6842%20141.73%2037.0918%20142.176%2036.6101C142.622%2036.1284%20143.247%2035.7964%20144.051%2035.6076C143.725%2035.4676%20143.455%2035.2463%20143.247%2034.9371C143.035%2034.6279%20142.931%2034.3056%20142.931%2033.9671C142.931%2033.5375%20143.051%2033.173%20143.296%2032.8768C143.54%2032.5806%20143.898%2032.2844%20144.376%2031.9947C143.781%2031.7376%20143.299%2031.3209%20142.928%2030.7416C142.557%2030.1655%20142.371%2029.4884%20142.371%2028.7105C142.371%2027.4639%20142.765%2026.4972%20143.549%2025.8137C144.334%2025.1269%20145.454%2024.7852%20146.908%2024.7852C147.234%2024.7852%20147.576%2024.8079%20147.93%2024.8535C148.289%2024.8991%20148.555%2024.9446%20148.734%2024.9935H152.712L152.715%2024.987ZM143.689%2038.2603C143.689%2038.7876%20143.927%2039.1912%20144.402%2039.4744C144.877%2039.7576%20145.541%2039.9008%20146.401%2039.9008C147.729%2039.9008%20148.721%2039.7087%20149.372%2039.3279C150.023%2038.9471%20150.349%2038.4426%20150.349%2037.8111C150.349%2037.3131%20150.17%2036.9584%20149.815%2036.7468C149.457%2036.5352%20148.796%2036.4311%20147.826%2036.4311H145.978C145.278%2036.4311%20144.721%2036.5971%20144.311%2036.9258C143.898%2037.2546%20143.693%2037.7005%20143.693%2038.2603H143.689ZM144.741%2028.7073C144.741%2029.4266%20144.926%2029.9799%20145.297%2030.3705C145.668%2030.7578%20146.199%2030.9531%20146.892%2030.9531C148.305%2030.9531%20149.011%2030.198%20149.011%2028.6877C149.011%2027.9391%20148.835%2027.363%20148.487%2026.9594C148.139%2026.5558%20147.605%2026.3507%20146.892%2026.3507C146.179%2026.3507%20145.652%2026.5526%20145.288%2026.9529C144.923%2027.3532%20144.741%2027.9391%20144.741%2028.7073Z'%20fill='url(%23paint17_linear_4548_14216)'/%3e%3cpath%20d='M164.95%2036.4729H162.499V29.4099C162.499%2028.5245%20162.32%2027.8638%20161.965%2027.4276C161.607%2026.9915%20161.044%2026.7734%20160.266%2026.7734C159.241%2026.7734%20158.489%2027.0794%20158.007%2027.6913C157.526%2028.3032%20157.285%2029.3317%20157.285%2030.7704V36.4729H154.844V20.3125H157.285V24.4136C157.285%2025.0711%20157.243%2025.7742%20157.161%2026.5228H157.317C157.649%2025.9695%20158.112%2025.5398%20158.704%2025.2339C159.296%2024.9279%20159.986%2024.7782%20160.774%2024.7782C163.557%2024.7782%20164.95%2026.181%20164.95%2028.9835V36.4729Z'%20fill='url(%23paint18_linear_4548_14216)'/%3e%3cpath%20d='M172.625%2034.709C173.221%2034.709%20173.816%2034.6146%20174.412%2034.4291V36.2681C174.142%2036.3853%20173.794%2036.4829%20173.367%2036.5643C172.941%2036.6424%20172.501%2036.6847%20172.042%2036.6847C169.728%2036.6847%20168.573%2035.4674%20168.573%2033.0295V26.8387H167.004V25.7581L168.687%2024.863L169.517%2022.4316H171.024V24.9867H174.295V26.8355H171.024V32.9839C171.024%2033.5731%20171.17%2034.006%20171.466%2034.2859C171.763%2034.5658%20172.147%2034.7058%20172.625%2034.7058V34.709Z'%20fill='url(%23paint19_linear_4548_14216)'/%3e%3cpath%20d='M184.424%2033.2019C184.424%2034.3249%20184.014%2035.1841%20183.197%2035.783C182.38%2036.3819%20181.208%2036.6814%20179.685%2036.6814C178.161%2036.6814%20176.925%2036.4503%20175.997%2035.9848V33.8757C177.348%2034.4974%20178.604%2034.8098%20179.766%2034.8098C181.27%2034.8098%20182.018%2034.3574%20182.018%2033.4493C182.018%2033.1596%20181.934%2032.9155%20181.768%2032.7235C181.602%2032.5314%20181.328%2032.3296%20180.948%2032.1213C180.567%2031.913%20180.036%2031.6786%20179.359%2031.415C178.038%2030.904%20177.143%2030.3897%20176.674%2029.8787C176.205%2029.3677%20175.974%2028.7004%20175.974%2027.8835C175.974%2026.9005%20176.371%2026.1389%20177.162%2025.592C177.956%2025.0485%20179.034%2024.7783%20180.397%2024.7783C181.761%2024.7783%20183.024%2025.0517%20184.228%2025.5986L183.441%2027.4376C182.201%2026.9265%20181.159%2026.6694%20180.316%2026.6694C179.027%2026.6694%20178.386%2027.0372%20178.386%2027.7695C178.386%2028.1308%20178.555%2028.4335%20178.89%2028.6842C179.226%2028.9348%20179.958%2029.2766%20181.088%2029.7127C182.035%2030.0805%20182.725%2030.4158%20183.154%2030.7217C183.584%2031.0277%20183.903%2031.3792%20184.111%2031.7763C184.32%2032.1734%20184.424%2032.6519%20184.424%2033.2052V33.2019Z'%20fill='url(%23paint20_linear_4548_14216)'/%3e%3cdefs%3e%3cradialGradient%20id='paint0_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0672%2015.5248)%20scale(61.1655%2061.1655)'%3e%3cstop%20offset='0.17'%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint1_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0676%2015.525)%20scale(61.1655%2061.1655)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint2_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8974)%20scale(61.1655%2061.1654)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint3_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8984)%20scale(61.1655%2061.1656)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint4_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8978)%20scale(61.1655%2061.1655)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint5_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8978)%20scale(61.1655%2061.1654)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint6_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0673%2015.5246)%20scale(61.1655%2061.1656)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint7_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0675%20-58.8983)%20scale(61.1655%2061.1656)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3clinearGradient%20id='paint8_linear_4548_14216'%20x1='27.6858'%20y1='26.9883'%20x2='184.655'%20y2='47.7609'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint9_linear_4548_14216'%20x1='27.7019'%20y1='26.8681'%20x2='184.671'%20y2='47.6374'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint10_linear_4548_14216'%20x1='27.8582'%20y1='25.703'%20x2='184.827'%20y2='46.4723'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint11_linear_4548_14216'%20x1='28.0796'%20y1='24.0657'%20x2='185.049'%20y2='44.835'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint12_linear_4548_14216'%20x1='28.6426'%20y1='19.7724'%20x2='185.612'%20y2='40.5417'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint13_linear_4548_14216'%20x1='28.8281'%20y1='18.376'%20x2='185.794'%20y2='39.1453'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint14_linear_4548_14216'%20x1='28.7407'%20y1='19.0206'%20x2='185.71'%20y2='39.7899'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint15_linear_4548_14216'%20x1='28.9621'%20y1='17.367'%20x2='185.928'%20y2='38.1363'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint16_linear_4548_14216'%20x1='29.382'%20y1='14.187'%20x2='186.351'%20y2='34.9563'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint17_linear_4548_14216'%20x1='28.9585'%20y1='17.3836'%20x2='185.928'%20y2='38.1529'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint18_linear_4548_14216'%20x1='29.7136'%20y1='11.6741'%20x2='186.683'%20y2='32.4466'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint19_linear_4548_14216'%20x1='29.8241'%20y1='10.8313'%20x2='186.794'%20y2='31.6039'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint20_linear_4548_14216'%20x1='29.8206'%20y1='10.867'%20x2='186.79'%20y2='31.6364'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e";function r6(e,t){return a6(e)||o6(e,t)||s6(e,t)||i6()}function i6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
23
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
24
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f6(e,t){if(e){if(typeof e=="string")return _0(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_0(e,t):void 0}}function _0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h6(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function g6(e){if(Array.isArray(e))return e}var y6=function(t){var n,r,i=t.className,s=Ut(),o=cn(),a=z.useState(!1),l=u6(a,2),c=l[0],u=l[1],d=Hi({query:{select:function(k){var w=k.data;return w==null?void 0:w.brands}}}),f=d.data,h=Xv({mutation:{onSettled:function(){s.invalidateQueries({queryKey:[Wn()]})}}}),g=h.mutateAsync,m=h.isPending,p=(n=f==null?void 0:f.filter(function(x){var k;return((k=x.settings)===null||k===void 0?void 0:k.showAutomaticAnalysisDisabledNotification)===!0}))!==null&&n!==void 0?n:[],v=function(){u(!1)},b=function(){var x=c6(Ad().m(function k(){var w;return Ad().w(function(_){for(;;)switch(_.n){case 0:if(p.length!==0){_.n=1;break}return _.a(2);case 1:return w=p.map(function(O){return g({brandId:String(O.id),data:{showAutomaticAnalysisDisabledNotification:!1}})}),_.n=2,Promise.all(w);case 2:o("/settings"),v();case 3:return _.a(2)}},k)}));return function(){return x.apply(this,arguments)}}();z.useEffect(function(){f&&f.some(function(x){var k;return((k=x.settings)===null||k===void 0?void 0:k.showAutomaticAnalysisDisabledNotification)===!0})&&u(!0)},[f]);var S=p.length===1?"One brand has been deactivated":"Multiple brands have been deactivated",C=p.length===1?y.jsxs(y.Fragment,{children:[y.jsx("p",{children:"You recently lost a subscription. Because of this, we could not analyze all your active brands."}),y.jsxs("p",{children:["The brand ",y.jsx("b",{children:p==null||(r=p[0])===null||r===void 0?void 0:r.name})," was deactivated, since it was the most recently analyzed."]}),y.jsxs("p",{children:["If you prefer, you can go to ",y.jsx("b",{children:"Settings"})," and deactivate a different brand instead."]})]}):y.jsxs(y.Fragment,{children:[y.jsx("p",{children:"You recently lost a subscription. Because of this, we could not analyze all your active brands."}),y.jsx("p",{children:"The following brands were deactivated, since they were the most recently analyzed:"}),y.jsx("ul",{children:p.map(function(x){return y.jsx("li",{children:y.jsx("b",{children:x.name})},x.id)})}),y.jsxs("p",{children:["If you prefer, you can go to ",y.jsx("b",{children:"Settings"})," and deactivate different brand(s) instead."]})]});return c?y.jsx(P.Modal,{isOpen:c,onClose:b,position:"center",as:"div",className:i,children:y.jsxs(P.Modal.Panel,{children:[y.jsx("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:y.jsxs("div",{className:"yst-flex-1",children:[y.jsx(P.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:y.jsx(P.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:S})}),y.jsx(P.Modal.Container.Content,{className:"yst-mb-4 yst-space-y-3",children:C})]})}),y.jsxs(P.Modal.Container.Footer,{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-2",children:[y.jsx(P.Button,{variant:"secondary",onClick:b,children:"Close"}),y.jsx(P.Button,{variant:"primary",onClick:b,isLoading:m,disabled:p.length===0,children:"Go to settings"})]})]})}):null},Dc=function(){return y.jsx("div",{className:"yst-flex yst-min-h-screen yst-items-center yst-justify-center",children:y.jsxs("div",{className:"yst-flex yst-items-center yst-gap-3 yst-text-center",children:[y.jsx(P.Spinner,{variant:"primary"}),y.jsx("span",{className:"yst-italic",children:"Just a moment while we get things ready for you..."})]})})},m6={HOME:"/"},p6=function(t){var n=t.hideNav,r=n===void 0?!1:n,i=t.disableLayout,s=i===void 0?!1:i,o=t.DebugInfo,a=Ht(),l=cn(),c={disable:s,hideNav:r},u=Jn(),d=u.brandId,f=Na(),h=f.setBrandId,g=Hi({query:{refetchOnReconnect:!1,refetchOnWindowFocus:!1,select:function(w){var _;return w==null||(_=w.data)===null||_===void 0?void 0:_.brands}}}),m=g.data,p=g.isLoading,v=g.error,b=g.refetch,S=z.useRef(!1),C=z.useMemo(function(){return m==null?void 0:m.find(function(k){return k.id===d})},[m,d]);z.useEffect(function(){var k;if(!(m===void 0||d)){var w=(k=m[0])===null||k===void 0?void 0:k.id;w&&h(w)}},[m,d,h,l,a.pathname]),z.useEffect(function(){!d||S.current||(S.current=!0)},[C,d,l,a.pathname,m]);var x=z.useCallback(function(){b()},[b]);return a.pathname!==m6.HOME&&p?y.jsx(yu,{...c,children:y.jsx(Dc,{})}):v?y.jsx(yu,{...c,children:y.jsx("div",{className:"yst-flex yst-min-h-screen yst-items-center yst-justify-center",children:y.jsxs("div",{className:"yst-space-y-4 yst-text-center",children:[y.jsx("div",{className:"yst-mb-4 yst-text-6xl yst-text-red-600",children:"⚠️"}),y.jsx("h2",{className:"yst-text-xl yst-font-semibold yst-text-slate-900",children:"Something went wrong"}),y.jsx("p",{className:"yst-text-slate-600",children:"We couldn't load your Brand Analysis. Please try again shortly."}),y.jsx(P.Button,{variant:"primary",onClick:x,children:"Retry"})]})})}):y.jsxs(yu,{DebugInfo:o,...c,children:[y.jsx(Fs,{}),y.jsx(y6,{})]})},v6=function(){var t=pc(),n=t.brandId,r=t.analysisId,i=Wv(n,{query:{enabled:!!n,select:function(d){var f=d.data;return(f==null?void 0:f.analyses)||[]}}}),s=i.data,o=i.isLoading,a=i.error;if(o)return y.jsx(Dc,{});if(a)return console.error("Error fetching analyses for validation:",a),y.jsx(hi,{to:"/brands/".concat(n),replace:!0});if(!r||r.trim()==="")return y.jsx(hi,{to:"/brands/".concat(n),replace:!0});if(r==="latest")return y.jsx(Fs,{});var l=parseInt(r,10);if(isNaN(l))return y.jsx(hi,{to:"/brands/".concat(n),replace:!0});var c=s==null?void 0:s.some(function(u){return u.id===l});return c?y.jsx(Fs,{}):y.jsx(hi,{to:"/brands/".concat(n),replace:!0})},k0=function(){var t=pc(),n=t.brandId,r=Hi({query:{select:function(f){var h=f.data;return h}}}),i=r.data,s=r.isLoading,o=r.error,a=r.isFetched,l=(i==null?void 0:i.brands)||[];if(s||!a)return y.jsx(Dc,{});if(o)return y.jsx(hi,{to:"/",replace:!0});if(!n||n.trim()==="")return y.jsx(hi,{to:"/",replace:!0});var c=parseInt(n,10),u=l.length>0&&l.some(function(d){var f=String(d.id),h=typeof d.id=="number"?d.id:parseInt(String(d.id),10);return f===n||h===c||d.id===n});return a&&!u?y.jsx(hi,{to:"/",replace:!0}):y.jsx(Fs,{})},b6={openai:"openai",perplexity:"perplexity",anthropic:"anthropic"},x6={updating:"updating"},li={pending:"pending",processing:"processing",completed:"completed",failed:"failed",cancelled:"cancelled"},w6=function(t){return typeof t=="string"&&t!=="latest"&&t.trim().length>0};function S6(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{fillRule:"evenodd",d:"M14.707 12.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}const r2=L.forwardRef(S6);function C6(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{fillRule:"evenodd",d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))}const _6=L.forwardRef(C6);function k6(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{fillRule:"evenodd",d:"M5.293 7.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L6.707 7.707a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}const i2=L.forwardRef(k6);function O6(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))}const s2=L.forwardRef(O6);function E6(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"}))}const A6=L.forwardRef(E6);function P6(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"}))}const T6=L.forwardRef(P6);function M6(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{d:"M6 10a2 2 0 11-4 0 2 2 0 014 0zM12 10a2 2 0 11-4 0 2 2 0 014 0zM16 12a2 2 0 100-4 2 2 0 000 4z"}))}const O0=L.forwardRef(M6);function j6(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{d:"M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),L.createElement("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"}))}const $6=L.forwardRef(j6);function D6(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{fillRule:"evenodd",d:"M2 5a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm14 1a1 1 0 11-2 0 1 1 0 012 0zM2 13a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2v-2zm14 1a1 1 0 11-2 0 1 1 0 012 0z",clipRule:"evenodd"}))}const L6=L.forwardRef(D6);function I6(e,t){return L.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),L.createElement("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"}))}const R6=L.forwardRef(I6);function ta(e){"@babel/helpers - typeof";return ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ta(e)}var N6=["children","as","startColor","endColor","angle","disabled","style","className"];function E0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function A0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?E0(Object(n),!0).forEach(function(r){F6(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function F6(e,t,n){return(t=B6(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B6(e){var t=q6(e,"string");return ta(t)=="symbol"?t:t+""}function q6(e,t){if(ta(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ta(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function z6(e,t){if(e==null)return{};var n,r,i=H6(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function H6(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Lc=function(t){var n=t.children,r=t.as,i=r===void 0?"span":r,s=t.startColor,o=s===void 0?"#A61E69":s,a=t.endColor,l=a===void 0?"#6366F1":a,c=t.angle,u=c===void 0?102:c,d=t.disabled,f=d===void 0?!1:d,h=t.style,g=h===void 0?{}:h,m=t.className,p=m===void 0?"":m,v=z6(t,N6),b=A0(f?{display:"inline-block"}:{background:"linear-gradient(".concat(u,"deg, ").concat(o,", ").concat(l,")"),WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",display:"inline-block"},g);return y.jsx(i,{className:p,style:b,...v,children:n})};function Ef(e){var t=e.children,n=e.nestedInPaperContent,r=n===void 0?!1:n,i=e.className;return y.jsx("div",{className:ke("yst-mt-8 yst-flex yst-items-center yst-justify-end yst-gap-6 yst-rounded-bl-lg yst-rounded-br-lg yst-border-t yst-border-slate-200 yst-bg-slate-50 yst-px-8 yst-py-6",{"yst-mb-[-2rem] yst-ml-[-2rem] yst-mr-[-2rem]":r},i),children:t})}var U6=function(){var t=cn();return y.jsx("form",{onSubmit:function(){return t("/setup")},children:y.jsxs(P.Paper,{className:"yst-mx-auto yst-flex yst-max-w-2xl",children:[y.jsx(P.Paper.Header,{children:y.jsxs(P.Title,{size:"1",children:["Welcome to ",y.jsx(Lc,{children:"Yoast AI Brand Insights"}),"!"]})}),y.jsxs(P.Paper.Content,{className:"yst-space-y-8",children:[y.jsxs("div",{className:"yst-space-y-4 *:yst-text-tiny",children:[y.jsx("p",{children:"See how your brand is represented in AI answers."}),y.jsxs("p",{children:[y.jsx("b",{className:"yst-font-medium yst-text-slate-800",children:"Yoast AI Brand Insights"})," ","shows how often your brand appears, how it's described, and how it compares to competitors in tools like ChatGPT."]}),y.jsx("p",{children:"It only takes three simple steps to get your brand insights:"})]}),y.jsx("div",{className:"yst-flex yst-flex-col yst-items-stretch yst-justify-stretch yst-gap-4 yst-pb-8",children:[{title:"1. ADD BRAND INFO",description:"Tell us about your brand and where it's active so we can customize your analysis."},{title:"2. REVIEW QUERIES",description:"Edit or approve the queries generated from your input."},{title:"3. RUN ANALYSIS",description:"Run your queries through relevant AI models to see how your brand shows up."}].map(function(n,r,i){return y.jsxs("div",{className:"yst-relative yst-flex yst-flex-col yst-items-stretch",children:[y.jsxs("div",{className:"yst-flex yst-flex-row yst-items-center yst-justify-stretch yst-gap-6",children:[y.jsx(P.Stepper.Step,{isActive:!0,isComplete:!1,children:y.jsx("span",{className:"yst-hidden",children:r+1})}),y.jsxs("div",{className:"yst-flex yst-flex-1 yst-flex-col yst-gap-2 yst-rounded yst-border yst-border-slate-200 yst-p-6",children:[y.jsx(P.Title,{size:"3",className:"yst-font-semibold yst-uppercase",children:n.title}),y.jsx("p",{className:"yst-my-0 yst-py-0",children:n.description})]})]}),r<i.length-1&&y.jsx("div",{className:"yst-absolute yst-left-[-2px] yst-top-1/2 yst-my-0 yst-ml-[13px] yst-h-full yst-border-l-2 yst-border-l-primary-600"})]},n.title)})})]}),y.jsx(Ef,{className:"yst-justify-end",children:y.jsxs(P.Button,{variant:"primary",onClick:function(){return t("/setup")},className:"yst-gap-1.5",children:["Start your first analysis ",y.jsx(_6,{})]})})]})})};function na(e){return typeof e!="number"?{}:{"yst-text-green-600":e>0,"yst-text-red-600":e<0,"yst-text-gray-400":e===0}}function Fa(e){var t=e.score,n=e.total,r=e.suffix,i=e.isLoading,s=i===void 0?!1:i,o=e.className,a=e.hideTotal,l=a===void 0?!1:a,c=e.delta,u=e.deltaFormat,d=u===void 0?"absolute":u,f=e.deltaSuffix,h=e.scoreFormat,g=h===void 0?"absolute":h;return y.jsxs("div",{className:ke(o,"yst-font-medium"),children:[y.jsxs("span",{className:"yst-mr-1 yst-text-xl yst-font-bold yst-text-slate-900",children:[s||t===void 0||t===null?"—":t,!s&&t!==void 0&&t!==null&&g==="percentage"?"%":""]}),!l&&n&&n!==0&&n!=="0"&&y.jsxs("span",{className:"yst-text-slate-500",children:["/ ",s?"—":n]}),r&&y.jsxs("span",{className:"yst-text-slate-500",children:[" ",r]}),typeof c=="number"&&!isNaN(c)&&y.jsxs("span",{className:ke("yst-ml-2",na(c)),children:[c>-1&&"+",c,d==="percentage"&&"%"," ",f]})]})}var G6=["Icon","className","children","position","id"];function K6(e,t){return Y6(e)||Q6(e,t)||W6(e,t)||V6()}function V6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
25
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
26
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
27
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
28
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
22
|
+
*/var _0;function E4(){return _0||(_0=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)t.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(pc)),pc.exports}var A4=E4();const Oe=yp(A4);var P4=function(t){return q5({mutation:{onSettled:function(){t&&t()}}})};function T4(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"}))}const M4=I.forwardRef(T4);function j4(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))}const $4=I.forwardRef(j4);function D4(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"}))}const L4=I.forwardRef(D4);function I4(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))}const R4=I.forwardRef(I4);function N4(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))}const F4=I.forwardRef(N4);function B4(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"}))}const q4=I.forwardRef(B4);function z4(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"}))}const H4=I.forwardRef(z4);function U4(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))}const s2=I.forwardRef(U4);function G4(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))}const K4=I.forwardRef(G4);function V4(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))}const o2=I.forwardRef(V4);function W4(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))}const a2=I.forwardRef(W4);function Q4(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 12l3-3 3 3 4-4M8 21l4-4 4 4M3 4h18M4 4h16v12a1 1 0 01-1 1H5a1 1 0 01-1-1V4z"}))}const Y4=I.forwardRef(Q4);function X4(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))}const Z4=I.forwardRef(X4);function J4(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"}))}const e6=I.forwardRef(J4);function t6(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))}const Mf=I.forwardRef(t6);function n6(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))}const r6=I.forwardRef(n6);var i6=function(){return[{label:"Brand analysis",href:"/",Icon:Y4,isActive:function(n){return n.startsWith("/setup")||n==="/"},showInMenu:!0},{label:"Settings",href:"/settings",Icon:F4,isActive:function(n){return n.startsWith("/settings")},showInMenu:!0}]},k0;function s6(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var O0=function(t){var n=t.className,r=Ut(),i=r.pathname,s=i6();return y.jsx("div",{className:Oe("yst-flex yst-flex-col yst-gap-10",n),children:y.jsx(P.SidebarNavigation.Sidebar,{children:y.jsx(P.SidebarNavigation.List,{className:"yst-space-y-2",children:s.filter(function(o){return o.showInMenu!==!1}).map(function(o){var a=o.isActive?o.isActive(i):!1;return y.jsx(P.SidebarNavigation.SubmenuItem,{className:Oe("yst-flex yst-gap-x-3",{"yst-sidebar-navigation__item--active":a}),href:o.href,to:o.href,as:ti,label:y.jsxs(y.Fragment,{children:[y.jsx(o.Icon,{className:Oe(k0||(k0=s6(["yst-sidebar-navigation__icon yst-h-6 yst-w-6"])))}),o.label]})},o.label)})})})})};const o6="data:image/svg+xml,%3csvg%20width='208'%20height='42'%20viewBox='0%200%20208%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='169'%20width='39'%20height='16'%20rx='8'%20fill='%23BFDBFE'/%3e%3cpath%20d='M177.869%2012V4.9541H180.813C182.151%204.9541%20182.957%205.62793%20182.957%206.70703V6.7168C182.957%207.4541%20182.41%208.1084%20181.702%208.2207V8.30859C182.649%208.39648%20183.304%209.08008%20183.304%209.99316V10.0029C183.304%2011.2383%20182.386%2012%20180.882%2012H177.869ZM180.506%205.93555H179.129V7.92285H180.345C181.238%207.92285%20181.712%207.57617%20181.712%206.93652V6.92676C181.712%206.30176%20181.268%205.93555%20180.506%205.93555ZM180.545%208.81641H179.129V11.0186H180.594C181.521%2011.0186%20182.015%2010.6328%20182.015%209.91504V9.90527C182.015%209.19238%20181.507%208.81641%20180.545%208.81641ZM186.834%2012.1074C185.247%2012.1074%20184.285%2011.043%20184.285%209.34375V9.33887C184.285%207.65918%20185.257%206.56055%20186.775%206.56055C188.294%206.56055%20189.231%207.625%20189.231%209.23633V9.63672H185.501C185.516%2010.5938%20186.033%2011.1504%20186.858%2011.1504C187.518%2011.1504%20187.894%2010.8184%20188.011%2010.5742L188.025%2010.54H189.183L189.168%2010.584C188.997%2011.2725%20188.284%2012.1074%20186.834%2012.1074ZM186.79%207.5127C186.111%207.5127%20185.604%207.97168%20185.511%208.82129H188.045C187.962%207.94727%20187.469%207.5127%20186.79%207.5127ZM192.547%2012.0244C191.321%2012.0244%20190.818%2011.6143%20190.818%2010.584V7.60547H189.988V6.66309H190.818V5.35449H192.054V6.66309H193.182V7.60547H192.054V10.2959C192.054%2010.8281%20192.264%2011.0527%20192.771%2011.0527C192.942%2011.0527%20193.035%2011.0479%20193.182%2011.0332V11.9707C193.006%2012.0049%20192.781%2012.0244%20192.547%2012.0244ZM195.848%2012.0879C194.832%2012.0879%20194.095%2011.4629%20194.095%2010.4912V10.4814C194.095%209.5293%20194.822%208.97266%20196.121%208.89453L197.493%208.81152V8.35254C197.493%207.82031%20197.146%207.52734%20196.492%207.52734C195.936%207.52734%20195.574%207.72754%20195.452%208.0791L195.447%208.09863H194.3L194.305%208.05469C194.422%207.15625%20195.281%206.56055%20196.551%206.56055C197.923%206.56055%20198.694%207.22461%20198.694%208.35254V12H197.493V11.2676H197.41C197.117%2011.7852%20196.551%2012.0879%20195.848%2012.0879ZM195.296%2010.4326C195.296%2010.8867%20195.682%2011.1553%20196.219%2011.1553C196.951%2011.1553%20197.493%2010.6768%20197.493%2010.042V9.6123L196.292%209.69043C195.613%209.73438%20195.296%209.9834%20195.296%2010.4229V10.4326Z'%20fill='%231E3A8A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M22.5037%2019.2842C22.9203%2019.2842%2023.2881%2019.5608%2023.402%2019.9612L24.4143%2023.5057C24.857%2025.0583%2026.071%2026.2724%2027.6236%2026.715L31.1682%2027.7273C31.6629%2027.8705%2031.9526%2028.3881%2031.8094%2028.8828C31.7215%2029.192%2031.4774%2029.4361%2031.1682%2029.524L27.6236%2030.5363C26.071%2030.9789%2024.857%2032.193%2024.4143%2033.7456L23.402%2037.2901C23.2588%2037.7849%2022.7413%2038.0745%2022.2466%2037.9313C21.9373%2037.8434%2021.6932%2037.5993%2021.6053%2037.2901L20.5931%2033.7456C20.1504%2032.193%2018.9364%2030.9789%2017.3838%2030.5363L13.8392%2029.524C13.3445%2029.3808%2013.0548%2028.8633%2013.198%2028.3685C13.2859%2028.0593%2013.53%2027.8152%2013.8392%2027.7273L17.3838%2026.715C18.9364%2026.2724%2020.1504%2025.0583%2020.5931%2023.5057L21.6053%2019.9612C21.7193%2019.5608%2022.0871%2019.2842%2022.5037%2019.2842Z'%20fill='url(%23paint0_radial_4548_14216)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13.3742%2012C13.6573%2012%2013.9047%2012.192%2013.9731%2012.4654L14.1846%2013.315C14.3799%2014.0864%2014.9821%2014.6918%2015.7535%2014.8838L16.603%2015.0954C16.9318%2015.1768%2017.1335%2015.512%2017.0522%2015.8407C16.9968%2016.0621%2016.8243%2016.2346%2016.603%2016.2899L15.7535%2016.5015C14.9821%2016.6968%2014.3767%2017.2989%2014.1846%2018.0703L13.9731%2018.9199C13.8917%2019.2486%2013.5564%2019.4504%2013.2277%2019.369C13.0064%2019.3137%2012.8339%2019.1412%2012.7785%2018.9199L12.567%2018.0703C12.3749%2017.2989%2011.7695%2016.6935%2010.9981%2016.5015L10.1486%2016.2899C9.81986%2016.2085%209.61805%2015.8733%209.69943%2015.5446C9.75476%2015.3232%209.92727%2015.1507%2010.1486%2015.0954L10.9981%2014.8838C11.7695%2014.6918%2012.3749%2014.0864%2012.567%2013.315L12.7785%2012.4654C12.8469%2012.192%2013.0943%2012%2013.3774%2012H13.3742Z'%20fill='url(%23paint1_radial_4548_14216)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.39254%2026.8813C6.54226%2026.8813%206.67571%2026.979%206.72453%2027.1189L6.90681%2027.669C6.97516%2027.8773%207.1379%2028.0401%207.34947%2028.1117L7.89954%2028.294C8.08181%2028.3558%208.17946%2028.5543%208.12087%2028.7366C8.08507%2028.8408%208.0037%2028.9222%207.89954%2028.958L7.34947%2029.1402C7.14116%2029.2086%206.97841%2029.3713%206.90681%2029.5829L6.72453%2030.133C6.66269%2030.3152%206.46414%2030.4129%206.28187%2030.3543C6.17771%2030.3185%206.09634%2030.2371%206.06054%2030.133L5.87827%2029.5829C5.80992%2029.3746%205.64392%2029.2118%205.4356%2029.1402L4.88553%2028.958C4.70326%2028.8961%204.60561%2028.6976%204.6642%2028.5153C4.7%2028.4111%204.78138%2028.3298%204.88553%2028.294L5.4356%2028.1117C5.64392%2028.0433%205.80666%2027.8806%205.87827%2027.669L6.06054%2027.1189C6.10936%2026.9757%206.24281%2026.8813%206.39254%2026.8813Z'%20fill='url(%23paint2_radial_4548_14216)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.80904%2033.5596C2.95876%2033.5596%203.09221%2033.6572%203.14104%2033.7972L3.32331%2034.3473C3.39166%2034.5556%203.5544%2034.7183%203.76597%2034.7899L4.31604%2034.9722C4.49832%2035.034%204.59596%2035.2326%204.53737%2035.4148C4.50157%2035.519%204.4202%2035.6004%204.31604%2035.6362L3.76597%2035.8185C3.55766%2035.8868%203.39492%2036.0495%203.32331%2036.2611L3.14104%2036.8112C3.07919%2036.9935%202.88065%2037.0911%202.69837%2037.0325C2.59422%2036.9967%202.51285%2036.9153%202.47704%2036.8112L2.29477%2036.2611C2.22642%2036.0528%202.06042%2035.8901%201.85211%2035.8185L1.30204%2035.6362C1.11976%2035.5743%201.02212%2035.3758%201.0807%2035.1935C1.11651%2035.0894%201.19788%2035.008%201.30204%2034.9722L1.85211%2034.7899C2.06042%2034.7216%202.22316%2034.5588%202.29477%2034.3473L2.47704%2033.7972C2.52587%2033.654%202.65931%2033.5596%202.80904%2033.5596Z'%20fill='url(%23paint3_radial_4548_14216)'/%3e%3cpath%20d='M2.42488%2032.7235C1.94641%2031.4476%201.68277%2030.0676%201.68277%2028.6256C1.68277%2023.5806%204.89532%2019.2712%209.38379%2017.634L8.79466%2016.0586C3.66498%2017.9269%200%2022.8483%200%2028.6256C0%2030.2661%200.296193%2031.835%200.836502%2033.2866L2.42488%2032.7268V32.7235Z'%20fill='url(%23paint4_radial_4548_14216)'/%3e%3cpath%20d='M20.6587%2037.7652C18.6602%2039.3633%2016.1279%2040.3202%2013.3743%2040.3202C10.0023%2040.3202%206.96221%2038.8849%204.82702%2036.5967L3.58691%2037.7359C6.02807%2040.3593%209.51078%2041.9998%2013.3776%2041.9998C16.5218%2041.9998%2019.4121%2040.9159%2021.6938%2039.0997L20.662%2037.7684L20.6587%2037.7652Z'%20fill='url(%23paint5_radial_4548_14216)'/%3e%3cpath%20d='M13.3739%2022.3664C15.0436%2022.3664%2016.5604%2023.0238%2017.6833%2024.0914L18.8095%2022.8383C17.3904%2021.5038%2015.4798%2020.6836%2013.3771%2020.6836C9.89444%2020.6836%206.93902%2022.9262%205.86816%2026.0476L7.44678%2026.627C8.28328%2024.1533%2010.6235%2022.3631%2013.3771%2022.3631L13.3739%2022.3664Z'%20fill='url(%23paint6_radial_4548_14216)'/%3e%3cpath%20d='M17.6737%2033.1658C16.5508%2034.2301%2015.0373%2034.8843%2013.3741%2034.8843C10.6074%2034.8843%208.2574%2033.0811%207.43392%2030.5879L5.84229%2031.1249C6.89035%2034.2822%209.8653%2036.5638%2013.3773%2036.5638C15.4832%2036.5638%2017.3971%2035.7436%2018.8162%2034.4059L17.677%2033.169L17.6737%2033.1658Z'%20fill='url(%23paint7_radial_4548_14216)'/%3e%3cpath%20d='M39.169%2021.2891H43.677C45.7666%2021.2891%2047.2802%2021.595%2048.2111%2022.2037C49.142%2022.8123%2049.6074%2023.7758%2049.6074%2025.0908C49.6074%2025.9761%2049.3796%2026.7149%2048.9206%2027.3041C48.4617%2027.8932%2047.8075%2028.2642%2046.9482%2028.414V28.5181C48.0158%2028.7199%2048.8002%2029.1138%2049.3014%2029.7062C49.8027%2030.2985%2050.0533%2031.0992%2050.0533%2032.1115C50.0533%2033.4753%2049.5781%2034.5429%2048.6244%2035.3143C47.6707%2036.0857%2046.3493%2036.473%2044.6502%2036.473H39.1658V21.2891H39.169ZM41.6525%2027.5645H44.0416C45.0799%2027.5645%2045.8383%2027.3985%2046.3167%2027.0697C46.7952%2026.741%2047.0328%2026.1811%2047.0328%2025.3935C47.0328%2024.6806%2046.7757%2024.1631%2046.2581%2023.8474C45.7406%2023.5284%2044.9236%2023.3689%2043.8007%2023.3689H41.6492V27.5645H41.6525ZM41.6525%2029.5792V34.3867H44.2889C45.3272%2034.3867%2046.1117%2034.1881%2046.6422%2033.791C47.1728%2033.3939%2047.4364%2032.7657%2047.4364%2031.9065C47.4364%2031.1188%2047.1662%2030.5329%2046.6259%2030.1521C46.0856%2029.7713%2045.2654%2029.5792%2044.1653%2029.5792H41.6525Z'%20fill='url(%23paint8_linear_4548_14216)'/%3e%3cpath%20d='M58.7762%2024.7817C59.2677%2024.7817%2059.6713%2024.8175%2059.9902%2024.8859L59.7526%2027.161C59.4076%2027.0764%2059.0463%2027.0374%2058.672%2027.0374C57.6955%2027.0374%2056.9046%2027.3563%2056.2992%2027.9943C55.6938%2028.6322%2055.3911%2029.459%2055.3911%2030.4778V36.4797H52.95V24.9933H54.8606L55.1828%2027.0178H55.3065C55.6873%2026.3311%2056.1853%2025.7908%2056.7972%2025.3871C57.4091%2024.9868%2058.0699%2024.785%2058.7762%2024.785V24.7817Z'%20fill='url(%23paint9_linear_4548_14216)'/%3e%3cpath%20d='M69.309%2036.4734L68.8208%2034.8753H68.7394C68.1861%2035.575%2067.6295%2036.0503%2067.0664%2036.3041C66.5065%2036.558%2065.784%2036.685%2064.9051%2036.685C63.7757%2036.685%2062.8969%2036.379%2062.2622%2035.7703C61.6275%2035.1617%2061.3118%2034.2991%2061.3118%2033.186C61.3118%2032.0012%2061.7512%2031.1094%2062.63%2030.5072C63.5088%2029.9051%2064.8498%2029.5763%2066.6498%2029.521L68.632%2029.4591V28.8472C68.632%2028.1116%2068.4595%2027.5648%2068.1177%2027.2003C67.7759%2026.8357%2067.2421%2026.6534%2066.5228%2026.6534C65.9337%2026.6534%2065.3706%2026.7413%2064.8303%2026.9138C64.29%2027.0864%2063.7692%2027.2914%2063.2712%2027.5258L62.4803%2025.7811C63.1019%2025.4557%2063.7855%2025.2083%2064.5276%2025.039C65.2697%2024.8698%2065.9662%2024.7852%2066.627%2024.7852C68.0884%2024.7852%2069.1918%2025.1041%2069.9339%2025.7421C70.6793%2026.38%2071.0503%2027.3793%2071.0503%2028.7431V36.4799H69.3057L69.309%2036.4734ZM65.6733%2034.8134C66.5586%2034.8134%2067.2714%2034.566%2067.8085%2034.0713C68.3455%2033.5766%2068.6124%2032.8833%2068.6124%2031.9882V30.9922L67.138%2031.054C65.989%2031.0963%2065.1525%2031.2884%2064.6285%2031.6301C64.1044%2031.9719%2063.8441%2032.4992%2063.8441%2033.2055C63.8441%2033.7165%2063.997%2034.1136%2064.2997%2034.3935C64.6057%2034.6734%2065.0614%2034.8134%2065.67%2034.8134H65.6733Z'%20fill='url(%23paint10_linear_4548_14216)'/%3e%3cpath%20d='M84.5646%2036.4732H82.1137V29.4102C82.1137%2028.5248%2081.9347%2027.8641%2081.5799%2027.4279C81.2219%2026.9918%2080.6588%2026.7737%2079.8809%2026.7737C78.8491%2026.7737%2078.0939%2027.0797%2077.6155%2027.6883C77.137%2028.297%2076.8994%2029.319%2076.8994%2030.7512V36.4732H74.4583V24.9868H76.3689L76.7106%2026.4938H76.8343C77.1793%2025.947%2077.6708%2025.5238%2078.3088%2025.2277C78.9467%2024.9315%2079.653%2024.7817%2080.4277%2024.7817C83.1846%2024.7817%2084.5614%2026.1846%2084.5614%2028.987V36.4765L84.5646%2036.4732Z'%20fill='url(%23paint11_linear_4548_14216)'/%3e%3cpath%20d='M91.836%2036.6814C90.4038%2036.6814%2089.2841%2036.1606%2088.4802%2035.1223C87.6762%2034.084%2087.2759%2032.6258%2087.2759%2030.751C87.2759%2028.8762%2087.6827%2027.4018%2088.4965%2026.3537C89.3102%2025.3056%2090.4364%2024.7816%2091.8783%2024.7816C93.3202%2024.7816%2094.5375%2025.3382%2095.3252%2026.4546H95.4489C95.3317%2025.6311%2095.2731%2024.9802%2095.2731%2024.5017V20.3159H97.724V36.4763H95.8134L95.387%2034.9693H95.2731C94.4919%2036.1118%2093.3462%2036.6847%2091.836%2036.6847V36.6814ZM92.4902%2034.709C93.4927%2034.709%2094.225%2034.4258%2094.6807%2033.8627C95.1364%2033.2996%2095.374%2032.3817%2095.387%2031.1156V30.7738C95.387%2029.3254%2095.1527%2028.2969%2094.6807%2027.6882C94.2088%2027.0795%2093.4732%2026.7736%2092.4674%2026.7736C91.6081%2026.7736%2090.9474%2027.1219%2090.4852%2027.8184C90.023%2028.5149%2089.7886%2029.5044%2089.7886%2030.7933C89.7886%2032.0823%2090.0132%2033.0392%2090.4624%2033.7065C90.9116%2034.3737%2091.5886%2034.709%2092.4869%2034.709H92.4902Z'%20fill='url(%23paint12_linear_4548_14216)'/%3e%3cpath%20d='M106.997%2036.473V21.2891H109.481V36.473H106.997Z'%20fill='url(%23paint13_linear_4548_14216)'/%3e%3cpath%20d='M123.334%2036.4732H120.883V29.4102C120.883%2028.5248%20120.704%2027.8641%20120.349%2027.4279C119.991%2026.9918%20119.428%2026.7737%20118.65%2026.7737C117.618%2026.7737%20116.863%2027.0797%20116.385%2027.6883C115.906%2028.297%20115.668%2029.319%20115.668%2030.7512V36.4732H113.227V24.9868H115.138L115.48%2026.4938H115.603C115.948%2025.947%20116.44%2025.5238%20117.078%2025.2277C117.716%2024.9315%20118.422%2024.7817%20119.197%2024.7817C121.954%2024.7817%20123.33%2026.1846%20123.33%2028.987V36.4765L123.334%2036.4732Z'%20fill='url(%23paint14_linear_4548_14216)'/%3e%3cpath%20d='M134.449%2033.2019C134.449%2034.3249%20134.039%2035.1841%20133.222%2035.783C132.405%2036.3819%20131.233%2036.6814%20129.71%2036.6814C128.187%2036.6814%20126.95%2036.4503%20126.022%2035.9848V33.8757C127.373%2034.4974%20128.629%2034.8098%20129.791%2034.8098C131.295%2034.8098%20132.044%2034.3574%20132.044%2033.4493C132.044%2033.1596%20131.959%2032.9155%20131.793%2032.7235C131.627%2032.5314%20131.354%2032.3296%20130.973%2032.1213C130.592%2031.913%20130.062%2031.6786%20129.385%2031.415C128.063%2030.904%20127.168%2030.3897%20126.699%2029.8787C126.231%2029.3677%20126%2028.7004%20126%2027.8835C126%2026.9005%20126.397%2026.1389%20127.188%2025.592C127.982%2025.0485%20129.059%2024.7783%20130.423%2024.7783C131.787%2024.7783%20133.05%2025.0517%20134.254%2025.5986L133.466%2027.4376C132.226%2026.9265%20131.185%2026.6694%20130.342%2026.6694C129.053%2026.6694%20128.411%2027.0372%20128.411%2027.7695C128.411%2028.1308%20128.581%2028.4335%20128.916%2028.6842C129.251%2028.9348%20129.983%2029.2766%20131.113%2029.7127C132.06%2030.0805%20132.75%2030.4158%20133.18%2030.7217C133.609%2031.0277%20133.928%2031.3792%20134.137%2031.7763C134.345%2032.1734%20134.449%2032.6519%20134.449%2033.2052V33.2019Z'%20fill='url(%23paint15_linear_4548_14216)'/%3e%3cpath%20d='M136.939%2021.9434C136.939%2021.5072%20137.059%2021.172%20137.297%2020.9344C137.535%2020.6968%20137.876%2020.5796%20138.319%2020.5796C138.762%2020.5796%20139.081%2020.6968%20139.322%2020.9344C139.562%2021.1687%20139.68%2021.504%20139.68%2021.9434C139.68%2022.3828%20139.559%2022.6855%20139.322%2022.9264C139.084%2023.164%20138.749%2023.2844%20138.319%2023.2844C137.889%2023.2844%20137.535%2023.164%20137.297%2022.9264C137.059%2022.6887%20136.939%2022.36%20136.939%2021.9434ZM139.527%2036.4731H137.085V24.9867H139.527V36.4731Z'%20fill='url(%23paint16_linear_4548_14216)'/%3e%3cpath%20d='M152.715%2024.987V26.328L150.752%2026.6925C150.931%2026.9334%20151.081%2027.2328%20151.198%2027.5843C151.316%2027.9359%20151.374%2028.3102%20151.374%2028.7073C151.374%2029.892%20150.964%2030.8229%20150.147%2031.5C149.33%2032.177%20148.204%2032.5187%20146.772%2032.5187C146.404%2032.5187%20146.072%2032.4927%20145.776%2032.4373C145.248%2032.7628%20144.988%2033.1437%20144.988%2033.5798C144.988%2033.8435%20145.112%2034.0387%20145.356%2034.1722C145.603%2034.3024%20146.052%2034.3707%20146.71%2034.3707H148.715C149.981%2034.3707%20150.945%2034.6409%20151.602%2035.1812C152.259%2035.7215%20152.588%2036.4994%20152.588%2037.5182C152.588%2038.8202%20152.051%2039.8227%20150.977%2040.529C149.903%2041.2353%20148.354%2041.5868%20146.326%2041.5868C144.76%2041.5868%20143.566%2041.3101%20142.742%2040.7568C141.919%2040.2035%20141.505%2039.4125%20141.505%2038.3905C141.505%2037.6842%20141.73%2037.0918%20142.176%2036.6101C142.622%2036.1284%20143.247%2035.7964%20144.051%2035.6076C143.725%2035.4676%20143.455%2035.2463%20143.247%2034.9371C143.035%2034.6279%20142.931%2034.3056%20142.931%2033.9671C142.931%2033.5375%20143.051%2033.173%20143.296%2032.8768C143.54%2032.5806%20143.898%2032.2844%20144.376%2031.9947C143.781%2031.7376%20143.299%2031.3209%20142.928%2030.7416C142.557%2030.1655%20142.371%2029.4884%20142.371%2028.7105C142.371%2027.4639%20142.765%2026.4972%20143.549%2025.8137C144.334%2025.1269%20145.454%2024.7852%20146.908%2024.7852C147.234%2024.7852%20147.576%2024.8079%20147.93%2024.8535C148.289%2024.8991%20148.555%2024.9446%20148.734%2024.9935H152.712L152.715%2024.987ZM143.689%2038.2603C143.689%2038.7876%20143.927%2039.1912%20144.402%2039.4744C144.877%2039.7576%20145.541%2039.9008%20146.401%2039.9008C147.729%2039.9008%20148.721%2039.7087%20149.372%2039.3279C150.023%2038.9471%20150.349%2038.4426%20150.349%2037.8111C150.349%2037.3131%20150.17%2036.9584%20149.815%2036.7468C149.457%2036.5352%20148.796%2036.4311%20147.826%2036.4311H145.978C145.278%2036.4311%20144.721%2036.5971%20144.311%2036.9258C143.898%2037.2546%20143.693%2037.7005%20143.693%2038.2603H143.689ZM144.741%2028.7073C144.741%2029.4266%20144.926%2029.9799%20145.297%2030.3705C145.668%2030.7578%20146.199%2030.9531%20146.892%2030.9531C148.305%2030.9531%20149.011%2030.198%20149.011%2028.6877C149.011%2027.9391%20148.835%2027.363%20148.487%2026.9594C148.139%2026.5558%20147.605%2026.3507%20146.892%2026.3507C146.179%2026.3507%20145.652%2026.5526%20145.288%2026.9529C144.923%2027.3532%20144.741%2027.9391%20144.741%2028.7073Z'%20fill='url(%23paint17_linear_4548_14216)'/%3e%3cpath%20d='M164.95%2036.4729H162.499V29.4099C162.499%2028.5245%20162.32%2027.8638%20161.965%2027.4276C161.607%2026.9915%20161.044%2026.7734%20160.266%2026.7734C159.241%2026.7734%20158.489%2027.0794%20158.007%2027.6913C157.526%2028.3032%20157.285%2029.3317%20157.285%2030.7704V36.4729H154.844V20.3125H157.285V24.4136C157.285%2025.0711%20157.243%2025.7742%20157.161%2026.5228H157.317C157.649%2025.9695%20158.112%2025.5398%20158.704%2025.2339C159.296%2024.9279%20159.986%2024.7782%20160.774%2024.7782C163.557%2024.7782%20164.95%2026.181%20164.95%2028.9835V36.4729Z'%20fill='url(%23paint18_linear_4548_14216)'/%3e%3cpath%20d='M172.625%2034.709C173.221%2034.709%20173.816%2034.6146%20174.412%2034.4291V36.2681C174.142%2036.3853%20173.794%2036.4829%20173.367%2036.5643C172.941%2036.6424%20172.501%2036.6847%20172.042%2036.6847C169.728%2036.6847%20168.573%2035.4674%20168.573%2033.0295V26.8387H167.004V25.7581L168.687%2024.863L169.517%2022.4316H171.024V24.9867H174.295V26.8355H171.024V32.9839C171.024%2033.5731%20171.17%2034.006%20171.466%2034.2859C171.763%2034.5658%20172.147%2034.7058%20172.625%2034.7058V34.709Z'%20fill='url(%23paint19_linear_4548_14216)'/%3e%3cpath%20d='M184.424%2033.2019C184.424%2034.3249%20184.014%2035.1841%20183.197%2035.783C182.38%2036.3819%20181.208%2036.6814%20179.685%2036.6814C178.161%2036.6814%20176.925%2036.4503%20175.997%2035.9848V33.8757C177.348%2034.4974%20178.604%2034.8098%20179.766%2034.8098C181.27%2034.8098%20182.018%2034.3574%20182.018%2033.4493C182.018%2033.1596%20181.934%2032.9155%20181.768%2032.7235C181.602%2032.5314%20181.328%2032.3296%20180.948%2032.1213C180.567%2031.913%20180.036%2031.6786%20179.359%2031.415C178.038%2030.904%20177.143%2030.3897%20176.674%2029.8787C176.205%2029.3677%20175.974%2028.7004%20175.974%2027.8835C175.974%2026.9005%20176.371%2026.1389%20177.162%2025.592C177.956%2025.0485%20179.034%2024.7783%20180.397%2024.7783C181.761%2024.7783%20183.024%2025.0517%20184.228%2025.5986L183.441%2027.4376C182.201%2026.9265%20181.159%2026.6694%20180.316%2026.6694C179.027%2026.6694%20178.386%2027.0372%20178.386%2027.7695C178.386%2028.1308%20178.555%2028.4335%20178.89%2028.6842C179.226%2028.9348%20179.958%2029.2766%20181.088%2029.7127C182.035%2030.0805%20182.725%2030.4158%20183.154%2030.7217C183.584%2031.0277%20183.903%2031.3792%20184.111%2031.7763C184.32%2032.1734%20184.424%2032.6519%20184.424%2033.2052V33.2019Z'%20fill='url(%23paint20_linear_4548_14216)'/%3e%3cdefs%3e%3cradialGradient%20id='paint0_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0672%2015.5248)%20scale(61.1655%2061.1655)'%3e%3cstop%20offset='0.17'%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint1_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0676%2015.525)%20scale(61.1655%2061.1655)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint2_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8974)%20scale(61.1655%2061.1654)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint3_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8984)%20scale(61.1655%2061.1656)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint4_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8978)%20scale(61.1655%2061.1655)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint5_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8978)%20scale(61.1655%2061.1654)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint6_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0673%2015.5246)%20scale(61.1655%2061.1656)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint7_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0675%20-58.8983)%20scale(61.1655%2061.1656)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3clinearGradient%20id='paint8_linear_4548_14216'%20x1='27.6858'%20y1='26.9883'%20x2='184.655'%20y2='47.7609'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint9_linear_4548_14216'%20x1='27.7019'%20y1='26.8681'%20x2='184.671'%20y2='47.6374'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint10_linear_4548_14216'%20x1='27.8582'%20y1='25.703'%20x2='184.827'%20y2='46.4723'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint11_linear_4548_14216'%20x1='28.0796'%20y1='24.0657'%20x2='185.049'%20y2='44.835'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint12_linear_4548_14216'%20x1='28.6426'%20y1='19.7724'%20x2='185.612'%20y2='40.5417'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint13_linear_4548_14216'%20x1='28.8281'%20y1='18.376'%20x2='185.794'%20y2='39.1453'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint14_linear_4548_14216'%20x1='28.7407'%20y1='19.0206'%20x2='185.71'%20y2='39.7899'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint15_linear_4548_14216'%20x1='28.9621'%20y1='17.367'%20x2='185.928'%20y2='38.1363'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint16_linear_4548_14216'%20x1='29.382'%20y1='14.187'%20x2='186.351'%20y2='34.9563'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint17_linear_4548_14216'%20x1='28.9585'%20y1='17.3836'%20x2='185.928'%20y2='38.1529'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint18_linear_4548_14216'%20x1='29.7136'%20y1='11.6741'%20x2='186.683'%20y2='32.4466'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint19_linear_4548_14216'%20x1='29.8241'%20y1='10.8313'%20x2='186.794'%20y2='31.6039'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint20_linear_4548_14216'%20x1='29.8206'%20y1='10.867'%20x2='186.79'%20y2='31.6364'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e";function a6(e,t){return d6(e)||c6(e,t)||u6(e,t)||l6()}function l6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
23
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u6(e,t){if(e){if(typeof e=="string")return E0(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E0(e,t):void 0}}function E0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c6(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function d6(e){if(Array.isArray(e))return e}var f6=function(t){var n=t.className,r=Ut(),i=r.pathname,s=Rn(),o=s.hostAppProps,a=o.onLogout,l=z.useState(!1),u=a6(l,2),c=u[0],d=u[1],f=Iu({query:{select:function(C){var x=C.data;return x==null?void 0:x.data}}}),h=f.data,g=f.isLoading,m=P4(a),p=m.mutate,v=m.isPending,b=function(C){if(C.preventDefault(),d(!0),!v)return p()};return y.jsxs("div",{className:Oe("ystaii-sidemenu"),children:[y.jsx("div",{className:"ystaii-mobile-menu lg:yst-hidden",children:y.jsx(P.SidebarNavigation,{activePath:i,children:y.jsx(P.SidebarNavigation.Mobile,{closeButtonScreenReaderText:"Close sidebar",openButtonScreenReaderText:"Open sidebar",children:y.jsx(O0,{})})})}),y.jsxs("div",{className:Oe("ystaii-menuHeader","yst-mb-6 yst-mt-10 yst-flex yst-flex-row yst-justify-between yst-px-4","yst-flex-col yst-items-start yst-space-y-12 yst-max-w-2xl yst-mx-auto"),children:[y.jsx(P.Title,{children:y.jsx(ti,{className:Oe("yst-outline-none"),to:"/",children:y.jsx("img",{src:o6,alt:"Yoast",width:"208",height:"42",className:"yst-block"})})}),y.jsxs("div",{className:Oe("ystaii-userInfoContainer","yst-flex yst-flex-col"),children:[y.jsx("div",{children:y.jsx("b",{children:(h==null?void 0:h.displayName)||y.jsx(P.SkeletonLoader,{children:"Display name"})})}),y.jsx("div",{children:(h==null?void 0:h.email)||y.jsx(P.SkeletonLoader,{children:"loading-email@address.com"})}),y.jsx("div",{children:y.jsx(P.Link,{variant:"primary",className:"yst-no-underline",onClick:b,children:g?y.jsxs(P.SkeletonLoader,{children:["Sign out ",y.jsx("span",{"aria-hidden":"true",children:"→"})]}):c||v?y.jsx(y.Fragment,{children:"Signing out..."}):y.jsxs(y.Fragment,{children:["Sign out ",y.jsx("span",{"aria-hidden":"true",children:"→"})]})})})]})]}),y.jsx("div",{className:Oe("ystaii-desktopMenu","yst-hidden","lg:yst-mb-0 lg:yst-block lg:yst-w-full lg:yst-shrink-0"),children:y.jsx(P.SidebarNavigation,{activePath:i,children:y.jsx(O0,{className:n})})})]})},l2=lx.a.withConfig({displayName:"SkipLink",componentId:"sc-40h6pc-0"})(["position:absolute;top:-1000em;left:10px;z-index:100000;display:block;height:48px;min-width:150px;padding:0 15px;font-size:14px;line-height:48px;background:var(--bg-color-white);border-radius:3px;box-shadow:0px 2px 2px 2px rgba(0,0,0,0.1);text-decoration:underline;text-align:center;outline:none;&:focus{top:10px;color:var(--text-color-blue);}"]);l2.defaultProps={href:"#content"};function vc(e){var t=e.children,n=e.disable,r=n===void 0?!1:n,i=e.hideNav,s=i===void 0?!1:i,o=e.DebugInfo;return r?t:y.jsxs("div",{className:Oe("ystaii-layout","yst-block","lg:yst-flex lg:yst-min-h-full lg:yst-overflow-visible"),children:[y.jsx(l2,{children:"Skip to main content"}),!s&&y.jsxs("div",{className:Oe("ystaii-sidebar","yst-overflow-hidden","lg:yst-flex-grow-1 lg:yst-max-w-[300px] lg:yst-flex-shrink-0 lg:yst-basis-[300px] lg:yst-overflow-visible lg:yst-pl-4"),children:[y.jsx(f6,{}),o&&y.jsx(o,{})]}),y.jsx("main",{className:Oe("ystaii-main","yst-mx-4 yst-my-0 yst-flex yst-min-w-0 yst-shrink yst-grow yst-basis-auto yst-px-0 yst-py-6","lg:yst-ml-12 lg:yst-mr-6"),children:y.jsx("div",{className:Oe("ystaii-main-content","yst-mx-auto yst-flex yst-flex-col yst-gap-8","lg:yst-w-full lg:yst-flex-row"),children:y.jsx("div",{className:"yst-layout-root yst-mx-auto yst-w-full yst-max-w-[1200px] yst-flex-1",children:t})})})]})}function Md(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,g,m,p){var v=g&&g.prototype instanceof a?g:a,b=Object.create(v.prototype);return Yt(b,"_invoke",function(S,C,x){var k,w,_,O=0,E=x||[],T=!1,j={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(A,M){return k=A,w=0,_=e,j.n=M,o}};function B(R,A){for(w=R,_=A,t=0;!T&&O&&!M&&t<E.length;t++){var M,D=E[t],H=j.p,Q=D[2];R>3?(M=Q===A)&&(_=D[(w=D[4])?5:(w=3,3)],D[4]=D[5]=e):D[0]<=H&&((M=R<2&&H<D[1])?(w=0,j.v=A,j.n=D[1]):H<Q&&(M=R<3||D[0]>A||A>Q)&&(D[4]=R,D[5]=A,j.n=Q,w=0))}if(M||R>1)return o;throw T=!0,A}return function(R,A,M){if(O>1)throw TypeError("Generator is already running");for(T&&A===1&&B(A,M),w=A,_=M;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(j.n=-1),B(w,_)):j.n=_:j.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=j.n<0)?_:S.call(C,j))!==o)break}catch(D){k=e,w=1,_=D}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(Yt(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,Yt(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,Yt(d,"constructor",u),Yt(u,"constructor",l),l.displayName="GeneratorFunction",Yt(u,i,"GeneratorFunction"),Yt(d),Yt(d,i,"Generator"),Yt(d,r,function(){return this}),Yt(d,"toString",function(){return"[object Generator]"}),(Md=function(){return{w:s,m:f}})()}function Yt(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Yt=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){Yt(o,f,function(g){return this._invoke(f,h,g)})};c("next",0),c("throw",1),c("return",2)}},Yt(e,t,n,r)}function A0(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function h6(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){A0(s,r,i,o,a,"next",l)}function a(l){A0(s,r,i,o,a,"throw",l)}o(void 0)})}}function g6(e,t){return v6(e)||p6(e,t)||m6(e,t)||y6()}function y6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
24
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m6(e,t){if(e){if(typeof e=="string")return P0(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P0(e,t):void 0}}function P0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p6(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function v6(e){if(Array.isArray(e))return e}var b6=function(t){var n,r,i=t.className,s=Gt(),o=dn(),a=z.useState(!1),l=g6(a,2),u=l[0],c=l[1],d=Gi({query:{select:function(k){var w=k.data;return w==null?void 0:w.brands}}}),f=d.data,h=n2({mutation:{onSettled:function(){s.invalidateQueries({queryKey:[Yn()]})}}}),g=h.mutateAsync,m=h.isPending,p=(n=f==null?void 0:f.filter(function(x){var k;return((k=x.settings)===null||k===void 0?void 0:k.showAutomaticAnalysisDisabledNotification)===!0}))!==null&&n!==void 0?n:[],v=function(){c(!1)},b=function(){var x=h6(Md().m(function k(){var w;return Md().w(function(_){for(;;)switch(_.n){case 0:if(p.length!==0){_.n=1;break}return _.a(2);case 1:return w=p.map(function(O){return g({brandId:String(O.id),data:{showAutomaticAnalysisDisabledNotification:!1}})}),_.n=2,Promise.all(w);case 2:o("/settings"),v();case 3:return _.a(2)}},k)}));return function(){return x.apply(this,arguments)}}();z.useEffect(function(){f&&f.some(function(x){var k;return((k=x.settings)===null||k===void 0?void 0:k.showAutomaticAnalysisDisabledNotification)===!0})&&c(!0)},[f]);var S=p.length===1?"One brand has been deactivated":"Multiple brands have been deactivated",C=p.length===1?y.jsxs(y.Fragment,{children:[y.jsx("p",{children:"You recently lost a subscription. Because of this, we could not analyze all your active brands."}),y.jsxs("p",{children:["The brand ",y.jsx("b",{children:p==null||(r=p[0])===null||r===void 0?void 0:r.name})," was deactivated, since it was the most recently analyzed."]}),y.jsxs("p",{children:["If you prefer, you can go to ",y.jsx("b",{children:"Settings"})," and deactivate a different brand instead."]})]}):y.jsxs(y.Fragment,{children:[y.jsx("p",{children:"You recently lost a subscription. Because of this, we could not analyze all your active brands."}),y.jsx("p",{children:"The following brands were deactivated, since they were the most recently analyzed:"}),y.jsx("ul",{children:p.map(function(x){return y.jsx("li",{children:y.jsx("b",{children:x.name})},x.id)})}),y.jsxs("p",{children:["If you prefer, you can go to ",y.jsx("b",{children:"Settings"})," and deactivate different brand(s) instead."]})]});return u?y.jsx(P.Modal,{isOpen:u,onClose:b,position:"center",as:"div",className:i,children:y.jsxs(P.Modal.Panel,{children:[y.jsx("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:y.jsxs("div",{className:"yst-flex-1",children:[y.jsx(P.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:y.jsx(P.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:S})}),y.jsx(P.Modal.Container.Content,{className:"yst-mb-4 yst-space-y-3",children:C})]})}),y.jsxs(P.Modal.Container.Footer,{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-2",children:[y.jsx(P.Button,{variant:"secondary",onClick:b,children:"Close"}),y.jsx(P.Button,{variant:"primary",onClick:b,isLoading:m,disabled:p.length===0,children:"Go to settings"})]})]})}):null},Ru=function(){return y.jsx("div",{className:"yst-flex yst-min-h-screen yst-items-center yst-justify-center",children:y.jsxs("div",{className:"yst-flex yst-items-center yst-gap-3 yst-text-center",children:[y.jsx(P.Spinner,{variant:"primary"}),y.jsx("span",{className:"yst-italic",children:"Just a moment while we get things ready for you..."})]})})},x6={HOME:"/"},w6=function(t){var n=t.hideNav,r=n===void 0?!1:n,i=t.disableLayout,s=i===void 0?!1:i,o=t.DebugInfo,a=Ut(),l=dn(),u={disable:s,hideNav:r},c=Rn(),d=c.brandId,f=Fa(),h=f.setBrandId,g=Gi({query:{refetchOnReconnect:!1,refetchOnWindowFocus:!1,select:function(w){var _;return w==null||(_=w.data)===null||_===void 0?void 0:_.brands}}}),m=g.data,p=g.isLoading,v=g.error,b=g.refetch,S=z.useRef(!1),C=z.useMemo(function(){return m==null?void 0:m.find(function(k){return k.id===d})},[m,d]);z.useEffect(function(){var k;if(!(m===void 0||d)){var w=(k=m[0])===null||k===void 0?void 0:k.id;w&&h(w)}},[m,d,h,l,a.pathname]),z.useEffect(function(){!d||S.current||(S.current=!0)},[C,d,l,a.pathname,m]);var x=z.useCallback(function(){b()},[b]);return a.pathname!==x6.HOME&&p?y.jsx(vc,{...u,children:y.jsx(Ru,{})}):v?y.jsx(vc,{...u,children:y.jsx("div",{className:"yst-flex yst-min-h-screen yst-items-center yst-justify-center",children:y.jsxs("div",{className:"yst-space-y-4 yst-text-center",children:[y.jsx("div",{className:"yst-mb-4 yst-text-6xl yst-text-red-600",children:"⚠️"}),y.jsx("h2",{className:"yst-text-xl yst-font-semibold yst-text-slate-900",children:"Something went wrong"}),y.jsx("p",{className:"yst-text-slate-600",children:"We couldn't load your Brand Analysis. Please try again shortly."}),y.jsx(P.Button,{variant:"primary",onClick:x,children:"Retry"})]})})}):y.jsxs(vc,{DebugInfo:o,...u,children:[y.jsx(Bs,{}),y.jsx(b6,{})]})},S6=function(){var t=xu(),n=t.brandId,r=t.analysisId,i=e2(n,{query:{enabled:!!n,select:function(d){var f=d.data;return(f==null?void 0:f.analyses)||[]}}}),s=i.data,o=i.isLoading,a=i.error;if(o)return y.jsx(Ru,{});if(a)return console.error("Error fetching analyses for validation:",a),y.jsx(yi,{to:"/brands/".concat(n),replace:!0});if(!r||r.trim()==="")return y.jsx(yi,{to:"/brands/".concat(n),replace:!0});if(r==="latest")return y.jsx(Bs,{});var l=parseInt(r,10);if(isNaN(l))return y.jsx(yi,{to:"/brands/".concat(n),replace:!0});var u=s==null?void 0:s.some(function(c){return c.id===l});return u?y.jsx(Bs,{}):y.jsx(yi,{to:"/brands/".concat(n),replace:!0})},T0=function(){var t=xu(),n=t.brandId,r=Gi({query:{select:function(f){var h=f.data;return h}}}),i=r.data,s=r.isLoading,o=r.error,a=r.isFetched,l=(i==null?void 0:i.brands)||[];if(s||!a)return y.jsx(Ru,{});if(o)return y.jsx(yi,{to:"/",replace:!0});if(!n||n.trim()==="")return y.jsx(yi,{to:"/",replace:!0});var u=parseInt(n,10),c=l.length>0&&l.some(function(d){var f=String(d.id),h=typeof d.id=="number"?d.id:parseInt(String(d.id),10);return f===n||h===u||d.id===n});return a&&!c?y.jsx(yi,{to:"/",replace:!0}):y.jsx(Bs,{})},C6={openai:"openai",perplexity:"perplexity",anthropic:"anthropic"},_6={updating:"updating"},ci={pending:"pending",processing:"processing",completed:"completed",failed:"failed",cancelled:"cancelled"},k6=function(t){return typeof t=="string"&&t!=="latest"&&t.trim().length>0};function O6(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{fillRule:"evenodd",d:"M14.707 12.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}const u2=I.forwardRef(O6);function E6(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{fillRule:"evenodd",d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))}const A6=I.forwardRef(E6);function P6(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{fillRule:"evenodd",d:"M5.293 7.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L6.707 7.707a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}const c2=I.forwardRef(P6);function T6(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))}const d2=I.forwardRef(T6);function M6(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"}))}const j6=I.forwardRef(M6);function $6(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"}))}const D6=I.forwardRef($6);function L6(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{d:"M6 10a2 2 0 11-4 0 2 2 0 014 0zM12 10a2 2 0 11-4 0 2 2 0 014 0zM16 12a2 2 0 100-4 2 2 0 000 4z"}))}const M0=I.forwardRef(L6);function I6(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{d:"M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),I.createElement("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"}))}const R6=I.forwardRef(I6);function N6(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{fillRule:"evenodd",d:"M2 5a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm14 1a1 1 0 11-2 0 1 1 0 012 0zM2 13a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2v-2zm14 1a1 1 0 11-2 0 1 1 0 012 0z",clipRule:"evenodd"}))}const F6=I.forwardRef(N6);function B6(e,t){return I.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),I.createElement("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"}))}const q6=I.forwardRef(B6);function na(e){"@babel/helpers - typeof";return na=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},na(e)}var z6=["children","as","startColor","endColor","angle","disabled","style","className"];function j0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j0(Object(n),!0).forEach(function(r){H6(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function H6(e,t,n){return(t=U6(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U6(e){var t=G6(e,"string");return na(t)=="symbol"?t:t+""}function G6(e,t){if(na(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(na(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function K6(e,t){if(e==null)return{};var n,r,i=V6(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function V6(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Nu=function(t){var n=t.children,r=t.as,i=r===void 0?"span":r,s=t.startColor,o=s===void 0?"#A61E69":s,a=t.endColor,l=a===void 0?"#6366F1":a,u=t.angle,c=u===void 0?102:u,d=t.disabled,f=d===void 0?!1:d,h=t.style,g=h===void 0?{}:h,m=t.className,p=m===void 0?"":m,v=K6(t,z6),b=$0(f?{display:"inline-block"}:{background:"linear-gradient(".concat(c,"deg, ").concat(o,", ").concat(l,")"),WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",display:"inline-block"},g);return y.jsx(i,{className:p,style:b,...v,children:n})};function jf(e){var t=e.children,n=e.nestedInPaperContent,r=n===void 0?!1:n,i=e.className;return y.jsx("div",{className:Oe("yst-mt-8 yst-flex yst-items-center yst-justify-end yst-gap-6 yst-rounded-bl-lg yst-rounded-br-lg yst-border-t yst-border-slate-200 yst-bg-slate-50 yst-px-8 yst-py-6",{"yst-mb-[-2rem] yst-ml-[-2rem] yst-mr-[-2rem]":r},i),children:t})}var W6=function(){var t=dn();return y.jsx("form",{onSubmit:function(){return t("/setup")},children:y.jsxs(P.Paper,{className:"yst-mx-auto yst-flex yst-max-w-2xl",children:[y.jsx(P.Paper.Header,{children:y.jsxs(P.Title,{size:"1",children:["Welcome to ",y.jsx(Nu,{children:"Yoast AI Brand Insights"}),"!"]})}),y.jsxs(P.Paper.Content,{className:"yst-space-y-8",children:[y.jsxs("div",{className:"yst-space-y-4 *:yst-text-tiny",children:[y.jsx("p",{children:"See how your brand is represented in AI answers."}),y.jsxs("p",{children:[y.jsx("b",{className:"yst-font-medium yst-text-slate-800",children:"Yoast AI Brand Insights"})," ","shows how often your brand appears, how it's described, and how it compares to competitors in tools like ChatGPT."]}),y.jsx("p",{children:"It only takes three simple steps to get your brand insights:"})]}),y.jsx("div",{className:"yst-flex yst-flex-col yst-items-stretch yst-justify-stretch yst-gap-4 yst-pb-8",children:[{title:"1. ADD BRAND INFO",description:"Tell us about your brand and where it's active so we can customize your analysis."},{title:"2. REVIEW QUERIES",description:"Edit or approve the queries generated from your input."},{title:"3. RUN ANALYSIS",description:"Run your queries through relevant AI models to see how your brand shows up."}].map(function(n,r,i){return y.jsxs("div",{className:"yst-relative yst-flex yst-flex-col yst-items-stretch",children:[y.jsxs("div",{className:"yst-flex yst-flex-row yst-items-center yst-justify-stretch yst-gap-6",children:[y.jsx(P.Stepper.Step,{isActive:!0,isComplete:!1,children:y.jsx("span",{className:"yst-hidden",children:r+1})}),y.jsxs("div",{className:"yst-flex yst-flex-1 yst-flex-col yst-gap-2 yst-rounded yst-border yst-border-slate-200 yst-p-6",children:[y.jsx(P.Title,{size:"3",className:"yst-font-semibold yst-uppercase",children:n.title}),y.jsx("p",{className:"yst-my-0 yst-py-0",children:n.description})]})]}),r<i.length-1&&y.jsx("div",{className:"yst-absolute yst-left-[-2px] yst-top-1/2 yst-my-0 yst-ml-[13px] yst-h-full yst-border-l-2 yst-border-l-primary-600"})]},n.title)})})]}),y.jsx(jf,{className:"yst-justify-end",children:y.jsxs(P.Button,{variant:"primary",onClick:function(){return t("/setup")},className:"yst-gap-1.5",children:["Start your first analysis ",y.jsx(A6,{})]})})]})})};function ra(e){return typeof e!="number"?{}:{"yst-text-green-600":e>0,"yst-text-red-600":e<0,"yst-text-gray-400":e===0}}function Ba(e){var t=e.score,n=e.total,r=e.suffix,i=e.isLoading,s=i===void 0?!1:i,o=e.className,a=e.hideTotal,l=a===void 0?!1:a,u=e.delta,c=e.deltaFormat,d=c===void 0?"absolute":c,f=e.deltaSuffix,h=e.scoreFormat,g=h===void 0?"absolute":h;return y.jsxs("div",{className:Oe(o,"yst-font-medium"),children:[y.jsxs("span",{className:"yst-mr-1 yst-text-xl yst-font-bold yst-text-slate-900",children:[s||t===void 0||t===null?"—":t,!s&&t!==void 0&&t!==null&&g==="percentage"?"%":""]}),!l&&n&&n!==0&&n!=="0"&&y.jsxs("span",{className:"yst-text-slate-500",children:["/ ",s?"—":n]}),r&&y.jsxs("span",{className:"yst-text-slate-500",children:[" ",r]}),typeof u=="number"&&!isNaN(u)&&y.jsxs("span",{className:Oe("yst-ml-2",ra(u)),children:[u>-1&&"+",u,d==="percentage"&&"%"," ",f]})]})}var Q6=["Icon","className","children","position","id"];function Y6(e,t){return e_(e)||J6(e,t)||Z6(e,t)||X6()}function X6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
25
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z6(e,t){if(e){if(typeof e=="string")return D0(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D0(e,t):void 0}}function D0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function J6(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function e_(e){if(Array.isArray(e))return e}function t_(e,t){if(e==null)return{};var n,r,i=n_(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function n_(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function $f(e){var t=e.Icon,n=t===void 0?K4:t,r=e.className,i=r===void 0?"":r,s=e.children,o=e.position,a=o===void 0?"left":o,l=e.id,u=l===void 0?"":l,c=t_(e,Q6),d=z.useState(!1),f=Y6(d,2),h=f[0],g=f[1];return s?y.jsxs("div",{className:i||"yst-relative",onMouseEnter:function(){return g(!0)},onMouseLeave:function(){return g(!1)},"aria-describedby":u?"tooltip-button-id":"tooltip-button",...c,children:[y.jsx(n,{className:"yst-relative yst-h-6 yst-w-6 yst-text-slate-400"}),h&&y.jsx(P.Tooltip,{position:a,id:u||"tooltip-button",children:s})]}):null}var qa=function(t){var n=t.title,r=t.tooltip,i=t.size,s=i===void 0?"3":i,o=t.className,a=o===void 0?"":o,l=function(d){var f=typeof d=="string"?d:"tooltip";return"tooltip-".concat(f.toLowerCase().replace(/\s+/g,"-"))},u=l(n);return y.jsxs("div",{className:"yst-flex yst-items-center yst-justify-between ".concat(a),children:[y.jsx(P.Title,{size:s,children:n}),y.jsx($f,{id:u,children:r})]})},L0=function(t){var n=t.keywords,r=t.badgeClassName;return y.jsx("div",{className:"yst-flex yst-flex-wrap yst-gap-2",children:n.map(function(i,s){return i&&y.jsx(P.Badge,{className:r,children:i},s)})})},f2=function(t){var n,r,i,s,o=t.title,a=o===void 0?"Sentiment":o,l=t.tooltip,u=l===void 0?"":l,c=t.data,d=c==null?void 0:c.brandName,f=c==null||(n=c.positivityPercentage)===null||n===void 0?void 0:n.value,h=c==null||(r=c.positivityPercentage)===null||r===void 0||(r=r.previous)===null||r===void 0?void 0:r.difference,g=c==null||(i=c.keywords)===null||i===void 0?void 0:i.positive,m=c==null||(s=c.keywords)===null||s===void 0?void 0:s.negative,p=!c||f===void 0&&h===void 0;return y.jsx(P.Card,{className:"yst-overflow-visible",children:y.jsxs(P.Card.Content,{className:"yst-space-y-8",children:[y.jsx(qa,{title:a,tooltip:u}),y.jsx("div",{className:"yst-space-y-3",children:!p&&y.jsxs(y.Fragment,{children:[y.jsx("p",{children:d||y.jsx(P.SkeletonLoader,{className:"yst-h-6 yst-w-20"})}),y.jsxs("div",{children:[y.jsx("div",{className:"yst-inline-flex",children:y.jsx(Ba,{className:"yst-mb-1.5",score:f,scoreFormat:"percentage",suffix:"positive",delta:h})}),y.jsx(P.ProgressBar,{max:100,min:0,progress:f||0,className:Oe({"yst-bg-red-500":f},"[&>*]:yst-bg-green-500")})]})]})}),p&&y.jsx(P.Alert,{variant:"info",children:"The selected AI model returned no brand sentiment data for your queries. This can happen with some queries or models."}),!!g&&y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(P.Title,{as:"h5",size:"5",children:"Positive keywords"}),y.jsx(L0,{keywords:g,badgeClassName:"yst-bg-green-100 yst-text-green-800"})]}),!!m&&y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(P.Title,{as:"h5",size:"5",children:"Negative keywords"}),y.jsx(L0,{keywords:m,badgeClassName:"yst-bg-red-100 yst-text-red-800"})]})]})})};function ia(e){"@babel/helpers - typeof";return ia=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ia(e)}var r_=["data"];function I0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function i_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I0(Object(n),!0).forEach(function(r){s_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function s_(e,t,n){return(t=o_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o_(e){var t=a_(e,"string");return ia(t)=="symbol"?t:t+""}function a_(e,t){if(ia(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ia(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function l_(e,t){if(e==null)return{};var n,r,i=u_(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function u_(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Ki=function(t,n,r){var i=Rn(),s=i.brandId,o=i.analysisId,a=i.model,l=s,u=o,c=a,d=Du(l,u,{query:{enabled:!!l&&!!u,select:function(p){var v=p.data;return v==null?void 0:v.analysis}}}),f=d.data,h=l_(d,r_),g=z.useMemo(function(){if(!f||!c)return null;var m=f.scans||[];return m.find(function(p){return String(p.aiProvider)===String(c)})||null},[f,c]);return i_({data:g},h)};function c_(){var e,t=Ki(),n=t.data;return y.jsx(f2,{title:"Brand Sentiment",data:n==null||(e=n.sentiment)===null||e===void 0?void 0:e.own,tooltip:"Percentage of positive versus negative keywords in your query results related to your brand."})}var d_=["children","as","className"];function f_(e,t){if(e==null)return{};var n,r,i=h_(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function h_(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var za=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var s=t.reduce(function(o,a,l){return o+a+(r[l]||"")},"");return function(o){var a=o.children,l=o.as,u=l===void 0?"div":l,c=o.className,d=c===void 0?"":c,f=f_(o,d_);return y.jsx(u,{className:Oe(String(s).trim(),d),...f,children:a})}},bc=[{bg:"yst-bg-blue-200",text:"yst-text-blue-900"},{bg:"yst-bg-green-200",text:"yst-text-green-900"},{bg:"yst-bg-purple-200",text:"yst-text-purple-900"},{bg:"yst-bg-pink-200",text:"yst-text-pink-900"},{bg:"yst-bg-yellow-200",text:"yst-text-yellow-900"},{bg:"yst-bg-indigo-200",text:"yst-text-indigo-900"},{bg:"yst-bg-red-200",text:"yst-text-red-900"},{bg:"yst-bg-orange-200",text:"yst-text-orange-900"},{bg:"yst-bg-teal-200",text:"yst-text-teal-900"},{bg:"yst-bg-cyan-200",text:"yst-text-cyan-900"},{bg:"yst-bg-lime-200",text:"yst-text-lime-900"},{bg:"yst-bg-emerald-200",text:"yst-text-emerald-900"},{bg:"yst-bg-sky-200",text:"yst-text-sky-900"},{bg:"yst-bg-violet-200",text:"yst-text-violet-900"},{bg:"yst-bg-fuchsia-200",text:"yst-text-fuchsia-900"},{bg:"yst-bg-rose-200",text:"yst-text-rose-900"},{bg:"yst-bg-amber-200",text:"yst-text-amber-900"}],R0=function(t){if(!t)return bc[0];if(t.toLowerCase()==="other")return{bg:"yst-bg-slate-200",text:"yst-text-slate-900"};for(var n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);n=(n<<5)-n+i,n=n&n}var s=Math.abs(n)%bc.length;return bc[s]};function sa(e){"@babel/helpers - typeof";return sa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sa(e)}var N0;function F0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function B0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F0(Object(n),!0).forEach(function(r){g_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function g_(e,t,n){return(t=y_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y_(e){var t=m_(e,"string");return sa(t)=="symbol"?t:t+""}function m_(e,t){if(sa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function p_(e){return x_(e)||b_(e)||h2(e)||v_()}function v_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
26
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b_(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function x_(e){if(Array.isArray(e))return jd(e)}function q0(e,t){return C_(e)||S_(e,t)||h2(e,t)||w_()}function w_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
27
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h2(e,t){if(e){if(typeof e=="string")return jd(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jd(e,t):void 0}}function jd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function S_(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function C_(e){if(Array.isArray(e))return e}function __(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var yo=za(N0||(N0=__(["md:yst-hidden yst-mr-2 yst-font-medium yst-text-slate-400 yst-inline-flex yst-w-20"]))),z0=function(t){var n=t.data,r=t.totalQueries,i=t.isLoading,s=i===void 0?!1:i,o=t.isFirstScan,a=o===void 0?!1:o,l=t.enableCategories,u=l===void 0?!1:l,c=s||!n,d=n||{},f=d.rank,h=d.url,g=d.rootDomain,m=d.category,p=d.impact,v=d.numberOfMentions,b=v==null?void 0:v.value,S=v==null?void 0:v.previous,C=typeof(S==null?void 0:S.difference)=="number"?S.difference:b;return y.jsxs("tr",{className:"yst-flex yst-flex-col md:yst-table-row",children:[y.jsxs(P.Table.Cell,{className:"yst-ml-2 yst-py-1 md:yst-ml-0 md:yst-p-2",children:[y.jsx(yo,{as:"span",children:"Rank:"}),c?y.jsx(P.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):y.jsx("span",{className:"yst-font-medium yst-text-slate-900",children:f!=null?f:"—"})]}),y.jsx(P.Table.Cell,{className:"yst-ml-2 yst-py-1 md:yst-ml-0 md:yst-p-2",children:c?y.jsx(P.SkeletonLoader,{className:"yst-h-6 yst-w-full"}):y.jsx("div",{className:"yst-flex yst-items-center yst-gap-2",children:y.jsxs(P.Link,{className:"yst-flex yst-items-center yst-gap-1 yst-font-medium",href:h||"#",rel:"nofollow noreferrer",target:"_blank",children:[y.jsx("span",{children:h!=null?h:"—"})," ",y.jsx(R6,{})]})})}),y.jsxs(P.Table.Cell,{className:"yst-ml-2 yst-py-1 yst-font-medium md:yst-ml-0 md:yst-p-2",children:[y.jsx(yo,{as:"span",children:"Domain:"}),c?y.jsx(P.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):y.jsx("span",{className:"yst-font-medium yst-text-slate-900",children:g!=null?g:"—"})]}),u&&y.jsxs(P.Table.Cell,{className:"yst-ml-2 yst-py-1 md:yst-ml-0 md:yst-p-2",children:[y.jsx(yo,{as:"span",children:"Category:"}),c?y.jsx(P.SkeletonLoader,{className:"yst-h-6 yst-w-16"}):y.jsx(P.Badge,{className:Oe(R0(m||"").bg,R0(m||"").text),children:m!=null?m:"—"})]}),y.jsxs(P.Table.Cell,{className:Oe("yst-ml-2 yst-py-0 md:yst-ml-0 md:yst-p-2","yst-font-medium",{"yst-text-green-600":p==="High","yst-text-yellow-600":p==="Medium","yst-text-red-600":p==="Low"}),children:[y.jsx(yo,{as:"span",children:"Impact:"}),c?y.jsx(P.SkeletonLoader,{className:"yst-h-6 yst-w-12"}):p!=null?p:"—"]}),y.jsxs(P.Table.Cell,{className:"yst-ml-2 yst-pt-1 md:yst-ml-0 md:yst-p-2 md:yst-text-right",children:[y.jsx(yo,{as:"span",children:"Mentions:"}),c?y.jsx(P.SkeletonLoader,{className:"yst-h-6 yst-w-8"}):b?y.jsxs("span",{className:"yst-flex yst-justify-end yst-gap-4",children:[y.jsxs("span",{className:"yst-flex yst-flex-nowrap yst-gap-1 yst-font-medium",children:[y.jsx("span",{className:"yst-text-slate-500",children:b}),y.jsxs("span",{className:"yst-text-slate-900",children:["/ ",r]})]}),!a&&y.jsxs("span",{className:Oe("yst-ml-auto",ra(C)),children:[C>-1&&"+",C]})]}):"—"]})]},c?void 0:h)},k_=function(t){var n,r,i,s,o,a=t.enableCategories,l=a===void 0?!1:a,u=z.useState("all"),c=q0(u,2),d=c[0],f=c[1],h=z.useState(1),g=q0(h,2),m=g[0],p=g[1],v=Ki(),b=v.data,S=v.isLoading,C=v.isRefetching,x=b==null?void 0:b.citations,k=(b==null||(n=b.scores)===null||n===void 0||(n=n.standardized)===null||n===void 0?void 0:n.citations)||{},w=Object.hasOwn(k,"previous"),_=x==null||(r=x.list)===null||r===void 0?void 0:r.filter(function(A){return d==="all"?!0:A.category===d}),O=10,E=(_==null?void 0:_.length)||0,T=Math.ceil(E/O),j=(m-1)*O,B=j+O,R=_==null?void 0:_.slice(j,B);return z.useEffect(function(){m>T&&T>0&&p(1)},[T,m,p,d]),y.jsx(P.Card,{className:"yst-overflow-visible md:yst-col-span-2",children:y.jsxs(P.Card.Content,{className:"yst-flex yst-flex-col yst-gap-6",children:[y.jsxs("div",{className:"yst-space-y-4",children:[y.jsx(qa,{title:"Citations",tooltip:"Sources the AI used to support brand mentions in the results."}),y.jsx("p",{children:"This table highlights the most important sources where your brand was cited."}),y.jsx(Ba,{score:x==null||(i=x.total)===null||i===void 0?void 0:i.value,suffix:"citations",delta:x==null||(s=x.total)===null||s===void 0||(s=s.previous)===null||s===void 0?void 0:s.difference,deltaSuffix:"since last scan",isLoading:S,hideTotal:!0})]}),(x==null||(o=x.list)===null||o===void 0?void 0:o.length)===0&&!S&&!C?y.jsx(P.Alert,{children:"The selected AI model returned no citations for your queries. This can happen with some queries or models."}):y.jsxs(y.Fragment,{children:[y.jsxs("div",{children:[l&&y.jsx(P.Select,{className:"yst-mb-4 md:yst-max-w-sm",label:"Filter categories",value:d,onChange:function(A){f(A)},id:"citation-category-filter",options:[{value:"all",label:"All categories"}].concat(p_(x!=null&&x.categories?x.categories.map(function(A){return{value:A,label:A}}):[]))}),y.jsxs(P.Table,{variant:"minimal",children:[y.jsx(P.Table.Head,{className:"yst-font-semibold",children:y.jsxs(P.Table.Row,{children:[y.jsx(P.Table.Cell,{className:"yst-hidden yst-text-slate-900 md:yst-table-cell md:yst-pl-2",children:"#"}),y.jsx(P.Table.Cell,{className:"yst yst-hidden yst-text-slate-900 md:yst-table-cell md:yst-px-2",children:"URL"}),y.jsx(P.Table.Cell,{className:"yst-hidden yst-text-slate-900 md:yst-table-cell md:yst-px-2",children:"Root domain"}),l&&y.jsx(P.Table.Cell,{className:"yst-hidden yst-text-slate-900 md:yst-table-cell",children:"Category"}),y.jsx(P.Table.Cell,{className:"yst-hidden yst-text-slate-900 md:yst-table-cell md:yst-px-2",children:"Impact"}),y.jsx(P.Table.Cell,{className:"yst-hidden yst-text-right yst-text-slate-900 md:yst-table-cell",children:"Mentions"})]})}),y.jsx(P.Table.Body,{children:S||C?Array.from({length:5}).map(function(A,M){return y.jsx(z0,{isLoading:!0,enableCategories:l},"skeleton-".concat(M))}):R&&R.length>0?R.map(function(A,M){return y.jsx(z0,{data:B0(B0({},A),{},{rank:j+M+1}),totalQueries:b==null?void 0:b.numberOfQueries,isFirstScan:!w,enableCategories:l},"citation-table-row-".concat(A.url,"-").concat(M))}):y.jsx(P.Table.Row,{children:y.jsxs(P.Table.Cell,{colSpan:l?6:5,className:"yst-py-8 yst-text-center yst-text-slate-500",children:[d==="all"?"No citations found.":'No citations found for the "'.concat(d,'" category.')," ",y.jsx(P.Link,{onClick:function(){return f("all")},children:"Show all categories."})]})},"no-results")})]})]}),_&&_.length>O&&y.jsxs("div",{className:"yst-flex yst-items-center yst-justify-end yst-gap-4",children:[y.jsxs("p",{className:"yst-mb-0",children:["Showing ",j+1," to"," ",B>E?E:B," of"," ",E," results"]}),y.jsx(P.Pagination,{variant:"text",className:"yst-flex-row yst-gap-0",current:m,total:T,onNavigate:p,screenReaderTextPrevious:"Previous page",screenReaderTextNext:"Next page"})]})]})]})})};function O_(e,t){return T_(e)||P_(e,t)||A_(e,t)||E_()}function E_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
28
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function A_(e,t){if(e){if(typeof e=="string")return H0(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H0(e,t):void 0}}function H0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function P_(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function T_(e){if(Array.isArray(e))return e}var U0=function(t){var n,r=t.data,i=t.totalQueries,s=t.isFirstScan,o=s===void 0?!0:s,a=t.isLoading,l=a===void 0?!1:a,u=l||!r,c=r||{},d=c.rank,f=c.brand,h=d==null?void 0:d.previous,g=typeof(h==null?void 0:h.difference)=="number"?h.difference*-1:void 0,m=f==null?void 0:f.numberOfMentions,p=m==null?void 0:m.previous,v=typeof(p==null?void 0:p.difference)=="number"?p.difference:void 0;return y.jsxs(P.Table.Row,{children:[y.jsx(P.Table.Cell,{children:u?y.jsx(P.SkeletonLoader,{className:"yst-h-6 yst-w-8"}):y.jsxs("span",{className:"yst-flex yst-justify-between yst-gap-4",children:[y.jsxs("span",{className:"yst-flex yst-flex-nowrap yst-gap-2 yst-font-medium",children:[y.jsx("span",{className:"yst-text-slate-500",children:"#"}),y.jsx("span",{className:"yst-text-slate-900",children:d==null?void 0:d.value})]}),!o&&y.jsx("span",{className:Oe("yst-inline-flex yst-items-center yst-justify-end",ra(h&&typeof g=="number"?g:0)),children:h&&typeof g=="number"?y.jsxs(y.Fragment,{children:[Math.abs(g),g>0?y.jsx(D6,{className:"yst-h-4 yst-w-4"}):y.jsx(j6,{className:"yst-h-4 yst-w-4"})]}):y.jsx(M0,{className:"yst-mx-1 yst-h-4 yst-w-4"})})]})}),y.jsx(P.Table.Cell,{children:u?y.jsx(P.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):y.jsx("span",{className:"yst-font-medium",children:f!=null&&f.isSelf?y.jsx(Nu,{children:f==null?void 0:f.name}):(n=f==null?void 0:f.name)!==null&&n!==void 0?n:"—"})}),y.jsx(P.Table.Cell,{children:u?y.jsx(P.SkeletonLoader,{className:"yst-h-6 yst-w-8"}):y.jsxs("span",{className:"yst-flex yst-justify-end yst-gap-4",children:[y.jsxs("span",{className:"yst-flex yst-flex-nowrap yst-gap-1 yst-font-medium",children:[y.jsx("span",{className:"yst-text-slate-500",children:m==null?void 0:m.value}),y.jsxs("span",{className:"yst-text-slate-900",children:["/ ",i]})]}),!o&&y.jsx("span",{className:Oe("yst-ml-auto",ra(p&&typeof v=="number"?v:0)),children:p&&typeof v=="number"?y.jsxs(y.Fragment,{children:[v>-1&&"+",v]}):y.jsx(M0,{className:"yst-h-4 yst-w-4"})})]})})]},u||d==null?void 0:d.value)},M_=function(t){var n,r,i=t.className,s=z.useRef(null),o=z.useState(1),a=O_(o,2),l=a[0],u=a[1],c=Ki(),d=c.data,f=c.isLoading,h=c.isRefetching,g=d==null||(n=d.rankings)===null||n===void 0?void 0:n.list,m=(d==null||(r=d.scores)===null||r===void 0||(r=r.standardized)===null||r===void 0?void 0:r.ranking)||{},p=Object.hasOwn(m,"previous"),v=5,b=(g==null?void 0:g.length)||0,S=Math.ceil(b/v),C=(l-1)*v,x=C+v,k=g==null?void 0:g.slice(C,x);return z.useEffect(function(){l>S&&S>0&&u(1)},[S,l,u]),y.jsx(P.Card,{ref:s,className:Oe("yst-overflow-visible",i),children:y.jsxs(P.Card.Content,{className:"yst-mt-0 yst-space-y-6",children:[y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(qa,{title:"Competitor ranking",tooltip:"How often competitors are mentioned in your submitted queries."}),y.jsx("p",{children:"Brands with the most mentions for your prompts."})]}),!f&&!h&&(!g||g.length===0)?y.jsx(P.Alert,{variant:"info",children:"The selected AI model returned no brands for your queries. This can happen with some queries or models."}):y.jsxs(P.Table,{variant:"minimal",children:[y.jsx(P.Table.Head,{children:y.jsxs(P.Table.Row,{children:[y.jsx(P.Table.Cell,{className:"yst-w-20 yst-font-semibold",children:"Rank"}),y.jsx(P.Table.Cell,{className:"yst-font-semibold",children:"Brand"}),y.jsx(P.Table.Cell,{className:"yst-w-20 yst-text-right yst-font-semibold",children:"Mentions"})]})}),y.jsx(P.Table.Body,{children:k&&Array.isArray(k)&&k.length>0?k.map(function(w){var _;return y.jsx(U0,{data:w,totalQueries:d==null?void 0:d.numberOfQueries,isFirstScan:!p},"rank-row-".concat((_=w.rank)===null||_===void 0?void 0:_.value))}):f||h?Array.from({length:v}).map(function(w,_){return y.jsx(U0,{isLoading:!0},"skeleton-".concat(_))}):null})]}),!f&&!h&&g&&g.length>v&&y.jsx(P.Pagination,{current:l,total:S,className:"yst-flex-row",onNavigate:u,screenReaderTextNext:"Next",screenReaderTextPrevious:"Previous",variant:"text"})]})})},j_=function(){var t,n=Ki(),r=n.data,i=r==null||(t=r.sentiment)===null||t===void 0?void 0:t.topCompetitor;return y.jsx(f2,{title:"Competitor sentiment",data:i,tooltip:"Percentage of positive versus negative keywords in your query results related to your competitor's brand."})},$_=function(t){var n=t.brand,r=dn(),i=Fa(),s=i.setBrandId;return(n==null?void 0:n.setupStatus)==="pendingQuerySelection"?y.jsx(P.Alert,{className:"yst-mt-0",children:y.jsxs("div",{className:"yst-max-w-xl yst-space-y-4",children:[y.jsxs("div",{className:"yst-space-y-2",children:[y.jsxs("h3",{className:"yst-font-medium",children:["Finish your analysis for ",(n==null?void 0:n.name)||"Brand ".concat(n==null?void 0:n.id)]}),y.jsx("p",{children:"Your brand is saved, but you haven’t completed the analysis yet. Review your queries and run the analysis to get your brand insights!"})]}),y.jsx("div",{className:"yst-flex yst-justify-start yst-gap-6",children:y.jsx(P.Link,{onClick:function(){n.id?(s(n.id),r("/setup/".concat(n.id,"/queries"))):console.error("Brand ID is missing.")},children:"Review queries"})})]})}):null},Fu=function(t){var n=t.isOpen,r=t.onClose,i=t.onConfirm,s=t.isLoading,o=s===void 0?!1:s,a=t.title,l=t.description,u=t.disabled,c=u===void 0?!1:u,d=t.confirmText,f=d===void 0?"Yes, delete":d,h=t.cancelText,g=h===void 0?"No, go back":h,m=t.className;return y.jsx(P.Modal,{isOpen:n,onClose:r,position:"center",as:"div",className:m,children:y.jsxs(P.Modal.Panel,{children:[y.jsxs("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:[y.jsx("div",{children:y.jsx("span",{className:"yst-inline-flex yst-h-10 yst-w-10 yst-items-center yst-justify-center yst-rounded-full yst-bg-red-100",children:y.jsx(s2,{className:"yst-h-6 yst-w-6 yst-text-red-600"})})}),y.jsxs("div",{className:"yst-flex-1",children:[y.jsx(P.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:y.jsx(P.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:a})}),y.jsx(P.Modal.Container.Content,{className:"yst-mb-4 yst-space-y-3",children:typeof l=="string"?y.jsx("p",{children:l}):l})]})]}),y.jsxs(P.Modal.Container.Footer,{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-2",children:[y.jsx(P.Button,{variant:"secondary",onClick:r,children:g}),y.jsx(P.Button,{variant:"error",onClick:i,isLoading:o,disabled:c,children:f})]})]})})},sl={exports:{}},ol={exports:{}},Ue={};/** @license React v16.13.1
|
|
29
29
|
* react-is.production.min.js
|
|
30
30
|
*
|
|
31
31
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
32
32
|
*
|
|
33
33
|
* This source code is licensed under the MIT license found in the
|
|
34
34
|
* LICENSE file in the root directory of this source tree.
|
|
35
|
-
*/var
|
|
35
|
+
*/var G0;function D_(){if(G0)return Ue;G0=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function S(x){if(typeof x=="object"&&x!==null){var k=x.$$typeof;switch(k){case t:switch(x=x.type,x){case l:case u:case r:case s:case i:case d:return x;default:switch(x=x&&x.$$typeof,x){case a:case c:case g:case h:case o:return x;default:return k}}case n:return k}}}function C(x){return S(x)===u}return Ue.AsyncMode=l,Ue.ConcurrentMode=u,Ue.ContextConsumer=a,Ue.ContextProvider=o,Ue.Element=t,Ue.ForwardRef=c,Ue.Fragment=r,Ue.Lazy=g,Ue.Memo=h,Ue.Portal=n,Ue.Profiler=s,Ue.StrictMode=i,Ue.Suspense=d,Ue.isAsyncMode=function(x){return C(x)||S(x)===l},Ue.isConcurrentMode=C,Ue.isContextConsumer=function(x){return S(x)===a},Ue.isContextProvider=function(x){return S(x)===o},Ue.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},Ue.isForwardRef=function(x){return S(x)===c},Ue.isFragment=function(x){return S(x)===r},Ue.isLazy=function(x){return S(x)===g},Ue.isMemo=function(x){return S(x)===h},Ue.isPortal=function(x){return S(x)===n},Ue.isProfiler=function(x){return S(x)===s},Ue.isStrictMode=function(x){return S(x)===i},Ue.isSuspense=function(x){return S(x)===d},Ue.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===u||x===s||x===i||x===d||x===f||typeof x=="object"&&x!==null&&(x.$$typeof===g||x.$$typeof===h||x.$$typeof===o||x.$$typeof===a||x.$$typeof===c||x.$$typeof===p||x.$$typeof===v||x.$$typeof===b||x.$$typeof===m)},Ue.typeOf=S,Ue}var Ge={};/** @license React v16.13.1
|
|
36
36
|
* react-is.development.js
|
|
37
37
|
*
|
|
38
38
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the MIT license found in the
|
|
41
41
|
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/var
|
|
42
|
+
*/var K0;function L_(){return K0||(K0=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function S(oe){return typeof oe=="string"||typeof oe=="function"||oe===r||oe===u||oe===s||oe===i||oe===d||oe===f||typeof oe=="object"&&oe!==null&&(oe.$$typeof===g||oe.$$typeof===h||oe.$$typeof===o||oe.$$typeof===a||oe.$$typeof===c||oe.$$typeof===p||oe.$$typeof===v||oe.$$typeof===b||oe.$$typeof===m)}function C(oe){if(typeof oe=="object"&&oe!==null){var He=oe.$$typeof;switch(He){case t:var lt=oe.type;switch(lt){case l:case u:case r:case s:case i:case d:return lt;default:var dt=lt&<.$$typeof;switch(dt){case a:case c:case g:case h:case o:return dt;default:return He}}case n:return He}}}var x=l,k=u,w=a,_=o,O=t,E=c,T=r,j=g,B=h,R=n,A=s,M=i,D=d,H=!1;function Q(oe){return H||(H=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),F(oe)||C(oe)===l}function F(oe){return C(oe)===u}function G(oe){return C(oe)===a}function ie(oe){return C(oe)===o}function ae(oe){return typeof oe=="object"&&oe!==null&&oe.$$typeof===t}function N(oe){return C(oe)===c}function le(oe){return C(oe)===r}function te(oe){return C(oe)===g}function me(oe){return C(oe)===h}function J(oe){return C(oe)===n}function Ce(oe){return C(oe)===s}function ge(oe){return C(oe)===i}function ze(oe){return C(oe)===d}Ge.AsyncMode=x,Ge.ConcurrentMode=k,Ge.ContextConsumer=w,Ge.ContextProvider=_,Ge.Element=O,Ge.ForwardRef=E,Ge.Fragment=T,Ge.Lazy=j,Ge.Memo=B,Ge.Portal=R,Ge.Profiler=A,Ge.StrictMode=M,Ge.Suspense=D,Ge.isAsyncMode=Q,Ge.isConcurrentMode=F,Ge.isContextConsumer=G,Ge.isContextProvider=ie,Ge.isElement=ae,Ge.isForwardRef=N,Ge.isFragment=le,Ge.isLazy=te,Ge.isMemo=me,Ge.isPortal=J,Ge.isProfiler=Ce,Ge.isStrictMode=ge,Ge.isSuspense=ze,Ge.isValidElementType=S,Ge.typeOf=C}()),Ge}var V0;function g2(){return V0||(V0=1,process.env.NODE_ENV==="production"?ol.exports=D_():ol.exports=L_()),ol.exports}/*
|
|
43
43
|
object-assign
|
|
44
44
|
(c) Sindre Sorhus
|
|
45
45
|
@license MIT
|
|
46
|
-
*/var
|
|
47
|
-
Valid keys: `+JSON.stringify(Object.keys(F),null," "));var H=de(me,te,N,ce,re+"."+te,n);if(H)return H}return null}return p(W)}function R(F){switch(typeof F){case"number":case"string":case"undefined":return!0;case"boolean":return!F;case"object":if(Array.isArray(F))return F.every(R);if(F===null||a(F))return!0;var W=d(F);if(W){var ie=W.call(F),oe;if(W!==F.entries){for(;!(oe=ie.next()).done;)if(!R(oe.value))return!1}else for(;!(oe=ie.next()).done;){var N=oe.value;if(N&&!R(N[1]))return!1}}else return!1;return!0;default:return!1}}function A(F,W){return F==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function T(F){var W=typeof F;return Array.isArray(F)?"array":F instanceof RegExp?"object":A(W,F)?"symbol":W}function I(F){if(typeof F=="undefined"||F===null)return""+F;var W=T(F);if(W==="object"){if(F instanceof Date)return"date";if(F instanceof RegExp)return"regexp"}return W}function G(F){var W=I(F);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function X(F){return!F.constructor||!F.constructor.name?f:F.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},wu}var Su,W0;function L_(){if(W0)return Su;W0=1;var e=Pf();function t(){}function n(){}return n.resetWarningCache=t,Su=function(){function r(o,a,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Su}var Q0;function I_(){if(Q0)return il.exports;if(Q0=1,process.env.NODE_ENV!=="production"){var e=l2(),t=!0;il.exports=D_()(e.isElement,t)}else il.exports=L_()();return il.exports}var R_=I_();const Td=lp(R_);var za=function(t){var n=t.className,r=n===void 0?"":n;return y.jsx("hr",{className:ke("yst-my-6",r)})};za.propTypes={className:Td.string};const u2=6048e5,N_=864e5,Y0=Symbol.for("constructDateFrom");function ln(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Y0 in e?e[Y0](t):e instanceof Date?new e.constructor(t):new Date(t)}function Gt(e,t){return ln(t||e,e)}function d2(e,t,n){const r=Gt(e,n==null?void 0:n.in);if(isNaN(t))return ln(e,NaN);if(!t)return r;const i=r.getDate(),s=ln(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const o=s.getDate();return i>=o?s:(r.setFullYear(s.getFullYear(),s.getMonth(),i),r)}let F_={};function Rc(){return F_}function sa(e,t){var a,l,c,u,d,f,h,g;const n=Rc(),r=(g=(h=(u=(c=t==null?void 0:t.weekStartsOn)!=null?c:(l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)!=null?u:n.weekStartsOn)!=null?h:(f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)!=null?g:0,i=Gt(e,t==null?void 0:t.in),s=i.getDay(),o=(s<r?7:0)+s-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function Xl(e,t){return sa(e,{...t,weekStartsOn:1})}function f2(e,t){const n=Gt(e,t==null?void 0:t.in),r=n.getFullYear(),i=ln(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const s=Xl(i),o=ln(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const a=Xl(o);return n.getTime()>=s.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function X0(e){const t=Gt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Nc(e,...t){const n=ln.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Zl(e,t){const n=Gt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function B_(e,t,n){const[r,i]=Nc(n==null?void 0:n.in,e,t),s=Zl(r),o=Zl(i),a=+s-X0(s),l=+o-X0(o);return Math.round((a-l)/N_)}function q_(e,t){const n=f2(e,t),r=ln(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Xl(r)}function z_(e){return ln(e,Date.now())}function H_(e,t,n){const[r,i]=Nc(n==null?void 0:n.in,e,t);return+Zl(r)==+Zl(i)}function U_(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function G_(e){return!(!U_(e)&&typeof e!="number"||isNaN(+Gt(e)))}function K_(e,t){const n=Gt(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function V_(e,t){const[n,r]=Nc(e,t.start,t.end);return{start:n,end:r}}function W_(e,t){const{start:n,end:r}=V_(t==null?void 0:t.in,e);let i=+n>+r;const s=i?+n:+r,o=i?r:n;o.setHours(0,0,0,0);let a=1;const l=[];for(;+o<=s;)l.push(ln(n,o)),o.setDate(o.getDate()+a),o.setHours(0,0,0,0);return i?l.reverse():l}function Q_(e,t){const n=Gt(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Y_(e,t){const n=Gt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const X_={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Z_=(e,t,n)=>{let r;const i=X_[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Cu(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const J_={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},e8={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},t8={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},n8={date:Cu({formats:J_,defaultWidth:"full"}),time:Cu({formats:e8,defaultWidth:"full"}),dateTime:Cu({formats:t8,defaultWidth:"full"})},r8={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},i8=(e,t,n,r)=>r8[e];function yo(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{const o=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[a]||e.values[o]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}const s8={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},o8={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},a8={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},l8={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},c8={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},u8={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},d8=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},f8={ordinalNumber:d8,era:yo({values:s8,defaultWidth:"wide"}),quarter:yo({values:o8,defaultWidth:"wide",argumentCallback:e=>e-1}),month:yo({values:a8,defaultWidth:"wide"}),day:yo({values:l8,defaultWidth:"wide"}),dayPeriod:yo({values:c8,defaultWidth:"wide",formattingValues:u8,defaultFormattingWidth:"wide"})};function mo(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const o=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?g8(a,d=>d.test(o)):h8(a,d=>d.test(o));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(o.length);return{value:c,rest:u}}}function h8(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function g8(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function y8(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let o=e.valueCallback?e.valueCallback(s[0]):s[0];o=n.valueCallback?n.valueCallback(o):o;const a=t.slice(i.length);return{value:o,rest:a}}}const m8=/^(\d+)(th|st|nd|rd)?/i,p8=/\d+/i,v8={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},b8={any:[/^b/i,/^(a|c)/i]},x8={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},w8={any:[/1/i,/2/i,/3/i,/4/i]},S8={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},C8={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},_8={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},k8={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},O8={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},E8={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},A8={ordinalNumber:y8({matchPattern:m8,parsePattern:p8,valueCallback:e=>parseInt(e,10)}),era:mo({matchPatterns:v8,defaultMatchWidth:"wide",parsePatterns:b8,defaultParseWidth:"any"}),quarter:mo({matchPatterns:x8,defaultMatchWidth:"wide",parsePatterns:w8,defaultParseWidth:"any",valueCallback:e=>e+1}),month:mo({matchPatterns:S8,defaultMatchWidth:"wide",parsePatterns:C8,defaultParseWidth:"any"}),day:mo({matchPatterns:_8,defaultMatchWidth:"wide",parsePatterns:k8,defaultParseWidth:"any"}),dayPeriod:mo({matchPatterns:O8,defaultMatchWidth:"any",parsePatterns:E8,defaultParseWidth:"any"})},P8={code:"en-US",formatDistance:Z_,formatLong:n8,formatRelative:i8,localize:f8,match:A8,options:{weekStartsOn:0,firstWeekContainsDate:1}};function T8(e,t){const n=Gt(e,t==null?void 0:t.in);return B_(n,Y_(n))+1}function M8(e,t){const n=Gt(e,t==null?void 0:t.in),r=+Xl(n)-+q_(n);return Math.round(r/u2)+1}function h2(e,t){var u,d,f,h,g,m,p,v;const n=Gt(e,t==null?void 0:t.in),r=n.getFullYear(),i=Rc(),s=(v=(p=(h=(f=t==null?void 0:t.firstWeekContainsDate)!=null?f:(d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)!=null?h:i.firstWeekContainsDate)!=null?p:(m=(g=i.locale)==null?void 0:g.options)==null?void 0:m.firstWeekContainsDate)!=null?v:1,o=ln((t==null?void 0:t.in)||e,0);o.setFullYear(r+1,0,s),o.setHours(0,0,0,0);const a=sa(o,t),l=ln((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=sa(l,t);return+n>=+a?r+1:+n>=+c?r:r-1}function j8(e,t){var a,l,c,u,d,f,h,g;const n=Rc(),r=(g=(h=(u=(c=t==null?void 0:t.firstWeekContainsDate)!=null?c:(l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)!=null?u:n.firstWeekContainsDate)!=null?h:(f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)!=null?g:1,i=h2(e,t),s=ln((t==null?void 0:t.in)||e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),sa(s,t)}function $8(e,t){const n=Gt(e,t==null?void 0:t.in),r=+sa(n,t)-+j8(n,t);return Math.round(r/u2)+1}function Qe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Or={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Qe(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Qe(n+1,2)},d(e,t){return Qe(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Qe(e.getHours()%12||12,t.length)},H(e,t){return Qe(e.getHours(),t.length)},m(e,t){return Qe(e.getMinutes(),t.length)},s(e,t){return Qe(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Qe(i,t.length)}},Yi={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Z0={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Or.y(e,t)},Y:function(e,t,n,r){const i=h2(e,r),s=i>0?i:1-i;if(t==="YY"){const o=s%100;return Qe(o,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Qe(s,t.length)},R:function(e,t){const n=f2(e);return Qe(n,t.length)},u:function(e,t){const n=e.getFullYear();return Qe(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Qe(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Qe(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Or.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Qe(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=$8(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Qe(i,t.length)},I:function(e,t,n){const r=M8(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Qe(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Or.d(e,t)},D:function(e,t,n){const r=T8(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Qe(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Qe(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Qe(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Qe(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Yi.noon:r===0?i=Yi.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Yi.evening:r>=12?i=Yi.afternoon:r>=4?i=Yi.morning:i=Yi.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Or.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Or.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Qe(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Qe(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Or.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Or.s(e,t)},S:function(e,t){return Or.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return eg(r);case"XXXX":case"XX":return ci(r);case"XXXXX":case"XXX":default:return ci(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return eg(r);case"xxxx":case"xx":return ci(r);case"xxxxx":case"xxx":default:return ci(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+J0(r,":");case"OOOO":default:return"GMT"+ci(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+J0(r,":");case"zzzz":default:return"GMT"+ci(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Qe(r,t.length)},T:function(e,t,n){return Qe(+e,t.length)}};function J0(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+Qe(s,2)}function eg(e,t){return e%60===0?(e>0?"-":"+")+Qe(Math.abs(e)/60,2):ci(e,t)}function ci(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Qe(Math.trunc(r/60),2),s=Qe(r%60,2);return n+i+t+s}const tg=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},g2=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},D8=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return tg(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",tg(r,t)).replace("{{time}}",g2(i,t))},L8={p:g2,P:D8},I8=/^D+$/,R8=/^Y+$/,N8=["D","DD","YY","YYYY"];function F8(e){return I8.test(e)}function B8(e){return R8.test(e)}function q8(e,t,n){const r=z8(e,t,n);if(console.warn(r),N8.includes(e))throw new RangeError(r)}function z8(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const H8=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,U8=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,G8=/^'([^]*?)'?$/,K8=/''/g,V8=/[a-zA-Z]/;function To(e,t,n){var u,d,f,h,g,m,p,v,b;const r=Rc(),i=(u=r.locale)!=null?u:P8,s=(g=(h=r.firstWeekContainsDate)!=null?h:(f=(d=r.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)!=null?g:1,o=(b=(v=r.weekStartsOn)!=null?v:(p=(m=r.locale)==null?void 0:m.options)==null?void 0:p.weekStartsOn)!=null?b:0,a=Gt(e,n==null?void 0:n.in);if(!G_(a))throw new RangeError("Invalid time value");let l=t.match(U8).map(S=>{const C=S[0];if(C==="p"||C==="P"){const x=L8[C];return x(S,i.formatLong)}return S}).join("").match(H8).map(S=>{if(S==="''")return{isToken:!1,value:"'"};const C=S[0];if(C==="'")return{isToken:!1,value:W8(S)};if(Z0[C])return{isToken:!0,value:S};if(C.match(V8))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:S}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:o,locale:i};return l.map(S=>{if(!S.isToken)return S.value;const C=S.value;(B8(C)||F8(C))&&q8(C,t,String(e));const x=Z0[C[0]];return x(a,C,i.localize,c)}).join("")}function W8(e){const t=e.match(G8);return t?t[1].replace(K8,"'"):e}function ng(e,t,n){const[r,i]=Nc(n==null?void 0:n.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function Q8(e,t){return H_(ln(e,e),z_(e))}function Y8(e,t,n){return d2(e,-1,n)}function oa(e){"@babel/helpers - typeof";return oa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oa(e)}function _u(e,t,n){return(t=X8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X8(e){var t=Z8(e,"string");return oa(t)=="symbol"?t:t+""}function Z8(e,t){if(oa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(oa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rg(e,t){return n7(e)||t7(e,t)||e7(e,t)||J8()}function J8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
48
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
49
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
50
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f7(e,t){if(e){if(typeof e=="string")return lg(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lg(e,t):void 0}}function lg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h7(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function g7(e){if(Array.isArray(e))return e}function jd(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,g,m,p){var v=g&&g.prototype instanceof a?g:a,b=Object.create(v.prototype);return Yt(b,"_invoke",function(S,C,x){var k,w,_,O=0,E=x||[],j=!1,$={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(A,T){return k=A,w=0,_=e,$.n=T,o}};function B(R,A){for(w=R,_=A,t=0;!j&&O&&!T&&t<E.length;t++){var T,I=E[t],G=$.p,X=I[2];R>3?(T=X===A)&&(_=I[(w=I[4])?5:(w=3,3)],I[4]=I[5]=e):I[0]<=G&&((T=R<2&&G<I[1])?(w=0,$.v=A,$.n=I[1]):G<X&&(T=R<3||I[0]>A||A>X)&&(I[4]=R,I[5]=A,$.n=X,w=0))}if(T||R>1)return o;throw j=!0,A}return function(R,A,T){if(O>1)throw TypeError("Generator is already running");for(j&&A===1&&B(A,T),w=A,_=T;(t=w<2?e:_)||!j;){k||(w?w<3?(w>1&&($.n=-1),B(w,_)):$.n=_:$.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(j=$.n<0)?_:S.call(C,$))!==o)break}catch(I){k=e,w=1,_=I}finally{O=1}}return{value:t,done:j}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(Yt(t={},r,function(){return this}),t),d=c.prototype=a.prototype=Object.create(u);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,Yt(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=c,Yt(d,"constructor",c),Yt(c,"constructor",l),l.displayName="GeneratorFunction",Yt(c,i,"GeneratorFunction"),Yt(d),Yt(d,i,"Generator"),Yt(d,r,function(){return this}),Yt(d,"toString",function(){return"[object Generator]"}),(jd=function(){return{w:s,m:f}})()}function Yt(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Yt=function(o,a,l,c){if(a)i?i(o,a,{value:l,enumerable:!c,configurable:!c,writable:!c}):o[a]=l;else{var u=function(f,h){Yt(o,f,function(g){return this._invoke(f,h,g)})};u("next",0),u("throw",1),u("return",2)}},Yt(e,t,n,r)}function cg(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(c){return void n(c)}a.done?t(l):Promise.resolve(l).then(r,i)}function y7(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){cg(s,r,i,o,a,"next",l)}function a(l){cg(s,r,i,o,a,"throw",l)}o(void 0)})}}function m7(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Ou=qa(og||(og=m7(["yst-flex-1 yst-space-y-2"]))),p7=function(t){var n,r,i,s,o=t.className,a=Jn(),l=a.brandId,c=a.analysisId,u=a.model,d=Na(),f=d.setModel,h=d.setAnalysisId,g=Ut(),m=cn(),p=Ui(),v=p.data,b=$c({query:{select:function(tt){var ze=tt.data;return ze==null?void 0:ze.data}}}),S=b.data,C=b.isLoading,x=S==null?void 0:S.displayName,k=Hi({query:{select:function(tt){var ze=tt.data;return ze==null?void 0:ze.brands}}}),w=k.data,_=k.isLoading,O=Wv(l,{query:{enabled:!!l,select:function(tt){var ze=tt.data;return ze==null?void 0:ze.analyses}}}),E=O.data,j=O.isLoading,$=Mc(l,c,{query:{enabled:!!l&&!!c,select:function(tt){var ze=tt.data;return ze}}}),B=$.data,R=$.isLoading,A=Ed(l,{query:{enabled:!!l,select:function(tt){var ze=tt.data;return ze}}}),T=A.data,I=A.isLoading,G=P4({mutation:{onSuccess:function(){var Oe=y7(jd().m(function ze(){var En,Kt;return jd().w(function(un){for(;;)switch(un.n){case 0:return un.n=1,Promise.all([g.invalidateQueries({queryKey:Vv(l)}),g.invalidateQueries({queryKey:Qv(l,c)}),g.invalidateQueries({queryKey:kf(l)})]);case 1:En=(E==null?void 0:E.filter(function(In){return String(In.id)!==String(c)}))||[],En.length>0?(Kt=En.reduce(function(In,tr){var Vi=In.createdAt?new Date(In.createdAt).getTime():0,kr=tr.createdAt?new Date(tr.createdAt).getTime():0;return kr>Vi?tr:In}),h(Kt.id),m("/brands/".concat(l,"/analysis/").concat(Kt.id))):(h("latest"),m("/brands/".concat(l))),N(!1);case 2:return un.a(2)}},ze)}));function tt(){return Oe.apply(this,arguments)}return tt}()}}),X=G.mutate,F=G.isPending;z.useEffect(function(){!I&&!R&&l&&w&&(w==null?void 0:w.length)<2&&(!(T!=null&&T.queries)||Array.isArray(T==null?void 0:T.queries)&&T.queries.length===0)&&(E==null?void 0:E.length)===0&&m("/setup/".concat(l,"/queries"))},[I,R,T,l,m,w,E==null?void 0:E.length]);var W=z.useState(!1),ie=ag(W,2),oe=ie[0],N=ie[1],ce=function(){N(!1)},re=w==null?void 0:w.find(function(Oe){return String(Oe.id)===String(l)}),me=B==null||(n=B.analysis)===null||n===void 0?void 0:n.id,J=l!=null&&typeof me=="number"&&!isNaN(me),Se=z.useState(!1),te=ag(Se,2),de=te[0],H=te[1];z.useEffect(function(){if(J){var Oe="yst_legal_alert_dismissed_".concat(l,"_").concat(me);H(window.localStorage.getItem(Oe)===null)}},[l,me,J]);var he=function(tt){if(tt.preventDefault(),!!J){var ze="yst_legal_alert_dismissed_".concat(l,"_").concat(me);window.localStorage.setItem(ze,"true"),H(!1)}},je=function(tt){switch(tt){case"openai":return"OpenAI";case"perplexity":return"Perplexity";case"anthropic":return"Anthropic";default:return tt||"Unknown"}},et=(B==null||(r=B.analysis)===null||r===void 0||(r=r.scans)===null||r===void 0?void 0:r.map(function(Oe){return{value:Oe.aiProvider,label:je(Oe.aiProvider)}}))||[{value:"",label:"Default model"}],De=E!=null&&E.some(function(Oe){return String(Oe.id)===String(c)})?c:E&&E.length>0?E[0].id:"latest",We=Ed(l,{query:{enabled:!!l,select:function(tt){var ze=tt.data;return ze}}}),Q=We.data,Me=(Q==null?void 0:Q.name)||"your brand",ct=Md(Q==null?void 0:Q.nextScheduledAnalysis),Ne=B==null||(i=B.analysis)===null||i===void 0?void 0:i.status,Le=function(){var Oe=y.jsxs("div",{className:"yst-max-w-xl yst-space-y-2",children:[y.jsx("p",{className:"yst-font-medium",children:"Your analysis is scheduled"}),y.jsxs("p",{children:["You've completed the setup for"," ",y.jsx("b",{className:"yst-font-medium",children:Me}),". The analysis is scheduled to run on"," ",y.jsx("b",{className:"yst-font-medium",children:ct}),". You'll see the results here once it's ready. We'll also notify you by email."]})]});if(Ne===void 0&&(T==null?void 0:T.setupStatus)==="scheduledFirstAnalysis")return{alertContent:Oe,alertVariant:"info"};switch(Ne){case li.pending:return{alertContent:Oe,alertVariant:"info"};case li.processing:return{alertContent:y.jsxs(y.Fragment,{children:["You've completed the setup for ",Me,". The analysis is now processing. You'll see the results here once it's ready. We'll also notify you by email."]}),alertVariant:"info"};case li.failed:return{alertContent:y.jsx(y.Fragment,{children:"Analysis failed. Try restarting the analysis or contact support if the issue persists."}),alertVariant:"danger"};case li.cancelled:return{alertContent:y.jsx(y.Fragment,{children:"Analysis was cancelled. You can restart the analysis when ready."}),alertVariant:"warning"};case li.completed:return{alertContent:null};default:return{alertContent:null,alertVariant:"info"}}}(),fe=Le.alertContent,pe=Le.alertVariant,ge=!j&&(T==null?void 0:T.setupStatus)!=="pendingQuerySelection"&&(E==null?void 0:E.length)===0&&(T==null?void 0:T.nextScheduledAnalysis)===null,Ie=v==null?void 0:v.isUpToDateWithBrandGroups,On=(v==null?void 0:v.status)===x6.updating&&Ie===!1;return y.jsxs(y.Fragment,{children:[y.jsx(Ic,{isOpen:oe,onClose:ce,onConfirm:function(){l&&c&&X({brandId:l,analysisId:c})},isLoading:F,title:"Delete analysis?",description:y.jsxs(y.Fragment,{children:[y.jsx("p",{children:"This will permanently delete all data associated with this analysis."}),y.jsx("p",{children:"This action cannot be undone."})]}),confirmText:"Yes, delete analysis",cancelText:"No, go back"}),y.jsx(P.Card,{className:ke("yst-relative yst-overflow-visible",o),children:y.jsxs(P.Card.Content,{className:"yst-mt-0",children:[y.jsxs("div",{className:"yst-flex yst-flex-1 yst-flex-col yst-flex-wrap yst-items-start yst-justify-between yst-gap-4 md:yst-flex-row xl:yst-items-center",children:[y.jsx("div",{className:"xl:yst-max-w-1/4",children:y.jsxs("div",{className:"yst-flex yst-flex-col xl:yst-flex-row xl:yst-items-baseline xl:yst-gap-2",children:[y.jsx(P.Title,{children:y.jsxs(y.Fragment,{children:[C||!x?y.jsx(P.SkeletonLoader,{className:"yst-inline-block yst-h-8 yst-w-64"}):y.jsxs(y.Fragment,{children:["Hi ",x,", "]})," "]})}),y.jsx("p",{className:"yst-text-sm yst-font-normal yst-text-slate-600",children:"welcome to your brand analysis!"})]})}),y.jsxs("div",{className:"yst-flex yst-flex-row yst-flex-wrap yst-items-center yst-justify-end yst-gap-4 yst-self-end md:yst-self-start",children:[y.jsxs(P.Button,{variant:"primary",className:"yst-gap-1.5",onClick:function(){return m("/setup")},disabled:j||_,children:[y.jsx(t2,{})," Analyze a different brand"]}),y.jsx("div",{className:"yst-relative",children:y.jsxs(P.DropdownMenu,{children:[y.jsx(P.DropdownMenu.IconTrigger,{screenReaderTriggerLabel:"Open brand list options",disabled:j||_||w&&(w==null?void 0:w.length)<1,children:y.jsx(N5,{})}),y.jsx(P.DropdownMenu.List,{className:"yst-absolute yst-right-0 yst-top-full yst-z-40 yst-mt-2 yst-flex yst-w-64 yst-flex-col yst-justify-start",children:y.jsxs(P.DropdownMenu.ButtonItem,{onClick:function(){return N(!0)},disabled:j||_||(B==null||(s=B.analysis)===null||s===void 0?void 0:s.status)!=="completed"||!E||E.length===0,className:"yst-flex yst-justify-start yst-gap-1.5 yst-text-red-600 hover:yst-bg-red-50",children:[y.jsx(Of,{className:"yst-h-4 yst-w-4"}),"Delete analysis"]})})]})})]})]}),y.jsx(za,{}),y.jsxs("form",{className:"yst-flex yst-flex-col yst-items-stretch yst-gap-4 md:yst-flex-row md:yst-items-center",children:[y.jsxs(Ou,{children:[y.jsx(P.Label,{htmlFor:"brand-name",children:"Brand"}),y.jsx(P.Select,{onChange:function(Oe){m("/brands/".concat(Oe.toString()))},id:"brand-name",value:l?Number(l):"loading",options:w&&w.length>0?w.map(function(Oe){return{value:Oe.id,label:Oe.name}}):[{value:"loading",label:"Loading..."}],disabled:_||!w||w.length<2||!l})]}),y.jsxs(Ou,{children:[y.jsx(P.Label,{htmlFor:"analysis-date",children:"Analysis date"}),y.jsx(l7,{analyses:E||[],selectedAnalysisId:De,onAnalysisSelect:function(Oe){m("/brands/".concat(l,"/analysis/").concat(String(Oe)))},isLoading:j,disabled:j||!E||E.length<1,id:"analysis-date"})]}),y.jsxs(Ou,{children:[y.jsx(P.Label,{htmlFor:"ai-tool",children:"AI model"}),y.jsx(P.Select,{onChange:function(Oe){Object.values(b6).includes(Oe)?f(Oe):console.error("Invalid AI provider selected:",Oe)},id:"ai-tool",value:u,options:R||j?[{value:u,label:"Loading..."}]:et,disabled:R||j||[{}].length<2})]})]})]})}),y.jsxs("div",{className:"ystaii-alerts yst-space-y-4",children:[J&&de&&y.jsx(P.Alert,{children:y.jsxs("div",{className:"yst-flex yst-w-full",children:[y.jsx("div",{className:"yst-max-w-xl yst-space-y-4",children:y.jsx("p",{className:"yst-mb-0",children:"Note: This content was generated by an AI model (see dropdown above) and may contain errors. Please review before acting on it."})}),y.jsx("div",{className:"yst-ml-auto",children:y.jsx(P.Link,{onClick:he,variant:"default",children:y.jsx(R6,{})})})]})}),Ne!==li.completed&&fe&&y.jsx(P.Alert,{className:"md:yst-col-span-2",variant:pe,children:fe}),typeof Ie=="boolean"&&!Ie&&y.jsxs(P.Alert,{variant:"warning",children:["Note: This scan is not up to date with your current brand groups.",On?y.jsxs(y.Fragment,{children:[" ","We're updating your sentiment analysis to reflect your new brand groups. This may take a few minutes."]}):y.jsx(y.Fragment,{children:" Newer scans will use your newly selected brand groupings."})]})]}),ge&&y.jsx(P.Alert,{variant:"info",className:"yst-mb-6",children:y.jsx("div",{className:"yst-flex yst-items-start yst-gap-3",children:y.jsxs("div",{className:"yst-flex-1",children:[y.jsx("h3",{className:"yst-mb-2 yst-font-medium yst-text-blue-800",children:"No analyses scheduled"}),y.jsxs("p",{className:"yst-text-bluer-700 yst-mb-0",children:[y.jsx("span",{className:"yst-font-medium yst-text-blue-900",children:re==null?void 0:re.name})," ","has not been analyzed yet, and no analyses are scheduled because this brand is set to inactive in your"," ",y.jsx("span",{className:"yst-cursor-pointer yst-font-medium yst-text-blue-900 yst-underline",onClick:function(){return m("/settings")},role:"button",tabIndex:0,onKeyPress:function(Oe){(Oe.key==="Enter"||Oe.key===" ")&&m("/settings")},children:"Settings"}),"."]})]})})}),re&&y.jsx(P_,{brand:re},re.id)]})},v7=function(){var t,n,r,i=Ui(),s=i.data,o=i.isLoading,a=i.isRefetching,l=s==null?void 0:s.mentions;return y.jsx(P.Card,{className:"yst-overflow-visible",children:y.jsxs(P.Card.Content,{className:"yst-space-y-4",children:[y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(Ba,{title:"Mentions",tooltip:"The queries where your brand was mentioned."}),y.jsx(Fa,{score:l==null||(t=l.mentionedInNumberOfQueries)===null||t===void 0?void 0:t.value,total:l==null||(n=l.queriesWithMentions)===null||n===void 0?void 0:n.length,suffix:"queries",isLoading:o||a})]}),!o&&l?y.jsx("ul",{children:l==null||(r=l.queriesWithMentions)===null||r===void 0?void 0:r.map(function(c,u){var d=u===0,f=l.queriesWithMentions&&u===l.queriesWithMentions.length-1;return y.jsxs("li",{className:ke("yst-flex yst-flex-row yst-items-center yst-gap-2 yst-border-l yst-border-r yst-border-slate-300 yst-p-4 yst-font-medium yst-text-slate-800",{"yst-rounded-t-lg yst-border-t":d,"yst-rounded-b-lg yst-border-b":f,"yst-border-b":!f}),children:[y.jsx("div",{className:"yst-h-4 yst-w-4",children:c!=null&&c.mentioned?y.jsx(A5,{className:"yst-text-green-500"}):y.jsx(J5,{className:"yst-text-red-500"})}),y.jsx("span",{className:"yst-justify-start",children:c.query}),y.jsx("span",{className:"yst-ml-auto yst-flex yst-items-end",children:c!=null&&c.mentioned?y.jsx(P.Badge,{className:"yst-bg-green-100 yst-text-green-800",children:"Found"}):y.jsx(P.Badge,{className:"yst-bg-red-100 yst-text-red-800",children:"Not found"})})]},c.query)})}):y.jsx(P.SkeletonLoader,{className:"yst-h-56 yst-w-full"})]})})};/*!
|
|
46
|
+
*/var xc,W0;function I_(){if(W0)return xc;W0=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function i(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(o).map(function(c){return o[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch(c){return!1}}return xc=i()?Object.assign:function(s,o){for(var a,l=r(s),u,c=1;c<arguments.length;c++){a=Object(arguments[c]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){u=e(a);for(var f=0;f<u.length;f++)n.call(a,u[f])&&(l[u[f]]=a[u[f]])}}return l},xc}var wc,Q0;function Df(){if(Q0)return wc;Q0=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return wc=e,wc}var Sc,Y0;function y2(){return Y0||(Y0=1,Sc=Function.call.bind(Object.prototype.hasOwnProperty)),Sc}var Cc,X0;function R_(){if(X0)return Cc;X0=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Df(),n={},r=y2();e=function(s){var o="Warning: "+s;typeof console!="undefined"&&console.error(o);try{throw new Error(o)}catch(a){}}}function i(s,o,a,l,u){if(process.env.NODE_ENV!=="production"){for(var c in s)if(r(s,c)){var d;try{if(typeof s[c]!="function"){var f=Error((l||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=s[c](o,c,l,a,null,t)}catch(g){d=g}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=u?u():"";e("Failed "+a+" type: "+d.message+(h!=null?h:""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Cc=i,Cc}var _c,Z0;function N_(){if(Z0)return _c;Z0=1;var e=g2(),t=I_(),n=Df(),r=y2(),i=R_(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console!="undefined"&&console.error(l);try{throw new Error(l)}catch(u){}});function o(){return null}return _c=function(a,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function d(F){var G=F&&(u&&F[u]||F[c]);if(typeof G=="function")return G}var f="<<anonymous>>",h={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:S,element:C(),elementType:x(),instanceOf:k,node:E(),objectOf:_,oneOf:w,oneOfType:O,shape:j,exact:B};function g(F,G){return F===G?F!==0||1/F===1/G:F!==F&&G!==G}function m(F,G){this.message=F,this.data=G&&typeof G=="object"?G:{},this.stack=""}m.prototype=Error.prototype;function p(F){if(process.env.NODE_ENV!=="production")var G={},ie=0;function ae(le,te,me,J,Ce,ge,ze){if(J=J||f,ge=ge||me,ze!==n){if(l){var oe=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw oe.name="Invariant Violation",oe}else if(process.env.NODE_ENV!=="production"&&typeof console!="undefined"){var He=J+":"+me;!G[He]&&ie<3&&(s("You are manually calling a React.PropTypes validation function for the `"+ge+"` prop on `"+J+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),G[He]=!0,ie++)}}return te[me]==null?le?te[me]===null?new m("The "+Ce+" `"+ge+"` is marked as required "+("in `"+J+"`, but its value is `null`.")):new m("The "+Ce+" `"+ge+"` is marked as required in "+("`"+J+"`, but its value is `undefined`.")):null:F(te,me,J,Ce,ge)}var N=ae.bind(null,!1);return N.isRequired=ae.bind(null,!0),N}function v(F){function G(ie,ae,N,le,te,me){var J=ie[ae],Ce=M(J);if(Ce!==F){var ge=D(J);return new m("Invalid "+le+" `"+te+"` of type "+("`"+ge+"` supplied to `"+N+"`, expected ")+("`"+F+"`."),{expectedType:F})}return null}return p(G)}function b(){return p(o)}function S(F){function G(ie,ae,N,le,te){if(typeof F!="function")return new m("Property `"+te+"` of component `"+N+"` has invalid PropType notation inside arrayOf.");var me=ie[ae];if(!Array.isArray(me)){var J=M(me);return new m("Invalid "+le+" `"+te+"` of type "+("`"+J+"` supplied to `"+N+"`, expected an array."))}for(var Ce=0;Ce<me.length;Ce++){var ge=F(me,Ce,N,le,te+"["+Ce+"]",n);if(ge instanceof Error)return ge}return null}return p(G)}function C(){function F(G,ie,ae,N,le){var te=G[ie];if(!a(te)){var me=M(te);return new m("Invalid "+N+" `"+le+"` of type "+("`"+me+"` supplied to `"+ae+"`, expected a single ReactElement."))}return null}return p(F)}function x(){function F(G,ie,ae,N,le){var te=G[ie];if(!e.isValidElementType(te)){var me=M(te);return new m("Invalid "+N+" `"+le+"` of type "+("`"+me+"` supplied to `"+ae+"`, expected a single ReactElement type."))}return null}return p(F)}function k(F){function G(ie,ae,N,le,te){if(!(ie[ae]instanceof F)){var me=F.name||f,J=Q(ie[ae]);return new m("Invalid "+le+" `"+te+"` of type "+("`"+J+"` supplied to `"+N+"`, expected ")+("instance of `"+me+"`."))}return null}return p(G)}function w(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),o;function G(ie,ae,N,le,te){for(var me=ie[ae],J=0;J<F.length;J++)if(g(me,F[J]))return null;var Ce=JSON.stringify(F,function(ze,oe){var He=D(oe);return He==="symbol"?String(oe):oe});return new m("Invalid "+le+" `"+te+"` of value `"+String(me)+"` "+("supplied to `"+N+"`, expected one of "+Ce+"."))}return p(G)}function _(F){function G(ie,ae,N,le,te){if(typeof F!="function")return new m("Property `"+te+"` of component `"+N+"` has invalid PropType notation inside objectOf.");var me=ie[ae],J=M(me);if(J!=="object")return new m("Invalid "+le+" `"+te+"` of type "+("`"+J+"` supplied to `"+N+"`, expected an object."));for(var Ce in me)if(r(me,Ce)){var ge=F(me,Ce,N,le,te+"."+Ce,n);if(ge instanceof Error)return ge}return null}return p(G)}function O(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var G=0;G<F.length;G++){var ie=F[G];if(typeof ie!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+H(ie)+" at index "+G+"."),o}function ae(N,le,te,me,J){for(var Ce=[],ge=0;ge<F.length;ge++){var ze=F[ge],oe=ze(N,le,te,me,J,n);if(oe==null)return null;oe.data&&r(oe.data,"expectedType")&&Ce.push(oe.data.expectedType)}var He=Ce.length>0?", expected one of type ["+Ce.join(", ")+"]":"";return new m("Invalid "+me+" `"+J+"` supplied to "+("`"+te+"`"+He+"."))}return p(ae)}function E(){function F(G,ie,ae,N,le){return R(G[ie])?null:new m("Invalid "+N+" `"+le+"` supplied to "+("`"+ae+"`, expected a ReactNode."))}return p(F)}function T(F,G,ie,ae,N){return new m((F||"React class")+": "+G+" type `"+ie+"."+ae+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+N+"`.")}function j(F){function G(ie,ae,N,le,te){var me=ie[ae],J=M(me);if(J!=="object")return new m("Invalid "+le+" `"+te+"` of type `"+J+"` "+("supplied to `"+N+"`, expected `object`."));for(var Ce in F){var ge=F[Ce];if(typeof ge!="function")return T(N,le,te,Ce,D(ge));var ze=ge(me,Ce,N,le,te+"."+Ce,n);if(ze)return ze}return null}return p(G)}function B(F){function G(ie,ae,N,le,te){var me=ie[ae],J=M(me);if(J!=="object")return new m("Invalid "+le+" `"+te+"` of type `"+J+"` "+("supplied to `"+N+"`, expected `object`."));var Ce=t({},ie[ae],F);for(var ge in Ce){var ze=F[ge];if(r(F,ge)&&typeof ze!="function")return T(N,le,te,ge,D(ze));if(!ze)return new m("Invalid "+le+" `"+te+"` key `"+ge+"` supplied to `"+N+"`.\nBad object: "+JSON.stringify(ie[ae],null," ")+`
|
|
47
|
+
Valid keys: `+JSON.stringify(Object.keys(F),null," "));var oe=ze(me,ge,N,le,te+"."+ge,n);if(oe)return oe}return null}return p(G)}function R(F){switch(typeof F){case"number":case"string":case"undefined":return!0;case"boolean":return!F;case"object":if(Array.isArray(F))return F.every(R);if(F===null||a(F))return!0;var G=d(F);if(G){var ie=G.call(F),ae;if(G!==F.entries){for(;!(ae=ie.next()).done;)if(!R(ae.value))return!1}else for(;!(ae=ie.next()).done;){var N=ae.value;if(N&&!R(N[1]))return!1}}else return!1;return!0;default:return!1}}function A(F,G){return F==="symbol"?!0:G?G["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&G instanceof Symbol:!1}function M(F){var G=typeof F;return Array.isArray(F)?"array":F instanceof RegExp?"object":A(G,F)?"symbol":G}function D(F){if(typeof F=="undefined"||F===null)return""+F;var G=M(F);if(G==="object"){if(F instanceof Date)return"date";if(F instanceof RegExp)return"regexp"}return G}function H(F){var G=D(F);switch(G){case"array":case"object":return"an "+G;case"boolean":case"date":case"regexp":return"a "+G;default:return G}}function Q(F){return!F.constructor||!F.constructor.name?f:F.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},_c}var kc,J0;function F_(){if(J0)return kc;J0=1;var e=Df();function t(){}function n(){}return n.resetWarningCache=t,kc=function(){function r(o,a,l,u,c,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},kc}var eg;function B_(){if(eg)return sl.exports;if(eg=1,process.env.NODE_ENV!=="production"){var e=g2(),t=!0;sl.exports=N_()(e.isElement,t)}else sl.exports=F_()();return sl.exports}var q_=B_();const $d=yp(q_);var Ha=function(t){var n=t.className,r=n===void 0?"":n;return y.jsx("hr",{className:Oe("yst-my-6",r)})};Ha.propTypes={className:$d.string};const m2=6048e5,z_=864e5,tg=Symbol.for("constructDateFrom");function cn(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&tg in e?e[tg](t):e instanceof Date?new e.constructor(t):new Date(t)}function Kt(e,t){return cn(t||e,e)}function p2(e,t,n){const r=Kt(e,n==null?void 0:n.in);if(isNaN(t))return cn(e,NaN);if(!t)return r;const i=r.getDate(),s=cn(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const o=s.getDate();return i>=o?s:(r.setFullYear(s.getFullYear(),s.getMonth(),i),r)}let H_={};function Bu(){return H_}function oa(e,t){var a,l,u,c,d,f,h,g;const n=Bu(),r=(g=(h=(c=(u=t==null?void 0:t.weekStartsOn)!=null?u:(l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)!=null?c:n.weekStartsOn)!=null?h:(f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)!=null?g:0,i=Kt(e,t==null?void 0:t.in),s=i.getDay(),o=(s<r?7:0)+s-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function eu(e,t){return oa(e,{...t,weekStartsOn:1})}function v2(e,t){const n=Kt(e,t==null?void 0:t.in),r=n.getFullYear(),i=cn(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const s=eu(i),o=cn(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const a=eu(o);return n.getTime()>=s.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function ng(e){const t=Kt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function qu(e,...t){const n=cn.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function tu(e,t){const n=Kt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function U_(e,t,n){const[r,i]=qu(n==null?void 0:n.in,e,t),s=tu(r),o=tu(i),a=+s-ng(s),l=+o-ng(o);return Math.round((a-l)/z_)}function G_(e,t){const n=v2(e,t),r=cn(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),eu(r)}function K_(e){return cn(e,Date.now())}function V_(e,t,n){const[r,i]=qu(n==null?void 0:n.in,e,t);return+tu(r)==+tu(i)}function W_(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Q_(e){return!(!W_(e)&&typeof e!="number"||isNaN(+Kt(e)))}function Y_(e,t){const n=Kt(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function X_(e,t){const[n,r]=qu(e,t.start,t.end);return{start:n,end:r}}function Z_(e,t){const{start:n,end:r}=X_(t==null?void 0:t.in,e);let i=+n>+r;const s=i?+n:+r,o=i?r:n;o.setHours(0,0,0,0);let a=1;const l=[];for(;+o<=s;)l.push(cn(n,o)),o.setDate(o.getDate()+a),o.setHours(0,0,0,0);return i?l.reverse():l}function J_(e,t){const n=Kt(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function e8(e,t){const n=Kt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const t8={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},n8=(e,t,n)=>{let r;const i=t8[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Oc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const r8={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},i8={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},s8={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},o8={date:Oc({formats:r8,defaultWidth:"full"}),time:Oc({formats:i8,defaultWidth:"full"}),dateTime:Oc({formats:s8,defaultWidth:"full"})},a8={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},l8=(e,t,n,r)=>a8[e];function mo(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{const o=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[a]||e.values[o]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}const u8={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},c8={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},d8={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},f8={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},h8={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},g8={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},y8=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},m8={ordinalNumber:y8,era:mo({values:u8,defaultWidth:"wide"}),quarter:mo({values:c8,defaultWidth:"wide",argumentCallback:e=>e-1}),month:mo({values:d8,defaultWidth:"wide"}),day:mo({values:f8,defaultWidth:"wide"}),dayPeriod:mo({values:h8,defaultWidth:"wide",formattingValues:g8,defaultFormattingWidth:"wide"})};function po(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const o=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?v8(a,d=>d.test(o)):p8(a,d=>d.test(o));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(o.length);return{value:u,rest:c}}}function p8(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function v8(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function b8(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let o=e.valueCallback?e.valueCallback(s[0]):s[0];o=n.valueCallback?n.valueCallback(o):o;const a=t.slice(i.length);return{value:o,rest:a}}}const x8=/^(\d+)(th|st|nd|rd)?/i,w8=/\d+/i,S8={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},C8={any:[/^b/i,/^(a|c)/i]},_8={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},k8={any:[/1/i,/2/i,/3/i,/4/i]},O8={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},E8={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},A8={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},P8={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},T8={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},M8={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},j8={ordinalNumber:b8({matchPattern:x8,parsePattern:w8,valueCallback:e=>parseInt(e,10)}),era:po({matchPatterns:S8,defaultMatchWidth:"wide",parsePatterns:C8,defaultParseWidth:"any"}),quarter:po({matchPatterns:_8,defaultMatchWidth:"wide",parsePatterns:k8,defaultParseWidth:"any",valueCallback:e=>e+1}),month:po({matchPatterns:O8,defaultMatchWidth:"wide",parsePatterns:E8,defaultParseWidth:"any"}),day:po({matchPatterns:A8,defaultMatchWidth:"wide",parsePatterns:P8,defaultParseWidth:"any"}),dayPeriod:po({matchPatterns:T8,defaultMatchWidth:"any",parsePatterns:M8,defaultParseWidth:"any"})},$8={code:"en-US",formatDistance:n8,formatLong:o8,formatRelative:l8,localize:m8,match:j8,options:{weekStartsOn:0,firstWeekContainsDate:1}};function D8(e,t){const n=Kt(e,t==null?void 0:t.in);return U_(n,e8(n))+1}function L8(e,t){const n=Kt(e,t==null?void 0:t.in),r=+eu(n)-+G_(n);return Math.round(r/m2)+1}function b2(e,t){var c,d,f,h,g,m,p,v;const n=Kt(e,t==null?void 0:t.in),r=n.getFullYear(),i=Bu(),s=(v=(p=(h=(f=t==null?void 0:t.firstWeekContainsDate)!=null?f:(d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)!=null?h:i.firstWeekContainsDate)!=null?p:(m=(g=i.locale)==null?void 0:g.options)==null?void 0:m.firstWeekContainsDate)!=null?v:1,o=cn((t==null?void 0:t.in)||e,0);o.setFullYear(r+1,0,s),o.setHours(0,0,0,0);const a=oa(o,t),l=cn((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const u=oa(l,t);return+n>=+a?r+1:+n>=+u?r:r-1}function I8(e,t){var a,l,u,c,d,f,h,g;const n=Bu(),r=(g=(h=(c=(u=t==null?void 0:t.firstWeekContainsDate)!=null?u:(l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)!=null?c:n.firstWeekContainsDate)!=null?h:(f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)!=null?g:1,i=b2(e,t),s=cn((t==null?void 0:t.in)||e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),oa(s,t)}function R8(e,t){const n=Kt(e,t==null?void 0:t.in),r=+oa(n,t)-+I8(n,t);return Math.round(r/m2)+1}function We(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Er={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return We(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):We(n+1,2)},d(e,t){return We(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return We(e.getHours()%12||12,t.length)},H(e,t){return We(e.getHours(),t.length)},m(e,t){return We(e.getMinutes(),t.length)},s(e,t){return We(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return We(i,t.length)}},Zi={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},rg={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Er.y(e,t)},Y:function(e,t,n,r){const i=b2(e,r),s=i>0?i:1-i;if(t==="YY"){const o=s%100;return We(o,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):We(s,t.length)},R:function(e,t){const n=v2(e);return We(n,t.length)},u:function(e,t){const n=e.getFullYear();return We(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return We(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return We(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Er.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return We(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=R8(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):We(i,t.length)},I:function(e,t,n){const r=L8(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):We(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Er.d(e,t)},D:function(e,t,n){const r=D8(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):We(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return We(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return We(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return We(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Zi.noon:r===0?i=Zi.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Zi.evening:r>=12?i=Zi.afternoon:r>=4?i=Zi.morning:i=Zi.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Er.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Er.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):We(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):We(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Er.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Er.s(e,t)},S:function(e,t){return Er.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return sg(r);case"XXXX":case"XX":return di(r);case"XXXXX":case"XXX":default:return di(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return sg(r);case"xxxx":case"xx":return di(r);case"xxxxx":case"xxx":default:return di(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ig(r,":");case"OOOO":default:return"GMT"+di(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ig(r,":");case"zzzz":default:return"GMT"+di(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return We(r,t.length)},T:function(e,t,n){return We(+e,t.length)}};function ig(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+We(s,2)}function sg(e,t){return e%60===0?(e>0?"-":"+")+We(Math.abs(e)/60,2):di(e,t)}function di(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=We(Math.trunc(r/60),2),s=We(r%60,2);return n+i+t+s}const og=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},x2=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},N8=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return og(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",og(r,t)).replace("{{time}}",x2(i,t))},F8={p:x2,P:N8},B8=/^D+$/,q8=/^Y+$/,z8=["D","DD","YY","YYYY"];function H8(e){return B8.test(e)}function U8(e){return q8.test(e)}function G8(e,t,n){const r=K8(e,t,n);if(console.warn(r),z8.includes(e))throw new RangeError(r)}function K8(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const V8=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,W8=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Q8=/^'([^]*?)'?$/,Y8=/''/g,X8=/[a-zA-Z]/;function Mo(e,t,n){var c,d,f,h,g,m,p,v,b;const r=Bu(),i=(c=r.locale)!=null?c:$8,s=(g=(h=r.firstWeekContainsDate)!=null?h:(f=(d=r.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)!=null?g:1,o=(b=(v=r.weekStartsOn)!=null?v:(p=(m=r.locale)==null?void 0:m.options)==null?void 0:p.weekStartsOn)!=null?b:0,a=Kt(e,n==null?void 0:n.in);if(!Q_(a))throw new RangeError("Invalid time value");let l=t.match(W8).map(S=>{const C=S[0];if(C==="p"||C==="P"){const x=F8[C];return x(S,i.formatLong)}return S}).join("").match(V8).map(S=>{if(S==="''")return{isToken:!1,value:"'"};const C=S[0];if(C==="'")return{isToken:!1,value:Z8(S)};if(rg[C])return{isToken:!0,value:S};if(C.match(X8))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:S}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const u={firstWeekContainsDate:s,weekStartsOn:o,locale:i};return l.map(S=>{if(!S.isToken)return S.value;const C=S.value;(U8(C)||H8(C))&&G8(C,t,String(e));const x=rg[C[0]];return x(a,C,i.localize,u)}).join("")}function Z8(e){const t=e.match(Q8);return t?t[1].replace(Y8,"'"):e}function ag(e,t,n){const[r,i]=qu(n==null?void 0:n.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function J8(e,t){return V_(cn(e,e),K_(e))}function e7(e,t,n){return p2(e,-1,n)}function aa(e){"@babel/helpers - typeof";return aa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},aa(e)}function Ec(e,t,n){return(t=t7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t7(e){var t=n7(e,"string");return aa(t)=="symbol"?t:t+""}function n7(e,t){if(aa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(aa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lg(e,t){return o7(e)||s7(e,t)||i7(e,t)||r7()}function r7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
48
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i7(e,t){if(e){if(typeof e=="string")return ug(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ug(e,t):void 0}}function ug(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s7(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function o7(e){if(Array.isArray(e))return e}var qn={selected:{background:"yst-bg-primary-500",text:"yst-text-white",hover:"hover:yst-bg-primary-600"},hasAnalysis:{border:"yst-border-2 yst-border-primary-500",text:"yst-text-slate-900",hover:"hover:yst-bg-primary-50"},today:{underline:"yst-border-b-2 yst-border-slate-400"},indicator:{default:"yst-bg-blue-500"}},a7=function(t){var n=t.analyses,r=t.selectedAnalysisId,i=t.onAnalysisSelect,s=t.isLoading,o=s===void 0?!1:s,a=t.isOpen,l=a===void 0?!1:a,u=t.onClose,c=z.useState(new Date),d=lg(c,2),f=d[0],h=d[1],g=function(_){if(!_)return null;var O=_.slice(0,10),E=O.split("-"),T=lg(E,3),j=T[0],B=T[1],R=T[2],A=Number(j),M=Number(B),D=Number(R);return Number.isNaN(A)||Number.isNaN(M)||Number.isNaN(D)||M<1||M>12||D<1||D>31?null:new Date(A,M-1,D)},m=z.useMemo(function(){var w=new Map;return n.forEach(function(_){var O=g(_.createdAt),E=O?Mo(O,"yyyy-MM-dd"):"";E&&(w.has(E)||w.set(E,[]),w.get(E).push(_))}),w},[n]);z.useEffect(function(){if(l&&r){var w=n.find(function(T){return T.id===r});if(w){var _=g(w.createdAt);_&&h(_)}}else if(l&&n.length>0){var O=n.reduce(function(T,j){return new Date(j.createdAt)>new Date(T.createdAt)?j:T}),E=g(O.createdAt);E&&h(E)}},[l,r,n]);var p=z.useMemo(function(){return n.length===0?null:n.reduce(function(w,_){return new Date(_.createdAt)>new Date(w.createdAt)?_:w})},[n]),v=function(){if(p){var _=g(p.createdAt);_&&h(_)}},b=z.useMemo(function(){if(!p)return!1;var w=g(p.createdAt);return w?ag(w,f):!1},[p,f]),S=z.useMemo(function(){var w=J_(f),_=Y_(f),O=new Date(w),E=O.getDay(),T=E===0?6:E-1;O.setDate(O.getDate()-T);var j=new Date(_),B=j.getDay(),R=B===0?0:7-B;return j.setDate(j.getDate()+R),Z_({start:O,end:j}).map(function(A){var M=Mo(A,"yyyy-MM-dd"),D=m.get(M)||[],H=D.find(function(Q){return String(Q.id)===String(r)});return{date:M,dateObj:A,isCurrentMonth:ag(A,f),isToday:J8(A),isSelected:!!H,hasAnalyses:D.length>0,analyses:D}})},[f,m,r]),C=function(){h(function(_){return e7(_)})},x=function(){h(function(_){return p2(_,1)})},k=function(_){if(_.hasAnalyses){if(_.analyses.length===1)i(_.analyses[0].id);else{var O=_.analyses.reduce(function(E,T){return new Date(T.createdAt)>new Date(E.createdAt)?T:E});i(O.id)}u==null||u()}};return l?o?y.jsx("div",{className:"yst-absolute yst-left-0 yst-right-0 yst-top-full yst-z-50 yst-mt-1 yst-rounded-md yst-border yst-border-slate-200 yst-bg-white yst-p-4 yst-shadow-lg",children:y.jsxs("div",{className:"yst-animate-pulse yst-space-y-4",children:[y.jsx("div",{className:"yst-h-6 yst-rounded yst-bg-slate-200"}),y.jsx("div",{className:"yst-h-48 yst-rounded yst-bg-slate-200"})]})}):y.jsxs("div",{className:"yst-absolute yst-left-0 yst-right-0 yst-top-full yst-z-50 yst-mt-1 yst-min-w-80 yst-max-w-sm yst-rounded-md yst-border yst-border-slate-200 yst-bg-white yst-p-4 yst-shadow-lg",children:[y.jsxs("div",{className:"yst-mb-6 yst-flex yst-items-center yst-justify-between",children:[y.jsxs("button",{type:"button",onClick:C,className:"yst-rounded-md yst-p-1.5 yst-text-slate-400 hover:yst-bg-slate-100 hover:yst-text-slate-500",children:[y.jsx("span",{className:"yst-sr-only",children:"Previous month"}),y.jsx(L4,{className:"yst-h-5 yst-w-5"})]}),y.jsx("h2",{className:"yst-text-sm yst-font-semibold yst-text-slate-900",children:Mo(f,"MMMM yyyy")}),y.jsxs("button",{type:"button",onClick:x,className:"yst-rounded-md yst-p-1.5 yst-text-slate-400 hover:yst-bg-slate-100 hover:yst-text-slate-500",children:[y.jsx("span",{className:"yst-sr-only",children:"Next month"}),y.jsx(R4,{className:"yst-h-5 yst-w-5"})]})]}),y.jsx("div",{className:"yst-mb-0 yst-grid yst-grid-cols-7 yst-gap-x-1",children:["M","T","W","T","F","S","S"].map(function(w,_){return y.jsx("div",{className:"yst-py-2 yst-text-center yst-text-xs yst-font-medium yst-text-slate-500",children:w},"".concat(w,"-").concat(_))})}),y.jsx("div",{className:"yst-grid yst-grid-cols-7 yst-gap-x-1",children:S.map(function(w){return y.jsx("div",{className:"yst-flex yst-items-center yst-justify-center yst-py-1",children:y.jsxs("button",{type:"button",onClick:function(){return k(w)},disabled:!w.hasAnalyses,className:Oe("yst-relative yst-rounded-full yst-text-sm yst-transition-colors","yst-flex yst-h-10 yst-w-10 yst-items-center yst-justify-center","yst-p-0",{"yst-text-slate-900":w.isCurrentMonth,"yst-text-slate-400":!w.isCurrentMonth},{"focus:yst-outline-none focus:yst-ring-2 focus:yst-ring-blue-500":w.hasAnalyses,"yst-cursor-not-allowed":!w.hasAnalyses,"yst-cursor-pointer":w.hasAnalyses},Ec({},"".concat(qn.selected.background," ").concat(qn.selected.text," ").concat(qn.selected.hover),w.isSelected),Ec({},"".concat(qn.hasAnalysis.border," ").concat(qn.hasAnalysis.text," ").concat(qn.hasAnalysis.hover),w.hasAnalyses&&!w.isSelected)),children:[y.jsx("span",{className:Oe("yst-relative yst-z-10 yst-w-4",Ec({},qn.today.underline,w.isToday&&!w.isSelected)),children:Mo(w.dateObj,"d")}),w.hasAnalyses&&w.analyses.length>1&&!w.isSelected&&y.jsx("span",{className:Oe("yst-absolute yst-right-1 yst-top-1 yst-h-2 yst-w-2 yst-rounded-full",qn.indicator.default)})]})},w.date)})}),y.jsxs("div",{className:"yst-mt-4 yst-flex yst-items-center yst-gap-4 yst-text-xs yst-text-slate-600",children:[y.jsxs("div",{className:"yst-flex yst-items-center yst-gap-1",children:[y.jsx("div",{className:"yst-h-3 yst-w-3 yst-rounded-full ".concat(qn.hasAnalysis.border)}),y.jsx("span",{children:"Has analysis"})]}),y.jsxs("div",{className:"yst-flex yst-items-center yst-gap-1",children:[y.jsx("div",{className:"yst-h-3 yst-w-3 yst-rounded-full ".concat(qn.selected.background)}),y.jsx("span",{children:"Selected"})]}),y.jsxs("div",{className:"yst-flex yst-items-center yst-gap-1",children:[y.jsx("div",{className:"yst-h-0.5 yst-w-4 yst-bg-slate-400"}),y.jsx("span",{children:"Today"})]})]}),p&&y.jsx("div",{className:"yst-mt-6",children:y.jsx(P.Button,{onClick:v,className:"yst-w-full",disabled:b,children:"Show latest analysis"})})]}):null};function Ac(e,t){return d7(e)||c7(e,t)||u7(e,t)||l7()}function l7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
49
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u7(e,t){if(e){if(typeof e=="string")return cg(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cg(e,t):void 0}}function cg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c7(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function d7(e){if(Array.isArray(e))return e}var f7=function(t){var n=t.analyses,r=t.selectedAnalysisId,i=t.onAnalysisSelect,s=t.isLoading,o=s===void 0?!1:s,a=t.disabled,l=a===void 0?!1:a,u=t.id,c=u===void 0?"analysis-date-select":u,d=z.useState(!1),f=Ac(d,2),h=f[0],g=f[1],m=z.useState("latest"),p=Ac(m,2),v=p[0],b=p[1],S=z.useRef(null),C=function(A){if(!A)return null;var M=A.slice(0,10),D=M.split("-"),H=Ac(D,3),Q=H[0],F=H[1],G=H[2],ie=Number(Q),ae=Number(F),N=Number(G);return Number.isNaN(ie)||Number.isNaN(ae)||Number.isNaN(N)||ae<1||ae>12||N<1||N>31?null:new Date(ie,ae-1,N)},x=function(A){var M=C(A.createdAt);return M?M.getTime():-1/0};z.useEffect(function(){if((r==="latest"||!r)&&n.length>0&&!o){var R=n.reduce(function(A,M){return x(M)>x(A)?M:A});i(R.id)}},[n,r,i,o]);var k=z.useMemo(function(){if(r==="latest"||!r){if(n.length>0){var R=n.reduce(function(A,M){return x(M)>x(A)?M:A});return R.id}return"latest"}return r},[r,n,x]);z.useEffect(function(){b(k)},[k]);var w=n.find(function(R){return String(R.id)===String(v)}),_=n.length>0?String(n.reduce(function(R,A){return x(A)>x(R)?A:R}).id):"",O=function(){if(w){var R=C(w.createdAt),A=R?Mo(R,"MMMM d, yyyy"):w.createdAt?w.createdAt.slice(0,10):"Unknown date",M=String(w.id)===_?"(latest)":"(older)";return"".concat(A," ").concat(M)}return n.length>0?"Select date...":"No analyses available"}();z.useEffect(function(){var R=function(M){S.current&&!S.current.contains(M.target)&&g(!1)};return h&&document.addEventListener("mousedown",R),function(){document.removeEventListener("mousedown",R)}},[h]);var E=function(){!l&&!o&&g(!h)},T=function(A){b(A),i(A),g(!1)},j=function(){g(!1)},B=function(A){A.key==="Enter"||A.key===" "?(A.preventDefault(),E()):A.key==="Escape"&&g(!1)};return y.jsxs("div",{ref:S,className:"yst-relative",children:[y.jsxs("div",{className:"yst-relative",children:[y.jsx(P.TextInput,{id:c,onClick:E,onKeyDown:B,onChange:function(){},disabled:l||o,value:O,"aria-expanded":h,"aria-haspopup":"true","aria-label":"Select analysis date",className:Oe("yst-pr-10",{"yst-cursor-default":!l&&!o})}),y.jsx(M4,{className:Oe("yst-pointer-events-none yst-absolute yst-right-3 yst-top-1/2 yst--translate-y-1/2 yst-transform",{"yst-text-gray-400":l||o})})]}),y.jsx(a7,{analyses:n,selectedAnalysisId:v,onAnalysisSelect:T,isLoading:o,isOpen:h,onClose:j})]})};function w2(e){if(e!=null){if(typeof e=="number"){var t=1e12;return e>t?e-Date.now():e}var n=Date.parse(e);if(!Number.isNaN(n))return n-Date.now()}}function h7(e,t){var n=w2(e);return n!==void 0&&n>t*60*1e3}var g7=2;function S2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:g7,n=w2(e);return n!==void 0&&n>0&&n<=t*60*1e3}function Dd(e){if(e==null)return"a future date";var t;if(typeof e=="number"){var n=1e12;e>n?t=e:t=Date.now()+e}else{var r=Date.parse(e);Number.isNaN(r)||(t=r)}if(t===void 0)return"a future date";var i=new Date(t),s={month:"long",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0},o=i.toLocaleDateString("en-US",s),a=o.split(" ");if(a.length>=4){var l=a[0],u=a[1].replace(",",""),c=a.slice(2).join(" ");return"".concat(l," ").concat(u," at ").concat(c)}return"".concat(o)}var dg;function fg(e,t){return v7(e)||p7(e,t)||m7(e,t)||y7()}function y7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
50
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m7(e,t){if(e){if(typeof e=="string")return hg(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hg(e,t):void 0}}function hg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p7(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function v7(e){if(Array.isArray(e))return e}function Ld(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,g,m,p){var v=g&&g.prototype instanceof a?g:a,b=Object.create(v.prototype);return Xt(b,"_invoke",function(S,C,x){var k,w,_,O=0,E=x||[],T=!1,j={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(A,M){return k=A,w=0,_=e,j.n=M,o}};function B(R,A){for(w=R,_=A,t=0;!T&&O&&!M&&t<E.length;t++){var M,D=E[t],H=j.p,Q=D[2];R>3?(M=Q===A)&&(_=D[(w=D[4])?5:(w=3,3)],D[4]=D[5]=e):D[0]<=H&&((M=R<2&&H<D[1])?(w=0,j.v=A,j.n=D[1]):H<Q&&(M=R<3||D[0]>A||A>Q)&&(D[4]=R,D[5]=A,j.n=Q,w=0))}if(M||R>1)return o;throw T=!0,A}return function(R,A,M){if(O>1)throw TypeError("Generator is already running");for(T&&A===1&&B(A,M),w=A,_=M;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(j.n=-1),B(w,_)):j.n=_:j.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=j.n<0)?_:S.call(C,j))!==o)break}catch(D){k=e,w=1,_=D}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(Xt(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,Xt(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,Xt(d,"constructor",u),Xt(u,"constructor",l),l.displayName="GeneratorFunction",Xt(u,i,"GeneratorFunction"),Xt(d),Xt(d,i,"Generator"),Xt(d,r,function(){return this}),Xt(d,"toString",function(){return"[object Generator]"}),(Ld=function(){return{w:s,m:f}})()}function Xt(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Xt=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){Xt(o,f,function(g){return this._invoke(f,h,g)})};c("next",0),c("throw",1),c("return",2)}},Xt(e,t,n,r)}function gg(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function b7(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){gg(s,r,i,o,a,"next",l)}function a(l){gg(s,r,i,o,a,"throw",l)}o(void 0)})}}function x7(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Pc=za(dg||(dg=x7(["yst-flex-1 yst-space-y-2"]))),w7=function(t){var n,r,i,s,o=t.className,a=Rn(),l=a.brandId,u=a.analysisId,c=a.model,d=Fa(),f=d.setModel,h=d.setAnalysisId,g=Gt(),m=dn(),p=Ki(),v=p.data,b=Iu({query:{select:function(Je){var Be=Je.data;return Be==null?void 0:Be.data}}}),S=b.data,C=b.isLoading,x=S==null?void 0:S.displayName,k=Gi({query:{select:function(Je){var Be=Je.data;return Be==null?void 0:Be.brands}}}),w=k.data,_=k.isLoading,O=e2(l,{query:{enabled:!!l,select:function(Je){var Be=Je.data;return Be==null?void 0:Be.analyses}}}),E=O.data,T=O.isLoading,j=Du(l,u,{query:{enabled:!!l&&!!u,select:function(Je){var Be=Je.data;return Be}}}),B=j.data,R=j.isLoading,A=Jl(l,{query:{enabled:!!l,select:function(Je){var Be=Je.data;return Be}}}),M=A.data,D=A.isLoading,H=L5({mutation:{onSuccess:function(){var Se=b7(Ld().m(function Be(){var An,Vt;return Ld().w(function(fn){for(;;)switch(fn.n){case 0:return fn.n=1,Promise.all([g.invalidateQueries({queryKey:Pf(l)}),g.invalidateQueries({queryKey:Xl(l,u)}),g.invalidateQueries({queryKey:Tf(l)})]);case 1:An=(E==null?void 0:E.filter(function(Nn){return String(Nn.id)!==String(u)}))||[],An.length>0?(Vt=An.reduce(function(Nn,nr){var Qi=Nn.createdAt?new Date(Nn.createdAt).getTime():0,Or=nr.createdAt?new Date(nr.createdAt).getTime():0;return Or>Qi?nr:Nn}),h(Vt.id),m("/brands/".concat(l,"/analysis/").concat(Vt.id))):(h("latest"),m("/brands/".concat(l))),N(!1);case 2:return fn.a(2)}},Be)}));function Je(){return Se.apply(this,arguments)}return Je}()}}),Q=H.mutate,F=H.isPending;z.useEffect(function(){!D&&!R&&l&&w&&(w==null?void 0:w.length)<2&&(!(M!=null&&M.queries)||Array.isArray(M==null?void 0:M.queries)&&M.queries.length===0)&&(E==null?void 0:E.length)===0&&m("/setup/".concat(l,"/queries"))},[D,R,M,l,m,w,E==null?void 0:E.length]);var G=z.useState(!1),ie=fg(G,2),ae=ie[0],N=ie[1],le=function(){N(!1)},te=w==null?void 0:w.find(function(Se){return String(Se.id)===String(l)}),me=B==null||(n=B.analysis)===null||n===void 0?void 0:n.id,J=l!=null&&typeof me=="number"&&!isNaN(me),Ce=z.useState(!1),ge=fg(Ce,2),ze=ge[0],oe=ge[1];z.useEffect(function(){if(J){var Se="yst_legal_alert_dismissed_".concat(l,"_").concat(me);oe(window.localStorage.getItem(Se)===null)}},[l,me,J]);var He=function(Je){if(Je.preventDefault(),!!J){var Be="yst_legal_alert_dismissed_".concat(l,"_").concat(me);window.localStorage.setItem(Be,"true"),oe(!1)}},lt=function(Je){switch(Je){case"openai":return"OpenAI";case"perplexity":return"Perplexity";case"anthropic":return"Anthropic";default:return Je||"Unknown"}},dt=(B==null||(r=B.analysis)===null||r===void 0||(r=r.scans)===null||r===void 0?void 0:r.map(function(Se){return{value:Se.aiProvider,label:lt(Se.aiProvider)}}))||[{value:"",label:"Default model"}],Ne=E!=null&&E.some(function(Se){return String(Se.id)===String(u)})?u:E&&E.length>0?E[0].id:"latest",Fe=Jl(l,{query:{enabled:!!l,select:function(Je){var Be=Je.data;return Be}}}),Y=Fe.data,Pe=(Y==null?void 0:Y.name)||"your brand",tt=Dd(Y==null?void 0:Y.nextScheduledAnalysis),$e=B==null||(i=B.analysis)===null||i===void 0?void 0:i.status,ue=function(){var Se=y.jsxs("div",{className:"yst-max-w-xl yst-space-y-2",children:[y.jsx("p",{className:"yst-font-medium",children:"Your analysis is scheduled"}),y.jsxs("p",{children:["You've completed the setup for"," ",y.jsx("b",{className:"yst-font-medium",children:Pe}),". The analysis is scheduled to run on"," ",y.jsx("b",{className:"yst-font-medium",children:tt}),". You'll see the results here once it's ready. We'll also notify you by email."]})]});if($e===void 0&&(M==null?void 0:M.setupStatus)==="scheduledFirstAnalysis")return{alertContent:Se,alertVariant:"info"};switch($e){case ci.pending:return{alertContent:Se,alertVariant:"info"};case ci.processing:return{alertContent:y.jsxs(y.Fragment,{children:["You've completed the setup for ",Pe,". The analysis is now processing. You'll see the results here once it's ready. We'll also notify you by email."]}),alertVariant:"info"};case ci.failed:return{alertContent:y.jsx(y.Fragment,{children:"Analysis failed. Try restarting the analysis or contact support if the issue persists."}),alertVariant:"danger"};case ci.cancelled:return{alertContent:y.jsx(y.Fragment,{children:"Analysis was cancelled. You can restart the analysis when ready."}),alertVariant:"warning"};case ci.completed:return{alertContent:null};default:return{alertContent:null,alertVariant:"info"}}}(),W=ue.alertContent,ne=ue.alertVariant,ee=!T&&(M==null?void 0:M.setupStatus)!=="pendingQuerySelection"&&(E==null?void 0:E.length)===0&&(M==null?void 0:M.nextScheduledAnalysis)===null,we=v==null?void 0:v.isUpToDateWithBrandGroups,gt=(v==null?void 0:v.status)===_6.updating&&we===!1;return y.jsxs(y.Fragment,{children:[y.jsx(Fu,{isOpen:ae,onClose:le,onConfirm:function(){l&&u&&Q({brandId:l,analysisId:u})},isLoading:F,title:"Delete analysis?",description:y.jsxs(y.Fragment,{children:[y.jsx("p",{children:"This will permanently delete all data associated with this analysis."}),y.jsx("p",{children:"This action cannot be undone."})]}),confirmText:"Yes, delete analysis",cancelText:"No, go back"}),y.jsx(P.Card,{className:Oe("yst-relative yst-overflow-visible",o),children:y.jsxs(P.Card.Content,{className:"yst-mt-0",children:[y.jsxs("div",{className:"yst-flex yst-flex-1 yst-flex-col yst-flex-wrap yst-items-start yst-justify-between yst-gap-4 md:yst-flex-row xl:yst-items-center",children:[y.jsx("div",{className:"xl:yst-max-w-1/4",children:y.jsxs("div",{className:"yst-flex yst-flex-col xl:yst-flex-row xl:yst-items-baseline xl:yst-gap-2",children:[y.jsx(P.Title,{children:y.jsxs(y.Fragment,{children:[C||!x?y.jsx(P.SkeletonLoader,{className:"yst-inline-block yst-h-8 yst-w-64"}):y.jsxs(y.Fragment,{children:["Hi ",x,", "]})," "]})}),y.jsx("p",{className:"yst-text-sm yst-font-normal yst-text-slate-600",children:"welcome to your brand analysis!"})]})}),y.jsxs("div",{className:"yst-flex yst-flex-row yst-flex-wrap yst-items-center yst-justify-end yst-gap-4 yst-self-end md:yst-self-start",children:[y.jsxs(P.Button,{variant:"primary",className:"yst-gap-1.5",onClick:function(){return m("/setup")},disabled:T||_,children:[y.jsx(a2,{})," Analyze a different brand"]}),y.jsx("div",{className:"yst-relative",children:y.jsxs(P.DropdownMenu,{children:[y.jsx(P.DropdownMenu.IconTrigger,{screenReaderTriggerLabel:"Open brand list options",disabled:T||_||w&&(w==null?void 0:w.length)<1,children:y.jsx(H4,{})}),y.jsx(P.DropdownMenu.List,{className:"yst-absolute yst-right-0 yst-top-full yst-z-40 yst-mt-2 yst-flex yst-w-64 yst-flex-col yst-justify-start",children:y.jsxs(P.DropdownMenu.ButtonItem,{onClick:function(){return N(!0)},disabled:T||_||(B==null||(s=B.analysis)===null||s===void 0?void 0:s.status)!=="completed"||!E||E.length===0,className:"yst-flex yst-justify-start yst-gap-1.5 yst-text-red-600 hover:yst-bg-red-50",children:[y.jsx(Mf,{className:"yst-h-4 yst-w-4"}),"Delete analysis"]})})]})})]})]}),y.jsx(Ha,{}),y.jsxs("form",{className:"yst-flex yst-flex-col yst-items-stretch yst-gap-4 md:yst-flex-row md:yst-items-center",children:[y.jsxs(Pc,{children:[y.jsx(P.Label,{htmlFor:"brand-name",children:"Brand"}),y.jsx(P.Select,{onChange:function(Se){m("/brands/".concat(Se.toString()))},id:"brand-name",value:l?Number(l):"loading",options:w&&w.length>0?w.map(function(Se){return{value:Se.id,label:Se.name}}):[{value:"loading",label:"Loading..."}],disabled:_||!w||w.length<2||!l})]}),y.jsxs(Pc,{children:[y.jsx(P.Label,{htmlFor:"analysis-date",children:"Analysis date"}),y.jsx(f7,{analyses:E||[],selectedAnalysisId:Ne,onAnalysisSelect:function(Se){m("/brands/".concat(l,"/analysis/").concat(String(Se)))},isLoading:T,disabled:T||!E||E.length<1,id:"analysis-date"})]}),y.jsxs(Pc,{children:[y.jsx(P.Label,{htmlFor:"ai-tool",children:"AI model"}),y.jsx(P.Select,{onChange:function(Se){Object.values(C6).includes(Se)?f(Se):console.error("Invalid AI provider selected:",Se)},id:"ai-tool",value:c,options:R||T?[{value:c,label:"Loading..."}]:dt,disabled:R||T||[{}].length<2})]})]})]})}),y.jsxs("div",{className:"ystaii-alerts yst-space-y-4",children:[J&&ze&&y.jsx(P.Alert,{children:y.jsxs("div",{className:"yst-flex yst-w-full",children:[y.jsx("div",{className:"yst-max-w-xl yst-space-y-4",children:y.jsx("p",{className:"yst-mb-0",children:"Note: This content was generated by an AI model (see dropdown above) and may contain errors. Please review before acting on it."})}),y.jsx("div",{className:"yst-ml-auto",children:y.jsx(P.Link,{onClick:He,variant:"default",children:y.jsx(q6,{})})})]})}),$e!==ci.completed&&W&&y.jsx(P.Alert,{className:"md:yst-col-span-2",variant:ne,children:W}),typeof we=="boolean"&&!we&&y.jsxs(P.Alert,{variant:"warning",children:["Note: This scan is not up to date with your current brand groups.",gt?y.jsxs(y.Fragment,{children:[" ","We're updating your sentiment analysis to reflect your new brand groups. This may take a few minutes."]}):y.jsx(y.Fragment,{children:" Newer scans will use your newly selected brand groupings."})]})]}),ee&&y.jsx(P.Alert,{variant:"info",className:"yst-mb-6",children:y.jsx("div",{className:"yst-flex yst-items-start yst-gap-3",children:y.jsxs("div",{className:"yst-flex-1",children:[y.jsx("h3",{className:"yst-mb-2 yst-font-medium yst-text-blue-800",children:"No analyses scheduled"}),y.jsxs("p",{className:"yst-text-bluer-700 yst-mb-0",children:[y.jsx("span",{className:"yst-font-medium yst-text-blue-900",children:te==null?void 0:te.name})," ","has not been analyzed yet, and no analyses are scheduled because this brand is set to inactive in your"," ",y.jsx("span",{className:"yst-cursor-pointer yst-font-medium yst-text-blue-900 yst-underline",onClick:function(){return m("/settings")},role:"button",tabIndex:0,onKeyPress:function(Se){(Se.key==="Enter"||Se.key===" ")&&m("/settings")},children:"Settings"}),"."]})]})})}),te&&y.jsx($_,{brand:te},te.id)]})},S7=function(){var t,n,r,i=Ki(),s=i.data,o=i.isLoading,a=i.isRefetching,l=s==null?void 0:s.mentions;return y.jsx(P.Card,{className:"yst-overflow-visible",children:y.jsxs(P.Card.Content,{className:"yst-space-y-4",children:[y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(qa,{title:"Mentions",tooltip:"The queries where your brand was mentioned."}),y.jsx(Ba,{score:l==null||(t=l.mentionedInNumberOfQueries)===null||t===void 0?void 0:t.value,total:l==null||(n=l.queriesWithMentions)===null||n===void 0?void 0:n.length,suffix:"queries",isLoading:o||a})]}),!o&&l?y.jsx("ul",{children:l==null||(r=l.queriesWithMentions)===null||r===void 0?void 0:r.map(function(u,c){var d=c===0,f=l.queriesWithMentions&&c===l.queriesWithMentions.length-1;return y.jsxs("li",{className:Oe("yst-flex yst-flex-row yst-items-center yst-gap-2 yst-border-l yst-border-r yst-border-slate-300 yst-p-4 yst-font-medium yst-text-slate-800",{"yst-rounded-t-lg yst-border-t":d,"yst-rounded-b-lg yst-border-b":f,"yst-border-b":!f}),children:[y.jsx("div",{className:"yst-h-4 yst-w-4",children:u!=null&&u.mentioned?y.jsx($4,{className:"yst-text-green-500"}):y.jsx(r6,{className:"yst-text-red-500"})}),y.jsx("span",{className:"yst-justify-start",children:u.query}),y.jsx("span",{className:"yst-ml-auto yst-flex yst-items-end",children:u!=null&&u.mentioned?y.jsx(P.Badge,{className:"yst-bg-green-100 yst-text-green-800",children:"Found"}):y.jsx(P.Badge,{className:"yst-bg-red-100 yst-text-red-800",children:"Not found"})})]},u.query)})}):y.jsx(P.SkeletonLoader,{className:"yst-h-56 yst-w-full"})]})})};/*!
|
|
51
51
|
* @kurkle/color v0.3.4
|
|
52
52
|
* https://github.com/kurkle/color#readme
|
|
53
53
|
* (c) 2024 Jukka Kurkela
|
|
54
54
|
* Released under the MIT License
|
|
55
|
-
*/function
|
|
55
|
+
*/function Ua(e){return e+.5|0}const zr=(e,t,n)=>Math.max(Math.min(e,n),t);function jo(e){return zr(Ua(e*2.55),0,255)}function Vr(e){return zr(Ua(e*255),0,255)}function lr(e){return zr(Ua(e/2.55)/100,0,1)}function yg(e){return zr(Ua(e*100),0,100)}const hn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Id=[..."0123456789ABCDEF"],C7=e=>Id[e&15],_7=e=>Id[(e&240)>>4]+Id[e&15],al=e=>(e&240)>>4===(e&15),k7=e=>al(e.r)&&al(e.g)&&al(e.b)&&al(e.a);function O7(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&hn[e[1]]*17,g:255&hn[e[2]]*17,b:255&hn[e[3]]*17,a:t===5?hn[e[4]]*17:255}:(t===7||t===9)&&(n={r:hn[e[1]]<<4|hn[e[2]],g:hn[e[3]]<<4|hn[e[4]],b:hn[e[5]]<<4|hn[e[6]],a:t===9?hn[e[7]]<<4|hn[e[8]]:255})),n}const E7=(e,t)=>e<255?t(e):"";function A7(e){var t=k7(e)?C7:_7;return e?"#"+t(e.r)+t(e.g)+t(e.b)+E7(e.a,t):void 0}const P7=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function C2(e,t,n){const r=t*Math.min(n,1-n),i=(s,o=(s+e/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function T7(e,t,n){const r=(i,s=(i+e/60)%6)=>n-n*t*Math.max(Math.min(s,4-s,1),0);return[r(5),r(3),r(1)]}function M7(e,t,n){const r=C2(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function j7(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function Lf(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=Math.max(n,r,i),o=Math.min(n,r,i),a=(s+o)/2;let l,u,c;return s!==o&&(c=s-o,u=a>.5?c/(2-s-o):c/(s+o),l=j7(n,r,i,c,s),l=l*60+.5),[l|0,u||0,a]}function If(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Vr)}function Rf(e,t,n){return If(C2,e,t,n)}function $7(e,t,n){return If(M7,e,t,n)}function D7(e,t,n){return If(T7,e,t,n)}function _2(e){return(e%360+360)%360}function L7(e){const t=P7.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?jo(+t[5]):Vr(+t[5]));const i=_2(+t[2]),s=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?r=$7(i,s,o):t[1]==="hsv"?r=D7(i,s,o):r=Rf(i,s,o),{r:r[0],g:r[1],b:r[2],a:n}}function I7(e,t){var n=Lf(e);n[0]=_2(n[0]+t),n=Rf(n),e.r=n[0],e.g=n[1],e.b=n[2]}function R7(e){if(!e)return;const t=Lf(e),n=t[0],r=yg(t[1]),i=yg(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${lr(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const mg={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},pg={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function N7(){const e={},t=Object.keys(pg),n=Object.keys(mg);let r,i,s,o,a;for(r=0;r<t.length;r++){for(o=a=t[r],i=0;i<n.length;i++)s=n[i],a=a.replace(s,mg[s]);s=parseInt(pg[o],16),e[a]=[s>>16&255,s>>8&255,s&255]}return e}let ll;function F7(e){ll||(ll=N7(),ll.transparent=[0,0,0,0]);const t=ll[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const B7=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function q7(e){const t=B7.exec(e);let n=255,r,i,s;if(t){if(t[7]!==r){const o=+t[7];n=t[8]?jo(o):zr(o*255,0,255)}return r=+t[1],i=+t[3],s=+t[5],r=255&(t[2]?jo(r):zr(r,0,255)),i=255&(t[4]?jo(i):zr(i,0,255)),s=255&(t[6]?jo(s):zr(s,0,255)),{r,g:i,b:s,a:n}}}function z7(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${lr(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Tc=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Ji=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function H7(e,t,n){const r=Ji(lr(e.r)),i=Ji(lr(e.g)),s=Ji(lr(e.b));return{r:Vr(Tc(r+n*(Ji(lr(t.r))-r))),g:Vr(Tc(i+n*(Ji(lr(t.g))-i))),b:Vr(Tc(s+n*(Ji(lr(t.b))-s))),a:e.a+n*(t.a-e.a)}}function ul(e,t,n){if(e){let r=Lf(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=Rf(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function k2(e,t){return e&&Object.assign(t||{},e)}function vg(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Vr(e[3]))):(t=k2(e,{r:0,g:0,b:0,a:1}),t.a=Vr(t.a)),t}function U7(e){return e.charAt(0)==="r"?q7(e):L7(e)}class la{constructor(t){if(t instanceof la)return t;const n=typeof t;let r;n==="object"?r=vg(t):n==="string"&&(r=O7(t)||F7(t)||U7(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=k2(this._rgb);return t&&(t.a=lr(t.a)),t}set rgb(t){this._rgb=vg(t)}rgbString(){return this._valid?z7(this._rgb):void 0}hexString(){return this._valid?A7(this._rgb):void 0}hslString(){return this._valid?R7(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let s;const o=n===s?.5:n,a=2*o-1,l=r.a-i.a,u=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;s=1-u,r.r=255&u*r.r+s*i.r+.5,r.g=255&u*r.g+s*i.g+.5,r.b=255&u*r.b+s*i.b+.5,r.a=o*r.a+(1-o)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=H7(this._rgb,t._rgb,n)),this}clone(){return new la(this.rgb)}alpha(t){return this._rgb.a=Vr(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Ua(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return ul(this._rgb,2,t),this}darken(t){return ul(this._rgb,2,-t),this}saturate(t){return ul(this._rgb,1,t),this}desaturate(t){return ul(this._rgb,1,-t),this}rotate(t){return I7(this._rgb,t),this}}/*!
|
|
56
56
|
* Chart.js v4.5.0
|
|
57
57
|
* https://www.chartjs.org
|
|
58
58
|
* (c) 2025 Chart.js Contributors
|
|
59
59
|
* Released under the MIT License
|
|
60
|
-
*/function nr(){}const q7=(()=>{let e=0;return()=>e++})();function Xe(e){return e==null}function at(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Be(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function vt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Bn(e,t){return vt(e)?e:t}function Re(e,t){return typeof e=="undefined"?t:e}const z7=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function nt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Ye(e,t,n,r){let i,s,o;if(at(e))for(s=e.length,i=0;i<s;i++)t.call(n,e[i],i);else if(Be(e))for(o=Object.keys(e),s=o.length,i=0;i<s;i++)t.call(n,e[o[i]],o[i])}function Jl(e,t){let n,r,i,s;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],s=t[n],i.datasetIndex!==s.datasetIndex||i.index!==s.index)return!1;return!0}function ec(e){if(at(e))return e.map(ec);if(Be(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=ec(e[n[i]]);return t}return e}function x2(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function H7(e,t,n,r){if(!x2(e))return;const i=t[e],s=n[e];Be(i)&&Be(s)?la(i,s,r):t[e]=ec(s)}function la(e,t,n){const r=at(t)?t:[t],i=r.length;if(!Be(e))return e;n=n||{};const s=n.merger||H7;let o;for(let a=0;a<i;++a){if(o=r[a],!Be(o))continue;const l=Object.keys(o);for(let c=0,u=l.length;c<u;++c)s(l[c],e,o,n)}return e}function qo(e,t){return la(e,t,{merger:U7})}function U7(e,t,n){if(!x2(e))return;const r=t[e],i=n[e];Be(r)&&Be(i)?qo(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=ec(i))}const gg={"":e=>e,x:e=>e.x,y:e=>e.y};function G7(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function K7(e){const t=G7(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function ca(e,t){return(gg[t]||(gg[t]=K7(t)))(e)}function $f(e){return e.charAt(0).toUpperCase()+e.slice(1)}const tc=e=>typeof e!="undefined",Yr=e=>typeof e=="function",yg=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function V7(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const ht=Math.PI,on=2*ht,W7=on+ht,nc=Number.POSITIVE_INFINITY,Q7=ht/180,sn=ht/2,ii=ht/4,mg=ht*2/3,w2=Math.log10,zs=Math.sign;function zo(e,t,n){return Math.abs(e-t)<n}function pg(e){const t=Math.round(e);e=zo(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(w2(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function Y7(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((i,s)=>i-s).pop(),t}function X7(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function ua(e){return!X7(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function Z7(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function J7(e,t,n){let r,i,s;for(r=0,i=e.length;r<i;r++)s=e[r][n],isNaN(s)||(t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))}function zr(e){return e*(ht/180)}function Df(e){return e*(180/ht)}function vg(e){if(!vt(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function e9(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let s=Math.atan2(r,n);return s<-.5*ht&&(s+=on),{angle:s,distance:i}}function Dd(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function t9(e,t){return(e-t+W7)%on-ht}function tn(e){return(e%on+on)%on}function S2(e,t,n,r){const i=tn(e),s=tn(t),o=tn(n),a=tn(s-i),l=tn(o-i),c=tn(i-s),u=tn(i-o);return i===s||i===o||r&&s===o||a>l&&c<u}function pn(e,t,n){return Math.max(t,Math.min(n,e))}function n9(e){return pn(e,-32768,32767)}function os(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Lf(e,t,n){n=n||(o=>e[o]<t);let r=e.length-1,i=0,s;for(;r-i>1;)s=i+r>>1,n(s)?i=s:r=s;return{lo:i,hi:r}}const mi=(e,t,n,r)=>Lf(e,n,r?i=>{const s=e[i][t];return s<n||s===n&&e[i+1][t]===n}:i=>e[i][t]<n),r9=(e,t,n)=>Lf(e,n,r=>e[r][t]>=n);function i9(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}const C2=["push","pop","shift","splice","unshift"];function s9(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),C2.forEach(n=>{const r="_onData"+$f(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...s){const o=i.apply(this,s);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...s)}),o}})})}function bg(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(C2.forEach(s=>{delete e[s]}),delete e._chartjs)}function o9(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const _2=function(){return typeof window=="undefined"?function(e){return e()}:window.requestAnimationFrame}();function k2(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,_2.call(window,()=>{r=!1,e.apply(t,n)}))}}function a9(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const If=e=>e==="start"?"left":e==="end"?"right":"center",kt=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,l9=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function c9(e,t,n){const r=t.length;let i=0,s=r;if(e._sorted){const{iScale:o,vScale:a,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=o.axis,{min:d,max:f,minDefined:h,maxDefined:g}=o.getUserBounds();if(h){if(i=Math.min(mi(l,u,d).lo,n?r:mi(t,u,o.getPixelForValue(d)).lo),c){const m=l.slice(0,i+1).reverse().findIndex(p=>!Xe(p[a.axis]));i-=Math.max(0,m)}i=pn(i,0,r-1)}if(g){let m=Math.max(mi(l,o.axis,f,!0).hi+1,n?0:mi(t,u,o.getPixelForValue(f),!0).hi+1);if(c){const p=l.slice(m-1).findIndex(v=>!Xe(v[a.axis]));m+=Math.max(0,p)}s=pn(m,i,r)-i}else s=r-i}return{start:i,count:s}}function u9(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const s=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),s}const cl=e=>e===0||e===1,xg=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*on/n)),wg=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*on/n)+1,Ho={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*sn)+1,easeOutSine:e=>Math.sin(e*sn),easeInOutSine:e=>-.5*(Math.cos(ht*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>cl(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>cl(e)?e:xg(e,.075,.3),easeOutElastic:e=>cl(e)?e:wg(e,.075,.3),easeInOutElastic(e){return cl(e)?e:e<.5?.5*xg(e*2,.1125,.45):.5+.5*wg(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Ho.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Ho.easeInBounce(e*2)*.5:Ho.easeOutBounce(e*2-1)*.5+.5};function Rf(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Sg(e){return Rf(e)?e:new aa(e)}function Au(e){return Rf(e)?e:new aa(e).saturate(.5).darken(.1).hexString()}const d9=["x","y","borderWidth","radius","tension"],f9=["color","borderColor","backgroundColor"];function h9(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:f9},numbers:{type:"number",properties:d9}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function g9(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Cg=new Map;function y9(e,t){t=t||{};const n=e+JSON.stringify(t);let r=Cg.get(n);return r||(r=new Intl.NumberFormat(e,t),Cg.set(n,r)),r}function O2(e,t,n){return y9(t,n).format(e)}const m9={values(e){return at(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,s=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),s=p9(e,n)}const o=w2(Math.abs(s)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),O2(e,r,l)}};function p9(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Nf={formatters:m9};function v9(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Nf.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Li=Object.create(null),Ld=Object.create(null);function Uo(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const s=n[r];e=e[s]||(e[s]=Object.create(null))}return e}function Pu(e,t,n){return typeof t=="string"?la(Uo(e,t),n):la(Uo(e,""),t)}class b9{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>Au(i.backgroundColor),this.hoverBorderColor=(r,i)=>Au(i.borderColor),this.hoverColor=(r,i)=>Au(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return Pu(this,t,n)}get(t){return Uo(this,t)}describe(t,n){return Pu(Ld,t,n)}override(t,n){return Pu(Li,t,n)}route(t,n,r,i){const s=Uo(this,t),o=Uo(this,r),a="_"+n;Object.defineProperties(s,{[a]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=o[i];return Be(l)?Object.assign({},c,l):Re(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var dt=new b9({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[h9,g9,v9]);function x9(e){return!e||Xe(e.size)||Xe(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function rc(e,t,n,r,i){let s=t[i];return s||(s=t[i]=e.measureText(i).width,n.push(i)),s>r&&(r=s),r}function w9(e,t,n,r){r=r||{};let i=r.data=r.data||{},s=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},s=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let o=0;const a=n.length;let l,c,u,d,f;for(l=0;l<a;l++)if(d=n[l],d!=null&&!at(d))o=rc(e,i,s,o,d);else if(at(d))for(c=0,u=d.length;c<u;c++)f=d[c],f!=null&&!at(f)&&(o=rc(e,i,s,o,f));e.restore();const h=s.length/2;if(h>n.length){for(l=0;l<h;l++)delete i[s[l]];s.splice(0,h)}return o}function si(e,t,n){const r=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function _g(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function Id(e,t,n,r){E2(e,t,n,r,null)}function E2(e,t,n,r,i){let s,o,a,l,c,u,d,f;const h=t.pointStyle,g=t.rotation,m=t.radius;let p=(g||0)*Q7;if(h&&typeof h=="object"&&(s=h.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(p),e.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),e.restore();return}if(!(isNaN(m)||m<=0)){switch(e.beginPath(),h){default:i?e.ellipse(n,r,i/2,m,0,0,on):e.arc(n,r,m,0,on),e.closePath();break;case"triangle":u=i?i/2:m,e.moveTo(n+Math.sin(p)*u,r-Math.cos(p)*m),p+=mg,e.lineTo(n+Math.sin(p)*u,r-Math.cos(p)*m),p+=mg,e.lineTo(n+Math.sin(p)*u,r-Math.cos(p)*m),e.closePath();break;case"rectRounded":c=m*.516,l=m-c,o=Math.cos(p+ii)*l,d=Math.cos(p+ii)*(i?i/2-c:l),a=Math.sin(p+ii)*l,f=Math.sin(p+ii)*(i?i/2-c:l),e.arc(n-d,r-a,c,p-ht,p-sn),e.arc(n+f,r-o,c,p-sn,p),e.arc(n+d,r+a,c,p,p+sn),e.arc(n-f,r+o,c,p+sn,p+ht),e.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*m,u=i?i/2:l,e.rect(n-u,r-l,2*u,2*l);break}p+=ii;case"rectRot":d=Math.cos(p)*(i?i/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,f=Math.sin(p)*(i?i/2:m),e.moveTo(n-d,r-a),e.lineTo(n+f,r-o),e.lineTo(n+d,r+a),e.lineTo(n-f,r+o),e.closePath();break;case"crossRot":p+=ii;case"cross":d=Math.cos(p)*(i?i/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,f=Math.sin(p)*(i?i/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case"star":d=Math.cos(p)*(i?i/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,f=Math.sin(p)*(i?i/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o),p+=ii,d=Math.cos(p)*(i?i/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,f=Math.sin(p)*(i?i/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case"line":o=i?i/2:Math.cos(p)*m,a=Math.sin(p)*m,e.moveTo(n-o,r-a),e.lineTo(n+o,r+a);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(p)*(i?i/2:m),r+Math.sin(p)*m);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function fr(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Fc(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Bc(e){e.restore()}function S9(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const s=(t.x+n.x)/2;e.lineTo(s,t.y),e.lineTo(s,n.y)}else i==="after"!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function C9(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function _9(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Xe(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function k9(e,t,n,r,i){if(i.strikethrough||i.underline){const s=e.measureText(r),o=t-s.actualBoundingBoxLeft,a=t+s.actualBoundingBoxRight,l=n-s.actualBoundingBoxAscent,c=n+s.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(o,u),e.lineTo(a,u),e.stroke()}}function O9(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Ii(e,t,n,r,i,s={}){const o=at(t)?t:[t],a=s.strokeWidth>0&&s.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,_9(e,s),l=0;l<o.length;++l)c=o[l],s.backdrop&&O9(e,s.backdrop),a&&(s.strokeColor&&(e.strokeStyle=s.strokeColor),Xe(s.strokeWidth)||(e.lineWidth=s.strokeWidth),e.strokeText(c,n,r,s.maxWidth)),e.fillText(c,n,r,s.maxWidth),k9(e,n,r,c,s),r+=Number(i.lineHeight);e.restore()}function ic(e,t){const{x:n,y:r,w:i,h:s,radius:o}=t;e.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*ht,ht,!0),e.lineTo(n,r+s-o.bottomLeft),e.arc(n+o.bottomLeft,r+s-o.bottomLeft,o.bottomLeft,ht,sn,!0),e.lineTo(n+i-o.bottomRight,r+s),e.arc(n+i-o.bottomRight,r+s-o.bottomRight,o.bottomRight,sn,0,!0),e.lineTo(n+i,r+o.topRight),e.arc(n+i-o.topRight,r+o.topRight,o.topRight,0,-sn,!0),e.lineTo(n+o.topLeft,r)}const E9=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,A9=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function P9(e,t){const n=(""+e).match(E9);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const T9=e=>+e||0;function A2(e,t){const n={},r=Be(t),i=r?Object.keys(t):t,s=Be(e)?r?o=>Re(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of i)n[o]=T9(s(o));return n}function M9(e){return A2(e,{top:"y",right:"x",bottom:"y",left:"x"})}function as(e){return A2(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Tt(e){const t=M9(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function yt(e,t){e=e||{},t=t||dt.font;let n=Re(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Re(e.style,t.style);r&&!(""+r).match(A9)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Re(e.family,t.family),lineHeight:P9(Re(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Re(e.weight,t.weight),string:""};return i.string=x9(i),i}function ul(e,t,n,r){let i,s,o;for(i=0,s=e.length;i<s;++i)if(o=e[i],o!==void 0&&o!==void 0)return o}function j9(e,t,n){const{min:r,max:i}=e,s=z7(t,(i-r)/2),o=(a,l)=>n&&a===0?0:a+l;return{min:o(r,-Math.abs(s)),max:o(i,s)}}function ni(e,t){return Object.assign(Object.create(e),t)}function Ff(e,t=[""],n,r,i=()=>e[0]){const s=n||e;typeof r=="undefined"&&(r=j2("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:r,_getTarget:i,override:a=>Ff([a,...e],t,s,r)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return T2(a,l,()=>B9(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return Og(a).includes(l)},ownKeys(a){return Og(a)},set(a,l,c){const u=a._storage||(a._storage=i());return a[l]=u[l]=c,delete a._keys,!0}})}function Hs(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:P2(e,r),setContext:s=>Hs(e,s,n,r),override:s=>Hs(e.override(s),t,n,r)};return new Proxy(i,{deleteProperty(s,o){return delete s[o],delete e[o],!0},get(s,o,a){return T2(s,o,()=>D9(s,o,a))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(s,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(s,o,a){return e[o]=a,delete s[o],!0}})}function P2(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Yr(n)?n:()=>n,isIndexable:Yr(r)?r:()=>r}}const $9=(e,t)=>e?e+$f(t):t,Bf=(e,t)=>Be(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function T2(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function D9(e,t,n){const{_proxy:r,_context:i,_subProxy:s,_descriptors:o}=e;let a=r[t];return Yr(a)&&o.isScriptable(t)&&(a=L9(t,a,e,n)),at(a)&&a.length&&(a=I9(t,a,e,o.isIndexable)),Bf(t,a)&&(a=Hs(a,i,s&&s[t],o)),a}function L9(e,t,n,r){const{_proxy:i,_context:s,_subProxy:o,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(s,o||r);return a.delete(e),Bf(e,l)&&(l=qf(i._scopes,i,e,l)),l}function I9(e,t,n,r){const{_proxy:i,_context:s,_subProxy:o,_descriptors:a}=n;if(typeof s.index!="undefined"&&r(e))return t[s.index%t.length];if(Be(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=qf(c,i,e,u);t.push(Hs(d,s,o&&o[e],a))}}return t}function M2(e,t,n){return Yr(e)?e(t,n):e}const R9=(e,t)=>e===!0?t:typeof e=="string"?ca(t,e):void 0;function N9(e,t,n,r,i){for(const s of t){const o=R9(n,s);if(o){e.add(o);const a=M2(o._fallback,n,i);if(typeof a!="undefined"&&a!==n&&a!==r)return a}else if(o===!1&&typeof r!="undefined"&&n!==r)return null}return!1}function qf(e,t,n,r){const i=t._rootScopes,s=M2(t._fallback,n,r),o=[...e,...i],a=new Set;a.add(r);let l=kg(a,o,n,s||n,r);return l===null||typeof s!="undefined"&&s!==n&&(l=kg(a,o,s,l,r),l===null)?!1:Ff(Array.from(a),[""],i,s,()=>F9(t,n,r))}function kg(e,t,n,r,i){for(;n;)n=N9(e,t,n,r,i);return n}function F9(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return at(i)&&Be(n)?n:i||{}}function B9(e,t,n,r){let i;for(const s of t)if(i=j2($9(s,e),n),typeof i!="undefined")return Bf(e,i)?qf(n,r,e,i):i}function j2(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r!="undefined")return r}}function Og(e){let t=e._keys;return t||(t=e._keys=q9(e._scopes)),t}function q9(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function z9(e,t,n,r){const{iScale:i}=e,{key:s="r"}=this._parsing,o=new Array(r);let a,l,c,u;for(a=0,l=r;a<l;++a)c=a+n,u=t[c],o[a]={r:i.parse(ca(u,s),c)};return o}const H9=Number.EPSILON||1e-14,Us=(e,t)=>t<e.length&&!e[t].skip&&e[t],$2=e=>e==="x"?"y":"x";function U9(e,t,n,r){const i=e.skip?t:e,s=t,o=n.skip?t:n,a=Dd(s,i),l=Dd(o,s);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,f=r*u;return{previous:{x:s.x-d*(o.x-i.x),y:s.y-d*(o.y-i.y)},next:{x:s.x+f*(o.x-i.x),y:s.y+f*(o.y-i.y)}}}function G9(e,t,n){const r=e.length;let i,s,o,a,l,c=Us(e,0);for(let u=0;u<r-1;++u)if(l=c,c=Us(e,u+1),!(!l||!c)){if(zo(t[u],0,H9)){n[u]=n[u+1]=0;continue}i=n[u]/t[u],s=n[u+1]/t[u],a=Math.pow(i,2)+Math.pow(s,2),!(a<=9)&&(o=3/Math.sqrt(a),n[u]=i*o*t[u],n[u+1]=s*o*t[u])}}function K9(e,t,n="x"){const r=$2(n),i=e.length;let s,o,a,l=Us(e,0);for(let c=0;c<i;++c){if(o=a,a=l,l=Us(e,c+1),!a)continue;const u=a[n],d=a[r];o&&(s=(u-o[n])/3,a[`cp1${n}`]=u-s,a[`cp1${r}`]=d-s*t[c]),l&&(s=(l[n]-u)/3,a[`cp2${n}`]=u+s,a[`cp2${r}`]=d+s*t[c])}}function V9(e,t="x"){const n=$2(t),r=e.length,i=Array(r).fill(0),s=Array(r);let o,a,l,c=Us(e,0);for(o=0;o<r;++o)if(a=l,l=c,c=Us(e,o+1),!!l){if(c){const u=c[t]-l[t];i[o]=u!==0?(c[n]-l[n])/u:0}s[o]=a?c?zs(i[o-1])!==zs(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}G9(e,i,s),K9(e,s,t)}function dl(e,t,n){return Math.max(Math.min(e,n),t)}function W9(e,t){let n,r,i,s,o,a=fr(e[0],t);for(n=0,r=e.length;n<r;++n)o=s,s=a,a=n<r-1&&fr(e[n+1],t),s&&(i=e[n],o&&(i.cp1x=dl(i.cp1x,t.left,t.right),i.cp1y=dl(i.cp1y,t.top,t.bottom)),a&&(i.cp2x=dl(i.cp2x,t.left,t.right),i.cp2y=dl(i.cp2y,t.top,t.bottom)))}function Q9(e,t,n,r,i){let s,o,a,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")V9(e,i);else{let c=r?e[e.length-1]:e[0];for(s=0,o=e.length;s<o;++s)a=e[s],l=U9(c,a,e[Math.min(s+1,o-(r?0:1))%o],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&W9(e,n)}function zf(){return typeof window!="undefined"&&typeof document!="undefined"}function Hf(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function sc(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const qc=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function Y9(e,t){return qc(e).getPropertyValue(t)}const X9=["top","right","bottom","left"];function Ti(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=X9[i];r[s]=parseFloat(e[t+"-"+s+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Z9=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function J9(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:s}=r;let o=!1,a,l;if(Z9(i,s,e.target))a=i,l=s;else{const c=t.getBoundingClientRect();a=r.clientX-c.left,l=r.clientY-c.top,o=!0}return{x:a,y:l,box:o}}function ui(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=qc(n),s=i.boxSizing==="border-box",o=Ti(i,"padding"),a=Ti(i,"border","width"),{x:l,y:c,box:u}=J9(e,n),d=o.left+(u&&a.left),f=o.top+(u&&a.top);let{width:h,height:g}=t;return s&&(h-=o.width+a.width,g-=o.height+a.height),{x:Math.round((l-d)/h*n.width/r),y:Math.round((c-f)/g*n.height/r)}}function ek(e,t,n){let r,i;if(t===void 0||n===void 0){const s=e&&Hf(e);if(!s)t=e.clientWidth,n=e.clientHeight;else{const o=s.getBoundingClientRect(),a=qc(s),l=Ti(a,"border","width"),c=Ti(a,"padding");t=o.width-c.width-l.width,n=o.height-c.height-l.height,r=sc(a.maxWidth,s,"clientWidth"),i=sc(a.maxHeight,s,"clientHeight")}}return{width:t,height:n,maxWidth:r||nc,maxHeight:i||nc}}const fl=e=>Math.round(e*10)/10;function tk(e,t,n,r){const i=qc(e),s=Ti(i,"margin"),o=sc(i.maxWidth,e,"clientWidth")||nc,a=sc(i.maxHeight,e,"clientHeight")||nc,l=ek(e,t,n);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const f=Ti(i,"border","width"),h=Ti(i,"padding");c-=h.width+f.width,u-=h.height+f.height}return c=Math.max(0,c-s.width),u=Math.max(0,r?c/r:u-s.height),c=fl(Math.min(c,o,l.maxWidth)),u=fl(Math.min(u,a,l.maxHeight)),c&&!u&&(u=fl(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&u>l.height&&(u=l.height,c=fl(Math.floor(u*r))),{width:c,height:u}}function Eg(e,t,n){const r=t||1,i=Math.floor(e.height*r),s=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==i||o.width!==s?(e.currentDevicePixelRatio=r,o.height=i,o.width=s,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const nk=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};zf()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch(t){}return e}();function Ag(e,t){const n=Y9(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function di(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function rk(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function ik(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},s={x:t.cp1x,y:t.cp1y},o=di(e,i,n),a=di(i,s,n),l=di(s,t,n),c=di(o,a,n),u=di(a,l,n);return di(c,u,n)}const sk=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},ok=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ls(e,t,n){return e?sk(t,n):ok()}function D2(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function L2(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function I2(e){return e==="angle"?{between:S2,compare:t9,normalize:tn}:{between:os,compare:(t,n)=>t-n,normalize:t=>t}}function Pg({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function ak(e,t,n){const{property:r,start:i,end:s}=n,{between:o,normalize:a}=I2(r),l=t.length;let{start:c,end:u,loop:d}=e,f,h;if(d){for(c+=l,u+=l,f=0,h=l;f<h&&o(a(t[c%l][r]),i,s);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function R2(e,t,n){if(!n)return[e];const{property:r,start:i,end:s}=n,o=t.length,{compare:a,between:l,normalize:c}=I2(r),{start:u,end:d,loop:f,style:h}=ak(e,t,n),g=[];let m=!1,p=null,v,b,S;const C=()=>l(i,S,v)&&a(i,S)!==0,x=()=>a(s,v)===0||l(s,S,v),k=()=>m||C(),w=()=>!m||x();for(let _=u,O=u;_<=d;++_)b=t[_%o],!b.skip&&(v=c(b[r]),v!==S&&(m=l(v,i,s),p===null&&k()&&(p=a(v,i)===0?_:O),p!==null&&w()&&(g.push(Pg({start:p,end:_,loop:f,count:o,style:h})),p=null),O=_,S=v));return p!==null&&g.push(Pg({start:p,end:d,loop:f,count:o,style:h})),g}function N2(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const s=R2(r[i],e.points,t);s.length&&n.push(...s)}return n}function lk(e,t,n,r){let i=0,s=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(s+=i);s>i&&e[s%t].skip;)s--;return s%=t,{start:i,end:s}}function ck(e,t,n,r){const i=e.length,s=[];let o=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?a.skip||(r=!1,s.push({start:t%i,end:(l-1)%i,loop:r}),t=o=c.stop?l:null):(o=l,a.skip&&(t=l)),a=c}return o!==null&&s.push({start:t%i,end:o%i,loop:r}),s}function uk(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const s=!!e._loop,{start:o,end:a}=lk(n,i,s,r);if(r===!0)return Tg(e,[{start:o,end:a,loop:s}],n,t);const l=a<o?a+i:a,c=!!e._fullLoop&&o===0&&a===i-1;return Tg(e,ck(n,o,l,c),n,t)}function Tg(e,t,n,r){return!r||!r.setContext||!n?t:dk(e,t,n,r)}function dk(e,t,n,r){const i=e._chart.getContext(),s=Mg(e.options),{_datasetIndex:o,options:{spanGaps:a}}=e,l=n.length,c=[];let u=s,d=t[0].start,f=d;function h(g,m,p,v){const b=a?-1:1;if(g!==m){for(g+=l;n[g%l].skip;)g-=b;for(;n[m%l].skip;)m+=b;g%l!==m%l&&(c.push({start:g%l,end:m%l,loop:p,style:v}),u=v,d=m%l)}}for(const g of t){d=a?d:g.start;let m=n[d%l],p;for(f=d+1;f<=g.end;f++){const v=n[f%l];p=Mg(r.setContext(ni(i,{type:"segment",p0:m,p1:v,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:o}))),fk(p,u)&&h(d,f-1,g.loop,u),m=v,u=p}d<f-1&&h(d,f-1,g.loop,u)}return c}function Mg(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function fk(e,t){if(!t)return!1;const n=[],r=function(i,s){return Rf(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function hl(e,t,n){return e.options.clip?e[n]:t[n]}function hk(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:hl(n,t,"left"),right:hl(n,t,"right"),top:hl(r,t,"top"),bottom:hl(r,t,"bottom")}:t}function F2(e,t){const n=t._clip;if(n.disabled)return!1;const r=hk(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
|
60
|
+
*/function rr(){}const G7=(()=>{let e=0;return()=>e++})();function Ye(e){return e==null}function ot(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Ie(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function bt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function zn(e,t){return bt(e)?e:t}function De(e,t){return typeof e=="undefined"?t:e}const K7=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function et(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Qe(e,t,n,r){let i,s,o;if(ot(e))for(s=e.length,i=0;i<s;i++)t.call(n,e[i],i);else if(Ie(e))for(o=Object.keys(e),s=o.length,i=0;i<s;i++)t.call(n,e[o[i]],o[i])}function nu(e,t){let n,r,i,s;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],s=t[n],i.datasetIndex!==s.datasetIndex||i.index!==s.index)return!1;return!0}function ru(e){if(ot(e))return e.map(ru);if(Ie(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=ru(e[n[i]]);return t}return e}function O2(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function V7(e,t,n,r){if(!O2(e))return;const i=t[e],s=n[e];Ie(i)&&Ie(s)?ua(i,s,r):t[e]=ru(s)}function ua(e,t,n){const r=ot(t)?t:[t],i=r.length;if(!Ie(e))return e;n=n||{};const s=n.merger||V7;let o;for(let a=0;a<i;++a){if(o=r[a],!Ie(o))continue;const l=Object.keys(o);for(let u=0,c=l.length;u<c;++u)s(l[u],e,o,n)}return e}function zo(e,t){return ua(e,t,{merger:W7})}function W7(e,t,n){if(!O2(e))return;const r=t[e],i=n[e];Ie(r)&&Ie(i)?zo(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=ru(i))}const bg={"":e=>e,x:e=>e.x,y:e=>e.y};function Q7(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function Y7(e){const t=Q7(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function ca(e,t){return(bg[t]||(bg[t]=Y7(t)))(e)}function Nf(e){return e.charAt(0).toUpperCase()+e.slice(1)}const iu=e=>typeof e!="undefined",Xr=e=>typeof e=="function",xg=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function X7(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const ht=Math.PI,ln=2*ht,Z7=ln+ht,su=Number.POSITIVE_INFINITY,J7=ht/180,an=ht/2,si=ht/4,wg=ht*2/3,E2=Math.log10,Hs=Math.sign;function Ho(e,t,n){return Math.abs(e-t)<n}function Sg(e){const t=Math.round(e);e=Ho(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(E2(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function e9(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((i,s)=>i-s).pop(),t}function t9(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function da(e){return!t9(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function n9(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function r9(e,t,n){let r,i,s;for(r=0,i=e.length;r<i;r++)s=e[r][n],isNaN(s)||(t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))}function Hr(e){return e*(ht/180)}function Ff(e){return e*(180/ht)}function Cg(e){if(!bt(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function i9(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let s=Math.atan2(r,n);return s<-.5*ht&&(s+=ln),{angle:s,distance:i}}function Rd(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function s9(e,t){return(e-t+Z7)%ln-ht}function rn(e){return(e%ln+ln)%ln}function A2(e,t,n,r){const i=rn(e),s=rn(t),o=rn(n),a=rn(s-i),l=rn(o-i),u=rn(i-s),c=rn(i-o);return i===s||i===o||r&&s===o||a>l&&u<c}function bn(e,t,n){return Math.max(t,Math.min(n,e))}function o9(e){return bn(e,-32768,32767)}function as(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Bf(e,t,n){n=n||(o=>e[o]<t);let r=e.length-1,i=0,s;for(;r-i>1;)s=i+r>>1,n(s)?i=s:r=s;return{lo:i,hi:r}}const vi=(e,t,n,r)=>Bf(e,n,r?i=>{const s=e[i][t];return s<n||s===n&&e[i+1][t]===n}:i=>e[i][t]<n),a9=(e,t,n)=>Bf(e,n,r=>e[r][t]>=n);function l9(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}const P2=["push","pop","shift","splice","unshift"];function u9(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),P2.forEach(n=>{const r="_onData"+Nf(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...s){const o=i.apply(this,s);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...s)}),o}})})}function _g(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(P2.forEach(s=>{delete e[s]}),delete e._chartjs)}function c9(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const T2=function(){return typeof window=="undefined"?function(e){return e()}:window.requestAnimationFrame}();function M2(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,T2.call(window,()=>{r=!1,e.apply(t,n)}))}}function d9(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const qf=e=>e==="start"?"left":e==="end"?"right":"center",Ot=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,f9=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function h9(e,t,n){const r=t.length;let i=0,s=r;if(e._sorted){const{iScale:o,vScale:a,_parsed:l}=e,u=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,c=o.axis,{min:d,max:f,minDefined:h,maxDefined:g}=o.getUserBounds();if(h){if(i=Math.min(vi(l,c,d).lo,n?r:vi(t,c,o.getPixelForValue(d)).lo),u){const m=l.slice(0,i+1).reverse().findIndex(p=>!Ye(p[a.axis]));i-=Math.max(0,m)}i=bn(i,0,r-1)}if(g){let m=Math.max(vi(l,o.axis,f,!0).hi+1,n?0:vi(t,c,o.getPixelForValue(f),!0).hi+1);if(u){const p=l.slice(m-1).findIndex(v=>!Ye(v[a.axis]));m+=Math.max(0,p)}s=bn(m,i,r)-i}else s=r-i}return{start:i,count:s}}function g9(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const s=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),s}const cl=e=>e===0||e===1,kg=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*ln/n)),Og=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*ln/n)+1,Uo={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*an)+1,easeOutSine:e=>Math.sin(e*an),easeInOutSine:e=>-.5*(Math.cos(ht*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>cl(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>cl(e)?e:kg(e,.075,.3),easeOutElastic:e=>cl(e)?e:Og(e,.075,.3),easeInOutElastic(e){return cl(e)?e:e<.5?.5*kg(e*2,.1125,.45):.5+.5*Og(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Uo.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Uo.easeInBounce(e*2)*.5:Uo.easeOutBounce(e*2-1)*.5+.5};function zf(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Eg(e){return zf(e)?e:new la(e)}function Mc(e){return zf(e)?e:new la(e).saturate(.5).darken(.1).hexString()}const y9=["x","y","borderWidth","radius","tension"],m9=["color","borderColor","backgroundColor"];function p9(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:m9},numbers:{type:"number",properties:y9}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function v9(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Ag=new Map;function b9(e,t){t=t||{};const n=e+JSON.stringify(t);let r=Ag.get(n);return r||(r=new Intl.NumberFormat(e,t),Ag.set(n,r)),r}function j2(e,t,n){return b9(t,n).format(e)}const x9={values(e){return ot(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,s=e;if(n.length>1){const u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(i="scientific"),s=w9(e,n)}const o=E2(Math.abs(s)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),j2(e,r,l)}};function w9(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Hf={formatters:x9};function S9(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Hf.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Ri=Object.create(null),Nd=Object.create(null);function Go(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const s=n[r];e=e[s]||(e[s]=Object.create(null))}return e}function jc(e,t,n){return typeof t=="string"?ua(Go(e,t),n):ua(Go(e,""),t)}class C9{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>Mc(i.backgroundColor),this.hoverBorderColor=(r,i)=>Mc(i.borderColor),this.hoverColor=(r,i)=>Mc(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return jc(this,t,n)}get(t){return Go(this,t)}describe(t,n){return jc(Nd,t,n)}override(t,n){return jc(Ri,t,n)}route(t,n,r,i){const s=Go(this,t),o=Go(this,r),a="_"+n;Object.defineProperties(s,{[a]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],u=o[i];return Ie(l)?Object.assign({},u,l):De(l,u)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var ct=new C9({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[p9,v9,S9]);function _9(e){return!e||Ye(e.size)||Ye(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function ou(e,t,n,r,i){let s=t[i];return s||(s=t[i]=e.measureText(i).width,n.push(i)),s>r&&(r=s),r}function k9(e,t,n,r){r=r||{};let i=r.data=r.data||{},s=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},s=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let o=0;const a=n.length;let l,u,c,d,f;for(l=0;l<a;l++)if(d=n[l],d!=null&&!ot(d))o=ou(e,i,s,o,d);else if(ot(d))for(u=0,c=d.length;u<c;u++)f=d[u],f!=null&&!ot(f)&&(o=ou(e,i,s,o,f));e.restore();const h=s.length/2;if(h>n.length){for(l=0;l<h;l++)delete i[s[l]];s.splice(0,h)}return o}function oi(e,t,n){const r=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function Pg(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function Fd(e,t,n,r){$2(e,t,n,r,null)}function $2(e,t,n,r,i){let s,o,a,l,u,c,d,f;const h=t.pointStyle,g=t.rotation,m=t.radius;let p=(g||0)*J7;if(h&&typeof h=="object"&&(s=h.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(p),e.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),e.restore();return}if(!(isNaN(m)||m<=0)){switch(e.beginPath(),h){default:i?e.ellipse(n,r,i/2,m,0,0,ln):e.arc(n,r,m,0,ln),e.closePath();break;case"triangle":c=i?i/2:m,e.moveTo(n+Math.sin(p)*c,r-Math.cos(p)*m),p+=wg,e.lineTo(n+Math.sin(p)*c,r-Math.cos(p)*m),p+=wg,e.lineTo(n+Math.sin(p)*c,r-Math.cos(p)*m),e.closePath();break;case"rectRounded":u=m*.516,l=m-u,o=Math.cos(p+si)*l,d=Math.cos(p+si)*(i?i/2-u:l),a=Math.sin(p+si)*l,f=Math.sin(p+si)*(i?i/2-u:l),e.arc(n-d,r-a,u,p-ht,p-an),e.arc(n+f,r-o,u,p-an,p),e.arc(n+d,r+a,u,p,p+an),e.arc(n-f,r+o,u,p+an,p+ht),e.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*m,c=i?i/2:l,e.rect(n-c,r-l,2*c,2*l);break}p+=si;case"rectRot":d=Math.cos(p)*(i?i/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,f=Math.sin(p)*(i?i/2:m),e.moveTo(n-d,r-a),e.lineTo(n+f,r-o),e.lineTo(n+d,r+a),e.lineTo(n-f,r+o),e.closePath();break;case"crossRot":p+=si;case"cross":d=Math.cos(p)*(i?i/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,f=Math.sin(p)*(i?i/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case"star":d=Math.cos(p)*(i?i/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,f=Math.sin(p)*(i?i/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o),p+=si,d=Math.cos(p)*(i?i/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,f=Math.sin(p)*(i?i/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case"line":o=i?i/2:Math.cos(p)*m,a=Math.sin(p)*m,e.moveTo(n-o,r-a),e.lineTo(n+o,r+a);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(p)*(i?i/2:m),r+Math.sin(p)*m);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function hr(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function zu(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Hu(e){e.restore()}function O9(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const s=(t.x+n.x)/2;e.lineTo(s,t.y),e.lineTo(s,n.y)}else i==="after"!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function E9(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function A9(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Ye(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function P9(e,t,n,r,i){if(i.strikethrough||i.underline){const s=e.measureText(r),o=t-s.actualBoundingBoxLeft,a=t+s.actualBoundingBoxRight,l=n-s.actualBoundingBoxAscent,u=n+s.actualBoundingBoxDescent,c=i.strikethrough?(l+u)/2:u;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(o,c),e.lineTo(a,c),e.stroke()}}function T9(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Ni(e,t,n,r,i,s={}){const o=ot(t)?t:[t],a=s.strokeWidth>0&&s.strokeColor!=="";let l,u;for(e.save(),e.font=i.string,A9(e,s),l=0;l<o.length;++l)u=o[l],s.backdrop&&T9(e,s.backdrop),a&&(s.strokeColor&&(e.strokeStyle=s.strokeColor),Ye(s.strokeWidth)||(e.lineWidth=s.strokeWidth),e.strokeText(u,n,r,s.maxWidth)),e.fillText(u,n,r,s.maxWidth),P9(e,n,r,u,s),r+=Number(i.lineHeight);e.restore()}function au(e,t){const{x:n,y:r,w:i,h:s,radius:o}=t;e.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*ht,ht,!0),e.lineTo(n,r+s-o.bottomLeft),e.arc(n+o.bottomLeft,r+s-o.bottomLeft,o.bottomLeft,ht,an,!0),e.lineTo(n+i-o.bottomRight,r+s),e.arc(n+i-o.bottomRight,r+s-o.bottomRight,o.bottomRight,an,0,!0),e.lineTo(n+i,r+o.topRight),e.arc(n+i-o.topRight,r+o.topRight,o.topRight,0,-an,!0),e.lineTo(n+o.topLeft,r)}const M9=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,j9=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function $9(e,t){const n=(""+e).match(M9);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const D9=e=>+e||0;function D2(e,t){const n={},r=Ie(t),i=r?Object.keys(t):t,s=Ie(e)?r?o=>De(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of i)n[o]=D9(s(o));return n}function L9(e){return D2(e,{top:"y",right:"x",bottom:"y",left:"x"})}function ls(e){return D2(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Mt(e){const t=L9(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function mt(e,t){e=e||{},t=t||ct.font;let n=De(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=De(e.style,t.style);r&&!(""+r).match(j9)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:De(e.family,t.family),lineHeight:$9(De(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:De(e.weight,t.weight),string:""};return i.string=_9(i),i}function dl(e,t,n,r){let i,s,o;for(i=0,s=e.length;i<s;++i)if(o=e[i],o!==void 0&&o!==void 0)return o}function I9(e,t,n){const{min:r,max:i}=e,s=K7(t,(i-r)/2),o=(a,l)=>n&&a===0?0:a+l;return{min:o(r,-Math.abs(s)),max:o(i,s)}}function ri(e,t){return Object.assign(Object.create(e),t)}function Uf(e,t=[""],n,r,i=()=>e[0]){const s=n||e;typeof r=="undefined"&&(r=N2("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:r,_getTarget:i,override:a=>Uf([a,...e],t,s,r)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return I2(a,l,()=>U9(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return Mg(a).includes(l)},ownKeys(a){return Mg(a)},set(a,l,u){const c=a._storage||(a._storage=i());return a[l]=c[l]=u,delete a._keys,!0}})}function Us(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:L2(e,r),setContext:s=>Us(e,s,n,r),override:s=>Us(e.override(s),t,n,r)};return new Proxy(i,{deleteProperty(s,o){return delete s[o],delete e[o],!0},get(s,o,a){return I2(s,o,()=>N9(s,o,a))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(s,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(s,o,a){return e[o]=a,delete s[o],!0}})}function L2(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Xr(n)?n:()=>n,isIndexable:Xr(r)?r:()=>r}}const R9=(e,t)=>e?e+Nf(t):t,Gf=(e,t)=>Ie(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function I2(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function N9(e,t,n){const{_proxy:r,_context:i,_subProxy:s,_descriptors:o}=e;let a=r[t];return Xr(a)&&o.isScriptable(t)&&(a=F9(t,a,e,n)),ot(a)&&a.length&&(a=B9(t,a,e,o.isIndexable)),Gf(t,a)&&(a=Us(a,i,s&&s[t],o)),a}function F9(e,t,n,r){const{_proxy:i,_context:s,_subProxy:o,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(s,o||r);return a.delete(e),Gf(e,l)&&(l=Kf(i._scopes,i,e,l)),l}function B9(e,t,n,r){const{_proxy:i,_context:s,_subProxy:o,_descriptors:a}=n;if(typeof s.index!="undefined"&&r(e))return t[s.index%t.length];if(Ie(t[0])){const l=t,u=i._scopes.filter(c=>c!==l);t=[];for(const c of l){const d=Kf(u,i,e,c);t.push(Us(d,s,o&&o[e],a))}}return t}function R2(e,t,n){return Xr(e)?e(t,n):e}const q9=(e,t)=>e===!0?t:typeof e=="string"?ca(t,e):void 0;function z9(e,t,n,r,i){for(const s of t){const o=q9(n,s);if(o){e.add(o);const a=R2(o._fallback,n,i);if(typeof a!="undefined"&&a!==n&&a!==r)return a}else if(o===!1&&typeof r!="undefined"&&n!==r)return null}return!1}function Kf(e,t,n,r){const i=t._rootScopes,s=R2(t._fallback,n,r),o=[...e,...i],a=new Set;a.add(r);let l=Tg(a,o,n,s||n,r);return l===null||typeof s!="undefined"&&s!==n&&(l=Tg(a,o,s,l,r),l===null)?!1:Uf(Array.from(a),[""],i,s,()=>H9(t,n,r))}function Tg(e,t,n,r,i){for(;n;)n=z9(e,t,n,r,i);return n}function H9(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return ot(i)&&Ie(n)?n:i||{}}function U9(e,t,n,r){let i;for(const s of t)if(i=N2(R9(s,e),n),typeof i!="undefined")return Gf(e,i)?Kf(n,r,e,i):i}function N2(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r!="undefined")return r}}function Mg(e){let t=e._keys;return t||(t=e._keys=G9(e._scopes)),t}function G9(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function K9(e,t,n,r){const{iScale:i}=e,{key:s="r"}=this._parsing,o=new Array(r);let a,l,u,c;for(a=0,l=r;a<l;++a)u=a+n,c=t[u],o[a]={r:i.parse(ca(c,s),u)};return o}const V9=Number.EPSILON||1e-14,Gs=(e,t)=>t<e.length&&!e[t].skip&&e[t],F2=e=>e==="x"?"y":"x";function W9(e,t,n,r){const i=e.skip?t:e,s=t,o=n.skip?t:n,a=Rd(s,i),l=Rd(o,s);let u=a/(a+l),c=l/(a+l);u=isNaN(u)?0:u,c=isNaN(c)?0:c;const d=r*u,f=r*c;return{previous:{x:s.x-d*(o.x-i.x),y:s.y-d*(o.y-i.y)},next:{x:s.x+f*(o.x-i.x),y:s.y+f*(o.y-i.y)}}}function Q9(e,t,n){const r=e.length;let i,s,o,a,l,u=Gs(e,0);for(let c=0;c<r-1;++c)if(l=u,u=Gs(e,c+1),!(!l||!u)){if(Ho(t[c],0,V9)){n[c]=n[c+1]=0;continue}i=n[c]/t[c],s=n[c+1]/t[c],a=Math.pow(i,2)+Math.pow(s,2),!(a<=9)&&(o=3/Math.sqrt(a),n[c]=i*o*t[c],n[c+1]=s*o*t[c])}}function Y9(e,t,n="x"){const r=F2(n),i=e.length;let s,o,a,l=Gs(e,0);for(let u=0;u<i;++u){if(o=a,a=l,l=Gs(e,u+1),!a)continue;const c=a[n],d=a[r];o&&(s=(c-o[n])/3,a[`cp1${n}`]=c-s,a[`cp1${r}`]=d-s*t[u]),l&&(s=(l[n]-c)/3,a[`cp2${n}`]=c+s,a[`cp2${r}`]=d+s*t[u])}}function X9(e,t="x"){const n=F2(t),r=e.length,i=Array(r).fill(0),s=Array(r);let o,a,l,u=Gs(e,0);for(o=0;o<r;++o)if(a=l,l=u,u=Gs(e,o+1),!!l){if(u){const c=u[t]-l[t];i[o]=c!==0?(u[n]-l[n])/c:0}s[o]=a?u?Hs(i[o-1])!==Hs(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}Q9(e,i,s),Y9(e,s,t)}function fl(e,t,n){return Math.max(Math.min(e,n),t)}function Z9(e,t){let n,r,i,s,o,a=hr(e[0],t);for(n=0,r=e.length;n<r;++n)o=s,s=a,a=n<r-1&&hr(e[n+1],t),s&&(i=e[n],o&&(i.cp1x=fl(i.cp1x,t.left,t.right),i.cp1y=fl(i.cp1y,t.top,t.bottom)),a&&(i.cp2x=fl(i.cp2x,t.left,t.right),i.cp2y=fl(i.cp2y,t.top,t.bottom)))}function J9(e,t,n,r,i){let s,o,a,l;if(t.spanGaps&&(e=e.filter(u=>!u.skip)),t.cubicInterpolationMode==="monotone")X9(e,i);else{let u=r?e[e.length-1]:e[0];for(s=0,o=e.length;s<o;++s)a=e[s],l=W9(u,a,e[Math.min(s+1,o-(r?0:1))%o],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,u=a}t.capBezierPoints&&Z9(e,n)}function Vf(){return typeof window!="undefined"&&typeof document!="undefined"}function Wf(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function lu(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const Uu=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function ek(e,t){return Uu(e).getPropertyValue(t)}const tk=["top","right","bottom","left"];function ji(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=tk[i];r[s]=parseFloat(e[t+"-"+s+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const nk=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function rk(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:s}=r;let o=!1,a,l;if(nk(i,s,e.target))a=i,l=s;else{const u=t.getBoundingClientRect();a=r.clientX-u.left,l=r.clientY-u.top,o=!0}return{x:a,y:l,box:o}}function fi(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=Uu(n),s=i.boxSizing==="border-box",o=ji(i,"padding"),a=ji(i,"border","width"),{x:l,y:u,box:c}=rk(e,n),d=o.left+(c&&a.left),f=o.top+(c&&a.top);let{width:h,height:g}=t;return s&&(h-=o.width+a.width,g-=o.height+a.height),{x:Math.round((l-d)/h*n.width/r),y:Math.round((u-f)/g*n.height/r)}}function ik(e,t,n){let r,i;if(t===void 0||n===void 0){const s=e&&Wf(e);if(!s)t=e.clientWidth,n=e.clientHeight;else{const o=s.getBoundingClientRect(),a=Uu(s),l=ji(a,"border","width"),u=ji(a,"padding");t=o.width-u.width-l.width,n=o.height-u.height-l.height,r=lu(a.maxWidth,s,"clientWidth"),i=lu(a.maxHeight,s,"clientHeight")}}return{width:t,height:n,maxWidth:r||su,maxHeight:i||su}}const hl=e=>Math.round(e*10)/10;function sk(e,t,n,r){const i=Uu(e),s=ji(i,"margin"),o=lu(i.maxWidth,e,"clientWidth")||su,a=lu(i.maxHeight,e,"clientHeight")||su,l=ik(e,t,n);let{width:u,height:c}=l;if(i.boxSizing==="content-box"){const f=ji(i,"border","width"),h=ji(i,"padding");u-=h.width+f.width,c-=h.height+f.height}return u=Math.max(0,u-s.width),c=Math.max(0,r?u/r:c-s.height),u=hl(Math.min(u,o,l.maxWidth)),c=hl(Math.min(c,a,l.maxHeight)),u&&!c&&(c=hl(u/2)),(t!==void 0||n!==void 0)&&r&&l.height&&c>l.height&&(c=l.height,u=hl(Math.floor(c*r))),{width:u,height:c}}function jg(e,t,n){const r=t||1,i=Math.floor(e.height*r),s=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==i||o.width!==s?(e.currentDevicePixelRatio=r,o.height=i,o.width=s,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const ok=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Vf()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch(t){}return e}();function $g(e,t){const n=ek(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function hi(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function ak(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function lk(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},s={x:t.cp1x,y:t.cp1y},o=hi(e,i,n),a=hi(i,s,n),l=hi(s,t,n),u=hi(o,a,n),c=hi(a,l,n);return hi(u,c,n)}const uk=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},ck=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function us(e,t,n){return e?uk(t,n):ck()}function B2(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function q2(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function z2(e){return e==="angle"?{between:A2,compare:s9,normalize:rn}:{between:as,compare:(t,n)=>t-n,normalize:t=>t}}function Dg({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function dk(e,t,n){const{property:r,start:i,end:s}=n,{between:o,normalize:a}=z2(r),l=t.length;let{start:u,end:c,loop:d}=e,f,h;if(d){for(u+=l,c+=l,f=0,h=l;f<h&&o(a(t[u%l][r]),i,s);++f)u--,c--;u%=l,c%=l}return c<u&&(c+=l),{start:u,end:c,loop:d,style:e.style}}function H2(e,t,n){if(!n)return[e];const{property:r,start:i,end:s}=n,o=t.length,{compare:a,between:l,normalize:u}=z2(r),{start:c,end:d,loop:f,style:h}=dk(e,t,n),g=[];let m=!1,p=null,v,b,S;const C=()=>l(i,S,v)&&a(i,S)!==0,x=()=>a(s,v)===0||l(s,S,v),k=()=>m||C(),w=()=>!m||x();for(let _=c,O=c;_<=d;++_)b=t[_%o],!b.skip&&(v=u(b[r]),v!==S&&(m=l(v,i,s),p===null&&k()&&(p=a(v,i)===0?_:O),p!==null&&w()&&(g.push(Dg({start:p,end:_,loop:f,count:o,style:h})),p=null),O=_,S=v));return p!==null&&g.push(Dg({start:p,end:d,loop:f,count:o,style:h})),g}function U2(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const s=H2(r[i],e.points,t);s.length&&n.push(...s)}return n}function fk(e,t,n,r){let i=0,s=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(s+=i);s>i&&e[s%t].skip;)s--;return s%=t,{start:i,end:s}}function hk(e,t,n,r){const i=e.length,s=[];let o=t,a=e[t],l;for(l=t+1;l<=n;++l){const u=e[l%i];u.skip||u.stop?a.skip||(r=!1,s.push({start:t%i,end:(l-1)%i,loop:r}),t=o=u.stop?l:null):(o=l,a.skip&&(t=l)),a=u}return o!==null&&s.push({start:t%i,end:o%i,loop:r}),s}function gk(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const s=!!e._loop,{start:o,end:a}=fk(n,i,s,r);if(r===!0)return Lg(e,[{start:o,end:a,loop:s}],n,t);const l=a<o?a+i:a,u=!!e._fullLoop&&o===0&&a===i-1;return Lg(e,hk(n,o,l,u),n,t)}function Lg(e,t,n,r){return!r||!r.setContext||!n?t:yk(e,t,n,r)}function yk(e,t,n,r){const i=e._chart.getContext(),s=Ig(e.options),{_datasetIndex:o,options:{spanGaps:a}}=e,l=n.length,u=[];let c=s,d=t[0].start,f=d;function h(g,m,p,v){const b=a?-1:1;if(g!==m){for(g+=l;n[g%l].skip;)g-=b;for(;n[m%l].skip;)m+=b;g%l!==m%l&&(u.push({start:g%l,end:m%l,loop:p,style:v}),c=v,d=m%l)}}for(const g of t){d=a?d:g.start;let m=n[d%l],p;for(f=d+1;f<=g.end;f++){const v=n[f%l];p=Ig(r.setContext(ri(i,{type:"segment",p0:m,p1:v,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:o}))),mk(p,c)&&h(d,f-1,g.loop,c),m=v,c=p}d<f-1&&h(d,f-1,g.loop,c)}return u}function Ig(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function mk(e,t){if(!t)return!1;const n=[],r=function(i,s){return zf(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function gl(e,t,n){return e.options.clip?e[n]:t[n]}function pk(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:gl(n,t,"left"),right:gl(n,t,"right"),top:gl(r,t,"top"),bottom:gl(r,t,"bottom")}:t}function G2(e,t){const n=t._clip;if(n.disabled)return!1;const r=pk(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
|
61
61
|
* Chart.js v4.5.0
|
|
62
62
|
* https://www.chartjs.org
|
|
63
63
|
* (c) 2025 Chart.js Contributors
|
|
64
64
|
* Released under the MIT License
|
|
65
|
-
*/class gk{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const s=n.listeners[i],o=n.duration;s.forEach(a=>a({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(r-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=_2.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const s=r.items;let o=s.length-1,a=!1,l;for(;o>=0;--o)l=s[o],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(s[o]=s[s.length-1],s.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),s.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=s.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var sr=new gk;const jg="transparent",yk={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=Sg(e||jg),i=r.valid&&Sg(t||jg);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class mk{constructor(t,n,r,i){const s=n[r];i=ul([t.to,i,s,t.from]);const o=ul([t.from,s,i]);this._active=!0,this._fn=t.fn||yk[t.type||typeof o],this._easing=Ho[t.easing]||Ho.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],s=r-this._start,o=this._duration-s;this._start=r,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=ul([t.to,n,i,t.from]),this._from=ul([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,s=this._from,o=this._loop,a=this._to;let l;if(this._active=s!==a&&(o||n<r),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=s;return}l=n/r%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(s,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class B2{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Be(t))return;const n=Object.keys(dt.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const s=t[i];if(!Be(s))return;const o={};for(const a of n)o[a]=s[a];(at(s.properties)&&s.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,o)})})}_animateOptions(t,n){const r=n.options,i=vk(t,r);if(!i)return[];const s=this._createAnimations(i,r);return r.$shared&&pk(t.options.$animations,r).then(()=>{t.options=r},()=>{}),s}_createAnimations(t,n){const r=this._properties,i=[],s=t.$animations||(t.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let d=s[c];const f=r.get(c);if(d)if(f&&d.active()){d.update(f,u,a);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}s[c]=d=new mk(f,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return sr.add(this._chart,r),!0}}function pk(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const s=e[r[i]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function vk(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function $g(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,s=n.max===void 0?t:0;return{start:r?s:i,end:r?i:s}}function bk(e,t,n){if(n===!1)return!1;const r=$g(e,n),i=$g(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function xk(e){let t,n,r,i;return Be(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function q2(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,s;for(i=0,s=r.length;i<s;++i)n.push(r[i].index);return n}function Dg(e,t,n,r={}){const i=e.keys,s=r.mode==="single";let o,a,l,c;if(t===null)return;let u=!1;for(o=0,a=i.length;o<a;++o){if(l=+i[o],l===n){if(u=!0,r.all)continue;break}c=e.values[l],vt(c)&&(s||t===0||zs(t)===zs(c))&&(t+=c)}return!u&&!r.all?0:t}function wk(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",s=r.axis==="x"?"x":"y",o=Object.keys(e),a=new Array(o.length);let l,c,u;for(l=0,c=o.length;l<c;++l)u=o[l],a[l]={[i]:u,[s]:e[u]};return a}function Tu(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Sk(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Ck(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function _k(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Lg(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const s=e[i.index];if(n&&s>0||!n&&s<0)return i.index}return null}function Ig(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:a}=r,l=s.axis,c=o.axis,u=Sk(s,o,r),d=t.length;let f;for(let h=0;h<d;++h){const g=t[h],{[l]:m,[c]:p}=g,v=g._stacks||(g._stacks={});f=v[c]=_k(i,u,m),f[a]=p,f._top=Lg(f,o,!0,r.type),f._bottom=Lg(f,o,!1,r.type);const b=f._visualValues||(f._visualValues={});b[a]=p}}function Mu(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function kk(e,t){return ni(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Ok(e,t,n){return ni(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function po(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const s=i._stacks;if(!s||s[r]===void 0||s[r][n]===void 0)return;delete s[r][n],s[r]._visualValues!==void 0&&s[r]._visualValues[n]!==void 0&&delete s[r]._visualValues[n]}}}const ju=e=>e==="reset"||e==="none",Rg=(e,t)=>t?e:Object.assign({},e),Ek=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:q2(n,!0),values:null};class cs{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Tu(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&po(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,f,h,g)=>d==="x"?f:d==="r"?g:h,s=n.xAxisID=Re(r.xAxisID,Mu(t,"x")),o=n.yAxisID=Re(r.yAxisID,Mu(t,"y")),a=n.rAxisID=Re(r.rAxisID,Mu(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,s,o,a),u=n.vAxisID=i(l,o,s,a);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&bg(this._data,this),t._stacked&&po(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Be(n)){const i=this._cachedMeta;this._data=wk(n,i)}else if(r!==n){if(r){bg(r,this);const i=this._cachedMeta;po(i),i._parsed=[]}n&&Object.isExtensible(n)&&s9(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const s=n._stacked;n._stacked=Tu(n.vScale,n),n.stack!==r.stack&&(i=!0,po(n),n.stack=r.stack),this._resyncElements(t),(i||s!==n._stacked)&&(Ig(this,n._parsed),n._stacked=Tu(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:s,_stacked:o}=r,a=s.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{at(i[t])?f=this.parseArrayData(r,i,t,n):Be(i[t])?f=this.parseObjectData(r,i,t,n):f=this.parsePrimitiveData(r,i,t,n);const h=()=>d[a]===null||c&&d[a]<c[a];for(u=0;u<n;++u)r._parsed[u+t]=d=f[u],l&&(h()&&(l=!1),c=d);r._sorted=l}o&&Ig(this,f)}parsePrimitiveData(t,n,r,i){const{iScale:s,vScale:o}=t,a=s.axis,l=o.axis,c=s.getLabels(),u=s===o,d=new Array(i);let f,h,g;for(f=0,h=i;f<h;++f)g=f+r,d[f]={[a]:u||s.parse(c[g],g),[l]:o.parse(n[g],g)};return d}parseArrayData(t,n,r,i){const{xScale:s,yScale:o}=t,a=new Array(i);let l,c,u,d;for(l=0,c=i;l<c;++l)u=l+r,d=n[u],a[l]={x:s.parse(d[0],u),y:o.parse(d[1],u)};return a}parseObjectData(t,n,r,i){const{xScale:s,yScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,d,f,h;for(u=0,d=i;u<d;++u)f=u+r,h=n[f],c[u]={x:s.parse(ca(h,a),f),y:o.parse(ca(h,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,s=this._cachedMeta,o=n[t.axis],a={keys:q2(i,!0),values:n._stacks[t.axis]._visualValues};return Dg(a,o,s.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const s=r[n.axis];let o=s===null?NaN:s;const a=i&&r._stacks[n.axis];i&&a&&(i.values=a,o=Dg(i,s,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,s=r._sorted&&t===r.iScale,o=i.length,a=this._getOtherScale(t),l=Ek(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=Ck(a);let f,h;function g(){h=i[f];const m=h[a.axis];return!vt(h[t.axis])||u>m||d<m}for(f=0;f<o&&!(!g()&&(this.updateRangeFromParsed(c,t,h,l),s));++f);if(s){for(f=o-1;f>=0;--f)if(!g()){this.updateRangeFromParsed(c,t,h,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,s,o;for(i=0,s=n.length;i<s;++i)o=n[i][t.axis],vt(o)&&r.push(o);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,s=this.getParsed(t);return{label:r?""+r.getLabelForValue(s[r.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=xk(Re(this.options.clip,bk(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],s=n.chartArea,o=[],a=this._drawStart||0,l=this._drawCount||i.length-a,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,s,a,l),u=a;u<a+l;++u){const d=i[u];d.hidden||(d.active&&c?o.push(d):d.draw(t,s))}for(u=0;u<o.length;++u)o[u].draw(t,s)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];s=o.$context||(o.$context=Ok(this.getContext(),t,o)),s.parsed=this.getParsed(t),s.raw=i.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=kk(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=r,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",s=this._cachedDataOpts,o=t+"-"+n,a=s[o],l=this.enableOptionSharing&&tc(r);if(a)return Rg(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),h=Object.keys(dt.elements[t]),g=()=>this.getContext(r,i,n),m=c.resolveNamedOptions(f,h,g,d);return m.$shared&&(m.$shared=l,s[o]=Object.freeze(Rg(m,l))),m}_resolveAnimations(t,n,r){const i=this.chart,s=this._cachedDataOpts,o=`animation-${n}`,a=s[o];if(a)return a;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,r,n))}const c=new B2(i,l&&l.animations);return l&&l._cacheable&&(s[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||ju(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,s=this.getSharedOptions(r),o=this.includeOptions(n,s)||s!==i;return this.updateSharedOptions(s,n,r),{sharedOptions:s,includeOptions:o}}updateElement(t,n,r,i){ju(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!ju(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=r.length,s=n.length,o=Math.min(s,i);o&&this.parse(0,o),s>i?this._insertElements(i,s-i,t):s<i&&this._removeElements(s,i-s)}_insertElements(t,n,r=!0){const i=this._cachedMeta,s=i.data,o=t+n;let a;const l=c=>{for(c.length+=n,a=c.length-1;a>=o;a--)c[a]=c[a-n]};for(l(s),a=t;a<o;++a)s[a]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(s,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&po(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}ve(cs,"defaults",{}),ve(cs,"datasetElementType",null),ve(cs,"dataElementType",null);class $l extends cs{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:s}=n,o=this.chart._animationsDisabled;let{start:a,count:l}=c9(n,i,o);this._drawStart=a,this._drawCount=l,u9(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!o,options:c},t),this.updateElements(i,a,l,t)}updateElements(t,n,r,i){const s=i==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,i),f=o.axis,h=a.axis,{spanGaps:g,segment:m}=this.options,p=ua(g)?g:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||s||i==="none",b=n+r,S=t.length;let C=n>0&&this.getParsed(n-1);for(let x=0;x<S;++x){const k=t[x],w=v?k:{};if(x<n||x>=b){w.skip=!0;continue}const _=this.getParsed(x),O=Xe(_[h]),E=w[f]=o.getPixelForValue(_[f],x),j=w[h]=s||O?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,_,l):_[h],x);w.skip=isNaN(E)||isNaN(j)||O,w.stop=x>0&&Math.abs(_[f]-C[f])>p,m&&(w.parsed=_,w.raw=c.data[x]),d&&(w.options=u||this.resolveDataElementOptions(x,k.active?"active":i)),v||this.updateElement(k,x,w,i),C=_}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const s=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,s,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}ve($l,"id","line"),ve($l,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),ve($l,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Dl extends cs{getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,i){return z9.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],s=n.iScale.getLabels();if(r.points=i,t!=="resize"){const o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===i.length,options:o};this.updateElement(r,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const s=this._cachedMeta.rScale,o=i==="reset";for(let a=n;a<n+r;a++){const l=t[a],c=this.resolveDataElementOptions(a,l.active?"active":i),u=s.getPointPositionForValue(a,this.getParsed(a).r),d=o?s.xCenter:u.x,f=o?s.yCenter:u.y,h={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,a,h,i)}}}ve(Dl,"id","radar"),ve(Dl,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),ve(Dl,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});function oi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Uf{constructor(t){ve(this,"options");this.options=t||{}}static override(t){Object.assign(Uf.prototype,t)}init(){}formats(){return oi()}parse(){return oi()}format(){return oi()}add(){return oi()}diff(){return oi()}startOf(){return oi()}endOf(){return oi()}}var Ak={_date:Uf};function Pk(e,t,n,r){const{controller:i,data:s,_sorted:o}=e,a=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&o&&s.length){const c=a._reversePixels?r9:mi;if(r){if(i._sharedOptions){const u=s[0],d=typeof u.getRange=="function"&&u.getRange(t);if(d){const f=c(s,t,n-d),h=c(s,t,n+d);return{lo:f.lo,hi:h.hi}}}}else{const u=c(s,t,n);if(l){const{vScale:d}=i._cachedMeta,{_parsed:f}=e,h=f.slice(0,u.lo+1).reverse().findIndex(m=>!Xe(m[d.axis]));u.lo-=Math.max(0,h);const g=f.slice(u.hi).findIndex(m=>!Xe(m[d.axis]));u.hi+=Math.max(0,g)}return u}}return{lo:0,hi:s.length-1}}function zc(e,t,n,r,i){const s=e.getSortedVisibleDatasetMetas(),o=n[t];for(let a=0,l=s.length;a<l;++a){const{index:c,data:u}=s[a],{lo:d,hi:f}=Pk(s[a],t,o,i);for(let h=d;h<=f;++h){const g=u[h];g.skip||r(g,c,h)}}}function Tk(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const s=t?Math.abs(r.x-i.x):0,o=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}function $u(e,t,n,r,i){const s=[];return!i&&!e.isPointInArea(t)||zc(e,n,t,function(a,l,c){!i&&!fr(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&s.push({element:a,datasetIndex:l,index:c})},!0),s}function Mk(e,t,n,r){let i=[];function s(o,a,l){const{startAngle:c,endAngle:u}=o.getProps(["startAngle","endAngle"],r),{angle:d}=e9(o,{x:t.x,y:t.y});S2(d,c,u)&&i.push({element:o,datasetIndex:a,index:l})}return zc(e,n,t,s),i}function jk(e,t,n,r,i,s){let o=[];const a=Tk(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const h=u.inRange(t.x,t.y,i);if(r&&!h)return;const g=u.getCenterPoint(i);if(!(!!s||e.isPointInArea(g))&&!h)return;const p=a(t,g);p<l?(o=[{element:u,datasetIndex:d,index:f}],l=p):p===l&&o.push({element:u,datasetIndex:d,index:f})}return zc(e,n,t,c),o}function Du(e,t,n,r,i,s){return!s&&!e.isPointInArea(t)?[]:n==="r"&&!r?Mk(e,t,n,i):jk(e,t,n,r,i,s)}function Ng(e,t,n,r,i){const s=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return zc(e,n,t,(l,c,u)=>{l[o]&&l[o](t[n],i)&&(s.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,i))}),r&&!a?[]:s}var $k={modes:{index(e,t,n,r){const i=ui(t,e),s=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?$u(e,i,s,r,o):Du(e,i,s,!1,r,o),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,r){const i=ui(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?$u(e,i,s,r,o):Du(e,i,s,!1,r,o);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:l,index:u})}return a},point(e,t,n,r){const i=ui(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return $u(e,i,s,r,o)},nearest(e,t,n,r){const i=ui(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return Du(e,i,s,n.intersect,r,o)},x(e,t,n,r){const i=ui(t,e);return Ng(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=ui(t,e);return Ng(e,i,"y",n.intersect,r)}}};const z2=["left","top","right","bottom"];function vo(e,t){return e.filter(n=>n.pos===t)}function Fg(e,t){return e.filter(n=>z2.indexOf(n.pos)===-1&&n.box.axis===t)}function bo(e,t){return e.sort((n,r)=>{const i=t?r:n,s=t?n:r;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function Dk(e){const t=[];let n,r,i,s,o,a;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:s,options:{stack:o,stackWeight:a=1}}=i,t.push({index:n,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&s+o,stackWeight:a});return t}function Lk(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:s}=n;if(!r||!z2.includes(i))continue;const o=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return t}function Ik(e,t){const n=Lk(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let s,o,a;for(s=0,o=e.length;s<o;++s){a=e[s];const{fullSize:l}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*r:l&&t.availableWidth,a.height=i):(a.width=r,a.height=u?u*i:l&&t.availableHeight)}return n}function Rk(e){const t=Dk(e),n=bo(t.filter(c=>c.box.fullSize),!0),r=bo(vo(t,"left"),!0),i=bo(vo(t,"right")),s=bo(vo(t,"top"),!0),o=bo(vo(t,"bottom")),a=Fg(t,"x"),l=Fg(t,"y");return{fullSize:n,leftAndTop:r.concat(s),rightAndBottom:i.concat(l).concat(o).concat(a),chartArea:vo(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:s.concat(o).concat(a)}}function Bg(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function H2(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function Nk(e,t,n,r){const{pos:i,box:s}=n,o=e.maxPadding;if(!Be(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?s.height:s.width),n.size=d.size/d.count,e[i]+=n.size}s.getPadding&&H2(o,s.getPadding());const a=Math.max(0,t.outerWidth-Bg(o,e,"left","right")),l=Math.max(0,t.outerHeight-Bg(o,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function Fk(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function Bk(e,t){const n=t.maxPadding;function r(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{s[o]=Math.max(t[o],n[o])}),s}return r(e?["left","right"]:["top","bottom"])}function jo(e,t,n,r){const i=[];let s,o,a,l,c,u;for(s=0,o=e.length,c=0;s<o;++s){a=e[s],l=a.box,l.update(a.width||t.w,a.height||t.h,Bk(a.horizontal,t));const{same:d,other:f}=Nk(t,n,a,r);c|=d&&i.length,u=u||f,l.fullSize||i.push(a)}return c&&jo(i,t,n,r)||u}function gl(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function qg(e,t,n,r){const i=n.padding;let{x:s,y:o}=t;for(const a of e){const l=a.box,c=r[a.stack]||{placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const d=t.w*u,f=c.size||l.height;tc(c.start)&&(o=c.start),l.fullSize?gl(l,i.left,o,n.outerWidth-i.right-i.left,f):gl(l,t.left+c.placed,o,d,f),c.start=o,c.placed+=d,o=l.bottom}else{const d=t.h*u,f=c.size||l.width;tc(c.start)&&(s=c.start),l.fullSize?gl(l,s,i.top,f,n.outerHeight-i.bottom-i.top):gl(l,s,t.top+c.placed,f,d),c.start=s,c.placed+=d,s=l.right}}t.x=s,t.y=o}var vn={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=Tt(e.options.layout.padding),s=Math.max(t-i.width,0),o=Math.max(n-i.height,0),a=Rk(e.boxes),l=a.vertical,c=a.horizontal;Ye(e.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const u=l.reduce((m,p)=>p.box.options&&p.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/u,hBoxMaxHeight:o/2}),f=Object.assign({},i);H2(f,Tt(r));const h=Object.assign({maxPadding:f,w:s,h:o,x:i.left,y:i.top},i),g=Ik(l.concat(c),d);jo(a.fullSize,h,d,g),jo(l,h,d,g),jo(c,h,d,g)&&jo(l,h,d,g),Fk(h),qg(a.leftAndTop,h,d,g),h.x+=h.w,h.y+=h.h,qg(a.rightAndBottom,h,d,g),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},Ye(a.chartArea,m=>{const p=m.box;Object.assign(p,e.chartArea),p.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class U2{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class qk extends U2{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Ll="$chartjs",zk={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},zg=e=>e===null||e==="";function Hk(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[Ll]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",zg(i)){const s=Ag(e,"width");s!==void 0&&(e.width=s)}if(zg(r))if(e.style.height==="")e.height=e.width/(t||2);else{const s=Ag(e,"height");s!==void 0&&(e.height=s)}return e}const G2=nk?{passive:!0}:!1;function Uk(e,t,n){e&&e.addEventListener(t,n,G2)}function Gk(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,G2)}function Kk(e,t){const n=zk[e.type]||e.type,{x:r,y:i}=ui(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function oc(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Vk(e,t,n){const r=e.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||oc(a.addedNodes,r),o=o&&!oc(a.removedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Wk(e,t,n){const r=e.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||oc(a.removedNodes,r),o=o&&!oc(a.addedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const da=new Map;let Hg=0;function K2(){const e=window.devicePixelRatio;e!==Hg&&(Hg=e,da.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Qk(e,t){da.size||window.addEventListener("resize",K2),da.set(e,t)}function Yk(e){da.delete(e),da.size||window.removeEventListener("resize",K2)}function Xk(e,t,n){const r=e.canvas,i=r&&Hf(r);if(!i)return;const s=k2((a,l)=>{const c=i.clientWidth;n(a,l),c<i.clientWidth&&n()},window),o=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||s(c,u)});return o.observe(i),Qk(e,s),o}function Lu(e,t,n){n&&n.disconnect(),t==="resize"&&Yk(e)}function Zk(e,t,n){const r=e.canvas,i=k2(s=>{e.ctx!==null&&n(Kk(s,e))},e);return Uk(r,t,i),i}class Jk extends U2{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Hk(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Ll])return!1;const r=n[Ll].initial;["height","width"].forEach(s=>{const o=r[s];Xe(o)?n.removeAttribute(s):n.setAttribute(s,o)});const i=r.style||{};return Object.keys(i).forEach(s=>{n.style[s]=i[s]}),n.width=n.width,delete n[Ll],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),o={attach:Vk,detach:Wk,resize:Xk}[n]||Zk;i[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:Lu,detach:Lu,resize:Lu}[n]||Gk)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return tk(t,n,r,i)}isAttached(t){const n=t&&Hf(t);return!!(n&&n.isConnected)}}function eO(e){return!zf()||typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas?qk:Jk}var kl;let Gi=(kl=class{constructor(){ve(this,"x");ve(this,"y");ve(this,"active",!1);ve(this,"options");ve(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return ua(this.x)&&ua(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(s=>{i[s]=r[s]&&r[s].active()?r[s]._to:this[s]}),i}},ve(kl,"defaults",{}),ve(kl,"defaultRoutes"),kl);function tO(e,t){const n=e.options.ticks,r=nO(e),i=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?iO(t):[],o=s.length,a=s[0],l=s[o-1],c=[];if(o>i)return sO(t,c,s,o/i),c;const u=rO(s,t,i);if(o>0){let d,f;const h=o>1?Math.round((l-a)/(o-1)):null;for(yl(t,c,u,Xe(h)?0:a-h,a),d=0,f=o-1;d<f;d++)yl(t,c,u,s[d],s[d+1]);return yl(t,c,u,l,Xe(h)?t.length:l+h),c}return yl(t,c,u),c}function nO(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function rO(e,t,n){const r=oO(e),i=t.length/n;if(!r)return Math.max(i,1);const s=Y7(r);for(let o=0,a=s.length-1;o<a;o++){const l=s[o];if(l>i)return l}return Math.max(i,1)}function iO(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function sO(e,t,n,r){let i=0,s=n[0],o;for(r=Math.ceil(r),o=0;o<e.length;o++)o===s&&(t.push(e[o]),i++,s=n[i*r])}function yl(e,t,n,r,i){const s=Re(r,0),o=Math.min(Re(i,e.length),e.length);let a=0,l,c,u;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),u=s;u<0;)a++,u=Math.round(s+a*n);for(c=Math.max(s,0);c<o;c++)c===u&&(t.push(e[c]),a++,u=Math.round(s+a*n))}function oO(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const aO=e=>e==="left"?"right":e==="right"?"left":e,Ug=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Gg=(e,t)=>Math.min(t||e,e);function Kg(e,t){const n=[],r=e.length/t,i=e.length;let s=0;for(;s<i;s+=r)n.push(e[Math.floor(s)]);return n}function lO(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),s=e._startPixel,o=e._endPixel,a=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(r===1?c=Math.max(l-s,o-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<s-a||l>o+a)))return l}function cO(e,t){Ye(e,n=>{const r=n.gc,i=r.length/2;let s;if(i>t){for(s=0;s<i;++s)delete n.data[r[s]];r.splice(0,i)}})}function xo(e){return e.drawTicks?e.tickLength:0}function Vg(e,t){if(!e.display)return 0;const n=yt(e.font,t),r=Tt(e.padding);return(at(e.text)?e.text.length:1)*n.lineHeight+r.height}function uO(e,t){return ni(e,{scale:t,type:"scale"})}function dO(e,t,n){return ni(e,{tick:n,index:t,type:"tick"})}function fO(e,t,n){let r=If(e);return(n&&t!=="right"||!n&&t==="right")&&(r=aO(r)),r}function hO(e,t,n,r){const{top:i,left:s,bottom:o,right:a,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,f,h,g;const m=o-i,p=a-s;if(e.isHorizontal()){if(h=kt(r,s,a),Be(n)){const v=Object.keys(n)[0],b=n[v];g=u[v].getPixelForValue(b)+m-t}else n==="center"?g=(c.bottom+c.top)/2+m-t:g=Ug(e,n,t);f=a-s}else{if(Be(n)){const v=Object.keys(n)[0],b=n[v];h=u[v].getPixelForValue(b)-p+t}else n==="center"?h=(c.left+c.right)/2-p+t:h=Ug(e,n,t);g=kt(r,o,i),d=n==="left"?-sn:sn}return{titleX:h,titleY:g,maxWidth:f,rotation:d}}class eo extends Gi{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=Bn(t,Number.POSITIVE_INFINITY),n=Bn(n,Number.NEGATIVE_INFINITY),r=Bn(r,Number.POSITIVE_INFINITY),i=Bn(i,Number.NEGATIVE_INFINITY),{min:Bn(t,r),max:Bn(n,i),minDefined:vt(t),maxDefined:vt(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:s}=this.getUserBounds(),o;if(i&&s)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)o=a[l].controller.getMinMax(this,t),i||(n=Math.min(n,o.min)),s||(r=Math.max(r,o.max));return n=s&&n>r?r:n,r=i&&n>r?n:r,{min:Bn(n,Bn(r,n)),max:Bn(r,Bn(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){nt(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:s,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=j9(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Kg(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=tO(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){nt(this.options.afterUpdate,[this])}beforeSetDimensions(){nt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){nt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),nt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){nt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,s;for(r=0,i=t.length;r<i;r++)s=t[r],s.label=nt(n.callback,[s.value,r,t],this)}afterTickToLabelConversion(){nt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){nt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=Gg(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let o=i,a,l,c;if(!this._isVisible()||!n.display||i>=s||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,h=pn(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/r:h/(r-1),d+6>a&&(a=h/(r-(t.offset?.5:1)),l=this.maxHeight-xo(t.grid)-n.padding-Vg(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),o=Df(Math.min(Math.asin(pn((u.highest.height+6)/a,-1,1)),Math.asin(pn(l/c,-1,1))-Math.asin(pn(f/c,-1,1)))),o=Math.max(i,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){nt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){nt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:s}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=Vg(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=xo(s)+l):(t.height=this.maxHeight,t.width=xo(s)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),h=r.padding*2,g=zr(this.labelRotation),m=Math.cos(g),p=Math.sin(g);if(a){const v=r.mirror?0:p*d.width+m*f.height;t.height=Math.min(this.maxHeight,t.height+v+h)}else{const v=r.mirror?0:m*d.width+p*f.height;t.width=Math.min(this.maxWidth,t.width+v+h)}this._calculatePadding(c,u,p,m)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:s,padding:o},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,h=0;l?c?(f=i*t.width,h=r*n.height):(f=r*t.height,h=i*n.width):s==="start"?h=n.width:s==="end"?f=t.width:s!=="inner"&&(f=t.width/2,h=n.width/2),this.paddingLeft=Math.max((f-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((h-d+o)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;s==="start"?(u=0,d=t.height):s==="end"&&(u=n.height,d=0),this.paddingTop=u+o,this.paddingBottom=d+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){nt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)Xe(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=Kg(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:s}=this,o=[],a=[],l=Math.floor(n/Gg(n,r));let c=0,u=0,d,f,h,g,m,p,v,b,S,C,x;for(d=0;d<n;d+=l){if(g=t[d].label,m=this._resolveTickFontOptions(d),i.font=p=m.string,v=s[p]=s[p]||{data:{},gc:[]},b=m.lineHeight,S=C=0,!Xe(g)&&!at(g))S=rc(i,v.data,v.gc,S,g),C=b;else if(at(g))for(f=0,h=g.length;f<h;++f)x=g[f],!Xe(x)&&!at(x)&&(S=rc(i,v.data,v.gc,S,x),C+=b);o.push(S),a.push(C),c=Math.max(S,c),u=Math.max(C,u)}cO(s,n);const k=o.indexOf(c),w=a.indexOf(u),_=O=>({width:o[O]||0,height:a[O]||0});return{first:_(0),last:_(n-1),widest:_(k),highest:_(w),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return n9(this._alignToPixels?si(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=dO(this.getContext(),t,r))}return this.$context||(this.$context=uO(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=zr(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),s=this._getLabelSizes(),o=t.autoSkipPadding||0,a=s?s.widest.width+o:0,l=s?s.highest.height+o:0;return this.isHorizontal()?l*r>a*i?a/r:l/i:l*i<a*r?l/r:a/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:s,position:o,border:a}=i,l=s.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=xo(s),h=[],g=a.setContext(this.getContext()),m=g.display?g.width:0,p=m/2,v=function(T){return si(r,T,m)};let b,S,C,x,k,w,_,O,E,j,$,B;if(o==="top")b=v(this.bottom),w=this.bottom-f,O=b-p,j=v(t.top)+p,B=t.bottom;else if(o==="bottom")b=v(this.top),j=t.top,B=v(t.bottom)-p,w=b+p,O=this.top+f;else if(o==="left")b=v(this.right),k=this.right-f,_=b-p,E=v(t.left)+p,$=t.right;else if(o==="right")b=v(this.left),E=t.left,$=v(t.right)-p,k=b+p,_=this.left+f;else if(n==="x"){if(o==="center")b=v((t.top+t.bottom)/2+.5);else if(Be(o)){const T=Object.keys(o)[0],I=o[T];b=v(this.chart.scales[T].getPixelForValue(I))}j=t.top,B=t.bottom,w=b+p,O=w+f}else if(n==="y"){if(o==="center")b=v((t.left+t.right)/2);else if(Be(o)){const T=Object.keys(o)[0],I=o[T];b=v(this.chart.scales[T].getPixelForValue(I))}k=b-p,_=k-f,E=t.left,$=t.right}const R=Re(i.ticks.maxTicksLimit,d),A=Math.max(1,Math.ceil(d/R));for(S=0;S<d;S+=A){const T=this.getContext(S),I=s.setContext(T),G=a.setContext(T),X=I.lineWidth,F=I.color,W=G.dash||[],ie=G.dashOffset,oe=I.tickWidth,N=I.tickColor,ce=I.tickBorderDash||[],re=I.tickBorderDashOffset;C=lO(this,S,l),C!==void 0&&(x=si(r,C,X),c?k=_=E=$=x:w=O=j=B=x,h.push({tx1:k,ty1:w,tx2:_,ty2:O,x1:E,y1:j,x2:$,y2:B,width:X,color:F,borderDash:W,borderDashOffset:ie,tickWidth:oe,tickColor:N,tickBorderDash:ce,tickBorderDashOffset:re}))}return this._ticksLength=d,this._borderValue=b,h}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:s}=r,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=s,f=xo(r.grid),h=f+u,g=d?-u:h,m=-zr(this.labelRotation),p=[];let v,b,S,C,x,k,w,_,O,E,j,$,B="middle";if(i==="top")k=this.bottom-g,w=this._getXAxisLabelAlignment();else if(i==="bottom")k=this.top+g,w=this._getXAxisLabelAlignment();else if(i==="left"){const A=this._getYAxisLabelAlignment(f);w=A.textAlign,x=A.x}else if(i==="right"){const A=this._getYAxisLabelAlignment(f);w=A.textAlign,x=A.x}else if(n==="x"){if(i==="center")k=(t.top+t.bottom)/2+h;else if(Be(i)){const A=Object.keys(i)[0],T=i[A];k=this.chart.scales[A].getPixelForValue(T)+h}w=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")x=(t.left+t.right)/2-h;else if(Be(i)){const A=Object.keys(i)[0],T=i[A];x=this.chart.scales[A].getPixelForValue(T)}w=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?B="top":l==="end"&&(B="bottom"));const R=this._getLabelSizes();for(v=0,b=a.length;v<b;++v){S=a[v],C=S.label;const A=s.setContext(this.getContext(v));_=this.getPixelForTick(v)+s.labelOffset,O=this._resolveTickFontOptions(v),E=O.lineHeight,j=at(C)?C.length:1;const T=j/2,I=A.color,G=A.textStrokeColor,X=A.textStrokeWidth;let F=w;o?(x=_,w==="inner"&&(v===b-1?F=this.options.reverse?"left":"right":v===0?F=this.options.reverse?"right":"left":F="center"),i==="top"?c==="near"||m!==0?$=-j*E+E/2:c==="center"?$=-R.highest.height/2-T*E+E:$=-R.highest.height+E/2:c==="near"||m!==0?$=E/2:c==="center"?$=R.highest.height/2-T*E:$=R.highest.height-j*E,d&&($*=-1),m!==0&&!A.showLabelBackdrop&&(x+=E/2*Math.sin(m))):(k=_,$=(1-j)*E/2);let W;if(A.showLabelBackdrop){const ie=Tt(A.backdropPadding),oe=R.heights[v],N=R.widths[v];let ce=$-ie.top,re=0-ie.left;switch(B){case"middle":ce-=oe/2;break;case"bottom":ce-=oe;break}switch(w){case"center":re-=N/2;break;case"right":re-=N;break;case"inner":v===b-1?re-=N:v>0&&(re-=N/2);break}W={left:re,top:ce,width:N+ie.width,height:oe+ie.height,color:A.backdropColor}}p.push({label:C,font:O,textOffset:$,options:{rotation:m,color:I,strokeColor:G,strokeWidth:X,textAlign:F,textBaseline:B,translation:[x,k],backdrop:W}})}return p}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-zr(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:s}}=this.options,o=this._getLabelSizes(),a=t+s,l=o.widest.width;let c,u;return n==="left"?i?(u=this.right+s,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+s,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:s,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,s,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(s=>s.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,o;const a=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(s=0,o=i.length;s<o;++s){const l=i[s];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:i}}=this,s=r.setContext(this.getContext()),o=r.display?s.width:0;if(!o)return;const a=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=si(t,this.left,o)-o/2,u=si(t,this.right,a)+a/2,d=f=l):(d=si(t,this.top,o)-o/2,f=si(t,this.bottom,a)+a/2,c=u=l),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&Fc(r,i);const s=this.getLabelItems(t);for(const o of s){const a=o.options,l=o.font,c=o.label,u=o.textOffset;Ii(r,c,0,u,l,a)}i&&Bc(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const s=yt(r.font),o=Tt(r.padding),a=r.align;let l=s.lineHeight/2;n==="bottom"||n==="center"||Be(n)?(l+=o.bottom,at(r.text)&&(l+=s.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=hO(this,l,n,a);Ii(t,r.text,0,0,s,{color:r.color,maxWidth:d,rotation:f,textAlign:fO(a,n,i),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=Re(t.grid&&t.grid.z,-1),i=Re(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==eo.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:r,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let s,o;for(s=0,o=n.length;s<o;++s){const a=n[s];a[r]===this.id&&(!t||a.type===t)&&i.push(a)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return yt(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ml{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;mO(n)&&(r=this.register(n));const i=this.items,s=t.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in i||(i[s]=t,gO(t,o,r),this.override&&dt.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in dt[i]&&(delete dt[i][r],this.override&&delete Li[r])}}function gO(e,t,n){const r=la(Object.create(null),[n?dt.get(n):{},dt.get(t),e.defaults]);dt.set(t,r),e.defaultRoutes&&yO(t,e.defaultRoutes),e.descriptors&&dt.describe(t,e.descriptors)}function yO(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),s=[e].concat(r).join("."),o=t[n].split("."),a=o.pop(),l=o.join(".");dt.route(s,i,l,a)})}function mO(e){return"id"in e&&"defaults"in e}class pO{constructor(){this.controllers=new ml(cs,"datasets",!0),this.elements=new ml(Gi,"elements"),this.plugins=new ml(Object,"plugins"),this.scales=new ml(eo,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const s=r||this._getRegistryForType(i);r||s.isForType(i)||s===this.plugins&&i.id?this._exec(t,s,i):Ye(i,o=>{const a=r||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,r){const i=$f(t);nt(r["before"+i],[],r),n[t](r),nt(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var Hn=new pO;class vO{constructor(){this._init=[]}notify(t,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const s=i?this._descriptors(t).filter(i):this._descriptors(t),o=this._notify(s,t,n,r);return n==="afterDestroy"&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,n,r,i){i=i||{};for(const s of t){const o=s.plugin,a=o[r],l=[n,i,s.options];if(nt(a,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){Xe(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=Re(r.options&&r.options.plugins,{}),s=bO(r);return i===!1&&!n?[]:wO(t,s,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(s,o)=>s.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function bO(e){const t={},n=[],r=Object.keys(Hn.plugins.items);for(let s=0;s<r.length;s++)n.push(Hn.getPlugin(r[s]));const i=e.plugins||[];for(let s=0;s<i.length;s++){const o=i[s];n.indexOf(o)===-1&&(n.push(o),t[o.id]=!0)}return{plugins:n,localIds:t}}function xO(e,t){return!t&&e===!1?null:e===!0?{}:e}function wO(e,{plugins:t,localIds:n},r,i){const s=[],o=e.getContext();for(const a of t){const l=a.id,c=xO(r[l],i);c!==null&&s.push({plugin:a,options:SO(e.config,{plugin:a,local:n[l]},c,o)})}return s}function SO(e,{plugin:t,local:n},r,i){const s=e.pluginScopeKeys(t),o=e.getOptionScopes(r,s);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Rd(e,t){const n=dt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function CO(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function _O(e,t){return e===t?"_index_":"_value_"}function Wg(e){if(e==="x"||e==="y"||e==="r")return e}function kO(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Nd(e,...t){if(Wg(e))return e;for(const n of t){const r=n.axis||kO(n.position)||e.length>1&&Wg(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Qg(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function OO(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return Qg(e,"x",n[0])||Qg(e,"y",n[0])}return{}}function EO(e,t){const n=Li[e.type]||{scales:{}},r=t.scales||{},i=Rd(e.type,t),s=Object.create(null);return Object.keys(r).forEach(o=>{const a=r[o];if(!Be(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=Nd(o,a,OO(o,e),dt.scales[a.type]),c=_O(l,i),u=n.scales||{};s[o]=qo(Object.create(null),[{axis:l},a,u[l],u[c]])}),e.data.datasets.forEach(o=>{const a=o.type||e.type,l=o.indexAxis||Rd(a,t),u=(Li[a]||{}).scales||{};Object.keys(u).forEach(d=>{const f=CO(d,l),h=o[f+"AxisID"]||f;s[h]=s[h]||Object.create(null),qo(s[h],[{axis:f},r[h],u[d]])})}),Object.keys(s).forEach(o=>{const a=s[o];qo(a,[dt.scales[a.type],dt.scale])}),s}function V2(e){const t=e.options||(e.options={});t.plugins=Re(t.plugins,{}),t.scales=EO(e,t)}function W2(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function AO(e){return e=e||{},e.data=W2(e.data),V2(e),e}const Yg=new Map,Q2=new Set;function pl(e,t){let n=Yg.get(e);return n||(n=t(),Yg.set(e,n),Q2.add(n)),n}const wo=(e,t,n)=>{const r=ca(t,n);r!==void 0&&e.add(r)};class PO{constructor(t){this._config=AO(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=W2(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),V2(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return pl(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return pl(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return pl(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return pl(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:s}=this,o=this._cachedScopes(t,r),a=o.get(n);if(a)return a;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>wo(l,t,d))),u.forEach(d=>wo(l,i,d)),u.forEach(d=>wo(l,Li[s]||{},d)),u.forEach(d=>wo(l,dt,d)),u.forEach(d=>wo(l,Ld,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Q2.has(n)&&o.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Li[n]||{},dt.datasets[n]||{},{type:n},dt,Ld]}resolveNamedOptions(t,n,r,i=[""]){const s={$shared:!0},{resolver:o,subPrefixes:a}=Xg(this._resolverCache,t,i);let l=o;if(MO(o,n)){s.$shared=!1,r=Yr(r)?r():r;const c=this.createResolver(t,r,a);l=Hs(o,r,c)}for(const c of n)s[c]=l[c];return s}createResolver(t,n,r=[""],i){const{resolver:s}=Xg(this._resolverCache,t,r);return Be(n)?Hs(s,n,void 0,i):s}}function Xg(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let s=r.get(i);return s||(s={resolver:Ff(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,s)),s}const TO=e=>Be(e)&&Object.getOwnPropertyNames(e).some(t=>Yr(e[t]));function MO(e,t){const{isScriptable:n,isIndexable:r}=P2(e);for(const i of t){const s=n(i),o=r(i),a=(o||s)&&e[i];if(s&&(Yr(a)||TO(a))||o&&at(a))return!0}return!1}var jO="4.5.0";const $O=["top","bottom","left","right","chartArea"];function Zg(e,t){return e==="top"||e==="bottom"||$O.indexOf(e)===-1&&t==="x"}function Jg(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function ey(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),nt(n&&n.onComplete,[e],t)}function DO(e){const t=e.chart,n=t.options.animation;nt(n&&n.onProgress,[e],t)}function Y2(e){return zf()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Il={},ty=e=>{const t=Y2(e);return Object.values(Il).filter(n=>n.canvas===t).pop()};function LO(e,t,n){const r=Object.keys(e);for(const i of r){const s=+i;if(s>=t){const o=e[i];delete e[i],(n>0||s>t)&&(e[s+n]=o)}}}function IO(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}var Pr;let Hc=(Pr=class{static register(...t){Hn.add(...t),ny()}static unregister(...t){Hn.remove(...t),ny()}constructor(t,n){const r=this.config=new PO(n),i=Y2(t),s=ty(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||eO(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,o.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=q7(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new vO,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=a9(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Il[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}sr.listen(this,"complete",ey),sr.listen(this,"progress",DO),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:s}=this;return Xe(t)?n&&s?s:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Hn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Eg(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return _g(this.canvas,this.ctx),this}stop(){return sr.stop(this),this}resize(t,n){sr.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,s=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,t,n,s),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Eg(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),nt(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ye(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((o,a)=>(o[a]=!1,o),{});let s=[];n&&(s=s.concat(Object.keys(n).map(o=>{const a=n[o],l=Nd(o,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Ye(s,o=>{const a=o.options,l=a.id,c=Nd(l,a),u=Re(a.type,o.dtype);(a.position===void 0||Zg(a.position,c)!==Zg(o.dposition))&&(a.position=o.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const f=Hn.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,t)}),Ye(i,(o,a)=>{o||delete r[a]}),Ye(r,o=>{vn.configure(this,o,o.options),vn.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,s)=>i.index-s.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(Jg("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(s=>s===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const s=n[r];let o=this.getDatasetMeta(r);const a=s.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(r),o=this.getDatasetMeta(r)),o.type=a,o.indexAxis=s.indexAxis||Rd(a,this.options),o.order=s.order||0,o.index=r,o.label=""+s.label,o.visible=this.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const l=Hn.getController(a),{datasetElementType:c,dataElementType:u}=dt.datasets[a];Object.assign(l,{dataElementType:Hn.getElement(u),datasetElementType:c&&Hn.getElement(c)}),o.controller=new l(this,r),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){Ye(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!i&&s.indexOf(d)===-1;d.buildOrUpdateElements(f),o=Math.max(+d.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),i||Ye(s,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Jg("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Ye(this.scales,t=>{vn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!yg(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:s}of n){const o=r==="_removeElements"?-s:s;LO(t,i,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=s=>new Set(t.filter(o=>o[0]===s).map((o,a)=>a+","+o.splice(1).join(","))),i=r(0);for(let s=1;s<n;s++)if(!yg(i,r(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;vn.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Ye(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Yr(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(sr.has(this)?this.attached&&!sr.running(this)&&sr.start(this):(this.draw(),ey({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,s;for(i=0,s=n.length;i<s;++i){const o=n[i];(!t||o.visible)&&r.push(o)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r={meta:t,index:t.index,cancelable:!0},i=F2(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&Fc(n,i),t.controller.draw(),i&&Bc(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return fr(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const s=$k.modes[n];return typeof s=="function"?s(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(s=>s&&s._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=ni(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",s=this.getDatasetMeta(t),o=s.controller._resolveAnimations(void 0,i);tc(n)?(s.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),o.update(s,{visible:r}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),sr.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),_g(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Il[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(s,o)=>{n.addEventListener(this,s,o),t[s]=o},i=(s,o,a)=>{s.offsetX=o,s.offsetY=a,this._eventHandler(s)};Ye(this.options.events,s=>r(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},s=(l,c)=>{this.canvas&&this.resize(l,c)};let o;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",s),r("detach",o)};o=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){Ye(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Ye(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let s,o,a,l;for(n==="dataset"&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){o=t[a];const c=o&&this.getDatasetMeta(o.datasetIndex).controller;c&&c[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:s,index:o})=>{const a=this.getDatasetMeta(s);if(!a)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:a.data[o],index:o}});!Jl(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,s=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),o=s(n,t),a=r?t:s(t,n);o.length&&this.updateHoverStyle(o,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const s=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(s||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:s}=this,o=n,a=this._getActiveElements(t,i,r,o),l=V7(t),c=IO(t,this._lastEvent,r,l);r&&(this._lastEvent=null,nt(s.onHover,[t,a,this],this),l&&nt(s.onClick,[t,a,this],this));const u=!Jl(a,i);return(u||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,u}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,i)}},ve(Pr,"defaults",dt),ve(Pr,"instances",Il),ve(Pr,"overrides",Li),ve(Pr,"registry",Hn),ve(Pr,"version",jO),ve(Pr,"getChart",ty),Pr);function ny(){return Ye(Hc.instances,e=>e._plugins.invalidate())}function X2(e,t,n=t){e.lineCap=Re(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Re(n.borderDash,t.borderDash)),e.lineDashOffset=Re(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Re(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Re(n.borderWidth,t.borderWidth),e.strokeStyle=Re(n.borderColor,t.borderColor)}function RO(e,t,n){e.lineTo(n.x,n.y)}function NO(e){return e.stepped?S9:e.tension||e.cubicInterpolationMode==="monotone"?C9:RO}function Z2(e,t,n={}){const r=e.length,{start:i=0,end:s=r-1}=n,{start:o,end:a}=t,l=Math.max(i,o),c=Math.min(s,a),u=i<o&&s<o||i>a&&s>a;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function FO(e,t,n,r){const{points:i,options:s}=t,{count:o,start:a,loop:l,ilen:c}=Z2(i,n,r),u=NO(s);let{move:d=!0,reverse:f}=r||{},h,g,m;for(h=0;h<=c;++h)g=i[(a+(f?c-h:h))%o],!g.skip&&(d?(e.moveTo(g.x,g.y),d=!1):u(e,m,g,f,s.stepped),m=g);return l&&(g=i[(a+(f?c:0))%o],u(e,m,g,f,s.stepped)),!!l}function BO(e,t,n,r){const i=t.points,{count:s,start:o,ilen:a}=Z2(i,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,h,g,m,p,v;const b=C=>(o+(c?a-C:C))%s,S=()=>{m!==p&&(e.lineTo(u,p),e.lineTo(u,m),e.lineTo(u,v))};for(l&&(h=i[b(0)],e.moveTo(h.x,h.y)),f=0;f<=a;++f){if(h=i[b(f)],h.skip)continue;const C=h.x,x=h.y,k=C|0;k===g?(x<m?m=x:x>p&&(p=x),u=(d*u+C)/++d):(S(),e.lineTo(C,x),g=k,d=0,m=p=x),v=x}S()}function Fd(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?BO:FO}function qO(e){return e.stepped?rk:e.tension||e.cubicInterpolationMode==="monotone"?ik:di}function zO(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),X2(e,t.options),e.stroke(i)}function HO(e,t,n,r){const{segments:i,options:s}=t,o=Fd(t);for(const a of i)X2(e,s,a.style),e.beginPath(),o(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const UO=typeof Path2D=="function";function GO(e,t,n,r){UO&&!t.options.segment?zO(e,t,n,r):HO(e,t,n,r)}class Hr extends Gi{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;Q9(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=uk(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],s=this.points,o=N2(this,{property:n,start:i,end:i});if(!o.length)return;const a=[],l=qO(r);let c,u;for(c=0,u=o.length;c<u;++c){const{start:d,end:f}=o[c],h=s[d],g=s[f];if(h===g){a.push(h);continue}const m=Math.abs((i-h[n])/(g[n]-h[n])),p=l(h,g,m,r.stepped);p[n]=t[n],a.push(p)}return a.length===1?a[0]:a}pathSegment(t,n,r){return Fd(this)(t,this,n,r)}path(t,n,r){const i=this.segments,s=Fd(this);let o=this._loop;n=n||0,r=r||this.points.length-n;for(const a of i)o&=s(t,this,a,{start:n,end:n+r-1});return!!o}draw(t,n,r,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),GO(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}ve(Hr,"id","line"),ve(Hr,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),ve(Hr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),ve(Hr,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function ry(e,t,n,r){const i=e.options,{[n]:s}=e.getProps([n],r);return Math.abs(t-s)<i.radius+i.hitRadius}class Rl extends Gi{constructor(n){super();ve(this,"parsed");ve(this,"skip");ve(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,i){const s=this.options,{x:o,y:a}=this.getProps(["x","y"],i);return Math.pow(n-o,2)+Math.pow(r-a,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,r){return ry(this,n,"x",r)}inYRange(n,r){return ry(this,n,"y",r)}getCenterPoint(n){const{x:r,y:i}=this.getProps(["x","y"],n);return{x:r,y:i}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const i=r&&n.borderWidth||0;return(r+i)*2}draw(n,r){const i=this.options;this.skip||i.radius<.1||!fr(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Id(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}ve(Rl,"id","point"),ve(Rl,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),ve(Rl,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function KO(e,t,n){const r=e.segments,i=e.points,s=t.points,o=[];for(const a of r){let{start:l,end:c}=a;c=Uc(l,c,i);const u=Bd(n,i[l],i[c],a.loop);if(!t.segments){o.push({source:a,target:u,start:i[l],end:i[c]});continue}const d=N2(t,u);for(const f of d){const h=Bd(n,s[f.start],s[f.end],f.loop),g=R2(a,i,h);for(const m of g)o.push({source:m,target:f,start:{[n]:iy(u,h,"start",Math.max)},end:{[n]:iy(u,h,"end",Math.min)}})}}return o}function Bd(e,t,n,r){if(r)return;let i=t[e],s=n[e];return e==="angle"&&(i=tn(i),s=tn(s)),{property:e,start:i,end:s}}function VO(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,s=[];return t.segments.forEach(({start:o,end:a})=>{a=Uc(o,a,i);const l=i[o],c=i[a];r!==null?(s.push({x:l.x,y:r}),s.push({x:c.x,y:r})):n!==null&&(s.push({x:n,y:l.y}),s.push({x:n,y:c.y}))}),s}function Uc(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function iy(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function J2(e,t){let n=[],r=!1;return at(e)?(r=!0,n=e):n=VO(e,t),n.length?new Hr({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function sy(e){return e&&e.fill!==!1}function WO(e,t,n){let i=e[t].fill;const s=[t];let o;if(!n)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!vt(i))return i;if(o=e[i],!o)return!1;if(o.visible)return i;s.push(i),i=o.fill}return!1}function QO(e,t,n){const r=JO(e);if(Be(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return vt(i)&&Math.floor(i)===i?YO(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function YO(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function XO(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:Be(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function ZO(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:Be(e)?r=e.value:r=t.getBaseValue(),r}function JO(e){const t=e.options,n=t.fill;let r=Re(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function eE(e){const{scale:t,index:n,line:r}=e,i=[],s=r.segments,o=r.points,a=tE(t,n);a.push(J2({x:null,y:t.bottom},r));for(let l=0;l<s.length;l++){const c=s[l];for(let u=c.start;u<=c.end;u++)nE(i,o[u],a)}return new Hr({points:i,options:{}})}function tE(e,t){const n=[],r=e.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const s=r[i];if(s.index===t)break;s.hidden||n.unshift(s.dataset)}return n}function nE(e,t,n){const r=[];for(let i=0;i<n.length;i++){const s=n[i],{first:o,last:a,point:l}=rE(s,t,"x");if(!(!l||o&&a)){if(o)r.unshift(l);else if(e.push(l),!a)break}}e.push(...r)}function rE(e,t,n){const r=e.interpolate(t,n);if(!r)return{};const i=r[n],s=e.segments,o=e.points;let a=!1,l=!1;for(let c=0;c<s.length;c++){const u=s[c],d=o[u.start][n],f=o[u.end][n];if(os(i,d,f)){a=i===d,l=i===f;break}}return{first:a,last:l,point:r}}class eb{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,r){const{x:i,y:s,radius:o}=this;return n=n||{start:0,end:on},t.arc(i,s,o,n.end,n.start,!0),!r.bounds}interpolate(t){const{x:n,y:r,radius:i}=this,s=t.angle;return{x:n+Math.cos(s)*i,y:r+Math.sin(s)*i,angle:s}}}function iE(e){const{chart:t,fill:n,line:r}=e;if(vt(n))return sE(t,n);if(n==="stack")return eE(e);if(n==="shape")return!0;const i=oE(e);return i instanceof eb?i:J2(i,r)}function sE(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function oE(e){return(e.scale||{}).getPointPositionForValue?lE(e):aE(e)}function aE(e){const{scale:t={},fill:n}=e,r=XO(n,t);if(vt(r)){const i=t.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function lE(e){const{scale:t,fill:n}=e,r=t.options,i=t.getLabels().length,s=r.reverse?t.max:t.min,o=ZO(n,t,s),a=[];if(r.grid.circular){const l=t.getPointPositionForValue(0,s);return new eb({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(o)})}for(let l=0;l<i;++l)a.push(t.getPointPositionForValue(l,o));return a}function Iu(e,t,n){const r=iE(t),{chart:i,index:s,line:o,scale:a,axis:l}=t,c=o.options,u=c.fill,d=c.backgroundColor,{above:f=d,below:h=d}=u||{},g=i.getDatasetMeta(s),m=F2(i,g);r&&o.points.length&&(Fc(e,n),cE(e,{line:o,target:r,above:f,below:h,area:n,scale:a,axis:l,clip:m}),Bc(e))}function cE(e,t){const{line:n,target:r,above:i,below:s,area:o,scale:a,clip:l}=t,c=n._loop?"angle":t.axis;e.save();let u=s;s!==i&&(c==="x"?(oy(e,r,o.top),Ru(e,{line:n,target:r,color:i,scale:a,property:c,clip:l}),e.restore(),e.save(),oy(e,r,o.bottom)):c==="y"&&(ay(e,r,o.left),Ru(e,{line:n,target:r,color:s,scale:a,property:c,clip:l}),e.restore(),e.save(),ay(e,r,o.right),u=i)),Ru(e,{line:n,target:r,color:u,scale:a,property:c,clip:l}),e.restore()}function oy(e,t,n){const{segments:r,points:i}=t;let s=!0,o=!1;e.beginPath();for(const a of r){const{start:l,end:c}=a,u=i[l],d=i[Uc(l,c,i)];s?(e.moveTo(u.x,u.y),s=!1):(e.lineTo(u.x,n),e.lineTo(u.x,u.y)),o=!!t.pathSegment(e,a,{move:o}),o?e.closePath():e.lineTo(d.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function ay(e,t,n){const{segments:r,points:i}=t;let s=!0,o=!1;e.beginPath();for(const a of r){const{start:l,end:c}=a,u=i[l],d=i[Uc(l,c,i)];s?(e.moveTo(u.x,u.y),s=!1):(e.lineTo(n,u.y),e.lineTo(u.x,u.y)),o=!!t.pathSegment(e,a,{move:o}),o?e.closePath():e.lineTo(n,d.y)}e.lineTo(n,t.first().y),e.closePath(),e.clip()}function Ru(e,t){const{line:n,target:r,property:i,color:s,scale:o,clip:a}=t,l=KO(n,r,i);for(const{source:c,target:u,start:d,end:f}of l){const{style:{backgroundColor:h=s}={}}=c,g=r!==!0;e.save(),e.fillStyle=h,uE(e,o,a,g&&Bd(i,d,f)),e.beginPath();const m=!!n.pathSegment(e,c);let p;if(g){m?e.closePath():ly(e,r,f,i);const v=!!r.pathSegment(e,u,{move:m,reverse:!0});p=m&&v,p||ly(e,r,d,i)}e.closePath(),e.fill(p?"evenodd":"nonzero"),e.restore()}}function uE(e,t,n,r){const i=t.chart.chartArea,{property:s,start:o,end:a}=r||{};if(s==="x"||s==="y"){let l,c,u,d;s==="x"?(l=o,c=i.top,u=a,d=i.bottom):(l=i.left,c=o,u=i.right,d=a),e.beginPath(),n&&(l=Math.max(l,n.left),u=Math.min(u,n.right),c=Math.max(c,n.top),d=Math.min(d,n.bottom)),e.rect(l,c,u-l,d-c),e.clip()}}function ly(e,t,n,r){const i=t.interpolate(n,r);i&&e.lineTo(i.x,i.y)}var dE={id:"filler",afterDatasetsUpdate(e,t,n){const r=(e.data.datasets||[]).length,i=[];let s,o,a,l;for(o=0;o<r;++o)s=e.getDatasetMeta(o),a=s.dataset,l=null,a&&a.options&&a instanceof Hr&&(l={visible:e.isDatasetVisible(o),index:o,fill:QO(a,o,r),chart:e,axis:s.controller.options.indexAxis,scale:s.vScale,line:a}),s.$filler=l,i.push(l);for(o=0;o<r;++o)l=i[o],!(!l||l.fill===!1)&&(l.fill=WO(i,o,n.propagate))},beforeDraw(e,t,n){const r=n.drawTime==="beforeDraw",i=e.getSortedVisibleDatasetMetas(),s=e.chartArea;for(let o=i.length-1;o>=0;--o){const a=i[o].$filler;a&&(a.line.updateControlPoints(s,a.axis),r&&a.fill&&Iu(e.ctx,a,s))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const s=r[i].$filler;sy(s)&&Iu(e.ctx,s,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!sy(r)||n.drawTime!=="beforeDatasetDraw"||Iu(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const cy=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},fE=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class uy extends Gi{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=nt(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=yt(r.font),s=i.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=cy(r,s);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(o,s,a,l)+10):(u=this.maxHeight,c=this._fitCols(o,i,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:s,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+a;let d=t;s.textAlign="left",s.textBaseline="middle";let f=-1,h=-u;return this.legendItems.forEach((g,m)=>{const p=r+n/2+s.measureText(g.text).width;(m===0||c[c.length-1]+p+2*a>o)&&(d+=u,c[c.length-(m>0?0:1)]=0,h+=u,f++),l[m]={left:0,top:h,row:f,width:p,height:i},c[c.length-1]+=p+a}),d}_fitCols(t,n,r,i){const{ctx:s,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=o-t;let d=a,f=0,h=0,g=0,m=0;return this.legendItems.forEach((p,v)=>{const{itemWidth:b,itemHeight:S}=hE(r,n,s,p,i);v>0&&h+S+2*a>u&&(d+=f+a,c.push({width:f,height:h}),g+=f+a,m++,f=h=0),l[v]={left:g,top:h,col:m,width:b,height:S},f=Math.max(f,b),h+=S+a}),d+=f,c.push({width:f,height:h}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:s}}=this,o=ls(s,this.left,this.width);if(this.isHorizontal()){let a=0,l=kt(r,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=kt(r,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+t+i,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+i}else{let a=0,l=kt(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=kt(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+i,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Fc(t,this),this._draw(),Bc(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:s,labels:o}=t,a=dt.color,l=ls(t.rtl,this.left,this.width),c=yt(o.font),{padding:u}=o,d=c.size,f=d/2;let h;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:g,boxHeight:m,itemHeight:p}=cy(o,d),v=function(k,w,_){if(isNaN(g)||g<=0||isNaN(m)||m<0)return;i.save();const O=Re(_.lineWidth,1);if(i.fillStyle=Re(_.fillStyle,a),i.lineCap=Re(_.lineCap,"butt"),i.lineDashOffset=Re(_.lineDashOffset,0),i.lineJoin=Re(_.lineJoin,"miter"),i.lineWidth=O,i.strokeStyle=Re(_.strokeStyle,a),i.setLineDash(Re(_.lineDash,[])),o.usePointStyle){const E={radius:m*Math.SQRT2/2,pointStyle:_.pointStyle,rotation:_.rotation,borderWidth:O},j=l.xPlus(k,g/2),$=w+f;E2(i,E,j,$,o.pointStyleWidth&&g)}else{const E=w+Math.max((d-m)/2,0),j=l.leftForLtr(k,g),$=as(_.borderRadius);i.beginPath(),Object.values($).some(B=>B!==0)?ic(i,{x:j,y:E,w:g,h:m,radius:$}):i.rect(j,E,g,m),i.fill(),O!==0&&i.stroke()}i.restore()},b=function(k,w,_){Ii(i,_.text,k,w+p/2,c,{strikethrough:_.hidden,textAlign:l.textAlign(_.textAlign)})},S=this.isHorizontal(),C=this._computeTitleHeight();S?h={x:kt(s,this.left+u,this.right-r[0]),y:this.top+u+C,line:0}:h={x:this.left+u,y:kt(s,this.top+C+u,this.bottom-n[0].height),line:0},D2(this.ctx,t.textDirection);const x=p+u;this.legendItems.forEach((k,w)=>{i.strokeStyle=k.fontColor,i.fillStyle=k.fontColor;const _=i.measureText(k.text).width,O=l.textAlign(k.textAlign||(k.textAlign=o.textAlign)),E=g+f+_;let j=h.x,$=h.y;l.setWidth(this.width),S?w>0&&j+E+u>this.right&&($=h.y+=x,h.line++,j=h.x=kt(s,this.left+u,this.right-r[h.line])):w>0&&$+x>this.bottom&&(j=h.x=j+n[h.line].width+u,h.line++,$=h.y=kt(s,this.top+C+u,this.bottom-n[h.line].height));const B=l.x(j);if(v(B,$,k),j=l9(O,j+g+f,S?j+E:this.right,t.rtl),b(l.x(j),$,k),S)h.x+=E+u;else if(typeof k.text!="string"){const R=c.lineHeight;h.y+=tb(k,R)+u}else h.y+=x}),L2(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=yt(n.font),i=Tt(n.padding);if(!n.display)return;const s=ls(t.rtl,this.left,this.width),o=this.ctx,a=n.position,l=r.size/2,c=i.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=kt(t.align,d,this.right-f);else{const g=this.columnSizes.reduce((m,p)=>Math.max(m,p.height),0);u=c+kt(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const h=kt(a,d,d+f);o.textAlign=s.textAlign(If(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,Ii(o,n.text,h,u,r)}_computeTitleHeight(){const t=this.options.title,n=yt(t.font),r=Tt(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,s;if(os(t,this.left,this.right)&&os(n,this.top,this.bottom)){for(s=this.legendHitBoxes,r=0;r<s.length;++r)if(i=s[r],os(t,i.left,i.left+i.width)&&os(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!mE(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,s=fE(i,r);i&&!s&&nt(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!s&&nt(n.onHover,[t,r,this],this)}else r&&nt(n.onClick,[t,r,this],this)}}function hE(e,t,n,r,i){const s=gE(r,e,t,n),o=yE(i,r,t.lineHeight);return{itemWidth:s,itemHeight:o}}function gE(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((s,o)=>s.length>o.length?s:o)),t+n.size/2+r.measureText(i).width}function yE(e,t,n){let r=e;return typeof t.text!="string"&&(r=tb(t,n)),r}function tb(e,t){const n=e.text?e.text.length:0;return t*n}function mE(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var pE={id:"legend",_element:uy,start(e,t,n){const r=e.legend=new uy({ctx:e.ctx,options:n,chart:e});vn.configure(e,r,n),vn.addBox(e,r)},stop(e){vn.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;vn.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:s,useBorderRadius:o,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Tt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:s,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:o&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class nb extends Gi{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=at(r.text)?r.text.length:1;this._padding=Tt(r.padding);const s=i*yt(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:s,options:o}=this,a=o.align;let l=0,c,u,d;return this.isHorizontal()?(u=kt(a,r,s),d=n+t,c=s-r):(o.position==="left"?(u=r+t,d=kt(a,i,n),l=ht*-.5):(u=s-t,d=kt(a,n,i),l=ht*.5),c=i-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=yt(n.font),s=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(s);Ii(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:If(n.align),textBaseline:"middle",translation:[o,a]})}}function vE(e,t){const n=new nb({ctx:e.ctx,options:t,chart:e});vn.configure(e,n,t),vn.addBox(e,n),e.titleBlock=n}var bE={id:"title",_element:nb,start(e,t,n){vE(e,n)},stop(e){const t=e.titleBlock;vn.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;vn.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const $o={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,s=0;for(t=0,n=e.length;t<n;++t){const a=e[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();r.add(l.x),i+=l.y,++s}}return s===0||r.size===0?!1:{x:[...r].reduce((a,l)=>a+l)/r.size,y:i/s}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,s,o,a;for(s=0,o=e.length;s<o;++s){const l=e[s].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Dd(t,c);u<i&&(i=u,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function zn(e,t){return t&&(at(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function or(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
65
|
+
*/class vk{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const s=n.listeners[i],o=n.duration;s.forEach(a=>a({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(r-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=T2.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const s=r.items;let o=s.length-1,a=!1,l;for(;o>=0;--o)l=s[o],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(s[o]=s[s.length-1],s.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),s.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=s.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var or=new vk;const Rg="transparent",bk={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=Eg(e||Rg),i=r.valid&&Eg(t||Rg);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class xk{constructor(t,n,r,i){const s=n[r];i=dl([t.to,i,s,t.from]);const o=dl([t.from,s,i]);this._active=!0,this._fn=t.fn||bk[t.type||typeof o],this._easing=Uo[t.easing]||Uo.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],s=r-this._start,o=this._duration-s;this._start=r,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=dl([t.to,n,i,t.from]),this._from=dl([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,s=this._from,o=this._loop,a=this._to;let l;if(this._active=s!==a&&(o||n<r),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=s;return}l=n/r%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(s,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class K2{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Ie(t))return;const n=Object.keys(ct.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const s=t[i];if(!Ie(s))return;const o={};for(const a of n)o[a]=s[a];(ot(s.properties)&&s.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,o)})})}_animateOptions(t,n){const r=n.options,i=Sk(t,r);if(!i)return[];const s=this._createAnimations(i,r);return r.$shared&&wk(t.options.$animations,r).then(()=>{t.options=r},()=>{}),s}_createAnimations(t,n){const r=this._properties,i=[],s=t.$animations||(t.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const u=o[l];if(u.charAt(0)==="$")continue;if(u==="options"){i.push(...this._animateOptions(t,n));continue}const c=n[u];let d=s[u];const f=r.get(u);if(d)if(f&&d.active()){d.update(f,c,a);continue}else d.cancel();if(!f||!f.duration){t[u]=c;continue}s[u]=d=new xk(f,t,u,c),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return or.add(this._chart,r),!0}}function wk(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const s=e[r[i]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function Sk(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Ng(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,s=n.max===void 0?t:0;return{start:r?s:i,end:r?i:s}}function Ck(e,t,n){if(n===!1)return!1;const r=Ng(e,n),i=Ng(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function _k(e){let t,n,r,i;return Ie(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function V2(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,s;for(i=0,s=r.length;i<s;++i)n.push(r[i].index);return n}function Fg(e,t,n,r={}){const i=e.keys,s=r.mode==="single";let o,a,l,u;if(t===null)return;let c=!1;for(o=0,a=i.length;o<a;++o){if(l=+i[o],l===n){if(c=!0,r.all)continue;break}u=e.values[l],bt(u)&&(s||t===0||Hs(t)===Hs(u))&&(t+=u)}return!c&&!r.all?0:t}function kk(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",s=r.axis==="x"?"x":"y",o=Object.keys(e),a=new Array(o.length);let l,u,c;for(l=0,u=o.length;l<u;++l)c=o[l],a[l]={[i]:c,[s]:e[c]};return a}function $c(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Ok(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Ek(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function Ak(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Bg(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const s=e[i.index];if(n&&s>0||!n&&s<0)return i.index}return null}function qg(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:a}=r,l=s.axis,u=o.axis,c=Ok(s,o,r),d=t.length;let f;for(let h=0;h<d;++h){const g=t[h],{[l]:m,[u]:p}=g,v=g._stacks||(g._stacks={});f=v[u]=Ak(i,c,m),f[a]=p,f._top=Bg(f,o,!0,r.type),f._bottom=Bg(f,o,!1,r.type);const b=f._visualValues||(f._visualValues={});b[a]=p}}function Dc(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function Pk(e,t){return ri(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Tk(e,t,n){return ri(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function vo(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const s=i._stacks;if(!s||s[r]===void 0||s[r][n]===void 0)return;delete s[r][n],s[r]._visualValues!==void 0&&s[r]._visualValues[n]!==void 0&&delete s[r]._visualValues[n]}}}const Lc=e=>e==="reset"||e==="none",zg=(e,t)=>t?e:Object.assign({},e),Mk=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:V2(n,!0),values:null};class cs{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=$c(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&vo(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,f,h,g)=>d==="x"?f:d==="r"?g:h,s=n.xAxisID=De(r.xAxisID,Dc(t,"x")),o=n.yAxisID=De(r.yAxisID,Dc(t,"y")),a=n.rAxisID=De(r.rAxisID,Dc(t,"r")),l=n.indexAxis,u=n.iAxisID=i(l,s,o,a),c=n.vAxisID=i(l,o,s,a);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&_g(this._data,this),t._stacked&&vo(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Ie(n)){const i=this._cachedMeta;this._data=kk(n,i)}else if(r!==n){if(r){_g(r,this);const i=this._cachedMeta;vo(i),i._parsed=[]}n&&Object.isExtensible(n)&&u9(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const s=n._stacked;n._stacked=$c(n.vScale,n),n.stack!==r.stack&&(i=!0,vo(n),n.stack=r.stack),this._resyncElements(t),(i||s!==n._stacked)&&(qg(this,n._parsed),n._stacked=$c(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:s,_stacked:o}=r,a=s.axis;let l=t===0&&n===i.length?!0:r._sorted,u=t>0&&r._parsed[t-1],c,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{ot(i[t])?f=this.parseArrayData(r,i,t,n):Ie(i[t])?f=this.parseObjectData(r,i,t,n):f=this.parsePrimitiveData(r,i,t,n);const h=()=>d[a]===null||u&&d[a]<u[a];for(c=0;c<n;++c)r._parsed[c+t]=d=f[c],l&&(h()&&(l=!1),u=d);r._sorted=l}o&&qg(this,f)}parsePrimitiveData(t,n,r,i){const{iScale:s,vScale:o}=t,a=s.axis,l=o.axis,u=s.getLabels(),c=s===o,d=new Array(i);let f,h,g;for(f=0,h=i;f<h;++f)g=f+r,d[f]={[a]:c||s.parse(u[g],g),[l]:o.parse(n[g],g)};return d}parseArrayData(t,n,r,i){const{xScale:s,yScale:o}=t,a=new Array(i);let l,u,c,d;for(l=0,u=i;l<u;++l)c=l+r,d=n[c],a[l]={x:s.parse(d[0],c),y:o.parse(d[1],c)};return a}parseObjectData(t,n,r,i){const{xScale:s,yScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=new Array(i);let c,d,f,h;for(c=0,d=i;c<d;++c)f=c+r,h=n[f],u[c]={x:s.parse(ca(h,a),f),y:o.parse(ca(h,l),f)};return u}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,s=this._cachedMeta,o=n[t.axis],a={keys:V2(i,!0),values:n._stacks[t.axis]._visualValues};return Fg(a,o,s.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const s=r[n.axis];let o=s===null?NaN:s;const a=i&&r._stacks[n.axis];i&&a&&(i.values=a,o=Fg(i,s,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,s=r._sorted&&t===r.iScale,o=i.length,a=this._getOtherScale(t),l=Mk(n,r,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=Ek(a);let f,h;function g(){h=i[f];const m=h[a.axis];return!bt(h[t.axis])||c>m||d<m}for(f=0;f<o&&!(!g()&&(this.updateRangeFromParsed(u,t,h,l),s));++f);if(s){for(f=o-1;f>=0;--f)if(!g()){this.updateRangeFromParsed(u,t,h,l);break}}return u}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,s,o;for(i=0,s=n.length;i<s;++i)o=n[i][t.axis],bt(o)&&r.push(o);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,s=this.getParsed(t);return{label:r?""+r.getLabelForValue(s[r.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=_k(De(this.options.clip,Ck(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],s=n.chartArea,o=[],a=this._drawStart||0,l=this._drawCount||i.length-a,u=this.options.drawActiveElementsOnTop;let c;for(r.dataset&&r.dataset.draw(t,s,a,l),c=a;c<a+l;++c){const d=i[c];d.hidden||(d.active&&u?o.push(d):d.draw(t,s))}for(c=0;c<o.length;++c)o[c].draw(t,s)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];s=o.$context||(o.$context=Tk(this.getContext(),t,o)),s.parsed=this.getParsed(t),s.raw=i.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=Pk(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=r,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",s=this._cachedDataOpts,o=t+"-"+n,a=s[o],l=this.enableOptionSharing&&iu(r);if(a)return zg(a,l);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=u.getOptionScopes(this.getDataset(),c),h=Object.keys(ct.elements[t]),g=()=>this.getContext(r,i,n),m=u.resolveNamedOptions(f,h,g,d);return m.$shared&&(m.$shared=l,s[o]=Object.freeze(zg(m,l))),m}_resolveAnimations(t,n,r){const i=this.chart,s=this._cachedDataOpts,o=`animation-${n}`,a=s[o];if(a)return a;let l;if(i.options.animation!==!1){const c=this.chart.config,d=c.datasetAnimationScopeKeys(this._type,n),f=c.getOptionScopes(this.getDataset(),d);l=c.createResolver(f,this.getContext(t,r,n))}const u=new K2(i,l&&l.animations);return l&&l._cacheable&&(s[o]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Lc(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,s=this.getSharedOptions(r),o=this.includeOptions(n,s)||s!==i;return this.updateSharedOptions(s,n,r),{sharedOptions:s,includeOptions:o}}updateElement(t,n,r,i){Lc(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!Lc(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,l,u]of this._syncList)this[a](l,u);this._syncList=[];const i=r.length,s=n.length,o=Math.min(s,i);o&&this.parse(0,o),s>i?this._insertElements(i,s-i,t):s<i&&this._removeElements(s,i-s)}_insertElements(t,n,r=!0){const i=this._cachedMeta,s=i.data,o=t+n;let a;const l=u=>{for(u.length+=n,a=u.length-1;a>=o;a--)u[a]=u[a-n]};for(l(s),a=t;a<o;++a)s[a]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(s,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&vo(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}pe(cs,"defaults",{}),pe(cs,"datasetElementType",null),pe(cs,"dataElementType",null);class Dl extends cs{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:s}=n,o=this.chart._animationsDisabled;let{start:a,count:l}=h9(n,i,o);this._drawStart=a,this._drawCount=l,g9(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=i;const u=this.resolveDatasetElementOptions(t);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(r,void 0,{animated:!o,options:u},t),this.updateElements(i,a,l,t)}updateElements(t,n,r,i){const s=i==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(n,i),f=o.axis,h=a.axis,{spanGaps:g,segment:m}=this.options,p=da(g)?g:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||s||i==="none",b=n+r,S=t.length;let C=n>0&&this.getParsed(n-1);for(let x=0;x<S;++x){const k=t[x],w=v?k:{};if(x<n||x>=b){w.skip=!0;continue}const _=this.getParsed(x),O=Ye(_[h]),E=w[f]=o.getPixelForValue(_[f],x),T=w[h]=s||O?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,_,l):_[h],x);w.skip=isNaN(E)||isNaN(T)||O,w.stop=x>0&&Math.abs(_[f]-C[f])>p,m&&(w.parsed=_,w.raw=u.data[x]),d&&(w.options=c||this.resolveDataElementOptions(x,k.active?"active":i)),v||this.updateElement(k,x,w,i),C=_}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const s=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,s,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}pe(Dl,"id","line"),pe(Dl,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),pe(Dl,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ll extends cs{getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,i){return K9.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],s=n.iScale.getLabels();if(r.points=i,t!=="resize"){const o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===i.length,options:o};this.updateElement(r,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const s=this._cachedMeta.rScale,o=i==="reset";for(let a=n;a<n+r;a++){const l=t[a],u=this.resolveDataElementOptions(a,l.active?"active":i),c=s.getPointPositionForValue(a,this.getParsed(a).r),d=o?s.xCenter:c.x,f=o?s.yCenter:c.y,h={x:d,y:f,angle:c.angle,skip:isNaN(d)||isNaN(f),options:u};this.updateElement(l,a,h,i)}}}pe(Ll,"id","radar"),pe(Ll,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),pe(Ll,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});function ai(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Qf{constructor(t){pe(this,"options");this.options=t||{}}static override(t){Object.assign(Qf.prototype,t)}init(){}formats(){return ai()}parse(){return ai()}format(){return ai()}add(){return ai()}diff(){return ai()}startOf(){return ai()}endOf(){return ai()}}var jk={_date:Qf};function $k(e,t,n,r){const{controller:i,data:s,_sorted:o}=e,a=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&o&&s.length){const u=a._reversePixels?a9:vi;if(r){if(i._sharedOptions){const c=s[0],d=typeof c.getRange=="function"&&c.getRange(t);if(d){const f=u(s,t,n-d),h=u(s,t,n+d);return{lo:f.lo,hi:h.hi}}}}else{const c=u(s,t,n);if(l){const{vScale:d}=i._cachedMeta,{_parsed:f}=e,h=f.slice(0,c.lo+1).reverse().findIndex(m=>!Ye(m[d.axis]));c.lo-=Math.max(0,h);const g=f.slice(c.hi).findIndex(m=>!Ye(m[d.axis]));c.hi+=Math.max(0,g)}return c}}return{lo:0,hi:s.length-1}}function Gu(e,t,n,r,i){const s=e.getSortedVisibleDatasetMetas(),o=n[t];for(let a=0,l=s.length;a<l;++a){const{index:u,data:c}=s[a],{lo:d,hi:f}=$k(s[a],t,o,i);for(let h=d;h<=f;++h){const g=c[h];g.skip||r(g,u,h)}}}function Dk(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const s=t?Math.abs(r.x-i.x):0,o=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}function Ic(e,t,n,r,i){const s=[];return!i&&!e.isPointInArea(t)||Gu(e,n,t,function(a,l,u){!i&&!hr(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&s.push({element:a,datasetIndex:l,index:u})},!0),s}function Lk(e,t,n,r){let i=[];function s(o,a,l){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],r),{angle:d}=i9(o,{x:t.x,y:t.y});A2(d,u,c)&&i.push({element:o,datasetIndex:a,index:l})}return Gu(e,n,t,s),i}function Ik(e,t,n,r,i,s){let o=[];const a=Dk(n);let l=Number.POSITIVE_INFINITY;function u(c,d,f){const h=c.inRange(t.x,t.y,i);if(r&&!h)return;const g=c.getCenterPoint(i);if(!(!!s||e.isPointInArea(g))&&!h)return;const p=a(t,g);p<l?(o=[{element:c,datasetIndex:d,index:f}],l=p):p===l&&o.push({element:c,datasetIndex:d,index:f})}return Gu(e,n,t,u),o}function Rc(e,t,n,r,i,s){return!s&&!e.isPointInArea(t)?[]:n==="r"&&!r?Lk(e,t,n,i):Ik(e,t,n,r,i,s)}function Hg(e,t,n,r,i){const s=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return Gu(e,n,t,(l,u,c)=>{l[o]&&l[o](t[n],i)&&(s.push({element:l,datasetIndex:u,index:c}),a=a||l.inRange(t.x,t.y,i))}),r&&!a?[]:s}var Rk={modes:{index(e,t,n,r){const i=fi(t,e),s=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?Ic(e,i,s,r,o):Rc(e,i,s,!1,r,o),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(u=>{const c=a[0].index,d=u.data[c];d&&!d.skip&&l.push({element:d,datasetIndex:u.index,index:c})}),l):[]},dataset(e,t,n,r){const i=fi(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?Ic(e,i,s,r,o):Rc(e,i,s,!1,r,o);if(a.length>0){const l=a[0].datasetIndex,u=e.getDatasetMeta(l).data;a=[];for(let c=0;c<u.length;++c)a.push({element:u[c],datasetIndex:l,index:c})}return a},point(e,t,n,r){const i=fi(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return Ic(e,i,s,r,o)},nearest(e,t,n,r){const i=fi(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return Rc(e,i,s,n.intersect,r,o)},x(e,t,n,r){const i=fi(t,e);return Hg(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=fi(t,e);return Hg(e,i,"y",n.intersect,r)}}};const W2=["left","top","right","bottom"];function bo(e,t){return e.filter(n=>n.pos===t)}function Ug(e,t){return e.filter(n=>W2.indexOf(n.pos)===-1&&n.box.axis===t)}function xo(e,t){return e.sort((n,r)=>{const i=t?r:n,s=t?n:r;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function Nk(e){const t=[];let n,r,i,s,o,a;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:s,options:{stack:o,stackWeight:a=1}}=i,t.push({index:n,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&s+o,stackWeight:a});return t}function Fk(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:s}=n;if(!r||!W2.includes(i))continue;const o=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return t}function Bk(e,t){const n=Fk(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let s,o,a;for(s=0,o=e.length;s<o;++s){a=e[s];const{fullSize:l}=a.box,u=n[a.stack],c=u&&a.stackWeight/u.weight;a.horizontal?(a.width=c?c*r:l&&t.availableWidth,a.height=i):(a.width=r,a.height=c?c*i:l&&t.availableHeight)}return n}function qk(e){const t=Nk(e),n=xo(t.filter(u=>u.box.fullSize),!0),r=xo(bo(t,"left"),!0),i=xo(bo(t,"right")),s=xo(bo(t,"top"),!0),o=xo(bo(t,"bottom")),a=Ug(t,"x"),l=Ug(t,"y");return{fullSize:n,leftAndTop:r.concat(s),rightAndBottom:i.concat(l).concat(o).concat(a),chartArea:bo(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:s.concat(o).concat(a)}}function Gg(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function Q2(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function zk(e,t,n,r){const{pos:i,box:s}=n,o=e.maxPadding;if(!Ie(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?s.height:s.width),n.size=d.size/d.count,e[i]+=n.size}s.getPadding&&Q2(o,s.getPadding());const a=Math.max(0,t.outerWidth-Gg(o,e,"left","right")),l=Math.max(0,t.outerHeight-Gg(o,e,"top","bottom")),u=a!==e.w,c=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:u,other:c}:{same:c,other:u}}function Hk(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function Uk(e,t){const n=t.maxPadding;function r(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{s[o]=Math.max(t[o],n[o])}),s}return r(e?["left","right"]:["top","bottom"])}function $o(e,t,n,r){const i=[];let s,o,a,l,u,c;for(s=0,o=e.length,u=0;s<o;++s){a=e[s],l=a.box,l.update(a.width||t.w,a.height||t.h,Uk(a.horizontal,t));const{same:d,other:f}=zk(t,n,a,r);u|=d&&i.length,c=c||f,l.fullSize||i.push(a)}return u&&$o(i,t,n,r)||c}function yl(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function Kg(e,t,n,r){const i=n.padding;let{x:s,y:o}=t;for(const a of e){const l=a.box,u=r[a.stack]||{placed:0,weight:1},c=a.stackWeight/u.weight||1;if(a.horizontal){const d=t.w*c,f=u.size||l.height;iu(u.start)&&(o=u.start),l.fullSize?yl(l,i.left,o,n.outerWidth-i.right-i.left,f):yl(l,t.left+u.placed,o,d,f),u.start=o,u.placed+=d,o=l.bottom}else{const d=t.h*c,f=u.size||l.width;iu(u.start)&&(s=u.start),l.fullSize?yl(l,s,i.top,f,n.outerHeight-i.bottom-i.top):yl(l,s,t.top+u.placed,f,d),u.start=s,u.placed+=d,s=l.right}}t.x=s,t.y=o}var xn={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=Mt(e.options.layout.padding),s=Math.max(t-i.width,0),o=Math.max(n-i.height,0),a=qk(e.boxes),l=a.vertical,u=a.horizontal;Qe(e.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const c=l.reduce((m,p)=>p.box.options&&p.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/c,hBoxMaxHeight:o/2}),f=Object.assign({},i);Q2(f,Mt(r));const h=Object.assign({maxPadding:f,w:s,h:o,x:i.left,y:i.top},i),g=Bk(l.concat(u),d);$o(a.fullSize,h,d,g),$o(l,h,d,g),$o(u,h,d,g)&&$o(l,h,d,g),Hk(h),Kg(a.leftAndTop,h,d,g),h.x+=h.w,h.y+=h.h,Kg(a.rightAndBottom,h,d,g),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},Qe(a.chartArea,m=>{const p=m.box;Object.assign(p,e.chartArea),p.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class Y2{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class Gk extends Y2{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Il="$chartjs",Kk={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Vg=e=>e===null||e==="";function Vk(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[Il]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Vg(i)){const s=$g(e,"width");s!==void 0&&(e.width=s)}if(Vg(r))if(e.style.height==="")e.height=e.width/(t||2);else{const s=$g(e,"height");s!==void 0&&(e.height=s)}return e}const X2=ok?{passive:!0}:!1;function Wk(e,t,n){e&&e.addEventListener(t,n,X2)}function Qk(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,X2)}function Yk(e,t){const n=Kk[e.type]||e.type,{x:r,y:i}=fi(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function uu(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Xk(e,t,n){const r=e.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||uu(a.addedNodes,r),o=o&&!uu(a.removedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Zk(e,t,n){const r=e.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||uu(a.removedNodes,r),o=o&&!uu(a.addedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const fa=new Map;let Wg=0;function Z2(){const e=window.devicePixelRatio;e!==Wg&&(Wg=e,fa.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Jk(e,t){fa.size||window.addEventListener("resize",Z2),fa.set(e,t)}function eO(e){fa.delete(e),fa.size||window.removeEventListener("resize",Z2)}function tO(e,t,n){const r=e.canvas,i=r&&Wf(r);if(!i)return;const s=M2((a,l)=>{const u=i.clientWidth;n(a,l),u<i.clientWidth&&n()},window),o=new ResizeObserver(a=>{const l=a[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||s(u,c)});return o.observe(i),Jk(e,s),o}function Nc(e,t,n){n&&n.disconnect(),t==="resize"&&eO(e)}function nO(e,t,n){const r=e.canvas,i=M2(s=>{e.ctx!==null&&n(Yk(s,e))},e);return Wk(r,t,i),i}class rO extends Y2{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Vk(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Il])return!1;const r=n[Il].initial;["height","width"].forEach(s=>{const o=r[s];Ye(o)?n.removeAttribute(s):n.setAttribute(s,o)});const i=r.style||{};return Object.keys(i).forEach(s=>{n.style[s]=i[s]}),n.width=n.width,delete n[Il],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),o={attach:Xk,detach:Zk,resize:tO}[n]||nO;i[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:Nc,detach:Nc,resize:Nc}[n]||Qk)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return sk(t,n,r,i)}isAttached(t){const n=t&&Wf(t);return!!(n&&n.isConnected)}}function iO(e){return!Vf()||typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas?Gk:rO}var Ol;let Vi=(Ol=class{constructor(){pe(this,"x");pe(this,"y");pe(this,"active",!1);pe(this,"options");pe(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return da(this.x)&&da(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(s=>{i[s]=r[s]&&r[s].active()?r[s]._to:this[s]}),i}},pe(Ol,"defaults",{}),pe(Ol,"defaultRoutes"),Ol);function sO(e,t){const n=e.options.ticks,r=oO(e),i=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?lO(t):[],o=s.length,a=s[0],l=s[o-1],u=[];if(o>i)return uO(t,u,s,o/i),u;const c=aO(s,t,i);if(o>0){let d,f;const h=o>1?Math.round((l-a)/(o-1)):null;for(ml(t,u,c,Ye(h)?0:a-h,a),d=0,f=o-1;d<f;d++)ml(t,u,c,s[d],s[d+1]);return ml(t,u,c,l,Ye(h)?t.length:l+h),u}return ml(t,u,c),u}function oO(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function aO(e,t,n){const r=cO(e),i=t.length/n;if(!r)return Math.max(i,1);const s=e9(r);for(let o=0,a=s.length-1;o<a;o++){const l=s[o];if(l>i)return l}return Math.max(i,1)}function lO(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function uO(e,t,n,r){let i=0,s=n[0],o;for(r=Math.ceil(r),o=0;o<e.length;o++)o===s&&(t.push(e[o]),i++,s=n[i*r])}function ml(e,t,n,r,i){const s=De(r,0),o=Math.min(De(i,e.length),e.length);let a=0,l,u,c;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),c=s;c<0;)a++,c=Math.round(s+a*n);for(u=Math.max(s,0);u<o;u++)u===c&&(t.push(e[u]),a++,c=Math.round(s+a*n))}function cO(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const dO=e=>e==="left"?"right":e==="right"?"left":e,Qg=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Yg=(e,t)=>Math.min(t||e,e);function Xg(e,t){const n=[],r=e.length/t,i=e.length;let s=0;for(;s<i;s+=r)n.push(e[Math.floor(s)]);return n}function fO(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),s=e._startPixel,o=e._endPixel,a=1e-6;let l=e.getPixelForTick(i),u;if(!(n&&(r===1?u=Math.max(l-s,o-l):t===0?u=(e.getPixelForTick(1)-l)/2:u=(l-e.getPixelForTick(i-1))/2,l+=i<t?u:-u,l<s-a||l>o+a)))return l}function hO(e,t){Qe(e,n=>{const r=n.gc,i=r.length/2;let s;if(i>t){for(s=0;s<i;++s)delete n.data[r[s]];r.splice(0,i)}})}function wo(e){return e.drawTicks?e.tickLength:0}function Zg(e,t){if(!e.display)return 0;const n=mt(e.font,t),r=Mt(e.padding);return(ot(e.text)?e.text.length:1)*n.lineHeight+r.height}function gO(e,t){return ri(e,{scale:t,type:"scale"})}function yO(e,t,n){return ri(e,{tick:n,index:t,type:"tick"})}function mO(e,t,n){let r=qf(e);return(n&&t!=="right"||!n&&t==="right")&&(r=dO(r)),r}function pO(e,t,n,r){const{top:i,left:s,bottom:o,right:a,chart:l}=e,{chartArea:u,scales:c}=l;let d=0,f,h,g;const m=o-i,p=a-s;if(e.isHorizontal()){if(h=Ot(r,s,a),Ie(n)){const v=Object.keys(n)[0],b=n[v];g=c[v].getPixelForValue(b)+m-t}else n==="center"?g=(u.bottom+u.top)/2+m-t:g=Qg(e,n,t);f=a-s}else{if(Ie(n)){const v=Object.keys(n)[0],b=n[v];h=c[v].getPixelForValue(b)-p+t}else n==="center"?h=(u.left+u.right)/2-p+t:h=Qg(e,n,t);g=Ot(r,o,i),d=n==="left"?-an:an}return{titleX:h,titleY:g,maxWidth:f,rotation:d}}class to extends Vi{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=zn(t,Number.POSITIVE_INFINITY),n=zn(n,Number.NEGATIVE_INFINITY),r=zn(r,Number.POSITIVE_INFINITY),i=zn(i,Number.NEGATIVE_INFINITY),{min:zn(t,r),max:zn(n,i),minDefined:bt(t),maxDefined:bt(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:s}=this.getUserBounds(),o;if(i&&s)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let l=0,u=a.length;l<u;++l)o=a[l].controller.getMinMax(this,t),i||(n=Math.min(n,o.min)),s||(r=Math.max(r,o.max));return n=s&&n>r?r:n,r=i&&n>r?n:r,{min:zn(n,zn(r,n)),max:zn(r,zn(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){et(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:s,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=I9(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Xg(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=sO(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){et(this.options.afterUpdate,[this])}beforeSetDimensions(){et(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){et(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),et(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){et(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,s;for(r=0,i=t.length;r<i;r++)s=t[r],s.label=et(n.callback,[s.value,r,t],this)}afterTickToLabelConversion(){et(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){et(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=Yg(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let o=i,a,l,u;if(!this._isVisible()||!n.display||i>=s||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const c=this._getLabelSizes(),d=c.widest.width,f=c.highest.height,h=bn(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/r:h/(r-1),d+6>a&&(a=h/(r-(t.offset?.5:1)),l=this.maxHeight-wo(t.grid)-n.padding-Zg(t.title,this.chart.options.font),u=Math.sqrt(d*d+f*f),o=Ff(Math.min(Math.asin(bn((c.highest.height+6)/a,-1,1)),Math.asin(bn(l/u,-1,1))-Math.asin(bn(f/u,-1,1)))),o=Math.max(i,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){et(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){et(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:s}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=Zg(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=wo(s)+l):(t.height=this.maxHeight,t.width=wo(s)+l),r.display&&this.ticks.length){const{first:u,last:c,widest:d,highest:f}=this._getLabelSizes(),h=r.padding*2,g=Hr(this.labelRotation),m=Math.cos(g),p=Math.sin(g);if(a){const v=r.mirror?0:p*d.width+m*f.height;t.height=Math.min(this.maxHeight,t.height+v+h)}else{const v=r.mirror?0:m*d.width+p*f.height;t.width=Math.min(this.maxWidth,t.width+v+h)}this._calculatePadding(u,c,p,m)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:s,padding:o},position:a}=this.options,l=this.labelRotation!==0,u=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,h=0;l?u?(f=i*t.width,h=r*n.height):(f=r*t.height,h=i*n.width):s==="start"?h=n.width:s==="end"?f=t.width:s!=="inner"&&(f=t.width/2,h=n.width/2),this.paddingLeft=Math.max((f-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((h-d+o)*this.width/(this.width-d),0)}else{let c=n.height/2,d=t.height/2;s==="start"?(c=0,d=t.height):s==="end"&&(c=n.height,d=0),this.paddingTop=c+o,this.paddingBottom=d+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){et(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)Ye(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=Xg(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:s}=this,o=[],a=[],l=Math.floor(n/Yg(n,r));let u=0,c=0,d,f,h,g,m,p,v,b,S,C,x;for(d=0;d<n;d+=l){if(g=t[d].label,m=this._resolveTickFontOptions(d),i.font=p=m.string,v=s[p]=s[p]||{data:{},gc:[]},b=m.lineHeight,S=C=0,!Ye(g)&&!ot(g))S=ou(i,v.data,v.gc,S,g),C=b;else if(ot(g))for(f=0,h=g.length;f<h;++f)x=g[f],!Ye(x)&&!ot(x)&&(S=ou(i,v.data,v.gc,S,x),C+=b);o.push(S),a.push(C),u=Math.max(S,u),c=Math.max(C,c)}hO(s,n);const k=o.indexOf(u),w=a.indexOf(c),_=O=>({width:o[O]||0,height:a[O]||0});return{first:_(0),last:_(n-1),widest:_(k),highest:_(w),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return o9(this._alignToPixels?oi(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=yO(this.getContext(),t,r))}return this.$context||(this.$context=gO(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Hr(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),s=this._getLabelSizes(),o=t.autoSkipPadding||0,a=s?s.widest.width+o:0,l=s?s.highest.height+o:0;return this.isHorizontal()?l*r>a*i?a/r:l/i:l*i<a*r?l/r:a/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:s,position:o,border:a}=i,l=s.offset,u=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=wo(s),h=[],g=a.setContext(this.getContext()),m=g.display?g.width:0,p=m/2,v=function(M){return oi(r,M,m)};let b,S,C,x,k,w,_,O,E,T,j,B;if(o==="top")b=v(this.bottom),w=this.bottom-f,O=b-p,T=v(t.top)+p,B=t.bottom;else if(o==="bottom")b=v(this.top),T=t.top,B=v(t.bottom)-p,w=b+p,O=this.top+f;else if(o==="left")b=v(this.right),k=this.right-f,_=b-p,E=v(t.left)+p,j=t.right;else if(o==="right")b=v(this.left),E=t.left,j=v(t.right)-p,k=b+p,_=this.left+f;else if(n==="x"){if(o==="center")b=v((t.top+t.bottom)/2+.5);else if(Ie(o)){const M=Object.keys(o)[0],D=o[M];b=v(this.chart.scales[M].getPixelForValue(D))}T=t.top,B=t.bottom,w=b+p,O=w+f}else if(n==="y"){if(o==="center")b=v((t.left+t.right)/2);else if(Ie(o)){const M=Object.keys(o)[0],D=o[M];b=v(this.chart.scales[M].getPixelForValue(D))}k=b-p,_=k-f,E=t.left,j=t.right}const R=De(i.ticks.maxTicksLimit,d),A=Math.max(1,Math.ceil(d/R));for(S=0;S<d;S+=A){const M=this.getContext(S),D=s.setContext(M),H=a.setContext(M),Q=D.lineWidth,F=D.color,G=H.dash||[],ie=H.dashOffset,ae=D.tickWidth,N=D.tickColor,le=D.tickBorderDash||[],te=D.tickBorderDashOffset;C=fO(this,S,l),C!==void 0&&(x=oi(r,C,Q),u?k=_=E=j=x:w=O=T=B=x,h.push({tx1:k,ty1:w,tx2:_,ty2:O,x1:E,y1:T,x2:j,y2:B,width:Q,color:F,borderDash:G,borderDashOffset:ie,tickWidth:ae,tickColor:N,tickBorderDash:le,tickBorderDashOffset:te}))}return this._ticksLength=d,this._borderValue=b,h}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:s}=r,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:u,padding:c,mirror:d}=s,f=wo(r.grid),h=f+c,g=d?-c:h,m=-Hr(this.labelRotation),p=[];let v,b,S,C,x,k,w,_,O,E,T,j,B="middle";if(i==="top")k=this.bottom-g,w=this._getXAxisLabelAlignment();else if(i==="bottom")k=this.top+g,w=this._getXAxisLabelAlignment();else if(i==="left"){const A=this._getYAxisLabelAlignment(f);w=A.textAlign,x=A.x}else if(i==="right"){const A=this._getYAxisLabelAlignment(f);w=A.textAlign,x=A.x}else if(n==="x"){if(i==="center")k=(t.top+t.bottom)/2+h;else if(Ie(i)){const A=Object.keys(i)[0],M=i[A];k=this.chart.scales[A].getPixelForValue(M)+h}w=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")x=(t.left+t.right)/2-h;else if(Ie(i)){const A=Object.keys(i)[0],M=i[A];x=this.chart.scales[A].getPixelForValue(M)}w=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?B="top":l==="end"&&(B="bottom"));const R=this._getLabelSizes();for(v=0,b=a.length;v<b;++v){S=a[v],C=S.label;const A=s.setContext(this.getContext(v));_=this.getPixelForTick(v)+s.labelOffset,O=this._resolveTickFontOptions(v),E=O.lineHeight,T=ot(C)?C.length:1;const M=T/2,D=A.color,H=A.textStrokeColor,Q=A.textStrokeWidth;let F=w;o?(x=_,w==="inner"&&(v===b-1?F=this.options.reverse?"left":"right":v===0?F=this.options.reverse?"right":"left":F="center"),i==="top"?u==="near"||m!==0?j=-T*E+E/2:u==="center"?j=-R.highest.height/2-M*E+E:j=-R.highest.height+E/2:u==="near"||m!==0?j=E/2:u==="center"?j=R.highest.height/2-M*E:j=R.highest.height-T*E,d&&(j*=-1),m!==0&&!A.showLabelBackdrop&&(x+=E/2*Math.sin(m))):(k=_,j=(1-T)*E/2);let G;if(A.showLabelBackdrop){const ie=Mt(A.backdropPadding),ae=R.heights[v],N=R.widths[v];let le=j-ie.top,te=0-ie.left;switch(B){case"middle":le-=ae/2;break;case"bottom":le-=ae;break}switch(w){case"center":te-=N/2;break;case"right":te-=N;break;case"inner":v===b-1?te-=N:v>0&&(te-=N/2);break}G={left:te,top:le,width:N+ie.width,height:ae+ie.height,color:A.backdropColor}}p.push({label:C,font:O,textOffset:j,options:{rotation:m,color:D,strokeColor:H,strokeWidth:Q,textAlign:F,textBaseline:B,translation:[x,k],backdrop:G}})}return p}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Hr(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:s}}=this.options,o=this._getLabelSizes(),a=t+s,l=o.widest.width;let u,c;return n==="left"?i?(c=this.right+s,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-a,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c=this.left)):n==="right"?i?(c=this.left+s,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+a,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:s,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,s,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(s=>s.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,o;const a=(l,u,c)=>{!c.width||!c.color||(r.save(),r.lineWidth=c.width,r.strokeStyle=c.color,r.setLineDash(c.borderDash||[]),r.lineDashOffset=c.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(u.x,u.y),r.stroke(),r.restore())};if(n.display)for(s=0,o=i.length;s<o;++s){const l=i[s];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:i}}=this,s=r.setContext(this.getContext()),o=r.display?s.width:0;if(!o)return;const a=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let u,c,d,f;this.isHorizontal()?(u=oi(t,this.left,o)-o/2,c=oi(t,this.right,a)+a/2,d=f=l):(d=oi(t,this.top,o)-o/2,f=oi(t,this.bottom,a)+a/2,u=c=l),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(u,d),n.lineTo(c,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&zu(r,i);const s=this.getLabelItems(t);for(const o of s){const a=o.options,l=o.font,u=o.label,c=o.textOffset;Ni(r,u,0,c,l,a)}i&&Hu(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const s=mt(r.font),o=Mt(r.padding),a=r.align;let l=s.lineHeight/2;n==="bottom"||n==="center"||Ie(n)?(l+=o.bottom,ot(r.text)&&(l+=s.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:u,titleY:c,maxWidth:d,rotation:f}=pO(this,l,n,a);Ni(t,r.text,0,0,s,{color:r.color,maxWidth:d,rotation:f,textAlign:mO(a,n,i),textBaseline:"middle",translation:[u,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=De(t.grid&&t.grid.z,-1),i=De(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==to.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:r,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let s,o;for(s=0,o=n.length;s<o;++s){const a=n[s];a[r]===this.id&&(!t||a.type===t)&&i.push(a)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return mt(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class pl{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;xO(n)&&(r=this.register(n));const i=this.items,s=t.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in i||(i[s]=t,vO(t,o,r),this.override&&ct.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in ct[i]&&(delete ct[i][r],this.override&&delete Ri[r])}}function vO(e,t,n){const r=ua(Object.create(null),[n?ct.get(n):{},ct.get(t),e.defaults]);ct.set(t,r),e.defaultRoutes&&bO(t,e.defaultRoutes),e.descriptors&&ct.describe(t,e.descriptors)}function bO(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),s=[e].concat(r).join("."),o=t[n].split("."),a=o.pop(),l=o.join(".");ct.route(s,i,l,a)})}function xO(e){return"id"in e&&"defaults"in e}class wO{constructor(){this.controllers=new pl(cs,"datasets",!0),this.elements=new pl(Vi,"elements"),this.plugins=new pl(Object,"plugins"),this.scales=new pl(to,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const s=r||this._getRegistryForType(i);r||s.isForType(i)||s===this.plugins&&i.id?this._exec(t,s,i):Qe(i,o=>{const a=r||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,r){const i=Nf(t);et(r["before"+i],[],r),n[t](r),et(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var Gn=new wO;class SO{constructor(){this._init=[]}notify(t,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const s=i?this._descriptors(t).filter(i):this._descriptors(t),o=this._notify(s,t,n,r);return n==="afterDestroy"&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,n,r,i){i=i||{};for(const s of t){const o=s.plugin,a=o[r],l=[n,i,s.options];if(et(a,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){Ye(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=De(r.options&&r.options.plugins,{}),s=CO(r);return i===!1&&!n?[]:kO(t,s,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(s,o)=>s.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function CO(e){const t={},n=[],r=Object.keys(Gn.plugins.items);for(let s=0;s<r.length;s++)n.push(Gn.getPlugin(r[s]));const i=e.plugins||[];for(let s=0;s<i.length;s++){const o=i[s];n.indexOf(o)===-1&&(n.push(o),t[o.id]=!0)}return{plugins:n,localIds:t}}function _O(e,t){return!t&&e===!1?null:e===!0?{}:e}function kO(e,{plugins:t,localIds:n},r,i){const s=[],o=e.getContext();for(const a of t){const l=a.id,u=_O(r[l],i);u!==null&&s.push({plugin:a,options:OO(e.config,{plugin:a,local:n[l]},u,o)})}return s}function OO(e,{plugin:t,local:n},r,i){const s=e.pluginScopeKeys(t),o=e.getOptionScopes(r,s);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Bd(e,t){const n=ct.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function EO(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function AO(e,t){return e===t?"_index_":"_value_"}function Jg(e){if(e==="x"||e==="y"||e==="r")return e}function PO(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function qd(e,...t){if(Jg(e))return e;for(const n of t){const r=n.axis||PO(n.position)||e.length>1&&Jg(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function ey(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function TO(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return ey(e,"x",n[0])||ey(e,"y",n[0])}return{}}function MO(e,t){const n=Ri[e.type]||{scales:{}},r=t.scales||{},i=Bd(e.type,t),s=Object.create(null);return Object.keys(r).forEach(o=>{const a=r[o];if(!Ie(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=qd(o,a,TO(o,e),ct.scales[a.type]),u=AO(l,i),c=n.scales||{};s[o]=zo(Object.create(null),[{axis:l},a,c[l],c[u]])}),e.data.datasets.forEach(o=>{const a=o.type||e.type,l=o.indexAxis||Bd(a,t),c=(Ri[a]||{}).scales||{};Object.keys(c).forEach(d=>{const f=EO(d,l),h=o[f+"AxisID"]||f;s[h]=s[h]||Object.create(null),zo(s[h],[{axis:f},r[h],c[d]])})}),Object.keys(s).forEach(o=>{const a=s[o];zo(a,[ct.scales[a.type],ct.scale])}),s}function J2(e){const t=e.options||(e.options={});t.plugins=De(t.plugins,{}),t.scales=MO(e,t)}function eb(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function jO(e){return e=e||{},e.data=eb(e.data),J2(e),e}const ty=new Map,tb=new Set;function vl(e,t){let n=ty.get(e);return n||(n=t(),ty.set(e,n),tb.add(n)),n}const So=(e,t,n)=>{const r=ca(t,n);r!==void 0&&e.add(r)};class $O{constructor(t){this._config=jO(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=eb(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),J2(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return vl(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return vl(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return vl(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return vl(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:s}=this,o=this._cachedScopes(t,r),a=o.get(n);if(a)return a;const l=new Set;n.forEach(c=>{t&&(l.add(t),c.forEach(d=>So(l,t,d))),c.forEach(d=>So(l,i,d)),c.forEach(d=>So(l,Ri[s]||{},d)),c.forEach(d=>So(l,ct,d)),c.forEach(d=>So(l,Nd,d))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),tb.has(n)&&o.set(n,u),u}chartOptionScopes(){const{options:t,type:n}=this;return[t,Ri[n]||{},ct.datasets[n]||{},{type:n},ct,Nd]}resolveNamedOptions(t,n,r,i=[""]){const s={$shared:!0},{resolver:o,subPrefixes:a}=ny(this._resolverCache,t,i);let l=o;if(LO(o,n)){s.$shared=!1,r=Xr(r)?r():r;const u=this.createResolver(t,r,a);l=Us(o,r,u)}for(const u of n)s[u]=l[u];return s}createResolver(t,n,r=[""],i){const{resolver:s}=ny(this._resolverCache,t,r);return Ie(n)?Us(s,n,void 0,i):s}}function ny(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let s=r.get(i);return s||(s={resolver:Uf(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,s)),s}const DO=e=>Ie(e)&&Object.getOwnPropertyNames(e).some(t=>Xr(e[t]));function LO(e,t){const{isScriptable:n,isIndexable:r}=L2(e);for(const i of t){const s=n(i),o=r(i),a=(o||s)&&e[i];if(s&&(Xr(a)||DO(a))||o&&ot(a))return!0}return!1}var IO="4.5.0";const RO=["top","bottom","left","right","chartArea"];function ry(e,t){return e==="top"||e==="bottom"||RO.indexOf(e)===-1&&t==="x"}function iy(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function sy(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),et(n&&n.onComplete,[e],t)}function NO(e){const t=e.chart,n=t.options.animation;et(n&&n.onProgress,[e],t)}function nb(e){return Vf()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Rl={},oy=e=>{const t=nb(e);return Object.values(Rl).filter(n=>n.canvas===t).pop()};function FO(e,t,n){const r=Object.keys(e);for(const i of r){const s=+i;if(s>=t){const o=e[i];delete e[i],(n>0||s>t)&&(e[s+n]=o)}}}function BO(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}var Tr;let Ku=(Tr=class{static register(...t){Gn.add(...t),ay()}static unregister(...t){Gn.remove(...t),ay()}constructor(t,n){const r=this.config=new $O(n),i=nb(t),s=oy(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||iO(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,o.aspectRatio),l=a&&a.canvas,u=l&&l.height,c=l&&l.width;if(this.id=G7(),this.ctx=a,this.canvas=l,this.width=c,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new SO,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=d9(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Rl[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}or.listen(this,"complete",sy),or.listen(this,"progress",NO),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:s}=this;return Ye(t)?n&&s?s:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Gn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():jg(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Pg(this.canvas,this.ctx),this}stop(){return or.stop(this),this}resize(t,n){or.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,s=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,t,n,s),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,jg(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),et(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Qe(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((o,a)=>(o[a]=!1,o),{});let s=[];n&&(s=s.concat(Object.keys(n).map(o=>{const a=n[o],l=qd(o,a),u=l==="r",c=l==="x";return{options:a,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),Qe(s,o=>{const a=o.options,l=a.id,u=qd(l,a),c=De(a.type,o.dtype);(a.position===void 0||ry(a.position,u)!==ry(o.dposition))&&(a.position=o.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===c)d=r[l];else{const f=Gn.getScale(c);d=new f({id:l,type:c,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,t)}),Qe(i,(o,a)=>{o||delete r[a]}),Qe(r,o=>{xn.configure(this,o,o.options),xn.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,s)=>i.index-s.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(iy("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(s=>s===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const s=n[r];let o=this.getDatasetMeta(r);const a=s.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(r),o=this.getDatasetMeta(r)),o.type=a,o.indexAxis=s.indexAxis||Bd(a,this.options),o.order=s.order||0,o.index=r,o.label=""+s.label,o.visible=this.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const l=Gn.getController(a),{datasetElementType:u,dataElementType:c}=ct.datasets[a];Object.assign(l,{dataElementType:Gn.getElement(c),datasetElementType:u&&Gn.getElement(u)}),o.controller=new l(this,r),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){Qe(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,c=this.data.datasets.length;u<c;u++){const{controller:d}=this.getDatasetMeta(u),f=!i&&s.indexOf(d)===-1;d.buildOrUpdateElements(f),o=Math.max(+d.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),i||Qe(s,u=>{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(iy("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Qe(this.scales,t=>{xn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!xg(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:s}of n){const o=r==="_removeElements"?-s:s;FO(t,i,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=s=>new Set(t.filter(o=>o[0]===s).map((o,a)=>a+","+o.splice(1).join(","))),i=r(0);for(let s=1;s<n;s++)if(!xg(i,r(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;xn.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Qe(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Xr(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(or.has(this)?this.attached&&!or.running(this)&&or.start(this):(this.draw(),sy({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,s;for(i=0,s=n.length;i<s;++i){const o=n[i];(!t||o.visible)&&r.push(o)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r={meta:t,index:t.index,cancelable:!0},i=G2(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&zu(n,i),t.controller.draw(),i&&Hu(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return hr(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const s=Rk.modes[n];return typeof s=="function"?s(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(s=>s&&s._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=ri(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",s=this.getDatasetMeta(t),o=s.controller._resolveAnimations(void 0,i);iu(n)?(s.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),o.update(s,{visible:r}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),or.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Pg(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Rl[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(s,o)=>{n.addEventListener(this,s,o),t[s]=o},i=(s,o,a)=>{s.offsetX=o,s.offsetY=a,this._eventHandler(s)};Qe(this.options.events,s=>r(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,u)=>{n.addEventListener(this,l,u),t[l]=u},i=(l,u)=>{t[l]&&(n.removeEventListener(this,l,u),delete t[l])},s=(l,u)=>{this.canvas&&this.resize(l,u)};let o;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",s),r("detach",o)};o=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){Qe(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Qe(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let s,o,a,l;for(n==="dataset"&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){o=t[a];const u=o&&this.getDatasetMeta(o.datasetIndex).controller;u&&u[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:s,index:o})=>{const a=this.getDatasetMeta(s);if(!a)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:a.data[o],index:o}});!nu(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,s=(l,u)=>l.filter(c=>!u.some(d=>c.datasetIndex===d.datasetIndex&&c.index===d.index)),o=s(n,t),a=r?t:s(t,n);o.length&&this.updateHoverStyle(o,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const s=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(s||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:s}=this,o=n,a=this._getActiveElements(t,i,r,o),l=X7(t),u=BO(t,this._lastEvent,r,l);r&&(this._lastEvent=null,et(s.onHover,[t,a,this],this),l&&et(s.onClick,[t,a,this],this));const c=!nu(a,i);return(c||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=u,c}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,i)}},pe(Tr,"defaults",ct),pe(Tr,"instances",Rl),pe(Tr,"overrides",Ri),pe(Tr,"registry",Gn),pe(Tr,"version",IO),pe(Tr,"getChart",oy),Tr);function ay(){return Qe(Ku.instances,e=>e._plugins.invalidate())}function rb(e,t,n=t){e.lineCap=De(n.borderCapStyle,t.borderCapStyle),e.setLineDash(De(n.borderDash,t.borderDash)),e.lineDashOffset=De(n.borderDashOffset,t.borderDashOffset),e.lineJoin=De(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=De(n.borderWidth,t.borderWidth),e.strokeStyle=De(n.borderColor,t.borderColor)}function qO(e,t,n){e.lineTo(n.x,n.y)}function zO(e){return e.stepped?O9:e.tension||e.cubicInterpolationMode==="monotone"?E9:qO}function ib(e,t,n={}){const r=e.length,{start:i=0,end:s=r-1}=n,{start:o,end:a}=t,l=Math.max(i,o),u=Math.min(s,a),c=i<o&&s<o||i>a&&s>a;return{count:r,start:l,loop:t.loop,ilen:u<l&&!c?r+u-l:u-l}}function HO(e,t,n,r){const{points:i,options:s}=t,{count:o,start:a,loop:l,ilen:u}=ib(i,n,r),c=zO(s);let{move:d=!0,reverse:f}=r||{},h,g,m;for(h=0;h<=u;++h)g=i[(a+(f?u-h:h))%o],!g.skip&&(d?(e.moveTo(g.x,g.y),d=!1):c(e,m,g,f,s.stepped),m=g);return l&&(g=i[(a+(f?u:0))%o],c(e,m,g,f,s.stepped)),!!l}function UO(e,t,n,r){const i=t.points,{count:s,start:o,ilen:a}=ib(i,n,r),{move:l=!0,reverse:u}=r||{};let c=0,d=0,f,h,g,m,p,v;const b=C=>(o+(u?a-C:C))%s,S=()=>{m!==p&&(e.lineTo(c,p),e.lineTo(c,m),e.lineTo(c,v))};for(l&&(h=i[b(0)],e.moveTo(h.x,h.y)),f=0;f<=a;++f){if(h=i[b(f)],h.skip)continue;const C=h.x,x=h.y,k=C|0;k===g?(x<m?m=x:x>p&&(p=x),c=(d*c+C)/++d):(S(),e.lineTo(C,x),g=k,d=0,m=p=x),v=x}S()}function zd(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?UO:HO}function GO(e){return e.stepped?ak:e.tension||e.cubicInterpolationMode==="monotone"?lk:hi}function KO(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),rb(e,t.options),e.stroke(i)}function VO(e,t,n,r){const{segments:i,options:s}=t,o=zd(t);for(const a of i)rb(e,s,a.style),e.beginPath(),o(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const WO=typeof Path2D=="function";function QO(e,t,n,r){WO&&!t.options.segment?KO(e,t,n,r):VO(e,t,n,r)}class Ur extends Vi{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;J9(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=gk(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],s=this.points,o=U2(this,{property:n,start:i,end:i});if(!o.length)return;const a=[],l=GO(r);let u,c;for(u=0,c=o.length;u<c;++u){const{start:d,end:f}=o[u],h=s[d],g=s[f];if(h===g){a.push(h);continue}const m=Math.abs((i-h[n])/(g[n]-h[n])),p=l(h,g,m,r.stepped);p[n]=t[n],a.push(p)}return a.length===1?a[0]:a}pathSegment(t,n,r){return zd(this)(t,this,n,r)}path(t,n,r){const i=this.segments,s=zd(this);let o=this._loop;n=n||0,r=r||this.points.length-n;for(const a of i)o&=s(t,this,a,{start:n,end:n+r-1});return!!o}draw(t,n,r,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),QO(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}pe(Ur,"id","line"),pe(Ur,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),pe(Ur,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),pe(Ur,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function ly(e,t,n,r){const i=e.options,{[n]:s}=e.getProps([n],r);return Math.abs(t-s)<i.radius+i.hitRadius}class Nl extends Vi{constructor(n){super();pe(this,"parsed");pe(this,"skip");pe(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,i){const s=this.options,{x:o,y:a}=this.getProps(["x","y"],i);return Math.pow(n-o,2)+Math.pow(r-a,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,r){return ly(this,n,"x",r)}inYRange(n,r){return ly(this,n,"y",r)}getCenterPoint(n){const{x:r,y:i}=this.getProps(["x","y"],n);return{x:r,y:i}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const i=r&&n.borderWidth||0;return(r+i)*2}draw(n,r){const i=this.options;this.skip||i.radius<.1||!hr(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Fd(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}pe(Nl,"id","point"),pe(Nl,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),pe(Nl,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function YO(e,t,n){const r=e.segments,i=e.points,s=t.points,o=[];for(const a of r){let{start:l,end:u}=a;u=Vu(l,u,i);const c=Hd(n,i[l],i[u],a.loop);if(!t.segments){o.push({source:a,target:c,start:i[l],end:i[u]});continue}const d=U2(t,c);for(const f of d){const h=Hd(n,s[f.start],s[f.end],f.loop),g=H2(a,i,h);for(const m of g)o.push({source:m,target:f,start:{[n]:uy(c,h,"start",Math.max)},end:{[n]:uy(c,h,"end",Math.min)}})}}return o}function Hd(e,t,n,r){if(r)return;let i=t[e],s=n[e];return e==="angle"&&(i=rn(i),s=rn(s)),{property:e,start:i,end:s}}function XO(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,s=[];return t.segments.forEach(({start:o,end:a})=>{a=Vu(o,a,i);const l=i[o],u=i[a];r!==null?(s.push({x:l.x,y:r}),s.push({x:u.x,y:r})):n!==null&&(s.push({x:n,y:l.y}),s.push({x:n,y:u.y}))}),s}function Vu(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function uy(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function sb(e,t){let n=[],r=!1;return ot(e)?(r=!0,n=e):n=XO(e,t),n.length?new Ur({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function cy(e){return e&&e.fill!==!1}function ZO(e,t,n){let i=e[t].fill;const s=[t];let o;if(!n)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!bt(i))return i;if(o=e[i],!o)return!1;if(o.visible)return i;s.push(i),i=o.fill}return!1}function JO(e,t,n){const r=rE(e);if(Ie(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return bt(i)&&Math.floor(i)===i?eE(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function eE(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function tE(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:Ie(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function nE(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:Ie(e)?r=e.value:r=t.getBaseValue(),r}function rE(e){const t=e.options,n=t.fill;let r=De(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function iE(e){const{scale:t,index:n,line:r}=e,i=[],s=r.segments,o=r.points,a=sE(t,n);a.push(sb({x:null,y:t.bottom},r));for(let l=0;l<s.length;l++){const u=s[l];for(let c=u.start;c<=u.end;c++)oE(i,o[c],a)}return new Ur({points:i,options:{}})}function sE(e,t){const n=[],r=e.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const s=r[i];if(s.index===t)break;s.hidden||n.unshift(s.dataset)}return n}function oE(e,t,n){const r=[];for(let i=0;i<n.length;i++){const s=n[i],{first:o,last:a,point:l}=aE(s,t,"x");if(!(!l||o&&a)){if(o)r.unshift(l);else if(e.push(l),!a)break}}e.push(...r)}function aE(e,t,n){const r=e.interpolate(t,n);if(!r)return{};const i=r[n],s=e.segments,o=e.points;let a=!1,l=!1;for(let u=0;u<s.length;u++){const c=s[u],d=o[c.start][n],f=o[c.end][n];if(as(i,d,f)){a=i===d,l=i===f;break}}return{first:a,last:l,point:r}}class ob{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,r){const{x:i,y:s,radius:o}=this;return n=n||{start:0,end:ln},t.arc(i,s,o,n.end,n.start,!0),!r.bounds}interpolate(t){const{x:n,y:r,radius:i}=this,s=t.angle;return{x:n+Math.cos(s)*i,y:r+Math.sin(s)*i,angle:s}}}function lE(e){const{chart:t,fill:n,line:r}=e;if(bt(n))return uE(t,n);if(n==="stack")return iE(e);if(n==="shape")return!0;const i=cE(e);return i instanceof ob?i:sb(i,r)}function uE(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function cE(e){return(e.scale||{}).getPointPositionForValue?fE(e):dE(e)}function dE(e){const{scale:t={},fill:n}=e,r=tE(n,t);if(bt(r)){const i=t.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function fE(e){const{scale:t,fill:n}=e,r=t.options,i=t.getLabels().length,s=r.reverse?t.max:t.min,o=nE(n,t,s),a=[];if(r.grid.circular){const l=t.getPointPositionForValue(0,s);return new ob({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(o)})}for(let l=0;l<i;++l)a.push(t.getPointPositionForValue(l,o));return a}function Fc(e,t,n){const r=lE(t),{chart:i,index:s,line:o,scale:a,axis:l}=t,u=o.options,c=u.fill,d=u.backgroundColor,{above:f=d,below:h=d}=c||{},g=i.getDatasetMeta(s),m=G2(i,g);r&&o.points.length&&(zu(e,n),hE(e,{line:o,target:r,above:f,below:h,area:n,scale:a,axis:l,clip:m}),Hu(e))}function hE(e,t){const{line:n,target:r,above:i,below:s,area:o,scale:a,clip:l}=t,u=n._loop?"angle":t.axis;e.save();let c=s;s!==i&&(u==="x"?(dy(e,r,o.top),Bc(e,{line:n,target:r,color:i,scale:a,property:u,clip:l}),e.restore(),e.save(),dy(e,r,o.bottom)):u==="y"&&(fy(e,r,o.left),Bc(e,{line:n,target:r,color:s,scale:a,property:u,clip:l}),e.restore(),e.save(),fy(e,r,o.right),c=i)),Bc(e,{line:n,target:r,color:c,scale:a,property:u,clip:l}),e.restore()}function dy(e,t,n){const{segments:r,points:i}=t;let s=!0,o=!1;e.beginPath();for(const a of r){const{start:l,end:u}=a,c=i[l],d=i[Vu(l,u,i)];s?(e.moveTo(c.x,c.y),s=!1):(e.lineTo(c.x,n),e.lineTo(c.x,c.y)),o=!!t.pathSegment(e,a,{move:o}),o?e.closePath():e.lineTo(d.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function fy(e,t,n){const{segments:r,points:i}=t;let s=!0,o=!1;e.beginPath();for(const a of r){const{start:l,end:u}=a,c=i[l],d=i[Vu(l,u,i)];s?(e.moveTo(c.x,c.y),s=!1):(e.lineTo(n,c.y),e.lineTo(c.x,c.y)),o=!!t.pathSegment(e,a,{move:o}),o?e.closePath():e.lineTo(n,d.y)}e.lineTo(n,t.first().y),e.closePath(),e.clip()}function Bc(e,t){const{line:n,target:r,property:i,color:s,scale:o,clip:a}=t,l=YO(n,r,i);for(const{source:u,target:c,start:d,end:f}of l){const{style:{backgroundColor:h=s}={}}=u,g=r!==!0;e.save(),e.fillStyle=h,gE(e,o,a,g&&Hd(i,d,f)),e.beginPath();const m=!!n.pathSegment(e,u);let p;if(g){m?e.closePath():hy(e,r,f,i);const v=!!r.pathSegment(e,c,{move:m,reverse:!0});p=m&&v,p||hy(e,r,d,i)}e.closePath(),e.fill(p?"evenodd":"nonzero"),e.restore()}}function gE(e,t,n,r){const i=t.chart.chartArea,{property:s,start:o,end:a}=r||{};if(s==="x"||s==="y"){let l,u,c,d;s==="x"?(l=o,u=i.top,c=a,d=i.bottom):(l=i.left,u=o,c=i.right,d=a),e.beginPath(),n&&(l=Math.max(l,n.left),c=Math.min(c,n.right),u=Math.max(u,n.top),d=Math.min(d,n.bottom)),e.rect(l,u,c-l,d-u),e.clip()}}function hy(e,t,n,r){const i=t.interpolate(n,r);i&&e.lineTo(i.x,i.y)}var yE={id:"filler",afterDatasetsUpdate(e,t,n){const r=(e.data.datasets||[]).length,i=[];let s,o,a,l;for(o=0;o<r;++o)s=e.getDatasetMeta(o),a=s.dataset,l=null,a&&a.options&&a instanceof Ur&&(l={visible:e.isDatasetVisible(o),index:o,fill:JO(a,o,r),chart:e,axis:s.controller.options.indexAxis,scale:s.vScale,line:a}),s.$filler=l,i.push(l);for(o=0;o<r;++o)l=i[o],!(!l||l.fill===!1)&&(l.fill=ZO(i,o,n.propagate))},beforeDraw(e,t,n){const r=n.drawTime==="beforeDraw",i=e.getSortedVisibleDatasetMetas(),s=e.chartArea;for(let o=i.length-1;o>=0;--o){const a=i[o].$filler;a&&(a.line.updateControlPoints(s,a.axis),r&&a.fill&&Fc(e.ctx,a,s))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const s=r[i].$filler;cy(s)&&Fc(e.ctx,s,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!cy(r)||n.drawTime!=="beforeDatasetDraw"||Fc(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const gy=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},mE=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class yy extends Vi{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=et(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=mt(r.font),s=i.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=gy(r,s);let u,c;n.font=i.string,this.isHorizontal()?(u=this.maxWidth,c=this._fitRows(o,s,a,l)+10):(c=this.maxHeight,u=this._fitCols(o,i,a,l)+10),this.width=Math.min(u,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:s,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],c=i+a;let d=t;s.textAlign="left",s.textBaseline="middle";let f=-1,h=-c;return this.legendItems.forEach((g,m)=>{const p=r+n/2+s.measureText(g.text).width;(m===0||u[u.length-1]+p+2*a>o)&&(d+=c,u[u.length-(m>0?0:1)]=0,h+=c,f++),l[m]={left:0,top:h,row:f,width:p,height:i},u[u.length-1]+=p+a}),d}_fitCols(t,n,r,i){const{ctx:s,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],c=o-t;let d=a,f=0,h=0,g=0,m=0;return this.legendItems.forEach((p,v)=>{const{itemWidth:b,itemHeight:S}=pE(r,n,s,p,i);v>0&&h+S+2*a>c&&(d+=f+a,u.push({width:f,height:h}),g+=f+a,m++,f=h=0),l[v]={left:g,top:h,col:m,width:b,height:S},f=Math.max(f,b),h+=S+a}),d+=f,u.push({width:f,height:h}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:s}}=this,o=us(s,this.left,this.width);if(this.isHorizontal()){let a=0,l=Ot(r,this.left+i,this.right-this.lineWidths[a]);for(const u of n)a!==u.row&&(a=u.row,l=Ot(r,this.left+i,this.right-this.lineWidths[a])),u.top+=this.top+t+i,u.left=o.leftForLtr(o.x(l),u.width),l+=u.width+i}else{let a=0,l=Ot(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const u of n)u.col!==a&&(a=u.col,l=Ot(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),u.top=l,u.left+=this.left+i,u.left=o.leftForLtr(o.x(u.left),u.width),l+=u.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;zu(t,this),this._draw(),Hu(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:s,labels:o}=t,a=ct.color,l=us(t.rtl,this.left,this.width),u=mt(o.font),{padding:c}=o,d=u.size,f=d/2;let h;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;const{boxWidth:g,boxHeight:m,itemHeight:p}=gy(o,d),v=function(k,w,_){if(isNaN(g)||g<=0||isNaN(m)||m<0)return;i.save();const O=De(_.lineWidth,1);if(i.fillStyle=De(_.fillStyle,a),i.lineCap=De(_.lineCap,"butt"),i.lineDashOffset=De(_.lineDashOffset,0),i.lineJoin=De(_.lineJoin,"miter"),i.lineWidth=O,i.strokeStyle=De(_.strokeStyle,a),i.setLineDash(De(_.lineDash,[])),o.usePointStyle){const E={radius:m*Math.SQRT2/2,pointStyle:_.pointStyle,rotation:_.rotation,borderWidth:O},T=l.xPlus(k,g/2),j=w+f;$2(i,E,T,j,o.pointStyleWidth&&g)}else{const E=w+Math.max((d-m)/2,0),T=l.leftForLtr(k,g),j=ls(_.borderRadius);i.beginPath(),Object.values(j).some(B=>B!==0)?au(i,{x:T,y:E,w:g,h:m,radius:j}):i.rect(T,E,g,m),i.fill(),O!==0&&i.stroke()}i.restore()},b=function(k,w,_){Ni(i,_.text,k,w+p/2,u,{strikethrough:_.hidden,textAlign:l.textAlign(_.textAlign)})},S=this.isHorizontal(),C=this._computeTitleHeight();S?h={x:Ot(s,this.left+c,this.right-r[0]),y:this.top+c+C,line:0}:h={x:this.left+c,y:Ot(s,this.top+C+c,this.bottom-n[0].height),line:0},B2(this.ctx,t.textDirection);const x=p+c;this.legendItems.forEach((k,w)=>{i.strokeStyle=k.fontColor,i.fillStyle=k.fontColor;const _=i.measureText(k.text).width,O=l.textAlign(k.textAlign||(k.textAlign=o.textAlign)),E=g+f+_;let T=h.x,j=h.y;l.setWidth(this.width),S?w>0&&T+E+c>this.right&&(j=h.y+=x,h.line++,T=h.x=Ot(s,this.left+c,this.right-r[h.line])):w>0&&j+x>this.bottom&&(T=h.x=T+n[h.line].width+c,h.line++,j=h.y=Ot(s,this.top+C+c,this.bottom-n[h.line].height));const B=l.x(T);if(v(B,j,k),T=f9(O,T+g+f,S?T+E:this.right,t.rtl),b(l.x(T),j,k),S)h.x+=E+c;else if(typeof k.text!="string"){const R=u.lineHeight;h.y+=ab(k,R)+c}else h.y+=x}),q2(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=mt(n.font),i=Mt(n.padding);if(!n.display)return;const s=us(t.rtl,this.left,this.width),o=this.ctx,a=n.position,l=r.size/2,u=i.top+l;let c,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),c=this.top+u,d=Ot(t.align,d,this.right-f);else{const g=this.columnSizes.reduce((m,p)=>Math.max(m,p.height),0);c=u+Ot(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const h=Ot(a,d,d+f);o.textAlign=s.textAlign(qf(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,Ni(o,n.text,h,c,r)}_computeTitleHeight(){const t=this.options.title,n=mt(t.font),r=Mt(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,s;if(as(t,this.left,this.right)&&as(n,this.top,this.bottom)){for(s=this.legendHitBoxes,r=0;r<s.length;++r)if(i=s[r],as(t,i.left,i.left+i.width)&&as(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!xE(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,s=mE(i,r);i&&!s&&et(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!s&&et(n.onHover,[t,r,this],this)}else r&&et(n.onClick,[t,r,this],this)}}function pE(e,t,n,r,i){const s=vE(r,e,t,n),o=bE(i,r,t.lineHeight);return{itemWidth:s,itemHeight:o}}function vE(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((s,o)=>s.length>o.length?s:o)),t+n.size/2+r.measureText(i).width}function bE(e,t,n){let r=e;return typeof t.text!="string"&&(r=ab(t,n)),r}function ab(e,t){const n=e.text?e.text.length:0;return t*n}function xE(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var wE={id:"legend",_element:yy,start(e,t,n){const r=e.legend=new yy({ctx:e.ctx,options:n,chart:e});xn.configure(e,r,n),xn.addBox(e,r)},stop(e){xn.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;xn.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:s,useBorderRadius:o,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const u=l.controller.getStyle(n?0:void 0),c=Mt(u.borderWidth);return{text:t[l.index].label,fillStyle:u.backgroundColor,fontColor:s,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:u.borderColor,pointStyle:r||u.pointStyle,rotation:u.rotation,textAlign:i||u.textAlign,borderRadius:o&&(a||u.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class lb extends Vi{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=ot(r.text)?r.text.length:1;this._padding=Mt(r.padding);const s=i*mt(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:s,options:o}=this,a=o.align;let l=0,u,c,d;return this.isHorizontal()?(c=Ot(a,r,s),d=n+t,u=s-r):(o.position==="left"?(c=r+t,d=Ot(a,i,n),l=ht*-.5):(c=s-t,d=Ot(a,n,i),l=ht*.5),u=i-n),{titleX:c,titleY:d,maxWidth:u,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=mt(n.font),s=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:u}=this._drawArgs(s);Ni(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:u,textAlign:qf(n.align),textBaseline:"middle",translation:[o,a]})}}function SE(e,t){const n=new lb({ctx:e.ctx,options:t,chart:e});xn.configure(e,n,t),xn.addBox(e,n),e.titleBlock=n}var CE={id:"title",_element:lb,start(e,t,n){SE(e,n)},stop(e){const t=e.titleBlock;xn.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;xn.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Do={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,s=0;for(t=0,n=e.length;t<n;++t){const a=e[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();r.add(l.x),i+=l.y,++s}}return s===0||r.size===0?!1:{x:[...r].reduce((a,l)=>a+l)/r.size,y:i/s}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,s,o,a;for(s=0,o=e.length;s<o;++s){const l=e[s].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),c=Rd(t,u);c<i&&(i=c,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function Un(e,t){return t&&(ot(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function ar(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
66
66
|
`)>-1?e.split(`
|
|
67
|
-
`):e}function xE(e,t){const{element:n,datasetIndex:r,index:i}=t,s=e.getDatasetMeta(r).controller,{label:o,value:a}=s.getLabelAndValue(i);return{chart:e,label:o,parsed:s.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:a,dataset:s.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function dy(e,t){const n=e.chart.ctx,{body:r,footer:i,title:s}=e,{boxWidth:o,boxHeight:a}=t,l=yt(t.bodyFont),c=yt(t.titleFont),u=yt(t.footerFont),d=s.length,f=i.length,h=r.length,g=Tt(t.padding);let m=g.height,p=0,v=r.reduce((C,x)=>C+x.before.length+x.lines.length+x.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),v){const C=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=h*C+(v-h)*l.lineHeight+(v-1)*t.bodySpacing}f&&(m+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let b=0;const S=function(C){p=Math.max(p,n.measureText(C).width+b)};return n.save(),n.font=c.string,Ye(e.title,S),n.font=l.string,Ye(e.beforeBody.concat(e.afterBody),S),b=t.displayColors?o+2+t.boxPadding:0,Ye(r,C=>{Ye(C.before,S),Ye(C.lines,S),Ye(C.after,S)}),b=0,n.font=u.string,Ye(e.footer,S),n.restore(),p+=g.width,{width:p,height:m}}function wE(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function SE(e,t,n,r){const{x:i,width:s}=r,o=n.caretSize+n.caretPadding;if(e==="left"&&i+s+o>t.width||e==="right"&&i-s-o<0)return!0}function CE(e,t,n,r){const{x:i,width:s}=n,{width:o,chartArea:{left:a,right:l}}=e;let c="center";return r==="center"?c=i<=(a+l)/2?"left":"right":i<=s/2?c="left":i>=o-s/2&&(c="right"),SE(c,e,t,n)&&(c="center"),c}function fy(e,t,n){const r=n.yAlign||t.yAlign||wE(e,n);return{xAlign:n.xAlign||t.xAlign||CE(e,t,n,r),yAlign:r}}function _E(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function kE(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function hy(e,t,n,r){const{caretSize:i,caretPadding:s,cornerRadius:o}=e,{xAlign:a,yAlign:l}=n,c=i+s,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:h}=as(o);let g=_E(t,a);const m=kE(t,l,c);return l==="center"?a==="left"?g+=c:a==="right"&&(g-=c):a==="left"?g-=Math.max(u,f)+i:a==="right"&&(g+=Math.max(d,h)+i),{x:pn(g,0,r.width-t.width),y:pn(m,0,r.height-t.height)}}function vl(e,t,n){const r=Tt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function gy(e){return zn([],or(e))}function OE(e,t,n){return ni(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function yy(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const rb={beforeTitle:nr,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:nr,beforeBody:nr,beforeLabel:nr,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Xe(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:nr,afterBody:nr,beforeFooter:nr,footer:nr,afterFooter:nr};function It(e,t,n,r){const i=e[t].call(n,r);return typeof i=="undefined"?rb[t].call(n,r):i}class qd extends Gi{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,s=new B2(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=OE(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=It(r,"beforeTitle",this,t),s=It(r,"title",this,t),o=It(r,"afterTitle",this,t);let a=[];return a=zn(a,or(i)),a=zn(a,or(s)),a=zn(a,or(o)),a}getBeforeBody(t,n){return gy(It(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Ye(t,s=>{const o={before:[],lines:[],after:[]},a=yy(r,s);zn(o.before,or(It(a,"beforeLabel",this,s))),zn(o.lines,It(a,"label",this,s)),zn(o.after,or(It(a,"afterLabel",this,s))),i.push(o)}),i}getAfterBody(t,n){return gy(It(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=It(r,"beforeFooter",this,t),s=It(r,"footer",this,t),o=It(r,"afterFooter",this,t);let a=[];return a=zn(a,or(i)),a=zn(a,or(s)),a=zn(a,or(o)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],s=[],o=[];let a=[],l,c;for(l=0,c=n.length;l<c;++l)a.push(xE(this.chart,n[l]));return t.filter&&(a=a.filter((u,d,f)=>t.filter(u,d,f,r))),t.itemSort&&(a=a.sort((u,d)=>t.itemSort(u,d,r))),Ye(a,u=>{const d=yy(t.callbacks,u);i.push(It(d,"labelColor",this,u)),s.push(It(d,"labelPointStyle",this,u)),o.push(It(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let s,o=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const a=$o[r.position].call(this,i,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const l=this._size=dy(this,r),c=Object.assign({},a,l),u=fy(this.chart,r,c),d=hy(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,s={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const s=this.getCaretPosition(t,r,i);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:s}=this,{caretSize:o,cornerRadius:a}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=as(a),{x:f,y:h}=t,{width:g,height:m}=n;let p,v,b,S,C,x;return s==="center"?(C=h+m/2,i==="left"?(p=f,v=p-o,S=C+o,x=C-o):(p=f+g,v=p+o,S=C-o,x=C+o),b=p):(i==="left"?v=f+Math.max(l,u)+o:i==="right"?v=f+g-Math.max(c,d)-o:v=this.caretX,s==="top"?(S=h,C=S-o,p=v-o,b=v+o):(S=h+m,C=S+o,p=v+o,b=v-o),x=S),{x1:p,x2:v,x3:b,y1:S,y2:C,y3:x}}drawTitle(t,n,r){const i=this.title,s=i.length;let o,a,l;if(s){const c=ls(r.rtl,this.x,this.width);for(t.x=vl(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",o=yt(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<s;++l)n.fillText(i[l],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,l+1===s&&(t.y+=r.titleMarginBottom-a)}}_drawColorBox(t,n,r,i,s){const o=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=s,u=yt(s.bodyFont),d=vl(this,"left",s),f=i.x(d),h=l<u.lineHeight?(u.lineHeight-l)/2:0,g=n.y+h;if(s.usePointStyle){const m={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},p=i.leftForLtr(f,c)+c/2,v=g+l/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,Id(t,m,p,v),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,Id(t,m,p,v)}else{t.lineWidth=Be(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const m=i.leftForLtr(f,c),p=i.leftForLtr(i.xPlus(f,1),c-2),v=as(o.borderRadius);Object.values(v).some(b=>b!==0)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,ic(t,{x:m,y:g,w:c,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),ic(t,{x:p,y:g+1,w:c-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(m,g,c,l),t.strokeRect(m,g,c,l),t.fillStyle=o.backgroundColor,t.fillRect(p,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:s,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=yt(r.bodyFont);let f=d.lineHeight,h=0;const g=ls(r.rtl,this.x,this.width),m=function(_){n.fillText(_,g.x(t.x+h),t.y+f/2),t.y+=f+s},p=g.textAlign(o);let v,b,S,C,x,k,w;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,t.x=vl(this,p,r),n.fillStyle=r.bodyColor,Ye(this.beforeBody,m),h=a&&p!=="right"?o==="center"?c/2+u:c+2+u:0,C=0,k=i.length;C<k;++C){for(v=i[C],b=this.labelTextColors[C],n.fillStyle=b,Ye(v.before,m),S=v.lines,a&&S.length&&(this._drawColorBox(n,t,C,g,r),f=Math.max(d.lineHeight,l)),x=0,w=S.length;x<w;++x)m(S[x]),f=d.lineHeight;Ye(v.after,m)}h=0,f=d.lineHeight,Ye(this.afterBody,m),t.y-=s}drawFooter(t,n,r){const i=this.footer,s=i.length;let o,a;if(s){const l=ls(r.rtl,this.x,this.width);for(t.x=vl(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=yt(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,a=0;a<s;++a)n.fillText(i[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:s,yAlign:o}=this,{x:a,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:h,bottomRight:g}=as(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+d,l),o==="top"&&this.drawCaret(t,n,r,i),n.lineTo(a+c-f,l),n.quadraticCurveTo(a+c,l,a+c,l+f),o==="center"&&s==="right"&&this.drawCaret(t,n,r,i),n.lineTo(a+c,l+u-g),n.quadraticCurveTo(a+c,l+u,a+c-g,l+u),o==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(a+h,l+u),n.quadraticCurveTo(a,l+u,a,l+u-h),o==="center"&&s==="left"&&this.drawCaret(t,n,r,i),n.lineTo(a,l+d),n.quadraticCurveTo(a,l,a+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,s=r&&r.y;if(i||s){const o=$o[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=dy(this,t),l=Object.assign({},o,this._size),c=fy(n,t,l),u=hy(t,l,c,n);(i._to!==u.x||s._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const o=Tt(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(s,t,i,n),D2(t,n.textDirection),s.y+=o.top,this.drawTitle(s,t,n),this.drawBody(s,t,n),this.drawFooter(s,t,n),L2(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),s=!Jl(r,i),o=this._positionChanged(i,n);(s||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],o=this._getActiveElements(t,s,n,r),a=this._positionChanged(o,t),l=n||!Jl(o,s)||a;return l&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const s=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,s.mode,s,r);return s.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:r,caretY:i,options:s}=this,o=$o[s.position].call(this,t,n);return o!==!1&&(r!==o.x||i!==o.y)}}ve(qd,"positioners",$o);var EE={id:"tooltip",_element:qd,positioners:$o,afterInit(e,t,n){n&&(e.tooltip=new qd({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:rb},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const AE=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function PE(e,t,n,r){const i=e.indexOf(t);if(i===-1)return AE(e,t,n,r);const s=e.lastIndexOf(t);return i!==s?n:i}const TE=(e,t)=>e===null?null:pn(Math.round(e),0,t);function my(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class zd extends eo{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:s}of n)r[i]===s&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Xe(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:PE(r,t,Re(n,t),this._addedLabels),TE(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let s=this.getLabels();s=t===0&&n===s.length-1?s:s.slice(t,n+1),this._valueRange=Math.max(s.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let o=t;o<=n;o++)i.push({value:o});return i}getLabelForValue(t){return my.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}ve(zd,"id","category"),ve(zd,"defaults",{ticks:{callback:my}});function ME(e,t){const n=[],{bounds:i,step:s,min:o,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,h=s||1,g=u-1,{min:m,max:p}=t,v=!Xe(o),b=!Xe(a),S=!Xe(c),C=(p-m)/(d+1);let x=pg((p-m)/g/h)*h,k,w,_,O;if(x<1e-14&&!v&&!b)return[{value:m},{value:p}];O=Math.ceil(p/x)-Math.floor(m/x),O>g&&(x=pg(O*x/g/h)*h),Xe(l)||(k=Math.pow(10,l),x=Math.ceil(x*k)/k),i==="ticks"?(w=Math.floor(m/x)*x,_=Math.ceil(p/x)*x):(w=m,_=p),v&&b&&s&&Z7((a-o)/s,x/1e3)?(O=Math.round(Math.min((a-o)/x,u)),x=(a-o)/O,w=o,_=a):S?(w=v?o:w,_=b?a:_,O=c-1,x=(_-w)/O):(O=(_-w)/x,zo(O,Math.round(O),x/1e3)?O=Math.round(O):O=Math.ceil(O));const E=Math.max(vg(x),vg(w));k=Math.pow(10,Xe(l)?E:l),w=Math.round(w*k)/k,_=Math.round(_*k)/k;let j=0;for(v&&(f&&w!==o?(n.push({value:o}),w<o&&j++,zo(Math.round((w+j*x)*k)/k,o,py(o,C,e))&&j++):w<o&&j++);j<O;++j){const $=Math.round((w+j*x)*k)/k;if(b&&$>a)break;n.push({value:$})}return b&&f&&_!==a?n.length&&zo(n[n.length-1].value,a,py(a,C,e))?n[n.length-1].value=a:n.push({value:a}):(!b||_===a)&&n.push({value:_}),n}function py(e,t,{horizontal:n,minRotation:r}){const i=zr(r),s=(n?Math.sin(i):Math.cos(i))||.001,o=.75*t*(""+e).length;return Math.min(t/s,o)}class Hd extends eo{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return Xe(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:s}=this;const o=l=>i=n?i:l,a=l=>s=r?s:l;if(t){const l=zs(i),c=zs(s);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(i===s){let l=s===0?1:Math.abs(s*.05);a(s+l),t||o(i-l)}this.min=i,this.max=s}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,o=ME(i,s);return t.bounds==="ticks"&&J7(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return O2(t,this.chart.options.locale,this.options.ticks.format)}}class Ud extends Hd{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=vt(t)?t:0,this.max=vt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=zr(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}ve(Ud,"id","linear"),ve(Ud,"defaults",{ticks:{callback:Nf.formatters.numeric}});function Gd(e){const t=e.ticks;if(t.display&&e.display){const n=Tt(t.backdropPadding);return Re(t.font&&t.font.size,dt.font.size)+n.height}return 0}function jE(e,t,n){return n=at(n)?n:[n],{w:w9(e,t.string,n),h:n.length*t.lineHeight}}function vy(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function $E(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],s=e._pointLabels.length,o=e.options.pointLabels,a=o.centerPointLabels?ht/s:0;for(let l=0;l<s;l++){const c=o.setContext(e.getPointLabelContext(l));i[l]=c.padding;const u=e.getPointPosition(l,e.drawingArea+i[l],a),d=yt(c.font),f=jE(e.ctx,d,e._pointLabels[l]);r[l]=f;const h=tn(e.getIndexAngle(l)+a),g=Math.round(Df(h)),m=vy(g,u.x,f.w,0,180),p=vy(g,u.y,f.h,90,270);DE(n,t,h,m,p)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=RE(e,r,i)}function DE(e,t,n,r,i){const s=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let a=0,l=0;r.start<t.l?(a=(t.l-r.start)/s,e.l=Math.min(e.l,t.l-a)):r.end>t.r&&(a=(r.end-t.r)/s,e.r=Math.max(e.r,t.r+a)),i.start<t.t?(l=(t.t-i.start)/o,e.t=Math.min(e.t,t.t-l)):i.end>t.b&&(l=(i.end-t.b)/o,e.b=Math.max(e.b,t.b+l))}function LE(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:s,padding:o,size:a}=n,l=e.getPointPosition(t,r+i+o,s),c=Math.round(Df(tn(l.angle+sn))),u=BE(l.y,a.h,c),d=NE(c),f=FE(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:f,top:u,right:f+a.w,bottom:u+a.h}}function IE(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:s}=e;return!(fr({x:n,y:r},t)||fr({x:n,y:s},t)||fr({x:i,y:r},t)||fr({x:i,y:s},t))}function RE(e,t,n){const r=[],i=e._pointLabels.length,s=e.options,{centerPointLabels:o,display:a}=s.pointLabels,l={extra:Gd(s)/2,additionalAngle:o?ht/i:0};let c;for(let u=0;u<i;u++){l.padding=n[u],l.size=t[u];const d=LE(e,u,l);r.push(d),a==="auto"&&(d.visible=IE(d,c),d.visible&&(c=d))}return r}function NE(e){return e===0||e===180?"center":e<180?"left":"right"}function FE(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function BE(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function qE(e,t,n){const{left:r,top:i,right:s,bottom:o}=n,{backdropColor:a}=t;if(!Xe(a)){const l=as(t.borderRadius),c=Tt(t.backdropPadding);e.fillStyle=a;const u=r-c.left,d=i-c.top,f=s-r+c.width,h=o-i+c.height;Object.values(l).some(g=>g!==0)?(e.beginPath(),ic(e,{x:u,y:d,w:f,h,radius:l}),e.fill()):e.fillRect(u,d,f,h)}}function zE(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const s=e._pointLabelItems[i];if(!s.visible)continue;const o=r.setContext(e.getPointLabelContext(i));qE(n,o,s);const a=yt(o.font),{x:l,y:c,textAlign:u}=s;Ii(n,e._pointLabels[i],l,c+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}function ib(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,on);else{let s=e.getPointPosition(0,t);i.moveTo(s.x,s.y);for(let o=1;o<r;o++)s=e.getPointPosition(o,t),i.lineTo(s.x,s.y)}}function HE(e,t,n,r,i){const s=e.ctx,o=t.circular,{color:a,lineWidth:l}=t;!o&&!r||!a||!l||n<0||(s.save(),s.strokeStyle=a,s.lineWidth=l,s.setLineDash(i.dash||[]),s.lineDashOffset=i.dashOffset,s.beginPath(),ib(e,n,o,r),s.closePath(),s.stroke(),s.restore())}function UE(e,t,n){return ni(e,{label:n,index:t,type:"pointLabel"})}class Do extends Hd{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Tt(Gd(this.options)/2),n=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=vt(t)&&!isNaN(t)?t:0,this.max=vt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Gd(this.options))}generateTickLabels(t){Hd.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,r)=>{const i=nt(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?$E(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=on/(this._pointLabels.length||1),r=this.options.startAngle||0;return tn(t*n+zr(r))}getDistanceFromCenterForValue(t){if(Xe(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(Xe(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const r=n[t];return UE(this.getContext(),t,r)}}getPointPosition(t,n,r=0){const i=this.getIndexAngle(t)-sn+r;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:r,right:i,bottom:s}=this._pointLabelItems[t];return{left:n,top:r,right:i,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),ib(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:r,grid:i,border:s}=n,o=this._pointLabels.length;let a,l,c;if(n.pointLabels.display&&zE(this,o),i.display&&this.ticks.forEach((u,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(d),h=i.setContext(f),g=s.setContext(f);HE(this,h,l,o,g)}}),r.display){for(t.save(),a=o-1;a>=0;a--){const u=r.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:f}=u;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let s,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),u=yt(c.font);if(s=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,o=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const d=Tt(c.backdropPadding);t.fillRect(-o/2-d.left,-s-u.size/2-d.top,o+d.width,u.size+d.height)}Ii(t,a.label,0,-s,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}ve(Do,"id","radialLinear"),ve(Do,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Nf.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),ve(Do,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),ve(Do,"descriptors",{angleLines:{_fallback:"grid"}});const Gc={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Bt=Object.keys(Gc);function by(e,t){return e-t}function xy(e,t){if(Xe(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:s}=e._parseOpts;let o=t;return typeof r=="function"&&(o=r(o)),vt(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(ua(s)||s===!0)?n.startOf(o,"isoWeek",s):n.startOf(o,i)),+o)}function wy(e,t,n,r){const i=Bt.length;for(let s=Bt.indexOf(e);s<i-1;++s){const o=Gc[Bt[s]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(a*o.size))<=r)return Bt[s]}return Bt[i-1]}function GE(e,t,n,r,i){for(let s=Bt.length-1;s>=Bt.indexOf(n);s--){const o=Bt[s];if(Gc[o].common&&e._adapter.diff(i,r,o)>=t-1)return o}return Bt[n?Bt.indexOf(n):0]}function KE(e){for(let t=Bt.indexOf(e)+1,n=Bt.length;t<n;++t)if(Gc[Bt[t]].common)return Bt[t]}function Sy(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=Lf(n,t),s=n[r]>=t?n[r]:n[i];e[s]=!0}}function VE(e,t,n,r){const i=e._adapter,s=+i.startOf(t[0].value,r),o=t[t.length-1].value;let a,l;for(a=s;a<=o;a=+i.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function Cy(e,t,n){const r=[],i={},s=t.length;let o,a;for(o=0;o<s;++o)a=t[o],i[a]=o,r.push({value:a,major:!1});return s===0||!n?r:VE(e,r,i,n)}class ac extends eo{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),i=this._adapter=new Ak._date(t.adapters.date);i.init(n),qo(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:xy(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:s,minDefined:o,maxDefined:a}=this.getUserBounds();function l(c){!o&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!a&&!isNaN(c.max)&&(s=Math.max(s,c.max))}(!o||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=vt(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),s=vt(s)&&!isNaN(s)?s:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,o=this.max,a=i9(i,s,o);return this._unit=n.unit||(r.autoSkip?wy(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):GE(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:KE(this._unit),this.initOffsets(i),t.reverse&&a.reverse(),Cy(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,s;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,s=this.getDecimalForValue(t[t.length-1]),t.length===1?r=s:r=(s-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=pn(n,0,o),r=pn(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,s=i.time,o=s.unit||wy(s.minUnit,n,r,this._getLabelCapacity(n)),a=Re(i.ticks.stepSize,1),l=o==="week"?s.isoWeekday:!1,c=ua(l)||l===!0,u={};let d=n,f,h;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":o),t.diff(r,n,o)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+o);const g=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f<r;f=+t.add(f,a,o),h++)Sy(u,f,g);return(f===r||i.bounds==="ticks"||h===1)&&Sy(u,f,g),Object.keys(u).sort(by).map(m=>+m)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,s=this._unit,o=n||i[s];return this._adapter.format(t,o)}_tickFormatFunction(t,n,r,i){const s=this.options,o=s.ticks.callback;if(o)return nt(o,[t,n,r],this);const a=s.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],f=r[n],h=c&&d&&f&&f.major;return this._adapter.format(t,i||(h?d:u))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=zr(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(i),o=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:r*s+a*o,h:r*o+a*s}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,s=this._tickFormatFunction(t,0,Cy(this,[t],this._majorUnit),i),o=this._getLabelSize(s),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(xy(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return o9(t.sort(by))}}ve(ac,"id","time"),ve(ac,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function bl(e,t,n){let r=0,i=e.length-1,s,o,a,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=mi(e,"pos",t)),{pos:s,time:a}=e[r],{pos:o,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=mi(e,"time",t)),{time:s,pos:a}=e[r],{time:o,pos:l}=e[i]);const c=o-s;return c?a+(l-a)*(t-s)/c:a}class _y extends ac{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=bl(n,this.min),this._tableRange=bl(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],s=[];let o,a,l,c,u;for(o=0,a=t.length;o<a;++o)c=t[o],c>=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,a=i.length;o<a;++o)u=i[o+1],l=i[o-1],c=i[o],Math.round((u+l)/2)!==c&&s.push({time:c,pos:o/(a-1)});return s}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,s)=>i-s)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(bl(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return bl(this._table,r*this._tableRange+this._minPos,!0)}}ve(_y,"id","timeseries"),ve(_y,"defaults",ac.defaults);const sb="label";function ky(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function WE(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function ob(e,t){e.labels=t}function ab(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:sb;const r=[];e.datasets=t.map(i=>{const s=e.datasets.find(o=>o[n]===i[n]);return!s||!i.data||r.includes(s)?{...i}:(r.push(s),Object.assign(s,i),s)})}function QE(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:sb;const n={labels:[],datasets:[]};return ob(n,e.labels),ab(n,e.datasets,t),n}function YE(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:s,type:o,data:a,options:l,plugins:c=[],fallbackContent:u,updateMode:d,...f}=e,h=z.useRef(null),g=z.useRef(null),m=()=>{h.current&&(g.current=new Hc(h.current,{type:o,data:QE(a,s),options:l&&{...l},plugins:c}),ky(t,g.current))},p=()=>{ky(t,null),g.current&&(g.current.destroy(),g.current=null)};return z.useEffect(()=>{!i&&g.current&&l&&WE(g.current,l)},[i,l]),z.useEffect(()=>{!i&&g.current&&ob(g.current.config.data,a.labels)},[i,a.labels]),z.useEffect(()=>{!i&&g.current&&a.datasets&&ab(g.current.config.data,a.datasets,s)},[i,a.datasets]),z.useEffect(()=>{g.current&&(i?(p(),setTimeout(m)):g.current.update(d))},[i,l,a.labels,a.datasets,d]),z.useEffect(()=>{g.current&&(p(),setTimeout(m))},[o]),z.useEffect(()=>(m(),()=>p()),[]),z.createElement("canvas",{ref:h,role:"img",height:n,width:r,...f},u)}const XE=z.forwardRef(YE);function lb(e,t){return Hc.register(t),z.forwardRef((n,r)=>z.createElement(XE,{...n,ref:r,type:e}))}const ZE=lb("line",$l),JE=lb("radar",Dl);Hc.register(zd,Ud,Do,Hr,Rl,dE,bE,EE,pE);var Kd={elements:{line:{backgroundColor:"rgba(166, 30, 105, 0.2)",borderColor:"rgba(166, 30, 105, 1)",borderWidth:4},point:{backgroundColor:"rgba(166, 30, 105, 1)",borderColor:"rgba(255,255,255, .9)",borderWidth:2,radius:5,hoverRadius:6,hoverBorderWidth:3}},responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{mode:"index",intersect:!1}},interaction:{mode:"nearest",axis:"x",intersect:!1}},eA=function(t){var n=t.chart.ctx,r=t.chart.chartArea;if(!r)return"rgba(166, 30, 105, 0.1)";var i=(r.left+r.right)/2,s=(r.top+r.bottom)/2,o=Math.min((r.right-r.left)/2,(r.bottom-r.top)/2),a=n.createRadialGradient(i,s,0,i,s,o);return a.addColorStop(0,"rgba(255, 255, 255, 0.4)"),a.addColorStop(.3,"rgba(255, 255, 255, 0.4)"),a.addColorStop(1,"rgba(166, 30, 105, 0.2)"),a};function Oy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ey(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Oy(Object(n),!0).forEach(function(r){tA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tA(e,t,n){return(t=nA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nA(e){var t=rA(e,"string");return Gs(t)=="symbol"?t:t+""}function rA(e,t){if(Gs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gs(e){"@babel/helpers - typeof";return Gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gs(e)}function iA(e){var t=new Date(e);return isNaN(t.getTime())?String(e):t.toLocaleString("en-US",{month:"short",day:"numeric"})}var sA=function(){var t,n,r,i,s=Ui(),o=s.data,a=s.isLoading,l=s.isRefetching,c=o==null?void 0:o.mentions,u=c==null||(t=c.mentionedInNumberOfQueries)===null||t===void 0||(t=t.previous)===null||t===void 0?void 0:t.difference,d=c==null?void 0:c.chart,f=Array.isArray(d==null?void 0:d.labels)?d.labels:d!=null&&d.labels&&Gs(d.labels)==="object"?Object.values(d.labels):[],h=f.map(function(v){return iA(String(v))}),g=o==null?void 0:o.numberOfQueries;if(!g){var m=0;Array.isArray(d==null?void 0:d.datasets)&&d.datasets.forEach(function(v){Array.isArray(v==null?void 0:v.data)&&v.data.forEach(function(b){typeof b=="number"&&b>m&&(m=b)})}),g=m+2}var p=Ey(Ey({},Kd),{},{responsive:!0,maintainAspectRatio:!1,scales:{x:{display:!0,title:{display:!1,text:"Date"},grid:{display:!1}},y:{display:!0,title:{display:!1,text:"Number of Mentions"},beginAtZero:!0,max:g,ticks:{stepSize:1}}}});return y.jsx(P.Card,{className:"yst-overflow-visible",children:y.jsxs(P.Card.Content,{className:"yst-space-y-4",children:[y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(Ba,{title:"Mentions progress",tooltip:"Tracks how your brand mentions have changed over time across the same query set."}),y.jsx(Fa,{score:c==null||(n=c.mentionedInNumberOfQueries)===null||n===void 0?void 0:n.value,total:o==null?void 0:o.numberOfQueries,delta:u,deltaSuffix:"since last scan",suffix:"queries",isLoading:a||l})]}),Array.isArray(d==null||(r=d.datasets)===null||r===void 0?void 0:r.data)&&(d==null||(i=d.datasets)===null||i===void 0?void 0:i.data.length)<2?y.jsx(P.Alert,{variant:"info",children:"One more analysis needed to show more insights."}):y.jsx("div",{className:"yst-h-72",children:y.jsx(ZE,{data:function(){var v={labels:h,datasets:[d==null?void 0:d.datasets]};return v}(),options:p})})]})})};function xl(e){var t=e.value,n=t===void 0?"—":t,r=e.label,i=e.tooltip,s=e.className,o=e.borderBottom,a=o===void 0?!1:o,l=e.borderRight,c=l===void 0?!1:l,u=e.delta,d=e.tooltipPosition,f=d===void 0?"left":d;return y.jsxs("div",{className:ke("yst-relative yst-flex yst-flex-col yst-items-center yst-gap-1 yst-p-4 yst-text-center",a&&"yst-border-b yst-border-slate-200",c&&"yst-border-r yst-border-slate-200",s),children:[y.jsx("p",{className:"yst-text-2xl yst-font-bold yst-text-slate-900",children:n}),y.jsx("p",{className:"yst-text-tiny yst-text-slate-600",children:r}),typeof u=="number"&&y.jsxs("p",{className:ke("yst-flex yst-items-center yst-gap-1 yst-text-tiny yst-font-bold",na(u)),children:[u>0?y.jsx(i2,{}):u<0?y.jsx(r2,{}):null,u>-1e-6&&"+",u]}),i&&y.jsx(Af,{id:"tooltip-".concat(r.replace(/\s+/g,"-").toLowerCase()),className:"yst-absolute yst-right-2 yst-top-2",position:f,children:i})]})}function oA(e){var t=e.children,n=e.className;return y.jsx("div",{className:ke("yst-grid yst-w-full yst-grid-cols-2 yst-gap-0 yst-rounded-lg",n),children:t})}function aA(e){return e>0?"yst-text-green-600":e<0?"yst-text-red-600":"yst-text-slate-500"}function lA(e){var t=e.current,n=e.previous,r=e.className;if(typeof n!="number")return null;var i=t-n,s=i>0,o=i<0,a="".concat(i>0?"+":"").concat(i.toFixed(1),"%");return y.jsxs("div",{className:ke("yst-flex yst-items-center yst-gap-1 yst-text-tiny yst-font-bold",aA(i),r),"aria-label":s?"Visibility increased by ".concat(a):o?"Visibility decreased by ".concat(a):"No change in visibility",children:[s&&y.jsx(i2,{className:"yst-w-4 yst-h-4"}),o&&y.jsx(r2,{className:"yst-w-4 yst-h-4"}),a]})}function fa(e){"@babel/helpers - typeof";return fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fa(e)}function cA(e,t){return hA(e)||fA(e,t)||dA(e,t)||uA()}function uA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
68
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dA(e,t){if(e){if(typeof e=="string")return Ay(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ay(e,t):void 0}}function Ay(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function fA(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function hA(e){if(Array.isArray(e))return e}function Py(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Py(Object(n),!0).forEach(function(r){gA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Py(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gA(e,t,n){return(t=yA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yA(e){var t=mA(e,"string");return fa(t)=="symbol"?t:t+""}function mA(e,t){if(fa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pA(){var e,t,n,r,i,s,o,a,l,c,u,d,f,h,g,m,p,v,b,S,C,x,k,w,_=Jn(),O=_.brandId,E=_.analysisId,j=Mc(O,E,{query:{select:function(We){var Q=We.data;return Q},enabled:!!O&&!!E}}),$=j.data,B=j.isLoading,R=$==null||(e=$.analysis)===null||e===void 0?void 0:e.scans,A=Array.isArray(R)&&R.length>0?R.reduce(function(De,We){if(!De)return We;if(!(We!=null&&We.finishedAt)||!(De!=null&&De.finishedAt))return De;var Q=new Date(We.finishedAt),Me=new Date(De.finishedAt);return Q>Me?We:De},R[0]):void 0,T=A==null||(t=A.scores)===null||t===void 0?void 0:t.standardized,I=(n=A==null||(r=A.mentions)===null||r===void 0||(r=r.mentionedInNumberOfQueries)===null||r===void 0?void 0:r.value)!==null&&n!==void 0?n:0,G=A==null||(i=A.mentions)===null||i===void 0||(i=i.mentionedInNumberOfQueries)===null||i===void 0||(i=i.previous)===null||i===void 0?void 0:i.difference,X=(s=A==null||(o=A.scores)===null||o===void 0||(o=o.standardized)===null||o===void 0||(o=o.citations)===null||o===void 0?void 0:o.value)!==null&&s!==void 0?s:0,F=(a=A==null||(l=A.citations)===null||l===void 0||(l=l.total)===null||l===void 0?void 0:l.value)!==null&&a!==void 0?a:0,W=A==null||(c=A.citations)===null||c===void 0||(c=c.total)===null||c===void 0||(c=c.previous)===null||c===void 0?void 0:c.difference,ie=A==null||(u=A.rankings)===null||u===void 0||(u=u.list)===null||u===void 0?void 0:u.find(function(De){var We;return((We=De.brand)===null||We===void 0?void 0:We.isSelf)===!0}),oe=(d=ie==null||(f=ie.rank)===null||f===void 0?void 0:f.value)!==null&&d!==void 0?d:"—",N=ie==null||(h=ie.rank)===null||h===void 0||(h=h.previous)===null||h===void 0?void 0:h.difference;N&&(N=N*-1);var ce=(g=T==null||(m=T.visibility)===null||m===void 0?void 0:m.value)!==null&&g!==void 0?g:0,re=T==null||(p=T.visibility)===null||p===void 0||(p=p.previous)===null||p===void 0?void 0:p.value,me=(v=T==null||(b=T.ranking)===null||b===void 0?void 0:b.value)!==null&&v!==void 0?v:0,J=(S=T==null||(C=T.sentiment)===null||C===void 0?void 0:C.value)!==null&&S!==void 0?S:0,Se=(x=T==null||(k=T.mentions)===null||k===void 0?void 0:k.value)!==null&&x!==void 0?x:0,te={labels:["Mentions","Ranking","Citations","Sentiment"],datasets:[{data:[Se,me,X,J],backgroundColor:eA,pointBackgroundColor:"rgba(166, 30, 105, 1)"}]},de=wl(wl({},Kd),{},{plugins:wl(wl({},Kd.plugins),{},{tooltip:{mode:"point",intersect:!0,callbacks:{label:function(We){var Q=We.label||"",Me=We.parsed.r||0;return"".concat(Q,": ").concat(Me,"%")}}}}),interaction:{mode:"point",intersect:!0},scales:{r:{beginAtZero:!0,min:0,max:100,ticks:{stepSize:20}}}}),H=z.useState(typeof window!="undefined"&&window.innerWidth<800?"top":"left"),he=cA(H,2),je=he[0],et=he[1];return z.useEffect(function(){function De(){et(window.innerWidth<800?"top":"left")}return window.addEventListener("resize",De),function(){return window.removeEventListener("resize",De)}},[]),y.jsx(P.Card,{className:"yst-overflow-visible md:yst-col-span-2",children:y.jsxs(P.Card.Content,{children:[y.jsx(P.Title,{size:"3",className:"yst-mb-2",children:"AI visibility index (AIVI)"}),y.jsx(Fa,{score:ce,total:100,isLoading:B}),y.jsx(lA,{current:ce,previous:re,className:"yst-mb-4"}),y.jsxs("div",{className:"yst-flex yst-flex-col yst-items-center yst-justify-around yst-justify-items-center yst-gap-8 md:yst-flex-row",children:[y.jsxs("div",{className:"yst-radar-chart-container yst-relative yst-aspect-square yst-h-full yst-w-full md:yst-flex md:yst-w-1/2 md:yst-items-center md:yst-justify-center",children:[y.jsx(JE,{data:te,options:de}),y.jsx(Af,{id:"tooltip-radar-chart",className:"yst-absolute yst-right-2 yst-top-2",position:"left",children:"The AI Visibility Index (AIVI) shows how visible your brand is across major AI platforms like ChatGPT, based on mentions, citations, sentiment, and rankings."})]}),y.jsx("div",{className:"yst-mt-6 yst-w-full md:yst-mt-0 md:yst-flex md:yst-w-1/2 md:yst-items-center",children:y.jsxs(oA,{children:[y.jsx(xl,{value:I,label:"Mentions",tooltip:"Mentions show how often your brand appears in AI-generated answers to the questions we send to LLMs.",borderBottom:!0,borderRight:!0,delta:G,tooltipPosition:je}),y.jsx(xl,{value:oe&&y.jsxs(y.Fragment,{children:[oe,oe===1&&" 🏆"]}),label:"Competitor ranking",tooltip:"Ranking shows the position your brand is mentioned in AI-generated answers—whether in a numbered list or the order of appearance in full-text responses.",borderBottom:!0,delta:N}),y.jsx(xl,{value:F,label:"Citations",tooltip:"Citations are the source links found in AI-generated answers. They form the basis for mentions, sentiment, and ranking insights.",borderRight:!0,delta:W,tooltipPosition:je}),y.jsx(xl,{value:J?"".concat(J,"%"):"—",label:"Positive sentiment",tooltip:"Sentiment reflects how positively, neutrally, or negatively your brand is mentioned in AI-generated answers, based on the cited sources.",delta:A==null||(w=A.scores)===null||w===void 0||(w=w.standardized)===null||w===void 0||(w=w.sentiment)===null||w===void 0||(w=w.previous)===null||w===void 0?void 0:w.difference})]})})]})]})})}var Nu=function(){var t=Jn(),n=t.brandId,r=t.analysisId,i=Hi({query:{select:function(m){var p=m.data;return p==null?void 0:p.brands}}}),s=i.data,o=i.isLoading,a=Mc(n,r,{query:{enabled:!!n&&w6(r),select:function(m){var p=m.data;return p==null?void 0:p.analysis}}}),l=a.data,c=a.isLoading,u=l==null?void 0:l.status,d=o||c,f=s&&(s==null?void 0:s.length)>0,h=!d&&l&&u===li.completed;return o?y.jsx(Dc,{}):f?y.jsxs("div",{className:"yst-space-y-4",children:[y.jsx(p7,{}),h&&y.jsxs("div",{className:"yst-space-y-4",children:[y.jsxs("div",{className:"yst-flex yst-items-center yst-justify-between",children:[y.jsx(P.Title,{size:"2",children:"Your brand analysis"}),y.jsxs(P.Button,{as:ei,variant:"secondary",to:"/brands/".concat(n,"/brand-list"),className:ke("yst-gap-1.5"),disabled:!n,children:[y.jsx(e2,{})," Edit brand list"]})]}),y.jsxs("div",{className:"yst-grid yst-grid-cols-1 yst-gap-4 md:yst-grid-cols-2",children:[y.jsx(pA,{}),y.jsx(v7,{}),y.jsx(sA,{}),y.jsx(E_,{}),y.jsx(w_,{}),y.jsx(o_,{}),y.jsx(A_,{})]})]})]}):y.jsx(U6,{})};function cb(e){var t=e.children,n=e.description,r=e.title;return y.jsxs(P.Card.Header,{className:"yst-h-auto yst-flex-col yst-items-start yst-gap-0 yst-border-b-[1px] yst-border-b-slate-200 yst-bg-white yst-py-8",children:[r&&y.jsx(P.Title,{className:ke({"yst-mb-3":n||t}),children:r}),n&&y.jsx("p",{children:n}),t]})}var vA=function(){return y.jsx(P.Card,{className:"yst-mb-4",children:y.jsxs(P.Card.Content,{className:"yst-flex yst-flex-col yst-gap-8",children:[y.jsx(P.Title,{size:"2",children:"Query - Best fish restaurant in Nijmegen"}),y.jsxs("div",{children:[y.jsx("p",{children:"AI Response:"}),y.jsx(P.Link,{href:"#todo",children:"Show more"})]}),y.jsxs("div",{children:[y.jsx("p",{children:"Extracted brands:"}),y.jsx(P.Badge,{children:"Example"}),y.jsx(P.Badge,{children:"Example"}),y.jsx(P.Badge,{children:"Example"}),y.jsx(P.Badge,{children:"Example"}),y.jsx(P.Badge,{children:"Example"})]}),y.jsxs(P.Table,{children:[y.jsx(P.Table.Head,{children:y.jsxs(P.Table.Row,{children:[y.jsx(P.Table.Header,{children:"URL"}),y.jsx(P.Table.Header,{children:"Associated brand"})]})}),y.jsxs(P.Table.Body,{children:[y.jsxs(P.Table.Row,{children:[y.jsx(P.Table.Cell,{children:y.jsx(P.Link,{href:"https://example.com",target:"_blank",children:"https://example.com"})}),y.jsx(P.Table.Cell,{children:"Example Brand"})]}),y.jsxs(P.Table.Row,{children:[y.jsx(P.Table.Cell,{children:y.jsx(P.Link,{href:"https://example2.com",target:"_blank",children:"https://example2.com"})}),y.jsx(P.Table.Cell,{children:"Example Brand 2"})]})]})]})]})})},bA=function(){return y.jsxs(P.Card,{children:[y.jsx(cb,{title:"Query history"}),y.jsx(P.Card,{className:"yst-mb-4",children:y.jsxs(P.Card.Content,{children:[y.jsxs("p",{className:"yst-mb-8",children:["Manna Fish Restaurant - Analysis performed on:"," ",y.jsx(P.Badge,{children:"2025-04-08 12:31:21"})]}),[0,1,2,3,4].map(function(t){return y.jsx(vA,{},t)})]})})]})},xA=z.lazy(function(){return Promise.resolve().then(()=>PD)}),wA=z.lazy(function(){return Promise.resolve().then(()=>rL)}),SA=z.lazy(function(){return Promise.resolve().then(()=>oL)}),CA=z.lazy(function(){return Promise.resolve().then(()=>xL)}),_A=z.lazy(function(){return Promise.resolve().then(()=>RL)}),kA=z.lazy(function(){return Promise.resolve().then(()=>HL)}),OA=new Hw({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1,staleTime:1e3*60*5},mutations:{retry:!1}}}),ai=function(){return y.jsx("div",{className:"yst-flex yst-min-h-[200px] yst-items-center yst-justify-center",children:y.jsxs("div",{className:"yst-w-full yst-max-w-md yst-space-y-3",children:[y.jsx(P.SkeletonLoader,{className:"yst-h-8 yst-w-3/4"}),y.jsx(P.SkeletonLoader,{className:"yst-h-6 yst-w-full"}),y.jsx(P.SkeletonLoader,{className:"yst-h-6 yst-w-2/3"})]})})},EA=function(t){var n=t.hideNav,r=n===void 0?!1:n,i=t.disableLayout,s=i===void 0?!1:i,o=t.DebugInfo;return y.jsx(Qx,{children:y.jsxs(Ct,{element:y.jsx(p6,{hideNav:r,disableLayout:s,DebugInfo:o}),children:[y.jsxs(Ct,{path:"/",element:y.jsx(Fs,{}),children:[y.jsx(Ct,{index:!0,element:y.jsx(Nu,{})}),y.jsxs(Ct,{path:"brands/:brandId",element:y.jsx(k0,{}),children:[y.jsx(Ct,{index:!0,element:y.jsx(Nu,{})}),y.jsx(Ct,{path:"brand-list",element:y.jsx(z.Suspense,{fallback:y.jsx(ai,{}),children:y.jsx(xA,{})})}),y.jsx(Ct,{path:"analysis/:analysisId",element:y.jsx(v6,{}),children:y.jsx(Ct,{index:!0,element:y.jsx(Nu,{})})})]}),y.jsxs(Ct,{path:"/setup",element:y.jsx(z.Suspense,{fallback:y.jsx(ai,{}),children:y.jsx(SA,{})}),children:[y.jsx(Ct,{index:!0,element:y.jsx(z.Suspense,{fallback:y.jsx(ai,{}),children:y.jsx(CA,{})})}),y.jsxs(Ct,{path:":brandId",element:y.jsx(k0,{}),children:[y.jsx(Ct,{path:"queries",element:y.jsx(z.Suspense,{fallback:y.jsx(ai,{}),children:y.jsx(_A,{})})}),y.jsx(Ct,{path:"analysis",element:y.jsx(z.Suspense,{fallback:y.jsx(ai,{}),children:y.jsx(kA,{})})})]})]})]}),y.jsx(Ct,{path:"/settings",element:y.jsx(z.Suspense,{fallback:y.jsx(ai,{}),children:y.jsx(wA,{})})}),y.jsx(Ct,{path:"/query-history",element:y.jsx(z.Suspense,{fallback:y.jsx(ai,{}),children:y.jsx(bA,{})})})]})})},AA=function(t){var n=t.DebugInfo,r=t.hostAppProps;return y.jsxs(Ww,{client:OA,children:[y.jsx(w5,{hostAppProps:r,children:y.jsx(EA,{DebugInfo:n})}),y.jsx(LS,{initialIsOpen:!1})]})};function PA(e){var t=e.subpath,n=t===void 0?"/":t,r=e.onNavigate,i=cn(),s=Ht(),o=z.useRef(n),a=z.useRef(null),l=z.useRef(!1),c="".concat(s.pathname).concat(s.search).concat(s.hash),u=z.useCallback(r,[r]);return z.useEffect(function(){if(n===c){o.current=n;return}l.current||n!==o.current&&(o.current=n,a.current=n,l.current=!0,i(n,{replace:!0}),setTimeout(function(){l.current=!1},10))},[n,c,i]),z.useEffect(function(){l.current||c!==n&&c!==a.current&&(a.current=c,u(c))},[c,n,u]),null}function TA(e,t){return DA(e)||$A(e,t)||jA(e,t)||MA()}function MA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
69
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jA(e,t){if(e){if(typeof e=="string")return Ty(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ty(e,t):void 0}}function Ty(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $A(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function DA(e){if(Array.isArray(e))return e}var LA=function(t){var n=t.isRtl,r=n===void 0?!1:n,i=t.className,s=t.style,o=t.token,a=o===void 0?"":o,l=t.apiUrl,c=t.DebugInfo,u=t.basename,d=u===void 0?"/":u,f=t.subpath,h=f===void 0?"/":f,g=t.onNavigate,m=g===void 0?function(){}:g,p=t.onLogout,v=p===void 0?function(){}:p,b=t.onAddSubscription,S=b===void 0?function(){}:b,C=function(j,$){var B=j.endsWith("/")?j.slice(0,-1):j,R=$.startsWith("/")?$:"/".concat($);return B+R||"/"},x=z.useState(!!(a||l)),k=TA(x,2),w=k[0],_=k[1],O={onAddSubscription:S,onLogout:v,onNavigate:m,DebugInfo:c,basename:d,subpath:h};return z.useEffect(function(){l&&Gv(l),p4(typeof a!="function"?function(){return a}:a),_(!1)},[l,a]),w?y.jsx("div",{className:i,style:s,children:y.jsx(P.Spinner,{})}):y.jsx("div",{className:i,style:s,children:y.jsxs(Vx,{initialEntries:[C(d,h)],basename:d||"/",children:[y.jsx(PA,{subpath:h,onNavigate:m}),y.jsx(P.Root,{context:{isRtl:r},children:y.jsx(AA,{DebugInfo:c,hostAppProps:O})})]})})},IA=e=>e!=null,RA=e=>e.filter(IA);function NA(e){return(...t)=>{for(const n of e)n&&n(...t)}}var Y=e=>typeof e=="function"&&!e.length?e():e,Vd=e=>Array.isArray(e)?e:e?[e]:[];function FA(e,...t){return typeof e=="function"?e(...t):e}var BA=Ce;function qA(e,t,n,r){const i=e.length,s=t.length;let o=0;if(!s){for(;o<i;o++)n(e[o]);return}if(!i){for(;o<s;o++)r(t[o]);return}for(;o<s&&t[o]===e[o];o++);let a,l;t=t.slice(o),e=e.slice(o);for(a of t)e.includes(a)||r(a);for(l of e)t.includes(l)||n(l)}function zA(e){const[t,n]=se(),r=e!=null&&e.throw?(f,h)=>{throw n(f instanceof Error?f:new Error(h)),f}:(f,h)=>{n(f instanceof Error?f:new Error(h))},i=e!=null&&e.api?Array.isArray(e.api)?e.api:[e.api]:[globalThis.localStorage].filter(Boolean),s=e!=null&&e.prefix?`${e.prefix}.`:"",o=new Map,a=new Proxy({},{get(f,h){let g=o.get(h);g||(g=se(void 0,{equals:!1}),o.set(h,g)),g[0]();const m=i.reduce((p,v)=>{if(p!==null||!v)return p;try{return v.getItem(`${s}${h}`)}catch(b){return r(b,`Error reading ${s}${h} from ${v.name}`),null}},null);return m!==null&&(e!=null&&e.deserializer)?e.deserializer(m,h,e.options):m}}),l=(f,h,g)=>{const m=e!=null&&e.serializer?e.serializer(h,f,g!=null?g:e.options):h,p=`${s}${f}`;i.forEach(b=>{try{b.getItem(p)!==m&&b.setItem(p,m)}catch(S){r(S,`Error setting ${s}${f} to ${m} in ${b.name}`)}});const v=o.get(f);v&&v[1]()},c=f=>i.forEach(h=>{try{h.removeItem(`${s}${f}`)}catch(g){r(g,`Error removing ${s}${f} from ${h.name}`)}}),u=()=>i.forEach(f=>{try{f.clear()}catch(h){r(h,`Error clearing ${f.name}`)}}),d=()=>{const f={},h=(g,m)=>{if(!f.hasOwnProperty(g)){const p=m&&(e!=null&&e.deserializer)?e.deserializer(m,g,e.options):m;p&&(f[g]=p)}};return i.forEach(g=>{if(typeof g.getAll=="function"){let m;try{m=g.getAll()}catch(p){r(p,`Error getting all values from in ${g.name}`)}for(const p of m)h(p,m[p])}else{let m=0,p;try{for(;p=g.key(m++);)f.hasOwnProperty(p)||h(p,g.getItem(p))}catch(v){r(v,`Error getting all values from ${g.name}`)}}}),f};return(e==null?void 0:e.sync)!==!1&&br(()=>{const f=h=>{var m;let g=!1;i.forEach(p=>{try{p!==h.storageArea&&h.key&&h.newValue!==p.getItem(h.key)&&(h.newValue?p.setItem(h.key,h.newValue):p.removeItem(h.key),g=!0)}catch(v){r(v,`Error synching api ${p.name} from storage event (${h.key}=${h.newValue})`)}}),g&&h.key&&((m=o.get(h.key))==null||m[1]())};"addEventListener"in globalThis?(globalThis.addEventListener("storage",f),Ce(()=>globalThis.removeEventListener("storage",f))):(i.forEach(h=>{var g;return(g=h.addEventListener)==null?void 0:g.call(h,"storage",f)}),Ce(()=>i.forEach(h=>{var g;return(g=h.removeEventListener)==null?void 0:g.call(h,"storage",f)})))}),[a,l,{clear:u,error:t,remove:c,toJSON:d}]}var ub=zA,HA=e=>(typeof e.clear=="function"||(e.clear=()=>{let t;for(;t=e.key(0);)e.removeItem(t)}),e),My=e=>{if(!e)return"";let t="";for(const n in e){if(!e.hasOwnProperty(n))continue;const r=e[n];t+=r instanceof Date?`; ${n}=${r.toUTCString()}`:typeof r=="boolean"?`; ${n}`:`; ${n}=${r}`}return t},fn=HA({_cookies:[globalThis.document,"cookie"],getItem:e=>{var t,n;return(n=(t=fn._cookies[0][fn._cookies[1]].match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)"))==null?void 0:t.pop())!=null?n:null},setItem:(e,t,n)=>{const r=fn.getItem(e);fn._cookies[0][fn._cookies[1]]=`${e}=${t}${My(n)}`;const i=Object.assign(new Event("storage"),{key:e,oldValue:r,newValue:t,url:globalThis.document.URL,storageArea:fn});window.dispatchEvent(i)},removeItem:e=>{fn._cookies[0][fn._cookies[1]]=`${e}=deleted${My({expires:new Date(0)})}`},key:e=>{let t=null,n=0;return fn._cookies[0][fn._cookies[1]].replace(/(?:^|;)\s*(.+?)\s*=\s*[^;]+/g,(r,i)=>(!t&&i&&n++===e&&(t=i),"")),t},get length(){let e=0;return fn._cookies[0][fn._cookies[1]].replace(/(?:^|;)\s*.+?\s*=\s*[^;]+/g,t=>(e+=t?1:0,"")),e}}),UA=1024,Ri=796,Gf=700,GA="bottom-right",Wd="bottom",db="system",KA=!1,fb=500,VA=500,hb=500,WA=Object.keys(md)[0],jy=1,QA=Object.keys(pd)[0],Kf=xt({client:void 0,onlineManager:void 0,queryFlavor:"",version:"",shadowDOMTarget:void 0});function ye(){return wt(Kf)}var gb=xt(void 0),yb=e=>{const[t,n]=se(null),r=()=>{const o=t();o!=null&&(o.close(),n(null))},i=(o,a)=>{if(t()!=null)return;const l=window.open("","TSQD-Devtools-Panel",`width=${o},height=${a},popup`);if(!l)throw new Error("Failed to open popup. Please allow popups for this site to view the devtools in picture-in-picture mode.");l.document.head.innerHTML="",l.document.body.innerHTML="",R3(l.document),l.document.title="TanStack Query Devtools",l.document.body.style.margin="0",l.addEventListener("pagehide",()=>{e.setLocalStore("pip_open","false"),n(null)}),[...(ye().shadowDOMTarget||document).styleSheets].forEach(c=>{try{const u=[...c.cssRules].map(g=>g.cssText).join(""),d=document.createElement("style"),f=c.ownerNode;let h="";f&&"id"in f&&(h=f.id),h&&d.setAttribute("id",h),d.textContent=u,l.document.head.appendChild(d)}catch(u){const d=document.createElement("link");if(c.href==null)return;d.rel="stylesheet",d.type=c.type,d.media=c.media.toString(),d.href=c.href,l.document.head.appendChild(d)}}),Sc(["focusin","focusout","pointermove","keydown","pointerdown","pointerup","click","mousedown","input"],l.document),e.setLocalStore("pip_open","true"),n(l)};we(()=>{var a;((a=e.localStore.pip_open)!=null?a:"false")==="true"&&!e.disabled&&i(Number(window.innerWidth),Number(e.localStore.height||VA))}),we(()=>{const o=(ye().shadowDOMTarget||document).querySelector("#_goober"),a=t();if(o&&a){const l=new MutationObserver(()=>{const c=(ye().shadowDOMTarget||a.document).querySelector("#_goober");c&&(c.textContent=o.textContent)});l.observe(o,{childList:!0,subtree:!0,characterDataOldValue:!0}),Ce(()=>{l.disconnect()})}});const s=U(()=>{var o;return{pipWindow:t(),requestPipWindow:i,closePipWindow:r,disabled:(o=e.disabled)!=null?o:!1}});return D(gb.Provider,{value:s,get children(){return e.children}})},Vf=()=>U(()=>{const t=wt(gb);if(!t)throw new Error("usePiPWindow must be used within a PiPProvider");return t()}),Wf=xt(()=>"dark");function bt(){return wt(Wf)}var mb={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},YA=Object.keys(mb).join("|"),XA=new RegExp(YA,"g");function ZA(e){return e.replace(XA,t=>mb[t])}var Ft={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function $y(e,t,n){var r;if(n=n||{},n.threshold=(r=n.threshold)!=null?r:Ft.MATCHES,!n.accessors){const o=Dy(e,t,n);return{rankedValue:e,rank:o,accessorIndex:-1,accessorThreshold:n.threshold,passed:o>=n.threshold}}const i=nP(e,n.accessors),s={rankedValue:e,rank:Ft.NO_MATCH,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let o=0;o<i.length;o++){const a=i[o];let l=Dy(a.itemValue,t,n);const{minRanking:c,maxRanking:u,threshold:d=n.threshold}=a.attributes;l<c&&l>=Ft.MATCHES?l=c:l>u&&(l=u),l=Math.min(l,u),l>=d&&l>s.rank&&(s.rank=l,s.passed=!0,s.accessorIndex=o,s.accessorThreshold=d,s.rankedValue=a.itemValue)}return s}function Dy(e,t,n){return e=Ly(e,n),t=Ly(t,n),t.length>e.length?Ft.NO_MATCH:e===t?Ft.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase(),t=t.toLowerCase(),e===t?Ft.EQUAL:e.startsWith(t)?Ft.STARTS_WITH:e.includes(` ${t}`)?Ft.WORD_STARTS_WITH:e.includes(t)?Ft.CONTAINS:t.length===1?Ft.NO_MATCH:JA(e).includes(t)?Ft.ACRONYM:eP(e,t))}function JA(e){let t="";return e.split(" ").forEach(r=>{r.split("-").forEach(s=>{t+=s.substr(0,1)})}),t}function eP(e,t){let n=0,r=0;function i(l,c,u){for(let d=u,f=c.length;d<f;d++)if(c[d]===l)return n+=1,d+1;return-1}function s(l){const c=1/l,u=n/t.length;return Ft.MATCHES+u*c}const o=i(t[0],e,0);if(o<0)return Ft.NO_MATCH;r=o;for(let l=1,c=t.length;l<c;l++){const u=t[l];if(r=i(u,e,r),!(r>-1))return Ft.NO_MATCH}const a=r-o;return s(a)}function Ly(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=ZA(e)),e}function tP(e,t){let n=t;typeof t=="object"&&(n=t.accessor);const r=n(e);return r==null?[]:Array.isArray(r)?r:[String(r)]}function nP(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const s=t[r],o=rP(s),a=tP(e,s);for(let l=0,c=a.length;l<c;l++)n.push({itemValue:a[l],attributes:o})}return n}var Iy={maxRanking:1/0,minRanking:-1/0};function rP(e){return typeof e=="function"?Iy:{...Iy,...e}}var iP={data:""},sP=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||iP,oP=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,aP=/\/\*[^]*?\*\/| +/g,Ry=/\n+/g,fi=(e,t)=>{let n="",r="",i="";for(let s in e){let o=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+o+";":r+=s[1]=="f"?fi(o,s):s+"{"+fi(o,s[1]=="k"?"":t)+"}":typeof o=="object"?r+=fi(o,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=fi.p?fi.p(s,o):s+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},rr={},pb=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+pb(e[n]);return t}return e},lP=(e,t,n,r,i)=>{let s=pb(e),o=rr[s]||(rr[s]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(s));if(!rr[o]){let l=s!==e?e:(c=>{let u,d,f=[{}];for(;u=oP.exec(c.replace(aP,""));)u[4]?f.shift():u[3]?(d=u[3].replace(Ry," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(Ry," ").trim();return f[0]})(e);rr[o]=fi(i?{["@keyframes "+o]:l}:l,n?"":"."+o)}let a=n&&rr.g?rr.g:null;return n&&(rr.g=rr[o]),((l,c,u,d)=>{d?c.data=c.data.replace(d,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(rr[o],t,r,a),o},cP=(e,t,n)=>e.reduce((r,i,s)=>{let o=t[s];if(o&&o.call){let a=o(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;o=l?"."+l:a&&typeof a=="object"?a.props?"":fi(a,""):a===!1?"":a}return r+i+(o==null?"":o)},"");function $e(e){let t=this||{},n=e.call?e(t.p):e;return lP(n.unshift?n.raw?cP(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,sP(t.target),t.g,t.o,t.k)}$e.bind({g:1});$e.bind({k:1});function vb(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=vb(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function le(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=vb(e))&&(r&&(r+=" "),r+=t);return r}function uP(e,t){const n=lt(e),{onChange:r}=t;let i=new Set(t.appear?void 0:n);const s=new WeakSet,[o,a]=se([],{equals:!1}),[l]=g3(),c=d=>{a(f=>(f.push.apply(f,d),f));for(const f of d)s.delete(f)},u=(d,f,h)=>d.splice(h,0,f);return U(d=>{const f=o(),h=e();if(h[bc],lt(l))return l(),d;if(f.length){const g=d.filter(m=>!f.includes(m));return f.length=0,r({list:g,added:[],removed:[],unchanged:g,finishRemoved:c}),g}return lt(()=>{const g=new Set(h),m=h.slice(),p=[],v=[],b=[];for(const C of h)(i.has(C)?b:p).push(C);let S=!p.length;for(let C=0;C<d.length;C++){const x=d[C];g.has(x)||(s.has(x)||(v.push(x),s.add(x)),u(m,x,C)),S&&x!==m[C]&&(S=!1)}return!v.length&&S?d:(r({list:m,added:p,removed:v,unchanged:b,finishRemoved:c}),i=g,m)})},t.appear?[]:n.slice())}function Lt(...e){return NA(e)}var Ny=e=>e instanceof Element;function Qd(e,t){if(t(e))return e;if(typeof e=="function"&&!e.length)return Qd(e(),t);if(Array.isArray(e)){const n=[];for(const r of e){const i=Qd(r,t);i&&(Array.isArray(i)?n.push.apply(n,i):n.push(i))}return n.length?n:null}return null}function dP(e,t=Ny,n=Ny){const r=U(e),i=U(()=>Qd(r(),t));return i.toArray=()=>{const s=i();return Array.isArray(s)?s:s?[s]:[]},i}function fP(e){return U(()=>{const t=e.name||"s";return{enterActive:(e.enterActiveClass||t+"-enter-active").split(" "),enter:(e.enterClass||t+"-enter").split(" "),enterTo:(e.enterToClass||t+"-enter-to").split(" "),exitActive:(e.exitActiveClass||t+"-exit-active").split(" "),exit:(e.exitClass||t+"-exit").split(" "),exitTo:(e.exitToClass||t+"-exit-to").split(" "),move:(e.moveClass||t+"-move").split(" ")}})}function bb(e){requestAnimationFrame(()=>requestAnimationFrame(e))}function hP(e,t,n,r){const{onBeforeEnter:i,onEnter:s,onAfterEnter:o}=t;i==null||i(n),n.classList.add(...e.enter),n.classList.add(...e.enterActive),queueMicrotask(()=>{if(!n.parentNode)return r==null?void 0:r();s==null||s(n,()=>a())}),bb(()=>{n.classList.remove(...e.enter),n.classList.add(...e.enterTo),(!s||s.length<2)&&(n.addEventListener("transitionend",a),n.addEventListener("animationend",a))});function a(l){(!l||l.target===n)&&(n.removeEventListener("transitionend",a),n.removeEventListener("animationend",a),n.classList.remove(...e.enterActive),n.classList.remove(...e.enterTo),o==null||o(n))}}function gP(e,t,n,r){const{onBeforeExit:i,onExit:s,onAfterExit:o}=t;if(!n.parentNode)return r==null?void 0:r();i==null||i(n),n.classList.add(...e.exit),n.classList.add(...e.exitActive),s==null||s(n,()=>a()),bb(()=>{n.classList.remove(...e.exit),n.classList.add(...e.exitTo),(!s||s.length<2)&&(n.addEventListener("transitionend",a),n.addEventListener("animationend",a))});function a(l){(!l||l.target===n)&&(r==null||r(),n.removeEventListener("transitionend",a),n.removeEventListener("animationend",a),n.classList.remove(...e.exitActive),n.classList.remove(...e.exitTo),o==null||o(n))}}var Fy=e=>{const t=fP(e);return uP(dP(()=>e.children).toArray,{appear:e.appear,onChange({added:n,removed:r,finishRemoved:i,list:s}){const o=t();for(const l of n)hP(o,e,l);const a=[];for(const l of s)l.isConnected&&(l instanceof HTMLElement||l instanceof SVGElement)&&a.push({el:l,rect:l.getBoundingClientRect()});queueMicrotask(()=>{const l=[];for(const{el:c,rect:u}of a)if(c.isConnected){const d=c.getBoundingClientRect(),f=u.left-d.left,h=u.top-d.top;(f||h)&&(c.style.transform=`translate(${f}px, ${h}px)`,c.style.transitionDuration="0s",l.push(c))}document.body.offsetHeight;for(const c of l){let u=function(d){(d.target===c||/transform$/.test(d.propertyName))&&(c.removeEventListener("transitionend",u),c.classList.remove(...o.move))};c.classList.add(...o.move),c.style.transform=c.style.transitionDuration="",c.addEventListener("transitionend",u)}});for(const l of r)gP(o,e,l,()=>i([l]))}})},Fu=Symbol("fallback");function By(e){for(const t of e)t.dispose()}function yP(e,t,n,r={}){const i=new Map;return Ce(()=>By(i.values())),()=>{const o=e()||[];return o[bc],lt(()=>{var u,d;if(!o.length)return By(i.values()),i.clear(),r.fallback?[yr(h=>(i.set(Fu,{dispose:h}),r.fallback()))]:[];const a=new Array(o.length),l=i.get(Fu);if(!i.size||l){l==null||l.dispose(),i.delete(Fu);for(let f=0;f<o.length;f++){const h=o[f],g=t(h,f);s(a,h,f,g)}return a}const c=new Set(i.keys());for(let f=0;f<o.length;f++){const h=o[f],g=t(h,f);c.delete(g);const m=i.get(g);m?(a[f]=m.mapped,(u=m.setIndex)==null||u.call(m,f),m.setItem(()=>h)):s(a,h,f,g)}for(const f of c)(d=i.get(f))==null||d.dispose(),i.delete(f);return a})};function s(o,a,l,c){yr(u=>{const[d,f]=se(a),h={setItem:f,dispose:u};if(n.length>1){const[g,m]=se(l);h.setIndex=m,h.mapped=n(d,g)}else h.mapped=n(d);i.set(c,h),o[l]=h.mapped})}}function lc(e){const{by:t}=e;return U(yP(()=>e.each,typeof t=="function"?t:n=>n[t],e.children,"fallback"in e?{fallback:()=>e.fallback}:void 0))}function mP(e,t,n,r){return e.addEventListener(t,n,r),BA(e.removeEventListener.bind(e,t,n,r))}function pP(e,t,n,r){const i=()=>{Vd(Y(e)).forEach(s=>{s&&Vd(Y(t)).forEach(o=>mP(s,o,n,r))})};typeof e=="function"?we(i):xe(i)}function vP(e,t){const n=new ResizeObserver(e);return Ce(n.disconnect.bind(n)),{observe:r=>n.observe(r,t),unobserve:n.unobserve.bind(n)}}function xb(e,t,n){const r=new WeakMap,{observe:i,unobserve:s}=vP(o=>{for(const a of o){const{contentRect:l,target:c}=a,u=Math.round(l.width),d=Math.round(l.height),f=r.get(c);(!f||f.width!==u||f.height!==d)&&(t(l,c,a),r.set(c,{width:u,height:d}))}},n);we(o=>{const a=RA(Vd(Y(e)));return qA(a,o,i,s),a},[])}var bP=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function qy(e){const t={};let n;for(;n=bP.exec(e);)t[n[1]]=n[2];return t}function Kc(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=qy(e)}else typeof t=="string"&&(t=qy(t));return{...e,...t}}function xP(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function Yd(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function wP(e){return typeof e=="number"}function ts(e){return Object.prototype.toString.call(e)==="[object String]"}function SP(e){return typeof e=="function"}function Ua(e){return t=>`${e()}-${t}`}function bn(e,t){return e?e===t||e.contains(t):!1}function Lo(e,t=!1){const{activeElement:n}=Xn(e);if(!(n!=null&&n.nodeName))return null;if(wb(n)&&n.contentDocument)return Lo(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const i=Xn(n).getElementById(r);if(i)return i}}return n}function CP(e){return Xn(e).defaultView||window}function Xn(e){return e?e.ownerDocument||e:document}function wb(e){return e.tagName==="IFRAME"}var Qf=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(Qf||{});function Yf(e){var t;return typeof window!="undefined"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)==null?void 0:t.platform)||window.navigator.platform):!1}function Vc(){return Yf(/^Mac/i)}function _P(){return Yf(/^iPhone/i)}function kP(){return Yf(/^iPad/i)||Vc()&&navigator.maxTouchPoints>1}function OP(){return _P()||kP()}function EP(){return Vc()||OP()}function rt(e,t){return t&&(SP(t)?t(e):t[0](t[1],e)),e==null?void 0:e.defaultPrevented}function pt(e){return t=>{for(const n of e)rt(t,n)}}function AP(e){return Vc()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function Et(e){if(e)if(PP())e.focus({preventScroll:!0});else{const t=TP(e);e.focus(),MP(t)}}var Sl=null;function PP(){if(Sl==null){Sl=!1;try{document.createElement("div").focus({get preventScroll(){return Sl=!0,!0}})}catch(e){}}return Sl}function TP(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function MP(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var Sb=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],jP=[...Sb,'[tabindex]:not([tabindex="-1"]):not([disabled])'],Xf=Sb.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])",$P=jP.join(':not([hidden]):not([tabindex="-1"]),');function Cb(e,t){const r=Array.from(e.querySelectorAll(Xf)).filter(zy);return t&&zy(e)&&r.unshift(e),r.forEach((i,s)=>{if(wb(i)&&i.contentDocument){const o=i.contentDocument.body,a=Cb(o,!1);r.splice(s,1,...a)}}),r}function zy(e){return _b(e)&&!DP(e)}function _b(e){return e.matches(Xf)&&Zf(e)}function DP(e){return parseInt(e.getAttribute("tabindex")||"0",10)<0}function Zf(e,t){return e.nodeName!=="#comment"&&LP(e)&&IP(e,t)&&(!e.parentElement||Zf(e.parentElement,e))}function LP(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:i}=e.ownerDocument.defaultView,{display:s,visibility:o}=i(e);r=s!=="none"&&o!=="hidden"&&o!=="collapse"}return r}function IP(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function RP(e,t,n){const r=t!=null&&t.tabbable?$P:Xf,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(s){var o;return(o=t==null?void 0:t.from)!=null&&o.contains(s)?NodeFilter.FILTER_REJECT:s.matches(r)&&Zf(s)&&(!(t!=null&&t.accept)||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(i.currentNode=t.from),i}function Hy(e){for(;e&&!NP(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function NP(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function FP(){}function BP(e,t){const[n,r]=e;let i=!1;const s=t.length;for(let o=s,a=0,l=o-1;a<o;l=a++){const[c,u]=t[a],[d,f]=t[l],[,h]=t[l===0?o-1:l-1]||[0,0],g=(u-f)*(n-c)-(c-d)*(r-u);if(f<u){if(r>=f&&r<u){if(g===0)return!0;g>0&&(r===f?r>h&&(i=!i):i=!i)}}else if(u<f){if(r>u&&r<=f){if(g===0)return!0;g<0&&(r===f?r<h&&(i=!i):i=!i)}}else if(r==u&&(n>=d&&n<=c||n>=c&&n<=d))return!0}return i}function qe(e,t){return Ae(e,t)}var So=new Map,Uy=new Set;function Gy(){if(typeof window=="undefined")return;const e=n=>{if(!n.target)return;let r=So.get(n.target);r||(r=new Set,So.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=So.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),So.delete(n.target)),So.size===0)){for(const i of Uy)i();Uy.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document!="undefined"&&(document.readyState!=="loading"?Gy():document.addEventListener("DOMContentLoaded",Gy));function Xd(e,t){const n=Ky(e,t,"left"),r=Ky(e,t,"top"),i=t.offsetWidth,s=t.offsetHeight;let o=e.scrollLeft,a=e.scrollTop;const l=o+e.offsetWidth,c=a+e.offsetHeight;n<=o?o=n:n+i>l&&(o+=n+i-l),r<=a?a=r:r+s>c&&(a+=r+s-c),e.scrollLeft=o,e.scrollTop=a}function Ky(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function qP(e,t){var n,r;if(document.contains(e)){const i=document.scrollingElement||document.documentElement;if(window.getComputedStyle(i).overflow==="hidden"){let o=Hy(e);for(;e&&o&&e!==i&&o!==i;)Xd(o,e),e=o,o=Hy(e)}else{const{left:o,top:a}=e.getBoundingClientRect();(n=e==null?void 0:e.scrollIntoView)==null||n.call(e,{block:"nearest"});const{left:l,top:c}=e.getBoundingClientRect();(Math.abs(o-l)>1||Math.abs(a-c)>1)&&((r=e.scrollIntoView)==null||r.call(e,{block:"nearest"}))}}}var kb={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"};function xn(e){return t=>(e(t),()=>e(void 0))}function Wc(e,t){const[n,r]=se(Vy(t==null?void 0:t()));return we(()=>{var i;r(((i=e())==null?void 0:i.tagName.toLowerCase())||Vy(t==null?void 0:t()))}),n}function Vy(e){return ts(e)?e:void 0}function ot(e){const[t,n]=Ve(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return D(W3,Ae(n,{get component(){return t.as}}))}var zP=["id","name","validationState","required","disabled","readOnly"];function HP(e){const t=`form-control-${Cn()}`,n=qe({id:t},e),[r,i]=se(),[s,o]=se(),[a,l]=se(),[c,u]=se(),d=(m,p,v)=>{const b=v!=null||r()!=null;return[v,r(),b&&p!=null?m:void 0].filter(Boolean).join(" ")||void 0},f=m=>[a(),c(),m].filter(Boolean).join(" ")||void 0,h=U(()=>({"data-valid":Y(n.validationState)==="valid"?"":void 0,"data-invalid":Y(n.validationState)==="invalid"?"":void 0,"data-required":Y(n.required)?"":void 0,"data-disabled":Y(n.disabled)?"":void 0,"data-readonly":Y(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>{var m;return(m=Y(n.name))!=null?m:Y(n.id)},dataset:h,validationState:()=>Y(n.validationState),isRequired:()=>Y(n.required),isDisabled:()=>Y(n.disabled),isReadOnly:()=>Y(n.readOnly),labelId:r,fieldId:s,descriptionId:a,errorMessageId:c,getAriaLabelledBy:d,getAriaDescribedBy:f,generateId:Ua(()=>Y(n.id)),registerLabel:xn(i),registerField:xn(o),registerDescription:xn(l),registerErrorMessage:xn(u)}}}var Ob=xt();function Ga(){const e=wt(Ob);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function Eb(e){const t=Ga(),n=qe({id:t.generateId("description")},e);return we(()=>Ce(t.registerDescription(n.id))),D(ot,Ae({as:"div"},()=>t.dataset(),n))}function Ab(e){const t=Ga(),n=qe({id:t.generateId("error-message")},e),[r,i]=Ve(n,["forceMount"]),s=()=>t.validationState()==="invalid";return we(()=>{s()&&Ce(t.registerErrorMessage(i.id))}),D(be,{get when(){return r.forceMount||s()},get children(){return D(ot,Ae({as:"div"},()=>t.dataset(),i))}})}function UP(e){let t;const n=Ga(),r=qe({id:n.generateId("label")},e),[i,s]=Ve(r,["ref"]),o=Wc(()=>t,()=>"label");return we(()=>Ce(n.registerLabel(s.id))),D(ot,Ae({as:"label",ref(a){const l=Lt(c=>t=c,i.ref);typeof l=="function"&&l(a)},get for(){return U(()=>o()==="label")()?n.fieldId():void 0}},()=>n.dataset(),s))}function GP(e,t){we(vr(e,n=>{if(n==null)return;const r=KP(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),Ce(()=>{r.removeEventListener("reset",t)}))}))}function KP(e){return VP(e)?e.form:e.closest("form")}function VP(e){return e.matches("textarea, input, select, button")}function Ka(e){var o;const[t,n]=se((o=e.defaultValue)==null?void 0:o.call(e)),r=U(()=>{var a;return((a=e.value)==null?void 0:a.call(e))!==void 0}),i=U(()=>{var a;return r()?(a=e.value)==null?void 0:a.call(e):t()});return[i,a=>{lt(()=>{var c;const l=FA(a,i());return Object.is(l,i())||(r()||n(l),(c=e.onChange)==null||c.call(e,l)),l})}]}function Pb(e){const[t,n]=Ka(e);return[()=>{var i;return(i=t())!=null?i:!1},n]}function WP(e){const[t,n]=Ka(e);return[()=>{var i;return(i=t())!=null?i:[]},n]}function QP(e={}){const[t,n]=Pb({value:()=>Y(e.isSelected),defaultValue:()=>!!Y(e.defaultIsSelected),onChange:s=>{var o;return(o=e.onSelectedChange)==null?void 0:o.call(e,s)}});return{isSelected:t,setIsSelected:s=>{!Y(e.isReadOnly)&&!Y(e.isDisabled)&&n(s)},toggle:()=>{!Y(e.isReadOnly)&&!Y(e.isDisabled)&&n(!t())}}}var YP=Object.defineProperty,Qc=(e,t)=>{for(var n in t)YP(e,n,{get:t[n],enumerable:!0})},Tb=xt();function Mb(){return wt(Tb)}function XP(){const e=Mb();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function jb(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function ZP(e,t){var i;const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const s=(i=e[r])==null?void 0:i.ref();if(s&&jb(s,n))return r+1}return 0}function JP(e){const t=e.map((r,i)=>[i,r]);let n=!1;return t.sort(([r,i],[s,o])=>{const a=i.ref(),l=o.ref();return a===l||!a||!l?0:jb(a,l)?(r>s&&(n=!0),-1):(r<s&&(n=!0),1)}),n?t.map(([r,i])=>i):e}function $b(e,t){const n=JP(e);e!==n&&t(n)}function eT(e){var i,s;const t=e[0],n=(i=e[e.length-1])==null?void 0:i.ref();let r=(s=t==null?void 0:t.ref())==null?void 0:s.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return Xn(r).body}function tT(e,t){we(()=>{const n=setTimeout(()=>{$b(e(),t)});Ce(()=>clearTimeout(n))})}function nT(e,t){if(typeof IntersectionObserver!="function"){tT(e,t);return}let n=[];we(()=>{const r=()=>{const o=!!n.length;n=e(),o&&$b(e(),t)},i=eT(e()),s=new IntersectionObserver(r,{root:i});for(const o of e()){const a=o.ref();a&&s.observe(a)}Ce(()=>s.disconnect())})}function rT(e={}){const[t,n]=WP({value:()=>Y(e.items),onChange:s=>{var o;return(o=e.onItemsChange)==null?void 0:o.call(e,s)}});nT(t,n);const r=s=>(n(o=>{const a=ZP(o,s);return xP(o,s,a)}),()=>{n(o=>{const a=o.filter(l=>l.ref()!==s.ref());return o.length===a.length?o:a})});return{DomCollectionProvider:s=>D(Tb.Provider,{value:{registerItem:r},get children(){return s.children}})}}function iT(e){const t=XP(),n=qe({shouldRegisterItem:!0},e);we(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());Ce(r)})}function Db(e){var l,c,u;let t=(l=e.startIndex)!=null?l:0;const n=(c=e.startLevel)!=null?c:0,r=[],i=d=>{var g;if(d==null)return"";const f=(g=e.getKey)!=null?g:"key",h=ts(f)?d[f]:f(d);return h!=null?String(h):""},s=d=>{var g;if(d==null)return"";const f=(g=e.getTextValue)!=null?g:"textValue",h=ts(f)?d[f]:f(d);return h!=null?String(h):""},o=d=>{var h,g;if(d==null)return!1;const f=(h=e.getDisabled)!=null?h:"disabled";return(g=ts(f)?d[f]:f(d))!=null?g:!1},a=d=>{var f;if(d!=null)return ts(e.getSectionChildren)?d[e.getSectionChildren]:(f=e.getSectionChildren)==null?void 0:f.call(e,d)};for(const d of e.dataSource){if(ts(d)||wP(d)){r.push({type:"item",rawValue:d,key:String(d),textValue:String(d),disabled:o(d),level:n,index:t}),t++;continue}if(a(d)!=null){r.push({type:"section",rawValue:d,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const f=(u=a(d))!=null?u:[];if(f.length>0){const h=Db({dataSource:f,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...h),t+=h.length}}else r.push({type:"item",rawValue:d,key:i(d),textValue:s(d),disabled:o(d),level:n,index:t}),t++}return r}function sT(e,t=[]){return U(()=>{const n=Db({dataSource:Y(e.dataSource),getKey:Y(e.getKey),getTextValue:Y(e.getTextValue),getDisabled:Y(e.getDisabled),getSectionChildren:Y(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}var oT=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),aT=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function lT(e){var n;if(Intl.Locale){const r=(n=new Intl.Locale(e).maximize().script)!=null?n:"";return oT.has(r)}const t=e.split("-")[0];return aT.has(t)}function cT(e){return lT(e)?"rtl":"ltr"}function Lb(){let e=typeof navigator!="undefined"&&(navigator.language||navigator.userLanguage)||"en-US";return{locale:e,direction:cT(e)}}var Zd=Lb(),Io=new Set;function Wy(){Zd=Lb();for(const e of Io)e(Zd)}function uT(){const[e,t]=se(Zd),n=U(()=>e());return br(()=>{Io.size===0&&window.addEventListener("languagechange",Wy),Io.add(t),Ce(()=>{Io.delete(t),Io.size===0&&window.removeEventListener("languagechange",Wy)})}),{locale:()=>n().locale,direction:()=>n().direction}}var dT=xt();function ri(){const e=uT();return wt(dT)||e}var Bu=new Map;function fT(e){const{locale:t}=ri(),n=U(()=>t()+(e?Object.entries(e).sort((r,i)=>r[0]<i[0]?-1:1).join():""));return U(()=>{const r=n();let i;return Bu.has(r)&&(i=Bu.get(r)),i||(i=new Intl.Collator(t(),e),Bu.set(r,i)),i})}var lr=class Ib extends Set{constructor(n,r,i){super(n);ve(this,"anchorKey");ve(this,"currentKey");n instanceof Ib?(this.anchorKey=r||n.anchorKey,this.currentKey=i||n.currentKey):(this.anchorKey=r,this.currentKey=i)}};function hT(e){const[t,n]=Ka(e);return[()=>{var i;return(i=t())!=null?i:new lr},n]}function Rb(e){return EP()?e.altKey:e.ctrlKey}function ns(e){return Vc()?e.metaKey:e.ctrlKey}function Qy(e){return new lr(e)}function gT(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function yT(e){const t=qe({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=se(!1),[i,s]=se(),o=U(()=>{const m=Y(t.selectedKeys);return m!=null?Qy(m):m}),a=U(()=>{const m=Y(t.defaultSelectedKeys);return m!=null?Qy(m):new lr}),[l,c]=hT({value:o,defaultValue:a,onChange:m=>{var p;return(p=t.onSelectionChange)==null?void 0:p.call(t,m)}}),[u,d]=se(Y(t.selectionBehavior)),f=()=>Y(t.selectionMode),h=()=>{var m;return(m=Y(t.disallowEmptySelection))!=null?m:!1},g=m=>{(Y(t.allowDuplicateSelectionEvents)||!gT(m,l()))&&c(m)};return we(()=>{const m=l();Y(t.selectionBehavior)==="replace"&&u()==="toggle"&&typeof m=="object"&&m.size===0&&d("replace")}),we(()=>{var m;d((m=Y(t.selectionBehavior))!=null?m:"toggle")}),{selectionMode:f,disallowEmptySelection:h,selectionBehavior:u,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:i,setFocusedKey:s,selectedKeys:l,setSelectedKeys:g}}function mT(e){const[t,n]=se(""),[r,i]=se(-1);return{typeSelectHandlers:{onKeyDown:o=>{var f,h,g;if(Y(e.isDisabled))return;const a=Y(e.keyboardDelegate),l=Y(e.selectionManager);if(!a.getKeyForSearch)return;const c=pT(o.key);if(!c||o.ctrlKey||o.metaKey)return;c===" "&&t().trim().length>0&&(o.preventDefault(),o.stopPropagation());let u=n(m=>m+c),d=(f=a.getKeyForSearch(u,l.focusedKey()))!=null?f:a.getKeyForSearch(u);d==null&&vT(u)&&(u=u[0],d=(h=a.getKeyForSearch(u,l.focusedKey()))!=null?h:a.getKeyForSearch(u)),d!=null&&(l.setFocusedKey(d),(g=e.onTypeSelect)==null||g.call(e,d)),clearTimeout(r()),i(window.setTimeout(()=>n(""),500))}}}}function pT(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function vT(e){return e.split("").every(t=>t===e[0])}function bT(e,t,n){const i=Ae({selectOnFocus:()=>Y(e.selectionManager).selectionBehavior()==="replace"},e),s=()=>t(),{direction:o}=ri();let a={top:0,left:0};pP(()=>Y(i.isVirtualized)?void 0:s(),"scroll",()=>{const p=s();p&&(a={top:p.scrollTop,left:p.scrollLeft})});const{typeSelectHandlers:l}=mT({isDisabled:()=>Y(i.disallowTypeAhead),keyboardDelegate:()=>Y(i.keyboardDelegate),selectionManager:()=>Y(i.selectionManager)}),c=()=>{var p;return(p=Y(i.orientation))!=null?p:"vertical"},u=p=>{var _,O,E,j,$,B,R,A;rt(p,l.onKeyDown),p.altKey&&p.key==="Tab"&&p.preventDefault();const v=t();if(!(v!=null&&v.contains(p.target)))return;const b=Y(i.selectionManager),S=Y(i.selectOnFocus),C=T=>{T!=null&&(b.setFocusedKey(T),p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(T):S&&!Rb(p)&&b.replaceSelection(T))},x=Y(i.keyboardDelegate),k=Y(i.shouldFocusWrap),w=b.focusedKey();switch(p.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(x.getKeyBelow){p.preventDefault();let T;w!=null?T=x.getKeyBelow(w):T=(_=x.getFirstKey)==null?void 0:_.call(x),T==null&&k&&(T=(O=x.getFirstKey)==null?void 0:O.call(x,w)),C(T)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(x.getKeyAbove){p.preventDefault();let T;w!=null?T=x.getKeyAbove(w):T=(E=x.getLastKey)==null?void 0:E.call(x),T==null&&k&&(T=(j=x.getLastKey)==null?void 0:j.call(x,w)),C(T)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(x.getKeyLeftOf){p.preventDefault();const T=o()==="rtl";let I;w!=null?I=x.getKeyLeftOf(w):I=T?($=x.getFirstKey)==null?void 0:$.call(x):(B=x.getLastKey)==null?void 0:B.call(x),C(I)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(x.getKeyRightOf){p.preventDefault();const T=o()==="rtl";let I;w!=null?I=x.getKeyRightOf(w):I=T?(R=x.getLastKey)==null?void 0:R.call(x):(A=x.getFirstKey)==null?void 0:A.call(x),C(I)}break}case"Home":if(x.getFirstKey){p.preventDefault();const T=x.getFirstKey(w,ns(p));T!=null&&(b.setFocusedKey(T),ns(p)&&p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(T):S&&b.replaceSelection(T))}break;case"End":if(x.getLastKey){p.preventDefault();const T=x.getLastKey(w,ns(p));T!=null&&(b.setFocusedKey(T),ns(p)&&p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(T):S&&b.replaceSelection(T))}break;case"PageDown":if(x.getKeyPageBelow&&w!=null){p.preventDefault();const T=x.getKeyPageBelow(w);C(T)}break;case"PageUp":if(x.getKeyPageAbove&&w!=null){p.preventDefault();const T=x.getKeyPageAbove(w);C(T)}break;case"a":ns(p)&&b.selectionMode()==="multiple"&&Y(i.disallowSelectAll)!==!0&&(p.preventDefault(),b.selectAll());break;case"Escape":p.defaultPrevented||(p.preventDefault(),Y(i.disallowEmptySelection)||b.clearSelection());break;case"Tab":if(!Y(i.allowsTabNavigation)){if(p.shiftKey)v.focus();else{const T=RP(v,{tabbable:!0});let I,G;do G=T.lastChild(),G&&(I=G);while(G);I&&!I.contains(document.activeElement)&&Et(I)}break}}},d=p=>{var C,x,k,w;const v=Y(i.selectionManager),b=Y(i.keyboardDelegate),S=Y(i.selectOnFocus);if(v.isFocused()){p.currentTarget.contains(p.target)||v.setFocused(!1);return}if(p.currentTarget.contains(p.target)){if(v.setFocused(!0),v.focusedKey()==null){const _=E=>{E!=null&&(v.setFocusedKey(E),S&&v.replaceSelection(E))},O=p.relatedTarget;O&&p.currentTarget.compareDocumentPosition(O)&Node.DOCUMENT_POSITION_FOLLOWING?_((x=v.lastSelectedKey())!=null?x:(C=b.getLastKey)==null?void 0:C.call(b)):_((w=v.firstSelectedKey())!=null?w:(k=b.getFirstKey)==null?void 0:k.call(b))}else if(!Y(i.isVirtualized)){const _=s();if(_){_.scrollTop=a.top,_.scrollLeft=a.left;const O=_.querySelector(`[data-key="${v.focusedKey()}"]`);O&&(Et(O),Xd(_,O))}}}},f=p=>{const v=Y(i.selectionManager);p.currentTarget.contains(p.relatedTarget)||v.setFocused(!1)},h=p=>{s()===p.target&&p.preventDefault()},g=()=>{var k,w;const p=Y(i.autoFocus);if(!p)return;const v=Y(i.selectionManager),b=Y(i.keyboardDelegate);let S;p==="first"&&(S=(k=b.getFirstKey)==null?void 0:k.call(b)),p==="last"&&(S=(w=b.getLastKey)==null?void 0:w.call(b));const C=v.selectedKeys();C.size&&(S=C.values().next().value),v.setFocused(!0),v.setFocusedKey(S);const x=t();x&&S==null&&!Y(i.shouldUseVirtualFocus)&&Et(x)};return br(()=>{i.deferAutoFocus?setTimeout(g,0):g()}),we(vr([s,()=>Y(i.isVirtualized),()=>Y(i.selectionManager).focusedKey()],p=>{var C;const[v,b,S]=p;if(b)S&&((C=i.scrollToKey)==null||C.call(i,S));else if(S&&v){const x=v.querySelector(`[data-key="${S}"]`);x&&Xd(v,x)}})),{tabIndex:U(()=>{if(!Y(i.shouldUseVirtualFocus))return Y(i.selectionManager).focusedKey()==null?0:-1}),onKeyDown:u,onMouseDown:h,onFocusIn:d,onFocusOut:f}}function Nb(e,t){const n=()=>Y(e.selectionManager),r=()=>Y(e.key),i=()=>Y(e.shouldUseVirtualFocus),s=b=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):b!=null&&b.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||ns(b)||"pointerType"in b&&b.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},o=()=>n().isSelected(r()),a=()=>Y(e.disabled)||n().isDisabled(r()),l=()=>!a()&&n().canSelectItem(r());let c=null;const u=b=>{l()&&(c=b.pointerType,b.pointerType==="mouse"&&b.button===0&&!Y(e.shouldSelectOnPressUp)&&s(b))},d=b=>{l()&&b.pointerType==="mouse"&&b.button===0&&Y(e.shouldSelectOnPressUp)&&Y(e.allowsDifferentPressOrigin)&&s(b)},f=b=>{l()&&(Y(e.shouldSelectOnPressUp)&&!Y(e.allowsDifferentPressOrigin)||c!=="mouse")&&s(b)},h=b=>{!l()||!["Enter"," "].includes(b.key)||(Rb(b)?n().toggleSelection(r()):s(b))},g=b=>{a()&&b.preventDefault()},m=b=>{const S=t();i()||a()||!S||b.target===S&&n().setFocusedKey(r())},p=U(()=>{if(!(i()||a()))return r()===n().focusedKey()?0:-1}),v=U(()=>Y(e.virtualized)?void 0:r());return we(vr([t,r,i,()=>n().focusedKey(),()=>n().isFocused()],([b,S,C,x,k])=>{b&&S===x&&k&&!C&&document.activeElement!==b&&(e.focus?e.focus():Et(b))})),{isSelected:o,isDisabled:a,allowsSelection:l,tabIndex:p,dataKey:v,onPointerDown:u,onPointerUp:d,onClick:f,onKeyDown:h,onMouseDown:g,onFocus:m}}var xT=class{constructor(e,t){ve(this,"collection");ve(this,"state");this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()==="none")return!1;const t=this.getKey(e);return t==null?!1:this.state.selectedKeys().has(t)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every(t=>e.has(t))}firstSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=(n==null?void 0:n.index)!=null&&(e==null?void 0:e.index)!=null&&n.index<e.index;(!e||r)&&(e=n)}return e==null?void 0:e.key}lastSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=(n==null?void 0:n.index)!=null&&(e==null?void 0:e.index)!=null&&n.index>e.index;(!e||r)&&(e=n)}return e==null?void 0:e.key}extendSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=this.state.selectedKeys(),r=n.anchorKey||t,i=new lr(n,r,t);for(const s of this.getKeyRange(r,n.currentKey||t))i.delete(s);for(const s of this.getKeyRange(t,r))this.canSelectItem(s)&&i.add(s);this.state.setSelectedKeys(i)}getKeyRange(e,t){const n=this.collection().getItem(e),r=this.collection().getItem(t);return n&&r?n.index!=null&&r.index!=null&&n.index<=r.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){const n=[];let r=e;for(;r!=null;){const i=this.collection().getItem(r);if(i&&i.type==="item"&&n.push(r),r===t)return n;r=this.collection().getKeyAfter(r)}return[]}getKey(e){const t=this.collection().getItem(e);return t?!t||t.type!=="item"?null:t.key:e}toggleSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=new lr(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection()&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode()==="none")return;const t=this.getKey(e);if(t==null)return;const n=this.canSelectItem(t)?new lr([t],t,t):new lr;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new lr;for(const n of e){const r=this.getKey(n);if(r!=null&&(t.add(r),this.selectionMode()==="single"))break}this.state.setSelectedKeys(t)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new lr)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()==="toggle"||t&&t.pointerType==="touch"?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const t=this.selectedKeys();if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;for(const n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()==="none")return!1;const t=this.collection().getItem(e);return t!=null&&!t.disabled}isDisabled(e){const t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){const e=[];return(n=>{for(;n!=null;){if(this.canSelectItem(n)){const r=this.collection().getItem(n);if(!r)continue;r.type==="item"&&e.push(n)}n=this.collection().getKeyAfter(n)}})(this.collection().getFirstKey()),e}},Yy=class{constructor(e){ve(this,"keyMap",new Map);ve(this,"iterable");ve(this,"firstKey");ve(this,"lastKey");this.iterable=e;for(const r of e)this.keyMap.set(r.key,r);if(this.keyMap.size===0)return;let t,n=0;for(const[r,i]of this.keyMap)t?(t.nextKey=r,i.prevKey=t.key):(this.firstKey=r,i.prevKey=void 0),i.type==="item"&&(i.index=n++),t=i,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){var t;return(t=this.keyMap.get(e))==null?void 0:t.prevKey}getKeyAfter(e){var t;return(t=this.keyMap.get(e))==null?void 0:t.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}};function wT(e){const t=yT(e),r=sT({dataSource:()=>Y(e.dataSource),getKey:()=>Y(e.getKey),getTextValue:()=>Y(e.getTextValue),getDisabled:()=>Y(e.getDisabled),getSectionChildren:()=>Y(e.getSectionChildren),factory:s=>e.filter?new Yy(e.filter(s)):new Yy(s)},[()=>e.filter]),i=new xT(r,t);return Bp(()=>{const s=t.focusedKey();s!=null&&!r().getItem(s)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>i}}var Ot=e=>typeof e=="function"?e():e,ST=e=>{const t=U(()=>{const o=Ot(e.element);if(o)return getComputedStyle(o)}),n=()=>{var o,a;return(a=(o=t())==null?void 0:o.animationName)!=null?a:"none"},[r,i]=se(Ot(e.show)?"present":"hidden");let s="none";return we(o=>{const a=Ot(e.show);return lt(()=>{var u;if(o===a)return a;const l=s,c=n();a?i("present"):c==="none"||((u=t())==null?void 0:u.display)==="none"?i("hidden"):i(o===!0&&l!==c?"hiding":"hidden")}),a}),we(()=>{const o=Ot(e.element);if(!o)return;const a=c=>{c.target===o&&(s=n())},l=c=>{const d=n().includes(c.animationName);c.target===o&&d&&r()==="hiding"&&i("hidden")};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",l),o.addEventListener("animationend",l),Ce(()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",l),o.removeEventListener("animationend",l)})}),{present:()=>r()==="present"||r()==="hiding",state:r}},CT=ST,Fb=CT,cc="data-kb-top-layer",Bb,Jd=!1,xr=[];function ha(e){return xr.findIndex(t=>t.node===e)}function _T(e){return xr[ha(e)]}function kT(e){return xr[xr.length-1].node===e}function qb(){return xr.filter(e=>e.isPointerBlocking)}function OT(){return[...qb()].slice(-1)[0]}function Jf(){return qb().length>0}function zb(e){var n;const t=ha((n=OT())==null?void 0:n.node);return ha(e)<t}function ET(e){xr.push(e)}function AT(e){const t=ha(e);t<0||xr.splice(t,1)}function PT(){for(const{node:e}of xr)e.style.pointerEvents=zb(e)?"none":"auto"}function TT(e){if(Jf()&&!Jd){const t=Xn(e);Bb=document.body.style.pointerEvents,t.body.style.pointerEvents="none",Jd=!0}}function MT(e){if(Jf())return;const t=Xn(e);t.body.style.pointerEvents=Bb,t.body.style.length===0&&t.body.removeAttribute("style"),Jd=!1}var Vt={layers:xr,isTopMostLayer:kT,hasPointerBlockingLayer:Jf,isBelowPointerBlockingLayer:zb,addLayer:ET,removeLayer:AT,indexOf:ha,find:_T,assignPointerEventToLayers:PT,disableBodyPointerEvents:TT,restoreBodyPointerEvents:MT},jT={};Qc(jT,{Button:()=>LT,Root:()=>eh});var $T=["button","color","file","image","reset","submit"];function DT(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?$T.indexOf(e.type)!==-1:!1}function eh(e){let t;const n=qe({type:"button"},e),[r,i]=Ve(n,["ref","type","disabled"]),s=Wc(()=>t,()=>"button"),o=U(()=>{const c=s();return c==null?!1:DT({tagName:c,type:r.type})}),a=U(()=>s()==="input"),l=U(()=>s()==="a"&&(t==null?void 0:t.getAttribute("href"))!=null);return D(ot,Ae({as:"button",ref(c){const u=Lt(d=>t=d,r.ref);typeof u=="function"&&u(c)},get type(){return o()||a()?r.type:void 0},get role(){return!o()&&!l()?"button":void 0},get tabIndex(){return!o()&&!l()&&!r.disabled?0:void 0},get disabled(){return o()||a()?r.disabled:void 0},get"aria-disabled"(){return!o()&&!a()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},i))}var LT=eh,IT=["top","right","bottom","left"],Qn=Math.min,rn=Math.max,uc=Math.round,Cl=Math.floor,Xr=e=>({x:e,y:e}),RT={left:"right",right:"left",bottom:"top",top:"bottom"},NT={start:"end",end:"start"};function ef(e,t,n){return rn(e,Qn(t,n))}function Ki(e,t){return typeof e=="function"?e(t):e}function Zr(e){return e.split("-")[0]}function to(e){return e.split("-")[1]}function Hb(e){return e==="x"?"y":"x"}function th(e){return e==="y"?"height":"width"}function Ni(e){return["top","bottom"].includes(Zr(e))?"y":"x"}function nh(e){return Hb(Ni(e))}function FT(e,t,n){n===void 0&&(n=!1);const r=to(e),i=nh(e),s=th(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=dc(o)),[o,dc(o)]}function BT(e){const t=dc(e);return[tf(e),t,tf(t)]}function tf(e){return e.replace(/start|end/g,t=>NT[t])}function qT(e,t,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?s:o;default:return[]}}function zT(e,t,n,r){const i=to(e);let s=qT(Zr(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(tf)))),s}function dc(e){return e.replace(/left|right|bottom|top/g,t=>RT[t])}function HT(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ub(e){return typeof e!="number"?HT(e):{top:e,right:e,bottom:e,left:e}}function fc(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Xy(e,t,n){let{reference:r,floating:i}=e;const s=Ni(t),o=nh(t),a=th(o),l=Zr(t),c=s==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[a]/2-i[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-i.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(to(t)){case"start":h[o]-=f*(n&&c?-1:1);break;case"end":h[o]+=f*(n&&c?-1:1);break}return h}var UT=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Xy(c,r,l),f=r,h={},g=0;for(let m=0;m<a.length;m++){const{name:p,fn:v}=a[m],{x:b,y:S,data:C,reset:x}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:c,platform:o,elements:{reference:e,floating:t}});u=b!=null?b:u,d=S!=null?S:d,h={...h,[p]:{...h[p],...C}},x&&g<=50&&(g++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(c=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Xy(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:h}};async function ga(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Ki(t,e),g=Ub(h),p=a[f?d==="floating"?"reference":"floating":d],v=fc(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(p)))==null||n?p:p.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},x=fc(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:S,strategy:l}):b);return{top:(v.top-x.top+g.top)/C.y,bottom:(x.bottom-v.bottom+g.bottom)/C.y,left:(v.left-x.left+g.left)/C.x,right:(x.right-v.right+g.right)/C.x}}var GT=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Ki(e,t)||{};if(c==null)return{};const d=Ub(u),f={x:n,y:r},h=nh(i),g=th(h),m=await o.getDimensions(c),p=h==="y",v=p?"top":"left",b=p?"bottom":"right",S=p?"clientHeight":"clientWidth",C=s.reference[g]+s.reference[h]-f[h]-s.floating[g],x=f[h]-s.reference[h],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let w=k?k[S]:0;(!w||!await(o.isElement==null?void 0:o.isElement(k)))&&(w=a.floating[S]||s.floating[g]);const _=C/2-x/2,O=w/2-m[g]/2-1,E=Qn(d[v],O),j=Qn(d[b],O),$=E,B=w-m[g]-j,R=w/2-m[g]/2+_,A=ef($,R,B),T=!l.arrow&&to(i)!=null&&R!==A&&s.reference[g]/2-(R<$?E:j)-m[g]/2<0,I=T?R<$?R-$:R-B:0;return{[h]:f[h]+I,data:{[h]:A,centerOffset:R-A-I,...T&&{alignmentOffset:I}},reset:T}}}),KT=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...p}=Ki(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=Zr(i),b=Ni(a),S=Zr(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=f||(S||!m?[dc(a)]:BT(a)),k=g!=="none";!f&&k&&x.push(...zT(a,m,g,C));const w=[a,...x],_=await ga(t,p),O=[];let E=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&O.push(_[v]),d){const R=FT(i,o,C);O.push(_[R[0]],_[R[1]])}if(E=[...E,{placement:i,overflows:O}],!O.every(R=>R<=0)){var j,$;const R=(((j=s.flip)==null?void 0:j.index)||0)+1,A=w[R];if(A)return{data:{index:R,overflows:E},reset:{placement:A}};let T=($=E.filter(I=>I.overflows[0]<=0).sort((I,G)=>I.overflows[1]-G.overflows[1])[0])==null?void 0:$.placement;if(!T)switch(h){case"bestFit":{var B;const I=(B=E.filter(G=>{if(k){const X=Ni(G.placement);return X===b||X==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(X=>X>0).reduce((X,F)=>X+F,0)]).sort((G,X)=>G[1]-X[1])[0])==null?void 0:B[0];I&&(T=I);break}case"initialPlacement":T=a;break}if(i!==T)return{reset:{placement:T}}}return{}}}};function Zy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Jy(e){return IT.some(t=>e[t]>=0)}var VT=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Ki(e,t);switch(r){case"referenceHidden":{const s=await ga(t,{...i,elementContext:"reference"}),o=Zy(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Jy(o)}}}case"escaped":{const s=await ga(t,{...i,altBoundary:!0}),o=Zy(s,n.floating);return{data:{escapedOffsets:o,escaped:Jy(o)}}}default:return{}}}}};async function WT(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Zr(n),a=to(n),l=Ni(n)==="y",c=["left","top"].includes(o)?-1:1,u=s&&l?-1:1,d=Ki(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}var QT=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await WT(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},YT=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:p=>{let{x:v,y:b}=p;return{x:v,y:b}}},...l}=Ki(e,t),c={x:n,y:r},u=await ga(t,l),d=Ni(Zr(i)),f=Hb(d);let h=c[f],g=c[d];if(s){const p=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=h+u[p],S=h-u[v];h=ef(b,h,S)}if(o){const p=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=g+u[p],S=g-u[v];g=ef(b,g,S)}const m=a.fn({...t,[f]:h,[d]:g});return{...m,data:{x:m.x-n,y:m.y-r}}}}},XT=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:s}=t,{apply:o=()=>{},...a}=Ki(e,t),l=await ga(t,a),c=Zr(n),u=to(n),d=Ni(n)==="y",{width:f,height:h}=r.floating;let g,m;c==="top"||c==="bottom"?(g=c,m=u===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,g=u==="end"?"top":"bottom");const p=h-l.top-l.bottom,v=f-l.left-l.right,b=Qn(h-l[g],p),S=Qn(f-l[m],v),C=!t.middlewareData.shift;let x=b,k=S;if(d?k=u||C?Qn(S,v):v:x=u||C?Qn(b,p):p,C&&!u){const _=rn(l.left,0),O=rn(l.right,0),E=rn(l.top,0),j=rn(l.bottom,0);d?k=f-2*(_!==0||O!==0?_+O:rn(l.left,l.right)):x=h-2*(E!==0||j!==0?E+j:rn(l.top,l.bottom))}await o({...t,availableWidth:k,availableHeight:x});const w=await i.getDimensions(s.floating);return f!==w.width||h!==w.height?{reset:{rects:!0}}:{}}}};function no(e){return Gb(e)?(e.nodeName||"").toLowerCase():"#document"}function an(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Cr(e){var t;return(t=(Gb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Gb(e){return e instanceof Node||e instanceof an(e).Node}function jn(e){return e instanceof Element||e instanceof an(e).Element}function Zn(e){return e instanceof HTMLElement||e instanceof an(e).HTMLElement}function em(e){return typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof an(e).ShadowRoot}function Va(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=$n(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function ZT(e){return["table","td","th"].includes(no(e))}function Yc(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(n){return!1}})}function rh(e){const t=ih(),n=jn(e)?$n(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function JT(e){let t=Jr(e);for(;Zn(t)&&!Ks(t);){if(rh(t))return t;if(Yc(t))return null;t=Jr(t)}return null}function ih(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ks(e){return["html","body","#document"].includes(no(e))}function $n(e){return an(e).getComputedStyle(e)}function Xc(e){return jn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Jr(e){if(no(e)==="html")return e;const t=e.assignedSlot||e.parentNode||em(e)&&e.host||Cr(e);return em(t)?t.host:t}function Kb(e){const t=Jr(e);return Ks(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zn(t)&&Va(t)?t:Kb(t)}function ya(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Kb(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=an(i);return s?t.concat(o,o.visualViewport||[],Va(i)?i:[],o.frameElement&&n?ya(o.frameElement):[]):t.concat(i,ya(i,[],n))}function Vb(e){const t=$n(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Zn(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=uc(n)!==s||uc(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function sh(e){return jn(e)?e:e.contextElement}function us(e){const t=sh(e);if(!Zn(t))return Xr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=Vb(t);let o=(s?uc(n.width):n.width)/r,a=(s?uc(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var eM=Xr(0);function Wb(e){const t=an(e);return!ih()||!t.visualViewport?eM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==an(e)?!1:t}function Fi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=sh(e);let o=Xr(1);t&&(r?jn(r)&&(o=us(r)):o=us(e));const a=tM(s,n,r)?Wb(s):Xr(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(s){const f=an(s),h=r&&jn(r)?an(r):r;let g=f,m=g.frameElement;for(;m&&r&&h!==g;){const p=us(m),v=m.getBoundingClientRect(),b=$n(m),S=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*p.x,C=v.top+(m.clientTop+parseFloat(b.paddingTop))*p.y;l*=p.x,c*=p.y,u*=p.x,d*=p.y,l+=S,c+=C,g=an(m),m=g.frameElement}}return fc({width:u,height:d,x:l,y:c})}function nM(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=Cr(r),a=t?Yc(t.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Xr(1);const u=Xr(0),d=Zn(r);if((d||!d&&!s)&&((no(r)!=="body"||Va(o))&&(l=Xc(r)),Zn(r))){const f=Fi(r);c=us(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function rM(e){return Array.from(e.getClientRects())}function Qb(e){return Fi(Cr(e)).left+Xc(e).scrollLeft}function iM(e){const t=Cr(e),n=Xc(e),r=e.ownerDocument.body,i=rn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=rn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Qb(e);const a=-n.scrollTop;return $n(r).direction==="rtl"&&(o+=rn(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function sM(e,t){const n=an(e),r=Cr(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=ih();(!c||c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function oM(e,t){const n=Fi(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=Zn(e)?us(e):Xr(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:o,height:a,x:l,y:c}}function tm(e,t,n){let r;if(t==="viewport")r=sM(e,n);else if(t==="document")r=iM(Cr(e));else if(jn(t))r=oM(t,n);else{const i=Wb(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return fc(r)}function Yb(e,t){const n=Jr(e);return n===t||!jn(n)||Ks(n)?!1:$n(n).position==="fixed"||Yb(n,t)}function aM(e,t){const n=t.get(e);if(n)return n;let r=ya(e,[],!1).filter(a=>jn(a)&&no(a)!=="body"),i=null;const s=$n(e).position==="fixed";let o=s?Jr(e):e;for(;jn(o)&&!Ks(o);){const a=$n(o),l=rh(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Va(o)&&!l&&Yb(e,o))?r=r.filter(u=>u!==o):i=a,o=Jr(o)}return t.set(e,r),r}function lM(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Yc(t)?[]:aM(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const d=tm(t,u,i);return c.top=rn(d.top,c.top),c.right=Qn(d.right,c.right),c.bottom=Qn(d.bottom,c.bottom),c.left=rn(d.left,c.left),c},tm(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function cM(e){const{width:t,height:n}=Vb(e);return{width:t,height:n}}function uM(e,t,n){const r=Zn(t),i=Cr(t),s=n==="fixed",o=Fi(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Xr(0);if(r||!r&&!s)if((no(t)!=="body"||Va(i))&&(a=Xc(t)),r){const d=Fi(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&(l.x=Qb(i));const c=o.left+a.scrollLeft-l.x,u=o.top+a.scrollTop-l.y;return{x:c,y:u,width:o.width,height:o.height}}function qu(e){return $n(e).position==="static"}function nm(e,t){return!Zn(e)||$n(e).position==="fixed"?null:t?t(e):e.offsetParent}function Xb(e,t){const n=an(e);if(Yc(e))return n;if(!Zn(e)){let i=Jr(e);for(;i&&!Ks(i);){if(jn(i)&&!qu(i))return i;i=Jr(i)}return n}let r=nm(e,t);for(;r&&ZT(r)&&qu(r);)r=nm(r,t);return r&&Ks(r)&&qu(r)&&!rh(r)?n:r||JT(e)||n}var dM=async function(e){const t=this.getOffsetParent||Xb,n=this.getDimensions,r=await n(e.floating);return{reference:uM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function fM(e){return $n(e).direction==="rtl"}var Zb={convertOffsetParentRelativeRectToViewportRelativeRect:nM,getDocumentElement:Cr,getClippingRect:lM,getOffsetParent:Xb,getElementRects:dM,getClientRects:rM,getDimensions:cM,getScale:us,isElement:jn,isRTL:fM};function hM(e,t){let n=null,r;const i=Cr(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=Cl(u),g=Cl(i.clientWidth-(c+d)),m=Cl(i.clientHeight-(u+f)),p=Cl(c),b={rootMargin:-h+"px "+-g+"px "+-m+"px "+-p+"px",threshold:rn(0,Qn(1,l))||1};let S=!0;function C(x){const k=x[0].intersectionRatio;if(k!==l){if(!S)return o();k?o(!1,k):r=setTimeout(()=>{o(!1,1e-7)},1e3)}S=!1}try{n=new IntersectionObserver(C,{...b,root:i.ownerDocument})}catch(x){n=new IntersectionObserver(C,b)}n.observe(e)}return o(!0),s}function gM(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=sh(e),u=i||s?[...c?ya(c):[],...ya(t)]:[];u.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=c&&a?hM(c,n):null;let f=-1,h=null;o&&(h=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let g,m=l?Fi(e):null;l&&p();function p(){const v=Fi(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,g=requestAnimationFrame(p)}return n(),()=>{var v;u.forEach(b=>{i&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(g)}}var yM=QT,mM=YT,pM=KT,vM=XT,bM=VT,xM=GT,wM=(e,t,n)=>{const r=new Map,i={platform:Zb,...n},s={...i.platform,_c:r};return UT(e,t,{...i,platform:s})},oh=xt();function ah(){const e=wt(oh);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var SM=ue('<svg display="block" viewBox="0 0 30 30" style="transform:scale(1.02)"><g><path fill="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z"></path><path stroke="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z">'),nf=30,rm=nf/2,CM={top:180,right:-90,bottom:0,left:90};function lh(e){const t=ah(),n=qe({size:nf},e),[r,i]=Ve(n,["ref","style","size"]),s=()=>t.currentPlacement().split("-")[0],o=_M(t.contentRef),a=()=>{var f;return((f=o())==null?void 0:f.getPropertyValue("background-color"))||"none"},l=()=>{var f;return((f=o())==null?void 0:f.getPropertyValue(`border-${s()}-color`))||"none"},c=()=>{var f;return((f=o())==null?void 0:f.getPropertyValue(`border-${s()}-width`))||"0px"},u=()=>Number.parseInt(c())*2*(nf/r.size),d=()=>`rotate(${CM[s()]} ${rm} ${rm}) translate(0 2)`;return D(ot,Ae({as:"div",ref(f){const h=Lt(t.setArrowRef,r.ref);typeof h=="function"&&h(f)},"aria-hidden":"true",get style(){return Kc({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:a(),stroke:l(),"stroke-width":u()},r.style)}},i,{get children(){const f=SM(),h=f.firstChild;return xe(()=>ee(h,"transform",d())),f}}))}function _M(e){const[t,n]=se();return we(()=>{const r=e();r&&n(CP(r).getComputedStyle(r))}),t}function kM(e){const t=ah(),[n,r]=Ve(e,["ref","style"]);return D(ot,Ae({as:"div",ref(i){const s=Lt(t.setPositionerRef,n.ref);typeof s=="function"&&s(i)},"data-popper-positioner":"",get style(){return Kc({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function im(e){const{x:t=0,y:n=0,width:r=0,height:i=0}=e!=null?e:{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,i);const s={x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:n+i,left:t};return{...s,toJSON:()=>s}}function OM(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?im(r):e?e.getBoundingClientRect():im()}}}function EM(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var AM={top:"bottom",right:"left",bottom:"top",left:"right"};function PM(e,t){const[n,r]=e.split("-"),i=AM[n];return r?n==="left"||n==="right"?`${i} ${r==="start"?"top":"bottom"}`:r==="start"?`${i} ${t==="rtl"?"right":"left"}`:`${i} ${t==="rtl"?"left":"right"}`:`${i} center`}function TM(e){const t=qe({getAnchorRect:f=>f==null?void 0:f.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=se(),[i,s]=se(),[o,a]=se(t.placement),l=()=>{var f;return OM((f=t.anchorRef)==null?void 0:f.call(t),t.getAnchorRect)},{direction:c}=ri();async function u(){var k,w,_;const f=l(),h=n(),g=i();if(!f||!h)return;const m=((g==null?void 0:g.clientHeight)||0)/2,p=typeof t.gutter=="number"?t.gutter+m:(k=t.gutter)!=null?k:m;h.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),f.getBoundingClientRect();const v=[yM(({placement:O})=>{const E=!!O.split("-")[1];return{mainAxis:p,crossAxis:E?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const O=typeof t.flip=="string"?t.flip.split(" "):void 0;if(O!==void 0&&!O.every(EM))throw new Error("`flip` expects a spaced-delimited list of placements");v.push(pM({padding:t.overflowPadding,fallbackPlacements:O}))}(t.slide||t.overlap)&&v.push(mM({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),v.push(vM({padding:t.overflowPadding,apply({availableWidth:O,availableHeight:E,rects:j}){const $=Math.round(j.reference.width);O=Math.floor(O),E=Math.floor(E),h.style.setProperty("--kb-popper-anchor-width",`${$}px`),h.style.setProperty("--kb-popper-content-available-width",`${O}px`),h.style.setProperty("--kb-popper-content-available-height",`${E}px`),t.sameWidth&&(h.style.width=`${$}px`),t.fitViewport&&(h.style.maxWidth=`${O}px`,h.style.maxHeight=`${E}px`)}})),t.hideWhenDetached&&v.push(bM({padding:t.detachedPadding})),g&&v.push(xM({element:g,padding:t.arrowPadding}));const b=await wM(f,h,{placement:t.placement,strategy:"absolute",middleware:v,platform:{...Zb,isRTL:()=>c()==="rtl"}});if(a(b.placement),(w=t.onCurrentPlacementChange)==null||w.call(t,b.placement),!h)return;h.style.setProperty("--kb-popper-content-transform-origin",PM(b.placement,c()));const S=Math.round(b.x),C=Math.round(b.y);let x;if(t.hideWhenDetached&&(x=(_=b.middlewareData.hide)!=null&&_.referenceHidden?"hidden":"visible"),Object.assign(h.style,{top:"0",left:"0",transform:`translate3d(${S}px, ${C}px, 0)`,visibility:x}),g&&b.middlewareData.arrow){const{x:O,y:E}=b.middlewareData.arrow,j=b.placement.split("-")[0];Object.assign(g.style,{left:O!=null?`${O}px`:"",top:E!=null?`${E}px`:"",[j]:"100%"})}}we(()=>{const f=l(),h=n();if(!f||!h)return;const g=gM(f,h,u,{elementResize:typeof ResizeObserver=="function"});Ce(g)}),we(()=>{var g;const f=n(),h=(g=t.contentRef)==null?void 0:g.call(t);!f||!h||queueMicrotask(()=>{f.style.zIndex=getComputedStyle(h).zIndex})});const d={currentPlacement:o,contentRef:()=>{var f;return(f=t.contentRef)==null?void 0:f.call(t)},setPositionerRef:r,setArrowRef:s};return D(oh.Provider,{value:d,get children(){return t.children}})}var Jb=Object.assign(TM,{Arrow:lh,Context:oh,usePopperContext:ah,Positioner:kM});function MM(e){const t=n=>{var r;n.key===Qf.Escape&&((r=e.onEscapeKeyDown)==null||r.call(e,n))};we(()=>{var r,i;if(Y(e.isDisabled))return;const n=(i=(r=e.ownerDocument)==null?void 0:r.call(e))!=null?i:Xn();n.addEventListener("keydown",t),Ce(()=>{n.removeEventListener("keydown",t)})})}var sm="interactOutside.pointerDownOutside",om="interactOutside.focusOutside";function jM(e,t){let n,r=FP;const i=()=>Xn(t()),s=d=>{var f;return(f=e.onPointerDownOutside)==null?void 0:f.call(e,d)},o=d=>{var f;return(f=e.onFocusOutside)==null?void 0:f.call(e,d)},a=d=>{var f;return(f=e.onInteractOutside)==null?void 0:f.call(e,d)},l=d=>{var h;const f=d.target;return!(f instanceof HTMLElement)||f.closest(`[${cc}]`)||!bn(i(),f)||bn(t(),f)?!1:!((h=e.shouldExcludeElement)!=null&&h.call(e,f))},c=d=>{function f(){const h=t(),g=d.target;if(!h||!g||!l(d))return;const m=pt([s,a]);g.addEventListener(sm,m,{once:!0});const p=new CustomEvent(sm,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||AP(d)&&d.button===0}});g.dispatchEvent(p)}d.pointerType==="touch"?(i().removeEventListener("click",f),r=f,i().addEventListener("click",f,{once:!0})):f()},u=d=>{const f=t(),h=d.target;if(!f||!h||!l(d))return;const g=pt([o,a]);h.addEventListener(om,g,{once:!0});const m=new CustomEvent(om,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});h.dispatchEvent(m)};we(()=>{Y(e.isDisabled)||(n=window.setTimeout(()=>{i().addEventListener("pointerdown",c,!0)},0),i().addEventListener("focusin",u,!0),Ce(()=>{window.clearTimeout(n),i().removeEventListener("click",r),i().removeEventListener("pointerdown",c,!0),i().removeEventListener("focusin",u,!0)}))})}var e1=xt();function $M(){return wt(e1)}function DM(e){let t;const n=$M(),[r,i]=Ve(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),s=new Set([]),o=d=>{s.add(d);const f=n==null?void 0:n.registerNestedLayer(d);return()=>{s.delete(d),f==null||f()}};jM({shouldExcludeElement:d=>{var f;return t?((f=r.excludedElements)==null?void 0:f.some(h=>bn(h(),d)))||[...s].some(h=>bn(h,d)):!1},onPointerDownOutside:d=>{var f,h,g;!t||Vt.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!Vt.isTopMostLayer(t)||((f=r.onPointerDownOutside)==null||f.call(r,d),(h=r.onInteractOutside)==null||h.call(r,d),d.defaultPrevented||(g=r.onDismiss)==null||g.call(r))},onFocusOutside:d=>{var f,h,g;(f=r.onFocusOutside)==null||f.call(r,d),(h=r.onInteractOutside)==null||h.call(r,d),d.defaultPrevented||(g=r.onDismiss)==null||g.call(r)}},()=>t),MM({ownerDocument:()=>Xn(t),onEscapeKeyDown:d=>{var f;!t||!Vt.isTopMostLayer(t)||((f=r.onEscapeKeyDown)==null||f.call(r,d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),br(()=>{if(!t)return;Vt.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n==null?void 0:n.registerNestedLayer(t);Vt.assignPointerEventToLayers(),Vt.disableBodyPointerEvents(t),Ce(()=>{t&&(Vt.removeLayer(t),d==null||d(),Vt.assignPointerEventToLayers(),Vt.restoreBodyPointerEvents(t))})}),we(vr([()=>t,()=>r.disableOutsidePointerEvents],([d,f])=>{if(!d)return;const h=Vt.find(d);h&&h.isPointerBlocking!==f&&(h.isPointerBlocking=f,Vt.assignPointerEventToLayers()),f&&Vt.disableBodyPointerEvents(d),Ce(()=>{Vt.restoreBodyPointerEvents(d)})},{defer:!0}));const u={registerNestedLayer:o};return D(e1.Provider,{value:u,get children(){return D(ot,Ae({as:"div",ref(d){const f=Lt(h=>t=h,r.ref);typeof f=="function"&&f(d)}},i))}})}function t1(e={}){const[t,n]=Pb({value:()=>Y(e.open),defaultValue:()=>!!Y(e.defaultOpen),onChange:o=>{var a;return(a=e.onOpenChange)==null?void 0:a.call(e,o)}}),r=()=>{n(!0)},i=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:i,toggle:()=>{t()?i():r()}}}var gn={};Qc(gn,{Description:()=>Eb,ErrorMessage:()=>Ab,Item:()=>s1,ItemControl:()=>o1,ItemDescription:()=>a1,ItemIndicator:()=>l1,ItemInput:()=>c1,ItemLabel:()=>u1,Label:()=>d1,RadioGroup:()=>LM,Root:()=>f1});var n1=xt();function r1(){const e=wt(n1);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var i1=xt();function Wa(){const e=wt(i1);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function s1(e){const t=Ga(),n=r1(),r=`${t.generateId("item")}-${Cn()}`,i=qe({id:r},e),[s,o]=Ve(i,["value","disabled","onPointerDown"]),[a,l]=se(),[c,u]=se(),[d,f]=se(),[h,g]=se(),[m,p]=se(!1),v=U(()=>n.isSelectedValue(s.value)),b=U(()=>s.disabled||t.isDisabled()||!1),S=k=>{rt(k,s.onPointerDown),m()&&k.preventDefault()},C=U(()=>({...t.dataset(),"data-disabled":b()?"":void 0,"data-checked":v()?"":void 0})),x={value:()=>s.value,dataset:C,isSelected:v,isDisabled:b,inputId:a,labelId:c,descriptionId:d,inputRef:h,select:()=>n.setSelectedValue(s.value),generateId:Ua(()=>o.id),registerInput:xn(l),registerLabel:xn(u),registerDescription:xn(f),setIsFocused:p,setInputRef:g};return D(i1.Provider,{value:x,get children(){return D(ot,Ae({as:"div",role:"group",onPointerDown:S},C,o))}})}function o1(e){const t=Wa(),n=qe({id:t.generateId("control")},e),[r,i]=Ve(n,["onClick","onKeyDown"]);return D(ot,Ae({as:"div",onClick:a=>{var l;rt(a,r.onClick),t.select(),(l=t.inputRef())==null||l.focus()},onKeyDown:a=>{var l;rt(a,r.onKeyDown),a.key===Qf.Space&&(t.select(),(l=t.inputRef())==null||l.focus())}},()=>t.dataset(),i))}function a1(e){const t=Wa(),n=qe({id:t.generateId("description")},e);return we(()=>Ce(t.registerDescription(n.id))),D(ot,Ae({as:"div"},()=>t.dataset(),n))}function l1(e){const t=Wa(),n=qe({id:t.generateId("indicator")},e),[r,i]=Ve(n,["ref","forceMount"]),[s,o]=se(),{present:a}=Fb({show:()=>r.forceMount||t.isSelected(),element:()=>{var l;return(l=s())!=null?l:null}});return D(be,{get when(){return a()},get children(){return D(ot,Ae({as:"div",ref(l){const c=Lt(o,r.ref);typeof c=="function"&&c(l)}},()=>t.dataset(),i))}})}function c1(e){const t=Ga(),n=r1(),r=Wa(),i=qe({id:r.generateId("input")},e),[s,o]=Ve(i,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),a=()=>[s["aria-labelledby"],r.labelId(),s["aria-labelledby"]!=null&&o["aria-label"]!=null?o.id:void 0].filter(Boolean).join(" ")||void 0,l=()=>[s["aria-describedby"],r.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0,[c,u]=se(!1),d=g=>{if(rt(g,s.onChange),g.stopPropagation(),!c()){n.setSelectedValue(r.value());const m=g.target;m.checked=r.isSelected()}u(!1)},f=g=>{rt(g,s.onFocus),r.setIsFocused(!0)},h=g=>{rt(g,s.onBlur),r.setIsFocused(!1)};return we(vr([()=>r.isSelected(),()=>r.value()],g=>{if(!g[0]&&g[1]===r.value())return;u(!0);const m=r.inputRef();m==null||m.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),m==null||m.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),we(()=>Ce(r.registerInput(o.id))),D(ot,Ae({as:"input",ref(g){const m=Lt(r.setInputRef,s.ref);typeof m=="function"&&m(g)},type:"radio",get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return Kc({...kb},s.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return l()},onChange:d,onFocus:f,onBlur:h},()=>r.dataset(),o))}function u1(e){const t=Wa(),n=qe({id:t.generateId("label")},e);return we(()=>Ce(t.registerLabel(n.id))),D(ot,Ae({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function d1(e){return D(UP,Ae({as:"span"},e))}function f1(e){let t;const n=`radiogroup-${Cn()}`,r=qe({id:n,orientation:"vertical"},e),[i,s,o]=Ve(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],zP),[a,l]=Ka({value:()=>i.value,defaultValue:()=>i.defaultValue,onChange:g=>{var m;return(m=i.onChange)==null?void 0:m.call(i,g)}}),{formControlContext:c}=HP(s);GP(()=>t,()=>{var g;return l((g=i.defaultValue)!=null?g:"")});const u=()=>c.getAriaLabelledBy(Y(s.id),o["aria-label"],i["aria-labelledby"]),d=()=>c.getAriaDescribedBy(i["aria-describedby"]),f=g=>g===a(),h={ariaDescribedBy:d,isSelectedValue:f,setSelectedValue:g=>{if(!(c.isReadOnly()||c.isDisabled())&&(l(g),t))for(const m of t.querySelectorAll("[type='radio']")){const p=m;p.checked=f(p.value)}}};return D(Ob.Provider,{value:c,get children(){return D(n1.Provider,{value:h,get children(){return D(ot,Ae({as:"div",ref(g){const m=Lt(p=>t=p,i.ref);typeof m=="function"&&m(g)},role:"radiogroup",get id(){return Y(s.id)},get"aria-invalid"(){return c.validationState()==="invalid"||void 0},get"aria-required"(){return c.isRequired()||void 0},get"aria-disabled"(){return c.isDisabled()||void 0},get"aria-readonly"(){return c.isReadOnly()||void 0},get"aria-orientation"(){return i.orientation},get"aria-labelledby"(){return u()},get"aria-describedby"(){return d()}},()=>c.dataset(),o))}})}})}var LM=Object.assign(f1,{Description:Eb,ErrorMessage:Ab,Item:s1,ItemControl:o1,ItemDescription:a1,ItemIndicator:l1,ItemInput:c1,ItemLabel:u1,Label:d1}),IM=class{constructor(e,t,n){ve(this,"collection");ve(this,"ref");ve(this,"collator");this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){var t,n,r;return(r=(n=(t=this.ref)==null?void 0:t.call(this))==null?void 0:n.querySelector(`[data-key="${e}"]`))!=null?r:null}getKeyPageAbove(e){var s;const t=(s=this.ref)==null?void 0:s.call(this);let n=this.getItem(e);if(!t||!n)return;const r=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight);let i=e;for(;i&&n&&n.offsetTop>r;)i=this.getKeyAbove(i),n=i!=null?this.getItem(i):null;return i}getKeyPageBelow(e){var s;const t=(s=this.ref)==null?void 0:s.call(this);let n=this.getItem(e);if(!t||!n)return;const r=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight);let i=e;for(;i&&n&&n.offsetTop<r;)i=this.getKeyBelow(i),n=i!=null?this.getItem(i):null;return i}getKeyForSearch(e,t){var i;const n=(i=this.collator)==null?void 0:i.call(this);if(!n)return;let r=t!=null?this.getKeyBelow(t):this.getFirstKey();for(;r!=null;){const s=this.collection().getItem(r);if(s){const o=s.textValue.slice(0,e.length);if(s.textValue&&n.compare(o,e)===0)return r}r=this.getKeyBelow(r)}}};function RM(e,t,n){const r=fT({usage:"search",sensitivity:"base"}),i=U(()=>{const s=Y(e.keyboardDelegate);return s||new IM(e.collection,t,r)});return bT({selectionManager:()=>Y(e.selectionManager),keyboardDelegate:i,autoFocus:()=>Y(e.autoFocus),deferAutoFocus:()=>Y(e.deferAutoFocus),shouldFocusWrap:()=>Y(e.shouldFocusWrap),disallowEmptySelection:()=>Y(e.disallowEmptySelection),selectOnFocus:()=>Y(e.selectOnFocus),disallowTypeAhead:()=>Y(e.disallowTypeAhead),shouldUseVirtualFocus:()=>Y(e.shouldUseVirtualFocus),allowsTabNavigation:()=>Y(e.allowsTabNavigation),isVirtualized:()=>Y(e.isVirtualized),scrollToKey:s=>{var o;return(o=Y(e.scrollToKey))==null?void 0:o(s)},orientation:()=>Y(e.orientation)},t)}var zu="focusScope.autoFocusOnMount",Hu="focusScope.autoFocusOnUnmount",am={bubbles:!1,cancelable:!0},lm={stack:[],active(){return this.stack[0]},add(e){var t;e!==this.active()&&((t=this.active())==null||t.pause()),this.stack=Yd(this.stack,e),this.stack.unshift(e)},remove(e){var t;this.stack=Yd(this.stack,e),(t=this.active())==null||t.resume()}};function NM(e,t){const[n,r]=se(!1),i={pause(){r(!0)},resume(){r(!1)}};let s=null;const o=g=>{var m;return(m=e.onMountAutoFocus)==null?void 0:m.call(e,g)},a=g=>{var m;return(m=e.onUnmountAutoFocus)==null?void 0:m.call(e,g)},l=()=>Xn(t()),c=()=>{const g=l().createElement("span");return g.setAttribute("data-focus-trap",""),g.tabIndex=0,Object.assign(g.style,kb),g},u=()=>{const g=t();return g?Cb(g,!0).filter(m=>!m.hasAttribute("data-focus-trap")):[]},d=()=>{const g=u();return g.length>0?g[0]:null},f=()=>{const g=u();return g.length>0?g[g.length-1]:null},h=()=>{const g=t();if(!g)return!1;const m=Lo(g);return!m||bn(g,m)?!1:_b(m)};we(()=>{const g=t();if(!g)return;lm.add(i);const m=Lo(g);if(!bn(g,m)){const v=new CustomEvent(zu,am);g.addEventListener(zu,o),g.dispatchEvent(v),v.defaultPrevented||setTimeout(()=>{Et(d()),Lo(g)===m&&Et(g)},0)}Ce(()=>{g.removeEventListener(zu,o),setTimeout(()=>{const v=new CustomEvent(Hu,am);h()&&v.preventDefault(),g.addEventListener(Hu,a),g.dispatchEvent(v),v.defaultPrevented||Et(m!=null?m:l().body),g.removeEventListener(Hu,a),lm.remove(i)},0)})}),we(()=>{const g=t();if(!g||!Y(e.trapFocus)||n())return;const m=v=>{const b=v.target;b!=null&&b.closest(`[${cc}]`)||(bn(g,b)?s=b:Et(s))},p=v=>{const b=v.relatedTarget,S=b!=null?b:Lo(g);S!=null&&S.closest(`[${cc}]`)||bn(g,S)||Et(s)};l().addEventListener("focusin",m),l().addEventListener("focusout",p),Ce(()=>{l().removeEventListener("focusin",m),l().removeEventListener("focusout",p)})}),we(()=>{const g=t();if(!g||!Y(e.trapFocus)||n())return;const m=c();g.insertAdjacentElement("afterbegin",m);const p=c();g.insertAdjacentElement("beforeend",p);function v(S){const C=d(),x=f();S.relatedTarget===C?Et(x):Et(C)}m.addEventListener("focusin",v),p.addEventListener("focusin",v);const b=new MutationObserver(S=>{for(const C of S)C.previousSibling===p&&(p.remove(),g.insertAdjacentElement("beforeend",p)),C.nextSibling===m&&(m.remove(),g.insertAdjacentElement("afterbegin",m))});b.observe(g,{childList:!0,subtree:!1}),Ce(()=>{m.removeEventListener("focusin",v),p.removeEventListener("focusin",v),m.remove(),p.remove(),b.disconnect()})})}var FM="data-live-announcer";function BM(e){we(()=>{Y(e.isDisabled)||Ce(qM(Y(e.targets),Y(e.root)))})}var Co=new WeakMap,hn=[];function qM(e,t=document.body){const n=new Set(e),r=new Set,i=l=>{for(const f of l.querySelectorAll(`[${FM}], [${cc}]`))n.add(f);const c=f=>{if(n.has(f)||f.parentElement&&r.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const h of n)if(f.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},u=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),d=c(l);if(d===NodeFilter.FILTER_ACCEPT&&s(l),d!==NodeFilter.FILTER_REJECT){let f=u.nextNode();for(;f!=null;)s(f),f=u.nextNode()}},s=l=>{var u;const c=(u=Co.get(l))!=null?u:0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),r.add(l),Co.set(l,c+1))};hn.length&&hn[hn.length-1].disconnect(),i(t);const o=new MutationObserver(l=>{for(const c of l)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(u=>u.contains(c.target))){for(const u of c.removedNodes)u instanceof Element&&(n.delete(u),r.delete(u));for(const u of c.addedNodes)(u instanceof HTMLElement||u instanceof SVGElement)&&(u.dataset.liveAnnouncer==="true"||u.dataset.reactAriaTopLayer==="true")?n.add(u):u instanceof Element&&i(u)}});o.observe(t,{childList:!0,subtree:!0});const a={observe(){o.observe(t,{childList:!0,subtree:!0})},disconnect(){o.disconnect()}};return hn.push(a),()=>{o.disconnect();for(const l of r){const c=Co.get(l);if(c==null)return;c===1?(l.removeAttribute("aria-hidden"),Co.delete(l)):Co.set(l,c-1)}a===hn[hn.length-1]?(hn.pop(),hn.length&&hn[hn.length-1].observe()):hn.splice(hn.indexOf(a),1)}}var _l=new Map,zM=e=>{we(()=>{var s,o;const t=(s=Ot(e.style))!=null?s:{},n=(o=Ot(e.properties))!=null?o:[],r={};for(const a in t)r[a]=e.element.style[a];const i=_l.get(e.key);i?i.activeCount++:_l.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(a=>a.key)}),Object.assign(e.element.style,e.style);for(const a of n)e.element.style.setProperty(a.key,a.value);Ce(()=>{var l;const a=_l.get(e.key);if(a){if(a.activeCount!==1){a.activeCount--;return}_l.delete(e.key);for(const[c,u]of Object.entries(a.originalStyles))e.element.style[c]=u;for(const c of a.properties)e.element.style.removeProperty(c);e.element.style.length===0&&e.element.removeAttribute("style"),(l=e.cleanup)==null||l.call(e)}})})},cm=zM,HM=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},UM=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},GM=(e,t,n)=>{var l;const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let i=e,s=0,o=0,a=!1;do{const[c,u,d]=HM(i,t),f=d-c-r*u;(u!==0||f!==0)&&UM(i,t)&&(s+=f,o+=u),i===(n!=null?n:document.documentElement)?a=!0:i=(l=i._$host)!=null?l:i.parentElement}while(i&&!a);return[s,o]},[um,dm]=se([]),KM=e=>um().indexOf(e)===um().length-1,VM=e=>{const t=Ae({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=Cn();let r=[0,0],i=null,s=null;we(()=>{Ot(t.enabled)&&(dm(c=>[...c,n]),Ce(()=>{dm(c=>c.filter(u=>u!==n))}))}),we(()=>{if(!Ot(t.enabled)||!Ot(t.hideScrollbar))return;const{body:c}=document,u=window.innerWidth-c.offsetWidth;if(Ot(t.preventScrollbarShift)){const d={overflow:"hidden"},f=[];u>0&&(Ot(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${u}px)`:d.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${u}px)`,f.push({key:"--scrollbar-width",value:`${u}px`}));const h=window.scrollY,g=window.scrollX;cm({key:"prevent-scroll",element:c,style:d,properties:f,cleanup:()=>{Ot(t.restoreScrollPosition)&&u>0&&window.scrollTo(g,h)}})}else cm({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),we(()=>{!KM(n)||!Ot(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",o,{passive:!1}),document.addEventListener("touchmove",l,{passive:!1}),Ce(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",o),document.removeEventListener("touchmove",l)}))});const o=c=>{r=fm(c),i=null,s=null},a=c=>{const u=c.target,d=Ot(t.element),f=WM(c),h=Math.abs(f[0])>Math.abs(f[1])?"x":"y",g=h==="x"?f[0]:f[1],m=hm(u,h,g,d);let p;d&&rf(d,u)?p=!m:p=!0,p&&c.cancelable&&c.preventDefault()},l=c=>{const u=Ot(t.element),d=c.target;let f;if(c.touches.length===2)f=!Ot(t.allowPinchZoom);else{if(i==null||s===null){const h=fm(c).map((m,p)=>r[p]-m),g=Math.abs(h[0])>Math.abs(h[1])?"x":"y";i=g,s=g==="x"?h[0]:h[1]}if(d.type==="range")f=!1;else{const h=hm(d,i,s,u);u&&rf(u,d)?f=!h:f=!0}}f&&c.cancelable&&c.preventDefault()}},WM=e=>[e.deltaX,e.deltaY],fm=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],hm=(e,t,n,r)=>{const i=r!==null&&rf(r,e),[s,o]=GM(e,t,i?r:void 0);return!(n>0&&Math.abs(s)<=1||n<0&&Math.abs(o)<1)},rf=(e,t)=>{var r;if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=(r=n._$host)!=null?r:n.parentElement}return!1},QM=VM,YM=QM,h1=xt();function g1(){return wt(h1)}function _r(){const e=g1();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var y1=xt();function ch(){const e=wt(y1);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var m1=xt();function er(){const e=wt(m1);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function uh(e){let t;const n=er(),r=_r(),i=qe({id:n.generateId(`item-${Cn()}`)},e),[s,o]=Ve(i,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,l]=se(),[c,u]=se(),[d,f]=se(),h=()=>r.listState().selectionManager(),g=()=>o.id,m=()=>h().focusedKey()===g(),p=()=>{var O;(O=s.onSelect)==null||O.call(s),s.closeOnSelect&&setTimeout(()=>{r.close(!0)})};iT({getItem:()=>{var O,E,j,$,B;return{ref:()=>t,type:"item",key:g(),textValue:($=(j=(E=s.textValue)!=null?E:(O=d())==null?void 0:O.textContent)!=null?j:t==null?void 0:t.textContent)!=null?$:"",disabled:(B=s.disabled)!=null?B:!1}}});const v=Nb({key:g,selectionManager:h,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>s.disabled},()=>t),b=O=>{rt(O,s.onPointerMove),O.pointerType==="mouse"&&(s.disabled?r.onItemLeave(O):(r.onItemEnter(O),O.defaultPrevented||(Et(O.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(g()))))},S=O=>{rt(O,s.onPointerLeave),O.pointerType==="mouse"&&r.onItemLeave(O)},C=O=>{rt(O,s.onPointerUp),!s.disabled&&O.button===0&&p()},x=O=>{if(rt(O,s.onKeyDown),!O.repeat&&!s.disabled)switch(O.key){case"Enter":case" ":p();break}},k=U(()=>{if(s.indeterminate)return"mixed";if(s.checked!=null)return s.checked}),w=U(()=>({"data-indeterminate":s.indeterminate?"":void 0,"data-checked":s.checked&&!s.indeterminate?"":void 0,"data-disabled":s.disabled?"":void 0,"data-highlighted":m()?"":void 0})),_={isChecked:()=>s.checked,dataset:w,setLabelRef:f,generateId:Ua(()=>o.id),registerLabel:xn(l),registerDescription:xn(u)};return D(y1.Provider,{value:_,get children(){return D(ot,Ae({as:"div",ref(O){const E=Lt(j=>t=j,s.ref);typeof E=="function"&&E(O)},get tabIndex(){return v.tabIndex()},get"aria-checked"(){return k()},get"aria-disabled"(){return s.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-key"(){return v.dataKey()},get onPointerDown(){return pt([s.onPointerDown,v.onPointerDown])},get onPointerUp(){return pt([C,v.onPointerUp])},get onClick(){return pt([s.onClick,v.onClick])},get onKeyDown(){return pt([x,v.onKeyDown])},get onMouseDown(){return pt([s.onMouseDown,v.onMouseDown])},get onFocus(){return pt([s.onFocus,v.onFocus])},onPointerMove:b,onPointerLeave:S},w,o))}})}function p1(e){const t=qe({closeOnSelect:!1},e),[n,r]=Ve(t,["checked","defaultChecked","onChange","onSelect"]),i=QP({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:o=>{var a;return(a=n.onChange)==null?void 0:a.call(n,o)},isDisabled:()=>r.disabled});return D(uh,Ae({role:"menuitemcheckbox",get checked(){return i.isSelected()},onSelect:()=>{var o;(o=n.onSelect)==null||o.call(n),i.toggle()}},r))}var XM=xt();function Zc(){return wt(XM)}var ma={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>ma.next(e==="ltr"?"rtl":"ltr",t)},gm={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function v1(e){const t=er(),n=_r(),r=Zc(),{direction:i}=ri(),s=qe({id:t.generateId("trigger")},e),[o,a]=Ve(s,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let l=()=>t.value();r!==void 0&&(l=()=>{var v;return(v=t.value())!=null?v:o.id},r.lastValue()===void 0&&r.setLastValue(l));const c=Wc(()=>n.triggerRef(),()=>"button"),u=U(()=>{var v;return c()==="a"&&((v=n.triggerRef())==null?void 0:v.getAttribute("href"))!=null});we(vr(()=>r==null?void 0:r.value(),v=>{var b;u()&&v===l()&&((b=n.triggerRef())==null||b.focus())}));const d=()=>{r!==void 0?n.isOpen()?r.value()===l()&&r.closeMenu():(r.autoFocusMenu()||r.setAutoFocusMenu(!0),n.open(!1)):n.toggle(!0)},f=v=>{rt(v,o.onPointerDown),v.currentTarget.dataset.pointerType=v.pointerType,!o.disabled&&v.pointerType!=="touch"&&v.button===0&&d()},h=v=>{rt(v,o.onClick),o.disabled||v.currentTarget.dataset.pointerType==="touch"&&d()},g=v=>{if(rt(v,o.onKeyDown),!o.disabled){if(u())switch(v.key){case"Enter":case" ":return}switch(v.key){case"Enter":case" ":case gm.first(t.orientation()):v.stopPropagation(),v.preventDefault(),qP(v.currentTarget),n.open("first"),r==null||r.setAutoFocusMenu(!0),r==null||r.setValue(l);break;case gm.last(t.orientation()):v.stopPropagation(),v.preventDefault(),n.open("last");break;case ma.next(i(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.nextMenu();break;case ma.previous(i(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.previousMenu();break}}},m=v=>{var b;rt(v,o.onMouseOver),((b=n.triggerRef())==null?void 0:b.dataset.pointerType)!=="touch"&&!o.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(l)},p=v=>{rt(v,o.onFocus),r!==void 0&&v.currentTarget.dataset.pointerType!=="touch"&&r.setValue(l)};return we(()=>Ce(n.registerTriggerId(o.id))),D(eh,Ae({ref(v){const b=Lt(n.setTriggerRef,o.ref);typeof b=="function"&&b(v)},get"data-kb-menu-value-trigger"(){return t.value()},get id(){return o.id},get disabled(){return o.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return U(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return l()!==void 0&&(r==null?void 0:r.value())===l()?!0:void 0},get tabIndex(){return r!==void 0?r.value()===l()||r.lastValue()===l()?0:-1:void 0},onPointerDown:f,onMouseOver:m,onClick:h,onKeyDown:g,onFocus:p,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}var ZM=xt();function b1(){return wt(ZM)}function x1(e){let t;const n=er(),r=_r(),i=Zc(),s=b1(),{direction:o}=ri(),a=qe({id:n.generateId(`content-${Cn()}`)},e),[l,c]=Ve(a,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let u=0;const d=()=>r.parentMenuContext()==null&&i===void 0&&n.isModal(),f=RM({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused(),orientation:()=>n.orientation()==="horizontal"?"vertical":"horizontal"},()=>t);NM({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:S=>{var C;i===void 0&&((C=l.onOpenAutoFocus)==null||C.call(l,S))},onUnmountAutoFocus:l.onCloseAutoFocus},()=>t);const h=S=>{if(bn(S.currentTarget,S.target)&&(S.key==="Tab"&&r.isOpen()&&S.preventDefault(),i!==void 0&&S.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(S.key){case ma.next(o(),n.orientation()):S.stopPropagation(),S.preventDefault(),r.close(!0),i.setAutoFocusMenu(!0),i.nextMenu();break;case ma.previous(o(),n.orientation()):if(S.currentTarget.hasAttribute("data-closed"))break;S.stopPropagation(),S.preventDefault(),r.close(!0),i.setAutoFocusMenu(!0),i.previousMenu();break}},g=S=>{var C;(C=l.onEscapeKeyDown)==null||C.call(l,S),i==null||i.setAutoFocusMenu(!1),r.close(!0)},m=S=>{var C;(C=l.onFocusOutside)==null||C.call(l,S),n.isModal()&&S.preventDefault()},p=S=>{var C,x;rt(S,l.onPointerEnter),r.isOpen()&&((C=r.parentMenuContext())==null||C.listState().selectionManager().setFocused(!1),(x=r.parentMenuContext())==null||x.listState().selectionManager().setFocusedKey(void 0))},v=S=>{if(rt(S,l.onPointerMove),S.pointerType!=="mouse")return;const C=S.target,x=u!==S.clientX;bn(S.currentTarget,C)&&x&&(r.setPointerDir(S.clientX>u?"right":"left"),u=S.clientX)};we(()=>Ce(r.registerContentId(l.id)));const b={ref:Lt(S=>{r.setContentRef(S),t=S},l.ref),role:"menu",get id(){return l.id},get tabIndex(){return f.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:pt([l.onKeyDown,f.onKeyDown,h]),onMouseDown:pt([l.onMouseDown,f.onMouseDown]),onFocusIn:pt([l.onFocusIn,f.onFocusIn]),onFocusOut:pt([l.onFocusOut,f.onFocusOut]),onPointerEnter:p,onPointerMove:v,get"data-orientation"(){return n.orientation()}};return D(be,{get when(){return r.contentPresent()},get children(){return D(be,{get when(){return s===void 0||r.parentMenuContext()!=null},get fallback(){return D(ot,Ae({as:"div"},()=>r.dataset(),b,c))},get children(){return D(Jb.Positioner,{get children(){return D(DM,Ae({get disableOutsidePointerEvents(){return U(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return Kc({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},l.style)},onEscapeKeyDown:g,onFocusOutside:m,get onDismiss(){return r.close}},()=>r.dataset(),b,c))}})}})}})}function JM(e){let t;const n=er(),r=_r(),[i,s]=Ve(e,["ref"]);return YM({element:()=>t!=null?t:null,enabled:()=>r.contentPresent()&&n.preventScroll()}),D(x1,Ae({ref(o){const a=Lt(l=>{t=l},i.ref);typeof a=="function"&&a(o)}},s))}var w1=xt();function ej(){const e=wt(w1);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function dh(e){const t=er(),n=qe({id:t.generateId(`group-${Cn()}`)},e),[r,i]=se(),s={generateId:Ua(()=>n.id),registerLabelId:xn(i)};return D(w1.Provider,{value:s,get children(){return D(ot,Ae({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function S1(e){const t=ej(),n=qe({id:t.generateId("label")},e),[r,i]=Ve(n,["id"]);return we(()=>Ce(t.registerLabelId(r.id))),D(ot,Ae({as:"span",get id(){return r.id},"aria-hidden":"true"},i))}function C1(e){const t=_r(),n=qe({children:"▼"},e);return D(ot,Ae({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function _1(e){return D(uh,Ae({role:"menuitem",closeOnSelect:!0},e))}function k1(e){const t=ch(),n=qe({id:t.generateId("description")},e),[r,i]=Ve(n,["id"]);return we(()=>Ce(t.registerDescription(r.id))),D(ot,Ae({as:"div",get id(){return r.id}},()=>t.dataset(),i))}function O1(e){const t=ch(),n=qe({id:t.generateId("indicator")},e),[r,i]=Ve(n,["forceMount"]);return D(be,{get when(){return r.forceMount||t.isChecked()},get children(){return D(ot,Ae({as:"div"},()=>t.dataset(),i))}})}function E1(e){const t=ch(),n=qe({id:t.generateId("label")},e),[r,i]=Ve(n,["ref","id"]);return we(()=>Ce(t.registerLabel(r.id))),D(ot,Ae({as:"div",ref(s){const o=Lt(t.setLabelRef,r.ref);typeof o=="function"&&o(s)},get id(){return r.id}},()=>t.dataset(),i))}function A1(e){const t=_r();return D(be,{get when(){return t.contentPresent()},get children(){return D(Jp,e)}})}var P1=xt();function tj(){const e=wt(P1);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function T1(e){const n=er().generateId(`radiogroup-${Cn()}`),r=qe({id:n},e),[i,s]=Ve(r,["value","defaultValue","onChange","disabled"]),[o,a]=Ka({value:()=>i.value,defaultValue:()=>i.defaultValue,onChange:c=>{var u;return(u=i.onChange)==null?void 0:u.call(i,c)}}),l={isDisabled:()=>i.disabled,isSelectedValue:c=>c===o(),setSelectedValue:a};return D(P1.Provider,{value:l,get children(){return D(dh,s)}})}function M1(e){const t=tj(),n=qe({closeOnSelect:!1},e),[r,i]=Ve(n,["value","onSelect"]);return D(uh,Ae({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{var o;(o=r.onSelect)==null||o.call(r),t.setSelectedValue(r.value)}},i))}function nj(e,t,n){const r=e.split("-")[0],i=n.getBoundingClientRect(),s=[],o=t.clientX,a=t.clientY;switch(r){case"top":s.push([o,a+5]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]);break;case"right":s.push([o-5,a]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]);break;case"bottom":s.push([o,a-5]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([i.left,i.top]);break;case"left":s.push([o+5,a]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]);break}return s}function rj(e,t){return t?BP([e.clientX,e.clientY],t):!1}function j1(e){const t=er(),n=Mb(),r=g1(),i=Zc(),s=b1(),o=qe({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,l]=Ve(o,["open","defaultOpen","onOpenChange"]);let c=0,u=null,d="right";const[f,h]=se(),[g,m]=se(),[p,v]=se(),[b,S]=se(),[C,x]=se(!0),[k,w]=se(l.placement),[_,O]=se([]),[E,j]=se([]),{DomCollectionProvider:$}=rT({items:E,onItemsChange:j}),B=t1({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:J=>{var Se;return(Se=a.onOpenChange)==null?void 0:Se.call(a,J)}}),{present:R}=Fb({show:()=>t.forceMount()||B.isOpen(),element:()=>{var J;return(J=b())!=null?J:null}}),A=wT({selectionMode:"none",dataSource:E}),T=J=>{x(J),B.open()},I=(J=!1)=>{B.close(),J&&r&&r.close(!0)},G=J=>{x(J),B.toggle()},X=()=>{const J=b();J&&(Et(J),A.selectionManager().setFocused(!0),A.selectionManager().setFocusedKey(void 0))},F=()=>{s!=null?setTimeout(()=>X()):X()},W=J=>{O(te=>[...te,J]);const Se=r==null?void 0:r.registerNestedMenu(J);return()=>{O(te=>Yd(te,J)),Se==null||Se()}},ie=J=>d===(u==null?void 0:u.side)&&rj(J,u==null?void 0:u.area),oe=J=>{ie(J)&&J.preventDefault()},N=J=>{ie(J)||F()},ce=J=>{ie(J)&&J.preventDefault()};BM({isDisabled:()=>!(r==null&&B.isOpen()&&t.isModal()),targets:()=>[b(),..._()].filter(Boolean)}),we(()=>{const J=b();if(!J||!r)return;const Se=r.registerNestedMenu(J);Ce(()=>{Se()})}),we(()=>{r===void 0&&(i==null||i.registerMenu(t.value(),[b(),..._()]))}),we(()=>{var J;r!==void 0||i===void 0||(i.value()===t.value()?((J=p())==null||J.focus(),i.autoFocusMenu()&&T(!0)):I())}),we(()=>{r!==void 0||i===void 0||B.isOpen()&&i.setValue(t.value())}),Ce(()=>{r===void 0&&(i==null||i.unregisterMenu(t.value()))});const me={dataset:U(()=>({"data-expanded":B.isOpen()?"":void 0,"data-closed":B.isOpen()?void 0:""})),isOpen:B.isOpen,contentPresent:R,nestedMenus:_,currentPlacement:k,pointerGraceTimeoutId:()=>c,autoFocus:C,listState:()=>A,parentMenuContext:()=>r,triggerRef:p,contentRef:b,triggerId:f,contentId:g,setTriggerRef:v,setContentRef:S,open:T,close:I,toggle:G,focusContent:F,onItemEnter:oe,onItemLeave:N,onTriggerLeave:ce,setPointerDir:J=>d=J,setPointerGraceTimeoutId:J=>c=J,setPointerGraceIntent:J=>u=J,registerNestedMenu:W,registerItemToParentDomCollection:n==null?void 0:n.registerItem,registerTriggerId:xn(h),registerContentId:xn(m)};return D($,{get children(){return D(h1.Provider,{value:me,get children(){return D(be,{when:s===void 0,get fallback(){return l.children},get children(){return D(Jb,Ae({anchorRef:p,contentRef:b,onCurrentPlacementChange:w},l))}})}})}})}function $1(e){const{direction:t}=ri();return D(j1,Ae({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var ij={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function D1(e){const t=_r(),n=er(),[r,i]=Ve(e,["onFocusOutside","onKeyDown"]),{direction:s}=ri();return D(x1,Ae({onOpenAutoFocus:u=>{u.preventDefault()},onCloseAutoFocus:u=>{u.preventDefault()},onFocusOutside:u=>{var f;(f=r.onFocusOutside)==null||f.call(r,u);const d=u.target;bn(t.triggerRef(),d)||t.close()},onKeyDown:u=>{rt(u,r.onKeyDown);const d=bn(u.currentTarget,u.target),f=ij.close(s(),n.orientation()).includes(u.key),h=t.parentMenuContext()!=null;d&&f&&h&&(t.close(),Et(t.triggerRef()))}},i))}var ym=["Enter"," "],sj={open:(e,t)=>e==="ltr"?[...ym,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...ym,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function L1(e){let t;const n=er(),r=_r(),i=qe({id:n.generateId(`sub-trigger-${Cn()}`)},e),[s,o]=Ve(i,["ref","id","textValue","disabled","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);let a=null;const l=()=>{a&&window.clearTimeout(a),a=null},{direction:c}=ri(),u=()=>s.id,d=()=>{const S=r.parentMenuContext();if(S==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return S.listState().selectionManager()},f=()=>r.listState().collection(),h=()=>d().focusedKey()===u(),g=Nb({key:u,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>s.disabled},()=>t),m=S=>{rt(S,s.onClick),!r.isOpen()&&!s.disabled&&r.open(!0)},p=S=>{var x;if(rt(S,s.onPointerMove),S.pointerType!=="mouse")return;const C=r.parentMenuContext();if(C==null||C.onItemEnter(S),!S.defaultPrevented){if(s.disabled){C==null||C.onItemLeave(S);return}!r.isOpen()&&!a&&((x=r.parentMenuContext())==null||x.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),l()},100)),C==null||C.onItemEnter(S),S.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),Et(S.currentTarget),C==null||C.listState().selectionManager().setFocused(!0),C==null||C.listState().selectionManager().setFocusedKey(u()))}},v=S=>{if(rt(S,s.onPointerLeave),S.pointerType!=="mouse")return;l();const C=r.parentMenuContext(),x=r.contentRef();if(x){C==null||C.setPointerGraceIntent({area:nj(r.currentPlacement(),S,x),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(C==null?void 0:C.pointerGraceTimeoutId());const k=window.setTimeout(()=>{C==null||C.setPointerGraceIntent(null)},300);C==null||C.setPointerGraceTimeoutId(k)}else{if(C==null||C.onTriggerLeave(S),S.defaultPrevented)return;C==null||C.setPointerGraceIntent(null)}C==null||C.onItemLeave(S)},b=S=>{rt(S,s.onKeyDown),!S.repeat&&(s.disabled||sj.open(c(),n.orientation()).includes(S.key)&&(S.stopPropagation(),S.preventDefault(),d().setFocused(!1),d().setFocusedKey(void 0),r.isOpen()||r.open("first"),r.focusContent(),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(f().getFirstKey())))};return we(()=>{var C,x,k;if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const S=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:u(),textValue:(x=(C=s.textValue)!=null?C:t==null?void 0:t.textContent)!=null?x:"",disabled:(k=s.disabled)!=null?k:!1});Ce(S)}),we(vr(()=>{var S;return(S=r.parentMenuContext())==null?void 0:S.pointerGraceTimeoutId()},S=>{Ce(()=>{var C;window.clearTimeout(S),(C=r.parentMenuContext())==null||C.setPointerGraceIntent(null)})})),we(()=>Ce(r.registerTriggerId(s.id))),Ce(()=>{l()}),D(ot,Ae({as:"div",ref(S){const C=Lt(x=>{r.setTriggerRef(x),t=x},s.ref);typeof C=="function"&&C(S)},get id(){return s.id},role:"menuitem",get tabIndex(){return g.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return U(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return s.disabled},get"data-key"(){return g.dataKey()},get"data-highlighted"(){return h()?"":void 0},get"data-disabled"(){return s.disabled?"":void 0},get onPointerDown(){return pt([s.onPointerDown,g.onPointerDown])},get onPointerUp(){return pt([s.onPointerUp,g.onPointerUp])},get onClick(){return pt([m,g.onClick])},get onKeyDown(){return pt([b,g.onKeyDown])},get onMouseDown(){return pt([s.onMouseDown,g.onMouseDown])},get onFocus(){return pt([s.onFocus,g.onFocus])},onPointerMove:p,onPointerLeave:v},()=>r.dataset(),o))}function oj(e){const t=Zc(),n=`menu-${Cn()}`,r=qe({id:n,modal:!0},e),[i,s]=Ve(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),o=t1({open:()=>i.open,defaultOpen:()=>i.defaultOpen,onOpenChange:l=>{var c;return(c=i.onOpenChange)==null?void 0:c.call(i,l)}}),a={isModal:()=>{var l;return(l=i.modal)!=null?l:!0},preventScroll:()=>{var l;return(l=i.preventScroll)!=null?l:a.isModal()},forceMount:()=>{var l;return(l=i.forceMount)!=null?l:!1},generateId:Ua(()=>i.id),value:()=>i.value,orientation:()=>{var l,c;return(c=(l=i.orientation)!=null?l:t==null?void 0:t.orientation())!=null?c:"horizontal"}};return D(m1.Provider,{value:a,get children(){return D(j1,Ae({get open(){return o.isOpen()},get onOpenChange(){return o.setIsOpen}},s))}})}var aj={};Qc(aj,{Root:()=>Jc,Separator:()=>lj});function Jc(e){let t;const n=qe({orientation:"horizontal"},e),[r,i]=Ve(n,["ref","orientation"]),s=Wc(()=>t,()=>"hr");return D(ot,Ae({as:"hr",ref(o){const a=Lt(l=>t=l,r.ref);typeof a=="function"&&a(o)},get role(){return s()!=="hr"?"separator":void 0},get"aria-orientation"(){return r.orientation==="vertical"?"vertical":void 0},get"data-orientation"(){return r.orientation}},i))}var lj=Jc,ft={};Qc(ft,{Arrow:()=>lh,CheckboxItem:()=>p1,Content:()=>I1,DropdownMenu:()=>cj,Group:()=>dh,GroupLabel:()=>S1,Icon:()=>C1,Item:()=>_1,ItemDescription:()=>k1,ItemIndicator:()=>O1,ItemLabel:()=>E1,Portal:()=>A1,RadioGroup:()=>T1,RadioItem:()=>M1,Root:()=>R1,Separator:()=>Jc,Sub:()=>$1,SubContent:()=>D1,SubTrigger:()=>L1,Trigger:()=>v1});function I1(e){const t=er(),n=_r(),[r,i]=Ve(e,["onCloseAutoFocus","onInteractOutside"]);let s=!1;return D(JM,Ae({onCloseAutoFocus:l=>{var c;(c=r.onCloseAutoFocus)==null||c.call(r,l),s||Et(n.triggerRef()),s=!1,l.preventDefault()},onInteractOutside:l=>{var c;(c=r.onInteractOutside)==null||c.call(r,l),(!t.isModal()||l.detail.isContextMenu)&&(s=!0)}},i))}function R1(e){const t=`dropdownmenu-${Cn()}`,n=qe({id:t},e);return D(oj,n)}var cj=Object.assign(R1,{Arrow:lh,CheckboxItem:p1,Content:I1,Group:dh,GroupLabel:S1,Icon:C1,Item:_1,ItemDescription:k1,ItemIndicator:O1,ItemLabel:E1,Portal:A1,RadioGroup:T1,RadioItem:M1,Separator:Jc,Sub:$1,SubContent:D1,SubTrigger:L1,Trigger:v1}),K={colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000000",white:"#ffffff",neutral:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},darkGray:{50:"#525c7a",100:"#49536e",200:"#414962",300:"#394056",400:"#313749",500:"#292e3d",600:"#212530",700:"#191c24",800:"#111318",900:"#0b0d10"},gray:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},blue:{25:"#F5FAFF",50:"#EFF8FF",100:"#D1E9FF",200:"#B2DDFF",300:"#84CAFF",400:"#53B1FD",500:"#2E90FA",600:"#1570EF",700:"#175CD3",800:"#1849A9",900:"#194185"},green:{25:"#F6FEF9",50:"#ECFDF3",100:"#D1FADF",200:"#A6F4C5",300:"#6CE9A6",400:"#32D583",500:"#12B76A",600:"#039855",700:"#027A48",800:"#05603A",900:"#054F31"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},yellow:{25:"#FFFCF5",50:"#FFFAEB",100:"#FEF0C7",200:"#FEDF89",300:"#FEC84B",400:"#FDB022",500:"#F79009",600:"#DC6803",700:"#B54708",800:"#93370D",900:"#7A2E0E"},purple:{25:"#FAFAFF",50:"#F4F3FF",100:"#EBE9FE",200:"#D9D6FE",300:"#BDB4FE",400:"#9B8AFB",500:"#7A5AF8",600:"#6938EF",700:"#5925DC",800:"#4A1FB8",900:"#3E1C96"},teal:{25:"#F6FEFC",50:"#F0FDF9",100:"#CCFBEF",200:"#99F6E0",300:"#5FE9D0",400:"#2ED3B7",500:"#15B79E",600:"#0E9384",700:"#107569",800:"#125D56",900:"#134E48"},pink:{25:"#fdf2f8",50:"#fce7f3",100:"#fbcfe8",200:"#f9a8d4",300:"#f472b6",400:"#ec4899",500:"#db2777",600:"#be185d",700:"#9d174d",800:"#831843",900:"#500724"},cyan:{25:"#ecfeff",50:"#cffafe",100:"#a5f3fc",200:"#67e8f9",300:"#22d3ee",400:"#06b6d4",500:"#0891b2",600:"#0e7490",700:"#155e75",800:"#164e63",900:"#083344"}},alpha:{90:"e5",80:"cc"},font:{size:{xs:"calc(var(--tsqd-font-size) * 0.75)",sm:"calc(var(--tsqd-font-size) * 0.875)",md:"var(--tsqd-font-size)"},lineHeight:{xs:"calc(var(--tsqd-font-size) * 1)",sm:"calc(var(--tsqd-font-size) * 1.25)",md:"calc(var(--tsqd-font-size) * 1.5)"},weight:{medium:"500",semibold:"600",bold:"700"}},border:{radius:{xs:"calc(var(--tsqd-font-size) * 0.125)",sm:"calc(var(--tsqd-font-size) * 0.25)",full:"9999px"}},size:{.25:"calc(var(--tsqd-font-size) * 0.0625)",.5:"calc(var(--tsqd-font-size) * 0.125)",1:"calc(var(--tsqd-font-size) * 0.25)",1.5:"calc(var(--tsqd-font-size) * 0.375)",2:"calc(var(--tsqd-font-size) * 0.5)",2.5:"calc(var(--tsqd-font-size) * 0.625)",3:"calc(var(--tsqd-font-size) * 0.75)",3.5:"calc(var(--tsqd-font-size) * 0.875)",4:"calc(var(--tsqd-font-size) * 1)",4.5:"calc(var(--tsqd-font-size) * 1.125)",5:"calc(var(--tsqd-font-size) * 1.25)",6:"calc(var(--tsqd-font-size) * 1.5)",6.5:"calc(var(--tsqd-font-size) * 1.625)",14:"calc(var(--tsqd-font-size) * 3.5)"},shadow:{xs:(e="rgb(0 0 0 / 0.1)")=>"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:(e="rgb(0 0 0 / 0.1)")=>`0 1px 3px 0 ${e}, 0 1px 2px -1px ${e}`,md:(e="rgb(0 0 0 / 0.1)")=>`0 4px 6px -1px ${e}, 0 2px 4px -2px ${e}`,lg:(e="rgb(0 0 0 / 0.1)")=>`0 10px 15px -3px ${e}, 0 4px 6px -4px ${e}`,xl:(e="rgb(0 0 0 / 0.1)")=>`0 20px 25px -5px ${e}, 0 8px 10px -6px ${e}`,"2xl":(e="rgb(0 0 0 / 0.25)")=>`0 25px 50px -12px ${e}`,inner:(e="rgb(0 0 0 / 0.05)")=>`inset 0 2px 4px 0 ${e}`,none:()=>"none"}},uj=ue('<svg width=14 height=14 viewBox="0 0 14 14"fill=none xmlns=http://www.w3.org/2000/svg><path d="M13 13L9.00007 9M10.3333 5.66667C10.3333 8.244 8.244 10.3333 5.66667 10.3333C3.08934 10.3333 1 8.244 1 5.66667C1 3.08934 3.08934 1 5.66667 1C8.244 1 10.3333 3.08934 10.3333 5.66667Z"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),dj=ue('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9 3H15M3 6H21M19 6L18.2987 16.5193C18.1935 18.0975 18.1409 18.8867 17.8 19.485C17.4999 20.0118 17.0472 20.4353 16.5017 20.6997C15.882 21 15.0911 21 13.5093 21H10.4907C8.90891 21 8.11803 21 7.49834 20.6997C6.95276 20.4353 6.50009 20.0118 6.19998 19.485C5.85911 18.8867 5.8065 18.0975 5.70129 16.5193L5 6M10 10.5V15.5M14 10.5V15.5"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),fj=ue('<svg width=10 height=6 viewBox="0 0 10 6"fill=none xmlns=http://www.w3.org/2000/svg><path d="M1 1L5 5L9 1"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),hj=ue('<svg width=12 height=12 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 13.3333V2.66667M8 2.66667L4 6.66667M8 2.66667L12 6.66667"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),fh=ue('<svg width=12 height=12 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 2.66667V13.3333M8 13.3333L4 9.33333M8 13.3333L12 9.33333"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),gj=ue('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M12 2v2m0 16v2M4 12H2m4.314-5.686L4.9 4.9m12.786 1.414L19.1 4.9M6.314 17.69 4.9 19.104m12.786-1.414 1.414 1.414M22 12h-2m-3 0a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),yj=ue('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M22 15.844a10.424 10.424 0 0 1-4.306.925c-5.779 0-10.463-4.684-10.463-10.462 0-1.536.33-2.994.925-4.307A10.464 10.464 0 0 0 2 11.538C2 17.316 6.684 22 12.462 22c4.243 0 7.896-2.526 9.538-6.156Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),mj=ue('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 21h8m-4-4v4m-5.2-4h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 14.72 22 13.88 22 12.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 3 18.88 3 17.2 3H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 5.28 2 6.12 2 7.8v4.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 17 5.12 17 6.8 17Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),pj=ue('<svg stroke=currentColor fill=currentColor stroke-width=0 viewBox="0 0 24 24"height=1em width=1em xmlns=http://www.w3.org/2000/svg><path fill=none d="M0 0h24v24H0z"></path><path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3a4.237 4.237 0 00-6 0zm-4-4l2 2a7.074 7.074 0 0110 0l2-2C15.14 9.14 8.87 9.14 5 13z">'),vj=ue('<svg stroke-width=0 viewBox="0 0 24 24"height=1em width=1em xmlns=http://www.w3.org/2000/svg><path fill=none d="M24 .01c0-.01 0-.01 0 0L0 0v24h24V.01zM0 0h24v24H0V0zm0 0h24v24H0V0z"></path><path d="M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7l2-2zm-4 4a9.793 9.793 0 00-4.49-2.56l3.53 3.53.96-.97zM2 3.05L5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24A9.684 9.684 0 005 13v.01L6.99 15a7.042 7.042 0 014.92-2.06L18.98 20l1.27-1.26L3.29 1.79 2 3.05zM9 17l3 3 3-3a4.237 4.237 0 00-6 0z">'),bj=ue('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9.3951 19.3711L9.97955 20.6856C10.1533 21.0768 10.4368 21.4093 10.7958 21.6426C11.1547 21.8759 11.5737 22.0001 12.0018 22C12.4299 22.0001 12.8488 21.8759 13.2078 21.6426C13.5667 21.4093 13.8503 21.0768 14.024 20.6856L14.6084 19.3711C14.8165 18.9047 15.1664 18.5159 15.6084 18.26C16.0532 18.0034 16.5678 17.8941 17.0784 17.9478L18.5084 18.1C18.9341 18.145 19.3637 18.0656 19.7451 17.8713C20.1265 17.6771 20.4434 17.3763 20.6573 17.0056C20.8715 16.635 20.9735 16.2103 20.9511 15.7829C20.9286 15.3555 20.7825 14.9438 20.5307 14.5978L19.684 13.4344C19.3825 13.0171 19.2214 12.5148 19.224 12C19.2239 11.4866 19.3865 10.9864 19.6884 10.5711L20.5351 9.40778C20.787 9.06175 20.933 8.65007 20.9555 8.22267C20.978 7.79528 20.8759 7.37054 20.6618 7C20.4479 6.62923 20.131 6.32849 19.7496 6.13423C19.3681 5.93997 18.9386 5.86053 18.5129 5.90556L17.0829 6.05778C16.5722 6.11141 16.0577 6.00212 15.6129 5.74556C15.17 5.48825 14.82 5.09736 14.6129 4.62889L14.024 3.31444C13.8503 2.92317 13.5667 2.59072 13.2078 2.3574C12.8488 2.12408 12.4299 1.99993 12.0018 2C11.5737 1.99993 11.1547 2.12408 10.7958 2.3574C10.4368 2.59072 10.1533 2.92317 9.97955 3.31444L9.3951 4.62889C9.18803 5.09736 8.83798 5.48825 8.3951 5.74556C7.95032 6.00212 7.43577 6.11141 6.9251 6.05778L5.49066 5.90556C5.06499 5.86053 4.6354 5.93997 4.25397 6.13423C3.87255 6.32849 3.55567 6.62923 3.34177 7C3.12759 7.37054 3.02555 7.79528 3.04804 8.22267C3.07052 8.65007 3.21656 9.06175 3.46844 9.40778L4.3151 10.5711C4.61704 10.9864 4.77964 11.4866 4.77955 12C4.77964 12.5134 4.61704 13.0137 4.3151 13.4289L3.46844 14.5922C3.21656 14.9382 3.07052 15.3499 3.04804 15.7773C3.02555 16.2047 3.12759 16.6295 3.34177 17C3.55589 17.3706 3.8728 17.6712 4.25417 17.8654C4.63554 18.0596 5.06502 18.1392 5.49066 18.0944L6.92066 17.9422C7.43133 17.8886 7.94587 17.9979 8.39066 18.2544C8.83519 18.511 9.18687 18.902 9.3951 19.3711Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round></path><path d="M12 15C13.6568 15 15 13.6569 15 12C15 10.3431 13.6568 9 12 9C10.3431 9 8.99998 10.3431 8.99998 12C8.99998 13.6569 10.3431 15 12 15Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),xj=ue('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M16 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V8M11.5 12.5L17 7M17 7H12M17 7V12M6.2 21H8.8C9.9201 21 10.4802 21 10.908 20.782C11.2843 20.5903 11.5903 20.2843 11.782 19.908C12 19.4802 12 18.9201 12 17.8V15.2C12 14.0799 12 13.5198 11.782 13.092C11.5903 12.7157 11.2843 12.4097 10.908 12.218C10.4802 12 9.92011 12 8.8 12H6.2C5.0799 12 4.51984 12 4.09202 12.218C3.71569 12.4097 3.40973 12.7157 3.21799 13.092C3 13.5198 3 14.0799 3 15.2V17.8C3 18.9201 3 19.4802 3.21799 19.908C3.40973 20.2843 3.71569 20.5903 4.09202 20.782C4.51984 21 5.07989 21 6.2 21Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),wj=ue('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path class=copier d="M8 8V5.2C8 4.0799 8 3.51984 8.21799 3.09202C8.40973 2.71569 8.71569 2.40973 9.09202 2.21799C9.51984 2 10.0799 2 11.2 2H18.8C19.9201 2 20.4802 2 20.908 2.21799C21.2843 2.40973 21.5903 2.71569 21.782 3.09202C22 3.51984 22 4.0799 22 5.2V12.8C22 13.9201 22 14.4802 21.782 14.908C21.5903 15.2843 21.2843 15.5903 20.908 15.782C20.4802 16 19.9201 16 18.8 16H16M5.2 22H12.8C13.9201 22 14.4802 22 14.908 21.782C15.2843 21.5903 15.5903 21.2843 15.782 20.908C16 20.4802 16 19.9201 16 18.8V11.2C16 10.0799 16 9.51984 15.782 9.09202C15.5903 8.71569 15.2843 8.40973 14.908 8.21799C14.4802 8 13.9201 8 12.8 8H5.2C4.0799 8 3.51984 8 3.09202 8.21799C2.71569 8.40973 2.40973 8.71569 2.21799 9.09202C2 9.51984 2 10.0799 2 11.2V18.8C2 19.9201 2 20.4802 2.21799 20.908C2.40973 21.2843 2.71569 21.5903 3.09202 21.782C3.51984 22 4.07989 22 5.2 22Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round stroke=currentColor>'),Sj=ue('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M2.5 21.4998L8.04927 19.3655C8.40421 19.229 8.58168 19.1607 8.74772 19.0716C8.8952 18.9924 9.0358 18.901 9.16804 18.7984C9.31692 18.6829 9.45137 18.5484 9.72028 18.2795L21 6.99982C22.1046 5.89525 22.1046 4.10438 21 2.99981C19.8955 1.89525 18.1046 1.89524 17 2.99981L5.72028 14.2795C5.45138 14.5484 5.31692 14.6829 5.20139 14.8318C5.09877 14.964 5.0074 15.1046 4.92823 15.2521C4.83911 15.4181 4.77085 15.5956 4.63433 15.9506L2.5 21.4998ZM2.5 21.4998L4.55812 16.1488C4.7054 15.7659 4.77903 15.5744 4.90534 15.4867C5.01572 15.4101 5.1523 15.3811 5.2843 15.4063C5.43533 15.4351 5.58038 15.5802 5.87048 15.8703L8.12957 18.1294C8.41967 18.4195 8.56472 18.5645 8.59356 18.7155C8.61877 18.8475 8.58979 18.9841 8.51314 19.0945C8.42545 19.2208 8.23399 19.2944 7.85107 19.4417L2.5 21.4998Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),N1=ue('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M7.5 12L10.5 15L16.5 9M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Cj=ue('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9 9L15 15M15 9L9 15M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z"stroke=#F04438 stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),_j=ue('<svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 xmlns=http://www.w3.org/2000/svg><rect class=list width=20 height=20 y=2 x=2 rx=2></rect><line class=list-item y1=7 y2=7 x1=6 x2=18></line><line class=list-item y2=12 y1=12 x1=6 x2=18></line><line class=list-item y1=17 y2=17 x1=6 x2=18>'),kj=ue('<svg viewBox="0 0 24 24"height=20 width=20 fill=none xmlns=http://www.w3.org/2000/svg><path d="M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Oj=ue('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M7.5 12L10.5 15L16.5 9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Ej=ue('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M12 2V6M12 18V22M6 12H2M22 12H18M19.0784 19.0784L16.25 16.25M19.0784 4.99994L16.25 7.82837M4.92157 19.0784L7.75 16.25M4.92157 4.99994L7.75 7.82837"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round></path><animateTransform attributeName=transform attributeType=XML type=rotate from=0 to=360 dur=2s repeatCount=indefinite>'),Aj=ue('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M15 9L9 15M9 9L15 15M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Pj=ue('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9.5 15V9M14.5 15V9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Tj=ue('<svg version=1.0 viewBox="0 0 633 633"><linearGradient x1=-666.45 x2=-666.45 y1=163.28 y2=163.99 gradientTransform="matrix(633 0 0 633 422177 -103358)"gradientUnits=userSpaceOnUse><stop stop-color=#6BDAFF offset=0></stop><stop stop-color=#F9FFB5 offset=.32></stop><stop stop-color=#FFA770 offset=.71></stop><stop stop-color=#FF7373 offset=1></stop></linearGradient><circle cx=316.5 cy=316.5 r=316.5></circle><defs><filter x=-137.5 y=412 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=-137.5 y=412 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=89.5 cy=610.5 rx=214.5 ry=186 fill=#015064 stroke=#00CFE2 stroke-width=25></ellipse></g><defs><filter x=316.5 y=412 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=316.5 y=412 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=543.5 cy=610.5 rx=214.5 ry=186 fill=#015064 stroke=#00CFE2 stroke-width=25></ellipse></g><defs><filter x=-137.5 y=450 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=-137.5 y=450 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=89.5 cy=648.5 rx=214.5 ry=186 fill=#015064 stroke=#00A8B8 stroke-width=25></ellipse></g><defs><filter x=316.5 y=450 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=316.5 y=450 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=543.5 cy=648.5 rx=214.5 ry=186 fill=#015064 stroke=#00A8B8 stroke-width=25></ellipse></g><defs><filter x=-137.5 y=486 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=-137.5 y=486 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=89.5 cy=684.5 rx=214.5 ry=186 fill=#015064 stroke=#007782 stroke-width=25></ellipse></g><defs><filter x=316.5 y=486 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=316.5 y=486 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=543.5 cy=684.5 rx=214.5 ry=186 fill=#015064 stroke=#007782 stroke-width=25></ellipse></g><defs><filter x=272.2 y=308 width=176.9 height=129.3 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=272.2 y=308 width=176.9 height=129.3 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><line x1=436 x2=431 y1=403.2 y2=431.8 fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11></line><line x1=291 x2=280 y1=341.5 y2=403.5 fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11></line><line x1=332.9 x2=328.6 y1=384.1 y2=411.2 fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11></line><linearGradient x1=-670.75 x2=-671.59 y1=164.4 y2=164.49 gradientTransform="matrix(-184.16 -32.472 -11.461 64.997 -121359 -32126)"gradientUnits=userSpaceOnUse><stop stop-color=#EE2700 offset=0></stop><stop stop-color=#FF008E offset=1></stop></linearGradient><path d="m344.1 363 97.7 17.2c5.8 2.1 8.2 6.1 7.1 12.1s-4.7 9.2-11 9.9l-106-18.7-57.5-59.2c-3.2-4.8-2.9-9.1 0.8-12.8s8.3-4.4 13.7-2.1l55.2 53.6z"clip-rule=evenodd fill-rule=evenodd></path><line x1=428.2 x2=429.1 y1=384.5 y2=378 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=395.2 x2=396.1 y1=379.5 y2=373 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=362.2 x2=363.1 y1=373.5 y2=367.4 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=324.2 x2=328.4 y1=351.3 y2=347.4 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=303.2 x2=307.4 y1=331.3 y2=327.4 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line></g><defs><filter x=73.2 y=113.8 width=280.6 height=317.4 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=73.2 y=113.8 width=280.6 height=317.4 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><linearGradient x1=-672.16 x2=-672.16 y1=165.03 y2=166.03 gradientTransform="matrix(-100.18 48.861 97.976 200.88 -83342 -93.059)"gradientUnits=userSpaceOnUse><stop stop-color=#A17500 offset=0></stop><stop stop-color=#5D2100 offset=1></stop></linearGradient><path d="m192.3 203c8.1 37.3 14 73.6 17.8 109.1 3.8 35.4 2.8 75.1-3 119.2l61.2-16.7c-15.6-59-25.2-97.9-28.6-116.6s-10.8-51.9-22.1-99.6l-25.3 4.6"clip-rule=evenodd fill-rule=evenodd></path><g stroke=#2F8A00><linearGradient x1=-660.23 x2=-660.23 y1=166.72 y2=167.72 gradientTransform="matrix(92.683 4.8573 -2.0259 38.657 61680 -3088.6)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m195 183.9s-12.6-22.1-36.5-29.9c-15.9-5.2-34.4-1.5-55.5 11.1 15.9 14.3 29.5 22.6 40.7 24.9 16.8 3.6 51.3-6.1 51.3-6.1z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-661.36 x2=-661.36 y1=164.18 y2=165.18 gradientTransform="matrix(110 5.7648 -6.3599 121.35 73933 -15933)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5s-47.5-8.5-83.2 15.7c-23.8 16.2-34.3 49.3-31.6 99.4 30.3-27.8 52.1-48.5 65.2-61.9 19.8-20.2 49.6-53.2 49.6-53.2z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-656.79 x2=-656.79 y1=165.15 y2=166.15 gradientTransform="matrix(62.954 3.2993 -3.5023 66.828 42156 -8754.1)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m195 183.9c-0.8-21.9 6-38 20.6-48.2s29.8-15.4 45.5-15.3c-6.1 21.4-14.5 35.8-25.2 43.4s-24.4 14.2-40.9 20.1z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-663.07 x2=-663.07 y1=165.44 y2=166.44 gradientTransform="matrix(152.47 7.9907 -3.0936 59.029 101884 -4318.7)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5c31.9-30 64.1-39.7 96.7-29s50.8 30.4 54.6 59.1c-35.2-5.5-60.4-9.6-75.8-12.1-15.3-2.6-40.5-8.6-75.5-18z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-662.57 x2=-662.57 y1=164.44 y2=165.44 gradientTransform="matrix(136.46 7.1517 -5.2163 99.533 91536 -11442)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5c35.8-7.6 65.6-0.2 89.2 22s37.7 49 42.3 80.3c-39.8-9.7-68.3-23.8-85.5-42.4s-32.5-38.5-46-59.9z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-656.43 x2=-656.43 y1=163.86 y2=164.86 gradientTransform="matrix(60.866 3.1899 -8.7773 167.48 41560 -25168)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5c-33.6 13.8-53.6 35.7-60.1 65.6s-3.6 63.1 8.7 99.6c27.4-40.3 43.2-69.6 47.4-88s5.6-44.1 4-77.2z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><path d="m196.5 182.3c-14.8 21.6-25.1 41.4-30.8 59.4s-9.5 33-11.1 45.1"fill=none stroke-linecap=round stroke-width=8></path><path d="m194.9 185.7c-24.4 1.7-43.8 9-58.1 21.8s-24.7 25.4-31.3 37.8"fill=none stroke-linecap=round stroke-width=8></path><path d="m204.5 176.4c29.7-6.7 52-8.4 67-5.1s26.9 8.6 35.8 15.9"fill=none stroke-linecap=round stroke-width=8></path><path d="m196.5 181.4c20.3 9.9 38.2 20.5 53.9 31.9s27.4 22.1 35.1 32"fill=none stroke-linecap=round stroke-width=8></path></g></g><defs><filter x=50.5 y=399 width=532 height=633 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=50.5 y=399 width=532 height=633 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><linearGradient x1=-666.06 x2=-666.23 y1=163.36 y2=163.75 gradientTransform="matrix(532 0 0 633 354760 -102959)"gradientUnits=userSpaceOnUse><stop stop-color=#FFF400 offset=0></stop><stop stop-color=#3C8700 offset=1></stop></linearGradient><ellipse cx=316.5 cy=715.5 rx=266 ry=316.5></ellipse></g><defs><filter x=391 y=-24 width=288 height=283 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=391 y=-24 width=288 height=283 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><linearGradient x1=-664.56 x2=-664.56 y1=163.79 y2=164.79 gradientTransform="matrix(227 0 0 227 151421 -37204)"gradientUnits=userSpaceOnUse><stop stop-color=#FFDF00 offset=0></stop><stop stop-color=#FF9D00 offset=1></stop></linearGradient><circle cx=565.5 cy=89.5 r=113.5></circle><linearGradient x1=-644.5 x2=-645.77 y1=342 y2=342 gradientTransform="matrix(30 0 0 1 19770 -253)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=427 x2=397 y1=89 y2=89 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-641.56 x2=-642.83 y1=196.02 y2=196.07 gradientTransform="matrix(26.5 0 0 5.5 17439 -1025.5)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=430.5 x2=404 y1=55.5 y2=50 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-643.73 x2=-645 y1=185.83 y2=185.9 gradientTransform="matrix(29 0 0 8 19107 -1361)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=431 x2=402 y1=122 y2=130 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-638.94 x2=-640.22 y1=177.09 y2=177.39 gradientTransform="matrix(24 0 0 13 15783 -2145)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=442 x2=418 y1=153 y2=166 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-633.42 x2=-634.7 y1=172.41 y2=173.31 gradientTransform="matrix(20 0 0 19 13137 -3096)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=464 x2=444 y1=180 y2=199 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-619.05 x2=-619.52 y1=170.82 y2=171.82 gradientTransform="matrix(13.83 0 0 22.85 9050 -3703.4)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=491.4 x2=477.5 y1=203 y2=225.9 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-578.5 x2=-578.63 y1=170.31 y2=171.31 gradientTransform="matrix(7.5 0 0 24.5 4860 -3953)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=524.5 x2=517 y1=219.5 y2=244 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=666.5 x2=666.5 y1=170.31 y2=171.31 gradientTransform="matrix(.5 0 0 24.5 231.5 -3944)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=564.5 x2=565 y1=228.5 y2=253 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12>');function Mj(){return uj()}function F1(){return dj()}function Go(){return fj()}function mm(){return hj()}function pm(){return fh()}function jj(){return(()=>{var e=fh();return e.style.setProperty("transform","rotate(90deg)"),e})()}function $j(){return(()=>{var e=fh();return e.style.setProperty("transform","rotate(-90deg)"),e})()}function Dj(){return gj()}function Lj(){return yj()}function Ij(){return mj()}function Rj(){return pj()}function Nj(){return vj()}function Fj(){return bj()}function Bj(){return xj()}function qj(){return wj()}function zj(){return Sj()}function Hj(e){return(()=>{var t=N1(),n=t.firstChild;return xe(()=>ee(n,"stroke",e.theme==="dark"?"#12B76A":"#027A48")),t})()}function Uj(){return Cj()}function Gj(){return _j()}function Kj(e){return[D(be,{get when(){return e.checked},get children(){var t=N1(),n=t.firstChild;return xe(()=>ee(n,"stroke",e.theme==="dark"?"#9B8AFB":"#6938EF")),t}}),D(be,{get when(){return!e.checked},get children(){var t=kj(),n=t.firstChild;return xe(()=>ee(n,"stroke",e.theme==="dark"?"#9B8AFB":"#6938EF")),t}})]}function Vj(){return Oj()}function Wj(){return Ej()}function Qj(){return Aj()}function Yj(){return Pj()}function vm(){const e=Cn();return(()=>{var t=Tj(),n=t.firstChild,r=n.nextSibling,i=r.nextSibling,s=i.firstChild,o=i.nextSibling,a=o.firstChild,l=o.nextSibling,c=l.nextSibling,u=c.firstChild,d=c.nextSibling,f=d.firstChild,h=d.nextSibling,g=h.nextSibling,m=g.firstChild,p=g.nextSibling,v=p.firstChild,b=p.nextSibling,S=b.nextSibling,C=S.firstChild,x=S.nextSibling,k=x.firstChild,w=x.nextSibling,_=w.nextSibling,O=_.firstChild,E=_.nextSibling,j=E.firstChild,$=E.nextSibling,B=$.nextSibling,R=B.firstChild,A=B.nextSibling,T=A.firstChild,I=A.nextSibling,G=I.nextSibling,X=G.firstChild,F=G.nextSibling,W=F.firstChild,ie=F.nextSibling,oe=ie.firstChild,N=oe.nextSibling,ce=N.nextSibling,re=ce.nextSibling,me=re.nextSibling,J=ie.nextSibling,Se=J.firstChild,te=J.nextSibling,de=te.firstChild,H=te.nextSibling,he=H.firstChild,je=he.nextSibling,et=je.nextSibling,De=et.firstChild,We=De.nextSibling,Q=We.nextSibling,Me=Q.nextSibling,ct=Me.nextSibling,Ne=ct.nextSibling,Le=Ne.nextSibling,fe=Le.nextSibling,pe=fe.nextSibling,ge=pe.nextSibling,Ie=ge.nextSibling,On=Ie.nextSibling,Oe=H.nextSibling,tt=Oe.firstChild,ze=Oe.nextSibling,En=ze.firstChild,Kt=ze.nextSibling,un=Kt.firstChild,In=un.nextSibling,tr=Kt.nextSibling,Vi=tr.firstChild,kr=tr.nextSibling,Ya=kr.firstChild,so=kr.nextSibling,oo=so.firstChild,ao=oo.nextSibling,Wi=ao.nextSibling,mh=Wi.nextSibling,ph=mh.nextSibling,vh=ph.nextSibling,bh=vh.nextSibling,xh=bh.nextSibling,wh=xh.nextSibling,Sh=wh.nextSibling,Ch=Sh.nextSibling,_h=Ch.nextSibling,kh=_h.nextSibling,Oh=kh.nextSibling,Eh=Oh.nextSibling,Ah=Eh.nextSibling,Ph=Ah.nextSibling,J1=Ph.nextSibling;return ee(n,"id",`a-${e}`),ee(r,"fill",`url(#a-${e})`),ee(s,"id",`am-${e}`),ee(o,"id",`b-${e}`),ee(a,"filter",`url(#am-${e})`),ee(l,"mask",`url(#b-${e})`),ee(u,"id",`ah-${e}`),ee(d,"id",`k-${e}`),ee(f,"filter",`url(#ah-${e})`),ee(h,"mask",`url(#k-${e})`),ee(m,"id",`ae-${e}`),ee(p,"id",`j-${e}`),ee(v,"filter",`url(#ae-${e})`),ee(b,"mask",`url(#j-${e})`),ee(C,"id",`ai-${e}`),ee(x,"id",`i-${e}`),ee(k,"filter",`url(#ai-${e})`),ee(w,"mask",`url(#i-${e})`),ee(O,"id",`aj-${e}`),ee(E,"id",`h-${e}`),ee(j,"filter",`url(#aj-${e})`),ee($,"mask",`url(#h-${e})`),ee(R,"id",`ag-${e}`),ee(A,"id",`g-${e}`),ee(T,"filter",`url(#ag-${e})`),ee(I,"mask",`url(#g-${e})`),ee(X,"id",`af-${e}`),ee(F,"id",`f-${e}`),ee(W,"filter",`url(#af-${e})`),ee(ie,"mask",`url(#f-${e})`),ee(re,"id",`m-${e}`),ee(me,"fill",`url(#m-${e})`),ee(Se,"id",`ak-${e}`),ee(te,"id",`e-${e}`),ee(de,"filter",`url(#ak-${e})`),ee(H,"mask",`url(#e-${e})`),ee(he,"id",`n-${e}`),ee(je,"fill",`url(#n-${e})`),ee(De,"id",`r-${e}`),ee(We,"fill",`url(#r-${e})`),ee(Q,"id",`s-${e}`),ee(Me,"fill",`url(#s-${e})`),ee(ct,"id",`q-${e}`),ee(Ne,"fill",`url(#q-${e})`),ee(Le,"id",`p-${e}`),ee(fe,"fill",`url(#p-${e})`),ee(pe,"id",`o-${e}`),ee(ge,"fill",`url(#o-${e})`),ee(Ie,"id",`l-${e}`),ee(On,"fill",`url(#l-${e})`),ee(tt,"id",`al-${e}`),ee(ze,"id",`d-${e}`),ee(En,"filter",`url(#al-${e})`),ee(Kt,"mask",`url(#d-${e})`),ee(un,"id",`u-${e}`),ee(In,"fill",`url(#u-${e})`),ee(Vi,"id",`ad-${e}`),ee(kr,"id",`c-${e}`),ee(Ya,"filter",`url(#ad-${e})`),ee(so,"mask",`url(#c-${e})`),ee(oo,"id",`t-${e}`),ee(ao,"fill",`url(#t-${e})`),ee(Wi,"id",`v-${e}`),ee(mh,"stroke",`url(#v-${e})`),ee(ph,"id",`aa-${e}`),ee(vh,"stroke",`url(#aa-${e})`),ee(bh,"id",`w-${e}`),ee(xh,"stroke",`url(#w-${e})`),ee(wh,"id",`ac-${e}`),ee(Sh,"stroke",`url(#ac-${e})`),ee(Ch,"id",`ab-${e}`),ee(_h,"stroke",`url(#ab-${e})`),ee(kh,"id",`y-${e}`),ee(Oh,"stroke",`url(#y-${e})`),ee(Eh,"id",`x-${e}`),ee(Ah,"stroke",`url(#x-${e})`),ee(Ph,"id",`z-${e}`),ee(J1,"stroke",`url(#z-${e})`),t})()}var Xj=ue('<span><svg width=16 height=16 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M6 12L10 8L6 4"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Zj=ue('<button title="Copy object to clipboard">'),Jj=ue('<button title="Remove all items"aria-label="Remove all items">'),e$=ue('<button title="Delete item"aria-label="Delete item">'),t$=ue('<button title="Toggle value"aria-label="Toggle value">'),n$=ue('<button title="Bulk Edit Data"aria-label="Bulk Edit Data">'),_o=ue("<div>"),r$=ue("<div><button> <span></span> <span> "),i$=ue("<input>"),bm=ue("<span>"),s$=ue("<div><span>:"),o$=ue("<div><div><button> [<!>...<!>]");function a$(e,t){let n=0;const r=[];for(;n<e.length;)r.push(e.slice(n,n+t)),n=n+t;return r}var xm=e=>{const t=bt(),n=ye().shadowDOMTarget?$e.bind({target:ye().shadowDOMTarget}):$e,r=U(()=>t()==="dark"?io(n):ro(n));return(()=>{var i=Xj();return xe(()=>ne(i,le(r().expander,n`
|
|
67
|
+
`):e}function _E(e,t){const{element:n,datasetIndex:r,index:i}=t,s=e.getDatasetMeta(r).controller,{label:o,value:a}=s.getLabelAndValue(i);return{chart:e,label:o,parsed:s.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:a,dataset:s.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function my(e,t){const n=e.chart.ctx,{body:r,footer:i,title:s}=e,{boxWidth:o,boxHeight:a}=t,l=mt(t.bodyFont),u=mt(t.titleFont),c=mt(t.footerFont),d=s.length,f=i.length,h=r.length,g=Mt(t.padding);let m=g.height,p=0,v=r.reduce((C,x)=>C+x.before.length+x.lines.length+x.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*u.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),v){const C=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=h*C+(v-h)*l.lineHeight+(v-1)*t.bodySpacing}f&&(m+=t.footerMarginTop+f*c.lineHeight+(f-1)*t.footerSpacing);let b=0;const S=function(C){p=Math.max(p,n.measureText(C).width+b)};return n.save(),n.font=u.string,Qe(e.title,S),n.font=l.string,Qe(e.beforeBody.concat(e.afterBody),S),b=t.displayColors?o+2+t.boxPadding:0,Qe(r,C=>{Qe(C.before,S),Qe(C.lines,S),Qe(C.after,S)}),b=0,n.font=c.string,Qe(e.footer,S),n.restore(),p+=g.width,{width:p,height:m}}function kE(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function OE(e,t,n,r){const{x:i,width:s}=r,o=n.caretSize+n.caretPadding;if(e==="left"&&i+s+o>t.width||e==="right"&&i-s-o<0)return!0}function EE(e,t,n,r){const{x:i,width:s}=n,{width:o,chartArea:{left:a,right:l}}=e;let u="center";return r==="center"?u=i<=(a+l)/2?"left":"right":i<=s/2?u="left":i>=o-s/2&&(u="right"),OE(u,e,t,n)&&(u="center"),u}function py(e,t,n){const r=n.yAlign||t.yAlign||kE(e,n);return{xAlign:n.xAlign||t.xAlign||EE(e,t,n,r),yAlign:r}}function AE(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function PE(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function vy(e,t,n,r){const{caretSize:i,caretPadding:s,cornerRadius:o}=e,{xAlign:a,yAlign:l}=n,u=i+s,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:h}=ls(o);let g=AE(t,a);const m=PE(t,l,u);return l==="center"?a==="left"?g+=u:a==="right"&&(g-=u):a==="left"?g-=Math.max(c,f)+i:a==="right"&&(g+=Math.max(d,h)+i),{x:bn(g,0,r.width-t.width),y:bn(m,0,r.height-t.height)}}function bl(e,t,n){const r=Mt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function by(e){return Un([],ar(e))}function TE(e,t,n){return ri(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function xy(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const ub={beforeTitle:rr,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:rr,beforeBody:rr,beforeLabel:rr,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Ye(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:rr,afterBody:rr,beforeFooter:rr,footer:rr,afterFooter:rr};function Rt(e,t,n,r){const i=e[t].call(n,r);return typeof i=="undefined"?ub[t].call(n,r):i}class Ud extends Vi{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,s=new K2(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=TE(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Rt(r,"beforeTitle",this,t),s=Rt(r,"title",this,t),o=Rt(r,"afterTitle",this,t);let a=[];return a=Un(a,ar(i)),a=Un(a,ar(s)),a=Un(a,ar(o)),a}getBeforeBody(t,n){return by(Rt(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Qe(t,s=>{const o={before:[],lines:[],after:[]},a=xy(r,s);Un(o.before,ar(Rt(a,"beforeLabel",this,s))),Un(o.lines,Rt(a,"label",this,s)),Un(o.after,ar(Rt(a,"afterLabel",this,s))),i.push(o)}),i}getAfterBody(t,n){return by(Rt(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Rt(r,"beforeFooter",this,t),s=Rt(r,"footer",this,t),o=Rt(r,"afterFooter",this,t);let a=[];return a=Un(a,ar(i)),a=Un(a,ar(s)),a=Un(a,ar(o)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],s=[],o=[];let a=[],l,u;for(l=0,u=n.length;l<u;++l)a.push(_E(this.chart,n[l]));return t.filter&&(a=a.filter((c,d,f)=>t.filter(c,d,f,r))),t.itemSort&&(a=a.sort((c,d)=>t.itemSort(c,d,r))),Qe(a,c=>{const d=xy(t.callbacks,c);i.push(Rt(d,"labelColor",this,c)),s.push(Rt(d,"labelPointStyle",this,c)),o.push(Rt(d,"labelTextColor",this,c))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let s,o=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const a=Do[r.position].call(this,i,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const l=this._size=my(this,r),u=Object.assign({},a,l),c=py(this.chart,r,u),d=vy(r,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,s={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const s=this.getCaretPosition(t,r,i);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:s}=this,{caretSize:o,cornerRadius:a}=r,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:d}=ls(a),{x:f,y:h}=t,{width:g,height:m}=n;let p,v,b,S,C,x;return s==="center"?(C=h+m/2,i==="left"?(p=f,v=p-o,S=C+o,x=C-o):(p=f+g,v=p+o,S=C-o,x=C+o),b=p):(i==="left"?v=f+Math.max(l,c)+o:i==="right"?v=f+g-Math.max(u,d)-o:v=this.caretX,s==="top"?(S=h,C=S-o,p=v-o,b=v+o):(S=h+m,C=S+o,p=v+o,b=v-o),x=S),{x1:p,x2:v,x3:b,y1:S,y2:C,y3:x}}drawTitle(t,n,r){const i=this.title,s=i.length;let o,a,l;if(s){const u=us(r.rtl,this.x,this.width);for(t.x=bl(this,r.titleAlign,r),n.textAlign=u.textAlign(r.titleAlign),n.textBaseline="middle",o=mt(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<s;++l)n.fillText(i[l],u.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,l+1===s&&(t.y+=r.titleMarginBottom-a)}}_drawColorBox(t,n,r,i,s){const o=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:l,boxWidth:u}=s,c=mt(s.bodyFont),d=bl(this,"left",s),f=i.x(d),h=l<c.lineHeight?(c.lineHeight-l)/2:0,g=n.y+h;if(s.usePointStyle){const m={radius:Math.min(u,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},p=i.leftForLtr(f,u)+u/2,v=g+l/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,Fd(t,m,p,v),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,Fd(t,m,p,v)}else{t.lineWidth=Ie(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const m=i.leftForLtr(f,u),p=i.leftForLtr(i.xPlus(f,1),u-2),v=ls(o.borderRadius);Object.values(v).some(b=>b!==0)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,au(t,{x:m,y:g,w:u,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),au(t,{x:p,y:g+1,w:u-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(m,g,u,l),t.strokeRect(m,g,u,l),t.fillStyle=o.backgroundColor,t.fillRect(p,g+1,u-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:s,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:u,boxPadding:c}=r,d=mt(r.bodyFont);let f=d.lineHeight,h=0;const g=us(r.rtl,this.x,this.width),m=function(_){n.fillText(_,g.x(t.x+h),t.y+f/2),t.y+=f+s},p=g.textAlign(o);let v,b,S,C,x,k,w;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,t.x=bl(this,p,r),n.fillStyle=r.bodyColor,Qe(this.beforeBody,m),h=a&&p!=="right"?o==="center"?u/2+c:u+2+c:0,C=0,k=i.length;C<k;++C){for(v=i[C],b=this.labelTextColors[C],n.fillStyle=b,Qe(v.before,m),S=v.lines,a&&S.length&&(this._drawColorBox(n,t,C,g,r),f=Math.max(d.lineHeight,l)),x=0,w=S.length;x<w;++x)m(S[x]),f=d.lineHeight;Qe(v.after,m)}h=0,f=d.lineHeight,Qe(this.afterBody,m),t.y-=s}drawFooter(t,n,r){const i=this.footer,s=i.length;let o,a;if(s){const l=us(r.rtl,this.x,this.width);for(t.x=bl(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=mt(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,a=0;a<s;++a)n.fillText(i[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:s,yAlign:o}=this,{x:a,y:l}=t,{width:u,height:c}=r,{topLeft:d,topRight:f,bottomLeft:h,bottomRight:g}=ls(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+d,l),o==="top"&&this.drawCaret(t,n,r,i),n.lineTo(a+u-f,l),n.quadraticCurveTo(a+u,l,a+u,l+f),o==="center"&&s==="right"&&this.drawCaret(t,n,r,i),n.lineTo(a+u,l+c-g),n.quadraticCurveTo(a+u,l+c,a+u-g,l+c),o==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(a+h,l+c),n.quadraticCurveTo(a,l+c,a,l+c-h),o==="center"&&s==="left"&&this.drawCaret(t,n,r,i),n.lineTo(a,l+d),n.quadraticCurveTo(a,l,a+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,s=r&&r.y;if(i||s){const o=Do[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=my(this,t),l=Object.assign({},o,this._size),u=py(n,t,l),c=vy(t,l,u,n);(i._to!==c.x||s._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const o=Mt(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(s,t,i,n),B2(t,n.textDirection),s.y+=o.top,this.drawTitle(s,t,n),this.drawBody(s,t,n),this.drawFooter(s,t,n),q2(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:l})=>{const u=this.chart.getDatasetMeta(a);if(!u)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:u.data[l],index:l}}),s=!nu(r,i),o=this._positionChanged(i,n);(s||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],o=this._getActiveElements(t,s,n,r),a=this._positionChanged(o,t),l=n||!nu(o,s)||a;return l&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const s=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,s.mode,s,r);return s.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:r,caretY:i,options:s}=this,o=Do[s.position].call(this,t,n);return o!==!1&&(r!==o.x||i!==o.y)}}pe(Ud,"positioners",Do);var ME={id:"tooltip",_element:Ud,positioners:Do,afterInit(e,t,n){n&&(e.tooltip=new Ud({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:ub},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const jE=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function $E(e,t,n,r){const i=e.indexOf(t);if(i===-1)return jE(e,t,n,r);const s=e.lastIndexOf(t);return i!==s?n:i}const DE=(e,t)=>e===null?null:bn(Math.round(e),0,t);function wy(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Gd extends to{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:s}of n)r[i]===s&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Ye(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:$E(r,t,De(n,t),this._addedLabels),DE(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let s=this.getLabels();s=t===0&&n===s.length-1?s:s.slice(t,n+1),this._valueRange=Math.max(s.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let o=t;o<=n;o++)i.push({value:o});return i}getLabelForValue(t){return wy.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}pe(Gd,"id","category"),pe(Gd,"defaults",{ticks:{callback:wy}});function LE(e,t){const n=[],{bounds:i,step:s,min:o,max:a,precision:l,count:u,maxTicks:c,maxDigits:d,includeBounds:f}=e,h=s||1,g=c-1,{min:m,max:p}=t,v=!Ye(o),b=!Ye(a),S=!Ye(u),C=(p-m)/(d+1);let x=Sg((p-m)/g/h)*h,k,w,_,O;if(x<1e-14&&!v&&!b)return[{value:m},{value:p}];O=Math.ceil(p/x)-Math.floor(m/x),O>g&&(x=Sg(O*x/g/h)*h),Ye(l)||(k=Math.pow(10,l),x=Math.ceil(x*k)/k),i==="ticks"?(w=Math.floor(m/x)*x,_=Math.ceil(p/x)*x):(w=m,_=p),v&&b&&s&&n9((a-o)/s,x/1e3)?(O=Math.round(Math.min((a-o)/x,c)),x=(a-o)/O,w=o,_=a):S?(w=v?o:w,_=b?a:_,O=u-1,x=(_-w)/O):(O=(_-w)/x,Ho(O,Math.round(O),x/1e3)?O=Math.round(O):O=Math.ceil(O));const E=Math.max(Cg(x),Cg(w));k=Math.pow(10,Ye(l)?E:l),w=Math.round(w*k)/k,_=Math.round(_*k)/k;let T=0;for(v&&(f&&w!==o?(n.push({value:o}),w<o&&T++,Ho(Math.round((w+T*x)*k)/k,o,Sy(o,C,e))&&T++):w<o&&T++);T<O;++T){const j=Math.round((w+T*x)*k)/k;if(b&&j>a)break;n.push({value:j})}return b&&f&&_!==a?n.length&&Ho(n[n.length-1].value,a,Sy(a,C,e))?n[n.length-1].value=a:n.push({value:a}):(!b||_===a)&&n.push({value:_}),n}function Sy(e,t,{horizontal:n,minRotation:r}){const i=Hr(r),s=(n?Math.sin(i):Math.cos(i))||.001,o=.75*t*(""+e).length;return Math.min(t/s,o)}class Kd extends to{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return Ye(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:s}=this;const o=l=>i=n?i:l,a=l=>s=r?s:l;if(t){const l=Hs(i),u=Hs(s);l<0&&u<0?a(0):l>0&&u>0&&o(0)}if(i===s){let l=s===0?1:Math.abs(s*.05);a(s+l),t||o(i-l)}this.min=i,this.max=s}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,o=LE(i,s);return t.bounds==="ticks"&&r9(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return j2(t,this.chart.options.locale,this.options.ticks.format)}}class Vd extends Kd{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=bt(t)?t:0,this.max=bt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Hr(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}pe(Vd,"id","linear"),pe(Vd,"defaults",{ticks:{callback:Hf.formatters.numeric}});function Wd(e){const t=e.ticks;if(t.display&&e.display){const n=Mt(t.backdropPadding);return De(t.font&&t.font.size,ct.font.size)+n.height}return 0}function IE(e,t,n){return n=ot(n)?n:[n],{w:k9(e,t.string,n),h:n.length*t.lineHeight}}function Cy(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function RE(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],s=e._pointLabels.length,o=e.options.pointLabels,a=o.centerPointLabels?ht/s:0;for(let l=0;l<s;l++){const u=o.setContext(e.getPointLabelContext(l));i[l]=u.padding;const c=e.getPointPosition(l,e.drawingArea+i[l],a),d=mt(u.font),f=IE(e.ctx,d,e._pointLabels[l]);r[l]=f;const h=rn(e.getIndexAngle(l)+a),g=Math.round(Ff(h)),m=Cy(g,c.x,f.w,0,180),p=Cy(g,c.y,f.h,90,270);NE(n,t,h,m,p)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=qE(e,r,i)}function NE(e,t,n,r,i){const s=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let a=0,l=0;r.start<t.l?(a=(t.l-r.start)/s,e.l=Math.min(e.l,t.l-a)):r.end>t.r&&(a=(r.end-t.r)/s,e.r=Math.max(e.r,t.r+a)),i.start<t.t?(l=(t.t-i.start)/o,e.t=Math.min(e.t,t.t-l)):i.end>t.b&&(l=(i.end-t.b)/o,e.b=Math.max(e.b,t.b+l))}function FE(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:s,padding:o,size:a}=n,l=e.getPointPosition(t,r+i+o,s),u=Math.round(Ff(rn(l.angle+an))),c=UE(l.y,a.h,u),d=zE(u),f=HE(l.x,a.w,d);return{visible:!0,x:l.x,y:c,textAlign:d,left:f,top:c,right:f+a.w,bottom:c+a.h}}function BE(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:s}=e;return!(hr({x:n,y:r},t)||hr({x:n,y:s},t)||hr({x:i,y:r},t)||hr({x:i,y:s},t))}function qE(e,t,n){const r=[],i=e._pointLabels.length,s=e.options,{centerPointLabels:o,display:a}=s.pointLabels,l={extra:Wd(s)/2,additionalAngle:o?ht/i:0};let u;for(let c=0;c<i;c++){l.padding=n[c],l.size=t[c];const d=FE(e,c,l);r.push(d),a==="auto"&&(d.visible=BE(d,u),d.visible&&(u=d))}return r}function zE(e){return e===0||e===180?"center":e<180?"left":"right"}function HE(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function UE(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function GE(e,t,n){const{left:r,top:i,right:s,bottom:o}=n,{backdropColor:a}=t;if(!Ye(a)){const l=ls(t.borderRadius),u=Mt(t.backdropPadding);e.fillStyle=a;const c=r-u.left,d=i-u.top,f=s-r+u.width,h=o-i+u.height;Object.values(l).some(g=>g!==0)?(e.beginPath(),au(e,{x:c,y:d,w:f,h,radius:l}),e.fill()):e.fillRect(c,d,f,h)}}function KE(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const s=e._pointLabelItems[i];if(!s.visible)continue;const o=r.setContext(e.getPointLabelContext(i));GE(n,o,s);const a=mt(o.font),{x:l,y:u,textAlign:c}=s;Ni(n,e._pointLabels[i],l,u+a.lineHeight/2,a,{color:o.color,textAlign:c,textBaseline:"middle"})}}function cb(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,ln);else{let s=e.getPointPosition(0,t);i.moveTo(s.x,s.y);for(let o=1;o<r;o++)s=e.getPointPosition(o,t),i.lineTo(s.x,s.y)}}function VE(e,t,n,r,i){const s=e.ctx,o=t.circular,{color:a,lineWidth:l}=t;!o&&!r||!a||!l||n<0||(s.save(),s.strokeStyle=a,s.lineWidth=l,s.setLineDash(i.dash||[]),s.lineDashOffset=i.dashOffset,s.beginPath(),cb(e,n,o,r),s.closePath(),s.stroke(),s.restore())}function WE(e,t,n){return ri(e,{label:n,index:t,type:"pointLabel"})}class Lo extends Kd{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Mt(Wd(this.options)/2),n=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=bt(t)&&!isNaN(t)?t:0,this.max=bt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Wd(this.options))}generateTickLabels(t){Kd.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,r)=>{const i=et(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?RE(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=ln/(this._pointLabels.length||1),r=this.options.startAngle||0;return rn(t*n+Hr(r))}getDistanceFromCenterForValue(t){if(Ye(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(Ye(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const r=n[t];return WE(this.getContext(),t,r)}}getPointPosition(t,n,r=0){const i=this.getIndexAngle(t)-an+r;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:r,right:i,bottom:s}=this._pointLabelItems[t];return{left:n,top:r,right:i,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),cb(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:r,grid:i,border:s}=n,o=this._pointLabels.length;let a,l,u;if(n.pointLabels.display&&KE(this,o),i.display&&this.ticks.forEach((c,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(c.value);const f=this.getContext(d),h=i.setContext(f),g=s.setContext(f);VE(this,h,l,o,g)}}),r.display){for(t.save(),a=o-1;a>=0;a--){const c=r.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:f}=c;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,l=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),u=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(u.x,u.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let s,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const u=r.setContext(this.getContext(l)),c=mt(u.font);if(s=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){t.font=c.string,o=t.measureText(a.label).width,t.fillStyle=u.backdropColor;const d=Mt(u.backdropPadding);t.fillRect(-o/2-d.left,-s-c.size/2-d.top,o+d.width,c.size+d.height)}Ni(t,a.label,0,-s,c,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),t.restore()}drawTitle(){}}pe(Lo,"id","radialLinear"),pe(Lo,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Hf.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),pe(Lo,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),pe(Lo,"descriptors",{angleLines:{_fallback:"grid"}});const Wu={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},qt=Object.keys(Wu);function _y(e,t){return e-t}function ky(e,t){if(Ye(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:s}=e._parseOpts;let o=t;return typeof r=="function"&&(o=r(o)),bt(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(da(s)||s===!0)?n.startOf(o,"isoWeek",s):n.startOf(o,i)),+o)}function Oy(e,t,n,r){const i=qt.length;for(let s=qt.indexOf(e);s<i-1;++s){const o=Wu[qt[s]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(a*o.size))<=r)return qt[s]}return qt[i-1]}function QE(e,t,n,r,i){for(let s=qt.length-1;s>=qt.indexOf(n);s--){const o=qt[s];if(Wu[o].common&&e._adapter.diff(i,r,o)>=t-1)return o}return qt[n?qt.indexOf(n):0]}function YE(e){for(let t=qt.indexOf(e)+1,n=qt.length;t<n;++t)if(Wu[qt[t]].common)return qt[t]}function Ey(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=Bf(n,t),s=n[r]>=t?n[r]:n[i];e[s]=!0}}function XE(e,t,n,r){const i=e._adapter,s=+i.startOf(t[0].value,r),o=t[t.length-1].value;let a,l;for(a=s;a<=o;a=+i.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function Ay(e,t,n){const r=[],i={},s=t.length;let o,a;for(o=0;o<s;++o)a=t[o],i[a]=o,r.push({value:a,major:!1});return s===0||!n?r:XE(e,r,i,n)}class cu extends to{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),i=this._adapter=new jk._date(t.adapters.date);i.init(n),zo(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:ky(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:s,minDefined:o,maxDefined:a}=this.getUserBounds();function l(u){!o&&!isNaN(u.min)&&(i=Math.min(i,u.min)),!a&&!isNaN(u.max)&&(s=Math.max(s,u.max))}(!o||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=bt(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),s=bt(s)&&!isNaN(s)?s:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,o=this.max,a=l9(i,s,o);return this._unit=n.unit||(r.autoSkip?Oy(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):QE(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:YE(this._unit),this.initOffsets(i),t.reverse&&a.reverse(),Ay(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,s;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,s=this.getDecimalForValue(t[t.length-1]),t.length===1?r=s:r=(s-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=bn(n,0,o),r=bn(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,s=i.time,o=s.unit||Oy(s.minUnit,n,r,this._getLabelCapacity(n)),a=De(i.ticks.stepSize,1),l=o==="week"?s.isoWeekday:!1,u=da(l)||l===!0,c={};let d=n,f,h;if(u&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,u?"day":o),t.diff(r,n,o)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+o);const g=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f<r;f=+t.add(f,a,o),h++)Ey(c,f,g);return(f===r||i.bounds==="ticks"||h===1)&&Ey(c,f,g),Object.keys(c).sort(_y).map(m=>+m)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,s=this._unit,o=n||i[s];return this._adapter.format(t,o)}_tickFormatFunction(t,n,r,i){const s=this.options,o=s.ticks.callback;if(o)return et(o,[t,n,r],this);const a=s.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&a[l],d=u&&a[u],f=r[n],h=u&&d&&f&&f.major;return this._adapter.format(t,i||(h?d:c))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=Hr(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(i),o=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:r*s+a*o,h:r*o+a*s}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,s=this._tickFormatFunction(t,0,Ay(this,[t],this._majorUnit),i),o=this._getLabelSize(s),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(ky(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return c9(t.sort(_y))}}pe(cu,"id","time"),pe(cu,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function xl(e,t,n){let r=0,i=e.length-1,s,o,a,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=vi(e,"pos",t)),{pos:s,time:a}=e[r],{pos:o,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=vi(e,"time",t)),{time:s,pos:a}=e[r],{time:o,pos:l}=e[i]);const u=o-s;return u?a+(l-a)*(t-s)/u:a}class Py extends cu{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=xl(n,this.min),this._tableRange=xl(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],s=[];let o,a,l,u,c;for(o=0,a=t.length;o<a;++o)u=t[o],u>=n&&u<=r&&i.push(u);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,a=i.length;o<a;++o)c=i[o+1],l=i[o-1],u=i[o],Math.round((c+l)/2)!==u&&s.push({time:u,pos:o/(a-1)});return s}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,s)=>i-s)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(xl(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return xl(this._table,r*this._tableRange+this._minPos,!0)}}pe(Py,"id","timeseries"),pe(Py,"defaults",cu.defaults);const db="label";function Ty(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function ZE(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function fb(e,t){e.labels=t}function hb(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:db;const r=[];e.datasets=t.map(i=>{const s=e.datasets.find(o=>o[n]===i[n]);return!s||!i.data||r.includes(s)?{...i}:(r.push(s),Object.assign(s,i),s)})}function JE(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:db;const n={labels:[],datasets:[]};return fb(n,e.labels),hb(n,e.datasets,t),n}function eA(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:s,type:o,data:a,options:l,plugins:u=[],fallbackContent:c,updateMode:d,...f}=e,h=z.useRef(null),g=z.useRef(null),m=()=>{h.current&&(g.current=new Ku(h.current,{type:o,data:JE(a,s),options:l&&{...l},plugins:u}),Ty(t,g.current))},p=()=>{Ty(t,null),g.current&&(g.current.destroy(),g.current=null)};return z.useEffect(()=>{!i&&g.current&&l&&ZE(g.current,l)},[i,l]),z.useEffect(()=>{!i&&g.current&&fb(g.current.config.data,a.labels)},[i,a.labels]),z.useEffect(()=>{!i&&g.current&&a.datasets&&hb(g.current.config.data,a.datasets,s)},[i,a.datasets]),z.useEffect(()=>{g.current&&(i?(p(),setTimeout(m)):g.current.update(d))},[i,l,a.labels,a.datasets,d]),z.useEffect(()=>{g.current&&(p(),setTimeout(m))},[o]),z.useEffect(()=>(m(),()=>p()),[]),z.createElement("canvas",{ref:h,role:"img",height:n,width:r,...f},c)}const tA=z.forwardRef(eA);function gb(e,t){return Ku.register(t),z.forwardRef((n,r)=>z.createElement(tA,{...n,ref:r,type:e}))}const nA=gb("line",Dl),rA=gb("radar",Ll);Ku.register(Gd,Vd,Lo,Ur,Nl,yE,CE,ME,wE);var Qd={elements:{line:{backgroundColor:"rgba(166, 30, 105, 0.2)",borderColor:"rgba(166, 30, 105, 1)",borderWidth:4},point:{backgroundColor:"rgba(166, 30, 105, 1)",borderColor:"rgba(255,255,255, .9)",borderWidth:2,radius:5,hoverRadius:6,hoverBorderWidth:3}},responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{mode:"index",intersect:!1}},interaction:{mode:"nearest",axis:"x",intersect:!1}},iA=function(t){var n=t.chart.ctx,r=t.chart.chartArea;if(!r)return"rgba(166, 30, 105, 0.1)";var i=(r.left+r.right)/2,s=(r.top+r.bottom)/2,o=Math.min((r.right-r.left)/2,(r.bottom-r.top)/2),a=n.createRadialGradient(i,s,0,i,s,o);return a.addColorStop(0,"rgba(255, 255, 255, 0.4)"),a.addColorStop(.3,"rgba(255, 255, 255, 0.4)"),a.addColorStop(1,"rgba(166, 30, 105, 0.2)"),a};function My(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?My(Object(n),!0).forEach(function(r){sA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):My(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sA(e,t,n){return(t=oA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oA(e){var t=aA(e,"string");return Ks(t)=="symbol"?t:t+""}function aA(e,t){if(Ks(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ks(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ks(e){"@babel/helpers - typeof";return Ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ks(e)}function lA(e){var t=new Date(e);return isNaN(t.getTime())?String(e):t.toLocaleString("en-US",{month:"short",day:"numeric"})}var uA=function(){var t,n,r,i,s=Ki(),o=s.data,a=s.isLoading,l=s.isRefetching,u=o==null?void 0:o.mentions,c=u==null||(t=u.mentionedInNumberOfQueries)===null||t===void 0||(t=t.previous)===null||t===void 0?void 0:t.difference,d=u==null?void 0:u.chart,f=Array.isArray(d==null?void 0:d.labels)?d.labels:d!=null&&d.labels&&Ks(d.labels)==="object"?Object.values(d.labels):[],h=f.map(function(v){return lA(String(v))}),g=o==null?void 0:o.numberOfQueries;if(!g){var m=0;Array.isArray(d==null?void 0:d.datasets)&&d.datasets.forEach(function(v){Array.isArray(v==null?void 0:v.data)&&v.data.forEach(function(b){typeof b=="number"&&b>m&&(m=b)})}),g=m+2}var p=jy(jy({},Qd),{},{responsive:!0,maintainAspectRatio:!1,scales:{x:{display:!0,title:{display:!1,text:"Date"},grid:{display:!1}},y:{display:!0,title:{display:!1,text:"Number of Mentions"},beginAtZero:!0,max:g,ticks:{stepSize:1}}}});return y.jsx(P.Card,{className:"yst-overflow-visible",children:y.jsxs(P.Card.Content,{className:"yst-space-y-4",children:[y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(qa,{title:"Mentions progress",tooltip:"Tracks how your brand mentions have changed over time across the same query set."}),y.jsx(Ba,{score:u==null||(n=u.mentionedInNumberOfQueries)===null||n===void 0?void 0:n.value,total:o==null?void 0:o.numberOfQueries,delta:c,deltaSuffix:"since last scan",suffix:"queries",isLoading:a||l})]}),Array.isArray(d==null||(r=d.datasets)===null||r===void 0?void 0:r.data)&&(d==null||(i=d.datasets)===null||i===void 0?void 0:i.data.length)<2?y.jsx(P.Alert,{variant:"info",children:"One more analysis needed to show more insights."}):y.jsx("div",{className:"yst-h-72",children:y.jsx(nA,{data:function(){var v={labels:h,datasets:[d==null?void 0:d.datasets]};return v}(),options:p})})]})})};function wl(e){var t=e.value,n=t===void 0?"—":t,r=e.label,i=e.tooltip,s=e.className,o=e.borderBottom,a=o===void 0?!1:o,l=e.borderRight,u=l===void 0?!1:l,c=e.delta,d=e.tooltipPosition,f=d===void 0?"left":d;return y.jsxs("div",{className:Oe("yst-relative yst-flex yst-flex-col yst-items-center yst-gap-1 yst-p-4 yst-text-center",a&&"yst-border-b yst-border-slate-200",u&&"yst-border-r yst-border-slate-200",s),children:[y.jsx("p",{className:"yst-text-2xl yst-font-bold yst-text-slate-900",children:n}),y.jsx("p",{className:"yst-text-tiny yst-text-slate-600",children:r}),typeof c=="number"&&y.jsxs("p",{className:Oe("yst-flex yst-items-center yst-gap-1 yst-text-tiny yst-font-bold",ra(c)),children:[c>0?y.jsx(c2,{}):c<0?y.jsx(u2,{}):null,c>-1e-6&&"+",c]}),i&&y.jsx($f,{id:"tooltip-".concat(r.replace(/\s+/g,"-").toLowerCase()),className:"yst-absolute yst-right-2 yst-top-2",position:f,children:i})]})}function cA(e){var t=e.children,n=e.className;return y.jsx("div",{className:Oe("yst-grid yst-w-full yst-grid-cols-2 yst-gap-0 yst-rounded-lg",n),children:t})}function dA(e){return e>0?"yst-text-green-600":e<0?"yst-text-red-600":"yst-text-slate-500"}function fA(e){var t=e.current,n=e.previous,r=e.className;if(typeof n!="number")return null;var i=t-n,s=i>0,o=i<0,a="".concat(i>0?"+":"").concat(i.toFixed(1),"%");return y.jsxs("div",{className:Oe("yst-flex yst-items-center yst-gap-1 yst-text-tiny yst-font-bold",dA(i),r),"aria-label":s?"Visibility increased by ".concat(a):o?"Visibility decreased by ".concat(a):"No change in visibility",children:[s&&y.jsx(c2,{className:"yst-w-4 yst-h-4"}),o&&y.jsx(u2,{className:"yst-w-4 yst-h-4"}),a]})}function ha(e){"@babel/helpers - typeof";return ha=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ha(e)}function hA(e,t){return pA(e)||mA(e,t)||yA(e,t)||gA()}function gA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
68
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yA(e,t){if(e){if(typeof e=="string")return $y(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$y(e,t):void 0}}function $y(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mA(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function pA(e){if(Array.isArray(e))return e}function Dy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Dy(Object(n),!0).forEach(function(r){vA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vA(e,t,n){return(t=bA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bA(e){var t=xA(e,"string");return ha(t)=="symbol"?t:t+""}function xA(e,t){if(ha(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ha(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wA(){var e,t,n,r,i,s,o,a,l,u,c,d,f,h,g,m,p,v,b,S,C,x,k,w,_=Rn(),O=_.brandId,E=_.analysisId,T=Du(O,E,{query:{select:function(Fe){var Y=Fe.data;return Y},enabled:!!O&&!!E}}),j=T.data,B=T.isLoading,R=j==null||(e=j.analysis)===null||e===void 0?void 0:e.scans,A=Array.isArray(R)&&R.length>0?R.reduce(function(Ne,Fe){if(!Ne)return Fe;if(!(Fe!=null&&Fe.finishedAt)||!(Ne!=null&&Ne.finishedAt))return Ne;var Y=new Date(Fe.finishedAt),Pe=new Date(Ne.finishedAt);return Y>Pe?Fe:Ne},R[0]):void 0,M=A==null||(t=A.scores)===null||t===void 0?void 0:t.standardized,D=(n=A==null||(r=A.mentions)===null||r===void 0||(r=r.mentionedInNumberOfQueries)===null||r===void 0?void 0:r.value)!==null&&n!==void 0?n:0,H=A==null||(i=A.mentions)===null||i===void 0||(i=i.mentionedInNumberOfQueries)===null||i===void 0||(i=i.previous)===null||i===void 0?void 0:i.difference,Q=(s=A==null||(o=A.scores)===null||o===void 0||(o=o.standardized)===null||o===void 0||(o=o.citations)===null||o===void 0?void 0:o.value)!==null&&s!==void 0?s:0,F=(a=A==null||(l=A.citations)===null||l===void 0||(l=l.total)===null||l===void 0?void 0:l.value)!==null&&a!==void 0?a:0,G=A==null||(u=A.citations)===null||u===void 0||(u=u.total)===null||u===void 0||(u=u.previous)===null||u===void 0?void 0:u.difference,ie=A==null||(c=A.rankings)===null||c===void 0||(c=c.list)===null||c===void 0?void 0:c.find(function(Ne){var Fe;return((Fe=Ne.brand)===null||Fe===void 0?void 0:Fe.isSelf)===!0}),ae=(d=ie==null||(f=ie.rank)===null||f===void 0?void 0:f.value)!==null&&d!==void 0?d:"—",N=ie==null||(h=ie.rank)===null||h===void 0||(h=h.previous)===null||h===void 0?void 0:h.difference;N&&(N=N*-1);var le=(g=M==null||(m=M.visibility)===null||m===void 0?void 0:m.value)!==null&&g!==void 0?g:0,te=M==null||(p=M.visibility)===null||p===void 0||(p=p.previous)===null||p===void 0?void 0:p.value,me=(v=M==null||(b=M.ranking)===null||b===void 0?void 0:b.value)!==null&&v!==void 0?v:0,J=(S=M==null||(C=M.sentiment)===null||C===void 0?void 0:C.value)!==null&&S!==void 0?S:0,Ce=(x=M==null||(k=M.mentions)===null||k===void 0?void 0:k.value)!==null&&x!==void 0?x:0,ge={labels:["Mentions","Ranking","Citations","Sentiment"],datasets:[{data:[Ce,me,Q,J],backgroundColor:iA,pointBackgroundColor:"rgba(166, 30, 105, 1)"}]},ze=Sl(Sl({},Qd),{},{plugins:Sl(Sl({},Qd.plugins),{},{tooltip:{mode:"point",intersect:!0,callbacks:{label:function(Fe){var Y=Fe.label||"",Pe=Fe.parsed.r||0;return"".concat(Y,": ").concat(Pe,"%")}}}}),interaction:{mode:"point",intersect:!0},scales:{r:{beginAtZero:!0,min:0,max:100,ticks:{stepSize:20}}}}),oe=z.useState(typeof window!="undefined"&&window.innerWidth<800?"top":"left"),He=hA(oe,2),lt=He[0],dt=He[1];return z.useEffect(function(){function Ne(){dt(window.innerWidth<800?"top":"left")}return window.addEventListener("resize",Ne),function(){return window.removeEventListener("resize",Ne)}},[]),y.jsx(P.Card,{className:"yst-overflow-visible md:yst-col-span-2",children:y.jsxs(P.Card.Content,{children:[y.jsx(P.Title,{size:"3",className:"yst-mb-2",children:"AI visibility index (AIVI)"}),y.jsx(Ba,{score:le,total:100,isLoading:B}),y.jsx(fA,{current:le,previous:te,className:"yst-mb-4"}),y.jsxs("div",{className:"yst-flex yst-flex-col yst-items-center yst-justify-around yst-justify-items-center yst-gap-8 md:yst-flex-row",children:[y.jsxs("div",{className:"yst-radar-chart-container yst-relative yst-aspect-square yst-h-full yst-w-full md:yst-flex md:yst-w-1/2 md:yst-items-center md:yst-justify-center",children:[y.jsx(rA,{data:ge,options:ze}),y.jsx($f,{id:"tooltip-radar-chart",className:"yst-absolute yst-right-2 yst-top-2",position:"left",children:"The AI Visibility Index (AIVI) shows how visible your brand is across major AI platforms like ChatGPT, based on mentions, citations, sentiment, and rankings."})]}),y.jsx("div",{className:"yst-mt-6 yst-w-full md:yst-mt-0 md:yst-flex md:yst-w-1/2 md:yst-items-center",children:y.jsxs(cA,{children:[y.jsx(wl,{value:D,label:"Mentions",tooltip:"Mentions show how often your brand appears in AI-generated answers to the questions we send to LLMs.",borderBottom:!0,borderRight:!0,delta:H,tooltipPosition:lt}),y.jsx(wl,{value:ae&&y.jsxs(y.Fragment,{children:[ae,ae===1&&" 🏆"]}),label:"Competitor ranking",tooltip:"Ranking shows the position your brand is mentioned in AI-generated answers—whether in a numbered list or the order of appearance in full-text responses.",borderBottom:!0,delta:N}),y.jsx(wl,{value:F,label:"Citations",tooltip:"Citations are the source links found in AI-generated answers. They form the basis for mentions, sentiment, and ranking insights.",borderRight:!0,delta:G,tooltipPosition:lt}),y.jsx(wl,{value:J?"".concat(J,"%"):"—",label:"Positive sentiment",tooltip:"Sentiment reflects how positively, neutrally, or negatively your brand is mentioned in AI-generated answers, based on the cited sources.",delta:A==null||(w=A.scores)===null||w===void 0||(w=w.standardized)===null||w===void 0||(w=w.sentiment)===null||w===void 0||(w=w.previous)===null||w===void 0?void 0:w.difference})]})})]})]})})}var qc=function(){var t=Rn(),n=t.brandId,r=t.analysisId,i=Gi({query:{select:function(m){var p=m.data;return p==null?void 0:p.brands}}}),s=i.data,o=i.isLoading,a=Du(n,r,{query:{enabled:!!n&&k6(r),select:function(m){var p=m.data;return p==null?void 0:p.analysis}}}),l=a.data,u=a.isLoading,c=l==null?void 0:l.status,d=o||u,f=s&&(s==null?void 0:s.length)>0,h=!d&&l&&c===ci.completed;return o?y.jsx(Ru,{}):f?y.jsxs("div",{className:"yst-space-y-4",children:[y.jsx(w7,{}),h&&y.jsxs("div",{className:"yst-space-y-4",children:[y.jsxs("div",{className:"yst-flex yst-items-center yst-justify-between",children:[y.jsx(P.Title,{size:"2",children:"Your brand analysis"}),y.jsxs(P.Button,{as:ti,variant:"secondary",to:"/brands/".concat(n,"/brand-list"),className:Oe("yst-gap-1.5"),disabled:!n,children:[y.jsx(o2,{})," Edit brand list"]})]}),y.jsxs("div",{className:"yst-grid yst-grid-cols-1 yst-gap-4 md:yst-grid-cols-2",children:[y.jsx(wA,{}),y.jsx(S7,{}),y.jsx(uA,{}),y.jsx(M_,{}),y.jsx(k_,{}),y.jsx(c_,{}),y.jsx(j_,{})]})]})]}):y.jsx(W6,{})};function yb(e){var t=e.children,n=e.description,r=e.title;return y.jsxs(P.Card.Header,{className:"yst-h-auto yst-flex-col yst-items-start yst-gap-0 yst-border-b-[1px] yst-border-b-slate-200 yst-bg-white yst-py-8",children:[r&&y.jsx(P.Title,{className:Oe({"yst-mb-3":n||t}),children:r}),n&&y.jsx("p",{children:n}),t]})}var SA=function(){return y.jsx(P.Card,{className:"yst-mb-4",children:y.jsxs(P.Card.Content,{className:"yst-flex yst-flex-col yst-gap-8",children:[y.jsx(P.Title,{size:"2",children:"Query - Best fish restaurant in Nijmegen"}),y.jsxs("div",{children:[y.jsx("p",{children:"AI Response:"}),y.jsx(P.Link,{href:"#todo",children:"Show more"})]}),y.jsxs("div",{children:[y.jsx("p",{children:"Extracted brands:"}),y.jsx(P.Badge,{children:"Example"}),y.jsx(P.Badge,{children:"Example"}),y.jsx(P.Badge,{children:"Example"}),y.jsx(P.Badge,{children:"Example"}),y.jsx(P.Badge,{children:"Example"})]}),y.jsxs(P.Table,{children:[y.jsx(P.Table.Head,{children:y.jsxs(P.Table.Row,{children:[y.jsx(P.Table.Header,{children:"URL"}),y.jsx(P.Table.Header,{children:"Associated brand"})]})}),y.jsxs(P.Table.Body,{children:[y.jsxs(P.Table.Row,{children:[y.jsx(P.Table.Cell,{children:y.jsx(P.Link,{href:"https://example.com",target:"_blank",children:"https://example.com"})}),y.jsx(P.Table.Cell,{children:"Example Brand"})]}),y.jsxs(P.Table.Row,{children:[y.jsx(P.Table.Cell,{children:y.jsx(P.Link,{href:"https://example2.com",target:"_blank",children:"https://example2.com"})}),y.jsx(P.Table.Cell,{children:"Example Brand 2"})]})]})]})]})})},CA=function(){return y.jsxs(P.Card,{children:[y.jsx(yb,{title:"Query history"}),y.jsx(P.Card,{className:"yst-mb-4",children:y.jsxs(P.Card.Content,{children:[y.jsxs("p",{className:"yst-mb-8",children:["Manna Fish Restaurant - Analysis performed on:"," ",y.jsx(P.Badge,{children:"2025-04-08 12:31:21"})]}),[0,1,2,3,4].map(function(t){return y.jsx(SA,{},t)})]})})]})},_A=z.lazy(function(){return Promise.resolve().then(()=>DD)}),kA=z.lazy(function(){return Promise.resolve().then(()=>lL)}),OA=z.lazy(function(){return Promise.resolve().then(()=>dL)}),EA=z.lazy(function(){return Promise.resolve().then(()=>kL)}),AA=z.lazy(function(){return Promise.resolve().then(()=>zL)}),PA=z.lazy(function(){return Promise.resolve().then(()=>WL)}),TA=new Qw({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1,staleTime:1e3*60*5},mutations:{retry:!1}}}),li=function(){return y.jsx("div",{className:"yst-flex yst-min-h-[200px] yst-items-center yst-justify-center",children:y.jsxs("div",{className:"yst-w-full yst-max-w-md yst-space-y-3",children:[y.jsx(P.SkeletonLoader,{className:"yst-h-8 yst-w-3/4"}),y.jsx(P.SkeletonLoader,{className:"yst-h-6 yst-w-full"}),y.jsx(P.SkeletonLoader,{className:"yst-h-6 yst-w-2/3"})]})})},MA=function(t){var n=t.hideNav,r=n===void 0?!1:n,i=t.disableLayout,s=i===void 0?!1:i,o=t.DebugInfo;return y.jsx(tw,{children:y.jsxs(_t,{element:y.jsx(w6,{hideNav:r,disableLayout:s,DebugInfo:o}),children:[y.jsxs(_t,{path:"/",element:y.jsx(Bs,{}),children:[y.jsx(_t,{index:!0,element:y.jsx(qc,{})}),y.jsxs(_t,{path:"brands/:brandId",element:y.jsx(T0,{}),children:[y.jsx(_t,{index:!0,element:y.jsx(qc,{})}),y.jsx(_t,{path:"brand-list",element:y.jsx(z.Suspense,{fallback:y.jsx(li,{}),children:y.jsx(_A,{})})}),y.jsx(_t,{path:"analysis/:analysisId",element:y.jsx(S6,{}),children:y.jsx(_t,{index:!0,element:y.jsx(qc,{})})})]}),y.jsxs(_t,{path:"/setup",element:y.jsx(z.Suspense,{fallback:y.jsx(li,{}),children:y.jsx(OA,{})}),children:[y.jsx(_t,{index:!0,element:y.jsx(z.Suspense,{fallback:y.jsx(li,{}),children:y.jsx(EA,{})})}),y.jsxs(_t,{path:":brandId",element:y.jsx(T0,{}),children:[y.jsx(_t,{path:"queries",element:y.jsx(z.Suspense,{fallback:y.jsx(li,{}),children:y.jsx(AA,{})})}),y.jsx(_t,{path:"analysis",element:y.jsx(z.Suspense,{fallback:y.jsx(li,{}),children:y.jsx(PA,{})})})]})]})]}),y.jsx(_t,{path:"/settings",element:y.jsx(z.Suspense,{fallback:y.jsx(li,{}),children:y.jsx(kA,{})})}),y.jsx(_t,{path:"/query-history",element:y.jsx(z.Suspense,{fallback:y.jsx(li,{}),children:y.jsx(CA,{})})})]})})},jA=function(t){var n=t.DebugInfo,r=t.hostAppProps;return y.jsxs(e3,{client:TA,children:[y.jsx(O4,{hostAppProps:r,children:y.jsx(MA,{DebugInfo:n})}),y.jsx(qS,{initialIsOpen:!1})]})};function $A(e){var t=e.subpath,n=t===void 0?"/":t,r=e.onNavigate,i=dn(),s=Ut(),o=z.useRef(n),a=z.useRef(null),l=z.useRef(!1),u="".concat(s.pathname).concat(s.search).concat(s.hash),c=z.useCallback(r,[r]);return z.useEffect(function(){if(n===u){o.current=n;return}l.current||n!==o.current&&(o.current=n,a.current=n,l.current=!0,i(n,{replace:!0}),setTimeout(function(){l.current=!1},10))},[n,u,i]),z.useEffect(function(){l.current||u!==n&&u!==a.current&&(a.current=u,c(u))},[u,n,c]),null}function DA(e,t){return NA(e)||RA(e,t)||IA(e,t)||LA()}function LA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
69
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IA(e,t){if(e){if(typeof e=="string")return Ly(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ly(e,t):void 0}}function Ly(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function RA(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function NA(e){if(Array.isArray(e))return e}var FA=function(t){var n=t.isRtl,r=n===void 0?!1:n,i=t.className,s=t.style,o=t.token,a=o===void 0?"":o,l=t.apiUrl,u=t.DebugInfo,c=t.basename,d=c===void 0?"/":c,f=t.subpath,h=f===void 0?"/":f,g=t.onNavigate,m=g===void 0?function(){}:g,p=t.onLogout,v=p===void 0?function(){}:p,b=t.onAddSubscription,S=b===void 0?function(){}:b,C=function(T,j){var B=T.endsWith("/")?T.slice(0,-1):T,R=j.startsWith("/")?j:"/".concat(j);return B+R||"/"},x=z.useState(!!(a||l)),k=DA(x,2),w=k[0],_=k[1],O={onAddSubscription:S,onLogout:v,onNavigate:m,DebugInfo:u,basename:d,subpath:h};return z.useEffect(function(){l&&Zv(l),C5(typeof a!="function"?function(){return a}:a),_(!1)},[l,a]),w?y.jsx("div",{className:i,style:s,children:y.jsx(P.Spinner,{})}):y.jsx("div",{className:i,style:s,children:y.jsxs(Jx,{initialEntries:[C(d,h)],basename:d||"/",children:[y.jsx($A,{subpath:h,onNavigate:m}),y.jsx(P.Root,{context:{isRtl:r},children:y.jsx(jA,{DebugInfo:u,hostAppProps:O})})]})})},BA=e=>e!=null,qA=e=>e.filter(BA);function zA(e){return(...t)=>{for(const n of e)n&&n(...t)}}var X=e=>typeof e=="function"&&!e.length?e():e,Yd=e=>Array.isArray(e)?e:e?[e]:[];function HA(e,...t){return typeof e=="function"?e(...t):e}var UA=_e;function GA(e,t,n,r){const i=e.length,s=t.length;let o=0;if(!s){for(;o<i;o++)n(e[o]);return}if(!i){for(;o<s;o++)r(t[o]);return}for(;o<s&&t[o]===e[o];o++);let a,l;t=t.slice(o),e=e.slice(o);for(a of t)e.includes(a)||r(a);for(l of e)t.includes(l)||n(l)}function KA(e){const[t,n]=ce(),r=e!=null&&e.throw?(f,h)=>{throw n(f instanceof Error?f:new Error(h)),f}:(f,h)=>{n(f instanceof Error?f:new Error(h))},i=e!=null&&e.api?Array.isArray(e.api)?e.api:[e.api]:[globalThis.localStorage].filter(Boolean),s=e!=null&&e.prefix?`${e.prefix}.`:"",o=new Map,a=new Proxy({},{get(f,h){let g=o.get(h);g||(g=ce(void 0,{equals:!1}),o.set(h,g)),g[0]();const m=i.reduce((p,v)=>{if(p!==null||!v)return p;try{return v.getItem(`${s}${h}`)}catch(b){return r(b,`Error reading ${s}${h} from ${v.name}`),null}},null);return m!==null&&(e!=null&&e.deserializer)?e.deserializer(m,h,e.options):m}}),l=(f,h,g)=>{const m=e!=null&&e.serializer?e.serializer(h,f,g!=null?g:e.options):h,p=`${s}${f}`;i.forEach(b=>{try{b.getItem(p)!==m&&b.setItem(p,m)}catch(S){r(S,`Error setting ${s}${f} to ${m} in ${b.name}`)}});const v=o.get(f);v&&v[1]()},u=f=>i.forEach(h=>{try{h.removeItem(`${s}${f}`)}catch(g){r(g,`Error removing ${s}${f} from ${h.name}`)}}),c=()=>i.forEach(f=>{try{f.clear()}catch(h){r(h,`Error clearing ${f.name}`)}}),d=()=>{const f={},h=(g,m)=>{if(!f.hasOwnProperty(g)){const p=m&&(e!=null&&e.deserializer)?e.deserializer(m,g,e.options):m;p&&(f[g]=p)}};return i.forEach(g=>{if(typeof g.getAll=="function"){let m;try{m=g.getAll()}catch(p){r(p,`Error getting all values from in ${g.name}`)}for(const p of m)h(p,m[p])}else{let m=0,p;try{for(;p=g.key(m++);)f.hasOwnProperty(p)||h(p,g.getItem(p))}catch(v){r(v,`Error getting all values from ${g.name}`)}}}),f};return(e==null?void 0:e.sync)!==!1&&xr(()=>{const f=h=>{var m;let g=!1;i.forEach(p=>{try{p!==h.storageArea&&h.key&&h.newValue!==p.getItem(h.key)&&(h.newValue?p.setItem(h.key,h.newValue):p.removeItem(h.key),g=!0)}catch(v){r(v,`Error synching api ${p.name} from storage event (${h.key}=${h.newValue})`)}}),g&&h.key&&((m=o.get(h.key))==null||m[1]())};"addEventListener"in globalThis?(globalThis.addEventListener("storage",f),_e(()=>globalThis.removeEventListener("storage",f))):(i.forEach(h=>{var g;return(g=h.addEventListener)==null?void 0:g.call(h,"storage",f)}),_e(()=>i.forEach(h=>{var g;return(g=h.removeEventListener)==null?void 0:g.call(h,"storage",f)})))}),[a,l,{clear:c,error:t,remove:u,toJSON:d}]}var mb=KA,VA=e=>(typeof e.clear=="function"||(e.clear=()=>{let t;for(;t=e.key(0);)e.removeItem(t)}),e),Iy=e=>{if(!e)return"";let t="";for(const n in e){if(!e.hasOwnProperty(n))continue;const r=e[n];t+=r instanceof Date?`; ${n}=${r.toUTCString()}`:typeof r=="boolean"?`; ${n}`:`; ${n}=${r}`}return t},gn=VA({_cookies:[globalThis.document,"cookie"],getItem:e=>{var t,n;return(n=(t=gn._cookies[0][gn._cookies[1]].match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)"))==null?void 0:t.pop())!=null?n:null},setItem:(e,t,n)=>{const r=gn.getItem(e);gn._cookies[0][gn._cookies[1]]=`${e}=${t}${Iy(n)}`;const i=Object.assign(new Event("storage"),{key:e,oldValue:r,newValue:t,url:globalThis.document.URL,storageArea:gn});window.dispatchEvent(i)},removeItem:e=>{gn._cookies[0][gn._cookies[1]]=`${e}=deleted${Iy({expires:new Date(0)})}`},key:e=>{let t=null,n=0;return gn._cookies[0][gn._cookies[1]].replace(/(?:^|;)\s*(.+?)\s*=\s*[^;]+/g,(r,i)=>(!t&&i&&n++===e&&(t=i),"")),t},get length(){let e=0;return gn._cookies[0][gn._cookies[1]].replace(/(?:^|;)\s*.+?\s*=\s*[^;]+/g,t=>(e+=t?1:0,"")),e}}),WA=1024,Fi=796,Yf=700,QA="bottom-right",Xd="bottom",pb="system",YA=!1,vb=500,XA=500,bb=500,ZA=Object.keys(bd)[0],Ry=1,JA=Object.keys(xd)[0],Xf=wt({client:void 0,onlineManager:void 0,queryFlavor:"",version:"",shadowDOMTarget:void 0});function ye(){return St(Xf)}var xb=wt(void 0),wb=e=>{const[t,n]=ce(null),r=()=>{const o=t();o!=null&&(o.close(),n(null))},i=(o,a)=>{if(t()!=null)return;const l=window.open("","TSQD-Devtools-Panel",`width=${o},height=${a},popup`);if(!l)throw new Error("Failed to open popup. Please allow popups for this site to view the devtools in picture-in-picture mode.");l.document.head.innerHTML="",l.document.body.innerHTML="",H3(l.document),l.document.title="TanStack Query Devtools",l.document.body.style.margin="0",l.addEventListener("pagehide",()=>{e.setLocalStore("pip_open","false"),n(null)}),[...(ye().shadowDOMTarget||document).styleSheets].forEach(u=>{try{const c=[...u.cssRules].map(g=>g.cssText).join(""),d=document.createElement("style"),f=u.ownerNode;let h="";f&&"id"in f&&(h=f.id),h&&d.setAttribute("id",h),d.textContent=c,l.document.head.appendChild(d)}catch(c){const d=document.createElement("link");if(u.href==null)return;d.rel="stylesheet",d.type=u.type,d.media=u.media.toString(),d.href=u.href,l.document.head.appendChild(d)}}),ku(["focusin","focusout","pointermove","keydown","pointerdown","pointerup","click","mousedown","input"],l.document),e.setLocalStore("pip_open","true"),n(l)};xe(()=>{var a;((a=e.localStore.pip_open)!=null?a:"false")==="true"&&!e.disabled&&i(Number(window.innerWidth),Number(e.localStore.height||XA))}),xe(()=>{const o=(ye().shadowDOMTarget||document).querySelector("#_goober"),a=t();if(o&&a){const l=new MutationObserver(()=>{const u=(ye().shadowDOMTarget||a.document).querySelector("#_goober");u&&(u.textContent=o.textContent)});l.observe(o,{childList:!0,subtree:!0,characterDataOldValue:!0}),_e(()=>{l.disconnect()})}});const s=U(()=>{var o;return{pipWindow:t(),requestPipWindow:i,closePipWindow:r,disabled:(o=e.disabled)!=null?o:!1}});return L(xb.Provider,{value:s,get children(){return e.children}})},Zf=()=>U(()=>{const t=St(xb);if(!t)throw new Error("usePiPWindow must be used within a PiPProvider");return t()}),Jf=wt(()=>"dark");function xt(){return St(Jf)}var Sb={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},eP=Object.keys(Sb).join("|"),tP=new RegExp(eP,"g");function nP(e){return e.replace(tP,t=>Sb[t])}var Bt={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function Ny(e,t,n){var r;if(n=n||{},n.threshold=(r=n.threshold)!=null?r:Bt.MATCHES,!n.accessors){const o=Fy(e,t,n);return{rankedValue:e,rank:o,accessorIndex:-1,accessorThreshold:n.threshold,passed:o>=n.threshold}}const i=oP(e,n.accessors),s={rankedValue:e,rank:Bt.NO_MATCH,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let o=0;o<i.length;o++){const a=i[o];let l=Fy(a.itemValue,t,n);const{minRanking:u,maxRanking:c,threshold:d=n.threshold}=a.attributes;l<u&&l>=Bt.MATCHES?l=u:l>c&&(l=c),l=Math.min(l,c),l>=d&&l>s.rank&&(s.rank=l,s.passed=!0,s.accessorIndex=o,s.accessorThreshold=d,s.rankedValue=a.itemValue)}return s}function Fy(e,t,n){return e=By(e,n),t=By(t,n),t.length>e.length?Bt.NO_MATCH:e===t?Bt.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase(),t=t.toLowerCase(),e===t?Bt.EQUAL:e.startsWith(t)?Bt.STARTS_WITH:e.includes(` ${t}`)?Bt.WORD_STARTS_WITH:e.includes(t)?Bt.CONTAINS:t.length===1?Bt.NO_MATCH:rP(e).includes(t)?Bt.ACRONYM:iP(e,t))}function rP(e){let t="";return e.split(" ").forEach(r=>{r.split("-").forEach(s=>{t+=s.substr(0,1)})}),t}function iP(e,t){let n=0,r=0;function i(l,u,c){for(let d=c,f=u.length;d<f;d++)if(u[d]===l)return n+=1,d+1;return-1}function s(l){const u=1/l,c=n/t.length;return Bt.MATCHES+c*u}const o=i(t[0],e,0);if(o<0)return Bt.NO_MATCH;r=o;for(let l=1,u=t.length;l<u;l++){const c=t[l];if(r=i(c,e,r),!(r>-1))return Bt.NO_MATCH}const a=r-o;return s(a)}function By(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=nP(e)),e}function sP(e,t){let n=t;typeof t=="object"&&(n=t.accessor);const r=n(e);return r==null?[]:Array.isArray(r)?r:[String(r)]}function oP(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const s=t[r],o=aP(s),a=sP(e,s);for(let l=0,u=a.length;l<u;l++)n.push({itemValue:a[l],attributes:o})}return n}var qy={maxRanking:1/0,minRanking:-1/0};function aP(e){return typeof e=="function"?qy:{...qy,...e}}var lP={data:""},uP=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||lP,cP=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,dP=/\/\*[^]*?\*\/| +/g,zy=/\n+/g,gi=(e,t)=>{let n="",r="",i="";for(let s in e){let o=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+o+";":r+=s[1]=="f"?gi(o,s):s+"{"+gi(o,s[1]=="k"?"":t)+"}":typeof o=="object"?r+=gi(o,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=gi.p?gi.p(s,o):s+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},ir={},Cb=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Cb(e[n]);return t}return e},fP=(e,t,n,r,i)=>{let s=Cb(e),o=ir[s]||(ir[s]=(l=>{let u=0,c=11;for(;u<l.length;)c=101*c+l.charCodeAt(u++)>>>0;return"go"+c})(s));if(!ir[o]){let l=s!==e?e:(u=>{let c,d,f=[{}];for(;c=cP.exec(u.replace(dP,""));)c[4]?f.shift():c[3]?(d=c[3].replace(zy," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][c[1]]=c[2].replace(zy," ").trim();return f[0]})(e);ir[o]=gi(i?{["@keyframes "+o]:l}:l,n?"":"."+o)}let a=n&&ir.g?ir.g:null;return n&&(ir.g=ir[o]),((l,u,c,d)=>{d?u.data=u.data.replace(d,l):u.data.indexOf(l)===-1&&(u.data=c?l+u.data:u.data+l)})(ir[o],t,r,a),o},hP=(e,t,n)=>e.reduce((r,i,s)=>{let o=t[s];if(o&&o.call){let a=o(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;o=l?"."+l:a&&typeof a=="object"?a.props?"":gi(a,""):a===!1?"":a}return r+i+(o==null?"":o)},"");function je(e){let t=this||{},n=e.call?e(t.p):e;return fP(n.unshift?n.raw?hP(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,uP(t.target),t.g,t.o,t.k)}je.bind({g:1});je.bind({k:1});function _b(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=_b(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fe(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=_b(e))&&(r&&(r+=" "),r+=t);return r}function gP(e,t){const n=at(e),{onChange:r}=t;let i=new Set(t.appear?void 0:n);const s=new WeakSet,[o,a]=ce([],{equals:!1}),[l]=x3(),u=d=>{a(f=>(f.push.apply(f,d),f));for(const f of d)s.delete(f)},c=(d,f,h)=>d.splice(h,0,f);return U(d=>{const f=o(),h=e();if(h[Su],at(l))return l(),d;if(f.length){const g=d.filter(m=>!f.includes(m));return f.length=0,r({list:g,added:[],removed:[],unchanged:g,finishRemoved:u}),g}return at(()=>{const g=new Set(h),m=h.slice(),p=[],v=[],b=[];for(const C of h)(i.has(C)?b:p).push(C);let S=!p.length;for(let C=0;C<d.length;C++){const x=d[C];g.has(x)||(s.has(x)||(v.push(x),s.add(x)),c(m,x,C)),S&&x!==m[C]&&(S=!1)}return!v.length&&S?d:(r({list:m,added:p,removed:v,unchanged:b,finishRemoved:u}),i=g,m)})},t.appear?[]:n.slice())}function It(...e){return zA(e)}var Hy=e=>e instanceof Element;function Zd(e,t){if(t(e))return e;if(typeof e=="function"&&!e.length)return Zd(e(),t);if(Array.isArray(e)){const n=[];for(const r of e){const i=Zd(r,t);i&&(Array.isArray(i)?n.push.apply(n,i):n.push(i))}return n.length?n:null}return null}function yP(e,t=Hy,n=Hy){const r=U(e),i=U(()=>Zd(r(),t));return i.toArray=()=>{const s=i();return Array.isArray(s)?s:s?[s]:[]},i}function mP(e){return U(()=>{const t=e.name||"s";return{enterActive:(e.enterActiveClass||t+"-enter-active").split(" "),enter:(e.enterClass||t+"-enter").split(" "),enterTo:(e.enterToClass||t+"-enter-to").split(" "),exitActive:(e.exitActiveClass||t+"-exit-active").split(" "),exit:(e.exitClass||t+"-exit").split(" "),exitTo:(e.exitToClass||t+"-exit-to").split(" "),move:(e.moveClass||t+"-move").split(" ")}})}function kb(e){requestAnimationFrame(()=>requestAnimationFrame(e))}function pP(e,t,n,r){const{onBeforeEnter:i,onEnter:s,onAfterEnter:o}=t;i==null||i(n),n.classList.add(...e.enter),n.classList.add(...e.enterActive),queueMicrotask(()=>{if(!n.parentNode)return r==null?void 0:r();s==null||s(n,()=>a())}),kb(()=>{n.classList.remove(...e.enter),n.classList.add(...e.enterTo),(!s||s.length<2)&&(n.addEventListener("transitionend",a),n.addEventListener("animationend",a))});function a(l){(!l||l.target===n)&&(n.removeEventListener("transitionend",a),n.removeEventListener("animationend",a),n.classList.remove(...e.enterActive),n.classList.remove(...e.enterTo),o==null||o(n))}}function vP(e,t,n,r){const{onBeforeExit:i,onExit:s,onAfterExit:o}=t;if(!n.parentNode)return r==null?void 0:r();i==null||i(n),n.classList.add(...e.exit),n.classList.add(...e.exitActive),s==null||s(n,()=>a()),kb(()=>{n.classList.remove(...e.exit),n.classList.add(...e.exitTo),(!s||s.length<2)&&(n.addEventListener("transitionend",a),n.addEventListener("animationend",a))});function a(l){(!l||l.target===n)&&(r==null||r(),n.removeEventListener("transitionend",a),n.removeEventListener("animationend",a),n.classList.remove(...e.exitActive),n.classList.remove(...e.exitTo),o==null||o(n))}}var Uy=e=>{const t=mP(e);return gP(yP(()=>e.children).toArray,{appear:e.appear,onChange({added:n,removed:r,finishRemoved:i,list:s}){const o=t();for(const l of n)pP(o,e,l);const a=[];for(const l of s)l.isConnected&&(l instanceof HTMLElement||l instanceof SVGElement)&&a.push({el:l,rect:l.getBoundingClientRect()});queueMicrotask(()=>{const l=[];for(const{el:u,rect:c}of a)if(u.isConnected){const d=u.getBoundingClientRect(),f=c.left-d.left,h=c.top-d.top;(f||h)&&(u.style.transform=`translate(${f}px, ${h}px)`,u.style.transitionDuration="0s",l.push(u))}document.body.offsetHeight;for(const u of l){let c=function(d){(d.target===u||/transform$/.test(d.propertyName))&&(u.removeEventListener("transitionend",c),u.classList.remove(...o.move))};u.classList.add(...o.move),u.style.transform=u.style.transitionDuration="",u.addEventListener("transitionend",c)}});for(const l of r)vP(o,e,l,()=>i([l]))}})},zc=Symbol("fallback");function Gy(e){for(const t of e)t.dispose()}function bP(e,t,n,r={}){const i=new Map;return _e(()=>Gy(i.values())),()=>{const o=e()||[];return o[Su],at(()=>{var c,d;if(!o.length)return Gy(i.values()),i.clear(),r.fallback?[mr(h=>(i.set(zc,{dispose:h}),r.fallback()))]:[];const a=new Array(o.length),l=i.get(zc);if(!i.size||l){l==null||l.dispose(),i.delete(zc);for(let f=0;f<o.length;f++){const h=o[f],g=t(h,f);s(a,h,f,g)}return a}const u=new Set(i.keys());for(let f=0;f<o.length;f++){const h=o[f],g=t(h,f);u.delete(g);const m=i.get(g);m?(a[f]=m.mapped,(c=m.setIndex)==null||c.call(m,f),m.setItem(()=>h)):s(a,h,f,g)}for(const f of u)(d=i.get(f))==null||d.dispose(),i.delete(f);return a})};function s(o,a,l,u){mr(c=>{const[d,f]=ce(a),h={setItem:f,dispose:c};if(n.length>1){const[g,m]=ce(l);h.setIndex=m,h.mapped=n(d,g)}else h.mapped=n(d);i.set(u,h),o[l]=h.mapped})}}function du(e){const{by:t}=e;return U(bP(()=>e.each,typeof t=="function"?t:n=>n[t],e.children,"fallback"in e?{fallback:()=>e.fallback}:void 0))}function xP(e,t,n,r){return e.addEventListener(t,n,r),UA(e.removeEventListener.bind(e,t,n,r))}function wP(e,t,n,r){const i=()=>{Yd(X(e)).forEach(s=>{s&&Yd(X(t)).forEach(o=>xP(s,o,n,r))})};typeof e=="function"?xe(i):be(i)}function SP(e,t){const n=new ResizeObserver(e);return _e(n.disconnect.bind(n)),{observe:r=>n.observe(r,t),unobserve:n.unobserve.bind(n)}}function Ob(e,t,n){const r=new WeakMap,{observe:i,unobserve:s}=SP(o=>{for(const a of o){const{contentRect:l,target:u}=a,c=Math.round(l.width),d=Math.round(l.height),f=r.get(u);(!f||f.width!==c||f.height!==d)&&(t(l,u,a),r.set(u,{width:c,height:d}))}},n);xe(o=>{const a=qA(Yd(X(e)));return GA(a,o,i,s),a},[])}var CP=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function Ky(e){const t={};let n;for(;n=CP.exec(e);)t[n[1]]=n[2];return t}function Qu(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=Ky(e)}else typeof t=="string"&&(t=Ky(t));return{...e,...t}}function _P(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function Jd(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function kP(e){return typeof e=="number"}function ns(e){return Object.prototype.toString.call(e)==="[object String]"}function OP(e){return typeof e=="function"}function Ga(e){return t=>`${e()}-${t}`}function wn(e,t){return e?e===t||e.contains(t):!1}function Io(e,t=!1){const{activeElement:n}=Jn(e);if(!(n!=null&&n.nodeName))return null;if(Eb(n)&&n.contentDocument)return Io(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const i=Jn(n).getElementById(r);if(i)return i}}return n}function EP(e){return Jn(e).defaultView||window}function Jn(e){return e?e.ownerDocument||e:document}function Eb(e){return e.tagName==="IFRAME"}var eh=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(eh||{});function th(e){var t;return typeof window!="undefined"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)==null?void 0:t.platform)||window.navigator.platform):!1}function Yu(){return th(/^Mac/i)}function AP(){return th(/^iPhone/i)}function PP(){return th(/^iPad/i)||Yu()&&navigator.maxTouchPoints>1}function TP(){return AP()||PP()}function MP(){return Yu()||TP()}function nt(e,t){return t&&(OP(t)?t(e):t[0](t[1],e)),e==null?void 0:e.defaultPrevented}function vt(e){return t=>{for(const n of e)nt(t,n)}}function jP(e){return Yu()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function At(e){if(e)if($P())e.focus({preventScroll:!0});else{const t=DP(e);e.focus(),LP(t)}}var Cl=null;function $P(){if(Cl==null){Cl=!1;try{document.createElement("div").focus({get preventScroll(){return Cl=!0,!0}})}catch(e){}}return Cl}function DP(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function LP(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var Ab=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],IP=[...Ab,'[tabindex]:not([tabindex="-1"]):not([disabled])'],nh=Ab.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])",RP=IP.join(':not([hidden]):not([tabindex="-1"]),');function Pb(e,t){const r=Array.from(e.querySelectorAll(nh)).filter(Vy);return t&&Vy(e)&&r.unshift(e),r.forEach((i,s)=>{if(Eb(i)&&i.contentDocument){const o=i.contentDocument.body,a=Pb(o,!1);r.splice(s,1,...a)}}),r}function Vy(e){return Tb(e)&&!NP(e)}function Tb(e){return e.matches(nh)&&rh(e)}function NP(e){return parseInt(e.getAttribute("tabindex")||"0",10)<0}function rh(e,t){return e.nodeName!=="#comment"&&FP(e)&&BP(e,t)&&(!e.parentElement||rh(e.parentElement,e))}function FP(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:i}=e.ownerDocument.defaultView,{display:s,visibility:o}=i(e);r=s!=="none"&&o!=="hidden"&&o!=="collapse"}return r}function BP(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function qP(e,t,n){const r=t!=null&&t.tabbable?RP:nh,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(s){var o;return(o=t==null?void 0:t.from)!=null&&o.contains(s)?NodeFilter.FILTER_REJECT:s.matches(r)&&rh(s)&&(!(t!=null&&t.accept)||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(i.currentNode=t.from),i}function Wy(e){for(;e&&!zP(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function zP(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function HP(){}function UP(e,t){const[n,r]=e;let i=!1;const s=t.length;for(let o=s,a=0,l=o-1;a<o;l=a++){const[u,c]=t[a],[d,f]=t[l],[,h]=t[l===0?o-1:l-1]||[0,0],g=(c-f)*(n-u)-(u-d)*(r-c);if(f<c){if(r>=f&&r<c){if(g===0)return!0;g>0&&(r===f?r>h&&(i=!i):i=!i)}}else if(c<f){if(r>c&&r<=f){if(g===0)return!0;g<0&&(r===f?r<h&&(i=!i):i=!i)}}else if(r==c&&(n>=d&&n<=u||n>=u&&n<=d))return!0}return i}function Re(e,t){return Ae(e,t)}var Co=new Map,Qy=new Set;function Yy(){if(typeof window=="undefined")return;const e=n=>{if(!n.target)return;let r=Co.get(n.target);r||(r=new Set,Co.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=Co.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),Co.delete(n.target)),Co.size===0)){for(const i of Qy)i();Qy.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document!="undefined"&&(document.readyState!=="loading"?Yy():document.addEventListener("DOMContentLoaded",Yy));function ef(e,t){const n=Xy(e,t,"left"),r=Xy(e,t,"top"),i=t.offsetWidth,s=t.offsetHeight;let o=e.scrollLeft,a=e.scrollTop;const l=o+e.offsetWidth,u=a+e.offsetHeight;n<=o?o=n:n+i>l&&(o+=n+i-l),r<=a?a=r:r+s>u&&(a+=r+s-u),e.scrollLeft=o,e.scrollTop=a}function Xy(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function GP(e,t){var n,r;if(document.contains(e)){const i=document.scrollingElement||document.documentElement;if(window.getComputedStyle(i).overflow==="hidden"){let o=Wy(e);for(;e&&o&&e!==i&&o!==i;)ef(o,e),e=o,o=Wy(e)}else{const{left:o,top:a}=e.getBoundingClientRect();(n=e==null?void 0:e.scrollIntoView)==null||n.call(e,{block:"nearest"});const{left:l,top:u}=e.getBoundingClientRect();(Math.abs(o-l)>1||Math.abs(a-u)>1)&&((r=e.scrollIntoView)==null||r.call(e,{block:"nearest"}))}}}var Mb={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"};function Sn(e){return t=>(e(t),()=>e(void 0))}function Xu(e,t){const[n,r]=ce(Zy(t==null?void 0:t()));return xe(()=>{var i;r(((i=e())==null?void 0:i.tagName.toLowerCase())||Zy(t==null?void 0:t()))}),n}function Zy(e){return ns(e)?e:void 0}function st(e){const[t,n]=Ve(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return L(eS,Ae(n,{get component(){return t.as}}))}var KP=["id","name","validationState","required","disabled","readOnly"];function VP(e){const t=`form-control-${kn()}`,n=Re({id:t},e),[r,i]=ce(),[s,o]=ce(),[a,l]=ce(),[u,c]=ce(),d=(m,p,v)=>{const b=v!=null||r()!=null;return[v,r(),b&&p!=null?m:void 0].filter(Boolean).join(" ")||void 0},f=m=>[a(),u(),m].filter(Boolean).join(" ")||void 0,h=U(()=>({"data-valid":X(n.validationState)==="valid"?"":void 0,"data-invalid":X(n.validationState)==="invalid"?"":void 0,"data-required":X(n.required)?"":void 0,"data-disabled":X(n.disabled)?"":void 0,"data-readonly":X(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>{var m;return(m=X(n.name))!=null?m:X(n.id)},dataset:h,validationState:()=>X(n.validationState),isRequired:()=>X(n.required),isDisabled:()=>X(n.disabled),isReadOnly:()=>X(n.readOnly),labelId:r,fieldId:s,descriptionId:a,errorMessageId:u,getAriaLabelledBy:d,getAriaDescribedBy:f,generateId:Ga(()=>X(n.id)),registerLabel:Sn(i),registerField:Sn(o),registerDescription:Sn(l),registerErrorMessage:Sn(c)}}}var jb=wt();function Ka(){const e=St(jb);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function $b(e){const t=Ka(),n=Re({id:t.generateId("description")},e);return xe(()=>_e(t.registerDescription(n.id))),L(st,Ae({as:"div"},()=>t.dataset(),n))}function Db(e){const t=Ka(),n=Re({id:t.generateId("error-message")},e),[r,i]=Ve(n,["forceMount"]),s=()=>t.validationState()==="invalid";return xe(()=>{s()&&_e(t.registerErrorMessage(i.id))}),L(ve,{get when(){return r.forceMount||s()},get children(){return L(st,Ae({as:"div"},()=>t.dataset(),i))}})}function WP(e){let t;const n=Ka(),r=Re({id:n.generateId("label")},e),[i,s]=Ve(r,["ref"]),o=Xu(()=>t,()=>"label");return xe(()=>_e(n.registerLabel(s.id))),L(st,Ae({as:"label",ref(a){const l=It(u=>t=u,i.ref);typeof l=="function"&&l(a)},get for(){return U(()=>o()==="label")()?n.fieldId():void 0}},()=>n.dataset(),s))}function QP(e,t){xe(br(e,n=>{if(n==null)return;const r=YP(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),_e(()=>{r.removeEventListener("reset",t)}))}))}function YP(e){return XP(e)?e.form:e.closest("form")}function XP(e){return e.matches("textarea, input, select, button")}function Va(e){var o;const[t,n]=ce((o=e.defaultValue)==null?void 0:o.call(e)),r=U(()=>{var a;return((a=e.value)==null?void 0:a.call(e))!==void 0}),i=U(()=>{var a;return r()?(a=e.value)==null?void 0:a.call(e):t()});return[i,a=>{at(()=>{var u;const l=HA(a,i());return Object.is(l,i())||(r()||n(l),(u=e.onChange)==null||u.call(e,l)),l})}]}function Lb(e){const[t,n]=Va(e);return[()=>{var i;return(i=t())!=null?i:!1},n]}function ZP(e){const[t,n]=Va(e);return[()=>{var i;return(i=t())!=null?i:[]},n]}function JP(e={}){const[t,n]=Lb({value:()=>X(e.isSelected),defaultValue:()=>!!X(e.defaultIsSelected),onChange:s=>{var o;return(o=e.onSelectedChange)==null?void 0:o.call(e,s)}});return{isSelected:t,setIsSelected:s=>{!X(e.isReadOnly)&&!X(e.isDisabled)&&n(s)},toggle:()=>{!X(e.isReadOnly)&&!X(e.isDisabled)&&n(!t())}}}var eT=Object.defineProperty,Zu=(e,t)=>{for(var n in t)eT(e,n,{get:t[n],enumerable:!0})},Ib=wt();function Rb(){return St(Ib)}function tT(){const e=Rb();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function Nb(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function nT(e,t){var i;const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const s=(i=e[r])==null?void 0:i.ref();if(s&&Nb(s,n))return r+1}return 0}function rT(e){const t=e.map((r,i)=>[i,r]);let n=!1;return t.sort(([r,i],[s,o])=>{const a=i.ref(),l=o.ref();return a===l||!a||!l?0:Nb(a,l)?(r>s&&(n=!0),-1):(r<s&&(n=!0),1)}),n?t.map(([r,i])=>i):e}function Fb(e,t){const n=rT(e);e!==n&&t(n)}function iT(e){var i,s;const t=e[0],n=(i=e[e.length-1])==null?void 0:i.ref();let r=(s=t==null?void 0:t.ref())==null?void 0:s.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return Jn(r).body}function sT(e,t){xe(()=>{const n=setTimeout(()=>{Fb(e(),t)});_e(()=>clearTimeout(n))})}function oT(e,t){if(typeof IntersectionObserver!="function"){sT(e,t);return}let n=[];xe(()=>{const r=()=>{const o=!!n.length;n=e(),o&&Fb(e(),t)},i=iT(e()),s=new IntersectionObserver(r,{root:i});for(const o of e()){const a=o.ref();a&&s.observe(a)}_e(()=>s.disconnect())})}function aT(e={}){const[t,n]=ZP({value:()=>X(e.items),onChange:s=>{var o;return(o=e.onItemsChange)==null?void 0:o.call(e,s)}});oT(t,n);const r=s=>(n(o=>{const a=nT(o,s);return _P(o,s,a)}),()=>{n(o=>{const a=o.filter(l=>l.ref()!==s.ref());return o.length===a.length?o:a})});return{DomCollectionProvider:s=>L(Ib.Provider,{value:{registerItem:r},get children(){return s.children}})}}function lT(e){const t=tT(),n=Re({shouldRegisterItem:!0},e);xe(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());_e(r)})}function Bb(e){var l,u,c;let t=(l=e.startIndex)!=null?l:0;const n=(u=e.startLevel)!=null?u:0,r=[],i=d=>{var g;if(d==null)return"";const f=(g=e.getKey)!=null?g:"key",h=ns(f)?d[f]:f(d);return h!=null?String(h):""},s=d=>{var g;if(d==null)return"";const f=(g=e.getTextValue)!=null?g:"textValue",h=ns(f)?d[f]:f(d);return h!=null?String(h):""},o=d=>{var h,g;if(d==null)return!1;const f=(h=e.getDisabled)!=null?h:"disabled";return(g=ns(f)?d[f]:f(d))!=null?g:!1},a=d=>{var f;if(d!=null)return ns(e.getSectionChildren)?d[e.getSectionChildren]:(f=e.getSectionChildren)==null?void 0:f.call(e,d)};for(const d of e.dataSource){if(ns(d)||kP(d)){r.push({type:"item",rawValue:d,key:String(d),textValue:String(d),disabled:o(d),level:n,index:t}),t++;continue}if(a(d)!=null){r.push({type:"section",rawValue:d,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const f=(c=a(d))!=null?c:[];if(f.length>0){const h=Bb({dataSource:f,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...h),t+=h.length}}else r.push({type:"item",rawValue:d,key:i(d),textValue:s(d),disabled:o(d),level:n,index:t}),t++}return r}function uT(e,t=[]){return U(()=>{const n=Bb({dataSource:X(e.dataSource),getKey:X(e.getKey),getTextValue:X(e.getTextValue),getDisabled:X(e.getDisabled),getSectionChildren:X(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}var cT=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),dT=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function fT(e){var n;if(Intl.Locale){const r=(n=new Intl.Locale(e).maximize().script)!=null?n:"";return cT.has(r)}const t=e.split("-")[0];return dT.has(t)}function hT(e){return fT(e)?"rtl":"ltr"}function qb(){let e=typeof navigator!="undefined"&&(navigator.language||navigator.userLanguage)||"en-US";return{locale:e,direction:hT(e)}}var tf=qb(),Ro=new Set;function Jy(){tf=qb();for(const e of Ro)e(tf)}function gT(){const[e,t]=ce(tf),n=U(()=>e());return xr(()=>{Ro.size===0&&window.addEventListener("languagechange",Jy),Ro.add(t),_e(()=>{Ro.delete(t),Ro.size===0&&window.removeEventListener("languagechange",Jy)})}),{locale:()=>n().locale,direction:()=>n().direction}}var yT=wt();function ii(){const e=gT();return St(yT)||e}var Hc=new Map;function mT(e){const{locale:t}=ii(),n=U(()=>t()+(e?Object.entries(e).sort((r,i)=>r[0]<i[0]?-1:1).join():""));return U(()=>{const r=n();let i;return Hc.has(r)&&(i=Hc.get(r)),i||(i=new Intl.Collator(t(),e),Hc.set(r,i)),i})}var ur=class zb extends Set{constructor(n,r,i){super(n);pe(this,"anchorKey");pe(this,"currentKey");n instanceof zb?(this.anchorKey=r||n.anchorKey,this.currentKey=i||n.currentKey):(this.anchorKey=r,this.currentKey=i)}};function pT(e){const[t,n]=Va(e);return[()=>{var i;return(i=t())!=null?i:new ur},n]}function Hb(e){return MP()?e.altKey:e.ctrlKey}function rs(e){return Yu()?e.metaKey:e.ctrlKey}function em(e){return new ur(e)}function vT(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function bT(e){const t=Re({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=ce(!1),[i,s]=ce(),o=U(()=>{const m=X(t.selectedKeys);return m!=null?em(m):m}),a=U(()=>{const m=X(t.defaultSelectedKeys);return m!=null?em(m):new ur}),[l,u]=pT({value:o,defaultValue:a,onChange:m=>{var p;return(p=t.onSelectionChange)==null?void 0:p.call(t,m)}}),[c,d]=ce(X(t.selectionBehavior)),f=()=>X(t.selectionMode),h=()=>{var m;return(m=X(t.disallowEmptySelection))!=null?m:!1},g=m=>{(X(t.allowDuplicateSelectionEvents)||!vT(m,l()))&&u(m)};return xe(()=>{const m=l();X(t.selectionBehavior)==="replace"&&c()==="toggle"&&typeof m=="object"&&m.size===0&&d("replace")}),xe(()=>{var m;d((m=X(t.selectionBehavior))!=null?m:"toggle")}),{selectionMode:f,disallowEmptySelection:h,selectionBehavior:c,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:i,setFocusedKey:s,selectedKeys:l,setSelectedKeys:g}}function xT(e){const[t,n]=ce(""),[r,i]=ce(-1);return{typeSelectHandlers:{onKeyDown:o=>{var f,h,g;if(X(e.isDisabled))return;const a=X(e.keyboardDelegate),l=X(e.selectionManager);if(!a.getKeyForSearch)return;const u=wT(o.key);if(!u||o.ctrlKey||o.metaKey)return;u===" "&&t().trim().length>0&&(o.preventDefault(),o.stopPropagation());let c=n(m=>m+u),d=(f=a.getKeyForSearch(c,l.focusedKey()))!=null?f:a.getKeyForSearch(c);d==null&&ST(c)&&(c=c[0],d=(h=a.getKeyForSearch(c,l.focusedKey()))!=null?h:a.getKeyForSearch(c)),d!=null&&(l.setFocusedKey(d),(g=e.onTypeSelect)==null||g.call(e,d)),clearTimeout(r()),i(window.setTimeout(()=>n(""),500))}}}}function wT(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function ST(e){return e.split("").every(t=>t===e[0])}function CT(e,t,n){const i=Ae({selectOnFocus:()=>X(e.selectionManager).selectionBehavior()==="replace"},e),s=()=>t(),{direction:o}=ii();let a={top:0,left:0};wP(()=>X(i.isVirtualized)?void 0:s(),"scroll",()=>{const p=s();p&&(a={top:p.scrollTop,left:p.scrollLeft})});const{typeSelectHandlers:l}=xT({isDisabled:()=>X(i.disallowTypeAhead),keyboardDelegate:()=>X(i.keyboardDelegate),selectionManager:()=>X(i.selectionManager)}),u=()=>{var p;return(p=X(i.orientation))!=null?p:"vertical"},c=p=>{var _,O,E,T,j,B,R,A;nt(p,l.onKeyDown),p.altKey&&p.key==="Tab"&&p.preventDefault();const v=t();if(!(v!=null&&v.contains(p.target)))return;const b=X(i.selectionManager),S=X(i.selectOnFocus),C=M=>{M!=null&&(b.setFocusedKey(M),p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(M):S&&!Hb(p)&&b.replaceSelection(M))},x=X(i.keyboardDelegate),k=X(i.shouldFocusWrap),w=b.focusedKey();switch(p.key){case(u()==="vertical"?"ArrowDown":"ArrowRight"):{if(x.getKeyBelow){p.preventDefault();let M;w!=null?M=x.getKeyBelow(w):M=(_=x.getFirstKey)==null?void 0:_.call(x),M==null&&k&&(M=(O=x.getFirstKey)==null?void 0:O.call(x,w)),C(M)}break}case(u()==="vertical"?"ArrowUp":"ArrowLeft"):{if(x.getKeyAbove){p.preventDefault();let M;w!=null?M=x.getKeyAbove(w):M=(E=x.getLastKey)==null?void 0:E.call(x),M==null&&k&&(M=(T=x.getLastKey)==null?void 0:T.call(x,w)),C(M)}break}case(u()==="vertical"?"ArrowLeft":"ArrowUp"):{if(x.getKeyLeftOf){p.preventDefault();const M=o()==="rtl";let D;w!=null?D=x.getKeyLeftOf(w):D=M?(j=x.getFirstKey)==null?void 0:j.call(x):(B=x.getLastKey)==null?void 0:B.call(x),C(D)}break}case(u()==="vertical"?"ArrowRight":"ArrowDown"):{if(x.getKeyRightOf){p.preventDefault();const M=o()==="rtl";let D;w!=null?D=x.getKeyRightOf(w):D=M?(R=x.getLastKey)==null?void 0:R.call(x):(A=x.getFirstKey)==null?void 0:A.call(x),C(D)}break}case"Home":if(x.getFirstKey){p.preventDefault();const M=x.getFirstKey(w,rs(p));M!=null&&(b.setFocusedKey(M),rs(p)&&p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(M):S&&b.replaceSelection(M))}break;case"End":if(x.getLastKey){p.preventDefault();const M=x.getLastKey(w,rs(p));M!=null&&(b.setFocusedKey(M),rs(p)&&p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(M):S&&b.replaceSelection(M))}break;case"PageDown":if(x.getKeyPageBelow&&w!=null){p.preventDefault();const M=x.getKeyPageBelow(w);C(M)}break;case"PageUp":if(x.getKeyPageAbove&&w!=null){p.preventDefault();const M=x.getKeyPageAbove(w);C(M)}break;case"a":rs(p)&&b.selectionMode()==="multiple"&&X(i.disallowSelectAll)!==!0&&(p.preventDefault(),b.selectAll());break;case"Escape":p.defaultPrevented||(p.preventDefault(),X(i.disallowEmptySelection)||b.clearSelection());break;case"Tab":if(!X(i.allowsTabNavigation)){if(p.shiftKey)v.focus();else{const M=qP(v,{tabbable:!0});let D,H;do H=M.lastChild(),H&&(D=H);while(H);D&&!D.contains(document.activeElement)&&At(D)}break}}},d=p=>{var C,x,k,w;const v=X(i.selectionManager),b=X(i.keyboardDelegate),S=X(i.selectOnFocus);if(v.isFocused()){p.currentTarget.contains(p.target)||v.setFocused(!1);return}if(p.currentTarget.contains(p.target)){if(v.setFocused(!0),v.focusedKey()==null){const _=E=>{E!=null&&(v.setFocusedKey(E),S&&v.replaceSelection(E))},O=p.relatedTarget;O&&p.currentTarget.compareDocumentPosition(O)&Node.DOCUMENT_POSITION_FOLLOWING?_((x=v.lastSelectedKey())!=null?x:(C=b.getLastKey)==null?void 0:C.call(b)):_((w=v.firstSelectedKey())!=null?w:(k=b.getFirstKey)==null?void 0:k.call(b))}else if(!X(i.isVirtualized)){const _=s();if(_){_.scrollTop=a.top,_.scrollLeft=a.left;const O=_.querySelector(`[data-key="${v.focusedKey()}"]`);O&&(At(O),ef(_,O))}}}},f=p=>{const v=X(i.selectionManager);p.currentTarget.contains(p.relatedTarget)||v.setFocused(!1)},h=p=>{s()===p.target&&p.preventDefault()},g=()=>{var k,w;const p=X(i.autoFocus);if(!p)return;const v=X(i.selectionManager),b=X(i.keyboardDelegate);let S;p==="first"&&(S=(k=b.getFirstKey)==null?void 0:k.call(b)),p==="last"&&(S=(w=b.getLastKey)==null?void 0:w.call(b));const C=v.selectedKeys();C.size&&(S=C.values().next().value),v.setFocused(!0),v.setFocusedKey(S);const x=t();x&&S==null&&!X(i.shouldUseVirtualFocus)&&At(x)};return xr(()=>{i.deferAutoFocus?setTimeout(g,0):g()}),xe(br([s,()=>X(i.isVirtualized),()=>X(i.selectionManager).focusedKey()],p=>{var C;const[v,b,S]=p;if(b)S&&((C=i.scrollToKey)==null||C.call(i,S));else if(S&&v){const x=v.querySelector(`[data-key="${S}"]`);x&&ef(v,x)}})),{tabIndex:U(()=>{if(!X(i.shouldUseVirtualFocus))return X(i.selectionManager).focusedKey()==null?0:-1}),onKeyDown:c,onMouseDown:h,onFocusIn:d,onFocusOut:f}}function Ub(e,t){const n=()=>X(e.selectionManager),r=()=>X(e.key),i=()=>X(e.shouldUseVirtualFocus),s=b=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):b!=null&&b.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||rs(b)||"pointerType"in b&&b.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},o=()=>n().isSelected(r()),a=()=>X(e.disabled)||n().isDisabled(r()),l=()=>!a()&&n().canSelectItem(r());let u=null;const c=b=>{l()&&(u=b.pointerType,b.pointerType==="mouse"&&b.button===0&&!X(e.shouldSelectOnPressUp)&&s(b))},d=b=>{l()&&b.pointerType==="mouse"&&b.button===0&&X(e.shouldSelectOnPressUp)&&X(e.allowsDifferentPressOrigin)&&s(b)},f=b=>{l()&&(X(e.shouldSelectOnPressUp)&&!X(e.allowsDifferentPressOrigin)||u!=="mouse")&&s(b)},h=b=>{!l()||!["Enter"," "].includes(b.key)||(Hb(b)?n().toggleSelection(r()):s(b))},g=b=>{a()&&b.preventDefault()},m=b=>{const S=t();i()||a()||!S||b.target===S&&n().setFocusedKey(r())},p=U(()=>{if(!(i()||a()))return r()===n().focusedKey()?0:-1}),v=U(()=>X(e.virtualized)?void 0:r());return xe(br([t,r,i,()=>n().focusedKey(),()=>n().isFocused()],([b,S,C,x,k])=>{b&&S===x&&k&&!C&&document.activeElement!==b&&(e.focus?e.focus():At(b))})),{isSelected:o,isDisabled:a,allowsSelection:l,tabIndex:p,dataKey:v,onPointerDown:c,onPointerUp:d,onClick:f,onKeyDown:h,onMouseDown:g,onFocus:m}}var _T=class{constructor(e,t){pe(this,"collection");pe(this,"state");this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()==="none")return!1;const t=this.getKey(e);return t==null?!1:this.state.selectedKeys().has(t)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every(t=>e.has(t))}firstSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=(n==null?void 0:n.index)!=null&&(e==null?void 0:e.index)!=null&&n.index<e.index;(!e||r)&&(e=n)}return e==null?void 0:e.key}lastSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=(n==null?void 0:n.index)!=null&&(e==null?void 0:e.index)!=null&&n.index>e.index;(!e||r)&&(e=n)}return e==null?void 0:e.key}extendSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=this.state.selectedKeys(),r=n.anchorKey||t,i=new ur(n,r,t);for(const s of this.getKeyRange(r,n.currentKey||t))i.delete(s);for(const s of this.getKeyRange(t,r))this.canSelectItem(s)&&i.add(s);this.state.setSelectedKeys(i)}getKeyRange(e,t){const n=this.collection().getItem(e),r=this.collection().getItem(t);return n&&r?n.index!=null&&r.index!=null&&n.index<=r.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){const n=[];let r=e;for(;r!=null;){const i=this.collection().getItem(r);if(i&&i.type==="item"&&n.push(r),r===t)return n;r=this.collection().getKeyAfter(r)}return[]}getKey(e){const t=this.collection().getItem(e);return t?!t||t.type!=="item"?null:t.key:e}toggleSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=new ur(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection()&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode()==="none")return;const t=this.getKey(e);if(t==null)return;const n=this.canSelectItem(t)?new ur([t],t,t):new ur;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new ur;for(const n of e){const r=this.getKey(n);if(r!=null&&(t.add(r),this.selectionMode()==="single"))break}this.state.setSelectedKeys(t)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new ur)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()==="toggle"||t&&t.pointerType==="touch"?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const t=this.selectedKeys();if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;for(const n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()==="none")return!1;const t=this.collection().getItem(e);return t!=null&&!t.disabled}isDisabled(e){const t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){const e=[];return(n=>{for(;n!=null;){if(this.canSelectItem(n)){const r=this.collection().getItem(n);if(!r)continue;r.type==="item"&&e.push(n)}n=this.collection().getKeyAfter(n)}})(this.collection().getFirstKey()),e}},tm=class{constructor(e){pe(this,"keyMap",new Map);pe(this,"iterable");pe(this,"firstKey");pe(this,"lastKey");this.iterable=e;for(const r of e)this.keyMap.set(r.key,r);if(this.keyMap.size===0)return;let t,n=0;for(const[r,i]of this.keyMap)t?(t.nextKey=r,i.prevKey=t.key):(this.firstKey=r,i.prevKey=void 0),i.type==="item"&&(i.index=n++),t=i,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){var t;return(t=this.keyMap.get(e))==null?void 0:t.prevKey}getKeyAfter(e){var t;return(t=this.keyMap.get(e))==null?void 0:t.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}};function kT(e){const t=bT(e),r=uT({dataSource:()=>X(e.dataSource),getKey:()=>X(e.getKey),getTextValue:()=>X(e.getTextValue),getDisabled:()=>X(e.getDisabled),getSectionChildren:()=>X(e.getSectionChildren),factory:s=>e.filter?new tm(e.filter(s)):new tm(s)},[()=>e.filter]),i=new _T(r,t);return Vp(()=>{const s=t.focusedKey();s!=null&&!r().getItem(s)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>i}}var Et=e=>typeof e=="function"?e():e,OT=e=>{const t=U(()=>{const o=Et(e.element);if(o)return getComputedStyle(o)}),n=()=>{var o,a;return(a=(o=t())==null?void 0:o.animationName)!=null?a:"none"},[r,i]=ce(Et(e.show)?"present":"hidden");let s="none";return xe(o=>{const a=Et(e.show);return at(()=>{var c;if(o===a)return a;const l=s,u=n();a?i("present"):u==="none"||((c=t())==null?void 0:c.display)==="none"?i("hidden"):i(o===!0&&l!==u?"hiding":"hidden")}),a}),xe(()=>{const o=Et(e.element);if(!o)return;const a=u=>{u.target===o&&(s=n())},l=u=>{const d=n().includes(u.animationName);u.target===o&&d&&r()==="hiding"&&i("hidden")};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",l),o.addEventListener("animationend",l),_e(()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",l),o.removeEventListener("animationend",l)})}),{present:()=>r()==="present"||r()==="hiding",state:r}},ET=OT,Gb=ET,fu="data-kb-top-layer",Kb,nf=!1,wr=[];function ga(e){return wr.findIndex(t=>t.node===e)}function AT(e){return wr[ga(e)]}function PT(e){return wr[wr.length-1].node===e}function Vb(){return wr.filter(e=>e.isPointerBlocking)}function TT(){return[...Vb()].slice(-1)[0]}function ih(){return Vb().length>0}function Wb(e){var n;const t=ga((n=TT())==null?void 0:n.node);return ga(e)<t}function MT(e){wr.push(e)}function jT(e){const t=ga(e);t<0||wr.splice(t,1)}function $T(){for(const{node:e}of wr)e.style.pointerEvents=Wb(e)?"none":"auto"}function DT(e){if(ih()&&!nf){const t=Jn(e);Kb=document.body.style.pointerEvents,t.body.style.pointerEvents="none",nf=!0}}function LT(e){if(ih())return;const t=Jn(e);t.body.style.pointerEvents=Kb,t.body.style.length===0&&t.body.removeAttribute("style"),nf=!1}var Wt={layers:wr,isTopMostLayer:PT,hasPointerBlockingLayer:ih,isBelowPointerBlockingLayer:Wb,addLayer:MT,removeLayer:jT,indexOf:ga,find:AT,assignPointerEventToLayers:$T,disableBodyPointerEvents:DT,restoreBodyPointerEvents:LT},IT={};Zu(IT,{Button:()=>FT,Root:()=>sh});var RT=["button","color","file","image","reset","submit"];function NT(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?RT.indexOf(e.type)!==-1:!1}function sh(e){let t;const n=Re({type:"button"},e),[r,i]=Ve(n,["ref","type","disabled"]),s=Xu(()=>t,()=>"button"),o=U(()=>{const u=s();return u==null?!1:NT({tagName:u,type:r.type})}),a=U(()=>s()==="input"),l=U(()=>s()==="a"&&(t==null?void 0:t.getAttribute("href"))!=null);return L(st,Ae({as:"button",ref(u){const c=It(d=>t=d,r.ref);typeof c=="function"&&c(u)},get type(){return o()||a()?r.type:void 0},get role(){return!o()&&!l()?"button":void 0},get tabIndex(){return!o()&&!l()&&!r.disabled?0:void 0},get disabled(){return o()||a()?r.disabled:void 0},get"aria-disabled"(){return!o()&&!a()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},i))}var FT=sh,BT=["top","right","bottom","left"],Xn=Math.min,on=Math.max,hu=Math.round,_l=Math.floor,Zr=e=>({x:e,y:e}),qT={left:"right",right:"left",bottom:"top",top:"bottom"},zT={start:"end",end:"start"};function rf(e,t,n){return on(e,Xn(t,n))}function Wi(e,t){return typeof e=="function"?e(t):e}function Jr(e){return e.split("-")[0]}function no(e){return e.split("-")[1]}function Qb(e){return e==="x"?"y":"x"}function oh(e){return e==="y"?"height":"width"}function Bi(e){return["top","bottom"].includes(Jr(e))?"y":"x"}function ah(e){return Qb(Bi(e))}function HT(e,t,n){n===void 0&&(n=!1);const r=no(e),i=ah(e),s=oh(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=gu(o)),[o,gu(o)]}function UT(e){const t=gu(e);return[sf(e),t,sf(t)]}function sf(e){return e.replace(/start|end/g,t=>zT[t])}function GT(e,t,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?s:o;default:return[]}}function KT(e,t,n,r){const i=no(e);let s=GT(Jr(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(sf)))),s}function gu(e){return e.replace(/left|right|bottom|top/g,t=>qT[t])}function VT(e){return{top:0,right:0,bottom:0,left:0,...e}}function Yb(e){return typeof e!="number"?VT(e):{top:e,right:e,bottom:e,left:e}}function yu(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function nm(e,t,n){let{reference:r,floating:i}=e;const s=Bi(t),o=ah(t),a=oh(o),l=Jr(t),u=s==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[a]/2-i[a]/2;let h;switch(l){case"top":h={x:c,y:r.y-i.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(no(t)){case"start":h[o]-=f*(n&&u?-1:1);break;case"end":h[o]+=f*(n&&u?-1:1);break}return h}var WT=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=nm(u,r,l),f=r,h={},g=0;for(let m=0;m<a.length;m++){const{name:p,fn:v}=a[m],{x:b,y:S,data:C,reset:x}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:u,platform:o,elements:{reference:e,floating:t}});c=b!=null?b:c,d=S!=null?S:d,h={...h,[p]:{...h[p],...C}},x&&g<=50&&(g++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(u=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:c,y:d}=nm(u,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function ya(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Wi(t,e),g=Yb(h),p=a[f?d==="floating"?"reference":"floating":d],v=yu(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(p)))==null||n?p:p.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),b=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},x=yu(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:S,strategy:l}):b);return{top:(v.top-x.top+g.top)/C.y,bottom:(x.bottom-v.bottom+g.bottom)/C.y,left:(v.left-x.left+g.left)/C.x,right:(x.right-v.right+g.right)/C.x}}var QT=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=Wi(e,t)||{};if(u==null)return{};const d=Yb(c),f={x:n,y:r},h=ah(i),g=oh(h),m=await o.getDimensions(u),p=h==="y",v=p?"top":"left",b=p?"bottom":"right",S=p?"clientHeight":"clientWidth",C=s.reference[g]+s.reference[h]-f[h]-s.floating[g],x=f[h]-s.reference[h],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let w=k?k[S]:0;(!w||!await(o.isElement==null?void 0:o.isElement(k)))&&(w=a.floating[S]||s.floating[g]);const _=C/2-x/2,O=w/2-m[g]/2-1,E=Xn(d[v],O),T=Xn(d[b],O),j=E,B=w-m[g]-T,R=w/2-m[g]/2+_,A=rf(j,R,B),M=!l.arrow&&no(i)!=null&&R!==A&&s.reference[g]/2-(R<j?E:T)-m[g]/2<0,D=M?R<j?R-j:R-B:0;return{[h]:f[h]+D,data:{[h]:A,centerOffset:R-A-D,...M&&{alignmentOffset:D}},reset:M}}}),YT=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...p}=Wi(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=Jr(i),b=Bi(a),S=Jr(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),x=f||(S||!m?[gu(a)]:UT(a)),k=g!=="none";!f&&k&&x.push(...KT(a,m,g,C));const w=[a,...x],_=await ya(t,p),O=[];let E=((r=s.flip)==null?void 0:r.overflows)||[];if(c&&O.push(_[v]),d){const R=HT(i,o,C);O.push(_[R[0]],_[R[1]])}if(E=[...E,{placement:i,overflows:O}],!O.every(R=>R<=0)){var T,j;const R=(((T=s.flip)==null?void 0:T.index)||0)+1,A=w[R];if(A)return{data:{index:R,overflows:E},reset:{placement:A}};let M=(j=E.filter(D=>D.overflows[0]<=0).sort((D,H)=>D.overflows[1]-H.overflows[1])[0])==null?void 0:j.placement;if(!M)switch(h){case"bestFit":{var B;const D=(B=E.filter(H=>{if(k){const Q=Bi(H.placement);return Q===b||Q==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(Q=>Q>0).reduce((Q,F)=>Q+F,0)]).sort((H,Q)=>H[1]-Q[1])[0])==null?void 0:B[0];D&&(M=D);break}case"initialPlacement":M=a;break}if(i!==M)return{reset:{placement:M}}}return{}}}};function rm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function im(e){return BT.some(t=>e[t]>=0)}var XT=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Wi(e,t);switch(r){case"referenceHidden":{const s=await ya(t,{...i,elementContext:"reference"}),o=rm(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:im(o)}}}case"escaped":{const s=await ya(t,{...i,altBoundary:!0}),o=rm(s,n.floating);return{data:{escapedOffsets:o,escaped:im(o)}}}default:return{}}}}};async function ZT(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Jr(n),a=no(n),l=Bi(n)==="y",u=["left","top"].includes(o)?-1:1,c=s&&l?-1:1,d=Wi(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}var JT=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await ZT(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},eM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:p=>{let{x:v,y:b}=p;return{x:v,y:b}}},...l}=Wi(e,t),u={x:n,y:r},c=await ya(t,l),d=Bi(Jr(i)),f=Qb(d);let h=u[f],g=u[d];if(s){const p=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=h+c[p],S=h-c[v];h=rf(b,h,S)}if(o){const p=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=g+c[p],S=g-c[v];g=rf(b,g,S)}const m=a.fn({...t,[f]:h,[d]:g});return{...m,data:{x:m.x-n,y:m.y-r}}}}},tM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:s}=t,{apply:o=()=>{},...a}=Wi(e,t),l=await ya(t,a),u=Jr(n),c=no(n),d=Bi(n)==="y",{width:f,height:h}=r.floating;let g,m;u==="top"||u==="bottom"?(g=u,m=c===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(m=u,g=c==="end"?"top":"bottom");const p=h-l.top-l.bottom,v=f-l.left-l.right,b=Xn(h-l[g],p),S=Xn(f-l[m],v),C=!t.middlewareData.shift;let x=b,k=S;if(d?k=c||C?Xn(S,v):v:x=c||C?Xn(b,p):p,C&&!c){const _=on(l.left,0),O=on(l.right,0),E=on(l.top,0),T=on(l.bottom,0);d?k=f-2*(_!==0||O!==0?_+O:on(l.left,l.right)):x=h-2*(E!==0||T!==0?E+T:on(l.top,l.bottom))}await o({...t,availableWidth:k,availableHeight:x});const w=await i.getDimensions(s.floating);return f!==w.width||h!==w.height?{reset:{rects:!0}}:{}}}};function ro(e){return Xb(e)?(e.nodeName||"").toLowerCase():"#document"}function un(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _r(e){var t;return(t=(Xb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Xb(e){return e instanceof Node||e instanceof un(e).Node}function $n(e){return e instanceof Element||e instanceof un(e).Element}function er(e){return e instanceof HTMLElement||e instanceof un(e).HTMLElement}function sm(e){return typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof un(e).ShadowRoot}function Wa(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Dn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function nM(e){return["table","td","th"].includes(ro(e))}function Ju(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(n){return!1}})}function lh(e){const t=uh(),n=$n(e)?Dn(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function rM(e){let t=ei(e);for(;er(t)&&!Vs(t);){if(lh(t))return t;if(Ju(t))return null;t=ei(t)}return null}function uh(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Vs(e){return["html","body","#document"].includes(ro(e))}function Dn(e){return un(e).getComputedStyle(e)}function ec(e){return $n(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ei(e){if(ro(e)==="html")return e;const t=e.assignedSlot||e.parentNode||sm(e)&&e.host||_r(e);return sm(t)?t.host:t}function Zb(e){const t=ei(e);return Vs(t)?e.ownerDocument?e.ownerDocument.body:e.body:er(t)&&Wa(t)?t:Zb(t)}function ma(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Zb(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=un(i);return s?t.concat(o,o.visualViewport||[],Wa(i)?i:[],o.frameElement&&n?ma(o.frameElement):[]):t.concat(i,ma(i,[],n))}function Jb(e){const t=Dn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=er(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=hu(n)!==s||hu(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function ch(e){return $n(e)?e:e.contextElement}function ds(e){const t=ch(e);if(!er(t))return Zr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=Jb(t);let o=(s?hu(n.width):n.width)/r,a=(s?hu(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var iM=Zr(0);function e1(e){const t=un(e);return!uh()||!t.visualViewport?iM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==un(e)?!1:t}function qi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=ch(e);let o=Zr(1);t&&(r?$n(r)&&(o=ds(r)):o=ds(e));const a=sM(s,n,r)?e1(s):Zr(0);let l=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,c=i.width/o.x,d=i.height/o.y;if(s){const f=un(s),h=r&&$n(r)?un(r):r;let g=f,m=g.frameElement;for(;m&&r&&h!==g;){const p=ds(m),v=m.getBoundingClientRect(),b=Dn(m),S=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*p.x,C=v.top+(m.clientTop+parseFloat(b.paddingTop))*p.y;l*=p.x,u*=p.y,c*=p.x,d*=p.y,l+=S,u+=C,g=un(m),m=g.frameElement}}return yu({width:c,height:d,x:l,y:u})}function oM(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=_r(r),a=t?Ju(t.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=Zr(1);const c=Zr(0),d=er(r);if((d||!d&&!s)&&((ro(r)!=="body"||Wa(o))&&(l=ec(r)),er(r))){const f=qi(r);u=ds(r),c.x=f.x+r.clientLeft,c.y=f.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}}function aM(e){return Array.from(e.getClientRects())}function t1(e){return qi(_r(e)).left+ec(e).scrollLeft}function lM(e){const t=_r(e),n=ec(e),r=e.ownerDocument.body,i=on(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=on(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+t1(e);const a=-n.scrollTop;return Dn(r).direction==="rtl"&&(o+=on(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function uM(e,t){const n=un(e),r=_r(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=uh();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function cM(e,t){const n=qi(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=er(e)?ds(e):Zr(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:o,height:a,x:l,y:u}}function om(e,t,n){let r;if(t==="viewport")r=uM(e,n);else if(t==="document")r=lM(_r(e));else if($n(t))r=cM(t,n);else{const i=e1(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return yu(r)}function n1(e,t){const n=ei(e);return n===t||!$n(n)||Vs(n)?!1:Dn(n).position==="fixed"||n1(n,t)}function dM(e,t){const n=t.get(e);if(n)return n;let r=ma(e,[],!1).filter(a=>$n(a)&&ro(a)!=="body"),i=null;const s=Dn(e).position==="fixed";let o=s?ei(e):e;for(;$n(o)&&!Vs(o);){const a=Dn(o),l=lh(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Wa(o)&&!l&&n1(e,o))?r=r.filter(c=>c!==o):i=a,o=ei(o)}return t.set(e,r),r}function fM(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Ju(t)?[]:dM(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,c)=>{const d=om(t,c,i);return u.top=on(d.top,u.top),u.right=Xn(d.right,u.right),u.bottom=Xn(d.bottom,u.bottom),u.left=on(d.left,u.left),u},om(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function hM(e){const{width:t,height:n}=Jb(e);return{width:t,height:n}}function gM(e,t,n){const r=er(t),i=_r(t),s=n==="fixed",o=qi(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Zr(0);if(r||!r&&!s)if((ro(t)!=="body"||Wa(i))&&(a=ec(t)),r){const d=qi(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&(l.x=t1(i));const u=o.left+a.scrollLeft-l.x,c=o.top+a.scrollTop-l.y;return{x:u,y:c,width:o.width,height:o.height}}function Uc(e){return Dn(e).position==="static"}function am(e,t){return!er(e)||Dn(e).position==="fixed"?null:t?t(e):e.offsetParent}function r1(e,t){const n=un(e);if(Ju(e))return n;if(!er(e)){let i=ei(e);for(;i&&!Vs(i);){if($n(i)&&!Uc(i))return i;i=ei(i)}return n}let r=am(e,t);for(;r&&nM(r)&&Uc(r);)r=am(r,t);return r&&Vs(r)&&Uc(r)&&!lh(r)?n:r||rM(e)||n}var yM=async function(e){const t=this.getOffsetParent||r1,n=this.getDimensions,r=await n(e.floating);return{reference:gM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function mM(e){return Dn(e).direction==="rtl"}var i1={convertOffsetParentRelativeRectToViewportRelativeRect:oM,getDocumentElement:_r,getClippingRect:fM,getOffsetParent:r1,getElementRects:yM,getClientRects:aM,getDimensions:hM,getScale:ds,isElement:$n,isRTL:mM};function pM(e,t){let n=null,r;const i=_r(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=_l(c),g=_l(i.clientWidth-(u+d)),m=_l(i.clientHeight-(c+f)),p=_l(u),b={rootMargin:-h+"px "+-g+"px "+-m+"px "+-p+"px",threshold:on(0,Xn(1,l))||1};let S=!0;function C(x){const k=x[0].intersectionRatio;if(k!==l){if(!S)return o();k?o(!1,k):r=setTimeout(()=>{o(!1,1e-7)},1e3)}S=!1}try{n=new IntersectionObserver(C,{...b,root:i.ownerDocument})}catch(x){n=new IntersectionObserver(C,b)}n.observe(e)}return o(!0),s}function vM(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=ch(e),c=i||s?[...u?ma(u):[],...ma(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=u&&a?pM(u,n):null;let f=-1,h=null;o&&(h=new ResizeObserver(v=>{let[b]=v;b&&b.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let g,m=l?qi(e):null;l&&p();function p(){const v=qi(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,g=requestAnimationFrame(p)}return n(),()=>{var v;c.forEach(b=>{i&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(g)}}var bM=JT,xM=eM,wM=YT,SM=tM,CM=XT,_M=QT,kM=(e,t,n)=>{const r=new Map,i={platform:i1,...n},s={...i.platform,_c:r};return WT(e,t,{...i,platform:s})},dh=wt();function fh(){const e=St(dh);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var OM=he('<svg display="block" viewBox="0 0 30 30" style="transform:scale(1.02)"><g><path fill="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z"></path><path stroke="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z">'),of=30,lm=of/2,EM={top:180,right:-90,bottom:0,left:90};function hh(e){const t=fh(),n=Re({size:of},e),[r,i]=Ve(n,["ref","style","size"]),s=()=>t.currentPlacement().split("-")[0],o=AM(t.contentRef),a=()=>{var f;return((f=o())==null?void 0:f.getPropertyValue("background-color"))||"none"},l=()=>{var f;return((f=o())==null?void 0:f.getPropertyValue(`border-${s()}-color`))||"none"},u=()=>{var f;return((f=o())==null?void 0:f.getPropertyValue(`border-${s()}-width`))||"0px"},c=()=>Number.parseInt(u())*2*(of/r.size),d=()=>`rotate(${EM[s()]} ${lm} ${lm}) translate(0 2)`;return L(st,Ae({as:"div",ref(f){const h=It(t.setArrowRef,r.ref);typeof h=="function"&&h(f)},"aria-hidden":"true",get style(){return Qu({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:a(),stroke:l(),"stroke-width":c()},r.style)}},i,{get children(){const f=OM(),h=f.firstChild;return be(()=>re(h,"transform",d())),f}}))}function AM(e){const[t,n]=ce();return xe(()=>{const r=e();r&&n(EP(r).getComputedStyle(r))}),t}function PM(e){const t=fh(),[n,r]=Ve(e,["ref","style"]);return L(st,Ae({as:"div",ref(i){const s=It(t.setPositionerRef,n.ref);typeof s=="function"&&s(i)},"data-popper-positioner":"",get style(){return Qu({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function um(e){const{x:t=0,y:n=0,width:r=0,height:i=0}=e!=null?e:{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,i);const s={x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:n+i,left:t};return{...s,toJSON:()=>s}}function TM(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?um(r):e?e.getBoundingClientRect():um()}}}function MM(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var jM={top:"bottom",right:"left",bottom:"top",left:"right"};function $M(e,t){const[n,r]=e.split("-"),i=jM[n];return r?n==="left"||n==="right"?`${i} ${r==="start"?"top":"bottom"}`:r==="start"?`${i} ${t==="rtl"?"right":"left"}`:`${i} ${t==="rtl"?"left":"right"}`:`${i} center`}function DM(e){const t=Re({getAnchorRect:f=>f==null?void 0:f.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=ce(),[i,s]=ce(),[o,a]=ce(t.placement),l=()=>{var f;return TM((f=t.anchorRef)==null?void 0:f.call(t),t.getAnchorRect)},{direction:u}=ii();async function c(){var k,w,_;const f=l(),h=n(),g=i();if(!f||!h)return;const m=((g==null?void 0:g.clientHeight)||0)/2,p=typeof t.gutter=="number"?t.gutter+m:(k=t.gutter)!=null?k:m;h.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),f.getBoundingClientRect();const v=[bM(({placement:O})=>{const E=!!O.split("-")[1];return{mainAxis:p,crossAxis:E?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const O=typeof t.flip=="string"?t.flip.split(" "):void 0;if(O!==void 0&&!O.every(MM))throw new Error("`flip` expects a spaced-delimited list of placements");v.push(wM({padding:t.overflowPadding,fallbackPlacements:O}))}(t.slide||t.overlap)&&v.push(xM({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),v.push(SM({padding:t.overflowPadding,apply({availableWidth:O,availableHeight:E,rects:T}){const j=Math.round(T.reference.width);O=Math.floor(O),E=Math.floor(E),h.style.setProperty("--kb-popper-anchor-width",`${j}px`),h.style.setProperty("--kb-popper-content-available-width",`${O}px`),h.style.setProperty("--kb-popper-content-available-height",`${E}px`),t.sameWidth&&(h.style.width=`${j}px`),t.fitViewport&&(h.style.maxWidth=`${O}px`,h.style.maxHeight=`${E}px`)}})),t.hideWhenDetached&&v.push(CM({padding:t.detachedPadding})),g&&v.push(_M({element:g,padding:t.arrowPadding}));const b=await kM(f,h,{placement:t.placement,strategy:"absolute",middleware:v,platform:{...i1,isRTL:()=>u()==="rtl"}});if(a(b.placement),(w=t.onCurrentPlacementChange)==null||w.call(t,b.placement),!h)return;h.style.setProperty("--kb-popper-content-transform-origin",$M(b.placement,u()));const S=Math.round(b.x),C=Math.round(b.y);let x;if(t.hideWhenDetached&&(x=(_=b.middlewareData.hide)!=null&&_.referenceHidden?"hidden":"visible"),Object.assign(h.style,{top:"0",left:"0",transform:`translate3d(${S}px, ${C}px, 0)`,visibility:x}),g&&b.middlewareData.arrow){const{x:O,y:E}=b.middlewareData.arrow,T=b.placement.split("-")[0];Object.assign(g.style,{left:O!=null?`${O}px`:"",top:E!=null?`${E}px`:"",[T]:"100%"})}}xe(()=>{const f=l(),h=n();if(!f||!h)return;const g=vM(f,h,c,{elementResize:typeof ResizeObserver=="function"});_e(g)}),xe(()=>{var g;const f=n(),h=(g=t.contentRef)==null?void 0:g.call(t);!f||!h||queueMicrotask(()=>{f.style.zIndex=getComputedStyle(h).zIndex})});const d={currentPlacement:o,contentRef:()=>{var f;return(f=t.contentRef)==null?void 0:f.call(t)},setPositionerRef:r,setArrowRef:s};return L(dh.Provider,{value:d,get children(){return t.children}})}var s1=Object.assign(DM,{Arrow:hh,Context:dh,usePopperContext:fh,Positioner:PM});function LM(e){const t=n=>{var r;n.key===eh.Escape&&((r=e.onEscapeKeyDown)==null||r.call(e,n))};xe(()=>{var r,i;if(X(e.isDisabled))return;const n=(i=(r=e.ownerDocument)==null?void 0:r.call(e))!=null?i:Jn();n.addEventListener("keydown",t),_e(()=>{n.removeEventListener("keydown",t)})})}var cm="interactOutside.pointerDownOutside",dm="interactOutside.focusOutside";function IM(e,t){let n,r=HP;const i=()=>Jn(t()),s=d=>{var f;return(f=e.onPointerDownOutside)==null?void 0:f.call(e,d)},o=d=>{var f;return(f=e.onFocusOutside)==null?void 0:f.call(e,d)},a=d=>{var f;return(f=e.onInteractOutside)==null?void 0:f.call(e,d)},l=d=>{var h;const f=d.target;return!(f instanceof HTMLElement)||f.closest(`[${fu}]`)||!wn(i(),f)||wn(t(),f)?!1:!((h=e.shouldExcludeElement)!=null&&h.call(e,f))},u=d=>{function f(){const h=t(),g=d.target;if(!h||!g||!l(d))return;const m=vt([s,a]);g.addEventListener(cm,m,{once:!0});const p=new CustomEvent(cm,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||jP(d)&&d.button===0}});g.dispatchEvent(p)}d.pointerType==="touch"?(i().removeEventListener("click",f),r=f,i().addEventListener("click",f,{once:!0})):f()},c=d=>{const f=t(),h=d.target;if(!f||!h||!l(d))return;const g=vt([o,a]);h.addEventListener(dm,g,{once:!0});const m=new CustomEvent(dm,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});h.dispatchEvent(m)};xe(()=>{X(e.isDisabled)||(n=window.setTimeout(()=>{i().addEventListener("pointerdown",u,!0)},0),i().addEventListener("focusin",c,!0),_e(()=>{window.clearTimeout(n),i().removeEventListener("click",r),i().removeEventListener("pointerdown",u,!0),i().removeEventListener("focusin",c,!0)}))})}var o1=wt();function RM(){return St(o1)}function NM(e){let t;const n=RM(),[r,i]=Ve(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),s=new Set([]),o=d=>{s.add(d);const f=n==null?void 0:n.registerNestedLayer(d);return()=>{s.delete(d),f==null||f()}};IM({shouldExcludeElement:d=>{var f;return t?((f=r.excludedElements)==null?void 0:f.some(h=>wn(h(),d)))||[...s].some(h=>wn(h,d)):!1},onPointerDownOutside:d=>{var f,h,g;!t||Wt.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!Wt.isTopMostLayer(t)||((f=r.onPointerDownOutside)==null||f.call(r,d),(h=r.onInteractOutside)==null||h.call(r,d),d.defaultPrevented||(g=r.onDismiss)==null||g.call(r))},onFocusOutside:d=>{var f,h,g;(f=r.onFocusOutside)==null||f.call(r,d),(h=r.onInteractOutside)==null||h.call(r,d),d.defaultPrevented||(g=r.onDismiss)==null||g.call(r)}},()=>t),LM({ownerDocument:()=>Jn(t),onEscapeKeyDown:d=>{var f;!t||!Wt.isTopMostLayer(t)||((f=r.onEscapeKeyDown)==null||f.call(r,d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),xr(()=>{if(!t)return;Wt.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n==null?void 0:n.registerNestedLayer(t);Wt.assignPointerEventToLayers(),Wt.disableBodyPointerEvents(t),_e(()=>{t&&(Wt.removeLayer(t),d==null||d(),Wt.assignPointerEventToLayers(),Wt.restoreBodyPointerEvents(t))})}),xe(br([()=>t,()=>r.disableOutsidePointerEvents],([d,f])=>{if(!d)return;const h=Wt.find(d);h&&h.isPointerBlocking!==f&&(h.isPointerBlocking=f,Wt.assignPointerEventToLayers()),f&&Wt.disableBodyPointerEvents(d),_e(()=>{Wt.restoreBodyPointerEvents(d)})},{defer:!0}));const c={registerNestedLayer:o};return L(o1.Provider,{value:c,get children(){return L(st,Ae({as:"div",ref(d){const f=It(h=>t=h,r.ref);typeof f=="function"&&f(d)}},i))}})}function a1(e={}){const[t,n]=Lb({value:()=>X(e.open),defaultValue:()=>!!X(e.defaultOpen),onChange:o=>{var a;return(a=e.onOpenChange)==null?void 0:a.call(e,o)}}),r=()=>{n(!0)},i=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:i,toggle:()=>{t()?i():r()}}}var mn={};Zu(mn,{Description:()=>$b,ErrorMessage:()=>Db,Item:()=>d1,ItemControl:()=>f1,ItemDescription:()=>h1,ItemIndicator:()=>g1,ItemInput:()=>y1,ItemLabel:()=>m1,Label:()=>p1,RadioGroup:()=>FM,Root:()=>v1});var l1=wt();function u1(){const e=St(l1);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var c1=wt();function Qa(){const e=St(c1);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function d1(e){const t=Ka(),n=u1(),r=`${t.generateId("item")}-${kn()}`,i=Re({id:r},e),[s,o]=Ve(i,["value","disabled","onPointerDown"]),[a,l]=ce(),[u,c]=ce(),[d,f]=ce(),[h,g]=ce(),[m,p]=ce(!1),v=U(()=>n.isSelectedValue(s.value)),b=U(()=>s.disabled||t.isDisabled()||!1),S=k=>{nt(k,s.onPointerDown),m()&&k.preventDefault()},C=U(()=>({...t.dataset(),"data-disabled":b()?"":void 0,"data-checked":v()?"":void 0})),x={value:()=>s.value,dataset:C,isSelected:v,isDisabled:b,inputId:a,labelId:u,descriptionId:d,inputRef:h,select:()=>n.setSelectedValue(s.value),generateId:Ga(()=>o.id),registerInput:Sn(l),registerLabel:Sn(c),registerDescription:Sn(f),setIsFocused:p,setInputRef:g};return L(c1.Provider,{value:x,get children(){return L(st,Ae({as:"div",role:"group",onPointerDown:S},C,o))}})}function f1(e){const t=Qa(),n=Re({id:t.generateId("control")},e),[r,i]=Ve(n,["onClick","onKeyDown"]);return L(st,Ae({as:"div",onClick:a=>{var l;nt(a,r.onClick),t.select(),(l=t.inputRef())==null||l.focus()},onKeyDown:a=>{var l;nt(a,r.onKeyDown),a.key===eh.Space&&(t.select(),(l=t.inputRef())==null||l.focus())}},()=>t.dataset(),i))}function h1(e){const t=Qa(),n=Re({id:t.generateId("description")},e);return xe(()=>_e(t.registerDescription(n.id))),L(st,Ae({as:"div"},()=>t.dataset(),n))}function g1(e){const t=Qa(),n=Re({id:t.generateId("indicator")},e),[r,i]=Ve(n,["ref","forceMount"]),[s,o]=ce(),{present:a}=Gb({show:()=>r.forceMount||t.isSelected(),element:()=>{var l;return(l=s())!=null?l:null}});return L(ve,{get when(){return a()},get children(){return L(st,Ae({as:"div",ref(l){const u=It(o,r.ref);typeof u=="function"&&u(l)}},()=>t.dataset(),i))}})}function y1(e){const t=Ka(),n=u1(),r=Qa(),i=Re({id:r.generateId("input")},e),[s,o]=Ve(i,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),a=()=>[s["aria-labelledby"],r.labelId(),s["aria-labelledby"]!=null&&o["aria-label"]!=null?o.id:void 0].filter(Boolean).join(" ")||void 0,l=()=>[s["aria-describedby"],r.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0,[u,c]=ce(!1),d=g=>{if(nt(g,s.onChange),g.stopPropagation(),!u()){n.setSelectedValue(r.value());const m=g.target;m.checked=r.isSelected()}c(!1)},f=g=>{nt(g,s.onFocus),r.setIsFocused(!0)},h=g=>{nt(g,s.onBlur),r.setIsFocused(!1)};return xe(br([()=>r.isSelected(),()=>r.value()],g=>{if(!g[0]&&g[1]===r.value())return;c(!0);const m=r.inputRef();m==null||m.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),m==null||m.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),xe(()=>_e(r.registerInput(o.id))),L(st,Ae({as:"input",ref(g){const m=It(r.setInputRef,s.ref);typeof m=="function"&&m(g)},type:"radio",get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return Qu({...Mb},s.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return l()},onChange:d,onFocus:f,onBlur:h},()=>r.dataset(),o))}function m1(e){const t=Qa(),n=Re({id:t.generateId("label")},e);return xe(()=>_e(t.registerLabel(n.id))),L(st,Ae({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function p1(e){return L(WP,Ae({as:"span"},e))}function v1(e){let t;const n=`radiogroup-${kn()}`,r=Re({id:n,orientation:"vertical"},e),[i,s,o]=Ve(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],KP),[a,l]=Va({value:()=>i.value,defaultValue:()=>i.defaultValue,onChange:g=>{var m;return(m=i.onChange)==null?void 0:m.call(i,g)}}),{formControlContext:u}=VP(s);QP(()=>t,()=>{var g;return l((g=i.defaultValue)!=null?g:"")});const c=()=>u.getAriaLabelledBy(X(s.id),o["aria-label"],i["aria-labelledby"]),d=()=>u.getAriaDescribedBy(i["aria-describedby"]),f=g=>g===a(),h={ariaDescribedBy:d,isSelectedValue:f,setSelectedValue:g=>{if(!(u.isReadOnly()||u.isDisabled())&&(l(g),t))for(const m of t.querySelectorAll("[type='radio']")){const p=m;p.checked=f(p.value)}}};return L(jb.Provider,{value:u,get children(){return L(l1.Provider,{value:h,get children(){return L(st,Ae({as:"div",ref(g){const m=It(p=>t=p,i.ref);typeof m=="function"&&m(g)},role:"radiogroup",get id(){return X(s.id)},get"aria-invalid"(){return u.validationState()==="invalid"||void 0},get"aria-required"(){return u.isRequired()||void 0},get"aria-disabled"(){return u.isDisabled()||void 0},get"aria-readonly"(){return u.isReadOnly()||void 0},get"aria-orientation"(){return i.orientation},get"aria-labelledby"(){return c()},get"aria-describedby"(){return d()}},()=>u.dataset(),o))}})}})}var FM=Object.assign(v1,{Description:$b,ErrorMessage:Db,Item:d1,ItemControl:f1,ItemDescription:h1,ItemIndicator:g1,ItemInput:y1,ItemLabel:m1,Label:p1}),BM=class{constructor(e,t,n){pe(this,"collection");pe(this,"ref");pe(this,"collator");this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){var t,n,r;return(r=(n=(t=this.ref)==null?void 0:t.call(this))==null?void 0:n.querySelector(`[data-key="${e}"]`))!=null?r:null}getKeyPageAbove(e){var s;const t=(s=this.ref)==null?void 0:s.call(this);let n=this.getItem(e);if(!t||!n)return;const r=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight);let i=e;for(;i&&n&&n.offsetTop>r;)i=this.getKeyAbove(i),n=i!=null?this.getItem(i):null;return i}getKeyPageBelow(e){var s;const t=(s=this.ref)==null?void 0:s.call(this);let n=this.getItem(e);if(!t||!n)return;const r=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight);let i=e;for(;i&&n&&n.offsetTop<r;)i=this.getKeyBelow(i),n=i!=null?this.getItem(i):null;return i}getKeyForSearch(e,t){var i;const n=(i=this.collator)==null?void 0:i.call(this);if(!n)return;let r=t!=null?this.getKeyBelow(t):this.getFirstKey();for(;r!=null;){const s=this.collection().getItem(r);if(s){const o=s.textValue.slice(0,e.length);if(s.textValue&&n.compare(o,e)===0)return r}r=this.getKeyBelow(r)}}};function qM(e,t,n){const r=mT({usage:"search",sensitivity:"base"}),i=U(()=>{const s=X(e.keyboardDelegate);return s||new BM(e.collection,t,r)});return CT({selectionManager:()=>X(e.selectionManager),keyboardDelegate:i,autoFocus:()=>X(e.autoFocus),deferAutoFocus:()=>X(e.deferAutoFocus),shouldFocusWrap:()=>X(e.shouldFocusWrap),disallowEmptySelection:()=>X(e.disallowEmptySelection),selectOnFocus:()=>X(e.selectOnFocus),disallowTypeAhead:()=>X(e.disallowTypeAhead),shouldUseVirtualFocus:()=>X(e.shouldUseVirtualFocus),allowsTabNavigation:()=>X(e.allowsTabNavigation),isVirtualized:()=>X(e.isVirtualized),scrollToKey:s=>{var o;return(o=X(e.scrollToKey))==null?void 0:o(s)},orientation:()=>X(e.orientation)},t)}var Gc="focusScope.autoFocusOnMount",Kc="focusScope.autoFocusOnUnmount",fm={bubbles:!1,cancelable:!0},hm={stack:[],active(){return this.stack[0]},add(e){var t;e!==this.active()&&((t=this.active())==null||t.pause()),this.stack=Jd(this.stack,e),this.stack.unshift(e)},remove(e){var t;this.stack=Jd(this.stack,e),(t=this.active())==null||t.resume()}};function zM(e,t){const[n,r]=ce(!1),i={pause(){r(!0)},resume(){r(!1)}};let s=null;const o=g=>{var m;return(m=e.onMountAutoFocus)==null?void 0:m.call(e,g)},a=g=>{var m;return(m=e.onUnmountAutoFocus)==null?void 0:m.call(e,g)},l=()=>Jn(t()),u=()=>{const g=l().createElement("span");return g.setAttribute("data-focus-trap",""),g.tabIndex=0,Object.assign(g.style,Mb),g},c=()=>{const g=t();return g?Pb(g,!0).filter(m=>!m.hasAttribute("data-focus-trap")):[]},d=()=>{const g=c();return g.length>0?g[0]:null},f=()=>{const g=c();return g.length>0?g[g.length-1]:null},h=()=>{const g=t();if(!g)return!1;const m=Io(g);return!m||wn(g,m)?!1:Tb(m)};xe(()=>{const g=t();if(!g)return;hm.add(i);const m=Io(g);if(!wn(g,m)){const v=new CustomEvent(Gc,fm);g.addEventListener(Gc,o),g.dispatchEvent(v),v.defaultPrevented||setTimeout(()=>{At(d()),Io(g)===m&&At(g)},0)}_e(()=>{g.removeEventListener(Gc,o),setTimeout(()=>{const v=new CustomEvent(Kc,fm);h()&&v.preventDefault(),g.addEventListener(Kc,a),g.dispatchEvent(v),v.defaultPrevented||At(m!=null?m:l().body),g.removeEventListener(Kc,a),hm.remove(i)},0)})}),xe(()=>{const g=t();if(!g||!X(e.trapFocus)||n())return;const m=v=>{const b=v.target;b!=null&&b.closest(`[${fu}]`)||(wn(g,b)?s=b:At(s))},p=v=>{const b=v.relatedTarget,S=b!=null?b:Io(g);S!=null&&S.closest(`[${fu}]`)||wn(g,S)||At(s)};l().addEventListener("focusin",m),l().addEventListener("focusout",p),_e(()=>{l().removeEventListener("focusin",m),l().removeEventListener("focusout",p)})}),xe(()=>{const g=t();if(!g||!X(e.trapFocus)||n())return;const m=u();g.insertAdjacentElement("afterbegin",m);const p=u();g.insertAdjacentElement("beforeend",p);function v(S){const C=d(),x=f();S.relatedTarget===C?At(x):At(C)}m.addEventListener("focusin",v),p.addEventListener("focusin",v);const b=new MutationObserver(S=>{for(const C of S)C.previousSibling===p&&(p.remove(),g.insertAdjacentElement("beforeend",p)),C.nextSibling===m&&(m.remove(),g.insertAdjacentElement("afterbegin",m))});b.observe(g,{childList:!0,subtree:!1}),_e(()=>{m.removeEventListener("focusin",v),p.removeEventListener("focusin",v),m.remove(),p.remove(),b.disconnect()})})}var HM="data-live-announcer";function UM(e){xe(()=>{X(e.isDisabled)||_e(GM(X(e.targets),X(e.root)))})}var _o=new WeakMap,yn=[];function GM(e,t=document.body){const n=new Set(e),r=new Set,i=l=>{for(const f of l.querySelectorAll(`[${HM}], [${fu}]`))n.add(f);const u=f=>{if(n.has(f)||f.parentElement&&r.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const h of n)if(f.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),d=u(l);if(d===NodeFilter.FILTER_ACCEPT&&s(l),d!==NodeFilter.FILTER_REJECT){let f=c.nextNode();for(;f!=null;)s(f),f=c.nextNode()}},s=l=>{var c;const u=(c=_o.get(l))!=null?c:0;l.getAttribute("aria-hidden")==="true"&&u===0||(u===0&&l.setAttribute("aria-hidden","true"),r.add(l),_o.set(l,u+1))};yn.length&&yn[yn.length-1].disconnect(),i(t);const o=new MutationObserver(l=>{for(const u of l)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...n,...r].some(c=>c.contains(u.target))){for(const c of u.removedNodes)c instanceof Element&&(n.delete(c),r.delete(c));for(const c of u.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?n.add(c):c instanceof Element&&i(c)}});o.observe(t,{childList:!0,subtree:!0});const a={observe(){o.observe(t,{childList:!0,subtree:!0})},disconnect(){o.disconnect()}};return yn.push(a),()=>{o.disconnect();for(const l of r){const u=_o.get(l);if(u==null)return;u===1?(l.removeAttribute("aria-hidden"),_o.delete(l)):_o.set(l,u-1)}a===yn[yn.length-1]?(yn.pop(),yn.length&&yn[yn.length-1].observe()):yn.splice(yn.indexOf(a),1)}}var kl=new Map,KM=e=>{xe(()=>{var s,o;const t=(s=Et(e.style))!=null?s:{},n=(o=Et(e.properties))!=null?o:[],r={};for(const a in t)r[a]=e.element.style[a];const i=kl.get(e.key);i?i.activeCount++:kl.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(a=>a.key)}),Object.assign(e.element.style,e.style);for(const a of n)e.element.style.setProperty(a.key,a.value);_e(()=>{var l;const a=kl.get(e.key);if(a){if(a.activeCount!==1){a.activeCount--;return}kl.delete(e.key);for(const[u,c]of Object.entries(a.originalStyles))e.element.style[u]=c;for(const u of a.properties)e.element.style.removeProperty(u);e.element.style.length===0&&e.element.removeAttribute("style"),(l=e.cleanup)==null||l.call(e)}})})},gm=KM,VM=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},WM=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},QM=(e,t,n)=>{var l;const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let i=e,s=0,o=0,a=!1;do{const[u,c,d]=VM(i,t),f=d-u-r*c;(c!==0||f!==0)&&WM(i,t)&&(s+=f,o+=c),i===(n!=null?n:document.documentElement)?a=!0:i=(l=i._$host)!=null?l:i.parentElement}while(i&&!a);return[s,o]},[ym,mm]=ce([]),YM=e=>ym().indexOf(e)===ym().length-1,XM=e=>{const t=Ae({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=kn();let r=[0,0],i=null,s=null;xe(()=>{Et(t.enabled)&&(mm(u=>[...u,n]),_e(()=>{mm(u=>u.filter(c=>c!==n))}))}),xe(()=>{if(!Et(t.enabled)||!Et(t.hideScrollbar))return;const{body:u}=document,c=window.innerWidth-u.offsetWidth;if(Et(t.preventScrollbarShift)){const d={overflow:"hidden"},f=[];c>0&&(Et(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(u).paddingRight} + ${c}px)`:d.marginRight=`calc(${window.getComputedStyle(u).marginRight} + ${c}px)`,f.push({key:"--scrollbar-width",value:`${c}px`}));const h=window.scrollY,g=window.scrollX;gm({key:"prevent-scroll",element:u,style:d,properties:f,cleanup:()=>{Et(t.restoreScrollPosition)&&c>0&&window.scrollTo(g,h)}})}else gm({key:"prevent-scroll",element:u,style:{overflow:"hidden"}})}),xe(()=>{!YM(n)||!Et(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",o,{passive:!1}),document.addEventListener("touchmove",l,{passive:!1}),_e(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",o),document.removeEventListener("touchmove",l)}))});const o=u=>{r=pm(u),i=null,s=null},a=u=>{const c=u.target,d=Et(t.element),f=ZM(u),h=Math.abs(f[0])>Math.abs(f[1])?"x":"y",g=h==="x"?f[0]:f[1],m=vm(c,h,g,d);let p;d&&af(d,c)?p=!m:p=!0,p&&u.cancelable&&u.preventDefault()},l=u=>{const c=Et(t.element),d=u.target;let f;if(u.touches.length===2)f=!Et(t.allowPinchZoom);else{if(i==null||s===null){const h=pm(u).map((m,p)=>r[p]-m),g=Math.abs(h[0])>Math.abs(h[1])?"x":"y";i=g,s=g==="x"?h[0]:h[1]}if(d.type==="range")f=!1;else{const h=vm(d,i,s,c);c&&af(c,d)?f=!h:f=!0}}f&&u.cancelable&&u.preventDefault()}},ZM=e=>[e.deltaX,e.deltaY],pm=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],vm=(e,t,n,r)=>{const i=r!==null&&af(r,e),[s,o]=QM(e,t,i?r:void 0);return!(n>0&&Math.abs(s)<=1||n<0&&Math.abs(o)<1)},af=(e,t)=>{var r;if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=(r=n._$host)!=null?r:n.parentElement}return!1},JM=XM,ej=JM,b1=wt();function x1(){return St(b1)}function kr(){const e=x1();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var w1=wt();function gh(){const e=St(w1);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var S1=wt();function tr(){const e=St(S1);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function yh(e){let t;const n=tr(),r=kr(),i=Re({id:n.generateId(`item-${kn()}`)},e),[s,o]=Ve(i,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,l]=ce(),[u,c]=ce(),[d,f]=ce(),h=()=>r.listState().selectionManager(),g=()=>o.id,m=()=>h().focusedKey()===g(),p=()=>{var O;(O=s.onSelect)==null||O.call(s),s.closeOnSelect&&setTimeout(()=>{r.close(!0)})};lT({getItem:()=>{var O,E,T,j,B;return{ref:()=>t,type:"item",key:g(),textValue:(j=(T=(E=s.textValue)!=null?E:(O=d())==null?void 0:O.textContent)!=null?T:t==null?void 0:t.textContent)!=null?j:"",disabled:(B=s.disabled)!=null?B:!1}}});const v=Ub({key:g,selectionManager:h,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>s.disabled},()=>t),b=O=>{nt(O,s.onPointerMove),O.pointerType==="mouse"&&(s.disabled?r.onItemLeave(O):(r.onItemEnter(O),O.defaultPrevented||(At(O.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(g()))))},S=O=>{nt(O,s.onPointerLeave),O.pointerType==="mouse"&&r.onItemLeave(O)},C=O=>{nt(O,s.onPointerUp),!s.disabled&&O.button===0&&p()},x=O=>{if(nt(O,s.onKeyDown),!O.repeat&&!s.disabled)switch(O.key){case"Enter":case" ":p();break}},k=U(()=>{if(s.indeterminate)return"mixed";if(s.checked!=null)return s.checked}),w=U(()=>({"data-indeterminate":s.indeterminate?"":void 0,"data-checked":s.checked&&!s.indeterminate?"":void 0,"data-disabled":s.disabled?"":void 0,"data-highlighted":m()?"":void 0})),_={isChecked:()=>s.checked,dataset:w,setLabelRef:f,generateId:Ga(()=>o.id),registerLabel:Sn(l),registerDescription:Sn(c)};return L(w1.Provider,{value:_,get children(){return L(st,Ae({as:"div",ref(O){const E=It(T=>t=T,s.ref);typeof E=="function"&&E(O)},get tabIndex(){return v.tabIndex()},get"aria-checked"(){return k()},get"aria-disabled"(){return s.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return u()},get"data-key"(){return v.dataKey()},get onPointerDown(){return vt([s.onPointerDown,v.onPointerDown])},get onPointerUp(){return vt([C,v.onPointerUp])},get onClick(){return vt([s.onClick,v.onClick])},get onKeyDown(){return vt([x,v.onKeyDown])},get onMouseDown(){return vt([s.onMouseDown,v.onMouseDown])},get onFocus(){return vt([s.onFocus,v.onFocus])},onPointerMove:b,onPointerLeave:S},w,o))}})}function C1(e){const t=Re({closeOnSelect:!1},e),[n,r]=Ve(t,["checked","defaultChecked","onChange","onSelect"]),i=JP({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:o=>{var a;return(a=n.onChange)==null?void 0:a.call(n,o)},isDisabled:()=>r.disabled});return L(yh,Ae({role:"menuitemcheckbox",get checked(){return i.isSelected()},onSelect:()=>{var o;(o=n.onSelect)==null||o.call(n),i.toggle()}},r))}var tj=wt();function tc(){return St(tj)}var pa={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>pa.next(e==="ltr"?"rtl":"ltr",t)},bm={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function _1(e){const t=tr(),n=kr(),r=tc(),{direction:i}=ii(),s=Re({id:t.generateId("trigger")},e),[o,a]=Ve(s,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let l=()=>t.value();r!==void 0&&(l=()=>{var v;return(v=t.value())!=null?v:o.id},r.lastValue()===void 0&&r.setLastValue(l));const u=Xu(()=>n.triggerRef(),()=>"button"),c=U(()=>{var v;return u()==="a"&&((v=n.triggerRef())==null?void 0:v.getAttribute("href"))!=null});xe(br(()=>r==null?void 0:r.value(),v=>{var b;c()&&v===l()&&((b=n.triggerRef())==null||b.focus())}));const d=()=>{r!==void 0?n.isOpen()?r.value()===l()&&r.closeMenu():(r.autoFocusMenu()||r.setAutoFocusMenu(!0),n.open(!1)):n.toggle(!0)},f=v=>{nt(v,o.onPointerDown),v.currentTarget.dataset.pointerType=v.pointerType,!o.disabled&&v.pointerType!=="touch"&&v.button===0&&d()},h=v=>{nt(v,o.onClick),o.disabled||v.currentTarget.dataset.pointerType==="touch"&&d()},g=v=>{if(nt(v,o.onKeyDown),!o.disabled){if(c())switch(v.key){case"Enter":case" ":return}switch(v.key){case"Enter":case" ":case bm.first(t.orientation()):v.stopPropagation(),v.preventDefault(),GP(v.currentTarget),n.open("first"),r==null||r.setAutoFocusMenu(!0),r==null||r.setValue(l);break;case bm.last(t.orientation()):v.stopPropagation(),v.preventDefault(),n.open("last");break;case pa.next(i(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.nextMenu();break;case pa.previous(i(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.previousMenu();break}}},m=v=>{var b;nt(v,o.onMouseOver),((b=n.triggerRef())==null?void 0:b.dataset.pointerType)!=="touch"&&!o.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(l)},p=v=>{nt(v,o.onFocus),r!==void 0&&v.currentTarget.dataset.pointerType!=="touch"&&r.setValue(l)};return xe(()=>_e(n.registerTriggerId(o.id))),L(sh,Ae({ref(v){const b=It(n.setTriggerRef,o.ref);typeof b=="function"&&b(v)},get"data-kb-menu-value-trigger"(){return t.value()},get id(){return o.id},get disabled(){return o.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return U(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return l()!==void 0&&(r==null?void 0:r.value())===l()?!0:void 0},get tabIndex(){return r!==void 0?r.value()===l()||r.lastValue()===l()?0:-1:void 0},onPointerDown:f,onMouseOver:m,onClick:h,onKeyDown:g,onFocus:p,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}var nj=wt();function k1(){return St(nj)}function O1(e){let t;const n=tr(),r=kr(),i=tc(),s=k1(),{direction:o}=ii(),a=Re({id:n.generateId(`content-${kn()}`)},e),[l,u]=Ve(a,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let c=0;const d=()=>r.parentMenuContext()==null&&i===void 0&&n.isModal(),f=qM({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused(),orientation:()=>n.orientation()==="horizontal"?"vertical":"horizontal"},()=>t);zM({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:S=>{var C;i===void 0&&((C=l.onOpenAutoFocus)==null||C.call(l,S))},onUnmountAutoFocus:l.onCloseAutoFocus},()=>t);const h=S=>{if(wn(S.currentTarget,S.target)&&(S.key==="Tab"&&r.isOpen()&&S.preventDefault(),i!==void 0&&S.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(S.key){case pa.next(o(),n.orientation()):S.stopPropagation(),S.preventDefault(),r.close(!0),i.setAutoFocusMenu(!0),i.nextMenu();break;case pa.previous(o(),n.orientation()):if(S.currentTarget.hasAttribute("data-closed"))break;S.stopPropagation(),S.preventDefault(),r.close(!0),i.setAutoFocusMenu(!0),i.previousMenu();break}},g=S=>{var C;(C=l.onEscapeKeyDown)==null||C.call(l,S),i==null||i.setAutoFocusMenu(!1),r.close(!0)},m=S=>{var C;(C=l.onFocusOutside)==null||C.call(l,S),n.isModal()&&S.preventDefault()},p=S=>{var C,x;nt(S,l.onPointerEnter),r.isOpen()&&((C=r.parentMenuContext())==null||C.listState().selectionManager().setFocused(!1),(x=r.parentMenuContext())==null||x.listState().selectionManager().setFocusedKey(void 0))},v=S=>{if(nt(S,l.onPointerMove),S.pointerType!=="mouse")return;const C=S.target,x=c!==S.clientX;wn(S.currentTarget,C)&&x&&(r.setPointerDir(S.clientX>c?"right":"left"),c=S.clientX)};xe(()=>_e(r.registerContentId(l.id)));const b={ref:It(S=>{r.setContentRef(S),t=S},l.ref),role:"menu",get id(){return l.id},get tabIndex(){return f.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:vt([l.onKeyDown,f.onKeyDown,h]),onMouseDown:vt([l.onMouseDown,f.onMouseDown]),onFocusIn:vt([l.onFocusIn,f.onFocusIn]),onFocusOut:vt([l.onFocusOut,f.onFocusOut]),onPointerEnter:p,onPointerMove:v,get"data-orientation"(){return n.orientation()}};return L(ve,{get when(){return r.contentPresent()},get children(){return L(ve,{get when(){return s===void 0||r.parentMenuContext()!=null},get fallback(){return L(st,Ae({as:"div"},()=>r.dataset(),b,u))},get children(){return L(s1.Positioner,{get children(){return L(NM,Ae({get disableOutsidePointerEvents(){return U(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return Qu({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},l.style)},onEscapeKeyDown:g,onFocusOutside:m,get onDismiss(){return r.close}},()=>r.dataset(),b,u))}})}})}})}function rj(e){let t;const n=tr(),r=kr(),[i,s]=Ve(e,["ref"]);return ej({element:()=>t!=null?t:null,enabled:()=>r.contentPresent()&&n.preventScroll()}),L(O1,Ae({ref(o){const a=It(l=>{t=l},i.ref);typeof a=="function"&&a(o)}},s))}var E1=wt();function ij(){const e=St(E1);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function mh(e){const t=tr(),n=Re({id:t.generateId(`group-${kn()}`)},e),[r,i]=ce(),s={generateId:Ga(()=>n.id),registerLabelId:Sn(i)};return L(E1.Provider,{value:s,get children(){return L(st,Ae({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function A1(e){const t=ij(),n=Re({id:t.generateId("label")},e),[r,i]=Ve(n,["id"]);return xe(()=>_e(t.registerLabelId(r.id))),L(st,Ae({as:"span",get id(){return r.id},"aria-hidden":"true"},i))}function P1(e){const t=kr(),n=Re({children:"▼"},e);return L(st,Ae({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function T1(e){return L(yh,Ae({role:"menuitem",closeOnSelect:!0},e))}function M1(e){const t=gh(),n=Re({id:t.generateId("description")},e),[r,i]=Ve(n,["id"]);return xe(()=>_e(t.registerDescription(r.id))),L(st,Ae({as:"div",get id(){return r.id}},()=>t.dataset(),i))}function j1(e){const t=gh(),n=Re({id:t.generateId("indicator")},e),[r,i]=Ve(n,["forceMount"]);return L(ve,{get when(){return r.forceMount||t.isChecked()},get children(){return L(st,Ae({as:"div"},()=>t.dataset(),i))}})}function $1(e){const t=gh(),n=Re({id:t.generateId("label")},e),[r,i]=Ve(n,["ref","id"]);return xe(()=>_e(t.registerLabel(r.id))),L(st,Ae({as:"div",ref(s){const o=It(t.setLabelRef,r.ref);typeof o=="function"&&o(s)},get id(){return r.id}},()=>t.dataset(),i))}function D1(e){const t=kr();return L(ve,{get when(){return t.contentPresent()},get children(){return L(ov,e)}})}var L1=wt();function sj(){const e=St(L1);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function I1(e){const n=tr().generateId(`radiogroup-${kn()}`),r=Re({id:n},e),[i,s]=Ve(r,["value","defaultValue","onChange","disabled"]),[o,a]=Va({value:()=>i.value,defaultValue:()=>i.defaultValue,onChange:u=>{var c;return(c=i.onChange)==null?void 0:c.call(i,u)}}),l={isDisabled:()=>i.disabled,isSelectedValue:u=>u===o(),setSelectedValue:a};return L(L1.Provider,{value:l,get children(){return L(mh,s)}})}function R1(e){const t=sj(),n=Re({closeOnSelect:!1},e),[r,i]=Ve(n,["value","onSelect"]);return L(yh,Ae({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{var o;(o=r.onSelect)==null||o.call(r),t.setSelectedValue(r.value)}},i))}function oj(e,t,n){const r=e.split("-")[0],i=n.getBoundingClientRect(),s=[],o=t.clientX,a=t.clientY;switch(r){case"top":s.push([o,a+5]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]);break;case"right":s.push([o-5,a]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]);break;case"bottom":s.push([o,a-5]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([i.left,i.top]);break;case"left":s.push([o+5,a]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]);break}return s}function aj(e,t){return t?UP([e.clientX,e.clientY],t):!1}function N1(e){const t=tr(),n=Rb(),r=x1(),i=tc(),s=k1(),o=Re({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,l]=Ve(o,["open","defaultOpen","onOpenChange"]);let u=0,c=null,d="right";const[f,h]=ce(),[g,m]=ce(),[p,v]=ce(),[b,S]=ce(),[C,x]=ce(!0),[k,w]=ce(l.placement),[_,O]=ce([]),[E,T]=ce([]),{DomCollectionProvider:j}=aT({items:E,onItemsChange:T}),B=a1({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:J=>{var Ce;return(Ce=a.onOpenChange)==null?void 0:Ce.call(a,J)}}),{present:R}=Gb({show:()=>t.forceMount()||B.isOpen(),element:()=>{var J;return(J=b())!=null?J:null}}),A=kT({selectionMode:"none",dataSource:E}),M=J=>{x(J),B.open()},D=(J=!1)=>{B.close(),J&&r&&r.close(!0)},H=J=>{x(J),B.toggle()},Q=()=>{const J=b();J&&(At(J),A.selectionManager().setFocused(!0),A.selectionManager().setFocusedKey(void 0))},F=()=>{s!=null?setTimeout(()=>Q()):Q()},G=J=>{O(ge=>[...ge,J]);const Ce=r==null?void 0:r.registerNestedMenu(J);return()=>{O(ge=>Jd(ge,J)),Ce==null||Ce()}},ie=J=>d===(c==null?void 0:c.side)&&aj(J,c==null?void 0:c.area),ae=J=>{ie(J)&&J.preventDefault()},N=J=>{ie(J)||F()},le=J=>{ie(J)&&J.preventDefault()};UM({isDisabled:()=>!(r==null&&B.isOpen()&&t.isModal()),targets:()=>[b(),..._()].filter(Boolean)}),xe(()=>{const J=b();if(!J||!r)return;const Ce=r.registerNestedMenu(J);_e(()=>{Ce()})}),xe(()=>{r===void 0&&(i==null||i.registerMenu(t.value(),[b(),..._()]))}),xe(()=>{var J;r!==void 0||i===void 0||(i.value()===t.value()?((J=p())==null||J.focus(),i.autoFocusMenu()&&M(!0)):D())}),xe(()=>{r!==void 0||i===void 0||B.isOpen()&&i.setValue(t.value())}),_e(()=>{r===void 0&&(i==null||i.unregisterMenu(t.value()))});const me={dataset:U(()=>({"data-expanded":B.isOpen()?"":void 0,"data-closed":B.isOpen()?void 0:""})),isOpen:B.isOpen,contentPresent:R,nestedMenus:_,currentPlacement:k,pointerGraceTimeoutId:()=>u,autoFocus:C,listState:()=>A,parentMenuContext:()=>r,triggerRef:p,contentRef:b,triggerId:f,contentId:g,setTriggerRef:v,setContentRef:S,open:M,close:D,toggle:H,focusContent:F,onItemEnter:ae,onItemLeave:N,onTriggerLeave:le,setPointerDir:J=>d=J,setPointerGraceTimeoutId:J=>u=J,setPointerGraceIntent:J=>c=J,registerNestedMenu:G,registerItemToParentDomCollection:n==null?void 0:n.registerItem,registerTriggerId:Sn(h),registerContentId:Sn(m)};return L(j,{get children(){return L(b1.Provider,{value:me,get children(){return L(ve,{when:s===void 0,get fallback(){return l.children},get children(){return L(s1,Ae({anchorRef:p,contentRef:b,onCurrentPlacementChange:w},l))}})}})}})}function F1(e){const{direction:t}=ii();return L(N1,Ae({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var lj={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function B1(e){const t=kr(),n=tr(),[r,i]=Ve(e,["onFocusOutside","onKeyDown"]),{direction:s}=ii();return L(O1,Ae({onOpenAutoFocus:c=>{c.preventDefault()},onCloseAutoFocus:c=>{c.preventDefault()},onFocusOutside:c=>{var f;(f=r.onFocusOutside)==null||f.call(r,c);const d=c.target;wn(t.triggerRef(),d)||t.close()},onKeyDown:c=>{nt(c,r.onKeyDown);const d=wn(c.currentTarget,c.target),f=lj.close(s(),n.orientation()).includes(c.key),h=t.parentMenuContext()!=null;d&&f&&h&&(t.close(),At(t.triggerRef()))}},i))}var xm=["Enter"," "],uj={open:(e,t)=>e==="ltr"?[...xm,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...xm,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function q1(e){let t;const n=tr(),r=kr(),i=Re({id:n.generateId(`sub-trigger-${kn()}`)},e),[s,o]=Ve(i,["ref","id","textValue","disabled","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);let a=null;const l=()=>{a&&window.clearTimeout(a),a=null},{direction:u}=ii(),c=()=>s.id,d=()=>{const S=r.parentMenuContext();if(S==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return S.listState().selectionManager()},f=()=>r.listState().collection(),h=()=>d().focusedKey()===c(),g=Ub({key:c,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>s.disabled},()=>t),m=S=>{nt(S,s.onClick),!r.isOpen()&&!s.disabled&&r.open(!0)},p=S=>{var x;if(nt(S,s.onPointerMove),S.pointerType!=="mouse")return;const C=r.parentMenuContext();if(C==null||C.onItemEnter(S),!S.defaultPrevented){if(s.disabled){C==null||C.onItemLeave(S);return}!r.isOpen()&&!a&&((x=r.parentMenuContext())==null||x.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),l()},100)),C==null||C.onItemEnter(S),S.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),At(S.currentTarget),C==null||C.listState().selectionManager().setFocused(!0),C==null||C.listState().selectionManager().setFocusedKey(c()))}},v=S=>{if(nt(S,s.onPointerLeave),S.pointerType!=="mouse")return;l();const C=r.parentMenuContext(),x=r.contentRef();if(x){C==null||C.setPointerGraceIntent({area:oj(r.currentPlacement(),S,x),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(C==null?void 0:C.pointerGraceTimeoutId());const k=window.setTimeout(()=>{C==null||C.setPointerGraceIntent(null)},300);C==null||C.setPointerGraceTimeoutId(k)}else{if(C==null||C.onTriggerLeave(S),S.defaultPrevented)return;C==null||C.setPointerGraceIntent(null)}C==null||C.onItemLeave(S)},b=S=>{nt(S,s.onKeyDown),!S.repeat&&(s.disabled||uj.open(u(),n.orientation()).includes(S.key)&&(S.stopPropagation(),S.preventDefault(),d().setFocused(!1),d().setFocusedKey(void 0),r.isOpen()||r.open("first"),r.focusContent(),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(f().getFirstKey())))};return xe(()=>{var C,x,k;if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const S=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:c(),textValue:(x=(C=s.textValue)!=null?C:t==null?void 0:t.textContent)!=null?x:"",disabled:(k=s.disabled)!=null?k:!1});_e(S)}),xe(br(()=>{var S;return(S=r.parentMenuContext())==null?void 0:S.pointerGraceTimeoutId()},S=>{_e(()=>{var C;window.clearTimeout(S),(C=r.parentMenuContext())==null||C.setPointerGraceIntent(null)})})),xe(()=>_e(r.registerTriggerId(s.id))),_e(()=>{l()}),L(st,Ae({as:"div",ref(S){const C=It(x=>{r.setTriggerRef(x),t=x},s.ref);typeof C=="function"&&C(S)},get id(){return s.id},role:"menuitem",get tabIndex(){return g.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return U(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return s.disabled},get"data-key"(){return g.dataKey()},get"data-highlighted"(){return h()?"":void 0},get"data-disabled"(){return s.disabled?"":void 0},get onPointerDown(){return vt([s.onPointerDown,g.onPointerDown])},get onPointerUp(){return vt([s.onPointerUp,g.onPointerUp])},get onClick(){return vt([m,g.onClick])},get onKeyDown(){return vt([b,g.onKeyDown])},get onMouseDown(){return vt([s.onMouseDown,g.onMouseDown])},get onFocus(){return vt([s.onFocus,g.onFocus])},onPointerMove:p,onPointerLeave:v},()=>r.dataset(),o))}function cj(e){const t=tc(),n=`menu-${kn()}`,r=Re({id:n,modal:!0},e),[i,s]=Ve(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),o=a1({open:()=>i.open,defaultOpen:()=>i.defaultOpen,onOpenChange:l=>{var u;return(u=i.onOpenChange)==null?void 0:u.call(i,l)}}),a={isModal:()=>{var l;return(l=i.modal)!=null?l:!0},preventScroll:()=>{var l;return(l=i.preventScroll)!=null?l:a.isModal()},forceMount:()=>{var l;return(l=i.forceMount)!=null?l:!1},generateId:Ga(()=>i.id),value:()=>i.value,orientation:()=>{var l,u;return(u=(l=i.orientation)!=null?l:t==null?void 0:t.orientation())!=null?u:"horizontal"}};return L(S1.Provider,{value:a,get children(){return L(N1,Ae({get open(){return o.isOpen()},get onOpenChange(){return o.setIsOpen}},s))}})}var dj={};Zu(dj,{Root:()=>nc,Separator:()=>fj});function nc(e){let t;const n=Re({orientation:"horizontal"},e),[r,i]=Ve(n,["ref","orientation"]),s=Xu(()=>t,()=>"hr");return L(st,Ae({as:"hr",ref(o){const a=It(l=>t=l,r.ref);typeof a=="function"&&a(o)},get role(){return s()!=="hr"?"separator":void 0},get"aria-orientation"(){return r.orientation==="vertical"?"vertical":void 0},get"data-orientation"(){return r.orientation}},i))}var fj=nc,ft={};Zu(ft,{Arrow:()=>hh,CheckboxItem:()=>C1,Content:()=>z1,DropdownMenu:()=>hj,Group:()=>mh,GroupLabel:()=>A1,Icon:()=>P1,Item:()=>T1,ItemDescription:()=>M1,ItemIndicator:()=>j1,ItemLabel:()=>$1,Portal:()=>D1,RadioGroup:()=>I1,RadioItem:()=>R1,Root:()=>H1,Separator:()=>nc,Sub:()=>F1,SubContent:()=>B1,SubTrigger:()=>q1,Trigger:()=>_1});function z1(e){const t=tr(),n=kr(),[r,i]=Ve(e,["onCloseAutoFocus","onInteractOutside"]);let s=!1;return L(rj,Ae({onCloseAutoFocus:l=>{var u;(u=r.onCloseAutoFocus)==null||u.call(r,l),s||At(n.triggerRef()),s=!1,l.preventDefault()},onInteractOutside:l=>{var u;(u=r.onInteractOutside)==null||u.call(r,l),(!t.isModal()||l.detail.isContextMenu)&&(s=!0)}},i))}function H1(e){const t=`dropdownmenu-${kn()}`,n=Re({id:t},e);return L(cj,n)}var hj=Object.assign(H1,{Arrow:hh,CheckboxItem:C1,Content:z1,Group:mh,GroupLabel:A1,Icon:P1,Item:T1,ItemDescription:M1,ItemIndicator:j1,ItemLabel:$1,Portal:D1,RadioGroup:I1,RadioItem:R1,Separator:nc,Sub:F1,SubContent:B1,SubTrigger:q1,Trigger:_1}),K={colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000000",white:"#ffffff",neutral:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},darkGray:{50:"#525c7a",100:"#49536e",200:"#414962",300:"#394056",400:"#313749",500:"#292e3d",600:"#212530",700:"#191c24",800:"#111318",900:"#0b0d10"},gray:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},blue:{25:"#F5FAFF",50:"#EFF8FF",100:"#D1E9FF",200:"#B2DDFF",300:"#84CAFF",400:"#53B1FD",500:"#2E90FA",600:"#1570EF",700:"#175CD3",800:"#1849A9",900:"#194185"},green:{25:"#F6FEF9",50:"#ECFDF3",100:"#D1FADF",200:"#A6F4C5",300:"#6CE9A6",400:"#32D583",500:"#12B76A",600:"#039855",700:"#027A48",800:"#05603A",900:"#054F31"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},yellow:{25:"#FFFCF5",50:"#FFFAEB",100:"#FEF0C7",200:"#FEDF89",300:"#FEC84B",400:"#FDB022",500:"#F79009",600:"#DC6803",700:"#B54708",800:"#93370D",900:"#7A2E0E"},purple:{25:"#FAFAFF",50:"#F4F3FF",100:"#EBE9FE",200:"#D9D6FE",300:"#BDB4FE",400:"#9B8AFB",500:"#7A5AF8",600:"#6938EF",700:"#5925DC",800:"#4A1FB8",900:"#3E1C96"},teal:{25:"#F6FEFC",50:"#F0FDF9",100:"#CCFBEF",200:"#99F6E0",300:"#5FE9D0",400:"#2ED3B7",500:"#15B79E",600:"#0E9384",700:"#107569",800:"#125D56",900:"#134E48"},pink:{25:"#fdf2f8",50:"#fce7f3",100:"#fbcfe8",200:"#f9a8d4",300:"#f472b6",400:"#ec4899",500:"#db2777",600:"#be185d",700:"#9d174d",800:"#831843",900:"#500724"},cyan:{25:"#ecfeff",50:"#cffafe",100:"#a5f3fc",200:"#67e8f9",300:"#22d3ee",400:"#06b6d4",500:"#0891b2",600:"#0e7490",700:"#155e75",800:"#164e63",900:"#083344"}},alpha:{90:"e5",80:"cc"},font:{size:{xs:"calc(var(--tsqd-font-size) * 0.75)",sm:"calc(var(--tsqd-font-size) * 0.875)",md:"var(--tsqd-font-size)"},lineHeight:{xs:"calc(var(--tsqd-font-size) * 1)",sm:"calc(var(--tsqd-font-size) * 1.25)",md:"calc(var(--tsqd-font-size) * 1.5)"},weight:{medium:"500",semibold:"600",bold:"700"}},border:{radius:{xs:"calc(var(--tsqd-font-size) * 0.125)",sm:"calc(var(--tsqd-font-size) * 0.25)",full:"9999px"}},size:{.25:"calc(var(--tsqd-font-size) * 0.0625)",.5:"calc(var(--tsqd-font-size) * 0.125)",1:"calc(var(--tsqd-font-size) * 0.25)",1.5:"calc(var(--tsqd-font-size) * 0.375)",2:"calc(var(--tsqd-font-size) * 0.5)",2.5:"calc(var(--tsqd-font-size) * 0.625)",3:"calc(var(--tsqd-font-size) * 0.75)",3.5:"calc(var(--tsqd-font-size) * 0.875)",4:"calc(var(--tsqd-font-size) * 1)",4.5:"calc(var(--tsqd-font-size) * 1.125)",5:"calc(var(--tsqd-font-size) * 1.25)",6:"calc(var(--tsqd-font-size) * 1.5)",6.5:"calc(var(--tsqd-font-size) * 1.625)",14:"calc(var(--tsqd-font-size) * 3.5)"},shadow:{xs:(e="rgb(0 0 0 / 0.1)")=>"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:(e="rgb(0 0 0 / 0.1)")=>`0 1px 3px 0 ${e}, 0 1px 2px -1px ${e}`,md:(e="rgb(0 0 0 / 0.1)")=>`0 4px 6px -1px ${e}, 0 2px 4px -2px ${e}`,lg:(e="rgb(0 0 0 / 0.1)")=>`0 10px 15px -3px ${e}, 0 4px 6px -4px ${e}`,xl:(e="rgb(0 0 0 / 0.1)")=>`0 20px 25px -5px ${e}, 0 8px 10px -6px ${e}`,"2xl":(e="rgb(0 0 0 / 0.25)")=>`0 25px 50px -12px ${e}`,inner:(e="rgb(0 0 0 / 0.05)")=>`inset 0 2px 4px 0 ${e}`,none:()=>"none"}},gj=he('<svg width=14 height=14 viewBox="0 0 14 14"fill=none xmlns=http://www.w3.org/2000/svg><path d="M13 13L9.00007 9M10.3333 5.66667C10.3333 8.244 8.244 10.3333 5.66667 10.3333C3.08934 10.3333 1 8.244 1 5.66667C1 3.08934 3.08934 1 5.66667 1C8.244 1 10.3333 3.08934 10.3333 5.66667Z"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),yj=he('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9 3H15M3 6H21M19 6L18.2987 16.5193C18.1935 18.0975 18.1409 18.8867 17.8 19.485C17.4999 20.0118 17.0472 20.4353 16.5017 20.6997C15.882 21 15.0911 21 13.5093 21H10.4907C8.90891 21 8.11803 21 7.49834 20.6997C6.95276 20.4353 6.50009 20.0118 6.19998 19.485C5.85911 18.8867 5.8065 18.0975 5.70129 16.5193L5 6M10 10.5V15.5M14 10.5V15.5"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),mj=he('<svg width=10 height=6 viewBox="0 0 10 6"fill=none xmlns=http://www.w3.org/2000/svg><path d="M1 1L5 5L9 1"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),pj=he('<svg width=12 height=12 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 13.3333V2.66667M8 2.66667L4 6.66667M8 2.66667L12 6.66667"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),ph=he('<svg width=12 height=12 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 2.66667V13.3333M8 13.3333L4 9.33333M8 13.3333L12 9.33333"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),vj=he('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M12 2v2m0 16v2M4 12H2m4.314-5.686L4.9 4.9m12.786 1.414L19.1 4.9M6.314 17.69 4.9 19.104m12.786-1.414 1.414 1.414M22 12h-2m-3 0a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),bj=he('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M22 15.844a10.424 10.424 0 0 1-4.306.925c-5.779 0-10.463-4.684-10.463-10.462 0-1.536.33-2.994.925-4.307A10.464 10.464 0 0 0 2 11.538C2 17.316 6.684 22 12.462 22c4.243 0 7.896-2.526 9.538-6.156Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),xj=he('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 21h8m-4-4v4m-5.2-4h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 14.72 22 13.88 22 12.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 3 18.88 3 17.2 3H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 5.28 2 6.12 2 7.8v4.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 17 5.12 17 6.8 17Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),wj=he('<svg stroke=currentColor fill=currentColor stroke-width=0 viewBox="0 0 24 24"height=1em width=1em xmlns=http://www.w3.org/2000/svg><path fill=none d="M0 0h24v24H0z"></path><path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3a4.237 4.237 0 00-6 0zm-4-4l2 2a7.074 7.074 0 0110 0l2-2C15.14 9.14 8.87 9.14 5 13z">'),Sj=he('<svg stroke-width=0 viewBox="0 0 24 24"height=1em width=1em xmlns=http://www.w3.org/2000/svg><path fill=none d="M24 .01c0-.01 0-.01 0 0L0 0v24h24V.01zM0 0h24v24H0V0zm0 0h24v24H0V0z"></path><path d="M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7l2-2zm-4 4a9.793 9.793 0 00-4.49-2.56l3.53 3.53.96-.97zM2 3.05L5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24A9.684 9.684 0 005 13v.01L6.99 15a7.042 7.042 0 014.92-2.06L18.98 20l1.27-1.26L3.29 1.79 2 3.05zM9 17l3 3 3-3a4.237 4.237 0 00-6 0z">'),Cj=he('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9.3951 19.3711L9.97955 20.6856C10.1533 21.0768 10.4368 21.4093 10.7958 21.6426C11.1547 21.8759 11.5737 22.0001 12.0018 22C12.4299 22.0001 12.8488 21.8759 13.2078 21.6426C13.5667 21.4093 13.8503 21.0768 14.024 20.6856L14.6084 19.3711C14.8165 18.9047 15.1664 18.5159 15.6084 18.26C16.0532 18.0034 16.5678 17.8941 17.0784 17.9478L18.5084 18.1C18.9341 18.145 19.3637 18.0656 19.7451 17.8713C20.1265 17.6771 20.4434 17.3763 20.6573 17.0056C20.8715 16.635 20.9735 16.2103 20.9511 15.7829C20.9286 15.3555 20.7825 14.9438 20.5307 14.5978L19.684 13.4344C19.3825 13.0171 19.2214 12.5148 19.224 12C19.2239 11.4866 19.3865 10.9864 19.6884 10.5711L20.5351 9.40778C20.787 9.06175 20.933 8.65007 20.9555 8.22267C20.978 7.79528 20.8759 7.37054 20.6618 7C20.4479 6.62923 20.131 6.32849 19.7496 6.13423C19.3681 5.93997 18.9386 5.86053 18.5129 5.90556L17.0829 6.05778C16.5722 6.11141 16.0577 6.00212 15.6129 5.74556C15.17 5.48825 14.82 5.09736 14.6129 4.62889L14.024 3.31444C13.8503 2.92317 13.5667 2.59072 13.2078 2.3574C12.8488 2.12408 12.4299 1.99993 12.0018 2C11.5737 1.99993 11.1547 2.12408 10.7958 2.3574C10.4368 2.59072 10.1533 2.92317 9.97955 3.31444L9.3951 4.62889C9.18803 5.09736 8.83798 5.48825 8.3951 5.74556C7.95032 6.00212 7.43577 6.11141 6.9251 6.05778L5.49066 5.90556C5.06499 5.86053 4.6354 5.93997 4.25397 6.13423C3.87255 6.32849 3.55567 6.62923 3.34177 7C3.12759 7.37054 3.02555 7.79528 3.04804 8.22267C3.07052 8.65007 3.21656 9.06175 3.46844 9.40778L4.3151 10.5711C4.61704 10.9864 4.77964 11.4866 4.77955 12C4.77964 12.5134 4.61704 13.0137 4.3151 13.4289L3.46844 14.5922C3.21656 14.9382 3.07052 15.3499 3.04804 15.7773C3.02555 16.2047 3.12759 16.6295 3.34177 17C3.55589 17.3706 3.8728 17.6712 4.25417 17.8654C4.63554 18.0596 5.06502 18.1392 5.49066 18.0944L6.92066 17.9422C7.43133 17.8886 7.94587 17.9979 8.39066 18.2544C8.83519 18.511 9.18687 18.902 9.3951 19.3711Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round></path><path d="M12 15C13.6568 15 15 13.6569 15 12C15 10.3431 13.6568 9 12 9C10.3431 9 8.99998 10.3431 8.99998 12C8.99998 13.6569 10.3431 15 12 15Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),_j=he('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M16 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V8M11.5 12.5L17 7M17 7H12M17 7V12M6.2 21H8.8C9.9201 21 10.4802 21 10.908 20.782C11.2843 20.5903 11.5903 20.2843 11.782 19.908C12 19.4802 12 18.9201 12 17.8V15.2C12 14.0799 12 13.5198 11.782 13.092C11.5903 12.7157 11.2843 12.4097 10.908 12.218C10.4802 12 9.92011 12 8.8 12H6.2C5.0799 12 4.51984 12 4.09202 12.218C3.71569 12.4097 3.40973 12.7157 3.21799 13.092C3 13.5198 3 14.0799 3 15.2V17.8C3 18.9201 3 19.4802 3.21799 19.908C3.40973 20.2843 3.71569 20.5903 4.09202 20.782C4.51984 21 5.07989 21 6.2 21Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),kj=he('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path class=copier d="M8 8V5.2C8 4.0799 8 3.51984 8.21799 3.09202C8.40973 2.71569 8.71569 2.40973 9.09202 2.21799C9.51984 2 10.0799 2 11.2 2H18.8C19.9201 2 20.4802 2 20.908 2.21799C21.2843 2.40973 21.5903 2.71569 21.782 3.09202C22 3.51984 22 4.0799 22 5.2V12.8C22 13.9201 22 14.4802 21.782 14.908C21.5903 15.2843 21.2843 15.5903 20.908 15.782C20.4802 16 19.9201 16 18.8 16H16M5.2 22H12.8C13.9201 22 14.4802 22 14.908 21.782C15.2843 21.5903 15.5903 21.2843 15.782 20.908C16 20.4802 16 19.9201 16 18.8V11.2C16 10.0799 16 9.51984 15.782 9.09202C15.5903 8.71569 15.2843 8.40973 14.908 8.21799C14.4802 8 13.9201 8 12.8 8H5.2C4.0799 8 3.51984 8 3.09202 8.21799C2.71569 8.40973 2.40973 8.71569 2.21799 9.09202C2 9.51984 2 10.0799 2 11.2V18.8C2 19.9201 2 20.4802 2.21799 20.908C2.40973 21.2843 2.71569 21.5903 3.09202 21.782C3.51984 22 4.07989 22 5.2 22Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round stroke=currentColor>'),Oj=he('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M2.5 21.4998L8.04927 19.3655C8.40421 19.229 8.58168 19.1607 8.74772 19.0716C8.8952 18.9924 9.0358 18.901 9.16804 18.7984C9.31692 18.6829 9.45137 18.5484 9.72028 18.2795L21 6.99982C22.1046 5.89525 22.1046 4.10438 21 2.99981C19.8955 1.89525 18.1046 1.89524 17 2.99981L5.72028 14.2795C5.45138 14.5484 5.31692 14.6829 5.20139 14.8318C5.09877 14.964 5.0074 15.1046 4.92823 15.2521C4.83911 15.4181 4.77085 15.5956 4.63433 15.9506L2.5 21.4998ZM2.5 21.4998L4.55812 16.1488C4.7054 15.7659 4.77903 15.5744 4.90534 15.4867C5.01572 15.4101 5.1523 15.3811 5.2843 15.4063C5.43533 15.4351 5.58038 15.5802 5.87048 15.8703L8.12957 18.1294C8.41967 18.4195 8.56472 18.5645 8.59356 18.7155C8.61877 18.8475 8.58979 18.9841 8.51314 19.0945C8.42545 19.2208 8.23399 19.2944 7.85107 19.4417L2.5 21.4998Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),U1=he('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M7.5 12L10.5 15L16.5 9M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Ej=he('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9 9L15 15M15 9L9 15M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z"stroke=#F04438 stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Aj=he('<svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 xmlns=http://www.w3.org/2000/svg><rect class=list width=20 height=20 y=2 x=2 rx=2></rect><line class=list-item y1=7 y2=7 x1=6 x2=18></line><line class=list-item y2=12 y1=12 x1=6 x2=18></line><line class=list-item y1=17 y2=17 x1=6 x2=18>'),Pj=he('<svg viewBox="0 0 24 24"height=20 width=20 fill=none xmlns=http://www.w3.org/2000/svg><path d="M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Tj=he('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M7.5 12L10.5 15L16.5 9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Mj=he('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M12 2V6M12 18V22M6 12H2M22 12H18M19.0784 19.0784L16.25 16.25M19.0784 4.99994L16.25 7.82837M4.92157 19.0784L7.75 16.25M4.92157 4.99994L7.75 7.82837"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round></path><animateTransform attributeName=transform attributeType=XML type=rotate from=0 to=360 dur=2s repeatCount=indefinite>'),jj=he('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M15 9L9 15M9 9L15 15M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),$j=he('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9.5 15V9M14.5 15V9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Dj=he('<svg version=1.0 viewBox="0 0 633 633"><linearGradient x1=-666.45 x2=-666.45 y1=163.28 y2=163.99 gradientTransform="matrix(633 0 0 633 422177 -103358)"gradientUnits=userSpaceOnUse><stop stop-color=#6BDAFF offset=0></stop><stop stop-color=#F9FFB5 offset=.32></stop><stop stop-color=#FFA770 offset=.71></stop><stop stop-color=#FF7373 offset=1></stop></linearGradient><circle cx=316.5 cy=316.5 r=316.5></circle><defs><filter x=-137.5 y=412 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=-137.5 y=412 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=89.5 cy=610.5 rx=214.5 ry=186 fill=#015064 stroke=#00CFE2 stroke-width=25></ellipse></g><defs><filter x=316.5 y=412 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=316.5 y=412 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=543.5 cy=610.5 rx=214.5 ry=186 fill=#015064 stroke=#00CFE2 stroke-width=25></ellipse></g><defs><filter x=-137.5 y=450 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=-137.5 y=450 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=89.5 cy=648.5 rx=214.5 ry=186 fill=#015064 stroke=#00A8B8 stroke-width=25></ellipse></g><defs><filter x=316.5 y=450 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=316.5 y=450 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=543.5 cy=648.5 rx=214.5 ry=186 fill=#015064 stroke=#00A8B8 stroke-width=25></ellipse></g><defs><filter x=-137.5 y=486 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=-137.5 y=486 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=89.5 cy=684.5 rx=214.5 ry=186 fill=#015064 stroke=#007782 stroke-width=25></ellipse></g><defs><filter x=316.5 y=486 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=316.5 y=486 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=543.5 cy=684.5 rx=214.5 ry=186 fill=#015064 stroke=#007782 stroke-width=25></ellipse></g><defs><filter x=272.2 y=308 width=176.9 height=129.3 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=272.2 y=308 width=176.9 height=129.3 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><line x1=436 x2=431 y1=403.2 y2=431.8 fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11></line><line x1=291 x2=280 y1=341.5 y2=403.5 fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11></line><line x1=332.9 x2=328.6 y1=384.1 y2=411.2 fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11></line><linearGradient x1=-670.75 x2=-671.59 y1=164.4 y2=164.49 gradientTransform="matrix(-184.16 -32.472 -11.461 64.997 -121359 -32126)"gradientUnits=userSpaceOnUse><stop stop-color=#EE2700 offset=0></stop><stop stop-color=#FF008E offset=1></stop></linearGradient><path d="m344.1 363 97.7 17.2c5.8 2.1 8.2 6.1 7.1 12.1s-4.7 9.2-11 9.9l-106-18.7-57.5-59.2c-3.2-4.8-2.9-9.1 0.8-12.8s8.3-4.4 13.7-2.1l55.2 53.6z"clip-rule=evenodd fill-rule=evenodd></path><line x1=428.2 x2=429.1 y1=384.5 y2=378 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=395.2 x2=396.1 y1=379.5 y2=373 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=362.2 x2=363.1 y1=373.5 y2=367.4 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=324.2 x2=328.4 y1=351.3 y2=347.4 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=303.2 x2=307.4 y1=331.3 y2=327.4 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line></g><defs><filter x=73.2 y=113.8 width=280.6 height=317.4 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=73.2 y=113.8 width=280.6 height=317.4 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><linearGradient x1=-672.16 x2=-672.16 y1=165.03 y2=166.03 gradientTransform="matrix(-100.18 48.861 97.976 200.88 -83342 -93.059)"gradientUnits=userSpaceOnUse><stop stop-color=#A17500 offset=0></stop><stop stop-color=#5D2100 offset=1></stop></linearGradient><path d="m192.3 203c8.1 37.3 14 73.6 17.8 109.1 3.8 35.4 2.8 75.1-3 119.2l61.2-16.7c-15.6-59-25.2-97.9-28.6-116.6s-10.8-51.9-22.1-99.6l-25.3 4.6"clip-rule=evenodd fill-rule=evenodd></path><g stroke=#2F8A00><linearGradient x1=-660.23 x2=-660.23 y1=166.72 y2=167.72 gradientTransform="matrix(92.683 4.8573 -2.0259 38.657 61680 -3088.6)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m195 183.9s-12.6-22.1-36.5-29.9c-15.9-5.2-34.4-1.5-55.5 11.1 15.9 14.3 29.5 22.6 40.7 24.9 16.8 3.6 51.3-6.1 51.3-6.1z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-661.36 x2=-661.36 y1=164.18 y2=165.18 gradientTransform="matrix(110 5.7648 -6.3599 121.35 73933 -15933)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5s-47.5-8.5-83.2 15.7c-23.8 16.2-34.3 49.3-31.6 99.4 30.3-27.8 52.1-48.5 65.2-61.9 19.8-20.2 49.6-53.2 49.6-53.2z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-656.79 x2=-656.79 y1=165.15 y2=166.15 gradientTransform="matrix(62.954 3.2993 -3.5023 66.828 42156 -8754.1)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m195 183.9c-0.8-21.9 6-38 20.6-48.2s29.8-15.4 45.5-15.3c-6.1 21.4-14.5 35.8-25.2 43.4s-24.4 14.2-40.9 20.1z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-663.07 x2=-663.07 y1=165.44 y2=166.44 gradientTransform="matrix(152.47 7.9907 -3.0936 59.029 101884 -4318.7)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5c31.9-30 64.1-39.7 96.7-29s50.8 30.4 54.6 59.1c-35.2-5.5-60.4-9.6-75.8-12.1-15.3-2.6-40.5-8.6-75.5-18z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-662.57 x2=-662.57 y1=164.44 y2=165.44 gradientTransform="matrix(136.46 7.1517 -5.2163 99.533 91536 -11442)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5c35.8-7.6 65.6-0.2 89.2 22s37.7 49 42.3 80.3c-39.8-9.7-68.3-23.8-85.5-42.4s-32.5-38.5-46-59.9z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-656.43 x2=-656.43 y1=163.86 y2=164.86 gradientTransform="matrix(60.866 3.1899 -8.7773 167.48 41560 -25168)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5c-33.6 13.8-53.6 35.7-60.1 65.6s-3.6 63.1 8.7 99.6c27.4-40.3 43.2-69.6 47.4-88s5.6-44.1 4-77.2z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><path d="m196.5 182.3c-14.8 21.6-25.1 41.4-30.8 59.4s-9.5 33-11.1 45.1"fill=none stroke-linecap=round stroke-width=8></path><path d="m194.9 185.7c-24.4 1.7-43.8 9-58.1 21.8s-24.7 25.4-31.3 37.8"fill=none stroke-linecap=round stroke-width=8></path><path d="m204.5 176.4c29.7-6.7 52-8.4 67-5.1s26.9 8.6 35.8 15.9"fill=none stroke-linecap=round stroke-width=8></path><path d="m196.5 181.4c20.3 9.9 38.2 20.5 53.9 31.9s27.4 22.1 35.1 32"fill=none stroke-linecap=round stroke-width=8></path></g></g><defs><filter x=50.5 y=399 width=532 height=633 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=50.5 y=399 width=532 height=633 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><linearGradient x1=-666.06 x2=-666.23 y1=163.36 y2=163.75 gradientTransform="matrix(532 0 0 633 354760 -102959)"gradientUnits=userSpaceOnUse><stop stop-color=#FFF400 offset=0></stop><stop stop-color=#3C8700 offset=1></stop></linearGradient><ellipse cx=316.5 cy=715.5 rx=266 ry=316.5></ellipse></g><defs><filter x=391 y=-24 width=288 height=283 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=391 y=-24 width=288 height=283 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><linearGradient x1=-664.56 x2=-664.56 y1=163.79 y2=164.79 gradientTransform="matrix(227 0 0 227 151421 -37204)"gradientUnits=userSpaceOnUse><stop stop-color=#FFDF00 offset=0></stop><stop stop-color=#FF9D00 offset=1></stop></linearGradient><circle cx=565.5 cy=89.5 r=113.5></circle><linearGradient x1=-644.5 x2=-645.77 y1=342 y2=342 gradientTransform="matrix(30 0 0 1 19770 -253)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=427 x2=397 y1=89 y2=89 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-641.56 x2=-642.83 y1=196.02 y2=196.07 gradientTransform="matrix(26.5 0 0 5.5 17439 -1025.5)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=430.5 x2=404 y1=55.5 y2=50 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-643.73 x2=-645 y1=185.83 y2=185.9 gradientTransform="matrix(29 0 0 8 19107 -1361)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=431 x2=402 y1=122 y2=130 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-638.94 x2=-640.22 y1=177.09 y2=177.39 gradientTransform="matrix(24 0 0 13 15783 -2145)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=442 x2=418 y1=153 y2=166 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-633.42 x2=-634.7 y1=172.41 y2=173.31 gradientTransform="matrix(20 0 0 19 13137 -3096)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=464 x2=444 y1=180 y2=199 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-619.05 x2=-619.52 y1=170.82 y2=171.82 gradientTransform="matrix(13.83 0 0 22.85 9050 -3703.4)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=491.4 x2=477.5 y1=203 y2=225.9 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-578.5 x2=-578.63 y1=170.31 y2=171.31 gradientTransform="matrix(7.5 0 0 24.5 4860 -3953)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=524.5 x2=517 y1=219.5 y2=244 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=666.5 x2=666.5 y1=170.31 y2=171.31 gradientTransform="matrix(.5 0 0 24.5 231.5 -3944)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=564.5 x2=565 y1=228.5 y2=253 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12>');function Lj(){return gj()}function G1(){return yj()}function Ko(){return mj()}function wm(){return pj()}function Sm(){return ph()}function Ij(){return(()=>{var e=ph();return e.style.setProperty("transform","rotate(90deg)"),e})()}function Rj(){return(()=>{var e=ph();return e.style.setProperty("transform","rotate(-90deg)"),e})()}function Nj(){return vj()}function Fj(){return bj()}function Bj(){return xj()}function qj(){return wj()}function zj(){return Sj()}function Hj(){return Cj()}function Uj(){return _j()}function Gj(){return kj()}function Kj(){return Oj()}function Vj(e){return(()=>{var t=U1(),n=t.firstChild;return be(()=>re(n,"stroke",e.theme==="dark"?"#12B76A":"#027A48")),t})()}function Wj(){return Ej()}function Qj(){return Aj()}function Yj(e){return[L(ve,{get when(){return e.checked},get children(){var t=U1(),n=t.firstChild;return be(()=>re(n,"stroke",e.theme==="dark"?"#9B8AFB":"#6938EF")),t}}),L(ve,{get when(){return!e.checked},get children(){var t=Pj(),n=t.firstChild;return be(()=>re(n,"stroke",e.theme==="dark"?"#9B8AFB":"#6938EF")),t}})]}function Xj(){return Tj()}function Zj(){return Mj()}function Jj(){return jj()}function e$(){return $j()}function Cm(){const e=kn();return(()=>{var t=Dj(),n=t.firstChild,r=n.nextSibling,i=r.nextSibling,s=i.firstChild,o=i.nextSibling,a=o.firstChild,l=o.nextSibling,u=l.nextSibling,c=u.firstChild,d=u.nextSibling,f=d.firstChild,h=d.nextSibling,g=h.nextSibling,m=g.firstChild,p=g.nextSibling,v=p.firstChild,b=p.nextSibling,S=b.nextSibling,C=S.firstChild,x=S.nextSibling,k=x.firstChild,w=x.nextSibling,_=w.nextSibling,O=_.firstChild,E=_.nextSibling,T=E.firstChild,j=E.nextSibling,B=j.nextSibling,R=B.firstChild,A=B.nextSibling,M=A.firstChild,D=A.nextSibling,H=D.nextSibling,Q=H.firstChild,F=H.nextSibling,G=F.firstChild,ie=F.nextSibling,ae=ie.firstChild,N=ae.nextSibling,le=N.nextSibling,te=le.nextSibling,me=te.nextSibling,J=ie.nextSibling,Ce=J.firstChild,ge=J.nextSibling,ze=ge.firstChild,oe=ge.nextSibling,He=oe.firstChild,lt=He.nextSibling,dt=lt.nextSibling,Ne=dt.firstChild,Fe=Ne.nextSibling,Y=Fe.nextSibling,Pe=Y.nextSibling,tt=Pe.nextSibling,$e=tt.nextSibling,ue=$e.nextSibling,W=ue.nextSibling,ne=W.nextSibling,ee=ne.nextSibling,we=ee.nextSibling,gt=we.nextSibling,Se=oe.nextSibling,Je=Se.firstChild,Be=Se.nextSibling,An=Be.firstChild,Vt=Be.nextSibling,fn=Vt.firstChild,Nn=fn.nextSibling,nr=Vt.nextSibling,Qi=nr.firstChild,Or=nr.nextSibling,Xa=Or.firstChild,oo=Or.nextSibling,ao=oo.firstChild,lo=ao.nextSibling,Yi=lo.nextSibling,wh=Yi.nextSibling,Sh=wh.nextSibling,Ch=Sh.nextSibling,_h=Ch.nextSibling,kh=_h.nextSibling,Oh=kh.nextSibling,Eh=Oh.nextSibling,Ah=Eh.nextSibling,Ph=Ah.nextSibling,Th=Ph.nextSibling,Mh=Th.nextSibling,jh=Mh.nextSibling,$h=jh.nextSibling,Dh=$h.nextSibling,sx=Dh.nextSibling;return re(n,"id",`a-${e}`),re(r,"fill",`url(#a-${e})`),re(s,"id",`am-${e}`),re(o,"id",`b-${e}`),re(a,"filter",`url(#am-${e})`),re(l,"mask",`url(#b-${e})`),re(c,"id",`ah-${e}`),re(d,"id",`k-${e}`),re(f,"filter",`url(#ah-${e})`),re(h,"mask",`url(#k-${e})`),re(m,"id",`ae-${e}`),re(p,"id",`j-${e}`),re(v,"filter",`url(#ae-${e})`),re(b,"mask",`url(#j-${e})`),re(C,"id",`ai-${e}`),re(x,"id",`i-${e}`),re(k,"filter",`url(#ai-${e})`),re(w,"mask",`url(#i-${e})`),re(O,"id",`aj-${e}`),re(E,"id",`h-${e}`),re(T,"filter",`url(#aj-${e})`),re(j,"mask",`url(#h-${e})`),re(R,"id",`ag-${e}`),re(A,"id",`g-${e}`),re(M,"filter",`url(#ag-${e})`),re(D,"mask",`url(#g-${e})`),re(Q,"id",`af-${e}`),re(F,"id",`f-${e}`),re(G,"filter",`url(#af-${e})`),re(ie,"mask",`url(#f-${e})`),re(te,"id",`m-${e}`),re(me,"fill",`url(#m-${e})`),re(Ce,"id",`ak-${e}`),re(ge,"id",`e-${e}`),re(ze,"filter",`url(#ak-${e})`),re(oe,"mask",`url(#e-${e})`),re(He,"id",`n-${e}`),re(lt,"fill",`url(#n-${e})`),re(Ne,"id",`r-${e}`),re(Fe,"fill",`url(#r-${e})`),re(Y,"id",`s-${e}`),re(Pe,"fill",`url(#s-${e})`),re(tt,"id",`q-${e}`),re($e,"fill",`url(#q-${e})`),re(ue,"id",`p-${e}`),re(W,"fill",`url(#p-${e})`),re(ne,"id",`o-${e}`),re(ee,"fill",`url(#o-${e})`),re(we,"id",`l-${e}`),re(gt,"fill",`url(#l-${e})`),re(Je,"id",`al-${e}`),re(Be,"id",`d-${e}`),re(An,"filter",`url(#al-${e})`),re(Vt,"mask",`url(#d-${e})`),re(fn,"id",`u-${e}`),re(Nn,"fill",`url(#u-${e})`),re(Qi,"id",`ad-${e}`),re(Or,"id",`c-${e}`),re(Xa,"filter",`url(#ad-${e})`),re(oo,"mask",`url(#c-${e})`),re(ao,"id",`t-${e}`),re(lo,"fill",`url(#t-${e})`),re(Yi,"id",`v-${e}`),re(wh,"stroke",`url(#v-${e})`),re(Sh,"id",`aa-${e}`),re(Ch,"stroke",`url(#aa-${e})`),re(_h,"id",`w-${e}`),re(kh,"stroke",`url(#w-${e})`),re(Oh,"id",`ac-${e}`),re(Eh,"stroke",`url(#ac-${e})`),re(Ah,"id",`ab-${e}`),re(Ph,"stroke",`url(#ab-${e})`),re(Th,"id",`y-${e}`),re(Mh,"stroke",`url(#y-${e})`),re(jh,"id",`x-${e}`),re($h,"stroke",`url(#x-${e})`),re(Dh,"id",`z-${e}`),re(sx,"stroke",`url(#z-${e})`),t})()}var t$=he('<span><svg width=16 height=16 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M6 12L10 8L6 4"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),n$=he('<button title="Copy object to clipboard">'),r$=he('<button title="Remove all items"aria-label="Remove all items">'),i$=he('<button title="Delete item"aria-label="Delete item">'),s$=he('<button title="Toggle value"aria-label="Toggle value">'),o$=he('<button title="Bulk Edit Data"aria-label="Bulk Edit Data">'),ko=he("<div>"),a$=he("<div><button> <span></span> <span> "),l$=he("<input>"),_m=he("<span>"),u$=he("<div><span>:"),c$=he("<div><div><button> [<!>...<!>]");function d$(e,t){let n=0;const r=[];for(;n<e.length;)r.push(e.slice(n,n+t)),n=n+t;return r}var km=e=>{const t=xt(),n=ye().shadowDOMTarget?je.bind({target:ye().shadowDOMTarget}):je,r=U(()=>t()==="dark"?so(n):io(n));return(()=>{var i=t$();return be(()=>se(i,fe(r().expander,n`
|
|
70
70
|
transform: rotate(${e.expanded?90:0}deg);
|
|
71
71
|
`,e.expanded&&n`
|
|
72
72
|
& svg {
|
|
73
73
|
top: -1px;
|
|
74
74
|
}
|
|
75
|
-
`))),i})()},
|
|
75
|
+
`))),i})()},f$=e=>{const t=xt(),n=ye().shadowDOMTarget?je.bind({target:ye().shadowDOMTarget}):je,r=U(()=>t()==="dark"?so(n):io(n)),[i,s]=ce("NoCopy");return(()=>{var o=n$();return nv(o,"click",i()==="NoCopy"?()=>{navigator.clipboard.writeText(TS(e.value)).then(()=>{s("SuccessCopy"),setTimeout(()=>{s("NoCopy")},1500)},a=>{s("ErrorCopy"),setTimeout(()=>{s("NoCopy")},1500)})}:void 0,!0),V(o,L(j3,{get children(){return[L(dc,{get when(){return i()==="NoCopy"},get children(){return L(Gj,{})}}),L(dc,{get when(){return i()==="SuccessCopy"},get children(){return L(Vj,{get theme(){return t()}})}}),L(dc,{get when(){return i()==="ErrorCopy"},get children(){return L(Wj,{})}})]}})),be(a=>{var l=r().actionButton,u=`${i()==="NoCopy"?"Copy object to clipboard":i()==="SuccessCopy"?"Object copied to clipboard":"Error copying object to clipboard"}`;return l!==a.e&&se(o,a.e=l),u!==a.t&&re(o,"aria-label",a.t=u),a},{e:void 0,t:void 0}),o})()},h$=e=>{const t=xt(),n=ye().shadowDOMTarget?je.bind({target:ye().shadowDOMTarget}):je,r=U(()=>t()==="dark"?so(n):io(n)),i=ye().client;return(()=>{var s=r$();return s.$$click=()=>{const o=e.activeQuery.state.data,a=mi(o,e.dataPath,[]);i.setQueryData(e.activeQuery.queryKey,a)},V(s,L(Qj,{})),be(()=>se(s,r().actionButton)),s})()},Om=e=>{const t=xt(),n=ye().shadowDOMTarget?je.bind({target:ye().shadowDOMTarget}):je,r=U(()=>t()==="dark"?so(n):io(n)),i=ye().client;return(()=>{var s=i$();return s.$$click=()=>{const o=e.activeQuery.state.data,a=To(o,e.dataPath);i.setQueryData(e.activeQuery.queryKey,a)},V(s,L(G1,{})),be(()=>se(s,fe(r().actionButton))),s})()},g$=e=>{const t=xt(),n=ye().shadowDOMTarget?je.bind({target:ye().shadowDOMTarget}):je,r=U(()=>t()==="dark"?so(n):io(n)),i=ye().client;return(()=>{var s=s$();return s.$$click=()=>{const o=e.activeQuery.state.data,a=mi(o,e.dataPath,!e.value);i.setQueryData(e.activeQuery.queryKey,a)},V(s,L(Yj,{get theme(){return t()},get checked(){return e.value}})),be(()=>se(s,fe(r().actionButton,n`
|
|
76
76
|
width: ${K.size[3.5]};
|
|
77
77
|
height: ${K.size[3.5]};
|
|
78
|
-
`))),s})()};function
|
|
78
|
+
`))),s})()};function Em(e){return Symbol.iterator in e}function Gr(e){var g;const t=xt(),n=ye().shadowDOMTarget?je.bind({target:ye().shadowDOMTarget}):je,r=U(()=>t()==="dark"?so(n):io(n)),i=ye().client,[s,o]=ce((e.defaultExpanded||[]).includes(e.label)),a=()=>o(m=>!m),[l,u]=ce([]),c=U(()=>Array.isArray(e.value)?e.value.map((m,p)=>({label:p.toString(),value:m})):e.value!==null&&typeof e.value=="object"&&Em(e.value)&&typeof e.value[Symbol.iterator]=="function"?e.value instanceof Map?Array.from(e.value,([m,p])=>({label:m,value:p})):Array.from(e.value,(m,p)=>({label:p.toString(),value:m})):typeof e.value=="object"&&e.value!==null?Object.entries(e.value).map(([m,p])=>({label:m,value:p})):[]),d=U(()=>Array.isArray(e.value)?"array":e.value!==null&&typeof e.value=="object"&&Em(e.value)&&typeof e.value[Symbol.iterator]=="function"?"Iterable":typeof e.value=="object"&&e.value!==null?"object":typeof e.value),f=U(()=>d$(c(),100)),h=(g=e.dataPath)!=null?g:[];return(()=>{var m=ko();return V(m,L(ve,{get when(){return f().length},get children(){return[(()=>{var p=a$(),v=p.firstChild,b=v.firstChild,S=b.nextSibling,C=S.nextSibling,x=C.nextSibling,k=x.firstChild;return v.$$click=()=>a(),V(v,L(km,{get expanded(){return s()}}),b),V(S,()=>e.label),V(x,()=>String(d()).toLowerCase()==="iterable"?"(Iterable) ":"",k),V(x,()=>c().length,k),V(x,()=>c().length>1?"items":"item",null),V(p,L(ve,{get when(){return e.editable},get children(){var w=ko();return V(w,L(f$,{get value(){return e.value}}),null),V(w,L(ve,{get when(){return e.itemsDeletable&&e.activeQuery!==void 0},get children(){return L(Om,{get activeQuery(){return e.activeQuery},dataPath:h})}}),null),V(w,L(ve,{get when(){return d()==="array"&&e.activeQuery!==void 0},get children(){return L(h$,{get activeQuery(){return e.activeQuery},dataPath:h})}}),null),V(w,L(ve,{get when(){return U(()=>!!e.onEdit)()&&!wv(e.value).meta},get children(){var _=o$();return _.$$click=()=>{var O;(O=e.onEdit)==null||O.call(e)},V(_,L(Kj,{})),be(()=>se(_,r().actionButton)),_}}),null),be(()=>se(w,r().actions)),w}}),null),be(w=>{var _=r().expanderButtonContainer,O=r().expanderButton,E=r().info;return _!==w.e&&se(p,w.e=_),O!==w.t&&se(v,w.t=O),E!==w.a&&se(x,w.a=E),w},{e:void 0,t:void 0,a:void 0}),p})(),L(ve,{get when(){return s()},get children(){return[L(ve,{get when(){return f().length===1},get children(){var p=ko();return V(p,L(du,{get each(){return c()},by:v=>v.label,children:v=>L(Gr,{get defaultExpanded(){return e.defaultExpanded},get label(){return v().label},get value(){return v().value},get editable(){return e.editable},get dataPath(){return[...h,v().label]},get activeQuery(){return e.activeQuery},get itemsDeletable(){return d()==="array"||d()==="Iterable"||d()==="object"}})})),be(()=>se(p,r().subEntry)),p}}),L(ve,{get when(){return f().length>1},get children(){var p=ko();return V(p,L(M3,{get each(){return f()},children:(v,b)=>(()=>{var S=c$(),C=S.firstChild,x=C.firstChild,k=x.firstChild,w=k.nextSibling,_=w.nextSibling,O=_.nextSibling;return O.nextSibling,x.$$click=()=>u(E=>E.includes(b)?E.filter(T=>T!==b):[...E,b]),V(x,L(km,{get expanded(){return l().includes(b)}}),k),V(x,b*100,w),V(x,b*100+100-1,O),V(C,L(ve,{get when(){return l().includes(b)},get children(){var E=ko();return V(E,L(du,{get each(){return v()},by:T=>T.label,children:T=>L(Gr,{get defaultExpanded(){return e.defaultExpanded},get label(){return T().label},get value(){return T().value},get editable(){return e.editable},get dataPath(){return[...h,T().label]},get activeQuery(){return e.activeQuery}})})),be(()=>se(E,r().subEntry)),E}}),null),be(E=>{var T=r().entry,j=r().expanderButton;return T!==E.e&&se(C,E.e=T),j!==E.t&&se(x,E.t=j),E},{e:void 0,t:void 0}),S})()})),be(()=>se(p,r().subEntry)),p}})]}})]}}),null),V(m,L(ve,{get when(){return f().length===0},get children(){var p=u$(),v=p.firstChild,b=v.firstChild;return V(v,()=>e.label,b),V(p,L(ve,{get when(){return U(()=>!!(e.editable&&e.activeQuery!==void 0))()&&(d()==="string"||d()==="number"||d()==="boolean")},get fallback(){return(()=>{var S=_m();return V(S,()=>Wl(e.value)),be(()=>se(S,r().value)),S})()},get children(){return[L(ve,{get when(){return U(()=>!!(e.editable&&e.activeQuery!==void 0))()&&(d()==="string"||d()==="number")},get children(){var S=l$();return S.addEventListener("change",C=>{const x=e.activeQuery.state.data,k=mi(x,h,d()==="number"?C.target.valueAsNumber:C.target.value);i.setQueryData(e.activeQuery.queryKey,k)}),be(C=>{var x=d()==="number"?"number":"text",k=fe(r().value,r().editableInput);return x!==C.e&&re(S,"type",C.e=x),k!==C.t&&se(S,C.t=k),C},{e:void 0,t:void 0}),be(()=>S.value=e.value),S}}),L(ve,{get when(){return d()==="boolean"},get children(){var S=_m();return V(S,L(g$,{get activeQuery(){return e.activeQuery},dataPath:h,get value(){return e.value}}),null),V(S,()=>Wl(e.value),null),be(()=>se(S,fe(r().value,r().actions,r().editableInput))),S}})]}}),null),V(p,L(ve,{get when(){return e.editable&&e.itemsDeletable&&e.activeQuery!==void 0},get children(){return L(Om,{get activeQuery(){return e.activeQuery},dataPath:h})}}),null),be(S=>{var C=r().row,x=r().label;return C!==S.e&&se(p,S.e=C),x!==S.t&&se(v,S.t=x),S},{e:void 0,t:void 0}),p}}),null),be(()=>se(m,r().entry)),m})()}var K1=(e,t)=>{const{colors:n,font:r,size:i,border:s}=K,o=(a,l)=>e==="light"?a:l;return{entry:t`
|
|
79
79
|
& * {
|
|
80
80
|
font-size: ${r.size.xs};
|
|
81
81
|
font-family:
|
|
@@ -187,7 +187,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
187
187
|
outline: 2px solid ${n.blue[800]};
|
|
188
188
|
outline-offset: 2px;
|
|
189
189
|
}
|
|
190
|
-
`}},
|
|
190
|
+
`}},io=e=>K1("light",e),so=e=>K1("dark",e);ku(["click"]);var y$=he('<div><div aria-hidden=true></div><button type=button aria-label="Open Tanstack query devtools"class=tsqd-open-btn>'),Ya=he("<div>"),m$=he('<aside aria-label="Tanstack query devtools"><div></div><button aria-label="Close tanstack query devtools">'),p$=he("<select name=tsqd-queries-filter-sort>"),v$=he("<select name=tsqd-mutations-filter-sort>"),b$=he("<span>Asc"),x$=he("<span>Desc"),w$=he('<button aria-label="Open in picture-in-picture mode"title="Open in picture-in-picture mode">'),S$=he("<div>Settings"),C$=he("<span>Position"),_$=he("<span>Top"),k$=he("<span>Bottom"),O$=he("<span>Left"),E$=he("<span>Right"),A$=he("<span>Theme"),P$=he("<span>Light"),T$=he("<span>Dark"),M$=he("<span>System"),j$=he("<div><div class=tsqd-queries-container>"),$$=he("<div><div class=tsqd-mutations-container>"),D$=he('<div><div><div><button aria-label="Close Tanstack query devtools"><span>TANSTACK</span><span> v</span></button></div></div><div><div><div><input aria-label="Filter queries by query key"type=text placeholder=Filter name=tsqd-query-filter-input></div><div></div><button class=tsqd-query-filter-sort-order-btn></button></div><div><button aria-label="Clear query cache"></button><button>'),Am=he("<option>Sort by "),L$=he("<div class=tsqd-query-disabled-indicator>disabled"),I$=he("<div class=tsqd-query-static-indicator>static"),V1=he("<button><div></div><code class=tsqd-query-hash>"),R$=he("<div role=tooltip id=tsqd-status-tooltip>"),N$=he("<span>"),F$=he("<button><span></span><span>"),B$=he("<button><span></span> Error"),q$=he('<div><span></span>Trigger Error<select><option value=""disabled selected>'),z$=he('<div class="tsqd-query-details-explorer-container tsqd-query-details-data-explorer">'),H$=he("<form><textarea name=data></textarea><div><span></span><div><button type=button>Cancel</button><button>Save"),U$=he('<div><div>Query Details</div><div><div class=tsqd-query-details-summary><pre><code></code></pre><span></span></div><div class=tsqd-query-details-observers-count><span>Observers:</span><span></span></div><div class=tsqd-query-details-last-updated><span>Last Updated:</span><span></span></div></div><div>Actions</div><div><button><span></span>Refetch</button><button><span></span>Invalidate</button><button><span></span>Reset</button><button><span></span>Remove</button><button><span></span> Loading</button></div><div>Data </div><div>Query Explorer</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer">'),G$=he("<option>"),K$=he('<div><div>Mutation Details</div><div><div class=tsqd-query-details-summary><pre><code></code></pre><span></span></div><div class=tsqd-query-details-last-updated><span>Submitted At:</span><span></span></div></div><div>Variables Details</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"></div><div>Context Details</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"></div><div>Data Explorer</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"></div><div>Mutations Explorer</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer">'),[sn,rc]=ce(null),[Wr,W1]=ce(null),[jn,vh]=ce(0),[Oo,V$]=ce(!1),W$=e=>{const t=xt(),n=ye().shadowDOMTarget?je.bind({target:ye().shadowDOMTarget}):je,r=U(()=>t()==="dark"?En(n):On(n)),i=U(()=>ye().onlineManager);xr(()=>{const d=i().subscribe(f=>{V$(!f)});_e(()=>{d()})});const s=Zf(),o=U(()=>ye().buttonPosition||QA),a=U(()=>e.localStore.open==="true"?!0:e.localStore.open==="false"?!1:ye().initialIsOpen||YA),l=U(()=>e.localStore.position||ye().position||Xd);let u;xe(()=>{const d=u.parentElement,f=e.localStore.height||vb,h=e.localStore.width||bb,g=l();d.style.setProperty("--tsqd-panel-height",`${g==="top"?"-":""}${f}px`),d.style.setProperty("--tsqd-panel-width",`${g==="left"?"-":""}${h}px`)}),xr(()=>{const d=()=>{const f=u.parentElement,h=getComputedStyle(f).fontSize;f.style.setProperty("--tsqd-font-size",h)};d(),window.addEventListener("focus",d),_e(()=>{window.removeEventListener("focus",d)})});const c=U(()=>{var d;return(d=e.localStore.pip_open)!=null?d:"false"});return[L(ve,{get when(){return U(()=>!!s().pipWindow)()&&c()=="true"},get children(){return L(ov,{get mount(){var d;return(d=s().pipWindow)==null?void 0:d.document.body},get children(){return L(Q$,{get children(){return L(bh,e)}})}})}}),(()=>{var d=Ya(),f=u;return typeof f=="function"?Xs(f,d):u=d,V(d,L(Uy,{name:"tsqd-panel-transition",get children(){return L(ve,{get when(){return U(()=>!!(a()&&!s().pipWindow))()&&c()=="false"},get children(){return L(X$,{get localStore(){return e.localStore},get setLocalStore(){return e.setLocalStore}})}})}}),null),V(d,L(Uy,{name:"tsqd-button-transition",get children(){return L(ve,{get when(){return!a()},get children(){var h=y$(),g=h.firstChild,m=g.nextSibling;return V(g,L(Cm,{})),m.$$click=()=>e.setLocalStore("open","true"),V(m,L(Cm,{})),be(()=>se(h,fe(r().devtoolsBtn,r()[`devtoolsBtn-position-${o()}`],"tsqd-open-btn-container"))),h}})}}),null),be(()=>se(d,fe(n`
|
|
191
191
|
& .tsqd-panel-transition-exit-active,
|
|
192
192
|
& .tsqd-panel-transition-enter-active {
|
|
193
193
|
transition:
|
|
@@ -213,62 +213,62 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
213
213
|
transform: ${o()==="relative"?"none;":o()==="top-left"?"translateX(-72px);":o()==="top-right"?"translateX(72px);":"translateY(72px);"};
|
|
214
214
|
opacity: 0;
|
|
215
215
|
}
|
|
216
|
-
`,"tsqd-transitions-container"))),d})()]},
|
|
216
|
+
`,"tsqd-transitions-container"))),d})()]},Q$=e=>{const t=Zf(),n=xt(),r=ye().shadowDOMTarget?je.bind({target:ye().shadowDOMTarget}):je,i=U(()=>n()==="dark"?En(r):On(r)),s=()=>{const{colors:o}=K,a=(l,u)=>n()==="dark"?u:l;return jn()<Fi?r`
|
|
217
217
|
flex-direction: column;
|
|
218
218
|
background-color: ${a(o.gray[300],o.gray[600])};
|
|
219
219
|
`:r`
|
|
220
220
|
flex-direction: row;
|
|
221
221
|
background-color: ${a(o.gray[200],o.darkGray[900])};
|
|
222
|
-
`};return
|
|
222
|
+
`};return xe(()=>{const o=t().pipWindow,a=()=>{o&&vh(o.innerWidth)};o&&(o.addEventListener("resize",a),a()),_e(()=>{o&&o.removeEventListener("resize",a)})}),(()=>{var o=Ya();return o.style.setProperty("--tsqd-font-size","16px"),o.style.setProperty("max-height","100vh"),o.style.setProperty("height","100vh"),o.style.setProperty("width","100vw"),V(o,()=>e.children),be(()=>se(o,fe(i().panel,s(),{[r`
|
|
223
223
|
min-width: min-content;
|
|
224
|
-
`]:
|
|
224
|
+
`]:jn()<Yf},"tsqd-main-panel"))),o})()},Y$=e=>{const t=xt(),n=ye().shadowDOMTarget?je.bind({target:ye().shadowDOMTarget}):je,r=U(()=>t()==="dark"?En(n):On(n));let i;xr(()=>{Ob(i,({width:o},a)=>{a===i&&vh(o)})});const s=()=>{const{colors:o}=K,a=(l,u)=>t()==="dark"?u:l;return jn()<Fi?n`
|
|
225
225
|
flex-direction: column;
|
|
226
226
|
background-color: ${a(o.gray[300],o.gray[600])};
|
|
227
227
|
`:n`
|
|
228
228
|
flex-direction: row;
|
|
229
229
|
background-color: ${a(o.gray[200],o.darkGray[900])};
|
|
230
|
-
`};return(()=>{var o=
|
|
230
|
+
`};return(()=>{var o=Ya(),a=i;return typeof a=="function"?Xs(a,o):i=o,o.style.setProperty("--tsqd-font-size","16px"),V(o,()=>e.children),be(()=>se(o,fe(r().parentPanel,s(),{[n`
|
|
231
231
|
min-width: min-content;
|
|
232
|
-
`]:
|
|
232
|
+
`]:jn()<Yf},"tsqd-main-panel"))),o})()},X$=e=>{const t=xt(),n=ye().shadowDOMTarget?je.bind({target:ye().shadowDOMTarget}):je,r=U(()=>t()==="dark"?En(n):On(n)),[i,s]=ce(!1),o=U(()=>e.localStore.position||ye().position||Xd),a=c=>{const d=c.currentTarget.parentElement;if(!d)return;s(!0);const{height:f,width:h}=d.getBoundingClientRect(),g=c.clientX,m=c.clientY;let p=0;const v=i0(3.5),b=i0(12),S=x=>{if(x.preventDefault(),o()==="left"||o()==="right"){const k=o()==="right"?g-x.clientX:x.clientX-g;p=Math.round(h+k),p<b&&(p=b),e.setLocalStore("width",String(Math.round(p)));const w=d.getBoundingClientRect().width;Number(e.localStore.width)<w&&e.setLocalStore("width",String(w))}else{const k=o()==="bottom"?m-x.clientY:x.clientY-m;p=Math.round(f+k),p<v&&(p=v,rc(null)),e.setLocalStore("height",String(Math.round(p)))}},C=()=>{i()&&s(!1),document.removeEventListener("mousemove",S,!1),document.removeEventListener("mouseUp",C,!1)};document.addEventListener("mousemove",S,!1),document.addEventListener("mouseup",C,!1)};let l;xr(()=>{Ob(l,({width:c},d)=>{d===l&&vh(c)})}),xe(()=>{var m,p;const c=(p=(m=l.parentElement)==null?void 0:m.parentElement)==null?void 0:p.parentElement;if(!c)return;const d=e.localStore.position||Xd,f=MS("padding",d),h=e.localStore.position==="left"||e.localStore.position==="right",g=(({padding:v,paddingTop:b,paddingBottom:S,paddingLeft:C,paddingRight:x})=>({padding:v,paddingTop:b,paddingBottom:S,paddingLeft:C,paddingRight:x}))(c.style);c.style[f]=`${h?e.localStore.width:e.localStore.height}px`,_e(()=>{Object.entries(g).forEach(([v,b])=>{c.style[v]=b})})});const u=()=>{const{colors:c}=K,d=(f,h)=>t()==="dark"?h:f;return jn()<Fi?n`
|
|
233
233
|
flex-direction: column;
|
|
234
|
-
background-color: ${d(
|
|
234
|
+
background-color: ${d(c.gray[300],c.gray[600])};
|
|
235
235
|
`:n`
|
|
236
236
|
flex-direction: row;
|
|
237
|
-
background-color: ${d(
|
|
238
|
-
`};return(()=>{var
|
|
237
|
+
background-color: ${d(c.gray[200],c.darkGray[900])};
|
|
238
|
+
`};return(()=>{var c=m$(),d=c.firstChild,f=d.nextSibling,h=l;return typeof h=="function"?Xs(h,c):l=c,d.$$mousedown=a,f.$$click=()=>e.setLocalStore("open","false"),V(f,L(Ko,{})),V(c,L(bh,e),null),be(g=>{var m=fe(r().panel,r()[`panel-position-${o()}`],u(),{[n`
|
|
239
239
|
min-width: min-content;
|
|
240
|
-
`]:
|
|
240
|
+
`]:jn()<Yf&&(o()==="right"||o()==="left")},"tsqd-main-panel"),p=o()==="bottom"||o()==="top"?`${e.localStore.height||vb}px`:"auto",v=o()==="right"||o()==="left"?`${e.localStore.width||bb}px`:"auto",b=fe(r().dragHandle,r()[`dragHandle-position-${o()}`],"tsqd-drag-handle"),S=fe(r().closeBtn,r()[`closeBtn-position-${o()}`],"tsqd-minimize-btn");return m!==g.e&&se(c,g.e=m),p!==g.t&&((g.t=p)!=null?c.style.setProperty("height",p):c.style.removeProperty("height")),v!==g.a&&((g.a=v)!=null?c.style.setProperty("width",v):c.style.removeProperty("width")),b!==g.o&&se(d,g.o=b),S!==g.i&&se(f,g.i=S),g},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),c})()},bh=e=>{iD(),sD();let t;const n=xt(),r=ye().shadowDOMTarget?je.bind({target:ye().shadowDOMTarget}):je,i=U(()=>n()==="dark"?En(r):On(r)),s=Zf(),[o,a]=ce("queries"),l=U(()=>e.localStore.sort||ZA),u=U(()=>Number(e.localStore.sortOrder)||Ry),c=U(()=>e.localStore.mutationSort||JA),d=U(()=>Number(e.localStore.mutationSortOrder)||Ry),f=U(()=>bd[l()]),h=U(()=>xd[c()]),g=U(()=>ye().onlineManager),m=U(()=>ye().client.getQueryCache()),p=U(()=>ye().client.getMutationCache()),v=pt(w=>w().getAll().length,!1),b=U(br(()=>[v(),e.localStore.filter,l(),u()],()=>{const w=m().getAll(),_=e.localStore.filter?w.filter(E=>Ny(E.queryHash,e.localStore.filter||"").passed):[...w];return f()?_.sort((E,T)=>f()(E,T)*u()):_})),S=Mn(w=>w().getAll().length,!1),C=U(br(()=>[S(),e.localStore.mutationFilter,c(),d()],()=>{const w=p().getAll(),_=e.localStore.mutationFilter?w.filter(E=>{const T=`${E.options.mutationKey?JSON.stringify(E.options.mutationKey)+" - ":""}${new Date(E.state.submittedAt).toLocaleString()}`;return Ny(T,e.localStore.mutationFilter||"").passed}):[...w];return h()?_.sort((E,T)=>h()(E,T)*d()):_})),x=w=>{e.setLocalStore("position",w)},k=w=>{const O=getComputedStyle(t).getPropertyValue("--tsqd-font-size");w.style.setProperty("--tsqd-font-size",O)};return[(()=>{var w=D$(),_=w.firstChild,O=_.firstChild,E=O.firstChild,T=E.firstChild,j=T.nextSibling,B=j.firstChild,R=_.nextSibling,A=R.firstChild,M=A.firstChild,D=M.firstChild,H=M.nextSibling,Q=H.nextSibling,F=A.nextSibling,G=F.firstChild,ie=G.nextSibling,ae=t;return typeof ae=="function"?Xs(ae,w):t=w,E.$$click=()=>{if(!s().pipWindow&&!e.showPanelViewOnly){e.setLocalStore("open","false");return}e.onClose&&e.onClose()},V(j,()=>ye().queryFlavor,B),V(j,()=>ye().version,null),V(O,L(mn.Root,{get class(){return fe(i().viewToggle)},get value(){return o()},onChange:N=>{a(N),rc(null),W1(null)},get children(){return[L(mn.Item,{value:"queries",class:"tsqd-radio-toggle",get children(){return[L(mn.ItemInput,{}),L(mn.ItemControl,{get children(){return L(mn.ItemIndicator,{})}}),L(mn.ItemLabel,{title:"Toggle Queries View",children:"Queries"})]}}),L(mn.Item,{value:"mutations",class:"tsqd-radio-toggle",get children(){return[L(mn.ItemInput,{}),L(mn.ItemControl,{get children(){return L(mn.ItemIndicator,{})}}),L(mn.ItemLabel,{title:"Toggle Mutations View",children:"Mutations"})]}})]}}),null),V(_,L(ve,{get when(){return o()==="queries"},get children(){return L(eD,{})}}),null),V(_,L(ve,{get when(){return o()==="mutations"},get children(){return L(tD,{})}}),null),V(M,L(Lj,{}),D),D.$$input=N=>{o()==="queries"?e.setLocalStore("filter",N.currentTarget.value):e.setLocalStore("mutationFilter",N.currentTarget.value)},V(H,L(ve,{get when(){return o()==="queries"},get children(){var N=p$();return N.addEventListener("change",le=>{e.setLocalStore("sort",le.currentTarget.value)}),V(N,()=>Object.keys(bd).map(le=>(()=>{var te=Am();return te.firstChild,te.value=le,V(te,le,null),te})())),be(()=>N.value=l()),N}}),null),V(H,L(ve,{get when(){return o()==="mutations"},get children(){var N=v$();return N.addEventListener("change",le=>{e.setLocalStore("mutationSort",le.currentTarget.value)}),V(N,()=>Object.keys(xd).map(le=>(()=>{var te=Am();return te.firstChild,te.value=le,V(te,le,null),te})())),be(()=>N.value=c()),N}}),null),V(H,L(Ko,{}),null),Q.$$click=()=>{o()==="queries"?e.setLocalStore("sortOrder",String(u()*-1)):e.setLocalStore("mutationSortOrder",String(d()*-1))},V(Q,L(ve,{get when(){return(o()==="queries"?u():d())===1},get children(){return[b$(),L(wm,{})]}}),null),V(Q,L(ve,{get when(){return(o()==="queries"?u():d())===-1},get children(){return[x$(),L(Sm,{})]}}),null),G.$$click=()=>{o()==="queries"?(Kn({type:"CLEAR_QUERY_CACHE"}),m().clear()):(Kn({type:"CLEAR_MUTATION_CACHE"}),p().clear())},V(G,L(G1,{})),ie.$$click=()=>{g().setOnline(!g().isOnline())},V(ie,(()=>{var N=U(()=>!!Oo());return()=>N()?L(zj,{}):L(qj,{})})()),V(F,L(ve,{get when(){return U(()=>!s().pipWindow)()&&!s().disabled},get children(){var N=w$();return N.$$click=()=>{var le;s().requestPipWindow(Number(window.innerWidth),Number((le=e.localStore.height)!=null?le:500))},V(N,L(Uj,{})),be(()=>se(N,fe(i().actionsBtn,"tsqd-actions-btn","tsqd-action-open-pip"))),N}}),null),V(F,L(ft.Root,{gutter:4,get children(){return[L(ft.Trigger,{get class(){return fe(i().actionsBtn,"tsqd-actions-btn","tsqd-action-settings")},get children(){return L(Hj,{})}}),L(ft.Portal,{ref:N=>k(N),get mount(){return U(()=>!!s().pipWindow)()?s().pipWindow.document.body:document.body},get children(){return L(ft.Content,{get class(){return fe(i().settingsMenu,"tsqd-settings-menu")},get children(){return[(()=>{var N=S$();return be(()=>se(N,fe(i().settingsMenuHeader,"tsqd-settings-menu-header"))),N})(),L(ve,{get when(){return!e.showPanelViewOnly},get children(){return L(ft.Sub,{overlap:!0,gutter:8,shift:-4,get children(){return[L(ft.SubTrigger,{get class(){return fe(i().settingsSubTrigger,"tsqd-settings-menu-sub-trigger","tsqd-settings-menu-sub-trigger-position")},get children(){return[C$(),L(Ko,{})]}}),L(ft.Portal,{ref:N=>k(N),get mount(){return U(()=>!!s().pipWindow)()?s().pipWindow.document.body:document.body},get children(){return L(ft.SubContent,{get class(){return fe(i().settingsMenu,"tsqd-settings-submenu")},get children(){return[L(ft.Item,{onSelect:()=>{x("top")},as:"button",get class(){return fe(i().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-top")},get children(){return[_$(),L(wm,{})]}}),L(ft.Item,{onSelect:()=>{x("bottom")},as:"button",get class(){return fe(i().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-bottom")},get children(){return[k$(),L(Sm,{})]}}),L(ft.Item,{onSelect:()=>{x("left")},as:"button",get class(){return fe(i().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-left")},get children(){return[O$(),L(Ij,{})]}}),L(ft.Item,{onSelect:()=>{x("right")},as:"button",get class(){return fe(i().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-right")},get children(){return[E$(),L(Rj,{})]}})]}})}})]}})}}),L(ft.Sub,{overlap:!0,gutter:8,shift:-4,get children(){return[L(ft.SubTrigger,{get class(){return fe(i().settingsSubTrigger,"tsqd-settings-menu-sub-trigger","tsqd-settings-menu-sub-trigger-position")},get children(){return[A$(),L(Ko,{})]}}),L(ft.Portal,{ref:N=>k(N),get mount(){return U(()=>!!s().pipWindow)()?s().pipWindow.document.body:document.body},get children(){return L(ft.SubContent,{get class(){return fe(i().settingsMenu,"tsqd-settings-submenu")},get children(){return[L(ft.Item,{onSelect:()=>{e.setLocalStore("theme_preference","light")},as:"button",get class(){return fe(i().settingsSubButton,e.localStore.theme_preference==="light"&&i().themeSelectedButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-top")},get children(){return[P$(),L(Nj,{})]}}),L(ft.Item,{onSelect:()=>{e.setLocalStore("theme_preference","dark")},as:"button",get class(){return fe(i().settingsSubButton,e.localStore.theme_preference==="dark"&&i().themeSelectedButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-bottom")},get children(){return[T$(),L(Fj,{})]}}),L(ft.Item,{onSelect:()=>{e.setLocalStore("theme_preference","system")},as:"button",get class(){return fe(i().settingsSubButton,e.localStore.theme_preference==="system"&&i().themeSelectedButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-left")},get children(){return[M$(),L(Bj,{})]}})]}})}})]}})]}})}})]}}),null),V(w,L(ve,{get when(){return o()==="queries"},get children(){var N=j$(),le=N.firstChild;return V(le,L(du,{by:te=>te.queryHash,get each(){return b()},children:te=>L(Z$,{get query(){return te()}})})),be(()=>se(N,fe(i().overflowQueryContainer,"tsqd-queries-overflow-container"))),N}}),null),V(w,L(ve,{get when(){return o()==="mutations"},get children(){var N=$$(),le=N.firstChild;return V(le,L(du,{by:te=>te.mutationId,get each(){return C()},children:te=>L(J$,{get mutation(){return te()}})})),be(()=>se(N,fe(i().overflowQueryContainer,"tsqd-mutations-overflow-container"))),N}}),null),be(N=>{var le=fe(i().queriesContainer,jn()<Fi&&(sn()||Wr())&&r`
|
|
241
241
|
height: 50%;
|
|
242
242
|
max-height: 50%;
|
|
243
|
-
`,
|
|
243
|
+
`,jn()<Fi&&!(sn()||Wr())&&r`
|
|
244
244
|
height: 100%;
|
|
245
245
|
max-height: 100%;
|
|
246
|
-
`,"tsqd-queries-container"),
|
|
246
|
+
`,"tsqd-queries-container"),te=fe(i().row,"tsqd-header"),me=i().logoAndToggleContainer,J=fe(i().logo,"tsqd-text-logo-container"),Ce=fe(i().tanstackLogo,"tsqd-text-logo-tanstack"),ge=fe(i().queryFlavorLogo,"tsqd-text-logo-query-flavor"),ze=fe(i().row,"tsqd-filters-actions-container"),oe=fe(i().filtersContainer,"tsqd-filters-container"),He=fe(i().filterInput,"tsqd-query-filter-textfield-container"),lt=fe("tsqd-query-filter-textfield"),dt=fe(i().filterSelect,"tsqd-query-filter-sort-container"),Ne=`Sort order ${(o()==="queries"?u():d())===-1?"descending":"ascending"}`,Fe=(o()==="queries"?u():d())===-1,Y=fe(i().actionsContainer,"tsqd-actions-container"),Pe=fe(i().actionsBtn,"tsqd-actions-btn","tsqd-action-clear-cache"),tt=`Clear ${o()} cache`,$e=fe(i().actionsBtn,Oo()&&i().actionsBtnOffline,"tsqd-actions-btn","tsqd-action-mock-offline-behavior"),ue=`${Oo()?"Unset offline mocking behavior":"Mock offline behavior"}`,W=Oo(),ne=`${Oo()?"Unset offline mocking behavior":"Mock offline behavior"}`;return le!==N.e&&se(w,N.e=le),te!==N.t&&se(_,N.t=te),me!==N.a&&se(O,N.a=me),J!==N.o&&se(E,N.o=J),Ce!==N.i&&se(T,N.i=Ce),ge!==N.n&&se(j,N.n=ge),ze!==N.s&&se(R,N.s=ze),oe!==N.h&&se(A,N.h=oe),He!==N.r&&se(M,N.r=He),lt!==N.d&&se(D,N.d=lt),dt!==N.l&&se(H,N.l=dt),Ne!==N.u&&re(Q,"aria-label",N.u=Ne),Fe!==N.c&&re(Q,"aria-pressed",N.c=Fe),Y!==N.w&&se(F,N.w=Y),Pe!==N.m&&se(G,N.m=Pe),tt!==N.f&&re(G,"title",N.f=tt),$e!==N.y&&se(ie,N.y=$e),ue!==N.g&&re(ie,"aria-label",N.g=ue),W!==N.p&&re(ie,"aria-pressed",N.p=W),ne!==N.b&&re(ie,"title",N.b=ne),N},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0,g:void 0,p:void 0,b:void 0}),be(()=>D.value=o()==="queries"?e.localStore.filter||"":e.localStore.mutationFilter||""),w})(),L(ve,{get when(){return U(()=>o()==="queries")()&&sn()},get children(){return L(nD,{})}}),L(ve,{get when(){return U(()=>o()==="mutations")()&&Wr()},get children(){return L(rD,{})}})]},Z$=e=>{const t=xt(),n=ye().shadowDOMTarget?je.bind({target:ye().shadowDOMTarget}):je,r=U(()=>t()==="dark"?En(n):On(n)),{colors:i,alpha:s}=K,o=(g,m)=>t()==="dark"?m:g,a=pt(g=>{var m;return(m=g().find({queryKey:e.query.queryKey}))==null?void 0:m.state},!0,g=>g.query.queryHash===e.query.queryHash),l=pt(g=>{var m,p;return(p=(m=g().find({queryKey:e.query.queryKey}))==null?void 0:m.isDisabled())!=null?p:!1},!0,g=>g.query.queryHash===e.query.queryHash),u=pt(g=>{var m,p;return(p=(m=g().find({queryKey:e.query.queryKey}))==null?void 0:m.isStatic())!=null?p:!1},!0,g=>g.query.queryHash===e.query.queryHash),c=pt(g=>{var m,p;return(p=(m=g().find({queryKey:e.query.queryKey}))==null?void 0:m.isStale())!=null?p:!1},!0,g=>g.query.queryHash===e.query.queryHash),d=pt(g=>{var m,p;return(p=(m=g().find({queryKey:e.query.queryKey}))==null?void 0:m.getObserversCount())!=null?p:0},!0,g=>g.query.queryHash===e.query.queryHash),f=U(()=>jS({queryState:a(),observerCount:d(),isStale:c()})),h=()=>f()==="gray"?n`
|
|
247
247
|
background-color: ${o(i[f()][200],i[f()][700])};
|
|
248
248
|
color: ${o(i[f()][700],i[f()][300])};
|
|
249
249
|
`:n`
|
|
250
250
|
background-color: ${o(i[f()][200]+s[80],i[f()][900])};
|
|
251
251
|
color: ${o(i[f()][800],i[f()][300])};
|
|
252
|
-
`;return
|
|
253
|
-
background-color: ${o(i[
|
|
254
|
-
color: ${o(i[
|
|
252
|
+
`;return L(ve,{get when(){return a()},get children(){var g=V1(),m=g.firstChild,p=m.nextSibling;return g.$$click=()=>rc(e.query.queryHash===sn()?null:e.query.queryHash),V(m,d),V(p,()=>e.query.queryHash),V(g,L(ve,{get when(){return l()},get children(){return L$()}}),null),V(g,L(ve,{get when(){return u()},get children(){return I$()}}),null),be(v=>{var b=fe(r().queryRow,sn()===e.query.queryHash&&r().selectedQueryRow,"tsqd-query-row"),S=`Query key ${e.query.queryHash}`,C=fe(h(),"tsqd-query-observer-count");return b!==v.e&&se(g,v.e=b),S!==v.t&&re(g,"aria-label",v.t=S),C!==v.a&&se(m,v.a=C),v},{e:void 0,t:void 0,a:void 0}),g}})},J$=e=>{const t=xt(),n=ye().shadowDOMTarget?je.bind({target:ye().shadowDOMTarget}):je,r=U(()=>t()==="dark"?En(n):On(n)),{colors:i,alpha:s}=K,o=(f,h)=>t()==="dark"?h:f,a=Mn(f=>{const g=f().getAll().find(m=>m.mutationId===e.mutation.mutationId);return g==null?void 0:g.state}),l=Mn(f=>{const g=f().getAll().find(m=>m.mutationId===e.mutation.mutationId);return g?g.state.isPaused:!1}),u=Mn(f=>{const g=f().getAll().find(m=>m.mutationId===e.mutation.mutationId);return g?g.state.status:"idle"}),c=U(()=>os({isPaused:l(),status:u()})),d=()=>c()==="gray"?n`
|
|
253
|
+
background-color: ${o(i[c()][200],i[c()][700])};
|
|
254
|
+
color: ${o(i[c()][700],i[c()][300])};
|
|
255
255
|
`:n`
|
|
256
|
-
background-color: ${o(i[
|
|
257
|
-
color: ${o(i[
|
|
258
|
-
`;return
|
|
256
|
+
background-color: ${o(i[c()][200]+s[80],i[c()][900])};
|
|
257
|
+
color: ${o(i[c()][800],i[c()][300])};
|
|
258
|
+
`;return L(ve,{get when(){return a()},get children(){var f=V1(),h=f.firstChild,g=h.nextSibling;return f.$$click=()=>{W1(e.mutation.mutationId===Wr()?null:e.mutation.mutationId)},V(h,L(ve,{get when(){return c()==="purple"},get children(){return L(e$,{})}}),null),V(h,L(ve,{get when(){return c()==="green"},get children(){return L(Xj,{})}}),null),V(h,L(ve,{get when(){return c()==="red"},get children(){return L(Jj,{})}}),null),V(h,L(ve,{get when(){return c()==="yellow"},get children(){return L(Zj,{})}}),null),V(g,L(ve,{get when(){return e.mutation.options.mutationKey},get children(){return[U(()=>JSON.stringify(e.mutation.options.mutationKey))," -"," "]}}),null),V(g,()=>new Date(e.mutation.state.submittedAt).toLocaleString(),null),be(m=>{var p=fe(r().queryRow,Wr()===e.mutation.mutationId&&r().selectedQueryRow,"tsqd-query-row"),v=`Mutation submitted at ${new Date(e.mutation.state.submittedAt).toLocaleString()}`,b=fe(d(),"tsqd-query-observer-count");return p!==m.e&&se(f,m.e=p),v!==m.t&&re(f,"aria-label",m.t=v),b!==m.a&&se(h,m.a=b),m},{e:void 0,t:void 0,a:void 0}),f}})},eD=()=>{const e=pt(l=>l().getAll().filter(u=>ts(u)==="stale").length),t=pt(l=>l().getAll().filter(u=>ts(u)==="fresh").length),n=pt(l=>l().getAll().filter(u=>ts(u)==="fetching").length),r=pt(l=>l().getAll().filter(u=>ts(u)==="paused").length),i=pt(l=>l().getAll().filter(u=>ts(u)==="inactive").length),s=xt(),o=ye().shadowDOMTarget?je.bind({target:ye().shadowDOMTarget}):je,a=U(()=>s()==="dark"?En(o):On(o));return(()=>{var l=Ya();return V(l,L(fr,{label:"Fresh",color:"green",get count(){return t()}}),null),V(l,L(fr,{label:"Fetching",color:"blue",get count(){return n()}}),null),V(l,L(fr,{label:"Paused",color:"purple",get count(){return r()}}),null),V(l,L(fr,{label:"Stale",color:"yellow",get count(){return e()}}),null),V(l,L(fr,{label:"Inactive",color:"gray",get count(){return i()}}),null),be(()=>se(l,fe(a().queryStatusContainer,"tsqd-query-status-container"))),l})()},tD=()=>{const e=Mn(a=>a().getAll().filter(l=>os({isPaused:l.state.isPaused,status:l.state.status})==="green").length),t=Mn(a=>a().getAll().filter(l=>os({isPaused:l.state.isPaused,status:l.state.status})==="yellow").length),n=Mn(a=>a().getAll().filter(l=>os({isPaused:l.state.isPaused,status:l.state.status})==="purple").length),r=Mn(a=>a().getAll().filter(l=>os({isPaused:l.state.isPaused,status:l.state.status})==="red").length),i=xt(),s=ye().shadowDOMTarget?je.bind({target:ye().shadowDOMTarget}):je,o=U(()=>i()==="dark"?En(s):On(s));return(()=>{var a=Ya();return V(a,L(fr,{label:"Paused",color:"purple",get count(){return n()}}),null),V(a,L(fr,{label:"Pending",color:"yellow",get count(){return t()}}),null),V(a,L(fr,{label:"Success",color:"green",get count(){return e()}}),null),V(a,L(fr,{label:"Error",color:"red",get count(){return r()}}),null),be(()=>se(a,fe(o().queryStatusContainer,"tsqd-query-status-container"))),a})()},fr=e=>{const t=xt(),n=ye().shadowDOMTarget?je.bind({target:ye().shadowDOMTarget}):je,r=U(()=>t()==="dark"?En(n):On(n)),{colors:i,alpha:s}=K,o=(h,g)=>t()==="dark"?g:h;let a;const[l,u]=ce(!1),[c,d]=ce(!1),f=U(()=>!(sn()&&jn()<WA&&jn()>Fi||jn()<Fi));return(()=>{var h=F$(),g=h.firstChild,m=g.nextSibling,p=a;return typeof p=="function"?Xs(p,h):a=h,h.addEventListener("mouseleave",()=>{u(!1),d(!1)}),h.addEventListener("mouseenter",()=>u(!0)),h.addEventListener("blur",()=>d(!1)),h.addEventListener("focus",()=>d(!0)),rv(h,Ae({get disabled(){return f()},get class(){return fe(r().queryStatusTag,!f()&&n`
|
|
259
259
|
cursor: pointer;
|
|
260
260
|
&:hover {
|
|
261
261
|
background: ${o(i.gray[200],i.darkGray[400])}${s[80]};
|
|
262
262
|
}
|
|
263
|
-
`,"tsqd-query-status-tag",`tsqd-query-status-tag-${e.label.toLowerCase()}`)}},()=>l()||
|
|
263
|
+
`,"tsqd-query-status-tag",`tsqd-query-status-tag-${e.label.toLowerCase()}`)}},()=>l()||c()?{"aria-describedby":"tsqd-status-tooltip"}:{}),!1,!0),V(h,L(ve,{get when(){return U(()=>!f())()&&(l()||c())},get children(){var v=R$();return V(v,()=>e.label),be(()=>se(v,fe(r().statusTooltip,"tsqd-query-status-tooltip"))),v}}),g),V(h,L(ve,{get when(){return f()},get children(){var v=N$();return V(v,()=>e.label),be(()=>se(v,fe(r().queryStatusTagLabel,"tsqd-query-status-tag-label"))),v}}),m),V(m,()=>e.count),be(v=>{var b=fe(n`
|
|
264
264
|
width: ${K.size[1.5]};
|
|
265
265
|
height: ${K.size[1.5]};
|
|
266
266
|
border-radius: ${K.border.radius.full};
|
|
267
267
|
background-color: ${K.colors[e.color][500]};
|
|
268
|
-
`,"tsqd-query-status-tag-dot"),S=
|
|
268
|
+
`,"tsqd-query-status-tag-dot"),S=fe(r().queryStatusCount,e.count>0&&e.color!=="gray"&&n`
|
|
269
269
|
background-color: ${o(i[e.color][100],i[e.color][900])};
|
|
270
270
|
color: ${o(i[e.color][700],i[e.color][300])};
|
|
271
|
-
`,"tsqd-query-status-tag-count");return b!==v.e&&
|
|
271
|
+
`,"tsqd-query-status-tag-count");return b!==v.e&&se(g,v.e=b),S!==v.t&&se(m,v.t=S),v},{e:void 0,t:void 0}),h})()},nD=()=>{const e=xt(),t=ye().shadowDOMTarget?je.bind({target:ye().shadowDOMTarget}):je,n=U(()=>e()==="dark"?En(t):On(t)),{colors:r}=K,i=(O,E)=>e()==="dark"?E:O,s=ye().client,[o,a]=ce(!1),[l,u]=ce("view"),[c,d]=ce(!1),f=U(()=>ye().errorTypes||[]),h=pt(O=>O().getAll().find(E=>E.queryHash===sn()),!1),g=pt(O=>O().getAll().find(E=>E.queryHash===sn()),!1),m=pt(O=>{var E;return(E=O().getAll().find(T=>T.queryHash===sn()))==null?void 0:E.state},!1),p=pt(O=>{var E;return(E=O().getAll().find(T=>T.queryHash===sn()))==null?void 0:E.state.data},!1),v=pt(O=>{const E=O().getAll().find(T=>T.queryHash===sn());return E?ts(E):"inactive"}),b=pt(O=>{const E=O().getAll().find(T=>T.queryHash===sn());return E?E.state.status:"pending"}),S=pt(O=>{var E,T;return(T=(E=O().getAll().find(j=>j.queryHash===sn()))==null?void 0:E.getObserversCount())!=null?T:0}),C=U(()=>$S(v())),x=()=>{var E,T;Kn({type:"REFETCH",queryHash:(E=h())==null?void 0:E.queryHash});const O=(T=h())==null?void 0:T.fetch();O==null||O.catch(()=>{})},k=O=>{var B;const E=h();if(!E)return;Kn({type:"TRIGGER_ERROR",queryHash:E.queryHash,metadata:{error:O==null?void 0:O.name}});const T=(B=O==null?void 0:O.initializer(E))!=null?B:new Error("Unknown error from devtools"),j=E.options;E.setState({status:"error",error:T,fetchMeta:{...E.state.fetchMeta,__previousQueryOptions:j}})},w=()=>{const O=h();if(!O)return;Kn({type:"RESTORE_LOADING",queryHash:O.queryHash});const E=O.state,T=O.state.fetchMeta?O.state.fetchMeta.__previousQueryOptions:null;O.cancel({silent:!0}),O.setState({...E,fetchStatus:"idle",fetchMeta:null}),T&&O.fetch(T)};xe(()=>{v()!=="fetching"&&a(!1)});const _=()=>C()==="gray"?t`
|
|
272
272
|
background-color: ${i(r[C()][200],r[C()][700])};
|
|
273
273
|
color: ${i(r[C()][700],r[C()][300])};
|
|
274
274
|
border-color: ${i(r[C()][400],r[C()][600])};
|
|
@@ -276,37 +276,37 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
276
276
|
background-color: ${i(r[C()][100],r[C()][900])};
|
|
277
277
|
color: ${i(r[C()][700],r[C()][300])};
|
|
278
278
|
border-color: ${i(r[C()][400],r[C()][600])};
|
|
279
|
-
`;return
|
|
279
|
+
`;return L(ve,{get when(){return U(()=>!!h())()&&m()},get children(){var O=U$(),E=O.firstChild,T=E.nextSibling,j=T.firstChild,B=j.firstChild,R=B.firstChild,A=B.nextSibling,M=j.nextSibling,D=M.firstChild,H=D.nextSibling,Q=M.nextSibling,F=Q.firstChild,G=F.nextSibling,ie=T.nextSibling,ae=ie.nextSibling,N=ae.firstChild,le=N.firstChild,te=N.nextSibling,me=te.firstChild,J=te.nextSibling,Ce=J.firstChild,ge=J.nextSibling,ze=ge.firstChild,oe=ge.nextSibling,He=oe.firstChild,lt=He.nextSibling,dt=ae.nextSibling;dt.firstChild;var Ne=dt.nextSibling,Fe=Ne.nextSibling;return V(R,()=>Wl(h().queryKey,!0)),V(A,v),V(H,S),V(G,()=>new Date(m().dataUpdatedAt).toLocaleTimeString()),N.$$click=x,te.$$click=()=>{var Y;Kn({type:"INVALIDATE",queryHash:(Y=h())==null?void 0:Y.queryHash}),s.invalidateQueries(h())},J.$$click=()=>{var Y;Kn({type:"RESET",queryHash:(Y=h())==null?void 0:Y.queryHash}),s.resetQueries(h())},ge.$$click=()=>{var Y;Kn({type:"REMOVE",queryHash:(Y=h())==null?void 0:Y.queryHash}),s.removeQueries(h()),rc(null)},oe.$$click=()=>{var Y;if(((Y=h())==null?void 0:Y.state.data)===void 0)a(!0),w();else{const Pe=h();if(!Pe)return;Kn({type:"TRIGGER_LOADING",queryHash:Pe.queryHash});const tt=Pe.options;Pe.fetch({...tt,queryFn:()=>new Promise(()=>{}),gcTime:-1}),Pe.setState({data:void 0,status:"pending",fetchMeta:{...Pe.state.fetchMeta,__previousQueryOptions:tt}})}},V(oe,()=>b()==="pending"?"Restore":"Trigger",lt),V(ae,L(ve,{get when(){return f().length===0||b()==="error"},get children(){var Y=B$(),Pe=Y.firstChild,tt=Pe.nextSibling;return Y.$$click=()=>{var $e;h().state.error?(Kn({type:"RESTORE_ERROR",queryHash:($e=h())==null?void 0:$e.queryHash}),s.resetQueries(h())):k()},V(Y,()=>b()==="error"?"Restore":"Trigger",tt),be($e=>{var ue=fe(t`
|
|
280
280
|
color: ${i(r.red[500],r.red[400])};
|
|
281
|
-
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-error"),
|
|
281
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-error"),W=b()==="pending",ne=t`
|
|
282
282
|
background-color: ${i(r.red[500],r.red[400])};
|
|
283
|
-
`;return
|
|
283
|
+
`;return ue!==$e.e&&se(Y,$e.e=ue),W!==$e.t&&(Y.disabled=$e.t=W),ne!==$e.a&&se(Pe,$e.a=ne),$e},{e:void 0,t:void 0,a:void 0}),Y}}),null),V(ae,L(ve,{get when(){return!(f().length===0||b()==="error")},get children(){var Y=q$(),Pe=Y.firstChild,tt=Pe.nextSibling,$e=tt.nextSibling;return $e.firstChild,$e.addEventListener("change",ue=>{const W=f().find(ne=>ne.name===ue.currentTarget.value);k(W)}),V($e,L(T3,{get each(){return f()},children:ue=>(()=>{var W=G$();return V(W,()=>ue.name),be(()=>W.value=ue.name),W})()}),null),V(Y,L(Ko,{}),null),be(ue=>{var W=fe(n().actionsSelect,"tsqd-query-details-actions-btn","tsqd-query-details-action-error-multiple"),ne=t`
|
|
284
284
|
background-color: ${K.colors.red[400]};
|
|
285
|
-
`,
|
|
285
|
+
`,ee=b()==="pending";return W!==ue.e&&se(Y,ue.e=W),ne!==ue.t&&se(Pe,ue.t=ne),ee!==ue.a&&($e.disabled=ue.a=ee),ue},{e:void 0,t:void 0,a:void 0}),Y}}),null),V(dt,()=>l()==="view"?"Explorer":"Editor",null),V(O,L(ve,{get when(){return l()==="view"},get children(){var Y=z$();return V(Y,L(Gr,{label:"Data",defaultExpanded:["Data"],get value(){return p()},editable:!0,onEdit:()=>u("edit"),get activeQuery(){return h()}})),be(Pe=>(Pe=K.size[2])!=null?Y.style.setProperty("padding",Pe):Y.style.removeProperty("padding")),Y}}),Ne),V(O,L(ve,{get when(){return l()==="edit"},get children(){var Y=H$(),Pe=Y.firstChild,tt=Pe.nextSibling,$e=tt.firstChild,ue=$e.nextSibling,W=ue.firstChild,ne=W.nextSibling;return Y.addEventListener("submit",ee=>{ee.preventDefault();const gt=new FormData(ee.currentTarget).get("data");try{const Se=JSON.parse(gt);h().setState({...h().state,data:Se}),u("view")}catch(Se){d(!0)}}),Pe.addEventListener("focus",()=>d(!1)),V($e,()=>c()?"Invalid Value":""),W.$$click=()=>u("view"),be(ee=>{var we=fe(n().devtoolsEditForm,"tsqd-query-details-data-editor"),gt=n().devtoolsEditTextarea,Se=c(),Je=n().devtoolsEditFormActions,Be=n().devtoolsEditFormError,An=n().devtoolsEditFormActionContainer,Vt=fe(n().devtoolsEditFormAction,t`
|
|
286
286
|
color: ${i(r.gray[600],r.gray[300])};
|
|
287
|
-
`),
|
|
287
|
+
`),fn=fe(n().devtoolsEditFormAction,t`
|
|
288
288
|
color: ${i(r.blue[600],r.blue[400])};
|
|
289
|
-
`);return
|
|
289
|
+
`);return we!==ee.e&&se(Y,ee.e=we),gt!==ee.t&&se(Pe,ee.t=gt),Se!==ee.a&&re(Pe,"data-error",ee.a=Se),Je!==ee.o&&se(tt,ee.o=Je),Be!==ee.i&&se($e,ee.i=Be),An!==ee.n&&se(ue,ee.n=An),Vt!==ee.s&&se(W,ee.s=Vt),fn!==ee.h&&se(ne,ee.h=fn),ee},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),be(()=>Pe.value=JSON.stringify(p(),null,2)),Y}}),Ne),V(Fe,L(Gr,{label:"Query",defaultExpanded:["Query","queryKey"],get value(){return g()}})),be(Y=>{var Pe=fe(n().detailsContainer,"tsqd-query-details-container"),tt=fe(n().detailsHeader,"tsqd-query-details-header"),$e=fe(n().detailsBody,"tsqd-query-details-summary-container"),ue=fe(n().queryDetailsStatus,_()),W=fe(n().detailsHeader,"tsqd-query-details-header"),ne=fe(n().actionsBody,"tsqd-query-details-actions-container"),ee=fe(t`
|
|
290
290
|
color: ${i(r.blue[600],r.blue[400])};
|
|
291
|
-
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-refetch"),
|
|
291
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-refetch"),we=v()==="fetching",gt=t`
|
|
292
292
|
background-color: ${i(r.blue[600],r.blue[400])};
|
|
293
|
-
`,
|
|
293
|
+
`,Se=fe(t`
|
|
294
294
|
color: ${i(r.yellow[600],r.yellow[400])};
|
|
295
|
-
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-invalidate"),
|
|
295
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-invalidate"),Je=b()==="pending",Be=t`
|
|
296
296
|
background-color: ${i(r.yellow[600],r.yellow[400])};
|
|
297
|
-
`,
|
|
297
|
+
`,An=fe(t`
|
|
298
298
|
color: ${i(r.gray[600],r.gray[300])};
|
|
299
|
-
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-reset"),
|
|
299
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-reset"),Vt=b()==="pending",fn=t`
|
|
300
300
|
background-color: ${i(r.gray[600],r.gray[400])};
|
|
301
|
-
`,
|
|
301
|
+
`,Nn=fe(t`
|
|
302
302
|
color: ${i(r.pink[500],r.pink[400])};
|
|
303
|
-
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-remove"),
|
|
303
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-remove"),nr=v()==="fetching",Qi=t`
|
|
304
304
|
background-color: ${i(r.pink[500],r.pink[400])};
|
|
305
|
-
`,
|
|
305
|
+
`,Or=fe(t`
|
|
306
306
|
color: ${i(r.cyan[500],r.cyan[400])};
|
|
307
|
-
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-loading"),
|
|
307
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-loading"),Xa=o(),oo=t`
|
|
308
308
|
background-color: ${i(r.cyan[500],r.cyan[400])};
|
|
309
|
-
`,
|
|
309
|
+
`,ao=fe(n().detailsHeader,"tsqd-query-details-header"),lo=fe(n().detailsHeader,"tsqd-query-details-header"),Yi=K.size[2];return Pe!==Y.e&&se(O,Y.e=Pe),tt!==Y.t&&se(E,Y.t=tt),$e!==Y.a&&se(T,Y.a=$e),ue!==Y.o&&se(A,Y.o=ue),W!==Y.i&&se(ie,Y.i=W),ne!==Y.n&&se(ae,Y.n=ne),ee!==Y.s&&se(N,Y.s=ee),we!==Y.h&&(N.disabled=Y.h=we),gt!==Y.r&&se(le,Y.r=gt),Se!==Y.d&&se(te,Y.d=Se),Je!==Y.l&&(te.disabled=Y.l=Je),Be!==Y.u&&se(me,Y.u=Be),An!==Y.c&&se(J,Y.c=An),Vt!==Y.w&&(J.disabled=Y.w=Vt),fn!==Y.m&&se(Ce,Y.m=fn),Nn!==Y.f&&se(ge,Y.f=Nn),nr!==Y.y&&(ge.disabled=Y.y=nr),Qi!==Y.g&&se(ze,Y.g=Qi),Or!==Y.p&&se(oe,Y.p=Or),Xa!==Y.b&&(oe.disabled=Y.b=Xa),oo!==Y.T&&se(He,Y.T=oo),ao!==Y.A&&se(dt,Y.A=ao),lo!==Y.O&&se(Ne,Y.O=lo),Yi!==Y.I&&((Y.I=Yi)!=null?Fe.style.setProperty("padding",Yi):Fe.style.removeProperty("padding")),Y},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0,g:void 0,p:void 0,b:void 0,T:void 0,A:void 0,O:void 0,I:void 0}),O}})},rD=()=>{const e=xt(),t=ye().shadowDOMTarget?je.bind({target:ye().shadowDOMTarget}):je,n=U(()=>e()==="dark"?En(t):On(t)),{colors:r}=K,i=(c,d)=>e()==="dark"?d:c,s=Mn(c=>{const f=c().getAll().find(h=>h.mutationId===Wr());return f?f.state.isPaused:!1}),o=Mn(c=>{const f=c().getAll().find(h=>h.mutationId===Wr());return f?f.state.status:"idle"}),a=U(()=>os({isPaused:s(),status:o()})),l=Mn(c=>c().getAll().find(d=>d.mutationId===Wr()),!1),u=()=>a()==="gray"?t`
|
|
310
310
|
background-color: ${i(r[a()][200],r[a()][700])};
|
|
311
311
|
color: ${i(r[a()][700],r[a()][300])};
|
|
312
312
|
border-color: ${i(r[a()][400],r[a()][600])};
|
|
@@ -314,7 +314,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
314
314
|
background-color: ${i(r[a()][100],r[a()][900])};
|
|
315
315
|
color: ${i(r[a()][700],r[a()][300])};
|
|
316
316
|
border-color: ${i(r[a()][400],r[a()][600])};
|
|
317
|
-
`;return
|
|
317
|
+
`;return L(ve,{get when(){return l()},get children(){var c=K$(),d=c.firstChild,f=d.nextSibling,h=f.firstChild,g=h.firstChild,m=g.firstChild,p=g.nextSibling,v=h.nextSibling,b=v.firstChild,S=b.nextSibling,C=f.nextSibling,x=C.nextSibling,k=x.nextSibling,w=k.nextSibling,_=w.nextSibling,O=_.nextSibling,E=O.nextSibling,T=E.nextSibling;return V(m,L(ve,{get when(){return l().options.mutationKey},fallback:"No mutationKey found",get children(){return Wl(l().options.mutationKey,!0)}})),V(p,L(ve,{get when(){return a()==="purple"},children:"pending"}),null),V(p,L(ve,{get when(){return a()!=="purple"},get children(){return o()}}),null),V(S,()=>new Date(l().state.submittedAt).toLocaleTimeString()),V(x,L(Gr,{label:"Variables",defaultExpanded:["Variables"],get value(){return l().state.variables}})),V(w,L(Gr,{label:"Context",defaultExpanded:["Context"],get value(){return l().state.context}})),V(O,L(Gr,{label:"Data",defaultExpanded:["Data"],get value(){return l().state.data}})),V(T,L(Gr,{label:"Mutation",defaultExpanded:["Mutation"],get value(){return l()}})),be(j=>{var B=fe(n().detailsContainer,"tsqd-query-details-container"),R=fe(n().detailsHeader,"tsqd-query-details-header"),A=fe(n().detailsBody,"tsqd-query-details-summary-container"),M=fe(n().queryDetailsStatus,u()),D=fe(n().detailsHeader,"tsqd-query-details-header"),H=K.size[2],Q=fe(n().detailsHeader,"tsqd-query-details-header"),F=K.size[2],G=fe(n().detailsHeader,"tsqd-query-details-header"),ie=K.size[2],ae=fe(n().detailsHeader,"tsqd-query-details-header"),N=K.size[2];return B!==j.e&&se(c,j.e=B),R!==j.t&&se(d,j.t=R),A!==j.a&&se(f,j.a=A),M!==j.o&&se(p,j.o=M),D!==j.i&&se(C,j.i=D),H!==j.n&&((j.n=H)!=null?x.style.setProperty("padding",H):x.style.removeProperty("padding")),Q!==j.s&&se(k,j.s=Q),F!==j.h&&((j.h=F)!=null?w.style.setProperty("padding",F):w.style.removeProperty("padding")),G!==j.r&&se(_,j.r=G),ie!==j.d&&((j.d=ie)!=null?O.style.setProperty("padding",ie):O.style.removeProperty("padding")),ae!==j.l&&se(E,j.l=ae),N!==j.u&&((j.u=N)!=null?T.style.setProperty("padding",N):T.style.removeProperty("padding")),j},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0}),c}})},mu=new Map,iD=()=>{const e=U(()=>ye().client.getQueryCache()),t=e().subscribe(n=>{m3(()=>{for(const[r,i]of mu.entries())i.shouldUpdate(n)&&i.setter(r(e))})});return _e(()=>{mu.clear(),t()}),t},pt=(e,t=!0,n=()=>!0)=>{const r=U(()=>ye().client.getQueryCache()),[i,s]=ce(e(r),t?void 0:{equals:!1});return xe(()=>{s(e(r))}),mu.set(e,{setter:s,shouldUpdate:n}),_e(()=>{mu.delete(e)}),i},pu=new Map,sD=()=>{const e=U(()=>ye().client.getMutationCache()),t=e().subscribe(()=>{for(const[n,r]of pu.entries())queueMicrotask(()=>{r(n(e))})});return _e(()=>{pu.clear(),t()}),t},Mn=(e,t=!0)=>{const n=U(()=>ye().client.getMutationCache()),[r,i]=ce(e(n),t?void 0:{equals:!1});return xe(()=>{i(e(n))}),pu.set(e,i),_e(()=>{pu.delete(e)}),r},oD="@tanstack/query-devtools-event",Kn=({type:e,queryHash:t,metadata:n})=>{const r=new CustomEvent(oD,{detail:{type:e,queryHash:t,metadata:n},bubbles:!0,cancelable:!0});window.dispatchEvent(r)},Q1=(e,t)=>{const{colors:n,font:r,size:i,alpha:s,shadow:o,border:a}=K,l=(u,c)=>e==="light"?u:c;return{devtoolsBtn:t`
|
|
318
318
|
z-index: 100000;
|
|
319
319
|
position: fixed;
|
|
320
320
|
padding: 4px;
|
|
@@ -1279,17 +1279,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1279
1279
|
opacity: 0.6;
|
|
1280
1280
|
cursor: not-allowed;
|
|
1281
1281
|
}
|
|
1282
|
-
`}},
|
|
1283
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1284
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1285
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1286
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1287
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1288
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1289
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1290
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JD(e,t){if(e){if(typeof e=="string")return Fm(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fm(e,t):void 0}}function Fm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eL(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function tL(e){if(Array.isArray(e))return e}function yh(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Bm=qa(Im||(Im=yh(["xl:yst-w-1/3"]))),qm=qa(Rm||(Rm=yh(["xl:yst-w-2/3"]))),zm=qa(Nm||(Nm=yh(["yst-flex yst-flex-col yst-gap-8 xl:yst-flex-row"]))),nL=function(){var t,n,r,i,s=z.useState(!1),o=Gu(s,2),a=o[0],l=o[1],c=z.useState(!1),u=Gu(c,2),d=u[0],f=u[1],h=z.useState(null),g=Gu(h,2),m=g[0],p=g[1],v=$c({query:{select:function(w){var _=w.data;return _}}}),b=v.data,S=Hi({query:{select:function(w){var _=w.data;return _==null?void 0:_.brands}}}),C=S.data,x=C==null?void 0:C.find(function(k){return k.id===m});return y.jsxs("form",{children:[y.jsxs(P.Card,{children:[y.jsx(cb,{title:"Settings",description:"Manage your brand settings and data. You can update analysis preferences or delete brands from your account."}),y.jsxs(P.Card.Content,{children:[y.jsxs(zm,{children:[y.jsxs(Bm,{className:"yst-space-y-2",children:[y.jsx(P.Title,{size:"4",children:"Brands"}),y.jsxs("p",{children:["You have"," ",y.jsxs("b",{children:[(t=b==null?void 0:b.activeSubscriptions)!==null&&t!==void 0?t:"—"," subscription(s)"]}),". This gives you up to"," ",y.jsxs("b",{children:[(n=b==null?void 0:b.maxNumberOfActiveBrands)!==null&&n!==void 0?n:"—"," active brand(s)"]}),", for which we’ll automatically run a weekly analysis."]}),y.jsx("p",{children:"You can activate or deactivate brands anytime, or permanently delete a brand and all its data."})]}),y.jsxs(qm,{children:[C&&y.jsxs("p",{className:"yst-flex yst-w-full yst-max-w-2xl yst-flex-1 yst-flex-row yst-items-center yst-justify-start yst-gap-2 yst-border-b-[1px] yst-border-b-slate-200 yst-py-4 yst-font-medium yst-text-slate-800",children:["Active brands: ",(r=b==null?void 0:b.numberOfActiveBrands)!==null&&r!==void 0?r:"—"," of"," ",(i=b==null?void 0:b.maxNumberOfActiveBrands)!==null&&i!==void 0?i:"—"]}),C&&C.length===0&&y.jsxs("p",{className:"yst-mt-4 yst-text-slate-500",children:["No brands found. Please"," ",y.jsx(P.Link,{as:ei,to:"/setup",children:"add a brand"})," ","to start analyzing."]}),(C!=null?C:[{id:"loading",name:"Loading..."}]).map(function(k,w,_){return y.jsx(XD,{brand:k,isLast:w===_.length-1,onDelete:function(O){p(O),l(!0)}},k.id)})]})]}),y.jsx(za,{}),y.jsxs(zm,{children:[y.jsxs(Bm,{className:"yst-space-y-2",children:[y.jsx(P.Title,{size:"4",children:"Delete all data"}),y.jsx("p",{children:"Permanently delete all brands, analysis results, and query history from your account."})]}),y.jsxs(qm,{className:"yst-space-y-4",children:[y.jsxs(P.Button,{variant:"error",onClick:function(){f(!0)},disabled:(C==null?void 0:C.length)===0,children:[y.jsx(Of,{})," Delete all data"]}),y.jsx("p",{children:y.jsxs("i",{children:[y.jsx("b",{children:"Note:"})," This will erase everything and cannot be reversed."]})})]})]})]})]}),y.jsx(zD,{isOpen:a,onClose:function(){l(!1),p(null)},brandId:m||"",brandName:x==null?void 0:x.name}),y.jsx(LD,{isOpen:d,onClose:function(){f(!1)}})]})};const rL=Object.freeze(Object.defineProperty({__proto__:null,default:nL},Symbol.toStringTag,{value:"Module"}));function yc(e){"@babel/helpers - typeof";return yc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yc(e)}var af=[{path:"/setup",id:1,title:"Brand & location info",description:"Enter a few basic details about your brand so we can generate relevant queries people might use in AI models like ChatGPT. This helps us analyze how visible your brand is in their responses."},{path:"/setup/:brandId/queries",id:2,title:"Queries",description:"Review the queries we've generated from your brand info. These are phrases people might type into AI models that could trigger your brand to appear."},{path:"/setup/:brandId/analysis",id:3,title:"Analysis",description:"We're checking how your brand shows up in AI. Your queries will now be tested in ChatGPT. This process should take around 5 minutes."}],iL=function(t){return af.find(function(n){return!!Ns(n.path,t)})||af[0]};function sL(){var e=Ht(),t=iL(e.pathname);return y.jsxs(P.Paper,{className:"yst-mx-auto yst-max-w-2xl",children:[y.jsx(U1,{title:y.jsx(V1,{currentStep:t,steps:af}),description:t.description}),y.jsx(P.Paper.Content,{children:y.jsx(Fs,{})})]})}var V1=function(t){var n=t.title,r=t.currentStep,i=t.steps;return y.jsxs("span",{className:"yst-inline-flex yst-flex-row yst-gap-4",children:[y.jsxs("span",{className:"yst-tracking-[.2em] yst-text-slate-400",children:[y.jsx("span",{className:"yst-text-slate-900",children:yc(r)==="object"?r.id:r}),"/",Array.isArray(i)?i.length:i]}),y.jsx("span",{children:yc(r)==="object"?r.title:n||"Step ".concat(r)})]})};const oL=Object.freeze(Object.defineProperty({__proto__:null,SetupPaperTitle:V1,default:sL},Symbol.toStringTag,{value:"Module"}));var W1=function(t){var n=t.onBack,r=t.variant,i=r===void 0?"ai":r,s=t.buttonText,o=t.onButtonClick,a=t.isButtonDisabled,l=a===void 0?!1:a,c=t.isLoading,u=c===void 0?!1:c;return y.jsx(Ef,{nestedInPaperContent:!0,children:y.jsxs("div",{className:ke({"yst-flex yst-flex-1 yst-flex-col yst-items-start yst-justify-between yst-gap-4 md:yst-flex-row md:yst-items-center md:yst-justify-between":n}),children:[n&&y.jsx(P.Button,{variant:"tertiary",onClick:n,className:"yst-no-underline",children:"← Back"}),y.jsx("div",{className:ke("yst-flex yst-flex-col yst-items-stretch yst-gap-4 md:yst-flex-row md:yst-items-center md:yst-justify-end"),children:y.jsxs(P.Button,{onClick:o,variant:i==="ai"?"primary":i,className:"yst-gap-1.5",style:i==="ai"?{background:"linear-gradient(102deg, #A61E69 0%, #6366F1 100%)",color:"#fff"}:{},disabled:l,type:"submit",isLoading:u,children:[i==="ai"&&y.jsx(Y5,{}),s]})})]})})},aL=[{value:"US",label:"United States"},{value:"GB",label:"United Kingdom"},{value:"CA",label:"Canada"},{value:"AU",label:"Australia"},{value:"DE",label:"Germany"},{value:"FR",label:"France"},{value:"NL",label:"Netherlands"}],lL=[{value:"AF",label:"Afghanistan"},{value:"AX",label:"Åland Islands"},{value:"AL",label:"Albania"},{value:"DZ",label:"Algeria"},{value:"AS",label:"American Samoa"},{value:"AD",label:"Andorra"},{value:"AO",label:"Angola"},{value:"AI",label:"Anguilla"},{value:"AQ",label:"Antarctica"},{value:"AG",label:"Antigua and Barbuda"},{value:"AR",label:"Argentina"},{value:"AM",label:"Armenia"},{value:"AW",label:"Aruba"},{value:"AT",label:"Austria"},{value:"AZ",label:"Azerbaijan"},{value:"BS",label:"Bahamas"},{value:"BH",label:"Bahrain"},{value:"BD",label:"Bangladesh"},{value:"BB",label:"Barbados"},{value:"BY",label:"Belarus"},{value:"BE",label:"Belgium"},{value:"PW",label:"Belau"},{value:"BZ",label:"Belize"},{value:"BJ",label:"Benin"},{value:"BM",label:"Bermuda"},{value:"BT",label:"Bhutan"},{value:"BO",label:"Bolivia"},{value:"BQ",label:"Bonaire, Saint Eustatius and Saba"},{value:"BA",label:"Bosnia and Herzegovina"},{value:"BW",label:"Botswana"},{value:"BV",label:"Bouvet Island"},{value:"BR",label:"Brazil"},{value:"IO",label:"British Indian Ocean Territory"},{value:"BN",label:"Brunei"},{value:"BG",label:"Bulgaria"},{value:"BF",label:"Burkina Faso"},{value:"BI",label:"Burundi"},{value:"KH",label:"Cambodia"},{value:"CM",label:"Cameroon"},{value:"CV",label:"Cape Verde"},{value:"KY",label:"Cayman Islands"},{value:"CF",label:"Central African Republic"},{value:"TD",label:"Chad"},{value:"CL",label:"Chile"},{value:"CN",label:"China"},{value:"CX",label:"Christmas Island"},{value:"CC",label:"Cocos (Keeling) Islands"},{value:"CO",label:"Colombia"},{value:"KM",label:"Comoros"},{value:"CG",label:"Congo (Brazzaville)"},{value:"CD",label:"Congo (Kinshasa)"},{value:"CK",label:"Cook Islands"},{value:"CR",label:"Costa Rica"},{value:"HR",label:"Croatia"},{value:"CU",label:"Cuba"},{value:"CW",label:"Curaçao"},{value:"CY",label:"Cyprus"},{value:"CZ",label:"Czech Republic"},{value:"DK",label:"Denmark"},{value:"DJ",label:"Djibouti"},{value:"DM",label:"Dominica"},{value:"DO",label:"Dominican Republic"},{value:"EC",label:"Ecuador"},{value:"EG",label:"Egypt"},{value:"SV",label:"El Salvador"},{value:"GQ",label:"Equatorial Guinea"},{value:"ER",label:"Eritrea"},{value:"EE",label:"Estonia"},{value:"ET",label:"Ethiopia"},{value:"FK",label:"Falkland Islands"},{value:"FO",label:"Faroe Islands"},{value:"FJ",label:"Fiji"},{value:"FI",label:"Finland"},{value:"GF",label:"French Guiana"},{value:"PF",label:"French Polynesia"},{value:"TF",label:"French Southern Territories"},{value:"GA",label:"Gabon"},{value:"GM",label:"Gambia"},{value:"GE",label:"Georgia"},{value:"GH",label:"Ghana"},{value:"GI",label:"Gibraltar"},{value:"GR",label:"Greece"},{value:"GL",label:"Greenland"},{value:"GD",label:"Grenada"},{value:"GP",label:"Guadeloupe"},{value:"GU",label:"Guam"},{value:"GT",label:"Guatemala"},{value:"GG",label:"Guernsey"},{value:"GN",label:"Guinea"},{value:"GW",label:"Guinea-Bissau"},{value:"GY",label:"Guyana"},{value:"HT",label:"Haiti"},{value:"HM",label:"Heard Island and McDonald Islands"},{value:"HN",label:"Honduras"},{value:"HK",label:"Hong Kong"},{value:"HU",label:"Hungary"},{value:"IS",label:"Iceland"},{value:"IN",label:"India"},{value:"ID",label:"Indonesia"},{value:"IR",label:"Iran"},{value:"IQ",label:"Iraq"},{value:"IE",label:"Ireland"},{value:"IM",label:"Isle of Man"},{value:"IL",label:"Israel"},{value:"IT",label:"Italy"},{value:"CI",label:"Ivory Coast"},{value:"JM",label:"Jamaica"},{value:"JP",label:"Japan"},{value:"JE",label:"Jersey"},{value:"JO",label:"Jordan"},{value:"KZ",label:"Kazakhstan"},{value:"KE",label:"Kenya"},{value:"KI",label:"Kiribati"},{value:"KW",label:"Kuwait"},{value:"KG",label:"Kyrgyzstan"},{value:"LA",label:"Laos"},{value:"LV",label:"Latvia"},{value:"LB",label:"Lebanon"},{value:"LS",label:"Lesotho"},{value:"LR",label:"Liberia"},{value:"LY",label:"Libya"},{value:"LI",label:"Liechtenstein"},{value:"LT",label:"Lithuania"},{value:"LU",label:"Luxembourg"},{value:"MO",label:"Macao"},{value:"MK",label:"North Macedonia"},{value:"MG",label:"Madagascar"},{value:"MW",label:"Malawi"},{value:"MY",label:"Malaysia"},{value:"MV",label:"Maldives"},{value:"ML",label:"Mali"},{value:"MT",label:"Malta"},{value:"MH",label:"Marshall Islands"},{value:"MQ",label:"Martinique"},{value:"MR",label:"Mauritania"},{value:"MU",label:"Mauritius"},{value:"YT",label:"Mayotte"},{value:"MX",label:"Mexico"},{value:"FM",label:"Micronesia"},{value:"MD",label:"Moldova"},{value:"MC",label:"Monaco"},{value:"MN",label:"Mongolia"},{value:"ME",label:"Montenegro"},{value:"MS",label:"Montserrat"},{value:"MA",label:"Morocco"},{value:"MZ",label:"Mozambique"},{value:"MM",label:"Myanmar"},{value:"NA",label:"Namibia"},{value:"NR",label:"Nauru"},{value:"NP",label:"Nepal"},{value:"NC",label:"New Caledonia"},{value:"NZ",label:"New Zealand"},{value:"NI",label:"Nicaragua"},{value:"NE",label:"Niger"},{value:"NG",label:"Nigeria"},{value:"NU",label:"Niue"},{value:"NF",label:"Norfolk Island"},{value:"MP",label:"Northern Mariana Islands"},{value:"KP",label:"North Korea"},{value:"NO",label:"Norway"},{value:"OM",label:"Oman"},{value:"PK",label:"Pakistan"},{value:"PS",label:"Palestinian Territory"},{value:"PA",label:"Panama"},{value:"PG",label:"Papua New Guinea"},{value:"PY",label:"Paraguay"},{value:"PE",label:"Peru"},{value:"PH",label:"Philippines"},{value:"PN",label:"Pitcairn"},{value:"PL",label:"Poland"},{value:"PT",label:"Portugal"},{value:"PR",label:"Puerto Rico"},{value:"QA",label:"Qatar"},{value:"RE",label:"Reunion"},{value:"RO",label:"Romania"},{value:"RU",label:"Russia"},{value:"RW",label:"Rwanda"},{value:"BL",label:"Saint Barthélemy"},{value:"SH",label:"Saint Helena"},{value:"KN",label:"Saint Kitts and Nevis"},{value:"LC",label:"Saint Lucia"},{value:"MF",label:"Saint Martin (French part)"},{value:"SX",label:"Saint Martin (Dutch part)"},{value:"PM",label:"Saint Pierre and Miquelon"},{value:"VC",label:"Saint Vincent and the Grenadines"},{value:"SM",label:"San Marino"},{value:"ST",label:"São Tomé and Príncipe"},{value:"SA",label:"Saudi Arabia"},{value:"SN",label:"Senegal"},{value:"RS",label:"Serbia"},{value:"SC",label:"Seychelles"},{value:"SL",label:"Sierra Leone"},{value:"SG",label:"Singapore"},{value:"SK",label:"Slovakia"},{value:"SI",label:"Slovenia"},{value:"SB",label:"Solomon Islands"},{value:"SO",label:"Somalia"},{value:"ZA",label:"South Africa"},{value:"GS",label:"South Georgia/Sandwich Islands"},{value:"KR",label:"South Korea"},{value:"SS",label:"South Sudan"},{value:"ES",label:"Spain"},{value:"LK",label:"Sri Lanka"},{value:"SD",label:"Sudan"},{value:"SR",label:"Suriname"},{value:"SJ",label:"Svalbard and Jan Mayen"},{value:"SZ",label:"Eswatini"},{value:"SE",label:"Sweden"},{value:"CH",label:"Switzerland"},{value:"SY",label:"Syria"},{value:"TW",label:"Taiwan"},{value:"TJ",label:"Tajikistan"},{value:"TZ",label:"Tanzania"},{value:"TH",label:"Thailand"},{value:"TL",label:"Timor-Leste"},{value:"TG",label:"Togo"},{value:"TK",label:"Tokelau"},{value:"TO",label:"Tonga"},{value:"TT",label:"Trinidad and Tobago"},{value:"TN",label:"Tunisia"},{value:"TR",label:"Turkey"},{value:"TM",label:"Turkmenistan"},{value:"TC",label:"Turks and Caicos Islands"},{value:"TV",label:"Tuvalu"},{value:"UG",label:"Uganda"},{value:"UA",label:"Ukraine"},{value:"AE",label:"United Arab Emirates"},{value:"UM",label:"United States (US) Minor Outlying Islands"},{value:"UY",label:"Uruguay"},{value:"UZ",label:"Uzbekistan"},{value:"VU",label:"Vanuatu"},{value:"VA",label:"Vatican"},{value:"VE",label:"Venezuela"},{value:"VN",label:"Vietnam"},{value:"VG",label:"Virgin Islands (British)"},{value:"VI",label:"Virgin Islands (US)"},{value:"WF",label:"Wallis and Futuna"},{value:"EH",label:"Western Sahara"},{value:"WS",label:"Samoa"},{value:"YE",label:"Yemen"},{value:"ZM",label:"Zambia"},{value:"ZW",label:"Zimbabwe"}],Hm=[].concat(aL,lL,[{value:"OTHER",label:"Other"}]),cL=[{value:"en",label:"English"},{value:"es",label:"Spanish"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"zh",label:"Chinese (Mandarin)"},{value:"ja",label:"Japanese"}],uL=[{value:"sq",label:"Albanian"},{value:"am",label:"Amharic"},{value:"ar",label:"Arabic"},{value:"hy",label:"Armenian"},{value:"bn",label:"Bengali"},{value:"bs",label:"Bosnian"},{value:"bg",label:"Bulgarian"},{value:"my",label:"Burmese"},{value:"ca",label:"Catalan"},{value:"zh",label:"Chinese"},{value:"hr",label:"Croatian"},{value:"cs",label:"Czech"},{value:"da",label:"Danish"},{value:"nl",label:"Dutch"},{value:"et",label:"Estonian"},{value:"fi",label:"Finnish"},{value:"fr",label:"French"},{value:"ka",label:"Georgian"},{value:"de",label:"German"},{value:"el",label:"Greek"},{value:"gu",label:"Gujarati"},{value:"hi",label:"Hindi"},{value:"hu",label:"Hungarian"},{value:"is",label:"Icelandic"},{value:"id",label:"Indonesian"},{value:"it",label:"Italian"},{value:"ja",label:"Japanese"},{value:"kn",label:"Kannada"},{value:"kk",label:"Kazakh"},{value:"ko",label:"Korean"},{value:"lv",label:"Latvian"},{value:"lt",label:"Lithuanian"},{value:"mk",label:"Macedonian"},{value:"ms",label:"Malay"},{value:"ml",label:"Malayalam"},{value:"mr",label:"Marathi"},{value:"mn",label:"Mongolian"},{value:"no",label:"Norwegian"},{value:"fa",label:"Persian"},{value:"pl",label:"Polish"},{value:"pt",label:"Portuguese"},{value:"pa",label:"Punjabi"},{value:"ro",label:"Romanian"},{value:"ru",label:"Russian"},{value:"sr",label:"Serbian"},{value:"sk",label:"Slovak"},{value:"sl",label:"Slovenian"},{value:"so",label:"Somali"},{value:"es",label:"Spanish"},{value:"sw",label:"Swahili"},{value:"sv",label:"Swedish"},{value:"tl",label:"Tagalog"},{value:"ta",label:"Tamil"},{value:"te",label:"Telugu"},{value:"th",label:"Thai"},{value:"tr",label:"Turkish"},{value:"uk",label:"Ukrainian"},{value:"ur",label:"Urdu"},{value:"vi",label:"Vietnamese"}],dL=[].concat(cL,uL);function Wr(e){"@babel/helpers - typeof";return Wr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wr(e)}function Um(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Um(Object(n),!0).forEach(function(r){Q1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Um(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Q1(e,t,n){return(t=fL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fL(e){var t=hL(e,"string");return Wr(t)=="symbol"?t:t+""}function hL(e,t){if(Wr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lf(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,g,m,p){var v=g&&g.prototype instanceof a?g:a,b=Object.create(v.prototype);return Jt(b,"_invoke",function(S,C,x){var k,w,_,O=0,E=x||[],j=!1,$={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(A,T){return k=A,w=0,_=e,$.n=T,o}};function B(R,A){for(w=R,_=A,t=0;!j&&O&&!T&&t<E.length;t++){var T,I=E[t],G=$.p,X=I[2];R>3?(T=X===A)&&(_=I[(w=I[4])?5:(w=3,3)],I[4]=I[5]=e):I[0]<=G&&((T=R<2&&G<I[1])?(w=0,$.v=A,$.n=I[1]):G<X&&(T=R<3||I[0]>A||A>X)&&(I[4]=R,I[5]=A,$.n=X,w=0))}if(T||R>1)return o;throw j=!0,A}return function(R,A,T){if(O>1)throw TypeError("Generator is already running");for(j&&A===1&&B(A,T),w=A,_=T;(t=w<2?e:_)||!j;){k||(w?w<3?(w>1&&($.n=-1),B(w,_)):$.n=_:$.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(j=$.n<0)?_:S.call(C,$))!==o)break}catch(I){k=e,w=1,_=I}finally{O=1}}return{value:t,done:j}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(Jt(t={},r,function(){return this}),t),d=c.prototype=a.prototype=Object.create(u);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,Jt(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=c,Jt(d,"constructor",c),Jt(c,"constructor",l),l.displayName="GeneratorFunction",Jt(c,i,"GeneratorFunction"),Jt(d),Jt(d,i,"Generator"),Jt(d,r,function(){return this}),Jt(d,"toString",function(){return"[object Generator]"}),(lf=function(){return{w:s,m:f}})()}function Jt(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Jt=function(o,a,l,c){if(a)i?i(o,a,{value:l,enumerable:!c,configurable:!c,writable:!c}):o[a]=l;else{var u=function(f,h){Jt(o,f,function(g){return this._invoke(f,h,g)})};u("next",0),u("throw",1),u("return",2)}},Jt(e,t,n,r)}function Km(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(c){return void n(c)}a.done?t(l):Promise.resolve(l).then(r,i)}function gL(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){Km(s,r,i,o,a,"next",l)}function a(l){Km(s,r,i,o,a,"throw",l)}o(void 0)})}}function Oo(e,t){return vL(e)||pL(e,t)||mL(e,t)||yL()}function yL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1291
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1292
|
-
example: California, Bavaria, or Paris.`})]}),y.jsx(
|
|
1293
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1294
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y1(e,t){if(e){if(typeof e=="string")return uf(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uf(e,t):void 0}}function uf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ML(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function jL(e){if(Array.isArray(e))return e}var rs=5,No="Generating...",$L="Re-generating...",DL=["******************************","***********************","*******************************************************","***********************************************","***************************************************************","*******************************************************","*******************************************************","***********************************************"],LL=Array.from({length:rs},function(e,t){return{id:"query-".concat(t),text:No,isRegenerating:!0}}),IL=function(){var t=pc(),n=t.brandId,r="/setup/".concat(n,"/analysis"),i=cn(),s=Ut(),o=z.useState(LL),a=Zi(o,2),l=a[0],c=a[1],u=z.useState(!1),d=Zi(u,2),f=d[0],h=d[1],g=z.useState([]),m=Zi(g,2),p=m[0],v=m[1],b=z.useState([]),S=Zi(b,2),C=S[0],x=S[1],k=z.useState(!1),w=Zi(k,2),_=w[0],O=w[1],E=z.useState(null),j=Zi(E,2),$=j[0],B=j[1],R=c5(n||"",{query:{enabled:!!n}}),A=R.data,T=R.isRefetching,I=R.isError,G=R.refetch,X=s5({mutation:{onSuccess:function(){var te=PL(cf().m(function H(he){return cf().w(function(je){for(;;)switch(je.n){case 0:if(B(null),!(he!=null&&he.status&&he.status>=200&&he.status<300)){je.n=2;break}return je.n=1,Promise.all([s.invalidateQueries({queryKey:kf(n||"")}),s.invalidateQueries({queryKey:Wn()})]);case 1:i(r);case 2:return je.a(2)}},H)}));function de(H){return te.apply(this,arguments)}return de}(),onError:function(de){var H,he;if((de==null||(H=de.response)===null||H===void 0||(H=H.data)===null||H===void 0?void 0:H.message)==="Cannot update queries for a brand that has existing analyses."){i(r,{replace:!0});return}var je=(de==null||(he=de.response)===null||he===void 0||(he=he.data)===null||he===void 0?void 0:he.message)||(de==null?void 0:de.message)||"An unexpected error occurred.";B(je)}}}),F=X.mutate,W=X.isPending;z.useEffect(function(){n||i("/setup",{replace:!0})},[n,i]),z.useEffect(function(){var te;if(A!=null&&(te=A.data)!==null&&te!==void 0&&te.queries&&Array.isArray(A.data.queries)){var de=A.data.queries.slice(0,rs);c(de.map(function(H,he){return{id:"query-".concat(he),text:H,isRegenerating:!1}})),x(A.data.queries.slice(rs))}else I&&(c(Array.from({length:rs},function(H,he){return{id:"query-".concat(he),text:"",isRegenerating:!1}})),x([]))},[A,I]),z.useEffect(function(){var te;if(_&&A!==null&&A!==void 0&&(te=A.data)!==null&&te!==void 0&&te.queries&&Array.isArray(A.data.queries)&&!T){var de=A.data.queries.slice(0,rs),H=p.map(Number);c(function(he){return he.map(function(je,et){var De=H.indexOf(et);return Ar(Ar({},je),{},{text:De>=0&&de[De]?de[De]:je.text,isRegenerating:!1})})}),O(!1),v([])}},[A,T,_,p]);var ie=z.useCallback(function(te,de){var H=new Set(de);return C.filter(function(he){return!H.has(he)}).slice(0,te)},[C]),oe=z.useMemo(function(){return T||l.length===0||l.some(function(te){return te.isRegenerating||te.text===No&&!I||te.text.trim()===""})||f},[T,l,f,I]),N=T||l.some(function(te){return te.text===No})&&!I,ce=z.useCallback(function(te){var de=te.toString();v(function(H){return H.includes(de)?H.filter(function(he){return he!==de}):[].concat(SL(H),[de])})},[]),re=z.useCallback(function(te,de){c(function(H){return H.map(function(he,je){return je===te?Ar(Ar({},he),{},{text:de}):he})})},[]),me=function(){h(!f),v([])},J=z.useCallback(function(){if(!(T||p.length===0)){c(function(he){return he.map(function(je,et){return Ar(Ar({},je),{},{isRegenerating:p.includes(et.toString())})})});var te=l.map(function(he){return he.text}),de=p.length,H=ie(de,te);H.length===de?(c(function(he){return he.map(function(je,et){var De=p.indexOf(et.toString());return De>=0?Ar(Ar({},je),{},{text:H[De],isRegenerating:!1}):je})}),x(function(he){var je=new Set(H);return he.filter(function(et){return!je.has(et)})}),v([])):(O(!0),G())}},[T,p,G,l,ie]),Se=z.useCallback(function(te){te.preventDefault(),n&&F({brandId:n,data:{queries:l.map(function(de){return de.text})}})},[n,l,F]);return y.jsxs("div",{children:[$&&y.jsx(P.Alert,{className:"yst-mb-4",variant:"error",children:$}),y.jsxs("form",{onSubmit:Se,children:[y.jsxs("div",{className:"yst-mb-8",children:[y.jsx(P.Title,{size:"2",className:"yst-mb-2",children:"Your queries"}),y.jsxs("div",{className:"yst-space-y-4",children:[y.jsx("p",{children:"You can edit your queries or regenerate new ones with AI."}),y.jsx("div",{className:ke("yst-flex yst-gap-2",f?"yst-justify-end":"yst-justify-start"),children:f?y.jsxs(y.Fragment,{children:[y.jsx(P.Button,{size:"small",variant:"secondary",onClick:me,children:"Done"}),y.jsxs(P.Button,{variant:"secondary",size:"small",onClick:J,className:"yst-gap-1",isLoading:T,disabled:T||p.length===0,children:[y.jsx(wL,{"aria-hidden":"true"}),"Regenerate selected queries"]})]}):y.jsxs(P.Button,{size:"small",variant:"secondary",onClick:me,className:"yst-gap-1.5",disabled:N,children:[y.jsx(I5,{}),"Select queries to regenerate"]})})]})]}),y.jsx("div",{className:"yst-mb-8",children:l.length===0?DL.map(function(te,de){return y.jsx("div",{className:ke("yst-mb-4 yst-cursor-pointer yst-rounded yst-border yst-border-slate-300 yst-p-3 yst-transition-colors","yst-bg-white"),children:y.jsx(P.SkeletonLoader,{children:te||"Example placeholder query for demonstration purposes."})},"placeholder-query-".concat(de))}):l.slice(0,rs).map(function(te,de){var H=te.isRegenerating?te.text===No?No:$L:te.text;return y.jsx("div",{className:ke("yst-mb-4"),children:y.jsxs("div",{className:"yst-flex yst-gap-2",children:[f&&y.jsx("div",{className:"yst-flex yst-items-center",children:y.jsx(P.Checkbox,{id:"query-regenerate-".concat(de),name:"query-regenerate-".concat(de),value:de.toString(),checked:p.includes(de.toString()),onChange:function(){return ce(de)},disabled:T})}),y.jsxs("div",{className:"yst-flex-1",children:[y.jsx(P.Label,{htmlFor:"query-text-".concat(de),className:"yst-mb-2 yst-block yst-text-sm yst-font-medium yst-text-slate-700",children:"Query ".concat(de+1)}),y.jsx(P.TextInput,{id:"query-text-".concat(de),type:"text",value:H,onChange:function(he){te.isRegenerating||re(de,he.target.value)},placeholder:"Enter your query...",className:"yst-w-full",disabled:te.isRegenerating,required:!0,maxLength:255})]})]})},te.id)})}),y.jsx(W1,{buttonText:"Run analysis (~ 5 minutes)",isButtonDisabled:oe,isLoading:W})]})]})};const RL=Object.freeze(Object.defineProperty({__proto__:null,default:IL},Symbol.toStringTag,{value:"Module"}));var NL=["min","max","progress","className"];function FL(e,t){if(e==null)return{};var n,r,i=BL(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function BL(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var X1=z.forwardRef(function(e,t){var n=e.min,r=e.max,i=e.progress,s=e.className,o=FL(e,NL),a=z.useMemo(function(){var c=Math.max(0,r-n);if(c===0)return 0;var u=(i-n)/c*100;return Math.max(0,Math.min(100,u))},[n,r,i]),l=Math.min(Math.max(i,n),r);return y.jsx("div",{ref:t,role:"progressbar","aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":l,"aria-valuetext":"".concat(Math.round(a),"%"),className:ke(s),...o,children:y.jsx("div",{className:"yst-relative yst-h-2 yst-w-full yst-overflow-hidden yst-rounded-full yst-bg-slate-200/40",children:y.jsx("div",{className:"yst-absolute yst-left-0 yst-top-0 yst-h-full yst-rounded-full yst-bg-[linear-gradient(97.38deg,_#A61E69_0%,_#6366F1_100%)] yst-transition-[width] yst-duration-300 yst-ease-out",style:{width:"".concat(a,"%")}})})})});X1.displayName="ProgressBarGradient";var Ji=[{labelAbove:"Running queries...",label:"Running queries",threshold:99},{labelAbove:"Done!",label:"Building analysis",threshold:100}],Z1=function(t){var n=t.progress,r=n===void 0?0:n,i=t.className,s=i===void 0?"":i,o=function(){for(var c=0;c<Ji.length;c++)if(r<=Ji[c].threshold)return Ji[c];return Ji[Ji.length-1]},a=o();return y.jsxs("div",{className:ke("yst-font-medium yst-text-slate-800",s),children:[y.jsxs("div",{className:"yst-flex yst-items-center yst-justify-center yst-gap-2",children:[r<100?y.jsx(P.Spinner,{}):y.jsx(s2,{className:"yst-text-green-400"}),y.jsx("span",{className:"yst-text-sm yst-font-medium yst-italic",children:a.labelAbove})]}),y.jsx(X1,{className:"yst-mt-3",progress:r,min:0,max:100}),y.jsx("div",{className:"yst-mt-3 yst-flex yst-justify-between yst-text-xs",children:Ji.map(function(l){return y.jsx("span",{children:y.jsx(Lc,{disabled:a.label!==l.label,children:l.label})},l.label)})})]})};Z1.propTypes={progress:Td.number,className:Td.string};var qL=function(t){switch(t){case"pending":case"processing":return 2*1e3;case"completed":return!1;default:return 10*1e3}},zL=function(){var t,n,r,i=cn(),s=Ut(),o=pc(),a=Jn(),l=a.brandId,c=o.brandId||l,u=Ed(c,{query:{enabled:!!c,select:function(C){var x=C.data;return x}}}),d=u.data,f=$4(c,"latest",{query:{enabled:!!c,select:function(C){var x=C.data;return x},refetchInterval:function(C){var x,k=C==null||(x=C.state)===null||x===void 0||(x=x.data)===null||x===void 0?void 0:x.data;return qL(k==null?void 0:k.status)}}}),h=f.data,g=h==null?void 0:h.id,m=g?"/brands/".concat(c,"/analysis/").concat(g):"/brands/".concat(c);z.useEffect(function(){var S=(h==null?void 0:h.status)==="pending"||(h==null?void 0:h.status)==="processing"||(h==null?void 0:h.status)==="completed";d!=null&&d.nextScheduledAnalysis&&h!==null&&h!==void 0&&h.status&&c7(d.nextScheduledAnalysis,5)&&!S&&i("/brands/".concat(c),{replace:!0})},[d==null?void 0:d.nextScheduledAnalysis,c,i,h==null?void 0:h.status]),z.useEffect(function(){((d==null?void 0:d.setupStatus)==="completed"||(d==null?void 0:d.setupStatus)==="scheduledFirstAnalysis"&&d!==null&&d!==void 0&&d.firstNextAnalysisOpportunity&&!m2(d.firstNextAnalysisOpportunity,2))&&i(m,{replace:!0})},[d==null?void 0:d.firstNextAnalysisOpportunity,d==null?void 0:d.setupStatus,m,i]);var p=d==null||(t=d.queries)===null||t===void 0?void 0:t.length,v=(h==null||(n=h.completedQueries)===null||n===void 0?void 0:n.length)||0,b=function(){if(p&&p>0){var S=80/p,C=v*S;return(h==null?void 0:h.status)==="completed"?100:Math.round(Math.min(C,80))}return 0}();return y.jsxs("div",{children:[y.jsxs("div",{className:"yst-space-y-8",children:[y.jsx(Z1,{progress:b}),y.jsx(za,{}),y.jsx("div",{className:"yst-space-y-8",children:d==null||(r=d.queries)===null||r===void 0?void 0:r.map(function(S){var C,x=S.id,k=S.query,w=x&&(h==null||(C=h.completedQueries)===null||C===void 0?void 0:C.includes(x));return y.jsxs("div",{className:ke("yst-flex yst-items-center yst-justify-between yst-gap-3"),children:[w===!0?y.jsx(s2,{className:"yst-h-5 yst-w-5 yst-text-green-400"}):y.jsx(P.Spinner,{}),y.jsx("span",{className:"yst-flex-1 yst-text-sm",children:k})]},"result-item-".concat(k))})})]}),y.jsx("div",{className:"yst-mb-[-2rem] yst-ml-[-2rem] yst-mr-[-2rem] yst-mt-8 yst-flex yst-justify-end yst-gap-4 yst-rounded-bl-lg yst-rounded-br-lg yst-border-t yst-border-slate-200 yst-bg-slate-50 yst-px-8 yst-py-6",children:y.jsx(P.Button,{as:ei,to:m,onClick:function(S){if(b!==100){S.preventDefault();return}s.clear()},disabled:b!==100,children:"Continue →"})})]})};const HL=Object.freeze(Object.defineProperty({__proto__:null,default:zL},Symbol.toStringTag,{value:"Module"}));exports.AIInsightsClient=LA;exports.setApiBaseUrl=Gv;
|
|
1282
|
+
`}},On=e=>Q1("light",e),En=e=>Q1("dark",e);ku(["click","mousedown","input"]);var aD=e=>{const[t,n]=mb({prefix:"TanstackQueryDevtools"}),r=_v(),i=U(()=>{const s=t.theme_preference||pb;return s!=="system"?s:r()});return L(Xf.Provider,{value:e,get children(){return L(wb,{localStore:t,setLocalStore:n,get children(){return L(Jf.Provider,{value:i,get children(){return L(W$,{localStore:t,setLocalStore:n})}})}})}})},lD=aD;const uD=Object.freeze(Object.defineProperty({__proto__:null,default:lD},Symbol.toStringTag,{value:"Module"}));var cD=e=>{const[t,n]=mb({prefix:"TanstackQueryDevtools"}),r=_v(),i=U(()=>{const s=t.theme_preference||pb;return s!=="system"?s:r()});return L(Xf.Provider,{value:e,get children(){return L(wb,{disabled:!0,localStore:t,setLocalStore:n,get children(){return L(Jf.Provider,{value:i,get children(){return L(Y$,{get children(){return L(bh,{localStore:t,setLocalStore:n,get onClose(){return e.onClose},showPanelViewOnly:!0})}})}})}})}})},dD=cD;const fD=Object.freeze(Object.defineProperty({__proto__:null,default:dD},Symbol.toStringTag,{value:"Module"}));function Y1(e){var t=e.children,n=e.description,r=e.title;return y.jsxs(P.Paper.Header,{children:[r&&y.jsx(P.Title,{className:Oe({"yst-mb-3":n||t}),children:r}),n&&(typeof n=="string"?y.jsx("p",{children:n}):n),t]})}function Vc(e,t){return mD(e)||yD(e,t)||gD(e,t)||hD()}function hD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1283
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gD(e,t){if(e){if(typeof e=="string")return Pm(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pm(e,t):void 0}}function Pm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yD(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function mD(e){if(Array.isArray(e))return e}var pD=function(t){var n=t.isOpen,r=t.onClose,i=t.groupToEdit,s=t.allBrands,o=Rn(),a=o.brandId,l=z.useState(""),u=Vc(l,2),c=u[0],d=u[1],f=z.useState([]),h=Vc(f,2),g=h[0],m=h[1],p=z.useState(!1),v=Vc(p,2),b=v[0],S=v[1],C=Gt();z.useEffect(function(){if(n&&i&&i.type==="group"){var D;d(String(i.name||""));var H=((D=i.groupedBrands)===null||D===void 0?void 0:D.map(function(Q){return String(Q.id||"")}))||[];m(H)}},[n,i]);var x=t2({mutation:{onSuccess:function(){C.invalidateQueries({queryKey:Zl(a)}),j()},onError:function(H){console.error("Error creating brand group:",H)}}}),k=x.mutate,w=x.isPending,_=Q5({mutation:{onSuccess:function(){C.invalidateQueries({queryKey:Zl(a)}),j(),A()},onError:function(H){console.error("Error deleting brand group:",H),window.alert("An error occurred while ungrouping the brands. Please try again later.")}}}),O=_.mutate,E=_.isPending,T=function(){!c.trim()||!(i!=null&&i.id)||k({brandId:a,data:{groupName:c.trim(),brandIds:g.map(function(H){return Number(H)})}})},j=function(){d(""),m([]),r()},B=function(){return g.map(function(H){if(i&&i.type==="group"){var Q,F=(Q=i.groupedBrands)===null||Q===void 0?void 0:Q.find(function(ie){return String(ie.id)===H});if(F)return F.name||""}var G=s.find(function(ie){return String(ie.id)===H});return G?G.type==="group"?"Group: ".concat(G.name):G.name||"":""}).filter(Boolean)},R=function(){S(!0)},A=function(){return S(!1)},M=function(){typeof(i==null?void 0:i.id)=="number"&&O({brandId:a,brandGroupId:i.id})};return!i||i.type!=="group"?null:y.jsxs(y.Fragment,{children:[y.jsx(P.Modal,{isOpen:n,onClose:b?function(){}:j,as:"div",children:y.jsx(P.Modal.Panel,{children:y.jsxs(P.Modal.Container,{children:[y.jsx(P.Modal.Container.Header,{className:"yst-mb-4",children:y.jsx(P.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Edit brand group"})}),y.jsxs(P.Modal.Container.Content,{className:"yst-mb-8 yst-space-y-4",children:[y.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"Update the group name or ungroup brands by removing their tags."}),y.jsxs("div",{children:[y.jsx("label",{htmlFor:"editGroupName",className:"yst-mb-2 yst-block yst-text-sm yst-font-medium",children:"Group name"}),y.jsx(P.TextInput,{id:"editGroupName",value:c,onChange:function(D){return d(D.target.value)},placeholder:"Enter group name",className:"yst-w-full"})]}),y.jsxs("div",{children:[y.jsx(P.TagField,{readOnly:!0,id:"editGroupedBrands",label:"Grouped brands",tags:B(),onRemoveTag:function(D){if(g.length<2)return S(!0);m(function(H){return H.filter(function(Q,F){return F!==D})})},onAddTag:function(){}}),g.length===0?y.jsx("p",{className:"yst-mt-2 yst-text-sm",children:'Click "Ungroup brands" to remove this group.'}):y.jsx("p",{className:"yst-mt-2 yst-text-sm yst-italic yst-text-gray-500",children:"Note: To add brands to this group, save this group, then use the checkboxes to select this group as well as any additional brands to be grouped."})]})]}),y.jsx(P.Modal.Container.Footer,{children:y.jsxs("div",{className:"yst-flex yst-w-full yst-items-center yst-justify-between",children:[y.jsx("div",{className:"yst-flex yst-justify-start",children:y.jsx(P.Button,{variant:"tertiary",onClick:R,disabled:w,className:"yst-text-red-600",children:"Ungroup brands"})}),y.jsxs("div",{className:"yst-flex yst-justify-end yst-gap-2",children:[y.jsx(P.Button,{variant:"secondary",onClick:j,children:"Cancel"}),y.jsx(P.Button,{variant:"primary",onClick:T,disabled:!c.trim()||w,isLoading:w,children:w?"Saving...":"Save changes"})]})]})})]})})}),y.jsx(Fu,{isOpen:b,onClose:A,onConfirm:M,title:"Ungroup this brand group?",description:y.jsxs(y.Fragment,{children:[y.jsx("p",{children:"The group will be removed, but the brands inside will remain in your brand list."}),y.jsx("p",{children:"This action cannot be undone. To create a new group with these brands, simply select them and create a new group."})]}),confirmText:"Yes, ungroup",isLoading:E})]})};function lf(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,g,m,p){var v=g&&g.prototype instanceof a?g:a,b=Object.create(v.prototype);return Zt(b,"_invoke",function(S,C,x){var k,w,_,O=0,E=x||[],T=!1,j={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(A,M){return k=A,w=0,_=e,j.n=M,o}};function B(R,A){for(w=R,_=A,t=0;!T&&O&&!M&&t<E.length;t++){var M,D=E[t],H=j.p,Q=D[2];R>3?(M=Q===A)&&(_=D[(w=D[4])?5:(w=3,3)],D[4]=D[5]=e):D[0]<=H&&((M=R<2&&H<D[1])?(w=0,j.v=A,j.n=D[1]):H<Q&&(M=R<3||D[0]>A||A>Q)&&(D[4]=R,D[5]=A,j.n=Q,w=0))}if(M||R>1)return o;throw T=!0,A}return function(R,A,M){if(O>1)throw TypeError("Generator is already running");for(T&&A===1&&B(A,M),w=A,_=M;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(j.n=-1),B(w,_)):j.n=_:j.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=j.n<0)?_:S.call(C,j))!==o)break}catch(D){k=e,w=1,_=D}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(Zt(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,Zt(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,Zt(d,"constructor",u),Zt(u,"constructor",l),l.displayName="GeneratorFunction",Zt(u,i,"GeneratorFunction"),Zt(d),Zt(d,i,"Generator"),Zt(d,r,function(){return this}),Zt(d,"toString",function(){return"[object Generator]"}),(lf=function(){return{w:s,m:f}})()}function Zt(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Zt=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){Zt(o,f,function(g){return this._invoke(f,h,g)})};c("next",0),c("throw",1),c("return",2)}},Zt(e,t,n,r)}function Tm(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function vD(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){Tm(s,r,i,o,a,"next",l)}function a(l){Tm(s,r,i,o,a,"throw",l)}o(void 0)})}}function Mm(e,t){return SD(e)||wD(e,t)||xD(e,t)||bD()}function bD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1284
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xD(e,t){if(e){if(typeof e=="string")return jm(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jm(e,t):void 0}}function jm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function wD(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function SD(e){if(Array.isArray(e))return e}var CD=function(t){var n=t.isOpen,r=t.onClose,i=t.brandId,s=t.brandsToGroup,o=t.onGroupCreated,a=Gt(),l=Rn(),u=l.analysisId,c=z.useState(""),d=Mm(c,2),f=d[0],h=d[1],g=z.useState([]),m=Mm(g,2),p=m[0],v=m[1];z.useEffect(function(){if(n&&s.length>0){var _,O=(_=s[0])===null||_===void 0?void 0:_.name;h(String(O||"New Group")),v(s.map(function(E){var T;return String((T=E.id)!==null&&T!==void 0?T:"")}))}},[n,s]);var b=t2({mutation:{onSuccess:function(){var _=vD(lf().m(function E(){return lf().w(function(T){for(;;)switch(T.n){case 0:return T.n=1,Promise.all([a.invalidateQueries({queryKey:Zl(i)}),a.invalidateQueries({queryKey:Pf(i)}),a.invalidateQueries({queryKey:Td(i,"latest")}),a.invalidateQueries({queryKey:Xl(i,"latest")}),a.invalidateQueries({queryKey:Td(i,u)}),a.invalidateQueries({queryKey:Xl(i,u)})]);case 1:o==null||o(),x();case 2:return T.a(2)}},E)}));function O(){return _.apply(this,arguments)}return O}(),onError:function(O){console.error("Error creating group:",O)}}}),S=b.mutate,C=b.isPending,x=function(){h(""),v([]),r()},k=function(){if(!(!f.trim()||p.length===0)){var O=p.flatMap(function(E){var T=s.find(function(j){return String(j.id)===E});return T&&T.type==="group"&&Array.isArray(T.groupedBrands)?T.groupedBrands.map(function(j){return String(j.id)}):E});S({brandId:i,data:{groupName:f.trim(),brandIds:O.filter(function(E){return E!==""}).map(function(E){return Number(E)})}})}},w=function(O){v(function(E){return E.filter(function(T){return T!==O})})};return y.jsx(P.Modal,{isOpen:n,onClose:x,children:y.jsx(P.Modal.Panel,{children:y.jsxs(P.Modal.Container,{children:[y.jsx(P.Modal.Container.Header,{children:y.jsx(P.Modal.Title,{children:"Edit brand group"})}),y.jsxs(P.Modal.Container.Content,{className:"yst-space-y-4",children:[y.jsxs("div",{children:[y.jsx("label",{htmlFor:"groupName",className:"yst-mb-2 yst-block yst-text-sm yst-font-medium",children:"Group name"}),y.jsx(P.TextInput,{id:"groupName",value:f,onChange:function(_){return h(_.target.value)},placeholder:"Enter group name",className:"yst-w-full"})]}),y.jsxs("div",{children:[y.jsx(P.TagField,{readOnly:!0,id:"groupedBrands",label:"Brands in group (".concat(p.length,")"),tags:p.map(function(_){var O=s.find(function(E){return String(E.id)===_});return O?O.type==="group"?"Group: ".concat(O.name):O.name||"":""}).filter(Boolean),onRemoveTag:function(_){var O=p.find(function(E){var T=s.find(function(B){return String(B.id)===E});if(!T)return!1;var j=T.type==="group"?"Group: ".concat(T.name):T.name||"";return j===_});O&&w(O)},onAddTag:function(){}}),p.length===0&&y.jsx("p",{className:"yst-text-sm yst-italic yst-text-gray-500",children:"No brands selected"})]}),y.jsx("p",{children:"Note: To add brands to this group, save this group, then use the checkboxes to select this group as well as any additional brands to be grouped."})]}),y.jsx(P.Modal.Container.Footer,{className:"yst-pt-4",children:y.jsxs("div",{className:"yst-flex yst-justify-end yst-gap-2",children:[y.jsx(P.Button,{variant:"secondary",onClick:x,disabled:C,children:"Cancel"}),y.jsx(P.Button,{variant:"primary",onClick:k,disabled:!f.trim()||p.length===0||C,children:C?"Saving...":"Save group"})]})})]})})})};function va(e){"@babel/helpers - typeof";return va=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},va(e)}function $m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Dm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$m(Object(n),!0).forEach(function(r){X1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$m(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function X1(e,t,n){return(t=_D(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _D(e){var t=kD(e,"string");return va(t)=="symbol"?t:t+""}function kD(e,t){if(va(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(va(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function OD(e){return PD(e)||AD(e)||Z1(e)||ED()}function ED(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1285
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AD(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function PD(e){if(Array.isArray(e))return uf(e)}function Hn(e,t){return jD(e)||MD(e,t)||Z1(e,t)||TD()}function TD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1286
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z1(e,t){if(e){if(typeof e=="string")return uf(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uf(e,t):void 0}}function uf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function MD(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function jD(e){if(Array.isArray(e))return e}var $D=function(){var t,n=dn(),r=z.useState(!1),i=Hn(r,2),s=i[0],o=i[1],a=z.useState({}),l=Hn(a,2),u=l[0],c=l[1],d=z.useState(""),f=Hn(d,2),h=f[0],g=f[1],m=z.useState(1),p=Hn(m,2),v=p[0],b=p[1],S=z.useState({}),C=Hn(S,2),x=C[0],k=C[1],w=z.useState(!1),_=Hn(w,2),O=_[0],E=_[1],T=z.useState(!1),j=Hn(T,2),B=j[0],R=j[1],A=z.useState(null),M=Hn(A,2),D=M[0],H=M[1],Q=Rn(),F=Q.brandId;function G(W){return String(W.id)}var ie=U5(F,{query:{enabled:!!F}}),ae=ie.data,N=ie.isLoading,le=10,te=(ae==null||(t=ae.data)===null||t===void 0?void 0:t.associatedBrands.filter(function(W){var ne,ee;return h?((ne=(ee=W.name)===null||ee===void 0?void 0:ee.toLowerCase())!==null&&ne!==void 0?ne:"").includes(h.toLowerCase()):!0}))||[],me=Math.ceil(te.length/le),J=(v-1)*le,Ce=OD(te).sort(function(W,ne){return W.type==="group"&&ne.type!=="group"?-1:W.type!=="group"&&ne.type==="group"?1:0}),ge=Ce.slice(J,J+le),ze=function(ne){var ee=te.find(function(we){return G(we)===ne});ee&&ee.type==="group"&&(H(ee),R(!0))},oe=Object.entries(x).filter(function(W){var ne=Hn(W,2),ee=ne[1];return ee}).map(function(W){var ne=Hn(W,1),ee=ne[0];return ee}),He=function(){E(!0)},lt=function(ne){g(ne.target.value),b(1)},dt=function(ne){k(function(ee){return Dm(Dm({},ee),{},X1({},ne,!ee[ne]))})},Ne=function(){n("/")},Fe=function(){k({}),c({}),o(!1)},Y=function(){E(!1)},Pe=function(){k({}),b(1),g("")},tt=function(){R(!1),H(null)},$e=function(ne,ee){return ne in u?!!u[ne]:!ee.isHidden},ue=[{Header:"Brand name",accessor:"name",Cell:function(ne){var ee=ne.value,we=ne.row;return y.jsx("span",{className:"yst-font-medium yst-text-slate-900",children:y.jsxs("div",{className:"yst-flex yst-items-center yst-gap-2",children:[y.jsx(P.Checkbox,{id:"brand-checkbox-".concat(we.id),checked:!!x[G(we)],onChange:function(){return dt(G(we))},value:G(we),label:we.isSelf?y.jsx(Nu,{children:ee}):ee,name:"brand-checkbox-".concat(we.id),disabled:!$e(G(we),we)}),we.type==="group"&&y.jsx(F6,{className:"yst-h-4 yst-w-4 yst-text-slate-400"})]})})},LoadingComponent:function(ne){var ee=ne.id,we=ee===void 0?"":ee;return y.jsxs("div",{className:"yst-flex",children:[y.jsx(P.Checkbox,{id:"loading-row-checkbox-".concat(we),value:"loading",label:"",disabled:!0,name:"brand-checkbox-".concat(we)})," ",y.jsx(P.SkeletonLoader,{className:"yst-h-6 yst-w-32",id:"loading-row-skeleton-".concat(we)})]})}},{Header:"Actions",accessor:"id",Cell:function(ne){var ee=ne.value,we=ne.row;return y.jsx(y.Fragment,{children:we.type==="group"?y.jsxs(P.Button,{variant:"tertiary",size:"small",onClick:function(){return ze(String(ee!=null?ee:""))},className:"yst-gap-1.5 yst-px-0",disabled:!$e(G(we),we),children:[y.jsx(o2,{className:"yst-h-4 yst-w-4"}),"Edit group"]}):void 0})},LoadingComponent:function(){return y.jsx(P.SkeletonLoader,{className:"yst-h-6 yst-w-24"})}}];return y.jsxs(P.Paper,{className:"yst-mx-auto yst-max-w-2xl",children:[y.jsx(Y1,{title:"Brand list ".concat(""),children:y.jsx("p",{children:"These are the brands found in responses to your example prompts. Group related brands to improve your analysis. You can rename or exclude irrelevant brands, and new brands will be added automatically if they appear in future analysis runs."})}),y.jsxs(P.Paper.Content,{children:[y.jsx("div",{className:"yst-mb-6",children:y.jsx(P.TextInput,{id:"brand-search",label:"Search brands",placeholder:"Search brands",value:h,onChange:lt})}),y.jsx("div",{className:"yst-mb-6",children:y.jsxs(P.Table,{columns:ue,className:"yst-w-full",variant:"minimal",children:[y.jsx(P.Table.Head,{children:y.jsx(P.Table.Row,{children:ue.map(function(W){return y.jsx(P.Table.Header,{children:W.Header},W.accessor)})})}),y.jsx(P.Table.Body,{children:N?[1,2,3].map(function(W,ne){return y.jsx(P.Table.Row,{children:ue.map(function(ee,we){return y.jsx(P.Table.Cell,{children:y.jsx(ee.LoadingComponent,{id:"skeleton-".concat(ne,"-").concat(we)},ee.accessor)},"cell-".concat(we))})},ne)}):ge.length===0?y.jsx(P.Table.Row,{children:y.jsx(P.Table.Cell,{colSpan:ue.length,children:y.jsxs("div",{className:"yst-py-12 yst-text-center",children:[y.jsx("h3",{className:"yst-mt-4 yst-text-lg yst-font-medium yst-text-slate-900",children:"No brands found"}),y.jsx("p",{className:"yst-mt-2 yst-text-sm yst-text-slate-500",children:h?'No brands match "'.concat(h,'". Try a different search term.'):"No brands have been found yet. Run an analysis to discover brands."}),h&&y.jsx(P.Button,{variant:"secondary",size:"small",onClick:function(){g(""),b(1)},className:"yst-mt-4",children:"Clear search"})]})})}):ge.map(function(W){return y.jsx(P.Table.Row,{children:ue.map(function(ne){return y.jsx(P.Table.Cell,{children:ne.Cell?ne.Cell({value:W[ne.accessor],row:W}):W[ne.accessor]},ne.accessor)})},W.id)})})]})}),y.jsxs("div",{className:"yst-flex yst-items-center yst-justify-between",children:[y.jsxs(P.Button,{variant:"secondary",onClick:He,className:"yst-mb-0 yst-gap-2",disabled:oe.length<2,children:[y.jsx(Z4,{})," Group brands"]}),y.jsx(P.Pagination,{variant:"text",current:v,total:me,onNavigate:b,className:"yst-flex-row",screenReaderTextPrevious:"Previous page",screenReaderTextNext:"Next page"})]})]}),y.jsx(jf,{children:y.jsx("div",{className:"yst-flex yst-items-center yst-justify-end yst-gap-4",children:s?y.jsxs(y.Fragment,{children:[y.jsx(P.Button,{variant:"secondary",className:"yst-mb-0",onClick:Fe,children:"Discard changes"}),y.jsx(P.Button,{variant:"primary",className:"yst-mb-0",onClick:Ne,children:"Save changes"})]}):y.jsx(P.Button,{as:ti,to:"/brands/".concat(F),variant:"tertiary",className:"yst-mb-0",children:"Return to analysis"})})}),y.jsx(CD,{isOpen:O,onClose:Y,brandId:F,brandsToGroup:te.filter(function(W){return oe.includes(G(W))}),onGroupCreated:Pe}),y.jsx(pD,{isOpen:B,onClose:tt,groupToEdit:D,allBrands:te})]})};const DD=Object.freeze(Object.defineProperty({__proto__:null,default:$D},Symbol.toStringTag,{value:"Module"}));function LD(e,t){return FD(e)||ND(e,t)||RD(e,t)||ID()}function ID(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1287
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RD(e,t){if(e){if(typeof e=="string")return Lm(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lm(e,t):void 0}}function Lm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ND(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function FD(e){if(Array.isArray(e))return e}var BD=function(t){var n=t.isOpen,r=t.onClose,i=Gt(),s=z.useState(""),o=LD(s,2),a=o[0],l=o[1],u=b4({mutation:{onSuccess:function(){i.clear(),r()}}}),c=u.mutate,d=u.isPending;return z.useEffect(function(){n&&l("")},[n]),y.jsx(Fu,{isOpen:n,onClose:r,onConfirm:function(){c()},isLoading:d,disabled:a!=="DELETE ALL",title:"Delete all data?",description:y.jsxs(y.Fragment,{children:[y.jsx("p",{children:"This will permanently erase all brands, analysis results, and queries from your account."}),y.jsx("p",{children:"This action cannot be undone."}),y.jsx(P.TextField,{id:"delete-all-confirmation",label:"To confirm, please type DELETE ALL:",value:a,onChange:function(f){return l(f.target.value)}}),y.jsx("p",{children:y.jsx("em",{children:"This is to make sure you understand this action is permanent."})})]}),confirmText:"Yes, delete all data",cancelText:"No, go back"})};function cf(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,g,m,p){var v=g&&g.prototype instanceof a?g:a,b=Object.create(v.prototype);return Jt(b,"_invoke",function(S,C,x){var k,w,_,O=0,E=x||[],T=!1,j={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(A,M){return k=A,w=0,_=e,j.n=M,o}};function B(R,A){for(w=R,_=A,t=0;!T&&O&&!M&&t<E.length;t++){var M,D=E[t],H=j.p,Q=D[2];R>3?(M=Q===A)&&(_=D[(w=D[4])?5:(w=3,3)],D[4]=D[5]=e):D[0]<=H&&((M=R<2&&H<D[1])?(w=0,j.v=A,j.n=D[1]):H<Q&&(M=R<3||D[0]>A||A>Q)&&(D[4]=R,D[5]=A,j.n=Q,w=0))}if(M||R>1)return o;throw T=!0,A}return function(R,A,M){if(O>1)throw TypeError("Generator is already running");for(T&&A===1&&B(A,M),w=A,_=M;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(j.n=-1),B(w,_)):j.n=_:j.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=j.n<0)?_:S.call(C,j))!==o)break}catch(D){k=e,w=1,_=D}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(Jt(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,Jt(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,Jt(d,"constructor",u),Jt(u,"constructor",l),l.displayName="GeneratorFunction",Jt(u,i,"GeneratorFunction"),Jt(d),Jt(d,i,"Generator"),Jt(d,r,function(){return this}),Jt(d,"toString",function(){return"[object Generator]"}),(cf=function(){return{w:s,m:f}})()}function Jt(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Jt=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){Jt(o,f,function(g){return this._invoke(f,h,g)})};c("next",0),c("throw",1),c("return",2)}},Jt(e,t,n,r)}function Im(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function qD(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){Im(s,r,i,o,a,"next",l)}function a(l){Im(s,r,i,o,a,"throw",l)}o(void 0)})}}function zD(e,t){return KD(e)||GD(e,t)||UD(e,t)||HD()}function HD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1288
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UD(e,t){if(e){if(typeof e=="string")return Rm(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rm(e,t):void 0}}function Rm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function GD(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function KD(e){if(Array.isArray(e))return e}var VD=function(t){var n=t.isOpen,r=t.brandId,i=t.onClose,s=t.brandName,o=Gt(),a=z.useState(""),l=zD(a,2),u=l[0],c=l[1],d=s4({mutation:{onSuccess:function(){var g=qD(cf().m(function p(){return cf().w(function(v){for(;;)switch(v.n){case 0:return v.n=1,Promise.all([o.invalidateQueries({queryKey:Yn()}),o.invalidateQueries({queryKey:Lu()})]);case 1:i();case 2:return v.a(2)}},p)}));function m(){return g.apply(this,arguments)}return m}()}}),f=d.mutate,h=d.isPending;return z.useEffect(function(){n&&c("")},[n]),y.jsx(Fu,{isOpen:n,onClose:i,onConfirm:function(){if(!s){console.error("Brand name is required for deletion confirmation");return}f({brandId:r})},isLoading:h,disabled:u.toLowerCase()!==(s==null?void 0:s.toLowerCase()),title:"Delete brand?",description:y.jsxs(y.Fragment,{children:[y.jsx("p",{children:"This will permanently delete all data associated with this brand, including past analyses and query history."}),y.jsx("p",{children:"This action cannot be undone."}),y.jsx(P.TextField,{id:"delete-modal-brand-name-confirmation",label:"To confirm, please type your brand name ".concat(s,":"),value:u,onChange:function(g){return c(g.target.value)}}),y.jsx("p",{children:y.jsx("em",{children:"This is to make sure you understand this action is permanent."})})]}),confirmText:"Yes, delete brand",cancelText:"No, go back"})};function ba(e){"@babel/helpers - typeof";return ba=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ba(e)}function No(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,g,m,p){var v=g&&g.prototype instanceof a?g:a,b=Object.create(v.prototype);return en(b,"_invoke",function(S,C,x){var k,w,_,O=0,E=x||[],T=!1,j={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(A,M){return k=A,w=0,_=e,j.n=M,o}};function B(R,A){for(w=R,_=A,t=0;!T&&O&&!M&&t<E.length;t++){var M,D=E[t],H=j.p,Q=D[2];R>3?(M=Q===A)&&(_=D[(w=D[4])?5:(w=3,3)],D[4]=D[5]=e):D[0]<=H&&((M=R<2&&H<D[1])?(w=0,j.v=A,j.n=D[1]):H<Q&&(M=R<3||D[0]>A||A>Q)&&(D[4]=R,D[5]=A,j.n=Q,w=0))}if(M||R>1)return o;throw T=!0,A}return function(R,A,M){if(O>1)throw TypeError("Generator is already running");for(T&&A===1&&B(A,M),w=A,_=M;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(j.n=-1),B(w,_)):j.n=_:j.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=j.n<0)?_:S.call(C,j))!==o)break}catch(D){k=e,w=1,_=D}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(en(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,en(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,en(d,"constructor",u),en(u,"constructor",l),l.displayName="GeneratorFunction",en(u,i,"GeneratorFunction"),en(d),en(d,i,"Generator"),en(d,r,function(){return this}),en(d,"toString",function(){return"[object Generator]"}),(No=function(){return{w:s,m:f}})()}function en(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}en=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){en(o,f,function(g){return this._invoke(f,h,g)})};c("next",0),c("throw",1),c("return",2)}},en(e,t,n,r)}function Nm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ar(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nm(Object(n),!0).forEach(function(r){WD(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WD(e,t,n){return(t=QD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QD(e){var t=YD(e,"string");return ba(t)=="symbol"?t:t+""}function YD(e,t){if(ba(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ba(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fm(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function Bm(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){Fm(s,r,i,o,a,"next",l)}function a(l){Fm(s,r,i,o,a,"throw",l)}o(void 0)})}}function XD(e,t){return tL(e)||eL(e,t)||JD(e,t)||ZD()}function ZD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1289
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JD(e,t){if(e){if(typeof e=="string")return qm(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qm(e,t):void 0}}function qm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eL(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function tL(e){if(Array.isArray(e))return e}var nL=function(t){var n,r,i=t.brand,s=t.isLast,o=t.onDelete,a=i.id,l=Rn(),u=l.hostAppProps,c=u.onAddSubscription,d=dn(),f=Fa(),h=f.setBrandId,g=z.useState(!1),m=XD(g,2),p=m[0],v=m[1],b=Gt(),S=Iu({query:{select:function(B){var R=B.data;return R}}}),C=S.data,x=n2({mutation:{onMutate:function(){var j=Bm(No().m(function R(A){var M,D,H;return No().w(function(Q){for(;;)switch(Q.n){case 0:return M=A.brandId,D=A.data,Q.n=1,b.cancelQueries({queryKey:Yn()});case 1:return H=b.getQueryData(Yn()),b.setQueryData(Yn(),function(F){var G,ie;return F&&Ar(Ar({},F),{},{data:Ar(Ar({},F.data),{},{brands:((G=(ie=F.data)===null||ie===void 0?void 0:ie.brands)!==null&&G!==void 0?G:[]).map(function(ae){return ae.id===M?Ar(Ar({},ae),{},{settings:Ar(Ar({},ae.settings),{},{enableAutomaticAnalysis:D.enableAutomaticAnalysis})}):ae})})})}),Q.a(2,{previous:H})}},R)}));function B(R){return j.apply(this,arguments)}return B}(),onSuccess:function(){if(i&&i.settings&&i.settings.enableAutomaticAnalysis===!1)return v(!1);v(!T)},onError:function(B,R,A){A!=null&&A.previous&&b.setQueryData(Yn(),A.previous)},onSettled:function(){var j=Bm(No().m(function R(){return No().w(function(A){for(;;)switch(A.n){case 0:return A.n=1,Promise.all([b.invalidateQueries({queryKey:Yn()}),b.invalidateQueries({queryKey:Lu()})]);case 1:return A.a(2)}},R)}));function B(){return j.apply(this,arguments)}return B}()}}),k=x.mutate,w=x.isPending,_=function(B){k({brandId:a,data:{enableAutomaticAnalysis:B}})},O=function(B){if(B){if(!E)return v(!0);if(!T)return _(!0);v(!0)}else _(!1)},E=Number(C==null?void 0:C.maxNumberOfActiveBrands)-Number(C==null?void 0:C.numberOfActiveBrands)>0||!!(i!=null&&(n=i.settings)!==null&&n!==void 0&&n.enableAutomaticAnalysis),T=S2(i==null?void 0:i.firstNextAnalysisOpportunity);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:Oe("yst-flex yst-max-w-2xl yst-flex-1 yst-flex-row yst-items-center yst-justify-start yst-gap-4 yst-py-4 yst-text-slate-800",{"yst-border-b-[1px] yst-border-b-slate-200":!s}),children:[y.jsx(P.Toggle,{id:"toggle-brand-".concat(i==null?void 0:i.id),checked:i==null||(r=i.settings)===null||r===void 0?void 0:r.enableAutomaticAnalysis,screenReaderLabel:"Enable or disable automatic analysis for this brand",onChange:O,disabled:(i==null?void 0:i.id)==="loading"||w}),y.jsxs("div",{className:"yst-font-medium",children:[(i==null?void 0:i.id)==="loading"?y.jsx(P.SkeletonLoader,{className:"yst-h-6 yst-w-32"}):i==null?void 0:i.name,(i==null?void 0:i.setupStatus)==="pendingQuerySelection"&&y.jsx("div",{children:y.jsx(P.Link,{onClick:function(){i.id?(h(i.id),d("/setup/".concat(i.id,"/queries"))):console.error("Brand ID is missing.")},children:"Finish setup"})}),(i==null?void 0:i.nextScheduledAnalysis)&&y.jsxs("div",{className:"yst-italic yst-font-normal yst-text-slate-500",children:["Next analysis:"," ",Dd(i.nextScheduledAnalysis)]})]}),y.jsx("div",{className:"yst-ml-auto yst-flex yst-flex-row yst-items-center yst-justify-end yst-gap-2 yst-text-slate-800",children:(i==null?void 0:i.id)==="loading"?y.jsx(P.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):y.jsxs(P.Button,{size:"small",variant:"tertiary",className:"yst-gap-1 yst-text-red-600 *:hover:yst-text-red-700",onClick:function(){i!=null&&i.id&&o(i.id)},disabled:(i==null?void 0:i.id)==="loading",children:[y.jsx(Mf,{})," Delete brand"]})})]}),y.jsx(P.Modal,{isOpen:p,onClose:function(){return v(!1)},position:"center",as:"div",className:Oe({"yst-mx-auto yst-max-w-xl":E}),children:E?y.jsx(P.Modal.Panel,{children:T?y.jsxs(y.Fragment,{children:[y.jsx(P.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:y.jsx(P.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Start brand analysis now?"})}),y.jsxs(P.Modal.Container.Content,{className:"yst-mb-4 yst-space-y-3",children:[y.jsx("p",{children:"Activating this brand will immediately start a new analysis."}),y.jsx("p",{children:"This will use one of your weekly analyses included in your subscription."})]}),y.jsxs(P.Modal.Container.Footer,{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-2",children:[y.jsx(P.Button,{variant:"secondary",onClick:function(){return v(!1)},children:"Cancel"}),y.jsx(P.Button,{variant:"primary",onClick:function(){_(!0)},isLoading:w,children:"Yes, start analysis"})]})]}):y.jsxs(y.Fragment,{children:[y.jsx(P.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:y.jsx(P.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Automatic analysis enabled"})}),y.jsxs(P.Modal.Container.Content,{className:"yst-mb-4 yst-space-y-3",children:[y.jsx("p",{children:"You've turned on the weekly automatic analysis for this brand."}),y.jsxs("p",{children:["The next analysis will run on"," ",y.jsx("span",{className:"yst-font-medium",children:Dd(i==null?void 0:i.nextScheduledAnalysis)||"the next analysis cycle"}),"."]})]}),y.jsx(P.Modal.Container.Footer,{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-2",children:y.jsx(P.Button,{variant:"primary",onClick:function(){return v(!1)},children:"Got it"})})]})}):y.jsxs(P.Modal.Panel,{children:[y.jsx("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:y.jsxs("div",{className:"yst-flex-1",children:[y.jsx(P.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:y.jsx(P.Modal.Title,{as:"h3",className:"yst-text-center yst-text-lg yst-font-medium",children:"You've reached your active brand limit"})}),y.jsx(P.Modal.Container.Content,{children:y.jsx("p",{className:"yst-text-center",children:"Each subscription lets you activate 1 brand. Add another subscription or deactivate an existing brand to activate this brand."})})]})}),y.jsx(P.Modal.Container.Footer,{children:y.jsxs("div",{className:"yst-flex yst-flex-col yst-justify-stretch yst-gap-2",children:[c&&y.jsxs(P.Button,{variant:"upsell",className:"yst-flex yst-gap-1",onClick:c,children:[y.jsx(a2,{}),"Add a subscription"]}),y.jsx(P.Button,{variant:"tertiary",className:"",onClick:function(){return v(!1)},children:"Manage active brands"})]})})]})})]})},zm,Hm,Um;function Wc(e,t){return oL(e)||sL(e,t)||iL(e,t)||rL()}function rL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1290
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iL(e,t){if(e){if(typeof e=="string")return Gm(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gm(e,t):void 0}}function Gm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function sL(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function oL(e){if(Array.isArray(e))return e}function xh(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Km=za(zm||(zm=xh(["xl:yst-w-1/3"]))),Vm=za(Hm||(Hm=xh(["xl:yst-w-2/3"]))),Wm=za(Um||(Um=xh(["yst-flex yst-flex-col yst-gap-8 xl:yst-flex-row"]))),aL=function(){var t,n,r,i,s=z.useState(!1),o=Wc(s,2),a=o[0],l=o[1],u=z.useState(!1),c=Wc(u,2),d=c[0],f=c[1],h=z.useState(null),g=Wc(h,2),m=g[0],p=g[1],v=Iu({query:{select:function(w){var _=w.data;return _}}}),b=v.data,S=Gi({query:{select:function(w){var _=w.data;return _==null?void 0:_.brands}}}),C=S.data,x=C==null?void 0:C.find(function(k){return k.id===m});return y.jsxs("form",{children:[y.jsxs(P.Card,{children:[y.jsx(yb,{title:"Settings",description:"Manage your brand settings and data. You can update analysis preferences or delete brands from your account."}),y.jsxs(P.Card.Content,{children:[y.jsxs(Wm,{children:[y.jsxs(Km,{className:"yst-space-y-2",children:[y.jsx(P.Title,{size:"4",children:"Brands"}),y.jsxs("p",{children:["You have"," ",y.jsxs("b",{children:[(t=b==null?void 0:b.activeSubscriptions)!==null&&t!==void 0?t:"—"," subscription(s)"]}),". This gives you up to"," ",y.jsxs("b",{children:[(n=b==null?void 0:b.maxNumberOfActiveBrands)!==null&&n!==void 0?n:"—"," active brand(s)"]}),", for which we’ll automatically run a weekly analysis."]}),y.jsx("p",{children:"You can activate or deactivate brands anytime, or permanently delete a brand and all its data."})]}),y.jsxs(Vm,{children:[C&&y.jsxs("p",{className:"yst-flex yst-w-full yst-max-w-2xl yst-flex-1 yst-flex-row yst-items-center yst-justify-start yst-gap-2 yst-border-b-[1px] yst-border-b-slate-200 yst-py-4 yst-font-medium yst-text-slate-800",children:["Active brands: ",(r=b==null?void 0:b.numberOfActiveBrands)!==null&&r!==void 0?r:"—"," of"," ",(i=b==null?void 0:b.maxNumberOfActiveBrands)!==null&&i!==void 0?i:"—"]}),C&&C.length===0&&y.jsxs("p",{className:"yst-mt-4 yst-text-slate-500",children:["No brands found. Please"," ",y.jsx(P.Link,{as:ti,to:"/setup",children:"add a brand"})," ","to start analyzing."]}),(C!=null?C:[{id:"loading",name:"Loading..."}]).map(function(k,w,_){return y.jsx(nL,{brand:k,isLast:w===_.length-1,onDelete:function(O){p(O),l(!0)}},k.id)})]})]}),y.jsx(Ha,{}),y.jsxs(Wm,{children:[y.jsxs(Km,{className:"yst-space-y-2",children:[y.jsx(P.Title,{size:"4",children:"Delete all data"}),y.jsx("p",{children:"Permanently delete all brands, analysis results, and query history from your account."})]}),y.jsxs(Vm,{className:"yst-space-y-4",children:[y.jsxs(P.Button,{variant:"error",onClick:function(){f(!0)},disabled:(C==null?void 0:C.length)===0,children:[y.jsx(Mf,{})," Delete all data"]}),y.jsx("p",{children:y.jsxs("i",{children:[y.jsx("b",{children:"Note:"})," This will erase everything and cannot be reversed."]})})]})]})]})]}),y.jsx(VD,{isOpen:a,onClose:function(){l(!1),p(null)},brandId:m||"",brandName:x==null?void 0:x.name}),y.jsx(BD,{isOpen:d,onClose:function(){f(!1)}})]})};const lL=Object.freeze(Object.defineProperty({__proto__:null,default:aL},Symbol.toStringTag,{value:"Module"}));function vu(e){"@babel/helpers - typeof";return vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vu(e)}var df=[{path:"/setup",id:1,title:"Brand & location info",description:"Enter a few basic details about your brand so we can generate relevant queries people might use in AI models like ChatGPT. This helps us analyze how visible your brand is in their responses."},{path:"/setup/:brandId/queries",id:2,title:"Queries",description:"Review the queries we've generated from your brand info. These are phrases people might type into AI models that could trigger your brand to appear."},{path:"/setup/:brandId/analysis",id:3,title:"Analysis",description:"We're checking how your brand shows up in AI. Your queries will now be tested in ChatGPT. This process should take around 5 minutes."}],uL=function(t){return df.find(function(n){return!!Fs(n.path,t)})||df[0]};function cL(){var e=Ut(),t=uL(e.pathname);return y.jsxs(P.Paper,{className:"yst-mx-auto yst-max-w-2xl",children:[y.jsx(Y1,{title:y.jsx(J1,{currentStep:t,steps:df}),description:t.description}),y.jsx(P.Paper.Content,{children:y.jsx(Bs,{})})]})}var J1=function(t){var n=t.title,r=t.currentStep,i=t.steps;return y.jsxs("span",{className:"yst-inline-flex yst-flex-row yst-gap-4",children:[y.jsxs("span",{className:"yst-tracking-[.2em] yst-text-slate-400",children:[y.jsx("span",{className:"yst-text-slate-900",children:vu(r)==="object"?r.id:r}),"/",Array.isArray(i)?i.length:i]}),y.jsx("span",{children:vu(r)==="object"?r.title:n||"Step ".concat(r)})]})};const dL=Object.freeze(Object.defineProperty({__proto__:null,SetupPaperTitle:J1,default:cL},Symbol.toStringTag,{value:"Module"}));var ex=function(t){var n=t.onBack,r=t.variant,i=r===void 0?"ai":r,s=t.buttonText,o=t.onButtonClick,a=t.isButtonDisabled,l=a===void 0?!1:a,u=t.isLoading,c=u===void 0?!1:u;return y.jsx(jf,{nestedInPaperContent:!0,children:y.jsxs("div",{className:Oe({"yst-flex yst-flex-1 yst-flex-col yst-items-start yst-justify-between yst-gap-4 md:yst-flex-row md:yst-items-center md:yst-justify-between":n}),children:[n&&y.jsx(P.Button,{variant:"tertiary",onClick:n,className:"yst-no-underline",children:"← Back"}),y.jsx("div",{className:Oe("yst-flex yst-flex-col yst-items-stretch yst-gap-4 md:yst-flex-row md:yst-items-center md:yst-justify-end"),children:y.jsxs(P.Button,{onClick:o,variant:i==="ai"?"primary":i,className:"yst-gap-1.5",style:i==="ai"?{background:"linear-gradient(102deg, #A61E69 0%, #6366F1 100%)",color:"#fff"}:{},disabled:l,type:"submit",isLoading:c,children:[i==="ai"&&y.jsx(e6,{}),s]})})]})})},fL=[{value:"US",label:"United States"},{value:"GB",label:"United Kingdom"},{value:"CA",label:"Canada"},{value:"AU",label:"Australia"},{value:"DE",label:"Germany"},{value:"FR",label:"France"},{value:"NL",label:"Netherlands"}],hL=[{value:"AF",label:"Afghanistan"},{value:"AX",label:"Åland Islands"},{value:"AL",label:"Albania"},{value:"DZ",label:"Algeria"},{value:"AS",label:"American Samoa"},{value:"AD",label:"Andorra"},{value:"AO",label:"Angola"},{value:"AI",label:"Anguilla"},{value:"AQ",label:"Antarctica"},{value:"AG",label:"Antigua and Barbuda"},{value:"AR",label:"Argentina"},{value:"AM",label:"Armenia"},{value:"AW",label:"Aruba"},{value:"AT",label:"Austria"},{value:"AZ",label:"Azerbaijan"},{value:"BS",label:"Bahamas"},{value:"BH",label:"Bahrain"},{value:"BD",label:"Bangladesh"},{value:"BB",label:"Barbados"},{value:"BY",label:"Belarus"},{value:"BE",label:"Belgium"},{value:"PW",label:"Belau"},{value:"BZ",label:"Belize"},{value:"BJ",label:"Benin"},{value:"BM",label:"Bermuda"},{value:"BT",label:"Bhutan"},{value:"BO",label:"Bolivia"},{value:"BQ",label:"Bonaire, Saint Eustatius and Saba"},{value:"BA",label:"Bosnia and Herzegovina"},{value:"BW",label:"Botswana"},{value:"BV",label:"Bouvet Island"},{value:"BR",label:"Brazil"},{value:"IO",label:"British Indian Ocean Territory"},{value:"BN",label:"Brunei"},{value:"BG",label:"Bulgaria"},{value:"BF",label:"Burkina Faso"},{value:"BI",label:"Burundi"},{value:"KH",label:"Cambodia"},{value:"CM",label:"Cameroon"},{value:"CV",label:"Cape Verde"},{value:"KY",label:"Cayman Islands"},{value:"CF",label:"Central African Republic"},{value:"TD",label:"Chad"},{value:"CL",label:"Chile"},{value:"CN",label:"China"},{value:"CX",label:"Christmas Island"},{value:"CC",label:"Cocos (Keeling) Islands"},{value:"CO",label:"Colombia"},{value:"KM",label:"Comoros"},{value:"CG",label:"Congo (Brazzaville)"},{value:"CD",label:"Congo (Kinshasa)"},{value:"CK",label:"Cook Islands"},{value:"CR",label:"Costa Rica"},{value:"HR",label:"Croatia"},{value:"CU",label:"Cuba"},{value:"CW",label:"Curaçao"},{value:"CY",label:"Cyprus"},{value:"CZ",label:"Czech Republic"},{value:"DK",label:"Denmark"},{value:"DJ",label:"Djibouti"},{value:"DM",label:"Dominica"},{value:"DO",label:"Dominican Republic"},{value:"EC",label:"Ecuador"},{value:"EG",label:"Egypt"},{value:"SV",label:"El Salvador"},{value:"GQ",label:"Equatorial Guinea"},{value:"ER",label:"Eritrea"},{value:"EE",label:"Estonia"},{value:"ET",label:"Ethiopia"},{value:"FK",label:"Falkland Islands"},{value:"FO",label:"Faroe Islands"},{value:"FJ",label:"Fiji"},{value:"FI",label:"Finland"},{value:"GF",label:"French Guiana"},{value:"PF",label:"French Polynesia"},{value:"TF",label:"French Southern Territories"},{value:"GA",label:"Gabon"},{value:"GM",label:"Gambia"},{value:"GE",label:"Georgia"},{value:"GH",label:"Ghana"},{value:"GI",label:"Gibraltar"},{value:"GR",label:"Greece"},{value:"GL",label:"Greenland"},{value:"GD",label:"Grenada"},{value:"GP",label:"Guadeloupe"},{value:"GU",label:"Guam"},{value:"GT",label:"Guatemala"},{value:"GG",label:"Guernsey"},{value:"GN",label:"Guinea"},{value:"GW",label:"Guinea-Bissau"},{value:"GY",label:"Guyana"},{value:"HT",label:"Haiti"},{value:"HM",label:"Heard Island and McDonald Islands"},{value:"HN",label:"Honduras"},{value:"HK",label:"Hong Kong"},{value:"HU",label:"Hungary"},{value:"IS",label:"Iceland"},{value:"IN",label:"India"},{value:"ID",label:"Indonesia"},{value:"IR",label:"Iran"},{value:"IQ",label:"Iraq"},{value:"IE",label:"Ireland"},{value:"IM",label:"Isle of Man"},{value:"IL",label:"Israel"},{value:"IT",label:"Italy"},{value:"CI",label:"Ivory Coast"},{value:"JM",label:"Jamaica"},{value:"JP",label:"Japan"},{value:"JE",label:"Jersey"},{value:"JO",label:"Jordan"},{value:"KZ",label:"Kazakhstan"},{value:"KE",label:"Kenya"},{value:"KI",label:"Kiribati"},{value:"KW",label:"Kuwait"},{value:"KG",label:"Kyrgyzstan"},{value:"LA",label:"Laos"},{value:"LV",label:"Latvia"},{value:"LB",label:"Lebanon"},{value:"LS",label:"Lesotho"},{value:"LR",label:"Liberia"},{value:"LY",label:"Libya"},{value:"LI",label:"Liechtenstein"},{value:"LT",label:"Lithuania"},{value:"LU",label:"Luxembourg"},{value:"MO",label:"Macao"},{value:"MK",label:"North Macedonia"},{value:"MG",label:"Madagascar"},{value:"MW",label:"Malawi"},{value:"MY",label:"Malaysia"},{value:"MV",label:"Maldives"},{value:"ML",label:"Mali"},{value:"MT",label:"Malta"},{value:"MH",label:"Marshall Islands"},{value:"MQ",label:"Martinique"},{value:"MR",label:"Mauritania"},{value:"MU",label:"Mauritius"},{value:"YT",label:"Mayotte"},{value:"MX",label:"Mexico"},{value:"FM",label:"Micronesia"},{value:"MD",label:"Moldova"},{value:"MC",label:"Monaco"},{value:"MN",label:"Mongolia"},{value:"ME",label:"Montenegro"},{value:"MS",label:"Montserrat"},{value:"MA",label:"Morocco"},{value:"MZ",label:"Mozambique"},{value:"MM",label:"Myanmar"},{value:"NA",label:"Namibia"},{value:"NR",label:"Nauru"},{value:"NP",label:"Nepal"},{value:"NC",label:"New Caledonia"},{value:"NZ",label:"New Zealand"},{value:"NI",label:"Nicaragua"},{value:"NE",label:"Niger"},{value:"NG",label:"Nigeria"},{value:"NU",label:"Niue"},{value:"NF",label:"Norfolk Island"},{value:"MP",label:"Northern Mariana Islands"},{value:"KP",label:"North Korea"},{value:"NO",label:"Norway"},{value:"OM",label:"Oman"},{value:"PK",label:"Pakistan"},{value:"PS",label:"Palestinian Territory"},{value:"PA",label:"Panama"},{value:"PG",label:"Papua New Guinea"},{value:"PY",label:"Paraguay"},{value:"PE",label:"Peru"},{value:"PH",label:"Philippines"},{value:"PN",label:"Pitcairn"},{value:"PL",label:"Poland"},{value:"PT",label:"Portugal"},{value:"PR",label:"Puerto Rico"},{value:"QA",label:"Qatar"},{value:"RE",label:"Reunion"},{value:"RO",label:"Romania"},{value:"RU",label:"Russia"},{value:"RW",label:"Rwanda"},{value:"BL",label:"Saint Barthélemy"},{value:"SH",label:"Saint Helena"},{value:"KN",label:"Saint Kitts and Nevis"},{value:"LC",label:"Saint Lucia"},{value:"MF",label:"Saint Martin (French part)"},{value:"SX",label:"Saint Martin (Dutch part)"},{value:"PM",label:"Saint Pierre and Miquelon"},{value:"VC",label:"Saint Vincent and the Grenadines"},{value:"SM",label:"San Marino"},{value:"ST",label:"São Tomé and Príncipe"},{value:"SA",label:"Saudi Arabia"},{value:"SN",label:"Senegal"},{value:"RS",label:"Serbia"},{value:"SC",label:"Seychelles"},{value:"SL",label:"Sierra Leone"},{value:"SG",label:"Singapore"},{value:"SK",label:"Slovakia"},{value:"SI",label:"Slovenia"},{value:"SB",label:"Solomon Islands"},{value:"SO",label:"Somalia"},{value:"ZA",label:"South Africa"},{value:"GS",label:"South Georgia/Sandwich Islands"},{value:"KR",label:"South Korea"},{value:"SS",label:"South Sudan"},{value:"ES",label:"Spain"},{value:"LK",label:"Sri Lanka"},{value:"SD",label:"Sudan"},{value:"SR",label:"Suriname"},{value:"SJ",label:"Svalbard and Jan Mayen"},{value:"SZ",label:"Eswatini"},{value:"SE",label:"Sweden"},{value:"CH",label:"Switzerland"},{value:"SY",label:"Syria"},{value:"TW",label:"Taiwan"},{value:"TJ",label:"Tajikistan"},{value:"TZ",label:"Tanzania"},{value:"TH",label:"Thailand"},{value:"TL",label:"Timor-Leste"},{value:"TG",label:"Togo"},{value:"TK",label:"Tokelau"},{value:"TO",label:"Tonga"},{value:"TT",label:"Trinidad and Tobago"},{value:"TN",label:"Tunisia"},{value:"TR",label:"Turkey"},{value:"TM",label:"Turkmenistan"},{value:"TC",label:"Turks and Caicos Islands"},{value:"TV",label:"Tuvalu"},{value:"UG",label:"Uganda"},{value:"UA",label:"Ukraine"},{value:"AE",label:"United Arab Emirates"},{value:"UM",label:"United States (US) Minor Outlying Islands"},{value:"UY",label:"Uruguay"},{value:"UZ",label:"Uzbekistan"},{value:"VU",label:"Vanuatu"},{value:"VA",label:"Vatican"},{value:"VE",label:"Venezuela"},{value:"VN",label:"Vietnam"},{value:"VG",label:"Virgin Islands (British)"},{value:"VI",label:"Virgin Islands (US)"},{value:"WF",label:"Wallis and Futuna"},{value:"EH",label:"Western Sahara"},{value:"WS",label:"Samoa"},{value:"YE",label:"Yemen"},{value:"ZM",label:"Zambia"},{value:"ZW",label:"Zimbabwe"}],Qm=[].concat(fL,hL,[{value:"OTHER",label:"Other"}]),gL=[{value:"en",label:"English"},{value:"es",label:"Spanish"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"zh",label:"Chinese (Mandarin)"},{value:"ja",label:"Japanese"}],yL=[{value:"sq",label:"Albanian"},{value:"am",label:"Amharic"},{value:"ar",label:"Arabic"},{value:"hy",label:"Armenian"},{value:"bn",label:"Bengali"},{value:"bs",label:"Bosnian"},{value:"bg",label:"Bulgarian"},{value:"my",label:"Burmese"},{value:"ca",label:"Catalan"},{value:"zh",label:"Chinese"},{value:"hr",label:"Croatian"},{value:"cs",label:"Czech"},{value:"da",label:"Danish"},{value:"nl",label:"Dutch"},{value:"et",label:"Estonian"},{value:"fi",label:"Finnish"},{value:"fr",label:"French"},{value:"ka",label:"Georgian"},{value:"de",label:"German"},{value:"el",label:"Greek"},{value:"gu",label:"Gujarati"},{value:"hi",label:"Hindi"},{value:"hu",label:"Hungarian"},{value:"is",label:"Icelandic"},{value:"id",label:"Indonesian"},{value:"it",label:"Italian"},{value:"ja",label:"Japanese"},{value:"kn",label:"Kannada"},{value:"kk",label:"Kazakh"},{value:"ko",label:"Korean"},{value:"lv",label:"Latvian"},{value:"lt",label:"Lithuanian"},{value:"mk",label:"Macedonian"},{value:"ms",label:"Malay"},{value:"ml",label:"Malayalam"},{value:"mr",label:"Marathi"},{value:"mn",label:"Mongolian"},{value:"no",label:"Norwegian"},{value:"fa",label:"Persian"},{value:"pl",label:"Polish"},{value:"pt",label:"Portuguese"},{value:"pa",label:"Punjabi"},{value:"ro",label:"Romanian"},{value:"ru",label:"Russian"},{value:"sr",label:"Serbian"},{value:"sk",label:"Slovak"},{value:"sl",label:"Slovenian"},{value:"so",label:"Somali"},{value:"es",label:"Spanish"},{value:"sw",label:"Swahili"},{value:"sv",label:"Swedish"},{value:"tl",label:"Tagalog"},{value:"ta",label:"Tamil"},{value:"te",label:"Telugu"},{value:"th",label:"Thai"},{value:"tr",label:"Turkish"},{value:"uk",label:"Ukrainian"},{value:"ur",label:"Urdu"},{value:"vi",label:"Vietnamese"}],mL=[].concat(gL,yL);function Qr(e){"@babel/helpers - typeof";return Qr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qr(e)}function Ym(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ym(Object(n),!0).forEach(function(r){tx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ym(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tx(e,t,n){return(t=pL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pL(e){var t=vL(e,"string");return Qr(t)=="symbol"?t:t+""}function vL(e,t){if(Qr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ff(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,g,m,p){var v=g&&g.prototype instanceof a?g:a,b=Object.create(v.prototype);return tn(b,"_invoke",function(S,C,x){var k,w,_,O=0,E=x||[],T=!1,j={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(A,M){return k=A,w=0,_=e,j.n=M,o}};function B(R,A){for(w=R,_=A,t=0;!T&&O&&!M&&t<E.length;t++){var M,D=E[t],H=j.p,Q=D[2];R>3?(M=Q===A)&&(_=D[(w=D[4])?5:(w=3,3)],D[4]=D[5]=e):D[0]<=H&&((M=R<2&&H<D[1])?(w=0,j.v=A,j.n=D[1]):H<Q&&(M=R<3||D[0]>A||A>Q)&&(D[4]=R,D[5]=A,j.n=Q,w=0))}if(M||R>1)return o;throw T=!0,A}return function(R,A,M){if(O>1)throw TypeError("Generator is already running");for(T&&A===1&&B(A,M),w=A,_=M;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(j.n=-1),B(w,_)):j.n=_:j.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=j.n<0)?_:S.call(C,j))!==o)break}catch(D){k=e,w=1,_=D}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(tn(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,tn(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,tn(d,"constructor",u),tn(u,"constructor",l),l.displayName="GeneratorFunction",tn(u,i,"GeneratorFunction"),tn(d),tn(d,i,"Generator"),tn(d,r,function(){return this}),tn(d,"toString",function(){return"[object Generator]"}),(ff=function(){return{w:s,m:f}})()}function tn(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}tn=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){tn(o,f,function(g){return this._invoke(f,h,g)})};c("next",0),c("throw",1),c("return",2)}},tn(e,t,n,r)}function Zm(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function bL(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){Zm(s,r,i,o,a,"next",l)}function a(l){Zm(s,r,i,o,a,"throw",l)}o(void 0)})}}function Eo(e,t){return CL(e)||SL(e,t)||wL(e,t)||xL()}function xL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1291
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wL(e,t){if(e){if(typeof e=="string")return Jm(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jm(e,t):void 0}}function Jm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function SL(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function CL(e){if(Array.isArray(e))return e}var _L=function(){var t,n=dn(),r=Fa(),i=Gt(),s=z.useState(),o=Eo(s,2),a=o[0],l=o[1],u=z.useState(!1),c=Eo(u,2),d=c[0],f=c[1],h=z.useState({name:"",url:"",description:"",language:"en",isLocal:!1,country:"",region:""}),g=Eo(h,2),m=g[0],p=g[1],v=z.useState(null),b=Eo(v,2),S=b[0],C=b[1],x=e4({mutation:{onSuccess:function(){var A=bL(ff().m(function D(H){var Q;return ff().w(function(F){for(;;)switch(F.n){case 0:return Q=H.data.id,F.n=1,Promise.all([i.invalidateQueries({queryKey:Lu()}),i.invalidateQueries({queryKey:Yn()})]);case 1:Q&&r.setBrandId(Q),H!=null&&H.status&&H.status>=200&&H.status<300&&Q&&(r.setBrandId(Q),l(Q));case 2:return F.a(2)}},D)}));function M(D){return A.apply(this,arguments)}return M}(),onError:function(){f(!1)}}}),k=x.mutate,w=x.isPending,_=x.error,O=Gi({query:{enabled:!!a,select:function(M){var D=M.data;return D==null?void 0:D.brands},refetchInterval:function(M){var D;return((M==null||(D=M.state)===null||D===void 0||(D=D.data)===null||D===void 0||(D=D.data)===null||D===void 0?void 0:D.brands)||[]).find(function(H){return H.id===a})?!1:2*1e3}}}),E=O.data;z.useEffect(function(){a&&E!==null&&E!==void 0&&E.find(function(A){return A.id===a})&&n("/setup/".concat(a,"/queries"),{replace:!0})},[a,E,n]);var T=function(M,D){p(function(H){return Xm(Xm({},H),{},tx({},M,D))})},j=function(M){if(M.preventDefault(),C(null),m.description.length>250){C("Your brand description is too long. Please keep it within the 250-character limit."),f(!1);return}f(!0);var D=m.url;D&&!/^https?:\/\//i.test(D)&&(D="https://".concat(D)),k({data:{name:m.name,url:D,description:m.description,focusLanguage:m.language,country:m.country,regionOrCity:m.region}})};function B(A){return Qr(A)==="object"&&A!==null&&"response"in A&&Qr(A.response)==="object"&&A.response!==void 0&&"data"in A.response}var R=B(_)?_.response.data.errors:void 0;return y.jsxs("form",{onSubmit:j,children:[y.jsxs("div",{className:"yst-space-y-6",children:[y.jsx(P.Title,{size:"2",children:"Brand info"}),!!_&&y.jsx(P.Alert,{variant:"error",title:"Error",isVisible:!!_,children:y.jsx("ul",{children:R&&Qr(R)==="object"?Object.entries(R).flatMap(function(A){var M=Eo(A,2),D=M[0],H=M[1];return Array.isArray(H)?H.map(function(Q,F){return y.jsx("li",{children:Q},"".concat(D,"-").concat(F))}):null}):"There was an error creating the brand."})}),S&&y.jsx(P.Alert,{variant:"error",title:"Error",isVisible:!!S,children:y.jsx("ul",{children:y.jsx("li",{children:"Your brand description is too long. Please keep it within the 250-character limit."})})}),y.jsx(P.TextField,{id:"name",label:"Brand name",value:m.name,onChange:function(A){return T("name",A.target.value)}}),y.jsx(P.TextField,{id:"url",label:"Website URL (optional)",placeholder:"Example: https://yourwebsite.com",value:m.url,onChange:function(A){return T("url",A.target.value)}}),y.jsxs("div",{id:"brand-description-textarea",children:[y.jsx(P.TextareaField,{id:"brand-description",label:"Brand description",value:m.description,onChange:function(A){var M=A.target.value;T("description",M)},...m.description.length>250?{validation:{variant:"error",message:"Your brand description is too long. Please keep it within the 250-character limit."}}:{},placeholder:"e.g. We design eco-friendly yoga mats for busy professionals who want sustainable gear that’s durable, stylish and kind to the planet."}),y.jsxs("div",{className:"yst-flex yst-mt-1",children:[y.jsxs("div",{className:"yst-flex-grow yst-flex-col",children:[m.description.length>250&&y.jsx("div",{className:"yst-text-red-500 yst-mb-2",children:"Your brand description is too long. Please keep it within the 250-character limit."}),"Tell us about your brand: what you do, who it’s for and what makes it special."]}),y.jsxs("div",{className:Oe("yst-text-xs yst-mt-[-4px] yst-ml-6",{"yst-text-slate-500":m.description.length<=250,"yst-text-red-500":m.description.length>250}),children:[m.description.length,"/250"]})]})]}),y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(P.Select,{className:"yst-max-w-sm",id:"language-select",label:"Target language",value:m.language,onChange:function(A){return T("language",A)},options:mL.map(function(A){return{label:A.label,value:A.value}})}),y.jsx("p",{children:"The main language your brand uses to communicate or create content."})]})]}),y.jsx(Ha,{}),y.jsxs("div",{className:"yst-space-y-6",children:[y.jsx(P.Title,{size:"2",children:"Location info"}),y.jsx("p",{children:"Specify a location to enhance the accuracy of the analysis."}),y.jsx(P.Autocomplete,{className:"yst-max-w-sm",id:"country-select",label:"Target country (optional)",value:m.country,nullable:!0,placeholder:"Select...",onChange:function(A){return T("country",A)},onQueryChange:function(){},selectedLabel:((t=Qm.find(function(A){return A.value===m.country}))===null||t===void 0?void 0:t.label)||"",children:Qm.map(function(A){return y.jsx(P.Autocomplete.Option,{value:A.value,children:A.label},A.value)})}),m.country&&y.jsx(P.TextField,{id:"region",label:"Target city, state, or region (optional)",value:m.region,onChange:function(A){return T("region",A.target.value)},description:`Enter a city, state, or region to narrow down the analysis. For
|
|
1292
|
+
example: California, Bavaria, or Paris.`})]}),y.jsx(ex,{onBack:function(){return n(-1)},buttonText:"Generate queries",isButtonDisabled:w||!!a||d,isLoading:w||!!a})]})};const kL=Object.freeze(Object.defineProperty({__proto__:null,default:_L},Symbol.toStringTag,{value:"Module"})),ep=e=>I.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},I.createElement("path",{d:"M3.33284 2V4.66667M1.99951 3.33333H4.66618M3.99951 11.3333V14M2.66618 12.6667H5.33284M8.66618 2L10.19 6.57143L13.9995 8L10.19 9.42857L8.66618 14L7.14237 9.42857L3.33284 8L7.14237 6.57143L8.66618 2Z",stroke:"url(#paint0_linear_3891_2757)",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),I.createElement("defs",null,I.createElement("linearGradient",{id:"paint0_linear_3891_2757",x1:1.99951,y1:2,x2:15.3308,y2:3.72773,gradientUnits:"userSpaceOnUse"},I.createElement("stop",{stopColor:"#A61E69"}),I.createElement("stop",{offset:1,stopColor:"#6366F1"}))));function xa(e){"@babel/helpers - typeof";return xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xa(e)}function OL(e){return PL(e)||AL(e)||nx(e)||EL()}function EL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1293
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AL(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function PL(e){if(Array.isArray(e))return gf(e)}function tp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tp(Object(n),!0).forEach(function(r){TL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function TL(e,t,n){return(t=ML(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ML(e){var t=jL(e,"string");return xa(t)=="symbol"?t:t+""}function jL(e,t){if(xa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hf(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,g,m,p){var v=g&&g.prototype instanceof a?g:a,b=Object.create(v.prototype);return nn(b,"_invoke",function(S,C,x){var k,w,_,O=0,E=x||[],T=!1,j={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(A,M){return k=A,w=0,_=e,j.n=M,o}};function B(R,A){for(w=R,_=A,t=0;!T&&O&&!M&&t<E.length;t++){var M,D=E[t],H=j.p,Q=D[2];R>3?(M=Q===A)&&(_=D[(w=D[4])?5:(w=3,3)],D[4]=D[5]=e):D[0]<=H&&((M=R<2&&H<D[1])?(w=0,j.v=A,j.n=D[1]):H<Q&&(M=R<3||D[0]>A||A>Q)&&(D[4]=R,D[5]=A,j.n=Q,w=0))}if(M||R>1)return o;throw T=!0,A}return function(R,A,M){if(O>1)throw TypeError("Generator is already running");for(T&&A===1&&B(A,M),w=A,_=M;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(j.n=-1),B(w,_)):j.n=_:j.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=j.n<0)?_:S.call(C,j))!==o)break}catch(D){k=e,w=1,_=D}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(nn(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,nn(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,nn(d,"constructor",u),nn(u,"constructor",l),l.displayName="GeneratorFunction",nn(u,i,"GeneratorFunction"),nn(d),nn(d,i,"Generator"),nn(d,r,function(){return this}),nn(d,"toString",function(){return"[object Generator]"}),(hf=function(){return{w:s,m:f}})()}function nn(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}nn=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){nn(o,f,function(g){return this._invoke(f,h,g)})};c("next",0),c("throw",1),c("return",2)}},nn(e,t,n,r)}function np(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function $L(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){np(s,r,i,o,a,"next",l)}function a(l){np(s,r,i,o,a,"throw",l)}o(void 0)})}}function ui(e,t){return IL(e)||LL(e,t)||nx(e,t)||DL()}function DL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1294
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nx(e,t){if(e){if(typeof e=="string")return gf(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gf(e,t):void 0}}function gf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function LL(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function IL(e){if(Array.isArray(e))return e}var is=5,Fo="Generating...",RL="Re-generating...",NL=100,FL=["******************************","***********************","*******************************************************","***********************************************","***************************************************************","*******************************************************","*******************************************************","***********************************************"],BL=Array.from({length:is},function(e,t){return{id:"query-".concat(t),text:Fo,isRegenerating:!0}}),qL=function(){var t,n=xu(),r=n.brandId,i="/setup/".concat(r,"/analysis"),s=dn(),o=Gt(),a=z.useState(BL),l=ui(a,2),u=l[0],c=l[1],d=z.useState(!1),f=ui(d,2),h=f[0],g=f[1],m=z.useState([]),p=ui(m,2),v=p[0],b=p[1],S=z.useState([]),C=ui(S,2),x=C[0],k=C[1],w=z.useState(!1),_=ui(w,2),O=_[0],E=_[1],T=z.useState(null),j=ui(T,2),B=j[0],R=j[1],A=z.useState(!1),M=ui(A,2),D=M[0],H=M[1],Q=g4(r||"",{query:{enabled:!!r}}),F=Q.data,G=Q.isRefetching,ie=Q.isError,ae=Q.refetch,N=Jl(r||"",{query:{enabled:!!r}}),le=N.data,te=z.useCallback(function(ue){var W;if(!(le!=null&&(W=le.data)!==null&&W!==void 0&&W.name))return!1;var ne=le.data.name.toLowerCase().trim();return ne?ue.toLowerCase().includes(ne):!1},[le==null||(t=le.data)===null||t===void 0?void 0:t.name]),me=z.useCallback(function(){return u.some(function(ue){return te(ue.text)})},[u,te]),J=function(){H(!1)},Ce=function(){H(!1),r&&oe({brandId:r,data:{queries:u.map(function(W){return W.text})}})},ge=function(){H(!1);var W=u.findIndex(function(ne){return te(ne.text)});W!==-1&&setTimeout(function(){var ne=document.getElementById("query-text-".concat(W));ne&&(ne.focus(),ne.select())},NL)},ze=c4({mutation:{onSuccess:function(){var ue=$L(hf().m(function ne(ee){return hf().w(function(we){for(;;)switch(we.n){case 0:if(R(null),!(ee!=null&&ee.status&&ee.status>=200&&ee.status<300)){we.n=2;break}return we.n=1,Promise.all([o.invalidateQueries({queryKey:Tf(r||"")}),o.invalidateQueries({queryKey:Yn()})]);case 1:s(i);case 2:return we.a(2)}},ne)}));function W(ne){return ue.apply(this,arguments)}return W}(),onError:function(W){var ne,ee;if((W==null||(ne=W.response)===null||ne===void 0||(ne=ne.data)===null||ne===void 0?void 0:ne.message)==="Cannot update queries for a brand that has existing analyses."){s(i,{replace:!0});return}var we=(W==null||(ee=W.response)===null||ee===void 0||(ee=ee.data)===null||ee===void 0?void 0:ee.message)||(W==null?void 0:W.message)||"An unexpected error occurred.";R(we)}}}),oe=ze.mutate,He=ze.isPending;z.useEffect(function(){r||s("/setup",{replace:!0})},[r,s]),z.useEffect(function(){var ue;if(F!=null&&(ue=F.data)!==null&&ue!==void 0&&ue.queries&&Array.isArray(F.data.queries)){var W=F.data.queries.slice(0,is);c(W.map(function(ne,ee){return{id:"query-".concat(ee),text:ne,isRegenerating:!1}})),k(F.data.queries.slice(is))}else ie&&(c(Array.from({length:is},function(ne,ee){return{id:"query-".concat(ee),text:"",isRegenerating:!1}})),k([]))},[F,ie]),z.useEffect(function(){var ue;if(O&&F!==null&&F!==void 0&&(ue=F.data)!==null&&ue!==void 0&&ue.queries&&Array.isArray(F.data.queries)&&!G){var W=F.data.queries.slice(0,is),ne=v.map(Number);c(function(ee){return ee.map(function(we,gt){var Se=ne.indexOf(gt);return Pr(Pr({},we),{},{text:Se>=0&&W[Se]?W[Se]:we.text,isRegenerating:!1})})}),E(!1),b([])}},[F,G,O,v]);var lt=z.useCallback(function(ue,W){var ne=new Set(W);return x.filter(function(ee){return!ne.has(ee)}).slice(0,ue)},[x]),dt=z.useMemo(function(){return G||u.length===0||u.some(function(ue){return ue.isRegenerating||ue.text===Fo&&!ie||ue.text.trim()===""})||h},[G,u,h,ie]),Ne=G||u.some(function(ue){return ue.text===Fo})&&!ie,Fe=z.useCallback(function(ue){var W=ue.toString();b(function(ne){return ne.includes(W)?ne.filter(function(ee){return ee!==W}):[].concat(OL(ne),[W])})},[]),Y=z.useCallback(function(ue,W){c(function(ne){return ne.map(function(ee,we){return we===ue?Pr(Pr({},ee),{},{text:W}):ee})})},[]),Pe=function(){g(!h),b([])},tt=z.useCallback(function(){if(!(G||v.length===0)){c(function(ee){return ee.map(function(we,gt){return Pr(Pr({},we),{},{isRegenerating:v.includes(gt.toString())})})});var ue=u.map(function(ee){return ee.text}),W=v.length,ne=lt(W,ue);ne.length===W?(c(function(ee){return ee.map(function(we,gt){var Se=v.indexOf(gt.toString());return Se>=0?Pr(Pr({},we),{},{text:ne[Se],isRegenerating:!1}):we})}),k(function(ee){var we=new Set(ne);return ee.filter(function(gt){return!we.has(gt)})}),b([])):(E(!0),ae())}},[G,v,ae,u,lt]),$e=z.useCallback(function(ue){if(ue.preventDefault(),!!r){if(me()){H(!0);return}oe({brandId:r,data:{queries:u.map(function(W){return W.text})}})}},[r,u,oe,me]);return y.jsxs("div",{children:[B&&y.jsx(P.Alert,{className:"yst-mb-4",variant:"error",children:B}),y.jsxs("form",{onSubmit:$e,children:[y.jsxs("div",{className:"yst-mb-8",children:[y.jsx(P.Title,{size:"2",className:"yst-mb-2",children:"Your queries"}),y.jsxs("div",{className:"yst-space-y-4",children:[y.jsx("p",{children:"You can edit your queries or regenerate new ones with AI."}),y.jsx("div",{className:Oe("yst-flex yst-gap-2",h?"yst-justify-end":"yst-justify-start"),children:h?y.jsxs(y.Fragment,{children:[y.jsx(P.Button,{size:"small",variant:"secondary",onClick:Pe,children:"Done"}),y.jsxs(P.Button,{variant:"secondary",size:"small",onClick:tt,className:"yst-gap-1",isLoading:G,disabled:G||v.length===0,children:[y.jsx(ep,{"aria-hidden":"true"}),"Regenerate selected queries"]})]}):y.jsxs(P.Button,{size:"small",variant:"secondary",onClick:Pe,className:"yst-gap-1.5",disabled:Ne,children:[y.jsx(q4,{}),"Select queries to regenerate"]})})]})]}),y.jsx("div",{className:"yst-mb-8",children:u.length===0?FL.map(function(ue,W){return y.jsx("div",{className:Oe("yst-mb-4 yst-cursor-pointer yst-rounded yst-border yst-border-slate-300 yst-p-3 yst-transition-colors","yst-bg-white"),children:y.jsx(P.SkeletonLoader,{children:ue||"Example placeholder query for demonstration purposes."})},"placeholder-query-".concat(W))}):u.slice(0,is).map(function(ue,W){var ne=ue.isRegenerating?ue.text===Fo?Fo:RL:ue.text;return y.jsx("div",{className:Oe("yst-mb-4"),children:y.jsxs("div",{className:"yst-flex yst-gap-2",children:[h&&y.jsx("div",{className:"yst-flex yst-items-center",children:y.jsx(P.Checkbox,{id:"query-regenerate-".concat(W),name:"query-regenerate-".concat(W),value:W.toString(),checked:v.includes(W.toString()),onChange:function(){return Fe(W)},disabled:G})}),y.jsx("div",{className:"yst-flex-1",children:y.jsx(P.TextField,{id:"query-text-".concat(W),label:"Query ".concat(W+1),type:"text",value:ne,onChange:function(ee){ue.isRegenerating||Y(W,ee.target.value)},placeholder:"Enter your query...",className:"yst-w-full",disabled:ue.isRegenerating,required:!0,maxLength:255,validation:te(ue.text)?{variant:"warning",message:"For the best results, avoid using the brand name."}:void 0})})]})},ue.id)})}),y.jsx(ex,{buttonText:"Run analysis (~ 5 minutes)",isButtonDisabled:dt,isLoading:He})]}),y.jsx(P.Modal,{isOpen:D,onClose:J,position:"center",as:"div",children:y.jsx(P.Modal.Panel,{children:y.jsxs("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:[y.jsx("div",{children:y.jsx("span",{className:"yst-inline-flex yst-h-10 yst-w-10 yst-items-center yst-justify-center yst-rounded-full yst-bg-amber-100",children:y.jsx(s2,{className:"yst-h-6 yst-w-6 yst-text-amber-600"})})}),y.jsxs("div",{className:"yst-flex-1",children:[y.jsx(P.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:y.jsx(P.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Brand name detected in your queries"})}),y.jsxs(P.Modal.Container.Content,{className:"yst-mb-6 yst-space-y-3",children:[y.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"We found your brand name in one or more of your queries. Using your brand name in queries often show more mentions and more positive sentiment, which can skew your results."}),y.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"For more balanced results, remove your brand name or make the queries more general."})]}),y.jsxs(P.Modal.Container.Footer,{className:"yst-flex yst-justify-end yst-gap-3",children:[y.jsxs(P.Button,{onClick:Ce,variant:"secondary",className:"yst-gap-1.5",disabled:He,isLoading:He,children:[y.jsx(ep,{}),"Run analysis anyway"]}),y.jsx(P.Button,{variant:"primary",onClick:ge,children:"Review and edit queries"})]})]})]})})})]})};const zL=Object.freeze(Object.defineProperty({__proto__:null,default:qL},Symbol.toStringTag,{value:"Module"}));var HL=["min","max","progress","className"];function UL(e,t){if(e==null)return{};var n,r,i=GL(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function GL(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var rx=z.forwardRef(function(e,t){var n=e.min,r=e.max,i=e.progress,s=e.className,o=UL(e,HL),a=z.useMemo(function(){var u=Math.max(0,r-n);if(u===0)return 0;var c=(i-n)/u*100;return Math.max(0,Math.min(100,c))},[n,r,i]),l=Math.min(Math.max(i,n),r);return y.jsx("div",{ref:t,role:"progressbar","aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":l,"aria-valuetext":"".concat(Math.round(a),"%"),className:Oe(s),...o,children:y.jsx("div",{className:"yst-relative yst-h-2 yst-w-full yst-overflow-hidden yst-rounded-full yst-bg-slate-200/40",children:y.jsx("div",{className:"yst-absolute yst-left-0 yst-top-0 yst-h-full yst-rounded-full yst-bg-[linear-gradient(97.38deg,_#A61E69_0%,_#6366F1_100%)] yst-transition-[width] yst-duration-300 yst-ease-out",style:{width:"".concat(a,"%")}})})})});rx.displayName="ProgressBarGradient";var es=[{labelAbove:"Running queries...",label:"Running queries",threshold:99},{labelAbove:"Done!",label:"Building analysis",threshold:100}],ix=function(t){var n=t.progress,r=n===void 0?0:n,i=t.className,s=i===void 0?"":i,o=function(){for(var u=0;u<es.length;u++)if(r<=es[u].threshold)return es[u];return es[es.length-1]},a=o();return y.jsxs("div",{className:Oe("yst-font-medium yst-text-slate-800",s),children:[y.jsxs("div",{className:"yst-flex yst-items-center yst-justify-center yst-gap-2",children:[r<100?y.jsx(P.Spinner,{}):y.jsx(d2,{className:"yst-text-green-400"}),y.jsx("span",{className:"yst-text-sm yst-font-medium yst-italic",children:a.labelAbove})]}),y.jsx(rx,{className:"yst-mt-3",progress:r,min:0,max:100}),y.jsx("div",{className:"yst-mt-3 yst-flex yst-justify-between yst-text-xs",children:es.map(function(l){return y.jsx("span",{children:y.jsx(Nu,{disabled:a.label!==l.label,children:l.label})},l.label)})})]})};ix.propTypes={progress:$d.number,className:$d.string};var KL=function(t){switch(t){case"pending":case"processing":return 2*1e3;case"completed":return!1;default:return 10*1e3}},VL=function(){var t,n,r,i=dn(),s=Gt(),o=xu(),a=Rn(),l=a.brandId,u=o.brandId||l,c=Jl(u,{query:{enabled:!!u,select:function(C){var x=C.data;return x}}}),d=c.data,f=N5(u,"latest",{query:{enabled:!!u,select:function(C){var x=C.data;return x},refetchInterval:function(C){var x,k=C==null||(x=C.state)===null||x===void 0||(x=x.data)===null||x===void 0?void 0:x.data;return KL(k==null?void 0:k.status)}}}),h=f.data,g=h==null?void 0:h.id,m=g?"/brands/".concat(u,"/analysis/").concat(g):"/brands/".concat(u);z.useEffect(function(){var S=(h==null?void 0:h.status)==="pending"||(h==null?void 0:h.status)==="processing"||(h==null?void 0:h.status)==="completed";d!=null&&d.nextScheduledAnalysis&&h!==null&&h!==void 0&&h.status&&h7(d.nextScheduledAnalysis,5)&&!S&&i("/brands/".concat(u),{replace:!0})},[d==null?void 0:d.nextScheduledAnalysis,u,i,h==null?void 0:h.status]),z.useEffect(function(){((d==null?void 0:d.setupStatus)==="completed"||(d==null?void 0:d.setupStatus)==="scheduledFirstAnalysis"&&d!==null&&d!==void 0&&d.firstNextAnalysisOpportunity&&!S2(d.firstNextAnalysisOpportunity,2))&&i(m,{replace:!0})},[d==null?void 0:d.firstNextAnalysisOpportunity,d==null?void 0:d.setupStatus,m,i]);var p=d==null||(t=d.queries)===null||t===void 0?void 0:t.length,v=(h==null||(n=h.completedQueries)===null||n===void 0?void 0:n.length)||0,b=function(){if(p&&p>0){var S=80/p,C=v*S;return(h==null?void 0:h.status)==="completed"?100:Math.round(Math.min(C,80))}return 0}();return y.jsxs("div",{children:[y.jsxs("div",{className:"yst-space-y-8",children:[y.jsx(ix,{progress:b}),y.jsx(Ha,{}),y.jsx("div",{className:"yst-space-y-8",children:d==null||(r=d.queries)===null||r===void 0?void 0:r.map(function(S){var C,x=S.id,k=S.query,w=x&&(h==null||(C=h.completedQueries)===null||C===void 0?void 0:C.includes(x));return y.jsxs("div",{className:Oe("yst-flex yst-items-center yst-justify-between yst-gap-3"),children:[w===!0?y.jsx(d2,{className:"yst-h-5 yst-w-5 yst-text-green-400"}):y.jsx(P.Spinner,{}),y.jsx("span",{className:"yst-flex-1 yst-text-sm",children:k})]},"result-item-".concat(k))})})]}),y.jsx("div",{className:"yst-mb-[-2rem] yst-ml-[-2rem] yst-mr-[-2rem] yst-mt-8 yst-flex yst-justify-end yst-gap-4 yst-rounded-bl-lg yst-rounded-br-lg yst-border-t yst-border-slate-200 yst-bg-slate-50 yst-px-8 yst-py-6",children:y.jsx(P.Button,{as:ti,to:m,onClick:function(S){if(b!==100){S.preventDefault();return}s.clear()},disabled:b!==100,children:"Continue →"})})]})};const WL=Object.freeze(Object.defineProperty({__proto__:null,default:VL},Symbol.toStringTag,{value:"Module"}));exports.AIInsightsClient=FA;exports.setApiBaseUrl=Zv;
|
|
1295
1295
|
//# sourceMappingURL=ai-insights-client.cjs.js.map
|