@dxos/shell 0.3.11-main.0b0bfb1 → 0.3.11-main.0e02eb0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/shell.mjs +9788 -9035
- package/dist/bundle/shell.mjs.map +1 -1
- package/dist/bundle/shell.umd.js +63 -63
- package/dist/bundle/shell.umd.js.map +1 -1
- package/dist/bundle/style.css +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react.mjs +190 -174
- package/dist/lib/browser/react.mjs.map +4 -4
- package/dist/lib/browser/testing/index.mjs +35 -14
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/types/src/components/IdentityList/SpaceMemberList.js +1 -1
- package/dist/types/src/components/IdentityList/SpaceMemberList.js.map +1 -1
- package/dist/types/src/components/Panel/Action.d.ts.map +1 -1
- package/dist/types/src/components/Panel/Action.js +3 -18
- package/dist/types/src/components/Panel/Action.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js +6 -2
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts +9 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/AgentForm.d.ts +3 -0
- package/dist/types/src/panels/IdentityPanel/steps/AgentForm.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/steps/AgentForm.js +26 -0
- package/dist/types/src/panels/IdentityPanel/steps/AgentForm.js.map +1 -0
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/SignOutChooser.js +2 -2
- package/dist/types/src/panels/IdentityPanel/steps/SignOutChooser.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/index.d.ts +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/index.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/index.js +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/index.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/useAgentHandlers.d.ts +15 -0
- package/dist/types/src/panels/IdentityPanel/useAgentHandlers.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/useAgentHandlers.js +78 -0
- package/dist/types/src/panels/IdentityPanel/useAgentHandlers.js.map +1 -0
- package/dist/types/src/panels/JoinPanel/joinMachine.d.ts +1 -1
- package/dist/types/src/panels/JoinPanel/joinMachine.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/joinMachine.js +14 -17
- package/dist/types/src/panels/JoinPanel/joinMachine.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.js +3 -3
- package/dist/types/src/panels/JoinPanel/steps/AdditionMethodChooser.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.d.ts.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.js +13 -6
- package/dist/types/src/panels/JoinPanel/steps/InvitationInput.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/InvitationRescuer.js.map +1 -1
- package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.js +1 -1
- package/dist/types/src/panels/JoinPanel/steps/ResetIdentity.js.map +1 -1
- package/dist/types/src/playwright/invitations-manager.d.ts +1 -0
- package/dist/types/src/playwright/invitations-manager.d.ts.map +1 -1
- package/dist/types/src/playwright/invitations-manager.js +4 -1
- package/dist/types/src/playwright/invitations-manager.js.map +1 -1
- package/dist/types/src/playwright/invitations.spec.js +15 -0
- package/dist/types/src/playwright/invitations.spec.js.map +1 -1
- package/dist/types/src/styles/invitationStatusStyles.d.ts.map +1 -1
- package/dist/types/src/styles/invitationStatusStyles.js.map +1 -1
- package/dist/types/src/testing/shell-manager.d.ts +5 -4
- package/dist/types/src/testing/shell-manager.d.ts.map +1 -1
- package/dist/types/src/testing/shell-manager.js +36 -12
- package/dist/types/src/testing/shell-manager.js.map +1 -1
- package/package.json +22 -22
- package/src/components/IdentityList/SpaceMemberList.tsx +1 -1
- package/src/components/Panel/Action.tsx +4 -19
- package/src/panels/IdentityPanel/IdentityPanel.tsx +7 -3
- package/src/panels/IdentityPanel/IdentityPanelProps.ts +11 -1
- package/src/panels/IdentityPanel/steps/AgentForm.tsx +61 -0
- package/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx +5 -1
- package/src/panels/IdentityPanel/steps/SignOutChooser.tsx +2 -0
- package/src/panels/IdentityPanel/steps/index.ts +1 -1
- package/src/panels/IdentityPanel/useAgentHandlers.ts +88 -0
- package/src/panels/JoinPanel/joinMachine.ts +15 -18
- package/src/panels/JoinPanel/steps/AdditionMethodChooser.tsx +3 -3
- package/src/panels/JoinPanel/steps/InvitationInput.tsx +7 -1
- package/src/panels/JoinPanel/steps/InvitationRescuer.tsx +2 -2
- package/src/panels/JoinPanel/steps/ResetIdentity.tsx +1 -1
- package/src/playwright/invitations-manager.ts +5 -1
- package/src/playwright/invitations.spec.ts +19 -0
- package/src/styles/invitationStatusStyles.ts +6 -6
- package/src/testing/shell-manager.ts +40 -13
- package/dist/types/src/panels/IdentityPanel/steps/AgentPanel.d.ts +0 -19
- package/dist/types/src/panels/IdentityPanel/steps/AgentPanel.d.ts.map +0 -1
- package/dist/types/src/panels/IdentityPanel/steps/AgentPanel.js +0 -122
- package/dist/types/src/panels/IdentityPanel/steps/AgentPanel.js.map +0 -1
- package/src/panels/IdentityPanel/steps/AgentPanel.tsx +0 -165
package/dist/bundle/shell.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sw(e,t){return nw(e)||ow(e,t)||iw(e,t)||aw()}function Fd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Al(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fd(Object(r),!0).forEach(function(n){Td(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var lw=function(t,r){var n=c.useRef();return c.useEffect(function(){n.current=r?n.current:t},[t,r]),n.current};function rt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.i18n,n=c.useContext(K1)||{},o=n.i18n,i=n.defaultNS,a=r||o||Z1();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new J1),!a){Cl("You will need to pass in an i18next instance by using initReactI18next");var s=function(k){return Array.isArray(k)?k[k.length-1]:k},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}a.options.react&&a.options.react.wait!==void 0&&Cl("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=Al(Al(Al({},Y1()),a.options.react),t),f=u.useSuspense,d=u.keyPrefix,p=e||i||a.options&&a.options.defaultNS;p=typeof p=="string"?[p]:p||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(p);var h=(a.isInitialized||a.initializedStoreOnce)&&p.every(function(O){return rw(O,a,u)});function g(){return a.getFixedT(null,u.nsMode==="fallback"?p:p[0],d)}var v=c.useState(g),y=sw(v,2),m=y[0],w=y[1],E=p.join(),x=lw(E),P=c.useRef(!0);c.useEffect(function(){var O=u.bindI18n,k=u.bindI18nStore;P.current=!0,!h&&!f&&Ld(a,p,function(){P.current&&w(g)}),h&&x&&x!==E&&P.current&&w(g);function j(){P.current&&w(g)}return O&&a&&a.on(O,j),k&&a&&a.store.on(k,j),function(){P.current=!1,O&&a&&O.split(" ").forEach(function(D){return a.off(D,j)}),k&&a&&k.split(" ").forEach(function(D){return a.store.off(D,j)})}},[a,E]);var I=c.useRef(!0);c.useEffect(function(){P.current&&!I.current&&w(g),I.current=!1},[a,d]);var S=[m,a,h];if(S.t=m,S.i18n=a,S.ready=h,h||!h&&!f)return S;throw new Promise(function(O){Ld(a,p,function(){O()})})}var jd={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Ye,function(){return r.importState=function(o){var i=new r;return i.importState(o),i},r;function r(){return function(o){var i=0,a=0,s=0,l=1;o.length==0&&(o=[+new Date]);var u=n();i=u(" "),a=u(" "),s=u(" ");for(var f=0;f<o.length;f++)i-=u(o[f]),i<0&&(i+=1),a-=u(o[f]),a<0&&(a+=1),s-=u(o[f]),s<0&&(s+=1);u=null;var d=function(){var p=2091639*i+l*23283064365386963e-26;return i=a,a=s,s=p-(l=p|0)};return d.next=d,d.uint32=function(){return d()*4294967296},d.fract53=function(){return d()+(d()*2097152|0)*11102230246251565e-32},d.version="Alea 0.9",d.args=o,d.exportState=function(){return[i,a,s,l]},d.importState=function(p){i=+p[0]||0,a=+p[1]||0,s=+p[2]||0,l=+p[3]||0},d}(Array.prototype.slice.call(arguments))}function n(){var o=4022871197,i=function(a){a=a.toString();for(var s=0;s<a.length;s++){o+=a.charCodeAt(s);var l=.02519603282416938*o;o=l>>>0,l-=o,l*=o,o=l>>>0,l-=o,o+=l*4294967296}return(o>>>0)*23283064365386963e-26};return i.version="Mash 0.9",i}})})(jd);var cw=jd.exports;const uw=In(cw);var Ol=e=>{const t=c.useRef(null);return c.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t},fw=uw,dw=new fw("@dxos/react-hooks"),pw=(e=4)=>dw().toString(16).slice(2,e+2),_t=(e,t,r)=>c.useMemo(()=>t??`${e}-${pw(r?.n??4)}`,[t]),hw=e=>{const[t,r]=c.useState(void 0),n=c.useRef(t);return n.current=t,c.useEffect(()=>{const o=e.current;if(!o)return;const i=()=>r(!0),a=()=>r(!1);return o.addEventListener("focus",i),o.addEventListener("blur",a),n.current===void 0&&r(document.activeElement===o),()=>{o.removeEventListener("focus",i),o.removeEventListener("blur",a)}},[e,r]),t},Bd={sm:"(min-width: 640px)",md:"(min-width: 768px)",lg:"(min-width: 1024px)",xl:"(min-width: 1280px)","2xl":"(min-width: 1536px)"},Rd=(e,t={})=>{const{ssr:r=!0,fallback:n}=t,o=(Array.isArray(e)?e:[e]).map(l=>l in Bd?Bd[l]:l);let i=Array.isArray(n)?n:[n];i=i.filter(l=>l!=null);const[a,s]=c.useState(()=>o.map((l,u)=>({media:l,matches:r?!!i[u]:document.defaultView?.matchMedia(l).matches})));return c.useEffect(()=>{s(o.map(f=>({media:f,matches:document.defaultView?.matchMedia(f).matches})));const l=o.map(f=>document.defaultView?.matchMedia(f)),u=f=>{s(d=>d.slice().map(p=>p.media===f.media?{...p,matches:f.matches}:p))};return l.forEach(f=>{typeof f?.addListener=="function"?f?.addListener(u):f?.addEventListener("change",u)}),()=>{l.forEach(f=>{typeof f?.removeListener=="function"?f?.removeListener(u):f?.removeEventListener("change",u)})}},[document.defaultView]),a.map(l=>!!l.matches)};function nt(){return nt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nt.apply(this,arguments)}function gw(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Tl(...e){return t=>e.forEach(r=>gw(r,t))}function er(...e){return c.useCallback(Tl(...e),e)}const xt=c.forwardRef((e,t)=>{const{children:r,...n}=e,o=c.Children.toArray(r),i=o.find(mw);if(i){const a=i.props.children,s=o.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(Il,nt({},n,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(Il,nt({},n,{ref:t}),r)});xt.displayName="Slot";const Il=c.forwardRef((e,t)=>{const{children:r,...n}=e;return c.isValidElement(r)?c.cloneElement(r,{...bw(n,r.props),ref:t?Tl(t,r.ref):r.ref}):c.Children.count(r)>1?c.Children.only(null):null});Il.displayName="SlotClone";const vw=({children:e})=>c.createElement(c.Fragment,null,e);function mw(e){return c.isValidElement(e)&&e.type===vw}function bw(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const Ge=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=c.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?xt:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,nt({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ud(e,t){e&&on.flushSync(()=>e.dispatchEvent(t))}function dr(e){return dr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dr(e)}function Sr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yw(e,t){if(dr(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(dr(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wd(e){var t=yw(e,"string");return dr(t)==="symbol"?t:String(t)}function Vd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Wd(n.key),n)}}function $r(e,t,r){return t&&Vd(e.prototype,t),r&&Vd(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function sn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pl(e,t){return Pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Pl(e,t)}function va(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pl(e,t)}function ci(e,t){if(t&&(dr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sn(e)}function Cr(e){return Cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Cr(e)}function ln(e,t,r){return t=Wd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ww(e){if(Array.isArray(e))return e}function _w(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Hd(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ew(e,t){if(e){if(typeof e=="string")return Hd(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hd(e,t)}}function xw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sw(e){return ww(e)||_w(e)||Ew(e)||xw()}function zd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Gd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zd(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var $w={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,r){console&&console[t]&&console[t].apply(console,r)}},Cw=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Sr(this,e),this.init(t,r)}return $r(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=r||$w,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(r){this.debug=r}},{key:"log",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"log","",!0)}},{key:"warn",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"warn","",!0)}},{key:"error",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"error","")}},{key:"deprecate",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(r,n,o,i){return i&&!this.debug?null:(typeof r[0]=="string"&&(r[0]="".concat(o).concat(this.prefix," ").concat(r[0])),this.logger[n](r))}},{key:"create",value:function(r){return new e(this.logger,Gd(Gd({},{prefix:"".concat(this.prefix,":").concat(r,":")}),this.options))}},{key:"clone",value:function(r){return r=r||this.options,r.prefix=r.prefix||this.prefix,new e(this.logger,r)}}]),e}(),Ar=new Cw,cn=function(){function e(){Sr(this,e),this.observers={}}return $r(e,[{key:"on",value:function(r,n){var o=this;return r.split(" ").forEach(function(i){o.observers[i]=o.observers[i]||[],o.observers[i].push(n)}),this}},{key:"off",value:function(r,n){if(this.observers[r]){if(!n){delete this.observers[r];return}this.observers[r]=this.observers[r].filter(function(o){return o!==n})}}},{key:"emit",value:function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];if(this.observers[r]){var a=[].concat(this.observers[r]);a.forEach(function(l){l.apply(void 0,o)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(l){l.apply(l,[r].concat(o))})}}}]),e}();function ui(){var e,t,r=new Promise(function(n,o){e=n,t=o});return r.resolve=e,r.reject=t,r}function Kd(e){return e==null?"":""+e}function Aw(e,t,r){e.forEach(function(n){t[n]&&(r[n]=t[n])})}function kl(e,t,r){function n(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function o(){return!e||typeof e=="string"}for(var i=typeof t!="string"?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!e[a]&&r&&(e[a]=new r),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={}}return o()?{}:{obj:e,k:n(i.shift())}}function qd(e,t,r){var n=kl(e,t,Object),o=n.obj,i=n.k;o[i]=r}function Ow(e,t,r,n){var o=kl(e,t,Object),i=o.obj,a=o.k;i[a]=i[a]||[],n&&(i[a]=i[a].concat(r)),n||i[a].push(r)}function ma(e,t){var r=kl(e,t),n=r.obj,o=r.k;if(n)return n[o]}function Yd(e,t,r){var n=ma(e,r);return n!==void 0?n:ma(t,r)}function Jd(e,t,r){for(var n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?typeof e[n]=="string"||e[n]instanceof String||typeof t[n]=="string"||t[n]instanceof String?r&&(e[n]=t[n]):Jd(e[n],t[n],r):e[n]=t[n]);return e}function lo(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Tw={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function Iw(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return Tw[t]}):e}var ba=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,Pw=[" ",",","?","!",";"];function kw(e,t,r){t=t||"",r=r||"";var n=Pw.filter(function(s){return t.indexOf(s)<0&&r.indexOf(s)<0});if(n.length===0)return!0;var o=new RegExp("(".concat(n.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(r);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}function Xd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ya(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xd(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nw(e){var t=Dw();return function(){var n=Cr(e),o;if(t){var i=Cr(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return ci(this,o)}}function Dw(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zd(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var n=t.split(r),o=e,i=0;i<n.length;++i){if(!o||typeof o[n[i]]=="string"&&i+1<n.length)return;if(o[n[i]]===void 0){for(var a=2,s=n.slice(i,i+a).join(r),l=o[s];l===void 0&&n.length>i+a;)a++,s=n.slice(i,i+a).join(r),l=o[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}var u=n.slice(i+a).join(r);return u?Zd(l,u,r):void 0}o=o[n[i]]}return o}}var Lw=function(e){va(r,e);var t=Nw(r);function r(n){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Sr(this,r),o=t.call(this),ba&&cn.call(sn(o)),o.data=n||{},o.options=i,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.options.ignoreJSONStructure===void 0&&(o.options.ignoreJSONStructure=!0),o}return $r(r,[{key:"addNamespaces",value:function(o){this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}},{key:"removeNamespaces",value:function(o){var i=this.options.ns.indexOf(o);i>-1&&this.options.ns.splice(i,1)}},{key:"getResource",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,f=[o,i];a&&typeof a!="string"&&(f=f.concat(a)),a&&typeof a=="string"&&(f=f.concat(l?a.split(l):a)),o.indexOf(".")>-1&&(f=o.split("."));var d=ma(this.data,f);return d||!u||typeof a!="string"?d:Zd(this.data&&this.data[o]&&this.data[o][i],a,l)}},{key:"addResource",value:function(o,i,a,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var f=[o,i];a&&(f=f.concat(u?a.split(u):a)),o.indexOf(".")>-1&&(f=o.split("."),s=i,i=f[1]),this.addNamespaces(i),qd(this.data,f,s),l.silent||this.emit("added",o,i,a,s)}},{key:"addResources",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in a)(typeof a[l]=="string"||Object.prototype.toString.apply(a[l])==="[object Array]")&&this.addResource(o,i,l,a[l],{silent:!0});s.silent||this.emit("added",o,i,a)}},{key:"addResourceBundle",value:function(o,i,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},f=[o,i];o.indexOf(".")>-1&&(f=o.split("."),s=a,a=i,i=f[1]),this.addNamespaces(i);var d=ma(this.data,f)||{};s?Jd(d,a,l):d=ya(ya({},d),a),qd(this.data,f,d),u.silent||this.emit("added",o,i,a)}},{key:"removeResourceBundle",value:function(o,i){this.hasResourceBundle(o,i)&&delete this.data[o][i],this.removeNamespaces(i),this.emit("removed",o,i)}},{key:"hasResourceBundle",value:function(o,i){return this.getResource(o,i)!==void 0}},{key:"getResourceBundle",value:function(o,i){return i||(i=this.options.defaultNS),this.options.compatibilityAPI==="v1"?ya(ya({},{}),this.getResource(o,i)):this.getResource(o,i)}},{key:"getDataByLanguage",value:function(o){return this.data[o]}},{key:"hasLanguageSomeTranslations",value:function(o){var i=this.getDataByLanguage(o),a=i&&Object.keys(i)||[];return!!a.find(function(s){return i[s]&&Object.keys(i[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),r}(cn),Qd={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,r,n,o,i){var a=this;return t.forEach(function(s){a.processors[s]&&(r=a.processors[s].process(r,n,o,i))}),r}};function ep(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Wt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ep(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ep(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mw(e){var t=Fw();return function(){var n=Cr(e),o;if(t){var i=Cr(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return ci(this,o)}}function Fw(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var tp={},rp=function(e){va(r,e);var t=Mw(r);function r(n){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Sr(this,r),o=t.call(this),ba&&cn.call(sn(o)),Aw(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,sn(o)),o.options=i,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.logger=Ar.create("translator"),o}return $r(r,[{key:"changeLanguage",value:function(o){o&&(this.language=o)}},{key:"exists",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(o==null)return!1;var a=this.resolve(o,i);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(o,i){var a=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,l=i.ns||this.options.defaultNS||[],u=a&&o.indexOf(a)>-1,f=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!kw(o,a,s);if(u&&!f){var d=o.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:o,namespaces:l};var p=o.split(a);(a!==s||a===s&&this.options.ns.indexOf(p[0])>-1)&&(l=p.shift()),o=p.join(s)}return typeof l=="string"&&(l=[l]),{key:o,namespaces:l}}},{key:"translate",value:function(o,i,a){var s=this;if(dr(i)!=="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),i||(i={}),o==null)return"";Array.isArray(o)||(o=[String(o)]);var l=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,u=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,f=this.extractFromKey(o[o.length-1],i),d=f.key,p=f.namespaces,h=p[p.length-1],g=i.lng||this.language,v=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(g&&g.toLowerCase()==="cimode"){if(v){var y=i.nsSeparator||this.options.nsSeparator;return l?(m.res="".concat(h).concat(y).concat(d),m):"".concat(h).concat(y).concat(d)}return l?(m.res=d,m):d}var m=this.resolve(o,i),w=m&&m.res,E=m&&m.usedKey||d,x=m&&m.exactUsedKey||d,P=Object.prototype.toString.apply(w),I=["[object Number]","[object Function]","[object RegExp]"],S=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,O=!this.i18nFormat||this.i18nFormat.handleAsObject,k=typeof w!="string"&&typeof w!="boolean"&&typeof w!="number";if(O&&w&&k&&I.indexOf(P)<0&&!(typeof S=="string"&&P==="[object Array]")){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var j=this.options.returnedObjectHandler?this.options.returnedObjectHandler(E,w,Wt(Wt({},i),{},{ns:p})):"key '".concat(d," (").concat(this.language,")' returned an object instead of string.");return l?(m.res=j,m):j}if(u){var D=P==="[object Array]",N=D?[]:{},J=D?x:E;for(var K in w)if(Object.prototype.hasOwnProperty.call(w,K)){var Y="".concat(J).concat(u).concat(K);N[K]=this.translate(Y,Wt(Wt({},i),{joinArrays:!1,ns:p})),N[K]===Y&&(N[K]=w[K])}w=N}}else if(O&&typeof S=="string"&&P==="[object Array]")w=w.join(S),w&&(w=this.extendTranslation(w,o,i,a));else{var te=!1,oe=!1,le=i.count!==void 0&&typeof i.count!="string",ae=r.hasDefaultValue(i),ge=le?this.pluralResolver.getSuffix(g,i.count,i):"",ce=i["defaultValue".concat(ge)]||i.defaultValue;!this.isValidLookup(w)&&ae&&(te=!0,w=ce),this.isValidLookup(w)||(oe=!0,w=d);var q=i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,V=q&&oe?void 0:w,re=ae&&ce!==w&&this.options.updateMissing;if(oe||te||re){if(this.logger.log(re?"updateKey":"missingKey",g,h,d,re?ce:w),u){var de=this.resolve(d,Wt(Wt({},i),{},{keySeparator:!1}));de&&de.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var U=[],z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&z&&z[0])for(var M=0;M<z.length;M++)U.push(z[M]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(i.lng||this.language):U.push(i.lng||this.language);var R=function(A,T,Z){var ne=ae&&Z!==w?Z:V;s.options.missingKeyHandler?s.options.missingKeyHandler(A,h,T,ne,re,i):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(A,h,T,ne,re,i),s.emit("missingKey",A,h,T,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&le?U.forEach(function(G){s.pluralResolver.getSuffixes(G,i).forEach(function(A){R([G],d+A,i["defaultValue".concat(A)]||ce)})}):R(U,d,ce))}w=this.extendTranslation(w,o,i,m,a),oe&&w===d&&this.options.appendNamespaceToMissingKey&&(w="".concat(h,":").concat(d)),(oe||te)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(h,":").concat(d):d,te?w:void 0):w=this.options.parseMissingKeyHandler(w))}return l?(m.res=w,m):w}},{key:"extendTranslation",value:function(o,i,a,s,l){var u=this;if(this.i18nFormat&&this.i18nFormat.parse)o=this.i18nFormat.parse(o,Wt(Wt({},this.options.interpolation.defaultVariables),a),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init(Wt(Wt({},a),{interpolation:Wt(Wt({},this.options.interpolation),a.interpolation)}));var f=typeof o=="string"&&(a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),d;if(f){var p=o.match(this.interpolator.nestingRegexp);d=p&&p.length}var h=a.replace&&typeof a.replace!="string"?a.replace:a;if(this.options.interpolation.defaultVariables&&(h=Wt(Wt({},this.options.interpolation.defaultVariables),h)),o=this.interpolator.interpolate(o,h,a.lng||this.language,a),f){var g=o.match(this.interpolator.nestingRegexp),v=g&&g.length;d<v&&(a.nest=!1)}a.nest!==!1&&(o=this.interpolator.nest(o,function(){for(var w=arguments.length,E=new Array(w),x=0;x<w;x++)E[x]=arguments[x];return l&&l[0]===E[0]&&!a.context?(u.logger.warn("It seems you are nesting recursively key: ".concat(E[0]," in key: ").concat(i[0])),null):u.translate.apply(u,E.concat([i]))},a)),a.interpolation&&this.interpolator.reset()}var y=a.postProcess||this.options.postProcess,m=typeof y=="string"?[y]:y;return o!=null&&m&&m.length&&a.applyPostProcessor!==!1&&(o=Qd.handle(m,o,i,this.options&&this.options.postProcessPassResolved?Wt({i18nResolved:s},a):a,this)),o}},{key:"resolve",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,u,f,d;return typeof o=="string"&&(o=[o]),o.forEach(function(p){if(!i.isValidLookup(s)){var h=i.extractFromKey(p,a),g=h.key;l=g;var v=h.namespaces;i.options.fallbackNS&&(v=v.concat(i.options.fallbackNS));var y=a.count!==void 0&&typeof a.count!="string",m=y&&!a.ordinal&&a.count===0&&i.pluralResolver.shouldUseIntlApi(),w=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",E=a.lngs?a.lngs:i.languageUtils.toResolveHierarchy(a.lng||i.language,a.fallbackLng);v.forEach(function(x){i.isValidLookup(s)||(d=x,!tp["".concat(E[0],"-").concat(x)]&&i.utils&&i.utils.hasLoadedNamespace&&!i.utils.hasLoadedNamespace(d)&&(tp["".concat(E[0],"-").concat(x)]=!0,i.logger.warn('key "'.concat(l,'" for languages "').concat(E.join(", "),`" won't get resolved as namespace "`).concat(d,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(function(P){if(!i.isValidLookup(s)){f=P;var I=[g];if(i.i18nFormat&&i.i18nFormat.addLookupKeys)i.i18nFormat.addLookupKeys(I,g,P,x,a);else{var S;y&&(S=i.pluralResolver.getSuffix(P,a.count,a));var O="".concat(i.options.pluralSeparator,"zero");if(y&&(I.push(g+S),m&&I.push(g+O)),w){var k="".concat(g).concat(i.options.contextSeparator).concat(a.context);I.push(k),y&&(I.push(k+S),m&&I.push(k+O))}}for(var j;j=I.pop();)i.isValidLookup(s)||(u=j,s=i.getResource(P,x,j,a))}}))})}}),{res:s,usedKey:l,exactUsedKey:u,usedLng:f,usedNS:d}}},{key:"isValidLookup",value:function(o){return o!==void 0&&!(!this.options.returnNull&&o===null)&&!(!this.options.returnEmptyString&&o==="")}},{key:"getResource",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(o,i,a,s):this.resourceStore.getResource(o,i,a,s)}}],[{key:"hasDefaultValue",value:function(o){var i="defaultValue";for(var a in o)if(Object.prototype.hasOwnProperty.call(o,a)&&i===a.substring(0,i.length)&&o[a]!==void 0)return!0;return!1}}]),r}(cn);function Nl(e){return e.charAt(0).toUpperCase()+e.slice(1)}var jw=function(){function e(t){Sr(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ar.create("languageUtils")}return $r(e,[{key:"getScriptPartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return null;var n=r.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}},{key:"getLanguagePartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return r;var n=r.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function(r){if(typeof r=="string"&&r.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],o=r.split("-");return this.options.lowerCaseLng?o=o.map(function(i){return i.toLowerCase()}):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),n.indexOf(o[1].toLowerCase())>-1&&(o[1]=Nl(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),n.indexOf(o[1].toLowerCase())>-1&&(o[1]=Nl(o[1].toLowerCase())),n.indexOf(o[2].toLowerCase())>-1&&(o[2]=Nl(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?r.toLowerCase():r}},{key:"isSupportedCode",value:function(r){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(r=this.getLanguagePartFromCode(r)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(r)>-1}},{key:"getBestMatchFromCodes",value:function(r){var n=this;if(!r)return null;var o;return r.forEach(function(i){if(!o){var a=n.formatLanguageCode(i);(!n.options.supportedLngs||n.isSupportedCode(a))&&(o=a)}}),!o&&this.options.supportedLngs&&r.forEach(function(i){if(!o){var a=n.getLanguagePartFromCode(i);if(n.isSupportedCode(a))return o=a;o=n.options.supportedLngs.find(function(s){if(s.indexOf(a)===0)return s})}}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}},{key:"getFallbackCodes",value:function(r,n){if(!r)return[];if(typeof r=="function"&&(r=r(n)),typeof r=="string"&&(r=[r]),Object.prototype.toString.apply(r)==="[object Array]")return r;if(!n)return r.default||[];var o=r[n];return o||(o=r[this.getScriptPartFromCode(n)]),o||(o=r[this.formatLanguageCode(n)]),o||(o=r[this.getLanguagePartFromCode(n)]),o||(o=r.default),o||[]}},{key:"toResolveHierarchy",value:function(r,n){var o=this,i=this.getFallbackCodes(n||this.options.fallbackLng||[],r),a=[],s=function(u){u&&(o.isSupportedCode(u)?a.push(u):o.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof r=="string"&&r.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(r)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(r)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(r))):typeof r=="string"&&s(this.formatLanguageCode(r)),i.forEach(function(l){a.indexOf(l)<0&&s(o.formatLanguageCode(l))}),a}}]),e}(),Bw=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Rw={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}},Uw=["v1","v2","v3"],np={zero:0,one:1,two:2,few:3,many:4,other:5};function Ww(){var e={};return Bw.forEach(function(t){t.lngs.forEach(function(r){e[r]={numbers:t.nr,plurals:Rw[t.fc]}})}),e}var Vw=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Sr(this,e),this.languageUtils=t,this.options=r,this.logger=Ar.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Ww()}return $r(e,[{key:"addRule",value:function(r,n){this.rules[r]=n}},{key:"getRule",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(r,{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[r]||this.rules[this.languageUtils.getLanguagePartFromCode(r)]}},{key:"needsPlural",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(r,n);return this.shouldUseIntlApi()?o&&o.resolvedOptions().pluralCategories.length>1:o&&o.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(r,o).map(function(i){return"".concat(n).concat(i)})}},{key:"getSuffixes",value:function(r){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(r,o);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort(function(a,s){return np[a]-np[s]}).map(function(a){return"".concat(n.options.prepend).concat(a)}):i.numbers.map(function(a){return n.getSuffix(r,a,o)}):[]}},{key:"getSuffix",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=this.getRule(r,o);return i?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(i.select(n)):this.getSuffixRetroCompatible(i,n):(this.logger.warn("no plural rule found for: ".concat(r)),"")}},{key:"getSuffixRetroCompatible",value:function(r,n){var o=this,i=r.noAbs?r.plurals(n):r.plurals(Math.abs(n)),a=r.numbers[i];this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var s=function(){return o.options.prepend&&a.toString()?o.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1?s():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}},{key:"shouldUseIntlApi",value:function(){return!Uw.includes(this.options.compatibilityJSON)}}]),e}();function op(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function pr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?op(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):op(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Hw=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Sr(this,e),this.logger=Ar.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(r){return r},this.init(t)}return $r(e,[{key:"init",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r.interpolation||(r.interpolation={escapeValue:!0});var n=r.interpolation;this.escape=n.escape!==void 0?n.escape:Iw,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?lo(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?lo(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?lo(n.nestingPrefix):n.nestingPrefixEscaped||lo("$t("),this.nestingSuffix=n.nestingSuffix?lo(n.nestingSuffix):n.nestingSuffixEscaped||lo(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var r="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(r,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var o="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(o,"g")}},{key:"interpolate",value:function(r,n,o,i){var a=this,s,l,u,f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(y){return y.replace(/\$/g,"$$$$")}var p=function(m){if(m.indexOf(a.formatSeparator)<0){var w=Yd(n,f,m);return a.alwaysFormat?a.format(w,void 0,o,pr(pr(pr({},i),n),{},{interpolationkey:m})):w}var E=m.split(a.formatSeparator),x=E.shift().trim(),P=E.join(a.formatSeparator).trim();return a.format(Yd(n,f,x),P,o,pr(pr(pr({},i),n),{},{interpolationkey:x}))};this.resetRegExp();var h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,g=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,v=[{regex:this.regexpUnescape,safeValue:function(m){return d(m)}},{regex:this.regexp,safeValue:function(m){return a.escapeValue?d(a.escape(m)):d(m)}}];return v.forEach(function(y){for(u=0;s=y.regex.exec(r);){var m=s[1].trim();if(l=p(m),l===void 0)if(typeof h=="function"){var w=h(r,s,i);l=typeof w=="string"?w:""}else if(i&&i.hasOwnProperty(m))l="";else if(g){l=s[0];continue}else a.logger.warn("missed to pass in variable ".concat(m," for interpolating ").concat(r)),l="";else typeof l!="string"&&!a.useRawValueToEscape&&(l=Kd(l));var E=y.safeValue(l);if(r=r.replace(s[0],E),g?(y.regex.lastIndex+=l.length,y.regex.lastIndex-=s[0].length):y.regex.lastIndex=0,u++,u>=a.maxReplaces)break}}),r}},{key:"nest",value:function(r,n){var o=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,l=pr({},i);l.applyPostProcessor=!1,delete l.defaultValue;function u(h,g){var v=this.nestingOptionsSeparator;if(h.indexOf(v)<0)return h;var y=h.split(new RegExp("".concat(v,"[ ]*{"))),m="{".concat(y[1]);h=y[0],m=this.interpolate(m,l);var w=m.match(/'/g),E=m.match(/"/g);(w&&w.length%2===0&&!E||E.length%2!==0)&&(m=m.replace(/'/g,'"'));try{l=JSON.parse(m),g&&(l=pr(pr({},g),l))}catch(x){return this.logger.warn("failed parsing options string in nesting for key ".concat(h),x),"".concat(h).concat(v).concat(m)}return delete l.defaultValue,h}for(;a=this.nestingRegexp.exec(r);){var f=[],d=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var p=a[1].split(this.formatSeparator).map(function(h){return h.trim()});a[1]=p.shift(),f=p,d=!0}if(s=n(u.call(this,a[1].trim(),l),l),s&&a[0]===r&&typeof s!="string")return s;typeof s!="string"&&(s=Kd(s)),s||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(r)),s=""),d&&(s=f.reduce(function(h,g){return o.format(h,g,i.lng,pr(pr({},i),{},{interpolationkey:a[1].trim()}))},s.trim())),r=r.replace(a[0],s),this.regexp.lastIndex=0}return r}}]),e}();function ip(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function un(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ip(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ip(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zw(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var o=n[1].substring(0,n[1].length-1);if(t==="currency"&&o.indexOf(":")<0)r.currency||(r.currency=o.trim());else if(t==="relativetime"&&o.indexOf(":")<0)r.range||(r.range=o.trim());else{var i=o.split(";");i.forEach(function(a){if(a){var s=a.split(":"),l=Sw(s),u=l[0],f=l.slice(1),d=f.join(":").trim().replace(/^'+|'+$/g,"");r[u.trim()]||(r[u.trim()]=d),d==="false"&&(r[u.trim()]=!1),d==="true"&&(r[u.trim()]=!0),isNaN(d)||(r[u.trim()]=parseInt(d,10))}})}}return{formatName:t,formatOptions:r}}function co(e){var t={};return function(n,o,i){var a=o+JSON.stringify(i),s=t[a];return s||(s=e(o,i),t[a]=s),s(n)}}var Gw=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Sr(this,e),this.logger=Ar.create("formatter"),this.options=t,this.formats={number:co(function(r,n){var o=new Intl.NumberFormat(r,n);return function(i){return o.format(i)}}),currency:co(function(r,n){var o=new Intl.NumberFormat(r,un(un({},n),{},{style:"currency"}));return function(i){return o.format(i)}}),datetime:co(function(r,n){var o=new Intl.DateTimeFormat(r,un({},n));return function(i){return o.format(i)}}),relativetime:co(function(r,n){var o=new Intl.RelativeTimeFormat(r,un({},n));return function(i){return o.format(i,n.range||"day")}}),list:co(function(r,n){var o=new Intl.ListFormat(r,un({},n));return function(i){return o.format(i)}})},this.init(t)}return $r(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},o=n.interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}},{key:"add",value:function(r,n){this.formats[r.toLowerCase().trim()]=n}},{key:"addCached",value:function(r,n){this.formats[r.toLowerCase().trim()]=co(n)}},{key:"format",value:function(r,n,o,i){var a=this,s=n.split(this.formatSeparator),l=s.reduce(function(u,f){var d=zw(f),p=d.formatName,h=d.formatOptions;if(a.formats[p]){var g=u;try{var v=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},y=v.locale||v.lng||i.locale||i.lng||o;g=a.formats[p](u,y,un(un(un({},h),i),v))}catch(m){a.logger.warn(m)}return g}else a.logger.warn("there was no format function for ".concat(p));return u},r);return l}}]),e}();function ap(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function sp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ap(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ap(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kw(e){var t=qw();return function(){var n=Cr(e),o;if(t){var i=Cr(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return ci(this,o)}}function qw(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yw(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var Jw=function(e){va(r,e);var t=Kw(r);function r(n,o,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Sr(this,r),a=t.call(this),ba&&cn.call(sn(a)),a.backend=n,a.store=o,a.services=i,a.languageUtils=i.languageUtils,a.options=s,a.logger=Ar.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=s.maxParallelReads||10,a.readingCalls=0,a.maxRetries=s.maxRetries>=0?s.maxRetries:5,a.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(i,s.backend,s),a}return $r(r,[{key:"queueLoad",value:function(o,i,a,s){var l=this,u={},f={},d={},p={};return o.forEach(function(h){var g=!0;i.forEach(function(v){var y="".concat(h,"|").concat(v);!a.reload&&l.store.hasResourceBundle(h,v)?l.state[y]=2:l.state[y]<0||(l.state[y]===1?f[y]===void 0&&(f[y]=!0):(l.state[y]=1,g=!1,f[y]===void 0&&(f[y]=!0),u[y]===void 0&&(u[y]=!0),p[v]===void 0&&(p[v]=!0)))}),g||(d[h]=!0)}),(Object.keys(u).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(f),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(p)}}},{key:"loaded",value:function(o,i,a){var s=o.split("|"),l=s[0],u=s[1];i&&this.emit("failedLoading",l,u,i),a&&this.store.addResourceBundle(l,u,a),this.state[o]=i?-1:2;var f={};this.queue.forEach(function(d){Ow(d.loaded,[l],u),Yw(d,o),i&&d.errors.push(i),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(function(p){f[p]||(f[p]={});var h=d.loaded[p];h.length&&h.forEach(function(g){f[p][g]===void 0&&(f[p][g]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",f),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(o,i,a){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,f=arguments.length>5?arguments[5]:void 0;if(!o.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:o,ns:i,fcName:a,tried:l,wait:u,callback:f});return}return this.readingCalls++,this.backend[a](o,i,function(d,p){if(s.readingCalls--,s.waitingReads.length>0){var h=s.waitingReads.shift();s.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(d&&p&&l<s.maxRetries){setTimeout(function(){s.read.call(s,o,i,a,l+1,u*2,f)},u);return}f(d,p)})}},{key:"prepareLoading",value:function(o,i){var a=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof o=="string"&&(o=this.languageUtils.toResolveHierarchy(o)),typeof i=="string"&&(i=[i]);var u=this.queueLoad(o,i,s,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(f){a.loadOne(f)})}},{key:"load",value:function(o,i,a){this.prepareLoading(o,i,{},a)}},{key:"reload",value:function(o,i,a){this.prepareLoading(o,i,{reload:!0},a)}},{key:"loadOne",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=o.split("|"),l=s[0],u=s[1];this.read(l,u,"read",void 0,void 0,function(f,d){f&&i.logger.warn("".concat(a,"loading namespace ").concat(u," for language ").concat(l," failed"),f),!f&&d&&i.logger.log("".concat(a,"loaded namespace ").concat(u," for language ").concat(l),d),i.loaded(o,f,d)})}},{key:"saveMissing",value:function(o,i,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(i)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}a==null||a===""||(this.backend&&this.backend.create&&this.backend.create(o,i,a,s,null,sp(sp({},u),{},{isUpdate:l})),!(!o||!o[0])&&this.store.addResource(o[0],i,a,s))}}]),r}(cn);function Xw(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var r={};if(dr(t[1])==="object"&&(r=t[1]),typeof t[1]=="string"&&(r.defaultValue=t[1]),typeof t[2]=="string"&&(r.tDescription=t[2]),dr(t[2])==="object"||dr(t[3])==="object"){var n=t[3]||t[2];Object.keys(n).forEach(function(o){r[o]=n[o]})}return r},interpolation:{escapeValue:!0,format:function(t,r,n,o){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function lp(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function cp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Or(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cp(Object(r),!0).forEach(function(n){ln(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zw(e){var t=Qw();return function(){var n=Cr(e),o;if(t){var i=Cr(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return ci(this,o)}}function Qw(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wa(){}function e_(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(r){typeof e[r]=="function"&&(e[r]=e[r].bind(e))})}var _a=function(e){va(r,e);var t=Zw(r);function r(){var n,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(Sr(this,r),n=t.call(this),ba&&cn.call(sn(n)),n.options=lp(o),n.services={},n.logger=Ar,n.modules={external:[]},e_(sn(n)),i&&!n.isInitialized&&!o.isClone){if(!n.options.initImmediate)return n.init(o,i),ci(n,sn(n));setTimeout(function(){n.init(o,i)},0)}return n}return $r(r,[{key:"init",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof i=="function"&&(a=i,i={}),!i.defaultNS&&i.defaultNS!==!1&&i.ns&&(typeof i.ns=="string"?i.defaultNS=i.ns:i.ns.indexOf("translation")<0&&(i.defaultNS=i.ns[0]));var s=Xw();this.options=Or(Or(Or({},s),this.options),lp(i)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Or(Or({},s.interpolation),this.options.interpolation)),i.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=i.keySeparator),i.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=i.nsSeparator);function l(m){return m?typeof m=="function"?new m:m:null}if(!this.options.isClone){this.modules.logger?Ar.init(l(this.modules.logger),this.options):Ar.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=Gw);var f=new jw(this.options);this.store=new Lw(this.options.resources,this.options);var d=this.services;d.logger=Ar,d.resourceStore=this.store,d.languageUtils=f,d.pluralResolver=new Vw(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(d.formatter=l(u),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new Hw(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new Jw(l(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(m){for(var w=arguments.length,E=new Array(w>1?w-1:0),x=1;x<w;x++)E[x-1]=arguments[x];o.emit.apply(o,[m].concat(E))}),this.modules.languageDetector&&(d.languageDetector=l(this.modules.languageDetector),d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=l(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new rp(this.services,this.options),this.translator.on("*",function(m){for(var w=arguments.length,E=new Array(w>1?w-1:0),x=1;x<w;x++)E[x-1]=arguments[x];o.emit.apply(o,[m].concat(E))}),this.modules.external.forEach(function(m){m.init&&m.init(o)})}if(this.format=this.options.interpolation.format,a||(a=wa),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var h=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];h.forEach(function(m){o[m]=function(){var w;return(w=o.store)[m].apply(w,arguments)}});var g=["addResource","addResources","addResourceBundle","removeResourceBundle"];g.forEach(function(m){o[m]=function(){var w;return(w=o.store)[m].apply(w,arguments),o}});var v=ui(),y=function(){var w=function(x,P){o.isInitialized&&!o.initializedStoreOnce&&o.logger.warn("init: i18next is already initialized. You should call init just once!"),o.isInitialized=!0,o.options.isClone||o.logger.log("initialized",o.options),o.emit("initialized",o.options),v.resolve(P),a(x,P)};if(o.languages&&o.options.compatibilityAPI!=="v1"&&!o.isInitialized)return w(null,o.t.bind(o));o.changeLanguage(o.options.lng,w)};return this.options.resources||!this.options.initImmediate?y():setTimeout(y,0),v}},{key:"loadResources",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wa,s=a,l=typeof o=="string"?o:this.language;if(typeof o=="function"&&(s=o),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var u=[],f=function(h){if(h){var g=i.services.languageUtils.toResolveHierarchy(h);g.forEach(function(v){u.indexOf(v)<0&&u.push(v)})}};if(l)f(l);else{var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.forEach(function(p){return f(p)})}this.options.preload&&this.options.preload.forEach(function(p){return f(p)}),this.services.backendConnector.load(u,this.options.ns,function(p){!p&&!i.resolvedLanguage&&i.language&&i.setResolvedLanguage(i.language),s(p)})}else s(null)}},{key:"reloadResources",value:function(o,i,a){var s=ui();return o||(o=this.languages),i||(i=this.options.ns),a||(a=wa),this.services.backendConnector.reload(o,i,function(l){s.resolve(),a(l)}),s}},{key:"use",value:function(o){if(!o)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!o.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return o.type==="backend"&&(this.modules.backend=o),(o.type==="logger"||o.log&&o.warn&&o.error)&&(this.modules.logger=o),o.type==="languageDetector"&&(this.modules.languageDetector=o),o.type==="i18nFormat"&&(this.modules.i18nFormat=o),o.type==="postProcessor"&&Qd.addPostProcessor(o),o.type==="formatter"&&(this.modules.formatter=o),o.type==="3rdParty"&&this.modules.external.push(o),this}},{key:"setResolvedLanguage",value:function(o){if(!(!o||!this.languages)&&!(["cimode","dev"].indexOf(o)>-1))for(var i=0;i<this.languages.length;i++){var a=this.languages[i];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(o,i){var a=this;this.isLanguageChangingTo=o;var s=ui();this.emit("languageChanging",o);var l=function(p){a.language=p,a.languages=a.services.languageUtils.toResolveHierarchy(p),a.resolvedLanguage=void 0,a.setResolvedLanguage(p)},u=function(p,h){h?(l(h),a.translator.changeLanguage(h),a.isLanguageChangingTo=void 0,a.emit("languageChanged",h),a.logger.log("languageChanged",h)):a.isLanguageChangingTo=void 0,s.resolve(function(){return a.t.apply(a,arguments)}),i&&i(p,function(){return a.t.apply(a,arguments)})},f=function(p){!o&&!p&&a.services.languageDetector&&(p=[]);var h=typeof p=="string"?p:a.services.languageUtils.getBestMatchFromCodes(p);h&&(a.language||l(h),a.translator.language||a.translator.changeLanguage(h),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage(h)),a.loadResources(h,function(g){u(g,h)})};return!o&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!o&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(f):f(o),s}},{key:"getFixedT",value:function(o,i,a){var s=this,l=function u(f,d){var p;if(dr(d)!=="object"){for(var h=arguments.length,g=new Array(h>2?h-2:0),v=2;v<h;v++)g[v-2]=arguments[v];p=s.options.overloadTranslationOptionHandler([f,d].concat(g))}else p=Or({},d);p.lng=p.lng||u.lng,p.lngs=p.lngs||u.lngs,p.ns=p.ns||u.ns,p.keyPrefix=p.keyPrefix||a||u.keyPrefix;var y=s.options.keySeparator||".",m=p.keyPrefix?"".concat(p.keyPrefix).concat(y).concat(f):f;return s.t(m,p)};return typeof o=="string"?l.lng=o:l.lngs=o,l.ns=i,l.keyPrefix=a,l}},{key:"t",value:function(){var o;return this.translator&&(o=this.translator).translate.apply(o,arguments)}},{key:"exists",value:function(){var o;return this.translator&&(o=this.translator).exists.apply(o,arguments)}},{key:"setDefaultNamespace",value:function(o){this.options.defaultNS=o}},{key:"hasLoadedNamespace",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var f=function(h,g){var v=i.services.backendConnector.state["".concat(h,"|").concat(g)];return v===-1||v===2};if(a.precheck){var d=a.precheck(this,f);if(d!==void 0)return d}return!!(this.hasResourceBundle(s,o)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(s,o)&&(!l||f(u,o)))}},{key:"loadNamespaces",value:function(o,i){var a=this,s=ui();return this.options.ns?(typeof o=="string"&&(o=[o]),o.forEach(function(l){a.options.ns.indexOf(l)<0&&a.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),i&&i(l)}),s):(i&&i(),Promise.resolve())}},{key:"loadLanguages",value:function(o,i){var a=ui();typeof o=="string"&&(o=[o]);var s=this.options.preload||[],l=o.filter(function(u){return s.indexOf(u)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(u){a.resolve(),i&&i(u)}),a):(i&&i(),Promise.resolve())}},{key:"dir",value:function(o){if(o||(o=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!o)return"rtl";var i=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];return i.indexOf(this.services.languageUtils.getLanguagePartFromCode(o))>-1||o.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wa,s=Or(Or(Or({},this.options),i),{isClone:!0}),l=new r(s);(i.debug!==void 0||i.prefix!==void 0)&&(l.logger=l.logger.clone(i));var u=["store","services","language"];return u.forEach(function(f){l[f]=o[f]}),l.services=Or({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new rp(l.services,l.options),l.translator.on("*",function(f){for(var d=arguments.length,p=new Array(d>1?d-1:0),h=1;h<d;h++)p[h-1]=arguments[h];l.emit.apply(l,[f].concat(p))}),l.init(s,a),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),r}(cn);ln(_a,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new _a(e,t)});var Ft=_a.createInstance();Ft.createInstance=_a.createInstance,Ft.createInstance,Ft.init,Ft.loadResources,Ft.reloadResources,Ft.use,Ft.changeLanguage,Ft.getFixedT,Ft.t,Ft.exists,Ft.setDefaultNamespace,Ft.hasLoadedNamespace,Ft.loadNamespaces,Ft.loadLanguages;function be(){return be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},be.apply(this,arguments)}function t_(e,t){const r=c.createContext(t);function n(i){const{children:a,...s}=i,l=c.useMemo(()=>s,Object.values(s));return c.createElement(r.Provider,{value:l},a)}function o(i){const a=c.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,o]}function fn(e,t=[]){let r=[];function n(i,a){const s=c.createContext(a),l=r.length;r=[...r,a];function u(d){const{scope:p,children:h,...g}=d,v=p?.[e][l]||s,y=c.useMemo(()=>g,Object.values(g));return c.createElement(v.Provider,{value:y},h)}function f(d,p){const h=p?.[e][l]||s,g=c.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=r.map(a=>c.createContext(a));return function(s){const l=s?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,r_(o,...t)]}function r_(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function Vt(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}const Tr=globalThis?.document?c.useLayoutEffect:()=>{};function n_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function up(...e){return t=>e.forEach(r=>n_(r,t))}function Ct(...e){return c.useCallback(up(...e),e)}const Dl=c.forwardRef((e,t)=>{const{children:r,...n}=e,o=c.Children.toArray(r),i=o.find(o_);if(i){const a=i.props.children,s=o.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(Ll,be({},n,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(Ll,be({},n,{ref:t}),r)});Dl.displayName="Slot";const Ll=c.forwardRef((e,t)=>{const{children:r,...n}=e;return c.isValidElement(r)?c.cloneElement(r,{...i_(n,r.props),ref:up(t,r.ref)}):c.Children.count(r)>1?c.Children.only(null):null});Ll.displayName="SlotClone";const Ml=({children:e})=>c.createElement(c.Fragment,null,e);function o_(e){return c.isValidElement(e)&&e.type===Ml}function i_(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const ft=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=c.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?Dl:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,be({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function a_(e,t){e&&on.flushSync(()=>e.dispatchEvent(t))}const fp="Avatar",[s_,D9]=fn(fp),[l_,c_]=s_(fp),u_=c.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[o,i]=c.useState("idle");return c.createElement(l_,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:i},c.createElement(ft.span,be({},n,{ref:t})))}),f_="AvatarFallback",d_=c.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...o}=e,i=c_(f_,r),[a,s]=c.useState(n===void 0);return c.useEffect(()=>{if(n!==void 0){const l=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(l)}},[n]),a&&i.imageLoadingStatus!=="loaded"?c.createElement(ft.span,be({},o,{ref:t})):null}),p_=u_,dp=d_;function uo(e,t){const r=c.createContext(t);function n(i){const{children:a,...s}=i,l=c.useMemo(()=>s,Object.values(s));return c.createElement(r.Provider,{value:l},a)}function o(i){const a=c.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,o]}function Ir(e,t=[]){let r=[];function n(i,a){const s=c.createContext(a),l=r.length;r=[...r,a];function u(d){const{scope:p,children:h,...g}=d,v=p?.[e][l]||s,y=c.useMemo(()=>g,Object.values(g));return c.createElement(v.Provider,{value:y},h)}function f(d,p){const h=p?.[e][l]||s,g=c.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=r.map(a=>c.createContext(a));return function(s){const l=s?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,h_(o,...t)]}function h_(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function fi(e,t,r){return parseInt(e.substr(t,r),16)}function pp(e){return e|=0,e<0?"00":e<16?"0"+e.toString(16):e<256?e.toString(16):"ff"}function Fl(e,t,r){return r=r<0?r+6:r>6?r-6:r,pp(255*(r<1?e+(t-e)*r:r<3?t:r<4?e+(t-e)*(4-r):e))}function g_(e){if(/^#[0-9a-f]{3,8}$/i.test(e)){let t;const r=e.length;if(r<6){const n=e[1],o=e[2],i=e[3],a=e[4]||"";t="#"+n+n+o+o+i+i+a+a}return(r==7||r>8)&&(t=e),t}}function v_(e,t,r){let n;if(t==0){const o=pp(r*255);n=o+o+o}else{const o=r<=.5?r*(t+1):r+t-r*t,i=r*2-o;n=Fl(i,o,e*6+2)+Fl(i,o,e*6)+Fl(i,o,e*6-2)}return"#"+n}function di(e,t,r){const n=[.55,.5,.5,.46,.6,.55,.55],o=n[e*6+.5|0];return r=r<.5?r*o*2:o+(r-.5)*(1-o)*2,v_(e,t,r)}const m_=typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:{},hp={V:"jdenticon_config",n:"config"};var b_={};function y_(e,t){const r=typeof e=="object"&&e||b_[hp.n]||m_[hp.V]||{},n=r.lightness||{},o=r.saturation||{},i="color"in o?o.color:o,a=o.grayscale,s=r.backColor,l=r.padding;function u(d,p){let h=n[d];return h&&h.length>1||(h=p),function(g){return g=h[0]+g*(h[1]-h[0]),g<0?0:g>1?1:g}}function f(d){const p=r.hues;let h;return p&&p.length>0&&(h=p[0|.999*d*p.length]),typeof h=="number"?(h/360%1+1)%1:d}return{W:f,o:typeof i=="number"?i:.5,D:typeof a=="number"?a:0,p:u("color",[.4,.8]),F:u("grayscale",[.3,.9]),G:g_(s),X:typeof e=="number"?e:typeof l=="number"?l:t}}class Ea{constructor(t,r){this.x=t,this.y=r}}let gp=class{constructor(t,r,n,o){this.q=t,this.t=r,this.H=n,this.Y=o}I(t,r,n,o){const i=this.q+this.H,a=this.t+this.H,s=this.Y;return s===1?new Ea(i-r-(o||0),this.t+t):s===2?new Ea(i-t-(n||0),a-r-(o||0)):s===3?new Ea(this.q+r,a-t-(n||0)):new Ea(this.q+t,this.t+r)}};const w_=new gp(0,0,0,0);class __{constructor(t){this.J=t,this.u=w_}g(t,r){const n=r?-2:2,o=[];for(let i=r?t.length-2:0;i<t.length&&i>=0;i+=n)o.push(this.u.I(t[i],t[i+1]));this.J.g(o)}h(t,r,n,o){const i=this.u.I(t,r,n,n);this.J.h(i,n,o)}i(t,r,n,o,i){this.g([t,r,t+n,r,t+n,r+o,t,r+o],i)}j(t,r,n,o,i,a){const s=[t+n,r,t+n,r+o,t,r+o,t,r];s.splice((i||0)%4*2,2),this.g(s,a)}K(t,r,n,o,i){this.g([t+n/2,r,t+n,r+o/2,t+n/2,r+o,t,r+o/2],i)}}function E_(e,t,r,n){e=e%14;let o,i,a,s,l,u;e?e==1?(a=0|r*.5,s=0|r*.8,t.j(r-a,0,a,s,2)):e==2?(a=0|r/3,t.i(a,a,r-a,r-a)):e==3?(l=r*.1,u=r<6?1:r<8?2:0|r*.25,l=l>1?0|l:l>.5?1:l,t.i(u,u,r-l-u,r-l-u)):e==4?(i=0|r*.15,a=0|r*.5,t.h(r-a-i,r-a-i,a)):e==5?(l=r*.1,u=l*4,u>3&&(u=0|u),t.i(0,0,r,r),t.g([u,u,r-l,u,u+(r-u-l)/2,r-l],!0)):e==6?t.g([0,0,r,0,r,r*.7,r*.4,r*.4,r*.7,r,0,r]):e==7?t.j(r/2,r/2,r/2,r/2,3):e==8?(t.i(0,0,r,r/2),t.i(0,r/2,r/2,r/2),t.j(r/2,r/2,r/2,r/2,1)):e==9?(l=r*.14,u=r<4?1:r<6?2:0|r*.35,l=r<8?l:0|l,t.i(0,0,r,r),t.i(u,u,r-u-l,r-u-l,!0)):e==10?(l=r*.12,u=l*3,t.i(0,0,r,r),t.h(u,u,r-l-u,!0)):e==11?t.j(r/2,r/2,r/2,r/2,3):e==12?(i=r*.25,t.i(0,0,r,r),t.K(i,i,r-i,r-i,!0)):!n&&(i=r*.4,a=r*1.2,t.h(i,i,a)):(o=r*.42,t.g([0,0,r,0,r,r-o*2,r-o,r,0,r]))}function vp(e,t,r){e=e%4;let n;e?e==1?t.j(0,r/2,r,r/2,0):e==2?t.K(0,0,r,r):(n=r/6,t.h(n,n,r-2*n)):t.j(0,0,r,r,0)}function x_(e,t){return e=t.W(e),[di(e,t.D,t.F(0)),di(e,t.o,t.p(.5)),di(e,t.D,t.F(1)),di(e,t.o,t.p(1)),di(e,t.o,t.p(0))]}function S_(e,t,r){const n=y_(r,.08);n.G&&e.m(n.G);let o=e.k;const i=.5+o*n.X|0;o-=i*2;const a=new __(e),s=0|o/4,l=0|i+o/2-s*2,u=0|i+o/2-s*2;function f(y,m,w,E,x){const P=fi(t,w,1);let I=E?fi(t,E,1):0;e.L(p[h[y]]);for(let S=0;S<x.length;S++)a.u=new gp(l+x[S][0]*s,u+x[S][1]*s,s,I++%4),m(P,a,s,S);e.M()}const d=fi(t,-7)/268435455,p=x_(d,n),h=[];let g;function v(y){if(y.indexOf(g)>=0){for(let m=0;m<y.length;m++)if(h.indexOf(y[m])>=0)return!0}}for(let y=0;y<3;y++)g=fi(t,8+y,1)%p.length,(v([0,4])||v([2,3]))&&(g=1),h.push(g);f(0,vp,2,3,[[1,0],[2,0],[2,3],[1,3],[0,1],[3,1],[3,2],[0,2]]),f(1,vp,4,5,[[0,0],[3,0],[3,3],[0,3]]),f(2,E_,1,null,[[1,1],[2,1],[2,2],[1,2]]),e.finish()}function $_(e){var n=0,o=0,i=encodeURI(e)+"%80",a=[],s,l=[],u=1732584193,f=4023233417,d=~u,p=~f,h=3285377520,g=[u,f,d,p,h],v=0,y="";function m(w,E){return w<<E|w>>>32-E}for(;n<i.length;o++)a[o>>2]=a[o>>2]|(i[n]=="%"?parseInt(i.substring(n+1,n+=3),16):i.charCodeAt(n++))<<(3-(o&3))*8;for(s=((o+7>>6)+1)*16,a[s-1]=o*8-8;v<s;v+=16){for(n=0;n<80;n++)o=m(u,5)+h+(n<20?(f&d^~f&p)+1518500249:n<40?(f^d^p)+1859775393:n<60?(f&d^f&p^d&p)+2400959708:(f^d^p)+3395469782)+(l[n]=n<16?a[v+n]|0:m(l[n-3]^l[n-8]^l[n-14]^l[n-16],1)),h=p,p=d,d=m(f,30),f=u,u=o;g[0]=u=g[0]+u|0,g[1]=f=g[1]+f|0,g[2]=d=g[2]+d|0,g[3]=p=g[3]+p|0,g[4]=h=g[4]+h|0}for(n=0;n<40;n++)y+=(g[n>>3]>>>(7-(n&7))*4&15).toString(16);return y}function C_(e){return/^[0-9a-f]{11,}$/i.test(e)&&e}function A_(e){return $_(e==null?"":""+e)}function fo(e){return(e*10+.5|0)/10}class O_{constructor(){this.v=""}g(t){let r="";for(let n=0;n<t.length;n++)r+=(n?"L":"M")+fo(t[n].x)+" "+fo(t[n].y);this.v+=r+"Z"}h(t,r,n){const o=n?0:1,i=fo(r/2),a=fo(r),s="a"+i+","+i+" 0 1,"+o+" ";this.v+="M"+fo(t.x)+" "+fo(t.y+r/2)+s+a+",0"+s+-a+",0"}}class T_{constructor(t){this.A,this.B={},this.N=t,this.k=t.k}m(t){const r=/^(#......)(..)?/.exec(t),n=r[2]?fi(r[2],0)/255:1;this.N.m(r[1],n)}L(t){this.A=this.B[t]||(this.B[t]=new O_)}M(){}g(t){this.A.g(t)}h(t,r,n){this.A.h(t,r,n)}finish(){const t=this.B;for(let r in t)t.hasOwnProperty(r)&&this.N.O(r,t[r].v)}}const I_={P:"http://www.w3.org/2000/svg",R:"width",S:"height"};class P_{constructor(t){this.k=t,this.C='<svg xmlns="'+I_.P+'" width="'+t+'" height="'+t+'" viewBox="0 0 '+t+" "+t+'">'}m(t,r){r&&(this.C+='<rect width="100%" height="100%" fill="'+t+'" opacity="'+r.toFixed(2)+'"/>')}O(t,r){this.C+='<path fill="'+t+'" d="'+r+'"/>'}toString(){return this.C+"</svg>"}}function k_(e,t,r){const n=new P_(t);return S_(new T_(n),C_(e)||A_(e),r),n.toString()}typeof document<"u"&&document.querySelectorAll.bind(document);function pt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}function xa({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=N_({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=Vt(r),l=c.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else o(u)},[i,e,o,s]);return[a,l]}function N_({defaultProp:e,onChange:t}){const r=c.useState(e),[n]=r,o=c.useRef(n),i=Vt(t);return c.useEffect(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}const D_=ve["useId".toString()]||(()=>{});let L_=0;function pi(e){const[t,r]=ve.useState(D_());return Tr(()=>{e||r(n=>n??String(L_++))},[e]),e||(t?`radix-${t}`:"")}const M_=c.createContext(void 0);function F_(e){const t=c.useContext(M_);return e||t||"ltr"}function j_(e,t=globalThis?.document){const r=Vt(e);c.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const jl="dismissableLayer.update",B_="dismissableLayer.pointerDownOutside",R_="dismissableLayer.focusOutside";let mp;const U_=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bp=c.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,f=c.useContext(U_),[d,p]=c.useState(null),h=(r=d?.ownerDocument)!==null&&r!==void 0?r:globalThis?.document,[,g]=c.useState({}),v=Ct(t,O=>p(O)),y=Array.from(f.layers),[m]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=y.indexOf(m),E=d?y.indexOf(d):-1,x=f.layersWithOutsidePointerEventsDisabled.size>0,P=E>=w,I=W_(O=>{const k=O.target,j=[...f.branches].some(D=>D.contains(k));!P||j||(i?.(O),s?.(O),O.defaultPrevented||l?.())},h),S=V_(O=>{const k=O.target;[...f.branches].some(D=>D.contains(k))||(a?.(O),s?.(O),O.defaultPrevented||l?.())},h);return j_(O=>{E===f.layers.size-1&&(o?.(O),!O.defaultPrevented&&l&&(O.preventDefault(),l()))},h),c.useEffect(()=>{if(d)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(mp=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),yp(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=mp)}},[d,h,n,f]),c.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),yp())},[d,f]),c.useEffect(()=>{const O=()=>g({});return document.addEventListener(jl,O),()=>document.removeEventListener(jl,O)},[]),c.createElement(ft.div,be({},u,{ref:v,style:{pointerEvents:x?P?"auto":"none":void 0,...e.style},onFocusCapture:pt(e.onFocusCapture,S.onFocusCapture),onBlurCapture:pt(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:pt(e.onPointerDownCapture,I.onPointerDownCapture)}))});function W_(e,t=globalThis?.document){const r=Vt(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let u=function(){wp(B_,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function V_(e,t=globalThis?.document){const r=Vt(e),n=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!n.current&&wp(R_,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function yp(){const e=new CustomEvent(jl);document.dispatchEvent(e)}function wp(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?a_(o,i):o.dispatchEvent(i)}const Bl="focusScope.autoFocusOnMount",Rl="focusScope.autoFocusOnUnmount",_p={bubbles:!1,cancelable:!0},H_=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=c.useState(null),u=Vt(o),f=Vt(i),d=c.useRef(null),p=Ct(t,v=>l(v)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let v=function(m){if(h.paused||!s)return;const w=m.target;s.contains(w)?d.current=w:Pn(d.current,{select:!0})},y=function(m){h.paused||!s||s.contains(m.relatedTarget)||Pn(d.current,{select:!0})};return document.addEventListener("focusin",v),document.addEventListener("focusout",y),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y)}}},[n,s,h.paused]),c.useEffect(()=>{if(s){Sp.add(h);const v=document.activeElement;if(!s.contains(v)){const m=new CustomEvent(Bl,_p);s.addEventListener(Bl,u),s.dispatchEvent(m),m.defaultPrevented||(z_(J_(Ep(s)),{select:!0}),document.activeElement===v&&Pn(s))}return()=>{s.removeEventListener(Bl,u),setTimeout(()=>{const m=new CustomEvent(Rl,_p);s.addEventListener(Rl,f),s.dispatchEvent(m),m.defaultPrevented||Pn(v??document.body,{select:!0}),s.removeEventListener(Rl,f),Sp.remove(h)},0)}}},[s,u,f,h]);const g=c.useCallback(v=>{if(!r&&!n||h.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,m=document.activeElement;if(y&&m){const w=v.currentTarget,[E,x]=G_(w);E&&x?!v.shiftKey&&m===x?(v.preventDefault(),r&&Pn(E,{select:!0})):v.shiftKey&&m===E&&(v.preventDefault(),r&&Pn(x,{select:!0})):m===w&&v.preventDefault()}},[r,n,h.paused]);return c.createElement(ft.div,be({tabIndex:-1},a,{ref:p,onKeyDown:g}))});function z_(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Pn(n,{select:t}),document.activeElement!==r)return}function G_(e){const t=Ep(e),r=xp(t,e),n=xp(t.reverse(),e);return[r,n]}function Ep(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function xp(e,t){for(const r of e)if(!K_(r,{upTo:t}))return r}function K_(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function q_(e){return e instanceof HTMLInputElement&&"select"in e}function Pn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&q_(e)&&t&&e.select()}}const Sp=Y_();function Y_(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=$p(e,t),e.unshift(t)},remove(t){var r;e=$p(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function $p(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function J_(e){return e.filter(t=>t.tagName!=="A")}const Cp=c.forwardRef((e,t)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...o}=e;return n?on.createPortal(c.createElement(ft.div,be({},o,{ref:t})),n):null});function X_(e,t){return c.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const or=e=>{const{present:t,children:r}=e,n=Z_(t),o=typeof r=="function"?r({present:n.isPresent}):c.Children.only(r),i=Ct(n.ref,o.ref);return typeof r=="function"||n.isPresent?c.cloneElement(o,{ref:i}):null};or.displayName="Presence";function Z_(e){const[t,r]=c.useState(),n=c.useRef({}),o=c.useRef(e),i=c.useRef("none"),a=e?"mounted":"unmounted",[s,l]=X_(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=Sa(n.current);i.current=s==="mounted"?u:"none"},[s]),Tr(()=>{const u=n.current,f=o.current;if(f!==e){const p=i.current,h=Sa(u);e?l("MOUNT"):h==="none"||u?.display==="none"?l("UNMOUNT"):l(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Tr(()=>{if(t){const u=d=>{const h=Sa(n.current).includes(d.animationName);d.target===t&&h&&on.flushSync(()=>l("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=Sa(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:c.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function Sa(e){return e?.animationName||"none"}let Ul=0;function Q_(){c.useEffect(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:Ap()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:Ap()),Ul++,()=>{Ul===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Ul--}},[])}function Ap(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Pr=function(){return Pr=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Pr.apply(this,arguments)};function Op(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function eE(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var $a="right-scroll-bar-position",Ca="width-before-scroll-bar",tE="with-scroll-bars-hidden",rE="--removed-body-scroll-bar-size";function nE(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function oE(e,t){var r=c.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function iE(e,t){return oE(t||null,function(r){return e.forEach(function(n){return nE(n,r)})})}function aE(e){return e}function sE(e,t){t===void 0&&(t=aE);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(i),a=r}var l=function(){var f=a;a=[],f.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),r}}}};return o}function lE(e){e===void 0&&(e={});var t=sE(null);return t.options=Pr({async:!0,ssr:!1},e),t}var Tp=function(e){var t=e.sideCar,r=Op(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return ve.createElement(n,Pr({},r))};Tp.isSideCarExport=!0;function cE(e,t){return e.useMedium(t),Tp}var Ip=lE(),Wl=function(){},Aa=ve.forwardRef(function(e,t){var r=ve.useRef(null),n=ve.useState({onScrollCapture:Wl,onWheelCapture:Wl,onTouchMoveCapture:Wl}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,h=e.noIsolation,g=e.inert,v=e.allowPinchZoom,y=e.as,m=y===void 0?"div":y,w=Op(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),E=p,x=iE([r,t]),P=Pr(Pr({},w),o);return ve.createElement(ve.Fragment,null,f&&ve.createElement(E,{sideCar:Ip,removeScrollBar:u,shards:d,noIsolation:h,inert:g,setCallbacks:i,allowPinchZoom:!!v,lockRef:r}),a?ve.cloneElement(ve.Children.only(s),Pr(Pr({},P),{ref:x})):ve.createElement(m,Pr({},P,{className:l,ref:x}),s))});Aa.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Aa.classNames={fullWidth:Ca,zeroRight:$a};var Pp,uE=function(){if(Pp)return Pp;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function fE(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=uE();return t&&e.setAttribute("nonce",t),e}function dE(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function pE(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var hE=function(){var e=0,t=null;return{add:function(r){e==0&&(t=fE())&&(dE(t,r),pE(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},gE=function(){var e=hE();return function(t,r){ve.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},kp=function(){var e=gE(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},vE={left:0,top:0,right:0,gap:0},Vl=function(e){return parseInt(e||"",10)||0},mE=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Vl(r),Vl(n),Vl(o)]},bE=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return vE;var t=mE(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},yE=kp(),wE=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
4
|
-
.`.concat(
|
|
1
|
+
(function(Zt,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react"),require("react-dom"),require("@phosphor-icons/react"),require("@dxos/react-client/echo"),require("@dxos/react-client"),require("@dxos/client-protocol"),require("@dxos/react-client/halo"),require("@dxos/client-services")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","@phosphor-icons/react","@dxos/react-client/echo","@dxos/react-client","@dxos/client-protocol","@dxos/react-client/halo","@dxos/client-services"],c):(Zt=typeof globalThis<"u"?globalThis:Zt||self,c(Zt.Shell={},Zt.React,Zt.$7SXl2$reactdom,Zt.react,Zt.echo,Zt.reactClient,Zt.clientProtocol,Zt.halo,Zt.clientServices))})(this,function(Zt,c,ln,ze,Sa,We,cn,gi,lw){"use strict";function Wd(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ve=Wd(c),Vd=Wd(ln);function vi(e){"@babel/helpers - typeof";return vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vi(e)}function cw(e,t){if(vi(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(vi(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hd(e){var t=cw(e,"string");return vi(t)==="symbol"?t:String(t)}function zd(e,t,r){return t=Hd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ye=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function un(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function uw(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}function fw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Hd(n.key),n)}}function dw(e,t,r){return t&&Gd(e.prototype,t),r&&Gd(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var pw=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,hw={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},gw=function(t){return hw[t]},vw=function(t){return t.replace(pw,gw)};function Kd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function qd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kd(Object(r),!0).forEach(function(n){zd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ml={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:vw},Yd,mw=c.createContext();function bw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ml=qd(qd({},Ml),e)}function yw(){return Ml}var ww=function(){function e(){fw(this,e),this.usedNamespaces={}}return dw(e,[{key:"addUsedNamespaces",value:function(r){var n=this;r.forEach(function(o){n.usedNamespaces[o]||(n.usedNamespaces[o]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function _w(e){Yd=e}function Ew(){return Yd}var xw={type:"3rdParty",init:function(t){bw(t.options.react),_w(t)}};function Sw(){if(console&&console.warn){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];typeof r[0]=="string"&&(r[0]="react-i18next:: ".concat(r[0])),(e=console).warn.apply(e,r)}}var Jd={};function Fl(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];typeof t[0]=="string"&&Jd[t[0]]||(typeof t[0]=="string"&&(Jd[t[0]]=new Date),Sw.apply(void 0,t))}function Xd(e,t,r){e.loadNamespaces(t,function(){if(e.isInitialized)r();else{var n=function o(){setTimeout(function(){e.off("initialized",o)},0),r()};e.on("initialized",n)}})}function $w(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=t.languages[0],o=t.options?t.options.fallbackLng:!1,i=t.languages[t.languages.length-1];if(n.toLowerCase()==="cimode")return!0;var a=function(l,u){var f=t.services.backendConnector.state["".concat(l,"|").concat(u)];return f===-1||f===2};return r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(n,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(n,e)&&(!o||a(i,e)))}function Cw(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return Fl("i18n.languages were undefined or empty",t.languages),!0;var n=t.options.ignoreJSONStructure!==void 0;return n?t.hasLoadedNamespace(e,{precheck:function(i,a){if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!a(i.isLanguageChangingTo,e))return!1}}):$w(e,t,r)}function Aw(e){if(Array.isArray(e))return e}function Ow(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){u=!0,o=f}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}function Zd(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Tw(e,t){if(e){if(typeof e=="string")return Zd(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zd(e,t)}}function Iw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pw(e,t){return Aw(e)||Ow(e,t)||Tw(e,t)||Iw()}function Qd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function jl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qd(Object(r),!0).forEach(function(n){zd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var kw=function(t,r){var n=c.useRef();return c.useEffect(function(){n.current=r?n.current:t},[t,r]),n.current};function Nw(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.i18n,n=c.useContext(mw)||{},o=n.i18n,i=n.defaultNS,a=r||o||Ew();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new ww),!a){Fl("You will need to pass in an i18next instance by using initReactI18next");var s=function(P){return Array.isArray(P)?P[P.length-1]:P},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}a.options.react&&a.options.react.wait!==void 0&&Fl("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=jl(jl(jl({},yw()),a.options.react),t),f=u.useSuspense,d=u.keyPrefix,p=e||i||a.options&&a.options.defaultNS;p=typeof p=="string"?[p]:p||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(p);var h=(a.isInitialized||a.initializedStoreOnce)&&p.every(function(C){return Cw(C,a,u)});function g(){return a.getFixedT(null,u.nsMode==="fallback"?p:p[0],d)}var v=c.useState(g),b=Pw(v,2),m=b[0],w=b[1],E=p.join(),x=kw(E),k=c.useRef(!0);c.useEffect(function(){var C=u.bindI18n,P=u.bindI18nStore;k.current=!0,!h&&!f&&Xd(a,p,function(){k.current&&w(g)}),h&&x&&x!==E&&k.current&&w(g);function F(){k.current&&w(g)}return C&&a&&a.on(C,F),P&&a&&a.store.on(P,F),function(){k.current=!1,C&&a&&C.split(" ").forEach(function(D){return a.off(D,F)}),P&&a&&P.split(" ").forEach(function(D){return a.store.off(D,F)})}},[a,E]);var I=c.useRef(!0);c.useEffect(function(){k.current&&!I.current&&w(g),I.current=!1},[a,d]);var S=[m,a,h];if(S.t=m,S.i18n=a,S.ready=h,h||!h&&!f)return S;throw new Promise(function(C){Xd(a,p,function(){C()})})}var ep={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Ye,function(){return r.importState=function(o){var i=new r;return i.importState(o),i},r;function r(){return function(o){var i=0,a=0,s=0,l=1;o.length==0&&(o=[+new Date]);var u=n();i=u(" "),a=u(" "),s=u(" ");for(var f=0;f<o.length;f++)i-=u(o[f]),i<0&&(i+=1),a-=u(o[f]),a<0&&(a+=1),s-=u(o[f]),s<0&&(s+=1);u=null;var d=function(){var p=2091639*i+l*23283064365386963e-26;return i=a,a=s,s=p-(l=p|0)};return d.next=d,d.uint32=function(){return d()*4294967296},d.fract53=function(){return d()+(d()*2097152|0)*11102230246251565e-32},d.version="Alea 0.9",d.args=o,d.exportState=function(){return[i,a,s,l]},d.importState=function(p){i=+p[0]||0,a=+p[1]||0,s=+p[2]||0,l=+p[3]||0},d}(Array.prototype.slice.call(arguments))}function n(){var o=4022871197,i=function(a){a=a.toString();for(var s=0;s<a.length;s++){o+=a.charCodeAt(s);var l=.02519603282416938*o;o=l>>>0,l-=o,l*=o,o=l>>>0,l-=o,o+=l*4294967296}return(o>>>0)*23283064365386963e-26};return i.version="Mash 0.9",i}})})(ep);var Dw=ep.exports;const Lw=un(Dw);var Bl=e=>{const t=c.useRef(null);return c.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t},Mw=Lw,Fw=new Mw("@dxos/react-hooks"),jw=(e=4)=>Fw().toString(16).slice(2,e+2),Et=(e,t,r)=>c.useMemo(()=>t??`${e}-${jw((r==null?void 0:r.n)??4)}`,[t]),Bw=e=>{const[t,r]=c.useState(void 0),n=c.useRef(t);return n.current=t,c.useEffect(()=>{const o=e.current;if(!o)return;const i=()=>r(!0),a=()=>r(!1);return o.addEventListener("focus",i),o.addEventListener("blur",a),n.current===void 0&&r(document.activeElement===o),()=>{o.removeEventListener("focus",i),o.removeEventListener("blur",a)}},[e,r]),t},tp={sm:"(min-width: 640px)",md:"(min-width: 768px)",lg:"(min-width: 1024px)",xl:"(min-width: 1280px)","2xl":"(min-width: 1536px)"},rp=(e,t={})=>{const{ssr:r=!0,fallback:n}=t,o=(Array.isArray(e)?e:[e]).map(l=>l in tp?tp[l]:l);let i=Array.isArray(n)?n:[n];i=i.filter(l=>l!=null);const[a,s]=c.useState(()=>o.map((l,u)=>{var f;return{media:l,matches:r?!!i[u]:(f=document.defaultView)==null?void 0:f.matchMedia(l).matches}}));return c.useEffect(()=>{s(o.map(f=>{var d;return{media:f,matches:(d=document.defaultView)==null?void 0:d.matchMedia(f).matches}}));const l=o.map(f=>{var d;return(d=document.defaultView)==null?void 0:d.matchMedia(f)}),u=f=>{s(d=>d.slice().map(p=>p.media===f.media?{...p,matches:f.matches}:p))};return l.forEach(f=>{typeof(f==null?void 0:f.addListener)=="function"?f==null||f.addListener(u):f==null||f.addEventListener("change",u)}),()=>{l.forEach(f=>{typeof(f==null?void 0:f.removeListener)=="function"?f==null||f.removeListener(u):f==null||f.removeEventListener("change",u)})}},[document.defaultView]),a.map(l=>!!l.matches)};function $a(){return $a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$a.apply(this,arguments)}function st(){return st=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},st.apply(this,arguments)}function Rw(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Rl(...e){return t=>e.forEach(r=>Rw(r,t))}function tr(...e){return c.useCallback(Rl(...e),e)}const St=c.forwardRef((e,t)=>{const{children:r,...n}=e,o=c.Children.toArray(r),i=o.find(Ww);if(i){const a=i.props.children,s=o.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(Ul,st({},n,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(Ul,st({},n,{ref:t}),r)});St.displayName="Slot";const Ul=c.forwardRef((e,t)=>{const{children:r,...n}=e;return c.isValidElement(r)?c.cloneElement(r,{...Vw(n,r.props),ref:t?Rl(t,r.ref):r.ref}):c.Children.count(r)>1?c.Children.only(null):null});Ul.displayName="SlotClone";const Uw=({children:e})=>c.createElement(c.Fragment,null,e);function Ww(e){return c.isValidElement(e)&&e.type===Uw}function Vw(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const Ge=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=c.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?St:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,$a({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function np(e,t){e&&ln.flushSync(()=>e.dispatchEvent(t))}function Wl(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}function mi(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let o;if(n==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=r!=null&&r.width?String(r.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=r!=null&&r.width?String(r.width):e.defaultWidth;o=e.values[s]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}function bi(e){return(t,r={})=>{const n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?zw(s,d=>d.test(a)):Hw(s,d=>d.test(a));let u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;const f=t.slice(a.length);return{value:u,rest:f}}}function Hw(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function zw(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function Gw(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const o=n[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=r.valueCallback?r.valueCallback(a):a;const s=t.slice(o.length);return{value:a,rest:s}}}const Kw={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},qw=(e,t,r)=>{let n;const o=Kw[e];return typeof o=="string"?n=o:t===1?n=o.one:n=o.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},Yw={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Jw=(e,t,r,n)=>Yw[e],Xw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Zw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Qw={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},e_={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},t_={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},r_={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},n_={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:mi({values:Xw,defaultWidth:"wide"}),quarter:mi({values:Zw,defaultWidth:"wide",argumentCallback:e=>e-1}),month:mi({values:Qw,defaultWidth:"wide"}),day:mi({values:e_,defaultWidth:"wide"}),dayPeriod:mi({values:t_,defaultWidth:"wide",formattingValues:r_,defaultFormattingWidth:"wide"})},o_=/^(\d+)(th|st|nd|rd)?/i,i_=/\d+/i,a_={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},s_={any:[/^b/i,/^(a|c)/i]},l_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},c_={any:[/1/i,/2/i,/3/i,/4/i]},u_={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},f_={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},d_={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},p_={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},h_={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},g_={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},v_={ordinalNumber:Gw({matchPattern:o_,parsePattern:i_,valueCallback:e=>parseInt(e,10)}),era:bi({matchPatterns:a_,defaultMatchWidth:"wide",parsePatterns:s_,defaultParseWidth:"any"}),quarter:bi({matchPatterns:l_,defaultMatchWidth:"wide",parsePatterns:c_,defaultParseWidth:"any",valueCallback:e=>e+1}),month:bi({matchPatterns:u_,defaultMatchWidth:"wide",parsePatterns:f_,defaultParseWidth:"any"}),day:bi({matchPatterns:d_,defaultMatchWidth:"wide",parsePatterns:p_,defaultParseWidth:"any"}),dayPeriod:bi({matchPatterns:h_,defaultMatchWidth:"any",parsePatterns:g_,defaultParseWidth:"any"})},m_={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},b_={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},y_={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},w_={date:Wl({formats:m_,defaultWidth:"full"}),time:Wl({formats:b_,defaultWidth:"full"}),dateTime:Wl({formats:y_,defaultWidth:"full"})},__={code:"en-US",formatDistance:qw,formatLong:w_,formatRelative:Jw,localize:n_,match:v_,options:{weekStartsOn:0,firstWeekContainsDate:1}};function pr(e){"@babel/helpers - typeof";return pr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pr(e)}function $r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E_(e,t){if(pr(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(pr(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function op(e){var t=E_(e,"string");return pr(t)==="symbol"?t:String(t)}function ip(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,op(n.key),n)}}function Cr(e,t,r){return t&&ip(e.prototype,t),r&&ip(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function fn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vl(e,t){return Vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Vl(e,t)}function Ca(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vl(e,t)}function yi(e,t){if(t&&(pr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fn(e)}function Ar(e){return Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ar(e)}function dn(e,t,r){return t=op(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x_(e){if(Array.isArray(e))return e}function S_(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ap(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $_(e,t){if(e){if(typeof e=="string")return ap(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ap(e,t)}}function C_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function A_(e){return x_(e)||S_(e)||$_(e)||C_()}function sp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function lp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sp(Object(r),!0).forEach(function(n){dn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var O_={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,r){console&&console[t]&&console[t].apply(console,r)}},T_=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};$r(this,e),this.init(t,r)}return Cr(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=r||O_,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(r){this.debug=r}},{key:"log",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"log","",!0)}},{key:"warn",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"warn","",!0)}},{key:"error",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"error","")}},{key:"deprecate",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(r,n,o,i){return i&&!this.debug?null:(typeof r[0]=="string"&&(r[0]="".concat(o).concat(this.prefix," ").concat(r[0])),this.logger[n](r))}},{key:"create",value:function(r){return new e(this.logger,lp(lp({},{prefix:"".concat(this.prefix,":").concat(r,":")}),this.options))}},{key:"clone",value:function(r){return r=r||this.options,r.prefix=r.prefix||this.prefix,new e(this.logger,r)}}]),e}(),Or=new T_,pn=function(){function e(){$r(this,e),this.observers={}}return Cr(e,[{key:"on",value:function(r,n){var o=this;return r.split(" ").forEach(function(i){o.observers[i]=o.observers[i]||[],o.observers[i].push(n)}),this}},{key:"off",value:function(r,n){if(this.observers[r]){if(!n){delete this.observers[r];return}this.observers[r]=this.observers[r].filter(function(o){return o!==n})}}},{key:"emit",value:function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];if(this.observers[r]){var a=[].concat(this.observers[r]);a.forEach(function(l){l.apply(void 0,o)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(l){l.apply(l,[r].concat(o))})}}}]),e}();function wi(){var e,t,r=new Promise(function(n,o){e=n,t=o});return r.resolve=e,r.reject=t,r}function cp(e){return e==null?"":""+e}function I_(e,t,r){e.forEach(function(n){t[n]&&(r[n]=t[n])})}function Hl(e,t,r){function n(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function o(){return!e||typeof e=="string"}for(var i=typeof t!="string"?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!e[a]&&r&&(e[a]=new r),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={}}return o()?{}:{obj:e,k:n(i.shift())}}function up(e,t,r){var n=Hl(e,t,Object),o=n.obj,i=n.k;o[i]=r}function P_(e,t,r,n){var o=Hl(e,t,Object),i=o.obj,a=o.k;i[a]=i[a]||[],n&&(i[a]=i[a].concat(r)),n||i[a].push(r)}function Aa(e,t){var r=Hl(e,t),n=r.obj,o=r.k;if(n)return n[o]}function fp(e,t,r){var n=Aa(e,r);return n!==void 0?n:Aa(t,r)}function dp(e,t,r){for(var n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?typeof e[n]=="string"||e[n]instanceof String||typeof t[n]=="string"||t[n]instanceof String?r&&(e[n]=t[n]):dp(e[n],t[n],r):e[n]=t[n]);return e}function fo(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var k_={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function N_(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return k_[t]}):e}var Oa=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,D_=[" ",",","?","!",";"];function L_(e,t,r){t=t||"",r=r||"";var n=D_.filter(function(s){return t.indexOf(s)<0&&r.indexOf(s)<0});if(n.length===0)return!0;var o=new RegExp("(".concat(n.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(r);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}function pp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ta(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pp(Object(r),!0).forEach(function(n){dn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M_(e){var t=F_();return function(){var n=Ar(e),o;if(t){var i=Ar(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return yi(this,o)}}function F_(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function hp(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var n=t.split(r),o=e,i=0;i<n.length;++i){if(!o||typeof o[n[i]]=="string"&&i+1<n.length)return;if(o[n[i]]===void 0){for(var a=2,s=n.slice(i,i+a).join(r),l=o[s];l===void 0&&n.length>i+a;)a++,s=n.slice(i,i+a).join(r),l=o[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}var u=n.slice(i+a).join(r);return u?hp(l,u,r):void 0}o=o[n[i]]}return o}}var j_=function(e){Ca(r,e);var t=M_(r);function r(n){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return $r(this,r),o=t.call(this),Oa&&pn.call(fn(o)),o.data=n||{},o.options=i,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.options.ignoreJSONStructure===void 0&&(o.options.ignoreJSONStructure=!0),o}return Cr(r,[{key:"addNamespaces",value:function(o){this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}},{key:"removeNamespaces",value:function(o){var i=this.options.ns.indexOf(o);i>-1&&this.options.ns.splice(i,1)}},{key:"getResource",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,f=[o,i];a&&typeof a!="string"&&(f=f.concat(a)),a&&typeof a=="string"&&(f=f.concat(l?a.split(l):a)),o.indexOf(".")>-1&&(f=o.split("."));var d=Aa(this.data,f);return d||!u||typeof a!="string"?d:hp(this.data&&this.data[o]&&this.data[o][i],a,l)}},{key:"addResource",value:function(o,i,a,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var f=[o,i];a&&(f=f.concat(u?a.split(u):a)),o.indexOf(".")>-1&&(f=o.split("."),s=i,i=f[1]),this.addNamespaces(i),up(this.data,f,s),l.silent||this.emit("added",o,i,a,s)}},{key:"addResources",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in a)(typeof a[l]=="string"||Object.prototype.toString.apply(a[l])==="[object Array]")&&this.addResource(o,i,l,a[l],{silent:!0});s.silent||this.emit("added",o,i,a)}},{key:"addResourceBundle",value:function(o,i,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},f=[o,i];o.indexOf(".")>-1&&(f=o.split("."),s=a,a=i,i=f[1]),this.addNamespaces(i);var d=Aa(this.data,f)||{};s?dp(d,a,l):d=Ta(Ta({},d),a),up(this.data,f,d),u.silent||this.emit("added",o,i,a)}},{key:"removeResourceBundle",value:function(o,i){this.hasResourceBundle(o,i)&&delete this.data[o][i],this.removeNamespaces(i),this.emit("removed",o,i)}},{key:"hasResourceBundle",value:function(o,i){return this.getResource(o,i)!==void 0}},{key:"getResourceBundle",value:function(o,i){return i||(i=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Ta(Ta({},{}),this.getResource(o,i)):this.getResource(o,i)}},{key:"getDataByLanguage",value:function(o){return this.data[o]}},{key:"hasLanguageSomeTranslations",value:function(o){var i=this.getDataByLanguage(o),a=i&&Object.keys(i)||[];return!!a.find(function(s){return i[s]&&Object.keys(i[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),r}(pn),gp={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,r,n,o,i){var a=this;return t.forEach(function(s){a.processors[s]&&(r=a.processors[s].process(r,n,o,i))}),r}};function vp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ht(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vp(Object(r),!0).forEach(function(n){dn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B_(e){var t=R_();return function(){var n=Ar(e),o;if(t){var i=Ar(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return yi(this,o)}}function R_(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var mp={},bp=function(e){Ca(r,e);var t=B_(r);function r(n){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return $r(this,r),o=t.call(this),Oa&&pn.call(fn(o)),I_(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,fn(o)),o.options=i,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.logger=Or.create("translator"),o}return Cr(r,[{key:"changeLanguage",value:function(o){o&&(this.language=o)}},{key:"exists",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(o==null)return!1;var a=this.resolve(o,i);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(o,i){var a=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,l=i.ns||this.options.defaultNS||[],u=a&&o.indexOf(a)>-1,f=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!L_(o,a,s);if(u&&!f){var d=o.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:o,namespaces:l};var p=o.split(a);(a!==s||a===s&&this.options.ns.indexOf(p[0])>-1)&&(l=p.shift()),o=p.join(s)}return typeof l=="string"&&(l=[l]),{key:o,namespaces:l}}},{key:"translate",value:function(o,i,a){var s=this;if(pr(i)!=="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),i||(i={}),o==null)return"";Array.isArray(o)||(o=[String(o)]);var l=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,u=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,f=this.extractFromKey(o[o.length-1],i),d=f.key,p=f.namespaces,h=p[p.length-1],g=i.lng||this.language,v=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(g&&g.toLowerCase()==="cimode"){if(v){var b=i.nsSeparator||this.options.nsSeparator;return l?(m.res="".concat(h).concat(b).concat(d),m):"".concat(h).concat(b).concat(d)}return l?(m.res=d,m):d}var m=this.resolve(o,i),w=m&&m.res,E=m&&m.usedKey||d,x=m&&m.exactUsedKey||d,k=Object.prototype.toString.apply(w),I=["[object Number]","[object Function]","[object RegExp]"],S=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,C=!this.i18nFormat||this.i18nFormat.handleAsObject,P=typeof w!="string"&&typeof w!="boolean"&&typeof w!="number";if(C&&w&&P&&I.indexOf(k)<0&&!(typeof S=="string"&&k==="[object Array]")){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var F=this.options.returnedObjectHandler?this.options.returnedObjectHandler(E,w,Ht(Ht({},i),{},{ns:p})):"key '".concat(d," (").concat(this.language,")' returned an object instead of string.");return l?(m.res=F,m):F}if(u){var D=k==="[object Array]",N=D?[]:{},J=D?x:E;for(var G in w)if(Object.prototype.hasOwnProperty.call(w,G)){var Y="".concat(J).concat(u).concat(G);N[G]=this.translate(Y,Ht(Ht({},i),{joinArrays:!1,ns:p})),N[G]===Y&&(N[G]=w[G])}w=N}}else if(C&&typeof S=="string"&&k==="[object Array]")w=w.join(S),w&&(w=this.extendTranslation(w,o,i,a));else{var te=!1,oe=!1,le=i.count!==void 0&&typeof i.count!="string",ae=r.hasDefaultValue(i),ge=le?this.pluralResolver.getSuffix(g,i.count,i):"",ce=i["defaultValue".concat(ge)]||i.defaultValue;!this.isValidLookup(w)&&ae&&(te=!0,w=ce),this.isValidLookup(w)||(oe=!0,w=d);var K=i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,q=K&&oe?void 0:w,re=ae&&ce!==w&&this.options.updateMissing;if(oe||te||re){if(this.logger.log(re?"updateKey":"missingKey",g,h,d,re?ce:w),u){var de=this.resolve(d,Ht(Ht({},i),{},{keySeparator:!1}));de&&de.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var U=[],H=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&H&&H[0])for(var M=0;M<H.length;M++)U.push(H[M]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(i.lng||this.language):U.push(i.lng||this.language);var R=function(O,T,Z){var ne=ae&&Z!==w?Z:q;s.options.missingKeyHandler?s.options.missingKeyHandler(O,h,T,ne,re,i):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(O,h,T,ne,re,i),s.emit("missingKey",O,h,T,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&le?U.forEach(function(z){s.pluralResolver.getSuffixes(z,i).forEach(function(O){R([z],d+O,i["defaultValue".concat(O)]||ce)})}):R(U,d,ce))}w=this.extendTranslation(w,o,i,m,a),oe&&w===d&&this.options.appendNamespaceToMissingKey&&(w="".concat(h,":").concat(d)),(oe||te)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(h,":").concat(d):d,te?w:void 0):w=this.options.parseMissingKeyHandler(w))}return l?(m.res=w,m):w}},{key:"extendTranslation",value:function(o,i,a,s,l){var u=this;if(this.i18nFormat&&this.i18nFormat.parse)o=this.i18nFormat.parse(o,Ht(Ht({},this.options.interpolation.defaultVariables),a),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init(Ht(Ht({},a),{interpolation:Ht(Ht({},this.options.interpolation),a.interpolation)}));var f=typeof o=="string"&&(a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),d;if(f){var p=o.match(this.interpolator.nestingRegexp);d=p&&p.length}var h=a.replace&&typeof a.replace!="string"?a.replace:a;if(this.options.interpolation.defaultVariables&&(h=Ht(Ht({},this.options.interpolation.defaultVariables),h)),o=this.interpolator.interpolate(o,h,a.lng||this.language,a),f){var g=o.match(this.interpolator.nestingRegexp),v=g&&g.length;d<v&&(a.nest=!1)}a.nest!==!1&&(o=this.interpolator.nest(o,function(){for(var w=arguments.length,E=new Array(w),x=0;x<w;x++)E[x]=arguments[x];return l&&l[0]===E[0]&&!a.context?(u.logger.warn("It seems you are nesting recursively key: ".concat(E[0]," in key: ").concat(i[0])),null):u.translate.apply(u,E.concat([i]))},a)),a.interpolation&&this.interpolator.reset()}var b=a.postProcess||this.options.postProcess,m=typeof b=="string"?[b]:b;return o!=null&&m&&m.length&&a.applyPostProcessor!==!1&&(o=gp.handle(m,o,i,this.options&&this.options.postProcessPassResolved?Ht({i18nResolved:s},a):a,this)),o}},{key:"resolve",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,u,f,d;return typeof o=="string"&&(o=[o]),o.forEach(function(p){if(!i.isValidLookup(s)){var h=i.extractFromKey(p,a),g=h.key;l=g;var v=h.namespaces;i.options.fallbackNS&&(v=v.concat(i.options.fallbackNS));var b=a.count!==void 0&&typeof a.count!="string",m=b&&!a.ordinal&&a.count===0&&i.pluralResolver.shouldUseIntlApi(),w=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",E=a.lngs?a.lngs:i.languageUtils.toResolveHierarchy(a.lng||i.language,a.fallbackLng);v.forEach(function(x){i.isValidLookup(s)||(d=x,!mp["".concat(E[0],"-").concat(x)]&&i.utils&&i.utils.hasLoadedNamespace&&!i.utils.hasLoadedNamespace(d)&&(mp["".concat(E[0],"-").concat(x)]=!0,i.logger.warn('key "'.concat(l,'" for languages "').concat(E.join(", "),`" won't get resolved as namespace "`).concat(d,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(function(k){if(!i.isValidLookup(s)){f=k;var I=[g];if(i.i18nFormat&&i.i18nFormat.addLookupKeys)i.i18nFormat.addLookupKeys(I,g,k,x,a);else{var S;b&&(S=i.pluralResolver.getSuffix(k,a.count,a));var C="".concat(i.options.pluralSeparator,"zero");if(b&&(I.push(g+S),m&&I.push(g+C)),w){var P="".concat(g).concat(i.options.contextSeparator).concat(a.context);I.push(P),b&&(I.push(P+S),m&&I.push(P+C))}}for(var F;F=I.pop();)i.isValidLookup(s)||(u=F,s=i.getResource(k,x,F,a))}}))})}}),{res:s,usedKey:l,exactUsedKey:u,usedLng:f,usedNS:d}}},{key:"isValidLookup",value:function(o){return o!==void 0&&!(!this.options.returnNull&&o===null)&&!(!this.options.returnEmptyString&&o==="")}},{key:"getResource",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(o,i,a,s):this.resourceStore.getResource(o,i,a,s)}}],[{key:"hasDefaultValue",value:function(o){var i="defaultValue";for(var a in o)if(Object.prototype.hasOwnProperty.call(o,a)&&i===a.substring(0,i.length)&&o[a]!==void 0)return!0;return!1}}]),r}(pn);function zl(e){return e.charAt(0).toUpperCase()+e.slice(1)}var U_=function(){function e(t){$r(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Or.create("languageUtils")}return Cr(e,[{key:"getScriptPartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return null;var n=r.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}},{key:"getLanguagePartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return r;var n=r.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function(r){if(typeof r=="string"&&r.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],o=r.split("-");return this.options.lowerCaseLng?o=o.map(function(i){return i.toLowerCase()}):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),n.indexOf(o[1].toLowerCase())>-1&&(o[1]=zl(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),n.indexOf(o[1].toLowerCase())>-1&&(o[1]=zl(o[1].toLowerCase())),n.indexOf(o[2].toLowerCase())>-1&&(o[2]=zl(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?r.toLowerCase():r}},{key:"isSupportedCode",value:function(r){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(r=this.getLanguagePartFromCode(r)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(r)>-1}},{key:"getBestMatchFromCodes",value:function(r){var n=this;if(!r)return null;var o;return r.forEach(function(i){if(!o){var a=n.formatLanguageCode(i);(!n.options.supportedLngs||n.isSupportedCode(a))&&(o=a)}}),!o&&this.options.supportedLngs&&r.forEach(function(i){if(!o){var a=n.getLanguagePartFromCode(i);if(n.isSupportedCode(a))return o=a;o=n.options.supportedLngs.find(function(s){if(s.indexOf(a)===0)return s})}}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}},{key:"getFallbackCodes",value:function(r,n){if(!r)return[];if(typeof r=="function"&&(r=r(n)),typeof r=="string"&&(r=[r]),Object.prototype.toString.apply(r)==="[object Array]")return r;if(!n)return r.default||[];var o=r[n];return o||(o=r[this.getScriptPartFromCode(n)]),o||(o=r[this.formatLanguageCode(n)]),o||(o=r[this.getLanguagePartFromCode(n)]),o||(o=r.default),o||[]}},{key:"toResolveHierarchy",value:function(r,n){var o=this,i=this.getFallbackCodes(n||this.options.fallbackLng||[],r),a=[],s=function(u){u&&(o.isSupportedCode(u)?a.push(u):o.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof r=="string"&&r.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(r)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(r)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(r))):typeof r=="string"&&s(this.formatLanguageCode(r)),i.forEach(function(l){a.indexOf(l)<0&&s(o.formatLanguageCode(l))}),a}}]),e}(),W_=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],V_={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}},H_=["v1","v2","v3"],yp={zero:0,one:1,two:2,few:3,many:4,other:5};function z_(){var e={};return W_.forEach(function(t){t.lngs.forEach(function(r){e[r]={numbers:t.nr,plurals:V_[t.fc]}})}),e}var G_=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};$r(this,e),this.languageUtils=t,this.options=r,this.logger=Or.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=z_()}return Cr(e,[{key:"addRule",value:function(r,n){this.rules[r]=n}},{key:"getRule",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(r,{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[r]||this.rules[this.languageUtils.getLanguagePartFromCode(r)]}},{key:"needsPlural",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(r,n);return this.shouldUseIntlApi()?o&&o.resolvedOptions().pluralCategories.length>1:o&&o.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(r,o).map(function(i){return"".concat(n).concat(i)})}},{key:"getSuffixes",value:function(r){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(r,o);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort(function(a,s){return yp[a]-yp[s]}).map(function(a){return"".concat(n.options.prepend).concat(a)}):i.numbers.map(function(a){return n.getSuffix(r,a,o)}):[]}},{key:"getSuffix",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=this.getRule(r,o);return i?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(i.select(n)):this.getSuffixRetroCompatible(i,n):(this.logger.warn("no plural rule found for: ".concat(r)),"")}},{key:"getSuffixRetroCompatible",value:function(r,n){var o=this,i=r.noAbs?r.plurals(n):r.plurals(Math.abs(n)),a=r.numbers[i];this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var s=function(){return o.options.prepend&&a.toString()?o.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1?s():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}},{key:"shouldUseIntlApi",value:function(){return!H_.includes(this.options.compatibilityJSON)}}]),e}();function wp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function hr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wp(Object(r),!0).forEach(function(n){dn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var K_=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$r(this,e),this.logger=Or.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(r){return r},this.init(t)}return Cr(e,[{key:"init",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r.interpolation||(r.interpolation={escapeValue:!0});var n=r.interpolation;this.escape=n.escape!==void 0?n.escape:N_,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?fo(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?fo(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?fo(n.nestingPrefix):n.nestingPrefixEscaped||fo("$t("),this.nestingSuffix=n.nestingSuffix?fo(n.nestingSuffix):n.nestingSuffixEscaped||fo(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var r="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(r,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var o="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(o,"g")}},{key:"interpolate",value:function(r,n,o,i){var a=this,s,l,u,f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(b){return b.replace(/\$/g,"$$$$")}var p=function(m){if(m.indexOf(a.formatSeparator)<0){var w=fp(n,f,m);return a.alwaysFormat?a.format(w,void 0,o,hr(hr(hr({},i),n),{},{interpolationkey:m})):w}var E=m.split(a.formatSeparator),x=E.shift().trim(),k=E.join(a.formatSeparator).trim();return a.format(fp(n,f,x),k,o,hr(hr(hr({},i),n),{},{interpolationkey:x}))};this.resetRegExp();var h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,g=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,v=[{regex:this.regexpUnescape,safeValue:function(m){return d(m)}},{regex:this.regexp,safeValue:function(m){return a.escapeValue?d(a.escape(m)):d(m)}}];return v.forEach(function(b){for(u=0;s=b.regex.exec(r);){var m=s[1].trim();if(l=p(m),l===void 0)if(typeof h=="function"){var w=h(r,s,i);l=typeof w=="string"?w:""}else if(i&&i.hasOwnProperty(m))l="";else if(g){l=s[0];continue}else a.logger.warn("missed to pass in variable ".concat(m," for interpolating ").concat(r)),l="";else typeof l!="string"&&!a.useRawValueToEscape&&(l=cp(l));var E=b.safeValue(l);if(r=r.replace(s[0],E),g?(b.regex.lastIndex+=l.length,b.regex.lastIndex-=s[0].length):b.regex.lastIndex=0,u++,u>=a.maxReplaces)break}}),r}},{key:"nest",value:function(r,n){var o=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,l=hr({},i);l.applyPostProcessor=!1,delete l.defaultValue;function u(h,g){var v=this.nestingOptionsSeparator;if(h.indexOf(v)<0)return h;var b=h.split(new RegExp("".concat(v,"[ ]*{"))),m="{".concat(b[1]);h=b[0],m=this.interpolate(m,l);var w=m.match(/'/g),E=m.match(/"/g);(w&&w.length%2===0&&!E||E.length%2!==0)&&(m=m.replace(/'/g,'"'));try{l=JSON.parse(m),g&&(l=hr(hr({},g),l))}catch(x){return this.logger.warn("failed parsing options string in nesting for key ".concat(h),x),"".concat(h).concat(v).concat(m)}return delete l.defaultValue,h}for(;a=this.nestingRegexp.exec(r);){var f=[],d=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var p=a[1].split(this.formatSeparator).map(function(h){return h.trim()});a[1]=p.shift(),f=p,d=!0}if(s=n(u.call(this,a[1].trim(),l),l),s&&a[0]===r&&typeof s!="string")return s;typeof s!="string"&&(s=cp(s)),s||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(r)),s=""),d&&(s=f.reduce(function(h,g){return o.format(h,g,i.lng,hr(hr({},i),{},{interpolationkey:a[1].trim()}))},s.trim())),r=r.replace(a[0],s),this.regexp.lastIndex=0}return r}}]),e}();function _p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function hn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_p(Object(r),!0).forEach(function(n){dn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_p(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function q_(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var o=n[1].substring(0,n[1].length-1);if(t==="currency"&&o.indexOf(":")<0)r.currency||(r.currency=o.trim());else if(t==="relativetime"&&o.indexOf(":")<0)r.range||(r.range=o.trim());else{var i=o.split(";");i.forEach(function(a){if(a){var s=a.split(":"),l=A_(s),u=l[0],f=l.slice(1),d=f.join(":").trim().replace(/^'+|'+$/g,"");r[u.trim()]||(r[u.trim()]=d),d==="false"&&(r[u.trim()]=!1),d==="true"&&(r[u.trim()]=!0),isNaN(d)||(r[u.trim()]=parseInt(d,10))}})}}return{formatName:t,formatOptions:r}}function po(e){var t={};return function(n,o,i){var a=o+JSON.stringify(i),s=t[a];return s||(s=e(o,i),t[a]=s),s(n)}}var Y_=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$r(this,e),this.logger=Or.create("formatter"),this.options=t,this.formats={number:po(function(r,n){var o=new Intl.NumberFormat(r,n);return function(i){return o.format(i)}}),currency:po(function(r,n){var o=new Intl.NumberFormat(r,hn(hn({},n),{},{style:"currency"}));return function(i){return o.format(i)}}),datetime:po(function(r,n){var o=new Intl.DateTimeFormat(r,hn({},n));return function(i){return o.format(i)}}),relativetime:po(function(r,n){var o=new Intl.RelativeTimeFormat(r,hn({},n));return function(i){return o.format(i,n.range||"day")}}),list:po(function(r,n){var o=new Intl.ListFormat(r,hn({},n));return function(i){return o.format(i)}})},this.init(t)}return Cr(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},o=n.interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}},{key:"add",value:function(r,n){this.formats[r.toLowerCase().trim()]=n}},{key:"addCached",value:function(r,n){this.formats[r.toLowerCase().trim()]=po(n)}},{key:"format",value:function(r,n,o,i){var a=this,s=n.split(this.formatSeparator),l=s.reduce(function(u,f){var d=q_(f),p=d.formatName,h=d.formatOptions;if(a.formats[p]){var g=u;try{var v=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},b=v.locale||v.lng||i.locale||i.lng||o;g=a.formats[p](u,b,hn(hn(hn({},h),i),v))}catch(m){a.logger.warn(m)}return g}else a.logger.warn("there was no format function for ".concat(p));return u},r);return l}}]),e}();function Ep(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function xp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ep(Object(r),!0).forEach(function(n){dn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ep(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function J_(e){var t=X_();return function(){var n=Ar(e),o;if(t){var i=Ar(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return yi(this,o)}}function X_(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Z_(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var Q_=function(e){Ca(r,e);var t=J_(r);function r(n,o,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return $r(this,r),a=t.call(this),Oa&&pn.call(fn(a)),a.backend=n,a.store=o,a.services=i,a.languageUtils=i.languageUtils,a.options=s,a.logger=Or.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=s.maxParallelReads||10,a.readingCalls=0,a.maxRetries=s.maxRetries>=0?s.maxRetries:5,a.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(i,s.backend,s),a}return Cr(r,[{key:"queueLoad",value:function(o,i,a,s){var l=this,u={},f={},d={},p={};return o.forEach(function(h){var g=!0;i.forEach(function(v){var b="".concat(h,"|").concat(v);!a.reload&&l.store.hasResourceBundle(h,v)?l.state[b]=2:l.state[b]<0||(l.state[b]===1?f[b]===void 0&&(f[b]=!0):(l.state[b]=1,g=!1,f[b]===void 0&&(f[b]=!0),u[b]===void 0&&(u[b]=!0),p[v]===void 0&&(p[v]=!0)))}),g||(d[h]=!0)}),(Object.keys(u).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(f),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(p)}}},{key:"loaded",value:function(o,i,a){var s=o.split("|"),l=s[0],u=s[1];i&&this.emit("failedLoading",l,u,i),a&&this.store.addResourceBundle(l,u,a),this.state[o]=i?-1:2;var f={};this.queue.forEach(function(d){P_(d.loaded,[l],u),Z_(d,o),i&&d.errors.push(i),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(function(p){f[p]||(f[p]={});var h=d.loaded[p];h.length&&h.forEach(function(g){f[p][g]===void 0&&(f[p][g]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",f),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(o,i,a){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,f=arguments.length>5?arguments[5]:void 0;if(!o.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:o,ns:i,fcName:a,tried:l,wait:u,callback:f});return}return this.readingCalls++,this.backend[a](o,i,function(d,p){if(s.readingCalls--,s.waitingReads.length>0){var h=s.waitingReads.shift();s.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(d&&p&&l<s.maxRetries){setTimeout(function(){s.read.call(s,o,i,a,l+1,u*2,f)},u);return}f(d,p)})}},{key:"prepareLoading",value:function(o,i){var a=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof o=="string"&&(o=this.languageUtils.toResolveHierarchy(o)),typeof i=="string"&&(i=[i]);var u=this.queueLoad(o,i,s,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(f){a.loadOne(f)})}},{key:"load",value:function(o,i,a){this.prepareLoading(o,i,{},a)}},{key:"reload",value:function(o,i,a){this.prepareLoading(o,i,{reload:!0},a)}},{key:"loadOne",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=o.split("|"),l=s[0],u=s[1];this.read(l,u,"read",void 0,void 0,function(f,d){f&&i.logger.warn("".concat(a,"loading namespace ").concat(u," for language ").concat(l," failed"),f),!f&&d&&i.logger.log("".concat(a,"loaded namespace ").concat(u," for language ").concat(l),d),i.loaded(o,f,d)})}},{key:"saveMissing",value:function(o,i,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(i)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}a==null||a===""||(this.backend&&this.backend.create&&this.backend.create(o,i,a,s,null,xp(xp({},u),{},{isUpdate:l})),!(!o||!o[0])&&this.store.addResource(o[0],i,a,s))}}]),r}(pn);function eE(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var r={};if(pr(t[1])==="object"&&(r=t[1]),typeof t[1]=="string"&&(r.defaultValue=t[1]),typeof t[2]=="string"&&(r.tDescription=t[2]),pr(t[2])==="object"||pr(t[3])==="object"){var n=t[3]||t[2];Object.keys(n).forEach(function(o){r[o]=n[o]})}return r},interpolation:{escapeValue:!0,format:function(t,r,n,o){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Sp(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function $p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$p(Object(r),!0).forEach(function(n){dn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$p(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tE(e){var t=rE();return function(){var n=Ar(e),o;if(t){var i=Ar(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return yi(this,o)}}function rE(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ia(){}function nE(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(r){typeof e[r]=="function"&&(e[r]=e[r].bind(e))})}var Pa=function(e){Ca(r,e);var t=tE(r);function r(){var n,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if($r(this,r),n=t.call(this),Oa&&pn.call(fn(n)),n.options=Sp(o),n.services={},n.logger=Or,n.modules={external:[]},nE(fn(n)),i&&!n.isInitialized&&!o.isClone){if(!n.options.initImmediate)return n.init(o,i),yi(n,fn(n));setTimeout(function(){n.init(o,i)},0)}return n}return Cr(r,[{key:"init",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof i=="function"&&(a=i,i={}),!i.defaultNS&&i.defaultNS!==!1&&i.ns&&(typeof i.ns=="string"?i.defaultNS=i.ns:i.ns.indexOf("translation")<0&&(i.defaultNS=i.ns[0]));var s=eE();this.options=Tr(Tr(Tr({},s),this.options),Sp(i)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Tr(Tr({},s.interpolation),this.options.interpolation)),i.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=i.keySeparator),i.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=i.nsSeparator);function l(m){return m?typeof m=="function"?new m:m:null}if(!this.options.isClone){this.modules.logger?Or.init(l(this.modules.logger),this.options):Or.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=Y_);var f=new U_(this.options);this.store=new j_(this.options.resources,this.options);var d=this.services;d.logger=Or,d.resourceStore=this.store,d.languageUtils=f,d.pluralResolver=new G_(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(d.formatter=l(u),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new K_(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new Q_(l(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(m){for(var w=arguments.length,E=new Array(w>1?w-1:0),x=1;x<w;x++)E[x-1]=arguments[x];o.emit.apply(o,[m].concat(E))}),this.modules.languageDetector&&(d.languageDetector=l(this.modules.languageDetector),d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=l(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new bp(this.services,this.options),this.translator.on("*",function(m){for(var w=arguments.length,E=new Array(w>1?w-1:0),x=1;x<w;x++)E[x-1]=arguments[x];o.emit.apply(o,[m].concat(E))}),this.modules.external.forEach(function(m){m.init&&m.init(o)})}if(this.format=this.options.interpolation.format,a||(a=Ia),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var h=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];h.forEach(function(m){o[m]=function(){var w;return(w=o.store)[m].apply(w,arguments)}});var g=["addResource","addResources","addResourceBundle","removeResourceBundle"];g.forEach(function(m){o[m]=function(){var w;return(w=o.store)[m].apply(w,arguments),o}});var v=wi(),b=function(){var w=function(x,k){o.isInitialized&&!o.initializedStoreOnce&&o.logger.warn("init: i18next is already initialized. You should call init just once!"),o.isInitialized=!0,o.options.isClone||o.logger.log("initialized",o.options),o.emit("initialized",o.options),v.resolve(k),a(x,k)};if(o.languages&&o.options.compatibilityAPI!=="v1"&&!o.isInitialized)return w(null,o.t.bind(o));o.changeLanguage(o.options.lng,w)};return this.options.resources||!this.options.initImmediate?b():setTimeout(b,0),v}},{key:"loadResources",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ia,s=a,l=typeof o=="string"?o:this.language;if(typeof o=="function"&&(s=o),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var u=[],f=function(h){if(h){var g=i.services.languageUtils.toResolveHierarchy(h);g.forEach(function(v){u.indexOf(v)<0&&u.push(v)})}};if(l)f(l);else{var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.forEach(function(p){return f(p)})}this.options.preload&&this.options.preload.forEach(function(p){return f(p)}),this.services.backendConnector.load(u,this.options.ns,function(p){!p&&!i.resolvedLanguage&&i.language&&i.setResolvedLanguage(i.language),s(p)})}else s(null)}},{key:"reloadResources",value:function(o,i,a){var s=wi();return o||(o=this.languages),i||(i=this.options.ns),a||(a=Ia),this.services.backendConnector.reload(o,i,function(l){s.resolve(),a(l)}),s}},{key:"use",value:function(o){if(!o)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!o.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return o.type==="backend"&&(this.modules.backend=o),(o.type==="logger"||o.log&&o.warn&&o.error)&&(this.modules.logger=o),o.type==="languageDetector"&&(this.modules.languageDetector=o),o.type==="i18nFormat"&&(this.modules.i18nFormat=o),o.type==="postProcessor"&&gp.addPostProcessor(o),o.type==="formatter"&&(this.modules.formatter=o),o.type==="3rdParty"&&this.modules.external.push(o),this}},{key:"setResolvedLanguage",value:function(o){if(!(!o||!this.languages)&&!(["cimode","dev"].indexOf(o)>-1))for(var i=0;i<this.languages.length;i++){var a=this.languages[i];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(o,i){var a=this;this.isLanguageChangingTo=o;var s=wi();this.emit("languageChanging",o);var l=function(p){a.language=p,a.languages=a.services.languageUtils.toResolveHierarchy(p),a.resolvedLanguage=void 0,a.setResolvedLanguage(p)},u=function(p,h){h?(l(h),a.translator.changeLanguage(h),a.isLanguageChangingTo=void 0,a.emit("languageChanged",h),a.logger.log("languageChanged",h)):a.isLanguageChangingTo=void 0,s.resolve(function(){return a.t.apply(a,arguments)}),i&&i(p,function(){return a.t.apply(a,arguments)})},f=function(p){!o&&!p&&a.services.languageDetector&&(p=[]);var h=typeof p=="string"?p:a.services.languageUtils.getBestMatchFromCodes(p);h&&(a.language||l(h),a.translator.language||a.translator.changeLanguage(h),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage(h)),a.loadResources(h,function(g){u(g,h)})};return!o&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!o&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(f):f(o),s}},{key:"getFixedT",value:function(o,i,a){var s=this,l=function u(f,d){var p;if(pr(d)!=="object"){for(var h=arguments.length,g=new Array(h>2?h-2:0),v=2;v<h;v++)g[v-2]=arguments[v];p=s.options.overloadTranslationOptionHandler([f,d].concat(g))}else p=Tr({},d);p.lng=p.lng||u.lng,p.lngs=p.lngs||u.lngs,p.ns=p.ns||u.ns,p.keyPrefix=p.keyPrefix||a||u.keyPrefix;var b=s.options.keySeparator||".",m=p.keyPrefix?"".concat(p.keyPrefix).concat(b).concat(f):f;return s.t(m,p)};return typeof o=="string"?l.lng=o:l.lngs=o,l.ns=i,l.keyPrefix=a,l}},{key:"t",value:function(){var o;return this.translator&&(o=this.translator).translate.apply(o,arguments)}},{key:"exists",value:function(){var o;return this.translator&&(o=this.translator).exists.apply(o,arguments)}},{key:"setDefaultNamespace",value:function(o){this.options.defaultNS=o}},{key:"hasLoadedNamespace",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var f=function(h,g){var v=i.services.backendConnector.state["".concat(h,"|").concat(g)];return v===-1||v===2};if(a.precheck){var d=a.precheck(this,f);if(d!==void 0)return d}return!!(this.hasResourceBundle(s,o)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(s,o)&&(!l||f(u,o)))}},{key:"loadNamespaces",value:function(o,i){var a=this,s=wi();return this.options.ns?(typeof o=="string"&&(o=[o]),o.forEach(function(l){a.options.ns.indexOf(l)<0&&a.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),i&&i(l)}),s):(i&&i(),Promise.resolve())}},{key:"loadLanguages",value:function(o,i){var a=wi();typeof o=="string"&&(o=[o]);var s=this.options.preload||[],l=o.filter(function(u){return s.indexOf(u)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(u){a.resolve(),i&&i(u)}),a):(i&&i(),Promise.resolve())}},{key:"dir",value:function(o){if(o||(o=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!o)return"rtl";var i=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];return i.indexOf(this.services.languageUtils.getLanguagePartFromCode(o))>-1||o.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ia,s=Tr(Tr(Tr({},this.options),i),{isClone:!0}),l=new r(s);(i.debug!==void 0||i.prefix!==void 0)&&(l.logger=l.logger.clone(i));var u=["store","services","language"];return u.forEach(function(f){l[f]=o[f]}),l.services=Tr({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new bp(l.services,l.options),l.translator.on("*",function(f){for(var d=arguments.length,p=new Array(d>1?d-1:0),h=1;h<d;h++)p[h-1]=arguments[h];l.emit.apply(l,[f].concat(p))}),l.init(s,a),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),r}(pn);dn(Pa,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new Pa(e,t)});var jt=Pa.createInstance();jt.createInstance=Pa.createInstance,jt.createInstance,jt.init,jt.loadResources,jt.reloadResources,jt.use,jt.changeLanguage,jt.getFixedT,jt.t,jt.exists,jt.setDefaultNamespace,jt.hasLoadedNamespace,jt.loadNamespaces,jt.loadLanguages;function be(){return be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},be.apply(this,arguments)}function oE(e,t){const r=c.createContext(t);function n(i){const{children:a,...s}=i,l=c.useMemo(()=>s,Object.values(s));return c.createElement(r.Provider,{value:l},a)}function o(i){const a=c.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,o]}function gn(e,t=[]){let r=[];function n(i,a){const s=c.createContext(a),l=r.length;r=[...r,a];function u(d){const{scope:p,children:h,...g}=d,v=(p==null?void 0:p[e][l])||s,b=c.useMemo(()=>g,Object.values(g));return c.createElement(v.Provider,{value:b},h)}function f(d,p){const h=(p==null?void 0:p[e][l])||s,g=c.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=r.map(a=>c.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,iE(o,...t)]}function iE(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function zt(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}const Ir=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{};function aE(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Cp(...e){return t=>e.forEach(r=>aE(r,t))}function At(...e){return c.useCallback(Cp(...e),e)}const Gl=c.forwardRef((e,t)=>{const{children:r,...n}=e,o=c.Children.toArray(r),i=o.find(sE);if(i){const a=i.props.children,s=o.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(Kl,be({},n,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(Kl,be({},n,{ref:t}),r)});Gl.displayName="Slot";const Kl=c.forwardRef((e,t)=>{const{children:r,...n}=e;return c.isValidElement(r)?c.cloneElement(r,{...lE(n,r.props),ref:Cp(t,r.ref)}):c.Children.count(r)>1?c.Children.only(null):null});Kl.displayName="SlotClone";const ql=({children:e})=>c.createElement(c.Fragment,null,e);function sE(e){return c.isValidElement(e)&&e.type===ql}function lE(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const ft=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=c.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?Gl:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,be({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function cE(e,t){e&&ln.flushSync(()=>e.dispatchEvent(t))}const Ap="Avatar",[uE,Pj]=gn(Ap),[fE,dE]=uE(Ap),pE=c.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[o,i]=c.useState("idle");return c.createElement(fE,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:i},c.createElement(ft.span,be({},n,{ref:t})))}),hE="AvatarFallback",gE=c.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...o}=e,i=dE(hE,r),[a,s]=c.useState(n===void 0);return c.useEffect(()=>{if(n!==void 0){const l=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(l)}},[n]),a&&i.imageLoadingStatus!=="loaded"?c.createElement(ft.span,be({},o,{ref:t})):null}),vE=pE,Op=gE;function ho(e,t){const r=c.createContext(t);function n(i){const{children:a,...s}=i,l=c.useMemo(()=>s,Object.values(s));return c.createElement(r.Provider,{value:l},a)}function o(i){const a=c.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,o]}function Pr(e,t=[]){let r=[];function n(i,a){const s=c.createContext(a),l=r.length;r=[...r,a];function u(d){const{scope:p,children:h,...g}=d,v=(p==null?void 0:p[e][l])||s,b=c.useMemo(()=>g,Object.values(g));return c.createElement(v.Provider,{value:b},h)}function f(d,p){const h=(p==null?void 0:p[e][l])||s,g=c.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=r.map(a=>c.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,mE(o,...t)]}function mE(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function _i(e,t,r){return parseInt(e.substr(t,r),16)}function Tp(e){return e|=0,e<0?"00":e<16?"0"+e.toString(16):e<256?e.toString(16):"ff"}function Yl(e,t,r){return r=r<0?r+6:r>6?r-6:r,Tp(255*(r<1?e+(t-e)*r:r<3?t:r<4?e+(t-e)*(4-r):e))}function bE(e){if(/^#[0-9a-f]{3,8}$/i.test(e)){let t;const r=e.length;if(r<6){const n=e[1],o=e[2],i=e[3],a=e[4]||"";t="#"+n+n+o+o+i+i+a+a}return(r==7||r>8)&&(t=e),t}}function yE(e,t,r){let n;if(t==0){const o=Tp(r*255);n=o+o+o}else{const o=r<=.5?r*(t+1):r+t-r*t,i=r*2-o;n=Yl(i,o,e*6+2)+Yl(i,o,e*6)+Yl(i,o,e*6-2)}return"#"+n}function Ei(e,t,r){const n=[.55,.5,.5,.46,.6,.55,.55],o=n[e*6+.5|0];return r=r<.5?r*o*2:o+(r-.5)*(1-o)*2,yE(e,t,r)}const wE=typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:{},Ip={V:"jdenticon_config",n:"config"};var _E={};function EE(e,t){const r=typeof e=="object"&&e||_E[Ip.n]||wE[Ip.V]||{},n=r.lightness||{},o=r.saturation||{},i="color"in o?o.color:o,a=o.grayscale,s=r.backColor,l=r.padding;function u(d,p){let h=n[d];return h&&h.length>1||(h=p),function(g){return g=h[0]+g*(h[1]-h[0]),g<0?0:g>1?1:g}}function f(d){const p=r.hues;let h;return p&&p.length>0&&(h=p[0|.999*d*p.length]),typeof h=="number"?(h/360%1+1)%1:d}return{W:f,o:typeof i=="number"?i:.5,D:typeof a=="number"?a:0,p:u("color",[.4,.8]),F:u("grayscale",[.3,.9]),G:bE(s),X:typeof e=="number"?e:typeof l=="number"?l:t}}class ka{constructor(t,r){this.x=t,this.y=r}}let Pp=class{constructor(t,r,n,o){this.q=t,this.t=r,this.H=n,this.Y=o}I(t,r,n,o){const i=this.q+this.H,a=this.t+this.H,s=this.Y;return s===1?new ka(i-r-(o||0),this.t+t):s===2?new ka(i-t-(n||0),a-r-(o||0)):s===3?new ka(this.q+r,a-t-(n||0)):new ka(this.q+t,this.t+r)}};const xE=new Pp(0,0,0,0);class SE{constructor(t){this.J=t,this.u=xE}g(t,r){const n=r?-2:2,o=[];for(let i=r?t.length-2:0;i<t.length&&i>=0;i+=n)o.push(this.u.I(t[i],t[i+1]));this.J.g(o)}h(t,r,n,o){const i=this.u.I(t,r,n,n);this.J.h(i,n,o)}i(t,r,n,o,i){this.g([t,r,t+n,r,t+n,r+o,t,r+o],i)}j(t,r,n,o,i,a){const s=[t+n,r,t+n,r+o,t,r+o,t,r];s.splice((i||0)%4*2,2),this.g(s,a)}K(t,r,n,o,i){this.g([t+n/2,r,t+n,r+o/2,t+n/2,r+o,t,r+o/2],i)}}function $E(e,t,r,n){e=e%14;let o,i,a,s,l,u;e?e==1?(a=0|r*.5,s=0|r*.8,t.j(r-a,0,a,s,2)):e==2?(a=0|r/3,t.i(a,a,r-a,r-a)):e==3?(l=r*.1,u=r<6?1:r<8?2:0|r*.25,l=l>1?0|l:l>.5?1:l,t.i(u,u,r-l-u,r-l-u)):e==4?(i=0|r*.15,a=0|r*.5,t.h(r-a-i,r-a-i,a)):e==5?(l=r*.1,u=l*4,u>3&&(u=0|u),t.i(0,0,r,r),t.g([u,u,r-l,u,u+(r-u-l)/2,r-l],!0)):e==6?t.g([0,0,r,0,r,r*.7,r*.4,r*.4,r*.7,r,0,r]):e==7?t.j(r/2,r/2,r/2,r/2,3):e==8?(t.i(0,0,r,r/2),t.i(0,r/2,r/2,r/2),t.j(r/2,r/2,r/2,r/2,1)):e==9?(l=r*.14,u=r<4?1:r<6?2:0|r*.35,l=r<8?l:0|l,t.i(0,0,r,r),t.i(u,u,r-u-l,r-u-l,!0)):e==10?(l=r*.12,u=l*3,t.i(0,0,r,r),t.h(u,u,r-l-u,!0)):e==11?t.j(r/2,r/2,r/2,r/2,3):e==12?(i=r*.25,t.i(0,0,r,r),t.K(i,i,r-i,r-i,!0)):!n&&(i=r*.4,a=r*1.2,t.h(i,i,a)):(o=r*.42,t.g([0,0,r,0,r,r-o*2,r-o,r,0,r]))}function kp(e,t,r){e=e%4;let n;e?e==1?t.j(0,r/2,r,r/2,0):e==2?t.K(0,0,r,r):(n=r/6,t.h(n,n,r-2*n)):t.j(0,0,r,r,0)}function CE(e,t){return e=t.W(e),[Ei(e,t.D,t.F(0)),Ei(e,t.o,t.p(.5)),Ei(e,t.D,t.F(1)),Ei(e,t.o,t.p(1)),Ei(e,t.o,t.p(0))]}function AE(e,t,r){const n=EE(r,.08);n.G&&e.m(n.G);let o=e.k;const i=.5+o*n.X|0;o-=i*2;const a=new SE(e),s=0|o/4,l=0|i+o/2-s*2,u=0|i+o/2-s*2;function f(b,m,w,E,x){const k=_i(t,w,1);let I=E?_i(t,E,1):0;e.L(p[h[b]]);for(let S=0;S<x.length;S++)a.u=new Pp(l+x[S][0]*s,u+x[S][1]*s,s,I++%4),m(k,a,s,S);e.M()}const d=_i(t,-7)/268435455,p=CE(d,n),h=[];let g;function v(b){if(b.indexOf(g)>=0){for(let m=0;m<b.length;m++)if(h.indexOf(b[m])>=0)return!0}}for(let b=0;b<3;b++)g=_i(t,8+b,1)%p.length,(v([0,4])||v([2,3]))&&(g=1),h.push(g);f(0,kp,2,3,[[1,0],[2,0],[2,3],[1,3],[0,1],[3,1],[3,2],[0,2]]),f(1,kp,4,5,[[0,0],[3,0],[3,3],[0,3]]),f(2,$E,1,null,[[1,1],[2,1],[2,2],[1,2]]),e.finish()}function OE(e){var n=0,o=0,i=encodeURI(e)+"%80",a=[],s,l=[],u=1732584193,f=4023233417,d=~u,p=~f,h=3285377520,g=[u,f,d,p,h],v=0,b="";function m(w,E){return w<<E|w>>>32-E}for(;n<i.length;o++)a[o>>2]=a[o>>2]|(i[n]=="%"?parseInt(i.substring(n+1,n+=3),16):i.charCodeAt(n++))<<(3-(o&3))*8;for(s=((o+7>>6)+1)*16,a[s-1]=o*8-8;v<s;v+=16){for(n=0;n<80;n++)o=m(u,5)+h+(n<20?(f&d^~f&p)+1518500249:n<40?(f^d^p)+1859775393:n<60?(f&d^f&p^d&p)+2400959708:(f^d^p)+3395469782)+(l[n]=n<16?a[v+n]|0:m(l[n-3]^l[n-8]^l[n-14]^l[n-16],1)),h=p,p=d,d=m(f,30),f=u,u=o;g[0]=u=g[0]+u|0,g[1]=f=g[1]+f|0,g[2]=d=g[2]+d|0,g[3]=p=g[3]+p|0,g[4]=h=g[4]+h|0}for(n=0;n<40;n++)b+=(g[n>>3]>>>(7-(n&7))*4&15).toString(16);return b}function TE(e){return/^[0-9a-f]{11,}$/i.test(e)&&e}function IE(e){return OE(e==null?"":""+e)}function go(e){return(e*10+.5|0)/10}class PE{constructor(){this.v=""}g(t){let r="";for(let n=0;n<t.length;n++)r+=(n?"L":"M")+go(t[n].x)+" "+go(t[n].y);this.v+=r+"Z"}h(t,r,n){const o=n?0:1,i=go(r/2),a=go(r),s="a"+i+","+i+" 0 1,"+o+" ";this.v+="M"+go(t.x)+" "+go(t.y+r/2)+s+a+",0"+s+-a+",0"}}class kE{constructor(t){this.A,this.B={},this.N=t,this.k=t.k}m(t){const r=/^(#......)(..)?/.exec(t),n=r[2]?_i(r[2],0)/255:1;this.N.m(r[1],n)}L(t){this.A=this.B[t]||(this.B[t]=new PE)}M(){}g(t){this.A.g(t)}h(t,r,n){this.A.h(t,r,n)}finish(){const t=this.B;for(let r in t)t.hasOwnProperty(r)&&this.N.O(r,t[r].v)}}const NE={P:"http://www.w3.org/2000/svg",R:"width",S:"height"};class DE{constructor(t){this.k=t,this.C='<svg xmlns="'+NE.P+'" width="'+t+'" height="'+t+'" viewBox="0 0 '+t+" "+t+'">'}m(t,r){r&&(this.C+='<rect width="100%" height="100%" fill="'+t+'" opacity="'+r.toFixed(2)+'"/>')}O(t,r){this.C+='<path fill="'+t+'" d="'+r+'"/>'}toString(){return this.C+"</svg>"}}function LE(e,t,r){const n=new DE(t);return AE(new kE(n),TE(e)||IE(e),r),n.toString()}typeof document<"u"&&document.querySelectorAll.bind(document);function pt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Na({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=ME({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=zt(r),l=c.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else o(u)},[i,e,o,s]);return[a,l]}function ME({defaultProp:e,onChange:t}){const r=c.useState(e),[n]=r,o=c.useRef(n),i=zt(t);return c.useEffect(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}const FE=ve.useId||(()=>{});let jE=0;function xi(e){const[t,r]=ve.useState(FE());return Ir(()=>{e||r(n=>n??String(jE++))},[e]),e||(t?`radix-${t}`:"")}const BE=c.createContext(void 0);function RE(e){const t=c.useContext(BE);return e||t||"ltr"}function UE(e,t=globalThis==null?void 0:globalThis.document){const r=zt(e);c.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const Jl="dismissableLayer.update",WE="dismissableLayer.pointerDownOutside",VE="dismissableLayer.focusOutside";let Np;const HE=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Dp=c.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,f=c.useContext(HE),[d,p]=c.useState(null),h=(r=d==null?void 0:d.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,g]=c.useState({}),v=At(t,C=>p(C)),b=Array.from(f.layers),[m]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=b.indexOf(m),E=d?b.indexOf(d):-1,x=f.layersWithOutsidePointerEventsDisabled.size>0,k=E>=w,I=zE(C=>{const P=C.target,F=[...f.branches].some(D=>D.contains(P));!k||F||(i==null||i(C),s==null||s(C),C.defaultPrevented||l==null||l())},h),S=GE(C=>{const P=C.target;[...f.branches].some(D=>D.contains(P))||(a==null||a(C),s==null||s(C),C.defaultPrevented||l==null||l())},h);return UE(C=>{E===f.layers.size-1&&(o==null||o(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},h),c.useEffect(()=>{if(d)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Np=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),Lp(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Np)}},[d,h,n,f]),c.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),Lp())},[d,f]),c.useEffect(()=>{const C=()=>g({});return document.addEventListener(Jl,C),()=>document.removeEventListener(Jl,C)},[]),c.createElement(ft.div,be({},u,{ref:v,style:{pointerEvents:x?k?"auto":"none":void 0,...e.style},onFocusCapture:pt(e.onFocusCapture,S.onFocusCapture),onBlurCapture:pt(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:pt(e.onPointerDownCapture,I.onPointerDownCapture)}))});function zE(e,t=globalThis==null?void 0:globalThis.document){const r=zt(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let u=function(){Mp(WE,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function GE(e,t=globalThis==null?void 0:globalThis.document){const r=zt(e),n=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!n.current&&Mp(VE,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Lp(){const e=new CustomEvent(Jl);document.dispatchEvent(e)}function Mp(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?cE(o,i):o.dispatchEvent(i)}const Xl="focusScope.autoFocusOnMount",Zl="focusScope.autoFocusOnUnmount",Fp={bubbles:!1,cancelable:!0},KE=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=c.useState(null),u=zt(o),f=zt(i),d=c.useRef(null),p=At(t,v=>l(v)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let v=function(m){if(h.paused||!s)return;const w=m.target;s.contains(w)?d.current=w:Mn(d.current,{select:!0})},b=function(m){h.paused||!s||s.contains(m.relatedTarget)||Mn(d.current,{select:!0})};return document.addEventListener("focusin",v),document.addEventListener("focusout",b),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b)}}},[n,s,h.paused]),c.useEffect(()=>{if(s){Rp.add(h);const v=document.activeElement;if(!s.contains(v)){const m=new CustomEvent(Xl,Fp);s.addEventListener(Xl,u),s.dispatchEvent(m),m.defaultPrevented||(qE(QE(jp(s)),{select:!0}),document.activeElement===v&&Mn(s))}return()=>{s.removeEventListener(Xl,u),setTimeout(()=>{const m=new CustomEvent(Zl,Fp);s.addEventListener(Zl,f),s.dispatchEvent(m),m.defaultPrevented||Mn(v??document.body,{select:!0}),s.removeEventListener(Zl,f),Rp.remove(h)},0)}}},[s,u,f,h]);const g=c.useCallback(v=>{if(!r&&!n||h.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,m=document.activeElement;if(b&&m){const w=v.currentTarget,[E,x]=YE(w);E&&x?!v.shiftKey&&m===x?(v.preventDefault(),r&&Mn(E,{select:!0})):v.shiftKey&&m===E&&(v.preventDefault(),r&&Mn(x,{select:!0})):m===w&&v.preventDefault()}},[r,n,h.paused]);return c.createElement(ft.div,be({tabIndex:-1},a,{ref:p,onKeyDown:g}))});function qE(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Mn(n,{select:t}),document.activeElement!==r)return}function YE(e){const t=jp(e),r=Bp(t,e),n=Bp(t.reverse(),e);return[r,n]}function jp(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Bp(e,t){for(const r of e)if(!JE(r,{upTo:t}))return r}function JE(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function XE(e){return e instanceof HTMLInputElement&&"select"in e}function Mn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&XE(e)&&t&&e.select()}}const Rp=ZE();function ZE(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Up(e,t),e.unshift(t)},remove(t){var r;e=Up(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function Up(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function QE(e){return e.filter(t=>t.tagName!=="A")}const Wp=c.forwardRef((e,t)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...o}=e;return n?ln.createPortal(c.createElement(ft.div,be({},o,{ref:t})),n):null});function ex(e,t){return c.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const ir=e=>{const{present:t,children:r}=e,n=tx(t),o=typeof r=="function"?r({present:n.isPresent}):c.Children.only(r),i=At(n.ref,o.ref);return typeof r=="function"||n.isPresent?c.cloneElement(o,{ref:i}):null};ir.displayName="Presence";function tx(e){const[t,r]=c.useState(),n=c.useRef({}),o=c.useRef(e),i=c.useRef("none"),a=e?"mounted":"unmounted",[s,l]=ex(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=Da(n.current);i.current=s==="mounted"?u:"none"},[s]),Ir(()=>{const u=n.current,f=o.current;if(f!==e){const p=i.current,h=Da(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ir(()=>{if(t){const u=d=>{const h=Da(n.current).includes(d.animationName);d.target===t&&h&&ln.flushSync(()=>l("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=Da(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:c.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function Da(e){return(e==null?void 0:e.animationName)||"none"}let Ql=0;function rx(){c.useEffect(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:Vp()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:Vp()),Ql++,()=>{Ql===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Ql--}},[])}function Vp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var kr=function(){return kr=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},kr.apply(this,arguments)};function Hp(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function nx(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var La="right-scroll-bar-position",Ma="width-before-scroll-bar",ox="with-scroll-bars-hidden",ix="--removed-body-scroll-bar-size";function ax(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function sx(e,t){var r=c.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function lx(e,t){return sx(t||null,function(r){return e.forEach(function(n){return ax(n,r)})})}function cx(e){return e}function ux(e,t){t===void 0&&(t=cx);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(i),a=r}var l=function(){var f=a;a=[],f.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),r}}}};return o}function fx(e){e===void 0&&(e={});var t=ux(null);return t.options=kr({async:!0,ssr:!1},e),t}var zp=function(e){var t=e.sideCar,r=Hp(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return ve.createElement(n,kr({},r))};zp.isSideCarExport=!0;function dx(e,t){return e.useMedium(t),zp}var Gp=fx(),ec=function(){},Fa=ve.forwardRef(function(e,t){var r=ve.useRef(null),n=ve.useState({onScrollCapture:ec,onWheelCapture:ec,onTouchMoveCapture:ec}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,h=e.noIsolation,g=e.inert,v=e.allowPinchZoom,b=e.as,m=b===void 0?"div":b,w=Hp(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),E=p,x=lx([r,t]),k=kr(kr({},w),o);return ve.createElement(ve.Fragment,null,f&&ve.createElement(E,{sideCar:Gp,removeScrollBar:u,shards:d,noIsolation:h,inert:g,setCallbacks:i,allowPinchZoom:!!v,lockRef:r}),a?ve.cloneElement(ve.Children.only(s),kr(kr({},k),{ref:x})):ve.createElement(m,kr({},k,{className:l,ref:x}),s))});Fa.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Fa.classNames={fullWidth:Ma,zeroRight:La};var px=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hx(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=px();return t&&e.setAttribute("nonce",t),e}function gx(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function vx(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var mx=function(){var e=0,t=null;return{add:function(r){e==0&&(t=hx())&&(gx(t,r),vx(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},bx=function(){var e=mx();return function(t,r){ve.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Kp=function(){var e=bx(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},yx={left:0,top:0,right:0,gap:0},tc=function(e){return parseInt(e||"",10)||0},wx=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[tc(r),tc(n),tc(o)]},_x=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return yx;var t=wx(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Ex=Kp(),xx=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
4
|
+
.`.concat(ox,` {
|
|
5
5
|
overflow: hidden `).concat(n,`;
|
|
6
6
|
padding-right: `).concat(s,"px ").concat(n,`;
|
|
7
7
|
}
|
|
@@ -18,29 +18,29 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
18
18
|
`),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.`).concat(
|
|
21
|
+
.`).concat(La,` {
|
|
22
22
|
right: `).concat(s,"px ").concat(n,`;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
.`).concat(
|
|
25
|
+
.`).concat(Ma,` {
|
|
26
26
|
margin-right: `).concat(s,"px ").concat(n,`;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
.`).concat(
|
|
29
|
+
.`).concat(La," .").concat(La,` {
|
|
30
30
|
right: 0 `).concat(n,`;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
.`).concat(
|
|
33
|
+
.`).concat(Ma," .").concat(Ma,` {
|
|
34
34
|
margin-right: 0 `).concat(n,`;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
body {
|
|
38
|
-
`).concat(
|
|
38
|
+
`).concat(ix,": ").concat(s,`px;
|
|
39
39
|
}
|
|
40
|
-
`)},
|
|
40
|
+
`)},Sx=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,i=ve.useMemo(function(){return _x(o)},[o]);return ve.createElement(Ex,{styles:xx(i,!t,o,r?"":"!important")})},rc=!1;if(typeof window<"u")try{var ja=Object.defineProperty({},"passive",{get:function(){return rc=!0,!0}});window.addEventListener("test",ja,ja),window.removeEventListener("test",ja,ja)}catch{rc=!1}var vo=rc?{passive:!1}:!1,$x=function(e){return e.tagName==="TEXTAREA"},qp=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!$x(e)&&r[t]==="visible")},Cx=function(e){return qp(e,"overflowY")},Ax=function(e){return qp(e,"overflowX")},Yp=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=Jp(e,r);if(n){var o=Xp(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},Ox=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Tx=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Jp=function(e,t){return e==="v"?Cx(t):Ax(t)},Xp=function(e,t){return e==="v"?Ox(t):Tx(t)},Ix=function(e,t){return e==="h"&&t==="rtl"?-1:1},Px=function(e,t,r,n,o){var i=Ix(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),u=!1,f=a>0,d=0,p=0;do{var h=Xp(e,s),g=h[0],v=h[1],b=h[2],m=v-b-i*g;(g||m)&&Jp(e,s)&&(d+=m,p+=g),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&(o&&d===0||!o&&a>d)||!f&&(o&&p===0||!o&&-a>p))&&(u=!0),u},Ba=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Zp=function(e){return[e.deltaX,e.deltaY]},Qp=function(e){return e&&"current"in e?e.current:e},kx=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Nx=function(e){return`
|
|
41
41
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
42
42
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
43
|
-
`)},PE=0,ho=[];function kE(e){var t=ve.useRef([]),r=ve.useRef([0,0]),n=ve.useRef(),o=ve.useState(PE++)[0],i=ve.useState(function(){return kp()})[0],a=ve.useRef(e);ve.useEffect(function(){a.current=e},[e]),ve.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=eE([e.lockRef.current],(e.shards||[]).map(jp),!0).filter(Boolean);return v.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=ve.useCallback(function(v,y){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var m=Ta(v),w=r.current,E="deltaX"in v?v.deltaX:w[0]-m[0],x="deltaY"in v?v.deltaY:w[1]-m[1],P,I=v.target,S=Math.abs(E)>Math.abs(x)?"h":"v";if("touches"in v&&S==="h"&&I.type==="range")return!1;var O=Dp(S,I);if(!O)return!0;if(O?P=S:(P=S==="v"?"h":"v",O=Dp(S,I)),!O)return!1;if(!n.current&&"changedTouches"in v&&(E||x)&&(n.current=P),!P)return!0;var k=n.current||P;return OE(k,y,v,k==="h"?E:x,!0)},[]),l=ve.useCallback(function(v){var y=v;if(!(!ho.length||ho[ho.length-1]!==i)){var m="deltaY"in y?Fp(y):Ta(y),w=t.current.filter(function(P){return P.name===y.type&&P.target===y.target&&TE(P.delta,m)})[0];if(w&&w.should){y.cancelable&&y.preventDefault();return}if(!w){var E=(a.current.shards||[]).map(jp).filter(Boolean).filter(function(P){return P.contains(y.target)}),x=E.length>0?s(y,E[0]):!a.current.noIsolation;x&&y.cancelable&&y.preventDefault()}}},[]),u=ve.useCallback(function(v,y,m,w){var E={name:v,delta:y,target:m,should:w};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(x){return x!==E})},1)},[]),f=ve.useCallback(function(v){r.current=Ta(v),n.current=void 0},[]),d=ve.useCallback(function(v){u(v.type,Fp(v),v.target,s(v,e.lockRef.current))},[]),p=ve.useCallback(function(v){u(v.type,Ta(v),v.target,s(v,e.lockRef.current))},[]);ve.useEffect(function(){return ho.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,po),document.addEventListener("touchmove",l,po),document.addEventListener("touchstart",f,po),function(){ho=ho.filter(function(v){return v!==i}),document.removeEventListener("wheel",l,po),document.removeEventListener("touchmove",l,po),document.removeEventListener("touchstart",f,po)}},[]);var h=e.removeScrollBar,g=e.inert;return ve.createElement(ve.Fragment,null,g?ve.createElement(i,{styles:IE(o)}):null,h?ve.createElement(_E,{gapMode:"margin"}):null)}const NE=cE(Ip,kE);var Bp=ve.forwardRef(function(e,t){return ve.createElement(Aa,Pr({},e,{ref:t,sideCar:NE}))});Bp.classNames=Aa.classNames;const Rp=Bp;var DE=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},go=new WeakMap,Ia=new WeakMap,Pa={},zl=0,Up=function(e){return e&&(e.host||Up(e.parentNode))},LE=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Up(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},ME=function(e,t,r,n){var o=LE(t,Array.isArray(e)?e:[e]);Pa[r]||(Pa[r]=new WeakMap);var i=Pa[r],a=[],s=new Set,l=new Set(o),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(s.has(p))f(p);else{var h=p.getAttribute(n),g=h!==null&&h!=="false",v=(go.get(p)||0)+1,y=(i.get(p)||0)+1;go.set(p,v),i.set(p,y),a.push(p),v===1&&g&&Ia.set(p,!0),y===1&&p.setAttribute(r,"true"),g||p.setAttribute(n,"true")}})};return f(t),s.clear(),zl++,function(){a.forEach(function(d){var p=go.get(d)-1,h=i.get(d)-1;go.set(d,p),i.set(d,h),p||(Ia.has(d)||d.removeAttribute(n),Ia.delete(d)),h||d.removeAttribute(r)}),zl--,zl||(go=new WeakMap,go=new WeakMap,Ia=new WeakMap,Pa={})}},Wp=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||DE(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),ME(n,o,r,"aria-hidden")):function(){return null}};const Vp="Dialog",[Hp,zp]=fn(Vp),[FE,hr]=Hp(Vp),jE=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=c.useRef(null),l=c.useRef(null),[u=!1,f]=xa({prop:n,defaultProp:o,onChange:i});return c.createElement(FE,{scope:t,triggerRef:s,contentRef:l,contentId:pi(),titleId:pi(),descriptionId:pi(),open:u,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(d=>!d),[f]),modal:a},r)},BE="DialogTrigger",Gp=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=hr(BE,r),i=Ct(t,o.triggerRef);return c.createElement(ft.button,be({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ql(o.open)},n,{ref:i,onClick:pt(e.onClick,o.onOpenToggle)}))}),Kp="DialogPortal",[RE,qp]=Hp(Kp,{forceMount:void 0}),Yp=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,i=hr(Kp,t);return c.createElement(RE,{scope:t,forceMount:r},c.Children.map(n,a=>c.createElement(or,{present:r||i.open},c.createElement(Cp,{asChild:!0,container:o},a))))},Gl="DialogOverlay",Jp=c.forwardRef((e,t)=>{const r=qp(Gl,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=hr(Gl,e.__scopeDialog);return i.modal?c.createElement(or,{present:n||i.open},c.createElement(UE,be({},o,{ref:t}))):null}),UE=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=hr(Gl,r);return c.createElement(Rp,{as:Dl,allowPinchZoom:!0,shards:[o.contentRef]},c.createElement(ft.div,be({"data-state":ql(o.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),vo="DialogContent",Kl=c.forwardRef((e,t)=>{const r=qp(vo,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=hr(vo,e.__scopeDialog);return c.createElement(or,{present:n||i.open},i.modal?c.createElement(WE,be({},o,{ref:t})):c.createElement(VE,be({},o,{ref:t})))}),WE=c.forwardRef((e,t)=>{const r=hr(vo,e.__scopeDialog),n=c.useRef(null),o=Ct(t,r.contentRef,n);return c.useEffect(()=>{const i=n.current;if(i)return Wp(i)},[]),c.createElement(Xp,be({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pt(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:pt(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:pt(e.onFocusOutside,i=>i.preventDefault())}))}),VE=c.forwardRef((e,t)=>{const r=hr(vo,e.__scopeDialog),n=c.useRef(!1);return c.createElement(Xp,be({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i;if((i=e.onCloseAutoFocus)===null||i===void 0||i.call(e,o),!o.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}n.current=!1},onInteractOutside:o=>{var i,a;(i=e.onInteractOutside)===null||i===void 0||i.call(e,o),o.defaultPrevented||(n.current=!0);const s=o.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(s))&&o.preventDefault()}}))}),Xp=c.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=hr(vo,r),l=c.useRef(null),u=Ct(t,l);return Q_(),c.createElement(c.Fragment,null,c.createElement(H_,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i},c.createElement(bp,be({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ql(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),Zp="DialogTitle",Qp=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=hr(Zp,r);return c.createElement(ft.h2,be({id:o.titleId},n,{ref:t}))}),HE="DialogDescription",eh=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=hr(HE,r);return c.createElement(ft.p,be({id:o.descriptionId},n,{ref:t}))}),zE="DialogClose",th=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=hr(zE,r);return c.createElement(ft.button,be({type:"button"},n,{ref:t,onClick:pt(e.onClick,()=>o.onOpenChange(!1))}))});function ql(e){return e?"open":"closed"}const GE="DialogTitleWarning",[KE,L9]=t_(GE,{contentName:vo,titleName:Zp,docsSlug:"dialog"}),Yl=jE,qE=Gp,YE=Yp,JE=Jp,XE=Kl,ZE=Qp,QE=eh,rh=th,ex="AlertDialog",[tx,M9]=fn(ex,[zp]),Hr=zp(),rx=e=>{const{__scopeAlertDialog:t,...r}=e,n=Hr(t);return c.createElement(Yl,be({},n,r,{modal:!0}))},nx=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Hr(r);return c.createElement(qE,be({},o,n,{ref:t}))}),ox=e=>{const{__scopeAlertDialog:t,...r}=e,n=Hr(t);return c.createElement(YE,be({},n,r))},ix=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Hr(r);return c.createElement(JE,be({},o,n,{ref:t}))}),nh="AlertDialogContent",[ax,sx]=tx(nh),lx=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...o}=e,i=Hr(r),a=c.useRef(null),s=Ct(t,a),l=c.useRef(null);return c.createElement(KE,{contentName:nh,titleName:cx,docsSlug:"alert-dialog"},c.createElement(ax,{scope:r,cancelRef:l},c.createElement(XE,be({role:"alertdialog"},i,o,{ref:s,onOpenAutoFocus:pt(o.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=l.current)===null||f===void 0||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault()}),c.createElement(Ml,null,n),!1)))}),cx="AlertDialogTitle",ux=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Hr(r);return c.createElement(ZE,be({},o,n,{ref:t}))}),fx=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Hr(r);return c.createElement(QE,be({},o,n,{ref:t}))}),dx=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Hr(r);return c.createElement(rh,be({},o,n,{ref:t}))}),px="AlertDialogCancel",hx=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=sx(px,r),i=Hr(r),a=Ct(t,o);return c.createElement(rh,be({},i,n,{ref:a}))}),gx=rx;function lt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}function oh(e){const t=e+"CollectionProvider",[r,n]=Ir(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:g,children:v}=h,y=c.useRef(null),m=c.useRef(new Map).current;return c.createElement(o,{scope:g,itemMap:m,collectionRef:y},v)},s=e+"CollectionSlot",l=c.forwardRef((h,g)=>{const{scope:v,children:y}=h,m=i(s,v),w=er(g,m.collectionRef);return c.createElement(xt,{ref:w},y)}),u=e+"CollectionItemSlot",f="data-radix-collection-item",d=c.forwardRef((h,g)=>{const{scope:v,children:y,...m}=h,w=c.useRef(null),E=er(g,w),x=i(u,v);return c.useEffect(()=>(x.itemMap.set(w,{ref:w,...m}),()=>void x.itemMap.delete(w))),c.createElement(xt,{[f]:"",ref:E},y)});function p(h){const g=i(e+"CollectionConsumer",h);return c.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const m=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((x,P)=>m.indexOf(x.ref.current)-m.indexOf(P.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,n]}const vx=c.createContext(void 0);function ih(e){const t=c.useContext(vx);return e||t||"ltr"}function kr(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function mx(e,t=globalThis?.document){const r=kr(e);c.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}let Jl=0;function bx(){c.useEffect(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:ah()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:ah()),Jl++,()=>{Jl===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Jl--}},[])}function ah(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const mo=globalThis?.document?c.useLayoutEffect:()=>{},yx=ve["useId".toString()]||(()=>{});let wx=0;function Xl(e){const[t,r]=ve.useState(yx());return mo(()=>{e||r(n=>n??String(wx++))},[e]),e||(t?`radix-${t}`:"")}function bo(e){return e.split("-")[1]}function Zl(e){return e==="y"?"height":"width"}function zr(e){return e.split("-")[0]}function kn(e){return["top","bottom"].includes(zr(e))?"x":"y"}function sh(e,t,r){let{reference:n,floating:o}=e;const i=n.x+n.width/2-o.width/2,a=n.y+n.height/2-o.height/2,s=kn(t),l=Zl(s),u=n[l]/2-o[l]/2,f=s==="x";let d;switch(zr(t)){case"top":d={x:i,y:n.y-o.height};break;case"bottom":d={x:i,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:a};break;case"left":d={x:n.x-o.width,y:a};break;default:d={x:n.x,y:n.y}}switch(bo(t)){case"start":d[s]-=u*(r&&f?-1:1);break;case"end":d[s]+=u*(r&&f?-1:1)}return d}const _x=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=sh(u,n,l),p=n,h={},g=0;for(let v=0;v<s.length;v++){const{name:y,fn:m}=s[v],{x:w,y:E,data:x,reset:P}=await m({x:f,y:d,initialPlacement:n,placement:p,strategy:o,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});f=w??f,d=E??d,h={...h,[y]:{...h[y],...x}},P&&g<=50&&(g++,typeof P=="object"&&(P.placement&&(p=P.placement),P.rects&&(u=P.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):P.rects),{x:f,y:d}=sh(u,p,l)),v=-1)}return{x:f,y:d,placement:p,strategy:o,middlewareData:h}};function lh(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function ka(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function hi(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=t,g=lh(h),v=s[p?d==="floating"?"reference":"floating":d],y=ka(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(v)))==null||r?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:l})),m=d==="floating"?{...a.floating,x:n,y:o}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),E=await(i.isElement==null?void 0:i.isElement(w))&&await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1},x=ka(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:m,offsetParent:w,strategy:l}):m);return{top:(y.top-x.top+g.top)/E.y,bottom:(x.bottom-y.bottom+g.bottom)/E.y,left:(y.left-x.left+g.left)/E.x,right:(x.right-y.right+g.right)/E.x}}const Ql=Math.min,Nn=Math.max;function ec(e,t,r){return Nn(e,Ql(t,r))}const ch=e=>({name:"arrow",options:e,async fn(t){const{element:r,padding:n=0}=e||{},{x:o,y:i,placement:a,rects:s,platform:l,elements:u}=t;if(r==null)return{};const f=lh(n),d={x:o,y:i},p=kn(a),h=Zl(p),g=await l.getDimensions(r),v=p==="y",y=v?"top":"left",m=v?"bottom":"right",w=v?"clientHeight":"clientWidth",E=s.reference[h]+s.reference[p]-d[p]-s.floating[h],x=d[p]-s.reference[p],P=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let I=P?P[w]:0;I&&await(l.isElement==null?void 0:l.isElement(P))||(I=u.floating[w]||s.floating[h]);const S=E/2-x/2,O=f[y],k=I-g[h]-f[m],j=I/2-g[h]/2+S,D=ec(O,j,k),N=bo(a)!=null&&j!=D&&s.reference[h]/2-(j<O?f[y]:f[m])-g[h]/2<0;return{[p]:d[p]-(N?j<O?O-j:k-j:0),data:{[p]:D,centerOffset:j-D}}}}),uh=["top","right","bottom","left"];uh.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const Ex={left:"right",right:"left",bottom:"top",top:"bottom"};function Na(e){return e.replace(/left|right|bottom|top/g,t=>Ex[t])}function xx(e,t,r){r===void 0&&(r=!1);const n=bo(e),o=kn(e),i=Zl(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Na(a)),{main:a,cross:Na(a)}}const Sx={start:"end",end:"start"};function tc(e){return e.replace(/start|end/g,t=>Sx[t])}const $x=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r;const{placement:n,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...v}=e,y=zr(n),m=zr(a)===a,w=await(s.isRTL==null?void 0:s.isRTL(l.floating)),E=d||(m||!g?[Na(a)]:function(D){const N=Na(D);return[tc(D),N,tc(N)]}(a));d||h==="none"||E.push(...function(D,N,J,K){const Y=bo(D);let te=function(oe,le,ae){const ge=["left","right"],ce=["right","left"],q=["top","bottom"],V=["bottom","top"];switch(oe){case"top":case"bottom":return ae?le?ce:ge:le?ge:ce;case"left":case"right":return le?q:V;default:return[]}}(zr(D),J==="start",K);return Y&&(te=te.map(oe=>oe+"-"+Y),N&&(te=te.concat(te.map(tc)))),te}(a,g,h,w));const x=[a,...E],P=await hi(t,v),I=[];let S=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&I.push(P[y]),f){const{main:D,cross:N}=xx(n,i,w);I.push(P[D],P[N])}if(S=[...S,{placement:n,overflows:I}],!I.every(D=>D<=0)){var O,k;const D=(((O=o.flip)==null?void 0:O.index)||0)+1,N=x[D];if(N)return{data:{index:D,overflows:S},reset:{placement:N}};let J=(k=S.filter(K=>K.overflows[0]<=0).sort((K,Y)=>K.overflows[1]-Y.overflows[1])[0])==null?void 0:k.placement;if(!J)switch(p){case"bestFit":{var j;const K=(j=S.map(Y=>[Y.placement,Y.overflows.filter(te=>te>0).reduce((te,oe)=>te+oe,0)]).sort((Y,te)=>Y[1]-te[1])[0])==null?void 0:j[0];K&&(J=K);break}case"initialPlacement":J=a}if(n!==J)return{reset:{placement:J}}}return{}}}};function fh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function dh(e){return uh.some(t=>e[t]>=0)}const Cx=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{strategy:r="referenceHidden",...n}=e,{rects:o}=t;switch(r){case"referenceHidden":{const i=fh(await hi(t,{...n,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:dh(i)}}}case"escaped":{const i=fh(await hi(t,{...n,altBoundary:!0}),o.floating);return{data:{escapedOffsets:i,escaped:dh(i)}}}default:return{}}}}},Ax=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await async function(i,a){const{placement:s,platform:l,elements:u}=i,f=await(l.isRTL==null?void 0:l.isRTL(u.floating)),d=zr(s),p=bo(s),h=kn(s)==="x",g=["left","top"].includes(d)?-1:1,v=f&&h?-1:1,y=typeof a=="function"?a(i):a;let{mainAxis:m,crossAxis:w,alignmentAxis:E}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return p&&typeof E=="number"&&(w=p==="end"?-1*E:E),h?{x:w*v,y:m*g}:{x:m*g,y:w*v}}(t,e);return{x:r+o.x,y:n+o.y,data:o}}}};function ph(e){return e==="x"?"y":"x"}const Ox=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:m,y:w}=y;return{x:m,y:w}}},...l}=e,u={x:r,y:n},f=await hi(t,l),d=kn(zr(o)),p=ph(d);let h=u[d],g=u[p];if(i){const y=d==="y"?"bottom":"right";h=ec(h+f[d==="y"?"top":"left"],h,h-f[y])}if(a){const y=p==="y"?"bottom":"right";g=ec(g+f[p==="y"?"top":"left"],g,g-f[y])}const v=s.fn({...t,[d]:h,[p]:g});return{...v,data:{x:v.x-r,y:v.y-n}}}}},Tx=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,f={x:r,y:n},d=kn(o),p=ph(d);let h=f[d],g=f[p];const v=typeof s=="function"?s(t):s,y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const E=d==="y"?"height":"width",x=i.reference[d]-i.floating[E]+y.mainAxis,P=i.reference[d]+i.reference[E]-y.mainAxis;h<x?h=x:h>P&&(h=P)}if(u){var m,w;const E=d==="y"?"width":"height",x=["top","left"].includes(zr(o)),P=i.reference[p]-i.floating[E]+(x&&((m=a.offset)==null?void 0:m[p])||0)+(x?0:y.crossAxis),I=i.reference[p]+i.reference[E]+(x?0:((w=a.offset)==null?void 0:w[p])||0)-(x?y.crossAxis:0);g<P?g=P:g>I&&(g=I)}return{[d]:h,[p]:g}}}},Ix=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:i}=t,{apply:a=()=>{},...s}=e,l=await hi(t,s),u=zr(r),f=bo(r),d=kn(r)==="x",{width:p,height:h}=n.floating;let g,v;u==="top"||u==="bottom"?(g=u,v=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(v=u,g=f==="end"?"top":"bottom");const y=h-l[g],m=p-l[v],w=!t.middlewareData.shift;let E=y,x=m;if(d){const I=p-l.left-l.right;x=f||w?Ql(m,I):I}else{const I=h-l.top-l.bottom;E=f||w?Ql(y,I):I}if(w&&!f){const I=Nn(l.left,0),S=Nn(l.right,0),O=Nn(l.top,0),k=Nn(l.bottom,0);d?x=p-2*(I!==0||S!==0?I+S:Nn(l.left,l.right)):E=h-2*(O!==0||k!==0?O+k:Nn(l.top,l.bottom))}await a({...t,availableWidth:x,availableHeight:E});const P=await o.getDimensions(i.floating);return p!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function ir(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gr(e){return ir(e).getComputedStyle(e)}function hh(e){return e instanceof ir(e).Node}function dn(e){return hh(e)?(e.nodeName||"").toLowerCase():""}function vr(e){return e instanceof ir(e).HTMLElement}function tr(e){return e instanceof ir(e).Element}function gh(e){return typeof ShadowRoot>"u"?!1:e instanceof ir(e).ShadowRoot||e instanceof ShadowRoot}function gi(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=gr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Px(e){return["table","td","th"].includes(dn(e))}function rc(e){const t=nc(),r=gr(e);return r.transform!=="none"||r.perspective!=="none"||!t&&!!r.backdropFilter&&r.backdropFilter!=="none"||!t&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function nc(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Da(e){return["html","body","#document"].includes(dn(e))}const vh=Math.min,vi=Math.max,La=Math.round;function mh(e){const t=gr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=vr(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=La(r)!==i||La(n)!==a;return s&&(r=i,n=a),{width:r,height:n,fallback:s}}function bh(e){return tr(e)?e:e.contextElement}const yh={x:1,y:1};function yo(e){const t=bh(e);if(!vr(t))return yh;const r=t.getBoundingClientRect(),{width:n,height:o,fallback:i}=mh(t);let a=(i?La(r.width):r.width)/n,s=(i?La(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const wh={x:0,y:0};function _h(e,t,r){var n,o;if(t===void 0&&(t=!0),!nc())return wh;const i=e?ir(e):window;return!r||t&&r!==i?wh:{x:((n=i.visualViewport)==null?void 0:n.offsetLeft)||0,y:((o=i.visualViewport)==null?void 0:o.offsetTop)||0}}function Dn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=bh(e);let a=yh;t&&(n?tr(n)&&(a=yo(n)):a=yo(e));const s=_h(i,r,n);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,f=o.width/a.x,d=o.height/a.y;if(i){const p=ir(i),h=n&&tr(n)?ir(n):n;let g=p.frameElement;for(;g&&n&&h!==p;){const v=yo(g),y=g.getBoundingClientRect(),m=getComputedStyle(g);y.x+=(g.clientLeft+parseFloat(m.paddingLeft))*v.x,y.y+=(g.clientTop+parseFloat(m.paddingTop))*v.y,l*=v.x,u*=v.y,f*=v.x,d*=v.y,l+=y.x,u+=y.y,g=ir(g).frameElement}}return ka({width:f,height:d,x:l,y:u})}function pn(e){return((hh(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ma(e){return tr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Eh(e){return Dn(pn(e)).left+Ma(e).scrollLeft}function wo(e){if(dn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gh(e)&&e.host||pn(e);return gh(t)?t.host:t}function xh(e){const t=wo(e);return Da(t)?t.ownerDocument.body:vr(t)&&gi(t)?t:xh(t)}function mi(e,t){var r;t===void 0&&(t=[]);const n=xh(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=ir(n);return o?t.concat(i,i.visualViewport||[],gi(n)?n:[]):t.concat(n,mi(n))}function Sh(e,t,r){let n;if(t==="viewport")n=function(o,i){const a=ir(o),s=pn(o),l=a.visualViewport;let u=s.clientWidth,f=s.clientHeight,d=0,p=0;if(l){u=l.width,f=l.height;const h=nc();(!h||h&&i==="fixed")&&(d=l.offsetLeft,p=l.offsetTop)}return{width:u,height:f,x:d,y:p}}(e,r);else if(t==="document")n=function(o){const i=pn(o),a=Ma(o),s=o.ownerDocument.body,l=vi(i.scrollWidth,i.clientWidth,s.scrollWidth,s.clientWidth),u=vi(i.scrollHeight,i.clientHeight,s.scrollHeight,s.clientHeight);let f=-a.scrollLeft+Eh(o);const d=-a.scrollTop;return gr(s).direction==="rtl"&&(f+=vi(i.clientWidth,s.clientWidth)-l),{width:l,height:u,x:f,y:d}}(pn(e));else if(tr(t))n=function(o,i){const a=Dn(o,!0,i==="fixed"),s=a.top+o.clientTop,l=a.left+o.clientLeft,u=vr(o)?yo(o):{x:1,y:1};return{width:o.clientWidth*u.x,height:o.clientHeight*u.y,x:l*u.x,y:s*u.y}}(t,r);else{const o=_h(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return ka(n)}function $h(e,t){const r=wo(e);return!(r===t||!tr(r)||Da(r))&&(gr(r).position==="fixed"||$h(r,t))}function Ch(e,t){return vr(e)&&gr(e).position!=="fixed"?t?t(e):e.offsetParent:null}function Ah(e,t){const r=ir(e);if(!vr(e))return r;let n=Ch(e,t);for(;n&&Px(n)&&gr(n).position==="static";)n=Ch(n,t);return n&&(dn(n)==="html"||dn(n)==="body"&&gr(n).position==="static"&&!rc(n))?r:n||function(o){let i=wo(o);for(;vr(i)&&!Da(i);){if(rc(i))return i;i=wo(i)}return null}(e)||r}function kx(e,t,r){const n=vr(t),o=pn(t),i=r==="fixed",a=Dn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&!i)if((dn(t)!=="body"||gi(o))&&(s=Ma(t)),vr(t)){const u=Dn(t,!0,i,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else o&&(l.x=Eh(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}const Nx={getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=r==="clippingAncestors"?function(u,f){const d=f.get(u);if(d)return d;let p=mi(u).filter(y=>tr(y)&&dn(y)!=="body"),h=null;const g=gr(u).position==="fixed";let v=g?wo(u):u;for(;tr(v)&&!Da(v);){const y=gr(v),m=rc(v);m||y.position!=="fixed"||(h=null),(g?!m&&!h:!m&&y.position==="static"&&h&&["absolute","fixed"].includes(h.position)||gi(v)&&!m&&$h(u,v))?p=p.filter(w=>w!==v):h=y,v=wo(v)}return f.set(u,p),p}(t,this._c):[].concat(r),a=[...i,n],s=a[0],l=a.reduce((u,f)=>{const d=Sh(t,f,o);return u.top=vi(d.top,u.top),u.right=vh(d.right,u.right),u.bottom=vh(d.bottom,u.bottom),u.left=vi(d.left,u.left),u},Sh(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=vr(r),i=pn(r);if(r===i)return t;let a={scrollLeft:0,scrollTop:0},s={x:1,y:1};const l={x:0,y:0};if((o||!o&&n!=="fixed")&&((dn(r)!=="body"||gi(i))&&(a=Ma(r)),vr(r))){const u=Dn(r);s=yo(r),l.x=u.x+r.clientLeft,l.y=u.y+r.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}},isElement:tr,getDimensions:function(e){return mh(e)},getOffsetParent:Ah,getDocumentElement:pn,getScale:yo,async getElementRects(e){let{reference:t,floating:r,strategy:n}=e;const o=this.getOffsetParent||Ah,i=this.getDimensions;return{reference:kx(t,await o(r),n),floating:{x:0,y:0,...await i(r)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>gr(e).direction==="rtl"};function Dx(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=n,l=o||i?[...tr(e)?mi(e):e.contextElement?mi(e.contextElement):[],...mi(t)]:[];l.forEach(p=>{const h=!tr(p)&&p.toString().includes("V");!o||s&&!h||p.addEventListener("scroll",r,{passive:!0}),i&&p.addEventListener("resize",r)});let u,f=null;a&&(f=new ResizeObserver(()=>{r()}),tr(e)&&!s&&f.observe(e),tr(e)||!e.contextElement||s||f.observe(e.contextElement),f.observe(t));let d=s?Dn(e):null;return s&&function p(){const h=Dn(e);!d||h.x===d.x&&h.y===d.y&&h.width===d.width&&h.height===d.height||r(),d=h,u=requestAnimationFrame(p)}(),r(),()=>{var p;l.forEach(h=>{o&&h.removeEventListener("scroll",r),i&&h.removeEventListener("resize",r)}),(p=f)==null||p.disconnect(),f=null,s&&cancelAnimationFrame(u)}}const Lx=(e,t,r)=>{const n=new Map,o={platform:Nx,...r},i={...o.platform,_c:n};return _x(e,t,{...o,platform:i})},Mx=e=>{const{element:t,padding:r}=e;function n(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return t&&n(t)?t.current!=null?ch({element:t.current,padding:r}).fn(o):{}:t?ch({element:t,padding:r}).fn(o):{}}}};var Fa=typeof document<"u"?c.useLayoutEffect:c.useEffect;function ja(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!ja(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!ja(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Oh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Th(e,t){const r=Oh(e);return Math.round(t*r)/r}function Ih(e){const t=ve.useRef(e);return Fa(()=>{t.current=e}),t}function Fx(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[f,d]=ve.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=ve.useState(n);ja(p,n)||h(n);const[g,v]=ve.useState(null),[y,m]=ve.useState(null),w=ve.useCallback(te=>{te!=I.current&&(I.current=te,v(te))},[v]),E=ve.useCallback(te=>{te!==S.current&&(S.current=te,m(te))},[m]),x=i||g,P=a||y,I=ve.useRef(null),S=ve.useRef(null),O=ve.useRef(f),k=Ih(l),j=Ih(o),D=ve.useCallback(()=>{if(!I.current||!S.current)return;const te={placement:t,strategy:r,middleware:p};j.current&&(te.platform=j.current),Lx(I.current,S.current,te).then(oe=>{const le={...oe,isPositioned:!0};N.current&&!ja(O.current,le)&&(O.current=le,Ad.flushSync(()=>{d(le)}))})},[p,t,r,j]);Fa(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(te=>({...te,isPositioned:!1})))},[u]);const N=ve.useRef(!1);Fa(()=>(N.current=!0,()=>{N.current=!1}),[]),Fa(()=>{if(x&&(I.current=x),P&&(S.current=P),x&&P){if(k.current)return k.current(x,P,D);D()}},[x,P,D,k]);const J=ve.useMemo(()=>({reference:I,floating:S,setReference:w,setFloating:E}),[w,E]),K=ve.useMemo(()=>({reference:x,floating:P}),[x,P]),Y=ve.useMemo(()=>{const te={position:r,left:0,top:0};if(!K.floating)return te;const oe=Th(K.floating,f.x),le=Th(K.floating,f.y);return s?{...te,transform:"translate("+oe+"px, "+le+"px)",...Oh(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:oe,top:le}},[r,s,K.floating,f.x,f.y]);return ve.useMemo(()=>({...f,update:D,refs:J,elements:K,floatingStyles:Y}),[f,D,J,K,Y])}const jx=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return c.createElement(Ge.svg,be({},i,{ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?r:c.createElement("polygon",{points:"0,0 30,0 15,10"}))});function Ph(e){const[t,r]=c.useState(void 0);return mo(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;r({width:a,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}function Bx(e,t){return c.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const Ba=e=>{const{present:t,children:r}=e,n=Rx(t),o=typeof r=="function"?r({present:n.isPresent}):c.Children.only(r),i=er(n.ref,o.ref);return typeof r=="function"||n.isPresent?c.cloneElement(o,{ref:i}):null};Ba.displayName="Presence";function Rx(e){const[t,r]=c.useState(),n=c.useRef({}),o=c.useRef(e),i=c.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Bx(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=Ra(n.current);i.current=s==="mounted"?u:"none"},[s]),mo(()=>{const u=n.current,f=o.current;if(f!==e){const p=i.current,h=Ra(u);e?l("MOUNT"):h==="none"||u?.display==="none"?l("UNMOUNT"):l(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),mo(()=>{if(t){const u=d=>{const h=Ra(n.current).includes(d.animationName);d.target===t&&h&&on.flushSync(()=>l("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=Ra(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:c.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function Ra(e){return e?.animationName||"none"}function Gr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=Ux({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=kr(r),l=c.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else o(u)},[i,e,o,s]);return[a,l]}function Ux({defaultProp:e,onChange:t}){const r=c.useState(e),[n]=r,o=c.useRef(n),i=kr(t);return c.useEffect(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}const oc="rovingFocusGroup.onEntryFocus",Wx={bubbles:!1,cancelable:!0},ic="RovingFocusGroup",[ac,kh,Vx]=oh(ic),[Hx,Nh]=Ir(ic,[Vx]),[zx,Gx]=Hx(ic),Kx=c.forwardRef((e,t)=>c.createElement(ac.Provider,{scope:e.__scopeRovingFocusGroup},c.createElement(ac.Slot,{scope:e.__scopeRovingFocusGroup},c.createElement(qx,be({},e,{ref:t}))))),qx=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...f}=e,d=c.useRef(null),p=er(t,d),h=ih(i),[g=null,v]=Gr({prop:a,defaultProp:s,onChange:l}),[y,m]=c.useState(!1),w=kr(u),E=kh(r),x=c.useRef(!1),[P,I]=c.useState(0);return c.useEffect(()=>{const S=d.current;if(S)return S.addEventListener(oc,w),()=>S.removeEventListener(oc,w)},[w]),c.createElement(zx,{scope:r,orientation:n,dir:h,loop:o,currentTabStopId:g,onItemFocus:c.useCallback(S=>v(S),[v]),onItemShiftTab:c.useCallback(()=>m(!0),[]),onFocusableItemAdd:c.useCallback(()=>I(S=>S+1),[]),onFocusableItemRemove:c.useCallback(()=>I(S=>S-1),[])},c.createElement(Ge.div,be({tabIndex:y||P===0?-1:0,"data-orientation":n},f,{ref:p,style:{outline:"none",...e.style},onMouseDown:lt(e.onMouseDown,()=>{x.current=!0}),onFocus:lt(e.onFocus,S=>{const O=!x.current;if(S.target===S.currentTarget&&O&&!y){const k=new CustomEvent(oc,Wx);if(S.currentTarget.dispatchEvent(k),!k.defaultPrevented){const j=E().filter(Y=>Y.focusable),D=j.find(Y=>Y.active),N=j.find(Y=>Y.id===g),K=[D,N,...j].filter(Boolean).map(Y=>Y.ref.current);Dh(K)}}x.current=!1}),onBlur:lt(e.onBlur,()=>m(!1))})))}),Yx="RovingFocusGroupItem",Jx=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:i,...a}=e,s=Xl(),l=i||s,u=Gx(Yx,r),f=u.currentTabStopId===l,d=kh(r),{onFocusableItemAdd:p,onFocusableItemRemove:h}=u;return c.useEffect(()=>{if(n)return p(),()=>h()},[n,p,h]),c.createElement(ac.ItemSlot,{scope:r,id:l,focusable:n,active:o},c.createElement(Ge.span,be({tabIndex:f?0:-1,"data-orientation":u.orientation},a,{ref:t,onMouseDown:lt(e.onMouseDown,g=>{n?u.onItemFocus(l):g.preventDefault()}),onFocus:lt(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:lt(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const v=Qx(g,u.orientation,u.dir);if(v!==void 0){g.preventDefault();let m=d().filter(w=>w.focusable).map(w=>w.ref.current);if(v==="last")m.reverse();else if(v==="prev"||v==="next"){v==="prev"&&m.reverse();const w=m.indexOf(g.currentTarget);m=u.loop?e2(m,w+1):m.slice(w+1)}setTimeout(()=>Dh(m))}})})))}),Xx={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Zx(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Qx(e,t,r){const n=Zx(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Xx[n]}function Dh(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function e2(e,t){return e.map((r,n)=>e[(t+n)%e.length])}const t2=Kx,r2=Jx,sc="dismissableLayer.update",n2="dismissableLayer.pointerDownOutside",o2="dismissableLayer.focusOutside";let Lh;const i2=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),a2=c.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,f=c.useContext(i2),[d,p]=c.useState(null),h=(r=d?.ownerDocument)!==null&&r!==void 0?r:globalThis?.document,[,g]=c.useState({}),v=er(t,O=>p(O)),y=Array.from(f.layers),[m]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=y.indexOf(m),E=d?y.indexOf(d):-1,x=f.layersWithOutsidePointerEventsDisabled.size>0,P=E>=w,I=s2(O=>{const k=O.target,j=[...f.branches].some(D=>D.contains(k));!P||j||(i?.(O),s?.(O),O.defaultPrevented||l?.())},h),S=l2(O=>{const k=O.target;[...f.branches].some(D=>D.contains(k))||(a?.(O),s?.(O),O.defaultPrevented||l?.())},h);return mx(O=>{E===f.layers.size-1&&(o?.(O),!O.defaultPrevented&&l&&(O.preventDefault(),l()))},h),c.useEffect(()=>{if(d)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Lh=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),Mh(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Lh)}},[d,h,n,f]),c.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),Mh())},[d,f]),c.useEffect(()=>{const O=()=>g({});return document.addEventListener(sc,O),()=>document.removeEventListener(sc,O)},[]),c.createElement(Ge.div,be({},u,{ref:v,style:{pointerEvents:x?P?"auto":"none":void 0,...e.style},onFocusCapture:lt(e.onFocusCapture,S.onFocusCapture),onBlurCapture:lt(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:lt(e.onPointerDownCapture,I.onPointerDownCapture)}))});function s2(e,t=globalThis?.document){const r=kr(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let u=function(){Fh(n2,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function l2(e,t=globalThis?.document){const r=kr(e),n=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!n.current&&Fh(o2,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Mh(){const e=new CustomEvent(sc);document.dispatchEvent(e)}function Fh(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Ud(o,i):o.dispatchEvent(i)}const lc="focusScope.autoFocusOnMount",cc="focusScope.autoFocusOnUnmount",jh={bubbles:!1,cancelable:!0},c2=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=c.useState(null),u=kr(o),f=kr(i),d=c.useRef(null),p=er(t,v=>l(v)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let v=function(E){if(h.paused||!s)return;const x=E.target;s.contains(x)?d.current=x:hn(d.current,{select:!0})},y=function(E){if(h.paused||!s)return;const x=E.relatedTarget;x!==null&&(s.contains(x)||hn(d.current,{select:!0}))},m=function(E){const x=document.activeElement;for(const P of E)P.removedNodes.length>0&&(s!=null&&s.contains(x)||hn(s))};document.addEventListener("focusin",v),document.addEventListener("focusout",y);const w=new MutationObserver(m);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),w.disconnect()}}},[n,s,h.paused]),c.useEffect(()=>{if(s){Uh.add(h);const v=document.activeElement;if(!s.contains(v)){const m=new CustomEvent(lc,jh);s.addEventListener(lc,u),s.dispatchEvent(m),m.defaultPrevented||(u2(g2(Bh(s)),{select:!0}),document.activeElement===v&&hn(s))}return()=>{s.removeEventListener(lc,u),setTimeout(()=>{const m=new CustomEvent(cc,jh);s.addEventListener(cc,f),s.dispatchEvent(m),m.defaultPrevented||hn(v??document.body,{select:!0}),s.removeEventListener(cc,f),Uh.remove(h)},0)}}},[s,u,f,h]);const g=c.useCallback(v=>{if(!r&&!n||h.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,m=document.activeElement;if(y&&m){const w=v.currentTarget,[E,x]=f2(w);E&&x?!v.shiftKey&&m===x?(v.preventDefault(),r&&hn(E,{select:!0})):v.shiftKey&&m===E&&(v.preventDefault(),r&&hn(x,{select:!0})):m===w&&v.preventDefault()}},[r,n,h.paused]);return c.createElement(Ge.div,be({tabIndex:-1},a,{ref:p,onKeyDown:g}))});function u2(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(hn(n,{select:t}),document.activeElement!==r)return}function f2(e){const t=Bh(e),r=Rh(t,e),n=Rh(t.reverse(),e);return[r,n]}function Bh(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Rh(e,t){for(const r of e)if(!d2(r,{upTo:t}))return r}function d2(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function p2(e){return e instanceof HTMLInputElement&&"select"in e}function hn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&p2(e)&&t&&e.select()}}const Uh=h2();function h2(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Wh(e,t),e.unshift(t)},remove(t){var r;e=Wh(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function Wh(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function g2(e){return e.filter(t=>t.tagName!=="A")}const Vh="Popper",[Hh,zh]=Ir(Vh),[v2,Gh]=Hh(Vh),m2=e=>{const{__scopePopper:t,children:r}=e,[n,o]=c.useState(null);return c.createElement(v2,{scope:t,anchor:n,onAnchorChange:o},r)},b2="PopperAnchor",y2=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=Gh(b2,r),a=c.useRef(null),s=er(t,a);return c.useEffect(()=>{i.onAnchorChange(n?.current||a.current)}),n?null:c.createElement(Ge.div,be({},o,{ref:s}))}),Kh="PopperContent",[w2,_2]=Hh(Kh),E2=c.forwardRef((e,t)=>{var r,n,o,i,a,s,l,u;const{__scopePopper:f,side:d="bottom",sideOffset:p=0,align:h="center",alignOffset:g=0,arrowPadding:v=0,collisionBoundary:y=[],collisionPadding:m=0,sticky:w="partial",hideWhenDetached:E=!1,avoidCollisions:x=!0,onPlaced:P,...I}=e,S=Gh(Kh,f),[O,k]=c.useState(null),j=er(t,ne=>k(ne)),[D,N]=c.useState(null),J=Ph(D),K=(r=J?.width)!==null&&r!==void 0?r:0,Y=(n=J?.height)!==null&&n!==void 0?n:0,te=d+(h!=="center"?"-"+h:""),oe=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},le=Array.isArray(y)?y:[y],ae=le.length>0,ge={padding:oe,boundary:le.filter(C2),altBoundary:ae},{refs:ce,floatingStyles:q,placement:V,isPositioned:re,middlewareData:de}=Fx({strategy:"fixed",placement:te,whileElementsMounted:Dx,elements:{reference:S.anchor},middleware:[Ax({mainAxis:p+Y,alignmentAxis:g}),x&&Ox({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?Tx():void 0,...ge}),x&&$x({...ge}),Ix({...ge,apply:({elements:ne,rects:pe,availableWidth:me,availableHeight:xe})=>{const{width:Ee,height:ie}=pe.reference,Ne=ne.floating.style;Ne.setProperty("--radix-popper-available-width",`${me}px`),Ne.setProperty("--radix-popper-available-height",`${xe}px`),Ne.setProperty("--radix-popper-anchor-width",`${Ee}px`),Ne.setProperty("--radix-popper-anchor-height",`${ie}px`)}}),D&&Mx({element:D,padding:v}),A2({arrowWidth:K,arrowHeight:Y}),E&&Cx({strategy:"referenceHidden"})]}),[U,z]=qh(V),M=kr(P);mo(()=>{re&&M?.()},[re,M]);const R=(o=de.arrow)===null||o===void 0?void 0:o.x,G=(i=de.arrow)===null||i===void 0?void 0:i.y,A=((a=de.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[T,Z]=c.useState();return mo(()=>{O&&Z(window.getComputedStyle(O).zIndex)},[O]),c.createElement("div",{ref:ce.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:re?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:T,["--radix-popper-transform-origin"]:[(s=de.transformOrigin)===null||s===void 0?void 0:s.x,(l=de.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},c.createElement(w2,{scope:f,placedSide:U,onArrowChange:N,arrowX:R,arrowY:G,shouldHideArrow:A},c.createElement(Ge.div,be({"data-side":U,"data-align":z},I,{ref:j,style:{...I.style,animation:re?void 0:"none",opacity:(u=de.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),x2="PopperArrow",S2={top:"bottom",right:"left",bottom:"top",left:"right"},$2=c.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=_2(x2,n),a=S2[i.placedSide];return c.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},c.createElement(jx,be({},o,{ref:r,style:{...o.style,display:"block"}})))});function C2(e){return e!==null}const A2=e=>({name:"transformOrigin",options:e,fn(t){var r,n,o,i,a;const{placement:s,rects:l,middlewareData:u}=t,d=((r=u.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,p=d?0:e.arrowWidth,h=d?0:e.arrowHeight,[g,v]=qh(s),y={start:"0%",center:"50%",end:"100%"}[v],m=((n=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&n!==void 0?n:0)+p/2,w=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+h/2;let E="",x="";return g==="bottom"?(E=d?y:`${m}px`,x=`${-h}px`):g==="top"?(E=d?y:`${m}px`,x=`${l.floating.height+h}px`):g==="right"?(E=`${-h}px`,x=d?y:`${w}px`):g==="left"&&(E=`${l.floating.width+h}px`,x=d?y:`${w}px`),{data:{x:E,y:x}}}});function qh(e){const[t,r="center"]=e.split("-");return[t,r]}const O2=m2,T2=y2,I2=E2,P2=$2,k2=c.forwardRef((e,t)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...o}=e;return n?on.createPortal(c.createElement(Ge.div,nt({},o,{ref:t})),n):null}),N2=["Enter"," "],D2=["ArrowDown","PageUp","Home"],Yh=["ArrowUp","PageDown","End"],L2=[...D2,...Yh],Ua="Menu",[uc,M2,F2]=oh(Ua),[Ln,Jh]=Ir(Ua,[F2,zh,Nh]),Wa=zh(),Xh=Nh(),[j2,bi]=Ln(Ua),[B2,fc]=Ln(Ua),R2=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:i,modal:a=!0}=e,s=Wa(t),[l,u]=c.useState(null),f=c.useRef(!1),d=kr(i),p=ih(o);return c.useEffect(()=>{const h=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),c.createElement(O2,s,c.createElement(j2,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u},c.createElement(B2,{scope:t,onClose:c.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:p,modal:a},n)))},U2=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Wa(r);return c.createElement(T2,be({},o,n,{ref:t}))}),Zh="MenuPortal",[W2,V2]=Ln(Zh,{forceMount:void 0}),H2=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:o}=e,i=bi(Zh,t);return c.createElement(W2,{scope:t,forceMount:r},c.createElement(Ba,{present:r||i.open},c.createElement(k2,{asChild:!0,container:o},n)))},gn="MenuContent",[z2,Qh]=Ln(gn),G2=c.forwardRef((e,t)=>{const r=V2(gn,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,i=bi(gn,e.__scopeMenu),a=fc(gn,e.__scopeMenu);return c.createElement(uc.Provider,{scope:e.__scopeMenu},c.createElement(Ba,{present:n||i.open},c.createElement(uc.Slot,{scope:e.__scopeMenu},a.modal?c.createElement(K2,be({},o,{ref:t})):c.createElement(q2,be({},o,{ref:t})))))}),K2=c.forwardRef((e,t)=>{const r=bi(gn,e.__scopeMenu),n=c.useRef(null),o=er(t,n);return c.useEffect(()=>{const i=n.current;if(i)return Wp(i)},[]),c.createElement(eg,be({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:lt(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)}))}),q2=c.forwardRef((e,t)=>{const r=bi(gn,e.__scopeMenu);return c.createElement(eg,be({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)}))}),eg=c.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:h,disableOutsideScroll:g,...v}=e,y=bi(gn,r),m=fc(gn,r),w=Wa(r),E=Xh(r),x=M2(r),[P,I]=c.useState(null),S=c.useRef(null),O=er(t,S,y.onContentChange),k=c.useRef(0),j=c.useRef(""),D=c.useRef(0),N=c.useRef(null),J=c.useRef("right"),K=c.useRef(0),Y=g?Rp:c.Fragment,te=g?{as:xt,allowPinchZoom:!0}:void 0,oe=ae=>{var ge,ce;const q=j.current+ae,V=x().filter(R=>!R.disabled),re=document.activeElement,de=(ge=V.find(R=>R.ref.current===re))===null||ge===void 0?void 0:ge.textValue,U=V.map(R=>R.textValue),z=sS(U,q,de),M=(ce=V.find(R=>R.textValue===z))===null||ce===void 0?void 0:ce.ref.current;(function R(G){j.current=G,window.clearTimeout(k.current),G!==""&&(k.current=window.setTimeout(()=>R(""),1e3))})(q),M&&setTimeout(()=>M.focus())};c.useEffect(()=>()=>window.clearTimeout(k.current),[]),bx();const le=c.useCallback(ae=>{var ge,ce;return J.current===((ge=N.current)===null||ge===void 0?void 0:ge.side)&&cS(ae,(ce=N.current)===null||ce===void 0?void 0:ce.area)},[]);return c.createElement(z2,{scope:r,searchRef:j,onItemEnter:c.useCallback(ae=>{le(ae)&&ae.preventDefault()},[le]),onItemLeave:c.useCallback(ae=>{var ge;le(ae)||((ge=S.current)===null||ge===void 0||ge.focus(),I(null))},[le]),onTriggerLeave:c.useCallback(ae=>{le(ae)&&ae.preventDefault()},[le]),pointerGraceTimerRef:D,onPointerGraceIntentChange:c.useCallback(ae=>{N.current=ae},[])},c.createElement(Y,te,c.createElement(c2,{asChild:!0,trapped:o,onMountAutoFocus:lt(i,ae=>{var ge;ae.preventDefault(),(ge=S.current)===null||ge===void 0||ge.focus()}),onUnmountAutoFocus:a},c.createElement(a2,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:h},c.createElement(t2,be({asChild:!0},E,{dir:m.dir,orientation:"vertical",loop:n,currentTabStopId:P,onCurrentTabStopIdChange:I,onEntryFocus:lt(l,ae=>{m.isUsingKeyboardRef.current||ae.preventDefault()})}),c.createElement(I2,be({role:"menu","aria-orientation":"vertical","data-state":oS(y.open),"data-radix-menu-content":"",dir:m.dir},w,v,{ref:O,style:{outline:"none",...v.style},onKeyDown:lt(v.onKeyDown,ae=>{const ce=ae.target.closest("[data-radix-menu-content]")===ae.currentTarget,q=ae.ctrlKey||ae.altKey||ae.metaKey,V=ae.key.length===1;ce&&(ae.key==="Tab"&&ae.preventDefault(),!q&&V&&oe(ae.key));const re=S.current;if(ae.target!==re||!L2.includes(ae.key))return;ae.preventDefault();const U=x().filter(z=>!z.disabled).map(z=>z.ref.current);Yh.includes(ae.key)&&U.reverse(),iS(U)}),onBlur:lt(e.onBlur,ae=>{ae.currentTarget.contains(ae.target)||(window.clearTimeout(k.current),j.current="")}),onPointerMove:lt(e.onPointerMove,pc(ae=>{const ge=ae.target,ce=K.current!==ae.clientX;if(ae.currentTarget.contains(ge)&&ce){const q=ae.clientX>K.current?"right":"left";J.current=q,K.current=ae.clientX}}))})))))))}),Y2=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.createElement(Ge.div,be({role:"group"},n,{ref:t}))}),J2=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.createElement(Ge.div,be({},n,{ref:t}))}),dc="MenuItem",tg="menu.itemSelect",rg=c.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...o}=e,i=c.useRef(null),a=fc(dc,e.__scopeMenu),s=Qh(dc,e.__scopeMenu),l=er(t,i),u=c.useRef(!1),f=()=>{const d=i.current;if(!r&&d){const p=new CustomEvent(tg,{bubbles:!0,cancelable:!0});d.addEventListener(tg,h=>n?.(h),{once:!0}),Ud(d,p),p.defaultPrevented?u.current=!1:a.onClose()}};return c.createElement(X2,be({},o,{ref:l,disabled:r,onClick:lt(e.onClick,f),onPointerDown:d=>{var p;(p=e.onPointerDown)===null||p===void 0||p.call(e,d),u.current=!0},onPointerUp:lt(e.onPointerUp,d=>{var p;u.current||(p=d.currentTarget)===null||p===void 0||p.click()}),onKeyDown:lt(e.onKeyDown,d=>{const p=s.searchRef.current!=="";r||p&&d.key===" "||N2.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})}))}),X2=c.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...i}=e,a=Qh(dc,r),s=Xh(r),l=c.useRef(null),u=er(t,l),[f,d]=c.useState(!1),[p,h]=c.useState("");return c.useEffect(()=>{const g=l.current;if(g){var v;h(((v=g.textContent)!==null&&v!==void 0?v:"").trim())}},[i.children]),c.createElement(uc.ItemSlot,{scope:r,disabled:n,textValue:o??p},c.createElement(r2,be({asChild:!0},s,{focusable:!n}),c.createElement(Ge.div,be({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},i,{ref:u,onPointerMove:lt(e.onPointerMove,pc(g=>{n?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus())})),onPointerLeave:lt(e.onPointerLeave,pc(g=>a.onItemLeave(g))),onFocus:lt(e.onFocus,()=>d(!0)),onBlur:lt(e.onBlur,()=>d(!1))}))))}),Z2=c.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...o}=e;return c.createElement(Q2,{scope:e.__scopeMenu,checked:r},c.createElement(rg,be({role:"menuitemcheckbox","aria-checked":Va(r)?"mixed":r},o,{ref:t,"data-state":og(r),onSelect:lt(o.onSelect,()=>n?.(Va(r)?!0:!r),{checkForDefaultPrevented:!1})})))});Ln("MenuRadioGroup",{value:void 0,onValueChange:()=>{}});const ng="MenuItemIndicator",[Q2,eS]=Ln(ng,{checked:!1}),tS=c.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...o}=e,i=eS(ng,r);return c.createElement(Ba,{present:n||Va(i.checked)||i.checked===!0},c.createElement(Ge.span,be({},o,{ref:t,"data-state":og(i.checked)})))}),rS=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.createElement(Ge.div,be({role:"separator","aria-orientation":"horizontal"},n,{ref:t}))}),nS=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Wa(r);return c.createElement(P2,be({},o,n,{ref:t}))});Ln("MenuSub");function oS(e){return e?"open":"closed"}function Va(e){return e==="indeterminate"}function og(e){return Va(e)?"indeterminate":e?"checked":"unchecked"}function iS(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function aS(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function sS(e,t,r){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let a=aS(e,Math.max(i,0));o.length===1&&(a=a.filter(u=>u!==r));const l=a.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function lS(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,l=t[i].y,u=t[a].x,f=t[a].y;l>n!=f>n&&r<(u-s)*(n-l)/(f-l)+s&&(o=!o)}return o}function cS(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return lS(r,t)}function pc(e){return t=>t.pointerType==="mouse"?e(t):void 0}const uS=R2,fS=U2,dS=H2,pS=G2,hS=Y2,gS=J2,vS=rg,mS=Z2,bS=tS,yS=rS,wS=nS,ig="DropdownMenu",[_S,R9]=Ir(ig,[Jh]),mr=Jh(),[ES,ag]=_S(ig),xS=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,l=mr(t),u=c.useRef(null),[f=!1,d]=Gr({prop:o,defaultProp:i,onChange:a});return c.createElement(ES,{scope:t,triggerId:Xl(),triggerRef:u,contentId:Xl(),open:f,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(p=>!p),[d]),modal:s},c.createElement(uS,be({},l,{open:f,onOpenChange:d,dir:n,modal:s}),r))},SS="DropdownMenuTrigger",$S=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,i=ag(SS,r),a=mr(r);return c.createElement(fS,be({asChild:!0},a),c.createElement(Ge.button,be({type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n},o,{ref:Tl(t,i.triggerRef),onPointerDown:lt(e.onPointerDown,s=>{!n&&s.button===0&&s.ctrlKey===!1&&(i.onOpenToggle(),i.open||s.preventDefault())}),onKeyDown:lt(e.onKeyDown,s=>{n||(["Enter"," "].includes(s.key)&&i.onOpenToggle(),s.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})))}),CS=e=>{const{__scopeDropdownMenu:t,...r}=e,n=mr(t);return c.createElement(dS,be({},n,r))},AS="DropdownMenuContent",OS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=ag(AS,r),i=mr(r),a=c.useRef(!1);return c.createElement(pS,be({id:o.contentId,"aria-labelledby":o.triggerId},i,n,{ref:t,onCloseAutoFocus:lt(e.onCloseAutoFocus,s=>{var l;a.current||(l=o.triggerRef.current)===null||l===void 0||l.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:lt(e.onInteractOutside,s=>{const l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,f=l.button===2||u;(!o.modal||f)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),TS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=mr(r);return c.createElement(hS,be({},o,n,{ref:t}))}),IS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=mr(r);return c.createElement(gS,be({},o,n,{ref:t}))}),PS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=mr(r);return c.createElement(vS,be({},o,n,{ref:t}))}),kS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=mr(r);return c.createElement(mS,be({},o,n,{ref:t}))}),NS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=mr(r);return c.createElement(bS,be({},o,n,{ref:t}))}),DS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=mr(r);return c.createElement(yS,be({},o,n,{ref:t}))}),LS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=mr(r);return c.createElement(wS,be({},o,n,{ref:t}))}),MS=$S,FS=CS,jS=OS,BS=TS,RS=IS,US=PS,WS=kS,VS=NS,HS=DS,zS=LS;function GS(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function sg(e){const[t,r]=c.useState(void 0);return Tr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;r({width:a,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}const lg="Checkbox",[KS,U9]=fn(lg),[qS,YS]=KS(lg),JS=c.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:u,...f}=e,[d,p]=c.useState(null),h=Ct(t,E=>p(E)),g=c.useRef(!1),v=d?!!d.closest("form"):!0,[y=!1,m]=xa({prop:o,defaultProp:i,onChange:u}),w=c.useRef(y);return c.useEffect(()=>{const E=d?.form;if(E){const x=()=>m(w.current);return E.addEventListener("reset",x),()=>E.removeEventListener("reset",x)}},[d,m]),c.createElement(qS,{scope:r,state:y,disabled:s},c.createElement(ft.button,nt({type:"button",role:"checkbox","aria-checked":Mn(y)?"mixed":y,"aria-required":a,"data-state":cg(y),"data-disabled":s?"":void 0,disabled:s,value:l},f,{ref:h,onKeyDown:pt(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:pt(e.onClick,E=>{m(x=>Mn(x)?!0:!x),v&&(g.current=E.isPropagationStopped(),g.current||E.stopPropagation())})})),v&&c.createElement(QS,{control:d,bubbles:!g.current,name:n,value:l,checked:y,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),XS="CheckboxIndicator",ZS=c.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,i=YS(XS,r);return c.createElement(or,{present:n||Mn(i.state)||i.state===!0},c.createElement(ft.span,nt({"data-state":cg(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),QS=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,i=c.useRef(null),a=GS(r),s=sg(t);return c.useEffect(()=>{const l=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==r&&d){const p=new Event("click",{bubbles:n});l.indeterminate=Mn(r),d.call(l,Mn(r)?!1:r),l.dispatchEvent(p)}},[a,r,n]),c.createElement("input",nt({type:"checkbox","aria-hidden":!0,defaultChecked:Mn(r)?!1:r},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Mn(e){return e==="indeterminate"}function cg(e){return Mn(e)?"indeterminate":e?"checked":"unchecked"}const e$=JS,t$=ZS;function r$(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const ug="Switch",[n$,W9]=Ir(ug),[o$,i$]=n$(ug),a$=c.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:u,...f}=e,[d,p]=c.useState(null),h=er(t,w=>p(w)),g=c.useRef(!1),v=d?!!d.closest("form"):!0,[y=!1,m]=Gr({prop:o,defaultProp:i,onChange:u});return c.createElement(o$,{scope:r,checked:y,disabled:s},c.createElement(Ge.button,be({type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":fg(y),"data-disabled":s?"":void 0,disabled:s,value:l},f,{ref:h,onClick:lt(e.onClick,w=>{m(E=>!E),v&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})})),v&&c.createElement(c$,{control:d,bubbles:!g.current,name:n,value:l,checked:y,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),s$="SwitchThumb",l$=c.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=i$(s$,r);return c.createElement(Ge.span,be({"data-state":fg(o.checked),"data-disabled":o.disabled?"":void 0},n,{ref:t}))}),c$=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,i=c.useRef(null),a=r$(r),s=Ph(t);return c.useEffect(()=>{const l=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==r&&d){const p=new Event("click",{bubbles:n});d.call(l,r),l.dispatchEvent(p)}},[a,r,n]),c.createElement("input",be({type:"checkbox","aria-hidden":!0,defaultChecked:r},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function fg(e){return e?"checked":"unchecked"}const u$=a$,f$=l$;/*! *****************************************************************************
|
|
43
|
+
`)},Dx=0,mo=[];function Lx(e){var t=ve.useRef([]),r=ve.useRef([0,0]),n=ve.useRef(),o=ve.useState(Dx++)[0],i=ve.useState(function(){return Kp()})[0],a=ve.useRef(e);ve.useEffect(function(){a.current=e},[e]),ve.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=nx([e.lockRef.current],(e.shards||[]).map(Qp),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=ve.useCallback(function(v,b){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var m=Ba(v),w=r.current,E="deltaX"in v?v.deltaX:w[0]-m[0],x="deltaY"in v?v.deltaY:w[1]-m[1],k,I=v.target,S=Math.abs(E)>Math.abs(x)?"h":"v";if("touches"in v&&S==="h"&&I.type==="range")return!1;var C=Yp(S,I);if(!C)return!0;if(C?k=S:(k=S==="v"?"h":"v",C=Yp(S,I)),!C)return!1;if(!n.current&&"changedTouches"in v&&(E||x)&&(n.current=k),!k)return!0;var P=n.current||k;return Px(P,b,v,P==="h"?E:x,!0)},[]),l=ve.useCallback(function(v){var b=v;if(!(!mo.length||mo[mo.length-1]!==i)){var m="deltaY"in b?Zp(b):Ba(b),w=t.current.filter(function(k){return k.name===b.type&&k.target===b.target&&kx(k.delta,m)})[0];if(w&&w.should){b.cancelable&&b.preventDefault();return}if(!w){var E=(a.current.shards||[]).map(Qp).filter(Boolean).filter(function(k){return k.contains(b.target)}),x=E.length>0?s(b,E[0]):!a.current.noIsolation;x&&b.cancelable&&b.preventDefault()}}},[]),u=ve.useCallback(function(v,b,m,w){var E={name:v,delta:b,target:m,should:w};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(x){return x!==E})},1)},[]),f=ve.useCallback(function(v){r.current=Ba(v),n.current=void 0},[]),d=ve.useCallback(function(v){u(v.type,Zp(v),v.target,s(v,e.lockRef.current))},[]),p=ve.useCallback(function(v){u(v.type,Ba(v),v.target,s(v,e.lockRef.current))},[]);ve.useEffect(function(){return mo.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,vo),document.addEventListener("touchmove",l,vo),document.addEventListener("touchstart",f,vo),function(){mo=mo.filter(function(v){return v!==i}),document.removeEventListener("wheel",l,vo),document.removeEventListener("touchmove",l,vo),document.removeEventListener("touchstart",f,vo)}},[]);var h=e.removeScrollBar,g=e.inert;return ve.createElement(ve.Fragment,null,g?ve.createElement(i,{styles:Nx(o)}):null,h?ve.createElement(Sx,{gapMode:"margin"}):null)}const Mx=dx(Gp,Lx);var eh=ve.forwardRef(function(e,t){return ve.createElement(Fa,kr({},e,{ref:t,sideCar:Mx}))});eh.classNames=Fa.classNames;const th=eh;var Fx=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bo=new WeakMap,Ra=new WeakMap,Ua={},nc=0,rh=function(e){return e&&(e.host||rh(e.parentNode))},jx=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=rh(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Bx=function(e,t,r,n){var o=jx(t,Array.isArray(e)?e:[e]);Ua[r]||(Ua[r]=new WeakMap);var i=Ua[r],a=[],s=new Set,l=new Set(o),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(s.has(p))f(p);else{var h=p.getAttribute(n),g=h!==null&&h!=="false",v=(bo.get(p)||0)+1,b=(i.get(p)||0)+1;bo.set(p,v),i.set(p,b),a.push(p),v===1&&g&&Ra.set(p,!0),b===1&&p.setAttribute(r,"true"),g||p.setAttribute(n,"true")}})};return f(t),s.clear(),nc++,function(){a.forEach(function(d){var p=bo.get(d)-1,h=i.get(d)-1;bo.set(d,p),i.set(d,h),p||(Ra.has(d)||d.removeAttribute(n),Ra.delete(d)),h||d.removeAttribute(r)}),nc--,nc||(bo=new WeakMap,bo=new WeakMap,Ra=new WeakMap,Ua={})}},nh=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||Fx(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),Bx(n,o,r,"aria-hidden")):function(){return null}};const oh="Dialog",[ih,ah]=gn(oh),[Rx,gr]=ih(oh),Ux=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=c.useRef(null),l=c.useRef(null),[u=!1,f]=Na({prop:n,defaultProp:o,onChange:i});return c.createElement(Rx,{scope:t,triggerRef:s,contentRef:l,contentId:xi(),titleId:xi(),descriptionId:xi(),open:u,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(d=>!d),[f]),modal:a},r)},Wx="DialogTrigger",sh=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=gr(Wx,r),i=At(t,o.triggerRef);return c.createElement(ft.button,be({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":cc(o.open)},n,{ref:i,onClick:pt(e.onClick,o.onOpenToggle)}))}),lh="DialogPortal",[Vx,ch]=ih(lh,{forceMount:void 0}),uh=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,i=gr(lh,t);return c.createElement(Vx,{scope:t,forceMount:r},c.Children.map(n,a=>c.createElement(ir,{present:r||i.open},c.createElement(Wp,{asChild:!0,container:o},a))))},oc="DialogOverlay",fh=c.forwardRef((e,t)=>{const r=ch(oc,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=gr(oc,e.__scopeDialog);return i.modal?c.createElement(ir,{present:n||i.open},c.createElement(Hx,be({},o,{ref:t}))):null}),Hx=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=gr(oc,r);return c.createElement(th,{as:Gl,allowPinchZoom:!0,shards:[o.contentRef]},c.createElement(ft.div,be({"data-state":cc(o.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),Fn="DialogContent",Wa=c.forwardRef((e,t)=>{const r=ch(Fn,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=gr(Fn,e.__scopeDialog);return c.createElement(ir,{present:n||i.open},i.modal?c.createElement(zx,be({},o,{ref:t})):c.createElement(Gx,be({},o,{ref:t})))}),zx=c.forwardRef((e,t)=>{const r=gr(Fn,e.__scopeDialog),n=c.useRef(null),o=At(t,r.contentRef,n);return c.useEffect(()=>{const i=n.current;if(i)return nh(i)},[]),c.createElement(dh,be({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pt(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:pt(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:pt(e.onFocusOutside,i=>i.preventDefault())}))}),Gx=c.forwardRef((e,t)=>{const r=gr(Fn,e.__scopeDialog),n=c.useRef(!1);return c.createElement(dh,be({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i;if((i=e.onCloseAutoFocus)===null||i===void 0||i.call(e,o),!o.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}n.current=!1},onInteractOutside:o=>{var i,a;(i=e.onInteractOutside)===null||i===void 0||i.call(e,o),o.defaultPrevented||(n.current=!0);const s=o.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(s))&&o.preventDefault()}}))}),dh=c.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=gr(Fn,r),l=c.useRef(null),u=At(t,l);return rx(),c.createElement(c.Fragment,null,c.createElement(KE,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i},c.createElement(Dp,be({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":cc(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),ic="DialogTitle",ac=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=gr(ic,r);return c.createElement(ft.h2,be({id:o.titleId},n,{ref:t}))}),ph="DialogDescription",sc=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=gr(ph,r);return c.createElement(ft.p,be({id:o.descriptionId},n,{ref:t}))}),hh="DialogClose",lc=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=gr(hh,r);return c.createElement(ft.button,be({type:"button"},n,{ref:t,onClick:pt(e.onClick,()=>o.onOpenChange(!1))}))});function cc(e){return e?"open":"closed"}const Kx="DialogTitleWarning",[qx,kj]=oE(Kx,{contentName:Fn,titleName:ic,docsSlug:"dialog"}),uc=Ux,Yx=sh,Jx=uh,Xx=fh,Zx=Wa,Qx=ac,e2=sc,gh=lc,t2="AlertDialog",[r2,Nj]=gn(t2,[ah]),Gr=ah(),n2=e=>{const{__scopeAlertDialog:t,...r}=e,n=Gr(t);return c.createElement(uc,be({},n,r,{modal:!0}))},o2=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Gr(r);return c.createElement(Yx,be({},o,n,{ref:t}))}),i2=e=>{const{__scopeAlertDialog:t,...r}=e,n=Gr(t);return c.createElement(Jx,be({},n,r))},a2=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Gr(r);return c.createElement(Xx,be({},o,n,{ref:t}))}),vh="AlertDialogContent",[s2,l2]=r2(vh),c2=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...o}=e,i=Gr(r),a=c.useRef(null),s=At(t,a),l=c.useRef(null);return c.createElement(qx,{contentName:vh,titleName:u2,docsSlug:"alert-dialog"},c.createElement(s2,{scope:r,cancelRef:l},c.createElement(Zx,be({role:"alertdialog"},i,o,{ref:s,onOpenAutoFocus:pt(o.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=l.current)===null||f===void 0||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault()}),c.createElement(ql,null,n),!1)))}),u2="AlertDialogTitle",f2=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Gr(r);return c.createElement(Qx,be({},o,n,{ref:t}))}),d2=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Gr(r);return c.createElement(e2,be({},o,n,{ref:t}))}),p2=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Gr(r);return c.createElement(gh,be({},o,n,{ref:t}))}),h2="AlertDialogCancel",g2=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=l2(h2,r),i=Gr(r),a=At(t,o);return c.createElement(gh,be({},i,n,{ref:a}))}),v2=n2;function lt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function mh(e){const t=e+"CollectionProvider",[r,n]=Pr(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:g,children:v}=h,b=c.useRef(null),m=c.useRef(new Map).current;return c.createElement(o,{scope:g,itemMap:m,collectionRef:b},v)},s=e+"CollectionSlot",l=c.forwardRef((h,g)=>{const{scope:v,children:b}=h,m=i(s,v),w=tr(g,m.collectionRef);return c.createElement(St,{ref:w},b)}),u=e+"CollectionItemSlot",f="data-radix-collection-item",d=c.forwardRef((h,g)=>{const{scope:v,children:b,...m}=h,w=c.useRef(null),E=tr(g,w),x=i(u,v);return c.useEffect(()=>(x.itemMap.set(w,{ref:w,...m}),()=>void x.itemMap.delete(w))),c.createElement(St,{[f]:"",ref:E},b)});function p(h){const g=i(e+"CollectionConsumer",h);return c.useCallback(()=>{const b=g.collectionRef.current;if(!b)return[];const m=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((x,k)=>m.indexOf(x.ref.current)-m.indexOf(k.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,n]}const m2=c.createContext(void 0);function bh(e){const t=c.useContext(m2);return e||t||"ltr"}function Nr(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function b2(e,t=globalThis==null?void 0:globalThis.document){const r=Nr(e);c.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}let fc=0;function y2(){c.useEffect(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:yh()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:yh()),fc++,()=>{fc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),fc--}},[])}function yh(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const yo=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},w2=ve.useId||(()=>{});let _2=0;function dc(e){const[t,r]=ve.useState(w2());return yo(()=>{e||r(n=>n??String(_2++))},[e]),e||(t?`radix-${t}`:"")}function wo(e){return e.split("-")[1]}function pc(e){return e==="y"?"height":"width"}function Kr(e){return e.split("-")[0]}function jn(e){return["top","bottom"].includes(Kr(e))?"x":"y"}function wh(e,t,r){let{reference:n,floating:o}=e;const i=n.x+n.width/2-o.width/2,a=n.y+n.height/2-o.height/2,s=jn(t),l=pc(s),u=n[l]/2-o[l]/2,f=s==="x";let d;switch(Kr(t)){case"top":d={x:i,y:n.y-o.height};break;case"bottom":d={x:i,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:a};break;case"left":d={x:n.x-o.width,y:a};break;default:d={x:n.x,y:n.y}}switch(wo(t)){case"start":d[s]-=u*(r&&f?-1:1);break;case"end":d[s]+=u*(r&&f?-1:1)}return d}const E2=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=wh(u,n,l),p=n,h={},g=0;for(let v=0;v<s.length;v++){const{name:b,fn:m}=s[v],{x:w,y:E,data:x,reset:k}=await m({x:f,y:d,initialPlacement:n,placement:p,strategy:o,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});f=w??f,d=E??d,h={...h,[b]:{...h[b],...x}},k&&g<=50&&(g++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(u=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:f,y:d}=wh(u,p,l)),v=-1)}return{x:f,y:d,placement:p,strategy:o,middlewareData:h}};function _h(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function Va(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Si(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=t,g=_h(h),v=s[p?d==="floating"?"reference":"floating":d],b=Va(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(v)))==null||r?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:l})),m=d==="floating"?{...a.floating,x:n,y:o}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),E=await(i.isElement==null?void 0:i.isElement(w))&&await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1},x=Va(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:m,offsetParent:w,strategy:l}):m);return{top:(b.top-x.top+g.top)/E.y,bottom:(x.bottom-b.bottom+g.bottom)/E.y,left:(b.left-x.left+g.left)/E.x,right:(x.right-b.right+g.right)/E.x}}const hc=Math.min,Bn=Math.max;function gc(e,t,r){return Bn(e,hc(t,r))}const Eh=e=>({name:"arrow",options:e,async fn(t){const{element:r,padding:n=0}=e||{},{x:o,y:i,placement:a,rects:s,platform:l,elements:u}=t;if(r==null)return{};const f=_h(n),d={x:o,y:i},p=jn(a),h=pc(p),g=await l.getDimensions(r),v=p==="y",b=v?"top":"left",m=v?"bottom":"right",w=v?"clientHeight":"clientWidth",E=s.reference[h]+s.reference[p]-d[p]-s.floating[h],x=d[p]-s.reference[p],k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let I=k?k[w]:0;I&&await(l.isElement==null?void 0:l.isElement(k))||(I=u.floating[w]||s.floating[h]);const S=E/2-x/2,C=f[b],P=I-g[h]-f[m],F=I/2-g[h]/2+S,D=gc(C,F,P),N=wo(a)!=null&&F!=D&&s.reference[h]/2-(F<C?f[b]:f[m])-g[h]/2<0;return{[p]:d[p]-(N?F<C?C-F:P-F:0),data:{[p]:D,centerOffset:F-D}}}}),xh=["top","right","bottom","left"];xh.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const x2={left:"right",right:"left",bottom:"top",top:"bottom"};function Ha(e){return e.replace(/left|right|bottom|top/g,t=>x2[t])}function S2(e,t,r){r===void 0&&(r=!1);const n=wo(e),o=jn(e),i=pc(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ha(a)),{main:a,cross:Ha(a)}}const $2={start:"end",end:"start"};function vc(e){return e.replace(/start|end/g,t=>$2[t])}const C2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r;const{placement:n,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...v}=e,b=Kr(n),m=Kr(a)===a,w=await(s.isRTL==null?void 0:s.isRTL(l.floating)),E=d||(m||!g?[Ha(a)]:function(D){const N=Ha(D);return[vc(D),N,vc(N)]}(a));d||h==="none"||E.push(...function(D,N,J,G){const Y=wo(D);let te=function(oe,le,ae){const ge=["left","right"],ce=["right","left"],K=["top","bottom"],q=["bottom","top"];switch(oe){case"top":case"bottom":return ae?le?ce:ge:le?ge:ce;case"left":case"right":return le?K:q;default:return[]}}(Kr(D),J==="start",G);return Y&&(te=te.map(oe=>oe+"-"+Y),N&&(te=te.concat(te.map(vc)))),te}(a,g,h,w));const x=[a,...E],k=await Si(t,v),I=[];let S=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[b]),f){const{main:D,cross:N}=S2(n,i,w);I.push(k[D],k[N])}if(S=[...S,{placement:n,overflows:I}],!I.every(D=>D<=0)){var C,P;const D=(((C=o.flip)==null?void 0:C.index)||0)+1,N=x[D];if(N)return{data:{index:D,overflows:S},reset:{placement:N}};let J=(P=S.filter(G=>G.overflows[0]<=0).sort((G,Y)=>G.overflows[1]-Y.overflows[1])[0])==null?void 0:P.placement;if(!J)switch(p){case"bestFit":{var F;const G=(F=S.map(Y=>[Y.placement,Y.overflows.filter(te=>te>0).reduce((te,oe)=>te+oe,0)]).sort((Y,te)=>Y[1]-te[1])[0])==null?void 0:F[0];G&&(J=G);break}case"initialPlacement":J=a}if(n!==J)return{reset:{placement:J}}}return{}}}};function Sh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $h(e){return xh.some(t=>e[t]>=0)}const A2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{strategy:r="referenceHidden",...n}=e,{rects:o}=t;switch(r){case"referenceHidden":{const i=Sh(await Si(t,{...n,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:$h(i)}}}case"escaped":{const i=Sh(await Si(t,{...n,altBoundary:!0}),o.floating);return{data:{escapedOffsets:i,escaped:$h(i)}}}default:return{}}}}},O2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await async function(i,a){const{placement:s,platform:l,elements:u}=i,f=await(l.isRTL==null?void 0:l.isRTL(u.floating)),d=Kr(s),p=wo(s),h=jn(s)==="x",g=["left","top"].includes(d)?-1:1,v=f&&h?-1:1,b=typeof a=="function"?a(i):a;let{mainAxis:m,crossAxis:w,alignmentAxis:E}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...b};return p&&typeof E=="number"&&(w=p==="end"?-1*E:E),h?{x:w*v,y:m*g}:{x:m*g,y:w*v}}(t,e);return{x:r+o.x,y:n+o.y,data:o}}}};function Ch(e){return e==="x"?"y":"x"}const T2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:b=>{let{x:m,y:w}=b;return{x:m,y:w}}},...l}=e,u={x:r,y:n},f=await Si(t,l),d=jn(Kr(o)),p=Ch(d);let h=u[d],g=u[p];if(i){const b=d==="y"?"bottom":"right";h=gc(h+f[d==="y"?"top":"left"],h,h-f[b])}if(a){const b=p==="y"?"bottom":"right";g=gc(g+f[p==="y"?"top":"left"],g,g-f[b])}const v=s.fn({...t,[d]:h,[p]:g});return{...v,data:{x:v.x-r,y:v.y-n}}}}},I2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,f={x:r,y:n},d=jn(o),p=Ch(d);let h=f[d],g=f[p];const v=typeof s=="function"?s(t):s,b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const E=d==="y"?"height":"width",x=i.reference[d]-i.floating[E]+b.mainAxis,k=i.reference[d]+i.reference[E]-b.mainAxis;h<x?h=x:h>k&&(h=k)}if(u){var m,w;const E=d==="y"?"width":"height",x=["top","left"].includes(Kr(o)),k=i.reference[p]-i.floating[E]+(x&&((m=a.offset)==null?void 0:m[p])||0)+(x?0:b.crossAxis),I=i.reference[p]+i.reference[E]+(x?0:((w=a.offset)==null?void 0:w[p])||0)-(x?b.crossAxis:0);g<k?g=k:g>I&&(g=I)}return{[d]:h,[p]:g}}}},P2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:i}=t,{apply:a=()=>{},...s}=e,l=await Si(t,s),u=Kr(r),f=wo(r),d=jn(r)==="x",{width:p,height:h}=n.floating;let g,v;u==="top"||u==="bottom"?(g=u,v=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(v=u,g=f==="end"?"top":"bottom");const b=h-l[g],m=p-l[v],w=!t.middlewareData.shift;let E=b,x=m;if(d){const I=p-l.left-l.right;x=f||w?hc(m,I):I}else{const I=h-l.top-l.bottom;E=f||w?hc(b,I):I}if(w&&!f){const I=Bn(l.left,0),S=Bn(l.right,0),C=Bn(l.top,0),P=Bn(l.bottom,0);d?x=p-2*(I!==0||S!==0?I+S:Bn(l.left,l.right)):E=h-2*(C!==0||P!==0?C+P:Bn(l.top,l.bottom))}await a({...t,availableWidth:x,availableHeight:E});const k=await o.getDimensions(i.floating);return p!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function ar(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vr(e){return ar(e).getComputedStyle(e)}function Ah(e){return e instanceof ar(e).Node}function vn(e){return Ah(e)?(e.nodeName||"").toLowerCase():""}function mr(e){return e instanceof ar(e).HTMLElement}function rr(e){return e instanceof ar(e).Element}function Oh(e){return typeof ShadowRoot>"u"?!1:e instanceof ar(e).ShadowRoot||e instanceof ShadowRoot}function $i(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=vr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function k2(e){return["table","td","th"].includes(vn(e))}function mc(e){const t=bc(),r=vr(e);return r.transform!=="none"||r.perspective!=="none"||!t&&!!r.backdropFilter&&r.backdropFilter!=="none"||!t&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function bc(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function za(e){return["html","body","#document"].includes(vn(e))}const Th=Math.min,Ci=Math.max,Ga=Math.round;function Ih(e){const t=vr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=mr(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=Ga(r)!==i||Ga(n)!==a;return s&&(r=i,n=a),{width:r,height:n,fallback:s}}function Ph(e){return rr(e)?e:e.contextElement}const kh={x:1,y:1};function _o(e){const t=Ph(e);if(!mr(t))return kh;const r=t.getBoundingClientRect(),{width:n,height:o,fallback:i}=Ih(t);let a=(i?Ga(r.width):r.width)/n,s=(i?Ga(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Nh={x:0,y:0};function Dh(e,t,r){var n,o;if(t===void 0&&(t=!0),!bc())return Nh;const i=e?ar(e):window;return!r||t&&r!==i?Nh:{x:((n=i.visualViewport)==null?void 0:n.offsetLeft)||0,y:((o=i.visualViewport)==null?void 0:o.offsetTop)||0}}function Rn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=Ph(e);let a=kh;t&&(n?rr(n)&&(a=_o(n)):a=_o(e));const s=Dh(i,r,n);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,f=o.width/a.x,d=o.height/a.y;if(i){const p=ar(i),h=n&&rr(n)?ar(n):n;let g=p.frameElement;for(;g&&n&&h!==p;){const v=_o(g),b=g.getBoundingClientRect(),m=getComputedStyle(g);b.x+=(g.clientLeft+parseFloat(m.paddingLeft))*v.x,b.y+=(g.clientTop+parseFloat(m.paddingTop))*v.y,l*=v.x,u*=v.y,f*=v.x,d*=v.y,l+=b.x,u+=b.y,g=ar(g).frameElement}}return Va({width:f,height:d,x:l,y:u})}function mn(e){return((Ah(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ka(e){return rr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Lh(e){return Rn(mn(e)).left+Ka(e).scrollLeft}function Eo(e){if(vn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Oh(e)&&e.host||mn(e);return Oh(t)?t.host:t}function Mh(e){const t=Eo(e);return za(t)?t.ownerDocument.body:mr(t)&&$i(t)?t:Mh(t)}function Ai(e,t){var r;t===void 0&&(t=[]);const n=Mh(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=ar(n);return o?t.concat(i,i.visualViewport||[],$i(n)?n:[]):t.concat(n,Ai(n))}function Fh(e,t,r){let n;if(t==="viewport")n=function(o,i){const a=ar(o),s=mn(o),l=a.visualViewport;let u=s.clientWidth,f=s.clientHeight,d=0,p=0;if(l){u=l.width,f=l.height;const h=bc();(!h||h&&i==="fixed")&&(d=l.offsetLeft,p=l.offsetTop)}return{width:u,height:f,x:d,y:p}}(e,r);else if(t==="document")n=function(o){const i=mn(o),a=Ka(o),s=o.ownerDocument.body,l=Ci(i.scrollWidth,i.clientWidth,s.scrollWidth,s.clientWidth),u=Ci(i.scrollHeight,i.clientHeight,s.scrollHeight,s.clientHeight);let f=-a.scrollLeft+Lh(o);const d=-a.scrollTop;return vr(s).direction==="rtl"&&(f+=Ci(i.clientWidth,s.clientWidth)-l),{width:l,height:u,x:f,y:d}}(mn(e));else if(rr(t))n=function(o,i){const a=Rn(o,!0,i==="fixed"),s=a.top+o.clientTop,l=a.left+o.clientLeft,u=mr(o)?_o(o):{x:1,y:1};return{width:o.clientWidth*u.x,height:o.clientHeight*u.y,x:l*u.x,y:s*u.y}}(t,r);else{const o=Dh(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return Va(n)}function jh(e,t){const r=Eo(e);return!(r===t||!rr(r)||za(r))&&(vr(r).position==="fixed"||jh(r,t))}function Bh(e,t){return mr(e)&&vr(e).position!=="fixed"?t?t(e):e.offsetParent:null}function Rh(e,t){const r=ar(e);if(!mr(e))return r;let n=Bh(e,t);for(;n&&k2(n)&&vr(n).position==="static";)n=Bh(n,t);return n&&(vn(n)==="html"||vn(n)==="body"&&vr(n).position==="static"&&!mc(n))?r:n||function(o){let i=Eo(o);for(;mr(i)&&!za(i);){if(mc(i))return i;i=Eo(i)}return null}(e)||r}function N2(e,t,r){const n=mr(t),o=mn(t),i=r==="fixed",a=Rn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&!i)if((vn(t)!=="body"||$i(o))&&(s=Ka(t)),mr(t)){const u=Rn(t,!0,i,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else o&&(l.x=Lh(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}const D2={getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=r==="clippingAncestors"?function(u,f){const d=f.get(u);if(d)return d;let p=Ai(u).filter(b=>rr(b)&&vn(b)!=="body"),h=null;const g=vr(u).position==="fixed";let v=g?Eo(u):u;for(;rr(v)&&!za(v);){const b=vr(v),m=mc(v);m||b.position!=="fixed"||(h=null),(g?!m&&!h:!m&&b.position==="static"&&h&&["absolute","fixed"].includes(h.position)||$i(v)&&!m&&jh(u,v))?p=p.filter(w=>w!==v):h=b,v=Eo(v)}return f.set(u,p),p}(t,this._c):[].concat(r),a=[...i,n],s=a[0],l=a.reduce((u,f)=>{const d=Fh(t,f,o);return u.top=Ci(d.top,u.top),u.right=Th(d.right,u.right),u.bottom=Th(d.bottom,u.bottom),u.left=Ci(d.left,u.left),u},Fh(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=mr(r),i=mn(r);if(r===i)return t;let a={scrollLeft:0,scrollTop:0},s={x:1,y:1};const l={x:0,y:0};if((o||!o&&n!=="fixed")&&((vn(r)!=="body"||$i(i))&&(a=Ka(r)),mr(r))){const u=Rn(r);s=_o(r),l.x=u.x+r.clientLeft,l.y=u.y+r.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}},isElement:rr,getDimensions:function(e){return Ih(e)},getOffsetParent:Rh,getDocumentElement:mn,getScale:_o,async getElementRects(e){let{reference:t,floating:r,strategy:n}=e;const o=this.getOffsetParent||Rh,i=this.getDimensions;return{reference:N2(t,await o(r),n),floating:{x:0,y:0,...await i(r)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>vr(e).direction==="rtl"};function L2(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=n,l=o||i?[...rr(e)?Ai(e):e.contextElement?Ai(e.contextElement):[],...Ai(t)]:[];l.forEach(p=>{const h=!rr(p)&&p.toString().includes("V");!o||s&&!h||p.addEventListener("scroll",r,{passive:!0}),i&&p.addEventListener("resize",r)});let u,f=null;a&&(f=new ResizeObserver(()=>{r()}),rr(e)&&!s&&f.observe(e),rr(e)||!e.contextElement||s||f.observe(e.contextElement),f.observe(t));let d=s?Rn(e):null;return s&&function p(){const h=Rn(e);!d||h.x===d.x&&h.y===d.y&&h.width===d.width&&h.height===d.height||r(),d=h,u=requestAnimationFrame(p)}(),r(),()=>{var p;l.forEach(h=>{o&&h.removeEventListener("scroll",r),i&&h.removeEventListener("resize",r)}),(p=f)==null||p.disconnect(),f=null,s&&cancelAnimationFrame(u)}}const M2=(e,t,r)=>{const n=new Map,o={platform:D2,...r},i={...o.platform,_c:n};return E2(e,t,{...o,platform:i})},F2=e=>{const{element:t,padding:r}=e;function n(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return t&&n(t)?t.current!=null?Eh({element:t.current,padding:r}).fn(o):{}:t?Eh({element:t,padding:r}).fn(o):{}}}};var qa=typeof document<"u"?c.useLayoutEffect:c.useEffect;function Ya(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Ya(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!Ya(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Uh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wh(e,t){const r=Uh(e);return Math.round(t*r)/r}function Vh(e){const t=ve.useRef(e);return qa(()=>{t.current=e}),t}function j2(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[f,d]=ve.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=ve.useState(n);Ya(p,n)||h(n);const[g,v]=ve.useState(null),[b,m]=ve.useState(null),w=ve.useCallback(te=>{te!=I.current&&(I.current=te,v(te))},[v]),E=ve.useCallback(te=>{te!==S.current&&(S.current=te,m(te))},[m]),x=i||g,k=a||b,I=ve.useRef(null),S=ve.useRef(null),C=ve.useRef(f),P=Vh(l),F=Vh(o),D=ve.useCallback(()=>{if(!I.current||!S.current)return;const te={placement:t,strategy:r,middleware:p};F.current&&(te.platform=F.current),M2(I.current,S.current,te).then(oe=>{const le={...oe,isPositioned:!0};N.current&&!Ya(C.current,le)&&(C.current=le,Vd.flushSync(()=>{d(le)}))})},[p,t,r,F]);qa(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(te=>({...te,isPositioned:!1})))},[u]);const N=ve.useRef(!1);qa(()=>(N.current=!0,()=>{N.current=!1}),[]),qa(()=>{if(x&&(I.current=x),k&&(S.current=k),x&&k){if(P.current)return P.current(x,k,D);D()}},[x,k,D,P]);const J=ve.useMemo(()=>({reference:I,floating:S,setReference:w,setFloating:E}),[w,E]),G=ve.useMemo(()=>({reference:x,floating:k}),[x,k]),Y=ve.useMemo(()=>{const te={position:r,left:0,top:0};if(!G.floating)return te;const oe=Wh(G.floating,f.x),le=Wh(G.floating,f.y);return s?{...te,transform:"translate("+oe+"px, "+le+"px)",...Uh(G.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:oe,top:le}},[r,s,G.floating,f.x,f.y]);return ve.useMemo(()=>({...f,update:D,refs:J,elements:G,floatingStyles:Y}),[f,D,J,G,Y])}const B2=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return c.createElement(Ge.svg,be({},i,{ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?r:c.createElement("polygon",{points:"0,0 30,0 15,10"}))});function Hh(e){const[t,r]=c.useState(void 0);return yo(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;r({width:a,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}function R2(e,t){return c.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const Ja=e=>{const{present:t,children:r}=e,n=U2(t),o=typeof r=="function"?r({present:n.isPresent}):c.Children.only(r),i=tr(n.ref,o.ref);return typeof r=="function"||n.isPresent?c.cloneElement(o,{ref:i}):null};Ja.displayName="Presence";function U2(e){const[t,r]=c.useState(),n=c.useRef({}),o=c.useRef(e),i=c.useRef("none"),a=e?"mounted":"unmounted",[s,l]=R2(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=Xa(n.current);i.current=s==="mounted"?u:"none"},[s]),yo(()=>{const u=n.current,f=o.current;if(f!==e){const p=i.current,h=Xa(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),yo(()=>{if(t){const u=d=>{const h=Xa(n.current).includes(d.animationName);d.target===t&&h&&ln.flushSync(()=>l("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=Xa(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:c.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function Xa(e){return(e==null?void 0:e.animationName)||"none"}function qr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=W2({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=Nr(r),l=c.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else o(u)},[i,e,o,s]);return[a,l]}function W2({defaultProp:e,onChange:t}){const r=c.useState(e),[n]=r,o=c.useRef(n),i=Nr(t);return c.useEffect(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}const yc="rovingFocusGroup.onEntryFocus",V2={bubbles:!1,cancelable:!0},wc="RovingFocusGroup",[_c,zh,H2]=mh(wc),[z2,Gh]=Pr(wc,[H2]),[G2,K2]=z2(wc),q2=c.forwardRef((e,t)=>c.createElement(_c.Provider,{scope:e.__scopeRovingFocusGroup},c.createElement(_c.Slot,{scope:e.__scopeRovingFocusGroup},c.createElement(Y2,be({},e,{ref:t}))))),Y2=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...f}=e,d=c.useRef(null),p=tr(t,d),h=bh(i),[g=null,v]=qr({prop:a,defaultProp:s,onChange:l}),[b,m]=c.useState(!1),w=Nr(u),E=zh(r),x=c.useRef(!1),[k,I]=c.useState(0);return c.useEffect(()=>{const S=d.current;if(S)return S.addEventListener(yc,w),()=>S.removeEventListener(yc,w)},[w]),c.createElement(G2,{scope:r,orientation:n,dir:h,loop:o,currentTabStopId:g,onItemFocus:c.useCallback(S=>v(S),[v]),onItemShiftTab:c.useCallback(()=>m(!0),[]),onFocusableItemAdd:c.useCallback(()=>I(S=>S+1),[]),onFocusableItemRemove:c.useCallback(()=>I(S=>S-1),[])},c.createElement(Ge.div,be({tabIndex:b||k===0?-1:0,"data-orientation":n},f,{ref:p,style:{outline:"none",...e.style},onMouseDown:lt(e.onMouseDown,()=>{x.current=!0}),onFocus:lt(e.onFocus,S=>{const C=!x.current;if(S.target===S.currentTarget&&C&&!b){const P=new CustomEvent(yc,V2);if(S.currentTarget.dispatchEvent(P),!P.defaultPrevented){const F=E().filter(Y=>Y.focusable),D=F.find(Y=>Y.active),N=F.find(Y=>Y.id===g),G=[D,N,...F].filter(Boolean).map(Y=>Y.ref.current);Kh(G)}}x.current=!1}),onBlur:lt(e.onBlur,()=>m(!1))})))}),J2="RovingFocusGroupItem",X2=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:i,...a}=e,s=dc(),l=i||s,u=K2(J2,r),f=u.currentTabStopId===l,d=zh(r),{onFocusableItemAdd:p,onFocusableItemRemove:h}=u;return c.useEffect(()=>{if(n)return p(),()=>h()},[n,p,h]),c.createElement(_c.ItemSlot,{scope:r,id:l,focusable:n,active:o},c.createElement(Ge.span,be({tabIndex:f?0:-1,"data-orientation":u.orientation},a,{ref:t,onMouseDown:lt(e.onMouseDown,g=>{n?u.onItemFocus(l):g.preventDefault()}),onFocus:lt(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:lt(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const v=eS(g,u.orientation,u.dir);if(v!==void 0){g.preventDefault();let m=d().filter(w=>w.focusable).map(w=>w.ref.current);if(v==="last")m.reverse();else if(v==="prev"||v==="next"){v==="prev"&&m.reverse();const w=m.indexOf(g.currentTarget);m=u.loop?tS(m,w+1):m.slice(w+1)}setTimeout(()=>Kh(m))}})})))}),Z2={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Q2(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function eS(e,t,r){const n=Q2(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Z2[n]}function Kh(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function tS(e,t){return e.map((r,n)=>e[(t+n)%e.length])}const rS=q2,nS=X2,Ec="dismissableLayer.update",oS="dismissableLayer.pointerDownOutside",iS="dismissableLayer.focusOutside";let qh;const aS=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),sS=c.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,f=c.useContext(aS),[d,p]=c.useState(null),h=(r=d==null?void 0:d.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,g]=c.useState({}),v=tr(t,C=>p(C)),b=Array.from(f.layers),[m]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=b.indexOf(m),E=d?b.indexOf(d):-1,x=f.layersWithOutsidePointerEventsDisabled.size>0,k=E>=w,I=lS(C=>{const P=C.target,F=[...f.branches].some(D=>D.contains(P));!k||F||(i==null||i(C),s==null||s(C),C.defaultPrevented||l==null||l())},h),S=cS(C=>{const P=C.target;[...f.branches].some(D=>D.contains(P))||(a==null||a(C),s==null||s(C),C.defaultPrevented||l==null||l())},h);return b2(C=>{E===f.layers.size-1&&(o==null||o(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},h),c.useEffect(()=>{if(d)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(qh=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),Yh(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=qh)}},[d,h,n,f]),c.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),Yh())},[d,f]),c.useEffect(()=>{const C=()=>g({});return document.addEventListener(Ec,C),()=>document.removeEventListener(Ec,C)},[]),c.createElement(Ge.div,be({},u,{ref:v,style:{pointerEvents:x?k?"auto":"none":void 0,...e.style},onFocusCapture:lt(e.onFocusCapture,S.onFocusCapture),onBlurCapture:lt(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:lt(e.onPointerDownCapture,I.onPointerDownCapture)}))});function lS(e,t=globalThis==null?void 0:globalThis.document){const r=Nr(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let u=function(){Jh(oS,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function cS(e,t=globalThis==null?void 0:globalThis.document){const r=Nr(e),n=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!n.current&&Jh(iS,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Yh(){const e=new CustomEvent(Ec);document.dispatchEvent(e)}function Jh(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?np(o,i):o.dispatchEvent(i)}const xc="focusScope.autoFocusOnMount",Sc="focusScope.autoFocusOnUnmount",Xh={bubbles:!1,cancelable:!0},uS=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=c.useState(null),u=Nr(o),f=Nr(i),d=c.useRef(null),p=tr(t,v=>l(v)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let v=function(E){if(h.paused||!s)return;const x=E.target;s.contains(x)?d.current=x:bn(d.current,{select:!0})},b=function(E){if(h.paused||!s)return;const x=E.relatedTarget;x!==null&&(s.contains(x)||bn(d.current,{select:!0}))},m=function(E){const x=document.activeElement;for(const k of E)k.removedNodes.length>0&&(s!=null&&s.contains(x)||bn(s))};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const w=new MutationObserver(m);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),w.disconnect()}}},[n,s,h.paused]),c.useEffect(()=>{if(s){eg.add(h);const v=document.activeElement;if(!s.contains(v)){const m=new CustomEvent(xc,Xh);s.addEventListener(xc,u),s.dispatchEvent(m),m.defaultPrevented||(fS(vS(Zh(s)),{select:!0}),document.activeElement===v&&bn(s))}return()=>{s.removeEventListener(xc,u),setTimeout(()=>{const m=new CustomEvent(Sc,Xh);s.addEventListener(Sc,f),s.dispatchEvent(m),m.defaultPrevented||bn(v??document.body,{select:!0}),s.removeEventListener(Sc,f),eg.remove(h)},0)}}},[s,u,f,h]);const g=c.useCallback(v=>{if(!r&&!n||h.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,m=document.activeElement;if(b&&m){const w=v.currentTarget,[E,x]=dS(w);E&&x?!v.shiftKey&&m===x?(v.preventDefault(),r&&bn(E,{select:!0})):v.shiftKey&&m===E&&(v.preventDefault(),r&&bn(x,{select:!0})):m===w&&v.preventDefault()}},[r,n,h.paused]);return c.createElement(Ge.div,be({tabIndex:-1},a,{ref:p,onKeyDown:g}))});function fS(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(bn(n,{select:t}),document.activeElement!==r)return}function dS(e){const t=Zh(e),r=Qh(t,e),n=Qh(t.reverse(),e);return[r,n]}function Zh(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Qh(e,t){for(const r of e)if(!pS(r,{upTo:t}))return r}function pS(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function hS(e){return e instanceof HTMLInputElement&&"select"in e}function bn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&hS(e)&&t&&e.select()}}const eg=gS();function gS(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=tg(e,t),e.unshift(t)},remove(t){var r;e=tg(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function tg(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function vS(e){return e.filter(t=>t.tagName!=="A")}const rg="Popper",[ng,og]=Pr(rg),[mS,ig]=ng(rg),bS=e=>{const{__scopePopper:t,children:r}=e,[n,o]=c.useState(null);return c.createElement(mS,{scope:t,anchor:n,onAnchorChange:o},r)},yS="PopperAnchor",wS=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=ig(yS,r),a=c.useRef(null),s=tr(t,a);return c.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||a.current)}),n?null:c.createElement(Ge.div,be({},o,{ref:s}))}),ag="PopperContent",[_S,ES]=ng(ag),xS=c.forwardRef((e,t)=>{var r,n,o,i,a,s,l,u;const{__scopePopper:f,side:d="bottom",sideOffset:p=0,align:h="center",alignOffset:g=0,arrowPadding:v=0,collisionBoundary:b=[],collisionPadding:m=0,sticky:w="partial",hideWhenDetached:E=!1,avoidCollisions:x=!0,onPlaced:k,...I}=e,S=ig(ag,f),[C,P]=c.useState(null),F=tr(t,ne=>P(ne)),[D,N]=c.useState(null),J=Hh(D),G=(r=J==null?void 0:J.width)!==null&&r!==void 0?r:0,Y=(n=J==null?void 0:J.height)!==null&&n!==void 0?n:0,te=d+(h!=="center"?"-"+h:""),oe=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},le=Array.isArray(b)?b:[b],ae=le.length>0,ge={padding:oe,boundary:le.filter($S),altBoundary:ae},{refs:ce,floatingStyles:K,placement:q,isPositioned:re,middlewareData:de}=j2({strategy:"fixed",placement:te,whileElementsMounted:L2,elements:{reference:S.anchor},middleware:[O2({mainAxis:p+Y,alignmentAxis:g}),x&&T2({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?I2():void 0,...ge}),x&&C2({...ge}),P2({...ge,apply:({elements:ne,rects:pe,availableWidth:me,availableHeight:xe})=>{const{width:Ee,height:ie}=pe.reference,Ne=ne.floating.style;Ne.setProperty("--radix-popper-available-width",`${me}px`),Ne.setProperty("--radix-popper-available-height",`${xe}px`),Ne.setProperty("--radix-popper-anchor-width",`${Ee}px`),Ne.setProperty("--radix-popper-anchor-height",`${ie}px`)}}),D&&F2({element:D,padding:v}),CS({arrowWidth:G,arrowHeight:Y}),E&&A2({strategy:"referenceHidden"})]}),[U,H]=cg(q),M=Nr(k);yo(()=>{re&&(M==null||M())},[re,M]);const R=(o=de.arrow)===null||o===void 0?void 0:o.x,z=(i=de.arrow)===null||i===void 0?void 0:i.y,O=((a=de.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[T,Z]=c.useState();return yo(()=>{C&&Z(window.getComputedStyle(C).zIndex)},[C]),c.createElement("div",{ref:ce.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:re?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:T,"--radix-popper-transform-origin":[(s=de.transformOrigin)===null||s===void 0?void 0:s.x,(l=de.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},c.createElement(_S,{scope:f,placedSide:U,onArrowChange:N,arrowX:R,arrowY:z,shouldHideArrow:O},c.createElement(Ge.div,be({"data-side":U,"data-align":H},I,{ref:F,style:{...I.style,animation:re?void 0:"none",opacity:(u=de.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),sg="PopperArrow",SS={top:"bottom",right:"left",bottom:"top",left:"right"},lg=c.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=ES(sg,n),a=SS[i.placedSide];return c.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},c.createElement(B2,be({},o,{ref:r,style:{...o.style,display:"block"}})))});function $S(e){return e!==null}const CS=e=>({name:"transformOrigin",options:e,fn(t){var r,n,o,i,a;const{placement:s,rects:l,middlewareData:u}=t,d=((r=u.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,p=d?0:e.arrowWidth,h=d?0:e.arrowHeight,[g,v]=cg(s),b={start:"0%",center:"50%",end:"100%"}[v],m=((n=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&n!==void 0?n:0)+p/2,w=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+h/2;let E="",x="";return g==="bottom"?(E=d?b:`${m}px`,x=`${-h}px`):g==="top"?(E=d?b:`${m}px`,x=`${l.floating.height+h}px`):g==="right"?(E=`${-h}px`,x=d?b:`${w}px`):g==="left"&&(E=`${l.floating.width+h}px`,x=d?b:`${w}px`),{data:{x:E,y:x}}}});function cg(e){const[t,r="center"]=e.split("-");return[t,r]}const AS=bS,OS=wS,TS=xS,IS=lg,PS=c.forwardRef((e,t)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...o}=e;return n?ln.createPortal(c.createElement(Ge.div,be({},o,{ref:t})),n):null}),kS=["Enter"," "],NS=["ArrowDown","PageUp","Home"],ug=["ArrowUp","PageDown","End"],DS=[...NS,...ug],Za="Menu",[$c,LS,MS]=mh(Za),[Un,fg]=Pr(Za,[MS,og,Gh]),Qa=og(),dg=Gh(),[FS,Oi]=Un(Za),[jS,Cc]=Un(Za),BS=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:i,modal:a=!0}=e,s=Qa(t),[l,u]=c.useState(null),f=c.useRef(!1),d=Nr(i),p=bh(o);return c.useEffect(()=>{const h=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),c.createElement(AS,s,c.createElement(FS,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u},c.createElement(jS,{scope:t,onClose:c.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:p,modal:a},n)))},RS=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Qa(r);return c.createElement(OS,be({},o,n,{ref:t}))}),pg="MenuPortal",[US,WS]=Un(pg,{forceMount:void 0}),VS=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:o}=e,i=Oi(pg,t);return c.createElement(US,{scope:t,forceMount:r},c.createElement(Ja,{present:r||i.open},c.createElement(PS,{asChild:!0,container:o},n)))},yn="MenuContent",[HS,hg]=Un(yn),zS=c.forwardRef((e,t)=>{const r=WS(yn,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,i=Oi(yn,e.__scopeMenu),a=Cc(yn,e.__scopeMenu);return c.createElement($c.Provider,{scope:e.__scopeMenu},c.createElement(Ja,{present:n||i.open},c.createElement($c.Slot,{scope:e.__scopeMenu},a.modal?c.createElement(GS,be({},o,{ref:t})):c.createElement(KS,be({},o,{ref:t})))))}),GS=c.forwardRef((e,t)=>{const r=Oi(yn,e.__scopeMenu),n=c.useRef(null),o=tr(t,n);return c.useEffect(()=>{const i=n.current;if(i)return nh(i)},[]),c.createElement(gg,be({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:lt(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)}))}),KS=c.forwardRef((e,t)=>{const r=Oi(yn,e.__scopeMenu);return c.createElement(gg,be({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)}))}),gg=c.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:h,disableOutsideScroll:g,...v}=e,b=Oi(yn,r),m=Cc(yn,r),w=Qa(r),E=dg(r),x=LS(r),[k,I]=c.useState(null),S=c.useRef(null),C=tr(t,S,b.onContentChange),P=c.useRef(0),F=c.useRef(""),D=c.useRef(0),N=c.useRef(null),J=c.useRef("right"),G=c.useRef(0),Y=g?th:c.Fragment,te=g?{as:St,allowPinchZoom:!0}:void 0,oe=ae=>{var ge,ce;const K=F.current+ae,q=x().filter(R=>!R.disabled),re=document.activeElement,de=(ge=q.find(R=>R.ref.current===re))===null||ge===void 0?void 0:ge.textValue,U=q.map(R=>R.textValue),H=a$(U,K,de),M=(ce=q.find(R=>R.textValue===H))===null||ce===void 0?void 0:ce.ref.current;(function R(z){F.current=z,window.clearTimeout(P.current),z!==""&&(P.current=window.setTimeout(()=>R(""),1e3))})(K),M&&setTimeout(()=>M.focus())};c.useEffect(()=>()=>window.clearTimeout(P.current),[]),y2();const le=c.useCallback(ae=>{var ge,ce;return J.current===((ge=N.current)===null||ge===void 0?void 0:ge.side)&&l$(ae,(ce=N.current)===null||ce===void 0?void 0:ce.area)},[]);return c.createElement(HS,{scope:r,searchRef:F,onItemEnter:c.useCallback(ae=>{le(ae)&&ae.preventDefault()},[le]),onItemLeave:c.useCallback(ae=>{var ge;le(ae)||((ge=S.current)===null||ge===void 0||ge.focus(),I(null))},[le]),onTriggerLeave:c.useCallback(ae=>{le(ae)&&ae.preventDefault()},[le]),pointerGraceTimerRef:D,onPointerGraceIntentChange:c.useCallback(ae=>{N.current=ae},[])},c.createElement(Y,te,c.createElement(uS,{asChild:!0,trapped:o,onMountAutoFocus:lt(i,ae=>{var ge;ae.preventDefault(),(ge=S.current)===null||ge===void 0||ge.focus()}),onUnmountAutoFocus:a},c.createElement(sS,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:h},c.createElement(rS,be({asChild:!0},E,{dir:m.dir,orientation:"vertical",loop:n,currentTabStopId:k,onCurrentTabStopIdChange:I,onEntryFocus:lt(l,ae=>{m.isUsingKeyboardRef.current||ae.preventDefault()})}),c.createElement(TS,be({role:"menu","aria-orientation":"vertical","data-state":n$(b.open),"data-radix-menu-content":"",dir:m.dir},w,v,{ref:C,style:{outline:"none",...v.style},onKeyDown:lt(v.onKeyDown,ae=>{const ce=ae.target.closest("[data-radix-menu-content]")===ae.currentTarget,K=ae.ctrlKey||ae.altKey||ae.metaKey,q=ae.key.length===1;ce&&(ae.key==="Tab"&&ae.preventDefault(),!K&&q&&oe(ae.key));const re=S.current;if(ae.target!==re||!DS.includes(ae.key))return;ae.preventDefault();const U=x().filter(H=>!H.disabled).map(H=>H.ref.current);ug.includes(ae.key)&&U.reverse(),o$(U)}),onBlur:lt(e.onBlur,ae=>{ae.currentTarget.contains(ae.target)||(window.clearTimeout(P.current),F.current="")}),onPointerMove:lt(e.onPointerMove,Oc(ae=>{const ge=ae.target,ce=G.current!==ae.clientX;if(ae.currentTarget.contains(ge)&&ce){const K=ae.clientX>G.current?"right":"left";J.current=K,G.current=ae.clientX}}))})))))))}),qS=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.createElement(Ge.div,be({role:"group"},n,{ref:t}))}),YS=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.createElement(Ge.div,be({},n,{ref:t}))}),Ac="MenuItem",vg="menu.itemSelect",mg=c.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...o}=e,i=c.useRef(null),a=Cc(Ac,e.__scopeMenu),s=hg(Ac,e.__scopeMenu),l=tr(t,i),u=c.useRef(!1),f=()=>{const d=i.current;if(!r&&d){const p=new CustomEvent(vg,{bubbles:!0,cancelable:!0});d.addEventListener(vg,h=>n==null?void 0:n(h),{once:!0}),np(d,p),p.defaultPrevented?u.current=!1:a.onClose()}};return c.createElement(JS,be({},o,{ref:l,disabled:r,onClick:lt(e.onClick,f),onPointerDown:d=>{var p;(p=e.onPointerDown)===null||p===void 0||p.call(e,d),u.current=!0},onPointerUp:lt(e.onPointerUp,d=>{var p;u.current||(p=d.currentTarget)===null||p===void 0||p.click()}),onKeyDown:lt(e.onKeyDown,d=>{const p=s.searchRef.current!=="";r||p&&d.key===" "||kS.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})}))}),JS=c.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...i}=e,a=hg(Ac,r),s=dg(r),l=c.useRef(null),u=tr(t,l),[f,d]=c.useState(!1),[p,h]=c.useState("");return c.useEffect(()=>{const g=l.current;if(g){var v;h(((v=g.textContent)!==null&&v!==void 0?v:"").trim())}},[i.children]),c.createElement($c.ItemSlot,{scope:r,disabled:n,textValue:o??p},c.createElement(nS,be({asChild:!0},s,{focusable:!n}),c.createElement(Ge.div,be({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},i,{ref:u,onPointerMove:lt(e.onPointerMove,Oc(g=>{n?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus())})),onPointerLeave:lt(e.onPointerLeave,Oc(g=>a.onItemLeave(g))),onFocus:lt(e.onFocus,()=>d(!0)),onBlur:lt(e.onBlur,()=>d(!1))}))))}),XS=c.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...o}=e;return c.createElement(ZS,{scope:e.__scopeMenu,checked:r},c.createElement(mg,be({role:"menuitemcheckbox","aria-checked":es(r)?"mixed":r},o,{ref:t,"data-state":yg(r),onSelect:lt(o.onSelect,()=>n==null?void 0:n(es(r)?!0:!r),{checkForDefaultPrevented:!1})})))});Un("MenuRadioGroup",{value:void 0,onValueChange:()=>{}});const bg="MenuItemIndicator",[ZS,QS]=Un(bg,{checked:!1}),e$=c.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...o}=e,i=QS(bg,r);return c.createElement(Ja,{present:n||es(i.checked)||i.checked===!0},c.createElement(Ge.span,be({},o,{ref:t,"data-state":yg(i.checked)})))}),t$=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.createElement(Ge.div,be({role:"separator","aria-orientation":"horizontal"},n,{ref:t}))}),r$=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Qa(r);return c.createElement(IS,be({},o,n,{ref:t}))});Un("MenuSub");function n$(e){return e?"open":"closed"}function es(e){return e==="indeterminate"}function yg(e){return es(e)?"indeterminate":e?"checked":"unchecked"}function o$(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function i$(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function a$(e,t,r){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let a=i$(e,Math.max(i,0));o.length===1&&(a=a.filter(u=>u!==r));const l=a.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function s$(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,l=t[i].y,u=t[a].x,f=t[a].y;l>n!=f>n&&r<(u-s)*(n-l)/(f-l)+s&&(o=!o)}return o}function l$(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return s$(r,t)}function Oc(e){return t=>t.pointerType==="mouse"?e(t):void 0}const c$=BS,u$=RS,f$=VS,d$=zS,p$=qS,h$=YS,g$=mg,v$=XS,m$=e$,b$=t$,y$=r$,wg="DropdownMenu",[w$,Fj]=Pr(wg,[fg]),br=fg(),[_$,_g]=w$(wg),E$=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,l=br(t),u=c.useRef(null),[f=!1,d]=qr({prop:o,defaultProp:i,onChange:a});return c.createElement(_$,{scope:t,triggerId:dc(),triggerRef:u,contentId:dc(),open:f,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(p=>!p),[d]),modal:s},c.createElement(c$,be({},l,{open:f,onOpenChange:d,dir:n,modal:s}),r))},x$="DropdownMenuTrigger",S$=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,i=_g(x$,r),a=br(r);return c.createElement(u$,be({asChild:!0},a),c.createElement(Ge.button,be({type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n},o,{ref:Rl(t,i.triggerRef),onPointerDown:lt(e.onPointerDown,s=>{!n&&s.button===0&&s.ctrlKey===!1&&(i.onOpenToggle(),i.open||s.preventDefault())}),onKeyDown:lt(e.onKeyDown,s=>{n||(["Enter"," "].includes(s.key)&&i.onOpenToggle(),s.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})))}),$$=e=>{const{__scopeDropdownMenu:t,...r}=e,n=br(t);return c.createElement(f$,be({},n,r))},C$="DropdownMenuContent",A$=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=_g(C$,r),i=br(r),a=c.useRef(!1);return c.createElement(d$,be({id:o.contentId,"aria-labelledby":o.triggerId},i,n,{ref:t,onCloseAutoFocus:lt(e.onCloseAutoFocus,s=>{var l;a.current||(l=o.triggerRef.current)===null||l===void 0||l.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:lt(e.onInteractOutside,s=>{const l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,f=l.button===2||u;(!o.modal||f)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),O$=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=br(r);return c.createElement(p$,be({},o,n,{ref:t}))}),T$=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=br(r);return c.createElement(h$,be({},o,n,{ref:t}))}),I$=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=br(r);return c.createElement(g$,be({},o,n,{ref:t}))}),P$=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=br(r);return c.createElement(v$,be({},o,n,{ref:t}))}),k$=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=br(r);return c.createElement(m$,be({},o,n,{ref:t}))}),N$=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=br(r);return c.createElement(b$,be({},o,n,{ref:t}))}),D$=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=br(r);return c.createElement(y$,be({},o,n,{ref:t}))}),L$=S$,M$=$$,F$=A$,j$=O$,B$=T$,R$=I$,U$=P$,W$=k$,V$=N$,H$=D$;function z$(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Eg(e){const[t,r]=c.useState(void 0);return Ir(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;r({width:a,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}const xg="Checkbox",[G$,jj]=gn(xg),[K$,q$]=G$(xg),Y$=c.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:u,...f}=e,[d,p]=c.useState(null),h=At(t,E=>p(E)),g=c.useRef(!1),v=d?!!d.closest("form"):!0,[b=!1,m]=Na({prop:o,defaultProp:i,onChange:u}),w=c.useRef(b);return c.useEffect(()=>{const E=d==null?void 0:d.form;if(E){const x=()=>m(w.current);return E.addEventListener("reset",x),()=>E.removeEventListener("reset",x)}},[d,m]),c.createElement(K$,{scope:r,state:b,disabled:s},c.createElement(ft.button,st({type:"button",role:"checkbox","aria-checked":Wn(b)?"mixed":b,"aria-required":a,"data-state":Sg(b),"data-disabled":s?"":void 0,disabled:s,value:l},f,{ref:h,onKeyDown:pt(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:pt(e.onClick,E=>{m(x=>Wn(x)?!0:!x),v&&(g.current=E.isPropagationStopped(),g.current||E.stopPropagation())})})),v&&c.createElement(Z$,{control:d,bubbles:!g.current,name:n,value:l,checked:b,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),J$="CheckboxIndicator",X$=c.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,i=q$(J$,r);return c.createElement(ir,{present:n||Wn(i.state)||i.state===!0},c.createElement(ft.span,st({"data-state":Sg(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),Z$=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,i=c.useRef(null),a=z$(r),s=Eg(t);return c.useEffect(()=>{const l=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==r&&d){const p=new Event("click",{bubbles:n});l.indeterminate=Wn(r),d.call(l,Wn(r)?!1:r),l.dispatchEvent(p)}},[a,r,n]),c.createElement("input",st({type:"checkbox","aria-hidden":!0,defaultChecked:Wn(r)?!1:r},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Wn(e){return e==="indeterminate"}function Sg(e){return Wn(e)?"indeterminate":e?"checked":"unchecked"}const Q$=Y$,eC=X$;function tC(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const $g="Switch",[rC,Bj]=Pr($g),[nC,oC]=rC($g),iC=c.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:u,...f}=e,[d,p]=c.useState(null),h=tr(t,w=>p(w)),g=c.useRef(!1),v=d?!!d.closest("form"):!0,[b=!1,m]=qr({prop:o,defaultProp:i,onChange:u});return c.createElement(nC,{scope:r,checked:b,disabled:s},c.createElement(Ge.button,be({type:"button",role:"switch","aria-checked":b,"aria-required":a,"data-state":Cg(b),"data-disabled":s?"":void 0,disabled:s,value:l},f,{ref:h,onClick:lt(e.onClick,w=>{m(E=>!E),v&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})})),v&&c.createElement(lC,{control:d,bubbles:!g.current,name:n,value:l,checked:b,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),aC="SwitchThumb",sC=c.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=oC(aC,r);return c.createElement(Ge.span,be({"data-state":Cg(o.checked),"data-disabled":o.disabled?"":void 0},n,{ref:t}))}),lC=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,i=c.useRef(null),a=tC(r),s=Hh(t);return c.useEffect(()=>{const l=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==r&&d){const p=new Event("click",{bubbles:n});d.call(l,r),l.dispatchEvent(p)}},[a,r,n]),c.createElement("input",be({type:"checkbox","aria-hidden":!0,defaultChecked:r},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Cg(e){return e?"checked":"unchecked"}const cC=iC,uC=sC;/*! *****************************************************************************
|
|
44
44
|
Copyright (c) Microsoft Corporation.
|
|
45
45
|
|
|
46
46
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -53,7 +53,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
53
53
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
54
54
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
55
55
|
PERFORMANCE OF THIS SOFTWARE.
|
|
56
|
-
***************************************************************************** */function
|
|
56
|
+
***************************************************************************** */function Ag(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var fC=function(e){var t,r=e.current,n=e.previous,o=e.value;if(r[0]!==r[1]||typeof r[0]!="number"||typeof r[1]!="number")return null;var i=r[0],a=r[1];return i>0&&n[0]===i&&n[1]===i+1?[i-1,a]:!((t=o[i])===null||t===void 0)&&t.length?[i,a+1]:null},Tc=function(e){return[+e.selectionStart,+e.selectionEnd]},Og=[0,0],ts=function(e,t){return e[0]===t[0]&&e[1]===t[1]},dC=function(e){var t=e.inputRef,r=e.previousRef,n=e.setSelection;return c.useCallback(function(o){var i=o.type,a=t.current,s=r.current;if(!(!s||!a)){var l=a.selectionDirection,u=a.value,f=Tc(a),d=function(p){ts(p,s)&&(ts(p,Og)||ts(p,Tc(a)))||(r.current=p,n(function(h){return ts(h,p)?h:p}),a.setSelectionRange.apply(a,Ag(Ag([],p,!1),[l||void 0],!1)))};if(i==="selectionchange"&&document.activeElement!==a)return d([u.length,u.length]);d(fC({previous:s,current:f,direction:l,value:u})||f)}},[t,r,n])},pC=function(e){var t=e.inputRef,r=e.previousRef,n=e.handler;c.useLayoutEffect(function(){var o=t.current;r.current===void 0&&o&&(r.current=Tc(o));var i=n;return o==null||o.addEventListener("input",i),document.addEventListener("selectionchange",i),function(){o==null||o.removeEventListener("input",i),document.removeEventListener("selectionchange",i)}},[t,n,r])},hC=function(e){var t=c.useState(Og),r=t[0],n=t[1],o=c.useRef(),i=dC({inputRef:e,previousRef:o,setSelection:n});return pC({inputRef:e,previousRef:o,handler:i}),r},Ic={exports:{}},Ti={};/**
|
|
57
57
|
* @license React
|
|
58
58
|
* react-jsx-runtime.production.min.js
|
|
59
59
|
*
|
|
@@ -61,7 +61,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
61
61
|
*
|
|
62
62
|
* This source code is licensed under the MIT license found in the
|
|
63
63
|
* LICENSE file in the root directory of this source tree.
|
|
64
|
-
*/var
|
|
64
|
+
*/var Tg;function gC(){if(Tg)return Ti;Tg=1;var e=c,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(s,l,u){var f,d={},p=null,h=null;u!==void 0&&(p=""+u),l.key!==void 0&&(p=""+l.key),l.ref!==void 0&&(h=l.ref);for(f in l)n.call(l,f)&&!i.hasOwnProperty(f)&&(d[f]=l[f]);if(s&&s.defaultProps)for(f in l=s.defaultProps,l)d[f]===void 0&&(d[f]=l[f]);return{$$typeof:t,type:s,key:p,ref:h,props:d,_owner:o.current}}return Ti.Fragment=r,Ti.jsx=a,Ti.jsxs=a,Ti}var Ii={};/**
|
|
65
65
|
* @license React
|
|
66
66
|
* react-jsx-runtime.development.js
|
|
67
67
|
*
|
|
@@ -69,92 +69,92 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the MIT license found in the
|
|
71
71
|
* LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/var
|
|
73
|
-
`+
|
|
74
|
-
`),
|
|
75
|
-
`),mt=
|
|
76
|
-
`+
|
|
72
|
+
*/var Ig;function vC(){return Ig||(Ig=1,process.env.NODE_ENV!=="production"&&function(){var e=c,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),g=Symbol.iterator,v="@@iterator";function b(V){if(V===null||typeof V!="object")return null;var fe=g&&V[g]||V[v];return typeof fe=="function"?fe:null}var m=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(V){{for(var fe=arguments.length,_e=new Array(fe>1?fe-1:0),Oe=1;Oe<fe;Oe++)_e[Oe-1]=arguments[Oe];E("error",V,_e)}}function E(V,fe,_e){{var Oe=m.ReactDebugCurrentFrame,qe=Oe.getStackAddendum();qe!==""&&(fe+="%s",_e=_e.concat([qe]));var je=_e.map(function(Re){return String(Re)});je.unshift("Warning: "+fe),Function.prototype.apply.call(console[V],console,je)}}var x=!1,k=!1,I=!1,S=!1,C=!1,P;P=Symbol.for("react.module.reference");function F(V){return!!(typeof V=="string"||typeof V=="function"||V===n||V===i||C||V===o||V===u||V===f||S||V===h||x||k||I||typeof V=="object"&&V!==null&&(V.$$typeof===p||V.$$typeof===d||V.$$typeof===a||V.$$typeof===s||V.$$typeof===l||V.$$typeof===P||V.getModuleId!==void 0))}function D(V,fe,_e){var Oe=V.displayName;if(Oe)return Oe;var qe=fe.displayName||fe.name||"";return qe!==""?_e+"("+qe+")":_e}function N(V){return V.displayName||"Context"}function J(V){if(V==null)return null;if(typeof V.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof V=="function")return V.displayName||V.name||null;if(typeof V=="string")return V;switch(V){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if(typeof V=="object")switch(V.$$typeof){case s:var fe=V;return N(fe)+".Consumer";case a:var _e=V;return N(_e._context)+".Provider";case l:return D(V,V.render,"ForwardRef");case d:var Oe=V.displayName||null;return Oe!==null?Oe:J(V.type)||"Memo";case p:{var qe=V,je=qe._payload,Re=qe._init;try{return J(Re(je))}catch{return null}}}return null}var G=Object.assign,Y=0,te,oe,le,ae,ge,ce,K;function q(){}q.__reactDisabledLog=!0;function re(){{if(Y===0){te=console.log,oe=console.info,le=console.warn,ae=console.error,ge=console.group,ce=console.groupCollapsed,K=console.groupEnd;var V={configurable:!0,enumerable:!0,value:q,writable:!0};Object.defineProperties(console,{info:V,log:V,warn:V,error:V,group:V,groupCollapsed:V,groupEnd:V})}Y++}}function de(){{if(Y--,Y===0){var V={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},V,{value:te}),info:G({},V,{value:oe}),warn:G({},V,{value:le}),error:G({},V,{value:ae}),group:G({},V,{value:ge}),groupCollapsed:G({},V,{value:ce}),groupEnd:G({},V,{value:K})})}Y<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var U=m.ReactCurrentDispatcher,H;function M(V,fe,_e){{if(H===void 0)try{throw Error()}catch(qe){var Oe=qe.stack.trim().match(/\n( *(at )?)/);H=Oe&&Oe[1]||""}return`
|
|
73
|
+
`+H+V}}var R=!1,z;{var O=typeof WeakMap=="function"?WeakMap:Map;z=new O}function T(V,fe){if(!V||R)return"";{var _e=z.get(V);if(_e!==void 0)return _e}var Oe;R=!0;var qe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var je;je=U.current,U.current=null,re();try{if(fe){var Re=function(){throw Error()};if(Object.defineProperty(Re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Re,[])}catch(Pt){Oe=Pt}Reflect.construct(V,[],Re)}else{try{Re.call()}catch(Pt){Oe=Pt}V.call(Re.prototype)}}else{try{throw Error()}catch(Pt){Oe=Pt}V()}}catch(Pt){if(Pt&&Oe&&typeof Pt.stack=="string"){for(var Be=Pt.stack.split(`
|
|
74
|
+
`),It=Oe.stack.split(`
|
|
75
|
+
`),mt=Be.length-1,yt=It.length-1;mt>=1&&yt>=0&&Be[mt]!==It[yt];)yt--;for(;mt>=1&&yt>=0;mt--,yt--)if(Be[mt]!==It[yt]){if(mt!==1||yt!==1)do if(mt--,yt--,yt<0||Be[mt]!==It[yt]){var Wt=`
|
|
76
|
+
`+Be[mt].replace(" at new "," at ");return V.displayName&&Wt.includes("<anonymous>")&&(Wt=Wt.replace("<anonymous>",V.displayName)),typeof V=="function"&&z.set(V,Wt),Wt}while(mt>=1&&yt>=0);break}}}finally{R=!1,U.current=je,de(),Error.prepareStackTrace=qe}var er=V?V.displayName||V.name:"",ci=er?M(er):"";return typeof V=="function"&&z.set(V,ci),ci}function Z(V,fe,_e){return T(V,!1)}function ne(V){var fe=V.prototype;return!!(fe&&fe.isReactComponent)}function pe(V,fe,_e){if(V==null)return"";if(typeof V=="function")return T(V,ne(V));if(typeof V=="string")return M(V);switch(V){case u:return M("Suspense");case f:return M("SuspenseList")}if(typeof V=="object")switch(V.$$typeof){case l:return Z(V.render);case d:return pe(V.type,fe,_e);case p:{var Oe=V,qe=Oe._payload,je=Oe._init;try{return pe(je(qe),fe,_e)}catch{}}}return""}var me=Object.prototype.hasOwnProperty,xe={},Ee=m.ReactDebugCurrentFrame;function ie(V){if(V){var fe=V._owner,_e=pe(V.type,V._source,fe?fe.type:null);Ee.setExtraStackFrame(_e)}else Ee.setExtraStackFrame(null)}function Ne(V,fe,_e,Oe,qe){{var je=Function.call.bind(me);for(var Re in V)if(je(V,Re)){var Be=void 0;try{if(typeof V[Re]!="function"){var It=Error((Oe||"React class")+": "+_e+" type `"+Re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof V[Re]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw It.name="Invariant Violation",It}Be=V[Re](fe,Re,Oe,_e,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(mt){Be=mt}Be&&!(Be instanceof Error)&&(ie(qe),w("%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).",Oe||"React class",_e,Re,typeof Be),ie(null)),Be instanceof Error&&!(Be.message in xe)&&(xe[Be.message]=!0,ie(qe),w("Failed %s type: %s",_e,Be.message),ie(null))}}}var dt=Array.isArray;function Te(V){return dt(V)}function Fe(V){{var fe=typeof Symbol=="function"&&Symbol.toStringTag,_e=fe&&V[Symbol.toStringTag]||V.constructor.name||"Object";return _e}}function bt(V){try{return $e(V),!1}catch{return!0}}function $e(V){return""+V}function De(V){if(bt(V))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Fe(V)),$e(V)}var A=m.ReactCurrentOwner,y={key:!0,ref:!0,__self:!0,__source:!0},_,L,W;W={};function X(V){if(me.call(V,"ref")){var fe=Object.getOwnPropertyDescriptor(V,"ref").get;if(fe&&fe.isReactWarning)return!1}return V.ref!==void 0}function se(V){if(me.call(V,"key")){var fe=Object.getOwnPropertyDescriptor(V,"key").get;if(fe&&fe.isReactWarning)return!1}return V.key!==void 0}function Pe(V,fe){if(typeof V.ref=="string"&&A.current&&fe&&A.current.stateNode!==fe){var _e=J(A.current.type);W[_e]||(w('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',J(A.current.type),V.ref),W[_e]=!0)}}function nt(V,fe){{var _e=function(){_||(_=!0,w("%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)",fe))};_e.isReactWarning=!0,Object.defineProperty(V,"key",{get:_e,configurable:!0})}}function Me(V,fe){{var _e=function(){L||(L=!0,w("%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)",fe))};_e.isReactWarning=!0,Object.defineProperty(V,"ref",{get:_e,configurable:!0})}}var Je=function(V,fe,_e,Oe,qe,je,Re){var Be={$$typeof:t,type:V,key:fe,ref:_e,props:Re,_owner:je};return Be._store={},Object.defineProperty(Be._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Be,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Oe}),Object.defineProperty(Be,"_source",{configurable:!1,enumerable:!1,writable:!1,value:qe}),Object.freeze&&(Object.freeze(Be.props),Object.freeze(Be)),Be};function Ze(V,fe,_e,Oe,qe){{var je,Re={},Be=null,It=null;_e!==void 0&&(De(_e),Be=""+_e),se(fe)&&(De(fe.key),Be=""+fe.key),X(fe)&&(It=fe.ref,Pe(fe,qe));for(je in fe)me.call(fe,je)&&!y.hasOwnProperty(je)&&(Re[je]=fe[je]);if(V&&V.defaultProps){var mt=V.defaultProps;for(je in mt)Re[je]===void 0&&(Re[je]=mt[je])}if(Be||It){var yt=typeof V=="function"?V.displayName||V.name||"Unknown":V;Be&&nt(Re,yt),It&&Me(Re,yt)}return Je(V,Be,It,qe,Oe,A.current,Re)}}var on=m.ReactCurrentOwner,oi=m.ReactDebugCurrentFrame;function dr(V){if(V){var fe=V._owner,_e=pe(V.type,V._source,fe?fe.type:null);oi.setExtraStackFrame(_e)}else oi.setExtraStackFrame(null)}var Yt;Yt=!1;function io(V){return typeof V=="object"&&V!==null&&V.$$typeof===t}function Nt(){{if(on.current){var V=J(on.current.type);if(V)return`
|
|
77
77
|
|
|
78
|
-
Check the render method of \``+
|
|
78
|
+
Check the render method of \``+V+"`."}return""}}function pa(V){{if(V!==void 0){var fe=V.fileName.replace(/^.*[\\\/]/,""),_e=V.lineNumber;return`
|
|
79
79
|
|
|
80
|
-
Check your code at `+fe+":"+_e+"."}return""}}var
|
|
80
|
+
Check your code at `+fe+":"+_e+"."}return""}}var ii={};function ha(V){{var fe=Nt();if(!fe){var _e=typeof V=="string"?V:V.displayName||V.name;_e&&(fe=`
|
|
81
81
|
|
|
82
|
-
Check the top-level render call using <`+_e+">.")}return fe}}function Zo(H,fe){{if(!H._store||H._store.validated||H.key!=null)return;H._store.validated=!0;var _e=ia(fe);if(Xo[_e])return;Xo[_e]=!0;var Oe="";H&&H._owner&&H._owner!==tn.current&&(Oe=" It was passed a child from "+J(H._owner.type)+"."),fr(H),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',_e,Oe),fr(null)}}function Qo(H,fe){{if(typeof H!="object")return;if(Te(H))for(var _e=0;_e<H.length;_e++){var Oe=H[_e];ro(Oe)&&Zo(Oe,fe)}else if(ro(H))H._store&&(H._store.validated=!0);else if(H){var qe=y(H);if(typeof qe=="function"&&qe!==H.entries)for(var Fe=qe.call(H),Be;!(Be=Fe.next()).done;)ro(Be.value)&&Zo(Be.value,fe)}}}function $t(H){{var fe=H.type;if(fe==null||typeof fe=="string")return;var _e;if(typeof fe=="function")_e=fe.propTypes;else if(typeof fe=="object"&&(fe.$$typeof===l||fe.$$typeof===d))_e=fe.propTypes;else return;if(_e){var Oe=J(fe);Ne(_e,H.props,"prop",Oe,H)}else if(fe.PropTypes!==void 0&&!Kt){Kt=!0;var qe=J(fe);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",qe||"Unknown")}typeof fe.getDefaultProps=="function"&&!fe.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function aa(H){{for(var fe=Object.keys(H.props),_e=0;_e<fe.length;_e++){var Oe=fe[_e];if(Oe!=="children"&&Oe!=="key"){fr(H),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Oe),fr(null);break}}H.ref!==null&&(fr(H),w("Invalid attribute `ref` supplied to `React.Fragment`."),fr(null))}}function ei(H,fe,_e,Oe,qe,Fe){{var Be=j(H);if(!Be){var je="";(H===void 0||typeof H=="object"&&H!==null&&Object.keys(H).length===0)&&(je+=" 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 Tt=oa(qe);Tt?je+=Tt:je+=kt();var mt;H===null?mt="null":Te(H)?mt="array":H!==void 0&&H.$$typeof===t?(mt="<"+(J(H.type)||"Unknown")+" />",je=" Did you accidentally export a JSX literal instead of a component?"):mt=typeof H,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",mt,je)}var yt=Ze(H,fe,_e,qe,Fe);if(yt==null)return yt;if(Be){var Rt=fe.children;if(Rt!==void 0)if(Oe)if(Te(Rt)){for(var Qt=0;Qt<Rt.length;Qt++)Qo(Rt[Qt],H);Object.freeze&&Object.freeze(Rt)}else w("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 Qo(Rt,H)}return H===n?aa(yt):$t(yt),yt}}function sa(H,fe,_e){return ei(H,fe,_e,!0)}function la(H,fe,_e){return ei(H,fe,_e,!1)}var ca=la,qt=sa;wi.Fragment=n,wi.jsx=ca,wi.jsxs=qt}()),wi}process.env.NODE_ENV==="production"?gc.exports=v$():gc.exports=m$();var rr=gc.exports;const vg=c.createContext(6),mg=()=>c.useContext(vg),bg=c.createContext(null),b$=()=>c.useContext(bg),y$=e=>rr.jsx(vg.Provider,{value:e.length,children:rr.jsx(bg.Provider,{value:e.selection,children:e.children})}),w$=(e,[t,r])=>typeof t!="number"||typeof r!="number"?null:t===r&&t===e?"cursor":e>=t&&e<r?"selected":null,_$=(e,[t,r])=>e<t?-1:e>=r?1:0,E$=(e,t)=>Array(e).fill(null).map((n,o)=>({state:w$(o,t),position:_$(o,t)})),x$=e=>rr.jsx("div",{...e,"aria-hidden":!0,style:{position:"absolute",left:0,right:0,top:0,bottom:0,display:"flex",justifyContent:"space-between",zIndex:-1,...e.style}}),S$=e=>{e.preventDefault(),e.stopPropagation(),e.currentTarget.scrollTop=0,e.currentTarget.scrollLeft=0},$$=e=>rr.jsx("div",{...e,onScroll:S$,style:{...e.style,height:"100%",overflow:"hidden"}}),C$=c.forwardRef((e,t)=>{const r=mg();return rr.jsx("input",{...e,width:void 0,minLength:r,maxLength:r,ref:t,style:{...e.style,font:"inherit",letterSpacing:"inherit",textIndent:"inherit",background:"transparent",appearance:"none",display:"block",width:e.width||"200%",padding:"0",margin:"0",border:"0 solid transparent",outline:"none"}})}),A$=e=>{const t=b$(),r=mg(),n=t,i=E$(r,n).map(({state:a,position:s},l)=>e.children({index:l,state:a,position:s,selection:n}));return rr.jsx(rr.Fragment,{children:i})},O$=({renderSegment:e,length:t=6,fontFamily:r="'SF Mono', SFMono-Regular, ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono', 'Roboto Mono', monospace",fontSize:n="2rem",padding:o="0.25rem",paddingY:i=o,paddingX:a=o,spacing:s="0.5rem",characterWidth:l="1ch",style:u,className:f,inputClassName:d,inputStyle:p,segmentWidth:h=`calc(${l} + ${a} * 2)`,inputWidth:g=`calc(100% + ${h} + ${s})`,inputRef:v,scrollWrapperClassName:y,segmentWrapperClassName:m,rootProps:w,...E})=>{const x=g$(v),P={...u,position:"relative",width:`calc(${h} * ${t} + ${s} * ${t-1})`,fontFamily:r,fontSize:n,textIndent:a,letterSpacing:`calc(${a} * 2 + ${s})`,lineHeight:`calc(${n} + ${i} * 2)`,zIndex:0},I={className:d,style:p,ref:v};return rr.jsx(y$,{length:t,selection:x,children:rr.jsxs("div",{...w,className:f,style:P,children:[rr.jsx(x$,{className:m,children:rr.jsx(A$,{children:e})}),rr.jsx($$,{className:y,onMouseDownCapture:S=>{if(S.button!==0||S.ctrlKey||S.shiftKey||S.metaKey||!(S.currentTarget instanceof HTMLElement)||!(v.current instanceof HTMLInputElement))return;S.stopPropagation(),S.preventDefault();const{left:O,width:k}=S.currentTarget.getBoundingClientRect(),j=S.clientX-O,D=Math.floor(j/k*t);document.activeElement!==v.current&&v.current?.focus(),v.current?.setSelectionRange(D,D+1)},onDoubleClickCapture:()=>{v.current?.setSelectionRange(0,t)},children:rr.jsx(C$,{width:g,...E,...I})})]})})},T$=e=>`calc(1ch + ${e} * 2)`;var jt="Input",[I$,V9]=Ir(jt,[]),[P$,nr]=I$(jt),yg=({__inputScope:e,id:t,descriptionId:r,errorMessageId:n,validationValence:o="neutral",children:i})=>{const a=_t("input",t),s=_t("input__description",r),l=_t("input__error-message",n);return c.createElement(P$,{id:a,descriptionId:s,errorMessageId:l,validationValence:o,scope:e},i)};yg.displayName=jt;var k$=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{id:i}=nr(jt,e),a=t?xt:Ge.label;return c.createElement(a,{...n,htmlFor:i,ref:o},r)}),N$=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{descriptionId:i,validationValence:a}=nr(jt,e),s=t?xt:Ge.span;return c.createElement(s,{...n,...a==="error"&&{id:i},ref:o},r)}),D$=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{errorMessageId:i}=nr(jt,e),a=t?xt:Ge.span;return c.createElement(a,{...n,id:i,ref:o},r)}),L$=c.forwardRef((e,t)=>{const{__inputScope:r,asChild:n,children:o,...i}=e,{validationValence:a}=nr(jt,r);if(a==="error")return c.createElement(D$,{...e,ref:t});{const s=n?xt:Ge.span;return c.createElement(s,{...i,ref:t},o)}}),M$=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{descriptionId:i,validationValence:a}=nr(jt,e),s=t?xt:Ge.p;return c.createElement(s,{...n,...a!=="error"&&{id:i},ref:o},r)}),F$=c.forwardRef(({__inputScope:e,segmentClassName:t,inputClassName:r,segmentPadding:n="13px",segmentHeight:o="100%",...i},a)=>{const{id:s,validationValence:l,descriptionId:u,errorMessageId:f}=nr(jt,e),d=T$(n),p=Ol(a),h=hw(p),g=c.useCallback(({state:v,index:y})=>c.createElement("div",{key:y,className:t?.({focused:!!(h&&v),validationValence:l}),"data-state":v,style:{width:d,height:o}}),[t,h,l]);return c.createElement(O$,{padding:"8px",spacing:"8px",fontFamily:"",spellCheck:!1,length:6,...i,id:s,"aria-describedby":u,...l==="error"&&{"aria-invalid":"true","aria-errormessage":f},inputRef:p,renderSegment:g,className:r})}),j$=c.forwardRef(({__inputScope:e,...t},r)=>{const{id:n,validationValence:o,descriptionId:i,errorMessageId:a}=nr(jt,e);return c.createElement(Ge.input,{...t,id:n,"aria-describedby":i,...o==="error"&&{"aria-invalid":"true","aria-errormessage":a},ref:r})}),B$=c.forwardRef(({__inputScope:e,...t},r)=>{const{id:n,validationValence:o,descriptionId:i,errorMessageId:a}=nr(jt,e);return c.createElement("textarea",{...t,id:n,"aria-describedby":i,...o==="error"&&{"aria-invalid":"true","aria-errormessage":a},ref:r})});const wg="Collapsible",[R$,H9]=fn(wg),[U$,vc]=R$(wg),W$=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[l=!1,u]=xa({prop:n,defaultProp:o,onChange:a});return c.createElement(U$,{scope:r,disabled:i,contentId:pi(),open:l,onOpenToggle:c.useCallback(()=>u(f=>!f),[u])},c.createElement(ft.div,nt({"data-state":mc(l),"data-disabled":i?"":void 0},s,{ref:t})))}),V$="CollapsibleTrigger",H$=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=vc(V$,r);return c.createElement(ft.button,nt({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":mc(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},n,{ref:t,onClick:pt(e.onClick,o.onOpenToggle)}))}),_g="CollapsibleContent",z$=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=vc(_g,e.__scopeCollapsible);return c.createElement(or,{present:r||o.open},({present:i})=>c.createElement(G$,nt({},n,{ref:t,present:i})))}),G$=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...i}=e,a=vc(_g,r),[s,l]=c.useState(n),u=c.useRef(null),f=Ct(t,u),d=c.useRef(0),p=d.current,h=c.useRef(0),g=h.current,v=a.open||s,y=c.useRef(v),m=c.useRef();return c.useEffect(()=>{const w=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(w)},[]),Tr(()=>{const w=u.current;if(w){m.current=m.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const E=w.getBoundingClientRect();d.current=E.height,h.current=E.width,y.current||(w.style.transitionDuration=m.current.transitionDuration,w.style.animationName=m.current.animationName),l(n)}},[a.open,n]),c.createElement(ft.div,nt({"data-state":mc(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v},i,{ref:f,style:{["--radix-collapsible-content-height"]:p?`${p}px`:void 0,["--radix-collapsible-content-width"]:g?`${g}px`:void 0,...e.style}}),v&&o)});function mc(e){return e?"open":"closed"}const K$=W$,q$=H$,Y$=z$;var za="List",[J$,z9]=Ir(za,[]),[X$,Z$]=J$(za),Eg=c.forwardRef((e,t)=>{const{__listScope:r,variant:n="ordered",selectable:o=!1,itemSizes:i,children:a,...s}=e,l=n==="ordered"?Ge.ol:Ge.ul;return c.createElement(l,{...o&&{role:"listbox","aria-multiselectable":!0},...s,ref:t},c.createElement(X$,{scope:r,variant:n,selectable:o,itemSizes:i},a))});Eg.displayName=za;var _i="ListItem",[Q$,G9]=Ir(_i,[]),[eC,xg]=Q$(_i),tC=c.forwardRef(({children:e,asChild:t,__listItemScope:r,...n},o)=>{const{headingId:i}=xg(_i,r),a=t?xt:Ge.div;return c.createElement(a,{...n,id:i,ref:o},e)}),rC=q$,nC=Y$,Sg=c.forwardRef((e,t)=>{const r=_t("listItem",e.id),{__listScope:n,__listItemScope:o,children:i,selected:a,defaultSelected:s,onSelectedChange:l,open:u,defaultOpen:f,onOpenChange:d,collapsible:p,labelId:h,...g}=e,{selectable:v}=Z$(za,n),[y=!1,m]=Gr({prop:a,defaultProp:s,onChange:l}),[w=!1,E]=Gr({prop:u,defaultProp:f,onChange:d}),x=_t("listItem__heading",h),P=c.createElement(Ge.li,{...g,id:r,ref:t,"aria-labelledby":x,...v&&{role:"option","aria-selected":!!y},...w&&{"aria-expanded":!0}},i);return c.createElement(eC,{scope:o,headingId:x,open:w,selected:y,setSelected:m},p?c.createElement(K$,{asChild:!0,open:w,onOpenChange:E},P):P)});Sg.displayName=_i;function oC(e,[t,r]){return Math.min(r,Math.max(t,e))}function iC(e,t){return c.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const $g="ScrollArea",[Cg,K9]=fn($g),[aC,ar]=Cg($g),sC=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:i=600,...a}=e,[s,l]=c.useState(null),[u,f]=c.useState(null),[d,p]=c.useState(null),[h,g]=c.useState(null),[v,y]=c.useState(null),[m,w]=c.useState(0),[E,x]=c.useState(0),[P,I]=c.useState(!1),[S,O]=c.useState(!1),k=Ct(t,D=>l(D)),j=F_(o);return c.createElement(aC,{scope:r,type:n,dir:j,scrollHideDelay:i,scrollArea:s,viewport:u,onViewportChange:f,content:d,onContentChange:p,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:P,onScrollbarXEnabledChange:I,scrollbarY:v,onScrollbarYChange:y,scrollbarYEnabled:S,onScrollbarYEnabledChange:O,onCornerWidthChange:w,onCornerHeightChange:x},c.createElement(ft.div,nt({dir:j},a,{ref:k,style:{position:"relative",["--radix-scroll-area-corner-width"]:m+"px",["--radix-scroll-area-corner-height"]:E+"px",...e.style}})))}),lC="ScrollAreaViewport",cC=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,...o}=e,i=ar(lC,r),a=c.useRef(null),s=Ct(t,a,i.onViewportChange);return c.createElement(c.Fragment,null,c.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),c.createElement(ft.div,nt({"data-radix-scroll-area-viewport":""},o,{ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),c.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},n)))}),Kr="ScrollAreaScrollbar",uC=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=ar(Kr,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=o,s=e.orientation==="horizontal";return c.useEffect(()=>(s?i(!0):a(!0),()=>{s?i(!1):a(!1)}),[s,i,a]),o.type==="hover"?c.createElement(fC,nt({},n,{ref:t,forceMount:r})):o.type==="scroll"?c.createElement(dC,nt({},n,{ref:t,forceMount:r})):o.type==="auto"?c.createElement(Ag,nt({},n,{ref:t,forceMount:r})):o.type==="always"?c.createElement(bc,nt({},n,{ref:t})):null}),fC=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=ar(Kr,e.__scopeScrollArea),[i,a]=c.useState(!1);return c.useEffect(()=>{const s=o.scrollArea;let l=0;if(s){const u=()=>{window.clearTimeout(l),a(!0)},f=()=>{l=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),c.createElement(or,{present:r||i},c.createElement(Ag,nt({"data-state":i?"visible":"hidden"},n,{ref:t})))}),dC=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=ar(Kr,e.__scopeScrollArea),i=e.orientation==="horizontal",a=qa(()=>l("SCROLL_END"),100),[s,l]=iC("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return c.useEffect(()=>{if(s==="idle"){const u=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,o.scrollHideDelay,l]),c.useEffect(()=>{const u=o.viewport,f=i?"scrollLeft":"scrollTop";if(u){let d=u[f];const p=()=>{const h=u[f];d!==h&&(l("SCROLL"),a()),d=h};return u.addEventListener("scroll",p),()=>u.removeEventListener("scroll",p)}},[o.viewport,i,l,a]),c.createElement(or,{present:r||s!=="hidden"},c.createElement(bc,nt({"data-state":s==="hidden"?"hidden":"visible"},n,{ref:t,onPointerEnter:pt(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:pt(e.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),Ag=c.forwardRef((e,t)=>{const r=ar(Kr,e.__scopeScrollArea),{forceMount:n,...o}=e,[i,a]=c.useState(!1),s=e.orientation==="horizontal",l=qa(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,f=r.viewport.offsetHeight<r.viewport.scrollHeight;a(s?u:f)}},10);return _o(r.viewport,l),_o(r.content,l),c.createElement(or,{present:n||i},c.createElement(bc,nt({"data-state":i?"visible":"hidden"},o,{ref:t})))}),bc=c.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,o=ar(Kr,e.__scopeScrollArea),i=c.useRef(null),a=c.useRef(0),[s,l]=c.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Pg(s.viewport,s.content),f={...n,sizes:s,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:p=>i.current=p,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:p=>a.current=p};function d(p,h){return wC(p,a.current,s,h)}return r==="horizontal"?c.createElement(pC,nt({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollLeft,h=kg(p,s,o.dir);i.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=d(p,o.dir))}})):r==="vertical"?c.createElement(hC,nt({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollTop,h=kg(p,s);i.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=d(p))}})):null}),pC=c.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=ar(Kr,e.__scopeScrollArea),[a,s]=c.useState(),l=c.useRef(null),u=Ct(t,l,i.onScrollbarXChange);return c.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),c.createElement(Tg,nt({"data-orientation":"horizontal"},o,{ref:u,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,["--radix-scroll-area-thumb-width"]:Ka(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,d)=>{if(i.viewport){const p=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(p),Dg(p,d)&&f.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Ga(a.paddingLeft),paddingEnd:Ga(a.paddingRight)}})}}))}),hC=c.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=ar(Kr,e.__scopeScrollArea),[a,s]=c.useState(),l=c.useRef(null),u=Ct(t,l,i.onScrollbarYChange);return c.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),c.createElement(Tg,nt({"data-orientation":"vertical"},o,{ref:u,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)",["--radix-scroll-area-thumb-height"]:Ka(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,d)=>{if(i.viewport){const p=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(p),Dg(p,d)&&f.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Ga(a.paddingTop),paddingEnd:Ga(a.paddingBottom)}})}}))}),[gC,Og]=Cg(Kr),Tg=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:f,onResize:d,...p}=e,h=ar(Kr,r),[g,v]=c.useState(null),y=Ct(t,k=>v(k)),m=c.useRef(null),w=c.useRef(""),E=h.viewport,x=n.content-n.viewport,P=Vt(f),I=Vt(l),S=qa(d,10);function O(k){if(m.current){const j=k.clientX-m.current.left,D=k.clientY-m.current.top;u({x:j,y:D})}}return c.useEffect(()=>{const k=j=>{const D=j.target;g?.contains(D)&&P(j,x)};return document.addEventListener("wheel",k,{passive:!1}),()=>document.removeEventListener("wheel",k,{passive:!1})},[E,g,x,P]),c.useEffect(I,[n,I]),_o(g,S),_o(h.content,S),c.createElement(gC,{scope:r,scrollbar:g,hasThumb:o,onThumbChange:Vt(i),onThumbPointerUp:Vt(a),onThumbPositionChange:I,onThumbPointerDown:Vt(s)},c.createElement(ft.div,nt({},p,{ref:y,style:{position:"absolute",...p.style},onPointerDown:pt(e.onPointerDown,k=>{k.button===0&&(k.target.setPointerCapture(k.pointerId),m.current=g.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",O(k))}),onPointerMove:pt(e.onPointerMove,O),onPointerUp:pt(e.onPointerUp,k=>{const j=k.target;j.hasPointerCapture(k.pointerId)&&j.releasePointerCapture(k.pointerId),document.body.style.webkitUserSelect=w.current,m.current=null})})))}),yc="ScrollAreaThumb",vC=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Og(yc,e.__scopeScrollArea);return c.createElement(or,{present:r||o.hasThumb},c.createElement(mC,nt({ref:t},n)))}),mC=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,i=ar(yc,r),a=Og(yc,r),{onThumbPositionChange:s}=a,l=Ct(t,d=>a.onThumbChange(d)),u=c.useRef(),f=qa(()=>{u.current&&(u.current(),u.current=void 0)},100);return c.useEffect(()=>{const d=i.viewport;if(d){const p=()=>{if(f(),!u.current){const h=_C(d,s);u.current=h,s()}};return s(),d.addEventListener("scroll",p),()=>d.removeEventListener("scroll",p)}},[i.viewport,f,s]),c.createElement(ft.div,nt({"data-state":a.hasThumb?"visible":"hidden"},o,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:pt(e.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),g=d.clientX-h.left,v=d.clientY-h.top;a.onThumbPointerDown({x:g,y:v})}),onPointerUp:pt(e.onPointerUp,a.onThumbPointerUp)}))}),Ig="ScrollAreaCorner",bC=c.forwardRef((e,t)=>{const r=ar(Ig,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?c.createElement(yC,nt({},e,{ref:t})):null}),yC=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=ar(Ig,r),[i,a]=c.useState(0),[s,l]=c.useState(0),u=!!(i&&s);return _o(o.scrollbarX,()=>{var f;const d=((f=o.scrollbarX)===null||f===void 0?void 0:f.offsetHeight)||0;o.onCornerHeightChange(d),l(d)}),_o(o.scrollbarY,()=>{var f;const d=((f=o.scrollbarY)===null||f===void 0?void 0:f.offsetWidth)||0;o.onCornerWidthChange(d),a(d)}),u?c.createElement(ft.div,nt({},n,{ref:t,style:{width:i,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function Ga(e){return e?parseInt(e,10):0}function Pg(e,t){const r=e/t;return isNaN(r)?0:r}function Ka(e){const t=Pg(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function wC(e,t,r,n="ltr"){const o=Ka(r),i=o/2,a=t||i,s=o-a,l=r.scrollbar.paddingStart+a,u=r.scrollbar.size-r.scrollbar.paddingEnd-s,f=r.content-r.viewport,d=n==="ltr"?[0,f]:[f*-1,0];return Ng([l,u],d)(e)}function kg(e,t,r="ltr"){const n=Ka(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-n,l=r==="ltr"?[0,a]:[a*-1,0],u=oC(e,l);return Ng([0,a],[0,s])(u)}function Ng(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Dg(e,t){return e>0&&e<t}const _C=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=r.left!==i.left,s=r.top!==i.top;(a||s)&&t(),r=i,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function qa(e,t){const r=Vt(e),n=c.useRef(0);return c.useEffect(()=>()=>window.clearTimeout(n.current),[]),c.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function _o(e,t){const r=Vt(t);Tr(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}const EC=sC,xC=cC,SC=uC,$C=vC,CC=bC;function Fn(e){return e.split("-")[0]}function Ei(e){return e.split("-")[1]}function Eo(e){return["top","bottom"].includes(Fn(e))?"x":"y"}function wc(e){return e==="y"?"height":"width"}function Lg(e,t,r){let{reference:n,floating:o}=e;const i=n.x+n.width/2-o.width/2,a=n.y+n.height/2-o.height/2,s=Eo(t),l=wc(s),u=n[l]/2-o[l]/2,f=s==="x";let d;switch(Fn(t)){case"top":d={x:i,y:n.y-o.height};break;case"bottom":d={x:i,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:a};break;case"left":d={x:n.x-o.width,y:a};break;default:d={x:n.x,y:n.y}}switch(Ei(t)){case"start":d[s]-=u*(r&&f?-1:1);break;case"end":d[s]+=u*(r&&f?-1:1)}return d}const AC=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=Lg(l,n,s),d=n,p={},h=0;for(let g=0;g<i.length;g++){const{name:v,fn:y}=i[g],{x:m,y:w,data:E,reset:x}=await y({x:u,y:f,initialPlacement:n,placement:d,strategy:o,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});u=m??u,f=w??f,p={...p,[v]:{...p[v],...E}},x&&h<=50&&(h++,typeof x=="object"&&(x.placement&&(d=x.placement),x.rects&&(l=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:u,y:f}=Lg(l,d,s)),g=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}};function Mg(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function Ya(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function xi(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=t,g=Mg(h),v=s[p?d==="floating"?"reference":"floating":d],y=Ya(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(v)))==null||r?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:l})),m=Ya(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:d==="floating"?{...a.floating,x:n,y:o}:a.reference,offsetParent:await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),strategy:l}):a[d]);return{top:y.top-m.top+g.top,bottom:m.bottom-y.bottom+g.bottom,left:y.left-m.left+g.left,right:m.right-y.right+g.right}}const OC=Math.min,jn=Math.max;function _c(e,t,r){return jn(e,OC(t,r))}const Fg=e=>({name:"arrow",options:e,async fn(t){const{element:r,padding:n=0}=e??{},{x:o,y:i,placement:a,rects:s,platform:l}=t;if(r==null)return{};const u=Mg(n),f={x:o,y:i},d=Eo(a),p=Ei(a),h=wc(d),g=await l.getDimensions(r),v=d==="y"?"top":"left",y=d==="y"?"bottom":"right",m=s.reference[h]+s.reference[d]-f[d]-s.floating[h],w=f[d]-s.reference[d],E=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let x=E?d==="y"?E.clientHeight||0:E.clientWidth||0:0;x===0&&(x=s.floating[h]);const P=m/2-w/2,I=u[v],S=x-g[h]-u[y],O=x/2-g[h]/2+P,k=_c(I,O,S),j=(p==="start"?u[v]:u[y])>0&&O!==k&&s.reference[h]<=s.floating[h];return{[d]:f[d]-(j?O<I?I-O:S-O:0),data:{[d]:k,centerOffset:O-k}}}}),TC={left:"right",right:"left",bottom:"top",top:"bottom"};function Ja(e){return e.replace(/left|right|bottom|top/g,t=>TC[t])}function IC(e,t,r){r===void 0&&(r=!1);const n=Ei(e),o=Eo(e),i=wc(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ja(a)),{main:a,cross:Ja(a)}}const PC={start:"end",end:"start"};function jg(e){return e.replace(/start|end/g,t=>PC[t])}const Bg=["top","right","bottom","left"];Bg.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const kC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r;const{placement:n,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",flipAlignment:h=!0,...g}=e,v=Fn(n),y=d||(v===a||!h?[Ja(a)]:function(O){const k=Ja(O);return[jg(O),k,jg(k)]}(a)),m=[a,...y],w=await xi(t,g),E=[];let x=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&E.push(w[v]),f){const{main:O,cross:k}=IC(n,i,await(s.isRTL==null?void 0:s.isRTL(l.floating)));E.push(w[O],w[k])}if(x=[...x,{placement:n,overflows:E}],!E.every(O=>O<=0)){var P,I;const O=((P=(I=o.flip)==null?void 0:I.index)!=null?P:0)+1,k=m[O];if(k)return{data:{index:O,overflows:x},reset:{placement:k}};let j="bottom";switch(p){case"bestFit":{var S;const D=(S=x.map(N=>[N,N.overflows.filter(J=>J>0).reduce((J,K)=>J+K,0)]).sort((N,J)=>N[1]-J[1])[0])==null?void 0:S[0].placement;D&&(j=D);break}case"initialPlacement":j=a}if(n!==j)return{reset:{placement:j}}}return{}}}};function Rg(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ug(e){return Bg.some(t=>e[t]>=0)}const NC=function(e){let{strategy:t="referenceHidden",...r}=e===void 0?{}:e;return{name:"hide",async fn(n){const{rects:o}=n;switch(t){case"referenceHidden":{const i=Rg(await xi(n,{...r,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Ug(i)}}}case"escaped":{const i=Rg(await xi(n,{...r,altBoundary:!0}),o.floating);return{data:{escapedOffsets:i,escaped:Ug(i)}}}default:return{}}}}},DC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await async function(i,a){const{placement:s,platform:l,elements:u}=i,f=await(l.isRTL==null?void 0:l.isRTL(u.floating)),d=Fn(s),p=Ei(s),h=Eo(s)==="x",g=["left","top"].includes(d)?-1:1,v=f&&h?-1:1,y=typeof a=="function"?a(i):a;let{mainAxis:m,crossAxis:w,alignmentAxis:E}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return p&&typeof E=="number"&&(w=p==="end"?-1*E:E),h?{x:w*v,y:m*g}:{x:m*g,y:w*v}}(t,e);return{x:r+o.x,y:n+o.y,data:o}}}};function Wg(e){return e==="x"?"y":"x"}const LC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:m,y:w}=y;return{x:m,y:w}}},...l}=e,u={x:r,y:n},f=await xi(t,l),d=Eo(Fn(o)),p=Wg(d);let h=u[d],g=u[p];if(i){const y=d==="y"?"bottom":"right";h=_c(h+f[d==="y"?"top":"left"],h,h-f[y])}if(a){const y=p==="y"?"bottom":"right";g=_c(g+f[p==="y"?"top":"left"],g,g-f[y])}const v=s.fn({...t,[d]:h,[p]:g});return{...v,data:{x:v.x-r,y:v.y-n}}}}},MC=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,f={x:r,y:n},d=Eo(o),p=Wg(d);let h=f[d],g=f[p];const v=typeof s=="function"?s({...i,placement:o}):s,y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const P=d==="y"?"height":"width",I=i.reference[d]-i.floating[P]+y.mainAxis,S=i.reference[d]+i.reference[P]-y.mainAxis;h<I?h=I:h>S&&(h=S)}if(u){var m,w,E,x;const P=d==="y"?"width":"height",I=["top","left"].includes(Fn(o)),S=i.reference[p]-i.floating[P]+(I&&(m=(w=a.offset)==null?void 0:w[p])!=null?m:0)+(I?0:y.crossAxis),O=i.reference[p]+i.reference[P]+(I?0:(E=(x=a.offset)==null?void 0:x[p])!=null?E:0)-(I?y.crossAxis:0);g<S?g=S:g>O&&(g=O)}return{[d]:h,[p]:g}}}},FC=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:i}=t,{apply:a,...s}=e,l=await xi(t,s),u=Fn(r),f=Ei(r);let d,p;u==="top"||u==="bottom"?(d=u,p=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(p=u,d=f==="end"?"top":"bottom");const h=jn(l.left,0),g=jn(l.right,0),v=jn(l.top,0),y=jn(l.bottom,0),m={availableHeight:n.floating.height-(["left","right"].includes(r)?2*(v!==0||y!==0?v+y:jn(l.top,l.bottom)):l[d]),availableWidth:n.floating.width-(["top","bottom"].includes(r)?2*(h!==0||g!==0?h+g:jn(l.left,l.right)):l[p])},w=await o.getDimensions(i.floating);a?.({...t,...m});const E=await o.getDimensions(i.floating);return w.width!==E.width||w.height!==E.height?{reset:{rects:!0}}:{}}}};function Vg(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function qr(e){if(e==null)return window;if(!Vg(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Si(e){return qr(e).getComputedStyle(e)}function Yr(e){return Vg(e)?"":e?(e.nodeName||"").toLowerCase():""}function Hg(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Nr(e){return e instanceof qr(e).HTMLElement}function vn(e){return e instanceof qr(e).Element}function Ec(e){return typeof ShadowRoot>"u"?!1:e instanceof qr(e).ShadowRoot||e instanceof ShadowRoot}function Xa(e){const{overflow:t,overflowX:r,overflowY:n}=Si(e);return/auto|scroll|overlay|hidden/.test(t+n+r)}function jC(e){return["table","td","th"].includes(Yr(e))}function zg(e){const t=/firefox/i.test(Hg()),r=Si(e);return r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].includes(r.willChange)||t&&r.willChange==="filter"||t&&!!r.filter&&r.filter!=="none"}function Gg(){return!/^((?!chrome|android).)*safari/i.test(Hg())}const Kg=Math.min,$i=Math.max,Za=Math.round;function Jr(e,t,r){var n,o,i,a;t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Nr(e)&&(l=e.offsetWidth>0&&Za(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&Za(s.height)/e.offsetHeight||1);const f=vn(e)?qr(e):window,d=!Gg()&&r,p=(s.left+(d&&(n=(o=f.visualViewport)==null?void 0:o.offsetLeft)!=null?n:0))/l,h=(s.top+(d&&(i=(a=f.visualViewport)==null?void 0:a.offsetTop)!=null?i:0))/u,g=s.width/l,v=s.height/u;return{width:g,height:v,top:h,right:p+g,bottom:h+v,left:p,x:p,y:h}}function mn(e){return(t=e,(t instanceof qr(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Qa(e){return vn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function qg(e){return Jr(mn(e)).left+Qa(e).scrollLeft}function BC(e,t,r){const n=Nr(t),o=mn(t),i=Jr(e,n&&function(l){const u=Jr(l);return Za(u.width)!==l.offsetWidth||Za(u.height)!==l.offsetHeight}(t),r==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(n||!n&&r!=="fixed")if((Yr(t)!=="body"||Xa(o))&&(a=Qa(t)),Nr(t)){const l=Jr(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else o&&(s.x=qg(o));return{x:i.left+a.scrollLeft-s.x,y:i.top+a.scrollTop-s.y,width:i.width,height:i.height}}function Yg(e){return Yr(e)==="html"?e:e.assignedSlot||e.parentNode||(Ec(e)?e.host:null)||mn(e)}function Jg(e){return Nr(e)&&getComputedStyle(e).position!=="fixed"?e.offsetParent:null}function xc(e){const t=qr(e);let r=Jg(e);for(;r&&jC(r)&&getComputedStyle(r).position==="static";)r=Jg(r);return r&&(Yr(r)==="html"||Yr(r)==="body"&&getComputedStyle(r).position==="static"&&!zg(r))?t:r||function(n){let o=Yg(n);for(Ec(o)&&(o=o.host);Nr(o)&&!["html","body"].includes(Yr(o));){if(zg(o))return o;o=o.parentNode}return null}(e)||t}function Xg(e){if(Nr(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Jr(e);return{width:t.width,height:t.height}}function Zg(e){const t=Yg(e);return["html","body","#document"].includes(Yr(t))?e.ownerDocument.body:Nr(t)&&Xa(t)?t:Zg(t)}function es(e,t){var r;t===void 0&&(t=[]);const n=Zg(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=qr(n),a=o?[i].concat(i.visualViewport||[],Xa(n)?n:[]):n,s=t.concat(a);return o?s:s.concat(es(a))}function Qg(e,t,r){return t==="viewport"?Ya(function(n,o){const i=qr(n),a=mn(n),s=i.visualViewport;let l=a.clientWidth,u=a.clientHeight,f=0,d=0;if(s){l=s.width,u=s.height;const p=Gg();(p||!p&&o==="fixed")&&(f=s.offsetLeft,d=s.offsetTop)}return{width:l,height:u,x:f,y:d}}(e,r)):vn(t)?function(n,o){const i=Jr(n,!1,o==="fixed"),a=i.top+n.clientTop,s=i.left+n.clientLeft;return{top:a,left:s,x:s,y:a,right:s+n.clientWidth,bottom:a+n.clientHeight,width:n.clientWidth,height:n.clientHeight}}(t,r):Ya(function(n){var o;const i=mn(n),a=Qa(n),s=(o=n.ownerDocument)==null?void 0:o.body,l=$i(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),u=$i(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0);let f=-a.scrollLeft+qg(n);const d=-a.scrollTop;return Si(s||i).direction==="rtl"&&(f+=$i(i.clientWidth,s?s.clientWidth:0)-l),{width:l,height:u,x:f,y:d}}(mn(e)))}function RC(e){const t=es(e),r=["absolute","fixed"].includes(Si(e).position)&&Nr(e)?xc(e):e;return vn(r)?t.filter(n=>vn(n)&&function(o,i){const a=i.getRootNode==null?void 0:i.getRootNode();if(o.contains(i))return!0;if(a&&Ec(a)){let s=i;do{if(s&&o===s)return!0;s=s.parentNode||s.host}while(s)}return!1}(n,r)&&Yr(n)!=="body"):[]}const UC={getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?RC(t):[].concat(r),n],a=i[0],s=i.reduce((l,u)=>{const f=Qg(t,u,o);return l.top=$i(f.top,l.top),l.right=Kg(f.right,l.right),l.bottom=Kg(f.bottom,l.bottom),l.left=$i(f.left,l.left),l},Qg(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=Nr(r),i=mn(r);if(r===i)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((o||!o&&n!=="fixed")&&((Yr(r)!=="body"||Xa(i))&&(a=Qa(r)),Nr(r))){const l=Jr(r,!0);s.x=l.x+r.clientLeft,s.y=l.y+r.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}},isElement:vn,getDimensions:Xg,getOffsetParent:xc,getDocumentElement:mn,getElementRects:e=>{let{reference:t,floating:r,strategy:n}=e;return{reference:BC(t,xc(r),n),floating:{...Xg(r),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Si(e).direction==="rtl"};function WC(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=n,l=o&&!s,u=i&&!s,f=l||u?[...vn(e)?es(e):[],...es(t)]:[];f.forEach(g=>{l&&g.addEventListener("scroll",r,{passive:!0}),u&&g.addEventListener("resize",r)});let d,p=null;if(a){let g=!0;p=new ResizeObserver(()=>{g||r(),g=!1}),vn(e)&&!s&&p.observe(e),p.observe(t)}let h=s?Jr(e):null;return s&&function g(){const v=Jr(e);!h||v.x===h.x&&v.y===h.y&&v.width===h.width&&v.height===h.height||r(),h=v,d=requestAnimationFrame(g)}(),r(),()=>{var g;f.forEach(v=>{l&&v.removeEventListener("scroll",r),u&&v.removeEventListener("resize",r)}),(g=p)==null||g.disconnect(),p=null,s&&cancelAnimationFrame(d)}}const VC=(e,t,r)=>AC(e,t,{platform:UC,...r});var Sc=typeof document<"u"?c.useLayoutEffect:c.useEffect;function $c(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!$c(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!$c(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function HC(e){const t=ve.useRef(e);return Sc(()=>{t.current=e}),t}function zC(e){let{middleware:t,placement:r="bottom",strategy:n="absolute",whileElementsMounted:o}=e===void 0?{}:e;const i=ve.useRef(null),a=ve.useRef(null),s=HC(o),l=ve.useRef(null),[u,f]=ve.useState({x:null,y:null,strategy:n,placement:r,middlewareData:{}}),[d,p]=ve.useState(t);$c(d?.map(E=>{let{options:x}=E;return x}),t?.map(E=>{let{options:x}=E;return x}))||p(t);const h=ve.useCallback(()=>{!i.current||!a.current||VC(i.current,a.current,{middleware:d,placement:r,strategy:n}).then(E=>{g.current&&Ad.flushSync(()=>{f(E)})})},[d,r,n]);Sc(()=>{g.current&&h()},[h]);const g=ve.useRef(!1);Sc(()=>(g.current=!0,()=>{g.current=!1}),[]);const v=ve.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),i.current&&a.current)if(s.current){const E=s.current(i.current,a.current,h);l.current=E}else h()},[h,s]),y=ve.useCallback(E=>{i.current=E,v()},[v]),m=ve.useCallback(E=>{a.current=E,v()},[v]),w=ve.useMemo(()=>({reference:i,floating:a}),[]);return ve.useMemo(()=>({...u,update:h,refs:w,reference:y,floating:m}),[u,h,w,y,m])}const GC=e=>{const{element:t,padding:r}=e;function n(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return n(t)?t.current!=null?Fg({element:t.current,padding:r}).fn(o):{}:t?Fg({element:t,padding:r}).fn(o):{}}}},KC=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return c.createElement(ft.svg,be({},i,{ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?r:c.createElement("polygon",{points:"0,0 30,0 15,10"}))}),ev="Popper",[Cc,tv]=fn(ev),[qC,rv]=Cc(ev),YC=e=>{const{__scopePopper:t,children:r}=e,[n,o]=c.useState(null);return c.createElement(qC,{scope:t,anchor:n,onAnchorChange:o},r)},JC="PopperAnchor",XC=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=rv(JC,r),a=c.useRef(null),s=Ct(t,a);return c.useEffect(()=>{i.onAnchorChange(n?.current||a.current)}),n?null:c.createElement(ft.div,be({},o,{ref:s}))}),ts="PopperContent",[ZC,QC]=Cc(ts),[eA,tA]=Cc(ts,{hasParent:!1,positionUpdateFns:new Set}),rA=c.forwardRef((e,t)=>{var r,n,o,i,a,s,l,u;const{__scopePopper:f,side:d="bottom",sideOffset:p=0,align:h="center",alignOffset:g=0,arrowPadding:v=0,collisionBoundary:y=[],collisionPadding:m=0,sticky:w="partial",hideWhenDetached:E=!1,avoidCollisions:x=!0,onPlaced:P,...I}=e,S=rv(ts,f),[O,k]=c.useState(null),j=Ct(t,Te=>k(Te)),[D,N]=c.useState(null),J=sg(D),K=(r=J?.width)!==null&&r!==void 0?r:0,Y=(n=J?.height)!==null&&n!==void 0?n:0,te=d+(h!=="center"?"-"+h:""),oe=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},le=Array.isArray(y)?y:[y],ae=le.length>0,ge={padding:oe,boundary:le.filter(sA),altBoundary:ae},{reference:ce,floating:q,strategy:V,x:re,y:de,placement:U,middlewareData:z,update:M}=zC({strategy:"fixed",placement:te,whileElementsMounted:WC,middleware:[lA(),DC({mainAxis:p+Y,alignmentAxis:g}),x?LC({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?MC():void 0,...ge}):void 0,D?GC({element:D,padding:v}):void 0,x?kC({...ge}):void 0,FC({...ge,apply:({elements:Te,availableWidth:Me,availableHeight:bt})=>{Te.floating.style.setProperty("--radix-popper-available-width",`${Me}px`),Te.floating.style.setProperty("--radix-popper-available-height",`${bt}px`)}}),cA({arrowWidth:K,arrowHeight:Y}),E?NC({strategy:"referenceHidden"}):void 0].filter(aA)});Tr(()=>{ce(S.anchor)},[ce,S.anchor]);const R=re!==null&&de!==null,[G,A]=nv(U),T=Vt(P);Tr(()=>{R&&T?.()},[R,T]);const Z=(o=z.arrow)===null||o===void 0?void 0:o.x,ne=(i=z.arrow)===null||i===void 0?void 0:i.y,pe=((a=z.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[me,xe]=c.useState();Tr(()=>{O&&xe(window.getComputedStyle(O).zIndex)},[O]);const{hasParent:Ee,positionUpdateFns:ie}=tA(ts,f),Ne=!Ee;c.useLayoutEffect(()=>{if(!Ne)return ie.add(M),()=>{ie.delete(M)}},[Ne,ie,M]),Tr(()=>{Ne&&R&&Array.from(ie).reverse().forEach(Te=>requestAnimationFrame(Te))},[Ne,R,ie]);const dt={"data-side":G,"data-align":A,...I,ref:j,style:{...I.style,animation:R?void 0:"none",opacity:(s=z.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return c.createElement("div",{ref:q,"data-radix-popper-content-wrapper":"",style:{position:V,left:0,top:0,transform:R?`translate3d(${Math.round(re)}px, ${Math.round(de)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:me,["--radix-popper-transform-origin"]:[(l=z.transformOrigin)===null||l===void 0?void 0:l.x,(u=z.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")},dir:e.dir},c.createElement(ZC,{scope:f,placedSide:G,onArrowChange:N,arrowX:Z,arrowY:ne,shouldHideArrow:pe},Ne?c.createElement(eA,{scope:f,hasParent:!0,positionUpdateFns:ie},c.createElement(ft.div,dt)):c.createElement(ft.div,dt)))}),nA="PopperArrow",oA={top:"bottom",right:"left",bottom:"top",left:"right"},iA=c.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=QC(nA,n),a=oA[i.placedSide];return c.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},c.createElement(KC,be({},o,{ref:r,style:{...o.style,display:"block"}})))});function aA(e){return e!==void 0}function sA(e){return e!==null}const lA=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:r}=e,{width:n,height:o}=t.reference;return r.floating.style.setProperty("--radix-popper-anchor-width",`${n}px`),r.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),cA=e=>({name:"transformOrigin",options:e,fn(t){var r,n,o,i,a;const{placement:s,rects:l,middlewareData:u}=t,d=((r=u.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,p=d?0:e.arrowWidth,h=d?0:e.arrowHeight,[g,v]=nv(s),y={start:"0%",center:"50%",end:"100%"}[v],m=((n=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&n!==void 0?n:0)+p/2,w=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+h/2;let E="",x="";return g==="bottom"?(E=d?y:`${m}px`,x=`${-h}px`):g==="top"?(E=d?y:`${m}px`,x=`${l.floating.height+h}px`):g==="right"?(E=`${-h}px`,x=d?y:`${w}px`):g==="left"&&(E=`${l.floating.width+h}px`,x=d?y:`${w}px`),{data:{x:E,y:x}}}});function nv(e){const[t,r="center"]=e.split("-");return[t,r]}const uA=YC,fA=XC,dA=rA,pA=iA,hA=c.forwardRef((e,t)=>c.createElement(ft.span,be({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),[rs,J9]=fn("Tooltip",[tv]),ns=tv(),gA="TooltipProvider",vA=700,Ac="tooltip.open",[mA,Oc]=rs(gA),bA=e=>{const{__scopeTooltip:t,delayDuration:r=vA,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=c.useState(!0),l=c.useRef(!1),u=c.useRef(0);return c.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),c.createElement(mA,{scope:t,isOpenDelayed:a,delayDuration:r,onOpen:c.useCallback(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:c.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:c.useCallback(f=>{l.current=f},[]),disableHoverableContent:o},i)},Tc="Tooltip",[yA,Ci]=rs(Tc),wA=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=Oc(Tc,e.__scopeTooltip),u=ns(t),[f,d]=c.useState(null),p=pi(),h=c.useRef(0),g=a??l.disableHoverableContent,v=s??l.delayDuration,y=c.useRef(!1),[m=!1,w]=xa({prop:n,defaultProp:o,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(Ac))):l.onClose(),i?.(S)}}),E=c.useMemo(()=>m?y.current?"delayed-open":"instant-open":"closed",[m]),x=c.useCallback(()=>{window.clearTimeout(h.current),y.current=!1,w(!0)},[w]),P=c.useCallback(()=>{window.clearTimeout(h.current),w(!1)},[w]),I=c.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,w(!0)},v)},[v,w]);return c.useEffect(()=>()=>window.clearTimeout(h.current),[]),c.createElement(uA,u,c.createElement(yA,{scope:t,contentId:p,open:m,stateAttribute:E,trigger:f,onTriggerChange:d,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayed?I():x()},[l.isOpenDelayed,I,x]),onTriggerLeave:c.useCallback(()=>{g?P():window.clearTimeout(h.current)},[P,g]),onOpen:x,onClose:P,disableHoverableContent:g},r))},ov="TooltipTrigger",_A=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Ci(ov,r),i=Oc(ov,r),a=ns(r),s=c.useRef(null),l=Ct(t,s,o.onTriggerChange),u=c.useRef(!1),f=c.useRef(!1),d=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),c.createElement(fA,be({asChild:!0},a),c.createElement(ft.button,be({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},n,{ref:l,onPointerMove:pt(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:pt(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:pt(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:pt(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:pt(e.onBlur,o.onClose),onClick:pt(e.onClick,o.onClose)})))}),iv="TooltipPortal",[EA,xA]=rs(iv,{forceMount:void 0}),SA=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,i=Ci(iv,t);return c.createElement(EA,{scope:t,forceMount:r},c.createElement(or,{present:r||i.open},c.createElement(Cp,{asChild:!0,container:o},n)))},Ai="TooltipContent",$A=c.forwardRef((e,t)=>{const r=xA(Ai,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...i}=e,a=Ci(Ai,e.__scopeTooltip);return c.createElement(or,{present:n||a.open},a.disableHoverableContent?c.createElement(av,be({side:o},i,{ref:t})):c.createElement(CA,be({side:o},i,{ref:t})))}),CA=c.forwardRef((e,t)=>{const r=Ci(Ai,e.__scopeTooltip),n=Oc(Ai,e.__scopeTooltip),o=c.useRef(null),i=Ct(t,o),[a,s]=c.useState(null),{trigger:l,onClose:u}=r,f=o.current,{onPointerInTransitChange:d}=n,p=c.useCallback(()=>{s(null),d(!1)},[d]),h=c.useCallback((g,v)=>{const y=g.currentTarget,m={x:g.clientX,y:g.clientY},w=PA(m,y.getBoundingClientRect()),E=w==="right"||w==="bottom"?-5:5,P=w==="right"||w==="left"?{x:g.clientX+E,y:g.clientY}:{x:g.clientX,y:g.clientY+E},I=kA(v.getBoundingClientRect()),S=DA([P,...I]);s(S),d(!0)},[d]);return c.useEffect(()=>()=>p(),[p]),c.useEffect(()=>{if(l&&f){const g=y=>h(y,f),v=y=>h(y,l);return l.addEventListener("pointerleave",g),f.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",g),f.removeEventListener("pointerleave",v)}}},[l,f,h,p]),c.useEffect(()=>{if(a){const g=v=>{const y=v.target,m={x:v.clientX,y:v.clientY},w=l?.contains(y)||f?.contains(y),E=!NA(m,a);w?p():E&&(p(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,f,a,u,p]),c.createElement(av,be({},e,{ref:i}))}),[AA,OA]=rs(Tc,{isInside:!1}),av=c.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=Ci(Ai,r),u=ns(r),{onClose:f}=l;return c.useEffect(()=>(document.addEventListener(Ac,f),()=>document.removeEventListener(Ac,f)),[f]),c.useEffect(()=>{if(l.trigger){const d=p=>{const h=p.target;h!=null&&h.contains(l.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,f]),c.createElement(bp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:f},c.createElement(dA,be({"data-state":l.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),c.createElement(Ml,null,n),c.createElement(AA,{scope:r,isInside:!0},c.createElement(hA,{id:l.contentId,role:"tooltip"},o||n))))}),TA="TooltipArrow",IA=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=ns(r);return OA(TA,r).isInside?null:c.createElement(pA,be({},o,n,{ref:t}))});function PA(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:return null}}function kA(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function NA(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,l=t[i].y,u=t[a].x,f=t[a].y;l>n!=f>n&&r<(u-s)*(n-l)/(f-l)+s&&(o=!o)}return o}function DA(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),LA(t)}function LA(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const i=r[r.length-1],a=r[r.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}const MA=bA,FA=wA;/*!
|
|
82
|
+
Check the top-level render call using <`+_e+">.")}return fe}}function ai(V,fe){{if(!V._store||V._store.validated||V.key!=null)return;V._store.validated=!0;var _e=ha(fe);if(ii[_e])return;ii[_e]=!0;var Oe="";V&&V._owner&&V._owner!==on.current&&(Oe=" It was passed a child from "+J(V._owner.type)+"."),dr(V),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',_e,Oe),dr(null)}}function si(V,fe){{if(typeof V!="object")return;if(Te(V))for(var _e=0;_e<V.length;_e++){var Oe=V[_e];io(Oe)&&ai(Oe,fe)}else if(io(V))V._store&&(V._store.validated=!0);else if(V){var qe=b(V);if(typeof qe=="function"&&qe!==V.entries)for(var je=qe.call(V),Re;!(Re=je.next()).done;)io(Re.value)&&ai(Re.value,fe)}}}function Ct(V){{var fe=V.type;if(fe==null||typeof fe=="string")return;var _e;if(typeof fe=="function")_e=fe.propTypes;else if(typeof fe=="object"&&(fe.$$typeof===l||fe.$$typeof===d))_e=fe.propTypes;else return;if(_e){var Oe=J(fe);Ne(_e,V.props,"prop",Oe,V)}else if(fe.PropTypes!==void 0&&!Yt){Yt=!0;var qe=J(fe);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",qe||"Unknown")}typeof fe.getDefaultProps=="function"&&!fe.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ga(V){{for(var fe=Object.keys(V.props),_e=0;_e<fe.length;_e++){var Oe=fe[_e];if(Oe!=="children"&&Oe!=="key"){dr(V),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Oe),dr(null);break}}V.ref!==null&&(dr(V),w("Invalid attribute `ref` supplied to `React.Fragment`."),dr(null))}}function li(V,fe,_e,Oe,qe,je){{var Re=F(V);if(!Re){var Be="";(V===void 0||typeof V=="object"&&V!==null&&Object.keys(V).length===0)&&(Be+=" 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 It=pa(qe);It?Be+=It:Be+=Nt();var mt;V===null?mt="null":Te(V)?mt="array":V!==void 0&&V.$$typeof===t?(mt="<"+(J(V.type)||"Unknown")+" />",Be=" Did you accidentally export a JSX literal instead of a component?"):mt=typeof V,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",mt,Be)}var yt=Ze(V,fe,_e,qe,je);if(yt==null)return yt;if(Re){var Wt=fe.children;if(Wt!==void 0)if(Oe)if(Te(Wt)){for(var er=0;er<Wt.length;er++)si(Wt[er],V);Object.freeze&&Object.freeze(Wt)}else w("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 si(Wt,V)}return V===n?ga(yt):Ct(yt),yt}}function va(V,fe,_e){return li(V,fe,_e,!0)}function ma(V,fe,_e){return li(V,fe,_e,!1)}var ba=ma,Jt=va;Ii.Fragment=n,Ii.jsx=ba,Ii.jsxs=Jt}()),Ii}process.env.NODE_ENV==="production"?Ic.exports=gC():Ic.exports=vC();var nr=Ic.exports;const Pg=c.createContext(6),kg=()=>c.useContext(Pg),Ng=c.createContext(null),mC=()=>c.useContext(Ng),bC=e=>nr.jsx(Pg.Provider,{value:e.length,children:nr.jsx(Ng.Provider,{value:e.selection,children:e.children})}),yC=(e,[t,r])=>typeof t!="number"||typeof r!="number"?null:t===r&&t===e?"cursor":e>=t&&e<r?"selected":null,wC=(e,[t,r])=>e<t?-1:e>=r?1:0,_C=(e,t)=>Array(e).fill(null).map((n,o)=>({state:yC(o,t),position:wC(o,t)})),EC=e=>nr.jsx("div",{...e,"aria-hidden":!0,style:{position:"absolute",left:0,right:0,top:0,bottom:0,display:"flex",justifyContent:"space-between",zIndex:-1,...e.style}}),xC=e=>{e.preventDefault(),e.stopPropagation(),e.currentTarget.scrollTop=0,e.currentTarget.scrollLeft=0},SC=e=>nr.jsx("div",{...e,onScroll:xC,style:{...e.style,height:"100%",overflow:"hidden"}}),$C=c.forwardRef((e,t)=>{const r=kg();return nr.jsx("input",{...e,width:void 0,minLength:r,maxLength:r,ref:t,style:{...e.style,font:"inherit",letterSpacing:"inherit",textIndent:"inherit",background:"transparent",appearance:"none",display:"block",width:e.width||"200%",padding:"0",margin:"0",border:"0 solid transparent",outline:"none"}})}),CC=e=>{const t=mC(),r=kg(),n=t,i=_C(r,n).map(({state:a,position:s},l)=>e.children({index:l,state:a,position:s,selection:n}));return nr.jsx(nr.Fragment,{children:i})},AC=({renderSegment:e,length:t=6,fontFamily:r="'SF Mono', SFMono-Regular, ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono', 'Roboto Mono', monospace",fontSize:n="2rem",padding:o="0.25rem",paddingY:i=o,paddingX:a=o,spacing:s="0.5rem",characterWidth:l="1ch",style:u,className:f,inputClassName:d,inputStyle:p,segmentWidth:h=`calc(${l} + ${a} * 2)`,inputWidth:g=`calc(100% + ${h} + ${s})`,inputRef:v,scrollWrapperClassName:b,segmentWrapperClassName:m,rootProps:w,...E})=>{const x=hC(v),k={...u,position:"relative",width:`calc(${h} * ${t} + ${s} * ${t-1})`,fontFamily:r,fontSize:n,textIndent:a,letterSpacing:`calc(${a} * 2 + ${s})`,lineHeight:`calc(${n} + ${i} * 2)`,zIndex:0},I={className:d,style:p,ref:v};return nr.jsx(bC,{length:t,selection:x,children:nr.jsxs("div",{...w,className:f,style:k,children:[nr.jsx(EC,{className:m,children:nr.jsx(CC,{children:e})}),nr.jsx(SC,{className:b,onMouseDownCapture:S=>{var N,J;if(S.button!==0||S.ctrlKey||S.shiftKey||S.metaKey||!(S.currentTarget instanceof HTMLElement)||!(v.current instanceof HTMLInputElement))return;S.stopPropagation(),S.preventDefault();const{left:C,width:P}=S.currentTarget.getBoundingClientRect(),F=S.clientX-C,D=Math.floor(F/P*t);document.activeElement!==v.current&&((N=v.current)==null||N.focus()),(J=v.current)==null||J.setSelectionRange(D,D+1)},onDoubleClickCapture:()=>{var S;(S=v.current)==null||S.setSelectionRange(0,t)},children:nr.jsx($C,{width:g,...E,...I})})]})})},OC=e=>`calc(1ch + ${e} * 2)`;var Bt="Input",[TC,Rj]=Pr(Bt,[]),[IC,or]=TC(Bt),Dg=({__inputScope:e,id:t,descriptionId:r,errorMessageId:n,validationValence:o="neutral",children:i})=>{const a=Et("input",t),s=Et("input__description",r),l=Et("input__error-message",n);return c.createElement(IC,{id:a,descriptionId:s,errorMessageId:l,validationValence:o,scope:e},i)};Dg.displayName=Bt;var PC=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{id:i}=or(Bt,e),a=t?St:Ge.label;return c.createElement(a,{...n,htmlFor:i,ref:o},r)}),kC=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{descriptionId:i,validationValence:a}=or(Bt,e),s=t?St:Ge.span;return c.createElement(s,{...n,...a==="error"&&{id:i},ref:o},r)}),NC=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{errorMessageId:i}=or(Bt,e),a=t?St:Ge.span;return c.createElement(a,{...n,id:i,ref:o},r)}),DC=c.forwardRef((e,t)=>{const{__inputScope:r,asChild:n,children:o,...i}=e,{validationValence:a}=or(Bt,r);if(a==="error")return c.createElement(NC,{...e,ref:t});{const s=n?St:Ge.span;return c.createElement(s,{...i,ref:t},o)}}),LC=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{descriptionId:i,validationValence:a}=or(Bt,e),s=t?St:Ge.p;return c.createElement(s,{...n,...a!=="error"&&{id:i},ref:o},r)}),MC=c.forwardRef(({__inputScope:e,segmentClassName:t,inputClassName:r,segmentPadding:n="13px",segmentHeight:o="100%",...i},a)=>{const{id:s,validationValence:l,descriptionId:u,errorMessageId:f}=or(Bt,e),d=OC(n),p=Bl(a),h=Bw(p),g=c.useCallback(({state:v,index:b})=>c.createElement("div",{key:b,className:t==null?void 0:t({focused:!!(h&&v),validationValence:l}),"data-state":v,style:{width:d,height:o}}),[t,h,l]);return c.createElement(AC,{padding:"8px",spacing:"8px",fontFamily:"",spellCheck:!1,length:6,...i,id:s,"aria-describedby":u,...l==="error"&&{"aria-invalid":"true","aria-errormessage":f},inputRef:p,renderSegment:g,className:r})}),FC=c.forwardRef(({__inputScope:e,...t},r)=>{const{id:n,validationValence:o,descriptionId:i,errorMessageId:a}=or(Bt,e);return c.createElement(Ge.input,{...t,id:n,"aria-describedby":i,...o==="error"&&{"aria-invalid":"true","aria-errormessage":a},ref:r})}),jC=c.forwardRef(({__inputScope:e,...t},r)=>{const{id:n,validationValence:o,descriptionId:i,errorMessageId:a}=or(Bt,e);return c.createElement("textarea",{...t,id:n,"aria-describedby":i,...o==="error"&&{"aria-invalid":"true","aria-errormessage":a},ref:r})});const Lg="Collapsible",[BC,Uj]=gn(Lg),[RC,Pc]=BC(Lg),UC=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[l=!1,u]=Na({prop:n,defaultProp:o,onChange:a});return c.createElement(RC,{scope:r,disabled:i,contentId:xi(),open:l,onOpenToggle:c.useCallback(()=>u(f=>!f),[u])},c.createElement(ft.div,st({"data-state":kc(l),"data-disabled":i?"":void 0},s,{ref:t})))}),WC="CollapsibleTrigger",VC=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=Pc(WC,r);return c.createElement(ft.button,st({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":kc(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},n,{ref:t,onClick:pt(e.onClick,o.onOpenToggle)}))}),Mg="CollapsibleContent",HC=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Pc(Mg,e.__scopeCollapsible);return c.createElement(ir,{present:r||o.open},({present:i})=>c.createElement(zC,st({},n,{ref:t,present:i})))}),zC=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...i}=e,a=Pc(Mg,r),[s,l]=c.useState(n),u=c.useRef(null),f=At(t,u),d=c.useRef(0),p=d.current,h=c.useRef(0),g=h.current,v=a.open||s,b=c.useRef(v),m=c.useRef();return c.useEffect(()=>{const w=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(w)},[]),Ir(()=>{const w=u.current;if(w){m.current=m.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const E=w.getBoundingClientRect();d.current=E.height,h.current=E.width,b.current||(w.style.transitionDuration=m.current.transitionDuration,w.style.animationName=m.current.animationName),l(n)}},[a.open,n]),c.createElement(ft.div,st({"data-state":kc(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v},i,{ref:f,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style}}),v&&o)});function kc(e){return e?"open":"closed"}const GC=UC,KC=VC,qC=HC;var rs="List",[YC,Wj]=Pr(rs,[]),[JC,XC]=YC(rs),Fg=c.forwardRef((e,t)=>{const{__listScope:r,variant:n="ordered",selectable:o=!1,itemSizes:i,children:a,...s}=e,l=n==="ordered"?Ge.ol:Ge.ul;return c.createElement(l,{...o&&{role:"listbox","aria-multiselectable":!0},...s,ref:t},c.createElement(JC,{scope:r,variant:n,selectable:o,itemSizes:i},a))});Fg.displayName=rs;var Pi="ListItem",[ZC,Vj]=Pr(Pi,[]),[QC,jg]=ZC(Pi),eA=c.forwardRef(({children:e,asChild:t,__listItemScope:r,...n},o)=>{const{headingId:i}=jg(Pi,r),a=t?St:Ge.div;return c.createElement(a,{...n,id:i,ref:o},e)}),tA=KC,rA=qC,Bg=c.forwardRef((e,t)=>{const r=Et("listItem",e.id),{__listScope:n,__listItemScope:o,children:i,selected:a,defaultSelected:s,onSelectedChange:l,open:u,defaultOpen:f,onOpenChange:d,collapsible:p,labelId:h,...g}=e,{selectable:v}=XC(rs,n),[b=!1,m]=qr({prop:a,defaultProp:s,onChange:l}),[w=!1,E]=qr({prop:u,defaultProp:f,onChange:d}),x=Et("listItem__heading",h),k=c.createElement(Ge.li,{...g,id:r,ref:t,"aria-labelledby":x,...v&&{role:"option","aria-selected":!!b},...w&&{"aria-expanded":!0}},i);return c.createElement(QC,{scope:o,headingId:x,open:w,selected:b,setSelected:m},p?c.createElement(GC,{asChild:!0,open:w,onOpenChange:E},k):k)});Bg.displayName=Pi;function nA(e,[t,r]){return Math.min(r,Math.max(t,e))}function oA(e,t){return c.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const Rg="ScrollArea",[Ug,Hj]=gn(Rg),[iA,sr]=Ug(Rg),aA=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:i=600,...a}=e,[s,l]=c.useState(null),[u,f]=c.useState(null),[d,p]=c.useState(null),[h,g]=c.useState(null),[v,b]=c.useState(null),[m,w]=c.useState(0),[E,x]=c.useState(0),[k,I]=c.useState(!1),[S,C]=c.useState(!1),P=At(t,D=>l(D)),F=RE(o);return c.createElement(iA,{scope:r,type:n,dir:F,scrollHideDelay:i,scrollArea:s,viewport:u,onViewportChange:f,content:d,onContentChange:p,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:k,onScrollbarXEnabledChange:I,scrollbarY:v,onScrollbarYChange:b,scrollbarYEnabled:S,onScrollbarYEnabledChange:C,onCornerWidthChange:w,onCornerHeightChange:x},c.createElement(ft.div,st({dir:F},a,{ref:P,style:{position:"relative","--radix-scroll-area-corner-width":m+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})))}),sA="ScrollAreaViewport",lA=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,...o}=e,i=sr(sA,r),a=c.useRef(null),s=At(t,a,i.onViewportChange);return c.createElement(c.Fragment,null,c.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),c.createElement(ft.div,st({"data-radix-scroll-area-viewport":""},o,{ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),c.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},n)))}),Yr="ScrollAreaScrollbar",cA=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=sr(Yr,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=o,s=e.orientation==="horizontal";return c.useEffect(()=>(s?i(!0):a(!0),()=>{s?i(!1):a(!1)}),[s,i,a]),o.type==="hover"?c.createElement(uA,st({},n,{ref:t,forceMount:r})):o.type==="scroll"?c.createElement(fA,st({},n,{ref:t,forceMount:r})):o.type==="auto"?c.createElement(Wg,st({},n,{ref:t,forceMount:r})):o.type==="always"?c.createElement(Nc,st({},n,{ref:t})):null}),uA=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=sr(Yr,e.__scopeScrollArea),[i,a]=c.useState(!1);return c.useEffect(()=>{const s=o.scrollArea;let l=0;if(s){const u=()=>{window.clearTimeout(l),a(!0)},f=()=>{l=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),c.createElement(ir,{present:r||i},c.createElement(Wg,st({"data-state":i?"visible":"hidden"},n,{ref:t})))}),fA=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=sr(Yr,e.__scopeScrollArea),i=e.orientation==="horizontal",a=is(()=>l("SCROLL_END"),100),[s,l]=oA("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return c.useEffect(()=>{if(s==="idle"){const u=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,o.scrollHideDelay,l]),c.useEffect(()=>{const u=o.viewport,f=i?"scrollLeft":"scrollTop";if(u){let d=u[f];const p=()=>{const h=u[f];d!==h&&(l("SCROLL"),a()),d=h};return u.addEventListener("scroll",p),()=>u.removeEventListener("scroll",p)}},[o.viewport,i,l,a]),c.createElement(ir,{present:r||s!=="hidden"},c.createElement(Nc,st({"data-state":s==="hidden"?"hidden":"visible"},n,{ref:t,onPointerEnter:pt(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:pt(e.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),Wg=c.forwardRef((e,t)=>{const r=sr(Yr,e.__scopeScrollArea),{forceMount:n,...o}=e,[i,a]=c.useState(!1),s=e.orientation==="horizontal",l=is(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,f=r.viewport.offsetHeight<r.viewport.scrollHeight;a(s?u:f)}},10);return xo(r.viewport,l),xo(r.content,l),c.createElement(ir,{present:n||i},c.createElement(Nc,st({"data-state":i?"visible":"hidden"},o,{ref:t})))}),Nc=c.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,o=sr(Yr,e.__scopeScrollArea),i=c.useRef(null),a=c.useRef(0),[s,l]=c.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Gg(s.viewport,s.content),f={...n,sizes:s,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:p=>i.current=p,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:p=>a.current=p};function d(p,h){return yA(p,a.current,s,h)}return r==="horizontal"?c.createElement(dA,st({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollLeft,h=Kg(p,s,o.dir);i.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=d(p,o.dir))}})):r==="vertical"?c.createElement(pA,st({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollTop,h=Kg(p,s);i.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=d(p))}})):null}),dA=c.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=sr(Yr,e.__scopeScrollArea),[a,s]=c.useState(),l=c.useRef(null),u=At(t,l,i.onScrollbarXChange);return c.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),c.createElement(Hg,st({"data-orientation":"horizontal"},o,{ref:u,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":os(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,d)=>{if(i.viewport){const p=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(p),Yg(p,d)&&f.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:ns(a.paddingLeft),paddingEnd:ns(a.paddingRight)}})}}))}),pA=c.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=sr(Yr,e.__scopeScrollArea),[a,s]=c.useState(),l=c.useRef(null),u=At(t,l,i.onScrollbarYChange);return c.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),c.createElement(Hg,st({"data-orientation":"vertical"},o,{ref:u,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":os(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,d)=>{if(i.viewport){const p=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(p),Yg(p,d)&&f.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:ns(a.paddingTop),paddingEnd:ns(a.paddingBottom)}})}}))}),[hA,Vg]=Ug(Yr),Hg=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:f,onResize:d,...p}=e,h=sr(Yr,r),[g,v]=c.useState(null),b=At(t,P=>v(P)),m=c.useRef(null),w=c.useRef(""),E=h.viewport,x=n.content-n.viewport,k=zt(f),I=zt(l),S=is(d,10);function C(P){if(m.current){const F=P.clientX-m.current.left,D=P.clientY-m.current.top;u({x:F,y:D})}}return c.useEffect(()=>{const P=F=>{const D=F.target;(g==null?void 0:g.contains(D))&&k(F,x)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[E,g,x,k]),c.useEffect(I,[n,I]),xo(g,S),xo(h.content,S),c.createElement(hA,{scope:r,scrollbar:g,hasThumb:o,onThumbChange:zt(i),onThumbPointerUp:zt(a),onThumbPositionChange:I,onThumbPointerDown:zt(s)},c.createElement(ft.div,st({},p,{ref:b,style:{position:"absolute",...p.style},onPointerDown:pt(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),m.current=g.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",C(P))}),onPointerMove:pt(e.onPointerMove,C),onPointerUp:pt(e.onPointerUp,P=>{const F=P.target;F.hasPointerCapture(P.pointerId)&&F.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=w.current,m.current=null})})))}),Dc="ScrollAreaThumb",gA=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Vg(Dc,e.__scopeScrollArea);return c.createElement(ir,{present:r||o.hasThumb},c.createElement(vA,st({ref:t},n)))}),vA=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,i=sr(Dc,r),a=Vg(Dc,r),{onThumbPositionChange:s}=a,l=At(t,d=>a.onThumbChange(d)),u=c.useRef(),f=is(()=>{u.current&&(u.current(),u.current=void 0)},100);return c.useEffect(()=>{const d=i.viewport;if(d){const p=()=>{if(f(),!u.current){const h=wA(d,s);u.current=h,s()}};return s(),d.addEventListener("scroll",p),()=>d.removeEventListener("scroll",p)}},[i.viewport,f,s]),c.createElement(ft.div,st({"data-state":a.hasThumb?"visible":"hidden"},o,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:pt(e.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),g=d.clientX-h.left,v=d.clientY-h.top;a.onThumbPointerDown({x:g,y:v})}),onPointerUp:pt(e.onPointerUp,a.onThumbPointerUp)}))}),zg="ScrollAreaCorner",mA=c.forwardRef((e,t)=>{const r=sr(zg,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?c.createElement(bA,st({},e,{ref:t})):null}),bA=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=sr(zg,r),[i,a]=c.useState(0),[s,l]=c.useState(0),u=!!(i&&s);return xo(o.scrollbarX,()=>{var f;const d=((f=o.scrollbarX)===null||f===void 0?void 0:f.offsetHeight)||0;o.onCornerHeightChange(d),l(d)}),xo(o.scrollbarY,()=>{var f;const d=((f=o.scrollbarY)===null||f===void 0?void 0:f.offsetWidth)||0;o.onCornerWidthChange(d),a(d)}),u?c.createElement(ft.div,st({},n,{ref:t,style:{width:i,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function ns(e){return e?parseInt(e,10):0}function Gg(e,t){const r=e/t;return isNaN(r)?0:r}function os(e){const t=Gg(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function yA(e,t,r,n="ltr"){const o=os(r),i=o/2,a=t||i,s=o-a,l=r.scrollbar.paddingStart+a,u=r.scrollbar.size-r.scrollbar.paddingEnd-s,f=r.content-r.viewport,d=n==="ltr"?[0,f]:[f*-1,0];return qg([l,u],d)(e)}function Kg(e,t,r="ltr"){const n=os(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-n,l=r==="ltr"?[0,a]:[a*-1,0],u=nA(e,l);return qg([0,a],[0,s])(u)}function qg(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Yg(e,t){return e>0&&e<t}const wA=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=r.left!==i.left,s=r.top!==i.top;(a||s)&&t(),r=i,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function is(e,t){const r=zt(e),n=c.useRef(0);return c.useEffect(()=>()=>window.clearTimeout(n.current),[]),c.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function xo(e,t){const r=zt(t);Ir(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}const _A=aA,EA=lA,xA=cA,SA=gA,$A=mA;function Vn(e){return e.split("-")[0]}function ki(e){return e.split("-")[1]}function So(e){return["top","bottom"].includes(Vn(e))?"x":"y"}function Lc(e){return e==="y"?"height":"width"}function Jg(e,t,r){let{reference:n,floating:o}=e;const i=n.x+n.width/2-o.width/2,a=n.y+n.height/2-o.height/2,s=So(t),l=Lc(s),u=n[l]/2-o[l]/2,f=s==="x";let d;switch(Vn(t)){case"top":d={x:i,y:n.y-o.height};break;case"bottom":d={x:i,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:a};break;case"left":d={x:n.x-o.width,y:a};break;default:d={x:n.x,y:n.y}}switch(ki(t)){case"start":d[s]-=u*(r&&f?-1:1);break;case"end":d[s]+=u*(r&&f?-1:1)}return d}const CA=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=Jg(l,n,s),d=n,p={},h=0;for(let g=0;g<i.length;g++){const{name:v,fn:b}=i[g],{x:m,y:w,data:E,reset:x}=await b({x:u,y:f,initialPlacement:n,placement:d,strategy:o,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});u=m??u,f=w??f,p={...p,[v]:{...p[v],...E}},x&&h<=50&&(h++,typeof x=="object"&&(x.placement&&(d=x.placement),x.rects&&(l=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:u,y:f}=Jg(l,d,s)),g=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}};function Xg(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function as(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Ni(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=t,g=Xg(h),v=s[p?d==="floating"?"reference":"floating":d],b=as(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(v)))==null||r?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:l})),m=as(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:d==="floating"?{...a.floating,x:n,y:o}:a.reference,offsetParent:await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),strategy:l}):a[d]);return{top:b.top-m.top+g.top,bottom:m.bottom-b.bottom+g.bottom,left:b.left-m.left+g.left,right:m.right-b.right+g.right}}const AA=Math.min,Hn=Math.max;function Mc(e,t,r){return Hn(e,AA(t,r))}const Zg=e=>({name:"arrow",options:e,async fn(t){const{element:r,padding:n=0}=e??{},{x:o,y:i,placement:a,rects:s,platform:l}=t;if(r==null)return{};const u=Xg(n),f={x:o,y:i},d=So(a),p=ki(a),h=Lc(d),g=await l.getDimensions(r),v=d==="y"?"top":"left",b=d==="y"?"bottom":"right",m=s.reference[h]+s.reference[d]-f[d]-s.floating[h],w=f[d]-s.reference[d],E=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let x=E?d==="y"?E.clientHeight||0:E.clientWidth||0:0;x===0&&(x=s.floating[h]);const k=m/2-w/2,I=u[v],S=x-g[h]-u[b],C=x/2-g[h]/2+k,P=Mc(I,C,S),F=(p==="start"?u[v]:u[b])>0&&C!==P&&s.reference[h]<=s.floating[h];return{[d]:f[d]-(F?C<I?I-C:S-C:0),data:{[d]:P,centerOffset:C-P}}}}),OA={left:"right",right:"left",bottom:"top",top:"bottom"};function ss(e){return e.replace(/left|right|bottom|top/g,t=>OA[t])}function TA(e,t,r){r===void 0&&(r=!1);const n=ki(e),o=So(e),i=Lc(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ss(a)),{main:a,cross:ss(a)}}const IA={start:"end",end:"start"};function Qg(e){return e.replace(/start|end/g,t=>IA[t])}const ev=["top","right","bottom","left"];ev.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const PA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r;const{placement:n,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",flipAlignment:h=!0,...g}=e,v=Vn(n),b=d||(v===a||!h?[ss(a)]:function(C){const P=ss(C);return[Qg(C),P,Qg(P)]}(a)),m=[a,...b],w=await Ni(t,g),E=[];let x=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&E.push(w[v]),f){const{main:C,cross:P}=TA(n,i,await(s.isRTL==null?void 0:s.isRTL(l.floating)));E.push(w[C],w[P])}if(x=[...x,{placement:n,overflows:E}],!E.every(C=>C<=0)){var k,I;const C=((k=(I=o.flip)==null?void 0:I.index)!=null?k:0)+1,P=m[C];if(P)return{data:{index:C,overflows:x},reset:{placement:P}};let F="bottom";switch(p){case"bestFit":{var S;const D=(S=x.map(N=>[N,N.overflows.filter(J=>J>0).reduce((J,G)=>J+G,0)]).sort((N,J)=>N[1]-J[1])[0])==null?void 0:S[0].placement;D&&(F=D);break}case"initialPlacement":F=a}if(n!==F)return{reset:{placement:F}}}return{}}}};function tv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rv(e){return ev.some(t=>e[t]>=0)}const kA=function(e){let{strategy:t="referenceHidden",...r}=e===void 0?{}:e;return{name:"hide",async fn(n){const{rects:o}=n;switch(t){case"referenceHidden":{const i=tv(await Ni(n,{...r,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:rv(i)}}}case"escaped":{const i=tv(await Ni(n,{...r,altBoundary:!0}),o.floating);return{data:{escapedOffsets:i,escaped:rv(i)}}}default:return{}}}}},NA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await async function(i,a){const{placement:s,platform:l,elements:u}=i,f=await(l.isRTL==null?void 0:l.isRTL(u.floating)),d=Vn(s),p=ki(s),h=So(s)==="x",g=["left","top"].includes(d)?-1:1,v=f&&h?-1:1,b=typeof a=="function"?a(i):a;let{mainAxis:m,crossAxis:w,alignmentAxis:E}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...b};return p&&typeof E=="number"&&(w=p==="end"?-1*E:E),h?{x:w*v,y:m*g}:{x:m*g,y:w*v}}(t,e);return{x:r+o.x,y:n+o.y,data:o}}}};function nv(e){return e==="x"?"y":"x"}const DA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:b=>{let{x:m,y:w}=b;return{x:m,y:w}}},...l}=e,u={x:r,y:n},f=await Ni(t,l),d=So(Vn(o)),p=nv(d);let h=u[d],g=u[p];if(i){const b=d==="y"?"bottom":"right";h=Mc(h+f[d==="y"?"top":"left"],h,h-f[b])}if(a){const b=p==="y"?"bottom":"right";g=Mc(g+f[p==="y"?"top":"left"],g,g-f[b])}const v=s.fn({...t,[d]:h,[p]:g});return{...v,data:{x:v.x-r,y:v.y-n}}}}},LA=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,f={x:r,y:n},d=So(o),p=nv(d);let h=f[d],g=f[p];const v=typeof s=="function"?s({...i,placement:o}):s,b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const k=d==="y"?"height":"width",I=i.reference[d]-i.floating[k]+b.mainAxis,S=i.reference[d]+i.reference[k]-b.mainAxis;h<I?h=I:h>S&&(h=S)}if(u){var m,w,E,x;const k=d==="y"?"width":"height",I=["top","left"].includes(Vn(o)),S=i.reference[p]-i.floating[k]+(I&&(m=(w=a.offset)==null?void 0:w[p])!=null?m:0)+(I?0:b.crossAxis),C=i.reference[p]+i.reference[k]+(I?0:(E=(x=a.offset)==null?void 0:x[p])!=null?E:0)-(I?b.crossAxis:0);g<S?g=S:g>C&&(g=C)}return{[d]:h,[p]:g}}}},MA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:i}=t,{apply:a,...s}=e,l=await Ni(t,s),u=Vn(r),f=ki(r);let d,p;u==="top"||u==="bottom"?(d=u,p=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(p=u,d=f==="end"?"top":"bottom");const h=Hn(l.left,0),g=Hn(l.right,0),v=Hn(l.top,0),b=Hn(l.bottom,0),m={availableHeight:n.floating.height-(["left","right"].includes(r)?2*(v!==0||b!==0?v+b:Hn(l.top,l.bottom)):l[d]),availableWidth:n.floating.width-(["top","bottom"].includes(r)?2*(h!==0||g!==0?h+g:Hn(l.left,l.right)):l[p])},w=await o.getDimensions(i.floating);a==null||a({...t,...m});const E=await o.getDimensions(i.floating);return w.width!==E.width||w.height!==E.height?{reset:{rects:!0}}:{}}}};function ov(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Jr(e){if(e==null)return window;if(!ov(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Di(e){return Jr(e).getComputedStyle(e)}function Xr(e){return ov(e)?"":e?(e.nodeName||"").toLowerCase():""}function iv(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Dr(e){return e instanceof Jr(e).HTMLElement}function wn(e){return e instanceof Jr(e).Element}function Fc(e){return typeof ShadowRoot>"u"?!1:e instanceof Jr(e).ShadowRoot||e instanceof ShadowRoot}function ls(e){const{overflow:t,overflowX:r,overflowY:n}=Di(e);return/auto|scroll|overlay|hidden/.test(t+n+r)}function FA(e){return["table","td","th"].includes(Xr(e))}function av(e){const t=/firefox/i.test(iv()),r=Di(e);return r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].includes(r.willChange)||t&&r.willChange==="filter"||t&&!!r.filter&&r.filter!=="none"}function sv(){return!/^((?!chrome|android).)*safari/i.test(iv())}const lv=Math.min,Li=Math.max,cs=Math.round;function Zr(e,t,r){var n,o,i,a;t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Dr(e)&&(l=e.offsetWidth>0&&cs(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&cs(s.height)/e.offsetHeight||1);const f=wn(e)?Jr(e):window,d=!sv()&&r,p=(s.left+(d&&(n=(o=f.visualViewport)==null?void 0:o.offsetLeft)!=null?n:0))/l,h=(s.top+(d&&(i=(a=f.visualViewport)==null?void 0:a.offsetTop)!=null?i:0))/u,g=s.width/l,v=s.height/u;return{width:g,height:v,top:h,right:p+g,bottom:h+v,left:p,x:p,y:h}}function _n(e){return(t=e,(t instanceof Jr(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function us(e){return wn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function cv(e){return Zr(_n(e)).left+us(e).scrollLeft}function jA(e,t,r){const n=Dr(t),o=_n(t),i=Zr(e,n&&function(l){const u=Zr(l);return cs(u.width)!==l.offsetWidth||cs(u.height)!==l.offsetHeight}(t),r==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(n||!n&&r!=="fixed")if((Xr(t)!=="body"||ls(o))&&(a=us(t)),Dr(t)){const l=Zr(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else o&&(s.x=cv(o));return{x:i.left+a.scrollLeft-s.x,y:i.top+a.scrollTop-s.y,width:i.width,height:i.height}}function uv(e){return Xr(e)==="html"?e:e.assignedSlot||e.parentNode||(Fc(e)?e.host:null)||_n(e)}function fv(e){return Dr(e)&&getComputedStyle(e).position!=="fixed"?e.offsetParent:null}function jc(e){const t=Jr(e);let r=fv(e);for(;r&&FA(r)&&getComputedStyle(r).position==="static";)r=fv(r);return r&&(Xr(r)==="html"||Xr(r)==="body"&&getComputedStyle(r).position==="static"&&!av(r))?t:r||function(n){let o=uv(n);for(Fc(o)&&(o=o.host);Dr(o)&&!["html","body"].includes(Xr(o));){if(av(o))return o;o=o.parentNode}return null}(e)||t}function dv(e){if(Dr(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Zr(e);return{width:t.width,height:t.height}}function pv(e){const t=uv(e);return["html","body","#document"].includes(Xr(t))?e.ownerDocument.body:Dr(t)&&ls(t)?t:pv(t)}function fs(e,t){var r;t===void 0&&(t=[]);const n=pv(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=Jr(n),a=o?[i].concat(i.visualViewport||[],ls(n)?n:[]):n,s=t.concat(a);return o?s:s.concat(fs(a))}function hv(e,t,r){return t==="viewport"?as(function(n,o){const i=Jr(n),a=_n(n),s=i.visualViewport;let l=a.clientWidth,u=a.clientHeight,f=0,d=0;if(s){l=s.width,u=s.height;const p=sv();(p||!p&&o==="fixed")&&(f=s.offsetLeft,d=s.offsetTop)}return{width:l,height:u,x:f,y:d}}(e,r)):wn(t)?function(n,o){const i=Zr(n,!1,o==="fixed"),a=i.top+n.clientTop,s=i.left+n.clientLeft;return{top:a,left:s,x:s,y:a,right:s+n.clientWidth,bottom:a+n.clientHeight,width:n.clientWidth,height:n.clientHeight}}(t,r):as(function(n){var o;const i=_n(n),a=us(n),s=(o=n.ownerDocument)==null?void 0:o.body,l=Li(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),u=Li(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0);let f=-a.scrollLeft+cv(n);const d=-a.scrollTop;return Di(s||i).direction==="rtl"&&(f+=Li(i.clientWidth,s?s.clientWidth:0)-l),{width:l,height:u,x:f,y:d}}(_n(e)))}function BA(e){const t=fs(e),r=["absolute","fixed"].includes(Di(e).position)&&Dr(e)?jc(e):e;return wn(r)?t.filter(n=>wn(n)&&function(o,i){const a=i.getRootNode==null?void 0:i.getRootNode();if(o.contains(i))return!0;if(a&&Fc(a)){let s=i;do{if(s&&o===s)return!0;s=s.parentNode||s.host}while(s)}return!1}(n,r)&&Xr(n)!=="body"):[]}const RA={getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?BA(t):[].concat(r),n],a=i[0],s=i.reduce((l,u)=>{const f=hv(t,u,o);return l.top=Li(f.top,l.top),l.right=lv(f.right,l.right),l.bottom=lv(f.bottom,l.bottom),l.left=Li(f.left,l.left),l},hv(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=Dr(r),i=_n(r);if(r===i)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((o||!o&&n!=="fixed")&&((Xr(r)!=="body"||ls(i))&&(a=us(r)),Dr(r))){const l=Zr(r,!0);s.x=l.x+r.clientLeft,s.y=l.y+r.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}},isElement:wn,getDimensions:dv,getOffsetParent:jc,getDocumentElement:_n,getElementRects:e=>{let{reference:t,floating:r,strategy:n}=e;return{reference:jA(t,jc(r),n),floating:{...dv(r),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Di(e).direction==="rtl"};function UA(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=n,l=o&&!s,u=i&&!s,f=l||u?[...wn(e)?fs(e):[],...fs(t)]:[];f.forEach(g=>{l&&g.addEventListener("scroll",r,{passive:!0}),u&&g.addEventListener("resize",r)});let d,p=null;if(a){let g=!0;p=new ResizeObserver(()=>{g||r(),g=!1}),wn(e)&&!s&&p.observe(e),p.observe(t)}let h=s?Zr(e):null;return s&&function g(){const v=Zr(e);!h||v.x===h.x&&v.y===h.y&&v.width===h.width&&v.height===h.height||r(),h=v,d=requestAnimationFrame(g)}(),r(),()=>{var g;f.forEach(v=>{l&&v.removeEventListener("scroll",r),u&&v.removeEventListener("resize",r)}),(g=p)==null||g.disconnect(),p=null,s&&cancelAnimationFrame(d)}}const WA=(e,t,r)=>CA(e,t,{platform:RA,...r});var Bc=typeof document<"u"?c.useLayoutEffect:c.useEffect;function Rc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Rc(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!Rc(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function VA(e){const t=ve.useRef(e);return Bc(()=>{t.current=e}),t}function HA(e){let{middleware:t,placement:r="bottom",strategy:n="absolute",whileElementsMounted:o}=e===void 0?{}:e;const i=ve.useRef(null),a=ve.useRef(null),s=VA(o),l=ve.useRef(null),[u,f]=ve.useState({x:null,y:null,strategy:n,placement:r,middlewareData:{}}),[d,p]=ve.useState(t);Rc(d==null?void 0:d.map(E=>{let{options:x}=E;return x}),t==null?void 0:t.map(E=>{let{options:x}=E;return x}))||p(t);const h=ve.useCallback(()=>{!i.current||!a.current||WA(i.current,a.current,{middleware:d,placement:r,strategy:n}).then(E=>{g.current&&Vd.flushSync(()=>{f(E)})})},[d,r,n]);Bc(()=>{g.current&&h()},[h]);const g=ve.useRef(!1);Bc(()=>(g.current=!0,()=>{g.current=!1}),[]);const v=ve.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),i.current&&a.current)if(s.current){const E=s.current(i.current,a.current,h);l.current=E}else h()},[h,s]),b=ve.useCallback(E=>{i.current=E,v()},[v]),m=ve.useCallback(E=>{a.current=E,v()},[v]),w=ve.useMemo(()=>({reference:i,floating:a}),[]);return ve.useMemo(()=>({...u,update:h,refs:w,reference:b,floating:m}),[u,h,w,b,m])}const zA=e=>{const{element:t,padding:r}=e;function n(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return n(t)?t.current!=null?Zg({element:t.current,padding:r}).fn(o):{}:t?Zg({element:t,padding:r}).fn(o):{}}}},GA=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return c.createElement(ft.svg,$a({},i,{ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?r:c.createElement("polygon",{points:"0,0 30,0 15,10"}))}),gv="Popper",[Uc,vv]=gn(gv),[KA,mv]=Uc(gv),qA=e=>{const{__scopePopper:t,children:r}=e,[n,o]=c.useState(null);return c.createElement(KA,{scope:t,anchor:n,onAnchorChange:o},r)},YA="PopperAnchor",JA=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=mv(YA,r),a=c.useRef(null),s=At(t,a);return c.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||a.current)}),n?null:c.createElement(ft.div,be({},o,{ref:s}))}),ds="PopperContent",[XA,ZA]=Uc(ds),[QA,eO]=Uc(ds,{hasParent:!1,positionUpdateFns:new Set}),tO=c.forwardRef((e,t)=>{var r,n,o,i,a,s,l,u;const{__scopePopper:f,side:d="bottom",sideOffset:p=0,align:h="center",alignOffset:g=0,arrowPadding:v=0,collisionBoundary:b=[],collisionPadding:m=0,sticky:w="partial",hideWhenDetached:E=!1,avoidCollisions:x=!0,onPlaced:k,...I}=e,S=mv(ds,f),[C,P]=c.useState(null),F=At(t,Te=>P(Te)),[D,N]=c.useState(null),J=Eg(D),G=(r=J==null?void 0:J.width)!==null&&r!==void 0?r:0,Y=(n=J==null?void 0:J.height)!==null&&n!==void 0?n:0,te=d+(h!=="center"?"-"+h:""),oe=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},le=Array.isArray(b)?b:[b],ae=le.length>0,ge={padding:oe,boundary:le.filter(oO),altBoundary:ae},{reference:ce,floating:K,strategy:q,x:re,y:de,placement:U,middlewareData:H,update:M}=HA({strategy:"fixed",placement:te,whileElementsMounted:UA,middleware:[iO(),NA({mainAxis:p+Y,alignmentAxis:g}),x?DA({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?LA():void 0,...ge}):void 0,D?zA({element:D,padding:v}):void 0,x?PA({...ge}):void 0,MA({...ge,apply:({elements:Te,availableWidth:Fe,availableHeight:bt})=>{Te.floating.style.setProperty("--radix-popper-available-width",`${Fe}px`),Te.floating.style.setProperty("--radix-popper-available-height",`${bt}px`)}}),aO({arrowWidth:G,arrowHeight:Y}),E?kA({strategy:"referenceHidden"}):void 0].filter(nO)});Ir(()=>{ce(S.anchor)},[ce,S.anchor]);const R=re!==null&&de!==null,[z,O]=wv(U),T=zt(k);Ir(()=>{R&&(T==null||T())},[R,T]);const Z=(o=H.arrow)===null||o===void 0?void 0:o.x,ne=(i=H.arrow)===null||i===void 0?void 0:i.y,pe=((a=H.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[me,xe]=c.useState();Ir(()=>{C&&xe(window.getComputedStyle(C).zIndex)},[C]);const{hasParent:Ee,positionUpdateFns:ie}=eO(ds,f),Ne=!Ee;c.useLayoutEffect(()=>{if(!Ne)return ie.add(M),()=>{ie.delete(M)}},[Ne,ie,M]),Ir(()=>{Ne&&R&&Array.from(ie).reverse().forEach(Te=>requestAnimationFrame(Te))},[Ne,R,ie]);const dt={"data-side":z,"data-align":O,...I,ref:F,style:{...I.style,animation:R?void 0:"none",opacity:(s=H.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return c.createElement("div",{ref:K,"data-radix-popper-content-wrapper":"",style:{position:q,left:0,top:0,transform:R?`translate3d(${Math.round(re)}px, ${Math.round(de)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(l=H.transformOrigin)===null||l===void 0?void 0:l.x,(u=H.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")},dir:e.dir},c.createElement(XA,{scope:f,placedSide:z,onArrowChange:N,arrowX:Z,arrowY:ne,shouldHideArrow:pe},Ne?c.createElement(QA,{scope:f,hasParent:!0,positionUpdateFns:ie},c.createElement(ft.div,dt)):c.createElement(ft.div,dt)))}),bv="PopperArrow",rO={top:"bottom",right:"left",bottom:"top",left:"right"},yv=c.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=ZA(bv,n),a=rO[i.placedSide];return c.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},c.createElement(GA,be({},o,{ref:r,style:{...o.style,display:"block"}})))});function nO(e){return e!==void 0}function oO(e){return e!==null}const iO=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:r}=e,{width:n,height:o}=t.reference;return r.floating.style.setProperty("--radix-popper-anchor-width",`${n}px`),r.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),aO=e=>({name:"transformOrigin",options:e,fn(t){var r,n,o,i,a;const{placement:s,rects:l,middlewareData:u}=t,d=((r=u.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,p=d?0:e.arrowWidth,h=d?0:e.arrowHeight,[g,v]=wv(s),b={start:"0%",center:"50%",end:"100%"}[v],m=((n=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&n!==void 0?n:0)+p/2,w=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+h/2;let E="",x="";return g==="bottom"?(E=d?b:`${m}px`,x=`${-h}px`):g==="top"?(E=d?b:`${m}px`,x=`${l.floating.height+h}px`):g==="right"?(E=`${-h}px`,x=d?b:`${w}px`):g==="left"&&(E=`${l.floating.width+h}px`,x=d?b:`${w}px`),{data:{x:E,y:x}}}});function wv(e){const[t,r="center"]=e.split("-");return[t,r]}const sO=qA,lO=JA,cO=tO,uO=yv,fO=c.forwardRef((e,t)=>c.createElement(ft.span,be({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),[ps,Kj]=gn("Tooltip",[vv]),hs=vv(),dO="TooltipProvider",pO=700,Wc="tooltip.open",[hO,Vc]=ps(dO),gO=e=>{const{__scopeTooltip:t,delayDuration:r=pO,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=c.useState(!0),l=c.useRef(!1),u=c.useRef(0);return c.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),c.createElement(hO,{scope:t,isOpenDelayed:a,delayDuration:r,onOpen:c.useCallback(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:c.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:c.useCallback(f=>{l.current=f},[]),disableHoverableContent:o},i)},Hc="Tooltip",[vO,Mi]=ps(Hc),mO=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=Vc(Hc,e.__scopeTooltip),u=hs(t),[f,d]=c.useState(null),p=xi(),h=c.useRef(0),g=a??l.disableHoverableContent,v=s??l.delayDuration,b=c.useRef(!1),[m=!1,w]=Na({prop:n,defaultProp:o,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(Wc))):l.onClose(),i==null||i(S)}}),E=c.useMemo(()=>m?b.current?"delayed-open":"instant-open":"closed",[m]),x=c.useCallback(()=>{window.clearTimeout(h.current),b.current=!1,w(!0)},[w]),k=c.useCallback(()=>{window.clearTimeout(h.current),w(!1)},[w]),I=c.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{b.current=!0,w(!0)},v)},[v,w]);return c.useEffect(()=>()=>window.clearTimeout(h.current),[]),c.createElement(sO,u,c.createElement(vO,{scope:t,contentId:p,open:m,stateAttribute:E,trigger:f,onTriggerChange:d,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayed?I():x()},[l.isOpenDelayed,I,x]),onTriggerLeave:c.useCallback(()=>{g?k():window.clearTimeout(h.current)},[k,g]),onOpen:x,onClose:k,disableHoverableContent:g},r))},_v="TooltipTrigger",bO=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Mi(_v,r),i=Vc(_v,r),a=hs(r),s=c.useRef(null),l=At(t,s,o.onTriggerChange),u=c.useRef(!1),f=c.useRef(!1),d=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),c.createElement(lO,be({asChild:!0},a),c.createElement(ft.button,be({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},n,{ref:l,onPointerMove:pt(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:pt(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:pt(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:pt(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:pt(e.onBlur,o.onClose),onClick:pt(e.onClick,o.onClose)})))}),Ev="TooltipPortal",[yO,wO]=ps(Ev,{forceMount:void 0}),_O=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,i=Mi(Ev,t);return c.createElement(yO,{scope:t,forceMount:r},c.createElement(ir,{present:r||i.open},c.createElement(Wp,{asChild:!0,container:o},n)))},Fi="TooltipContent",EO=c.forwardRef((e,t)=>{const r=wO(Fi,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...i}=e,a=Mi(Fi,e.__scopeTooltip);return c.createElement(ir,{present:n||a.open},a.disableHoverableContent?c.createElement(xv,be({side:o},i,{ref:t})):c.createElement(xO,be({side:o},i,{ref:t})))}),xO=c.forwardRef((e,t)=>{const r=Mi(Fi,e.__scopeTooltip),n=Vc(Fi,e.__scopeTooltip),o=c.useRef(null),i=At(t,o),[a,s]=c.useState(null),{trigger:l,onClose:u}=r,f=o.current,{onPointerInTransitChange:d}=n,p=c.useCallback(()=>{s(null),d(!1)},[d]),h=c.useCallback((g,v)=>{const b=g.currentTarget,m={x:g.clientX,y:g.clientY},w=OO(m,b.getBoundingClientRect()),E=w==="right"||w==="bottom"?-5:5,k=w==="right"||w==="left"?{x:g.clientX+E,y:g.clientY}:{x:g.clientX,y:g.clientY+E},I=TO(v.getBoundingClientRect()),S=PO([k,...I]);s(S),d(!0)},[d]);return c.useEffect(()=>()=>p(),[p]),c.useEffect(()=>{if(l&&f){const g=b=>h(b,f),v=b=>h(b,l);return l.addEventListener("pointerleave",g),f.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",g),f.removeEventListener("pointerleave",v)}}},[l,f,h,p]),c.useEffect(()=>{if(a){const g=v=>{const b=v.target,m={x:v.clientX,y:v.clientY},w=(l==null?void 0:l.contains(b))||(f==null?void 0:f.contains(b)),E=!IO(m,a);w?p():E&&(p(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,f,a,u,p]),c.createElement(xv,be({},e,{ref:i}))}),[SO,$O]=ps(Hc,{isInside:!1}),xv=c.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=Mi(Fi,r),u=hs(r),{onClose:f}=l;return c.useEffect(()=>(document.addEventListener(Wc,f),()=>document.removeEventListener(Wc,f)),[f]),c.useEffect(()=>{if(l.trigger){const d=p=>{const h=p.target;h!=null&&h.contains(l.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,f]),c.createElement(Dp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:f},c.createElement(cO,be({"data-state":l.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),c.createElement(ql,null,n),c.createElement(SO,{scope:r,isInside:!0},c.createElement(fO,{id:l.contentId,role:"tooltip"},o||n))))}),CO="TooltipArrow",AO=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=hs(r);return $O(CO,r).isInside?null:c.createElement(uO,be({},o,n,{ref:t}))});function OO(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:return null}}function TO(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function IO(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,l=t[i].y,u=t[a].x,f=t[a].y;l>n!=f>n&&r<(u-s)*(n-l)/(f-l)+s&&(o=!o)}return o}function PO(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),kO(t)}function kO(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const i=r[r.length-1],a=r[r.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}const NO=gO,DO=mO;/*!
|
|
83
83
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
84
84
|
* Licensed under the MIT License.
|
|
85
|
-
*/const
|
|
85
|
+
*/const LO=typeof WeakRef<"u";let Sv=class{constructor(t){LO&&typeof t=="object"?this._weakRef=new WeakRef(t):this._instance=t}deref(){var t,r,n;let o;return this._weakRef?(o=(t=this._weakRef)===null||t===void 0?void 0:t.deref(),o||delete this._weakRef):(o=this._instance,!((n=(r=o)===null||r===void 0?void 0:r.isDisposed)===null||n===void 0)&&n.call(r)&&delete this._instance),o}};/*!
|
|
86
86
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
87
87
|
* Licensed under the MIT License.
|
|
88
|
-
*/const
|
|
88
|
+
*/const zc="keyborg:focusin";function MO(e){const t=e.HTMLElement,r=t.prototype.focus;let n=!1;return t.prototype.focus=function(){n=!0},e.document.createElement("button").focus(),t.prototype.focus=r,n}let Gc=!1;function FO(e){const t=e;Gc||(Gc=MO(t));const r=t.HTMLElement.prototype.focus;if(r.__keyborgNativeFocus)return;t.HTMLElement.prototype.focus=o;const n=t.__keyborgData={focusInHandler:i=>{var a;const s=i.target;if(!s)return;const l=document.createEvent("HTMLEvents");l.initEvent(zc,!0,!0);const u={relatedTarget:i.relatedTarget||void 0};(Gc||n.lastFocusedProgrammatically)&&(u.isFocusedProgrammatically=s===((a=n.lastFocusedProgrammatically)===null||a===void 0?void 0:a.deref()),n.lastFocusedProgrammatically=void 0),l.details=u,s.dispatchEvent(l)}};t.document.addEventListener("focusin",t.__keyborgData.focusInHandler,!0);function o(){const i=t.__keyborgData;return i&&(i.lastFocusedProgrammatically=new Sv(this)),r.apply(this,arguments)}o.__keyborgNativeFocus=r}function jO(e){const t=e,r=t.HTMLElement.prototype,n=r.focus.__keyborgNativeFocus,o=t.__keyborgData;o&&(t.document.removeEventListener("focusin",o.focusInHandler,!0),delete t.__keyborgData),n&&(r.focus=n)}/*!
|
|
89
89
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
90
90
|
* Licensed under the MIT License.
|
|
91
|
-
*/const WA=500;let lv=0,VA=class{constructor(){this.__keyborgCoreRefs={},this._isNavigatingWithKeyboard=!1}add(t){const r=t.id;r in this.__keyborgCoreRefs||(this.__keyborgCoreRefs[r]=new sv(t))}remove(t){delete this.__keyborgCoreRefs[t],Object.keys(this.__keyborgCoreRefs).length===0&&(this._isNavigatingWithKeyboard=!1)}setVal(t){if(this._isNavigatingWithKeyboard!==t){this._isNavigatingWithKeyboard=t;for(const r of Object.keys(this.__keyborgCoreRefs)){const o=this.__keyborgCoreRefs[r].deref();o?o.update(t):this.remove(r)}}}getVal(){return this._isNavigatingWithKeyboard}};const Dr=new VA;let HA=class{constructor(t,r){this._isMouseUsed=!1,this._onFocusIn=o=>{if(this._isMouseUsed){this._isMouseUsed=!1;return}if(Dr.getVal())return;const i=o.details;i.relatedTarget&&(i.isFocusedProgrammatically||i.isFocusedProgrammatically===void 0||Dr.setVal(!0))},this._onMouseDown=o=>{o.buttons===0||o.clientX===0&&o.clientY===0&&o.screenX===0&&o.screenY===0||(this._isMouseUsed=!0,Dr.setVal(!1))},this._onKeyDown=o=>{var i;const a=Dr.getVal(),s=o.keyCode,l=this._triggerKeys;!a&&(!l||l.has(s))?Dr.setVal(!0):a&&(!((i=this._dismissKeys)===null||i===void 0)&&i.has(s))&&this._scheduleDismiss()},this.id="c"+ ++lv,this._win=t;const n=t.document;if(r){const o=r.triggerKeys,i=r.dismissKeys;o?.length&&(this._triggerKeys=new Set(o)),i?.length&&(this._dismissKeys=new Set(i))}n.addEventListener(Ic,this._onFocusIn,!0),n.addEventListener("mousedown",this._onMouseDown,!0),t.addEventListener("keydown",this._onKeyDown,!0),RA(t),Dr.add(this)}dispose(){const t=this._win;if(t){this._dismissTimer&&(t.clearTimeout(this._dismissTimer),this._dismissTimer=void 0),UA(t);const r=t.document;r.removeEventListener(Ic,this._onFocusIn,!0),r.removeEventListener("mousedown",this._onMouseDown,!0),t.removeEventListener("keydown",this._onKeyDown,!0),delete this._win,Dr.remove(this.id)}}isDisposed(){return!!this._win}update(t){var r,n;const o=(n=(r=this._win)===null||r===void 0?void 0:r.__keyborg)===null||n===void 0?void 0:n.refs;if(o)for(const i of Object.keys(o))cv.update(o[i],t)}_scheduleDismiss(){const t=this._win;if(t){this._dismissTimer&&(t.clearTimeout(this._dismissTimer),this._dismissTimer=void 0);const r=t.document.activeElement;this._dismissTimer=t.setTimeout(()=>{this._dismissTimer=void 0;const n=t.document.activeElement;r&&n&&r===n&&Dr.setVal(!1)},WA)}}},cv=class M1{constructor(t,r){this._cb=[],this._id="k"+ ++lv,this._win=t;const n=t.__keyborg;n?(this._core=n.core,n.refs[this._id]=this):(this._core=new HA(t,r),t.__keyborg={core:this._core,refs:{[this._id]:this}})}static create(t,r){return new M1(t,r)}static dispose(t){t.dispose()}static update(t,r){t._cb.forEach(n=>n(r))}dispose(){var t;const r=(t=this._win)===null||t===void 0?void 0:t.__keyborg;r?.refs[this._id]?(delete r.refs[this._id],Object.keys(r.refs).length===0&&(r.core.dispose(),delete this._win.__keyborg)):process.env.NODE_ENV==="development"&&console.error("Keyborg instance "+this._id+" is being disposed incorrectly."),this._cb=[],delete this._core,delete this._win}isNavigatingWithKeyboard(){return Dr.getVal()}subscribe(t){this._cb.push(t)}unsubscribe(t){const r=this._cb.indexOf(t);r>=0&&this._cb.splice(r,1)}setVal(t){Dr.setVal(t)}};function zA(e,t){return cv.create(e,t)}var Lr=e=>{const{density:t}=c.useContext(Sv);return e??t},Bn=e=>{const{elevation:t}=c.useContext(gv);return e??t},uv="en-US",os="dxos-common",GA={[uv]:{[os]:{"loading translations":"Loading translations…"}}};Ft.use(Q1).init({resources:GA,lng:uv,defaultNS:os,interpolation:{escapeValue:!1}});var KA=c.createContext({appNs:os}),qA=({fallback:e,resourceExtensions:t,children:r,appNs:n})=>{const[o,i]=c.useState(!1);return c.useEffect(()=>{i(!1),t&&t.length&&t.forEach(a=>{Object.keys(a).forEach(s=>{Object.keys(a[s]).forEach(l=>{Ft.addResourceBundle(s,l,a[s][l])})})}),i(!0)},[t]),c.createElement(KA.Provider,{value:{appNs:n??os}},c.createElement(c.Suspense,{fallback:e},o?r:e))},Ae=()=>c.useContext(Dv),YA=e=>{const[t,r]=c.useState(null),[n,o]=c.useState(null);return c.useEffect(()=>{const i=()=>{window.visualViewport&&(r(window.visualViewport.width),o(window.visualViewport.height))};return window.visualViewport?.addEventListener("resize",i),i(),()=>window.visualViewport?.removeEventListener("resize",i)},e??[]),{width:t,height:n}},JA="Avatar",[XA,Rn]=uo(JA),ZA=({size:e=10,variant:t="circle",status:r,animation:n,children:o,labelId:i,descriptionId:a,maskId:s,inGroup:l,color:u})=>{const f=_t("avatar__label",i),d=_t("avatar__description",a),p=_t("avatar__mask",s);return c.createElement(XA,{labelId:f,descriptionId:d,maskId:p,size:e,variant:t,status:r,animation:n,inGroup:l,color:u},o)},fv="0.25rem",QA=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{size:o,variant:i,labelId:a,descriptionId:s,maskId:l,inGroup:u,status:f,animation:d,color:p}=Rn("AvatarFrame"),{tx:h}=Ae(),g=o==="px"?1:Number(o),v=g*4,y=g>4?2:(g>3,1),m=g>12?3:g>4?2:g>3?1:0,w=v/2-m-y;return c.createElement(p_,{role:"img",...r,className:h("avatar.root","avatar",{size:o,variant:i,inGroup:u},e),ref:n,...!u&&{"aria-labelledby":a,"aria-describedby":s}},c.createElement("svg",{viewBox:`0 0 ${v} ${v}`,width:v,height:v,className:h("avatar.frame","avatar__frame",{variant:i})},c.createElement("defs",null,c.createElement("mask",{id:l},i==="circle"?c.createElement("circle",{fill:"white",cx:"50%",cy:"50%",r:w}):c.createElement("rect",{fill:"white",width:2*w,height:2*w,x:m+y,y:m+y,rx:fv}))),i==="circle"?c.createElement("circle",{className:`avatarFrameFill${p?"":" fill-[var(--surface-bg)]"}`,cx:"50%",cy:"50%",r:w,...p?{fill:p}:{}}):c.createElement("rect",{className:"avatarFrameFill fill-[var(--surface-bg)]",x:m+y,y:m+y,width:2*w,height:2*w,rx:fv}),t),c.createElement("span",{role:"none",className:h("avatar.ring","avatar__ring",{size:o,variant:i,status:f,animation:d}),style:{borderWidth:y+"px"}}))}),eO=c.forwardRef(({asChild:e,srOnly:t,classNames:r,...n},o)=>{const i=e?xt:Ge.span,{tx:a}=Ae(),{labelId:s}=Rn("AvatarLabel");return c.createElement(i,{...n,id:s,ref:o,className:a("avatar.label","avatar__label",{srOnly:t},r)})}),tO=c.forwardRef(({asChild:e,srOnly:t,classNames:r,...n},o)=>{const i=e?xt:Ge.span,{tx:a}=Ae(),{descriptionId:s}=Rn("AvatarDescription");return c.createElement(i,{...n,id:s,ref:o,className:a("avatar.description","avatar__description",{srOnly:t},r)})}),dv=c.forwardRef((e,t)=>{const{maskId:r}=Rn("AvatarFallback");return c.createElement("image",{width:"100%",height:"100%",...e,mask:`url(#${r})`,ref:t,preserveAspectRatio:"xMidYMid slice"})}),rO=e=>{const{maskId:t,size:r}=Rn("AvatarFallback"),{large:n}=e,o=(n?4:3)*(1/1.612),{tx:i}=Ae();return c.createElement("text",{x:"50%",y:"50%",className:i("avatar.fallbackText","avatar__fallback-text"),textAnchor:"middle",alignmentBaseline:"central",fontSize:r==="px"?"200%":r*o,mask:`url(#${t})`},e.children)},nO=c.forwardRef(({onLoadingStatusChange:e,...t},r)=>{const{size:n}=Rn("AvatarImage");return(n==="px"?1:n*4)<=20?null:c.createElement(dp,{asChild:!0},c.createElement(dv,{...t,ref:r}))}),oO=c.forwardRef(({delayMs:e,text:t,...r},n)=>{const o=!!(t&&/[0-9a-zA-Z]+/.test(t)),{size:i}=Rn("AvatarFallback"),a=i==="px"?1:Number(i);return c.createElement(dp,{delayMs:e,asChild:!0},c.createElement(c.Fragment,null,a>=6&&c.createElement(dv,{...r,ref:n}),t&&c.createElement(rO,{large:!o},t.toLocaleUpperCase())))}),iO=(e,t)=>`data:image/svg+xml;utf8,${encodeURIComponent(k_(e,t==="px"?1:t*4,{padding:0}))}`,is=(e,t)=>c.useMemo(()=>iO(e,t),[e]),Ot={Root:ZA,Frame:QA,Image:nO,Fallback:oO,Label:eO,Description:tO},pv="ButtonGroup",hv="Button",[aO,sO]=uo(pv,{inGroup:!1}),br=c.forwardRef(({classNames:e,children:t,density:r,elevation:n,variant:o="default",asChild:i,...a},s)=>{const{inGroup:l}=sO(hv),{tx:u}=Ae(),f=Bn(n),d=Lr(r),p=i?xt:Ge.button;return c.createElement(p,{ref:s,...a,className:u("button.root","button",{variant:o,inGroup:l,disabled:a.disabled,density:d,elevation:f},e),...a.disabled&&{disabled:!0}},t)});br.displayName=hv;var lO=c.forwardRef(({children:e,elevation:t,classNames:r,asChild:n,...o},i)=>{const{tx:a}=Ae(),s=Bn(t),l=n?xt:Ge.div;return c.createElement(l,{role:"none",...o,className:a("button.group","button-group",{elevation:s},r),ref:i},c.createElement(aO,{inGroup:!0},e))});lO.displayName=pv;var gv=c.createContext({elevation:"base"}),Oi=({elevation:e,children:t})=>c.createElement(gv.Provider,{value:{elevation:e}},t),cO=Yl,uO=Gp,fO=Yp,dO=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(Qp,{...r,className:o("dialog.title","dialog__title",{srOnly:t},e),ref:n})}),pO=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(eh,{...r,className:o("dialog.description","dialog__description",{srOnly:t},e),ref:n})}),hO=th,vv="DialogOverlay",mv="DialogContent",[gO,vO]=uo(vv,{inOverlayLayout:!1}),bv=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(Jp,{...r,className:o("dialog.overlay","dialog__overlay",{},e),ref:n},c.createElement(gO,{inOverlayLayout:!0},t))});bv.displayName=vv;var yv=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae(),{inOverlayLayout:i}=vO(mv);return c.createElement(Kl,{...r,className:o("dialog.content","dialog",{inOverlayLayout:i},e),ref:n},c.createElement(Oi,{elevation:"chrome"},t))});yv.displayName=mv;var Mr={Root:cO,Trigger:uO,Portal:fO,Overlay:bv,Content:yv,Title:dO,Description:pO,Close:hO},mO=gx,bO=nx,yO=ox,wO=hx,_O=dx,EO=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(ux,{...r,className:o("dialog.title","dialog--alert__title",{srOnly:t},e),ref:n})}),xO=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(fx,{...r,className:o("dialog.description","dialog--alert__description",{srOnly:t},e),ref:n})}),wv="AlertDialogOverlay",_v="AlertDialogContent",[SO,$O]=uo(wv,{inOverlayLayout:!1}),Ev=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(ix,{...r,className:o("dialog.overlay","dialog--alert__overlay",{},e),ref:n},c.createElement(SO,{inOverlayLayout:!0},t))});Ev.displayName=wv;var xv=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae(),{inOverlayLayout:i}=$O(_v);return c.createElement(lx,{...r,className:o("dialog.content","dialog--alert",{inOverlayLayout:i},e),ref:n},c.createElement(Oi,{elevation:"chrome"},t))});xv.displayName=_v;var xo={Root:mO,Trigger:bO,Portal:yO,Overlay:Ev,Content:xv,Title:EO,Description:xO,Cancel:wO,Action:_O},CO=xS,AO=MS,OO=FS,TO=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(jS,{sideOffset:4,collisionPadding:8,...r,className:o("menu.content","menu",{},e),ref:n},c.createElement(Oi,{elevation:"chrome"},t))}),IO=c.forwardRef(({classNames:e,asChild:t,children:r,...n},o)=>{const{tx:i}=Ae(),a=t?xt:Ge.div;return c.createElement(a,{...n,className:i("menu.viewport","menu__viewport",{},e),ref:o},r)}),PO=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(zS,{...t,className:n("menu.arrow","menu__arrow",{},e),ref:r})}),kO=BS,NO=VS,DO=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(US,{...t,className:n("menu.item","menu__item",{},e),ref:r})}),LO=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(WS,{...t,className:n("menu.item","menu__item--checkbox",{},e),ref:r})}),MO=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(HS,{...t,className:n("menu.separator","menu__item",{},e),ref:r})}),FO=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(RS,{...t,className:n("menu.groupLabel","menu__group__label",{},e),ref:r})}),Un={Root:CO,Trigger:AO,Portal:OO,Content:TO,Viewport:IO,Arrow:PO,Group:kO,Item:DO,CheckboxItem:LO,ItemIndicator:NO,Separator:MO,GroupLabel:FO},jO=c.forwardRef(({srOnly:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Ae();return c.createElement(k$,{...n,className:i("input.label","input__label",{srOnly:e},t),ref:o},r)}),BO=c.forwardRef(({srOnly:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Ae();return c.createElement(N$,{...n,className:i("input.description","input__description",{srOnly:e},t),ref:o},r)}),RO=c.forwardRef(({__inputScope:e,srOnly:t,classNames:r,children:n,...o},i)=>{const{tx:a}=Ae(),{validationValence:s}=nr(jt,e);return c.createElement(L$,{...o,className:a("input.validation",`input__validation-message input__validation-message--${s}`,{srOnly:t,validationValence:s},r),ref:i},n)}),UO=c.forwardRef(({srOnly:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Ae();return c.createElement(M$,{...n,className:i("input.descriptionAndValidation","input__description-and-validation",{srOnly:e},t),ref:o},r)}),WO=c.forwardRef(({density:e,elevation:t,segmentClassName:r,inputClassName:n,variant:o,...i},a)=>{const{hasIosKeyboard:s}=Ae(),{tx:l}=Ae(),u=Lr(e),f=Bn(t),d=c.useCallback(({focused:p,validationValence:h})=>l("input.input","input--pin-segment",{variant:"static",focused:p,disabled:i.disabled,density:u,elevation:f,validationValence:h},r),[l,i.disabled,f,t,u]);return c.createElement(F$,{...i,segmentClassName:d,...i.autoFocus&&!s&&{autoFocus:!0},inputClassName:l("input.inputWithSegments","input input--pin",{disabled:i.disabled},n),ref:a})}),VO=c.forwardRef(({__inputScope:e,classNames:t,density:r,elevation:n,variant:o,...i},a)=>{const{hasIosKeyboard:s}=Ae(),l=Ae(),u=Lr(r),f=Bn(n),{validationValence:d}=nr(jt,e),{tx:p}=l;return c.createElement(j$,{...i,className:p("input.input","input",{variant:o,disabled:i.disabled,density:u,elevation:f,validationValence:d},t),...i.autoFocus&&!s&&{autoFocus:!0},ref:a})}),HO=c.forwardRef(({__inputScope:e,classNames:t,density:r,elevation:n,variant:o,...i},a)=>{const{hasIosKeyboard:s}=Ae(),{tx:l}=Ae(),u=Lr(r),f=Bn(n),{validationValence:d}=nr(jt,e);return c.createElement(B$,{...i,className:l("input.input","input--text-area",{variant:o,disabled:i.disabled,density:u,elevation:f,validationValence:d},t),...i.autoFocus&&!s&&{autoFocus:!0},ref:a})}),zO=c.forwardRef(({__inputScope:e,checked:t,defaultChecked:r,onCheckedChange:n,size:o,weight:i="bold",classNames:a,...s},l)=>{const[u,f]=Gr({prop:t,defaultProp:r,onChange:n}),{id:d,validationValence:p,descriptionId:h,errorMessageId:g}=nr(jt,e),{tx:v}=Ae(),y=u==="indeterminate"?ze.Minus:u?ze.Check:c.Fragment;return c.createElement(e$,{...s,checked:u,onCheckedChange:f,id:d,"aria-describedby":h,...p==="error"&&{"aria-invalid":"true","aria-errormessage":g},className:v("input.checkbox","input--checkbox",{size:o},"shrink-0",a),ref:l},c.createElement(t$,{asChild:!0},c.createElement(y,u&&{weight:i,className:v("input.checkboxIndicator","input--checkbox__indicator",{size:o})})))}),GO=c.forwardRef(({__inputScope:e,checked:t,defaultChecked:r,onCheckedChange:n,size:o=5,classNames:i,...a},s)=>{const{tx:l}=Ae(),[u,f]=Gr({prop:t,defaultProp:r,onChange:n}),{id:d,validationValence:p,descriptionId:h,errorMessageId:g}=nr(jt,e);return c.createElement(u$,{...a,checked:u,onCheckedChange:f,id:d,"aria-describedby":h,...p==="error"&&{"aria-invalid":"true","aria-errormessage":g},className:l("input.switch","input--switch",{size:o},i),ref:s},c.createElement(f$,{className:l("input.switchThumb","input--switch__thumb",{size:o})}))}),Fr={Root:yg,PinInput:WO,TextInput:VO,TextArea:HO,Checkbox:zO,Switch:GO,Label:jO,Description:BO,Validation:RO,DescriptionAndValidation:UO},Sv=c.createContext({density:"coarse"}),So=({density:e,children:t})=>c.createElement(Sv.Provider,{value:{density:e}},t),kc=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae(),i=Lr(r.density);return c.createElement(So,{density:i},c.createElement(Eg,{...r,className:o("list.root","list",{},e),ref:n},t))}),KO=c.forwardRef(({children:e,classNames:t,asChild:r,...n},o)=>{const i=r?xt:"div",a=Lr(),{tx:s}=Ae();return c.createElement(i,{...!r&&{role:"none"},...n,className:s("list.item.endcap","list__listItem__endcap",{density:a},t),ref:o},e)}),qO=({classNames:e,...t})=>{const r=Lr(),{tx:n}=Ae();return c.createElement("div",{role:"none",...t,className:n("list.item.openTrigger","list__listItem__openTrigger--mock",{density:r},e)})},YO=c.forwardRef(({children:e,classNames:t,...r},n)=>{const{tx:o}=Ae(),i=Lr();return c.createElement(tC,{...r,className:o("list.item.heading","list__listItem__heading",{density:i},t),ref:n},e)}),JO=c.forwardRef(({__listItemScope:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Ae(),a=Lr(),{open:s}=xg(_i,e),l=s?ze.CaretDown:ze.CaretRight;return c.createElement(rC,{...n,className:i("list.item.openTrigger","list__listItem__openTrigger",{density:a},t),ref:o},r||c.createElement(l,{weight:"bold",className:i("list.item.openTriggerIcon","list__listItem__openTrigger__icon",{})}))}),XO=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae(),i=Lr();return c.createElement(Sg,{...r,className:o("list.item.root","list__listItem",{density:i,collapsible:r.collapsible},e),ref:n},t)}),Nc={Root:XO,Endcap:KO,Heading:YO,OpenTrigger:JO,CollapsibleContent:nC,MockOpenTrigger:qO},Xr;(function(e){e[e.IDLE=0]="IDLE",e[e.DEBOUNCING=1]="DEBOUNCING",e[e.FOLLOWING=2]="FOLLOWING"})(Xr||(Xr={}));var ZO=(e,{onDismiss:t,dismissThreshold:r=64,debounceThreshold:n=8,offset:o=0})=>{const i=e.current,[a,s]=c.useState(Xr.IDLE),[l,u]=c.useState(0),f=c.useCallback(()=>{s(Xr.IDLE),i?.style.removeProperty("inset-inline-start"),i?.style.setProperty("transition-duration","200ms")},[i]),d=c.useCallback(()=>{s(Xr.FOLLOWING),i?.style.setProperty("transition-duration","0ms")},[i]),p=c.useCallback(({screenX:v})=>{a===Xr.IDLE&&(s(Xr.DEBOUNCING),u(v))},[a]),h=c.useCallback(({screenX:v})=>{if(i){const y=Math.min(v-l,0);switch(a){case Xr.FOLLOWING:Math.abs(y)>r?(f(),t?.()):i.style.setProperty("inset-inline-start",`${o+y}px`);break;case Xr.DEBOUNCING:Math.abs(y)>n&&d();break}}},[i,a,l]),g=c.useCallback(()=>{f()},[f]);c.useEffect(()=>(i?.addEventListener("pointerdown",p),()=>{i?.removeEventListener("pointerdown",p)}),[i,p]),c.useEffect(()=>(i&&document.documentElement.addEventListener("pointermove",h),()=>{document.documentElement.removeEventListener("pointermove",h)}),[i,h]),c.useEffect(()=>(i&&document.documentElement.addEventListener("pointerup",g),()=>{document.documentElement.removeEventListener("pointerup",g)}),[i,g])},Dc="NavigationSidebar",Lc="Main",[X9,$v]=uo(Lc,{navigationSidebarOpen:!1,setNavigationSidebarOpen:e=>{console.warn("Attempt to set sidebar state without initializing `MainRoot`")},complementarySidebarOpen:!1,setComplementarySidebarOpen:e=>{console.warn("Attempt to set sidebar state without initializing `MainRoot`")}}),QO=e=>{!document.body.hasAttribute("data-is-keyboard")&&e.preventDefault()},eT=c.forwardRef(({classNames:e,children:t,swipeToDismiss:r,onOpenAutoFocus:n,open:o,setOpen:i,side:a,...s},l)=>{const[u]=Rd("lg",{ssr:!1}),{tx:f}=Ae(),d=Ol(l),p=c.useRef(null);ZO(r?d:p,{onDismiss:()=>i(!1)});const h=u?Ge.div:Kl;return c.createElement(Yl,{open:o,modal:!1},c.createElement(h,{...!u&&{forceMount:!0,tabIndex:-1,onOpenAutoFocus:n??QO},...s,className:f("main.sidebar","main__sidebar",{isLg:u,[a==="inline-end"?"inlineEndSidebarOpen":"inlineStartSidebarOpen"]:o,side:a},e),...!o&&{inert:"true"},ref:d},c.createElement(Oi,{elevation:"group"},t)))}),Cv=c.forwardRef((e,t)=>{const{navigationSidebarOpen:r,setNavigationSidebarOpen:n}=$v(Dc);return c.createElement(eT,{...e,open:r,setOpen:n,side:"inline-start",ref:t})});Cv.displayName=Dc,Cv.displayName=Dc;var tT=c.forwardRef(({asChild:e,classNames:t,bounce:r,children:n,...o},i)=>{const[a]=Rd("lg",{ssr:!1}),{navigationSidebarOpen:s,complementarySidebarOpen:l}=$v(Lc),{tx:u}=Ae(),f=e?xt:"main";return c.createElement(f,{...o,className:u("main.content","main",{isLg:a,inlineStartSidebarOpen:s,inlineEndSidebarOpen:l,bounce:r},t),ref:i},n)});tT.displayName=Lc;var Av="Message",[rT,Ov]=uo(Av),Tv=c.forwardRef(({asChild:e,valence:t,elevation:r,className:n,titleId:o,descriptionId:i,children:a,...s},l)=>{const{tx:u}=Ae(),f=_t("message__title",o),d=_t("message__description",i),p=Bn(r),h=e?xt:Ge.div;return c.createElement(rT,{titleId:f,descriptionId:d},c.createElement(h,{...s,className:u("message.root","message",{valence:t,elevation:p},n),"aria-labelledby":f,"aria-describedby":d,ref:l},a))});Tv.displayName=Av;var Iv="MessageTitle",Pv=c.forwardRef(({asChild:e,className:t,children:r,...n},o)=>{const{tx:i}=Ae(),{titleId:a}=Ov(Iv),s=e?xt:Ge.h2;return c.createElement(s,{...n,className:i("message.title","message__title",{},t),id:a,ref:o},r)});Pv.displayName=Iv;var kv="MessageBody",Nv=c.forwardRef(({asChild:e,className:t,children:r,...n},o)=>{const{tx:i}=Ae(),{descriptionId:a}=Ov(kv),s=e?xt:Ge.p;return c.createElement(s,{...n,className:i("message.body","message__body",{},t),id:a,ref:o},r)});Nv.displayName=kv;var Mc={Root:Tv,Title:Pv,Body:Nv},nT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(EC,{...t,className:n("scrollArea.root","scroll-area",{},e),ref:r})}),oT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(xC,{...t,className:n("scrollArea.viewport","scroll-area",{},e),ref:r})}),iT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(SC,{...t,className:n("scrollArea.scrollbar","scroll-area__scrollbar",{},e),ref:r})}),aT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement($C,{...t,className:n("scrollArea.thumb","scroll-area__thumb",{},e),ref:r})}),sT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(CC,{...t,className:n("scrollArea.corner","scroll-area__corner",{},e),ref:r})}),as={Root:nT,Viewport:oT,Scrollbar:iT,Thumb:aT,Corner:sT},lT=MA,cT=FA,uT=SA,fT=_A,dT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(IA,{...t,className:n("tooltip.arrow","tooltip__arrow",{},e),ref:r})}),pT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement($A,{sideOffset:4,collisionPadding:8,...t,className:n("tooltip.content","tooltip",{},e),ref:r})}),yr={Provider:lT,Root:cT,Portal:uT,Trigger:fT,Arrow:dT,Content:pT},hT=()=>!!navigator.userAgent.match(/iP(ad|od|hone).+Safari/),Dv=c.createContext({tx:(e,t,r,...n)=>t,themeMode:"dark",hasIosKeyboard:!1}),Lv=e=>{e?document.body.setAttribute("data-is-keyboard","true"):document.body.removeAttribute("data-is-keyboard")},gT=({children:e,fallback:t=null,resourceExtensions:r,appNs:n,tx:o=(l,u,f,...d)=>u,themeMode:i="dark",rootElevation:a="base",rootDensity:s="coarse"})=>(c.useEffect(()=>{if(document.defaultView){const l=zA(document.defaultView);return l.subscribe(Lv),()=>l.unsubscribe(Lv)}},[]),c.createElement(Dv.Provider,{value:{tx:o,themeMode:i,hasIosKeyboard:hT()}},c.createElement(qA,{fallback:t,resourceExtensions:r,appNs:n},c.createElement(Oi,{elevation:a},c.createElement(So,{density:s},e)))));function Mv(e){return!Array.isArray(e[0])}function ss(e,t){const r=e.length,n=Mv(e)?[e]:e,o=Mv(t)?t.map(l=>[l]):t,i=o[0].length,a=o[0].map((l,u)=>o.map(f=>f[u]));let s=n.map(l=>a.map(u=>Array.isArray(l)?l.reduce((f,d,p)=>f+d*(u[p]||0),0):u.reduce((f,d)=>f+d*l,0)));return r===1&&(s=s[0]),i===1?s.map(l=>l[0]):s}function vT(e){return e.map(t=>{const r=t<0?-1:1,n=Math.abs(t);return n<.04045?t/12.92:r*Math.pow((n+.055)/1.055,2.4)})}function Fv(e){return e.map(t=>{const r=t<0?-1:1,n=Math.abs(t);return n>.0031308?r*(1.055*Math.pow(n,1/2.4)-.055):12.92*t})}function mT(e){return ss([[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],e)}function jv(e){return ss([[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],e)}function bT(e){return ss([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],e)}function Bv(e){return ss([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],e)}function yT(e){const t=.008856451679035631,r=24389/27,n=[.96422,1,.82521],i=e.map((a,s)=>a/n[s]).map(a=>a>t?Math.cbrt(a):(r*a+16)/116);return[116*i[1]-16,500*(i[0]-i[1]),200*(i[1]-i[2])]}function Rv(e){const t=903.2962962962963,r=216/24389,n=[.96422,1,.82521],o=[];return o[1]=(e[0]+16)/116,o[0]=e[1]/500+o[1],o[2]=o[1]-e[2]/200,[Math.pow(o[0],3)>r?Math.pow(o[0],3):(116*o[0]-16)/t,e[0]>t*r?Math.pow((e[0]+16)/116,3):e[0]/t,Math.pow(o[2],3)>r?Math.pow(o[2],3):(116*o[2]-16)/t].map((a,s)=>a*n[s])}function Fc(e){const t=Math.atan2(e[2],e[1])*180/Math.PI;return[e[0],Math.sqrt(Math.pow(e[1],2)+Math.pow(e[2],2)),t>=0?t:t+360]}function ls(e){return[e[0],e[1]*Math.cos(e[2]*Math.PI/180),e[1]*Math.sin(e[2]*Math.PI/180)]}function wT(e){return Fc(yT(bT(mT(vT(e)))))}function _T(e){return Fv(jv(Bv(Rv(ls(e)))))}function ET(e){return Fv(jv(Bv(Rv(e))))}function Uv(e,t,r){return _T([+e,+t,+r]).reduce((i,a)=>i&&a>=0-5e-6&&a<=1+5e-6,!0)}function xT(e){const r=Fc(e),n=r[0];let o=r[1];const i=r[2];if(Uv(n,o,i))return e;let a=o,s=0;for(o/=2;a-s>1e-4;)Uv(n,o,i)?s=o:a=o,o=(a+s)/2;return ls([n,o,i])}const ST=128;function $T(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function CT(e,t){const r=1-e;return r*r*t}function AT(e,t){return 2*(1-e)*e*t}function OT(e,t){return e*e*t}function jc(e,t,r,n){return CT(e,t)+AT(e,r)+OT(e,n)}function TT(e,t){const[r,n,o]=e.points;return[jc(t,r[0],n[0],o[0]),jc(t,r[1],n[1],o[1]),jc(t,r[2],n[2],o[2])]}function IT(e,t){const r=[];for(let n=0;n<=t;n++)r.push(TT(e,n/t));return r}function PT(e,t=ST){const r=[];let n;for(let o=0,i=e.curves;o<i.length;o++){const a=i[o],s=IT(a,t);for(const l of s)n&&$T(n,l)||(r.push(l),n=l)}return r}const Wv=.75;function kT(e,t,r){const n=[],o=(t-e)/r;for(let i=0;i<r;i++)n[i]=e+o*i;return n}const NT=(e,t,r)=>{const n=e<=0?0:Math.log(e),o=Math.log(t),i=(o-n)/r,a=[Math.pow(Math.E,n)];for(let s=1;s<r;s+=1)a.push(Math.pow(Math.E,n+i*s));return a.push(Math.pow(Math.E,o)),a};function DT(e,t,r=[0,100],n=Wv){if(e.length<=2)return[];const o=[],i=NT(Math.log10(r[0]),Math.log10(r[1]),t),a=kT(r[0],r[1],t);let s=0;for(let l=0;l<t;l++){const u=Math.min(r[1],Math.max(r[0],i[l]*(1-n)+a[l]*n));for(;u>e[s+1][0];)s++;const[f,d,p]=e[s],[h,g,v]=e[s+1],y=(u-f)/(h-f);o[l]=[f+(h-f)*y,d+(g-d)*y,p+(v-p)*y]}return o.map(xT)}function LT(e,t=16,r=[0,100],n=Wv,o=24){return DT(PT(e,Math.ceil(o*(1+Math.abs(e.torsion||1))/2)).map(i=>BT(i,e.torsion,e.torsionT0)),t,r,n)}function MT(e){return`#${e.map(t=>(t<0?0:Math.floor(t>=1?255:t*256)).toString(16).padStart(2,"0")).join("")}`}function Vv(e){return MT(ET(e))}function FT(e){const t=e.match(/#?(..)(..)(..)/);return t?[parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255]:[0,0,0]}function jT(e){return wT(FT(e))}function BT(e,t=0,r=50){const n=e[0],[o,i,a]=Fc(e),s=t*(n-r);return ls([o,i,a+s])}function RT({keyColor:e,darkCp:t,lightCp:r,hueTorsion:n}){const o=[0,0,0],i=[100,0,0],a=ls(e),[s,l,u]=a,f=[s*(1-t),l,u],d=[s+(100-s)*r,l,u];return{curves:[{points:[o,f,a]},{points:[a,d,i]}],torsion:n,torsionT0:s}}var UT={aqua:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,azure:/#f0ffff(ff)?(?!\w)/gi,beige:/#f5f5dc(ff)?(?!\w)/gi,bisque:/#ffe4c4(ff)?(?!\w)/gi,black:/#000000(ff)?(?!\w)|#000(f)?(?!\w)/gi,blue:/#0000ff(ff)?(?!\w)|#00f(f)?(?!\w)/gi,brown:/#a52a2a(ff)?(?!\w)/gi,coral:/#ff7f50(ff)?(?!\w)/gi,cornsilk:/#fff8dc(ff)?(?!\w)/gi,crimson:/#dc143c(ff)?(?!\w)/gi,cyan:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,darkblue:/#00008b(ff)?(?!\w)/gi,darkcyan:/#008b8b(ff)?(?!\w)/gi,darkgrey:/#a9a9a9(ff)?(?!\w)/gi,darkred:/#8b0000(ff)?(?!\w)/gi,deeppink:/#ff1493(ff)?(?!\w)/gi,dimgrey:/#696969(ff)?(?!\w)/gi,gold:/#ffd700(ff)?(?!\w)/gi,green:/#008000(ff)?(?!\w)/gi,grey:/#808080(ff)?(?!\w)/gi,honeydew:/#f0fff0(ff)?(?!\w)/gi,hotpink:/#ff69b4(ff)?(?!\w)/gi,indigo:/#4b0082(ff)?(?!\w)/gi,ivory:/#fffff0(ff)?(?!\w)/gi,khaki:/#f0e68c(ff)?(?!\w)/gi,lavender:/#e6e6fa(ff)?(?!\w)/gi,lime:/#00ff00(ff)?(?!\w)|#0f0(f)?(?!\w)/gi,linen:/#faf0e6(ff)?(?!\w)/gi,maroon:/#800000(ff)?(?!\w)/gi,moccasin:/#ffe4b5(ff)?(?!\w)/gi,navy:/#000080(ff)?(?!\w)/gi,oldlace:/#fdf5e6(ff)?(?!\w)/gi,olive:/#808000(ff)?(?!\w)/gi,orange:/#ffa500(ff)?(?!\w)/gi,orchid:/#da70d6(ff)?(?!\w)/gi,peru:/#cd853f(ff)?(?!\w)/gi,pink:/#ffc0cb(ff)?(?!\w)/gi,plum:/#dda0dd(ff)?(?!\w)/gi,purple:/#800080(ff)?(?!\w)/gi,red:/#ff0000(ff)?(?!\w)|#f00(f)?(?!\w)/gi,salmon:/#fa8072(ff)?(?!\w)/gi,seagreen:/#2e8b57(ff)?(?!\w)/gi,seashell:/#fff5ee(ff)?(?!\w)/gi,sienna:/#a0522d(ff)?(?!\w)/gi,silver:/#c0c0c0(ff)?(?!\w)/gi,skyblue:/#87ceeb(ff)?(?!\w)/gi,snow:/#fffafa(ff)?(?!\w)/gi,tan:/#d2b48c(ff)?(?!\w)/gi,teal:/#008080(ff)?(?!\w)/gi,thistle:/#d8bfd8(ff)?(?!\w)/gi,tomato:/#ff6347(ff)?(?!\w)/gi,violet:/#ee82ee(ff)?(?!\w)/gi,wheat:/#f5deb3(ff)?(?!\w)/gi,white:/#ffffff(ff)?(?!\w)|#fff(f)?(?!\w)/gi},Bc=UT,Rc={whitespace:/\s+/g,urlHexPairs:/%[\dA-F]{2}/g,quotes:/"/g};function WT(e){return e.trim().replace(Rc.whitespace," ")}function VT(e){return encodeURIComponent(e).replace(Rc.urlHexPairs,zT)}function HT(e){return Object.keys(Bc).forEach(function(t){Bc[t].test(e)&&(e=e.replace(Bc[t],t))}),e}function zT(e){switch(e){case"%20":return" ";case"%3D":return"=";case"%3A":return":";case"%2F":return"/";default:return e.toLowerCase()}}function Uc(e){if(typeof e!="string")throw new TypeError("Expected a string, but received "+typeof e);e.charCodeAt(0)===65279&&(e=e.slice(1));var t=HT(WT(e)).replace(Rc.quotes,"'");return"data:image/svg+xml,"+VT(t)}Uc.toSrcset=function(t){return Uc(t).replace(/ /g,"%20")};var GT=Uc,Hv={},zv={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r}});function t(n,o){return{handler:n,config:o}}t.withOptions=function(n,o=()=>({})){const i=function(a){return{__options:a,handler:n(a),config:o(a)}};return i.__isOptionsFunction=!0,i.__pluginFunction=n,i.__configFunction=o,i};const r=t})(zv),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});const t=r(zv);function r(o){return o&&o.__esModule?o:{default:o}}const n=t.default}(Hv);let Wc=Hv;var Gv=(Wc.__esModule?Wc:{default:Wc}).default,Kv={},qv={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"cloneDeep",{enumerable:!0,get:function(){return t}});function t(r){return Array.isArray(r)?r.map(n=>t(n)):typeof r=="object"&&r!==null?Object.fromEntries(Object.entries(r).map(([n,o])=>[n,t(o)])):r}})(qv);var KT={content:[],presets:[],darkMode:"media",theme:{accentColor:({theme:e})=>({...e("colors"),auto:"auto"}),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9"},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>e("brightness"),backdropContrast:({theme:e})=>e("contrast"),backdropGrayscale:({theme:e})=>e("grayscale"),backdropHueRotate:({theme:e})=>e("hueRotate"),backdropInvert:({theme:e})=>e("invert"),backdropOpacity:({theme:e})=>e("opacity"),backdropSaturate:({theme:e})=>e("saturate"),backdropSepia:({theme:e})=>e("sepia"),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({...e("colors"),DEFAULT:e("colors.gray.200","currentColor")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>({...e("spacing")}),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px"},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"},caretColor:({theme:e})=>e("colors"),colors:({colors:e})=>({inherit:e.inherit,current:e.current,transparent:e.transparent,black:e.black,white:e.white,slate:e.slate,gray:e.gray,zinc:e.zinc,neutral:e.neutral,stone:e.stone,red:e.red,orange:e.orange,amber:e.amber,yellow:e.yellow,lime:e.lime,green:e.green,emerald:e.emerald,teal:e.teal,cyan:e.cyan,sky:e.sky,blue:e.blue,indigo:e.indigo,violet:e.violet,purple:e.purple,fuchsia:e.fuchsia,pink:e.pink,rose:e.rose}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2"},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>e("borderWidth"),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>({none:"none",...e("colors")}),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%"}),flexGrow:{0:"0",DEFAULT:"1"},flexShrink:{0:"0",DEFAULT:"1"},fontFamily:{sans:["ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"',"sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%"},grayscale:{0:"0",DEFAULT:"100%"},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7"},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7"},gridTemplateColumns:{none:"none",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},gridTemplateRows:{none:"none",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))"},height:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},inset:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),invert:{0:"0",DEFAULT:"100%"},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6"},maxHeight:({theme:e})=>({...e("spacing"),none:"none",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"}),maxWidth:({theme:e,breakpoints:t})=>({none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...t(e("screens"))}),minHeight:{0:"0px",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",20:"0.2",25:"0.25",30:"0.3",40:"0.4",50:"0.5",60:"0.6",70:"0.7",75:"0.75",80:"0.8",90:"0.9",95:"0.95",100:"1"},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:e("colors.blue.500","#3b82f6"),...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg"},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2"},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"},screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},scrollMargin:({theme:e})=>({...e("spacing")}),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg"},space:({theme:e})=>({...e("spacing")}),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2"},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},textIndent:({theme:e})=>({...e("spacing")}),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),width:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",min:"min-content",max:"max-content",fit:"fit-content"}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50"}},plugins:[]};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o}});const t=qv,r=n(KT);function n(i){return i&&i.__esModule?i:{default:i}}const o=(0,t.cloneDeep)(r.default.theme)})(Kv);let Vc=Kv;var qT=(Vc.__esModule?Vc:{default:Vc}).default,Yv={},Jv={},Hc={exports:{}},ht=String,Xv=function(){return{isColorSupported:!1,reset:ht,bold:ht,dim:ht,italic:ht,underline:ht,inverse:ht,hidden:ht,strikethrough:ht,black:ht,red:ht,green:ht,yellow:ht,blue:ht,magenta:ht,cyan:ht,white:ht,gray:ht,bgBlack:ht,bgRed:ht,bgGreen:ht,bgYellow:ht,bgBlue:ht,bgMagenta:ht,bgCyan:ht,bgWhite:ht}};Hc.exports=Xv(),Hc.exports.createColors=Xv;var YT=Hc.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var f in u)Object.defineProperty(l,f,{enumerable:!0,get:u[f]})}t(e,{dim:function(){return a},default:function(){return s}});const r=n(YT);function n(l){return l&&l.__esModule?l:{default:l}}let o=new Set;function i(l,u,f){typeof process<"u"&&process.env.JEST_WORKER_ID||f&&o.has(f)||(f&&o.add(f),console.warn(""),u.forEach(d=>console.warn(l,"-",d)))}function a(l){return r.default.dim(l)}const s={info(l,u){i(r.default.bold(r.default.cyan("info")),...Array.isArray(l)?[l]:[u,l])},warn(l,u){i(r.default.bold(r.default.yellow("warn")),...Array.isArray(l)?[l]:[u,l])},risk(l,u){i(r.default.bold(r.default.magenta("risk")),...Array.isArray(l)?[l]:[u,l])}}})(Jv),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o}});const t=r(Jv);function r(i){return i&&i.__esModule?i:{default:i}}function n({version:i,from:a,to:s}){t.default.warn(`${a}-color-renamed`,[`As of Tailwind CSS ${i}, \`${a}\` has been renamed to \`${s}\`.`,"Update your configuration file to silence this warning."])}const o={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return n({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return n({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return n({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return n({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return n({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}}(Yv);let zc=Yv;var JT=(zc.__esModule?zc:{default:zc}).default;const cs=GT,XT=Gv,Zv=qT,bn=JT,[ZT,{lineHeight:QT}]=Zv.fontSize.base,{spacing:Zr,borderWidth:Qv,borderRadius:em}=Zv;XT.withOptions(function(e={strategy:void 0}){return function({addBase:t,addComponents:r,theme:n}){const o=e.strategy===void 0?["base","class"]:[e.strategy],i=[{base:["[type='text']","[type='email']","[type='url']","[type='password']","[type='number']","[type='date']","[type='datetime-local']","[type='month']","[type='search']","[type='tel']","[type='time']","[type='week']","[multiple]","textarea","select"],class:[".form-input",".form-textarea",".form-select",".form-multiselect"],styles:{appearance:"none","background-color":"#fff","border-color":n("colors.gray.500",bn.gray[500]),"border-width":Qv.DEFAULT,"border-radius":em.none,"padding-top":Zr[2],"padding-right":Zr[3],"padding-bottom":Zr[2],"padding-left":Zr[3],"font-size":ZT,"line-height":QT,"--tw-shadow":"0 0 #0000","&:focus":{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":n("colors.blue.600",bn.blue[600]),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","box-shadow":"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)","border-color":n("colors.blue.600",bn.blue[600])}}},{base:["input::placeholder","textarea::placeholder"],class:[".form-input::placeholder",".form-textarea::placeholder"],styles:{color:n("colors.gray.500",bn.gray[500]),opacity:"1"}},{base:["::-webkit-datetime-edit-fields-wrapper"],class:[".form-input::-webkit-datetime-edit-fields-wrapper"],styles:{padding:"0"}},{base:["::-webkit-date-and-time-value"],class:[".form-input::-webkit-date-and-time-value"],styles:{"min-height":"1.5em"}},{base:["::-webkit-datetime-edit","::-webkit-datetime-edit-year-field","::-webkit-datetime-edit-month-field","::-webkit-datetime-edit-day-field","::-webkit-datetime-edit-hour-field","::-webkit-datetime-edit-minute-field","::-webkit-datetime-edit-second-field","::-webkit-datetime-edit-millisecond-field","::-webkit-datetime-edit-meridiem-field"],class:[".form-input::-webkit-datetime-edit",".form-input::-webkit-datetime-edit-year-field",".form-input::-webkit-datetime-edit-month-field",".form-input::-webkit-datetime-edit-day-field",".form-input::-webkit-datetime-edit-hour-field",".form-input::-webkit-datetime-edit-minute-field",".form-input::-webkit-datetime-edit-second-field",".form-input::-webkit-datetime-edit-millisecond-field",".form-input::-webkit-datetime-edit-meridiem-field"],styles:{"padding-top":0,"padding-bottom":0}},{base:["select"],class:[".form-select"],styles:{"background-image":`url("${cs(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="${n("colors.gray.500",bn.gray[500])}" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6 8l4 4 4-4"/></svg>`)}")`,"background-position":`right ${Zr[2]} center`,"background-repeat":"no-repeat","background-size":"1.5em 1.5em","padding-right":Zr[10],"print-color-adjust":"exact"}},{base:["[multiple]"],class:null,styles:{"background-image":"initial","background-position":"initial","background-repeat":"unset","background-size":"initial","padding-right":Zr[3],"print-color-adjust":"unset"}},{base:["[type='checkbox']","[type='radio']"],class:[".form-checkbox",".form-radio"],styles:{appearance:"none",padding:"0","print-color-adjust":"exact",display:"inline-block","vertical-align":"middle","background-origin":"border-box","user-select":"none","flex-shrink":"0",height:Zr[4],width:Zr[4],color:n("colors.blue.600",bn.blue[600]),"background-color":"#fff","border-color":n("colors.gray.500",bn.gray[500]),"border-width":Qv.DEFAULT,"--tw-shadow":"0 0 #0000"}},{base:["[type='checkbox']"],class:[".form-checkbox"],styles:{"border-radius":em.none}},{base:["[type='radio']"],class:[".form-radio"],styles:{"border-radius":"100%"}},{base:["[type='checkbox']:focus","[type='radio']:focus"],class:[".form-checkbox:focus",".form-radio:focus"],styles:{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"2px","--tw-ring-offset-color":"#fff","--tw-ring-color":n("colors.blue.600",bn.blue[600]),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)","box-shadow":"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)"}},{base:["[type='checkbox']:checked","[type='radio']:checked"],class:[".form-checkbox:checked",".form-radio:checked"],styles:{"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat"}},{base:["[type='checkbox']:checked"],class:[".form-checkbox:checked"],styles:{"background-image":`url("${cs('<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><path d="M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z"/></svg>')}")`}},{base:["[type='radio']:checked"],class:[".form-radio:checked"],styles:{"background-image":`url("${cs('<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="3"/></svg>')}")`}},{base:["[type='checkbox']:checked:hover","[type='checkbox']:checked:focus","[type='radio']:checked:hover","[type='radio']:checked:focus"],class:[".form-checkbox:checked:hover",".form-checkbox:checked:focus",".form-radio:checked:hover",".form-radio:checked:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["[type='checkbox']:indeterminate"],class:[".form-checkbox:indeterminate"],styles:{"background-image":`url("${cs('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 8h8"/></svg>')}")`,"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat"}},{base:["[type='checkbox']:indeterminate:hover","[type='checkbox']:indeterminate:focus"],class:[".form-checkbox:indeterminate:hover",".form-checkbox:indeterminate:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["[type='file']"],class:null,styles:{background:"unset","border-color":"inherit","border-width":"0","border-radius":"0",padding:"0","font-size":"unset","line-height":"inherit"}},{base:["[type='file']:focus"],class:null,styles:{outline:["1px solid ButtonText","1px auto -webkit-focus-ring-color"]}}],a=s=>i.map(l=>l[s]===null?null:{[l[s]]:l.styles}).filter(Boolean);o.includes("base")&&t(a("base")),o.includes("class")&&r(a("class"))}});var us={exports:{}};us.exports,function(e,t){var r=200,n="__lodash_hash_undefined__",o=800,i=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",f="[object Boolean]",d="[object Date]",p="[object Error]",h="[object Function]",g="[object GeneratorFunction]",v="[object Map]",y="[object Number]",m="[object Null]",w="[object Object]",E="[object Proxy]",x="[object RegExp]",P="[object Set]",I="[object String]",S="[object Undefined]",O="[object WeakMap]",k="[object ArrayBuffer]",j="[object DataView]",D="[object Float32Array]",N="[object Float64Array]",J="[object Int8Array]",K="[object Int16Array]",Y="[object Int32Array]",te="[object Uint8Array]",oe="[object Uint8ClampedArray]",le="[object Uint16Array]",ae="[object Uint32Array]",ge=/[\\^$.*+?()[\]{}|]/g,ce=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,V={};V[D]=V[N]=V[J]=V[K]=V[Y]=V[te]=V[oe]=V[le]=V[ae]=!0,V[s]=V[l]=V[k]=V[f]=V[j]=V[d]=V[p]=V[h]=V[v]=V[y]=V[w]=V[x]=V[P]=V[I]=V[O]=!1;var re=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,de=typeof self=="object"&&self&&self.Object===Object&&self,U=re||de||Function("return this")(),z=t&&!t.nodeType&&t,M=z&&!0&&e&&!e.nodeType&&e,R=M&&M.exports===z,G=R&&re.process,A=function(){try{var F=M&&M.require&&M.require("util").types;return F||G&&G.binding&&G.binding("util")}catch{}}(),T=A&&A.isTypedArray;function Z(F,Q,$){switch($.length){case 0:return F.call(Q);case 1:return F.call(Q,$[0]);case 2:return F.call(Q,$[0],$[1]);case 3:return F.call(Q,$[0],$[1],$[2])}return F.apply(Q,$)}function ne(F,Q){for(var $=-1,B=Array(F);++$<F;)B[$]=Q($);return B}function pe(F){return function(Q){return F(Q)}}function me(F,Q){return F?.[Q]}function xe(F,Q){return function($){return F(Q($))}}var Ee=Array.prototype,ie=Function.prototype,Ne=Object.prototype,dt=U["__core-js_shared__"],Te=ie.toString,Me=Ne.hasOwnProperty,bt=function(){var F=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||"");return F?"Symbol(src)_1."+F:""}(),$e=Ne.toString,De=Te.call(Object),C=RegExp("^"+Te.call(Me).replace(ge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=R?U.Buffer:void 0,_=U.Symbol,L=U.Uint8Array,W=b?b.allocUnsafe:void 0,X=xe(Object.getPrototypeOf,Object),se=Object.create,Pe=Ne.propertyIsEnumerable,it=Ee.splice,Le=_?_.toStringTag:void 0,Je=function(){try{var F=On(Object,"defineProperty");return F({},"",{}),F}catch{}}(),Ze=b?b.isBuffer:void 0,tn=Math.max,Jo=Date.now,fr=On(U,"Map"),Kt=On(Object,"create"),ro=function(){function F(){}return function(Q){if(!Vr(Q))return{};if(se)return se(Q);F.prototype=Q;var $=new F;return F.prototype=void 0,$}}();function kt(F){var Q=-1,$=F==null?0:F.length;for(this.clear();++Q<$;){var B=F[Q];this.set(B[0],B[1])}}function oa(){this.__data__=Kt?Kt(null):{},this.size=0}function Xo(F){var Q=this.has(F)&&delete this.__data__[F];return this.size-=Q?1:0,Q}function ia(F){var Q=this.__data__;if(Kt){var $=Q[F];return $===n?void 0:$}return Me.call(Q,F)?Q[F]:void 0}function Zo(F){var Q=this.__data__;return Kt?Q[F]!==void 0:Me.call(Q,F)}function Qo(F,Q){var $=this.__data__;return this.size+=this.has(F)?0:1,$[F]=Kt&&Q===void 0?n:Q,this}kt.prototype.clear=oa,kt.prototype.delete=Xo,kt.prototype.get=ia,kt.prototype.has=Zo,kt.prototype.set=Qo;function $t(F){var Q=-1,$=F==null?0:F.length;for(this.clear();++Q<$;){var B=F[Q];this.set(B[0],B[1])}}function aa(){this.__data__=[],this.size=0}function ei(F){var Q=this.__data__,$=It(Q,F);if($<0)return!1;var B=Q.length-1;return $==B?Q.pop():it.call(Q,$,1),--this.size,!0}function sa(F){var Q=this.__data__,$=It(Q,F);return $<0?void 0:Q[$][1]}function la(F){return It(this.__data__,F)>-1}function ca(F,Q){var $=this.__data__,B=It($,F);return B<0?(++this.size,$.push([F,Q])):$[B][1]=Q,this}$t.prototype.clear=aa,$t.prototype.delete=ei,$t.prototype.get=sa,$t.prototype.has=la,$t.prototype.set=ca;function qt(F){var Q=-1,$=F==null?0:F.length;for(this.clear();++Q<$;){var B=F[Q];this.set(B[0],B[1])}}function H(){this.size=0,this.__data__={hash:new kt,map:new(fr||$t),string:new kt}}function fe(F){var Q=oo(this,F).delete(F);return this.size-=Q?1:0,Q}function _e(F){return oo(this,F).get(F)}function Oe(F){return oo(this,F).has(F)}function qe(F,Q){var $=oo(this,F),B=$.size;return $.set(F,Q),this.size+=$.size==B?0:1,this}qt.prototype.clear=H,qt.prototype.delete=fe,qt.prototype.get=_e,qt.prototype.has=Oe,qt.prototype.set=qe;function Fe(F){var Q=this.__data__=new $t(F);this.size=Q.size}function Be(){this.__data__=new $t,this.size=0}function je(F){var Q=this.__data__,$=Q.delete(F);return this.size=Q.size,$}function Tt(F){return this.__data__.get(F)}function mt(F){return this.__data__.has(F)}function yt(F,Q){var $=this.__data__;if($ instanceof $t){var B=$.__data__;if(!fr||B.length<r-1)return B.push([F,Q]),this.size=++$.size,this;$=this.__data__=new qt(B)}return $.set(F,Q),this.size=$.size,this}Fe.prototype.clear=Be,Fe.prototype.delete=je,Fe.prototype.get=Tt,Fe.prototype.has=mt,Fe.prototype.set=yt;function Rt(F,Q){var $=io(F),B=!$&&Tn(F),ee=!$&&!B&&bl(F),he=!$&&!B&&!ee&&yl(F),Ce=$||B||ee||he,Se=Ce?ne(F.length,String):[],Ie=Se.length;for(var ke in F)(Q||Me.call(F,ke))&&!(Ce&&(ke=="length"||ee&&(ke=="offset"||ke=="parent")||he&&(ke=="buffer"||ke=="byteLength"||ke=="byteOffset")||hl(ke,Ie)))&&Se.push(ke);return Se}function Qt(F,Q,$){($!==void 0&&!ni(F[Q],$)||$===void 0&&!(Q in F))&&no(F,Q,$)}function ti(F,Q,$){var B=F[Q];(!(Me.call(F,Q)&&ni(B,$))||$===void 0&&!(Q in F))&&no(F,Q,$)}function It(F,Q){for(var $=F.length;$--;)if(ni(F[$][0],Q))return $;return-1}function no(F,Q,$){Q=="__proto__"&&Je?Je(F,Q,{configurable:!0,enumerable:!0,value:$,writable:!0}):F[Q]=$}var nd=gd();function rn(F){return F==null?F===void 0?S:m:Le&&Le in Object(F)?fa(F):yd(F)}function ua(F){return Yt(F)&&rn(F)==s}function od(F){if(!Vr(F)||bd(F))return!1;var Q=oi(F)?C:ce;return Q.test(Ed(F))}function id(F){return Yt(F)&&ii(F.length)&&!!V[rn(F)]}function ad(F){if(!Vr(F))return ml(F);var Q=vl(F),$=[];for(var B in F)B=="constructor"&&(Q||!Me.call(F,B))||$.push(B);return $}function ri(F,Q,$,B,ee){F!==Q&&nd(Q,function(he,Ce){if(ee||(ee=new Fe),Vr(he))sd(F,Q,Ce,$,ri,B,ee);else{var Se=B?B(da(F,Ce),he,Ce+"",F,Q,ee):void 0;Se===void 0&&(Se=he),Qt(F,Ce,Se)}},_l)}function sd(F,Q,$,B,ee,he,Ce){var Se=da(F,$),Ie=da(Q,$),ke=Ce.get(Ie);if(ke){Qt(F,$,ke);return}var Re=he?he(Se,Ie,$+"",F,Q,Ce):void 0,Nt=Re===void 0;if(Nt){var Mt=io(Ie),nn=!Mt&&bl(Ie),ai=!Mt&&!nn&&yl(Ie);Re=Ie,Mt||nn||ai?io(Se)?Re=Se:ha(Se)?Re=dd(Se):nn?(Nt=!1,Re=cd(Ie,!0)):ai?(Nt=!1,Re=fd(Ie,!0)):Re=[]:so(Ie)||Tn(Ie)?(Re=Se,Tn(Se)?Re=wl(Se):(!Vr(Se)||oi(Se))&&(Re=vd(Ie))):Nt=!1}Nt&&(Ce.set(Ie,Re),ee(Re,Ie,B,he,Ce),Ce.delete(Ie)),Qt(F,$,Re)}function pl(F,Q){return pa(wd(F,Q,xl),F+"")}var ld=Je?function(F,Q){return Je(F,"toString",{configurable:!0,enumerable:!1,value:El(Q),writable:!0})}:xl;function cd(F,Q){if(Q)return F.slice();var $=F.length,B=W?W($):new F.constructor($);return F.copy(B),B}function ud(F){var Q=new F.constructor(F.byteLength);return new L(Q).set(new L(F)),Q}function fd(F,Q){var $=Q?ud(F.buffer):F.buffer;return new F.constructor($,F.byteOffset,F.length)}function dd(F,Q){var $=-1,B=F.length;for(Q||(Q=Array(B));++$<B;)Q[$]=F[$];return Q}function pd(F,Q,$,B){var ee=!$;$||($={});for(var he=-1,Ce=Q.length;++he<Ce;){var Se=Q[he],Ie=B?B($[Se],F[Se],Se,$,F):void 0;Ie===void 0&&(Ie=F[Se]),ee?no($,Se,Ie):ti($,Se,Ie)}return $}function hd(F){return pl(function(Q,$){var B=-1,ee=$.length,he=ee>1?$[ee-1]:void 0,Ce=ee>2?$[2]:void 0;for(he=F.length>3&&typeof he=="function"?(ee--,he):void 0,Ce&&gl($[0],$[1],Ce)&&(he=ee<3?void 0:he,ee=1),Q=Object(Q);++B<ee;){var Se=$[B];Se&&F(Q,Se,B,he)}return Q})}function gd(F){return function(Q,$,B){for(var ee=-1,he=Object(Q),Ce=B(Q),Se=Ce.length;Se--;){var Ie=Ce[F?Se:++ee];if($(he[Ie],Ie,he)===!1)break}return Q}}function oo(F,Q){var $=F.__data__;return md(Q)?$[typeof Q=="string"?"string":"hash"]:$.map}function On(F,Q){var $=me(F,Q);return od($)?$:void 0}function fa(F){var Q=Me.call(F,Le),$=F[Le];try{F[Le]=void 0;var B=!0}catch{}var ee=$e.call(F);return B&&(Q?F[Le]=$:delete F[Le]),ee}function vd(F){return typeof F.constructor=="function"&&!vl(F)?ro(X(F)):{}}function hl(F,Q){var $=typeof F;return Q=Q??a,!!Q&&($=="number"||$!="symbol"&&q.test(F))&&F>-1&&F%1==0&&F<Q}function gl(F,Q,$){if(!Vr($))return!1;var B=typeof Q;return(B=="number"?ao($)&&hl(Q,$.length):B=="string"&&Q in $)?ni($[Q],F):!1}function md(F){var Q=typeof F;return Q=="string"||Q=="number"||Q=="symbol"||Q=="boolean"?F!=="__proto__":F===null}function bd(F){return!!bt&&bt in F}function vl(F){var Q=F&&F.constructor,$=typeof Q=="function"&&Q.prototype||Ne;return F===$}function ml(F){var Q=[];if(F!=null)for(var $ in Object(F))Q.push($);return Q}function yd(F){return $e.call(F)}function wd(F,Q,$){return Q=tn(Q===void 0?F.length-1:Q,0),function(){for(var B=arguments,ee=-1,he=tn(B.length-Q,0),Ce=Array(he);++ee<he;)Ce[ee]=B[Q+ee];ee=-1;for(var Se=Array(Q+1);++ee<Q;)Se[ee]=B[ee];return Se[Q]=$(Ce),Z(F,this,Se)}}function da(F,Q){if(!(Q==="constructor"&&typeof F[Q]=="function")&&Q!="__proto__")return F[Q]}var pa=_d(ld);function _d(F){var Q=0,$=0;return function(){var B=Jo(),ee=i-(B-$);if($=B,ee>0){if(++Q>=o)return arguments[0]}else Q=0;return F.apply(void 0,arguments)}}function Ed(F){if(F!=null){try{return Te.call(F)}catch{}try{return F+""}catch{}}return""}function ni(F,Q){return F===Q||F!==F&&Q!==Q}var Tn=ua(function(){return arguments}())?ua:function(F){return Yt(F)&&Me.call(F,"callee")&&!Pe.call(F,"callee")},io=Array.isArray;function ao(F){return F!=null&&ii(F.length)&&!oi(F)}function ha(F){return Yt(F)&&ao(F)}var bl=Ze||Sd;function oi(F){if(!Vr(F))return!1;var Q=rn(F);return Q==h||Q==g||Q==u||Q==E}function ii(F){return typeof F=="number"&&F>-1&&F%1==0&&F<=a}function Vr(F){var Q=typeof F;return F!=null&&(Q=="object"||Q=="function")}function Yt(F){return F!=null&&typeof F=="object"}function so(F){if(!Yt(F)||rn(F)!=w)return!1;var Q=X(F);if(Q===null)return!0;var $=Me.call(Q,"constructor")&&Q.constructor;return typeof $=="function"&&$ instanceof $&&Te.call($)==De}var yl=T?pe(T):id;function wl(F){return pd(F,_l(F))}function _l(F){return ao(F)?Rt(F,!0):ad(F)}var xd=hd(function(F,Q,$){ri(F,Q,$)});function El(F){return function(){return F}}function xl(F){return F}function Sd(){return!1}e.exports=xd}(us,us.exports),us.exports;var fs={},ds={};Object.defineProperty(ds,"__esModule",{value:!0}),ds.default=void 0;function tm(e,t){return{handler:e,config:t}}tm.withOptions=function(e,t=()=>({})){const r=function(n){return{__options:n,handler:e(n),config:t(n)}};return r.__isOptionsFunction=!0,r.__pluginFunction=e,r.__configFunction=t,r};var e5=tm;ds.default=e5,Object.defineProperty(fs,"__esModule",{value:!0}),fs.default=void 0;var t5=r5(ds);function r5(e){return e&&e.__esModule?e:{default:e}}var n5=t5.default;fs.default=n5;let Gc=fs;var o5=(Gc.__esModule?Gc:{default:Gc}).default,i5=function({matchUtilities:e,theme:t}){e({bs:r=>({blockSize:r})},{values:t("height")})},ps={};Object.defineProperty(ps,"__esModule",{value:!0}),ps.default=void 0;const rm=e=>Object.assign({},...Object.entries(e??{}).flatMap(([t,r])=>typeof r=="object"?Object.entries(rm(r)).map(([n,o])=>({[t+(n==="DEFAULT"?"":`-${n}`)]:o})):[{[`${t}`]:r}]));var a5=rm;ps.default=a5;var Kc={};Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.default=s5;function s5(e){return typeof e=="function"?e({}):e}var hs={},gs={},l5={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};Object.defineProperty(gs,"__esModule",{value:!0}),gs.parseColor=h5,gs.formatColor=g5;var nm=c5(l5);function c5(e){return e&&e.__esModule?e:{default:e}}let u5=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,f5=/^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,vs="(?:\\d+|\\d*\\.\\d+)%?",om="(?:\\s*,\\s*|\\s+)",d5="\\s*[,/]\\s*",p5=new RegExp(`^(rgb|hsl)a?\\(\\s*(${vs})${om}(${vs})${om}(${vs})(?:${d5}(${vs}))?\\s*\\)$`);function h5(e){if(typeof e!="string")return null;if(e=e.trim(),e==="transparent")return{mode:"rgb",color:["0","0","0"],alpha:"0"};if(e in nm.default)return{mode:"rgb",color:nm.default[e].map(i=>i.toString())};let t=e.replace(f5,(i,a,s,l,u)=>["#",a,a,s,s,l,l,u?u+u:""].join("")).match(u5);if(t!==null)return{mode:"rgb",color:[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)].map(i=>i.toString()),alpha:t[4]?(parseInt(t[4],16)/255).toString():void 0};let r=e.match(p5);if(r!==null){var n,o;return{mode:r[1],color:[r[2],r[3],r[4]].map(i=>i.toString()),alpha:(n=r[5])===null||n===void 0||(o=n.toString)===null||o===void 0?void 0:o.call(n)}}return null}function g5({mode:e,color:t,alpha:r}){let n=r!==void 0;return`${e}(${t.join(" ")}${n?` / ${r}`:""})`}Object.defineProperty(hs,"__esModule",{value:!0}),hs.withAlphaValue=v5,hs.default=m5;var ms=gs;function v5(e,t,r){if(typeof e=="function")return e({opacityValue:t});let n=ms.parseColor(e);return n===null?r:ms.formatColor({...n,alpha:t})}function m5({color:e,property:t,variable:r}){let n=[].concat(t);if(typeof e=="function")return{[r]:"1",...Object.fromEntries(n.map(i=>[i,e({opacityVariable:r,opacityValue:`var(${r})`})]))};const o=ms.parseColor(e);return o===null?Object.fromEntries(n.map(i=>[i,e])):o.alpha!==void 0?Object.fromEntries(n.map(i=>[i,e])):{[r]:"1",...Object.fromEntries(n.map(i=>[i,ms.formatColor({...o,alpha:`var(${r})`})]))}}const im=ps.default,yn=Kc.default,$o=hs.default;var b5=function({corePlugins:e,matchUtilities:t,theme:r}){t({"border-lb":n=>e("borderOpacity")?$o({color:n,property:["border-block-start-color","border-block-end-color"],variable:"--tw-border-opacity"}):{"border-block-start-color":yn(n),"border-block-end-color":yn(n)},"border-li":n=>e("borderOpacity")?$o({color:n,property:["border-inline-start-color","border-inline-end-color"],variable:"--tw-border-opacity"}):{"border-inline-start-color":yn(n),"border-inline-end-color":yn(n)}},{values:(({DEFAULT:n,...o})=>o)(im(r("borderColor"))),type:"color"}),t({"border-bs":n=>e("borderOpacity")?$o({color:n,property:"border-block-start-color",variable:"--tw-border-opacity"}):{"border-block-start-color":yn(n)},"border-be":n=>e("borderOpacity")?$o({color:n,property:"border-block-end-color",variable:"--tw-border-opacity"}):{"border-block-end-color":yn(n)},"border-is":n=>e("borderOpacity")?$o({color:n,property:"border-inline-start-color",variable:"--tw-border-opacity"}):{"border-inline-start-color":yn(n)},"border-ie":n=>e("borderOpacity")?$o({color:n,property:"border-inline-end-color",variable:"--tw-border-opacity"}):{"border-inline-end-color":yn(n)}},{values:(({DEFAULT:n,...o})=>o)(im(r("borderColor"))),type:"color"})},y5=function({matchUtilities:e,theme:t}){e({"rounded-bs":r=>({borderStartStartRadius:r,borderStartEndRadius:r}),"rounded-be":r=>({borderEndStartRadius:r,borderEndEndRadius:r}),"rounded-is":r=>({borderStartStartRadius:r,borderEndStartRadius:r}),"rounded-ie":r=>({borderStartEndRadius:r,borderEndEndRadius:r})},{values:t("borderRadius")}),e({"rounded-ss":r=>({borderStartStartRadius:r}),"rounded-se":r=>({borderStartEndRadius:r}),"rounded-es":r=>({borderEndStartRadius:r}),"rounded-ee":r=>({borderEndEndRadius:r})},{values:t("borderRadius")})},w5=function({matchUtilities:e,theme:t}){e({"border-lb":r=>({borderBlockStartWidth:r,borderBlockEndWidth:r}),"border-li":r=>({borderInlineStartWidth:r,borderInlineEndWidth:r})},{values:t("borderWidth")}),e({"border-bs":r=>({borderBlockStartWidth:r}),"border-be":r=>({borderBlockEndWidth:r}),"border-is":r=>({borderInlineStartWidth:r}),"border-ie":r=>({borderInlineEndWidth:r})},{values:t("borderWidth")})},_5=function({addUtilities:e}){e({".clear-start":{clear:"inline-start"},".clear-end":{clear:"inline-end"}})},E5=function({addUtilities:e,matchUtilities:t,theme:r}){t({"divide-b":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-divide-b-reverse":"0","border-block-start-width":`calc(${n} * calc(1 - var(--tw-divide-b-reverse)))`,"border-block-end-width":`calc(${n} * var(--tw-divide-b-reverse))`}}),"divide-i":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-divide-i-reverse":"0","border-inline-start-width":`calc(${n} * calc(1 - var(--tw-divide-i-reverse)))`,"border-inline-end-width":`calc(${n} * var(--tw-divide-i-reverse))`}})},{values:r("divideWidth")}),e({".divide-b-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-divide-b-reverse":"1"},".divide-i-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-divide-i-reverse":"1"}})},x5=function({addUtilities:e}){e({".float-start":{float:"inline-start"},".float-end":{float:"inline-end"}})},S5=function({matchUtilities:e,theme:t}){e({is:r=>({inlineSize:r})},{values:t("width")})},$5=function({matchUtilities:e,theme:t}){e({"inset-block":r=>({insetBlock:r}),"inset-inline":r=>({insetInline:r})},{supportsNegativeValues:!0,values:t("inset")}),e({"block-start":r=>({insetBlockStart:r}),"block-end":r=>({insetBlockEnd:r}),"inline-start":r=>({insetInlineStart:r}),"inline-end":r=>({insetInlineEnd:r})},{supportsNegativeValues:!0,values:t("inset")})},C5=function({matchUtilities:e,theme:t}){e({mlb:r=>({marginBlock:r}),mli:r=>({marginInline:r})},{supportsNegativeValues:!0,values:t("margin")}),e({mbs:r=>({marginBlockStart:r}),mbe:r=>({marginBlockEnd:r}),mis:r=>({marginInlineStart:r}),mie:r=>({marginInlineEnd:r})},{supportsNegativeValues:!0,values:t("margin")})},A5=function({matchUtilities:e,theme:t}){e({"max-bs":r=>({maxBlockSize:r})},{values:t("maxHeight")})},O5=function({matchUtilities:e,theme:t}){e({"max-is":r=>({maxInlineSize:r})},{values:t("maxWidth")})},T5=function({matchUtilities:e,theme:t}){e({"min-bs":r=>({minBlockSize:r})},{values:t("minHeight")})},I5=function({matchUtilities:e,theme:t}){e({"min-is":r=>({minInlineSize:r})},{values:t("minWidth")})},P5=function({addUtilities:e}){e({".overscroll-b-auto":{overscrollBehaviorBlock:"auto"},".overscroll-b-contain":{overscrollBehaviorBlock:"contain"},".overscroll-b-none":{overscrollBehaviorBlock:"none"},".overscroll-i-auto":{overscrollBehaviorInline:"auto"},".overscroll-i-contain":{overscrollBehaviorInline:"contain"},".overscroll-i-none":{overscrollBehaviorInline:"none"}})},k5=function({matchUtilities:e,theme:t}){e({plb:r=>({paddingBlock:r}),pli:r=>({paddingInline:r})},{values:t("padding")}),e({pbs:r=>({paddingBlockStart:r}),pbe:r=>({paddingBlockEnd:r}),pis:r=>({paddingInlineStart:r}),pie:r=>({paddingInlineEnd:r})},{values:t("padding")})},N5=function({addUtilities:e}){e({".resize-block":{resize:"block"},".resize-inline":{resize:"inline"}})},D5=function({addUtilities:e,matchUtilities:t,theme:r}){t({"space-b":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-space-b-reverse":"0","margin-block-start":`calc(${n} * calc(1 - var(--tw-space-b-reverse)))`,"margin-block-end":`calc(${n} * var(--tw-space-b-reverse))`}}),"space-i":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-space-i-reverse":"0","margin-inline-start":`calc(${n} * calc(1 - var(--tw-space-i-reverse)))`,"margin-inline-end":`calc(${n} * var(--tw-space-i-reverse))`}})},{supportsNegativeValues:!0,values:r("space")}),e({".space-b-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-space-b-reverse":"1"},".space-i-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-space-i-reverse":"1"}})},L5=function({addUtilities:e}){e({".text-start":{textAlign:"start"},".text-end":{textAlign:"end"}})};const M5=o5,F5=i5,j5=b5,B5=y5,R5=w5,U5=_5,W5=E5,V5=x5,H5=S5,z5=$5,G5=C5,K5=A5,q5=O5,Y5=T5,J5=I5,X5=P5,Z5=k5,Q5=N5,eI=D5,tI=L5;M5(function(e){V5(e),U5(e),tI(e),Q5(e),X5(e),F5(e),Y5(e),K5(e),H5(e),J5(e),q5(e),G5(e),Z5(e),eI(e),z5(e),W5(e),R5(e),j5(e),B5(e)});var rI=Ye&&Ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const nI=rI(Gv),oI=["disabled","highlighted","placeholder"],am={align:["center","end","start"],state:["active","checked","closed","delayed-open","hidden","inactive","indeterminate","instant-open","off","on","open","unchecked","visible"],side:["bottom","left","right","top"],orientation:["horizontal","vertical"],motion:["from-end","from-start","to-end","to-start"],swipe:["cancel","end","move","start"],"swipe-direction":["down","left","right","up"]};nI.default.withOptions(e=>({addUtilities:t,addVariant:r,e:n})=>{e=e||{variantPrefix:"radix"};const o=e.variantPrefix===""||typeof e.variantPrefix=="boolean"&&e.variantPrefix===!1?"":`${e.variantPrefix}-`;["context-menu","dropdown-menu","hover-card","menubar","popover","select","tooltip"].forEach(u=>{t({[`.origin-${o}${u}`]:{"transform-origin":`var(--radix-${u}-content-transform-origin)`}})}),oI.forEach(u=>{let f=`${o}${u}`,d=`data-${u}`;r(`${f}`,({modifySelectors:p,separator:h})=>{p(({className:g})=>`.${n(`${f}${h}${g}`)}[${d}]`)}),r(`group-${f}`,({modifySelectors:p,separator:h})=>{p(({className:g})=>`.group[${d}] .${n(`group-${f}${h}${g}`)}`)}),r(`peer-${f}`,({modifySelectors:p,separator:h})=>{p(({className:g})=>`.peer[${d}] ~ .${n(`peer-${f}${h}${g}`)}`)})}),Object.keys(am).forEach(u=>{am[u].forEach(f=>{let d=`${o}${u}-${f}`,p=`data-${u}="${f}"`;r(`${d}`,({modifySelectors:h,separator:g})=>{h(({className:v})=>`.${n(`${d}${g}${v}`)}[${p}]`)}),r(`group-${d}`,({modifySelectors:h,separator:g})=>{h(({className:v})=>`.group[${p}] .${n(`group-${d}${g}${v}`)}`)}),r(`peer-${d}`,({modifySelectors:h,separator:g})=>{h(({className:v})=>`.peer[${p}] ~ .${n(`peer-${d}${g}${v}`)}`)})})}),["accordion-content","collapsible-content","navigation-menu-viewport"].forEach(u=>{t({[`.w-${o}${u}`]:{width:`var(--radix-${u}-width)`}}),t({[`.h-${o}${u}`]:{height:`var(--radix-${u}-height)`}})}),["context-menu","dropdown-menu","hover-card","menubar","popover","select","tooltip"].forEach(u=>{t({[`.w-${o}${u}-content-available-width`]:{width:`var(--radix-${u}-content-available-width)`}}),t({[`.max-w-${o}${u}-content-available-width`]:{maxWidth:`var(--radix-${u}-content-available-width)`}}),t({[`.h-${o}${u}-content-available-height`]:{height:`var(--radix-${u}-content-available-height)`}}),t({[`.max-h-${o}${u}-content-available-height`]:{maxHeight:`var(--radix-${u}-content-available-height)`}}),t({[`.w-${o}${u}-trigger-width`]:{width:`var(--radix-${u}-trigger-width)`}}),t({[`.h-${o}${u}-trigger-height`]:{height:`var(--radix-${u}-trigger-height)`}})}),["toast-swipe-end","toast-swipe-move"].forEach(u=>{t({[`.translate-x-${o}${u}-x`]:{transform:`translateX(var(--radix-${u}-x))`}}),t({[`.translate-y-${o}${u}-y`]:{transform:`translateY(var(--radix-${u}-y))`}})})});function iI(){for(var e=0,t,r,n="";e<arguments.length;)(t=arguments[e++])&&(r=sm(t))&&(n&&(n+=" "),n+=r);return n}function sm(e){if(typeof e=="string")return e;for(var t,r="",n=0;n<e.length;n++)e[n]&&(t=sm(e[n]))&&(r&&(r+=" "),r+=t);return r}var qc="-";function aI(e){var t=lI(e),r=e.conflictingClassGroups,n=e.conflictingClassGroupModifiers,o=n===void 0?{}:n;function i(s){var l=s.split(qc);return l[0]===""&&l.length!==1&&l.shift(),lm(l,t)||sI(s)}function a(s,l){var u=r[s]||[];return l&&o[s]?[].concat(u,o[s]):u}return{getClassGroupId:i,getConflictingClassGroupIds:a}}function lm(e,t){if(e.length===0)return t.classGroupId;var r=e[0],n=t.nextPart.get(r),o=n?lm(e.slice(1),n):void 0;if(o)return o;if(t.validators.length!==0){var i=e.join(qc);return t.validators.find(function(a){var s=a.validator;return s(i)})?.classGroupId}}var cm=/^\[(.+)\]$/;function sI(e){if(cm.test(e)){var t=cm.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function lI(e){var t=e.theme,r=e.prefix,n={nextPart:new Map,validators:[]},o=uI(Object.entries(e.classGroups),r);return o.forEach(function(i){var a=i[0],s=i[1];Yc(s,n,a,t)}),n}function Yc(e,t,r,n){e.forEach(function(o){if(typeof o=="string"){var i=o===""?t:um(t,o);i.classGroupId=r;return}if(typeof o=="function"){if(cI(o)){Yc(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(function(a){var s=a[0],l=a[1];Yc(l,um(t,s),r,n)})})}function um(e,t){var r=e;return t.split(qc).forEach(function(n){r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function cI(e){return e.isThemeGetter}function uI(e,t){return t?e.map(function(r){var n=r[0],o=r[1],i=o.map(function(a){return typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(function(s){var l=s[0],u=s[1];return[t+l,u]})):a});return[n,i]}):e}function fI(e){if(e<1)return{get:function(){},set:function(){}};var t=0,r=new Map,n=new Map;function o(i,a){r.set(i,a),t++,t>e&&(t=0,n=r,r=new Map)}return{get:function(a){var s=r.get(a);if(s!==void 0)return s;if((s=n.get(a))!==void 0)return o(a,s),s},set:function(a,s){r.has(a)?r.set(a,s):o(a,s)}}}var fm="!";function dI(e){var t=e.separator||":",r=t.length===1,n=t[0],o=t.length;return function(a){for(var s=[],l=0,u=0,f,d=0;d<a.length;d++){var p=a[d];if(l===0){if(p===n&&(r||a.slice(d,d+o)===t)){s.push(a.slice(u,d)),u=d+o;continue}if(p==="/"){f=d;continue}}p==="["?l++:p==="]"&&l--}var h=s.length===0?a:a.substring(u),g=h.startsWith(fm),v=g?h.substring(1):h,y=f&&f>u?f-u:void 0;return{modifiers:s,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:y}}}function pI(e){if(e.length<=1)return e;var t=[],r=[];return e.forEach(function(n){var o=n[0]==="[";o?(t.push.apply(t,r.sort().concat([n])),r=[]):r.push(n)}),t.push.apply(t,r.sort()),t}function hI(e){return{cache:fI(e.cacheSize),splitModifiers:dI(e),...aI(e)}}var gI=/\s+/;function vI(e,t){var r=t.splitModifiers,n=t.getClassGroupId,o=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(gI).map(function(a){var s=r(a),l=s.modifiers,u=s.hasImportantModifier,f=s.baseClassName,d=s.maybePostfixModifierPosition,p=n(d?f.substring(0,d):f),h=!!d;if(!p){if(!d)return{isTailwindClass:!1,originalClassName:a};if(p=n(f),!p)return{isTailwindClass:!1,originalClassName:a};h=!1}var g=pI(l).join(":"),v=u?g+fm:g;return{isTailwindClass:!0,modifierId:v,classGroupId:p,originalClassName:a,hasPostfixModifier:h}}).reverse().filter(function(a){if(!a.isTailwindClass)return!0;var s=a.modifierId,l=a.classGroupId,u=a.hasPostfixModifier,f=s+l;return i.has(f)?!1:(i.add(f),o(l,u).forEach(function(d){return i.add(s+d)}),!0)}).reverse().map(function(a){return a.originalClassName}).join(" ")}function dm(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,o,i,a=s;function s(u){var f=t[0],d=t.slice(1),p=d.reduce(function(h,g){return g(h)},f());return n=hI(p),o=n.cache.get,i=n.cache.set,a=l,l(u)}function l(u){var f=o(u);if(f)return f;var d=vI(u,n);return i(u,d),d}return function(){return a(iI.apply(null,arguments))}}function gt(e){var t=function(n){return n[e]||[]};return t.isThemeGetter=!0,t}var pm=/^\[(?:([a-z-]+):)?(.+)\]$/i,mI=/^\d+\/\d+$/,bI=new Set(["px","full","screen"]),yI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wI=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,_I=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function Xt(e){return Wn(e)||bI.has(e)||mI.test(e)||bs(e)}function bs(e){return Vn(e,"length",AI)}function EI(e){return Vn(e,"size",hm)}function xI(e){return Vn(e,"position",hm)}function SI(e){return Vn(e,"url",OI)}function Ti(e){return Vn(e,"number",Wn)}function Wn(e){return!Number.isNaN(Number(e))}function $I(e){return e.endsWith("%")&&Wn(e.slice(0,-1))}function Ii(e){return gm(e)||Vn(e,"number",gm)}function Ve(e){return pm.test(e)}function Co(){return!0}function wn(e){return yI.test(e)}function CI(e){return Vn(e,"",TI)}function Vn(e,t,r){var n=pm.exec(e);return n?n[1]?n[1]===t:r(n[2]):!1}function AI(e){return wI.test(e)}function hm(){return!1}function OI(e){return e.startsWith("url(")}function gm(e){return Number.isInteger(Number(e))}function TI(e){return _I.test(e)}function vm(){var e=gt("colors"),t=gt("spacing"),r=gt("blur"),n=gt("brightness"),o=gt("borderColor"),i=gt("borderRadius"),a=gt("borderSpacing"),s=gt("borderWidth"),l=gt("contrast"),u=gt("grayscale"),f=gt("hueRotate"),d=gt("invert"),p=gt("gap"),h=gt("gradientColorStops"),g=gt("gradientColorStopPositions"),v=gt("inset"),y=gt("margin"),m=gt("opacity"),w=gt("padding"),E=gt("saturate"),x=gt("scale"),P=gt("sepia"),I=gt("skew"),S=gt("space"),O=gt("translate"),k=function(){return["auto","contain","none"]},j=function(){return["auto","hidden","clip","visible","scroll"]},D=function(){return["auto",Ve,t]},N=function(){return[Ve,t]},J=function(){return["",Xt]},K=function(){return["auto",Wn,Ve]},Y=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},te=function(){return["solid","dashed","dotted","double","none"]},oe=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},le=function(){return["start","end","center","between","around","evenly","stretch"]},ae=function(){return["","0",Ve]},ge=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},ce=function(){return[Wn,Ti]},q=function(){return[Wn,Ve]};return{cacheSize:500,theme:{colors:[Co],spacing:[Xt],blur:["none","",wn,Ve],brightness:ce(),borderColor:[e],borderRadius:["none","","full",wn,Ve],borderSpacing:N(),borderWidth:J(),contrast:ce(),grayscale:ae(),hueRotate:q(),invert:ae(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[$I,bs],inset:D(),margin:D(),opacity:ce(),padding:N(),saturate:ce(),scale:ce(),sepia:ae(),skew:q(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",Ve]}],container:["container"],columns:[{columns:[wn]}],"break-after":[{"break-after":ge()}],"break-before":[{"break-before":ge()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(Y(),[Ve])}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ii]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ve]}],grow:[{grow:ae()}],shrink:[{shrink:ae()}],order:[{order:["first","last","none",Ii]}],"grid-cols":[{"grid-cols":[Co]}],"col-start-end":[{col:["auto",{span:["full",Ii]},Ve]}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":[Co]}],"row-start-end":[{row:["auto",{span:[Ii]},Ve]}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ve]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal"].concat(le())}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat(le(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(le(),["baseline"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",Ve,t]}],"min-w":[{"min-w":["min","max","fit",Ve,Xt]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[wn]},wn,Ve]}],h:[{h:[Ve,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Ve,Xt]}],"max-h":[{"max-h":[Ve,t,"min","max","fit"]}],"font-size":[{text:["base",wn,bs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ti]}],"font-family":[{font:[Co]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ve]}],"line-clamp":[{"line-clamp":["none",Wn,Ti]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ve,Xt]}],"list-image":[{"list-image":["none",Ve]}],"list-style-type":[{list:["none","disc","decimal",Ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(te(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",Xt]}],"underline-offset":[{"underline-offset":["auto",Ve,Xt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(Y(),[xI])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",EI]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},SI]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[].concat(te(),["hidden"])}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:te()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:[""].concat(te())}],"outline-offset":[{"outline-offset":[Ve,Xt]}],"outline-w":[{outline:[Xt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[Xt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",wn,CI]}],"shadow-color":[{shadow:[Co]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":oe()}],"bg-blend":[{"bg-blend":oe()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",wn,Ve]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[E]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ve]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",Ve]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Ii,Ve]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ve]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ve]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ve]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Xt,Ti]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}function mm(e,t){for(var r in t)bm(e,r,t[r]);return e}var II=Object.prototype.hasOwnProperty,PI=new Set(["string","number","boolean"]);function bm(e,t,r){if(!II.call(e,t)||PI.has(typeof r)||r===null){e[t]=r;return}if(Array.isArray(r)&&Array.isArray(e[t])){e[t]=e[t].concat(r);return}if(typeof r=="object"&&typeof e[t]=="object"){if(e[t]===null){e[t]=r;return}for(var n in r)bm(e[t],n,r[n])}}function kI(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return typeof e=="function"?dm.apply(void 0,[vm,e].concat(r)):dm.apply(void 0,[function(){return mm(vm(),e)}].concat(r))}var NI="Expected a function",ym="__lodash_hash_undefined__",wm=1/0,DI="[object Function]",LI="[object GeneratorFunction]",MI="[object Symbol]",FI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jI=/^\w*$/,BI=/^\./,RI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,UI=/[\\^$.*+?()[\]{}|]/g,WI=/\\(\\)?/g,VI=/^\[object .+?Constructor\]$/,HI=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,zI=typeof self=="object"&&self&&self.Object===Object&&self,Jc=HI||zI||Function("return this")();function GI(e,t){return e?.[t]}function KI(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var qI=Array.prototype,YI=Function.prototype,_m=Object.prototype,Xc=Jc["__core-js_shared__"],Em=function(){var e=/[^.]+$/.exec(Xc&&Xc.keys&&Xc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),xm=YI.toString,Zc=_m.hasOwnProperty,Sm=_m.toString,JI=RegExp("^"+xm.call(Zc).replace(UI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$m=Jc.Symbol,XI=qI.splice,ZI=Om(Jc,"Map"),Pi=Om(Object,"create"),Cm=$m?$m.prototype:void 0,Am=Cm?Cm.toString:void 0;function Hn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function QI(){this.__data__=Pi?Pi(null):{}}function e6(e){return this.has(e)&&delete this.__data__[e]}function t6(e){var t=this.__data__;if(Pi){var r=t[e];return r===ym?void 0:r}return Zc.call(t,e)?t[e]:void 0}function r6(e){var t=this.__data__;return Pi?t[e]!==void 0:Zc.call(t,e)}function n6(e,t){var r=this.__data__;return r[e]=Pi&&t===void 0?ym:t,this}Hn.prototype.clear=QI,Hn.prototype.delete=e6,Hn.prototype.get=t6,Hn.prototype.has=r6,Hn.prototype.set=n6;function Ao(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function o6(){this.__data__=[]}function i6(e){var t=this.__data__,r=ys(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():XI.call(t,r,1),!0}function a6(e){var t=this.__data__,r=ys(t,e);return r<0?void 0:t[r][1]}function s6(e){return ys(this.__data__,e)>-1}function l6(e,t){var r=this.__data__,n=ys(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}Ao.prototype.clear=o6,Ao.prototype.delete=i6,Ao.prototype.get=a6,Ao.prototype.has=s6,Ao.prototype.set=l6;function zn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function c6(){this.__data__={hash:new Hn,map:new(ZI||Ao),string:new Hn}}function u6(e){return ws(this,e).delete(e)}function f6(e){return ws(this,e).get(e)}function d6(e){return ws(this,e).has(e)}function p6(e,t){return ws(this,e).set(e,t),this}zn.prototype.clear=c6,zn.prototype.delete=u6,zn.prototype.get=f6,zn.prototype.has=d6,zn.prototype.set=p6;function ys(e,t){for(var r=e.length;r--;)if(S6(e[r][0],t))return r;return-1}function h6(e,t){t=b6(t,e)?[t]:m6(t);for(var r=0,n=t.length;e!=null&&r<n;)e=e[E6(t[r++])];return r&&r==n?e:void 0}function g6(e){if(!Im(e)||w6(e))return!1;var t=$6(e)||KI(e)?JI:VI;return t.test(x6(e))}function v6(e){if(typeof e=="string")return e;if(eu(e))return Am?Am.call(e):"";var t=e+"";return t=="0"&&1/e==-wm?"-0":t}function m6(e){return Tm(e)?e:_6(e)}function ws(e,t){var r=e.__data__;return y6(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Om(e,t){var r=GI(e,t);return g6(r)?r:void 0}function b6(e,t){if(Tm(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||eu(e)?!0:jI.test(e)||!FI.test(e)||t!=null&&e in Object(t)}function y6(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function w6(e){return!!Em&&Em in e}var _6=Qc(function(e){e=A6(e);var t=[];return BI.test(e)&&t.push(""),e.replace(RI,function(r,n,o,i){t.push(o?i.replace(WI,"$1"):n||r)}),t});function E6(e){if(typeof e=="string"||eu(e))return e;var t=e+"";return t=="0"&&1/e==-wm?"-0":t}function x6(e){if(e!=null){try{return xm.call(e)}catch{}try{return e+""}catch{}}return""}function Qc(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(NI);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(Qc.Cache||zn),r}Qc.Cache=zn;function S6(e,t){return e===t||e!==e&&t!==t}var Tm=Array.isArray;function $6(e){var t=Im(e)?Sm.call(e):"";return t==DI||t==LI}function Im(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function C6(e){return!!e&&typeof e=="object"}function eu(e){return typeof e=="symbol"||C6(e)&&Sm.call(e)==MI}function A6(e){return e==null?"":v6(e)}function O6(e,t,r){var n=e==null?void 0:h6(e,t);return n===void 0?r:n}var T6=O6;const I6=In(T6);var P6=[50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950],k6=[12,25,37,50,75,100,125,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,925,950,975],sr=Math.PI/180,Pm={red:{keyColor:"#ee003b",darkCp:1,lightCp:.13,hueTorsion:5.5*sr},orange:{keyColor:"#fa6b32",darkCp:.725,lightCp:1,hueTorsion:13*sr},amber:{keyColor:"#f08c00",darkCp:1,lightCp:1,hueTorsion:24*sr},yellow:{keyColor:"#ffd900",darkCp:1,lightCp:1,hueTorsion:32*sr},lime:{keyColor:"#99c400",darkCp:1,lightCp:1,hueTorsion:-3.5*sr},green:{keyColor:"#30a908",darkCp:.35,lightCp:.665,hueTorsion:-10.5*sr},emerald:{keyColor:"#15e066",darkCp:1,lightCp:.735,hueTorsion:-7*sr},teal:{keyColor:"#00a270",darkCp:1,lightCp:.755,hueTorsion:-12*sr},cyan:{keyColor:"#048992",darkCp:1,lightCp:.855,hueTorsion:-15*sr},sky:{keyColor:"#007bc2",darkCp:1,lightCp:.64,hueTorsion:0},blue:{keyColor:"#0058cb",darkCp:1,lightCp:.495,hueTorsion:-7*sr},indigo:{keyColor:"#1b45c5",darkCp:.495,lightCp:.55,hueTorsion:0},violet:{keyColor:"#080886",darkCp:.195,lightCp:.635,hueTorsion:-5*sr},purple:{keyColor:"#2c0073",darkCp:0,lightCp:.63,hueTorsion:0},fuchsia:{keyColor:"#6d0085",darkCp:1,lightCp:.695,hueTorsion:0},pink:{keyColor:"#a5006d",darkCp:1,lightCp:.775,hueTorsion:0},rose:{keyColor:"#d00054",darkCp:1,lightCp:1,hueTorsion:0},neutral:{keyColor:"#707076",darkCp:.8,lightCp:.88,hueTorsion:0},primary:{keyColor:"#1662d9",darkCp:.86,lightCp:1,hueTorsion:-30*sr}};Object.keys(Pm).reduce((e,t)=>{const r=t==="neutral"||t==="primary",n=Pm[t],o=RT({...n,keyColor:jT(n.keyColor)}),i=LT(o,21,[0,100*(22/21)],1,24).reverse(),a=s=>{if(s>999)return"#000000";if(s<1)return"#ffffff";if(s%50===0)return Vv(i[s/50]);{const l=s%50/50,u=1-l,[f,d,p]=i[Math.floor(s/50)],[h,g,v]=i[Math.ceil(s/50)];return Vv([f*u+h*l,d*u+g*l,p*u+v*l])}};return e[t]=(r?k6:P6).reduce((s,l)=>(s[l]=a(l),s),{}),e},{});var tu="fill-[--surface-bg] dark:fill-[--surface-bg]",N6="fill-[--surface-bg] dark:fill-[--surface-bg]",_s="min-bs-[2.5rem]",D6="pli-3",L6="pli-4",M6=`${_s} ${D6}`,F6=`${_s} ${L6}`,Es="min-bs-[2.5rem] pointer-fine:min-bs-[2rem]",j6="pli-2",B6="pli-2.5",R6=`${Es} ${j6}`,U6=`${Es} ${B6}`,km=(e="coarse")=>e==="fine"?Es:_s,xs="opacity-40 cursor-not-allowed shadow-none",W6="data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed",ru=({elevation:e})=>[e==="group"?"shadow-sm":e==="chrome"?"shadow-none":"shadow"],Oo=({elevation:e})=>[e==="group"?"shadow":e==="chrome"?"shadow-lg":"shadow-none"],jr="focus:outline-none focus-visible:z-[1] focus-visible:hover:outline-none dark:focus-visible:hover:outline-none focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-primary-350 focus-visible:ring-offset-white dark:focus-visible:ring-primary-450 dark:focus-visible:ring-offset-black",Nm="focus:outline-none focus-visible:outline-none focus:ring-0 ring-0 focus:border-0 border-0",V6="ring-2 ring-offset-0 ring-primary-350 ring-offset-white dark:ring-primary-450 dark:ring-offset-black",H6="transition-colors duration-100 linear hover:text-black dark:hover:text-white hover:bg-neutral-25 dark:hover:bg-neutral-750",Dm="hover:bg-neutral-100/50 dark:hover:bg-neutral-800/50",z6="fixed inset-0 z-0 overflow-auto overscroll-auto scroll-smooth",Lm="will-change-[opacity,transform] data-[side=top]:animate-slideDownAndFade data-[side=right]:animate-slideLeftAndFade data-[side=bottom]:animate-slideUpAndFade data-[side=left]:animate-slideRightAndFade",G6="will-change-[opacity,transform] animate-slideUpAndFade",K6="border-neutral-200 dark:border-neutral-800",q6="self-stretch border-ie",Mm="self-stretch border-be",Y6="data-[highlighted]:bg-primary-100 dark:data-[highlighted]:bg-primary-850 hover:data-[highlighted]:bg-primary-150 hover:dark:data-[highlighted]:bg-primary-800",J6="fixed-surface backdrop-blur-md dark:backdrop-blur-lg",X6="border-neutral-50 dark:border-neutral-800 divide-neutral-50 dark:divide-neutral-800",Z6="border-neutral-50 dark:border-neutral-800 divide-neutral-50 dark:divide-neutral-800",Gn="chrome-surface",Q6=e=>{const t=()=>[Xt],r=()=>["auto",Xt],n=()=>["",Xt],o=()=>[Co],i=()=>["none","","sm","md","lg","xl","2xl","3xl","full",bs];return mm(e,{classGroups:{float:[{float:["start","end"]}],clear:[{clear:["start","end"]}],resize:[{resize:["block ","inline"]}],"text-alignment":[{text:["start","end"]}],"logical.overscroll-b":[{"overscroll-b":["auto ","contain","auto"]}],"logical.overscroll-i":[{"overscroll-b":["auto ","contain","auto"]}],"logical.bs":[{bs:t()}],"logical.min-bs":[{"min-bs":t()}],"logical.max-bs":[{"max-bs":t()}],"logical.is":[{is:t()}],"logical.min-is":[{"min-is":t()}],"logical.max-is":[{"max-is":t()}],"logical.mlb":[{mlb:t()}],"logical.mli":[{mli:t()}],"logical.mbs":[{mbs:t()}],"logical.mbe":[{mbe:t()}],"logical.mis":[{mis:t()}],"logical.mie":[{mie:t()}],"logical.plb":[{plb:t()}],"logical.pli":[{pli:t()}],"logical.pbs":[{pbs:t()}],"logical.pbe":[{pbe:t()}],"logical.pis":[{pis:t()}],"logical.pie":[{pie:t()}],"logical.space-b":[{"space-b":t()}],"logical.space-i":[{"space-i":t()}],"logical.inset-block":[{"inset-block":r()}],"logical.inset-inline":[{"inset-inline":r()}],"logical.block-start":[{"block-start":r()}],"logical.block-end":[{"block-end":r()}],"logical.inline-start":[{"inline-start":r()}],"logical.inline-end":[{"inline-end":r()}],"logical.border-bs":[{"border-bs":n()}],"logical.border-be":[{"border-be":n()}],"logical.border-is":[{"border-is":n()}],"logical.border-ie":[{"border-ie":n()}],"logical.border-color-bs":[{"border-bs":o()}],"logical.border-color-be":[{"border-be":o()}],"logical.border-color-is":[{"border-is":o()}],"logical.border-color-ie":[{"border-ie":o()}],"logical.rounded-bs":[{"rounded-bs":i()}],"logical.rounded-be":[{"rounded-be":i()}],"logical.rounded-is":[{"rounded-is":i()}],"logical.rounded-ie":[{"rounded-ie":i()}],"logical.rounded-ss":[{"rounded-ss":i()}],"logical.rounded-se":[{"rounded-se":i()}],"logical.rounded-es":[{"rounded-es":i()}],"logical.rounded-ee":[{"rounded-ee":i()}],"logical.divide-b":[{"divide-b":n()}],"logical.divide-i":[{"divide-i":n()}]},conflictingClassGroups:{"inset-block":["logical.block-start","logical.block-end"],"inset-inline":["logical.inline-start","logical.inline-end"],p:["logical.plb","logical.pli","logical.pbs","logical.pbe","logical.pis","logical.pie"],pli:["logical.pis","logical.pie"],plb:["logical.pbs","logical.pbe"],m:["logical.mlb","logical.mli","logical.mbs","logical.mbe","logical.mis","logical.mie"],mli:["logical.mis","logical.mie"],mlb:["logical.mbs","logical.mbe"],overscroll:["overscroll-i","overscroll-b"],rounded:["logical.rounded-bs","logical.rounded-be","logical.rounded-is","logical.rounded-ie","logical.rounded-ss","logical.rounded-se","logical.rounded-es","logical.rounded-ee"],"logical.rounded-bs":["logical.rounded-ss","logical.rounded-se"],"logical.rounded-be":["logical.rounded-es","logical.rounded-ee"],"logical.rounded-is":["logical.rounded-ss","logical.rounded-es"],"logical.rounded-ie":["logical.rounded-ee","logical.rounded-se"],"border-color":["logical.border-color-bs","logical.border-color-be","logical.border-color-is","logical.border-color-ie"],border:["logical.border-bs","logical.border-be","logical.border-is","logical.border-ie"]}})},ue=kI({classGroups:{fontFamily:["font-body","font-mono"],fontWeight:["font-thin","font-extralight","font-light","font-normal","font-medium","font-semibold","font-bold","font-extrabold","font-black",Ti]}},Q6),nu=new Map([[0,"is-0"],["px","is-px"],[.5,"is-0.5"],[1,"is-1"],[1.5,"is-1.5"],[2,"is-2"],[2.5,"is-2.5"],[3,"is-3"],[3.5,"is-3.5"],[4,"is-4"],[5,"is-5"],[6,"is-6"],[7,"is-7"],[8,"is-8"],[9,"is-9"],[10,"is-10"],[11,"is-11"],[12,"is-12"],[14,"is-14"],[16,"is-16"],[20,"is-20"],[24,"is-24"],[28,"is-28"],[32,"is-32"],[36,"is-36"],[40,"is-40"],[44,"is-44"],[48,"is-48"],[52,"is-52"],[56,"is-56"],[60,"is-60"],[64,"is-64"],[72,"is-72"],[80,"is-80"],[96,"is-96"]]),Fm=new Map([[0,"bs-0"],["px","bs-px"],[.5,"bs-0.5"],[1,"bs-1"],[1.5,"bs-1.5"],[2,"bs-2"],[2.5,"bs-2.5"],[3,"bs-3"],[3.5,"bs-3.5"],[4,"bs-4"],[5,"bs-5"],[6,"bs-6"],[7,"bs-7"],[8,"bs-8"],[9,"bs-9"],[10,"bs-10"],[11,"bs-11"],[12,"bs-12"],[14,"bs-14"],[16,"bs-16"],[20,"bs-20"],[24,"bs-24"],[28,"bs-28"],[32,"bs-32"],[36,"bs-36"],[40,"bs-40"],[44,"bs-44"],[48,"bs-48"],[52,"bs-52"],[56,"bs-56"],[60,"bs-60"],[64,"bs-64"],[72,"bs-72"],[80,"bs-80"],[96,"bs-96"]]),ki=new Set(nu.keys()),ou=Fm.get.bind(Fm),jm=nu.get.bind(nu),We=e=>ue(ou(e),jm(e)),Bm=(e,t)=>{if(ki.has(e))return e;if(e<=0)return 0;if(e===1)return"px";{const r=Math.floor(e),n=Math.floor(e*2)/2,o=Math.floor(e/2)*2,i=Math.floor(e/4)*4;return ki.has(n)?n:ki.has(r)?r:ki.has(o)?o:ki.has(i)?i:t}},Rm=e=>e==="px"?1:e,iu="placeholder-neutral-500 dark:placeholder-neutral-400",At="text-xs font-normal text-neutral-650 dark:text-neutral-300",e3="text-xs font-normal text-white/90",t3="text-xs font-normal text-neutral-900 dark:text-neutral-50",r3="text-xs font-medium text-success-550 dark:text-success-300",n3="text-xs font-medium text-info-550 dark:text-info-300",o3="text-xs font-medium text-warning-550 dark:text-warning-300",i3="text-xs font-medium text-error-550 dark:text-error-300",a3=e=>{switch(e){case"success":return r3;case"info":return n3;case"warning":return o3;case"error":return i3;default:return}},s3="bg-neutral-25 dark:bg-neutral-850",l3="shadow-success-500/50 dark:shadow-success-500/50 text-success-600 dark:text-success-100 bg-success-50 dark:bg-success-900",c3="shadow-info-500/50 dark:shadow-info-500/50 text-info-600 dark:text-info-100 bg-info-50 dark:bg-info-900",u3="shadow-warning-500/50 dark:shadow-warning-500/50 text-warning-600 dark:text-warning-100 bg-warning-50 dark:bg-warning-900",f3="shadow-error-500/50 dark:shadow-error-500/50 text-error-600 dark:text-error-100 bg-error-50 dark:bg-error-900",d3=e=>{switch(e){case"success":return l3;case"info":return c3;case"warning":return u3;case"error":return f3;default:return s3}},p3=(e,...t)=>ue("overflow-anchored overflow-auto",...t),h3=(e,...t)=>ue("overflow-anchor is-px bs-px",...t),g3={root:p3,anchor:h3},v3=({size:e=10,inGroup:t},...r)=>ue("relative inline-flex shrink-0",We(e),t&&(e==="px"||e<=3?"-mie-1":"-mie-2"),...r),m3=({srOnly:e},...t)=>ue(e&&"sr-only",...t),b3=({srOnly:e},...t)=>ue(At,e&&"sr-only",...t),y3=({variant:e},...t)=>ue("is-full bs-full bg-[--surface-bg]",e==="circle"?"rounded-full":"rounded",...t),w3=({status:e,size:t=3},...r)=>ue("absolute block-end-0 inline-end-0",We(t),e==="inactive"?"text-warning-350 dark:text-warning-250":e==="active"?"text-success-350 dark:text-success-250":"text-neutral-350 dark:text-neutral-250",...r),_3=({status:e,variant:t,animation:r},...n)=>ue("absolute inset-0 border-2",t==="circle"?"rounded-full":"rounded",e==="current"?"border-primary-400 dark:border-primary-500":e==="active"?"border-success-400 dark:border-success-400":e==="error"?"border-error-400 dark:border-error-500":e==="warning"?"border-warning-400 dark:border-warning-500":e==="inactive"?"border-neutral-400 dark:border-neutral-500":"border-[color:var(--surface-bg)]",r==="pulse"?"animate-halo-pulse":"",...n),E3=(e,...t)=>ue("fill-white",...t),x3=(e,...t)=>ue("inline-flex items-center",...t),S3=({size:e,srOnly:t},...r)=>ue(t?"sr-only":"rounded-full truncate text-sm leading-none plb-1 pli-2 relative z-[1] flex items-center justify-center",e&&ou(e),...r),$3=({srOnly:e},...t)=>ue(e?"sr-only":At,...t),C3={root:v3,label:m3,description:b3,statusIcon:w3,frame:y3,ring:_3,fallbackText:E3,group:x3,groupLabel:S3,groupDescription:$3},A3=(e,...t)=>ue("shrink-0 flex items-center",...t),O3=(e,...t)=>ue("contents",...t),T3=(e,...t)=>ue("contents",...t),I3=(e,...t)=>ue(...t),P3=(e,...t)=>ue("opacity-50",...t),k3={root:A3,list:O3,listItem:T3,current:I3,separator:P3},N3="bg-primary-550 dark:bg-primary-550 text-white aria-pressed:bg-primary-500 dark:aria-pressed:bg-primary-500 aria-pressed:text-primary-100 data-[state=open]:bg-primary-500 dark:data-[state=open]:bg-primary-500 data-[state=open]:text-primary-100 aria-checked:bg-primary-500 dark:aria-checked:bg-primary-500 aria-checked:text-primary-100 hover:bg-primary-600 dark:hover:bg-primary-600 hover:text-white dark:hover:text-white",D3="text-neutral-800 dark:text-neutral-50 bg-white dark:bg-neutral-800",L3=D3+" text-neutral-800 dark:text-neutral-50 bg-white dark:bg-neutral-800 aria-pressed:text-primary-800 aria-pressed:bg-primary-100 dark:aria-pressed:text-primary-50 dark:aria-pressed:bg-primary-700 data-[state=open]:text-primary-800 data-[state=open]:bg-primary-100 dark:data-[state=open]:text-primary-50 dark:data-[state=open]:bg-primary-700 aria-checked:text-primary-800 aria-checked:bg-primary-100 dark:aria-checked:text-primary-50 dark:aria-checked:bg-primary-700",M3=Dm+" hover:text-inherit dark:hover:text-inherit aria-pressed:bg-neutral-450/5 dark:aria-pressed:bg-neutral-25/5 data-[state=open]:bg-neutral-450/5 dark:data-[state=open]:bg-neutral-25/5 aria-checked:bg-neutral-450/5 dark:aria-checked:bg-neutral-25/5",F3=(e,...t)=>{const r=e.variant??"default";return ue("font-medium text-sm shrink-0 inline-flex select-none items-center justify-center overflow-hidden","transition-color duration-100",e.density==="fine"?U6:F6,e.disabled&&xs,!e.inGroup&&"rounded-md",!e.textWrap&&"text-ellipsis whitespace-nowrap",!e.disabled&&!e.inGroup&&(r==="default"||r==="primary")&&ru({elevation:e.elevation}),!e.disabled&&H6,r!=="outline"&&" hover:border-transparent dark:hover:border-transparent",r==="default"&&L3,!e.disabled&&r==="ghost"&&M3,r==="primary"&&N3,r==="outline"&&"text-neutral-700 border border-neutral-600 dark:border-neutral-300 dark:text-neutral-150",!e.disabled&&jr,"group",...t)},j3=(e,...t)=>ue("inline-flex rounded-md [&>:first-child]:rounded-is-md [&>:last-child]:rounded-ie-md [&>button]:relative",ru({elevation:e.elevation}),...t),B3={root:F3,group:j3},R3="overflow-auto grid place-items-center p-2 md:p-4 lg:p-8",U3=(e,...t)=>ue("fixed z-20 inset-inline-0 block-start-0 bs-[100dvb]",R3,...t),W3=({inOverlayLayout:e,elevation:t="chrome"},...r)=>ue("flex flex-col",!e&&"fixed z-20 top-[50%] left-[50%] -translate-x-[50%] -translate-y-[50%]","is-[95vw] md:is-full max-is-[24rem] border rounded-lg p-4",G6,Oo({elevation:t}),Gn,Z6,jr,...r),V3=({srOnly:e},...t)=>ue("rounded shrink-0 text-xl font-medium text-neutral-900 dark:text-neutral-100",e&&"sr-only",...t),H3=({srOnly:e},...t)=>ue("mlb-2",At,e&&"sr-only",...t),z3={overlay:U3,content:W3,title:V3,description:H3},G3=(e,...t)=>ue("rounded-md p-1 max-bs-[--radix-dropdown-menu-content-available-height] overflow-y-auto",...t),K3=(e,...t)=>ue("is-48 rounded-md md:is-56 z-[30]",Lm,Gn,Oo({elevation:"group"}),...t),q3=(e,...t)=>ue("flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-2 text-sm","text-neutral-900 data-[highlighted]:bg-neutral-50 dark:text-neutral-100 dark:data-[highlighted]:bg-neutral-900",Nm,W6,...t),Y3=(e,...t)=>ue("mlb-1 mli-2 bs-px bg-neutral-200 dark:bg-neutral-700",...t),J3=(e,...t)=>ue(At,"select-none pli-2 plb-2",...t),X3=(e,...t)=>ue(tu,...t),Z3={content:K3,viewport:G3,item:q3,separator:Y3,groupLabel:J3,arrow:X3},Q3="",eP="shadow-success-500/50 dark:shadow-success-600/50",tP="shadow-info-500/50 dark:shadow-info-600/50",rP="shadow-warning-500/50 dark:shadow-warning-600/50",nP="shadow-error-500/50 dark:shadow-error-600/50",Um="transition-colors bg-[--input-bg] focus:bg-white dark:focus:bg-neutral-925 border-transparent focus:border-transparent",Wm="hover:bg-[--input-bg-hover] dark:hover:bg-[--input-bg-hover] focus:hover:bg-white dark:focus:hover:bg-neutral-925",Vm="shadow-inner transition-colors bg-neutral-150 dark:bg-neutral-700 aria-checked:bg-primary-550 dark:aria-checked:bg-primary-550 aria-[checked=mixed]:bg-primary-550 dark:aria-[checked=mixed]:bg-primary-550",Hm="hover:bg-neutral-200 dark:hover:bg-neutral-650 hover:aria-checked:bg-primary-600 dark:hover:aria-checked:bg-primary-600 hover:aria-[checked=mixed]:bg-primary-600 dark:hover:aria-[checked=mixed]:bg-primary-600",zm=e=>{switch(e){case"success":return eP;case"info":return tP;case"warning":return rP;case"error":return nP;default:return null}},oP=e=>["is-full bg-transparent text-current",e.density==="fine"?Es:_s,iu,Nm,e.disabled&&xs],iP=e=>["is-full text-base rounded text-[color:var(--surface-text)]",Um,iu,e.density==="fine"?R6:M6,e.disabled?xs:Wm],aP=e=>["is-full text-base rounded text-[color:var(--surface-text)]",Um,Wm,e.focused&&"bg-white dark:bg-neutral-925",iu,zm(e.validationValence),e.disabled&&xs,e.focused&&V6],sP=(e,...t)=>e.variant==="subdued"?ue(...oP(e),...t):e.variant==="static"?ue(...aP(e),...t):ue(...iP(e),!e.disabled&&jr,zm(e.validationValence)||Q3,...t),lP=({size:e=5,disabled:t},...r)=>ue(We(e),Vm,!t&&Hm,"shrink-0 flex items-center justify-center rounded text-white",jr,...r),cP=({size:e=5},...t)=>ue(We(Bm(Rm(e)*.7,4)),...t),uP=({size:e=5,disabled:t},...r)=>ue(ou(e),jm(Bm(Rm(e)*1.75,9)),Vm,!t&&Hm,"cursor-pointer shrink-0 rounded-full pli-1 relative",jr,...r),fP=({size:e=5},...t)=>ue(We(e==="px"?"px":e-2),"block bg-white rounded-full border-neutral-100 transition-transform duration-100 will-change-transform data-[state=checked]:translate-x-[100%]",...t),dP=(e,...t)=>ue("font-mono selection:bg-transparent mli-auto",e.disabled&&"cursor-not-allowed",...t),pP=(e,...t)=>ue("block text-sm font-medium text-neutral-900 dark:text-neutral-100",e.srOnly&&"sr-only",...t),hP=(e,...t)=>ue(At,e.srOnly&&"sr-only",...t),gP=(e,...t)=>ue("leading-none mlb-1",e.srOnly&&"sr-only",...t),vP=(e,...t)=>ue(At,e.srOnly?"sr-only":a3(e.validationValence),...t),mP={input:sP,inputWithSegments:dP,checkbox:lP,checkboxIndicator:cP,label:pP,description:hP,validation:vP,switch:uP,switchThumb:fP,descriptionAndValidation:gP},bP=(e,...t)=>ue("underline decoration-1 underline-offset-2 transition-color rounded-sm","text-primary-600 hover:text-primary-500 dark:text-primary-300 hover:dark:text-primary-200","visited:text-teal-600 visited:hover:text-teal-500 visited:dark:text-teal-300 visited:hover:dark:text-teal-200",jr,...t),yP={root:bP},wP=(e,...t)=>ue(...t),_P=({collapsible:e},...t)=>ue(!e&&"flex",...t),EP=({density:e},...t)=>ue(We(e==="fine"?8:10),"shrink-0 flex items-start justify-center",...t),xP=({density:e},...t)=>ue(km(e),...t),SP=(e,...t)=>ue(We(5),"mbs-2.5",...t),$P=({density:e},...t)=>ue("is-5 rounded flex justify-center items-center",km(e),Dm,jr,...t),CP=(e,...t)=>ue(We(5),...t),AP={root:wP,item:{root:_P,endcap:EP,heading:xP,dragHandleIcon:SP,openTrigger:$P,openTriggerIcon:CP}},To={start:{width:"sm:is-[270px]",sidebar:"sm:-inline-start-[270px]",content:"pis-[270px]"},end:{width:"sm:is-[360px]",sidebar:"sm:-inline-end-[360px]",content:"pie-[360px]"}},OP=({inlineStartSidebarOpen:e,inlineEndSidebarOpen:t,side:r},...n)=>ue("fixed block-start-0 block-end-0 is-[100vw] z-10 overscroll-contain overflow-x-hidden overflow-y-auto","transition-[inset-inline-start,inset-inline-end] duration-200 ease-in-out",X6,r==="inline-start"?To.start.width:To.end.width,r==="inline-start"?e?"inline-start-0":ue("-inline-start-[100vw]",To.start.sidebar):t?"inline-end-0":ue("-inline-end-[100vw]",To.end.sidebar),r==="inline-start"?"border-ie":"border-is",J6,...n),TP=({isLg:e,inlineStartSidebarOpen:t,inlineEndSidebarOpen:r,bounce:n},...o)=>ue("transition-[padding-inline-start,padding-inline-end] duration-200 ease-in-out",e&&t?To.start.content:"pis-0",e&&r?To.end.content:"pie-0",n&&z6,...o),IP=({isLg:e,inlineStartSidebarOpen:t,inlineEndSidebarOpen:r,side:n},...o)=>ue("fixed inset-0 z-[9] bg-transparent","transition-opacity duration-200 ease-in-out",!e&&(t||r)?"opacity-100":"opacity-0",!e&&(t||r)?"block":"hidden",...o),PP={content:TP,sidebar:OP,overlay:IP},kP=({valence:e,elevation:t},...r)=>ue("p-3 rounded-md max-is-full overflow-auto",ru({elevation:t}),d3(e),...r),NP=(e,...t)=>ue("text-base font-medium mb-2",...t),DP=(e,...t)=>ue(...t),LP={root:kP,title:NP,body:DP},MP=({constrainInline:e,constrainBlock:t},...r)=>ue("p-1 rounded-lg",e&&"max-is-[--radix-popover-content-available-width] overflow-x-auto",t&&"max-bs-[--radix-popover-content-available-height] overflow-y-auto",...r),FP=(e,...t)=>ue("z-[30] rounded-lg",Gn,Oo({elevation:"group"}),jr,...t),jP=(e,...t)=>ue(N6,...t),BP={content:FP,viewport:MP,arrow:jP},RP=(e,...t)=>ue("overflow-hidden",...t),UP=(e,...t)=>ue("is-full bs-full scroll-smooth","[&>div]:table-fixed [&>div]:w-full",...t),WP=(e,...t)=>ue("flex select-none touch-none p-0.5 ease-out","data-[orientation=vertical]:is-1.5 data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:bs-1.5",...t),VP=(e,...t)=>ue("bg-neutral-500/50 flex-1 rounded-lg relative","before:content-[''] before:absolute before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:w-full before:h-full before:min-w-[44px] before:min-h-[44px]",...t),HP=(e,...t)=>ue(...t),zP={root:RP,viewport:UP,scrollbar:WP,thumb:VP,corner:HP},GP=({elevation:e="chrome"},...t)=>ue("p-1 z-[50] rounded",Gn,Oo({elevation:e}),...t),KP=(e,...t)=>ue("relative flex items-center pis-6 pie-3 plb-1","text-base leading-none rounded-sm select-none outline-none",Y6,...t),qP=(e,...t)=>ue("absolute inline-start-0 is-6 inline-flex items-center justify-center",...t),YP=(e,...t)=>ue(tu,...t),JP=(e,...t)=>ue(Mm,...t),XP=(e,...t)=>ue(Gn,"flex items-center justify-center cursor-default bs-6 is-full",...t),ZP={content:GP,item:KP,itemIndicator:qP,arrow:YP,separator:JP,scrollButton:XP},QP=({orientation:e},...t)=>ue(e==="vertical"?q6:Mm,K6,...t),ek={root:QP},tk=(e,...t)=>ue("is-20 bs-1 inline-block relative bg-neutral-400/25 rounded-full",...t),rk=({indeterminate:e},...t)=>ue("absolute inline-start-0 inset-block-0 inline-block bg-neutral-400 rounded-full",e&&"animate-progress-indeterminate",...t),nk={root:tk,bar:rk},ok={neutral:"bg-neutral-200 text-neutral-800 dark:bg-neutral-700 dark:text-neutral-150",red:"bg-red-200 text-red-800 dark:bg-red-700 dark:text-red-150",orange:"bg-orange-200 text-orange-800 dark:bg-orange-700 dark:text-orange-150",amber:"bg-amber-200 text-amber-800 dark:bg-amber-700 dark:text-amber-150",yellow:"bg-yellow-200 text-yellow-800 dark:bg-yellow-700 dark:text-yellow-150",lime:"bg-lime-200 text-lime-800 dark:bg-lime-700 dark:text-lime-150",green:"bg-green-200 text-green-800 dark:bg-green-700 dark:text-green-150",emerald:"bg-emerald-200 text-emerald-800 dark:bg-emerald-700 dark:text-emerald-150",teal:"bg-teal-200 text-teal-800 dark:bg-teal-700 dark:text-teal-150",cyan:"bg-cyan-200 text-cyan-800 dark:bg-cyan-700 dark:text-cyan-150",sky:"bg-sky-200 text-sky-800 dark:bg-sky-700 dark:text-sky-150",blue:"bg-blue-200 text-blue-800 dark:bg-blue-700 dark:text-blue-150",indigo:"bg-indigo-200 text-indigo-800 dark:bg-indigo-700 dark:text-indigo-150",violet:"bg-violet-200 text-violet-800 dark:bg-violet-700 dark:text-violet-150",purple:"bg-purple-200 text-purple-800 dark:bg-purple-700 dark:text-purple-150",fuchsia:"bg-fuchsia-200 text-fuchsia-800 dark:bg-fuchsia-700 dark:text-fuchsia-150",pink:"bg-pink-200 text-pink-800 dark:bg-pink-700 dark:text-pink-150",rose:"bg-rose-200 text-rose-800 dark:bg-rose-700 dark:text-rose-150",info:"bg-info-200 text-info-800 dark:bg-info-700 dark:text-info-150",success:"bg-success-200 text-success-800 dark:bg-success-700 dark:text-success-150",warning:"bg-warning-200 text-warning-800 dark:bg-warning-700 dark:text-warning-150",error:"bg-error-200 text-error-800 dark:bg-error-700 dark:text-error-150"},ik=({palette:e="neutral"},...t)=>ue("text-xs font-semibold pli-2 plb-0.5 rounded cursor-default",ok[e],...t),ak={root:ik},sk=(e,...t)=>ue("z-[70] fixed bottom-4 inset-x-4 w-auto md:top-4 md:right-4 md:left-auto md:bottom-auto md:w-full md:max-w-sm rounded-lg flex flex-col gap-2",...t),lk=(e,...t)=>ue("rounded-lg flex p-2 gap-2",Gn,Oo({elevation:"chrome"}),"radix-state-open:animate-toast-slide-in-bottom md:radix-state-open:animate-toast-slide-in-right","radix-state-closed:animate-toast-hide","radix-swipe-end:animate-toast-swipe-out","translate-x-radix-toast-swipe-move-x","radix-swipe-cancel:translate-x-0 radix-swipe-cancel:duration-200 radix-swipe-cancel:ease-[ease]",jr,...t),ck=(e,...t)=>ue("grow flex flex-col gap-1 justify-center pis-2",...t),uk=(e,...t)=>ue("shrink-0 flex flex-col gap-1 justify-center",...t),fk=({srOnly:e},...t)=>ue("shrink-0 text-md font-medium",e&&"sr-only",...t),dk=({srOnly:e},...t)=>ue(At,"shrink-0",e&&"sr-only",...t),pk={viewport:sk,root:lk,body:ck,title:fk,description:dk,actions:uk},hk=(e,...t)=>ue("flex items-center gap-2 is-full",...t),gk={root:hk},vk=(e,...t)=>ue("inline-flex items-center rounded-md plb-2 pli-3",Gn,Lm,Oo({elevation:"group"}),t3,...t),mk=(e,...t)=>ue(tu,...t),bk={content:vk,arrow:mk},yk={themeName:()=>"default",anchoredOverflow:g3,avatar:C3,breadcrumb:k3,button:B3,dialog:z3,menu:Z3,input:mP,link:yP,list:AP,main:PP,message:LP,popover:BP,select:ZP,scrollArea:zP,separator:ek,status:nk,tag:ak,toast:pk,toolbar:gk,tooltip:bk},wk=e=>(t,r,n,...o)=>{const i=I6(e,t);return typeof i=="function"?i(n,...o):r},_k=wk(yk);const Gm=c.createContext({textValue:"",setTextValue:async e=>{}}),Km=()=>c.useContext(Gm),au=({children:e})=>{const[t,r]=c.useState(""),n=c.useCallback(async o=>(await navigator.clipboard.writeText(o),r(o)),[]);return c.createElement(Gm.Provider,{value:{textValue:t,setTextValue:n}},e)},qm="invisible bs-px -mbe-px overflow-hidden",Ek=({value:e,classNames:t,iconProps:r,...n})=>{const{t:o}=rt("os"),{textValue:i,setTextValue:a}=Km(),s=i===e;return c.createElement(br,{...n,classNames:["inline-flex flex-col justify-center",t],onClick:()=>a(e),"data-testid":"copy-invitation"},c.createElement("div",{role:"none",className:ue("flex gap-1 items-center",s&&qm)},c.createElement("span",{className:"pli-1"},o("copy invitation code label")),c.createElement(ze.Copy,{className:We(4),weight:"bold",...r})),c.createElement("div",{role:"none",className:ue("flex gap-1 items-center",!s&&qm)},c.createElement("span",{className:"pli-1"},o("copy invitation code success label")),c.createElement(ze.Check,{className:We(4),weight:"bold",...r})))},xk=({value:e,classNames:t,iconProps:r,variant:n,...o})=>{const{t:i}=rt("os"),{textValue:a,setTextValue:s}=Km(),u=i(a===e?"copy invitation code success label":"copy invitation code label"),[f,d]=c.useState(!1);return c.createElement(yr.Root,{delayDuration:1500,open:f,onOpenChange:d},c.createElement(yr.Portal,null,c.createElement(yr.Content,{side:"bottom",sideOffset:12,classNames:"z-30"},c.createElement("span",null,u),c.createElement(yr.Arrow,null))),c.createElement(yr.Trigger,{"aria-label":u,...o,onClick:()=>s(e).then(()=>d(!0)),"data-testid":"copy-invitation",asChild:!0},c.createElement(br,{variant:n,classNames:["inline-flex flex-col justify-center",t]},c.createElement(ze.Copy,{className:We(5),weight:"bold",...r}))))},su=({children:e,description:t,before:r,after:n,variant:o="default",elevation:i,slots:a={},...s})=>{const l=_t("compoundButton-label"),u=_t("compoundButton-description"),{tx:f}=Ae(),d=Bn(i),p={...s,variant:o,elevation:d,textWrap:!0},h=f("button.root","button button--compound",p,"flex items-center gap-4 plb-2.5",a.root?.className);return c.createElement("button",{...s,...a.root,className:h,"aria-labelledby":l,...t&&{"aria-describedby":u}},r&&c.createElement("div",{role:"none",className:"grow-0"},r),c.createElement("div",{role:"none",...a.middle,className:ue("grow whitespace-normal flex flex-col gap-1 text-left",a.middle?.className)},c.createElement("p",{...a.label,id:l,className:ue(a.label?.className)},e),t&&c.createElement("p",{id:u,...a.description,className:ue("text-xs mbe-1 font-normal",o==="primary"?e3:At,a.description?.className)},t)),n&&c.createElement("div",{role:"none",className:"grow-0"},n))};var Ss={adjectives:["abundant","accessible","accomplished","accurate","achievable","adaptable","adaptive","adequate","adjustable","admirable","admiring","adorable","adored","adoring","adroit","adulatory","advanced","advantageous","adventurous","affable","affectionate","affirmative","affluent","affordable","agile","agreeable","alluring","altruistic","amazed","amazing","ambitious","amenable","amiable","amicable","ample","amusing","angelic","appealing","appreciable","appreciated","appreciative","appropriate","ardent","articulate","artistic","assuring","astonished","astonishing","astounded","astounding","athletic","attentive","attractive","audible","auspicious","authentic","autonomous","available","avid","awed","awesome","awestruck","beauteous","beautiful","believable","beloved","beneficent","beneficial","benevolent","blameless","blissful","blithe","bonny","booming","boundless","bountiful","brainiest","brainy","brave","breathtaking","bright","brighter","brightest","brilliant","brisk","brotherly","bullish","buoyant","calm","calming","capable","captivating","carefree","catchy","celebrated","celebratory","champion","charismatic","charitable","charming","chaste","cheaper","cheapest","cheerful","cheery","cherished","chivalrous","classic","classy","clean","cleaner","cleanest","cleanly","clear","cleared","clearer","clever","coherent","cohesive","colorful","comely","comfortable","comforting","comfy","commendable","commodious","compact","compatible","competitive","compliant","conciliatory","concise","confident","congenial","considerate","consistent","constructive","consummate","contrasty","convenient","convincing","cool","coolest","cooperative","correct","courageous","courteous","courtly","cozy","creative","credible","crisp","crisper","cushy","cute","daring","darling","dashing","dauntless","dazzled","dazzling","decent","decisive","dedicated","defeated","deft","delectable","delicate","delicious","delighted","delightful","dependable","deserving","desirable","desirous","detachable","devout","dexterous","dextrous","dignified","diligent","diplomatic","distinctive","diversified","divine","dominated","dumbfounded","durable","dynamic","eager","earnest","eased","easy","easygoing","ebullient","economical","ecstatic","educated","effective","efficacious","efficient","effortless","effusive","elated","elegant","elite","eloquent","eminent","enchanted","enchanting","encouraging","endearing","endorsed","energetic","engaging","engrossing","enhanced","enjoyable","enraptured","enterprising","entertaining","enthralled","enthusiastic","enticing","entranced","entrancing","enviable","envious","equitable","erudite","ethical","euphoric","evaluative","eventful","everlasting","evocative","exalted","exalting","exceeding","excellent","exceptional","excited","exciting","exemplary","exhilarating","expansive","exquisite","exuberant","exultant","fabulous","fair","faithful","famed","famous","fancier","fancy","fantastic","fascinating","fashionable","fast","faster","fastest","faultless","favorable","favored","favorite","fearless","feasible","feisty","felicitous","fertile","fervent","fervid","festive","fiery","fine","finer","finest","firmer","flashy","flatter","flattering","flawless","flexible","flourishing","fluent","fond","foolproof","foremost","formidable","fortuitous","fortunate","fragrant","free","freed","fresh","fresher","freshest","friendly","frugal","fruitful","fun","funny","futuristic","gainful","gallant","galore","generous","genial","gentle","gentlest","genuine","gifted","glad","glamorous","gleeful","glimmering","glistening","glorious","glowing","godlike","gold","golden","good","goodly","gorgeous","graceful","gracious","grand","grateful","gratified","gratifying","great","greatest","guiltless","gutsy","halcyon","hale","hallowed","handier","handsome","handy","happier","happy","hardier","hardy","harmless","harmonious","healthful","healthy","heartening","heartfelt","heartwarming","heavenly","helpful","heroic","hilarious","holy","honest","honorable","honored","hopeful","hospitable","hot","hottest","humane","humble","humorous","humourous","ideal","idolized","idyllic","illuminating","illustrious","imaginative","immaculate","immense","impartial","impassioned","impeccable","important","impressed","impressive","improved","improving","incredible","indebted","indulgent","industrious","inestimable","inexpensive","infallible","influential","ingenious","ingenuous","innocuous","innovative","insightful","inspiring","instructive","instrumental","intelligent","intelligible","interesting","intimate","intricate","intriguing","intuitive","invaluable","inventive","invigorating","invincible","inviolable","inviolate","invulnerable","irresistible","jolly","jovial","joyful","joyous","jubilant","judicious","keen","kindly","laudable","lavish","lawful","leading","lean","legendary","lighter","likable","like","liked","lionhearted","lively","logical","lovable","loved","lovely","loving","loyal","lucid","luckier","luckiest","lucky","lucrative","luminous","lush","lustrous","luxuriant","luxurious","luxury","lyrical","magic","magical","magnanimous","magnificent","majestic","manageable","marvellous","marvelous","masterful","matchless","mature","meaningful","memorable","merciful","meritorious","merry","mesmerized","mesmerizing","meticulous","mighty","miraculous","modern","modest","momentous","monumental","motivated","navigable","neat","neatest","nice","nifty","nimble","noble","noiseless","noteworthy","nourishing","observant","obtainable","optimal","optimistic","opulent","orderly","organized","outstanding","overjoyed","painless","palatial","pampered","panoramic","paramount","passionate","patient","patri","peaceable","peaceful","peerless","peppy","perfect","permissible","personalized","phenomenal","picturesque","playful","pleasant","pleased","pleasing","pleasurable","plentiful","plush","poetic","poignant","poised","polished","polite","popular","portable","posh","positive","powerful","praiseworthy","praising","precious","precise","preeminent","preferable","premier","prestigious","pretty","priceless","principled","privileged","prize","proactive","prodigious","productive","proficient","profound","progressive","prolific","prominent","promised","promising","prompt","proper","propitious","prosperous","protective","proud","proven","prudent","punctual","pure","purposeful","quaint","qualified","quicker","quiet","quieter","radiant","rapid","rapt","rapturous","rational","reachable","readable","ready","realistic","realizable","reasonable","reasoned","receptive","recommended","redeeming","refined","reformed","refreshed","refreshing","regal","rejoicing","relaxed","reliable","remarkable","renewed","renowned","replaceable","reputable","resilient","resolute","resounding","resourceful","respectable","respectful","resplendent","responsive","restful","restored","retractable","reverent","rewarding","rich","righteous","rightful","robust","romantic","roomier","rosy","safe","saintly","salutary","sane","satisfactory","satisfied","satisfying","scenic","seamless","seasoned","secure","selective","sensational","sensible","sensitive","serene","sexy","sharp","sharper","sharpest","shiny","significant","silent","simpler","simplest","simplified","sincere","skilled","skillful","sleek","slick","smart","smarter","smartest","smelly","smiling","smitten","smooth","smoother","smoothest","snappy","snazzy","sociable","soft","softer","solid","soulful","spacious","sparkling","spectacular","speedy","spellbinding","spellbound","spirited","spiritual","splendid","spontaneous","sporty","spotless","sprightly","stable","stainless","stately","statuesque","staunch","steadfast","steadiest","steady","stellar","stimulating","stimulative","streamlined","striking","strong","stronger","strongest","stunned","stunning","stupendous","sturdier","sturdy","stylish","stylized","suave","sublime","subsidized","substantive","succeeding","successful","sufficient","suitable","sumptuous","super","superb","superior","supple","supportive","supreme","surreal","sustainable","swankier","swankiest","swanky","sweeping","sweet","sweetheart","swift","talented","tantalizing","tempting","tenacious","tender","terrific","thankful","thinner","thoughtful","thrifty","thrilled","thrilling","thriving","tidy","timely","titillating","tolerable","top","topnotch","tough","tougher","toughest","tranquil","transparent","trendy","triumphal","triumphant","trusted","trusting","trustworthy","trusty","truthful","twinkly","unabashed","unaffected","unassailable","unbeatable","unbiased","unbound","undamaged","undaunted","undisputable","undisputed","unencumbered","unequivocal","unfettered","unlimited","unmatched","unparalleled","unreal","unrestricted","unrivaled","unselfish","unwavering","upbeat","upscale","usable","useful","valiant","valuable","verifiable","veritable","versatile","vibrant","victorious","viewable","vigilant","virtuous","visionary","vivacious","vivid","warm","warmer","warmhearted","wealthy","welcome","wholesome","wieldy","winning","wise","witty","wonderful","wondrous","workable","worth","worthwhile","worthy","young","youthful","zippy"],animals:["aardvark","albatross","alligator","angelfish","angora","ant","anteater","antelope","armadillo","avocet","baboon","badger","bandicoot","barnacle","barracuda","bat","beagle","bear","beaver","bee","beetle","bird","bison","bloodhound","boar","bobcat","bonobo","buffalo","bulldog","bullfrog","butterfly","buzzard","camel","cat","caterpillar","catfish","cattle","centipede","chameleon","cheetah","chicken","chihuahua","chimpanzee","chin","chinchilla","chipmunk","civet","clam","cockroach","coon","coral","corgi","cougar","cow","coyote","crab","crane","cuttlefish","dachshund","dalmatian","dane","deer","devil","dingo","dodo","dog","dogfish","dollar","dolphin","donkey","dormouse","dragon","dragonfly","duck","dugong","eagle","earwig","eel","elephant","emperor","emu","falcon","ferret","fish","flamingo","flounder","fly","forest","fowl","fox","foxhound","frog","gar","gecko","gerbil","gharial","gibbon","giraffe","goat","goose","gopher","gorilla","grasshopper","greyhound","grouse","guppy","hamster","hare","hedgehog","heron","hippopotamus","hornet","horse","hound","hummingbird","husky","hyena","hyrax","ibis","iguana","impala","insect","jackal","jaguar","jellyfish","kangaroo","kingfisher","kiwi","koala","kudu","labradoodle","ladybird","lemming","lemur","leopard","liger","lion","lionfish","lizard","llama","lobster","lynx","macaque","macaw","magpie","malamute","maltese","mammoth","manatee","mandrill","markhor","marmoset","mastiff","mayfly","meerkat","millipede","mole","mongoose","monkey","monster","moorhen","moose","moth","mouse","mule","newt","nightingale","ocelot","octopus","okapi","orangutan","ostrich","otter","owl","oyster","panda","panther","parrot","peacock","pelican","penguin","pheasant","pig","pike","piranha","platypus","pointer","poodle","porcupine","possum","prawn","puffin","pug","puma","quail","rabbit","raccoon","rat","rattlesnake","ray","reindeer","retriever","rhinoceros","robin","rottweiler","russel","salamander","scorpion","seahorse","seal","shark","sheep","sheepdog","shrew","shrimp","skater","skunk","sloth","slug","snail","snake","snowshoe","spaniel","sparrow","spider","sponge","squid","squirrel","squirt","starfish","stingray","stoat","swan","tapir","tarantula","termite","terrier","tiger","toad","tortoise","toucan","tuatara","turkey","turtle","uakari","urchin","vole","vulture","wallaby","walrus","warthog","wasp","weasel","whale","whippet","wildebeest","wolf","wolfhound","wolverine","wombat","woodlouse","woodpecker","worm","yak","zebra","zebu","zonkey","zorse"]},Ym=e=>e.charAt(0).toUpperCase()+e.slice(1),lu=e=>{const t=e.length*2/3,r=e.substring(0,t),n=e.substring(t),o=Ym(Ss.adjectives[parseInt(r,16)%Ss.adjectives.length]),i=Ym(Ss.animals[parseInt(n,16)%Ss.animals.length]);return`${o} ${i}`};const Jm=c.forwardRef(({identity:e,presence:t,onClick:r},n)=>{const o=e.identityKey.toHex(),i=_t("identityListItem__label"),a=is(o??"",12),s=e.profile?.displayName??lu(e.identityKey.toHex());return c.createElement(Nc.Root,{classNames:ue("flex gap-2 pis-3 pie-1 items-center",r&&"cursor-pointer"),onClick:()=>r?.(),"data-testid":"identity-list-item",labelId:i,ref:n},c.createElement(Ot.Root,{status:t===ga.SpaceMember.PresenceState.ONLINE?"active":"inactive",labelId:i},c.createElement(Ot.Frame,null,c.createElement(Ot.Fallback,{href:a})),c.createElement(Ot.Label,{classNames:"text-sm truncate pli-2"},s)))}),Sk=({devices:e,onSelect:t})=>{const{t:r}=rt("os");return e.length>0?c.createElement(kc,{classNames:"flex flex-col gap-2"},e.map(n=>{const o={identityKey:n.deviceKey,profile:n.profile?{displayName:`${n.profile?.platform} (${n.profile?.platformVersion}) on ${n.profile?.os} (${n.profile?.osVersion}) ${n.profile?.architecture??"Unknown"}-bit`}:void 0};return c.createElement(Jm,{key:n.deviceKey.toHex(),identity:o,onClick:t&&(()=>t(n))})})):c.createElement("div",{role:"none",className:"grow flex items-center p-2"},c.createElement("p",{className:ue(At,"text-center is-full")},r("empty device list message")))},$k=({spaceKey:e,includeSelf:t,onSelect:r})=>{const n=Ue.useClient(),o=ga.useMembers(e),i=c.useMemo(()=>t?o.sort(a=>a.identity.identityKey.equals(n.halo.identity.get().identityKey)?-1:1):o.filter(a=>!a.identity.identityKey.equals(n.halo.identity.get().identityKey)),[o]);return c.createElement(Ck,{members:i,onSelect:r})},Ck=({members:e,onSelect:t})=>{const{t:r}=rt("os"),n=e.filter(o=>o.identity);return n.length>0?c.createElement(kc,{classNames:"flex flex-col gap-2"},n.map(o=>c.createElement(Jm,{key:o.identity.identityKey.toHex(),identity:o.identity,presence:o.presence,onClick:t&&(()=>t(o))}))):c.createElement("div",{role:"none",className:"grow flex items-center p-2"},c.createElement("p",{className:ue(At,"text-center is-full mlb-2")},r("empty space members message")))};var Xm;(function(e){e[e.TRACE=5]="TRACE",e[e.DEBUG=10]="DEBUG",e[e.INFO=11]="INFO",e[e.WARN=12]="WARN",e[e.ERROR=13]="ERROR"})(Xm||(Xm={}));var Zm;(function(e){(function(t){t[t.INCLUSIVE=1]="INCLUSIVE",t[t.EXPLICIT=2]="EXPLICIT"})(e.MatchingOptions||(e.MatchingOptions={}))})(Zm||(Zm={}));var Qm;(function(e){e[e.ACTIVE=0]="ACTIVE",e[e.INACTIVE=1]="INACTIVE"})(Qm||(Qm={}));var eb;(function(e){(function(t){t[t.NONE=0]="NONE",t[t.TRUNCATE=1]="TRUNCATE",t[t.HUMANIZE=2]="HUMANIZE"})(e.KEY_OPTION||(e.KEY_OPTION={}))})(eb||(eb={}));var tb;(function(e){e[e.CURRENT=0]="CURRENT",e[e.TRUSTED=1]="TRUSTED"})(tb||(tb={}));var rb;(function(e){(function(t){t[t.OFFLINE=0]="OFFLINE",t[t.ONLINE=1]="ONLINE",t[t.REMOVED=2]="REMOVED"})(e.PresenceState||(e.PresenceState={}))})(rb||(rb={}));var nb;(function(e){e[e.INACTIVE=2]="INACTIVE",e[e.ACTIVE=6]="ACTIVE",e[e.CLOSED=1]="CLOSED",e[e.CONTROL_ONLY=7]="CONTROL_ONLY",e[e.INITIALIZING=4]="INITIALIZING",e[e.READY=3]="READY",e[e.ERROR=5]="ERROR"})(nb||(nb={}));var ob;(function(e){(function(t){t[t.NONE=0]="NONE",t[t.INIT_AUTOMERGE=1]="INIT_AUTOMERGE"})(e.Migration||(e.Migration={}))})(ob||(ob={}));var we;(function(e){(function(t){t[t.INTERACTIVE=0]="INTERACTIVE",t[t.OFFLINE=1]="OFFLINE",t[t.MULTIUSE=2]="MULTIUSE"})(e.Type||(e.Type={})),function(t){t[t.DEVICE=0]="DEVICE",t[t.SPACE=1]="SPACE"}(e.Kind||(e.Kind={})),function(t){t[t.NONE=0]="NONE",t[t.SHARED_SECRET=1]="SHARED_SECRET"}(e.AuthMethod||(e.AuthMethod={})),function(t){t[t.INIT=0]="INIT",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED",t[t.READY_FOR_AUTHENTICATION=3]="READY_FOR_AUTHENTICATION",t[t.AUTHENTICATING=4]="AUTHENTICATING",t[t.SUCCESS=5]="SUCCESS",t[t.CANCELLED=6]="CANCELLED",t[t.TIMEOUT=7]="TIMEOUT",t[t.ERROR=8]="ERROR"}(e.State||(e.State={}))})(we||(we={}));var ib;(function(e){(function(t){t[t.ADDED=0]="ADDED",t[t.REMOVED=1]="REMOVED"})(e.Action||(e.Action={})),function(t){t[t.CREATED=0]="CREATED",t[t.ACCEPTED=1]="ACCEPTED"}(e.Type||(e.Type={}))})(ib||(ib={}));var ab;(function(e){e[e.OFFLINE=0]="OFFLINE",e[e.ONLINE=1]="ONLINE"})(ab||(ab={}));var Ak=200,cu="__lodash_hash_undefined__",Ok=1/0,sb=9007199254740991,Tk="[object Arguments]",Ik="[object Function]",Pk="[object GeneratorFunction]",kk="[object Symbol]",Nk=/[\\^$.*+?()[\]{}|]/g,Dk=/^\[object .+?Constructor\]$/,Lk=/^(?:0|[1-9]\d*)$/,Mk=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,Fk=typeof self=="object"&&self&&self.Object===Object&&self,uu=Mk||Fk||Function("return this")();function jk(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Bk(e,t){var r=e?e.length:0;return!!r&&Wk(e,t,0)>-1}function Rk(e,t,r){for(var n=-1,o=e?e.length:0;++n<o;)if(r(t,e[n]))return!0;return!1}function lb(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function fu(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function Uk(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Wk(e,t,r){if(t!==t)return Uk(e,Vk,r);for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}function Vk(e){return e!==e}function Hk(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function zk(e){return function(t){return e(t)}}function Gk(e,t){return e.has(t)}function Kk(e,t){return e?.[t]}function qk(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function cb(e,t){return function(r){return e(t(r))}}var Yk=Array.prototype,Jk=Function.prototype,$s=Object.prototype,du=uu["__core-js_shared__"],ub=function(){var e=/[^.]+$/.exec(du&&du.keys&&du.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),fb=Jk.toString,Io=$s.hasOwnProperty,pu=$s.toString,Xk=RegExp("^"+fb.call(Io).replace(Nk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),db=uu.Symbol,Zk=cb(Object.getPrototypeOf,Object),Qk=$s.propertyIsEnumerable,e4=Yk.splice,pb=db?db.isConcatSpreadable:void 0,hu=Object.getOwnPropertySymbols,hb=Math.max,t4=vb(uu,"Map"),Ni=vb(Object,"create");function Kn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function r4(){this.__data__=Ni?Ni(null):{}}function n4(e){return this.has(e)&&delete this.__data__[e]}function o4(e){var t=this.__data__;if(Ni){var r=t[e];return r===cu?void 0:r}return Io.call(t,e)?t[e]:void 0}function i4(e){var t=this.__data__;return Ni?t[e]!==void 0:Io.call(t,e)}function a4(e,t){var r=this.__data__;return r[e]=Ni&&t===void 0?cu:t,this}Kn.prototype.clear=r4,Kn.prototype.delete=n4,Kn.prototype.get=o4,Kn.prototype.has=i4,Kn.prototype.set=a4;function Po(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function s4(){this.__data__=[]}function l4(e){var t=this.__data__,r=As(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():e4.call(t,r,1),!0}function c4(e){var t=this.__data__,r=As(t,e);return r<0?void 0:t[r][1]}function u4(e){return As(this.__data__,e)>-1}function f4(e,t){var r=this.__data__,n=As(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}Po.prototype.clear=s4,Po.prototype.delete=l4,Po.prototype.get=c4,Po.prototype.has=u4,Po.prototype.set=f4;function ko(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function d4(){this.__data__={hash:new Kn,map:new(t4||Po),string:new Kn}}function p4(e){return Os(this,e).delete(e)}function h4(e){return Os(this,e).get(e)}function g4(e){return Os(this,e).has(e)}function v4(e,t){return Os(this,e).set(e,t),this}ko.prototype.clear=d4,ko.prototype.delete=p4,ko.prototype.get=h4,ko.prototype.has=g4,ko.prototype.set=v4;function Cs(e){var t=-1,r=e?e.length:0;for(this.__data__=new ko;++t<r;)this.add(e[t])}function m4(e){return this.__data__.set(e,cu),this}function b4(e){return this.__data__.has(e)}Cs.prototype.add=Cs.prototype.push=m4,Cs.prototype.has=b4;function y4(e,t){var r=gu(e)||mb(e)?Hk(e.length,String):[],n=r.length,o=!!n;for(var i in e)(t||Io.call(e,i))&&!(o&&(i=="length"||P4(i,n)))&&r.push(i);return r}function As(e,t){for(var r=e.length;r--;)if(j4(e[r][0],t))return r;return-1}function w4(e,t,r,n){var o=-1,i=Bk,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;r&&(t=lb(t,zk(r))),n?(i=Rk,a=!1):t.length>=Ak&&(i=Gk,a=!1,t=new Cs(t));e:for(;++o<s;){var f=e[o],d=r?r(f):f;if(f=n||f!==0?f:0,a&&d===d){for(var p=u;p--;)if(t[p]===d)continue e;l.push(f)}else i(t,d,n)||l.push(f)}return l}function gb(e,t,r,n,o){var i=-1,a=e.length;for(r||(r=I4),o||(o=[]);++i<a;){var s=e[i];t>0&&r(s)?t>1?gb(s,t-1,r,n,o):fu(o,s):n||(o[o.length]=s)}return o}function _4(e,t,r){var n=t(e);return gu(e)?n:fu(n,r(e))}function E4(e){if(!vu(e)||N4(e))return!1;var t=yb(e)||qk(e)?Xk:Dk;return t.test(F4(e))}function x4(e){if(!vu(e))return L4(e);var t=D4(e),r=[];for(var n in e)n=="constructor"&&(t||!Io.call(e,n))||r.push(n);return r}function S4(e,t){return e=Object(e),$4(e,t,function(r,n){return n in e})}function $4(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=e[a];r(s,a)&&(i[a]=s)}return i}function C4(e,t){return t=hb(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,o=hb(r.length-t,0),i=Array(o);++n<o;)i[n]=r[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=r[n];return a[t]=i,jk(e,this,a)}}function A4(e){return _4(e,W4,T4)}function Os(e,t){var r=e.__data__;return k4(t)?r[typeof t=="string"?"string":"hash"]:r.map}function vb(e,t){var r=Kk(e,t);return E4(r)?r:void 0}var O4=hu?cb(hu,Object):_b,T4=hu?function(e){for(var t=[];e;)fu(t,O4(e)),e=Zk(e);return t}:_b;function I4(e){return gu(e)||mb(e)||!!(pb&&e&&e[pb])}function P4(e,t){return t=t??sb,!!t&&(typeof e=="number"||Lk.test(e))&&e>-1&&e%1==0&&e<t}function k4(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function N4(e){return!!ub&&ub in e}function D4(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||$s;return e===r}function L4(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}function M4(e){if(typeof e=="string"||U4(e))return e;var t=e+"";return t=="0"&&1/e==-Ok?"-0":t}function F4(e){if(e!=null){try{return fb.call(e)}catch{}try{return e+""}catch{}}return""}function j4(e,t){return e===t||e!==e&&t!==t}function mb(e){return B4(e)&&Io.call(e,"callee")&&(!Qk.call(e,"callee")||pu.call(e)==Tk)}var gu=Array.isArray;function bb(e){return e!=null&&R4(e.length)&&!yb(e)}function B4(e){return wb(e)&&bb(e)}function yb(e){var t=vu(e)?pu.call(e):"";return t==Ik||t==Pk}function R4(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=sb}function vu(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function wb(e){return!!e&&typeof e=="object"}function U4(e){return typeof e=="symbol"||wb(e)&&pu.call(e)==kk}function W4(e){return bb(e)?y4(e,!0):x4(e)}C4(function(e,t){return e==null?{}:(t=lb(gb(t,1),M4),S4(e,w4(A4(e),t)))});function _b(){return[]}var V4=1/0,H4=9007199254740991,z4="[object Arguments]",G4="[object Function]",K4="[object GeneratorFunction]",q4="[object Symbol]",Y4=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,J4=typeof self=="object"&&self&&self.Object===Object&&self,X4=Y4||J4||Function("return this")();function Z4(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Q4(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function eN(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var mu=Object.prototype,tN=mu.hasOwnProperty,bu=mu.toString,Eb=X4.Symbol,rN=mu.propertyIsEnumerable,xb=Eb?Eb.isConcatSpreadable:void 0,Sb=Math.max;function $b(e,t,r,n,o){var i=-1,a=e.length;for(r||(r=aN),o||(o=[]);++i<a;){var s=e[i];t>0&&r(s)?t>1?$b(s,t-1,r,n,o):eN(o,s):n||(o[o.length]=s)}return o}function nN(e,t){return e=Object(e),oN(e,t,function(r,n){return n in e})}function oN(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=e[a];r(s,a)&&(i[a]=s)}return i}function iN(e,t){return t=Sb(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,o=Sb(r.length-t,0),i=Array(o);++n<o;)i[n]=r[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=r[n];return a[t]=i,Z4(e,this,a)}}function aN(e){return cN(e)||lN(e)||!!(xb&&e&&e[xb])}function sN(e){if(typeof e=="string"||gN(e))return e;var t=e+"";return t=="0"&&1/e==-V4?"-0":t}function lN(e){return fN(e)&&tN.call(e,"callee")&&(!rN.call(e,"callee")||bu.call(e)==z4)}var cN=Array.isArray;function uN(e){return e!=null&&pN(e.length)&&!dN(e)}function fN(e){return Cb(e)&&uN(e)}function dN(e){var t=hN(e)?bu.call(e):"";return t==G4||t==K4}function pN(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=H4}function hN(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Cb(e){return!!e&&typeof e=="object"}function gN(e){return typeof e=="symbol"||Cb(e)&&bu.call(e)==q4}iN(function(e,t){return e==null?{}:nN(e,Q4($b(t,1),sN))});var vN=Object.create,Ab=Object.defineProperty,mN=Object.getOwnPropertyDescriptor,Ob=Object.getOwnPropertyNames,bN=Object.getPrototypeOf,yN=Object.prototype.hasOwnProperty,He=(e,t)=>function(){return t||(0,e[Ob(e)[0]])((t={exports:{}}).exports,t),t.exports},wN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ob(t))!yN.call(e,o)&&o!==r&&Ab(e,o,{get:()=>t[o],enumerable:!(n=mN(t,o))||n.enumerable});return e},Di=(e,t,r)=>(r=e!=null?vN(bN(e)):{},wN(t||!e||!e.__esModule?Ab(r,"default",{value:e,enumerable:!0}):r,e)),Tb=He({"node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js"(e,t){t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var n={},o=Symbol("test"),i=Object(o);if(typeof o=="string"||Object.prototype.toString.call(o)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var a=42;n[o]=a;for(o in n)return!1;if(typeof Object.keys=="function"&&Object.keys(n).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(n).length!==0)return!1;var s=Object.getOwnPropertySymbols(n);if(s.length!==1||s[0]!==o||!Object.prototype.propertyIsEnumerable.call(n,o))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(n,o);if(l.value!==a||l.enumerable!==!0)return!1}return!0}}}),Li=He({"node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js"(e,t){var r=Tb();t.exports=function(){return r()&&!!Symbol.toStringTag}}}),Ib=He({"node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js"(e,t){var r=typeof Symbol<"u"&&Symbol,n=Tb();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}}),Pb=He({"node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js"(e,t){var r={foo:{}},n=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof n)}}}),_N=He({"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(e,t){var r="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,o=Math.max,i="[object Function]",a=function(f,d){for(var p=[],h=0;h<f.length;h+=1)p[h]=f[h];for(var g=0;g<d.length;g+=1)p[g+f.length]=d[g];return p},s=function(f,d){for(var p=[],h=d||0,g=0;h<f.length;h+=1,g+=1)p[g]=f[h];return p},l=function(u,f){for(var d="",p=0;p<u.length;p+=1)d+=u[p],p+1<u.length&&(d+=f);return d};t.exports=function(f){var d=this;if(typeof d!="function"||n.apply(d)!==i)throw new TypeError(r+d);for(var p=s(arguments,1),h,g=function(){if(this instanceof h){var E=d.apply(this,a(p,arguments));return Object(E)===E?E:this}return d.apply(f,a(p,arguments))},v=o(0,d.length-p.length),y=[],m=0;m<v;m++)y[m]="$"+m;if(h=Function("binder","return function ("+l(y,",")+"){ return binder.apply(this,arguments); }")(g),d.prototype){var w=function(){};w.prototype=d.prototype,h.prototype=new w,w.prototype=null}return h}}}),yu=He({"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(e,t){var r=_N();t.exports=Function.prototype.bind||r}}),EN=He({"node_modules/.pnpm/hasown@2.0.0/node_modules/hasown/index.js"(e,t){var r=Function.prototype.call,n=Object.prototype.hasOwnProperty,o=yu();t.exports=o.call(r,n)}}),No=He({"node_modules/.pnpm/get-intrinsic@1.2.2/node_modules/get-intrinsic/index.js"(e,t){var r,n=SyntaxError,o=Function,i=TypeError,a=function(K){try{return o('"use strict"; return ('+K+").constructor;")()}catch{}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch{s=null}var l=function(){throw new i},u=s?function(){try{return arguments.callee,l}catch{try{return s(arguments,"callee").get}catch{return l}}}():l,f=Ib()(),d=Pb()(),p=Object.getPrototypeOf||(d?function(K){return K.__proto__}:null),h={},g=typeof Uint8Array>"u"||!p?r:p(Uint8Array),v={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":f&&p?p([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&p?p(p([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!f||!p?r:p(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!f||!p?r:p(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&p?p(""[Symbol.iterator]()):r,"%Symbol%":f?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":u,"%TypedArray%":g,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(p)try{null.error}catch(K){y=p(p(K)),v["%Error.prototype%"]=y}var y,m=function K(Y){var te;if(Y==="%AsyncFunction%")te=a("async function () {}");else if(Y==="%GeneratorFunction%")te=a("function* () {}");else if(Y==="%AsyncGeneratorFunction%")te=a("async function* () {}");else if(Y==="%AsyncGenerator%"){var oe=K("%AsyncGeneratorFunction%");oe&&(te=oe.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var le=K("%AsyncGenerator%");le&&p&&(te=p(le.prototype))}return v[Y]=te,te},w={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},E=yu(),x=EN(),P=E.call(Function.call,Array.prototype.concat),I=E.call(Function.apply,Array.prototype.splice),S=E.call(Function.call,String.prototype.replace),O=E.call(Function.call,String.prototype.slice),k=E.call(Function.call,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,N=function(Y){var te=O(Y,0,1),oe=O(Y,-1);if(te==="%"&&oe!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(oe==="%"&&te!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var le=[];return S(Y,j,function(ae,ge,ce,q){le[le.length]=ce?S(q,D,"$1"):ge||ae}),le},J=function(Y,te){var oe=Y,le;if(x(w,oe)&&(le=w[oe],oe="%"+le[0]+"%"),x(v,oe)){var ae=v[oe];if(ae===h&&(ae=m(oe)),typeof ae>"u"&&!te)throw new i("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:le,name:oe,value:ae}}throw new n("intrinsic "+Y+" does not exist!")};t.exports=function(Y,te){if(typeof Y!="string"||Y.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof te!="boolean")throw new i('"allowMissing" argument must be a boolean');if(k(/^%?[^%]*%?$/,Y)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var oe=N(Y),le=oe.length>0?oe[0]:"",ae=J("%"+le+"%",te),ge=ae.name,ce=ae.value,q=!1,V=ae.alias;V&&(le=V[0],I(oe,P([0,1],V)));for(var re=1,de=!0;re<oe.length;re+=1){var U=oe[re],z=O(U,0,1),M=O(U,-1);if((z==='"'||z==="'"||z==="`"||M==='"'||M==="'"||M==="`")&&z!==M)throw new n("property names with quotes must have matching quotes");if((U==="constructor"||!de)&&(q=!0),le+="."+U,ge="%"+le+"%",x(v,ge))ce=v[ge];else if(ce!=null){if(!(U in ce)){if(!te)throw new i("base intrinsic for "+Y+" exists, but the property is not available.");return}if(s&&re+1>=oe.length){var R=s(ce,U);de=!!R,de&&"get"in R&&!("originalValue"in R.get)?ce=R.get:ce=ce[U]}else de=x(ce,U),ce=ce[U];de&&!q&&(v[ge]=ce)}}return ce}}}),kb=He({"node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js"(e,t){var r=No(),n=r("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch{return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return n([],"length",{value:1}).length!==1}catch{return!0}},t.exports=o}}),wu=He({"node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js"(e,t){var r=No(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch{n=null}t.exports=n}}),xN=He({"node_modules/.pnpm/define-data-property@1.1.1/node_modules/define-data-property/index.js"(e,t){var r=kb()(),n=No(),o=r&&n("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch{o=!1}var i=n("%SyntaxError%"),a=n("%TypeError%"),s=wu();t.exports=function(u,f,d){if(!u||typeof u!="object"&&typeof u!="function")throw new a("`obj` must be an object or a function`");if(typeof f!="string"&&typeof f!="symbol")throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new a("`loose`, if provided, must be a boolean");var p=arguments.length>3?arguments[3]:null,h=arguments.length>4?arguments[4]:null,g=arguments.length>5?arguments[5]:null,v=arguments.length>6?arguments[6]:!1,y=!!s&&s(u,f);if(o)o(u,f,{configurable:g===null&&y?y.configurable:!g,enumerable:p===null&&y?y.enumerable:!p,value:d,writable:h===null&&y?y.writable:!h});else if(v||!p&&!h&&!g)u[f]=d;else throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),SN=He({"node_modules/.pnpm/set-function-length@1.1.1/node_modules/set-function-length/index.js"(e,t){var r=No(),n=xN(),o=kb()(),i=wu(),a=r("%TypeError%"),s=r("%Math.floor%");t.exports=function(u,f){if(typeof u!="function")throw new a("`fn` is not a function");if(typeof f!="number"||f<0||f>4294967295||s(f)!==f)throw new a("`length` must be a positive 32-bit integer");var d=arguments.length>2&&!!arguments[2],p=!0,h=!0;if("length"in u&&i){var g=i(u,"length");g&&!g.configurable&&(p=!1),g&&!g.writable&&(h=!1)}return(p||h||!d)&&(o?n(u,"length",f,!0,!0):n(u,"length",f)),u}}}),Nb=He({"node_modules/.pnpm/call-bind@1.0.5/node_modules/call-bind/index.js"(e,t){var r=yu(),n=No(),o=SN(),i=n("%TypeError%"),a=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),l=n("%Reflect.apply%",!0)||r.call(s,a),u=n("%Object.defineProperty%",!0),f=n("%Math.max%");if(u)try{u({},"a",{value:1})}catch{u=null}t.exports=function(h){if(typeof h!="function")throw new i("a function is required");var g=l(r,s,arguments);return o(g,1+f(0,h.length-(arguments.length-1)),!0)};var d=function(){return l(r,a,arguments)};u?u(t.exports,"apply",{value:d}):t.exports.apply=d}}),Db=He({"node_modules/.pnpm/call-bind@1.0.5/node_modules/call-bind/callBound.js"(e,t){var r=No(),n=Nb(),o=n(r("String.prototype.indexOf"));t.exports=function(a,s){var l=r(a,!!s);return typeof l=="function"&&o(a,".prototype.")>-1?n(l):l}}}),$N=He({"node_modules/.pnpm/is-arguments@1.1.1/node_modules/is-arguments/index.js"(e,t){var r=Li()(),n=Db(),o=n("Object.prototype.toString"),i=function(u){return r&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:o(u)==="[object Arguments]"},a=function(u){return i(u)?!0:u!==null&&typeof u=="object"&&typeof u.length=="number"&&u.length>=0&&o(u)!=="[object Array]"&&o(u.callee)==="[object Function]"},s=function(){return i(arguments)}();i.isLegacyArguments=a,t.exports=s?i:a}}),CN=He({"node_modules/.pnpm/is-generator-function@1.0.10/node_modules/is-generator-function/index.js"(e,t){var r=Object.prototype.toString,n=Function.prototype.toString,o=/^\s*(?:function)?\*/,i=Li()(),a=Object.getPrototypeOf,s=function(){if(!i)return!1;try{return Function("return function*() {}")()}catch{}},l;t.exports=function(f){if(typeof f!="function")return!1;if(o.test(n.call(f)))return!0;if(!i){var d=r.call(f);return d==="[object GeneratorFunction]"}if(!a)return!1;if(typeof l>"u"){var p=s();l=p?a(p):!1}return a(f)===l}}}),AN=He({"node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js"(e,t){var r=Function.prototype.toString,n=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,o,i;if(typeof n=="function"&&typeof Object.defineProperty=="function")try{o=Object.defineProperty({},"length",{get:function(){throw i}}),i={},n(function(){throw 42},null,o)}catch(x){x!==i&&(n=null)}else n=null;var a=/^\s*class\b/,s=function(P){try{var I=r.call(P);return a.test(I)}catch{return!1}},l=function(P){try{return s(P)?!1:(r.call(P),!0)}catch{return!1}},u=Object.prototype.toString,f="[object Object]",d="[object Function]",p="[object GeneratorFunction]",h="[object HTMLAllCollection]",g="[object HTML document.all class]",v="[object HTMLCollection]",y=typeof Symbol=="function"&&!!Symbol.toStringTag,m=!(0 in[,]),w=function(){return!1};typeof document=="object"&&(E=document.all,u.call(E)===u.call(document.all)&&(w=function(P){if((m||!P)&&(typeof P>"u"||typeof P=="object"))try{var I=u.call(P);return(I===h||I===g||I===v||I===f)&&P("")==null}catch{}return!1}));var E;t.exports=n?function(P){if(w(P))return!0;if(!P||typeof P!="function"&&typeof P!="object")return!1;try{n(P,null,o)}catch(I){if(I!==i)return!1}return!s(P)&&l(P)}:function(P){if(w(P))return!0;if(!P||typeof P!="function"&&typeof P!="object")return!1;if(y)return l(P);if(s(P))return!1;var I=u.call(P);return I!==d&&I!==p&&!/^\[object HTML/.test(I)?!1:l(P)}}}),_u=He({"node_modules/.pnpm/for-each@0.3.3/node_modules/for-each/index.js"(e,t){var r=AN(),n=Object.prototype.toString,o=Object.prototype.hasOwnProperty,i=function(f,d,p){for(var h=0,g=f.length;h<g;h++)o.call(f,h)&&(p==null?d(f[h],h,f):d.call(p,f[h],h,f))},a=function(f,d,p){for(var h=0,g=f.length;h<g;h++)p==null?d(f.charAt(h),h,f):d.call(p,f.charAt(h),h,f)},s=function(f,d,p){for(var h in f)o.call(f,h)&&(p==null?d(f[h],h,f):d.call(p,f[h],h,f))},l=function(f,d,p){if(!r(d))throw new TypeError("iterator must be a function");var h;arguments.length>=3&&(h=p),n.call(f)==="[object Array]"?i(f,d,h):typeof f=="string"?a(f,d,h):s(f,d,h)};t.exports=l}}),Eu=He({"node_modules/.pnpm/available-typed-arrays@1.0.5/node_modules/available-typed-arrays/index.js"(e,t){var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],n=typeof globalThis>"u"?global:globalThis;t.exports=function(){for(var i=[],a=0;a<r.length;a++)typeof n[r[a]]=="function"&&(i[i.length]=r[a]);return i}}}),ON=He({"node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js"(e,t){var r="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,o=Object.prototype.toString,i="[object Function]";t.exports=function(s){var l=this;if(typeof l!="function"||o.call(l)!==i)throw new TypeError(r+l);for(var u=n.call(arguments,1),f,d=function(){if(this instanceof f){var y=l.apply(this,u.concat(n.call(arguments)));return Object(y)===y?y:this}else return l.apply(s,u.concat(n.call(arguments)))},p=Math.max(0,l.length-u.length),h=[],g=0;g<p;g++)h.push("$"+g);if(f=Function("binder","return function ("+h.join(",")+"){ return binder.apply(this,arguments); }")(d),l.prototype){var v=function(){};v.prototype=l.prototype,f.prototype=new v,v.prototype=null}return f}}}),xu=He({"node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js"(e,t){var r=ON();t.exports=Function.prototype.bind||r}}),TN=He({"node_modules/.pnpm/has@1.0.3/node_modules/has/src/index.js"(e,t){var r=xu();t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)}}),Su=He({"node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js"(e,t){var r,n=SyntaxError,o=Function,i=TypeError,a=function(K){try{return o('"use strict"; return ('+K+").constructor;")()}catch{}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch{s=null}var l=function(){throw new i},u=s?function(){try{return arguments.callee,l}catch{try{return s(arguments,"callee").get}catch{return l}}}():l,f=Ib()(),d=Pb()(),p=Object.getPrototypeOf||(d?function(K){return K.__proto__}:null),h={},g=typeof Uint8Array>"u"||!p?r:p(Uint8Array),v={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":f&&p?p([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&p?p(p([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!f||!p?r:p(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!f||!p?r:p(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&p?p(""[Symbol.iterator]()):r,"%Symbol%":f?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":u,"%TypedArray%":g,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(p)try{null.error}catch(K){y=p(p(K)),v["%Error.prototype%"]=y}var y,m=function K(Y){var te;if(Y==="%AsyncFunction%")te=a("async function () {}");else if(Y==="%GeneratorFunction%")te=a("function* () {}");else if(Y==="%AsyncGeneratorFunction%")te=a("async function* () {}");else if(Y==="%AsyncGenerator%"){var oe=K("%AsyncGeneratorFunction%");oe&&(te=oe.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var le=K("%AsyncGenerator%");le&&p&&(te=p(le.prototype))}return v[Y]=te,te},w={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},E=xu(),x=TN(),P=E.call(Function.call,Array.prototype.concat),I=E.call(Function.apply,Array.prototype.splice),S=E.call(Function.call,String.prototype.replace),O=E.call(Function.call,String.prototype.slice),k=E.call(Function.call,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,N=function(Y){var te=O(Y,0,1),oe=O(Y,-1);if(te==="%"&&oe!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(oe==="%"&&te!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var le=[];return S(Y,j,function(ae,ge,ce,q){le[le.length]=ce?S(q,D,"$1"):ge||ae}),le},J=function(Y,te){var oe=Y,le;if(x(w,oe)&&(le=w[oe],oe="%"+le[0]+"%"),x(v,oe)){var ae=v[oe];if(ae===h&&(ae=m(oe)),typeof ae>"u"&&!te)throw new i("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:le,name:oe,value:ae}}throw new n("intrinsic "+Y+" does not exist!")};t.exports=function(Y,te){if(typeof Y!="string"||Y.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof te!="boolean")throw new i('"allowMissing" argument must be a boolean');if(k(/^%?[^%]*%?$/,Y)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var oe=N(Y),le=oe.length>0?oe[0]:"",ae=J("%"+le+"%",te),ge=ae.name,ce=ae.value,q=!1,V=ae.alias;V&&(le=V[0],I(oe,P([0,1],V)));for(var re=1,de=!0;re<oe.length;re+=1){var U=oe[re],z=O(U,0,1),M=O(U,-1);if((z==='"'||z==="'"||z==="`"||M==='"'||M==="'"||M==="`")&&z!==M)throw new n("property names with quotes must have matching quotes");if((U==="constructor"||!de)&&(q=!0),le+="."+U,ge="%"+le+"%",x(v,ge))ce=v[ge];else if(ce!=null){if(!(U in ce)){if(!te)throw new i("base intrinsic for "+Y+" exists, but the property is not available.");return}if(s&&re+1>=oe.length){var R=s(ce,U);de=!!R,de&&"get"in R&&!("originalValue"in R.get)?ce=R.get:ce=ce[U]}else de=x(ce,U),ce=ce[U];de&&!q&&(v[ge]=ce)}}return ce}}}),IN=He({"node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js"(e,t){var r=xu(),n=Su(),o=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||r.call(i,o),s=n("%Object.getOwnPropertyDescriptor%",!0),l=n("%Object.defineProperty%",!0),u=n("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}t.exports=function(p){var h=a(r,i,arguments);if(s&&l){var g=s(h,"length");g.configurable&&l(h,"length",{value:1+u(0,p.length-(arguments.length-1))})}return h};var f=function(){return a(r,o,arguments)};l?l(t.exports,"apply",{value:f}):t.exports.apply=f}}),Lb=He({"node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js"(e,t){var r=Su(),n=IN(),o=n(r("String.prototype.indexOf"));t.exports=function(a,s){var l=r(a,!!s);return typeof l=="function"&&o(a,".prototype.")>-1?n(l):l}}}),Mb=He({"node_modules/.pnpm/es-abstract@1.20.4/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js"(e,t){var r=Su(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch{n=null}t.exports=n}}),PN=He({"node_modules/.pnpm/which-typed-array@1.1.13/node_modules/which-typed-array/index.js"(e,t){var r=_u(),n=Eu(),o=Nb(),i=Db(),a=wu(),s=i("Object.prototype.toString"),l=Li()(),u=typeof globalThis>"u"?global:globalThis,f=n(),d=i("String.prototype.slice"),p=Object.getPrototypeOf,h=i("Array.prototype.indexOf",!0)||function(w,E){for(var x=0;x<w.length;x+=1)if(w[x]===E)return x;return-1},g={__proto__:null};l&&a&&p?r(f,function(m){var w=new u[m];if(Symbol.toStringTag in w){var E=p(w),x=a(E,Symbol.toStringTag);if(!x){var P=p(E);x=a(P,Symbol.toStringTag)}g["$"+m]=o(x.get)}}):r(f,function(m){var w=new u[m],E=w.slice||w.set;E&&(g["$"+m]=o(E))});var v=function(w){var E=!1;return r(g,function(x,P){if(!E)try{"$"+x(w)===P&&(E=d(P,1))}catch{}}),E},y=function(w){var E=!1;return r(g,function(x,P){if(!E)try{x(w),E=d(P,1)}catch{}}),E};t.exports=function(w){if(!w||typeof w!="object")return!1;if(!l){var E=d(s(w),8,-1);return h(f,E)>-1?E:E!=="Object"?!1:y(w)}return a?v(w):null}}}),kN=He({"node_modules/.pnpm/is-typed-array@1.1.12/node_modules/is-typed-array/index.js"(e,t){var r=PN();t.exports=function(o){return!!r(o)}}}),NN=He({"node_modules/.pnpm/which-typed-array@1.1.8/node_modules/which-typed-array/index.js"(e,t){var r=_u(),n=Eu(),o=Lb(),i=o("Object.prototype.toString"),a=Li()(),s=typeof globalThis>"u"?global:globalThis,l=n(),u=o("String.prototype.slice"),f={},d=Mb(),p=Object.getPrototypeOf;a&&d&&p&&r(l,function(v){if(typeof s[v]=="function"){var y=new s[v];if(Symbol.toStringTag in y){var m=p(y),w=d(m,Symbol.toStringTag);if(!w){var E=p(m);w=d(E,Symbol.toStringTag)}f[v]=w.get}}});var h=function(y){var m=!1;return r(f,function(w,E){if(!m)try{var x=w.call(y);x===E&&(m=x)}catch{}}),m},g=kN();t.exports=function(y){return g(y)?!a||!(Symbol.toStringTag in y)?u(i(y),8,-1):h(y):!1}}}),DN=He({"node_modules/.pnpm/is-typed-array@1.1.9/node_modules/is-typed-array/index.js"(e,t){var r=_u(),n=Eu(),o=Lb(),i=o("Object.prototype.toString"),a=Li()(),s=typeof globalThis>"u"?global:globalThis,l=n(),u=o("Array.prototype.indexOf",!0)||function(y,m){for(var w=0;w<y.length;w+=1)if(y[w]===m)return w;return-1},f=o("String.prototype.slice"),d={},p=Mb(),h=Object.getPrototypeOf;a&&p&&h&&r(l,function(v){var y=new s[v];if(Symbol.toStringTag in y){var m=h(y),w=p(m,Symbol.toStringTag);if(!w){var E=h(m);w=p(E,Symbol.toStringTag)}d[v]=w.get}});var g=function(y){var m=!1;return r(d,function(w,E){if(!m)try{m=w.call(y)===E}catch{}}),m};t.exports=function(y){if(!y||typeof y!="object")return!1;if(!a||!(Symbol.toStringTag in y)){var m=f(i(y),8,-1);return u(l,m)>-1}return p?g(y):!1}}}),LN=He({"node_modules/.pnpm/util@0.12.5/node_modules/util/support/types.js"(e){var t=$N(),r=CN(),n=NN(),o=DN();function i(ie){return ie.call.bind(ie)}var a=typeof BigInt<"u",s=typeof Symbol<"u",l=i(Object.prototype.toString),u=i(Number.prototype.valueOf),f=i(String.prototype.valueOf),d=i(Boolean.prototype.valueOf);a&&(p=i(BigInt.prototype.valueOf));var p;s&&(h=i(Symbol.prototype.valueOf));var h;function g(ie,Ne){if(typeof ie!="object")return!1;try{return Ne(ie),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=o;function v(ie){return typeof Promise<"u"&&ie instanceof Promise||ie!==null&&typeof ie=="object"&&typeof ie.then=="function"&&typeof ie.catch=="function"}e.isPromise=v;function y(ie){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(ie):o(ie)||V(ie)}e.isArrayBufferView=y;function m(ie){return n(ie)==="Uint8Array"}e.isUint8Array=m;function w(ie){return n(ie)==="Uint8ClampedArray"}e.isUint8ClampedArray=w;function E(ie){return n(ie)==="Uint16Array"}e.isUint16Array=E;function x(ie){return n(ie)==="Uint32Array"}e.isUint32Array=x;function P(ie){return n(ie)==="Int8Array"}e.isInt8Array=P;function I(ie){return n(ie)==="Int16Array"}e.isInt16Array=I;function S(ie){return n(ie)==="Int32Array"}e.isInt32Array=S;function O(ie){return n(ie)==="Float32Array"}e.isFloat32Array=O;function k(ie){return n(ie)==="Float64Array"}e.isFloat64Array=k;function j(ie){return n(ie)==="BigInt64Array"}e.isBigInt64Array=j;function D(ie){return n(ie)==="BigUint64Array"}e.isBigUint64Array=D;function N(ie){return l(ie)==="[object Map]"}N.working=typeof Map<"u"&&N(new Map);function J(ie){return typeof Map>"u"?!1:N.working?N(ie):ie instanceof Map}e.isMap=J;function K(ie){return l(ie)==="[object Set]"}K.working=typeof Set<"u"&&K(new Set);function Y(ie){return typeof Set>"u"?!1:K.working?K(ie):ie instanceof Set}e.isSet=Y;function te(ie){return l(ie)==="[object WeakMap]"}te.working=typeof WeakMap<"u"&&te(new WeakMap);function oe(ie){return typeof WeakMap>"u"?!1:te.working?te(ie):ie instanceof WeakMap}e.isWeakMap=oe;function le(ie){return l(ie)==="[object WeakSet]"}le.working=typeof WeakSet<"u"&&le(new WeakSet);function ae(ie){return le(ie)}e.isWeakSet=ae;function ge(ie){return l(ie)==="[object ArrayBuffer]"}ge.working=typeof ArrayBuffer<"u"&&ge(new ArrayBuffer);function ce(ie){return typeof ArrayBuffer>"u"?!1:ge.working?ge(ie):ie instanceof ArrayBuffer}e.isArrayBuffer=ce;function q(ie){return l(ie)==="[object DataView]"}q.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&q(new DataView(new ArrayBuffer(1),0,1));function V(ie){return typeof DataView>"u"?!1:q.working?q(ie):ie instanceof DataView}e.isDataView=V;var re=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function de(ie){return l(ie)==="[object SharedArrayBuffer]"}function U(ie){return typeof re>"u"?!1:(typeof de.working>"u"&&(de.working=de(new re)),de.working?de(ie):ie instanceof re)}e.isSharedArrayBuffer=U;function z(ie){return l(ie)==="[object AsyncFunction]"}e.isAsyncFunction=z;function M(ie){return l(ie)==="[object Map Iterator]"}e.isMapIterator=M;function R(ie){return l(ie)==="[object Set Iterator]"}e.isSetIterator=R;function G(ie){return l(ie)==="[object Generator]"}e.isGeneratorObject=G;function A(ie){return l(ie)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=A;function T(ie){return g(ie,u)}e.isNumberObject=T;function Z(ie){return g(ie,f)}e.isStringObject=Z;function ne(ie){return g(ie,d)}e.isBooleanObject=ne;function pe(ie){return a&&g(ie,p)}e.isBigIntObject=pe;function me(ie){return s&&g(ie,h)}e.isSymbolObject=me;function xe(ie){return T(ie)||Z(ie)||ne(ie)||pe(ie)||me(ie)}e.isBoxedPrimitive=xe;function Ee(ie){return typeof Uint8Array<"u"&&(ce(ie)||U(ie))}e.isAnyArrayBuffer=Ee,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ie){Object.defineProperty(e,ie,{enumerable:!1,value:function(){throw new Error(ie+" is not supported in userland")}})})}}),MN=He({"node_modules/.pnpm/util@0.12.5/node_modules/util/support/isBufferBrowser.js"(e,t){t.exports=function(n){return n&&typeof n=="object"&&typeof n.copy=="function"&&typeof n.fill=="function"&&typeof n.readUInt8=="function"}}}),FN=He({"node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(e,t){typeof Object.create=="function"?t.exports=function(n,o){o&&(n.super_=o,n.prototype=Object.create(o.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(n,o){if(o){n.super_=o;var i=function(){};i.prototype=o.prototype,n.prototype=new i,n.prototype.constructor=n}}}}),Fb=He({"node_modules/.pnpm/util@0.12.5/node_modules/util/util.js"(e){var t=Object.getOwnPropertyDescriptors||function(V){for(var re=Object.keys(V),de={},U=0;U<re.length;U++)de[re[U]]=Object.getOwnPropertyDescriptor(V,re[U]);return de},r=/%[sdj%]/g;e.format=function(q){if(!P(q)){for(var V=[],re=0;re<arguments.length;re++)V.push(a(arguments[re]));return V.join(" ")}for(var re=1,de=arguments,U=de.length,z=String(q).replace(r,function(R){if(R==="%%")return"%";if(re>=U)return R;switch(R){case"%s":return String(de[re++]);case"%d":return Number(de[re++]);case"%j":try{return JSON.stringify(de[re++])}catch{return"[Circular]"}default:return R}}),M=de[re];re<U;M=de[++re])w(M)||!k(M)?z+=" "+M:z+=" "+a(M);return z},e.deprecate=function(q,V){if(typeof process<"u"&&process.noDeprecation===!0)return q;if(typeof process>"u")return function(){return e.deprecate(q,V).apply(this,arguments)};var re=!1;function de(){if(!re){if(process.throwDeprecation)throw new Error(V);process.traceDeprecation?console.trace(V):console.error(V),re=!0}return q.apply(this,arguments)}return de};var n={},o=/^$/;process.env.NODE_DEBUG&&(i=process.env.NODE_DEBUG,i=i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),o=new RegExp("^"+i+"$","i"));var i;e.debuglog=function(q){if(q=q.toUpperCase(),!n[q])if(o.test(q)){var V=process.pid;n[q]=function(){var re=e.format.apply(e,arguments);console.error("%s %d: %s",q,V,re)}}else n[q]=function(){};return n[q]};function a(q,V){var re={seen:[],stylize:l};return arguments.length>=3&&(re.depth=arguments[2]),arguments.length>=4&&(re.colors=arguments[3]),m(V)?re.showHidden=V:V&&e._extend(re,V),S(re.showHidden)&&(re.showHidden=!1),S(re.depth)&&(re.depth=2),S(re.colors)&&(re.colors=!1),S(re.customInspect)&&(re.customInspect=!0),re.colors&&(re.stylize=s),f(re,q,re.depth)}e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function s(q,V){var re=a.styles[V];return re?"\x1B["+a.colors[re][0]+"m"+q+"\x1B["+a.colors[re][1]+"m":q}function l(q,V){return q}function u(q){var V={};return q.forEach(function(re,de){V[re]=!0}),V}function f(q,V,re){if(q.customInspect&&V&&N(V.inspect)&&V.inspect!==e.inspect&&!(V.constructor&&V.constructor.prototype===V)){var de=V.inspect(re,q);return P(de)||(de=f(q,de,re)),de}var U=d(q,V);if(U)return U;var z=Object.keys(V),M=u(z);if(q.showHidden&&(z=Object.getOwnPropertyNames(V)),D(V)&&(z.indexOf("message")>=0||z.indexOf("description")>=0))return p(V);if(z.length===0){if(N(V)){var R=V.name?": "+V.name:"";return q.stylize("[Function"+R+"]","special")}if(O(V))return q.stylize(RegExp.prototype.toString.call(V),"regexp");if(j(V))return q.stylize(Date.prototype.toString.call(V),"date");if(D(V))return p(V)}var G="",A=!1,T=["{","}"];if(y(V)&&(A=!0,T=["[","]"]),N(V)){var Z=V.name?": "+V.name:"";G=" [Function"+Z+"]"}if(O(V)&&(G=" "+RegExp.prototype.toString.call(V)),j(V)&&(G=" "+Date.prototype.toUTCString.call(V)),D(V)&&(G=" "+p(V)),z.length===0&&(!A||V.length==0))return T[0]+G+T[1];if(re<0)return O(V)?q.stylize(RegExp.prototype.toString.call(V),"regexp"):q.stylize("[Object]","special");q.seen.push(V);var ne;return A?ne=h(q,V,re,M,z):ne=z.map(function(pe){return g(q,V,re,M,pe,A)}),q.seen.pop(),v(ne,G,T)}function d(q,V){if(S(V))return q.stylize("undefined","undefined");if(P(V)){var re="'"+JSON.stringify(V).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return q.stylize(re,"string")}if(x(V))return q.stylize(""+V,"number");if(m(V))return q.stylize(""+V,"boolean");if(w(V))return q.stylize("null","null")}function p(q){return"["+Error.prototype.toString.call(q)+"]"}function h(q,V,re,de,U){for(var z=[],M=0,R=V.length;M<R;++M)le(V,String(M))?z.push(g(q,V,re,de,String(M),!0)):z.push("");return U.forEach(function(G){G.match(/^\d+$/)||z.push(g(q,V,re,de,G,!0))}),z}function g(q,V,re,de,U,z){var M,R,G;if(G=Object.getOwnPropertyDescriptor(V,U)||{value:V[U]},G.get?G.set?R=q.stylize("[Getter/Setter]","special"):R=q.stylize("[Getter]","special"):G.set&&(R=q.stylize("[Setter]","special")),le(de,U)||(M="["+U+"]"),R||(q.seen.indexOf(G.value)<0?(w(re)?R=f(q,G.value,null):R=f(q,G.value,re-1),R.indexOf(`
|
|
92
|
-
`)>-1&&(
|
|
93
|
-
`).map(function(
|
|
91
|
+
*/const BO=500;let $v=0,RO=class{constructor(){this.__keyborgCoreRefs={},this._isNavigatingWithKeyboard=!1}add(t){const r=t.id;r in this.__keyborgCoreRefs||(this.__keyborgCoreRefs[r]=new Sv(t))}remove(t){delete this.__keyborgCoreRefs[t],Object.keys(this.__keyborgCoreRefs).length===0&&(this._isNavigatingWithKeyboard=!1)}setVal(t){if(this._isNavigatingWithKeyboard!==t){this._isNavigatingWithKeyboard=t;for(const r of Object.keys(this.__keyborgCoreRefs)){const o=this.__keyborgCoreRefs[r].deref();o?o.update(t):this.remove(r)}}}getVal(){return this._isNavigatingWithKeyboard}};const Lr=new RO;let UO=class{constructor(t,r){this._isMouseUsed=!1,this._onFocusIn=o=>{if(this._isMouseUsed){this._isMouseUsed=!1;return}if(Lr.getVal())return;const i=o.details;i.relatedTarget&&(i.isFocusedProgrammatically||i.isFocusedProgrammatically===void 0||Lr.setVal(!0))},this._onMouseDown=o=>{o.buttons===0||o.clientX===0&&o.clientY===0&&o.screenX===0&&o.screenY===0||(this._isMouseUsed=!0,Lr.setVal(!1))},this._onKeyDown=o=>{var i;const a=Lr.getVal(),s=o.keyCode,l=this._triggerKeys;!a&&(!l||l.has(s))?Lr.setVal(!0):a&&(!((i=this._dismissKeys)===null||i===void 0)&&i.has(s))&&this._scheduleDismiss()},this.id="c"+ ++$v,this._win=t;const n=t.document;if(r){const o=r.triggerKeys,i=r.dismissKeys;o!=null&&o.length&&(this._triggerKeys=new Set(o)),i!=null&&i.length&&(this._dismissKeys=new Set(i))}n.addEventListener(zc,this._onFocusIn,!0),n.addEventListener("mousedown",this._onMouseDown,!0),t.addEventListener("keydown",this._onKeyDown,!0),FO(t),Lr.add(this)}dispose(){const t=this._win;if(t){this._dismissTimer&&(t.clearTimeout(this._dismissTimer),this._dismissTimer=void 0),jO(t);const r=t.document;r.removeEventListener(zc,this._onFocusIn,!0),r.removeEventListener("mousedown",this._onMouseDown,!0),t.removeEventListener("keydown",this._onKeyDown,!0),delete this._win,Lr.remove(this.id)}}isDisposed(){return!!this._win}update(t){var r,n;const o=(n=(r=this._win)===null||r===void 0?void 0:r.__keyborg)===null||n===void 0?void 0:n.refs;if(o)for(const i of Object.keys(o))Cv.update(o[i],t)}_scheduleDismiss(){const t=this._win;if(t){this._dismissTimer&&(t.clearTimeout(this._dismissTimer),this._dismissTimer=void 0);const r=t.document.activeElement;this._dismissTimer=t.setTimeout(()=>{this._dismissTimer=void 0;const n=t.document.activeElement;r&&n&&r===n&&Lr.setVal(!1)},BO)}}},Cv=class iw{constructor(t,r){this._cb=[],this._id="k"+ ++$v,this._win=t;const n=t.__keyborg;n?(this._core=n.core,n.refs[this._id]=this):(this._core=new UO(t,r),t.__keyborg={core:this._core,refs:{[this._id]:this}})}static create(t,r){return new iw(t,r)}static dispose(t){t.dispose()}static update(t,r){t._cb.forEach(n=>n(r))}dispose(){var t;const r=(t=this._win)===null||t===void 0?void 0:t.__keyborg;r!=null&&r.refs[this._id]?(delete r.refs[this._id],Object.keys(r.refs).length===0&&(r.core.dispose(),delete this._win.__keyborg)):process.env.NODE_ENV==="development"&&console.error("Keyborg instance "+this._id+" is being disposed incorrectly."),this._cb=[],delete this._core,delete this._win}isNavigatingWithKeyboard(){return Lr.getVal()}subscribe(t){this._cb.push(t)}unsubscribe(t){const r=this._cb.indexOf(t);r>=0&&this._cb.splice(r,1)}setVal(t){Lr.setVal(t)}};function WO(e,t){return Cv.create(e,t)}var Mr=e=>{const{density:t}=c.useContext(Vv);return e??t},zn=e=>{const{elevation:t}=c.useContext(Dv);return e??t},Av="en-US",gs="dxos-common",Ov=__,VO={[Av]:{[gs]:{"loading translations":"Loading translations…"}}};jt.use(xw).init({resources:VO,lng:Av,defaultNS:gs,interpolation:{escapeValue:!1}});var Tv=c.createContext({appNs:gs,dtLocale:Ov}),tt=(...e)=>{const t=Nw(...e),{dtLocale:r}=c.useContext(Tv);return{...t,dtLocale:r}},HO=({fallback:e,resourceExtensions:t,children:r,appNs:n,dtLocale:o})=>{const[i,a]=c.useState(!1);return c.useEffect(()=>{a(!1),t&&t.length&&t.forEach(s=>{Object.keys(s).forEach(l=>{Object.keys(s[l]).forEach(u=>{jt.addResourceBundle(l,u,s[l][u])})})}),a(!0)},[t]),c.createElement(Tv.Provider,{value:{appNs:n??gs,dtLocale:o??Ov}},c.createElement(c.Suspense,{fallback:e},i?r:e))},Ae=()=>c.useContext(em),zO=e=>{const[t,r]=c.useState(null),[n,o]=c.useState(null);return c.useEffect(()=>{var a;const i=()=>{window.visualViewport&&(r(window.visualViewport.width),o(window.visualViewport.height))};return(a=window.visualViewport)==null||a.addEventListener("resize",i),i(),()=>{var s;return(s=window.visualViewport)==null?void 0:s.removeEventListener("resize",i)}},e??[]),{width:t,height:n}},GO="Avatar",[KO,Gn]=ho(GO),qO=({size:e=10,variant:t="circle",status:r,animation:n,children:o,labelId:i,descriptionId:a,maskId:s,inGroup:l,color:u})=>{const f=Et("avatar__label",i),d=Et("avatar__description",a),p=Et("avatar__mask",s);return c.createElement(KO,{labelId:f,descriptionId:d,maskId:p,size:e,variant:t,status:r,animation:n,inGroup:l,color:u},o)},Iv="0.25rem",YO=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{size:o,variant:i,labelId:a,descriptionId:s,maskId:l,inGroup:u,status:f,animation:d,color:p}=Gn("AvatarFrame"),{tx:h}=Ae(),g=o==="px"?1:Number(o),v=g*4,b=g>4?2:(g>3,1),m=g>12?3:g>4?2:g>3?1:0,w=v/2-m-b;return c.createElement(vE,{role:"img",...r,className:h("avatar.root","avatar",{size:o,variant:i,inGroup:u},e),ref:n,...!u&&{"aria-labelledby":a,"aria-describedby":s}},c.createElement("svg",{viewBox:`0 0 ${v} ${v}`,width:v,height:v,className:h("avatar.frame","avatar__frame",{variant:i})},c.createElement("defs",null,c.createElement("mask",{id:l},i==="circle"?c.createElement("circle",{fill:"white",cx:"50%",cy:"50%",r:w}):c.createElement("rect",{fill:"white",width:2*w,height:2*w,x:m+b,y:m+b,rx:Iv}))),i==="circle"?c.createElement("circle",{className:`avatarFrameFill${p?"":" fill-[var(--surface-bg)]"}`,cx:"50%",cy:"50%",r:w,...p?{fill:p}:{}}):c.createElement("rect",{className:"avatarFrameFill fill-[var(--surface-bg)]",x:m+b,y:m+b,width:2*w,height:2*w,rx:Iv}),t),c.createElement("span",{role:"none",className:h("avatar.ring","avatar__ring",{size:o,variant:i,status:f,animation:d}),style:{borderWidth:b+"px"}}))}),JO=c.forwardRef(({asChild:e,srOnly:t,classNames:r,...n},o)=>{const i=e?St:Ge.span,{tx:a}=Ae(),{labelId:s}=Gn("AvatarLabel");return c.createElement(i,{...n,id:s,ref:o,className:a("avatar.label","avatar__label",{srOnly:t},r)})}),XO=c.forwardRef(({asChild:e,srOnly:t,classNames:r,...n},o)=>{const i=e?St:Ge.span,{tx:a}=Ae(),{descriptionId:s}=Gn("AvatarDescription");return c.createElement(i,{...n,id:s,ref:o,className:a("avatar.description","avatar__description",{srOnly:t},r)})}),Pv=c.forwardRef((e,t)=>{const{maskId:r}=Gn("AvatarFallback");return c.createElement("image",{width:"100%",height:"100%",...e,mask:`url(#${r})`,ref:t,preserveAspectRatio:"xMidYMid slice"})}),ZO=e=>{const{maskId:t,size:r}=Gn("AvatarFallback"),{large:n}=e,o=(n?4:3)*(1/1.612),{tx:i}=Ae();return c.createElement("text",{x:"50%",y:"50%",className:i("avatar.fallbackText","avatar__fallback-text"),textAnchor:"middle",alignmentBaseline:"central",fontSize:r==="px"?"200%":r*o,mask:`url(#${t})`},e.children)},QO=c.forwardRef(({onLoadingStatusChange:e,...t},r)=>{const{size:n}=Gn("AvatarImage");return(n==="px"?1:n*4)<=20?null:c.createElement(Op,{asChild:!0},c.createElement(Pv,{...t,ref:r}))}),eT=c.forwardRef(({delayMs:e,text:t,...r},n)=>{const o=!!(t&&/[0-9a-zA-Z]+/.test(t)),{size:i}=Gn("AvatarFallback"),a=i==="px"?1:Number(i);return c.createElement(Op,{delayMs:e,asChild:!0},c.createElement(c.Fragment,null,a>=6&&c.createElement(Pv,{...r,ref:n}),t&&c.createElement(ZO,{large:!o},t.toLocaleUpperCase())))}),tT=(e,t)=>`data:image/svg+xml;utf8,${encodeURIComponent(LE(e,t==="px"?1:t*4,{padding:0}))}`,vs=(e,t)=>c.useMemo(()=>tT(e,t),[e]),Tt={Root:qO,Frame:YO,Image:QO,Fallback:eT,Label:JO,Description:XO},kv="ButtonGroup",Nv="Button",[rT,nT]=ho(kv,{inGroup:!1}),yr=c.forwardRef(({classNames:e,children:t,density:r,elevation:n,variant:o="default",asChild:i,...a},s)=>{const{inGroup:l}=nT(Nv),{tx:u}=Ae(),f=zn(n),d=Mr(r),p=i?St:Ge.button;return c.createElement(p,{ref:s,...a,className:u("button.root","button",{variant:o,inGroup:l,disabled:a.disabled,density:d,elevation:f},e),...a.disabled&&{disabled:!0}},t)});yr.displayName=Nv;var oT=c.forwardRef(({children:e,elevation:t,classNames:r,asChild:n,...o},i)=>{const{tx:a}=Ae(),s=zn(t),l=n?St:Ge.div;return c.createElement(l,{role:"none",...o,className:a("button.group","button-group",{elevation:s},r),ref:i},c.createElement(rT,{inGroup:!0},e))});oT.displayName=kv;var Dv=c.createContext({elevation:"base"}),ji=({elevation:e,children:t})=>c.createElement(Dv.Provider,{value:{elevation:e}},t),iT=uc,aT=sh,sT=uh,lT=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(ac,{...r,className:o("dialog.title","dialog__title",{srOnly:t},e),ref:n})}),cT=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(sc,{...r,className:o("dialog.description","dialog__description",{srOnly:t},e),ref:n})}),uT=lc,Lv="DialogOverlay",Mv="DialogContent",[fT,dT]=ho(Lv,{inOverlayLayout:!1}),Fv=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(fh,{...r,className:o("dialog.overlay","dialog__overlay",{},e),ref:n},c.createElement(fT,{inOverlayLayout:!0},t))});Fv.displayName=Lv;var jv=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae(),{inOverlayLayout:i}=dT(Mv);return c.createElement(Wa,{...r,className:o("dialog.content","dialog",{inOverlayLayout:i},e),ref:n},c.createElement(ji,{elevation:"chrome"},t))});jv.displayName=Mv;var Fr={Root:iT,Trigger:aT,Portal:sT,Overlay:Fv,Content:jv,Title:lT,Description:cT,Close:uT},pT=v2,hT=o2,gT=i2,vT=g2,mT=p2,bT=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(f2,{...r,className:o("dialog.title","dialog--alert__title",{srOnly:t},e),ref:n})}),yT=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(d2,{...r,className:o("dialog.description","dialog--alert__description",{srOnly:t},e),ref:n})}),Bv="AlertDialogOverlay",Rv="AlertDialogContent",[wT,_T]=ho(Bv,{inOverlayLayout:!1}),Uv=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(a2,{...r,className:o("dialog.overlay","dialog--alert__overlay",{},e),ref:n},c.createElement(wT,{inOverlayLayout:!0},t))});Uv.displayName=Bv;var Wv=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae(),{inOverlayLayout:i}=_T(Rv);return c.createElement(c2,{...r,className:o("dialog.content","dialog--alert",{inOverlayLayout:i},e),ref:n},c.createElement(ji,{elevation:"chrome"},t))});Wv.displayName=Rv;var $o={Root:pT,Trigger:hT,Portal:gT,Overlay:Uv,Content:Wv,Title:bT,Description:yT,Cancel:vT,Action:mT},ET=E$,xT=L$,ST=M$,$T=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(F$,{sideOffset:4,collisionPadding:8,...r,className:o("menu.content","menu",{},e),ref:n},c.createElement(ji,{elevation:"chrome"},t))}),CT=c.forwardRef(({classNames:e,asChild:t,children:r,...n},o)=>{const{tx:i}=Ae(),a=t?St:Ge.div;return c.createElement(a,{...n,className:i("menu.viewport","menu__viewport",{},e),ref:o},r)}),AT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(H$,{...t,className:n("menu.arrow","menu__arrow",{},e),ref:r})}),OT=j$,TT=W$,IT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(R$,{...t,className:n("menu.item","menu__item",{},e),ref:r})}),PT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(U$,{...t,className:n("menu.item","menu__item--checkbox",{},e),ref:r})}),kT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(V$,{...t,className:n("menu.separator","menu__item",{},e),ref:r})}),NT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(B$,{...t,className:n("menu.groupLabel","menu__group__label",{},e),ref:r})}),Kn={Root:ET,Trigger:xT,Portal:ST,Content:$T,Viewport:CT,Arrow:AT,Group:OT,Item:IT,CheckboxItem:PT,ItemIndicator:TT,Separator:kT,GroupLabel:NT},DT=c.forwardRef(({srOnly:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Ae();return c.createElement(PC,{...n,className:i("input.label","input__label",{srOnly:e},t),ref:o},r)}),LT=c.forwardRef(({srOnly:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Ae();return c.createElement(kC,{...n,className:i("input.description","input__description",{srOnly:e},t),ref:o},r)}),MT=c.forwardRef(({__inputScope:e,srOnly:t,classNames:r,children:n,...o},i)=>{const{tx:a}=Ae(),{validationValence:s}=or(Bt,e);return c.createElement(DC,{...o,className:a("input.validation",`input__validation-message input__validation-message--${s}`,{srOnly:t,validationValence:s},r),ref:i},n)}),FT=c.forwardRef(({srOnly:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Ae();return c.createElement(LC,{...n,className:i("input.descriptionAndValidation","input__description-and-validation",{srOnly:e},t),ref:o},r)}),jT=c.forwardRef(({density:e,elevation:t,segmentClassName:r,inputClassName:n,variant:o,...i},a)=>{const{hasIosKeyboard:s}=Ae(),{tx:l}=Ae(),u=Mr(e),f=zn(t),d=c.useCallback(({focused:p,validationValence:h})=>l("input.input","input--pin-segment",{variant:"static",focused:p,disabled:i.disabled,density:u,elevation:f,validationValence:h},r),[l,i.disabled,f,t,u]);return c.createElement(MC,{...i,segmentClassName:d,...i.autoFocus&&!s&&{autoFocus:!0},inputClassName:l("input.inputWithSegments","input input--pin",{disabled:i.disabled},n),ref:a})}),BT=c.forwardRef(({__inputScope:e,classNames:t,density:r,elevation:n,variant:o,...i},a)=>{const{hasIosKeyboard:s}=Ae(),l=Ae(),u=Mr(r),f=zn(n),{validationValence:d}=or(Bt,e),{tx:p}=l;return c.createElement(FC,{...i,className:p("input.input","input",{variant:o,disabled:i.disabled,density:u,elevation:f,validationValence:d},t),...i.autoFocus&&!s&&{autoFocus:!0},ref:a})}),RT=c.forwardRef(({__inputScope:e,classNames:t,density:r,elevation:n,variant:o,...i},a)=>{const{hasIosKeyboard:s}=Ae(),{tx:l}=Ae(),u=Mr(r),f=zn(n),{validationValence:d}=or(Bt,e);return c.createElement(jC,{...i,className:l("input.input","input--text-area",{variant:o,disabled:i.disabled,density:u,elevation:f,validationValence:d},t),...i.autoFocus&&!s&&{autoFocus:!0},ref:a})}),UT=c.forwardRef(({__inputScope:e,checked:t,defaultChecked:r,onCheckedChange:n,size:o,weight:i="bold",classNames:a,...s},l)=>{const[u,f]=qr({prop:t,defaultProp:r,onChange:n}),{id:d,validationValence:p,descriptionId:h,errorMessageId:g}=or(Bt,e),{tx:v}=Ae(),b=u==="indeterminate"?ze.Minus:u?ze.Check:c.Fragment;return c.createElement(Q$,{...s,checked:u,onCheckedChange:f,id:d,"aria-describedby":h,...p==="error"&&{"aria-invalid":"true","aria-errormessage":g},className:v("input.checkbox","input--checkbox",{size:o},"shrink-0",a),ref:l},c.createElement(eC,{asChild:!0},c.createElement(b,u&&{weight:i,className:v("input.checkboxIndicator","input--checkbox__indicator",{size:o})})))}),WT=c.forwardRef(({__inputScope:e,checked:t,defaultChecked:r,onCheckedChange:n,size:o=5,classNames:i,...a},s)=>{const{tx:l}=Ae(),[u,f]=qr({prop:t,defaultProp:r,onChange:n}),{id:d,validationValence:p,descriptionId:h,errorMessageId:g}=or(Bt,e);return c.createElement(cC,{...a,checked:u,onCheckedChange:f,id:d,"aria-describedby":h,...p==="error"&&{"aria-invalid":"true","aria-errormessage":g},className:l("input.switch","input--switch",{size:o},i),ref:s},c.createElement(uC,{className:l("input.switchThumb","input--switch__thumb",{size:o})}))}),jr={Root:Dg,PinInput:jT,TextInput:BT,TextArea:RT,Checkbox:UT,Switch:WT,Label:DT,Description:LT,Validation:MT,DescriptionAndValidation:FT},Vv=c.createContext({density:"coarse"}),Co=({density:e,children:t})=>c.createElement(Vv.Provider,{value:{density:e}},t),Kc=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae(),i=Mr(r.density);return c.createElement(Co,{density:i},c.createElement(Fg,{...r,className:o("list.root","list",{},e),ref:n},t))}),VT=c.forwardRef(({children:e,classNames:t,asChild:r,...n},o)=>{const i=r?St:"div",a=Mr(),{tx:s}=Ae();return c.createElement(i,{...!r&&{role:"none"},...n,className:s("list.item.endcap","list__listItem__endcap",{density:a},t),ref:o},e)}),HT=({classNames:e,...t})=>{const r=Mr(),{tx:n}=Ae();return c.createElement("div",{role:"none",...t,className:n("list.item.openTrigger","list__listItem__openTrigger--mock",{density:r},e)})},zT=c.forwardRef(({children:e,classNames:t,...r},n)=>{const{tx:o}=Ae(),i=Mr();return c.createElement(eA,{...r,className:o("list.item.heading","list__listItem__heading",{density:i},t),ref:n},e)}),GT=c.forwardRef(({__listItemScope:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Ae(),a=Mr(),{open:s}=jg(Pi,e),l=s?ze.CaretDown:ze.CaretRight;return c.createElement(tA,{...n,className:i("list.item.openTrigger","list__listItem__openTrigger",{density:a},t),ref:o},r||c.createElement(l,{weight:"bold",className:i("list.item.openTriggerIcon","list__listItem__openTrigger__icon",{})}))}),KT=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae(),i=Mr();return c.createElement(Bg,{...r,className:o("list.item.root","list__listItem",{density:i,collapsible:r.collapsible},e),ref:n},t)}),qc={Root:KT,Endcap:VT,Heading:zT,OpenTrigger:GT,CollapsibleContent:rA,MockOpenTrigger:HT},Hv;(function(e){e[e.IDLE=0]="IDLE",e[e.DEBOUNCING=1]="DEBOUNCING",e[e.FOLLOWING=2]="FOLLOWING"})(Hv||(Hv={}));var qT=(e,{onDismiss:t,dismissThreshold:r=64,debounceThreshold:n=8,offset:o=0})=>{const i=e.current,[a,s]=c.useState(0),[l,u]=c.useState(0),f=c.useCallback(()=>{s(0),i==null||i.style.removeProperty("inset-inline-start"),i==null||i.style.setProperty("transition-duration","200ms")},[i]),d=c.useCallback(()=>{s(2),i==null||i.style.setProperty("transition-duration","0ms")},[i]),p=c.useCallback(({screenX:v})=>{a===0&&(s(1),u(v))},[a]),h=c.useCallback(({screenX:v})=>{if(i){const b=Math.min(v-l,0);switch(a){case 2:Math.abs(b)>r?(f(),t==null||t()):i.style.setProperty("inset-inline-start",`${o+b}px`);break;case 1:Math.abs(b)>n&&d();break}}},[i,a,l]),g=c.useCallback(()=>{f()},[f]);c.useEffect(()=>(i==null||i.addEventListener("pointerdown",p),()=>{i==null||i.removeEventListener("pointerdown",p)}),[i,p]),c.useEffect(()=>(i&&document.documentElement.addEventListener("pointermove",h),()=>{document.documentElement.removeEventListener("pointermove",h)}),[i,h]),c.useEffect(()=>(i&&document.documentElement.addEventListener("pointerup",g),()=>{document.documentElement.removeEventListener("pointerup",g)}),[i,g])},Yc="NavigationSidebar",Jc="Main",[qj,zv]=ho(Jc,{navigationSidebarOpen:!1,setNavigationSidebarOpen:e=>{console.warn("Attempt to set sidebar state without initializing `MainRoot`")},complementarySidebarOpen:!1,setComplementarySidebarOpen:e=>{console.warn("Attempt to set sidebar state without initializing `MainRoot`")}}),YT=e=>{!document.body.hasAttribute("data-is-keyboard")&&e.preventDefault()},JT=c.forwardRef(({classNames:e,children:t,swipeToDismiss:r,onOpenAutoFocus:n,open:o,setOpen:i,side:a,...s},l)=>{const[u]=rp("lg",{ssr:!1}),{tx:f}=Ae(),d=Bl(l),p=c.useRef(null);qT(r?d:p,{onDismiss:()=>i(!1)});const h=u?Ge.div:Wa;return c.createElement(uc,{open:o,modal:!1},c.createElement(h,{...!u&&{forceMount:!0,tabIndex:-1,onOpenAutoFocus:n??YT},...s,className:f("main.sidebar","main__sidebar",{isLg:u,[a==="inline-end"?"inlineEndSidebarOpen":"inlineStartSidebarOpen"]:o,side:a},e),...!o&&{inert:"true"},ref:d},c.createElement(ji,{elevation:"group"},t)))}),Gv=c.forwardRef((e,t)=>{const{navigationSidebarOpen:r,setNavigationSidebarOpen:n}=zv(Yc);return c.createElement(JT,{...e,open:r,setOpen:n,side:"inline-start",ref:t})});Gv.displayName=Yc,Gv.displayName=Yc;var XT=c.forwardRef(({asChild:e,classNames:t,bounce:r,children:n,...o},i)=>{const[a]=rp("lg",{ssr:!1}),{navigationSidebarOpen:s,complementarySidebarOpen:l}=zv(Jc),{tx:u}=Ae(),f=e?St:"main";return c.createElement(f,{...o,className:u("main.content","main",{isLg:a,inlineStartSidebarOpen:s,inlineEndSidebarOpen:l,bounce:r},t),ref:i},n)});XT.displayName=Jc;var Kv="Message",[ZT,qv]=ho(Kv),Yv=c.forwardRef(({asChild:e,valence:t,elevation:r,className:n,titleId:o,descriptionId:i,children:a,...s},l)=>{const{tx:u}=Ae(),f=Et("message__title",o),d=Et("message__description",i),p=zn(r),h=e?St:Ge.div;return c.createElement(ZT,{titleId:f,descriptionId:d},c.createElement(h,{...s,className:u("message.root","message",{valence:t,elevation:p},n),"aria-labelledby":f,"aria-describedby":d,ref:l},a))});Yv.displayName=Kv;var Jv="MessageTitle",Xv=c.forwardRef(({asChild:e,className:t,children:r,...n},o)=>{const{tx:i}=Ae(),{titleId:a}=qv(Jv),s=e?St:Ge.h2;return c.createElement(s,{...n,className:i("message.title","message__title",{},t),id:a,ref:o},r)});Xv.displayName=Jv;var Zv="MessageBody",Qv=c.forwardRef(({asChild:e,className:t,children:r,...n},o)=>{const{tx:i}=Ae(),{descriptionId:a}=qv(Zv),s=e?St:Ge.p;return c.createElement(s,{...n,className:i("message.body","message__body",{},t),id:a,ref:o},r)});Qv.displayName=Zv;var Xc={Root:Yv,Title:Xv,Body:Qv},QT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(_A,{...t,className:n("scrollArea.root","scroll-area",{},e),ref:r})}),e5=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(EA,{...t,className:n("scrollArea.viewport","scroll-area",{},e),ref:r})}),t5=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(xA,{...t,className:n("scrollArea.scrollbar","scroll-area__scrollbar",{},e),ref:r})}),r5=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(SA,{...t,className:n("scrollArea.thumb","scroll-area__thumb",{},e),ref:r})}),n5=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement($A,{...t,className:n("scrollArea.corner","scroll-area__corner",{},e),ref:r})}),ms={Root:QT,Viewport:e5,Scrollbar:t5,Thumb:r5,Corner:n5},o5=NO,i5=DO,a5=_O,s5=bO,l5=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(AO,{...t,className:n("tooltip.arrow","tooltip__arrow",{},e),ref:r})}),c5=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(EO,{sideOffset:4,collisionPadding:8,...t,className:n("tooltip.content","tooltip",{},e),ref:r})}),wr={Provider:o5,Root:i5,Portal:a5,Trigger:s5,Arrow:l5,Content:c5},u5=()=>!!navigator.userAgent.match(/iP(ad|od|hone).+Safari/),em=c.createContext({tx:(e,t,r,...n)=>t,themeMode:"dark",hasIosKeyboard:!1}),tm=e=>{e?document.body.setAttribute("data-is-keyboard","true"):document.body.removeAttribute("data-is-keyboard")},f5=({children:e,fallback:t=null,resourceExtensions:r,appNs:n,tx:o=(l,u,f,...d)=>u,themeMode:i="dark",rootElevation:a="base",rootDensity:s="coarse"})=>(c.useEffect(()=>{if(document.defaultView){const l=WO(document.defaultView);return l.subscribe(tm),()=>l.unsubscribe(tm)}},[]),c.createElement(em.Provider,{value:{tx:o,themeMode:i,hasIosKeyboard:u5()}},c.createElement(HO,{fallback:t,resourceExtensions:r,appNs:n},c.createElement(ji,{elevation:a},c.createElement(Co,{density:s},e))))),d5={aqua:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,azure:/#f0ffff(ff)?(?!\w)/gi,beige:/#f5f5dc(ff)?(?!\w)/gi,bisque:/#ffe4c4(ff)?(?!\w)/gi,black:/#000000(ff)?(?!\w)|#000(f)?(?!\w)/gi,blue:/#0000ff(ff)?(?!\w)|#00f(f)?(?!\w)/gi,brown:/#a52a2a(ff)?(?!\w)/gi,coral:/#ff7f50(ff)?(?!\w)/gi,cornsilk:/#fff8dc(ff)?(?!\w)/gi,crimson:/#dc143c(ff)?(?!\w)/gi,cyan:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,darkblue:/#00008b(ff)?(?!\w)/gi,darkcyan:/#008b8b(ff)?(?!\w)/gi,darkgrey:/#a9a9a9(ff)?(?!\w)/gi,darkred:/#8b0000(ff)?(?!\w)/gi,deeppink:/#ff1493(ff)?(?!\w)/gi,dimgrey:/#696969(ff)?(?!\w)/gi,gold:/#ffd700(ff)?(?!\w)/gi,green:/#008000(ff)?(?!\w)/gi,grey:/#808080(ff)?(?!\w)/gi,honeydew:/#f0fff0(ff)?(?!\w)/gi,hotpink:/#ff69b4(ff)?(?!\w)/gi,indigo:/#4b0082(ff)?(?!\w)/gi,ivory:/#fffff0(ff)?(?!\w)/gi,khaki:/#f0e68c(ff)?(?!\w)/gi,lavender:/#e6e6fa(ff)?(?!\w)/gi,lime:/#00ff00(ff)?(?!\w)|#0f0(f)?(?!\w)/gi,linen:/#faf0e6(ff)?(?!\w)/gi,maroon:/#800000(ff)?(?!\w)/gi,moccasin:/#ffe4b5(ff)?(?!\w)/gi,navy:/#000080(ff)?(?!\w)/gi,oldlace:/#fdf5e6(ff)?(?!\w)/gi,olive:/#808000(ff)?(?!\w)/gi,orange:/#ffa500(ff)?(?!\w)/gi,orchid:/#da70d6(ff)?(?!\w)/gi,peru:/#cd853f(ff)?(?!\w)/gi,pink:/#ffc0cb(ff)?(?!\w)/gi,plum:/#dda0dd(ff)?(?!\w)/gi,purple:/#800080(ff)?(?!\w)/gi,red:/#ff0000(ff)?(?!\w)|#f00(f)?(?!\w)/gi,salmon:/#fa8072(ff)?(?!\w)/gi,seagreen:/#2e8b57(ff)?(?!\w)/gi,seashell:/#fff5ee(ff)?(?!\w)/gi,sienna:/#a0522d(ff)?(?!\w)/gi,silver:/#c0c0c0(ff)?(?!\w)/gi,skyblue:/#87ceeb(ff)?(?!\w)/gi,snow:/#fffafa(ff)?(?!\w)/gi,tan:/#d2b48c(ff)?(?!\w)/gi,teal:/#008080(ff)?(?!\w)/gi,thistle:/#d8bfd8(ff)?(?!\w)/gi,tomato:/#ff6347(ff)?(?!\w)/gi,violet:/#ee82ee(ff)?(?!\w)/gi,wheat:/#f5deb3(ff)?(?!\w)/gi,white:/#ffffff(ff)?(?!\w)|#fff(f)?(?!\w)/gi},Zc=d5,Qc={whitespace:/\s+/g,urlHexPairs:/%[\dA-F]{2}/g,quotes:/"/g};function p5(e){return e.trim().replace(Qc.whitespace," ")}function h5(e){return encodeURIComponent(e).replace(Qc.urlHexPairs,v5)}function g5(e){return Object.keys(Zc).forEach(function(t){Zc[t].test(e)&&(e=e.replace(Zc[t],t))}),e}function v5(e){switch(e){case"%20":return" ";case"%3D":return"=";case"%3A":return":";case"%2F":return"/";default:return e.toLowerCase()}}function eu(e){if(typeof e!="string")throw new TypeError("Expected a string, but received "+typeof e);e.charCodeAt(0)===65279&&(e=e.slice(1));var t=g5(p5(e)).replace(Qc.quotes,"'");return"data:image/svg+xml,"+h5(t)}eu.toSrcset=function(t){return eu(t).replace(/ /g,"%20")};var m5=eu,rm={},nm={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r}});function t(n,o){return{handler:n,config:o}}t.withOptions=function(n,o=()=>({})){const i=function(a){return{__options:a,handler:n(a),config:o(a)}};return i.__isOptionsFunction=!0,i.__pluginFunction=n,i.__configFunction=o,i};const r=t})(nm),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});const t=r(nm);function r(o){return o&&o.__esModule?o:{default:o}}const n=t.default}(rm);let tu=rm;var ru=(tu.__esModule?tu:{default:tu}).default;const b5=un(ru);var om={},im={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"cloneDeep",{enumerable:!0,get:function(){return t}});function t(r){return Array.isArray(r)?r.map(n=>t(n)):typeof r=="object"&&r!==null?Object.fromEntries(Object.entries(r).map(([n,o])=>[n,t(o)])):r}})(im);var y5={content:[],presets:[],darkMode:"media",theme:{accentColor:({theme:e})=>({...e("colors"),auto:"auto"}),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9"},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>e("brightness"),backdropContrast:({theme:e})=>e("contrast"),backdropGrayscale:({theme:e})=>e("grayscale"),backdropHueRotate:({theme:e})=>e("hueRotate"),backdropInvert:({theme:e})=>e("invert"),backdropOpacity:({theme:e})=>e("opacity"),backdropSaturate:({theme:e})=>e("saturate"),backdropSepia:({theme:e})=>e("sepia"),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({...e("colors"),DEFAULT:e("colors.gray.200","currentColor")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>({...e("spacing")}),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px"},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"},caretColor:({theme:e})=>e("colors"),colors:({colors:e})=>({inherit:e.inherit,current:e.current,transparent:e.transparent,black:e.black,white:e.white,slate:e.slate,gray:e.gray,zinc:e.zinc,neutral:e.neutral,stone:e.stone,red:e.red,orange:e.orange,amber:e.amber,yellow:e.yellow,lime:e.lime,green:e.green,emerald:e.emerald,teal:e.teal,cyan:e.cyan,sky:e.sky,blue:e.blue,indigo:e.indigo,violet:e.violet,purple:e.purple,fuchsia:e.fuchsia,pink:e.pink,rose:e.rose}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2"},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>e("borderWidth"),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>({none:"none",...e("colors")}),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%"}),flexGrow:{0:"0",DEFAULT:"1"},flexShrink:{0:"0",DEFAULT:"1"},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%"},grayscale:{0:"0",DEFAULT:"100%"},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},height:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},inset:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),invert:{0:"0",DEFAULT:"100%"},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6"},maxHeight:({theme:e})=>({...e("spacing"),none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),maxWidth:({theme:e,breakpoints:t})=>({...e("spacing"),none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...t(e("screens"))}),minHeight:({theme:e})=>({...e("spacing"),full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),minWidth:({theme:e})=>({...e("spacing"),full:"100%",min:"min-content",max:"max-content",fit:"fit-content"}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1"},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:e("colors.blue.500","#3b82f6"),...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg"},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2"},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"},screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},scrollMargin:({theme:e})=>({...e("spacing")}),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg"},space:({theme:e})=>({...e("spacing")}),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2"},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},textIndent:({theme:e})=>({...e("spacing")}),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),size:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"}),width:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content"}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50"}},plugins:[]};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o}});const t=im,r=n(y5);function n(i){return i&&i.__esModule?i:{default:i}}const o=(0,t.cloneDeep)(r.default.theme)})(om);let nu=om;var w5=(nu.__esModule?nu:{default:nu}).default,am={},sm={},ou={exports:{}},ht=String,lm=function(){return{isColorSupported:!1,reset:ht,bold:ht,dim:ht,italic:ht,underline:ht,inverse:ht,hidden:ht,strikethrough:ht,black:ht,red:ht,green:ht,yellow:ht,blue:ht,magenta:ht,cyan:ht,white:ht,gray:ht,bgBlack:ht,bgRed:ht,bgGreen:ht,bgYellow:ht,bgBlue:ht,bgMagenta:ht,bgCyan:ht,bgWhite:ht}};ou.exports=lm(),ou.exports.createColors=lm;var _5=ou.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var f in u)Object.defineProperty(l,f,{enumerable:!0,get:u[f]})}t(e,{dim:function(){return a},default:function(){return s}});const r=n(_5);function n(l){return l&&l.__esModule?l:{default:l}}let o=new Set;function i(l,u,f){typeof process<"u"&&process.env.JEST_WORKER_ID||f&&o.has(f)||(f&&o.add(f),console.warn(""),u.forEach(d=>console.warn(l,"-",d)))}function a(l){return r.default.dim(l)}const s={info(l,u){i(r.default.bold(r.default.cyan("info")),...Array.isArray(l)?[l]:[u,l])},warn(l,u){i(r.default.bold(r.default.yellow("warn")),...Array.isArray(l)?[l]:[u,l])},risk(l,u){i(r.default.bold(r.default.magenta("risk")),...Array.isArray(l)?[l]:[u,l])}}})(sm),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o}});const t=r(sm);function r(i){return i&&i.__esModule?i:{default:i}}function n({version:i,from:a,to:s}){t.default.warn(`${a}-color-renamed`,[`As of Tailwind CSS ${i}, \`${a}\` has been renamed to \`${s}\`.`,"Update your configuration file to silence this warning."])}const o={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return n({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return n({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return n({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return n({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return n({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}}(am);let iu=am;var E5=(iu.__esModule?iu:{default:iu}).default;const bs=m5,x5=ru,cm=w5,En=E5,[S5,{lineHeight:$5}]=cm.fontSize.base,{spacing:Qr,borderWidth:um,borderRadius:fm}=cm;x5.withOptions(function(e={strategy:void 0}){return function({addBase:t,addComponents:r,theme:n}){const o=e.strategy===void 0?["base","class"]:[e.strategy],i=[{base:["[type='text']","[type='email']","[type='url']","[type='password']","[type='number']","[type='date']","[type='datetime-local']","[type='month']","[type='search']","[type='tel']","[type='time']","[type='week']","[multiple]","textarea","select"],class:[".form-input",".form-textarea",".form-select",".form-multiselect"],styles:{appearance:"none","background-color":"#fff","border-color":n("colors.gray.500",En.gray[500]),"border-width":um.DEFAULT,"border-radius":fm.none,"padding-top":Qr[2],"padding-right":Qr[3],"padding-bottom":Qr[2],"padding-left":Qr[3],"font-size":S5,"line-height":$5,"--tw-shadow":"0 0 #0000","&:focus":{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":n("colors.blue.600",En.blue[600]),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","box-shadow":"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)","border-color":n("colors.blue.600",En.blue[600])}}},{base:["input::placeholder","textarea::placeholder"],class:[".form-input::placeholder",".form-textarea::placeholder"],styles:{color:n("colors.gray.500",En.gray[500]),opacity:"1"}},{base:["::-webkit-datetime-edit-fields-wrapper"],class:[".form-input::-webkit-datetime-edit-fields-wrapper"],styles:{padding:"0"}},{base:["::-webkit-date-and-time-value"],class:[".form-input::-webkit-date-and-time-value"],styles:{"min-height":"1.5em"}},{base:["::-webkit-datetime-edit","::-webkit-datetime-edit-year-field","::-webkit-datetime-edit-month-field","::-webkit-datetime-edit-day-field","::-webkit-datetime-edit-hour-field","::-webkit-datetime-edit-minute-field","::-webkit-datetime-edit-second-field","::-webkit-datetime-edit-millisecond-field","::-webkit-datetime-edit-meridiem-field"],class:[".form-input::-webkit-datetime-edit",".form-input::-webkit-datetime-edit-year-field",".form-input::-webkit-datetime-edit-month-field",".form-input::-webkit-datetime-edit-day-field",".form-input::-webkit-datetime-edit-hour-field",".form-input::-webkit-datetime-edit-minute-field",".form-input::-webkit-datetime-edit-second-field",".form-input::-webkit-datetime-edit-millisecond-field",".form-input::-webkit-datetime-edit-meridiem-field"],styles:{"padding-top":0,"padding-bottom":0}},{base:["select"],class:[".form-select"],styles:{"background-image":`url("${bs(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="${n("colors.gray.500",En.gray[500])}" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6 8l4 4 4-4"/></svg>`)}")`,"background-position":`right ${Qr[2]} center`,"background-repeat":"no-repeat","background-size":"1.5em 1.5em","padding-right":Qr[10],"print-color-adjust":"exact"}},{base:["[multiple]"],class:null,styles:{"background-image":"initial","background-position":"initial","background-repeat":"unset","background-size":"initial","padding-right":Qr[3],"print-color-adjust":"unset"}},{base:["[type='checkbox']","[type='radio']"],class:[".form-checkbox",".form-radio"],styles:{appearance:"none",padding:"0","print-color-adjust":"exact",display:"inline-block","vertical-align":"middle","background-origin":"border-box","user-select":"none","flex-shrink":"0",height:Qr[4],width:Qr[4],color:n("colors.blue.600",En.blue[600]),"background-color":"#fff","border-color":n("colors.gray.500",En.gray[500]),"border-width":um.DEFAULT,"--tw-shadow":"0 0 #0000"}},{base:["[type='checkbox']"],class:[".form-checkbox"],styles:{"border-radius":fm.none}},{base:["[type='radio']"],class:[".form-radio"],styles:{"border-radius":"100%"}},{base:["[type='checkbox']:focus","[type='radio']:focus"],class:[".form-checkbox:focus",".form-radio:focus"],styles:{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"2px","--tw-ring-offset-color":"#fff","--tw-ring-color":n("colors.blue.600",En.blue[600]),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)","box-shadow":"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)"}},{base:["[type='checkbox']:checked","[type='radio']:checked"],class:[".form-checkbox:checked",".form-radio:checked"],styles:{"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat"}},{base:["[type='checkbox']:checked"],class:[".form-checkbox:checked"],styles:{"background-image":`url("${bs('<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><path d="M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z"/></svg>')}")`}},{base:["[type='radio']:checked"],class:[".form-radio:checked"],styles:{"background-image":`url("${bs('<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="3"/></svg>')}")`}},{base:["[type='checkbox']:checked:hover","[type='checkbox']:checked:focus","[type='radio']:checked:hover","[type='radio']:checked:focus"],class:[".form-checkbox:checked:hover",".form-checkbox:checked:focus",".form-radio:checked:hover",".form-radio:checked:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["[type='checkbox']:indeterminate"],class:[".form-checkbox:indeterminate"],styles:{"background-image":`url("${bs('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 8h8"/></svg>')}")`,"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat"}},{base:["[type='checkbox']:indeterminate:hover","[type='checkbox']:indeterminate:focus"],class:[".form-checkbox:indeterminate:hover",".form-checkbox:indeterminate:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["[type='file']"],class:null,styles:{background:"unset","border-color":"inherit","border-width":"0","border-radius":"0",padding:"0","font-size":"unset","line-height":"inherit"}},{base:["[type='file']:focus"],class:null,styles:{outline:["1px solid ButtonText","1px auto -webkit-focus-ring-color"]}}],a=s=>i.map(l=>l[s]===null?null:{[l[s]]:l.styles}).filter(Boolean);o.includes("base")&&t(a("base")),o.includes("class")&&r(a("class"))}});var ys={exports:{}};ys.exports,function(e,t){var r=200,n="__lodash_hash_undefined__",o=800,i=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",f="[object Boolean]",d="[object Date]",p="[object Error]",h="[object Function]",g="[object GeneratorFunction]",v="[object Map]",b="[object Number]",m="[object Null]",w="[object Object]",E="[object Proxy]",x="[object RegExp]",k="[object Set]",I="[object String]",S="[object Undefined]",C="[object WeakMap]",P="[object ArrayBuffer]",F="[object DataView]",D="[object Float32Array]",N="[object Float64Array]",J="[object Int8Array]",G="[object Int16Array]",Y="[object Int32Array]",te="[object Uint8Array]",oe="[object Uint8ClampedArray]",le="[object Uint16Array]",ae="[object Uint32Array]",ge=/[\\^$.*+?()[\]{}|]/g,ce=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,q={};q[D]=q[N]=q[J]=q[G]=q[Y]=q[te]=q[oe]=q[le]=q[ae]=!0,q[s]=q[l]=q[P]=q[f]=q[F]=q[d]=q[p]=q[h]=q[v]=q[b]=q[w]=q[x]=q[k]=q[I]=q[C]=!1;var re=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,de=typeof self=="object"&&self&&self.Object===Object&&self,U=re||de||Function("return this")(),H=t&&!t.nodeType&&t,M=H&&!0&&e&&!e.nodeType&&e,R=M&&M.exports===H,z=R&&re.process,O=function(){try{var j=M&&M.require&&M.require("util").types;return j||z&&z.binding&&z.binding("util")}catch{}}(),T=O&&O.isTypedArray;function Z(j,Q,$){switch($.length){case 0:return j.call(Q);case 1:return j.call(Q,$[0]);case 2:return j.call(Q,$[0],$[1]);case 3:return j.call(Q,$[0],$[1],$[2])}return j.apply(Q,$)}function ne(j,Q){for(var $=-1,B=Array(j);++$<j;)B[$]=Q($);return B}function pe(j){return function(Q){return j(Q)}}function me(j,Q){return j==null?void 0:j[Q]}function xe(j,Q){return function($){return j(Q($))}}var Ee=Array.prototype,ie=Function.prototype,Ne=Object.prototype,dt=U["__core-js_shared__"],Te=ie.toString,Fe=Ne.hasOwnProperty,bt=function(){var j=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||"");return j?"Symbol(src)_1."+j:""}(),$e=Ne.toString,De=Te.call(Object),A=RegExp("^"+Te.call(Fe).replace(ge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=R?U.Buffer:void 0,_=U.Symbol,L=U.Uint8Array,W=y?y.allocUnsafe:void 0,X=xe(Object.getPrototypeOf,Object),se=Object.create,Pe=Ne.propertyIsEnumerable,nt=Ee.splice,Me=_?_.toStringTag:void 0,Je=function(){try{var j=Dn(Object,"defineProperty");return j({},"",{}),j}catch{}}(),Ze=y?y.isBuffer:void 0,on=Math.max,oi=Date.now,dr=Dn(U,"Map"),Yt=Dn(Object,"create"),io=function(){function j(){}return function(Q){if(!zr(Q))return{};if(se)return se(Q);j.prototype=Q;var $=new j;return j.prototype=void 0,$}}();function Nt(j){var Q=-1,$=j==null?0:j.length;for(this.clear();++Q<$;){var B=j[Q];this.set(B[0],B[1])}}function pa(){this.__data__=Yt?Yt(null):{},this.size=0}function ii(j){var Q=this.has(j)&&delete this.__data__[j];return this.size-=Q?1:0,Q}function ha(j){var Q=this.__data__;if(Yt){var $=Q[j];return $===n?void 0:$}return Fe.call(Q,j)?Q[j]:void 0}function ai(j){var Q=this.__data__;return Yt?Q[j]!==void 0:Fe.call(Q,j)}function si(j,Q){var $=this.__data__;return this.size+=this.has(j)?0:1,$[j]=Yt&&Q===void 0?n:Q,this}Nt.prototype.clear=pa,Nt.prototype.delete=ii,Nt.prototype.get=ha,Nt.prototype.has=ai,Nt.prototype.set=si;function Ct(j){var Q=-1,$=j==null?0:j.length;for(this.clear();++Q<$;){var B=j[Q];this.set(B[0],B[1])}}function ga(){this.__data__=[],this.size=0}function li(j){var Q=this.__data__,$=Pt(Q,j);if($<0)return!1;var B=Q.length-1;return $==B?Q.pop():nt.call(Q,$,1),--this.size,!0}function va(j){var Q=this.__data__,$=Pt(Q,j);return $<0?void 0:Q[$][1]}function ma(j){return Pt(this.__data__,j)>-1}function ba(j,Q){var $=this.__data__,B=Pt($,j);return B<0?(++this.size,$.push([j,Q])):$[B][1]=Q,this}Ct.prototype.clear=ga,Ct.prototype.delete=li,Ct.prototype.get=va,Ct.prototype.has=ma,Ct.prototype.set=ba;function Jt(j){var Q=-1,$=j==null?0:j.length;for(this.clear();++Q<$;){var B=j[Q];this.set(B[0],B[1])}}function V(){this.size=0,this.__data__={hash:new Nt,map:new(dr||Ct),string:new Nt}}function fe(j){var Q=so(this,j).delete(j);return this.size-=Q?1:0,Q}function _e(j){return so(this,j).get(j)}function Oe(j){return so(this,j).has(j)}function qe(j,Q){var $=so(this,j),B=$.size;return $.set(j,Q),this.size+=$.size==B?0:1,this}Jt.prototype.clear=V,Jt.prototype.delete=fe,Jt.prototype.get=_e,Jt.prototype.has=Oe,Jt.prototype.set=qe;function je(j){var Q=this.__data__=new Ct(j);this.size=Q.size}function Re(){this.__data__=new Ct,this.size=0}function Be(j){var Q=this.__data__,$=Q.delete(j);return this.size=Q.size,$}function It(j){return this.__data__.get(j)}function mt(j){return this.__data__.has(j)}function yt(j,Q){var $=this.__data__;if($ instanceof Ct){var B=$.__data__;if(!dr||B.length<r-1)return B.push([j,Q]),this.size=++$.size,this;$=this.__data__=new Jt(B)}return $.set(j,Q),this.size=$.size,this}je.prototype.clear=Re,je.prototype.delete=Be,je.prototype.get=It,je.prototype.has=mt,je.prototype.set=yt;function Wt(j,Q){var $=lo(j),B=!$&&Ln(j),ee=!$&&!B&&Tl(j),he=!$&&!B&&!ee&&Il(j),Ce=$||B||ee||he,Se=Ce?ne(j.length,String):[],Ie=Se.length;for(var ke in j)(Q||Fe.call(j,ke))&&!(Ce&&(ke=="length"||ee&&(ke=="offset"||ke=="parent")||he&&(ke=="buffer"||ke=="byteLength"||ke=="byteOffset")||$l(ke,Ie)))&&Se.push(ke);return Se}function er(j,Q,$){($!==void 0&&!fi(j[Q],$)||$===void 0&&!(Q in j))&&ao(j,Q,$)}function ci(j,Q,$){var B=j[Q];(!(Fe.call(j,Q)&&fi(B,$))||$===void 0&&!(Q in j))&&ao(j,Q,$)}function Pt(j,Q){for(var $=j.length;$--;)if(fi(j[$][0],Q))return $;return-1}function ao(j,Q,$){Q=="__proto__"&&Je?Je(j,Q,{configurable:!0,enumerable:!0,value:$,writable:!0}):j[Q]=$}var yd=Pd();function an(j){return j==null?j===void 0?S:m:Me&&Me in Object(j)?wa(j):Ld(j)}function ya(j){return Xt(j)&&an(j)==s}function wd(j){if(!zr(j)||Dd(j))return!1;var Q=di(j)?A:ce;return Q.test(jd(j))}function _d(j){return Xt(j)&&pi(j.length)&&!!q[an(j)]}function Ed(j){if(!zr(j))return Ol(j);var Q=Al(j),$=[];for(var B in j)B=="constructor"&&(Q||!Fe.call(j,B))||$.push(B);return $}function ui(j,Q,$,B,ee){j!==Q&&yd(Q,function(he,Ce){if(ee||(ee=new je),zr(he))xd(j,Q,Ce,$,ui,B,ee);else{var Se=B?B(_a(j,Ce),he,Ce+"",j,Q,ee):void 0;Se===void 0&&(Se=he),er(j,Ce,Se)}},kl)}function xd(j,Q,$,B,ee,he,Ce){var Se=_a(j,$),Ie=_a(Q,$),ke=Ce.get(Ie);if(ke){er(j,$,ke);return}var Ue=he?he(Se,Ie,$+"",j,Q,Ce):void 0,Dt=Ue===void 0;if(Dt){var Ft=lo(Ie),sn=!Ft&&Tl(Ie),hi=!Ft&&!sn&&Il(Ie);Ue=Ie,Ft||sn||hi?lo(Se)?Ue=Se:xa(Se)?Ue=Od(Se):sn?(Dt=!1,Ue=$d(Ie,!0)):hi?(Dt=!1,Ue=Ad(Ie,!0)):Ue=[]:uo(Ie)||Ln(Ie)?(Ue=Se,Ln(Se)?Ue=Pl(Se):(!zr(Se)||di(Se))&&(Ue=kd(Ie))):Dt=!1}Dt&&(Ce.set(Ie,Ue),ee(Ue,Ie,B,he,Ce),Ce.delete(Ie)),er(j,$,Ue)}function Sl(j,Q){return Ea(Md(j,Q,Dl),j+"")}var Sd=Je?function(j,Q){return Je(j,"toString",{configurable:!0,enumerable:!1,value:Nl(Q),writable:!0})}:Dl;function $d(j,Q){if(Q)return j.slice();var $=j.length,B=W?W($):new j.constructor($);return j.copy(B),B}function Cd(j){var Q=new j.constructor(j.byteLength);return new L(Q).set(new L(j)),Q}function Ad(j,Q){var $=Q?Cd(j.buffer):j.buffer;return new j.constructor($,j.byteOffset,j.length)}function Od(j,Q){var $=-1,B=j.length;for(Q||(Q=Array(B));++$<B;)Q[$]=j[$];return Q}function Td(j,Q,$,B){var ee=!$;$||($={});for(var he=-1,Ce=Q.length;++he<Ce;){var Se=Q[he],Ie=B?B($[Se],j[Se],Se,$,j):void 0;Ie===void 0&&(Ie=j[Se]),ee?ao($,Se,Ie):ci($,Se,Ie)}return $}function Id(j){return Sl(function(Q,$){var B=-1,ee=$.length,he=ee>1?$[ee-1]:void 0,Ce=ee>2?$[2]:void 0;for(he=j.length>3&&typeof he=="function"?(ee--,he):void 0,Ce&&Cl($[0],$[1],Ce)&&(he=ee<3?void 0:he,ee=1),Q=Object(Q);++B<ee;){var Se=$[B];Se&&j(Q,Se,B,he)}return Q})}function Pd(j){return function(Q,$,B){for(var ee=-1,he=Object(Q),Ce=B(Q),Se=Ce.length;Se--;){var Ie=Ce[j?Se:++ee];if($(he[Ie],Ie,he)===!1)break}return Q}}function so(j,Q){var $=j.__data__;return Nd(Q)?$[typeof Q=="string"?"string":"hash"]:$.map}function Dn(j,Q){var $=me(j,Q);return wd($)?$:void 0}function wa(j){var Q=Fe.call(j,Me),$=j[Me];try{j[Me]=void 0;var B=!0}catch{}var ee=$e.call(j);return B&&(Q?j[Me]=$:delete j[Me]),ee}function kd(j){return typeof j.constructor=="function"&&!Al(j)?io(X(j)):{}}function $l(j,Q){var $=typeof j;return Q=Q??a,!!Q&&($=="number"||$!="symbol"&&K.test(j))&&j>-1&&j%1==0&&j<Q}function Cl(j,Q,$){if(!zr($))return!1;var B=typeof Q;return(B=="number"?co($)&&$l(Q,$.length):B=="string"&&Q in $)?fi($[Q],j):!1}function Nd(j){var Q=typeof j;return Q=="string"||Q=="number"||Q=="symbol"||Q=="boolean"?j!=="__proto__":j===null}function Dd(j){return!!bt&&bt in j}function Al(j){var Q=j&&j.constructor,$=typeof Q=="function"&&Q.prototype||Ne;return j===$}function Ol(j){var Q=[];if(j!=null)for(var $ in Object(j))Q.push($);return Q}function Ld(j){return $e.call(j)}function Md(j,Q,$){return Q=on(Q===void 0?j.length-1:Q,0),function(){for(var B=arguments,ee=-1,he=on(B.length-Q,0),Ce=Array(he);++ee<he;)Ce[ee]=B[Q+ee];ee=-1;for(var Se=Array(Q+1);++ee<Q;)Se[ee]=B[ee];return Se[Q]=$(Ce),Z(j,this,Se)}}function _a(j,Q){if(!(Q==="constructor"&&typeof j[Q]=="function")&&Q!="__proto__")return j[Q]}var Ea=Fd(Sd);function Fd(j){var Q=0,$=0;return function(){var B=oi(),ee=i-(B-$);if($=B,ee>0){if(++Q>=o)return arguments[0]}else Q=0;return j.apply(void 0,arguments)}}function jd(j){if(j!=null){try{return Te.call(j)}catch{}try{return j+""}catch{}}return""}function fi(j,Q){return j===Q||j!==j&&Q!==Q}var Ln=ya(function(){return arguments}())?ya:function(j){return Xt(j)&&Fe.call(j,"callee")&&!Pe.call(j,"callee")},lo=Array.isArray;function co(j){return j!=null&&pi(j.length)&&!di(j)}function xa(j){return Xt(j)&&co(j)}var Tl=Ze||Rd;function di(j){if(!zr(j))return!1;var Q=an(j);return Q==h||Q==g||Q==u||Q==E}function pi(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=a}function zr(j){var Q=typeof j;return j!=null&&(Q=="object"||Q=="function")}function Xt(j){return j!=null&&typeof j=="object"}function uo(j){if(!Xt(j)||an(j)!=w)return!1;var Q=X(j);if(Q===null)return!0;var $=Fe.call(Q,"constructor")&&Q.constructor;return typeof $=="function"&&$ instanceof $&&Te.call($)==De}var Il=T?pe(T):_d;function Pl(j){return Td(j,kl(j))}function kl(j){return co(j)?Wt(j,!0):Ed(j)}var Bd=Id(function(j,Q,$){ui(j,Q,$)});function Nl(j){return function(){return j}}function Dl(j){return j}function Rd(){return!1}e.exports=Bd}(ys,ys.exports),ys.exports;var ws={},_s={};Object.defineProperty(_s,"__esModule",{value:!0}),_s.default=void 0;function dm(e,t){return{handler:e,config:t}}dm.withOptions=function(e,t=()=>({})){const r=function(n){return{__options:n,handler:e(n),config:t(n)}};return r.__isOptionsFunction=!0,r.__pluginFunction=e,r.__configFunction=t,r};var C5=dm;_s.default=C5,Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=void 0;var A5=O5(_s);function O5(e){return e&&e.__esModule?e:{default:e}}var T5=A5.default;ws.default=T5;let au=ws;var I5=(au.__esModule?au:{default:au}).default,P5=function({matchUtilities:e,theme:t}){e({bs:r=>({blockSize:r})},{values:t("height")})},Es={};Object.defineProperty(Es,"__esModule",{value:!0}),Es.default=void 0;const pm=e=>Object.assign({},...Object.entries(e??{}).flatMap(([t,r])=>typeof r=="object"?Object.entries(pm(r)).map(([n,o])=>({[t+(n==="DEFAULT"?"":`-${n}`)]:o})):[{[`${t}`]:r}]));var k5=pm;Es.default=k5;var su={};Object.defineProperty(su,"__esModule",{value:!0}),su.default=N5;function N5(e){return typeof e=="function"?e({}):e}var xs={},Ss={},D5={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.parseColor=R5,Ss.formatColor=U5;var hm=L5(D5);function L5(e){return e&&e.__esModule?e:{default:e}}let M5=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,F5=/^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,$s="(?:\\d+|\\d*\\.\\d+)%?",gm="(?:\\s*,\\s*|\\s+)",j5="\\s*[,/]\\s*",B5=new RegExp(`^(rgb|hsl)a?\\(\\s*(${$s})${gm}(${$s})${gm}(${$s})(?:${j5}(${$s}))?\\s*\\)$`);function R5(e){if(typeof e!="string")return null;if(e=e.trim(),e==="transparent")return{mode:"rgb",color:["0","0","0"],alpha:"0"};if(e in hm.default)return{mode:"rgb",color:hm.default[e].map(i=>i.toString())};let t=e.replace(F5,(i,a,s,l,u)=>["#",a,a,s,s,l,l,u?u+u:""].join("")).match(M5);if(t!==null)return{mode:"rgb",color:[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)].map(i=>i.toString()),alpha:t[4]?(parseInt(t[4],16)/255).toString():void 0};let r=e.match(B5);if(r!==null){var n,o;return{mode:r[1],color:[r[2],r[3],r[4]].map(i=>i.toString()),alpha:(n=r[5])===null||n===void 0||(o=n.toString)===null||o===void 0?void 0:o.call(n)}}return null}function U5({mode:e,color:t,alpha:r}){let n=r!==void 0;return`${e}(${t.join(" ")}${n?` / ${r}`:""})`}Object.defineProperty(xs,"__esModule",{value:!0}),xs.withAlphaValue=W5,xs.default=V5;var Cs=Ss;function W5(e,t,r){if(typeof e=="function")return e({opacityValue:t});let n=Cs.parseColor(e);return n===null?r:Cs.formatColor({...n,alpha:t})}function V5({color:e,property:t,variable:r}){let n=[].concat(t);if(typeof e=="function")return{[r]:"1",...Object.fromEntries(n.map(i=>[i,e({opacityVariable:r,opacityValue:`var(${r})`})]))};const o=Cs.parseColor(e);return o===null?Object.fromEntries(n.map(i=>[i,e])):o.alpha!==void 0?Object.fromEntries(n.map(i=>[i,e])):{[r]:"1",...Object.fromEntries(n.map(i=>[i,Cs.formatColor({...o,alpha:`var(${r})`})]))}}const vm=Es.default,xn=su.default,Ao=xs.default;var H5=function({corePlugins:e,matchUtilities:t,theme:r}){t({"border-lb":n=>e("borderOpacity")?Ao({color:n,property:["border-block-start-color","border-block-end-color"],variable:"--tw-border-opacity"}):{"border-block-start-color":xn(n),"border-block-end-color":xn(n)},"border-li":n=>e("borderOpacity")?Ao({color:n,property:["border-inline-start-color","border-inline-end-color"],variable:"--tw-border-opacity"}):{"border-inline-start-color":xn(n),"border-inline-end-color":xn(n)}},{values:(({DEFAULT:n,...o})=>o)(vm(r("borderColor"))),type:"color"}),t({"border-bs":n=>e("borderOpacity")?Ao({color:n,property:"border-block-start-color",variable:"--tw-border-opacity"}):{"border-block-start-color":xn(n)},"border-be":n=>e("borderOpacity")?Ao({color:n,property:"border-block-end-color",variable:"--tw-border-opacity"}):{"border-block-end-color":xn(n)},"border-is":n=>e("borderOpacity")?Ao({color:n,property:"border-inline-start-color",variable:"--tw-border-opacity"}):{"border-inline-start-color":xn(n)},"border-ie":n=>e("borderOpacity")?Ao({color:n,property:"border-inline-end-color",variable:"--tw-border-opacity"}):{"border-inline-end-color":xn(n)}},{values:(({DEFAULT:n,...o})=>o)(vm(r("borderColor"))),type:"color"})},z5=function({matchUtilities:e,theme:t}){e({"rounded-bs":r=>({borderStartStartRadius:r,borderStartEndRadius:r}),"rounded-be":r=>({borderEndStartRadius:r,borderEndEndRadius:r}),"rounded-is":r=>({borderStartStartRadius:r,borderEndStartRadius:r}),"rounded-ie":r=>({borderStartEndRadius:r,borderEndEndRadius:r})},{values:t("borderRadius")}),e({"rounded-ss":r=>({borderStartStartRadius:r}),"rounded-se":r=>({borderStartEndRadius:r}),"rounded-es":r=>({borderEndStartRadius:r}),"rounded-ee":r=>({borderEndEndRadius:r})},{values:t("borderRadius")})},G5=function({matchUtilities:e,theme:t}){e({"border-lb":r=>({borderBlockStartWidth:r,borderBlockEndWidth:r}),"border-li":r=>({borderInlineStartWidth:r,borderInlineEndWidth:r})},{values:t("borderWidth")}),e({"border-bs":r=>({borderBlockStartWidth:r}),"border-be":r=>({borderBlockEndWidth:r}),"border-is":r=>({borderInlineStartWidth:r}),"border-ie":r=>({borderInlineEndWidth:r})},{values:t("borderWidth")})},K5=function({addUtilities:e}){e({".clear-start":{clear:"inline-start"},".clear-end":{clear:"inline-end"}})},q5=function({addUtilities:e,matchUtilities:t,theme:r}){t({"divide-b":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-divide-b-reverse":"0","border-block-start-width":`calc(${n} * calc(1 - var(--tw-divide-b-reverse)))`,"border-block-end-width":`calc(${n} * var(--tw-divide-b-reverse))`}}),"divide-i":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-divide-i-reverse":"0","border-inline-start-width":`calc(${n} * calc(1 - var(--tw-divide-i-reverse)))`,"border-inline-end-width":`calc(${n} * var(--tw-divide-i-reverse))`}})},{values:r("divideWidth")}),e({".divide-b-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-divide-b-reverse":"1"},".divide-i-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-divide-i-reverse":"1"}})},Y5=function({addUtilities:e}){e({".float-start":{float:"inline-start"},".float-end":{float:"inline-end"}})},J5=function({matchUtilities:e,theme:t}){e({is:r=>({inlineSize:r})},{values:t("width")})},X5=function({matchUtilities:e,theme:t}){e({"inset-block":r=>({insetBlock:r}),"inset-inline":r=>({insetInline:r})},{supportsNegativeValues:!0,values:t("inset")}),e({"block-start":r=>({insetBlockStart:r}),"block-end":r=>({insetBlockEnd:r}),"inline-start":r=>({insetInlineStart:r}),"inline-end":r=>({insetInlineEnd:r})},{supportsNegativeValues:!0,values:t("inset")})},Z5=function({matchUtilities:e,theme:t}){e({mlb:r=>({marginBlock:r}),mli:r=>({marginInline:r})},{supportsNegativeValues:!0,values:t("margin")}),e({mbs:r=>({marginBlockStart:r}),mbe:r=>({marginBlockEnd:r}),mis:r=>({marginInlineStart:r}),mie:r=>({marginInlineEnd:r})},{supportsNegativeValues:!0,values:t("margin")})},Q5=function({matchUtilities:e,theme:t}){e({"max-bs":r=>({maxBlockSize:r})},{values:t("maxHeight")})},e3=function({matchUtilities:e,theme:t}){e({"max-is":r=>({maxInlineSize:r})},{values:t("maxWidth")})},t3=function({matchUtilities:e,theme:t}){e({"min-bs":r=>({minBlockSize:r})},{values:t("minHeight")})},r3=function({matchUtilities:e,theme:t}){e({"min-is":r=>({minInlineSize:r})},{values:t("minWidth")})},n3=function({addUtilities:e}){e({".overscroll-b-auto":{overscrollBehaviorBlock:"auto"},".overscroll-b-contain":{overscrollBehaviorBlock:"contain"},".overscroll-b-none":{overscrollBehaviorBlock:"none"},".overscroll-i-auto":{overscrollBehaviorInline:"auto"},".overscroll-i-contain":{overscrollBehaviorInline:"contain"},".overscroll-i-none":{overscrollBehaviorInline:"none"}})},o3=function({matchUtilities:e,theme:t}){e({plb:r=>({paddingBlock:r}),pli:r=>({paddingInline:r})},{values:t("padding")}),e({pbs:r=>({paddingBlockStart:r}),pbe:r=>({paddingBlockEnd:r}),pis:r=>({paddingInlineStart:r}),pie:r=>({paddingInlineEnd:r})},{values:t("padding")})},i3=function({addUtilities:e}){e({".resize-block":{resize:"block"},".resize-inline":{resize:"inline"}})},a3=function({addUtilities:e,matchUtilities:t,theme:r}){t({"space-b":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-space-b-reverse":"0","margin-block-start":`calc(${n} * calc(1 - var(--tw-space-b-reverse)))`,"margin-block-end":`calc(${n} * var(--tw-space-b-reverse))`}}),"space-i":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-space-i-reverse":"0","margin-inline-start":`calc(${n} * calc(1 - var(--tw-space-i-reverse)))`,"margin-inline-end":`calc(${n} * var(--tw-space-i-reverse))`}})},{supportsNegativeValues:!0,values:r("space")}),e({".space-b-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-space-b-reverse":"1"},".space-i-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-space-i-reverse":"1"}})},s3=function({addUtilities:e}){e({".text-start":{textAlign:"start"},".text-end":{textAlign:"end"}})};const l3=I5,c3=P5,u3=H5,f3=z5,d3=G5,p3=K5,h3=q5,g3=Y5,v3=J5,m3=X5,b3=Z5,y3=Q5,w3=e3,_3=t3,E3=r3,x3=n3,S3=o3,$3=i3,C3=a3,A3=s3;l3(function(e){g3(e),p3(e),A3(e),$3(e),x3(e),c3(e),_3(e),y3(e),v3(e),E3(e),w3(e),b3(e),S3(e),C3(e),m3(e),h3(e),d3(e),u3(e),f3(e)});var O3=Ye&&Ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const T3=O3(ru),I3=["disabled","highlighted","placeholder"],mm={align:["center","end","start"],state:["active","checked","closed","delayed-open","hidden","inactive","indeterminate","instant-open","off","on","open","unchecked","visible"],side:["bottom","left","right","top"],orientation:["horizontal","vertical"],motion:["from-end","from-start","to-end","to-start"],swipe:["cancel","end","move","start"],"swipe-direction":["down","left","right","up"]};T3.default.withOptions(e=>({addUtilities:t,addVariant:r,e:n})=>{e=e||{variantPrefix:"radix"};const o=e.variantPrefix===""||typeof e.variantPrefix=="boolean"&&e.variantPrefix===!1?"":`${e.variantPrefix}-`;["context-menu","dropdown-menu","hover-card","menubar","popover","select","tooltip"].forEach(u=>{t({[`.origin-${o}${u}`]:{"transform-origin":`var(--radix-${u}-content-transform-origin)`}})}),I3.forEach(u=>{let f=`${o}${u}`,d=`data-${u}`;r(`${f}`,({modifySelectors:p,separator:h})=>{p(({className:g})=>`.${n(`${f}${h}${g}`)}[${d}]`)}),r(`group-${f}`,({modifySelectors:p,separator:h})=>{p(({className:g})=>`.group[${d}] .${n(`group-${f}${h}${g}`)}`)}),r(`peer-${f}`,({modifySelectors:p,separator:h})=>{p(({className:g})=>`.peer[${d}] ~ .${n(`peer-${f}${h}${g}`)}`)})}),Object.keys(mm).forEach(u=>{mm[u].forEach(f=>{let d=`${o}${u}-${f}`,p=`data-${u}="${f}"`;r(`${d}`,({modifySelectors:h,separator:g})=>{h(({className:v})=>`.${n(`${d}${g}${v}`)}[${p}]`)}),r(`group-${d}`,({modifySelectors:h,separator:g})=>{h(({className:v})=>`.group[${p}] .${n(`group-${d}${g}${v}`)}`)}),r(`peer-${d}`,({modifySelectors:h,separator:g})=>{h(({className:v})=>`.peer[${p}] ~ .${n(`peer-${d}${g}${v}`)}`)})})}),["accordion-content","collapsible-content","navigation-menu-viewport"].forEach(u=>{t({[`.w-${o}${u}`]:{width:`var(--radix-${u}-width)`}}),t({[`.h-${o}${u}`]:{height:`var(--radix-${u}-height)`}})}),["context-menu","dropdown-menu","hover-card","menubar","popover","select","tooltip"].forEach(u=>{t({[`.w-${o}${u}-content-available-width`]:{width:`var(--radix-${u}-content-available-width)`}}),t({[`.max-w-${o}${u}-content-available-width`]:{maxWidth:`var(--radix-${u}-content-available-width)`}}),t({[`.h-${o}${u}-content-available-height`]:{height:`var(--radix-${u}-content-available-height)`}}),t({[`.max-h-${o}${u}-content-available-height`]:{maxHeight:`var(--radix-${u}-content-available-height)`}}),t({[`.w-${o}${u}-trigger-width`]:{width:`var(--radix-${u}-trigger-width)`}}),t({[`.h-${o}${u}-trigger-height`]:{height:`var(--radix-${u}-trigger-height)`}})}),["toast-swipe-end","toast-swipe-move"].forEach(u=>{t({[`.translate-x-${o}${u}-x`]:{transform:`translateX(var(--radix-${u}-x))`}}),t({[`.translate-y-${o}${u}-y`]:{transform:`translateY(var(--radix-${u}-y))`}})})});function bm(e){return!Array.isArray(e[0])}function As(e,t){const r=e.length,n=bm(e)?[e]:e,o=bm(t)?t.map(l=>[l]):t,i=o[0].length,a=o[0].map((l,u)=>o.map(f=>f[u]));let s=n.map(l=>a.map(u=>Array.isArray(l)?l.reduce((f,d,p)=>f+d*(u[p]||0),0):u.reduce((f,d)=>f+d*l,0)));return r===1&&(s=s[0]),i===1?s.map(l=>l[0]):s}function P3(e){return e.map(t=>{const r=t<0?-1:1,n=Math.abs(t);return n<.04045?t/12.92:r*Math.pow((n+.055)/1.055,2.4)})}function ym(e){return e.map(t=>{const r=t<0?-1:1,n=Math.abs(t);return n>.0031308?r*(1.055*Math.pow(n,1/2.4)-.055):12.92*t})}function k3(e){return As([[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],e)}function wm(e){return As([[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],e)}function N3(e){return As([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],e)}function _m(e){return As([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],e)}function D3(e){const t=.008856451679035631,r=24389/27,n=[.96422,1,.82521],i=e.map((a,s)=>a/n[s]).map(a=>a>t?Math.cbrt(a):(r*a+16)/116);return[116*i[1]-16,500*(i[0]-i[1]),200*(i[1]-i[2])]}function Em(e){const t=903.2962962962963,r=216/24389,n=[.96422,1,.82521],o=[];return o[1]=(e[0]+16)/116,o[0]=e[1]/500+o[1],o[2]=o[1]-e[2]/200,[Math.pow(o[0],3)>r?Math.pow(o[0],3):(116*o[0]-16)/t,e[0]>t*r?Math.pow((e[0]+16)/116,3):e[0]/t,Math.pow(o[2],3)>r?Math.pow(o[2],3):(116*o[2]-16)/t].map((a,s)=>a*n[s])}function lu(e){const t=Math.atan2(e[2],e[1])*180/Math.PI;return[e[0],Math.sqrt(Math.pow(e[1],2)+Math.pow(e[2],2)),t>=0?t:t+360]}function Os(e){return[e[0],e[1]*Math.cos(e[2]*Math.PI/180),e[1]*Math.sin(e[2]*Math.PI/180)]}function L3(e){return lu(D3(N3(k3(P3(e)))))}function M3(e){return ym(wm(_m(Em(Os(e)))))}function F3(e){return ym(wm(_m(Em(e))))}function xm(e,t,r){return M3([+e,+t,+r]).reduce((i,a)=>i&&a>=0-5e-6&&a<=1+5e-6,!0)}function j3(e){const r=lu(e),n=r[0];let o=r[1];const i=r[2];if(xm(n,o,i))return e;let a=o,s=0;for(o/=2;a-s>1e-4;)xm(n,o,i)?s=o:a=o,o=(a+s)/2;return Os([n,o,i])}const B3=128;function R3(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function U3(e,t){const r=1-e;return r*r*t}function W3(e,t){return 2*(1-e)*e*t}function V3(e,t){return e*e*t}function cu(e,t,r,n){return U3(e,t)+W3(e,r)+V3(e,n)}function H3(e,t){const[r,n,o]=e.points;return[cu(t,r[0],n[0],o[0]),cu(t,r[1],n[1],o[1]),cu(t,r[2],n[2],o[2])]}function z3(e,t){const r=[];for(let n=0;n<=t;n++)r.push(H3(e,n/t));return r}function G3(e,t=B3){const r=[];let n;for(let o=0,i=e.curves;o<i.length;o++){const a=i[o],s=z3(a,t);for(const l of s)n&&R3(n,l)||(r.push(l),n=l)}return r}const Sm=.75;function K3(e,t,r){const n=[],o=(t-e)/r;for(let i=0;i<r;i++)n[i]=e+o*i;return n}const q3=(e,t,r)=>{const n=e<=0?0:Math.log(e),o=Math.log(t),i=(o-n)/r,a=[Math.pow(Math.E,n)];for(let s=1;s<r;s+=1)a.push(Math.pow(Math.E,n+i*s));return a.push(Math.pow(Math.E,o)),a};function Y3(e,t,r=[0,100],n=Sm){if(e.length<=2)return[];const o=[],i=q3(Math.log10(r[0]),Math.log10(r[1]),t),a=K3(r[0],r[1],t);let s=0;for(let l=0;l<t;l++){const u=Math.min(r[1],Math.max(r[0],i[l]*(1-n)+a[l]*n));for(;u>e[s+1][0];)s++;const[f,d,p]=e[s],[h,g,v]=e[s+1],b=(u-f)/(h-f);o[l]=[f+(h-f)*b,d+(g-d)*b,p+(v-p)*b]}return o.map(j3)}function J3(e,t=16,r=[0,100],n=Sm,o=24){return Y3(G3(e,Math.ceil(o*(1+Math.abs(e.torsion||1))/2)).map(i=>eI(i,e.torsion,e.torsionT0)),t,r,n)}function X3(e){return`#${e.map(t=>(t<0?0:Math.floor(t>=1?255:t*256)).toString(16).padStart(2,"0")).join("")}`}function $m(e){return X3(F3(e))}function Z3(e){const t=e.match(/#?(..)(..)(..)/);return t?[parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255]:[0,0,0]}function Q3(e){return L3(Z3(e))}function eI(e,t=0,r=50){const n=e[0],[o,i,a]=lu(e),s=t*(n-r);return Os([o,i,a+s])}function tI({keyColor:e,darkCp:t,lightCp:r,hueTorsion:n}){const o=[0,0,0],i=[100,0,0],a=Os(e),[s,l,u]=a,f=[s*(1-t),l,u],d=[s+(100-s)*r,l,u];return{curves:[{points:[o,f,a]},{points:[a,d,i]}],torsion:n,torsionT0:s}}const uu="-";function rI(e){const t=oI(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;function o(a){const s=a.split(uu);return s[0]===""&&s.length!==1&&s.shift(),Cm(s,t)||nI(a)}function i(a,s){const l=r[a]||[];return s&&n[a]?[...l,...n[a]]:l}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function Cm(e,t){var a;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?Cm(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(uu);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId}const Am=/^\[(.+)\]$/;function nI(e){if(Am.test(e)){const t=Am.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function oI(e){const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return aI(Object.entries(e.classGroups),r).forEach(([i,a])=>{fu(a,n,i,t)}),n}function fu(e,t,r,n){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Om(t,o);i.classGroupId=r;return}if(typeof o=="function"){if(iI(o)){fu(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([i,a])=>{fu(a,Om(t,i),r,n)})})}function Om(e,t){let r=e;return t.split(uu).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function iI(e){return e.isThemeGetter}function aI(e,t){return t?e.map(([r,n])=>{const o=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,s])=>[t+a,s])):i);return[r,o]}):e}function sI(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;function o(i,a){r.set(i,a),t++,t>e&&(t=0,n=r,r=new Map)}return{get(i){let a=r.get(i);if(a!==void 0)return a;if((a=n.get(i))!==void 0)return o(i,a),a},set(i,a){r.has(i)?r.set(i,a):o(i,a)}}}const Tm="!";function lI(e){const t=e.separator,r=t.length===1,n=t[0],o=t.length;return function(a){const s=[];let l=0,u=0,f;for(let v=0;v<a.length;v++){let b=a[v];if(l===0){if(b===n&&(r||a.slice(v,v+o)===t)){s.push(a.slice(u,v)),u=v+o;continue}if(b==="/"){f=v;continue}}b==="["?l++:b==="]"&&l--}const d=s.length===0?a:a.substring(u),p=d.startsWith(Tm),h=p?d.substring(1):d,g=f&&f>u?f-u:void 0;return{modifiers:s,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:g}}}function cI(e){if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t}function uI(e){return{cache:sI(e.cacheSize),splitModifiers:lI(e),...rI(e)}}const fI=/\s+/;function dI(e,t){const{splitModifiers:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(fI).map(a=>{const{modifiers:s,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:f}=r(a);let d=n(f?u.substring(0,f):u),p=!!f;if(!d){if(!f)return{isTailwindClass:!1,originalClassName:a};if(d=n(u),!d)return{isTailwindClass:!1,originalClassName:a};p=!1}const h=cI(s).join(":");return{isTailwindClass:!0,modifierId:l?h+Tm:h,classGroupId:d,originalClassName:a,hasPostfixModifier:p}}).reverse().filter(a=>{if(!a.isTailwindClass)return!0;const{modifierId:s,classGroupId:l,hasPostfixModifier:u}=a,f=s+l;return i.has(f)?!1:(i.add(f),o(l,u).forEach(d=>i.add(s+d)),!0)}).reverse().map(a=>a.originalClassName).join(" ")}function pI(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Im(t))&&(n&&(n+=" "),n+=r);return n}function Im(e){if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Im(e[n]))&&(r&&(r+=" "),r+=t);return r}function Pm(e,...t){let r,n,o,i=a;function a(l){const u=t.reduce((f,d)=>d(f),e());return r=uI(u),n=r.cache.get,o=r.cache.set,i=s,s(l)}function s(l){const u=n(l);if(u)return u;const f=dI(l,r);return o(l,f),f}return function(){return i(pI.apply(null,arguments))}}function gt(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const km=/^\[(?:([a-z-]+):)?(.+)\]$/i,hI=/^\d+\/\d+$/,gI=new Set(["px","full","screen"]),vI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,mI=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,bI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,yI=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Br(e){return Sn(e)||gI.has(e)||hI.test(e)}function en(e){return Io(e,"length",xI)}function Sn(e){return!!e&&!Number.isNaN(Number(e))}function Bi(e){return Io(e,"number",Sn)}function Oo(e){return!!e&&Number.isInteger(Number(e))}function Nm(e){return e.endsWith("%")&&Sn(e.slice(0,-1))}function Le(e){return km.test(e)}function tn(e){return vI.test(e)}const _I=new Set(["length","size","percentage"]);function Dm(e){return Io(e,_I,jm)}function Lm(e){return Io(e,"position",jm)}const EI=new Set(["image","url"]);function Mm(e){return Io(e,EI,$I)}function Fm(e){return Io(e,"",SI)}function To(){return!0}function Io(e,t,r){const n=km.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1}function xI(e){return mI.test(e)&&!bI.test(e)}function jm(){return!1}function SI(e){return yI.test(e)}function $I(e){return wI.test(e)}const Po=Object.defineProperty({__proto__:null,isAny:To,isArbitraryImage:Mm,isArbitraryLength:en,isArbitraryNumber:Bi,isArbitraryPosition:Lm,isArbitraryShadow:Fm,isArbitrarySize:Dm,isArbitraryValue:Le,isInteger:Oo,isLength:Br,isNumber:Sn,isPercent:Nm,isTshirtSize:tn},Symbol.toStringTag,{value:"Module"});function Bm(){const e=gt("colors"),t=gt("spacing"),r=gt("blur"),n=gt("brightness"),o=gt("borderColor"),i=gt("borderRadius"),a=gt("borderSpacing"),s=gt("borderWidth"),l=gt("contrast"),u=gt("grayscale"),f=gt("hueRotate"),d=gt("invert"),p=gt("gap"),h=gt("gradientColorStops"),g=gt("gradientColorStopPositions"),v=gt("inset"),b=gt("margin"),m=gt("opacity"),w=gt("padding"),E=gt("saturate"),x=gt("scale"),k=gt("sepia"),I=gt("skew"),S=gt("space"),C=gt("translate"),P=()=>["auto","contain","none"],F=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",Le,t],N=()=>[Le,t],J=()=>["",Br,en],G=()=>["auto",Sn,Le],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],te=()=>["solid","dashed","dotted","double","none"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],le=()=>["start","end","center","between","around","evenly","stretch"],ae=()=>["","0",Le],ge=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ce=()=>[Sn,Bi],K=()=>[Sn,Le];return{cacheSize:500,separator:":",theme:{colors:[To],spacing:[Br,en],blur:["none","",tn,Le],brightness:ce(),borderColor:[e],borderRadius:["none","","full",tn,Le],borderSpacing:N(),borderWidth:J(),contrast:ce(),grayscale:ae(),hueRotate:K(),invert:ae(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[Nm,en],inset:D(),margin:D(),opacity:ce(),padding:N(),saturate:ce(),scale:ce(),sepia:ae(),skew:K(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",Le]}],container:["container"],columns:[{columns:[tn]}],"break-after":[{"break-after":ge()}],"break-before":[{"break-before":ge()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Y(),Le]}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Oo,Le]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Le]}],grow:[{grow:ae()}],shrink:[{shrink:ae()}],order:[{order:["first","last","none",Oo,Le]}],"grid-cols":[{"grid-cols":[To]}],"col-start-end":[{col:["auto",{span:["full",Oo,Le]},Le]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[To]}],"row-start-end":[{row:["auto",{span:[Oo,Le]},Le]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Le]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Le]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...le()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...le(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...le(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Le,t]}],"min-w":[{"min-w":[Le,t,"min","max","fit"]}],"max-w":[{"max-w":[Le,t,"none","full","min","max","fit","prose",{screen:[tn]},tn]}],h:[{h:[Le,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Le,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Le,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Le,t,"auto","min","max","fit"]}],"font-size":[{text:["base",tn,en]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Bi]}],"font-family":[{font:[To]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Le]}],"line-clamp":[{"line-clamp":["none",Sn,Bi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Br,Le]}],"list-image":[{"list-image":["none",Le]}],"list-style-type":[{list:["none","disc","decimal",Le]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Br,en]}],"underline-offset":[{"underline-offset":["auto",Br,Le]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),Lm]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Dm]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Mm]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...te(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:te()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...te()]}],"outline-offset":[{"outline-offset":[Br,Le]}],"outline-w":[{outline:[Br,en]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[Br,en]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",tn,Fm]}],"shadow-color":[{shadow:[To]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":oe()}],"bg-blend":[{"bg-blend":oe()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",tn,Le]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[E]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Le]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",Le]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",Le]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Oo,Le]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Le]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Le]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Le]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Br,en,Bi]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}function Rm(e,{cacheSize:t,prefix:r,separator:n,extend:o={},override:i={}}){Ts(e,"cacheSize",t),Ts(e,"prefix",r),Ts(e,"separator",n);for(const a in i)CI(e[a],i[a]);for(const a in o)AI(e[a],o[a]);return e}function Ts(e,t,r){r!==void 0&&(e[t]=r)}function CI(e,t){if(t)for(const r in t)Ts(e,r,t[r])}function AI(e,t){if(t)for(const r in t){const n=t[r];n!==void 0&&(e[r]=(e[r]||[]).concat(n))}}function OI(e,...t){return typeof e=="function"?Pm(Bm,e,...t):Pm(()=>Rm(Bm(),e),...t)}var TI="Expected a function",Um="__lodash_hash_undefined__",Wm=1/0,II="[object Function]",PI="[object GeneratorFunction]",kI="[object Symbol]",NI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,DI=/^\w*$/,LI=/^\./,MI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,FI=/[\\^$.*+?()[\]{}|]/g,jI=/\\(\\)?/g,BI=/^\[object .+?Constructor\]$/,RI=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,UI=typeof self=="object"&&self&&self.Object===Object&&self,du=RI||UI||Function("return this")();function WI(e,t){return e==null?void 0:e[t]}function VI(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var HI=Array.prototype,zI=Function.prototype,Vm=Object.prototype,pu=du["__core-js_shared__"],Hm=function(){var e=/[^.]+$/.exec(pu&&pu.keys&&pu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),zm=zI.toString,hu=Vm.hasOwnProperty,Gm=Vm.toString,GI=RegExp("^"+zm.call(hu).replace(FI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Km=du.Symbol,KI=HI.splice,qI=Jm(du,"Map"),Ri=Jm(Object,"create"),qm=Km?Km.prototype:void 0,Ym=qm?qm.toString:void 0;function qn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function YI(){this.__data__=Ri?Ri(null):{}}function JI(e){return this.has(e)&&delete this.__data__[e]}function XI(e){var t=this.__data__;if(Ri){var r=t[e];return r===Um?void 0:r}return hu.call(t,e)?t[e]:void 0}function ZI(e){var t=this.__data__;return Ri?t[e]!==void 0:hu.call(t,e)}function QI(e,t){var r=this.__data__;return r[e]=Ri&&t===void 0?Um:t,this}qn.prototype.clear=YI,qn.prototype.delete=JI,qn.prototype.get=XI,qn.prototype.has=ZI,qn.prototype.set=QI;function ko(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function e6(){this.__data__=[]}function t6(e){var t=this.__data__,r=Is(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():KI.call(t,r,1),!0}function r6(e){var t=this.__data__,r=Is(t,e);return r<0?void 0:t[r][1]}function n6(e){return Is(this.__data__,e)>-1}function o6(e,t){var r=this.__data__,n=Is(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}ko.prototype.clear=e6,ko.prototype.delete=t6,ko.prototype.get=r6,ko.prototype.has=n6,ko.prototype.set=o6;function Yn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function i6(){this.__data__={hash:new qn,map:new(qI||ko),string:new qn}}function a6(e){return Ps(this,e).delete(e)}function s6(e){return Ps(this,e).get(e)}function l6(e){return Ps(this,e).has(e)}function c6(e,t){return Ps(this,e).set(e,t),this}Yn.prototype.clear=i6,Yn.prototype.delete=a6,Yn.prototype.get=s6,Yn.prototype.has=l6,Yn.prototype.set=c6;function Is(e,t){for(var r=e.length;r--;)if(w6(e[r][0],t))return r;return-1}function u6(e,t){t=h6(t,e)?[t]:p6(t);for(var r=0,n=t.length;e!=null&&r<n;)e=e[b6(t[r++])];return r&&r==n?e:void 0}function f6(e){if(!Zm(e)||v6(e))return!1;var t=_6(e)||VI(e)?GI:BI;return t.test(y6(e))}function d6(e){if(typeof e=="string")return e;if(vu(e))return Ym?Ym.call(e):"";var t=e+"";return t=="0"&&1/e==-Wm?"-0":t}function p6(e){return Xm(e)?e:m6(e)}function Ps(e,t){var r=e.__data__;return g6(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Jm(e,t){var r=WI(e,t);return f6(r)?r:void 0}function h6(e,t){if(Xm(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||vu(e)?!0:DI.test(e)||!NI.test(e)||t!=null&&e in Object(t)}function g6(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function v6(e){return!!Hm&&Hm in e}var m6=gu(function(e){e=x6(e);var t=[];return LI.test(e)&&t.push(""),e.replace(MI,function(r,n,o,i){t.push(o?i.replace(jI,"$1"):n||r)}),t});function b6(e){if(typeof e=="string"||vu(e))return e;var t=e+"";return t=="0"&&1/e==-Wm?"-0":t}function y6(e){if(e!=null){try{return zm.call(e)}catch{}try{return e+""}catch{}}return""}function gu(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(TI);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(gu.Cache||Yn),r}gu.Cache=Yn;function w6(e,t){return e===t||e!==e&&t!==t}var Xm=Array.isArray;function _6(e){var t=Zm(e)?Gm.call(e):"";return t==II||t==PI}function Zm(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function E6(e){return!!e&&typeof e=="object"}function vu(e){return typeof e=="symbol"||E6(e)&&Gm.call(e)==kI}function x6(e){return e==null?"":d6(e)}function S6(e,t,r){var n=e==null?void 0:u6(e,t);return n===void 0?r:n}var $6=S6;const C6=un($6);var A6=[50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950],O6=[12,25,37,50,75,100,125,150,200,250,300,350,400,450,500,550,600,650,700,750,800,825,850,875,900,925,950,975],lr=Math.PI/180,Qm={red:{keyColor:"#ee003b",darkCp:1,lightCp:.13,hueTorsion:5.5*lr},orange:{keyColor:"#fa6b32",darkCp:.725,lightCp:1,hueTorsion:13*lr},amber:{keyColor:"#f08c00",darkCp:1,lightCp:1,hueTorsion:24*lr},yellow:{keyColor:"#ffd900",darkCp:1,lightCp:1,hueTorsion:32*lr},lime:{keyColor:"#99c400",darkCp:1,lightCp:1,hueTorsion:-3.5*lr},green:{keyColor:"#30a908",darkCp:.35,lightCp:.665,hueTorsion:-10.5*lr},emerald:{keyColor:"#15e066",darkCp:1,lightCp:.735,hueTorsion:-7*lr},teal:{keyColor:"#00a270",darkCp:1,lightCp:.755,hueTorsion:-12*lr},cyan:{keyColor:"#048992",darkCp:1,lightCp:.855,hueTorsion:-15*lr},sky:{keyColor:"#007bc2",darkCp:1,lightCp:.64,hueTorsion:0},blue:{keyColor:"#0058cb",darkCp:1,lightCp:.495,hueTorsion:-7*lr},indigo:{keyColor:"#1b45c5",darkCp:.495,lightCp:.55,hueTorsion:0},violet:{keyColor:"#080886",darkCp:.195,lightCp:.635,hueTorsion:-5*lr},purple:{keyColor:"#2c0073",darkCp:0,lightCp:.63,hueTorsion:0},fuchsia:{keyColor:"#6d0085",darkCp:1,lightCp:.695,hueTorsion:0},pink:{keyColor:"#a5006d",darkCp:1,lightCp:.775,hueTorsion:0},rose:{keyColor:"#d00054",darkCp:1,lightCp:1,hueTorsion:0},neutral:{keyColor:"#707076",darkCp:.8,lightCp:.88,hueTorsion:0},primary:{keyColor:"#1662d9",darkCp:.86,lightCp:1,hueTorsion:-30*lr}},ot=Object.keys(Qm).reduce((e,t)=>{const r=t==="neutral"||t==="primary",n=Qm[t],o=tI({...n,keyColor:Q3(n.keyColor)}),i=J3(o,21,[0,100*(22/21)],1,24).reverse(),a=s=>{if(s>999)return"#000000";if(s<1)return"#ffffff";if(s%50===0)return $m(i[s/50]);{const l=s%50/50,u=1-l,[f,d,p]=i[Math.floor(s/50)],[h,g,v]=i[Math.ceil(s/50)];return $m([f*u+h*l,d*u+g*l,p*u+v*l])}};return e[t]=(r?O6:A6).reduce((s,l)=>(s[l]=a(l),s),{}),e},{}),T6={scrim:{light:`${ot.neutral[75]}A6`,dark:`${ot.neutral[900]}A6`},attention:{light:"#ffffff",dark:ot.neutral[900]},base:{light:ot.neutral[25],dark:ot.neutral[850],fg:{light:"#ffffff",dark:"#000000"}},description:{light:ot.neutral[300],dark:ot.neutral[500]},baseGlass:{light:`${ot.neutral[25]}E6`,dark:`${ot.neutral[850]}E6`},input:{light:ot.neutral[50],dark:ot.neutral[825]},modal:{light:"#ffffff",dark:`${ot.neutral[750]}`},modalSelected:{light:ot.neutral[50],dark:ot.neutral[825]},hover:{light:ot.neutral[37],dark:ot.neutral[800]},accent:{light:ot.primary[550],dark:ot.primary[550],fg:{light:ot.primary[550],dark:ot.primary[400]}},accentHover:{light:ot.primary[600],dark:ot.primary[500]},unAccent:{light:ot.neutral[500],dark:ot.neutral[400]},unAccentHover:{light:ot.neutral[400],dark:ot.neutral[500]},separator:{light:ot.neutral[75],dark:ot.neutral[750]},inverse:{light:"#ffffff",dark:"#ffffff"},unavailable:{light:ot.neutral[100],dark:ot.neutral[600]}};b5(({addUtilities:e,theme:t,e:r})=>{const n=t("semanticColors"),o=Object.entries(n).map(([i,a])=>{var s,l,u,f;return{[`.fg-${r(`${i}`)}`]:{color:`${((s=a.fg)==null?void 0:s.light)??a.light}`},[`.dark .fg-${r(`${i}`)}`]:{color:`${((l=a.fg)==null?void 0:l.dark)??a.dark}`},[`.surface-${r(`${i}`)}`]:{backgroundColor:`${a.light}`},[`.dark .surface-${r(`${i}`)}`]:{backgroundColor:`${a.dark}`},[`.separator-${r(`${i}`)}`]:{borderColor:`${((u=a.fg)==null?void 0:u.light)??a.light}`},[`.dark .separator-${r(`${i}`)}`]:{borderColor:`${((f=a.fg)==null?void 0:f.dark)??a.dark}`}}});e(o)});var mu="fill-[--surface-bg] dark:fill-[--surface-bg]",I6="fill-[--surface-bg] dark:fill-[--surface-bg]",ks="min-bs-[2.5rem]",P6="pli-3",k6="pli-4",N6=`${ks} ${P6}`,D6=`${ks} ${k6}`,Ns="min-bs-[2.5rem] pointer-fine:min-bs-[2rem]",L6="pli-2",M6="pli-2.5",F6=`${Ns} ${L6}`,j6=`${Ns} ${M6}`,eb=(e="coarse")=>e==="fine"?Ns:ks,Ds="opacity-40 cursor-not-allowed shadow-none",B6="data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed",bu=({elevation:e})=>[e==="group"?"shadow-sm":e==="chrome"?"shadow-none":"shadow"],No=({elevation:e})=>[e==="group"?"shadow":e==="chrome"?"shadow-lg":"shadow-none"],Rr="focus:outline-none focus-visible:z-[1] focus-visible:hover:outline-none dark:focus-visible:hover:outline-none focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-primary-350 focus-visible:ring-offset-white dark:focus-visible:ring-primary-450 dark:focus-visible:ring-offset-black",tb="focus:outline-none focus-visible:outline-none focus:ring-0 ring-0 focus:border-0 border-0",R6="ring-2 ring-offset-0 ring-primary-350 ring-offset-white dark:ring-primary-450 dark:ring-offset-black",U6="transition-colors duration-100 linear hover:surface-hover",rb="hover:surface-hover",W6="fixed inset-0 z-0 overflow-auto overscroll-auto scroll-smooth",nb="will-change-[opacity,transform] data-[side=top]:animate-slideDownAndFade data-[side=right]:animate-slideLeftAndFade data-[side=bottom]:animate-slideUpAndFade data-[side=left]:animate-slideRightAndFade",V6="will-change-[opacity,transform] animate-slideUpAndFade",H6="separator-separator",z6="self-stretch border-ie",ob="self-stretch border-be",G6="data-[highlighted]:bg-primary-100 dark:data-[highlighted]:bg-primary-850 hover:data-[highlighted]:bg-primary-150 hover:dark:data-[highlighted]:bg-primary-800",K6="base-surface md:fixed-surface backdrop-blur-md dark:backdrop-blur-lg",q6="separator-separator",Y6="separator-separator",Do="modal-surface",Rt=()=>[Po.isLength],Lo=()=>["auto",Po.isLength],Mo=()=>["",Po.isLength],$n=()=>[Po.isAny],Cn=()=>["none","","sm","md","lg","xl","2xl","3xl","full",Po.isArbitraryLength],J6={float:[{float:["start","end"]}],clear:[{clear:["start","end"]}],resize:[{resize:["block ","inline"]}],"text-alignment":[{text:["start","end"]}],"logical.overscroll-b":[{"overscroll-b":["auto ","contain","auto"]}],"logical.overscroll-i":[{"overscroll-b":["auto ","contain","auto"]}],"logical.bs":[{bs:Rt()}],"logical.min-bs":[{"min-bs":$n()}],"logical.max-bs":[{"max-bs":$n()}],"logical.is":[{is:Rt()}],"logical.min-is":[{"min-is":$n()}],"logical.max-is":[{"max-is":$n()}],"logical.mlb":[{mlb:Rt()}],"logical.mli":[{mli:Rt()}],"logical.mbs":[{mbs:Rt()}],"logical.mbe":[{mbe:Rt()}],"logical.mis":[{mis:Rt()}],"logical.mie":[{mie:Rt()}],"logical.plb":[{plb:Rt()}],"logical.pli":[{pli:Rt()}],"logical.pbs":[{pbs:Rt()}],"logical.pbe":[{pbe:Rt()}],"logical.pis":[{pis:Rt()}],"logical.pie":[{pie:Rt()}],"logical.space-b":[{"space-b":Rt()}],"logical.space-i":[{"space-i":Rt()}],"logical.inset-block":[{"inset-block":Lo()}],"logical.inset-inline":[{"inset-inline":Lo()}],"logical.block-start":[{"block-start":Lo()}],"logical.block-end":[{"block-end":Lo()}],"logical.inline-start":[{"inline-start":Lo()}],"logical.inline-end":[{"inline-end":Lo()}],"logical.border-bs":[{"border-bs":Mo()}],"logical.border-be":[{"border-be":Mo()}],"logical.border-is":[{"border-is":Mo()}],"logical.border-ie":[{"border-ie":Mo()}],"logical.border-color-bs":[{"border-bs":$n()}],"logical.border-color-be":[{"border-be":$n()}],"logical.border-color-is":[{"border-is":$n()}],"logical.border-color-ie":[{"border-ie":$n()}],"logical.rounded-bs":[{"rounded-bs":Cn()}],"logical.rounded-be":[{"rounded-be":Cn()}],"logical.rounded-is":[{"rounded-is":Cn()}],"logical.rounded-ie":[{"rounded-ie":Cn()}],"logical.rounded-ss":[{"rounded-ss":Cn()}],"logical.rounded-se":[{"rounded-se":Cn()}],"logical.rounded-es":[{"rounded-es":Cn()}],"logical.rounded-ee":[{"rounded-ee":Cn()}],"logical.divide-b":[{"divide-b":Mo()}],"logical.divide-i":[{"divide-i":Mo()}]},X6=e=>Rm(e,{extend:{classGroups:J6,conflictingClassGroups:{"inset-block":["logical.block-start","logical.block-end"],"inset-inline":["logical.inline-start","logical.inline-end"],p:["logical.plb","logical.pli","logical.pbs","logical.pbe","logical.pis","logical.pie"],pli:["logical.pis","logical.pie"],plb:["logical.pbs","logical.pbe"],m:["logical.mlb","logical.mli","logical.mbs","logical.mbe","logical.mis","logical.mie"],mli:["logical.mis","logical.mie"],mlb:["logical.mbs","logical.mbe"],overscroll:["overscroll-i","overscroll-b"],rounded:["logical.rounded-bs","logical.rounded-be","logical.rounded-is","logical.rounded-ie","logical.rounded-ss","logical.rounded-se","logical.rounded-es","logical.rounded-ee"],"logical.rounded-bs":["logical.rounded-ss","logical.rounded-se"],"logical.rounded-be":["logical.rounded-es","logical.rounded-ee"],"logical.rounded-is":["logical.rounded-ss","logical.rounded-es"],"logical.rounded-ie":["logical.rounded-ee","logical.rounded-se"],"border-color":["logical.border-color-bs","logical.border-color-be","logical.border-color-is","logical.border-color-ie"],border:["logical.border-bs","logical.border-be","logical.border-is","logical.border-ie"]}}}),yu=Object.keys(T6),ue=OI({extend:{classGroups:{"font-family":["font-body","font-mono"],"font-weight":["font-thin","font-extralight","font-light","font-normal","font-medium","font-semibold","font-bold","font-extrabold","font-black",Po.isArbitraryNumber],foreground:yu.map(e=>`fg-${e}`),surface:yu.map(e=>`surface-${e}`),separator:yu.map(e=>`separator-${e}`)}}},X6),wu=new Map([[0,"is-0"],["px","is-px"],[.5,"is-0.5"],[1,"is-1"],[1.5,"is-1.5"],[2,"is-2"],[2.5,"is-2.5"],[3,"is-3"],[3.5,"is-3.5"],[4,"is-4"],[5,"is-5"],[6,"is-6"],[7,"is-7"],[8,"is-8"],[9,"is-9"],[10,"is-10"],[11,"is-11"],[12,"is-12"],[14,"is-14"],[16,"is-16"],[20,"is-20"],[24,"is-24"],[28,"is-28"],[32,"is-32"],[36,"is-36"],[40,"is-40"],[44,"is-44"],[48,"is-48"],[52,"is-52"],[56,"is-56"],[60,"is-60"],[64,"is-64"],[72,"is-72"],[80,"is-80"],[96,"is-96"]]),ib=new Map([[0,"bs-0"],["px","bs-px"],[.5,"bs-0.5"],[1,"bs-1"],[1.5,"bs-1.5"],[2,"bs-2"],[2.5,"bs-2.5"],[3,"bs-3"],[3.5,"bs-3.5"],[4,"bs-4"],[5,"bs-5"],[6,"bs-6"],[7,"bs-7"],[8,"bs-8"],[9,"bs-9"],[10,"bs-10"],[11,"bs-11"],[12,"bs-12"],[14,"bs-14"],[16,"bs-16"],[20,"bs-20"],[24,"bs-24"],[28,"bs-28"],[32,"bs-32"],[36,"bs-36"],[40,"bs-40"],[44,"bs-44"],[48,"bs-48"],[52,"bs-52"],[56,"bs-56"],[60,"bs-60"],[64,"bs-64"],[72,"bs-72"],[80,"bs-80"],[96,"bs-96"]]),Ui=new Set(wu.keys()),_u=ib.get.bind(ib),ab=wu.get.bind(wu),Ve=e=>ue(_u(e),ab(e)),sb=(e,t)=>{if(Ui.has(e))return e;if(e<=0)return 0;if(e===1)return"px";{const r=Math.floor(e),n=Math.floor(e*2)/2,o=Math.floor(e/2)*2,i=Math.floor(e/4)*4;return Ui.has(n)?n:Ui.has(r)?r:Ui.has(o)?o:Ui.has(i)?i:t}},lb=e=>e==="px"?1:e,Eu="placeholder-neutral-500 dark:placeholder-neutral-400",Ot="text-xs font-normal fg-description",Z6="text-xs font-normal fg-base",Q6="text-xs font-normal",eP="text-xs font-medium text-success-550 dark:text-success-300",tP="text-xs font-medium text-info-550 dark:text-info-300",rP="text-xs font-medium text-warning-550 dark:text-warning-300",nP="text-xs font-medium text-error-550 dark:text-error-300",oP=e=>{switch(e){case"success":return eP;case"info":return tP;case"warning":return rP;case"error":return nP;default:return}},iP="bg-neutral-25 dark:bg-neutral-850",aP="shadow-success-500/50 dark:shadow-success-500/50 text-success-600 dark:text-success-100 bg-success-50 dark:bg-success-900",sP="shadow-info-500/50 dark:shadow-info-500/50 text-info-600 dark:text-info-100 bg-info-50 dark:bg-info-900",lP="shadow-warning-500/50 dark:shadow-warning-500/50 text-warning-600 dark:text-warning-100 bg-warning-50 dark:bg-warning-900",cP="shadow-error-500/50 dark:shadow-error-500/50 text-error-600 dark:text-error-100 bg-error-50 dark:bg-error-900",uP=e=>{switch(e){case"success":return aP;case"info":return sP;case"warning":return lP;case"error":return cP;default:return iP}},fP=(e,...t)=>ue("overflow-anchored overflow-auto",...t),dP=(e,...t)=>ue("overflow-anchor is-px bs-px",...t),pP={root:fP,anchor:dP},hP=({size:e=10,inGroup:t},...r)=>ue("relative inline-flex shrink-0",Ve(e),t&&(e==="px"||e<=3?"-mie-1":"-mie-2"),...r),gP=({srOnly:e},...t)=>ue(e&&"sr-only",...t),vP=({srOnly:e},...t)=>ue(Ot,e&&"sr-only",...t),mP=({variant:e},...t)=>ue("is-full bs-full bg-[--surface-bg]",e==="circle"?"rounded-full":"rounded",...t),bP=({status:e,size:t=3},...r)=>ue("absolute block-end-0 inline-end-0",Ve(t),e==="inactive"?"text-warning-350 dark:text-warning-250":e==="active"?"text-success-350 dark:text-success-250":"text-neutral-350 dark:text-neutral-250",...r),yP=({status:e,variant:t,animation:r},...n)=>ue("absolute inset-0 border-2",t==="circle"?"rounded-full":"rounded",e==="current"?"border-primary-400 dark:border-primary-500":e==="active"?"border-success-400 dark:border-success-400":e==="error"?"border-error-400 dark:border-error-500":e==="warning"?"border-warning-400 dark:border-warning-500":e==="inactive"?"separator-separator":e==="internal"?"border-fuchsia-600":"border-[color:var(--surface-bg)]",r==="pulse"?"animate-halo-pulse":"",...n),wP=(e,...t)=>ue("fill-white",...t),_P=(e,...t)=>ue("inline-flex items-center",...t),EP=({size:e,srOnly:t},...r)=>ue(t?"sr-only":"rounded-full truncate text-sm leading-none plb-1 pli-2 relative z-[1] flex items-center justify-center",e&&_u(e),...r),xP=({srOnly:e},...t)=>ue(e?"sr-only":Ot,...t),SP={root:hP,label:gP,description:vP,statusIcon:bP,frame:mP,ring:yP,fallbackText:wP,group:_P,groupLabel:EP,groupDescription:xP},$P=(e,...t)=>ue("shrink-0 flex items-center",...t),CP=(e,...t)=>ue("contents",...t),AP=(e,...t)=>ue("contents",...t),OP=(e,...t)=>ue(...t),TP=(e,...t)=>ue("opacity-50",...t),IP={root:$P,list:CP,listItem:AP,current:OP,separator:TP},PP="fg-inverse surface-accent hover:surface-accentHover aria-pressed:bg-primary-500 dark:aria-pressed:bg-primary-500 data-[state=open]:bg-primary-500 dark:data-[state=open]:bg-primary-500 aria-checked:bg-primary-500 dark:aria-checked:bg-primary-500 aria-checked:text-primary-100",kP="surface-input",NP=kP+" data-[state=open]:surface-input aria-pressed:fg-accent aria-pressed:surface-base aria-checked:fg-accent aria-checked:surface-base",DP=rb+" hover:text-inherit data-[state=open]:surface-input aria-pressed:fg-accent aria-pressed:surface-base aria-checked:fg-accent aria-checked:surface-base",LP=(e,...t)=>{const r=e.variant??"default";return ue("font-medium text-sm shrink-0 inline-flex select-none items-center justify-center overflow-hidden","transition-color duration-100",e.density==="fine"?j6:D6,e.disabled&&Ds,!e.inGroup&&"rounded-md",!e.textWrap&&"text-ellipsis whitespace-nowrap",!e.disabled&&!e.inGroup&&(r==="default"||r==="primary")&&bu({elevation:e.elevation}),!e.disabled&&U6,r!=="outline"&&" hover:border-transparent dark:hover:border-transparent",r==="default"&&NP,!e.disabled&&r==="ghost"&&DP,r==="primary"&&PP,r==="outline"&&"border separator-base",!e.disabled&&Rr,"group",...t)},MP=(e,...t)=>ue("inline-flex rounded-md [&>:first-child]:rounded-is-md [&>:last-child]:rounded-ie-md [&>button]:relative",bu({elevation:e.elevation}),...t),FP={root:LP,group:MP},jP="overflow-auto grid place-items-center p-2 md:p-4 lg:p-8",BP=(e,...t)=>ue("fixed z-20 inset-inline-0 block-start-0 bs-[100dvb] surface-scrim",jP,...t),RP=({inOverlayLayout:e,elevation:t="chrome"},...r)=>ue("flex flex-col",!e&&"fixed z-20 top-[50%] left-[50%] -translate-x-[50%] -translate-y-[50%]","is-[95vw] md:is-full max-is-[24rem] border rounded-lg p-4",V6,No({elevation:t}),"surface-baseGlass backdrop-blur",Y6,Rr,...r),UP=({srOnly:e},...t)=>ue("rounded shrink-0 text-xl font-medium",e&&"sr-only",...t),WP=({srOnly:e},...t)=>ue("mlb-2",Ot,e&&"sr-only",...t),VP={overlay:BP,content:RP,title:UP,description:WP},HP=(e,...t)=>ue("rounded-md p-1 max-bs-[--radix-dropdown-menu-content-available-height] overflow-y-auto",...t),zP=(e,...t)=>ue("is-48 rounded-md md:is-56 z-[30]",nb,Do,No({elevation:"group"}),...t),GP=(e,...t)=>ue("flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-2 text-sm","data-[highlighted]:surface-hover",tb,B6,...t),KP=(e,...t)=>ue("mlb-1 mli-2 bs-px surface-separator",...t),qP=(e,...t)=>ue(Ot,"select-none pli-2 plb-2",...t),YP=(e,...t)=>ue(mu,...t),JP={content:zP,viewport:HP,item:GP,separator:KP,groupLabel:qP,arrow:YP},XP="",ZP="shadow-success-500/50 dark:shadow-success-600/50",QP="shadow-info-500/50 dark:shadow-info-600/50",ek="shadow-warning-500/50 dark:shadow-warning-600/50",tk="shadow-error-500/50 dark:shadow-error-600/50",cb="transition-colors bg-[--input-bg] focus:surface-attention border-transparent focus:border-transparent",ub="hover:bg-[--input-bg-hover] dark:hover:bg-[--input-bg-hover] focus:hover:surface-attention",fb="shadow-inner transition-colors surface-unAccent aria-checked:surface-accent aria-[checked=mixed]:surface-accent",db="hover:surface-unAccentHover hover:aria-checked:surface-accentHover hover:aria-[checked=mixed]:surface-accentHover",pb=e=>{switch(e){case"success":return ZP;case"info":return QP;case"warning":return ek;case"error":return tk;default:return null}},rk=e=>["is-full bg-transparent text-current",e.density==="fine"?Ns:ks,Eu,tb,e.disabled&&Ds],nk=e=>["is-full text-base rounded text-[color:var(--surface-text)]",cb,Eu,e.density==="fine"?F6:N6,e.disabled?Ds:ub],ok=e=>["is-full text-base rounded text-[color:var(--surface-text)]",cb,ub,e.focused&&"surface-attention",Eu,pb(e.validationValence),e.disabled&&Ds,e.focused&&R6],ik=(e,...t)=>e.variant==="subdued"?ue(...rk(e),...t):e.variant==="static"?ue(...ok(e),...t):ue(...nk(e),!e.disabled&&Rr,pb(e.validationValence)||XP,...t),ak=({size:e=5,disabled:t},...r)=>ue(Ve(e),fb,!t&&db,"shrink-0 flex items-center justify-center rounded text-white",Rr,...r),sk=({size:e=5},...t)=>ue(Ve(sb(lb(e)*.7,4)),...t),lk=({size:e=5,disabled:t},...r)=>ue(_u(e),ab(sb(lb(e)*1.75,9)),fb,!t&&db,"cursor-pointer shrink-0 rounded-full pli-1 mx-1 relative",Rr,...r),ck=({size:e=5},...t)=>ue(Ve(e==="px"?"px":e-2),"block bg-white rounded-full separator-separator transition-transform duration-100 will-change-transform data-[state=checked]:translate-x-[100%]",...t),uk=(e,...t)=>ue("font-mono selection:bg-transparent mli-auto",e.disabled&&"cursor-not-allowed",...t),fk=(e,...t)=>ue("block text-sm font-medium",e.srOnly&&"sr-only",...t),dk=(e,...t)=>ue(Ot,e.srOnly&&"sr-only",...t),pk=(e,...t)=>ue("leading-none mlb-1",e.srOnly&&"sr-only",...t),hk=(e,...t)=>ue(Ot,e.srOnly?"sr-only":oP(e.validationValence),...t),gk={input:ik,inputWithSegments:uk,checkbox:ak,checkboxIndicator:sk,label:fk,description:dk,validation:hk,switch:lk,switchThumb:ck,descriptionAndValidation:pk},vk=(e,...t)=>ue("underline decoration-1 underline-offset-2 transition-color rounded-sm","text-primary-600 hover:text-primary-500 dark:text-primary-300 hover:dark:text-primary-200","visited:text-teal-600 visited:hover:text-teal-500 visited:dark:text-teal-300 visited:hover:dark:text-teal-200",Rr,...t),mk={root:vk},bk=(e,...t)=>ue(...t),yk=({collapsible:e},...t)=>ue(!e&&"flex",...t),wk=({density:e},...t)=>ue(Ve(e==="fine"?8:10),"shrink-0 flex items-start justify-center",...t),_k=({density:e},...t)=>ue(eb(e),...t),Ek=(e,...t)=>ue(Ve(5),"mbs-2.5",...t),xk=({density:e},...t)=>ue("is-5 rounded flex justify-center items-center",eb(e),rb,Rr,...t),Sk=(e,...t)=>ue(Ve(5),...t),$k={root:bk,item:{root:yk,endcap:wk,heading:_k,dragHandleIcon:Ek,openTrigger:xk,openTriggerIcon:Sk}},Fo={start:{width:"sm:is-[270px]",sidebar:"sm:-inline-start-[270px]",content:"pis-[270px]"},end:{width:"sm:is-[360px]",sidebar:"sm:-inline-end-[360px]",content:"pie-[360px]"}},Ck=({inlineStartSidebarOpen:e,inlineEndSidebarOpen:t,side:r},...n)=>ue("fixed block-start-0 block-end-0 is-[100vw] z-10 overscroll-contain overflow-x-hidden overflow-y-auto","transition-[inset-inline-start,inset-inline-end] duration-200 ease-in-out",q6,r==="inline-start"?Fo.start.width:Fo.end.width,r==="inline-start"?e?"inline-start-0":ue("-inline-start-[100vw]",Fo.start.sidebar):t?"inline-end-0":ue("-inline-end-[100vw]",Fo.end.sidebar),r==="inline-start"?"border-ie":"border-is",K6,...n),Ak=({isLg:e,inlineStartSidebarOpen:t,inlineEndSidebarOpen:r,bounce:n},...o)=>ue("transition-[padding-inline-start,padding-inline-end] duration-200 ease-in-out",e&&t?Fo.start.content:"pis-0",e&&r?Fo.end.content:"pie-0",n&&W6,...o),Ok=({isLg:e,inlineStartSidebarOpen:t,inlineEndSidebarOpen:r,side:n},...o)=>ue("fixed inset-0 z-[9] surface-scrim","transition-opacity duration-200 ease-in-out",!e&&(t||r)?"opacity-100":"opacity-0",!e&&(t||r)?"block":"hidden",...o),Tk={content:Ak,sidebar:Ck,overlay:Ok},Ik=({valence:e,elevation:t},...r)=>ue("p-3 rounded-md max-is-full overflow-auto",bu({elevation:t}),uP(e),...r),Pk=(e,...t)=>ue("text-base font-medium mb-2",...t),kk=(e,...t)=>ue(...t),Nk={root:Ik,title:Pk,body:kk},Dk=({constrainInline:e,constrainBlock:t},...r)=>ue("p-1 rounded-lg",e&&"max-is-[--radix-popover-content-available-width] overflow-x-auto",t&&"max-bs-[--radix-popover-content-available-height] overflow-y-auto",...r),Lk=(e,...t)=>ue("z-[30] rounded-lg",Do,No({elevation:"group"}),Rr,...t),Mk=(e,...t)=>ue(I6,...t),Fk={content:Lk,viewport:Dk,arrow:Mk},jk=(e,...t)=>ue("overflow-hidden",...t),Bk=(e,...t)=>ue("is-full bs-full scroll-smooth","[&>div]:table-fixed [&>div]:w-full",...t),Rk=(e,...t)=>ue("flex select-none touch-none p-0.5 ease-out","data-[orientation=vertical]:is-1.5 data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:bs-1.5",...t),Uk=(e,...t)=>ue("bg-neutral-500/50 flex-1 rounded-lg relative","before:content-[''] before:absolute before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:w-full before:h-full before:min-w-[44px] before:min-h-[44px]",...t),Wk=(e,...t)=>ue(...t),Vk={root:jk,viewport:Bk,scrollbar:Rk,thumb:Uk,corner:Wk},Hk=({elevation:e="chrome"},...t)=>ue("p-1 z-[50] rounded",Do,No({elevation:e}),...t),zk=(e,...t)=>ue("relative flex items-center pis-6 pie-3 plb-1","text-base leading-none rounded-sm select-none outline-none",G6,...t),Gk=(e,...t)=>ue("absolute inline-start-0 is-6 inline-flex items-center justify-center",...t),Kk=(e,...t)=>ue(mu,...t),qk=(e,...t)=>ue(ob,...t),Yk=(e,...t)=>ue(Do,"flex items-center justify-center cursor-default bs-6 is-full",...t),Jk={content:Hk,item:zk,itemIndicator:Gk,arrow:Kk,separator:qk,scrollButton:Yk},Xk=({orientation:e},...t)=>ue(e==="vertical"?z6:ob,H6,...t),Zk={root:Xk},Qk=(e,...t)=>ue("is-20 bs-1 inline-block relative bg-neutral-400/25 rounded-full overflow-hidden",...t),e4=({indeterminate:e},...t)=>ue("absolute inline-start-0 inset-block-0 inline-block bg-neutral-400 rounded-full",e&&"animate-progress-indeterminate",...t),t4={root:Qk,bar:e4},r4={neutral:"bg-neutral-200 text-neutral-800 dark:bg-neutral-700 dark:text-neutral-150",red:"bg-red-200 text-red-800 dark:bg-red-700 dark:text-red-150",orange:"bg-orange-200 text-orange-800 dark:bg-orange-700 dark:text-orange-150",amber:"bg-amber-200 text-amber-800 dark:bg-amber-700 dark:text-amber-150",yellow:"bg-yellow-200 text-yellow-800 dark:bg-yellow-700 dark:text-yellow-150",lime:"bg-lime-200 text-lime-800 dark:bg-lime-700 dark:text-lime-150",green:"bg-green-200 text-green-800 dark:bg-green-700 dark:text-green-150",emerald:"bg-emerald-200 text-emerald-800 dark:bg-emerald-700 dark:text-emerald-150",teal:"bg-teal-200 text-teal-800 dark:bg-teal-700 dark:text-teal-150",cyan:"bg-cyan-200 text-cyan-800 dark:bg-cyan-700 dark:text-cyan-150",sky:"bg-sky-200 text-sky-800 dark:bg-sky-700 dark:text-sky-150",blue:"bg-blue-200 text-blue-800 dark:bg-blue-700 dark:text-blue-150",indigo:"bg-indigo-200 text-indigo-800 dark:bg-indigo-700 dark:text-indigo-150",violet:"bg-violet-200 text-violet-800 dark:bg-violet-700 dark:text-violet-150",purple:"bg-purple-200 text-purple-800 dark:bg-purple-700 dark:text-purple-150",fuchsia:"bg-fuchsia-200 text-fuchsia-800 dark:bg-fuchsia-700 dark:text-fuchsia-150",pink:"bg-pink-200 text-pink-800 dark:bg-pink-700 dark:text-pink-150",rose:"bg-rose-200 text-rose-800 dark:bg-rose-700 dark:text-rose-150",info:"bg-info-200 text-info-800 dark:bg-info-700 dark:text-info-150",success:"bg-success-200 text-success-800 dark:bg-success-700 dark:text-success-150",warning:"bg-warning-200 text-warning-800 dark:bg-warning-700 dark:text-warning-150",error:"bg-error-200 text-error-800 dark:bg-error-700 dark:text-error-150"},n4=({palette:e="neutral"},...t)=>ue("text-xs font-semibold pli-2 plb-0.5 rounded cursor-default",r4[e],...t),o4={root:n4},i4=(e,...t)=>ue("z-[70] fixed bottom-4 inset-x-4 w-auto md:top-4 md:right-4 md:left-auto md:bottom-auto md:w-full md:max-w-sm rounded-lg flex flex-col gap-2",...t),a4=(e,...t)=>ue("rounded-lg flex p-2 gap-2",Do,No({elevation:"chrome"}),"radix-state-open:animate-toast-slide-in-bottom md:radix-state-open:animate-toast-slide-in-right","radix-state-closed:animate-toast-hide","radix-swipe-end:animate-toast-swipe-out","translate-x-radix-toast-swipe-move-x","radix-swipe-cancel:translate-x-0 radix-swipe-cancel:duration-200 radix-swipe-cancel:ease-[ease]",Rr,...t),s4=(e,...t)=>ue("grow flex flex-col gap-1 justify-center pis-2",...t),l4=(e,...t)=>ue("shrink-0 flex flex-col gap-1 justify-center",...t),c4=({srOnly:e},...t)=>ue("shrink-0 text-md font-medium",e&&"sr-only",...t),u4=({srOnly:e},...t)=>ue(Ot,"shrink-0",e&&"sr-only",...t),f4={viewport:i4,root:a4,body:s4,title:c4,description:u4,actions:l4},d4=(e,...t)=>ue("flex items-center gap-2 is-full",...t),p4={root:d4},h4=(e,...t)=>ue("inline-flex items-center rounded-md plb-2 pli-3",Do,nb,No({elevation:"group"}),Q6,...t),g4=(e,...t)=>ue(mu,...t),v4={content:h4,arrow:g4},m4={themeName:()=>"default",anchoredOverflow:pP,avatar:SP,breadcrumb:IP,button:FP,dialog:VP,menu:JP,input:gk,link:mk,list:$k,main:Tk,message:Nk,popover:Fk,select:Jk,scrollArea:Vk,separator:Zk,status:t4,tag:o4,toast:f4,toolbar:p4,tooltip:v4},b4=e=>(t,r,n,...o)=>{const i=C6(e,t);return typeof i=="function"?i(n,...o):r},y4=b4(m4);const hb=c.createContext({textValue:"",setTextValue:async e=>{}}),gb=()=>c.useContext(hb),xu=({children:e})=>{const[t,r]=c.useState(""),n=c.useCallback(async o=>(await navigator.clipboard.writeText(o),r(o)),[]);return c.createElement(hb.Provider,{value:{textValue:t,setTextValue:n}},e)},vb="invisible bs-px -mbe-px overflow-hidden",w4=({value:e,classNames:t,iconProps:r,...n})=>{const{t:o}=tt("os"),{textValue:i,setTextValue:a}=gb(),s=i===e;return c.createElement(yr,{...n,classNames:["inline-flex flex-col justify-center",t],onClick:()=>a(e),"data-testid":"copy-invitation"},c.createElement("div",{role:"none",className:ue("flex gap-1 items-center",s&&vb)},c.createElement("span",{className:"pli-1"},o("copy invitation code label")),c.createElement(ze.Copy,{className:Ve(4),weight:"bold",...r})),c.createElement("div",{role:"none",className:ue("flex gap-1 items-center",!s&&vb)},c.createElement("span",{className:"pli-1"},o("copy invitation code success label")),c.createElement(ze.Check,{className:Ve(4),weight:"bold",...r})))},_4=({value:e,classNames:t,iconProps:r,variant:n,...o})=>{const{t:i}=tt("os"),{textValue:a,setTextValue:s}=gb(),u=i(a===e?"copy invitation code success label":"copy invitation code label"),[f,d]=c.useState(!1);return c.createElement(wr.Root,{delayDuration:1500,open:f,onOpenChange:d},c.createElement(wr.Portal,null,c.createElement(wr.Content,{side:"bottom",sideOffset:12,classNames:"z-30"},c.createElement("span",null,u),c.createElement(wr.Arrow,null))),c.createElement(wr.Trigger,{"aria-label":u,...o,onClick:()=>s(e).then(()=>d(!0)),"data-testid":"copy-invitation",asChild:!0},c.createElement(yr,{variant:n,classNames:["inline-flex flex-col justify-center",t]},c.createElement(ze.Copy,{className:Ve(5),weight:"bold",...r}))))},Su=({children:e,description:t,before:r,after:n,variant:o="default",elevation:i,slots:a={},...s})=>{var g,v,b,m;const l=Et("compoundButton-label"),u=Et("compoundButton-description"),{tx:f}=Ae(),d=zn(i),p={...s,variant:o,elevation:d,textWrap:!0},h=f("button.root","button button--compound",p,"flex items-center gap-4 plb-2.5",(g=a.root)==null?void 0:g.className);return c.createElement("button",{...s,...a.root,className:h,"aria-labelledby":l,...t&&{"aria-describedby":u}},r&&c.createElement("div",{role:"none",className:"grow-0"},r),c.createElement("div",{role:"none",...a.middle,className:ue("grow whitespace-normal flex flex-col gap-1 text-left",(v=a.middle)==null?void 0:v.className)},c.createElement("p",{...a.label,id:l,className:ue((b=a.label)==null?void 0:b.className)},e),t&&c.createElement("p",{id:u,...a.description,className:ue("text-xs mbe-1 font-normal",o==="primary"?Z6:Ot,(m=a.description)==null?void 0:m.className)},t)),n&&c.createElement("div",{role:"none",className:"grow-0"},n))};var Ls={adjectives:["abundant","accessible","accomplished","accurate","achievable","adaptable","adaptive","adequate","adjustable","admirable","admiring","adorable","adored","adoring","adroit","adulatory","advanced","advantageous","adventurous","affable","affectionate","affirmative","affluent","affordable","agile","agreeable","alluring","altruistic","amazed","amazing","ambitious","amenable","amiable","amicable","ample","amusing","angelic","appealing","appreciable","appreciated","appreciative","appropriate","ardent","articulate","artistic","assuring","astonished","astonishing","astounded","astounding","athletic","attentive","attractive","audible","auspicious","authentic","autonomous","available","avid","awed","awesome","awestruck","beauteous","beautiful","believable","beloved","beneficent","beneficial","benevolent","blameless","blissful","blithe","bonny","booming","boundless","bountiful","brainiest","brainy","brave","breathtaking","bright","brighter","brightest","brilliant","brisk","brotherly","bullish","buoyant","calm","calming","capable","captivating","carefree","catchy","celebrated","celebratory","champion","charismatic","charitable","charming","chaste","cheaper","cheapest","cheerful","cheery","cherished","chivalrous","classic","classy","clean","cleaner","cleanest","cleanly","clear","cleared","clearer","clever","coherent","cohesive","colorful","comely","comfortable","comforting","comfy","commendable","commodious","compact","compatible","competitive","compliant","conciliatory","concise","confident","congenial","considerate","consistent","constructive","consummate","contrasty","convenient","convincing","cool","coolest","cooperative","correct","courageous","courteous","courtly","cozy","creative","credible","crisp","crisper","cushy","cute","daring","darling","dashing","dauntless","dazzled","dazzling","decent","decisive","dedicated","defeated","deft","delectable","delicate","delicious","delighted","delightful","dependable","deserving","desirable","desirous","detachable","devout","dexterous","dextrous","dignified","diligent","diplomatic","distinctive","diversified","divine","dominated","dumbfounded","durable","dynamic","eager","earnest","eased","easy","easygoing","ebullient","economical","ecstatic","educated","effective","efficacious","efficient","effortless","effusive","elated","elegant","elite","eloquent","eminent","enchanted","enchanting","encouraging","endearing","endorsed","energetic","engaging","engrossing","enhanced","enjoyable","enraptured","enterprising","entertaining","enthralled","enthusiastic","enticing","entranced","entrancing","enviable","envious","equitable","erudite","ethical","euphoric","evaluative","eventful","everlasting","evocative","exalted","exalting","exceeding","excellent","exceptional","excited","exciting","exemplary","exhilarating","expansive","exquisite","exuberant","exultant","fabulous","fair","faithful","famed","famous","fancier","fancy","fantastic","fascinating","fashionable","fast","faster","fastest","faultless","favorable","favored","favorite","fearless","feasible","feisty","felicitous","fertile","fervent","fervid","festive","fiery","fine","finer","finest","firmer","flashy","flatter","flattering","flawless","flexible","flourishing","fluent","fond","foolproof","foremost","formidable","fortuitous","fortunate","fragrant","free","freed","fresh","fresher","freshest","friendly","frugal","fruitful","fun","funny","futuristic","gainful","gallant","galore","generous","genial","gentle","gentlest","genuine","gifted","glad","glamorous","gleeful","glimmering","glistening","glorious","glowing","godlike","gold","golden","good","goodly","gorgeous","graceful","gracious","grand","grateful","gratified","gratifying","great","greatest","guiltless","gutsy","halcyon","hale","hallowed","handier","handsome","handy","happier","happy","hardier","hardy","harmless","harmonious","healthful","healthy","heartening","heartfelt","heartwarming","heavenly","helpful","heroic","hilarious","holy","honest","honorable","honored","hopeful","hospitable","hot","hottest","humane","humble","humorous","humourous","ideal","idolized","idyllic","illuminating","illustrious","imaginative","immaculate","immense","impartial","impassioned","impeccable","important","impressed","impressive","improved","improving","incredible","indebted","indulgent","industrious","inestimable","inexpensive","infallible","influential","ingenious","ingenuous","innocuous","innovative","insightful","inspiring","instructive","instrumental","intelligent","intelligible","interesting","intimate","intricate","intriguing","intuitive","invaluable","inventive","invigorating","invincible","inviolable","inviolate","invulnerable","irresistible","jolly","jovial","joyful","joyous","jubilant","judicious","keen","kindly","laudable","lavish","lawful","leading","lean","legendary","lighter","likable","like","liked","lionhearted","lively","logical","lovable","loved","lovely","loving","loyal","lucid","luckier","luckiest","lucky","lucrative","luminous","lush","lustrous","luxuriant","luxurious","luxury","lyrical","magic","magical","magnanimous","magnificent","majestic","manageable","marvellous","marvelous","masterful","matchless","mature","meaningful","memorable","merciful","meritorious","merry","mesmerized","mesmerizing","meticulous","mighty","miraculous","modern","modest","momentous","monumental","motivated","navigable","neat","neatest","nice","nifty","nimble","noble","noiseless","noteworthy","nourishing","observant","obtainable","optimal","optimistic","opulent","orderly","organized","outstanding","overjoyed","painless","palatial","pampered","panoramic","paramount","passionate","patient","patri","peaceable","peaceful","peerless","peppy","perfect","permissible","personalized","phenomenal","picturesque","playful","pleasant","pleased","pleasing","pleasurable","plentiful","plush","poetic","poignant","poised","polished","polite","popular","portable","posh","positive","powerful","praiseworthy","praising","precious","precise","preeminent","preferable","premier","prestigious","pretty","priceless","principled","privileged","prize","proactive","prodigious","productive","proficient","profound","progressive","prolific","prominent","promised","promising","prompt","proper","propitious","prosperous","protective","proud","proven","prudent","punctual","pure","purposeful","quaint","qualified","quicker","quiet","quieter","radiant","rapid","rapt","rapturous","rational","reachable","readable","ready","realistic","realizable","reasonable","reasoned","receptive","recommended","redeeming","refined","reformed","refreshed","refreshing","regal","rejoicing","relaxed","reliable","remarkable","renewed","renowned","replaceable","reputable","resilient","resolute","resounding","resourceful","respectable","respectful","resplendent","responsive","restful","restored","retractable","reverent","rewarding","rich","righteous","rightful","robust","romantic","roomier","rosy","safe","saintly","salutary","sane","satisfactory","satisfied","satisfying","scenic","seamless","seasoned","secure","selective","sensational","sensible","sensitive","serene","sexy","sharp","sharper","sharpest","shiny","significant","silent","simpler","simplest","simplified","sincere","skilled","skillful","sleek","slick","smart","smarter","smartest","smelly","smiling","smitten","smooth","smoother","smoothest","snappy","snazzy","sociable","soft","softer","solid","soulful","spacious","sparkling","spectacular","speedy","spellbinding","spellbound","spirited","spiritual","splendid","spontaneous","sporty","spotless","sprightly","stable","stainless","stately","statuesque","staunch","steadfast","steadiest","steady","stellar","stimulating","stimulative","streamlined","striking","strong","stronger","strongest","stunned","stunning","stupendous","sturdier","sturdy","stylish","stylized","suave","sublime","subsidized","substantive","succeeding","successful","sufficient","suitable","sumptuous","super","superb","superior","supple","supportive","supreme","surreal","sustainable","swankier","swankiest","swanky","sweeping","sweet","sweetheart","swift","talented","tantalizing","tempting","tenacious","tender","terrific","thankful","thinner","thoughtful","thrifty","thrilled","thrilling","thriving","tidy","timely","titillating","tolerable","top","topnotch","tough","tougher","toughest","tranquil","transparent","trendy","triumphal","triumphant","trusted","trusting","trustworthy","trusty","truthful","twinkly","unabashed","unaffected","unassailable","unbeatable","unbiased","unbound","undamaged","undaunted","undisputable","undisputed","unencumbered","unequivocal","unfettered","unlimited","unmatched","unparalleled","unreal","unrestricted","unrivaled","unselfish","unwavering","upbeat","upscale","usable","useful","valiant","valuable","verifiable","veritable","versatile","vibrant","victorious","viewable","vigilant","virtuous","visionary","vivacious","vivid","warm","warmer","warmhearted","wealthy","welcome","wholesome","wieldy","winning","wise","witty","wonderful","wondrous","workable","worth","worthwhile","worthy","young","youthful","zippy"],animals:["aardvark","albatross","alligator","angelfish","angora","ant","anteater","antelope","armadillo","avocet","baboon","badger","bandicoot","barnacle","barracuda","bat","beagle","bear","beaver","bee","beetle","bird","bison","bloodhound","boar","bobcat","bonobo","buffalo","bulldog","bullfrog","butterfly","buzzard","camel","cat","caterpillar","catfish","cattle","centipede","chameleon","cheetah","chicken","chihuahua","chimpanzee","chin","chinchilla","chipmunk","civet","clam","cockroach","coon","coral","corgi","cougar","cow","coyote","crab","crane","cuttlefish","dachshund","dalmatian","dane","deer","devil","dingo","dodo","dog","dogfish","dollar","dolphin","donkey","dormouse","dragon","dragonfly","duck","dugong","eagle","earwig","eel","elephant","emperor","emu","falcon","ferret","fish","flamingo","flounder","fly","forest","fowl","fox","foxhound","frog","gar","gecko","gerbil","gharial","gibbon","giraffe","goat","goose","gopher","gorilla","grasshopper","greyhound","grouse","guppy","hamster","hare","hedgehog","heron","hippopotamus","hornet","horse","hound","hummingbird","husky","hyena","hyrax","ibis","iguana","impala","insect","jackal","jaguar","jellyfish","kangaroo","kingfisher","kiwi","koala","kudu","labradoodle","ladybird","lemming","lemur","leopard","liger","lion","lionfish","lizard","llama","lobster","lynx","macaque","macaw","magpie","malamute","maltese","mammoth","manatee","mandrill","markhor","marmoset","mastiff","mayfly","meerkat","millipede","mole","mongoose","monkey","monster","moorhen","moose","moth","mouse","mule","newt","nightingale","ocelot","octopus","okapi","orangutan","ostrich","otter","owl","oyster","panda","panther","parrot","peacock","pelican","penguin","pheasant","pig","pike","piranha","platypus","pointer","poodle","porcupine","possum","prawn","puffin","pug","puma","quail","rabbit","raccoon","rat","rattlesnake","ray","reindeer","retriever","rhinoceros","robin","rottweiler","russel","salamander","scorpion","seahorse","seal","shark","sheep","sheepdog","shrew","shrimp","skater","skunk","sloth","slug","snail","snake","snowshoe","spaniel","sparrow","spider","sponge","squid","squirrel","squirt","starfish","stingray","stoat","swan","tapir","tarantula","termite","terrier","tiger","toad","tortoise","toucan","tuatara","turkey","turtle","uakari","urchin","vole","vulture","wallaby","walrus","warthog","wasp","weasel","whale","whippet","wildebeest","wolf","wolfhound","wolverine","wombat","woodlouse","woodpecker","worm","yak","zebra","zebu","zonkey","zorse"]},mb=e=>e.charAt(0).toUpperCase()+e.slice(1),$u=e=>{const t=e.length*2/3,r=e.substring(0,t),n=e.substring(t),o=mb(Ls.adjectives[parseInt(r,16)%Ls.adjectives.length]),i=mb(Ls.animals[parseInt(n,16)%Ls.animals.length]);return`${o} ${i}`};const bb=c.forwardRef(({identity:e,presence:t,onClick:r},n)=>{var l;const o=e.identityKey.toHex(),i=Et("identityListItem__label"),a=vs(o??"",12),s=((l=e.profile)==null?void 0:l.displayName)??$u(e.identityKey.toHex());return c.createElement(qc.Root,{classNames:ue("flex gap-2 pis-3 pie-1 items-center",r&&"cursor-pointer"),onClick:()=>r==null?void 0:r(),"data-testid":"identity-list-item",labelId:i,ref:n},c.createElement(Tt.Root,{status:t===Sa.SpaceMember.PresenceState.ONLINE?"active":"inactive",labelId:i},c.createElement(Tt.Frame,null,c.createElement(Tt.Fallback,{href:a})),c.createElement(Tt.Label,{classNames:"text-sm truncate pli-2"},s)))}),E4=({devices:e,onSelect:t})=>{const{t:r}=tt("os");return e.length>0?c.createElement(Kc,{classNames:"flex flex-col gap-2"},e.map(n=>{var i,a,s,l,u;const o={identityKey:n.deviceKey,profile:n.profile?{displayName:`${(i=n.profile)==null?void 0:i.platform} (${(a=n.profile)==null?void 0:a.platformVersion}) on ${(s=n.profile)==null?void 0:s.os} (${(l=n.profile)==null?void 0:l.osVersion}) ${((u=n.profile)==null?void 0:u.architecture)??"Unknown"}-bit`}:void 0};return c.createElement(bb,{key:n.deviceKey.toHex(),identity:o,onClick:t&&(()=>t(n))})})):c.createElement("div",{role:"none",className:"grow flex items-center p-2"},c.createElement("p",{className:ue(Ot,"text-center is-full")},r("empty device list message")))},x4=({spaceKey:e,includeSelf:t,onSelect:r})=>{const n=We.useClient(),o=Sa.useMembers(e),i=c.useMemo(()=>t?o.sort(a=>a.identity.identityKey.equals(n.halo.identity.get().identityKey)?-1:1):o.filter(a=>!a.identity.identityKey.equals(n.halo.identity.get().identityKey)),[o]);return c.createElement(S4,{members:i,onSelect:r})},S4=({members:e,onSelect:t})=>{const{t:r}=tt("os"),n=e.filter(o=>o.identity);return n.length>0?c.createElement(Kc,{classNames:"flex flex-col gap-2","data-testid":"space-members-list"},n.map(o=>c.createElement(bb,{key:o.identity.identityKey.toHex(),identity:o.identity,presence:o.presence,onClick:t&&(()=>t(o))}))):c.createElement("div",{role:"none",className:"grow flex items-center p-2"},c.createElement("p",{className:ue(Ot,"text-center is-full mlb-2")},r("empty space members message")))};var yb;(function(e){e[e.TRACE=5]="TRACE",e[e.DEBUG=10]="DEBUG",e[e.INFO=11]="INFO",e[e.WARN=12]="WARN",e[e.ERROR=13]="ERROR"})(yb||(yb={}));var wb;(function(e){(function(t){t[t.INCLUSIVE=1]="INCLUSIVE",t[t.EXPLICIT=2]="EXPLICIT"})(e.MatchingOptions||(e.MatchingOptions={}))})(wb||(wb={}));var _b;(function(e){e[e.ACTIVE=0]="ACTIVE",e[e.INACTIVE=1]="INACTIVE"})(_b||(_b={}));var Eb;(function(e){(function(t){t[t.NONE=0]="NONE",t[t.TRUNCATE=1]="TRUNCATE",t[t.HUMANIZE=2]="HUMANIZE"})(e.KEY_OPTION||(e.KEY_OPTION={}))})(Eb||(Eb={}));var xb;(function(e){(function(t){t[t.BROWSER=0]="BROWSER",t[t.SHARED_WORKER=1]="SHARED_WORKER",t[t.NODE=2]="NODE"})(e.PLATFORM_TYPE||(e.PLATFORM_TYPE={}))})(xb||(xb={}));var Sb;(function(e){e[e.CURRENT=0]="CURRENT",e[e.TRUSTED=1]="TRUSTED"})(Sb||(Sb={}));var $b;(function(e){(function(t){t[t.OFFLINE=0]="OFFLINE",t[t.ONLINE=1]="ONLINE",t[t.REMOVED=2]="REMOVED"})(e.PresenceState||(e.PresenceState={}))})($b||($b={}));var Cb;(function(e){e[e.INACTIVE=2]="INACTIVE",e[e.ACTIVE=6]="ACTIVE",e[e.CLOSED=1]="CLOSED",e[e.CONTROL_ONLY=7]="CONTROL_ONLY",e[e.INITIALIZING=4]="INITIALIZING",e[e.READY=3]="READY",e[e.ERROR=5]="ERROR"})(Cb||(Cb={}));var Ab;(function(e){(function(t){t[t.NONE=0]="NONE",t[t.INIT_AUTOMERGE=1]="INIT_AUTOMERGE"})(e.Migration||(e.Migration={}))})(Ab||(Ab={}));var we;(function(e){(function(t){t[t.INTERACTIVE=0]="INTERACTIVE",t[t.OFFLINE=1]="OFFLINE",t[t.MULTIUSE=2]="MULTIUSE"})(e.Type||(e.Type={})),function(t){t[t.DEVICE=0]="DEVICE",t[t.SPACE=1]="SPACE"}(e.Kind||(e.Kind={})),function(t){t[t.NONE=0]="NONE",t[t.SHARED_SECRET=1]="SHARED_SECRET"}(e.AuthMethod||(e.AuthMethod={})),function(t){t[t.INIT=0]="INIT",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED",t[t.READY_FOR_AUTHENTICATION=3]="READY_FOR_AUTHENTICATION",t[t.AUTHENTICATING=4]="AUTHENTICATING",t[t.SUCCESS=5]="SUCCESS",t[t.CANCELLED=6]="CANCELLED",t[t.TIMEOUT=7]="TIMEOUT",t[t.ERROR=8]="ERROR"}(e.State||(e.State={}))})(we||(we={}));var Ob;(function(e){(function(t){t[t.ADDED=0]="ADDED",t[t.REMOVED=1]="REMOVED"})(e.Action||(e.Action={})),function(t){t[t.CREATED=0]="CREATED",t[t.ACCEPTED=1]="ACCEPTED"}(e.Type||(e.Type={}))})(Ob||(Ob={}));var Tb;(function(e){e[e.OFFLINE=0]="OFFLINE",e[e.ONLINE=1]="ONLINE"})(Tb||(Tb={}));var $4=200,Cu="__lodash_hash_undefined__",C4=1/0,Ib=9007199254740991,A4="[object Arguments]",O4="[object Function]",T4="[object GeneratorFunction]",I4="[object Symbol]",P4=/[\\^$.*+?()[\]{}|]/g,k4=/^\[object .+?Constructor\]$/,N4=/^(?:0|[1-9]\d*)$/,D4=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,L4=typeof self=="object"&&self&&self.Object===Object&&self,Au=D4||L4||Function("return this")();function M4(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function F4(e,t){var r=e?e.length:0;return!!r&&R4(e,t,0)>-1}function j4(e,t,r){for(var n=-1,o=e?e.length:0;++n<o;)if(r(t,e[n]))return!0;return!1}function Pb(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function Ou(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function B4(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function R4(e,t,r){if(t!==t)return B4(e,U4,r);for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}function U4(e){return e!==e}function W4(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function V4(e){return function(t){return e(t)}}function H4(e,t){return e.has(t)}function z4(e,t){return e==null?void 0:e[t]}function G4(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function kb(e,t){return function(r){return e(t(r))}}var K4=Array.prototype,q4=Function.prototype,Ms=Object.prototype,Tu=Au["__core-js_shared__"],Nb=function(){var e=/[^.]+$/.exec(Tu&&Tu.keys&&Tu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Db=q4.toString,jo=Ms.hasOwnProperty,Iu=Ms.toString,Y4=RegExp("^"+Db.call(jo).replace(P4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lb=Au.Symbol,J4=kb(Object.getPrototypeOf,Object),X4=Ms.propertyIsEnumerable,Z4=K4.splice,Mb=Lb?Lb.isConcatSpreadable:void 0,Pu=Object.getOwnPropertySymbols,Fb=Math.max,Q4=Bb(Au,"Map"),Wi=Bb(Object,"create");function Jn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function eN(){this.__data__=Wi?Wi(null):{}}function tN(e){return this.has(e)&&delete this.__data__[e]}function rN(e){var t=this.__data__;if(Wi){var r=t[e];return r===Cu?void 0:r}return jo.call(t,e)?t[e]:void 0}function nN(e){var t=this.__data__;return Wi?t[e]!==void 0:jo.call(t,e)}function oN(e,t){var r=this.__data__;return r[e]=Wi&&t===void 0?Cu:t,this}Jn.prototype.clear=eN,Jn.prototype.delete=tN,Jn.prototype.get=rN,Jn.prototype.has=nN,Jn.prototype.set=oN;function Bo(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function iN(){this.__data__=[]}function aN(e){var t=this.__data__,r=js(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Z4.call(t,r,1),!0}function sN(e){var t=this.__data__,r=js(t,e);return r<0?void 0:t[r][1]}function lN(e){return js(this.__data__,e)>-1}function cN(e,t){var r=this.__data__,n=js(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}Bo.prototype.clear=iN,Bo.prototype.delete=aN,Bo.prototype.get=sN,Bo.prototype.has=lN,Bo.prototype.set=cN;function Ro(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function uN(){this.__data__={hash:new Jn,map:new(Q4||Bo),string:new Jn}}function fN(e){return Bs(this,e).delete(e)}function dN(e){return Bs(this,e).get(e)}function pN(e){return Bs(this,e).has(e)}function hN(e,t){return Bs(this,e).set(e,t),this}Ro.prototype.clear=uN,Ro.prototype.delete=fN,Ro.prototype.get=dN,Ro.prototype.has=pN,Ro.prototype.set=hN;function Fs(e){var t=-1,r=e?e.length:0;for(this.__data__=new Ro;++t<r;)this.add(e[t])}function gN(e){return this.__data__.set(e,Cu),this}function vN(e){return this.__data__.has(e)}Fs.prototype.add=Fs.prototype.push=gN,Fs.prototype.has=vN;function mN(e,t){var r=ku(e)||Rb(e)?W4(e.length,String):[],n=r.length,o=!!n;for(var i in e)(t||jo.call(e,i))&&!(o&&(i=="length"||TN(i,n)))&&r.push(i);return r}function js(e,t){for(var r=e.length;r--;)if(MN(e[r][0],t))return r;return-1}function bN(e,t,r,n){var o=-1,i=F4,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;r&&(t=Pb(t,V4(r))),n?(i=j4,a=!1):t.length>=$4&&(i=H4,a=!1,t=new Fs(t));e:for(;++o<s;){var f=e[o],d=r?r(f):f;if(f=n||f!==0?f:0,a&&d===d){for(var p=u;p--;)if(t[p]===d)continue e;l.push(f)}else i(t,d,n)||l.push(f)}return l}function jb(e,t,r,n,o){var i=-1,a=e.length;for(r||(r=ON),o||(o=[]);++i<a;){var s=e[i];t>0&&r(s)?t>1?jb(s,t-1,r,n,o):Ou(o,s):n||(o[o.length]=s)}return o}function yN(e,t,r){var n=t(e);return ku(e)?n:Ou(n,r(e))}function wN(e){if(!Nu(e)||PN(e))return!1;var t=Wb(e)||G4(e)?Y4:k4;return t.test(LN(e))}function _N(e){if(!Nu(e))return NN(e);var t=kN(e),r=[];for(var n in e)n=="constructor"&&(t||!jo.call(e,n))||r.push(n);return r}function EN(e,t){return e=Object(e),xN(e,t,function(r,n){return n in e})}function xN(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=e[a];r(s,a)&&(i[a]=s)}return i}function SN(e,t){return t=Fb(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,o=Fb(r.length-t,0),i=Array(o);++n<o;)i[n]=r[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=r[n];return a[t]=i,M4(e,this,a)}}function $N(e){return yN(e,RN,AN)}function Bs(e,t){var r=e.__data__;return IN(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Bb(e,t){var r=z4(e,t);return wN(r)?r:void 0}var CN=Pu?kb(Pu,Object):Hb,AN=Pu?function(e){for(var t=[];e;)Ou(t,CN(e)),e=J4(e);return t}:Hb;function ON(e){return ku(e)||Rb(e)||!!(Mb&&e&&e[Mb])}function TN(e,t){return t=t??Ib,!!t&&(typeof e=="number"||N4.test(e))&&e>-1&&e%1==0&&e<t}function IN(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function PN(e){return!!Nb&&Nb in e}function kN(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ms;return e===r}function NN(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}function DN(e){if(typeof e=="string"||BN(e))return e;var t=e+"";return t=="0"&&1/e==-C4?"-0":t}function LN(e){if(e!=null){try{return Db.call(e)}catch{}try{return e+""}catch{}}return""}function MN(e,t){return e===t||e!==e&&t!==t}function Rb(e){return FN(e)&&jo.call(e,"callee")&&(!X4.call(e,"callee")||Iu.call(e)==A4)}var ku=Array.isArray;function Ub(e){return e!=null&&jN(e.length)&&!Wb(e)}function FN(e){return Vb(e)&&Ub(e)}function Wb(e){var t=Nu(e)?Iu.call(e):"";return t==O4||t==T4}function jN(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ib}function Nu(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Vb(e){return!!e&&typeof e=="object"}function BN(e){return typeof e=="symbol"||Vb(e)&&Iu.call(e)==I4}function RN(e){return Ub(e)?mN(e,!0):_N(e)}SN(function(e,t){return e==null?{}:(t=Pb(jb(t,1),DN),EN(e,bN($N(e),t)))});function Hb(){return[]}var UN=1/0,WN=9007199254740991,VN="[object Arguments]",HN="[object Function]",zN="[object GeneratorFunction]",GN="[object Symbol]",KN=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,qN=typeof self=="object"&&self&&self.Object===Object&&self,YN=KN||qN||Function("return this")();function JN(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function XN(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function ZN(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var Du=Object.prototype,QN=Du.hasOwnProperty,Lu=Du.toString,zb=YN.Symbol,e8=Du.propertyIsEnumerable,Gb=zb?zb.isConcatSpreadable:void 0,Kb=Math.max;function qb(e,t,r,n,o){var i=-1,a=e.length;for(r||(r=o8),o||(o=[]);++i<a;){var s=e[i];t>0&&r(s)?t>1?qb(s,t-1,r,n,o):ZN(o,s):n||(o[o.length]=s)}return o}function t8(e,t){return e=Object(e),r8(e,t,function(r,n){return n in e})}function r8(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=e[a];r(s,a)&&(i[a]=s)}return i}function n8(e,t){return t=Kb(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,o=Kb(r.length-t,0),i=Array(o);++n<o;)i[n]=r[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=r[n];return a[t]=i,JN(e,this,a)}}function o8(e){return s8(e)||a8(e)||!!(Gb&&e&&e[Gb])}function i8(e){if(typeof e=="string"||p8(e))return e;var t=e+"";return t=="0"&&1/e==-UN?"-0":t}function a8(e){return c8(e)&&QN.call(e,"callee")&&(!e8.call(e,"callee")||Lu.call(e)==VN)}var s8=Array.isArray;function l8(e){return e!=null&&f8(e.length)&&!u8(e)}function c8(e){return Yb(e)&&l8(e)}function u8(e){var t=d8(e)?Lu.call(e):"";return t==HN||t==zN}function f8(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=WN}function d8(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Yb(e){return!!e&&typeof e=="object"}function p8(e){return typeof e=="symbol"||Yb(e)&&Lu.call(e)==GN}n8(function(e,t){return e==null?{}:t8(e,XN(qb(t,1),i8))});var h8=Object.create,Jb=Object.defineProperty,g8=Object.getOwnPropertyDescriptor,Xb=Object.getOwnPropertyNames,v8=Object.getPrototypeOf,m8=Object.prototype.hasOwnProperty,He=(e,t)=>function(){return t||(0,e[Xb(e)[0]])((t={exports:{}}).exports,t),t.exports},b8=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Xb(t))!m8.call(e,o)&&o!==r&&Jb(e,o,{get:()=>t[o],enumerable:!(n=g8(t,o))||n.enumerable});return e},Vi=(e,t,r)=>(r=e!=null?h8(v8(e)):{},b8(t||!e||!e.__esModule?Jb(r,"default",{value:e,enumerable:!0}):r,e)),Zb=He({"node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js"(e,t){t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var n={},o=Symbol("test"),i=Object(o);if(typeof o=="string"||Object.prototype.toString.call(o)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var a=42;n[o]=a;for(o in n)return!1;if(typeof Object.keys=="function"&&Object.keys(n).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(n).length!==0)return!1;var s=Object.getOwnPropertySymbols(n);if(s.length!==1||s[0]!==o||!Object.prototype.propertyIsEnumerable.call(n,o))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(n,o);if(l.value!==a||l.enumerable!==!0)return!1}return!0}}}),Hi=He({"node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js"(e,t){var r=Zb();t.exports=function(){return r()&&!!Symbol.toStringTag}}}),Qb=He({"node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js"(e,t){var r=typeof Symbol<"u"&&Symbol,n=Zb();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}}),e0=He({"node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js"(e,t){var r={foo:{}},n=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof n)}}}),y8=He({"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(e,t){var r="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,o=Math.max,i="[object Function]",a=function(f,d){for(var p=[],h=0;h<f.length;h+=1)p[h]=f[h];for(var g=0;g<d.length;g+=1)p[g+f.length]=d[g];return p},s=function(f,d){for(var p=[],h=d||0,g=0;h<f.length;h+=1,g+=1)p[g]=f[h];return p},l=function(u,f){for(var d="",p=0;p<u.length;p+=1)d+=u[p],p+1<u.length&&(d+=f);return d};t.exports=function(f){var d=this;if(typeof d!="function"||n.apply(d)!==i)throw new TypeError(r+d);for(var p=s(arguments,1),h,g=function(){if(this instanceof h){var E=d.apply(this,a(p,arguments));return Object(E)===E?E:this}return d.apply(f,a(p,arguments))},v=o(0,d.length-p.length),b=[],m=0;m<v;m++)b[m]="$"+m;if(h=Function("binder","return function ("+l(b,",")+"){ return binder.apply(this,arguments); }")(g),d.prototype){var w=function(){};w.prototype=d.prototype,h.prototype=new w,w.prototype=null}return h}}}),Mu=He({"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(e,t){var r=y8();t.exports=Function.prototype.bind||r}}),w8=He({"node_modules/.pnpm/hasown@2.0.0/node_modules/hasown/index.js"(e,t){var r=Function.prototype.call,n=Object.prototype.hasOwnProperty,o=Mu();t.exports=o.call(r,n)}}),Uo=He({"node_modules/.pnpm/get-intrinsic@1.2.2/node_modules/get-intrinsic/index.js"(e,t){var r,n=SyntaxError,o=Function,i=TypeError,a=function(G){try{return o('"use strict"; return ('+G+").constructor;")()}catch{}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch{s=null}var l=function(){throw new i},u=s?function(){try{return arguments.callee,l}catch{try{return s(arguments,"callee").get}catch{return l}}}():l,f=Qb()(),d=e0()(),p=Object.getPrototypeOf||(d?function(G){return G.__proto__}:null),h={},g=typeof Uint8Array>"u"||!p?r:p(Uint8Array),v={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":f&&p?p([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&p?p(p([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!f||!p?r:p(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!f||!p?r:p(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&p?p(""[Symbol.iterator]()):r,"%Symbol%":f?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":u,"%TypedArray%":g,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(p)try{null.error}catch(G){b=p(p(G)),v["%Error.prototype%"]=b}var b,m=function G(Y){var te;if(Y==="%AsyncFunction%")te=a("async function () {}");else if(Y==="%GeneratorFunction%")te=a("function* () {}");else if(Y==="%AsyncGeneratorFunction%")te=a("async function* () {}");else if(Y==="%AsyncGenerator%"){var oe=G("%AsyncGeneratorFunction%");oe&&(te=oe.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var le=G("%AsyncGenerator%");le&&p&&(te=p(le.prototype))}return v[Y]=te,te},w={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},E=Mu(),x=w8(),k=E.call(Function.call,Array.prototype.concat),I=E.call(Function.apply,Array.prototype.splice),S=E.call(Function.call,String.prototype.replace),C=E.call(Function.call,String.prototype.slice),P=E.call(Function.call,RegExp.prototype.exec),F=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,N=function(Y){var te=C(Y,0,1),oe=C(Y,-1);if(te==="%"&&oe!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(oe==="%"&&te!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var le=[];return S(Y,F,function(ae,ge,ce,K){le[le.length]=ce?S(K,D,"$1"):ge||ae}),le},J=function(Y,te){var oe=Y,le;if(x(w,oe)&&(le=w[oe],oe="%"+le[0]+"%"),x(v,oe)){var ae=v[oe];if(ae===h&&(ae=m(oe)),typeof ae>"u"&&!te)throw new i("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:le,name:oe,value:ae}}throw new n("intrinsic "+Y+" does not exist!")};t.exports=function(Y,te){if(typeof Y!="string"||Y.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof te!="boolean")throw new i('"allowMissing" argument must be a boolean');if(P(/^%?[^%]*%?$/,Y)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var oe=N(Y),le=oe.length>0?oe[0]:"",ae=J("%"+le+"%",te),ge=ae.name,ce=ae.value,K=!1,q=ae.alias;q&&(le=q[0],I(oe,k([0,1],q)));for(var re=1,de=!0;re<oe.length;re+=1){var U=oe[re],H=C(U,0,1),M=C(U,-1);if((H==='"'||H==="'"||H==="`"||M==='"'||M==="'"||M==="`")&&H!==M)throw new n("property names with quotes must have matching quotes");if((U==="constructor"||!de)&&(K=!0),le+="."+U,ge="%"+le+"%",x(v,ge))ce=v[ge];else if(ce!=null){if(!(U in ce)){if(!te)throw new i("base intrinsic for "+Y+" exists, but the property is not available.");return}if(s&&re+1>=oe.length){var R=s(ce,U);de=!!R,de&&"get"in R&&!("originalValue"in R.get)?ce=R.get:ce=ce[U]}else de=x(ce,U),ce=ce[U];de&&!K&&(v[ge]=ce)}}return ce}}}),t0=He({"node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js"(e,t){var r=Uo(),n=r("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch{return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return n([],"length",{value:1}).length!==1}catch{return!0}},t.exports=o}}),Fu=He({"node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js"(e,t){var r=Uo(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch{n=null}t.exports=n}}),_8=He({"node_modules/.pnpm/define-data-property@1.1.1/node_modules/define-data-property/index.js"(e,t){var r=t0()(),n=Uo(),o=r&&n("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch{o=!1}var i=n("%SyntaxError%"),a=n("%TypeError%"),s=Fu();t.exports=function(u,f,d){if(!u||typeof u!="object"&&typeof u!="function")throw new a("`obj` must be an object or a function`");if(typeof f!="string"&&typeof f!="symbol")throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new a("`loose`, if provided, must be a boolean");var p=arguments.length>3?arguments[3]:null,h=arguments.length>4?arguments[4]:null,g=arguments.length>5?arguments[5]:null,v=arguments.length>6?arguments[6]:!1,b=!!s&&s(u,f);if(o)o(u,f,{configurable:g===null&&b?b.configurable:!g,enumerable:p===null&&b?b.enumerable:!p,value:d,writable:h===null&&b?b.writable:!h});else if(v||!p&&!h&&!g)u[f]=d;else throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),E8=He({"node_modules/.pnpm/set-function-length@1.1.1/node_modules/set-function-length/index.js"(e,t){var r=Uo(),n=_8(),o=t0()(),i=Fu(),a=r("%TypeError%"),s=r("%Math.floor%");t.exports=function(u,f){if(typeof u!="function")throw new a("`fn` is not a function");if(typeof f!="number"||f<0||f>4294967295||s(f)!==f)throw new a("`length` must be a positive 32-bit integer");var d=arguments.length>2&&!!arguments[2],p=!0,h=!0;if("length"in u&&i){var g=i(u,"length");g&&!g.configurable&&(p=!1),g&&!g.writable&&(h=!1)}return(p||h||!d)&&(o?n(u,"length",f,!0,!0):n(u,"length",f)),u}}}),r0=He({"node_modules/.pnpm/call-bind@1.0.5/node_modules/call-bind/index.js"(e,t){var r=Mu(),n=Uo(),o=E8(),i=n("%TypeError%"),a=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),l=n("%Reflect.apply%",!0)||r.call(s,a),u=n("%Object.defineProperty%",!0),f=n("%Math.max%");if(u)try{u({},"a",{value:1})}catch{u=null}t.exports=function(h){if(typeof h!="function")throw new i("a function is required");var g=l(r,s,arguments);return o(g,1+f(0,h.length-(arguments.length-1)),!0)};var d=function(){return l(r,a,arguments)};u?u(t.exports,"apply",{value:d}):t.exports.apply=d}}),n0=He({"node_modules/.pnpm/call-bind@1.0.5/node_modules/call-bind/callBound.js"(e,t){var r=Uo(),n=r0(),o=n(r("String.prototype.indexOf"));t.exports=function(a,s){var l=r(a,!!s);return typeof l=="function"&&o(a,".prototype.")>-1?n(l):l}}}),x8=He({"node_modules/.pnpm/is-arguments@1.1.1/node_modules/is-arguments/index.js"(e,t){var r=Hi()(),n=n0(),o=n("Object.prototype.toString"),i=function(u){return r&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:o(u)==="[object Arguments]"},a=function(u){return i(u)?!0:u!==null&&typeof u=="object"&&typeof u.length=="number"&&u.length>=0&&o(u)!=="[object Array]"&&o(u.callee)==="[object Function]"},s=function(){return i(arguments)}();i.isLegacyArguments=a,t.exports=s?i:a}}),S8=He({"node_modules/.pnpm/is-generator-function@1.0.10/node_modules/is-generator-function/index.js"(e,t){var r=Object.prototype.toString,n=Function.prototype.toString,o=/^\s*(?:function)?\*/,i=Hi()(),a=Object.getPrototypeOf,s=function(){if(!i)return!1;try{return Function("return function*() {}")()}catch{}},l;t.exports=function(f){if(typeof f!="function")return!1;if(o.test(n.call(f)))return!0;if(!i){var d=r.call(f);return d==="[object GeneratorFunction]"}if(!a)return!1;if(typeof l>"u"){var p=s();l=p?a(p):!1}return a(f)===l}}}),$8=He({"node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js"(e,t){var r=Function.prototype.toString,n=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,o,i;if(typeof n=="function"&&typeof Object.defineProperty=="function")try{o=Object.defineProperty({},"length",{get:function(){throw i}}),i={},n(function(){throw 42},null,o)}catch(x){x!==i&&(n=null)}else n=null;var a=/^\s*class\b/,s=function(k){try{var I=r.call(k);return a.test(I)}catch{return!1}},l=function(k){try{return s(k)?!1:(r.call(k),!0)}catch{return!1}},u=Object.prototype.toString,f="[object Object]",d="[object Function]",p="[object GeneratorFunction]",h="[object HTMLAllCollection]",g="[object HTML document.all class]",v="[object HTMLCollection]",b=typeof Symbol=="function"&&!!Symbol.toStringTag,m=!(0 in[,]),w=function(){return!1};typeof document=="object"&&(E=document.all,u.call(E)===u.call(document.all)&&(w=function(k){if((m||!k)&&(typeof k>"u"||typeof k=="object"))try{var I=u.call(k);return(I===h||I===g||I===v||I===f)&&k("")==null}catch{}return!1}));var E;t.exports=n?function(k){if(w(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;try{n(k,null,o)}catch(I){if(I!==i)return!1}return!s(k)&&l(k)}:function(k){if(w(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;if(b)return l(k);if(s(k))return!1;var I=u.call(k);return I!==d&&I!==p&&!/^\[object HTML/.test(I)?!1:l(k)}}}),ju=He({"node_modules/.pnpm/for-each@0.3.3/node_modules/for-each/index.js"(e,t){var r=$8(),n=Object.prototype.toString,o=Object.prototype.hasOwnProperty,i=function(f,d,p){for(var h=0,g=f.length;h<g;h++)o.call(f,h)&&(p==null?d(f[h],h,f):d.call(p,f[h],h,f))},a=function(f,d,p){for(var h=0,g=f.length;h<g;h++)p==null?d(f.charAt(h),h,f):d.call(p,f.charAt(h),h,f)},s=function(f,d,p){for(var h in f)o.call(f,h)&&(p==null?d(f[h],h,f):d.call(p,f[h],h,f))},l=function(f,d,p){if(!r(d))throw new TypeError("iterator must be a function");var h;arguments.length>=3&&(h=p),n.call(f)==="[object Array]"?i(f,d,h):typeof f=="string"?a(f,d,h):s(f,d,h)};t.exports=l}}),Bu=He({"node_modules/.pnpm/available-typed-arrays@1.0.5/node_modules/available-typed-arrays/index.js"(e,t){var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],n=typeof globalThis>"u"?global:globalThis;t.exports=function(){for(var i=[],a=0;a<r.length;a++)typeof n[r[a]]=="function"&&(i[i.length]=r[a]);return i}}}),C8=He({"node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js"(e,t){var r="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,o=Object.prototype.toString,i="[object Function]";t.exports=function(s){var l=this;if(typeof l!="function"||o.call(l)!==i)throw new TypeError(r+l);for(var u=n.call(arguments,1),f,d=function(){if(this instanceof f){var b=l.apply(this,u.concat(n.call(arguments)));return Object(b)===b?b:this}else return l.apply(s,u.concat(n.call(arguments)))},p=Math.max(0,l.length-u.length),h=[],g=0;g<p;g++)h.push("$"+g);if(f=Function("binder","return function ("+h.join(",")+"){ return binder.apply(this,arguments); }")(d),l.prototype){var v=function(){};v.prototype=l.prototype,f.prototype=new v,v.prototype=null}return f}}}),Ru=He({"node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js"(e,t){var r=C8();t.exports=Function.prototype.bind||r}}),A8=He({"node_modules/.pnpm/has@1.0.3/node_modules/has/src/index.js"(e,t){var r=Ru();t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)}}),Uu=He({"node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js"(e,t){var r,n=SyntaxError,o=Function,i=TypeError,a=function(G){try{return o('"use strict"; return ('+G+").constructor;")()}catch{}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch{s=null}var l=function(){throw new i},u=s?function(){try{return arguments.callee,l}catch{try{return s(arguments,"callee").get}catch{return l}}}():l,f=Qb()(),d=e0()(),p=Object.getPrototypeOf||(d?function(G){return G.__proto__}:null),h={},g=typeof Uint8Array>"u"||!p?r:p(Uint8Array),v={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":f&&p?p([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&p?p(p([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!f||!p?r:p(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!f||!p?r:p(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&p?p(""[Symbol.iterator]()):r,"%Symbol%":f?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":u,"%TypedArray%":g,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(p)try{null.error}catch(G){b=p(p(G)),v["%Error.prototype%"]=b}var b,m=function G(Y){var te;if(Y==="%AsyncFunction%")te=a("async function () {}");else if(Y==="%GeneratorFunction%")te=a("function* () {}");else if(Y==="%AsyncGeneratorFunction%")te=a("async function* () {}");else if(Y==="%AsyncGenerator%"){var oe=G("%AsyncGeneratorFunction%");oe&&(te=oe.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var le=G("%AsyncGenerator%");le&&p&&(te=p(le.prototype))}return v[Y]=te,te},w={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},E=Ru(),x=A8(),k=E.call(Function.call,Array.prototype.concat),I=E.call(Function.apply,Array.prototype.splice),S=E.call(Function.call,String.prototype.replace),C=E.call(Function.call,String.prototype.slice),P=E.call(Function.call,RegExp.prototype.exec),F=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,N=function(Y){var te=C(Y,0,1),oe=C(Y,-1);if(te==="%"&&oe!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(oe==="%"&&te!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var le=[];return S(Y,F,function(ae,ge,ce,K){le[le.length]=ce?S(K,D,"$1"):ge||ae}),le},J=function(Y,te){var oe=Y,le;if(x(w,oe)&&(le=w[oe],oe="%"+le[0]+"%"),x(v,oe)){var ae=v[oe];if(ae===h&&(ae=m(oe)),typeof ae>"u"&&!te)throw new i("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:le,name:oe,value:ae}}throw new n("intrinsic "+Y+" does not exist!")};t.exports=function(Y,te){if(typeof Y!="string"||Y.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof te!="boolean")throw new i('"allowMissing" argument must be a boolean');if(P(/^%?[^%]*%?$/,Y)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var oe=N(Y),le=oe.length>0?oe[0]:"",ae=J("%"+le+"%",te),ge=ae.name,ce=ae.value,K=!1,q=ae.alias;q&&(le=q[0],I(oe,k([0,1],q)));for(var re=1,de=!0;re<oe.length;re+=1){var U=oe[re],H=C(U,0,1),M=C(U,-1);if((H==='"'||H==="'"||H==="`"||M==='"'||M==="'"||M==="`")&&H!==M)throw new n("property names with quotes must have matching quotes");if((U==="constructor"||!de)&&(K=!0),le+="."+U,ge="%"+le+"%",x(v,ge))ce=v[ge];else if(ce!=null){if(!(U in ce)){if(!te)throw new i("base intrinsic for "+Y+" exists, but the property is not available.");return}if(s&&re+1>=oe.length){var R=s(ce,U);de=!!R,de&&"get"in R&&!("originalValue"in R.get)?ce=R.get:ce=ce[U]}else de=x(ce,U),ce=ce[U];de&&!K&&(v[ge]=ce)}}return ce}}}),O8=He({"node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js"(e,t){var r=Ru(),n=Uu(),o=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||r.call(i,o),s=n("%Object.getOwnPropertyDescriptor%",!0),l=n("%Object.defineProperty%",!0),u=n("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}t.exports=function(p){var h=a(r,i,arguments);if(s&&l){var g=s(h,"length");g.configurable&&l(h,"length",{value:1+u(0,p.length-(arguments.length-1))})}return h};var f=function(){return a(r,o,arguments)};l?l(t.exports,"apply",{value:f}):t.exports.apply=f}}),o0=He({"node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js"(e,t){var r=Uu(),n=O8(),o=n(r("String.prototype.indexOf"));t.exports=function(a,s){var l=r(a,!!s);return typeof l=="function"&&o(a,".prototype.")>-1?n(l):l}}}),i0=He({"node_modules/.pnpm/es-abstract@1.20.4/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js"(e,t){var r=Uu(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch{n=null}t.exports=n}}),T8=He({"node_modules/.pnpm/which-typed-array@1.1.13/node_modules/which-typed-array/index.js"(e,t){var r=ju(),n=Bu(),o=r0(),i=n0(),a=Fu(),s=i("Object.prototype.toString"),l=Hi()(),u=typeof globalThis>"u"?global:globalThis,f=n(),d=i("String.prototype.slice"),p=Object.getPrototypeOf,h=i("Array.prototype.indexOf",!0)||function(w,E){for(var x=0;x<w.length;x+=1)if(w[x]===E)return x;return-1},g={__proto__:null};l&&a&&p?r(f,function(m){var w=new u[m];if(Symbol.toStringTag in w){var E=p(w),x=a(E,Symbol.toStringTag);if(!x){var k=p(E);x=a(k,Symbol.toStringTag)}g["$"+m]=o(x.get)}}):r(f,function(m){var w=new u[m],E=w.slice||w.set;E&&(g["$"+m]=o(E))});var v=function(w){var E=!1;return r(g,function(x,k){if(!E)try{"$"+x(w)===k&&(E=d(k,1))}catch{}}),E},b=function(w){var E=!1;return r(g,function(x,k){if(!E)try{x(w),E=d(k,1)}catch{}}),E};t.exports=function(w){if(!w||typeof w!="object")return!1;if(!l){var E=d(s(w),8,-1);return h(f,E)>-1?E:E!=="Object"?!1:b(w)}return a?v(w):null}}}),I8=He({"node_modules/.pnpm/is-typed-array@1.1.12/node_modules/is-typed-array/index.js"(e,t){var r=T8();t.exports=function(o){return!!r(o)}}}),P8=He({"node_modules/.pnpm/which-typed-array@1.1.8/node_modules/which-typed-array/index.js"(e,t){var r=ju(),n=Bu(),o=o0(),i=o("Object.prototype.toString"),a=Hi()(),s=typeof globalThis>"u"?global:globalThis,l=n(),u=o("String.prototype.slice"),f={},d=i0(),p=Object.getPrototypeOf;a&&d&&p&&r(l,function(v){if(typeof s[v]=="function"){var b=new s[v];if(Symbol.toStringTag in b){var m=p(b),w=d(m,Symbol.toStringTag);if(!w){var E=p(m);w=d(E,Symbol.toStringTag)}f[v]=w.get}}});var h=function(b){var m=!1;return r(f,function(w,E){if(!m)try{var x=w.call(b);x===E&&(m=x)}catch{}}),m},g=I8();t.exports=function(b){return g(b)?!a||!(Symbol.toStringTag in b)?u(i(b),8,-1):h(b):!1}}}),k8=He({"node_modules/.pnpm/is-typed-array@1.1.9/node_modules/is-typed-array/index.js"(e,t){var r=ju(),n=Bu(),o=o0(),i=o("Object.prototype.toString"),a=Hi()(),s=typeof globalThis>"u"?global:globalThis,l=n(),u=o("Array.prototype.indexOf",!0)||function(b,m){for(var w=0;w<b.length;w+=1)if(b[w]===m)return w;return-1},f=o("String.prototype.slice"),d={},p=i0(),h=Object.getPrototypeOf;a&&p&&h&&r(l,function(v){var b=new s[v];if(Symbol.toStringTag in b){var m=h(b),w=p(m,Symbol.toStringTag);if(!w){var E=h(m);w=p(E,Symbol.toStringTag)}d[v]=w.get}});var g=function(b){var m=!1;return r(d,function(w,E){if(!m)try{m=w.call(b)===E}catch{}}),m};t.exports=function(b){if(!b||typeof b!="object")return!1;if(!a||!(Symbol.toStringTag in b)){var m=f(i(b),8,-1);return u(l,m)>-1}return p?g(b):!1}}}),N8=He({"node_modules/.pnpm/util@0.12.5/node_modules/util/support/types.js"(e){var t=x8(),r=S8(),n=P8(),o=k8();function i(ie){return ie.call.bind(ie)}var a=typeof BigInt<"u",s=typeof Symbol<"u",l=i(Object.prototype.toString),u=i(Number.prototype.valueOf),f=i(String.prototype.valueOf),d=i(Boolean.prototype.valueOf);a&&(p=i(BigInt.prototype.valueOf));var p;s&&(h=i(Symbol.prototype.valueOf));var h;function g(ie,Ne){if(typeof ie!="object")return!1;try{return Ne(ie),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=o;function v(ie){return typeof Promise<"u"&&ie instanceof Promise||ie!==null&&typeof ie=="object"&&typeof ie.then=="function"&&typeof ie.catch=="function"}e.isPromise=v;function b(ie){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(ie):o(ie)||q(ie)}e.isArrayBufferView=b;function m(ie){return n(ie)==="Uint8Array"}e.isUint8Array=m;function w(ie){return n(ie)==="Uint8ClampedArray"}e.isUint8ClampedArray=w;function E(ie){return n(ie)==="Uint16Array"}e.isUint16Array=E;function x(ie){return n(ie)==="Uint32Array"}e.isUint32Array=x;function k(ie){return n(ie)==="Int8Array"}e.isInt8Array=k;function I(ie){return n(ie)==="Int16Array"}e.isInt16Array=I;function S(ie){return n(ie)==="Int32Array"}e.isInt32Array=S;function C(ie){return n(ie)==="Float32Array"}e.isFloat32Array=C;function P(ie){return n(ie)==="Float64Array"}e.isFloat64Array=P;function F(ie){return n(ie)==="BigInt64Array"}e.isBigInt64Array=F;function D(ie){return n(ie)==="BigUint64Array"}e.isBigUint64Array=D;function N(ie){return l(ie)==="[object Map]"}N.working=typeof Map<"u"&&N(new Map);function J(ie){return typeof Map>"u"?!1:N.working?N(ie):ie instanceof Map}e.isMap=J;function G(ie){return l(ie)==="[object Set]"}G.working=typeof Set<"u"&&G(new Set);function Y(ie){return typeof Set>"u"?!1:G.working?G(ie):ie instanceof Set}e.isSet=Y;function te(ie){return l(ie)==="[object WeakMap]"}te.working=typeof WeakMap<"u"&&te(new WeakMap);function oe(ie){return typeof WeakMap>"u"?!1:te.working?te(ie):ie instanceof WeakMap}e.isWeakMap=oe;function le(ie){return l(ie)==="[object WeakSet]"}le.working=typeof WeakSet<"u"&&le(new WeakSet);function ae(ie){return le(ie)}e.isWeakSet=ae;function ge(ie){return l(ie)==="[object ArrayBuffer]"}ge.working=typeof ArrayBuffer<"u"&&ge(new ArrayBuffer);function ce(ie){return typeof ArrayBuffer>"u"?!1:ge.working?ge(ie):ie instanceof ArrayBuffer}e.isArrayBuffer=ce;function K(ie){return l(ie)==="[object DataView]"}K.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&K(new DataView(new ArrayBuffer(1),0,1));function q(ie){return typeof DataView>"u"?!1:K.working?K(ie):ie instanceof DataView}e.isDataView=q;var re=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function de(ie){return l(ie)==="[object SharedArrayBuffer]"}function U(ie){return typeof re>"u"?!1:(typeof de.working>"u"&&(de.working=de(new re)),de.working?de(ie):ie instanceof re)}e.isSharedArrayBuffer=U;function H(ie){return l(ie)==="[object AsyncFunction]"}e.isAsyncFunction=H;function M(ie){return l(ie)==="[object Map Iterator]"}e.isMapIterator=M;function R(ie){return l(ie)==="[object Set Iterator]"}e.isSetIterator=R;function z(ie){return l(ie)==="[object Generator]"}e.isGeneratorObject=z;function O(ie){return l(ie)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=O;function T(ie){return g(ie,u)}e.isNumberObject=T;function Z(ie){return g(ie,f)}e.isStringObject=Z;function ne(ie){return g(ie,d)}e.isBooleanObject=ne;function pe(ie){return a&&g(ie,p)}e.isBigIntObject=pe;function me(ie){return s&&g(ie,h)}e.isSymbolObject=me;function xe(ie){return T(ie)||Z(ie)||ne(ie)||pe(ie)||me(ie)}e.isBoxedPrimitive=xe;function Ee(ie){return typeof Uint8Array<"u"&&(ce(ie)||U(ie))}e.isAnyArrayBuffer=Ee,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ie){Object.defineProperty(e,ie,{enumerable:!1,value:function(){throw new Error(ie+" is not supported in userland")}})})}}),D8=He({"node_modules/.pnpm/util@0.12.5/node_modules/util/support/isBufferBrowser.js"(e,t){t.exports=function(n){return n&&typeof n=="object"&&typeof n.copy=="function"&&typeof n.fill=="function"&&typeof n.readUInt8=="function"}}}),L8=He({"node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(e,t){typeof Object.create=="function"?t.exports=function(n,o){o&&(n.super_=o,n.prototype=Object.create(o.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(n,o){if(o){n.super_=o;var i=function(){};i.prototype=o.prototype,n.prototype=new i,n.prototype.constructor=n}}}}),a0=He({"node_modules/.pnpm/util@0.12.5/node_modules/util/util.js"(e){var t=Object.getOwnPropertyDescriptors||function(q){for(var re=Object.keys(q),de={},U=0;U<re.length;U++)de[re[U]]=Object.getOwnPropertyDescriptor(q,re[U]);return de},r=/%[sdj%]/g;e.format=function(K){if(!k(K)){for(var q=[],re=0;re<arguments.length;re++)q.push(a(arguments[re]));return q.join(" ")}for(var re=1,de=arguments,U=de.length,H=String(K).replace(r,function(R){if(R==="%%")return"%";if(re>=U)return R;switch(R){case"%s":return String(de[re++]);case"%d":return Number(de[re++]);case"%j":try{return JSON.stringify(de[re++])}catch{return"[Circular]"}default:return R}}),M=de[re];re<U;M=de[++re])w(M)||!P(M)?H+=" "+M:H+=" "+a(M);return H},e.deprecate=function(K,q){if(typeof process<"u"&&process.noDeprecation===!0)return K;if(typeof process>"u")return function(){return e.deprecate(K,q).apply(this,arguments)};var re=!1;function de(){if(!re){if(process.throwDeprecation)throw new Error(q);process.traceDeprecation?console.trace(q):console.error(q),re=!0}return K.apply(this,arguments)}return de};var n={},o=/^$/;process.env.NODE_DEBUG&&(i=process.env.NODE_DEBUG,i=i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),o=new RegExp("^"+i+"$","i"));var i;e.debuglog=function(K){if(K=K.toUpperCase(),!n[K])if(o.test(K)){var q=process.pid;n[K]=function(){var re=e.format.apply(e,arguments);console.error("%s %d: %s",K,q,re)}}else n[K]=function(){};return n[K]};function a(K,q){var re={seen:[],stylize:l};return arguments.length>=3&&(re.depth=arguments[2]),arguments.length>=4&&(re.colors=arguments[3]),m(q)?re.showHidden=q:q&&e._extend(re,q),S(re.showHidden)&&(re.showHidden=!1),S(re.depth)&&(re.depth=2),S(re.colors)&&(re.colors=!1),S(re.customInspect)&&(re.customInspect=!0),re.colors&&(re.stylize=s),f(re,K,re.depth)}e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function s(K,q){var re=a.styles[q];return re?"\x1B["+a.colors[re][0]+"m"+K+"\x1B["+a.colors[re][1]+"m":K}function l(K,q){return K}function u(K){var q={};return K.forEach(function(re,de){q[re]=!0}),q}function f(K,q,re){if(K.customInspect&&q&&N(q.inspect)&&q.inspect!==e.inspect&&!(q.constructor&&q.constructor.prototype===q)){var de=q.inspect(re,K);return k(de)||(de=f(K,de,re)),de}var U=d(K,q);if(U)return U;var H=Object.keys(q),M=u(H);if(K.showHidden&&(H=Object.getOwnPropertyNames(q)),D(q)&&(H.indexOf("message")>=0||H.indexOf("description")>=0))return p(q);if(H.length===0){if(N(q)){var R=q.name?": "+q.name:"";return K.stylize("[Function"+R+"]","special")}if(C(q))return K.stylize(RegExp.prototype.toString.call(q),"regexp");if(F(q))return K.stylize(Date.prototype.toString.call(q),"date");if(D(q))return p(q)}var z="",O=!1,T=["{","}"];if(b(q)&&(O=!0,T=["[","]"]),N(q)){var Z=q.name?": "+q.name:"";z=" [Function"+Z+"]"}if(C(q)&&(z=" "+RegExp.prototype.toString.call(q)),F(q)&&(z=" "+Date.prototype.toUTCString.call(q)),D(q)&&(z=" "+p(q)),H.length===0&&(!O||q.length==0))return T[0]+z+T[1];if(re<0)return C(q)?K.stylize(RegExp.prototype.toString.call(q),"regexp"):K.stylize("[Object]","special");K.seen.push(q);var ne;return O?ne=h(K,q,re,M,H):ne=H.map(function(pe){return g(K,q,re,M,pe,O)}),K.seen.pop(),v(ne,z,T)}function d(K,q){if(S(q))return K.stylize("undefined","undefined");if(k(q)){var re="'"+JSON.stringify(q).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return K.stylize(re,"string")}if(x(q))return K.stylize(""+q,"number");if(m(q))return K.stylize(""+q,"boolean");if(w(q))return K.stylize("null","null")}function p(K){return"["+Error.prototype.toString.call(K)+"]"}function h(K,q,re,de,U){for(var H=[],M=0,R=q.length;M<R;++M)le(q,String(M))?H.push(g(K,q,re,de,String(M),!0)):H.push("");return U.forEach(function(z){z.match(/^\d+$/)||H.push(g(K,q,re,de,z,!0))}),H}function g(K,q,re,de,U,H){var M,R,z;if(z=Object.getOwnPropertyDescriptor(q,U)||{value:q[U]},z.get?z.set?R=K.stylize("[Getter/Setter]","special"):R=K.stylize("[Getter]","special"):z.set&&(R=K.stylize("[Setter]","special")),le(de,U)||(M="["+U+"]"),R||(K.seen.indexOf(z.value)<0?(w(re)?R=f(K,z.value,null):R=f(K,z.value,re-1),R.indexOf(`
|
|
92
|
+
`)>-1&&(H?R=R.split(`
|
|
93
|
+
`).map(function(O){return" "+O}).join(`
|
|
94
94
|
`).slice(2):R=`
|
|
95
95
|
`+R.split(`
|
|
96
|
-
`).map(function(
|
|
97
|
-
`))):R=
|
|
98
|
-
`)>=0,U+
|
|
99
|
-
`)+" "+
|
|
100
|
-
`)+" "+re[1]:re[0]+
|
|
96
|
+
`).map(function(O){return" "+O}).join(`
|
|
97
|
+
`))):R=K.stylize("[Circular]","special")),S(M)){if(H&&U.match(/^\d+$/))return R;M=JSON.stringify(""+U),M.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(M=M.slice(1,-1),M=K.stylize(M,"name")):(M=M.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),M=K.stylize(M,"string"))}return M+": "+R}function v(K,q,re){var de=K.reduce(function(U,H){return H.indexOf(`
|
|
98
|
+
`)>=0,U+H.replace(/\u001b\[\d\d?m/g,"").length+1},0);return de>60?re[0]+(q===""?"":q+`
|
|
99
|
+
`)+" "+K.join(`,
|
|
100
|
+
`)+" "+re[1]:re[0]+q+" "+K.join(", ")+" "+re[1]}e.types=N8();function b(K){return Array.isArray(K)}e.isArray=b;function m(K){return typeof K=="boolean"}e.isBoolean=m;function w(K){return K===null}e.isNull=w;function E(K){return K==null}e.isNullOrUndefined=E;function x(K){return typeof K=="number"}e.isNumber=x;function k(K){return typeof K=="string"}e.isString=k;function I(K){return typeof K=="symbol"}e.isSymbol=I;function S(K){return K===void 0}e.isUndefined=S;function C(K){return P(K)&&G(K)==="[object RegExp]"}e.isRegExp=C,e.types.isRegExp=C;function P(K){return typeof K=="object"&&K!==null}e.isObject=P;function F(K){return P(K)&&G(K)==="[object Date]"}e.isDate=F,e.types.isDate=F;function D(K){return P(K)&&(G(K)==="[object Error]"||K instanceof Error)}e.isError=D,e.types.isNativeError=D;function N(K){return typeof K=="function"}e.isFunction=N;function J(K){return K===null||typeof K=="boolean"||typeof K=="number"||typeof K=="string"||typeof K=="symbol"||typeof K>"u"}e.isPrimitive=J,e.isBuffer=D8();function G(K){return Object.prototype.toString.call(K)}function Y(K){return K<10?"0"+K.toString(10):K.toString(10)}var te=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function oe(){var K=new Date,q=[Y(K.getHours()),Y(K.getMinutes()),Y(K.getSeconds())].join(":");return[K.getDate(),te[K.getMonth()],q].join(" ")}e.log=function(){console.log("%s - %s",oe(),e.format.apply(e,arguments))},e.inherits=L8(),e._extend=function(K,q){if(!q||!P(q))return K;for(var re=Object.keys(q),de=re.length;de--;)K[re[de]]=q[re[de]];return K};function le(K,q){return Object.prototype.hasOwnProperty.call(K,q)}var ae=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');if(ae&&q[ae]){var re=q[ae];if(typeof re!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(re,ae,{value:re,enumerable:!1,writable:!1,configurable:!0}),re}function re(){for(var de,U,H=new Promise(function(z,O){de=z,U=O}),M=[],R=0;R<arguments.length;R++)M.push(arguments[R]);M.push(function(z,O){z?U(z):de(O)});try{q.apply(this,M)}catch(z){U(z)}return H}return Object.setPrototypeOf(re,Object.getPrototypeOf(q)),ae&&Object.defineProperty(re,ae,{value:re,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(re,t(q))},e.promisify.custom=ae;function ge(K,q){if(!K){var re=new Error("Promise was rejected with a falsy value");re.reason=K,K=re}return q(K)}function ce(K){if(typeof K!="function")throw new TypeError('The "original" argument must be of type Function');function q(){for(var re=[],de=0;de<arguments.length;de++)re.push(arguments[de]);var U=re.pop();if(typeof U!="function")throw new TypeError("The last argument must be of type Function");var H=this,M=function(){return U.apply(H,arguments)};K.apply(this,re).then(function(R){process.nextTick(M.bind(null,null,R))},function(R){process.nextTick(ge.bind(null,R,M))})}return Object.setPrototypeOf(q,Object.getPrototypeOf(K)),Object.defineProperties(q,t(K)),q}e.callbackify=ce}});function M8(e,...t){t.length>0?queueMicrotask(()=>e(...t)):queueMicrotask(e)}var F8="browser",j8="browser",B8=!0,R8={},U8=[],W8="",V8={},H8={},z8={};function Xn(){}var G8=Xn,K8=Xn,q8=Xn,Y8=Xn,J8=Xn,X8=Xn,Z8=Xn;function Q8(e){throw new Error("process.binding is not supported")}function eD(){return"/"}function tD(e){throw new Error("process.chdir is not supported")}function rD(){return 0}var Wo=globalThis.performance||{},nD=Wo.now||Wo.mozNow||Wo.msNow||Wo.oNow||Wo.webkitNow||function(){return new Date().getTime()};function oD(e){var t=nD.call(Wo)*.001,r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r=r-e[0],n=n-e[1],n<0&&(r--,n+=1e9)),[r,n]}var iD=new Date;function aD(){var e=new Date,t=e-iD;return t/1e3}var Rs={nextTick:M8,title:F8,browser:B8,env:R8,argv:U8,version:W8,versions:V8,on:G8,addListener:K8,once:q8,off:Y8,removeListener:J8,removeAllListeners:X8,emit:Z8,binding:Q8,cwd:eD,chdir:tD,umask:rD,hrtime:oD,platform:j8,release:H8,config:z8,uptime:aD},s0={};Object.keys(s0).forEach(e=>{const t=e.split(".");let r=Rs;for(let n=0;n<t.length;n++){const o=t[n];n===t.length-1?r[o]=s0[e]:r=r[o]||(r[o]={})}});var Qt={},Us={};Us.byteLength=cD,Us.toByteArray=fD,Us.fromByteArray=hD;for(var Ur=[],cr=[],sD=typeof Uint8Array<"u"?Uint8Array:Array,Wu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vo=0,lD=Wu.length;Vo<lD;++Vo)Ur[Vo]=Wu[Vo],cr[Wu.charCodeAt(Vo)]=Vo;cr[45]=62,cr[95]=63;function l0(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function cD(e){var t=l0(e),r=t[0],n=t[1];return(r+n)*3/4-n}function uD(e,t,r){return(t+r)*3/4-r}function fD(e){var t,r=l0(e),n=r[0],o=r[1],i=new sD(uD(e,n,o)),a=0,s=o>0?n-4:n,l;for(l=0;l<s;l+=4)t=cr[e.charCodeAt(l)]<<18|cr[e.charCodeAt(l+1)]<<12|cr[e.charCodeAt(l+2)]<<6|cr[e.charCodeAt(l+3)],i[a++]=t>>16&255,i[a++]=t>>8&255,i[a++]=t&255;return o===2&&(t=cr[e.charCodeAt(l)]<<2|cr[e.charCodeAt(l+1)]>>4,i[a++]=t&255),o===1&&(t=cr[e.charCodeAt(l)]<<10|cr[e.charCodeAt(l+1)]<<4|cr[e.charCodeAt(l+2)]>>2,i[a++]=t>>8&255,i[a++]=t&255),i}function dD(e){return Ur[e>>18&63]+Ur[e>>12&63]+Ur[e>>6&63]+Ur[e&63]}function pD(e,t,r){for(var n,o=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),o.push(dD(n));return o.join("")}function hD(e){for(var t,r=e.length,n=r%3,o=[],i=16383,a=0,s=r-n;a<s;a+=i)o.push(pD(e,a,a+i>s?s:a+i));return n===1?(t=e[r-1],o.push(Ur[t>>2]+Ur[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],o.push(Ur[t>>10]+Ur[t>>4&63]+Ur[t<<2&63]+"=")),o.join("")}var Vu={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Vu.read=function(e,t,r,n,o){var i,a,s=o*8-n-1,l=(1<<s)-1,u=l>>1,f=-7,d=r?o-1:0,p=r?-1:1,h=e[t+d];for(d+=p,i=h&(1<<-f)-1,h>>=-f,f+=s;f>0;i=i*256+e[t+d],d+=p,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=n;f>0;a=a*256+e[t+d],d+=p,f-=8);if(i===0)i=1-u;else{if(i===l)return a?NaN:(h?-1:1)*(1/0);a=a+Math.pow(2,n),i=i-u}return(h?-1:1)*a*Math.pow(2,i-n)},Vu.write=function(e,t,r,n,o,i){var a,s,l,u=i*8-o-1,f=(1<<u)-1,d=f>>1,p=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,g=n?1:-1,v=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+d>=1?t+=p/l:t+=p*Math.pow(2,1-d),t*l>=2&&(a++,l/=2),a+d>=f?(s=0,a=f):a+d>=1?(s=(t*l-1)*Math.pow(2,o),a=a+d):(s=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[r+h]=s&255,h+=g,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;e[r+h]=a&255,h+=g,a/=256,u-=8);e[r+h-g]|=v*128};/*!
|
|
101
101
|
* The buffer module from node.js, for the browser.
|
|
102
102
|
*
|
|
103
103
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
104
104
|
* @license MIT
|
|
105
|
-
*/(function(e){const t=Is,r=Cu,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=w,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const C=new Uint8Array(1),b={foo:function(){return 42}};return Object.setPrototypeOf(b,Uint8Array.prototype),Object.setPrototypeOf(C,b),C.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(C){if(C>o)throw new RangeError('The value "'+C+'" is invalid for option "size"');const b=new Uint8Array(C);return Object.setPrototypeOf(b,s.prototype),b}function s(C,b,_){if(typeof C=="number"){if(typeof b=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(C)}return l(C,b,_)}s.poolSize=8192;function l(C,b,_){if(typeof C=="string")return p(C,b);if(ArrayBuffer.isView(C))return g(C);if(C==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C);if(Te(C,ArrayBuffer)||C&&Te(C.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Te(C,SharedArrayBuffer)||C&&Te(C.buffer,SharedArrayBuffer)))return v(C,b,_);if(typeof C=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const L=C.valueOf&&C.valueOf();if(L!=null&&L!==C)return s.from(L,b,_);const W=y(C);if(W)return W;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof C[Symbol.toPrimitive]=="function")return s.from(C[Symbol.toPrimitive]("string"),b,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C)}s.from=function(C,b,_){return l(C,b,_)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(C){if(typeof C!="number")throw new TypeError('"size" argument must be of type number');if(C<0)throw new RangeError('The value "'+C+'" is invalid for option "size"')}function f(C,b,_){return u(C),C<=0?a(C):b!==void 0?typeof _=="string"?a(C).fill(b,_):a(C).fill(b):a(C)}s.alloc=function(C,b,_){return f(C,b,_)};function d(C){return u(C),a(C<0?0:m(C)|0)}s.allocUnsafe=function(C){return d(C)},s.allocUnsafeSlow=function(C){return d(C)};function p(C,b){if((typeof b!="string"||b==="")&&(b="utf8"),!s.isEncoding(b))throw new TypeError("Unknown encoding: "+b);const _=E(C,b)|0;let L=a(_);const W=L.write(C,b);return W!==_&&(L=L.slice(0,W)),L}function h(C){const b=C.length<0?0:m(C.length)|0,_=a(b);for(let L=0;L<b;L+=1)_[L]=C[L]&255;return _}function g(C){if(Te(C,Uint8Array)){const b=new Uint8Array(C);return v(b.buffer,b.byteOffset,b.byteLength)}return h(C)}function v(C,b,_){if(b<0||C.byteLength<b)throw new RangeError('"offset" is outside of buffer bounds');if(C.byteLength<b+(_||0))throw new RangeError('"length" is outside of buffer bounds');let L;return b===void 0&&_===void 0?L=new Uint8Array(C):_===void 0?L=new Uint8Array(C,b):L=new Uint8Array(C,b,_),Object.setPrototypeOf(L,s.prototype),L}function y(C){if(s.isBuffer(C)){const b=m(C.length)|0,_=a(b);return _.length===0||C.copy(_,0,0,b),_}if(C.length!==void 0)return typeof C.length!="number"||Me(C.length)?a(0):h(C);if(C.type==="Buffer"&&Array.isArray(C.data))return h(C.data)}function m(C){if(C>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return C|0}function w(C){return+C!=C&&(C=0),s.alloc(+C)}s.isBuffer=function(b){return b!=null&&b._isBuffer===!0&&b!==s.prototype},s.compare=function(b,_){if(Te(b,Uint8Array)&&(b=s.from(b,b.offset,b.byteLength)),Te(_,Uint8Array)&&(_=s.from(_,_.offset,_.byteLength)),!s.isBuffer(b)||!s.isBuffer(_))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(b===_)return 0;let L=b.length,W=_.length;for(let X=0,se=Math.min(L,W);X<se;++X)if(b[X]!==_[X]){L=b[X],W=_[X];break}return L<W?-1:W<L?1:0},s.isEncoding=function(b){switch(String(b).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(b,_){if(!Array.isArray(b))throw new TypeError('"list" argument must be an Array of Buffers');if(b.length===0)return s.alloc(0);let L;if(_===void 0)for(_=0,L=0;L<b.length;++L)_+=b[L].length;const W=s.allocUnsafe(_);let X=0;for(L=0;L<b.length;++L){let se=b[L];if(Te(se,Uint8Array))X+se.length>W.length?(s.isBuffer(se)||(se=s.from(se)),se.copy(W,X)):Uint8Array.prototype.set.call(W,se,X);else if(s.isBuffer(se))se.copy(W,X);else throw new TypeError('"list" argument must be an Array of Buffers');X+=se.length}return W};function E(C,b){if(s.isBuffer(C))return C.length;if(ArrayBuffer.isView(C)||Te(C,ArrayBuffer))return C.byteLength;if(typeof C!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof C);const _=C.length,L=arguments.length>2&&arguments[2]===!0;if(!L&&_===0)return 0;let W=!1;for(;;)switch(b){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return xe(C).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return Ne(C).length;default:if(W)return L?-1:xe(C).length;b=(""+b).toLowerCase(),W=!0}}s.byteLength=E;function x(C,b,_){let L=!1;if((b===void 0||b<0)&&(b=0),b>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,b>>>=0,_<=b))return"";for(C||(C="utf8");;)switch(C){case"hex":return ae(this,b,_);case"utf8":case"utf-8":return K(this,b,_);case"ascii":return oe(this,b,_);case"latin1":case"binary":return le(this,b,_);case"base64":return J(this,b,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,b,_);default:if(L)throw new TypeError("Unknown encoding: "+C);C=(C+"").toLowerCase(),L=!0}}s.prototype._isBuffer=!0;function P(C,b,_){const L=C[b];C[b]=C[_],C[_]=L}s.prototype.swap16=function(){const b=this.length;if(b%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let _=0;_<b;_+=2)P(this,_,_+1);return this},s.prototype.swap32=function(){const b=this.length;if(b%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let _=0;_<b;_+=4)P(this,_,_+3),P(this,_+1,_+2);return this},s.prototype.swap64=function(){const b=this.length;if(b%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let _=0;_<b;_+=8)P(this,_,_+7),P(this,_+1,_+6),P(this,_+2,_+5),P(this,_+3,_+4);return this},s.prototype.toString=function(){const b=this.length;return b===0?"":arguments.length===0?K(this,0,b):x.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(b){if(!s.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b?!0:s.compare(this,b)===0},s.prototype.inspect=function(){let b="";const _=e.INSPECT_MAX_BYTES;return b=this.toString("hex",0,_).replace(/(.{2})/g,"$1 ").trim(),this.length>_&&(b+=" ... "),"<Buffer "+b+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(b,_,L,W,X){if(Te(b,Uint8Array)&&(b=s.from(b,b.offset,b.byteLength)),!s.isBuffer(b))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof b);if(_===void 0&&(_=0),L===void 0&&(L=b?b.length:0),W===void 0&&(W=0),X===void 0&&(X=this.length),_<0||L>b.length||W<0||X>this.length)throw new RangeError("out of range index");if(W>=X&&_>=L)return 0;if(W>=X)return-1;if(_>=L)return 1;if(_>>>=0,L>>>=0,W>>>=0,X>>>=0,this===b)return 0;let se=X-W,Pe=L-_;const it=Math.min(se,Pe),Le=this.slice(W,X),Je=b.slice(_,L);for(let Ze=0;Ze<it;++Ze)if(Le[Ze]!==Je[Ze]){se=Le[Ze],Pe=Je[Ze];break}return se<Pe?-1:Pe<se?1:0};function I(C,b,_,L,W){if(C.length===0)return-1;if(typeof _=="string"?(L=_,_=0):_>2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,Me(_)&&(_=W?0:C.length-1),_<0&&(_=C.length+_),_>=C.length){if(W)return-1;_=C.length-1}else if(_<0)if(W)_=0;else return-1;if(typeof b=="string"&&(b=s.from(b,L)),s.isBuffer(b))return b.length===0?-1:S(C,b,_,L,W);if(typeof b=="number")return b=b&255,typeof Uint8Array.prototype.indexOf=="function"?W?Uint8Array.prototype.indexOf.call(C,b,_):Uint8Array.prototype.lastIndexOf.call(C,b,_):S(C,[b],_,L,W);throw new TypeError("val must be string, number or Buffer")}function S(C,b,_,L,W){let X=1,se=C.length,Pe=b.length;if(L!==void 0&&(L=String(L).toLowerCase(),L==="ucs2"||L==="ucs-2"||L==="utf16le"||L==="utf-16le")){if(C.length<2||b.length<2)return-1;X=2,se/=2,Pe/=2,_/=2}function it(Je,Ze){return X===1?Je[Ze]:Je.readUInt16BE(Ze*X)}let Le;if(W){let Je=-1;for(Le=_;Le<se;Le++)if(it(C,Le)===it(b,Je===-1?0:Le-Je)){if(Je===-1&&(Je=Le),Le-Je+1===Pe)return Je*X}else Je!==-1&&(Le-=Le-Je),Je=-1}else for(_+Pe>se&&(_=se-Pe),Le=_;Le>=0;Le--){let Je=!0;for(let Ze=0;Ze<Pe;Ze++)if(it(C,Le+Ze)!==it(b,Ze)){Je=!1;break}if(Je)return Le}return-1}s.prototype.includes=function(b,_,L){return this.indexOf(b,_,L)!==-1},s.prototype.indexOf=function(b,_,L){return I(this,b,_,L,!0)},s.prototype.lastIndexOf=function(b,_,L){return I(this,b,_,L,!1)};function O(C,b,_,L){_=Number(_)||0;const W=C.length-_;L?(L=Number(L),L>W&&(L=W)):L=W;const X=b.length;L>X/2&&(L=X/2);let se;for(se=0;se<L;++se){const Pe=parseInt(b.substr(se*2,2),16);if(Me(Pe))return se;C[_+se]=Pe}return se}function k(C,b,_,L){return dt(xe(b,C.length-_),C,_,L)}function j(C,b,_,L){return dt(Ee(b),C,_,L)}function D(C,b,_,L){return dt(Ne(b),C,_,L)}function N(C,b,_,L){return dt(ie(b,C.length-_),C,_,L)}s.prototype.write=function(b,_,L,W){if(_===void 0)W="utf8",L=this.length,_=0;else if(L===void 0&&typeof _=="string")W=_,L=this.length,_=0;else if(isFinite(_))_=_>>>0,isFinite(L)?(L=L>>>0,W===void 0&&(W="utf8")):(W=L,L=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const X=this.length-_;if((L===void 0||L>X)&&(L=X),b.length>0&&(L<0||_<0)||_>this.length)throw new RangeError("Attempt to write outside buffer bounds");W||(W="utf8");let se=!1;for(;;)switch(W){case"hex":return O(this,b,_,L);case"utf8":case"utf-8":return k(this,b,_,L);case"ascii":case"latin1":case"binary":return j(this,b,_,L);case"base64":return D(this,b,_,L);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,b,_,L);default:if(se)throw new TypeError("Unknown encoding: "+W);W=(""+W).toLowerCase(),se=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function J(C,b,_){return b===0&&_===C.length?t.fromByteArray(C):t.fromByteArray(C.slice(b,_))}function K(C,b,_){_=Math.min(C.length,_);const L=[];let W=b;for(;W<_;){const X=C[W];let se=null,Pe=X>239?4:X>223?3:X>191?2:1;if(W+Pe<=_){let it,Le,Je,Ze;switch(Pe){case 1:X<128&&(se=X);break;case 2:it=C[W+1],(it&192)===128&&(Ze=(X&31)<<6|it&63,Ze>127&&(se=Ze));break;case 3:it=C[W+1],Le=C[W+2],(it&192)===128&&(Le&192)===128&&(Ze=(X&15)<<12|(it&63)<<6|Le&63,Ze>2047&&(Ze<55296||Ze>57343)&&(se=Ze));break;case 4:it=C[W+1],Le=C[W+2],Je=C[W+3],(it&192)===128&&(Le&192)===128&&(Je&192)===128&&(Ze=(X&15)<<18|(it&63)<<12|(Le&63)<<6|Je&63,Ze>65535&&Ze<1114112&&(se=Ze))}}se===null?(se=65533,Pe=1):se>65535&&(se-=65536,L.push(se>>>10&1023|55296),se=56320|se&1023),L.push(se),W+=Pe}return te(L)}const Y=4096;function te(C){const b=C.length;if(b<=Y)return String.fromCharCode.apply(String,C);let _="",L=0;for(;L<b;)_+=String.fromCharCode.apply(String,C.slice(L,L+=Y));return _}function oe(C,b,_){let L="";_=Math.min(C.length,_);for(let W=b;W<_;++W)L+=String.fromCharCode(C[W]&127);return L}function le(C,b,_){let L="";_=Math.min(C.length,_);for(let W=b;W<_;++W)L+=String.fromCharCode(C[W]);return L}function ae(C,b,_){const L=C.length;(!b||b<0)&&(b=0),(!_||_<0||_>L)&&(_=L);let W="";for(let X=b;X<_;++X)W+=bt[C[X]];return W}function ge(C,b,_){const L=C.slice(b,_);let W="";for(let X=0;X<L.length-1;X+=2)W+=String.fromCharCode(L[X]+L[X+1]*256);return W}s.prototype.slice=function(b,_){const L=this.length;b=~~b,_=_===void 0?L:~~_,b<0?(b+=L,b<0&&(b=0)):b>L&&(b=L),_<0?(_+=L,_<0&&(_=0)):_>L&&(_=L),_<b&&(_=b);const W=this.subarray(b,_);return Object.setPrototypeOf(W,s.prototype),W};function ce(C,b,_){if(C%1!==0||C<0)throw new RangeError("offset is not uint");if(C+b>_)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(b,_,L){b=b>>>0,_=_>>>0,L||ce(b,_,this.length);let W=this[b],X=1,se=0;for(;++se<_&&(X*=256);)W+=this[b+se]*X;return W},s.prototype.readUintBE=s.prototype.readUIntBE=function(b,_,L){b=b>>>0,_=_>>>0,L||ce(b,_,this.length);let W=this[b+--_],X=1;for(;_>0&&(X*=256);)W+=this[b+--_]*X;return W},s.prototype.readUint8=s.prototype.readUInt8=function(b,_){return b=b>>>0,_||ce(b,1,this.length),this[b]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(b,_){return b=b>>>0,_||ce(b,2,this.length),this[b]|this[b+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(b,_){return b=b>>>0,_||ce(b,2,this.length),this[b]<<8|this[b+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),(this[b]|this[b+1]<<8|this[b+2]<<16)+this[b+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),this[b]*16777216+(this[b+1]<<16|this[b+2]<<8|this[b+3])},s.prototype.readBigUInt64LE=$e(function(b){b=b>>>0,Z(b,"offset");const _=this[b],L=this[b+7];(_===void 0||L===void 0)&&ne(b,this.length-8);const W=_+this[++b]*2**8+this[++b]*2**16+this[++b]*2**24,X=this[++b]+this[++b]*2**8+this[++b]*2**16+L*2**24;return BigInt(W)+(BigInt(X)<<BigInt(32))}),s.prototype.readBigUInt64BE=$e(function(b){b=b>>>0,Z(b,"offset");const _=this[b],L=this[b+7];(_===void 0||L===void 0)&&ne(b,this.length-8);const W=_*2**24+this[++b]*2**16+this[++b]*2**8+this[++b],X=this[++b]*2**24+this[++b]*2**16+this[++b]*2**8+L;return(BigInt(W)<<BigInt(32))+BigInt(X)}),s.prototype.readIntLE=function(b,_,L){b=b>>>0,_=_>>>0,L||ce(b,_,this.length);let W=this[b],X=1,se=0;for(;++se<_&&(X*=256);)W+=this[b+se]*X;return X*=128,W>=X&&(W-=Math.pow(2,8*_)),W},s.prototype.readIntBE=function(b,_,L){b=b>>>0,_=_>>>0,L||ce(b,_,this.length);let W=_,X=1,se=this[b+--W];for(;W>0&&(X*=256);)se+=this[b+--W]*X;return X*=128,se>=X&&(se-=Math.pow(2,8*_)),se},s.prototype.readInt8=function(b,_){return b=b>>>0,_||ce(b,1,this.length),this[b]&128?(255-this[b]+1)*-1:this[b]},s.prototype.readInt16LE=function(b,_){b=b>>>0,_||ce(b,2,this.length);const L=this[b]|this[b+1]<<8;return L&32768?L|4294901760:L},s.prototype.readInt16BE=function(b,_){b=b>>>0,_||ce(b,2,this.length);const L=this[b+1]|this[b]<<8;return L&32768?L|4294901760:L},s.prototype.readInt32LE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),this[b]|this[b+1]<<8|this[b+2]<<16|this[b+3]<<24},s.prototype.readInt32BE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),this[b]<<24|this[b+1]<<16|this[b+2]<<8|this[b+3]},s.prototype.readBigInt64LE=$e(function(b){b=b>>>0,Z(b,"offset");const _=this[b],L=this[b+7];(_===void 0||L===void 0)&&ne(b,this.length-8);const W=this[b+4]+this[b+5]*2**8+this[b+6]*2**16+(L<<24);return(BigInt(W)<<BigInt(32))+BigInt(_+this[++b]*2**8+this[++b]*2**16+this[++b]*2**24)}),s.prototype.readBigInt64BE=$e(function(b){b=b>>>0,Z(b,"offset");const _=this[b],L=this[b+7];(_===void 0||L===void 0)&&ne(b,this.length-8);const W=(_<<24)+this[++b]*2**16+this[++b]*2**8+this[++b];return(BigInt(W)<<BigInt(32))+BigInt(this[++b]*2**24+this[++b]*2**16+this[++b]*2**8+L)}),s.prototype.readFloatLE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),r.read(this,b,!0,23,4)},s.prototype.readFloatBE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),r.read(this,b,!1,23,4)},s.prototype.readDoubleLE=function(b,_){return b=b>>>0,_||ce(b,8,this.length),r.read(this,b,!0,52,8)},s.prototype.readDoubleBE=function(b,_){return b=b>>>0,_||ce(b,8,this.length),r.read(this,b,!1,52,8)};function q(C,b,_,L,W,X){if(!s.isBuffer(C))throw new TypeError('"buffer" argument must be a Buffer instance');if(b>W||b<X)throw new RangeError('"value" argument is out of bounds');if(_+L>C.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(b,_,L,W){if(b=+b,_=_>>>0,L=L>>>0,!W){const Pe=Math.pow(2,8*L)-1;q(this,b,_,L,Pe,0)}let X=1,se=0;for(this[_]=b&255;++se<L&&(X*=256);)this[_+se]=b/X&255;return _+L},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(b,_,L,W){if(b=+b,_=_>>>0,L=L>>>0,!W){const Pe=Math.pow(2,8*L)-1;q(this,b,_,L,Pe,0)}let X=L-1,se=1;for(this[_+X]=b&255;--X>=0&&(se*=256);)this[_+X]=b/se&255;return _+L},s.prototype.writeUint8=s.prototype.writeUInt8=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,1,255,0),this[_]=b&255,_+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,2,65535,0),this[_]=b&255,this[_+1]=b>>>8,_+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,2,65535,0),this[_]=b>>>8,this[_+1]=b&255,_+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,4,4294967295,0),this[_+3]=b>>>24,this[_+2]=b>>>16,this[_+1]=b>>>8,this[_]=b&255,_+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,4,4294967295,0),this[_]=b>>>24,this[_+1]=b>>>16,this[_+2]=b>>>8,this[_+3]=b&255,_+4};function V(C,b,_,L,W){T(b,L,W,C,_,7);let X=Number(b&BigInt(4294967295));C[_++]=X,X=X>>8,C[_++]=X,X=X>>8,C[_++]=X,X=X>>8,C[_++]=X;let se=Number(b>>BigInt(32)&BigInt(4294967295));return C[_++]=se,se=se>>8,C[_++]=se,se=se>>8,C[_++]=se,se=se>>8,C[_++]=se,_}function re(C,b,_,L,W){T(b,L,W,C,_,7);let X=Number(b&BigInt(4294967295));C[_+7]=X,X=X>>8,C[_+6]=X,X=X>>8,C[_+5]=X,X=X>>8,C[_+4]=X;let se=Number(b>>BigInt(32)&BigInt(4294967295));return C[_+3]=se,se=se>>8,C[_+2]=se,se=se>>8,C[_+1]=se,se=se>>8,C[_]=se,_+8}s.prototype.writeBigUInt64LE=$e(function(b,_=0){return V(this,b,_,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=$e(function(b,_=0){return re(this,b,_,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(b,_,L,W){if(b=+b,_=_>>>0,!W){const it=Math.pow(2,8*L-1);q(this,b,_,L,it-1,-it)}let X=0,se=1,Pe=0;for(this[_]=b&255;++X<L&&(se*=256);)b<0&&Pe===0&&this[_+X-1]!==0&&(Pe=1),this[_+X]=(b/se>>0)-Pe&255;return _+L},s.prototype.writeIntBE=function(b,_,L,W){if(b=+b,_=_>>>0,!W){const it=Math.pow(2,8*L-1);q(this,b,_,L,it-1,-it)}let X=L-1,se=1,Pe=0;for(this[_+X]=b&255;--X>=0&&(se*=256);)b<0&&Pe===0&&this[_+X+1]!==0&&(Pe=1),this[_+X]=(b/se>>0)-Pe&255;return _+L},s.prototype.writeInt8=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,1,127,-128),b<0&&(b=255+b+1),this[_]=b&255,_+1},s.prototype.writeInt16LE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,2,32767,-32768),this[_]=b&255,this[_+1]=b>>>8,_+2},s.prototype.writeInt16BE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,2,32767,-32768),this[_]=b>>>8,this[_+1]=b&255,_+2},s.prototype.writeInt32LE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,4,2147483647,-2147483648),this[_]=b&255,this[_+1]=b>>>8,this[_+2]=b>>>16,this[_+3]=b>>>24,_+4},s.prototype.writeInt32BE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,4,2147483647,-2147483648),b<0&&(b=4294967295+b+1),this[_]=b>>>24,this[_+1]=b>>>16,this[_+2]=b>>>8,this[_+3]=b&255,_+4},s.prototype.writeBigInt64LE=$e(function(b,_=0){return V(this,b,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=$e(function(b,_=0){return re(this,b,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function de(C,b,_,L,W,X){if(_+L>C.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function U(C,b,_,L,W){return b=+b,_=_>>>0,W||de(C,b,_,4),r.write(C,b,_,L,23,4),_+4}s.prototype.writeFloatLE=function(b,_,L){return U(this,b,_,!0,L)},s.prototype.writeFloatBE=function(b,_,L){return U(this,b,_,!1,L)};function z(C,b,_,L,W){return b=+b,_=_>>>0,W||de(C,b,_,8),r.write(C,b,_,L,52,8),_+8}s.prototype.writeDoubleLE=function(b,_,L){return z(this,b,_,!0,L)},s.prototype.writeDoubleBE=function(b,_,L){return z(this,b,_,!1,L)},s.prototype.copy=function(b,_,L,W){if(!s.isBuffer(b))throw new TypeError("argument should be a Buffer");if(L||(L=0),!W&&W!==0&&(W=this.length),_>=b.length&&(_=b.length),_||(_=0),W>0&&W<L&&(W=L),W===L||b.length===0||this.length===0)return 0;if(_<0)throw new RangeError("targetStart out of bounds");if(L<0||L>=this.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("sourceEnd out of bounds");W>this.length&&(W=this.length),b.length-_<W-L&&(W=b.length-_+L);const X=W-L;return this===b&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(_,L,W):Uint8Array.prototype.set.call(b,this.subarray(L,W),_),X},s.prototype.fill=function(b,_,L,W){if(typeof b=="string"){if(typeof _=="string"?(W=_,_=0,L=this.length):typeof L=="string"&&(W=L,L=this.length),W!==void 0&&typeof W!="string")throw new TypeError("encoding must be a string");if(typeof W=="string"&&!s.isEncoding(W))throw new TypeError("Unknown encoding: "+W);if(b.length===1){const se=b.charCodeAt(0);(W==="utf8"&&se<128||W==="latin1")&&(b=se)}}else typeof b=="number"?b=b&255:typeof b=="boolean"&&(b=Number(b));if(_<0||this.length<_||this.length<L)throw new RangeError("Out of range index");if(L<=_)return this;_=_>>>0,L=L===void 0?this.length:L>>>0,b||(b=0);let X;if(typeof b=="number")for(X=_;X<L;++X)this[X]=b;else{const se=s.isBuffer(b)?b:s.from(b,W),Pe=se.length;if(Pe===0)throw new TypeError('The value "'+b+'" is invalid for argument "value"');for(X=0;X<L-_;++X)this[X+_]=se[X%Pe]}return this};const M={};function R(C,b,_){M[C]=class extends _{constructor(){super(),Object.defineProperty(this,"message",{value:b.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${C}]`,this.stack,delete this.name}get code(){return C}set code(W){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:W,writable:!0})}toString(){return`${this.name} [${C}]: ${this.message}`}}}R("ERR_BUFFER_OUT_OF_BOUNDS",function(C){return C?`${C} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),R("ERR_INVALID_ARG_TYPE",function(C,b){return`The "${C}" argument must be of type number. Received type ${typeof b}`},TypeError),R("ERR_OUT_OF_RANGE",function(C,b,_){let L=`The value of "${C}" is out of range.`,W=_;return Number.isInteger(_)&&Math.abs(_)>2**32?W=G(String(_)):typeof _=="bigint"&&(W=String(_),(_>BigInt(2)**BigInt(32)||_<-(BigInt(2)**BigInt(32)))&&(W=G(W)),W+="n"),L+=` It must be ${b}. Received ${W}`,L},RangeError);function G(C){let b="",_=C.length;const L=C[0]==="-"?1:0;for(;_>=L+4;_-=3)b=`_${C.slice(_-3,_)}${b}`;return`${C.slice(0,_)}${b}`}function A(C,b,_){Z(b,"offset"),(C[b]===void 0||C[b+_]===void 0)&&ne(b,C.length-(_+1))}function T(C,b,_,L,W,X){if(C>_||C<b){const se=typeof b=="bigint"?"n":"";let Pe;throw X>3?b===0||b===BigInt(0)?Pe=`>= 0${se} and < 2${se} ** ${(X+1)*8}${se}`:Pe=`>= -(2${se} ** ${(X+1)*8-1}${se}) and < 2 ** ${(X+1)*8-1}${se}`:Pe=`>= ${b}${se} and <= ${_}${se}`,new M.ERR_OUT_OF_RANGE("value",Pe,C)}A(L,W,X)}function Z(C,b){if(typeof C!="number")throw new M.ERR_INVALID_ARG_TYPE(b,"number",C)}function ne(C,b,_){throw Math.floor(C)!==C?(Z(C,_),new M.ERR_OUT_OF_RANGE(_||"offset","an integer",C)):b<0?new M.ERR_BUFFER_OUT_OF_BOUNDS:new M.ERR_OUT_OF_RANGE(_||"offset",`>= ${_?1:0} and <= ${b}`,C)}const pe=/[^+/0-9A-Za-z-_]/g;function me(C){if(C=C.split("=")[0],C=C.trim().replace(pe,""),C.length<2)return"";for(;C.length%4!==0;)C=C+"=";return C}function xe(C,b){b=b||1/0;let _;const L=C.length;let W=null;const X=[];for(let se=0;se<L;++se){if(_=C.charCodeAt(se),_>55295&&_<57344){if(!W){if(_>56319){(b-=3)>-1&&X.push(239,191,189);continue}else if(se+1===L){(b-=3)>-1&&X.push(239,191,189);continue}W=_;continue}if(_<56320){(b-=3)>-1&&X.push(239,191,189),W=_;continue}_=(W-55296<<10|_-56320)+65536}else W&&(b-=3)>-1&&X.push(239,191,189);if(W=null,_<128){if((b-=1)<0)break;X.push(_)}else if(_<2048){if((b-=2)<0)break;X.push(_>>6|192,_&63|128)}else if(_<65536){if((b-=3)<0)break;X.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((b-=4)<0)break;X.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return X}function Ee(C){const b=[];for(let _=0;_<C.length;++_)b.push(C.charCodeAt(_)&255);return b}function ie(C,b){let _,L,W;const X=[];for(let se=0;se<C.length&&!((b-=2)<0);++se)_=C.charCodeAt(se),L=_>>8,W=_%256,X.push(W),X.push(L);return X}function Ne(C){return t.toByteArray(me(C))}function dt(C,b,_,L){let W;for(W=0;W<L&&!(W+_>=b.length||W>=C.length);++W)b[W+_]=C[W];return W}function Te(C,b){return C instanceof b||C!=null&&C.constructor!=null&&C.constructor.name!=null&&C.constructor.name===b.name}function Me(C){return C!==C}const bt=function(){const C="0123456789abcdef",b=new Array(256);for(let _=0;_<16;++_){const L=_*16;for(let W=0;W<16;++W)b[L+W]=C[_]+C[W]}return b}();function $e(C){return typeof BigInt>"u"?De:C}function De(){throw new Error("BigInt not supported")}})(Zt),globalThis.global=globalThis,globalThis.Buffer=Zt.Buffer,globalThis.process=Ts;var m8=Di(Fb()),Au=Di(Fb());m8.default,Au.callbackify;var wr=Au.inspect;Au.promisify;var Ps={exports:{}};Ps.exports,function(e,t){var r=200,n="__lodash_hash_undefined__",o=800,i=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",f="[object Boolean]",d="[object Date]",p="[object Error]",h="[object Function]",g="[object GeneratorFunction]",v="[object Map]",y="[object Number]",m="[object Null]",w="[object Object]",E="[object Proxy]",x="[object RegExp]",P="[object Set]",I="[object String]",S="[object Undefined]",O="[object WeakMap]",k="[object ArrayBuffer]",j="[object DataView]",D="[object Float32Array]",N="[object Float64Array]",J="[object Int8Array]",K="[object Int16Array]",Y="[object Int32Array]",te="[object Uint8Array]",oe="[object Uint8ClampedArray]",le="[object Uint16Array]",ae="[object Uint32Array]",ge=/[\\^$.*+?()[\]{}|]/g,ce=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,V={};V[D]=V[N]=V[J]=V[K]=V[Y]=V[te]=V[oe]=V[le]=V[ae]=!0,V[s]=V[l]=V[k]=V[f]=V[j]=V[d]=V[p]=V[h]=V[v]=V[y]=V[w]=V[x]=V[P]=V[I]=V[O]=!1;var re=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,de=typeof self=="object"&&self&&self.Object===Object&&self,U=re||de||Function("return this")(),z=t&&!t.nodeType&&t,M=z&&!0&&e&&!e.nodeType&&e,R=M&&M.exports===z,G=R&&re.process,A=function(){try{var $=M&&M.require&&M.require("util").types;return $||G&&G.binding&&G.binding("util")}catch{}}(),T=A&&A.isTypedArray;function Z($,B,ee){switch(ee.length){case 0:return $.call(B);case 1:return $.call(B,ee[0]);case 2:return $.call(B,ee[0],ee[1]);case 3:return $.call(B,ee[0],ee[1],ee[2])}return $.apply(B,ee)}function ne($,B){for(var ee=-1,he=Array($);++ee<$;)he[ee]=B(ee);return he}function pe($){return function(B){return $(B)}}function me($,B){return $?.[B]}function xe($,B){return function(ee){return $(B(ee))}}var Ee=Array.prototype,ie=Function.prototype,Ne=Object.prototype,dt=U["__core-js_shared__"],Te=ie.toString,Me=Ne.hasOwnProperty,bt=function(){var $=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||"");return $?"Symbol(src)_1."+$:""}(),$e=Ne.toString,De=Te.call(Object),C=RegExp("^"+Te.call(Me).replace(ge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=R?U.Buffer:void 0,_=U.Symbol,L=U.Uint8Array,W=b?b.allocUnsafe:void 0,X=xe(Object.getPrototypeOf,Object),se=Object.create,Pe=Ne.propertyIsEnumerable,it=Ee.splice,Le=_?_.toStringTag:void 0,Je=function(){try{var $=fa(Object,"defineProperty");return $({},"",{}),$}catch{}}(),Ze=b?b.isBuffer:void 0,tn=Math.max,Jo=Date.now,fr=fa(U,"Map"),Kt=fa(Object,"create"),ro=function(){function $(){}return function(B){if(!Yt(B))return{};if(se)return se(B);$.prototype=B;var ee=new $;return $.prototype=void 0,ee}}();function kt($){var B=-1,ee=$==null?0:$.length;for(this.clear();++B<ee;){var he=$[B];this.set(he[0],he[1])}}function oa(){this.__data__=Kt?Kt(null):{},this.size=0}function Xo($){var B=this.has($)&&delete this.__data__[$];return this.size-=B?1:0,B}function ia($){var B=this.__data__;if(Kt){var ee=B[$];return ee===n?void 0:ee}return Me.call(B,$)?B[$]:void 0}function Zo($){var B=this.__data__;return Kt?B[$]!==void 0:Me.call(B,$)}function Qo($,B){var ee=this.__data__;return this.size+=this.has($)?0:1,ee[$]=Kt&&B===void 0?n:B,this}kt.prototype.clear=oa,kt.prototype.delete=Xo,kt.prototype.get=ia,kt.prototype.has=Zo,kt.prototype.set=Qo;function $t($){var B=-1,ee=$==null?0:$.length;for(this.clear();++B<ee;){var he=$[B];this.set(he[0],he[1])}}function aa(){this.__data__=[],this.size=0}function ei($){var B=this.__data__,ee=It(B,$);if(ee<0)return!1;var he=B.length-1;return ee==he?B.pop():it.call(B,ee,1),--this.size,!0}function sa($){var B=this.__data__,ee=It(B,$);return ee<0?void 0:B[ee][1]}function la($){return It(this.__data__,$)>-1}function ca($,B){var ee=this.__data__,he=It(ee,$);return he<0?(++this.size,ee.push([$,B])):ee[he][1]=B,this}$t.prototype.clear=aa,$t.prototype.delete=ei,$t.prototype.get=sa,$t.prototype.has=la,$t.prototype.set=ca;function qt($){var B=-1,ee=$==null?0:$.length;for(this.clear();++B<ee;){var he=$[B];this.set(he[0],he[1])}}function H(){this.size=0,this.__data__={hash:new kt,map:new(fr||$t),string:new kt}}function fe($){var B=On(this,$).delete($);return this.size-=B?1:0,B}function _e($){return On(this,$).get($)}function Oe($){return On(this,$).has($)}function qe($,B){var ee=On(this,$),he=ee.size;return ee.set($,B),this.size+=ee.size==he?0:1,this}qt.prototype.clear=H,qt.prototype.delete=fe,qt.prototype.get=_e,qt.prototype.has=Oe,qt.prototype.set=qe;function Fe($){var B=this.__data__=new $t($);this.size=B.size}function Be(){this.__data__=new $t,this.size=0}function je($){var B=this.__data__,ee=B.delete($);return this.size=B.size,ee}function Tt($){return this.__data__.get($)}function mt($){return this.__data__.has($)}function yt($,B){var ee=this.__data__;if(ee instanceof $t){var he=ee.__data__;if(!fr||he.length<r-1)return he.push([$,B]),this.size=++ee.size,this;ee=this.__data__=new qt(he)}return ee.set($,B),this.size=ee.size,this}Fe.prototype.clear=Be,Fe.prototype.delete=je,Fe.prototype.get=Tt,Fe.prototype.has=mt,Fe.prototype.set=yt;function Rt($,B){var ee=ao($),he=!ee&&io($),Ce=!ee&&!he&&oi($),Se=!ee&&!he&&!Ce&&wl($),Ie=ee||he||Ce||Se,ke=Ie?ne($.length,String):[],Re=ke.length;for(var Nt in $)(B||Me.call($,Nt))&&!(Ie&&(Nt=="length"||Ce&&(Nt=="offset"||Nt=="parent")||Se&&(Nt=="buffer"||Nt=="byteLength"||Nt=="byteOffset")||gl(Nt,Re)))&&ke.push(Nt);return ke}function Qt($,B,ee){(ee!==void 0&&!Tn($[B],ee)||ee===void 0&&!(B in $))&&no($,B,ee)}function ti($,B,ee){var he=$[B];(!(Me.call($,B)&&Tn(he,ee))||ee===void 0&&!(B in $))&&no($,B,ee)}function It($,B){for(var ee=$.length;ee--;)if(Tn($[ee][0],B))return ee;return-1}function no($,B,ee){B=="__proto__"&&Je?Je($,B,{configurable:!0,enumerable:!0,value:ee,writable:!0}):$[B]=ee}var nd=gd();function rn($){return $==null?$===void 0?S:m:Le&&Le in Object($)?vd($):wd($)}function ua($){return so($)&&rn($)==s}function od($){if(!Yt($)||vl($))return!1;var B=ii($)?C:ce;return B.test(ni($))}function id($){return so($)&&Vr($.length)&&!!V[rn($)]}function ad($){if(!Yt($))return yd($);var B=ml($),ee=[];for(var he in $)he=="constructor"&&(B||!Me.call($,he))||ee.push(he);return ee}function ri($,B,ee,he,Ce){$!==B&&nd(B,function(Se,Ie){if(Ce||(Ce=new Fe),Yt(Se))sd($,B,Ie,ee,ri,he,Ce);else{var ke=he?he(pa($,Ie),Se,Ie+"",$,B,Ce):void 0;ke===void 0&&(ke=Se),Qt($,Ie,ke)}},El)}function sd($,B,ee,he,Ce,Se,Ie){var ke=pa($,ee),Re=pa(B,ee),Nt=Ie.get(Re);if(Nt){Qt($,ee,Nt);return}var Mt=Se?Se(ke,Re,ee+"",$,B,Ie):void 0,nn=Mt===void 0;if(nn){var ai=ao(Re),$d=!ai&&oi(Re),L1=!ai&&!$d&&wl(Re);Mt=Re,ai||$d||L1?ao(ke)?Mt=ke:bl(ke)?Mt=dd(ke):$d?(nn=!1,Mt=cd(Re,!0)):L1?(nn=!1,Mt=fd(Re,!0)):Mt=[]:yl(Re)||io(Re)?(Mt=ke,io(ke)?Mt=_l(ke):(!Yt(ke)||ii(ke))&&(Mt=hl(Re))):nn=!1}nn&&(Ie.set(Re,Mt),Ce(Mt,Re,he,Se,Ie),Ie.delete(Re)),Qt($,ee,Mt)}function pl($,B){return _d(da($,B,F),$+"")}var ld=Je?function($,B){return Je($,"toString",{configurable:!0,enumerable:!1,value:Sd(B),writable:!0})}:F;function cd($,B){if(B)return $.slice();var ee=$.length,he=W?W(ee):new $.constructor(ee);return $.copy(he),he}function ud($){var B=new $.constructor($.byteLength);return new L(B).set(new L($)),B}function fd($,B){var ee=B?ud($.buffer):$.buffer;return new $.constructor(ee,$.byteOffset,$.length)}function dd($,B){var ee=-1,he=$.length;for(B||(B=Array(he));++ee<he;)B[ee]=$[ee];return B}function pd($,B,ee,he){var Ce=!ee;ee||(ee={});for(var Se=-1,Ie=B.length;++Se<Ie;){var ke=B[Se],Re=he?he(ee[ke],$[ke],ke,ee,$):void 0;Re===void 0&&(Re=$[ke]),Ce?no(ee,ke,Re):ti(ee,ke,Re)}return ee}function hd($){return pl(function(B,ee){var he=-1,Ce=ee.length,Se=Ce>1?ee[Ce-1]:void 0,Ie=Ce>2?ee[2]:void 0;for(Se=$.length>3&&typeof Se=="function"?(Ce--,Se):void 0,Ie&&md(ee[0],ee[1],Ie)&&(Se=Ce<3?void 0:Se,Ce=1),B=Object(B);++he<Ce;){var ke=ee[he];ke&&$(B,ke,he,Se)}return B})}function gd($){return function(B,ee,he){for(var Ce=-1,Se=Object(B),Ie=he(B),ke=Ie.length;ke--;){var Re=Ie[$?ke:++Ce];if(ee(Se[Re],Re,Se)===!1)break}return B}}function oo($,B,ee,he,Ce,Se){return Yt($)&&Yt(B)&&(Se.set(B,$),ri($,B,void 0,oo,Se),Se.delete(B)),$}function On($,B){var ee=$.__data__;return bd(B)?ee[typeof B=="string"?"string":"hash"]:ee.map}function fa($,B){var ee=me($,B);return od(ee)?ee:void 0}function vd($){var B=Me.call($,Le),ee=$[Le];try{$[Le]=void 0;var he=!0}catch{}var Ce=$e.call($);return he&&(B?$[Le]=ee:delete $[Le]),Ce}function hl($){return typeof $.constructor=="function"&&!ml($)?ro(X($)):{}}function gl($,B){var ee=typeof $;return B=B??a,!!B&&(ee=="number"||ee!="symbol"&&q.test($))&&$>-1&&$%1==0&&$<B}function md($,B,ee){if(!Yt(ee))return!1;var he=typeof B;return(he=="number"?ha(ee)&&gl(B,ee.length):he=="string"&&B in ee)?Tn(ee[B],$):!1}function bd($){var B=typeof $;return B=="string"||B=="number"||B=="symbol"||B=="boolean"?$!=="__proto__":$===null}function vl($){return!!bt&&bt in $}function ml($){var B=$&&$.constructor,ee=typeof B=="function"&&B.prototype||Ne;return $===ee}function yd($){var B=[];if($!=null)for(var ee in Object($))B.push(ee);return B}function wd($){return $e.call($)}function da($,B,ee){return B=tn(B===void 0?$.length-1:B,0),function(){for(var he=arguments,Ce=-1,Se=tn(he.length-B,0),Ie=Array(Se);++Ce<Se;)Ie[Ce]=he[B+Ce];Ce=-1;for(var ke=Array(B+1);++Ce<B;)ke[Ce]=he[Ce];return ke[B]=ee(Ie),Z($,this,ke)}}function pa($,B){if(!(B==="constructor"&&typeof $[B]=="function")&&B!="__proto__")return $[B]}var _d=Ed(ld);function Ed($){var B=0,ee=0;return function(){var he=Jo(),Ce=i-(he-ee);if(ee=he,Ce>0){if(++B>=o)return arguments[0]}else B=0;return $.apply(void 0,arguments)}}function ni($){if($!=null){try{return Te.call($)}catch{}try{return $+""}catch{}}return""}function Tn($,B){return $===B||$!==$&&B!==B}var io=ua(function(){return arguments}())?ua:function($){return so($)&&Me.call($,"callee")&&!Pe.call($,"callee")},ao=Array.isArray;function ha($){return $!=null&&Vr($.length)&&!ii($)}function bl($){return so($)&&ha($)}var oi=Ze||Q;function ii($){if(!Yt($))return!1;var B=rn($);return B==h||B==g||B==u||B==E}function Vr($){return typeof $=="number"&&$>-1&&$%1==0&&$<=a}function Yt($){var B=typeof $;return $!=null&&(B=="object"||B=="function")}function so($){return $!=null&&typeof $=="object"}function yl($){if(!so($)||rn($)!=w)return!1;var B=X($);if(B===null)return!0;var ee=Me.call(B,"constructor")&&B.constructor;return typeof ee=="function"&&ee instanceof ee&&Te.call(ee)==De}var wl=T?pe(T):id;function _l($){return pd($,El($))}var xd=pl(function($){return $.push(void 0,oo),Z(xl,void 0,$)});function El($){return ha($)?Rt($,!0):ad($)}var xl=hd(function($,B,ee,he){ri($,B,ee,he)});function Sd($){return function(){return $}}function F($){return $}function Q(){return!1}e.exports=xd}(Ps,Ps.exports);var b8=Ps.exports;const y8=In(b8);var Mi=(e,t,r)=>{if(e)return;let n="invariant violation";throw t&&(n+=`: ${t}`),r?.A&&(n+=` [${r.A[0]}]`),r?.F&&(n+=` at ${_8(r.F)}:${r.L}`),new w8(n)},w8=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},_8=e=>{const t=e.match(/.+\/(packages\/.+\/.+)/);if(t){const[,r]=t;return r}return e},E8=He({"node_modules/.pnpm/events@3.3.0/node_modules/events/events.js"(e,t){var r=typeof Reflect=="object"?Reflect:null,n=r&&typeof r.apply=="function"?r.apply:function(S,O,k){return Function.prototype.apply.call(S,O,k)},o;r&&typeof r.ownKeys=="function"?o=r.ownKeys:Object.getOwnPropertySymbols?o=function(S){return Object.getOwnPropertyNames(S).concat(Object.getOwnPropertySymbols(S))}:o=function(S){return Object.getOwnPropertyNames(S)};function i(I){console&&console.warn&&console.warn(I)}var a=Number.isNaN||function(S){return S!==S};function s(){s.init.call(this)}t.exports=s,t.exports.once=E,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function u(I){if(typeof I!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof I)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(I){if(typeof I!="number"||I<0||a(I))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+I+".");l=I}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(S){if(typeof S!="number"||S<0||a(S))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+S+".");return this._maxListeners=S,this};function f(I){return I._maxListeners===void 0?s.defaultMaxListeners:I._maxListeners}s.prototype.getMaxListeners=function(){return f(this)},s.prototype.emit=function(S){for(var O=[],k=1;k<arguments.length;k++)O.push(arguments[k]);var j=S==="error",D=this._events;if(D!==void 0)j=j&&D.error===void 0;else if(!j)return!1;if(j){var N;if(O.length>0&&(N=O[0]),N instanceof Error)throw N;var J=new Error("Unhandled error."+(N?" ("+N.message+")":""));throw J.context=N,J}var K=D[S];if(K===void 0)return!1;if(typeof K=="function")n(K,this,O);else for(var Y=K.length,te=y(K,Y),k=0;k<Y;++k)n(te[k],this,O);return!0};function d(I,S,O,k){var j,D,N;if(u(O),D=I._events,D===void 0?(D=I._events=Object.create(null),I._eventsCount=0):(D.newListener!==void 0&&(I.emit("newListener",S,O.listener?O.listener:O),D=I._events),N=D[S]),N===void 0)N=D[S]=O,++I._eventsCount;else if(typeof N=="function"?N=D[S]=k?[O,N]:[N,O]:k?N.unshift(O):N.push(O),j=f(I),j>0&&N.length>j&&!N.warned){N.warned=!0;var J=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(S)+" listeners added. Use emitter.setMaxListeners() to increase limit");J.name="MaxListenersExceededWarning",J.emitter=I,J.type=S,J.count=N.length,i(J)}return I}s.prototype.addListener=function(S,O){return d(this,S,O,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(S,O){return d(this,S,O,!0)};function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(I,S,O){var k={fired:!1,wrapFn:void 0,target:I,type:S,listener:O},j=p.bind(k);return j.listener=O,k.wrapFn=j,j}s.prototype.once=function(S,O){return u(O),this.on(S,h(this,S,O)),this},s.prototype.prependOnceListener=function(S,O){return u(O),this.prependListener(S,h(this,S,O)),this},s.prototype.removeListener=function(S,O){var k,j,D,N,J;if(u(O),j=this._events,j===void 0)return this;if(k=j[S],k===void 0)return this;if(k===O||k.listener===O)--this._eventsCount===0?this._events=Object.create(null):(delete j[S],j.removeListener&&this.emit("removeListener",S,k.listener||O));else if(typeof k!="function"){for(D=-1,N=k.length-1;N>=0;N--)if(k[N]===O||k[N].listener===O){J=k[N].listener,D=N;break}if(D<0)return this;D===0?k.shift():m(k,D),k.length===1&&(j[S]=k[0]),j.removeListener!==void 0&&this.emit("removeListener",S,J||O)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(S){var O,k,j;if(k=this._events,k===void 0)return this;if(k.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):k[S]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete k[S]),this;if(arguments.length===0){var D=Object.keys(k),N;for(j=0;j<D.length;++j)N=D[j],N!=="removeListener"&&this.removeAllListeners(N);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(O=k[S],typeof O=="function")this.removeListener(S,O);else if(O!==void 0)for(j=O.length-1;j>=0;j--)this.removeListener(S,O[j]);return this};function g(I,S,O){var k=I._events;if(k===void 0)return[];var j=k[S];return j===void 0?[]:typeof j=="function"?O?[j.listener||j]:[j]:O?w(j):y(j,j.length)}s.prototype.listeners=function(S){return g(this,S,!0)},s.prototype.rawListeners=function(S){return g(this,S,!1)},s.listenerCount=function(I,S){return typeof I.listenerCount=="function"?I.listenerCount(S):v.call(I,S)},s.prototype.listenerCount=v;function v(I){var S=this._events;if(S!==void 0){var O=S[I];if(typeof O=="function")return 1;if(O!==void 0)return O.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?o(this._events):[]};function y(I,S){for(var O=new Array(S),k=0;k<S;++k)O[k]=I[k];return O}function m(I,S){for(;S+1<I.length;S++)I[S]=I[S+1];I.pop()}function w(I){for(var S=new Array(I.length),O=0;O<S.length;++O)S[O]=I[O].listener||I[O];return S}function E(I,S){return new Promise(function(O,k){function j(N){I.removeListener(S,D),k(N)}function D(){typeof I.removeListener=="function"&&I.removeListener("error",j),O([].slice.call(arguments))}P(I,S,D,{once:!0}),S!=="error"&&x(I,j,{once:!0})})}function x(I,S,O){typeof I.on=="function"&&P(I,"error",S,O)}function P(I,S,O,k){if(typeof I.on=="function")k.once?I.once(S,O):I.on(S,O);else if(typeof I.addEventListener=="function")I.addEventListener(S,function j(D){k.once&&I.removeEventListener(S,j),O(D)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof I)}}}),Rb=Di(E8());Rb.EventEmitter,Rb.EventEmitter;var ks=e=>{const t=Object.getPrototypeOf(e).constructor.name;return e.toJSON?`${t}(${wr(e.toJSON())})`:String(e)},Ub=e=>{throw e},Wb;(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.VERBOSE=1]="VERBOSE",e[e.BOLD=2]="BOLD"})(Wb||(Wb={}));var x8=(e,t=8)=>{const r=String(e);return r.length<=t?r:r.slice(0,t)},Ns=Symbol.for("devtoolsFormatter"),S8=()=>{typeof window<"u"&&(window.devtoolsFormatters??=[]).push({header:(e,t)=>{const r=e[Ns];if(r===void 0)return null;if(typeof r!="object"||r===null||typeof r.header!="function")throw new Error(`Invalid devtools formatter for ${e.constructor.name}`);return r.header(t)},hasBody:(e,t)=>{const r=e[Ns];return!r||!r.hasBody?!1:r.hasBody(t)},body:(e,t)=>{const r=e[Ns];return!r||!r.body?null:r.body(t)}})};S8();var $8=Symbol.for("dxos.common.equals"),Ou={exports:{}},Tu={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(e,t){var r=Zt,n=r.Buffer;function o(a,s){for(var l in a)s[l]=a[l]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=i);function i(a,s,l){return n(a,s,l)}i.prototype=Object.create(n.prototype),o(n,i),i.from=function(a,s,l){if(typeof a=="number")throw new TypeError("Argument must not be a number");return n(a,s,l)},i.alloc=function(a,s,l){if(typeof a!="number")throw new TypeError("Argument must be a number");var u=n(a);return s!==void 0?typeof l=="string"?u.fill(s,l):u.fill(s):u.fill(0),u},i.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n(a)},i.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(a)}})(Tu,Tu.exports);var Vb=Tu.exports,Iu=65536,C8=4294967295;function A8(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
106
|
-
Use Chrome, Firefox or Internet Explorer 11`)}var O8=Vb.Buffer,Ds=Ye.crypto||Ye.msCrypto;Ds&&Ds.getRandomValues?Ou.exports=T8:Ou.exports=A8;function T8(e,t){if(e>C8)throw new RangeError("requested too many random bytes");var r=O8.allocUnsafe(e);if(e>0)if(e>Iu)for(var n=0;n<e;n+=Iu)Ds.getRandomValues(r.slice(n,n+Iu));else Ds.getRandomValues(r);return typeof t=="function"?process.nextTick(function(){t(null,r)}):r}var I8=Ou.exports;const P8=In(I8);var Pu="/home/runner/work/dxos/dxos/packages/common/keys/src/public-key.ts",k8=32,Hb=class Ut{static from(t){if(Mi(t,void 0,{F:Pu,L:31,S:this,A:["source",""]}),t instanceof Ut)return t;if(t instanceof Zt.Buffer)return new Ut(new Uint8Array(t.buffer,t.byteOffset,t.byteLength));if(t instanceof Uint8Array)return new Ut(t);if(t instanceof ArrayBuffer)return new Ut(new Uint8Array(t));if(typeof t=="string")return Ut.fromHex(t);if(t.asUint8Array)return new Ut(t.asUint8Array());throw new TypeError(`Unable to create PublicKey from ${t}`)}static safeFrom(t){if(t)try{return Ut.from(t)}catch{return}}static fromHex(t){t.startsWith("0x")&&(t=t.slice(2));const r=Zt.Buffer.from(t,"hex");return new Ut(new Uint8Array(r.buffer,r.byteOffset,r.byteLength))}static random(){return Ut.from(P8(k8))}static*randomSequence(){for(let t=0;t<1e4;t++)yield Ut.random();throw new Error("Too many keys requested")}static isPublicKey(t){return t instanceof Ut}static assertValidPublicKey(t){if(!this.isPublicKey(t))throw new TypeError("Invalid PublicKey")}static equals(t,r){return Ut.from(t).equals(r)}static bufferize(t){return Mi(typeof t=="string","Invalid type",{F:Pu,L:130,S:this,A:["typeof str === 'string'","'Invalid type'"]}),Zt.Buffer.from(t,"hex")}static stringify(t){return t instanceof Ut?t=t.asBuffer():t instanceof Uint8Array&&(t=Zt.Buffer.from(t.buffer,t.byteOffset,t.byteLength)),Mi(t instanceof Zt.Buffer,"Invalid type",{F:Pu,L:149,S:this,A:["key instanceof Buffer","'Invalid type'"]}),t.toString("hex")}static hash(t){return t.toHex()}constructor(t){if(this._value=t,!(t instanceof Uint8Array))throw new TypeError(`Expected Uint8Array, got: ${t}`)}toString(){return this.toHex()}toJSON(){return this.toHex()}get length(){return this._value.length}toHex(){return this.asBuffer().toString("hex")}truncate(t=void 0){return x8(this,t)}asBuffer(){return Zt.Buffer.from(this._value.buffer,this._value.byteOffset,this._value.byteLength)}asUint8Array(){return this._value}getInsecureHash(t){return Math.abs(this._value.reduce((r,n)=>r^n|0,0))%t}[wr.custom](t,r){if(!r.colors||typeof Ts.stdout.hasColors!="function"||!Ts.stdout.hasColors())return`<PublicKey ${this.truncate()}>`;const n=a=>`\x1B[${a}m`,o=["red","green","yellow","blue","magenta","cyan","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright"],i=o[this.getInsecureHash(o.length)];return`PublicKey(${n(wr.colors[i][0])}${this.truncate()}${n(wr.colors.reset[0])})`}get[Ns](){return{header:()=>{const t=["darkred","green","orange","blue","darkmagenta","darkcyan","red","green","orange","blue","magenta","darkcyan","black"],r=t[this.getInsecureHash(t.length)];return["span",{},["span",{},"PublicKey("],["span",{style:`color: ${r};`},this.truncate()],["span",{},")"]]}}}equals(t){const r=Ut.from(t);if(this._value.length!==r._value.length)return!1;let n=!0;for(let o=0;o<this._value.length;o++)n&&=this._value[o]===r._value[o];return n}[$8](t){return Ut.isPublicKey(t)?this.equals(t):!1}},zb=10;(class{constructor(e,t){if(this._projection=e,this._values=new Map,t)for(const r of t)this.add(r)}toString(){return ks(this)}toJSON(){return this._values.size>zb?{size:this._values.size}:Array.from(this._values.values())}[wr.custom](){return ks(this)}add(e){return this._values.set(this._projection(e),e),this}clear(){this._values.clear()}delete(e){return this._values.delete(this._projection(e))}forEach(e,t){t&&(e=e.bind(t)),this._values.forEach(r=>e(r,r,this))}has(e){return this._values.has(this._projection(e))}get size(){return this._values.size}[Symbol.iterator](){return this._values.values()}*entries(){for(const e of this._values.values())yield[e,e]}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}get[Symbol.toStringTag](){return"ComplexSet"}}),class{constructor(e,t){if(this._keyProjection=e,this._keys=new Map,this._values=new Map,t)for(const[r,n]of t)this.set(r,n)}toString(){return ks(this)}toJSON(){return this._values.size>zb?{size:this._values.size}:Array.from(this._values.values())}[wr.custom](){return ks(this)}clear(){this._keys.clear(),this._values.clear()}delete(e){const t=this._keys.delete(this._keyProjection(e)),r=this._values.delete(this._keyProjection(e));return t||r}forEach(e,t){t&&(e=e.bind(t)),this._keys.forEach((r,n)=>e(this._values.get(n)??Ub(new Error("Map corrupted.")),r,this))}get(e){return this._values.get(this._keyProjection(e))}has(e){return this._keys.has(this._keyProjection(e))}set(e,t){const r=this._keyProjection(e);return this._keys.set(r,e),this._values.set(r,t),this}get size(){return this._keys.size}*[Symbol.iterator](){for(const[e,t]of this._keys){const r=this._values.get(e)??Ub(new Error("Map corrupted."));yield[t,r]}}entries(){return this[Symbol.iterator]()}keys(){return this._keys.values()}values(){return this._values.values()}get[Symbol.toStringTag](){return"ComplexMap"}};var N8=["ack","alabama","alanine","alaska","alpha","angel","apart","april","arizona","arkansas","artist","asparagus","aspen","august","autumn","avocado","bacon","bakerloo","batman","beer","berlin","beryllium","black","blossom","blue","bluebird","bravo","bulldog","burger","butter","california","carbon","cardinal","carolina","carpet","cat","ceiling","charlie","chicken","coffee","cola","cold","colorado","comet","connecticut","crazy","cup","dakota","december","delaware","delta","diet","don","double","early","earth","east","echo","edward","eight","eighteen","eleven","emma","enemy","equal","failed","fanta","fifteen","fillet","finch","fish","five","fix","floor","florida","football","four","fourteen","foxtrot","freddie","friend","fruit","gee","georgia","glucose","golf","green","grey","hamper","happy","harry","hawaii","helium","high","hot","hotel","hydrogen","idaho","illinois","india","indigo","ink","iowa","island","item","jersey","jig","johnny","juliet","july","jupiter","kansas","kentucky","kilo","king","kitten","lactose","lake","lamp","lemon","leopard","lima","lion","lithium","london","louisiana","low","magazine","magnesium","maine","mango","march","mars","maryland","massachusetts","may","mexico","michigan","mike","minnesota","mirror","mississippi","missouri","mobile","mockingbird","monkey","montana","moon","mountain","muppet","music","nebraska","neptune","network","nevada","nine","nineteen","nitrogen","north","november","nuts","october","ohio","oklahoma","one","orange","oranges","oregon","oscar","oven","oxygen","papa","paris","pasta","pennsylvania","pip","pizza","pluto","potato","princess","purple","quebec","queen","quiet","red","river","robert","robin","romeo","rugby","sad","salami","saturn","september","seven","seventeen","shade","sierra","single","sink","six","sixteen","skylark","snake","social","sodium","solar","south","spaghetti","speaker","spring","stairway","steak","stream","summer","sweet","table","tango","ten","tennessee","tennis","texas","thirteen","three","timing","triple","twelve","twenty","two","uncle","undress","uniform","uranus","utah","vegan","venus","vermont","victor","video","violet","virginia","washington","west","whiskey","white","william","winner","winter","wisconsin","wolfram","wyoming","xray","yankee","yellow","zebra","zulu"],D8=class{constructor(e=N8){if(this.wordlist=e,e.length!==256)throw new Error("Wordlist must have exactly 256 items");this.wordlist=e}humanize(e,t=4,r="-"){const n=e.match(/(..?)/g);if(!n)throw new Error("");const o=n.map(a=>parseInt(a,16));return this._compress(o,t).map(a=>this.wordlist[a]).join(r)}_compress(e,t){const r=e.length;if(t>r)throw new Error("Fewer input bytes than requested output");const n=r/t>>0,o=[];for(let a=0;a<n*t;a+=n)o.push(e.slice(a,a+n));return o[o.length-1]=o[o.length-1].concat(e.slice(t*n)),o.map(a=>a.reduce((s,l)=>s^l))}},L8=new D8,M8=e=>(e instanceof Zt.Buffer||e instanceof Uint8Array||e instanceof ArrayBuffer?e=Hb.stringify(e):e instanceof Hb&&(e=e.toHex()),L8.humanize(e)),F8=e=>Zt.Buffer.from(e.buffer,e.byteOffset,e.byteLength),j8=5,ku=(e,t=0,r=new WeakSet)=>{if(t>j8)return null;if(typeof e=="function")return null;if(typeof e=="object"&&e!==null){if(r.has(e))return null;r.add(e);try{if(e instanceof Uint8Array)return F8(e).toString("hex");if(Array.isArray(e))return e.map(n=>ku(n,t+1,r));if(typeof e.toJSON=="function")return e.toJSON();{const n={};for(const o of Object.keys(e))n[o]=ku(e[o],t+1,r);return n}}finally{r.delete(e)}}else return e},B8=(e,t,r)=>{let n=e.get(t);return n===void 0&&(n=typeof r=="function"?r():r,e.set(t,n)),n},R8=()=>typeof navigator<"u"&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Nu=Symbol("instanceTag"),U8=e=>t=>{t.prototype[Nu]=e,Object.defineProperty(t.prototype,Symbol.hasInstance,{value:r=>r?.[Nu]===e}),Object.defineProperty(t,Symbol.hasInstance,{value:r=>r?.[Nu]===e})},W8=Symbol.for("dxos.instance-contexts"),V8=globalThis[W8]??=new WeakMap,H8=e=>{const t=Object.getPrototypeOf(e),r=B8(V8,t,()=>({nextId:0,instanceIds:new WeakMap}));let n=r.instanceIds.get(e);return n===void 0&&(n=r.nextId++,r.instanceIds.set(e,n)),n},Du=()=>{throw new Error("Not available on this platform")},z8=()=>Du(),G8=()=>Du(),K8=()=>Du(),Gb=He({"node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js"(e,t){function r(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function n(a,s){for(var l="",u=0,f=-1,d=0,p,h=0;h<=a.length;++h){if(h<a.length)p=a.charCodeAt(h);else{if(p===47)break;p=47}if(p===47){if(!(f===h-1||d===1))if(f!==h-1&&d===2){if(l.length<2||u!==2||l.charCodeAt(l.length-1)!==46||l.charCodeAt(l.length-2)!==46){if(l.length>2){var g=l.lastIndexOf("/");if(g!==l.length-1){g===-1?(l="",u=0):(l=l.slice(0,g),u=l.length-1-l.lastIndexOf("/")),f=h,d=0;continue}}else if(l.length===2||l.length===1){l="",u=0,f=h,d=0;continue}}s&&(l.length>0?l+="/..":l="..",u=2)}else l.length>0?l+="/"+a.slice(f+1,h):l=a.slice(f+1,h),u=h-f-1;f=h,d=0}else p===46&&d!==-1?++d:d=-1}return l}function o(a,s){var l=s.dir||s.root,u=s.base||(s.name||"")+(s.ext||"");return l?l===s.root?l+u:l+a+u:u}var i={resolve:function(){for(var s="",l=!1,u,f=arguments.length-1;f>=-1&&!l;f--){var d;f>=0?d=arguments[f]:(u===void 0&&(u=process.cwd()),d=u),r(d),d.length!==0&&(s=d+"/"+s,l=d.charCodeAt(0)===47)}return s=n(s,!l),l?s.length>0?"/"+s:"/":s.length>0?s:"."},normalize:function(s){if(r(s),s.length===0)return".";var l=s.charCodeAt(0)===47,u=s.charCodeAt(s.length-1)===47;return s=n(s,!l),s.length===0&&!l&&(s="."),s.length>0&&u&&(s+="/"),l?"/"+s:s},isAbsolute:function(s){return r(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var s,l=0;l<arguments.length;++l){var u=arguments[l];r(u),u.length>0&&(s===void 0?s=u:s+="/"+u)}return s===void 0?".":i.normalize(s)},relative:function(s,l){if(r(s),r(l),s===l||(s=i.resolve(s),l=i.resolve(l),s===l))return"";for(var u=1;u<s.length&&s.charCodeAt(u)===47;++u);for(var f=s.length,d=f-u,p=1;p<l.length&&l.charCodeAt(p)===47;++p);for(var h=l.length,g=h-p,v=d<g?d:g,y=-1,m=0;m<=v;++m){if(m===v){if(g>v){if(l.charCodeAt(p+m)===47)return l.slice(p+m+1);if(m===0)return l.slice(p+m)}else d>v&&(s.charCodeAt(u+m)===47?y=m:m===0&&(y=0));break}var w=s.charCodeAt(u+m),E=l.charCodeAt(p+m);if(w!==E)break;w===47&&(y=m)}var x="";for(m=u+y+1;m<=f;++m)(m===f||s.charCodeAt(m)===47)&&(x.length===0?x+="..":x+="/..");return x.length>0?x+l.slice(p+y):(p+=y,l.charCodeAt(p)===47&&++p,l.slice(p))},_makeLong:function(s){return s},dirname:function(s){if(r(s),s.length===0)return".";for(var l=s.charCodeAt(0),u=l===47,f=-1,d=!0,p=s.length-1;p>=1;--p)if(l=s.charCodeAt(p),l===47){if(!d){f=p;break}}else d=!1;return f===-1?u?"/":".":u&&f===1?"//":s.slice(0,f)},basename:function(s,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');r(s);var u=0,f=-1,d=!0,p;if(l!==void 0&&l.length>0&&l.length<=s.length){if(l.length===s.length&&l===s)return"";var h=l.length-1,g=-1;for(p=s.length-1;p>=0;--p){var v=s.charCodeAt(p);if(v===47){if(!d){u=p+1;break}}else g===-1&&(d=!1,g=p+1),h>=0&&(v===l.charCodeAt(h)?--h===-1&&(f=p):(h=-1,f=g))}return u===f?f=g:f===-1&&(f=s.length),s.slice(u,f)}else{for(p=s.length-1;p>=0;--p)if(s.charCodeAt(p)===47){if(!d){u=p+1;break}}else f===-1&&(d=!1,f=p+1);return f===-1?"":s.slice(u,f)}},extname:function(s){r(s);for(var l=-1,u=0,f=-1,d=!0,p=0,h=s.length-1;h>=0;--h){var g=s.charCodeAt(h);if(g===47){if(!d){u=h+1;break}continue}f===-1&&(d=!1,f=h+1),g===46?l===-1?l=h:p!==1&&(p=1):l!==-1&&(p=-1)}return l===-1||f===-1||p===0||p===1&&l===f-1&&l===u+1?"":s.slice(l,f)},format:function(s){if(s===null||typeof s!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof s);return o("/",s)},parse:function(s){r(s);var l={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return l;var u=s.charCodeAt(0),f=u===47,d;f?(l.root="/",d=1):d=0;for(var p=-1,h=0,g=-1,v=!0,y=s.length-1,m=0;y>=d;--y){if(u=s.charCodeAt(y),u===47){if(!v){h=y+1;break}continue}g===-1&&(v=!1,g=y+1),u===46?p===-1?p=y:m!==1&&(m=1):p!==-1&&(m=-1)}return p===-1||g===-1||m===0||m===1&&p===g-1&&p===h+1?g!==-1&&(h===0&&f?l.base=l.name=s.slice(1,g):l.base=l.name=s.slice(h,g)):(h===0&&f?(l.name=s.slice(1,p),l.base=s.slice(1,g)):(l.name=s.slice(h,p),l.base=s.slice(h,g)),l.ext=s.slice(p,g)),h>0?l.dir=s.slice(0,h-1):f&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,t.exports=i}});Di(Gb());var Rr=Di(Gb());Rr.basename;var q8=Rr.dirname;Rr.extname,Rr.format,Rr.isAbsolute,Rr.join,Rr.normalize,Rr.parse,Rr.relative,Rr.resolve;var Xe;(function(e){e[e.TRACE=5]="TRACE",e[e.DEBUG=10]="DEBUG",e[e.INFO=11]="INFO",e[e.WARN=12]="WARN",e[e.ERROR=13]="ERROR"})(Xe||(Xe={}));var Y8={trace:Xe.TRACE,debug:Xe.DEBUG,info:Xe.INFO,warn:Xe.WARN,error:Xe.ERROR};Xe.TRACE+"",Xe.DEBUG+"",Xe.INFO+"",Xe.WARN+"",Xe.ERROR+"";var Fi;(function(e){e.CONSOLE="console",e.BROWSER="browser",e.DEBUG="debug"})(Fi||(Fi={}));var J8=Symbol("logInfoProperties"),X8=e=>{if(!e)return{};const t={},n=Object.getPrototypeOf(e)[J8]??[];for(const o of n)try{t[o]=typeof e[o]=="function"?e[o]():e[o]}catch(i){t[o]=i.message}return t},Z8=(e,t,r)=>t>=e.level&&(!e.pattern||r.includes(e.pattern)),Kb=(e,t)=>t===void 0?!0:t.some(r=>Z8(r,e.level,e.meta?.F??"")),Lu=e=>{let t;if(e.meta){const r=X8(e.meta.S);Object.keys(r).length>0&&(t=Object.assign(t??{},r))}if(e.context)if(e.context instanceof Error){const r=e.context.context;t=Object.assign(t??{},{error:e.context.stack,...r})}else typeof e.context=="object"&&(t=Object.assign(t??{},e.context));return t&&Object.keys(t).length>0?t:void 0},Q8=0,eD=e=>(t,r,n)=>(o,i,a)=>{const s=a.value;a.value=function(...l){const u={...n??{},S:this},f=l.map(d=>wr(d,!1,1,!0)).join(", ");try{const d=performance.now(),p=s.apply(this,l);if(tD(p)){const h=Q8++;e.info(`${i}(${f}) => Promise { #${h} }`,{},u),p.then(g=>{g!==void 0?e.info(`✅ resolve #${h} ${(performance.now()-d).toFixed(0)}ms => ${wr(g,!1,1,!0)}`,{},u):e.info(`✅ resolve #${h} ${(performance.now()-d).toFixed(0)}ms`,{},u)},g=>{e.info(`🔥 reject #${h} #${(performance.now()-d).toFixed(0)}ms => ${g}`,{},u)})}else e.info(`${i}(${f}) => ${wr(p,!1,1,!0)}`,{},u);return p}catch(d){throw e.error(`${i}(${f}) 🔥 ${d}`,{},u),d}},Object.defineProperty(a.value,"name",{value:i+"$log"})},tD=e=>e&&typeof e.then=="function",rD=e=>{try{return JSON.parse(localStorage.getItem("dxlog"))}catch{return}},qb=()=>{},nD=(e,t)=>{console.log(wr(t,!1,null,!0))},Yb=e=>{const t=e.match(/.+\/(packages\/.+\/.+)/);if(t){const[,r]=t;return r}return e},Mu=typeof mochaExecutor<"u"?{useTestProcessor:!0,printFileLinks:!0}:{useTestProcessor:!1,printFileLinks:!1},oD=(e,t)=>{if(!Kb(t,e.filters))return;const r=e.prefix??"https://vscode.dev/github.com/dxos/dxos/blob/main/",n=[];let o="";if(t.meta){const u=Yb(t.meta.F);o=`${`${r.replace(/\/$/,"")}/${u}`}#L${t.meta.L}`}let i=[];if(t.meta?.S){const u=t.meta?.S,f=Object.getPrototypeOf(u),d=H8(u);i.push(`%c${f.constructor.name}#${d}`,"color:#C026D3;font-weight:bold")}i.push(t.message);const a=Lu(t);a&&i.push(a);const s={[Xe.ERROR]:console.error,[Xe.WARN]:console.warn,[Xe.DEBUG]:console.log};(Mu.printFileLinks||R8())&&(n?.length?i=[`%c${o}
|
|
105
|
+
*/(function(e){const t=Us,r=Vu,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=w,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const A=new Uint8Array(1),y={foo:function(){return 42}};return Object.setPrototypeOf(y,Uint8Array.prototype),Object.setPrototypeOf(A,y),A.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(A){if(A>o)throw new RangeError('The value "'+A+'" is invalid for option "size"');const y=new Uint8Array(A);return Object.setPrototypeOf(y,s.prototype),y}function s(A,y,_){if(typeof A=="number"){if(typeof y=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(A)}return l(A,y,_)}s.poolSize=8192;function l(A,y,_){if(typeof A=="string")return p(A,y);if(ArrayBuffer.isView(A))return g(A);if(A==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A);if(Te(A,ArrayBuffer)||A&&Te(A.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Te(A,SharedArrayBuffer)||A&&Te(A.buffer,SharedArrayBuffer)))return v(A,y,_);if(typeof A=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const L=A.valueOf&&A.valueOf();if(L!=null&&L!==A)return s.from(L,y,_);const W=b(A);if(W)return W;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof A[Symbol.toPrimitive]=="function")return s.from(A[Symbol.toPrimitive]("string"),y,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A)}s.from=function(A,y,_){return l(A,y,_)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(A){if(typeof A!="number")throw new TypeError('"size" argument must be of type number');if(A<0)throw new RangeError('The value "'+A+'" is invalid for option "size"')}function f(A,y,_){return u(A),A<=0?a(A):y!==void 0?typeof _=="string"?a(A).fill(y,_):a(A).fill(y):a(A)}s.alloc=function(A,y,_){return f(A,y,_)};function d(A){return u(A),a(A<0?0:m(A)|0)}s.allocUnsafe=function(A){return d(A)},s.allocUnsafeSlow=function(A){return d(A)};function p(A,y){if((typeof y!="string"||y==="")&&(y="utf8"),!s.isEncoding(y))throw new TypeError("Unknown encoding: "+y);const _=E(A,y)|0;let L=a(_);const W=L.write(A,y);return W!==_&&(L=L.slice(0,W)),L}function h(A){const y=A.length<0?0:m(A.length)|0,_=a(y);for(let L=0;L<y;L+=1)_[L]=A[L]&255;return _}function g(A){if(Te(A,Uint8Array)){const y=new Uint8Array(A);return v(y.buffer,y.byteOffset,y.byteLength)}return h(A)}function v(A,y,_){if(y<0||A.byteLength<y)throw new RangeError('"offset" is outside of buffer bounds');if(A.byteLength<y+(_||0))throw new RangeError('"length" is outside of buffer bounds');let L;return y===void 0&&_===void 0?L=new Uint8Array(A):_===void 0?L=new Uint8Array(A,y):L=new Uint8Array(A,y,_),Object.setPrototypeOf(L,s.prototype),L}function b(A){if(s.isBuffer(A)){const y=m(A.length)|0,_=a(y);return _.length===0||A.copy(_,0,0,y),_}if(A.length!==void 0)return typeof A.length!="number"||Fe(A.length)?a(0):h(A);if(A.type==="Buffer"&&Array.isArray(A.data))return h(A.data)}function m(A){if(A>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return A|0}function w(A){return+A!=A&&(A=0),s.alloc(+A)}s.isBuffer=function(y){return y!=null&&y._isBuffer===!0&&y!==s.prototype},s.compare=function(y,_){if(Te(y,Uint8Array)&&(y=s.from(y,y.offset,y.byteLength)),Te(_,Uint8Array)&&(_=s.from(_,_.offset,_.byteLength)),!s.isBuffer(y)||!s.isBuffer(_))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(y===_)return 0;let L=y.length,W=_.length;for(let X=0,se=Math.min(L,W);X<se;++X)if(y[X]!==_[X]){L=y[X],W=_[X];break}return L<W?-1:W<L?1:0},s.isEncoding=function(y){switch(String(y).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(y,_){if(!Array.isArray(y))throw new TypeError('"list" argument must be an Array of Buffers');if(y.length===0)return s.alloc(0);let L;if(_===void 0)for(_=0,L=0;L<y.length;++L)_+=y[L].length;const W=s.allocUnsafe(_);let X=0;for(L=0;L<y.length;++L){let se=y[L];if(Te(se,Uint8Array))X+se.length>W.length?(s.isBuffer(se)||(se=s.from(se)),se.copy(W,X)):Uint8Array.prototype.set.call(W,se,X);else if(s.isBuffer(se))se.copy(W,X);else throw new TypeError('"list" argument must be an Array of Buffers');X+=se.length}return W};function E(A,y){if(s.isBuffer(A))return A.length;if(ArrayBuffer.isView(A)||Te(A,ArrayBuffer))return A.byteLength;if(typeof A!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof A);const _=A.length,L=arguments.length>2&&arguments[2]===!0;if(!L&&_===0)return 0;let W=!1;for(;;)switch(y){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return xe(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return Ne(A).length;default:if(W)return L?-1:xe(A).length;y=(""+y).toLowerCase(),W=!0}}s.byteLength=E;function x(A,y,_){let L=!1;if((y===void 0||y<0)&&(y=0),y>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,y>>>=0,_<=y))return"";for(A||(A="utf8");;)switch(A){case"hex":return ae(this,y,_);case"utf8":case"utf-8":return G(this,y,_);case"ascii":return oe(this,y,_);case"latin1":case"binary":return le(this,y,_);case"base64":return J(this,y,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,y,_);default:if(L)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),L=!0}}s.prototype._isBuffer=!0;function k(A,y,_){const L=A[y];A[y]=A[_],A[_]=L}s.prototype.swap16=function(){const y=this.length;if(y%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let _=0;_<y;_+=2)k(this,_,_+1);return this},s.prototype.swap32=function(){const y=this.length;if(y%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let _=0;_<y;_+=4)k(this,_,_+3),k(this,_+1,_+2);return this},s.prototype.swap64=function(){const y=this.length;if(y%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let _=0;_<y;_+=8)k(this,_,_+7),k(this,_+1,_+6),k(this,_+2,_+5),k(this,_+3,_+4);return this},s.prototype.toString=function(){const y=this.length;return y===0?"":arguments.length===0?G(this,0,y):x.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(y){if(!s.isBuffer(y))throw new TypeError("Argument must be a Buffer");return this===y?!0:s.compare(this,y)===0},s.prototype.inspect=function(){let y="";const _=e.INSPECT_MAX_BYTES;return y=this.toString("hex",0,_).replace(/(.{2})/g,"$1 ").trim(),this.length>_&&(y+=" ... "),"<Buffer "+y+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(y,_,L,W,X){if(Te(y,Uint8Array)&&(y=s.from(y,y.offset,y.byteLength)),!s.isBuffer(y))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof y);if(_===void 0&&(_=0),L===void 0&&(L=y?y.length:0),W===void 0&&(W=0),X===void 0&&(X=this.length),_<0||L>y.length||W<0||X>this.length)throw new RangeError("out of range index");if(W>=X&&_>=L)return 0;if(W>=X)return-1;if(_>=L)return 1;if(_>>>=0,L>>>=0,W>>>=0,X>>>=0,this===y)return 0;let se=X-W,Pe=L-_;const nt=Math.min(se,Pe),Me=this.slice(W,X),Je=y.slice(_,L);for(let Ze=0;Ze<nt;++Ze)if(Me[Ze]!==Je[Ze]){se=Me[Ze],Pe=Je[Ze];break}return se<Pe?-1:Pe<se?1:0};function I(A,y,_,L,W){if(A.length===0)return-1;if(typeof _=="string"?(L=_,_=0):_>2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,Fe(_)&&(_=W?0:A.length-1),_<0&&(_=A.length+_),_>=A.length){if(W)return-1;_=A.length-1}else if(_<0)if(W)_=0;else return-1;if(typeof y=="string"&&(y=s.from(y,L)),s.isBuffer(y))return y.length===0?-1:S(A,y,_,L,W);if(typeof y=="number")return y=y&255,typeof Uint8Array.prototype.indexOf=="function"?W?Uint8Array.prototype.indexOf.call(A,y,_):Uint8Array.prototype.lastIndexOf.call(A,y,_):S(A,[y],_,L,W);throw new TypeError("val must be string, number or Buffer")}function S(A,y,_,L,W){let X=1,se=A.length,Pe=y.length;if(L!==void 0&&(L=String(L).toLowerCase(),L==="ucs2"||L==="ucs-2"||L==="utf16le"||L==="utf-16le")){if(A.length<2||y.length<2)return-1;X=2,se/=2,Pe/=2,_/=2}function nt(Je,Ze){return X===1?Je[Ze]:Je.readUInt16BE(Ze*X)}let Me;if(W){let Je=-1;for(Me=_;Me<se;Me++)if(nt(A,Me)===nt(y,Je===-1?0:Me-Je)){if(Je===-1&&(Je=Me),Me-Je+1===Pe)return Je*X}else Je!==-1&&(Me-=Me-Je),Je=-1}else for(_+Pe>se&&(_=se-Pe),Me=_;Me>=0;Me--){let Je=!0;for(let Ze=0;Ze<Pe;Ze++)if(nt(A,Me+Ze)!==nt(y,Ze)){Je=!1;break}if(Je)return Me}return-1}s.prototype.includes=function(y,_,L){return this.indexOf(y,_,L)!==-1},s.prototype.indexOf=function(y,_,L){return I(this,y,_,L,!0)},s.prototype.lastIndexOf=function(y,_,L){return I(this,y,_,L,!1)};function C(A,y,_,L){_=Number(_)||0;const W=A.length-_;L?(L=Number(L),L>W&&(L=W)):L=W;const X=y.length;L>X/2&&(L=X/2);let se;for(se=0;se<L;++se){const Pe=parseInt(y.substr(se*2,2),16);if(Fe(Pe))return se;A[_+se]=Pe}return se}function P(A,y,_,L){return dt(xe(y,A.length-_),A,_,L)}function F(A,y,_,L){return dt(Ee(y),A,_,L)}function D(A,y,_,L){return dt(Ne(y),A,_,L)}function N(A,y,_,L){return dt(ie(y,A.length-_),A,_,L)}s.prototype.write=function(y,_,L,W){if(_===void 0)W="utf8",L=this.length,_=0;else if(L===void 0&&typeof _=="string")W=_,L=this.length,_=0;else if(isFinite(_))_=_>>>0,isFinite(L)?(L=L>>>0,W===void 0&&(W="utf8")):(W=L,L=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const X=this.length-_;if((L===void 0||L>X)&&(L=X),y.length>0&&(L<0||_<0)||_>this.length)throw new RangeError("Attempt to write outside buffer bounds");W||(W="utf8");let se=!1;for(;;)switch(W){case"hex":return C(this,y,_,L);case"utf8":case"utf-8":return P(this,y,_,L);case"ascii":case"latin1":case"binary":return F(this,y,_,L);case"base64":return D(this,y,_,L);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,y,_,L);default:if(se)throw new TypeError("Unknown encoding: "+W);W=(""+W).toLowerCase(),se=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function J(A,y,_){return y===0&&_===A.length?t.fromByteArray(A):t.fromByteArray(A.slice(y,_))}function G(A,y,_){_=Math.min(A.length,_);const L=[];let W=y;for(;W<_;){const X=A[W];let se=null,Pe=X>239?4:X>223?3:X>191?2:1;if(W+Pe<=_){let nt,Me,Je,Ze;switch(Pe){case 1:X<128&&(se=X);break;case 2:nt=A[W+1],(nt&192)===128&&(Ze=(X&31)<<6|nt&63,Ze>127&&(se=Ze));break;case 3:nt=A[W+1],Me=A[W+2],(nt&192)===128&&(Me&192)===128&&(Ze=(X&15)<<12|(nt&63)<<6|Me&63,Ze>2047&&(Ze<55296||Ze>57343)&&(se=Ze));break;case 4:nt=A[W+1],Me=A[W+2],Je=A[W+3],(nt&192)===128&&(Me&192)===128&&(Je&192)===128&&(Ze=(X&15)<<18|(nt&63)<<12|(Me&63)<<6|Je&63,Ze>65535&&Ze<1114112&&(se=Ze))}}se===null?(se=65533,Pe=1):se>65535&&(se-=65536,L.push(se>>>10&1023|55296),se=56320|se&1023),L.push(se),W+=Pe}return te(L)}const Y=4096;function te(A){const y=A.length;if(y<=Y)return String.fromCharCode.apply(String,A);let _="",L=0;for(;L<y;)_+=String.fromCharCode.apply(String,A.slice(L,L+=Y));return _}function oe(A,y,_){let L="";_=Math.min(A.length,_);for(let W=y;W<_;++W)L+=String.fromCharCode(A[W]&127);return L}function le(A,y,_){let L="";_=Math.min(A.length,_);for(let W=y;W<_;++W)L+=String.fromCharCode(A[W]);return L}function ae(A,y,_){const L=A.length;(!y||y<0)&&(y=0),(!_||_<0||_>L)&&(_=L);let W="";for(let X=y;X<_;++X)W+=bt[A[X]];return W}function ge(A,y,_){const L=A.slice(y,_);let W="";for(let X=0;X<L.length-1;X+=2)W+=String.fromCharCode(L[X]+L[X+1]*256);return W}s.prototype.slice=function(y,_){const L=this.length;y=~~y,_=_===void 0?L:~~_,y<0?(y+=L,y<0&&(y=0)):y>L&&(y=L),_<0?(_+=L,_<0&&(_=0)):_>L&&(_=L),_<y&&(_=y);const W=this.subarray(y,_);return Object.setPrototypeOf(W,s.prototype),W};function ce(A,y,_){if(A%1!==0||A<0)throw new RangeError("offset is not uint");if(A+y>_)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(y,_,L){y=y>>>0,_=_>>>0,L||ce(y,_,this.length);let W=this[y],X=1,se=0;for(;++se<_&&(X*=256);)W+=this[y+se]*X;return W},s.prototype.readUintBE=s.prototype.readUIntBE=function(y,_,L){y=y>>>0,_=_>>>0,L||ce(y,_,this.length);let W=this[y+--_],X=1;for(;_>0&&(X*=256);)W+=this[y+--_]*X;return W},s.prototype.readUint8=s.prototype.readUInt8=function(y,_){return y=y>>>0,_||ce(y,1,this.length),this[y]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(y,_){return y=y>>>0,_||ce(y,2,this.length),this[y]|this[y+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(y,_){return y=y>>>0,_||ce(y,2,this.length),this[y]<<8|this[y+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(y,_){return y=y>>>0,_||ce(y,4,this.length),(this[y]|this[y+1]<<8|this[y+2]<<16)+this[y+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(y,_){return y=y>>>0,_||ce(y,4,this.length),this[y]*16777216+(this[y+1]<<16|this[y+2]<<8|this[y+3])},s.prototype.readBigUInt64LE=$e(function(y){y=y>>>0,Z(y,"offset");const _=this[y],L=this[y+7];(_===void 0||L===void 0)&&ne(y,this.length-8);const W=_+this[++y]*2**8+this[++y]*2**16+this[++y]*2**24,X=this[++y]+this[++y]*2**8+this[++y]*2**16+L*2**24;return BigInt(W)+(BigInt(X)<<BigInt(32))}),s.prototype.readBigUInt64BE=$e(function(y){y=y>>>0,Z(y,"offset");const _=this[y],L=this[y+7];(_===void 0||L===void 0)&&ne(y,this.length-8);const W=_*2**24+this[++y]*2**16+this[++y]*2**8+this[++y],X=this[++y]*2**24+this[++y]*2**16+this[++y]*2**8+L;return(BigInt(W)<<BigInt(32))+BigInt(X)}),s.prototype.readIntLE=function(y,_,L){y=y>>>0,_=_>>>0,L||ce(y,_,this.length);let W=this[y],X=1,se=0;for(;++se<_&&(X*=256);)W+=this[y+se]*X;return X*=128,W>=X&&(W-=Math.pow(2,8*_)),W},s.prototype.readIntBE=function(y,_,L){y=y>>>0,_=_>>>0,L||ce(y,_,this.length);let W=_,X=1,se=this[y+--W];for(;W>0&&(X*=256);)se+=this[y+--W]*X;return X*=128,se>=X&&(se-=Math.pow(2,8*_)),se},s.prototype.readInt8=function(y,_){return y=y>>>0,_||ce(y,1,this.length),this[y]&128?(255-this[y]+1)*-1:this[y]},s.prototype.readInt16LE=function(y,_){y=y>>>0,_||ce(y,2,this.length);const L=this[y]|this[y+1]<<8;return L&32768?L|4294901760:L},s.prototype.readInt16BE=function(y,_){y=y>>>0,_||ce(y,2,this.length);const L=this[y+1]|this[y]<<8;return L&32768?L|4294901760:L},s.prototype.readInt32LE=function(y,_){return y=y>>>0,_||ce(y,4,this.length),this[y]|this[y+1]<<8|this[y+2]<<16|this[y+3]<<24},s.prototype.readInt32BE=function(y,_){return y=y>>>0,_||ce(y,4,this.length),this[y]<<24|this[y+1]<<16|this[y+2]<<8|this[y+3]},s.prototype.readBigInt64LE=$e(function(y){y=y>>>0,Z(y,"offset");const _=this[y],L=this[y+7];(_===void 0||L===void 0)&&ne(y,this.length-8);const W=this[y+4]+this[y+5]*2**8+this[y+6]*2**16+(L<<24);return(BigInt(W)<<BigInt(32))+BigInt(_+this[++y]*2**8+this[++y]*2**16+this[++y]*2**24)}),s.prototype.readBigInt64BE=$e(function(y){y=y>>>0,Z(y,"offset");const _=this[y],L=this[y+7];(_===void 0||L===void 0)&&ne(y,this.length-8);const W=(_<<24)+this[++y]*2**16+this[++y]*2**8+this[++y];return(BigInt(W)<<BigInt(32))+BigInt(this[++y]*2**24+this[++y]*2**16+this[++y]*2**8+L)}),s.prototype.readFloatLE=function(y,_){return y=y>>>0,_||ce(y,4,this.length),r.read(this,y,!0,23,4)},s.prototype.readFloatBE=function(y,_){return y=y>>>0,_||ce(y,4,this.length),r.read(this,y,!1,23,4)},s.prototype.readDoubleLE=function(y,_){return y=y>>>0,_||ce(y,8,this.length),r.read(this,y,!0,52,8)},s.prototype.readDoubleBE=function(y,_){return y=y>>>0,_||ce(y,8,this.length),r.read(this,y,!1,52,8)};function K(A,y,_,L,W,X){if(!s.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(y>W||y<X)throw new RangeError('"value" argument is out of bounds');if(_+L>A.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(y,_,L,W){if(y=+y,_=_>>>0,L=L>>>0,!W){const Pe=Math.pow(2,8*L)-1;K(this,y,_,L,Pe,0)}let X=1,se=0;for(this[_]=y&255;++se<L&&(X*=256);)this[_+se]=y/X&255;return _+L},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(y,_,L,W){if(y=+y,_=_>>>0,L=L>>>0,!W){const Pe=Math.pow(2,8*L)-1;K(this,y,_,L,Pe,0)}let X=L-1,se=1;for(this[_+X]=y&255;--X>=0&&(se*=256);)this[_+X]=y/se&255;return _+L},s.prototype.writeUint8=s.prototype.writeUInt8=function(y,_,L){return y=+y,_=_>>>0,L||K(this,y,_,1,255,0),this[_]=y&255,_+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(y,_,L){return y=+y,_=_>>>0,L||K(this,y,_,2,65535,0),this[_]=y&255,this[_+1]=y>>>8,_+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(y,_,L){return y=+y,_=_>>>0,L||K(this,y,_,2,65535,0),this[_]=y>>>8,this[_+1]=y&255,_+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(y,_,L){return y=+y,_=_>>>0,L||K(this,y,_,4,4294967295,0),this[_+3]=y>>>24,this[_+2]=y>>>16,this[_+1]=y>>>8,this[_]=y&255,_+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(y,_,L){return y=+y,_=_>>>0,L||K(this,y,_,4,4294967295,0),this[_]=y>>>24,this[_+1]=y>>>16,this[_+2]=y>>>8,this[_+3]=y&255,_+4};function q(A,y,_,L,W){T(y,L,W,A,_,7);let X=Number(y&BigInt(4294967295));A[_++]=X,X=X>>8,A[_++]=X,X=X>>8,A[_++]=X,X=X>>8,A[_++]=X;let se=Number(y>>BigInt(32)&BigInt(4294967295));return A[_++]=se,se=se>>8,A[_++]=se,se=se>>8,A[_++]=se,se=se>>8,A[_++]=se,_}function re(A,y,_,L,W){T(y,L,W,A,_,7);let X=Number(y&BigInt(4294967295));A[_+7]=X,X=X>>8,A[_+6]=X,X=X>>8,A[_+5]=X,X=X>>8,A[_+4]=X;let se=Number(y>>BigInt(32)&BigInt(4294967295));return A[_+3]=se,se=se>>8,A[_+2]=se,se=se>>8,A[_+1]=se,se=se>>8,A[_]=se,_+8}s.prototype.writeBigUInt64LE=$e(function(y,_=0){return q(this,y,_,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=$e(function(y,_=0){return re(this,y,_,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(y,_,L,W){if(y=+y,_=_>>>0,!W){const nt=Math.pow(2,8*L-1);K(this,y,_,L,nt-1,-nt)}let X=0,se=1,Pe=0;for(this[_]=y&255;++X<L&&(se*=256);)y<0&&Pe===0&&this[_+X-1]!==0&&(Pe=1),this[_+X]=(y/se>>0)-Pe&255;return _+L},s.prototype.writeIntBE=function(y,_,L,W){if(y=+y,_=_>>>0,!W){const nt=Math.pow(2,8*L-1);K(this,y,_,L,nt-1,-nt)}let X=L-1,se=1,Pe=0;for(this[_+X]=y&255;--X>=0&&(se*=256);)y<0&&Pe===0&&this[_+X+1]!==0&&(Pe=1),this[_+X]=(y/se>>0)-Pe&255;return _+L},s.prototype.writeInt8=function(y,_,L){return y=+y,_=_>>>0,L||K(this,y,_,1,127,-128),y<0&&(y=255+y+1),this[_]=y&255,_+1},s.prototype.writeInt16LE=function(y,_,L){return y=+y,_=_>>>0,L||K(this,y,_,2,32767,-32768),this[_]=y&255,this[_+1]=y>>>8,_+2},s.prototype.writeInt16BE=function(y,_,L){return y=+y,_=_>>>0,L||K(this,y,_,2,32767,-32768),this[_]=y>>>8,this[_+1]=y&255,_+2},s.prototype.writeInt32LE=function(y,_,L){return y=+y,_=_>>>0,L||K(this,y,_,4,2147483647,-2147483648),this[_]=y&255,this[_+1]=y>>>8,this[_+2]=y>>>16,this[_+3]=y>>>24,_+4},s.prototype.writeInt32BE=function(y,_,L){return y=+y,_=_>>>0,L||K(this,y,_,4,2147483647,-2147483648),y<0&&(y=4294967295+y+1),this[_]=y>>>24,this[_+1]=y>>>16,this[_+2]=y>>>8,this[_+3]=y&255,_+4},s.prototype.writeBigInt64LE=$e(function(y,_=0){return q(this,y,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=$e(function(y,_=0){return re(this,y,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function de(A,y,_,L,W,X){if(_+L>A.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function U(A,y,_,L,W){return y=+y,_=_>>>0,W||de(A,y,_,4),r.write(A,y,_,L,23,4),_+4}s.prototype.writeFloatLE=function(y,_,L){return U(this,y,_,!0,L)},s.prototype.writeFloatBE=function(y,_,L){return U(this,y,_,!1,L)};function H(A,y,_,L,W){return y=+y,_=_>>>0,W||de(A,y,_,8),r.write(A,y,_,L,52,8),_+8}s.prototype.writeDoubleLE=function(y,_,L){return H(this,y,_,!0,L)},s.prototype.writeDoubleBE=function(y,_,L){return H(this,y,_,!1,L)},s.prototype.copy=function(y,_,L,W){if(!s.isBuffer(y))throw new TypeError("argument should be a Buffer");if(L||(L=0),!W&&W!==0&&(W=this.length),_>=y.length&&(_=y.length),_||(_=0),W>0&&W<L&&(W=L),W===L||y.length===0||this.length===0)return 0;if(_<0)throw new RangeError("targetStart out of bounds");if(L<0||L>=this.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("sourceEnd out of bounds");W>this.length&&(W=this.length),y.length-_<W-L&&(W=y.length-_+L);const X=W-L;return this===y&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(_,L,W):Uint8Array.prototype.set.call(y,this.subarray(L,W),_),X},s.prototype.fill=function(y,_,L,W){if(typeof y=="string"){if(typeof _=="string"?(W=_,_=0,L=this.length):typeof L=="string"&&(W=L,L=this.length),W!==void 0&&typeof W!="string")throw new TypeError("encoding must be a string");if(typeof W=="string"&&!s.isEncoding(W))throw new TypeError("Unknown encoding: "+W);if(y.length===1){const se=y.charCodeAt(0);(W==="utf8"&&se<128||W==="latin1")&&(y=se)}}else typeof y=="number"?y=y&255:typeof y=="boolean"&&(y=Number(y));if(_<0||this.length<_||this.length<L)throw new RangeError("Out of range index");if(L<=_)return this;_=_>>>0,L=L===void 0?this.length:L>>>0,y||(y=0);let X;if(typeof y=="number")for(X=_;X<L;++X)this[X]=y;else{const se=s.isBuffer(y)?y:s.from(y,W),Pe=se.length;if(Pe===0)throw new TypeError('The value "'+y+'" is invalid for argument "value"');for(X=0;X<L-_;++X)this[X+_]=se[X%Pe]}return this};const M={};function R(A,y,_){M[A]=class extends _{constructor(){super(),Object.defineProperty(this,"message",{value:y.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${A}]`,this.stack,delete this.name}get code(){return A}set code(W){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:W,writable:!0})}toString(){return`${this.name} [${A}]: ${this.message}`}}}R("ERR_BUFFER_OUT_OF_BOUNDS",function(A){return A?`${A} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),R("ERR_INVALID_ARG_TYPE",function(A,y){return`The "${A}" argument must be of type number. Received type ${typeof y}`},TypeError),R("ERR_OUT_OF_RANGE",function(A,y,_){let L=`The value of "${A}" is out of range.`,W=_;return Number.isInteger(_)&&Math.abs(_)>2**32?W=z(String(_)):typeof _=="bigint"&&(W=String(_),(_>BigInt(2)**BigInt(32)||_<-(BigInt(2)**BigInt(32)))&&(W=z(W)),W+="n"),L+=` It must be ${y}. Received ${W}`,L},RangeError);function z(A){let y="",_=A.length;const L=A[0]==="-"?1:0;for(;_>=L+4;_-=3)y=`_${A.slice(_-3,_)}${y}`;return`${A.slice(0,_)}${y}`}function O(A,y,_){Z(y,"offset"),(A[y]===void 0||A[y+_]===void 0)&&ne(y,A.length-(_+1))}function T(A,y,_,L,W,X){if(A>_||A<y){const se=typeof y=="bigint"?"n":"";let Pe;throw X>3?y===0||y===BigInt(0)?Pe=`>= 0${se} and < 2${se} ** ${(X+1)*8}${se}`:Pe=`>= -(2${se} ** ${(X+1)*8-1}${se}) and < 2 ** ${(X+1)*8-1}${se}`:Pe=`>= ${y}${se} and <= ${_}${se}`,new M.ERR_OUT_OF_RANGE("value",Pe,A)}O(L,W,X)}function Z(A,y){if(typeof A!="number")throw new M.ERR_INVALID_ARG_TYPE(y,"number",A)}function ne(A,y,_){throw Math.floor(A)!==A?(Z(A,_),new M.ERR_OUT_OF_RANGE(_||"offset","an integer",A)):y<0?new M.ERR_BUFFER_OUT_OF_BOUNDS:new M.ERR_OUT_OF_RANGE(_||"offset",`>= ${_?1:0} and <= ${y}`,A)}const pe=/[^+/0-9A-Za-z-_]/g;function me(A){if(A=A.split("=")[0],A=A.trim().replace(pe,""),A.length<2)return"";for(;A.length%4!==0;)A=A+"=";return A}function xe(A,y){y=y||1/0;let _;const L=A.length;let W=null;const X=[];for(let se=0;se<L;++se){if(_=A.charCodeAt(se),_>55295&&_<57344){if(!W){if(_>56319){(y-=3)>-1&&X.push(239,191,189);continue}else if(se+1===L){(y-=3)>-1&&X.push(239,191,189);continue}W=_;continue}if(_<56320){(y-=3)>-1&&X.push(239,191,189),W=_;continue}_=(W-55296<<10|_-56320)+65536}else W&&(y-=3)>-1&&X.push(239,191,189);if(W=null,_<128){if((y-=1)<0)break;X.push(_)}else if(_<2048){if((y-=2)<0)break;X.push(_>>6|192,_&63|128)}else if(_<65536){if((y-=3)<0)break;X.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((y-=4)<0)break;X.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return X}function Ee(A){const y=[];for(let _=0;_<A.length;++_)y.push(A.charCodeAt(_)&255);return y}function ie(A,y){let _,L,W;const X=[];for(let se=0;se<A.length&&!((y-=2)<0);++se)_=A.charCodeAt(se),L=_>>8,W=_%256,X.push(W),X.push(L);return X}function Ne(A){return t.toByteArray(me(A))}function dt(A,y,_,L){let W;for(W=0;W<L&&!(W+_>=y.length||W>=A.length);++W)y[W+_]=A[W];return W}function Te(A,y){return A instanceof y||A!=null&&A.constructor!=null&&A.constructor.name!=null&&A.constructor.name===y.name}function Fe(A){return A!==A}const bt=function(){const A="0123456789abcdef",y=new Array(256);for(let _=0;_<16;++_){const L=_*16;for(let W=0;W<16;++W)y[L+W]=A[_]+A[W]}return y}();function $e(A){return typeof BigInt>"u"?De:A}function De(){throw new Error("BigInt not supported")}})(Qt),globalThis.global=globalThis,globalThis.Buffer=Qt.Buffer,globalThis.process=Rs;var gD=Vi(a0()),Hu=Vi(a0());gD.default,Hu.callbackify;var _r=Hu.inspect;Hu.promisify;var Ws={exports:{}};Ws.exports,function(e,t){var r=200,n="__lodash_hash_undefined__",o=800,i=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",f="[object Boolean]",d="[object Date]",p="[object Error]",h="[object Function]",g="[object GeneratorFunction]",v="[object Map]",b="[object Number]",m="[object Null]",w="[object Object]",E="[object Proxy]",x="[object RegExp]",k="[object Set]",I="[object String]",S="[object Undefined]",C="[object WeakMap]",P="[object ArrayBuffer]",F="[object DataView]",D="[object Float32Array]",N="[object Float64Array]",J="[object Int8Array]",G="[object Int16Array]",Y="[object Int32Array]",te="[object Uint8Array]",oe="[object Uint8ClampedArray]",le="[object Uint16Array]",ae="[object Uint32Array]",ge=/[\\^$.*+?()[\]{}|]/g,ce=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,q={};q[D]=q[N]=q[J]=q[G]=q[Y]=q[te]=q[oe]=q[le]=q[ae]=!0,q[s]=q[l]=q[P]=q[f]=q[F]=q[d]=q[p]=q[h]=q[v]=q[b]=q[w]=q[x]=q[k]=q[I]=q[C]=!1;var re=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,de=typeof self=="object"&&self&&self.Object===Object&&self,U=re||de||Function("return this")(),H=t&&!t.nodeType&&t,M=H&&!0&&e&&!e.nodeType&&e,R=M&&M.exports===H,z=R&&re.process,O=function(){try{var $=M&&M.require&&M.require("util").types;return $||z&&z.binding&&z.binding("util")}catch{}}(),T=O&&O.isTypedArray;function Z($,B,ee){switch(ee.length){case 0:return $.call(B);case 1:return $.call(B,ee[0]);case 2:return $.call(B,ee[0],ee[1]);case 3:return $.call(B,ee[0],ee[1],ee[2])}return $.apply(B,ee)}function ne($,B){for(var ee=-1,he=Array($);++ee<$;)he[ee]=B(ee);return he}function pe($){return function(B){return $(B)}}function me($,B){return $==null?void 0:$[B]}function xe($,B){return function(ee){return $(B(ee))}}var Ee=Array.prototype,ie=Function.prototype,Ne=Object.prototype,dt=U["__core-js_shared__"],Te=ie.toString,Fe=Ne.hasOwnProperty,bt=function(){var $=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||"");return $?"Symbol(src)_1."+$:""}(),$e=Ne.toString,De=Te.call(Object),A=RegExp("^"+Te.call(Fe).replace(ge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=R?U.Buffer:void 0,_=U.Symbol,L=U.Uint8Array,W=y?y.allocUnsafe:void 0,X=xe(Object.getPrototypeOf,Object),se=Object.create,Pe=Ne.propertyIsEnumerable,nt=Ee.splice,Me=_?_.toStringTag:void 0,Je=function(){try{var $=wa(Object,"defineProperty");return $({},"",{}),$}catch{}}(),Ze=y?y.isBuffer:void 0,on=Math.max,oi=Date.now,dr=wa(U,"Map"),Yt=wa(Object,"create"),io=function(){function $(){}return function(B){if(!Xt(B))return{};if(se)return se(B);$.prototype=B;var ee=new $;return $.prototype=void 0,ee}}();function Nt($){var B=-1,ee=$==null?0:$.length;for(this.clear();++B<ee;){var he=$[B];this.set(he[0],he[1])}}function pa(){this.__data__=Yt?Yt(null):{},this.size=0}function ii($){var B=this.has($)&&delete this.__data__[$];return this.size-=B?1:0,B}function ha($){var B=this.__data__;if(Yt){var ee=B[$];return ee===n?void 0:ee}return Fe.call(B,$)?B[$]:void 0}function ai($){var B=this.__data__;return Yt?B[$]!==void 0:Fe.call(B,$)}function si($,B){var ee=this.__data__;return this.size+=this.has($)?0:1,ee[$]=Yt&&B===void 0?n:B,this}Nt.prototype.clear=pa,Nt.prototype.delete=ii,Nt.prototype.get=ha,Nt.prototype.has=ai,Nt.prototype.set=si;function Ct($){var B=-1,ee=$==null?0:$.length;for(this.clear();++B<ee;){var he=$[B];this.set(he[0],he[1])}}function ga(){this.__data__=[],this.size=0}function li($){var B=this.__data__,ee=Pt(B,$);if(ee<0)return!1;var he=B.length-1;return ee==he?B.pop():nt.call(B,ee,1),--this.size,!0}function va($){var B=this.__data__,ee=Pt(B,$);return ee<0?void 0:B[ee][1]}function ma($){return Pt(this.__data__,$)>-1}function ba($,B){var ee=this.__data__,he=Pt(ee,$);return he<0?(++this.size,ee.push([$,B])):ee[he][1]=B,this}Ct.prototype.clear=ga,Ct.prototype.delete=li,Ct.prototype.get=va,Ct.prototype.has=ma,Ct.prototype.set=ba;function Jt($){var B=-1,ee=$==null?0:$.length;for(this.clear();++B<ee;){var he=$[B];this.set(he[0],he[1])}}function V(){this.size=0,this.__data__={hash:new Nt,map:new(dr||Ct),string:new Nt}}function fe($){var B=Dn(this,$).delete($);return this.size-=B?1:0,B}function _e($){return Dn(this,$).get($)}function Oe($){return Dn(this,$).has($)}function qe($,B){var ee=Dn(this,$),he=ee.size;return ee.set($,B),this.size+=ee.size==he?0:1,this}Jt.prototype.clear=V,Jt.prototype.delete=fe,Jt.prototype.get=_e,Jt.prototype.has=Oe,Jt.prototype.set=qe;function je($){var B=this.__data__=new Ct($);this.size=B.size}function Re(){this.__data__=new Ct,this.size=0}function Be($){var B=this.__data__,ee=B.delete($);return this.size=B.size,ee}function It($){return this.__data__.get($)}function mt($){return this.__data__.has($)}function yt($,B){var ee=this.__data__;if(ee instanceof Ct){var he=ee.__data__;if(!dr||he.length<r-1)return he.push([$,B]),this.size=++ee.size,this;ee=this.__data__=new Jt(he)}return ee.set($,B),this.size=ee.size,this}je.prototype.clear=Re,je.prototype.delete=Be,je.prototype.get=It,je.prototype.has=mt,je.prototype.set=yt;function Wt($,B){var ee=co($),he=!ee&&lo($),Ce=!ee&&!he&&di($),Se=!ee&&!he&&!Ce&&Pl($),Ie=ee||he||Ce||Se,ke=Ie?ne($.length,String):[],Ue=ke.length;for(var Dt in $)(B||Fe.call($,Dt))&&!(Ie&&(Dt=="length"||Ce&&(Dt=="offset"||Dt=="parent")||Se&&(Dt=="buffer"||Dt=="byteLength"||Dt=="byteOffset")||Cl(Dt,Ue)))&&ke.push(Dt);return ke}function er($,B,ee){(ee!==void 0&&!Ln($[B],ee)||ee===void 0&&!(B in $))&&ao($,B,ee)}function ci($,B,ee){var he=$[B];(!(Fe.call($,B)&&Ln(he,ee))||ee===void 0&&!(B in $))&&ao($,B,ee)}function Pt($,B){for(var ee=$.length;ee--;)if(Ln($[ee][0],B))return ee;return-1}function ao($,B,ee){B=="__proto__"&&Je?Je($,B,{configurable:!0,enumerable:!0,value:ee,writable:!0}):$[B]=ee}var yd=Pd();function an($){return $==null?$===void 0?S:m:Me&&Me in Object($)?kd($):Md($)}function ya($){return uo($)&&an($)==s}function wd($){if(!Xt($)||Al($))return!1;var B=pi($)?A:ce;return B.test(fi($))}function _d($){return uo($)&&zr($.length)&&!!q[an($)]}function Ed($){if(!Xt($))return Ld($);var B=Ol($),ee=[];for(var he in $)he=="constructor"&&(B||!Fe.call($,he))||ee.push(he);return ee}function ui($,B,ee,he,Ce){$!==B&&yd(B,function(Se,Ie){if(Ce||(Ce=new je),Xt(Se))xd($,B,Ie,ee,ui,he,Ce);else{var ke=he?he(Ea($,Ie),Se,Ie+"",$,B,Ce):void 0;ke===void 0&&(ke=Se),er($,Ie,ke)}},Nl)}function xd($,B,ee,he,Ce,Se,Ie){var ke=Ea($,ee),Ue=Ea(B,ee),Dt=Ie.get(Ue);if(Dt){er($,ee,Dt);return}var Ft=Se?Se(ke,Ue,ee+"",$,B,Ie):void 0,sn=Ft===void 0;if(sn){var hi=co(Ue),Ud=!hi&&di(Ue),ow=!hi&&!Ud&&Pl(Ue);Ft=Ue,hi||Ud||ow?co(ke)?Ft=ke:Tl(ke)?Ft=Od(ke):Ud?(sn=!1,Ft=$d(Ue,!0)):ow?(sn=!1,Ft=Ad(Ue,!0)):Ft=[]:Il(Ue)||lo(Ue)?(Ft=ke,lo(ke)?Ft=kl(ke):(!Xt(ke)||pi(ke))&&(Ft=$l(Ue))):sn=!1}sn&&(Ie.set(Ue,Ft),Ce(Ft,Ue,he,Se,Ie),Ie.delete(Ue)),er($,ee,Ft)}function Sl($,B){return Fd(_a($,B,j),$+"")}var Sd=Je?function($,B){return Je($,"toString",{configurable:!0,enumerable:!1,value:Rd(B),writable:!0})}:j;function $d($,B){if(B)return $.slice();var ee=$.length,he=W?W(ee):new $.constructor(ee);return $.copy(he),he}function Cd($){var B=new $.constructor($.byteLength);return new L(B).set(new L($)),B}function Ad($,B){var ee=B?Cd($.buffer):$.buffer;return new $.constructor(ee,$.byteOffset,$.length)}function Od($,B){var ee=-1,he=$.length;for(B||(B=Array(he));++ee<he;)B[ee]=$[ee];return B}function Td($,B,ee,he){var Ce=!ee;ee||(ee={});for(var Se=-1,Ie=B.length;++Se<Ie;){var ke=B[Se],Ue=he?he(ee[ke],$[ke],ke,ee,$):void 0;Ue===void 0&&(Ue=$[ke]),Ce?ao(ee,ke,Ue):ci(ee,ke,Ue)}return ee}function Id($){return Sl(function(B,ee){var he=-1,Ce=ee.length,Se=Ce>1?ee[Ce-1]:void 0,Ie=Ce>2?ee[2]:void 0;for(Se=$.length>3&&typeof Se=="function"?(Ce--,Se):void 0,Ie&&Nd(ee[0],ee[1],Ie)&&(Se=Ce<3?void 0:Se,Ce=1),B=Object(B);++he<Ce;){var ke=ee[he];ke&&$(B,ke,he,Se)}return B})}function Pd($){return function(B,ee,he){for(var Ce=-1,Se=Object(B),Ie=he(B),ke=Ie.length;ke--;){var Ue=Ie[$?ke:++Ce];if(ee(Se[Ue],Ue,Se)===!1)break}return B}}function so($,B,ee,he,Ce,Se){return Xt($)&&Xt(B)&&(Se.set(B,$),ui($,B,void 0,so,Se),Se.delete(B)),$}function Dn($,B){var ee=$.__data__;return Dd(B)?ee[typeof B=="string"?"string":"hash"]:ee.map}function wa($,B){var ee=me($,B);return wd(ee)?ee:void 0}function kd($){var B=Fe.call($,Me),ee=$[Me];try{$[Me]=void 0;var he=!0}catch{}var Ce=$e.call($);return he&&(B?$[Me]=ee:delete $[Me]),Ce}function $l($){return typeof $.constructor=="function"&&!Ol($)?io(X($)):{}}function Cl($,B){var ee=typeof $;return B=B??a,!!B&&(ee=="number"||ee!="symbol"&&K.test($))&&$>-1&&$%1==0&&$<B}function Nd($,B,ee){if(!Xt(ee))return!1;var he=typeof B;return(he=="number"?xa(ee)&&Cl(B,ee.length):he=="string"&&B in ee)?Ln(ee[B],$):!1}function Dd($){var B=typeof $;return B=="string"||B=="number"||B=="symbol"||B=="boolean"?$!=="__proto__":$===null}function Al($){return!!bt&&bt in $}function Ol($){var B=$&&$.constructor,ee=typeof B=="function"&&B.prototype||Ne;return $===ee}function Ld($){var B=[];if($!=null)for(var ee in Object($))B.push(ee);return B}function Md($){return $e.call($)}function _a($,B,ee){return B=on(B===void 0?$.length-1:B,0),function(){for(var he=arguments,Ce=-1,Se=on(he.length-B,0),Ie=Array(Se);++Ce<Se;)Ie[Ce]=he[B+Ce];Ce=-1;for(var ke=Array(B+1);++Ce<B;)ke[Ce]=he[Ce];return ke[B]=ee(Ie),Z($,this,ke)}}function Ea($,B){if(!(B==="constructor"&&typeof $[B]=="function")&&B!="__proto__")return $[B]}var Fd=jd(Sd);function jd($){var B=0,ee=0;return function(){var he=oi(),Ce=i-(he-ee);if(ee=he,Ce>0){if(++B>=o)return arguments[0]}else B=0;return $.apply(void 0,arguments)}}function fi($){if($!=null){try{return Te.call($)}catch{}try{return $+""}catch{}}return""}function Ln($,B){return $===B||$!==$&&B!==B}var lo=ya(function(){return arguments}())?ya:function($){return uo($)&&Fe.call($,"callee")&&!Pe.call($,"callee")},co=Array.isArray;function xa($){return $!=null&&zr($.length)&&!pi($)}function Tl($){return uo($)&&xa($)}var di=Ze||Q;function pi($){if(!Xt($))return!1;var B=an($);return B==h||B==g||B==u||B==E}function zr($){return typeof $=="number"&&$>-1&&$%1==0&&$<=a}function Xt($){var B=typeof $;return $!=null&&(B=="object"||B=="function")}function uo($){return $!=null&&typeof $=="object"}function Il($){if(!uo($)||an($)!=w)return!1;var B=X($);if(B===null)return!0;var ee=Fe.call(B,"constructor")&&B.constructor;return typeof ee=="function"&&ee instanceof ee&&Te.call(ee)==De}var Pl=T?pe(T):_d;function kl($){return Td($,Nl($))}var Bd=Sl(function($){return $.push(void 0,so),Z(Dl,void 0,$)});function Nl($){return xa($)?Wt($,!0):Ed($)}var Dl=Id(function($,B,ee,he){ui($,B,ee,he)});function Rd($){return function(){return $}}function j($){return $}function Q(){return!1}e.exports=Bd}(Ws,Ws.exports);var vD=Ws.exports;const mD=un(vD);var zi=(e,t,r)=>{if(e)return;let n="invariant violation";throw t&&(n+=`: ${t}`),r!=null&&r.A&&(n+=` [${r.A[0]}]`),r!=null&&r.F&&(n+=` at ${yD(r.F)}:${r.L}`),new bD(n)},bD=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},yD=e=>{const t=e.match(/.+\/(packages\/.+\/.+)/);if(t){const[,r]=t;return r}return e},wD=He({"node_modules/.pnpm/events@3.3.0/node_modules/events/events.js"(e,t){var r=typeof Reflect=="object"?Reflect:null,n=r&&typeof r.apply=="function"?r.apply:function(S,C,P){return Function.prototype.apply.call(S,C,P)},o;r&&typeof r.ownKeys=="function"?o=r.ownKeys:Object.getOwnPropertySymbols?o=function(S){return Object.getOwnPropertyNames(S).concat(Object.getOwnPropertySymbols(S))}:o=function(S){return Object.getOwnPropertyNames(S)};function i(I){console&&console.warn&&console.warn(I)}var a=Number.isNaN||function(S){return S!==S};function s(){s.init.call(this)}t.exports=s,t.exports.once=E,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function u(I){if(typeof I!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof I)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(I){if(typeof I!="number"||I<0||a(I))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+I+".");l=I}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(S){if(typeof S!="number"||S<0||a(S))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+S+".");return this._maxListeners=S,this};function f(I){return I._maxListeners===void 0?s.defaultMaxListeners:I._maxListeners}s.prototype.getMaxListeners=function(){return f(this)},s.prototype.emit=function(S){for(var C=[],P=1;P<arguments.length;P++)C.push(arguments[P]);var F=S==="error",D=this._events;if(D!==void 0)F=F&&D.error===void 0;else if(!F)return!1;if(F){var N;if(C.length>0&&(N=C[0]),N instanceof Error)throw N;var J=new Error("Unhandled error."+(N?" ("+N.message+")":""));throw J.context=N,J}var G=D[S];if(G===void 0)return!1;if(typeof G=="function")n(G,this,C);else for(var Y=G.length,te=b(G,Y),P=0;P<Y;++P)n(te[P],this,C);return!0};function d(I,S,C,P){var F,D,N;if(u(C),D=I._events,D===void 0?(D=I._events=Object.create(null),I._eventsCount=0):(D.newListener!==void 0&&(I.emit("newListener",S,C.listener?C.listener:C),D=I._events),N=D[S]),N===void 0)N=D[S]=C,++I._eventsCount;else if(typeof N=="function"?N=D[S]=P?[C,N]:[N,C]:P?N.unshift(C):N.push(C),F=f(I),F>0&&N.length>F&&!N.warned){N.warned=!0;var J=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(S)+" listeners added. Use emitter.setMaxListeners() to increase limit");J.name="MaxListenersExceededWarning",J.emitter=I,J.type=S,J.count=N.length,i(J)}return I}s.prototype.addListener=function(S,C){return d(this,S,C,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(S,C){return d(this,S,C,!0)};function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(I,S,C){var P={fired:!1,wrapFn:void 0,target:I,type:S,listener:C},F=p.bind(P);return F.listener=C,P.wrapFn=F,F}s.prototype.once=function(S,C){return u(C),this.on(S,h(this,S,C)),this},s.prototype.prependOnceListener=function(S,C){return u(C),this.prependListener(S,h(this,S,C)),this},s.prototype.removeListener=function(S,C){var P,F,D,N,J;if(u(C),F=this._events,F===void 0)return this;if(P=F[S],P===void 0)return this;if(P===C||P.listener===C)--this._eventsCount===0?this._events=Object.create(null):(delete F[S],F.removeListener&&this.emit("removeListener",S,P.listener||C));else if(typeof P!="function"){for(D=-1,N=P.length-1;N>=0;N--)if(P[N]===C||P[N].listener===C){J=P[N].listener,D=N;break}if(D<0)return this;D===0?P.shift():m(P,D),P.length===1&&(F[S]=P[0]),F.removeListener!==void 0&&this.emit("removeListener",S,J||C)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(S){var C,P,F;if(P=this._events,P===void 0)return this;if(P.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):P[S]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete P[S]),this;if(arguments.length===0){var D=Object.keys(P),N;for(F=0;F<D.length;++F)N=D[F],N!=="removeListener"&&this.removeAllListeners(N);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(C=P[S],typeof C=="function")this.removeListener(S,C);else if(C!==void 0)for(F=C.length-1;F>=0;F--)this.removeListener(S,C[F]);return this};function g(I,S,C){var P=I._events;if(P===void 0)return[];var F=P[S];return F===void 0?[]:typeof F=="function"?C?[F.listener||F]:[F]:C?w(F):b(F,F.length)}s.prototype.listeners=function(S){return g(this,S,!0)},s.prototype.rawListeners=function(S){return g(this,S,!1)},s.listenerCount=function(I,S){return typeof I.listenerCount=="function"?I.listenerCount(S):v.call(I,S)},s.prototype.listenerCount=v;function v(I){var S=this._events;if(S!==void 0){var C=S[I];if(typeof C=="function")return 1;if(C!==void 0)return C.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?o(this._events):[]};function b(I,S){for(var C=new Array(S),P=0;P<S;++P)C[P]=I[P];return C}function m(I,S){for(;S+1<I.length;S++)I[S]=I[S+1];I.pop()}function w(I){for(var S=new Array(I.length),C=0;C<S.length;++C)S[C]=I[C].listener||I[C];return S}function E(I,S){return new Promise(function(C,P){function F(N){I.removeListener(S,D),P(N)}function D(){typeof I.removeListener=="function"&&I.removeListener("error",F),C([].slice.call(arguments))}k(I,S,D,{once:!0}),S!=="error"&&x(I,F,{once:!0})})}function x(I,S,C){typeof I.on=="function"&&k(I,"error",S,C)}function k(I,S,C,P){if(typeof I.on=="function")P.once?I.once(S,C):I.on(S,C);else if(typeof I.addEventListener=="function")I.addEventListener(S,function F(D){P.once&&I.removeEventListener(S,F),C(D)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof I)}}}),c0=Vi(wD());c0.EventEmitter,c0.EventEmitter;var Vs=e=>{const t=Object.getPrototypeOf(e).constructor.name;return e.toJSON?`${t}(${_r(e.toJSON())})`:String(e)},u0=e=>{throw e},f0;(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.VERBOSE=1]="VERBOSE",e[e.BOLD=2]="BOLD"})(f0||(f0={}));var _D=(e,t=8)=>{const r=String(e);return r.length<=t?r:r.slice(0,t)},Hs=Symbol.for("devtoolsFormatter"),ED=()=>{typeof window<"u"&&(window.devtoolsFormatters??(window.devtoolsFormatters=[])).push({header:(e,t)=>{const r=e[Hs];if(r===void 0)return null;if(typeof r!="object"||r===null||typeof r.header!="function")throw new Error(`Invalid devtools formatter for ${e.constructor.name}`);return r.header(t)},hasBody:(e,t)=>{const r=e[Hs];return!r||!r.hasBody?!1:r.hasBody(t)},body:(e,t)=>{const r=e[Hs];return!r||!r.body?null:r.body(t)}})};ED();var xD=Symbol.for("dxos.common.equals"),zu={exports:{}},Gu={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(e,t){var r=Qt,n=r.Buffer;function o(a,s){for(var l in a)s[l]=a[l]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=i);function i(a,s,l){return n(a,s,l)}i.prototype=Object.create(n.prototype),o(n,i),i.from=function(a,s,l){if(typeof a=="number")throw new TypeError("Argument must not be a number");return n(a,s,l)},i.alloc=function(a,s,l){if(typeof a!="number")throw new TypeError("Argument must be a number");var u=n(a);return s!==void 0?typeof l=="string"?u.fill(s,l):u.fill(s):u.fill(0),u},i.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n(a)},i.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(a)}})(Gu,Gu.exports);var d0=Gu.exports,Ku=65536,SD=4294967295;function $D(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
106
|
+
Use Chrome, Firefox or Internet Explorer 11`)}var CD=d0.Buffer,zs=Ye.crypto||Ye.msCrypto;zs&&zs.getRandomValues?zu.exports=AD:zu.exports=$D;function AD(e,t){if(e>SD)throw new RangeError("requested too many random bytes");var r=CD.allocUnsafe(e);if(e>0)if(e>Ku)for(var n=0;n<e;n+=Ku)zs.getRandomValues(r.slice(n,n+Ku));else zs.getRandomValues(r);return typeof t=="function"?process.nextTick(function(){t(null,r)}):r}var OD=zu.exports;const TD=un(OD);var qu="/home/runner/work/dxos/dxos/packages/common/keys/src/public-key.ts",ID=32,p0=class Vt{static from(t){if(zi(t,void 0,{F:qu,L:31,S:this,A:["source",""]}),t instanceof Vt)return t;if(t instanceof Qt.Buffer)return new Vt(new Uint8Array(t.buffer,t.byteOffset,t.byteLength));if(t instanceof Uint8Array)return new Vt(t);if(t instanceof ArrayBuffer)return new Vt(new Uint8Array(t));if(typeof t=="string")return Vt.fromHex(t);if(t.asUint8Array)return new Vt(t.asUint8Array());throw new TypeError(`Unable to create PublicKey from ${t}`)}static safeFrom(t){if(t)try{return Vt.from(t)}catch{return}}static fromHex(t){t.startsWith("0x")&&(t=t.slice(2));const r=Qt.Buffer.from(t,"hex");return new Vt(new Uint8Array(r.buffer,r.byteOffset,r.byteLength))}static random(){return Vt.from(TD(ID))}static*randomSequence(){for(let t=0;t<1e4;t++)yield Vt.random();throw new Error("Too many keys requested")}static isPublicKey(t){return t instanceof Vt}static assertValidPublicKey(t){if(!this.isPublicKey(t))throw new TypeError("Invalid PublicKey")}static equals(t,r){return Vt.from(t).equals(r)}static bufferize(t){return zi(typeof t=="string","Invalid type",{F:qu,L:130,S:this,A:["typeof str === 'string'","'Invalid type'"]}),Qt.Buffer.from(t,"hex")}static stringify(t){return t instanceof Vt?t=t.asBuffer():t instanceof Uint8Array&&(t=Qt.Buffer.from(t.buffer,t.byteOffset,t.byteLength)),zi(t instanceof Qt.Buffer,"Invalid type",{F:qu,L:149,S:this,A:["key instanceof Buffer","'Invalid type'"]}),t.toString("hex")}static hash(t){return t.toHex()}constructor(t){if(this._value=t,!(t instanceof Uint8Array))throw new TypeError(`Expected Uint8Array, got: ${t}`)}toString(){return this.toHex()}toJSON(){return this.toHex()}get length(){return this._value.length}toHex(){return this.asBuffer().toString("hex")}truncate(t=void 0){return _D(this,t)}asBuffer(){return Qt.Buffer.from(this._value.buffer,this._value.byteOffset,this._value.byteLength)}asUint8Array(){return this._value}getInsecureHash(t){return Math.abs(this._value.reduce((r,n)=>r^n|0,0))%t}[_r.custom](t,r){if(!r.colors||typeof Rs.stdout.hasColors!="function"||!Rs.stdout.hasColors())return`<PublicKey ${this.truncate()}>`;const n=a=>`\x1B[${a}m`,o=["red","green","yellow","blue","magenta","cyan","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright"],i=o[this.getInsecureHash(o.length)];return`PublicKey(${n(_r.colors[i][0])}${this.truncate()}${n(_r.colors.reset[0])})`}get[Hs](){return{header:()=>{const t=["darkred","green","orange","blue","darkmagenta","darkcyan","red","green","orange","blue","magenta","darkcyan","black"],r=t[this.getInsecureHash(t.length)];return["span",{},["span",{},"PublicKey("],["span",{style:`color: ${r};`},this.truncate()],["span",{},")"]]}}}equals(t){const r=Vt.from(t);if(this._value.length!==r._value.length)return!1;let n=!0;for(let o=0;o<this._value.length;o++)n&&(n=this._value[o]===r._value[o]);return n}[xD](t){return Vt.isPublicKey(t)?this.equals(t):!1}},h0=10;(class{constructor(e,t){if(this._projection=e,this._values=new Map,t)for(const r of t)this.add(r)}toString(){return Vs(this)}toJSON(){return this._values.size>h0?{size:this._values.size}:Array.from(this._values.values())}[_r.custom](){return Vs(this)}add(e){return this._values.set(this._projection(e),e),this}clear(){this._values.clear()}delete(e){return this._values.delete(this._projection(e))}forEach(e,t){t&&(e=e.bind(t)),this._values.forEach(r=>e(r,r,this))}has(e){return this._values.has(this._projection(e))}get size(){return this._values.size}[Symbol.iterator](){return this._values.values()}*entries(){for(const e of this._values.values())yield[e,e]}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}get[Symbol.toStringTag](){return"ComplexSet"}}),class{constructor(e,t){if(this._keyProjection=e,this._keys=new Map,this._values=new Map,t)for(const[r,n]of t)this.set(r,n)}toString(){return Vs(this)}toJSON(){return this._values.size>h0?{size:this._values.size}:Array.from(this._values.values())}[_r.custom](){return Vs(this)}clear(){this._keys.clear(),this._values.clear()}delete(e){const t=this._keys.delete(this._keyProjection(e)),r=this._values.delete(this._keyProjection(e));return t||r}forEach(e,t){t&&(e=e.bind(t)),this._keys.forEach((r,n)=>e(this._values.get(n)??u0(new Error("Map corrupted.")),r,this))}get(e){return this._values.get(this._keyProjection(e))}has(e){return this._keys.has(this._keyProjection(e))}set(e,t){const r=this._keyProjection(e);return this._keys.set(r,e),this._values.set(r,t),this}get size(){return this._keys.size}*[Symbol.iterator](){for(const[e,t]of this._keys){const r=this._values.get(e)??u0(new Error("Map corrupted."));yield[t,r]}}entries(){return this[Symbol.iterator]()}keys(){return this._keys.values()}values(){return this._values.values()}get[Symbol.toStringTag](){return"ComplexMap"}};var PD=["ack","alabama","alanine","alaska","alpha","angel","apart","april","arizona","arkansas","artist","asparagus","aspen","august","autumn","avocado","bacon","bakerloo","batman","beer","berlin","beryllium","black","blossom","blue","bluebird","bravo","bulldog","burger","butter","california","carbon","cardinal","carolina","carpet","cat","ceiling","charlie","chicken","coffee","cola","cold","colorado","comet","connecticut","crazy","cup","dakota","december","delaware","delta","diet","don","double","early","earth","east","echo","edward","eight","eighteen","eleven","emma","enemy","equal","failed","fanta","fifteen","fillet","finch","fish","five","fix","floor","florida","football","four","fourteen","foxtrot","freddie","friend","fruit","gee","georgia","glucose","golf","green","grey","hamper","happy","harry","hawaii","helium","high","hot","hotel","hydrogen","idaho","illinois","india","indigo","ink","iowa","island","item","jersey","jig","johnny","juliet","july","jupiter","kansas","kentucky","kilo","king","kitten","lactose","lake","lamp","lemon","leopard","lima","lion","lithium","london","louisiana","low","magazine","magnesium","maine","mango","march","mars","maryland","massachusetts","may","mexico","michigan","mike","minnesota","mirror","mississippi","missouri","mobile","mockingbird","monkey","montana","moon","mountain","muppet","music","nebraska","neptune","network","nevada","nine","nineteen","nitrogen","north","november","nuts","october","ohio","oklahoma","one","orange","oranges","oregon","oscar","oven","oxygen","papa","paris","pasta","pennsylvania","pip","pizza","pluto","potato","princess","purple","quebec","queen","quiet","red","river","robert","robin","romeo","rugby","sad","salami","saturn","september","seven","seventeen","shade","sierra","single","sink","six","sixteen","skylark","snake","social","sodium","solar","south","spaghetti","speaker","spring","stairway","steak","stream","summer","sweet","table","tango","ten","tennessee","tennis","texas","thirteen","three","timing","triple","twelve","twenty","two","uncle","undress","uniform","uranus","utah","vegan","venus","vermont","victor","video","violet","virginia","washington","west","whiskey","white","william","winner","winter","wisconsin","wolfram","wyoming","xray","yankee","yellow","zebra","zulu"],kD=class{constructor(e=PD){if(this.wordlist=e,e.length!==256)throw new Error("Wordlist must have exactly 256 items");this.wordlist=e}humanize(e,t=4,r="-"){const n=e.match(/(..?)/g);if(!n)throw new Error("");const o=n.map(a=>parseInt(a,16));return this._compress(o,t).map(a=>this.wordlist[a]).join(r)}_compress(e,t){const r=e.length;if(t>r)throw new Error("Fewer input bytes than requested output");const n=r/t>>0,o=[];for(let a=0;a<n*t;a+=n)o.push(e.slice(a,a+n));return o[o.length-1]=o[o.length-1].concat(e.slice(t*n)),o.map(a=>a.reduce((s,l)=>s^l))}},ND=new kD,DD=e=>(e instanceof Qt.Buffer||e instanceof Uint8Array||e instanceof ArrayBuffer?e=p0.stringify(e):e instanceof p0&&(e=e.toHex()),ND.humanize(e)),LD=e=>Qt.Buffer.from(e.buffer,e.byteOffset,e.byteLength),MD=5,Yu=(e,t=0,r=new WeakSet)=>{if(t>MD)return null;if(typeof e=="function")return null;if(typeof e=="object"&&e!==null){if(r.has(e))return null;r.add(e);try{if(e instanceof Uint8Array)return LD(e).toString("hex");if(Array.isArray(e))return e.map(n=>Yu(n,t+1,r));if(typeof e.toJSON=="function")return e.toJSON();{const n={};for(const o of Object.keys(e))n[o]=Yu(e[o],t+1,r);return n}}finally{r.delete(e)}}else return e},FD=(e,t,r)=>{let n=e.get(t);return n===void 0&&(n=typeof r=="function"?r():r,e.set(t,n)),n},jD=()=>typeof navigator<"u"&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Ju=Symbol("instanceTag"),BD=e=>t=>{t.prototype[Ju]=e,Object.defineProperty(t.prototype,Symbol.hasInstance,{value:r=>(r==null?void 0:r[Ju])===e}),Object.defineProperty(t,Symbol.hasInstance,{value:r=>(r==null?void 0:r[Ju])===e})},Xu=Symbol.for("dxos.instance-contexts"),RD=globalThis[Xu]??(globalThis[Xu]=new WeakMap),UD=e=>{const t=Object.getPrototypeOf(e),r=FD(RD,t,()=>({nextId:0,instanceIds:new WeakMap}));let n=r.instanceIds.get(e);return n===void 0&&(n=r.nextId++,r.instanceIds.set(e,n)),n},Zu=()=>{throw new Error("Not available on this platform")},WD=()=>Zu(),VD=()=>Zu(),HD=()=>Zu(),g0=He({"node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js"(e,t){function r(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function n(a,s){for(var l="",u=0,f=-1,d=0,p,h=0;h<=a.length;++h){if(h<a.length)p=a.charCodeAt(h);else{if(p===47)break;p=47}if(p===47){if(!(f===h-1||d===1))if(f!==h-1&&d===2){if(l.length<2||u!==2||l.charCodeAt(l.length-1)!==46||l.charCodeAt(l.length-2)!==46){if(l.length>2){var g=l.lastIndexOf("/");if(g!==l.length-1){g===-1?(l="",u=0):(l=l.slice(0,g),u=l.length-1-l.lastIndexOf("/")),f=h,d=0;continue}}else if(l.length===2||l.length===1){l="",u=0,f=h,d=0;continue}}s&&(l.length>0?l+="/..":l="..",u=2)}else l.length>0?l+="/"+a.slice(f+1,h):l=a.slice(f+1,h),u=h-f-1;f=h,d=0}else p===46&&d!==-1?++d:d=-1}return l}function o(a,s){var l=s.dir||s.root,u=s.base||(s.name||"")+(s.ext||"");return l?l===s.root?l+u:l+a+u:u}var i={resolve:function(){for(var s="",l=!1,u,f=arguments.length-1;f>=-1&&!l;f--){var d;f>=0?d=arguments[f]:(u===void 0&&(u=process.cwd()),d=u),r(d),d.length!==0&&(s=d+"/"+s,l=d.charCodeAt(0)===47)}return s=n(s,!l),l?s.length>0?"/"+s:"/":s.length>0?s:"."},normalize:function(s){if(r(s),s.length===0)return".";var l=s.charCodeAt(0)===47,u=s.charCodeAt(s.length-1)===47;return s=n(s,!l),s.length===0&&!l&&(s="."),s.length>0&&u&&(s+="/"),l?"/"+s:s},isAbsolute:function(s){return r(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var s,l=0;l<arguments.length;++l){var u=arguments[l];r(u),u.length>0&&(s===void 0?s=u:s+="/"+u)}return s===void 0?".":i.normalize(s)},relative:function(s,l){if(r(s),r(l),s===l||(s=i.resolve(s),l=i.resolve(l),s===l))return"";for(var u=1;u<s.length&&s.charCodeAt(u)===47;++u);for(var f=s.length,d=f-u,p=1;p<l.length&&l.charCodeAt(p)===47;++p);for(var h=l.length,g=h-p,v=d<g?d:g,b=-1,m=0;m<=v;++m){if(m===v){if(g>v){if(l.charCodeAt(p+m)===47)return l.slice(p+m+1);if(m===0)return l.slice(p+m)}else d>v&&(s.charCodeAt(u+m)===47?b=m:m===0&&(b=0));break}var w=s.charCodeAt(u+m),E=l.charCodeAt(p+m);if(w!==E)break;w===47&&(b=m)}var x="";for(m=u+b+1;m<=f;++m)(m===f||s.charCodeAt(m)===47)&&(x.length===0?x+="..":x+="/..");return x.length>0?x+l.slice(p+b):(p+=b,l.charCodeAt(p)===47&&++p,l.slice(p))},_makeLong:function(s){return s},dirname:function(s){if(r(s),s.length===0)return".";for(var l=s.charCodeAt(0),u=l===47,f=-1,d=!0,p=s.length-1;p>=1;--p)if(l=s.charCodeAt(p),l===47){if(!d){f=p;break}}else d=!1;return f===-1?u?"/":".":u&&f===1?"//":s.slice(0,f)},basename:function(s,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');r(s);var u=0,f=-1,d=!0,p;if(l!==void 0&&l.length>0&&l.length<=s.length){if(l.length===s.length&&l===s)return"";var h=l.length-1,g=-1;for(p=s.length-1;p>=0;--p){var v=s.charCodeAt(p);if(v===47){if(!d){u=p+1;break}}else g===-1&&(d=!1,g=p+1),h>=0&&(v===l.charCodeAt(h)?--h===-1&&(f=p):(h=-1,f=g))}return u===f?f=g:f===-1&&(f=s.length),s.slice(u,f)}else{for(p=s.length-1;p>=0;--p)if(s.charCodeAt(p)===47){if(!d){u=p+1;break}}else f===-1&&(d=!1,f=p+1);return f===-1?"":s.slice(u,f)}},extname:function(s){r(s);for(var l=-1,u=0,f=-1,d=!0,p=0,h=s.length-1;h>=0;--h){var g=s.charCodeAt(h);if(g===47){if(!d){u=h+1;break}continue}f===-1&&(d=!1,f=h+1),g===46?l===-1?l=h:p!==1&&(p=1):l!==-1&&(p=-1)}return l===-1||f===-1||p===0||p===1&&l===f-1&&l===u+1?"":s.slice(l,f)},format:function(s){if(s===null||typeof s!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof s);return o("/",s)},parse:function(s){r(s);var l={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return l;var u=s.charCodeAt(0),f=u===47,d;f?(l.root="/",d=1):d=0;for(var p=-1,h=0,g=-1,v=!0,b=s.length-1,m=0;b>=d;--b){if(u=s.charCodeAt(b),u===47){if(!v){h=b+1;break}continue}g===-1&&(v=!1,g=b+1),u===46?p===-1?p=b:m!==1&&(m=1):p!==-1&&(m=-1)}return p===-1||g===-1||m===0||m===1&&p===g-1&&p===h+1?g!==-1&&(h===0&&f?l.base=l.name=s.slice(1,g):l.base=l.name=s.slice(h,g)):(h===0&&f?(l.name=s.slice(1,p),l.base=s.slice(1,g)):(l.name=s.slice(h,p),l.base=s.slice(h,g)),l.ext=s.slice(p,g)),h>0?l.dir=s.slice(0,h-1):f&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,t.exports=i}});Vi(g0());var Wr=Vi(g0());Wr.basename;var zD=Wr.dirname;Wr.extname,Wr.format,Wr.isAbsolute,Wr.join,Wr.normalize,Wr.parse,Wr.relative,Wr.resolve;var wt;(function(e){e[e.TRACE=5]="TRACE",e[e.DEBUG=10]="DEBUG",e[e.INFO=11]="INFO",e[e.WARN=12]="WARN",e[e.ERROR=13]="ERROR"})(wt||(wt={}));var GD={trace:5,debug:10,info:11,warn:12,error:13},Gi;(function(e){e.CONSOLE="console",e.BROWSER="browser",e.DEBUG="debug"})(Gi||(Gi={}));var KD=Symbol("logInfoProperties"),qD=e=>{if(!e)return{};const t={},n=Object.getPrototypeOf(e)[KD]??[];for(const o of n)try{t[o]=typeof e[o]=="function"?e[o]():e[o]}catch(i){t[o]=i.message}return t},YD=(e,t,r)=>t>=e.level&&(!e.pattern||r.includes(e.pattern)),v0=(e,t)=>t===void 0?!0:t.some(r=>{var n;return YD(r,e.level,((n=e.meta)==null?void 0:n.F)??"")}),Qu=e=>{let t;if(e.meta){const r=qD(e.meta.S);Object.keys(r).length>0&&(t=Object.assign(t??{},r))}if(e.context)if(e.context instanceof Error){const r=e.context.context;t=Object.assign(t??{},{error:e.context.stack,...r})}else typeof e.context=="object"&&(t=Object.assign(t??{},e.context));return t&&Object.keys(t).length>0?t:void 0},JD=0,XD=e=>(t,r,n)=>(o,i,a)=>{const s=a.value;a.value=function(...l){const u={...n??{},S:this},f=l.map(d=>_r(d,!1,1,!0)).join(", ");try{const d=performance.now(),p=s.apply(this,l);if(ZD(p)){const h=JD++;e.info(`${i}(${f}) => Promise { #${h} }`,{},u),p.then(g=>{g!==void 0?e.info(`✅ resolve #${h} ${(performance.now()-d).toFixed(0)}ms => ${_r(g,!1,1,!0)}`,{},u):e.info(`✅ resolve #${h} ${(performance.now()-d).toFixed(0)}ms`,{},u)},g=>{e.info(`🔥 reject #${h} #${(performance.now()-d).toFixed(0)}ms => ${g}`,{},u)})}else e.info(`${i}(${f}) => ${_r(p,!1,1,!0)}`,{},u);return p}catch(d){throw e.error(`${i}(${f}) 🔥 ${d}`,{},u),d}},Object.defineProperty(a.value,"name",{value:i+"$log"})},ZD=e=>e&&typeof e.then=="function",QD=e=>{try{return JSON.parse(localStorage.getItem("dxlog"))}catch{return}},m0=()=>{},eL=(e,t)=>{console.log(_r(t,!1,null,!0))},b0=e=>{const t=e.match(/.+\/(packages\/.+\/.+)/);if(t){const[,r]=t;return r}return e},ef=typeof mochaExecutor<"u"?{useTestProcessor:!0,printFileLinks:!0}:{useTestProcessor:!1,printFileLinks:!1},tL=(e,t)=>{var u,f,d;if(!v0(t,e.filters))return;const r=e.prefix??"https://vscode.dev/github.com/dxos/dxos/blob/main/",n=[];let o="";if(t.meta){const p=b0(t.meta.F);o=`${`${r.replace(/\/$/,"")}/${p}`}#L${t.meta.L}`}let i=[];if((u=t.meta)!=null&&u.S){const p=(f=t.meta)==null?void 0:f.S,h=Object.getPrototypeOf(p),g=UD(p);i.push(`%c${h.constructor.name}#${g}`,"color:#C026D3;font-weight:bold")}i.push(t.message);const a=Qu(t);a&&i.push(a);const s={[wt.ERROR]:console.error,[wt.WARN]:console.warn,[wt.DEBUG]:console.log};(ef.printFileLinks||jD())&&(n!=null&&n.length?i=[`%c${o}
|
|
107
107
|
%c${i.join(" ")}`,...n]:i=[o+`
|
|
108
|
-
`,...i]);const l=s[t.level]??console.log;typeof
|
|
109
|
-
`)}},
|
|
110
|
-
${
|
|
108
|
+
`,...i]);const l=s[t.level]??console.log;typeof((d=t.meta)==null?void 0:d.C)=="function"?t.meta.C(l,i):l(...i)},rL=(e,t)=>{var s;if(!v0(t,e.filters))return;let r="";t.meta&&(r=`${b0(t.meta.F)}:${t.meta.L}`);let n=[];n.push(t.message);const o=Qu(t);o&&n.push(o);const i={[wt.ERROR]:console.error,[wt.WARN]:console.warn,[wt.DEBUG]:console.log};ef.printFileLinks&&(n=[r,...n]);const a=i[t.level]??console.log;typeof((s=t.meta)==null?void 0:s.C)=="function"?t.meta.C(a,n):a(...n)},y0=ef.useTestProcessor?rL:tL,nL=({path:e,levels:t})=>{let r;return(n,o)=>{var a,s;if(!t.includes(o.level))return;if(!r){try{VD(zD(e))}catch{}r=HD()}const i={...o,timestamp:Date.now(),meta:{file:(a=o.meta)==null?void 0:a.F,line:(s=o.meta)==null?void 0:s.L},context:Yu(Qu(o))};WD(r,JSON.stringify(i)+`
|
|
109
|
+
`)}},w0,oL=()=>(w0??(w0=process.env.LOG_FILE??(process.env.HOME?`${process.env.HOME}/.dxlog/${new Date().toISOString()}.log`:void 0)),w0);nL({path:oL(),levels:[wt.ERROR,wt.WARN,wt.INFO,wt.TRACE]});var iL={[Gi.CONSOLE]:m0,[Gi.BROWSER]:y0,[Gi.DEBUG]:eL},aL=typeof window<"u"||typeof navigator<"u",tf=[aL?y0:m0],_0=e=>{if(typeof e=="number")return[{level:e}];const t=(n,o=wt.WARN)=>GD[n.toLowerCase()]??o;return(typeof e=="string"?e.split(/,\s*/):e).map(n=>{const[o,i]=n.split(":");return i?{level:t(i),pattern:o}:{level:t(o)}})},E0=e=>{const t="process"in globalThis?{file:process.env.LOG_CONFIG,filter:process.env.LOG_FILTER,processor:process.env.LOG_PROCESSOR}:void 0,r=mD({},e,t&&QD(t.file),t);return{options:r,filters:_0(r.filter??wt.INFO),captureFilters:_0(r.captureFilter??wt.WARN),processors:r.processor?[iL[r.processor]]:tf,prefix:r.prefix}},sL=()=>{const e=(...r)=>t(wt.DEBUG,...r);e._config=E0(),Object.defineProperty(e,"runtimeConfig",{get:()=>e._config}),e.addProcessor=r=>{tf.filter(n=>n===r).length===0&&tf.push(r),e._config.processors.filter(n=>n===r).length===0&&e._config.processors.push(r)},e.config=r=>{e._config=E0(r)},e.trace=(...r)=>t(wt.TRACE,...r),e.debug=(...r)=>t(wt.DEBUG,...r),e.info=(...r)=>t(wt.INFO,...r),e.warn=(...r)=>t(wt.WARN,...r),e.error=(...r)=>t(wt.ERROR,...r),e.catch=(r,n,o)=>t(wt.ERROR,r.stack,n,o),e.break=()=>e.info("——————————————————————————————————————————————————"),e.stack=(r,n,o)=>t(wt.INFO,`${r??"Stack Dump"}
|
|
110
|
+
${lL()}`,n,o),e.method=XD(e);const t=(r,n,o={},i,a)=>{e._config.processors.forEach(s=>s(e._config,{level:r,message:n,context:o,meta:i,error:a}))};return e},Xe=globalThis.dx_log??(globalThis.dx_log=sL()),lL=()=>new Error().stack.split(`
|
|
111
111
|
`).slice(3).join(`
|
|
112
|
-
`),dD=Symbol("kDebugInfoProperties");(class{constructor(e,t){this.constr=e,this.parent=t}getInfo(){if(!this.instance)return{};const e=this.constr.prototype[dD]??[],t={};for(const r of e)t[r]=this.instance[r];return t}[wr.custom](){return{className:this.constr.name,info:this.getInfo(),parent:this.parent}}});var pD=class extends Error{constructor(){super("Context disposed.")}};function hD(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}var ju="/home/runner/work/dxos/dxos/packages/common/context/src/context.ts",gD=300,Bu=class{constructor({onError:t=o=>{if(!(o instanceof pD))throw this.dispose(),o},attributes:r={},parent:n}={}){this._disposeCallbacks=[],this._isDisposed=!1,this._disposePromise=void 0,this._parent=null,this.maxSafeDisposeCallbacks=gD,this._onError=t,this._attributes=r,n!==void 0&&(this._parent=n)}get disposed(){return this._isDisposed}get disposeCallbacksLength(){return this._disposeCallbacks.length}onDispose(t){return this._isDisposed&&(async()=>{try{await t()}catch(r){Qe.catch(r,void 0,{F:ju,L:82,S:this,C:(n,o)=>n(...o)})}})(),this._disposeCallbacks.push(t),this._disposeCallbacks.length>this.maxSafeDisposeCallbacks&&Qe.warn("Context has a large number of dispose callbacks. This might be a memory leak.",{count:this._disposeCallbacks.length,safeThreshold:this.maxSafeDisposeCallbacks},{F:ju,L:89,S:this,C:(r,n)=>r(...n)}),()=>{const r=this._disposeCallbacks.indexOf(t);r!==-1&&this._disposeCallbacks.splice(r,1)}}dispose(){if(this._disposePromise)return this._disposePromise;this._isDisposed=!0;const t=[];for(const r of this._disposeCallbacks.reverse())t.push((async()=>{try{await r()}catch(n){Qe.catch(n,void 0,{F:ju,L:124,S:this,C:(o,i)=>o(...i)})}})());return this._disposeCallbacks.length=0,this._disposePromise=Promise.all(t).then(()=>{})}raise(t){if(!this._isDisposed)try{this._onError(t)}catch(r){Promise.reject(r)}}derive({onError:t,attributes:r}={}){const n=new Bu({onError:async i=>{if(!t)this.raise(i);else try{await t(i)}catch{this.raise(i)}},attributes:r}),o=this.onDispose(()=>n.dispose());return n.onDispose(o),n}getAttribute(t){if(t in this._attributes)return this._attributes[t];if(this._parent!==null)return this._parent.getAttribute(t)}};Bu=hD([U8("Context")],Bu);var Ls={};Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.Observable=void 0;const e0=e=>!!Symbol[e],Ru=e=>e0(e)?Symbol[e]:"@@"+e,vD=Ru("iterator"),Uu=Ru("observable"),t0=Ru("species");function Ms(e,t){let r=e[t];if(r!=null){if(typeof r!="function")throw new TypeError(r+" is not a function");return r}}function ji(e){let t=e.constructor;return t!==void 0&&(t=t[t0],t===null&&(t=void 0)),t!==void 0?t:js}function mD(e){return e instanceof js}function Mo(e){Mo.log?Mo.log(e):setTimeout(()=>{throw e})}function Fs(e){Promise.resolve().then(()=>{try{e()}catch(t){Mo(t)}})}function r0(e){let t=e._cleanup;if(t!==void 0&&(e._cleanup=void 0,!!t))try{if(typeof t=="function")t();else{let r=Ms(t,"unsubscribe");r&&r.call(t)}}catch(r){Mo(r)}}function Wu(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function bD(e){let t=e._queue;if(t){e._queue=void 0,e._state="ready";for(let r=0;r<t.length&&(n0(e,t[r].type,t[r].value),e._state!=="closed");++r);}}function n0(e,t,r){e._state="running";let n=e._observer;try{let o=Ms(n,t);switch(t){case"next":o&&o.call(n,r);break;case"error":if(Wu(e),o)o.call(n,r);else throw r;break;case"complete":Wu(e),o&&o.call(n);break}}catch(o){Mo(o)}e._state==="closed"?r0(e):e._state==="running"&&(e._state="ready")}function Vu(e,t,r){if(e._state!=="closed"){if(e._state==="buffering"){e._queue.push({type:t,value:r});return}if(e._state!=="ready"){e._state="buffering",e._queue=[{type:t,value:r}],Fs(()=>bD(e));return}n0(e,t,r)}}class yD{constructor(t,r){this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";let n=this,o={get closed(){return n._state==="closed"},next(i){Vu(n,"next",i)},error(i){Vu(n,"error",i)},complete(){Vu(n,"complete")}};try{this._cleanup=r.call(void 0,o)}catch(i){o.error(i)}this._state==="initializing"&&(this._state="ready")}get closed(){return this._state==="closed"}unsubscribe(){this._state!=="closed"&&(Wu(this),r0(this))}}let js=class Sl{constructor(t){if(!(this instanceof Sl))throw new TypeError("Observable cannot be called as a function");if(typeof t!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=t}subscribe(t){return(typeof t!="object"||t===null)&&(t={next:t,error:arguments[1],complete:arguments[2]}),new yD(t,this._subscriber)}forEach(t){return new Promise((r,n)=>{if(typeof t!="function"){n(new TypeError(t+" is not a function"));return}function o(){i.unsubscribe(),r()}let i=this.subscribe({next(a){try{t(a,o)}catch(s){n(s),i.unsubscribe()}},error:n,complete:r})})}map(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=ji(this);return new r(n=>this.subscribe({next(o){try{o=t(o)}catch(i){return n.error(i)}n.next(o)},error(o){n.error(o)},complete(){n.complete()}}))}filter(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=ji(this);return new r(n=>this.subscribe({next(o){try{if(!t(o))return}catch(i){return n.error(i)}n.next(o)},error(o){n.error(o)},complete(){n.complete()}}))}reduce(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=ji(this),n=arguments.length>1,o=!1,a=arguments[1];return new r(s=>this.subscribe({next(l){let u=!o;if(o=!0,!u||n)try{a=t(a,l)}catch(f){return s.error(f)}else a=l},error(l){s.error(l)},complete(){if(!o&&!n)return s.error(new TypeError("Cannot reduce an empty sequence"));s.next(a),s.complete()}}))}async all(){let t=[];return await this.forEach(r=>t.push(r)),t}concat(...t){let r=ji(this);return new r(n=>{let o,i=0;function a(s){o=s.subscribe({next(l){n.next(l)},error(l){n.error(l)},complete(){i===t.length?(o=void 0,n.complete()):a(r.from(t[i++]))}})}return a(this),()=>{o&&(o.unsubscribe(),o=void 0)}})}flatMap(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=ji(this);return new r(n=>{let o=[],i=this.subscribe({next(s){if(t)try{s=t(s)}catch(u){return n.error(u)}let l=r.from(s).subscribe({next(u){n.next(u)},error(u){n.error(u)},complete(){let u=o.indexOf(l);u>=0&&o.splice(u,1),a()}});o.push(l)},error(s){n.error(s)},complete(){a()}});function a(){i.closed&&o.length===0&&n.complete()}return()=>{o.forEach(s=>s.unsubscribe()),i.unsubscribe()}})}[Uu](){return this}static from(t){let r=typeof this=="function"?this:Sl;if(t==null)throw new TypeError(t+" is not an object");let n=Ms(t,Uu);if(n){let o=n.call(t);if(Object(o)!==o)throw new TypeError(o+" is not an object");return mD(o)&&o.constructor===r?o:new r(i=>o.subscribe(i))}if(e0("iterator")&&(n=Ms(t,vD),n))return new r(o=>{Fs(()=>{if(!o.closed){for(let i of n.call(t))if(o.next(i),o.closed)return;o.complete()}})});if(Array.isArray(t))return new r(o=>{Fs(()=>{if(!o.closed){for(let i=0;i<t.length;++i)if(o.next(t[i]),o.closed)return;o.complete()}})});throw new TypeError(t+" is not observable")}static of(...t){let r=typeof this=="function"?this:Sl;return new r(n=>{Fs(()=>{if(!n.closed){for(let o=0;o<t.length;++o)if(n.next(t[o]),n.closed)return;n.complete()}})})}static get[t0](){return this}};Ls.Observable=js,Object.defineProperty(js,Symbol("extensions"),{value:{symbol:Uu,hostReportError:Mo},configurable:!0});var wD=Ls.Observable;const Bs=In(wD);var o0={exports:{}},Hu={exports:{}},Fo=typeof Reflect=="object"?Reflect:null,i0=Fo&&typeof Fo.apply=="function"?Fo.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},Rs;Fo&&typeof Fo.ownKeys=="function"?Rs=Fo.ownKeys:Object.getOwnPropertySymbols?Rs=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Rs=function(t){return Object.getOwnPropertyNames(t)};function _D(e){console&&console.warn&&console.warn(e)}var a0=Number.isNaN||function(t){return t!==t};function ct(){ct.init.call(this)}Hu.exports=ct,Hu.exports.once=$D,ct.EventEmitter=ct,ct.prototype._events=void 0,ct.prototype._eventsCount=0,ct.prototype._maxListeners=void 0;var s0=10;function Us(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(ct,"defaultMaxListeners",{enumerable:!0,get:function(){return s0},set:function(e){if(typeof e!="number"||e<0||a0(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s0=e}}),ct.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ct.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||a0(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function l0(e){return e._maxListeners===void 0?ct.defaultMaxListeners:e._maxListeners}ct.prototype.getMaxListeners=function(){return l0(this)},ct.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var o=t==="error",i=this._events;if(i!==void 0)o=o&&i.error===void 0;else if(!o)return!1;if(o){var a;if(r.length>0&&(a=r[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[t];if(l===void 0)return!1;if(typeof l=="function")i0(l,this,r);else for(var u=l.length,f=p0(l,u),n=0;n<u;++n)i0(f[n],this,r);return!0};function c0(e,t,r,n){var o,i,a;if(Us(r),i=e._events,i===void 0?(i=e._events=Object.create(null),e._eventsCount=0):(i.newListener!==void 0&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),a=i[t]),a===void 0)a=i[t]=r,++e._eventsCount;else if(typeof a=="function"?a=i[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),o=l0(e),o>0&&a.length>o&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,_D(s)}return e}ct.prototype.addListener=function(t,r){return c0(this,t,r,!1)},ct.prototype.on=ct.prototype.addListener,ct.prototype.prependListener=function(t,r){return c0(this,t,r,!0)};function ED(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u0(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=ED.bind(n);return o.listener=r,n.wrapFn=o,o}ct.prototype.once=function(t,r){return Us(r),this.on(t,u0(this,t,r)),this},ct.prototype.prependOnceListener=function(t,r){return Us(r),this.prependListener(t,u0(this,t,r)),this},ct.prototype.removeListener=function(t,r){var n,o,i,a,s;if(Us(r),o=this._events,o===void 0)return this;if(n=o[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete o[t],o.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===r||n[a].listener===r){s=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():xD(n,i),n.length===1&&(o[t]=n[0]),o.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this},ct.prototype.off=ct.prototype.removeListener,ct.prototype.removeAllListeners=function(t){var r,n,o;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i=Object.keys(n),a;for(o=0;o<i.length;++o)a=i[o],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[t],typeof r=="function")this.removeListener(t,r);else if(r!==void 0)for(o=r.length-1;o>=0;o--)this.removeListener(t,r[o]);return this};function f0(e,t,r){var n=e._events;if(n===void 0)return[];var o=n[t];return o===void 0?[]:typeof o=="function"?r?[o.listener||o]:[o]:r?SD(o):p0(o,o.length)}ct.prototype.listeners=function(t){return f0(this,t,!0)},ct.prototype.rawListeners=function(t){return f0(this,t,!1)},ct.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):d0.call(e,t)},ct.prototype.listenerCount=d0;function d0(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}ct.prototype.eventNames=function(){return this._eventsCount>0?Rs(this._events):[]};function p0(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function xD(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function SD(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function $D(e,t){return new Promise(function(r,n){function o(a){e.removeListener(t,i),n(a)}function i(){typeof e.removeListener=="function"&&e.removeListener("error",o),r([].slice.call(arguments))}h0(e,t,i,{once:!0}),t!=="error"&&CD(e,o,{once:!0})})}function CD(e,t,r){typeof e.on=="function"&&h0(e,"error",t,r)}function h0(e,t,r,n){if(typeof e.on=="function")n.once?e.once(t,r):e.on(t,r);else if(typeof e.addEventListener=="function")e.addEventListener(t,function o(i){n.once&&e.removeEventListener(t,o),r(i)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var g0=Hu.exports,v0=g0.EventEmitter;const m0=R1(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var zu,b0;function AD(){if(b0)return zu;b0=1;function e(p,h){var g=Object.keys(p);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(p);h&&(v=v.filter(function(y){return Object.getOwnPropertyDescriptor(p,y).enumerable})),g.push.apply(g,v)}return g}function t(p){for(var h=1;h<arguments.length;h++){var g=arguments[h]!=null?arguments[h]:{};h%2?e(Object(g),!0).forEach(function(v){r(p,v,g[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(g)):e(Object(g)).forEach(function(v){Object.defineProperty(p,v,Object.getOwnPropertyDescriptor(g,v))})}return p}function r(p,h,g){return h in p?Object.defineProperty(p,h,{value:g,enumerable:!0,configurable:!0,writable:!0}):p[h]=g,p}function n(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")}function o(p,h){for(var g=0;g<h.length;g++){var v=h[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(p,v.key,v)}}function i(p,h,g){return h&&o(p.prototype,h),g&&o(p,g),p}var a=Zt,s=a.Buffer,l=m0,u=l.inspect,f=u&&u.custom||"inspect";function d(p,h,g){s.prototype.copy.call(p,h,g)}return zu=function(){function p(){n(this,p),this.head=null,this.tail=null,this.length=0}return i(p,[{key:"push",value:function(g){var v={data:g,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(g){var v={data:g,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var g=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,g}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(g){if(this.length===0)return"";for(var v=this.head,y=""+v.data;v=v.next;)y+=g+v.data;return y}},{key:"concat",value:function(g){if(this.length===0)return s.alloc(0);for(var v=s.allocUnsafe(g>>>0),y=this.head,m=0;y;)d(y.data,v,m),m+=y.data.length,y=y.next;return v}},{key:"consume",value:function(g,v){var y;return g<this.head.data.length?(y=this.head.data.slice(0,g),this.head.data=this.head.data.slice(g)):g===this.head.data.length?y=this.shift():y=v?this._getString(g):this._getBuffer(g),y}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(g){var v=this.head,y=1,m=v.data;for(g-=m.length;v=v.next;){var w=v.data,E=g>w.length?w.length:g;if(E===w.length?m+=w:m+=w.slice(0,g),g-=E,g===0){E===w.length?(++y,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=w.slice(E));break}++y}return this.length-=y,m}},{key:"_getBuffer",value:function(g){var v=s.allocUnsafe(g),y=this.head,m=1;for(y.data.copy(v),g-=y.data.length;y=y.next;){var w=y.data,E=g>w.length?w.length:g;if(w.copy(v,v.length-g,0,E),g-=E,g===0){E===w.length?(++m,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=w.slice(E));break}++m}return this.length-=m,v}},{key:f,value:function(g,v){return u(this,t({},v,{depth:0,customInspect:!1}))}}]),p}(),zu}function OD(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return n||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Gu,this,e)):process.nextTick(Gu,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(i){!t&&i?r._writableState?r._writableState.errorEmitted?process.nextTick(Ws,r):(r._writableState.errorEmitted=!0,process.nextTick(y0,r,i)):process.nextTick(y0,r,i):t?(process.nextTick(Ws,r),t(i)):process.nextTick(Ws,r)}),this)}function y0(e,t){Gu(e,t),Ws(e)}function Ws(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function TD(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Gu(e,t){e.emit("error",t)}function ID(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}var w0={destroy:OD,undestroy:TD,errorOrDestroy:ID},Yn={};function PD(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var _0={};function cr(e,t,r){r||(r=Error);function n(i,a,s){return typeof t=="string"?t:t(i,a,s)}var o=function(i){PD(a,i);function a(s,l,u){return i.call(this,n(s,l,u))||this}return a}(r);o.prototype.name=r.name,o.prototype.code=e,_0[e]=o}function E0(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function kD(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function ND(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function DD(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}cr("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),cr("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&kD(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var o;if(ND(e," argument"))o="The ".concat(e," ").concat(n," ").concat(E0(t,"type"));else{var i=DD(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(i," ").concat(n," ").concat(E0(t,"type"))}return o+=". Received type ".concat(typeof r),o},TypeError),cr("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),cr("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),cr("ERR_STREAM_PREMATURE_CLOSE","Premature close"),cr("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),cr("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),cr("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),cr("ERR_STREAM_WRITE_AFTER_END","write after end"),cr("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),cr("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),cr("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Yn.codes=_0;var LD=Yn.codes.ERR_INVALID_OPT_VALUE;function MD(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function FD(e,t,r,n){var o=MD(t,n,r);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var i=n?r:"highWaterMark";throw new LD(i,o)}return Math.floor(o)}return e.objectMode?16:16*1024}var x0={getHighWaterMark:FD},Ku={exports:{}};typeof Object.create=="function"?Ku.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Ku.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}};var Bi=Ku.exports,jD=BD;function BD(e,t){if(qu("noDeprecation"))return e;var r=!1;function n(){if(!r){if(qu("throwDeprecation"))throw new Error(t);qu("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function qu(e){try{if(!Ye.localStorage)return!1}catch{return!1}var t=Ye.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}var Yu,S0;function $0(){if(S0)return Yu;S0=1,Yu=O;function e(U){var z=this;this.next=null,this.entry=null,this.finish=function(){de(z,U)}}var t;O.WritableState=I;var r={deprecate:jD},n=v0,o=Zt.Buffer,i=Ye.Uint8Array||function(){};function a(U){return o.from(U)}function s(U){return o.isBuffer(U)||U instanceof i}var l=w0,u=x0,f=u.getHighWaterMark,d=Yn.codes,p=d.ERR_INVALID_ARG_TYPE,h=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,v=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,m=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,E=d.ERR_UNKNOWN_ENCODING,x=l.errorOrDestroy;Bi(O,n);function P(){}function I(U,z,M){t=t||jo(),U=U||{},typeof M!="boolean"&&(M=z instanceof t),this.objectMode=!!U.objectMode,M&&(this.objectMode=this.objectMode||!!U.writableObjectMode),this.highWaterMark=f(this,U,"writableHighWaterMark",M),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var R=U.decodeStrings===!1;this.decodeStrings=!R,this.defaultEncoding=U.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(G){te(z,G)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=U.emitClose!==!1,this.autoDestroy=!!U.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}I.prototype.getBuffer=function(){for(var z=this.bufferedRequest,M=[];z;)M.push(z),z=z.next;return M},function(){try{Object.defineProperty(I.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var S;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(S=Function.prototype[Symbol.hasInstance],Object.defineProperty(O,Symbol.hasInstance,{value:function(z){return S.call(this,z)?!0:this!==O?!1:z&&z._writableState instanceof I}})):S=function(z){return z instanceof this};function O(U){t=t||jo();var z=this instanceof t;if(!z&&!S.call(O,this))return new O(U);this._writableState=new I(U,this,z),this.writable=!0,U&&(typeof U.write=="function"&&(this._write=U.write),typeof U.writev=="function"&&(this._writev=U.writev),typeof U.destroy=="function"&&(this._destroy=U.destroy),typeof U.final=="function"&&(this._final=U.final)),n.call(this)}O.prototype.pipe=function(){x(this,new v)};function k(U,z){var M=new w;x(U,M),process.nextTick(z,M)}function j(U,z,M,R){var G;return M===null?G=new m:typeof M!="string"&&!z.objectMode&&(G=new p("chunk",["string","Buffer"],M)),G?(x(U,G),process.nextTick(R,G),!1):!0}O.prototype.write=function(U,z,M){var R=this._writableState,G=!1,A=!R.objectMode&&s(U);return A&&!o.isBuffer(U)&&(U=a(U)),typeof z=="function"&&(M=z,z=null),A?z="buffer":z||(z=R.defaultEncoding),typeof M!="function"&&(M=P),R.ending?k(this,M):(A||j(this,R,U,M))&&(R.pendingcb++,G=N(this,R,A,U,z,M)),G},O.prototype.cork=function(){this._writableState.corked++},O.prototype.uncork=function(){var U=this._writableState;U.corked&&(U.corked--,!U.writing&&!U.corked&&!U.bufferProcessing&&U.bufferedRequest&&ae(this,U))},O.prototype.setDefaultEncoding=function(z){if(typeof z=="string"&&(z=z.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((z+"").toLowerCase())>-1))throw new E(z);return this._writableState.defaultEncoding=z,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function D(U,z,M){return!U.objectMode&&U.decodeStrings!==!1&&typeof z=="string"&&(z=o.from(z,M)),z}Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N(U,z,M,R,G,A){if(!M){var T=D(z,R,G);R!==T&&(M=!0,G="buffer",R=T)}var Z=z.objectMode?1:R.length;z.length+=Z;var ne=z.length<z.highWaterMark;if(ne||(z.needDrain=!0),z.writing||z.corked){var pe=z.lastBufferedRequest;z.lastBufferedRequest={chunk:R,encoding:G,isBuf:M,callback:A,next:null},pe?pe.next=z.lastBufferedRequest:z.bufferedRequest=z.lastBufferedRequest,z.bufferedRequestCount+=1}else J(U,z,!1,Z,R,G,A);return ne}function J(U,z,M,R,G,A,T){z.writelen=R,z.writecb=T,z.writing=!0,z.sync=!0,z.destroyed?z.onwrite(new y("write")):M?U._writev(G,z.onwrite):U._write(G,A,z.onwrite),z.sync=!1}function K(U,z,M,R,G){--z.pendingcb,M?(process.nextTick(G,R),process.nextTick(V,U,z),U._writableState.errorEmitted=!0,x(U,R)):(G(R),U._writableState.errorEmitted=!0,x(U,R),V(U,z))}function Y(U){U.writing=!1,U.writecb=null,U.length-=U.writelen,U.writelen=0}function te(U,z){var M=U._writableState,R=M.sync,G=M.writecb;if(typeof G!="function")throw new g;if(Y(M),z)K(U,M,R,z,G);else{var A=ge(M)||U.destroyed;!A&&!M.corked&&!M.bufferProcessing&&M.bufferedRequest&&ae(U,M),R?process.nextTick(oe,U,M,A,G):oe(U,M,A,G)}}function oe(U,z,M,R){M||le(U,z),z.pendingcb--,R(),V(U,z)}function le(U,z){z.length===0&&z.needDrain&&(z.needDrain=!1,U.emit("drain"))}function ae(U,z){z.bufferProcessing=!0;var M=z.bufferedRequest;if(U._writev&&M&&M.next){var R=z.bufferedRequestCount,G=new Array(R),A=z.corkedRequestsFree;A.entry=M;for(var T=0,Z=!0;M;)G[T]=M,M.isBuf||(Z=!1),M=M.next,T+=1;G.allBuffers=Z,J(U,z,!0,z.length,G,"",A.finish),z.pendingcb++,z.lastBufferedRequest=null,A.next?(z.corkedRequestsFree=A.next,A.next=null):z.corkedRequestsFree=new e(z),z.bufferedRequestCount=0}else{for(;M;){var ne=M.chunk,pe=M.encoding,me=M.callback,xe=z.objectMode?1:ne.length;if(J(U,z,!1,xe,ne,pe,me),M=M.next,z.bufferedRequestCount--,z.writing)break}M===null&&(z.lastBufferedRequest=null)}z.bufferedRequest=M,z.bufferProcessing=!1}O.prototype._write=function(U,z,M){M(new h("_write()"))},O.prototype._writev=null,O.prototype.end=function(U,z,M){var R=this._writableState;return typeof U=="function"?(M=U,U=null,z=null):typeof z=="function"&&(M=z,z=null),U!=null&&this.write(U,z),R.corked&&(R.corked=1,this.uncork()),R.ending||re(this,R,M),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ge(U){return U.ending&&U.length===0&&U.bufferedRequest===null&&!U.finished&&!U.writing}function ce(U,z){U._final(function(M){z.pendingcb--,M&&x(U,M),z.prefinished=!0,U.emit("prefinish"),V(U,z)})}function q(U,z){!z.prefinished&&!z.finalCalled&&(typeof U._final=="function"&&!z.destroyed?(z.pendingcb++,z.finalCalled=!0,process.nextTick(ce,U,z)):(z.prefinished=!0,U.emit("prefinish")))}function V(U,z){var M=ge(z);if(M&&(q(U,z),z.pendingcb===0&&(z.finished=!0,U.emit("finish"),z.autoDestroy))){var R=U._readableState;(!R||R.autoDestroy&&R.endEmitted)&&U.destroy()}return M}function re(U,z,M){z.ending=!0,V(U,z),M&&(z.finished?process.nextTick(M):U.once("finish",M)),z.ended=!0,U.writable=!1}function de(U,z,M){var R=U.entry;for(U.entry=null;R;){var G=R.callback;z.pendingcb--,G(M),R=R.next}z.corkedRequestsFree.next=U}return Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(z){this._writableState&&(this._writableState.destroyed=z)}}),O.prototype.destroy=l.destroy,O.prototype._undestroy=l.undestroy,O.prototype._destroy=function(U,z){z(U)},Yu}var Ju,C0;function jo(){if(C0)return Ju;C0=1;var e=Object.keys||function(u){var f=[];for(var d in u)f.push(d);return f};Ju=a;var t=D0(),r=$0();Bi(a,t);for(var n=e(r.prototype),o=0;o<n.length;o++){var i=n[o];a.prototype[i]||(a.prototype[i]=r.prototype[i])}function a(u){if(!(this instanceof a))return new a(u);t.call(this,u),r.call(this,u),this.allowHalfOpen=!0,u&&(u.readable===!1&&(this.readable=!1),u.writable===!1&&(this.writable=!1),u.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(l,this)}function l(u){u.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=f,this._writableState.destroyed=f)}}),Ju}var Xu={},A0;function O0(){if(A0)return Xu;A0=1;var e=Vb.Buffer,t=e.isEncoding||function(m){switch(m=""+m,m&&m.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(m){if(!m)return"utf8";for(var w;;)switch(m){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return m;default:if(w)return;m=(""+m).toLowerCase(),w=!0}}function n(m){var w=r(m);if(typeof w!="string"&&(e.isEncoding===t||!t(m)))throw new Error("Unknown encoding: "+m);return w||m}Xu.StringDecoder=o;function o(m){this.encoding=n(m);var w;switch(this.encoding){case"utf16le":this.text=d,this.end=p,w=4;break;case"utf8":this.fillLast=l,w=4;break;case"base64":this.text=h,this.end=g,w=3;break;default:this.write=v,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(w)}o.prototype.write=function(m){if(m.length===0)return"";var w,E;if(this.lastNeed){if(w=this.fillLast(m),w===void 0)return"";E=this.lastNeed,this.lastNeed=0}else E=0;return E<m.length?w?w+this.text(m,E):this.text(m,E):w||""},o.prototype.end=f,o.prototype.text=u,o.prototype.fillLast=function(m){if(this.lastNeed<=m.length)return m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,m.length),this.lastNeed-=m.length};function i(m){return m<=127?0:m>>5===6?2:m>>4===14?3:m>>3===30?4:m>>6===2?-1:-2}function a(m,w,E){var x=w.length-1;if(x<E)return 0;var P=i(w[x]);return P>=0?(P>0&&(m.lastNeed=P-1),P):--x<E||P===-2?0:(P=i(w[x]),P>=0?(P>0&&(m.lastNeed=P-2),P):--x<E||P===-2?0:(P=i(w[x]),P>=0?(P>0&&(P===2?P=0:m.lastNeed=P-3),P):0))}function s(m,w,E){if((w[0]&192)!==128)return m.lastNeed=0,"�";if(m.lastNeed>1&&w.length>1){if((w[1]&192)!==128)return m.lastNeed=1,"�";if(m.lastNeed>2&&w.length>2&&(w[2]&192)!==128)return m.lastNeed=2,"�"}}function l(m){var w=this.lastTotal-this.lastNeed,E=s(this,m);if(E!==void 0)return E;if(this.lastNeed<=m.length)return m.copy(this.lastChar,w,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);m.copy(this.lastChar,w,0,m.length),this.lastNeed-=m.length}function u(m,w){var E=a(this,m,w);if(!this.lastNeed)return m.toString("utf8",w);this.lastTotal=E;var x=m.length-(E-this.lastNeed);return m.copy(this.lastChar,0,x),m.toString("utf8",w,x)}function f(m){var w=m&&m.length?this.write(m):"";return this.lastNeed?w+"�":w}function d(m,w){if((m.length-w)%2===0){var E=m.toString("utf16le",w);if(E){var x=E.charCodeAt(E.length-1);if(x>=55296&&x<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1],E.slice(0,-1)}return E}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=m[m.length-1],m.toString("utf16le",w,m.length-1)}function p(m){var w=m&&m.length?this.write(m):"";if(this.lastNeed){var E=this.lastTotal-this.lastNeed;return w+this.lastChar.toString("utf16le",0,E)}return w}function h(m,w){var E=(m.length-w)%3;return E===0?m.toString("base64",w):(this.lastNeed=3-E,this.lastTotal=3,E===1?this.lastChar[0]=m[m.length-1]:(this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1]),m.toString("base64",w,m.length-E))}function g(m){var w=m&&m.length?this.write(m):"";return this.lastNeed?w+this.lastChar.toString("base64",0,3-this.lastNeed):w}function v(m){return m.toString(this.encoding)}function y(m){return m&&m.length?this.write(m):""}return Xu}var T0=Yn.codes.ERR_STREAM_PREMATURE_CLOSE;function RD(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e.apply(this,n)}}}function UD(){}function WD(e){return e.setHeader&&typeof e.abort=="function"}function I0(e,t,r){if(typeof t=="function")return I0(e,null,t);t||(t={}),r=RD(r||UD);var n=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,i=function(){e.writable||s()},a=e._writableState&&e._writableState.finished,s=function(){o=!1,a=!0,n||r.call(e)},l=e._readableState&&e._readableState.endEmitted,u=function(){n=!1,l=!0,o||r.call(e)},f=function(g){r.call(e,g)},d=function(){var g;if(n&&!l)return(!e._readableState||!e._readableState.ended)&&(g=new T0),r.call(e,g);if(o&&!a)return(!e._writableState||!e._writableState.ended)&&(g=new T0),r.call(e,g)},p=function(){e.req.on("finish",s)};return WD(e)?(e.on("complete",s),e.on("abort",d),e.req?p():e.on("request",p)):o&&!e._writableState&&(e.on("end",i),e.on("close",i)),e.on("end",u),e.on("finish",s),t.error!==!1&&e.on("error",f),e.on("close",d),function(){e.removeListener("complete",s),e.removeListener("abort",d),e.removeListener("request",p),e.req&&e.req.removeListener("finish",s),e.removeListener("end",i),e.removeListener("close",i),e.removeListener("finish",s),e.removeListener("end",u),e.removeListener("error",f),e.removeListener("close",d)}}var Zu=I0,Qu,P0;function VD(){if(P0)return Qu;P0=1;var e;function t(m,w,E){return w in m?Object.defineProperty(m,w,{value:E,enumerable:!0,configurable:!0,writable:!0}):m[w]=E,m}var r=Zu,n=Symbol("lastResolve"),o=Symbol("lastReject"),i=Symbol("error"),a=Symbol("ended"),s=Symbol("lastPromise"),l=Symbol("handlePromise"),u=Symbol("stream");function f(m,w){return{value:m,done:w}}function d(m){var w=m[n];if(w!==null){var E=m[u].read();E!==null&&(m[s]=null,m[n]=null,m[o]=null,w(f(E,!1)))}}function p(m){process.nextTick(d,m)}function h(m,w){return function(E,x){m.then(function(){if(w[a]){E(f(void 0,!0));return}w[l](E,x)},x)}}var g=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((e={get stream(){return this[u]},next:function(){var w=this,E=this[i];if(E!==null)return Promise.reject(E);if(this[a])return Promise.resolve(f(void 0,!0));if(this[u].destroyed)return new Promise(function(S,O){process.nextTick(function(){w[i]?O(w[i]):S(f(void 0,!0))})});var x=this[s],P;if(x)P=new Promise(h(x,this));else{var I=this[u].read();if(I!==null)return Promise.resolve(f(I,!1));P=new Promise(this[l])}return this[s]=P,P}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var w=this;return new Promise(function(E,x){w[u].destroy(null,function(P){if(P){x(P);return}E(f(void 0,!0))})})}),e),g),y=function(w){var E,x=Object.create(v,(E={},t(E,u,{value:w,writable:!0}),t(E,n,{value:null,writable:!0}),t(E,o,{value:null,writable:!0}),t(E,i,{value:null,writable:!0}),t(E,a,{value:w._readableState.endEmitted,writable:!0}),t(E,l,{value:function(I,S){var O=x[u].read();O?(x[s]=null,x[n]=null,x[o]=null,I(f(O,!1))):(x[n]=I,x[o]=S)},writable:!0}),E));return x[s]=null,r(w,function(P){if(P&&P.code!=="ERR_STREAM_PREMATURE_CLOSE"){var I=x[o];I!==null&&(x[s]=null,x[n]=null,x[o]=null,I(P)),x[i]=P;return}var S=x[n];S!==null&&(x[s]=null,x[n]=null,x[o]=null,S(f(void 0,!0))),x[a]=!0}),w.on("readable",p.bind(null,x)),x};return Qu=y,Qu}var ef,k0;function HD(){return k0||(k0=1,ef=function(){throw new Error("Readable.from is not available in the browser")}),ef}var tf,N0;function D0(){if(N0)return tf;N0=1,tf=k;var e;k.ReadableState=O,g0.EventEmitter;var t=function(T,Z){return T.listeners(Z).length},r=v0,n=Zt.Buffer,o=Ye.Uint8Array||function(){};function i(A){return n.from(A)}function a(A){return n.isBuffer(A)||A instanceof o}var s=m0,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var u=AD(),f=w0,d=x0,p=d.getHighWaterMark,h=Yn.codes,g=h.ERR_INVALID_ARG_TYPE,v=h.ERR_STREAM_PUSH_AFTER_EOF,y=h.ERR_METHOD_NOT_IMPLEMENTED,m=h.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,w,E,x;Bi(k,r);var P=f.errorOrDestroy,I=["error","close","destroy","pause","resume"];function S(A,T,Z){if(typeof A.prependListener=="function")return A.prependListener(T,Z);!A._events||!A._events[T]?A.on(T,Z):Array.isArray(A._events[T])?A._events[T].unshift(Z):A._events[T]=[Z,A._events[T]]}function O(A,T,Z){e=e||jo(),A=A||{},typeof Z!="boolean"&&(Z=T instanceof e),this.objectMode=!!A.objectMode,Z&&(this.objectMode=this.objectMode||!!A.readableObjectMode),this.highWaterMark=p(this,A,"readableHighWaterMark",Z),this.buffer=new u,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=A.emitClose!==!1,this.autoDestroy=!!A.autoDestroy,this.destroyed=!1,this.defaultEncoding=A.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,A.encoding&&(w||(w=O0().StringDecoder),this.decoder=new w(A.encoding),this.encoding=A.encoding)}function k(A){if(e=e||jo(),!(this instanceof k))return new k(A);var T=this instanceof e;this._readableState=new O(A,this,T),this.readable=!0,A&&(typeof A.read=="function"&&(this._read=A.read),typeof A.destroy=="function"&&(this._destroy=A.destroy)),r.call(this)}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(T){this._readableState&&(this._readableState.destroyed=T)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(A,T){T(A)},k.prototype.push=function(A,T){var Z=this._readableState,ne;return Z.objectMode?ne=!0:typeof A=="string"&&(T=T||Z.defaultEncoding,T!==Z.encoding&&(A=n.from(A,T),T=""),ne=!0),j(this,A,T,!1,ne)},k.prototype.unshift=function(A){return j(this,A,null,!0,!1)};function j(A,T,Z,ne,pe){l("readableAddChunk",T);var me=A._readableState;if(T===null)me.reading=!1,te(A,me);else{var xe;if(pe||(xe=N(me,T)),xe)P(A,xe);else if(me.objectMode||T&&T.length>0)if(typeof T!="string"&&!me.objectMode&&Object.getPrototypeOf(T)!==n.prototype&&(T=i(T)),ne)me.endEmitted?P(A,new m):D(A,me,T,!0);else if(me.ended)P(A,new v);else{if(me.destroyed)return!1;me.reading=!1,me.decoder&&!Z?(T=me.decoder.write(T),me.objectMode||T.length!==0?D(A,me,T,!1):ae(A,me)):D(A,me,T,!1)}else ne||(me.reading=!1,ae(A,me))}return!me.ended&&(me.length<me.highWaterMark||me.length===0)}function D(A,T,Z,ne){T.flowing&&T.length===0&&!T.sync?(T.awaitDrain=0,A.emit("data",Z)):(T.length+=T.objectMode?1:Z.length,ne?T.buffer.unshift(Z):T.buffer.push(Z),T.needReadable&&oe(A)),ae(A,T)}function N(A,T){var Z;return!a(T)&&typeof T!="string"&&T!==void 0&&!A.objectMode&&(Z=new g("chunk",["string","Buffer","Uint8Array"],T)),Z}k.prototype.isPaused=function(){return this._readableState.flowing===!1},k.prototype.setEncoding=function(A){w||(w=O0().StringDecoder);var T=new w(A);this._readableState.decoder=T,this._readableState.encoding=this._readableState.decoder.encoding;for(var Z=this._readableState.buffer.head,ne="";Z!==null;)ne+=T.write(Z.data),Z=Z.next;return this._readableState.buffer.clear(),ne!==""&&this._readableState.buffer.push(ne),this._readableState.length=ne.length,this};var J=1073741824;function K(A){return A>=J?A=J:(A--,A|=A>>>1,A|=A>>>2,A|=A>>>4,A|=A>>>8,A|=A>>>16,A++),A}function Y(A,T){return A<=0||T.length===0&&T.ended?0:T.objectMode?1:A!==A?T.flowing&&T.length?T.buffer.head.data.length:T.length:(A>T.highWaterMark&&(T.highWaterMark=K(A)),A<=T.length?A:T.ended?T.length:(T.needReadable=!0,0))}k.prototype.read=function(A){l("read",A),A=parseInt(A,10);var T=this._readableState,Z=A;if(A!==0&&(T.emittedReadable=!1),A===0&&T.needReadable&&((T.highWaterMark!==0?T.length>=T.highWaterMark:T.length>0)||T.ended))return l("read: emitReadable",T.length,T.ended),T.length===0&&T.ended?M(this):oe(this),null;if(A=Y(A,T),A===0&&T.ended)return T.length===0&&M(this),null;var ne=T.needReadable;l("need readable",ne),(T.length===0||T.length-A<T.highWaterMark)&&(ne=!0,l("length less than watermark",ne)),T.ended||T.reading?(ne=!1,l("reading or ended",ne)):ne&&(l("do read"),T.reading=!0,T.sync=!0,T.length===0&&(T.needReadable=!0),this._read(T.highWaterMark),T.sync=!1,T.reading||(A=Y(Z,T)));var pe;return A>0?pe=z(A,T):pe=null,pe===null?(T.needReadable=T.length<=T.highWaterMark,A=0):(T.length-=A,T.awaitDrain=0),T.length===0&&(T.ended||(T.needReadable=!0),Z!==A&&T.ended&&M(this)),pe!==null&&this.emit("data",pe),pe};function te(A,T){if(l("onEofChunk"),!T.ended){if(T.decoder){var Z=T.decoder.end();Z&&Z.length&&(T.buffer.push(Z),T.length+=T.objectMode?1:Z.length)}T.ended=!0,T.sync?oe(A):(T.needReadable=!1,T.emittedReadable||(T.emittedReadable=!0,le(A)))}}function oe(A){var T=A._readableState;l("emitReadable",T.needReadable,T.emittedReadable),T.needReadable=!1,T.emittedReadable||(l("emitReadable",T.flowing),T.emittedReadable=!0,process.nextTick(le,A))}function le(A){var T=A._readableState;l("emitReadable_",T.destroyed,T.length,T.ended),!T.destroyed&&(T.length||T.ended)&&(A.emit("readable"),T.emittedReadable=!1),T.needReadable=!T.flowing&&!T.ended&&T.length<=T.highWaterMark,U(A)}function ae(A,T){T.readingMore||(T.readingMore=!0,process.nextTick(ge,A,T))}function ge(A,T){for(;!T.reading&&!T.ended&&(T.length<T.highWaterMark||T.flowing&&T.length===0);){var Z=T.length;if(l("maybeReadMore read 0"),A.read(0),Z===T.length)break}T.readingMore=!1}k.prototype._read=function(A){P(this,new y("_read()"))},k.prototype.pipe=function(A,T){var Z=this,ne=this._readableState;switch(ne.pipesCount){case 0:ne.pipes=A;break;case 1:ne.pipes=[ne.pipes,A];break;default:ne.pipes.push(A);break}ne.pipesCount+=1,l("pipe count=%d opts=%j",ne.pipesCount,T);var pe=(!T||T.end!==!1)&&A!==process.stdout&&A!==process.stderr,me=pe?Ee:De;ne.endEmitted?process.nextTick(me):Z.once("end",me),A.on("unpipe",xe);function xe(C,b){l("onunpipe"),C===Z&&b&&b.hasUnpiped===!1&&(b.hasUnpiped=!0,dt())}function Ee(){l("onend"),A.end()}var ie=ce(Z);A.on("drain",ie);var Ne=!1;function dt(){l("cleanup"),A.removeListener("close",bt),A.removeListener("finish",$e),A.removeListener("drain",ie),A.removeListener("error",Me),A.removeListener("unpipe",xe),Z.removeListener("end",Ee),Z.removeListener("end",De),Z.removeListener("data",Te),Ne=!0,ne.awaitDrain&&(!A._writableState||A._writableState.needDrain)&&ie()}Z.on("data",Te);function Te(C){l("ondata");var b=A.write(C);l("dest.write",b),b===!1&&((ne.pipesCount===1&&ne.pipes===A||ne.pipesCount>1&&G(ne.pipes,A)!==-1)&&!Ne&&(l("false write response, pause",ne.awaitDrain),ne.awaitDrain++),Z.pause())}function Me(C){l("onerror",C),De(),A.removeListener("error",Me),t(A,"error")===0&&P(A,C)}S(A,"error",Me);function bt(){A.removeListener("finish",$e),De()}A.once("close",bt);function $e(){l("onfinish"),A.removeListener("close",bt),De()}A.once("finish",$e);function De(){l("unpipe"),Z.unpipe(A)}return A.emit("pipe",Z),ne.flowing||(l("pipe resume"),Z.resume()),A};function ce(A){return function(){var Z=A._readableState;l("pipeOnDrain",Z.awaitDrain),Z.awaitDrain&&Z.awaitDrain--,Z.awaitDrain===0&&t(A,"data")&&(Z.flowing=!0,U(A))}}k.prototype.unpipe=function(A){var T=this._readableState,Z={hasUnpiped:!1};if(T.pipesCount===0)return this;if(T.pipesCount===1)return A&&A!==T.pipes?this:(A||(A=T.pipes),T.pipes=null,T.pipesCount=0,T.flowing=!1,A&&A.emit("unpipe",this,Z),this);if(!A){var ne=T.pipes,pe=T.pipesCount;T.pipes=null,T.pipesCount=0,T.flowing=!1;for(var me=0;me<pe;me++)ne[me].emit("unpipe",this,{hasUnpiped:!1});return this}var xe=G(T.pipes,A);return xe===-1?this:(T.pipes.splice(xe,1),T.pipesCount-=1,T.pipesCount===1&&(T.pipes=T.pipes[0]),A.emit("unpipe",this,Z),this)},k.prototype.on=function(A,T){var Z=r.prototype.on.call(this,A,T),ne=this._readableState;return A==="data"?(ne.readableListening=this.listenerCount("readable")>0,ne.flowing!==!1&&this.resume()):A==="readable"&&!ne.endEmitted&&!ne.readableListening&&(ne.readableListening=ne.needReadable=!0,ne.flowing=!1,ne.emittedReadable=!1,l("on readable",ne.length,ne.reading),ne.length?oe(this):ne.reading||process.nextTick(V,this)),Z},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(A,T){var Z=r.prototype.removeListener.call(this,A,T);return A==="readable"&&process.nextTick(q,this),Z},k.prototype.removeAllListeners=function(A){var T=r.prototype.removeAllListeners.apply(this,arguments);return(A==="readable"||A===void 0)&&process.nextTick(q,this),T};function q(A){var T=A._readableState;T.readableListening=A.listenerCount("readable")>0,T.resumeScheduled&&!T.paused?T.flowing=!0:A.listenerCount("data")>0&&A.resume()}function V(A){l("readable nexttick read 0"),A.read(0)}k.prototype.resume=function(){var A=this._readableState;return A.flowing||(l("resume"),A.flowing=!A.readableListening,re(this,A)),A.paused=!1,this};function re(A,T){T.resumeScheduled||(T.resumeScheduled=!0,process.nextTick(de,A,T))}function de(A,T){l("resume",T.reading),T.reading||A.read(0),T.resumeScheduled=!1,A.emit("resume"),U(A),T.flowing&&!T.reading&&A.read(0)}k.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function U(A){var T=A._readableState;for(l("flow",T.flowing);T.flowing&&A.read()!==null;);}k.prototype.wrap=function(A){var T=this,Z=this._readableState,ne=!1;A.on("end",function(){if(l("wrapped end"),Z.decoder&&!Z.ended){var xe=Z.decoder.end();xe&&xe.length&&T.push(xe)}T.push(null)}),A.on("data",function(xe){if(l("wrapped data"),Z.decoder&&(xe=Z.decoder.write(xe)),!(Z.objectMode&&xe==null)&&!(!Z.objectMode&&(!xe||!xe.length))){var Ee=T.push(xe);Ee||(ne=!0,A.pause())}});for(var pe in A)this[pe]===void 0&&typeof A[pe]=="function"&&(this[pe]=function(Ee){return function(){return A[Ee].apply(A,arguments)}}(pe));for(var me=0;me<I.length;me++)A.on(I[me],this.emit.bind(this,I[me]));return this._read=function(xe){l("wrapped _read",xe),ne&&(ne=!1,A.resume())},this},typeof Symbol=="function"&&(k.prototype[Symbol.asyncIterator]=function(){return E===void 0&&(E=VD()),E(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(T){this._readableState&&(this._readableState.flowing=T)}}),k._fromList=z,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function z(A,T){if(T.length===0)return null;var Z;return T.objectMode?Z=T.buffer.shift():!A||A>=T.length?(T.decoder?Z=T.buffer.join(""):T.buffer.length===1?Z=T.buffer.first():Z=T.buffer.concat(T.length),T.buffer.clear()):Z=T.buffer.consume(A,T.decoder),Z}function M(A){var T=A._readableState;l("endReadable",T.endEmitted),T.endEmitted||(T.ended=!0,process.nextTick(R,T,A))}function R(A,T){if(l("endReadableNT",A.endEmitted,A.length),!A.endEmitted&&A.length===0&&(A.endEmitted=!0,T.readable=!1,T.emit("end"),A.autoDestroy)){var Z=T._writableState;(!Z||Z.autoDestroy&&Z.finished)&&T.destroy()}}typeof Symbol=="function"&&(k.from=function(A,T){return x===void 0&&(x=HD()),x(k,A,T)});function G(A,T){for(var Z=0,ne=A.length;Z<ne;Z++)if(A[Z]===T)return Z;return-1}return tf}var L0=Qr,Vs=Yn.codes,zD=Vs.ERR_METHOD_NOT_IMPLEMENTED,GD=Vs.ERR_MULTIPLE_CALLBACK,KD=Vs.ERR_TRANSFORM_ALREADY_TRANSFORMING,qD=Vs.ERR_TRANSFORM_WITH_LENGTH_0,Hs=jo();Bi(Qr,Hs);function YD(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new GD);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function Qr(e){if(!(this instanceof Qr))return new Qr(e);Hs.call(this,e),this._transformState={afterTransform:YD.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",JD)}function JD(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){M0(e,t,r)}):M0(this,null,null)}Qr.prototype.push=function(e,t){return this._transformState.needTransform=!1,Hs.prototype.push.call(this,e,t)},Qr.prototype._transform=function(e,t,r){r(new zD("_transform()"))},Qr.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},Qr.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},Qr.prototype._destroy=function(e,t){Hs.prototype._destroy.call(this,e,function(r){t(r)})};function M0(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new qD;if(e._transformState.transforming)throw new KD;return e.push(null)}var XD=Ri,F0=L0;Bi(Ri,F0);function Ri(e){if(!(this instanceof Ri))return new Ri(e);F0.call(this,e)}Ri.prototype._transform=function(e,t,r){r(null,e)};var rf;function ZD(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var j0=Yn.codes,QD=j0.ERR_MISSING_ARGS,eL=j0.ERR_STREAM_DESTROYED;function B0(e){if(e)throw e}function tL(e){return e.setHeader&&typeof e.abort=="function"}function rL(e,t,r,n){n=ZD(n);var o=!1;e.on("close",function(){o=!0}),rf===void 0&&(rf=Zu),rf(e,{readable:t,writable:r},function(a){if(a)return n(a);o=!0,n()});var i=!1;return function(a){if(!o&&!i){if(i=!0,tL(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(a||new eL("pipe"))}}}function R0(e){e()}function nL(e,t){return e.pipe(t)}function oL(e){return!e.length||typeof e[e.length-1]!="function"?B0:e.pop()}function iL(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=oL(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new QD("streams");var o,i=t.map(function(a,s){var l=s<t.length-1,u=s>0;return rL(a,l,u,function(f){o||(o=f),f&&i.forEach(R0),!l&&(i.forEach(R0),n(o))})});return t.reduce(nL)}var aL=iL;(function(e,t){t=e.exports=D0(),t.Stream=t,t.Readable=t,t.Writable=$0(),t.Duplex=jo(),t.Transform=L0,t.PassThrough=XD,t.finished=Zu,t.pipeline=aL})(o0,o0.exports);var sL=e=>new Promise((t,r)=>{e((n,o)=>{n?r(n):t(o)})}),U0=class extends Error{constructor(e,t){super(e?`Timeout [${e.toLocaleString()}ms]${t===void 0?"":`: ${t}`}`:"Timeout")}},lL=async(e,t,r)=>{let n;const o=r===void 0||typeof r=="string"?new U0(t,r):r,i=new Promise((s,l)=>{n=setTimeout(()=>{l(o)},t),cL(n)}),a=typeof e=="function"?sL(e):e;return await Promise.race([a,i]).finally(()=>{clearTimeout(n)})},cL=e=>{typeof e=="object"&&"unref"in e&&e.unref()},uL=class{constructor(e={autoReset:!1}){this._options=e,this.reset()}async wait({timeout:e}={}){return e?lL(this._promise,e,new U0(e)):this._promise}wake(e){return this._wake(e),this._options.autoReset?this.reset():this}reset(){return this._promise=new Promise(e=>{this._wake=e}),this}throw(e){return this._wake(Promise.reject(e)),this._options.autoReset?this.reset():this}},fL=class xr extends Bs{constructor(t,r){super(n=>this._subscribe(n)),this._value=r,this._observers=new Set,this._completed=new uL,this._handlers={next:n=>{this._value=n,this._observers.forEach(o=>o.next?.(n))},error:n=>{this._observers.forEach(o=>o.error?.(n))},complete:()=>{this._completed.wake(),this._observers.forEach(n=>n.complete?.())}},this._observable=typeof t=="function"?new Bs(t):t,this._observable.subscribe(this._handlers)}static from(t,r){if("emit"in t)return new xr(o=>{t.on(i=>{o.next(i)})},r);const n=Bs.from(t);return new xr(n,r)}static of(...t){return new xr(Bs.of(...t.slice(1)),t[0])}static empty(){return dL}get(){if(this._value===void 0)throw new Error("MulticastObservable is not initialized.");return this._value}async wait({timeout:t}={}){return await this._completed.wait({timeout:t}),this.get()}forEach(t){return this._observable.forEach(t)}map(t){return new xr(this._observable.map(t),this._value&&t(this._value))}filter(t){return new xr(this._observable.filter(t),this._value&&t(this._value)?this._value:void 0)}reduce(t,r){return new xr(r?this._observable.reduce(t,r):this._observable.reduce(t),r??this._value)}flatMap(t){return new xr(this._observable.flatMap(t),this._value&&t(this._value).get())}concat(...t){return new xr(this._observable.concat(...t),this._value)}losslessConcat(t,...r){const n=r.filter(i=>i instanceof xr),o=t(this._value,n.map(i=>i.get()));return new xr(this._observable.concat(...r),o)}_subscribe(t){return this._observers.has(t)||this._observers.add(t),this._value!==void 0&&t.next?.(this._value),()=>{this._observers.delete(t)}}},dL=fL.of(null),W0=typeof process<"u"&&!!process.env.DX_TRACK_LEAKS,V0=new Set,pL=()=>{if(W0){console.log(`Leaked resources ${V0.size}:`);for(const e of V0)console.log(`- ${e.name} at`),console.log(e.openStack.getStack(1)),console.log()}};W0&&(global.dxDumpLeaks=pL);var H0="/home/runner/work/dxos/dxos/packages/sdk/react-client/src/invitations/useInvitationStatus.ts",nf=e=>{const[t,r]=c.useReducer((a,s)=>(Qe("useInvitationStatus",{action:s},{F:H0,L:79,S:void 0,C:(l,u)=>l(...u)}),{...a,status:s.status,result:s.status===we.State.SUCCESS?s.result:a.result,...s.status===we.State.ERROR&&{error:s.error},...(s.status===we.State.ERROR||s.status===we.State.CANCELLED||s.status===we.State.TIMEOUT)&&{haltedAt:typeof a.haltedAt>"u"?s.haltedAt:a.haltedAt},observable:s.status===we.State.CONNECTING?s.observable??a.observable:a.observable}),null,a=>({status:we.State.INIT,result:{spaceKey:null,identityKey:null,swarmKey:null,target:null},observable:e}));c.useEffect(()=>{const a=u=>{switch(u.state){case we.State.CONNECTED:case we.State.READY_FOR_AUTHENTICATION:case we.State.AUTHENTICATING:{r({status:u.state});break}case we.State.SUCCESS:{r({status:u.state,result:{spaceKey:u.spaceKey||null,identityKey:u.identityKey||null,swarmKey:u.swarmKey||null,target:u.target||null}});break}case we.State.CANCELLED:case we.State.TIMEOUT:{r({status:u.state,haltedAt:t.status});break}}},s=t.observable?.subscribe(a,u=>{r({status:we.State.ERROR,error:u,haltedAt:t.status})}),l=t.observable?.get();return l&&a(l),()=>s?.unsubscribe()},[t.observable,t.status]);const n=c.useCallback(a=>{r({status:we.State.CONNECTING,observable:a})},[]),o=c.useCallback(a=>(Qe("authenticating...",{authCode:a},{F:H0,L:163,S:void 0,C:(s,l)=>s(...l)}),t.observable.authenticate(a)),[t.observable]),i=c.useCallback(async()=>t.observable?.cancel(),[t.observable]);return c.useMemo(()=>{const a=t.observable?.get();return{status:t.status,haltedAt:t.haltedAt,result:t.result,error:t.error,cancel:i,connect:n,authenticate:o,id:a?.invitationId,invitationCode:a?an.InvitationEncoder.encode(a):void 0,authCode:a?.authCode,authMethod:a?.authMethod,type:a?.type}},[t,i,n,o])};const hL=new Map([[we.State.ERROR,-3],[we.State.TIMEOUT,-2],[we.State.CANCELLED,-1],[we.State.INIT,0],[we.State.CONNECTING,1],[we.State.CONNECTED,2],[we.State.READY_FOR_AUTHENTICATION,3],[we.State.AUTHENTICATING,4],[we.State.SUCCESS,5]]);var z0=9007199254740991,gL="[object Arguments]",vL="[object Function]",mL="[object GeneratorFunction]",of="[object Map]",bL="[object Object]",G0="[object Promise]",af="[object Set]",yL="[object String]",K0="[object WeakMap]",q0="[object DataView]",wL=/[\\^$.*+?()[\]{}|]/g,_L=/^\[object .+?Constructor\]$/,EL=/^(?:0|[1-9]\d*)$/,sf="\\ud800-\\udfff",Y0="\\u0300-\\u036f\\ufe20-\\ufe23",J0="\\u20d0-\\u20f0",X0="\\ufe0e\\ufe0f",xL="["+sf+"]",lf="["+Y0+J0+"]",cf="\\ud83c[\\udffb-\\udfff]",SL="(?:"+lf+"|"+cf+")",Z0="[^"+sf+"]",Q0="(?:\\ud83c[\\udde6-\\uddff]){2}",ey="[\\ud800-\\udbff][\\udc00-\\udfff]",ty="\\u200d",ry=SL+"?",ny="["+X0+"]?",$L="(?:"+ty+"(?:"+[Z0,Q0,ey].join("|")+")"+ny+ry+")*",CL=ny+ry+$L,AL="(?:"+[Z0+lf+"?",lf,Q0,ey,xL].join("|")+")",OL=RegExp(cf+"(?="+cf+")|"+AL+CL,"g"),TL=RegExp("["+ty+sf+Y0+J0+X0+"]"),IL=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,PL=typeof self=="object"&&self&&self.Object===Object&&self,Jn=IL||PL||Function("return this")();function kL(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function NL(e){return e.split("")}function DL(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function LL(e,t){return kL(t,function(r){return e[r]})}function ML(e,t){return e?.[t]}function FL(e){return TL.test(e)}function jL(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function BL(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function RL(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function UL(e,t){return function(r){return e(t(r))}}function WL(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}function VL(e){return FL(e)?HL(e):NL(e)}function HL(e){return e.match(OL)||[]}var zL=Function.prototype,zs=Object.prototype,uf=Jn["__core-js_shared__"],oy=function(){var e=/[^.]+$/.exec(uf&&uf.keys&&uf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),iy=zL.toString,Gs=zs.hasOwnProperty,Ui=zs.toString,GL=RegExp("^"+iy.call(Gs).replace(wL,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ay=Jn.Symbol,ff=ay?ay.iterator:void 0,KL=zs.propertyIsEnumerable,qL=UL(Object.keys,Object),df=Wi(Jn,"DataView"),pf=Wi(Jn,"Map"),hf=Wi(Jn,"Promise"),gf=Wi(Jn,"Set"),vf=Wi(Jn,"WeakMap"),YL=Zn(df),JL=Zn(pf),XL=Zn(hf),ZL=Zn(gf),QL=Zn(vf);function e7(e,t){var r=sy(e)||l7(e)?DL(e.length,String):[],n=r.length,o=!!n;for(var i in e)(t||Gs.call(e,i))&&!(o&&(i=="length"||i7(i,n)))&&r.push(i);return r}function t7(e){return Ui.call(e)}function r7(e){if(!cy(e)||a7(e))return!1;var t=ly(e)||jL(e)?GL:_L;return t.test(Zn(e))}function n7(e){if(!s7(e))return qL(e);var t=[];for(var r in Object(e))Gs.call(e,r)&&r!="constructor"&&t.push(r);return t}function o7(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Wi(e,t){var r=ML(e,t);return r7(r)?r:void 0}var Xn=t7;(df&&Xn(new df(new ArrayBuffer(1)))!=q0||pf&&Xn(new pf)!=of||hf&&Xn(hf.resolve())!=G0||gf&&Xn(new gf)!=af||vf&&Xn(new vf)!=K0)&&(Xn=function(e){var t=Ui.call(e),r=t==bL?e.constructor:void 0,n=r?Zn(r):void 0;if(n)switch(n){case YL:return q0;case JL:return of;case XL:return G0;case ZL:return af;case QL:return K0}return t});function i7(e,t){return t=t??z0,!!t&&(typeof e=="number"||EL.test(e))&&e>-1&&e%1==0&&e<t}function a7(e){return!!oy&&oy in e}function s7(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||zs;return e===r}function Zn(e){if(e!=null){try{return iy.call(e)}catch{}try{return e+""}catch{}}return""}function l7(e){return c7(e)&&Gs.call(e,"callee")&&(!KL.call(e,"callee")||Ui.call(e)==gL)}var sy=Array.isArray;function mf(e){return e!=null&&u7(e.length)&&!ly(e)}function c7(e){return uy(e)&&mf(e)}function ly(e){var t=cy(e)?Ui.call(e):"";return t==vL||t==mL}function u7(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=z0}function cy(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function uy(e){return!!e&&typeof e=="object"}function f7(e){return typeof e=="string"||!sy(e)&&uy(e)&&Ui.call(e)==yL}function d7(e){if(!e)return[];if(mf(e))return f7(e)?VL(e):o7(e);if(ff&&e[ff])return BL(e[ff]());var t=Xn(e),r=t==of?RL:t==af?WL:h7;return r(e)}function p7(e){return mf(e)?e7(e):n7(e)}function h7(e){return e?LL(e,p7(e)):[]}var g7=d7;const fy=In(g7)("👹👻👽🤖🎃🦾🦿🦷👣👁️🧶👑🐒🦆🦉🐴🦄🐝🦋🐞🪲🐢🦎🦕🦑🦀🐠🐬🐋🦭🐅🐆🦓🦍🦧🐘🐫🦒🦘🦬🐖🐏🦌🐕🐈🐓🦚🦜🦢🦩🦦🐁🐿️🌵🌲🌳🪵🌱🍁🪺🍄🐚🪸🪨🌾🌷🌻☀️🌙🪐⭐️⚡️☄️🔥🌈☁️💧⛱️🌊🍎🍋🍉🍇🫐🍈🍒🍑🥭🍍🥥🥝🥑🌶️🌽🥕🍬🥜🫖☕️🍵🧊🧂🏔️⚓️🛟🏝️🛶🚀🛰️⛲️🏰🚲⛺️🎙️🧲⚙️🔩🔮🔭🔬🧬🌡️🧺🛎️🔑🪑🧸🎈🎀🎊♻️🎵"),bf=e=>fy[parseInt(e,16)%fy.length],dy=e=>{const{code:t,large:r,classNames:n}=e,o=t?.length??0,i=t?.slice(0,o/2),a=t?.slice(o/2),s=()=>{navigator.clipboard.writeText(t??"")};return c.createElement("span",{className:ue(r?"text-6xl":"text-2xl","font-mono pli-2.5 flex gap-1.5 rounded cursor-pointer",n),onClick:s},c.createElement("span",null,i),c.createElement("span",null,a))},v7=e=>{const{invitation:t}=e,r=nf(t);return c.createElement(b7,{...e,invitationStatus:r})},Vi={size:10,variant:"circle"},m7=({animation:e,status:t})=>{const{tx:r}=Ae();return c.createElement(c.Fragment,null,c.createElement("span",{role:"none",className:ue("absolute inline-start-1 inline-end-auto opacity-20",We(Vi.size))},c.createElement("span",{role:"none",className:r("avatar.ring","avatar__ring",{...Vi,status:t,animation:e}),style:{animationDelay:"400ms"}})),c.createElement("span",{role:"none",className:ue("absolute inline-start-2 inline-end-auto opacity-50",We(Vi.size))},c.createElement("span",{role:"none",className:r("avatar.ring","avatar__ring",{...Vi,status:t,animation:e}),style:{animationDelay:"200ms"}})))},b7=({invitation:e,invitationStatus:t,send:r,onClickRemove:n,createInvitationUrl:o})=>{const{t:i}=rt("os"),{cancel:a,status:s,invitationCode:l,authCode:u,type:f}=t,d=!([we.State.ERROR,we.State.TIMEOUT,we.State.CANCELLED].indexOf(s)>=0),p=f===we.Type.MULTIUSE||[we.State.INIT,we.State.CONNECTING,we.State.CONNECTED].indexOf(s)>=0,h=s===we.State.READY_FOR_AUTHENTICATION,g=c.useCallback(()=>n?.(e),[e,n]),v=l&&o(l),y=e?.get().invitationId,m=[we.State.INIT,we.State.CONNECTING,we.State.CONNECTED,we.State.READY_FOR_AUTHENTICATION,we.State.AUTHENTICATING].includes(s)?"pulse":"none",w=[we.State.ERROR,we.State.TIMEOUT,we.State.CANCELLED].includes(s),E=[we.State.CONNECTED,we.State.READY_FOR_AUTHENTICATION,we.State.AUTHENTICATING,we.State.SUCCESS].includes(s),x=w?"error":E?"active":"inactive";return c.createElement(Nc.Root,{id:l,classNames:"flex gap-2 pis-3 pie-1 items-center relative"},c.createElement(Nc.Heading,{classNames:"sr-only"},i(f===we.Type.MULTIUSE?"invite many list item label":"invite one list item label")),f===we.Type.MULTIUSE&&c.createElement(m7,{status:x,animation:m}),c.createElement(yr.Root,null,c.createElement(Ot.Root,{...Vi,animation:m,status:x},c.createElement(yr.Trigger,{asChild:!0},c.createElement(Ot.Frame,{tabIndex:0,classNames:[jr,"relative rounded-full"]},c.createElement(Ot.Fallback,{text:bf(y)})))),c.createElement(yr.Portal,null,c.createElement(yr.Content,{side:"left",classNames:"z-[70]"},i(f===we.Type.MULTIUSE?"invite many qr label":"invite one qr label"),c.createElement(yr.Arrow,null)))),p&&v?c.createElement(c.Fragment,null,c.createElement(br,{variant:"ghost",classNames:"grow justify-start font-medium",onClick:()=>r({type:"selectInvitation",invitation:e}),"data-testid":"show-qrcode"},c.createElement("span",null,i("open share panel label"))),c.createElement(xk,{variant:"ghost",value:v})):h?c.createElement(dy,{code:u,classNames:"grow"}):s===we.State.CONNECTING?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Connecting..."):s===we.State.AUTHENTICATING?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Authenticating..."):s===we.State.ERROR||s===we.State.TIMEOUT?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Failed"):s===we.State.CANCELLED?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Cancelled"):s===we.State.SUCCESS?c.createElement("span",{className:"pli-2 grow truncate"},"User joined"):c.createElement("span",{className:"grow"}," "),d?c.createElement(br,{variant:"ghost",classNames:"flex gap-1",onClick:a,"data-testid":"cancel-invitation"},c.createElement("span",{className:"sr-only"},i("cancel invitation label")),c.createElement(ze.X,{className:We(5),weight:"bold"})):c.createElement(br,{variant:"ghost",classNames:"flex gap-1",onClick:g,"data-testid":"remove-invitation"},c.createElement("span",{className:"sr-only"},i("remove invitation label")),c.createElement(ze.X,{className:We(5),weight:"bold"})))},y7=({invitations:e,send:t,...r})=>{const{className:n,InvitationListItem:o=v7}=r;return c.createElement(kc,{classNames:ue("flex flex-col gap-2",n)},e.map(i=>{const a=i.get().invitationId;return c.createElement(o,{key:a,send:t,invitation:i,...r})}))},yf=e=>{const t=e.variant??"default";return[e.disabled?"":t==="default"?"bg-neutral-25 hover:bg-white hover:text-primary-500 active:bg-neutral-25 dark:active:bg-neutral-800":t==="ghost"?"active:bg-neutral-125 dark:active:bg-neutral-800":t==="primary"?"active:bg-primary-700 dark:active:bg-primary-500":""]},w7={noopAction:{label:"No-op",description:"",icon:ze.Placeholder,onClick:()=>{}}},_7=c.forwardRef((e,t)=>{const{classNames:r,variant:n,isFull:o=!0,actions:i=w7,activeAction:a,onChangeActiveAction:s,defaultActiveAction:l,...u}=e,[f=Object.keys(i)[0],d]=Gr({prop:a,onChange:s,defaultProp:l}),p=i[f]??{},{t:h}=rt("os");return c.createElement("div",{role:"none",className:ue("mbs-2 flex gap-px items-center",o&&"is-full")},c.createElement(br,{...u,classNames:["bs-11 flex-1 min-is-0 flex gap-2 rounded-ie-none",r,...yf(e)],ref:t,variant:n,onClick:p.onClick},p.icon&&c.createElement(p.icon,null),c.createElement("span",null,p.label)),c.createElement(Un.Root,null,c.createElement(Un.Trigger,{asChild:!0},c.createElement(br,{classNames:["bs-11 flex-none rounded-is-none",r,...yf(e)]},c.createElement("span",{className:"sr-only"},h("invite options label")),c.createElement(ze.CaretDown,null))),c.createElement(Un.Content,null,c.createElement(Un.Viewport,null,Object.entries(i).map(([g,v])=>c.createElement(Un.CheckboxItem,{key:g,"aria-labelledby":`${g}__label`,"aria-describedby":`${g}__description`,checked:f===g,onCheckedChange:y=>y&&d(g),classNames:"gap-2"},v.icon&&c.createElement(v.icon,{className:We(5)}),c.createElement("div",{role:"none",className:"flex-1 min-is-0 space-b-1"},c.createElement("p",{id:`${g}__label`},v.label),v.description&&c.createElement("p",{id:`${g}__description`,className:At},v.description)),c.createElement(Un.ItemIndicator,{asChild:!0},c.createElement(ze.Check,null))))),c.createElement(Un.Arrow,null))))}),at=c.forwardRef((e,t)=>{const{children:r,classNames:n,variant:o,isFull:i=!0,...a}=e;return c.createElement(br,{...a,classNames:[i&&"is-full","bs-11 flex gap-2 mbs-2",...yf(e),n],ref:t,variant:o},r)}),Ht=c.forwardRef(({classNames:e,children:t,...r},n)=>c.createElement("div",{...r,className:ue("flex flex-col gap-2 mbs-2",Array.isArray(t)&&t.length>1?"justify-between":"justify-center",e),ref:n},t)),py=({onDone:e,...t})=>{const{t:r}=rt("os");return c.createElement(br,{variant:"ghost",classNames:ue("plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),onClick:()=>e?.(),...t},c.createElement(ze.X,{weight:"bold",className:We(4)}),c.createElement("span",{className:"sr-only"},r("exit label")))},wf=({text:e,className:t})=>c.createElement("div",{role:"none",className:ue(We(14),"rounded relative pointer-events-none",t)},c.createElement("svg",{viewBox:`0 0 ${14*4} ${14*4}`,width:14*4,height:14*4},c.createElement("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",baselineShift:"-0.25rem",fontSize:"2.25rem"},e))),E7=e=>{const{children:t}=e;return c.createElement("div",{role:"none",className:"absolute inset-0 flex items-center justify-center"},t)},_f=c.forwardRef(({titleId:e,title:t,titleSrOnly:r,children:n,corner:o},i)=>c.createElement("div",{role:"none",className:"pbe-2 relative",ref:i},o,c.createElement("h1",{...!r&&{id:e},className:ue(At,"text-center mlb-2",r&&"invisible")},t),r&&c.createElement("span",{id:e},t),n)),hy=e=>{const{children:t}=e;return c.createElement("span",{className:ue(At,"text-center mli-6 whitespace-normal")},t)},Hi=({validationMessage:e,label:t,...r})=>c.createElement(Fr.Root,null,c.createElement(Fr.Label,null,t),c.createElement(Fr.TextInput,{...r,classNames:"plb-3 mbs-2 text-center"}),c.createElement(Fr.DescriptionAndValidation,null,e&&c.createElement(Fr.Validation,null,e))),_r=c.forwardRef(({children:e,className:t,...r},n)=>c.createElement("h2",{...r,className:ue("font-normal text-sm mbe-4 mli-1 text-center",t),ref:n},e));var x7=typeof WeakRef<"u",gy=class{constructor(e){x7&&typeof e=="object"?this._weakRef=new WeakRef(e):this._instance=e}deref(){var e,t;let r;return this._weakRef?(r=(e=this._weakRef)==null?void 0:e.deref(),r||delete this._weakRef):(r=this._instance,(t=r?.isDisposed)!=null&&t.call(r)&&delete this._instance),r}},zi="keyborg:focusin";function S7(e){const t=e.HTMLElement,r=t.prototype.focus;let n=!1;return t.prototype.focus=function(){n=!0},e.document.createElement("button").focus(),t.prototype.focus=r,n}var Ef=!1;function Bo(e){const t=e.focus;t.__keyborgNativeFocus?t.__keyborgNativeFocus.call(e):e.focus()}function $7(e){const t=e;Ef||(Ef=S7(t));const r=t.HTMLElement.prototype.focus;if(r.__keyborgNativeFocus)return;t.HTMLElement.prototype.focus=a;const n=s=>{const l=s.relatedTarget,u=s.currentTarget;u.contains(l)||(u.removeEventListener("focusin",o,!0),u.removeEventListener("focusout",n,!0))},o=s=>{var l;const u=s.target;if(!u)return;if(u.shadowRoot){u.shadowRoot.addEventListener("focusin",o,!0),u.shadowRoot.addEventListener("focusout",n,!0);return}const f={relatedTarget:s.relatedTarget||void 0},d=new CustomEvent(zi,{cancelable:!0,bubbles:!0,composed:!0,detail:f});d.details=f,(Ef||i.lastFocusedProgrammatically)&&(f.isFocusedProgrammatically=u===((l=i.lastFocusedProgrammatically)==null?void 0:l.deref()),i.lastFocusedProgrammatically=void 0),u.dispatchEvent(d)},i=t.__keyborgData={focusInHandler:o};t.document.addEventListener("focusin",t.__keyborgData.focusInHandler,!0);function a(){const s=t.__keyborgData;return s&&(s.lastFocusedProgrammatically=new gy(this)),r.apply(this,arguments)}a.__keyborgNativeFocus=r}function C7(e){const t=e,r=t.HTMLElement.prototype,n=r.focus.__keyborgNativeFocus,o=t.__keyborgData;o&&(t.document.removeEventListener("focusin",o.focusInHandler,!0),delete t.__keyborgData),n&&(r.focus=n)}var A7=500,vy=0,O7=class{constructor(){this.__keyborgCoreRefs={},this._isNavigatingWithKeyboard=!1}add(e){const t=e.id;t in this.__keyborgCoreRefs||(this.__keyborgCoreRefs[t]=new gy(e))}remove(e){delete this.__keyborgCoreRefs[e],Object.keys(this.__keyborgCoreRefs).length===0&&(this._isNavigatingWithKeyboard=!1)}setVal(e){if(this._isNavigatingWithKeyboard!==e){this._isNavigatingWithKeyboard=e;for(const t of Object.keys(this.__keyborgCoreRefs)){const n=this.__keyborgCoreRefs[t].deref();n?n.update(e):this.remove(t)}}}getVal(){return this._isNavigatingWithKeyboard}},Ur=new O7,T7=class{constructor(e,t){this._onFocusIn=n=>{if(this._isMouseUsedTimer||Ur.getVal())return;const o=n.detail;o.relatedTarget&&(o.isFocusedProgrammatically||o.isFocusedProgrammatically===void 0||Ur.setVal(!0))},this._onMouseDown=n=>{if(n.buttons===0||n.clientX===0&&n.clientY===0&&n.screenX===0&&n.screenY===0)return;const o=this._win;o&&(this._isMouseUsedTimer&&o.clearTimeout(this._isMouseUsedTimer),this._isMouseUsedTimer=o.setTimeout(()=>{delete this._isMouseUsedTimer},1e3)),Ur.setVal(!1)},this._onKeyDown=n=>{Ur.getVal()?this._shouldDismissKeyboardNavigation(n)&&this._scheduleDismiss():this._shouldTriggerKeyboardNavigation(n)&&Ur.setVal(!0)},this.id="c"+ ++vy,this._win=e;const r=e.document;if(t){const n=t.triggerKeys,o=t.dismissKeys;n?.length&&(this._triggerKeys=new Set(n)),o?.length&&(this._dismissKeys=new Set(o))}r.addEventListener(zi,this._onFocusIn,!0),r.addEventListener("mousedown",this._onMouseDown,!0),e.addEventListener("keydown",this._onKeyDown,!0),$7(e),Ur.add(this)}dispose(){const e=this._win;if(e){this._isMouseUsedTimer&&(e.clearTimeout(this._isMouseUsedTimer),this._isMouseUsedTimer=void 0),this._dismissTimer&&(e.clearTimeout(this._dismissTimer),this._dismissTimer=void 0),C7(e);const t=e.document;t.removeEventListener(zi,this._onFocusIn,!0),t.removeEventListener("mousedown",this._onMouseDown,!0),e.removeEventListener("keydown",this._onKeyDown,!0),delete this._win,Ur.remove(this.id)}}isDisposed(){return!!this._win}update(e){var t,r;const n=(r=(t=this._win)==null?void 0:t.__keyborg)==null?void 0:r.refs;if(n)for(const o of Object.keys(n))xf.update(n[o],e)}_shouldTriggerKeyboardNavigation(e){var t;if(e.key==="Tab")return!0;const r=(t=this._win)==null?void 0:t.document.activeElement,n=!this._triggerKeys||this._triggerKeys.has(e.keyCode),o=r&&(r.tagName==="INPUT"||r.tagName==="TEXTAREA"||r.isContentEditable);return n&&!o}_shouldDismissKeyboardNavigation(e){var t;return(t=this._dismissKeys)==null?void 0:t.has(e.keyCode)}_scheduleDismiss(){const e=this._win;if(e){this._dismissTimer&&(e.clearTimeout(this._dismissTimer),this._dismissTimer=void 0);const t=e.document.activeElement;this._dismissTimer=e.setTimeout(()=>{this._dismissTimer=void 0;const r=e.document.activeElement;t&&r&&t===r&&Ur.setVal(!1)},A7)}}},xf=class F1{constructor(t,r){this._cb=[],this._id="k"+ ++vy,this._win=t;const n=t.__keyborg;n?(this._core=n.core,n.refs[this._id]=this):(this._core=new T7(t,r),t.__keyborg={core:this._core,refs:{[this._id]:this}})}static create(t,r){return new F1(t,r)}static dispose(t){t.dispose()}static update(t,r){t._cb.forEach(n=>n(r))}dispose(){var t;const r=(t=this._win)==null?void 0:t.__keyborg;r?.refs[this._id]?(delete r.refs[this._id],Object.keys(r.refs).length===0&&(r.core.dispose(),delete this._win.__keyborg)):process.env.NODE_ENV!=="production"&&console.error(`Keyborg instance ${this._id} is being disposed incorrectly.`),this._cb=[],delete this._core,delete this._win}isNavigatingWithKeyboard(){return Ur.getVal()}subscribe(t){this._cb.push(t)}unsubscribe(t){const r=this._cb.indexOf(t);r>=0&&this._cb.splice(r,1)}setVal(t){Ur.setVal(t)}};function I7(e,t){return xf.create(e,t)}function P7(e){xf.dispose(e)}/*!
|
|
112
|
+
`),cL=Symbol("kDebugInfoProperties");(class{constructor(e,t){this.constr=e,this.parent=t}getInfo(){if(!this.instance)return{};const e=this.constr.prototype[cL]??[],t={};for(const r of e)t[r]=this.instance[r];return t}[_r.custom](){return{className:this.constr.name,info:this.getInfo(),parent:this.parent}}});var uL=class extends Error{constructor(){super("Context disposed.")}};function fL(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}var rf="/home/runner/work/dxos/dxos/packages/common/context/src/context.ts",dL=300,x0=class aw{constructor({onError:t=o=>{if(!(o instanceof uL))throw this.dispose(),o},attributes:r={},parent:n}={}){this._disposeCallbacks=[],this._isDisposed=!1,this._disposePromise=void 0,this._parent=null,this.maxSafeDisposeCallbacks=dL,this._onError=t,this._attributes=r,n!==void 0&&(this._parent=n)}get disposed(){return this._isDisposed}get disposeCallbacksLength(){return this._disposeCallbacks.length}onDispose(t){return this._isDisposed&&(async()=>{try{await t()}catch(r){Xe.catch(r,void 0,{F:rf,L:82,S:this,C:(n,o)=>n(...o)})}})(),this._disposeCallbacks.push(t),this._disposeCallbacks.length>this.maxSafeDisposeCallbacks&&Xe.warn("Context has a large number of dispose callbacks. This might be a memory leak.",{count:this._disposeCallbacks.length,safeThreshold:this.maxSafeDisposeCallbacks},{F:rf,L:89,S:this,C:(r,n)=>r(...n)}),()=>{const r=this._disposeCallbacks.indexOf(t);r!==-1&&this._disposeCallbacks.splice(r,1)}}dispose(){if(this._disposePromise)return this._disposePromise;this._isDisposed=!0;const t=[];for(const r of this._disposeCallbacks.reverse())t.push((async()=>{try{await r()}catch(n){Xe.catch(n,void 0,{F:rf,L:124,S:this,C:(o,i)=>o(...i)})}})());return this._disposeCallbacks.length=0,this._disposePromise=Promise.all(t).then(()=>{})}raise(t){if(!this._isDisposed)try{this._onError(t)}catch(r){Promise.reject(r)}}derive({onError:t,attributes:r}={}){const n=new aw({onError:async i=>{if(!t)this.raise(i);else try{await t(i)}catch{this.raise(i)}},attributes:r}),o=this.onDispose(()=>n.dispose());return n.onDispose(o),n}getAttribute(t){if(t in this._attributes)return this._attributes[t];if(this._parent!==null)return this._parent.getAttribute(t)}};x0=fL([BD("Context")],x0);var Gs={};Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.Observable=void 0;const S0=e=>!!Symbol[e],nf=e=>S0(e)?Symbol[e]:"@@"+e,pL=nf("iterator"),of=nf("observable"),$0=nf("species");function Ks(e,t){let r=e[t];if(r!=null){if(typeof r!="function")throw new TypeError(r+" is not a function");return r}}function Ki(e){let t=e.constructor;return t!==void 0&&(t=t[$0],t===null&&(t=void 0)),t!==void 0?t:Ys}function hL(e){return e instanceof Ys}function Ho(e){Ho.log?Ho.log(e):setTimeout(()=>{throw e})}function qs(e){Promise.resolve().then(()=>{try{e()}catch(t){Ho(t)}})}function C0(e){let t=e._cleanup;if(t!==void 0&&(e._cleanup=void 0,!!t))try{if(typeof t=="function")t();else{let r=Ks(t,"unsubscribe");r&&r.call(t)}}catch(r){Ho(r)}}function af(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function gL(e){let t=e._queue;if(t){e._queue=void 0,e._state="ready";for(let r=0;r<t.length&&(A0(e,t[r].type,t[r].value),e._state!=="closed");++r);}}function A0(e,t,r){e._state="running";let n=e._observer;try{let o=Ks(n,t);switch(t){case"next":o&&o.call(n,r);break;case"error":if(af(e),o)o.call(n,r);else throw r;break;case"complete":af(e),o&&o.call(n);break}}catch(o){Ho(o)}e._state==="closed"?C0(e):e._state==="running"&&(e._state="ready")}function sf(e,t,r){if(e._state!=="closed"){if(e._state==="buffering"){e._queue.push({type:t,value:r});return}if(e._state!=="ready"){e._state="buffering",e._queue=[{type:t,value:r}],qs(()=>gL(e));return}A0(e,t,r)}}class vL{constructor(t,r){this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";let n=this,o={get closed(){return n._state==="closed"},next(i){sf(n,"next",i)},error(i){sf(n,"error",i)},complete(){sf(n,"complete")}};try{this._cleanup=r.call(void 0,o)}catch(i){o.error(i)}this._state==="initializing"&&(this._state="ready")}get closed(){return this._state==="closed"}unsubscribe(){this._state!=="closed"&&(af(this),C0(this))}}let Ys=class Ll{constructor(t){if(!(this instanceof Ll))throw new TypeError("Observable cannot be called as a function");if(typeof t!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=t}subscribe(t){return(typeof t!="object"||t===null)&&(t={next:t,error:arguments[1],complete:arguments[2]}),new vL(t,this._subscriber)}forEach(t){return new Promise((r,n)=>{if(typeof t!="function"){n(new TypeError(t+" is not a function"));return}function o(){i.unsubscribe(),r()}let i=this.subscribe({next(a){try{t(a,o)}catch(s){n(s),i.unsubscribe()}},error:n,complete:r})})}map(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Ki(this);return new r(n=>this.subscribe({next(o){try{o=t(o)}catch(i){return n.error(i)}n.next(o)},error(o){n.error(o)},complete(){n.complete()}}))}filter(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Ki(this);return new r(n=>this.subscribe({next(o){try{if(!t(o))return}catch(i){return n.error(i)}n.next(o)},error(o){n.error(o)},complete(){n.complete()}}))}reduce(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Ki(this),n=arguments.length>1,o=!1,a=arguments[1];return new r(s=>this.subscribe({next(l){let u=!o;if(o=!0,!u||n)try{a=t(a,l)}catch(f){return s.error(f)}else a=l},error(l){s.error(l)},complete(){if(!o&&!n)return s.error(new TypeError("Cannot reduce an empty sequence"));s.next(a),s.complete()}}))}async all(){let t=[];return await this.forEach(r=>t.push(r)),t}concat(...t){let r=Ki(this);return new r(n=>{let o,i=0;function a(s){o=s.subscribe({next(l){n.next(l)},error(l){n.error(l)},complete(){i===t.length?(o=void 0,n.complete()):a(r.from(t[i++]))}})}return a(this),()=>{o&&(o.unsubscribe(),o=void 0)}})}flatMap(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Ki(this);return new r(n=>{let o=[],i=this.subscribe({next(s){if(t)try{s=t(s)}catch(u){return n.error(u)}let l=r.from(s).subscribe({next(u){n.next(u)},error(u){n.error(u)},complete(){let u=o.indexOf(l);u>=0&&o.splice(u,1),a()}});o.push(l)},error(s){n.error(s)},complete(){a()}});function a(){i.closed&&o.length===0&&n.complete()}return()=>{o.forEach(s=>s.unsubscribe()),i.unsubscribe()}})}[of](){return this}static from(t){let r=typeof this=="function"?this:Ll;if(t==null)throw new TypeError(t+" is not an object");let n=Ks(t,of);if(n){let o=n.call(t);if(Object(o)!==o)throw new TypeError(o+" is not an object");return hL(o)&&o.constructor===r?o:new r(i=>o.subscribe(i))}if(S0("iterator")&&(n=Ks(t,pL),n))return new r(o=>{qs(()=>{if(!o.closed){for(let i of n.call(t))if(o.next(i),o.closed)return;o.complete()}})});if(Array.isArray(t))return new r(o=>{qs(()=>{if(!o.closed){for(let i=0;i<t.length;++i)if(o.next(t[i]),o.closed)return;o.complete()}})});throw new TypeError(t+" is not observable")}static of(...t){let r=typeof this=="function"?this:Ll;return new r(n=>{qs(()=>{if(!n.closed){for(let o=0;o<t.length;++o)if(n.next(t[o]),n.closed)return;n.complete()}})})}static get[$0](){return this}};Gs.Observable=Ys,Object.defineProperty(Ys,Symbol("extensions"),{value:{symbol:of,hostReportError:Ho},configurable:!0});var mL=Gs.Observable;const Js=un(mL);var O0={exports:{}},lf={exports:{}},zo=typeof Reflect=="object"?Reflect:null,T0=zo&&typeof zo.apply=="function"?zo.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},Xs;zo&&typeof zo.ownKeys=="function"?Xs=zo.ownKeys:Object.getOwnPropertySymbols?Xs=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Xs=function(t){return Object.getOwnPropertyNames(t)};function bL(e){console&&console.warn&&console.warn(e)}var I0=Number.isNaN||function(t){return t!==t};function ct(){ct.init.call(this)}lf.exports=ct,lf.exports.once=EL,ct.EventEmitter=ct,ct.prototype._events=void 0,ct.prototype._eventsCount=0,ct.prototype._maxListeners=void 0;var P0=10;function Zs(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(ct,"defaultMaxListeners",{enumerable:!0,get:function(){return P0},set:function(e){if(typeof e!="number"||e<0||I0(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");P0=e}}),ct.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ct.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||I0(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function k0(e){return e._maxListeners===void 0?ct.defaultMaxListeners:e._maxListeners}ct.prototype.getMaxListeners=function(){return k0(this)},ct.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var o=t==="error",i=this._events;if(i!==void 0)o=o&&i.error===void 0;else if(!o)return!1;if(o){var a;if(r.length>0&&(a=r[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[t];if(l===void 0)return!1;if(typeof l=="function")T0(l,this,r);else for(var u=l.length,f=F0(l,u),n=0;n<u;++n)T0(f[n],this,r);return!0};function N0(e,t,r,n){var o,i,a;if(Zs(r),i=e._events,i===void 0?(i=e._events=Object.create(null),e._eventsCount=0):(i.newListener!==void 0&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),a=i[t]),a===void 0)a=i[t]=r,++e._eventsCount;else if(typeof a=="function"?a=i[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),o=k0(e),o>0&&a.length>o&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,bL(s)}return e}ct.prototype.addListener=function(t,r){return N0(this,t,r,!1)},ct.prototype.on=ct.prototype.addListener,ct.prototype.prependListener=function(t,r){return N0(this,t,r,!0)};function yL(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function D0(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=yL.bind(n);return o.listener=r,n.wrapFn=o,o}ct.prototype.once=function(t,r){return Zs(r),this.on(t,D0(this,t,r)),this},ct.prototype.prependOnceListener=function(t,r){return Zs(r),this.prependListener(t,D0(this,t,r)),this},ct.prototype.removeListener=function(t,r){var n,o,i,a,s;if(Zs(r),o=this._events,o===void 0)return this;if(n=o[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete o[t],o.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===r||n[a].listener===r){s=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():wL(n,i),n.length===1&&(o[t]=n[0]),o.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this},ct.prototype.off=ct.prototype.removeListener,ct.prototype.removeAllListeners=function(t){var r,n,o;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i=Object.keys(n),a;for(o=0;o<i.length;++o)a=i[o],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[t],typeof r=="function")this.removeListener(t,r);else if(r!==void 0)for(o=r.length-1;o>=0;o--)this.removeListener(t,r[o]);return this};function L0(e,t,r){var n=e._events;if(n===void 0)return[];var o=n[t];return o===void 0?[]:typeof o=="function"?r?[o.listener||o]:[o]:r?_L(o):F0(o,o.length)}ct.prototype.listeners=function(t){return L0(this,t,!0)},ct.prototype.rawListeners=function(t){return L0(this,t,!1)},ct.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):M0.call(e,t)},ct.prototype.listenerCount=M0;function M0(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}ct.prototype.eventNames=function(){return this._eventsCount>0?Xs(this._events):[]};function F0(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function wL(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function _L(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function EL(e,t){return new Promise(function(r,n){function o(a){e.removeListener(t,i),n(a)}function i(){typeof e.removeListener=="function"&&e.removeListener("error",o),r([].slice.call(arguments))}j0(e,t,i,{once:!0}),t!=="error"&&xL(e,o,{once:!0})})}function xL(e,t,r){typeof e.on=="function"&&j0(e,"error",t,r)}function j0(e,t,r,n){if(typeof e.on=="function")n.once?e.once(t,r):e.on(t,r);else if(typeof e.addEventListener=="function")e.addEventListener(t,function o(i){n.once&&e.removeEventListener(t,o),r(i)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var B0=lf.exports,R0=B0.EventEmitter;const U0=uw(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var cf,W0;function SL(){if(W0)return cf;W0=1;function e(p,h){var g=Object.keys(p);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(p);h&&(v=v.filter(function(b){return Object.getOwnPropertyDescriptor(p,b).enumerable})),g.push.apply(g,v)}return g}function t(p){for(var h=1;h<arguments.length;h++){var g=arguments[h]!=null?arguments[h]:{};h%2?e(Object(g),!0).forEach(function(v){r(p,v,g[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(g)):e(Object(g)).forEach(function(v){Object.defineProperty(p,v,Object.getOwnPropertyDescriptor(g,v))})}return p}function r(p,h,g){return h in p?Object.defineProperty(p,h,{value:g,enumerable:!0,configurable:!0,writable:!0}):p[h]=g,p}function n(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")}function o(p,h){for(var g=0;g<h.length;g++){var v=h[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(p,v.key,v)}}function i(p,h,g){return h&&o(p.prototype,h),g&&o(p,g),p}var a=Qt,s=a.Buffer,l=U0,u=l.inspect,f=u&&u.custom||"inspect";function d(p,h,g){s.prototype.copy.call(p,h,g)}return cf=function(){function p(){n(this,p),this.head=null,this.tail=null,this.length=0}return i(p,[{key:"push",value:function(g){var v={data:g,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(g){var v={data:g,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var g=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,g}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(g){if(this.length===0)return"";for(var v=this.head,b=""+v.data;v=v.next;)b+=g+v.data;return b}},{key:"concat",value:function(g){if(this.length===0)return s.alloc(0);for(var v=s.allocUnsafe(g>>>0),b=this.head,m=0;b;)d(b.data,v,m),m+=b.data.length,b=b.next;return v}},{key:"consume",value:function(g,v){var b;return g<this.head.data.length?(b=this.head.data.slice(0,g),this.head.data=this.head.data.slice(g)):g===this.head.data.length?b=this.shift():b=v?this._getString(g):this._getBuffer(g),b}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(g){var v=this.head,b=1,m=v.data;for(g-=m.length;v=v.next;){var w=v.data,E=g>w.length?w.length:g;if(E===w.length?m+=w:m+=w.slice(0,g),g-=E,g===0){E===w.length?(++b,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=w.slice(E));break}++b}return this.length-=b,m}},{key:"_getBuffer",value:function(g){var v=s.allocUnsafe(g),b=this.head,m=1;for(b.data.copy(v),g-=b.data.length;b=b.next;){var w=b.data,E=g>w.length?w.length:g;if(w.copy(v,v.length-g,0,E),g-=E,g===0){E===w.length?(++m,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=w.slice(E));break}++m}return this.length-=m,v}},{key:f,value:function(g,v){return u(this,t({},v,{depth:0,customInspect:!1}))}}]),p}(),cf}function $L(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return n||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(uf,this,e)):process.nextTick(uf,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(i){!t&&i?r._writableState?r._writableState.errorEmitted?process.nextTick(Qs,r):(r._writableState.errorEmitted=!0,process.nextTick(V0,r,i)):process.nextTick(V0,r,i):t?(process.nextTick(Qs,r),t(i)):process.nextTick(Qs,r)}),this)}function V0(e,t){uf(e,t),Qs(e)}function Qs(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function CL(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function uf(e,t){e.emit("error",t)}function AL(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}var H0={destroy:$L,undestroy:CL,errorOrDestroy:AL},Zn={};function OL(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var z0={};function ur(e,t,r){r||(r=Error);function n(i,a,s){return typeof t=="string"?t:t(i,a,s)}var o=function(i){OL(a,i);function a(s,l,u){return i.call(this,n(s,l,u))||this}return a}(r);o.prototype.name=r.name,o.prototype.code=e,z0[e]=o}function G0(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function TL(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function IL(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function PL(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}ur("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),ur("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&TL(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var o;if(IL(e," argument"))o="The ".concat(e," ").concat(n," ").concat(G0(t,"type"));else{var i=PL(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(i," ").concat(n," ").concat(G0(t,"type"))}return o+=". Received type ".concat(typeof r),o},TypeError),ur("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),ur("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),ur("ERR_STREAM_PREMATURE_CLOSE","Premature close"),ur("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),ur("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),ur("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),ur("ERR_STREAM_WRITE_AFTER_END","write after end"),ur("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),ur("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),ur("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Zn.codes=z0;var kL=Zn.codes.ERR_INVALID_OPT_VALUE;function NL(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function DL(e,t,r,n){var o=NL(t,n,r);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var i=n?r:"highWaterMark";throw new kL(i,o)}return Math.floor(o)}return e.objectMode?16:16*1024}var K0={getHighWaterMark:DL},ff={exports:{}};typeof Object.create=="function"?ff.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:ff.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}};var qi=ff.exports,LL=ML;function ML(e,t){if(df("noDeprecation"))return e;var r=!1;function n(){if(!r){if(df("throwDeprecation"))throw new Error(t);df("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function df(e){try{if(!Ye.localStorage)return!1}catch{return!1}var t=Ye.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}var pf,q0;function Y0(){if(q0)return pf;q0=1,pf=C;function e(U){var H=this;this.next=null,this.entry=null,this.finish=function(){de(H,U)}}var t;C.WritableState=I;var r={deprecate:LL},n=R0,o=Qt.Buffer,i=Ye.Uint8Array||function(){};function a(U){return o.from(U)}function s(U){return o.isBuffer(U)||U instanceof i}var l=H0,u=K0,f=u.getHighWaterMark,d=Zn.codes,p=d.ERR_INVALID_ARG_TYPE,h=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,v=d.ERR_STREAM_CANNOT_PIPE,b=d.ERR_STREAM_DESTROYED,m=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,E=d.ERR_UNKNOWN_ENCODING,x=l.errorOrDestroy;qi(C,n);function k(){}function I(U,H,M){t=t||Go(),U=U||{},typeof M!="boolean"&&(M=H instanceof t),this.objectMode=!!U.objectMode,M&&(this.objectMode=this.objectMode||!!U.writableObjectMode),this.highWaterMark=f(this,U,"writableHighWaterMark",M),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var R=U.decodeStrings===!1;this.decodeStrings=!R,this.defaultEncoding=U.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(z){te(H,z)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=U.emitClose!==!1,this.autoDestroy=!!U.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}I.prototype.getBuffer=function(){for(var H=this.bufferedRequest,M=[];H;)M.push(H),H=H.next;return M},function(){try{Object.defineProperty(I.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var S;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(S=Function.prototype[Symbol.hasInstance],Object.defineProperty(C,Symbol.hasInstance,{value:function(H){return S.call(this,H)?!0:this!==C?!1:H&&H._writableState instanceof I}})):S=function(H){return H instanceof this};function C(U){t=t||Go();var H=this instanceof t;if(!H&&!S.call(C,this))return new C(U);this._writableState=new I(U,this,H),this.writable=!0,U&&(typeof U.write=="function"&&(this._write=U.write),typeof U.writev=="function"&&(this._writev=U.writev),typeof U.destroy=="function"&&(this._destroy=U.destroy),typeof U.final=="function"&&(this._final=U.final)),n.call(this)}C.prototype.pipe=function(){x(this,new v)};function P(U,H){var M=new w;x(U,M),process.nextTick(H,M)}function F(U,H,M,R){var z;return M===null?z=new m:typeof M!="string"&&!H.objectMode&&(z=new p("chunk",["string","Buffer"],M)),z?(x(U,z),process.nextTick(R,z),!1):!0}C.prototype.write=function(U,H,M){var R=this._writableState,z=!1,O=!R.objectMode&&s(U);return O&&!o.isBuffer(U)&&(U=a(U)),typeof H=="function"&&(M=H,H=null),O?H="buffer":H||(H=R.defaultEncoding),typeof M!="function"&&(M=k),R.ending?P(this,M):(O||F(this,R,U,M))&&(R.pendingcb++,z=N(this,R,O,U,H,M)),z},C.prototype.cork=function(){this._writableState.corked++},C.prototype.uncork=function(){var U=this._writableState;U.corked&&(U.corked--,!U.writing&&!U.corked&&!U.bufferProcessing&&U.bufferedRequest&&ae(this,U))},C.prototype.setDefaultEncoding=function(H){if(typeof H=="string"&&(H=H.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((H+"").toLowerCase())>-1))throw new E(H);return this._writableState.defaultEncoding=H,this},Object.defineProperty(C.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function D(U,H,M){return!U.objectMode&&U.decodeStrings!==!1&&typeof H=="string"&&(H=o.from(H,M)),H}Object.defineProperty(C.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N(U,H,M,R,z,O){if(!M){var T=D(H,R,z);R!==T&&(M=!0,z="buffer",R=T)}var Z=H.objectMode?1:R.length;H.length+=Z;var ne=H.length<H.highWaterMark;if(ne||(H.needDrain=!0),H.writing||H.corked){var pe=H.lastBufferedRequest;H.lastBufferedRequest={chunk:R,encoding:z,isBuf:M,callback:O,next:null},pe?pe.next=H.lastBufferedRequest:H.bufferedRequest=H.lastBufferedRequest,H.bufferedRequestCount+=1}else J(U,H,!1,Z,R,z,O);return ne}function J(U,H,M,R,z,O,T){H.writelen=R,H.writecb=T,H.writing=!0,H.sync=!0,H.destroyed?H.onwrite(new b("write")):M?U._writev(z,H.onwrite):U._write(z,O,H.onwrite),H.sync=!1}function G(U,H,M,R,z){--H.pendingcb,M?(process.nextTick(z,R),process.nextTick(q,U,H),U._writableState.errorEmitted=!0,x(U,R)):(z(R),U._writableState.errorEmitted=!0,x(U,R),q(U,H))}function Y(U){U.writing=!1,U.writecb=null,U.length-=U.writelen,U.writelen=0}function te(U,H){var M=U._writableState,R=M.sync,z=M.writecb;if(typeof z!="function")throw new g;if(Y(M),H)G(U,M,R,H,z);else{var O=ge(M)||U.destroyed;!O&&!M.corked&&!M.bufferProcessing&&M.bufferedRequest&&ae(U,M),R?process.nextTick(oe,U,M,O,z):oe(U,M,O,z)}}function oe(U,H,M,R){M||le(U,H),H.pendingcb--,R(),q(U,H)}function le(U,H){H.length===0&&H.needDrain&&(H.needDrain=!1,U.emit("drain"))}function ae(U,H){H.bufferProcessing=!0;var M=H.bufferedRequest;if(U._writev&&M&&M.next){var R=H.bufferedRequestCount,z=new Array(R),O=H.corkedRequestsFree;O.entry=M;for(var T=0,Z=!0;M;)z[T]=M,M.isBuf||(Z=!1),M=M.next,T+=1;z.allBuffers=Z,J(U,H,!0,H.length,z,"",O.finish),H.pendingcb++,H.lastBufferedRequest=null,O.next?(H.corkedRequestsFree=O.next,O.next=null):H.corkedRequestsFree=new e(H),H.bufferedRequestCount=0}else{for(;M;){var ne=M.chunk,pe=M.encoding,me=M.callback,xe=H.objectMode?1:ne.length;if(J(U,H,!1,xe,ne,pe,me),M=M.next,H.bufferedRequestCount--,H.writing)break}M===null&&(H.lastBufferedRequest=null)}H.bufferedRequest=M,H.bufferProcessing=!1}C.prototype._write=function(U,H,M){M(new h("_write()"))},C.prototype._writev=null,C.prototype.end=function(U,H,M){var R=this._writableState;return typeof U=="function"?(M=U,U=null,H=null):typeof H=="function"&&(M=H,H=null),U!=null&&this.write(U,H),R.corked&&(R.corked=1,this.uncork()),R.ending||re(this,R,M),this},Object.defineProperty(C.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ge(U){return U.ending&&U.length===0&&U.bufferedRequest===null&&!U.finished&&!U.writing}function ce(U,H){U._final(function(M){H.pendingcb--,M&&x(U,M),H.prefinished=!0,U.emit("prefinish"),q(U,H)})}function K(U,H){!H.prefinished&&!H.finalCalled&&(typeof U._final=="function"&&!H.destroyed?(H.pendingcb++,H.finalCalled=!0,process.nextTick(ce,U,H)):(H.prefinished=!0,U.emit("prefinish")))}function q(U,H){var M=ge(H);if(M&&(K(U,H),H.pendingcb===0&&(H.finished=!0,U.emit("finish"),H.autoDestroy))){var R=U._readableState;(!R||R.autoDestroy&&R.endEmitted)&&U.destroy()}return M}function re(U,H,M){H.ending=!0,q(U,H),M&&(H.finished?process.nextTick(M):U.once("finish",M)),H.ended=!0,U.writable=!1}function de(U,H,M){var R=U.entry;for(U.entry=null;R;){var z=R.callback;H.pendingcb--,z(M),R=R.next}H.corkedRequestsFree.next=U}return Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(H){this._writableState&&(this._writableState.destroyed=H)}}),C.prototype.destroy=l.destroy,C.prototype._undestroy=l.undestroy,C.prototype._destroy=function(U,H){H(U)},pf}var hf,J0;function Go(){if(J0)return hf;J0=1;var e=Object.keys||function(u){var f=[];for(var d in u)f.push(d);return f};hf=a;var t=oy(),r=Y0();qi(a,t);for(var n=e(r.prototype),o=0;o<n.length;o++){var i=n[o];a.prototype[i]||(a.prototype[i]=r.prototype[i])}function a(u){if(!(this instanceof a))return new a(u);t.call(this,u),r.call(this,u),this.allowHalfOpen=!0,u&&(u.readable===!1&&(this.readable=!1),u.writable===!1&&(this.writable=!1),u.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(l,this)}function l(u){u.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=f,this._writableState.destroyed=f)}}),hf}var gf={},X0;function Z0(){if(X0)return gf;X0=1;var e=d0.Buffer,t=e.isEncoding||function(m){switch(m=""+m,m&&m.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(m){if(!m)return"utf8";for(var w;;)switch(m){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return m;default:if(w)return;m=(""+m).toLowerCase(),w=!0}}function n(m){var w=r(m);if(typeof w!="string"&&(e.isEncoding===t||!t(m)))throw new Error("Unknown encoding: "+m);return w||m}gf.StringDecoder=o;function o(m){this.encoding=n(m);var w;switch(this.encoding){case"utf16le":this.text=d,this.end=p,w=4;break;case"utf8":this.fillLast=l,w=4;break;case"base64":this.text=h,this.end=g,w=3;break;default:this.write=v,this.end=b;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(w)}o.prototype.write=function(m){if(m.length===0)return"";var w,E;if(this.lastNeed){if(w=this.fillLast(m),w===void 0)return"";E=this.lastNeed,this.lastNeed=0}else E=0;return E<m.length?w?w+this.text(m,E):this.text(m,E):w||""},o.prototype.end=f,o.prototype.text=u,o.prototype.fillLast=function(m){if(this.lastNeed<=m.length)return m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,m.length),this.lastNeed-=m.length};function i(m){return m<=127?0:m>>5===6?2:m>>4===14?3:m>>3===30?4:m>>6===2?-1:-2}function a(m,w,E){var x=w.length-1;if(x<E)return 0;var k=i(w[x]);return k>=0?(k>0&&(m.lastNeed=k-1),k):--x<E||k===-2?0:(k=i(w[x]),k>=0?(k>0&&(m.lastNeed=k-2),k):--x<E||k===-2?0:(k=i(w[x]),k>=0?(k>0&&(k===2?k=0:m.lastNeed=k-3),k):0))}function s(m,w,E){if((w[0]&192)!==128)return m.lastNeed=0,"�";if(m.lastNeed>1&&w.length>1){if((w[1]&192)!==128)return m.lastNeed=1,"�";if(m.lastNeed>2&&w.length>2&&(w[2]&192)!==128)return m.lastNeed=2,"�"}}function l(m){var w=this.lastTotal-this.lastNeed,E=s(this,m);if(E!==void 0)return E;if(this.lastNeed<=m.length)return m.copy(this.lastChar,w,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);m.copy(this.lastChar,w,0,m.length),this.lastNeed-=m.length}function u(m,w){var E=a(this,m,w);if(!this.lastNeed)return m.toString("utf8",w);this.lastTotal=E;var x=m.length-(E-this.lastNeed);return m.copy(this.lastChar,0,x),m.toString("utf8",w,x)}function f(m){var w=m&&m.length?this.write(m):"";return this.lastNeed?w+"�":w}function d(m,w){if((m.length-w)%2===0){var E=m.toString("utf16le",w);if(E){var x=E.charCodeAt(E.length-1);if(x>=55296&&x<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1],E.slice(0,-1)}return E}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=m[m.length-1],m.toString("utf16le",w,m.length-1)}function p(m){var w=m&&m.length?this.write(m):"";if(this.lastNeed){var E=this.lastTotal-this.lastNeed;return w+this.lastChar.toString("utf16le",0,E)}return w}function h(m,w){var E=(m.length-w)%3;return E===0?m.toString("base64",w):(this.lastNeed=3-E,this.lastTotal=3,E===1?this.lastChar[0]=m[m.length-1]:(this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1]),m.toString("base64",w,m.length-E))}function g(m){var w=m&&m.length?this.write(m):"";return this.lastNeed?w+this.lastChar.toString("base64",0,3-this.lastNeed):w}function v(m){return m.toString(this.encoding)}function b(m){return m&&m.length?this.write(m):""}return gf}var Q0=Zn.codes.ERR_STREAM_PREMATURE_CLOSE;function FL(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e.apply(this,n)}}}function jL(){}function BL(e){return e.setHeader&&typeof e.abort=="function"}function ey(e,t,r){if(typeof t=="function")return ey(e,null,t);t||(t={}),r=FL(r||jL);var n=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,i=function(){e.writable||s()},a=e._writableState&&e._writableState.finished,s=function(){o=!1,a=!0,n||r.call(e)},l=e._readableState&&e._readableState.endEmitted,u=function(){n=!1,l=!0,o||r.call(e)},f=function(g){r.call(e,g)},d=function(){var g;if(n&&!l)return(!e._readableState||!e._readableState.ended)&&(g=new Q0),r.call(e,g);if(o&&!a)return(!e._writableState||!e._writableState.ended)&&(g=new Q0),r.call(e,g)},p=function(){e.req.on("finish",s)};return BL(e)?(e.on("complete",s),e.on("abort",d),e.req?p():e.on("request",p)):o&&!e._writableState&&(e.on("end",i),e.on("close",i)),e.on("end",u),e.on("finish",s),t.error!==!1&&e.on("error",f),e.on("close",d),function(){e.removeListener("complete",s),e.removeListener("abort",d),e.removeListener("request",p),e.req&&e.req.removeListener("finish",s),e.removeListener("end",i),e.removeListener("close",i),e.removeListener("finish",s),e.removeListener("end",u),e.removeListener("error",f),e.removeListener("close",d)}}var vf=ey,mf,ty;function RL(){if(ty)return mf;ty=1;var e;function t(m,w,E){return w in m?Object.defineProperty(m,w,{value:E,enumerable:!0,configurable:!0,writable:!0}):m[w]=E,m}var r=vf,n=Symbol("lastResolve"),o=Symbol("lastReject"),i=Symbol("error"),a=Symbol("ended"),s=Symbol("lastPromise"),l=Symbol("handlePromise"),u=Symbol("stream");function f(m,w){return{value:m,done:w}}function d(m){var w=m[n];if(w!==null){var E=m[u].read();E!==null&&(m[s]=null,m[n]=null,m[o]=null,w(f(E,!1)))}}function p(m){process.nextTick(d,m)}function h(m,w){return function(E,x){m.then(function(){if(w[a]){E(f(void 0,!0));return}w[l](E,x)},x)}}var g=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((e={get stream(){return this[u]},next:function(){var w=this,E=this[i];if(E!==null)return Promise.reject(E);if(this[a])return Promise.resolve(f(void 0,!0));if(this[u].destroyed)return new Promise(function(S,C){process.nextTick(function(){w[i]?C(w[i]):S(f(void 0,!0))})});var x=this[s],k;if(x)k=new Promise(h(x,this));else{var I=this[u].read();if(I!==null)return Promise.resolve(f(I,!1));k=new Promise(this[l])}return this[s]=k,k}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var w=this;return new Promise(function(E,x){w[u].destroy(null,function(k){if(k){x(k);return}E(f(void 0,!0))})})}),e),g),b=function(w){var E,x=Object.create(v,(E={},t(E,u,{value:w,writable:!0}),t(E,n,{value:null,writable:!0}),t(E,o,{value:null,writable:!0}),t(E,i,{value:null,writable:!0}),t(E,a,{value:w._readableState.endEmitted,writable:!0}),t(E,l,{value:function(I,S){var C=x[u].read();C?(x[s]=null,x[n]=null,x[o]=null,I(f(C,!1))):(x[n]=I,x[o]=S)},writable:!0}),E));return x[s]=null,r(w,function(k){if(k&&k.code!=="ERR_STREAM_PREMATURE_CLOSE"){var I=x[o];I!==null&&(x[s]=null,x[n]=null,x[o]=null,I(k)),x[i]=k;return}var S=x[n];S!==null&&(x[s]=null,x[n]=null,x[o]=null,S(f(void 0,!0))),x[a]=!0}),w.on("readable",p.bind(null,x)),x};return mf=b,mf}var bf,ry;function UL(){return ry||(ry=1,bf=function(){throw new Error("Readable.from is not available in the browser")}),bf}var yf,ny;function oy(){if(ny)return yf;ny=1,yf=P;var e;P.ReadableState=C,B0.EventEmitter;var t=function(T,Z){return T.listeners(Z).length},r=R0,n=Qt.Buffer,o=Ye.Uint8Array||function(){};function i(O){return n.from(O)}function a(O){return n.isBuffer(O)||O instanceof o}var s=U0,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var u=SL(),f=H0,d=K0,p=d.getHighWaterMark,h=Zn.codes,g=h.ERR_INVALID_ARG_TYPE,v=h.ERR_STREAM_PUSH_AFTER_EOF,b=h.ERR_METHOD_NOT_IMPLEMENTED,m=h.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,w,E,x;qi(P,r);var k=f.errorOrDestroy,I=["error","close","destroy","pause","resume"];function S(O,T,Z){if(typeof O.prependListener=="function")return O.prependListener(T,Z);!O._events||!O._events[T]?O.on(T,Z):Array.isArray(O._events[T])?O._events[T].unshift(Z):O._events[T]=[Z,O._events[T]]}function C(O,T,Z){e=e||Go(),O=O||{},typeof Z!="boolean"&&(Z=T instanceof e),this.objectMode=!!O.objectMode,Z&&(this.objectMode=this.objectMode||!!O.readableObjectMode),this.highWaterMark=p(this,O,"readableHighWaterMark",Z),this.buffer=new u,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=O.emitClose!==!1,this.autoDestroy=!!O.autoDestroy,this.destroyed=!1,this.defaultEncoding=O.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,O.encoding&&(w||(w=Z0().StringDecoder),this.decoder=new w(O.encoding),this.encoding=O.encoding)}function P(O){if(e=e||Go(),!(this instanceof P))return new P(O);var T=this instanceof e;this._readableState=new C(O,this,T),this.readable=!0,O&&(typeof O.read=="function"&&(this._read=O.read),typeof O.destroy=="function"&&(this._destroy=O.destroy)),r.call(this)}Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(T){this._readableState&&(this._readableState.destroyed=T)}}),P.prototype.destroy=f.destroy,P.prototype._undestroy=f.undestroy,P.prototype._destroy=function(O,T){T(O)},P.prototype.push=function(O,T){var Z=this._readableState,ne;return Z.objectMode?ne=!0:typeof O=="string"&&(T=T||Z.defaultEncoding,T!==Z.encoding&&(O=n.from(O,T),T=""),ne=!0),F(this,O,T,!1,ne)},P.prototype.unshift=function(O){return F(this,O,null,!0,!1)};function F(O,T,Z,ne,pe){l("readableAddChunk",T);var me=O._readableState;if(T===null)me.reading=!1,te(O,me);else{var xe;if(pe||(xe=N(me,T)),xe)k(O,xe);else if(me.objectMode||T&&T.length>0)if(typeof T!="string"&&!me.objectMode&&Object.getPrototypeOf(T)!==n.prototype&&(T=i(T)),ne)me.endEmitted?k(O,new m):D(O,me,T,!0);else if(me.ended)k(O,new v);else{if(me.destroyed)return!1;me.reading=!1,me.decoder&&!Z?(T=me.decoder.write(T),me.objectMode||T.length!==0?D(O,me,T,!1):ae(O,me)):D(O,me,T,!1)}else ne||(me.reading=!1,ae(O,me))}return!me.ended&&(me.length<me.highWaterMark||me.length===0)}function D(O,T,Z,ne){T.flowing&&T.length===0&&!T.sync?(T.awaitDrain=0,O.emit("data",Z)):(T.length+=T.objectMode?1:Z.length,ne?T.buffer.unshift(Z):T.buffer.push(Z),T.needReadable&&oe(O)),ae(O,T)}function N(O,T){var Z;return!a(T)&&typeof T!="string"&&T!==void 0&&!O.objectMode&&(Z=new g("chunk",["string","Buffer","Uint8Array"],T)),Z}P.prototype.isPaused=function(){return this._readableState.flowing===!1},P.prototype.setEncoding=function(O){w||(w=Z0().StringDecoder);var T=new w(O);this._readableState.decoder=T,this._readableState.encoding=this._readableState.decoder.encoding;for(var Z=this._readableState.buffer.head,ne="";Z!==null;)ne+=T.write(Z.data),Z=Z.next;return this._readableState.buffer.clear(),ne!==""&&this._readableState.buffer.push(ne),this._readableState.length=ne.length,this};var J=1073741824;function G(O){return O>=J?O=J:(O--,O|=O>>>1,O|=O>>>2,O|=O>>>4,O|=O>>>8,O|=O>>>16,O++),O}function Y(O,T){return O<=0||T.length===0&&T.ended?0:T.objectMode?1:O!==O?T.flowing&&T.length?T.buffer.head.data.length:T.length:(O>T.highWaterMark&&(T.highWaterMark=G(O)),O<=T.length?O:T.ended?T.length:(T.needReadable=!0,0))}P.prototype.read=function(O){l("read",O),O=parseInt(O,10);var T=this._readableState,Z=O;if(O!==0&&(T.emittedReadable=!1),O===0&&T.needReadable&&((T.highWaterMark!==0?T.length>=T.highWaterMark:T.length>0)||T.ended))return l("read: emitReadable",T.length,T.ended),T.length===0&&T.ended?M(this):oe(this),null;if(O=Y(O,T),O===0&&T.ended)return T.length===0&&M(this),null;var ne=T.needReadable;l("need readable",ne),(T.length===0||T.length-O<T.highWaterMark)&&(ne=!0,l("length less than watermark",ne)),T.ended||T.reading?(ne=!1,l("reading or ended",ne)):ne&&(l("do read"),T.reading=!0,T.sync=!0,T.length===0&&(T.needReadable=!0),this._read(T.highWaterMark),T.sync=!1,T.reading||(O=Y(Z,T)));var pe;return O>0?pe=H(O,T):pe=null,pe===null?(T.needReadable=T.length<=T.highWaterMark,O=0):(T.length-=O,T.awaitDrain=0),T.length===0&&(T.ended||(T.needReadable=!0),Z!==O&&T.ended&&M(this)),pe!==null&&this.emit("data",pe),pe};function te(O,T){if(l("onEofChunk"),!T.ended){if(T.decoder){var Z=T.decoder.end();Z&&Z.length&&(T.buffer.push(Z),T.length+=T.objectMode?1:Z.length)}T.ended=!0,T.sync?oe(O):(T.needReadable=!1,T.emittedReadable||(T.emittedReadable=!0,le(O)))}}function oe(O){var T=O._readableState;l("emitReadable",T.needReadable,T.emittedReadable),T.needReadable=!1,T.emittedReadable||(l("emitReadable",T.flowing),T.emittedReadable=!0,process.nextTick(le,O))}function le(O){var T=O._readableState;l("emitReadable_",T.destroyed,T.length,T.ended),!T.destroyed&&(T.length||T.ended)&&(O.emit("readable"),T.emittedReadable=!1),T.needReadable=!T.flowing&&!T.ended&&T.length<=T.highWaterMark,U(O)}function ae(O,T){T.readingMore||(T.readingMore=!0,process.nextTick(ge,O,T))}function ge(O,T){for(;!T.reading&&!T.ended&&(T.length<T.highWaterMark||T.flowing&&T.length===0);){var Z=T.length;if(l("maybeReadMore read 0"),O.read(0),Z===T.length)break}T.readingMore=!1}P.prototype._read=function(O){k(this,new b("_read()"))},P.prototype.pipe=function(O,T){var Z=this,ne=this._readableState;switch(ne.pipesCount){case 0:ne.pipes=O;break;case 1:ne.pipes=[ne.pipes,O];break;default:ne.pipes.push(O);break}ne.pipesCount+=1,l("pipe count=%d opts=%j",ne.pipesCount,T);var pe=(!T||T.end!==!1)&&O!==process.stdout&&O!==process.stderr,me=pe?Ee:De;ne.endEmitted?process.nextTick(me):Z.once("end",me),O.on("unpipe",xe);function xe(A,y){l("onunpipe"),A===Z&&y&&y.hasUnpiped===!1&&(y.hasUnpiped=!0,dt())}function Ee(){l("onend"),O.end()}var ie=ce(Z);O.on("drain",ie);var Ne=!1;function dt(){l("cleanup"),O.removeListener("close",bt),O.removeListener("finish",$e),O.removeListener("drain",ie),O.removeListener("error",Fe),O.removeListener("unpipe",xe),Z.removeListener("end",Ee),Z.removeListener("end",De),Z.removeListener("data",Te),Ne=!0,ne.awaitDrain&&(!O._writableState||O._writableState.needDrain)&&ie()}Z.on("data",Te);function Te(A){l("ondata");var y=O.write(A);l("dest.write",y),y===!1&&((ne.pipesCount===1&&ne.pipes===O||ne.pipesCount>1&&z(ne.pipes,O)!==-1)&&!Ne&&(l("false write response, pause",ne.awaitDrain),ne.awaitDrain++),Z.pause())}function Fe(A){l("onerror",A),De(),O.removeListener("error",Fe),t(O,"error")===0&&k(O,A)}S(O,"error",Fe);function bt(){O.removeListener("finish",$e),De()}O.once("close",bt);function $e(){l("onfinish"),O.removeListener("close",bt),De()}O.once("finish",$e);function De(){l("unpipe"),Z.unpipe(O)}return O.emit("pipe",Z),ne.flowing||(l("pipe resume"),Z.resume()),O};function ce(O){return function(){var Z=O._readableState;l("pipeOnDrain",Z.awaitDrain),Z.awaitDrain&&Z.awaitDrain--,Z.awaitDrain===0&&t(O,"data")&&(Z.flowing=!0,U(O))}}P.prototype.unpipe=function(O){var T=this._readableState,Z={hasUnpiped:!1};if(T.pipesCount===0)return this;if(T.pipesCount===1)return O&&O!==T.pipes?this:(O||(O=T.pipes),T.pipes=null,T.pipesCount=0,T.flowing=!1,O&&O.emit("unpipe",this,Z),this);if(!O){var ne=T.pipes,pe=T.pipesCount;T.pipes=null,T.pipesCount=0,T.flowing=!1;for(var me=0;me<pe;me++)ne[me].emit("unpipe",this,{hasUnpiped:!1});return this}var xe=z(T.pipes,O);return xe===-1?this:(T.pipes.splice(xe,1),T.pipesCount-=1,T.pipesCount===1&&(T.pipes=T.pipes[0]),O.emit("unpipe",this,Z),this)},P.prototype.on=function(O,T){var Z=r.prototype.on.call(this,O,T),ne=this._readableState;return O==="data"?(ne.readableListening=this.listenerCount("readable")>0,ne.flowing!==!1&&this.resume()):O==="readable"&&!ne.endEmitted&&!ne.readableListening&&(ne.readableListening=ne.needReadable=!0,ne.flowing=!1,ne.emittedReadable=!1,l("on readable",ne.length,ne.reading),ne.length?oe(this):ne.reading||process.nextTick(q,this)),Z},P.prototype.addListener=P.prototype.on,P.prototype.removeListener=function(O,T){var Z=r.prototype.removeListener.call(this,O,T);return O==="readable"&&process.nextTick(K,this),Z},P.prototype.removeAllListeners=function(O){var T=r.prototype.removeAllListeners.apply(this,arguments);return(O==="readable"||O===void 0)&&process.nextTick(K,this),T};function K(O){var T=O._readableState;T.readableListening=O.listenerCount("readable")>0,T.resumeScheduled&&!T.paused?T.flowing=!0:O.listenerCount("data")>0&&O.resume()}function q(O){l("readable nexttick read 0"),O.read(0)}P.prototype.resume=function(){var O=this._readableState;return O.flowing||(l("resume"),O.flowing=!O.readableListening,re(this,O)),O.paused=!1,this};function re(O,T){T.resumeScheduled||(T.resumeScheduled=!0,process.nextTick(de,O,T))}function de(O,T){l("resume",T.reading),T.reading||O.read(0),T.resumeScheduled=!1,O.emit("resume"),U(O),T.flowing&&!T.reading&&O.read(0)}P.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function U(O){var T=O._readableState;for(l("flow",T.flowing);T.flowing&&O.read()!==null;);}P.prototype.wrap=function(O){var T=this,Z=this._readableState,ne=!1;O.on("end",function(){if(l("wrapped end"),Z.decoder&&!Z.ended){var xe=Z.decoder.end();xe&&xe.length&&T.push(xe)}T.push(null)}),O.on("data",function(xe){if(l("wrapped data"),Z.decoder&&(xe=Z.decoder.write(xe)),!(Z.objectMode&&xe==null)&&!(!Z.objectMode&&(!xe||!xe.length))){var Ee=T.push(xe);Ee||(ne=!0,O.pause())}});for(var pe in O)this[pe]===void 0&&typeof O[pe]=="function"&&(this[pe]=function(Ee){return function(){return O[Ee].apply(O,arguments)}}(pe));for(var me=0;me<I.length;me++)O.on(I[me],this.emit.bind(this,I[me]));return this._read=function(xe){l("wrapped _read",xe),ne&&(ne=!1,O.resume())},this},typeof Symbol=="function"&&(P.prototype[Symbol.asyncIterator]=function(){return E===void 0&&(E=RL()),E(this)}),Object.defineProperty(P.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(P.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(P.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(T){this._readableState&&(this._readableState.flowing=T)}}),P._fromList=H,Object.defineProperty(P.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function H(O,T){if(T.length===0)return null;var Z;return T.objectMode?Z=T.buffer.shift():!O||O>=T.length?(T.decoder?Z=T.buffer.join(""):T.buffer.length===1?Z=T.buffer.first():Z=T.buffer.concat(T.length),T.buffer.clear()):Z=T.buffer.consume(O,T.decoder),Z}function M(O){var T=O._readableState;l("endReadable",T.endEmitted),T.endEmitted||(T.ended=!0,process.nextTick(R,T,O))}function R(O,T){if(l("endReadableNT",O.endEmitted,O.length),!O.endEmitted&&O.length===0&&(O.endEmitted=!0,T.readable=!1,T.emit("end"),O.autoDestroy)){var Z=T._writableState;(!Z||Z.autoDestroy&&Z.finished)&&T.destroy()}}typeof Symbol=="function"&&(P.from=function(O,T){return x===void 0&&(x=UL()),x(P,O,T)});function z(O,T){for(var Z=0,ne=O.length;Z<ne;Z++)if(O[Z]===T)return Z;return-1}return yf}var iy=rn,el=Zn.codes,WL=el.ERR_METHOD_NOT_IMPLEMENTED,VL=el.ERR_MULTIPLE_CALLBACK,HL=el.ERR_TRANSFORM_ALREADY_TRANSFORMING,zL=el.ERR_TRANSFORM_WITH_LENGTH_0,tl=Go();qi(rn,tl);function GL(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new VL);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function rn(e){if(!(this instanceof rn))return new rn(e);tl.call(this,e),this._transformState={afterTransform:GL.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",KL)}function KL(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){ay(e,t,r)}):ay(this,null,null)}rn.prototype.push=function(e,t){return this._transformState.needTransform=!1,tl.prototype.push.call(this,e,t)},rn.prototype._transform=function(e,t,r){r(new WL("_transform()"))},rn.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},rn.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},rn.prototype._destroy=function(e,t){tl.prototype._destroy.call(this,e,function(r){t(r)})};function ay(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new zL;if(e._transformState.transforming)throw new HL;return e.push(null)}var qL=Yi,sy=iy;qi(Yi,sy);function Yi(e){if(!(this instanceof Yi))return new Yi(e);sy.call(this,e)}Yi.prototype._transform=function(e,t,r){r(null,e)};var wf;function YL(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var ly=Zn.codes,JL=ly.ERR_MISSING_ARGS,XL=ly.ERR_STREAM_DESTROYED;function cy(e){if(e)throw e}function ZL(e){return e.setHeader&&typeof e.abort=="function"}function QL(e,t,r,n){n=YL(n);var o=!1;e.on("close",function(){o=!0}),wf===void 0&&(wf=vf),wf(e,{readable:t,writable:r},function(a){if(a)return n(a);o=!0,n()});var i=!1;return function(a){if(!o&&!i){if(i=!0,ZL(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(a||new XL("pipe"))}}}function uy(e){e()}function eM(e,t){return e.pipe(t)}function tM(e){return!e.length||typeof e[e.length-1]!="function"?cy:e.pop()}function rM(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=tM(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new JL("streams");var o,i=t.map(function(a,s){var l=s<t.length-1,u=s>0;return QL(a,l,u,function(f){o||(o=f),f&&i.forEach(uy),!l&&(i.forEach(uy),n(o))})});return t.reduce(eM)}var nM=rM;(function(e,t){t=e.exports=oy(),t.Stream=t,t.Readable=t,t.Writable=Y0(),t.Duplex=Go(),t.Transform=iy,t.PassThrough=qL,t.finished=vf,t.pipeline=nM})(O0,O0.exports);var oM=e=>new Promise((t,r)=>{e((n,o)=>{n?r(n):t(o)})}),fy=class extends Error{constructor(e,t){super(e?`Timeout [${e.toLocaleString()}ms]${t===void 0?"":`: ${t}`}`:"Timeout")}},iM=async(e,t,r)=>{let n;const o=r===void 0||typeof r=="string"?new fy(t,r):r,i=new Promise((s,l)=>{n=setTimeout(()=>{l(o)},t),aM(n)}),a=typeof e=="function"?oM(e):e;return await Promise.race([a,i]).finally(()=>{clearTimeout(n)})},aM=e=>{typeof e=="object"&&"unref"in e&&e.unref()},sM=class{constructor(e={autoReset:!1}){this._options=e,this.reset()}async wait({timeout:e}={}){return e?iM(this._promise,e,new fy(e)):this._promise}wake(e){return this._wake(e),this._options.autoReset?this.reset():this}reset(){return this._promise=new Promise(e=>{this._wake=e}),this}throw(e){return this._wake(Promise.reject(e)),this._options.autoReset?this.reset():this}},lM=class Sr extends Js{constructor(t,r){super(n=>this._subscribe(n)),this._value=r,this._observers=new Set,this._completed=new sM,this._handlers={next:n=>{this._value=n,this._observers.forEach(o=>{var i;return(i=o.next)==null?void 0:i.call(o,n)})},error:n=>{this._observers.forEach(o=>{var i;return(i=o.error)==null?void 0:i.call(o,n)})},complete:()=>{this._completed.wake(),this._observers.forEach(n=>{var o;return(o=n.complete)==null?void 0:o.call(n)})}},this._observable=typeof t=="function"?new Js(t):t,this._observable.subscribe(this._handlers)}static from(t,r){if("emit"in t)return new Sr(o=>{t.on(i=>{o.next(i)})},r);const n=Js.from(t);return new Sr(n,r)}static of(...t){return new Sr(Js.of(...t.slice(1)),t[0])}static empty(){return cM}get(){if(this._value===void 0)throw new Error("MulticastObservable is not initialized.");return this._value}async wait({timeout:t}={}){return await this._completed.wait({timeout:t}),this.get()}forEach(t){return this._observable.forEach(t)}map(t){return new Sr(this._observable.map(t),this._value&&t(this._value))}filter(t){return new Sr(this._observable.filter(t),this._value&&t(this._value)?this._value:void 0)}reduce(t,r){return new Sr(r?this._observable.reduce(t,r):this._observable.reduce(t),r??this._value)}flatMap(t){return new Sr(this._observable.flatMap(t),this._value&&t(this._value).get())}concat(...t){return new Sr(this._observable.concat(...t),this._value)}losslessConcat(t,...r){const n=r.filter(i=>i instanceof Sr),o=t(this._value,n.map(i=>i.get()));return new Sr(this._observable.concat(...r),o)}_subscribe(t){var r;return this._observers.has(t)||this._observers.add(t),this._value!==void 0&&((r=t.next)==null||r.call(t,this._value)),()=>{this._observers.delete(t)}}},cM=lM.of(null),dy=typeof process<"u"&&!!process.env.DX_TRACK_LEAKS,py=new Set,uM=()=>{if(dy){console.log(`Leaked resources ${py.size}:`);for(const e of py)console.log(`- ${e.name} at`),console.log(e.openStack.getStack(1)),console.log()}};dy&&(global.dxDumpLeaks=uM);var hy="/home/runner/work/dxos/dxos/packages/sdk/react-client/src/invitations/useInvitationStatus.ts",_f=e=>{const[t,r]=c.useReducer((a,s)=>(Xe("useInvitationStatus",{action:s},{F:hy,L:79,S:void 0,C:(l,u)=>l(...u)}),{...a,status:s.status,result:s.status===we.State.SUCCESS?s.result:a.result,...s.status===we.State.ERROR&&{error:s.error},...(s.status===we.State.ERROR||s.status===we.State.CANCELLED||s.status===we.State.TIMEOUT)&&{haltedAt:typeof a.haltedAt>"u"?s.haltedAt:a.haltedAt},observable:s.status===we.State.CONNECTING?s.observable??a.observable:a.observable}),null,a=>({status:we.State.INIT,result:{spaceKey:null,identityKey:null,swarmKey:null,target:null},observable:e}));c.useEffect(()=>{var u,f;const a=d=>{switch(d.state){case we.State.CONNECTED:case we.State.READY_FOR_AUTHENTICATION:case we.State.AUTHENTICATING:{r({status:d.state});break}case we.State.SUCCESS:{r({status:d.state,result:{spaceKey:d.spaceKey||null,identityKey:d.identityKey||null,swarmKey:d.swarmKey||null,target:d.target||null}});break}case we.State.CANCELLED:case we.State.TIMEOUT:{r({status:d.state,haltedAt:t.status});break}}},s=(u=t.observable)==null?void 0:u.subscribe(a,d=>{r({status:we.State.ERROR,error:d,haltedAt:t.status})}),l=(f=t.observable)==null?void 0:f.get();return l&&a(l),()=>s==null?void 0:s.unsubscribe()},[t.observable,t.status]);const n=c.useCallback(a=>{r({status:we.State.CONNECTING,observable:a})},[]),o=c.useCallback(a=>(Xe("authenticating...",{authCode:a},{F:hy,L:163,S:void 0,C:(s,l)=>s(...l)}),t.observable.authenticate(a)),[t.observable]),i=c.useCallback(async()=>{var a;return(a=t.observable)==null?void 0:a.cancel()},[t.observable]);return c.useMemo(()=>{var l;const a=(l=t.observable)==null?void 0:l.get();return{status:t.status,haltedAt:t.haltedAt,result:t.result,error:t.error,cancel:i,connect:n,authenticate:o,id:a==null?void 0:a.invitationId,invitationCode:a?cn.InvitationEncoder.encode(a):void 0,authCode:a==null?void 0:a.authCode,authMethod:a==null?void 0:a.authMethod,type:a==null?void 0:a.type}},[t,i,n,o])};const fM=new Map([[we.State.ERROR,-3],[we.State.TIMEOUT,-2],[we.State.CANCELLED,-1],[we.State.INIT,0],[we.State.CONNECTING,1],[we.State.CONNECTED,2],[we.State.READY_FOR_AUTHENTICATION,3],[we.State.AUTHENTICATING,4],[we.State.SUCCESS,5]]);var gy=9007199254740991,dM="[object Arguments]",pM="[object Function]",hM="[object GeneratorFunction]",Ef="[object Map]",gM="[object Object]",vy="[object Promise]",xf="[object Set]",vM="[object String]",my="[object WeakMap]",by="[object DataView]",mM=/[\\^$.*+?()[\]{}|]/g,bM=/^\[object .+?Constructor\]$/,yM=/^(?:0|[1-9]\d*)$/,Sf="\\ud800-\\udfff",yy="\\u0300-\\u036f\\ufe20-\\ufe23",wy="\\u20d0-\\u20f0",_y="\\ufe0e\\ufe0f",wM="["+Sf+"]",$f="["+yy+wy+"]",Cf="\\ud83c[\\udffb-\\udfff]",_M="(?:"+$f+"|"+Cf+")",Ey="[^"+Sf+"]",xy="(?:\\ud83c[\\udde6-\\uddff]){2}",Sy="[\\ud800-\\udbff][\\udc00-\\udfff]",$y="\\u200d",Cy=_M+"?",Ay="["+_y+"]?",EM="(?:"+$y+"(?:"+[Ey,xy,Sy].join("|")+")"+Ay+Cy+")*",xM=Ay+Cy+EM,SM="(?:"+[Ey+$f+"?",$f,xy,Sy,wM].join("|")+")",$M=RegExp(Cf+"(?="+Cf+")|"+SM+xM,"g"),CM=RegExp("["+$y+Sf+yy+wy+_y+"]"),AM=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,OM=typeof self=="object"&&self&&self.Object===Object&&self,Qn=AM||OM||Function("return this")();function TM(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function IM(e){return e.split("")}function PM(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function kM(e,t){return TM(t,function(r){return e[r]})}function NM(e,t){return e==null?void 0:e[t]}function DM(e){return CM.test(e)}function LM(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function MM(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function FM(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function jM(e,t){return function(r){return e(t(r))}}function BM(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}function RM(e){return DM(e)?UM(e):IM(e)}function UM(e){return e.match($M)||[]}var WM=Function.prototype,rl=Object.prototype,Af=Qn["__core-js_shared__"],Oy=function(){var e=/[^.]+$/.exec(Af&&Af.keys&&Af.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ty=WM.toString,nl=rl.hasOwnProperty,Ji=rl.toString,VM=RegExp("^"+Ty.call(nl).replace(mM,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Iy=Qn.Symbol,Of=Iy?Iy.iterator:void 0,HM=rl.propertyIsEnumerable,zM=jM(Object.keys,Object),Tf=Xi(Qn,"DataView"),If=Xi(Qn,"Map"),Pf=Xi(Qn,"Promise"),kf=Xi(Qn,"Set"),Nf=Xi(Qn,"WeakMap"),GM=to(Tf),KM=to(If),qM=to(Pf),YM=to(kf),JM=to(Nf);function XM(e,t){var r=Py(e)||i7(e)?PM(e.length,String):[],n=r.length,o=!!n;for(var i in e)(t||nl.call(e,i))&&!(o&&(i=="length"||r7(i,n)))&&r.push(i);return r}function ZM(e){return Ji.call(e)}function QM(e){if(!Ny(e)||n7(e))return!1;var t=ky(e)||LM(e)?VM:bM;return t.test(to(e))}function e7(e){if(!o7(e))return zM(e);var t=[];for(var r in Object(e))nl.call(e,r)&&r!="constructor"&&t.push(r);return t}function t7(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Xi(e,t){var r=NM(e,t);return QM(r)?r:void 0}var eo=ZM;(Tf&&eo(new Tf(new ArrayBuffer(1)))!=by||If&&eo(new If)!=Ef||Pf&&eo(Pf.resolve())!=vy||kf&&eo(new kf)!=xf||Nf&&eo(new Nf)!=my)&&(eo=function(e){var t=Ji.call(e),r=t==gM?e.constructor:void 0,n=r?to(r):void 0;if(n)switch(n){case GM:return by;case KM:return Ef;case qM:return vy;case YM:return xf;case JM:return my}return t});function r7(e,t){return t=t??gy,!!t&&(typeof e=="number"||yM.test(e))&&e>-1&&e%1==0&&e<t}function n7(e){return!!Oy&&Oy in e}function o7(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||rl;return e===r}function to(e){if(e!=null){try{return Ty.call(e)}catch{}try{return e+""}catch{}}return""}function i7(e){return a7(e)&&nl.call(e,"callee")&&(!HM.call(e,"callee")||Ji.call(e)==dM)}var Py=Array.isArray;function Df(e){return e!=null&&s7(e.length)&&!ky(e)}function a7(e){return Dy(e)&&Df(e)}function ky(e){var t=Ny(e)?Ji.call(e):"";return t==pM||t==hM}function s7(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=gy}function Ny(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Dy(e){return!!e&&typeof e=="object"}function l7(e){return typeof e=="string"||!Py(e)&&Dy(e)&&Ji.call(e)==vM}function c7(e){if(!e)return[];if(Df(e))return l7(e)?RM(e):t7(e);if(Of&&e[Of])return MM(e[Of]());var t=eo(e),r=t==Ef?FM:t==xf?BM:f7;return r(e)}function u7(e){return Df(e)?XM(e):e7(e)}function f7(e){return e?kM(e,u7(e)):[]}var d7=c7;const Ly=un(d7)("👹👻👽🤖🎃🦾🦿🦷👣👁️🧶👑🐒🦆🦉🐴🦄🐝🦋🐞🪲🐢🦎🦕🦑🦀🐠🐬🐋🦭🐅🐆🦓🦍🦧🐘🐫🦒🦘🦬🐖🐏🦌🐕🐈🐓🦚🦜🦢🦩🦦🐁🐿️🌵🌲🌳🪵🌱🍁🪺🍄🐚🪸🪨🌾🌷🌻☀️🌙🪐⭐️⚡️☄️🔥🌈☁️💧⛱️🌊🍎🍋🍉🍇🫐🍈🍒🍑🥭🍍🥥🥝🥑🌶️🌽🥕🍬🥜🫖☕️🍵🧊🧂🏔️⚓️🛟🏝️🛶🚀🛰️⛲️🏰🚲⛺️🎙️🧲⚙️🔩🔮🔭🔬🧬🌡️🧺🛎️🔑🪑🧸🎈🎀🎊♻️🎵"),Lf=e=>Ly[parseInt(e,16)%Ly.length],My=e=>{const{code:t,large:r,classNames:n}=e,o=(t==null?void 0:t.length)??0,i=t==null?void 0:t.slice(0,o/2),a=t==null?void 0:t.slice(o/2),s=()=>{navigator.clipboard.writeText(t??"")};return c.createElement("span",{className:ue(r?"text-6xl":"text-2xl","font-mono pli-2.5 flex gap-1.5 rounded cursor-pointer",n),onClick:s},c.createElement("span",null,i),c.createElement("span",null,a))},p7=e=>{const{invitation:t}=e,r=_f(t);return c.createElement(g7,{...e,invitationStatus:r})},Zi={size:10,variant:"circle"},h7=({animation:e,status:t})=>{const{tx:r}=Ae();return c.createElement(c.Fragment,null,c.createElement("span",{role:"none",className:ue("absolute inline-start-1 inline-end-auto opacity-20",Ve(Zi.size))},c.createElement("span",{role:"none",className:r("avatar.ring","avatar__ring",{...Zi,status:t,animation:e}),style:{animationDelay:"400ms"}})),c.createElement("span",{role:"none",className:ue("absolute inline-start-2 inline-end-auto opacity-50",Ve(Zi.size))},c.createElement("span",{role:"none",className:r("avatar.ring","avatar__ring",{...Zi,status:t,animation:e}),style:{animationDelay:"200ms"}})))},g7=({invitation:e,invitationStatus:t,send:r,onClickRemove:n,createInvitationUrl:o})=>{const{t:i}=tt("os"),{cancel:a,status:s,invitationCode:l,authCode:u,type:f}=t,d=!([we.State.ERROR,we.State.TIMEOUT,we.State.CANCELLED].indexOf(s)>=0),p=f===we.Type.MULTIUSE||[we.State.INIT,we.State.CONNECTING,we.State.CONNECTED].indexOf(s)>=0,h=s===we.State.READY_FOR_AUTHENTICATION,g=c.useCallback(()=>n==null?void 0:n(e),[e,n]),v=l&&o(l),b=e==null?void 0:e.get().invitationId,m=[we.State.INIT,we.State.CONNECTING,we.State.CONNECTED,we.State.READY_FOR_AUTHENTICATION,we.State.AUTHENTICATING].includes(s)?"pulse":"none",w=[we.State.ERROR,we.State.TIMEOUT,we.State.CANCELLED].includes(s),E=[we.State.CONNECTED,we.State.READY_FOR_AUTHENTICATION,we.State.AUTHENTICATING,we.State.SUCCESS].includes(s),x=w?"error":E?"active":"inactive";return c.createElement(qc.Root,{id:l,classNames:"flex gap-2 pis-3 pie-1 items-center relative"},c.createElement(qc.Heading,{classNames:"sr-only"},i(f===we.Type.MULTIUSE?"invite many list item label":"invite one list item label")),f===we.Type.MULTIUSE&&c.createElement(h7,{status:x,animation:m}),c.createElement(wr.Root,null,c.createElement(Tt.Root,{...Zi,animation:m,status:x},c.createElement(wr.Trigger,{asChild:!0},c.createElement(Tt.Frame,{tabIndex:0,classNames:[Rr,"relative rounded-full"]},c.createElement(Tt.Fallback,{text:Lf(b)})))),c.createElement(wr.Portal,null,c.createElement(wr.Content,{side:"left",classNames:"z-[70]"},i(f===we.Type.MULTIUSE?"invite many qr label":"invite one qr label"),c.createElement(wr.Arrow,null)))),p&&v?c.createElement(c.Fragment,null,c.createElement(yr,{variant:"ghost",classNames:"grow justify-start font-medium",onClick:()=>r({type:"selectInvitation",invitation:e}),"data-testid":"show-qrcode"},c.createElement("span",null,i("open share panel label"))),c.createElement(_4,{variant:"ghost",value:v})):h?c.createElement(My,{code:u,classNames:"grow"}):s===we.State.CONNECTING?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Connecting..."):s===we.State.AUTHENTICATING?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Authenticating..."):s===we.State.ERROR||s===we.State.TIMEOUT?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Failed"):s===we.State.CANCELLED?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Cancelled"):s===we.State.SUCCESS?c.createElement("span",{className:"pli-2 grow truncate"},"User joined"):c.createElement("span",{className:"grow"}," "),d?c.createElement(yr,{variant:"ghost",classNames:"flex gap-1",onClick:a,"data-testid":"cancel-invitation"},c.createElement("span",{className:"sr-only"},i("cancel invitation label")),c.createElement(ze.X,{className:Ve(5),weight:"bold"})):c.createElement(yr,{variant:"ghost",classNames:"flex gap-1",onClick:g,"data-testid":"remove-invitation"},c.createElement("span",{className:"sr-only"},i("remove invitation label")),c.createElement(ze.X,{className:Ve(5),weight:"bold"})))},v7=({invitations:e,send:t,...r})=>{const{className:n,InvitationListItem:o=p7}=r;return c.createElement(Kc,{classNames:ue("flex flex-col gap-2",n)},e.map(i=>{const a=i.get().invitationId;return c.createElement(o,{key:a,send:t,invitation:i,...r})}))},m7={noopAction:{label:"No-op",description:"",icon:ze.Placeholder,onClick:()=>{}}},b7=c.forwardRef((e,t)=>{const{classNames:r,variant:n,isFull:o=!0,actions:i=m7,activeAction:a,onChangeActiveAction:s,defaultActiveAction:l,...u}=e,[f=Object.keys(i)[0],d]=qr({prop:a,onChange:s,defaultProp:l}),p=i[f]??{},{t:h}=tt("os");return c.createElement("div",{role:"none",className:ue("mbs-2 flex gap-px items-center",o&&"is-full")},c.createElement(yr,{...u,classNames:["bs-11 flex-1 min-is-0 flex gap-2 rounded-ie-none",r],ref:t,variant:n,onClick:p.onClick},p.icon&&c.createElement(p.icon,null),c.createElement("span",null,p.label)),c.createElement(Kn.Root,null,c.createElement(Kn.Trigger,{asChild:!0},c.createElement(yr,{classNames:["bs-11 flex-none rounded-is-none",r]},c.createElement("span",{className:"sr-only"},h("invite options label")),c.createElement(ze.CaretDown,null))),c.createElement(Kn.Content,null,c.createElement(Kn.Viewport,null,Object.entries(i).map(([g,v])=>c.createElement(Kn.CheckboxItem,{key:g,"aria-labelledby":`${g}__label`,"aria-describedby":`${g}__description`,checked:f===g,onCheckedChange:b=>b&&d(g),classNames:"gap-2"},v.icon&&c.createElement(v.icon,{className:Ve(5)}),c.createElement("div",{role:"none",className:"flex-1 min-is-0 space-b-1"},c.createElement("p",{id:`${g}__label`},v.label),v.description&&c.createElement("p",{id:`${g}__description`,className:Ot},v.description)),c.createElement(Kn.ItemIndicator,{asChild:!0},c.createElement(ze.Check,null))))),c.createElement(Kn.Arrow,null))))}),it=c.forwardRef((e,t)=>{const{children:r,classNames:n,variant:o,isFull:i=!0,...a}=e;return c.createElement(yr,{...a,classNames:[i&&"is-full","bs-11 flex gap-2 mbs-2",n],ref:t,variant:o},r)}),Gt=c.forwardRef(({classNames:e,children:t,...r},n)=>c.createElement("div",{...r,className:ue("flex flex-col gap-2 mbs-2",Array.isArray(t)&&t.length>1?"justify-between":"justify-center",e),ref:n},t)),Fy=({onDone:e,...t})=>{const{t:r}=tt("os");return c.createElement(yr,{variant:"ghost",classNames:ue("plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),onClick:()=>e==null?void 0:e(),...t},c.createElement(ze.X,{weight:"bold",className:Ve(4)}),c.createElement("span",{className:"sr-only"},r("exit label")))},Mf=({text:e,className:t})=>c.createElement("div",{role:"none",className:ue(Ve(14),"rounded relative pointer-events-none",t)},c.createElement("svg",{viewBox:`0 0 ${14*4} ${14*4}`,width:14*4,height:14*4},c.createElement("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",baselineShift:"-0.25rem",fontSize:"2.25rem"},e))),y7=e=>{const{children:t}=e;return c.createElement("div",{role:"none",className:"absolute inset-0 flex items-center justify-center"},t)},Ff=c.forwardRef(({titleId:e,title:t,titleSrOnly:r,children:n,corner:o},i)=>c.createElement("div",{role:"none",className:"pbe-2 relative",ref:i},o,c.createElement("h1",{...!r&&{id:e},className:ue(Ot,"text-center mlb-2",r&&"invisible")},t),r&&c.createElement("span",{id:e},t),n)),jy=e=>{const{children:t}=e;return c.createElement("span",{className:ue(Ot,"text-center mli-6 whitespace-normal")},t)},Qi=({validationMessage:e,label:t,...r})=>c.createElement(jr.Root,null,c.createElement(jr.Label,null,t),c.createElement(jr.TextInput,{...r,classNames:"plb-3 mbs-2 text-center"}),c.createElement(jr.DescriptionAndValidation,null,e&&c.createElement(jr.Validation,null,e))),Er=c.forwardRef(({children:e,className:t,...r},n)=>c.createElement("h2",{...r,className:ue("font-normal text-sm mbe-4 mli-1 text-center",t),ref:n},e));var w7=typeof WeakRef<"u",By=class{constructor(e){w7&&typeof e=="object"?this._weakRef=new WeakRef(e):this._instance=e}deref(){var e,t;let r;return this._weakRef?(r=(e=this._weakRef)==null?void 0:e.deref(),r||delete this._weakRef):(r=this._instance,(t=r==null?void 0:r.isDisposed)!=null&&t.call(r)&&delete this._instance),r}},ea="keyborg:focusin";function _7(e){const t=e.HTMLElement,r=t.prototype.focus;let n=!1;return t.prototype.focus=function(){n=!0},e.document.createElement("button").focus(),t.prototype.focus=r,n}var jf=!1;function Ko(e){const t=e.focus;t.__keyborgNativeFocus?t.__keyborgNativeFocus.call(e):e.focus()}function E7(e){const t=e;jf||(jf=_7(t));const r=t.HTMLElement.prototype.focus;if(r.__keyborgNativeFocus)return;t.HTMLElement.prototype.focus=a;const n=s=>{const l=s.relatedTarget,u=s.currentTarget;u.contains(l)||(u.removeEventListener("focusin",o,!0),u.removeEventListener("focusout",n,!0))},o=s=>{var l;const u=s.target;if(!u)return;if(u.shadowRoot){u.shadowRoot.addEventListener("focusin",o,!0),u.shadowRoot.addEventListener("focusout",n,!0);return}const f={relatedTarget:s.relatedTarget||void 0},d=new CustomEvent(ea,{cancelable:!0,bubbles:!0,composed:!0,detail:f});d.details=f,(jf||i.lastFocusedProgrammatically)&&(f.isFocusedProgrammatically=u===((l=i.lastFocusedProgrammatically)==null?void 0:l.deref()),i.lastFocusedProgrammatically=void 0),u.dispatchEvent(d)},i=t.__keyborgData={focusInHandler:o};t.document.addEventListener("focusin",t.__keyborgData.focusInHandler,!0);function a(){const s=t.__keyborgData;return s&&(s.lastFocusedProgrammatically=new By(this)),r.apply(this,arguments)}a.__keyborgNativeFocus=r}function x7(e){const t=e,r=t.HTMLElement.prototype,n=r.focus.__keyborgNativeFocus,o=t.__keyborgData;o&&(t.document.removeEventListener("focusin",o.focusInHandler,!0),delete t.__keyborgData),n&&(r.focus=n)}var S7=500,Ry=0,$7=class{constructor(){this.__keyborgCoreRefs={},this._isNavigatingWithKeyboard=!1}add(e){const t=e.id;t in this.__keyborgCoreRefs||(this.__keyborgCoreRefs[t]=new By(e))}remove(e){delete this.__keyborgCoreRefs[e],Object.keys(this.__keyborgCoreRefs).length===0&&(this._isNavigatingWithKeyboard=!1)}setVal(e){if(this._isNavigatingWithKeyboard!==e){this._isNavigatingWithKeyboard=e;for(const t of Object.keys(this.__keyborgCoreRefs)){const n=this.__keyborgCoreRefs[t].deref();n?n.update(e):this.remove(t)}}}getVal(){return this._isNavigatingWithKeyboard}},Vr=new $7,C7=class{constructor(e,t){this._onFocusIn=n=>{if(this._isMouseUsedTimer||Vr.getVal())return;const o=n.detail;o.relatedTarget&&(o.isFocusedProgrammatically||o.isFocusedProgrammatically===void 0||Vr.setVal(!0))},this._onMouseDown=n=>{if(n.buttons===0||n.clientX===0&&n.clientY===0&&n.screenX===0&&n.screenY===0)return;const o=this._win;o&&(this._isMouseUsedTimer&&o.clearTimeout(this._isMouseUsedTimer),this._isMouseUsedTimer=o.setTimeout(()=>{delete this._isMouseUsedTimer},1e3)),Vr.setVal(!1)},this._onKeyDown=n=>{Vr.getVal()?this._shouldDismissKeyboardNavigation(n)&&this._scheduleDismiss():this._shouldTriggerKeyboardNavigation(n)&&Vr.setVal(!0)},this.id="c"+ ++Ry,this._win=e;const r=e.document;if(t){const n=t.triggerKeys,o=t.dismissKeys;n!=null&&n.length&&(this._triggerKeys=new Set(n)),o!=null&&o.length&&(this._dismissKeys=new Set(o))}r.addEventListener(ea,this._onFocusIn,!0),r.addEventListener("mousedown",this._onMouseDown,!0),e.addEventListener("keydown",this._onKeyDown,!0),E7(e),Vr.add(this)}dispose(){const e=this._win;if(e){this._isMouseUsedTimer&&(e.clearTimeout(this._isMouseUsedTimer),this._isMouseUsedTimer=void 0),this._dismissTimer&&(e.clearTimeout(this._dismissTimer),this._dismissTimer=void 0),x7(e);const t=e.document;t.removeEventListener(ea,this._onFocusIn,!0),t.removeEventListener("mousedown",this._onMouseDown,!0),e.removeEventListener("keydown",this._onKeyDown,!0),delete this._win,Vr.remove(this.id)}}isDisposed(){return!!this._win}update(e){var t,r;const n=(r=(t=this._win)==null?void 0:t.__keyborg)==null?void 0:r.refs;if(n)for(const o of Object.keys(n))Bf.update(n[o],e)}_shouldTriggerKeyboardNavigation(e){var t;if(e.key==="Tab")return!0;const r=(t=this._win)==null?void 0:t.document.activeElement,n=!this._triggerKeys||this._triggerKeys.has(e.keyCode),o=r&&(r.tagName==="INPUT"||r.tagName==="TEXTAREA"||r.isContentEditable);return n&&!o}_shouldDismissKeyboardNavigation(e){var t;return(t=this._dismissKeys)==null?void 0:t.has(e.keyCode)}_scheduleDismiss(){const e=this._win;if(e){this._dismissTimer&&(e.clearTimeout(this._dismissTimer),this._dismissTimer=void 0);const t=e.document.activeElement;this._dismissTimer=e.setTimeout(()=>{this._dismissTimer=void 0;const r=e.document.activeElement;t&&r&&t===r&&Vr.setVal(!1)},S7)}}},Bf=class sw{constructor(t,r){this._cb=[],this._id="k"+ ++Ry,this._win=t;const n=t.__keyborg;n?(this._core=n.core,n.refs[this._id]=this):(this._core=new C7(t,r),t.__keyborg={core:this._core,refs:{[this._id]:this}})}static create(t,r){return new sw(t,r)}static dispose(t){t.dispose()}static update(t,r){t._cb.forEach(n=>n(r))}dispose(){var t;const r=(t=this._win)==null?void 0:t.__keyborg;r!=null&&r.refs[this._id]?(delete r.refs[this._id],Object.keys(r.refs).length===0&&(r.core.dispose(),delete this._win.__keyborg)):process.env.NODE_ENV!=="production"&&console.error(`Keyborg instance ${this._id} is being disposed incorrectly.`),this._cb=[],delete this._core,delete this._win}isNavigatingWithKeyboard(){return Vr.getVal()}subscribe(t){this._cb.push(t)}unsubscribe(t){const r=this._cb.indexOf(t);r>=0&&this._cb.splice(r,1)}setVal(t){Vr.setVal(t)}};function A7(e,t){return Bf.create(e,t)}function O7(e){Bf.dispose(e)}/*!
|
|
113
113
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
114
114
|
* Licensed under the MIT License.
|
|
115
115
|
*//*!
|
|
116
116
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
117
117
|
* Licensed under the MIT License.
|
|
118
|
-
*/const
|
|
118
|
+
*/const An="data-tabster",Uy="data-tabster-dummy",T7="tabster:focusin",I7="tabster:focusout",P7="tabster:movefocus",Wy=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","*[tabindex]","*[contenteditable]"].join(", "),k7={Auto:0,Inside:1,Outside:2};/*!
|
|
119
119
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
120
120
|
* Licensed under the MIT License.
|
|
121
|
-
*/function
|
|
121
|
+
*/function ro(e,t){var r;return(r=e.storageEntry(t))===null||r===void 0?void 0:r.tabster}function Vy(e,t,r){var n,o;const i=r||e._noop?void 0:t.getAttribute(An);let a=e.storageEntry(t),s;if(i)if(i!==((n=a==null?void 0:a.attr)===null||n===void 0?void 0:n.string))try{const d=JSON.parse(i);if(typeof d!="object")throw new Error(`Value is not a JSON object, got '${i}'.`);s={string:i,object:d}}catch(d){process.env.NODE_ENV==="development"&&console.error(`data-tabster attribute error: ${d}`,t)}else return;else if(!a)return;a||(a=e.storageEntry(t,!0)),a.tabster||(a.tabster={});const l=a.tabster||{},u=((o=a.attr)===null||o===void 0?void 0:o.object)||{},f=(s==null?void 0:s.object)||{};for(const d of Object.keys(u))if(!f[d]){if(d==="root"){const p=l[d];p&&e.root.onRoot(p,!0)}switch(d){case"deloser":case"root":case"groupper":case"modalizer":case"restorer":case"mover":const p=l[d];p&&(p.dispose(),delete l[d]);break;case"observed":delete l[d],e.observedElement&&e.observedElement.onObservedElementUpdate(t);break;case"focusable":case"outline":case"uncontrolled":case"sys":delete l[d];break}}for(const d of Object.keys(f)){const p=f.sys;switch(d){case"deloser":l.deloser?l.deloser.setProps(f.deloser):e.deloser?l.deloser=e.deloser.createDeloser(t,f.deloser):process.env.NODE_ENV==="development"&&console.error("Deloser API used before initialization, please call `getDeloser()`");break;case"root":l.root?l.root.setProps(f.root):l.root=e.root.createRoot(t,f.root,p),e.root.onRoot(l.root);break;case"modalizer":l.modalizer?l.modalizer.setProps(f.modalizer):e.modalizer?l.modalizer=e.modalizer.createModalizer(t,f.modalizer,p):process.env.NODE_ENV==="development"&&console.error("Modalizer API used before initialization, please call `getModalizer()`");break;case"restorer":l.restorer?l.restorer.setProps(f.restorer):e.restorer?f.restorer&&(l.restorer=e.restorer.createRestorer(t,f.restorer)):process.env.NODE_ENV==="development"&&console.error("Restorer API used before initialization, please call `getRestorer()`");break;case"focusable":l.focusable=f.focusable;break;case"groupper":l.groupper?l.groupper.setProps(f.groupper):e.groupper?l.groupper=e.groupper.createGroupper(t,f.groupper,p):process.env.NODE_ENV==="development"&&console.error("Groupper API used before initialization, please call `getGroupper()`");break;case"mover":l.mover?l.mover.setProps(f.mover):e.mover?l.mover=e.mover.createMover(t,f.mover,p):process.env.NODE_ENV==="development"&&console.error("Mover API used before initialization, please call `getMover()`");break;case"observed":e.observedElement?(l.observed=f.observed,e.observedElement.onObservedElementUpdate(t)):process.env.NODE_ENV==="development"&&console.error("ObservedElement API used before initialization, please call `getObservedElement()`");break;case"uncontrolled":l.uncontrolled=f.uncontrolled;break;case"outline":e.outline?l.outline=f.outline:process.env.NODE_ENV==="development"&&console.error("Outline API used before initialization, please call `getOutline()`");break;case"sys":l.sys=f.sys;break;default:console.error(`Unknown key '${d}' in data-tabster attribute value.`)}}s?a.attr=s:(Object.keys(l).length===0&&(delete a.tabster,delete a.attr),e.storageEntry(t,!1))}/*!
|
|
122
122
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
123
123
|
* Licensed under the MIT License.
|
|
124
|
-
*/function
|
|
124
|
+
*/function N7(e){const t=e();try{if(t.EventTarget)return new t.EventTarget}catch(r){if(!(r instanceof TypeError))throw r}return t.document.createElement("div")}/*!
|
|
125
125
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
126
126
|
* Licensed under the MIT License.
|
|
127
|
-
*/let Sf,F7=0;try{document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT),Sf=!1}catch{Sf=!0}const $f=100;function eo(e){const t=e();let r=t.__tabsterInstanceContext;return r||(r={elementByUId:{},basics:{Promise:t.Promise||void 0,WeakRef:t.WeakRef||void 0},containerBoundingRectCache:{},lastContainerBoundingRectCacheId:0,fakeWeakRefs:[],fakeWeakRefsStarted:!1},t.__tabsterInstanceContext=r),r}function j7(e){const t=e.__tabsterInstanceContext;t&&(t.elementByUId={},delete t.WeakRef,t.containerBoundingRectCache={},t.containerBoundingRectCacheTimer&&e.clearTimeout(t.containerBoundingRectCacheTimer),t.fakeWeakRefsTimer&&e.clearTimeout(t.fakeWeakRefsTimer),t.fakeWeakRefs=[],delete e.__tabsterInstanceContext)}function B7(e){const t=e.__tabsterInstanceContext;return new(t?.basics.WeakMap||WeakMap)}function R7(e){return!!e.querySelector(by)}class wy{constructor(t){this._target=t}deref(){return this._target}static cleanup(t,r){return t._target?r||!Cf(t._target.ownerDocument,t._target)?(delete t._target,!0):!1:!0}}class En{constructor(t,r,n){const o=eo(t);let i;o.WeakRef?i=new o.WeakRef(r):(i=new wy(r),o.fakeWeakRefs.push(i)),this._ref=i,this._data=n}get(){const t=this._ref;let r;return t&&(r=t.deref(),r||delete this._ref),r}getData(){return this._data}}function _y(e,t){const r=eo(e);r.fakeWeakRefs=r.fakeWeakRefs.filter(n=>!wy.cleanup(n,t))}function Ey(e){const t=eo(e);t.fakeWeakRefsStarted||(t.fakeWeakRefsStarted=!0,t.WeakRef=G7(t)),t.fakeWeakRefsTimer||(t.fakeWeakRefsTimer=e().setTimeout(()=>{t.fakeWeakRefsTimer=void 0,_y(e),Ey(e)},2*60*1e3))}function U7(e){const t=eo(e);t.fakeWeakRefsStarted=!1,t.fakeWeakRefsTimer&&(e().clearTimeout(t.fakeWeakRefsTimer),t.fakeWeakRefsTimer=void 0,t.fakeWeakRefs=[])}function xy(e,t,r){if(t.nodeType!==Node.ELEMENT_NODE)return;const n=Sf?r:{acceptNode:r};return e.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,n,!1)}function W7(e){e.__shouldIgnoreFocus=!0}function Sy(e){return!!e.__shouldIgnoreFocus}function V7(e){const t=new Uint32Array(4);if(e.crypto&&e.crypto.getRandomValues)e.crypto.getRandomValues(t);else if(e.msCrypto&&e.msCrypto.getRandomValues)e.msCrypto.getRandomValues(t);else for(let n=0;n<t.length;n++)t[n]=4294967295*Math.random();const r=[];for(let n=0;n<t.length;n++)r.push(t[n].toString(36));return r.push("|"),r.push((++F7).toString(36)),r.push("|"),r.push(Date.now().toString(36)),r.join("")}function H7(e,t){const r=eo(e);let n=t.__tabsterElementUID;return n||(n=t.__tabsterElementUID=V7(e())),!r.elementByUId[n]&&Cf(t.ownerDocument,t)&&(r.elementByUId[n]=new En(e,t)),n}function $y(e,t){const r=eo(e);for(const n of Object.keys(r.elementByUId)){const o=r.elementByUId[n],i=o&&o.get();i&&t&&!t.contains(i)||delete r.elementByUId[n]}}function Cf(e,t){var r;return!!(!((r=e?.body)===null||r===void 0)&&r.contains(t))}function z7(e,t){const r=e.matches||e.matchesSelector||e.msMatchesSelector||e.webkitMatchesSelector;return r&&r.call(e,t)}function G7(e){return e.basics.WeakRef}let K7=0;class q7{constructor(t,r,n){const o=t.getWindow;this._tabster=t,this._element=new En(o,r),this._props={...n},this.id="i"+ ++K7}getElement(){return this._element.get()}getProps(){return this._props}setProps(t){this._props={...t}}}class Ks{constructor(t,r,n,o,i){var a;this._focusIn=f=>{if(this._fixedTarget){const p=this._fixedTarget.get();p&&Bo(p);return}const d=this.input;if(this.onFocusIn&&d){const p=f.relatedTarget;this.onFocusIn(this,this._isBackward(!0,d,p),p)}},this._focusOut=f=>{if(this._fixedTarget)return;this.useDefaultAction=!1;const d=this.input;if(this.onFocusOut&&d){const p=f.relatedTarget;this.onFocusOut(this,this._isBackward(!1,d,p),p)}};const s=t(),l=s.document.createElement("i");l.tabIndex=0,l.setAttribute("role","none"),l.setAttribute(my,""),l.setAttribute("aria-hidden","true");const u=l.style;u.position="fixed",u.width=u.height="1px",u.opacity="0.001",u.zIndex="-1",u.setProperty("content-visibility","hidden"),W7(l),this.input=l,this.isFirst=n.isFirst,this.isOutside=r,this._isPhantom=(a=n.isPhantom)!==null&&a!==void 0?a:!1,this._fixedTarget=i,l.addEventListener("focusin",this._focusIn),l.addEventListener("focusout",this._focusOut),l.__tabsterDummyContainer=o,this._isPhantom&&(this._disposeTimer=s.setTimeout(()=>{delete this._disposeTimer,this.dispose()},0),this._clearDisposeTimeout=()=>{this._disposeTimer&&(s.clearTimeout(this._disposeTimer),delete this._disposeTimer),delete this._clearDisposeTimeout})}dispose(){var t;this._clearDisposeTimeout&&this._clearDisposeTimeout();const r=this.input;r&&(delete this._fixedTarget,delete this.onFocusIn,delete this.onFocusOut,delete this.input,r.removeEventListener("focusin",this._focusIn),r.removeEventListener("focusout",this._focusOut),delete r.__tabsterDummyContainer,(t=r.parentElement)===null||t===void 0||t.removeChild(r))}setTopLeft(t,r){var n;const o=(n=this.input)===null||n===void 0?void 0:n.style;o&&(o.top=`${t}px`,o.left=`${r}px`)}_isBackward(t,r,n){return t&&!n?!this.isFirst:!!(n&&r.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)}}const Y7={Root:1,Modalizer:2,Mover:3,Groupper:4};class Af{constructor(t,r,n,o,i,a){this._element=r,this._instance=new X7(t,r,this,n,o,i,a)}_setHandlers(t,r){this._onFocusIn=t,this._onFocusOut=r}moveOut(t){var r;(r=this._instance)===null||r===void 0||r.moveOut(t)}moveOutWithDefaultAction(t,r){var n;(n=this._instance)===null||n===void 0||n.moveOutWithDefaultAction(t,r)}getHandler(t){return t?this._onFocusIn:this._onFocusOut}setTabbable(t){var r;(r=this._instance)===null||r===void 0||r.setTabbable(this,t)}dispose(){this._instance&&(this._instance.dispose(this),delete this._instance),delete this._onFocusIn,delete this._onFocusOut}static moveWithPhantomDummy(t,r,n,o,i){var a;const l=new Ks(t.getWindow,!0,{isPhantom:!0,isFirst:!0}).input;if(l){let u,f;if(r.tagName==="BODY")u=r,f=n&&o||!n&&!o?r.firstElementChild:null;else{n&&(!o||o&&!t.focusable.isFocusable(r,!1,!0,!0))?(u=r,f=o?r.firstElementChild:null):(u=r.parentElement,f=n&&o||!n&&!o?r:r.nextElementSibling);let d,p;do d=n&&o||!n&&!o?f?.previousElementSibling:f,p=(a=d?.__tabsterDummyContainer)===null||a===void 0?void 0:a.get(),p===r?f=n&&o||!n&&!o?d:d?.nextElementSibling:p=void 0;while(p)}u&&Ki({by:"root",owner:u,next:null,relatedEvent:i})&&(u.insertBefore(l,f),Bo(l))}}static addPhantomDummyWithTarget(t,r,n,o){const a=new Ks(t.getWindow,!0,{isPhantom:!0,isFirst:!0},void 0,new En(t.getWindow,o)).input;if(a){let s,l;R7(r)&&!n?(s=r,l=r.firstElementChild):(s=r.parentElement,l=n?r:r.nextElementSibling),s?.insertBefore(a,l)}}}function xn(e,t){var r;const n={1:"Root",2:"Modalizer",3:"Mover",4:"Groupper"};(r=e.input)===null||r===void 0||r.setAttribute(my,[`isFirst=${e.isFirst}`,`isOutside=${e.isOutside}`,...t.map(o=>`(${n[o.priority]}, tabbable=${o.tabbable})`)].join(", "))}class J7{constructor(t){this._updateQueue=new Set,this._lastUpdateQueueTime=0,this._changedParents=new WeakSet,this._dummyElements=[],this._dummyCallbacks=new WeakMap,this._domChanged=r=>{var n;this._changedParents.has(r)||(this._changedParents.add(r),!this._updateDummyInputsTimer&&(this._updateDummyInputsTimer=(n=this._win)===null||n===void 0?void 0:n.call(this).setTimeout(()=>{delete this._updateDummyInputsTimer;for(const o of this._dummyElements){const i=o.get();if(i){const a=this._dummyCallbacks.get(i);if(a){const s=i.parentElement;(!s||this._changedParents.has(s))&&a()}}}this._changedParents=new WeakSet},$f)))},this._win=t}add(t,r){!this._dummyCallbacks.has(t)&&this._win&&(this._dummyElements.push(new En(this._win,t)),this._dummyCallbacks.set(t,r),this.domChanged=this._domChanged)}remove(t){this._dummyElements=this._dummyElements.filter(r=>{const n=r.get();return n&&n!==t}),this._dummyCallbacks.delete(t),this._dummyElements.length===0&&delete this.domChanged}dispose(){var t;const r=(t=this._win)===null||t===void 0?void 0:t.call(this);this._updateTimer&&(r?.clearTimeout(this._updateTimer),delete this._updateTimer),this._updateDummyInputsTimer&&(r?.clearTimeout(this._updateDummyInputsTimer),delete this._updateDummyInputsTimer),this._changedParents=new WeakSet,this._dummyCallbacks=new WeakMap,this._dummyElements=[],this._updateQueue.clear(),delete this.domChanged,delete this._win}updatePositions(t){this._win&&(this._updateQueue.add(t),this._lastUpdateQueueTime=Date.now(),this._scheduledUpdatePositions())}_scheduledUpdatePositions(){var t;this._updateTimer||(this._updateTimer=(t=this._win)===null||t===void 0?void 0:t.call(this).setTimeout(()=>{if(delete this._updateTimer,this._lastUpdateQueueTime+$f<=Date.now()){const r=new Map,n=[];for(const o of this._updateQueue)n.push(o(r));this._updateQueue.clear();for(const o of n)o();r.clear()}else this._scheduledUpdatePositions()},$f))}}class X7{constructor(t,r,n,o,i,a,s){this._wrappers=[],this._isOutside=!1,this._transformElements=new Set,this._onFocusIn=(h,g,v)=>{this._onFocus(!0,h,g,v)},this._onFocusOut=(h,g,v)=>{this._onFocus(!1,h,g,v)},this.moveOut=h=>{var g;const v=this._firstDummy,y=this._lastDummy;if(v&&y){this._ensurePosition();const m=v.input,w=y.input,E=(g=this._element)===null||g===void 0?void 0:g.get();if(m&&w&&E){let x;h?(m.tabIndex=0,x=m):(w.tabIndex=0,x=w),x&&Bo(x)}}},this.moveOutWithDefaultAction=(h,g)=>{var v;const y=this._firstDummy,m=this._lastDummy;if(y&&m){this._ensurePosition();const w=y.input,E=m.input,x=(v=this._element)===null||v===void 0?void 0:v.get();if(w&&E&&x){let P;h?!y.isOutside&&this._tabster.focusable.isFocusable(x,!0,!0,!0)?P=x:(y.useDefaultAction=!0,w.tabIndex=0,P=w):(m.useDefaultAction=!0,E.tabIndex=0,P=E),P&&Ki({by:"root",owner:x,next:null,relatedEvent:g})&&Bo(P)}}},this.setTabbable=(h,g)=>{var v,y;for(const w of this._wrappers)if(w.manager===h){w.tabbable=g;break}const m=this._getCurrent();if(m){const w=m.tabbable?0:-1;let E=(v=this._firstDummy)===null||v===void 0?void 0:v.input;E&&(E.tabIndex=w),E=(y=this._lastDummy)===null||y===void 0?void 0:y.input,E&&(E.tabIndex=w)}process.env.NODE_ENV==="development"&&(this._firstDummy&&xn(this._firstDummy,this._wrappers),this._lastDummy&&xn(this._lastDummy,this._wrappers))},this._addDummyInputs=()=>{this._addTimer||(this._addTimer=this._getWindow().setTimeout(()=>{delete this._addTimer,this._ensurePosition(),process.env.NODE_ENV==="development"&&(this._firstDummy&&xn(this._firstDummy,this._wrappers),this._lastDummy&&xn(this._lastDummy,this._wrappers)),this._addTransformOffsets()},0))},this._addTransformOffsets=()=>{this._tabster._dummyObserver.updatePositions(this._computeTransformOffsets)},this._computeTransformOffsets=h=>{var g,v;const y=((g=this._firstDummy)===null||g===void 0?void 0:g.input)||((v=this._lastDummy)===null||v===void 0?void 0:v.input),m=this._transformElements,w=new Set;let E=0,x=0;const P=this._getWindow();for(let I=y;I&&I.nodeType===Node.ELEMENT_NODE;I=I.parentElement){let S=h.get(I);if(S===void 0){const O=P.getComputedStyle(I).transform;O&&O!=="none"&&(S={scrollTop:I.scrollTop,scrollLeft:I.scrollLeft}),h.set(I,S||null)}S&&(w.add(I),m.has(I)||I.addEventListener("scroll",this._addTransformOffsets),E+=S.scrollTop,x+=S.scrollLeft)}for(const I of m)w.has(I)||I.removeEventListener("scroll",this._addTransformOffsets);return this._transformElements=w,()=>{var I,S;(I=this._firstDummy)===null||I===void 0||I.setTopLeft(E,x),(S=this._lastDummy)===null||S===void 0||S.setTopLeft(E,x)}};const l=r.get();if(!l)throw new Error("No element");this._tabster=t,this._getWindow=t.getWindow,this._callForDefaultAction=s;const u=l.__tabsterDummy;if((u||this)._wrappers.push({manager:n,priority:o,tabbable:!0}),u)return process.env.NODE_ENV==="development"&&(this._firstDummy&&xn(this._firstDummy,u._wrappers),this._lastDummy&&xn(this._lastDummy,u._wrappers)),u;l.__tabsterDummy=this;const f=i?.dummyInputsPosition,d=l.tagName;this._isOutside=f?f===L7.Outside:(a||d==="UL"||d==="OL"||d==="TABLE")&&!(d==="LI"||d==="TD"||d==="TH"),this._firstDummy=new Ks(this._getWindow,this._isOutside,{isFirst:!0},r),this._lastDummy=new Ks(this._getWindow,this._isOutside,{isFirst:!1},r);const p=this._firstDummy.input;p&&t._dummyObserver.add(p,this._addDummyInputs),this._firstDummy.onFocusIn=this._onFocusIn,this._firstDummy.onFocusOut=this._onFocusOut,this._lastDummy.onFocusIn=this._onFocusIn,this._lastDummy.onFocusOut=this._onFocusOut,this._element=r,this._addDummyInputs()}dispose(t,r){var n,o,i,a;const s=this._wrappers=this._wrappers.filter(l=>l.manager!==t&&!r);if(process.env.NODE_ENV==="development"&&(this._firstDummy&&xn(this._firstDummy,s),this._lastDummy&&xn(this._lastDummy,s)),s.length===0){delete((n=this._element)===null||n===void 0?void 0:n.get()).__tabsterDummy;for(const f of this._transformElements)f.removeEventListener("scroll",this._addTransformOffsets);this._transformElements.clear();const l=this._getWindow();this._addTimer&&(l.clearTimeout(this._addTimer),delete this._addTimer);const u=(o=this._firstDummy)===null||o===void 0?void 0:o.input;u&&this._tabster._dummyObserver.remove(u),(i=this._firstDummy)===null||i===void 0||i.dispose(),(a=this._lastDummy)===null||a===void 0||a.dispose()}}_onFocus(t,r,n,o){var i;const a=this._getCurrent();a&&(!r.useDefaultAction||this._callForDefaultAction)&&((i=a.manager.getHandler(t))===null||i===void 0||i(r,n,o))}_getCurrent(){return this._wrappers.sort((t,r)=>t.tabbable!==r.tabbable?t.tabbable?-1:1:t.priority-r.priority),this._wrappers[0]}_ensurePosition(){var t,r,n;const o=(t=this._element)===null||t===void 0?void 0:t.get(),i=(r=this._firstDummy)===null||r===void 0?void 0:r.input,a=(n=this._lastDummy)===null||n===void 0?void 0:n.input;if(!(!o||!i||!a))if(this._isOutside){const s=o.parentElement;if(s){const l=o.nextElementSibling;l!==a&&s.insertBefore(a,l),o.previousElementSibling!==i&&s.insertBefore(i,o)}}else{o.lastElementChild!==a&&o.appendChild(a);const s=o.firstElementChild;s&&s!==i&&o.insertBefore(i,s)}}}function Cy(e){let t=null;for(let r=e.lastElementChild;r;r=r.lastElementChild)t=r;return t||void 0}function Gi(e,t,r){const n=document.createEvent("HTMLEvents");return n.initEvent(t,!0,!0),n.details=r,e.dispatchEvent(n),!n.defaultPrevented}function Ki(e){return Gi(e.owner,D7,e)}/*!
|
|
127
|
+
*/let Rf,D7=0;try{document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT),Rf=!1}catch{Rf=!0}const Uf=100;function no(e){const t=e();let r=t.__tabsterInstanceContext;return r||(r={elementByUId:{},basics:{Promise:t.Promise||void 0,WeakRef:t.WeakRef||void 0},containerBoundingRectCache:{},lastContainerBoundingRectCacheId:0,fakeWeakRefs:[],fakeWeakRefsStarted:!1},t.__tabsterInstanceContext=r),r}function L7(e){const t=e.__tabsterInstanceContext;t&&(t.elementByUId={},delete t.WeakRef,t.containerBoundingRectCache={},t.containerBoundingRectCacheTimer&&e.clearTimeout(t.containerBoundingRectCacheTimer),t.fakeWeakRefsTimer&&e.clearTimeout(t.fakeWeakRefsTimer),t.fakeWeakRefs=[],delete e.__tabsterInstanceContext)}function M7(e){const t=e.__tabsterInstanceContext;return new((t==null?void 0:t.basics.WeakMap)||WeakMap)}function F7(e){return!!e.querySelector(Wy)}class Hy{constructor(t){this._target=t}deref(){return this._target}static cleanup(t,r){return t._target?r||!Wf(t._target.ownerDocument,t._target)?(delete t._target,!0):!1:!0}}class On{constructor(t,r,n){const o=no(t);let i;o.WeakRef?i=new o.WeakRef(r):(i=new Hy(r),o.fakeWeakRefs.push(i)),this._ref=i,this._data=n}get(){const t=this._ref;let r;return t&&(r=t.deref(),r||delete this._ref),r}getData(){return this._data}}function zy(e,t){const r=no(e);r.fakeWeakRefs=r.fakeWeakRefs.filter(n=>!Hy.cleanup(n,t))}function Gy(e){const t=no(e);t.fakeWeakRefsStarted||(t.fakeWeakRefsStarted=!0,t.WeakRef=V7(t)),t.fakeWeakRefsTimer||(t.fakeWeakRefsTimer=e().setTimeout(()=>{t.fakeWeakRefsTimer=void 0,zy(e),Gy(e)},2*60*1e3))}function j7(e){const t=no(e);t.fakeWeakRefsStarted=!1,t.fakeWeakRefsTimer&&(e().clearTimeout(t.fakeWeakRefsTimer),t.fakeWeakRefsTimer=void 0,t.fakeWeakRefs=[])}function Ky(e,t,r){if(t.nodeType!==Node.ELEMENT_NODE)return;const n=Rf?r:{acceptNode:r};return e.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,n,!1)}function B7(e){e.__shouldIgnoreFocus=!0}function qy(e){return!!e.__shouldIgnoreFocus}function R7(e){const t=new Uint32Array(4);if(e.crypto&&e.crypto.getRandomValues)e.crypto.getRandomValues(t);else if(e.msCrypto&&e.msCrypto.getRandomValues)e.msCrypto.getRandomValues(t);else for(let n=0;n<t.length;n++)t[n]=4294967295*Math.random();const r=[];for(let n=0;n<t.length;n++)r.push(t[n].toString(36));return r.push("|"),r.push((++D7).toString(36)),r.push("|"),r.push(Date.now().toString(36)),r.join("")}function U7(e,t){const r=no(e);let n=t.__tabsterElementUID;return n||(n=t.__tabsterElementUID=R7(e())),!r.elementByUId[n]&&Wf(t.ownerDocument,t)&&(r.elementByUId[n]=new On(e,t)),n}function Yy(e,t){const r=no(e);for(const n of Object.keys(r.elementByUId)){const o=r.elementByUId[n],i=o&&o.get();i&&t&&!t.contains(i)||delete r.elementByUId[n]}}function Wf(e,t){var r;return!!(!((r=e==null?void 0:e.body)===null||r===void 0)&&r.contains(t))}function W7(e,t){const r=e.matches||e.matchesSelector||e.msMatchesSelector||e.webkitMatchesSelector;return r&&r.call(e,t)}function V7(e){return e.basics.WeakRef}let H7=0;class z7{constructor(t,r,n){const o=t.getWindow;this._tabster=t,this._element=new On(o,r),this._props={...n},this.id="i"+ ++H7}getElement(){return this._element.get()}getProps(){return this._props}setProps(t){this._props={...t}}}class ol{constructor(t,r,n,o,i){var a;this._focusIn=f=>{if(this._fixedTarget){const p=this._fixedTarget.get();p&&Ko(p);return}const d=this.input;if(this.onFocusIn&&d){const p=f.relatedTarget;this.onFocusIn(this,this._isBackward(!0,d,p),p)}},this._focusOut=f=>{if(this._fixedTarget)return;this.useDefaultAction=!1;const d=this.input;if(this.onFocusOut&&d){const p=f.relatedTarget;this.onFocusOut(this,this._isBackward(!1,d,p),p)}};const s=t(),l=s.document.createElement("i");l.tabIndex=0,l.setAttribute("role","none"),l.setAttribute(Uy,""),l.setAttribute("aria-hidden","true");const u=l.style;u.position="fixed",u.width=u.height="1px",u.opacity="0.001",u.zIndex="-1",u.setProperty("content-visibility","hidden"),B7(l),this.input=l,this.isFirst=n.isFirst,this.isOutside=r,this._isPhantom=(a=n.isPhantom)!==null&&a!==void 0?a:!1,this._fixedTarget=i,l.addEventListener("focusin",this._focusIn),l.addEventListener("focusout",this._focusOut),l.__tabsterDummyContainer=o,this._isPhantom&&(this._disposeTimer=s.setTimeout(()=>{delete this._disposeTimer,this.dispose()},0),this._clearDisposeTimeout=()=>{this._disposeTimer&&(s.clearTimeout(this._disposeTimer),delete this._disposeTimer),delete this._clearDisposeTimeout})}dispose(){var t;this._clearDisposeTimeout&&this._clearDisposeTimeout();const r=this.input;r&&(delete this._fixedTarget,delete this.onFocusIn,delete this.onFocusOut,delete this.input,r.removeEventListener("focusin",this._focusIn),r.removeEventListener("focusout",this._focusOut),delete r.__tabsterDummyContainer,(t=r.parentElement)===null||t===void 0||t.removeChild(r))}setTopLeft(t,r){var n;const o=(n=this.input)===null||n===void 0?void 0:n.style;o&&(o.top=`${t}px`,o.left=`${r}px`)}_isBackward(t,r,n){return t&&!n?!this.isFirst:!!(n&&r.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)}}const G7={Root:1,Modalizer:2,Mover:3,Groupper:4};class Vf{constructor(t,r,n,o,i,a){this._element=r,this._instance=new q7(t,r,this,n,o,i,a)}_setHandlers(t,r){this._onFocusIn=t,this._onFocusOut=r}moveOut(t){var r;(r=this._instance)===null||r===void 0||r.moveOut(t)}moveOutWithDefaultAction(t,r){var n;(n=this._instance)===null||n===void 0||n.moveOutWithDefaultAction(t,r)}getHandler(t){return t?this._onFocusIn:this._onFocusOut}setTabbable(t){var r;(r=this._instance)===null||r===void 0||r.setTabbable(this,t)}dispose(){this._instance&&(this._instance.dispose(this),delete this._instance),delete this._onFocusIn,delete this._onFocusOut}static moveWithPhantomDummy(t,r,n,o,i){var a;const l=new ol(t.getWindow,!0,{isPhantom:!0,isFirst:!0}).input;if(l){let u,f;if(r.tagName==="BODY")u=r,f=n&&o||!n&&!o?r.firstElementChild:null;else{n&&(!o||o&&!t.focusable.isFocusable(r,!1,!0,!0))?(u=r,f=o?r.firstElementChild:null):(u=r.parentElement,f=n&&o||!n&&!o?r:r.nextElementSibling);let d,p;do d=n&&o||!n&&!o?f==null?void 0:f.previousElementSibling:f,p=(a=d==null?void 0:d.__tabsterDummyContainer)===null||a===void 0?void 0:a.get(),p===r?f=n&&o||!n&&!o?d:d==null?void 0:d.nextElementSibling:p=void 0;while(p)}u&&ra({by:"root",owner:u,next:null,relatedEvent:i})&&(u.insertBefore(l,f),Ko(l))}}static addPhantomDummyWithTarget(t,r,n,o){const a=new ol(t.getWindow,!0,{isPhantom:!0,isFirst:!0},void 0,new On(t.getWindow,o)).input;if(a){let s,l;F7(r)&&!n?(s=r,l=r.firstElementChild):(s=r.parentElement,l=n?r:r.nextElementSibling),s==null||s.insertBefore(a,l)}}}function Tn(e,t){var r;const n={1:"Root",2:"Modalizer",3:"Mover",4:"Groupper"};(r=e.input)===null||r===void 0||r.setAttribute(Uy,[`isFirst=${e.isFirst}`,`isOutside=${e.isOutside}`,...t.map(o=>`(${n[o.priority]}, tabbable=${o.tabbable})`)].join(", "))}class K7{constructor(t){this._updateQueue=new Set,this._lastUpdateQueueTime=0,this._changedParents=new WeakSet,this._dummyElements=[],this._dummyCallbacks=new WeakMap,this._domChanged=r=>{var n;this._changedParents.has(r)||(this._changedParents.add(r),!this._updateDummyInputsTimer&&(this._updateDummyInputsTimer=(n=this._win)===null||n===void 0?void 0:n.call(this).setTimeout(()=>{delete this._updateDummyInputsTimer;for(const o of this._dummyElements){const i=o.get();if(i){const a=this._dummyCallbacks.get(i);if(a){const s=i.parentElement;(!s||this._changedParents.has(s))&&a()}}}this._changedParents=new WeakSet},Uf)))},this._win=t}add(t,r){!this._dummyCallbacks.has(t)&&this._win&&(this._dummyElements.push(new On(this._win,t)),this._dummyCallbacks.set(t,r),this.domChanged=this._domChanged)}remove(t){this._dummyElements=this._dummyElements.filter(r=>{const n=r.get();return n&&n!==t}),this._dummyCallbacks.delete(t),this._dummyElements.length===0&&delete this.domChanged}dispose(){var t;const r=(t=this._win)===null||t===void 0?void 0:t.call(this);this._updateTimer&&(r==null||r.clearTimeout(this._updateTimer),delete this._updateTimer),this._updateDummyInputsTimer&&(r==null||r.clearTimeout(this._updateDummyInputsTimer),delete this._updateDummyInputsTimer),this._changedParents=new WeakSet,this._dummyCallbacks=new WeakMap,this._dummyElements=[],this._updateQueue.clear(),delete this.domChanged,delete this._win}updatePositions(t){this._win&&(this._updateQueue.add(t),this._lastUpdateQueueTime=Date.now(),this._scheduledUpdatePositions())}_scheduledUpdatePositions(){var t;this._updateTimer||(this._updateTimer=(t=this._win)===null||t===void 0?void 0:t.call(this).setTimeout(()=>{if(delete this._updateTimer,this._lastUpdateQueueTime+Uf<=Date.now()){const r=new Map,n=[];for(const o of this._updateQueue)n.push(o(r));this._updateQueue.clear();for(const o of n)o();r.clear()}else this._scheduledUpdatePositions()},Uf))}}class q7{constructor(t,r,n,o,i,a,s){this._wrappers=[],this._isOutside=!1,this._transformElements=new Set,this._onFocusIn=(h,g,v)=>{this._onFocus(!0,h,g,v)},this._onFocusOut=(h,g,v)=>{this._onFocus(!1,h,g,v)},this.moveOut=h=>{var g;const v=this._firstDummy,b=this._lastDummy;if(v&&b){this._ensurePosition();const m=v.input,w=b.input,E=(g=this._element)===null||g===void 0?void 0:g.get();if(m&&w&&E){let x;h?(m.tabIndex=0,x=m):(w.tabIndex=0,x=w),x&&Ko(x)}}},this.moveOutWithDefaultAction=(h,g)=>{var v;const b=this._firstDummy,m=this._lastDummy;if(b&&m){this._ensurePosition();const w=b.input,E=m.input,x=(v=this._element)===null||v===void 0?void 0:v.get();if(w&&E&&x){let k;h?!b.isOutside&&this._tabster.focusable.isFocusable(x,!0,!0,!0)?k=x:(b.useDefaultAction=!0,w.tabIndex=0,k=w):(m.useDefaultAction=!0,E.tabIndex=0,k=E),k&&ra({by:"root",owner:x,next:null,relatedEvent:g})&&Ko(k)}}},this.setTabbable=(h,g)=>{var v,b;for(const w of this._wrappers)if(w.manager===h){w.tabbable=g;break}const m=this._getCurrent();if(m){const w=m.tabbable?0:-1;let E=(v=this._firstDummy)===null||v===void 0?void 0:v.input;E&&(E.tabIndex=w),E=(b=this._lastDummy)===null||b===void 0?void 0:b.input,E&&(E.tabIndex=w)}process.env.NODE_ENV==="development"&&(this._firstDummy&&Tn(this._firstDummy,this._wrappers),this._lastDummy&&Tn(this._lastDummy,this._wrappers))},this._addDummyInputs=()=>{this._addTimer||(this._addTimer=this._getWindow().setTimeout(()=>{delete this._addTimer,this._ensurePosition(),process.env.NODE_ENV==="development"&&(this._firstDummy&&Tn(this._firstDummy,this._wrappers),this._lastDummy&&Tn(this._lastDummy,this._wrappers)),this._addTransformOffsets()},0))},this._addTransformOffsets=()=>{this._tabster._dummyObserver.updatePositions(this._computeTransformOffsets)},this._computeTransformOffsets=h=>{var g,v;const b=((g=this._firstDummy)===null||g===void 0?void 0:g.input)||((v=this._lastDummy)===null||v===void 0?void 0:v.input),m=this._transformElements,w=new Set;let E=0,x=0;const k=this._getWindow();for(let I=b;I&&I.nodeType===Node.ELEMENT_NODE;I=I.parentElement){let S=h.get(I);if(S===void 0){const C=k.getComputedStyle(I).transform;C&&C!=="none"&&(S={scrollTop:I.scrollTop,scrollLeft:I.scrollLeft}),h.set(I,S||null)}S&&(w.add(I),m.has(I)||I.addEventListener("scroll",this._addTransformOffsets),E+=S.scrollTop,x+=S.scrollLeft)}for(const I of m)w.has(I)||I.removeEventListener("scroll",this._addTransformOffsets);return this._transformElements=w,()=>{var I,S;(I=this._firstDummy)===null||I===void 0||I.setTopLeft(E,x),(S=this._lastDummy)===null||S===void 0||S.setTopLeft(E,x)}};const l=r.get();if(!l)throw new Error("No element");this._tabster=t,this._getWindow=t.getWindow,this._callForDefaultAction=s;const u=l.__tabsterDummy;if((u||this)._wrappers.push({manager:n,priority:o,tabbable:!0}),u)return process.env.NODE_ENV==="development"&&(this._firstDummy&&Tn(this._firstDummy,u._wrappers),this._lastDummy&&Tn(this._lastDummy,u._wrappers)),u;l.__tabsterDummy=this;const f=i==null?void 0:i.dummyInputsPosition,d=l.tagName;this._isOutside=f?f===k7.Outside:(a||d==="UL"||d==="OL"||d==="TABLE")&&!(d==="LI"||d==="TD"||d==="TH"),this._firstDummy=new ol(this._getWindow,this._isOutside,{isFirst:!0},r),this._lastDummy=new ol(this._getWindow,this._isOutside,{isFirst:!1},r);const p=this._firstDummy.input;p&&t._dummyObserver.add(p,this._addDummyInputs),this._firstDummy.onFocusIn=this._onFocusIn,this._firstDummy.onFocusOut=this._onFocusOut,this._lastDummy.onFocusIn=this._onFocusIn,this._lastDummy.onFocusOut=this._onFocusOut,this._element=r,this._addDummyInputs()}dispose(t,r){var n,o,i,a;const s=this._wrappers=this._wrappers.filter(l=>l.manager!==t&&!r);if(process.env.NODE_ENV==="development"&&(this._firstDummy&&Tn(this._firstDummy,s),this._lastDummy&&Tn(this._lastDummy,s)),s.length===0){delete((n=this._element)===null||n===void 0?void 0:n.get()).__tabsterDummy;for(const f of this._transformElements)f.removeEventListener("scroll",this._addTransformOffsets);this._transformElements.clear();const l=this._getWindow();this._addTimer&&(l.clearTimeout(this._addTimer),delete this._addTimer);const u=(o=this._firstDummy)===null||o===void 0?void 0:o.input;u&&this._tabster._dummyObserver.remove(u),(i=this._firstDummy)===null||i===void 0||i.dispose(),(a=this._lastDummy)===null||a===void 0||a.dispose()}}_onFocus(t,r,n,o){var i;const a=this._getCurrent();a&&(!r.useDefaultAction||this._callForDefaultAction)&&((i=a.manager.getHandler(t))===null||i===void 0||i(r,n,o))}_getCurrent(){return this._wrappers.sort((t,r)=>t.tabbable!==r.tabbable?t.tabbable?-1:1:t.priority-r.priority),this._wrappers[0]}_ensurePosition(){var t,r,n;const o=(t=this._element)===null||t===void 0?void 0:t.get(),i=(r=this._firstDummy)===null||r===void 0?void 0:r.input,a=(n=this._lastDummy)===null||n===void 0?void 0:n.input;if(!(!o||!i||!a))if(this._isOutside){const s=o.parentElement;if(s){const l=o.nextElementSibling;l!==a&&s.insertBefore(a,l),o.previousElementSibling!==i&&s.insertBefore(i,o)}}else{o.lastElementChild!==a&&o.appendChild(a);const s=o.firstElementChild;s&&s!==i&&o.insertBefore(i,s)}}}function Jy(e){let t=null;for(let r=e.lastElementChild;r;r=r.lastElementChild)t=r;return t||void 0}function ta(e,t,r){const n=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,detail:r});return n.details=r,e.dispatchEvent(n),!n.defaultPrevented}function ra(e){return ta(e.owner,P7,e)}/*!
|
|
128
128
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
129
129
|
* Licensed under the MIT License.
|
|
130
|
-
*/function
|
|
130
|
+
*/function Y7(e,t){const r=JSON.stringify(e);return t===!0?r:{[An]:r}}function J7(e,t){for(const r of Object.keys(t)){const n=t[r];n?e[r]=n:delete e[r]}}function X7(e,t,r){let n;if(r){const o=e.getAttribute(An);if(o)try{n=JSON.parse(o)}catch(i){process.env.NODE_ENV==="development"&&console.error(`data-tabster attribute error: ${i}`,e)}}n||(n={}),J7(n,t),Object.keys(n).length>0?e.setAttribute(An,Y7(n,!0)):e.removeAttribute(An)}/*!
|
|
131
131
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
132
132
|
* Licensed under the MIT License.
|
|
133
|
-
*/function
|
|
133
|
+
*/function Xy(e,t,r){if(process.env.NODE_ENV==="development"){const n=e.get();n&&(t?n.style.removeProperty("--tabster-root"):n.style.setProperty("--tabster-root",r+","))}}class Zy extends Vf{constructor(t,r,n,o){super(t,r,G7.Root,o,void 0,!0),this._onDummyInputFocus=i=>{var a;if(i.useDefaultAction)this._setFocused(!1);else{this._tabster.keyboardNavigation.setNavigatingWithKeyboard(!0);const s=this._element.get();if(s){this._setFocused(!0);const l=this._tabster.focusedElement.getFirstOrLastTabbable(i.isFirst,{container:s,ignoreAccessibility:!0});if(l){Ko(l);return}}(a=i.input)===null||a===void 0||a.blur()}},this._setHandlers(this._onDummyInputFocus),this._tabster=t,this._setFocused=n}}class Z7 extends z7{constructor(t,r,n,o,i){super(t,r,o),this._isFocused=!1,this._setFocused=l=>{var u;if(this._setFocusedTimer&&(this._tabster.getWindow().clearTimeout(this._setFocusedTimer),delete this._setFocusedTimer),this._isFocused===l)return;const f=this._element.get();f&&(l?(this._isFocused=!0,(u=this._dummyManager)===null||u===void 0||u.setTabbable(!1),ta(this._tabster.root.eventTarget,"focus",{element:f})):this._setFocusedTimer=this._tabster.getWindow().setTimeout(()=>{var d;delete this._setFocusedTimer,this._isFocused=!1,(d=this._dummyManager)===null||d===void 0||d.setTabbable(!0),ta(this._tabster.root.eventTarget,"blur",{element:f})},0))},this._onFocusIn=l=>{const u=this._tabster.getParent,f=this._element.get();let d=l.target;do{if(d===f){this._setFocused(!0);return}d=d&&u(d)}while(d)},this._onFocusOut=()=>{this._setFocused(!1)},this._onDispose=n;const a=t.getWindow;this.uid=U7(a,r),this._sys=i,(t.controlTab||t.rootDummyInputs)&&this.addDummyInputs();const s=a();s.document.addEventListener("focusin",this._onFocusIn),s.document.addEventListener("focusout",this._onFocusOut),this._add()}addDummyInputs(){this._dummyManager||(this._dummyManager=new Zy(this._tabster,this._element,this._setFocused,this._sys))}dispose(){var t;this._onDispose(this);const r=this._tabster.getWindow();r.document.removeEventListener("focusin",this._onFocusIn),r.document.removeEventListener("focusout",this._onFocusOut),this._setFocusedTimer&&(r.clearTimeout(this._setFocusedTimer),delete this._setFocusedTimer),(t=this._dummyManager)===null||t===void 0||t.dispose(),this._remove()}moveOutWithDefaultAction(t,r){const n=this._dummyManager;if(n)n.moveOutWithDefaultAction(t,r);else{const o=this.getElement();o&&Zy.moveWithPhantomDummy(this._tabster,o,!0,t,r)}}_add(){process.env.NODE_ENV==="development"&&Xy(this._element,!1,this.uid)}_remove(){process.env.NODE_ENV==="development"&&Xy(this._element,!0)}}class Hr{constructor(t,r){this._autoRootWaiting=!1,this._roots={},this._forceDummy=!1,this.rootById={},this._autoRootCreate=()=>{var n;const o=this._win().document,i=o.body;if(i){this._autoRootUnwait(o);const a=this._autoRoot;if(a)return X7(i,{root:a},!0),Vy(this._tabster,i),(n=ro(this._tabster,i))===null||n===void 0?void 0:n.root}else this._autoRootWaiting||(this._autoRootWaiting=!0,o.addEventListener("readystatechange",this._autoRootCreate))},this._onRootDispose=n=>{delete this._roots[n.id]},this._tabster=t,this._win=t.getWindow,this._autoRoot=r,this.eventTarget=N7(this._win),t.queueInit(()=>{this._autoRoot&&this._autoRootCreate()})}_autoRootUnwait(t){t.removeEventListener("readystatechange",this._autoRootCreate),this._autoRootWaiting=!1}dispose(){const t=this._win();this._autoRootUnwait(t.document),delete this._autoRoot,Object.keys(this._roots).forEach(r=>{this._roots[r]&&(this._roots[r].dispose(),delete this._roots[r])}),this.rootById={}}createRoot(t,r,n){process.env.NODE_ENV;const o=new Z7(this._tabster,t,this._onRootDispose,r,n);return this._roots[o.id]=o,this._forceDummy&&o.addDummyInputs(),o}addDummyInputs(){this._forceDummy=!0;const t=this._roots;for(const r of Object.keys(t))t[r].addDummyInputs()}static getRootByUId(t,r){const n=t().__tabsterInstance;return n&&n.root.rootById[r]}static getTabsterContext(t,r,n){n===void 0&&(n={});var o,i,a,s;if(!r.ownerDocument)return;const{checkRtl:l,referenceElement:u}=n,f=t.getParent;t.drainInitQueue();let d,p,h,g,v=!1,b,m,w,E,x=u||r;const k={};for(;x&&(!d||l);){const S=ro(t,x);if(l&&w===void 0){const N=x.dir;N&&(w=N.toLowerCase()==="rtl")}if(!S){x=f(x);continue}const C=x.tagName;(S.uncontrolled||C==="IFRAME"||C==="WEBVIEW")&&(E=x),!g&&(!((o=S.focusable)===null||o===void 0)&&o.excludeFromMover)&&!h&&(v=!0);const P=S.modalizer,F=S.groupper,D=S.mover;!p&&P&&(p=P),!h&&F&&(!p||P)&&(p?(!F.isActive()&&F.getProps().tabbability&&p.userId!==((i=t.modalizer)===null||i===void 0?void 0:i.activeId)&&(p=void 0,h=F),m=F):h=F),!g&&D&&(!p||P)&&(!F||x!==r)&&(g=D,b=!!h&&h!==F),S.root&&(d=S.root),!((a=S.focusable)===null||a===void 0)&&a.ignoreKeydown&&Object.assign(k,S.focusable.ignoreKeydown),x=f(x)}if(!d){const S=t.root;S._autoRoot&&!((s=r.ownerDocument)===null||s===void 0)&&s.body&&(d=S._autoRootCreate())}return h&&!g&&(b=!0),process.env.NODE_ENV==="development"&&!d&&(p||h||g)&&console.error("Tabster Root is required for Mover, Groupper and Modalizer to work."),d?{root:d,modalizer:p,groupper:h,mover:g,groupperBeforeMover:b,modalizerInGroupper:m,rtl:l?!!w:void 0,uncontrolled:E,excludedFromMover:v,ignoreKeydown:S=>!!k[S.key]}:void 0}static getRoot(t,r){var n;const o=t.getParent;for(let i=r;i;i=o(i)){const a=(n=ro(t,i))===null||n===void 0?void 0:n.root;if(a)return a}}onRoot(t,r){r?delete this.rootById[t.uid]:this.rootById[t.uid]=t}}/*!
|
|
134
134
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
135
135
|
* Licensed under the MIT License.
|
|
136
|
-
*/class
|
|
136
|
+
*/class Qy{constructor(){this._callbacks=[]}dispose(){this._callbacks=[],delete this._val}subscribe(t){const r=this._callbacks;r.indexOf(t)<0&&r.push(t)}subscribeFirst(t){const r=this._callbacks,n=r.indexOf(t);n>=0&&r.splice(n,1),r.unshift(t)}unsubscribe(t){const r=this._callbacks.indexOf(t);r>=0&&this._callbacks.splice(r,1)}setVal(t,r){this._val!==t&&(this._val=t,this._callCallbacks(t,r))}getVal(){return this._val}trigger(t,r){this._callCallbacks(t,r)}_callCallbacks(t,r){this._callbacks.forEach(n=>n(t,r))}}/*!
|
|
137
137
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
138
138
|
* Licensed under the MIT License.
|
|
139
|
-
*/class
|
|
139
|
+
*/class Q7{constructor(t){this._tabster=t}dispose(){}getProps(t){const r=ro(this._tabster,t);return r&&r.focusable||{}}isFocusable(t,r,n,o){return W7(t,Wy)&&(r||t.tabIndex!==-1)?(n||this.isVisible(t))&&(o||this.isAccessible(t)):!1}isVisible(t){if(!t.ownerDocument||t.nodeType!==Node.ELEMENT_NODE||t.offsetParent===null&&t.ownerDocument.body!==t)return!1;const r=t.ownerDocument.defaultView;if(!r)return!1;const n=t.ownerDocument.body.getBoundingClientRect();return!(n.width===0&&n.height===0||r.getComputedStyle(t).visibility==="hidden")}isAccessible(t){var r;for(let n=t;n;n=n.parentElement){const o=ro(this._tabster,n);if(this._isHidden(n)||!((r=o==null?void 0:o.focusable)===null||r===void 0?void 0:r.ignoreAriaDisabled)&&this._isDisabled(n))return!1}return!0}_isDisabled(t){return t.hasAttribute("disabled")}_isHidden(t){var r;const n=t.getAttribute("aria-hidden");return!!(n&&n.toLowerCase()==="true"&&!(!((r=this._tabster.modalizer)===null||r===void 0)&&r.isAugmented(t)))}findFirst(t,r){return this.findElement({...t},r)}findLast(t,r){return this.findElement({isBackward:!0,...t},r)}findNext(t,r){return this.findElement({...t},r)}findPrev(t,r){return this.findElement({...t,isBackward:!0},r)}findDefault(t,r){return this.findElement({...t,acceptCondition:n=>this.isFocusable(n,t.includeProgrammaticallyFocusable)&&!!this.getProps(n).isDefault},r)||null}findAll(t){return this._findElements(!0,t)||[]}findElement(t,r){const n=this._findElements(!1,t,r);return n&&n[0]}_findElements(t,r,n){var o,i,a;const{container:s,currentElement:l=null,includeProgrammaticallyFocusable:u,useActiveModalizer:f,ignoreAccessibility:d,modalizerId:p,isBackward:h,onElement:g}=r;n||(n={});const v=[];let{acceptCondition:b}=r;const m=!!b;if(!s)return null;b||(b=k=>this.isFocusable(k,u,!1,d));const w={container:s,modalizerUserId:p===void 0&&f?(o=this._tabster.modalizer)===null||o===void 0?void 0:o.activeId:p||((a=(i=Hr.getTabsterContext(this._tabster,s))===null||i===void 0?void 0:i.modalizer)===null||a===void 0?void 0:a.userId),from:l||s,isBackward:h,acceptCondition:b,hasCustomCondition:m,includeProgrammaticallyFocusable:u,ignoreAccessibility:d,cachedGrouppers:{}},E=Ky(s.ownerDocument,s,k=>this._acceptElement(k,w));if(!E)return null;const x=k=>{var I,S;const C=(I=w.foundElement)!==null&&I!==void 0?I:w.foundBackward;return C&&v.push(C),t?C&&(w.found=!1,delete w.foundElement,delete w.foundBackward,delete w.fromCtx,w.from=C,g&&!g(C))?!1:!!(C||k):(C&&n&&(n.uncontrolled=(S=Hr.getTabsterContext(this._tabster,C))===null||S===void 0?void 0:S.uncontrolled),!!(k&&!C))};if(l||(n.outOfDOMOrder=!0),l)E.currentNode=l;else if(h){const k=Jy(s);if(!k)return null;if(this._acceptElement(k,w)===NodeFilter.FILTER_ACCEPT&&!x(!0))return w.skippedFocusable&&(n.outOfDOMOrder=!0),v;E.currentNode=k}do h?E.previousNode():E.nextNode();while(x());return w.skippedFocusable&&(n.outOfDOMOrder=!0),v.length?v:null}_acceptElement(t,r){var n,o,i,a;if(r.found)return NodeFilter.FILTER_ACCEPT;const s=r.foundBackward;if(s&&(t===s||!s.contains(t)))return r.found=!0,r.foundElement=s,NodeFilter.FILTER_ACCEPT;const l=r.container;if(t===l)return NodeFilter.FILTER_SKIP;if(!l.contains(t)||t.__tabsterDummyContainer||!((n=r.rejectElementsFrom)===null||n===void 0)&&n.contains(t))return NodeFilter.FILTER_REJECT;const u=r.currentCtx=Hr.getTabsterContext(this._tabster,t);if(!u)return NodeFilter.FILTER_SKIP;if(qy(t))return this.isFocusable(t,void 0,!0,!0)&&(r.skippedFocusable=!0),NodeFilter.FILTER_SKIP;if(!r.hasCustomCondition&&(t.tagName==="IFRAME"||t.tagName==="WEBVIEW"))return((o=u.modalizer)===null||o===void 0?void 0:o.userId)===((i=this._tabster.modalizer)===null||i===void 0?void 0:i.activeId)?(r.found=!0,r.rejectElementsFrom=r.foundElement=t,NodeFilter.FILTER_ACCEPT):NodeFilter.FILTER_REJECT;if(!r.ignoreAccessibility&&!this.isAccessible(t))return this.isFocusable(t,!1,!0,!0)&&(r.skippedFocusable=!0),NodeFilter.FILTER_REJECT;let f,d=r.fromCtx;d||(d=r.fromCtx=Hr.getTabsterContext(this._tabster,r.from));const p=d==null?void 0:d.mover;let h=u.groupper,g=u.mover;if(f=(a=this._tabster.modalizer)===null||a===void 0?void 0:a.acceptElement(t,r),f!==void 0&&(r.skippedFocusable=!0),f===void 0&&(h||g||p)){const v=h==null?void 0:h.getElement(),b=p==null?void 0:p.getElement();let m=g==null?void 0:g.getElement();m&&(b!=null&&b.contains(m))&&l.contains(b)&&(!v||!g||b.contains(v))&&(g=p,m=b),v&&(v===l||!l.contains(v))&&(h=void 0),m&&!l.contains(m)&&(g=void 0),h&&g&&(m&&v&&!v.contains(m)?g=void 0:h=void 0),h&&(f=h.acceptElement(t,r)),g&&(f=g.acceptElement(t,r))}return f===void 0&&(f=r.acceptCondition(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,f===NodeFilter.FILTER_SKIP&&this.isFocusable(t,!1,!0,!0)&&(r.skippedFocusable=!0)),f===NodeFilter.FILTER_ACCEPT&&!r.found&&(r.isBackward?(r.foundBackward=t,f=NodeFilter.FILTER_SKIP):(r.found=!0,r.foundElement=t)),f}}/*!
|
|
140
140
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
141
141
|
* Licensed under the MIT License.
|
|
142
|
-
*/const
|
|
142
|
+
*/const eF={Tab:9,Enter:13,Esc:27,Space:32,PageUp:33,PageDown:34,End:35,Home:36,Left:37,Up:38,Right:39,Down:40};/*!
|
|
143
143
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
144
144
|
* Licensed under the MIT License.
|
|
145
|
-
*/function
|
|
145
|
+
*/function tF(e,t){var r;const n=e.getParent;let o=t;do{const i=(r=ro(e,o))===null||r===void 0?void 0:r.uncontrolled;if(i&&e.uncontrolled.isUncontrolledCompletely(o,!!i.completely))return o;o=n(o)}while(o)}class kt extends Qy{constructor(t,r){super(),this._init=()=>{const n=this._win(),o=n.document;o.addEventListener(ea,this._onFocusIn,!0),o.addEventListener("focusout",this._onFocusOut,!0),n.addEventListener("keydown",this._onKeyDown,!0);const i=o.activeElement;i&&i!==o.body&&this._setFocusedElement(i),this.subscribe(this._onChanged)},this._onFocusIn=n=>{this._setFocusedElement(n.target,n.detail.relatedTarget,n.detail.isFocusedProgrammatically)},this._onFocusOut=n=>{this._setFocusedElement(void 0,n.relatedTarget)},this._validateFocusedElement=n=>{},this._onKeyDown=n=>{if(n.keyCode!==eF.Tab||n.ctrlKey)return;const o=this.getVal();if(!o||!o.ownerDocument||o.contentEditable==="true")return;const i=this._tabster,a=i.controlTab,s=Hr.getTabsterContext(i,o);if(!s||s.ignoreKeydown(n))return;const l=n.shiftKey,u=kt.findNextTabbable(i,s,void 0,o,void 0,l,!0),f=s.root.getElement();if(!f)return;const d=u==null?void 0:u.element,p=tF(i,o);if(d){const h=u.uncontrolled;if(s.uncontrolled||h!=null&&h.contains(o)){if(!u.outOfDOMOrder&&h===s.uncontrolled||p&&!p.contains(d))return;Vf.addPhantomDummyWithTarget(i,o,l,d);return}if(h||d.tagName==="IFRAME"){ra({by:"root",owner:f,next:d,relatedEvent:n})&&Vf.moveWithPhantomDummy(this._tabster,h??d,!1,l,n);return}(a||u!=null&&u.outOfDOMOrder)&&ra({by:"root",owner:f,next:d,relatedEvent:n})&&(n.preventDefault(),n.stopImmediatePropagation(),Ko(d))}else!p&&ra({by:"root",owner:f,next:null,relatedEvent:n})&&s.root.moveOutWithDefaultAction(l,n)},this._onChanged=(n,o)=>{var i,a;if(n)ta(n,T7,o);else{const s=(i=this._lastVal)===null||i===void 0?void 0:i.get();if(s){const l={...o},u=Hr.getTabsterContext(this._tabster,s),f=(a=u==null?void 0:u.modalizer)===null||a===void 0?void 0:a.userId;f&&(l.modalizerId=f),ta(s,I7,l)}}},this._tabster=t,this._win=r,t.queueInit(this._init)}dispose(){super.dispose();const t=this._win();t.document.removeEventListener(ea,this._onFocusIn,!0),t.document.removeEventListener("focusout",this._onFocusOut,!0),t.removeEventListener("keydown",this._onKeyDown,!0),this.unsubscribe(this._onChanged),delete kt._lastResetElement,delete this._nextVal,delete this._lastVal}static forgetMemorized(t,r){var n,o;let i=kt._lastResetElement,a=i&&i.get();a&&r.contains(a)&&delete kt._lastResetElement,a=(o=(n=t._nextVal)===null||n===void 0?void 0:n.element)===null||o===void 0?void 0:o.get(),a&&r.contains(a)&&delete t._nextVal,i=t._lastVal,a=i&&i.get(),a&&r.contains(a)&&delete t._lastVal}getFocusedElement(){return this.getVal()}getLastFocusedElement(){var t;let r=(t=this._lastVal)===null||t===void 0?void 0:t.get();return(!r||r&&!Wf(r.ownerDocument,r))&&(this._lastVal=r=void 0),r}focus(t,r,n){return this._tabster.focusable.isFocusable(t,r,!1,n)?(t.focus(),!0):!1}focusDefault(t){const r=this._tabster.focusable.findDefault({container:t});return r?(this._tabster.focusedElement.focus(r),!0):!1}getFirstOrLastTabbable(t,r){var n;const{container:o,ignoreAccessibility:i}=r;let a;if(o){const s=Hr.getTabsterContext(this._tabster,o);s&&(a=(n=kt.findNextTabbable(this._tabster,s,o,void 0,void 0,!t,i))===null||n===void 0?void 0:n.element)}return a&&!(o!=null&&o.contains(a))&&(a=void 0),a||void 0}_focusFirstOrLast(t,r){const n=this.getFirstOrLastTabbable(t,r);return n?(this.focus(n,!1,!0),!0):!1}focusFirst(t){return this._focusFirstOrLast(!0,t)}focusLast(t){return this._focusFirstOrLast(!1,t)}resetFocus(t){if(!this._tabster.focusable.isVisible(t))return!1;if(this._tabster.focusable.isFocusable(t,!0,!0,!0))this.focus(t);else{const r=t.getAttribute("tabindex"),n=t.getAttribute("aria-hidden");t.tabIndex=-1,t.setAttribute("aria-hidden","true"),kt._lastResetElement=new On(this._win,t),this.focus(t,!0,!0),this._setOrRemoveAttribute(t,"tabindex",r),this._setOrRemoveAttribute(t,"aria-hidden",n)}return!0}_setOrRemoveAttribute(t,r,n){n===null?t.removeAttribute(r):t.setAttribute(r,n)}_setFocusedElement(t,r,n){var o,i;if(this._tabster._noop)return;const a={relatedTarget:r};if(t){const l=(o=kt._lastResetElement)===null||o===void 0?void 0:o.get();if(kt._lastResetElement=void 0,l===t||qy(t))return;a.isFocusedProgrammatically=n;const u=Hr.getTabsterContext(this._tabster,t),f=(i=u==null?void 0:u.modalizer)===null||i===void 0?void 0:i.userId;f&&(a.modalizerId=f)}const s=this._nextVal={element:t?new On(this._win,t):void 0,details:a};t&&t!==this._val&&this._validateFocusedElement(t),this._nextVal===s&&this.setVal(t,a),this._nextVal=void 0}setVal(t,r){super.setVal(t,r),t&&(this._lastVal=new On(this._win,t))}static findNextTabbable(t,r,n,o,i,a,s){const l=n||r.root.getElement();if(!l)return null;let u=null;const f=kt._isTabbingTimer,d=t.getWindow();f&&d.clearTimeout(f),kt.isTabbing=!0,kt._isTabbingTimer=d.setTimeout(()=>{delete kt._isTabbingTimer,kt.isTabbing=!1},0);const p=r.modalizer,h=r.groupper,g=r.mover,v=b=>{var m;if(u=b.findNextTabbable(o,i,a,s),o&&!(u!=null&&u.element)){const w=b!==p&&((m=b.getElement())===null||m===void 0?void 0:m.parentElement);if(w){const E=Hr.getTabsterContext(t,o,{referenceElement:w});if(E){const x=b.getElement(),k=a?x:x&&Jy(x)||x;k&&(u=kt.findNextTabbable(t,E,n,k,w,a,s),u&&(u.outOfDOMOrder=!0))}}}};if(h&&g)v(r.groupperBeforeMover?h:g);else if(h)v(h);else if(g)v(g);else if(p)v(p);else{const b={container:l,currentElement:o,referenceElement:i,ignoreAccessibility:s,useActiveModalizer:!0},m={};u={element:t.focusable[a?"findPrev":"findNext"](b,m),outOfDOMOrder:m.outOfDOMOrder,uncontrolled:m.uncontrolled}}return u}}kt.isTabbing=!1;/*!
|
|
146
146
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
147
147
|
* Licensed under the MIT License.
|
|
148
|
-
*/class
|
|
148
|
+
*/class rF extends Qy{constructor(t){super(),this._onChange=r=>{this.setVal(r,void 0)},this._keyborg=A7(t()),this._keyborg.subscribe(this._onChange)}dispose(){super.dispose(),this._keyborg&&(this._keyborg.unsubscribe(this._onChange),O7(this._keyborg),delete this._keyborg)}setNavigatingWithKeyboard(t){var r;(r=this._keyborg)===null||r===void 0||r.setVal(t)}isNavigatingWithKeyboard(){var t;return!!(!((t=this._keyborg)===null||t===void 0)&&t.isNavigatingWithKeyboard())}}/*!
|
|
149
149
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
150
150
|
* Licensed under the MIT License.
|
|
151
|
-
*/function
|
|
151
|
+
*/function nF(e,t,r,n){if(typeof MutationObserver>"u")return()=>{};const o=t.getWindow;let i;const a=f=>{var d,p,h,g,v;for(const b of f){const m=b.target,w=b.removedNodes,E=b.addedNodes;if(b.type==="attributes")b.attributeName===An&&r(t,m);else{for(let x=0;x<w.length;x++)s(w[x],!0),(p=(d=t._dummyObserver).domChanged)===null||p===void 0||p.call(d,m);for(let x=0;x<E.length;x++)s(E[x]),(g=(h=t._dummyObserver).domChanged)===null||g===void 0||g.call(h,m)}}(v=t.modalizer)===null||v===void 0||v.hiddenUpdate()};function s(f,d){i||(i=no(o).elementByUId),l(f,d);const p=Ky(e,f,h=>l(h,d));if(p)for(;p.nextNode(););}function l(f,d){var p;if(!f.getAttribute)return NodeFilter.FILTER_SKIP;const h=f.__tabsterElementUID;return h&&i&&(d?delete i[h]:(p=i[h])!==null&&p!==void 0||(i[h]=new On(o,f))),(ro(t,f)||f.hasAttribute(An))&&r(t,f,d),NodeFilter.FILTER_SKIP}const u=new MutationObserver(a);return n&&s(o().document.body),u.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[An]}),()=>{u.disconnect()}}/*!
|
|
152
152
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
153
153
|
* Licensed under the MIT License.
|
|
154
|
-
*/class
|
|
154
|
+
*/class oF{constructor(t){this._isUncontrolledCompletely=t}isUncontrolledCompletely(t,r){var n;const o=(n=this._isUncontrolledCompletely)===null||n===void 0?void 0:n.call(this,t,r);return o===void 0?r:o}}/*!
|
|
155
155
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
156
156
|
* Licensed under the MIT License.
|
|
157
|
-
*/class
|
|
157
|
+
*/class iF{constructor(t){this.keyboardNavigation=t.keyboardNavigation,this.focusedElement=t.focusedElement,this.focusable=t.focusable,this.root=t.root,this.uncontrolled=t.uncontrolled,this.core=t}}class aF{constructor(t,r){var n,o;this._forgetMemorizedElements=[],this._wrappers=new Set,this._initQueue=[],this._version="5.3.0",this._noop=!1,this.getWindow=()=>{if(!this._win)throw new Error("Using disposed Tabster.");return this._win},this._storage=M7(t),this._win=t;const i=this.getWindow;this.keyboardNavigation=new rF(i),this.focusedElement=new kt(this,i),this.focusable=new Q7(this),this.root=new Hr(this,r==null?void 0:r.autoRoot),this.uncontrolled=new oF((r==null?void 0:r.checkUncontrolledCompletely)||(r==null?void 0:r.checkUncontrolledTrappingFocus)),this.controlTab=(n=r==null?void 0:r.controlTab)!==null&&n!==void 0?n:!0,this.rootDummyInputs=!!(r!=null&&r.rootDummyInputs),this._dummyObserver=new K7(i),this.getParent=(o=r==null?void 0:r.getParent)!==null&&o!==void 0?o:a=>a.parentElement,this.internal={stopObserver:()=>{this._unobserve&&(this._unobserve(),delete this._unobserve)},resumeObserver:a=>{if(!this._unobserve){const s=i().document;this._unobserve=nF(s,this,Vy,a)}}},Gy(i),this.queueInit(()=>{this.internal.resumeObserver(!0)})}_mergeProps(t){var r;t&&(this.getParent=(r=t.getParent)!==null&&r!==void 0?r:this.getParent)}createTabster(t,r){const n=new iF(this);return t||this._wrappers.add(n),this._mergeProps(r),n}disposeTabster(t,r){r?this._wrappers.clear():this._wrappers.delete(t),this._wrappers.size===0&&this.dispose()}dispose(){var t,r,n,o,i,a,s,l;this.internal.stopObserver();const u=this._win;u==null||u.clearTimeout(this._initTimer),delete this._initTimer,this._initQueue=[],this._forgetMemorizedElements=[],u&&this._forgetMemorizedTimer&&(u.clearTimeout(this._forgetMemorizedTimer),delete this._forgetMemorizedTimer),(t=this.outline)===null||t===void 0||t.dispose(),(r=this.crossOrigin)===null||r===void 0||r.dispose(),(n=this.deloser)===null||n===void 0||n.dispose(),(o=this.groupper)===null||o===void 0||o.dispose(),(i=this.mover)===null||i===void 0||i.dispose(),(a=this.modalizer)===null||a===void 0||a.dispose(),(s=this.observedElement)===null||s===void 0||s.dispose(),(l=this.restorer)===null||l===void 0||l.dispose(),this.keyboardNavigation.dispose(),this.focusable.dispose(),this.focusedElement.dispose(),this.root.dispose(),this._dummyObserver.dispose(),j7(this.getWindow),Yy(this.getWindow),this._storage=new WeakMap,this._wrappers.clear(),u&&(L7(u),delete u.__tabsterInstance,delete this._win)}storageEntry(t,r){const n=this._storage;let o=n.get(t);return o?r===!1&&Object.keys(o).length===0&&n.delete(t):r===!0&&(o={},n.set(t,o)),o}forceCleanup(){this._win&&(this._forgetMemorizedElements.push(this._win.document.body),!this._forgetMemorizedTimer&&(this._forgetMemorizedTimer=this._win.setTimeout(()=>{delete this._forgetMemorizedTimer;for(let t=this._forgetMemorizedElements.shift();t;t=this._forgetMemorizedElements.shift())Yy(this.getWindow,t),kt.forgetMemorized(this.focusedElement,t)},0),zy(this.getWindow,!0)))}queueInit(t){var r;this._win&&(this._initQueue.push(t),this._initTimer||(this._initTimer=(r=this._win)===null||r===void 0?void 0:r.setTimeout(()=>{delete this._initTimer,this.drainInitQueue()},0)))}drainInitQueue(){if(!this._win)return;const t=this._initQueue;this._initQueue=[],t.forEach(r=>r())}}function sF(e,t){let r=cF(e);return r?r.createTabster(!1,t):(r=new aF(e,t),e.__tabsterInstance=r,r.createTabster())}function lF(e,t){e.core.disposeTabster(e,t)}function cF(e){return e.__tabsterInstance}const e1=ve.createContext(void 0),uF={targetDocument:typeof document=="object"?document:void 0,dir:"ltr"};e1.Provider;function t1(){var e;return(e=ve.useContext(e1))!==null&&e!==void 0?e:uF}function fF(){return typeof window<"u"&&!!(window.document&&window.document.createElement)}const dF=fF()?ve.useLayoutEffect:ve.useEffect;function pF(e){return e&&!!e._virtual}function hF(e){return pF(e)&&e._virtual.parent||null}function gF(e,t={}){if(!e)return null;if(!t.skipVirtual){const r=hF(e);if(r)return r}return(e==null?void 0:e.parentNode)||null}const vF=()=>{const{targetDocument:e}=t1(),t=(e==null?void 0:e.defaultView)||void 0,r=ve.useMemo(()=>t?sF(t,{autoRoot:{},controlTab:!1,getParent:gF,checkUncontrolledTrappingFocus:n=>{var o;return!!(!((o=n.firstElementChild)===null||o===void 0)&&o.hasAttribute("data-is-focus-trap-zone-bumper"))}}):null,[t]);return dF(()=>()=>{r&&lF(r)},[r]),r},mF=()=>{const e=vF(),{targetDocument:t}=t1(),r=ve.useCallback((s,l)=>(e==null?void 0:e.focusable.findAll({container:s,acceptCondition:l}))||[],[e]),n=ve.useCallback(s=>e==null?void 0:e.focusable.findFirst({container:s}),[e]),o=ve.useCallback(s=>e==null?void 0:e.focusable.findLast({container:s}),[e]),i=ve.useCallback((s,l={})=>{if(!e||!t)return null;const{container:u=t.body}=l;return e.focusable.findNext({currentElement:s,container:u})},[e,t]),a=ve.useCallback((s,l={})=>{if(!e||!t)return null;const{container:u=t.body}=l;return e.focusable.findPrev({currentElement:s,container:u})},[e,t]);return{findAllFocusable:r,findFirstFocusable:n,findLastFocusable:o,findNextFocusable:i,findPrevFocusable:a}},Hf="Viewport",bF="ViewportViews",r1="ViewportView",[yF,Zj]=Pr(Hf,[]),[wF,_F]=yF(Hf),n1=({__viewportScope:e,classNames:t,children:r,defaultActiveView:n,activeView:o,focusManaged:i=!1,onActiveViewChange:a,...s})=>{const[l="never",u]=qr({prop:o,defaultProp:n,onChange:a});return c.createElement(wF,{focusManaged:i,activeView:l,setActiveView:u,scope:e},c.createElement("div",{role:"region","aria-live":"polite",...s,className:ue("is-full overflow-hidden",t)},r))};n1.displayName=Hf;const o1=({classNames:e,children:t,...r})=>{const n={inlineSize:`${Math.ceil(t.length)*100}%`};return c.createElement("div",{role:"none",style:n,...r,className:ue("flex",e)},t)};o1.displayName=bF;const i1=c.forwardRef(({__viewportScope:e,classNames:t,children:r,id:n,...o},i)=>{const{activeView:a,focusManaged:s}=_F(r1,e),l=n===a,u=Bl(i),{findFirstFocusable:f}=mF();return c.useEffect(()=>{var d;!s&&l&&document.body.hasAttribute("data-is-keyboard")&&u.current&&((d=f(u.current))==null||d.focus())},[s,u.current,l]),c.createElement("section",{...o,...!l&&{"aria-hidden":!0},className:ue("min-is-0 flex-1 flex flex-col",l?"order-2":"order-4 invisible",t),ref:u},r)});i1.displayName=r1;const at={Root:n1,Views:o1,View:i1};c.forwardRef(({space:e,onClick:t},r)=>{const n=e.key.toHex(),o=Et("identityListItem__label"),i=vs(n??"",12),a=e.properties.name??DD(e.key.toHex());return c.createElement("li",{className:ue("flex gap-2 items-center mbe-2",t&&"cursor-pointer"),onClick:()=>t==null?void 0:t(),ref:r,"data-testid":"space-list-item"},c.createElement(Tt.Root,{labelId:o},c.createElement(Tt.Frame,null,c.createElement(Tt.Fallback,{href:i})),c.createElement(Tt.Label,{classNames:"text-sm truncate"},a)))});var zf={exports:{}},Gf={},il={exports:{}},Kf={};/**
|
|
158
158
|
* @license React
|
|
159
159
|
* use-sync-external-store-shim.production.min.js
|
|
160
160
|
*
|
|
@@ -162,7 +162,7 @@ ${fD()}`,n,o),e.method=eD(e);const t=(r,n,o={},i,a)=>{e._config.processors.forEa
|
|
|
162
162
|
*
|
|
163
163
|
* This source code is licensed under the MIT license found in the
|
|
164
164
|
* LICENSE file in the root directory of this source tree.
|
|
165
|
-
*/var
|
|
165
|
+
*/var a1;function EF(){if(a1)return Kf;a1=1;var e=c;function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,p){var h=p(),g=n({inst:{value:h,getSnapshot:p}}),v=g[0].inst,b=g[1];return i(function(){v.value=h,v.getSnapshot=p,l(v)&&b({inst:v})},[d,h,p]),o(function(){return l(v)&&b({inst:v}),d(function(){l(v)&&b({inst:v})})},[d]),a(h),h}function l(d){var p=d.getSnapshot;d=d.value;try{var h=p();return!r(d,h)}catch{return!0}}function u(d,p){return p()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return Kf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,Kf}var qf={};/**
|
|
166
166
|
* @license React
|
|
167
167
|
* use-sync-external-store-shim.development.js
|
|
168
168
|
*
|
|
@@ -170,7 +170,7 @@ ${fD()}`,n,o),e.method=eD(e);const t=(r,n,o={},i,a)=>{e._config.processors.forEa
|
|
|
170
170
|
*
|
|
171
171
|
* This source code is licensed under the MIT license found in the
|
|
172
172
|
* LICENSE file in the root directory of this source tree.
|
|
173
|
-
*/var
|
|
173
|
+
*/var s1;function xF(){return s1||(s1=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 e=c,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(E){{for(var x=arguments.length,k=new Array(x>1?x-1:0),I=1;I<x;I++)k[I-1]=arguments[I];n("error",E,k)}}function n(E,x,k){{var I=t.ReactDebugCurrentFrame,S=I.getStackAddendum();S!==""&&(x+="%s",k=k.concat([S]));var C=k.map(function(P){return String(P)});C.unshift("Warning: "+x),Function.prototype.apply.call(console[E],console,C)}}function o(E,x){return E===x&&(E!==0||1/E===1/x)||E!==E&&x!==x}var i=typeof Object.is=="function"?Object.is:o,a=e.useState,s=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue,f=!1,d=!1;function p(E,x,k){f||e.startTransition!==void 0&&(f=!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 I=x();if(!d){var S=x();i(I,S)||(r("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var C=a({inst:{value:I,getSnapshot:x}}),P=C[0].inst,F=C[1];return l(function(){P.value=I,P.getSnapshot=x,h(P)&&F({inst:P})},[E,I,x]),s(function(){h(P)&&F({inst:P});var D=function(){h(P)&&F({inst:P})};return E(D)},[E]),u(I),I}function h(E){var x=E.getSnapshot,k=E.value;try{var I=x();return!i(k,I)}catch{return!0}}function g(E,x,k){return x()}var v=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b=!v,m=b?g:p,w=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m;qf.useSyncExternalStore=w,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),qf}var l1;function c1(){return l1||(l1=1,process.env.NODE_ENV==="production"?il.exports=EF():il.exports=xF()),il.exports}/**
|
|
174
174
|
* @license React
|
|
175
175
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
176
176
|
*
|
|
@@ -178,7 +178,7 @@ ${fD()}`,n,o),e.method=eD(e);const t=(r,n,o={},i,a)=>{e._config.processors.forEa
|
|
|
178
178
|
*
|
|
179
179
|
* This source code is licensed under the MIT license found in the
|
|
180
180
|
* LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/var
|
|
181
|
+
*/var u1;function SF(){if(u1)return Gf;u1=1;var e=c,t=c1();function r(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Gf.useSyncExternalStoreWithSelector=function(u,f,d,p,h){var g=i(null);if(g.current===null){var v={hasValue:!1,value:null};g.current=v}else v=g.current;g=s(function(){function m(I){if(!w){if(w=!0,E=I,I=p(I),h!==void 0&&v.hasValue){var S=v.value;if(h(S,I))return x=S}return x=I}if(S=x,n(E,I))return S;var C=p(I);return h!==void 0&&h(S,C)?S:(E=I,x=C)}var w=!1,E,x,k=d===void 0?null:d;return[function(){return m(f())},k===null?void 0:function(){return m(k())}]},[f,d,p,h]);var b=o(u,g[0],g[1]);return a(function(){v.hasValue=!0,v.value=b},[b]),l(b),b},Gf}var Yf={};/**
|
|
182
182
|
* @license React
|
|
183
183
|
* use-sync-external-store-shim/with-selector.development.js
|
|
184
184
|
*
|
|
@@ -186,7 +186,7 @@ ${fD()}`,n,o),e.method=eD(e);const t=(r,n,o={},i,a)=>{e._config.processors.forEa
|
|
|
186
186
|
*
|
|
187
187
|
* This source code is licensed under the MIT license found in the
|
|
188
188
|
* LICENSE file in the root directory of this source tree.
|
|
189
|
-
*/var
|
|
189
|
+
*/var f1;function $F(){return f1||(f1=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 e=c,t=c1();function r(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function u(f,d,p,h,g){var v=i(null),b;v.current===null?(b={hasValue:!1,value:null},v.current=b):b=v.current;var m=s(function(){var k=!1,I,S,C=function(N){if(!k){k=!0,I=N;var J=h(N);if(g!==void 0&&b.hasValue){var G=b.value;if(g(G,J))return S=G,G}return S=J,J}var Y=I,te=S;if(n(Y,N))return te;var oe=h(N);return g!==void 0&&g(te,oe)?te:(I=N,S=oe,oe)},P=p===void 0?null:p,F=function(){return C(d())},D=P===null?void 0:function(){return C(P())};return[F,D]},[d,p,h,g]),w=m[0],E=m[1],x=o(f,w,E);return a(function(){b.hasValue=!0,b.value=x},[x]),l(x),x}Yf.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Yf}process.env.NODE_ENV==="production"?zf.exports=SF():zf.exports=$F();var CF=zf.exports;/*! *****************************************************************************
|
|
190
190
|
Copyright (c) Microsoft Corporation.
|
|
191
191
|
|
|
192
192
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -199,12 +199,12 @@ ${fD()}`,n,o),e.method=eD(e);const t=(r,n,o={},i,a)=>{e._config.processors.forEa
|
|
|
199
199
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
200
200
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
201
201
|
PERFORMANCE OF THIS SOFTWARE.
|
|
202
|
-
***************************************************************************** */var ye=function(){return ye=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},ye.apply(this,arguments)};function Df(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Ke(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function et(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function vt(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var ut;(function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"})(ut||(ut={}));var Ro;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(Ro||(Ro={}));var Lf=ut.Start,Mf=ut.Stop,qi=ut.Raise,Ys=ut.Send,Wy=ut.Cancel,IM=ut.NullEvent,Ff=ut.Assign;ut.After,ut.DoneState;var Vy=ut.Log,PM=ut.Init,jf=ut.Invoke;ut.ErrorExecution;var Hy=ut.ErrorPlatform,kM=ut.ErrorCustom,zy=ut.Update,NM=ut.Choose,DM=ut.Pure,Gy=".",Ky={},Bf="xstate.guard",LM="",St=process.env.NODE_ENV==="production",Js;function Rf(e,t,r){r===void 0&&(r=Gy);var n=Yi(e,r),o=Yi(t,r);return tt(o)?tt(n)?o===n:!1:tt(n)?n in o:Object.keys(n).every(function(i){return i in o?Rf(n[i],o[i]):!1})}function qy(e){try{return tt(e)||typeof e=="number"?"".concat(e):e.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function Uf(e,t){try{return Uo(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function MM(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function Yi(e,t){if(MM(e))return e.value;if(Uo(e))return Xs(e);if(typeof e!="string")return e;var r=Uf(e,t);return Xs(r)}function Xs(e){if(e.length===1)return e[0];for(var t={},r=t,n=0;n<e.length-1;n++)n===e.length-2?r[e[n]]=e[n+1]:(r[e[n]]={},r=r[e[n]]);return t}function Ji(e,t){for(var r={},n=Object.keys(e),o=0;o<n.length;o++){var i=n[o];r[i]=t(e[i],i,e,o)}return r}function Yy(e,t,r){var n,o,i={};try{for(var a=Ke(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,u=e[l];r(u)&&(i[l]=t(u,l,e))}}catch(f){n={error:f}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i}var FM=function(e){return function(t){var r,n,o=t;try{for(var i=Ke(e),a=i.next();!a.done;a=i.next()){var s=a.value;o=o[s]}}catch(l){r={error:l}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o}};function jM(e,t){return function(r){var n,o,i=r;try{for(var a=Ke(e),s=a.next();!s.done;s=a.next()){var l=s.value;i=i[t][l]}}catch(u){n={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i}}function Zs(e){if(!e)return[[]];if(tt(e))return[[e]];var t=wt(Object.keys(e).map(function(r){var n=e[r];return typeof n!="string"&&(!n||!Object.keys(n).length)?[[r]]:Zs(e[r]).map(function(o){return[r].concat(o)})}));return t}function wt(e){var t;return(t=[]).concat.apply(t,vt([],et(e),!1))}function Jy(e){return Uo(e)?e:[e]}function Er(e){return e===void 0?[]:Jy(e)}function Qs(e,t,r){var n,o;if(ot(e))return e(t,r.data);var i={};try{for(var a=Ke(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,u=e[l];ot(u)?i[l]=u(t,r.data):i[l]=u}}catch(f){n={error:f}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i}function BM(e){return/^(done|error)\./.test(e)}function Xy(e){return!!(e instanceof Promise||e!==null&&(ot(e)||typeof e=="object")&&ot(e.then))}function RM(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function UM(e,t){var r,n,o=et([[],[]],2),i=o[0],a=o[1];try{for(var s=Ke(e),l=s.next();!l.done;l=s.next()){var u=l.value;t(u)?i.push(u):a.push(u)}}catch(f){r={error:f}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return[i,a]}function Zy(e,t){return Ji(e.states,function(r,n){if(r){var o=(tt(t)?void 0:t[n])||(r?r.current:void 0);if(o)return{current:o,states:Zy(r,o)}}})}function WM(e,t){return{current:t,states:Zy(e,t)}}function Qy(e,t,r,n){St||Dt(!!e,"Attempting to update undefined context");var o=e&&r.reduce(function(i,a){var s,l,u=a.assignment,f={state:n,action:a,_event:t},d={};if(ot(u))d=u(i,t.data,f);else try{for(var p=Ke(Object.keys(u)),h=p.next();!h.done;h=p.next()){var g=h.value,v=u[g];d[g]=ot(v)?v(i,t.data,f):v}}catch(y){s={error:y}}finally{try{h&&!h.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}return Object.assign({},i,d)},e);return o}var Dt=function(){};St||(Dt=function(e,t){var r=e instanceof Error?e:void 0;if(!(!r&&e)&&console!==void 0){var n=["Warning: ".concat(t)];r&&n.push(r),console.warn.apply(console,n)}});function Uo(e){return Array.isArray(e)}function ot(e){return typeof e=="function"}function tt(e){return typeof e=="string"}function e1(e,t){if(e)return tt(e)?{type:Bf,name:e,predicate:t?t[e]:void 0}:ot(e)?{type:Bf,name:e.name,predicate:e}:e}function VM(e){try{return"subscribe"in e&&ot(e.subscribe)}catch{return!1}}var Sn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();Js={},Js[Sn]=function(){return this},Js[Symbol.observable]=function(){return this};function to(e){return!!e&&"__xstatenode"in e}function HM(e){return!!e&&typeof e.send=="function"}function el(e,t){return tt(e)||typeof e=="number"?ye({type:e},t):e}function Lt(e,t){if(!tt(e)&&"$$type"in e&&e.$$type==="scxml")return e;var r=el(e);return ye({name:r.type,data:r,$$type:"scxml",type:"external"},t)}function Wo(e,t){var r=Jy(t).map(function(n){return typeof n>"u"||typeof n=="string"||to(n)?{target:n,event:e}:ye(ye({},n),{event:e})});return r}function zM(e){if(!(e===void 0||e===LM))return Er(e)}function GM(e,t,r){if(!St){var n=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(r,"', error was '").concat(e,"'.").concat(n));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(r,"'. ")+"Original error: '".concat(e,"'. ").concat(n," Current error is '").concat(t,"'.").concat(o))}}}function t1(e,t,r,n,o){var i=e.options.guards,a={state:o,cond:t,_event:n};if(t.type===Bf)return(i?.[t.name]||t.predicate)(r,n.data,a);var s=i?.[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(r,n.data,a)}function r1(e){return typeof e=="string"?{type:e}:e}function tl(e,t,r){var n=function(){},o=typeof e=="object",i=o?e:null;return{next:((o?e.next:e)||n).bind(i),error:((o?e.error:t)||n).bind(i),complete:((o?e.complete:r)||n).bind(i)}}function rl(e,t){return"".concat(e,":invocation[").concat(t,"]")}function Wf(e){return(e.type===qi||e.type===Ys&&e.to===Ro.Internal)&&typeof e.delay!="number"}var Vo=Lt({type:PM});function Vf(e,t){return t&&t[e]||void 0}function Xi(e,t){var r;if(tt(e)||typeof e=="number"){var n=Vf(e,t);ot(n)?r={type:e,exec:n}:n?r=n:r={type:e,exec:void 0}}else if(ot(e))r={type:e.name||e.toString(),exec:e};else{var n=Vf(e.type,t);if(ot(n))r=ye(ye({},e),{exec:n});else if(n){var o=n.type||e.type;r=ye(ye(ye({},n),e),{type:o})}else r=e}return r}var $n=function(e,t){if(!e)return[];var r=Uo(e)?e:[e];return r.map(function(n){return Xi(n,t)})};function Hf(e){var t=Xi(e);return ye(ye({id:tt(e)?e:t.id},t),{type:t.type})}function KM(e,t){return{type:qi,event:typeof e=="function"?e:el(e),delay:t?t.delay:void 0,id:t?.id}}function qM(e,t,r,n){var o={_event:r},i=Lt(ot(e.event)?e.event(t,r.data,o):e.event),a;if(tt(e.delay)){var s=n&&n[e.delay];a=ot(s)?s(t,r.data,o):s}else a=ot(e.delay)?e.delay(t,r.data,o):e.delay;return ye(ye({},e),{type:qi,_event:i,delay:a})}function YM(e,t){return{to:t?t.to:void 0,type:Ys,event:ot(e)?e:el(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:ot(e)?e.name:qy(e)}}function JM(e,t,r,n){var o={_event:r},i=Lt(ot(e.event)?e.event(t,r.data,o):e.event),a;if(tt(e.delay)){var s=n&&n[e.delay];a=ot(s)?s(t,r.data,o):s}else a=ot(e.delay)?e.delay(t,r.data,o):e.delay;var l=ot(e.to)?e.to(t,r.data,o):e.to;return ye(ye({},e),{to:l,_event:i,event:i.data,delay:a})}var XM=function(e,t,r){return ye(ye({},e),{value:tt(e.expr)?e.expr:e.expr(t,r.data,{_event:r})})},ZM=function(e){return{type:Wy,sendId:e}};function QM(e){var t=Hf(e);return{type:ut.Start,activity:t,exec:void 0}}function eF(e){var t=ot(e)?e:Hf(e);return{type:ut.Stop,activity:t,exec:void 0}}function tF(e,t,r){var n=ot(e.activity)?e.activity(t,r.data):e.activity,o=typeof n=="string"?{id:n}:n,i={type:ut.Stop,activity:o};return i}var rF=function(e){return{type:Ff,assignment:e}};function nF(e,t){var r=t?"#".concat(t):"";return"".concat(ut.After,"(").concat(e,")").concat(r)}function nl(e,t){var r="".concat(ut.DoneState,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function ol(e,t){var r="".concat(ut.DoneInvoke,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function Zi(e,t){var r="".concat(ut.ErrorPlatform,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}var oF=function(e){var t,r,n=[];try{for(var o=Ke(e),i=o.next();!i.done;i=o.next())for(var a=i.value,s=0;s<a.actions.length;){if(a.actions[s].type===Ff){n.push(a.actions[s]),a.actions.splice(s,1);continue}s++}}catch(l){t={error:l}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n};function il(e,t,r,n,o,i,a){a===void 0&&(a=!1);var s=a?[]:oF(o),l=s.length?Qy(r,n,s,t):r,u=a?[r]:void 0,f=[];function d(g,v){var y;switch(v.type){case qi:{var m=qM(v,l,n,e.options.delays);return i&&typeof m.delay=="number"&&i(m,l,n),m}case Ys:var w=JM(v,l,n,e.options.delays);if(!St){var E=v.delay;Dt(!tt(E)||typeof w.delay=="number","No delay reference for delay expression '".concat(E,"' was found on machine '").concat(e.id,"'"))}return i&&w.to!==Ro.Internal&&(g==="entry"?f.push(w):i(w,l,n)),w;case Vy:{var x=XM(v,l,n);return i?.(x,l,n),x}case NM:{var P=v,I=(y=P.conds.find(function(oe){var le=e1(oe.cond,e.options.guards);return!le||t1(e,le,l,n,i?void 0:t)}))===null||y===void 0?void 0:y.actions;if(!I)return[];var S=et(il(e,t,l,n,[{type:g,actions:$n(Er(I),e.options.actions)}],i,a),2),O=S[0],k=S[1];return l=k,u?.push(l),O}case DM:{var I=v.get(l,n.data);if(!I)return[];var j=et(il(e,t,l,n,[{type:g,actions:$n(Er(I),e.options.actions)}],i,a),2),D=j[0],N=j[1];return l=N,u?.push(l),D}case Mf:{var x=tF(v,l,n);return i?.(x,r,n),x}case Ff:{l=Qy(l,n,[v],i?void 0:t),u?.push(l);break}default:var J=Xi(v,e.options.actions),K=J.exec;if(i)i(J,l,n);else if(K&&u){var Y=u.length-1,te=ye(ye({},J),{exec:function(oe){for(var le=[],ae=1;ae<arguments.length;ae++)le[ae-1]=arguments[ae];K.apply(void 0,vt([u[Y]],et(le),!1))}});J=te}return J}}function p(g){var v,y,m=[];try{for(var w=Ke(g.actions),E=w.next();!E.done;E=w.next()){var x=E.value,P=d(g.type,x);P&&(m=m.concat(P))}}catch(I){v={error:I}}finally{try{E&&!E.done&&(y=w.return)&&y.call(w)}finally{if(v)throw v.error}}return f.forEach(function(I){i(I,l,n)}),f.length=0,m}var h=wt(o.map(p));return[h,l]}var n1=[],Ho=function(e,t){n1.push(e);var r=t(e);return n1.pop(),r};function o1(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[Sn]=function(){return this},t}function iF(e,t,r,n){var o,i=r1(e.src),a=(o=t?.options.services)===null||o===void 0?void 0:o[i.type],s=e.data?Qs(e.data,r,n):void 0,l=a?i1(a,e.id,s):o1(e.id);return l.meta=e,l}function i1(e,t,r){var n=o1(t);if(n.deferred=!0,to(e)){var o=n.state=Ho(void 0,function(){return(r?e.withContext(r):e).initialState});n.getSnapshot=function(){return o}}return n}function aF(e){try{return typeof e.send=="function"}catch{return!1}}function sF(e){return aF(e)&&"id"in e}function lF(e){var t;return ye((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[Sn]=function(){return this},t),e)}var al=function(e){return e.type==="atomic"||e.type==="final"};function a1(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function Qi(e){return a1(e).filter(function(t){return t.type!=="history"})}function s1(e){var t=[e];return al(e)?t:t.concat(wt(Qi(e).map(s1)))}function ea(e,t){var r,n,o,i,a,s,l,u,f=new Set(e),d=zf(f),p=new Set(t);try{for(var h=Ke(p),g=h.next();!g.done;g=h.next())for(var v=g.value,y=v.parent;y&&!p.has(y);)p.add(y),y=y.parent}catch(k){r={error:k}}finally{try{g&&!g.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}var m=zf(p);try{for(var w=Ke(p),E=w.next();!E.done;E=w.next()){var v=E.value;if(v.type==="compound"&&(!m.get(v)||!m.get(v).length))d.get(v)?d.get(v).forEach(function(j){return p.add(j)}):v.initialStateNodes.forEach(function(j){return p.add(j)});else if(v.type==="parallel")try{for(var x=(a=void 0,Ke(Qi(v))),P=x.next();!P.done;P=x.next()){var I=P.value;p.has(I)||(p.add(I),d.get(I)?d.get(I).forEach(function(j){return p.add(j)}):I.initialStateNodes.forEach(function(j){return p.add(j)}))}}catch(j){a={error:j}}finally{try{P&&!P.done&&(s=x.return)&&s.call(x)}finally{if(a)throw a.error}}}}catch(k){o={error:k}}finally{try{E&&!E.done&&(i=w.return)&&i.call(w)}finally{if(o)throw o.error}}try{for(var S=Ke(p),O=S.next();!O.done;O=S.next())for(var v=O.value,y=v.parent;y&&!p.has(y);)p.add(y),y=y.parent}catch(k){l={error:k}}finally{try{O&&!O.done&&(u=S.return)&&u.call(S)}finally{if(l)throw l.error}}return p}function l1(e,t){var r=t.get(e);if(!r)return{};if(e.type==="compound"){var n=r[0];if(n){if(al(n))return n.key}else return{}}var o={};return r.forEach(function(i){o[i.key]=l1(i,t)}),o}function zf(e){var t,r,n=new Map;try{for(var o=Ke(e),i=o.next();!i.done;i=o.next()){var a=i.value;n.has(a)||n.set(a,[]),a.parent&&(n.has(a.parent)||n.set(a.parent,[]),n.get(a.parent).push(a))}}catch(s){t={error:s}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n}function cF(e,t){var r=ea([e],t);return l1(e,zf(r))}function ta(e,t){return Array.isArray(e)?e.some(function(r){return r===t}):e instanceof Set?e.has(t):!1}function uF(e){return vt([],et(new Set(wt(vt([],et(e.map(function(t){return t.ownEvents})),!1)))),!1)}function sl(e,t){return t.type==="compound"?Qi(t).some(function(r){return r.type==="final"&&ta(e,r)}):t.type==="parallel"?Qi(t).every(function(r){return sl(e,r)}):!1}function fF(e){return e===void 0&&(e=[]),e.reduce(function(t,r){return r.meta!==void 0&&(t[r.id]=r.meta),t},{})}function c1(e){return new Set(wt(e.map(function(t){return t.tags})))}function u1(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(tt(e)||tt(t))return e===t;var r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(function(o){return u1(e[o],t[o])})}function dF(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}function pF(e,t){var r=e.exec,n=ye(ye({},e),{exec:r!==void 0?function(){return r(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0});return n}var ur=function(){function e(t){var r=this,n;this.actions=[],this.activities=Ky,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||Ky,this.meta=fF(t.configuration),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=(n=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&n!==void 0?n:new Set,this.machine=t.machine,Object.defineProperty(this,"nextEvents",{get:function(){return uF(r.configuration)}})}return e.from=function(t,r){if(t instanceof e)return t.context!==r?new e({value:t.value,context:r,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t;var n=Vo;return new e({value:t,context:r,_event:n,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,r){if(t instanceof e){if(!t.actions.length)return t;var n=Vo;return new e({value:t.value,context:r,_event:n,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,r)},e.prototype.toStrings=function(t,r){var n=this;if(t===void 0&&(t=this.value),r===void 0&&(r="."),tt(t))return[t];var o=Object.keys(t);return o.concat.apply(o,vt([],et(o.map(function(i){return n.toStrings(t[i],r).map(function(a){return i+r+a})})),!1))},e.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var r=t.tags;t.machine;var n=Df(t,["configuration","transitions","tags","machine"]);return ye(ye({},n),{tags:Array.from(r)})},e.prototype.matches=function(t){return Rf(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var r;St&&Dt(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=(r=this.machine)===null||r===void 0?void 0:r.getTransitionData(this,t);return!!n?.transitions.length&&n.transitions.some(function(o){return o.target!==void 0||o.actions.length})},e}(),hF={deferEvents:!1},f1=function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=ye(ye({},hF),t)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(r){throw this.clear(),r}finally{this.processingEvent=!1}},e}(),Gf=new Map,gF=0,ra={bookId:function(){return"x:".concat(gF++)},register:function(e,t){return Gf.set(e,t),e},get:function(e){return Gf.get(e)},free:function(e){Gf.delete(e)}};function Kf(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;St||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues")}function vF(){var e=Kf();if(e&&"__xstate__"in e)return e.__xstate__}function mF(e){if(Kf()){var t=vF();t&&t.register(e)}}function bF(e,t){t===void 0&&(t={});var r=e.initialState,n=new Set,o=[],i=!1,a=function(){if(!i){for(i=!0;o.length>0;){var u=o.shift();r=e.transition(r,u,l),n.forEach(function(f){return f.next(r)})}i=!1}},s=lF({id:t.id,send:function(u){o.push(u),a()},getSnapshot:function(){return r},subscribe:function(u,f,d){var p=tl(u,f,d);return n.add(p),p.next(r),{unsubscribe:function(){n.delete(p)}}}}),l={parent:t.parent,self:s,id:t.id||"anonymous",observers:n};return r=e.start?e.start(l):r,s}var yF={sync:!1,autoForward:!1},Et;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Et||(Et={}));var wF=function(){function e(t,r){r===void 0&&(r=e.defaultOptions);var n=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Et.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(f,d){if(Uo(f))return n.batch(f),n.state;var p=Lt(el(f,d));if(n.status===Et.Stopped)return St||Dt(!1,'Event "'.concat(p.name,'" was sent to stopped service "').concat(n.machine.id,`". This service has already reached its final state, and will not transition.
|
|
203
|
-
Event: `).concat(JSON.stringify(p.data))),n.state;if(n.status!==
|
|
204
|
-
Event: `).concat(JSON.stringify(p.data)));return n.scheduler.schedule(function(){n.forward(p);var h=n._nextState(p);n.update(h,p)}),n._state},this.sendTo=function(f,d,p){var h=n.parent&&(d===
|
|
205
|
-
Event: `).concat(JSON.stringify(event)));else if(this.status!==Et.Running)throw new Error("".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(t.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var o,i,a=r.state,s=!1,l=[],u=function(h){var g=Lt(h);r.forward(g),a=Ho(r,function(){return r.machine.transition(a,g,void 0,n||void 0)}),l.push.apply(l,vt([],et(r.machine.config.predictableActionArguments?a.actions:a.actions.map(function(v){return pF(v,a)})),!1)),s=s||!!a.changed};try{for(var f=Ke(t),d=f.next();!d.done;d=f.next()){var p=d.value;u(p)}}catch(h){o={error:h}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}a.changed=s,a.actions=l,r.update(a,Lt(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,r){var n=this;r===void 0&&(r=!!this.machine.config.predictableActionArguments&&this._exec);var o=Lt(t);if(o.name.indexOf(Hy)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(Hy)===0}))throw o.data.data;var i=Ho(this,function(){return n.machine.transition(n.state,o,void 0,r||void 0)});return i},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var r,n;try{for(var o=Ke(this.forwardTo),i=o.next();!i.done;i=o.next()){var a=i.value,s=this.children.get(a);if(!s)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));s.send(t)}}catch(l){r={error:l}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},e.prototype.defer=function(t){var r=this,n=this.clock.setTimeout(function(){"to"in t&&t.to?r.sendTo(t._event,t.to,!0):r.send(t._event)},t.delay);t.id&&(this.delayedEventsMap[t.id]=n)},e.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},e.prototype.exec=function(t,r,n){n===void 0&&(n=this.machine.options.actions),this._exec(t,r.context,r._event,n)},e.prototype.removeChild=function(t){var r;this.children.delete(t),this.forwardTo.delete(t),(r=this.state)===null||r===void 0||delete r.children[t]},e.prototype.stopChild=function(t){var r=this.children.get(t);r&&(this.removeChild(t),ot(r.stop)&&r.stop())},e.prototype.spawn=function(t,r,n){if(this.status!==Et.Running)return i1(t,r);if(Xy(t))return this.spawnPromise(Promise.resolve(t),r);if(ot(t))return this.spawnCallback(t,r);if(sF(t))return this.spawnActor(t,r);if(VM(t))return this.spawnObservable(t,r);if(to(t))return this.spawnMachine(t,ye(ye({},n),{id:r}));if(RM(t))return this.spawnBehavior(t,r);throw new Error('Unable to spawn entity "'.concat(r,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,r){var n=this;r===void 0&&(r={});var o=new e(t,ye(ye({},this.options),{parent:this,id:r.id||t.id})),i=ye(ye({},yF),r);i.sync&&o.onTransition(function(s){n.send(zy,{state:s,id:o.id})});var a=o;return this.children.set(o.id,a),i.autoForward&&this.forwardTo.add(o.id),o.onDone(function(s){n.removeChild(o.id),n.send(Lt(s,{origin:o.id}))}).start(),a},e.prototype.spawnBehavior=function(t,r){var n=bF(t,{id:r,parent:this});return this.children.set(r,n),n},e.prototype.spawnPromise=function(t,r){var n,o=this,i=!1,a;t.then(function(l){i||(a=l,o.removeChild(r),o.send(Lt(ol(r,l),{origin:r})))},function(l){if(!i){o.removeChild(r);var u=Zi(r,l);try{o.send(Lt(u,{origin:r}))}catch(f){GM(l,f,r),o.devTools&&o.devTools.send(u,o.state),o.machine.strict&&o.stop()}}});var s=(n={id:r,send:function(){},subscribe:function(l,u,f){var d=tl(l,u,f),p=!1;return t.then(function(h){p||(d.next(h),!p&&d.complete())},function(h){p||d.error(h)}),{unsubscribe:function(){return p=!0}}},stop:function(){i=!0},toJSON:function(){return{id:r}},getSnapshot:function(){return a}},n[Sn]=function(){return this},n);return this.children.set(r,s),s},e.prototype.spawnCallback=function(t,r){var n,o=this,i=!1,a=new Set,s=new Set,l,u=function(p){l=p,s.forEach(function(h){return h(p)}),!i&&o.send(Lt(p,{origin:r}))},f;try{f=t(u,function(p){a.add(p)})}catch(p){this.send(Zi(r,p))}if(Xy(f))return this.spawnPromise(f,r);var d=(n={id:r,send:function(p){return a.forEach(function(h){return h(p)})},subscribe:function(p){var h=tl(p);return s.add(h.next),{unsubscribe:function(){s.delete(h.next)}}},stop:function(){i=!0,ot(f)&&f()},toJSON:function(){return{id:r}},getSnapshot:function(){return l}},n[Sn]=function(){return this},n);return this.children.set(r,d),d},e.prototype.spawnObservable=function(t,r){var n,o=this,i,a=t.subscribe(function(l){i=l,o.send(Lt(l,{origin:r}))},function(l){o.removeChild(r),o.send(Lt(Zi(r,l),{origin:r}))},function(){o.removeChild(r),o.send(Lt(ol(r),{origin:r}))}),s=(n={id:r,send:function(){},subscribe:function(l,u,f){return t.subscribe(l,u,f)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return i},toJSON:function(){return{id:r}}},n[Sn]=function(){return this},n);return this.children.set(r,s),s},e.prototype.spawnActor=function(t,r){return this.children.set(r,t),t},e.prototype.spawnActivity=function(t){var r=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(!r){St||Dt(!1,"No implementation found for activity '".concat(t.type,"'"));return}var n=r(this.state.context,t);this.spawnEffect(t.id,n)},e.prototype.spawnEffect=function(t,r){var n;this.children.set(t,(n={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:r||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},n[Sn]=function(){return this},n))},e.prototype.attachDev=function(){var t=Kf();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var r=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(ye(ye({name:this.id,autoPause:!0,stateSanitizer:function(n){return{value:n.value,context:n.context,actions:n.actions}}},r),{features:ye({jump:!1,skip:!1},r?r.features:void 0)}),this.machine),this.devTools.init(this.state)}mF(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[Sn]=function(){return this},e.prototype.getSnapshot=function(){return this.status===Et.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(t,r){return setTimeout(t,r)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=d1,e}();function d1(e,t){var r=new wF(e,t);return r}function _F(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function ll(e){return ye(ye({type:jf},e),{toJSON:function(){e.onDone,e.onError;var t=Df(e,["onDone","onError"]);return ye(ye({},t),{type:jf,src:_F(e.src)})}})}var zo="",qf="#",na="*",Go={},Ko=function(e){return e[0]===qf},EF=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},xF=function(e,t,r){var n=r.slice(0,-1).some(function(i){return!("cond"in i)&&!("in"in i)&&(tt(i.target)||to(i.target))}),o=t===zo?"the transient event":"event '".concat(t,"'");Dt(!n,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")},SF=function(){function e(t,r,n,o){n===void 0&&(n="context"in t?t.context:void 0);var i=this,a;this.config=t,this._context=n,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(EF(),r),this.parent=o?.parent,this.key=this.config.key||o?.key||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:Gy),this.id=this.config.id||vt([this.machine.key],et(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{},this.description=this.config.description,St||Dt(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?Ji(this.config.states,function(u,f){var d,p=new e(u,{},void 0,{parent:i,key:f});return Object.assign(i.idMap,ye((d={},d[p.id]=p,d),p.idMap)),p}):Go;var s=0;function l(u){var f,d;u.order=s++;try{for(var p=Ke(a1(u)),h=p.next();!h.done;h=p.next()){var g=h.value;l(g)}}catch(v){f={error:v}}finally{try{h&&!h.done&&(d=p.return)&&d.call(p)}finally{if(f)throw f.error}}}l(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(u){var f=u.event;return f===zo}):zo in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Er(this.config.entry||this.config.onEntry).map(function(u){return Xi(u)}),this.onExit=Er(this.config.exit||this.config.onExit).map(function(u){return Xi(u)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=Er(this.config.invoke).map(function(u,f){var d,p;if(to(u)){var h=rl(i.id,f);return i.machine.options.services=ye((d={},d[h]=u,d),i.machine.options.services),ll({src:h,id:h})}else if(tt(u.src)){var h=u.id||rl(i.id,f);return ll(ye(ye({},u),{id:h,src:u.src}))}else if(to(u.src)||ot(u.src)){var h=u.id||rl(i.id,f);return i.machine.options.services=ye((p={},p[h]=u.src,p),i.machine.options.services),ll(ye(ye({id:h},u),{src:h}))}else{var g=u.src;return ll(ye(ye({id:rl(i.id,f)},u),{src:g}))}}),this.activities=Er(this.config.activities).concat(this.invoke).map(function(u){return Hf(u)}),this.transition=this.transition.bind(this),this.tags=Er(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||s1(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,r){var n=this.options,o=n.actions,i=n.activities,a=n.guards,s=n.services,l=n.delays;return new e(this.config,{actions:ye(ye({},o),t.actions),activities:ye(ye({},i),t.activities),guards:ye(ye({},a),t.guards),services:ye(ye({},s),t.services),delays:ye(ye({},l),t.delays)},r??this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return ot(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Ji(this.states,function(t){return t.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce(function(r,n){return r[n.eventType]=r[n.eventType]||[],r[n.eventType].push(n),r},{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var r=t===zo,n=this.transitions.filter(function(o){var i=o.eventType===t;return r?i:i||o.eventType===na});return this.__cache.candidates[t]=n,n},e.prototype.getDelayedTransitions=function(){var t=this,r=this.config.after;if(!r)return[];var n=function(i,a){var s=ot(i)?"".concat(t.id,":delay[").concat(a,"]"):i,l=nF(s,t.id);return t.onEntry.push(YM(l,{delay:i})),t.onExit.push(ZM(l)),l},o=Uo(r)?r.map(function(i,a){var s=n(i.delay,a);return ye(ye({},i),{event:s})}):wt(Object.keys(r).map(function(i,a){var s=r[i],l=tt(s)?{target:s}:s,u=isNaN(+i)?i:+i,f=n(u,a);return Er(l).map(function(d){return ye(ye({},d),{event:f,delay:u})})}));return o.map(function(i){var a=i.delay;return ye(ye({},t.formatTransition(i)),{delay:a})})},e.prototype.getStateNodes=function(t){var r,n=this;if(!t)return[];var o=t instanceof ur?t.value:Yi(t,this.delimiter);if(tt(o)){var i=this.getStateNode(o).initial;return i!==void 0?this.getStateNodes((r={},r[o]=i,r)):[this,this.states[o]]}var a=Object.keys(o),s=[this];return s.push.apply(s,vt([],et(wt(a.map(function(l){return n.getStateNode(l).getStateNodes(o[l])}))),!1)),s},e.prototype.handles=function(t){var r=qy(t);return this.events.includes(r)},e.prototype.resolveState=function(t){var r=t instanceof ur?t:ur.create(t),n=Array.from(ea([],this.getStateNodes(r.value)));return new ur(ye(ye({},r),{value:this.resolve(r.value),configuration:n,done:sl(n,this),tags:c1(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,r,n){var o=this.getStateNode(t),i=o.next(r,n);return!i||!i.transitions.length?this.next(r,n):i},e.prototype.transitionCompoundNode=function(t,r,n){var o=Object.keys(t),i=this.getStateNode(o[0]),a=i._transition(t[o[0]],r,n);return!a||!a.transitions.length?this.next(r,n):a},e.prototype.transitionParallelNode=function(t,r,n){var o,i,a={};try{for(var s=Ke(Object.keys(t)),l=s.next();!l.done;l=s.next()){var u=l.value,f=t[u];if(f){var d=this.getStateNode(u),p=d._transition(f,r,n);p&&(a[u]=p)}}}catch(m){o={error:m}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}var h=Object.keys(a).map(function(m){return a[m]}),g=wt(h.map(function(m){return m.transitions})),v=h.some(function(m){return m.transitions.length>0});if(!v)return this.next(r,n);var y=wt(Object.keys(a).map(function(m){return a[m].configuration}));return{transitions:g,exitSet:wt(h.map(function(m){return m.exitSet})),configuration:y,source:r,actions:wt(Object.keys(a).map(function(m){return a[m].actions}))}},e.prototype._transition=function(t,r,n){return tt(t)?this.transitionLeafNode(t,r,n):Object.keys(t).length===1?this.transitionCompoundNode(t,r,n):this.transitionParallelNode(t,r,n)},e.prototype.getTransitionData=function(t,r){return this._transition(t.value,t,Lt(r))},e.prototype.next=function(t,r){var n,o,i=this,a=r.name,s=[],l=[],u;try{for(var f=Ke(this.getCandidates(a)),d=f.next();!d.done;d=f.next()){var p=d.value,h=p.cond,g=p.in,v=t.context,y=g?tt(g)&&Ko(g)?t.matches(Yi(this.getStateNodeById(g).path,this.delimiter)):Rf(Yi(g,this.delimiter),FM(this.path.slice(0,-2))(t.value)):!0,m=!1;try{m=!h||t1(this.machine,h,v,r,t)}catch(x){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
|
|
206
|
-
`).concat(x.message))}if(m&&y){p.target!==void 0&&(l=p.target),s.push.apply(s,vt([],et(p.actions),!1)),u=p;break}}}catch(x){n={error:x}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}if(u){if(!l.length)return{transitions:[u],exitSet:[],configuration:t.value?[this]:[],source:t,actions:s};var w=wt(l.map(function(x){return i.getRelativeStateNodes(x,t.historyValue)})),E=!!u.internal;return{transitions:[u],exitSet:E?[]:wt(l.map(function(x){return i.getPotentiallyReenteringNodes(x)})),configuration:w,source:t,actions:s}}},e.prototype.getPotentiallyReenteringNodes=function(t){if(this.order<t.order)return[this];for(var r=[],n=this,o=t;n&&n!==o;)r.push(n),n=n.parent;return n!==o?[]:(r.push(o),r)},e.prototype.getActions=function(t,r,n,o,i,a,s){var l,u,f,d,p=this,h=a?ea([],this.getStateNodes(a.value)):[],g=new Set;try{for(var v=Ke(Array.from(t).sort(function(D,N){return D.order-N.order})),y=v.next();!y.done;y=v.next()){var m=y.value;(!ta(h,m)||ta(n.exitSet,m)||m.parent&&g.has(m.parent))&&g.add(m)}}catch(D){l={error:D}}finally{try{y&&!y.done&&(u=v.return)&&u.call(v)}finally{if(l)throw l.error}}try{for(var w=Ke(h),E=w.next();!E.done;E=w.next()){var m=E.value;(!ta(t,m)||ta(n.exitSet,m.parent))&&n.exitSet.push(m)}}catch(D){f={error:D}}finally{try{E&&!E.done&&(d=w.return)&&d.call(w)}finally{if(f)throw f.error}}n.exitSet.sort(function(D,N){return N.order-D.order});var x=Array.from(g).sort(function(D,N){return D.order-N.order}),P=new Set(n.exitSet),I=wt(x.map(function(D){var N=[];if(D.type!=="final")return N;var J=D.parent;if(!J.parent)return N;N.push(nl(D.id,D.doneData),nl(J.id,D.doneData?Qs(D.doneData,o,i):void 0));var K=J.parent;return K.type==="parallel"&&Qi(K).every(function(Y){return sl(n.configuration,Y)})&&N.push(nl(K.id)),N})),S=x.map(function(D){var N=D.onEntry,J=D.activities.map(function(K){return QM(K)});return{type:"entry",actions:$n(s?vt(vt([],et(N),!1),et(J),!1):vt(vt([],et(J),!1),et(N),!1),p.machine.options.actions)}}).concat({type:"state_done",actions:I.map(function(D){return KM(D)})}),O=Array.from(P).map(function(D){return{type:"exit",actions:$n(vt(vt([],et(D.onExit),!1),et(D.activities.map(function(N){return eF(N)})),!1),p.machine.options.actions)}}),k=O.concat({type:"transition",actions:$n(n.actions,this.machine.options.actions)}).concat(S);if(r){var j=$n(wt(vt([],et(t),!1).sort(function(D,N){return N.order-D.order}).map(function(D){return D.onExit})),this.machine.options.actions).filter(function(D){return!Wf(D)});return k.concat({type:"stop",actions:j})}return k},e.prototype.transition=function(t,r,n,o){t===void 0&&(t=this.initialState);var i=Lt(r),a;if(t instanceof ur)a=n===void 0?t:this.resolveState(ur.from(t,n));else{var s=tt(t)?this.resolve(Xs(this.getResolvedPath(t))):this.resolve(t),l=n??this.machine.context;a=this.resolveState(ur.from(s,l))}if(!St&&i.name===na)throw new Error("An event cannot have the wildcard type ('".concat(na,"')"));if(this.strict&&!this.events.includes(i.name)&&!BM(i.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(i.name,"'"));var u=this._transition(a.value,a,i)||{transitions:[],configuration:[],exitSet:[],source:a,actions:[]},f=ea([],this.getStateNodes(a.value)),d=u.configuration.length?ea(f,u.configuration):f;return u.configuration=vt([],et(d),!1),this.resolveTransition(u,a,a.context,o,i)},e.prototype.resolveRaisedTransition=function(t,r,n,o){var i,a=t.actions;return t=this.transition(t,r,void 0,o),t._event=n,t.event=n.data,(i=t.actions).unshift.apply(i,vt([],et(a),!1)),t},e.prototype.resolveTransition=function(t,r,n,o,i){var a,s,l,u,f=this;i===void 0&&(i=Vo);var d=t.configuration,p=!r||t.transitions.length>0,h=p?t.configuration:r?r.configuration:[],g=sl(h,this),v=p?cF(this.machine,d):void 0,y=r?r.historyValue?r.historyValue:t.source?this.machine.historyValue(r.value):void 0:void 0,m=this.getActions(new Set(h),g,t,n,i,r,o),w=r?ye({},r.activities):{};try{for(var E=Ke(m),x=E.next();!x.done;x=E.next()){var P=x.value;try{for(var I=(l=void 0,Ke(P.actions)),S=I.next();!S.done;S=I.next()){var O=S.value;O.type===Lf?w[O.activity.id||O.activity.type]=O:O.type===Mf&&(w[O.activity.id||O.activity.type]=!1)}}catch(re){l={error:re}}finally{try{S&&!S.done&&(u=I.return)&&u.call(I)}finally{if(l)throw l.error}}}}catch(re){a={error:re}}finally{try{x&&!x.done&&(s=E.return)&&s.call(E)}finally{if(a)throw a.error}}var k=et(il(this,r,n,i,m,o,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),j=k[0],D=k[1],N=et(UM(j,Wf),2),J=N[0],K=N[1],Y=j.filter(function(re){var de;return re.type===Lf&&((de=re.activity)===null||de===void 0?void 0:de.type)===jf}),te=Y.reduce(function(re,de){return re[de.activity.id]=iF(de.activity,f.machine,D,i),re},r?ye({},r.children):{}),oe=new ur({value:v||r.value,context:D,_event:i,_sessionid:r?r._sessionid:null,historyValue:v?y?WM(y,v):void 0:r?r.historyValue:void 0,history:!v||t.source?r:void 0,actions:v?K:[],activities:v?w:r?r.activities:{},events:[],configuration:h,transitions:t.transitions,children:te,done:g,tags:c1(h),machine:this}),le=n!==D;oe.changed=i.name===zy||le;var ae=oe.history;ae&&delete ae.history;var ge=!g&&(this._transient||d.some(function(re){return re._transient}));if(!p&&(!ge||i.name===zo))return oe;var ce=oe;if(!g)for(ge&&(ce=this.resolveRaisedTransition(ce,{type:IM},i,o));J.length;){var q=J.shift();ce=this.resolveRaisedTransition(ce,q._event,i,o)}var V=ce.changed||(ae?!!ce.actions.length||le||typeof ae.value!=typeof ce.value||!u1(ce.value,ae.value):void 0);return ce.changed=V,ce.history=ae,ce},e.prototype.getStateNode=function(t){if(Ko(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."));var r=this.states[t];if(!r)throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"));return r},e.prototype.getStateNodeById=function(t){var r=Ko(t)?t.slice(qf.length):t;if(r===this.id)return this;var n=this.machine.idMap[r];if(!n)throw new Error("Child state node '#".concat(r,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(t){if(typeof t=="string"&&Ko(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var r=Uf(t,this.delimiter).slice(),n=this;r.length;){var o=r.shift();if(!o.length)break;n=n.getStateNode(o)}return n},e.prototype.resolve=function(t){var r,n=this;if(!t)return this.initialStateValue||Go;switch(this.type){case"parallel":return Ji(this.initialStateValue,function(i,a){return i?n.getStateNode(a).resolve(t[a]||i):Go});case"compound":if(tt(t)){var o=this.getStateNode(t);return o.type==="parallel"||o.type==="compound"?(r={},r[t]=o.initialStateValue,r):t}return Object.keys(t).length?Ji(t,function(i,a){return i?n.getStateNode(a).resolve(i):Go}):this.initialStateValue||{};default:return t||Go}},e.prototype.getResolvedPath=function(t){if(Ko(t)){var r=this.machine.idMap[t.slice(qf.length)];if(!r)throw new Error("Unable to find state node '".concat(t,"'"));return r.path}return Uf(t,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var r;if(this.type==="parallel")r=Yy(this.states,function(n){return n.initialStateValue||Go},function(n){return n.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));r=al(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else r={};return this.__cache.initialStateValue=r,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(t,r){this._init();var n=this.getStateNodes(t);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,r??this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var t;if(this.type==="history"){var r=this.config;tt(r.target)?t=Ko(r.target)?Xs(this.machine.getStateNodeById(r.target).path.slice(this.path.length-1)):r.target:t=r.target}return t},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(t,r,n){return n===void 0&&(n=!0),n?t.type==="history"?t.resolveHistory(r):t.initialStateNodes:[t]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var t=this;if(al(this))return[this];if(this.type==="compound"&&!this.initial)return St||Dt(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var r=Zs(this.initialStateValue);return wt(r.map(function(n){return t.getFromRelativePath(n)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var r=et(t),n=r[0],o=r.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var i=this.getStateNode(n);if(i.type==="history")return i.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(o)},e.prototype.historyValue=function(t){if(Object.keys(this.states).length)return{current:t||this.initialStateValue,states:Yy(this.states,function(r,n){if(!t)return r.historyValue();var o=tt(t)?void 0:t[n];return r.historyValue(o||r.initialStateValue)},function(r){return!r.history})}},e.prototype.resolveHistory=function(t){var r=this;if(this.type!=="history")return[this];var n=this.parent;if(!t){var o=this.target;return o?wt(Zs(o).map(function(a){return n.getFromRelativePath(a)})):n.initialStateNodes}var i=jM(n.path,"states")(t).current;return tt(i)?[n.getStateNode(i)]:wt(Zs(i).map(function(a){return r.history==="deep"?n.getFromRelativePath(a):[n.states[a[0]]]}))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var t=this,r=wt(Object.keys(this.states).map(function(n){return t.states[n].stateIds}));return[this.id].concat(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var t,r,n,o;if(this.__cache.events)return this.__cache.events;var i=this.states,a=new Set(this.ownEvents);if(i)try{for(var s=Ke(Object.keys(i)),l=s.next();!l.done;l=s.next()){var u=l.value,f=i[u];if(f.states)try{for(var d=(n=void 0,Ke(f.events)),p=d.next();!p.done;p=d.next()){var h=p.value;a.add("".concat(h))}}catch(g){n={error:g}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}}}catch(g){t={error:g}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter(function(r){return!(!r.target&&!r.actions.length&&r.internal)}).map(function(r){return r.eventType}));return Array.from(t)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(t){var r=this;if(t!==void 0)return t.map(function(n){if(!tt(n))return n;var o=n[0]===r.delimiter;if(o&&!r.parent)return r.getStateNodeByPath(n.slice(1));var i=o?r.key+n:n;if(r.parent)try{var a=r.parent.getStateNodeByPath(i);return a}catch(s){throw new Error("Invalid transition definition for state node '".concat(r.id,`':
|
|
207
|
-
`).concat(s.message))}else return r.getStateNodeByPath(i)})},e.prototype.formatTransition=function(t){var r=this,n=zM(t.target),o="internal"in t?t.internal:n?n.some(function(l){return tt(l)&&l[0]===r.delimiter}):!0,i=this.machine.options.guards,a=this.resolveTarget(n),s=ye(ye({},t),{actions:$n(Er(t.actions)),cond:e1(t.cond,i),target:a,source:this,internal:o,eventType:t.event,toJSON:function(){return ye(ye({},s),{target:s.target?s.target.map(function(l){return"#".concat(l.id)}):void 0,source:"#".concat(r.id)})}});return s},e.prototype.formatTransitions=function(){var t,r,n=this,o;if(!this.config.on)o=[];else if(Array.isArray(this.config.on))o=this.config.on;else{var i=this.config.on,a=na,s=i[a],l=s===void 0?[]:s,u=Df(i,[typeof a=="symbol"?a:a+""]);o=wt(Object.keys(u).map(function(w){!St&&w===zo&&Dt(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(n.id,'".'));var E=Wo(w,u[w]);return St||xF(n,w,E),E}).concat(Wo(na,l)))}var f=this.config.always?Wo("",this.config.always):[],d=this.config.onDone?Wo(String(nl(this.id)),this.config.onDone):[];St||Dt(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var p=wt(this.invoke.map(function(w){var E=[];return w.onDone&&E.push.apply(E,vt([],et(Wo(String(ol(w.id)),w.onDone)),!1)),w.onError&&E.push.apply(E,vt([],et(Wo(String(Zi(w.id)),w.onError)),!1)),E})),h=this.after,g=wt(vt(vt(vt(vt([],et(d),!1),et(p),!1),et(o),!1),et(f),!1).map(function(w){return Er(w).map(function(E){return n.formatTransition(E)})}));try{for(var v=Ke(h),y=v.next();!y.done;y=v.next()){var m=y.value;g.push(m)}}catch(w){t={error:w}}finally{try{y&&!y.done&&(r=v.return)&&r.call(v)}finally{if(t)throw t.error}}return g},e}(),p1=!1;function Yf(e,t){return!St&&!("predictableActionArguments"in e)&&!p1&&(p1=!0,console.warn("It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html")),new SF(e,t)}var zt=rF,$F=c.useLayoutEffect;function h1(e){var t=ve.useRef();return t.current||(t.current={v:e()}),t.current.v}var cl=globalThis&&globalThis.__assign||function(){return cl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},cl.apply(this,arguments)},CF=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r},AF=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i};function OF(e,t){var r=h1(function(){return typeof e=="function"?e():e});if(process.env.NODE_ENV!=="production"&&typeof e!="function"){var n=AF(c.useState(r),1),o=n[0];e!==o&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var i=t.context,a=t.guards,s=t.actions,l=t.activities,u=t.services,f=t.delays;t.state;var d=CF(t,["context","guards","actions","activities","services","delays","state"]),p=h1(function(){var h={context:i,guards:a,actions:s,activities:l,services:u,delays:f},g=r.withConfig(h,function(){return cl(cl({},r.context),i)});return d1(g,d)});return $F(function(){Object.assign(p.machine.options.actions,s),Object.assign(p.machine.options.guards,a),Object.assign(p.machine.options.activities,l),Object.assign(p.machine.options.services,u),Object.assign(p.machine.options.delays,f)},[s,a,l,u,f]),p}globalThis&&globalThis.__read,globalThis&&globalThis.__values;function TF(e,t,r){if(e.status===Et.NotStarted)return!0;var n=r.changed===void 0&&(Object.keys(r.children).length>0||typeof t.changed=="boolean");return!(r.changed||n)}var IF=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i};function PF(e){return e}function Jf(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=IF(t,1),o=n[0],i=o===void 0?{}:o,a=OF(e,i),s=c.useCallback(function(){return a.status===Et.NotStarted?i.state?ur.create(i.state):a.machine.initialState:a.getSnapshot()},[a]),l=c.useCallback(function(d,p){return TF(a,d,p)},[a]),u=c.useCallback(function(d){var p=a.subscribe(d).unsubscribe;return p},[a]),f=TM.useSyncExternalStoreWithSelector(u,s,s,PF,l);return c.useEffect(function(){var d=i.state;return a.start(d?ur.create(d):void 0),function(){a.stop(),a.status=Et.NotStarted}},[]),[f,a.send,a]}const kF=Yf({id:"identity",predictableActionArguments:!0,context:{identity:null,identitySubscribable:null},initial:"choosingAction",invoke:{src:e=>e.identitySubscribable},states:{choosingAction:{},managingDeviceInvitation:{},managingAgent:{initial:"idle",states:{idle:{},pending:{}}},managingDevices:{},managingProfile:{initial:"idle",states:{idle:{},pending:{}},on:{setIdentity:{target:"choosingAction",actions:["setIdentity","log"]},updateProfile:{target:".pending",actions:"log"}}},signingOut:{}},on:{unchooseAction:{target:".choosingAction",actions:["unsetInvitation","log"]},deselectInvitation:{target:".choosingAction",actions:["unsetInvitation","log"]},selectInvitation:{target:".managingDeviceInvitation",actions:["setInvitation","log"]},chooseDevices:{target:".managingDevices",actions:"log"},chooseProfile:{target:".managingProfile",actions:"log"},chooseSignOut:{target:".signingOut",actions:"log"},chooseAgent:{target:".managingAgent",actions:"log"}}},{actions:{setIdentity:zt({identity:(e,t)=>t?.identity??null}),setInvitation:zt({invitation:(e,t)=>t?.invitation??null}),unsetInvitation:zt({invitation:()=>{}}),log:(e,t)=>{Qe("[transition]",{event:t,context:e})}}}),NF=(e,t)=>Jf(kF,{...t,context:{...t?.context,identity:e.halo.identity.get(),identitySubscribable:e.halo.identity.map(r=>({type:"setIdentity",identity:r}))}}),DF=e=>{const{identity:t}=e,[r,n]=c.useState(""),[o,i]=c.useState(""),[a,s]=c.useState(!1),l=Ue.useClient(),u=si.useHaloInvitations(),f=Ue.useAgentHostingProviderClient(l.config);c.useEffect(()=>{(async()=>{if(f){const v=await f?.getAgent(t?.identityKey.truncate()??"foo");v?(s(!0),i(v)):(s(!1),n("No agent deployed via provider."))}else n("No agent provider configured.")})()},[]);const d=c.useCallback(async g=>{const v=an.InvitationEncoder.encode(g);if(g.state===we.State.CONNECTING&&(console.log(JSON.stringify({invitationCode:v,authCode:g.authCode})),Mi(t,"Identity not found"),f))try{const y=await f?.createAgent(v,t.identityKey.truncate());i(y),s(!0),n("")}catch(y){n(`error creating agent: ${y.message}`)}},[]),p=async()=>{u.forEach(v=>v.cancel()),l.halo.share({type:we.Type.MULTIUSE,authMethod:we.AuthMethod.NONE}).subscribe(d)},h=async()=>{const g=l.halo.identity.get();Mi(g,"Identity not found");try{await f?.destroyAgent(g.identityKey.truncate()),n("No agent deployed via provider."),i(""),s(!1)}catch(v){n(`error destroying agent: ${v.message}`)}};return c.createElement(LF,{...e,onAgentCreate:p,onAgentDestroy:h,validationMessage:r,agentStatus:o,agentActive:a,agentProviderDisabled:!f})},LF=e=>{const{active:t,onAgentCreate:r,onAgentDestroy:n,send:o,validationMessage:i,agentStatus:a,agentActive:s,agentProviderDisabled:l}=e,u=!t,{t:f}=rt("os");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Hi,{validationMessage:i,label:c.createElement(_r,null,"Agent Status"),disabled:u,"data-testid":"agent-status",value:a})),c.createElement(Ht,null,c.createElement(at,{disabled:s||l,onClick:()=>r?.(),"data-testid":"create-agent"},"Create Agent"),c.createElement(at,{disabled:!s||l,onClick:()=>n?.(),"data-testid":"destroy-agent"},"Destroy Agent"),c.createElement(at,{disabled:u,onClick:()=>o?.({type:"unchooseAction"}),"data-testid":"update-profile-form-back"},f("back label"))))},MF=({devices:e,active:t,send:r})=>{const{t:n}=rt("os"),o=!t;return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow"},c.createElement(Sk,{devices:e})),c.createElement(Ht,null,c.createElement(at,{variant:"ghost",disabled:o,onClick:()=>r?.({type:"unchooseAction"}),"data-testid":"manage-devices-back"},n("back label"))))},FF=e=>{const{send:t}=e,r=Ue.useClient(),n=si.useHaloInvitations(),o=c.useCallback(a=>{const s=an.InvitationEncoder.encode(a);a.state===we.State.CONNECTING&&console.log(JSON.stringify({invitationCode:s,authCode:a.authCode}))},[]),i=a=>{const s=a.altKey&&a.shiftKey;n.forEach(u=>u.cancel());const l=r.halo.share(s?{type:we.Type.MULTIUSE,authMethod:we.AuthMethod.NONE}:void 0);process.env.NODE_ENV!=="production"&&l.subscribe(o),t?.({type:"selectInvitation",invitation:l})};return c.createElement(jF,{...e,onCreateInvitationClick:a=>i(a)})},jF=({onCreateInvitationClick:e,active:t,send:r,onDone:n,doneActionParent:o})=>{const{t:i}=rt("os");return c.createElement("div",{role:"none",className:"grow flex flex-col gap-1"},c.createElement(So,{density:"coarse"},c.createElement("div",{className:"grow justify-center flex flex-col gap-1"},c.createElement(at,{"data-testid":"manage-agent",onClick:()=>r?.({type:"chooseAgent"}),classNames:"plb-4"},c.createElement(ze.HardDrive,{className:We(6)}),c.createElement("span",{className:"grow mli-3"},"Manage Agent"),c.createElement(ze.CaretRight,{weight:"bold",className:We(4)})),c.createElement(at,{disabled:!t,"data-testid":"devices-panel.create-invitation",onClick:e,classNames:"plb-4"},c.createElement(ze.Plus,{className:We(6)}),c.createElement("span",{className:"grow mli-3"},i("choose add device label")),c.createElement(ze.CaretRight,{weight:"bold",className:We(4)})),c.createElement(at,{"data-testid":"manage-devices",onClick:()=>r?.({type:"chooseDevices"}),classNames:"plb-4"},c.createElement(ze.Devices,{className:We(6)}),c.createElement("span",{className:"grow mli-3"},i("choose devices label")),c.createElement(ze.CaretRight,{weight:"bold",className:We(4)})),c.createElement(at,{"data-testid":"manage-profile",onClick:()=>r?.({type:"chooseProfile"}),classNames:"plb-4"},c.createElement(ze.UserGear,{className:We(6)}),c.createElement("span",{className:"grow mli-3"},i("choose profile label")),c.createElement(ze.CaretRight,{weight:"bold",className:We(4)})),c.createElement(at,{"data-testid":"sign-out",onClick:()=>r?.({type:"chooseSignOut"}),classNames:"plb-4"},c.createElement(ze.Power,{className:We(6)}),c.createElement("span",{className:"grow mli-3"},i("choose sign out label")),c.createElement(ze.CaretRight,{weight:"bold",className:We(4)})))))},BF=e=>{const{onUpdateProfile:t}=e,{t:r}=rt("os"),[n,o]=c.useState(""),i=async a=>{await t?.(a).catch(s=>{Qe.catch(s),o(r("failed to update profile message"))})};return c.createElement(RF,{...e,onUpdateProfile:i,validationMessage:n})},RF=e=>{const{active:t,profile:r,send:n,onUpdateProfile:o,validationMessage:i}=e,a=!t,{t:s}=rt("os"),[l,u]=c.useState(r?.displayName??"");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Hi,{validationMessage:i,label:c.createElement(_r,null,s("display name input label")),disabled:a,"data-testid":"display-name-input",placeholder:s("display name input placeholder"),value:l,onChange:({target:{value:f}})=>u(f),onKeyDown:({key:f})=>f==="Enter"&&o?.({displayName:l})})),c.createElement(Ht,null,c.createElement(at,{variant:"ghost",disabled:a,onClick:()=>n?.({type:"unchooseAction"}),"data-testid":"update-profile-form-back"},s("back label")),c.createElement(at,{variant:"primary",disabled:a,onClick:()=>o?.({displayName:l}),"data-testid":"update-profile-form-continue"},s("done label"))))},UF=e=>{const{t}=rt("os"),r=()=>{window.confirm(t("reset device confirm message"))&&e.onResetDevice?.()};return c.createElement(WF,{disabled:!e.active,onBack:()=>e.send?.({type:"unchooseAction"}),onResetDevice:r,onJoinNewIdentity:e.onJoinNewIdentity})},WF=({disabled:e,onResetDevice:t,onJoinNewIdentity:r,onBack:n})=>{const{t:o}=rt("os");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Mc.Root,{valence:"error"},c.createElement(Mc.Title,null,c.createElement(ze.Warning,{className:ue(We(6),"inline mie-2")}),o("sign out chooser title")),c.createElement(Mc.Body,null,o("sign out chooser message")))),c.createElement(Ht,null,c.createElement(at,{disabled:e,onClick:n},o("back label")),c.createElement(at,{variant:"primary",classNames:"!bg-error-500 hover:!bg-error-550",disabled:e,onClick:r},o("join new identity label")),c.createElement(at,{variant:"primary",classNames:"!bg-error-500 hover:!bg-error-550",disabled:e,onClick:t},o("reset device label"))))};var g1={exports:{}};(function(e,t){var r=function(){var n=function(P,I){var S=236,O=17,k=P,j=i[I],D=null,N=0,J=null,K=[],Y={},te=function(M,R){N=k*4+17,D=function(G){for(var A=new Array(G),T=0;T<G;T+=1){A[T]=new Array(G);for(var Z=0;Z<G;Z+=1)A[T][Z]=null}return A}(N),oe(0,0),oe(N-7,0),oe(0,N-7),ge(),ae(),q(M,R),k>=7&&ce(M),J==null&&(J=de(k,j,K)),V(J,R)},oe=function(M,R){for(var G=-1;G<=7;G+=1)if(!(M+G<=-1||N<=M+G))for(var A=-1;A<=7;A+=1)R+A<=-1||N<=R+A||(0<=G&&G<=6&&(A==0||A==6)||0<=A&&A<=6&&(G==0||G==6)||2<=G&&G<=4&&2<=A&&A<=4?D[M+G][R+A]=!0:D[M+G][R+A]=!1)},le=function(){for(var M=0,R=0,G=0;G<8;G+=1){te(!0,G);var A=s.getLostPoint(Y);(G==0||M>A)&&(M=A,R=G)}return R},ae=function(){for(var M=8;M<N-8;M+=1)D[M][6]==null&&(D[M][6]=M%2==0);for(var R=8;R<N-8;R+=1)D[6][R]==null&&(D[6][R]=R%2==0)},ge=function(){for(var M=s.getPatternPosition(k),R=0;R<M.length;R+=1)for(var G=0;G<M.length;G+=1){var A=M[R],T=M[G];if(D[A][T]==null)for(var Z=-2;Z<=2;Z+=1)for(var ne=-2;ne<=2;ne+=1)Z==-2||Z==2||ne==-2||ne==2||Z==0&&ne==0?D[A+Z][T+ne]=!0:D[A+Z][T+ne]=!1}},ce=function(M){for(var R=s.getBCHTypeNumber(k),G=0;G<18;G+=1){var A=!M&&(R>>G&1)==1;D[Math.floor(G/3)][G%3+N-8-3]=A}for(var G=0;G<18;G+=1){var A=!M&&(R>>G&1)==1;D[G%3+N-8-3][Math.floor(G/3)]=A}},q=function(M,R){for(var G=j<<3|R,A=s.getBCHTypeInfo(G),T=0;T<15;T+=1){var Z=!M&&(A>>T&1)==1;T<6?D[T][8]=Z:T<8?D[T+1][8]=Z:D[N-15+T][8]=Z}for(var T=0;T<15;T+=1){var Z=!M&&(A>>T&1)==1;T<8?D[8][N-T-1]=Z:T<9?D[8][15-T-1+1]=Z:D[8][15-T-1]=Z}D[N-8][8]=!M},V=function(M,R){for(var G=-1,A=N-1,T=7,Z=0,ne=s.getMaskFunction(R),pe=N-1;pe>0;pe-=2)for(pe==6&&(pe-=1);;){for(var me=0;me<2;me+=1)if(D[A][pe-me]==null){var xe=!1;Z<M.length&&(xe=(M[Z]>>>T&1)==1);var Ee=ne(A,pe-me);Ee&&(xe=!xe),D[A][pe-me]=xe,T-=1,T==-1&&(Z+=1,T=7)}if(A+=G,A<0||N<=A){A-=G,G=-G;break}}},re=function(M,R){for(var G=0,A=0,T=0,Z=new Array(R.length),ne=new Array(R.length),pe=0;pe<R.length;pe+=1){var me=R[pe].dataCount,xe=R[pe].totalCount-me;A=Math.max(A,me),T=Math.max(T,xe),Z[pe]=new Array(me);for(var Ee=0;Ee<Z[pe].length;Ee+=1)Z[pe][Ee]=255&M.getBuffer()[Ee+G];G+=me;var ie=s.getErrorCorrectPolynomial(xe),Ne=u(Z[pe],ie.getLength()-1),dt=Ne.mod(ie);ne[pe]=new Array(ie.getLength()-1);for(var Ee=0;Ee<ne[pe].length;Ee+=1){var Te=Ee+dt.getLength()-ne[pe].length;ne[pe][Ee]=Te>=0?dt.getAt(Te):0}}for(var Me=0,Ee=0;Ee<R.length;Ee+=1)Me+=R[Ee].totalCount;for(var bt=new Array(Me),$e=0,Ee=0;Ee<A;Ee+=1)for(var pe=0;pe<R.length;pe+=1)Ee<Z[pe].length&&(bt[$e]=Z[pe][Ee],$e+=1);for(var Ee=0;Ee<T;Ee+=1)for(var pe=0;pe<R.length;pe+=1)Ee<ne[pe].length&&(bt[$e]=ne[pe][Ee],$e+=1);return bt},de=function(M,R,G){for(var A=f.getRSBlocks(M,R),T=d(),Z=0;Z<G.length;Z+=1){var ne=G[Z];T.put(ne.getMode(),4),T.put(ne.getLength(),s.getLengthInBits(ne.getMode(),M)),ne.write(T)}for(var pe=0,Z=0;Z<A.length;Z+=1)pe+=A[Z].dataCount;if(T.getLengthInBits()>pe*8)throw"code length overflow. ("+T.getLengthInBits()+">"+pe*8+")";for(T.getLengthInBits()+4<=pe*8&&T.put(0,4);T.getLengthInBits()%8!=0;)T.putBit(!1);for(;!(T.getLengthInBits()>=pe*8||(T.put(S,8),T.getLengthInBits()>=pe*8));)T.put(O,8);return re(T,A)};Y.addData=function(M,R){R=R||"Byte";var G=null;switch(R){case"Numeric":G=p(M);break;case"Alphanumeric":G=h(M);break;case"Byte":G=g(M);break;case"Kanji":G=v(M);break;default:throw"mode:"+R}K.push(G),J=null},Y.isDark=function(M,R){if(M<0||N<=M||R<0||N<=R)throw M+","+R;return D[M][R]},Y.getModuleCount=function(){return N},Y.make=function(){if(k<1){for(var M=1;M<40;M++){for(var R=f.getRSBlocks(M,j),G=d(),A=0;A<K.length;A++){var T=K[A];G.put(T.getMode(),4),G.put(T.getLength(),s.getLengthInBits(T.getMode(),M)),T.write(G)}for(var Z=0,A=0;A<R.length;A++)Z+=R[A].dataCount;if(G.getLengthInBits()<=Z*8)break}k=M}te(!1,le())},Y.createTableTag=function(M,R){M=M||2,R=typeof R>"u"?M*4:R;var G="";G+='<table style="',G+=" border-width: 0px; border-style: none;",G+=" border-collapse: collapse;",G+=" padding: 0px; margin: "+R+"px;",G+='">',G+="<tbody>";for(var A=0;A<Y.getModuleCount();A+=1){G+="<tr>";for(var T=0;T<Y.getModuleCount();T+=1)G+='<td style="',G+=" border-width: 0px; border-style: none;",G+=" border-collapse: collapse;",G+=" padding: 0px; margin: 0px;",G+=" width: "+M+"px;",G+=" height: "+M+"px;",G+=" background-color: ",G+=Y.isDark(A,T)?"#000000":"#ffffff",G+=";",G+='"/>';G+="</tr>"}return G+="</tbody>",G+="</table>",G},Y.createSvgTag=function(M,R,G,A){var T={};typeof arguments[0]=="object"&&(T=arguments[0],M=T.cellSize,R=T.margin,G=T.alt,A=T.title),M=M||2,R=typeof R>"u"?M*4:R,G=typeof G=="string"?{text:G}:G||{},G.text=G.text||null,G.id=G.text?G.id||"qrcode-description":null,A=typeof A=="string"?{text:A}:A||{},A.text=A.text||null,A.id=A.text?A.id||"qrcode-title":null;var Z=Y.getModuleCount()*M+R*2,ne,pe,me,xe,Ee="",ie;for(ie="l"+M+",0 0,"+M+" -"+M+",0 0,-"+M+"z ",Ee+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',Ee+=T.scalable?"":' width="'+Z+'px" height="'+Z+'px"',Ee+=' viewBox="0 0 '+Z+" "+Z+'" ',Ee+=' preserveAspectRatio="xMinYMin meet"',Ee+=A.text||G.text?' role="img" aria-labelledby="'+U([A.id,G.id].join(" ").trim())+'"':"",Ee+=">",Ee+=A.text?'<title id="'+U(A.id)+'">'+U(A.text)+"</title>":"",Ee+=G.text?'<description id="'+U(G.id)+'">'+U(G.text)+"</description>":"",Ee+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',Ee+='<path d="',me=0;me<Y.getModuleCount();me+=1)for(xe=me*M+R,ne=0;ne<Y.getModuleCount();ne+=1)Y.isDark(me,ne)&&(pe=ne*M+R,Ee+="M"+pe+","+xe+ie);return Ee+='" stroke="transparent" fill="black"/>',Ee+="</svg>",Ee},Y.createDataURL=function(M,R){M=M||2,R=typeof R>"u"?M*4:R;var G=Y.getModuleCount()*M+R*2,A=R,T=G-R;return x(G,G,function(Z,ne){if(A<=Z&&Z<T&&A<=ne&&ne<T){var pe=Math.floor((Z-A)/M),me=Math.floor((ne-A)/M);return Y.isDark(me,pe)?0:1}else return 1})},Y.createImgTag=function(M,R,G){M=M||2,R=typeof R>"u"?M*4:R;var A=Y.getModuleCount()*M+R*2,T="";return T+="<img",T+=' src="',T+=Y.createDataURL(M,R),T+='"',T+=' width="',T+=A,T+='"',T+=' height="',T+=A,T+='"',G&&(T+=' alt="',T+=U(G),T+='"'),T+="/>",T};var U=function(M){for(var R="",G=0;G<M.length;G+=1){var A=M.charAt(G);switch(A){case"<":R+="<";break;case">":R+=">";break;case"&":R+="&";break;case'"':R+=""";break;default:R+=A;break}}return R},z=function(M){var R=1;M=typeof M>"u"?R*2:M;var G=Y.getModuleCount()*R+M*2,A=M,T=G-M,Z,ne,pe,me,xe,Ee={"██":"█","█ ":"▀"," █":"▄"," ":" "},ie={"██":"▀","█ ":"▀"," █":" "," ":" "},Ne="";for(Z=0;Z<G;Z+=2){for(pe=Math.floor((Z-A)/R),me=Math.floor((Z+1-A)/R),ne=0;ne<G;ne+=1)xe="█",A<=ne&&ne<T&&A<=Z&&Z<T&&Y.isDark(pe,Math.floor((ne-A)/R))&&(xe=" "),A<=ne&&ne<T&&A<=Z+1&&Z+1<T&&Y.isDark(me,Math.floor((ne-A)/R))?xe+=" ":xe+="█",Ne+=M<1&&Z+1>=T?ie[xe]:Ee[xe];Ne+=`
|
|
208
|
-
`}return
|
|
209
|
-
`}return ie.substring(0,ie.length-1)},Y.renderTo2dContext=function(M,R){R=R||2;for(var G=Y.getModuleCount(),A=0;A<G;A++)for(var T=0;T<G;T++)M.fillStyle=Y.isDark(A,T)?"black":"white",M.fillRect(A*R,T*R,R,R)},Y};n.stringToBytesFuncs={default:function(P){for(var I=[],S=0;S<P.length;S+=1){var O=P.charCodeAt(S);I.push(O&255)}return I}},n.stringToBytes=n.stringToBytesFuncs.default,n.createStringToBytes=function(P,I){var S=function(){for(var k=w(P),j=function(){var ae=k.read();if(ae==-1)throw"eof";return ae},D=0,N={};;){var J=k.read();if(J==-1)break;var K=j(),Y=j(),te=j(),oe=String.fromCharCode(J<<8|K),le=Y<<8|te;N[oe]=le,D+=1}if(D!=I)throw D+" != "+I;return N}(),O="?".charCodeAt(0);return function(k){for(var j=[],D=0;D<k.length;D+=1){var N=k.charCodeAt(D);if(N<128)j.push(N);else{var J=S[k.charAt(D)];typeof J=="number"?(J&255)==J?j.push(J):(j.push(J>>>8),j.push(J&255)):j.push(O)}}return j}};var o={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3},i={L:1,M:0,Q:3,H:2},a={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},s=function(){var P=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],I=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,S=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,O=1<<14|1<<12|1<<10|1<<4|1<<1,k={},j=function(D){for(var N=0;D!=0;)N+=1,D>>>=1;return N};return k.getBCHTypeInfo=function(D){for(var N=D<<10;j(N)-j(I)>=0;)N^=I<<j(N)-j(I);return(D<<10|N)^O},k.getBCHTypeNumber=function(D){for(var N=D<<12;j(N)-j(S)>=0;)N^=S<<j(N)-j(S);return D<<12|N},k.getPatternPosition=function(D){return P[D-1]},k.getMaskFunction=function(D){switch(D){case a.PATTERN000:return function(N,J){return(N+J)%2==0};case a.PATTERN001:return function(N,J){return N%2==0};case a.PATTERN010:return function(N,J){return J%3==0};case a.PATTERN011:return function(N,J){return(N+J)%3==0};case a.PATTERN100:return function(N,J){return(Math.floor(N/2)+Math.floor(J/3))%2==0};case a.PATTERN101:return function(N,J){return N*J%2+N*J%3==0};case a.PATTERN110:return function(N,J){return(N*J%2+N*J%3)%2==0};case a.PATTERN111:return function(N,J){return(N*J%3+(N+J)%2)%2==0};default:throw"bad maskPattern:"+D}},k.getErrorCorrectPolynomial=function(D){for(var N=u([1],0),J=0;J<D;J+=1)N=N.multiply(u([1,l.gexp(J)],0));return N},k.getLengthInBits=function(D,N){if(1<=N&&N<10)switch(D){case o.MODE_NUMBER:return 10;case o.MODE_ALPHA_NUM:return 9;case o.MODE_8BIT_BYTE:return 8;case o.MODE_KANJI:return 8;default:throw"mode:"+D}else if(N<27)switch(D){case o.MODE_NUMBER:return 12;case o.MODE_ALPHA_NUM:return 11;case o.MODE_8BIT_BYTE:return 16;case o.MODE_KANJI:return 10;default:throw"mode:"+D}else if(N<41)switch(D){case o.MODE_NUMBER:return 14;case o.MODE_ALPHA_NUM:return 13;case o.MODE_8BIT_BYTE:return 16;case o.MODE_KANJI:return 12;default:throw"mode:"+D}else throw"type:"+N},k.getLostPoint=function(D){for(var N=D.getModuleCount(),J=0,K=0;K<N;K+=1)for(var Y=0;Y<N;Y+=1){for(var te=0,oe=D.isDark(K,Y),le=-1;le<=1;le+=1)if(!(K+le<0||N<=K+le))for(var ae=-1;ae<=1;ae+=1)Y+ae<0||N<=Y+ae||le==0&&ae==0||oe==D.isDark(K+le,Y+ae)&&(te+=1);te>5&&(J+=3+te-5)}for(var K=0;K<N-1;K+=1)for(var Y=0;Y<N-1;Y+=1){var ge=0;D.isDark(K,Y)&&(ge+=1),D.isDark(K+1,Y)&&(ge+=1),D.isDark(K,Y+1)&&(ge+=1),D.isDark(K+1,Y+1)&&(ge+=1),(ge==0||ge==4)&&(J+=3)}for(var K=0;K<N;K+=1)for(var Y=0;Y<N-6;Y+=1)D.isDark(K,Y)&&!D.isDark(K,Y+1)&&D.isDark(K,Y+2)&&D.isDark(K,Y+3)&&D.isDark(K,Y+4)&&!D.isDark(K,Y+5)&&D.isDark(K,Y+6)&&(J+=40);for(var Y=0;Y<N;Y+=1)for(var K=0;K<N-6;K+=1)D.isDark(K,Y)&&!D.isDark(K+1,Y)&&D.isDark(K+2,Y)&&D.isDark(K+3,Y)&&D.isDark(K+4,Y)&&!D.isDark(K+5,Y)&&D.isDark(K+6,Y)&&(J+=40);for(var ce=0,Y=0;Y<N;Y+=1)for(var K=0;K<N;K+=1)D.isDark(K,Y)&&(ce+=1);var q=Math.abs(100*ce/N/N-50)/5;return J+=q*10,J},k}(),l=function(){for(var P=new Array(256),I=new Array(256),S=0;S<8;S+=1)P[S]=1<<S;for(var S=8;S<256;S+=1)P[S]=P[S-4]^P[S-5]^P[S-6]^P[S-8];for(var S=0;S<255;S+=1)I[P[S]]=S;var O={};return O.glog=function(k){if(k<1)throw"glog("+k+")";return I[k]},O.gexp=function(k){for(;k<0;)k+=255;for(;k>=256;)k-=255;return P[k]},O}();function u(P,I){if(typeof P.length>"u")throw P.length+"/"+I;var S=function(){for(var k=0;k<P.length&&P[k]==0;)k+=1;for(var j=new Array(P.length-k+I),D=0;D<P.length-k;D+=1)j[D]=P[D+k];return j}(),O={};return O.getAt=function(k){return S[k]},O.getLength=function(){return S.length},O.multiply=function(k){for(var j=new Array(O.getLength()+k.getLength()-1),D=0;D<O.getLength();D+=1)for(var N=0;N<k.getLength();N+=1)j[D+N]^=l.gexp(l.glog(O.getAt(D))+l.glog(k.getAt(N)));return u(j,0)},O.mod=function(k){if(O.getLength()-k.getLength()<0)return O;for(var j=l.glog(O.getAt(0))-l.glog(k.getAt(0)),D=new Array(O.getLength()),N=0;N<O.getLength();N+=1)D[N]=O.getAt(N);for(var N=0;N<k.getLength();N+=1)D[N]^=l.gexp(l.glog(k.getAt(N))+j);return u(D,0).mod(k)},O}var f=function(){var P=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],I=function(k,j){var D={};return D.totalCount=k,D.dataCount=j,D},S={},O=function(k,j){switch(j){case i.L:return P[(k-1)*4+0];case i.M:return P[(k-1)*4+1];case i.Q:return P[(k-1)*4+2];case i.H:return P[(k-1)*4+3];default:return}};return S.getRSBlocks=function(k,j){var D=O(k,j);if(typeof D>"u")throw"bad rs block @ typeNumber:"+k+"/errorCorrectionLevel:"+j;for(var N=D.length/3,J=[],K=0;K<N;K+=1)for(var Y=D[K*3+0],te=D[K*3+1],oe=D[K*3+2],le=0;le<Y;le+=1)J.push(I(te,oe));return J},S}(),d=function(){var P=[],I=0,S={};return S.getBuffer=function(){return P},S.getAt=function(O){var k=Math.floor(O/8);return(P[k]>>>7-O%8&1)==1},S.put=function(O,k){for(var j=0;j<k;j+=1)S.putBit((O>>>k-j-1&1)==1)},S.getLengthInBits=function(){return I},S.putBit=function(O){var k=Math.floor(I/8);P.length<=k&&P.push(0),O&&(P[k]|=128>>>I%8),I+=1},S},p=function(P){var I=o.MODE_NUMBER,S=P,O={};O.getMode=function(){return I},O.getLength=function(D){return S.length},O.write=function(D){for(var N=S,J=0;J+2<N.length;)D.put(k(N.substring(J,J+3)),10),J+=3;J<N.length&&(N.length-J==1?D.put(k(N.substring(J,J+1)),4):N.length-J==2&&D.put(k(N.substring(J,J+2)),7))};var k=function(D){for(var N=0,J=0;J<D.length;J+=1)N=N*10+j(D.charAt(J));return N},j=function(D){if("0"<=D&&D<="9")return D.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+D};return O},h=function(P){var I=o.MODE_ALPHA_NUM,S=P,O={};O.getMode=function(){return I},O.getLength=function(j){return S.length},O.write=function(j){for(var D=S,N=0;N+1<D.length;)j.put(k(D.charAt(N))*45+k(D.charAt(N+1)),11),N+=2;N<D.length&&j.put(k(D.charAt(N)),6)};var k=function(j){if("0"<=j&&j<="9")return j.charCodeAt(0)-"0".charCodeAt(0);if("A"<=j&&j<="Z")return j.charCodeAt(0)-"A".charCodeAt(0)+10;switch(j){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+j}};return O},g=function(P){var I=o.MODE_8BIT_BYTE,S=n.stringToBytes(P),O={};return O.getMode=function(){return I},O.getLength=function(k){return S.length},O.write=function(k){for(var j=0;j<S.length;j+=1)k.put(S[j],8)},O},v=function(P){var I=o.MODE_KANJI,S=n.stringToBytesFuncs.SJIS;if(!S)throw"sjis not supported.";(function(j,D){var N=S(j);if(N.length!=2||(N[0]<<8|N[1])!=D)throw"sjis not supported."})("友",38726);var O=S(P),k={};return k.getMode=function(){return I},k.getLength=function(j){return~~(O.length/2)},k.write=function(j){for(var D=O,N=0;N+1<D.length;){var J=(255&D[N])<<8|255&D[N+1];if(33088<=J&&J<=40956)J-=33088;else if(57408<=J&&J<=60351)J-=49472;else throw"illegal char at "+(N+1)+"/"+J;J=(J>>>8&255)*192+(J&255),j.put(J,13),N+=2}if(N<D.length)throw"illegal char at "+(N+1)},k},y=function(){var P=[],I={};return I.writeByte=function(S){P.push(S&255)},I.writeShort=function(S){I.writeByte(S),I.writeByte(S>>>8)},I.writeBytes=function(S,O,k){O=O||0,k=k||S.length;for(var j=0;j<k;j+=1)I.writeByte(S[j+O])},I.writeString=function(S){for(var O=0;O<S.length;O+=1)I.writeByte(S.charCodeAt(O))},I.toByteArray=function(){return P},I.toString=function(){var S="";S+="[";for(var O=0;O<P.length;O+=1)O>0&&(S+=","),S+=P[O];return S+="]",S},I},m=function(){var P=0,I=0,S=0,O="",k={},j=function(N){O+=String.fromCharCode(D(N&63))},D=function(N){if(!(N<0)){if(N<26)return 65+N;if(N<52)return 97+(N-26);if(N<62)return 48+(N-52);if(N==62)return 43;if(N==63)return 47}throw"n:"+N};return k.writeByte=function(N){for(P=P<<8|N&255,I+=8,S+=1;I>=6;)j(P>>>I-6),I-=6},k.flush=function(){if(I>0&&(j(P<<6-I),P=0,I=0),S%3!=0)for(var N=3-S%3,J=0;J<N;J+=1)O+="="},k.toString=function(){return O},k},w=function(P){var I=P,S=0,O=0,k=0,j={};j.read=function(){for(;k<8;){if(S>=I.length){if(k==0)return-1;throw"unexpected end of file./"+k}var N=I.charAt(S);if(S+=1,N=="=")return k=0,-1;if(N.match(/^\s$/))continue;O=O<<6|D(N.charCodeAt(0)),k+=6}var J=O>>>k-8&255;return k-=8,J};var D=function(N){if(65<=N&&N<=90)return N-65;if(97<=N&&N<=122)return N-97+26;if(48<=N&&N<=57)return N-48+52;if(N==43)return 62;if(N==47)return 63;throw"c:"+N};return j},E=function(P,I){var S=P,O=I,k=new Array(P*I),j={};j.setPixel=function(K,Y,te){k[Y*S+K]=te},j.write=function(K){K.writeString("GIF87a"),K.writeShort(S),K.writeShort(O),K.writeByte(128),K.writeByte(0),K.writeByte(0),K.writeByte(0),K.writeByte(0),K.writeByte(0),K.writeByte(255),K.writeByte(255),K.writeByte(255),K.writeString(","),K.writeShort(0),K.writeShort(0),K.writeShort(S),K.writeShort(O),K.writeByte(0);var Y=2,te=N(Y);K.writeByte(Y);for(var oe=0;te.length-oe>255;)K.writeByte(255),K.writeBytes(te,oe,255),oe+=255;K.writeByte(te.length-oe),K.writeBytes(te,oe,te.length-oe),K.writeByte(0),K.writeString(";")};var D=function(K){var Y=K,te=0,oe=0,le={};return le.write=function(ae,ge){if(ae>>>ge)throw"length over";for(;te+ge>=8;)Y.writeByte(255&(ae<<te|oe)),ge-=8-te,ae>>>=8-te,oe=0,te=0;oe=ae<<te|oe,te=te+ge},le.flush=function(){te>0&&Y.writeByte(oe)},le},N=function(K){for(var Y=1<<K,te=(1<<K)+1,oe=K+1,le=J(),ae=0;ae<Y;ae+=1)le.add(String.fromCharCode(ae));le.add(String.fromCharCode(Y)),le.add(String.fromCharCode(te));var ge=y(),ce=D(ge);ce.write(Y,oe);var q=0,V=String.fromCharCode(k[q]);for(q+=1;q<k.length;){var re=String.fromCharCode(k[q]);q+=1,le.contains(V+re)?V=V+re:(ce.write(le.indexOf(V),oe),le.size()<4095&&(le.size()==1<<oe&&(oe+=1),le.add(V+re)),V=re)}return ce.write(le.indexOf(V),oe),ce.write(te,oe),ce.flush(),ge.toByteArray()},J=function(){var K={},Y=0,te={};return te.add=function(oe){if(te.contains(oe))throw"dup key:"+oe;K[oe]=Y,Y+=1},te.size=function(){return Y},te.indexOf=function(oe){return K[oe]},te.contains=function(oe){return typeof K[oe]<"u"},te};return j},x=function(P,I,S){for(var O=E(P,I),k=0;k<I;k+=1)for(var j=0;j<P;j+=1)O.setPixel(j,k,S(j,k));var D=y();O.write(D);for(var N=m(),J=D.toByteArray(),K=0;K<J.length;K+=1)N.writeByte(J[K]);return N.flush(),"data:image/gif;base64,"+N};return n}();(function(){r.stringToBytesFuncs["UTF-8"]=function(n){function o(i){for(var a=[],s=0;s<i.length;s++){var l=i.charCodeAt(s);l<128?a.push(l):l<2048?a.push(192|l>>6,128|l&63):l<55296||l>=57344?a.push(224|l>>12,128|l>>6&63,128|l&63):(s++,l=65536+((l&1023)<<10|i.charCodeAt(s)&1023),a.push(240|l>>18,128|l>>12&63,128|l>>6&63,128|l&63))}return a}return o(n)}})(),function(n){e.exports=n()}(function(){return r})})(g1);var VF=g1.exports;const Xf=In(VF);var HF=Object.defineProperty,ul=Object.getOwnPropertySymbols,v1=Object.prototype.hasOwnProperty,m1=Object.prototype.propertyIsEnumerable,b1=(e,t,r)=>t in e?HF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zF=(e,t)=>{for(var r in t||(t={}))v1.call(t,r)&&b1(e,r,t[r]);if(ul)for(var r of ul(t))m1.call(t,r)&&b1(e,r,t[r]);return e},GF=(e,t)=>{var r={};for(var n in e)v1.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ul)for(var n of ul(e))t.indexOf(n)<0&&m1.call(e,n)&&(r[n]=e[n]);return r},en=1e3,KF=/code length overflow/i;Xf.stringToBytes=Xf.stringToBytesFuncs["UTF-8"];var qF=(e,t,r)=>{r=Math.max(1,r);for(let n=r;n<=40;n+=1)try{const o=Xf(n,t);o.addData(e),o.make();const i=o.getModuleCount();return{text:e,level:t,version:n,moduleCount:i,isDark:(s,l)=>s>=0&&s<i&&l>=0&&l<i&&o.isDark(s,l)}}catch(o){if(!(n<40&&KF.test(String(o))))throw o}return null},Cn=Math.round,qo=(e,t)=>`M ${Cn(e)} ${Cn(t)}`,Bt=(e,t)=>`L ${Cn(e)} ${Cn(t)}`,An=(e,t,r)=>`A ${Cn(r)} ${Cn(r)} 0 0 1 ${Cn(e)} ${Cn(t)}`,YF=(e,t,r,n,o,i,a,s,l)=>{const u=[];return i?u.push(qo(e+o,t)):u.push(qo(e,t)),a?u.push(Bt(r-o,t),An(r,t+o,o)):u.push(Bt(r,t)),s?u.push(Bt(r,n-o),An(r-o,n,o)):u.push(Bt(r,n)),l?u.push(Bt(e+o,n),An(e,n-o,o)):u.push(Bt(e,n)),i?u.push(Bt(e,t+o),An(e+o,t,o)):u.push(Bt(e,t)),u.join(" ")},JF=(e,t,r,n,o,i,a,s,l)=>{const u=[];return i&&u.push(qo(e+o,t),Bt(e,t),Bt(e,t+o),An(e+o,t,o)),a&&u.push(qo(r,t+o),Bt(r,t),Bt(r-o,t),An(r,t+o,o)),s&&u.push(qo(r-o,n),Bt(r,n),Bt(r,n-o),An(r-o,n,o)),l&&u.push(qo(e,n-o),Bt(e,n),Bt(e+o,n),An(e,n-o,o)),u.join(" ")},XF=(e,t,r,n,o)=>{const i=o*r,a=n*r,s=i+r,l=a+r,u=t*.005*r,f=e.isDark,d=n-1,p=n+1,h=o-1,g=o+1,v=f(n,o),y=f(d,h),m=f(d,o),w=f(d,g),E=f(n,g),x=f(p,g),P=f(p,o),I=f(p,h),S=f(n,h);return v?YF(i,a,s,l,u,!m&&!S,!m&&!E,!P&&!E,!P&&!S):JF(i,a,s,l,u,m&&S&&y,m&&E&&w,P&&E&&x,P&&S&&I)},ZF=(e,t)=>{if(!e)return"";const r=e.moduleCount,n=en/r,o=[];for(let i=0;i<r;i+=1)for(let a=0;a<r;a+=1)o.push(XF(e,t,n,i,a));return o.join(" ")},QF=e=>{var t=e,{color:r="#000",backgroundColor:n,cutout:o=!1,cutoutElement:i,errorCorrectionLevel:a="Q",rounding:s=0,children:l}=t,u=GF(t,["color","backgroundColor","cutout","cutoutElement","errorCorrectionLevel","rounding","children"]),f,d;const p=c.useMemo(()=>qF(l,a,1),[l,a]);if(!p)return null;const h=(f=p?.moduleCount)!=null?f:1,v=en/((d=p?.moduleCount)!=null?d:1)*(Math.floor(h*.18)*2-1)+2,y=(en-v)/2;return ve.createElement("svg",zF({xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${en} ${en}`},u),o?ve.createElement("mask",{id:"react-qr-rounded__mask"},ve.createElement("rect",{x:"0",y:"0",width:en,height:en,fill:"#fff"}),ve.createElement("rect",{x:y,y,width:v,height:v,rx:s,ry:s,fill:"#000"})):null,n?ve.createElement("rect",{x:"0",y:"0",width:en,height:en,fill:n}):null,ve.createElement("path",{fill:r,d:ZF(p,s),mask:o?"url(#react-qr-rounded__mask)":void 0}),i?ve.createElement("foreignObject",{x:y,y,width:v,height:v},ve.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",overflow:"hidden",borderRadius:s}},i)):null)};const Zf=({children:e,...t})=>c.createElement(st.View,{...t,classNames:"grow flex flex-col justify-around items-center"},e),y1=({invitationUrl:e,active:t,send:r,status:n,type:o,authCode:i,id:a})=>{const{t:s}=rt("os"),l=_t("invitation-manager__qr-code"),u=o===we.Type.MULTIUSE?0:hL.get(n)??0,f=u===3,d=bf(a??""),p=c.useMemo(()=>{switch(!0){case u===5:case u<0:return"showing final";case u===3:return"showing auth code";default:return"showing qr"}},[u]);return c.createElement(c.Fragment,null,c.createElement(st.Root,{activeView:p,classNames:"grow plb-1"},c.createElement(st.Views,null,c.createElement(Zf,{id:"showing qr",emoji:d},c.createElement("p",{className:"text-sm mlb-1 font-normal text-center"},s(o===we.Type.MULTIUSE?"invite many qr label":"invite one qr label")),c.createElement("div",{role:"none",className:ue(At,"is-full max-is-[14rem] relative")},c.createElement(QF,{rounding:100,backgroundColor:"transparent",color:"currentColor",className:ue("is-full bs-full p-2",f&&"invisible"),"aria-labelledby":l,errorCorrectionLevel:"Q",cutout:!0},e??"never"),c.createElement(E7,null,c.createElement(wf,{text:d}))),c.createElement("span",{id:l,className:"sr-only"},s("qr label")),c.createElement(Ek,{variant:"ghost",value:e??"never"})),c.createElement(Zf,{id:"showing auth code"},c.createElement(hy,null,s("auth code message")),c.createElement(dy,{code:i,large:!0,classNames:"text-black dark:text-white"}),c.createElement(hy,null,"Be sure the other device is showing this symbol:"),d&&c.createElement(wf,{text:d})),c.createElement(Zf,{id:"showing final"},u>0?c.createElement(ze.Check,{className:ue("m-1.5",We(6))}):c.createElement(ze.X,{className:ue("m-1.5",We(6))})))),c.createElement(Ht,{classNames:"mbs-4"},c.createElement(at,{disabled:!t,onClick:()=>r?.({type:"deselectInvitation"})},s("back label"))))},Yo="pbs-1 pbe-3 pli-3",e9=({titleId:e,title:t,identity:r,onDone:n})=>{const o=is(r.identityKey.toHex(),12);return c.createElement(_f,{titleId:e,title:t,corner:c.createElement(py,{onDone:n})},c.createElement(Ot.Root,{size:12,variant:"circle",status:"active"},c.createElement(Ot.Frame,{classNames:"block mbs-4 mbe-2 mli-auto chromatic-ignore"},c.createElement(Ot.Fallback,{href:o})),c.createElement(Ot.Label,{classNames:"block text-center font-light text-xl"},r.profile?.displayName??lu(r.identityKey.toHex()))))},w1=e=>{const{identity:t,titleId:r,activeView:n,onUpdateProfile:o,onResetDevice:i,onJoinNewIdentity:a,IdentityActionChooser:s=FF,InvitationManager:l=y1,onDone:u,...f}=e,{t:d}=rt("os"),p=c.useMemo(()=>{switch(n){case"agent manager":return"Manage Agent";case"device invitation manager":return d("choose add device label");default:return d("identity heading")}},[n,d]);return c.createElement(So,{density:"fine"},c.createElement(e9,{identity:t,titleId:r,title:p,onDone:u}),c.createElement(st.Root,{activeView:n},c.createElement(st.Views,null,c.createElement(st.View,{id:"identity action chooser",classNames:Yo},c.createElement(s,{active:n==="identity action chooser",...f})),c.createElement(st.View,{id:"device invitation manager",classNames:Yo},c.createElement(l,{active:n==="device invitation manager",...f,invitationUrl:f.createInvitationUrl(f.invitationCode)})),c.createElement(st.View,{id:"device manager",classNames:Yo},c.createElement(MF,{active:n==="device manager",...f})),c.createElement(st.View,{classNames:Yo,id:"update profile form"},c.createElement(BF,{send:f.send,active:n==="update profile form",profile:t.profile,onUpdateProfile:o})),c.createElement(st.View,{classNames:Yo,id:"signing out"},c.createElement(UF,{send:f.send,active:n==="signing out",onResetDevice:i,onJoinNewIdentity:a})),c.createElement(st.View,{classNames:Yo,id:"agent manager"},c.createElement(DF,{send:f.send,active:n==="agent manager",identity:t})))))},t9=({invitation:e,...t})=>{const r=nf(e);return c.createElement(w1,{...t,...r})},r9=({titleId:e,createInvitationUrl:t=n=>n,...r})=>{const n=_t("identityPanel__heading",e),o=Ue.useClient(),i=si.useDevices(),a=si.useIdentity();if(!a)return console.error("IdentityPanel rendered with no active identity."),null;const[s,l,u]=NF(o);c.useEffect(()=>u.subscribe(g=>{Qe("[state]",g)}).unsubscribe,[u]);const f=c.useMemo(()=>{switch(!0){case s.matches("choosingAction"):return"identity action chooser";case s.matches("managingDeviceInvitation"):return"device invitation manager";case s.matches("managingDevices"):return"device manager";case[{managingProfile:"idle"},{managingProfile:"pending"}].some(s.matches):return"update profile form";case s.matches("signingOut"):return"signing out";case[{managingAgent:"idle"},{managingAgent:"pending"}].some(s.matches):return"agent manager";default:return"identity action chooser"}},[s]),p={...r,identity:a,devices:i,activeView:f,send:l,titleId:n,createInvitationUrl:t,onUpdateProfile:async h=>{l({type:"updateProfile"}),await o.halo.updateProfile(h)}};return s.context.invitation?c.createElement(t9,{...p,invitation:s.context.invitation}):c.createElement(w1,{...p})},n9=c.forwardRef(({mode:e,titleId:t,onExit:r,exitActionParent:n},o)=>{const{t:i}=rt("os"),a=c.createElement(br,{variant:"ghost",...r&&{onClick:r},classNames:ue(At,"plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),"data-testid":"join-exit"},c.createElement(ze.X,{weight:"bold",className:We(4)}),c.createElement("span",{className:"sr-only"},i("exit label")));return c.createElement(_f,{ref:o,titleId:t,title:i(e==="halo-only"?"selecting identity heading":"joining space heading"),...e==="halo-only"?{titleSrOnly:!0}:{corner:n?c.cloneElement(n,{},a):a},titleSrOnly:e==="halo-only"})}),_1=(e,t)=>(Qe("[subscribing to invitation]",t),{subscribe:(r,n,o)=>t.subscribe(i=>{switch(i.state){case we.State.CONNECTING:return Qe("[invitation connecting]",{Kind:e,invitation:i}),r({type:`connecting${e}Invitation`,invitation:i});case we.State.CONNECTED:return Qe("[invitation connected]",{Kind:e,invitation:i}),r({type:`connected${e}Invitation`,invitation:i});case we.State.READY_FOR_AUTHENTICATION:return Qe("[invitation ready for authentication]",{Kind:e,invitation:i}),r({type:`readyForAuthentication${e}Invitation`,invitation:i});case we.State.AUTHENTICATING:return Qe("[invitation authenticating]",{Kind:e,invitation:i}),r({type:`authenticating${e}Invitation`,invitation:i});case we.State.SUCCESS:return Qe("[invitation success]",{Kind:e,invitation:i}),r({type:`success${e}Invitation`,invitation:i}),o?.();case we.State.CANCELLED:return Qe.warn("[invitation cancelled]",{Kind:e}),r({type:`fail${e}Invitation`,reason:"cancelled"});case we.State.TIMEOUT:return Qe.error("[invitation timeout]",{Kind:e}),r({type:`fail${e}Invitation`,reason:"timeout"})}},i=>(Qe.error("[invitation errored]",{Kind:e,error:i}),r({type:`fail${e}Invitation`,reason:"error"}),n?.(i)))}),E1=(e,t)=>({initial:`unknown${e}`,states:{[`unknown${e}`]:{always:[{cond:({mode:n})=>n==="halo-only"&&e==="Space",target:"#join.finishingJoiningHalo"},{cond:n=>!!n[e.toLowerCase()].unredeemedCode,target:`acceptingRedeemed${e}Invitation`,actions:[`redeem${e}InvitationCode`,`invalidate${e}InvitationCode`,"log"]},{target:`inputting${e}InvitationCode`,actions:"log"}]},[`inputting${e}InvitationCode`]:{},[`acceptingRedeemed${e}Invitation`]:{invoke:{src:n=>n[e.toLowerCase()].invitationSubscribable},initial:`unknown${e}Invitation`,states:{[`unknown${e}Invitation`]:{always:[{cond:n=>{if(e!=="Space")return!1;{const o=n.space.invitation?.spaceKey?.toHex(),i=n.space.succeededKeys;return o?!!i?.has(o):!1}},target:t,actions:"log"},{cond:n=>{const o=n[e.toLowerCase()].invitation;return!o||o?.state===we.State.CONNECTING},target:`connecting${e}Invitation`,actions:"log"},{target:`inputting${e}VerificationCode`,actions:"log"}]},[`connecting${e}Invitation`]:{},[`inputting${e}VerificationCode`]:{},[`authenticating${e}VerificationCode`]:{on:{[`readyForAuthentication${e}Invitation`]:{target:`authenticationFailing${e}VerificationCode`,actions:["setInvitation","log"]}}},[`authenticationFailing${e}VerificationCode`]:{},[`failing${e}Invitation`]:{},[`success${e}Invitation`]:{}},on:{[`reset${e}Invitation`]:{target:`#join${e==="Halo"?".choosingIdentity":""}.accepting${e}Invitation.unknown${e}`,actions:["resetInvitation","log"]},[`connecting${e}Invitation`]:{target:`.connecting${e}Invitation`,actions:["setInvitation","log"]},[`connected${e}Invitation`]:{target:`.connecting${e}Invitation`,actions:["setInvitation","log"]},[`readyForAuthentication${e}Invitation`]:{target:`.inputting${e}VerificationCode`,actions:["setInvitation","log"]},[`authenticating${e}Invitation`]:{target:`.authenticating${e}VerificationCode`,actions:["setInvitation","log"]},[`success${e}Invitation`]:{target:t,actions:["setInvitation","log"]},[`fail${e}Invitation`]:{target:`.failing${e}Invitation`,actions:[zt({[e.toLowerCase()]:(n,o)=>({...n[e.toLowerCase()],failReason:o.reason})}),"log"]}}}},on:{[`set${e}InvitationCode`]:{target:`.acceptingRedeemed${e}Invitation`,actions:[zt({[e.toLowerCase()]:(n,o)=>({...n[e.toLowerCase()],unredeemedCode:o.code,succeededKeys:o.succeededKeys})}),`redeem${e}InvitationCode`,`invalidate${e}InvitationCode`,"log"]}}}),o9=Yf({id:"join",predictableActionArguments:!0,context:{mode:"default",identity:null,halo:{},space:{}},initial:"unknown",states:{unknown:{always:[{cond:"existingIdentity",target:"resettingIdentity",actions:"log"},{cond:"noSelectedIdentity",target:"choosingIdentity",actions:"log"},{target:"acceptingSpaceInvitation",actions:"log"}]},choosingIdentity:{initial:"unknownAuthMethod",states:{unknownAuthMethod:{always:[{cond:"hasHaloUnredeemedCode",target:"acceptingHaloInvitation",actions:"log"},{target:"choosingAuthMethod",actions:"log"}]},choosingAuthMethod:{},recoveringIdentity:{},creatingIdentity:{},acceptingHaloInvitation:E1("Halo","#join.acceptingSpaceInvitation"),confirmingAddedIdentity:{}},on:{recoverIdentity:{target:".recoveringIdentity",actions:"log"},createIdentity:{target:".creatingIdentity",actions:"log"},acceptHaloInvitation:{target:".acceptingHaloInvitation",actions:"log"},addIdentity:{target:".confirmingAddedIdentity",actions:"log"},selectIdentity:{target:"acceptingSpaceInvitation",actions:["setIdentity","log"]},deselectAuthMethod:{target:".choosingAuthMethod",actions:"log"}}},resettingIdentity:{},acceptingSpaceInvitation:E1("Space","#join.finishingJoiningSpace"),finishingJoiningSpace:{type:"final"},finishingJoiningHalo:{type:"final"}},on:{resetIdentity:{target:"choosingIdentity",actions:"unsetIdentity"}}},{guards:{existingIdentity:({identity:e,mode:t},r)=>t==="halo-only"&&!!e,noSelectedIdentity:({identity:e},t)=>!e,hasHaloUnredeemedCode:({halo:e},t)=>!!e.unredeemedCode,noSpaceInvitation:({space:e},t)=>!e.invitation&&!e.unredeemedCode},actions:{setIdentity:zt({identity:(e,t)=>t.identity}),unsetIdentity:zt({identity:()=>null}),resetInvitation:zt({halo:(e,t)=>t.type!=="resetHaloInvitation"?e.halo:(e.halo.invitationObservable&&e.halo.invitationObservable.cancel(),{...e.halo,invitation:void 0,invitationObservable:void 0,invitationSubscribable:void 0}),space:(e,t)=>t.type!=="resetSpaceInvitation"?e.space:(e.space.invitationObservable&&e.space.invitationObservable.cancel(),{...e.space,invitation:void 0,invitationObservable:void 0,invitationSubscribable:void 0})}),setInvitation:zt({halo:(e,t)=>t.type.includes("Halo")?{...e.halo,invitation:t.invitation}:e.halo,space:(e,t)=>t.type.includes("Space")?{...e.space,invitation:t.invitation}:e.space}),log:(e,t)=>{Qe("[transition]",{event:t,haloInvitation:e.halo.invitation,spaceInvitation:e.space.invitation})}}}),x1=(e,t)=>{try{const r=new URLSearchParams(t.substring(t.lastIndexOf("?")));return r.get(`${e}InvitationCode`)??r.get(`${e}Invitation`)??r.get("invitationCode")??r.get("invitation")??t}catch(r){return Qe.catch(r),t}},i9=(e,t)=>{const r=c.useCallback(({halo:a})=>{if(a.unredeemedCode)try{const s=e.halo.join(an.InvitationEncoder.decode(x1("halo",a.unredeemedCode)));return{...a,invitationObservable:s,invitationSubscribable:_1("Halo",s)}}catch(s){return Qe.error("Could not redeem device invitation code",s),a}else return a},[e]),n=c.useCallback(({space:a})=>{if(a.unredeemedCode)try{const s=an.InvitationEncoder.decode(x1("space",a.unredeemedCode));if(a.succeededKeys?.has(s.spaceKey?.toHex()??"never"))return{...a,invitation:s};{const l=e.spaces.join(s);return{...a,invitationObservable:l,invitationSubscribable:_1("Space",l)}}}catch(s){return Qe.error("Could not redeem space invitation code",s),a}else return a},[e]),o=c.useCallback(({halo:a})=>a.unredeemedCode?(t?.onInvalidateInvitationCode?.(a.unredeemedCode),{...a,unredeemedCode:void 0}):a,[t?.onInvalidateInvitationCode]),i=c.useCallback(({space:a})=>a.unredeemedCode?(t?.onInvalidateInvitationCode?.(a.unredeemedCode),{...a,unredeemedCode:void 0}):a,[t?.onInvalidateInvitationCode]);return Jf(o9,{...t,actions:{...t?.actions,redeemHaloInvitationCode:zt({halo:r}),redeemSpaceInvitationCode:zt({space:n}),invalidateHaloInvitationCode:zt({halo:o}),invalidateSpaceInvitationCode:zt({space:i})}})},a9=e=>{const t=!e.active,{send:r}=e,{t:n}=rt("os"),o={disabled:t,after:c.createElement(ze.CaretRight,{className:We(4),weight:"bold"}),slots:{label:{className:"text-sm"}}};return c.createElement(c.Fragment,null,c.createElement(_r,null,n("addition method chooser title")),c.createElement("div",{role:"none",className:"flex flex-col gap-1 grow"},c.createElement(su,{...o,description:n("create identity description"),before:c.createElement(ze.Plus,{className:We(6)}),onClick:()=>r({type:"createIdentity"}),"data-autofocus":"choosingAuthMethod","data-testid":"create-identity"},n("create identity label")),c.createElement(su,{...o,description:n("join identity description"),before:c.createElement(ze.QrCode,{className:We(6)}),onClick:()=>r({type:"acceptHaloInvitation"}),"data-testid":"join-identity"},n("join identity label")),c.createElement(su,{...o,disabled:!0,description:n("recover identity description"),before:c.createElement(ze.Textbox,{className:We(6)}),onClick:()=>r({type:"recoverIdentity"}),"data-testid":"recover-identity"},n("recover identity label"))))},s9=e=>{const{mode:t,addedIdentity:r,active:n,send:o,onDone:i,doneActionParent:a}=e,s=!n,{t:l}=rt("os"),u=r?.identityKey.toHex(),f=_t("identityListItem__label"),d=is(u??"",12),p=r?.profile?.displayName??(r&&lu(r?.identityKey.toHex())),h=c.createElement(at,{...i&&{onClick:()=>i(null)},disabled:s,"data-autofocus":"confirmingAddedIdentity","data-testid":"identity-added-done"},c.createElement("span",null,l("done label")));return c.createElement(c.Fragment,null,c.createElement(_r,null,l("identity added label")),c.createElement("div",{role:"none",className:"grow flex flex-col items-center justify-center text-center gap-2"},c.createElement(Ot.Root,{status:"active",labelId:f},c.createElement(Ot.Frame,null,c.createElement(Ot.Fallback,{href:d})),c.createElement(Ot.Label,{classNames:ue("text-lg truncate",!r?.profile?.displayName&&"font-mono")},p))),c.createElement(Ht,null,t==="halo-only"?a?c.cloneElement(a,{},h):h:c.createElement(at,{variant:"primary",disabled:s||!r,onClick:()=>r&&o({type:"selectIdentity",identity:r}),"data-autofocus":"confirmingAddedIdentity"},l("continue label"))))},l9=e=>{const{send:t,method:r}=e,n=r==="recover identity",o=Ue.useClient(),{t:i}=rt("os"),[a,s]=c.useState(""),l=u=>{o.halo.createIdentity({[n?"seedphrase":"displayName"]:u}).then(f=>{t?.({type:"selectIdentity",identity:f})},f=>{Qe.catch(f),s(i(n?"failed to recover identity message":"failed to create identity message"))})};return c.createElement(c9,{...e,onDisplayNameConfirm:l,validationMessage:a})},c9=e=>{const{method:t,send:r,active:n,onDisplayNameConfirm:o,validationMessage:i}=e,a=!n,{t:s}=rt("os"),[l,u]=c.useState(""),f=t==="recover identity";return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Hi,{validationMessage:i,label:c.createElement(_r,null,s(f?"recover identity input label":"new identity input label")),disabled:a,"data-testid":"identity-input",placeholder:f?"Type your recovery phrase":"Type a display name",onChange:({target:{value:d}})=>u(d)})),c.createElement(Ht,null,c.createElement(at,{variant:"ghost",disabled:a,onClick:()=>r?.({type:"deselectAuthMethod"}),"data-testid":`${t==="recover identity"?"recover":"create"}-identity-input-back`},s("back label")),c.createElement(at,{variant:"primary",disabled:a,onClick:()=>o?.(l),"data-testid":`${t==="recover identity"?"recover":"create"}-identity-input-continue`},s("continue label"))))},S1=e=>{const{active:t,Kind:r,doneActionParent:n,onDone:o}=e,i=!t,{t:a}=rt("os"),s=c.createElement(at,{variant:"primary",onClick:o,disabled:i,"data-autofocus":`success${r}Invitation finishingJoining${r}`,"data-testid":`${r.toLowerCase()}-invitation-accepted-done`},a("done label"));return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement("p",{className:"text-center text-sm font-normal"},a("welcome message"))),c.createElement(Ht,null,n?c.cloneElement(n,{},s):s))},u9=e=>{try{const t=new URLSearchParams(e.substring(e.lastIndexOf("?")));return t.get("spaceInvitationCode")??t.get("deviceInvitationCode")??e}catch(t){return Qe.catch(t),e}},$1=e=>{const{Kind:t,active:r,send:n,unredeemedCode:o,onExit:i,exitActionParent:a,onDone:s,doneActionParent:l,succeededKeys:u}=e,f=!r,{t:d}=rt("os"),[p,h]=c.useState(o??"");c.useEffect(()=>{o&&h(o??"")},[o]);const g=()=>n({type:`set${t}InvitationCode`,code:u9(p),...t==="Space"&&{succeededKeys:u}}),v=c.createElement(at,{variant:"ghost",disabled:f,...i?{onClick:()=>i()}:{onClick:()=>s?.(null)},"data-testid":"join-exit"},d("cancel label"));return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Hi,{label:c.createElement(_r,null,d("invitation input label")),placeholder:"Type an invitation code",disabled:f,value:p,onChange:({target:{value:y}})=>h(y),"data-autofocus":`inputting${t}InvitationCode`,"data-testid":`${t.toLowerCase()}-invitation-input`,onKeyUp:({key:y})=>y==="Enter"&&g()})),c.createElement(Ht,null,t==="Halo"?c.createElement(at,{variant:"ghost",disabled:f,onClick:()=>n({type:"deselectAuthMethod"}),"data-testid":`${t.toLowerCase()}-invitation-input-back`},d("back label")):a?c.cloneElement(a,{},v):l?c.cloneElement(l,{},v):v,c.createElement(at,{variant:"primary",disabled:f,onClick:g,"data-testid":`${t.toLowerCase()}-invitation-input-continue`},d("continue label"))))},f9=({invitationState:e,onInvitationCancel:t,active:r,send:n,Kind:o,failReason:i})=>{const{t:a}=rt("os");return i?c.createElement(c.Fragment,null,c.createElement(_r,{className:At},a(i==="timeout"?"timeout status label":i==="cancelled"?"cancelled status label":"error status label")),c.createElement("div",{role:"none",className:"grow"}),c.createElement(Ht,null,c.createElement(at,{disabled:!r,onClick:()=>n({type:`reset${o}Invitation`}),"data-testid":"invitation-rescuer-reset"},a("reset label")))):c.createElement(c.Fragment,null,c.createElement(_r,{className:At},a("connecting status label")),c.createElement("div",{role:"none",className:"grow"}),c.createElement(Ht,null,c.createElement(at,{disabled:!0,classNames:"order-2","data-testid":"next"},a("next label")),c.createElement(at,{disabled:!r,onClick:t,"data-testid":"invitation-rescuer-cancel"},a("cancel label"))))},C1=e=>{const{Kind:t,invitationState:r,active:n,send:o}=e,{t:i}=rt("os");return c.createElement(c.Fragment,null,typeof r>"u"?c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(_r,{className:At},"There was a problem joining the space")),c.createElement(Ht,null,c.createElement(at,{disabled:!n,"data-testid":"invitation-rescuer-blank-reset",onClick:()=>o({type:`reset${t}Invitation`})},i("reset label")))):c.createElement(f9,{...e}))},A1=6,O1=({failed:e,Kind:t,active:r,pending:n,invitationId:o,onInvitationAuthenticate:i,onInvitationCancel:a})=>{const s=!r||n,{t:l}=rt("os"),u=t.toLowerCase(),[f,d]=c.useState(""),p=({target:{value:h}})=>{d(h),h.length===A1&&document.querySelector(`[data-autofocus-pinlength="${u}"]`)?.focus()};return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},o&&c.createElement(wf,{text:bf(o)}),c.createElement(Fr.Root,{...e&&{validationValence:"error"}},c.createElement(Fr.Label,{asChild:!0},c.createElement(_r,null,l("auth code input label"))),c.createElement(Fr.PinInput,{disabled:s,length:A1,onChange:p,inputMode:"numeric",autoComplete:"off",pattern:"\\d*","data-autofocus":`connecting${t}Invitation inputting${t}VerificationCode authenticationFailing${t}VerificationCode authenticating${t}VerificationCode`,"data-prevent-ios-autofocus":!0,"data-testid":`${u}-auth-code-input`,"data-1p-ignore":!0}),e&&c.createElement(Fr.DescriptionAndValidation,{classNames:"text-center"},c.createElement(Fr.Validation,null,l("failed to authenticate message"))))),c.createElement(Ht,null,c.createElement(at,{variant:"ghost",disabled:s,onClick:()=>a?.(),"data-testid":`${u}-invitation-authenticator-cancel`},l("cancel label")),c.createElement(at,{variant:"primary",disabled:s,onClick:()=>i?.(f),"data-autofocus-pinlength":u,"data-testid":`${u}-invitation-authenticator-next`},l("next label"))))},d9=({send:e,active:t})=>{const r=Ue.useClient(),{t:n}=rt("os"),[o,i]=c.useState(""),a=()=>{r.reset().then(()=>e?.({type:"resetIdentity"}),s=>{Qe.catch(s),i(n("failed to reset identity message"))})};return c.createElement(p9,{disabled:!t,validationMessage:o,onConfirm:()=>a()})},p9=({disabled:e,validationMessage:t,onConfirm:r})=>{const{t:n}=rt("os"),o=n("confirmation value"),[i,a]=c.useState("");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Hi,{validationMessage:t,label:c.createElement(_r,null,n("reset identity input label",{confirmationValue:o})),disabled:e,"data-testid":"identity-input",placeholder:o,onChange:({target:{value:s}})=>a(s)})),c.createElement(Ht,null,c.createElement(at,{variant:"primary",disabled:e||i!==o,onClick:()=>r?.(),"data-testid":"reset-identity-input-confirm"},n("confirm label"))))},Gt="pbs-1 pbe-3 pli-3",h9=e=>{const{titleId:t,send:r,activeView:n,failed:o,mode:i,unredeemedCodes:a,invitationStates:s,succeededKeys:l,failReasons:u,onExit:f,onHaloDone:d,onSpaceDone:p,exitActionParent:h,doneActionParent:g,onHaloInvitationCancel:v,onSpaceInvitationCancel:y,onHaloInvitationAuthenticate:m,onSpaceInvitationAuthenticate:w,IdentityInput:E=l9,ResetIdentity:x=d9}=e;return c.createElement(So,{density:"fine"},i!=="halo-only"&&c.createElement(n9,{titleId:t,mode:i,onExit:f,exitActionParent:h}),c.createElement(st.Root,{focusManaged:!0,activeView:n},c.createElement(st.Views,null,c.createElement(st.View,{classNames:Gt,id:"addition method chooser"},c.createElement(a9,{send:r,active:n==="addition method chooser"})),c.createElement(st.View,{classNames:Gt,id:"reset identity confirmation"},c.createElement(x,{send:r,method:"reset identity",active:n==="reset identity confirmation"})),c.createElement(st.View,{classNames:Gt,id:"create identity input"},c.createElement(E,{send:r,method:"create identity",active:n==="create identity input"})),c.createElement(st.View,{classNames:Gt,id:"recover identity input"},c.createElement(E,{send:r,method:"recover identity",active:n==="recover identity input"})),c.createElement(st.View,{classNames:Gt,id:"halo invitation input"},c.createElement($1,{send:r,Kind:"Halo",active:n==="halo invitation input",...a?.Halo&&{unredeemedCode:a.Halo},...l?.Halo&&{succeededKeys:l.Halo}})),c.createElement(st.View,{classNames:Gt,id:"halo invitation rescuer"},c.createElement(C1,{send:r,Kind:"Halo",active:n==="halo invitation rescuer",invitationState:s?.Halo,onInvitationCancel:v,failReason:u?.Halo})),c.createElement(st.View,{classNames:Gt,id:"halo invitation authenticator"},c.createElement(O1,{send:r,Kind:"Halo",active:n==="halo invitation authenticator",onInvitationCancel:v,onInvitationAuthenticate:m,...o.has("Halo")&&{failed:!0}})),c.createElement(st.View,{classNames:Gt,id:"halo invitation accepted"},c.createElement(S1,{send:r,Kind:"Halo",active:n==="halo invitation accepted",doneActionParent:g,onDone:d})),c.createElement(st.View,{classNames:Gt,id:"identity added"},c.createElement(s9,{send:r,mode:i,active:n==="identity added",doneActionParent:g,onDone:d})),c.createElement(st.View,{classNames:Gt,id:"space invitation input"},c.createElement($1,{send:r,Kind:"Space",active:n==="space invitation input",...a?.Space&&{unredeemedCode:a.Space},...l?.Space&&{succeededKeys:l.Space},onExit:f,exitActionParent:h})),c.createElement(st.View,{classNames:Gt,id:"space invitation rescuer"},c.createElement(C1,{send:r,Kind:"Space",active:n==="space invitation rescuer",invitationState:s?.Space,onInvitationCancel:y,failReason:u?.Space})),c.createElement(st.View,{classNames:Gt,id:"space invitation authenticator"},c.createElement(O1,{send:r,Kind:"Space",active:n==="space invitation authenticator",onInvitationCancel:y,onInvitationAuthenticate:w,...o.has("Space")&&{failed:!0}})),c.createElement(st.View,{classNames:Gt,id:"space invitation accepted"},c.createElement(S1,{send:r,Kind:"Space",active:n==="space invitation accepted",doneActionParent:g,onDone:p})))))},g9=({titleId:e,mode:t="default",initialInvitationCode:r,exitActionParent:n,onExit:o,doneActionParent:i,onDone:a})=>{const s=Ue.useClient(),l=si.useIdentity(),{hasIosKeyboard:u}=Ae(),f=_t("joinPanel__heading",e),[d,p,h]=i9(s,{context:{mode:t,identity:l,...r&&{[t==="halo-only"?"halo":"space"]:{unredeemedCode:r}}}});c.useEffect(()=>h.subscribe(O=>{Qe("[state]",O)}).unsubscribe,[h]),c.useEffect(()=>{const S=d.configuration[0].id.split("."),O=S[S.length-1],k=O==="finishingJoining"?"successSpaceInvitation":O,j=document.querySelector(`[data-autofocus~="${k}"]`);j&&!(u&&j.hasAttribute("data-prevent-ios-autofocus"))&&j.focus()},[d.value,u]);const g=c.useMemo(()=>{switch(!0){case d.matches({choosingIdentity:"choosingAuthMethod"}):return"addition method chooser";case d.matches("resettingIdentity"):return"reset identity confirmation";case d.matches({choosingIdentity:"creatingIdentity"}):return"create identity input";case d.matches({choosingIdentity:"recoveringIdentity"}):return"recover identity input";case d.matches({choosingIdentity:{acceptingHaloInvitation:"inputtingHaloInvitationCode"}}):return"halo invitation input";case[{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"connectingHaloInvitation"}}},{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"failingHaloInvitation"}}}].some(d.matches):return"halo invitation rescuer";case[{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"inputtingHaloVerificationCode"}}},{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"authenticatingHaloVerificationCode"}}},{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"authenticationFailingHaloVerificationCode"}}}].some(d.matches):return"halo invitation authenticator";case[{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"successHaloInvitation"}}},"finishingJoiningHalo"].some(d.matches):return"halo invitation accepted";case d.matches({choosingIdentity:"confirmingAddedIdentity"}):return"identity added";case d.matches({acceptingSpaceInvitation:"inputtingSpaceInvitationCode"}):return"space invitation input";case[{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"connectingSpaceInvitation"}},{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"failingSpaceInvitation"}}].some(d.matches):return"space invitation rescuer";case[{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"inputtingSpaceVerificationCode"}},{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"authenticatingSpaceVerificationCode"}},{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"authenticationFailingSpaceVerificationCode"}}].some(d.matches):return"space invitation authenticator";case d.matches("finishingJoiningSpace"):return"space invitation accepted";default:return"never"}},[d]),v=c.useMemo(()=>{const S=new Set;switch(!0){case d.matches({choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"authenticationFailingHaloVerificationCode"}}}):S.add("Halo");break;case d.matches({acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"authenticationFailingSpaceVerificationCode"}}):S.add("Space");break}return S},[d]),y=c.useMemo(()=>({Halo:d.context.halo.unredeemedCode,Space:d.context.space.unredeemedCode}),[d]),m=Ue.useMulticastObservable(s.spaces),w=c.useMemo(()=>({Space:m?new Set(m.map(({key:S})=>S.toHex())):void 0}),[m]),E=c.useMemo(()=>({Halo:d.context.halo.invitationObservable?.get().state,Space:d.context.space.invitationObservable?.get().state}),[d]),x=c.useMemo(()=>({Halo:d.context.halo.failReason,Space:d.context.space.failReason}),[d]),P=c.useCallback(()=>{a?.({identityKey:d.context.halo.invitation?.identityKey??null,swarmKey:d.context.halo.invitation?.swarmKey??null,spaceKey:d.context.halo.invitation?.spaceKey??null,target:d.context.halo.invitation?.target??null})},[d,a]),I=c.useCallback(()=>{a?.({identityKey:d.context.space.invitation?.identityKey??null,swarmKey:d.context.space.invitation?.swarmKey??null,spaceKey:d.context.space.invitation?.spaceKey??null,target:d.context.space.invitation?.target??null})},[d,a]);return c.createElement(h9,{titleId:f,mode:t,send:p,activeView:g,failed:v,failReasons:x,pending:["connecting","authenticating"].some(S=>d?.configuration[0].id.includes(S)),unredeemedCodes:y,invitationStates:E,succeededKeys:w,identity:l,onExit:o,exitActionParent:n,doneActionParent:i,onHaloDone:P,onSpaceDone:I,onHaloInvitationCancel:()=>d.context.halo.invitationObservable?.cancel(),onSpaceInvitationCancel:()=>d.context.space.invitationObservable?.cancel(),onHaloInvitationAuthenticate:S=>(p({type:"authenticateHaloVerificationCode"}),d.context.halo.invitationObservable?.authenticate(S)),onSpaceInvitationAuthenticate:S=>(p({type:"authenticateSpaceVerificationCode"}),d.context.space.invitationObservable?.authenticate(S))})},v9=Yf({id:"space",predictableActionArguments:!0,context:{space:null},initial:"managingSpace",states:{managingSpace:{},managingSpaceInvitation:{}},on:{deselectInvitation:{target:".managingSpace",actions:["unsetInvitation","log"]},selectInvitation:{target:".managingSpaceInvitation",actions:["setInvitation","log"]}}},{actions:{setInvitation:zt({invitation:(e,t)=>t?.invitation??null}),unsetInvitation:zt({invitation:()=>{}}),log:(e,t)=>{Qe("[transition]",{event:t,context:e})}}}),m9=e=>Jf(v9,{...e,context:{...e?.context}}),T1="dxos:react-shell/space-manager/active-action",b9=e=>{const{space:t,target:r}=e,{t:n}=rt("os"),o=Ue.useConfig(),i=ga.useSpaceInvitations(t?.key),a=c.useCallback(l=>{const u=an.InvitationEncoder.encode(l);l.state===we.State.CONNECTING&&console.log(JSON.stringify({invitationCode:u,authCode:l.authCode}))},[]),s={inviteOne:{label:n("invite one label"),description:n("invite one description"),icon:ze.UserPlus,onClick:c.useCallback(()=>{const l=t.share?.({type:we.Type.INTERACTIVE,authMethod:we.AuthMethod.SHARED_SECRET,target:r});l&&o.values.runtime?.app?.env?.DX_ENVIRONMENT!=="production"&&l.subscribe(a)},[t])},inviteMany:{label:n("invite many label"),description:n("invite many description"),icon:ze.UsersThree,onClick:c.useCallback(()=>{const l=t.share?.({type:we.Type.MULTIUSE,authMethod:we.AuthMethod.NONE,target:r});l&&o.values.runtime?.app?.env?.DX_ENVIRONMENT!=="production"&&l.subscribe(a)},[t])}};return c.createElement(y9,{...e,invitations:i,inviteActions:s})},I1="pis-3 pie-1 plb-1 mbe-1 font-medium",y9=e=>{const{active:t,space:r,createInvitationUrl:n,send:o,inviteActions:i,invitations:a,showInactiveInvitations:s,SpaceMemberList:l=$k,InvitationList:u=y7}=e,{t:f}=rt("os"),d=i??{noopInvite:{label:f("create space invitation label"),description:"",icon:ze.Placeholder,onClick:()=>{}}},[p,h]=c.useState(localStorage.getItem(T1)??"inviteOne"),g=y=>{h(y),localStorage.setItem(T1,y)},v=s?a:a?.filter(y=>![we.State.CANCELLED].includes(y.get().state));return c.createElement(c.Fragment,null,c.createElement(as.Root,{classNames:"grow shrink basis-28 -mli-2"},c.createElement(as.Viewport,{classNames:"is-full pie-2"},!!v?.length&&c.createElement(c.Fragment,null,c.createElement("h3",{className:ue(I1,At)},f("invitation list heading")),c.createElement(u,{className:"mb-2",send:o,invitations:v??[],onClickRemove:y=>y.cancel(),createInvitationUrl:n}),c.createElement("h3",{className:ue(I1,At,"mbs-2")},f("space member list heading"))),c.createElement(l,{spaceKey:r.key,includeSelf:!0})),c.createElement(as.Scrollbar,{orientation:"vertical"},c.createElement(as.Thumb,null))),c.createElement(Ht,null,c.createElement(_7,{disabled:!t,actions:d,activeAction:p,onChangeActiveAction:g,"data-testid":"spaces-panel.create-invitation"})))},w9=({titleId:e,space:t,onDone:r})=>{const{t:n}=rt("os"),o=t.properties.name;return c.createElement(_f,{titleId:e,title:n("space panel heading"),corner:c.createElement(py,{"data-testid":"identity-panel-done",onDone:r})},c.createElement("div",{role:"none",className:"flex gap-4 items-center justify-center mlb-4"},c.createElement(ze.Planet,{size:32}),c.createElement("div",{className:"block text-start font-light text-xl"},o??t.key.truncate())))},P1=e=>{const{titleId:t,activeView:r,space:n,target:o,SpaceManager:i=b9,InvitationManager:a=y1,...s}=e;return c.createElement(So,{density:"fine"},c.createElement(w9,{...s,titleId:t,space:n}),c.createElement(st.Root,{activeView:r},c.createElement(st.Views,null,c.createElement(st.View,{id:"space manager",classNames:Gt},c.createElement(i,{active:r==="space manager",space:n,target:o,...s})),c.createElement(st.View,{id:"space invitation manager",classNames:Gt},c.createElement(a,{active:r==="space invitation manager",...s,invitationUrl:e.invitationUrl})))))},_9=({invitation:e,...t})=>{const r=nf(e);return c.createElement(P1,{...t,...r,invitationUrl:t.createInvitationUrl(r.invitationCode)})},E9=({titleId:e,createInvitationUrl:t=n=>n,...r})=>{const n=_t("spacePanel__heading",e),[o,i,a]=m9({context:{space:r.space}});c.useEffect(()=>a.subscribe(f=>{Qe("[state]",f)}).unsubscribe,[a]);const s=c.useMemo(()=>{switch(!0){case o.matches("managingSpace"):return"space manager";case o.matches("managingSpaceInvitation"):return"space invitation manager";default:return"never"}},[o]),l={...r,activeView:s,send:i,titleId:n,createInvitationUrl:t};return o.context.invitation?c.createElement(_9,{...l,invitation:o.context.invitation}):c.createElement(P1,{...l})},x9=e=>{const t=_t("spaceDialog__title");return c.createElement(Mr.Root,{defaultOpen:!0,onOpenChange:r=>r||e.onDone?.()},c.createElement(Mr.Portal,null,c.createElement(Mr.Overlay,null,c.createElement(Mr.Content,{"aria-labelledby":t,onOpenAutoFocus:r=>r.preventDefault()},c.createElement(au,null,c.createElement(r9,{...e,titleId:t,doneActionParent:c.createElement(Mr.Close,{asChild:!0})}))))))},k1=e=>{const t=_t("joinDialog__title"),{height:r}=YA();return c.createElement(xo.Root,{defaultOpen:!0,onOpenChange:n=>n||(e.onExit?e.onExit():e.onDone?.(null))},c.createElement(xo.Portal,null,c.createElement(xo.Overlay,{classNames:"backdrop-blur",...r&&{style:{blockSize:`${r}px`}}},c.createElement(xo.Content,{"aria-labelledby":t},c.createElement(g9,{...e,titleId:t,exitActionParent:c.createElement(xo.Cancel,{asChild:!0}),doneActionParent:c.createElement(xo.Action,{asChild:!0})})))))};var Qf,fl=on;if(process.env.NODE_ENV==="production")Qf=fl.createRoot,fl.hydrateRoot;else{var N1=fl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Qf=function(e,t){N1.usingClientEntryPoint=!0;try{return fl.createRoot(e,t)}finally{N1.usingClientEntryPoint=!1}}}var ed={exports:{}};(function(e,t){(function(r,n){var o="1.0.35",i="",a="?",s="function",l="undefined",u="object",f="string",d="major",p="model",h="name",g="type",v="vendor",y="version",m="architecture",w="console",E="mobile",x="tablet",P="smarttv",I="wearable",S="embedded",O=350,k="Amazon",j="Apple",D="ASUS",N="BlackBerry",J="Browser",K="Chrome",Y="Edge",te="Firefox",oe="Google",le="Huawei",ae="LG",ge="Microsoft",ce="Motorola",q="Opera",V="Samsung",re="Sharp",de="Sony",U="Xiaomi",z="Zebra",M="Facebook",R="Chromium OS",G="Mac OS",A=function($e,De){var C={};for(var b in $e)De[b]&&De[b].length%2===0?C[b]=De[b].concat($e[b]):C[b]=$e[b];return C},T=function($e){for(var De={},C=0;C<$e.length;C++)De[$e[C].toUpperCase()]=$e[C];return De},Z=function($e,De){return typeof $e===f?ne(De).indexOf(ne($e))!==-1:!1},ne=function($e){return $e.toLowerCase()},pe=function($e){return typeof $e===f?$e.replace(/[^\d\.]/g,i).split(".")[0]:n},me=function($e,De){if(typeof $e===f)return $e=$e.replace(/^\s\s*/,i),typeof De===l?$e:$e.substring(0,O)},xe=function($e,De){for(var C=0,b,_,L,W,X,se;C<De.length&&!X;){var Pe=De[C],it=De[C+1];for(b=_=0;b<Pe.length&&!X&&Pe[b];)if(X=Pe[b++].exec($e),X)for(L=0;L<it.length;L++)se=X[++_],W=it[L],typeof W===u&&W.length>0?W.length===2?typeof W[1]==s?this[W[0]]=W[1].call(this,se):this[W[0]]=W[1]:W.length===3?typeof W[1]===s&&!(W[1].exec&&W[1].test)?this[W[0]]=se?W[1].call(this,se,W[2]):n:this[W[0]]=se?se.replace(W[1],W[2]):n:W.length===4&&(this[W[0]]=se?W[3].call(this,se.replace(W[1],W[2])):n):this[W]=se||n;C+=2}},Ee=function($e,De){for(var C in De)if(typeof De[C]===u&&De[C].length>0){for(var b=0;b<De[C].length;b++)if(Z(De[C][b],$e))return C===a?n:C}else if(Z(De[C],$e))return C===a?n:C;return $e},ie={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Ne={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},dt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,y],[/opios[\/ ]+([\w\.]+)/i],[y,[h,q+" Mini"]],[/\bopr\/([\w\.]+)/i],[y,[h,q]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[h,y],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[h,"UC"+J]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[y,[h,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[y,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[h,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[h,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+J],y],[/\bfocus\/([\w\.]+)/i],[y,[h,te+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[h,q+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[h,q+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[h,"MIUI "+J]],[/fxios\/([-\w\.]+)/i],[y,[h,te]],[/\bqihu|(qi?ho?o?|360)browser/i],[[h,"360 "+J]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1 "+J],y],[/(comodo_dragon)\/([\w\.]+)/i],[[h,/_/g," "],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[h,y],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,M],y],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[h,y],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[h,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[h,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[h,K+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,K+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[h,"Android "+J]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,y],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[y,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[y,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[y,Ee,ie]],[/(webkit|khtml)\/([\w\.]+)/i],[h,y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[h,te+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[h,y],[/(cobalt)\/([\w\.]+)/i],[h,[y,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,ne]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,i,ne]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,ne]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[p,[v,V],[g,x]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[p,[v,V],[g,E]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[p,[v,j],[g,E]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[p,[v,j],[g,x]],[/(macintosh);/i],[p,[v,j]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[p,[v,re],[g,E]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[p,[v,le],[g,x]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[p,[v,le],[g,E]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[p,/_/g," "],[v,U],[g,E]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[p,/_/g," "],[v,U],[g,x]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[p,[v,"OPPO"],[g,E]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[p,[v,"Vivo"],[g,E]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[p,[v,"Realme"],[g,E]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[p,[v,ce],[g,E]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[p,[v,ce],[g,x]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[p,[v,ae],[g,x]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[p,[v,ae],[g,E]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[p,[v,"Lenovo"],[g,x]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[p,/_/g," "],[v,"Nokia"],[g,E]],[/(pixel c)\b/i],[p,[v,oe],[g,x]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[p,[v,oe],[g,E]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[p,[v,de],[g,E]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[p,"Xperia Tablet"],[v,de],[g,x]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[p,[v,"OnePlus"],[g,E]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[p,[v,k],[g,x]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[p,/(.+)/g,"Fire Phone $1"],[v,k],[g,E]],[/(playbook);[-\w\),; ]+(rim)/i],[p,v,[g,x]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[p,[v,N],[g,E]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[p,[v,D],[g,x]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[p,[v,D],[g,E]],[/(nexus 9)/i],[p,[v,"HTC"],[g,x]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[p,/_/g," "],[g,E]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[p,[v,"Acer"],[g,x]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[p,[v,"Meizu"],[g,E]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[v,p,[g,E]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[v,p,[g,x]],[/(surface duo)/i],[p,[v,ge],[g,x]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[p,[v,"Fairphone"],[g,E]],[/(u304aa)/i],[p,[v,"AT&T"],[g,E]],[/\bsie-(\w*)/i],[p,[v,"Siemens"],[g,E]],[/\b(rct\w+) b/i],[p,[v,"RCA"],[g,x]],[/\b(venue[\d ]{2,7}) b/i],[p,[v,"Dell"],[g,x]],[/\b(q(?:mv|ta)\w+) b/i],[p,[v,"Verizon"],[g,x]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[p,[v,"Barnes & Noble"],[g,x]],[/\b(tm\d{3}\w+) b/i],[p,[v,"NuVision"],[g,x]],[/\b(k88) b/i],[p,[v,"ZTE"],[g,x]],[/\b(nx\d{3}j) b/i],[p,[v,"ZTE"],[g,E]],[/\b(gen\d{3}) b.+49h/i],[p,[v,"Swiss"],[g,E]],[/\b(zur\d{3}) b/i],[p,[v,"Swiss"],[g,x]],[/\b((zeki)?tb.*\b) b/i],[p,[v,"Zeki"],[g,x]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[v,"Dragon Touch"],p,[g,x]],[/\b(ns-?\w{0,9}) b/i],[p,[v,"Insignia"],[g,x]],[/\b((nxa|next)-?\w{0,9}) b/i],[p,[v,"NextBook"],[g,x]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[v,"Voice"],p,[g,E]],[/\b(lvtel\-)?(v1[12]) b/i],[[v,"LvTel"],p,[g,E]],[/\b(ph-1) /i],[p,[v,"Essential"],[g,E]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[p,[v,"Envizen"],[g,x]],[/\b(trio[-\w\. ]+) b/i],[p,[v,"MachSpeed"],[g,x]],[/\btu_(1491) b/i],[p,[v,"Rotor"],[g,x]],[/(shield[\w ]+) b/i],[p,[v,"Nvidia"],[g,x]],[/(sprint) (\w+)/i],[v,p,[g,E]],[/(kin\.[onetw]{3})/i],[[p,/\./g," "],[v,ge],[g,E]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[p,[v,z],[g,x]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[p,[v,z],[g,E]],[/smart-tv.+(samsung)/i],[v,[g,P]],[/hbbtv.+maple;(\d+)/i],[[p,/^/,"SmartTV"],[v,V],[g,P]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,ae],[g,P]],[/(apple) ?tv/i],[v,[p,j+" TV"],[g,P]],[/crkey/i],[[p,K+"cast"],[v,oe],[g,P]],[/droid.+aft(\w)( bui|\))/i],[p,[v,k],[g,P]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[p,[v,re],[g,P]],[/(bravia[\w ]+)( bui|\))/i],[p,[v,de],[g,P]],[/(mitv-\w{5}) bui/i],[p,[v,U],[g,P]],[/Hbbtv.*(technisat) (.*);/i],[v,p,[g,P]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,me],[p,me],[g,P]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[g,P]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[v,p,[g,w]],[/droid.+; (shield) bui/i],[p,[v,"Nvidia"],[g,w]],[/(playstation [345portablevi]+)/i],[p,[v,de],[g,w]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[p,[v,ge],[g,w]],[/((pebble))app/i],[v,p,[g,I]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[p,[v,j],[g,I]],[/droid.+; (glass) \d/i],[p,[v,oe],[g,I]],[/droid.+; (wt63?0{2,3})\)/i],[p,[v,z],[g,I]],[/(quest( 2| pro)?)/i],[p,[v,M],[g,I]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[g,S]],[/(aeobc)\b/i],[p,[v,k],[g,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[p,[g,E]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[p,[g,x]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[g,x]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[g,E]],[/(android[-\w\. ]{0,9});.+buil/i],[p,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[h,Y+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[h,y],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,y],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[h,[y,Ee,Ne]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,"Windows"],[y,Ee,Ne]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,G],[y,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[y,h],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[h,y],[/\(bb(10);/i],[y,[h,N]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[y,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[h,te+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[h,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[h,"watchOS"]],[/crkey\/([\d\.]+)/i],[y,[h,K+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[h,R],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,y],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[h,y]]},Te=function($e,De){if(typeof $e===u&&(De=$e,$e=n),!(this instanceof Te))return new Te($e,De).getResult();var C=typeof r!==l&&r.navigator?r.navigator:n,b=$e||(C&&C.userAgent?C.userAgent:i),_=C&&C.userAgentData?C.userAgentData:n,L=De?A(dt,De):dt,W=C&&C.userAgent==b;return this.getBrowser=function(){var X={};return X[h]=n,X[y]=n,xe.call(X,b,L.browser),X[d]=pe(X[y]),W&&C&&C.brave&&typeof C.brave.isBrave==s&&(X[h]="Brave"),X},this.getCPU=function(){var X={};return X[m]=n,xe.call(X,b,L.cpu),X},this.getDevice=function(){var X={};return X[v]=n,X[p]=n,X[g]=n,xe.call(X,b,L.device),W&&!X[g]&&_&&_.mobile&&(X[g]=E),W&&X[p]=="Macintosh"&&C&&typeof C.standalone!==l&&C.maxTouchPoints&&C.maxTouchPoints>2&&(X[p]="iPad",X[g]=x),X},this.getEngine=function(){var X={};return X[h]=n,X[y]=n,xe.call(X,b,L.engine),X},this.getOS=function(){var X={};return X[h]=n,X[y]=n,xe.call(X,b,L.os),W&&!X[h]&&_&&_.platform!="Unknown"&&(X[h]=_.platform.replace(/chrome os/i,R).replace(/macos/i,G)),X},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return b},this.setUA=function(X){return b=typeof X===f&&X.length>O?me(X,O):X,this},this.setUA(b),this};Te.VERSION=o,Te.BROWSER=T([h,y,d]),Te.CPU=T([m]),Te.DEVICE=T([p,v,g,w,E,P,x,I,S]),Te.ENGINE=Te.OS=T([h,y]),e.exports&&(t=e.exports=Te),t.UAParser=Te;var Me=typeof r!==l&&(r.jQuery||r.Zepto);if(Me&&!Me.ua){var bt=new Te;Me.ua=bt.getResult(),Me.ua.get=function(){return bt.getUA()},Me.ua.set=function($e){bt.setUA($e);var De=bt.getResult();for(var C in De)Me.ua[C]=De[C]}}})(typeof window=="object"?window:Ye)})(ed,ed.exports);var S9=ed.exports,dl="/home/runner/work/dxos/dxos/packages/core/mesh/rpc-tunnel/src/ports/iframe.ts",td,rd;if(typeof navigator<"u"){const e=new S9.UAParser(navigator.userAgent);td=e.getBrowser().name,rd=e.getOS().name}var $9=(e,t,r)=>{if(!e.contentWindow){Qe("IFrame content window missing",{origin:t},{F:dl,L:24,S:void 0,C:(n,o)=>n(...o)});return}td==="Chrome"&&rd==="iOS"?e.contentWindow.postMessage(r,t):e.contentWindow.postMessage(r,t,[r.payload])},C9=(e,t)=>{td==="Chrome"&&rd==="iOS"?window.parent.postMessage(t,e):window.parent.postMessage(t,e,[t.payload])},D1=({channel:e,iframe:t,origin:r,onOrigin:n})=>({send:async o=>{if(!r){Qe("no origin set",{channel:e},{F:dl,L:62,S:void 0,C:(s,l)=>s(...l)});return}Qe("sending",{channel:e,data:o.length},{F:dl,L:66,S:void 0,C:(s,l)=>s(...l)});const i=o.buffer.slice(o.byteOffset,o.byteOffset+o.byteLength),a={channel:e,payload:i};t?$9(t,r,a):C9(r,a)},subscribe:o=>{const i=a=>{if(!t&&a.source!==window.parent)return;if(t&&a.source!==t.contentWindow)return;const l=a.data&&typeof a.data=="object"&&"channel"in a.data&&"payload"in a.data?a.data:void 0;l?.channel===e&&(r||(r=a.origin,n?.(r)),Qe("received",l,{F:dl,L:98,S:void 0,C:(u,f)=>u(...f)}),o(new Uint8Array(l.payload)))};return window.addEventListener("message",i),()=>window.removeEventListener("message",i)}});const A9=e=>{const t=_t("spaceDialog__title");return c.createElement(Mr.Root,{defaultOpen:!0,onOpenChange:r=>r||e.onDone?.()},c.createElement(Mr.Portal,null,c.createElement(Mr.Overlay,null,c.createElement(Mr.Content,{"aria-labelledby":t},c.createElement(au,null,c.createElement(E9,{...e,titleId:t,doneActionParent:c.createElement(Mr.Close,{asChild:!0})}))))))},O9=({runtime:e,origin:t})=>{const[{layout:r,invitationCode:n,spaceKey:o,target:i},a]=c.useState({layout:e.layout,invitationCode:e.invitationCode,spaceKey:e.spaceKey,target:e.target}),s=Ue.useClient(),l=ga.useSpace(o);switch(c.useEffect(()=>e.layoutUpdate.on(u=>a(u)),[e]),c.useEffect(()=>{if(r===Ue.ShellLayout.SPACE&&!l){Qe.warn("No space found for shell space invitations.");const u=setTimeout(async()=>{await e.setAppContext({display:Ue.ShellDisplay.NONE}),e.setLayout({layout:Ue.ShellLayout.DEFAULT})});return()=>clearTimeout(u)}},[e,r,l]),r){case Ue.ShellLayout.INITIALIZE_IDENTITY:return c.createElement(k1,{mode:"halo-only",initialInvitationCode:n,onDone:()=>{e.setAppContext({display:Ue.ShellDisplay.NONE}),e.setLayout({layout:Ue.ShellLayout.DEFAULT})}});case Ue.ShellLayout.IDENTITY:case Ue.ShellLayout.SHARE_IDENTITY:case Ue.ShellLayout.EDIT_PROFILE:return c.createElement(x9,{createInvitationUrl:u=>`${t}?deviceInvitationCode=${u}`,onResetDevice:async()=>{await s.reset(),await e.setAppContext({display:Ue.ShellDisplay.NONE,reload:!0})},onJoinNewIdentity:()=>e.setLayout({layout:Ue.ShellLayout.INITIALIZE_IDENTITY}),onDone:async()=>{await e.setAppContext({display:Ue.ShellDisplay.NONE}),e.setLayout({layout:Ue.ShellLayout.DEFAULT})}});case Ue.ShellLayout.SPACE:return l?c.createElement(A9,{space:l,target:i,createInvitationUrl:u=>`${t}?spaceInvitationCode=${u}`,onDone:async()=>{await e.setAppContext({display:Ue.ShellDisplay.NONE}),e.setLayout({layout:Ue.ShellLayout.DEFAULT})}}):null;case Ue.ShellLayout.JOIN_SPACE:return c.createElement(k1,{initialInvitationCode:n,onDone:async u=>{const f=u?.target??void 0;await e.setAppContext({display:Ue.ShellDisplay.NONE,spaceKey:u?.spaceKey??void 0,target:f}),e.setLayout({layout:Ue.ShellLayout.DEFAULT})},onExit:async()=>{await e.setAppContext({display:Ue.ShellDisplay.NONE}),e.setLayout({layout:Ue.ShellLayout.DEFAULT})}});default:return null}},T9={"en-US":Object.freeze(Object.defineProperty({__proto__:null,os:{"manage profile label":"Manage identity","identity offline description":"Offline","sidebar label":"DXOS sidebar","copy invitation code label":"Copy URL","copy invitation code success label":"Copied","open share panel label":"View QR code","joining space heading":"Joining space","join space heading":"Enter space invitation","halo heading":"Initialize device identity","exit label":"Exit","identity selector title":"Join as","identity radio group title":"Select an identity you’ve associated with this device already","add identity label":"Add","continue label":"Continue","back label":"Back","next label":"Next","close label":"Close","auth choices label":"Choose an identity","create identity label":"Create an identity","create identity description":"Create a new identity.","recover identity label":"Use a seed phrase","recover identity description":"Enter your seed phrase to log in manually.","join identity label":"Use another device","join identity description":"Add this device to an identity you’re already logged into on another device.","deselect identity label":"Back to identities","addition method chooser title":"An identity is required to continue","new identity input label":"Set display name","recover identity input label":"Type or paste your seed phrase","failed to create identity message":"Failed to create an identity.","failed to recover identity message":"Failed to recover an identity from the provided seed phrase.","failed to authenticate message":"Incorrect PIN.","identity added label":"Created identity & added to this device:","join space as identity heading":"<part>as </part><part><icon/><label>{{labelValue}}</label></part>","error status label":"Failed","timeout status label":"Timed out","cancelled status label":"Cancelled","init status label":"Ready to connect","connecting status label":"Connecting…","connected status label":"Enter confirmation PIN","authenticating status label":"Enter confirmation PIN","success status label":"Success","connect label":"Connect","reconnect label":"Reconnect","cancel label":"Cancel","done label":"Done","reset label":"Start over","auth code input label":"Enter the verification code","invitation input label":"Paste an invitation code or URL","create device invitation label":"Add device","create space invitation label":"Invite","qr label":"Scan to accept invitation","empty invitations message":"No pending invitations","empty device list message":"No devices authenticated other than this device.","show all spaces label":"All spaces","all spaces label":"All spaces","create space label":"Create a new space","join space label":"Join a space","show current space label":"Current space","view space invitations label":"View space invitations","toggle sidebar label":"Open/close sidebar","open sidebar label":"Open sidebar","close sidebar label":"Close sidebar","welcome message":"Welcome","selecting identity heading":"Selecting identity","devices heading":"Devices","identity heading":"Profile settings","choose add device label":"Add device","choose devices label":"Manage devices","choose profile label":"Edit profile","choose sign out label":"Sign out","empty space members message":"There is nobody in this space yet.","back to all invitations label":"Back to all invitations","invitation heading":"Invitation","invitation list heading":"Invitations","device invitation list heading":"Pending device invitations","space invitation list heading":"Pending invitations","device list heading":"Devices","space member list heading":"Members","space panel heading":"Space membership","auth code message":"Enter the following auth code on the joining device.","display name input label":"Display name","display name input placeholder":"Enter a display name","invite one label":"Invite one","invite one description":"Only one user may join.","invite one qr label":"Single-use","invite one list item label":"Active single-use invitation","invite many label":"Invite many","invite many description":"Anyone with the link can join.","invite many qr label":"Multiple-use","invite many list item label":"Active multiple-use invitation","invite options label":"Change the active invite option.","confirm label":"Confirm","reset identity input label":"This will clear this device and all associated data. Type {{confirmationValue}} and confirm to continue.","failed to reset identity message":"Failed to reset identity.","confirmation value":"CONFIRM","sign out chooser title":"DANGER ZONE","sign out chooser message":"Proceeding with either action below will erase all data on this device.","join new identity label":"Join a new identity","reset device label":"Reset device","reset device confirm message":"Are you sure you want to reset your device? All data will be lost."}},Symbol.toStringTag,{value:"Module"}))},I9=async(e=new Ue.Config)=>{const t=new Ue.ClientServicesProxy(D1({channel:an.DEFAULT_CLIENT_CHANNEL})),r=new Ue.Client({config:e,services:t}),n=new j1.ShellRuntimeImpl(D1({channel:an.DEFAULT_SHELL_CHANNEL}));await Promise.all([n.open(),r.initialize()]),Qf(document.getElementById("root")).render(c.createElement(c.StrictMode,null,c.createElement(gT,{tx:_k,resourceExtensions:[T9]},c.createElement(Ue.ClientContext.Provider,{value:{client:r,status:Ue.SystemStatus.ACTIVE}},c.createElement(au,null,c.createElement(yr.Provider,null,c.createElement(O9,{runtime:n,origin:location.origin})))))))};c.createContext({}),Jt.runShell=I9,Object.defineProperty(Jt,Symbol.toStringTag,{value:"Module"})});
|
|
202
|
+
***************************************************************************** */var ye=function(){return ye=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},ye.apply(this,arguments)};function Jf(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Ke(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Qe(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function vt(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var ut;(function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"})(ut||(ut={}));var qo;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(qo||(qo={}));var Xf=ut.Start,Zf=ut.Stop,na=ut.Raise,al=ut.Send,d1=ut.Cancel,AF=ut.NullEvent,Qf=ut.Assign;ut.After,ut.DoneState;var p1=ut.Log,OF=ut.Init,ed=ut.Invoke;ut.ErrorExecution;var h1=ut.ErrorPlatform,TF=ut.ErrorCustom,g1=ut.Update,IF=ut.Choose,PF=ut.Pure,v1=".",m1={},td="xstate.guard",kF="",$t=process.env.NODE_ENV==="production",sl;function rd(e,t,r){r===void 0&&(r=v1);var n=oa(e,r),o=oa(t,r);return et(o)?et(n)?o===n:!1:et(n)?n in o:Object.keys(n).every(function(i){return i in o?rd(n[i],o[i]):!1})}function b1(e){try{return et(e)||typeof e=="number"?"".concat(e):e.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function nd(e,t){try{return Yo(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function NF(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function oa(e,t){if(NF(e))return e.value;if(Yo(e))return ll(e);if(typeof e!="string")return e;var r=nd(e,t);return ll(r)}function ll(e){if(e.length===1)return e[0];for(var t={},r=t,n=0;n<e.length-1;n++)n===e.length-2?r[e[n]]=e[n+1]:(r[e[n]]={},r=r[e[n]]);return t}function ia(e,t){for(var r={},n=Object.keys(e),o=0;o<n.length;o++){var i=n[o];r[i]=t(e[i],i,e,o)}return r}function y1(e,t,r){var n,o,i={};try{for(var a=Ke(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,u=e[l];r(u)&&(i[l]=t(u,l,e))}}catch(f){n={error:f}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i}var DF=function(e){return function(t){var r,n,o=t;try{for(var i=Ke(e),a=i.next();!a.done;a=i.next()){var s=a.value;o=o[s]}}catch(l){r={error:l}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o}};function LF(e,t){return function(r){var n,o,i=r;try{for(var a=Ke(e),s=a.next();!s.done;s=a.next()){var l=s.value;i=i[t][l]}}catch(u){n={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i}}function cl(e){if(!e)return[[]];if(et(e))return[[e]];var t=_t(Object.keys(e).map(function(r){var n=e[r];return typeof n!="string"&&(!n||!Object.keys(n).length)?[[r]]:cl(e[r]).map(function(o){return[r].concat(o)})}));return t}function _t(e){var t;return(t=[]).concat.apply(t,vt([],Qe(e),!1))}function w1(e){return Yo(e)?e:[e]}function xr(e){return e===void 0?[]:w1(e)}function ul(e,t,r){var n,o;if(rt(e))return e(t,r.data);var i={};try{for(var a=Ke(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,u=e[l];rt(u)?i[l]=u(t,r.data):i[l]=u}}catch(f){n={error:f}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i}function MF(e){return/^(done|error)\./.test(e)}function _1(e){return!!(e instanceof Promise||e!==null&&(rt(e)||typeof e=="object")&&rt(e.then))}function FF(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function jF(e,t){var r,n,o=Qe([[],[]],2),i=o[0],a=o[1];try{for(var s=Ke(e),l=s.next();!l.done;l=s.next()){var u=l.value;t(u)?i.push(u):a.push(u)}}catch(f){r={error:f}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return[i,a]}function E1(e,t){return ia(e.states,function(r,n){if(r){var o=(et(t)?void 0:t[n])||(r?r.current:void 0);if(o)return{current:o,states:E1(r,o)}}})}function BF(e,t){return{current:t,states:E1(e,t)}}function x1(e,t,r,n){$t||Lt(!!e,"Attempting to update undefined context");var o=e&&r.reduce(function(i,a){var s,l,u=a.assignment,f={state:n,action:a,_event:t},d={};if(rt(u))d=u(i,t.data,f);else try{for(var p=Ke(Object.keys(u)),h=p.next();!h.done;h=p.next()){var g=h.value,v=u[g];d[g]=rt(v)?v(i,t.data,f):v}}catch(b){s={error:b}}finally{try{h&&!h.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}return Object.assign({},i,d)},e);return o}var Lt=function(){};$t||(Lt=function(e,t){var r=e instanceof Error?e:void 0;if(!(!r&&e)&&console!==void 0){var n=["Warning: ".concat(t)];r&&n.push(r),console.warn.apply(console,n)}});function Yo(e){return Array.isArray(e)}function rt(e){return typeof e=="function"}function et(e){return typeof e=="string"}function S1(e,t){if(e)return et(e)?{type:td,name:e,predicate:t?t[e]:void 0}:rt(e)?{type:td,name:e.name,predicate:e}:e}function RF(e){try{return"subscribe"in e&&rt(e.subscribe)}catch{return!1}}var In=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();sl={},sl[In]=function(){return this},sl[Symbol.observable]=function(){return this};function oo(e){return!!e&&"__xstatenode"in e}function UF(e){return!!e&&typeof e.send=="function"}function fl(e,t){return et(e)||typeof e=="number"?ye({type:e},t):e}function Mt(e,t){if(!et(e)&&"$$type"in e&&e.$$type==="scxml")return e;var r=fl(e);return ye({name:r.type,data:r,$$type:"scxml",type:"external"},t)}function Jo(e,t){var r=w1(t).map(function(n){return typeof n>"u"||typeof n=="string"||oo(n)?{target:n,event:e}:ye(ye({},n),{event:e})});return r}function WF(e){if(!(e===void 0||e===kF))return xr(e)}function VF(e,t,r){if(!$t){var n=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(r,"', error was '").concat(e,"'.").concat(n));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(r,"'. ")+"Original error: '".concat(e,"'. ").concat(n," Current error is '").concat(t,"'.").concat(o))}}}function $1(e,t,r,n,o){var i=e.options.guards,a={state:o,cond:t,_event:n};if(t.type===td)return((i==null?void 0:i[t.name])||t.predicate)(r,n.data,a);var s=i==null?void 0:i[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(r,n.data,a)}function C1(e){return typeof e=="string"?{type:e}:e}function dl(e,t,r){var n=function(){},o=typeof e=="object",i=o?e:null;return{next:((o?e.next:e)||n).bind(i),error:((o?e.error:t)||n).bind(i),complete:((o?e.complete:r)||n).bind(i)}}function pl(e,t){return"".concat(e,":invocation[").concat(t,"]")}function od(e){return(e.type===na||e.type===al&&e.to===qo.Internal)&&typeof e.delay!="number"}var Xo=Mt({type:OF});function id(e,t){return t&&t[e]||void 0}function aa(e,t){var r;if(et(e)||typeof e=="number"){var n=id(e,t);rt(n)?r={type:e,exec:n}:n?r=n:r={type:e,exec:void 0}}else if(rt(e))r={type:e.name||e.toString(),exec:e};else{var n=id(e.type,t);if(rt(n))r=ye(ye({},e),{exec:n});else if(n){var o=n.type||e.type;r=ye(ye(ye({},n),e),{type:o})}else r=e}return r}var Pn=function(e,t){if(!e)return[];var r=Yo(e)?e:[e];return r.map(function(n){return aa(n,t)})};function ad(e){var t=aa(e);return ye(ye({id:et(e)?e:t.id},t),{type:t.type})}function HF(e,t){return{type:na,event:typeof e=="function"?e:fl(e),delay:t?t.delay:void 0,id:t==null?void 0:t.id}}function zF(e,t,r,n){var o={_event:r},i=Mt(rt(e.event)?e.event(t,r.data,o):e.event),a;if(et(e.delay)){var s=n&&n[e.delay];a=rt(s)?s(t,r.data,o):s}else a=rt(e.delay)?e.delay(t,r.data,o):e.delay;return ye(ye({},e),{type:na,_event:i,delay:a})}function GF(e,t){return{to:t?t.to:void 0,type:al,event:rt(e)?e:fl(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:rt(e)?e.name:b1(e)}}function KF(e,t,r,n){var o={_event:r},i=Mt(rt(e.event)?e.event(t,r.data,o):e.event),a;if(et(e.delay)){var s=n&&n[e.delay];a=rt(s)?s(t,r.data,o):s}else a=rt(e.delay)?e.delay(t,r.data,o):e.delay;var l=rt(e.to)?e.to(t,r.data,o):e.to;return ye(ye({},e),{to:l,_event:i,event:i.data,delay:a})}var qF=function(e,t,r){return ye(ye({},e),{value:et(e.expr)?e.expr:e.expr(t,r.data,{_event:r})})},YF=function(e){return{type:d1,sendId:e}};function JF(e){var t=ad(e);return{type:ut.Start,activity:t,exec:void 0}}function XF(e){var t=rt(e)?e:ad(e);return{type:ut.Stop,activity:t,exec:void 0}}function ZF(e,t,r){var n=rt(e.activity)?e.activity(t,r.data):e.activity,o=typeof n=="string"?{id:n}:n,i={type:ut.Stop,activity:o};return i}var QF=function(e){return{type:Qf,assignment:e}};function e9(e,t){var r=t?"#".concat(t):"";return"".concat(ut.After,"(").concat(e,")").concat(r)}function hl(e,t){var r="".concat(ut.DoneState,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function gl(e,t){var r="".concat(ut.DoneInvoke,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function sa(e,t){var r="".concat(ut.ErrorPlatform,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}var t9=function(e){var t,r,n=[];try{for(var o=Ke(e),i=o.next();!i.done;i=o.next())for(var a=i.value,s=0;s<a.actions.length;){if(a.actions[s].type===Qf){n.push(a.actions[s]),a.actions.splice(s,1);continue}s++}}catch(l){t={error:l}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n};function vl(e,t,r,n,o,i,a){a===void 0&&(a=!1);var s=a?[]:t9(o),l=s.length?x1(r,n,s,t):r,u=a?[r]:void 0,f=[];function d(g,v){var b;switch(v.type){case na:{var m=zF(v,l,n,e.options.delays);return i&&typeof m.delay=="number"&&i(m,l,n),m}case al:var w=KF(v,l,n,e.options.delays);if(!$t){var E=v.delay;Lt(!et(E)||typeof w.delay=="number","No delay reference for delay expression '".concat(E,"' was found on machine '").concat(e.id,"'"))}return i&&w.to!==qo.Internal&&(g==="entry"?f.push(w):i(w,l,n)),w;case p1:{var x=qF(v,l,n);return i==null||i(x,l,n),x}case IF:{var k=v,I=(b=k.conds.find(function(oe){var le=S1(oe.cond,e.options.guards);return!le||$1(e,le,l,n,i?void 0:t)}))===null||b===void 0?void 0:b.actions;if(!I)return[];var S=Qe(vl(e,t,l,n,[{type:g,actions:Pn(xr(I),e.options.actions)}],i,a),2),C=S[0],P=S[1];return l=P,u==null||u.push(l),C}case PF:{var I=v.get(l,n.data);if(!I)return[];var F=Qe(vl(e,t,l,n,[{type:g,actions:Pn(xr(I),e.options.actions)}],i,a),2),D=F[0],N=F[1];return l=N,u==null||u.push(l),D}case Zf:{var x=ZF(v,l,n);return i==null||i(x,r,n),x}case Qf:{l=x1(l,n,[v],i?void 0:t),u==null||u.push(l);break}default:var J=aa(v,e.options.actions),G=J.exec;if(i)i(J,l,n);else if(G&&u){var Y=u.length-1,te=ye(ye({},J),{exec:function(oe){for(var le=[],ae=1;ae<arguments.length;ae++)le[ae-1]=arguments[ae];G.apply(void 0,vt([u[Y]],Qe(le),!1))}});J=te}return J}}function p(g){var v,b,m=[];try{for(var w=Ke(g.actions),E=w.next();!E.done;E=w.next()){var x=E.value,k=d(g.type,x);k&&(m=m.concat(k))}}catch(I){v={error:I}}finally{try{E&&!E.done&&(b=w.return)&&b.call(w)}finally{if(v)throw v.error}}return f.forEach(function(I){i(I,l,n)}),f.length=0,m}var h=_t(o.map(p));return[h,l]}var Zo=function(e,t){var r=t(e);return r};function A1(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[In]=function(){return this},t}function r9(e,t,r,n){var o,i=C1(e.src),a=(o=t==null?void 0:t.options.services)===null||o===void 0?void 0:o[i.type],s=e.data?ul(e.data,r,n):void 0,l=a?O1(a,e.id,s):A1(e.id);return l.meta=e,l}function O1(e,t,r){var n=A1(t);if(n.deferred=!0,oo(e)){var o=n.state=Zo(void 0,function(){return(r?e.withContext(r):e).initialState});n.getSnapshot=function(){return o}}return n}function n9(e){try{return typeof e.send=="function"}catch{return!1}}function o9(e){return n9(e)&&"id"in e}function i9(e){var t;return ye((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[In]=function(){return this},t),e)}var ml=function(e){return e.type==="atomic"||e.type==="final"};function T1(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function la(e){return T1(e).filter(function(t){return t.type!=="history"})}function I1(e){var t=[e];return ml(e)?t:t.concat(_t(la(e).map(I1)))}function ca(e,t){var r,n,o,i,a,s,l,u,f=new Set(e),d=sd(f),p=new Set(t);try{for(var h=Ke(p),g=h.next();!g.done;g=h.next())for(var v=g.value,b=v.parent;b&&!p.has(b);)p.add(b),b=b.parent}catch(P){r={error:P}}finally{try{g&&!g.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}var m=sd(p);try{for(var w=Ke(p),E=w.next();!E.done;E=w.next()){var v=E.value;if(v.type==="compound"&&(!m.get(v)||!m.get(v).length))d.get(v)?d.get(v).forEach(function(F){return p.add(F)}):v.initialStateNodes.forEach(function(F){return p.add(F)});else if(v.type==="parallel")try{for(var x=(a=void 0,Ke(la(v))),k=x.next();!k.done;k=x.next()){var I=k.value;p.has(I)||(p.add(I),d.get(I)?d.get(I).forEach(function(F){return p.add(F)}):I.initialStateNodes.forEach(function(F){return p.add(F)}))}}catch(F){a={error:F}}finally{try{k&&!k.done&&(s=x.return)&&s.call(x)}finally{if(a)throw a.error}}}}catch(P){o={error:P}}finally{try{E&&!E.done&&(i=w.return)&&i.call(w)}finally{if(o)throw o.error}}try{for(var S=Ke(p),C=S.next();!C.done;C=S.next())for(var v=C.value,b=v.parent;b&&!p.has(b);)p.add(b),b=b.parent}catch(P){l={error:P}}finally{try{C&&!C.done&&(u=S.return)&&u.call(S)}finally{if(l)throw l.error}}return p}function P1(e,t){var r=t.get(e);if(!r)return{};if(e.type==="compound"){var n=r[0];if(n){if(ml(n))return n.key}else return{}}var o={};return r.forEach(function(i){o[i.key]=P1(i,t)}),o}function sd(e){var t,r,n=new Map;try{for(var o=Ke(e),i=o.next();!i.done;i=o.next()){var a=i.value;n.has(a)||n.set(a,[]),a.parent&&(n.has(a.parent)||n.set(a.parent,[]),n.get(a.parent).push(a))}}catch(s){t={error:s}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n}function a9(e,t){var r=ca([e],t);return P1(e,sd(r))}function ua(e,t){return Array.isArray(e)?e.some(function(r){return r===t}):e instanceof Set?e.has(t):!1}function s9(e){return vt([],Qe(new Set(_t(vt([],Qe(e.map(function(t){return t.ownEvents})),!1)))),!1)}function bl(e,t){return t.type==="compound"?la(t).some(function(r){return r.type==="final"&&ua(e,r)}):t.type==="parallel"?la(t).every(function(r){return bl(e,r)}):!1}function l9(e){return e===void 0&&(e=[]),e.reduce(function(t,r){return r.meta!==void 0&&(t[r.id]=r.meta),t},{})}function k1(e){return new Set(_t(e.map(function(t){return t.tags})))}function N1(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(et(e)||et(t))return e===t;var r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(function(o){return N1(e[o],t[o])})}function c9(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}function u9(e,t){var r=e.exec,n=ye(ye({},e),{exec:r!==void 0?function(){return r(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0});return n}var fr=function(){function e(t){var r=this,n;this.actions=[],this.activities=m1,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||m1,this.meta=l9(t.configuration),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=(n=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&n!==void 0?n:new Set,this.machine=t.machine,Object.defineProperty(this,"nextEvents",{get:function(){return s9(r.configuration)}})}return e.from=function(t,r){if(t instanceof e)return t.context!==r?new e({value:t.value,context:r,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t;var n=Xo;return new e({value:t,context:r,_event:n,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,r){if(t instanceof e){if(!t.actions.length)return t;var n=Xo;return new e({value:t.value,context:r,_event:n,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,r)},e.prototype.toStrings=function(t,r){var n=this;if(t===void 0&&(t=this.value),r===void 0&&(r="."),et(t))return[t];var o=Object.keys(t);return o.concat.apply(o,vt([],Qe(o.map(function(i){return n.toStrings(t[i],r).map(function(a){return i+r+a})})),!1))},e.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var r=t.tags;t.machine;var n=Jf(t,["configuration","transitions","tags","machine"]);return ye(ye({},n),{tags:Array.from(r)})},e.prototype.matches=function(t){return rd(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var r;$t&&Lt(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=(r=this.machine)===null||r===void 0?void 0:r.getTransitionData(this,t);return!!(n!=null&&n.transitions.length)&&n.transitions.some(function(o){return o.target!==void 0||o.actions.length})},e}(),f9={deferEvents:!1},D1=function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=ye(ye({},f9),t)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(r){throw this.clear(),r}finally{this.processingEvent=!1}},e}(),ld=new Map,d9=0,fa={bookId:function(){return"x:".concat(d9++)},register:function(e,t){return ld.set(e,t),e},get:function(e){return ld.get(e)},free:function(e){ld.delete(e)}};function cd(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;$t||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues")}function p9(){var e=cd();if(e&&"__xstate__"in e)return e.__xstate__}function h9(e){if(cd()){var t=p9();t&&t.register(e)}}function g9(e,t){t===void 0&&(t={});var r=e.initialState,n=new Set,o=[],i=!1,a=function(){if(!i){for(i=!0;o.length>0;){var u=o.shift();r=e.transition(r,u,l),n.forEach(function(f){return f.next(r)})}i=!1}},s=i9({id:t.id,send:function(u){o.push(u),a()},getSnapshot:function(){return r},subscribe:function(u,f,d){var p=dl(u,f,d);return n.add(p),p.next(r),{unsubscribe:function(){n.delete(p)}}}}),l={parent:t.parent,self:s,id:t.id||"anonymous",observers:n};return r=e.start?e.start(l):r,s}var v9={sync:!1,autoForward:!1},xt;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(xt||(xt={}));var m9=function(){function e(t,r){r===void 0&&(r=e.defaultOptions);var n=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=xt.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(f,d){if(Yo(f))return n.batch(f),n.state;var p=Mt(fl(f,d));if(n.status===xt.Stopped)return $t||Lt(!1,'Event "'.concat(p.name,'" was sent to stopped service "').concat(n.machine.id,`". This service has already reached its final state, and will not transition.
|
|
203
|
+
Event: `).concat(JSON.stringify(p.data))),n.state;if(n.status!==xt.Running&&!n.options.deferEvents)throw new Error('Event "'.concat(p.name,'" was sent to uninitialized service "').concat(n.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
|
|
204
|
+
Event: `).concat(JSON.stringify(p.data)));return n.scheduler.schedule(function(){n.forward(p);var h=n._nextState(p);n.update(h,p)}),n._state},this.sendTo=function(f,d,p){var h=n.parent&&(d===qo.Parent||n.parent.id===d),g=h?n.parent:et(d)?d===qo.Internal?n:n.children.get(d)||fa.get(d):UF(d)?d:void 0;if(!g){if(!h)throw new Error("Unable to send event to child '".concat(d,"' from service '").concat(n.id,"'."));$t||Lt(!1,"Service '".concat(n.id,"' has no parent: unable to send event ").concat(f.type));return}if("machine"in g){if(n.status!==xt.Stopped||n.parent!==g||n.state.done){var v=ye(ye({},f),{name:f.name===TF?"".concat(sa(n.id)):f.name,origin:n.sessionId});!p&&n.machine.config.predictableActionArguments?n._outgoingQueue.push([g,v]):g.send(v)}}else!p&&n.machine.config.predictableActionArguments?n._outgoingQueue.push([g,f.data]):g.send(f.data)},this._exec=function(f,d,p,h){h===void 0&&(h=n.machine.options.actions);var g=f.exec||id(f.type,h),v=rt(g)?g:g?g.exec:f.exec;if(v)try{return v(d,p.data,n.machine.config.predictableActionArguments?{action:f,_event:p}:{action:f,state:n.state,_event:p})}catch(G){throw n.parent&&n.parent.send({type:"xstate.error",data:G}),G}switch(f.type){case na:{var b=f;n.defer(b);break}case al:var m=f;if(typeof m.delay=="number"){n.defer(m);return}else m.to?n.sendTo(m._event,m.to,p===Xo):n.send(m._event);break;case d1:n.cancel(f.sendId);break;case Xf:{if(n.status!==xt.Running)return;var w=f.activity;if(!n.machine.config.predictableActionArguments&&!n.state.activities[w.id||w.type])break;if(w.type===ut.Invoke){var E=C1(w.src),x=n.machine.options.services?n.machine.options.services[E.type]:void 0,k=w.id,I=w.data;$t||Lt(!("forward"in w),"`forward` property is deprecated (found in invocation of '".concat(w.src,"' in in machine '").concat(n.machine.id,"'). ")+"Please use `autoForward` instead.");var S="autoForward"in w?w.autoForward:!!w.forward;if(!x){$t||Lt(!1,"No service found for invocation '".concat(w.src,"' in machine '").concat(n.machine.id,"'."));return}var C=I?ul(I,d,p):void 0;if(typeof x=="string")return;var P=rt(x)?x(d,p.data,{data:C,src:E,meta:w.meta}):x;if(!P)return;var F=void 0;oo(P)&&(P=C?P.withContext(C):P,F={autoForward:S}),n.spawn(P,k,F)}else n.spawnActivity(w);break}case Zf:{n.stopChild(f.activity.id);break}case p1:var D=f,N=D.label,J=D.value;N?n.logger(N,J):n.logger(J);break;default:$t||Lt(!1,"No implementation found for action type '".concat(f.type,"'"));break}};var o=ye(ye({},e.defaultOptions),r),i=o.clock,a=o.logger,s=o.parent,l=o.id,u=l!==void 0?l:t.id;this.id=u,this.logger=a,this.clock=i,this.parent=s,this.options=o,this.scheduler=new D1({deferEvents:this.options.deferEvents}),this.sessionId=fa.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:Zo(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return $t||Lt(this.status!==xt.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(t,r){var n,o;try{for(var i=Ke(t.actions),a=i.next();!a.done;a=i.next()){var s=a.value;this.exec(s,t,r)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},e.prototype.update=function(t,r){var n,o,i,a,s,l,u,f,d=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||r===Xo)&&this.options.execute)this.execute(this.state);else for(var p=void 0;p=this._outgoingQueue.shift();)p[0].send(p[1]);if(this.children.forEach(function(P){d.state.children[P.id]=P}),this.devTools&&this.devTools.send(r.data,t),t.event)try{for(var h=Ke(this.eventListeners),g=h.next();!g.done;g=h.next()){var v=g.value;v(t.event)}}catch(P){n={error:P}}finally{try{g&&!g.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}try{for(var b=Ke(this.listeners),m=b.next();!m.done;m=b.next()){var v=m.value;v(t,t.event)}}catch(P){i={error:P}}finally{try{m&&!m.done&&(a=b.return)&&a.call(b)}finally{if(i)throw i.error}}try{for(var w=Ke(this.contextListeners),E=w.next();!E.done;E=w.next()){var x=E.value;x(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(P){s={error:P}}finally{try{E&&!E.done&&(l=w.return)&&l.call(w)}finally{if(s)throw s.error}}if(this.state.done){var k=t.configuration.find(function(P){return P.type==="final"&&P.parent===d.machine}),I=k&&k.doneData?ul(k.doneData,t.context,r):void 0;this._doneEvent=gl(this.id,I);try{for(var S=Ke(this.doneListeners),C=S.next();!C.done;C=S.next()){var v=C.value;v(this._doneEvent)}}catch(P){u={error:P}}finally{try{C&&!C.done&&(f=S.return)&&f.call(S)}finally{if(u)throw u.error}}this._stop(),this._stopChildren(),fa.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===xt.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,r,n){var o=this,i=dl(t,r,n);this.listeners.add(i.next),this.status!==xt.NotStarted&&i.next(this.state);var a=function(){o.doneListeners.delete(a),o.stopListeners.delete(a),i.complete()};return this.status===xt.Stopped?i.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){o.listeners.delete(i.next),o.doneListeners.delete(a),o.stopListeners.delete(a)}}},e.prototype.onEvent=function(t){return this.eventListeners.add(t),this},e.prototype.onSend=function(t){return this.sendListeners.add(t),this},e.prototype.onChange=function(t){return this.contextListeners.add(t),this},e.prototype.onStop=function(t){return this.stopListeners.add(t),this},e.prototype.onDone=function(t){return this.status===xt.Stopped&&this._doneEvent?t(this._doneEvent):this.doneListeners.add(t),this},e.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},e.prototype.start=function(t){var r=this;if(this.status===xt.Running)return this;this.machine._init(),fa.register(this.sessionId,this),this.initialized=!0,this.status=xt.Running;var n=t===void 0?this.initialState:Zo(this,function(){return c9(t)?r.machine.resolveState(t):r.machine.resolveState(fr.from(t,r.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){r.update(n,Xo)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){rt(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,r,n,o,i,a,s,l,u,f;try{for(var d=Ke(this.listeners),p=d.next();!p.done;p=d.next()){var h=p.value;this.listeners.delete(h)}}catch(S){t={error:S}}finally{try{p&&!p.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}try{for(var g=Ke(this.stopListeners),v=g.next();!v.done;v=g.next()){var h=v.value;h(),this.stopListeners.delete(h)}}catch(S){n={error:S}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(n)throw n.error}}try{for(var b=Ke(this.contextListeners),m=b.next();!m.done;m=b.next()){var h=m.value;this.contextListeners.delete(h)}}catch(S){i={error:S}}finally{try{m&&!m.done&&(a=b.return)&&a.call(b)}finally{if(i)throw i.error}}try{for(var w=Ke(this.doneListeners),E=w.next();!E.done;E=w.next()){var h=E.value;this.doneListeners.delete(h)}}catch(S){s={error:S}}finally{try{E&&!E.done&&(l=w.return)&&l.call(w)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=xt.Stopped,this._initialState=void 0;try{for(var x=Ke(Object.keys(this.delayedEventsMap)),k=x.next();!k.done;k=x.next()){var I=k.value;this.clock.clearTimeout(this.delayedEventsMap[I])}}catch(S){u={error:S}}finally{try{k&&!k.done&&(f=x.return)&&f.call(x)}finally{if(u)throw u.error}}this.scheduler.clear(),this.scheduler=new D1({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,r=this.scheduler;return this._stop(),r.schedule(function(){var n=Mt({type:"xstate.stop"}),o=Zo(t,function(){var i=_t(vt([],Qe(t.state.configuration),!1).sort(function(f,d){return d.order-f.order}).map(function(f){return Pn(f.onExit,t.machine.options.actions)})),a=Qe(vl(t.machine,t.state,t.state.context,n,[{type:"exit",actions:i}],t.machine.config.predictableActionArguments?t._exec:void 0,t.machine.config.predictableActionArguments||t.machine.config.preserveActionOrder),2),s=a[0],l=a[1],u=new fr({value:t.state.value,context:l,_event:n,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:s.filter(function(f){return!od(f)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});return u.changed=!0,u});t.update(o,n),t._stopChildren(),fa.free(t.sessionId)}),this},e.prototype.batch=function(t){var r=this;if(this.status===xt.NotStarted&&this.options.deferEvents)$t||Lt(!1,"".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,`" and are deferred. Make sure .start() is called for this service.
|
|
205
|
+
Event: `).concat(JSON.stringify(event)));else if(this.status!==xt.Running)throw new Error("".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(t.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var o,i,a=r.state,s=!1,l=[],u=function(h){var g=Mt(h);r.forward(g),a=Zo(r,function(){return r.machine.transition(a,g,void 0,n||void 0)}),l.push.apply(l,vt([],Qe(r.machine.config.predictableActionArguments?a.actions:a.actions.map(function(v){return u9(v,a)})),!1)),s=s||!!a.changed};try{for(var f=Ke(t),d=f.next();!d.done;d=f.next()){var p=d.value;u(p)}}catch(h){o={error:h}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}a.changed=s,a.actions=l,r.update(a,Mt(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,r){var n=this;r===void 0&&(r=!!this.machine.config.predictableActionArguments&&this._exec);var o=Mt(t);if(o.name.indexOf(h1)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(h1)===0}))throw o.data.data;var i=Zo(this,function(){return n.machine.transition(n.state,o,void 0,r||void 0)});return i},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var r,n;try{for(var o=Ke(this.forwardTo),i=o.next();!i.done;i=o.next()){var a=i.value,s=this.children.get(a);if(!s)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));s.send(t)}}catch(l){r={error:l}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},e.prototype.defer=function(t){var r=this,n=this.clock.setTimeout(function(){"to"in t&&t.to?r.sendTo(t._event,t.to,!0):r.send(t._event)},t.delay);t.id&&(this.delayedEventsMap[t.id]=n)},e.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},e.prototype.exec=function(t,r,n){n===void 0&&(n=this.machine.options.actions),this._exec(t,r.context,r._event,n)},e.prototype.removeChild=function(t){var r;this.children.delete(t),this.forwardTo.delete(t),(r=this.state)===null||r===void 0||delete r.children[t]},e.prototype.stopChild=function(t){var r=this.children.get(t);r&&(this.removeChild(t),rt(r.stop)&&r.stop())},e.prototype.spawn=function(t,r,n){if(this.status!==xt.Running)return O1(t,r);if(_1(t))return this.spawnPromise(Promise.resolve(t),r);if(rt(t))return this.spawnCallback(t,r);if(o9(t))return this.spawnActor(t,r);if(RF(t))return this.spawnObservable(t,r);if(oo(t))return this.spawnMachine(t,ye(ye({},n),{id:r}));if(FF(t))return this.spawnBehavior(t,r);throw new Error('Unable to spawn entity "'.concat(r,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,r){var n=this;r===void 0&&(r={});var o=new e(t,ye(ye({},this.options),{parent:this,id:r.id||t.id})),i=ye(ye({},v9),r);i.sync&&o.onTransition(function(s){n.send(g1,{state:s,id:o.id})});var a=o;return this.children.set(o.id,a),i.autoForward&&this.forwardTo.add(o.id),o.onDone(function(s){n.removeChild(o.id),n.send(Mt(s,{origin:o.id}))}).start(),a},e.prototype.spawnBehavior=function(t,r){var n=g9(t,{id:r,parent:this});return this.children.set(r,n),n},e.prototype.spawnPromise=function(t,r){var n,o=this,i=!1,a;t.then(function(l){i||(a=l,o.removeChild(r),o.send(Mt(gl(r,l),{origin:r})))},function(l){if(!i){o.removeChild(r);var u=sa(r,l);try{o.send(Mt(u,{origin:r}))}catch(f){VF(l,f,r),o.devTools&&o.devTools.send(u,o.state),o.machine.strict&&o.stop()}}});var s=(n={id:r,send:function(){},subscribe:function(l,u,f){var d=dl(l,u,f),p=!1;return t.then(function(h){p||(d.next(h),!p&&d.complete())},function(h){p||d.error(h)}),{unsubscribe:function(){return p=!0}}},stop:function(){i=!0},toJSON:function(){return{id:r}},getSnapshot:function(){return a}},n[In]=function(){return this},n);return this.children.set(r,s),s},e.prototype.spawnCallback=function(t,r){var n,o=this,i=!1,a=new Set,s=new Set,l,u=function(p){l=p,s.forEach(function(h){return h(p)}),!i&&o.send(Mt(p,{origin:r}))},f;try{f=t(u,function(p){a.add(p)})}catch(p){this.send(sa(r,p))}if(_1(f))return this.spawnPromise(f,r);var d=(n={id:r,send:function(p){return a.forEach(function(h){return h(p)})},subscribe:function(p){var h=dl(p);return s.add(h.next),{unsubscribe:function(){s.delete(h.next)}}},stop:function(){i=!0,rt(f)&&f()},toJSON:function(){return{id:r}},getSnapshot:function(){return l}},n[In]=function(){return this},n);return this.children.set(r,d),d},e.prototype.spawnObservable=function(t,r){var n,o=this,i,a=t.subscribe(function(l){i=l,o.send(Mt(l,{origin:r}))},function(l){o.removeChild(r),o.send(Mt(sa(r,l),{origin:r}))},function(){o.removeChild(r),o.send(Mt(gl(r),{origin:r}))}),s=(n={id:r,send:function(){},subscribe:function(l,u,f){return t.subscribe(l,u,f)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return i},toJSON:function(){return{id:r}}},n[In]=function(){return this},n);return this.children.set(r,s),s},e.prototype.spawnActor=function(t,r){return this.children.set(r,t),t},e.prototype.spawnActivity=function(t){var r=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(!r){$t||Lt(!1,"No implementation found for activity '".concat(t.type,"'"));return}var n=r(this.state.context,t);this.spawnEffect(t.id,n)},e.prototype.spawnEffect=function(t,r){var n;this.children.set(t,(n={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:r||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},n[In]=function(){return this},n))},e.prototype.attachDev=function(){var t=cd();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var r=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(ye(ye({name:this.id,autoPause:!0,stateSanitizer:function(n){return{value:n.value,context:n.context,actions:n.actions}}},r),{features:ye({jump:!1,skip:!1},r?r.features:void 0)}),this.machine),this.devTools.init(this.state)}h9(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[In]=function(){return this},e.prototype.getSnapshot=function(){return this.status===xt.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(t,r){return setTimeout(t,r)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=L1,e}();function L1(e,t){var r=new m9(e,t);return r}function b9(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function yl(e){return ye(ye({type:ed},e),{toJSON:function(){e.onDone,e.onError;var t=Jf(e,["onDone","onError"]);return ye(ye({},t),{type:ed,src:b9(e.src)})}})}var Qo="",ud="#",da="*",ei={},ti=function(e){return e[0]===ud},y9=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},w9=function(e,t,r){var n=r.slice(0,-1).some(function(i){return!("cond"in i)&&!("in"in i)&&(et(i.target)||oo(i.target))}),o=t===Qo?"the transient event":"event '".concat(t,"'");Lt(!n,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")},_9=function(){function e(t,r,n,o){n===void 0&&(n="context"in t?t.context:void 0);var i=this,a;this.config=t,this._context=n,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(y9(),r),this.parent=o==null?void 0:o.parent,this.key=this.config.key||(o==null?void 0:o.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:v1),this.id=this.config.id||vt([this.machine.key],Qe(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{},this.description=this.config.description,$t||Lt(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?ia(this.config.states,function(u,f){var d,p=new e(u,{},void 0,{parent:i,key:f});return Object.assign(i.idMap,ye((d={},d[p.id]=p,d),p.idMap)),p}):ei;var s=0;function l(u){var f,d;u.order=s++;try{for(var p=Ke(T1(u)),h=p.next();!h.done;h=p.next()){var g=h.value;l(g)}}catch(v){f={error:v}}finally{try{h&&!h.done&&(d=p.return)&&d.call(p)}finally{if(f)throw f.error}}}l(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(u){var f=u.event;return f===Qo}):Qo in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=xr(this.config.entry||this.config.onEntry).map(function(u){return aa(u)}),this.onExit=xr(this.config.exit||this.config.onExit).map(function(u){return aa(u)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=xr(this.config.invoke).map(function(u,f){var d,p;if(oo(u)){var h=pl(i.id,f);return i.machine.options.services=ye((d={},d[h]=u,d),i.machine.options.services),yl({src:h,id:h})}else if(et(u.src)){var h=u.id||pl(i.id,f);return yl(ye(ye({},u),{id:h,src:u.src}))}else if(oo(u.src)||rt(u.src)){var h=u.id||pl(i.id,f);return i.machine.options.services=ye((p={},p[h]=u.src,p),i.machine.options.services),yl(ye(ye({id:h},u),{src:h}))}else{var g=u.src;return yl(ye(ye({id:pl(i.id,f)},u),{src:g}))}}),this.activities=xr(this.config.activities).concat(this.invoke).map(function(u){return ad(u)}),this.transition=this.transition.bind(this),this.tags=xr(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||I1(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,r){var n=this.options,o=n.actions,i=n.activities,a=n.guards,s=n.services,l=n.delays;return new e(this.config,{actions:ye(ye({},o),t.actions),activities:ye(ye({},i),t.activities),guards:ye(ye({},a),t.guards),services:ye(ye({},s),t.services),delays:ye(ye({},l),t.delays)},r??this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return rt(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:ia(this.states,function(t){return t.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce(function(r,n){return r[n.eventType]=r[n.eventType]||[],r[n.eventType].push(n),r},{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var r=t===Qo,n=this.transitions.filter(function(o){var i=o.eventType===t;return r?i:i||o.eventType===da});return this.__cache.candidates[t]=n,n},e.prototype.getDelayedTransitions=function(){var t=this,r=this.config.after;if(!r)return[];var n=function(i,a){var s=rt(i)?"".concat(t.id,":delay[").concat(a,"]"):i,l=e9(s,t.id);return t.onEntry.push(GF(l,{delay:i})),t.onExit.push(YF(l)),l},o=Yo(r)?r.map(function(i,a){var s=n(i.delay,a);return ye(ye({},i),{event:s})}):_t(Object.keys(r).map(function(i,a){var s=r[i],l=et(s)?{target:s}:s,u=isNaN(+i)?i:+i,f=n(u,a);return xr(l).map(function(d){return ye(ye({},d),{event:f,delay:u})})}));return o.map(function(i){var a=i.delay;return ye(ye({},t.formatTransition(i)),{delay:a})})},e.prototype.getStateNodes=function(t){var r,n=this;if(!t)return[];var o=t instanceof fr?t.value:oa(t,this.delimiter);if(et(o)){var i=this.getStateNode(o).initial;return i!==void 0?this.getStateNodes((r={},r[o]=i,r)):[this,this.states[o]]}var a=Object.keys(o),s=[this];return s.push.apply(s,vt([],Qe(_t(a.map(function(l){return n.getStateNode(l).getStateNodes(o[l])}))),!1)),s},e.prototype.handles=function(t){var r=b1(t);return this.events.includes(r)},e.prototype.resolveState=function(t){var r=t instanceof fr?t:fr.create(t),n=Array.from(ca([],this.getStateNodes(r.value)));return new fr(ye(ye({},r),{value:this.resolve(r.value),configuration:n,done:bl(n,this),tags:k1(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,r,n){var o=this.getStateNode(t),i=o.next(r,n);return!i||!i.transitions.length?this.next(r,n):i},e.prototype.transitionCompoundNode=function(t,r,n){var o=Object.keys(t),i=this.getStateNode(o[0]),a=i._transition(t[o[0]],r,n);return!a||!a.transitions.length?this.next(r,n):a},e.prototype.transitionParallelNode=function(t,r,n){var o,i,a={};try{for(var s=Ke(Object.keys(t)),l=s.next();!l.done;l=s.next()){var u=l.value,f=t[u];if(f){var d=this.getStateNode(u),p=d._transition(f,r,n);p&&(a[u]=p)}}}catch(m){o={error:m}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}var h=Object.keys(a).map(function(m){return a[m]}),g=_t(h.map(function(m){return m.transitions})),v=h.some(function(m){return m.transitions.length>0});if(!v)return this.next(r,n);var b=_t(Object.keys(a).map(function(m){return a[m].configuration}));return{transitions:g,exitSet:_t(h.map(function(m){return m.exitSet})),configuration:b,source:r,actions:_t(Object.keys(a).map(function(m){return a[m].actions}))}},e.prototype._transition=function(t,r,n){return et(t)?this.transitionLeafNode(t,r,n):Object.keys(t).length===1?this.transitionCompoundNode(t,r,n):this.transitionParallelNode(t,r,n)},e.prototype.getTransitionData=function(t,r){return this._transition(t.value,t,Mt(r))},e.prototype.next=function(t,r){var n,o,i=this,a=r.name,s=[],l=[],u;try{for(var f=Ke(this.getCandidates(a)),d=f.next();!d.done;d=f.next()){var p=d.value,h=p.cond,g=p.in,v=t.context,b=g?et(g)&&ti(g)?t.matches(oa(this.getStateNodeById(g).path,this.delimiter)):rd(oa(g,this.delimiter),DF(this.path.slice(0,-2))(t.value)):!0,m=!1;try{m=!h||$1(this.machine,h,v,r,t)}catch(x){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
|
|
206
|
+
`).concat(x.message))}if(m&&b){p.target!==void 0&&(l=p.target),s.push.apply(s,vt([],Qe(p.actions),!1)),u=p;break}}}catch(x){n={error:x}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}if(u){if(!l.length)return{transitions:[u],exitSet:[],configuration:t.value?[this]:[],source:t,actions:s};var w=_t(l.map(function(x){return i.getRelativeStateNodes(x,t.historyValue)})),E=!!u.internal;return{transitions:[u],exitSet:E?[]:_t(l.map(function(x){return i.getPotentiallyReenteringNodes(x)})),configuration:w,source:t,actions:s}}},e.prototype.getPotentiallyReenteringNodes=function(t){if(this.order<t.order)return[this];for(var r=[],n=this,o=t;n&&n!==o;)r.push(n),n=n.parent;return n!==o?[]:(r.push(o),r)},e.prototype.getActions=function(t,r,n,o,i,a,s){var l,u,f,d,p=this,h=a?ca([],this.getStateNodes(a.value)):[],g=new Set;try{for(var v=Ke(Array.from(t).sort(function(D,N){return D.order-N.order})),b=v.next();!b.done;b=v.next()){var m=b.value;(!ua(h,m)||ua(n.exitSet,m)||m.parent&&g.has(m.parent))&&g.add(m)}}catch(D){l={error:D}}finally{try{b&&!b.done&&(u=v.return)&&u.call(v)}finally{if(l)throw l.error}}try{for(var w=Ke(h),E=w.next();!E.done;E=w.next()){var m=E.value;(!ua(t,m)||ua(n.exitSet,m.parent))&&n.exitSet.push(m)}}catch(D){f={error:D}}finally{try{E&&!E.done&&(d=w.return)&&d.call(w)}finally{if(f)throw f.error}}n.exitSet.sort(function(D,N){return N.order-D.order});var x=Array.from(g).sort(function(D,N){return D.order-N.order}),k=new Set(n.exitSet),I=_t(x.map(function(D){var N=[];if(D.type!=="final")return N;var J=D.parent;if(!J.parent)return N;N.push(hl(D.id,D.doneData),hl(J.id,D.doneData?ul(D.doneData,o,i):void 0));var G=J.parent;return G.type==="parallel"&&la(G).every(function(Y){return bl(n.configuration,Y)})&&N.push(hl(G.id)),N})),S=x.map(function(D){var N=D.onEntry,J=D.activities.map(function(G){return JF(G)});return{type:"entry",actions:Pn(s?vt(vt([],Qe(N),!1),Qe(J),!1):vt(vt([],Qe(J),!1),Qe(N),!1),p.machine.options.actions)}}).concat({type:"state_done",actions:I.map(function(D){return HF(D)})}),C=Array.from(k).map(function(D){return{type:"exit",actions:Pn(vt(vt([],Qe(D.onExit),!1),Qe(D.activities.map(function(N){return XF(N)})),!1),p.machine.options.actions)}}),P=C.concat({type:"transition",actions:Pn(n.actions,this.machine.options.actions)}).concat(S);if(r){var F=Pn(_t(vt([],Qe(t),!1).sort(function(D,N){return N.order-D.order}).map(function(D){return D.onExit})),this.machine.options.actions).filter(function(D){return!od(D)});return P.concat({type:"stop",actions:F})}return P},e.prototype.transition=function(t,r,n,o){t===void 0&&(t=this.initialState);var i=Mt(r),a;if(t instanceof fr)a=n===void 0?t:this.resolveState(fr.from(t,n));else{var s=et(t)?this.resolve(ll(this.getResolvedPath(t))):this.resolve(t),l=n??this.machine.context;a=this.resolveState(fr.from(s,l))}if(!$t&&i.name===da)throw new Error("An event cannot have the wildcard type ('".concat(da,"')"));if(this.strict&&!this.events.includes(i.name)&&!MF(i.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(i.name,"'"));var u=this._transition(a.value,a,i)||{transitions:[],configuration:[],exitSet:[],source:a,actions:[]},f=ca([],this.getStateNodes(a.value)),d=u.configuration.length?ca(f,u.configuration):f;return u.configuration=vt([],Qe(d),!1),this.resolveTransition(u,a,a.context,o,i)},e.prototype.resolveRaisedTransition=function(t,r,n,o){var i,a=t.actions;return t=this.transition(t,r,void 0,o),t._event=n,t.event=n.data,(i=t.actions).unshift.apply(i,vt([],Qe(a),!1)),t},e.prototype.resolveTransition=function(t,r,n,o,i){var a,s,l,u,f=this;i===void 0&&(i=Xo);var d=t.configuration,p=!r||t.transitions.length>0,h=p?t.configuration:r?r.configuration:[],g=bl(h,this),v=p?a9(this.machine,d):void 0,b=r?r.historyValue?r.historyValue:t.source?this.machine.historyValue(r.value):void 0:void 0,m=this.getActions(new Set(h),g,t,n,i,r,o),w=r?ye({},r.activities):{};try{for(var E=Ke(m),x=E.next();!x.done;x=E.next()){var k=x.value;try{for(var I=(l=void 0,Ke(k.actions)),S=I.next();!S.done;S=I.next()){var C=S.value;C.type===Xf?w[C.activity.id||C.activity.type]=C:C.type===Zf&&(w[C.activity.id||C.activity.type]=!1)}}catch(re){l={error:re}}finally{try{S&&!S.done&&(u=I.return)&&u.call(I)}finally{if(l)throw l.error}}}}catch(re){a={error:re}}finally{try{x&&!x.done&&(s=E.return)&&s.call(E)}finally{if(a)throw a.error}}var P=Qe(vl(this,r,n,i,m,o,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),F=P[0],D=P[1],N=Qe(jF(F,od),2),J=N[0],G=N[1],Y=F.filter(function(re){var de;return re.type===Xf&&((de=re.activity)===null||de===void 0?void 0:de.type)===ed}),te=Y.reduce(function(re,de){return re[de.activity.id]=r9(de.activity,f.machine,D,i),re},r?ye({},r.children):{}),oe=new fr({value:v||r.value,context:D,_event:i,_sessionid:r?r._sessionid:null,historyValue:v?b?BF(b,v):void 0:r?r.historyValue:void 0,history:!v||t.source?r:void 0,actions:v?G:[],activities:v?w:r?r.activities:{},events:[],configuration:h,transitions:t.transitions,children:te,done:g,tags:k1(h),machine:this}),le=n!==D;oe.changed=i.name===g1||le;var ae=oe.history;ae&&delete ae.history;var ge=!g&&(this._transient||d.some(function(re){return re._transient}));if(!p&&(!ge||i.name===Qo))return oe;var ce=oe;if(!g)for(ge&&(ce=this.resolveRaisedTransition(ce,{type:AF},i,o));J.length;){var K=J.shift();ce=this.resolveRaisedTransition(ce,K._event,i,o)}var q=ce.changed||(ae?!!ce.actions.length||le||typeof ae.value!=typeof ce.value||!N1(ce.value,ae.value):void 0);return ce.changed=q,ce.history=ae,ce},e.prototype.getStateNode=function(t){if(ti(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."));var r=this.states[t];if(!r)throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"));return r},e.prototype.getStateNodeById=function(t){var r=ti(t)?t.slice(ud.length):t;if(r===this.id)return this;var n=this.machine.idMap[r];if(!n)throw new Error("Child state node '#".concat(r,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(t){if(typeof t=="string"&&ti(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var r=nd(t,this.delimiter).slice(),n=this;r.length;){var o=r.shift();if(!o.length)break;n=n.getStateNode(o)}return n},e.prototype.resolve=function(t){var r,n=this;if(!t)return this.initialStateValue||ei;switch(this.type){case"parallel":return ia(this.initialStateValue,function(i,a){return i?n.getStateNode(a).resolve(t[a]||i):ei});case"compound":if(et(t)){var o=this.getStateNode(t);return o.type==="parallel"||o.type==="compound"?(r={},r[t]=o.initialStateValue,r):t}return Object.keys(t).length?ia(t,function(i,a){return i?n.getStateNode(a).resolve(i):ei}):this.initialStateValue||{};default:return t||ei}},e.prototype.getResolvedPath=function(t){if(ti(t)){var r=this.machine.idMap[t.slice(ud.length)];if(!r)throw new Error("Unable to find state node '".concat(t,"'"));return r.path}return nd(t,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var r;if(this.type==="parallel")r=y1(this.states,function(n){return n.initialStateValue||ei},function(n){return n.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));r=ml(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else r={};return this.__cache.initialStateValue=r,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(t,r){this._init();var n=this.getStateNodes(t);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,r??this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var t;if(this.type==="history"){var r=this.config;et(r.target)?t=ti(r.target)?ll(this.machine.getStateNodeById(r.target).path.slice(this.path.length-1)):r.target:t=r.target}return t},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(t,r,n){return n===void 0&&(n=!0),n?t.type==="history"?t.resolveHistory(r):t.initialStateNodes:[t]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var t=this;if(ml(this))return[this];if(this.type==="compound"&&!this.initial)return $t||Lt(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var r=cl(this.initialStateValue);return _t(r.map(function(n){return t.getFromRelativePath(n)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var r=Qe(t),n=r[0],o=r.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var i=this.getStateNode(n);if(i.type==="history")return i.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(o)},e.prototype.historyValue=function(t){if(Object.keys(this.states).length)return{current:t||this.initialStateValue,states:y1(this.states,function(r,n){if(!t)return r.historyValue();var o=et(t)?void 0:t[n];return r.historyValue(o||r.initialStateValue)},function(r){return!r.history})}},e.prototype.resolveHistory=function(t){var r=this;if(this.type!=="history")return[this];var n=this.parent;if(!t){var o=this.target;return o?_t(cl(o).map(function(a){return n.getFromRelativePath(a)})):n.initialStateNodes}var i=LF(n.path,"states")(t).current;return et(i)?[n.getStateNode(i)]:_t(cl(i).map(function(a){return r.history==="deep"?n.getFromRelativePath(a):[n.states[a[0]]]}))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var t=this,r=_t(Object.keys(this.states).map(function(n){return t.states[n].stateIds}));return[this.id].concat(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var t,r,n,o;if(this.__cache.events)return this.__cache.events;var i=this.states,a=new Set(this.ownEvents);if(i)try{for(var s=Ke(Object.keys(i)),l=s.next();!l.done;l=s.next()){var u=l.value,f=i[u];if(f.states)try{for(var d=(n=void 0,Ke(f.events)),p=d.next();!p.done;p=d.next()){var h=p.value;a.add("".concat(h))}}catch(g){n={error:g}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}}}catch(g){t={error:g}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter(function(r){return!(!r.target&&!r.actions.length&&r.internal)}).map(function(r){return r.eventType}));return Array.from(t)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(t){var r=this;if(t!==void 0)return t.map(function(n){if(!et(n))return n;var o=n[0]===r.delimiter;if(o&&!r.parent)return r.getStateNodeByPath(n.slice(1));var i=o?r.key+n:n;if(r.parent)try{var a=r.parent.getStateNodeByPath(i);return a}catch(s){throw new Error("Invalid transition definition for state node '".concat(r.id,`':
|
|
207
|
+
`).concat(s.message))}else return r.getStateNodeByPath(i)})},e.prototype.formatTransition=function(t){var r=this,n=WF(t.target),o="internal"in t?t.internal:n?n.some(function(l){return et(l)&&l[0]===r.delimiter}):!0,i=this.machine.options.guards,a=this.resolveTarget(n),s=ye(ye({},t),{actions:Pn(xr(t.actions)),cond:S1(t.cond,i),target:a,source:this,internal:o,eventType:t.event,toJSON:function(){return ye(ye({},s),{target:s.target?s.target.map(function(l){return"#".concat(l.id)}):void 0,source:"#".concat(r.id)})}});return s},e.prototype.formatTransitions=function(){var t,r,n=this,o;if(!this.config.on)o=[];else if(Array.isArray(this.config.on))o=this.config.on;else{var i=this.config.on,a=da,s=i[a],l=s===void 0?[]:s,u=Jf(i,[typeof a=="symbol"?a:a+""]);o=_t(Object.keys(u).map(function(w){!$t&&w===Qo&&Lt(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(n.id,'".'));var E=Jo(w,u[w]);return $t||w9(n,w,E),E}).concat(Jo(da,l)))}var f=this.config.always?Jo("",this.config.always):[],d=this.config.onDone?Jo(String(hl(this.id)),this.config.onDone):[];$t||Lt(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var p=_t(this.invoke.map(function(w){var E=[];return w.onDone&&E.push.apply(E,vt([],Qe(Jo(String(gl(w.id)),w.onDone)),!1)),w.onError&&E.push.apply(E,vt([],Qe(Jo(String(sa(w.id)),w.onError)),!1)),E})),h=this.after,g=_t(vt(vt(vt(vt([],Qe(d),!1),Qe(p),!1),Qe(o),!1),Qe(f),!1).map(function(w){return xr(w).map(function(E){return n.formatTransition(E)})}));try{for(var v=Ke(h),b=v.next();!b.done;b=v.next()){var m=b.value;g.push(m)}}catch(w){t={error:w}}finally{try{b&&!b.done&&(r=v.return)&&r.call(v)}finally{if(t)throw t.error}}return g},e}(),M1=!1;function fd(e,t){return!$t&&!("predictableActionArguments"in e)&&!M1&&(M1=!0,console.warn("It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html")),new _9(e,t)}var Kt=QF,E9=c.useLayoutEffect;function F1(e){var t=ve.useRef();return t.current||(t.current={v:e()}),t.current.v}var wl=function(){return wl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},wl.apply(this,arguments)},x9=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r},S9=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i};function $9(e,t){var r=F1(function(){return typeof e=="function"?e():e});if(process.env.NODE_ENV!=="production"&&typeof e!="function"){var n=S9(c.useState(r),1),o=n[0];e!==o&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var i=t.context,a=t.guards,s=t.actions,l=t.activities,u=t.services,f=t.delays;t.state;var d=x9(t,["context","guards","actions","activities","services","delays","state"]),p=F1(function(){var h={context:i,guards:a,actions:s,activities:l,services:u,delays:f},g=r.withConfig(h,function(){return wl(wl({},r.context),i)});return L1(g,d)});return E9(function(){Object.assign(p.machine.options.actions,s),Object.assign(p.machine.options.guards,a),Object.assign(p.machine.options.activities,l),Object.assign(p.machine.options.services,u),Object.assign(p.machine.options.delays,f)},[s,a,l,u,f]),p}function C9(e,t,r){if(e.status===xt.NotStarted)return!0;var n=r.changed===void 0&&(Object.keys(r.children).length>0||typeof t.changed=="boolean");return!(r.changed||n)}var A9=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i};function O9(e){return e}function dd(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=A9(t,1),o=n[0],i=o===void 0?{}:o,a=$9(e,i),s=c.useCallback(function(){return a.status===xt.NotStarted?i.state?fr.create(i.state):a.machine.initialState:a.getSnapshot()},[a]),l=c.useCallback(function(d,p){return C9(a,d,p)},[a]),u=c.useCallback(function(d){var p=a.subscribe(d).unsubscribe;return p},[a]),f=CF.useSyncExternalStoreWithSelector(u,s,s,O9,l);return c.useEffect(function(){var d=i.state;return a.start(d?fr.create(d):void 0),function(){a.stop(),a.status=xt.NotStarted}},[]),[f,a.send,a]}const T9=fd({id:"identity",predictableActionArguments:!0,context:{identity:null,identitySubscribable:null},initial:"choosingAction",invoke:{src:e=>e.identitySubscribable},states:{choosingAction:{},managingDeviceInvitation:{},managingAgent:{initial:"idle",states:{idle:{},pending:{}}},managingDevices:{},managingProfile:{initial:"idle",states:{idle:{},pending:{}},on:{setIdentity:{target:"choosingAction",actions:["setIdentity","log"]},updateProfile:{target:".pending",actions:"log"}}},signingOut:{}},on:{unchooseAction:{target:".choosingAction",actions:["unsetInvitation","log"]},deselectInvitation:{target:".choosingAction",actions:["unsetInvitation","log"]},selectInvitation:{target:".managingDeviceInvitation",actions:["setInvitation","log"]},chooseDevices:{target:".managingDevices",actions:"log"},chooseProfile:{target:".managingProfile",actions:"log"},chooseSignOut:{target:".signingOut",actions:"log"},chooseAgent:{target:".managingAgent",actions:"log"}}},{actions:{setIdentity:Kt({identity:(e,t)=>(t==null?void 0:t.identity)??null}),setInvitation:Kt({invitation:(e,t)=>(t==null?void 0:t.invitation)??null}),unsetInvitation:Kt({invitation:()=>{}}),log:(e,t)=>{Xe("[transition]",{event:t,context:e})}}}),I9=(e,t)=>dd(T9,{...t,context:{...t==null?void 0:t.context,identity:e.halo.identity.get(),identitySubscribable:e.halo.identity.map(r=>({type:"setIdentity",identity:r}))}}),P9=e=>{const{active:t,onAgentCreate:r,onAgentDestroy:n,send:o,validationMessage:i,agentStatus:a,agentActive:s,agentProviderDisabled:l}=e,u=!t,{t:f}=tt("os");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Qi,{validationMessage:i,label:c.createElement(Er,null,"Agent Status"),disabled:u,"data-testid":"agent-status",value:a})),c.createElement(Gt,null,c.createElement(it,{disabled:s||l,onClick:()=>r==null?void 0:r(),"data-testid":"create-agent"},"Create Agent"),c.createElement(it,{disabled:!s||l,onClick:()=>n==null?void 0:n(),"data-testid":"destroy-agent"},"Destroy Agent"),c.createElement(it,{disabled:u,onClick:()=>o==null?void 0:o({type:"unchooseAction"}),"data-testid":"update-profile-form-back"},f("back label"))))},k9=({devices:e,active:t,send:r})=>{const{t:n}=tt("os"),o=!t;return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow"},c.createElement(E4,{devices:e})),c.createElement(Gt,null,c.createElement(it,{variant:"ghost",disabled:o,onClick:()=>r==null?void 0:r({type:"unchooseAction"}),"data-testid":"manage-devices-back"},n("back label"))))},N9=e=>{const{send:t}=e,r=We.useClient(),n=gi.useHaloInvitations(),o=c.useCallback(a=>{const s=cn.InvitationEncoder.encode(a);a.state===we.State.CONNECTING&&console.log(JSON.stringify({invitationCode:s,authCode:a.authCode}))},[]),i=a=>{const s=a.altKey&&a.shiftKey;n.forEach(u=>u.cancel());const l=r.halo.share(s?{type:we.Type.MULTIUSE,authMethod:we.AuthMethod.NONE}:void 0);process.env.NODE_ENV!=="production"&&l.subscribe(o),t==null||t({type:"selectInvitation",invitation:l})};return c.createElement(D9,{...e,onCreateInvitationClick:a=>i(a)})},D9=({onCreateInvitationClick:e,active:t,send:r,onDone:n,doneActionParent:o})=>{const{t:i}=tt("os");return c.createElement("div",{role:"none",className:"grow flex flex-col gap-1"},c.createElement(Co,{density:"coarse"},c.createElement("div",{className:"grow justify-center flex flex-col gap-1"},c.createElement(it,{"data-testid":"manage-agent",onClick:()=>r==null?void 0:r({type:"chooseAgent"}),classNames:"plb-4"},c.createElement(ze.HardDrive,{className:Ve(6)}),c.createElement("span",{className:"grow mli-3"},"Manage Agent"),c.createElement(ze.CaretRight,{weight:"bold",className:Ve(4)})),c.createElement(it,{disabled:!t,"data-testid":"devices-panel.create-invitation",onClick:e,classNames:"plb-4"},c.createElement(ze.Plus,{className:Ve(6)}),c.createElement("span",{className:"grow mli-3"},i("choose add device label")),c.createElement(ze.CaretRight,{weight:"bold",className:Ve(4)})),c.createElement(it,{"data-testid":"manage-devices",onClick:()=>r==null?void 0:r({type:"chooseDevices"}),classNames:"plb-4"},c.createElement(ze.Devices,{className:Ve(6)}),c.createElement("span",{className:"grow mli-3"},i("choose devices label")),c.createElement(ze.CaretRight,{weight:"bold",className:Ve(4)})),c.createElement(it,{"data-testid":"manage-profile",onClick:()=>r==null?void 0:r({type:"chooseProfile"}),classNames:"plb-4"},c.createElement(ze.UserGear,{className:Ve(6)}),c.createElement("span",{className:"grow mli-3"},i("choose profile label")),c.createElement(ze.CaretRight,{weight:"bold",className:Ve(4)})),c.createElement(it,{"data-testid":"devices-panel.sign-out",onClick:()=>r==null?void 0:r({type:"chooseSignOut"}),classNames:"plb-4"},c.createElement(ze.Power,{className:Ve(6)}),c.createElement("span",{className:"grow mli-3"},i("choose sign out label")),c.createElement(ze.CaretRight,{weight:"bold",className:Ve(4)})))))},L9=e=>{const{onUpdateProfile:t}=e,{t:r}=tt("os"),[n,o]=c.useState(""),i=async a=>{await(t==null?void 0:t(a).catch(s=>{Xe.catch(s),o(r("failed to update profile message"))}))};return c.createElement(M9,{...e,onUpdateProfile:i,validationMessage:n})},M9=e=>{const{active:t,profile:r,send:n,onUpdateProfile:o,validationMessage:i}=e,a=!t,{t:s}=tt("os"),[l,u]=c.useState((r==null?void 0:r.displayName)??"");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Qi,{validationMessage:i,label:c.createElement(Er,null,s("display name input label")),disabled:a,"data-testid":"display-name-input",placeholder:s("display name input placeholder"),value:l,onChange:({target:{value:f}})=>u(f),onKeyDown:({key:f})=>f==="Enter"&&(o==null?void 0:o({displayName:l}))})),c.createElement(Gt,null,c.createElement(it,{variant:"ghost",disabled:a,onClick:()=>n==null?void 0:n({type:"unchooseAction"}),"data-testid":"update-profile-form-back"},s("back label")),c.createElement(it,{variant:"primary",disabled:a,onClick:()=>o==null?void 0:o({displayName:l}),"data-testid":"update-profile-form-continue"},s("done label"))))},F9=e=>{const{t}=tt("os"),r=()=>{var n;window.confirm(t("reset device confirm message"))&&((n=e.onResetDevice)==null||n.call(e))};return c.createElement(j9,{disabled:!e.active,onBack:()=>{var n;return(n=e.send)==null?void 0:n.call(e,{type:"unchooseAction"})},onResetDevice:r,onJoinNewIdentity:e.onJoinNewIdentity})},j9=({disabled:e,onResetDevice:t,onJoinNewIdentity:r,onBack:n})=>{const{t:o}=tt("os");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Xc.Root,{valence:"error"},c.createElement(Xc.Title,null,c.createElement(ze.Warning,{className:ue(Ve(6),"inline mie-2")}),o("sign out chooser title")),c.createElement(Xc.Body,null,o("sign out chooser message")))),c.createElement(Gt,null,c.createElement(it,{disabled:e,onClick:n},o("back label")),c.createElement(it,{variant:"primary","data-testid":"sign-out.join-new-identity",classNames:"!bg-error-500 hover:!bg-error-550",disabled:e,onClick:r},o("join new identity label")),c.createElement(it,{variant:"primary","data-testid":"sign-out.reset-device",classNames:"!bg-error-500 hover:!bg-error-550",disabled:e,onClick:t},o("reset device label"))))},B9=({client:e,invitations:t,identity:r})=>{const[n,o]=c.useState(""),[i,a]=c.useState(""),[s,l]=c.useState(!1),u=We.useAgentHostingProviderClient(e.config);c.useEffect(()=>{(async()=>{if(u){const g=await(u==null?void 0:u.getAgent((r==null?void 0:r.identityKey.truncate())??"foo"));g?(l(!0),a(g)):(l(!1),o("No agent deployed via provider."))}else o("No agent provider configured.")})()},[]);const f=c.useCallback(async h=>{const g=cn.InvitationEncoder.encode(h);if(h.state===we.State.CONNECTING&&(console.log(JSON.stringify({invitationCode:g,authCode:h.authCode})),zi(r,"Identity not found"),u))try{const v=await(u==null?void 0:u.createAgent(g,r.identityKey.truncate()));a(v),l(!0),o("")}catch(v){o(`error creating agent: ${v.message}`)}},[]);return{onAgentCreate:async()=>{t.forEach(g=>g.cancel()),e.halo.share({type:we.Type.MULTIUSE,authMethod:we.AuthMethod.NONE}).subscribe(f)},onAgentDestroy:async()=>{const h=e.halo.identity.get();zi(h,"Identity not found");try{await(u==null?void 0:u.destroyAgent(h.identityKey.truncate())),o("No agent deployed via provider."),a(""),l(!1)}catch(g){o(`error destroying agent: ${g.message}`)}},validationMessage:n,agentStatus:i,agentActive:s}};var j1={exports:{}};(function(e,t){var r=function(){var n=function(k,I){var S=236,C=17,P=k,F=i[I],D=null,N=0,J=null,G=[],Y={},te=function(M,R){N=P*4+17,D=function(z){for(var O=new Array(z),T=0;T<z;T+=1){O[T]=new Array(z);for(var Z=0;Z<z;Z+=1)O[T][Z]=null}return O}(N),oe(0,0),oe(N-7,0),oe(0,N-7),ge(),ae(),K(M,R),P>=7&&ce(M),J==null&&(J=de(P,F,G)),q(J,R)},oe=function(M,R){for(var z=-1;z<=7;z+=1)if(!(M+z<=-1||N<=M+z))for(var O=-1;O<=7;O+=1)R+O<=-1||N<=R+O||(0<=z&&z<=6&&(O==0||O==6)||0<=O&&O<=6&&(z==0||z==6)||2<=z&&z<=4&&2<=O&&O<=4?D[M+z][R+O]=!0:D[M+z][R+O]=!1)},le=function(){for(var M=0,R=0,z=0;z<8;z+=1){te(!0,z);var O=s.getLostPoint(Y);(z==0||M>O)&&(M=O,R=z)}return R},ae=function(){for(var M=8;M<N-8;M+=1)D[M][6]==null&&(D[M][6]=M%2==0);for(var R=8;R<N-8;R+=1)D[6][R]==null&&(D[6][R]=R%2==0)},ge=function(){for(var M=s.getPatternPosition(P),R=0;R<M.length;R+=1)for(var z=0;z<M.length;z+=1){var O=M[R],T=M[z];if(D[O][T]==null)for(var Z=-2;Z<=2;Z+=1)for(var ne=-2;ne<=2;ne+=1)Z==-2||Z==2||ne==-2||ne==2||Z==0&&ne==0?D[O+Z][T+ne]=!0:D[O+Z][T+ne]=!1}},ce=function(M){for(var R=s.getBCHTypeNumber(P),z=0;z<18;z+=1){var O=!M&&(R>>z&1)==1;D[Math.floor(z/3)][z%3+N-8-3]=O}for(var z=0;z<18;z+=1){var O=!M&&(R>>z&1)==1;D[z%3+N-8-3][Math.floor(z/3)]=O}},K=function(M,R){for(var z=F<<3|R,O=s.getBCHTypeInfo(z),T=0;T<15;T+=1){var Z=!M&&(O>>T&1)==1;T<6?D[T][8]=Z:T<8?D[T+1][8]=Z:D[N-15+T][8]=Z}for(var T=0;T<15;T+=1){var Z=!M&&(O>>T&1)==1;T<8?D[8][N-T-1]=Z:T<9?D[8][15-T-1+1]=Z:D[8][15-T-1]=Z}D[N-8][8]=!M},q=function(M,R){for(var z=-1,O=N-1,T=7,Z=0,ne=s.getMaskFunction(R),pe=N-1;pe>0;pe-=2)for(pe==6&&(pe-=1);;){for(var me=0;me<2;me+=1)if(D[O][pe-me]==null){var xe=!1;Z<M.length&&(xe=(M[Z]>>>T&1)==1);var Ee=ne(O,pe-me);Ee&&(xe=!xe),D[O][pe-me]=xe,T-=1,T==-1&&(Z+=1,T=7)}if(O+=z,O<0||N<=O){O-=z,z=-z;break}}},re=function(M,R){for(var z=0,O=0,T=0,Z=new Array(R.length),ne=new Array(R.length),pe=0;pe<R.length;pe+=1){var me=R[pe].dataCount,xe=R[pe].totalCount-me;O=Math.max(O,me),T=Math.max(T,xe),Z[pe]=new Array(me);for(var Ee=0;Ee<Z[pe].length;Ee+=1)Z[pe][Ee]=255&M.getBuffer()[Ee+z];z+=me;var ie=s.getErrorCorrectPolynomial(xe),Ne=u(Z[pe],ie.getLength()-1),dt=Ne.mod(ie);ne[pe]=new Array(ie.getLength()-1);for(var Ee=0;Ee<ne[pe].length;Ee+=1){var Te=Ee+dt.getLength()-ne[pe].length;ne[pe][Ee]=Te>=0?dt.getAt(Te):0}}for(var Fe=0,Ee=0;Ee<R.length;Ee+=1)Fe+=R[Ee].totalCount;for(var bt=new Array(Fe),$e=0,Ee=0;Ee<O;Ee+=1)for(var pe=0;pe<R.length;pe+=1)Ee<Z[pe].length&&(bt[$e]=Z[pe][Ee],$e+=1);for(var Ee=0;Ee<T;Ee+=1)for(var pe=0;pe<R.length;pe+=1)Ee<ne[pe].length&&(bt[$e]=ne[pe][Ee],$e+=1);return bt},de=function(M,R,z){for(var O=f.getRSBlocks(M,R),T=d(),Z=0;Z<z.length;Z+=1){var ne=z[Z];T.put(ne.getMode(),4),T.put(ne.getLength(),s.getLengthInBits(ne.getMode(),M)),ne.write(T)}for(var pe=0,Z=0;Z<O.length;Z+=1)pe+=O[Z].dataCount;if(T.getLengthInBits()>pe*8)throw"code length overflow. ("+T.getLengthInBits()+">"+pe*8+")";for(T.getLengthInBits()+4<=pe*8&&T.put(0,4);T.getLengthInBits()%8!=0;)T.putBit(!1);for(;!(T.getLengthInBits()>=pe*8||(T.put(S,8),T.getLengthInBits()>=pe*8));)T.put(C,8);return re(T,O)};Y.addData=function(M,R){R=R||"Byte";var z=null;switch(R){case"Numeric":z=p(M);break;case"Alphanumeric":z=h(M);break;case"Byte":z=g(M);break;case"Kanji":z=v(M);break;default:throw"mode:"+R}G.push(z),J=null},Y.isDark=function(M,R){if(M<0||N<=M||R<0||N<=R)throw M+","+R;return D[M][R]},Y.getModuleCount=function(){return N},Y.make=function(){if(P<1){for(var M=1;M<40;M++){for(var R=f.getRSBlocks(M,F),z=d(),O=0;O<G.length;O++){var T=G[O];z.put(T.getMode(),4),z.put(T.getLength(),s.getLengthInBits(T.getMode(),M)),T.write(z)}for(var Z=0,O=0;O<R.length;O++)Z+=R[O].dataCount;if(z.getLengthInBits()<=Z*8)break}P=M}te(!1,le())},Y.createTableTag=function(M,R){M=M||2,R=typeof R>"u"?M*4:R;var z="";z+='<table style="',z+=" border-width: 0px; border-style: none;",z+=" border-collapse: collapse;",z+=" padding: 0px; margin: "+R+"px;",z+='">',z+="<tbody>";for(var O=0;O<Y.getModuleCount();O+=1){z+="<tr>";for(var T=0;T<Y.getModuleCount();T+=1)z+='<td style="',z+=" border-width: 0px; border-style: none;",z+=" border-collapse: collapse;",z+=" padding: 0px; margin: 0px;",z+=" width: "+M+"px;",z+=" height: "+M+"px;",z+=" background-color: ",z+=Y.isDark(O,T)?"#000000":"#ffffff",z+=";",z+='"/>';z+="</tr>"}return z+="</tbody>",z+="</table>",z},Y.createSvgTag=function(M,R,z,O){var T={};typeof arguments[0]=="object"&&(T=arguments[0],M=T.cellSize,R=T.margin,z=T.alt,O=T.title),M=M||2,R=typeof R>"u"?M*4:R,z=typeof z=="string"?{text:z}:z||{},z.text=z.text||null,z.id=z.text?z.id||"qrcode-description":null,O=typeof O=="string"?{text:O}:O||{},O.text=O.text||null,O.id=O.text?O.id||"qrcode-title":null;var Z=Y.getModuleCount()*M+R*2,ne,pe,me,xe,Ee="",ie;for(ie="l"+M+",0 0,"+M+" -"+M+",0 0,-"+M+"z ",Ee+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',Ee+=T.scalable?"":' width="'+Z+'px" height="'+Z+'px"',Ee+=' viewBox="0 0 '+Z+" "+Z+'" ',Ee+=' preserveAspectRatio="xMinYMin meet"',Ee+=O.text||z.text?' role="img" aria-labelledby="'+U([O.id,z.id].join(" ").trim())+'"':"",Ee+=">",Ee+=O.text?'<title id="'+U(O.id)+'">'+U(O.text)+"</title>":"",Ee+=z.text?'<description id="'+U(z.id)+'">'+U(z.text)+"</description>":"",Ee+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',Ee+='<path d="',me=0;me<Y.getModuleCount();me+=1)for(xe=me*M+R,ne=0;ne<Y.getModuleCount();ne+=1)Y.isDark(me,ne)&&(pe=ne*M+R,Ee+="M"+pe+","+xe+ie);return Ee+='" stroke="transparent" fill="black"/>',Ee+="</svg>",Ee},Y.createDataURL=function(M,R){M=M||2,R=typeof R>"u"?M*4:R;var z=Y.getModuleCount()*M+R*2,O=R,T=z-R;return x(z,z,function(Z,ne){if(O<=Z&&Z<T&&O<=ne&&ne<T){var pe=Math.floor((Z-O)/M),me=Math.floor((ne-O)/M);return Y.isDark(me,pe)?0:1}else return 1})},Y.createImgTag=function(M,R,z){M=M||2,R=typeof R>"u"?M*4:R;var O=Y.getModuleCount()*M+R*2,T="";return T+="<img",T+=' src="',T+=Y.createDataURL(M,R),T+='"',T+=' width="',T+=O,T+='"',T+=' height="',T+=O,T+='"',z&&(T+=' alt="',T+=U(z),T+='"'),T+="/>",T};var U=function(M){for(var R="",z=0;z<M.length;z+=1){var O=M.charAt(z);switch(O){case"<":R+="<";break;case">":R+=">";break;case"&":R+="&";break;case'"':R+=""";break;default:R+=O;break}}return R},H=function(M){var R=1;M=typeof M>"u"?R*2:M;var z=Y.getModuleCount()*R+M*2,O=M,T=z-M,Z,ne,pe,me,xe,Ee={"██":"█","█ ":"▀"," █":"▄"," ":" "},ie={"██":"▀","█ ":"▀"," █":" "," ":" "},Ne="";for(Z=0;Z<z;Z+=2){for(pe=Math.floor((Z-O)/R),me=Math.floor((Z+1-O)/R),ne=0;ne<z;ne+=1)xe="█",O<=ne&&ne<T&&O<=Z&&Z<T&&Y.isDark(pe,Math.floor((ne-O)/R))&&(xe=" "),O<=ne&&ne<T&&O<=Z+1&&Z+1<T&&Y.isDark(me,Math.floor((ne-O)/R))?xe+=" ":xe+="█",Ne+=M<1&&Z+1>=T?ie[xe]:Ee[xe];Ne+=`
|
|
208
|
+
`}return z%2&&M>0?Ne.substring(0,Ne.length-z-1)+Array(z+1).join("▀"):Ne.substring(0,Ne.length-1)};return Y.createASCII=function(M,R){if(M=M||1,M<2)return H(R);M-=1,R=typeof R>"u"?M*2:R;var z=Y.getModuleCount()*M+R*2,O=R,T=z-R,Z,ne,pe,me,xe=Array(M+1).join("██"),Ee=Array(M+1).join(" "),ie="",Ne="";for(Z=0;Z<z;Z+=1){for(pe=Math.floor((Z-O)/M),Ne="",ne=0;ne<z;ne+=1)me=1,O<=ne&&ne<T&&O<=Z&&Z<T&&Y.isDark(pe,Math.floor((ne-O)/M))&&(me=0),Ne+=me?xe:Ee;for(pe=0;pe<M;pe+=1)ie+=Ne+`
|
|
209
|
+
`}return ie.substring(0,ie.length-1)},Y.renderTo2dContext=function(M,R){R=R||2;for(var z=Y.getModuleCount(),O=0;O<z;O++)for(var T=0;T<z;T++)M.fillStyle=Y.isDark(O,T)?"black":"white",M.fillRect(O*R,T*R,R,R)},Y};n.stringToBytesFuncs={default:function(k){for(var I=[],S=0;S<k.length;S+=1){var C=k.charCodeAt(S);I.push(C&255)}return I}},n.stringToBytes=n.stringToBytesFuncs.default,n.createStringToBytes=function(k,I){var S=function(){for(var P=w(k),F=function(){var ae=P.read();if(ae==-1)throw"eof";return ae},D=0,N={};;){var J=P.read();if(J==-1)break;var G=F(),Y=F(),te=F(),oe=String.fromCharCode(J<<8|G),le=Y<<8|te;N[oe]=le,D+=1}if(D!=I)throw D+" != "+I;return N}(),C=63;return function(P){for(var F=[],D=0;D<P.length;D+=1){var N=P.charCodeAt(D);if(N<128)F.push(N);else{var J=S[P.charAt(D)];typeof J=="number"?(J&255)==J?F.push(J):(F.push(J>>>8),F.push(J&255)):F.push(C)}}return F}};var o={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},i={L:1,M:0,Q:3,H:2},a={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},s=function(){var k=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],I=1335,S=7973,C=21522,P={},F=function(D){for(var N=0;D!=0;)N+=1,D>>>=1;return N};return P.getBCHTypeInfo=function(D){for(var N=D<<10;F(N)-F(I)>=0;)N^=I<<F(N)-F(I);return(D<<10|N)^C},P.getBCHTypeNumber=function(D){for(var N=D<<12;F(N)-F(S)>=0;)N^=S<<F(N)-F(S);return D<<12|N},P.getPatternPosition=function(D){return k[D-1]},P.getMaskFunction=function(D){switch(D){case a.PATTERN000:return function(N,J){return(N+J)%2==0};case a.PATTERN001:return function(N,J){return N%2==0};case a.PATTERN010:return function(N,J){return J%3==0};case a.PATTERN011:return function(N,J){return(N+J)%3==0};case a.PATTERN100:return function(N,J){return(Math.floor(N/2)+Math.floor(J/3))%2==0};case a.PATTERN101:return function(N,J){return N*J%2+N*J%3==0};case a.PATTERN110:return function(N,J){return(N*J%2+N*J%3)%2==0};case a.PATTERN111:return function(N,J){return(N*J%3+(N+J)%2)%2==0};default:throw"bad maskPattern:"+D}},P.getErrorCorrectPolynomial=function(D){for(var N=u([1],0),J=0;J<D;J+=1)N=N.multiply(u([1,l.gexp(J)],0));return N},P.getLengthInBits=function(D,N){if(1<=N&&N<10)switch(D){case o.MODE_NUMBER:return 10;case o.MODE_ALPHA_NUM:return 9;case o.MODE_8BIT_BYTE:return 8;case o.MODE_KANJI:return 8;default:throw"mode:"+D}else if(N<27)switch(D){case o.MODE_NUMBER:return 12;case o.MODE_ALPHA_NUM:return 11;case o.MODE_8BIT_BYTE:return 16;case o.MODE_KANJI:return 10;default:throw"mode:"+D}else if(N<41)switch(D){case o.MODE_NUMBER:return 14;case o.MODE_ALPHA_NUM:return 13;case o.MODE_8BIT_BYTE:return 16;case o.MODE_KANJI:return 12;default:throw"mode:"+D}else throw"type:"+N},P.getLostPoint=function(D){for(var N=D.getModuleCount(),J=0,G=0;G<N;G+=1)for(var Y=0;Y<N;Y+=1){for(var te=0,oe=D.isDark(G,Y),le=-1;le<=1;le+=1)if(!(G+le<0||N<=G+le))for(var ae=-1;ae<=1;ae+=1)Y+ae<0||N<=Y+ae||le==0&&ae==0||oe==D.isDark(G+le,Y+ae)&&(te+=1);te>5&&(J+=3+te-5)}for(var G=0;G<N-1;G+=1)for(var Y=0;Y<N-1;Y+=1){var ge=0;D.isDark(G,Y)&&(ge+=1),D.isDark(G+1,Y)&&(ge+=1),D.isDark(G,Y+1)&&(ge+=1),D.isDark(G+1,Y+1)&&(ge+=1),(ge==0||ge==4)&&(J+=3)}for(var G=0;G<N;G+=1)for(var Y=0;Y<N-6;Y+=1)D.isDark(G,Y)&&!D.isDark(G,Y+1)&&D.isDark(G,Y+2)&&D.isDark(G,Y+3)&&D.isDark(G,Y+4)&&!D.isDark(G,Y+5)&&D.isDark(G,Y+6)&&(J+=40);for(var Y=0;Y<N;Y+=1)for(var G=0;G<N-6;G+=1)D.isDark(G,Y)&&!D.isDark(G+1,Y)&&D.isDark(G+2,Y)&&D.isDark(G+3,Y)&&D.isDark(G+4,Y)&&!D.isDark(G+5,Y)&&D.isDark(G+6,Y)&&(J+=40);for(var ce=0,Y=0;Y<N;Y+=1)for(var G=0;G<N;G+=1)D.isDark(G,Y)&&(ce+=1);var K=Math.abs(100*ce/N/N-50)/5;return J+=K*10,J},P}(),l=function(){for(var k=new Array(256),I=new Array(256),S=0;S<8;S+=1)k[S]=1<<S;for(var S=8;S<256;S+=1)k[S]=k[S-4]^k[S-5]^k[S-6]^k[S-8];for(var S=0;S<255;S+=1)I[k[S]]=S;var C={};return C.glog=function(P){if(P<1)throw"glog("+P+")";return I[P]},C.gexp=function(P){for(;P<0;)P+=255;for(;P>=256;)P-=255;return k[P]},C}();function u(k,I){if(typeof k.length>"u")throw k.length+"/"+I;var S=function(){for(var P=0;P<k.length&&k[P]==0;)P+=1;for(var F=new Array(k.length-P+I),D=0;D<k.length-P;D+=1)F[D]=k[D+P];return F}(),C={};return C.getAt=function(P){return S[P]},C.getLength=function(){return S.length},C.multiply=function(P){for(var F=new Array(C.getLength()+P.getLength()-1),D=0;D<C.getLength();D+=1)for(var N=0;N<P.getLength();N+=1)F[D+N]^=l.gexp(l.glog(C.getAt(D))+l.glog(P.getAt(N)));return u(F,0)},C.mod=function(P){if(C.getLength()-P.getLength()<0)return C;for(var F=l.glog(C.getAt(0))-l.glog(P.getAt(0)),D=new Array(C.getLength()),N=0;N<C.getLength();N+=1)D[N]=C.getAt(N);for(var N=0;N<P.getLength();N+=1)D[N]^=l.gexp(l.glog(P.getAt(N))+F);return u(D,0).mod(P)},C}var f=function(){var k=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],I=function(P,F){var D={};return D.totalCount=P,D.dataCount=F,D},S={},C=function(P,F){switch(F){case i.L:return k[(P-1)*4+0];case i.M:return k[(P-1)*4+1];case i.Q:return k[(P-1)*4+2];case i.H:return k[(P-1)*4+3];default:return}};return S.getRSBlocks=function(P,F){var D=C(P,F);if(typeof D>"u")throw"bad rs block @ typeNumber:"+P+"/errorCorrectionLevel:"+F;for(var N=D.length/3,J=[],G=0;G<N;G+=1)for(var Y=D[G*3+0],te=D[G*3+1],oe=D[G*3+2],le=0;le<Y;le+=1)J.push(I(te,oe));return J},S}(),d=function(){var k=[],I=0,S={};return S.getBuffer=function(){return k},S.getAt=function(C){var P=Math.floor(C/8);return(k[P]>>>7-C%8&1)==1},S.put=function(C,P){for(var F=0;F<P;F+=1)S.putBit((C>>>P-F-1&1)==1)},S.getLengthInBits=function(){return I},S.putBit=function(C){var P=Math.floor(I/8);k.length<=P&&k.push(0),C&&(k[P]|=128>>>I%8),I+=1},S},p=function(k){var I=o.MODE_NUMBER,S=k,C={};C.getMode=function(){return I},C.getLength=function(D){return S.length},C.write=function(D){for(var N=S,J=0;J+2<N.length;)D.put(P(N.substring(J,J+3)),10),J+=3;J<N.length&&(N.length-J==1?D.put(P(N.substring(J,J+1)),4):N.length-J==2&&D.put(P(N.substring(J,J+2)),7))};var P=function(D){for(var N=0,J=0;J<D.length;J+=1)N=N*10+F(D.charAt(J));return N},F=function(D){if("0"<=D&&D<="9")return D.charCodeAt(0)-48;throw"illegal char :"+D};return C},h=function(k){var I=o.MODE_ALPHA_NUM,S=k,C={};C.getMode=function(){return I},C.getLength=function(F){return S.length},C.write=function(F){for(var D=S,N=0;N+1<D.length;)F.put(P(D.charAt(N))*45+P(D.charAt(N+1)),11),N+=2;N<D.length&&F.put(P(D.charAt(N)),6)};var P=function(F){if("0"<=F&&F<="9")return F.charCodeAt(0)-48;if("A"<=F&&F<="Z")return F.charCodeAt(0)-65+10;switch(F){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+F}};return C},g=function(k){var I=o.MODE_8BIT_BYTE,S=n.stringToBytes(k),C={};return C.getMode=function(){return I},C.getLength=function(P){return S.length},C.write=function(P){for(var F=0;F<S.length;F+=1)P.put(S[F],8)},C},v=function(k){var I=o.MODE_KANJI,S=n.stringToBytesFuncs.SJIS;if(!S)throw"sjis not supported.";(function(F,D){var N=S(F);if(N.length!=2||(N[0]<<8|N[1])!=D)throw"sjis not supported."})("友",38726);var C=S(k),P={};return P.getMode=function(){return I},P.getLength=function(F){return~~(C.length/2)},P.write=function(F){for(var D=C,N=0;N+1<D.length;){var J=(255&D[N])<<8|255&D[N+1];if(33088<=J&&J<=40956)J-=33088;else if(57408<=J&&J<=60351)J-=49472;else throw"illegal char at "+(N+1)+"/"+J;J=(J>>>8&255)*192+(J&255),F.put(J,13),N+=2}if(N<D.length)throw"illegal char at "+(N+1)},P},b=function(){var k=[],I={};return I.writeByte=function(S){k.push(S&255)},I.writeShort=function(S){I.writeByte(S),I.writeByte(S>>>8)},I.writeBytes=function(S,C,P){C=C||0,P=P||S.length;for(var F=0;F<P;F+=1)I.writeByte(S[F+C])},I.writeString=function(S){for(var C=0;C<S.length;C+=1)I.writeByte(S.charCodeAt(C))},I.toByteArray=function(){return k},I.toString=function(){var S="";S+="[";for(var C=0;C<k.length;C+=1)C>0&&(S+=","),S+=k[C];return S+="]",S},I},m=function(){var k=0,I=0,S=0,C="",P={},F=function(N){C+=String.fromCharCode(D(N&63))},D=function(N){if(!(N<0)){if(N<26)return 65+N;if(N<52)return 97+(N-26);if(N<62)return 48+(N-52);if(N==62)return 43;if(N==63)return 47}throw"n:"+N};return P.writeByte=function(N){for(k=k<<8|N&255,I+=8,S+=1;I>=6;)F(k>>>I-6),I-=6},P.flush=function(){if(I>0&&(F(k<<6-I),k=0,I=0),S%3!=0)for(var N=3-S%3,J=0;J<N;J+=1)C+="="},P.toString=function(){return C},P},w=function(k){var I=k,S=0,C=0,P=0,F={};F.read=function(){for(;P<8;){if(S>=I.length){if(P==0)return-1;throw"unexpected end of file./"+P}var N=I.charAt(S);if(S+=1,N=="=")return P=0,-1;if(N.match(/^\s$/))continue;C=C<<6|D(N.charCodeAt(0)),P+=6}var J=C>>>P-8&255;return P-=8,J};var D=function(N){if(65<=N&&N<=90)return N-65;if(97<=N&&N<=122)return N-97+26;if(48<=N&&N<=57)return N-48+52;if(N==43)return 62;if(N==47)return 63;throw"c:"+N};return F},E=function(k,I){var S=k,C=I,P=new Array(k*I),F={};F.setPixel=function(G,Y,te){P[Y*S+G]=te},F.write=function(G){G.writeString("GIF87a"),G.writeShort(S),G.writeShort(C),G.writeByte(128),G.writeByte(0),G.writeByte(0),G.writeByte(0),G.writeByte(0),G.writeByte(0),G.writeByte(255),G.writeByte(255),G.writeByte(255),G.writeString(","),G.writeShort(0),G.writeShort(0),G.writeShort(S),G.writeShort(C),G.writeByte(0);var Y=2,te=N(Y);G.writeByte(Y);for(var oe=0;te.length-oe>255;)G.writeByte(255),G.writeBytes(te,oe,255),oe+=255;G.writeByte(te.length-oe),G.writeBytes(te,oe,te.length-oe),G.writeByte(0),G.writeString(";")};var D=function(G){var Y=G,te=0,oe=0,le={};return le.write=function(ae,ge){if(ae>>>ge)throw"length over";for(;te+ge>=8;)Y.writeByte(255&(ae<<te|oe)),ge-=8-te,ae>>>=8-te,oe=0,te=0;oe=ae<<te|oe,te=te+ge},le.flush=function(){te>0&&Y.writeByte(oe)},le},N=function(G){for(var Y=1<<G,te=(1<<G)+1,oe=G+1,le=J(),ae=0;ae<Y;ae+=1)le.add(String.fromCharCode(ae));le.add(String.fromCharCode(Y)),le.add(String.fromCharCode(te));var ge=b(),ce=D(ge);ce.write(Y,oe);var K=0,q=String.fromCharCode(P[K]);for(K+=1;K<P.length;){var re=String.fromCharCode(P[K]);K+=1,le.contains(q+re)?q=q+re:(ce.write(le.indexOf(q),oe),le.size()<4095&&(le.size()==1<<oe&&(oe+=1),le.add(q+re)),q=re)}return ce.write(le.indexOf(q),oe),ce.write(te,oe),ce.flush(),ge.toByteArray()},J=function(){var G={},Y=0,te={};return te.add=function(oe){if(te.contains(oe))throw"dup key:"+oe;G[oe]=Y,Y+=1},te.size=function(){return Y},te.indexOf=function(oe){return G[oe]},te.contains=function(oe){return typeof G[oe]<"u"},te};return F},x=function(k,I,S){for(var C=E(k,I),P=0;P<I;P+=1)for(var F=0;F<k;F+=1)C.setPixel(F,P,S(F,P));var D=b();C.write(D);for(var N=m(),J=D.toByteArray(),G=0;G<J.length;G+=1)N.writeByte(J[G]);return N.flush(),"data:image/gif;base64,"+N};return n}();(function(){r.stringToBytesFuncs["UTF-8"]=function(n){function o(i){for(var a=[],s=0;s<i.length;s++){var l=i.charCodeAt(s);l<128?a.push(l):l<2048?a.push(192|l>>6,128|l&63):l<55296||l>=57344?a.push(224|l>>12,128|l>>6&63,128|l&63):(s++,l=65536+((l&1023)<<10|i.charCodeAt(s)&1023),a.push(240|l>>18,128|l>>12&63,128|l>>6&63,128|l&63))}return a}return o(n)}})(),function(n){e.exports=n()}(function(){return r})})(j1);var R9=j1.exports;const pd=un(R9);var U9=Object.defineProperty,_l=Object.getOwnPropertySymbols,B1=Object.prototype.hasOwnProperty,R1=Object.prototype.propertyIsEnumerable,U1=(e,t,r)=>t in e?U9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,W9=(e,t)=>{for(var r in t||(t={}))B1.call(t,r)&&U1(e,r,t[r]);if(_l)for(var r of _l(t))R1.call(t,r)&&U1(e,r,t[r]);return e},V9=(e,t)=>{var r={};for(var n in e)B1.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&_l)for(var n of _l(e))t.indexOf(n)<0&&R1.call(e,n)&&(r[n]=e[n]);return r},nn=1e3,H9=/code length overflow/i;pd.stringToBytes=pd.stringToBytesFuncs["UTF-8"];var z9=(e,t,r)=>{r=Math.max(1,r);for(let n=r;n<=40;n+=1)try{const o=pd(n,t);o.addData(e),o.make();const i=o.getModuleCount();return{text:e,level:t,version:n,moduleCount:i,isDark:(s,l)=>s>=0&&s<i&&l>=0&&l<i&&o.isDark(s,l)}}catch(o){if(!(n<40&&H9.test(String(o))))throw o}return null},kn=Math.round,ri=(e,t)=>`M ${kn(e)} ${kn(t)}`,Ut=(e,t)=>`L ${kn(e)} ${kn(t)}`,Nn=(e,t,r)=>`A ${kn(r)} ${kn(r)} 0 0 1 ${kn(e)} ${kn(t)}`,G9=(e,t,r,n,o,i,a,s,l)=>{const u=[];return i?u.push(ri(e+o,t)):u.push(ri(e,t)),a?u.push(Ut(r-o,t),Nn(r,t+o,o)):u.push(Ut(r,t)),s?u.push(Ut(r,n-o),Nn(r-o,n,o)):u.push(Ut(r,n)),l?u.push(Ut(e+o,n),Nn(e,n-o,o)):u.push(Ut(e,n)),i?u.push(Ut(e,t+o),Nn(e+o,t,o)):u.push(Ut(e,t)),u.join(" ")},K9=(e,t,r,n,o,i,a,s,l)=>{const u=[];return i&&u.push(ri(e+o,t),Ut(e,t),Ut(e,t+o),Nn(e+o,t,o)),a&&u.push(ri(r,t+o),Ut(r,t),Ut(r-o,t),Nn(r,t+o,o)),s&&u.push(ri(r-o,n),Ut(r,n),Ut(r,n-o),Nn(r-o,n,o)),l&&u.push(ri(e,n-o),Ut(e,n),Ut(e+o,n),Nn(e,n-o,o)),u.join(" ")},q9=(e,t,r,n,o)=>{const i=o*r,a=n*r,s=i+r,l=a+r,u=t*.005*r,f=e.isDark,d=n-1,p=n+1,h=o-1,g=o+1,v=f(n,o),b=f(d,h),m=f(d,o),w=f(d,g),E=f(n,g),x=f(p,g),k=f(p,o),I=f(p,h),S=f(n,h);return v?G9(i,a,s,l,u,!m&&!S,!m&&!E,!k&&!E,!k&&!S):K9(i,a,s,l,u,m&&S&&b,m&&E&&w,k&&E&&x,k&&S&&I)},Y9=(e,t)=>{if(!e)return"";const r=e.moduleCount,n=nn/r,o=[];for(let i=0;i<r;i+=1)for(let a=0;a<r;a+=1)o.push(q9(e,t,n,i,a));return o.join(" ")},J9=e=>{var t=e,{color:r="#000",backgroundColor:n,cutout:o=!1,cutoutElement:i,errorCorrectionLevel:a="Q",rounding:s=0,children:l}=t,u=V9(t,["color","backgroundColor","cutout","cutoutElement","errorCorrectionLevel","rounding","children"]),f,d;const p=c.useMemo(()=>z9(l,a,1),[l,a]);if(!p)return null;const h=(f=p==null?void 0:p.moduleCount)!=null?f:1,v=nn/((d=p==null?void 0:p.moduleCount)!=null?d:1)*(Math.floor(h*.18)*2-1)+2,b=(nn-v)/2;return ve.createElement("svg",W9({xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${nn} ${nn}`},u),o?ve.createElement("mask",{id:"react-qr-rounded__mask"},ve.createElement("rect",{x:"0",y:"0",width:nn,height:nn,fill:"#fff"}),ve.createElement("rect",{x:b,y:b,width:v,height:v,rx:s,ry:s,fill:"#000"})):null,n?ve.createElement("rect",{x:"0",y:"0",width:nn,height:nn,fill:n}):null,ve.createElement("path",{fill:r,d:Y9(p,s),mask:o?"url(#react-qr-rounded__mask)":void 0}),i?ve.createElement("foreignObject",{x:b,y:b,width:v,height:v},ve.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",overflow:"hidden",borderRadius:s}},i)):null)};const hd=({children:e,...t})=>c.createElement(at.View,{...t,classNames:"grow flex flex-col justify-around items-center"},e),W1=({invitationUrl:e,active:t,send:r,status:n,type:o,authCode:i,id:a})=>{const{t:s}=tt("os"),l=Et("invitation-manager__qr-code"),u=o===we.Type.MULTIUSE?0:fM.get(n)??0,f=u===3,d=Lf(a??""),p=c.useMemo(()=>{switch(!0){case u===5:case u<0:return"showing final";case u===3:return"showing auth code";default:return"showing qr"}},[u]);return c.createElement(c.Fragment,null,c.createElement(at.Root,{activeView:p,classNames:"grow plb-1"},c.createElement(at.Views,null,c.createElement(hd,{id:"showing qr",emoji:d},c.createElement("p",{className:"text-sm mlb-1 font-normal text-center"},s(o===we.Type.MULTIUSE?"invite many qr label":"invite one qr label")),c.createElement("div",{role:"none",className:ue(Ot,"is-full max-is-[14rem] relative")},c.createElement(J9,{rounding:100,backgroundColor:"transparent",color:"currentColor",className:ue("is-full bs-full p-2",f&&"invisible"),"aria-labelledby":l,errorCorrectionLevel:"Q",cutout:!0},e??"never"),c.createElement(y7,null,c.createElement(Mf,{text:d}))),c.createElement("span",{id:l,className:"sr-only"},s("qr label")),c.createElement(w4,{variant:"ghost",value:e??"never"})),c.createElement(hd,{id:"showing auth code"},c.createElement(jy,null,s("auth code message")),c.createElement(My,{code:i,large:!0,classNames:"text-black dark:text-white"}),c.createElement(jy,null,"Be sure the other device is showing this symbol:"),d&&c.createElement(Mf,{text:d})),c.createElement(hd,{id:"showing final"},u>0?c.createElement(ze.Check,{className:ue("m-1.5",Ve(6))}):c.createElement(ze.X,{className:ue("m-1.5",Ve(6))})))),c.createElement(Gt,{classNames:"mbs-4"},c.createElement(it,{disabled:!t,onClick:()=>r==null?void 0:r({type:"deselectInvitation"})},s("back label"))))},ni="pbs-1 pbe-3 pli-3",X9=({titleId:e,title:t,identity:r,onDone:n})=>{var i;const o=vs(r.identityKey.toHex(),12);return c.createElement(Ff,{titleId:e,title:t,corner:c.createElement(Fy,{onDone:n})},c.createElement(Tt.Root,{size:12,variant:"circle",status:"active"},c.createElement(Tt.Frame,{classNames:"block mbs-4 mbe-2 mli-auto chromatic-ignore"},c.createElement(Tt.Fallback,{href:o})),c.createElement(Tt.Label,{classNames:"block text-center font-light text-xl","data-testid":"identityHeading.displayName"},((i=r.profile)==null?void 0:i.displayName)??$u(r.identityKey.toHex()))))},V1=e=>{const{identity:t,titleId:r,activeView:n,onUpdateProfile:o,onResetDevice:i,onJoinNewIdentity:a,IdentityActionChooser:s=N9,InvitationManager:l=W1,onDone:u,...f}=e,{t:d}=tt("os"),p=c.useMemo(()=>{switch(n){case"agent manager":return"Manage Agent";case"device invitation manager":return d("choose add device label");default:return d("identity heading")}},[n,d]);return c.createElement(Co,{density:"fine"},c.createElement(X9,{identity:t,titleId:r,title:p,onDone:u}),c.createElement(at.Root,{activeView:n},c.createElement(at.Views,null,c.createElement(at.View,{id:"identity action chooser",classNames:ni},c.createElement(s,{active:n==="identity action chooser",...f})),c.createElement(at.View,{id:"device invitation manager",classNames:ni},c.createElement(l,{active:n==="device invitation manager",...f,invitationUrl:f.createInvitationUrl(f.invitationCode)})),c.createElement(at.View,{id:"device manager",classNames:ni},c.createElement(k9,{active:n==="device manager",...f})),c.createElement(at.View,{classNames:ni,id:"update profile form"},c.createElement(L9,{send:f.send,active:n==="update profile form",profile:t.profile,onUpdateProfile:o})),c.createElement(at.View,{classNames:ni,id:"signing out"},c.createElement(F9,{send:f.send,active:n==="signing out",onResetDevice:i,onJoinNewIdentity:a})),c.createElement(at.View,{classNames:ni,id:"agent manager"},c.createElement(P9,{send:f.send,active:n==="agent manager",...f})))))},Z9=({invitation:e,...t})=>{const r=_f(e);return c.createElement(V1,{...t,...r})},Q9=({titleId:e,createInvitationUrl:t=n=>n,...r})=>{const n=Et("identityPanel__heading",e),o=We.useClient(),i=gi.useDevices(),a=gi.useIdentity(),s=gi.useHaloInvitations(),l=B9({client:o,identity:a,invitations:s});if(!a)return console.error("IdentityPanel rendered with no active identity."),null;const[u,f,d]=I9(o);c.useEffect(()=>d.subscribe(b=>{Xe("[state]",b)}).unsubscribe,[d]);const p=c.useMemo(()=>{switch(!0){case u.matches("choosingAction"):return"identity action chooser";case u.matches("managingDeviceInvitation"):return"device invitation manager";case u.matches("managingDevices"):return"device manager";case[{managingProfile:"idle"},{managingProfile:"pending"}].some(u.matches):return"update profile form";case u.matches("signingOut"):return"signing out";case[{managingAgent:"idle"},{managingAgent:"pending"}].some(u.matches):return"agent manager";default:return"identity action chooser"}},[u]),g={...r,identity:a,devices:i,activeView:p,send:f,titleId:n,createInvitationUrl:t,onUpdateProfile:async v=>{f({type:"updateProfile"}),await o.halo.updateProfile(v)},...l};return u.context.invitation?c.createElement(Z9,{...g,invitation:u.context.invitation}):c.createElement(V1,{...g})},ej=c.forwardRef(({mode:e,titleId:t,onExit:r,exitActionParent:n},o)=>{const{t:i}=tt("os"),a=c.createElement(yr,{variant:"ghost",...r&&{onClick:r},classNames:ue(Ot,"plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),"data-testid":"join-exit"},c.createElement(ze.X,{weight:"bold",className:Ve(4)}),c.createElement("span",{className:"sr-only"},i("exit label")));return c.createElement(Ff,{ref:o,titleId:t,title:i(e==="halo-only"?"selecting identity heading":"joining space heading"),...e==="halo-only"?{titleSrOnly:!0}:{corner:n?c.cloneElement(n,{},a):a},titleSrOnly:e==="halo-only"})}),H1=(e,t)=>(Xe("[subscribing to invitation]",t),{subscribe:(r,n,o)=>t.subscribe(i=>{switch(i.state){case we.State.CONNECTING:return Xe("[invitation connecting]",{Kind:e,invitation:i}),r({type:`connecting${e}Invitation`,invitation:i});case we.State.CONNECTED:return Xe("[invitation connected]",{Kind:e,invitation:i}),r({type:`connected${e}Invitation`,invitation:i});case we.State.READY_FOR_AUTHENTICATION:return Xe("[invitation ready for authentication]",{Kind:e,invitation:i}),r({type:`readyForAuthentication${e}Invitation`,invitation:i});case we.State.AUTHENTICATING:return Xe("[invitation authenticating]",{Kind:e,invitation:i}),r({type:`authenticating${e}Invitation`,invitation:i});case we.State.SUCCESS:return Xe("[invitation success]",{Kind:e,invitation:i}),r({type:`success${e}Invitation`,invitation:i}),o==null?void 0:o();case we.State.CANCELLED:return Xe.warn("[invitation cancelled]",{Kind:e}),r({type:`fail${e}Invitation`,reason:"cancelled"});case we.State.TIMEOUT:return Xe.error("[invitation timeout]",{Kind:e}),r({type:`fail${e}Invitation`,reason:"timeout"})}},i=>i instanceof We.AlreadyJoinedError?(Xe("[already joined]",{Kind:e,error:i}),r({type:`success${e}Invitation`,invitation:t.get()}),o==null?void 0:o()):(Xe.error("[invitation errored]",{Kind:e,error:i}),r({type:`fail${e}Invitation`,reason:"error"}),n==null?void 0:n(i)))}),z1=(e,t)=>({initial:`unknown${e}`,states:{[`unknown${e}`]:{always:[{cond:({mode:n})=>n==="halo-only"&&e==="Space",target:"#join.finishingJoiningHalo"},{cond:n=>!!n[e.toLowerCase()].unredeemedCode,target:`acceptingRedeemed${e}Invitation`,actions:[`redeem${e}InvitationCode`,`invalidate${e}InvitationCode`,"log"]},{target:`inputting${e}InvitationCode`,actions:"log"}]},[`inputting${e}InvitationCode`]:{},[`acceptingRedeemed${e}Invitation`]:{invoke:{src:n=>n[e.toLowerCase()].invitationSubscribable},initial:`unknown${e}Invitation`,states:{[`unknown${e}Invitation`]:{always:[{cond:n=>{var o,i;if(e!=="Space")return!1;{const a=(i=(o=n.space.invitation)==null?void 0:o.spaceKey)==null?void 0:i.toHex(),s=n.space.succeededKeys;return a?!!(s!=null&&s.has(a)):!1}},target:t,actions:"log"},{cond:n=>{const o=n[e.toLowerCase()].invitation;return!o||(o==null?void 0:o.state)===we.State.CONNECTING},target:`connecting${e}Invitation`,actions:"log"},{target:`inputting${e}VerificationCode`,actions:"log"}]},[`connecting${e}Invitation`]:{},[`inputting${e}VerificationCode`]:{},[`authenticating${e}VerificationCode`]:{on:{[`readyForAuthentication${e}Invitation`]:{target:`authenticationFailing${e}VerificationCode`,actions:["setInvitation","log"]}}},[`authenticationFailing${e}VerificationCode`]:{},[`failing${e}Invitation`]:{},[`success${e}Invitation`]:{}},on:{[`reset${e}Invitation`]:{target:`#join${e==="Halo"?".choosingIdentity":""}.accepting${e}Invitation.unknown${e}`,actions:["resetInvitation","log"]},[`connecting${e}Invitation`]:{target:`.connecting${e}Invitation`,actions:["setInvitation","log"]},[`connected${e}Invitation`]:{target:`.connecting${e}Invitation`,actions:["setInvitation","log"]},[`readyForAuthentication${e}Invitation`]:{target:`.inputting${e}VerificationCode`,actions:["setInvitation","log"]},[`authenticating${e}Invitation`]:{target:`.authenticating${e}VerificationCode`,actions:["setInvitation","log"]},[`success${e}Invitation`]:{target:t,actions:["setInvitation","log"]},[`fail${e}Invitation`]:{target:`.failing${e}Invitation`,actions:[Kt({[e.toLowerCase()]:(n,o)=>({...n[e.toLowerCase()],failReason:o.reason})}),"log"]}}}},on:{[`set${e}InvitationCode`]:{target:`.acceptingRedeemed${e}Invitation`,actions:[Kt({[e.toLowerCase()]:(n,o)=>({...n[e.toLowerCase()],unredeemedCode:o.code,succeededKeys:o.succeededKeys})}),`redeem${e}InvitationCode`,`invalidate${e}InvitationCode`,"log"]}}}),tj=fd({id:"join",predictableActionArguments:!0,context:{mode:"default",identity:null,halo:{},space:{}},initial:"unknown",states:{unknown:{always:[{cond:"existingIdentity",target:"resettingIdentity",actions:"log"},{cond:"noSelectedIdentity",target:"choosingIdentity",actions:"log"},{target:"acceptingSpaceInvitation",actions:"log"}]},choosingIdentity:{initial:"unknownAuthMethod",states:{unknownAuthMethod:{always:[{cond:"hasHaloUnredeemedCode",target:"acceptingHaloInvitation",actions:"log"},{target:"choosingAuthMethod",actions:"log"}]},choosingAuthMethod:{},recoveringIdentity:{},creatingIdentity:{},acceptingHaloInvitation:z1("Halo","#join.acceptingSpaceInvitation"),confirmingAddedIdentity:{}},on:{recoverIdentity:{target:".recoveringIdentity",actions:"log"},createIdentity:{target:".creatingIdentity",actions:"log"},acceptHaloInvitation:{target:".acceptingHaloInvitation",actions:"log"},addIdentity:{target:".confirmingAddedIdentity",actions:"log"},selectIdentity:{target:"acceptingSpaceInvitation",actions:["setIdentity","log"]},deselectAuthMethod:{target:".choosingAuthMethod",actions:"log"}}},resettingIdentity:{},acceptingSpaceInvitation:z1("Space","#join.finishingJoiningSpace"),finishingJoiningSpace:{type:"final"},finishingJoiningHalo:{type:"final"}},on:{resetIdentity:{target:"choosingIdentity",actions:"unsetIdentity"}}},{guards:{existingIdentity:({identity:e,mode:t},r)=>t==="halo-only"&&!!e,noSelectedIdentity:({identity:e},t)=>!e,hasHaloUnredeemedCode:({halo:e},t)=>!!e.unredeemedCode,noSpaceInvitation:({space:e},t)=>!e.invitation&&!e.unredeemedCode},actions:{setIdentity:Kt({identity:(e,t)=>t.identity}),unsetIdentity:Kt({identity:()=>null}),resetInvitation:Kt({halo:(e,t)=>t.type!=="resetHaloInvitation"?e.halo:(e.halo.invitationObservable&&e.halo.invitationObservable.cancel(),{...e.halo,invitation:void 0,invitationObservable:void 0,invitationSubscribable:void 0}),space:(e,t)=>t.type!=="resetSpaceInvitation"?e.space:(e.space.invitationObservable&&e.space.invitationObservable.cancel(),{...e.space,invitation:void 0,invitationObservable:void 0,invitationSubscribable:void 0})}),setInvitation:Kt({halo:(e,t)=>t.type.includes("Halo")?{...e.halo,invitation:t.invitation}:e.halo,space:(e,t)=>t.type.includes("Space")?{...e.space,invitation:t.invitation}:e.space}),log:(e,t)=>{Xe("[transition]",{event:t,haloInvitation:e.halo.invitation,spaceInvitation:e.space.invitation})}}}),G1=(e,t)=>{try{const r=new URLSearchParams(t.substring(t.lastIndexOf("?")));return r.get(`${e}InvitationCode`)??r.get(`${e}Invitation`)??r.get("invitationCode")??r.get("invitation")??t}catch(r){return Xe.catch(r),t}},rj=(e,t)=>{const r=c.useCallback(({halo:a})=>{if(a.unredeemedCode)try{const s=cn.InvitationEncoder.decode(G1("halo",a.unredeemedCode)),l=e.halo.join(s);return{...a,invitationObservable:l,invitationSubscribable:H1("Halo",l)}}catch(s){return Xe.error("Could not redeem device invitation code",s),a}else return a},[e]),n=c.useCallback(({space:a})=>{if(a.unredeemedCode)try{const s=cn.InvitationEncoder.decode(G1("space",a.unredeemedCode)),l=e.spaces.join(s);return{...a,invitationObservable:l,invitationSubscribable:H1("Space",l)}}catch(s){return Xe.error("Could not redeem space invitation code",s),a}else return a},[e]),o=c.useCallback(({halo:a})=>{var s;return a.unredeemedCode?((s=t==null?void 0:t.onInvalidateInvitationCode)==null||s.call(t,a.unredeemedCode),{...a,unredeemedCode:void 0}):a},[t==null?void 0:t.onInvalidateInvitationCode]),i=c.useCallback(({space:a})=>{var s;return a.unredeemedCode?((s=t==null?void 0:t.onInvalidateInvitationCode)==null||s.call(t,a.unredeemedCode),{...a,unredeemedCode:void 0}):a},[t==null?void 0:t.onInvalidateInvitationCode]);return dd(tj,{...t,actions:{...t==null?void 0:t.actions,redeemHaloInvitationCode:Kt({halo:r}),redeemSpaceInvitationCode:Kt({space:n}),invalidateHaloInvitationCode:Kt({halo:o}),invalidateSpaceInvitationCode:Kt({space:i})}})},nj=e=>{const t=!e.active,{send:r}=e,{t:n}=tt("os"),o={disabled:t,after:c.createElement(ze.CaretRight,{className:Ve(4),weight:"bold"}),slots:{label:{className:"text-sm"}}};return c.createElement(c.Fragment,null,c.createElement(Er,null,n("addition method chooser title")),c.createElement("div",{role:"none",className:"flex flex-col gap-1 grow"},c.createElement(Su,{...o,description:n("create identity description"),before:c.createElement(ze.Plus,{className:Ve(6)}),onClick:()=>r({type:"createIdentity"}),"data-autofocus":"choosingAuthMethod","data-testid":"identity-chooser.create-identity"},n("create identity label")),c.createElement(Su,{...o,description:n("join identity description"),before:c.createElement(ze.QrCode,{className:Ve(6)}),onClick:()=>r({type:"acceptHaloInvitation"}),"data-testid":"identity-chooser.join-identity"},n("join identity label")),c.createElement(Su,{...o,disabled:!0,description:n("recover identity description"),before:c.createElement(ze.Textbox,{className:Ve(6)}),onClick:()=>r({type:"recoverIdentity"}),"data-testid":"identity-chooser.recover-identity"},n("recover identity label"))))},oj=e=>{var g,v;const{mode:t,addedIdentity:r,active:n,send:o,onDone:i,doneActionParent:a}=e,s=!n,{t:l}=tt("os"),u=r==null?void 0:r.identityKey.toHex(),f=Et("identityListItem__label"),d=vs(u??"",12),p=((g=r==null?void 0:r.profile)==null?void 0:g.displayName)??(r&&$u(r==null?void 0:r.identityKey.toHex())),h=c.createElement(it,{...i&&{onClick:()=>i(null)},disabled:s,"data-autofocus":"confirmingAddedIdentity","data-testid":"identity-added-done"},c.createElement("span",null,l("done label")));return c.createElement(c.Fragment,null,c.createElement(Er,null,l("identity added label")),c.createElement("div",{role:"none",className:"grow flex flex-col items-center justify-center text-center gap-2"},c.createElement(Tt.Root,{status:"active",labelId:f},c.createElement(Tt.Frame,null,c.createElement(Tt.Fallback,{href:d})),c.createElement(Tt.Label,{classNames:ue("text-lg truncate",!((v=r==null?void 0:r.profile)!=null&&v.displayName)&&"font-mono")},p))),c.createElement(Gt,null,t==="halo-only"?a?c.cloneElement(a,{},h):h:c.createElement(it,{variant:"primary",disabled:s||!r,onClick:()=>r&&o({type:"selectIdentity",identity:r}),"data-autofocus":"confirmingAddedIdentity"},l("continue label"))))},ij=e=>{const{send:t,method:r}=e,n=r==="recover identity",o=We.useClient(),{t:i}=tt("os"),[a,s]=c.useState(""),l=u=>{o.halo.createIdentity({[n?"seedphrase":"displayName"]:u}).then(f=>{t==null||t({type:"selectIdentity",identity:f})},f=>{Xe.catch(f),s(i(n?"failed to recover identity message":"failed to create identity message"))})};return c.createElement(aj,{...e,onDisplayNameConfirm:l,validationMessage:a})},aj=e=>{const{method:t,send:r,active:n,onDisplayNameConfirm:o,validationMessage:i}=e,a=!n,{t:s}=tt("os"),[l,u]=c.useState(""),f=t==="recover identity";return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Qi,{validationMessage:i,label:c.createElement(Er,null,s(f?"recover identity input label":"new identity input label")),disabled:a,"data-testid":"identity-input",placeholder:f?"Type your recovery phrase":"Type a display name",onChange:({target:{value:d}})=>u(d)})),c.createElement(Gt,null,c.createElement(it,{variant:"ghost",disabled:a,onClick:()=>r==null?void 0:r({type:"deselectAuthMethod"}),"data-testid":`${t==="recover identity"?"recover":"create"}-identity-input-back`},s("back label")),c.createElement(it,{variant:"primary",disabled:a,onClick:()=>o==null?void 0:o(l),"data-testid":`${t==="recover identity"?"recover":"create"}-identity-input-continue`},s("continue label"))))},K1=e=>{const{active:t,Kind:r,doneActionParent:n,onDone:o}=e,i=!t,{t:a}=tt("os"),s=c.createElement(it,{variant:"primary",onClick:o,disabled:i,"data-autofocus":`success${r}Invitation finishingJoining${r}`,"data-testid":`${r.toLowerCase()}-invitation-accepted-done`},a("done label"));return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement("p",{className:"text-center text-sm font-normal"},a("welcome message"))),c.createElement(Gt,null,n?c.cloneElement(n,{},s):s))},sj=e=>{try{const t=new URLSearchParams(e.substring(e.lastIndexOf("?")));return t.get("spaceInvitationCode")??t.get("deviceInvitationCode")??e}catch(t){return Xe.catch(t),e}},q1=e=>{const{Kind:t,active:r,send:n,unredeemedCode:o,onExit:i,exitActionParent:a,onDone:s,doneActionParent:l,succeededKeys:u}=e,f=!r,{t:d}=tt("os"),[p,h]=c.useState(o??"");c.useEffect(()=>{o&&h(o??"")},[o]);const g=()=>{p.trim().length!==0&&n({type:`set${t}InvitationCode`,code:sj(p),...t==="Space"&&{succeededKeys:u}})},v=c.createElement(it,{variant:"ghost",disabled:f,...i?{onClick:()=>i()}:{onClick:()=>s==null?void 0:s(null)},"data-testid":"join-exit"},d("cancel label"));return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Qi,{label:c.createElement(Er,null,d("invitation input label")),placeholder:"Type an invitation code",disabled:f,value:p,onChange:({target:{value:b}})=>h(b),"data-autofocus":`inputting${t}InvitationCode`,"data-testid":`${t.toLowerCase()}-invitation-input`,onKeyUp:({key:b})=>b==="Enter"&&g()})),c.createElement(Gt,null,t==="Halo"?c.createElement(it,{variant:"ghost",disabled:f,onClick:()=>n({type:"deselectAuthMethod"}),"data-testid":`${t.toLowerCase()}-invitation-input-back`},d("back label")):a?c.cloneElement(a,{},v):l?c.cloneElement(l,{},v):v,c.createElement(it,{variant:"primary",disabled:f,onClick:g,"data-testid":`${t.toLowerCase()}-invitation-input-continue`},d("continue label"))))},lj=({invitationState:e,onInvitationCancel:t,active:r,send:n,Kind:o,failReason:i})=>{const{t:a}=tt("os");return i?c.createElement(c.Fragment,null,c.createElement(Er,{className:Ot},a(i==="timeout"?"timeout status label":i==="cancelled"?"cancelled status label":"error status label")),c.createElement("div",{role:"none",className:"grow"}),c.createElement(Gt,null,c.createElement(it,{disabled:!r,onClick:()=>n({type:`reset${o}Invitation`}),"data-testid":"invitation-rescuer-reset"},a("reset label")))):c.createElement(c.Fragment,null,c.createElement(Er,{className:Ot},a("connecting status label")),c.createElement("div",{role:"none",className:"grow"}),c.createElement(Gt,null,c.createElement(it,{disabled:!0,classNames:"order-2","data-testid":"next"},a("next label")),c.createElement(it,{disabled:!r,onClick:t,"data-testid":"invitation-rescuer-cancel"},a("cancel label"))))},Y1=e=>{const{Kind:t,invitationState:r,active:n,send:o}=e,{t:i}=tt("os");return c.createElement(c.Fragment,null,typeof r>"u"?c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Er,{className:Ot},"There was a problem joining the space")),c.createElement(Gt,null,c.createElement(it,{disabled:!n,"data-testid":"invitation-rescuer-blank-reset",onClick:()=>o({type:`reset${t}Invitation`})},i("reset label")))):c.createElement(lj,{...e}))},J1=6,X1=({failed:e,Kind:t,active:r,pending:n,invitationId:o,onInvitationAuthenticate:i,onInvitationCancel:a})=>{const s=!r||n,{t:l}=tt("os"),u=t.toLowerCase(),[f,d]=c.useState(""),p=({target:{value:h}})=>{var g;d(h),h.length===J1&&((g=document.querySelector(`[data-autofocus-pinlength="${u}"]`))==null||g.focus())};return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},o&&c.createElement(Mf,{text:Lf(o)}),c.createElement(jr.Root,{...e&&{validationValence:"error"}},c.createElement(jr.Label,{asChild:!0},c.createElement(Er,null,l("auth code input label"))),c.createElement(jr.PinInput,{disabled:s,length:J1,onChange:p,inputMode:"numeric",autoComplete:"off",pattern:"\\d*","data-autofocus":`connecting${t}Invitation inputting${t}VerificationCode authenticationFailing${t}VerificationCode authenticating${t}VerificationCode`,"data-prevent-ios-autofocus":!0,"data-testid":`${u}-auth-code-input`,"data-1p-ignore":!0}),e&&c.createElement(jr.DescriptionAndValidation,{classNames:"text-center"},c.createElement(jr.Validation,null,l("failed to authenticate message"))))),c.createElement(Gt,null,c.createElement(it,{variant:"ghost",disabled:s,onClick:()=>a==null?void 0:a(),"data-testid":`${u}-invitation-authenticator-cancel`},l("cancel label")),c.createElement(it,{variant:"primary",disabled:s,onClick:()=>i==null?void 0:i(f),"data-autofocus-pinlength":u,"data-testid":`${u}-invitation-authenticator-next`},l("next label"))))},cj=({send:e,active:t})=>{const r=We.useClient(),{t:n}=tt("os"),[o,i]=c.useState(""),a=()=>{r.reset().then(()=>e==null?void 0:e({type:"resetIdentity"}),s=>{Xe.catch(s),i(n("failed to reset identity message"))})};return c.createElement(uj,{disabled:!t,validationMessage:o,onConfirm:()=>a()})},uj=({disabled:e,validationMessage:t,onConfirm:r})=>{const{t:n}=tt("os"),o=n("confirmation value"),[i,a]=c.useState("");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Qi,{validationMessage:t,label:c.createElement(Er,null,n("reset identity input label",{confirmationValue:o})),disabled:e,"data-testid":"reset-identity-input",placeholder:o,onChange:({target:{value:s}})=>a(s)})),c.createElement(Gt,null,c.createElement(it,{variant:"primary",disabled:e||i!==o,onClick:()=>r==null?void 0:r(),"data-testid":"reset-identity-input-confirm"},n("confirm label"))))},qt="pbs-1 pbe-3 pli-3",fj=e=>{const{titleId:t,send:r,activeView:n,failed:o,mode:i,unredeemedCodes:a,invitationStates:s,succeededKeys:l,failReasons:u,onExit:f,onHaloDone:d,onSpaceDone:p,exitActionParent:h,doneActionParent:g,onHaloInvitationCancel:v,onSpaceInvitationCancel:b,onHaloInvitationAuthenticate:m,onSpaceInvitationAuthenticate:w,IdentityInput:E=ij,ResetIdentity:x=cj}=e;return c.createElement(Co,{density:"fine"},i!=="halo-only"&&c.createElement(ej,{titleId:t,mode:i,onExit:f,exitActionParent:h}),c.createElement(at.Root,{focusManaged:!0,activeView:n},c.createElement(at.Views,null,c.createElement(at.View,{classNames:qt,id:"addition method chooser"},c.createElement(nj,{send:r,active:n==="addition method chooser"})),c.createElement(at.View,{classNames:qt,id:"reset identity confirmation"},c.createElement(x,{send:r,method:"reset identity",active:n==="reset identity confirmation"})),c.createElement(at.View,{classNames:qt,id:"create identity input"},c.createElement(E,{send:r,method:"create identity",active:n==="create identity input"})),c.createElement(at.View,{classNames:qt,id:"recover identity input"},c.createElement(E,{send:r,method:"recover identity",active:n==="recover identity input"})),c.createElement(at.View,{classNames:qt,id:"halo invitation input"},c.createElement(q1,{send:r,Kind:"Halo",active:n==="halo invitation input",...(a==null?void 0:a.Halo)&&{unredeemedCode:a.Halo},...(l==null?void 0:l.Halo)&&{succeededKeys:l.Halo}})),c.createElement(at.View,{classNames:qt,id:"halo invitation rescuer"},c.createElement(Y1,{send:r,Kind:"Halo",active:n==="halo invitation rescuer",invitationState:s==null?void 0:s.Halo,onInvitationCancel:v,failReason:u==null?void 0:u.Halo})),c.createElement(at.View,{classNames:qt,id:"halo invitation authenticator"},c.createElement(X1,{send:r,Kind:"Halo",active:n==="halo invitation authenticator",onInvitationCancel:v,onInvitationAuthenticate:m,...o.has("Halo")&&{failed:!0}})),c.createElement(at.View,{classNames:qt,id:"halo invitation accepted"},c.createElement(K1,{send:r,Kind:"Halo",active:n==="halo invitation accepted",doneActionParent:g,onDone:d})),c.createElement(at.View,{classNames:qt,id:"identity added"},c.createElement(oj,{send:r,mode:i,active:n==="identity added",doneActionParent:g,onDone:d})),c.createElement(at.View,{classNames:qt,id:"space invitation input"},c.createElement(q1,{send:r,Kind:"Space",active:n==="space invitation input",...(a==null?void 0:a.Space)&&{unredeemedCode:a.Space},...(l==null?void 0:l.Space)&&{succeededKeys:l.Space},onExit:f,exitActionParent:h})),c.createElement(at.View,{classNames:qt,id:"space invitation rescuer"},c.createElement(Y1,{send:r,Kind:"Space",active:n==="space invitation rescuer",invitationState:s==null?void 0:s.Space,onInvitationCancel:b,failReason:u==null?void 0:u.Space})),c.createElement(at.View,{classNames:qt,id:"space invitation authenticator"},c.createElement(X1,{send:r,Kind:"Space",active:n==="space invitation authenticator",onInvitationCancel:b,onInvitationAuthenticate:w,...o.has("Space")&&{failed:!0}})),c.createElement(at.View,{classNames:qt,id:"space invitation accepted"},c.createElement(K1,{send:r,Kind:"Space",active:n==="space invitation accepted",doneActionParent:g,onDone:p})))))},dj=({titleId:e,mode:t="default",initialInvitationCode:r,exitActionParent:n,onExit:o,doneActionParent:i,onDone:a})=>{const s=We.useClient(),l=gi.useIdentity(),{hasIosKeyboard:u}=Ae(),f=Et("joinPanel__heading",e),[d,p,h]=rj(s,{context:{mode:t,identity:l,...r&&{[t==="halo-only"?"halo":"space"]:{unredeemedCode:r}}}});c.useEffect(()=>h.subscribe(C=>{Xe("[state]",C)}).unsubscribe,[h]),c.useEffect(()=>{const S=d.configuration[0].id.split("."),C=S[S.length-1],P=C==="finishingJoining"?"successSpaceInvitation":C,F=document.querySelector(`[data-autofocus~="${P}"]`);F&&!(u&&F.hasAttribute("data-prevent-ios-autofocus"))&&F.focus()},[d.value,u]);const g=c.useMemo(()=>{switch(!0){case d.matches({choosingIdentity:"choosingAuthMethod"}):return"addition method chooser";case d.matches("resettingIdentity"):return"reset identity confirmation";case d.matches({choosingIdentity:"creatingIdentity"}):return"create identity input";case d.matches({choosingIdentity:"recoveringIdentity"}):return"recover identity input";case d.matches({choosingIdentity:{acceptingHaloInvitation:"inputtingHaloInvitationCode"}}):return"halo invitation input";case[{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"connectingHaloInvitation"}}},{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"failingHaloInvitation"}}}].some(d.matches):return"halo invitation rescuer";case[{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"inputtingHaloVerificationCode"}}},{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"authenticatingHaloVerificationCode"}}},{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"authenticationFailingHaloVerificationCode"}}}].some(d.matches):return"halo invitation authenticator";case[{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"successHaloInvitation"}}},"finishingJoiningHalo"].some(d.matches):return"halo invitation accepted";case d.matches({choosingIdentity:"confirmingAddedIdentity"}):return"identity added";case d.matches({acceptingSpaceInvitation:"inputtingSpaceInvitationCode"}):return"space invitation input";case[{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"connectingSpaceInvitation"}},{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"failingSpaceInvitation"}}].some(d.matches):return"space invitation rescuer";case[{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"inputtingSpaceVerificationCode"}},{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"authenticatingSpaceVerificationCode"}},{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"authenticationFailingSpaceVerificationCode"}}].some(d.matches):return"space invitation authenticator";case d.matches("finishingJoiningSpace"):return"space invitation accepted";default:return"never"}},[d]),v=c.useMemo(()=>{const S=new Set;switch(!0){case d.matches({choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"authenticationFailingHaloVerificationCode"}}}):S.add("Halo");break;case d.matches({acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"authenticationFailingSpaceVerificationCode"}}):S.add("Space");break}return S},[d]),b=c.useMemo(()=>({Halo:d.context.halo.unredeemedCode,Space:d.context.space.unredeemedCode}),[d]),m=We.useMulticastObservable(s.spaces),w=c.useMemo(()=>({Space:m?new Set(m.map(({key:S})=>S.toHex())):void 0}),[m]),E=c.useMemo(()=>{var S,C;return{Halo:(S=d.context.halo.invitationObservable)==null?void 0:S.get().state,Space:(C=d.context.space.invitationObservable)==null?void 0:C.get().state}},[d]),x=c.useMemo(()=>({Halo:d.context.halo.failReason,Space:d.context.space.failReason}),[d]),k=c.useCallback(()=>{var S,C,P,F;a==null||a({identityKey:((S=d.context.halo.invitation)==null?void 0:S.identityKey)??null,swarmKey:((C=d.context.halo.invitation)==null?void 0:C.swarmKey)??null,spaceKey:((P=d.context.halo.invitation)==null?void 0:P.spaceKey)??null,target:((F=d.context.halo.invitation)==null?void 0:F.target)??null})},[d,a]),I=c.useCallback(()=>{var S,C,P,F;a==null||a({identityKey:((S=d.context.space.invitation)==null?void 0:S.identityKey)??null,swarmKey:((C=d.context.space.invitation)==null?void 0:C.swarmKey)??null,spaceKey:((P=d.context.space.invitation)==null?void 0:P.spaceKey)??null,target:((F=d.context.space.invitation)==null?void 0:F.target)??null})},[d,a]);return c.createElement(fj,{titleId:f,mode:t,send:p,activeView:g,failed:v,failReasons:x,pending:["connecting","authenticating"].some(S=>d==null?void 0:d.configuration[0].id.includes(S)),unredeemedCodes:b,invitationStates:E,succeededKeys:w,identity:l,onExit:o,exitActionParent:n,doneActionParent:i,onHaloDone:k,onSpaceDone:I,onHaloInvitationCancel:()=>{var S;return(S=d.context.halo.invitationObservable)==null?void 0:S.cancel()},onSpaceInvitationCancel:()=>{var S;return(S=d.context.space.invitationObservable)==null?void 0:S.cancel()},onHaloInvitationAuthenticate:S=>{var C;return p({type:"authenticateHaloVerificationCode"}),(C=d.context.halo.invitationObservable)==null?void 0:C.authenticate(S)},onSpaceInvitationAuthenticate:S=>{var C;return p({type:"authenticateSpaceVerificationCode"}),(C=d.context.space.invitationObservable)==null?void 0:C.authenticate(S)}})},pj=fd({id:"space",predictableActionArguments:!0,context:{space:null},initial:"managingSpace",states:{managingSpace:{},managingSpaceInvitation:{}},on:{deselectInvitation:{target:".managingSpace",actions:["unsetInvitation","log"]},selectInvitation:{target:".managingSpaceInvitation",actions:["setInvitation","log"]}}},{actions:{setInvitation:Kt({invitation:(e,t)=>(t==null?void 0:t.invitation)??null}),unsetInvitation:Kt({invitation:()=>{}}),log:(e,t)=>{Xe("[transition]",{event:t,context:e})}}}),hj=e=>dd(pj,{...e,context:{...e==null?void 0:e.context}}),Z1="dxos:react-shell/space-manager/active-action",gj=e=>{const{space:t,target:r}=e,{t:n}=tt("os"),o=We.useConfig(),i=Sa.useSpaceInvitations(t==null?void 0:t.key),a=c.useCallback(l=>{const u=cn.InvitationEncoder.encode(l);l.state===we.State.CONNECTING&&console.log(JSON.stringify({invitationCode:u,authCode:l.authCode}))},[]),s={inviteOne:{label:n("invite one label"),description:n("invite one description"),icon:ze.UserPlus,onClick:c.useCallback(()=>{var u,f,d,p;const l=(u=t.share)==null?void 0:u.call(t,{type:we.Type.INTERACTIVE,authMethod:we.AuthMethod.SHARED_SECRET,target:r});l&&((p=(d=(f=o.values.runtime)==null?void 0:f.app)==null?void 0:d.env)==null?void 0:p.DX_ENVIRONMENT)!=="production"&&l.subscribe(a)},[t])},inviteMany:{label:n("invite many label"),description:n("invite many description"),icon:ze.UsersThree,onClick:c.useCallback(()=>{var u,f,d,p;const l=(u=t.share)==null?void 0:u.call(t,{type:we.Type.MULTIUSE,authMethod:we.AuthMethod.NONE,target:r});l&&((p=(d=(f=o.values.runtime)==null?void 0:f.app)==null?void 0:d.env)==null?void 0:p.DX_ENVIRONMENT)!=="production"&&l.subscribe(a)},[t])}};return c.createElement(vj,{...e,invitations:i,inviteActions:s})},Q1="pis-3 pie-1 plb-1 mbe-1 font-medium",vj=e=>{const{active:t,space:r,createInvitationUrl:n,send:o,inviteActions:i,invitations:a,showInactiveInvitations:s,SpaceMemberList:l=x4,InvitationList:u=v7}=e,{t:f}=tt("os"),d=i??{noopInvite:{label:f("create space invitation label"),description:"",icon:ze.Placeholder,onClick:()=>{}}},[p,h]=c.useState(localStorage.getItem(Z1)??"inviteOne"),g=b=>{h(b),localStorage.setItem(Z1,b)},v=s?a:a==null?void 0:a.filter(b=>![we.State.CANCELLED].includes(b.get().state));return c.createElement(c.Fragment,null,c.createElement(ms.Root,{classNames:"grow shrink basis-28 -mli-2"},c.createElement(ms.Viewport,{classNames:"is-full pie-2"},!!(v!=null&&v.length)&&c.createElement(c.Fragment,null,c.createElement("h3",{className:ue(Q1,Ot)},f("invitation list heading")),c.createElement(u,{className:"mb-2",send:o,invitations:v??[],onClickRemove:b=>b.cancel(),createInvitationUrl:n}),c.createElement("h3",{className:ue(Q1,Ot,"mbs-2")},f("space member list heading"))),c.createElement(l,{spaceKey:r.key,includeSelf:!0})),c.createElement(ms.Scrollbar,{orientation:"vertical"},c.createElement(ms.Thumb,null))),c.createElement(Gt,null,c.createElement(b7,{disabled:!t,actions:d,activeAction:p,onChangeActiveAction:g,"data-testid":"spaces-panel.create-invitation"})))},mj=({titleId:e,space:t,onDone:r})=>{const{t:n}=tt("os"),o=t.properties.name;return c.createElement(Ff,{titleId:e,title:n("space panel heading"),corner:c.createElement(Fy,{"data-testid":"identity-panel-done",onDone:r})},c.createElement("div",{role:"none",className:"flex gap-4 items-center justify-center mlb-4"},c.createElement(ze.Planet,{size:32}),c.createElement("div",{className:"block text-start font-light text-xl"},o??t.key.truncate())))},ew=e=>{const{titleId:t,activeView:r,space:n,target:o,SpaceManager:i=gj,InvitationManager:a=W1,...s}=e;return c.createElement(Co,{density:"fine"},c.createElement(mj,{...s,titleId:t,space:n}),c.createElement(at.Root,{activeView:r},c.createElement(at.Views,null,c.createElement(at.View,{id:"space manager",classNames:qt},c.createElement(i,{active:r==="space manager",space:n,target:o,...s})),c.createElement(at.View,{id:"space invitation manager",classNames:qt},c.createElement(a,{active:r==="space invitation manager",...s,invitationUrl:e.invitationUrl})))))},bj=({invitation:e,...t})=>{const r=_f(e);return c.createElement(ew,{...t,...r,invitationUrl:t.createInvitationUrl(r.invitationCode)})},yj=({titleId:e,createInvitationUrl:t=n=>n,...r})=>{const n=Et("spacePanel__heading",e),[o,i,a]=hj({context:{space:r.space}});c.useEffect(()=>a.subscribe(f=>{Xe("[state]",f)}).unsubscribe,[a]);const s=c.useMemo(()=>{switch(!0){case o.matches("managingSpace"):return"space manager";case o.matches("managingSpaceInvitation"):return"space invitation manager";default:return"never"}},[o]),l={...r,activeView:s,send:i,titleId:n,createInvitationUrl:t};return o.context.invitation?c.createElement(bj,{...l,invitation:o.context.invitation}):c.createElement(ew,{...l})},wj=e=>{const t=Et("spaceDialog__title");return c.createElement(Fr.Root,{defaultOpen:!0,onOpenChange:r=>{var n;return r||((n=e.onDone)==null?void 0:n.call(e))}},c.createElement(Fr.Portal,null,c.createElement(Fr.Overlay,null,c.createElement(Fr.Content,{"aria-labelledby":t,onOpenAutoFocus:r=>r.preventDefault()},c.createElement(xu,null,c.createElement(Q9,{...e,titleId:t,doneActionParent:c.createElement(Fr.Close,{asChild:!0})}))))))},tw=e=>{const t=Et("joinDialog__title"),{height:r}=zO();return c.createElement($o.Root,{defaultOpen:!0,onOpenChange:n=>{var o;return n||(e.onExit?e.onExit():(o=e.onDone)==null?void 0:o.call(e,null))}},c.createElement($o.Portal,null,c.createElement($o.Overlay,{classNames:"backdrop-blur",...r&&{style:{blockSize:`${r}px`}}},c.createElement($o.Content,{"aria-labelledby":t},c.createElement(dj,{...e,titleId:t,exitActionParent:c.createElement($o.Cancel,{asChild:!0}),doneActionParent:c.createElement($o.Action,{asChild:!0})})))))};var gd,El=ln;if(process.env.NODE_ENV==="production")gd=El.createRoot,El.hydrateRoot;else{var rw=El.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;gd=function(e,t){rw.usingClientEntryPoint=!0;try{return El.createRoot(e,t)}finally{rw.usingClientEntryPoint=!1}}}var vd={exports:{}};(function(e,t){(function(r,n){var o="1.0.35",i="",a="?",s="function",l="undefined",u="object",f="string",d="major",p="model",h="name",g="type",v="vendor",b="version",m="architecture",w="console",E="mobile",x="tablet",k="smarttv",I="wearable",S="embedded",C=350,P="Amazon",F="Apple",D="ASUS",N="BlackBerry",J="Browser",G="Chrome",Y="Edge",te="Firefox",oe="Google",le="Huawei",ae="LG",ge="Microsoft",ce="Motorola",K="Opera",q="Samsung",re="Sharp",de="Sony",U="Xiaomi",H="Zebra",M="Facebook",R="Chromium OS",z="Mac OS",O=function($e,De){var A={};for(var y in $e)De[y]&&De[y].length%2===0?A[y]=De[y].concat($e[y]):A[y]=$e[y];return A},T=function($e){for(var De={},A=0;A<$e.length;A++)De[$e[A].toUpperCase()]=$e[A];return De},Z=function($e,De){return typeof $e===f?ne(De).indexOf(ne($e))!==-1:!1},ne=function($e){return $e.toLowerCase()},pe=function($e){return typeof $e===f?$e.replace(/[^\d\.]/g,i).split(".")[0]:n},me=function($e,De){if(typeof $e===f)return $e=$e.replace(/^\s\s*/,i),typeof De===l?$e:$e.substring(0,C)},xe=function($e,De){for(var A=0,y,_,L,W,X,se;A<De.length&&!X;){var Pe=De[A],nt=De[A+1];for(y=_=0;y<Pe.length&&!X&&Pe[y];)if(X=Pe[y++].exec($e),X)for(L=0;L<nt.length;L++)se=X[++_],W=nt[L],typeof W===u&&W.length>0?W.length===2?typeof W[1]==s?this[W[0]]=W[1].call(this,se):this[W[0]]=W[1]:W.length===3?typeof W[1]===s&&!(W[1].exec&&W[1].test)?this[W[0]]=se?W[1].call(this,se,W[2]):n:this[W[0]]=se?se.replace(W[1],W[2]):n:W.length===4&&(this[W[0]]=se?W[3].call(this,se.replace(W[1],W[2])):n):this[W]=se||n;A+=2}},Ee=function($e,De){for(var A in De)if(typeof De[A]===u&&De[A].length>0){for(var y=0;y<De[A].length;y++)if(Z(De[A][y],$e))return A===a?n:A}else if(Z(De[A],$e))return A===a?n:A;return $e},ie={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Ne={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},dt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[b,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[b,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,b],[/opios[\/ ]+([\w\.]+)/i],[b,[h,K+" Mini"]],[/\bopr\/([\w\.]+)/i],[b,[h,K]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[h,b],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[b,[h,"UC"+J]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[b,[h,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[b,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[b,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[b,[h,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[b,[h,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+J],b],[/\bfocus\/([\w\.]+)/i],[b,[h,te+" Focus"]],[/\bopt\/([\w\.]+)/i],[b,[h,K+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[b,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[b,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[b,[h,K+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[b,[h,"MIUI "+J]],[/fxios\/([-\w\.]+)/i],[b,[h,te]],[/\bqihu|(qi?ho?o?|360)browser/i],[[h,"360 "+J]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1 "+J],b],[/(comodo_dragon)\/([\w\.]+)/i],[[h,/_/g," "],b],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[h,b],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,M],b],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[h,b],[/\bgsa\/([\w\.]+) .*safari\//i],[b,[h,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[b,[h,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[b,[h,G+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,G+" WebView"],b],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[b,[h,"Android "+J]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,b],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[b,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[b,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[b,Ee,ie]],[/(webkit|khtml)\/([\w\.]+)/i],[h,b],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],b],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[b,[h,te+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[h,b],[/(cobalt)\/([\w\.]+)/i],[h,[b,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,ne]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,i,ne]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,ne]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[p,[v,q],[g,x]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[p,[v,q],[g,E]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[p,[v,F],[g,E]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[p,[v,F],[g,x]],[/(macintosh);/i],[p,[v,F]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[p,[v,re],[g,E]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[p,[v,le],[g,x]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[p,[v,le],[g,E]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[p,/_/g," "],[v,U],[g,E]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[p,/_/g," "],[v,U],[g,x]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[p,[v,"OPPO"],[g,E]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[p,[v,"Vivo"],[g,E]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[p,[v,"Realme"],[g,E]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[p,[v,ce],[g,E]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[p,[v,ce],[g,x]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[p,[v,ae],[g,x]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[p,[v,ae],[g,E]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[p,[v,"Lenovo"],[g,x]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[p,/_/g," "],[v,"Nokia"],[g,E]],[/(pixel c)\b/i],[p,[v,oe],[g,x]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[p,[v,oe],[g,E]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[p,[v,de],[g,E]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[p,"Xperia Tablet"],[v,de],[g,x]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[p,[v,"OnePlus"],[g,E]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[p,[v,P],[g,x]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[p,/(.+)/g,"Fire Phone $1"],[v,P],[g,E]],[/(playbook);[-\w\),; ]+(rim)/i],[p,v,[g,x]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[p,[v,N],[g,E]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[p,[v,D],[g,x]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[p,[v,D],[g,E]],[/(nexus 9)/i],[p,[v,"HTC"],[g,x]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[p,/_/g," "],[g,E]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[p,[v,"Acer"],[g,x]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[p,[v,"Meizu"],[g,E]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[v,p,[g,E]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[v,p,[g,x]],[/(surface duo)/i],[p,[v,ge],[g,x]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[p,[v,"Fairphone"],[g,E]],[/(u304aa)/i],[p,[v,"AT&T"],[g,E]],[/\bsie-(\w*)/i],[p,[v,"Siemens"],[g,E]],[/\b(rct\w+) b/i],[p,[v,"RCA"],[g,x]],[/\b(venue[\d ]{2,7}) b/i],[p,[v,"Dell"],[g,x]],[/\b(q(?:mv|ta)\w+) b/i],[p,[v,"Verizon"],[g,x]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[p,[v,"Barnes & Noble"],[g,x]],[/\b(tm\d{3}\w+) b/i],[p,[v,"NuVision"],[g,x]],[/\b(k88) b/i],[p,[v,"ZTE"],[g,x]],[/\b(nx\d{3}j) b/i],[p,[v,"ZTE"],[g,E]],[/\b(gen\d{3}) b.+49h/i],[p,[v,"Swiss"],[g,E]],[/\b(zur\d{3}) b/i],[p,[v,"Swiss"],[g,x]],[/\b((zeki)?tb.*\b) b/i],[p,[v,"Zeki"],[g,x]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[v,"Dragon Touch"],p,[g,x]],[/\b(ns-?\w{0,9}) b/i],[p,[v,"Insignia"],[g,x]],[/\b((nxa|next)-?\w{0,9}) b/i],[p,[v,"NextBook"],[g,x]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[v,"Voice"],p,[g,E]],[/\b(lvtel\-)?(v1[12]) b/i],[[v,"LvTel"],p,[g,E]],[/\b(ph-1) /i],[p,[v,"Essential"],[g,E]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[p,[v,"Envizen"],[g,x]],[/\b(trio[-\w\. ]+) b/i],[p,[v,"MachSpeed"],[g,x]],[/\btu_(1491) b/i],[p,[v,"Rotor"],[g,x]],[/(shield[\w ]+) b/i],[p,[v,"Nvidia"],[g,x]],[/(sprint) (\w+)/i],[v,p,[g,E]],[/(kin\.[onetw]{3})/i],[[p,/\./g," "],[v,ge],[g,E]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[p,[v,H],[g,x]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[p,[v,H],[g,E]],[/smart-tv.+(samsung)/i],[v,[g,k]],[/hbbtv.+maple;(\d+)/i],[[p,/^/,"SmartTV"],[v,q],[g,k]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,ae],[g,k]],[/(apple) ?tv/i],[v,[p,F+" TV"],[g,k]],[/crkey/i],[[p,G+"cast"],[v,oe],[g,k]],[/droid.+aft(\w)( bui|\))/i],[p,[v,P],[g,k]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[p,[v,re],[g,k]],[/(bravia[\w ]+)( bui|\))/i],[p,[v,de],[g,k]],[/(mitv-\w{5}) bui/i],[p,[v,U],[g,k]],[/Hbbtv.*(technisat) (.*);/i],[v,p,[g,k]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,me],[p,me],[g,k]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[g,k]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[v,p,[g,w]],[/droid.+; (shield) bui/i],[p,[v,"Nvidia"],[g,w]],[/(playstation [345portablevi]+)/i],[p,[v,de],[g,w]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[p,[v,ge],[g,w]],[/((pebble))app/i],[v,p,[g,I]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[p,[v,F],[g,I]],[/droid.+; (glass) \d/i],[p,[v,oe],[g,I]],[/droid.+; (wt63?0{2,3})\)/i],[p,[v,H],[g,I]],[/(quest( 2| pro)?)/i],[p,[v,M],[g,I]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[g,S]],[/(aeobc)\b/i],[p,[v,P],[g,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[p,[g,E]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[p,[g,x]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[g,x]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[g,E]],[/(android[-\w\. ]{0,9});.+buil/i],[p,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[b,[h,Y+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[b,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[h,b],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[b,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,b],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[h,[b,Ee,Ne]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,"Windows"],[b,Ee,Ne]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[b,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,z],[b,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[b,h],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[h,b],[/\(bb(10);/i],[b,[h,N]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[b,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[b,[h,te+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[b,[h,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[b,[h,"watchOS"]],[/crkey\/([\d\.]+)/i],[b,[h,G+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[h,R],b],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,b],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],b],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[h,b]]},Te=function($e,De){if(typeof $e===u&&(De=$e,$e=n),!(this instanceof Te))return new Te($e,De).getResult();var A=typeof r!==l&&r.navigator?r.navigator:n,y=$e||(A&&A.userAgent?A.userAgent:i),_=A&&A.userAgentData?A.userAgentData:n,L=De?O(dt,De):dt,W=A&&A.userAgent==y;return this.getBrowser=function(){var X={};return X[h]=n,X[b]=n,xe.call(X,y,L.browser),X[d]=pe(X[b]),W&&A&&A.brave&&typeof A.brave.isBrave==s&&(X[h]="Brave"),X},this.getCPU=function(){var X={};return X[m]=n,xe.call(X,y,L.cpu),X},this.getDevice=function(){var X={};return X[v]=n,X[p]=n,X[g]=n,xe.call(X,y,L.device),W&&!X[g]&&_&&_.mobile&&(X[g]=E),W&&X[p]=="Macintosh"&&A&&typeof A.standalone!==l&&A.maxTouchPoints&&A.maxTouchPoints>2&&(X[p]="iPad",X[g]=x),X},this.getEngine=function(){var X={};return X[h]=n,X[b]=n,xe.call(X,y,L.engine),X},this.getOS=function(){var X={};return X[h]=n,X[b]=n,xe.call(X,y,L.os),W&&!X[h]&&_&&_.platform!="Unknown"&&(X[h]=_.platform.replace(/chrome os/i,R).replace(/macos/i,z)),X},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return y},this.setUA=function(X){return y=typeof X===f&&X.length>C?me(X,C):X,this},this.setUA(y),this};Te.VERSION=o,Te.BROWSER=T([h,b,d]),Te.CPU=T([m]),Te.DEVICE=T([p,v,g,w,E,k,x,I,S]),Te.ENGINE=Te.OS=T([h,b]),e.exports&&(t=e.exports=Te),t.UAParser=Te;var Fe=typeof r!==l&&(r.jQuery||r.Zepto);if(Fe&&!Fe.ua){var bt=new Te;Fe.ua=bt.getResult(),Fe.ua.get=function(){return bt.getUA()},Fe.ua.set=function($e){bt.setUA($e);var De=bt.getResult();for(var A in De)Fe.ua[A]=De[A]}}})(typeof window=="object"?window:Ye)})(vd,vd.exports);var _j=vd.exports,xl="/home/runner/work/dxos/dxos/packages/core/mesh/rpc-tunnel/src/ports/iframe.ts",md,bd;if(typeof navigator<"u"){const e=new _j.UAParser(navigator.userAgent);md=e.getBrowser().name,bd=e.getOS().name}var Ej=(e,t,r)=>{if(!e.contentWindow){Xe("IFrame content window missing",{origin:t},{F:xl,L:24,S:void 0,C:(n,o)=>n(...o)});return}md==="Chrome"&&bd==="iOS"?e.contentWindow.postMessage(r,t):e.contentWindow.postMessage(r,t,[r.payload])},xj=(e,t)=>{md==="Chrome"&&bd==="iOS"?window.parent.postMessage(t,e):window.parent.postMessage(t,e,[t.payload])},nw=({channel:e,iframe:t,origin:r,onOrigin:n})=>({send:async o=>{if(!r){Xe("no origin set",{channel:e},{F:xl,L:62,S:void 0,C:(s,l)=>s(...l)});return}Xe("sending",{channel:e,data:o.length},{F:xl,L:66,S:void 0,C:(s,l)=>s(...l)});const i=o.buffer.slice(o.byteOffset,o.byteOffset+o.byteLength),a={channel:e,payload:i};t?Ej(t,r,a):xj(r,a)},subscribe:o=>{const i=a=>{if(!t&&a.source!==window.parent)return;if(t&&a.source!==t.contentWindow)return;const l=a.data&&typeof a.data=="object"&&"channel"in a.data&&"payload"in a.data?a.data:void 0;(l==null?void 0:l.channel)===e&&(r||(r=a.origin,n==null||n(r)),Xe("received",l,{F:xl,L:98,S:void 0,C:(u,f)=>u(...f)}),o(new Uint8Array(l.payload)))};return window.addEventListener("message",i),()=>window.removeEventListener("message",i)}});const Sj=e=>{const t=Et("spaceDialog__title");return c.createElement(Fr.Root,{defaultOpen:!0,onOpenChange:r=>{var n;return r||((n=e.onDone)==null?void 0:n.call(e))}},c.createElement(Fr.Portal,null,c.createElement(Fr.Overlay,null,c.createElement(Fr.Content,{"aria-labelledby":t},c.createElement(xu,null,c.createElement(yj,{...e,titleId:t,doneActionParent:c.createElement(Fr.Close,{asChild:!0})}))))))},$j=({runtime:e,origin:t})=>{const[{layout:r,invitationCode:n,spaceKey:o,target:i},a]=c.useState({layout:e.layout,invitationCode:e.invitationCode,spaceKey:e.spaceKey,target:e.target}),s=We.useClient(),l=Sa.useSpace(o);switch(c.useEffect(()=>e.layoutUpdate.on(u=>a(u)),[e]),c.useEffect(()=>{if(r===We.ShellLayout.SPACE&&!l){Xe.warn("No space found for shell space invitations.");const u=setTimeout(async()=>{await e.setAppContext({display:We.ShellDisplay.NONE}),e.setLayout({layout:We.ShellLayout.DEFAULT})});return()=>clearTimeout(u)}},[e,r,l]),r){case We.ShellLayout.INITIALIZE_IDENTITY:return c.createElement(tw,{mode:"halo-only",initialInvitationCode:n,onDone:()=>{e.setAppContext({display:We.ShellDisplay.NONE}),e.setLayout({layout:We.ShellLayout.DEFAULT})}});case We.ShellLayout.IDENTITY:case We.ShellLayout.SHARE_IDENTITY:case We.ShellLayout.EDIT_PROFILE:return c.createElement(wj,{createInvitationUrl:u=>`${t}?deviceInvitationCode=${u}`,onResetDevice:async()=>{await s.reset(),await e.setAppContext({display:We.ShellDisplay.NONE,reload:!0})},onJoinNewIdentity:()=>e.setLayout({layout:We.ShellLayout.INITIALIZE_IDENTITY}),onDone:async()=>{await e.setAppContext({display:We.ShellDisplay.NONE}),e.setLayout({layout:We.ShellLayout.DEFAULT})}});case We.ShellLayout.SPACE:return l?c.createElement(Sj,{space:l,target:i,createInvitationUrl:u=>`${t}?spaceInvitationCode=${u}`,onDone:async()=>{await e.setAppContext({display:We.ShellDisplay.NONE}),e.setLayout({layout:We.ShellLayout.DEFAULT})}}):null;case We.ShellLayout.JOIN_SPACE:return c.createElement(tw,{initialInvitationCode:n,onDone:async u=>{const f=(u==null?void 0:u.target)??void 0;await e.setAppContext({display:We.ShellDisplay.NONE,spaceKey:(u==null?void 0:u.spaceKey)??void 0,target:f}),e.setLayout({layout:We.ShellLayout.DEFAULT})},onExit:async()=>{await e.setAppContext({display:We.ShellDisplay.NONE}),e.setLayout({layout:We.ShellLayout.DEFAULT})}});default:return null}},Cj={"en-US":Object.freeze(Object.defineProperty({__proto__:null,os:{"manage profile label":"Manage identity","identity offline description":"Offline","sidebar label":"DXOS sidebar","copy invitation code label":"Copy URL","copy invitation code success label":"Copied","open share panel label":"View QR code","joining space heading":"Joining space","join space heading":"Enter space invitation","halo heading":"Initialize device identity","exit label":"Exit","identity selector title":"Join as","identity radio group title":"Select an identity you’ve associated with this device already","add identity label":"Add","continue label":"Continue","back label":"Back","next label":"Next","close label":"Close","auth choices label":"Choose an identity","create identity label":"Create an identity","create identity description":"Create a new identity.","recover identity label":"Use a seed phrase","recover identity description":"Enter your seed phrase to log in manually.","join identity label":"Use another device","join identity description":"Add this device to an identity you’re already logged into on another device.","deselect identity label":"Back to identities","addition method chooser title":"An identity is required to continue","new identity input label":"Set display name","recover identity input label":"Type or paste your seed phrase","failed to create identity message":"Failed to create an identity.","failed to recover identity message":"Failed to recover an identity from the provided seed phrase.","failed to authenticate message":"Incorrect PIN.","identity added label":"Created identity & added to this device:","join space as identity heading":"<part>as </part><part><icon/><label>{{labelValue}}</label></part>","error status label":"Failed","timeout status label":"Timed out","cancelled status label":"Cancelled","init status label":"Ready to connect","connecting status label":"Connecting…","connected status label":"Enter confirmation PIN","authenticating status label":"Enter confirmation PIN","success status label":"Success","connect label":"Connect","reconnect label":"Reconnect","cancel label":"Cancel","done label":"Done","reset label":"Start over","auth code input label":"Enter the verification code","invitation input label":"Paste an invitation code or URL","create device invitation label":"Add device","create space invitation label":"Invite","qr label":"Scan to accept invitation","empty invitations message":"No pending invitations","empty device list message":"No devices authenticated other than this device.","show all spaces label":"All spaces","all spaces label":"All spaces","create space label":"Create a new space","join space label":"Join a space","show current space label":"Current space","view space invitations label":"View space invitations","toggle sidebar label":"Open/close sidebar","open sidebar label":"Open sidebar","close sidebar label":"Close sidebar","welcome message":"Welcome","selecting identity heading":"Selecting identity","devices heading":"Devices","identity heading":"Profile settings","choose add device label":"Add device","choose devices label":"Manage devices","choose profile label":"Edit profile","choose sign out label":"Sign out","empty space members message":"There is nobody in this space yet.","back to all invitations label":"Back to all invitations","invitation heading":"Invitation","invitation list heading":"Invitations","device invitation list heading":"Pending device invitations","space invitation list heading":"Pending invitations","device list heading":"Devices","space member list heading":"Members","space panel heading":"Space membership","auth code message":"Enter the following auth code on the joining device.","display name input label":"Display name","display name input placeholder":"Enter a display name","invite one label":"Invite one","invite one description":"Only one user may join.","invite one qr label":"Single-use","invite one list item label":"Active single-use invitation","invite many label":"Invite many","invite many description":"Anyone with the link can join.","invite many qr label":"Multiple-use","invite many list item label":"Active multiple-use invitation","invite options label":"Change the active invite option.","confirm label":"Confirm","reset identity input label":"This will clear this device and all associated data. Type {{confirmationValue}} and confirm to continue.","failed to reset identity message":"Failed to reset identity.","confirmation value":"CONFIRM","sign out chooser title":"DANGER ZONE","sign out chooser message":"Proceeding with either action below will erase all data on this device.","join new identity label":"Join a new identity","reset device label":"Reset device","reset device confirm message":"Are you sure you want to reset your device? All data will be lost."}},Symbol.toStringTag,{value:"Module"}))},Aj=async(e=new We.Config)=>{const t=new We.ClientServicesProxy(nw({channel:cn.DEFAULT_CLIENT_CHANNEL})),r=new We.Client({config:e,services:t}),n=new lw.ShellRuntimeImpl(nw({channel:cn.DEFAULT_SHELL_CHANNEL}));await Promise.all([n.open(),r.initialize()]),gd(document.getElementById("root")).render(c.createElement(c.StrictMode,null,c.createElement(f5,{tx:y4,resourceExtensions:[Cj]},c.createElement(We.ClientContext.Provider,{value:{client:r,status:We.SystemStatus.ACTIVE}},c.createElement(xu,null,c.createElement(wr.Provider,null,c.createElement($j,{runtime:n,origin:location.origin})))))))};c.createContext({}),Zt.runShell=Aj,Object.defineProperty(Zt,Symbol.toStringTag,{value:"Module"})});
|
|
210
210
|
//# sourceMappingURL=shell.umd.js.map
|