import{a as e,t}from"./BWaJ3C7D.mjs";import{a as n,n as r}from"./CjxnTdcP.mjs";import{A as i,B as a,C as o,D as s,E as c,F as l,H as u,I as d,L as f,M as p,N as m,O as h,P as g,R as _,S as v,T as y,U as b,V as x,b as S,d as C,g as w,h as T,j as E,k as D,v as O,w as k,x as A,y as j,z as M}from"./Da3zqOpz.mjs";import{i as N,ln as P,on as F,pn as I}from"./DRAiiyBy.mjs";import{t as L}from"./DZ3venUT.mjs";import"./DOa9RD2F.mjs";function R(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:Object.prototype.toString.call(e)===`[object Object]`}function z(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function B(e,t,n){return V(e,t,void 0,void 0,void 0,void 0,n)}function V(e,t,n,r,i,a,o){let s=o(e,t,n,r,i,a);if(s!==void 0)return s;if(typeof e==typeof t)switch(typeof e){case`bigint`:case`string`:case`boolean`:case`symbol`:case`undefined`:return e===t;case`number`:return e===t||Object.is(e,t);case`function`:return e===t;case`object`:return H(e,t,a,o)}return H(e,t,a,o)}function H(e,t,n,r){if(Object.is(e,t))return!0;let C=b(e),N=b(t);if(C===`[object Arguments]`&&(C=g),N===`[object Arguments]`&&(N=g),C!==N)return!1;switch(C){case f:return e.toString()===t.toString();case m:return z(e.valueOf(),t.valueOf());case v:case k:case _:return Object.is(e.valueOf(),t.valueOf());case l:return e.source===t.source&&e.flags===t.flags;case h:return e===t}n??=new Map;let P=n.get(e),F=n.get(t);if(P!=null&&F!=null)return P===t;n.set(e,t),n.set(t,e);try{switch(C){case p:if(e.size!==t.size)return!1;for(let[i,a]of e.entries())if(!t.has(i)||!V(a,t.get(i),i,e,t,n,r))return!1;return!0;case d:{if(e.size!==t.size)return!1;let i=Array.from(e.values()),a=Array.from(t.values());for(let o=0;oV(s,i,void 0,e,t,n,r));if(c===-1)return!1;a.splice(c,1)}return!0}case j:case x:case u:case M:case a:case A:case E:case D:case i:case S:case c:case s:if(T(e)!==T(t)||e.length!==t.length)return!1;for(let i=0;i{(function(e,n){var r={version:`2.14.4`,areas:{},apis:{},nsdelim:`.`,inherit:function(e,t){for(var n in e)t.hasOwnProperty(n)||Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n));return t},stringify:function(e,t){return e===void 0||typeof e==`function`?e+``:JSON.stringify(e,t||r.replace)},parse:function(e,t){try{return JSON.parse(e,t||r.revive)}catch{return e}},fn:function(e,t){for(var n in r.storeAPI[e]=t,r.apis)r.apis[n][e]=t},get:function(e,t){return e.getItem(t)},set:function(e,t,n){e.setItem(t,n)},remove:function(e,t){e.removeItem(t)},key:function(e,t){return e.key(t)},length:function(e){return e.length},clear:function(e){e.clear()},Store:function(e,t,n){var i=r.inherit(r.storeAPI,function(e,t,n){return arguments.length===0?i.getAll():typeof t==`function`?i.transact(e,t,n):t===void 0?typeof e==`string`||typeof e==`number`?i.get(e):typeof e==`function`?i.each(e):e?i.setAll(e,t):i.clear():i.set(e,t,n)});i._id=e;try{var a=`__store2_test`;t.setItem(a,`ok`),i._area=t,t.removeItem(a)}catch{i._area=r.storage(`fake`)}return i._ns=n||``,r.areas[e]||(r.areas[e]=i._area),r.apis[i._ns+i._id]||(r.apis[i._ns+i._id]=i),i},storeAPI:{area:function(e,t){var n=this[e];return n&&n.area||(n=r.Store(e,t,this._ns),this[e]||(this[e]=n)),n},namespace:function(e,t,n){if(n=n||this._delim||r.nsdelim,!e)return this._ns?this._ns.substring(0,this._ns.length-n.length):``;var i=e,a=this[i];if((!a||!a.namespace)&&(a=r.Store(this._id,this._area,this._ns+i+n),a._delim=n,this[i]||(this[i]=a),!t))for(var o in r.areas)a.area(o,r.areas[o]);return a},isFake:function(e){return e?(this._real=this._area,this._area=r.storage(`fake`)):e===!1&&(this._area=this._real||this._area),this._area.name===`fake`},toString:function(){return`store`+(this._ns?`.`+this.namespace():``)+`[`+this._id+`]`},has:function(e){return this._area.has?this._area.has(this._in(e)):this._in(e)in this._area},size:function(){return this.keys().length},each:function(e,t){for(var n=0,i=r.length(this._area);nr.length(this._area)&&(i--,n--)}return t||this},keys:function(e){return this.each(function(e,t,n){n.push(e)},e||[])},get:function(e,t){var n=r.get(this._area,this._in(e)),i;return typeof t==`function`&&(i=t,t=null),n===null?t??n:r.parse(n,i)},getAll:function(e){return this.each(function(e,t,n){n[e]=t},e||{})},transact:function(e,t,n){var r=this.get(e,n),i=t(r);return this.set(e,i===void 0?r:i),this},set:function(e,t,n){var i=this.get(e),a;return i!=null&&n===!1?t:(typeof n==`function`&&(a=n,n=void 0),r.set(this._area,this._in(e),r.stringify(t,a),n)||i)},setAll:function(e,t){var n,r;for(var i in e)r=e[i],this.set(i,r,t)!==r&&(n=!0);return n},add:function(e,t,n){var i=this.get(e);if(i instanceof Array)t=i.concat(t);else if(i!==null){var a=typeof i;if(a===typeof t&&a===`object`){for(var o in t)i[o]=t[o];t=i}else t=i+t}return r.set(this._area,this._in(e),r.stringify(t,n)),t},remove:function(e,t){var n=this.get(e,t);return r.remove(this._area,this._in(e)),n},clear:function(){return this._ns?this.each(function(e){r.remove(this._area,this._in(e))},1):r.clear(this._area),this},clearAll:function(){var e=this._area;for(var t in r.areas)r.areas.hasOwnProperty(t)&&(this._area=r.areas[t],this.clear());return this._area=e,this},_in:function(e){return typeof e!=`string`&&(e=r.stringify(e)),this._ns?this._ns+e:e},_out:function(e){return this._ns?e&&e.indexOf(this._ns)===0?e.substring(this._ns.length):void 0:e}},storage:function(e){return r.inherit(r.storageAPI,{items:{},name:e})},storageAPI:{length:0,has:function(e){return this.items.hasOwnProperty(e)},key:function(e){var t=0;for(var n in this.items)if(this.has(n)&&e===t++)return n},setItem:function(e,t){this.has(e)||this.length++,this.items[e]=t},removeItem:function(e){this.has(e)&&(delete this.items[e],this.length--)},getItem:function(e){return this.has(e)?this.items[e]:null},clear:function(){for(var e in this.items)this.removeItem(e)}}},i=r.Store(`local`,(function(){try{return localStorage}catch{}})());i.local=i,i._=r,i.area(`session`,(function(){try{return sessionStorage}catch{}})()),i.area(`page`,r.storage(`page`)),typeof n==`function`&&n.amd!==void 0?n(`store2`,[],function(){return i}):t!==void 0&&t.exports?t.exports=i:(e.store&&(r.conflict=e.store),e.store=i)})(n,n&&n.define)})),G=e(W(),1),K={toggle:e=>({...e,toggle:()=>e.update(e=>!e)})};function q(e){let t=L(e);return K.toggle(t)}function J(e,t){let n=G.default.has(e)?G.default.get(e):t,r=L(n);return r.subscribe(t=>{G.default.set(e,t)}),r}function Y(e){return function(t,n){return J(`${e}_${t}`,n)}}function X(e,t){let i=r(e),a=Array.isArray(t)?i||t:typeof t==`object`?{...t,...i||{}}:i||t,o=L(a);n(e,a);{let t=!1;o.subscribe(r=>{t&&n(e,r),t=!0})}let s=t=>{let n=t[e];if(n)try{let e=JSON.parse(n);o.set(e)}catch{o.set(n)}};return{type:`cookie`,namespace:e,...o,hydrate:s}}function Z(e){return function(t,n){return X(`${e}_${t}`,n)}}function Q(e,t){let n=$(e,t);return N(()=>{n()}),n}function $(e,t){let n=!1,r,i;return e.subscribe(e=>{n===!1?(r=e,i=e,n=!0):(r=i,i=e,U(i,r)===!1&&t({previous:r,current:i}))})}var ee=e=>{let t=L(e);return{...t,reset:()=>t.set(e)}};function te(e,t){let n=e=>{throw Error(`Cannot ${e} session store before subscribing`)},r={subscribe(e){let n=P(t);return r.set=n.set,r.update=n.update,n.subscribe(e)},set:()=>n(`set`),update:()=>n(`update`)};function i(){let n=F(e);return I(t,n),n}return{store:r,setStoreContext:i}}export{K as a,Y as c,W as d,U as f,$ as i,ee as l,te as n,J as o,z as p,Q as r,Z as s,X as t,q as u};