@lume/variable
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -1,2 +0,2 @@ | ||
var variable=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);let r=1,o=!1,i=!1,s=[],u=null,c=null,l=0,a=null,f=null;function d(e,t){a||function(){if(window&&window.MessageChannel){const e=new MessageChannel,t=e.port2;a=()=>t.postMessage(null),e.port1.onmessage=()=>{if(null!==f){const e=performance.now();l=e+5;const n=!0;try{f(n,e)?t.postMessage(null):f=null}catch(e){throw t.postMessage(null),e}}}}else{let e;a=()=>{e||(e=f,setTimeout(()=>{const t=performance.now();l=t+5;const n=e(!0,t);e=null,n&&a()},0))}}if(navigator&&navigator.scheduling&&navigator.scheduling.isInputPending){const e=navigator.scheduling;c=()=>{const t=performance.now();return t>=l&&(!!e.isInputPending()||t>=300)}}else c=()=>performance.now()>=l}();let n=performance.now(),u=1073741823;t&&t.timeout&&(u=t.timeout);const d={id:r++,fn:e,startTime:n,expirationTime:n+u};return function(e,t){e.splice(function(){let n=0,r=e.length-1;for(;n<=r;){let o=r+n>>1,i=t.expirationTime-e[o].expirationTime;if(i>0)n=o+1;else{if(!(i<0))return o;r=o-1}}return n}(),0,t)}(s,d),o||i||(o=!0,f=h,a()),d}function p(e){e.fn=null}function h(e,t){o=!1,i=!0;try{return function(e,t){let n=t;u=s[0]||null;for(;null!==u&&(!(u.expirationTime>n)||e&&!c());){const e=u.fn;if(null!==e){u.fn=null;const t=u.expirationTime<=n;e(t),n=performance.now(),u===s[0]&&s.shift()}else s.shift();u=s[0]||null}return null!==u}(e,t)}finally{u=null,i=!1}}const y=(e,t)=>e===t,g=Symbol("error"),m={},b={owned:null,cleanups:null,context:null,owner:null};let v=null,w=null,A=null,S=null,x=[],k=0;function C(e,t){t&&(v=t);const n=w,r=v,o=0===e.length?b:{owned:null,cleanups:null,context:null,owner:r};let i;v=o,w=null;try{i=e(()=>X(o))}catch(e){const t=Z(v,g);if(!t)throw e;t.forEach(t=>t(e))}finally{for(;x.length;)x.shift()();w=n,v=r}return i}function T(e,t){const n={value:e,observers:null,observerSlots:null,pending:m,comparator:t};return[z.bind(n),I.bind(n)]}function O(e,t){U(Y(e,t))}function P(e,t,n){const r=Array.isArray(t)?(o=t,()=>{for(let e=0;e<o.length;e++)o[e]()}):t;var o;n=!!n,O(t=>{const o=w;return r(),n?n=!1:(w=null,t=e(t),w=o),t})}function j(e,t,n){const r=Y(e,t);return r.pending=m,r.observers=null,r.observerSlots=null,r.comparator=n,U(r),z.bind(r)}function M(e,t){let n,r=t?t.timeoutMs:void 0;const[o,i]=T(e());return O(()=>{e(),n&&n.fn||(n=d(()=>i(e()),void 0!==r?{timeout:r}:void 0))}),o}function _(e){let t=A,n=A=[];const r=e();return A=t,q(()=>{for(let e=0;e<n.length;e+=1){const t=n[e];if(t.pending!==m){const e=t.pending;t.pending=m,I.call(t,e)}}}),r}function N(e){let t,n=w;return w=null,t=e(),w=n,t}function L(e){x.push(e)}function E(e){return null===v?console.warn("cleanups created outside a `createRoot` or `render` will never be run"):null===v.cleanups?v.cleanups=[e]:v.cleanups.push(e),e}function R(e){null===v?console.warn("error handlers created outside a `createRoot` or `render` will never be run"):null===v.context?v.context={[g]:[e]}:v.context[g]?v.context[g].push(e):v.context[g]=[e]}function $(){return null!==w}function D(e){const t=Symbol("context");return{id:t,Provider:J(t),defaultValue:e}}function F(e){return Z(v,e.id)||e.defaultValue}function H(){return v}function z(){if(this.state&&this.sources){const e=S;S=null,1===this.state?U(this):function e(t){t.state=0;for(let n=0;n<t.sources.length;n+=1){const r=t.sources[n];r.sources&&(1===r.state?B(r):2===r.state&&e(r))}}(this),S=e}if(w){const e=this.observers?this.observers.length:0;w.sources?(w.sources.push(this),w.sourceSlots.push(e)):(w.sources=[this],w.sourceSlots=[e]),this.observers?(this.observers.push(w),this.observerSlots.push(w.sources.length-1)):(this.observers=[w],this.observerSlots=[w.sources.length-1])}return this.value}function I(e){if(!this.comparator||!this.comparator(this.value,e)){if(A)return this.pending===m&&A.push(this),void(this.pending=e);this.value=e,!this.observers||S&&!this.observers.length||q(()=>{for(let e=0;e<this.observers.length;e+=1){const t=this.observers[e];if(t.observers&&2!==t.state&&V(t),t.state=1,S.length>1e6)throw new Error("Potential Infinite Loop Detected.");S.push(t)}})}}function U(e){if(!e.fn)return;X(e);const t=v,n=w,r=k;w=v=e;const o=e.fn(e.value);(!e.updatedAt||e.updatedAt<=r)&&(e.observers&&e.observers.length?I.call(e,o):e.value=o,e.updatedAt=r),w=n,v=t}function Y(e,t){const n={fn:e,state:0,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:v,context:null};return null===v?console.warn("computations created outside a `createRoot` or `render` will never be disposed"):v!==b&&(v.owned?v.owned.push(n):v.owned=[n]),n}function B(e){let t=1===e.state&&e;for(;e.fn&&(e=e.owner);)1===e.state&&(t=e);t&&U(t)}function q(e){if(S)return e();S=[],k++;try{e();for(let e=0;e<S.length;e+=1)try{B(S[e])}catch(e){const t=Z(v,g);if(!t)throw e;t.forEach(t=>t(e))}}finally{for(S=null;x.length;)x.shift()()}}function V(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=2,n.observers&&V(n))}}function X(e){let t;if(e.sources){for(;e.sources.length;){const t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){const e=r.pop(),o=t.observerSlots.pop();n<r.length&&(e.sourceSlots[o]=n,r[n]=e,t.observerSlots[n]=o)}}e.state=0}if(e.owned){for(t=0;t<e.owned.length;t++)X(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}}function Z(e,t){return e&&(e.context&&e.context[t]||e.owner&&Z(e.owner,t))}function J(e){return function(t){let n;return O(()=>{v.context={[e]:t.value},n=N(()=>function e(t){if("function"==typeof t)return j(()=>e(t()));if(Array.isArray(t)){const n=[];for(let r=0;r<t.length;r++){let o=e(t[r]);Array.isArray(o)?n.push.apply(n,o):n.push(o)}return n}return t}(t.children))}),n}}const K=Symbol("state-raw"),W=Symbol("state-node"),G=Symbol("state-proxy");function Q(e,t){return e[G]||(e[G]=new Proxy(e,t||re))}function ee(e){return null!=e&&"object"==typeof e&&(e.__proto__===Object.prototype||Array.isArray(e))}function te(e){let t,n,r;if(t=null!=e&&e[K])return t;if(!ee(e))return e;if(Array.isArray(e)){Object.isFrozen(e)&&(e=e.slice(0));for(let t=0,o=e.length;t<o;t++)r=e[t],(n=te(r))!==r&&(e[t]=n)}else{Object.isFrozen(e)&&(e=Object.assign({},e));let t=Object.keys(e);for(let o=0,i=t.length;o<i;o++)r=e[t[o]],(n=te(r))!==r&&(e[t[o]]=n)}return e}function ne(e){let t=e[W];return t||(e[W]=t={}),t}const re={get(e,t){if(t===K)return e;if(t===G||t===W)return;const n=e[t],r=ee(n);if($()&&("function"!=typeof n||e.hasOwnProperty(t))){let o,i;r&&(o=ne(n))&&(i=o._||(o._=T()),i[0]()),o=ne(e),i=o[t]||(o[t]=T()),i[0]()}return r?Q(n):n},set:()=>!0,deleteProperty:()=>!0},oe={get(e,t){if(t===K)return e;const n=e[t];return ee(n)?new Proxy(n,oe):n},set:(e,t,n)=>(ie(e,t,te(n)),!0),deleteProperty:(e,t)=>(ie(e,t,void 0),!0)};function ie(e,t,n,r){if(!r&&e[t]===n)return;const o=Array.isArray(e)||!(t in e);void 0===n?delete e[t]:e[t]=n;let i,s=ne(e);(i=s[t])&&i[1](),o&&(i=s._)&&i[1]()}function se(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();const i=typeof r,s=Array.isArray(e);if(Array.isArray(r)){for(let o=0;o<r.length;o++)se(e,[r[o]].concat(t),[r[o]].concat(n));return}if(s&&"function"===i){for(let o=0;o<e.length;o++)r(e[o],o)&&se(e,[o].concat(t),[o].concat(n));return}if(s&&"object"===i){const{from:o=0,to:i=e.length-1,by:s=1}=r;for(let r=o;r<=i;r+=s)se(e,[r].concat(t),[r].concat(n));return}if(t.length>1)return void se(e[r],t,[r].concat(n));o=e[r],n=[r].concat(n)}let i=t[0];if("function"==typeof i){const e=void 0===r||ee(o)?new Proxy(o,oe):o;if(i=i(e,n),i===e||void 0===i)return}i=te(i),void 0===r||ee(o)&&ee(i)&&!Array.isArray(i)?function(e,t,n){const r=Object.keys(t);for(let o=0;o<r.length;o+=1){const i=r[o];ie(e,i,t[i],n)}}(o,i):ie(e,r,i)}function ue(e){const t=te(e||{});return[Q(t),function(...e){_(()=>se(t,e))}]}function ce(e,t={}){const{merge:n,key:r="id"}=t;return t=>{if(!ee(t=te(t)))return e;!function e(t,n,r,o,i){let s=n[r];if(t===s)return;if(!ee(t)||!ee(s)||i&&t[i]!==s[i])return void(t!==s&&ie(n,r,t));if(Array.isArray(t)){if(t.length&&s.length&&(!o||i&&null!=t[0][i])){let n,r,u,c,l,a,f,d;for(u=0,c=Math.min(s.length,t.length);u<c&&(s[u]===t[u]||i&&s[u][i]===t[u][i]);u++)e(t[u],s,u,o,i);const p=new Array(t.length),h=new Map;for(c=s.length-1,l=t.length-1;c>=u&&l>=u&&(s[c]===t[l]||i&&s[c][i]===t[l][i]);c--,l--)p[l]=s[c];if(u>l||u>c){for(r=u;r<=l;r++)ie(s,r,t[r]);for(;r<t.length;r++)ie(s,r,p[r]),e(t[r],s,r,o,i);return void(s.length>t.length&&ie(s,"length",t.length))}for(f=new Array(l+1),r=l;r>=u;r--)a=t[r],d=i?a[i]:a,n=h.get(d),f[r]=void 0===n?-1:n,h.set(d,r);for(n=u;n<=c;n++)a=s[n],d=i?a[i]:a,r=h.get(d),void 0!==r&&-1!==r&&(p[r]=s[n],r=f[r],h.set(d,r));for(r=u;r<t.length;r++)r in p?(ie(s,r,p[r]),e(t[r],s,r,o,i)):ie(s,r,t[r])}else for(let n=0,r=t.length;n<r;n++)e(t[n],s,n,o,i);return void(s.length>t.length&&ie(s,"length",t.length))}const u=Object.keys(t);for(let n=0,r=u.length;n<r;n++)e(t[u[n]],s,u[n],o,i);const c=Object.keys(s);for(let e=0,n=c.length;e<n;e++)void 0===t[c[e]]&&ie(s,c[e],void 0)}(e,{state:t},"state",n,r)}}const le=Symbol("fallback");function ae(e,t,n){return"function"!=typeof t?(n=t||{},t=e,r):(n||(n={}),r(e));function r(e){let r=[],o=[],i=[],s=0;return E(()=>{for(let e=0,t=i.length;e<t;e++)i[e]()}),()=>{let u,c,l=e()||[];return N(()=>{let e,t,f,d,p,h,y,g,m=l.length;if(0===m){if(0!==s){for(u=0;u<s;u++)i[u]();i=[],r=[],o=[],s=0}n.fallback&&(r=[le],o[0]=C(e=>(i[0]=e,n.fallback())),s=1)}else if(0===s){for(c=0;c<m;c++)r[c]=l[c],o[c]=C(a);s=m}else{for(f=new Array(m),d=new Array(m),p=0,h=Math.min(s,m);p<h&&r[p]===l[p];p++);for(h=s-1,y=m-1;h>=p&&y>=p&&r[h]===l[y];h--,y--)f[y]=o[h],d[y]=i[h];if(p>y){for(c=h;p<=c;c--)i[c]();const e=h-p+1;return e>0&&(o.splice(p,e),i.splice(p,e)),r=l.slice(0),s=m,o}if(p>h){for(c=p;c<=y;c++)o[c]=C(a);for(;c<m;c++)o[c]=f[c],i[c]=d[c];return r=l.slice(0),s=m,o}for(e=new Map,t=new Array(y+1),c=y;c>=p;c--)g=l[c],u=e.get(g),t[c]=void 0===u?-1:u,e.set(g,c);for(u=p;u<=h;u++)g=r[u],c=e.get(g),void 0!==c&&-1!==c?(f[c]=o[u],d[c]=i[u],c=t[c],e.set(g,c)):i[u]();for(c=p;c<m;c++)c in f?(o[c]=f[c],i[c]=d[c]):o[c]=C(a);s=o.length=m,r=l.slice(0)}return o});function a(e){return i[c]=e,t(l[c],c)}}}}function fe(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r++){const o=n[r];!(o in e)&&(e[o]=t[o])}}function de(e){const t={},n=Object.getOwnPropertyDescriptors(e);return Object.defineProperties(t,n),t}const pe={};function he(e){pe.hydrate=e}function ye(){let e=0;const[t,n]=T(!1);return[t,()=>0==e++&&n(!0),()=>--e<=0&&n(!1)]}const ge=D({}),[me,be,ve]=ye();function we(e){return new Promise(t=>{const n=e();O(()=>!ge.active()&&t(n))})}function Ae(e){const[t,n]=T(e),[r,o]=T(),[i,s]=T(),u=new Set;let c,l=!1,a=null;function f(e){c=void 0,_(()=>{n(e),l&&(l=!1,s());for(let e of u.keys())e.decrement();u.clear()})}return[function(){const e=F(ge),n=t();if(a)throw a;return r(),c&&e.increment&&!u.has(e)&&(e.increment(),u.add(e)),n},function(e){return a=null,null!=e&&"object"==typeof e&&"then"in e?(c=e,l||(l=!0,_(()=>{s(),o()})),e.then(t=>{c===e&&f(t)},t=>{c===e&&(a=t,f(void 0))})):(c=void 0,f(e)),()=>(i(),l)}]}function Se(e){const t=T(),[n,r]=Ae(e);return[()=>(n(),t[0]()),t[1],r]}ge.active=me,ge.increment=be,ge.decrement=ve;const xe={get(e,t){if(t===K)return e;if(t===G||t===W)return;const n=e[t],r=ee(n);if($()&&("function"!=typeof n||e.hasOwnProperty(t))){let o,i;r&&(o=ne(n))&&(i=o._||(o._=T()),i[0]()),o=ne(e),i=o[t]||(o[t]=Se(n)),i[0]()}return r?Q(n):n},set:()=>!0,deleteProperty:()=>!0};function ke(e){const t=te(e||{}),n=Q(t,xe),r={};function o(...e){_(()=>se(t,e))}return[n,function(e,n){const i=ne(t),s=Object.keys(e);for(let u=0;u<s.length;u++){const c=s[u],l=e[c],a=e=>(n?o(c,n(e)):ie(t,c,e),e),f=(i[c]||(i[c]=Se(t[c])))[2](l&&"object"==typeof l&&"then"in l?l.then(a):a(l));!(c in r)&&Object.defineProperty(r,c,{get:()=>f()})}return r},o]}function Ce(e){return t=>{const n=pe.hydrate&&pe.hydrate.registry,r=pe.hydrate?{id:`${pe.hydrate.id}.${pe.hydrate.count++}`,count:0,registry:pe.hydrate.registry}:void 0;let o,i,s,u;return n?([o,i]=T(),e().then(e=>i(e.default))):([o,s]=Ae(),s(e().then(e=>e.default))),j(()=>(u=o())&&N(()=>{if(!r)return u(t);const e=pe.hydrate;he(r);const n=u(t);return!e&&he(),n}))}}function Te(e){const[t,n,r]=ye();return[t,t=>{const o=ge.transition;ge.transition={timeoutMs:e.timeoutMs,increment:n,decrement:r},n(),t(),r(),L(()=>ge.transition=o)}]}function Oe(e){const{state:t}=F(ge);let n;return t?()=>"suspended"===t()?n:n=e():e}const Pe="attribute",je="property",Me={href:{type:Pe},style:{type:je,alias:"style.cssText"},for:{type:je,alias:"htmlFor"},class:{type:je,alias:"className"},spellCheck:{type:je,alias:"spellcheck"},allowFullScreen:{type:je,alias:"allowFullscreen"},autoCapitalize:{type:je,alias:"autocapitalize"},autoFocus:{type:je,alias:"autofocus"},autoPlay:{type:je,alias:"autoplay"}},_e={className:{type:Pe,alias:"class"},htmlFor:{type:Pe,alias:"for"},tabIndex:{type:Pe,alias:"tabindex"},allowReorder:{type:Pe},attributeName:{type:Pe},attributeType:{type:Pe},autoReverse:{type:Pe},baseFrequency:{type:Pe},calcMode:{type:Pe},clipPathUnits:{type:Pe},contentScriptType:{type:Pe},contentStyleType:{type:Pe},diffuseConstant:{type:Pe},edgeMode:{type:Pe},externalResourcesRequired:{type:Pe},filterRes:{type:Pe},filterUnits:{type:Pe},gradientTransform:{type:Pe},gradientUnits:{type:Pe},kernelMatrix:{type:Pe},kernelUnitLength:{type:Pe},keyPoints:{type:Pe},keySplines:{type:Pe},keyTimes:{type:Pe},lengthAdjust:{type:Pe},limitingConeAngle:{type:Pe},markerHeight:{type:Pe},markerUnits:{type:Pe},maskContentUnits:{type:Pe},maskUnits:{type:Pe},numOctaves:{type:Pe},pathLength:{type:Pe},patternContentUnits:{type:Pe},patternTransform:{type:Pe},patternUnits:{type:Pe},pointsAtX:{type:Pe},pointsAtY:{type:Pe},pointsAtZ:{type:Pe},preserveAlpha:{type:Pe},preserveAspectRatio:{type:Pe},primitiveUnits:{type:Pe},refX:{type:Pe},refY:{type:Pe},repeatCount:{type:Pe},repeatDur:{type:Pe},requiredExtensions:{type:Pe},requiredFeatures:{type:Pe},specularConstant:{type:Pe},specularExponent:{type:Pe},spreadMethod:{type:Pe},startOffset:{type:Pe},stdDeviation:{type:Pe},stitchTiles:{type:Pe},surfaceScale:{type:Pe},systemLanguage:{type:Pe},tableValues:{type:Pe},targetX:{type:Pe},targetY:{type:Pe},textLength:{type:Pe},viewBox:{type:Pe},viewTarget:{type:Pe},xChannelSelector:{type:Pe},yChannelSelector:{type:Pe},zoomAndPan:{type:Pe}},Ne=new Set(["abort","animationstart","animationend","animationiteration","blur","change","copy","cut","error","focus","gotpointercapture","load","loadend","loadstart","lostpointercapture","mouseenter","mouseleave","paste","progress","reset","scroll","select","submit","transitionstart","transitioncancel","transitionend","transitionrun"]);function Le(e,t){const n=e[t];Object.defineProperty(e,t,{get:()=>n(),enumerable:!0})}function Ee(e,t,n){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function Re(e,t,n,r){if(void 0===n)return e.textContent="";const o=r||document.createTextNode("");if(t.length){o!==t[0]&&e.replaceChild(o,t[0]);for(let n=t.length-1;n>0;n--)e.removeChild(t[n])}else e.insertBefore(o,n);return[o]}function $e(e,t,n){let r=n.length,o=t.length,i=r,s=0,u=0,c=t[o-1].nextSibling,l=null;for(;s<o||u<i;)if(o===s){const t=i<r?u?n[u-1].nextSibling:n[i-u]:c;for(;u<i;)e.insertBefore(n[u++],t)}else if(i===u)for(;s<o;)l&&l.has(t[s])||e.removeChild(t[s]),s++;else if(t[s]===n[u])s++,u++;else if(t[o-1]===n[i-1])o--,i--;else{if(o-s==1&&i-u==1){l&&l.has(t[s])?e.insertBefore(n[u],i<r?n[i]:c):e.replaceChild(n[u],t[s]);break}if(t[s]===n[i-1]&&n[u]===t[o-1]){const r=t[--o].nextSibling;e.insertBefore(n[u++],t[s++].nextSibling),e.insertBefore(n[--i],r),t[o]=n[i]}else{if(!l){l=new Map;let e=u;for(;e<i;)l.set(n[e],e++)}if(l.has(t[s])){const r=l.get(t[s]);if(u<r&&r<i){let c=s,a=1;for(;++c<o&&c<i&&l.has(t[c])&&l.get(t[c])===r+a;)a++;if(a>r-u){const o=t[s];for(;u<r;)e.insertBefore(n[u++],o)}else e.replaceChild(n[u++],t[s++])}else s++}else e.removeChild(t[s++])}}}var De={config:pe,currentContext:H,root:C,ignore:N,effect:O,memo:(e,t)=>t?j(e,void 0,y):j(e)};const Fe=new Set,{config:He={},root:ze,effect:Ie,memo:Ue,ignore:Ye,currentContext:Be,createComponent:qe}=De,Ve=qe||((e,t,n)=>{if(n)for(let e=0;e<n.length;e++)Le(t,n[e]);return Ye(()=>e(t))});function Xe(e,t){let n;return ze(r=>{n=r,rt(t,e())}),n}function Ze(e,t={}){return t={timeoutMs:3e4,...t},He.hydrate={id:"",count:0},ze(async()=>{const n=new Promise((e,n)=>setTimeout(()=>n("renderToString timed out"),t.timeoutMs));return wt(await Promise.race([e(),n]))})}function Je(e,t={}){t={timeoutMs:3e4,...t},He.hydrate={id:"",count:0};const n=document.createElement("div");return document.body.appendChild(n),ze(async r=>{const o=new Promise((e,n)=>setTimeout(()=>n("renderDOMToString timed out"),t.timeoutMs)),i=await Promise.race([e(),o]);ze(e=>(rt(n,i),r(),e()));const s=n.innerHTML;return document.body.removeChild(n),s})}function Ke(e,t){He.hydrate={id:"",count:0,registry:new Map};const n=t.querySelectorAll("*[_hk]");for(let e=0;e<n.length;e++){const t=n[e];He.hydrate.registry.set(t.getAttribute("_hk"),t)}const r=Xe(e,t);return delete He.hydrate,r}function We(e,t,n){const r=document.createElement("template");r.innerHTML=e,t&&r.innerHTML.split("<").length-1!==t&&console.warn(`Template html does not match input:\n${r.innerHTML}\n\n${e}`);let o=r.content.firstChild;return n&&(o=o.firstChild),o}function Ge(e){for(let t=0,n=e.length;t<n;t++){const n=e[t];Fe.has(n)||(Fe.add(n),document.addEventListener(n,gt))}}function Qe(){for(let e of Fe.keys())document.removeEventListener(e,gt);Fe.clear()}function et(e,t,n){const r=Object.keys(t);for(let o=0,i=r.length;o<i;o++){const i=r[o],s=!!t[i],u=i.split(/\s+/);if(i&&(!n||n[i]!==s))for(let t=0,n=u.length;t<n;t++)e.classList.toggle(u[t],s)}return t}function tt(e,t,n){const r=e.style;if("string"==typeof t)return r.cssText=t;let o,i;if(null!=n&&"string"!=typeof n){for(i in t)o=t[i],o!==n[i]&&r.setProperty(i,o);for(i in n)null==t[i]&&r.removeProperty(i)}else for(i in t)r.setProperty(i,t[i]);return t}function nt(e,t,n,r){"function"==typeof t?Ie(o=>mt(e,t(),o,n,r)):mt(e,t,void 0,n,r)}function rt(e,t,n,r){if(void 0===n||r||(r=[]),"function"!=typeof t)return bt(e,t,r,n);Ie(r=>bt(e,t(),r,n),r)}function ot(e,t,n,r,o={}){let i;for(const s in t){if("children"===s){r||bt(e,t.children);continue}const u=t[s];if(u!==o[s]){if("style"===s)tt(e,u,o[s]);else if("classList"===s)et(e,u,o[s]);else if("ref"===s)u(e);else if("on"===s)for(const t in u)e.addEventListener(t,u[t]);else if("onCapture"===s)for(const t in u)e.addEventListener(t,u[t],!0);else if("on"===s.slice(0,2)){const t=s.toLowerCase();if(Ne.has(t.slice(2)))e[t]=u;else{const n=t.slice(2);Array.isArray(u)?(e["__"+n]=u[0],e[`__${n}Data`]=u[1]):e["__"+n]=u,Ge([n])}}else(i=Me[s])?"attribute"===i.type?e.setAttribute(s,u):e[i.alias]=u:n||s.indexOf("-")>-1?(i=_e[s])?i.alias?e.setAttribute(i.alias,u):e.setAttribute(s,u):e.setAttribute(s.replace(/([A-Z])/g,e=>"-"+e[0].toLowerCase()),u):e[s]=u;o[s]=u}}}function it(e,...t){const n=[];for(let e=0;e<t.length;e++)"function"!=typeof t[e]||t[e].isTemplate?n.push(t[e]):n.push(Ue(()=>wt(t[e]())));const r=()=>e.reduce((e,t,r)=>{e+=t;const o=n[r];return void 0!==o&&(e+=wt(o)),e},"");return r.isTemplate=!0,r}function st(e){let t=Object.keys(e),n="";for(let r=0,o=t.length;r<o;r++){const o=t[r],i=!!e[o];o&&i&&(r&&(n+=" "),n+=o)}return n}function ut(e){if("string"==typeof e)return e;let t="";for(const n in e)t+=`${n}: ${e[n]};`;return t}function ct(e,t){return()=>{"function"==typeof e&&(e=e());const n=Object.keys(e);let r="";for(let o=0;o<n.length;o++){const i=n[o];if("children"===i)continue;const s=e[i];if("style"===i)r+=`style="${ut(s)}"`;else if("classList"===i)r+=`class="${st(s)}"`;else{r+=`${vt(i,t)}="${s}"`}o!==n.length-1&&(r+=" ")}return r}}const lt={'"':""","'":"'","&":"&","<":"<",">":">"};function at(e){return"string"!=typeof e?e:String(e).replace(/["'&<>]/g,e=>lt[e])}function ft(){const e=He.hydrate;return`${e.id}:${e.count++}`}function dt(e,t){const n=He.hydrate;let r,o;if(!n||!n.registry||!(r=n.registry.get(o=ft()))){const r=e.cloneNode(!0);return t&&n&&r.setAttribute("_hk",ft()),r}return window&&window._$HYDRATION&&window._$HYDRATION.completed.add(o),r}function pt(e){let t=e,n=0,r=[];if(He.hydrate&&He.hydrate.registry)for(;t;){if(8===t.nodeType){const e=t.nodeValue;if("#"===e)n++;else if("/"===e){if(0===n)return[t,r];n--}}r.push(t),t=t.nextSibling}return[t,r]}function ht(e){if(window&&window._$HYDRATION){const{completed:e,events:t}=window._$HYDRATION;for(;t.length;){const[n,r]=t[0];if(!e.has(n))return;gt(r),t.shift()}}}function yt(e){return`!function(){function t(t){const e=function t(e){return e&&(e.getAttribute("_hk")||t(e.host&&e.host instanceof Node?e.host:e.parentNode))}(t.composedPath&&t.composedPath()[0]||t.target);e&&!window._$HYDRATION.completed.has(e)&&window._$HYDRATION.events.push([e,t])}window._$HYDRATION={events:[],completed:new Set},["${e.join('","')}"].forEach(e=>document.addEventListener(e,t))}();`}function gt(e){const t="__"+e.type;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>n});null!==n;){const r=n[t];if(r){const o=n[t+"Data"];if(o?r(o,e):r(e),e.cancelBubble)return}n=n.host&&n.host instanceof Node?n.host:n.parentNode}}function mt(e,t,n={},r,o){return!o&&"children"in t&&Ie(()=>n.children=bt(e,t.children,n.children)),Ie(()=>ot(e,t,r,!0,n)),n}function bt(e,t,n,r,o){for(;"function"==typeof n;)n=n();if(t===n)return n;const i=typeof t,s=void 0!==r;if(e=s&&n[0]&&n[0].parentNode||e,"string"===i||"number"===i)if("number"===i&&(t=t.toString()),s){let o=n[0];o&&3===o.nodeType?o.data=t:o=document.createTextNode(t),n=Re(e,n,r,o)}else n=""!==n&&"string"==typeof n?e.firstChild.data=t:e.textContent=t;else if(null==t||"boolean"===i){if(He.hydrate&&He.hydrate.registry)return n;n=Re(e,n,r)}else{if("function"===i)return Ie(()=>n=bt(e,t(),n,r)),()=>n;if(Array.isArray(t)){const i=[];if(function e(t,n,r){let o=!1;for(let i=0,s=n.length;i<s;i++){let s,u=n[i];if(u instanceof Node)t.push(u);else if(null==u||!0===u||!1===u);else if(Array.isArray(u))o=e(t,u)||o;else if("string"==(s=typeof u))t.push(document.createTextNode(u));else if("function"===s)if(r){const n=u();o=e(t,Array.isArray(n)?n:[n])||o}else t.push(u),o=!0;else t.push(document.createTextNode(u.toString()))}return o}(i,t,o))return Ie(()=>n=bt(e,i,n,r,!0)),()=>n;if(He.hydrate&&He.hydrate.registry)return n;if(0===i.length){if(n=Re(e,n,r),s)return n}else Array.isArray(n)?0===n.length?Ee(e,i,r):$e(e,n,i):null==n||""===n?Ee(e,i):$e(e,s&&n||[e.firstChild],i);n=i}else if(t instanceof Node){if(Array.isArray(n)){if(s)return n=Re(e,n,r,t);Re(e,n,null,t)}else null==n||""===n?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function vt(e,t){if(t){const t=_e[e];t?t.alias&&(e=t.alias):e=e.replace(/([A-Z])/g,e=>"-"+e[0].toLowerCase())}else{const t=_e[e];t&&t.alias&&(e=t.alias),e=e.toLowerCase()}return e}function wt(e){return Array.isArray(e)?e.map(wt).join(""):("function"==typeof e&&(e=wt(e())),"string"==typeof e?e:JSON.stringify(e))}const At=D();function St(e){let t,n,r,o=0;const i=F(At);if(i){const[e,o]=T("running",y);t=o,[n,r]=i.register(e)}const s=[],u=Ve(At.Provider,{value:{register:e=>{const[t,n]=T(!1,y),[r,i]=T(!1,y);return s[o++]={state:e,showContent:n,showFallback:i},[t,r]}},children:()=>e.children},["children"]);return O(()=>{const o=e.revealOrder,i=e.tail,u=!n||n(),c=!r||r(),l="backwards"===o;if("together"===o){const e=s.every(e=>"running"===e.state());return t&&t(e?"running":"fallback"),void s.forEach(t=>{t.showContent(e&&u),t.showFallback(c)})}let a=!1;for(let e=0,n=s.length;e<n;e++){const r=l?n-e-1:e,o=s[r].state();if(a||"running"!==o&&"suspended"!==o){const e=!a;e&&t&&t("fallback"),!i||e&&"collapsed"===i?s[r].showFallback(c):s[r].showFallback(!1),a=!0,s[r].showContent(e)}else s[r].showContent(u),s[r].showFallback(c)}!a&&t&&t("running")}),u}function xt(e){let t,n,r,o,i=0;const[s,u]=T("running",y),c={increment:()=>{1==++i&&(c.initializing?u("fallback"):ge.transition?(!o&&(o=ge.transition).increment(),t=setTimeout(()=>u("fallback"),ge.transition.timeoutMs),u("suspended")):u("fallback"),ge.increment())},decrement:()=>{0==--i&&(t&&clearTimeout(t),o&&o.decrement(),o=void 0,u("running"),L(()=>ge.decrement()))},state:s,initializing:!0},l=F(At);return l&&([n,r]=l.register(c.state)),Ve(ge.Provider,{value:c,children:()=>{const t=N(()=>e.children);return()=>{const o=c.state(),i=!n||n(),s=!r||r();return c.initializing&&(c.initializing=!1),"running"===o&&i||"suspended"===o?t:s?e.fallback:void 0}}},["children"])}function kt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return Oe(j(ae(()=>e.each,e.children,t||void 0)))}function Ct(e){const t="fallback"in e,n=j(()=>!!e.when,void 0,y);return Oe(j(()=>n()?N(()=>e.children):t?N(()=>e.fallback):void 0))}function Tt(e){let t=e.children;Array.isArray(t)||(t=[t]);const n="fallback"in e,r=j(()=>{for(let e=0;e<t.length;e++)if(t[e].when)return e;return-1},void 0,y);return Oe(j(()=>{const o=r();return N(()=>o<0?n&&e.fallback:t[o].children)}))}function Ot(e){return e}function Pt(e){const{useShadow:t}=e,n=document.createElement("div"),r=document.createTextNode(""),o=e.mount||document.body,i=t&&n.attachShadow?n.attachShadow({mode:"open"}):n;return Object.defineProperty(n,"host",{get:()=>r.parentNode}),rt(i,N(()=>e.children)),o.appendChild(n),e.ref&&e.ref(n),E(()=>o.removeChild(n)),r}function jt(e){const[t,n]=T(e);return function(e){if(void 0===e)return t();n(e)}}function Mt(e){let t;return C(n=>{t=n,O(e)}),t}function _t(e,t,n){let r=e[t];return r||(Object.defineProperty(e,t,{value:r=jt(n)}),r)}function Nt(e,t,n){const r="v_"+t;let o,i,s,u,c=!1;if(n||(c=!0,n=Object.getOwnPropertyDescriptor(e,t)),n)if(n.get||n.set){if(o=n.get,i=n.set,!o||!i)return void console.warn("The `@reactive` decorator was used on an accessor named "+t+" which had a getter or a setter, but not both. Reactivity on accessors works only when accessors have both get and set.");delete n.get,delete n.set}else{if(s=n.value,u=n.writable,!u)return void console.warn("The `@reactive` decorator was used on a property named "+t+" that is not writable. Reactivity is not enabled for non-writable properties.");delete n.value,delete n.writable}if(n={...n,get(){const e=_t(this,r,s);return o?(e(),o.call(this)):e()},set(e){const t=_t(this,r,s);i&&i.call(this,e),t(e)}},!c)return n;Object.defineProperty(e,t,n)}n.d(t,"variable",(function(){return jt})),n.d(t,"autorun",(function(){return Mt})),n.d(t,"reactive",(function(){return Nt})),n.d(t,"version",(function(){return Lt})),n.d(t,"$RAW",(function(){return K})),n.d(t,"SuspenseContext",(function(){return ge})),n.d(t,"afterEffects",(function(){return L})),n.d(t,"awaitSuspense",(function(){return we})),n.d(t,"cancelCallback",(function(){return p})),n.d(t,"cloneProps",(function(){return de})),n.d(t,"createContext",(function(){return D})),n.d(t,"createDeferred",(function(){return M})),n.d(t,"createDependentEffect",(function(){return P})),n.d(t,"createEffect",(function(){return O})),n.d(t,"createMemo",(function(){return j})),n.d(t,"createResource",(function(){return Ae})),n.d(t,"createResourceState",(function(){return ke})),n.d(t,"createRoot",(function(){return C})),n.d(t,"createSignal",(function(){return T})),n.d(t,"createState",(function(){return ue})),n.d(t,"equalFn",(function(){return y})),n.d(t,"freeze",(function(){return _})),n.d(t,"getContextOwner",(function(){return H})),n.d(t,"isListening",(function(){return $})),n.d(t,"lazy",(function(){return Ce})),n.d(t,"mapArray",(function(){return ae})),n.d(t,"onCleanup",(function(){return E})),n.d(t,"onError",(function(){return R})),n.d(t,"reconcile",(function(){return ce})),n.d(t,"requestCallback",(function(){return d})),n.d(t,"runtimeConfig",(function(){return pe})),n.d(t,"sample",(function(){return N})),n.d(t,"setDefaults",(function(){return fe})),n.d(t,"suspend",(function(){return Oe})),n.d(t,"unwrap",(function(){return te})),n.d(t,"useContext",(function(){return F})),n.d(t,"useTransition",(function(){return Te})),n.d(t,"For",(function(){return kt})),n.d(t,"Match",(function(){return Ot})),n.d(t,"Portal",(function(){return Pt})),n.d(t,"Show",(function(){return Ct})),n.d(t,"Suspense",(function(){return xt})),n.d(t,"SuspenseList",(function(){return St})),n.d(t,"Switch",(function(){return Tt})),n.d(t,"assign",(function(){return ot})),n.d(t,"classList",(function(){return et})),n.d(t,"clearDelegatedEvents",(function(){return Qe})),n.d(t,"createComponent",(function(){return Ve})),n.d(t,"currentContext",(function(){return Be})),n.d(t,"delegateEvents",(function(){return Ge})),n.d(t,"effect",(function(){return Ie})),n.d(t,"escape",(function(){return at})),n.d(t,"generateHydrationEventsScript",(function(){return yt})),n.d(t,"getHydrationKey",(function(){return ft})),n.d(t,"getNextElement",(function(){return dt})),n.d(t,"getNextMarker",(function(){return pt})),n.d(t,"hydrate",(function(){return Ke})),n.d(t,"insert",(function(){return rt})),n.d(t,"memo",(function(){return Ue})),n.d(t,"render",(function(){return Xe})),n.d(t,"renderDOMToString",(function(){return Je})),n.d(t,"renderToString",(function(){return Ze})),n.d(t,"runHydrationEvents",(function(){return ht})),n.d(t,"spread",(function(){return nt})),n.d(t,"ssr",(function(){return it})),n.d(t,"ssrClassList",(function(){return st})),n.d(t,"ssrSpread",(function(){return ct})),n.d(t,"ssrStyle",(function(){return ut})),n.d(t,"style",(function(){return tt})),n.d(t,"template",(function(){return We}));const Lt="0.0.6"}]); | ||
var variable=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);let r=1,o=!1,i=!1,s=[],u=null,c=null,l=0,a=null,f=null;function d(e,t){a||function(){if(window&&window.MessageChannel){const e=new MessageChannel,t=e.port2;a=()=>t.postMessage(null),e.port1.onmessage=()=>{if(null!==f){const e=performance.now();l=e+5;const n=!0;try{f(n,e)?t.postMessage(null):f=null}catch(e){throw t.postMessage(null),e}}}}else{let e;a=()=>{e||(e=f,setTimeout(()=>{const t=performance.now();l=t+5;const n=e(!0,t);e=null,n&&a()},0))}}if(navigator&&navigator.scheduling&&navigator.scheduling.isInputPending){const e=navigator.scheduling;c=()=>{const t=performance.now();return t>=l&&(!!e.isInputPending()||t>=300)}}else c=()=>performance.now()>=l}();let n=performance.now(),u=1073741823;t&&t.timeout&&(u=t.timeout);const d={id:r++,fn:e,startTime:n,expirationTime:n+u};return function(e,t){e.splice(function(){let n=0,r=e.length-1;for(;n<=r;){let o=r+n>>1,i=t.expirationTime-e[o].expirationTime;if(i>0)n=o+1;else{if(!(i<0))return o;r=o-1}}return n}(),0,t)}(s,d),o||i||(o=!0,f=h,a()),d}function p(e){e.fn=null}function h(e,t){o=!1,i=!0;try{return function(e,t){let n=t;u=s[0]||null;for(;null!==u&&(!(u.expirationTime>n)||e&&!c());){const e=u.fn;if(null!==e){u.fn=null;const t=u.expirationTime<=n;e(t),n=performance.now(),u===s[0]&&s.shift()}else s.shift();u=s[0]||null}return null!==u}(e,t)}finally{u=null,i=!1}}const y=(e,t)=>e===t,g=Symbol("error"),m={},b={owned:null,cleanups:null,context:null,owner:null};let v=null,w=null,A=null,S=null,x=[],k=0;function C(e,t){t&&(v=t);const n=w,r=v,o=0===e.length?b:{owned:null,cleanups:null,context:null,owner:r};let i;v=o,w=null;try{i=e(()=>X(o))}catch(e){const t=Z(v,g);if(!t)throw e;t.forEach(t=>t(e))}finally{for(;x.length;)x.shift()();w=n,v=r}return i}function T(e,t){const n={value:e,observers:null,observerSlots:null,pending:m,comparator:t};return[z.bind(n),I.bind(n)]}function O(e,t){U(Y(e,t))}function P(e,t,n){const r=Array.isArray(t)?(o=t,()=>{for(let e=0;e<o.length;e++)o[e]()}):t;var o;n=!!n,O(t=>{const o=w;return r(),n?n=!1:(w=null,t=e(t),w=o),t})}function j(e,t,n){const r=Y(e,t);return r.pending=m,r.observers=null,r.observerSlots=null,r.comparator=n,U(r),z.bind(r)}function M(e,t){let n,r=t?t.timeoutMs:void 0;const[o,i]=T(e());return O(()=>{e(),n&&n.fn||(n=d(()=>i(e()),void 0!==r?{timeout:r}:void 0))}),o}function _(e){let t=A,n=A=[];const r=e();return A=t,q(()=>{for(let e=0;e<n.length;e+=1){const t=n[e];if(t.pending!==m){const e=t.pending;t.pending=m,I.call(t,e)}}}),r}function N(e){let t,n=w;return w=null,t=e(),w=n,t}function L(e){x.push(e)}function E(e){return null===v?console.warn("cleanups created outside a `createRoot` or `render` will never be run"):null===v.cleanups?v.cleanups=[e]:v.cleanups.push(e),e}function R(e){null===v?console.warn("error handlers created outside a `createRoot` or `render` will never be run"):null===v.context?v.context={[g]:[e]}:v.context[g]?v.context[g].push(e):v.context[g]=[e]}function $(){return null!==w}function D(e){const t=Symbol("context");return{id:t,Provider:J(t),defaultValue:e}}function F(e){return Z(v,e.id)||e.defaultValue}function H(){return v}function z(){if(this.state&&this.sources){const e=S;S=null,1===this.state?U(this):function e(t){t.state=0;for(let n=0;n<t.sources.length;n+=1){const r=t.sources[n];r.sources&&(1===r.state?B(r):2===r.state&&e(r))}}(this),S=e}if(w){const e=this.observers?this.observers.length:0;w.sources?(w.sources.push(this),w.sourceSlots.push(e)):(w.sources=[this],w.sourceSlots=[e]),this.observers?(this.observers.push(w),this.observerSlots.push(w.sources.length-1)):(this.observers=[w],this.observerSlots=[w.sources.length-1])}return this.value}function I(e){if(!this.comparator||!this.comparator(this.value,e)){if(A)return this.pending===m&&A.push(this),void(this.pending=e);this.value=e,!this.observers||S&&!this.observers.length||q(()=>{for(let e=0;e<this.observers.length;e+=1){const t=this.observers[e];if(t.observers&&2!==t.state&&V(t),t.state=1,S.length>1e6)throw new Error("Potential Infinite Loop Detected.");S.push(t)}})}}function U(e){if(!e.fn)return;X(e);const t=v,n=w,r=k;w=v=e;const o=e.fn(e.value);(!e.updatedAt||e.updatedAt<=r)&&(e.observers&&e.observers.length?I.call(e,o):e.value=o,e.updatedAt=r),w=n,v=t}function Y(e,t){const n={fn:e,state:0,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:v,context:null};return null===v?console.warn("computations created outside a `createRoot` or `render` will never be disposed"):v!==b&&(v.owned?v.owned.push(n):v.owned=[n]),n}function B(e){let t=1===e.state&&e;for(;e.fn&&(e=e.owner);)1===e.state&&(t=e);t&&U(t)}function q(e){if(S)return e();S=[],k++;try{e();for(let e=0;e<S.length;e+=1)try{B(S[e])}catch(e){const t=Z(v,g);if(!t)throw e;t.forEach(t=>t(e))}}finally{for(S=null;x.length;)x.shift()()}}function V(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=2,n.observers&&V(n))}}function X(e){let t;if(e.sources){for(;e.sources.length;){const t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){const e=r.pop(),o=t.observerSlots.pop();n<r.length&&(e.sourceSlots[o]=n,r[n]=e,t.observerSlots[n]=o)}}e.state=0}if(e.owned){for(t=0;t<e.owned.length;t++)X(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}}function Z(e,t){return e&&(e.context&&e.context[t]||e.owner&&Z(e.owner,t))}function J(e){return function(t){let n;return O(()=>{v.context={[e]:t.value},n=N(()=>function e(t){if("function"==typeof t)return j(()=>e(t()));if(Array.isArray(t)){const n=[];for(let r=0;r<t.length;r++){let o=e(t[r]);Array.isArray(o)?n.push.apply(n,o):n.push(o)}return n}return t}(t.children))}),n}}const K=Symbol("state-raw"),W=Symbol("state-node"),G=Symbol("state-proxy");function Q(e,t){return e[G]||(e[G]=new Proxy(e,t||re))}function ee(e){return null!=e&&"object"==typeof e&&(e.__proto__===Object.prototype||Array.isArray(e))}function te(e){let t,n,r;if(t=null!=e&&e[K])return t;if(!ee(e))return e;if(Array.isArray(e)){Object.isFrozen(e)&&(e=e.slice(0));for(let t=0,o=e.length;t<o;t++)r=e[t],(n=te(r))!==r&&(e[t]=n)}else{Object.isFrozen(e)&&(e=Object.assign({},e));let t=Object.keys(e);for(let o=0,i=t.length;o<i;o++)r=e[t[o]],(n=te(r))!==r&&(e[t[o]]=n)}return e}function ne(e){let t=e[W];return t||(e[W]=t={}),t}const re={get(e,t){if(t===K)return e;if(t===G||t===W)return;const n=e[t],r=ee(n);if($()&&("function"!=typeof n||e.hasOwnProperty(t))){let o,i;r&&(o=ne(n))&&(i=o._||(o._=T()),i[0]()),o=ne(e),i=o[t]||(o[t]=T()),i[0]()}return r?Q(n):n},set:()=>!0,deleteProperty:()=>!0},oe={get(e,t){if(t===K)return e;const n=e[t];return ee(n)?new Proxy(n,oe):n},set:(e,t,n)=>(ie(e,t,te(n)),!0),deleteProperty:(e,t)=>(ie(e,t,void 0),!0)};function ie(e,t,n,r){if(!r&&e[t]===n)return;const o=Array.isArray(e)||!(t in e);void 0===n?delete e[t]:e[t]=n;let i,s=ne(e);(i=s[t])&&i[1](),o&&(i=s._)&&i[1]()}function se(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();const i=typeof r,s=Array.isArray(e);if(Array.isArray(r)){for(let o=0;o<r.length;o++)se(e,[r[o]].concat(t),[r[o]].concat(n));return}if(s&&"function"===i){for(let o=0;o<e.length;o++)r(e[o],o)&&se(e,[o].concat(t),[o].concat(n));return}if(s&&"object"===i){const{from:o=0,to:i=e.length-1,by:s=1}=r;for(let r=o;r<=i;r+=s)se(e,[r].concat(t),[r].concat(n));return}if(t.length>1)return void se(e[r],t,[r].concat(n));o=e[r],n=[r].concat(n)}let i=t[0];if("function"==typeof i){const e=void 0===r||ee(o)?new Proxy(o,oe):o;if(i=i(e,n),i===e||void 0===i)return}i=te(i),void 0===r||ee(o)&&ee(i)&&!Array.isArray(i)?function(e,t,n){const r=Object.keys(t);for(let o=0;o<r.length;o+=1){const i=r[o];ie(e,i,t[i],n)}}(o,i):ie(e,r,i)}function ue(e){const t=te(e||{});return[Q(t),function(...e){_(()=>se(t,e))}]}function ce(e,t={}){const{merge:n,key:r="id"}=t;return t=>{if(!ee(t=te(t)))return e;!function e(t,n,r,o,i){let s=n[r];if(t===s)return;if(!ee(t)||!ee(s)||i&&t[i]!==s[i])return void(t!==s&&ie(n,r,t));if(Array.isArray(t)){if(t.length&&s.length&&(!o||i&&null!=t[0][i])){let n,r,u,c,l,a,f,d;for(u=0,c=Math.min(s.length,t.length);u<c&&(s[u]===t[u]||i&&s[u][i]===t[u][i]);u++)e(t[u],s,u,o,i);const p=new Array(t.length),h=new Map;for(c=s.length-1,l=t.length-1;c>=u&&l>=u&&(s[c]===t[l]||i&&s[c][i]===t[l][i]);c--,l--)p[l]=s[c];if(u>l||u>c){for(r=u;r<=l;r++)ie(s,r,t[r]);for(;r<t.length;r++)ie(s,r,p[r]),e(t[r],s,r,o,i);return void(s.length>t.length&&ie(s,"length",t.length))}for(f=new Array(l+1),r=l;r>=u;r--)a=t[r],d=i?a[i]:a,n=h.get(d),f[r]=void 0===n?-1:n,h.set(d,r);for(n=u;n<=c;n++)a=s[n],d=i?a[i]:a,r=h.get(d),void 0!==r&&-1!==r&&(p[r]=s[n],r=f[r],h.set(d,r));for(r=u;r<t.length;r++)r in p?(ie(s,r,p[r]),e(t[r],s,r,o,i)):ie(s,r,t[r])}else for(let n=0,r=t.length;n<r;n++)e(t[n],s,n,o,i);return void(s.length>t.length&&ie(s,"length",t.length))}const u=Object.keys(t);for(let n=0,r=u.length;n<r;n++)e(t[u[n]],s,u[n],o,i);const c=Object.keys(s);for(let e=0,n=c.length;e<n;e++)void 0===t[c[e]]&&ie(s,c[e],void 0)}(e,{state:t},"state",n,r)}}const le=Symbol("fallback");function ae(e,t,n){return"function"!=typeof t?(n=t||{},t=e,r):(n||(n={}),r(e));function r(e){let r=[],o=[],i=[],s=0;return E(()=>{for(let e=0,t=i.length;e<t;e++)i[e]()}),()=>{let u,c,l=e()||[];return N(()=>{let e,t,f,d,p,h,y,g,m=l.length;if(0===m){if(0!==s){for(u=0;u<s;u++)i[u]();i=[],r=[],o=[],s=0}n.fallback&&(r=[le],o[0]=C(e=>(i[0]=e,n.fallback())),s=1)}else if(0===s){for(c=0;c<m;c++)r[c]=l[c],o[c]=C(a);s=m}else{for(f=new Array(m),d=new Array(m),p=0,h=Math.min(s,m);p<h&&r[p]===l[p];p++);for(h=s-1,y=m-1;h>=p&&y>=p&&r[h]===l[y];h--,y--)f[y]=o[h],d[y]=i[h];if(p>y){for(c=h;p<=c;c--)i[c]();const e=h-p+1;return e>0&&(o.splice(p,e),i.splice(p,e)),r=l.slice(0),s=m,o}if(p>h){for(c=p;c<=y;c++)o[c]=C(a);for(;c<m;c++)o[c]=f[c],i[c]=d[c];return r=l.slice(0),s=m,o}for(e=new Map,t=new Array(y+1),c=y;c>=p;c--)g=l[c],u=e.get(g),t[c]=void 0===u?-1:u,e.set(g,c);for(u=p;u<=h;u++)g=r[u],c=e.get(g),void 0!==c&&-1!==c?(f[c]=o[u],d[c]=i[u],c=t[c],e.set(g,c)):i[u]();for(c=p;c<m;c++)c in f?(o[c]=f[c],i[c]=d[c]):o[c]=C(a);s=o.length=m,r=l.slice(0)}return o});function a(e){return i[c]=e,t(l[c],c)}}}}function fe(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r++){const o=n[r];!(o in e)&&(e[o]=t[o])}}function de(e){const t={},n=Object.getOwnPropertyDescriptors(e);return Object.defineProperties(t,n),t}const pe={};function he(e){pe.hydrate=e}function ye(){let e=0;const[t,n]=T(!1);return[t,()=>0==e++&&n(!0),()=>--e<=0&&n(!1)]}const ge=D({}),[me,be,ve]=ye();function we(e){return new Promise(t=>{const n=e();O(()=>!ge.active()&&t(n))})}function Ae(e){const[t,n]=T(e),[r,o]=T(),[i,s]=T(),u=new Set;let c,l=!1,a=null;function f(e){c=void 0,_(()=>{n(e),l&&(l=!1,s());for(let e of u.keys())e.decrement();u.clear()})}return[function(){const e=F(ge),n=t();if(a)throw a;return r(),c&&e.increment&&!u.has(e)&&(e.increment(),u.add(e)),n},function(e){return a=null,null!=e&&"object"==typeof e&&"then"in e?(c=e,l||(l=!0,_(()=>{s(),o()})),e.then(t=>{c===e&&f(t)},t=>{c===e&&(a=t,f(void 0))})):(c=void 0,f(e)),()=>(i(),l)}]}function Se(e){const t=T(),[n,r]=Ae(e);return[()=>(n(),t[0]()),t[1],r]}ge.active=me,ge.increment=be,ge.decrement=ve;const xe={get(e,t){if(t===K)return e;if(t===G||t===W)return;const n=e[t],r=ee(n);if($()&&("function"!=typeof n||e.hasOwnProperty(t))){let o,i;r&&(o=ne(n))&&(i=o._||(o._=T()),i[0]()),o=ne(e),i=o[t]||(o[t]=Se(n)),i[0]()}return r?Q(n):n},set:()=>!0,deleteProperty:()=>!0};function ke(e){const t=te(e||{}),n=Q(t,xe),r={};function o(...e){_(()=>se(t,e))}return[n,function(e,n){const i=ne(t),s=Object.keys(e);for(let u=0;u<s.length;u++){const c=s[u],l=e[c],a=e=>(n?o(c,n(e)):ie(t,c,e),e),f=(i[c]||(i[c]=Se(t[c])))[2](l&&"object"==typeof l&&"then"in l?l.then(a):a(l));!(c in r)&&Object.defineProperty(r,c,{get:()=>f()})}return r},o]}function Ce(e){return t=>{const n=pe.hydrate&&pe.hydrate.registry,r=pe.hydrate?{id:`${pe.hydrate.id}.${pe.hydrate.count++}`,count:0,registry:pe.hydrate.registry}:void 0;let o,i,s,u;return n?([o,i]=T(),e().then(e=>i(e.default))):([o,s]=Ae(),s(e().then(e=>e.default))),j(()=>(u=o())&&N(()=>{if(!r)return u(t);const e=pe.hydrate;he(r);const n=u(t);return!e&&he(),n}))}}function Te(e){const[t,n,r]=ye();return[t,t=>{const o=ge.transition;ge.transition={timeoutMs:e.timeoutMs,increment:n,decrement:r},n(),t(),r(),L(()=>ge.transition=o)}]}function Oe(e){const{state:t}=F(ge);let n;return t?()=>"suspended"===t()?n:n=e():e}const Pe="attribute",je="property",Me={href:{type:Pe},style:{type:je,alias:"style.cssText"},for:{type:je,alias:"htmlFor"},class:{type:je,alias:"className"},spellCheck:{type:je,alias:"spellcheck"},allowFullScreen:{type:je,alias:"allowFullscreen"},autoCapitalize:{type:je,alias:"autocapitalize"},autoFocus:{type:je,alias:"autofocus"},autoPlay:{type:je,alias:"autoplay"}},_e={className:{type:Pe,alias:"class"},htmlFor:{type:Pe,alias:"for"},tabIndex:{type:Pe,alias:"tabindex"},allowReorder:{type:Pe},attributeName:{type:Pe},attributeType:{type:Pe},autoReverse:{type:Pe},baseFrequency:{type:Pe},calcMode:{type:Pe},clipPathUnits:{type:Pe},contentScriptType:{type:Pe},contentStyleType:{type:Pe},diffuseConstant:{type:Pe},edgeMode:{type:Pe},externalResourcesRequired:{type:Pe},filterRes:{type:Pe},filterUnits:{type:Pe},gradientTransform:{type:Pe},gradientUnits:{type:Pe},kernelMatrix:{type:Pe},kernelUnitLength:{type:Pe},keyPoints:{type:Pe},keySplines:{type:Pe},keyTimes:{type:Pe},lengthAdjust:{type:Pe},limitingConeAngle:{type:Pe},markerHeight:{type:Pe},markerUnits:{type:Pe},maskContentUnits:{type:Pe},maskUnits:{type:Pe},numOctaves:{type:Pe},pathLength:{type:Pe},patternContentUnits:{type:Pe},patternTransform:{type:Pe},patternUnits:{type:Pe},pointsAtX:{type:Pe},pointsAtY:{type:Pe},pointsAtZ:{type:Pe},preserveAlpha:{type:Pe},preserveAspectRatio:{type:Pe},primitiveUnits:{type:Pe},refX:{type:Pe},refY:{type:Pe},repeatCount:{type:Pe},repeatDur:{type:Pe},requiredExtensions:{type:Pe},requiredFeatures:{type:Pe},specularConstant:{type:Pe},specularExponent:{type:Pe},spreadMethod:{type:Pe},startOffset:{type:Pe},stdDeviation:{type:Pe},stitchTiles:{type:Pe},surfaceScale:{type:Pe},systemLanguage:{type:Pe},tableValues:{type:Pe},targetX:{type:Pe},targetY:{type:Pe},textLength:{type:Pe},viewBox:{type:Pe},viewTarget:{type:Pe},xChannelSelector:{type:Pe},yChannelSelector:{type:Pe},zoomAndPan:{type:Pe}},Ne=new Set(["abort","animationstart","animationend","animationiteration","blur","change","copy","cut","error","focus","gotpointercapture","load","loadend","loadstart","lostpointercapture","mouseenter","mouseleave","paste","progress","reset","scroll","select","submit","transitionstart","transitioncancel","transitionend","transitionrun"]);function Le(e,t){const n=e[t];Object.defineProperty(e,t,{get:()=>n(),enumerable:!0})}function Ee(e,t,n){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function Re(e,t,n,r){if(void 0===n)return e.textContent="";const o=r||document.createTextNode("");if(t.length){o!==t[0]&&e.replaceChild(o,t[0]);for(let n=t.length-1;n>0;n--)e.removeChild(t[n])}else e.insertBefore(o,n);return[o]}function $e(e,t,n){let r=n.length,o=t.length,i=r,s=0,u=0,c=t[o-1].nextSibling,l=null;for(;s<o||u<i;)if(o===s){const t=i<r?u?n[u-1].nextSibling:n[i-u]:c;for(;u<i;)e.insertBefore(n[u++],t)}else if(i===u)for(;s<o;)l&&l.has(t[s])||e.removeChild(t[s]),s++;else if(t[s]===n[u])s++,u++;else if(t[o-1]===n[i-1])o--,i--;else{if(o-s==1&&i-u==1){l&&l.has(t[s])?e.insertBefore(n[u],i<r?n[i]:c):e.replaceChild(n[u],t[s]);break}if(t[s]===n[i-1]&&n[u]===t[o-1]){const r=t[--o].nextSibling;e.insertBefore(n[u++],t[s++].nextSibling),e.insertBefore(n[--i],r),t[o]=n[i]}else{if(!l){l=new Map;let e=u;for(;e<i;)l.set(n[e],e++)}if(l.has(t[s])){const r=l.get(t[s]);if(u<r&&r<i){let c=s,a=1;for(;++c<o&&c<i&&l.has(t[c])&&l.get(t[c])===r+a;)a++;if(a>r-u){const o=t[s];for(;u<r;)e.insertBefore(n[u++],o)}else e.replaceChild(n[u++],t[s++])}else s++}else e.removeChild(t[s++])}}}var De={config:pe,currentContext:H,root:C,ignore:N,effect:O,memo:(e,t)=>t?j(e,void 0,y):j(e)};const Fe=new Set,{config:He={},root:ze,effect:Ie,memo:Ue,ignore:Ye,currentContext:Be,createComponent:qe}=De,Ve=qe||((e,t,n)=>{if(n)for(let e=0;e<n.length;e++)Le(t,n[e]);return Ye(()=>e(t))});function Xe(e,t){let n;return ze(r=>{n=r,rt(t,e())}),n}function Ze(e,t={}){return t={timeoutMs:3e4,...t},He.hydrate={id:"",count:0},ze(async()=>{const n=new Promise((e,n)=>setTimeout(()=>n("renderToString timed out"),t.timeoutMs));return wt(await Promise.race([e(),n]))})}function Je(e,t={}){t={timeoutMs:3e4,...t},He.hydrate={id:"",count:0};const n=document.createElement("div");return document.body.appendChild(n),ze(async r=>{const o=new Promise((e,n)=>setTimeout(()=>n("renderDOMToString timed out"),t.timeoutMs)),i=await Promise.race([e(),o]);ze(e=>(rt(n,i),r(),e()));const s=n.innerHTML;return document.body.removeChild(n),s})}function Ke(e,t){He.hydrate={id:"",count:0,registry:new Map};const n=t.querySelectorAll("*[_hk]");for(let e=0;e<n.length;e++){const t=n[e];He.hydrate.registry.set(t.getAttribute("_hk"),t)}const r=Xe(e,t);return delete He.hydrate,r}function We(e,t,n){const r=document.createElement("template");r.innerHTML=e,t&&r.innerHTML.split("<").length-1!==t&&console.warn(`Template html does not match input:\n${r.innerHTML}\n\n${e}`);let o=r.content.firstChild;return n&&(o=o.firstChild),o}function Ge(e){for(let t=0,n=e.length;t<n;t++){const n=e[t];Fe.has(n)||(Fe.add(n),document.addEventListener(n,gt))}}function Qe(){for(let e of Fe.keys())document.removeEventListener(e,gt);Fe.clear()}function et(e,t,n){const r=Object.keys(t);for(let o=0,i=r.length;o<i;o++){const i=r[o],s=!!t[i],u=i.split(/\s+/);if(i&&(!n||n[i]!==s))for(let t=0,n=u.length;t<n;t++)e.classList.toggle(u[t],s)}return t}function tt(e,t,n){const r=e.style;if("string"==typeof t)return r.cssText=t;let o,i;if(null!=n&&"string"!=typeof n){for(i in t)o=t[i],o!==n[i]&&r.setProperty(i,o);for(i in n)null==t[i]&&r.removeProperty(i)}else for(i in t)r.setProperty(i,t[i]);return t}function nt(e,t,n,r){"function"==typeof t?Ie(o=>mt(e,t(),o,n,r)):mt(e,t,void 0,n,r)}function rt(e,t,n,r){if(void 0===n||r||(r=[]),"function"!=typeof t)return bt(e,t,r,n);Ie(r=>bt(e,t(),r,n),r)}function ot(e,t,n,r,o={}){let i;for(const s in t){if("children"===s){r||bt(e,t.children);continue}const u=t[s];if(u!==o[s]){if("style"===s)tt(e,u,o[s]);else if("classList"===s)et(e,u,o[s]);else if("ref"===s)u(e);else if("on"===s)for(const t in u)e.addEventListener(t,u[t]);else if("onCapture"===s)for(const t in u)e.addEventListener(t,u[t],!0);else if("on"===s.slice(0,2)){const t=s.toLowerCase();if(Ne.has(t.slice(2)))e[t]=u;else{const n=t.slice(2);Array.isArray(u)?(e["__"+n]=u[0],e[`__${n}Data`]=u[1]):e["__"+n]=u,Ge([n])}}else(i=Me[s])?"attribute"===i.type?e.setAttribute(s,u):e[i.alias]=u:n||s.indexOf("-")>-1?(i=_e[s])?i.alias?e.setAttribute(i.alias,u):e.setAttribute(s,u):e.setAttribute(s.replace(/([A-Z])/g,e=>"-"+e[0].toLowerCase()),u):e[s]=u;o[s]=u}}}function it(e,...t){const n=[];for(let e=0;e<t.length;e++)"function"!=typeof t[e]||t[e].isTemplate?n.push(t[e]):n.push(Ue(()=>wt(t[e]())));const r=()=>e.reduce((e,t,r)=>{e+=t;const o=n[r];return void 0!==o&&(e+=wt(o)),e},"");return r.isTemplate=!0,r}function st(e){let t=Object.keys(e),n="";for(let r=0,o=t.length;r<o;r++){const o=t[r],i=!!e[o];o&&i&&(r&&(n+=" "),n+=o)}return n}function ut(e){if("string"==typeof e)return e;let t="";for(const n in e)t+=`${n}: ${e[n]};`;return t}function ct(e,t){return()=>{"function"==typeof e&&(e=e());const n=Object.keys(e);let r="";for(let o=0;o<n.length;o++){const i=n[o];if("children"===i)continue;const s=e[i];if("style"===i)r+=`style="${ut(s)}"`;else if("classList"===i)r+=`class="${st(s)}"`;else{r+=`${vt(i,t)}="${s}"`}o!==n.length-1&&(r+=" ")}return r}}const lt={'"':""","'":"'","&":"&","<":"<",">":">"};function at(e){return"string"!=typeof e?e:String(e).replace(/["'&<>]/g,e=>lt[e])}function ft(){const e=He.hydrate;return`${e.id}:${e.count++}`}function dt(e,t){const n=He.hydrate;let r,o;if(!n||!n.registry||!(r=n.registry.get(o=ft()))){const r=e.cloneNode(!0);return t&&n&&r.setAttribute("_hk",ft()),r}return window&&window._$HYDRATION&&window._$HYDRATION.completed.add(o),r}function pt(e){let t=e,n=0,r=[];if(He.hydrate&&He.hydrate.registry)for(;t;){if(8===t.nodeType){const e=t.nodeValue;if("#"===e)n++;else if("/"===e){if(0===n)return[t,r];n--}}r.push(t),t=t.nextSibling}return[t,r]}function ht(e){if(window&&window._$HYDRATION){const{completed:e,events:t}=window._$HYDRATION;for(;t.length;){const[n,r]=t[0];if(!e.has(n))return;gt(r),t.shift()}}}function yt(e){return`!function(){function t(t){const e=function t(e){return e&&(e.getAttribute("_hk")||t(e.host&&e.host instanceof Node?e.host:e.parentNode))}(t.composedPath&&t.composedPath()[0]||t.target);e&&!window._$HYDRATION.completed.has(e)&&window._$HYDRATION.events.push([e,t])}window._$HYDRATION={events:[],completed:new Set},["${e.join('","')}"].forEach(e=>document.addEventListener(e,t))}();`}function gt(e){const t="__"+e.type;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>n});null!==n;){const r=n[t];if(r){const o=n[t+"Data"];if(o?r(o,e):r(e),e.cancelBubble)return}n=n.host&&n.host instanceof Node?n.host:n.parentNode}}function mt(e,t,n={},r,o){return!o&&"children"in t&&Ie(()=>n.children=bt(e,t.children,n.children)),Ie(()=>ot(e,t,r,!0,n)),n}function bt(e,t,n,r,o){for(;"function"==typeof n;)n=n();if(t===n)return n;const i=typeof t,s=void 0!==r;if(e=s&&n[0]&&n[0].parentNode||e,"string"===i||"number"===i)if("number"===i&&(t=t.toString()),s){let o=n[0];o&&3===o.nodeType?o.data=t:o=document.createTextNode(t),n=Re(e,n,r,o)}else n=""!==n&&"string"==typeof n?e.firstChild.data=t:e.textContent=t;else if(null==t||"boolean"===i){if(He.hydrate&&He.hydrate.registry)return n;n=Re(e,n,r)}else{if("function"===i)return Ie(()=>n=bt(e,t(),n,r)),()=>n;if(Array.isArray(t)){const i=[];if(function e(t,n,r){let o=!1;for(let i=0,s=n.length;i<s;i++){let s,u=n[i];if(u instanceof Node)t.push(u);else if(null==u||!0===u||!1===u);else if(Array.isArray(u))o=e(t,u)||o;else if("string"==(s=typeof u))t.push(document.createTextNode(u));else if("function"===s)if(r){const n=u();o=e(t,Array.isArray(n)?n:[n])||o}else t.push(u),o=!0;else t.push(document.createTextNode(u.toString()))}return o}(i,t,o))return Ie(()=>n=bt(e,i,n,r,!0)),()=>n;if(He.hydrate&&He.hydrate.registry)return n;if(0===i.length){if(n=Re(e,n,r),s)return n}else Array.isArray(n)?0===n.length?Ee(e,i,r):$e(e,n,i):null==n||""===n?Ee(e,i):$e(e,s&&n||[e.firstChild],i);n=i}else if(t instanceof Node){if(Array.isArray(n)){if(s)return n=Re(e,n,r,t);Re(e,n,null,t)}else null==n||""===n?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function vt(e,t){if(t){const t=_e[e];t?t.alias&&(e=t.alias):e=e.replace(/([A-Z])/g,e=>"-"+e[0].toLowerCase())}else{const t=_e[e];t&&t.alias&&(e=t.alias),e=e.toLowerCase()}return e}function wt(e){return Array.isArray(e)?e.map(wt).join(""):("function"==typeof e&&(e=wt(e())),"string"==typeof e?e:JSON.stringify(e))}const At=D();function St(e){let t,n,r,o=0;const i=F(At);if(i){const[e,o]=T("running",y);t=o,[n,r]=i.register(e)}const s=[],u=Ve(At.Provider,{value:{register:e=>{const[t,n]=T(!1,y),[r,i]=T(!1,y);return s[o++]={state:e,showContent:n,showFallback:i},[t,r]}},children:()=>e.children},["children"]);return O(()=>{const o=e.revealOrder,i=e.tail,u=!n||n(),c=!r||r(),l="backwards"===o;if("together"===o){const e=s.every(e=>"running"===e.state());return t&&t(e?"running":"fallback"),void s.forEach(t=>{t.showContent(e&&u),t.showFallback(c)})}let a=!1;for(let e=0,n=s.length;e<n;e++){const r=l?n-e-1:e,o=s[r].state();if(a||"running"!==o&&"suspended"!==o){const e=!a;e&&t&&t("fallback"),!i||e&&"collapsed"===i?s[r].showFallback(c):s[r].showFallback(!1),a=!0,s[r].showContent(e)}else s[r].showContent(u),s[r].showFallback(c)}!a&&t&&t("running")}),u}function xt(e){let t,n,r,o,i=0;const[s,u]=T("running",y),c={increment:()=>{1==++i&&(c.initializing?u("fallback"):ge.transition?(!o&&(o=ge.transition).increment(),t=setTimeout(()=>u("fallback"),ge.transition.timeoutMs),u("suspended")):u("fallback"),ge.increment())},decrement:()=>{0==--i&&(t&&clearTimeout(t),o&&o.decrement(),o=void 0,u("running"),L(()=>ge.decrement()))},state:s,initializing:!0},l=F(At);return l&&([n,r]=l.register(c.state)),Ve(ge.Provider,{value:c,children:()=>{const t=N(()=>e.children);return()=>{const o=c.state(),i=!n||n(),s=!r||r();return c.initializing&&(c.initializing=!1),"running"===o&&i||"suspended"===o?t:s?e.fallback:void 0}}},["children"])}function kt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return Oe(j(ae(()=>e.each,e.children,t||void 0)))}function Ct(e){const t="fallback"in e,n=j(()=>!!e.when,void 0,y);return Oe(j(()=>n()?N(()=>e.children):t?N(()=>e.fallback):void 0))}function Tt(e){let t=e.children;Array.isArray(t)||(t=[t]);const n="fallback"in e,r=j(()=>{for(let e=0;e<t.length;e++)if(t[e].when)return e;return-1},void 0,y);return Oe(j(()=>{const o=r();return N(()=>o<0?n&&e.fallback:t[o].children)}))}function Ot(e){return e}function Pt(e){const{useShadow:t}=e,n=document.createElement("div"),r=document.createTextNode(""),o=e.mount||document.body,i=t&&n.attachShadow?n.attachShadow({mode:"open"}):n;return Object.defineProperty(n,"host",{get:()=>r.parentNode}),rt(i,N(()=>e.children)),o.appendChild(n),e.ref&&e.ref(n),E(()=>o.removeChild(n)),r}function jt(){return this()}function Mt(e){return this(e)}function _t(e){const[t,n]=T(e),r=e=>void 0===e?t():(n(e),e);return r.get=jt.bind(r),r.set=Mt.bind(r),r}function Nt(e){let t;return C(n=>{t=n,O(e)}),t}function Lt(e,t,n){let r=e[t];return r||(Object.defineProperty(e,t,{value:r=_t(n)}),r)}function Et(e,t,n){const r="v_"+t;let o,i,s,u,c=!1;if(n||(c=!0,n=Object.getOwnPropertyDescriptor(e,t)),n)if(n.get||n.set){if(o=n.get,i=n.set,!o||!i)return void console.warn("The `@reactive` decorator was used on an accessor named "+t+" which had a getter or a setter, but not both. Reactivity on accessors works only when accessors have both get and set.");delete n.get,delete n.set}else{if(s=n.value,u=n.writable,!u)return void console.warn("The `@reactive` decorator was used on a property named "+t+" that is not writable. Reactivity is not enabled for non-writable properties.");delete n.value,delete n.writable}if(n={...n,get(){const e=Lt(this,r,s);return o?(e(),o.call(this)):e()},set(e){const t=Lt(this,r,s);i&&i.call(this,e),t(e)}},!c)return n;Object.defineProperty(e,t,n)}n.d(t,"variable",(function(){return _t})),n.d(t,"autorun",(function(){return Nt})),n.d(t,"reactive",(function(){return Et})),n.d(t,"version",(function(){return Rt})),n.d(t,"$RAW",(function(){return K})),n.d(t,"SuspenseContext",(function(){return ge})),n.d(t,"afterEffects",(function(){return L})),n.d(t,"awaitSuspense",(function(){return we})),n.d(t,"cancelCallback",(function(){return p})),n.d(t,"cloneProps",(function(){return de})),n.d(t,"createContext",(function(){return D})),n.d(t,"createDeferred",(function(){return M})),n.d(t,"createDependentEffect",(function(){return P})),n.d(t,"createEffect",(function(){return O})),n.d(t,"createMemo",(function(){return j})),n.d(t,"createResource",(function(){return Ae})),n.d(t,"createResourceState",(function(){return ke})),n.d(t,"createRoot",(function(){return C})),n.d(t,"createSignal",(function(){return T})),n.d(t,"createState",(function(){return ue})),n.d(t,"equalFn",(function(){return y})),n.d(t,"freeze",(function(){return _})),n.d(t,"getContextOwner",(function(){return H})),n.d(t,"isListening",(function(){return $})),n.d(t,"lazy",(function(){return Ce})),n.d(t,"mapArray",(function(){return ae})),n.d(t,"onCleanup",(function(){return E})),n.d(t,"onError",(function(){return R})),n.d(t,"reconcile",(function(){return ce})),n.d(t,"requestCallback",(function(){return d})),n.d(t,"runtimeConfig",(function(){return pe})),n.d(t,"sample",(function(){return N})),n.d(t,"setDefaults",(function(){return fe})),n.d(t,"suspend",(function(){return Oe})),n.d(t,"unwrap",(function(){return te})),n.d(t,"useContext",(function(){return F})),n.d(t,"useTransition",(function(){return Te})),n.d(t,"For",(function(){return kt})),n.d(t,"Match",(function(){return Ot})),n.d(t,"Portal",(function(){return Pt})),n.d(t,"Show",(function(){return Ct})),n.d(t,"Suspense",(function(){return xt})),n.d(t,"SuspenseList",(function(){return St})),n.d(t,"Switch",(function(){return Tt})),n.d(t,"assign",(function(){return ot})),n.d(t,"classList",(function(){return et})),n.d(t,"clearDelegatedEvents",(function(){return Qe})),n.d(t,"createComponent",(function(){return Ve})),n.d(t,"currentContext",(function(){return Be})),n.d(t,"delegateEvents",(function(){return Ge})),n.d(t,"effect",(function(){return Ie})),n.d(t,"escape",(function(){return at})),n.d(t,"generateHydrationEventsScript",(function(){return yt})),n.d(t,"getHydrationKey",(function(){return ft})),n.d(t,"getNextElement",(function(){return dt})),n.d(t,"getNextMarker",(function(){return pt})),n.d(t,"hydrate",(function(){return Ke})),n.d(t,"insert",(function(){return rt})),n.d(t,"memo",(function(){return Ue})),n.d(t,"render",(function(){return Xe})),n.d(t,"renderDOMToString",(function(){return Je})),n.d(t,"renderToString",(function(){return Ze})),n.d(t,"runHydrationEvents",(function(){return ht})),n.d(t,"spread",(function(){return nt})),n.d(t,"ssr",(function(){return it})),n.d(t,"ssrClassList",(function(){return st})),n.d(t,"ssrSpread",(function(){return ct})),n.d(t,"ssrStyle",(function(){return ut})),n.d(t,"style",(function(){return tt})),n.d(t,"template",(function(){return We}));const Rt="0.0.7"}]); | ||
//# sourceMappingURL=global.js.map |
@@ -7,2 +7,12 @@ export * from 'solid-js'; | ||
} | ||
/** Represents a reactive variable. The value is set or gotten depending on passing an arg or no arg. */ | ||
export interface Variable<T = any> { | ||
/** Gets the variable value. */ | ||
(value?: undefined): T; | ||
/** Sets the variable value. */ | ||
(value: T): T; | ||
(value?: T): void | T; | ||
get(): T; | ||
set(value: T): T; | ||
} | ||
/** | ||
@@ -18,6 +28,3 @@ * Create a reactive variable. | ||
*/ | ||
export declare function variable<T>(value: T): { | ||
(value?: undefined): T; | ||
(value: T): void; | ||
}; | ||
export declare function variable<T>(value: T): Variable<T>; | ||
export declare type Computation = (previousValue?: unknown) => unknown; | ||
@@ -37,2 +44,2 @@ export declare type StopFunction = () => void; | ||
export declare function reactive<T>(prototype: any, name: string, descriptor?: PropertyDescriptor): any; | ||
export declare const version = "0.0.6"; | ||
export declare const version = "0.0.7"; |
import { createSignal, createEffect, createRoot } from 'solid-js'; | ||
export * from 'solid-js'; | ||
export * from 'solid-js/dom'; | ||
function readVariable() { | ||
return this(); | ||
} | ||
function writeVariable(value) { | ||
return this(value); | ||
} | ||
/** | ||
@@ -17,7 +23,14 @@ * Create a reactive variable. | ||
const [get, set] = createSignal(value); | ||
function variable(value) { | ||
const variable = (value) => { | ||
if (typeof value === 'undefined') | ||
return get(); | ||
set(value); | ||
} | ||
return value; | ||
}; | ||
// WTF TypeScript, why do I need `any` here. | ||
variable.get = readVariable.bind(variable); | ||
variable.set = writeVariable.bind(variable); | ||
// TODO, for array destructuring convenience | ||
// variable[0] = read.bind(variable as any) as any | ||
// variable[1] = write.bind(variable as any) as any | ||
return variable; | ||
@@ -123,3 +136,3 @@ } | ||
} | ||
export const version = '0.0.6'; | ||
export const version = '0.0.7'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@lume/variable", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Create and react to reactive variables.", | ||
@@ -5,0 +5,0 @@ "author": "Joe Pea <joe@trusktr.io>", |
@@ -11,2 +11,26 @@ import {createSignal, createEffect, createRoot} from 'solid-js' | ||
/** Represents a reactive variable. The value is set or gotten depending on passing an arg or no arg. */ | ||
export interface Variable<T = any> { | ||
/** Gets the variable value. */ | ||
(value?: undefined): T | ||
/** Sets the variable value. */ | ||
(value: T): T | ||
(value?: T): void | T | ||
get(): T | ||
set(value: T): T | ||
// TODO, for array destructuring convenience | ||
// [0](): T | ||
// [1](value: T): T | ||
// [Symbol.iterator]() {...} | ||
} | ||
function readVariable<T>(this: Variable<T>): T { | ||
return this() | ||
} | ||
function writeVariable<T>(this: Variable<T>, value: T): T { | ||
return this(value) | ||
} | ||
/** | ||
@@ -26,9 +50,15 @@ * Create a reactive variable. | ||
function variable(value?: undefined): T | ||
function variable(value: T): void | ||
function variable(value?: T): void | T { | ||
const variable: Variable<T> = (value?: T) => { | ||
if (typeof value === 'undefined') return get() | ||
set(value) | ||
return value | ||
} | ||
// WTF TypeScript, why do I need `any` here. | ||
variable.get = readVariable.bind(variable as any) as any | ||
variable.set = writeVariable.bind(variable as any) as any | ||
// TODO, for array destructuring convenience | ||
// variable[0] = read.bind(variable as any) as any | ||
// variable[1] = write.bind(variable as any) as any | ||
return variable | ||
@@ -159,2 +189,2 @@ } | ||
export const version = '0.0.6' | ||
export const version = '0.0.7' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
167552
499