@e280/sly 0.0.0-4 → 0.0.0-5
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/README.md +99 -88
- package/package.json +2 -2
- package/s/demo/demo.bundle.ts +3 -47
- package/s/demo/demo.css +13 -6
- package/s/demo/views/counter.ts +42 -0
- package/s/demo/views/demo.ts +25 -0
- package/s/demo/views/loaders.ts +58 -0
- package/s/features/op/loaders/make-loader.ts +18 -0
- package/s/features/op/loaders/parts/anims.ts +277 -0
- package/s/features/op/loaders/parts/ascii-anim.ts +38 -0
- package/s/features/{loady → op/loaders}/parts/error-display.ts +10 -10
- package/s/features/op/op.ts +42 -20
- package/s/features/op/podium.ts +67 -0
- package/s/features/views/use.ts +6 -5
- package/s/features/views/view.ts +12 -5
- package/s/index.html.ts +2 -2
- package/s/index.ts +4 -3
- package/x/demo/demo.bundle.js +2 -36
- package/x/demo/demo.bundle.js.map +1 -1
- package/x/demo/demo.bundle.min.js +61 -12
- package/x/demo/demo.bundle.min.js.map +4 -4
- package/x/demo/demo.css +13 -6
- package/x/demo/views/counter.d.ts +1 -0
- package/x/demo/views/counter.js +34 -0
- package/x/demo/views/counter.js.map +1 -0
- package/x/demo/views/demo.d.ts +1 -0
- package/x/demo/views/demo.js +21 -0
- package/x/demo/views/demo.js.map +1 -0
- package/x/demo/views/loaders.d.ts +1 -0
- package/x/demo/views/loaders.js +50 -0
- package/x/demo/views/loaders.js.map +1 -0
- package/x/features/op/loaders/make-loader.d.ts +5 -0
- package/x/features/op/loaders/make-loader.js +7 -0
- package/x/features/op/loaders/make-loader.js.map +1 -0
- package/x/features/op/loaders/parts/anims.d.ts +24 -0
- package/x/features/op/loaders/parts/anims.js +251 -0
- package/x/features/op/loaders/parts/anims.js.map +1 -0
- package/x/features/op/loaders/parts/ascii-anim.d.ts +6 -0
- package/x/features/op/loaders/parts/ascii-anim.js +26 -0
- package/x/features/op/loaders/parts/ascii-anim.js.map +1 -0
- package/x/features/op/loaders/parts/error-display.d.ts +1 -0
- package/x/features/{loady → op/loaders}/parts/error-display.js +9 -9
- package/x/features/op/loaders/parts/error-display.js.map +1 -0
- package/x/features/op/op.d.ts +12 -3
- package/x/features/op/op.js +33 -17
- package/x/features/op/op.js.map +1 -1
- package/x/features/op/podium.d.ts +9 -0
- package/x/features/op/podium.js +53 -0
- package/x/features/op/podium.js.map +1 -0
- package/x/features/views/use.d.ts +4 -3
- package/x/features/views/use.js +7 -5
- package/x/features/views/use.js.map +1 -1
- package/x/features/views/view.js +11 -5
- package/x/features/views/view.js.map +1 -1
- package/x/index.d.ts +4 -3
- package/x/index.html +17 -10
- package/x/index.html.js +2 -2
- package/x/index.html.js.map +1 -1
- package/x/index.js +4 -3
- package/x/index.js.map +1 -1
- package/s/features/loady/ascii-loader.ts +0 -38
- package/s/features/loady/parts/ascii-anim.ts +0 -27
- package/s/features/loady/parts/ascii-loader.ts +0 -14
- package/s/features/op/pod.ts +0 -19
- package/x/features/loady/ascii-loader.d.ts +0 -5
- package/x/features/loady/ascii-loader.js +0 -33
- package/x/features/loady/ascii-loader.js.map +0 -1
- package/x/features/loady/parts/ascii-anim.d.ts +0 -1
- package/x/features/loady/parts/ascii-anim.js +0 -21
- package/x/features/loady/parts/ascii-anim.js.map +0 -1
- package/x/features/loady/parts/ascii-loader.d.ts +0 -3
- package/x/features/loady/parts/ascii-loader.js +0 -10
- package/x/features/loady/parts/ascii-loader.js.map +0 -1
- package/x/features/loady/parts/error-display.d.ts +0 -1
- package/x/features/loady/parts/error-display.js.map +0 -1
- package/x/features/op/pod.d.ts +0 -5
- package/x/features/op/pod.js +0 -16
- package/x/features/op/pod.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var d=Object.freeze({eq(r,t){if(r.length!==t.length)return!1;for(let e=0;e<=r.length;e++)if(r.at(e)!==t.at(e))return!1;return!0},random(r){return crypto.getRandomValues(new Uint8Array(r))}});var _=Object.freeze({fromBytes(r){return[...r].map(t=>t.toString(16).padStart(2,"0")).join("")},toBytes(r){if(r.length%2!==0)throw new Error("must have even number of hex characters");let t=new Uint8Array(r.length/2);for(let e=0;e<r.length;e+=2)t[e/2]=parseInt(r.slice(e,e+2),16);return t},random(r=32){return this.fromBytes(d.random(r))},string(r){return _.fromBytes(r)},bytes(r){return _.toBytes(r)}});var _t=58,G="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",At=Object.freeze({fromBytes(r){let t=BigInt("0x"+_.fromBytes(r)),e="";for(;t>0;){let s=t%BigInt(_t);t=t/BigInt(_t),e=G[Number(s)]+e}for(let s of r)if(s===0)e=G[0]+e;else break;return e},toBytes(r){let t=BigInt(0);for(let i of r){let c=G.indexOf(i);if(c===-1)throw new Error(`Invalid character '${i}' in base58 string`);t=t*BigInt(_t)+BigInt(c)}let e=t.toString(16);e.length%2!==0&&(e="0"+e);let s=_.toBytes(e),o=0;for(let i of r)if(i===G[0])o++;else break;let n=new Uint8Array(o+s.length);return n.set(s,o),n},random(r=32){return this.fromBytes(d.random(r))},string(r){return At.fromBytes(r)},bytes(r){return At.toBytes(r)}});var Vt=class{lexicon;static lexicons=Object.freeze({base2:{characters:"01"},hex:{characters:"0123456789abcdef"},base36:{characters:"0123456789abcdefghijklmnopqrstuvwxyz"},base58:{characters:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"},base62:{characters:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"},base64url:{negativePrefix:"~",characters:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},base64:{characters:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",padding:{character:"=",size:4}}});lookup;negativePrefix;constructor(t){this.lexicon=t,this.lookup=Object.fromEntries([...t.characters].map((e,s)=>[e,s])),this.negativePrefix=t.negativePrefix??"-"}toBytes(t){let e=Math.log2(this.lexicon.characters.length);if(Number.isInteger(e)){let c=0,a=0,l=[];for(let u of t){if(u===this.lexicon.padding?.character)continue;let h=this.lookup[u];if(h===void 0)throw new Error(`Invalid character: ${u}`);for(c=c<<e|h,a+=e;a>=8;)a-=8,l.push(c>>a&255)}return new Uint8Array(l)}let s=0n,o=BigInt(this.lexicon.characters.length),n=!1;t.startsWith(this.negativePrefix)&&(t=t.slice(this.negativePrefix.length),n=!0);for(let c of t){let a=this.lookup[c];if(a===void 0)throw new Error(`Invalid character: ${c}`);s=s*o+BigInt(a)}let i=[];for(;s>0n;)i.unshift(Number(s%256n)),s=s/256n;return new Uint8Array(i)}fromBytes(t){let e=Math.log2(this.lexicon.characters.length);if(Number.isInteger(e)){let i=0,c=0,a="";for(let l of t)for(i=i<<8|l,c+=8;c>=e;){c-=e;let u=i>>c&(1<<e)-1;a+=this.lexicon.characters[u]}if(c>0){let l=i<<e-c&(1<<e)-1;a+=this.lexicon.characters[l]}if(this.lexicon.padding)for(;a.length%this.lexicon.padding.size!==0;)a+=this.lexicon.padding.character;return a}let s=0n;for(let i of t)s=(s<<8n)+BigInt(i);if(s===0n)return this.lexicon.characters[0];let o=BigInt(this.lexicon.characters.length),n="";for(;s>0n;)n=this.lexicon.characters[Number(s%o)]+n,s=s/o;return n}toInteger(t){if(!t)return 0;let e=0n,s=!1,o=BigInt(this.lexicon.characters.length);t.startsWith(this.negativePrefix)&&(t=t.slice(this.negativePrefix.length),s=!0);for(let n of t){let i=this.lookup[n];if(i===void 0)throw new Error(`Invalid character: ${n}`);e=e*o+BigInt(i)}return Number(s?-e:e)}fromInteger(t){t=Math.floor(t);let e=t<0,s=BigInt(e?-t:t);if(s===0n)return this.lexicon.characters[0];let o=BigInt(this.lexicon.characters.length),n="";for(;s>0n;)n=this.lexicon.characters[Number(s%o)]+n,s=s/o;return e?`${this.negativePrefix}${n}`:n}random(t=32){return this.fromBytes(d.random(t))}};var wt=Object.freeze({fromBytes(r){return typeof btoa=="function"?btoa(String.fromCharCode(...r)):Buffer.from(r).toString("base64")},toBytes(r){return typeof atob=="function"?Uint8Array.from(atob(r),t=>t.charCodeAt(0)):Uint8Array.from(Buffer.from(r,"base64"))},random(r=32){return this.fromBytes(d.random(r))},string(r){return wt.fromBytes(r)},bytes(r){return wt.toBytes(r)}});var Wt=Object.freeze({fromBytes(r){return new TextDecoder().decode(r)},toBytes(r){return new TextEncoder().encode(r)},string(r){return Wt.fromBytes(r)},bytes(r){return Wt.toBytes(r)}});function Y(r,t){let e,s,o=[];function n(){e=[],s&&clearTimeout(s),s=void 0,o=[]}return n(),((...i)=>{e=i,s&&clearTimeout(s);let c=new Promise((a,l)=>{o.push({resolve:a,reject:l})});return s=setTimeout(()=>{Promise.resolve().then(()=>t(...e)).then(a=>{for(let{resolve:l}of o)l(a);n()}).catch(a=>{for(let{reject:l}of o)l(a);n()})},r),c})}var vt=Object.freeze({set:r=>r!=null,unset:r=>r==null,boolean:r=>typeof r=="boolean",number:r=>typeof r=="number",string:r=>typeof r=="string",bigint:r=>typeof r=="bigint",object:r=>typeof r=="object"&&r!==null,array:r=>Array.isArray(r),fn:r=>typeof r=="function",symbol:r=>typeof r=="symbol"});function N(){let r,t,e=new Promise((o,n)=>{r=o,t=n});function s(o){return o.then(r).catch(t),e}return{promise:e,resolve:r,reject:t,entangle:s}}var C=class r extends Map{static require(t,e){if(t.has(e))return t.get(e);throw new Error(`required key not found: "${e}"`)}static guarantee(t,e,s){if(t.has(e))return t.get(e);{let o=s();return t.set(e,o),o}}array(){return[...this]}require(t){return r.require(this,t)}guarantee(t,e){return r.guarantee(this,t,e)}};var R=(r=0)=>new Promise(t=>setTimeout(t,r));function we(r){return{map:t=>Ft(r,t),filter:t=>Zt(r,t)}}we.pipe=Object.freeze({map:r=>(t=>Ft(t,r)),filter:r=>(t=>Zt(t,r))});var Ft=(r,t)=>Object.fromEntries(Object.entries(r).map(([e,s])=>[e,t(s,e)])),Zt=(r,t)=>Object.fromEntries(Object.entries(r).filter(([e,s])=>t(s,e)));function Kt(){let r=new Set;function t(n){return r.add(n),()=>{r.delete(n)}}async function e(...n){await Promise.all([...r].map(i=>i(...n)))}async function s(){let{promise:n,resolve:i}=N(),c=t((...a)=>{i(a),c()});return n}function o(){r.clear()}return t.pub=e,t.sub=t,t.on=t,t.next=s,t.clear=o,e.pub=e,e.sub=t,e.on=t,e.next=s,e.clear=o,[e,t]}function X(r){let t=Kt()[1];return r&&t.sub(r),t}function St(r){let t=Kt()[0];return r&&t.sub(r),t}function tt(r){let t,e=!1,s=()=>{e=!0,clearTimeout(t)},o=async()=>{e||(await r(s),!e&&(t=setTimeout(o,0)))};return o(),s}var et=globalThis,rt=et.ShadowRoot&&(et.ShadyCSS===void 0||et.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Et=Symbol(),Qt=new WeakMap,z=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==Et)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(rt&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=Qt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Qt.set(e,t))}return t}toString(){return this.cssText}},Jt=r=>new z(typeof r=="string"?r:r+"",void 0,Et),y=(r,...t)=>{let e=r.length===1?r[0]:t.reduce(((s,o,n)=>s+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+r[n+1]),r[0]);return new z(e,r,Et)},st=(r,t)=>{if(rt)r.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),o=et.litNonce;o!==void 0&&s.setAttribute("nonce",o),s.textContent=e.cssText,r.appendChild(s)}},P=rt?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return Jt(e)})(r):r;var{is:ve,defineProperty:Se,getOwnPropertyDescriptor:Ee,getOwnPropertyNames:Be,getOwnPropertySymbols:Ce,getPrototypeOf:Pe}=Object,ot=globalThis,Gt=ot.trustedTypes,Oe=Gt?Gt.emptyScript:"",ke=ot.reactiveElementPolyfillSupport,I=(r,t)=>r,Bt={toAttribute(r,t){switch(t){case Boolean:r=r?Oe:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},Xt=(r,t)=>!ve(r,t),Yt={attribute:!0,type:String,converter:Bt,reflect:!1,useDefault:!1,hasChanged:Xt};Symbol.metadata??=Symbol("metadata"),ot.litPropertyMetadata??=new WeakMap;var g=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Yt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),o=this.getPropertyDescriptor(t,s,e);o!==void 0&&Se(this.prototype,t,o)}}static getPropertyDescriptor(t,e,s){let{get:o,set:n}=Ee(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:o,set(i){let c=o?.call(this);n?.call(this,i),this.requestUpdate(t,c,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Yt}static _$Ei(){if(this.hasOwnProperty(I("elementProperties")))return;let t=Pe(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(I("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(I("properties"))){let e=this.properties,s=[...Be(e),...Ce(e)];for(let o of s)this.createProperty(o,e[o])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,o]of e)this.elementProperties.set(s,o)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let o=this._$Eu(e,s);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let o of s)e.unshift(P(o))}else t!==void 0&&e.push(P(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return st(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(o!==void 0&&s.reflect===!0){let n=(s.converter?.toAttribute!==void 0?s.converter:Bt).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(o):this.setAttribute(o,n),this._$Em=null}}_$AK(t,e){let s=this.constructor,o=s._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let n=s.getPropertyOptions(o),i=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:Bt;this._$Em=o,this[o]=i.fromAttribute(e,n.type)??this._$Ej?.get(o)??null,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let o=this.constructor,n=this[t];if(s??=o.getPropertyOptions(t),!((s.hasChanged??Xt)(n,e)||s.useDefault&&s.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:o,wrapped:n},i){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),n!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),o===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[o,n]of this._$Ep)this[o]=n;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[o,n]of s){let{wrapped:i}=n,c=this[o];i!==!0||this._$AL.has(o)||c===void 0||this.C(o,void 0,n,c)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};g.elementStyles=[],g.shadowRootOptions={mode:"open"},g[I("elementProperties")]=new Map,g[I("finalized")]=new Map,ke?.({ReactiveElement:g}),(ot.reactiveElementVersions??=[]).push("2.1.0");var Pt=globalThis,nt=Pt.trustedTypes,te=nt?nt.createPolicy("lit-html",{createHTML:r=>r}):void 0,Ot="$lit$",b=`lit$${Math.random().toFixed(9).slice(2)}$`,kt="?"+b,Te=`<${kt}>`,v=document,L=()=>v.createComment(""),q=r=>r===null||typeof r!="object"&&typeof r!="function",Tt=Array.isArray,ie=r=>Tt(r)||typeof r?.[Symbol.iterator]=="function",Ct=`[
|
|
2
|
-
\f\r]`,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),se=/'/g,oe=/"/g,ae=/^(?:script|style|textarea|title)$/i,jt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),ut=jt(1),Zs=jt(2),Ks=jt(3),S=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),ne=new WeakMap,w=v.createTreeWalker(v,129);function ce(r,t){if(!Tt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return te!==void 0?te.createHTML(t):t}var le=(r,t)=>{let e=r.length-1,s=[],o,n=t===2?"<svg>":t===3?"<math>":"",i=D;for(let c=0;c<e;c++){let a=r[c],l,u,h=-1,m=0;for(;m<a.length&&(i.lastIndex=m,u=i.exec(a),u!==null);)m=i.lastIndex,i===D?u[1]==="!--"?i=ee:u[1]!==void 0?i=re:u[2]!==void 0?(ae.test(u[2])&&(o=RegExp("</"+u[2],"g")),i=A):u[3]!==void 0&&(i=A):i===A?u[0]===">"?(i=o??D,h=-1):u[1]===void 0?h=-2:(h=i.lastIndex-u[2].length,l=u[1],i=u[3]===void 0?A:u[3]==='"'?oe:se):i===oe||i===se?i=A:i===ee||i===re?i=D:(i=A,o=void 0);let x=i===A&&r[c+1].startsWith("/>")?" ":"";n+=i===D?a+Te:h>=0?(s.push(l),a.slice(0,h)+Ot+a.slice(h)+b+x):a+b+(h===-2?c:x)}return[ce(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},V=class r{constructor({strings:t,_$litType$:e},s){let o;this.parts=[];let n=0,i=0,c=t.length-1,a=this.parts,[l,u]=le(t,e);if(this.el=r.createElement(l,s),w.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(o=w.nextNode())!==null&&a.length<c;){if(o.nodeType===1){if(o.hasAttributes())for(let h of o.getAttributeNames())if(h.endsWith(Ot)){let m=u[i++],x=o.getAttribute(h).split(b),J=/([.?@])?(.*)/.exec(m);a.push({type:1,index:n,name:J[2],strings:x,ctor:J[1]==="."?at:J[1]==="?"?ct:J[1]==="@"?lt:B}),o.removeAttribute(h)}else h.startsWith(b)&&(a.push({type:6,index:n}),o.removeAttribute(h));if(ae.test(o.tagName)){let h=o.textContent.split(b),m=h.length-1;if(m>0){o.textContent=nt?nt.emptyScript:"";for(let x=0;x<m;x++)o.append(h[x],L()),w.nextNode(),a.push({type:2,index:++n});o.append(h[m],L())}}}else if(o.nodeType===8)if(o.data===kt)a.push({type:2,index:n});else{let h=-1;for(;(h=o.data.indexOf(b,h+1))!==-1;)a.push({type:7,index:n}),h+=b.length-1}n++}}static createElement(t,e){let s=v.createElement("template");return s.innerHTML=t,s}};function E(r,t,e=r,s){if(t===S)return t;let o=s!==void 0?e._$Co?.[s]:e._$Cl,n=q(t)?void 0:t._$litDirective$;return o?.constructor!==n&&(o?._$AO?.(!1),n===void 0?o=void 0:(o=new n(r),o._$AT(r,e,s)),s!==void 0?(e._$Co??=[])[s]=o:e._$Cl=o),o!==void 0&&(t=E(r,o._$AS(r,t.values),o,s)),t}var it=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,o=(t?.creationScope??v).importNode(e,!0);w.currentNode=o;let n=w.nextNode(),i=0,c=0,a=s[0];for(;a!==void 0;){if(i===a.index){let l;a.type===2?l=new O(n,n.nextSibling,this,t):a.type===1?l=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(l=new ht(n,this,t)),this._$AV.push(l),a=s[++c]}i!==a?.index&&(n=w.nextNode(),i++)}return w.currentNode=v,o}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},O=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,o){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=E(this,t,e),q(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==S&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ie(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==p&&q(this._$AH)?this._$AA.nextSibling.data=t:this.T(v.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,o=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=V.createElement(ce(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===o)this._$AH.p(e);else{let n=new it(o,this),i=n.u(this.options);n.p(e),this.T(i),this._$AH=n}}_$AC(t){let e=ne.get(t.strings);return e===void 0&&ne.set(t.strings,e=new V(t)),e}k(t){Tt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,o=0;for(let n of t)o===e.length?e.push(s=new r(this.O(L()),this.O(L()),this,this.options)):s=e[o],s._$AI(n),o++;o<e.length&&(this._$AR(s&&s._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},B=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,o,n){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=p}_$AI(t,e=this,s,o){let n=this.strings,i=!1;if(n===void 0)t=E(this,t,e,0),i=!q(t)||t!==this._$AH&&t!==S,i&&(this._$AH=t);else{let c=t,a,l;for(t=n[0],a=0;a<n.length-1;a++)l=E(this,c[s+a],e,a),l===S&&(l=this._$AH[a]),i||=!q(l)||l!==this._$AH[a],l===p?t=p:t!==p&&(t+=(l??"")+n[a+1]),this._$AH[a]=l}i&&!o&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},at=class extends B{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}},ct=class extends B{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}},lt=class extends B{constructor(t,e,s,o,n){super(t,e,s,o,n),this.type=5}_$AI(t,e=this){if((t=E(this,t,e,0)??p)===S)return;let s=this._$AH,o=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==p&&(s===p||o);o&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},ht=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}},he={M:Ot,P:b,A:kt,C:1,L:le,R:it,D:ie,V:E,I:O,H:B,N:ct,U:lt,B:at,F:ht},je=Pt.litHtmlPolyfillSupport;je?.(V,O),(Pt.litHtmlVersions??=[]).push("3.3.0");var $=(r,t,e)=>{let s=e?.renderBefore??t,o=s._$litPart$;if(o===void 0){let n=e?.renderBefore??null;s._$litPart$=o=new O(t.insertBefore(L(),n),n,void 0,e??{})}return o._$AI(r),o};var Mt=globalThis,k=class extends g{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=$(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return S}};k._$litElement$=!0,k.finalized=!0,Mt.litElementHydrateSupport?.({LitElement:k});var Me=Mt.litElementPolyfillSupport;Me?.({LitElement:k});(Mt.litElementVersions??=[]).push("4.2.0");function T(r,t=document){let e=t.querySelector(r);if(!e)throw new Error(`$1 ${r} not found`);return e}function Ue(r,t=document){return Array.from(t.querySelectorAll(r))}T.maybe=(r,t=document)=>t.querySelector(r);T.all=Ue;T.render=(r,...t)=>$(t,r);var Ut=class{#t=[];#e=new WeakMap;#r=[];#o=new Set;see(t){this.#t.at(-1)?.add(t)}seen(t){this.#t.push(new Set);let e=t();return{seen:this.#t.pop(),result:e}}async change(t){if(this.#o.has(t))throw new Error("circularity forbidden");let e=this.#s(t).pub();return this.#r.at(-1)?.add(e),e}changed(t,e){return this.#s(t)(async()=>{let s=new Set;this.#r.push(s),this.#o.add(t),s.add(e()),this.#o.delete(t),await Promise.all(s),this.#r.pop()})}#s(t){let e=this.#e.get(t);return e||(e=X(),this.#e.set(t,e)),e}},He=Symbol.for("e280.tracker.v2"),f=globalThis[He]??=new Ut;var{I:mo}=he;var ue=r=>r.strings===void 0;var pe={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ht=r=>(...t)=>({_$litDirective$:r,values:t}),pt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var W=(r,t)=>{let e=r._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),W(s,t);return!0},ft=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while(e?.size===0)},fe=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),ze(t)}};function Ne(r){this._$AN!==void 0?(ft(this),this._$AM=r,fe(this)):this._$AM=r}function Re(r,t=!1,e=0){let s=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(s))for(let n=e;n<s.length;n++)W(s[n],!1),ft(s[n]);else s!=null&&(W(s,!1),ft(s));else W(this,r)}var ze=r=>{r.type==pe.CHILD&&(r._$AP??=Re,r._$AQ??=Ne)},dt=class extends pt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),fe(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(W(this,t),ft(this))}setValue(t){if(ue(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};function de(r){return r.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function me(r,t={}){let{soft:e=!1,upgrade:s=!0}=t;for(let[o,n]of Object.entries(r)){let i=de(o),c=customElements.get(i);e&&c||(customElements.define(i,n),s&&document.querySelectorAll(i).forEach(a=>{a.constructor===HTMLElement&&customElements.upgrade(a)}))}}function ye(r,t){for(let[e,s]of Object.entries(t))s===void 0||s===null?r.removeAttribute(e):typeof s=="string"?r.setAttribute(e,s):typeof s=="number"?r.setAttribute(e,s.toString()):typeof s=="boolean"?s===!0?r.setAttribute(e,""):r.removeAttribute(e):console.warn(`invalid attribute type ${e} is ${typeof s}`)}function mt(r,t){st(r,Ie(t))}function Ie(r){let t=[];if(Array.isArray(r)){let e=new Set(r.flat(1/0).reverse());for(let s of e)t.unshift(P(s))}else r!==void 0&&t.push(P(r));return t}function Nt(r,t=r){let{seen:e,result:s}=f.seen(r),o=Y(0,t),n=[],i=()=>n.forEach(c=>c());for(let c of e){let a=f.changed(c,o);n.push(a)}return{result:s,dispose:i}}var De={compare:(r,t)=>r===t};function j(r={}){return{...De,...r}}var yt=class{sneak;constructor(t){this.sneak=t}get(){return f.see(this),this.sneak}get value(){return this.get()}},gt=class extends yt{on=X();dispose(){this.on.clear()}},F=class extends gt{_options;kind="signal";_lock=!1;constructor(t,e){super(t),this._options=e}async set(t){return!this._options.compare(this.sneak,t)&&await this.publish(t),t}get value(){return this.get()}set value(t){this.set(t)}async publish(t=this.get()){if(this._lock)throw new Error("forbid circularity");let e=Promise.resolve();try{this._lock=!0,this.sneak=t,e=Promise.all([f.change(this),this.on.pub(t)])}finally{this._lock=!1}return await e,t}},Z=class extends yt{_formula;_options;kind="lazy";_dirty=!1;_effect;constructor(t,e){super(void 0),this._formula=t,this._options=e}get(){if(!this._effect){let{result:t,dispose:e}=Nt(this._formula,()=>this._dirty=!0);this._effect=e,this.sneak=t}if(this._dirty){this._dirty=!1;let t=this._formula();!this._options.compare(this.sneak,t)&&(this.sneak=t,f.change(this))}return super.get()}get value(){return this.get()}dispose(){this._effect&&this._effect()}},K=class extends gt{_effect;static make(t,e,s){let{result:o,dispose:n}=Nt(e,async()=>{let i=e();!s.compare(t.sneak,i)&&(t.sneak=i,await Promise.all([f.change(t),t.on.pub(i)]))});return new this(o,n)}kind="derived";constructor(t,e){super(t),this._effect=e}get value(){return this.get()}dispose(){super.dispose(),this._effect()}};function ge(r,t={}){function e(){return e.value}let s=j(t),o=new Z(r,s);return Object.setPrototypeOf(e,Z.prototype),Object.assign(e,o),e}function be(r,t={}){function e(){return e.value}let s=j(t),o=K.make(e,r,s);return Object.setPrototypeOf(e,K.prototype),Object.assign(e,o),e}function M(r,t={}){function e(n){return n!==void 0?e.set(n):e.get()}let s=j(t),o=new F(r,s);return Object.setPrototypeOf(e,F.prototype),Object.assign(e,o),e}M.lazy=ge;M.derive=be;var Rt={value:r=>r[0]==="ready"?r[1]:void 0,select:(r,t)=>{switch(r[0]){case"loading":return t.loading();case"error":return t.error(r[1]);case"ready":return t.ready(r[1]);default:throw new Error("unknown op status")}}};var Q=class{static loading(){return new this}static ready(t){let e=new this;return e.signal(["ready",t]),e}static error(t){let e=new this;return e.signal(["error",t]),e}static promise(t){let e=new this;return e.promise(t),e}static fn(t){return this.promise(t())}signal=M(["loading"]);#t=St();#e=St();get wait(){return new Promise((t,e)=>{this.#t.next().then(t),this.#e.next().then(e)})}async setLoading(){await this.signal(["loading"])}async setReady(t){await this.signal(["ready",t]),await this.#t(t)}async setError(t){await this.signal(["error",t]),await this.#e(t)}async promise(t){await this.setLoading();try{let e=await t;return await this.setReady(e),e}catch(e){await this.setError(e)}}async fn(t){return this.promise(t())}get pod(){return this.signal()}get status(){return this.signal()[0]}get value(){return Rt.value(this.signal())}require(){let t=this.signal();if(t[0]!=="ready")throw new Error("required value not ready");return t[1]}select(t){return Rt.select(this.signal(),t)}};var bt=class{#t=[];#e=[];mount(t){this.#t.push(t),this.#e.push(t())}unmountAll(){for(let t of this.#e)t();this.#e=[]}remountAll(){for(let t of this.#t)this.#e.push(t())}};var zt=Symbol(),It=Symbol(),Dt=Symbol(),$t=class{element;shadow;#t=0;#e=0;#r=new C;#o=N();#s=new bt;[zt](t){this.#t++,this.#e=0,this.#o=N(),t(),this.#o.resolve()}[It](){this.#s.unmountAll()}[Dt](){this.#s.remountAll()}constructor(t,e){this.element=t,this.shadow=e}get renderCount(){return this.#t}get rendered(){return this.#o.promise}styles(...t){this.once(()=>mt(this.shadow,t))}name(t){this.once(()=>this.element.setAttribute("view",t))}once(t){return this.#r.guarantee(this.#e++,t)}mount(t){return this.once(()=>this.#s.mount(t))}life(t){let e;return this.mount(()=>{let[s,o]=t();return e=s,o}),e}op={promise:t=>this.once(()=>Q.promise(t)),fn:t=>this.once(()=>Q.fn(t))};signal(t){return this.once(()=>M(t))}};var U=$e({mode:"open"}),Lt=class extends HTMLElement{};me({SlyView:Lt},{soft:!0,upgrade:!0});function $e(r){function t(e){class s extends dt{#t=document.createElement(r.tag??"sly-view");#e=this.#t.attachShadow(r);#r=new $t(this.#t,this.#e);#o=(()=>{let i=e(this.#r);return this.#t.setAttribute("view",r.name??""),r.styles&&mt(this.#e,r.styles),i})();#s=new C;#n=Y(0,(i,c)=>{this.isConnected&&this.#r[zt](()=>{ye(this.#t,i.attrs);let{result:a,seen:l}=f.seen(()=>this.#o(...c));$(a,this.#e);for(let u of l)this.#s.guarantee(u,()=>f.changed(u,async()=>this.#n(i,c)));$(i.children,this.#t)})});render(i,c){return this.#n(i,c),this.#t}disconnected(){this.#r[It]();for(let i of this.#s.values())i();this.#s.clear()}reconnected(){this.#r[Dt]()}}function o(n){let i=Ht(s),c=(...a)=>i(n,a);return c.props=c,c.with=a=>o({...n,...a}),c.children=(...a)=>o({...n,children:a}),c.attrs=a=>o({...n,attrs:a}),c.attr=(a,l)=>o({...n,attrs:{...n.attrs,[a]:l}}),c}return o({attrs:{},children:null})}return t.view=t,t.settings=e=>$e({...r,...e}),t}var H=y`
|
|
1
|
+
var Be=Object.defineProperty;var Ce=(r,t)=>{for(var e in t)Be(r,e,{get:t[e],enumerable:!0})};var tt=globalThis,et=tt.ShadowRoot&&(tt.ShadyCSS===void 0||tt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,At=Symbol(),Wt=new WeakMap,L=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==At)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(et&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=Wt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Wt.set(e,t))}return t}toString(){return this.cssText}},Ft=r=>new L(typeof r=="string"?r:r+"",void 0,At),m=(r,...t)=>{let e=r.length===1?r[0]:t.reduce(((s,o,n)=>s+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+r[n+1]),r[0]);return new L(e,r,At)},rt=(r,t)=>{if(et)r.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),o=tt.litNonce;o!==void 0&&s.setAttribute("nonce",o),s.textContent=e.cssText,r.appendChild(s)}},U=et?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return Ft(e)})(r):r;var{is:Pe,defineProperty:ke,getOwnPropertyDescriptor:Oe,getOwnPropertyNames:Te,getOwnPropertySymbols:je,getPrototypeOf:Me}=Object,st=globalThis,Zt=st.trustedTypes,Ue=Zt?Zt.emptyScript:"",He=st.reactiveElementPolyfillSupport,V=(r,t)=>r,vt={toAttribute(r,t){switch(t){case Boolean:r=r?Ue:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},Qt=(r,t)=>!Pe(r,t),Kt={attribute:!0,type:String,converter:vt,reflect:!1,useDefault:!1,hasChanged:Qt};Symbol.metadata??=Symbol("metadata"),st.litPropertyMetadata??=new WeakMap;var _=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Kt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),o=this.getPropertyDescriptor(t,s,e);o!==void 0&&ke(this.prototype,t,o)}}static getPropertyDescriptor(t,e,s){let{get:o,set:n}=Oe(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:o,set(i){let c=o?.call(this);n?.call(this,i),this.requestUpdate(t,c,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Kt}static _$Ei(){if(this.hasOwnProperty(V("elementProperties")))return;let t=Me(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(V("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(V("properties"))){let e=this.properties,s=[...Te(e),...je(e)];for(let o of s)this.createProperty(o,e[o])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,o]of e)this.elementProperties.set(s,o)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let o=this._$Eu(e,s);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let o of s)e.unshift(U(o))}else t!==void 0&&e.push(U(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return rt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(o!==void 0&&s.reflect===!0){let n=(s.converter?.toAttribute!==void 0?s.converter:vt).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(o):this.setAttribute(o,n),this._$Em=null}}_$AK(t,e){let s=this.constructor,o=s._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let n=s.getPropertyOptions(o),i=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:vt;this._$Em=o,this[o]=i.fromAttribute(e,n.type)??this._$Ej?.get(o)??null,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let o=this.constructor,n=this[t];if(s??=o.getPropertyOptions(t),!((s.hasChanged??Qt)(n,e)||s.useDefault&&s.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:o,wrapped:n},i){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),n!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),o===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[o,n]of this._$Ep)this[o]=n;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[o,n]of s){let{wrapped:i}=n,c=this[o];i!==!0||this._$AL.has(o)||c===void 0||this.C(o,void 0,n,c)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};_.elementStyles=[],_.shadowRootOptions={mode:"open"},_[V("elementProperties")]=new Map,_[V("finalized")]=new Map,He?.({ReactiveElement:_}),(st.reactiveElementVersions??=[]).push("2.1.0");var Et=globalThis,ot=Et.trustedTypes,Jt=ot?ot.createPolicy("lit-html",{createHTML:r=>r}):void 0,Bt="$lit$",w=`lit$${Math.random().toFixed(9).slice(2)}$`,Ct="?"+w,Re=`<${Ct}>`,B=document,W=()=>B.createComment(""),F=r=>r===null||typeof r!="object"&&typeof r!="function",Pt=Array.isArray,re=r=>Pt(r)||typeof r?.[Symbol.iterator]=="function",St=`[
|
|
2
|
+
\f\r]`,q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Gt=/-->/g,Yt=/>/g,S=RegExp(`>|${St}(?:([^\\s"'>=/]+)(${St}*=${St}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Xt=/'/g,te=/"/g,se=/^(?:script|style|textarea|title)$/i,kt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),v=kt(1),Br=kt(2),Cr=kt(3),C=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),ee=new WeakMap,E=B.createTreeWalker(B,129);function oe(r,t){if(!Pt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Jt!==void 0?Jt.createHTML(t):t}var ne=(r,t)=>{let e=r.length-1,s=[],o,n=t===2?"<svg>":t===3?"<math>":"",i=q;for(let c=0;c<e;c++){let a=r[c],l,h,u=-1,$=0;for(;$<a.length&&(i.lastIndex=$,h=i.exec(a),h!==null);)$=i.lastIndex,i===q?h[1]==="!--"?i=Gt:h[1]!==void 0?i=Yt:h[2]!==void 0?(se.test(h[2])&&(o=RegExp("</"+h[2],"g")),i=S):h[3]!==void 0&&(i=S):i===S?h[0]===">"?(i=o??q,u=-1):h[1]===void 0?u=-2:(u=i.lastIndex-h[2].length,l=h[1],i=h[3]===void 0?S:h[3]==='"'?te:Xt):i===te||i===Xt?i=S:i===Gt||i===Yt?i=q:(i=S,o=void 0);let A=i===S&&r[c+1].startsWith("/>")?" ":"";n+=i===q?a+Re:u>=0?(s.push(l),a.slice(0,u)+Bt+a.slice(u)+w+A):a+w+(u===-2?c:A)}return[oe(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},Z=class r{constructor({strings:t,_$litType$:e},s){let o;this.parts=[];let n=0,i=0,c=t.length-1,a=this.parts,[l,h]=ne(t,e);if(this.el=r.createElement(l,s),E.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(o=E.nextNode())!==null&&a.length<c;){if(o.nodeType===1){if(o.hasAttributes())for(let u of o.getAttributeNames())if(u.endsWith(Bt)){let $=h[i++],A=o.getAttribute(u).split(w),X=/([.?@])?(.*)/.exec($);a.push({type:1,index:n,name:X[2],strings:A,ctor:X[1]==="."?it:X[1]==="?"?at:X[1]==="@"?ct:k}),o.removeAttribute(u)}else u.startsWith(w)&&(a.push({type:6,index:n}),o.removeAttribute(u));if(se.test(o.tagName)){let u=o.textContent.split(w),$=u.length-1;if($>0){o.textContent=ot?ot.emptyScript:"";for(let A=0;A<$;A++)o.append(u[A],W()),E.nextNode(),a.push({type:2,index:++n});o.append(u[$],W())}}}else if(o.nodeType===8)if(o.data===Ct)a.push({type:2,index:n});else{let u=-1;for(;(u=o.data.indexOf(w,u+1))!==-1;)a.push({type:7,index:n}),u+=w.length-1}n++}}static createElement(t,e){let s=B.createElement("template");return s.innerHTML=t,s}};function P(r,t,e=r,s){if(t===C)return t;let o=s!==void 0?e._$Co?.[s]:e._$Cl,n=F(t)?void 0:t._$litDirective$;return o?.constructor!==n&&(o?._$AO?.(!1),n===void 0?o=void 0:(o=new n(r),o._$AT(r,e,s)),s!==void 0?(e._$Co??=[])[s]=o:e._$Cl=o),o!==void 0&&(t=P(r,o._$AS(r,t.values),o,s)),t}var nt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,o=(t?.creationScope??B).importNode(e,!0);E.currentNode=o;let n=E.nextNode(),i=0,c=0,a=s[0];for(;a!==void 0;){if(i===a.index){let l;a.type===2?l=new H(n,n.nextSibling,this,t):a.type===1?l=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(l=new lt(n,this,t)),this._$AV.push(l),a=s[++c]}i!==a?.index&&(n=E.nextNode(),i++)}return E.currentNode=B,o}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},H=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,o){this.type=2,this._$AH=f,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=P(this,t,e),F(t)?t===f||t==null||t===""?(this._$AH!==f&&this._$AR(),this._$AH=f):t!==this._$AH&&t!==C&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):re(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==f&&F(this._$AH)?this._$AA.nextSibling.data=t:this.T(B.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,o=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=Z.createElement(oe(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===o)this._$AH.p(e);else{let n=new nt(o,this),i=n.u(this.options);n.p(e),this.T(i),this._$AH=n}}_$AC(t){let e=ee.get(t.strings);return e===void 0&&ee.set(t.strings,e=new Z(t)),e}k(t){Pt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,o=0;for(let n of t)o===e.length?e.push(s=new r(this.O(W()),this.O(W()),this,this.options)):s=e[o],s._$AI(n),o++;o<e.length&&(this._$AR(s&&s._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},k=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,o,n){this.type=1,this._$AH=f,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=f}_$AI(t,e=this,s,o){let n=this.strings,i=!1;if(n===void 0)t=P(this,t,e,0),i=!F(t)||t!==this._$AH&&t!==C,i&&(this._$AH=t);else{let c=t,a,l;for(t=n[0],a=0;a<n.length-1;a++)l=P(this,c[s+a],e,a),l===C&&(l=this._$AH[a]),i||=!F(l)||l!==this._$AH[a],l===f?t=f:t!==f&&(t+=(l??"")+n[a+1]),this._$AH[a]=l}i&&!o&&this.j(t)}j(t){t===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},it=class extends k{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===f?void 0:t}},at=class extends k{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==f)}},ct=class extends k{constructor(t,e,s,o,n){super(t,e,s,o,n),this.type=5}_$AI(t,e=this){if((t=P(this,t,e,0)??f)===C)return;let s=this._$AH,o=t===f&&s!==f||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==f&&(s===f||o);o&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},lt=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){P(this,t)}},ie={M:Bt,P:w,A:Ct,C:1,L:ne,R:nt,D:re,V:P,I:H,H:k,N:at,U:ct,B:it,F:lt},ze=Et.litHtmlPolyfillSupport;ze?.(Z,H),(Et.litHtmlVersions??=[]).push("3.3.0");var O=(r,t,e)=>{let s=e?.renderBefore??t,o=s._$litPart$;if(o===void 0){let n=e?.renderBefore??null;s._$litPart$=o=new H(t.insertBefore(W(),n),n,void 0,e??{})}return o._$AI(r),o};var Ot=globalThis,R=class extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=O(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return C}};R._$litElement$=!0,R.finalized=!0,Ot.litElementHydrateSupport?.({LitElement:R});var Ne=Ot.litElementPolyfillSupport;Ne?.({LitElement:R});(Ot.litElementVersions??=[]).push("4.2.0");var g=Object.freeze({eq(r,t){if(r.length!==t.length)return!1;for(let e=0;e<=r.length;e++)if(r.at(e)!==t.at(e))return!1;return!0},random(r){return crypto.getRandomValues(new Uint8Array(r))}});var T=Object.freeze({fromBytes(r){return[...r].map(t=>t.toString(16).padStart(2,"0")).join("")},toBytes(r){if(r.length%2!==0)throw new Error("must have even number of hex characters");let t=new Uint8Array(r.length/2);for(let e=0;e<r.length;e+=2)t[e/2]=parseInt(r.slice(e,e+2),16);return t},random(r=32){return this.fromBytes(g.random(r))},string(r){return T.fromBytes(r)},bytes(r){return T.toBytes(r)}});var Tt=58,ut="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",jt=Object.freeze({fromBytes(r){let t=BigInt("0x"+T.fromBytes(r)),e="";for(;t>0;){let s=t%BigInt(Tt);t=t/BigInt(Tt),e=ut[Number(s)]+e}for(let s of r)if(s===0)e=ut[0]+e;else break;return e},toBytes(r){let t=BigInt(0);for(let i of r){let c=ut.indexOf(i);if(c===-1)throw new Error(`Invalid character '${i}' in base58 string`);t=t*BigInt(Tt)+BigInt(c)}let e=t.toString(16);e.length%2!==0&&(e="0"+e);let s=T.toBytes(e),o=0;for(let i of r)if(i===ut[0])o++;else break;let n=new Uint8Array(o+s.length);return n.set(s,o),n},random(r=32){return this.fromBytes(g.random(r))},string(r){return jt.fromBytes(r)},bytes(r){return jt.toBytes(r)}});var ae=class{lexicon;static lexicons=Object.freeze({base2:{characters:"01"},hex:{characters:"0123456789abcdef"},base36:{characters:"0123456789abcdefghijklmnopqrstuvwxyz"},base58:{characters:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"},base62:{characters:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"},base64url:{negativePrefix:"~",characters:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},base64:{characters:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",padding:{character:"=",size:4}}});lookup;negativePrefix;constructor(t){this.lexicon=t,this.lookup=Object.fromEntries([...t.characters].map((e,s)=>[e,s])),this.negativePrefix=t.negativePrefix??"-"}toBytes(t){let e=Math.log2(this.lexicon.characters.length);if(Number.isInteger(e)){let c=0,a=0,l=[];for(let h of t){if(h===this.lexicon.padding?.character)continue;let u=this.lookup[h];if(u===void 0)throw new Error(`Invalid character: ${h}`);for(c=c<<e|u,a+=e;a>=8;)a-=8,l.push(c>>a&255)}return new Uint8Array(l)}let s=0n,o=BigInt(this.lexicon.characters.length),n=!1;t.startsWith(this.negativePrefix)&&(t=t.slice(this.negativePrefix.length),n=!0);for(let c of t){let a=this.lookup[c];if(a===void 0)throw new Error(`Invalid character: ${c}`);s=s*o+BigInt(a)}let i=[];for(;s>0n;)i.unshift(Number(s%256n)),s=s/256n;return new Uint8Array(i)}fromBytes(t){let e=Math.log2(this.lexicon.characters.length);if(Number.isInteger(e)){let i=0,c=0,a="";for(let l of t)for(i=i<<8|l,c+=8;c>=e;){c-=e;let h=i>>c&(1<<e)-1;a+=this.lexicon.characters[h]}if(c>0){let l=i<<e-c&(1<<e)-1;a+=this.lexicon.characters[l]}if(this.lexicon.padding)for(;a.length%this.lexicon.padding.size!==0;)a+=this.lexicon.padding.character;return a}let s=0n;for(let i of t)s=(s<<8n)+BigInt(i);if(s===0n)return this.lexicon.characters[0];let o=BigInt(this.lexicon.characters.length),n="";for(;s>0n;)n=this.lexicon.characters[Number(s%o)]+n,s=s/o;return n}toInteger(t){if(!t)return 0;let e=0n,s=!1,o=BigInt(this.lexicon.characters.length);t.startsWith(this.negativePrefix)&&(t=t.slice(this.negativePrefix.length),s=!0);for(let n of t){let i=this.lookup[n];if(i===void 0)throw new Error(`Invalid character: ${n}`);e=e*o+BigInt(i)}return Number(s?-e:e)}fromInteger(t){t=Math.floor(t);let e=t<0,s=BigInt(e?-t:t);if(s===0n)return this.lexicon.characters[0];let o=BigInt(this.lexicon.characters.length),n="";for(;s>0n;)n=this.lexicon.characters[Number(s%o)]+n,s=s/o;return e?`${this.negativePrefix}${n}`:n}random(t=32){return this.fromBytes(g.random(t))}};var Mt=Object.freeze({fromBytes(r){return typeof btoa=="function"?btoa(String.fromCharCode(...r)):Buffer.from(r).toString("base64")},toBytes(r){return typeof atob=="function"?Uint8Array.from(atob(r),t=>t.charCodeAt(0)):Uint8Array.from(Buffer.from(r,"base64"))},random(r=32){return this.fromBytes(g.random(r))},string(r){return Mt.fromBytes(r)},bytes(r){return Mt.toBytes(r)}});var ce=Object.freeze({fromBytes(r){return new TextDecoder().decode(r)},toBytes(r){return new TextEncoder().encode(r)},string(r){return ce.fromBytes(r)},bytes(r){return ce.toBytes(r)}});function ht(r,t){let e,s,o=[];function n(){e=[],s&&clearTimeout(s),s=void 0,o=[]}return n(),((...i)=>{e=i,s&&clearTimeout(s);let c=new Promise((a,l)=>{o.push({resolve:a,reject:l})});return s=setTimeout(()=>{Promise.resolve().then(()=>t(...e)).then(a=>{for(let{resolve:l}of o)l(a);n()}).catch(a=>{for(let{reject:l}of o)l(a);n()})},r),c})}var Ut=Object.freeze({set:r=>r!=null,unset:r=>r==null,boolean:r=>typeof r=="boolean",number:r=>typeof r=="number",string:r=>typeof r=="string",bigint:r=>typeof r=="bigint",object:r=>typeof r=="object"&&r!==null,array:r=>Array.isArray(r),fn:r=>typeof r=="function",symbol:r=>typeof r=="symbol"});function K(){let r,t,e=new Promise((o,n)=>{r=o,t=n});function s(o){return o.then(r).catch(t),e}return{promise:e,resolve:r,reject:t,entangle:s}}var z=class r extends Map{static require(t,e){if(t.has(e))return t.get(e);throw new Error(`required key not found: "${e}"`)}static guarantee(t,e,s){if(t.has(e))return t.get(e);{let o=s();return t.set(e,o),o}}array(){return[...this]}require(t){return r.require(this,t)}guarantee(t,e){return r.guarantee(this,t,e)}};var le=(r=0)=>new Promise(t=>setTimeout(t,r));function De(r){return{map:t=>ue(r,t),filter:t=>he(r,t)}}De.pipe=Object.freeze({map:r=>(t=>ue(t,r)),filter:r=>(t=>he(t,r))});var ue=(r,t)=>Object.fromEntries(Object.entries(r).map(([e,s])=>[e,t(s,e)])),he=(r,t)=>Object.fromEntries(Object.entries(r).filter(([e,s])=>t(s,e)));function pe(){let r=new Set;function t(n){return r.add(n),()=>{r.delete(n)}}async function e(...n){await Promise.all([...r].map(i=>i(...n)))}async function s(){let{promise:n,resolve:i}=K(),c=t((...a)=>{i(a),c()});return n}function o(){r.clear()}return t.pub=e,t.sub=t,t.on=t,t.next=s,t.clear=o,e.pub=e,e.sub=t,e.on=t,e.next=s,e.clear=o,[e,t]}function pt(r){let t=pe()[1];return r&&t.sub(r),t}function Ht(r){let t=pe()[0];return r&&t.sub(r),t}function ft(r){let t,e=!1,s=()=>{e=!0,clearTimeout(t)},o=async()=>{e||(await r(s),!e&&(t=setTimeout(o,0)))};return o(),s}var Rt=class{#t=[];#e=new WeakMap;#r=[];#o=new Set;see(t){this.#t.at(-1)?.add(t)}seen(t){this.#t.push(new Set);let e=t();return{seen:this.#t.pop(),result:e}}async change(t){if(this.#o.has(t))throw new Error("circularity forbidden");let e=this.#s(t).pub();return this.#r.at(-1)?.add(e),e}changed(t,e){return this.#s(t)(async()=>{let s=new Set;this.#r.push(s),this.#o.add(t),s.add(e()),this.#o.delete(t),await Promise.all(s),this.#r.pop()})}#s(t){let e=this.#e.get(t);return e||(e=pt(),this.#e.set(t,e)),e}},Ie=Symbol.for("e280.tracker.v2"),y=globalThis[Ie]??=new Rt;var{I:qo}=ie;var fe=r=>r.strings===void 0;var de={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},zt=r=>(...t)=>({_$litDirective$:r,values:t}),dt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var Q=(r,t)=>{let e=r._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),Q(s,t);return!0},mt=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while(e?.size===0)},me=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),qe(t)}};function Le(r){this._$AN!==void 0?(mt(this),this._$AM=r,me(this)):this._$AM=r}function Ve(r,t=!1,e=0){let s=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(s))for(let n=e;n<s.length;n++)Q(s[n],!1),mt(s[n]);else s!=null&&(Q(s,!1),mt(s));else Q(this,r)}var qe=r=>{r.type==de.CHILD&&(r._$AP??=Ve,r._$AQ??=Le)},yt=class extends dt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),me(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(Q(this,t),mt(this))}setValue(t){if(fe(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};function ye(r){return r.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function ge(r,t={}){let{soft:e=!1,upgrade:s=!0}=t;for(let[o,n]of Object.entries(r)){let i=ye(o),c=customElements.get(i);e&&c||(customElements.define(i,n),s&&document.querySelectorAll(i).forEach(a=>{a.constructor===HTMLElement&&customElements.upgrade(a)}))}}function be(r,t){for(let[e,s]of Object.entries(t))s===void 0||s===null?r.removeAttribute(e):typeof s=="string"?r.setAttribute(e,s):typeof s=="number"?r.setAttribute(e,s.toString()):typeof s=="boolean"?s===!0?r.setAttribute(e,""):r.removeAttribute(e):console.warn(`invalid attribute type ${e} is ${typeof s}`)}function gt(r,t){rt(r,We(t))}function We(r){let t=[];if(Array.isArray(r)){let e=new Set(r.flat(1/0).reverse());for(let s of e)t.unshift(U(s))}else r!==void 0&&t.push(U(r));return t}function Nt(r,t=r){let{seen:e,result:s}=y.seen(r),o=ht(0,t),n=[],i=()=>n.forEach(c=>c());for(let c of e){let a=y.changed(c,o);n.push(a)}return{result:s,dispose:i}}var Fe={compare:(r,t)=>r===t};function N(r={}){return{...Fe,...r}}var bt=class{sneak;constructor(t){this.sneak=t}get(){return y.see(this),this.sneak}get value(){return this.get()}},xt=class extends bt{on=pt();dispose(){this.on.clear()}},J=class extends xt{_options;kind="signal";_lock=!1;constructor(t,e){super(t),this._options=e}async set(t){return!this._options.compare(this.sneak,t)&&await this.publish(t),t}get value(){return this.get()}set value(t){this.set(t)}async publish(t=this.get()){if(this._lock)throw new Error("forbid circularity");let e=Promise.resolve();try{this._lock=!0,this.sneak=t,e=Promise.all([y.change(this),this.on.pub(t)])}finally{this._lock=!1}return await e,t}},G=class extends bt{_formula;_options;kind="lazy";_dirty=!1;_effect;constructor(t,e){super(void 0),this._formula=t,this._options=e}get(){if(!this._effect){let{result:t,dispose:e}=Nt(this._formula,()=>this._dirty=!0);this._effect=e,this.sneak=t}if(this._dirty){this._dirty=!1;let t=this._formula();!this._options.compare(this.sneak,t)&&(this.sneak=t,y.change(this))}return super.get()}get value(){return this.get()}dispose(){this._effect&&this._effect()}},Y=class extends xt{_effect;static make(t,e,s){let{result:o,dispose:n}=Nt(e,async()=>{let i=e();!s.compare(t.sneak,i)&&(t.sneak=i,await Promise.all([y.change(t),t.on.pub(i)]))});return new this(o,n)}kind="derived";constructor(t,e){super(t),this._effect=e}get value(){return this.get()}dispose(){super.dispose(),this._effect()}};function xe(r,t={}){function e(){return e.value}let s=N(t),o=new G(r,s);return Object.setPrototypeOf(e,G.prototype),Object.assign(e,o),e}function $e(r,t={}){function e(){return e.value}let s=N(t),o=Y.make(e,r,s);return Object.setPrototypeOf(e,Y.prototype),Object.assign(e,o),e}function D(r,t={}){function e(n){return n!==void 0?e.set(n):e.get()}let s=N(t),o=new J(r,s);return Object.setPrototypeOf(e,J.prototype),Object.assign(e,o),e}D.lazy=xe;D.derive=$e;var j={status:r=>r[0],value:r=>r[0]==="ready"?r[1]:void 0,error:r=>r[0]==="error"?r[1]:void 0,select:(r,t)=>{switch(r[0]){case"loading":return t.loading();case"error":return t.error(r[1]);case"ready":return t.ready(r[1]);default:throw new Error("unknown op status")}},morph:(r,t)=>j.select(r,{loading:()=>["loading"],error:e=>["error",e],ready:e=>["ready",t(e)]}),all:(...r)=>{let t=[],e=[],s=0;for(let o of r)switch(o[0]){case"loading":s++;break;case"ready":t.push(o[1]);break;case"error":e.push(o[1]);break}return e.length>0?["error",e]:s===0?["ready",t]:["loading"]}};var M=class r{static loading(){return new this}static ready(t){return new this(["ready",t])}static error(t){return new this(["error",t])}static promise(t){let e=new this;return e.promise(t),e}static fn(t){return this.promise(t())}static all(...t){let e=t.map(o=>o.pod),s=j.all(...e);return new this(s)}signal;#t=Ht();#e=Ht();constructor(t=["loading"]){this.signal=D(t)}get wait(){return new Promise((t,e)=>{this.#t.next().then(t),this.#e.next().then(e)})}async setLoading(){await this.signal(["loading"])}async setReady(t){await this.signal(["ready",t]),await this.#t(t)}async setError(t){await this.signal(["error",t]),await this.#e(t)}async promise(t){await this.setLoading();try{let e=await t;return await this.setReady(e),e}catch(e){await this.setError(e)}}async fn(t){return this.promise(t())}get pod(){return this.signal()}set pod(t){this.signal(t)}get status(){return this.signal()[0]}get value(){return j.value(this.signal())}get error(){return j.error(this.signal())}get isLoading(){return this.status==="loading"}get isReady(){return this.status==="ready"}get isError(){return this.status==="error"}require(){let t=this.signal();if(t[0]!=="ready")throw new Error("required value not ready");return t[1]}select(t){return j.select(this.signal(),t)}morph(t){return new r(j.morph(this.pod,t))}};var $t=class{#t=[];#e=[];mount(t){this.#t.push(t),this.#e.push(t())}unmountAll(){for(let t of this.#e)t();this.#e=[]}remountAll(){for(let t of this.#t)this.#e.push(t())}};var Dt=Symbol(),It=Symbol(),Lt=Symbol(),_t=class{element;shadow;render;#t=0;#e=0;#r=new z;#o=K();#s=new $t;[Dt](t){this.#t++,this.#e=0,this.#o=K(),t(),this.#o.resolve()}[It](){this.#s.unmountAll()}[Lt](){this.#s.remountAll()}constructor(t,e,s){this.element=t,this.shadow=e,this.render=s}get renderCount(){return this.#t}get rendered(){return this.#o.promise}name(t){this.once(()=>this.element.setAttribute("view",t))}styles(...t){this.once(()=>gt(this.shadow,t))}once(t){return this.#r.guarantee(this.#e++,t)}mount(t){return this.once(()=>this.#s.mount(t))}life(t){let e;return this.mount(()=>{let[s,o]=t();return e=s,o}),e}op={fn:t=>this.once(()=>M.fn(t)),promise:t=>this.once(()=>M.promise(t))};signal(t){return this.once(()=>D(t))}};var b=_e({mode:"open"}),Vt=class extends HTMLElement{};ge({SlyView:Vt},{soft:!0,upgrade:!0});function _e(r){function t(e){class s extends yt{#t=document.createElement(r.tag??"sly-view");#e=this.#t.attachShadow(r);#r=new _t(this.#t,this.#e,()=>this.#i());#o=(()=>{let i=e(this.#r);return this.#t.setAttribute("view",r.name??""),r.styles&>(this.#e,r.styles),i})();#s=new z;#n;#i(){if(!this.#n||!this.isConnected)return;let{with:i,props:c}=this.#n;this.#r[Dt](()=>{be(this.#t,i.attrs);let{result:a,seen:l}=y.seen(()=>this.#o(...c));O(a,this.#e);for(let h of l)this.#s.guarantee(h,()=>y.changed(h,async()=>this.#a()));O(i.children,this.#t)})}#a=ht(0,()=>this.#i());render(i,c){return this.#n={with:i,props:c},this.#i(),this.#t}disconnected(){this.#r[It]();for(let i of this.#s.values())i();this.#s.clear()}reconnected(){this.#r[Lt]()}}function o(n){let i=zt(s),c=(...a)=>i(n,a);return c.props=c,c.with=a=>o({...n,...a}),c.children=(...a)=>o({...n,children:a}),c.attrs=a=>o({...n,attrs:a}),c.attr=(a,l)=>o({...n,attrs:{...n.attrs,[a]:l}}),c}return o({attrs:{},children:null})}return t.view=t,t.settings=e=>_e({...r,...e}),t}var x=m`
|
|
4
4
|
@layer reset {
|
|
5
5
|
* {
|
|
6
6
|
margin: 0;
|
|
@@ -16,26 +16,75 @@ var d=Object.freeze({eq(r,t){if(r.length!==t.length)return!1;for(let e=0;e<=r.le
|
|
|
16
16
|
::-webkit-scrollbar-thumb { background: #333; border-radius: 1em; }
|
|
17
17
|
::-webkit-scrollbar-thumb:hover { background: #444; }
|
|
18
18
|
}
|
|
19
|
-
`;var
|
|
19
|
+
`;var we=b(r=>()=>{r.name("counter"),r.styles(x,Ze);let t=r.once(()=>Date.now()),e=r.signal(0);r.mount(()=>ft(async()=>{let n=Date.now()-t;e(Math.floor(n/1e3))}));let s=r.signal(0),o=()=>s(s()+1);return v`
|
|
20
|
+
<div>
|
|
21
|
+
<span>${e()}</span>
|
|
22
|
+
</div>
|
|
23
|
+
<div>
|
|
24
|
+
<span>${s()}</span>
|
|
25
|
+
<button @click="${o}">+</button>
|
|
26
|
+
</div>
|
|
27
|
+
`}),Ze=m`
|
|
28
|
+
:host {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
text-align: center;
|
|
33
|
+
}
|
|
34
|
+
`;var wt={};Ce(wt,{arrow:()=>Ge,arrow2:()=>Ye,bar:()=>Xe,bar2:()=>tr,bar3:()=>er,bar4:()=>rr,bin:()=>cr,binary:()=>lr,binary2:()=>ur,braille:()=>qt,bright:()=>mr,clock:()=>hr,cylon:()=>or,earth:()=>fr,fistbump:()=>pr,lock:()=>dr,moon:()=>gr,pie:()=>sr,pulse:()=>ar,scrubber:()=>ir,slider:()=>nr,speaker:()=>yr,spinner:()=>Je});function p(r,t){return()=>Ke({hz:r,frames:t})}var Ke=b(r=>({hz:t,frames:e})=>{r.name("loading"),r.styles(x,Qe);let s=r.signal(0);return r.mount(()=>ft(async()=>{await le(1e3/t);let o=s()+1;s(o>=e.length?0:o)})),e.at(s())}),Qe=m`
|
|
20
35
|
:host {
|
|
21
36
|
font-family: monospace;
|
|
37
|
+
white-space: pre;
|
|
38
|
+
user-select: none;
|
|
22
39
|
}
|
|
23
|
-
|
|
40
|
+
`;var d=20,Je=p(d,["|","/","-","\\"]),qt=p(d,["\u2808","\u2810","\u2820","\u2880","\u2840","\u2804","\u2802","\u2801"]),Ge=p(d,["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]),Ye=p(d,["\u2B06\uFE0F","\u2197\uFE0F","\u27A1\uFE0F","\u2198\uFE0F","\u2B07\uFE0F","\u2199\uFE0F","\u2B05\uFE0F","\u2196\uFE0F"]),Xe=p(d,["\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1","\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1"]),tr=p(d,["\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B1","\u25B1\u25B1\u25B0\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B1\u25B0\u25B1\u25B1\u25B1"]),er=p(d,["\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B1\u25B0\u25B0\u25B0\u25B1","\u25B1\u25B1\u25B0\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B0\u25B0\u25B0","\u25B1\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1"]),rr=p(d,["\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B1\u25B0\u25B0\u25B0\u25B0","\u25B1\u25B1\u25B0\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B0\u25B0","\u25B1\u25B1\u25B1\u25B1\u25B0"]),sr=p(d,["\u25F7","\u25F6","\u25F5","\u25F4"]),or=p(d,["=----","-=---","--=--","---=-","----=","----=","---=-","--=--","-=---","=----"]),nr=p(d,["o----","-o---","--o--","---o-","----o","----o","---o-","--o--","-o---","o----"]),ir=p(d,[":....",":....","::...",".::..","..::.","...::","....:","....:","...::","..::.",".::..","::..."]),ar=p(d,[".....",".....","..:..",".:::.",".:::.",":::::",":::::","::.::",":...:"]),cr=p(d,["000","100","110","111","011","001"]),lr=p(d,["11111","01111","00111","10011","11001","01100","00110","10011","11001","11100","11110"]),ur=p(d,["11111","01111","10111","11011","11101","11110","11111","11110","11101","11011","10111","01111"]),hr=p(d,["\u{1F550}","\u{1F551}","\u{1F552}","\u{1F553}","\u{1F554}","\u{1F555}","\u{1F556}","\u{1F557}","\u{1F558}","\u{1F559}","\u{1F55A}","\u{1F55B}"]),pr=p(d,["\u{1F91C} \u{1F91B}","\u{1F91C} \u{1F91B}","\u{1F91C} \u{1F91B}"," \u{1F91C} \u{1F91B} "," \u{1F91C}\u{1F91B} "," \u{1F91C}\u{1F91B} "," \u{1F91C}\u{1F4A5}\u{1F91B} ","\u{1F91C} \u{1F4A5} \u{1F91B}","\u{1F91C} \u2728 \u{1F91B}","\u{1F91C} \u2728 \u{1F91B}"]),fr=p(4,["\u{1F30E}","\u{1F30F}","\u{1F30D}"]),dr=p(4,["\u{1F513}","\u{1F512}"]),mr=p(4,["\u{1F505}","\u{1F506}"]),yr=p(4,["\u{1F508}","\u{1F508}","\u{1F509}","\u{1F50A}","\u{1F50A}","\u{1F509}"]),gr=p(10,["\u{1F311}","\u{1F311}","\u{1F311}","\u{1F318}","\u{1F317}","\u{1F316}","\u{1F315}","\u{1F314}","\u{1F313}","\u{1F312}"]);var Ae=b(r=>t=>(r.name("error"),r.styles(x,br),typeof t=="string"?t:t instanceof Error?v`<strong>${t.name}:</strong> <span>${t.message}</span>`:"error")),br=m`
|
|
24
41
|
:host {
|
|
25
42
|
font-family: monospace;
|
|
26
43
|
color: red;
|
|
27
44
|
}
|
|
28
|
-
|
|
45
|
+
`;function ve(r=qt,t=e=>Ae(e)){return(e,s)=>e.select({loading:r,ready:s,error:t})}var Se=b(r=>()=>{r.name("loaders"),r.styles(x,xr);let t=r.once(()=>M.loading());return r.once(()=>Object.entries(wt).map(([s,o])=>({key:s,loader:ve(o)}))).map(({key:s,loader:o})=>v`
|
|
46
|
+
<div data-anim="${s}">
|
|
47
|
+
<span>${s}</span>
|
|
48
|
+
<span>${o(t,()=>null)}</span>
|
|
49
|
+
</div>
|
|
50
|
+
`)}),xr=m`
|
|
29
51
|
:host {
|
|
30
52
|
display: flex;
|
|
31
|
-
flex-direction:
|
|
53
|
+
flex-direction: row;
|
|
32
54
|
justify-content: center;
|
|
33
|
-
|
|
55
|
+
flex-wrap: wrap;
|
|
56
|
+
|
|
57
|
+
gap: 0.2em;
|
|
58
|
+
padding: 1em;
|
|
59
|
+
|
|
60
|
+
width: 100%;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
div {
|
|
64
|
+
font-family: monospace;
|
|
65
|
+
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
align-items: center;
|
|
69
|
+
gap: 0.4em;
|
|
70
|
+
|
|
71
|
+
padding: 0.2em 0.5em;
|
|
72
|
+
background: var(--pill);
|
|
73
|
+
border-radius: 0.5em;
|
|
74
|
+
|
|
75
|
+
span:nth-child(1) { font-size: 0.6em; }
|
|
76
|
+
span:nth-child(2) { font-size: 1.2em; }
|
|
77
|
+
}
|
|
78
|
+
`;var Ee=b(r=>()=>(r.name("demo"),r.styles(x,$r),v`
|
|
79
|
+
${we()}
|
|
80
|
+
${Se()}
|
|
81
|
+
`)),$r=m`
|
|
82
|
+
:host {
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
gap: 1em;
|
|
34
86
|
}
|
|
35
|
-
|
|
36
|
-
<p>${t} <slot></slot> ${e()}</p>
|
|
37
|
-
<p>${Ae.dots(s,()=>"op loaded")}</p>
|
|
38
|
-
`});$(We.attr("class","incredi").children("world").props("hello"),T(".demo"));
|
|
87
|
+
`;function I(r,t=document){let e=t.querySelector(r);if(!e)throw new Error(`$1 ${r} not found`);return e}function _r(r,t=document){return Array.from(t.querySelectorAll(r))}I.maybe=(r,t=document)=>t.querySelector(r);I.all=_r;I.render=(r,...t)=>O(t,r);I.render(I(".demo"),Ee());console.log("\u{1F99D} sly");
|
|
39
88
|
/*! Bundled license information:
|
|
40
89
|
|
|
41
90
|
@lit/reactive-element/css-tag.js:
|