@qikbar/qikbar 0.0.15 → 0.0.17

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,5 +1,5 @@
1
- (function(){"use strict";try{if(typeof document!="undefined"){var r=document.createElement("style");r.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap";.qikbar-demo{flex:1}#qikbar.qikbar-light{--bg-color: #f8fafc;--border-color: #e2e8f0;--category-color: #334155;--placeholder-color: #cbd5e1;--item-color: #0f172a;--item-hover: #cbd5e1;--item-focus: #e2e8f0;--logo-primary: #ef4444;--logo-secondary: #0f172a}#qikbar.qikbar-dark{--bg-color: #0f172a;--border-color: #1e293b;--category-color: #cbd5e1;--placeholder-color: #475569;--item-color: white;--item-hover: #334155;--item-focus: #475569;--logo-primary: #ef4444;--logo-secondary: #ffffff}#qikbar.qikbar-gray{--bg-color: #111827;--border-color: #1f2937;--category-color: #d1d5db;--placeholder-color: #4b5563;--item-color: #f9fafb;--item-hover: #6b7280;--item-focus: #4b5563;--logo-primary: #ef4444;--logo-secondary: #ffffff}#qikbar.qikbar-og{--bg-color: rgba(6, 2, 13, .95);--border-color: rgba(105, 106, 108, 1);--category-color: rgb(196, 196, 196);--placeholder-color: rgb(205, 205, 205);--item-color: white;--item-hover: rgba(53, 53, 55, .6);--item-focus: rgba(53, 53, 55, .7);--logo-primary: #ef4444;--logo-secondary: #ffffff}#qikbar.qikbar-rose{--bg-color: #fff1f2;--border-color: #ffe4e6;--category-color: #e11d48;--placeholder-color: #fecdd3;--item-color: #881337;--item-hover: #fda4af;--item-focus: #fecdd3;--logo-primary: #9f1239;--logo-secondary: #e11d48}#qikbar *:not(svg,path){all:unset;box-sizing:border-box}#qikbar .qikbar-command-demo-wrapper{z-index:10000;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;padding:140px 30px 30px;height:100%;font-family:Inter,Avenir,Helvetica,Arial,sans-serif;font-size:16px;line-height:24px;font-weight:400}#qikbar .qikbar-command-wrapper{z-index:10000;position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;padding:140px 30px 30px;height:100%;font-family:Inter,Avenir,Helvetica,Arial,sans-serif;font-size:16px;line-height:24px;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}#qikbar .qikbar-command-wrapper p{margin:0}#qikbar .qikbar-command-bar{width:100%;margin:0 30px;max-width:800px;min-width:200px;background-color:var(--bg-color);border-radius:10px;border:2px solid var(--border-color);display:flex;flex-direction:column;max-height:600px;overflow:scroll}#qikbar .qikbar-command-content{position:relative;display:flex;height:100%;min-height:0}#qikbar .qikbar-command-error{padding:20px;font-size:18px;color:var(--item-color);display:block}#qikbar .qikbar-command-error a{color:var(--logo-primary);cursor:pointer}#qikbar .qikbar-command-footer{border-top:1px solid var(--border-color);padding:8px 6px;display:flex;justify-content:space-between;align-items:center;color:var(--item-color)}#qikbar .qikbar-details-container{display:flex;position:relative;flex:1}#qikbar .qikbar-details-wrapper{flex:1;border-left:1px solid var(--border-color);max-width:100%;overflow:scroll}#qikbar .qikbar-details{padding:8px;font-size:14px;max-height:100%;display:block;position:relative}#qikbar .qikbar-fieldset{display:flex;margin-bottom:10px}#qikbar .qikbar-field{color:var(--item-color);flex:1;display:block}#qikbar .qikbar-field-label{font-weight:700}#qikbar .qikbar-field-value a{color:var(--logo-primary);cursor:pointer}#qikbar .qikbar-field-value img{width:100%}#qikbar .qikbar-crumbs{width:100%;padding:0 10px}#qikbar .qikbar-crumb{font-size:12px;cursor:pointer;color:var(--category-color)}#qikbar .qikbar-crumb:last-child{font-weight:bolder}#qikbar .qikbar-crumb-divider{margin:0 6px}#qikbar .qikbar-search-wrapper{display:flex;flex-direction:column}#qikbar .qikbar-search{font-weight:500;background-color:var(--bg-color);font-size:20px;border:none;border-radius:10px 10px 0 0;width:100%;padding:14px 10px;color:var(--item-color);outline:none;border-bottom:1px solid var(--border-color)}#qikbar .qikbar-search::-moz-placeholder{color:var(--placeholder-color)}#qikbar .qikbar-search::placeholder{color:var(--placeholder-color)}#qikbar .qikbar-list{flex:1;list-style:none;padding:0;margin:4px 0;overflow:scroll}#qikbar .qikbar-item-empty{margin:2px 4px;padding:6px;color:var(--item-color);display:flex;font-size:18px;text-decoration:none;font-weight:500;border-radius:5px}#qikbar .qikbar-item{margin:2px 4px;padding:6px;display:flex;cursor:pointer;justify-content:space-between;align-items:center;color:var(--item-color);font-size:18px;text-decoration:none;font-weight:500;border-radius:5px}#qikbar .qikbar-item li{display:flex;align-items:flex-start}#qikbar .qikbar-item li div{display:flex;flex-direction:column}#qikbar .qikbar-item li svg{min-width:24px;width:24px;height:24px;margin-right:4px}#qikbar .qikbar-item-description{font-size:11px;line-height:1.2;color:var(--category-color)}#qikbar .qikbar-item-type{font-size:12px;color:var(--category-color)}#qikbar .qikbar-category-wrapper{display:flex;padding:2px 10px;font-size:14px;align-items:center}#qikbar .qikbar-category-icon{width:16px;height:16px;color:var(--category-color);margin-right:2px}#qikbar .qikbar-category{color:var(--category-color);margin-left:4px}#qikbar .qikbar-search-wrapper:has(> .qikbar-search:focus)+.qikbar-command-content .qikbar-list .qikbar-item:first-of-type{background-color:var(--item-focus);outline:none}#qikbar .qikbar-item:focus{background-color:var(--item-focus);outline:none}#qikbar .qikbar-item:hover{background-color:var(--item-hover);outline:none}#qikbar .qikbar-logo{width:89px;height:30px;cursor:pointer}#qikbar .qikbar-logo .qikbar-logo-primary-fill{fill:var(--logo-primary)}#qikbar .qikbar-logo .qikbar-logo-primary-stroke{stroke:var(--logo-primary)}#qikbar .qikbar-logo .qikbar-logo-secondary{fill:var(--logo-secondary)}#qikbar .qikbar-actions-wrapper{position:relative}#qikbar .qikbar-actions-panel{position:absolute;bottom:35px;right:0;min-width:200px;background-color:var(--bg-color);border-radius:5px;border:1px solid var(--border-color)}#qikbar .qikbar-actions-list{list-style:none;padding:2px;margin:0;display:flex;flex-direction:column}#qikbar .qikbar-action{width:100%;font-size:14px;border:none;padding:6px;display:flex;justify-content:space-between;align-items:center;color:var(--item-color);text-decoration:none;font-weight:500;border-radius:5px;cursor:pointer}#qikbar .qikbar-action:focus{background-color:var(--item-focus);outline:none}#qikbar .qikbar-action:hover{background-color:var(--item-hover);outline:none}#qikbar .qikbar-actions{font-size:14px;background-color:var(--bg-color);border:1px solid var(--border-color);border-radius:5px;color:var(--item-color);cursor:pointer;padding:2px;display:flex}#qikbar .qikbar-actions:hover{background-color:var(--item-hover)}#qikbar .qikbar-actions:focus{background-color:var(--item-focus);color:var(--item-color)}#qikbar .qikbar-actions-action{margin-left:2px}#qikbar .qikbar-keys{font-size:12px;margin-left:4px}#qikbar .qikbar-kbd{padding:.2rem .4rem;font-size:87.5%;color:var(--item-color);background-color:var(--border-color);border-radius:.25rem;box-shadow:inset 0 -.1rem #00000040}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- (function(ge,N){typeof exports=="object"&&typeof module<"u"?N(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],N):(ge=typeof globalThis<"u"?globalThis:ge||self,N(ge.qikbar={},ge.React,ge.ReactDOM))})(this,function(ge,N,lt){"use strict";var Bf=Object.defineProperty;var Hf=(ge,N,lt)=>N in ge?Bf(ge,N,{enumerable:!0,configurable:!0,writable:!0,value:lt}):ge[N]=lt;var da=(ge,N,lt)=>(Hf(ge,typeof N!="symbol"?N+"":N,lt),lt);function ha(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const p=ha(N);var ur=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var y={},pa={get exports(){return y},set exports(t){y=t}},Vt={};/**
1
+ (function(){"use strict";try{if(typeof document!="undefined"){var r=document.createElement("style");r.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap";.qikbar-demo{flex:1}#qikbar.qikbar-light{--bg-color: #f8fafc;--border-color: #e2e8f0;--category-color: #334155;--placeholder-color: #cbd5e1;--item-color: #0f172a;--item-hover: #cbd5e1;--item-focus: #e2e8f0;--logo-primary: #ef4444;--logo-secondary: #0f172a}#qikbar.qikbar-dark{--bg-color: #0f172a;--border-color: #1e293b;--category-color: #cbd5e1;--placeholder-color: #475569;--item-color: white;--item-hover: #334155;--item-focus: #475569;--logo-primary: #ef4444;--logo-secondary: #ffffff}#qikbar.qikbar-gray{--bg-color: #111827;--border-color: #1f2937;--category-color: #d1d5db;--placeholder-color: #4b5563;--item-color: #f9fafb;--item-hover: #6b7280;--item-focus: #4b5563;--logo-primary: #ef4444;--logo-secondary: #ffffff}#qikbar.qikbar-og{--bg-color: rgba(6, 2, 13, .95);--border-color: rgba(105, 106, 108, 1);--category-color: rgb(196, 196, 196);--placeholder-color: rgb(205, 205, 205);--item-color: white;--item-hover: rgba(53, 53, 55, .6);--item-focus: rgba(53, 53, 55, .7);--logo-primary: #ef4444;--logo-secondary: #ffffff}#qikbar.qikbar-rose{--bg-color: #fff1f2;--border-color: #ffe4e6;--category-color: #e11d48;--placeholder-color: #fecdd3;--item-color: #881337;--item-hover: #fda4af;--item-focus: #fecdd3;--logo-primary: #9f1239;--logo-secondary: #e11d48}#qikbar *:not(svg,path){all:unset;box-sizing:border-box}#qikbar .qikbar-command-demo-wrapper{z-index:10000;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;padding:0;height:100%;font-family:Inter,Avenir,Helvetica,Arial,sans-serif;font-size:16px;line-height:24px;font-weight:400}#qikbar .qikbar-command-wrapper{z-index:10000;position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;padding:140px 30px 30px;height:100%;font-family:Inter,Avenir,Helvetica,Arial,sans-serif;font-size:16px;line-height:24px;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}#qikbar .qikbar-admin-offset{left:0;width:calc(100% - 400px)}#qikbar .qikbar-embedded{position:fixed;right:0;top:0;height:100vh}#qikbar .qikbar-embedded iframe{width:400px;height:100vh;overflow:scroll}#qikbar .qikbar-admin-edit{font-size:12px;margin-right:4px}#qikbar .qickbar-embedded-hidden{display:none}#qikbar .qikbar-command-wrapper p{margin:0}#qikbar .qikbar-command-bar{width:100%;margin:0 30px;max-width:800px;min-width:200px;background-color:var(--bg-color);border-radius:10px;border:2px solid var(--border-color);display:flex;flex-direction:column;max-height:600px;overflow:scroll}#qikbar .qikbar-command-content{position:relative;display:flex;height:100%;min-height:0}#qikbar .qikbar-command-error{padding:20px;font-size:18px;color:var(--item-color);display:block}#qikbar .qikbar-command-error a{color:var(--logo-primary);cursor:pointer}#qikbar .qikbar-command-footer{border-top:1px solid var(--border-color);padding:8px 6px;display:flex;justify-content:space-between;align-items:center;color:var(--item-color)}#qikbar .qikbar-details-container{display:flex;position:relative;flex:1}#qikbar .qikbar-details-wrapper{flex:1;border-left:1px solid var(--border-color);max-width:100%;overflow:scroll}#qikbar .qikbar-details{padding:8px;font-size:14px;max-height:100%;display:block;position:relative}#qikbar .qikbar-fieldset{display:flex;margin-bottom:10px}#qikbar .qikbar-field{color:var(--item-color);flex:1;display:block}#qikbar .qikbar-field-label{font-weight:700}#qikbar .qikbar-field-value a{color:var(--logo-primary);cursor:pointer}#qikbar .qikbar-field-value img{width:100%}#qikbar .qikbar-crumbs{width:100%;padding:0 10px}#qikbar .qikbar-crumb{font-size:12px;cursor:pointer;color:var(--category-color)}#qikbar .qikbar-crumb:last-child{font-weight:bolder}#qikbar .qikbar-crumb-divider{margin:0 6px}#qikbar .qikbar-search-wrapper{display:flex;flex-direction:column}#qikbar .qikbar-search{font-weight:500;background-color:var(--bg-color);font-size:20px;border:none;border-radius:10px 10px 0 0;width:100%;padding:14px 10px;color:var(--item-color);outline:none;border-bottom:1px solid var(--border-color)}#qikbar .qikbar-search::-moz-placeholder{color:var(--placeholder-color)}#qikbar .qikbar-search::placeholder{color:var(--placeholder-color)}#qikbar .qikbar-list{flex:1;list-style:none;padding:0;margin:4px 0;overflow:scroll}#qikbar .qikbar-item-empty{margin:2px 4px;padding:6px;color:var(--item-color);display:flex;font-size:18px;text-decoration:none;font-weight:500;border-radius:5px}#qikbar .qikbar-item{margin:2px 4px;padding:6px;display:flex;cursor:pointer;justify-content:space-between;align-items:center;color:var(--item-color);font-size:18px;text-decoration:none;font-weight:500;border-radius:5px}#qikbar .qikbar-item li{display:flex;align-items:flex-start}#qikbar .qikbar-item li div{display:flex;flex-direction:column}#qikbar .qikbar-item li svg{min-width:24px;width:24px;height:24px;margin-right:4px}#qikbar .qikbar-item-description{font-size:11px;line-height:1.2;color:var(--category-color)}#qikbar .qikbar-item-type{font-size:12px;color:var(--category-color)}#qikbar .qikbar-category-wrapper{display:flex;padding:2px 10px;font-size:14px;align-items:center}#qikbar .qikbar-category-icon{width:16px;height:16px;color:var(--category-color);margin-right:2px}#qikbar .qikbar-category{color:var(--category-color);margin-left:4px}#qikbar .qikbar-search-wrapper:has(> .qikbar-search:focus)+.qikbar-command-content .qikbar-list .qikbar-item:first-of-type{background-color:var(--item-focus);outline:none}#qikbar .qikbar-item:focus{background-color:var(--item-focus);outline:none}#qikbar .qikbar-item:hover{background-color:var(--item-hover);outline:none}#qikbar .qikbar-logo{width:89px;height:30px;cursor:pointer}#qikbar .qikbar-logo .qikbar-logo-primary-fill{fill:var(--logo-primary)}#qikbar .qikbar-logo .qikbar-logo-primary-stroke{stroke:var(--logo-primary)}#qikbar .qikbar-logo .qikbar-logo-secondary{fill:var(--logo-secondary)}#qikbar .qikbar-actions-wrapper{position:relative}#qikbar .qikbar-actions-panel{position:absolute;bottom:35px;right:0;min-width:200px;background-color:var(--bg-color);border-radius:5px;border:1px solid var(--border-color)}#qikbar .qikbar-actions-list{list-style:none;padding:2px;margin:0;display:flex;flex-direction:column}#qikbar .qikbar-action{width:100%;font-size:14px;border:none;padding:6px;display:flex;justify-content:space-between;align-items:center;color:var(--item-color);text-decoration:none;font-weight:500;border-radius:5px;cursor:pointer}#qikbar .qikbar-action:focus{background-color:var(--item-focus);outline:none}#qikbar .qikbar-action:hover{background-color:var(--item-hover);outline:none}#qikbar .qikbar-actions{font-size:14px;background-color:var(--bg-color);border:1px solid var(--border-color);border-radius:5px;color:var(--item-color);cursor:pointer;padding:2px;display:flex}#qikbar .qikbar-actions:hover{background-color:var(--item-hover)}#qikbar .qikbar-actions:focus{background-color:var(--item-focus);color:var(--item-color)}#qikbar .qikbar-actions-action{margin-left:2px}#qikbar .qikbar-keys{font-size:12px;margin-left:4px}#qikbar .qikbar-kbd{padding:.2rem .4rem;font-size:87.5%;color:var(--item-color);background-color:var(--border-color);border-radius:.25rem;box-shadow:inset 0 -.1rem #00000040}')),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ (function(ye,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],A):(ye=typeof globalThis<"u"?globalThis:ye||self,A(ye.qikbar={},ye.React,ye.ReactDOM))})(this,function(ye,A,ct){"use strict";var Hf=Object.defineProperty;var Qf=(ye,A,ct)=>A in ye?Hf(ye,A,{enumerable:!0,configurable:!0,writable:!0,value:ct}):ye[A]=ct;var pa=(ye,A,ct)=>(Qf(ye,typeof A!="symbol"?A+"":A,ct),ct);function ma(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const p=ma(A);var cr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ga(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var y={},ya={get exports(){return y},set exports(t){y=t}},$t={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.min.js
5
5
  *
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
- */var Bn;function ma(){if(Bn)return Vt;Bn=1;var t=N,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(o,l,c){var d,f={},u=null,m=null;c!==void 0&&(u=""+c),l.key!==void 0&&(u=""+l.key),l.ref!==void 0&&(m=l.ref);for(d in l)n.call(l,d)&&!s.hasOwnProperty(d)&&(f[d]=l[d]);if(o&&o.defaultProps)for(d in l=o.defaultProps,l)f[d]===void 0&&(f[d]=l[d]);return{$$typeof:e,type:o,key:u,ref:m,props:f,_owner:i.current}}return Vt.Fragment=r,Vt.jsx=a,Vt.jsxs=a,Vt}var Ut={};/**
10
+ */var Hn;function va(){if(Hn)return $t;Hn=1;var t=A,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(l,o,u){var c,f={},d=null,m=null;u!==void 0&&(d=""+u),o.key!==void 0&&(d=""+o.key),o.ref!==void 0&&(m=o.ref);for(c in o)n.call(o,c)&&!s.hasOwnProperty(c)&&(f[c]=o[c]);if(l&&l.defaultProps)for(c in o=l.defaultProps,o)f[c]===void 0&&(f[c]=o[c]);return{$$typeof:e,type:l,key:d,ref:m,props:f,_owner:i.current}}return $t.Fragment=r,$t.jsx=a,$t.jsxs=a,$t}var Bt={};/**
11
11
  * @license React
12
12
  * react-jsx-runtime.development.js
13
13
  *
@@ -15,17 +15,17 @@
15
15
  *
16
16
  * This source code is licensed under the MIT license found in the
17
17
  * LICENSE file in the root directory of this source tree.
18
- */var Hn;function ga(){return Hn||(Hn=1,process.env.NODE_ENV!=="production"&&function(){var t=N,e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),b=Symbol.iterator,w="@@iterator";function S(h){if(h===null||typeof h!="object")return null;var x=b&&h[b]||h[w];return typeof x=="function"?x:null}var _=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function D(h){{for(var x=arguments.length,k=new Array(x>1?x-1:0),V=1;V<x;V++)k[V-1]=arguments[V];C("error",h,k)}}function C(h,x,k){{var V=_.ReactDebugCurrentFrame,K=V.getStackAddendum();K!==""&&(x+="%s",k=k.concat([K]));var X=k.map(function(W){return String(W)});X.unshift("Warning: "+x),Function.prototype.apply.call(console[h],console,X)}}var E=!1,F=!1,O=!1,T=!1,P=!1,B;B=Symbol.for("react.module.reference");function Z(h){return!!(typeof h=="string"||typeof h=="function"||h===n||h===s||P||h===i||h===c||h===d||T||h===m||E||F||O||typeof h=="object"&&h!==null&&(h.$$typeof===u||h.$$typeof===f||h.$$typeof===a||h.$$typeof===o||h.$$typeof===l||h.$$typeof===B||h.getModuleId!==void 0))}function J(h,x,k){var V=h.displayName;if(V)return V;var K=x.displayName||x.name||"";return K!==""?k+"("+K+")":k}function de(h){return h.displayName||"Context"}function se(h){if(h==null)return null;if(typeof h.tag=="number"&&D("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case n:return"Fragment";case r:return"Portal";case s:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case d:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case o:var x=h;return de(x)+".Consumer";case a:var k=h;return de(k._context)+".Provider";case l:return J(h,h.render,"ForwardRef");case f:var V=h.displayName||null;return V!==null?V:se(h.type)||"Memo";case u:{var K=h,X=K._payload,W=K._init;try{return se(W(X))}catch{return null}}}return null}var ve=Object.assign,G=0,Te,ne,st,nr,Nr,Ve,Ar;function qr(){}qr.__reactDisabledLog=!0;function Ir(){{if(G===0){Te=console.log,ne=console.info,st=console.warn,nr=console.error,Nr=console.group,Ve=console.groupCollapsed,Ar=console.groupEnd;var h={configurable:!0,enumerable:!0,value:qr,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}G++}}function In(){{if(G--,G===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ve({},h,{value:Te}),info:ve({},h,{value:ne}),warn:ve({},h,{value:st}),error:ve({},h,{value:nr}),group:ve({},h,{value:Nr}),groupCollapsed:ve({},h,{value:Ve}),groupEnd:ve({},h,{value:Ar})})}G<0&&D("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ir=_.ReactCurrentDispatcher,sr;function Ue(h,x,k){{if(sr===void 0)try{throw Error()}catch(K){var V=K.stack.trim().match(/\n( *(at )?)/);sr=V&&V[1]||""}return`
19
- `+sr+h}}var Pt=!1,at;{var ar=typeof WeakMap=="function"?WeakMap:Map;at=new ar}function Ft(h,x){if(!h||Pt)return"";{var k=at.get(h);if(k!==void 0)return k}var V;Pt=!0;var K=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var X;X=ir.current,ir.current=null,Ir();try{if(x){var W=function(){throw Error()};if(Object.defineProperty(W.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(W,[])}catch(Je){V=Je}Reflect.construct(h,[],W)}else{try{W.call()}catch(Je){V=Je}h.call(W.prototype)}}else{try{throw Error()}catch(Je){V=Je}h()}}catch(Je){if(Je&&V&&typeof Je.stack=="string"){for(var z=Je.stack.split(`
20
- `),we=V.stack.split(`
21
- `),ae=z.length-1,ue=we.length-1;ae>=1&&ue>=0&&z[ae]!==we[ue];)ue--;for(;ae>=1&&ue>=0;ae--,ue--)if(z[ae]!==we[ue]){if(ae!==1||ue!==1)do if(ae--,ue--,ue<0||z[ae]!==we[ue]){var De=`
22
- `+z[ae].replace(" at new "," at ");return h.displayName&&De.includes("<anonymous>")&&(De=De.replace("<anonymous>",h.displayName)),typeof h=="function"&&at.set(h,De),De}while(ae>=1&&ue>=0);break}}}finally{Pt=!1,ir.current=X,In(),Error.prepareStackTrace=K}var It=h?h.displayName||h.name:"",ca=It?Ue(It):"";return typeof h=="function"&&at.set(h,ca),ca}function Mt(h,x,k){return Ft(h,!1)}function Vr(h){var x=h.prototype;return!!(x&&x.isReactComponent)}function jt(h,x,k){if(h==null)return"";if(typeof h=="function")return Ft(h,Vr(h));if(typeof h=="string")return Ue(h);switch(h){case c:return Ue("Suspense");case d:return Ue("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case l:return Mt(h.render);case f:return jt(h.type,x,k);case u:{var V=h,K=V._payload,X=V._init;try{return jt(X(K),x,k)}catch{}}}return""}var Et=Object.prototype.hasOwnProperty,Ur={},ot=_.ReactDebugCurrentFrame;function Ge(h){if(h){var x=h._owner,k=jt(h.type,h._source,x?x.type:null);ot.setExtraStackFrame(k)}else ot.setExtraStackFrame(null)}function $r(h,x,k,V,K){{var X=Function.call.bind(Et);for(var W in h)if(X(h,W)){var z=void 0;try{if(typeof h[W]!="function"){var we=Error((V||"React class")+": "+k+" type `"+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[W]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw we.name="Invariant Violation",we}z=h[W](x,W,V,k,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ae){z=ae}z&&!(z instanceof Error)&&(Ge(K),D("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",V||"React class",k,W,typeof z),Ge(null)),z instanceof Error&&!(z.message in Ur)&&(Ur[z.message]=!0,Ge(K),D("Failed %s type: %s",k,z.message),Ge(null))}}}var or=Array.isArray;function lr(h){return or(h)}function Vn(h){{var x=typeof Symbol=="function"&&Symbol.toStringTag,k=x&&h[Symbol.toStringTag]||h.constructor.name||"Object";return k}}function Br(h){try{return g(h),!1}catch{return!0}}function g(h){return""+h}function v(h){if(Br(h))return D("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Vn(h)),g(h)}var R=_.ReactCurrentOwner,M={key:!0,ref:!0,__self:!0,__source:!0},L,I,q;q={};function Q(h){if(Et.call(h,"ref")){var x=Object.getOwnPropertyDescriptor(h,"ref").get;if(x&&x.isReactWarning)return!1}return h.ref!==void 0}function A(h){if(Et.call(h,"key")){var x=Object.getOwnPropertyDescriptor(h,"key").get;if(x&&x.isReactWarning)return!1}return h.key!==void 0}function me(h,x){if(typeof h.ref=="string"&&R.current&&x&&R.current.stateNode!==x){var k=se(R.current.type);q[k]||(D('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',se(R.current.type),h.ref),q[k]=!0)}}function H(h,x){{var k=function(){L||(L=!0,D("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",x))};k.isReactWarning=!0,Object.defineProperty(h,"key",{get:k,configurable:!0})}}function re(h,x){{var k=function(){I||(I=!0,D("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",x))};k.isReactWarning=!0,Object.defineProperty(h,"ref",{get:k,configurable:!0})}}var xe=function(h,x,k,V,K,X,W){var z={$$typeof:e,type:h,key:x,ref:k,props:W,_owner:X};return z._store={},Object.defineProperty(z._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(z,"_self",{configurable:!1,enumerable:!1,writable:!1,value:V}),Object.defineProperty(z,"_source",{configurable:!1,enumerable:!1,writable:!1,value:K}),Object.freeze&&(Object.freeze(z.props),Object.freeze(z)),z};function Oe(h,x,k,V,K){{var X,W={},z=null,we=null;k!==void 0&&(v(k),z=""+k),A(x)&&(v(x.key),z=""+x.key),Q(x)&&(we=x.ref,me(x,K));for(X in x)Et.call(x,X)&&!M.hasOwnProperty(X)&&(W[X]=x[X]);if(h&&h.defaultProps){var ae=h.defaultProps;for(X in ae)W[X]===void 0&&(W[X]=ae[X])}if(z||we){var ue=typeof h=="function"?h.displayName||h.name||"Unknown":h;z&&H(W,ue),we&&re(W,ue)}return xe(h,z,we,K,V,R.current,W)}}var Ze=_.ReactCurrentOwner,Rt=_.ReactDebugCurrentFrame;function Fe(h){if(h){var x=h._owner,k=jt(h.type,h._source,x?x.type:null);Rt.setExtraStackFrame(k)}else Rt.setExtraStackFrame(null)}var $e;$e=!1;function St(h){return typeof h=="object"&&h!==null&&h.$$typeof===e}function ce(){{if(Ze.current){var h=se(Ze.current.type);if(h)return`
18
+ */var Qn;function ba(){return Qn||(Qn=1,process.env.NODE_ENV!=="production"&&function(){var t=A,e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),v=Symbol.iterator,w="@@iterator";function S(h){if(h===null||typeof h!="object")return null;var x=v&&h[v]||h[w];return typeof x=="function"?x:null}var O=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function k(h){{for(var x=arguments.length,T=new Array(x>1?x-1:0),U=1;U<x;U++)T[U-1]=arguments[U];C("error",h,T)}}function C(h,x,T){{var U=O.ReactDebugCurrentFrame,G=U.getStackAddendum();G!==""&&(x+="%s",T=T.concat([G]));var J=T.map(function(Y){return String(Y)});J.unshift("Warning: "+x),Function.prototype.apply.call(console[h],console,J)}}var E=!1,N=!1,_=!1,M=!1,j=!1,H;H=Symbol.for("react.module.reference");function z(h){return!!(typeof h=="string"||typeof h=="function"||h===n||h===s||j||h===i||h===u||h===c||M||h===m||E||N||_||typeof h=="object"&&h!==null&&(h.$$typeof===d||h.$$typeof===f||h.$$typeof===a||h.$$typeof===l||h.$$typeof===o||h.$$typeof===H||h.getModuleId!==void 0))}function F(h,x,T){var U=h.displayName;if(U)return U;var G=x.displayName||x.name||"";return G!==""?T+"("+G+")":T}function ue(h){return h.displayName||"Context"}function re(h){if(h==null)return null;if(typeof h.tag=="number"&&k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case n:return"Fragment";case r:return"Portal";case s:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case l:var x=h;return ue(x)+".Consumer";case a:var T=h;return ue(T._context)+".Provider";case o:return F(h,h.render,"ForwardRef");case f:var U=h.displayName||null;return U!==null?U:re(h.type)||"Memo";case d:{var G=h,J=G._payload,Y=G._init;try{return re(Y(J))}catch{return null}}}return null}var de=Object.assign,be=0,je,te,Fe,ne,ot,$e,qr;function Ir(){}Ir.__reactDisabledLog=!0;function Vr(){{if(be===0){je=console.log,te=console.info,Fe=console.warn,ne=console.error,ot=console.group,$e=console.groupCollapsed,qr=console.groupEnd;var h={configurable:!0,enumerable:!0,value:Ir,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}be++}}function Vn(){{if(be--,be===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:de({},h,{value:je}),info:de({},h,{value:te}),warn:de({},h,{value:Fe}),error:de({},h,{value:ne}),group:de({},h,{value:ot}),groupCollapsed:de({},h,{value:$e}),groupEnd:de({},h,{value:qr})})}be<0&&k("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var sr=O.ReactCurrentDispatcher,ar;function Be(h,x,T){{if(ar===void 0)try{throw Error()}catch(G){var U=G.stack.trim().match(/\n( *(at )?)/);ar=U&&U[1]||""}return`
19
+ `+ar+h}}var Ft=!1,lt;{var or=typeof WeakMap=="function"?WeakMap:Map;lt=new or}function Mt(h,x){if(!h||Ft)return"";{var T=lt.get(h);if(T!==void 0)return T}var U;Ft=!0;var G=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var J;J=sr.current,sr.current=null,Vr();try{if(x){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(et){U=et}Reflect.construct(h,[],Y)}else{try{Y.call()}catch(et){U=et}h.call(Y.prototype)}}else{try{throw Error()}catch(et){U=et}h()}}catch(et){if(et&&U&&typeof et.stack=="string"){for(var K=et.stack.split(`
20
+ `),Ce=U.stack.split(`
21
+ `),ae=K.length-1,ce=Ce.length-1;ae>=1&&ce>=0&&K[ae]!==Ce[ce];)ce--;for(;ae>=1&&ce>=0;ae--,ce--)if(K[ae]!==Ce[ce]){if(ae!==1||ce!==1)do if(ae--,ce--,ce<0||K[ae]!==Ce[ce]){var De=`
22
+ `+K[ae].replace(" at new "," at ");return h.displayName&&De.includes("<anonymous>")&&(De=De.replace("<anonymous>",h.displayName)),typeof h=="function"&&lt.set(h,De),De}while(ae>=1&&ce>=0);break}}}finally{Ft=!1,sr.current=J,Vn(),Error.prepareStackTrace=G}var Ut=h?h.displayName||h.name:"",fa=Ut?Be(Ut):"";return typeof h=="function"&&lt.set(h,fa),fa}function Nt(h,x,T){return Mt(h,!1)}function Ur(h){var x=h.prototype;return!!(x&&x.isReactComponent)}function At(h,x,T){if(h==null)return"";if(typeof h=="function")return Mt(h,Ur(h));if(typeof h=="string")return Be(h);switch(h){case u:return Be("Suspense");case c:return Be("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case o:return Nt(h.render);case f:return At(h.type,x,T);case d:{var U=h,G=U._payload,J=U._init;try{return At(J(G),x,T)}catch{}}}return""}var Rt=Object.prototype.hasOwnProperty,$r={},ut=O.ReactDebugCurrentFrame;function Je(h){if(h){var x=h._owner,T=At(h.type,h._source,x?x.type:null);ut.setExtraStackFrame(T)}else ut.setExtraStackFrame(null)}function Br(h,x,T,U,G){{var J=Function.call.bind(Rt);for(var Y in h)if(J(h,Y)){var K=void 0;try{if(typeof h[Y]!="function"){var Ce=Error((U||"React class")+": "+T+" type `"+Y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[Y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ce.name="Invariant Violation",Ce}K=h[Y](x,Y,U,T,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ae){K=ae}K&&!(K instanceof Error)&&(Je(G),k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",U||"React class",T,Y,typeof K),Je(null)),K instanceof Error&&!(K.message in $r)&&($r[K.message]=!0,Je(G),k("Failed %s type: %s",T,K.message),Je(null))}}}var lr=Array.isArray;function ur(h){return lr(h)}function Un(h){{var x=typeof Symbol=="function"&&Symbol.toStringTag,T=x&&h[Symbol.toStringTag]||h.constructor.name||"Object";return T}}function Hr(h){try{return g(h),!1}catch{return!0}}function g(h){return""+h}function b(h){if(Hr(h))return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Un(h)),g(h)}var R=O.ReactCurrentOwner,L={key:!0,ref:!0,__self:!0,__source:!0},D,V,I;I={};function W(h){if(Rt.call(h,"ref")){var x=Object.getOwnPropertyDescriptor(h,"ref").get;if(x&&x.isReactWarning)return!1}return h.ref!==void 0}function q(h){if(Rt.call(h,"key")){var x=Object.getOwnPropertyDescriptor(h,"key").get;if(x&&x.isReactWarning)return!1}return h.key!==void 0}function ge(h,x){if(typeof h.ref=="string"&&R.current&&x&&R.current.stateNode!==x){var T=re(R.current.type);I[T]||(k('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',re(R.current.type),h.ref),I[T]=!0)}}function Q(h,x){{var T=function(){D||(D=!0,k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",x))};T.isReactWarning=!0,Object.defineProperty(h,"key",{get:T,configurable:!0})}}function ie(h,x){{var T=function(){V||(V=!0,k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",x))};T.isReactWarning=!0,Object.defineProperty(h,"ref",{get:T,configurable:!0})}}var Oe=function(h,x,T,U,G,J,Y){var K={$$typeof:e,type:h,key:x,ref:T,props:Y,_owner:J};return K._store={},Object.defineProperty(K._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(K,"_self",{configurable:!1,enumerable:!1,writable:!1,value:U}),Object.defineProperty(K,"_source",{configurable:!1,enumerable:!1,writable:!1,value:G}),Object.freeze&&(Object.freeze(K.props),Object.freeze(K)),K};function _e(h,x,T,U,G){{var J,Y={},K=null,Ce=null;T!==void 0&&(b(T),K=""+T),q(x)&&(b(x.key),K=""+x.key),W(x)&&(Ce=x.ref,ge(x,G));for(J in x)Rt.call(x,J)&&!L.hasOwnProperty(J)&&(Y[J]=x[J]);if(h&&h.defaultProps){var ae=h.defaultProps;for(J in ae)Y[J]===void 0&&(Y[J]=ae[J])}if(K||Ce){var ce=typeof h=="function"?h.displayName||h.name||"Unknown":h;K&&Q(Y,ce),Ce&&ie(Y,ce)}return Oe(h,K,Ce,G,U,R.current,Y)}}var Xe=O.ReactCurrentOwner,xt=O.ReactDebugCurrentFrame;function Me(h){if(h){var x=h._owner,T=At(h.type,h._source,x?x.type:null);xt.setExtraStackFrame(T)}else xt.setExtraStackFrame(null)}var He;He=!1;function Ot(h){return typeof h=="object"&&h!==null&&h.$$typeof===e}function he(){{if(Xe.current){var h=re(Xe.current.type);if(h)return`
23
23
 
24
- Check the render method of \``+h+"`."}return""}}function ke(h){{if(h!==void 0){var x=h.fileName.replace(/^.*[\\\/]/,""),k=h.lineNumber;return`
24
+ Check the render method of \``+h+"`."}return""}}function ke(h){{if(h!==void 0){var x=h.fileName.replace(/^.*[\\\/]/,""),T=h.lineNumber;return`
25
25
 
26
- Check your code at `+x+":"+k+"."}return""}}var Be={};function Nt(h){{var x=ce();if(!x){var k=typeof h=="string"?h:h.displayName||h.name;k&&(x=`
26
+ Check your code at `+x+":"+T+"."}return""}}var Qe={};function qt(h){{var x=he();if(!x){var T=typeof h=="string"?h:h.displayName||h.name;T&&(x=`
27
27
 
28
- Check the top-level render call using <`+k+">.")}return x}}function At(h,x){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var k=Nt(x);if(Be[k])return;Be[k]=!0;var V="";h&&h._owner&&h._owner!==Ze.current&&(V=" It was passed a child from "+se(h._owner.type)+"."),Fe(h),D('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',k,V),Fe(null)}}function Hr(h,x){{if(typeof h!="object")return;if(lr(h))for(var k=0;k<h.length;k++){var V=h[k];St(V)&&At(V,x)}else if(St(h))h._store&&(h._store.validated=!0);else if(h){var K=S(h);if(typeof K=="function"&&K!==h.entries)for(var X=K.call(h),W;!(W=X.next()).done;)St(W.value)&&At(W.value,x)}}}function Un(h){{var x=h.type;if(x==null||typeof x=="string")return;var k;if(typeof x=="function")k=x.propTypes;else if(typeof x=="object"&&(x.$$typeof===l||x.$$typeof===f))k=x.propTypes;else return;if(k){var V=se(x);$r(k,h.props,"prop",V,h)}else if(x.PropTypes!==void 0&&!$e){$e=!0;var K=se(x);D("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",K||"Unknown")}typeof x.getDefaultProps=="function"&&!x.getDefaultProps.isReactClassApproved&&D("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Me(h){{for(var x=Object.keys(h.props),k=0;k<x.length;k++){var V=x[k];if(V!=="children"&&V!=="key"){Fe(h),D("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",V),Fe(null);break}}h.ref!==null&&(Fe(h),D("Invalid attribute `ref` supplied to `React.Fragment`."),Fe(null))}}function qt(h,x,k,V,K,X){{var W=Z(h);if(!W){var z="";(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).length===0)&&(z+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var we=ke(K);we?z+=we:z+=ce();var ae;h===null?ae="null":lr(h)?ae="array":h!==void 0&&h.$$typeof===e?(ae="<"+(se(h.type)||"Unknown")+" />",z=" Did you accidentally export a JSX literal instead of a component?"):ae=typeof h,D("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ae,z)}var ue=Oe(h,x,k,K,X);if(ue==null)return ue;if(W){var De=x.children;if(De!==void 0)if(V)if(lr(De)){for(var It=0;It<De.length;It++)Hr(De[It],h);Object.freeze&&Object.freeze(De)}else D("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Hr(De,h)}return h===n?Me(ue):Un(ue),ue}}function Qr(h,x,k){return qt(h,x,k,!0)}function $n(h,x,k){return qt(h,x,k,!1)}var Uf=$n,$f=Qr;Ut.Fragment=n,Ut.jsx=Uf,Ut.jsxs=$f}()),Ut}(function(t){process.env.NODE_ENV==="production"?t.exports=ma():t.exports=ga()})(pa);var $t={},Bt=lt;if(process.env.NODE_ENV==="production")$t.createRoot=Bt.createRoot,$t.hydrateRoot=Bt.hydrateRoot;else{var cr=Bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;$t.createRoot=function(t,e){cr.usingClientEntryPoint=!0;try{return Bt.createRoot(t,e)}finally{cr.usingClientEntryPoint=!1}},$t.hydrateRoot=function(t,e,r){cr.usingClientEntryPoint=!0;try{return Bt.hydrateRoot(t,e,r)}finally{cr.usingClientEntryPoint=!1}}}const Qn=t=>{let e;const r=new Set,n=(l,c)=>{const d=typeof l=="function"?l(e):l;if(!Object.is(d,e)){const f=e;e=c??typeof d!="object"?d:Object.assign({},e,d),r.forEach(u=>u(e,f))}},i=()=>e,o={setState:n,getState:i,subscribe:l=>(r.add(l),()=>r.delete(l)),destroy:()=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&console.warn("[DEPRECATED] The destroy method will be unsupported in the future version. You should use unsubscribe function returned by subscribe. Everything will be garbage collected if store is garbage collected."),r.clear()}};return e=t(n,i,o),o},ya=t=>t?Qn(t):Qn;var zr={},va={get exports(){return zr},set exports(t){zr=t}},Wr={},dr={},ba={get exports(){return dr},set exports(t){dr=t}},Kr={};/**
28
+ Check the top-level render call using <`+T+">.")}return x}}function It(h,x){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var T=qt(x);if(Qe[T])return;Qe[T]=!0;var U="";h&&h._owner&&h._owner!==Xe.current&&(U=" It was passed a child from "+re(h._owner.type)+"."),Me(h),k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',T,U),Me(null)}}function Qr(h,x){{if(typeof h!="object")return;if(ur(h))for(var T=0;T<h.length;T++){var U=h[T];Ot(U)&&It(U,x)}else if(Ot(h))h._store&&(h._store.validated=!0);else if(h){var G=S(h);if(typeof G=="function"&&G!==h.entries)for(var J=G.call(h),Y;!(Y=J.next()).done;)Ot(Y.value)&&It(Y.value,x)}}}function $n(h){{var x=h.type;if(x==null||typeof x=="string")return;var T;if(typeof x=="function")T=x.propTypes;else if(typeof x=="object"&&(x.$$typeof===o||x.$$typeof===f))T=x.propTypes;else return;if(T){var U=re(x);Br(T,h.props,"prop",U,h)}else if(x.PropTypes!==void 0&&!He){He=!0;var G=re(x);k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",G||"Unknown")}typeof x.getDefaultProps=="function"&&!x.getDefaultProps.isReactClassApproved&&k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ne(h){{for(var x=Object.keys(h.props),T=0;T<x.length;T++){var U=x[T];if(U!=="children"&&U!=="key"){Me(h),k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",U),Me(null);break}}h.ref!==null&&(Me(h),k("Invalid attribute `ref` supplied to `React.Fragment`."),Me(null))}}function Vt(h,x,T,U,G,J){{var Y=z(h);if(!Y){var K="";(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).length===0)&&(K+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ce=ke(G);Ce?K+=Ce:K+=he();var ae;h===null?ae="null":ur(h)?ae="array":h!==void 0&&h.$$typeof===e?(ae="<"+(re(h.type)||"Unknown")+" />",K=" Did you accidentally export a JSX literal instead of a component?"):ae=typeof h,k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ae,K)}var ce=_e(h,x,T,G,J);if(ce==null)return ce;if(Y){var De=x.children;if(De!==void 0)if(U)if(ur(De)){for(var Ut=0;Ut<De.length;Ut++)Qr(De[Ut],h);Object.freeze&&Object.freeze(De)}else k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Qr(De,h)}return h===n?Ne(ce):$n(ce),ce}}function zr(h,x,T){return Vt(h,x,T,!0)}function Bn(h,x,T){return Vt(h,x,T,!1)}var $f=Bn,Bf=zr;Bt.Fragment=n,Bt.jsx=$f,Bt.jsxs=Bf}()),Bt}(function(t){process.env.NODE_ENV==="production"?t.exports=va():t.exports=ba()})(ya);var Ht={},Qt=ct;if(process.env.NODE_ENV==="production")Ht.createRoot=Qt.createRoot,Ht.hydrateRoot=Qt.hydrateRoot;else{var dr=Qt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Ht.createRoot=function(t,e){dr.usingClientEntryPoint=!0;try{return Qt.createRoot(t,e)}finally{dr.usingClientEntryPoint=!1}},Ht.hydrateRoot=function(t,e,r){dr.usingClientEntryPoint=!0;try{return Qt.hydrateRoot(t,e,r)}finally{dr.usingClientEntryPoint=!1}}}const zn=t=>{let e;const r=new Set,n=(o,u)=>{const c=typeof o=="function"?o(e):o;if(!Object.is(c,e)){const f=e;e=u??typeof c!="object"?c:Object.assign({},e,c),r.forEach(d=>d(e,f))}},i=()=>e,l={setState:n,getState:i,subscribe:o=>(r.add(o),()=>r.delete(o)),destroy:()=>{({VITE_DEV:"false",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&console.warn("[DEPRECATED] The destroy method will be unsupported in the future version. You should use unsubscribe function returned by subscribe. Everything will be garbage collected if store is garbage collected."),r.clear()}};return e=t(n,i,l),l},wa=t=>t?zn(t):zn;var Wr={},Ca={get exports(){return Wr},set exports(t){Wr=t}},Kr={},hr={},Ea={get exports(){return hr},set exports(t){hr=t}},Yr={};/**
29
29
  * @license React
30
30
  * use-sync-external-store-shim.production.min.js
31
31
  *
@@ -33,7 +33,7 @@ Check the top-level render call using <`+k+">.")}return x}}function At(h,x){{if(
33
33
  *
34
34
  * This source code is licensed under the MIT license found in the
35
35
  * LICENSE file in the root directory of this source tree.
36
- */var zn;function wa(){if(zn)return Kr;zn=1;var t=N;function e(f,u){return f===u&&(f!==0||1/f===1/u)||f!==f&&u!==u}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,i=t.useEffect,s=t.useLayoutEffect,a=t.useDebugValue;function o(f,u){var m=u(),b=n({inst:{value:m,getSnapshot:u}}),w=b[0].inst,S=b[1];return s(function(){w.value=m,w.getSnapshot=u,l(w)&&S({inst:w})},[f,m,u]),i(function(){return l(w)&&S({inst:w}),f(function(){l(w)&&S({inst:w})})},[f]),a(m),m}function l(f){var u=f.getSnapshot;f=f.value;try{var m=u();return!r(f,m)}catch{return!0}}function c(f,u){return u()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:o;return Kr.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,Kr}var Yr={};/**
36
+ */var Wn;function Sa(){if(Wn)return Yr;Wn=1;var t=A;function e(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,i=t.useEffect,s=t.useLayoutEffect,a=t.useDebugValue;function l(f,d){var m=d(),v=n({inst:{value:m,getSnapshot:d}}),w=v[0].inst,S=v[1];return s(function(){w.value=m,w.getSnapshot=d,o(w)&&S({inst:w})},[f,m,d]),i(function(){return o(w)&&S({inst:w}),f(function(){o(w)&&S({inst:w})})},[f]),a(m),m}function o(f){var d=f.getSnapshot;f=f.value;try{var m=d();return!r(f,m)}catch{return!0}}function u(f,d){return d()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return Yr.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:c,Yr}var Gr={};/**
37
37
  * @license React
38
38
  * use-sync-external-store-shim.development.js
39
39
  *
@@ -41,7 +41,7 @@ Check the top-level render call using <`+k+">.")}return x}}function At(h,x){{if(
41
41
  *
42
42
  * This source code is licensed under the MIT license found in the
43
43
  * LICENSE file in the root directory of this source tree.
44
- */var Wn;function Ca(){return Wn||(Wn=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=N,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(C){{for(var E=arguments.length,F=new Array(E>1?E-1:0),O=1;O<E;O++)F[O-1]=arguments[O];n("error",C,F)}}function n(C,E,F){{var O=e.ReactDebugCurrentFrame,T=O.getStackAddendum();T!==""&&(E+="%s",F=F.concat([T]));var P=F.map(function(B){return String(B)});P.unshift("Warning: "+E),Function.prototype.apply.call(console[C],console,P)}}function i(C,E){return C===E&&(C!==0||1/C===1/E)||C!==C&&E!==E}var s=typeof Object.is=="function"?Object.is:i,a=t.useState,o=t.useEffect,l=t.useLayoutEffect,c=t.useDebugValue,d=!1,f=!1;function u(C,E,F){d||t.startTransition!==void 0&&(d=!0,r("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var O=E();if(!f){var T=E();s(O,T)||(r("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var P=a({inst:{value:O,getSnapshot:E}}),B=P[0].inst,Z=P[1];return l(function(){B.value=O,B.getSnapshot=E,m(B)&&Z({inst:B})},[C,O,E]),o(function(){m(B)&&Z({inst:B});var J=function(){m(B)&&Z({inst:B})};return C(J)},[C]),c(O),O}function m(C){var E=C.getSnapshot,F=C.value;try{var O=E();return!s(F,O)}catch{return!0}}function b(C,E,F){return E()}var w=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",S=!w,_=S?b:u,D=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:_;Yr.useSyncExternalStore=D,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Yr}var Kn;function Gr(){return Kn||(Kn=1,function(t){process.env.NODE_ENV==="production"?t.exports=wa():t.exports=Ca()}(ba)),dr}/**
44
+ */var Kn;function Ra(){return Kn||(Kn=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=A,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(C){{for(var E=arguments.length,N=new Array(E>1?E-1:0),_=1;_<E;_++)N[_-1]=arguments[_];n("error",C,N)}}function n(C,E,N){{var _=e.ReactDebugCurrentFrame,M=_.getStackAddendum();M!==""&&(E+="%s",N=N.concat([M]));var j=N.map(function(H){return String(H)});j.unshift("Warning: "+E),Function.prototype.apply.call(console[C],console,j)}}function i(C,E){return C===E&&(C!==0||1/C===1/E)||C!==C&&E!==E}var s=typeof Object.is=="function"?Object.is:i,a=t.useState,l=t.useEffect,o=t.useLayoutEffect,u=t.useDebugValue,c=!1,f=!1;function d(C,E,N){c||t.startTransition!==void 0&&(c=!0,r("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var _=E();if(!f){var M=E();s(_,M)||(r("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var j=a({inst:{value:_,getSnapshot:E}}),H=j[0].inst,z=j[1];return o(function(){H.value=_,H.getSnapshot=E,m(H)&&z({inst:H})},[C,_,E]),l(function(){m(H)&&z({inst:H});var F=function(){m(H)&&z({inst:H})};return C(F)},[C]),u(_),_}function m(C){var E=C.getSnapshot,N=C.value;try{var _=E();return!s(N,_)}catch{return!0}}function v(C,E,N){return E()}var w=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",S=!w,O=S?v:d,k=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:O;Gr.useSyncExternalStore=k,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Gr}var Yn;function Zr(){return Yn||(Yn=1,function(t){process.env.NODE_ENV==="production"?t.exports=Sa():t.exports=Ra()}(Ea)),hr}/**
45
45
  * @license React
46
46
  * use-sync-external-store-shim/with-selector.production.min.js
47
47
  *
@@ -49,7 +49,7 @@ Check the top-level render call using <`+k+">.")}return x}}function At(h,x){{if(
49
49
  *
50
50
  * This source code is licensed under the MIT license found in the
51
51
  * LICENSE file in the root directory of this source tree.
52
- */var Yn;function Ea(){if(Yn)return Wr;Yn=1;var t=N,e=Gr();function r(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var n=typeof Object.is=="function"?Object.is:r,i=e.useSyncExternalStore,s=t.useRef,a=t.useEffect,o=t.useMemo,l=t.useDebugValue;return Wr.useSyncExternalStoreWithSelector=function(c,d,f,u,m){var b=s(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=o(function(){function _(O){if(!D){if(D=!0,C=O,O=u(O),m!==void 0&&w.hasValue){var T=w.value;if(m(T,O))return E=T}return E=O}if(T=E,n(C,O))return T;var P=u(O);return m!==void 0&&m(T,P)?T:(C=O,E=P)}var D=!1,C,E,F=f===void 0?null:f;return[function(){return _(d())},F===null?void 0:function(){return _(F())}]},[d,f,u,m]);var S=i(c,b[0],b[1]);return a(function(){w.hasValue=!0,w.value=S},[S]),l(S),S},Wr}var Zr={};/**
52
+ */var Gn;function xa(){if(Gn)return Kr;Gn=1;var t=A,e=Zr();function r(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var n=typeof Object.is=="function"?Object.is:r,i=e.useSyncExternalStore,s=t.useRef,a=t.useEffect,l=t.useMemo,o=t.useDebugValue;return Kr.useSyncExternalStoreWithSelector=function(u,c,f,d,m){var v=s(null);if(v.current===null){var w={hasValue:!1,value:null};v.current=w}else w=v.current;v=l(function(){function O(_){if(!k){if(k=!0,C=_,_=d(_),m!==void 0&&w.hasValue){var M=w.value;if(m(M,_))return E=M}return E=_}if(M=E,n(C,_))return M;var j=d(_);return m!==void 0&&m(M,j)?M:(C=_,E=j)}var k=!1,C,E,N=f===void 0?null:f;return[function(){return O(c())},N===null?void 0:function(){return O(N())}]},[c,f,d,m]);var S=i(u,v[0],v[1]);return a(function(){w.hasValue=!0,w.value=S},[S]),o(S),S},Kr}var Jr={};/**
53
53
  * @license React
54
54
  * use-sync-external-store-shim/with-selector.development.js
55
55
  *
@@ -57,7 +57,7 @@ Check the top-level render call using <`+k+">.")}return x}}function At(h,x){{if(
57
57
  *
58
58
  * This source code is licensed under the MIT license found in the
59
59
  * LICENSE file in the root directory of this source tree.
60
- */var Gn;function Ra(){return Gn||(Gn=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=N,e=Gr();function r(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:r,i=e.useSyncExternalStore,s=t.useRef,a=t.useEffect,o=t.useMemo,l=t.useDebugValue;function c(d,f,u,m,b){var w=s(null),S;w.current===null?(S={hasValue:!1,value:null},w.current=S):S=w.current;var _=o(function(){var F=!1,O,T,P=function(de){if(!F){F=!0,O=de;var se=m(de);if(b!==void 0&&S.hasValue){var ve=S.value;if(b(ve,se))return T=ve,ve}return T=se,se}var G=O,Te=T;if(n(G,de))return Te;var ne=m(de);return b!==void 0&&b(Te,ne)?Te:(O=de,T=ne,ne)},B=u===void 0?null:u,Z=function(){return P(f())},J=B===null?void 0:function(){return P(B())};return[Z,J]},[f,u,m,b]),D=_[0],C=_[1],E=i(d,D,C);return a(function(){S.hasValue=!0,S.value=E},[E]),l(E),E}Zr.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Zr}(function(t){process.env.NODE_ENV==="production"?t.exports=Ea():t.exports=Ra()})(va);const Sa=fa(zr),{useSyncExternalStoreWithSelector:xa}=Sa;function Oa(t,e=t.getState,r){const n=xa(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return N.useDebugValue(n),n}const Zn=t=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&typeof t!="function"&&console.warn('[DEPRECATED] Passing a vanilla store will be unsupported in the future version. Please use `import { useStore } from "zustand"` to use the vanilla store in React.');const e=typeof t=="function"?ya(t):t,r=(n,i)=>Oa(e,n,i);return Object.assign(r,e),r},_a=t=>t?Zn(t):Zn;/**
60
+ */var Zn;function Oa(){return Zn||(Zn=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=A,e=Zr();function r(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var n=typeof Object.is=="function"?Object.is:r,i=e.useSyncExternalStore,s=t.useRef,a=t.useEffect,l=t.useMemo,o=t.useDebugValue;function u(c,f,d,m,v){var w=s(null),S;w.current===null?(S={hasValue:!1,value:null},w.current=S):S=w.current;var O=l(function(){var N=!1,_,M,j=function(ue){if(!N){N=!0,_=ue;var re=m(ue);if(v!==void 0&&S.hasValue){var de=S.value;if(v(de,re))return M=de,de}return M=re,re}var be=_,je=M;if(n(be,ue))return je;var te=m(ue);return v!==void 0&&v(je,te)?je:(_=ue,M=te,te)},H=d===void 0?null:d,z=function(){return j(f())},F=H===null?void 0:function(){return j(H())};return[z,F]},[f,d,m,v]),k=O[0],C=O[1],E=i(c,k,C);return a(function(){S.hasValue=!0,S.value=E},[E]),o(E),E}Jr.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Jr}(function(t){process.env.NODE_ENV==="production"?t.exports=xa():t.exports=Oa()})(Ca);const _a=ga(Wr),{useSyncExternalStoreWithSelector:Ta}=_a;function ka(t,e=t.getState,r){const n=Ta(t.subscribe,t.getState,t.getServerState||t.getState,e,r);return A.useDebugValue(n),n}const Jn=t=>{({VITE_DEV:"false",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&typeof t!="function"&&console.warn('[DEPRECATED] Passing a vanilla store will be unsupported in the future version. Please use `import { useStore } from "zustand"` to use the vanilla store in React.');const e=typeof t=="function"?wa(t):t,r=(n,i)=>ka(e,n,i);return Object.assign(r,e),r},Da=t=>t?Jn(t):Jn;/**
61
61
  * @remix-run/router v1.3.1
62
62
  *
63
63
  * Copyright (c) Remix Software Inc.
@@ -66,7 +66,7 @@ Check the top-level render call using <`+k+">.")}return x}}function At(h,x){{if(
66
66
  * LICENSE.md file in the root directory of this source tree.
67
67
  *
68
68
  * @license MIT
69
- */function Y(){return Y=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Y.apply(this,arguments)}var oe;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(oe||(oe={}));function Ta(t){t===void 0&&(t={});let{initialEntries:e=["/"],initialIndex:r,v5Compat:n=!1}=t,i;i=e.map((m,b)=>d(m,typeof m=="string"?null:m.state,b===0?"default":void 0));let s=l(r??i.length-1),a=oe.Pop,o=null;function l(m){return Math.min(Math.max(m,0),i.length-1)}function c(){return i[s]}function d(m,b,w){b===void 0&&(b=null);let S=Jr(i?c().pathname:"/",m,b,w);return ka(S.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(m)),S}function f(m){return typeof m=="string"?m:je(m)}return{get index(){return s},get action(){return a},get location(){return c()},createHref:f,createURL(m){return new URL(f(m),"http://localhost")},encodeLocation(m){let b=typeof m=="string"?Ne(m):m;return{pathname:b.pathname||"",search:b.search||"",hash:b.hash||""}},push(m,b){a=oe.Push;let w=d(m,b);s+=1,i.splice(s,i.length,w),n&&o&&o({action:a,location:w,delta:1})},replace(m,b){a=oe.Replace;let w=d(m,b);i[s]=w,n&&o&&o({action:a,location:w,delta:0})},go(m){a=oe.Pop;let b=l(s+m),w=i[b];s=b,o&&o({action:a,location:w,delta:m})},listen(m){return o=m,()=>{o=null}}}}function j(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function ka(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Da(){return Math.random().toString(36).substr(2,8)}function Jr(t,e,r,n){return r===void 0&&(r=null),Y({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Ne(e):e,{state:r,key:e&&e.key||n||Da()})}function je(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ne(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var he;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(he||(he={}));function La(t){return t.index===!0}function Jn(t,e,r){return e===void 0&&(e=[]),r===void 0&&(r=new Set),t.map((n,i)=>{let s=[...e,i],a=typeof n.id=="string"?n.id:s.join("-");return j(n.index!==!0||!n.children,"Cannot specify children on an index route"),j(!r.has(a),'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),r.add(a),La(n)?Y({},n,{id:a}):Y({},n,{id:a,children:n.children?Jn(n.children,s,r):void 0})})}function Ht(t,e,r){r===void 0&&(r="/");let n=typeof e=="string"?Ne(e):e,i=ri(n.pathname||"/",r);if(i==null)return null;let s=Xn(t);Pa(s);let a=null;for(let o=0;a==null&&o<s.length;++o)a=Ua(s[o],Ha(i));return a}function Xn(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(s,a,o)=>{let l={relativePath:o===void 0?s.path||"":o,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};l.relativePath.startsWith("/")&&(j(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=qe([n,l.relativePath]),d=r.concat(l);s.children&&s.children.length>0&&(j(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Xn(s.children,e,d,c)),!(s.path==null&&!s.index)&&e.push({path:c,score:Ia(c,s.index),routesMeta:d})};return t.forEach((s,a)=>{var o;if(s.path===""||!((o=s.path)!=null&&o.includes("?")))i(s,a);else for(let l of ei(s.path))i(s,a,l)}),e}function ei(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return i?[s,""]:[s];let a=ei(n.join("/")),o=[];return o.push(...a.map(l=>l===""?s:[s,l].join("/"))),i&&o.push(...a),o.map(l=>t.startsWith("/")&&l===""?"/":l)}function Pa(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:Va(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Fa=/^:\w+$/,Ma=3,ja=2,Na=1,Aa=10,qa=-2,ti=t=>t==="*";function Ia(t,e){let r=t.split("/"),n=r.length;return r.some(ti)&&(n+=qa),e&&(n+=ja),r.filter(i=>!ti(i)).reduce((i,s)=>i+(Fa.test(s)?Ma:s===""?Na:Aa),n)}function Va(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function Ua(t,e){let{routesMeta:r}=t,n={},i="/",s=[];for(let a=0;a<r.length;++a){let o=r[a],l=a===r.length-1,c=i==="/"?e:e.slice(i.length)||"/",d=$a({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},c);if(!d)return null;Object.assign(n,d.params);let f=o.route;s.push({params:n,pathname:qe([i,d.pathname]),pathnameBase:Ka(qe([i,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(i=qe([i,d.pathnameBase]))}return s}function $a(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=Ba(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let s=i[0],a=s.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:n.reduce((c,d,f)=>{if(d==="*"){let u=o[f]||"";a=s.slice(0,s.length-u.length).replace(/(.)\/+$/,"$1")}return c[d]=Qa(o[f]||"",d),c},{}),pathname:s,pathnameBase:a,pattern:t}}function Ba(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),Ae(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(a,o)=>(n.push(o),"/([^\\/]+)"));return t.endsWith("*")?(n.push("*"),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function Ha(t){try{return decodeURI(t)}catch(e){return Ae(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Qa(t,e){try{return decodeURIComponent(t)}catch(r){return Ae(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),t}}function ri(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function Ae(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function za(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?Ne(t):t;return{pathname:r?r.startsWith("/")?r:Wa(r,e):e,search:Ya(n),hash:Ga(i)}}function Wa(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Xr(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function hr(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function en(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=Ne(t):(i=Y({},t),j(!i.pathname||!i.pathname.includes("?"),Xr("?","pathname","search",i)),j(!i.pathname||!i.pathname.includes("#"),Xr("#","pathname","hash",i)),j(!i.search||!i.search.includes("#"),Xr("#","search","hash",i)));let s=t===""||i.pathname==="",a=s?"/":i.pathname,o;if(n||a==null)o=r;else{let f=e.length-1;if(a.startsWith("..")){let u=a.split("/");for(;u[0]==="..";)u.shift(),f-=1;i.pathname=u.join("/")}o=f>=0?e[f]:"/"}let l=za(i,o),c=a&&a!=="/"&&a.endsWith("/"),d=(s||a===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const qe=t=>t.join("/").replace(/\/\/+/g,"/"),Ka=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Ya=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Ga=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class ni extends Error{}class Za{constructor(e,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],j(e&&typeof e=="object"&&!Array.isArray(e),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((s,a)=>n=a),this.controller=new AbortController;let i=()=>n(new ni("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",i),this.controller.signal.addEventListener("abort",i),this.data=Object.entries(e).reduce((s,a)=>{let[o,l]=a;return Object.assign(s,{[o]:this.trackPromise(o,l)})},{}),this.done&&this.unlistenAbortSignal(),this.init=r}trackPromise(e,r){if(!(r instanceof Promise))return r;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let n=Promise.race([r,this.abortPromise]).then(i=>this.onSettle(n,e,null,i),i=>this.onSettle(n,e,i));return n.catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(e,r,n,i){return this.controller.signal.aborted&&n instanceof ni?(this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>n}),Promise.reject(n)):(this.pendingKeysSet.delete(r),this.done&&this.unlistenAbortSignal(),n?(Object.defineProperty(e,"_error",{get:()=>n}),this.emit(!1,r),Promise.reject(n)):(Object.defineProperty(e,"_data",{get:()=>i}),this.emit(!1,r),i))}emit(e,r){this.subscribers.forEach(n=>n(e,r))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((e,r)=>this.pendingKeysSet.delete(r)),this.emit(!0)}async resolveData(e){let r=!1;if(!this.done){let n=()=>this.cancel();e.addEventListener("abort",n),r=await new Promise(i=>{this.subscribe(s=>{e.removeEventListener("abort",n),(s||this.done)&&i(s)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return j(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((e,r)=>{let[n,i]=r;return Object.assign(e,{[n]:Xa(i)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function Ja(t){return t instanceof Promise&&t._tracked===!0}function Xa(t){if(!Ja(t))return t;if(t._error)throw t._error;return t._data}class ii{constructor(e,r,n,i){i===void 0&&(i=!1),this.status=e,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function si(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const ai=["post","put","patch","delete"],eo=new Set(ai),to=["get",...ai],ro=new Set(to),no=new Set([301,302,303,307,308]),io=new Set([307,308]),tn={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},so={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},oi={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},li=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ao=!li;function oo(t){j(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let e=Jn(t.routes),r=null,n=new Set,i=null,s=null,a=null,o=t.hydrationData!=null,l=Ht(e,t.history.location,t.basename),c=null;if(l==null){let g=Xe(404,{pathname:t.history.location.pathname}),{matches:v,route:R}=gi(e);l=v,c={[R.id]:g}}let d=!l.some(g=>g.route.loader)||t.hydrationData!=null,f,u={historyAction:t.history.action,location:t.history.location,matches:l,initialized:d,navigation:tn,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||c,fetchers:new Map,blockers:new Map},m=oe.Pop,b=!1,w,S=!1,_=!1,D=[],C=[],E=new Map,F=0,O=-1,T=new Map,P=new Set,B=new Map,Z=new Map,J=null,de=new Map,se=!1;function ve(){return r=t.history.listen(g=>{let{action:v,location:R,delta:M}=g;if(se){se=!1;return}Ae(J!=null&&M===null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let L=$r({currentLocation:u.location,nextLocation:R,historyAction:v});if(L&&M!=null){se=!0,t.history.go(M*-1),Ge(L,{state:"blocked",location:R,proceed(){Ge(L,{state:"proceeding",proceed:void 0,reset:void 0,location:R}),t.history.go(M)},reset(){ot(L),ne({blockers:new Map(f.state.blockers)})}});return}return Ve(v,R)}),u.initialized||Ve(oe.Pop,u.location),f}function G(){r&&r(),n.clear(),w&&w.abort(),u.fetchers.forEach((g,v)=>Ft(v)),u.blockers.forEach((g,v)=>ot(v))}function Te(g){return n.add(g),()=>n.delete(g)}function ne(g){u=Y({},u,g),n.forEach(v=>v(u))}function st(g,v){var R,M;let L=u.actionData!=null&&u.navigation.formMethod!=null&&He(u.navigation.formMethod)&&u.navigation.state==="loading"&&((R=g.state)==null?void 0:R._isRedirect)!==!0,I;v.actionData?Object.keys(v.actionData).length>0?I=v.actionData:I=null:L?I=u.actionData:I=null;let q=v.loaderData?mi(u.loaderData,v.loaderData,v.matches||[],v.errors):u.loaderData;for(let[A]of de)ot(A);let Q=b===!0||u.navigation.formMethod!=null&&He(u.navigation.formMethod)&&((M=g.state)==null?void 0:M._isRedirect)!==!0;ne(Y({},v,{actionData:I,loaderData:q,historyAction:m,location:g,initialized:!0,navigation:tn,revalidation:"idle",restoreScrollPosition:Br(g,v.matches||u.matches),preventScrollReset:Q,blockers:new Map(u.blockers)})),S||m===oe.Pop||(m===oe.Push?t.history.push(g,g.state):m===oe.Replace&&t.history.replace(g,g.state)),m=oe.Pop,b=!1,S=!1,_=!1,D=[],C=[]}async function nr(g,v){if(typeof g=="number"){t.history.go(g);return}let{path:R,submission:M,error:L}=ui(g,v),I=u.location,q=Jr(u.location,R,v&&v.state);q=Y({},q,t.history.encodeLocation(q));let Q=v&&v.replace!=null?v.replace:void 0,A=oe.Push;Q===!0?A=oe.Replace:Q===!1||M!=null&&He(M.formMethod)&&M.formAction===u.location.pathname+u.location.search&&(A=oe.Replace);let me=v&&"preventScrollReset"in v?v.preventScrollReset===!0:void 0,H=$r({currentLocation:I,nextLocation:q,historyAction:A});if(H){Ge(H,{state:"blocked",location:q,proceed(){Ge(H,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),nr(g,v)},reset(){ot(H),ne({blockers:new Map(u.blockers)})}});return}return await Ve(A,q,{submission:M,pendingError:L,preventScrollReset:me,replace:v&&v.replace})}function Nr(){if(at(),ne({revalidation:"loading"}),u.navigation.state!=="submitting"){if(u.navigation.state==="idle"){Ve(u.historyAction,u.location,{startUninterruptedRevalidation:!0});return}Ve(m||u.historyAction,u.navigation.location,{overrideNavigation:u.navigation})}}async function Ve(g,v,R){w&&w.abort(),w=null,m=g,S=(R&&R.startUninterruptedRevalidation)===!0,Vn(u.location,u.matches),b=(R&&R.preventScrollReset)===!0;let M=R&&R.overrideNavigation,L=Ht(e,v,t.basename);if(!L){let re=Xe(404,{pathname:v.pathname}),{matches:xe,route:Oe}=gi(e);or(),st(v,{matches:xe,loaderData:{},errors:{[Oe.id]:re}});return}if(fo(u.location,v)&&!(R&&R.submission&&He(R.submission.formMethod))){st(v,{matches:L});return}w=new AbortController;let I=zt(t.history,v,w.signal,R&&R.submission),q,Q;if(R&&R.pendingError)Q={[xt(L).route.id]:R.pendingError};else if(R&&R.submission&&He(R.submission.formMethod)){let re=await Ar(I,v,R.submission,L,{replace:R.replace});if(re.shortCircuited)return;q=re.pendingActionData,Q=re.pendingActionError,M=Y({state:"loading",location:v},R.submission),I=new Request(I.url,{signal:I.signal})}let{shortCircuited:A,loaderData:me,errors:H}=await qr(I,v,L,M,R&&R.submission,R&&R.replace,q,Q);A||(w=null,st(v,Y({matches:L},q?{actionData:q}:{},{loaderData:me,errors:H})))}async function Ar(g,v,R,M,L){at();let I=Y({state:"submitting",location:v},R);ne({navigation:I});let q,Q=Ri(M,v);if(!Q.route.action)q={type:he.error,error:Xe(405,{method:g.method,pathname:v.pathname,routeId:Q.route.id})};else if(q=await Qt("action",g,Q,M,f.basename),g.signal.aborted)return{shortCircuited:!0};if(Ot(q)){let A;return L&&L.replace!=null?A=L.replace:A=q.location===u.location.pathname+u.location.search,await Ue(u,q,{submission:R,replace:A}),{shortCircuited:!0}}if(Wt(q)){let A=xt(M,Q.route.id);return(L&&L.replace)!==!0&&(m=oe.Push),{pendingActionData:{},pendingActionError:{[A.route.id]:q.error}}}if(ut(q))throw Xe(400,{type:"defer-action"});return{pendingActionData:{[Q.route.id]:q.data}}}async function qr(g,v,R,M,L,I,q,Q){let A=M;A||(A=Y({state:"loading",location:v,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},L));let me=L||(A.formMethod&&A.formAction&&A.formData&&A.formEncType?{formMethod:A.formMethod,formAction:A.formAction,formData:A.formData,formEncType:A.formEncType}:void 0),[H,re]=ci(t.history,u,R,me,v,_,D,C,q,Q,B);if(or(ce=>!(R&&R.some(ke=>ke.route.id===ce))||H&&H.some(ke=>ke.route.id===ce)),H.length===0&&re.length===0)return st(v,Y({matches:R,loaderData:{},errors:Q||null},q?{actionData:q}:{})),{shortCircuited:!0};if(!S){re.forEach(ke=>{let Be=u.fetchers.get(ke.key),Nt={state:"loading",data:Be&&Be.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};u.fetchers.set(ke.key,Nt)});let ce=q||u.actionData;ne(Y({navigation:A},ce?Object.keys(ce).length===0?{actionData:null}:{actionData:ce}:{},re.length>0?{fetchers:new Map(u.fetchers)}:{}))}O=++F,re.forEach(ce=>E.set(ce.key,w));let{results:xe,loaderResults:Oe,fetcherResults:Ze}=await Pt(u.matches,R,H,re,g);if(g.signal.aborted)return{shortCircuited:!0};re.forEach(ce=>E.delete(ce.key));let Rt=yi(xe);if(Rt)return await Ue(u,Rt,{replace:I}),{shortCircuited:!0};let{loaderData:Fe,errors:$e}=pi(u,R,H,Oe,Q,re,Ze,Z);Z.forEach((ce,ke)=>{ce.subscribe(Be=>{(Be||ce.done)&&Z.delete(ke)})}),jt();let St=Et(O);return Y({loaderData:Fe,errors:$e},St||re.length>0?{fetchers:new Map(u.fetchers)}:{})}function Ir(g){return u.fetchers.get(g)||so}function In(g,v,R,M){if(ao)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");E.has(g)&&Mt(g);let L=Ht(e,R,t.basename);if(!L){ar(g,v,Xe(404,{pathname:R}));return}let{path:I,submission:q}=ui(R,M,!0),Q=Ri(L,I);if(b=(M&&M.preventScrollReset)===!0,q&&He(q.formMethod)){ir(g,v,I,Q,L,q);return}B.set(g,{routeId:v,path:I,match:Q,matches:L}),sr(g,v,I,Q,L,q)}async function ir(g,v,R,M,L,I){if(at(),B.delete(g),!M.route.action){let Me=Xe(405,{method:I.formMethod,pathname:R,routeId:v});ar(g,v,Me);return}let q=u.fetchers.get(g),Q=Y({state:"submitting"},I,{data:q&&q.data," _hasFetcherDoneAnything ":!0});u.fetchers.set(g,Q),ne({fetchers:new Map(u.fetchers)});let A=new AbortController,me=zt(t.history,R,A.signal,I);E.set(g,A);let H=await Qt("action",me,M,L,f.basename);if(me.signal.aborted){E.get(g)===A&&E.delete(g);return}if(Ot(H)){E.delete(g),P.add(g);let Me=Y({state:"loading"},I,{data:void 0," _hasFetcherDoneAnything ":!0});return u.fetchers.set(g,Me),ne({fetchers:new Map(u.fetchers)}),Ue(u,H,{isFetchActionRedirect:!0})}if(Wt(H)){ar(g,v,H.error);return}if(ut(H))throw Xe(400,{type:"defer-action"});let re=u.navigation.location||u.location,xe=zt(t.history,re,A.signal),Oe=u.navigation.state!=="idle"?Ht(e,u.navigation.location,t.basename):u.matches;j(Oe,"Didn't find any matches after fetcher action");let Ze=++F;T.set(g,Ze);let Rt=Y({state:"loading",data:H.data},I,{" _hasFetcherDoneAnything ":!0});u.fetchers.set(g,Rt);let[Fe,$e]=ci(t.history,u,Oe,I,re,_,D,C,{[M.route.id]:H.data},void 0,B);$e.filter(Me=>Me.key!==g).forEach(Me=>{let qt=Me.key,Qr=u.fetchers.get(qt),$n={state:"loading",data:Qr&&Qr.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};u.fetchers.set(qt,$n),E.set(qt,A)}),ne({fetchers:new Map(u.fetchers)});let{results:St,loaderResults:ce,fetcherResults:ke}=await Pt(u.matches,Oe,Fe,$e,xe);if(A.signal.aborted)return;T.delete(g),E.delete(g),$e.forEach(Me=>E.delete(Me.key));let Be=yi(St);if(Be)return Ue(u,Be);let{loaderData:Nt,errors:At}=pi(u,u.matches,Fe,ce,void 0,$e,ke,Z),Hr={state:"idle",data:H.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};u.fetchers.set(g,Hr);let Un=Et(Ze);u.navigation.state==="loading"&&Ze>O?(j(m,"Expected pending action"),w&&w.abort(),st(u.navigation.location,{matches:Oe,loaderData:Nt,errors:At,fetchers:new Map(u.fetchers)})):(ne(Y({errors:At,loaderData:mi(u.loaderData,Nt,Oe,At)},Un?{fetchers:new Map(u.fetchers)}:{})),_=!1)}async function sr(g,v,R,M,L,I){let q=u.fetchers.get(g),Q=Y({state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},I,{data:q&&q.data," _hasFetcherDoneAnything ":!0});u.fetchers.set(g,Q),ne({fetchers:new Map(u.fetchers)});let A=new AbortController,me=zt(t.history,R,A.signal);E.set(g,A);let H=await Qt("loader",me,M,L,f.basename);if(ut(H)&&(H=await wi(H,me.signal,!0)||H),E.get(g)===A&&E.delete(g),me.signal.aborted)return;if(Ot(H)){await Ue(u,H);return}if(Wt(H)){let xe=xt(u.matches,v);u.fetchers.delete(g),ne({fetchers:new Map(u.fetchers),errors:{[xe.route.id]:H.error}});return}j(!ut(H),"Unhandled fetcher deferred data");let re={state:"idle",data:H.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};u.fetchers.set(g,re),ne({fetchers:new Map(u.fetchers)})}async function Ue(g,v,R){var M;let{submission:L,replace:I,isFetchActionRedirect:q}=R===void 0?{}:R;v.revalidate&&(_=!0);let Q=Jr(g.location,v.location,Y({_isRedirect:!0},q?{_isFetchActionRedirect:!0}:{}));if(j(Q,"Expected a location on the redirect navigation"),li&&typeof((M=window)==null?void 0:M.location)<"u"){let Oe=t.history.createURL(v.location).origin;if(window.location.origin!==Oe){I?window.location.replace(v.location):window.location.assign(v.location);return}}w=null;let A=I===!0?oe.Replace:oe.Push,{formMethod:me,formAction:H,formEncType:re,formData:xe}=g.navigation;!L&&me&&H&&xe&&re&&(L={formMethod:me,formAction:H,formEncType:re,formData:xe}),io.has(v.status)&&L&&He(L.formMethod)?await Ve(A,Q,{submission:Y({},L,{formAction:v.location}),preventScrollReset:b}):await Ve(A,Q,{overrideNavigation:{state:"loading",location:Q,formMethod:L?L.formMethod:void 0,formAction:L?L.formAction:void 0,formEncType:L?L.formEncType:void 0,formData:L?L.formData:void 0},preventScrollReset:b})}async function Pt(g,v,R,M,L){let I=await Promise.all([...R.map(A=>Qt("loader",L,A,v,f.basename)),...M.map(A=>Qt("loader",zt(t.history,A.path,L.signal),A.match,A.matches,f.basename))]),q=I.slice(0,R.length),Q=I.slice(R.length);return await Promise.all([bi(g,R,q,L.signal,!1,u.loaderData),bi(g,M.map(A=>A.match),Q,L.signal,!0)]),{results:I,loaderResults:q,fetcherResults:Q}}function at(){_=!0,D.push(...or()),B.forEach((g,v)=>{E.has(v)&&(C.push(v),Mt(v))})}function ar(g,v,R){let M=xt(u.matches,v);Ft(g),ne({errors:{[M.route.id]:R},fetchers:new Map(u.fetchers)})}function Ft(g){E.has(g)&&Mt(g),B.delete(g),T.delete(g),P.delete(g),u.fetchers.delete(g)}function Mt(g){let v=E.get(g);j(v,"Expected fetch controller: "+g),v.abort(),E.delete(g)}function Vr(g){for(let v of g){let M={state:"idle",data:Ir(v).data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};u.fetchers.set(v,M)}}function jt(){let g=[];for(let v of P){let R=u.fetchers.get(v);j(R,"Expected fetcher: "+v),R.state==="loading"&&(P.delete(v),g.push(v))}Vr(g)}function Et(g){let v=[];for(let[R,M]of T)if(M<g){let L=u.fetchers.get(R);j(L,"Expected fetcher: "+R),L.state==="loading"&&(Mt(R),T.delete(R),v.push(R))}return Vr(v),v.length>0}function Ur(g,v){let R=u.blockers.get(g)||oi;return de.get(g)!==v&&(de.set(g,v),J==null?J=g:g!==J&&Ae(!1,"A router only supports one blocker at a time")),R}function ot(g){u.blockers.delete(g),de.delete(g),J===g&&(J=null)}function Ge(g,v){let R=u.blockers.get(g)||oi;j(R.state==="unblocked"&&v.state==="blocked"||R.state==="blocked"&&v.state==="blocked"||R.state==="blocked"&&v.state==="proceeding"||R.state==="blocked"&&v.state==="unblocked"||R.state==="proceeding"&&v.state==="unblocked","Invalid blocker state transition: "+R.state+" -> "+v.state),u.blockers.set(g,v),ne({blockers:new Map(u.blockers)})}function $r(g){let{currentLocation:v,nextLocation:R,historyAction:M}=g;if(J==null)return;let L=de.get(J);j(L,"Could not find a function for the active blocker");let I=u.blockers.get(J);if(!(I&&I.state==="proceeding")&&L({currentLocation:v,nextLocation:R,historyAction:M}))return J}function or(g){let v=[];return Z.forEach((R,M)=>{(!g||g(M))&&(R.cancel(),v.push(M),Z.delete(M))}),v}function lr(g,v,R){if(i=g,a=v,s=R||(M=>M.key),!o&&u.navigation===tn){o=!0;let M=Br(u.location,u.matches);M!=null&&ne({restoreScrollPosition:M})}return()=>{i=null,a=null,s=null}}function Vn(g,v){if(i&&s&&a){let R=v.map(L=>Ei(L,u.loaderData)),M=s(g,R)||g.key;i[M]=a()}}function Br(g,v){if(i&&s&&a){let R=v.map(I=>Ei(I,u.loaderData)),M=s(g,R)||g.key,L=i[M];if(typeof L=="number")return L}return null}return f={get basename(){return t.basename},get state(){return u},get routes(){return e},initialize:ve,subscribe:Te,enableScrollRestoration:lr,navigate:nr,fetch:In,revalidate:Nr,createHref:g=>t.history.createHref(g),encodeLocation:g=>t.history.encodeLocation(g),getFetcher:Ir,deleteFetcher:Ft,dispose:G,getBlocker:Ur,deleteBlocker:ot,_internalFetchControllers:E,_internalActiveDeferreds:Z},f}function lo(t){return t!=null&&"formData"in t}function ui(t,e,r){r===void 0&&(r=!1);let n=typeof t=="string"?t:je(t);if(!e||!lo(e))return{path:n};if(e.formMethod&&!mo(e.formMethod))return{path:n,error:Xe(405,{method:e.formMethod})};let i;if(e.formData&&(i={formMethod:e.formMethod||"get",formAction:vi(n),formEncType:e&&e.formEncType||"application/x-www-form-urlencoded",formData:e.formData},He(i.formMethod)))return{path:n,submission:i};let s=Ne(n),a=fi(e.formData);return r&&s.search&&Ci(s.search)&&a.append("index",""),s.search="?"+a,{path:je(s),submission:i}}function uo(t,e){let r=t;if(e){let n=t.findIndex(i=>i.route.id===e);n>=0&&(r=t.slice(0,n))}return r}function ci(t,e,r,n,i,s,a,o,l,c,d){let f=c?Object.values(c)[0]:l?Object.values(l)[0]:void 0,u=t.createURL(e.location),m=t.createURL(i),b=s||u.toString()===m.toString()||u.search!==m.search,w=c?Object.keys(c)[0]:void 0,_=uo(r,w).filter((C,E)=>{if(C.route.loader==null)return!1;if(co(e.loaderData,e.matches[E],C)||a.some(T=>T===C.route.id))return!0;let F=e.matches[E],O=C;return hi(C,Y({currentUrl:u,currentParams:F.params,nextUrl:m,nextParams:O.params},n,{actionResult:f,defaultShouldRevalidate:b||di(F,O)}))}),D=[];return d&&d.forEach((C,E)=>{if(r.some(F=>F.route.id===C.routeId))o.includes(E)?D.push(Y({key:E},C)):hi(C.match,Y({currentUrl:u,currentParams:e.matches[e.matches.length-1].params,nextUrl:m,nextParams:r[r.length-1].params},n,{actionResult:f,defaultShouldRevalidate:b}))&&D.push(Y({key:E},C));else return}),[_,D]}function co(t,e,r){let n=!e||r.route.id!==e.route.id,i=t[r.route.id]===void 0;return n||i}function di(t,e){let r=t.route.path;return t.pathname!==e.pathname||r!=null&&r.endsWith("*")&&t.params["*"]!==e.params["*"]}function hi(t,e){if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate(e);if(typeof r=="boolean")return r}return e.defaultShouldRevalidate}async function Qt(t,e,r,n,i,s,a,o){i===void 0&&(i="/"),s===void 0&&(s=!1),a===void 0&&(a=!1);let l,c,d,f=new Promise((m,b)=>d=b),u=()=>d();e.signal.addEventListener("abort",u);try{let m=r.route[t];j(m,"Could not find the "+t+' to run on the "'+r.route.id+'" route'),c=await Promise.race([m({request:e,params:r.params,context:o}),f]),j(c!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(m){l=he.error,c=m}finally{e.signal.removeEventListener("abort",u)}if(po(c)){let m=c.status;if(no.has(m)){let S=c.headers.get("Location");if(j(S,"Redirects returned/thrown from loaders/actions must have a Location header"),/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(S)){if(!s){let D=new URL(e.url),C=S.startsWith("//")?new URL(D.protocol+S):new URL(S);C.origin===D.origin&&(S=C.pathname+C.search+C.hash)}}else{let D=n.slice(0,n.indexOf(r)+1),C=hr(D).map(F=>F.pathnameBase),E=en(S,C,new URL(e.url).pathname);if(j(je(E),"Unable to resolve redirect location: "+S),i){let F=E.pathname;E.pathname=F==="/"?i:qe([i,F])}S=je(E)}if(s)throw c.headers.set("Location",S),c;return{type:he.redirect,status:m,location:S,revalidate:c.headers.get("X-Remix-Revalidate")!==null}}if(a)throw{type:l||he.data,response:c};let b,w=c.headers.get("Content-Type");return w&&/\bapplication\/json\b/.test(w)?b=await c.json():b=await c.text(),l===he.error?{type:l,error:new ii(m,c.statusText,b),headers:c.headers}:{type:he.data,data:b,statusCode:c.status,headers:c.headers}}return l===he.error?{type:l,error:c}:c instanceof Za?{type:he.deferred,deferredData:c}:{type:he.data,data:c}}function zt(t,e,r,n){let i=t.createURL(vi(e)).toString(),s={signal:r};if(n&&He(n.formMethod)){let{formMethod:a,formEncType:o,formData:l}=n;s.method=a.toUpperCase(),s.body=o==="application/x-www-form-urlencoded"?fi(l):l}return new Request(i,s)}function fi(t){let e=new URLSearchParams;for(let[r,n]of t.entries())e.append(r,n instanceof File?n.name:n);return e}function ho(t,e,r,n,i){let s={},a=null,o,l=!1,c={};return r.forEach((d,f)=>{let u=e[f].route.id;if(j(!Ot(d),"Cannot handle redirect results in processLoaderData"),Wt(d)){let m=xt(t,u),b=d.error;n&&(b=Object.values(n)[0],n=void 0),a=a||{},a[m.route.id]==null&&(a[m.route.id]=b),s[u]=void 0,l||(l=!0,o=si(d.error)?d.error.status:500),d.headers&&(c[u]=d.headers)}else ut(d)?(i.set(u,d.deferredData),s[u]=d.deferredData.data):s[u]=d.data,d.statusCode!=null&&d.statusCode!==200&&!l&&(o=d.statusCode),d.headers&&(c[u]=d.headers)}),n&&(a=n,s[Object.keys(n)[0]]=void 0),{loaderData:s,errors:a,statusCode:o||200,loaderHeaders:c}}function pi(t,e,r,n,i,s,a,o){let{loaderData:l,errors:c}=ho(e,r,n,i,o);for(let d=0;d<s.length;d++){let{key:f,match:u}=s[d];j(a!==void 0&&a[d]!==void 0,"Did not find corresponding fetcher result");let m=a[d];if(Wt(m)){let b=xt(t.matches,u.route.id);c&&c[b.route.id]||(c=Y({},c,{[b.route.id]:m.error})),t.fetchers.delete(f)}else if(Ot(m))j(!1,"Unhandled fetcher revalidation redirect");else if(ut(m))j(!1,"Unhandled fetcher deferred data");else{let b={state:"idle",data:m.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};t.fetchers.set(f,b)}}return{loaderData:l,errors:c}}function mi(t,e,r,n){let i=Y({},e);for(let s of r){let a=s.route.id;if(e.hasOwnProperty(a)?e[a]!==void 0&&(i[a]=e[a]):t[a]!==void 0&&(i[a]=t[a]),n&&n.hasOwnProperty(a))break}return i}function xt(t,e){return(e?t.slice(0,t.findIndex(n=>n.route.id===e)+1):[...t]).reverse().find(n=>n.route.hasErrorBoundary===!0)||t[0]}function gi(t){let e=t.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function Xe(t,e){let{pathname:r,routeId:n,method:i,type:s}=e===void 0?{}:e,a="Unknown Server Error",o="Unknown @remix-run/router error";return t===400?(a="Bad Request",i&&r&&n?o="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":s==="defer-action"&&(o="defer() is not supported in actions")):t===403?(a="Forbidden",o='Route "'+n+'" does not match URL "'+r+'"'):t===404?(a="Not Found",o='No route matches URL "'+r+'"'):t===405&&(a="Method Not Allowed",i&&r&&n?o="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(o='Invalid request method "'+i.toUpperCase()+'"')),new ii(t||500,a,new Error(o),!0)}function yi(t){for(let e=t.length-1;e>=0;e--){let r=t[e];if(Ot(r))return r}}function vi(t){let e=typeof t=="string"?Ne(t):t;return je(Y({},e,{hash:""}))}function fo(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash!==e.hash}function ut(t){return t.type===he.deferred}function Wt(t){return t.type===he.error}function Ot(t){return(t&&t.type)===he.redirect}function po(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function mo(t){return ro.has(t)}function He(t){return eo.has(t)}async function bi(t,e,r,n,i,s){for(let a=0;a<r.length;a++){let o=r[a],l=e[a],c=t.find(f=>f.route.id===l.route.id),d=c!=null&&!di(c,l)&&(s&&s[l.route.id])!==void 0;ut(o)&&(i||d)&&await wi(o,n,i).then(f=>{f&&(r[a]=f||r[a])})}}async function wi(t,e,r){if(r===void 0&&(r=!1),!await t.deferredData.resolveData(e)){if(r)try{return{type:he.data,data:t.deferredData.unwrappedData}}catch(i){return{type:he.error,error:i}}return{type:he.data,data:t.deferredData.data}}}function Ci(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function Ei(t,e){let{route:r,pathname:n,params:i}=t;return{id:r.id,pathname:n,params:i,data:e[r.id],handle:r.handle}}function Ri(t,e){let r=typeof e=="string"?Ne(e).search:e.search;if(t[t.length-1].route.index&&Ci(r||""))return t[t.length-1];let n=hr(t);return n[n.length-1]}/**
69
+ */function Z(){return Z=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Z.apply(this,arguments)}var oe;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(oe||(oe={}));function La(t){t===void 0&&(t={});let{initialEntries:e=["/"],initialIndex:r,v5Compat:n=!1}=t,i;i=e.map((m,v)=>c(m,typeof m=="string"?null:m.state,v===0?"default":void 0));let s=o(r??i.length-1),a=oe.Pop,l=null;function o(m){return Math.min(Math.max(m,0),i.length-1)}function u(){return i[s]}function c(m,v,w){v===void 0&&(v=null);let S=Xr(i?u().pathname:"/",m,v,w);return Pa(S.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(m)),S}function f(m){return typeof m=="string"?m:Ae(m)}return{get index(){return s},get action(){return a},get location(){return u()},createHref:f,createURL(m){return new URL(f(m),"http://localhost")},encodeLocation(m){let v=typeof m=="string"?qe(m):m;return{pathname:v.pathname||"",search:v.search||"",hash:v.hash||""}},push(m,v){a=oe.Push;let w=c(m,v);s+=1,i.splice(s,i.length,w),n&&l&&l({action:a,location:w,delta:1})},replace(m,v){a=oe.Replace;let w=c(m,v);i[s]=w,n&&l&&l({action:a,location:w,delta:0})},go(m){a=oe.Pop;let v=o(s+m),w=i[v];s=v,l&&l({action:a,location:w,delta:m})},listen(m){return l=m,()=>{l=null}}}}function P(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Pa(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function ja(){return Math.random().toString(36).substr(2,8)}function Xr(t,e,r,n){return r===void 0&&(r=null),Z({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?qe(e):e,{state:r,key:e&&e.key||n||ja()})}function Ae(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function qe(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var fe;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(fe||(fe={}));function Fa(t){return t.index===!0}function Xn(t,e,r){return e===void 0&&(e=[]),r===void 0&&(r=new Set),t.map((n,i)=>{let s=[...e,i],a=typeof n.id=="string"?n.id:s.join("-");return P(n.index!==!0||!n.children,"Cannot specify children on an index route"),P(!r.has(a),'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),r.add(a),Fa(n)?Z({},n,{id:a}):Z({},n,{id:a,children:n.children?Xn(n.children,s,r):void 0})})}function zt(t,e,r){r===void 0&&(r="/");let n=typeof e=="string"?qe(e):e,i=ni(n.pathname||"/",r);if(i==null)return null;let s=ei(t);Ma(s);let a=null;for(let l=0;a==null&&l<s.length;++l)a=Ha(s[l],Wa(i));return a}function ei(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(s,a,l)=>{let o={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};o.relativePath.startsWith("/")&&(P(o.relativePath.startsWith(n),'Absolute route path "'+o.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),o.relativePath=o.relativePath.slice(n.length));let u=Ve([n,o.relativePath]),c=r.concat(o);s.children&&s.children.length>0&&(P(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),ei(s.children,e,c,u)),!(s.path==null&&!s.index)&&e.push({path:u,score:$a(u,s.index),routesMeta:c})};return t.forEach((s,a)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,a);else for(let o of ti(s.path))i(s,a,o)}),e}function ti(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return i?[s,""]:[s];let a=ti(n.join("/")),l=[];return l.push(...a.map(o=>o===""?s:[s,o].join("/"))),i&&l.push(...a),l.map(o=>t.startsWith("/")&&o===""?"/":o)}function Ma(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:Ba(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Na=/^:\w+$/,Aa=3,qa=2,Ia=1,Va=10,Ua=-2,ri=t=>t==="*";function $a(t,e){let r=t.split("/"),n=r.length;return r.some(ri)&&(n+=Ua),e&&(n+=qa),r.filter(i=>!ri(i)).reduce((i,s)=>i+(Na.test(s)?Aa:s===""?Ia:Va),n)}function Ba(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function Ha(t,e){let{routesMeta:r}=t,n={},i="/",s=[];for(let a=0;a<r.length;++a){let l=r[a],o=a===r.length-1,u=i==="/"?e:e.slice(i.length)||"/",c=Qa({path:l.relativePath,caseSensitive:l.caseSensitive,end:o},u);if(!c)return null;Object.assign(n,c.params);let f=l.route;s.push({params:n,pathname:Ve([i,c.pathname]),pathnameBase:Za(Ve([i,c.pathnameBase])),route:f}),c.pathnameBase!=="/"&&(i=Ve([i,c.pathnameBase]))}return s}function Qa(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=za(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let s=i[0],a=s.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:n.reduce((u,c,f)=>{if(c==="*"){let d=l[f]||"";a=s.slice(0,s.length-d.length).replace(/(.)\/+$/,"$1")}return u[c]=Ka(l[f]||"",c),u},{}),pathname:s,pathnameBase:a,pattern:t}}function za(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),Ie(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(a,l)=>(n.push(l),"/([^\\/]+)"));return t.endsWith("*")?(n.push("*"),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function Wa(t){try{return decodeURI(t)}catch(e){return Ie(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Ka(t,e){try{return decodeURIComponent(t)}catch(r){return Ie(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),t}}function ni(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function Ie(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Ya(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?qe(t):t;return{pathname:r?r.startsWith("/")?r:Ga(r,e):e,search:Ja(n),hash:Xa(i)}}function Ga(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function en(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function fr(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function tn(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=qe(t):(i=Z({},t),P(!i.pathname||!i.pathname.includes("?"),en("?","pathname","search",i)),P(!i.pathname||!i.pathname.includes("#"),en("#","pathname","hash",i)),P(!i.search||!i.search.includes("#"),en("#","search","hash",i)));let s=t===""||i.pathname==="",a=s?"/":i.pathname,l;if(n||a==null)l=r;else{let f=e.length-1;if(a.startsWith("..")){let d=a.split("/");for(;d[0]==="..";)d.shift(),f-=1;i.pathname=d.join("/")}l=f>=0?e[f]:"/"}let o=Ya(i,l),u=a&&a!=="/"&&a.endsWith("/"),c=(s||a===".")&&r.endsWith("/");return!o.pathname.endsWith("/")&&(u||c)&&(o.pathname+="/"),o}const Ve=t=>t.join("/").replace(/\/\/+/g,"/"),Za=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Ja=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Xa=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class ii extends Error{}class eo{constructor(e,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],P(e&&typeof e=="object"&&!Array.isArray(e),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((s,a)=>n=a),this.controller=new AbortController;let i=()=>n(new ii("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",i),this.controller.signal.addEventListener("abort",i),this.data=Object.entries(e).reduce((s,a)=>{let[l,o]=a;return Object.assign(s,{[l]:this.trackPromise(l,o)})},{}),this.done&&this.unlistenAbortSignal(),this.init=r}trackPromise(e,r){if(!(r instanceof Promise))return r;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let n=Promise.race([r,this.abortPromise]).then(i=>this.onSettle(n,e,null,i),i=>this.onSettle(n,e,i));return n.catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(e,r,n,i){return this.controller.signal.aborted&&n instanceof ii?(this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>n}),Promise.reject(n)):(this.pendingKeysSet.delete(r),this.done&&this.unlistenAbortSignal(),n?(Object.defineProperty(e,"_error",{get:()=>n}),this.emit(!1,r),Promise.reject(n)):(Object.defineProperty(e,"_data",{get:()=>i}),this.emit(!1,r),i))}emit(e,r){this.subscribers.forEach(n=>n(e,r))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((e,r)=>this.pendingKeysSet.delete(r)),this.emit(!0)}async resolveData(e){let r=!1;if(!this.done){let n=()=>this.cancel();e.addEventListener("abort",n),r=await new Promise(i=>{this.subscribe(s=>{e.removeEventListener("abort",n),(s||this.done)&&i(s)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return P(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((e,r)=>{let[n,i]=r;return Object.assign(e,{[n]:ro(i)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function to(t){return t instanceof Promise&&t._tracked===!0}function ro(t){if(!to(t))return t;if(t._error)throw t._error;return t._data}class si{constructor(e,r,n,i){i===void 0&&(i=!1),this.status=e,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function ai(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const oi=["post","put","patch","delete"],no=new Set(oi),io=["get",...oi],so=new Set(io),ao=new Set([301,302,303,307,308]),oo=new Set([307,308]),rn={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},lo={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},li={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ui=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",uo=!ui;function co(t){P(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let e=Xn(t.routes),r=null,n=new Set,i=null,s=null,a=null,l=t.hydrationData!=null,o=zt(e,t.history.location,t.basename),u=null;if(o==null){let g=tt(404,{pathname:t.history.location.pathname}),{matches:b,route:R}=yi(e);o=b,u={[R.id]:g}}let c=!o.some(g=>g.route.loader)||t.hydrationData!=null,f,d={historyAction:t.history.action,location:t.history.location,matches:o,initialized:c,navigation:rn,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||u,fetchers:new Map,blockers:new Map},m=oe.Pop,v=!1,w,S=!1,O=!1,k=[],C=[],E=new Map,N=0,_=-1,M=new Map,j=new Set,H=new Map,z=new Map,F=null,ue=new Map,re=!1;function de(){return r=t.history.listen(g=>{let{action:b,location:R,delta:L}=g;if(re){re=!1;return}Ie(F!=null&&L===null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let D=Br({currentLocation:d.location,nextLocation:R,historyAction:b});if(D&&L!=null){re=!0,t.history.go(L*-1),Je(D,{state:"blocked",location:R,proceed(){Je(D,{state:"proceeding",proceed:void 0,reset:void 0,location:R}),t.history.go(L)},reset(){ut(D),te({blockers:new Map(f.state.blockers)})}});return}return $e(b,R)}),d.initialized||$e(oe.Pop,d.location),f}function be(){r&&r(),n.clear(),w&&w.abort(),d.fetchers.forEach((g,b)=>Mt(b)),d.blockers.forEach((g,b)=>ut(b))}function je(g){return n.add(g),()=>n.delete(g)}function te(g){d=Z({},d,g),n.forEach(b=>b(d))}function Fe(g,b){var R,L;let D=d.actionData!=null&&d.navigation.formMethod!=null&&ze(d.navigation.formMethod)&&d.navigation.state==="loading"&&((R=g.state)==null?void 0:R._isRedirect)!==!0,V;b.actionData?Object.keys(b.actionData).length>0?V=b.actionData:V=null:D?V=d.actionData:V=null;let I=b.loaderData?gi(d.loaderData,b.loaderData,b.matches||[],b.errors):d.loaderData;for(let[q]of ue)ut(q);let W=v===!0||d.navigation.formMethod!=null&&ze(d.navigation.formMethod)&&((L=g.state)==null?void 0:L._isRedirect)!==!0;te(Z({},b,{actionData:V,loaderData:I,historyAction:m,location:g,initialized:!0,navigation:rn,revalidation:"idle",restoreScrollPosition:Hr(g,b.matches||d.matches),preventScrollReset:W,blockers:new Map(d.blockers)})),S||m===oe.Pop||(m===oe.Push?t.history.push(g,g.state):m===oe.Replace&&t.history.replace(g,g.state)),m=oe.Pop,v=!1,S=!1,O=!1,k=[],C=[]}async function ne(g,b){if(typeof g=="number"){t.history.go(g);return}let{path:R,submission:L,error:D}=ci(g,b),V=d.location,I=Xr(d.location,R,b&&b.state);I=Z({},I,t.history.encodeLocation(I));let W=b&&b.replace!=null?b.replace:void 0,q=oe.Push;W===!0?q=oe.Replace:W===!1||L!=null&&ze(L.formMethod)&&L.formAction===d.location.pathname+d.location.search&&(q=oe.Replace);let ge=b&&"preventScrollReset"in b?b.preventScrollReset===!0:void 0,Q=Br({currentLocation:V,nextLocation:I,historyAction:q});if(Q){Je(Q,{state:"blocked",location:I,proceed(){Je(Q,{state:"proceeding",proceed:void 0,reset:void 0,location:I}),ne(g,b)},reset(){ut(Q),te({blockers:new Map(d.blockers)})}});return}return await $e(q,I,{submission:L,pendingError:D,preventScrollReset:ge,replace:b&&b.replace})}function ot(){if(lt(),te({revalidation:"loading"}),d.navigation.state!=="submitting"){if(d.navigation.state==="idle"){$e(d.historyAction,d.location,{startUninterruptedRevalidation:!0});return}$e(m||d.historyAction,d.navigation.location,{overrideNavigation:d.navigation})}}async function $e(g,b,R){w&&w.abort(),w=null,m=g,S=(R&&R.startUninterruptedRevalidation)===!0,Un(d.location,d.matches),v=(R&&R.preventScrollReset)===!0;let L=R&&R.overrideNavigation,D=zt(e,b,t.basename);if(!D){let ie=tt(404,{pathname:b.pathname}),{matches:Oe,route:_e}=yi(e);lr(),Fe(b,{matches:Oe,loaderData:{},errors:{[_e.id]:ie}});return}if(go(d.location,b)&&!(R&&R.submission&&ze(R.submission.formMethod))){Fe(b,{matches:D});return}w=new AbortController;let V=Kt(t.history,b,w.signal,R&&R.submission),I,W;if(R&&R.pendingError)W={[_t(D).route.id]:R.pendingError};else if(R&&R.submission&&ze(R.submission.formMethod)){let ie=await qr(V,b,R.submission,D,{replace:R.replace});if(ie.shortCircuited)return;I=ie.pendingActionData,W=ie.pendingActionError,L=Z({state:"loading",location:b},R.submission),V=new Request(V.url,{signal:V.signal})}let{shortCircuited:q,loaderData:ge,errors:Q}=await Ir(V,b,D,L,R&&R.submission,R&&R.replace,I,W);q||(w=null,Fe(b,Z({matches:D},I?{actionData:I}:{},{loaderData:ge,errors:Q})))}async function qr(g,b,R,L,D){lt();let V=Z({state:"submitting",location:b},R);te({navigation:V});let I,W=Ri(L,b);if(!W.route.action)I={type:fe.error,error:tt(405,{method:g.method,pathname:b.pathname,routeId:W.route.id})};else if(I=await Wt("action",g,W,L,f.basename),g.signal.aborted)return{shortCircuited:!0};if(Tt(I)){let q;return D&&D.replace!=null?q=D.replace:q=I.location===d.location.pathname+d.location.search,await Be(d,I,{submission:R,replace:q}),{shortCircuited:!0}}if(Yt(I)){let q=_t(L,W.route.id);return(D&&D.replace)!==!0&&(m=oe.Push),{pendingActionData:{},pendingActionError:{[q.route.id]:I.error}}}if(dt(I))throw tt(400,{type:"defer-action"});return{pendingActionData:{[W.route.id]:I.data}}}async function Ir(g,b,R,L,D,V,I,W){let q=L;q||(q=Z({state:"loading",location:b,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},D));let ge=D||(q.formMethod&&q.formAction&&q.formData&&q.formEncType?{formMethod:q.formMethod,formAction:q.formAction,formData:q.formData,formEncType:q.formEncType}:void 0),[Q,ie]=di(t.history,d,R,ge,b,O,k,C,I,W,H);if(lr(he=>!(R&&R.some(ke=>ke.route.id===he))||Q&&Q.some(ke=>ke.route.id===he)),Q.length===0&&ie.length===0)return Fe(b,Z({matches:R,loaderData:{},errors:W||null},I?{actionData:I}:{})),{shortCircuited:!0};if(!S){ie.forEach(ke=>{let Qe=d.fetchers.get(ke.key),qt={state:"loading",data:Qe&&Qe.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};d.fetchers.set(ke.key,qt)});let he=I||d.actionData;te(Z({navigation:q},he?Object.keys(he).length===0?{actionData:null}:{actionData:he}:{},ie.length>0?{fetchers:new Map(d.fetchers)}:{}))}_=++N,ie.forEach(he=>E.set(he.key,w));let{results:Oe,loaderResults:_e,fetcherResults:Xe}=await Ft(d.matches,R,Q,ie,g);if(g.signal.aborted)return{shortCircuited:!0};ie.forEach(he=>E.delete(he.key));let xt=vi(Oe);if(xt)return await Be(d,xt,{replace:V}),{shortCircuited:!0};let{loaderData:Me,errors:He}=mi(d,R,Q,_e,W,ie,Xe,z);z.forEach((he,ke)=>{he.subscribe(Qe=>{(Qe||he.done)&&z.delete(ke)})}),At();let Ot=Rt(_);return Z({loaderData:Me,errors:He},Ot||ie.length>0?{fetchers:new Map(d.fetchers)}:{})}function Vr(g){return d.fetchers.get(g)||lo}function Vn(g,b,R,L){if(uo)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");E.has(g)&&Nt(g);let D=zt(e,R,t.basename);if(!D){or(g,b,tt(404,{pathname:R}));return}let{path:V,submission:I}=ci(R,L,!0),W=Ri(D,V);if(v=(L&&L.preventScrollReset)===!0,I&&ze(I.formMethod)){sr(g,b,V,W,D,I);return}H.set(g,{routeId:b,path:V,match:W,matches:D}),ar(g,b,V,W,D,I)}async function sr(g,b,R,L,D,V){if(lt(),H.delete(g),!L.route.action){let Ne=tt(405,{method:V.formMethod,pathname:R,routeId:b});or(g,b,Ne);return}let I=d.fetchers.get(g),W=Z({state:"submitting"},V,{data:I&&I.data," _hasFetcherDoneAnything ":!0});d.fetchers.set(g,W),te({fetchers:new Map(d.fetchers)});let q=new AbortController,ge=Kt(t.history,R,q.signal,V);E.set(g,q);let Q=await Wt("action",ge,L,D,f.basename);if(ge.signal.aborted){E.get(g)===q&&E.delete(g);return}if(Tt(Q)){E.delete(g),j.add(g);let Ne=Z({state:"loading"},V,{data:void 0," _hasFetcherDoneAnything ":!0});return d.fetchers.set(g,Ne),te({fetchers:new Map(d.fetchers)}),Be(d,Q,{isFetchActionRedirect:!0})}if(Yt(Q)){or(g,b,Q.error);return}if(dt(Q))throw tt(400,{type:"defer-action"});let ie=d.navigation.location||d.location,Oe=Kt(t.history,ie,q.signal),_e=d.navigation.state!=="idle"?zt(e,d.navigation.location,t.basename):d.matches;P(_e,"Didn't find any matches after fetcher action");let Xe=++N;M.set(g,Xe);let xt=Z({state:"loading",data:Q.data},V,{" _hasFetcherDoneAnything ":!0});d.fetchers.set(g,xt);let[Me,He]=di(t.history,d,_e,V,ie,O,k,C,{[L.route.id]:Q.data},void 0,H);He.filter(Ne=>Ne.key!==g).forEach(Ne=>{let Vt=Ne.key,zr=d.fetchers.get(Vt),Bn={state:"loading",data:zr&&zr.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};d.fetchers.set(Vt,Bn),E.set(Vt,q)}),te({fetchers:new Map(d.fetchers)});let{results:Ot,loaderResults:he,fetcherResults:ke}=await Ft(d.matches,_e,Me,He,Oe);if(q.signal.aborted)return;M.delete(g),E.delete(g),He.forEach(Ne=>E.delete(Ne.key));let Qe=vi(Ot);if(Qe)return Be(d,Qe);let{loaderData:qt,errors:It}=mi(d,d.matches,Me,he,void 0,He,ke,z),Qr={state:"idle",data:Q.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};d.fetchers.set(g,Qr);let $n=Rt(Xe);d.navigation.state==="loading"&&Xe>_?(P(m,"Expected pending action"),w&&w.abort(),Fe(d.navigation.location,{matches:_e,loaderData:qt,errors:It,fetchers:new Map(d.fetchers)})):(te(Z({errors:It,loaderData:gi(d.loaderData,qt,_e,It)},$n?{fetchers:new Map(d.fetchers)}:{})),O=!1)}async function ar(g,b,R,L,D,V){let I=d.fetchers.get(g),W=Z({state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},V,{data:I&&I.data," _hasFetcherDoneAnything ":!0});d.fetchers.set(g,W),te({fetchers:new Map(d.fetchers)});let q=new AbortController,ge=Kt(t.history,R,q.signal);E.set(g,q);let Q=await Wt("loader",ge,L,D,f.basename);if(dt(Q)&&(Q=await Ci(Q,ge.signal,!0)||Q),E.get(g)===q&&E.delete(g),ge.signal.aborted)return;if(Tt(Q)){await Be(d,Q);return}if(Yt(Q)){let Oe=_t(d.matches,b);d.fetchers.delete(g),te({fetchers:new Map(d.fetchers),errors:{[Oe.route.id]:Q.error}});return}P(!dt(Q),"Unhandled fetcher deferred data");let ie={state:"idle",data:Q.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};d.fetchers.set(g,ie),te({fetchers:new Map(d.fetchers)})}async function Be(g,b,R){var L;let{submission:D,replace:V,isFetchActionRedirect:I}=R===void 0?{}:R;b.revalidate&&(O=!0);let W=Xr(g.location,b.location,Z({_isRedirect:!0},I?{_isFetchActionRedirect:!0}:{}));if(P(W,"Expected a location on the redirect navigation"),ui&&typeof((L=window)==null?void 0:L.location)<"u"){let _e=t.history.createURL(b.location).origin;if(window.location.origin!==_e){V?window.location.replace(b.location):window.location.assign(b.location);return}}w=null;let q=V===!0?oe.Replace:oe.Push,{formMethod:ge,formAction:Q,formEncType:ie,formData:Oe}=g.navigation;!D&&ge&&Q&&Oe&&ie&&(D={formMethod:ge,formAction:Q,formEncType:ie,formData:Oe}),oo.has(b.status)&&D&&ze(D.formMethod)?await $e(q,W,{submission:Z({},D,{formAction:b.location}),preventScrollReset:v}):await $e(q,W,{overrideNavigation:{state:"loading",location:W,formMethod:D?D.formMethod:void 0,formAction:D?D.formAction:void 0,formEncType:D?D.formEncType:void 0,formData:D?D.formData:void 0},preventScrollReset:v})}async function Ft(g,b,R,L,D){let V=await Promise.all([...R.map(q=>Wt("loader",D,q,b,f.basename)),...L.map(q=>Wt("loader",Kt(t.history,q.path,D.signal),q.match,q.matches,f.basename))]),I=V.slice(0,R.length),W=V.slice(R.length);return await Promise.all([wi(g,R,I,D.signal,!1,d.loaderData),wi(g,L.map(q=>q.match),W,D.signal,!0)]),{results:V,loaderResults:I,fetcherResults:W}}function lt(){O=!0,k.push(...lr()),H.forEach((g,b)=>{E.has(b)&&(C.push(b),Nt(b))})}function or(g,b,R){let L=_t(d.matches,b);Mt(g),te({errors:{[L.route.id]:R},fetchers:new Map(d.fetchers)})}function Mt(g){E.has(g)&&Nt(g),H.delete(g),M.delete(g),j.delete(g),d.fetchers.delete(g)}function Nt(g){let b=E.get(g);P(b,"Expected fetch controller: "+g),b.abort(),E.delete(g)}function Ur(g){for(let b of g){let L={state:"idle",data:Vr(b).data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};d.fetchers.set(b,L)}}function At(){let g=[];for(let b of j){let R=d.fetchers.get(b);P(R,"Expected fetcher: "+b),R.state==="loading"&&(j.delete(b),g.push(b))}Ur(g)}function Rt(g){let b=[];for(let[R,L]of M)if(L<g){let D=d.fetchers.get(R);P(D,"Expected fetcher: "+R),D.state==="loading"&&(Nt(R),M.delete(R),b.push(R))}return Ur(b),b.length>0}function $r(g,b){let R=d.blockers.get(g)||li;return ue.get(g)!==b&&(ue.set(g,b),F==null?F=g:g!==F&&Ie(!1,"A router only supports one blocker at a time")),R}function ut(g){d.blockers.delete(g),ue.delete(g),F===g&&(F=null)}function Je(g,b){let R=d.blockers.get(g)||li;P(R.state==="unblocked"&&b.state==="blocked"||R.state==="blocked"&&b.state==="blocked"||R.state==="blocked"&&b.state==="proceeding"||R.state==="blocked"&&b.state==="unblocked"||R.state==="proceeding"&&b.state==="unblocked","Invalid blocker state transition: "+R.state+" -> "+b.state),d.blockers.set(g,b),te({blockers:new Map(d.blockers)})}function Br(g){let{currentLocation:b,nextLocation:R,historyAction:L}=g;if(F==null)return;let D=ue.get(F);P(D,"Could not find a function for the active blocker");let V=d.blockers.get(F);if(!(V&&V.state==="proceeding")&&D({currentLocation:b,nextLocation:R,historyAction:L}))return F}function lr(g){let b=[];return z.forEach((R,L)=>{(!g||g(L))&&(R.cancel(),b.push(L),z.delete(L))}),b}function ur(g,b,R){if(i=g,a=b,s=R||(L=>L.key),!l&&d.navigation===rn){l=!0;let L=Hr(d.location,d.matches);L!=null&&te({restoreScrollPosition:L})}return()=>{i=null,a=null,s=null}}function Un(g,b){if(i&&s&&a){let R=b.map(D=>Si(D,d.loaderData)),L=s(g,R)||g.key;i[L]=a()}}function Hr(g,b){if(i&&s&&a){let R=b.map(V=>Si(V,d.loaderData)),L=s(g,R)||g.key,D=i[L];if(typeof D=="number")return D}return null}return f={get basename(){return t.basename},get state(){return d},get routes(){return e},initialize:de,subscribe:je,enableScrollRestoration:ur,navigate:ne,fetch:Vn,revalidate:ot,createHref:g=>t.history.createHref(g),encodeLocation:g=>t.history.encodeLocation(g),getFetcher:Vr,deleteFetcher:Mt,dispose:be,getBlocker:$r,deleteBlocker:ut,_internalFetchControllers:E,_internalActiveDeferreds:z},f}function ho(t){return t!=null&&"formData"in t}function ci(t,e,r){r===void 0&&(r=!1);let n=typeof t=="string"?t:Ae(t);if(!e||!ho(e))return{path:n};if(e.formMethod&&!vo(e.formMethod))return{path:n,error:tt(405,{method:e.formMethod})};let i;if(e.formData&&(i={formMethod:e.formMethod||"get",formAction:bi(n),formEncType:e&&e.formEncType||"application/x-www-form-urlencoded",formData:e.formData},ze(i.formMethod)))return{path:n,submission:i};let s=qe(n),a=pi(e.formData);return r&&s.search&&Ei(s.search)&&a.append("index",""),s.search="?"+a,{path:Ae(s),submission:i}}function fo(t,e){let r=t;if(e){let n=t.findIndex(i=>i.route.id===e);n>=0&&(r=t.slice(0,n))}return r}function di(t,e,r,n,i,s,a,l,o,u,c){let f=u?Object.values(u)[0]:o?Object.values(o)[0]:void 0,d=t.createURL(e.location),m=t.createURL(i),v=s||d.toString()===m.toString()||d.search!==m.search,w=u?Object.keys(u)[0]:void 0,O=fo(r,w).filter((C,E)=>{if(C.route.loader==null)return!1;if(po(e.loaderData,e.matches[E],C)||a.some(M=>M===C.route.id))return!0;let N=e.matches[E],_=C;return fi(C,Z({currentUrl:d,currentParams:N.params,nextUrl:m,nextParams:_.params},n,{actionResult:f,defaultShouldRevalidate:v||hi(N,_)}))}),k=[];return c&&c.forEach((C,E)=>{if(r.some(N=>N.route.id===C.routeId))l.includes(E)?k.push(Z({key:E},C)):fi(C.match,Z({currentUrl:d,currentParams:e.matches[e.matches.length-1].params,nextUrl:m,nextParams:r[r.length-1].params},n,{actionResult:f,defaultShouldRevalidate:v}))&&k.push(Z({key:E},C));else return}),[O,k]}function po(t,e,r){let n=!e||r.route.id!==e.route.id,i=t[r.route.id]===void 0;return n||i}function hi(t,e){let r=t.route.path;return t.pathname!==e.pathname||r!=null&&r.endsWith("*")&&t.params["*"]!==e.params["*"]}function fi(t,e){if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate(e);if(typeof r=="boolean")return r}return e.defaultShouldRevalidate}async function Wt(t,e,r,n,i,s,a,l){i===void 0&&(i="/"),s===void 0&&(s=!1),a===void 0&&(a=!1);let o,u,c,f=new Promise((m,v)=>c=v),d=()=>c();e.signal.addEventListener("abort",d);try{let m=r.route[t];P(m,"Could not find the "+t+' to run on the "'+r.route.id+'" route'),u=await Promise.race([m({request:e,params:r.params,context:l}),f]),P(u!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(m){o=fe.error,u=m}finally{e.signal.removeEventListener("abort",d)}if(yo(u)){let m=u.status;if(ao.has(m)){let S=u.headers.get("Location");if(P(S,"Redirects returned/thrown from loaders/actions must have a Location header"),/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(S)){if(!s){let k=new URL(e.url),C=S.startsWith("//")?new URL(k.protocol+S):new URL(S);C.origin===k.origin&&(S=C.pathname+C.search+C.hash)}}else{let k=n.slice(0,n.indexOf(r)+1),C=fr(k).map(N=>N.pathnameBase),E=tn(S,C,new URL(e.url).pathname);if(P(Ae(E),"Unable to resolve redirect location: "+S),i){let N=E.pathname;E.pathname=N==="/"?i:Ve([i,N])}S=Ae(E)}if(s)throw u.headers.set("Location",S),u;return{type:fe.redirect,status:m,location:S,revalidate:u.headers.get("X-Remix-Revalidate")!==null}}if(a)throw{type:o||fe.data,response:u};let v,w=u.headers.get("Content-Type");return w&&/\bapplication\/json\b/.test(w)?v=await u.json():v=await u.text(),o===fe.error?{type:o,error:new si(m,u.statusText,v),headers:u.headers}:{type:fe.data,data:v,statusCode:u.status,headers:u.headers}}return o===fe.error?{type:o,error:u}:u instanceof eo?{type:fe.deferred,deferredData:u}:{type:fe.data,data:u}}function Kt(t,e,r,n){let i=t.createURL(bi(e)).toString(),s={signal:r};if(n&&ze(n.formMethod)){let{formMethod:a,formEncType:l,formData:o}=n;s.method=a.toUpperCase(),s.body=l==="application/x-www-form-urlencoded"?pi(o):o}return new Request(i,s)}function pi(t){let e=new URLSearchParams;for(let[r,n]of t.entries())e.append(r,n instanceof File?n.name:n);return e}function mo(t,e,r,n,i){let s={},a=null,l,o=!1,u={};return r.forEach((c,f)=>{let d=e[f].route.id;if(P(!Tt(c),"Cannot handle redirect results in processLoaderData"),Yt(c)){let m=_t(t,d),v=c.error;n&&(v=Object.values(n)[0],n=void 0),a=a||{},a[m.route.id]==null&&(a[m.route.id]=v),s[d]=void 0,o||(o=!0,l=ai(c.error)?c.error.status:500),c.headers&&(u[d]=c.headers)}else dt(c)?(i.set(d,c.deferredData),s[d]=c.deferredData.data):s[d]=c.data,c.statusCode!=null&&c.statusCode!==200&&!o&&(l=c.statusCode),c.headers&&(u[d]=c.headers)}),n&&(a=n,s[Object.keys(n)[0]]=void 0),{loaderData:s,errors:a,statusCode:l||200,loaderHeaders:u}}function mi(t,e,r,n,i,s,a,l){let{loaderData:o,errors:u}=mo(e,r,n,i,l);for(let c=0;c<s.length;c++){let{key:f,match:d}=s[c];P(a!==void 0&&a[c]!==void 0,"Did not find corresponding fetcher result");let m=a[c];if(Yt(m)){let v=_t(t.matches,d.route.id);u&&u[v.route.id]||(u=Z({},u,{[v.route.id]:m.error})),t.fetchers.delete(f)}else if(Tt(m))P(!1,"Unhandled fetcher revalidation redirect");else if(dt(m))P(!1,"Unhandled fetcher deferred data");else{let v={state:"idle",data:m.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};t.fetchers.set(f,v)}}return{loaderData:o,errors:u}}function gi(t,e,r,n){let i=Z({},e);for(let s of r){let a=s.route.id;if(e.hasOwnProperty(a)?e[a]!==void 0&&(i[a]=e[a]):t[a]!==void 0&&(i[a]=t[a]),n&&n.hasOwnProperty(a))break}return i}function _t(t,e){return(e?t.slice(0,t.findIndex(n=>n.route.id===e)+1):[...t]).reverse().find(n=>n.route.hasErrorBoundary===!0)||t[0]}function yi(t){let e=t.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function tt(t,e){let{pathname:r,routeId:n,method:i,type:s}=e===void 0?{}:e,a="Unknown Server Error",l="Unknown @remix-run/router error";return t===400?(a="Bad Request",i&&r&&n?l="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":s==="defer-action"&&(l="defer() is not supported in actions")):t===403?(a="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):t===404?(a="Not Found",l='No route matches URL "'+r+'"'):t===405&&(a="Method Not Allowed",i&&r&&n?l="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(l='Invalid request method "'+i.toUpperCase()+'"')),new si(t||500,a,new Error(l),!0)}function vi(t){for(let e=t.length-1;e>=0;e--){let r=t[e];if(Tt(r))return r}}function bi(t){let e=typeof t=="string"?qe(t):t;return Ae(Z({},e,{hash:""}))}function go(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash!==e.hash}function dt(t){return t.type===fe.deferred}function Yt(t){return t.type===fe.error}function Tt(t){return(t&&t.type)===fe.redirect}function yo(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function vo(t){return so.has(t)}function ze(t){return no.has(t)}async function wi(t,e,r,n,i,s){for(let a=0;a<r.length;a++){let l=r[a],o=e[a],u=t.find(f=>f.route.id===o.route.id),c=u!=null&&!hi(u,o)&&(s&&s[o.route.id])!==void 0;dt(l)&&(i||c)&&await Ci(l,n,i).then(f=>{f&&(r[a]=f||r[a])})}}async function Ci(t,e,r){if(r===void 0&&(r=!1),!await t.deferredData.resolveData(e)){if(r)try{return{type:fe.data,data:t.deferredData.unwrappedData}}catch(i){return{type:fe.error,error:i}}return{type:fe.data,data:t.deferredData.data}}}function Ei(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function Si(t,e){let{route:r,pathname:n,params:i}=t;return{id:r.id,pathname:n,params:i,data:e[r.id],handle:r.handle}}function Ri(t,e){let r=typeof e=="string"?qe(e).search:e.search;if(t[t.length-1].route.index&&Ei(r||""))return t[t.length-1];let n=fr(t);return n[n.length-1]}/**
70
70
  * React Router v6.8.0
71
71
  *
72
72
  * Copyright (c) Remix Software Inc.
@@ -75,9 +75,9 @@ Check the top-level render call using <`+k+">.")}return x}}function At(h,x){{if(
75
75
  * LICENSE.md file in the root directory of this source tree.
76
76
  *
77
77
  * @license MIT
78
- */function fr(){return fr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},fr.apply(this,arguments)}function go(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}const Si=typeof Object.is=="function"?Object.is:go,{useState:yo,useEffect:vo,useLayoutEffect:bo,useDebugValue:wo}=p;let xi=!1,Oi=!1;function Co(t,e,r){process.env.NODE_ENV!=="production"&&(xi||"startTransition"in p&&(xi=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.")));const n=e();if(process.env.NODE_ENV!=="production"&&!Oi){const a=e();Si(n,a)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Oi=!0)}const[{inst:i},s]=yo({inst:{value:n,getSnapshot:e}});return bo(()=>{i.value=n,i.getSnapshot=e,rn(i)&&s({inst:i})},[t,n,e]),vo(()=>(rn(i)&&s({inst:i}),t(()=>{rn(i)&&s({inst:i})})),[t]),wo(n),n}function rn(t){const e=t.getSnapshot,r=t.value;try{const n=e();return!Si(r,n)}catch{return!0}}function Eo(t,e,r){return e()}const Ro=!(typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u")?Eo:Co,So="useSyncExternalStore"in p?(t=>t.useSyncExternalStore)(p):Ro,Kt=p.createContext(null);process.env.NODE_ENV!=="production"&&(Kt.displayName="DataRouter");const Yt=p.createContext(null);process.env.NODE_ENV!=="production"&&(Yt.displayName="DataRouterState");const xo=p.createContext(null);process.env.NODE_ENV!=="production"&&(xo.displayName="Await");const ct=p.createContext(null);process.env.NODE_ENV!=="production"&&(ct.displayName="Navigation");const Gt=p.createContext(null);process.env.NODE_ENV!=="production"&&(Gt.displayName="Location");const Ie=p.createContext({outlet:null,matches:[]});process.env.NODE_ENV!=="production"&&(Ie.displayName="Route");const nn=p.createContext(null);process.env.NODE_ENV!=="production"&&(nn.displayName="RouteError");function Oo(t,e){let{relative:r}=e===void 0?{}:e;Zt()||(process.env.NODE_ENV!=="production"?j(!1,"useHref() may be used only in the context of a <Router> component."):j(!1));let{basename:n,navigator:i}=p.useContext(ct),{hash:s,pathname:a,search:o}=pr(t,{relative:r}),l=a;return n!=="/"&&(l=a==="/"?n:qe([n,a])),i.createHref({pathname:l,search:o,hash:s})}function Zt(){return p.useContext(Gt)!=null}function dt(){return Zt()||(process.env.NODE_ENV!=="production"?j(!1,"useLocation() may be used only in the context of a <Router> component."):j(!1)),p.useContext(Gt).location}function _i(){Zt()||(process.env.NODE_ENV!=="production"?j(!1,"useNavigate() may be used only in the context of a <Router> component."):j(!1));let{basename:t,navigator:e}=p.useContext(ct),{matches:r}=p.useContext(Ie),{pathname:n}=dt(),i=JSON.stringify(hr(r).map(o=>o.pathnameBase)),s=p.useRef(!1);return p.useEffect(()=>{s.current=!0}),p.useCallback(function(o,l){if(l===void 0&&(l={}),process.env.NODE_ENV!=="production"&&Ae(s.current,"You should call navigate() in a React.useEffect(), not when your component is first rendered."),!s.current)return;if(typeof o=="number"){e.go(o);return}let c=en(o,JSON.parse(i),n,l.relative==="path");t!=="/"&&(c.pathname=c.pathname==="/"?t:qe([t,c.pathname])),(l.replace?e.replace:e.push)(c,l.state,l)},[t,e,i,n])}const _o=p.createContext(null);function To(t){let e=p.useContext(Ie).outlet;return e&&p.createElement(_o.Provider,{value:t},e)}function ko(){let{matches:t}=p.useContext(Ie),e=t[t.length-1];return e?e.params:{}}function pr(t,e){let{relative:r}=e===void 0?{}:e,{matches:n}=p.useContext(Ie),{pathname:i}=dt(),s=JSON.stringify(hr(n).map(a=>a.pathnameBase));return p.useMemo(()=>en(t,JSON.parse(s),i,r==="path"),[t,s,i,r])}function Do(t,e){Zt()||(process.env.NODE_ENV!=="production"?j(!1,"useRoutes() may be used only in the context of a <Router> component."):j(!1));let{navigator:r}=p.useContext(ct),n=p.useContext(Yt),{matches:i}=p.useContext(Ie),s=i[i.length-1],a=s?s.params:{},o=s?s.pathname:"/",l=s?s.pathnameBase:"/",c=s&&s.route;if(process.env.NODE_ENV!=="production"){let _=c&&c.path||"";qo(o,!c||_.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+o+'" (under <Route path="'+_+'">) 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.
78
+ */function pr(){return pr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},pr.apply(this,arguments)}function bo(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}const xi=typeof Object.is=="function"?Object.is:bo,{useState:wo,useEffect:Co,useLayoutEffect:Eo,useDebugValue:So}=p;let Oi=!1,_i=!1;function Ro(t,e,r){process.env.NODE_ENV!=="production"&&(Oi||"startTransition"in p&&(Oi=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.")));const n=e();if(process.env.NODE_ENV!=="production"&&!_i){const a=e();xi(n,a)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),_i=!0)}const[{inst:i},s]=wo({inst:{value:n,getSnapshot:e}});return Eo(()=>{i.value=n,i.getSnapshot=e,nn(i)&&s({inst:i})},[t,n,e]),Co(()=>(nn(i)&&s({inst:i}),t(()=>{nn(i)&&s({inst:i})})),[t]),So(n),n}function nn(t){const e=t.getSnapshot,r=t.value;try{const n=e();return!xi(r,n)}catch{return!0}}function xo(t,e,r){return e()}const Oo=!(typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u")?xo:Ro,_o="useSyncExternalStore"in p?(t=>t.useSyncExternalStore)(p):Oo,Gt=p.createContext(null);process.env.NODE_ENV!=="production"&&(Gt.displayName="DataRouter");const Zt=p.createContext(null);process.env.NODE_ENV!=="production"&&(Zt.displayName="DataRouterState");const To=p.createContext(null);process.env.NODE_ENV!=="production"&&(To.displayName="Await");const ht=p.createContext(null);process.env.NODE_ENV!=="production"&&(ht.displayName="Navigation");const Jt=p.createContext(null);process.env.NODE_ENV!=="production"&&(Jt.displayName="Location");const Ue=p.createContext({outlet:null,matches:[]});process.env.NODE_ENV!=="production"&&(Ue.displayName="Route");const sn=p.createContext(null);process.env.NODE_ENV!=="production"&&(sn.displayName="RouteError");function ko(t,e){let{relative:r}=e===void 0?{}:e;Xt()||(process.env.NODE_ENV!=="production"?P(!1,"useHref() may be used only in the context of a <Router> component."):P(!1));let{basename:n,navigator:i}=p.useContext(ht),{hash:s,pathname:a,search:l}=mr(t,{relative:r}),o=a;return n!=="/"&&(o=a==="/"?n:Ve([n,a])),i.createHref({pathname:o,search:l,hash:s})}function Xt(){return p.useContext(Jt)!=null}function ft(){return Xt()||(process.env.NODE_ENV!=="production"?P(!1,"useLocation() may be used only in the context of a <Router> component."):P(!1)),p.useContext(Jt).location}function Ti(){Xt()||(process.env.NODE_ENV!=="production"?P(!1,"useNavigate() may be used only in the context of a <Router> component."):P(!1));let{basename:t,navigator:e}=p.useContext(ht),{matches:r}=p.useContext(Ue),{pathname:n}=ft(),i=JSON.stringify(fr(r).map(l=>l.pathnameBase)),s=p.useRef(!1);return p.useEffect(()=>{s.current=!0}),p.useCallback(function(l,o){if(o===void 0&&(o={}),process.env.NODE_ENV!=="production"&&Ie(s.current,"You should call navigate() in a React.useEffect(), not when your component is first rendered."),!s.current)return;if(typeof l=="number"){e.go(l);return}let u=tn(l,JSON.parse(i),n,o.relative==="path");t!=="/"&&(u.pathname=u.pathname==="/"?t:Ve([t,u.pathname])),(o.replace?e.replace:e.push)(u,o.state,o)},[t,e,i,n])}const Do=p.createContext(null);function Lo(t){let e=p.useContext(Ue).outlet;return e&&p.createElement(Do.Provider,{value:t},e)}function Po(){let{matches:t}=p.useContext(Ue),e=t[t.length-1];return e?e.params:{}}function mr(t,e){let{relative:r}=e===void 0?{}:e,{matches:n}=p.useContext(Ue),{pathname:i}=ft(),s=JSON.stringify(fr(n).map(a=>a.pathnameBase));return p.useMemo(()=>tn(t,JSON.parse(s),i,r==="path"),[t,s,i,r])}function jo(t,e){Xt()||(process.env.NODE_ENV!=="production"?P(!1,"useRoutes() may be used only in the context of a <Router> component."):P(!1));let{navigator:r}=p.useContext(ht),n=p.useContext(Zt),{matches:i}=p.useContext(Ue),s=i[i.length-1],a=s?s.params:{},l=s?s.pathname:"/",o=s?s.pathnameBase:"/",u=s&&s.route;if(process.env.NODE_ENV!=="production"){let O=u&&u.path||"";Uo(l,!u||O.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+l+'" (under <Route path="'+O+'">) 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.
79
79
 
80
- `+('Please change the parent <Route path="'+_+'"> to <Route ')+('path="'+(_==="/"?"*":_+"/*")+'">.'))}let d=dt(),f;if(e){var u;let _=typeof e=="string"?Ne(e):e;l==="/"||(u=_.pathname)!=null&&u.startsWith(l)||(process.env.NODE_ENV!=="production"?j(!1,"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 "'+l+'" ')+('but pathname "'+_.pathname+'" was given in the `location` prop.')):j(!1)),f=_}else f=d;let m=f.pathname||"/",b=l==="/"?m:m.slice(l.length)||"/",w=Ht(t,{pathname:b});process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&Ae(c||w!=null,'No routes matched location "'+f.pathname+f.search+f.hash+'" '),process.env.NODE_ENV!=="production"&&Ae(w==null||w[w.length-1].route.element!==void 0,'Matched leaf route at location "'+f.pathname+f.search+f.hash+'" does not have an element. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.'));let S=Mo(w&&w.map(_=>Object.assign({},_,{params:Object.assign({},a,_.params),pathname:qe([l,r.encodeLocation?r.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?l:qe([l,r.encodeLocation?r.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),i,n||void 0);return e&&S?p.createElement(Gt.Provider,{value:{location:fr({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:oe.Pop}},S):S}function Lo(){let t=Di(),e=si(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},s={padding:"2px 4px",backgroundColor:n},a=null;return process.env.NODE_ENV!=="production"&&(a=p.createElement(p.Fragment,null,p.createElement("p",null,"💿 Hey developer 👋"),p.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",p.createElement("code",{style:s},"errorElement")," props on ",p.createElement("code",{style:s},"<Route>")))),p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},e),r?p.createElement("pre",{style:i},r):null,a)}class Po extends p.Component{constructor(e){super(e),this.state={location:e.location,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location?{error:e.error,location:e.location}:{error:e.error||r.error,location:r.location}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error?p.createElement(Ie.Provider,{value:this.props.routeContext},p.createElement(nn.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Fo(t){let{routeContext:e,match:r,children:n}=t,i=p.useContext(Kt);return i&&i.static&&i.staticContext&&r.route.errorElement&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),p.createElement(Ie.Provider,{value:e},n)}function Mo(t,e,r){if(e===void 0&&(e=[]),t==null)if(r!=null&&r.errors)t=r.matches;else return null;let n=t,i=r==null?void 0:r.errors;if(i!=null){let s=n.findIndex(a=>a.route.id&&(i==null?void 0:i[a.route.id]));s>=0||(process.env.NODE_ENV!=="production"?j(!1,"Could not find a matching route for the current errors: "+i):j(!1)),n=n.slice(0,Math.min(n.length,s+1))}return n.reduceRight((s,a,o)=>{let l=a.route.id?i==null?void 0:i[a.route.id]:null,c=r?a.route.errorElement||p.createElement(Lo,null):null,d=e.concat(n.slice(0,o+1)),f=()=>p.createElement(Fo,{match:a,routeContext:{outlet:s,matches:d}},l?c:a.route.element!==void 0?a.route.element:s);return r&&(a.route.errorElement||o===0)?p.createElement(Po,{location:r.location,component:c,error:l,children:f(),routeContext:{outlet:null,matches:d}}):f()},null)}var Ti;(function(t){t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator"})(Ti||(Ti={}));var mr;(function(t){t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator"})(mr||(mr={}));function ki(t){return t+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function jo(t){let e=p.useContext(Yt);return e||(process.env.NODE_ENV!=="production"?j(!1,ki(t)):j(!1)),e}function No(t){let e=p.useContext(Ie);return e||(process.env.NODE_ENV!=="production"?j(!1,ki(t)):j(!1)),e}function Ao(t){let e=No(t),r=e.matches[e.matches.length-1];return r.route.id||(process.env.NODE_ENV!=="production"?j(!1,t+' can only be used on routes that contain a unique "id"'):j(!1)),r.route.id}function Di(){var t;let e=p.useContext(nn),r=jo(mr.UseRouteError),n=Ao(mr.UseRouteError);return e||((t=r.errors)==null?void 0:t[n])}const Li={};function qo(t,e,r){!e&&!Li[t]&&(Li[t]=!0,process.env.NODE_ENV!=="production"&&Ae(!1,r))}function Pi(t){let{fallbackElement:e,router:r}=t,n=So(r.subscribe,()=>r.state,()=>r.state),i=p.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:a=>r.navigate(a),push:(a,o,l)=>r.navigate(a,{state:o,preventScrollReset:l==null?void 0:l.preventScrollReset}),replace:(a,o,l)=>r.navigate(a,{replace:!0,state:o,preventScrollReset:l==null?void 0:l.preventScrollReset})}),[r]),s=r.basename||"/";return p.createElement(p.Fragment,null,p.createElement(Kt.Provider,{value:{router:r,navigator:i,static:!1,basename:s}},p.createElement(Yt.Provider,{value:n},p.createElement(Uo,{basename:r.basename,location:r.state.location,navigationType:r.state.historyAction,navigator:i},r.state.initialized?p.createElement($o,null):e))),null)}function Io(t){return To(t.context)}function Vo(t){process.env.NODE_ENV!=="production"?j(!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>."):j(!1)}function Uo(t){let{basename:e="/",children:r=null,location:n,navigationType:i=oe.Pop,navigator:s,static:a=!1}=t;Zt()&&(process.env.NODE_ENV!=="production"?j(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):j(!1));let o=e.replace(/^\/*/,"/"),l=p.useMemo(()=>({basename:o,navigator:s,static:a}),[o,s,a]);typeof n=="string"&&(n=Ne(n));let{pathname:c="/",search:d="",hash:f="",state:u=null,key:m="default"}=n,b=p.useMemo(()=>{let w=ri(c,o);return w==null?null:{pathname:w,search:d,hash:f,state:u,key:m}},[o,c,d,f,u,m]);return process.env.NODE_ENV!=="production"&&Ae(b!=null,'<Router basename="'+o+'"> is not able to match the URL '+('"'+c+d+f+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),b==null?null:p.createElement(ct.Provider,{value:l},p.createElement(Gt.Provider,{children:r,value:{location:b,navigationType:i}}))}function $o(t){let{children:e,location:r}=t,n=p.useContext(Kt),i=n&&!e?n.router.routes:sn(e);return Do(i,r)}var Fi;(function(t){t[t.pending=0]="pending",t[t.success=1]="success",t[t.error=2]="error"})(Fi||(Fi={})),new Promise(()=>{});function sn(t,e){e===void 0&&(e=[]);let r=[];return p.Children.forEach(t,(n,i)=>{if(!p.isValidElement(n))return;if(n.type===p.Fragment){r.push.apply(r,sn(n.props.children,e));return}n.type!==Vo&&(process.env.NODE_ENV!=="production"?j(!1,"["+(typeof n.type=="string"?n.type:n.type.name)+"] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>"):j(!1)),!n.props.index||!n.props.children||(process.env.NODE_ENV!=="production"?j(!1,"An index route cannot have child routes."):j(!1));let s=[...e,i],a={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,hasErrorBoundary:n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle};n.props.children&&(a.children=sn(n.props.children,s)),r.push(a)}),r}function Mi(t){return t.map(e=>{let r=fr({},e);return r.hasErrorBoundary==null&&(r.hasErrorBoundary=r.errorElement!=null),r.children&&(r.children=Mi(r.children)),r})}function ji(t,e){return oo({basename:e==null?void 0:e.basename,history:Ta({initialEntries:e==null?void 0:e.initialEntries,initialIndex:e==null?void 0:e.initialIndex}),hydrationData:e==null?void 0:e.hydrationData,routes:Mi(t)}).initialize()}/**
80
+ `+('Please change the parent <Route path="'+O+'"> to <Route ')+('path="'+(O==="/"?"*":O+"/*")+'">.'))}let c=ft(),f;if(e){var d;let O=typeof e=="string"?qe(e):e;o==="/"||(d=O.pathname)!=null&&d.startsWith(o)||(process.env.NODE_ENV!=="production"?P(!1,"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 "'+o+'" ')+('but pathname "'+O.pathname+'" was given in the `location` prop.')):P(!1)),f=O}else f=c;let m=f.pathname||"/",v=o==="/"?m:m.slice(o.length)||"/",w=zt(t,{pathname:v});process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&Ie(u||w!=null,'No routes matched location "'+f.pathname+f.search+f.hash+'" '),process.env.NODE_ENV!=="production"&&Ie(w==null||w[w.length-1].route.element!==void 0,'Matched leaf route at location "'+f.pathname+f.search+f.hash+'" does not have an element. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.'));let S=Ao(w&&w.map(O=>Object.assign({},O,{params:Object.assign({},a,O.params),pathname:Ve([o,r.encodeLocation?r.encodeLocation(O.pathname).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?o:Ve([o,r.encodeLocation?r.encodeLocation(O.pathnameBase).pathname:O.pathnameBase])})),i,n||void 0);return e&&S?p.createElement(Jt.Provider,{value:{location:pr({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:oe.Pop}},S):S}function Fo(){let t=Li(),e=ai(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},s={padding:"2px 4px",backgroundColor:n},a=null;return process.env.NODE_ENV!=="production"&&(a=p.createElement(p.Fragment,null,p.createElement("p",null,"💿 Hey developer 👋"),p.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",p.createElement("code",{style:s},"errorElement")," props on ",p.createElement("code",{style:s},"<Route>")))),p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},e),r?p.createElement("pre",{style:i},r):null,a)}class Mo extends p.Component{constructor(e){super(e),this.state={location:e.location,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location?{error:e.error,location:e.location}:{error:e.error||r.error,location:r.location}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error?p.createElement(Ue.Provider,{value:this.props.routeContext},p.createElement(sn.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function No(t){let{routeContext:e,match:r,children:n}=t,i=p.useContext(Gt);return i&&i.static&&i.staticContext&&r.route.errorElement&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),p.createElement(Ue.Provider,{value:e},n)}function Ao(t,e,r){if(e===void 0&&(e=[]),t==null)if(r!=null&&r.errors)t=r.matches;else return null;let n=t,i=r==null?void 0:r.errors;if(i!=null){let s=n.findIndex(a=>a.route.id&&(i==null?void 0:i[a.route.id]));s>=0||(process.env.NODE_ENV!=="production"?P(!1,"Could not find a matching route for the current errors: "+i):P(!1)),n=n.slice(0,Math.min(n.length,s+1))}return n.reduceRight((s,a,l)=>{let o=a.route.id?i==null?void 0:i[a.route.id]:null,u=r?a.route.errorElement||p.createElement(Fo,null):null,c=e.concat(n.slice(0,l+1)),f=()=>p.createElement(No,{match:a,routeContext:{outlet:s,matches:c}},o?u:a.route.element!==void 0?a.route.element:s);return r&&(a.route.errorElement||l===0)?p.createElement(Mo,{location:r.location,component:u,error:o,children:f(),routeContext:{outlet:null,matches:c}}):f()},null)}var ki;(function(t){t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator"})(ki||(ki={}));var gr;(function(t){t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator"})(gr||(gr={}));function Di(t){return t+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function qo(t){let e=p.useContext(Zt);return e||(process.env.NODE_ENV!=="production"?P(!1,Di(t)):P(!1)),e}function Io(t){let e=p.useContext(Ue);return e||(process.env.NODE_ENV!=="production"?P(!1,Di(t)):P(!1)),e}function Vo(t){let e=Io(t),r=e.matches[e.matches.length-1];return r.route.id||(process.env.NODE_ENV!=="production"?P(!1,t+' can only be used on routes that contain a unique "id"'):P(!1)),r.route.id}function Li(){var t;let e=p.useContext(sn),r=qo(gr.UseRouteError),n=Vo(gr.UseRouteError);return e||((t=r.errors)==null?void 0:t[n])}const Pi={};function Uo(t,e,r){!e&&!Pi[t]&&(Pi[t]=!0,process.env.NODE_ENV!=="production"&&Ie(!1,r))}function ji(t){let{fallbackElement:e,router:r}=t,n=_o(r.subscribe,()=>r.state,()=>r.state),i=p.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:a=>r.navigate(a),push:(a,l,o)=>r.navigate(a,{state:l,preventScrollReset:o==null?void 0:o.preventScrollReset}),replace:(a,l,o)=>r.navigate(a,{replace:!0,state:l,preventScrollReset:o==null?void 0:o.preventScrollReset})}),[r]),s=r.basename||"/";return p.createElement(p.Fragment,null,p.createElement(Gt.Provider,{value:{router:r,navigator:i,static:!1,basename:s}},p.createElement(Zt.Provider,{value:n},p.createElement(Ho,{basename:r.basename,location:r.state.location,navigationType:r.state.historyAction,navigator:i},r.state.initialized?p.createElement(Qo,null):e))),null)}function $o(t){return Lo(t.context)}function Bo(t){process.env.NODE_ENV!=="production"?P(!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>."):P(!1)}function Ho(t){let{basename:e="/",children:r=null,location:n,navigationType:i=oe.Pop,navigator:s,static:a=!1}=t;Xt()&&(process.env.NODE_ENV!=="production"?P(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):P(!1));let l=e.replace(/^\/*/,"/"),o=p.useMemo(()=>({basename:l,navigator:s,static:a}),[l,s,a]);typeof n=="string"&&(n=qe(n));let{pathname:u="/",search:c="",hash:f="",state:d=null,key:m="default"}=n,v=p.useMemo(()=>{let w=ni(u,l);return w==null?null:{pathname:w,search:c,hash:f,state:d,key:m}},[l,u,c,f,d,m]);return process.env.NODE_ENV!=="production"&&Ie(v!=null,'<Router basename="'+l+'"> is not able to match the URL '+('"'+u+c+f+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),v==null?null:p.createElement(ht.Provider,{value:o},p.createElement(Jt.Provider,{children:r,value:{location:v,navigationType:i}}))}function Qo(t){let{children:e,location:r}=t,n=p.useContext(Gt),i=n&&!e?n.router.routes:an(e);return jo(i,r)}var Fi;(function(t){t[t.pending=0]="pending",t[t.success=1]="success",t[t.error=2]="error"})(Fi||(Fi={})),new Promise(()=>{});function an(t,e){e===void 0&&(e=[]);let r=[];return p.Children.forEach(t,(n,i)=>{if(!p.isValidElement(n))return;if(n.type===p.Fragment){r.push.apply(r,an(n.props.children,e));return}n.type!==Bo&&(process.env.NODE_ENV!=="production"?P(!1,"["+(typeof n.type=="string"?n.type:n.type.name)+"] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>"):P(!1)),!n.props.index||!n.props.children||(process.env.NODE_ENV!=="production"?P(!1,"An index route cannot have child routes."):P(!1));let s=[...e,i],a={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,hasErrorBoundary:n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle};n.props.children&&(a.children=an(n.props.children,s)),r.push(a)}),r}function Mi(t){return t.map(e=>{let r=pr({},e);return r.hasErrorBoundary==null&&(r.hasErrorBoundary=r.errorElement!=null),r.children&&(r.children=Mi(r.children)),r})}function Ni(t,e){return co({basename:e==null?void 0:e.basename,history:La({initialEntries:e==null?void 0:e.initialEntries,initialIndex:e==null?void 0:e.initialIndex}),hydrationData:e==null?void 0:e.hydrationData,routes:Mi(t)}).initialize()}/**
81
81
  * React Router DOM v6.8.0
82
82
  *
83
83
  * Copyright (c) Remix Software Inc.
@@ -86,13 +86,13 @@ Check the top-level render call using <`+k+">.")}return x}}function At(h,x){{if(
86
86
  * LICENSE.md file in the root directory of this source tree.
87
87
  *
88
88
  * @license MIT
89
- */function ht(){return ht=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ht.apply(this,arguments)}function an(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}const gr="get",on="application/x-www-form-urlencoded";function yr(t){return t!=null&&typeof t.tagName=="string"}function Bo(t){return yr(t)&&t.tagName.toLowerCase()==="button"}function Ho(t){return yr(t)&&t.tagName.toLowerCase()==="form"}function Qo(t){return yr(t)&&t.tagName.toLowerCase()==="input"}function zo(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Wo(t,e){return t.button===0&&(!e||e==="_self")&&!zo(t)}function Ko(t,e,r){let n,i,s,a;if(Ho(t)){let d=r.submissionTrigger;n=r.method||t.getAttribute("method")||gr,i=r.action||t.getAttribute("action")||e,s=r.encType||t.getAttribute("enctype")||on,a=new FormData(t),d&&d.name&&a.append(d.name,d.value)}else if(Bo(t)||Qo(t)&&(t.type==="submit"||t.type==="image")){let d=t.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');n=r.method||t.getAttribute("formmethod")||d.getAttribute("method")||gr,i=r.action||t.getAttribute("formaction")||d.getAttribute("action")||e,s=r.encType||t.getAttribute("formenctype")||d.getAttribute("enctype")||on,a=new FormData(d),t.name&&a.append(t.name,t.value)}else{if(yr(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');if(n=r.method||gr,i=r.action||e,s=r.encType||on,t instanceof FormData)a=t;else if(a=new FormData,t instanceof URLSearchParams)for(let[d,f]of t)a.append(d,f);else if(t!=null)for(let d of Object.keys(t))a.append(d,t[d])}let{protocol:o,host:l}=window.location;return{url:new URL(i,o+"//"+l),method:n.toLowerCase(),encType:s,formData:a}}const Yo=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],Go=["aria-current","caseSensitive","className","end","style","to","children"],Zo=["reloadDocument","replace","method","action","onSubmit","fetcherKey","routeId","relative","preventScrollReset"];process.env.NODE_ENV;const Jo=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",vr=p.forwardRef(function(e,r){let{onClick:n,relative:i,reloadDocument:s,replace:a,state:o,target:l,to:c,preventScrollReset:d}=e,f=an(e,Yo),u=typeof c=="string"?c:je(c),m=/^[a-z+]+:\/\//i.test(u)||u.startsWith("//"),b=u,w=!1;if(Jo&&m){let C=new URL(window.location.href),E=u.startsWith("//")?new URL(C.protocol+u):new URL(u);E.origin===C.origin?b=E.pathname+E.search+E.hash:w=!0}let S=Oo(b,{relative:i}),_=nl(b,{replace:a,state:o,target:l,preventScrollReset:d,relative:i});function D(C){n&&n(C),C.defaultPrevented||_(C)}return p.createElement("a",ht({},f,{href:m?u:S,onClick:w||s?n:D,ref:r,target:l}))});process.env.NODE_ENV!=="production"&&(vr.displayName="Link");const Xo=p.forwardRef(function(e,r){let{"aria-current":n="page",caseSensitive:i=!1,className:s="",end:a=!1,style:o,to:l,children:c}=e,d=an(e,Go),f=pr(l,{relative:d.relative}),u=dt(),m=p.useContext(Yt),{navigator:b}=p.useContext(ct),w=b.encodeLocation?b.encodeLocation(f).pathname:f.pathname,S=u.pathname,_=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(S=S.toLowerCase(),_=_?_.toLowerCase():null,w=w.toLowerCase());let D=S===w||!a&&S.startsWith(w)&&S.charAt(w.length)==="/",C=_!=null&&(_===w||!a&&_.startsWith(w)&&_.charAt(w.length)==="/"),E=D?n:void 0,F;typeof s=="function"?F=s({isActive:D,isPending:C}):F=[s,D?"active":null,C?"pending":null].filter(Boolean).join(" ");let O=typeof o=="function"?o({isActive:D,isPending:C}):o;return p.createElement(vr,ht({},d,{"aria-current":E,className:F,ref:r,style:O,to:l}),typeof c=="function"?c({isActive:D,isPending:C}):c)});process.env.NODE_ENV!=="production"&&(Xo.displayName="NavLink");const el=p.forwardRef((t,e)=>p.createElement(Ni,ht({},t,{ref:e})));process.env.NODE_ENV!=="production"&&(el.displayName="Form");const Ni=p.forwardRef((t,e)=>{let{reloadDocument:r,replace:n,method:i=gr,action:s,onSubmit:a,fetcherKey:o,routeId:l,relative:c,preventScrollReset:d}=t,f=an(t,Zo),u=il(o,l),m=i.toLowerCase()==="get"?"get":"post",b=qi(s,{relative:c}),w=S=>{if(a&&a(S),S.defaultPrevented)return;S.preventDefault();let _=S.nativeEvent.submitter,D=(_==null?void 0:_.getAttribute("formmethod"))||i;u(_||S.currentTarget,{method:D,replace:n,relative:c,preventScrollReset:d})};return p.createElement("form",ht({ref:e,method:m,action:b,onSubmit:r?a:w},f))});process.env.NODE_ENV!=="production"&&(Ni.displayName="FormImpl"),process.env.NODE_ENV;var ln;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmitImpl="useSubmitImpl",t.UseFetcher="useFetcher"})(ln||(ln={}));var Ai;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Ai||(Ai={}));function tl(t){return t+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function rl(t){let e=p.useContext(Kt);return e||(process.env.NODE_ENV!=="production"?j(!1,tl(t)):j(!1)),e}function nl(t,e){let{target:r,replace:n,state:i,preventScrollReset:s,relative:a}=e===void 0?{}:e,o=_i(),l=dt(),c=pr(t,{relative:a});return p.useCallback(d=>{if(Wo(d,r)){d.preventDefault();let f=n!==void 0?n:je(l)===je(c);o(t,{replace:f,state:i,preventScrollReset:s,relative:a})}},[l,o,c,n,i,r,t,s,a])}function il(t,e){let{router:r}=rl(ln.UseSubmitImpl),n=qi();return p.useCallback(function(i,s){if(s===void 0&&(s={}),typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");let{method:a,encType:o,formData:l,url:c}=Ko(i,n,s),d=c.pathname+c.search,f={replace:s.replace,preventScrollReset:s.preventScrollReset,formData:l,formMethod:a,formEncType:o};t?(e==null&&(process.env.NODE_ENV!=="production"?j(!1,"No routeId available for useFetcher()"):j(!1)),r.fetch(t,e,d,f)):r.navigate(d,f)},[n,r,t,e])}function qi(t,e){let{relative:r}=e===void 0?{}:e,{basename:n}=p.useContext(ct),i=p.useContext(Ie);i||(process.env.NODE_ENV!=="production"?j(!1,"useFormAction must be used inside a RouteContext"):j(!1));let[s]=i.matches.slice(-1),a=ht({},pr(t||".",{relative:r})),o=dt();if(t==null&&(a.search=o.search,a.hash=o.hash,s.route.index)){let l=new URLSearchParams(a.search);l.delete("index"),a.search=l.toString()?"?"+l.toString():""}return(!t||t===".")&&s.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:qe([n,a.pathname])),je(a)}function sl(){const{actions:t,showActions:e,setShowActions:r,navigateTo:n}=N.useContext(et),i=N.useRef();return N.useEffect(()=>{const s=a=>{a.metaKey&&a.key==="Enter"&&(a.preventDefault(),a.stopPropagation(),t.length>0&&r(o=>!o)),e&&a.key!=="ArrowUp"&&a.key!=="ArrowDown"&&a.key!=="Enter"&&r(!1),e&&a.key==="ArrowDown"&&a.target.className==="qikbar-action"&&a.target.nextElementSibling&&a.target.nextElementSibling.focus(),e&&a.key==="ArrowUp"&&a.target.className==="qikbar-action"&&a.target.previousElementSibling&&a.target.previousElementSibling.focus()};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}},[e,t]),N.useEffect(()=>{var s,a;e&&((a=(s=i==null?void 0:i.current)==null?void 0:s.firstChild)==null||a.focus())},[e]),y.jsxs("div",{className:"qikbar-command-footer",children:[y.jsx("div",{className:"qikbar-logo",children:y.jsx("a",{href:"https://www.qikbar.com",target:"_blank",rel:"noopener noreferrer",children:y.jsxs("svg",{width:"89",height:"30",viewBox:"0 0 89 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("path",{d:"M36.9964 16.0795H39.1271L40.0327 17.2354L41.2205 18.5991L43.0476 20.8523H40.6612L39.3828 19.3235L38.6264 18.2369L36.9964 16.0795ZM43.1222 14.5455C43.1222 15.7457 42.8913 16.7631 42.4297 17.5977C41.968 18.4322 41.343 19.0661 40.5547 19.4993C39.7699 19.9325 38.8892 20.1491 37.9126 20.1491C36.9325 20.1491 36.0501 19.9308 35.2653 19.494C34.4805 19.0572 33.8572 18.4233 33.3956 17.5923C32.9375 16.7578 32.7085 15.7422 32.7085 14.5455C32.7085 13.3452 32.9375 12.3278 33.3956 11.4933C33.8572 10.6587 34.4805 10.0249 35.2653 9.59162C36.0501 9.15838 36.9325 8.94176 37.9126 8.94176C38.8892 8.94176 39.7699 9.15838 40.5547 9.59162C41.343 10.0249 41.968 10.6587 42.4297 11.4933C42.8913 12.3278 43.1222 13.3452 43.1222 14.5455ZM40.4268 14.5455C40.4268 13.8352 40.3256 13.2351 40.1232 12.745C39.9244 12.255 39.6367 11.8839 39.2603 11.6317C38.8874 11.3796 38.4382 11.2536 37.9126 11.2536C37.3906 11.2536 36.9414 11.3796 36.565 11.6317C36.1886 11.8839 35.8991 12.255 35.6967 12.745C35.4979 13.2351 35.3984 13.8352 35.3984 14.5455C35.3984 15.2557 35.4979 15.8558 35.6967 16.3459C35.8991 16.8359 36.1886 17.207 36.565 17.4592C36.9414 17.7113 37.3906 17.8374 37.9126 17.8374C38.4382 17.8374 38.8874 17.7113 39.2603 17.4592C39.6367 17.207 39.9244 16.8359 40.1232 16.3459C40.3256 15.8558 40.4268 15.2557 40.4268 14.5455ZM44.6762 20V11.8182H47.281V20H44.6762ZM45.9813 10.8647C45.6155 10.8647 45.3012 10.744 45.0384 10.5025C44.7757 10.2575 44.6443 9.96271 44.6443 9.61825C44.6443 9.27734 44.7757 8.98615 45.0384 8.74467C45.3012 8.49964 45.6155 8.37713 45.9813 8.37713C46.3506 8.37713 46.6649 8.49964 46.9241 8.74467C47.1869 8.98615 47.3183 9.27734 47.3183 9.61825C47.3183 9.96271 47.1869 10.2575 46.9241 10.5025C46.6649 10.744 46.3506 10.8647 45.9813 10.8647ZM51.288 17.8533L51.2987 14.7479H51.6609L53.962 11.8182H56.913L53.4933 16.0156H52.8061L51.288 17.8533ZM48.9389 20V9.09091H51.5437V20H48.9389ZM54.0206 20L51.8793 16.6016L53.5945 14.7532L57.0302 20H54.0206Z",className:"qikbar-logo-secondary"}),y.jsx("path",{d:"M57.8452 20V9.09091H60.4499V13.2191H60.5032C60.6097 12.9705 60.7607 12.7308 60.956 12.5C61.1548 12.2692 61.407 12.081 61.7124 11.9354C62.0213 11.7862 62.3906 11.7116 62.8203 11.7116C63.3885 11.7116 63.9194 11.8608 64.413 12.1591C64.9102 12.4574 65.3114 12.9173 65.6168 13.5387C65.9222 14.1602 66.0749 14.9521 66.0749 15.9144C66.0749 16.8413 65.9276 17.6172 65.6328 18.2422C65.3416 18.8672 64.9474 19.3359 64.4503 19.6484C63.9567 19.9609 63.408 20.1172 62.8043 20.1172C62.3924 20.1172 62.0355 20.0497 61.7337 19.9148C61.4318 19.7798 61.1779 19.6023 60.9719 19.3821C60.7695 19.1619 60.6133 18.9258 60.5032 18.6737H60.4233V20H57.8452ZM60.3967 15.9091C60.3967 16.3494 60.4553 16.733 60.5724 17.0597C60.6932 17.3864 60.8654 17.6403 61.0891 17.8214C61.3164 17.9989 61.5881 18.0877 61.9041 18.0877C62.2237 18.0877 62.4954 17.9989 62.7191 17.8214C62.9428 17.6403 63.1115 17.3864 63.2251 17.0597C63.3423 16.733 63.4009 16.3494 63.4009 15.9091C63.4009 15.4687 63.3423 15.087 63.2251 14.7638C63.1115 14.4407 62.9428 14.1903 62.7191 14.0128C62.4989 13.8352 62.2273 13.7464 61.9041 13.7464C61.5845 13.7464 61.3129 13.8335 61.0891 14.0075C60.8654 14.1815 60.6932 14.43 60.5724 14.7532C60.4553 15.0763 60.3967 15.4616 60.3967 15.9091ZM69.7464 20.1385C69.2243 20.1385 68.7609 20.0515 68.3561 19.8775C67.9548 19.6999 67.637 19.4336 67.4026 19.0785C67.1718 18.7198 67.0564 18.2706 67.0564 17.7308C67.0564 17.2763 67.1363 16.8928 67.2961 16.5803C67.4559 16.2678 67.676 16.0138 67.9566 15.8185C68.2371 15.6232 68.5603 15.4759 68.926 15.3764C69.2918 15.2734 69.6824 15.2042 70.0979 15.1687C70.5631 15.1261 70.9378 15.0817 71.2219 15.0355C71.5059 14.9858 71.7119 14.9165 71.8398 14.8278C71.9711 14.7354 72.0368 14.6058 72.0368 14.4389V14.4123C72.0368 14.1388 71.9427 13.9276 71.7545 13.7784C71.5663 13.6293 71.3124 13.5547 70.9928 13.5547C70.6483 13.5547 70.3714 13.6293 70.1618 13.7784C69.9523 13.9276 69.8192 14.1335 69.7623 14.3963L67.36 14.3111C67.431 13.8139 67.6139 13.37 67.9086 12.9794C68.2069 12.5852 68.6153 12.2763 69.1338 12.0526C69.6558 11.8253 70.2826 11.7116 71.0141 11.7116C71.5361 11.7116 72.0173 11.7738 72.4577 11.8981C72.898 12.0188 73.2815 12.1964 73.6082 12.4308C73.9349 12.6616 74.1871 12.9457 74.3646 13.283C74.5457 13.6204 74.6363 14.0057 74.6363 14.4389V20H72.186V18.8601H72.1221C71.9765 19.1371 71.79 19.3714 71.5628 19.5632C71.339 19.755 71.0745 19.8988 70.7691 19.9947C70.4672 20.0906 70.1263 20.1385 69.7464 20.1385ZM70.5507 18.4339C70.8312 18.4339 71.0834 18.3771 71.3071 18.2635C71.5344 18.1499 71.7155 17.9936 71.8504 17.7947C71.9854 17.5923 72.0528 17.358 72.0528 17.0916V16.3139C71.9782 16.353 71.8877 16.3885 71.7812 16.4205C71.6782 16.4524 71.5645 16.4826 71.4403 16.511C71.316 16.5394 71.1881 16.5643 71.0567 16.5856C70.9253 16.6069 70.7993 16.6264 70.6785 16.6442C70.4335 16.6832 70.224 16.7436 70.05 16.8253C69.8795 16.907 69.7481 17.0135 69.6558 17.1449C69.567 17.2727 69.5226 17.4254 69.5226 17.603C69.5226 17.8729 69.6185 18.0788 69.8103 18.2209C70.0056 18.3629 70.2524 18.4339 70.5507 18.4339ZM76.229 20V11.8182H78.7591V13.3097H78.8444C78.9935 12.7699 79.2368 12.3686 79.5741 12.1058C79.9115 11.8395 80.3039 11.7063 80.7513 11.7063C80.8721 11.7063 80.9964 11.7152 81.1242 11.733C81.252 11.7472 81.371 11.7702 81.4811 11.8022V14.0661C81.3568 14.0234 81.1934 13.9897 80.991 13.9648C80.7922 13.94 80.6146 13.9276 80.4584 13.9276C80.1494 13.9276 79.8706 13.9968 79.6221 14.1353C79.377 14.2702 79.1835 14.4602 79.0415 14.7053C78.903 14.9467 78.8337 15.2308 78.8337 15.5575V20H76.229Z",className:"qikbar-logo-primary-fill"}),y.jsx("path",{d:"M19.75 18.75L17.261 16.261M17.261 16.261C17.5744 15.9476 17.823 15.5755 17.9926 15.1661C18.1622 14.7566 18.2495 14.3177 18.2495 13.8745C18.2495 13.4313 18.1622 12.9924 17.9926 12.5829C17.823 12.1735 17.5744 11.8014 17.261 11.488C16.9476 11.1746 16.5755 10.926 16.1661 10.7564C15.7566 10.5868 15.3177 10.4995 14.8745 10.4995C14.4313 10.4995 13.9924 10.5868 13.5829 10.7564C13.1735 10.926 12.8014 11.1746 12.488 11.488C11.8549 12.1211 11.4993 12.9797 11.4993 13.875C11.4993 14.7703 11.8549 15.6289 12.488 16.262C13.1211 16.8951 13.9797 17.2507 14.875 17.2507C15.7703 17.2507 16.6289 16.8951 17.262 16.262L17.261 16.261ZM25 15C25 16.1819 24.7672 17.3522 24.3149 18.4442C23.8626 19.5361 23.1997 20.5282 22.364 21.364C21.5282 22.1997 20.5361 22.8626 19.4442 23.3149C18.3522 23.7672 17.1819 24 16 24C14.8181 24 13.6478 23.7672 12.5558 23.3149C11.4639 22.8626 10.4718 22.1997 9.63604 21.364C8.80031 20.5282 8.13738 19.5361 7.68508 18.4442C7.23279 17.3522 7 16.1819 7 15C7 12.6131 7.94821 10.3239 9.63604 8.63604C11.3239 6.94821 13.6131 6 16 6C18.3869 6 20.6761 6.94821 22.364 8.63604C24.0518 10.3239 25 12.6131 25 15Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"qikbar-logo-primary-stroke"})]})})}),t.length>0&&y.jsxs("div",{className:"qikbar-actions-wrapper",children:[e&&y.jsx("div",{className:"qikbar-actions-panel",children:y.jsx("ul",{className:"qikbar-actions-list",ref:i,children:t.filter(s=>!s.disabled).map(s=>y.jsx("button",{onClick:()=>n(s.click.href,s.click.title,s.click.target),className:"qikbar-action",children:s.title},s.id))})}),y.jsxs("button",{onClick:()=>r(s=>!s),className:"qikbar-actions",children:[y.jsx("span",{className:"qikbar-actions-action",children:"Actions"}),y.jsxs("span",{className:"qikbar-keys",children:[y.jsx("kbd",{className:"qikbar-kbd",children:"Cmd"})," +"," ",y.jsx("kbd",{className:"qikbar-kbd",children:"Enter"})]})]})]})]})}function al(){const{search:t,setSearch:e,searchRef:r,placeholder:n}=N.useContext(et);return y.jsx("input",{"data-testid":"qikbar-search",placeholder:n,className:"qikbar-search",ref:r,autoFocus:!0,value:t,onChange:i=>e(i.target.value),name:"search",type:"text"})}function ol({crumbs:t}){const{setCrumbs:e}=N.useContext(et);return t.length===0?null:y.jsx("ul",{className:"qikbar-crumbs",children:t.map((r,n)=>{const i=t.length-1===n;return y.jsx("li",{className:"qikbar-crumb",children:y.jsxs(vr,{to:r.to,onClick:()=>e(s=>i?s:s.slice(0,n+1)),children:[r.title," ",!i&&y.jsx("span",{className:"qikbar-crumb-divider",children:">"})]})},n)})})}const et=N.createContext(null);function Ii({demo:t=!1,wrapperClass:e="qikbar-command-wrapper",defaultOpen:r=!1}){const n=N.useRef(null),i=dt(),s=_i(),[a,o]=N.useState([]),[l,c]=N.useState([]),[d,f]=N.useState(!1),[u,m]=N.useState(r),[b,w]=N.useState(""),[S,_]=N.useState("Search for resources"),D=N.useRef(),[C,E]=N.useState(0),F=Se();return N.useEffect(()=>{var O;u&&((O=D.current)==null||O.focus(),E(0),document.body.style.overflow="hidden"),u||(s(""),f(!1),o([]),c([]),document.body.style.overflow="unset")},[u,i.pathname]),N.useEffect(()=>{const O=T=>{var P,B,Z,J,de,se,ve;if(u&&["Space","ArrowUp","ArrowDown"].indexOf(T.key)>-1&&T.preventDefault(),T.metaKey&&T.key==="Enter"){T.preventDefault(),T.stopPropagation();return}if(u&&T.key==="ArrowDown"&&T.target.localName==="input"&&((P=n.current)!=null&&P.getElementsByClassName("qikbar-item")[1])&&(E(1),n.current.getElementsByClassName("qikbar-item")[1].focus()),u&&T.target.localName==="input"&&b===""&&T.key==="Backspace"&&(s(-1),c(G=>G.slice(0,-1))),u&&T.key==="Escape"&&!t&&(w(""),s(""),m(!1),o([])),u&&T.key==="Enter"&&T.target.localName==="input"&&((B=n.current)!=null&&B.getElementsByClassName("qikbar-item")[0])&&(n.current.getElementsByClassName("qikbar-item")[0].click(),w("")),u&&T.key==="ArrowDown"&&T.target.getAttribute("data-testid")==="qikbar-item"&&T.target.nextElementSibling){let G;T.target.nextElementSibling.className==="qikbar-category-wrapper"?G=T.target.nextElementSibling.nextElementSibling:G=T.target.nextElementSibling;const Te=Array.prototype.indexOf.call((J=(Z=T.target)==null?void 0:Z.parentNode)==null?void 0:J.getElementsByClassName("qikbar-item"),G);E(Te),G==null||G.focus()}if(u&&T.key==="ArrowUp"&&T.target.getAttribute("data-testid")==="qikbar-item"&&T.target.previousElementSibling){let G;if(T.target.previousElementSibling.className==="qikbar-category-wrapper"?G=T.target.previousElementSibling.previousElementSibling:G=T.target.previousElementSibling,!G)return;const Te=Array.prototype.indexOf.call((se=(de=T.target)==null?void 0:de.parentNode)==null?void 0:se.getElementsByClassName("qikbar-item"),G);E(Te),G==null||G.focus()}u&&T.key!=="ArrowUp"&&T.key!=="ArrowDown"&&T.key!=="Enter"&&!T.metaKey&&(E(0),(ve=D.current)==null||ve.focus()),T.metaKey&&T.key==="k"&&!t&&(u&&(s(""),w(""),E(0),o([]),c([])),m(G=>!G)),u&&T.key==="Enter"&&w("")};return document.addEventListener("keydown",O),()=>{document.removeEventListener("keydown",O)}},[u,b]),u?y.jsx("div",{className:e,"data-testid":"command-bar-container",children:y.jsx(et.Provider,{value:{demo:t,search:b,searchRef:D,setIsOpen:m,setSearch:w,activeIndex:C,placeholder:S,setPlaceholder:_,setActions:o,setCrumbs:c,crumbs:l,actions:a,showActions:d,setShowActions:f,navigateTo:(O,T,P="self")=>{var B,Z;switch(f(!1),w(""),P){case"self":E(0),s(O),(B=D.current)==null||B.focus(),O!==(i==null?void 0:i.pathname)&&o([]),n.current.getElementsByClassName("qikbar-list")[0].scrollTo(0,0),c(J=>[...J,{title:T,to:O}]);break;case"internal":s(""),m(!1),c([]),o([]),F!=null&&F.router?(Z=F==null?void 0:F.router)==null||Z.call(F,O):window.location=O;break;case"external":s(""),m(!1),c([]),o([]),window.open(O,"_blank");break;default:s(O),c(J=>[...J,{title:T,to:O}])}}},children:y.jsxs("div",{className:"qikbar-command-bar",ref:n,children:[y.jsxs("div",{className:"qikbar-search-wrapper",children:[y.jsx(ol,{crumbs:l}),y.jsx(al,{})]}),y.jsx("div",{className:"qikbar-command-content",children:y.jsx(Io,{})}),y.jsx(sl,{})]})})}):null}function ll({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0M3.124 7.5A8.969 8.969 0 015.292 3m13.416 0a8.969 8.969 0 012.168 4.5"}))}const ul=p.forwardRef(ll);function cl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5m-9-6h.008v.008H12v-.008zM12 15h.008v.008H12V15zm0 2.25h.008v.008H12v-.008zM9.75 15h.008v.008H9.75V15zm0 2.25h.008v.008H9.75v-.008zM7.5 15h.008v.008H7.5V15zm0 2.25h.008v.008H7.5v-.008zm6.75-4.5h.008v.008h-.008v-.008zm0 2.25h.008v.008h-.008V15zm0 2.25h.008v.008h-.008v-.008zm2.25-4.5h.008v.008H16.5v-.008zm0 2.25h.008v.008H16.5V15z"}))}const dl=p.forwardRef(cl);function hl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"}))}const fl=p.forwardRef(hl);function pl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.362 5.214A8.252 8.252 0 0112 21 8.25 8.25 0 016.038 7.048 8.287 8.287 0 009 9.6a8.983 8.983 0 013.361-6.867 8.21 8.21 0 003 2.48z"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18a3.75 3.75 0 00.495-7.467 5.99 5.99 0 00-1.925 3.546 5.974 5.974 0 01-2.133-1A3.75 3.75 0 0012 18z"}))}const ml=p.forwardRef(pl);function gl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"}))}const yl=p.forwardRef(gl);function vl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"}))}const bl=p.forwardRef(vl);function wl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.34 15.84c-.688-.06-1.386-.09-2.09-.09H7.5a4.5 4.5 0 110-9h.75c.704 0 1.402-.03 2.09-.09m0 9.18c.253.962.584 1.892.985 2.783.247.55.06 1.21-.463 1.511l-.657.38c-.551.318-1.26.117-1.527-.461a20.845 20.845 0 01-1.44-4.282m3.102.069a18.03 18.03 0 01-.59-4.59c0-1.586.205-3.124.59-4.59m0 9.18a23.848 23.848 0 018.835 2.535M10.34 6.66a23.847 23.847 0 008.835-2.535m0 0A23.74 23.74 0 0018.795 3m.38 1.125a23.91 23.91 0 011.014 5.395m-1.014 8.855c-.118.38-.245.754-.38 1.125m.38-1.125a23.91 23.91 0 001.014-5.395m0-3.46c.495.413.811 1.035.811 1.73 0 .695-.316 1.317-.811 1.73m0-3.46a24.347 24.347 0 010 3.46"}))}const Cl=p.forwardRef(wl);function El({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z"}))}const Rl=p.forwardRef(El);function Sl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 10.5V6a3.75 3.75 0 10-7.5 0v4.5m11.356-1.993l1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 01-1.12-1.243l1.264-12A1.125 1.125 0 015.513 7.5h12.974c.576 0 1.059.435 1.119 1.007zM8.625 10.5a.375.375 0 11-.75 0 .375.375 0 01.75 0zm7.5 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"}))}const xl=p.forwardRef(Sl);function Ol({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 00-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 00-16.536-1.84M7.5 14.25L5.106 5.272M6 20.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm12.75 0a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"}))}const _l=p.forwardRef(Ol);function Tl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"}))}const kl=p.forwardRef(Tl);function Dl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9.563C9 9.252 9.252 9 9.563 9h4.874c.311 0 .563.252.563.563v4.874c0 .311-.252.563-.563.563H9.564A.562.562 0 019 14.437V9.564z"}))}const Ll=p.forwardRef(Dl);function Pl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z"}))}const Fl=p.forwardRef(Pl);function Ml({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 18.72a9.094 9.094 0 003.741-.479 3 3 0 00-4.682-2.72m.94 3.198l.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0112 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 016 18.719m12 0a5.971 5.971 0 00-.941-3.197m0 0A5.995 5.995 0 0012 12.75a5.995 5.995 0 00-5.058 2.772m0 0a3 3 0 00-4.681 2.72 8.986 8.986 0 003.74.477m.94-3.197a5.971 5.971 0 00-.94 3.197M15 6.75a3 3 0 11-6 0 3 3 0 016 0zm6 3a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm-13.5 0a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z"}))}const jl=p.forwardRef(Ml);function Nl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.42 15.17L17.25 21A2.652 2.652 0 0021 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 11-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 004.486-6.336l-3.276 3.277a3.004 3.004 0 01-2.25-2.25l3.276-3.276a4.5 4.5 0 00-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437l1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008z"}))}const Al=p.forwardRef(Nl);function ql({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75a4.5 4.5 0 01-4.884 4.484c-1.076-.091-2.264.071-2.95.904l-7.152 8.684a2.548 2.548 0 11-3.586-3.586l8.684-7.152c.833-.686.995-1.874.904-2.95a4.5 4.5 0 016.336-4.486l-3.276 3.276a3.004 3.004 0 002.25 2.25l3.276-3.276c.256.565.398 1.192.398 1.852z"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.867 19.125h.008v.008h-.008v-.008z"}))}const Il=p.forwardRef(ql);function Vl({iconName:t}){switch(t){case"CalendarIcon":return y.jsx(fl,{});case"CalendarDaysIcon":return y.jsx(dl,{});case"FireIcon":return y.jsx(ml,{});case"MegaphoneIcon":return y.jsx(Cl,{});case"WrenchIcon":return y.jsx(Il,{});case"WrenchScrewdriverIcon":return y.jsx(Al,{});case"ShareIcon":return y.jsx(Rl,{});case"ShoppingBagIcon":return y.jsx(xl,{});case"ShoppingCartIcon":return y.jsx(_l,{});case"StarIcon":return y.jsx(kl,{});case"StopCircleIcon":return y.jsx(Ll,{});case"StopIcon":return y.jsx(Fl,{});case"LockClosedIcon":return y.jsx(bl,{});case"LinkIcon":return y.jsx(yl,{});case"UserGroupIcon":return y.jsx(jl,{});case"BellAlertIcon":return y.jsx(ul,{});default:return null}}function Jt({children:t}){return y.jsx("div",{className:"qikbar-details-container",children:t})}function Vi({children:t}){return y.jsx("ul",{className:"qikbar-list",children:t})}function Ui({item:{name:t,children:e,Icon:r}}){return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"qikbar-category-wrapper",children:[r&&y.jsx(r,{}),y.jsx("p",{className:"qikbar-category",children:t})]}),e.map(n=>n.children?y.jsx(Ui,{item:n},n.id):y.jsx(un,{item:n},n.id))]})}var $i=function(t){return t.indexOf("//")===0&&(t=location.protocol+t),t.toLowerCase().replace(/([a-z])?:\/\//,"$1").split("/")[0]},Ul=function(t){if(t)return(t.indexOf(":")>-1||t.indexOf("//")>-1)&&$i(location.href)!==$i(t)};function un({item:{iconName:t,title:e,to:r,description:n,href:i,route:s,action:a,children:o,tag:l}}){const{setIsOpen:c,setCrumbs:d,setActions:f,demo:u}=N.useContext(et),m=Se();if(o)return null;const b=i?"a":vr,w=D=>{var C;m!=null&&m.router&&((C=m==null?void 0:m.router)==null||C.call(m,i),!u&&c(!1),D.preventDefault())},S=r||(s==null?void 0:s.path),_=i?{...Ul(i)?{rel:"noopener",target:"_blank",href:i,onClick:()=>!u&&c(!1)}:{href:i,onClick:w}}:{to:S,onClick:()=>{f([]),d(D=>[...D,{title:e,to:S}])}};return y.jsxs(b,{"data-testid":"qikbar-item",className:"qikbar-item",..._,onClick:a||(_==null?void 0:_.onClick),children:[y.jsxs("li",{children:[t&&y.jsx(Vl,{iconName:t}),y.jsxs("div",{children:[y.jsx("p",{className:"qikbar-item-title",children:e}),y.jsx("p",{className:"qikbar-item-description",children:n})]})]}),l&&y.jsx("p",{className:"qikbar-item-type",children:l})]})}function Bi({placeholder:t}){const{setPlaceholder:e}=N.useContext(et);return N.useEffect(()=>{e(t)},[e,t]),null}function Hi({fields:t}){return y.jsx("div",{className:"qikbar-details-wrapper",children:y.jsx("div",{className:"qikbar-details",children:t.map((e,r)=>y.jsx("div",{className:"qikbar-fieldset",children:e.map(({label:n,value:i,html:s},a)=>y.jsxs("div",{className:"qikbar-field",children:[n&&y.jsxs("span",{className:"qikbar-field-label",children:[n,":"]}),s?y.jsx("p",{dangerouslySetInnerHTML:{__html:i},className:"qikbar-field-value"}):y.jsx("p",{className:"qikbar-field-value",children:i})]},a))},r))})})}function Qi({categories:t,placeholderText:e}){var d;const{activeIndex:r,search:n,setActions:i,navigateTo:s}=N.useContext(et),a=t.map(f=>({...f,children:f.commands.filter(u=>u.title.toLowerCase().includes(n.toLowerCase()))})).filter(f=>f.children.length>0),l=a.reduce((f,u)=>[...f,...u.children],[])[r],c=l==null?void 0:l.actions;return l==null||l.fields,N.useEffect(()=>{i(l&&c?c:[])},[l,n,r]),a.length===0?y.jsx(Jt,{children:y.jsx("div",{className:"qikbar-item-empty",children:"No matches"})}):y.jsxs(y.Fragment,{children:[y.jsx(Bi,{placeholder:e}),y.jsxs(Jt,{children:[y.jsx(Vi,{children:a.map(f=>f.children?y.jsx(Ui,{item:f},f.name):y.jsx(un,{item:f},f.id))}),l&&((d=l==null?void 0:l.details)==null?void 0:d.length)>0&&y.jsx(Hi,{fields:l.details})]})]})}class Xt{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.push(e),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(r=>r!==e),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const er=typeof window>"u"||"Deno"in window;function _e(){}function $l(t,e){return typeof t=="function"?t(e):t}function cn(t){return typeof t=="number"&&t>=0&&t!==1/0}function zi(t,e){return Math.max(t+(e||0)-Date.now(),0)}function tr(t,e,r){return br(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function tt(t,e,r){return br(t)?[{...e,queryKey:t},r]:[t||{},e]}function Wi(t,e){const{type:r="all",exact:n,fetchStatus:i,predicate:s,queryKey:a,stale:o}=t;if(br(a)){if(n){if(e.queryHash!==dn(a,e.options))return!1}else if(!_t(e.queryKey,a))return!1}if(r!=="all"){const l=e.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof o=="boolean"&&e.isStale()!==o||typeof i<"u"&&i!==e.state.fetchStatus||s&&!s(e))}function Ki(t,e){const{exact:r,fetching:n,predicate:i,mutationKey:s}=t;if(br(s)){if(!e.options.mutationKey)return!1;if(r){if(ft(e.options.mutationKey)!==ft(s))return!1}else if(!_t(e.options.mutationKey,s))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||i&&!i(e))}function dn(t,e){return((e==null?void 0:e.queryKeyHashFn)||ft)(t)}function ft(t){return JSON.stringify(t,(e,r)=>hn(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function _t(t,e){return Yi(t,e)}function Yi(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(r=>!Yi(t[r],e[r])):!1}function Gi(t,e){if(t===e)return t;const r=Ji(t)&&Ji(e);if(r||hn(t)&&hn(e)){const n=r?t.length:Object.keys(t).length,i=r?e:Object.keys(e),s=i.length,a=r?[]:{};let o=0;for(let l=0;l<s;l++){const c=r?l:i[l];a[c]=Gi(t[c],e[c]),a[c]===t[c]&&o++}return n===s&&o===n?t:a}return e}function Zi(t,e){if(t&&!e||e&&!t)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function Ji(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function hn(t){if(!Xi(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const r=e.prototype;return!(!Xi(r)||!r.hasOwnProperty("isPrototypeOf"))}function Xi(t){return Object.prototype.toString.call(t)==="[object Object]"}function br(t){return Array.isArray(t)}function es(t){return new Promise(e=>{setTimeout(e,t)})}function ts(t){es(0).then(t)}function Bl(){if(typeof AbortController=="function")return new AbortController}function fn(t,e,r){return r.isDataEqual!=null&&r.isDataEqual(t,e)?t:typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?Gi(t,e):e}class Hl extends Xt{constructor(){super(),this.setup=e=>{if(!er&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.focused=e,e&&this.onFocus()}onFocus(){this.listeners.forEach(e=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const wr=new Hl;class Ql extends Xt{constructor(){super(),this.setup=e=>{if(!er&&window.addEventListener){const r=()=>e();return window.addEventListener("online",r,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(e){this.online=e,e&&this.onOnline()}onOnline(){this.listeners.forEach(e=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Cr=new Ql;function zl(t){return Math.min(1e3*2**t,3e4)}function Er(t){return(t??"online")==="online"?Cr.isOnline():!0}class rs{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function Rr(t){return t instanceof rs}function ns(t){let e=!1,r=0,n=!1,i,s,a;const o=new Promise((S,_)=>{s=S,a=_}),l=S=>{n||(m(new rs(S)),t.abort==null||t.abort())},c=()=>{e=!0},d=()=>{e=!1},f=()=>!wr.isFocused()||t.networkMode!=="always"&&!Cr.isOnline(),u=S=>{n||(n=!0,t.onSuccess==null||t.onSuccess(S),i==null||i(),s(S))},m=S=>{n||(n=!0,t.onError==null||t.onError(S),i==null||i(),a(S))},b=()=>new Promise(S=>{i=_=>{if(n||!f())return S(_)},t.onPause==null||t.onPause()}).then(()=>{i=void 0,n||t.onContinue==null||t.onContinue()}),w=()=>{if(n)return;let S;try{S=t.fn()}catch(_){S=Promise.reject(_)}Promise.resolve(S).then(u).catch(_=>{var D,C;if(n)return;const E=(D=t.retry)!=null?D:3,F=(C=t.retryDelay)!=null?C:zl,O=typeof F=="function"?F(r,_):F,T=E===!0||typeof E=="number"&&r<E||typeof E=="function"&&E(r,_);if(e||!T){m(_);return}r++,t.onFail==null||t.onFail(r,_),es(O).then(()=>{if(f())return b()}).then(()=>{e?m(_):w()})})};return Er(t.networkMode)?w():b().then(w),{promise:o,cancel:l,continue:()=>{i==null||i()},cancelRetry:c,continueRetry:d}}const pn=console;function Wl(){let t=[],e=0,r=d=>{d()},n=d=>{d()};const i=d=>{let f;e++;try{f=d()}finally{e--,e||o()}return f},s=d=>{e?t.push(d):ts(()=>{r(d)})},a=d=>(...f)=>{s(()=>{d(...f)})},o=()=>{const d=t;t=[],d.length&&ts(()=>{n(()=>{d.forEach(f=>{r(f)})})})};return{batch:i,batchCalls:a,schedule:s,setNotifyFunction:d=>{r=d},setBatchNotifyFunction:d=>{n=d}}}const le=Wl();class is{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cn(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(er?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class Kl extends is{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||pn,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||Yl(this.options),this.state=this.initialState}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(e,r){const n=fn(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){this.dispatch({type:"setState",state:e,setStateOptions:r})}cancel(e){var r;const n=this.promise;return(r=this.retryer)==null||r.cancel(e),n?n.then(_e).catch(_e):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!zi(this.state.dataUpdatedAt,e)}onFocus(){var e;const r=this.observers.find(n=>n.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;const r=this.observers.find(n=>n.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.indexOf(e)===-1&&(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.indexOf(e)!==-1&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,r){var n,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var s;return(s=this.retryer)==null||s.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const m=this.observers.find(b=>b.options.queryFn);m&&this.setOptions(m.options)}Array.isArray(this.options.queryKey)||process.env.NODE_ENV!=="production"&&this.logger.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 a=Bl(),o={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};l(o);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(o)):Promise.reject("Missing queryFn"),d={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(l(d),(n=this.options.behavior)==null||n.onFetch(d),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=d.fetchOptions)==null?void 0:i.meta)){var f;this.dispatch({type:"fetch",meta:(f=d.fetchOptions)==null?void 0:f.meta})}const u=m=>{if(Rr(m)&&m.silent||this.dispatch({type:"error",error:m}),!Rr(m)){var b,w;(b=(w=this.cache.config).onError)==null||b.call(w,m,this),process.env.NODE_ENV!=="production"&&this.logger.error(m)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=ns({fn:d.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:m=>{var b,w;if(typeof m>"u"){process.env.NODE_ENV!=="production"&&this.logger.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),u(new Error("undefined"));return}this.setData(m),(b=(w=this.cache.config).onSuccess)==null||b.call(w,m,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:u,onFail:(m,b)=>{this.dispatch({type:"failed",failureCount:m,error:b})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const r=n=>{var i,s;switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=e.meta)!=null?i:null,fetchStatus:Er(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(s=e.dataUpdatedAt)!=null?s:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=e.error;return Rr(a)&&a.revert&&this.revertState?{...this.revertState}:{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),le.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}function Yl(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=typeof e<"u",n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class Gl extends Xt{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,r,n){var i;const s=r.queryKey,a=(i=r.queryHash)!=null?i:dn(s,r);let o=this.get(a);return o||(o=new Kl({cache:this,logger:e.getLogger(),queryKey:s,queryHash:a,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const r=this.queriesMap[e.queryHash];r&&(e.destroy(),this.queries=this.queries.filter(n=>n!==e),r===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){le.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,r){const[n]=tt(e,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(i=>Wi(n,i))}findAll(e,r){const[n]=tt(e,r);return Object.keys(n).length>0?this.queries.filter(i=>Wi(n,i)):this.queries}notify(e){le.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){le.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){le.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class Zl extends is{constructor(e){super(),this.options={...e.defaultOptions,...e.options},this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||pn,this.observers=[],this.state=e.state||Jl(),this.updateCacheTime(this.options.cacheTime),this.scheduleGc()}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.indexOf(e)===-1&&(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(r=>r!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()}async execute(){const e=()=>{var C;return this.retryer=ns({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(E,F)=>{this.dispatch({type:"failed",failureCount:E,error:F})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(C=this.options.retry)!=null?C:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,i,s,a,o,l;if(!r){var c,d,f,u;this.dispatch({type:"loading",variables:this.options.variables}),await((c=(d=this.mutationCache.config).onMutate)==null?void 0:c.call(d,this.state.variables,this));const E=await((f=(u=this.options).onMutate)==null?void 0:f.call(u,this.state.variables));E!==this.state.context&&this.dispatch({type:"loading",context:E,variables:this.state.variables})}const C=await e();return await((n=(i=this.mutationCache.config).onSuccess)==null?void 0:n.call(i,C,this.state.variables,this.state.context,this)),await((s=(a=this.options).onSuccess)==null?void 0:s.call(a,C,this.state.variables,this.state.context)),await((o=(l=this.options).onSettled)==null?void 0:o.call(l,C,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:C}),C}catch(C){try{var m,b,w,S,_,D;throw await((m=(b=this.mutationCache.config).onError)==null?void 0:m.call(b,C,this.state.variables,this.state.context,this)),process.env.NODE_ENV!=="production"&&this.logger.error(C),await((w=(S=this.options).onError)==null?void 0:w.call(S,C,this.state.variables,this.state.context)),await((_=(D=this.options).onSettled)==null?void 0:_.call(D,void 0,C,this.state.variables,this.state.context)),C}finally{this.dispatch({type:"error",error:C})}}}dispatch(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Er(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...n,...e.state}}};this.state=r(this.state),le.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function Jl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class Xl extends Xt{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,r,n){const i=new Zl({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(r),state:n,defaultOptions:r.mutationKey?e.getMutationDefaults(r.mutationKey):void 0});return this.add(i),i}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(r=>r!==e),this.notify({type:"removed",mutation:e})}clear(){le.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return typeof e.exact>"u"&&(e.exact=!0),this.mutations.find(r=>Ki(e,r))}findAll(e){return this.mutations.filter(r=>Ki(e,r))}notify(e){le.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.mutations.filter(r=>r.state.isPaused);return le.batch(()=>e.reduce((r,n)=>r.then(()=>n.continue().catch(_e)),Promise.resolve()))}}function eu(){return{onFetch:t=>{t.fetchFn=()=>{var e,r,n,i,s,a;const o=(e=t.fetchOptions)==null||(r=e.meta)==null?void 0:r.refetchPage,l=(n=t.fetchOptions)==null||(i=n.meta)==null?void 0:i.fetchMore,c=l==null?void 0:l.pageParam,d=(l==null?void 0:l.direction)==="forward",f=(l==null?void 0:l.direction)==="backward",u=((s=t.state.data)==null?void 0:s.pages)||[],m=((a=t.state.data)==null?void 0:a.pageParams)||[];let b=m,w=!1;const S=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>{var T;if((T=t.signal)!=null&&T.aborted)w=!0;else{var P;(P=t.signal)==null||P.addEventListener("abort",()=>{w=!0})}return t.signal}})},_=t.options.queryFn||(()=>Promise.reject("Missing queryFn")),D=(O,T,P,B)=>(b=B?[T,...b]:[...b,T],B?[P,...O]:[...O,P]),C=(O,T,P,B)=>{if(w)return Promise.reject("Cancelled");if(typeof P>"u"&&!T&&O.length)return Promise.resolve(O);const Z={queryKey:t.queryKey,pageParam:P,meta:t.options.meta};S(Z);const J=_(Z);return Promise.resolve(J).then(se=>D(O,P,se,B))};let E;if(!u.length)E=C([]);else if(d){const O=typeof c<"u",T=O?c:ss(t.options,u);E=C(u,O,T)}else if(f){const O=typeof c<"u",T=O?c:tu(t.options,u);E=C(u,O,T,!0)}else{b=[];const O=typeof t.options.getNextPageParam>"u";E=(o&&u[0]?o(u[0],0,u):!0)?C([],O,m[0]):Promise.resolve(D([],m[0],u[0]));for(let P=1;P<u.length;P++)E=E.then(B=>{if(o&&u[P]?o(u[P],P,u):!0){const J=O?m[P]:ss(t.options,B);return C(B,O,J)}return Promise.resolve(D(B,m[P],u[P]))})}return E.then(O=>({pages:O,pageParams:b}))}}}}function ss(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function tu(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}class ru{constructor(e={}){this.queryCache=e.queryCache||new Gl,this.mutationCache=e.mutationCache||new Xl,this.logger=e.logger||pn,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0,process.env.NODE_ENV!=="production"&&e.logger&&this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.")}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=wr.subscribe(()=>{wr.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Cr.subscribe(()=>{Cr.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,r;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(e,r){const[n]=tt(e,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state.data}ensureQueryData(e,r,n){const i=tr(e,r,n),s=this.getQueryData(i.queryKey);return s?Promise.resolve(s):this.fetchQuery(i)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:r,state:n})=>{const i=n.data;return[r,i]})}setQueryData(e,r,n){const i=this.queryCache.find(e),s=i==null?void 0:i.state.data,a=$l(r,s);if(typeof a>"u")return;const o=tr(e),l=this.defaultQueryOptions(o);return this.queryCache.build(this,l).setData(a,{...n,manual:!0})}setQueriesData(e,r,n){return le.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,r,n)]))}getQueryState(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state}removeQueries(e,r){const[n]=tt(e,r),i=this.queryCache;le.batch(()=>{i.findAll(n).forEach(s=>{i.remove(s)})})}resetQueries(e,r,n){const[i,s]=tt(e,r,n),a=this.queryCache,o={type:"active",...i};return le.batch(()=>(a.findAll(i).forEach(l=>{l.reset()}),this.refetchQueries(o,s)))}cancelQueries(e,r,n){const[i,s={}]=tt(e,r,n);typeof s.revert>"u"&&(s.revert=!0);const a=le.batch(()=>this.queryCache.findAll(i).map(o=>o.cancel(s)));return Promise.all(a).then(_e).catch(_e)}invalidateQueries(e,r,n){const[i,s]=tt(e,r,n);return le.batch(()=>{var a,o;if(this.queryCache.findAll(i).forEach(c=>{c.invalidate()}),i.refetchType==="none")return Promise.resolve();const l={...i,type:(a=(o=i.refetchType)!=null?o:i.type)!=null?a:"active"};return this.refetchQueries(l,s)})}refetchQueries(e,r,n){const[i,s]=tt(e,r,n),a=le.batch(()=>this.queryCache.findAll(i).filter(l=>!l.isDisabled()).map(l=>{var c;return l.fetch(void 0,{...s,cancelRefetch:(c=s==null?void 0:s.cancelRefetch)!=null?c:!0,meta:{refetchPage:i.refetchPage}})}));let o=Promise.all(a).then(_e);return s!=null&&s.throwOnError||(o=o.catch(_e)),o}fetchQuery(e,r,n){const i=tr(e,r,n),s=this.defaultQueryOptions(i);typeof s.retry>"u"&&(s.retry=!1);const a=this.queryCache.build(this,s);return a.isStaleByTime(s.staleTime)?a.fetch(s):Promise.resolve(a.state.data)}prefetchQuery(e,r,n){return this.fetchQuery(e,r,n).then(_e).catch(_e)}fetchInfiniteQuery(e,r,n){const i=tr(e,r,n);return i.behavior=eu(),this.fetchQuery(i)}prefetchInfiniteQuery(e,r,n){return this.fetchInfiniteQuery(e,r,n).then(_e).catch(_e)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,r){const n=this.queryDefaults.find(i=>ft(e)===ft(i.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:e,defaultOptions:r})}getQueryDefaults(e){if(!e)return;const r=this.queryDefaults.find(n=>_t(e,n.queryKey));return process.env.NODE_ENV!=="production"&&this.queryDefaults.filter(i=>_t(e,i.queryKey)).length>1&&this.logger.error("[QueryClient] Several query defaults match with key '"+JSON.stringify(e)+"'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults."),r==null?void 0:r.defaultOptions}setMutationDefaults(e,r){const n=this.mutationDefaults.find(i=>ft(e)===ft(i.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:e,defaultOptions:r})}getMutationDefaults(e){if(!e)return;const r=this.mutationDefaults.find(n=>_t(e,n.mutationKey));return process.env.NODE_ENV!=="production"&&this.mutationDefaults.filter(i=>_t(e,i.mutationKey)).length>1&&this.logger.error("[QueryClient] Several mutation defaults match with key '"+JSON.stringify(e)+"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults."),r==null?void 0:r.defaultOptions}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const r={...this.defaultOptions.queries,...this.getQueryDefaults(e==null?void 0:e.queryKey),...e,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=dn(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(e==null?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class nu extends Xt{constructor(e,r){super(),this.client=e,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.length===1&&(this.currentQuery.addObserver(this),as(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return mn(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return mn(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,r){const n=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),process.env.NODE_ENV!=="production"&&typeof(e==null?void 0:e.isDataEqual)<"u"&&this.client.getLogger().error("The isDataEqual option has been deprecated and will be removed in the next major version. You can achieve the same functionality by passing a function as the structuralSharing option"),Zi(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const s=this.hasListeners();s&&os(this.currentQuery,i,this.options,n)&&this.executeFetch(),this.updateResult(r),s&&(this.currentQuery!==i||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();s&&(this.currentQuery!==i||this.options.enabled!==n.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(e){const r=this.client.getQueryCache().build(this.client,e);return this.createResult(r,e)}getCurrentResult(){return this.currentResult}trackResult(e){const r={};return Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...r}={}){return this.fetch({...r,meta:{refetchPage:e}})}fetchOptimistic(e){const r=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(e){var r;return this.executeFetch({...e,cancelRefetch:(r=e.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let r=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(_e)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),er||this.currentResult.isStale||!cn(this.options.staleTime))return;const r=zi(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(er||this.options.enabled===!1||!cn(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||wr.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,r){const n=this.currentQuery,i=this.options,s=this.currentResult,a=this.currentResultState,o=this.currentResultOptions,l=e!==n,c=l?e.state:this.currentQueryInitialState,d=l?this.currentResult:this.previousQueryResult,{state:f}=e;let{dataUpdatedAt:u,error:m,errorUpdatedAt:b,fetchStatus:w,status:S}=f,_=!1,D=!1,C;if(r._optimisticResults){const P=this.hasListeners(),B=!P&&as(e,r),Z=P&&os(e,n,r,i);(B||Z)&&(w=Er(e.options.networkMode)?"fetching":"paused",u||(S="loading")),r._optimisticResults==="isRestoring"&&(w="idle")}if(r.keepPreviousData&&!f.dataUpdatedAt&&d!=null&&d.isSuccess&&S!=="error")C=d.data,u=d.dataUpdatedAt,S=d.status,_=!0;else if(r.select&&typeof f.data<"u")if(s&&f.data===(a==null?void 0:a.data)&&r.select===this.selectFn)C=this.selectResult;else try{this.selectFn=r.select,C=r.select(f.data),C=fn(s==null?void 0:s.data,C,r),this.selectResult=C,this.selectError=null}catch(P){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(P),this.selectError=P}else C=f.data;if(typeof r.placeholderData<"u"&&typeof C>"u"&&S==="loading"){let P;if(s!=null&&s.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData))P=s.data;else if(P=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof P<"u")try{P=r.select(P),this.selectError=null}catch(B){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(B),this.selectError=B}typeof P<"u"&&(S="success",C=fn(s==null?void 0:s.data,P,r),D=!0)}this.selectError&&(m=this.selectError,C=this.selectResult,b=Date.now(),S="error");const E=w==="fetching",F=S==="loading",O=S==="error";return{status:S,fetchStatus:w,isLoading:F,isSuccess:S==="success",isError:O,isInitialLoading:F&&E,data:C,dataUpdatedAt:u,error:m,errorUpdatedAt:b,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:E,isRefetching:E&&!F,isLoadingError:O&&f.dataUpdatedAt===0,isPaused:w==="paused",isPlaceholderData:D,isPreviousData:_,isRefetchError:O&&f.dataUpdatedAt!==0,isStale:gn(e,r),refetch:this.refetch,remove:this.remove}}updateResult(e){const r=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Zi(n,r))return;this.currentResult=n;const i={cache:!0},s=()=>{if(!r)return!0;const{notifyOnChangeProps:a}=this.options;if(a==="all"||!a&&!this.trackedProps.size)return!0;const o=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&o.add("error"),Object.keys(this.currentResult).some(l=>{const c=l;return this.currentResult[c]!==r[c]&&o.has(c)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),this.notify({...i,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const r={};e.type==="success"?r.onSuccess=!e.manual:e.type==="error"&&!Rr(e.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(e){le.batch(()=>{if(e.onSuccess){var r,n,i,s;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(i=(s=this.options).onSettled)==null||i.call(s,this.currentResult.data,null)}else if(e.onError){var a,o,l,c;(a=(o=this.options).onError)==null||a.call(o,this.currentResult.error),(l=(c=this.options).onSettled)==null||l.call(c,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(d=>{d(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function iu(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function as(t,e){return iu(t,e)||t.state.dataUpdatedAt>0&&mn(t,e,e.refetchOnMount)}function mn(t,e,r){if(e.enabled!==!1){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&gn(t,e)}return!1}function os(t,e,r,n){return r.enabled!==!1&&(t!==e||n.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&gn(t,r)}function gn(t,e){return t.isStaleByTime(e.staleTime)}var su=Gr();const au=su.useSyncExternalStore,ls=p.createContext(void 0),us=p.createContext(!1);function cs(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=ls),window.ReactQueryClientContext):ls)}const ou=({context:t}={})=>{const e=p.useContext(cs(t,p.useContext(us)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},lu=({client:t,children:e,context:r,contextSharing:n=!1})=>{p.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),process.env.NODE_ENV!=="production"&&n&&t.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const i=cs(r,n);return p.createElement(us.Provider,{value:!r&&n},p.createElement(i.Provider,{value:t},e))},ds=p.createContext(!1),uu=()=>p.useContext(ds);ds.Provider;function cu(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const du=p.createContext(cu()),hu=()=>p.useContext(du);function fu(t,e){return typeof t=="function"?t(...e):!!t}const pu=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},mu=t=>{p.useEffect(()=>{t.clearReset()},[t])},gu=({result:t,errorResetBoundary:e,useErrorBoundary:r,query:n})=>t.isError&&!e.isReset()&&!t.isFetching&&fu(r,[t.error,n]),yu=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},vu=(t,e)=>t.isLoading&&t.isFetching&&!e,bu=(t,e,r)=>(t==null?void 0:t.suspense)&&vu(e,r),wu=(t,e,r)=>e.fetchOptimistic(t).then(({data:n})=>{t.onSuccess==null||t.onSuccess(n),t.onSettled==null||t.onSettled(n,null)}).catch(n=>{r.clearReset(),t.onError==null||t.onError(n),t.onSettled==null||t.onSettled(void 0,n)});function Cu(t,e){const r=ou({context:t.context}),n=uu(),i=hu(),s=r.defaultQueryOptions(t);s._optimisticResults=n?"isRestoring":"optimistic",s.onError&&(s.onError=le.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=le.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=le.batchCalls(s.onSettled)),yu(s),pu(s,i),mu(i);const[a]=p.useState(()=>new e(r,s)),o=a.getOptimisticResult(s);if(au(p.useCallback(l=>n?()=>{}:a.subscribe(le.batchCalls(l)),[a,n]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),p.useEffect(()=>{a.setOptions(s,{listeners:!1})},[s,a]),bu(s,o,n))throw wu(s,a,i);if(gu({result:o,errorResetBoundary:i,useErrorBoundary:s.useErrorBoundary,query:a.getCurrentQuery()}))throw o.error;return s.notifyOnChangeProps?o:a.trackResult(o)}function Eu(t,e,r){const n=tr(t,e,r);return Cu(n,nu)}function Ru(t,e){const[r,n]=N.useState(t);return N.useEffect(()=>{const i=setTimeout(()=>{n(t)},e);return()=>{clearTimeout(i)}},[t,e]),r}var Su="Expected a function",hs="__lodash_hash_undefined__",fs=1/0,xu="[object Function]",Ou="[object GeneratorFunction]",_u="[object Symbol]",Tu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ku=/^\w*$/,Du=/^\./,Lu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pu=/[\\^$.*+?()[\]{}|]/g,Fu=/\\(\\)?/g,Mu=/^\[object .+?Constructor\]$/,ju=typeof ur=="object"&&ur&&ur.Object===Object&&ur,Nu=typeof self=="object"&&self&&self.Object===Object&&self,yn=ju||Nu||Function("return this")();function Au(t,e){return t==null?void 0:t[e]}function qu(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var Iu=Array.prototype,Vu=Function.prototype,ps=Object.prototype,vn=yn["__core-js_shared__"],ms=function(){var t=/[^.]+$/.exec(vn&&vn.keys&&vn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),gs=Vu.toString,bn=ps.hasOwnProperty,ys=ps.toString,Uu=RegExp("^"+gs.call(bn).replace(Pu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vs=yn.Symbol,$u=Iu.splice,Bu=Cs(yn,"Map"),rr=Cs(Object,"create"),bs=vs?vs.prototype:void 0,ws=bs?bs.toString:void 0;function pt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Hu(){this.__data__=rr?rr(null):{}}function Qu(t){return this.has(t)&&delete this.__data__[t]}function zu(t){var e=this.__data__;if(rr){var r=e[t];return r===hs?void 0:r}return bn.call(e,t)?e[t]:void 0}function Wu(t){var e=this.__data__;return rr?e[t]!==void 0:bn.call(e,t)}function Ku(t,e){var r=this.__data__;return r[t]=rr&&e===void 0?hs:e,this}pt.prototype.clear=Hu,pt.prototype.delete=Qu,pt.prototype.get=zu,pt.prototype.has=Wu,pt.prototype.set=Ku;function Tt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Yu(){this.__data__=[]}function Gu(t){var e=this.__data__,r=Sr(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():$u.call(e,r,1),!0}function Zu(t){var e=this.__data__,r=Sr(e,t);return r<0?void 0:e[r][1]}function Ju(t){return Sr(this.__data__,t)>-1}function Xu(t,e){var r=this.__data__,n=Sr(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}Tt.prototype.clear=Yu,Tt.prototype.delete=Gu,Tt.prototype.get=Zu,Tt.prototype.has=Ju,Tt.prototype.set=Xu;function mt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ec(){this.__data__={hash:new pt,map:new(Bu||Tt),string:new pt}}function tc(t){return xr(this,t).delete(t)}function rc(t){return xr(this,t).get(t)}function nc(t){return xr(this,t).has(t)}function ic(t,e){return xr(this,t).set(t,e),this}mt.prototype.clear=ec,mt.prototype.delete=tc,mt.prototype.get=rc,mt.prototype.has=nc,mt.prototype.set=ic;function Sr(t,e){for(var r=t.length;r--;)if(mc(t[r][0],e))return r;return-1}function sc(t,e){e=uc(e,t)?[e]:lc(e);for(var r=0,n=e.length;t!=null&&r<n;)t=t[fc(e[r++])];return r&&r==n?t:void 0}function ac(t){if(!Rs(t)||dc(t))return!1;var e=gc(t)||qu(t)?Uu:Mu;return e.test(pc(t))}function oc(t){if(typeof t=="string")return t;if(Cn(t))return ws?ws.call(t):"";var e=t+"";return e=="0"&&1/t==-fs?"-0":e}function lc(t){return Es(t)?t:hc(t)}function xr(t,e){var r=t.__data__;return cc(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Cs(t,e){var r=Au(t,e);return ac(r)?r:void 0}function uc(t,e){if(Es(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Cn(t)?!0:ku.test(t)||!Tu.test(t)||e!=null&&t in Object(e)}function cc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function dc(t){return!!ms&&ms in t}var hc=wn(function(t){t=vc(t);var e=[];return Du.test(t)&&e.push(""),t.replace(Lu,function(r,n,i,s){e.push(i?s.replace(Fu,"$1"):n||r)}),e});function fc(t){if(typeof t=="string"||Cn(t))return t;var e=t+"";return e=="0"&&1/t==-fs?"-0":e}function pc(t){if(t!=null){try{return gs.call(t)}catch{}try{return t+""}catch{}}return""}function wn(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(Su);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=t.apply(this,n);return r.cache=s.set(i,a),a};return r.cache=new(wn.Cache||mt),r}wn.Cache=mt;function mc(t,e){return t===e||t!==t&&e!==e}var Es=Array.isArray;function gc(t){var e=Rs(t)?ys.call(t):"";return e==xu||e==Ou}function Rs(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function yc(t){return!!t&&typeof t=="object"}function Cn(t){return typeof t=="symbol"||yc(t)&&ys.call(t)==_u}function vc(t){return t==null?"":oc(t)}function bc(t,e,r){var n=t==null?void 0:sc(t,e);return n===void 0?r:n}var wc=bc;class Le{constructor(e,r,n,i,s){this.kind=e,this.input=r,this.begin=n,this.end=i,this.file=s}getText(){return this.input.slice(this.begin,this.end)}getPosition(){let[e,r]=[1,1];for(let n=0;n<this.begin;n++)this.input[n]===`
90
- `?(e++,r=1):r++;return[e,r]}size(){return this.end-this.begin}}class gt{liquidMethodMissing(e){}}const Cc=Object.prototype.toString,Ss=String.prototype.toLowerCase,xs=Object.hasOwnProperty;function Qe(t){return typeof t=="string"}function be(t){return typeof t=="function"}function Ec(t){return t&&be(t.then)}function Or(t){return t&&be(t.next)&&be(t.throw)&&be(t.return)}function Rc(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function U(t){return t=$(t),Qe(t)?t:ze(t)?"":Ce(t)?t.map(e=>U(e)).join(""):String(t)}function $(t){return t instanceof gt&&be(t.valueOf)?t.valueOf():t}function _r(t){return typeof t=="number"}function Os(t){return t&&be(t.toLiquid)?Os(t.toLiquid()):t}function ze(t){return t==null}function Ce(t){return Cc.call(t)==="[object Array]"}function Sc(t){return Rn(t)&&Symbol.iterator in t}function _s(t,e){t=t||{};for(const r in t)if(xs.call(t,r)&&e(t[r],r,t)===!1)break;return t}function En(t){return t[t.length-1]}function Rn(t){const e=typeof t;return t!==null&&(e==="object"||e==="function")}function Ts(t,e,r=1){const n=[];for(let i=t;i<e;i+=r)n.push(i);return n}function Tr(t,e,r=" "){return ks(t,e,r,(n,i)=>i+n)}function xc(t,e,r=" "){return ks(t,e,r,(n,i)=>n+i)}function ks(t,e,r,n){t=String(t);let i=e-t.length;for(;i-- >0;)t=n(t,r);return t}function Ds(t){return t}function Oc(t){return[...t].some(r=>r>="a"&&r<="z")?t.toUpperCase():t.toLowerCase()}function _c(t,e){return t.length>e?t.slice(0,e-3)+"...":t}function Ls(t,e){return t==null&&e==null?0:t==null?1:e==null||(t=Ss.call(t),e=Ss.call(e),t<e)?-1:t>e?1:0}function Ee(t){return(...e)=>t(...e.map($))}function Sn(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}class kr extends Error{constructor(e,r){super(e.message),this.originalError=e,this.token=r,this.context=""}update(){const e=this.originalError;this.context=Pc(this.token),this.message=Fc(e.message,this.token),this.stack=this.message+`
89
+ */function pt(){return pt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},pt.apply(this,arguments)}function on(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}const yr="get",ln="application/x-www-form-urlencoded";function vr(t){return t!=null&&typeof t.tagName=="string"}function zo(t){return vr(t)&&t.tagName.toLowerCase()==="button"}function Wo(t){return vr(t)&&t.tagName.toLowerCase()==="form"}function Ko(t){return vr(t)&&t.tagName.toLowerCase()==="input"}function Yo(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Go(t,e){return t.button===0&&(!e||e==="_self")&&!Yo(t)}function Zo(t,e,r){let n,i,s,a;if(Wo(t)){let c=r.submissionTrigger;n=r.method||t.getAttribute("method")||yr,i=r.action||t.getAttribute("action")||e,s=r.encType||t.getAttribute("enctype")||ln,a=new FormData(t),c&&c.name&&a.append(c.name,c.value)}else if(zo(t)||Ko(t)&&(t.type==="submit"||t.type==="image")){let c=t.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');n=r.method||t.getAttribute("formmethod")||c.getAttribute("method")||yr,i=r.action||t.getAttribute("formaction")||c.getAttribute("action")||e,s=r.encType||t.getAttribute("formenctype")||c.getAttribute("enctype")||ln,a=new FormData(c),t.name&&a.append(t.name,t.value)}else{if(vr(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');if(n=r.method||yr,i=r.action||e,s=r.encType||ln,t instanceof FormData)a=t;else if(a=new FormData,t instanceof URLSearchParams)for(let[c,f]of t)a.append(c,f);else if(t!=null)for(let c of Object.keys(t))a.append(c,t[c])}let{protocol:l,host:o}=window.location;return{url:new URL(i,l+"//"+o),method:n.toLowerCase(),encType:s,formData:a}}const Jo=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],Xo=["aria-current","caseSensitive","className","end","style","to","children"],el=["reloadDocument","replace","method","action","onSubmit","fetcherKey","routeId","relative","preventScrollReset"];process.env.NODE_ENV;const tl=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",br=p.forwardRef(function(e,r){let{onClick:n,relative:i,reloadDocument:s,replace:a,state:l,target:o,to:u,preventScrollReset:c}=e,f=on(e,Jo),d=typeof u=="string"?u:Ae(u),m=/^[a-z+]+:\/\//i.test(d)||d.startsWith("//"),v=d,w=!1;if(tl&&m){let C=new URL(window.location.href),E=d.startsWith("//")?new URL(C.protocol+d):new URL(d);E.origin===C.origin?v=E.pathname+E.search+E.hash:w=!0}let S=ko(v,{relative:i}),O=al(v,{replace:a,state:l,target:o,preventScrollReset:c,relative:i});function k(C){n&&n(C),C.defaultPrevented||O(C)}return p.createElement("a",pt({},f,{href:m?d:S,onClick:w||s?n:k,ref:r,target:o}))});process.env.NODE_ENV!=="production"&&(br.displayName="Link");const rl=p.forwardRef(function(e,r){let{"aria-current":n="page",caseSensitive:i=!1,className:s="",end:a=!1,style:l,to:o,children:u}=e,c=on(e,Xo),f=mr(o,{relative:c.relative}),d=ft(),m=p.useContext(Zt),{navigator:v}=p.useContext(ht),w=v.encodeLocation?v.encodeLocation(f).pathname:f.pathname,S=d.pathname,O=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(S=S.toLowerCase(),O=O?O.toLowerCase():null,w=w.toLowerCase());let k=S===w||!a&&S.startsWith(w)&&S.charAt(w.length)==="/",C=O!=null&&(O===w||!a&&O.startsWith(w)&&O.charAt(w.length)==="/"),E=k?n:void 0,N;typeof s=="function"?N=s({isActive:k,isPending:C}):N=[s,k?"active":null,C?"pending":null].filter(Boolean).join(" ");let _=typeof l=="function"?l({isActive:k,isPending:C}):l;return p.createElement(br,pt({},c,{"aria-current":E,className:N,ref:r,style:_,to:o}),typeof u=="function"?u({isActive:k,isPending:C}):u)});process.env.NODE_ENV!=="production"&&(rl.displayName="NavLink");const nl=p.forwardRef((t,e)=>p.createElement(Ai,pt({},t,{ref:e})));process.env.NODE_ENV!=="production"&&(nl.displayName="Form");const Ai=p.forwardRef((t,e)=>{let{reloadDocument:r,replace:n,method:i=yr,action:s,onSubmit:a,fetcherKey:l,routeId:o,relative:u,preventScrollReset:c}=t,f=on(t,el),d=ol(l,o),m=i.toLowerCase()==="get"?"get":"post",v=Ii(s,{relative:u}),w=S=>{if(a&&a(S),S.defaultPrevented)return;S.preventDefault();let O=S.nativeEvent.submitter,k=(O==null?void 0:O.getAttribute("formmethod"))||i;d(O||S.currentTarget,{method:k,replace:n,relative:u,preventScrollReset:c})};return p.createElement("form",pt({ref:e,method:m,action:v,onSubmit:r?a:w},f))});process.env.NODE_ENV!=="production"&&(Ai.displayName="FormImpl"),process.env.NODE_ENV;var un;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmitImpl="useSubmitImpl",t.UseFetcher="useFetcher"})(un||(un={}));var qi;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(qi||(qi={}));function il(t){return t+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function sl(t){let e=p.useContext(Gt);return e||(process.env.NODE_ENV!=="production"?P(!1,il(t)):P(!1)),e}function al(t,e){let{target:r,replace:n,state:i,preventScrollReset:s,relative:a}=e===void 0?{}:e,l=Ti(),o=ft(),u=mr(t,{relative:a});return p.useCallback(c=>{if(Go(c,r)){c.preventDefault();let f=n!==void 0?n:Ae(o)===Ae(u);l(t,{replace:f,state:i,preventScrollReset:s,relative:a})}},[o,l,u,n,i,r,t,s,a])}function ol(t,e){let{router:r}=sl(un.UseSubmitImpl),n=Ii();return p.useCallback(function(i,s){if(s===void 0&&(s={}),typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");let{method:a,encType:l,formData:o,url:u}=Zo(i,n,s),c=u.pathname+u.search,f={replace:s.replace,preventScrollReset:s.preventScrollReset,formData:o,formMethod:a,formEncType:l};t?(e==null&&(process.env.NODE_ENV!=="production"?P(!1,"No routeId available for useFetcher()"):P(!1)),r.fetch(t,e,c,f)):r.navigate(c,f)},[n,r,t,e])}function Ii(t,e){let{relative:r}=e===void 0?{}:e,{basename:n}=p.useContext(ht),i=p.useContext(Ue);i||(process.env.NODE_ENV!=="production"?P(!1,"useFormAction must be used inside a RouteContext"):P(!1));let[s]=i.matches.slice(-1),a=pt({},mr(t||".",{relative:r})),l=ft();if(t==null&&(a.search=l.search,a.hash=l.hash,s.route.index)){let o=new URLSearchParams(a.search);o.delete("index"),a.search=o.toString()?"?"+o.toString():""}return(!t||t===".")&&s.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:Ve([n,a.pathname])),Ae(a)}function ll({showAdminEdit:t,setShowAdminEdit:e,enabledAdminEdit:r}){const{actions:n,showActions:i,setShowActions:s,navigateTo:a}=A.useContext(rt),l=A.useRef();return A.useEffect(()=>{const o=u=>{u.metaKey&&u.key==="Enter"&&(u.preventDefault(),u.stopPropagation(),n.length>0&&s(c=>!c)),i&&u.key!=="ArrowUp"&&u.key!=="ArrowDown"&&u.key!=="Enter"&&s(!1),i&&u.key==="ArrowDown"&&u.target.className==="qikbar-action"&&u.target.nextElementSibling&&u.target.nextElementSibling.focus(),i&&u.key==="ArrowUp"&&u.target.className==="qikbar-action"&&u.target.previousElementSibling&&u.target.previousElementSibling.focus()};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}},[i,n]),A.useEffect(()=>{var o,u;i&&((u=(o=l==null?void 0:l.current)==null?void 0:o.firstChild)==null||u.focus())},[i]),y.jsxs("div",{className:"qikbar-command-footer",children:[y.jsx("div",{className:"qikbar-logo",children:y.jsx("a",{href:"https://www.qikbar.com",target:"_blank",rel:"noopener noreferrer",children:y.jsxs("svg",{width:"89",height:"30",viewBox:"0 0 89 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("path",{d:"M36.9964 16.0795H39.1271L40.0327 17.2354L41.2205 18.5991L43.0476 20.8523H40.6612L39.3828 19.3235L38.6264 18.2369L36.9964 16.0795ZM43.1222 14.5455C43.1222 15.7457 42.8913 16.7631 42.4297 17.5977C41.968 18.4322 41.343 19.0661 40.5547 19.4993C39.7699 19.9325 38.8892 20.1491 37.9126 20.1491C36.9325 20.1491 36.0501 19.9308 35.2653 19.494C34.4805 19.0572 33.8572 18.4233 33.3956 17.5923C32.9375 16.7578 32.7085 15.7422 32.7085 14.5455C32.7085 13.3452 32.9375 12.3278 33.3956 11.4933C33.8572 10.6587 34.4805 10.0249 35.2653 9.59162C36.0501 9.15838 36.9325 8.94176 37.9126 8.94176C38.8892 8.94176 39.7699 9.15838 40.5547 9.59162C41.343 10.0249 41.968 10.6587 42.4297 11.4933C42.8913 12.3278 43.1222 13.3452 43.1222 14.5455ZM40.4268 14.5455C40.4268 13.8352 40.3256 13.2351 40.1232 12.745C39.9244 12.255 39.6367 11.8839 39.2603 11.6317C38.8874 11.3796 38.4382 11.2536 37.9126 11.2536C37.3906 11.2536 36.9414 11.3796 36.565 11.6317C36.1886 11.8839 35.8991 12.255 35.6967 12.745C35.4979 13.2351 35.3984 13.8352 35.3984 14.5455C35.3984 15.2557 35.4979 15.8558 35.6967 16.3459C35.8991 16.8359 36.1886 17.207 36.565 17.4592C36.9414 17.7113 37.3906 17.8374 37.9126 17.8374C38.4382 17.8374 38.8874 17.7113 39.2603 17.4592C39.6367 17.207 39.9244 16.8359 40.1232 16.3459C40.3256 15.8558 40.4268 15.2557 40.4268 14.5455ZM44.6762 20V11.8182H47.281V20H44.6762ZM45.9813 10.8647C45.6155 10.8647 45.3012 10.744 45.0384 10.5025C44.7757 10.2575 44.6443 9.96271 44.6443 9.61825C44.6443 9.27734 44.7757 8.98615 45.0384 8.74467C45.3012 8.49964 45.6155 8.37713 45.9813 8.37713C46.3506 8.37713 46.6649 8.49964 46.9241 8.74467C47.1869 8.98615 47.3183 9.27734 47.3183 9.61825C47.3183 9.96271 47.1869 10.2575 46.9241 10.5025C46.6649 10.744 46.3506 10.8647 45.9813 10.8647ZM51.288 17.8533L51.2987 14.7479H51.6609L53.962 11.8182H56.913L53.4933 16.0156H52.8061L51.288 17.8533ZM48.9389 20V9.09091H51.5437V20H48.9389ZM54.0206 20L51.8793 16.6016L53.5945 14.7532L57.0302 20H54.0206Z",className:"qikbar-logo-secondary"}),y.jsx("path",{d:"M57.8452 20V9.09091H60.4499V13.2191H60.5032C60.6097 12.9705 60.7607 12.7308 60.956 12.5C61.1548 12.2692 61.407 12.081 61.7124 11.9354C62.0213 11.7862 62.3906 11.7116 62.8203 11.7116C63.3885 11.7116 63.9194 11.8608 64.413 12.1591C64.9102 12.4574 65.3114 12.9173 65.6168 13.5387C65.9222 14.1602 66.0749 14.9521 66.0749 15.9144C66.0749 16.8413 65.9276 17.6172 65.6328 18.2422C65.3416 18.8672 64.9474 19.3359 64.4503 19.6484C63.9567 19.9609 63.408 20.1172 62.8043 20.1172C62.3924 20.1172 62.0355 20.0497 61.7337 19.9148C61.4318 19.7798 61.1779 19.6023 60.9719 19.3821C60.7695 19.1619 60.6133 18.9258 60.5032 18.6737H60.4233V20H57.8452ZM60.3967 15.9091C60.3967 16.3494 60.4553 16.733 60.5724 17.0597C60.6932 17.3864 60.8654 17.6403 61.0891 17.8214C61.3164 17.9989 61.5881 18.0877 61.9041 18.0877C62.2237 18.0877 62.4954 17.9989 62.7191 17.8214C62.9428 17.6403 63.1115 17.3864 63.2251 17.0597C63.3423 16.733 63.4009 16.3494 63.4009 15.9091C63.4009 15.4687 63.3423 15.087 63.2251 14.7638C63.1115 14.4407 62.9428 14.1903 62.7191 14.0128C62.4989 13.8352 62.2273 13.7464 61.9041 13.7464C61.5845 13.7464 61.3129 13.8335 61.0891 14.0075C60.8654 14.1815 60.6932 14.43 60.5724 14.7532C60.4553 15.0763 60.3967 15.4616 60.3967 15.9091ZM69.7464 20.1385C69.2243 20.1385 68.7609 20.0515 68.3561 19.8775C67.9548 19.6999 67.637 19.4336 67.4026 19.0785C67.1718 18.7198 67.0564 18.2706 67.0564 17.7308C67.0564 17.2763 67.1363 16.8928 67.2961 16.5803C67.4559 16.2678 67.676 16.0138 67.9566 15.8185C68.2371 15.6232 68.5603 15.4759 68.926 15.3764C69.2918 15.2734 69.6824 15.2042 70.0979 15.1687C70.5631 15.1261 70.9378 15.0817 71.2219 15.0355C71.5059 14.9858 71.7119 14.9165 71.8398 14.8278C71.9711 14.7354 72.0368 14.6058 72.0368 14.4389V14.4123C72.0368 14.1388 71.9427 13.9276 71.7545 13.7784C71.5663 13.6293 71.3124 13.5547 70.9928 13.5547C70.6483 13.5547 70.3714 13.6293 70.1618 13.7784C69.9523 13.9276 69.8192 14.1335 69.7623 14.3963L67.36 14.3111C67.431 13.8139 67.6139 13.37 67.9086 12.9794C68.2069 12.5852 68.6153 12.2763 69.1338 12.0526C69.6558 11.8253 70.2826 11.7116 71.0141 11.7116C71.5361 11.7116 72.0173 11.7738 72.4577 11.8981C72.898 12.0188 73.2815 12.1964 73.6082 12.4308C73.9349 12.6616 74.1871 12.9457 74.3646 13.283C74.5457 13.6204 74.6363 14.0057 74.6363 14.4389V20H72.186V18.8601H72.1221C71.9765 19.1371 71.79 19.3714 71.5628 19.5632C71.339 19.755 71.0745 19.8988 70.7691 19.9947C70.4672 20.0906 70.1263 20.1385 69.7464 20.1385ZM70.5507 18.4339C70.8312 18.4339 71.0834 18.3771 71.3071 18.2635C71.5344 18.1499 71.7155 17.9936 71.8504 17.7947C71.9854 17.5923 72.0528 17.358 72.0528 17.0916V16.3139C71.9782 16.353 71.8877 16.3885 71.7812 16.4205C71.6782 16.4524 71.5645 16.4826 71.4403 16.511C71.316 16.5394 71.1881 16.5643 71.0567 16.5856C70.9253 16.6069 70.7993 16.6264 70.6785 16.6442C70.4335 16.6832 70.224 16.7436 70.05 16.8253C69.8795 16.907 69.7481 17.0135 69.6558 17.1449C69.567 17.2727 69.5226 17.4254 69.5226 17.603C69.5226 17.8729 69.6185 18.0788 69.8103 18.2209C70.0056 18.3629 70.2524 18.4339 70.5507 18.4339ZM76.229 20V11.8182H78.7591V13.3097H78.8444C78.9935 12.7699 79.2368 12.3686 79.5741 12.1058C79.9115 11.8395 80.3039 11.7063 80.7513 11.7063C80.8721 11.7063 80.9964 11.7152 81.1242 11.733C81.252 11.7472 81.371 11.7702 81.4811 11.8022V14.0661C81.3568 14.0234 81.1934 13.9897 80.991 13.9648C80.7922 13.94 80.6146 13.9276 80.4584 13.9276C80.1494 13.9276 79.8706 13.9968 79.6221 14.1353C79.377 14.2702 79.1835 14.4602 79.0415 14.7053C78.903 14.9467 78.8337 15.2308 78.8337 15.5575V20H76.229Z",className:"qikbar-logo-primary-fill"}),y.jsx("path",{d:"M19.75 18.75L17.261 16.261M17.261 16.261C17.5744 15.9476 17.823 15.5755 17.9926 15.1661C18.1622 14.7566 18.2495 14.3177 18.2495 13.8745C18.2495 13.4313 18.1622 12.9924 17.9926 12.5829C17.823 12.1735 17.5744 11.8014 17.261 11.488C16.9476 11.1746 16.5755 10.926 16.1661 10.7564C15.7566 10.5868 15.3177 10.4995 14.8745 10.4995C14.4313 10.4995 13.9924 10.5868 13.5829 10.7564C13.1735 10.926 12.8014 11.1746 12.488 11.488C11.8549 12.1211 11.4993 12.9797 11.4993 13.875C11.4993 14.7703 11.8549 15.6289 12.488 16.262C13.1211 16.8951 13.9797 17.2507 14.875 17.2507C15.7703 17.2507 16.6289 16.8951 17.262 16.262L17.261 16.261ZM25 15C25 16.1819 24.7672 17.3522 24.3149 18.4442C23.8626 19.5361 23.1997 20.5282 22.364 21.364C21.5282 22.1997 20.5361 22.8626 19.4442 23.3149C18.3522 23.7672 17.1819 24 16 24C14.8181 24 13.6478 23.7672 12.5558 23.3149C11.4639 22.8626 10.4718 22.1997 9.63604 21.364C8.80031 20.5282 8.13738 19.5361 7.68508 18.4442C7.23279 17.3522 7 16.1819 7 15C7 12.6131 7.94821 10.3239 9.63604 8.63604C11.3239 6.94821 13.6131 6 16 6C18.3869 6 20.6761 6.94821 22.364 8.63604C24.0518 10.3239 25 12.6131 25 15Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"qikbar-logo-primary-stroke"})]})})}),r&&y.jsx("button",{className:"qikbar-admin-edit",onClick:()=>e(o=>!o),children:"Edit Qikbar"}),n.length>0&&y.jsxs("div",{className:"qikbar-actions-wrapper",children:[i&&y.jsx("div",{className:"qikbar-actions-panel",children:y.jsx("ul",{className:"qikbar-actions-list",ref:l,children:n.filter(o=>!o.disabled).map(o=>y.jsx("button",{onClick:()=>a(o.click.href,o.click.title,o.click.target),className:"qikbar-action",children:o.title},o.id))})}),y.jsxs("button",{onClick:()=>s(o=>!o),className:"qikbar-actions",children:[y.jsx("span",{className:"qikbar-actions-action",children:"Actions"}),y.jsxs("span",{className:"qikbar-keys",children:[y.jsx("kbd",{className:"qikbar-kbd",children:"Cmd"})," +"," ",y.jsx("kbd",{className:"qikbar-kbd",children:"Enter"})]})]})]})]})}function ul(){const{search:t,setSearch:e,searchRef:r,placeholder:n}=A.useContext(rt);return y.jsx("input",{"data-testid":"qikbar-search",placeholder:n,className:"qikbar-search",ref:r,autoFocus:!0,value:t,onChange:i=>e(i.target.value),name:"search",type:"text"})}function cl({crumbs:t}){const{setCrumbs:e}=A.useContext(rt);return t.length===0?null:y.jsx("ul",{className:"qikbar-crumbs",children:t.map((r,n)=>{const i=t.length-1===n;return y.jsx("li",{className:"qikbar-crumb",children:y.jsxs(br,{to:r.to,onClick:()=>e(s=>i?s:s.slice(0,n+1)),children:[r.title," ",!i&&y.jsx("span",{className:"qikbar-crumb-divider",children:">"})]})},n)})})}const rt=A.createContext(null);function Vi({demo:t=!1,wrapperClass:e="qikbar-command-wrapper",defaultOpen:r=!1}){const n=A.useRef(null),i=ft(),s=Ti(),[a,l]=A.useState(!1),[o,u]=A.useState([]),[c,f]=A.useState([]),[d,m]=A.useState(!1),[v,w]=A.useState(r),[S,O]=A.useState(""),[k,C]=A.useState("Search for resources"),E=A.useRef(),[N,_]=A.useState(0),M=Se();if(A.useEffect(()=>{var z;v&&((z=E.current)==null||z.focus(),_(0),document.body.style.overflow="hidden"),v||(s(""),m(!1),u([]),f([]),document.body.style.overflow="unset")},[v,i.pathname]),A.useEffect(()=>{const z=F=>{var ue,re,de,be,je,te,Fe;if(v&&["Space","ArrowUp","ArrowDown"].indexOf(F.key)>-1&&F.preventDefault(),F.metaKey&&F.key==="Enter"){F.preventDefault(),F.stopPropagation();return}if(v&&F.key==="ArrowDown"&&F.target.localName==="input"&&((ue=n.current)!=null&&ue.getElementsByClassName("qikbar-item")[1])&&(_(1),n.current.getElementsByClassName("qikbar-item")[1].focus()),v&&F.target.localName==="input"&&S===""&&F.key==="Backspace"&&(s(-1),f(ne=>ne.slice(0,-1))),v&&F.key==="Escape"&&!t&&(O(""),s(""),w(!1),u([])),v&&F.key==="Enter"&&F.target.localName==="input"&&((re=n.current)!=null&&re.getElementsByClassName("qikbar-item")[0])&&(n.current.getElementsByClassName("qikbar-item")[0].click(),O("")),v&&F.key==="ArrowDown"&&F.target.getAttribute("data-testid")==="qikbar-item"&&F.target.nextElementSibling){let ne;F.target.nextElementSibling.className==="qikbar-category-wrapper"?ne=F.target.nextElementSibling.nextElementSibling:ne=F.target.nextElementSibling;const ot=Array.prototype.indexOf.call((be=(de=F.target)==null?void 0:de.parentNode)==null?void 0:be.getElementsByClassName("qikbar-item"),ne);_(ot),ne==null||ne.focus()}if(v&&F.key==="ArrowUp"&&F.target.getAttribute("data-testid")==="qikbar-item"&&F.target.previousElementSibling){let ne;if(F.target.previousElementSibling.className==="qikbar-category-wrapper"?ne=F.target.previousElementSibling.previousElementSibling:ne=F.target.previousElementSibling,!ne)return;const ot=Array.prototype.indexOf.call((te=(je=F.target)==null?void 0:je.parentNode)==null?void 0:te.getElementsByClassName("qikbar-item"),ne);_(ot),ne==null||ne.focus()}v&&F.key!=="ArrowUp"&&F.key!=="ArrowDown"&&F.key!=="Enter"&&!F.metaKey&&!t&&(_(0),(Fe=E.current)==null||Fe.focus()),F.metaKey&&F.key==="k"&&!t&&(v&&(s(""),O(""),_(0),u([]),f([])),w(ne=>!ne)),v&&F.key==="Enter"&&O("")};return document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}},[v,S]),!v)return null;const H=!!new URLSearchParams(window.location.search).get("qikbarAdmin");return y.jsxs("div",{className:`${e} ${a&&"qikbar-admin-offset"}`,"data-testid":"command-bar-container",children:[H&&y.jsx("div",{className:a?"qikbar-embedded":"qickbar-embedded-hidden",children:y.jsx("iframe",{src:`http://localhost:3000/sites/${M.id}/edit/?embedded=true`})}),y.jsx(rt.Provider,{value:{demo:t,search:S,searchRef:E,setIsOpen:w,setSearch:O,activeIndex:N,placeholder:k,setPlaceholder:C,setActions:u,setCrumbs:f,crumbs:c,actions:o,showActions:d,setShowActions:m,navigateTo:(z,F,ue="self")=>{var re,de;switch(m(!1),O(""),ue){case"self":_(0),s(z),(re=E.current)==null||re.focus(),z!==(i==null?void 0:i.pathname)&&u([]),n.current.getElementsByClassName("qikbar-list")[0].scrollTo(0,0),f(be=>[...be,{title:F,to:z}]);break;case"internal":s(""),w(!1),f([]),u([]),M!=null&&M.router?(de=M==null?void 0:M.router)==null||de.call(M,z):window.location=z;break;case"external":s(""),w(!1),f([]),u([]),window.open(z,"_blank");break;default:s(z),f(be=>[...be,{title:F,to:z}])}}},children:y.jsxs("div",{className:"qikbar-command-bar",ref:n,children:[y.jsxs("div",{className:"qikbar-search-wrapper",children:[y.jsx(cl,{crumbs:c}),y.jsx(ul,{})]}),y.jsx("div",{className:"qikbar-command-content",children:y.jsx($o,{})}),y.jsx(ll,{enabledAdminEdit:H,showAdminEdit:a,setShowAdminEdit:l})]})})]})}function dl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0M3.124 7.5A8.969 8.969 0 015.292 3m13.416 0a8.969 8.969 0 012.168 4.5"}))}const hl=p.forwardRef(dl);function fl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5m-9-6h.008v.008H12v-.008zM12 15h.008v.008H12V15zm0 2.25h.008v.008H12v-.008zM9.75 15h.008v.008H9.75V15zm0 2.25h.008v.008H9.75v-.008zM7.5 15h.008v.008H7.5V15zm0 2.25h.008v.008H7.5v-.008zm6.75-4.5h.008v.008h-.008v-.008zm0 2.25h.008v.008h-.008V15zm0 2.25h.008v.008h-.008v-.008zm2.25-4.5h.008v.008H16.5v-.008zm0 2.25h.008v.008H16.5V15z"}))}const pl=p.forwardRef(fl);function ml({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"}))}const gl=p.forwardRef(ml);function yl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.362 5.214A8.252 8.252 0 0112 21 8.25 8.25 0 016.038 7.048 8.287 8.287 0 009 9.6a8.983 8.983 0 013.361-6.867 8.21 8.21 0 003 2.48z"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18a3.75 3.75 0 00.495-7.467 5.99 5.99 0 00-1.925 3.546 5.974 5.974 0 01-2.133-1A3.75 3.75 0 0012 18z"}))}const vl=p.forwardRef(yl);function bl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"}))}const wl=p.forwardRef(bl);function Cl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"}))}const El=p.forwardRef(Cl);function Sl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.34 15.84c-.688-.06-1.386-.09-2.09-.09H7.5a4.5 4.5 0 110-9h.75c.704 0 1.402-.03 2.09-.09m0 9.18c.253.962.584 1.892.985 2.783.247.55.06 1.21-.463 1.511l-.657.38c-.551.318-1.26.117-1.527-.461a20.845 20.845 0 01-1.44-4.282m3.102.069a18.03 18.03 0 01-.59-4.59c0-1.586.205-3.124.59-4.59m0 9.18a23.848 23.848 0 018.835 2.535M10.34 6.66a23.847 23.847 0 008.835-2.535m0 0A23.74 23.74 0 0018.795 3m.38 1.125a23.91 23.91 0 011.014 5.395m-1.014 8.855c-.118.38-.245.754-.38 1.125m.38-1.125a23.91 23.91 0 001.014-5.395m0-3.46c.495.413.811 1.035.811 1.73 0 .695-.316 1.317-.811 1.73m0-3.46a24.347 24.347 0 010 3.46"}))}const Rl=p.forwardRef(Sl);function xl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z"}))}const Ol=p.forwardRef(xl);function _l({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 10.5V6a3.75 3.75 0 10-7.5 0v4.5m11.356-1.993l1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 01-1.12-1.243l1.264-12A1.125 1.125 0 015.513 7.5h12.974c.576 0 1.059.435 1.119 1.007zM8.625 10.5a.375.375 0 11-.75 0 .375.375 0 01.75 0zm7.5 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"}))}const Tl=p.forwardRef(_l);function kl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 00-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 00-16.536-1.84M7.5 14.25L5.106 5.272M6 20.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm12.75 0a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"}))}const Dl=p.forwardRef(kl);function Ll({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"}))}const Pl=p.forwardRef(Ll);function jl({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9.563C9 9.252 9.252 9 9.563 9h4.874c.311 0 .563.252.563.563v4.874c0 .311-.252.563-.563.563H9.564A.562.562 0 019 14.437V9.564z"}))}const Fl=p.forwardRef(jl);function Ml({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z"}))}const Nl=p.forwardRef(Ml);function Al({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 18.72a9.094 9.094 0 003.741-.479 3 3 0 00-4.682-2.72m.94 3.198l.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0112 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 016 18.719m12 0a5.971 5.971 0 00-.941-3.197m0 0A5.995 5.995 0 0012 12.75a5.995 5.995 0 00-5.058 2.772m0 0a3 3 0 00-4.681 2.72 8.986 8.986 0 003.74.477m.94-3.197a5.971 5.971 0 00-.94 3.197M15 6.75a3 3 0 11-6 0 3 3 0 016 0zm6 3a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm-13.5 0a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z"}))}const ql=p.forwardRef(Al);function Il({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.42 15.17L17.25 21A2.652 2.652 0 0021 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 11-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 004.486-6.336l-3.276 3.277a3.004 3.004 0 01-2.25-2.25l3.276-3.276a4.5 4.5 0 00-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437l1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008z"}))}const Vl=p.forwardRef(Il);function Ul({title:t,titleId:e,...r},n){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":e},r),t?p.createElement("title",{id:e},t):null,p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75a4.5 4.5 0 01-4.884 4.484c-1.076-.091-2.264.071-2.95.904l-7.152 8.684a2.548 2.548 0 11-3.586-3.586l8.684-7.152c.833-.686.995-1.874.904-2.95a4.5 4.5 0 016.336-4.486l-3.276 3.276a3.004 3.004 0 002.25 2.25l3.276-3.276c.256.565.398 1.192.398 1.852z"}),p.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.867 19.125h.008v.008h-.008v-.008z"}))}const $l=p.forwardRef(Ul);function Bl({iconName:t}){switch(t){case"CalendarIcon":return y.jsx(gl,{});case"CalendarDaysIcon":return y.jsx(pl,{});case"FireIcon":return y.jsx(vl,{});case"MegaphoneIcon":return y.jsx(Rl,{});case"WrenchIcon":return y.jsx($l,{});case"WrenchScrewdriverIcon":return y.jsx(Vl,{});case"ShareIcon":return y.jsx(Ol,{});case"ShoppingBagIcon":return y.jsx(Tl,{});case"ShoppingCartIcon":return y.jsx(Dl,{});case"StarIcon":return y.jsx(Pl,{});case"StopCircleIcon":return y.jsx(Fl,{});case"StopIcon":return y.jsx(Nl,{});case"LockClosedIcon":return y.jsx(El,{});case"LinkIcon":return y.jsx(wl,{});case"UserGroupIcon":return y.jsx(ql,{});case"BellAlertIcon":return y.jsx(hl,{});default:return null}}function er({children:t}){return y.jsx("div",{className:"qikbar-details-container",children:t})}function Ui({children:t}){return y.jsx("ul",{className:"qikbar-list",children:t})}function $i({item:{name:t,children:e,Icon:r}}){return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"qikbar-category-wrapper",children:[r&&y.jsx(r,{}),y.jsx("p",{className:"qikbar-category",children:t})]}),e.map(n=>n.children?y.jsx($i,{item:n},n.id):y.jsx(cn,{item:n},n.id))]})}var Bi=function(t){return t.indexOf("//")===0&&(t=location.protocol+t),t.toLowerCase().replace(/([a-z])?:\/\//,"$1").split("/")[0]},Hl=function(t){if(t)return(t.indexOf(":")>-1||t.indexOf("//")>-1)&&Bi(location.href)!==Bi(t)};function cn({item:{iconName:t,title:e,to:r,description:n,href:i,route:s,action:a,children:l,tag:o}}){const{setIsOpen:u,setCrumbs:c,setActions:f,demo:d}=A.useContext(rt),m=Se();if(l)return null;const v=i?"a":br,w=k=>{var C;m!=null&&m.router&&((C=m==null?void 0:m.router)==null||C.call(m,i),!d&&u(!1),k.preventDefault())},S=r||(s==null?void 0:s.path)||"/",O=i?{...Hl(i)?{rel:"noopener",target:"_blank",href:i,onClick:()=>!d&&u(!1)}:{href:i,onClick:w}}:{to:S,onClick:()=>{f([]),c(k=>[...k,{title:e,to:S}])}};return y.jsxs(v,{"data-testid":"qikbar-item",className:"qikbar-item",...O,onClick:a||(O==null?void 0:O.onClick),children:[y.jsxs("li",{children:[t&&y.jsx(Bl,{iconName:t}),y.jsxs("div",{children:[y.jsx("p",{className:"qikbar-item-title",children:e}),y.jsx("p",{className:"qikbar-item-description",children:n})]})]}),o&&y.jsx("p",{className:"qikbar-item-type",children:o})]})}function wr({placeholder:t}){const{setPlaceholder:e}=A.useContext(rt);return A.useEffect(()=>{e(t)},[e,t]),null}function Hi({fields:t}){return y.jsx("div",{className:"qikbar-details-wrapper",children:y.jsx("div",{className:"qikbar-details",children:t.map((e,r)=>y.jsx("div",{className:"qikbar-fieldset",children:e.map(({label:n,value:i,html:s},a)=>y.jsxs("div",{className:"qikbar-field",children:[n&&y.jsxs("span",{className:"qikbar-field-label",children:[n,":"]}),s?y.jsx("p",{dangerouslySetInnerHTML:{__html:i},className:"qikbar-field-value"}):y.jsx("p",{className:"qikbar-field-value",children:i})]},a))},r))})})}function Qi({categories:t,placeholderText:e}){var c;const{activeIndex:r,search:n,setActions:i,navigateTo:s}=A.useContext(rt),a=t.map(f=>({...f,children:f.commands.filter(d=>d.title.toLowerCase().includes(n.toLowerCase()))})).filter(f=>f.children.length>0),o=a.reduce((f,d)=>[...f,...d.children],[])[r],u=o==null?void 0:o.actions;return o==null||o.fields,A.useEffect(()=>{i(o&&u?u:[])},[o,n,r]),a.length===0?y.jsxs(er,{children:[y.jsx(wr,{placeholder:e}),y.jsx("div",{className:"qikbar-item-empty",children:"No matches"})]}):y.jsxs(y.Fragment,{children:[y.jsx(wr,{placeholder:e}),y.jsxs(er,{children:[y.jsx(Ui,{children:a.map(f=>f.children?y.jsx($i,{item:f},f.name):y.jsx(cn,{item:f},f.id))}),o&&((c=o==null?void 0:o.details)==null?void 0:c.length)>0&&y.jsx(Hi,{fields:o.details})]})]})}class tr{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.push(e),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(r=>r!==e),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const rr=typeof window>"u"||"Deno"in window;function Te(){}function Ql(t,e){return typeof t=="function"?t(e):t}function dn(t){return typeof t=="number"&&t>=0&&t!==1/0}function zi(t,e){return Math.max(t+(e||0)-Date.now(),0)}function nr(t,e,r){return Cr(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function nt(t,e,r){return Cr(t)?[{...e,queryKey:t},r]:[t||{},e]}function Wi(t,e){const{type:r="all",exact:n,fetchStatus:i,predicate:s,queryKey:a,stale:l}=t;if(Cr(a)){if(n){if(e.queryHash!==hn(a,e.options))return!1}else if(!kt(e.queryKey,a))return!1}if(r!=="all"){const o=e.isActive();if(r==="active"&&!o||r==="inactive"&&o)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||typeof i<"u"&&i!==e.state.fetchStatus||s&&!s(e))}function Ki(t,e){const{exact:r,fetching:n,predicate:i,mutationKey:s}=t;if(Cr(s)){if(!e.options.mutationKey)return!1;if(r){if(mt(e.options.mutationKey)!==mt(s))return!1}else if(!kt(e.options.mutationKey,s))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||i&&!i(e))}function hn(t,e){return((e==null?void 0:e.queryKeyHashFn)||mt)(t)}function mt(t){return JSON.stringify(t,(e,r)=>fn(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function kt(t,e){return Yi(t,e)}function Yi(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(r=>!Yi(t[r],e[r])):!1}function Gi(t,e){if(t===e)return t;const r=Ji(t)&&Ji(e);if(r||fn(t)&&fn(e)){const n=r?t.length:Object.keys(t).length,i=r?e:Object.keys(e),s=i.length,a=r?[]:{};let l=0;for(let o=0;o<s;o++){const u=r?o:i[o];a[u]=Gi(t[u],e[u]),a[u]===t[u]&&l++}return n===s&&l===n?t:a}return e}function Zi(t,e){if(t&&!e||e&&!t)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function Ji(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function fn(t){if(!Xi(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const r=e.prototype;return!(!Xi(r)||!r.hasOwnProperty("isPrototypeOf"))}function Xi(t){return Object.prototype.toString.call(t)==="[object Object]"}function Cr(t){return Array.isArray(t)}function es(t){return new Promise(e=>{setTimeout(e,t)})}function ts(t){es(0).then(t)}function zl(){if(typeof AbortController=="function")return new AbortController}function pn(t,e,r){return r.isDataEqual!=null&&r.isDataEqual(t,e)?t:typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?Gi(t,e):e}class Wl extends tr{constructor(){super(),this.setup=e=>{if(!rr&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.focused=e,e&&this.onFocus()}onFocus(){this.listeners.forEach(e=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Er=new Wl;class Kl extends tr{constructor(){super(),this.setup=e=>{if(!rr&&window.addEventListener){const r=()=>e();return window.addEventListener("online",r,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(e){this.online=e,e&&this.onOnline()}onOnline(){this.listeners.forEach(e=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Sr=new Kl;function Yl(t){return Math.min(1e3*2**t,3e4)}function Rr(t){return(t??"online")==="online"?Sr.isOnline():!0}class rs{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function xr(t){return t instanceof rs}function ns(t){let e=!1,r=0,n=!1,i,s,a;const l=new Promise((S,O)=>{s=S,a=O}),o=S=>{n||(m(new rs(S)),t.abort==null||t.abort())},u=()=>{e=!0},c=()=>{e=!1},f=()=>!Er.isFocused()||t.networkMode!=="always"&&!Sr.isOnline(),d=S=>{n||(n=!0,t.onSuccess==null||t.onSuccess(S),i==null||i(),s(S))},m=S=>{n||(n=!0,t.onError==null||t.onError(S),i==null||i(),a(S))},v=()=>new Promise(S=>{i=O=>{if(n||!f())return S(O)},t.onPause==null||t.onPause()}).then(()=>{i=void 0,n||t.onContinue==null||t.onContinue()}),w=()=>{if(n)return;let S;try{S=t.fn()}catch(O){S=Promise.reject(O)}Promise.resolve(S).then(d).catch(O=>{var k,C;if(n)return;const E=(k=t.retry)!=null?k:3,N=(C=t.retryDelay)!=null?C:Yl,_=typeof N=="function"?N(r,O):N,M=E===!0||typeof E=="number"&&r<E||typeof E=="function"&&E(r,O);if(e||!M){m(O);return}r++,t.onFail==null||t.onFail(r,O),es(_).then(()=>{if(f())return v()}).then(()=>{e?m(O):w()})})};return Rr(t.networkMode)?w():v().then(w),{promise:l,cancel:o,continue:()=>{i==null||i()},cancelRetry:u,continueRetry:c}}const mn=console;function Gl(){let t=[],e=0,r=c=>{c()},n=c=>{c()};const i=c=>{let f;e++;try{f=c()}finally{e--,e||l()}return f},s=c=>{e?t.push(c):ts(()=>{r(c)})},a=c=>(...f)=>{s(()=>{c(...f)})},l=()=>{const c=t;t=[],c.length&&ts(()=>{n(()=>{c.forEach(f=>{r(f)})})})};return{batch:i,batchCalls:a,schedule:s,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{n=c}}}const le=Gl();class is{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),dn(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(rr?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class Zl extends is{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||mn,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||Jl(this.options),this.state=this.initialState}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(e,r){const n=pn(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){this.dispatch({type:"setState",state:e,setStateOptions:r})}cancel(e){var r;const n=this.promise;return(r=this.retryer)==null||r.cancel(e),n?n.then(Te).catch(Te):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!zi(this.state.dataUpdatedAt,e)}onFocus(){var e;const r=this.observers.find(n=>n.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;const r=this.observers.find(n=>n.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.indexOf(e)===-1&&(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.indexOf(e)!==-1&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,r){var n,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var s;return(s=this.retryer)==null||s.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const m=this.observers.find(v=>v.options.queryFn);m&&this.setOptions(m.options)}Array.isArray(this.options.queryKey)||process.env.NODE_ENV!=="production"&&this.logger.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 a=zl(),l={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},o=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};o(l);const u=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(l)):Promise.reject("Missing queryFn"),c={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:u};if(o(c),(n=this.options.behavior)==null||n.onFetch(c),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=c.fetchOptions)==null?void 0:i.meta)){var f;this.dispatch({type:"fetch",meta:(f=c.fetchOptions)==null?void 0:f.meta})}const d=m=>{if(xr(m)&&m.silent||this.dispatch({type:"error",error:m}),!xr(m)){var v,w;(v=(w=this.cache.config).onError)==null||v.call(w,m,this),process.env.NODE_ENV!=="production"&&this.logger.error(m)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=ns({fn:c.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:m=>{var v,w;if(typeof m>"u"){process.env.NODE_ENV!=="production"&&this.logger.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),d(new Error("undefined"));return}this.setData(m),(v=(w=this.cache.config).onSuccess)==null||v.call(w,m,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(m,v)=>{this.dispatch({type:"failed",failureCount:m,error:v})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const r=n=>{var i,s;switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=e.meta)!=null?i:null,fetchStatus:Rr(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(s=e.dataUpdatedAt)!=null?s:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=e.error;return xr(a)&&a.revert&&this.revertState?{...this.revertState}:{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),le.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}function Jl(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=typeof e<"u",n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class Xl extends tr{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,r,n){var i;const s=r.queryKey,a=(i=r.queryHash)!=null?i:hn(s,r);let l=this.get(a);return l||(l=new Zl({cache:this,logger:e.getLogger(),queryKey:s,queryHash:a,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(l)),l}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const r=this.queriesMap[e.queryHash];r&&(e.destroy(),this.queries=this.queries.filter(n=>n!==e),r===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){le.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,r){const[n]=nt(e,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(i=>Wi(n,i))}findAll(e,r){const[n]=nt(e,r);return Object.keys(n).length>0?this.queries.filter(i=>Wi(n,i)):this.queries}notify(e){le.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){le.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){le.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class eu extends is{constructor(e){super(),this.options={...e.defaultOptions,...e.options},this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||mn,this.observers=[],this.state=e.state||tu(),this.updateCacheTime(this.options.cacheTime),this.scheduleGc()}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.indexOf(e)===-1&&(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(r=>r!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()}async execute(){const e=()=>{var C;return this.retryer=ns({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(E,N)=>{this.dispatch({type:"failed",failureCount:E,error:N})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(C=this.options.retry)!=null?C:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,i,s,a,l,o;if(!r){var u,c,f,d;this.dispatch({type:"loading",variables:this.options.variables}),await((u=(c=this.mutationCache.config).onMutate)==null?void 0:u.call(c,this.state.variables,this));const E=await((f=(d=this.options).onMutate)==null?void 0:f.call(d,this.state.variables));E!==this.state.context&&this.dispatch({type:"loading",context:E,variables:this.state.variables})}const C=await e();return await((n=(i=this.mutationCache.config).onSuccess)==null?void 0:n.call(i,C,this.state.variables,this.state.context,this)),await((s=(a=this.options).onSuccess)==null?void 0:s.call(a,C,this.state.variables,this.state.context)),await((l=(o=this.options).onSettled)==null?void 0:l.call(o,C,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:C}),C}catch(C){try{var m,v,w,S,O,k;throw await((m=(v=this.mutationCache.config).onError)==null?void 0:m.call(v,C,this.state.variables,this.state.context,this)),process.env.NODE_ENV!=="production"&&this.logger.error(C),await((w=(S=this.options).onError)==null?void 0:w.call(S,C,this.state.variables,this.state.context)),await((O=(k=this.options).onSettled)==null?void 0:O.call(k,void 0,C,this.state.variables,this.state.context)),C}finally{this.dispatch({type:"error",error:C})}}}dispatch(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Rr(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...n,...e.state}}};this.state=r(this.state),le.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function tu(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class ru extends tr{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,r,n){const i=new eu({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(r),state:n,defaultOptions:r.mutationKey?e.getMutationDefaults(r.mutationKey):void 0});return this.add(i),i}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(r=>r!==e),this.notify({type:"removed",mutation:e})}clear(){le.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return typeof e.exact>"u"&&(e.exact=!0),this.mutations.find(r=>Ki(e,r))}findAll(e){return this.mutations.filter(r=>Ki(e,r))}notify(e){le.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.mutations.filter(r=>r.state.isPaused);return le.batch(()=>e.reduce((r,n)=>r.then(()=>n.continue().catch(Te)),Promise.resolve()))}}function nu(){return{onFetch:t=>{t.fetchFn=()=>{var e,r,n,i,s,a;const l=(e=t.fetchOptions)==null||(r=e.meta)==null?void 0:r.refetchPage,o=(n=t.fetchOptions)==null||(i=n.meta)==null?void 0:i.fetchMore,u=o==null?void 0:o.pageParam,c=(o==null?void 0:o.direction)==="forward",f=(o==null?void 0:o.direction)==="backward",d=((s=t.state.data)==null?void 0:s.pages)||[],m=((a=t.state.data)==null?void 0:a.pageParams)||[];let v=m,w=!1;const S=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>{var M;if((M=t.signal)!=null&&M.aborted)w=!0;else{var j;(j=t.signal)==null||j.addEventListener("abort",()=>{w=!0})}return t.signal}})},O=t.options.queryFn||(()=>Promise.reject("Missing queryFn")),k=(_,M,j,H)=>(v=H?[M,...v]:[...v,M],H?[j,..._]:[..._,j]),C=(_,M,j,H)=>{if(w)return Promise.reject("Cancelled");if(typeof j>"u"&&!M&&_.length)return Promise.resolve(_);const z={queryKey:t.queryKey,pageParam:j,meta:t.options.meta};S(z);const F=O(z);return Promise.resolve(F).then(re=>k(_,j,re,H))};let E;if(!d.length)E=C([]);else if(c){const _=typeof u<"u",M=_?u:ss(t.options,d);E=C(d,_,M)}else if(f){const _=typeof u<"u",M=_?u:iu(t.options,d);E=C(d,_,M,!0)}else{v=[];const _=typeof t.options.getNextPageParam>"u";E=(l&&d[0]?l(d[0],0,d):!0)?C([],_,m[0]):Promise.resolve(k([],m[0],d[0]));for(let j=1;j<d.length;j++)E=E.then(H=>{if(l&&d[j]?l(d[j],j,d):!0){const F=_?m[j]:ss(t.options,H);return C(H,_,F)}return Promise.resolve(k(H,m[j],d[j]))})}return E.then(_=>({pages:_,pageParams:v}))}}}}function ss(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function iu(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}class su{constructor(e={}){this.queryCache=e.queryCache||new Xl,this.mutationCache=e.mutationCache||new ru,this.logger=e.logger||mn,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0,process.env.NODE_ENV!=="production"&&e.logger&&this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.")}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Er.subscribe(()=>{Er.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Sr.subscribe(()=>{Sr.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,r;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(e,r){const[n]=nt(e,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state.data}ensureQueryData(e,r,n){const i=nr(e,r,n),s=this.getQueryData(i.queryKey);return s?Promise.resolve(s):this.fetchQuery(i)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:r,state:n})=>{const i=n.data;return[r,i]})}setQueryData(e,r,n){const i=this.queryCache.find(e),s=i==null?void 0:i.state.data,a=Ql(r,s);if(typeof a>"u")return;const l=nr(e),o=this.defaultQueryOptions(l);return this.queryCache.build(this,o).setData(a,{...n,manual:!0})}setQueriesData(e,r,n){return le.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,r,n)]))}getQueryState(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state}removeQueries(e,r){const[n]=nt(e,r),i=this.queryCache;le.batch(()=>{i.findAll(n).forEach(s=>{i.remove(s)})})}resetQueries(e,r,n){const[i,s]=nt(e,r,n),a=this.queryCache,l={type:"active",...i};return le.batch(()=>(a.findAll(i).forEach(o=>{o.reset()}),this.refetchQueries(l,s)))}cancelQueries(e,r,n){const[i,s={}]=nt(e,r,n);typeof s.revert>"u"&&(s.revert=!0);const a=le.batch(()=>this.queryCache.findAll(i).map(l=>l.cancel(s)));return Promise.all(a).then(Te).catch(Te)}invalidateQueries(e,r,n){const[i,s]=nt(e,r,n);return le.batch(()=>{var a,l;if(this.queryCache.findAll(i).forEach(u=>{u.invalidate()}),i.refetchType==="none")return Promise.resolve();const o={...i,type:(a=(l=i.refetchType)!=null?l:i.type)!=null?a:"active"};return this.refetchQueries(o,s)})}refetchQueries(e,r,n){const[i,s]=nt(e,r,n),a=le.batch(()=>this.queryCache.findAll(i).filter(o=>!o.isDisabled()).map(o=>{var u;return o.fetch(void 0,{...s,cancelRefetch:(u=s==null?void 0:s.cancelRefetch)!=null?u:!0,meta:{refetchPage:i.refetchPage}})}));let l=Promise.all(a).then(Te);return s!=null&&s.throwOnError||(l=l.catch(Te)),l}fetchQuery(e,r,n){const i=nr(e,r,n),s=this.defaultQueryOptions(i);typeof s.retry>"u"&&(s.retry=!1);const a=this.queryCache.build(this,s);return a.isStaleByTime(s.staleTime)?a.fetch(s):Promise.resolve(a.state.data)}prefetchQuery(e,r,n){return this.fetchQuery(e,r,n).then(Te).catch(Te)}fetchInfiniteQuery(e,r,n){const i=nr(e,r,n);return i.behavior=nu(),this.fetchQuery(i)}prefetchInfiniteQuery(e,r,n){return this.fetchInfiniteQuery(e,r,n).then(Te).catch(Te)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,r){const n=this.queryDefaults.find(i=>mt(e)===mt(i.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:e,defaultOptions:r})}getQueryDefaults(e){if(!e)return;const r=this.queryDefaults.find(n=>kt(e,n.queryKey));return process.env.NODE_ENV!=="production"&&this.queryDefaults.filter(i=>kt(e,i.queryKey)).length>1&&this.logger.error("[QueryClient] Several query defaults match with key '"+JSON.stringify(e)+"'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults."),r==null?void 0:r.defaultOptions}setMutationDefaults(e,r){const n=this.mutationDefaults.find(i=>mt(e)===mt(i.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:e,defaultOptions:r})}getMutationDefaults(e){if(!e)return;const r=this.mutationDefaults.find(n=>kt(e,n.mutationKey));return process.env.NODE_ENV!=="production"&&this.mutationDefaults.filter(i=>kt(e,i.mutationKey)).length>1&&this.logger.error("[QueryClient] Several mutation defaults match with key '"+JSON.stringify(e)+"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults."),r==null?void 0:r.defaultOptions}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const r={...this.defaultOptions.queries,...this.getQueryDefaults(e==null?void 0:e.queryKey),...e,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=hn(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(e==null?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class au extends tr{constructor(e,r){super(),this.client=e,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.length===1&&(this.currentQuery.addObserver(this),as(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return gn(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return gn(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,r){const n=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),process.env.NODE_ENV!=="production"&&typeof(e==null?void 0:e.isDataEqual)<"u"&&this.client.getLogger().error("The isDataEqual option has been deprecated and will be removed in the next major version. You can achieve the same functionality by passing a function as the structuralSharing option"),Zi(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const s=this.hasListeners();s&&os(this.currentQuery,i,this.options,n)&&this.executeFetch(),this.updateResult(r),s&&(this.currentQuery!==i||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();s&&(this.currentQuery!==i||this.options.enabled!==n.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(e){const r=this.client.getQueryCache().build(this.client,e);return this.createResult(r,e)}getCurrentResult(){return this.currentResult}trackResult(e){const r={};return Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...r}={}){return this.fetch({...r,meta:{refetchPage:e}})}fetchOptimistic(e){const r=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(e){var r;return this.executeFetch({...e,cancelRefetch:(r=e.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let r=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(Te)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),rr||this.currentResult.isStale||!dn(this.options.staleTime))return;const r=zi(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(rr||this.options.enabled===!1||!dn(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Er.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,r){const n=this.currentQuery,i=this.options,s=this.currentResult,a=this.currentResultState,l=this.currentResultOptions,o=e!==n,u=o?e.state:this.currentQueryInitialState,c=o?this.currentResult:this.previousQueryResult,{state:f}=e;let{dataUpdatedAt:d,error:m,errorUpdatedAt:v,fetchStatus:w,status:S}=f,O=!1,k=!1,C;if(r._optimisticResults){const j=this.hasListeners(),H=!j&&as(e,r),z=j&&os(e,n,r,i);(H||z)&&(w=Rr(e.options.networkMode)?"fetching":"paused",d||(S="loading")),r._optimisticResults==="isRestoring"&&(w="idle")}if(r.keepPreviousData&&!f.dataUpdatedAt&&c!=null&&c.isSuccess&&S!=="error")C=c.data,d=c.dataUpdatedAt,S=c.status,O=!0;else if(r.select&&typeof f.data<"u")if(s&&f.data===(a==null?void 0:a.data)&&r.select===this.selectFn)C=this.selectResult;else try{this.selectFn=r.select,C=r.select(f.data),C=pn(s==null?void 0:s.data,C,r),this.selectResult=C,this.selectError=null}catch(j){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(j),this.selectError=j}else C=f.data;if(typeof r.placeholderData<"u"&&typeof C>"u"&&S==="loading"){let j;if(s!=null&&s.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData))j=s.data;else if(j=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof j<"u")try{j=r.select(j),this.selectError=null}catch(H){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(H),this.selectError=H}typeof j<"u"&&(S="success",C=pn(s==null?void 0:s.data,j,r),k=!0)}this.selectError&&(m=this.selectError,C=this.selectResult,v=Date.now(),S="error");const E=w==="fetching",N=S==="loading",_=S==="error";return{status:S,fetchStatus:w,isLoading:N,isSuccess:S==="success",isError:_,isInitialLoading:N&&E,data:C,dataUpdatedAt:d,error:m,errorUpdatedAt:v,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:E,isRefetching:E&&!N,isLoadingError:_&&f.dataUpdatedAt===0,isPaused:w==="paused",isPlaceholderData:k,isPreviousData:O,isRefetchError:_&&f.dataUpdatedAt!==0,isStale:yn(e,r),refetch:this.refetch,remove:this.remove}}updateResult(e){const r=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Zi(n,r))return;this.currentResult=n;const i={cache:!0},s=()=>{if(!r)return!0;const{notifyOnChangeProps:a}=this.options;if(a==="all"||!a&&!this.trackedProps.size)return!0;const l=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(o=>{const u=o;return this.currentResult[u]!==r[u]&&l.has(u)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),this.notify({...i,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const r={};e.type==="success"?r.onSuccess=!e.manual:e.type==="error"&&!xr(e.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(e){le.batch(()=>{if(e.onSuccess){var r,n,i,s;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(i=(s=this.options).onSettled)==null||i.call(s,this.currentResult.data,null)}else if(e.onError){var a,l,o,u;(a=(l=this.options).onError)==null||a.call(l,this.currentResult.error),(o=(u=this.options).onSettled)==null||o.call(u,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(c=>{c(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function ou(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function as(t,e){return ou(t,e)||t.state.dataUpdatedAt>0&&gn(t,e,e.refetchOnMount)}function gn(t,e,r){if(e.enabled!==!1){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&yn(t,e)}return!1}function os(t,e,r,n){return r.enabled!==!1&&(t!==e||n.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&yn(t,r)}function yn(t,e){return t.isStaleByTime(e.staleTime)}var lu=Zr();const uu=lu.useSyncExternalStore,ls=p.createContext(void 0),us=p.createContext(!1);function cs(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=ls),window.ReactQueryClientContext):ls)}const cu=({context:t}={})=>{const e=p.useContext(cs(t,p.useContext(us)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},ds=({client:t,children:e,context:r,contextSharing:n=!1})=>{p.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),process.env.NODE_ENV!=="production"&&n&&t.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const i=cs(r,n);return p.createElement(us.Provider,{value:!r&&n},p.createElement(i.Provider,{value:t},e))},hs=p.createContext(!1),du=()=>p.useContext(hs);hs.Provider;function hu(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const fu=p.createContext(hu()),pu=()=>p.useContext(fu);function mu(t,e){return typeof t=="function"?t(...e):!!t}const gu=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},yu=t=>{p.useEffect(()=>{t.clearReset()},[t])},vu=({result:t,errorResetBoundary:e,useErrorBoundary:r,query:n})=>t.isError&&!e.isReset()&&!t.isFetching&&mu(r,[t.error,n]),bu=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},wu=(t,e)=>t.isLoading&&t.isFetching&&!e,Cu=(t,e,r)=>(t==null?void 0:t.suspense)&&wu(e,r),Eu=(t,e,r)=>e.fetchOptimistic(t).then(({data:n})=>{t.onSuccess==null||t.onSuccess(n),t.onSettled==null||t.onSettled(n,null)}).catch(n=>{r.clearReset(),t.onError==null||t.onError(n),t.onSettled==null||t.onSettled(void 0,n)});function Su(t,e){const r=cu({context:t.context}),n=du(),i=pu(),s=r.defaultQueryOptions(t);s._optimisticResults=n?"isRestoring":"optimistic",s.onError&&(s.onError=le.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=le.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=le.batchCalls(s.onSettled)),bu(s),gu(s,i),yu(i);const[a]=p.useState(()=>new e(r,s)),l=a.getOptimisticResult(s);if(uu(p.useCallback(o=>n?()=>{}:a.subscribe(le.batchCalls(o)),[a,n]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),p.useEffect(()=>{a.setOptions(s,{listeners:!1})},[s,a]),Cu(s,l,n))throw Eu(s,a,i);if(vu({result:l,errorResetBoundary:i,useErrorBoundary:s.useErrorBoundary,query:a.getCurrentQuery()}))throw l.error;return s.notifyOnChangeProps?l:a.trackResult(l)}function Ru(t,e,r){const n=nr(t,e,r);return Su(n,au)}function xu(t,e){const[r,n]=A.useState(t);return A.useEffect(()=>{const i=setTimeout(()=>{n(t)},e);return()=>{clearTimeout(i)}},[t,e]),r}var Ou="Expected a function",fs="__lodash_hash_undefined__",ps=1/0,_u="[object Function]",Tu="[object GeneratorFunction]",ku="[object Symbol]",Du=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Lu=/^\w*$/,Pu=/^\./,ju=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fu=/[\\^$.*+?()[\]{}|]/g,Mu=/\\(\\)?/g,Nu=/^\[object .+?Constructor\]$/,Au=typeof cr=="object"&&cr&&cr.Object===Object&&cr,qu=typeof self=="object"&&self&&self.Object===Object&&self,vn=Au||qu||Function("return this")();function Iu(t,e){return t==null?void 0:t[e]}function Vu(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var Uu=Array.prototype,$u=Function.prototype,ms=Object.prototype,bn=vn["__core-js_shared__"],gs=function(){var t=/[^.]+$/.exec(bn&&bn.keys&&bn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ys=$u.toString,wn=ms.hasOwnProperty,vs=ms.toString,Bu=RegExp("^"+ys.call(wn).replace(Fu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bs=vn.Symbol,Hu=Uu.splice,Qu=Es(vn,"Map"),ir=Es(Object,"create"),ws=bs?bs.prototype:void 0,Cs=ws?ws.toString:void 0;function gt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function zu(){this.__data__=ir?ir(null):{}}function Wu(t){return this.has(t)&&delete this.__data__[t]}function Ku(t){var e=this.__data__;if(ir){var r=e[t];return r===fs?void 0:r}return wn.call(e,t)?e[t]:void 0}function Yu(t){var e=this.__data__;return ir?e[t]!==void 0:wn.call(e,t)}function Gu(t,e){var r=this.__data__;return r[t]=ir&&e===void 0?fs:e,this}gt.prototype.clear=zu,gt.prototype.delete=Wu,gt.prototype.get=Ku,gt.prototype.has=Yu,gt.prototype.set=Gu;function Dt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Zu(){this.__data__=[]}function Ju(t){var e=this.__data__,r=Or(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Hu.call(e,r,1),!0}function Xu(t){var e=this.__data__,r=Or(e,t);return r<0?void 0:e[r][1]}function ec(t){return Or(this.__data__,t)>-1}function tc(t,e){var r=this.__data__,n=Or(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}Dt.prototype.clear=Zu,Dt.prototype.delete=Ju,Dt.prototype.get=Xu,Dt.prototype.has=ec,Dt.prototype.set=tc;function yt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function rc(){this.__data__={hash:new gt,map:new(Qu||Dt),string:new gt}}function nc(t){return _r(this,t).delete(t)}function ic(t){return _r(this,t).get(t)}function sc(t){return _r(this,t).has(t)}function ac(t,e){return _r(this,t).set(t,e),this}yt.prototype.clear=rc,yt.prototype.delete=nc,yt.prototype.get=ic,yt.prototype.has=sc,yt.prototype.set=ac;function Or(t,e){for(var r=t.length;r--;)if(yc(t[r][0],e))return r;return-1}function oc(t,e){e=dc(e,t)?[e]:cc(e);for(var r=0,n=e.length;t!=null&&r<n;)t=t[mc(e[r++])];return r&&r==n?t:void 0}function lc(t){if(!Rs(t)||fc(t))return!1;var e=vc(t)||Vu(t)?Bu:Nu;return e.test(gc(t))}function uc(t){if(typeof t=="string")return t;if(En(t))return Cs?Cs.call(t):"";var e=t+"";return e=="0"&&1/t==-ps?"-0":e}function cc(t){return Ss(t)?t:pc(t)}function _r(t,e){var r=t.__data__;return hc(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Es(t,e){var r=Iu(t,e);return lc(r)?r:void 0}function dc(t,e){if(Ss(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||En(t)?!0:Lu.test(t)||!Du.test(t)||e!=null&&t in Object(e)}function hc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function fc(t){return!!gs&&gs in t}var pc=Cn(function(t){t=wc(t);var e=[];return Pu.test(t)&&e.push(""),t.replace(ju,function(r,n,i,s){e.push(i?s.replace(Mu,"$1"):n||r)}),e});function mc(t){if(typeof t=="string"||En(t))return t;var e=t+"";return e=="0"&&1/t==-ps?"-0":e}function gc(t){if(t!=null){try{return ys.call(t)}catch{}try{return t+""}catch{}}return""}function Cn(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(Ou);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=t.apply(this,n);return r.cache=s.set(i,a),a};return r.cache=new(Cn.Cache||yt),r}Cn.Cache=yt;function yc(t,e){return t===e||t!==t&&e!==e}var Ss=Array.isArray;function vc(t){var e=Rs(t)?vs.call(t):"";return e==_u||e==Tu}function Rs(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function bc(t){return!!t&&typeof t=="object"}function En(t){return typeof t=="symbol"||bc(t)&&vs.call(t)==ku}function wc(t){return t==null?"":uc(t)}function Cc(t,e,r){var n=t==null?void 0:oc(t,e);return n===void 0?r:n}var Ec=Cc;class Le{constructor(e,r,n,i,s){this.kind=e,this.input=r,this.begin=n,this.end=i,this.file=s}getText(){return this.input.slice(this.begin,this.end)}getPosition(){let[e,r]=[1,1];for(let n=0;n<this.begin;n++)this.input[n]===`
90
+ `?(e++,r=1):r++;return[e,r]}size(){return this.end-this.begin}}class vt{liquidMethodMissing(e){}}const Sc=Object.prototype.toString,xs=String.prototype.toLowerCase,Os=Object.hasOwnProperty;function We(t){return typeof t=="string"}function we(t){return typeof t=="function"}function Rc(t){return t&&we(t.then)}function Tr(t){return t&&we(t.next)&&we(t.throw)&&we(t.return)}function xc(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function $(t){return t=B(t),We(t)?t:Ke(t)?"":Ee(t)?t.map(e=>$(e)).join(""):String(t)}function B(t){return t instanceof vt&&we(t.valueOf)?t.valueOf():t}function kr(t){return typeof t=="number"}function _s(t){return t&&we(t.toLiquid)?_s(t.toLiquid()):t}function Ke(t){return t==null}function Ee(t){return Sc.call(t)==="[object Array]"}function Oc(t){return Rn(t)&&Symbol.iterator in t}function Ts(t,e){t=t||{};for(const r in t)if(Os.call(t,r)&&e(t[r],r,t)===!1)break;return t}function Sn(t){return t[t.length-1]}function Rn(t){const e=typeof t;return t!==null&&(e==="object"||e==="function")}function ks(t,e,r=1){const n=[];for(let i=t;i<e;i+=r)n.push(i);return n}function Dr(t,e,r=" "){return Ds(t,e,r,(n,i)=>i+n)}function _c(t,e,r=" "){return Ds(t,e,r,(n,i)=>n+i)}function Ds(t,e,r,n){t=String(t);let i=e-t.length;for(;i-- >0;)t=n(t,r);return t}function Ls(t){return t}function Tc(t){return[...t].some(r=>r>="a"&&r<="z")?t.toUpperCase():t.toLowerCase()}function kc(t,e){return t.length>e?t.slice(0,e-3)+"...":t}function Ps(t,e){return t==null&&e==null?0:t==null?1:e==null||(t=xs.call(t),e=xs.call(e),t<e)?-1:t>e?1:0}function Re(t){return(...e)=>t(...e.map(B))}function xn(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}class Lr extends Error{constructor(e,r){super(e.message),this.originalError=e,this.token=r,this.context=""}update(){const e=this.originalError;this.context=Fc(this.token),this.message=Mc(e.message,this.token),this.stack=this.message+`
91
91
  `+this.context+`
92
92
  `+this.stack+`
93
- From `+e.stack}}class xn extends kr{constructor(e,r){super(new Error(e),r),this.name="TokenizationError",super.update()}}class Tc extends kr{constructor(e,r){super(e,r),this.name="ParseError",this.message=e.message,super.update()}}class Ps extends kr{constructor(e,r){super(e,r.token),this.name="RenderError",this.message=e.message,super.update()}static is(e){return e.name==="RenderError"}}class kc extends kr{constructor(e,r){super(e,r),this.name="UndefinedVariableError",this.message=e.message,super.update()}}class Dc extends Error{constructor(e){super(`undefined variable: ${e}`),this.name="InternalUndefinedVariableError",this.variableName=e}}class Lc extends Error{constructor(e){super(e),this.name="AssertionError",this.message=e+""}}function Pc(t){const[e]=t.getPosition(),r=t.input.split(`
94
- `),n=Math.max(e-2,1),i=Math.min(e+3,r.length);return Ts(n,i+1).map(a=>{const o=a===e?">> ":" ",l=Tr(String(a),String(i).length),c=r[a-1];return`${o}${l}| ${c}`}).join(`
95
- `)}function Fc(t,e){e.file&&(t+=`, file:${e.file}`);const[r,n]=e.getPosition();return t+=`, line:${r}, col:${n}`,t}const ee=[0,0,0,0,0,0,0,0,0,20,4,4,4,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,8,0,0,0,0,8,0,0,0,64,0,65,0,0,33,33,33,33,33,33,33,33,33,33,0,0,2,2,2,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],On=1,Dr=4,Fs=8,Ms=16,Mc=32,jc=64;ee[160]=ee[5760]=ee[6158]=ee[8192]=ee[8193]=ee[8194]=ee[8195]=ee[8196]=ee[8197]=ee[8198]=ee[8199]=ee[8200]=ee[8201]=ee[8202]=ee[8232]=ee[8233]=ee[8239]=ee[8287]=ee[12288]=Dr;function fe(t,e){if(!t){const r=typeof e=="function"?e():e||`expect ${t} to be true`;throw new Lc(r)}}class Nc extends gt{equals(e){return ze($(e))}gt(){return!1}geq(){return!1}lt(){return!1}leq(){return!1}valueOf(){return null}}class Lr extends gt{equals(e){return e instanceof Lr?!1:(e=$(e),Qe(e)||Ce(e)?e.length===0:Rn(e)?Object.keys(e).length===0:!1)}gt(){return!1}geq(){return!1}lt(){return!1}leq(){return!1}valueOf(){return""}}class Ac extends Lr{equals(e){return e===!1||ze($(e))?!0:Qe(e)?/^\s*$/.test(e):super.equals(e)}}class _n extends gt{constructor(e,r,n){super(),this.i=0,this.length=e,this.name=`${n}-${r}`}next(){this.i++}index0(){return this.i}index(){return this.i+1}first(){return this.i===0}last(){return this.i===this.length-1}rindex(){return this.length-this.i}rindex0(){return this.length-this.i-1}valueOf(){return JSON.stringify(this)}}class js extends gt{constructor(e=()=>""){super(),this.superBlockRender=e}super(){return this.superBlockRender()}}function Re(t){return t&&be(t.equals)}const Ns=new Nc,As={true:!0,false:!1,nil:Ns,null:Ns,empty:new Lr,blank:new Ac};function qc(t){const e={};for(const[r,n]of Object.entries(t)){let i=e;for(let s=0;s<r.length;s++){const a=r[s];i[a]=i[a]||{},s===r.length-1&&ee[r.charCodeAt(s)]&On&&(i[a].needBoundary=!0),i=i[a]}i.handler=n,i.end=!0}return e}/*! *****************************************************************************
93
+ From `+e.stack}}class On extends Lr{constructor(e,r){super(new Error(e),r),this.name="TokenizationError",super.update()}}class Dc extends Lr{constructor(e,r){super(e,r),this.name="ParseError",this.message=e.message,super.update()}}class js extends Lr{constructor(e,r){super(e,r.token),this.name="RenderError",this.message=e.message,super.update()}static is(e){return e.name==="RenderError"}}class Lc extends Lr{constructor(e,r){super(e,r),this.name="UndefinedVariableError",this.message=e.message,super.update()}}class Pc extends Error{constructor(e){super(`undefined variable: ${e}`),this.name="InternalUndefinedVariableError",this.variableName=e}}class jc extends Error{constructor(e){super(e),this.name="AssertionError",this.message=e+""}}function Fc(t){const[e]=t.getPosition(),r=t.input.split(`
94
+ `),n=Math.max(e-2,1),i=Math.min(e+3,r.length);return ks(n,i+1).map(a=>{const l=a===e?">> ":" ",o=Dr(String(a),String(i).length),u=r[a-1];return`${l}${o}| ${u}`}).join(`
95
+ `)}function Mc(t,e){e.file&&(t+=`, file:${e.file}`);const[r,n]=e.getPosition();return t+=`, line:${r}, col:${n}`,t}const X=[0,0,0,0,0,0,0,0,0,20,4,4,4,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,8,0,0,0,0,8,0,0,0,64,0,65,0,0,33,33,33,33,33,33,33,33,33,33,0,0,2,2,2,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],_n=1,Pr=4,Fs=8,Ms=16,Nc=32,Ac=64;X[160]=X[5760]=X[6158]=X[8192]=X[8193]=X[8194]=X[8195]=X[8196]=X[8197]=X[8198]=X[8199]=X[8200]=X[8201]=X[8202]=X[8232]=X[8233]=X[8239]=X[8287]=X[12288]=Pr;function pe(t,e){if(!t){const r=typeof e=="function"?e():e||`expect ${t} to be true`;throw new jc(r)}}class qc extends vt{equals(e){return Ke(B(e))}gt(){return!1}geq(){return!1}lt(){return!1}leq(){return!1}valueOf(){return null}}class jr extends vt{equals(e){return e instanceof jr?!1:(e=B(e),We(e)||Ee(e)?e.length===0:Rn(e)?Object.keys(e).length===0:!1)}gt(){return!1}geq(){return!1}lt(){return!1}leq(){return!1}valueOf(){return""}}class Ic extends jr{equals(e){return e===!1||Ke(B(e))?!0:We(e)?/^\s*$/.test(e):super.equals(e)}}class Tn extends vt{constructor(e,r,n){super(),this.i=0,this.length=e,this.name=`${n}-${r}`}next(){this.i++}index0(){return this.i}index(){return this.i+1}first(){return this.i===0}last(){return this.i===this.length-1}rindex(){return this.length-this.i}rindex0(){return this.length-this.i-1}valueOf(){return JSON.stringify(this)}}class Ns extends vt{constructor(e=()=>""){super(),this.superBlockRender=e}super(){return this.superBlockRender()}}function xe(t){return t&&we(t.equals)}const As=new qc,qs={true:!0,false:!1,nil:As,null:As,empty:new jr,blank:new Ic};function Vc(t){const e={};for(const[r,n]of Object.entries(t)){let i=e;for(let s=0;s<r.length;s++){const a=r[s];i[a]=i[a]||{},s===r.length-1&&X[r.charCodeAt(s)]&_n&&(i[a].needBoundary=!0),i=i[a]}i.handler=n,i.end=!0}return e}/*! *****************************************************************************
96
96
  Copyright (c) Microsoft Corporation.
97
97
 
98
98
  Permission to use, copy, modify, and/or distribute this software for any
@@ -105,9 +105,9 @@ From `+e.stack}}class xn extends kr{constructor(e,r){super(new Error(e),r),this.
105
105
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
106
106
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
107
107
  PERFORMANCE OF THIS SOFTWARE.
108
- ***************************************************************************** */var Pr=function(){return Pr=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},Pr.apply(this,arguments)};function We(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(d){try{c(n.next(d))}catch(f){a(f)}}function l(d){try{c(n.throw(d))}catch(f){a(f)}}function c(d){d.done?s(d.value):i(d.value).then(o,l)}c((n=n.apply(t,e||[])).next())})}function rt(t){return We(this,void 0,void 0,function*(){if(!Or(t))return t;let e,r=!1,n="next";do{const i=t[n](e);r=i.done,e=i.value,n="next";try{Or(e)&&(e=rt(e)),Ec(e)&&(e=yield e)}catch(s){n="throw",e=s}}while(!r);return e})}function nt(t){if(!Or(t))return t;let e,r=!1,n="next";do{const i=t[n](e);if(r=i.done,e=i.value,n="next",Or(e))try{e=nt(e)}catch(s){n="throw",e=s}}while(!r);return e}function Tn(t){return t=$(t),Ce(t)?t:Qe(t)&&t.length>0?[t]:Sc(t)?Array.from(t):Rn(t)?Object.keys(t).map(e=>[e,t[e]]):[]}function Ke(t){return ze(t)?[]:Ce(t)?t:[t]}const Ic=/%([-_0^#:]+)?(\d+)?([EO])?(.)/,qs=["January","February","March","April","May","June","July","August","September","October","November","December"],Is=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Vc=qs.map(Us),Uc=Is.map(Us),Vs={1:"st",2:"nd",3:"rd",default:"th"};function Us(t){return t.slice(0,3)}function $c(t){return[31,Bc(t)?29:28,31,30,31,30,31,31,30,31,30,31]}function $s(t){let e=0;for(let r=0;r<t.getMonth();++r)e+=$c(t)[r];return e+t.getDate()}function Bs(t,e){const r=$s(t)+(e-t.getDay()),i=7-new Date(t.getFullYear(),0,1).getDay()+e;return String(Math.floor((r-i)/7)+1)}function Bc(t){const e=t.getFullYear();return!!(!(e&3)&&(e%100||e%400===0&&e))}function Hc(t){const e=t.getDate().toString(),r=parseInt(e.slice(-1));return Vs[r]||Vs.default}function Qc(t){return parseInt(t.getFullYear().toString().substring(0,2),10)}const zc={d:2,e:2,H:2,I:2,j:3,k:2,l:2,L:3,m:2,M:2,S:2,U:2,W:2},Wc={a:" ",A:" ",b:" ",B:" ",c:" ",e:" ",k:" ",l:" ",p:" ",P:" "},kn={a:t=>Uc[t.getDay()],A:t=>Is[t.getDay()],b:t=>Vc[t.getMonth()],B:t=>qs[t.getMonth()],c:t=>t.toLocaleString(),C:t=>Qc(t),d:t=>t.getDate(),e:t=>t.getDate(),H:t=>t.getHours(),I:t=>String(t.getHours()%12||12),j:t=>$s(t),k:t=>t.getHours(),l:t=>String(t.getHours()%12||12),L:t=>t.getMilliseconds(),m:t=>t.getMonth()+1,M:t=>t.getMinutes(),N:(t,e)=>{const r=Number(e.width)||9,n=String(t.getMilliseconds()).slice(0,r);return xc(n,r,"0")},p:t=>t.getHours()<12?"AM":"PM",P:t=>t.getHours()<12?"am":"pm",q:t=>Hc(t),s:t=>Math.round(t.getTime()/1e3),S:t=>t.getSeconds(),u:t=>t.getDay()||7,U:t=>Bs(t,0),w:t=>t.getDay(),W:t=>Bs(t,1),x:t=>t.toLocaleDateString(),X:t=>t.toLocaleTimeString(),y:t=>t.getFullYear().toString().slice(2,4),Y:t=>t.getFullYear(),z:(t,e)=>{const r=Math.abs(t.getTimezoneOffset()),n=Math.floor(r/60),i=r%60;return(t.getTimezoneOffset()>0?"-":"+")+Tr(n,2,"0")+(e.flags[":"]?":":"")+Tr(i,2,"0")},t:()=>" ",n:()=>`
109
- `,"%":()=>"%"};kn.h=kn.b;function Kc(t,e){let r="",n=e,i;for(;i=Ic.exec(n);)r+=n.slice(0,i.index),n=n.slice(i.index+i[0].length),r+=Yc(t,i);return r+n}function Yc(t,e){const[r,n="",i,s,a]=e,o=kn[a];if(!o)return r;const l={};for(const u of n)l[u]=!0;let c=String(o(t,{flags:l,width:i,modifier:s})),d=Wc[a]||"0",f=i||zc[a]||0;return l["^"]?c=c.toUpperCase():l["#"]&&(c=Oc(c)),l._?d=" ":l[0]&&(d="0"),l["-"]&&(f=0),Tr(c,f,d)}const Gc=6e4,Zc=new Date().getTimezoneOffset(),Jc=/([zZ]|([+-])(\d{2}):(\d{2}))$/;class it{constructor(e,r){if(e instanceof it)this.date=e.date,r=e.timezoneOffset;else{const n=(Zc-r)*Gc,i=new Date(e).getTime()+n;this.date=new Date(i)}this.timezoneOffset=r}getTime(){return this.date.getTime()}getMilliseconds(){return this.date.getMilliseconds()}getSeconds(){return this.date.getSeconds()}getMinutes(){return this.date.getMinutes()}getHours(){return this.date.getHours()}getDay(){return this.date.getDay()}getDate(){return this.date.getDate()}getMonth(){return this.date.getMonth()}getFullYear(){return this.date.getFullYear()}toLocaleTimeString(e){return this.date.toLocaleTimeString(e)}toLocaleDateString(e){return this.date.toLocaleDateString(e)}getTimezoneOffset(){return this.timezoneOffset}static createDateFixedToTimezone(e){const r=e.match(Jc);if(r&&r[1]==="Z")return new it(+new Date(e),0);if(r&&r[2]&&r[3]&&r[4]){const[,,n,i,s]=r,a=(n==="+"?-1:1)*(parseInt(i,10)*60+parseInt(s,10));return new it(+new Date(e),a)}return new Date(e)}}class Dn extends Le{constructor(e,r,n,i,s,a,o,l){super(e,n,i,s,l),this.trimLeft=!1,this.trimRight=!1,this.content=this.getText();const c=r[0]==="-",d=En(r)==="-";this.content=r.slice(c?1:0,d?-1:r.length).trim(),this.trimLeft=c||a,this.trimRight=d||o}}class Hs extends Dn{constructor(e,r,n,i,s){const{trimTagLeft:a,trimTagRight:o,tagDelimiterLeft:l,tagDelimiterRight:c}=i,d=e.slice(r+l.length,n-c.length);super(te.Tag,d,e,r,n,a,o,s);const f=new pe(this.content,i.operators);if(this.name=f.readTagName(),!this.name)throw new xn("illegal tag syntax",this);f.skipBlank(),this.args=f.remaining()}}class Xc extends Dn{constructor(e,r,n,i,s){const{trimOutputLeft:a,trimOutputRight:o,outputDelimiterLeft:l,outputDelimiterRight:c}=i,d=e.slice(r+l.length,n-c.length);super(te.Output,d,e,r,n,a,o,s)}}class Qs extends Le{constructor(e,r,n,i){super(te.HTML,e,r,n,i),this.input=e,this.begin=r,this.end=n,this.file=i,this.trimLeft=0,this.trimRight=0}getContent(){return this.input.slice(this.begin+this.trimLeft,this.end-this.trimRight)}}class ed extends Le{constructor(e,r){super(te.Number,e.input,e.begin,r?r.end:e.end,e.file),this.whole=e,this.decimal=r}}class Fr extends Le{constructor(e,r,n,i){super(te.Word,e,r,n,i),this.input=e,this.begin=r,this.end=n,this.file=i,this.content=this.getText()}isNumber(e=!1){const r=e&&ee[this.input.charCodeAt(this.begin)]&jc?this.begin+1:this.begin;for(let n=r;n<this.end;n++)if(!(ee[this.input.charCodeAt(n)]&Mc))return!1;return!0}}class td extends Le{constructor(e,r,n,i){super(te.Literal,e,r,n,i),this.input=e,this.begin=r,this.end=n,this.file=i,this.literal=this.getText()}}const zs={"==":2,"!=":2,">":2,"<":2,">=":2,"<=":2,contains:2,not:1,and:0,or:0},rd={"==":0,"!=":0,">":0,"<":0,">=":0,"<=":0,contains:0,not:1,and:0,or:0};class nd extends Le{constructor(e,r,n,i){super(te.Operator,e,r,n,i),this.input=e,this.begin=r,this.end=n,this.file=i,this.operator=this.getText()}getPrecedence(){const e=this.getText();return e in zs?zs[e]:1}}class Ws extends Le{constructor(e,r,n){super(te.PropertyAccess,e.input,e.begin,n,e.file),this.variable=e,this.props=r,this.propertyName=this.variable instanceof Fr?this.variable.getText():ta(this.variable.getText())}}class id extends Le{constructor(e,r,n,i,s,a){super(te.Filter,n,i,s,a),this.name=e,this.args=r}}class sd extends Le{constructor(e,r,n,i,s,a){super(te.Hash,e,r,n,a),this.input=e,this.begin=r,this.end=n,this.name=i,this.value=s,this.file=a}}class ad extends Le{constructor(e,r,n,i){super(te.Quoted,e,r,n,i),this.input=e,this.begin=r,this.end=n,this.file=i}}class od extends Le{constructor(e,r,n,i,s,a){super(te.Range,e,r,n,a),this.input=e,this.begin=r,this.end=n,this.lhs=i,this.rhs=s,this.file=a}}class ld extends Dn{constructor(e,r,n,i,s){const a=e.slice(r,n);if(super(te.Tag,a,e,r,n,!1,!1,s),!/\S/.test(a))this.name="",this.args="";else{const o=new pe(this.content,i.operators);if(this.name=o.readTagName(),!this.name)throw new xn("illegal liquid tag syntax",this);o.skipBlank(),this.args=o.remaining()}}}class ud{constructor(){this.buffer=""}write(e){this.buffer+=U(e)}}class cd{constructor(){throw this.buffer="",this.stream=null,new Error("streaming not supported in browser")}}class dd{constructor(){this.buffer=""}write(e){e=$(e),typeof e!="string"&&this.buffer===""?this.buffer=e:this.buffer=U(this.buffer)+U(e)}}class hd{renderTemplatesToNodeStream(e,r){const n=new cd;return Promise.resolve().then(()=>rt(this.renderTemplates(e,r,n))).then(()=>n.end(),i=>n.error(i)),n.stream}*renderTemplates(e,r,n){n||(n=r.opts.keepOutputType?new dd:new ud);for(const i of e)try{const s=yield i.render(r,n);if(s&&n.write(s),n.break||n.continue)break}catch(s){throw Ps.is(s)?s:new Ps(s,i)}return n.buffer}}class fd{constructor(e){this.postfix=[...vd(e)]}*evaluate(e,r){fe(e,"unable to evaluate: context not defined");const n=[];for(const i of this.postfix)if(ra(i)){const s=n.pop();let a;if(rd[i.operator]===1)a=yield e.opts.operators[i.operator](s,e);else{const o=n.pop();a=yield e.opts.operators[i.operator](o,s,e)}n.push(a)}else n.push(yield ye(i,e,r&&this.postfix.length===1));return n[0]}}function*ye(t,e,r=!1){if(eh(t))return yield pd(t,e,r);if(rh(t))return yield yd(t,e);if(Jd(t))return gd(t);if(Xd(t))return md(t);if(th(t))return t.getText();if(na(t))return Ln(t)}function*pd(t,e,r){const n=[];for(const i of t.props)n.push(yield ye(i,e,!1));try{return yield e._get([t.propertyName,...n])}catch(i){if(r&&i.name==="InternalUndefinedVariableError")return null;throw new kc(i,t)}}function md(t){const e=t.whole.content+"."+(t.decimal?t.decimal.content:"");return Number(e)}function Ln(t){return ta(t.getText())}function gd(t){return As[t.literal]}function*yd(t,e){const r=yield ye(t.lhs,e),n=yield ye(t.rhs,e);return Ts(+r,+n+1)}function*vd(t){const e=[];for(const r of t)if(ra(r)){for(;e.length&&e[e.length-1].getPrecedence()>r.getPrecedence();)yield e.pop();e.push(r)}else yield r;for(;e.length;)yield e.pop()}function yt(t,e){return!Mr(t,e)}function Mr(t,e){return e.opts.jsTruthy?!t:t===!1||t===void 0||t===null}const bd={"==":(t,e)=>Re(t)?t.equals(e):Re(e)?e.equals(t):$(t)===$(e),"!=":(t,e)=>Re(t)?!t.equals(e):Re(e)?!e.equals(t):$(t)!==$(e),">":(t,e)=>Re(t)?t.gt(e):Re(e)?e.lt(t):$(t)>$(e),"<":(t,e)=>Re(t)?t.lt(e):Re(e)?e.gt(t):$(t)<$(e),">=":(t,e)=>Re(t)?t.geq(e):Re(e)?e.leq(t):$(t)>=$(e),"<=":(t,e)=>Re(t)?t.leq(e):Re(e)?e.geq(t):$(t)<=$(e),contains:(t,e)=>(t=$(t),e=$(e),t&&be(t.indexOf)?t.indexOf(e)>-1:!1),not:(t,e)=>Mr($(t),e),and:(t,e,r)=>yt($(t),r)&&yt($(e),r),or:(t,e,r)=>yt($(t),r)||yt($(e),r)};class Pn{constructor(e,r,n,i){this.key=e,this.value=r,this.next=n,this.prev=i}}class Ks{constructor(e,r=0){this.limit=e,this.size=r,this.cache={},this.head=new Pn("HEAD",null,null,null),this.tail=new Pn("TAIL",null,null,null),this.head.next=this.tail,this.tail.prev=this.head}write(e,r){if(this.cache[e])this.cache[e].value=r;else{const n=new Pn(e,r,this.head.next,this.head);this.head.next.prev=n,this.head.next=n,this.cache[e]=n,this.size++,this.ensureLimit()}}read(e){if(!this.cache[e])return;const{value:r}=this.cache[e];return this.remove(e),this.write(e,r),r}remove(e){const r=this.cache[e];r.prev.next=r.next,r.next.prev=r.prev,delete this.cache[e],this.size--}clear(){this.head.next=this.tail,this.tail.prev=this.head,this.size=0,this.cache={}}ensureLimit(){this.size>this.limit&&this.remove(this.tail.prev.key)}}function Ys(t,e){const r=document.createElement("base");r.href=t;const n=document.getElementsByTagName("head")[0];n.insertBefore(r,n.firstChild);const i=document.createElement("a");i.href=e;const s=i.href;return n.removeChild(r),s}function wd(t,e,r){return t.length&&En(t)!=="/"&&(t+="/"),Ys(t,e).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/,(i,s,a)=>{const o=a.split("/").pop();return/\.\w+$/.test(o)?i:s+a+r})}function Cd(t){return We(this,void 0,void 0,function*(){return new Promise((e,r)=>{const n=new XMLHttpRequest;n.onload=()=>{n.status>=200&&n.status<300?e(n.responseText):r(new Error(n.statusText))},n.onerror=()=>{r(new Error("An error occurred whilst receiving the response."))},n.open("GET",t),n.send()})})}function Ed(t){const e=new XMLHttpRequest;if(e.open("GET",t,!1),e.send(),e.status<200||e.status>=300)throw new Error(e.statusText);return e.responseText}function Rd(t){return We(this,void 0,void 0,function*(){return!0})}function Sd(t){return!0}function xd(t){return Ys(t,".")}var Od=Object.freeze({__proto__:null,resolve:wd,readFile:Cd,readFileSync:Ed,exists:Rd,existsSync:Sd,dirname:xd,sep:"/"});function _d(t,e,...r){return t=$(t),Ce(t)||Qe(t)?t.length?t:e:t===!1&&new Map(r).get("allow_false")?!1:Mr(t,this.context)?e:t}function Gs(t){return JSON.stringify(t)}const Td={raw:!0,handler:Ds},kd={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},Dd={"&amp;":"&","&lt;":"<","&gt;":">","&#34;":'"',"&#39;":"'"};function Fn(t){return U(t).replace(/&|<|>|"|'/g,e=>kd[e])}function Ld(t){return U(t).replace(/&(amp|lt|gt|#34|#39);/g,e=>Dd[e])}function Pd(t){return Fn(Ld(U(t)))}function Fd(t){return U(t).replace(/\n/g,`<br />
110
- `)}function Md(t){return U(t).replace(/<script.*?<\/script>|<!--.*?-->|<style.*?<\/style>|<.*?>/g,"")}var jd=Object.freeze({__proto__:null,escape:Fn,escape_once:Pd,newline_to_br:Fd,strip_html:Md});const vt={root:["."],layouts:["."],partials:["."],relativeReference:!0,jekyllInclude:!1,cache:void 0,extname:"",fs:Od,dynamicPartials:!0,jsTruthy:!1,trimTagRight:!1,trimTagLeft:!1,trimOutputRight:!1,trimOutputLeft:!1,greedy:!0,tagDelimiterLeft:"{%",tagDelimiterRight:"%}",outputDelimiterLeft:"{{",outputDelimiterRight:"}}",preserveTimezones:!1,strictFilters:!1,strictVariables:!1,ownPropertyOnly:!0,lenientIf:!1,globals:{},keepOutputType:!1,operators:bd};function Nd(t){if(t.hasOwnProperty("root")&&(t.hasOwnProperty("partials")||(t.partials=t.root),t.hasOwnProperty("layouts")||(t.layouts=t.root)),t.hasOwnProperty("cache")){let e;typeof t.cache=="number"?e=t.cache>0?new Ks(t.cache):void 0:typeof t.cache=="object"?e=t.cache:e=t.cache?new Ks(1024):void 0,t.cache=e}return t=Object.assign(Object.assign(Object.assign({},vt),t.jekyllInclude?{dynamicPartials:!1}:{}),t),!t.fs.dirname&&t.relativeReference&&(console.warn("[LiquidJS] `fs.dirname` is required for relativeReference, set relativeReference to `false` to suppress this warning, or provide implementation for `fs.dirname`"),t.relativeReference=!1),t.root=jr(t.root),t.partials=jr(t.partials),t.layouts=jr(t.layouts),t.outputEscape=t.outputEscape&&Ad(t.outputEscape),t}function Ad(t){return t==="escape"?Fn:t==="json"?Gs:(fe(be(t),"`outputEscape` need to be of type string or function"),t)}function jr(t){let e=[];return Ce(t)&&(e=t),Qe(t)&&(e=[t]),e}function qd(t,e,r,n=t.length){let i=r,s=e,a;for(;i[t[s]]&&s<n;)i=i[t[s++]],i.end&&(a=i);return!a||a.needBoundary&&ee[t.charCodeAt(s)]&On?-1:s}function Id(t,e){let r=!1;for(let n=0;n<t.length;n++){const i=t[n];Gd(i)&&(!r&&i.trimLeft&&Vd(t[n-1],e.greedy),wt(i)&&(i.name==="raw"?r=!0:i.name==="endraw"&&(r=!1)),!r&&i.trimRight&&Ud(t[n+1],e.greedy))}}function Vd(t,e){if(!t||!jn(t))return;const r=e?Dr:Ms;for(;ee[t.input.charCodeAt(t.end-1-t.trimRight)]&r;)t.trimRight++}function Ud(t,e){if(!t||!jn(t))return;const r=e?Dr:Ms;for(;ee[t.input.charCodeAt(t.begin+t.trimLeft)]&r;)t.trimLeft++;t.input.charAt(t.begin+t.trimLeft)===`
111
- `&&t.trimLeft++}class pe{constructor(e,r=vt.operators,n){this.input=e,this.file=n,this.p=0,this.rawBeginAt=-1,this.N=e.length,this.opTrie=qc(r)}readExpression(){return new fd(this.readExpressionTokens())}*readExpressionTokens(){for(;this.p<this.N;){const e=this.readOperator();if(e){yield e;continue}const r=this.readValue();if(r){yield r;continue}return}}readOperator(){this.skipBlank();const e=qd(this.input,this.p,this.opTrie);if(e!==-1)return new nd(this.input,this.p,this.p=e,this.file)}readFilters(){const e=[];for(;;){const r=this.readFilter();if(!r)return e;e.push(r)}}readFilter(){if(this.skipBlank(),this.end())return null;fe(this.peek()==="|",()=>`unexpected token at ${this.snapshot()}`),this.p++;const e=this.p,r=this.readIdentifier();if(!r.size())return null;const n=[];if(this.skipBlank(),this.peek()===":")do{++this.p;const i=this.readFilterArg();i&&n.push(i),this.skipBlank(),fe(this.end()||this.peek()===","||this.peek()==="|",()=>`unexpected character ${this.snapshot()}`)}while(this.peek()===",");return new id(r.getText(),n,this.input,e,this.p,this.file)}readFilterArg(){const e=this.readValue();if(!e)return;if(this.skipBlank(),this.peek()!==":")return e;++this.p;const r=this.readValue();return[e.getText(),r]}readTopLevelTokens(e=vt){const r=[];for(;this.p<this.N;){const n=this.readTopLevelToken(e);r.push(n)}return Id(r,e),r}readTopLevelToken(e){const{tagDelimiterLeft:r,outputDelimiterLeft:n}=e;return this.rawBeginAt>-1?this.readEndrawOrRawContent(e):this.match(r)?this.readTagToken(e):this.match(n)?this.readOutputToken(e):this.readHTMLToken([r,n])}readHTMLToken(e){const r=this.p;for(;this.p<this.N&&!e.some(n=>this.match(n));)++this.p;return new Qs(this.input,r,this.p,this.file)}readTagToken(e=vt){const{file:r,input:n}=this,i=this.p;if(this.readToDelimiter(e.tagDelimiterRight)===-1)throw this.mkError(`tag ${this.snapshot(i)} not closed`,i);const s=new Hs(n,i,this.p,e,r);return s.name==="raw"&&(this.rawBeginAt=i),s}readToDelimiter(e){for(;this.p<this.N;){if(this.peekType()&Fs){this.readQuoted();continue}if(++this.p,this.rmatch(e))return this.p}return-1}readOutputToken(e=vt){const{file:r,input:n}=this,{outputDelimiterRight:i}=e,s=this.p;if(this.readToDelimiter(i)===-1)throw this.mkError(`output ${this.snapshot(s)} not closed`,s);return new Xc(n,s,this.p,e,r)}readEndrawOrRawContent(e){const{tagDelimiterLeft:r,tagDelimiterRight:n}=e,i=this.p;let s=this.readTo(r)-r.length;for(;this.p<this.N;){if(this.readIdentifier().getText()!=="endraw"){s=this.readTo(r)-r.length;continue}for(;this.p<=this.N;){if(this.rmatch(n)){const a=this.p;return i===s?(this.rawBeginAt=-1,new Hs(this.input,i,a,e,this.file)):(this.p=s,new Qs(this.input,i,s,this.file))}if(this.rmatch(r))break;this.p++}}throw this.mkError(`raw ${this.snapshot(this.rawBeginAt)} not closed`,i)}readLiquidTagTokens(e=vt){const r=[];for(;this.p<this.N;){const n=this.readLiquidTagToken(e);n.name&&r.push(n)}return r}readLiquidTagToken(e){const{file:r,input:n}=this,i=this.p;let s=this.N;return this.readToDelimiter(`
112
- `)!==-1&&(s=this.p),new ld(n,i,s,e,r)}mkError(e,r){return new xn(e,new Fr(this.input,r,this.N,this.file))}snapshot(e=this.p){return JSON.stringify(_c(this.input.slice(e),16))}readWord(){return console.warn("Tokenizer#readWord() will be removed, use #readIdentifier instead"),this.readIdentifier()}readIdentifier(){this.skipBlank();const e=this.p;for(;this.peekType()&On;)++this.p;return new Fr(this.input,e,this.p,this.file)}readTagName(){return this.skipBlank(),this.input[this.p]==="#"?this.input.slice(this.p,++this.p):this.readIdentifier().getText()}readHashes(e){const r=[];for(;;){const n=this.readHash(e);if(!n)return r;r.push(n)}}readHash(e){this.skipBlank(),this.peek()===","&&++this.p;const r=this.p,n=this.readIdentifier();if(!n.size())return;let i;this.skipBlank();const s=e?"=":":";return this.peek()===s&&(++this.p,i=this.readValue()),new sd(this.input,r,this.p,n,i,this.file)}remaining(){return this.input.slice(this.p)}advance(e=1){this.p+=e}end(){return this.p>=this.N}readTo(e){for(;this.p<this.N;)if(++this.p,this.rmatch(e))return this.p;return-1}readValue(){const e=this.readQuoted()||this.readRange();if(e)return e;if(this.peek()==="["){this.p++;const s=this.readQuoted();return!s||this.peek()!=="]"?void 0:(this.p++,new Ws(s,[],this.p))}const r=this.readIdentifier();if(!r.size())return;let n=r.isNumber(!0);const i=[];for(;;)if(this.peek()==="["){n=!1,this.p++;const s=this.readValue()||new Fr(this.input,this.p,this.p,this.file);this.readTo("]"),i.push(s)}else if(this.peek()==="."&&this.peek(1)!=="."){this.p++;const s=this.readIdentifier();if(!s.size())break;s.isNumber()||(n=!1),i.push(s)}else break;return!i.length&&As.hasOwnProperty(r.content)?new td(this.input,r.begin,r.end,this.file):n?new ed(r,i[0]):new Ws(r,i,this.p)}readRange(){this.skipBlank();const e=this.p;if(this.peek()!=="(")return;++this.p;const r=this.readValueOrThrow();this.p+=2;const n=this.readValueOrThrow();return++this.p,new od(this.input,e,this.p,r,n,this.file)}readValueOrThrow(){const e=this.readValue();return fe(e,()=>`unexpected token ${this.snapshot()}, value expected`),e}readQuoted(){this.skipBlank();const e=this.p;if(!(this.peekType()&Fs))return;++this.p;let r=!1;for(;this.p<this.N&&(++this.p,!(this.input[this.p-1]===this.input[e]&&!r));)r?r=!1:this.input[this.p-1]==="\\"&&(r=!0);return new ad(this.input,e,this.p,this.file)}*readFileNameTemplate(e){const{outputDelimiterLeft:r}=e,n=[","," ",r],i=new Set(n);for(;this.p<this.N&&!i.has(this.peek());)yield this.match(r)?this.readOutputToken(e):this.readHTMLToken(n)}match(e){for(let r=0;r<e.length;r++)if(e[r]!==this.input[this.p+r])return!1;return!0}rmatch(e){for(let r=0;r<e.length;r++)if(e[e.length-1-r]!==this.input[this.p-1-r])return!1;return!0}peekType(e=0){return ee[this.input.charCodeAt(this.p+e)]}peek(e=0){return this.input[this.p+e]}skipBlank(){for(;this.peekType()&Dr;)++this.p}}class $d{constructor(e,r){this.handlers={},this.stopRequested=!1,this.tokens=e,this.parseToken=r}on(e,r){return this.handlers[e]=r,this}trigger(e,r){const n=this.handlers[e];return n?(n.call(this,r),!0):!1}start(){this.trigger("start");let e;for(;!this.stopRequested&&(e=this.tokens.shift());){if(this.trigger("token",e)||wt(e)&&this.trigger(`tag:${e.name}`,e))continue;const r=this.parseToken(e,this.tokens);this.trigger("template",r)}return this.stopRequested||this.trigger("end"),this}stop(){return this.stopRequested=!0,this}}class Mn{constructor(e){this.token=e}}class ie extends Mn{constructor(e,r,n){super(e),this.name=e.name,this.liquid=n}}class kt{constructor(e,r){this.hash={};const n=new pe(e,{});for(const i of n.readHashes(r))this.hash[i.name.content]=i.value}*render(e){const r={};for(const n of Object.keys(this.hash))r[n]=this.hash[n]===void 0?!0:yield ye(this.hash[n],e);return r}}function Bd(t){return class extends ie{constructor(e,r,n){super(e,r,n),be(t.parse)&&t.parse.call(this,e,r)}*render(e,r){const n=yield new kt(this.token.args).render(e);return yield t.render.call(this,e,r,n)}}}function Hd(t){return Ce(t)}class Zs{constructor(e,r,n,i){this.name=e,this.handler=be(r)?r:be(r==null?void 0:r.handler)?r.handler:Ds,this.raw=!be(r)&&!!(r!=null&&r.raw),this.args=n,this.liquid=i}*render(e,r){const n=[];for(const i of this.args)Hd(i)?n.push([i[0],yield ye(i[1],r)]):n.push(yield ye(i,r));return this.handler.apply({context:r,liquid:this.liquid},[e,...n])}}class Ye{constructor(e,r){this.filters=[];const n=new pe(e,r.options.operators);this.initial=n.readExpression(),this.filters=n.readFilters().map(({name:i,args:s})=>new Zs(i,this.getFilter(r,i),s,r))}*value(e,r){r=r||e.opts.lenientIf&&this.filters.length>0&&this.filters[0].name==="default";let n=yield this.initial.evaluate(e,r);for(const i of this.filters)n=yield i.render(n,e);return n}getFilter(e,r){const n=e.filters[r];return fe(n||!e.options.strictFilters,()=>`undefined filter: ${r}`),n}}class Qd extends Mn{constructor(e,r){var n;super(e),this.value=new Ye(e.content,r);const i=this.value.filters,s=r.options.outputEscape;!(!((n=i[i.length-1])===null||n===void 0)&&n.raw)&&s&&i.push(new Zs(toString.call(s),s,[],r))}*render(e,r){const n=yield this.value.value(e,!1);r.write(n)}}class zd extends Mn{constructor(e){super(e),this.str=e.getContent()}*render(e,r){r.write(this.str)}}var bt;(function(t){t.Partials="partials",t.Layouts="layouts",t.Root="root"})(bt||(bt={}));class Wd{constructor(e){if(this.options=e,e.relativeReference){const r=e.fs.sep;fe(r,"`fs.sep` is required for relative reference");const n=new RegExp(["."+r,".."+r,"./","../"].map(i=>Rc(i)).join("|"));this.shouldLoadRelative=i=>n.test(i)}else this.shouldLoadRelative=r=>!1;this.contains=this.options.fs.contains||(()=>!0)}*lookup(e,r,n,i){const{fs:s}=this.options,a=this.options[r];for(const o of this.candidates(e,a,i,r!==bt.Root))if(n?s.existsSync(o):yield s.exists(o))return o;throw this.lookupError(e,a)}*candidates(e,r,n,i){const{fs:s,extname:a}=this.options;if(this.shouldLoadRelative(e)&&n){const o=s.resolve(this.dirname(n),e,a);for(const l of r)if(!i||this.contains(l,o)){yield o;break}}for(const o of r){const l=s.resolve(o,e,a);(!i||this.contains(o,l))&&(yield l)}if(s.fallback!==void 0){const o=s.fallback(e);o!==void 0&&(yield o)}}dirname(e){const r=this.options.fs;return fe(r.dirname,"`fs.dirname` is required for relative reference"),r.dirname(e)}lookupError(e,r){const n=new Error("ENOENT");return n.message=`ENOENT: Failed to lookup "${e}" in "${r}"`,n.code="ENOENT",n}}class Kd{constructor(e){this.liquid=e,this.cache=this.liquid.options.cache,this.fs=this.liquid.options.fs,this.parseFile=this.cache?this._parseFileCached:this._parseFile,this.loader=new Wd(this.liquid.options)}parse(e,r){const i=new pe(e,this.liquid.options.operators,r).readTopLevelTokens(this.liquid.options);return this.parseTokens(i)}parseTokens(e){let r;const n=[];for(;r=e.shift();)n.push(this.parseToken(r,e));return n}parseToken(e,r){try{if(wt(e)){const n=this.liquid.tags[e.name];return fe(n,`tag "${e.name}" not found`),new n(e,r,this.liquid)}return Zd(e)?new Qd(e,this.liquid):new zd(e)}catch(n){throw new Tc(n,e)}}parseStream(e){return new $d(e,(r,n)=>this.parseToken(r,n))}*_parseFileCached(e,r,n=bt.Root,i){const s=this.cache,a=this.loader.shouldLoadRelative(e)?i+","+e:n+":"+e,o=yield s.read(a);if(o)return o;const l=this._parseFile(e,r,n,i),c=r?yield l:rt(l);s.write(a,c);try{return yield c}catch(d){throw s.remove(a),d}}*_parseFile(e,r,n=bt.Root,i){const s=yield this.loader.lookup(e,n,r,i);return this.liquid.parse(r?this.fs.readFileSync(s):yield this.fs.readFile(s),s)}}const Yd=/[\da-fA-F]/,Js=/[0-7]/,Xs={b:"\b",f:"\f",n:`
113
- `,r:"\r",t:" ",v:"\v"};function ea(t){const e=t.charCodeAt(0);return e>=97?e-87:e>=65?e-55:e-48}function ta(t){let e="";for(let r=1;r<t.length-1;r++){if(t[r]!=="\\"){e+=t[r];continue}if(Xs[t[r+1]]!==void 0)e+=Xs[t[++r]];else if(t[r+1]==="u"){let n=0,i=r+2;for(;i<=r+5&&Yd.test(t[i]);)n=n*16+ea(t[i++]);r=i-1,e+=String.fromCharCode(n)}else if(!Js.test(t[r+1]))e+=t[++r];else{let n=r+1,i=0;for(;n<=r+3&&Js.test(t[n]);)i=i*8+ea(t[n++]);r=n-1,e+=String.fromCharCode(i)}}return e}var te;(function(t){t[t.Number=1]="Number",t[t.Literal=2]="Literal",t[t.Tag=4]="Tag",t[t.Output=8]="Output",t[t.HTML=16]="HTML",t[t.Filter=32]="Filter",t[t.Hash=64]="Hash",t[t.PropertyAccess=128]="PropertyAccess",t[t.Word=256]="Word",t[t.Range=512]="Range",t[t.Quoted=1024]="Quoted",t[t.Operator=2048]="Operator",t[t.Delimited=12]="Delimited"})(te||(te={}));function Gd(t){return!!(Pe(t)&te.Delimited)}function ra(t){return Pe(t)===te.Operator}function jn(t){return Pe(t)===te.HTML}function Zd(t){return Pe(t)===te.Output}function wt(t){return Pe(t)===te.Tag}function na(t){return Pe(t)===te.Quoted}function Jd(t){return Pe(t)===te.Literal}function Xd(t){return Pe(t)===te.Number}function eh(t){return Pe(t)===te.PropertyAccess}function th(t){return Pe(t)===te.Word}function rh(t){return Pe(t)===te.Range}function Pe(t){return t?t.kind:-1}class Dt{constructor(e={},r=vt,n={}){var i,s;this.scopes=[{}],this.registers={},this.sync=!!n.sync,this.opts=r,this.globals=(i=n.globals)!==null&&i!==void 0?i:r.globals,this.environments=e,this.strictVariables=(s=n.strictVariables)!==null&&s!==void 0?s:this.opts.strictVariables}getRegister(e){return this.registers[e]=this.registers[e]||{}}setRegister(e,r){return this.registers[e]=r}saveRegister(...e){return e.map(r=>[r,this.getRegister(r)])}restoreRegister(e){return e.forEach(([r,n])=>this.setRegister(r,n))}getAll(){return[this.globals,this.environments,...this.scopes].reduce((e,r)=>Pr(e,r),{})}get(e){return nt(this._get(e))}*_get(e){const r=this.findScope(e[0]);return yield this._getFromScope(r,e)}getFromScope(e,r){return nt(this._getFromScope(e,r))}*_getFromScope(e,r){Qe(r)&&(r=r.split("."));for(let n=0;n<r.length;n++)if(e=yield nh(e,r[n],this.opts.ownPropertyOnly),ze(e)&&this.strictVariables)throw new Dc(r.slice(0,n+1).join("."));return e}push(e){return this.scopes.push(e)}pop(){return this.scopes.pop()}bottom(){return this.scopes[0]}findScope(e){for(let r=this.scopes.length-1;r>=0;r--){const n=this.scopes[r];if(e in n)return n}return e in this.environments?this.environments:this.globals}}function nh(t,e,r){if(t=Os(t),ze(t))return t;if(Ce(t)&&e<0)return t[t.length+ +e];const n=ih(t,e,r);return n===void 0&&t instanceof gt?t.liquidMethodMissing(e):be(n)?n.call(t):e==="size"?oh(t):e==="first"?sh(t):e==="last"?ah(t):n}function ih(t,e,r){if(!(r&&!Object.hasOwnProperty.call(t,e)&&!(t instanceof gt)))return t[e]}function sh(t){return Ce(t)?t[0]:t.first}function ah(t){return Ce(t)?t[t.length-1]:t.last}function oh(t){if(t.hasOwnProperty("size")||t.size!==void 0)return t.size;if(Ce(t)||Qe(t))return t.length;if(typeof t=="object")return Object.keys(t).length}var Ct;(function(t){t[t.OUTPUT=0]="OUTPUT",t[t.STORE=1]="STORE"})(Ct||(Ct={}));const lh=Ee(Math.abs),uh=Ee(Math.max),ch=Ee(Math.min),dh=Ee(Math.ceil),hh=Ee((t,e,r=!1)=>r?Math.floor(t/e):t/e),fh=Ee(Math.floor),ph=Ee((t,e)=>t-e),mh=Ee((t,e)=>t%e),gh=Ee((t,e)=>t*e);function yh(t,e=0){t=$(t),e=$(e);const r=Math.pow(10,e);return Math.round(t*r)/r}function vh(t,e){return t=$(t),e=$(e),Number(t)+Number(e)}var bh=Object.freeze({__proto__:null,abs:lh,at_least:uh,at_most:ch,ceil:dh,divided_by:hh,floor:fh,minus:ph,modulo:mh,times:gh,round:yh,plus:vh}),wh=Object.freeze({__proto__:null,url_decode:t=>U(t).split("+").map(decodeURIComponent).join(" "),url_encode:t=>U(t).split(" ").map(encodeURIComponent).join("+")});const Ch=Ee((t,e)=>Ke(t).join(e===void 0?" ":e)),Eh=Ee(t=>Ce(t)?En(t):""),Rh=Ee(t=>Ce(t)?t[0]:""),Sh=Ee(t=>[...Ke(t)].reverse());function*xh(t,e){const r=[];for(const n of Ke($(t)))r.push([n,e?yield this.context._getFromScope(n,U(e).split(".")):n]);return r.sort((n,i)=>{const s=n[1],a=i[1];return s<a?-1:s>a?1:0}).map(n=>n[0])}function Oh(t,e){t=$(t);const r=U(e),n=e===void 0?Ls:(i,s)=>Ls(i[r],s[r]);return[...Ke(t)].sort(n)}const _h=t=>t&&t.length||0;function*Th(t,e){const r=[];for(const n of Ke($(t)))r.push(yield this.context._getFromScope(n,U(e).split(".")));return r}function kh(t){return t=$(t),Ke(t).filter(e=>!ze($(e)))}function Dh(t,e=[]){return t=$(t),e=Ke(e).map(r=>$(r)),Ke(t).concat(e)}function Lh(t,e,r=1){return t=$(t),ze(t)?[]:(Ce(t)||(t=U(t)),e=e<0?t.length+e:e,t.slice(e,e+r))}function*Ph(t,e,r){const n=[];t=Ke($(t));for(const i of t)n.push(yield this.context._getFromScope(i,U(e).split(".")));return t.filter((i,s)=>r===void 0?yt(n[s],this.context):Re(r)?r.equals(n[s]):n[s]===r)}function Fh(t){t=$(t);const e={};return(t||[]).filter(r=>xs.call(e,String(r))?!1:(e[String(r)]=!0,!0))}var Mh=Object.freeze({__proto__:null,join:Ch,last:Eh,first:Rh,reverse:Sh,sort:xh,sort_natural:Oh,size:_h,map:Th,compact:kh,concat:Dh,slice:Lh,where:Ph,uniq:Fh});const jh="%A, %B %-e, %Y at %-l:%M %P %z";function Nh(t,e,r){const n=this.context.opts;let i;return t=$(t),e=$(e),ze(e)?e=jh:e=U(e),t==="now"||t==="today"?i=new Date:_r(t)?i=new Date(t*1e3):Qe(t)?/^\d+$/.test(t)?i=new Date(+t*1e3):n.preserveTimezones?i=it.createDateFixedToTimezone(t):i=new Date(t):i=t,Ah(i)?(r!==void 0?i=new it(i,ia(i,r)):n.timezoneOffset!==void 0&&(i=new it(i,ia(i,n.timezoneOffset))),Kc(i,e)):t}function Ah(t){return(t instanceof Date||t instanceof it)&&!isNaN(t.getTime())}function ia(t,e){if(_r(e))return e;const r=new Date(t.toLocaleString("en-US",{timeZone:"UTC"})),n=new Date(t.toLocaleString("en-US",{timeZone:e}));return(r.getTime()-n.getTime())/6e4}var qh=Object.freeze({__proto__:null,date:Nh});function Ih(t,e){return fe(arguments.length===2,"append expect 2 arguments"),U(t)+U(e)}function Vh(t,e){return fe(arguments.length===2,"prepend expect 2 arguments"),U(e)+U(t)}function Uh(t,e){return e?(e=Sn(U(e)),U(t).replace(new RegExp(`^[${e}]+`,"g"),"")):U(t).replace(/^\s+/,"")}function $h(t){return U(t).toLowerCase()}function Bh(t){return U(t).toUpperCase()}function Hh(t,e){return U(t).split(String(e)).join("")}function Qh(t,e){return U(t).replace(String(e),"")}function zh(t,e){const r=U(t),n=String(e),i=r.lastIndexOf(n);return i===-1?r:r.substring(0,i)+r.substring(i+n.length+1)}function Wh(t,e){return e?(e=Sn(U(e)),U(t).replace(new RegExp(`[${e}]+$`,"g"),"")):U(t).replace(/\s+$/,"")}function Kh(t,e){const r=U(t).split(String(e));for(;r.length&&r[r.length-1]==="";)r.pop();return r}function Yh(t,e){return e?(e=Sn(U(e)),U(t).replace(new RegExp(`^[${e}]+`,"g"),"").replace(new RegExp(`[${e}]+$`,"g"),"")):U(t).trim()}function Gh(t){return U(t).replace(/\n/g,"")}function Zh(t){return t=U(t),t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function Jh(t,e,r){return U(t).split(String(e)).join(r)}function Xh(t,e,r){return U(t).replace(String(e),r)}function ef(t,e,r){const n=U(t),i=String(e),s=n.lastIndexOf(i);if(s===-1)return n;const a=String(r);return n.substring(0,s)+a+n.substring(s+i.length)}function tf(t,e=50,r="..."){return t=U(t),t.length<=e?t:t.substring(0,e-r.length)+r}function rf(t,e=15,r="..."){const n=U(t).split(/\s+/);e<=0&&(e=1);let i=n.slice(0,e).join(" ");return n.length>=e&&(i+=r),i}var nf=Object.freeze({__proto__:null,append:Ih,prepend:Vh,lstrip:Uh,downcase:$h,upcase:Bh,remove:Hh,remove_first:Qh,remove_last:zh,rstrip:Wh,split:Kh,strip:Yh,strip_newlines:Gh,capitalize:Zh,replace:Jh,replace_first:Xh,replace_last:ef,truncate:tf,truncatewords:rf});const sf=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},jd),bh),wh),Mh),qh),nf),{json:Gs,raw:Td,default:_d});class af extends ie{constructor(e,r,n){super(e,r,n);const i=new pe(e.args,n.options.operators);this.key=i.readIdentifier().content,i.skipBlank(),fe(i.peek()==="=",()=>`illegal token ${e.getText()}`),i.advance(),this.value=new Ye(i.remaining(),this.liquid)}*render(e){e.bottom()[this.key]=yield this.value.value(e,this.liquid.options.lenientIf)}}const sa=["offset","limit","reversed"];class of extends ie{constructor(e,r,n){super(e,r,n);const i=new pe(e.args,this.liquid.options.operators),s=i.readIdentifier(),a=i.readIdentifier(),o=i.readValue();if(!s.size()||a.content!=="in"||!o)throw new Error(`illegal tag: ${e.getText()}`);this.variable=s.content,this.collection=o,this.hash=new kt(i.remaining()),this.templates=[],this.elseTemplates=[];let l;const c=this.liquid.parser.parseStream(r).on("start",()=>l=this.templates).on("tag:else",()=>l=this.elseTemplates).on("tag:endfor",()=>c.stop()).on("template",d=>l.push(d)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});c.start()}*render(e,r){const n=this.liquid.renderer;let i=Tn(yield ye(this.collection,e));if(!i.length){yield n.renderTemplates(this.elseTemplates,e,r);return}const s="continue-"+this.variable+"-"+this.collection.getText();e.push({continue:e.getRegister(s)});const a=yield this.hash.render(e);e.pop(),i=(this.liquid.options.orderedFilterParameters?Object.keys(a).filter(c=>sa.includes(c)):sa.filter(c=>a[c]!==void 0)).reduce((c,d)=>d==="offset"?uf(c,a.offset):d==="limit"?cf(c,a.limit):lf(c),i),e.setRegister(s,(a.offset||0)+i.length);const l={forloop:new _n(i.length,this.collection.getText(),this.variable)};e.push(l);for(const c of i){if(l[this.variable]=c,yield n.renderTemplates(this.templates,e,r),r.break){r.break=!1;break}r.continue=!1,l.forloop.next()}e.pop()}}function lf(t){return[...t].reverse()}function uf(t,e){return t.slice(e)}function cf(t,e){return t.slice(0,e)}class df extends ie{constructor(e,r,n){super(e,r,n),this.templates=[];const i=new pe(e.args,this.liquid.options.operators);for(this.variable=hf(i),fe(this.variable,()=>`${e.args} not valid identifier`);r.length;){const s=r.shift();if(wt(s)&&s.name==="endcapture")return;this.templates.push(n.parser.parseToken(s,r))}throw new Error(`tag ${e.getText()} not closed`)}*render(e){const n=yield this.liquid.renderer.renderTemplates(this.templates,e);e.bottom()[this.variable]=n}}function hf(t){const e=t.readIdentifier().content;if(e)return e;const r=t.readQuoted();if(r)return Ln(r)}class ff extends ie{constructor(e,r,n){super(e,r,n),this.branches=[],this.elseTemplates=[],this.value=new Ye(e.args,this.liquid),this.elseTemplates=[];let i=[];const s=this.liquid.parser.parseStream(r).on("tag:when",a=>{i=[];const o=new pe(a.args,this.liquid.options.operators),l=[];for(;!o.end();)l.push(o.readValueOrThrow()),o.readTo(",");this.branches.push({values:l,templates:i})}).on("tag:else",()=>i=this.elseTemplates).on("tag:endcase",()=>s.stop()).on("template",a=>i.push(a)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});s.start()}*render(e,r){const n=this.liquid.renderer,i=$(yield this.value.value(e,e.opts.lenientIf));let s=!1;for(const a of this.branches)for(const o of a.values){const l=yield ye(o,e,e.opts.lenientIf);if(i===l){yield n.renderTemplates(a.templates,e,r),s=!0;break}}s||(yield n.renderTemplates(this.elseTemplates,e,r))}}class pf extends ie{constructor(e,r,n){for(super(e,r,n);r.length;){const i=r.shift();if(wt(i)&&i.name==="endcomment")return}throw new Error(`tag ${e.getText()} not closed`)}render(){}}class mf extends ie{constructor(e,r,n){super(e,r,n);const i=e.args,s=new pe(i,this.liquid.options.operators);for(this.file=Nn(s,this.liquid),this.currentFile=e.file;!s.end();){s.skipBlank();const a=s.p,o=s.readIdentifier();if((o.content==="with"||o.content==="for")&&(s.skipBlank(),s.peek()!==":")){const l=s.readValue();if(l){const c=s.p,d=s.readIdentifier();let f;d.content==="as"?f=s.readIdentifier():s.p=c,this[o.content]={value:l,alias:f&&f.content},s.skipBlank(),s.peek()===","&&s.advance();continue}}s.p=a;break}this.hash=new kt(s.remaining())}*render(e,r){const{liquid:n,hash:i}=this,s=yield An(this.file,e,n);fe(s,()=>`illegal filename "${s}"`);const a=new Dt({},e.opts,{sync:e.sync,globals:e.globals,strictVariables:e.strictVariables}),o=a.bottom();if(Pr(o,yield i.render(e)),this.with){const{value:l,alias:c}=this.with;o[c||s]=yield ye(l,e)}if(this.for){const{value:l,alias:c}=this.for,d=Tn(yield ye(l,e));o.forloop=new _n(d.length,l.getText(),c);for(const f of d){o[c]=f;const u=yield n._parsePartialFile(s,a.sync,this.currentFile);yield n.renderer.renderTemplates(u,a,r),o.forloop.next()}}else{const l=yield n._parsePartialFile(s,a.sync,this.currentFile);yield n.renderer.renderTemplates(l,a,r)}}}function Nn(t,e){if(e.options.dynamicPartials){const i=t.readValue();if(i===void 0)throw new TypeError(`illegal argument "${t.input}"`);if(i.getText()==="none")return;if(na(i)){const s=e.parse(Ln(i));return aa(s)}return i}const r=[...t.readFileNameTemplate(e.options)],n=aa(e.parser.parseTokens(r));return n==="none"?void 0:n}function aa(t){return t.length===1&&jn(t[0].token)?t[0].token.getContent():t}function*An(t,e,r){return typeof t=="string"?t:Array.isArray(t)?r.renderer.renderTemplates(t,e):yield ye(t,e)}class gf extends ie{constructor(e,r,n){super(e,r,n);const i=e.args,s=new pe(i,this.liquid.options.operators);this.file=Nn(s,this.liquid),this.currentFile=e.file;const a=s.p;s.readIdentifier().content==="with"?(s.skipBlank(),s.peek()!==":"?this.withVar=s.readValue():s.p=a):s.p=a,this.hash=new kt(s.remaining(),this.liquid.options.jekyllInclude)}*render(e,r){const{liquid:n,hash:i,withVar:s}=this,{renderer:a}=n,o=yield An(this.file,e,n);fe(o,()=>`illegal filename "${o}"`);const l=e.saveRegister("blocks","blockMode");e.setRegister("blocks",{}),e.setRegister("blockMode",Ct.OUTPUT);const c=yield i.render(e);s&&(c[o]=yield ye(s,e));const d=yield n._parsePartialFile(o,e.sync,this.currentFile);e.push(e.opts.jekyllInclude?{include:c}:c),yield a.renderTemplates(d,e,r),e.pop(),e.restoreRegister(l)}}class yf extends ie{constructor(e,r,n){super(e,r,n);const i=new pe(e.args,this.liquid.options.operators);this.variable=i.readIdentifier().content}render(e,r){const n=e.environments;_r(n[this.variable])||(n[this.variable]=0),r.write(U(--n[this.variable]))}}class vf extends ie{constructor(e,r,n){super(e,r,n),this.candidates=[];const i=new pe(e.args,this.liquid.options.operators),s=i.readValue();for(i.skipBlank(),s&&(i.peek()===":"?(this.group=s,i.advance()):this.candidates.push(s));!i.end();){const a=i.readValue();a&&this.candidates.push(a),i.readTo(",")}fe(this.candidates.length,()=>`empty candidates: ${e.getText()}`)}*render(e,r){const i=`cycle:${yield ye(this.group,e)}:`+this.candidates.join(","),s=e.getRegister("cycle");let a=s[i];a===void 0&&(a=s[i]=0);const o=this.candidates[a];return a=(a+1)%this.candidates.length,s[i]=a,yield ye(o,e)}}class bf extends ie{constructor(e,r,n){super(e,r,n),this.branches=[],this.elseTemplates=[];let i;n.parser.parseStream(r).on("start",()=>this.branches.push({value:new Ye(e.args,this.liquid),templates:i=[]})).on("tag:elsif",s=>this.branches.push({value:new Ye(s.args,this.liquid),templates:i=[]})).on("tag:else",()=>i=this.elseTemplates).on("tag:endif",function(){this.stop()}).on("template",s=>i.push(s)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,r){const n=this.liquid.renderer;for(const{value:i,templates:s}of this.branches){const a=yield i.value(e,e.opts.lenientIf);if(yt(a,e)){yield n.renderTemplates(s,e,r);return}}yield n.renderTemplates(this.elseTemplates,e,r)}}class wf extends ie{constructor(e,r,n){super(e,r,n);const i=new pe(e.args,this.liquid.options.operators);this.variable=i.readIdentifier().content}render(e,r){const n=e.environments;_r(n[this.variable])||(n[this.variable]=0);const i=n[this.variable];n[this.variable]++,r.write(U(i))}}class Cf extends ie{constructor(e,r,n){super(e,r,n);const i=new pe(e.args,this.liquid.options.operators);this.file=Nn(i,this.liquid),this.currentFile=e.file,this.args=new kt(i.remaining()),this.templates=this.liquid.parser.parseTokens(r)}*render(e,r){const{liquid:n,args:i,file:s}=this,{renderer:a}=n;if(s===void 0){e.setRegister("blockMode",Ct.OUTPUT),yield a.renderTemplates(this.templates,e,r);return}const o=yield An(this.file,e,n);fe(o,()=>`illegal filename "${o}"`);const l=yield n._parseLayoutFile(o,e.sync,this.currentFile);e.setRegister("blockMode",Ct.STORE);const c=yield a.renderTemplates(this.templates,e),d=e.getRegister("blocks");d[""]===void 0&&(d[""]=(f,u)=>u.write(c)),e.setRegister("blockMode",Ct.OUTPUT),e.push(yield i.render(e)),yield a.renderTemplates(l,e,r),e.pop()}}class Ef extends ie{constructor(e,r,n){super(e,r,n),this.templates=[];const i=/\w+/.exec(e.args);for(this.block=i?i[0]:"";r.length;){const s=r.shift();if(wt(s)&&s.name==="endblock")return;const a=n.parser.parseToken(s,r);this.templates.push(a)}throw new Error(`tag ${e.getText()} not closed`)}*render(e,r){const n=this.getBlockRender(e);e.getRegister("blockMode")===Ct.STORE?e.getRegister("blocks")[this.block]=n:yield n(new js,r)}getBlockRender(e){const{liquid:r,templates:n}=this,i=e.getRegister("blocks")[this.block],s=function*(a,o){e.push({block:a}),yield r.renderer.renderTemplates(n,e,o),e.pop()};return i?(a,o)=>i(new js(()=>s(a,o)),o):s}}class Rf extends ie{constructor(e,r,n){for(super(e,r,n),this.tokens=[];r.length;){const i=r.shift();if(wt(i)&&i.name==="endraw")return;this.tokens.push(i)}throw new Error(`tag ${e.getText()} not closed`)}render(){return this.tokens.map(e=>e.getText()).join("")}}class Sf extends _n{constructor(e,r,n,i){super(e,n,i),this.length=e,this.cols=r}row(){return Math.floor(this.i/this.cols)+1}col0(){return this.i%this.cols}col(){return this.col0()+1}col_first(){return this.col0()===0}col_last(){return this.col()===this.cols}}class xf extends ie{constructor(e,r,n){super(e,r,n);const i=new pe(e.args,this.liquid.options.operators),s=i.readIdentifier();i.skipBlank();const a=i.readIdentifier(),o=i.readValue();if(a.content!=="in"||!o)throw new Error(`illegal tag: ${e.getText()}`);this.variable=s.content,this.collection=o,this.args=new kt(i.remaining()),this.templates=[];let l;const c=this.liquid.parser.parseStream(r).on("start",()=>l=this.templates).on("tag:endtablerow",()=>c.stop()).on("template",d=>l.push(d)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});c.start()}*render(e,r){let n=Tn(yield ye(this.collection,e));const i=yield this.args.render(e),s=i.offset||0,a=i.limit===void 0?n.length:i.limit;n=n.slice(s,s+a);const o=i.cols||n.length,l=this.liquid.renderer,c=new Sf(n.length,o,this.collection.getText(),this.variable),d={tablerowloop:c};e.push(d);for(let f=0;f<n.length;f++,c.next())d[this.variable]=n[f],c.col0()===0&&(c.row()!==1&&r.write("</tr>"),r.write(`<tr class="row${c.row()}">`)),r.write(`<td class="col${c.col()}">`),yield l.renderTemplates(this.templates,e,r),r.write("</td>");n.length&&r.write("</tr>"),e.pop()}}class Of extends ie{constructor(e,r,n){super(e,r,n),this.branches=[],this.elseTemplates=[];let i;this.liquid.parser.parseStream(r).on("start",()=>this.branches.push({value:new Ye(e.args,this.liquid),test:Mr,templates:i=[]})).on("tag:elsif",s=>this.branches.push({value:new Ye(s.args,this.liquid),test:yt,templates:i=[]})).on("tag:else",()=>i=this.elseTemplates).on("tag:endunless",function(){this.stop()}).on("template",s=>i.push(s)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,r){const n=this.liquid.renderer;for(const{value:i,test:s,templates:a}of this.branches){const o=yield i.value(e,e.opts.lenientIf);if(s(o,e)){yield n.renderTemplates(a,e,r);return}}yield n.renderTemplates(this.elseTemplates,e,r)}}class _f extends ie{render(e,r){r.break=!0}}class Tf extends ie{render(e,r){r.continue=!0}}class kf extends ie{constructor(e,r,n){super(e,r,n),this.value=new Ye(e.args,this.liquid)}*render(e,r){const n=yield this.value.value(e,!1);r.write(n)}}class Df extends ie{constructor(e,r,n){super(e,r,n);const s=new pe(e.args,this.liquid.options.operators).readLiquidTagTokens(this.liquid.options);this.templates=this.liquid.parser.parseTokens(s)}*render(e,r){yield this.liquid.renderer.renderTemplates(this.templates,e,r)}}class Lf extends ie{constructor(e,r,n){if(super(e,r,n),e.args.search(/\n\s*[^#\s]/g)!==-1)throw new Error("every line of an inline comment must start with a '#' character")}render(){}}const Pf={assign:af,for:of,capture:df,case:ff,comment:pf,include:gf,render:mf,decrement:yf,increment:wf,cycle:vf,if:bf,layout:Cf,block:Ef,raw:Rf,tablerow:xf,unless:Of,break:_f,continue:Tf,echo:kf,liquid:Df,"#":Lf};class qn{constructor(e={}){this.renderer=new hd,this.filters={},this.tags={},this.options=Nd(e),this.parser=new Kd(this),_s(Pf,(r,n)=>this.registerTag(n,r)),_s(sf,(r,n)=>this.registerFilter(n,r))}parse(e,r){return this.parser.parse(e,r)}_render(e,r,n){const i=r instanceof Dt?r:new Dt(r,this.options,n);return this.renderer.renderTemplates(e,i)}render(e,r,n){return We(this,void 0,void 0,function*(){return rt(this._render(e,r,Object.assign(Object.assign({},n),{sync:!1})))})}renderSync(e,r,n){return nt(this._render(e,r,Object.assign(Object.assign({},n),{sync:!0})))}renderToNodeStream(e,r,n={}){const i=new Dt(r,this.options,n);return this.renderer.renderTemplatesToNodeStream(e,i)}_parseAndRender(e,r,n){const i=this.parse(e);return this._render(i,r,n)}parseAndRender(e,r,n){return We(this,void 0,void 0,function*(){return rt(this._parseAndRender(e,r,Object.assign(Object.assign({},n),{sync:!1})))})}parseAndRenderSync(e,r,n){return nt(this._parseAndRender(e,r,Object.assign(Object.assign({},n),{sync:!0})))}_parsePartialFile(e,r,n){return this.parser.parseFile(e,r,bt.Partials,n)}_parseLayoutFile(e,r,n){return this.parser.parseFile(e,r,bt.Layouts,n)}_parseFile(e,r,n,i){return this.parser.parseFile(e,r,n,i)}parseFile(e,r){return We(this,void 0,void 0,function*(){return rt(this.parser.parseFile(e,!1,r))})}parseFileSync(e,r){return nt(this.parser.parseFile(e,!0,r))}*_renderFile(e,r,n){const i=yield this._parseFile(e,n.sync,n.lookupType);return yield this._render(i,r,n)}renderFile(e,r,n){return We(this,void 0,void 0,function*(){return rt(this._renderFile(e,r,Object.assign(Object.assign({},n),{sync:!1})))})}renderFileSync(e,r,n){return nt(this._renderFile(e,r,Object.assign(Object.assign({},n),{sync:!0})))}renderFileToNodeStream(e,r,n){return We(this,void 0,void 0,function*(){const i=yield this.parseFile(e);return this.renderToNodeStream(i,r,n)})}_evalValue(e,r){const n=new Ye(e,this),i=r instanceof Dt?r:new Dt(r,this.options);return n.value(i)}evalValue(e,r){return We(this,void 0,void 0,function*(){return rt(this._evalValue(e,r))})}evalValueSync(e,r){return nt(this._evalValue(e,r))}registerFilter(e,r){this.filters[e]=r}registerTag(e,r){this.tags[e]=be(r)?r:Bd(r)}plugin(e){return e.call(this,qn)}express(){const e=this;let r=!0;return function(n,i,s){if(r){r=!1;const a=jr(this.root);e.options.root.unshift(...a),e.options.layouts.unshift(...a),e.options.partials.unshift(...a)}e.renderFile(n,i).then(a=>s(null,a),s)}}}const Lt=new qn;function Ff(t,e){return N.useMemo(()=>Mf(t,e),[t,e])}function Mf(t,e){return t.map(r=>{const n=e||r.transform;return n?Object.keys(n).reduce((i,s)=>s==="details"?(i[s]=n[s].map(a=>Array.isArray(a)?a.map(o=>({label:o.label,value:Lt.parseAndRenderSync(o.value,r),html:o.html})):{label:a.label,value:Lt.parseAndRenderSync(a.value,r),html:a.html}),i):s==="actions"?(i[s]=n[s].map(a=>Object.keys(a).reduce((o,l)=>(typeof a[l]=="object"?o[l]=Object.keys(a[l]).reduce((c,d)=>(c[d]=Lt.parseAndRenderSync(a[l][d],r),c),{}):o[l]=Lt.parseAndRenderSync(a[l],r),o),{})),i):(i[s]=Lt.parseAndRenderSync(n[s],r),i),{}):r})}function oa({path:t,placeholderText:e,dynamicOptions:r}){var T;let{asyncUrl:n,transform:i,clientSideFilter:s,rootData:a,includeHeaders:o}=r,l=ko();const c=Se(),{activeIndex:d,search:f,setActions:u,navigateTo:m}=N.useContext(et),b=Ru(f,500),w=o&&c.headers?c.headers:{},{isLoading:S,error:_,data:D=[]}=Eu({queryKey:[t,s?"":b],queryFn:()=>fetch(Lt.parseAndRenderSync(n,l),{headers:w}).then(P=>P.json())}),C=a?wc(D,a,[]):D,E=N.useMemo(()=>Array.isArray(C)?C:[C],[C]);let F=Ff(E,i);s&&(F=F.filter(P=>P.title.toLowerCase().includes(f.toLowerCase())));const O=F[d];return N.useEffect(()=>{O&&O.actions?u(O.actions):u([])},[O,f,d,u]),S?y.jsx(Jt,{children:y.jsx("div",{className:"qikbar-item-empty",children:"loading..."})}):F.length===0?y.jsx(Jt,{children:y.jsx("div",{className:"qikbar-item-empty",children:"No matches"})}):y.jsxs(y.Fragment,{children:[y.jsx(Bi,{placeholder:e}),y.jsxs(Jt,{children:[y.jsx(Vi,{children:F.map(P=>y.jsx(un,{item:P},P.id))}),O&&((T=O==null?void 0:O.details)==null?void 0:T.length)>0&&y.jsx(Hi,{fields:O.details})]})]})}class jf extends N.Component{constructor(){super(...arguments);da(this,"state",{hasError:!1})}static getDerivedStateFromError(r){return{hasError:!0}}componentDidCatch(r,n){}render(){return this.state.hasError?y.jsx("div",{className:"qikbar-command-wrapper",children:"Something went wrong."}):this.props.children}}function la(){let t=Di();return y.jsx("div",{className:"qikbar-command-wrapper",children:y.jsxs("div",{className:"qikbar-command-bar",children:[y.jsx("div",{className:"qikbar-command-content",children:y.jsxs("div",{className:"qikbar-command-error",children:["It looks like there maybe a problem. If you continue to see this please contact @"," ",y.jsx("a",{href:`mailto:support@qikbar.com?subject=Issues with running qikbar on my site.&body=The current error is: ${t}`,children:"support@qikbar.com"})]})}),y.jsx("div",{className:"qikbar-command-footer",children:y.jsx("div",{className:"qikbar-logo",children:y.jsx("a",{href:"https://www.qikbar.com",target:"_blank",rel:"noopener noreferrer",children:y.jsxs("svg",{width:"89",height:"30",viewBox:"0 0 89 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("path",{d:"M36.9964 16.0795H39.1271L40.0327 17.2354L41.2205 18.5991L43.0476 20.8523H40.6612L39.3828 19.3235L38.6264 18.2369L36.9964 16.0795ZM43.1222 14.5455C43.1222 15.7457 42.8913 16.7631 42.4297 17.5977C41.968 18.4322 41.343 19.0661 40.5547 19.4993C39.7699 19.9325 38.8892 20.1491 37.9126 20.1491C36.9325 20.1491 36.0501 19.9308 35.2653 19.494C34.4805 19.0572 33.8572 18.4233 33.3956 17.5923C32.9375 16.7578 32.7085 15.7422 32.7085 14.5455C32.7085 13.3452 32.9375 12.3278 33.3956 11.4933C33.8572 10.6587 34.4805 10.0249 35.2653 9.59162C36.0501 9.15838 36.9325 8.94176 37.9126 8.94176C38.8892 8.94176 39.7699 9.15838 40.5547 9.59162C41.343 10.0249 41.968 10.6587 42.4297 11.4933C42.8913 12.3278 43.1222 13.3452 43.1222 14.5455ZM40.4268 14.5455C40.4268 13.8352 40.3256 13.2351 40.1232 12.745C39.9244 12.255 39.6367 11.8839 39.2603 11.6317C38.8874 11.3796 38.4382 11.2536 37.9126 11.2536C37.3906 11.2536 36.9414 11.3796 36.565 11.6317C36.1886 11.8839 35.8991 12.255 35.6967 12.745C35.4979 13.2351 35.3984 13.8352 35.3984 14.5455C35.3984 15.2557 35.4979 15.8558 35.6967 16.3459C35.8991 16.8359 36.1886 17.207 36.565 17.4592C36.9414 17.7113 37.3906 17.8374 37.9126 17.8374C38.4382 17.8374 38.8874 17.7113 39.2603 17.4592C39.6367 17.207 39.9244 16.8359 40.1232 16.3459C40.3256 15.8558 40.4268 15.2557 40.4268 14.5455ZM44.6762 20V11.8182H47.281V20H44.6762ZM45.9813 10.8647C45.6155 10.8647 45.3012 10.744 45.0384 10.5025C44.7757 10.2575 44.6443 9.96271 44.6443 9.61825C44.6443 9.27734 44.7757 8.98615 45.0384 8.74467C45.3012 8.49964 45.6155 8.37713 45.9813 8.37713C46.3506 8.37713 46.6649 8.49964 46.9241 8.74467C47.1869 8.98615 47.3183 9.27734 47.3183 9.61825C47.3183 9.96271 47.1869 10.2575 46.9241 10.5025C46.6649 10.744 46.3506 10.8647 45.9813 10.8647ZM51.288 17.8533L51.2987 14.7479H51.6609L53.962 11.8182H56.913L53.4933 16.0156H52.8061L51.288 17.8533ZM48.9389 20V9.09091H51.5437V20H48.9389ZM54.0206 20L51.8793 16.6016L53.5945 14.7532L57.0302 20H54.0206Z",className:"qikbar-logo-secondary"}),y.jsx("path",{d:"M57.8452 20V9.09091H60.4499V13.2191H60.5032C60.6097 12.9705 60.7607 12.7308 60.956 12.5C61.1548 12.2692 61.407 12.081 61.7124 11.9354C62.0213 11.7862 62.3906 11.7116 62.8203 11.7116C63.3885 11.7116 63.9194 11.8608 64.413 12.1591C64.9102 12.4574 65.3114 12.9173 65.6168 13.5387C65.9222 14.1602 66.0749 14.9521 66.0749 15.9144C66.0749 16.8413 65.9276 17.6172 65.6328 18.2422C65.3416 18.8672 64.9474 19.3359 64.4503 19.6484C63.9567 19.9609 63.408 20.1172 62.8043 20.1172C62.3924 20.1172 62.0355 20.0497 61.7337 19.9148C61.4318 19.7798 61.1779 19.6023 60.9719 19.3821C60.7695 19.1619 60.6133 18.9258 60.5032 18.6737H60.4233V20H57.8452ZM60.3967 15.9091C60.3967 16.3494 60.4553 16.733 60.5724 17.0597C60.6932 17.3864 60.8654 17.6403 61.0891 17.8214C61.3164 17.9989 61.5881 18.0877 61.9041 18.0877C62.2237 18.0877 62.4954 17.9989 62.7191 17.8214C62.9428 17.6403 63.1115 17.3864 63.2251 17.0597C63.3423 16.733 63.4009 16.3494 63.4009 15.9091C63.4009 15.4687 63.3423 15.087 63.2251 14.7638C63.1115 14.4407 62.9428 14.1903 62.7191 14.0128C62.4989 13.8352 62.2273 13.7464 61.9041 13.7464C61.5845 13.7464 61.3129 13.8335 61.0891 14.0075C60.8654 14.1815 60.6932 14.43 60.5724 14.7532C60.4553 15.0763 60.3967 15.4616 60.3967 15.9091ZM69.7464 20.1385C69.2243 20.1385 68.7609 20.0515 68.3561 19.8775C67.9548 19.6999 67.637 19.4336 67.4026 19.0785C67.1718 18.7198 67.0564 18.2706 67.0564 17.7308C67.0564 17.2763 67.1363 16.8928 67.2961 16.5803C67.4559 16.2678 67.676 16.0138 67.9566 15.8185C68.2371 15.6232 68.5603 15.4759 68.926 15.3764C69.2918 15.2734 69.6824 15.2042 70.0979 15.1687C70.5631 15.1261 70.9378 15.0817 71.2219 15.0355C71.5059 14.9858 71.7119 14.9165 71.8398 14.8278C71.9711 14.7354 72.0368 14.6058 72.0368 14.4389V14.4123C72.0368 14.1388 71.9427 13.9276 71.7545 13.7784C71.5663 13.6293 71.3124 13.5547 70.9928 13.5547C70.6483 13.5547 70.3714 13.6293 70.1618 13.7784C69.9523 13.9276 69.8192 14.1335 69.7623 14.3963L67.36 14.3111C67.431 13.8139 67.6139 13.37 67.9086 12.9794C68.2069 12.5852 68.6153 12.2763 69.1338 12.0526C69.6558 11.8253 70.2826 11.7116 71.0141 11.7116C71.5361 11.7116 72.0173 11.7738 72.4577 11.8981C72.898 12.0188 73.2815 12.1964 73.6082 12.4308C73.9349 12.6616 74.1871 12.9457 74.3646 13.283C74.5457 13.6204 74.6363 14.0057 74.6363 14.4389V20H72.186V18.8601H72.1221C71.9765 19.1371 71.79 19.3714 71.5628 19.5632C71.339 19.755 71.0745 19.8988 70.7691 19.9947C70.4672 20.0906 70.1263 20.1385 69.7464 20.1385ZM70.5507 18.4339C70.8312 18.4339 71.0834 18.3771 71.3071 18.2635C71.5344 18.1499 71.7155 17.9936 71.8504 17.7947C71.9854 17.5923 72.0528 17.358 72.0528 17.0916V16.3139C71.9782 16.353 71.8877 16.3885 71.7812 16.4205C71.6782 16.4524 71.5645 16.4826 71.4403 16.511C71.316 16.5394 71.1881 16.5643 71.0567 16.5856C70.9253 16.6069 70.7993 16.6264 70.6785 16.6442C70.4335 16.6832 70.224 16.7436 70.05 16.8253C69.8795 16.907 69.7481 17.0135 69.6558 17.1449C69.567 17.2727 69.5226 17.4254 69.5226 17.603C69.5226 17.8729 69.6185 18.0788 69.8103 18.2209C70.0056 18.3629 70.2524 18.4339 70.5507 18.4339ZM76.229 20V11.8182H78.7591V13.3097H78.8444C78.9935 12.7699 79.2368 12.3686 79.5741 12.1058C79.9115 11.8395 80.3039 11.7063 80.7513 11.7063C80.8721 11.7063 80.9964 11.7152 81.1242 11.733C81.252 11.7472 81.371 11.7702 81.4811 11.8022V14.0661C81.3568 14.0234 81.1934 13.9897 80.991 13.9648C80.7922 13.94 80.6146 13.9276 80.4584 13.9276C80.1494 13.9276 79.8706 13.9968 79.6221 14.1353C79.377 14.2702 79.1835 14.4602 79.0415 14.7053C78.903 14.9467 78.8337 15.2308 78.8337 15.5575V20H76.229Z",className:"qikbar-logo-primary-fill"}),y.jsx("path",{d:"M19.75 18.75L17.261 16.261M17.261 16.261C17.5744 15.9476 17.823 15.5755 17.9926 15.1661C18.1622 14.7566 18.2495 14.3177 18.2495 13.8745C18.2495 13.4313 18.1622 12.9924 17.9926 12.5829C17.823 12.1735 17.5744 11.8014 17.261 11.488C16.9476 11.1746 16.5755 10.926 16.1661 10.7564C15.7566 10.5868 15.3177 10.4995 14.8745 10.4995C14.4313 10.4995 13.9924 10.5868 13.5829 10.7564C13.1735 10.926 12.8014 11.1746 12.488 11.488C11.8549 12.1211 11.4993 12.9797 11.4993 13.875C11.4993 14.7703 11.8549 15.6289 12.488 16.262C13.1211 16.8951 13.9797 17.2507 14.875 17.2507C15.7703 17.2507 16.6289 16.8951 17.262 16.262L17.261 16.261ZM25 15C25 16.1819 24.7672 17.3522 24.3149 18.4442C23.8626 19.5361 23.1997 20.5282 22.364 21.364C21.5282 22.1997 20.5361 22.8626 19.4442 23.3149C18.3522 23.7672 17.1819 24 16 24C14.8181 24 13.6478 23.7672 12.5558 23.3149C11.4639 22.8626 10.4718 22.1997 9.63604 21.364C8.80031 20.5282 8.13738 19.5361 7.68508 18.4442C7.23279 17.3522 7 16.1819 7 15C7 12.6131 7.94821 10.3239 9.63604 8.63604C11.3239 6.94821 13.6131 6 16 6C18.3869 6 20.6761 6.94821 22.364 8.63604C24.0518 10.3239 25 12.6131 25 15Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"qikbar-logo-primary-stroke"})]})})})})]})})}const Se=_a(t=>({commands:[],router:null,headers:null,theme:null,addRouter:e=>{t(r=>({router:e}))},addHeaders:e=>{t(()=>({headers:e}))},setTheme:e=>{t(()=>({theme:e}))},addCommand:e=>{t(r=>({commands:[...r.commands,e]}))},addCommands:e=>{t(r=>({commands:e}))},updateCommand:e=>{t(r=>({commands:r.commands.map(n=>n.id===e.id?e:n)}))},removeCommand:e=>{t(r=>({commands:r.commands.filter(n=>n.id!==e.id)}))}}));function Nf({commands:t,theme:e}){const r=ji([{path:"/",element:y.jsx(Ii,{demo:!0,defaultOpen:!0,wrapperClass:"qikbar-command-demo-wrapper"}),errorElement:y.jsx(la,{}),children:t.map(n=>({path:n.path,element:n.type==="STATIC"?y.jsx(Qi,{...n}):y.jsx(oa,{...n})}))}]);return y.jsx("div",{id:"qikbar",className:`qikbar-demo qikbar-light qikbar-${e}`,children:y.jsx(Pi,{router:r})})}function Af(){const t=Se(n=>n.commands),e=Se(n=>n.theme),r=ji([{path:"/",element:y.jsx(Ii,{}),errorElement:y.jsx(la,{}),children:t.map(n=>({path:n.path,element:n.type==="STATIC"?y.jsx(Qi,{...n}):y.jsx(oa,{...n})}))}]);return y.jsx("div",{id:"qikbar",className:`qikbar-light qikbar-${e}`,children:y.jsx(Pi,{router:r})})}const qf=new ru;function If({id:t}){const e={}.VITE_DEV==="true"?"http://localhost:3000":"https://app.qikbar.com";return fetch(`${e}/api/site/${t}`).then(n=>n.json()).then(n=>{n!=null&&n.routes&&Se.getState().addCommands(n.routes),n!=null&&n.theme&&Se.getState().setTheme(n.theme)}).catch(n=>{console.error(n)}),{id:t,boot:({elementId:n})=>{$t.createRoot(document.getElementById(n)).render(y.jsx(N.StrictMode,{children:y.jsx(jf,{children:y.jsx(lu,{client:qf,children:y.jsx(Af,{})})})})),window.Qikbar.booted=!0},setTheme:n=>Se.getState().setTheme(n),addCommand:n=>Se.getState().addCommand(n),updateCommand:n=>Se.getState().updateCommand(n),removeCommand:n=>Se.getState().removeCommand(n),addRouter:n=>Se.getState().addRouter(n),addHeaders:n=>Se.getState().addHeaders(n)}}function ua(t){return window.Qikbar=If({id:t}),window.Qikbar}function Vf({elementId:t,router:e,siteId:r}){return N.useEffect(()=>{if(window.Qikbar)return;const n=ua(r);n.boot({elementId:t||"qikbar"}),e&&n.addRouter(e)},[e,t,r]),t?null:y.jsx("div",{id:"qikbar"})}const hp="";ge.DemoBar=Nf,ge.Qikbar=Vf,ge.init=ua,Object.defineProperty(ge,Symbol.toStringTag,{value:"Module"})});
108
+ ***************************************************************************** */var Fr=function(){return Fr=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},Fr.apply(this,arguments)};function Ye(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function l(c){try{u(n.next(c))}catch(f){a(f)}}function o(c){try{u(n.throw(c))}catch(f){a(f)}}function u(c){c.done?s(c.value):i(c.value).then(l,o)}u((n=n.apply(t,e||[])).next())})}function it(t){return Ye(this,void 0,void 0,function*(){if(!Tr(t))return t;let e,r=!1,n="next";do{const i=t[n](e);r=i.done,e=i.value,n="next";try{Tr(e)&&(e=it(e)),Rc(e)&&(e=yield e)}catch(s){n="throw",e=s}}while(!r);return e})}function st(t){if(!Tr(t))return t;let e,r=!1,n="next";do{const i=t[n](e);if(r=i.done,e=i.value,n="next",Tr(e))try{e=st(e)}catch(s){n="throw",e=s}}while(!r);return e}function kn(t){return t=B(t),Ee(t)?t:We(t)&&t.length>0?[t]:Oc(t)?Array.from(t):Rn(t)?Object.keys(t).map(e=>[e,t[e]]):[]}function Ge(t){return Ke(t)?[]:Ee(t)?t:[t]}const Uc=/%([-_0^#:]+)?(\d+)?([EO])?(.)/,Is=["January","February","March","April","May","June","July","August","September","October","November","December"],Vs=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],$c=Is.map($s),Bc=Vs.map($s),Us={1:"st",2:"nd",3:"rd",default:"th"};function $s(t){return t.slice(0,3)}function Hc(t){return[31,Qc(t)?29:28,31,30,31,30,31,31,30,31,30,31]}function Bs(t){let e=0;for(let r=0;r<t.getMonth();++r)e+=Hc(t)[r];return e+t.getDate()}function Hs(t,e){const r=Bs(t)+(e-t.getDay()),i=7-new Date(t.getFullYear(),0,1).getDay()+e;return String(Math.floor((r-i)/7)+1)}function Qc(t){const e=t.getFullYear();return!!(!(e&3)&&(e%100||e%400===0&&e))}function zc(t){const e=t.getDate().toString(),r=parseInt(e.slice(-1));return Us[r]||Us.default}function Wc(t){return parseInt(t.getFullYear().toString().substring(0,2),10)}const Kc={d:2,e:2,H:2,I:2,j:3,k:2,l:2,L:3,m:2,M:2,S:2,U:2,W:2},Yc={a:" ",A:" ",b:" ",B:" ",c:" ",e:" ",k:" ",l:" ",p:" ",P:" "},Dn={a:t=>Bc[t.getDay()],A:t=>Vs[t.getDay()],b:t=>$c[t.getMonth()],B:t=>Is[t.getMonth()],c:t=>t.toLocaleString(),C:t=>Wc(t),d:t=>t.getDate(),e:t=>t.getDate(),H:t=>t.getHours(),I:t=>String(t.getHours()%12||12),j:t=>Bs(t),k:t=>t.getHours(),l:t=>String(t.getHours()%12||12),L:t=>t.getMilliseconds(),m:t=>t.getMonth()+1,M:t=>t.getMinutes(),N:(t,e)=>{const r=Number(e.width)||9,n=String(t.getMilliseconds()).slice(0,r);return _c(n,r,"0")},p:t=>t.getHours()<12?"AM":"PM",P:t=>t.getHours()<12?"am":"pm",q:t=>zc(t),s:t=>Math.round(t.getTime()/1e3),S:t=>t.getSeconds(),u:t=>t.getDay()||7,U:t=>Hs(t,0),w:t=>t.getDay(),W:t=>Hs(t,1),x:t=>t.toLocaleDateString(),X:t=>t.toLocaleTimeString(),y:t=>t.getFullYear().toString().slice(2,4),Y:t=>t.getFullYear(),z:(t,e)=>{const r=Math.abs(t.getTimezoneOffset()),n=Math.floor(r/60),i=r%60;return(t.getTimezoneOffset()>0?"-":"+")+Dr(n,2,"0")+(e.flags[":"]?":":"")+Dr(i,2,"0")},t:()=>" ",n:()=>`
109
+ `,"%":()=>"%"};Dn.h=Dn.b;function Gc(t,e){let r="",n=e,i;for(;i=Uc.exec(n);)r+=n.slice(0,i.index),n=n.slice(i.index+i[0].length),r+=Zc(t,i);return r+n}function Zc(t,e){const[r,n="",i,s,a]=e,l=Dn[a];if(!l)return r;const o={};for(const d of n)o[d]=!0;let u=String(l(t,{flags:o,width:i,modifier:s})),c=Yc[a]||"0",f=i||Kc[a]||0;return o["^"]?u=u.toUpperCase():o["#"]&&(u=Tc(u)),o._?c=" ":o[0]&&(c="0"),o["-"]&&(f=0),Dr(u,f,c)}const Jc=6e4,Xc=new Date().getTimezoneOffset(),ed=/([zZ]|([+-])(\d{2}):(\d{2}))$/;class at{constructor(e,r){if(e instanceof at)this.date=e.date,r=e.timezoneOffset;else{const n=(Xc-r)*Jc,i=new Date(e).getTime()+n;this.date=new Date(i)}this.timezoneOffset=r}getTime(){return this.date.getTime()}getMilliseconds(){return this.date.getMilliseconds()}getSeconds(){return this.date.getSeconds()}getMinutes(){return this.date.getMinutes()}getHours(){return this.date.getHours()}getDay(){return this.date.getDay()}getDate(){return this.date.getDate()}getMonth(){return this.date.getMonth()}getFullYear(){return this.date.getFullYear()}toLocaleTimeString(e){return this.date.toLocaleTimeString(e)}toLocaleDateString(e){return this.date.toLocaleDateString(e)}getTimezoneOffset(){return this.timezoneOffset}static createDateFixedToTimezone(e){const r=e.match(ed);if(r&&r[1]==="Z")return new at(+new Date(e),0);if(r&&r[2]&&r[3]&&r[4]){const[,,n,i,s]=r,a=(n==="+"?-1:1)*(parseInt(i,10)*60+parseInt(s,10));return new at(+new Date(e),a)}return new Date(e)}}class Ln extends Le{constructor(e,r,n,i,s,a,l,o){super(e,n,i,s,o),this.trimLeft=!1,this.trimRight=!1,this.content=this.getText();const u=r[0]==="-",c=Sn(r)==="-";this.content=r.slice(u?1:0,c?-1:r.length).trim(),this.trimLeft=u||a,this.trimRight=c||l}}class Qs extends Ln{constructor(e,r,n,i,s){const{trimTagLeft:a,trimTagRight:l,tagDelimiterLeft:o,tagDelimiterRight:u}=i,c=e.slice(r+o.length,n-u.length);super(ee.Tag,c,e,r,n,a,l,s);const f=new me(this.content,i.operators);if(this.name=f.readTagName(),!this.name)throw new On("illegal tag syntax",this);f.skipBlank(),this.args=f.remaining()}}class td extends Ln{constructor(e,r,n,i,s){const{trimOutputLeft:a,trimOutputRight:l,outputDelimiterLeft:o,outputDelimiterRight:u}=i,c=e.slice(r+o.length,n-u.length);super(ee.Output,c,e,r,n,a,l,s)}}class zs extends Le{constructor(e,r,n,i){super(ee.HTML,e,r,n,i),this.input=e,this.begin=r,this.end=n,this.file=i,this.trimLeft=0,this.trimRight=0}getContent(){return this.input.slice(this.begin+this.trimLeft,this.end-this.trimRight)}}class rd extends Le{constructor(e,r){super(ee.Number,e.input,e.begin,r?r.end:e.end,e.file),this.whole=e,this.decimal=r}}class Mr extends Le{constructor(e,r,n,i){super(ee.Word,e,r,n,i),this.input=e,this.begin=r,this.end=n,this.file=i,this.content=this.getText()}isNumber(e=!1){const r=e&&X[this.input.charCodeAt(this.begin)]&Ac?this.begin+1:this.begin;for(let n=r;n<this.end;n++)if(!(X[this.input.charCodeAt(n)]&Nc))return!1;return!0}}class nd extends Le{constructor(e,r,n,i){super(ee.Literal,e,r,n,i),this.input=e,this.begin=r,this.end=n,this.file=i,this.literal=this.getText()}}const Ws={"==":2,"!=":2,">":2,"<":2,">=":2,"<=":2,contains:2,not:1,and:0,or:0},id={"==":0,"!=":0,">":0,"<":0,">=":0,"<=":0,contains:0,not:1,and:0,or:0};class sd extends Le{constructor(e,r,n,i){super(ee.Operator,e,r,n,i),this.input=e,this.begin=r,this.end=n,this.file=i,this.operator=this.getText()}getPrecedence(){const e=this.getText();return e in Ws?Ws[e]:1}}class Ks extends Le{constructor(e,r,n){super(ee.PropertyAccess,e.input,e.begin,n,e.file),this.variable=e,this.props=r,this.propertyName=this.variable instanceof Mr?this.variable.getText():ra(this.variable.getText())}}class ad extends Le{constructor(e,r,n,i,s,a){super(ee.Filter,n,i,s,a),this.name=e,this.args=r}}class od extends Le{constructor(e,r,n,i,s,a){super(ee.Hash,e,r,n,a),this.input=e,this.begin=r,this.end=n,this.name=i,this.value=s,this.file=a}}class ld extends Le{constructor(e,r,n,i){super(ee.Quoted,e,r,n,i),this.input=e,this.begin=r,this.end=n,this.file=i}}class ud extends Le{constructor(e,r,n,i,s,a){super(ee.Range,e,r,n,a),this.input=e,this.begin=r,this.end=n,this.lhs=i,this.rhs=s,this.file=a}}class cd extends Ln{constructor(e,r,n,i,s){const a=e.slice(r,n);if(super(ee.Tag,a,e,r,n,!1,!1,s),!/\S/.test(a))this.name="",this.args="";else{const l=new me(this.content,i.operators);if(this.name=l.readTagName(),!this.name)throw new On("illegal liquid tag syntax",this);l.skipBlank(),this.args=l.remaining()}}}class dd{constructor(){this.buffer=""}write(e){this.buffer+=$(e)}}class hd{constructor(){throw this.buffer="",this.stream=null,new Error("streaming not supported in browser")}}class fd{constructor(){this.buffer=""}write(e){e=B(e),typeof e!="string"&&this.buffer===""?this.buffer=e:this.buffer=$(this.buffer)+$(e)}}class pd{renderTemplatesToNodeStream(e,r){const n=new hd;return Promise.resolve().then(()=>it(this.renderTemplates(e,r,n))).then(()=>n.end(),i=>n.error(i)),n.stream}*renderTemplates(e,r,n){n||(n=r.opts.keepOutputType?new fd:new dd);for(const i of e)try{const s=yield i.render(r,n);if(s&&n.write(s),n.break||n.continue)break}catch(s){throw js.is(s)?s:new js(s,i)}return n.buffer}}class md{constructor(e){this.postfix=[...wd(e)]}*evaluate(e,r){pe(e,"unable to evaluate: context not defined");const n=[];for(const i of this.postfix)if(na(i)){const s=n.pop();let a;if(id[i.operator]===1)a=yield e.opts.operators[i.operator](s,e);else{const l=n.pop();a=yield e.opts.operators[i.operator](l,s,e)}n.push(a)}else n.push(yield ve(i,e,r&&this.postfix.length===1));return n[0]}}function*ve(t,e,r=!1){if(rh(t))return yield gd(t,e,r);if(ih(t))return yield bd(t,e);if(eh(t))return vd(t);if(th(t))return yd(t);if(nh(t))return t.getText();if(ia(t))return Pn(t)}function*gd(t,e,r){const n=[];for(const i of t.props)n.push(yield ve(i,e,!1));try{return yield e._get([t.propertyName,...n])}catch(i){if(r&&i.name==="InternalUndefinedVariableError")return null;throw new Lc(i,t)}}function yd(t){const e=t.whole.content+"."+(t.decimal?t.decimal.content:"");return Number(e)}function Pn(t){return ra(t.getText())}function vd(t){return qs[t.literal]}function*bd(t,e){const r=yield ve(t.lhs,e),n=yield ve(t.rhs,e);return ks(+r,+n+1)}function*wd(t){const e=[];for(const r of t)if(na(r)){for(;e.length&&e[e.length-1].getPrecedence()>r.getPrecedence();)yield e.pop();e.push(r)}else yield r;for(;e.length;)yield e.pop()}function bt(t,e){return!Nr(t,e)}function Nr(t,e){return e.opts.jsTruthy?!t:t===!1||t===void 0||t===null}const Cd={"==":(t,e)=>xe(t)?t.equals(e):xe(e)?e.equals(t):B(t)===B(e),"!=":(t,e)=>xe(t)?!t.equals(e):xe(e)?!e.equals(t):B(t)!==B(e),">":(t,e)=>xe(t)?t.gt(e):xe(e)?e.lt(t):B(t)>B(e),"<":(t,e)=>xe(t)?t.lt(e):xe(e)?e.gt(t):B(t)<B(e),">=":(t,e)=>xe(t)?t.geq(e):xe(e)?e.leq(t):B(t)>=B(e),"<=":(t,e)=>xe(t)?t.leq(e):xe(e)?e.geq(t):B(t)<=B(e),contains:(t,e)=>(t=B(t),e=B(e),t&&we(t.indexOf)?t.indexOf(e)>-1:!1),not:(t,e)=>Nr(B(t),e),and:(t,e,r)=>bt(B(t),r)&&bt(B(e),r),or:(t,e,r)=>bt(B(t),r)||bt(B(e),r)};class jn{constructor(e,r,n,i){this.key=e,this.value=r,this.next=n,this.prev=i}}class Ys{constructor(e,r=0){this.limit=e,this.size=r,this.cache={},this.head=new jn("HEAD",null,null,null),this.tail=new jn("TAIL",null,null,null),this.head.next=this.tail,this.tail.prev=this.head}write(e,r){if(this.cache[e])this.cache[e].value=r;else{const n=new jn(e,r,this.head.next,this.head);this.head.next.prev=n,this.head.next=n,this.cache[e]=n,this.size++,this.ensureLimit()}}read(e){if(!this.cache[e])return;const{value:r}=this.cache[e];return this.remove(e),this.write(e,r),r}remove(e){const r=this.cache[e];r.prev.next=r.next,r.next.prev=r.prev,delete this.cache[e],this.size--}clear(){this.head.next=this.tail,this.tail.prev=this.head,this.size=0,this.cache={}}ensureLimit(){this.size>this.limit&&this.remove(this.tail.prev.key)}}function Gs(t,e){const r=document.createElement("base");r.href=t;const n=document.getElementsByTagName("head")[0];n.insertBefore(r,n.firstChild);const i=document.createElement("a");i.href=e;const s=i.href;return n.removeChild(r),s}function Ed(t,e,r){return t.length&&Sn(t)!=="/"&&(t+="/"),Gs(t,e).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/,(i,s,a)=>{const l=a.split("/").pop();return/\.\w+$/.test(l)?i:s+a+r})}function Sd(t){return Ye(this,void 0,void 0,function*(){return new Promise((e,r)=>{const n=new XMLHttpRequest;n.onload=()=>{n.status>=200&&n.status<300?e(n.responseText):r(new Error(n.statusText))},n.onerror=()=>{r(new Error("An error occurred whilst receiving the response."))},n.open("GET",t),n.send()})})}function Rd(t){const e=new XMLHttpRequest;if(e.open("GET",t,!1),e.send(),e.status<200||e.status>=300)throw new Error(e.statusText);return e.responseText}function xd(t){return Ye(this,void 0,void 0,function*(){return!0})}function Od(t){return!0}function _d(t){return Gs(t,".")}var Td=Object.freeze({__proto__:null,resolve:Ed,readFile:Sd,readFileSync:Rd,exists:xd,existsSync:Od,dirname:_d,sep:"/"});function kd(t,e,...r){return t=B(t),Ee(t)||We(t)?t.length?t:e:t===!1&&new Map(r).get("allow_false")?!1:Nr(t,this.context)?e:t}function Zs(t){return JSON.stringify(t)}const Dd={raw:!0,handler:Ls},Ld={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},Pd={"&amp;":"&","&lt;":"<","&gt;":">","&#34;":'"',"&#39;":"'"};function Fn(t){return $(t).replace(/&|<|>|"|'/g,e=>Ld[e])}function jd(t){return $(t).replace(/&(amp|lt|gt|#34|#39);/g,e=>Pd[e])}function Fd(t){return Fn(jd($(t)))}function Md(t){return $(t).replace(/\n/g,`<br />
110
+ `)}function Nd(t){return $(t).replace(/<script.*?<\/script>|<!--.*?-->|<style.*?<\/style>|<.*?>/g,"")}var Ad=Object.freeze({__proto__:null,escape:Fn,escape_once:Fd,newline_to_br:Md,strip_html:Nd});const wt={root:["."],layouts:["."],partials:["."],relativeReference:!0,jekyllInclude:!1,cache:void 0,extname:"",fs:Td,dynamicPartials:!0,jsTruthy:!1,trimTagRight:!1,trimTagLeft:!1,trimOutputRight:!1,trimOutputLeft:!1,greedy:!0,tagDelimiterLeft:"{%",tagDelimiterRight:"%}",outputDelimiterLeft:"{{",outputDelimiterRight:"}}",preserveTimezones:!1,strictFilters:!1,strictVariables:!1,ownPropertyOnly:!0,lenientIf:!1,globals:{},keepOutputType:!1,operators:Cd};function qd(t){if(t.hasOwnProperty("root")&&(t.hasOwnProperty("partials")||(t.partials=t.root),t.hasOwnProperty("layouts")||(t.layouts=t.root)),t.hasOwnProperty("cache")){let e;typeof t.cache=="number"?e=t.cache>0?new Ys(t.cache):void 0:typeof t.cache=="object"?e=t.cache:e=t.cache?new Ys(1024):void 0,t.cache=e}return t=Object.assign(Object.assign(Object.assign({},wt),t.jekyllInclude?{dynamicPartials:!1}:{}),t),!t.fs.dirname&&t.relativeReference&&(console.warn("[LiquidJS] `fs.dirname` is required for relativeReference, set relativeReference to `false` to suppress this warning, or provide implementation for `fs.dirname`"),t.relativeReference=!1),t.root=Ar(t.root),t.partials=Ar(t.partials),t.layouts=Ar(t.layouts),t.outputEscape=t.outputEscape&&Id(t.outputEscape),t}function Id(t){return t==="escape"?Fn:t==="json"?Zs:(pe(we(t),"`outputEscape` need to be of type string or function"),t)}function Ar(t){let e=[];return Ee(t)&&(e=t),We(t)&&(e=[t]),e}function Vd(t,e,r,n=t.length){let i=r,s=e,a;for(;i[t[s]]&&s<n;)i=i[t[s++]],i.end&&(a=i);return!a||a.needBoundary&&X[t.charCodeAt(s)]&_n?-1:s}function Ud(t,e){let r=!1;for(let n=0;n<t.length;n++){const i=t[n];Jd(i)&&(!r&&i.trimLeft&&$d(t[n-1],e.greedy),Et(i)&&(i.name==="raw"?r=!0:i.name==="endraw"&&(r=!1)),!r&&i.trimRight&&Bd(t[n+1],e.greedy))}}function $d(t,e){if(!t||!Nn(t))return;const r=e?Pr:Ms;for(;X[t.input.charCodeAt(t.end-1-t.trimRight)]&r;)t.trimRight++}function Bd(t,e){if(!t||!Nn(t))return;const r=e?Pr:Ms;for(;X[t.input.charCodeAt(t.begin+t.trimLeft)]&r;)t.trimLeft++;t.input.charAt(t.begin+t.trimLeft)===`
111
+ `&&t.trimLeft++}class me{constructor(e,r=wt.operators,n){this.input=e,this.file=n,this.p=0,this.rawBeginAt=-1,this.N=e.length,this.opTrie=Vc(r)}readExpression(){return new md(this.readExpressionTokens())}*readExpressionTokens(){for(;this.p<this.N;){const e=this.readOperator();if(e){yield e;continue}const r=this.readValue();if(r){yield r;continue}return}}readOperator(){this.skipBlank();const e=Vd(this.input,this.p,this.opTrie);if(e!==-1)return new sd(this.input,this.p,this.p=e,this.file)}readFilters(){const e=[];for(;;){const r=this.readFilter();if(!r)return e;e.push(r)}}readFilter(){if(this.skipBlank(),this.end())return null;pe(this.peek()==="|",()=>`unexpected token at ${this.snapshot()}`),this.p++;const e=this.p,r=this.readIdentifier();if(!r.size())return null;const n=[];if(this.skipBlank(),this.peek()===":")do{++this.p;const i=this.readFilterArg();i&&n.push(i),this.skipBlank(),pe(this.end()||this.peek()===","||this.peek()==="|",()=>`unexpected character ${this.snapshot()}`)}while(this.peek()===",");return new ad(r.getText(),n,this.input,e,this.p,this.file)}readFilterArg(){const e=this.readValue();if(!e)return;if(this.skipBlank(),this.peek()!==":")return e;++this.p;const r=this.readValue();return[e.getText(),r]}readTopLevelTokens(e=wt){const r=[];for(;this.p<this.N;){const n=this.readTopLevelToken(e);r.push(n)}return Ud(r,e),r}readTopLevelToken(e){const{tagDelimiterLeft:r,outputDelimiterLeft:n}=e;return this.rawBeginAt>-1?this.readEndrawOrRawContent(e):this.match(r)?this.readTagToken(e):this.match(n)?this.readOutputToken(e):this.readHTMLToken([r,n])}readHTMLToken(e){const r=this.p;for(;this.p<this.N&&!e.some(n=>this.match(n));)++this.p;return new zs(this.input,r,this.p,this.file)}readTagToken(e=wt){const{file:r,input:n}=this,i=this.p;if(this.readToDelimiter(e.tagDelimiterRight)===-1)throw this.mkError(`tag ${this.snapshot(i)} not closed`,i);const s=new Qs(n,i,this.p,e,r);return s.name==="raw"&&(this.rawBeginAt=i),s}readToDelimiter(e){for(;this.p<this.N;){if(this.peekType()&Fs){this.readQuoted();continue}if(++this.p,this.rmatch(e))return this.p}return-1}readOutputToken(e=wt){const{file:r,input:n}=this,{outputDelimiterRight:i}=e,s=this.p;if(this.readToDelimiter(i)===-1)throw this.mkError(`output ${this.snapshot(s)} not closed`,s);return new td(n,s,this.p,e,r)}readEndrawOrRawContent(e){const{tagDelimiterLeft:r,tagDelimiterRight:n}=e,i=this.p;let s=this.readTo(r)-r.length;for(;this.p<this.N;){if(this.readIdentifier().getText()!=="endraw"){s=this.readTo(r)-r.length;continue}for(;this.p<=this.N;){if(this.rmatch(n)){const a=this.p;return i===s?(this.rawBeginAt=-1,new Qs(this.input,i,a,e,this.file)):(this.p=s,new zs(this.input,i,s,this.file))}if(this.rmatch(r))break;this.p++}}throw this.mkError(`raw ${this.snapshot(this.rawBeginAt)} not closed`,i)}readLiquidTagTokens(e=wt){const r=[];for(;this.p<this.N;){const n=this.readLiquidTagToken(e);n.name&&r.push(n)}return r}readLiquidTagToken(e){const{file:r,input:n}=this,i=this.p;let s=this.N;return this.readToDelimiter(`
112
+ `)!==-1&&(s=this.p),new cd(n,i,s,e,r)}mkError(e,r){return new On(e,new Mr(this.input,r,this.N,this.file))}snapshot(e=this.p){return JSON.stringify(kc(this.input.slice(e),16))}readWord(){return console.warn("Tokenizer#readWord() will be removed, use #readIdentifier instead"),this.readIdentifier()}readIdentifier(){this.skipBlank();const e=this.p;for(;this.peekType()&_n;)++this.p;return new Mr(this.input,e,this.p,this.file)}readTagName(){return this.skipBlank(),this.input[this.p]==="#"?this.input.slice(this.p,++this.p):this.readIdentifier().getText()}readHashes(e){const r=[];for(;;){const n=this.readHash(e);if(!n)return r;r.push(n)}}readHash(e){this.skipBlank(),this.peek()===","&&++this.p;const r=this.p,n=this.readIdentifier();if(!n.size())return;let i;this.skipBlank();const s=e?"=":":";return this.peek()===s&&(++this.p,i=this.readValue()),new od(this.input,r,this.p,n,i,this.file)}remaining(){return this.input.slice(this.p)}advance(e=1){this.p+=e}end(){return this.p>=this.N}readTo(e){for(;this.p<this.N;)if(++this.p,this.rmatch(e))return this.p;return-1}readValue(){const e=this.readQuoted()||this.readRange();if(e)return e;if(this.peek()==="["){this.p++;const s=this.readQuoted();return!s||this.peek()!=="]"?void 0:(this.p++,new Ks(s,[],this.p))}const r=this.readIdentifier();if(!r.size())return;let n=r.isNumber(!0);const i=[];for(;;)if(this.peek()==="["){n=!1,this.p++;const s=this.readValue()||new Mr(this.input,this.p,this.p,this.file);this.readTo("]"),i.push(s)}else if(this.peek()==="."&&this.peek(1)!=="."){this.p++;const s=this.readIdentifier();if(!s.size())break;s.isNumber()||(n=!1),i.push(s)}else break;return!i.length&&qs.hasOwnProperty(r.content)?new nd(this.input,r.begin,r.end,this.file):n?new rd(r,i[0]):new Ks(r,i,this.p)}readRange(){this.skipBlank();const e=this.p;if(this.peek()!=="(")return;++this.p;const r=this.readValueOrThrow();this.p+=2;const n=this.readValueOrThrow();return++this.p,new ud(this.input,e,this.p,r,n,this.file)}readValueOrThrow(){const e=this.readValue();return pe(e,()=>`unexpected token ${this.snapshot()}, value expected`),e}readQuoted(){this.skipBlank();const e=this.p;if(!(this.peekType()&Fs))return;++this.p;let r=!1;for(;this.p<this.N&&(++this.p,!(this.input[this.p-1]===this.input[e]&&!r));)r?r=!1:this.input[this.p-1]==="\\"&&(r=!0);return new ld(this.input,e,this.p,this.file)}*readFileNameTemplate(e){const{outputDelimiterLeft:r}=e,n=[","," ",r],i=new Set(n);for(;this.p<this.N&&!i.has(this.peek());)yield this.match(r)?this.readOutputToken(e):this.readHTMLToken(n)}match(e){for(let r=0;r<e.length;r++)if(e[r]!==this.input[this.p+r])return!1;return!0}rmatch(e){for(let r=0;r<e.length;r++)if(e[e.length-1-r]!==this.input[this.p-1-r])return!1;return!0}peekType(e=0){return X[this.input.charCodeAt(this.p+e)]}peek(e=0){return this.input[this.p+e]}skipBlank(){for(;this.peekType()&Pr;)++this.p}}class Hd{constructor(e,r){this.handlers={},this.stopRequested=!1,this.tokens=e,this.parseToken=r}on(e,r){return this.handlers[e]=r,this}trigger(e,r){const n=this.handlers[e];return n?(n.call(this,r),!0):!1}start(){this.trigger("start");let e;for(;!this.stopRequested&&(e=this.tokens.shift());){if(this.trigger("token",e)||Et(e)&&this.trigger(`tag:${e.name}`,e))continue;const r=this.parseToken(e,this.tokens);this.trigger("template",r)}return this.stopRequested||this.trigger("end"),this}stop(){return this.stopRequested=!0,this}}class Mn{constructor(e){this.token=e}}class se extends Mn{constructor(e,r,n){super(e),this.name=e.name,this.liquid=n}}class Lt{constructor(e,r){this.hash={};const n=new me(e,{});for(const i of n.readHashes(r))this.hash[i.name.content]=i.value}*render(e){const r={};for(const n of Object.keys(this.hash))r[n]=this.hash[n]===void 0?!0:yield ve(this.hash[n],e);return r}}function Qd(t){return class extends se{constructor(e,r,n){super(e,r,n),we(t.parse)&&t.parse.call(this,e,r)}*render(e,r){const n=yield new Lt(this.token.args).render(e);return yield t.render.call(this,e,r,n)}}}function zd(t){return Ee(t)}class Js{constructor(e,r,n,i){this.name=e,this.handler=we(r)?r:we(r==null?void 0:r.handler)?r.handler:Ls,this.raw=!we(r)&&!!(r!=null&&r.raw),this.args=n,this.liquid=i}*render(e,r){const n=[];for(const i of this.args)zd(i)?n.push([i[0],yield ve(i[1],r)]):n.push(yield ve(i,r));return this.handler.apply({context:r,liquid:this.liquid},[e,...n])}}class Ze{constructor(e,r){this.filters=[];const n=new me(e,r.options.operators);this.initial=n.readExpression(),this.filters=n.readFilters().map(({name:i,args:s})=>new Js(i,this.getFilter(r,i),s,r))}*value(e,r){r=r||e.opts.lenientIf&&this.filters.length>0&&this.filters[0].name==="default";let n=yield this.initial.evaluate(e,r);for(const i of this.filters)n=yield i.render(n,e);return n}getFilter(e,r){const n=e.filters[r];return pe(n||!e.options.strictFilters,()=>`undefined filter: ${r}`),n}}class Wd extends Mn{constructor(e,r){var n;super(e),this.value=new Ze(e.content,r);const i=this.value.filters,s=r.options.outputEscape;!(!((n=i[i.length-1])===null||n===void 0)&&n.raw)&&s&&i.push(new Js(toString.call(s),s,[],r))}*render(e,r){const n=yield this.value.value(e,!1);r.write(n)}}class Kd extends Mn{constructor(e){super(e),this.str=e.getContent()}*render(e,r){r.write(this.str)}}var Ct;(function(t){t.Partials="partials",t.Layouts="layouts",t.Root="root"})(Ct||(Ct={}));class Yd{constructor(e){if(this.options=e,e.relativeReference){const r=e.fs.sep;pe(r,"`fs.sep` is required for relative reference");const n=new RegExp(["."+r,".."+r,"./","../"].map(i=>xc(i)).join("|"));this.shouldLoadRelative=i=>n.test(i)}else this.shouldLoadRelative=r=>!1;this.contains=this.options.fs.contains||(()=>!0)}*lookup(e,r,n,i){const{fs:s}=this.options,a=this.options[r];for(const l of this.candidates(e,a,i,r!==Ct.Root))if(n?s.existsSync(l):yield s.exists(l))return l;throw this.lookupError(e,a)}*candidates(e,r,n,i){const{fs:s,extname:a}=this.options;if(this.shouldLoadRelative(e)&&n){const l=s.resolve(this.dirname(n),e,a);for(const o of r)if(!i||this.contains(o,l)){yield l;break}}for(const l of r){const o=s.resolve(l,e,a);(!i||this.contains(l,o))&&(yield o)}if(s.fallback!==void 0){const l=s.fallback(e);l!==void 0&&(yield l)}}dirname(e){const r=this.options.fs;return pe(r.dirname,"`fs.dirname` is required for relative reference"),r.dirname(e)}lookupError(e,r){const n=new Error("ENOENT");return n.message=`ENOENT: Failed to lookup "${e}" in "${r}"`,n.code="ENOENT",n}}class Gd{constructor(e){this.liquid=e,this.cache=this.liquid.options.cache,this.fs=this.liquid.options.fs,this.parseFile=this.cache?this._parseFileCached:this._parseFile,this.loader=new Yd(this.liquid.options)}parse(e,r){const i=new me(e,this.liquid.options.operators,r).readTopLevelTokens(this.liquid.options);return this.parseTokens(i)}parseTokens(e){let r;const n=[];for(;r=e.shift();)n.push(this.parseToken(r,e));return n}parseToken(e,r){try{if(Et(e)){const n=this.liquid.tags[e.name];return pe(n,`tag "${e.name}" not found`),new n(e,r,this.liquid)}return Xd(e)?new Wd(e,this.liquid):new Kd(e)}catch(n){throw new Dc(n,e)}}parseStream(e){return new Hd(e,(r,n)=>this.parseToken(r,n))}*_parseFileCached(e,r,n=Ct.Root,i){const s=this.cache,a=this.loader.shouldLoadRelative(e)?i+","+e:n+":"+e,l=yield s.read(a);if(l)return l;const o=this._parseFile(e,r,n,i),u=r?yield o:it(o);s.write(a,u);try{return yield u}catch(c){throw s.remove(a),c}}*_parseFile(e,r,n=Ct.Root,i){const s=yield this.loader.lookup(e,n,r,i);return this.liquid.parse(r?this.fs.readFileSync(s):yield this.fs.readFile(s),s)}}const Zd=/[\da-fA-F]/,Xs=/[0-7]/,ea={b:"\b",f:"\f",n:`
113
+ `,r:"\r",t:" ",v:"\v"};function ta(t){const e=t.charCodeAt(0);return e>=97?e-87:e>=65?e-55:e-48}function ra(t){let e="";for(let r=1;r<t.length-1;r++){if(t[r]!=="\\"){e+=t[r];continue}if(ea[t[r+1]]!==void 0)e+=ea[t[++r]];else if(t[r+1]==="u"){let n=0,i=r+2;for(;i<=r+5&&Zd.test(t[i]);)n=n*16+ta(t[i++]);r=i-1,e+=String.fromCharCode(n)}else if(!Xs.test(t[r+1]))e+=t[++r];else{let n=r+1,i=0;for(;n<=r+3&&Xs.test(t[n]);)i=i*8+ta(t[n++]);r=n-1,e+=String.fromCharCode(i)}}return e}var ee;(function(t){t[t.Number=1]="Number",t[t.Literal=2]="Literal",t[t.Tag=4]="Tag",t[t.Output=8]="Output",t[t.HTML=16]="HTML",t[t.Filter=32]="Filter",t[t.Hash=64]="Hash",t[t.PropertyAccess=128]="PropertyAccess",t[t.Word=256]="Word",t[t.Range=512]="Range",t[t.Quoted=1024]="Quoted",t[t.Operator=2048]="Operator",t[t.Delimited=12]="Delimited"})(ee||(ee={}));function Jd(t){return!!(Pe(t)&ee.Delimited)}function na(t){return Pe(t)===ee.Operator}function Nn(t){return Pe(t)===ee.HTML}function Xd(t){return Pe(t)===ee.Output}function Et(t){return Pe(t)===ee.Tag}function ia(t){return Pe(t)===ee.Quoted}function eh(t){return Pe(t)===ee.Literal}function th(t){return Pe(t)===ee.Number}function rh(t){return Pe(t)===ee.PropertyAccess}function nh(t){return Pe(t)===ee.Word}function ih(t){return Pe(t)===ee.Range}function Pe(t){return t?t.kind:-1}class Pt{constructor(e={},r=wt,n={}){var i,s;this.scopes=[{}],this.registers={},this.sync=!!n.sync,this.opts=r,this.globals=(i=n.globals)!==null&&i!==void 0?i:r.globals,this.environments=e,this.strictVariables=(s=n.strictVariables)!==null&&s!==void 0?s:this.opts.strictVariables}getRegister(e){return this.registers[e]=this.registers[e]||{}}setRegister(e,r){return this.registers[e]=r}saveRegister(...e){return e.map(r=>[r,this.getRegister(r)])}restoreRegister(e){return e.forEach(([r,n])=>this.setRegister(r,n))}getAll(){return[this.globals,this.environments,...this.scopes].reduce((e,r)=>Fr(e,r),{})}get(e){return st(this._get(e))}*_get(e){const r=this.findScope(e[0]);return yield this._getFromScope(r,e)}getFromScope(e,r){return st(this._getFromScope(e,r))}*_getFromScope(e,r){We(r)&&(r=r.split("."));for(let n=0;n<r.length;n++)if(e=yield sh(e,r[n],this.opts.ownPropertyOnly),Ke(e)&&this.strictVariables)throw new Pc(r.slice(0,n+1).join("."));return e}push(e){return this.scopes.push(e)}pop(){return this.scopes.pop()}bottom(){return this.scopes[0]}findScope(e){for(let r=this.scopes.length-1;r>=0;r--){const n=this.scopes[r];if(e in n)return n}return e in this.environments?this.environments:this.globals}}function sh(t,e,r){if(t=_s(t),Ke(t))return t;if(Ee(t)&&e<0)return t[t.length+ +e];const n=ah(t,e,r);return n===void 0&&t instanceof vt?t.liquidMethodMissing(e):we(n)?n.call(t):e==="size"?uh(t):e==="first"?oh(t):e==="last"?lh(t):n}function ah(t,e,r){if(!(r&&!Object.hasOwnProperty.call(t,e)&&!(t instanceof vt)))return t[e]}function oh(t){return Ee(t)?t[0]:t.first}function lh(t){return Ee(t)?t[t.length-1]:t.last}function uh(t){if(t.hasOwnProperty("size")||t.size!==void 0)return t.size;if(Ee(t)||We(t))return t.length;if(typeof t=="object")return Object.keys(t).length}var St;(function(t){t[t.OUTPUT=0]="OUTPUT",t[t.STORE=1]="STORE"})(St||(St={}));const ch=Re(Math.abs),dh=Re(Math.max),hh=Re(Math.min),fh=Re(Math.ceil),ph=Re((t,e,r=!1)=>r?Math.floor(t/e):t/e),mh=Re(Math.floor),gh=Re((t,e)=>t-e),yh=Re((t,e)=>t%e),vh=Re((t,e)=>t*e);function bh(t,e=0){t=B(t),e=B(e);const r=Math.pow(10,e);return Math.round(t*r)/r}function wh(t,e){return t=B(t),e=B(e),Number(t)+Number(e)}var Ch=Object.freeze({__proto__:null,abs:ch,at_least:dh,at_most:hh,ceil:fh,divided_by:ph,floor:mh,minus:gh,modulo:yh,times:vh,round:bh,plus:wh}),Eh=Object.freeze({__proto__:null,url_decode:t=>$(t).split("+").map(decodeURIComponent).join(" "),url_encode:t=>$(t).split(" ").map(encodeURIComponent).join("+")});const Sh=Re((t,e)=>Ge(t).join(e===void 0?" ":e)),Rh=Re(t=>Ee(t)?Sn(t):""),xh=Re(t=>Ee(t)?t[0]:""),Oh=Re(t=>[...Ge(t)].reverse());function*_h(t,e){const r=[];for(const n of Ge(B(t)))r.push([n,e?yield this.context._getFromScope(n,$(e).split(".")):n]);return r.sort((n,i)=>{const s=n[1],a=i[1];return s<a?-1:s>a?1:0}).map(n=>n[0])}function Th(t,e){t=B(t);const r=$(e),n=e===void 0?Ps:(i,s)=>Ps(i[r],s[r]);return[...Ge(t)].sort(n)}const kh=t=>t&&t.length||0;function*Dh(t,e){const r=[];for(const n of Ge(B(t)))r.push(yield this.context._getFromScope(n,$(e).split(".")));return r}function Lh(t){return t=B(t),Ge(t).filter(e=>!Ke(B(e)))}function Ph(t,e=[]){return t=B(t),e=Ge(e).map(r=>B(r)),Ge(t).concat(e)}function jh(t,e,r=1){return t=B(t),Ke(t)?[]:(Ee(t)||(t=$(t)),e=e<0?t.length+e:e,t.slice(e,e+r))}function*Fh(t,e,r){const n=[];t=Ge(B(t));for(const i of t)n.push(yield this.context._getFromScope(i,$(e).split(".")));return t.filter((i,s)=>r===void 0?bt(n[s],this.context):xe(r)?r.equals(n[s]):n[s]===r)}function Mh(t){t=B(t);const e={};return(t||[]).filter(r=>Os.call(e,String(r))?!1:(e[String(r)]=!0,!0))}var Nh=Object.freeze({__proto__:null,join:Sh,last:Rh,first:xh,reverse:Oh,sort:_h,sort_natural:Th,size:kh,map:Dh,compact:Lh,concat:Ph,slice:jh,where:Fh,uniq:Mh});const Ah="%A, %B %-e, %Y at %-l:%M %P %z";function qh(t,e,r){const n=this.context.opts;let i;return t=B(t),e=B(e),Ke(e)?e=Ah:e=$(e),t==="now"||t==="today"?i=new Date:kr(t)?i=new Date(t*1e3):We(t)?/^\d+$/.test(t)?i=new Date(+t*1e3):n.preserveTimezones?i=at.createDateFixedToTimezone(t):i=new Date(t):i=t,Ih(i)?(r!==void 0?i=new at(i,sa(i,r)):n.timezoneOffset!==void 0&&(i=new at(i,sa(i,n.timezoneOffset))),Gc(i,e)):t}function Ih(t){return(t instanceof Date||t instanceof at)&&!isNaN(t.getTime())}function sa(t,e){if(kr(e))return e;const r=new Date(t.toLocaleString("en-US",{timeZone:"UTC"})),n=new Date(t.toLocaleString("en-US",{timeZone:e}));return(r.getTime()-n.getTime())/6e4}var Vh=Object.freeze({__proto__:null,date:qh});function Uh(t,e){return pe(arguments.length===2,"append expect 2 arguments"),$(t)+$(e)}function $h(t,e){return pe(arguments.length===2,"prepend expect 2 arguments"),$(e)+$(t)}function Bh(t,e){return e?(e=xn($(e)),$(t).replace(new RegExp(`^[${e}]+`,"g"),"")):$(t).replace(/^\s+/,"")}function Hh(t){return $(t).toLowerCase()}function Qh(t){return $(t).toUpperCase()}function zh(t,e){return $(t).split(String(e)).join("")}function Wh(t,e){return $(t).replace(String(e),"")}function Kh(t,e){const r=$(t),n=String(e),i=r.lastIndexOf(n);return i===-1?r:r.substring(0,i)+r.substring(i+n.length+1)}function Yh(t,e){return e?(e=xn($(e)),$(t).replace(new RegExp(`[${e}]+$`,"g"),"")):$(t).replace(/\s+$/,"")}function Gh(t,e){const r=$(t).split(String(e));for(;r.length&&r[r.length-1]==="";)r.pop();return r}function Zh(t,e){return e?(e=xn($(e)),$(t).replace(new RegExp(`^[${e}]+`,"g"),"").replace(new RegExp(`[${e}]+$`,"g"),"")):$(t).trim()}function Jh(t){return $(t).replace(/\n/g,"")}function Xh(t){return t=$(t),t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function ef(t,e,r){return $(t).split(String(e)).join(r)}function tf(t,e,r){return $(t).replace(String(e),r)}function rf(t,e,r){const n=$(t),i=String(e),s=n.lastIndexOf(i);if(s===-1)return n;const a=String(r);return n.substring(0,s)+a+n.substring(s+i.length)}function nf(t,e=50,r="..."){return t=$(t),t.length<=e?t:t.substring(0,e-r.length)+r}function sf(t,e=15,r="..."){const n=$(t).split(/\s+/);e<=0&&(e=1);let i=n.slice(0,e).join(" ");return n.length>=e&&(i+=r),i}var af=Object.freeze({__proto__:null,append:Uh,prepend:$h,lstrip:Bh,downcase:Hh,upcase:Qh,remove:zh,remove_first:Wh,remove_last:Kh,rstrip:Yh,split:Gh,strip:Zh,strip_newlines:Jh,capitalize:Xh,replace:ef,replace_first:tf,replace_last:rf,truncate:nf,truncatewords:sf});const of=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ad),Ch),Eh),Nh),Vh),af),{json:Zs,raw:Dd,default:kd});class lf extends se{constructor(e,r,n){super(e,r,n);const i=new me(e.args,n.options.operators);this.key=i.readIdentifier().content,i.skipBlank(),pe(i.peek()==="=",()=>`illegal token ${e.getText()}`),i.advance(),this.value=new Ze(i.remaining(),this.liquid)}*render(e){e.bottom()[this.key]=yield this.value.value(e,this.liquid.options.lenientIf)}}const aa=["offset","limit","reversed"];class uf extends se{constructor(e,r,n){super(e,r,n);const i=new me(e.args,this.liquid.options.operators),s=i.readIdentifier(),a=i.readIdentifier(),l=i.readValue();if(!s.size()||a.content!=="in"||!l)throw new Error(`illegal tag: ${e.getText()}`);this.variable=s.content,this.collection=l,this.hash=new Lt(i.remaining()),this.templates=[],this.elseTemplates=[];let o;const u=this.liquid.parser.parseStream(r).on("start",()=>o=this.templates).on("tag:else",()=>o=this.elseTemplates).on("tag:endfor",()=>u.stop()).on("template",c=>o.push(c)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});u.start()}*render(e,r){const n=this.liquid.renderer;let i=kn(yield ve(this.collection,e));if(!i.length){yield n.renderTemplates(this.elseTemplates,e,r);return}const s="continue-"+this.variable+"-"+this.collection.getText();e.push({continue:e.getRegister(s)});const a=yield this.hash.render(e);e.pop(),i=(this.liquid.options.orderedFilterParameters?Object.keys(a).filter(u=>aa.includes(u)):aa.filter(u=>a[u]!==void 0)).reduce((u,c)=>c==="offset"?df(u,a.offset):c==="limit"?hf(u,a.limit):cf(u),i),e.setRegister(s,(a.offset||0)+i.length);const o={forloop:new Tn(i.length,this.collection.getText(),this.variable)};e.push(o);for(const u of i){if(o[this.variable]=u,yield n.renderTemplates(this.templates,e,r),r.break){r.break=!1;break}r.continue=!1,o.forloop.next()}e.pop()}}function cf(t){return[...t].reverse()}function df(t,e){return t.slice(e)}function hf(t,e){return t.slice(0,e)}class ff extends se{constructor(e,r,n){super(e,r,n),this.templates=[];const i=new me(e.args,this.liquid.options.operators);for(this.variable=pf(i),pe(this.variable,()=>`${e.args} not valid identifier`);r.length;){const s=r.shift();if(Et(s)&&s.name==="endcapture")return;this.templates.push(n.parser.parseToken(s,r))}throw new Error(`tag ${e.getText()} not closed`)}*render(e){const n=yield this.liquid.renderer.renderTemplates(this.templates,e);e.bottom()[this.variable]=n}}function pf(t){const e=t.readIdentifier().content;if(e)return e;const r=t.readQuoted();if(r)return Pn(r)}class mf extends se{constructor(e,r,n){super(e,r,n),this.branches=[],this.elseTemplates=[],this.value=new Ze(e.args,this.liquid),this.elseTemplates=[];let i=[];const s=this.liquid.parser.parseStream(r).on("tag:when",a=>{i=[];const l=new me(a.args,this.liquid.options.operators),o=[];for(;!l.end();)o.push(l.readValueOrThrow()),l.readTo(",");this.branches.push({values:o,templates:i})}).on("tag:else",()=>i=this.elseTemplates).on("tag:endcase",()=>s.stop()).on("template",a=>i.push(a)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});s.start()}*render(e,r){const n=this.liquid.renderer,i=B(yield this.value.value(e,e.opts.lenientIf));let s=!1;for(const a of this.branches)for(const l of a.values){const o=yield ve(l,e,e.opts.lenientIf);if(i===o){yield n.renderTemplates(a.templates,e,r),s=!0;break}}s||(yield n.renderTemplates(this.elseTemplates,e,r))}}class gf extends se{constructor(e,r,n){for(super(e,r,n);r.length;){const i=r.shift();if(Et(i)&&i.name==="endcomment")return}throw new Error(`tag ${e.getText()} not closed`)}render(){}}class yf extends se{constructor(e,r,n){super(e,r,n);const i=e.args,s=new me(i,this.liquid.options.operators);for(this.file=An(s,this.liquid),this.currentFile=e.file;!s.end();){s.skipBlank();const a=s.p,l=s.readIdentifier();if((l.content==="with"||l.content==="for")&&(s.skipBlank(),s.peek()!==":")){const o=s.readValue();if(o){const u=s.p,c=s.readIdentifier();let f;c.content==="as"?f=s.readIdentifier():s.p=u,this[l.content]={value:o,alias:f&&f.content},s.skipBlank(),s.peek()===","&&s.advance();continue}}s.p=a;break}this.hash=new Lt(s.remaining())}*render(e,r){const{liquid:n,hash:i}=this,s=yield qn(this.file,e,n);pe(s,()=>`illegal filename "${s}"`);const a=new Pt({},e.opts,{sync:e.sync,globals:e.globals,strictVariables:e.strictVariables}),l=a.bottom();if(Fr(l,yield i.render(e)),this.with){const{value:o,alias:u}=this.with;l[u||s]=yield ve(o,e)}if(this.for){const{value:o,alias:u}=this.for,c=kn(yield ve(o,e));l.forloop=new Tn(c.length,o.getText(),u);for(const f of c){l[u]=f;const d=yield n._parsePartialFile(s,a.sync,this.currentFile);yield n.renderer.renderTemplates(d,a,r),l.forloop.next()}}else{const o=yield n._parsePartialFile(s,a.sync,this.currentFile);yield n.renderer.renderTemplates(o,a,r)}}}function An(t,e){if(e.options.dynamicPartials){const i=t.readValue();if(i===void 0)throw new TypeError(`illegal argument "${t.input}"`);if(i.getText()==="none")return;if(ia(i)){const s=e.parse(Pn(i));return oa(s)}return i}const r=[...t.readFileNameTemplate(e.options)],n=oa(e.parser.parseTokens(r));return n==="none"?void 0:n}function oa(t){return t.length===1&&Nn(t[0].token)?t[0].token.getContent():t}function*qn(t,e,r){return typeof t=="string"?t:Array.isArray(t)?r.renderer.renderTemplates(t,e):yield ve(t,e)}class vf extends se{constructor(e,r,n){super(e,r,n);const i=e.args,s=new me(i,this.liquid.options.operators);this.file=An(s,this.liquid),this.currentFile=e.file;const a=s.p;s.readIdentifier().content==="with"?(s.skipBlank(),s.peek()!==":"?this.withVar=s.readValue():s.p=a):s.p=a,this.hash=new Lt(s.remaining(),this.liquid.options.jekyllInclude)}*render(e,r){const{liquid:n,hash:i,withVar:s}=this,{renderer:a}=n,l=yield qn(this.file,e,n);pe(l,()=>`illegal filename "${l}"`);const o=e.saveRegister("blocks","blockMode");e.setRegister("blocks",{}),e.setRegister("blockMode",St.OUTPUT);const u=yield i.render(e);s&&(u[l]=yield ve(s,e));const c=yield n._parsePartialFile(l,e.sync,this.currentFile);e.push(e.opts.jekyllInclude?{include:u}:u),yield a.renderTemplates(c,e,r),e.pop(),e.restoreRegister(o)}}class bf extends se{constructor(e,r,n){super(e,r,n);const i=new me(e.args,this.liquid.options.operators);this.variable=i.readIdentifier().content}render(e,r){const n=e.environments;kr(n[this.variable])||(n[this.variable]=0),r.write($(--n[this.variable]))}}class wf extends se{constructor(e,r,n){super(e,r,n),this.candidates=[];const i=new me(e.args,this.liquid.options.operators),s=i.readValue();for(i.skipBlank(),s&&(i.peek()===":"?(this.group=s,i.advance()):this.candidates.push(s));!i.end();){const a=i.readValue();a&&this.candidates.push(a),i.readTo(",")}pe(this.candidates.length,()=>`empty candidates: ${e.getText()}`)}*render(e,r){const i=`cycle:${yield ve(this.group,e)}:`+this.candidates.join(","),s=e.getRegister("cycle");let a=s[i];a===void 0&&(a=s[i]=0);const l=this.candidates[a];return a=(a+1)%this.candidates.length,s[i]=a,yield ve(l,e)}}class Cf extends se{constructor(e,r,n){super(e,r,n),this.branches=[],this.elseTemplates=[];let i;n.parser.parseStream(r).on("start",()=>this.branches.push({value:new Ze(e.args,this.liquid),templates:i=[]})).on("tag:elsif",s=>this.branches.push({value:new Ze(s.args,this.liquid),templates:i=[]})).on("tag:else",()=>i=this.elseTemplates).on("tag:endif",function(){this.stop()}).on("template",s=>i.push(s)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,r){const n=this.liquid.renderer;for(const{value:i,templates:s}of this.branches){const a=yield i.value(e,e.opts.lenientIf);if(bt(a,e)){yield n.renderTemplates(s,e,r);return}}yield n.renderTemplates(this.elseTemplates,e,r)}}class Ef extends se{constructor(e,r,n){super(e,r,n);const i=new me(e.args,this.liquid.options.operators);this.variable=i.readIdentifier().content}render(e,r){const n=e.environments;kr(n[this.variable])||(n[this.variable]=0);const i=n[this.variable];n[this.variable]++,r.write($(i))}}class Sf extends se{constructor(e,r,n){super(e,r,n);const i=new me(e.args,this.liquid.options.operators);this.file=An(i,this.liquid),this.currentFile=e.file,this.args=new Lt(i.remaining()),this.templates=this.liquid.parser.parseTokens(r)}*render(e,r){const{liquid:n,args:i,file:s}=this,{renderer:a}=n;if(s===void 0){e.setRegister("blockMode",St.OUTPUT),yield a.renderTemplates(this.templates,e,r);return}const l=yield qn(this.file,e,n);pe(l,()=>`illegal filename "${l}"`);const o=yield n._parseLayoutFile(l,e.sync,this.currentFile);e.setRegister("blockMode",St.STORE);const u=yield a.renderTemplates(this.templates,e),c=e.getRegister("blocks");c[""]===void 0&&(c[""]=(f,d)=>d.write(u)),e.setRegister("blockMode",St.OUTPUT),e.push(yield i.render(e)),yield a.renderTemplates(o,e,r),e.pop()}}class Rf extends se{constructor(e,r,n){super(e,r,n),this.templates=[];const i=/\w+/.exec(e.args);for(this.block=i?i[0]:"";r.length;){const s=r.shift();if(Et(s)&&s.name==="endblock")return;const a=n.parser.parseToken(s,r);this.templates.push(a)}throw new Error(`tag ${e.getText()} not closed`)}*render(e,r){const n=this.getBlockRender(e);e.getRegister("blockMode")===St.STORE?e.getRegister("blocks")[this.block]=n:yield n(new Ns,r)}getBlockRender(e){const{liquid:r,templates:n}=this,i=e.getRegister("blocks")[this.block],s=function*(a,l){e.push({block:a}),yield r.renderer.renderTemplates(n,e,l),e.pop()};return i?(a,l)=>i(new Ns(()=>s(a,l)),l):s}}class xf extends se{constructor(e,r,n){for(super(e,r,n),this.tokens=[];r.length;){const i=r.shift();if(Et(i)&&i.name==="endraw")return;this.tokens.push(i)}throw new Error(`tag ${e.getText()} not closed`)}render(){return this.tokens.map(e=>e.getText()).join("")}}class Of extends Tn{constructor(e,r,n,i){super(e,n,i),this.length=e,this.cols=r}row(){return Math.floor(this.i/this.cols)+1}col0(){return this.i%this.cols}col(){return this.col0()+1}col_first(){return this.col0()===0}col_last(){return this.col()===this.cols}}class _f extends se{constructor(e,r,n){super(e,r,n);const i=new me(e.args,this.liquid.options.operators),s=i.readIdentifier();i.skipBlank();const a=i.readIdentifier(),l=i.readValue();if(a.content!=="in"||!l)throw new Error(`illegal tag: ${e.getText()}`);this.variable=s.content,this.collection=l,this.args=new Lt(i.remaining()),this.templates=[];let o;const u=this.liquid.parser.parseStream(r).on("start",()=>o=this.templates).on("tag:endtablerow",()=>u.stop()).on("template",c=>o.push(c)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});u.start()}*render(e,r){let n=kn(yield ve(this.collection,e));const i=yield this.args.render(e),s=i.offset||0,a=i.limit===void 0?n.length:i.limit;n=n.slice(s,s+a);const l=i.cols||n.length,o=this.liquid.renderer,u=new Of(n.length,l,this.collection.getText(),this.variable),c={tablerowloop:u};e.push(c);for(let f=0;f<n.length;f++,u.next())c[this.variable]=n[f],u.col0()===0&&(u.row()!==1&&r.write("</tr>"),r.write(`<tr class="row${u.row()}">`)),r.write(`<td class="col${u.col()}">`),yield o.renderTemplates(this.templates,e,r),r.write("</td>");n.length&&r.write("</tr>"),e.pop()}}class Tf extends se{constructor(e,r,n){super(e,r,n),this.branches=[],this.elseTemplates=[];let i;this.liquid.parser.parseStream(r).on("start",()=>this.branches.push({value:new Ze(e.args,this.liquid),test:Nr,templates:i=[]})).on("tag:elsif",s=>this.branches.push({value:new Ze(s.args,this.liquid),test:bt,templates:i=[]})).on("tag:else",()=>i=this.elseTemplates).on("tag:endunless",function(){this.stop()}).on("template",s=>i.push(s)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,r){const n=this.liquid.renderer;for(const{value:i,test:s,templates:a}of this.branches){const l=yield i.value(e,e.opts.lenientIf);if(s(l,e)){yield n.renderTemplates(a,e,r);return}}yield n.renderTemplates(this.elseTemplates,e,r)}}class kf extends se{render(e,r){r.break=!0}}class Df extends se{render(e,r){r.continue=!0}}class Lf extends se{constructor(e,r,n){super(e,r,n),this.value=new Ze(e.args,this.liquid)}*render(e,r){const n=yield this.value.value(e,!1);r.write(n)}}class Pf extends se{constructor(e,r,n){super(e,r,n);const s=new me(e.args,this.liquid.options.operators).readLiquidTagTokens(this.liquid.options);this.templates=this.liquid.parser.parseTokens(s)}*render(e,r){yield this.liquid.renderer.renderTemplates(this.templates,e,r)}}class jf extends se{constructor(e,r,n){if(super(e,r,n),e.args.search(/\n\s*[^#\s]/g)!==-1)throw new Error("every line of an inline comment must start with a '#' character")}render(){}}const Ff={assign:lf,for:uf,capture:ff,case:mf,comment:gf,include:vf,render:yf,decrement:bf,increment:Ef,cycle:wf,if:Cf,layout:Sf,block:Rf,raw:xf,tablerow:_f,unless:Tf,break:kf,continue:Df,echo:Lf,liquid:Pf,"#":jf};class In{constructor(e={}){this.renderer=new pd,this.filters={},this.tags={},this.options=qd(e),this.parser=new Gd(this),Ts(Ff,(r,n)=>this.registerTag(n,r)),Ts(of,(r,n)=>this.registerFilter(n,r))}parse(e,r){return this.parser.parse(e,r)}_render(e,r,n){const i=r instanceof Pt?r:new Pt(r,this.options,n);return this.renderer.renderTemplates(e,i)}render(e,r,n){return Ye(this,void 0,void 0,function*(){return it(this._render(e,r,Object.assign(Object.assign({},n),{sync:!1})))})}renderSync(e,r,n){return st(this._render(e,r,Object.assign(Object.assign({},n),{sync:!0})))}renderToNodeStream(e,r,n={}){const i=new Pt(r,this.options,n);return this.renderer.renderTemplatesToNodeStream(e,i)}_parseAndRender(e,r,n){const i=this.parse(e);return this._render(i,r,n)}parseAndRender(e,r,n){return Ye(this,void 0,void 0,function*(){return it(this._parseAndRender(e,r,Object.assign(Object.assign({},n),{sync:!1})))})}parseAndRenderSync(e,r,n){return st(this._parseAndRender(e,r,Object.assign(Object.assign({},n),{sync:!0})))}_parsePartialFile(e,r,n){return this.parser.parseFile(e,r,Ct.Partials,n)}_parseLayoutFile(e,r,n){return this.parser.parseFile(e,r,Ct.Layouts,n)}_parseFile(e,r,n,i){return this.parser.parseFile(e,r,n,i)}parseFile(e,r){return Ye(this,void 0,void 0,function*(){return it(this.parser.parseFile(e,!1,r))})}parseFileSync(e,r){return st(this.parser.parseFile(e,!0,r))}*_renderFile(e,r,n){const i=yield this._parseFile(e,n.sync,n.lookupType);return yield this._render(i,r,n)}renderFile(e,r,n){return Ye(this,void 0,void 0,function*(){return it(this._renderFile(e,r,Object.assign(Object.assign({},n),{sync:!1})))})}renderFileSync(e,r,n){return st(this._renderFile(e,r,Object.assign(Object.assign({},n),{sync:!0})))}renderFileToNodeStream(e,r,n){return Ye(this,void 0,void 0,function*(){const i=yield this.parseFile(e);return this.renderToNodeStream(i,r,n)})}_evalValue(e,r){const n=new Ze(e,this),i=r instanceof Pt?r:new Pt(r,this.options);return n.value(i)}evalValue(e,r){return Ye(this,void 0,void 0,function*(){return it(this._evalValue(e,r))})}evalValueSync(e,r){return st(this._evalValue(e,r))}registerFilter(e,r){this.filters[e]=r}registerTag(e,r){this.tags[e]=we(r)?r:Qd(r)}plugin(e){return e.call(this,In)}express(){const e=this;let r=!0;return function(n,i,s){if(r){r=!1;const a=Ar(this.root);e.options.root.unshift(...a),e.options.layouts.unshift(...a),e.options.partials.unshift(...a)}e.renderFile(n,i).then(a=>s(null,a),s)}}}const jt=new In;function Mf(t,e){return A.useMemo(()=>Nf(t,e),[t,e])}function Nf(t,e){return t.map(r=>{const n=e||r.transform;return n?Object.keys(n).reduce((i,s)=>s==="details"?(i[s]=n[s].map(a=>Array.isArray(a)?a.map(l=>({label:l.label,value:jt.parseAndRenderSync(l.value,r),html:l.html})):{label:a.label,value:jt.parseAndRenderSync(a.value,r),html:a.html}),i):s==="actions"?(i[s]=n[s].map(a=>Object.keys(a).reduce((l,o)=>(typeof a[o]=="object"?l[o]=Object.keys(a[o]).reduce((u,c)=>(u[c]=jt.parseAndRenderSync(a[o][c],r),u),{}):l[o]=jt.parseAndRenderSync(a[o],r),l),{})),i):(i[s]=jt.parseAndRenderSync(n[s],r),i),{}):r})}function la({path:t,placeholderText:e,dynamicOptions:r}){var M;let{asyncUrl:n,transform:i,clientSideFilter:s,rootData:a,includeHeaders:l}=r,o=Po();const u=Se(),{activeIndex:c,search:f,setActions:d,navigateTo:m}=A.useContext(rt),v=xu(f,500),w=l&&u.headers?u.headers:{},{isLoading:S,error:O,data:k=[]}=Ru({queryKey:[t,s?"":v],enabled:!!n,queryFn:()=>fetch(jt.parseAndRenderSync(n,o),{headers:w}).then(j=>j.json())}),C=a?Ec(k,a,[]):k,E=A.useMemo(()=>Array.isArray(C)?C:[C],[C]);let N=Mf(E,i);s&&(N=N.filter(j=>j.title.toLowerCase().includes(f.toLowerCase())));const _=N[c];return A.useEffect(()=>{_&&_.actions?d(_.actions):d([])},[_,f,c,d]),S?y.jsx(er,{children:y.jsx("div",{className:"qikbar-item-empty",children:"loading..."})}):N.length===0?y.jsxs(er,{children:[y.jsx(wr,{placeholder:e}),y.jsx("div",{className:"qikbar-item-empty",children:"No matches"})]}):y.jsxs(y.Fragment,{children:[y.jsx(wr,{placeholder:e}),y.jsxs(er,{children:[y.jsx(Ui,{children:N.map(j=>y.jsx(cn,{item:j},j.id))}),_&&((M=_==null?void 0:_.details)==null?void 0:M.length)>0&&y.jsx(Hi,{fields:_.details})]})]})}class Af extends A.Component{constructor(){super(...arguments);pa(this,"state",{hasError:!1})}static getDerivedStateFromError(r){return{hasError:!0}}componentDidCatch(r,n){}render(){return this.state.hasError?y.jsx("div",{className:"qikbar-command-wrapper",children:"Something went wrong."}):this.props.children}}function ua(){let t=Li();return y.jsx("div",{className:"qikbar-command-wrapper",children:y.jsxs("div",{className:"qikbar-command-bar",children:[y.jsx("div",{className:"qikbar-command-content",children:y.jsxs("div",{className:"qikbar-command-error",children:["It looks like there maybe a problem. If you continue to see this please contact @"," ",y.jsx("a",{href:`mailto:support@qikbar.com?subject=Issues with running qikbar on my site.&body=The current error is: ${t}`,children:"support@qikbar.com"})]})}),y.jsx("div",{className:"qikbar-command-footer",children:y.jsx("div",{className:"qikbar-logo",children:y.jsx("a",{href:"https://www.qikbar.com",target:"_blank",rel:"noopener noreferrer",children:y.jsxs("svg",{width:"89",height:"30",viewBox:"0 0 89 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[y.jsx("path",{d:"M36.9964 16.0795H39.1271L40.0327 17.2354L41.2205 18.5991L43.0476 20.8523H40.6612L39.3828 19.3235L38.6264 18.2369L36.9964 16.0795ZM43.1222 14.5455C43.1222 15.7457 42.8913 16.7631 42.4297 17.5977C41.968 18.4322 41.343 19.0661 40.5547 19.4993C39.7699 19.9325 38.8892 20.1491 37.9126 20.1491C36.9325 20.1491 36.0501 19.9308 35.2653 19.494C34.4805 19.0572 33.8572 18.4233 33.3956 17.5923C32.9375 16.7578 32.7085 15.7422 32.7085 14.5455C32.7085 13.3452 32.9375 12.3278 33.3956 11.4933C33.8572 10.6587 34.4805 10.0249 35.2653 9.59162C36.0501 9.15838 36.9325 8.94176 37.9126 8.94176C38.8892 8.94176 39.7699 9.15838 40.5547 9.59162C41.343 10.0249 41.968 10.6587 42.4297 11.4933C42.8913 12.3278 43.1222 13.3452 43.1222 14.5455ZM40.4268 14.5455C40.4268 13.8352 40.3256 13.2351 40.1232 12.745C39.9244 12.255 39.6367 11.8839 39.2603 11.6317C38.8874 11.3796 38.4382 11.2536 37.9126 11.2536C37.3906 11.2536 36.9414 11.3796 36.565 11.6317C36.1886 11.8839 35.8991 12.255 35.6967 12.745C35.4979 13.2351 35.3984 13.8352 35.3984 14.5455C35.3984 15.2557 35.4979 15.8558 35.6967 16.3459C35.8991 16.8359 36.1886 17.207 36.565 17.4592C36.9414 17.7113 37.3906 17.8374 37.9126 17.8374C38.4382 17.8374 38.8874 17.7113 39.2603 17.4592C39.6367 17.207 39.9244 16.8359 40.1232 16.3459C40.3256 15.8558 40.4268 15.2557 40.4268 14.5455ZM44.6762 20V11.8182H47.281V20H44.6762ZM45.9813 10.8647C45.6155 10.8647 45.3012 10.744 45.0384 10.5025C44.7757 10.2575 44.6443 9.96271 44.6443 9.61825C44.6443 9.27734 44.7757 8.98615 45.0384 8.74467C45.3012 8.49964 45.6155 8.37713 45.9813 8.37713C46.3506 8.37713 46.6649 8.49964 46.9241 8.74467C47.1869 8.98615 47.3183 9.27734 47.3183 9.61825C47.3183 9.96271 47.1869 10.2575 46.9241 10.5025C46.6649 10.744 46.3506 10.8647 45.9813 10.8647ZM51.288 17.8533L51.2987 14.7479H51.6609L53.962 11.8182H56.913L53.4933 16.0156H52.8061L51.288 17.8533ZM48.9389 20V9.09091H51.5437V20H48.9389ZM54.0206 20L51.8793 16.6016L53.5945 14.7532L57.0302 20H54.0206Z",className:"qikbar-logo-secondary"}),y.jsx("path",{d:"M57.8452 20V9.09091H60.4499V13.2191H60.5032C60.6097 12.9705 60.7607 12.7308 60.956 12.5C61.1548 12.2692 61.407 12.081 61.7124 11.9354C62.0213 11.7862 62.3906 11.7116 62.8203 11.7116C63.3885 11.7116 63.9194 11.8608 64.413 12.1591C64.9102 12.4574 65.3114 12.9173 65.6168 13.5387C65.9222 14.1602 66.0749 14.9521 66.0749 15.9144C66.0749 16.8413 65.9276 17.6172 65.6328 18.2422C65.3416 18.8672 64.9474 19.3359 64.4503 19.6484C63.9567 19.9609 63.408 20.1172 62.8043 20.1172C62.3924 20.1172 62.0355 20.0497 61.7337 19.9148C61.4318 19.7798 61.1779 19.6023 60.9719 19.3821C60.7695 19.1619 60.6133 18.9258 60.5032 18.6737H60.4233V20H57.8452ZM60.3967 15.9091C60.3967 16.3494 60.4553 16.733 60.5724 17.0597C60.6932 17.3864 60.8654 17.6403 61.0891 17.8214C61.3164 17.9989 61.5881 18.0877 61.9041 18.0877C62.2237 18.0877 62.4954 17.9989 62.7191 17.8214C62.9428 17.6403 63.1115 17.3864 63.2251 17.0597C63.3423 16.733 63.4009 16.3494 63.4009 15.9091C63.4009 15.4687 63.3423 15.087 63.2251 14.7638C63.1115 14.4407 62.9428 14.1903 62.7191 14.0128C62.4989 13.8352 62.2273 13.7464 61.9041 13.7464C61.5845 13.7464 61.3129 13.8335 61.0891 14.0075C60.8654 14.1815 60.6932 14.43 60.5724 14.7532C60.4553 15.0763 60.3967 15.4616 60.3967 15.9091ZM69.7464 20.1385C69.2243 20.1385 68.7609 20.0515 68.3561 19.8775C67.9548 19.6999 67.637 19.4336 67.4026 19.0785C67.1718 18.7198 67.0564 18.2706 67.0564 17.7308C67.0564 17.2763 67.1363 16.8928 67.2961 16.5803C67.4559 16.2678 67.676 16.0138 67.9566 15.8185C68.2371 15.6232 68.5603 15.4759 68.926 15.3764C69.2918 15.2734 69.6824 15.2042 70.0979 15.1687C70.5631 15.1261 70.9378 15.0817 71.2219 15.0355C71.5059 14.9858 71.7119 14.9165 71.8398 14.8278C71.9711 14.7354 72.0368 14.6058 72.0368 14.4389V14.4123C72.0368 14.1388 71.9427 13.9276 71.7545 13.7784C71.5663 13.6293 71.3124 13.5547 70.9928 13.5547C70.6483 13.5547 70.3714 13.6293 70.1618 13.7784C69.9523 13.9276 69.8192 14.1335 69.7623 14.3963L67.36 14.3111C67.431 13.8139 67.6139 13.37 67.9086 12.9794C68.2069 12.5852 68.6153 12.2763 69.1338 12.0526C69.6558 11.8253 70.2826 11.7116 71.0141 11.7116C71.5361 11.7116 72.0173 11.7738 72.4577 11.8981C72.898 12.0188 73.2815 12.1964 73.6082 12.4308C73.9349 12.6616 74.1871 12.9457 74.3646 13.283C74.5457 13.6204 74.6363 14.0057 74.6363 14.4389V20H72.186V18.8601H72.1221C71.9765 19.1371 71.79 19.3714 71.5628 19.5632C71.339 19.755 71.0745 19.8988 70.7691 19.9947C70.4672 20.0906 70.1263 20.1385 69.7464 20.1385ZM70.5507 18.4339C70.8312 18.4339 71.0834 18.3771 71.3071 18.2635C71.5344 18.1499 71.7155 17.9936 71.8504 17.7947C71.9854 17.5923 72.0528 17.358 72.0528 17.0916V16.3139C71.9782 16.353 71.8877 16.3885 71.7812 16.4205C71.6782 16.4524 71.5645 16.4826 71.4403 16.511C71.316 16.5394 71.1881 16.5643 71.0567 16.5856C70.9253 16.6069 70.7993 16.6264 70.6785 16.6442C70.4335 16.6832 70.224 16.7436 70.05 16.8253C69.8795 16.907 69.7481 17.0135 69.6558 17.1449C69.567 17.2727 69.5226 17.4254 69.5226 17.603C69.5226 17.8729 69.6185 18.0788 69.8103 18.2209C70.0056 18.3629 70.2524 18.4339 70.5507 18.4339ZM76.229 20V11.8182H78.7591V13.3097H78.8444C78.9935 12.7699 79.2368 12.3686 79.5741 12.1058C79.9115 11.8395 80.3039 11.7063 80.7513 11.7063C80.8721 11.7063 80.9964 11.7152 81.1242 11.733C81.252 11.7472 81.371 11.7702 81.4811 11.8022V14.0661C81.3568 14.0234 81.1934 13.9897 80.991 13.9648C80.7922 13.94 80.6146 13.9276 80.4584 13.9276C80.1494 13.9276 79.8706 13.9968 79.6221 14.1353C79.377 14.2702 79.1835 14.4602 79.0415 14.7053C78.903 14.9467 78.8337 15.2308 78.8337 15.5575V20H76.229Z",className:"qikbar-logo-primary-fill"}),y.jsx("path",{d:"M19.75 18.75L17.261 16.261M17.261 16.261C17.5744 15.9476 17.823 15.5755 17.9926 15.1661C18.1622 14.7566 18.2495 14.3177 18.2495 13.8745C18.2495 13.4313 18.1622 12.9924 17.9926 12.5829C17.823 12.1735 17.5744 11.8014 17.261 11.488C16.9476 11.1746 16.5755 10.926 16.1661 10.7564C15.7566 10.5868 15.3177 10.4995 14.8745 10.4995C14.4313 10.4995 13.9924 10.5868 13.5829 10.7564C13.1735 10.926 12.8014 11.1746 12.488 11.488C11.8549 12.1211 11.4993 12.9797 11.4993 13.875C11.4993 14.7703 11.8549 15.6289 12.488 16.262C13.1211 16.8951 13.9797 17.2507 14.875 17.2507C15.7703 17.2507 16.6289 16.8951 17.262 16.262L17.261 16.261ZM25 15C25 16.1819 24.7672 17.3522 24.3149 18.4442C23.8626 19.5361 23.1997 20.5282 22.364 21.364C21.5282 22.1997 20.5361 22.8626 19.4442 23.3149C18.3522 23.7672 17.1819 24 16 24C14.8181 24 13.6478 23.7672 12.5558 23.3149C11.4639 22.8626 10.4718 22.1997 9.63604 21.364C8.80031 20.5282 8.13738 19.5361 7.68508 18.4442C7.23279 17.3522 7 16.1819 7 15C7 12.6131 7.94821 10.3239 9.63604 8.63604C11.3239 6.94821 13.6131 6 16 6C18.3869 6 20.6761 6.94821 22.364 8.63604C24.0518 10.3239 25 12.6131 25 15Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"qikbar-logo-primary-stroke"})]})})})})]})})}const Se=Da(t=>({commands:[],router:null,headers:null,id:null,theme:null,addRouter:e=>{t(r=>({router:e}))},addHeaders:e=>{t(()=>({headers:e}))},setId:e=>{t(()=>({id:e}))},setTheme:e=>{t(()=>({theme:e}))},addCommand:e=>{t(r=>({commands:[...r.commands,e]}))},addCommands:e=>{t(r=>({commands:e}))},updateCommand:e=>{t(r=>({commands:r.commands.map(n=>n.id===e.id?e:n)}))},removeCommand:e=>{t(r=>({commands:r.commands.filter(n=>n.id!==e.id)}))}})),ca=new su;function qf({path:t,commands:e,theme:r}){const n=Ni([{path:"/",element:y.jsx(Vi,{demo:!0,defaultOpen:!0,wrapperClass:"qikbar-command-demo-wrapper"}),errorElement:y.jsx(ua,{}),children:e.map(i=>({path:i.path,element:i.type==="STATIC"?y.jsx(Qi,{...i}):y.jsx(la,{...i})}))}],{initialEntries:[t||"/"]});return y.jsx("div",{id:"qikbar",className:`qikbar-demo qikbar-light qikbar-${r}`,children:y.jsx(ds,{client:ca,children:y.jsx(ji,{router:n})})})}function If(){const t=Se(n=>n.commands),e=Se(n=>n.theme),r=Ni([{path:"/",element:y.jsx(Vi,{}),errorElement:y.jsx(ua,{}),children:t.map(n=>({path:n.path,element:n.type==="STATIC"?y.jsx(Qi,{...n}):y.jsx(la,{...n})}))}]);return y.jsx("div",{id:"qikbar",className:`qikbar-light qikbar-${e}`,children:y.jsx(ji,{router:r})})}const da=async t=>fetch(`https://app.qikbar.com/api/site/${t}`).then(r=>r.json()).then(r=>{r!=null&&r.routes&&Se.getState().addCommands(r.routes),r!=null&&r.theme&&Se.getState().setTheme(r.theme),r!=null&&r.id&&Se.getState().setId(r.id)}).catch(r=>{console.error(r)});function Vf({id:t}){return da(t),{id:t,boot:({elementId:r})=>{Ht.createRoot(document.getElementById(r)).render(y.jsx(A.StrictMode,{children:y.jsx(Af,{children:y.jsx(ds,{client:ca,children:y.jsx(If,{})})})})),window.Qikbar.booted=!0},setTheme:r=>Se.getState().setTheme(r),reloadSite:()=>da(t),addCommand:r=>Se.getState().addCommand(r),updateCommand:r=>Se.getState().updateCommand(r),removeCommand:r=>Se.getState().removeCommand(r),addRouter:r=>Se.getState().addRouter(r),addHeaders:r=>Se.getState().addHeaders(r)}}function ha(t){return window.Qikbar=Vf({id:t}),window.addEventListener("message",function(e){var r;(r=e==null?void 0:e.data)!=null&&r.reloadSite&&window.Qikbar.reloadSite()}),window.Qikbar}function Uf({elementId:t,router:e,siteId:r}){return A.useEffect(()=>{if(window.Qikbar)return;const n=ha(r);n.boot({elementId:t||"qikbar"}),e&&n.addRouter(e)},[e,t,r]),t?null:y.jsx("div",{id:"qikbar"})}const fp="";ye.DemoBar=qf,ye.Qikbar=Uf,ye.init=ha,Object.defineProperty(ye,Symbol.toStringTag,{value:"Module"})});