@e280/shiny 0.1.0-1 → 0.1.0-10
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 +110 -3
- package/package.json +3 -3
- package/s/{ui → components}/copy/component.ts +11 -6
- package/s/{ui → components}/copy/style.css.ts +6 -6
- package/s/components/drawer/component.ts +92 -0
- package/s/components/drawer/control.ts +31 -0
- package/s/components/drawer/style.css.ts +120 -0
- package/s/{ui → components}/example/component.ts +7 -5
- package/s/{ui → components}/example/style.css.ts +2 -2
- package/s/components/foundation.css.ts +15 -0
- package/s/components/framework.ts +10 -0
- package/s/components/raw-components.ts +13 -0
- package/s/components/tabs/component.ts +59 -0
- package/s/components/tabs/control.ts +31 -0
- package/s/components/tabs/style.css.ts +6 -0
- package/s/demo/aura-views.ts +6 -0
- package/s/demo/demo.bundle.ts +204 -14
- package/s/demo/demo.css +3 -1
- package/s/demo/utils/lipsum.ts +19 -0
- package/s/demo/views/demonstration/style.css.ts +10 -2
- package/s/demo/views/demonstration/view.ts +18 -14
- package/s/icons/tabler/menu-2.svg.ts +4 -0
- package/s/icons/tabler/x.svg.ts +4 -0
- package/s/index.html.ts +2 -2
- package/s/index.ts +16 -4
- package/s/install/aura.bundle.ts +9 -0
- package/s/install/plain.bundle.ts +9 -0
- package/s/shiny.ts +15 -0
- package/s/themes/aura.css.ts +48 -0
- package/s/themes/index.barrel.ts +2 -1
- package/s/themes/index.ts +1 -0
- package/s/themes/infra/css-vars.ts +33 -0
- package/s/themes/plain.css.ts +12 -0
- package/s/utils/states.ts +15 -0
- package/x/{ui → components}/copy/component.d.ts +8 -4
- package/x/{ui → components}/copy/component.js +10 -5
- package/x/components/copy/component.js.map +1 -0
- package/x/{ui → components}/copy/style.css.js +6 -6
- package/x/components/copy/style.css.js.map +1 -0
- package/x/components/drawer/component.d.ts +387 -0
- package/x/components/drawer/component.js +76 -0
- package/x/components/drawer/component.js.map +1 -0
- package/x/components/drawer/control.d.ts +9 -0
- package/x/components/drawer/control.js +24 -0
- package/x/components/drawer/control.js.map +1 -0
- package/x/components/drawer/style.css.js +119 -0
- package/x/components/drawer/style.css.js.map +1 -0
- package/x/{ui → components}/example/component.d.ts +3 -3
- package/x/{ui → components}/example/component.js +6 -4
- package/x/components/example/component.js.map +1 -0
- package/x/components/example/style.css.d.ts +2 -0
- package/x/components/example/style.css.js +10 -0
- package/x/components/example/style.css.js.map +1 -0
- package/x/components/foundation.css.d.ts +1 -0
- package/x/components/foundation.css.js +14 -0
- package/x/components/foundation.css.js.map +1 -0
- package/x/components/framework.d.ts +8 -0
- package/x/components/framework.js +5 -0
- package/x/components/framework.js.map +1 -0
- package/x/components/raw-components.d.ts +10 -0
- package/x/components/raw-components.js +11 -0
- package/x/components/raw-components.js.map +1 -0
- package/x/components/tabs/component.d.ts +374 -0
- package/x/components/tabs/component.js +49 -0
- package/x/components/tabs/component.js.map +1 -0
- package/x/components/tabs/control.d.ts +9 -0
- package/x/components/tabs/control.js +24 -0
- package/x/components/tabs/control.js.map +1 -0
- package/x/components/tabs/style.css.d.ts +2 -0
- package/x/components/tabs/style.css.js +5 -0
- package/x/components/tabs/style.css.js.map +1 -0
- package/x/demo/aura-views.d.ts +14 -0
- package/x/demo/aura-views.js +4 -0
- package/x/demo/aura-views.js.map +1 -0
- package/x/demo/demo.bundle.js +198 -14
- package/x/demo/demo.bundle.js.map +1 -1
- package/x/demo/demo.bundle.min.js +383 -48
- package/x/demo/demo.bundle.min.js.map +4 -4
- package/x/demo/demo.css +3 -1
- package/x/demo/utils/lipsum.d.ts +2 -0
- package/x/demo/utils/lipsum.js +11 -0
- package/x/demo/utils/lipsum.js.map +1 -0
- package/x/demo/views/demonstration/style.css.js +10 -2
- package/x/demo/views/demonstration/style.css.js.map +1 -1
- package/x/demo/views/demonstration/view.d.ts +6 -4
- package/x/demo/views/demonstration/view.js +16 -10
- package/x/demo/views/demonstration/view.js.map +1 -1
- package/x/icons/tabler/menu-2.svg.d.ts +2 -0
- package/x/icons/tabler/menu-2.svg.js +3 -0
- package/x/icons/tabler/menu-2.svg.js.map +1 -0
- package/x/icons/tabler/x.svg.d.ts +2 -0
- package/x/icons/tabler/x.svg.js +3 -0
- package/x/icons/tabler/x.svg.js.map +1 -0
- package/x/index.d.ts +10 -4
- package/x/index.html +7 -5
- package/x/index.html.js +2 -2
- package/x/index.js +10 -4
- package/x/index.js.map +1 -1
- package/x/install/aura.bundle.d.ts +1 -0
- package/x/install/aura.bundle.js +5 -0
- package/x/install/aura.bundle.js.map +1 -0
- package/x/install/aura.bundle.min.js +321 -0
- package/x/install/aura.bundle.min.js.map +7 -0
- package/x/install/plain.bundle.d.ts +1 -0
- package/x/install/plain.bundle.js +5 -0
- package/x/install/plain.bundle.js.map +1 -0
- package/x/install/plain.bundle.min.js +287 -0
- package/x/install/plain.bundle.min.js.map +7 -0
- package/x/shiny.d.ts +42 -0
- package/x/shiny.js +8 -0
- package/x/shiny.js.map +1 -0
- package/x/themes/aura.css.d.ts +1 -0
- package/x/themes/aura.css.js +47 -0
- package/x/themes/aura.css.js.map +1 -0
- package/x/themes/index.barrel.d.ts +2 -1
- package/x/themes/index.barrel.js +2 -1
- package/x/themes/index.barrel.js.map +1 -1
- package/x/themes/index.d.ts +1 -0
- package/x/themes/infra/css-vars.d.ts +11 -0
- package/x/themes/infra/css-vars.js +18 -0
- package/x/themes/infra/css-vars.js.map +1 -0
- package/x/themes/plain.css.d.ts +1 -0
- package/x/themes/plain.css.js +11 -0
- package/x/themes/plain.css.js.map +1 -0
- package/x/utils/states.d.ts +5 -0
- package/x/utils/states.js +13 -0
- package/x/utils/states.js.map +1 -0
- package/s/themes/basic.css.ts +0 -18
- package/s/tools/untab.ts +0 -30
- package/s/ui/components.ts +0 -9
- package/s/ui/framework.ts +0 -8
- package/s/ui/themers.ts +0 -28
- package/x/themes/basic.css.d.ts +0 -1
- package/x/themes/basic.css.js +0 -17
- package/x/themes/basic.css.js.map +0 -1
- package/x/tools/untab.d.ts +0 -1
- package/x/tools/untab.js +0 -26
- package/x/tools/untab.js.map +0 -1
- package/x/ui/components.d.ts +0 -6
- package/x/ui/components.js +0 -7
- package/x/ui/components.js.map +0 -1
- package/x/ui/copy/component.js.map +0 -1
- package/x/ui/copy/style.css.js.map +0 -1
- package/x/ui/example/component.js.map +0 -1
- package/x/ui/example/style.css.js +0 -10
- package/x/ui/example/style.css.js.map +0 -1
- package/x/ui/framework.d.ts +0 -4
- package/x/ui/framework.js +0 -6
- package/x/ui/framework.js.map +0 -1
- package/x/ui/themers.d.ts +0 -8
- package/x/ui/themers.js +0 -12
- package/x/ui/themers.js.map +0 -1
- /package/x/{ui → components}/copy/style.css.d.ts +0 -0
- /package/x/{ui/example → components/drawer}/style.css.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
\f\r]`,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
1
|
+
var wt=globalThis,vt=wt.ShadowRoot&&(wt.ShadyCSS===void 0||wt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ie=Symbol(),xe=new WeakMap,ot=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==ie)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(vt&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=xe.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&xe.set(e,t))}return t}toString(){return this.cssText}},$t=r=>new ot(typeof r=="string"?r:r+"",void 0,ie),m=(r,...t)=>{let e=r.length===1?r[0]:t.reduce(((s,o,i)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+r[i+1]),r[0]);return new ot(e,r,ie)},_t=(r,t)=>{if(vt)r.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),o=wt.litNonce;o!==void 0&&s.setAttribute("nonce",o),s.textContent=e.cssText,r.appendChild(s)}},B=vt?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return $t(e)})(r):r;var{is:gr,defineProperty:br,getOwnPropertyDescriptor:yr,getOwnPropertyNames:xr,getOwnPropertySymbols:wr,getPrototypeOf:vr}=Object,At=globalThis,we=At.trustedTypes,$r=we?we.emptyScript:"",_r=At.reactiveElementPolyfillSupport,it=(r,t)=>r,ne={toAttribute(r,t){switch(t){case Boolean:r=r?$r: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}},$e=(r,t)=>!gr(r,t),ve={attribute:!0,type:String,converter:ne,reflect:!1,useDefault:!1,hasChanged:$e};Symbol.metadata??=Symbol("metadata"),At.litPropertyMetadata??=new WeakMap;var S=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=ve){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&&br(this.prototype,t,o)}}static getPropertyDescriptor(t,e,s){let{get:o,set:i}=yr(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:o,set(n){let l=o?.call(this);i?.call(this,n),this.requestUpdate(t,l,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ve}static _$Ei(){if(this.hasOwnProperty(it("elementProperties")))return;let t=vr(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(it("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(it("properties"))){let e=this.properties,s=[...xr(e),...wr(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(B(o))}else t!==void 0&&e.push(B(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 _t(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 i=(s.converter?.toAttribute!==void 0?s.converter:ne).toAttribute(e,s.type);this._$Em=t,i==null?this.removeAttribute(o):this.setAttribute(o,i),this._$Em=null}}_$AK(t,e){let s=this.constructor,o=s._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let i=s.getPropertyOptions(o),n=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:ne;this._$Em=o;let l=n.fromAttribute(e,i.type);this[o]=l??this._$Ej?.get(o)??l,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let o=this.constructor,i=this[t];if(s??=o.getPropertyOptions(t),!((s.hasChanged??$e)(i,e)||s.useDefault&&s.reflect&&i===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:i},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),i!==!0||n!==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,i]of this._$Ep)this[o]=i;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[o,i]of s){let{wrapped:n}=i,l=this[o];n!==!0||this._$AL.has(o)||l===void 0||this.C(o,void 0,i,l)}}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){}};S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[it("elementProperties")]=new Map,S[it("finalized")]=new Map,_r?.({ReactiveElement:S}),(At.reactiveElementVersions??=[]).push("2.1.1");var le=globalThis,kt=le.trustedTypes,_e=kt?kt.createPolicy("lit-html",{createHTML:r=>r}):void 0,ce="$lit$",E=`lit$${Math.random().toFixed(9).slice(2)}$`,pe="?"+E,Ar=`<${pe}>`,N=document,at=()=>N.createComment(""),lt=r=>r===null||typeof r!="object"&&typeof r!="function",he=Array.isArray,Te=r=>he(r)||typeof r?.[Symbol.iterator]=="function",ae=`[
|
|
2
|
+
\f\r]`,nt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ae=/-->/g,ke=/>/g,M=RegExp(`>|${ae}(?:([^\\s"'>=/]+)(${ae}*=${ae}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Se=/'/g,Ee=/"/g,Pe=/^(?:script|style|textarea|title)$/i,ue=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),f=ue(1),_=ue(2),Zr=ue(3),U=Symbol.for("lit-noChange"),x=Symbol.for("lit-nothing"),Ce=new WeakMap,H=N.createTreeWalker(N,129);function Oe(r,t){if(!he(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return _e!==void 0?_e.createHTML(t):t}var Re=(r,t)=>{let e=r.length-1,s=[],o,i=t===2?"<svg>":t===3?"<math>":"",n=nt;for(let l=0;l<e;l++){let a=r[l],u,d,c=-1,y=0;for(;y<a.length&&(n.lastIndex=y,d=n.exec(a),d!==null);)y=n.lastIndex,n===nt?d[1]==="!--"?n=Ae:d[1]!==void 0?n=ke:d[2]!==void 0?(Pe.test(d[2])&&(o=RegExp("</"+d[2],"g")),n=M):d[3]!==void 0&&(n=M):n===M?d[0]===">"?(n=o??nt,c=-1):d[1]===void 0?c=-2:(c=n.lastIndex-d[2].length,u=d[1],n=d[3]===void 0?M:d[3]==='"'?Ee:Se):n===Ee||n===Se?n=M:n===Ae||n===ke?n=nt:(n=M,o=void 0);let T=n===M&&r[l+1].startsWith("/>")?" ":"";i+=n===nt?a+Ar:c>=0?(s.push(u),a.slice(0,c)+ce+a.slice(c)+E+T):a+E+(c===-2?l:T)}return[Oe(r,i+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},ct=class r{constructor({strings:t,_$litType$:e},s){let o;this.parts=[];let i=0,n=0,l=t.length-1,a=this.parts,[u,d]=Re(t,e);if(this.el=r.createElement(u,s),H.currentNode=this.el.content,e===2||e===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(o=H.nextNode())!==null&&a.length<l;){if(o.nodeType===1){if(o.hasAttributes())for(let c of o.getAttributeNames())if(c.endsWith(ce)){let y=d[n++],T=o.getAttribute(c).split(E),xt=/([.?@])?(.*)/.exec(y);a.push({type:1,index:i,name:xt[2],strings:T,ctor:xt[1]==="."?Et:xt[1]==="?"?Ct:xt[1]==="@"?Tt:D}),o.removeAttribute(c)}else c.startsWith(E)&&(a.push({type:6,index:i}),o.removeAttribute(c));if(Pe.test(o.tagName)){let c=o.textContent.split(E),y=c.length-1;if(y>0){o.textContent=kt?kt.emptyScript:"";for(let T=0;T<y;T++)o.append(c[T],at()),H.nextNode(),a.push({type:2,index:++i});o.append(c[y],at())}}}else if(o.nodeType===8)if(o.data===pe)a.push({type:2,index:i});else{let c=-1;for(;(c=o.data.indexOf(E,c+1))!==-1;)a.push({type:7,index:i}),c+=E.length-1}i++}}static createElement(t,e){let s=N.createElement("template");return s.innerHTML=t,s}};function j(r,t,e=r,s){if(t===U)return t;let o=s!==void 0?e._$Co?.[s]:e._$Cl,i=lt(t)?void 0:t._$litDirective$;return o?.constructor!==i&&(o?._$AO?.(!1),i===void 0?o=void 0:(o=new i(r),o._$AT(r,e,s)),s!==void 0?(e._$Co??=[])[s]=o:e._$Cl=o),o!==void 0&&(t=j(r,o._$AS(r,t.values),o,s)),t}var St=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??N).importNode(e,!0);H.currentNode=o;let i=H.nextNode(),n=0,l=0,a=s[0];for(;a!==void 0;){if(n===a.index){let u;a.type===2?u=new V(i,i.nextSibling,this,t):a.type===1?u=new a.ctor(i,a.name,a.strings,this,t):a.type===6&&(u=new Pt(i,this,t)),this._$AV.push(u),a=s[++l]}n!==a?.index&&(i=H.nextNode(),n++)}return H.currentNode=N,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++}},V=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,o){this.type=2,this._$AH=x,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=j(this,t,e),lt(t)?t===x||t==null||t===""?(this._$AH!==x&&this._$AR(),this._$AH=x):t!==this._$AH&&t!==U&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Te(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!==x&<(this._$AH)?this._$AA.nextSibling.data=t:this.T(N.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=ct.createElement(Oe(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===o)this._$AH.p(e);else{let i=new St(o,this),n=i.u(this.options);i.p(e),this.T(n),this._$AH=i}}_$AC(t){let e=Ce.get(t.strings);return e===void 0&&Ce.set(t.strings,e=new ct(t)),e}k(t){he(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,o=0;for(let i of t)o===e.length?e.push(s=new r(this.O(at()),this.O(at()),this,this.options)):s=e[o],s._$AI(i),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!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},D=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,o,i){this.type=1,this._$AH=x,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=x}_$AI(t,e=this,s,o){let i=this.strings,n=!1;if(i===void 0)t=j(this,t,e,0),n=!lt(t)||t!==this._$AH&&t!==U,n&&(this._$AH=t);else{let l=t,a,u;for(t=i[0],a=0;a<i.length-1;a++)u=j(this,l[s+a],e,a),u===U&&(u=this._$AH[a]),n||=!lt(u)||u!==this._$AH[a],u===x?t=x:t!==x&&(t+=(u??"")+i[a+1]),this._$AH[a]=u}n&&!o&&this.j(t)}j(t){t===x?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Et=class extends D{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===x?void 0:t}},Ct=class extends D{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==x)}},Tt=class extends D{constructor(t,e,s,o,i){super(t,e,s,o,i),this.type=5}_$AI(t,e=this){if((t=j(this,t,e,0)??x)===U)return;let s=this._$AH,o=t===x&&s!==x||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,i=t!==x&&(s===x||o);o&&this.element.removeEventListener(this.name,this,s),i&&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)}},Pt=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){j(this,t)}},ze={M:ce,P:E,A:pe,C:1,L:Re,R:St,D:Te,V:j,I:V,H:D,N:Ct,U:Tt,B:Et,F:Pt},kr=le.litHtmlPolyfillSupport;kr?.(ct,V),(le.litHtmlVersions??=[]).push("3.3.1");var pt=(r,t,e)=>{let s=e?.renderBefore??t,o=s._$litPart$;if(o===void 0){let i=e?.renderBefore??null;s._$litPart$=o=new V(t.insertBefore(at(),i),i,void 0,e??{})}return o._$AI(r),o};var de=globalThis,I=class extends S{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=pt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return U}};I._$litElement$=!0,I.finalized=!0,de.litElementHydrateSupport?.({LitElement:I});var Sr=de.litElementPolyfillSupport;Sr?.({LitElement:I});(de.litElementVersions??=[]).push("4.2.1");var W=m`
|
|
4
4
|
@layer reset {
|
|
5
5
|
* {
|
|
6
6
|
margin: 0;
|
|
@@ -16,31 +16,19 @@ var Je=Object.defineProperty;var Ke=(r,t)=>{for(var e in t)Je(r,e,{get:t[e],enum
|
|
|
16
16
|
::-webkit-scrollbar-thumb { background: #333; border-radius: 1em; }
|
|
17
17
|
::-webkit-scrollbar-thumb:hover { background: #444; }
|
|
18
18
|
}
|
|
19
|
-
`;function E(r,t){let e,s,o=[];function i(){e=[],s&&clearTimeout(s),s=void 0,o=[]}return i(),((...n)=>{e=n,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);i()}).catch(a=>{for(let{reject:l}of o)l(a);i()})},r),c})}function nt(){let r,t,e=new Promise((o,i)=>{r=o,t=i});function s(o){return o.then(r).catch(t),e}return{promise:e,resolve:r,reject:t,entangle:s}}var q=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 ve=(r=0)=>new Promise(t=>setTimeout(t,r));function St(r){return{map:t=>_e(r,t),filter:t=>Ae(r,t)}}St.pipe=Object.freeze({map:r=>(t=>_e(t,r)),filter:r=>(t=>Ae(t,r))});var _e=(r,t)=>Object.fromEntries(Object.entries(r).map(([e,s])=>[e,t(s,e)])),Ae=(r,t)=>Object.fromEntries(Object.entries(r).filter(([e,s])=>t(s,e)));function Se(){let r=new Set;async function t(...a){await Promise.all([...r].map(l=>l(...a)))}function e(a){return r.add(a),()=>{r.delete(a)}}async function s(...a){return t(...a)}function o(a){return e(a)}async function i(a){let{promise:l,resolve:m}=nt(),p=o(async(...w)=>{a&&await a(...w),m(w),p()});return l}function n(){r.clear()}let c={pub:s,sub:o,publish:t,subscribe:e,on:e,next:i,clear:n};return Object.assign(o,c),Object.assign(s,c),c}function Et(r){let t=Se();return r&&t.sub(r),t.sub}function ee(r){let t=Se();return r&&t.sub(r),t.pub}function Ee(r){let t,e=!1,s=()=>{e=!0,clearTimeout(t)},o=async()=>{e||(await r(s),!e&&(t=setTimeout(o,0)))};return o(),s}function hr(r,t,e){e==null?r.removeAttribute(t):typeof e=="string"?r.setAttribute(t,e):typeof e=="number"?r.setAttribute(t,e.toString()):typeof e=="boolean"?e===!0?r.setAttribute(t,""):r.removeAttribute(t):console.warn(`invalid attribute "${t}" type is "${typeof e}"`)}function Ct(r,t){for(let[e,s]of t)hr(r,e,s)}function Ce(r,t){let e=document.createElement(r);return Ct(e,Object.entries(t)),e}function ke(r,t){let e=new MutationObserver(t);return e.observe(r,{attributes:!0}),()=>e.disconnect()}var b={get:{string:(r,t)=>r.getAttribute(t)??void 0,number:(r,t)=>{let e=r.getAttribute(t);return e===null||!e?void 0:Number(e)},boolean:(r,t)=>r.getAttribute(t)!==null},set:{string:(r,t,e)=>(e===void 0?r.removeAttribute(t):r.setAttribute(t,e),!0),number:(r,t,e)=>(e===void 0?r.removeAttribute(t):r.setAttribute(t,e.toString()),!0),boolean:(r,t,e)=>(e?r.setAttribute(t,""):r.removeAttribute(t),!0)}};var Pe=(r,t)=>new Proxy(t,{get:(e,s)=>{switch(t[s]){case String:return b.get.string(r,s);case Number:return b.get.number(r,s);case Boolean:return b.get.boolean(r,s);default:throw new Error(`invalid attribute type for "${s}"`)}},set:(e,s,o)=>{switch(t[s]){case String:return b.set.string(r,s,o);case Number:return b.set.number(r,s,o);case Boolean:return b.set.boolean(r,s,o);default:throw new Error(`invalid attribute type for "${s}"`)}}});var kt=class{element;constructor(t){this.element=t}strings=new Proxy({},{get:(t,e)=>b.get.string(this.element,e),set:(t,e,s)=>b.set.string(this.element,e,s)});numbers=new Proxy({},{get:(t,e)=>b.get.number(this.element,e),set:(t,e,s)=>b.set.number(this.element,e,s)});booleans=new Proxy({},{get:(t,e)=>b.get.boolean(this.element,e),set:(t,e,s)=>b.set.boolean(this.element,e,s)})};function at(r){let t=new kt(r);return{strings:t.strings,numbers:t.numbers,booleans:t.booleans,on:e=>ke(r,e),spec:e=>Pe(r,e)}}at.get=b.get;at.set=b.set;function re(r,t){let e=[];for(let[s,o]of Object.entries(t))if(typeof o=="function")r.addEventListener(s,o),e.push(()=>r.removeEventListener(s,o));else{let[i,n]=o;r.addEventListener(s,n,i),e.push(()=>r.removeEventListener(s,n))}return()=>e.forEach(s=>s())}function Te(r){return r.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function Re(r,t={}){let{soft:e=!1,upgrade:s=!0}=t;for(let[o,i]of Object.entries(r)){let n=Te(o),c=customElements.get(n);e&&c||(customElements.define(n,i),s&&document.querySelectorAll(n).forEach(a=>{a.constructor===HTMLElement&&customElements.upgrade(a)}))}}function Oe(r,t){let e=r.querySelector(t);if(!e)throw new Error(`element not found (${t})`);return e}var Pt=class r{element;constructor(t){this.element=t}in(t){return new r(typeof t=="string"?Oe(this.element,t):t)}require(t){let e=this.element.querySelector(t);if(!e)throw new Error(`element not found (${t})`);return e}maybe(t){return this.element.querySelector(t)}all(t){return Array.from(this.element.querySelectorAll(t))}render(...t){return it(t,this.element)}attrs(){return at(this.element)}events(t){return re(this.element,t)}};function u(r){return typeof r=="string"?Oe(document,r):new Pt(r)}var C=new Pt(document);u.in=C.in.bind(C);u.require=C.require.bind(C);u.maybe=C.maybe.bind(C);u.all=C.all.bind(C);u.el=Ce;u.events=re;u.attrs=at;u.register=Re;u.render=(r,...t)=>it(t,r);var se=class{#t=[];#e=new WeakMap;#r=[];#s=new Set;notifyRead(t){this.#t.at(-1)?.add(t)}async notifyWrite(t){if(this.#s.has(t))throw new Error("circularity forbidden");let e=this.#o(t).pub();return this.#r.at(-1)?.add(e),e}observe(t){this.#t.push(new Set);let e=t();return{seen:this.#t.pop(),result:e}}subscribe(t,e){return this.#o(t)(async()=>{let s=new Set;this.#r.push(s),this.#s.add(t),s.add(e()),this.#s.delete(t),await Promise.all(s),this.#r.pop()})}#o(t){let e=this.#e.get(t);return e||(e=Et(),this.#e.set(t,e)),e}},x=globalThis[Symbol.for("e280.tracker")]??=new se;var V=class{sneak;constructor(t){this.sneak=t}get(){return x.notifyRead(this),this.sneak}get value(){return this.get()}};var W=class extends V{on=Et();dispose(){this.on.clear()}};function Tt(r,t=r){let{seen:e,result:s}=x.observe(r),o=E(0,t),i=[],n=()=>i.forEach(c=>c());for(let c of e){let a=x.subscribe(c,o);i.push(a)}return{result:s,dispose:n}}function I(r,t){return r===t}var Rt=class extends W{#t;constructor(t,e){let s=e?.compare??I,{result:o,dispose:i}=Tt(t,async()=>{let n=t();!s(this.sneak,n)&&(this.sneak=n,await Promise.all([x.notifyWrite(this),this.on.pub(n)]))});super(o),this.#t=i}toString(){return`(derived "${String(this.get())}")`}dispose(){super.dispose(),this.#t()}get core(){return this}fn(){let t=this;function e(){return t.get()}return e.core=t,e.get=t.get.bind(t),e.on=t.on,e.dispose=t.dispose.bind(t),e.fn=t.fn.bind(t),Object.defineProperty(e,"value",{get:()=>t.value}),Object.defineProperty(e,"sneak",{get:()=>t.sneak}),e}};var Ot=class extends V{#t;#e;#r=!1;#s;constructor(t,e){super(void 0),this.#t=t,this.#e=e?.compare??I}toString(){return`($lazy "${String(this.get())}")`}get(){if(!this.#s){let{result:t,dispose:e}=Tt(this.#t,()=>this.#r=!0);this.#s=e,this.sneak=t}if(this.#r){this.#r=!1;let t=this.#t();!this.#e(this.sneak,t)&&(this.sneak=t,x.notifyWrite(this))}return super.get()}dispose(){this.#s&&this.#s()}get core(){return this}fn(){let t=this;function e(){return t.get()}return e.core=t,e.get=t.get.bind(t),e.dispose=t.dispose.bind(t),e.fn=t.fn.bind(t),Object.defineProperty(e,"value",{get:()=>t.value}),Object.defineProperty(e,"sneak",{get:()=>t.sneak}),e}};var Mt=class extends W{#t=!1;#e;constructor(t,e){super(t),this.#e=e?.compare??I}toString(){return`($signal "${String(this.get())}")`}async set(t,e=!1){let s=this.sneak;return this.sneak=t,(e||!this.#e(s,t))&&await this.publish(),t}get value(){return this.get()}set value(t){this.set(t)}async publish(){if(this.#t)throw new Error("forbid circularity");let t=this.sneak,e=Promise.resolve();try{this.#t=!0,e=Promise.all([x.notifyWrite(this),this.on.publish(t)])}finally{this.#t=!1}return await e,t}get core(){return this}fn(){let t=this;function e(s){return arguments.length===0?t.get():t.set(arguments[0])}return e.core=t,e.get=t.get.bind(t),e.set=t.set.bind(t),e.on=t.on,e.dispose=t.dispose.bind(t),e.publish=t.publish.bind(t),e.fn=t.fn.bind(t),Object.defineProperty(e,"value",{get:()=>t.value,set:s=>t.value=s}),Object.defineProperty(e,"sneak",{get:()=>t.sneak,set:s=>t.sneak=s}),e}};function lr(r,t){return new Ot(r,t).fn()}function Me(r,t){return new Rt(r,t).fn()}function $(r,t){return new Mt(r,t).fn()}$.lazy=lr;$.derived=Me;var k=class{#t=new q;effect(t,e){let{seen:s,result:o}=x.observe(t);for(let i of s)this.#t.guarantee(i,()=>x.subscribe(i,e));for(let[i,n]of this.#t)s.has(i)||(n(),this.#t.delete(i));return o}clear(){for(let t of this.#t.values())t();this.#t.clear()}};var F=class{element;response;#t;constructor(t,e){this.element=t,this.response=e}start(){this.#t||(this.#t=u.attrs(this.element).on(this.response))}stop(){this.#t&&this.#t(),this.#t=void 0}};function Nt(r,t){bt(r,ur(t))}function ur(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}var z={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)=>z.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 X=class{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 load(t){return this.promise(t())}static all(...t){let e=t.map(s=>s.pod);return z.all(...e)}signal;#t=0;#e=ee();#r=ee();constructor(t=["loading"]){this.signal=$(t)}get wait(){return new Promise((t,e)=>{this.#e.next().then(([s])=>t(s)),this.#r.next().then(([s])=>e(s))})}get then(){return this.wait.then.bind(this.wait)}get catch(){return this.wait.catch.bind(this.wait)}get finally(){return this.wait.finally.bind(this.wait)}async setLoading(){await this.signal.set(["loading"])}async setReady(t){await this.signal.set(["ready",t]),await this.#e(t)}async setError(t){await this.signal.set(["error",t]),await this.#r(t)}async promise(t){let e=++this.#t;await this.setLoading();try{let s=await t;return e===this.#t&&await this.setReady(s),s}catch(s){console.error(s),e===this.#t&&await this.setError(s)}}async load(t){return this.promise(t())}get pod(){return this.signal.get()}set pod(t){this.signal.set(t)}get status(){return this.signal.get()[0]}get value(){return z.value(this.signal.get())}get error(){return z.error(this.signal.get())}get isLoading(){return this.status==="loading"}get isReady(){return this.status==="ready"}get isError(){return this.status==="error"}require(){let t=this.signal.get();if(t[0]!=="ready")throw new Error("required value not ready");return t[1]}select(t){return z.select(this.signal.get(),t)}morph(t){return z.morph(this.pod,t)}};var Ht=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=class{#t;#e;constructor(t){this.#t=t,this.#e=u.attrs(t.element)}get strings(){return this.#e.strings}get numbers(){return this.#e.numbers}get booleans(){return this.#e.booleans}spec(t){return this.#t.once(()=>this.#e.spec(t))}on(t){return this.#t.mount(()=>this.#e.on(t))}};var ct=Symbol(),ht=Symbol(),lt=Symbol(),Y=class{element;shadow;renderNow;render;attrs;#t=0;#e=0;#r=new q;#s=nt();#o=new Ht;[ct](t){this.#t++,this.#e=0,this.#s=nt();let e=t();return this.#s.resolve(),e}[ht](){this.#o.unmountAll()}[lt](){this.#o.remountAll()}constructor(t,e,s,o){this.element=t,this.shadow=e,this.renderNow=s,this.render=o,this.attrs=new zt(this)}get renderCount(){return this.#t}get rendered(){return this.#s.promise}name(t){this.once(()=>this.element.setAttribute("view",t))}styles(...t){this.once(()=>Nt(this.shadow,t))}css(...t){return this.styles(...t)}once(t){return this.#r.guarantee(this.#e++,t)}mount(t){return this.once(()=>this.#o.mount(t))}life(t){let e;return this.mount(()=>{let[s,o]=t();return e=s,o}),e}wake(t){return this.life(()=>[t(),()=>{}])}op=(()=>{let t=this;function e(s){return t.once(()=>X.load(s))}return e.load=e,e.promise=s=>this.once(()=>X.promise(s)),e})();signal=(()=>{let t=this;function e(s,o){return t.once(()=>$(s,o))}return e.derived=function(o,i){return t.once(()=>$.derived(o,i))},e.lazy=function(o,i){return t.once(()=>$.lazy(o,i))},e})();derived(t,e){return this.once(()=>$.derived(t,e))}lazy(t,e){return this.once(()=>$.lazy(t,e))}};var P=class extends HTMLElement{static styles;shadow;#t;#e=0;#r=new k;#s=new F(this,()=>this.update());createShadow(){return this.attachShadow({mode:"open"})}constructor(){super(),this.shadow=this.createShadow(),this.#t=new Y(this,this.shadow,this.updateNow,this.update)}render(t){}updateNow=()=>{this.#t[ct](()=>{u.render(this.shadow,this.#r.effect(()=>this.render(this.#t),this.update))})};update=E(0,this.updateNow);connectedCallback(){if(this.#e===0){let t=this.constructor.styles;t&&Nt(this.shadow,t),this.updateNow()}else this.#t[lt]();this.#s.start(),this.#e++}disconnectedCallback(){this.#t[ht](),this.#r.clear(),this.#s.stop()}};var Ut=class{#t;#e;constructor(t,e){this.#e=t,this.#t=e}attr(t,e){return this.#e.attrs.set(t,e),this}children(...t){return this.#e.children.push(...t),this}render(){return this.#t(this.#e)}};var pt=class{props;attrs=new Map;children=[];constructor(t){this.props=t}};function Ne(r,t,e,s){return class extends t{static view=Z(s,r);#t=new k;createShadow(){return this.attachShadow(r)}render(i){return s(i)(...this.#t.effect(()=>e(this),()=>this.update()))}}}var{I:zi}=we;var He=r=>r.strings===void 0;var ze={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},oe=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 ut=(r,t)=>{let e=r._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),ut(s,t);return!0},jt=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while(e?.size===0)},Ue=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),fr(t)}};function dr(r){this._$AN!==void 0?(jt(this),this._$AM=r,Ue(this)):this._$AM=r}function mr(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 i=e;i<s.length;i++)ut(s[i],!1),jt(s[i]);else s!=null&&(ut(s,!1),jt(s));else ut(this,r)}var fr=r=>{r.type==ze.CHILD&&(r._$AP??=mr,r._$AQ??=dr)},Lt=class extends Dt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Ue(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(ut(this,t),jt(this))}setValue(t){if(He(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(){}};var Bt=class r extends HTMLElement{static#t=!1;static make(){return this.#t||(u.register({SlyView:r},{soft:!0,upgrade:!0}),this.#t=!0),document.createElement("sly-view")}};var qt=class{viewFn;settings;#t=Bt.make();#e=new k;#r;#s;#o;#i=new F(this.#t,()=>this.#a());constructor(t,e){this.viewFn=t,this.settings=e,this.#s=this.#t.attachShadow(this.settings),this.#r=new Y(this.#t,this.#s,this.#n,this.#a)}update(t){return this.#o=t,this.#n(),this.#t}#n=()=>{this.#r[ct](()=>{let t=this.#e.effect(()=>this.viewFn(this.#r)(...this.#o.props),()=>this.#a());Ct(this.#t,[...this.#o.attrs]),u.render(this.#s,t),u.render(this.#t,this.#o.children),this.#i.start()})};#a=E(0,this.#n);disconnected(){this.#r[ht](),this.#e.clear(),this.#i.stop()}reconnected(){this.#r[lt](),this.#i.start()}};function De(r,t){return oe(class extends Lt{#t=new qt(r,t);render(s){return this.#t.update(s)}disconnected(){this.#t.disconnected()}reconnected(){this.#t.reconnected()}})}function Z(r,t){let e=De(r,t);function s(...o){return e(new pt(o))}return s.props=(...o)=>new Ut(new pt(o),e),s.transmute=o=>Z(n=>{let c=r(n);return(...a)=>c(...o(...a))},t),s.component=(o=P)=>({props:i=>Ne(t,o,i,r)}),s}function y(r){return Z(r,{mode:"open"})}y.settings=r=>({render:t=>Z(t,r)});y.render=y;y.component=r=>y(t=>()=>r(t)).component(P).props(()=>[]);function h(r,t){return()=>gr({hz:r,frames:t})}var gr=y(r=>({hz:t,frames:e})=>{r.name("loading"),r.styles(B,br);let s=r.signal(0);return r.mount(()=>Ee(async()=>{await ve(1e3/t);let o=s.get()+1;s.set(o>=e.length?0:o)})),e.at(s.get())}),br=g`
|
|
19
|
+
`;function P(r,t){let e,s,o=[];function i(){e=[],s&&clearTimeout(s),s=void 0,o=[]}return i(),((...n)=>{e=n,s&&clearTimeout(s);let l=new Promise((a,u)=>{o.push({resolve:a,reject:u})});return s=setTimeout(()=>{Promise.resolve().then(()=>t(...e)).then(a=>{for(let{resolve:u}of o)u(a);i()}).catch(a=>{for(let{reject:u}of o)u(a);i()})},r),l})}function Er(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 Me=Er;function ht(){let r,t,e=new Promise((o,i)=>{r=o,t=i});function s(o){return o.then(r).catch(t),e}return{promise:e,resolve:r,reject:t,entangle:s}}var Ot=class{getRefill;#t=[];constructor(t){this.getRefill=t,this.#e()}get currentStock(){return[...this.#t]}#e(){if(this.#t.length===0&&(this.#t=[...this.getRefill()]),this.#t.length===0)throw new Error("dispenser's getRefill returned an empty array")}takeAll(){let t=this.#t;return this.#t=[...this.getRefill()],t}takeRandom(){this.#e();let t=Math.floor(Math.random()*this.#t.length),[e]=this.#t.splice(t,1);return e}takeFirst(){return this.#e(),this.#t.shift()}takeLast(){return this.#e(),this.#t.pop()}shift=this.takeFirst.bind(this);pop=this.takeLast.bind(this)};var F=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 He=(r=0)=>new Promise(t=>setTimeout(t,r));function Rt(r){return{map:t=>Ne(r,t),filter:t=>Ue(r,t)}}Rt.pipe=Object.freeze({map:r=>(t=>Ne(t,r)),filter:r=>(t=>Ue(t,r))});var Ne=(r,t)=>Object.fromEntries(Object.entries(r).map(([e,s])=>[e,t(s,e)])),Ue=(r,t)=>Object.fromEntries(Object.entries(r).filter(([e,s])=>t(s,e)));function je(){let r=new Set;async function t(...a){await Promise.all([...r].map(u=>u(...a)))}function e(a){return r.add(a),()=>{r.delete(a)}}async function s(...a){return t(...a)}function o(a){return e(a)}async function i(a){let{promise:u,resolve:d}=ht(),c=o(async(...y)=>{a&&await a(...y),d(y),c()});return u}function n(){r.clear()}let l={pub:s,sub:o,publish:t,subscribe:e,on:e,next:i,clear:n};return Object.assign(o,l),Object.assign(s,l),l}function zt(r){let t=je();return r&&t.sub(r),t.sub}function me(r){let t=je();return r&&t.sub(r),t.pub}function De(r){let t=r.split(/\r|\n/),e;for(let o of t)if(!/^\s+$/.test(o)){let n=o.match(/^(\t+).+/);if(n){let l=n[1].length;if(e=e===void 0||l<e?l:e,e===0)break}}let s=new RegExp(`^\\t{${e}}`);return t.map(o=>/^\s+$/.test(o)?"":o).map(o=>o.replace(s,"")).join(`
|
|
20
|
+
`)}function Cr(r,t,e){e==null?r.removeAttribute(t):typeof e=="string"?r.setAttribute(t,e):typeof e=="number"?r.setAttribute(t,e.toString()):typeof e=="boolean"?e===!0?r.setAttribute(t,""):r.removeAttribute(t):console.warn(`invalid attribute "${t}" type is "${typeof e}"`)}function Mt(r,t){for(let[e,s]of t)Cr(r,e,s)}function Le(r,t){let e=document.createElement(r);return Mt(e,Object.entries(t)),e}function qe(r,t){let e=new MutationObserver(t);return e.observe(r,{attributes:!0}),()=>e.disconnect()}var v={get:{string:(r,t)=>r.getAttribute(t)??void 0,number:(r,t)=>{let e=r.getAttribute(t);return e===null||!e?void 0:Number(e)},boolean:(r,t)=>r.getAttribute(t)!==null},set:{string:(r,t,e)=>(e===void 0?r.removeAttribute(t):r.setAttribute(t,e),!0),number:(r,t,e)=>(e===void 0?r.removeAttribute(t):r.setAttribute(t,e.toString()),!0),boolean:(r,t,e)=>(e?r.setAttribute(t,""):r.removeAttribute(t),!0)}};var Be=(r,t)=>new Proxy(t,{get:(e,s)=>{switch(t[s]){case String:return v.get.string(r,s);case Number:return v.get.number(r,s);case Boolean:return v.get.boolean(r,s);default:throw new Error(`invalid attribute type for "${s}"`)}},set:(e,s,o)=>{switch(t[s]){case String:return v.set.string(r,s,o);case Number:return v.set.number(r,s,o);case Boolean:return v.set.boolean(r,s,o);default:throw new Error(`invalid attribute type for "${s}"`)}}});var Ht=class{element;constructor(t){this.element=t}strings=new Proxy({},{get:(t,e)=>v.get.string(this.element,e),set:(t,e,s)=>v.set.string(this.element,e,s)});numbers=new Proxy({},{get:(t,e)=>v.get.number(this.element,e),set:(t,e,s)=>v.set.number(this.element,e,s)});booleans=new Proxy({},{get:(t,e)=>v.get.boolean(this.element,e),set:(t,e,s)=>v.set.boolean(this.element,e,s)})};function ut(r){let t=new Ht(r);return{strings:t.strings,numbers:t.numbers,booleans:t.booleans,on:e=>qe(r,e),spec:e=>Be(r,e)}}ut.get=v.get;ut.set=v.set;function fe(r,t){let e=[];for(let[s,o]of Object.entries(t))if(typeof o=="function")r.addEventListener(s,o),e.push(()=>r.removeEventListener(s,o));else{let[i,n]=o;r.addEventListener(s,n,i),e.push(()=>r.removeEventListener(s,n))}return()=>e.forEach(s=>s())}function Ve(r){return r.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function Ie(r,t={}){let{soft:e=!1,upgrade:s=!0}=t;for(let[o,i]of Object.entries(r)){let n=Ve(o),l=customElements.get(n);e&&l||(customElements.define(n,i),s&&document.querySelectorAll(n).forEach(a=>{a.constructor===HTMLElement&&customElements.upgrade(a)}))}}function We(r,t){let e=r.querySelector(t);if(!e)throw new Error(`element not found (${t})`);return e}var Nt=class r{element;constructor(t){this.element=t}in(t){return new r(typeof t=="string"?We(this.element,t):t)}require(t){let e=this.element.querySelector(t);if(!e)throw new Error(`element not found (${t})`);return e}maybe(t){return this.element.querySelector(t)}all(t){return Array.from(this.element.querySelectorAll(t))}render(...t){return pt(t,this.element)}attrs(){return ut(this.element)}events(t){return fe(this.element,t)}};function p(r){return typeof r=="string"?We(document,r):new Nt(r)}var O=new Nt(document);p.in=O.in.bind(O);p.require=O.require.bind(O);p.maybe=O.maybe.bind(O);p.all=O.all.bind(O);p.el=Le;p.events=fe;p.attrs=ut;p.register=Ie;p.render=(r,...t)=>pt(t,r);var ge=class{#t=[];#e=new WeakMap;#r=[];#s=new Set;notifyRead(t){this.#t.at(-1)?.add(t)}async notifyWrite(t){if(this.#s.has(t))throw new Error("circularity forbidden");let e=this.#o(t).pub();return this.#r.at(-1)?.add(e),e}observe(t){this.#t.push(new Set);let e=t();return{seen:this.#t.pop(),result:e}}subscribe(t,e){return this.#o(t)(async()=>{let s=new Set;this.#r.push(s),this.#s.add(t),s.add(e()),this.#s.delete(t),await Promise.all(s),this.#r.pop()})}#o(t){let e=this.#e.get(t);return e||(e=zt(),this.#e.set(t,e)),e}},$=globalThis[Symbol.for("e280.tracker")]??=new ge;var X=class{sneak;constructor(t){this.sneak=t}get(){return $.notifyRead(this),this.sneak}get value(){return this.get()}};var Y=class extends X{on=zt();dispose(){this.on.clear()}};function Ut(r,t=r){let{seen:e,result:s}=$.observe(r),o=P(0,t),i=[],n=()=>i.forEach(l=>l());for(let l of e){let a=$.subscribe(l,o);i.push(a)}return{result:s,dispose:n}}function Z(r,t){return r===t}var jt=class extends Y{#t;constructor(t,e){let s=e?.compare??Z,{result:o,dispose:i}=Ut(t,async()=>{let n=t();!s(this.sneak,n)&&(this.sneak=n,await Promise.all([$.notifyWrite(this),this.on.pub(n)]))});super(o),this.#t=i}toString(){return`(derived "${String(this.get())}")`}dispose(){super.dispose(),this.#t()}get core(){return this}fn(){let t=this;function e(){return t.get()}return e.core=t,e.get=t.get.bind(t),e.on=t.on,e.dispose=t.dispose.bind(t),e.fn=t.fn.bind(t),Object.defineProperty(e,"value",{get:()=>t.value}),Object.defineProperty(e,"sneak",{get:()=>t.sneak}),e}};var Dt=class extends X{#t;#e;#r=!1;#s;constructor(t,e){super(void 0),this.#t=t,this.#e=e?.compare??Z}toString(){return`($lazy "${String(this.get())}")`}get(){if(!this.#s){let{result:t,dispose:e}=Ut(this.#t,()=>this.#r=!0);this.#s=e,this.sneak=t}if(this.#r){this.#r=!1;let t=this.#t();!this.#e(this.sneak,t)&&(this.sneak=t,$.notifyWrite(this))}return super.get()}dispose(){this.#s&&this.#s()}get core(){return this}fn(){let t=this;function e(){return t.get()}return e.core=t,e.get=t.get.bind(t),e.dispose=t.dispose.bind(t),e.fn=t.fn.bind(t),Object.defineProperty(e,"value",{get:()=>t.value}),Object.defineProperty(e,"sneak",{get:()=>t.sneak}),e}};var Lt=class extends Y{#t=!1;#e;constructor(t,e){super(t),this.#e=e?.compare??Z}toString(){return`($signal "${String(this.get())}")`}async set(t,e=!1){let s=this.sneak;return this.sneak=t,(e||!this.#e(s,t))&&await this.publish(),t}get value(){return this.get()}set value(t){this.set(t)}async publish(){if(this.#t)throw new Error("forbid circularity");let t=this.sneak,e=Promise.resolve();try{this.#t=!0,e=Promise.all([$.notifyWrite(this),this.on.publish(t)])}finally{this.#t=!1}return await e,t}get core(){return this}fn(){let t=this;function e(s){return arguments.length===0?t.get():t.set(arguments[0])}return e.core=t,e.get=t.get.bind(t),e.set=t.set.bind(t),e.on=t.on,e.dispose=t.dispose.bind(t),e.publish=t.publish.bind(t),e.fn=t.fn.bind(t),Object.defineProperty(e,"value",{get:()=>t.value,set:s=>t.value=s}),Object.defineProperty(e,"sneak",{get:()=>t.sneak,set:s=>t.sneak=s}),e}};function Tr(r,t){return new Dt(r,t).fn()}function Fe(r,t){return new jt(r,t).fn()}function w(r,t){return new Lt(r,t).fn()}w.lazy=Tr;w.derived=Fe;var R=class{#t=new F;effect(t,e){let{seen:s,result:o}=$.observe(t);for(let i of s)this.#t.guarantee(i,()=>$.subscribe(i,e));for(let[i,n]of this.#t)s.has(i)||(n(),this.#t.delete(i));return o}clear(){for(let t of this.#t.values())t();this.#t.clear()}};var J=class{element;response;#t;constructor(t,e){this.element=t,this.response=e}start(){this.#t||(this.#t=p.attrs(this.element).on(this.response))}stop(){this.#t&&this.#t(),this.#t=void 0}};function qt(r,t){_t(r,Or(t))}function Or(r){let t=[];if(Array.isArray(r)){let e=new Set(r.flat(1/0).reverse());for(let s of e)t.unshift(B(s))}else r!==void 0&&t.push(B(r));return t}var L={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)=>L.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 K=class{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 load(t){return this.promise(t())}static all(...t){let e=t.map(s=>s.pod);return L.all(...e)}signal;#t=0;#e=me();#r=me();constructor(t=["loading"]){this.signal=w(t)}get wait(){return new Promise((t,e)=>{this.#e.next().then(([s])=>t(s)),this.#r.next().then(([s])=>e(s))})}get then(){return this.wait.then.bind(this.wait)}get catch(){return this.wait.catch.bind(this.wait)}get finally(){return this.wait.finally.bind(this.wait)}async setLoading(){await this.signal.set(["loading"])}async setReady(t){await this.signal.set(["ready",t]),await this.#e(t)}async setError(t){await this.signal.set(["error",t]),await this.#r(t)}async promise(t){let e=++this.#t;await this.setLoading();try{let s=await t;return e===this.#t&&await this.setReady(s),s}catch(s){console.error(s),e===this.#t&&await this.setError(s)}}async load(t){return this.promise(t())}get pod(){return this.signal.get()}set pod(t){this.signal.set(t)}get status(){return this.signal.get()[0]}get value(){return L.value(this.signal.get())}get error(){return L.error(this.signal.get())}get isLoading(){return this.status==="loading"}get isReady(){return this.status==="ready"}get isError(){return this.status==="error"}require(){let t=this.signal.get();if(t[0]!=="ready")throw new Error("required value not ready");return t[1]}select(t){return L.select(this.signal.get(),t)}morph(t){return L.morph(this.pod,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 Vt=class{#t;#e;constructor(t){this.#t=t,this.#e=p.attrs(t.element)}get strings(){return this.#e.strings}get numbers(){return this.#e.numbers}get booleans(){return this.#e.booleans}spec(t){return this.#t.once(()=>this.#e.spec(t))}on(t){return this.#t.mount(()=>this.#e.on(t))}};var dt=Symbol(),mt=Symbol(),ft=Symbol(),Q=class{element;shadow;renderNow;render;attrs;#t=0;#e=0;#r=new F;#s=ht();#o=new Bt;[dt](t){this.#t++,this.#e=0,this.#s=ht();let e=t();return this.#s.resolve(),e}[mt](){this.#o.unmountAll()}[ft](){this.#o.remountAll()}constructor(t,e,s,o){this.element=t,this.shadow=e,this.renderNow=s,this.render=o,this.attrs=new Vt(this)}get renderCount(){return this.#t}get rendered(){return this.#s.promise}name(t){this.once(()=>this.element.setAttribute("view",t))}styles(...t){this.once(()=>qt(this.shadow,t))}css(...t){return this.styles(...t)}once(t){return this.#r.guarantee(this.#e++,t)}mount(t){return this.once(()=>this.#o.mount(t))}life(t){let e;return this.mount(()=>{let[s,o]=t();return e=s,o}),e}wake(t){return this.life(()=>[t(),()=>{}])}op=(()=>{let t=this;function e(s){return t.once(()=>K.load(s))}return e.load=e,e.promise=s=>this.once(()=>K.promise(s)),e})();signal=(()=>{let t=this;function e(s,o){return t.once(()=>w(s,o))}return e.derived=function(o,i){return t.once(()=>w.derived(o,i))},e.lazy=function(o,i){return t.once(()=>w.lazy(o,i))},e})();derived(t,e){return this.once(()=>w.derived(t,e))}lazy(t,e){return this.once(()=>w.lazy(t,e))}};var z=class extends HTMLElement{static styles;shadow;#t;#e=0;#r=new R;#s=new J(this,()=>this.update());createShadow(){return this.attachShadow({mode:"open"})}constructor(){super(),this.shadow=this.createShadow(),this.#t=new Q(this,this.shadow,this.updateNow,this.update)}render(t){}updateNow=()=>{this.#t[dt](()=>{p.render(this.shadow,this.#r.effect(()=>this.render(this.#t),this.update))})};update=P(0,this.updateNow);connectedCallback(){if(this.#e===0){let t=this.constructor.styles;t&&qt(this.shadow,t),this.updateNow()}else this.#t[ft]();this.#s.start(),this.#e++}disconnectedCallback(){this.#t[mt](),this.#r.clear(),this.#s.stop()}};var It=class{#t;#e;constructor(t,e){this.#e=t,this.#t=e}attr(t,e){return this.#e.attrs.set(t,e),this}children(...t){return this.#e.children.push(...t),this}render(){return this.#t(this.#e)}};var gt=class{props;attrs=new Map;children=[];constructor(t){this.props=t}};function Xe(r,t,e,s){return class extends t{static view=G(s,r);#t=new R;createShadow(){return this.attachShadow(r)}render(i){return s(i)(...this.#t.effect(()=>e(this),()=>this.update()))}}}var{I:rn}=ze;var Ye=r=>r.strings===void 0;var Ze={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},be=r=>(...t)=>({_$litDirective$:r,values:t}),Wt=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 bt=(r,t)=>{let e=r._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),bt(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)},Je=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),Mr(t)}};function Rr(r){this._$AN!==void 0?(Ft(this),this._$AM=r,Je(this)):this._$AM=r}function zr(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 i=e;i<s.length;i++)bt(s[i],!1),Ft(s[i]);else s!=null&&(bt(s,!1),Ft(s));else bt(this,r)}var Mr=r=>{r.type==Ze.CHILD&&(r._$AP??=zr,r._$AQ??=Rr)},Xt=class extends Wt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Je(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(bt(this,t),Ft(this))}setValue(t){if(Ye(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(){}};var Yt=class r extends HTMLElement{static#t=!1;static make(){return this.#t||(p.register({SlyView:r},{soft:!0,upgrade:!0}),this.#t=!0),document.createElement("sly-view")}};var Zt=class{viewFn;settings;#t=Yt.make();#e=new R;#r;#s;#o;#i=new J(this.#t,()=>this.#a());constructor(t,e){this.viewFn=t,this.settings=e,this.#s=this.#t.attachShadow(this.settings),this.#r=new Q(this.#t,this.#s,this.#n,this.#a)}update(t){return this.#o=t,this.#n(),this.#t}#n=()=>{this.#r[dt](()=>{let t=this.#e.effect(()=>this.viewFn(this.#r)(...this.#o.props),()=>this.#a());Mt(this.#t,[...this.#o.attrs]),p.render(this.#s,t),p.render(this.#t,this.#o.children),this.#i.start()})};#a=P(0,this.#n);disconnected(){this.#r[mt](),this.#e.clear(),this.#i.stop()}reconnected(){this.#r[ft](),this.#i.start()}};function Ke(r,t){return be(class extends Xt{#t=new Zt(r,t);render(s){return this.#t.update(s)}disconnected(){this.#t.disconnected()}reconnected(){this.#t.reconnected()}})}function G(r,t){let e=Ke(r,t);function s(...o){return e(new gt(o))}return s.props=(...o)=>new It(new gt(o),e),s.transmute=o=>G(n=>{let l=r(n);return(...a)=>l(...o(...a))},t),s.component=(o=z)=>({props:i=>Xe(t,o,i,r)}),s}function g(r){return G(r,{mode:"open"})}g.settings=r=>({render:t=>G(t,r)});g.render=g;g.component=r=>g(t=>()=>r(t)).component(z).props(()=>[]);function h(r,t){return()=>Hr({hz:r,frames:t})}var Hr=g(r=>({hz:t,frames:e})=>{r.name("loading"),r.styles(W,Nr);let s=r.signal(0);return r.mount(()=>Me(async()=>{await He(1e3/t);let o=s.get()+1;s.set(o>=e.length?0:o)})),e.at(s.get())}),Nr=m`
|
|
20
21
|
:host {
|
|
21
22
|
font-family: monospace;
|
|
22
23
|
white-space: pre;
|
|
23
24
|
user-select: none;
|
|
24
25
|
}
|
|
25
|
-
`;var
|
|
26
|
+
`;var b=20,tt=10,et=4,qn=h(b,["|","/","-","\\"]),Bn=h(b,["\u2808","\u2810","\u2820","\u2880","\u2840","\u2804","\u2802","\u2801"]),Vn=h(b,["\u2B06\uFE0F","\u2197\uFE0F","\u27A1\uFE0F","\u2198\uFE0F","\u2B07\uFE0F","\u2199\uFE0F","\u2B05\uFE0F","\u2196\uFE0F"]),In=h(b,["\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"]),Wn=h(b,["\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"]),Fn=h(b,["\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"]),Xn=h(b,["\u25B1\u25B1\u25B1\u25B1\u25B1","\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"]),Yn=h(b,["\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581","\u2588\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581","\u2588\u2588\u2588\u2588\u2581","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2588"]),Zn=h(b,["\u2588\u2581\u2581\u2581\u2581","\u2588\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581","\u2588\u2588\u2588\u2588\u2581","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2588\u2588\u2588","\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581","\u2588\u2588\u2588\u2581\u2581","\u2588\u2588\u2581\u2581\u2581"]),Jn=h(et,["\u{1F6B6}","\u{1F3C3}"]),Kn=h(tt,["\u25F7","\u25F6","\u25F5","\u25F4"]),Qn=h(b,["=----","-=---","--=--","---=-","----=","----=","---=-","--=--","-=---","=----"]),Gn=h(b,["o----","-o---","--o--","---o-","----o","----o","---o-","--o--","-o---","o----"]),ta=h(tt,["[ ]","[ ]","[= ]","[== ]","[===]","[ ==]","[ =]"]),ea=h(tt,["[ ]","[ ]","[= ]","[== ]","[===]","[ ==]","[ =]","[ ]","[ ]","[ =]","[ ==]","[===]","[== ]","[= ]"]),ra=h(tt,[" "," ",". ",".. ","..."," .."," ."]),sa=h(b,[". ",". ",".. ","..."," .."," ."," ."," ..","...",".. "]),oa=h(b,[".....",".....",":....","::...",":::..","::::.",":::::",":::::",".::::","..:::","...::","....:"]),ia=h(b,[":....",":....","::...",".::..","..::.","...::","....:","....:","...::","..::.",".::..","::..."]),na=h(b,[".....",".....","..:..",".:::.",".:::.",":::::",":::::","::.::",":...:"]),aa=h(b,[".....",".....","..:..",".:::.",".:::.",":::::",":::::","::.::",":...:",".....",".....",":...:","::.::",":::::",":::::",".:::.",".:::.","..:.."]),la=h(b,["000","100","110","111","011","001"]),ca=h(b,["11111","01111","00111","10011","11001","01100","00110","10011","11001","11100","11110"]),pa=h(b,["11111","01111","10111","11011","11101","11110","11111","11110","11101","11011","10111","01111"]),ha=h(et,["\u{1F539}","\u{1F535}"]),ua=h(tt,["\u{1F642}","\u{1F642}","\u{1F617}","\u{1F619}","\u{1F618}","\u{1F618}","\u{1F619}"]),da=h(b,["\u{1F550}","\u{1F551}","\u{1F552}","\u{1F553}","\u{1F554}","\u{1F555}","\u{1F556}","\u{1F557}","\u{1F558}","\u{1F559}","\u{1F55A}","\u{1F55B}"]),ma=h(b,["\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}"]),Ur=h(et,["\u{1F30E}","\u{1F30F}","\u{1F30D}"]),fa=h(et,["\u{1F513}","\u{1F512}"]),ga=h(et,["\u{1F505}","\u{1F506}"]),ba=h(et,["\u{1F508}","\u{1F508}","\u{1F509}","\u{1F50A}","\u{1F50A}","\u{1F509}"]),ya=h(tt,["\u{1F311}","\u{1F311}","\u{1F311}","\u{1F318}","\u{1F317}","\u{1F316}","\u{1F315}","\u{1F314}","\u{1F313}","\u{1F312}"]);var Dr=g(r=>t=>(r.name("error"),r.styles(W,Lr),typeof t=="string"?t:t instanceof Error?f`<strong>${t.name}:</strong> <span>${t.message}</span>`:"error")),Lr=m`
|
|
26
27
|
:host {
|
|
27
28
|
font-family: monospace;
|
|
28
29
|
color: red;
|
|
29
30
|
}
|
|
30
|
-
`;
|
|
31
|
-
|
|
32
|
-
${B}
|
|
33
|
-
|
|
34
|
-
:host {
|
|
35
|
-
display: block;
|
|
36
|
-
--bg: var(--shiny-bg, #111);
|
|
37
|
-
--alpha: var(--shiny-alpha, #afa);
|
|
38
|
-
--good: var(--shiny-good, #0f4);
|
|
39
|
-
--bad: var(--shiny-bad, #f40);
|
|
40
|
-
--invalid: var(--shiny-invalid, #8888);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
`;var Le=g`
|
|
31
|
+
`;function Ir(r,t){return t.transmute((...e)=>[r,...e])}function Ge(r){return Rt(r).map(t=>t.view)}function tr(r,t){return Rt(t).map(e=>class extends e{context=r;static view=Ir(r,super.view)})}var er=m`@layer view {
|
|
44
32
|
|
|
45
33
|
button {
|
|
46
34
|
background: transparent;
|
|
@@ -49,7 +37,7 @@ button {
|
|
|
49
37
|
}
|
|
50
38
|
|
|
51
39
|
button {
|
|
52
|
-
opacity:
|
|
40
|
+
opacity: var(--inactive-opacity);
|
|
53
41
|
cursor: pointer;
|
|
54
42
|
cursor: copy;
|
|
55
43
|
|
|
@@ -62,18 +50,18 @@ button {
|
|
|
62
50
|
}
|
|
63
51
|
|
|
64
52
|
[data-status="invalid"] {
|
|
65
|
-
color: var(--
|
|
53
|
+
color: var(--lame);
|
|
66
54
|
}
|
|
67
55
|
|
|
68
56
|
[data-status="good"] {
|
|
69
57
|
opacity: 1;
|
|
70
|
-
color: var(--
|
|
58
|
+
color: var(--happy);
|
|
71
59
|
filter: drop-shadow(0 0 0.3em color-mix(in oklab, transparent, currentColor 50%));
|
|
72
60
|
}
|
|
73
61
|
|
|
74
62
|
[data-status="bad"] {
|
|
75
63
|
opacity: 1;
|
|
76
|
-
color: var(--
|
|
64
|
+
color: var(--angry);
|
|
77
65
|
filter: drop-shadow(0 0 0.3em color-mix(in oklab, transparent, currentColor 50%));
|
|
78
66
|
}
|
|
79
67
|
|
|
@@ -82,22 +70,228 @@ svg {
|
|
|
82
70
|
height: 1em;
|
|
83
71
|
}
|
|
84
72
|
|
|
85
|
-
`;var
|
|
86
|
-
|
|
87
|
-
|
|
73
|
+
}`;var A=m`
|
|
74
|
+
|
|
75
|
+
@layer reset, underlay, view, overlay;
|
|
76
|
+
|
|
77
|
+
${W}
|
|
78
|
+
|
|
79
|
+
@layer overlay {
|
|
80
|
+
[hidden] { display: none !important; }
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
`;var k=class extends z{context};var ye=_`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-clipboard"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2" /><path d="M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z" /></svg>`;var rr=_`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" class="icon icon-tabler icons-tabler-filled icon-tabler-clipboard-x"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M17.997 4.17a3 3 0 0 1 2.003 2.83v12a3 3 0 0 1 -3 3h-10a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 2.003 -2.83a4 4 0 0 0 3.997 3.83h4a4 4 0 0 0 3.98 -3.597zm-7.29 7.123a1 1 0 0 0 -1.414 0l-.083 .094a1 1 0 0 0 .083 1.32l1.292 1.293l-1.292 1.293a1 1 0 0 0 0 1.414l.094 .083a1 1 0 0 0 1.32 -.083l1.293 -1.293l1.293 1.293a1 1 0 0 0 1.414 0l.083 -.094a1 1 0 0 0 -.083 -1.32l-1.293 -1.293l1.293 -1.293a1 1 0 0 0 0 -1.414l-.094 -.083a1 1 0 0 0 -1.32 .083l-1.293 1.292zm3.293 -9.293a2 2 0 1 1 0 4h-4a2 2 0 1 1 0 -4z" /></svg>`;var sr=_`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" class="icon icon-tabler icons-tabler-filled icon-tabler-clipboard-check"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M17.997 4.17a3 3 0 0 1 2.003 2.83v12a3 3 0 0 1 -3 3h-10a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 2.003 -2.83a4 4 0 0 0 3.997 3.83h4a4 4 0 0 0 3.98 -3.597zm-3.704 7.123l-3.293 3.292l-1.293 -1.292a1 1 0 1 0 -1.414 1.414l2 2a1 1 0 0 0 1.414 0l4 -4a1 1 0 0 0 -1.414 -1.414m-.293 -9.293a2 2 0 1 1 0 4h-4a2 2 0 1 1 0 -4z" /></svg>`;var Jt=class extends g(t=>(e,s,o=1e3)=>{t.name("shiny-copy"),t.styles(A,e.theme,er);let i=()=>s===void 0?"invalid":"neutral",n=t.signal(i()),l=t.once(()=>P(o,()=>n.set(i()))),a=t.once(()=>async c=>{await n.set(c),await l()});async function u(){if(s!==void 0)try{await navigator.clipboard.writeText(s),await a("good")}catch(c){console.error(c),await a("bad")}}let d=(()=>{switch(n.get()){case"neutral":return ye;case"invalid":return ye;case"good":return sr;case"bad":return rr;default:throw new Error("invalid copy status")}})();return f`
|
|
84
|
+
<button data-status="${n.get()}" @click="${u}">
|
|
85
|
+
${d}
|
|
88
86
|
</button>
|
|
89
|
-
`}).component(class extends
|
|
87
|
+
`}).component(class extends k{#t=p.attrs(this).spec({text:String,ms:Number});get text(){return this.#t.text}set text(t){this.#t.text=t}get ms(){return this.#t.ms}set ms(t){this.#t.ms=t}}).props(t=>[t.context,t.text,t.ms]){};var or=m`@layer view {
|
|
88
|
+
|
|
89
|
+
:host {
|
|
90
|
+
display: block;
|
|
91
|
+
width: 100%;
|
|
92
|
+
height: 100%;
|
|
93
|
+
--button-size: 2em;
|
|
94
|
+
--anim-duration: 200ms;
|
|
95
|
+
--blanket-backdrop-filter: blur(0.5em);
|
|
96
|
+
--blanket-bg: color-mix(in oklab, transparent, var(--bg));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.shell {
|
|
100
|
+
position: relative;
|
|
101
|
+
width: 100%;
|
|
102
|
+
height: 100%;
|
|
103
|
+
|
|
104
|
+
[part="blanket"] {
|
|
105
|
+
opacity: 0;
|
|
106
|
+
|
|
107
|
+
content: "";
|
|
108
|
+
display: block;
|
|
109
|
+
position: absolute;
|
|
110
|
+
inset: 0;
|
|
111
|
+
|
|
112
|
+
background: var(--blanket-bg);
|
|
113
|
+
backdrop-filter: var(--blanket-backdrop-filter);
|
|
114
|
+
|
|
115
|
+
will-change: opacity;
|
|
116
|
+
transition: all var(--anim-duration) ease;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.clipper {
|
|
120
|
+
pointer-events: none;
|
|
121
|
+
position: absolute;
|
|
122
|
+
inset: 0;
|
|
123
|
+
width: 100%;
|
|
124
|
+
height: 100%;
|
|
125
|
+
overflow: hidden;
|
|
126
|
+
> * { pointer-events: all; }
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
[part="tray"] {
|
|
130
|
+
position: absolute;
|
|
131
|
+
top: 0;
|
|
132
|
+
width: calc(100% - var(--button-size));
|
|
133
|
+
|
|
134
|
+
display: flex;
|
|
135
|
+
flex-direction: column;
|
|
136
|
+
height: auto;
|
|
137
|
+
max-height: 100%;
|
|
138
|
+
|
|
139
|
+
opacity: 1;
|
|
140
|
+
transform: translateX(-100%);
|
|
141
|
+
will-change: opacity, transform;
|
|
142
|
+
transition: all var(--anim-duration) ease;
|
|
143
|
+
|
|
144
|
+
> slot {
|
|
145
|
+
display: block;
|
|
146
|
+
height: 100%;
|
|
147
|
+
overflow-y: auto;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
> button {
|
|
151
|
+
position: absolute;
|
|
152
|
+
top: 0;
|
|
153
|
+
left: 100%;
|
|
154
|
+
|
|
155
|
+
opacity: var(--inactive-opacity);
|
|
156
|
+
background: transparent;
|
|
157
|
+
border: none;
|
|
158
|
+
cursor: pointer;
|
|
159
|
+
|
|
160
|
+
&:is(:hover, :focus-visible) {
|
|
161
|
+
opacity: 1;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
> slot {
|
|
165
|
+
display: contents;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
svg {
|
|
169
|
+
width: var(--button-size);
|
|
170
|
+
height: var(--button-size);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&[data-side="right"] {
|
|
176
|
+
[part="tray"] {
|
|
177
|
+
right: 0;
|
|
178
|
+
transform: translateX(100%);
|
|
179
|
+
> button {
|
|
180
|
+
left: unset;
|
|
181
|
+
right: 100%;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
slot[name="plate"] {
|
|
187
|
+
display: block;
|
|
188
|
+
width: 100%;
|
|
189
|
+
height: 100%;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
&[data-open] {
|
|
193
|
+
[part="blanket"] {
|
|
194
|
+
opacity: 1;
|
|
195
|
+
}
|
|
196
|
+
[part="tray"] {
|
|
197
|
+
opacity: 1;
|
|
198
|
+
transform: translateX(0%);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
}`;var yt=class{$open=w(!1);constructor(t=!1){t&&this.$open.set(!0)}get isOpen(){return this.$open.get()}async setOpen(t){return this.$open.set(t)}open=async()=>{await this.setOpen(!0)};close=async()=>{await this.setOpen(!1)};toggle=async()=>this.setOpen(!this.isOpen)};var Kt=class{#t;constructor(t){this.#t=t.attachInternals().states}assign(...t){this.#t.forEach(e=>this.#t.delete(e));for(let e of t)this.#t.add(e);return this}};var ir=_`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-x"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>`;var nr=_`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-menu-2"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 6l16 0" /><path d="M4 12l16 0" /><path d="M4 18l16 0" /></svg>`;var Qt=class extends g(t=>(e,s)=>{t.name("shiny-drawer"),t.styles(A,e.theme,or);let o=t.once(()=>new Kt(t.element)),i=s.side??"left",n=t.once(()=>s.control??new yt);return o.assign(i),t.mount(()=>p.events(window,{keydown:l=>{l.code==="Escape"&&n.close()}})),p.attrs(t.element).booleans.open=n.isOpen,f`
|
|
204
|
+
<div class=shell ?data-open="${n.isOpen}" data-side="${i}">
|
|
205
|
+
<slot name=plate ?inert="${n.isOpen}"></slot>
|
|
206
|
+
|
|
207
|
+
<div class=clipper>
|
|
208
|
+
<div part=blanket @click="${n.close}" ?inert="${!n.isOpen}"></div>
|
|
209
|
+
|
|
210
|
+
<div part=tray>
|
|
211
|
+
<slot ?inert="${!n.isOpen}"></slot>
|
|
212
|
+
|
|
213
|
+
${s.button?f`
|
|
214
|
+
<button @click="${n.toggle}">
|
|
215
|
+
${n.isOpen?f`
|
|
216
|
+
<slot name=button-x>
|
|
217
|
+
${ir}
|
|
218
|
+
</slot>
|
|
219
|
+
`:f`
|
|
220
|
+
<slot name=button>
|
|
221
|
+
${nr}
|
|
222
|
+
</slot>
|
|
223
|
+
`}
|
|
224
|
+
</button>
|
|
225
|
+
`:null}
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
229
|
+
`}).component(class extends k{#t=p.attrs(this).spec({open:Boolean,button:Boolean,side:String});get button(){return this.#t.button}set button(t){this.#t.button=t}get side(){return this.#t.side==="right"?"right":"left"}set side(t){this.#t.side=t}control=new yt(this.#t.open);get isOpen(){return this.control.isOpen}get toggle(){return this.control.toggle}get open(){return this.control.open}get close(){return this.control.close}}).props(t=>[t.context,{control:t.control,button:t.button,side:t.side}]){};var ar=m`@layer view {
|
|
90
230
|
|
|
91
231
|
button {
|
|
92
232
|
padding: 1em;
|
|
93
233
|
min-width: 4em;
|
|
94
234
|
}
|
|
95
235
|
|
|
96
|
-
`;var
|
|
236
|
+
}`;var Gt=class extends g(t=>(e,s)=>{t.name("shiny-example"),t.styles(A,e.theme,ar);let o=t.signal(s);return f`
|
|
97
237
|
<button @click="${()=>{o.value++}}">
|
|
98
238
|
${o()}
|
|
99
239
|
</button>
|
|
100
|
-
`}).component(class extends
|
|
240
|
+
`}).component(class extends k{attrs=p.attrs(this).spec({start:Number})}).props(t=>[t.context,t.attrs.start??1]){};var lr=m`@layer view {
|
|
241
|
+
|
|
242
|
+
}`;var q=class{length=1;$index=w(0);constructor(t=0){this.$index.value=t}#t(t){return t=Math.min(t,this.length-1),t=Math.max(t,0),t}get index(){return this.#t(this.$index.get())}async setIndex(t){return this.$index.set(t)}async shimmy(t){let e=this.#t(this.index+t);return this.setIndex(e)}};var te=class extends g(t=>(e,s)=>{t.name("shiny-tabs"),t.styles(A,e.theme,lr);let o=t.attrs.spec({index:Number}),i=t.once(()=>s??new q(o.index??0)),n=t.signal([]),l=t.signal([]);async function a(d){let c=d.currentTarget;await n.set(c.assignedElements())}async function u(d){let c=d.currentTarget;await l.set(c.assignedElements())}o.index=i.$index(),i.length=n().length;for(let[d,c]of n().entries()){let y=d===i.index;p.attrs(c).booleans.active=y,p.attrs(c).booleans.disabled=y,c.onclick=()=>i.setIndex(d)}for(let[d,c]of l().entries()){let y=d===i.index;p.attrs(c).booleans.active=y,p.attrs(c).booleans.hidden=!y}return f`
|
|
243
|
+
<slot part=tabs @slotchange="${a}"></slot>
|
|
244
|
+
<slot part=panels name=panel @slotchange="${u}"></slot>
|
|
245
|
+
`}).component(class extends k{control=new q;get index(){return this.control.index}get length(){return this.control.length}setIndex=this.control.setIndex.bind(this.control);shimmy=this.control.shimmy.bind(this.control)}).props(t=>[t.context,t.control]){};var cr={ShinyCopy:Jt,ShinyDrawer:Qt,ShinyExample:Gt,ShinyTabs:te};function ee(r){let t=tr(r,cr),e=Ge(t);return{components:t,views:e}}function re(){return{bg:"#111",alpha:"#afa",happy:"#0fa",sad:"#74f",angry:"#f50",lame:"#8888","inactive-opacity":"0.5"}}function se(r){return $t(Object.entries(r).map(([t,e])=>`--${t}: var(--shiny-${t}, ${e});`).join(`
|
|
246
|
+
`))}var pr=m`@layer overlay {
|
|
247
|
+
|
|
248
|
+
:host {
|
|
249
|
+
display: block;
|
|
250
|
+
|
|
251
|
+
${se({...re()})}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
:host([view="shiny-drawer"]) {
|
|
255
|
+
display: block;
|
|
256
|
+
|
|
257
|
+
&::part(tray) {
|
|
258
|
+
padding: 1em;
|
|
259
|
+
background: linear-gradient(
|
|
260
|
+
to top right,
|
|
261
|
+
#00a9dd69,
|
|
262
|
+
#70ffd77a
|
|
263
|
+
);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
:host([view="shiny-drawer"]:state(left)) {
|
|
268
|
+
&::part(tray) {
|
|
269
|
+
border-bottom-right-radius: 0.5em;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
:host([view="shiny-drawer"]:state(right)) {
|
|
274
|
+
&::part(tray) {
|
|
275
|
+
border-bottom-left-radius: 0.5em;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
:host([view="shiny-tabs"]) {
|
|
280
|
+
display: block;
|
|
281
|
+
|
|
282
|
+
&::part(tabs) {
|
|
283
|
+
display: flex;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
}`;var rt=ee({theme:pr}).views;var hr=m`@layer overlay {
|
|
288
|
+
|
|
289
|
+
:host {
|
|
290
|
+
display: block;
|
|
291
|
+
${se(re())}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
}`;var ur=()=>new Ot(()=>["lorem kettlebell dolor sit amet, mountain squats consectetur trail-running. adipiscing deadlift elit, sed do 45lb turkish get-up eiusmod tempor incididunt ut hike magna aliqua. ut enim ad minim clean & press, quis nostrud exercitation lunges ullamco kettlebell snatch trailhead nisi ut aliquip ex dolore summit irure dolor.","lorem protein dolor sit amet, creatine scoop elit shaker bottle tempor. grilled steak magna keto-fasting culpa, carb-loading perspiciatis cheat day. whey isolate dolor sit macros elit, intermittent fasting tempor electrolyte magna; barefoot shoes culpa, liver perspiciatis ancestral squat rack gospel. lorem bulking dolor sit cut elit, tdee tracker tempor calorie deficit magna; chicken breast culpa gatorade perspiciatis meal prep.","lorem caffeine dolor sit amet, double espresso elit cold brew tempor jitter. adderall magna focus culpa, lion\u2019s mane perspiciatis nootropic. nicotine gum dolor sit vape elit, dopamine hit tempor buzz magna; lsd microdosing culpa, productivity perspiciatis agile sprint. lorem latte dolor sit drip elit, french press tempor aeropress magna; insomnia culpa, circadian rhythm perspiciatis blue light filter.","lorem arch dolor sit amet, pacman -Syu elit rolling release tempor breakage. i3-gaps commodo tiling, bspwm magna culpa xinitrc. alias neovim configs in .dotfiles forest, r/unixporn veniam rice showcase perspiciatis.","lorem authlocal dolor sit amet, user-sovereign identity elit, cryptographic tempor signatures. ed25519 magna keypair culpa, elliptic perspiciatis handshake ut zero-knowledge proof. decentralized login elit mnemonic seed tempor recovery phrase. DID magna alias culpa federation, lorem oauth2 perspiciatis antiquated.","lorem webgpu dolor sit amet, fragment shader elit vertex buffer tempor pipeline; bindgroup magna sampler culpa, wgsl perspiciatis alignment bug. compute pass workgroup barrier magna, mipmap cascade culpa drawcall instancing overflow. spir-v dolor sit wasm elit, canvas context lost magna; fallback webgl2 perspiciatis, polyfill slowpath dolore, glsl antique culpa extension hell 144hz tearing. command encoder perspiciatis out-of-memory, chromium nightly.","lorem sedentary dolor sit amet, infinite scroll elit chair-bound tempor. commit marathon magna carpal tunnel culpa, caffeine perspiciatis heartbeat irregular. lorem backlog dolor sit ticket elit, jira sprint tempor sedentary slump magna; gym membership culpa expired, standing desk perspiciatis unused. lorem procrastination dolor sit youtube elit, keyboard crumbs tempor pizza box magna; cardio avoidant culpa, hike someday perspiciatis maybe."]);var dr=m`@layer view {
|
|
101
295
|
|
|
102
296
|
:host {
|
|
103
297
|
position: relative;
|
|
@@ -134,6 +328,12 @@ button {
|
|
|
134
328
|
}
|
|
135
329
|
}
|
|
136
330
|
|
|
331
|
+
p.lipsum {
|
|
332
|
+
opacity: 0.7;
|
|
333
|
+
font-family: serif;
|
|
334
|
+
font-style: italic;
|
|
335
|
+
}
|
|
336
|
+
|
|
137
337
|
.meta {
|
|
138
338
|
flex: 1 1 10em;
|
|
139
339
|
display: flex;
|
|
@@ -175,6 +375,7 @@ button {
|
|
|
175
375
|
white-space: pre;
|
|
176
376
|
text-wrap: wrap;
|
|
177
377
|
tab-size: 2;
|
|
378
|
+
word-break: break-word;
|
|
178
379
|
|
|
179
380
|
font-size: 0.8em;
|
|
180
381
|
font-family: monospace;
|
|
@@ -184,6 +385,7 @@ button {
|
|
|
184
385
|
|
|
185
386
|
[view="shiny-copy"] {
|
|
186
387
|
flex: 0 0 0;
|
|
388
|
+
font-size: 1.5em;
|
|
187
389
|
padding: 0.2em;
|
|
188
390
|
}
|
|
189
391
|
}
|
|
@@ -201,45 +403,178 @@ button {
|
|
|
201
403
|
border: 1px dashed #fff4;
|
|
202
404
|
}
|
|
203
405
|
|
|
204
|
-
`;
|
|
205
|
-
|
|
206
|
-
<div class=codeblock>
|
|
406
|
+
}`;var oe=g(r=>t=>{r.name(t.name),r.styles(A,dr,t.style);function e(s,o){let i=De(o).trim();return f`
|
|
407
|
+
<div class=codeblock slot=panel>
|
|
207
408
|
<div class=zone>
|
|
208
409
|
<h3>${s}</h3>
|
|
209
410
|
<code>${i}</code>
|
|
210
411
|
</div>
|
|
211
|
-
${
|
|
412
|
+
${rt.ShinyCopy(i)}
|
|
212
413
|
</div>
|
|
213
|
-
`}return
|
|
414
|
+
`}return f`
|
|
214
415
|
<div class=meta>
|
|
215
416
|
<h2>✨ ${t.name}</h2>
|
|
216
417
|
<div class=explain>${t.explain}</div>
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
418
|
+
${rt.ShinyTabs.props().children(f`
|
|
419
|
+
${t.snippets.map(([s])=>f`
|
|
420
|
+
<button>${s.button}</button>
|
|
421
|
+
`)}
|
|
422
|
+
${t.snippets.map(([s,o])=>e(s.text,o))}
|
|
423
|
+
`).render()}
|
|
221
424
|
</div>
|
|
222
425
|
|
|
223
426
|
<div class=content part=content>
|
|
224
427
|
${t.content}
|
|
225
428
|
</div>
|
|
226
|
-
`});var
|
|
429
|
+
`});var mr=[{label:"aura",views:rt},{label:"plain",views:ee({theme:hr}).views}],C={html:{button:"html",text:"html web component"},view:{button:"view",text:"sly view"},css:{button:"css",text:"custom css"}},fr=ur(),st=()=>fr.takeFirst();p.register({ShinyDemo:g.component(r=>{r.styles(m`
|
|
227
430
|
:host {
|
|
228
431
|
display: flex;
|
|
229
432
|
flex-direction: column;
|
|
230
433
|
gap: 1em;
|
|
231
434
|
}
|
|
232
435
|
|
|
233
|
-
|
|
234
|
-
|
|
436
|
+
.themes {
|
|
437
|
+
display: flex;
|
|
438
|
+
justify-content: end;
|
|
439
|
+
gap: 0.5em;
|
|
440
|
+
|
|
441
|
+
span {
|
|
442
|
+
font-size: 1.2em;
|
|
443
|
+
opacity: 0.5;
|
|
444
|
+
font-family: serif;
|
|
445
|
+
font-style: italic;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
[view="shiny-tabs"] {
|
|
449
|
+
display: flex;
|
|
450
|
+
}
|
|
235
451
|
}
|
|
236
|
-
`),[
|
|
237
|
-
<p>
|
|
238
|
-
`,
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
452
|
+
`);let t=r.once(()=>new q(0)),s=r.derived(()=>mr.at(t.$index()))().views;fr.takeAll();let o=[oe({name:"shiny-copy",explain:f`
|
|
453
|
+
<p>click-to-copy text button.</p>
|
|
454
|
+
`,snippets:[[C.html,`
|
|
455
|
+
<shiny-copy text="hello world"></shiny-copy>
|
|
456
|
+
`],[C.view,`
|
|
457
|
+
ShinyCopy("hello world")
|
|
458
|
+
`],[C.css,`
|
|
459
|
+
shiny-copy {
|
|
460
|
+
font-size: 1em;
|
|
461
|
+
--happy: #0fa;
|
|
462
|
+
--angry: #f50;
|
|
463
|
+
--lame: #8888;
|
|
464
|
+
--inactive-opacity: 0.5;
|
|
465
|
+
}
|
|
466
|
+
`]],content:s.ShinyCopy("hello world"),style:m`
|
|
467
|
+
.content sly-view {
|
|
468
|
+
font-size: 4em;
|
|
469
|
+
}
|
|
470
|
+
`}),oe({name:"shiny-drawer",explain:f`
|
|
471
|
+
<p>slide-out panel. button optional.</p>
|
|
472
|
+
`,snippets:[[C.html,`
|
|
473
|
+
<shiny-drawer button side=left>
|
|
474
|
+
<header>example</header>
|
|
475
|
+
<section slot=plate>
|
|
476
|
+
lorem kettlebell..
|
|
477
|
+
</section>
|
|
478
|
+
</shiny-drawer>
|
|
479
|
+
`],[C.view,`
|
|
480
|
+
ShinyDrawer
|
|
481
|
+
.props({button: true, side: "left"})
|
|
482
|
+
.children(html\`
|
|
483
|
+
<header>example</header>
|
|
484
|
+
<section slot=plate>
|
|
485
|
+
lorem kettlebell..
|
|
486
|
+
</section>
|
|
487
|
+
\`)
|
|
488
|
+
.render()
|
|
489
|
+
`],[C.css,`
|
|
490
|
+
shiny-drawer {
|
|
491
|
+
--button-size: 2em;
|
|
492
|
+
--anim-duration: 200ms;
|
|
493
|
+
--blanket-backdrop-filter: blur(0.5em);
|
|
494
|
+
--blanket-bg: color-mix(
|
|
495
|
+
in oklab,
|
|
496
|
+
transparent,
|
|
497
|
+
var(--bg)
|
|
498
|
+
);
|
|
499
|
+
}
|
|
500
|
+
`]],content:s.ShinyDrawer.props({button:!0}).children(f`
|
|
501
|
+
<header>
|
|
502
|
+
<h2>example drawer</h2>
|
|
503
|
+
<p>you can put any content in here.</p>
|
|
504
|
+
<p class=lipsum>${st()}</p>
|
|
505
|
+
</header>
|
|
506
|
+
<section slot=plate>
|
|
507
|
+
<p class=lipsum>${st()}</p>
|
|
508
|
+
<p class=lipsum>${st()}</p>
|
|
509
|
+
</section>
|
|
510
|
+
`).render(),style:m`
|
|
511
|
+
.content sly-view {
|
|
512
|
+
border-radius: 0.5em;
|
|
513
|
+
overflow: hidden;
|
|
514
|
+
--button-size: 3em;
|
|
515
|
+
|
|
516
|
+
header {
|
|
517
|
+
> * + * { margin-top: 0.5em; }
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
section {
|
|
521
|
+
display: flex;
|
|
522
|
+
flex-direction: column;
|
|
523
|
+
justify-content: center;
|
|
524
|
+
min-height: 100%;
|
|
525
|
+
padding: 1em;
|
|
526
|
+
padding-top: 3em;
|
|
527
|
+
> * + * { margin-top: 0.5em; }
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
`}),oe({name:"shiny-tabs",explain:f`
|
|
531
|
+
<p>button bar. panels optional.</p>
|
|
532
|
+
`,snippets:[[C.html,`
|
|
533
|
+
<shiny-tabs>
|
|
534
|
+
<button>tab1</button>
|
|
535
|
+
<button>tab2</button>
|
|
536
|
+
<button>tab3</button>
|
|
537
|
+
<div slot=panel>panel1</div>
|
|
538
|
+
<div slot=panel>panel2</div>
|
|
539
|
+
<div slot=panel>panel3</div>
|
|
540
|
+
</shiny-tabs>
|
|
541
|
+
`],[C.view,`
|
|
542
|
+
ShinyTabs
|
|
543
|
+
.props()
|
|
544
|
+
.children(html\`
|
|
545
|
+
<button>tab1</button>
|
|
546
|
+
<button>tab2</button>
|
|
547
|
+
<button>tab3</button>
|
|
548
|
+
<div slot=panel>panel1</div>
|
|
549
|
+
<div slot=panel>panel2</div>
|
|
550
|
+
<div slot=panel>panel3</div>
|
|
551
|
+
\`)
|
|
552
|
+
.render()
|
|
553
|
+
`],[C.css,`
|
|
554
|
+
shiny-tabs::part(tabs) {}
|
|
555
|
+
shiny-tabs::part(panels) {}
|
|
556
|
+
`]],content:s.ShinyTabs.props().children(f`
|
|
557
|
+
<button>tab1</button>
|
|
558
|
+
<button>tab2</button>
|
|
559
|
+
<button>tab3</button>
|
|
560
|
+
<p slot=panel class=lipsum>${st()}</p>
|
|
561
|
+
<p slot=panel class=lipsum>${st()}</p>
|
|
562
|
+
<p slot=panel class=lipsum>${st()}</p>
|
|
563
|
+
`).render(),style:m`
|
|
564
|
+
.content {
|
|
565
|
+
justify-content: start;
|
|
566
|
+
p { margin-top: 0.5em; }
|
|
567
|
+
}
|
|
568
|
+
`})];return f`
|
|
569
|
+
<div class=themes>
|
|
570
|
+
<span>theme</span>
|
|
571
|
+
${rt.ShinyTabs.props(t).children(mr.map(i=>f`
|
|
572
|
+
<button>${i.label}</button>
|
|
573
|
+
`)).render()}
|
|
574
|
+
</div>
|
|
575
|
+
|
|
576
|
+
${o}
|
|
577
|
+
`})});console.log("\u2728shiny");
|
|
243
578
|
/*! Bundled license information:
|
|
244
579
|
|
|
245
580
|
@lit/reactive-element/css-tag.js:
|