@e280/quay 0.0.0-2 → 0.0.0-9
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 +28 -0
- package/package.json +13 -10
- package/s/demo/main.bundle.ts +2 -3
- package/s/dom/components/breadcrumb/component.ts +6 -5
- package/s/dom/components/browser/component.ts +11 -7
- package/s/dom/components/browser/style.css.ts +1 -1
- package/s/dom/components/dropzone/component.ts +6 -4
- package/s/dom/components/dropzone/style.css.ts +1 -1
- package/s/dom/components/filter/component.ts +11 -6
- package/s/dom/components/outliner/component.ts +8 -5
- package/s/dom/components/searchbar/component.ts +8 -5
- package/s/dom/components/sort/component.ts +10 -6
- package/s/dom/theme.css.ts +2 -1
- package/s/dom/views/tree/component.ts +10 -8
- package/s/dom/views/tree/style.css.ts +1 -1
- package/s/index.html.ts +68 -73
- package/s/index.ts +6 -1
- package/s/logic/aspects/codex/codex.ts +3 -3
- package/s/logic/aspects/codex/example.ts +1 -4
- package/s/logic/aspects/codex/parts/codex-item.ts +4 -4
- package/s/logic/aspects/codex/parts/types.ts +1 -1
- package/s/logic/aspects/dropzone.ts +20 -16
- package/s/logic/aspects/tree-trail.ts +5 -4
- package/s/logic/brain.ts +5 -3
- package/s/logic/group.ts +7 -7
- package/s/logic/presets/media/group.ts +5 -4
- package/s/logic/presets/media/schema.ts +4 -1
- package/s/logic/presets/media/store.test.ts +41 -0
- package/s/logic/presets/media/store.ts +163 -0
- package/s/logic/presets/opfs/schema.ts +1 -1
- package/s/logic/presets/plain/group.ts +2 -2
- package/s/logic/presets/plain/schema.ts +1 -1
- package/s/logic/types.ts +1 -1
- package/s/tests.test.ts +2 -0
- package/x/demo/main.bundle.js +2 -2
- package/x/demo/main.bundle.js.map +1 -1
- package/x/demo/main.bundle.min.js +105 -142
- package/x/demo/main.bundle.min.js.LEGAL.txt +33 -0
- package/x/demo/main.bundle.min.js.map +7 -0
- package/x/dom/components/breadcrumb/component.d.ts +1 -1
- package/x/dom/components/breadcrumb/component.js +6 -5
- package/x/dom/components/breadcrumb/component.js.map +1 -1
- package/x/dom/components/browser/component.d.ts +1 -1
- package/x/dom/components/browser/component.js +10 -7
- package/x/dom/components/browser/component.js.map +1 -1
- package/x/dom/components/browser/style.css.d.ts +1 -1
- package/x/dom/components/browser/style.css.js +1 -1
- package/x/dom/components/browser/style.css.js.map +1 -1
- package/x/dom/components/dropzone/component.d.ts +1 -1
- package/x/dom/components/dropzone/component.js +6 -4
- package/x/dom/components/dropzone/component.js.map +1 -1
- package/x/dom/components/dropzone/style.css.d.ts +1 -1
- package/x/dom/components/dropzone/style.css.js +1 -1
- package/x/dom/components/dropzone/style.css.js.map +1 -1
- package/x/dom/components/filter/component.d.ts +1 -1
- package/x/dom/components/filter/component.js +8 -6
- package/x/dom/components/filter/component.js.map +1 -1
- package/x/dom/components/outliner/component.d.ts +1 -1
- package/x/dom/components/outliner/component.js +7 -5
- package/x/dom/components/outliner/component.js.map +1 -1
- package/x/dom/components/searchbar/component.d.ts +1 -1
- package/x/dom/components/searchbar/component.js +7 -5
- package/x/dom/components/searchbar/component.js.map +1 -1
- package/x/dom/components/sort/component.d.ts +1 -1
- package/x/dom/components/sort/component.js +8 -6
- package/x/dom/components/sort/component.js.map +1 -1
- package/x/dom/components.d.ts +7 -7
- package/x/dom/theme.css.d.ts +1 -1
- package/x/dom/theme.css.js +1 -1
- package/x/dom/theme.css.js.map +1 -1
- package/x/dom/views/tree/component.d.ts +1 -6
- package/x/dom/views/tree/component.js +10 -8
- package/x/dom/views/tree/component.js.map +1 -1
- package/x/dom/views/tree/style.css.d.ts +1 -1
- package/x/dom/views/tree/style.css.js +1 -1
- package/x/dom/views/tree/style.css.js.map +1 -1
- package/x/index.d.ts +6 -1
- package/x/index.html +70 -167
- package/x/index.html.d.ts +1 -2
- package/x/index.html.js +67 -73
- package/x/index.html.js.map +1 -1
- package/x/index.js +6 -1
- package/x/index.js.map +1 -1
- package/x/logic/aspects/codex/codex.js +3 -3
- package/x/logic/aspects/codex/codex.js.map +1 -1
- package/x/logic/aspects/codex/example.d.ts +0 -1
- package/x/logic/aspects/codex/example.js +1 -3
- package/x/logic/aspects/codex/example.js.map +1 -1
- package/x/logic/aspects/codex/parts/codex-item.d.ts +1 -1
- package/x/logic/aspects/codex/parts/codex-item.js +4 -4
- package/x/logic/aspects/codex/parts/codex-item.js.map +1 -1
- package/x/logic/aspects/codex/parts/types.d.ts +1 -1
- package/x/logic/aspects/dropzone.d.ts +1 -1
- package/x/logic/aspects/dropzone.js +19 -15
- package/x/logic/aspects/dropzone.js.map +1 -1
- package/x/logic/aspects/tree-trail.d.ts +1 -1
- package/x/logic/aspects/tree-trail.js +4 -4
- package/x/logic/aspects/tree-trail.js.map +1 -1
- package/x/logic/brain.d.ts +4 -2
- package/x/logic/brain.js.map +1 -1
- package/x/logic/group.d.ts +4 -4
- package/x/logic/group.js +6 -6
- package/x/logic/group.js.map +1 -1
- package/x/logic/presets/media/group.d.ts +1 -1
- package/x/logic/presets/media/group.js +3 -3
- package/x/logic/presets/media/group.js.map +1 -1
- package/x/logic/presets/media/schema.d.ts +4 -1
- package/x/logic/presets/media/store.d.ts +92 -0
- package/x/logic/presets/media/store.js +129 -0
- package/x/logic/presets/media/store.js.map +1 -0
- package/x/logic/presets/media/store.test.d.ts +7 -0
- package/x/logic/presets/media/store.test.js +31 -0
- package/x/logic/presets/media/store.test.js.map +1 -0
- package/x/logic/presets/opfs/schema.d.ts +1 -1
- package/x/logic/presets/plain/group.js +2 -2
- package/x/logic/presets/plain/group.js.map +1 -1
- package/x/logic/presets/plain/schema.d.ts +1 -1
- package/x/logic/types.d.ts +1 -1
- package/x/tests.test.js +2 -0
- package/x/tests.test.js.map +1 -1
- package/x/genius/folio.md +0 -29
- package/x/genius/quay.md +0 -13
- package/x/genius/turbo.md +0 -21
- package/x/importmap.json +0 -47
|
@@ -1,70 +1,31 @@
|
|
|
1
|
-
class t{#t=!1;lock(t){this.#t=!0;const e=t();return this.#t=!1,e}get locked(){return this.#t}}const e=()=>new Map,s=()=>new Set;function r(t){return{guarantee:(e,s)=>function(t,e,s){if(t.has(e))return t.get(e);{const r=s();return t.set(e,r),r}}(t,e,s)}}class n{#e=new WeakMap;grab_keymap(t){const s=r(this.#e).guarantee(t,e);return{keymap:s,grab_symbolmap:t=>r(s).guarantee(t,e)}}clear(){this.#e=new WeakMap}}class i{#s=new Map;stop(t){const e=this.#s.get(t);e&&(this.#s.delete(t),e())}add(t,e){this.#s.set(t,e)}}class o{#r=[];record(t){const s=e();this.#r.push(s);const r=t();return this.#r.pop(),{payload:r,recording:s}}record_that_key_was_accessed(t,e){const n=this.#r.at(-1);if(n){r(n).guarantee(t,s).add(e)}}}class a extends Error{name=this.constructor.name}class c extends a{constructor(t){super(`forbidden circularity, rejected assignment to "${t}"`)}}class l extends a{constructor(t){super(`forbidden assignment to readonly property "${t}"`)}}function h(t){return new Proxy(t,{get:(t,e)=>t[e],set(t,e){throw new l(e)}})}function d(t,e){let s,r,n=[];function i(){s=[],r&&clearTimeout(r),r=void 0,n=[]}return i(),(...o)=>{s=o,r&&clearTimeout(r);const a=new Promise(((t,e)=>{n.push({resolve:t,reject:e})}));return r=setTimeout((()=>{Promise.resolve().then((()=>e(...s))).then((t=>{for(const{resolve:e}of n)e(t);i()})).catch((t=>{for(const{reject:e}of n)e(t);i()}))}),t),a}}class u{#n=new Map;#i=Promise.resolve();#o=d(0,(()=>{const t=[...this.#n.values()];this.#n.clear();for(const e of t)e()}));get wait(){return this.#i}add(t,e){this.#n.set(t,e),this.#i=this.#o()}}function p(t){return function(e){return()=>{const s="function"==typeof t?t():t;return e(s)}}}function f(t,e,s,r){const n=[];for(const[i,o]of e){const{grab_symbolmap:e}=s.grab_keymap(i);for(const s of o){const i=e(s);i.set(t,r),n.push((()=>i.delete(t)))}}return()=>n.forEach((t=>t()))}var g;!function(t){t.proxy=(t,e)=>new Proxy(e,{get:(s,r)=>{const n=e[r],i=t.getAttribute(r);switch(n){case String:return i??void 0;case Number:return null!==i?Number(i):void 0;case Boolean:return null!==i;default:throw new Error(`invalid attribute type for "${r}"`)}},set:(s,r,n)=>{switch(e[r]){case String:return t.setAttribute(r,n),!0;case Number:return t.setAttribute(r,n.toString()),!0;case Boolean:return n?t.setAttribute(r,""):t.removeAttribute(r),!0;default:throw new Error(`invalid attribute type for "${r}"`)}}}),t.on_change=function(t,e){const s=new MutationObserver(e);return s.observe(t,{attributes:!0}),()=>s.disconnect()}}(g||(g={}));class m{#a;constructor(t){this.#a=t}get state(){return this.#a.getter(this.#a.parent.state)}transmute(t){this.#a.parent.transmute((e=>{const s=this.#a.getter(e),r=t(s);return this.#a.setter(e,r)}))}slice({getter:t,setter:e}){return new m({parent:this,getter:t,setter:e})}}const v=t=>"object"==typeof t&&null!==t;const w={clone:function t(e,s=new Set){if(s.has(e))throw new Error("cannot clone circular reference");let r;return"function"==typeof e||null!==e&&"object"==typeof e?(s.add(e),r=Array.isArray(e)?e.map((e=>t(e,new Set(s)))):e.constructor===Object?Object.fromEntries(Object.entries(e).map((([e,r])=>[e,t(r,new Set(s))]))):e instanceof Map?new Map(Array.from(e,(([e,r])=>[e,t(r,new Set(s))]))):e instanceof Set?new Set(Array.from(e,(e=>t(e,new Set(s))))):e instanceof Date?new Date(e.getTime()):e,s.delete(e)):r=e,r},equal:(t,e)=>function t(e,s,r){if(!v(e)||!v(s))return e===s;if(r.includes(e))throw new Error("forbidden circularity detected in deep equal comparison");const n=[...r,e];if(e instanceof Map&&s instanceof Map){if(e.size!==s.size)return!1;for(const[r,i]of e)if(!s.has(r)||!t(i,s.get(r),n))return!1}else if(e instanceof Set&&s instanceof Set){if(e.size!==s.size)return!1;for(const r of e)if(!Array.from(s).some((e=>t(r,e,n))))return!1}else{const r=Object.keys(e),i=Object.keys(s);if(r.length!==i.length)return!1;for(const o of r){if(!i.includes(o))return!1;if(!t(e[o],s[o],n))return!1}}return!0}(t,e,[]),freeze:function(t){return function t(e,s){if(!v(e)||s.includes(e))return e;const r=[...s,e];if(e instanceof Map)for(const s of e.entries())for(const e of s)t(e,r);else if(e instanceof Set)for(const s of e)t(s,r);else if(Array.isArray(e))for(const s of e)t(s,r);else for(const s of Object.values(e))t(s,r);return Object.freeze(e)}(t,[])}};class b{#c;#l;#h;#d=!1;#u(){return w.freeze(structuredClone(this.#c))}constructor(t,e=()=>{}){this.#c=structuredClone(t),this.#l=this.#u(),this.#h=e}get state(){return this.#l}transmute(t){if(this.#d)throw new Error("circular error");this.#d=!0,this.#c=t(structuredClone(this.#c)),this.#l=this.#u(),this.#h(),this.#d=!1}slice({getter:t,setter:e}){return new m({parent:this,getter:t,setter:e})}}const y=Error;var _;function $(t){return{map:e=>x(t,e),filter:e=>A(t,e)}}!function(t){function e(t){return"ready"===t.status?t.payload:void 0}function s(t,e){switch(t.status){case"loading":return e.loading();case"error":return e.error(t.reason);case"ready":return e.ready(t.payload);default:throw console.error("op",t),new y("invalid op status")}}t.loading=()=>({status:"loading"}),t.error=t=>({status:"error",reason:t}),t.ready=t=>({status:"ready",payload:t}),t.is=Object.freeze({loading:t=>"loading"===t.status,error:t=>"error"===t.status,ready:t=>"ready"===t.status}),t.payload=e,t.reason=function(t){return"error"===t.status?t.reason:void 0},t.select=s,t.load=async function(e,s){e(t.loading());try{const r=await s();return e(t.ready(r)),r}catch(s){const r=s instanceof y?s.message:"string"==typeof s?s:"error";throw e(t.error(r)),s}},t.morph=function(e,r){return s(e,{loading:()=>t.loading(),error:e=>t.error(e),ready:e=>t.ready(r(e))})},t.all=function(...s){const r=s.find(t.is.error);return r||(s.every(t.is.ready)?t.ready(s.map(e)):t.loading())}}(_||(_={})),$.pipe=Object.freeze({map:t=>e=>x(e,t),filter:t=>e=>A(e,t)});const x=(t,e)=>Object.fromEntries(Object.entries(t).map((([t,s])=>[t,e(s,t)]))),A=(t,e)=>Object.fromEntries(Object.entries(t).filter((([t,s])=>e(s,t)))),k=Symbol();class S extends Error{name=this.constructor.name}class C{static unwrap=t=>t instanceof C?t.value:t;#p;#f=!1;#i;#g=new Set;[k]=!1;constructor(t){this.#p=t,this.#i=Promise.resolve(t)}subscribe(t){return this.on(t)}on(t){return this.#g.add(t),()=>{this.#g.delete(t)}}once(t){const e=s=>{t(s),this.#g.delete(e)};return this.#g.add(e),()=>{this.#g.delete(e)}}clear(){return this.#g.clear()}#m=d(0,(()=>{const t=this.#p;this.#f=!0;for(const e of this.#g)e(t);return this.#f=!1,t}));async publish(){this.#i=this.#m(),await this.#i}get wait(){return this.#i}get value(){return this[k]=!0,this.#p}set value(t){if(this.#f)throw new S("you can't set a signal in a signal's subscription listener (infinite loop forbidden)");this.#p!==t&&(this.#p=t,this.publish())}setDeep(t){if(this.#f)throw new S("you can't set a signal in a signal's subscription listener (infinite loop forbidden)");w.equal(t,this.#p)||(this.#p=t,this.publish())}setAndPublish(t){if(this.#f)throw new S("you can't set a signal in a signal's subscription listener (infinite loop forbidden)");this.#p=t,this.publish()}setWithoutPublish(t){if(this.#f)throw new S("you can't set a signal in a signal's subscription listener (infinite loop forbidden)");this.#p=t}setValueNoPublish(t){return this.setWithoutPublish(t)}}class E extends C{#v=0;constructor(t){super(t)}async load(t){const e=++this.#v;return _.load((t=>{this.#v===e&&(this.value=t)}),t)}setLoading(){this.value=_.loading()}setError(t){this.value=_.error(t)}setReady(t){this.value=_.ready(t)}isLoading(){return _.is.loading(this.value)}isError(){return _.is.error(this.value)}isReady(){return _.is.ready(this.value)}get payload(){return _.payload(this.value)}select(t){return _.select(this.value,t)}}class P{#w=!0;#b;#y;#_=new Set;#$=new Set;constructor({all_signals:t,waiters:e}){this.#b=t,this.#y=e}#o=d(0,(t=>{if(this.#w)if("lean"in t)t.actor();else{const{payload:e,recording:s}=this.observe(t.collector);this.add_listeners(t,s),t.responder&&t.responder(e)}}));#x(){for(const t of this.#b)t[k]=!1}get#A(){return[...this.#b].filter((t=>t[k]&&!this.#_.has(t)))}observe(t){this.#x();return{payload:t(),recording:this.#A}}add_listeners(t,e){for(const s of e)this.#_.add(s),this.#$.add(s.on((()=>this.#y.add(this.#o(t)))))}shutdown(){this.#w=!1,this.#$.forEach((t=>t()))}}const M=new class{static readonly=h;static collectivize=p;#k=new n;#S=new o;#C=new t;#E=new i;#P=new u;#M=function(t,e,s,r,n){function i([s,n]){if("lean"in n)n.actor();else{const{payload:i,recording:o}=e.record(n.collector);r.add(s,f(s,o,t,n)),n.responder&&n.responder(i)}}return{get:(t,s)=>(e.record_that_key_was_accessed(t,s),t[s]),set:(e,r,o)=>{if(s.locked)throw new c(r);e[r]=o;const a=[...t.grab_keymap(e).grab_symbolmap(r)];for(const t of a){const[e]=t;n.add(e,(()=>s.lock((()=>i(t)))))}return!0}}}(this.#k,this.#S,this.#C,this.#E,this.#P);get wait(){return this.#P.wait}state(t){return new Proxy(t,this.#M)}reaction(t,e){const s=Symbol(),{recording:r}=this.#S.record((()=>this.#C.lock(t)));return this.#E.add(s,f(s,r,this.#k,{collector:t,responder:e})),()=>this.#E.stop(s)}lean(t){const e=Symbol();return{stop:()=>this.#E.stop(e),collect:s=>{const{payload:r,recording:n}=this.#S.record((()=>this.#C.lock(s)));return this.#E.add(e,f(e,n,this.#k,{lean:!0,actor:t})),r}}}clear(){this.#k.clear()}},z=new class{#z=new Set;#y=new Set;signal(t){const e=new C(t);return this.#z.add(e),e}computed(t){const e=this.signal(t());return this.reaction((()=>{e.value=t()})),e}async computedAsync(t,e){const s=await e(t()),r=this.signal(s);return this.reaction(t,(async t=>{r.value=await e(t)})),r}op(t=_.loading()){const e=new E(t);return this.#z.add(e),e}load(t){const e=this.op(_.loading());return e.load(t),e}many(t){return $(t).map((t=>this.signal(t)))}reaction(t,e){const s=new P({waiters:this.#y,all_signals:this.#z}),r={collector:t,responder:e},{recording:n}=s.observe(r.collector);return s.add_listeners(r,n),()=>s.shutdown()}lean(t){const e=new P({waiters:this.#y,all_signals:this.#z}),s={lean:!0,actor:t};return{stop:()=>e.shutdown(),collect:t=>{const{payload:r,recording:n}=e.observe(t);return e.add_listeners(s,n),r}}}async#O(){return await Promise.all([...this.#z].map((t=>t.wait))).then((()=>Promise.all([...this.#y]))).then((()=>{this.#y.clear()}))}get wait(){return Promise.resolve().then((()=>this.#O())).then((()=>this.#O()))}},O=new class{#z;#U=new Set;#g=new Set;#T=new Map;#j=Promise.resolve();constructor(t){this.#z=t}get wait(){return this.#j}#q=d(0,(()=>{for(const t of this.#U)t();for(const t of this.#g)t()}));dispatch(){this.#j=this.#q()}computed(t){const e=this.#z.signal(t());return this.#U.add((()=>{e.value=t()})),e}track(t,e){let s=!0;const r=()=>{const r=t(),n=this.#T.get(t);!s&&w.equal(r,n)||(s=!1,this.#T.set(t,r),e(r))};r(),this.#g.add(r);return()=>this.#g.delete(r)}stateTree(t){return new b(t,(()=>this.dispatch()))}}(z);M.state.bind(M);const U=z.signal.bind(z);z.computed.bind(z),z.op.bind(z);const T=new class{flat;signals;#i=Promise.resolve();constructor(t,e){this.flat=t,this.signals=e}get wait(){return Promise.all([this.flat.wait,this.signals.wait]).then((()=>this.#i))}reaction(t,e){const s=e?()=>e(n()):()=>n(),r=this.lean(s),n=()=>r.collect(t);return n(),r.stop}lean(t){const e=this.flat.lean(t),s=this.signals.lean(t);return{stop(){e.stop(),s.stop()},collect:t=>e.collect((()=>s.collect(t)))}}}(M,z);class j{static with(t){return new this(t)}#D;constructor(t){this.#D=t}to(t){return new j(t(this.#D))}done(){return this.#D}}var q;function D(t){return[t].flat().filter((t=>!!t))}!function(t){function e(...t){return function(e){return class extends e{static get styles(){return R(e.styles,t)}}}}function s(t=T){return function(e){return class extends e{#N=null;render(){return this.#N?.collect((()=>super.render()))}connectedCallback(){super.connectedCallback(),this.#N=t.lean((()=>this.requestUpdate()))}disconnectedCallback(){super.disconnectedCallback(),this.#N&&(this.#N.stop(),this.#N=null)}}}}t.css=e,t.css_deferred=function(t){return function(e){return class extends e{static get styles(){return R(e.styles,t())}}}},t.signals=function(t){return function(e){return class extends e{#N=null;render(){return this.#N?.collect((()=>super.render()))}connectedCallback(){super.connectedCallback(),this.#N=t.lean((()=>this.requestUpdate()))}disconnectedCallback(){super.disconnectedCallback(),this.#N&&(this.#N.stop(),this.#N=null)}}}},t.flat=function(t){return function(e){return class extends e{#N=null;render(){return this.#N?.collect((()=>super.render()))}connectedCallback(){super.connectedCallback(),this.#N=t.lean((()=>this.requestUpdate()))}disconnectedCallback(){super.disconnectedCallback(),this.#N&&(this.#N.stop(),this.#N=null)}}}},t.reactive=s,t.reactor=s,t.setup=function(...t){return function(r){return j.with(r).to(e(...t)).to(s()).done()}}}(q||(q={}));const N=t=>void 0!==t;function R(t,e){return[...D(t)??[],...D(e)].flat().filter(N)}var H;function F(t,e={}){const{soft:s=!1,upgrade:r=!0}=e;for(const[e,n]of Object.entries(t)){const t=e.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase(),i=customElements.get(t);s&&i||(customElements.define(t,n),r&&document.querySelectorAll(t).forEach((t=>{t.constructor===HTMLElement&&customElements.upgrade(t)})))}}!function(t){t.css=t=>e=>$(e).map((e=>q.css(t)(e))),t.flat=t=>e=>$(e).map((e=>q.flat(t)(e))),t.signals=t=>e=>$(e).map((e=>q.signals(t)(e))),t.reactive=(t=T)=>e=>$(e).map((e=>q.reactive(t)(e))),t.reactor=t.reactive,t.context=e=>s=>j.with(s).to(t.css(e.theme)).to(t.reactive()).done(),t.setup=(...t)=>e=>$(e).map((e=>q.setup(...t)(e)))}(H||(H={}));const L=F,B=globalThis,I=B.ShadowRoot&&(void 0===B.ShadyCSS||B.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,V=Symbol(),K=new WeakMap;
|
|
2
|
-
|
|
3
|
-
* @license
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*/Symbol.metadata??=Symbol("metadata"),rt.litPropertyMetadata??=new WeakMap;let dt=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=ht){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){const s=Symbol(),r=this.getPropertyDescriptor(t,s,e);void 0!==r&&Y(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){const{get:r,set:n}=J(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:r,set(e){const i=r?.call(this);n?.call(this,e),this.requestUpdate(t,i,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ht}static _$Ei(){if(this.hasOwnProperty(at("elementProperties")))return;const t=st(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(at("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(at("properties"))){const t=this.properties,e=[...tt(t),...et(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(Z(t))}else void 0!==t&&e.push(Z(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?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),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return G(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){const s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(void 0!==r&&!0===s.reflect){const n=(void 0!==s.converter?.toAttribute?s.converter:ct).toAttribute(e,s.type);this._$Em=t,null==n?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(t,e){const s=this.constructor,r=s._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=s.getPropertyOptions(r),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:ct;this._$Em=r,this[r]=n.fromAttribute(e,t.type)??this._$Ej?.get(r)??null,this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){const r=this.constructor,n=this[t];if(s??=r.getPropertyOptions(t),!((s.hasChanged??lt)(n,e)||s.useDefault&&s.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,s))))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:r,wrapped:n},i){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),!0!==n||void 0!==i)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),!0===r&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t){const{wrapped:t}=s,r=this[e];!0!==t||this._$AL.has(e)||void 0===r||this.C(e,void 0,s,r)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.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((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};dt.elementStyles=[],dt.shadowRootOptions={mode:"open"},dt[at("elementProperties")]=new Map,dt[at("finalized")]=new Map,ot?.({ReactiveElement:dt}),(rt.reactiveElementVersions??=[]).push("2.1.0");
|
|
12
|
-
/**
|
|
13
|
-
* @license
|
|
14
|
-
* Copyright 2017 Google LLC
|
|
15
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
-
*/
|
|
17
|
-
const ut=globalThis,pt=ut.trustedTypes,ft=pt?pt.createPolicy("lit-html",{createHTML:t=>t}):void 0,gt="$lit$",mt=`lit$${Math.random().toFixed(9).slice(2)}$`,vt="?"+mt,wt=`<${vt}>`,bt=document,yt=()=>bt.createComment(""),_t=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$t=Array.isArray,xt="[ \t\n\f\r]",At=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,kt=/-->/g,St=/>/g,Ct=RegExp(`>|${xt}(?:([^\\s"'>=/]+)(${xt}*=${xt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Et=/'/g,Pt=/"/g,Mt=/^(?:script|style|textarea|title)$/i,zt=(t=>(e,...s)=>({_$litType$:t,strings:e,values:s}))(1),Ot=Symbol.for("lit-noChange"),Ut=Symbol.for("lit-nothing"),Tt=new WeakMap,jt=bt.createTreeWalker(bt,129);function qt(t,e){if(!$t(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==ft?ft.createHTML(e):e}const Dt=(t,e)=>{const s=t.length-1,r=[];let n,i=2===e?"<svg>":3===e?"<math>":"",o=At;for(let e=0;e<s;e++){const s=t[e];let a,c,l=-1,h=0;for(;h<s.length&&(o.lastIndex=h,c=o.exec(s),null!==c);)h=o.lastIndex,o===At?"!--"===c[1]?o=kt:void 0!==c[1]?o=St:void 0!==c[2]?(Mt.test(c[2])&&(n=RegExp("</"+c[2],"g")),o=Ct):void 0!==c[3]&&(o=Ct):o===Ct?">"===c[0]?(o=n??At,l=-1):void 0===c[1]?l=-2:(l=o.lastIndex-c[2].length,a=c[1],o=void 0===c[3]?Ct:'"'===c[3]?Pt:Et):o===Pt||o===Et?o=Ct:o===kt||o===St?o=At:(o=Ct,n=void 0);const d=o===Ct&&t[e+1].startsWith("/>")?" ":"";i+=o===At?s+wt:l>=0?(r.push(a),s.slice(0,l)+gt+s.slice(l)+mt+d):s+mt+(-2===l?e:d)}return[qt(t,i+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),r]};class Nt{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let n=0,i=0;const o=t.length-1,a=this.parts,[c,l]=Dt(t,e);if(this.el=Nt.createElement(c,s),jt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=jt.nextNode())&&a.length<o;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(gt)){const e=l[i++],s=r.getAttribute(t).split(mt),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:o[2],strings:s,ctor:"."===o[1]?Bt:"?"===o[1]?It:"@"===o[1]?Vt:Lt}),r.removeAttribute(t)}else t.startsWith(mt)&&(a.push({type:6,index:n}),r.removeAttribute(t));if(Mt.test(r.tagName)){const t=r.textContent.split(mt),e=t.length-1;if(e>0){r.textContent=pt?pt.emptyScript:"";for(let s=0;s<e;s++)r.append(t[s],yt()),jt.nextNode(),a.push({type:2,index:++n});r.append(t[e],yt())}}}else if(8===r.nodeType)if(r.data===vt)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=r.data.indexOf(mt,t+1));)a.push({type:7,index:n}),t+=mt.length-1}n++}}static createElement(t,e){const s=bt.createElement("template");return s.innerHTML=t,s}}function Rt(t,e,s=t,r){if(e===Ot)return e;let n=void 0!==r?s._$Co?.[r]:s._$Cl;const i=_t(e)?void 0:e._$litDirective$;return n?.constructor!==i&&(n?._$AO?.(!1),void 0===i?n=void 0:(n=new i(t),n._$AT(t,s,r)),void 0!==r?(s._$Co??=[])[r]=n:s._$Cl=n),void 0!==n&&(e=Rt(t,n._$AS(t,e.values),n,r)),e}class Ht{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){const{el:{content:e},parts:s}=this._$AD,r=(t?.creationScope??bt).importNode(e,!0);jt.currentNode=r;let n=jt.nextNode(),i=0,o=0,a=s[0];for(;void 0!==a;){if(i===a.index){let e;2===a.type?e=new Ft(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new Kt(n,this,t)),this._$AV.push(e),a=s[++o]}i!==a?.index&&(n=jt.nextNode(),i++)}return jt.currentNode=bt,r}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class Ft{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=Ut,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Rt(this,t,e),_t(t)?t===Ut||null==t||""===t?(this._$AH!==Ut&&this._$AR(),this._$AH=Ut):t!==this._$AH&&t!==Ot&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>$t(t)||"function"==typeof t?.[Symbol.iterator])(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!==Ut&&_t(this._$AH)?this._$AA.nextSibling.data=t:this.T(bt.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,r="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=Nt.createElement(qt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new Ht(r,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=Tt.get(t.strings);return void 0===e&&Tt.set(t.strings,e=new Nt(t)),e}k(t){$t(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,r=0;for(const n of t)r===e.length?e.push(s=new Ft(this.O(yt()),this.O(yt()),this,this.options)):s=e[r],s._$AI(n),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Lt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,n){this.type=1,this._$AH=Ut,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=Ut}_$AI(t,e=this,s,r){const n=this.strings;let i=!1;if(void 0===n)t=Rt(this,t,e,0),i=!_t(t)||t!==this._$AH&&t!==Ot,i&&(this._$AH=t);else{const r=t;let o,a;for(t=n[0],o=0;o<n.length-1;o++)a=Rt(this,r[s+o],e,o),a===Ot&&(a=this._$AH[o]),i||=!_t(a)||a!==this._$AH[o],a===Ut?t=Ut:t!==Ut&&(t+=(a??"")+n[o+1]),this._$AH[o]=a}i&&!r&&this.j(t)}j(t){t===Ut?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Bt extends Lt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Ut?void 0:t}}class It extends Lt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Ut)}}class Vt extends Lt{constructor(t,e,s,r,n){super(t,e,s,r,n),this.type=5}_$AI(t,e=this){if((t=Rt(this,t,e,0)??Ut)===Ot)return;const s=this._$AH,r=t===Ut&&s!==Ut||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==Ut&&(s===Ut||r);r&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Kt{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){Rt(this,t)}}const Wt=ut.litHtmlPolyfillSupport;Wt?.(Nt,Ft),(ut.litHtmlVersions??=[]).push("3.3.0");const Qt=(t,e,s)=>{const r=s?.renderBefore??e;let n=r._$litPart$;if(void 0===n){const t=s?.renderBefore??null;r._$litPart$=n=new Ft(e.insertBefore(yt(),t),t,void 0,s??{})}return n._$AI(t),n
|
|
18
|
-
/**
|
|
19
|
-
* @license
|
|
20
|
-
* Copyright 2017 Google LLC
|
|
21
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/},Gt=globalThis;let Zt=class extends dt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Qt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Ot}};Zt._$litElement$=!0,Zt.finalized=!0,Gt.litElementHydrateSupport?.({LitElement:Zt});const Xt=Gt.litElementPolyfillSupport;Xt?.({LitElement:Zt}),(Gt.litElementVersions??=[]).push("4.2.0");class Yt extends(function(t){return class extends t{#R=(new Set).add((()=>this.setup()));#H=new Set;register_setup(t){this.#R.add(t)}setup(){return()=>{}}connectedCallback(){for(const t of this.#R)this.#H.add(t())}disconnectedCallback(){for(const t of this.#H)t();this.#H.clear()}}}(HTMLElement)){}function Jt(){let t,e;const s=new Promise(((s,r)=>{t=s,e=r}));return{promise:s,resolve:t,reject:e,entangle:function(r){return r.then(t).catch(e),s}}}function te(t,e){G(t,function(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(Z(t))}else void 0!==t&&e.push(Z(t));return e}(e))}class ee extends Yt{static get styles(){}#F;#L=Jt();#i=this.#L.promise;init(){}constructor(){super(),this.#F=this.attachShadow({mode:"open"});const t=this.constructor;te(this.#F,t.styles),this.init()}get root(){return this.#F}get updateComplete(){return this.#i.then((()=>!0))}render(){}#B=d(0,(()=>{const t=this.#F,e=this.render();e&&Qt(e,t,{host:this})}));async requestUpdate(){const t=this.#B();return this.#L&&(t.then(this.#L.resolve),this.#L=void 0),this.#i=t,t}connectedCallback(){super.connectedCallback(),this.requestUpdate()}}class se extends Yt{#L=Jt();#i=this.#L.promise;init(){}constructor(){super(),this.init()}get updateComplete(){return this.#i.then((()=>!0))}render(){}#B=d(0,(()=>{const t=this.render();Qt(t,this,{host:this})}));async requestUpdate(){const t=this.#B();return this.#L&&(t.then(this.#L.resolve),this.#L=void 0),this.#i=t,t}connectedCallback(){super.connectedCallback(),this.requestUpdate()}}const re=Symbol();class ne{#p=0;pull(){return this.#p++}reset(){this.#p=0}}class ie{[re]={wrap:t=>(...e)=>(this.#I.reset(),t(...e)),disconnect:()=>{for(const t of this.#V)t();this.#V.clear();for(const t of this.#K)t();this.#K.clear(),this.#W.clear();for(const{untrack:t}of this.#Q.values())t();this.#Q.clear()},reconnect:()=>{for(const t of this.#G.values())this.#V.add(t());for(const[t,e]of this.#Z.entries()){const[s,r]=e();this.#W.set(t,s),this.#K.add(r)}},afterRender:()=>{for(const t of this.#X.values())t()}};#Y;#J;#I=new ne;constructor(t,e){this.#J=t,this.#Y=e}get context(){return this.#Y}rerender(){this.#J()}#G=new Map;#V=new Set;mount(t){const e=this.#I.pull();this.#G.has(e)||(this.#G.set(e,t),this.#V.add(t()))}#Z=new Map;#W=new Map;#K=new Set;init(t){const e=this.#I.pull();if(!this.#Z.has(e)){this.#Z.set(e,t);const[s,r]=t();return this.#W.set(e,s),this.#K.add(r),s}return this.#W.get(e)}#tt=new Map;once(t){const e=this.#I.pull();return r(this.#tt).guarantee(e,t)}#X=new Map;defer(t){const e=this.signal(void 0),s=this.#I.pull();return this.#X.has(s)||this.#X.set(s,(()=>{e.value=t()})),e}#et=new Set;deferOnce(t){this.mount((()=>(this.#et.clear(),()=>{})));const e=this.signal(void 0),s=this.#I.pull();return this.#X.has(s)||this.#X.set(s,(()=>{this.#et.has(s)||(this.#et.add(s),e.value=t())})),e}#st=new Map;state(t){const e=this.#I.pull();return[r(this.#st).guarantee(e,(()=>"function"==typeof t?t():t)),t=>{this.#st.set(e,t),this.#J()},()=>this.#st.get(e)]}#rt=new Map;flatstate(t){const e=this.#I.pull();return r(this.#rt).guarantee(e,(()=>M.state("function"==typeof t?t():t)))}#z=new Map;signal(t){const e=this.#I.pull();return r(this.#z).guarantee(e,(()=>z.signal("function"==typeof t?t():t)))}computed(t){const e=this.#I.pull();return r(this.#z).guarantee(e,(()=>z.computed(t)))}op(){const t=this.#I.pull();return r(this.#z).guarantee(t,(()=>z.op()))}load(t){const e=this.op();return this.once((()=>e.load(t))),e}#Q=new Map;watch(t){const e=this.#I.pull(),{data:s}=r(this.#Q).guarantee(e,(()=>{const e={data:t(),untrack:()=>{}};return e.untrack=O.track(t,(t=>{e.data=t,this.#J()})),e}));return s}#nt=new Map;effect(t,e){e=e.map(C.unwrap);const s=this.#I.pull(),r=this.#nt.get(s);if(r){const[n,i]=r;w.equal(e,i)||(n(),this.#nt.set(s,[t(),e]))}else{this.#G.set(s,t);const r=t();this.#V.add(r),this.#nt.set(s,[r,e])}}}class oe extends ie{#it;get element(){return this.#it}#ot;get shadow(){return this.#ot}styles(...t){this.once((()=>te(this.shadow,[this.context.theme,...t])))}css(...t){return this.styles(...t)}constructor(t,e,s,r){super(s,r),this.#it=t,this.#ot=e}}function ae(t){let e;return function(s){return e||(e=function(t,e){return g.on_change(t,(()=>t.requestUpdate())),g.proxy(t,e)}(t,s)),e}}class ce extends oe{attrs;constructor(t,e,s,r){super(t,e,s,r),this.attrs=ae(t)}}class le extends ie{#it;get element(){return this.#it}attrs;constructor(t,e,s){super(e,s),this.#it=t,this.attrs=ae(t)}}class he extends ce{}class de extends le{}class ue extends ie{element;name(t){this.once((()=>this.element.setAttribute("view",t)))}constructor(t,e,s){super(e,s),this.element=t}}class pe extends oe{name(t){this.once((()=>this.element.setAttribute("view",t)))}}class fe{#Y;constructor(t){this.#Y=t}get context(){if(this.#Y)return this.#Y;throw new Error("nexus.context was not set, but it's necessary")}set context(t){this.#Y=t}}function ge(t,e){const s=T.lean(e);return{stop:s.stop,render:(...e)=>s.collect((()=>t(...e)))}}const me=t=>e=>class extends ee{#at=new he(this,this.root,(()=>{this.requestUpdate()}),t.context);#ct=this.#at[re].wrap((()=>e(this.#at)));#lt;render(){return this.updateComplete.then((()=>this.#at[re].afterRender())),this.#lt?.render()}connectedCallback(){super.connectedCallback(),this.#at[re].reconnect(),this.#lt=ge(this.#ct,(()=>{this.requestUpdate()}))}disconnectedCallback(){super.disconnectedCallback(),this.#at[re].disconnect(),this.#lt&&(this.#lt.stop(),this.#lt=void 0)}},ve=2;
|
|
23
|
-
/**
|
|
24
|
-
* @license
|
|
25
|
-
* Copyright 2020 Google LLC
|
|
26
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/class we{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)}}
|
|
28
|
-
/**
|
|
29
|
-
* @license
|
|
30
|
-
* Copyright 2017 Google LLC
|
|
31
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
|
-
*/const be=(t,e)=>{const s=t._$AN;if(void 0===s)return!1;for(const t of s)t._$AO?.(e,!1),be(t,e);return!0},ye=t=>{let e,s;do{if(void 0===(e=t._$AM))break;s=e._$AN,s.delete(t),t=e}while(0===s?.size)},_e=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(void 0===s)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),Ae(e)}};function $e(t){void 0!==this._$AN?(ye(this),this._$AM=t,_e(this)):this._$AM=t}function xe(t,e=!1,s=0){const r=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(e)if(Array.isArray(r))for(let t=s;t<r.length;t++)be(r[t],!1),ye(r[t]);else null!=r&&(be(r,!1),ye(r));else be(this,t)}const Ae=t=>{t.type==ve&&(t._$AP??=xe,t._$AQ??=$e)};class ke extends we{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),_e(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(be(this,t),ye(this))}setValue(t){if((t=>void 0===t.strings)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}function Se(){const t=new Set;function e(e){return t.add(e),()=>{t.delete(e)}}return e.publish=e=>{for(const s of t)s(e)},e.clear=()=>t.clear(),e.once=e=>{const s=r=>{e(r),t.delete(s)};return t.add(s),()=>{t.delete(s)}},e}class Ce extends HTMLElement{static tag="slate-view";onConnected=Se();onDisconnected=Se();connectedCallback(){this.onConnected.publish()}disconnectedCallback(){this.onDisconnected.publish()}}function Ee(...t){const e=new Set,s=t.map((t=>t??"")).flatMap(Pe);for(const t of s)e.add(t);return e}function Pe(t){return t.split(/\s+/).map((t=>t.trim())).filter((t=>!!t))}function Me(t){return t.split(",").map((t=>t.trim())).filter((t=>!!t)).map((t=>t.includes(":")?t.split(":").map((t=>t.trim()))[1]:t))}function ze(t,e){const s=Ee(t.getAttribute("part")),r=Ee(t.getAttribute("data-gpart")),n=function(t,e){return Object.fromEntries(Object.entries(e).map((([e,s])=>[e,Array.from(t.querySelectorAll(`[${s}]`)).map((t=>t.getAttribute(s)))])))}(e,{part:"part",gpart:"data-gpart",exportparts:"exportparts",gexportparts:"gexportparts"}),i=new Set([...n.part.flatMap(Pe),...n.exportparts.flatMap(Me)]),o=new Set([...n.gpart.flatMap(Pe),...n.gexportparts.flatMap(Pe)]);i.size&&t.setAttribute("exportparts",[...s].flatMap(function(t,e){return s=>[...t].flatMap((t=>[`${t}:${s}-${t}`,...e.has(t)?[t]:[]]))}(i,o)).join(", ")),(o.size||t.hasAttribute("data-gpart"))&&t.setAttribute("gexportparts",[...o,...[...r].flatMap((t=>[...i].map((e=>`${t}-${e}`))))].join(" "))}function Oe(t,e={},s={}){const{content:r,attrs:n={}}=e,{attrs:i={}}=s;function o(e,s,r,n){e!==s&&(void 0===e?t.removeAttribute(r):t.setAttribute(r,n()))}n&&function(t,e){for(const[s,r]of Object.entries(e))"string"==typeof r?t.setAttribute(s,r):"number"==typeof r?t.setAttribute(s,r.toString()):"boolean"==typeof r?!0===r?t.setAttribute(s,""):t.removeAttribute(s):void 0===r?t.removeAttribute(s):console.warn(`invalid attribute type ${s} is ${typeof r}`)}(t,n),o(n.class,i?.class,"class",(()=>n.class)),o(n.part,i?.part,"part",(()=>n.part)),o(n.gpart,i?.gpart,"data-gpart",(()=>n.gpart)),r&&Qt(r,t,{host:t})}const Ue=t=>e=>(t=>(e,s={})=>({_$litDirective$:t,values:[{meta:s,props:e}]}))(class extends ke{#D;#ht=!0;#F=function({afterRender:t,onConnected:e,onDisconnected:s}){const r=document.createElement(Ce.tag);r.onConnected(e),r.onDisconnected(s);const n=r.attachShadow({mode:"open"});let i=!1;return{container:r,shadow:n,set auto_exportparts(t){i=t},render_into_shadow:e=>(Qt(e,n),i&&ze(r,n),t(),r)}}({afterRender:()=>this.#at[re].afterRender(),onDisconnected:()=>this.disconnected(),onConnected:()=>{this.#ht||this.reconnected(),this.#ht=!1}});#J=d(0,(()=>{this.#D&&this.isConnected&&this.setValue(this.#F.render_into_shadow(this.render(this.#D)))}));#at=new pe(this.#F.container,this.#F.shadow,this.#J,t.context);#ct=this.#at[re].wrap(e(this.#at));#lt=ge(this.#ct,this.#J);update(t,e){return this.#F.render_into_shadow(this.render(...e))}render(t){return Oe(this.#F.container,t.meta,this.#D?.meta),this.#D=t,this.#F.auto_exportparts=t.meta.auto_exportparts??!0,this.#lt?.render(...t.props)}reconnected(){this.#at[re].reconnect(),this.#lt=ge(this.#ct,this.#J)}disconnected(){this.#at[re].disconnect(),this.#lt&&(this.#lt.stop(),this.#lt=void 0)}}),Te=t=>e=>class extends se{#at=new de(this,(()=>{this.requestUpdate()}),t.context);#ct=this.#at[re].wrap((()=>e(this.#at)));#lt;render(){return this.updateComplete.then((()=>this.#at[re].afterRender())),this.#lt?.render()}connectedCallback(){super.connectedCallback(),this.#lt=ge(this.#ct,(()=>{this.requestUpdate()})),this.#at[re].reconnect()}disconnectedCallback(){super.disconnectedCallback(),this.#lt&&(this.#lt.stop(),this.#lt=void 0),this.#at[re].disconnect()}},je=t=>e=>(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends ke{#dt;#it=document.createElement(Ce.tag);#ut(t){return Qt(t,this.#it),this.#at[re].afterRender(),this.#it}#J=d(0,(()=>{this.#dt&&this.isConnected&&this.setValue(this.#ut(this.render(...this.#dt)))}));#at=new ue(this.#it,this.#J,t.context);#ct=this.#at[re].wrap(e(this.#at));#lt=ge(this.#ct,this.#J);update(t,e){return this.#ut(this.render(...e))}render(...t){return this.#dt=t,this.#lt?.render(...t)}reconnected(){this.#at[re].reconnect(),this.#lt=ge(this.#ct,this.#J)}disconnected(){this.#at[re].disconnect(),this.#lt&&(this.#lt.stop(),this.#lt=void 0)}});Q`
|
|
33
|
-
@layer reset {
|
|
34
|
-
* {
|
|
35
|
-
margin: 0;
|
|
36
|
-
padding: 0;
|
|
37
|
-
box-sizing: border-box;
|
|
38
|
-
|
|
39
|
-
scrollbar-width: thin;
|
|
40
|
-
scrollbar-color: #888 transparent;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
::-webkit-scrollbar { width: 8px; }
|
|
44
|
-
::-webkit-scrollbar-track { background: transparent; }
|
|
45
|
-
::-webkit-scrollbar-thumb { background: #333; border-radius: 1em; }
|
|
46
|
-
::-webkit-scrollbar-thumb:hover { background: #444; }
|
|
1
|
+
var qr=Object.defineProperty;var Et=(r,e)=>{for(var t in e)qr(r,t,{get:e[t],enumerable:!0})};var ve=globalThis,$e=ve.ShadowRoot&&(ve.ShadyCSS===void 0||ve.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,at=Symbol(),kt=new WeakMap,ne=class{constructor(e,t,o){if(this._$cssResult$=!0,o!==at)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if($e&&e===void 0){let o=t!==void 0&&t.length===1;o&&(e=kt.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&kt.set(t,e))}return e}toString(){return this.cssText}},Ct=r=>new ne(typeof r=="string"?r:r+"",void 0,at),d=(r,...e)=>{let t=r.length===1?r[0]:e.reduce(((o,s,n)=>o+(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.")})(s)+r[n+1]),r[0]);return new ne(t,r,at)},Ae=(r,e)=>{if($e)r.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(let t of e){let o=document.createElement("style"),s=ve.litNonce;s!==void 0&&o.setAttribute("nonce",s),o.textContent=t.cssText,r.appendChild(o)}},ee=$e?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(let o of e.cssRules)t+=o.cssText;return Ct(t)})(r):r;var{is:Fr,defineProperty:Gr,getOwnPropertyDescriptor:Wr,getOwnPropertyNames:Vr,getOwnPropertySymbols:Qr,getPrototypeOf:Kr}=Object,Se=globalThis,Bt=Se.trustedTypes,Zr=Bt?Bt.emptyScript:"",Jr=Se.reactiveElementPolyfillSupport,ie=(r,e)=>r,ct={toAttribute(r,e){switch(e){case Boolean:r=r?Zr:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},Pt=(r,e)=>!Fr(r,e),Tt={attribute:!0,type:String,converter:ct,reflect:!1,useDefault:!1,hasChanged:Pt};Symbol.metadata??=Symbol("metadata"),Se.litPropertyMetadata??=new WeakMap;var H=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Tt){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let o=Symbol(),s=this.getPropertyDescriptor(e,o,t);s!==void 0&&Gr(this.prototype,e,s)}}static getPropertyDescriptor(e,t,o){let{get:s,set:n}=Wr(this.prototype,e)??{get(){return this[t]},set(i){this[t]=i}};return{get:s,set(i){let l=s?.call(this);n?.call(this,i),this.requestUpdate(e,l,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Tt}static _$Ei(){if(this.hasOwnProperty(ie("elementProperties")))return;let e=Kr(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ie("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ie("properties"))){let t=this.properties,o=[...Vr(t),...Qr(t)];for(let s of o)this.createProperty(s,t[s])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[o,s]of t)this.elementProperties.set(o,s)}this._$Eh=new Map;for(let[t,o]of this.elementProperties){let s=this._$Eu(t,o);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let o=new Set(e.flat(1/0).reverse());for(let s of o)t.unshift(ee(s))}else e!==void 0&&t.push(ee(e));return t}static _$Eu(e,t){let o=t.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.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((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let o of t.keys())this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ae(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,o){this._$AK(e,o)}_$ET(e,t){let o=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,o);if(s!==void 0&&o.reflect===!0){let n=(o.converter?.toAttribute!==void 0?o.converter:ct).toAttribute(t,o.type);this._$Em=e,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,t){let o=this.constructor,s=o._$Eh.get(e);if(s!==void 0&&this._$Em!==s){let n=o.getPropertyOptions(s),i=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:ct;this._$Em=s,this[s]=i.fromAttribute(t,n.type)??this._$Ej?.get(s)??null,this._$Em=null}}requestUpdate(e,t,o){if(e!==void 0){let s=this.constructor,n=this[e];if(o??=s.getPropertyOptions(e),!((o.hasChanged??Pt)(n,t)||o.useDefault&&o.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,o))))return;this.C(e,t,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:o,reflect:s,wrapped:n},i){o&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,i??t??this[e]),n!==!0||i!==void 0)||(this._$AL.has(e)||(this.hasUpdated||o||(t=void 0),this._$AL.set(e,t)),s===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[s,n]of this._$Ep)this[s]=n;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[s,n]of o){let{wrapped:i}=n,l=this[s];i!==!0||this._$AL.has(s)||l===void 0||this.C(s,void 0,n,l)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((o=>o.hostUpdate?.())),this.update(t)):this._$EM()}catch(o){throw e=!1,this._$EM(),o}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};H.elementStyles=[],H.shadowRootOptions={mode:"open"},H[ie("elementProperties")]=new Map,H[ie("finalized")]=new Map,Jr?.({ReactiveElement:H}),(Se.reactiveElementVersions??=[]).push("2.1.0");var ut=globalThis,_e=ut.trustedTypes,Ot=_e?_e.createPolicy("lit-html",{createHTML:r=>r}):void 0,pt="$lit$",L=`lit$${Math.random().toFixed(9).slice(2)}$`,ft="?"+L,Yr=`<${ft}>`,W=document,ce=()=>W.createComment(""),le=r=>r===null||typeof r!="object"&&typeof r!="function",dt=Array.isArray,Lt=r=>dt(r)||typeof r?.[Symbol.iterator]=="function",lt=`[
|
|
2
|
+
\f\r]`,ae=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,zt=/-->/g,Mt=/>/g,F=RegExp(`>|${lt}(?:([^\\s"'>=/]+)(${lt}*=${lt}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),jt=/'/g,Dt=/"/g,Nt=/^(?:script|style|textarea|title)$/i,ht=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),p=ht(1),Do=ht(2),Ho=ht(3),V=Symbol.for("lit-noChange"),g=Symbol.for("lit-nothing"),Ht=new WeakMap,G=W.createTreeWalker(W,129);function Rt(r,e){if(!dt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ot!==void 0?Ot.createHTML(e):e}var Ut=(r,e)=>{let t=r.length-1,o=[],s,n=e===2?"<svg>":e===3?"<math>":"",i=ae;for(let l=0;l<t;l++){let a=r[l],c,u,f=-1,D=0;for(;D<a.length&&(i.lastIndex=D,u=i.exec(a),u!==null);)D=i.lastIndex,i===ae?u[1]==="!--"?i=zt:u[1]!==void 0?i=Mt:u[2]!==void 0?(Nt.test(u[2])&&(s=RegExp("</"+u[2],"g")),i=F):u[3]!==void 0&&(i=F):i===F?u[0]===">"?(i=s??ae,f=-1):u[1]===void 0?f=-2:(f=i.lastIndex-u[2].length,c=u[1],i=u[3]===void 0?F:u[3]==='"'?Dt:jt):i===Dt||i===jt?i=F:i===zt||i===Mt?i=ae:(i=F,s=void 0);let U=i===F&&r[l+1].startsWith("/>")?" ":"";n+=i===ae?a+Yr:f>=0?(o.push(c),a.slice(0,f)+pt+a.slice(f)+L+U):a+L+(f===-2?l:U)}return[Rt(r,n+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),o]},ue=class r{constructor({strings:e,_$litType$:t},o){let s;this.parts=[];let n=0,i=0,l=e.length-1,a=this.parts,[c,u]=Ut(e,t);if(this.el=r.createElement(c,o),G.currentNode=this.el.content,t===2||t===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(s=G.nextNode())!==null&&a.length<l;){if(s.nodeType===1){if(s.hasAttributes())for(let f of s.getAttributeNames())if(f.endsWith(pt)){let D=u[i++],U=s.getAttribute(f).split(L),we=/([.?@])?(.*)/.exec(D);a.push({type:1,index:n,name:we[2],strings:U,ctor:we[1]==="."?ke:we[1]==="?"?Ce:we[1]==="@"?Be:K}),s.removeAttribute(f)}else f.startsWith(L)&&(a.push({type:6,index:n}),s.removeAttribute(f));if(Nt.test(s.tagName)){let f=s.textContent.split(L),D=f.length-1;if(D>0){s.textContent=_e?_e.emptyScript:"";for(let U=0;U<D;U++)s.append(f[U],ce()),G.nextNode(),a.push({type:2,index:++n});s.append(f[D],ce())}}}else if(s.nodeType===8)if(s.data===ft)a.push({type:2,index:n});else{let f=-1;for(;(f=s.data.indexOf(L,f+1))!==-1;)a.push({type:7,index:n}),f+=L.length-1}n++}}static createElement(e,t){let o=W.createElement("template");return o.innerHTML=e,o}};function Q(r,e,t=r,o){if(e===V)return e;let s=o!==void 0?t._$Co?.[o]:t._$Cl,n=le(e)?void 0:e._$litDirective$;return s?.constructor!==n&&(s?._$AO?.(!1),n===void 0?s=void 0:(s=new n(r),s._$AT(r,t,o)),o!==void 0?(t._$Co??=[])[o]=s:t._$Cl=s),s!==void 0&&(e=Q(r,s._$AS(r,e.values),s,o)),e}var Ee=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:o}=this._$AD,s=(e?.creationScope??W).importNode(t,!0);G.currentNode=s;let n=G.nextNode(),i=0,l=0,a=o[0];for(;a!==void 0;){if(i===a.index){let c;a.type===2?c=new te(n,n.nextSibling,this,e):a.type===1?c=new a.ctor(n,a.name,a.strings,this,e):a.type===6&&(c=new Te(n,this,e)),this._$AV.push(c),a=o[++l]}i!==a?.index&&(n=G.nextNode(),i++)}return G.currentNode=W,s}p(e){let t=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(e,o,t),t+=o.strings.length-2):o._$AI(e[t])),t++}},te=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,o,s){this.type=2,this._$AH=g,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=o,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Q(this,e,t),le(e)?e===g||e==null||e===""?(this._$AH!==g&&this._$AR(),this._$AH=g):e!==this._$AH&&e!==V&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Lt(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==g&&le(this._$AH)?this._$AA.nextSibling.data=e:this.T(W.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:o}=e,s=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=ue.createElement(Rt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===s)this._$AH.p(t);else{let n=new Ee(s,this),i=n.u(this.options);n.p(t),this.T(i),this._$AH=n}}_$AC(e){let t=Ht.get(e.strings);return t===void 0&&Ht.set(e.strings,t=new ue(e)),t}k(e){dt(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,o,s=0;for(let n of e)s===t.length?t.push(o=new r(this.O(ce()),this.O(ce()),this,this.options)):o=t[s],o._$AI(n),s++;s<t.length&&(this._$AR(o&&o._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){let o=e.nextSibling;e.remove(),e=o}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},K=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,o,s,n){this.type=1,this._$AH=g,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=n,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=g}_$AI(e,t=this,o,s){let n=this.strings,i=!1;if(n===void 0)e=Q(this,e,t,0),i=!le(e)||e!==this._$AH&&e!==V,i&&(this._$AH=e);else{let l=e,a,c;for(e=n[0],a=0;a<n.length-1;a++)c=Q(this,l[o+a],t,a),c===V&&(c=this._$AH[a]),i||=!le(c)||c!==this._$AH[a],c===g?e=g:e!==g&&(e+=(c??"")+n[a+1]),this._$AH[a]=c}i&&!s&&this.j(e)}j(e){e===g?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},ke=class extends K{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===g?void 0:e}},Ce=class extends K{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==g)}},Be=class extends K{constructor(e,t,o,s,n){super(e,t,o,s,n),this.type=5}_$AI(e,t=this){if((e=Q(this,e,t,0)??g)===V)return;let o=this._$AH,s=e===g&&o!==g||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,n=e!==g&&(o===g||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Te=class{constructor(e,t,o){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(e){Q(this,e)}},It={M:pt,P:L,A:ft,C:1,L:Ut,R:Ee,D:Lt,V:Q,I:te,H:K,N:Ce,U:Be,B:ke,F:Te},Xr=ut.litHtmlPolyfillSupport;Xr?.(ue,te),(ut.litHtmlVersions??=[]).push("3.3.0");var y=(r,e,t)=>{let o=t?.renderBefore??e,s=o._$litPart$;if(s===void 0){let n=t?.renderBefore??null;o._$litPart$=s=new te(e.insertBefore(ce(),n),n,void 0,t??{})}return s._$AI(r),s};var mt=globalThis,re=class extends H{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=y(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return V}};re._$litElement$=!0,re.finalized=!0,mt.litElementHydrateSupport?.({LitElement:re});var eo=mt.litElementPolyfillSupport;eo?.({LitElement:re});(mt.litElementVersions??=[]).push("4.2.0");var C={string:(r,e)=>r.getAttribute(e)??void 0,number:(r,e)=>{let t=r.getAttribute(e);return t===null||!t?void 0:Number(t)},boolean:(r,e)=>r.getAttribute(e)!==null},w={string:(r,e,t)=>(t===void 0?r.removeAttribute(e):r.setAttribute(e,t),!0),number:(r,e,t)=>(t===void 0?r.removeAttribute(e):r.setAttribute(e,t.toString()),!0),boolean:(r,e,t)=>(t?r.setAttribute(e,""):r.removeAttribute(e),!0),any:(r,e,t)=>{t==null?r.removeAttribute(e):typeof t=="string"?r.setAttribute(e,t):typeof t=="number"?r.setAttribute(e,t.toString()):typeof t=="boolean"?t===!0?r.setAttribute(e,""):r.removeAttribute(e):console.warn(`invalid attribute "${e}" type is "${typeof t}"`)},entries:(r,e)=>{for(let[t,o]of e)w.any(r,t,o)},record:(r,e)=>w.entries(r,Object.entries(e))};function qt(r,e={}){let t=document.createElement(r);return w.record(t,e),t}function Ft(r){let e=document.createDocumentFragment();return y(r,e),e.firstElementChild}function Pe(r,e){let t=[];for(let[o,s]of Object.entries(e))if(typeof s=="function")r.addEventListener(o,s),t.push(()=>r.removeEventListener(o,s));else{let[n,i]=s;r.addEventListener(o,i,n),t.push(()=>r.removeEventListener(o,i))}return()=>t.forEach(o=>o())}function Gt(r,e){let t=new MutationObserver(e);return t.observe(r,{attributes:!0}),()=>t.disconnect()}var Oe=class{element;constructor(e){this.element=e}strings=new Proxy({},{get:(e,t)=>C.string(this.element,t),set:(e,t,o)=>w.string(this.element,t,o)});numbers=new Proxy({},{get:(e,t)=>C.number(this.element,t),set:(e,t,o)=>w.number(this.element,t,o)});booleans=new Proxy({},{get:(e,t)=>C.boolean(this.element,t),set:(e,t,o)=>w.boolean(this.element,t,o)})};var Wt=(r,e,t={})=>new Proxy(e,{get:(o,s)=>{switch(e[s]){case String:return C.string(r,s);case Number:return C.number(r,s);case Boolean:return C.boolean(r,s);default:throw new Error(`invalid attribute type for "${s}"`)}},set:(o,s,n)=>{try{switch(t.beforeSet?.(s),e[s]){case String:return w.string(r,s,n);case Number:return w.number(r,s,n);case Boolean:return w.boolean(r,s,n);default:throw new Error(`invalid attribute type for "${s}"`)}}finally{t.afterSet?.(s)}}});function oe(r){let e=new Oe(r);return{strings:e.strings,numbers:e.numbers,booleans:e.booleans,on:t=>Gt(r,t),spec:(t,o={})=>Wt(r,t,o)}}oe.get=C;oe.set=w;function Vt(r){return new gt(r)}var gt=class{tagName;#e=new Map;#t=[];constructor(e){this.tagName=e}attr(e,t=!0){return this.#e.set(e,t),this}attrs(e){for(let[t,o]of Object.entries(e))this.attr(t,o);return this}children(...e){return this.#t.push(...e),this}done(){let e=document.createElement(this.tagName);return w.entries(e,this.#e),e.append(...this.#t),e}};function se(r,e=document){let t=e.querySelector(r);if(!t)throw new Error(`element not found (${r})`);return t}function ze(r,e=document){return e.querySelector(r)}function Me(r,e=document){return Array.from(e.querySelectorAll(r))}var je=class r{element;#e;constructor(e){this.element=e}in(e){return new r(typeof e=="string"?se(e,this.element):e)}require(e){return se(e,this.element)}maybe(e){return ze(e,this.element)}all(e){return Me(e,this.element)}render(...e){return y(e,this.element)}get attrs(){return this.#e??=oe(this.element)}events(e){return Pe(this.element,e)}};function Qt(r){return r.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function Kt(r,e={}){let{soft:t=!1,upgrade:o=!0}=e;for(let[s,n]of Object.entries(r)){let i=Qt(s),l=customElements.get(i);t&&l||(customElements.define(i,n),o&&document.querySelectorAll(i).forEach(a=>{a.constructor===HTMLElement&&customElements.upgrade(a)}))}}function v(r,e=document){return se(r,e)}v.in=(r,e=document)=>new je(e).in(r);v.need=se;v.maybe=ze;v.all=Me;v.el=qt;v.elmer=Vt;v.mk=Ft;v.events=Pe;v.attrs=oe;v.register=Kt;v.render=(r,...e)=>y(e,r);var Le={};Et(Le,{DragAndDrops:()=>yt,Drops:()=>xt,files:()=>io,hasFiles:()=>no,outsideCurrentTarget:()=>he});var B={};Et(B,{clone:()=>pe,equal:()=>to,freeze:()=>ro});function pe(r,e=new Set){if(e.has(r))throw new Error("cannot clone circular reference");let t;return typeof r=="function"||r!==null&&typeof r=="object"?(e.add(r),Array.isArray(r)?t=r.map(o=>pe(o,new Set(e))):r.constructor===Object?t=Object.fromEntries(Object.entries(r).map(([o,s])=>[o,pe(s,new Set(e))])):r instanceof Map?t=new Map(Array.from(r,([o,s])=>[o,pe(s,new Set(e))])):r instanceof Set?t=new Set(Array.from(r,o=>pe(o,new Set(e)))):r instanceof Date?t=new Date(r.getTime()):t=r,e.delete(r)):t=r,t}var fe=Object.freeze({happy:r=>r!=null,sad: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"});var to=(r,e)=>{function t(o,s,n){if(!fe.object(o)||!fe.object(s))return o===s;if(n.includes(o))throw new Error("forbidden circularity detected in deep equal comparison");let i=[...n,o];if(o instanceof Map&&s instanceof Map){if(o.size!==s.size)return!1;for(let[l,a]of o)if(!s.has(l)||!t(a,s.get(l),i))return!1}else if(o instanceof Set&&s instanceof Set){if(o.size!==s.size)return!1;for(let l of o)if(!Array.from(s).some(a=>t(l,a,i)))return!1}else{let l=Object.keys(o),a=Object.keys(s);if(l.length!==a.length)return!1;for(let c of l)if(!a.includes(c)||!t(o[c],s[c],i))return!1}return!0}return t(r,e,[])};function ro(r){function e(t,o){if(!fe.object(t)||o.includes(t))return t;let s=[...o,t];if(t instanceof Map)for(let n of t.entries())for(let i of n)e(i,s);else if(t instanceof Set)for(let n of t)e(n,s);else if(Array.isArray(t))for(let n of t)e(n,s);else for(let n of Object.values(t))e(n,s);return Object.freeze(t)}return e(r,[])}function Zt(r){if(r.ok)return r.value;let{error:e}=r;throw e instanceof Error?e:typeof e=="string"?new Error(e):new Error("unknown")}function Jt(r){if(r.ok)throw new Error("didn't get needed error");return r.error}function Yt(r,e,t){if(r.has(e))return r.get(e);{let o=t();return r.set(e,o),o}}var De=class{#e=new Set;#t=[];#r=new WeakMap;#s=0;#o=new Set;read(e){this.#t.at(-1)?.add(e)}write(e){let t=this.#r.get(e);if(t){for(let o of t)this.#o.add(o);this.#s===0&&this.#n()}}observe(e){let t=new Set;this.#t.push(t);try{let o=e();return{seen:t,value:o}}finally{this.#t.pop()}}subscribe(e,t){let o=Yt(this.#r,e,()=>new Set);return o.add(t),()=>{o.delete(t),o.size===0&&this.#r.delete(e)}}batch=e=>{this.#s++;try{return e()}finally{this.#s--,this.#s===0&&this.#n()}};#i(e){if(this.#e.has(e))throw new Error("circularity forbidden");this.#e.add(e);try{e()}finally{this.#e.delete(e)}}#n(){for(;this.#o.size>0;){let e=[...this.#o];this.#o.clear();for(let t of e)this.#i(t)}}};var x=globalThis[Symbol.for("e280.tracker.2")]??=new De;function h(r){return function e(){return arguments.length===0?(x.read(e),r):(r=arguments[0],x.write(e),r)}}var vn=x.batch;function er(r){return B.freeze(B.clone(r))}var T=Symbol("optic");var de=class{calculate;#e=!1;#t;constructor(e){this.calculate=e,this.#t=e()}get(){return this.#e&&(this.#e=!1,this.#t=this.calculate()),this.#t}invalidate(){this.#e=!0}};var He=class r{[T];#e;#t;#r;constructor(e){this[T]=e,this.#e=B.clone(e.getState()),this.#t=new de(()=>B.clone(e.getState())),this.#r=new de(()=>er(e.getState()))}update(){let e=this[T].getState();!B.equal(e,this.#e)&&(this.#t.invalidate(),this.#r.invalidate(),this.#e=B.clone(e),x.write(this))}get state(){return x.read(this),this.#t.get()}get frozen(){return x.read(this),this.#r.get()}mutate(e){return this[T].mutate(e)}lens(e){let t=new r({getState:()=>e(this[T].getState()),mutate:o=>this[T].mutate(s=>o(e(s))),registerLens:this[T].registerLens});return this[T].registerLens(t),t}};function tr(r){if(!r.done)throw new Error("wait not done");return Zt(r)}function rr(r){if(!r.done)throw new Error("wait not done");return Jt(r)}var or=r=>!r.done;var sr=r=>r.done&&r.ok;function nr(r,e){let{pending:t=()=>{},ok:o=()=>{},err:s=()=>{}}=e;return or(r)?t():sr(r)?o(tr(r)):s(rr(r))}function no(r){return!!(r.dataTransfer&&r.dataTransfer.types.includes("Files"))}function io(r){return r.dataTransfer?Array.from(r.dataTransfer.files):[]}function he(r){let e=r.currentTarget,t=r.relatedTarget;return!e||!t||!e.contains(t)}var yt=class{params;$draggy=h(void 0);$droppy=h(void 0);constructor(e){this.params=e}get dragging(){return this.$draggy()}get hovering(){return this.$droppy()}dragzone=e=>({draggable:"true",dragstart:t=>{this.$draggy(e())},dragend:t=>{this.$draggy(void 0),this.$droppy(void 0)}});dropzone=e=>({dragenter:t=>{},dragover:t=>{t.preventDefault(),this.$draggy()?this.$droppy(e()):this.params.backchannelDrops?.dragover(t)},dragleave:t=>{he(t)&&this.$droppy(void 0),this.params.backchannelDrops?.dragleave(t)},drop:t=>{t.preventDefault();let{acceptDrop:o}=this.params,s=this.$draggy(),n=this.$droppy();try{s&&n?o(t,s,n):this.params.backchannelDrops?.drop(t)}finally{this.$draggy(void 0),this.$droppy(void 0)}}})};var xt=class{params;$indicator=h(!1);constructor(e){this.params=e}dragover=e=>{e.preventDefault(),this.$indicator(this.params.predicate(e))};dragleave=e=>{he(e)&&this.$indicator(!1)};drop=e=>{e.preventDefault(),this.$indicator(!1),this.params.predicate(e)&&this.params.acceptDrop(e)}};function me(){let r,e,t=new Promise((s,n)=>{r=s,e=n});function o(s){return s.then(r).catch(e),t}return{promise:t,resolve:r,reject:e,entangle:o}}function Ne(r){let e=null;return((...t)=>(e?e.params=t:(e={params:t,deferred:me()},queueMicrotask(()=>{let{params:o,deferred:s}=e;e=null,Promise.resolve(r(...o)).then(s.resolve).catch(s.reject)})),e.deferred.promise))}function ir(r,e,t){if(r.has(e))return r.get(e);{let o=t();return r.set(e,o),o}}function ar(r){let e,t=!1,o=()=>{t=!0,clearTimeout(e)},s=async()=>{t||(await r(o),!t&&(e=setTimeout(s,0)))};return s(),o}var cr=(r=0)=>new Promise(e=>setTimeout(e,r));var Re=d`
|
|
4
|
+
* {
|
|
5
|
+
margin: 0;
|
|
6
|
+
padding: 0;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
|
|
9
|
+
scrollbar-width: thin;
|
|
10
|
+
scrollbar-color: #888 transparent;
|
|
47
11
|
}
|
|
48
|
-
|
|
49
|
-
:
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
12
|
+
|
|
13
|
+
::-webkit-scrollbar { width: 8px; }
|
|
14
|
+
::-webkit-scrollbar-track { background: transparent; }
|
|
15
|
+
::-webkit-scrollbar-thumb { background: #888; border-radius: 1em; }
|
|
16
|
+
::-webkit-scrollbar-thumb:hover { background: #999; }
|
|
17
|
+
`;var Ue=class r extends HTMLElement{static register(){v.register({SlyShadow:r},{soft:!0})}connectedCallback(){this.hasAttribute("view")||this.setAttribute("view","")}};var Ie=class{render;count=0;rendered=me();constructor(e){this.render=e}doneRender(){this.count++,this.rendered.resolve(),this.rendered=me()}},I=class extends Ie{host;shadow;constructor(e,t,o){super(e),this.host=t,this.shadow=o}};var bt=class{#e=[];get scope(){let e=this.#e.at(-1);if(!e)throw new Error("hooks must be called within a render fn");return e}increment(){let e=this.scope,t=e.position++;return{scope:e,position:t}}wrap(e,t){e.position=0,this.#e.push(e);try{return t()}finally{this.#e.pop()}}},k=globalThis[Symbol.for("e280.hooks")]??=new bt;var Z=class{#e=[];clear(){this.#e.forEach(e=>e()),this.#e=[]}observe(e,t){let{seen:o,value:s}=x.observe(e);this.clear();for(let n of o){let i=x.subscribe(n,t);this.#e.push(i)}return s}};function E(r){let{scope:e,position:t}=k.increment();return ir(e.values,t,r)}function N(r){let{scope:e}=k.increment();return E(()=>e.mounts.mount(r))}var qe=class{#e=[];#t=[];mount(e){this.#e.push(e),this.#t.push(e())}unmountAll(){for(let e of this.#t)e();this.#t=[]}remountAll(){for(let e of this.#e)this.#t.push(e())}};var J=class{cx;position=0;values=new Map;mounts=new qe;constructor(e){this.cx=e}};var{I:Ua}=It;var lr=r=>r.strings===void 0;var ur={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ge=r=>(...e)=>({_$litDirective$:r,values:e}),Fe=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,o){this._$Ct=e,this._$AM=t,this._$Ci=o}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};var ge=(r,e)=>{let t=r._$AN;if(t===void 0)return!1;for(let o of t)o._$AO?.(e,!1),ge(o,e);return!0},We=r=>{let e,t;do{if((e=r._$AM)===void 0)break;t=e._$AN,t.delete(r),r=e}while(t?.size===0)},pr=r=>{for(let e;e=r._$AM;r=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(r))break;t.add(r),po(e)}};function lo(r){this._$AN!==void 0?(We(this),this._$AM=r,pr(this)):this._$AM=r}function uo(r,e=!1,t=0){let o=this._$AH,s=this._$AN;if(s!==void 0&&s.size!==0)if(e)if(Array.isArray(o))for(let n=t;n<o.length;n++)ge(o[n],!1),We(o[n]);else o!=null&&(ge(o,!1),We(o));else ge(this,r)}var po=r=>{r.type==ur.CHILD&&(r._$AP??=uo,r._$AQ??=lo)},ye=class extends Fe{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,o){super._$AT(e,t,o),pr(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(ge(this,e),We(this))}setValue(e){if(lr(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};function S(r){return class extends HTMLElement{#e;#t;#r=new Z;#s=this.attachShadow({mode:"open"});constructor(){super();let e=Ne(()=>{if(!this.isConnected)return;let t=this.#o();y(t,this.#e.shadow),this.#e.doneRender()});this.#e=new I(e,this,this.#s),this.#t=new J(this.#e)}#o(){return this.#r.observe(()=>k.wrap(this.#t,()=>r()),this.#e.render)}render(){y(this.#o(),this.#e.shadow),this.#e.doneRender()}connectedCallback(){this.#t.mounts.remountAll(),this.#e.render()}disconnectedCallback(){this.#t.mounts.unmountAll(),this.#r.clear()}}}function Ve(r){return E(()=>new wt(r))}var wt=class{current;constructor(e){this.current=e}};function fr(){let{scope:r}=k.increment();return r.cx}function dr(){let r=fr();if(!(r instanceof I))throw new Error("this hook only works on shadow views (but was called in a light view)");return r}function Y(){return fr().render}function b(){return dr().host}function hr(){return dr().shadow}function mr(r,e){Ae(r,fo(e))}function fo(r){let e=[];if(Array.isArray(r)){let t=new Set(r.flat(1/0).reverse());for(let o of t)e.unshift(ee(o))}else r!==void 0&&e.push(ee(r));return e}function ho(...r){let e=hr();E(()=>mr(e,r))}var m=ho;function Qe(r=""){let e=b();E(()=>e.setAttribute("view",r))}function gr(r){return E(()=>h(r))}function yr(r){let e=Y(),t=Ve(r),o=s=>{let n=typeof s=="function"?s(t.current):s;Object.is(n,t.current)||(t.current=n,e())};return[t.current,o]}function xr(r,e){for(let[t,o]of Object.entries(e))mo(r,t,o)}function mo(r,e,t){let o=r.getAttribute(e),s=go(t);s!==o&&(s===null?r.removeAttribute(e):r.setAttribute(e,s))}function go(r){return typeof r=="string"?r:typeof r=="number"?r.toString():r?"":null}function yo(){Ue.register();let r=document.createElement("sly-shadow"),e=r.attachShadow({mode:"open"});return{host:r,shadow:e}}function X(r){return br(yo,r)}X.setup=r=>(e=>br(r,e));function br(r,e){let t=Ge(class extends ye{#e;#t;#r;#s=new Z;constructor(s){super(s);let{host:n,shadow:i}=r(),l=Ne(()=>{if(!this.#r)throw new Error("cannot render before props");if(!this.isConnected)return;let a=this.#o(this.#r);y(a,this.#e.shadow),this.#e.doneRender()});this.#e=new I(l,n,i),this.#t=new J(this.#e)}#o(s){return this.#r=s,this.#s.observe(()=>k.wrap(this.#t,()=>e(...this.#r)),this.#e.render)}render({props:s,children:n,attrs:i}){let{host:l}=this.#e;return this.isConnected&&(i&&xr(l,i),y(n,this.#e.host),y(this.#o(s),this.#e.shadow),this.#e.doneRender()),l}disconnected(){y(null,this.#e.shadow),y(null,this.#e.host),this.#t.mounts.unmountAll(),this.#s.clear()}reconnected(){this.#t.mounts.remountAll(),this.#e.render()}});function o(...s){return t({props:s})}return o.with=t,o}function P(r,e){return()=>xo({hz:r,frames:e})}var xo=X(({hz:r,frames:e})=>{Qe("loading"),m(Re,bo);let t=gr(0);return N(()=>ar(async()=>{await cr(1e3/r);let o=t()+1;t(o>=e.length?0:o)})),e.at(t())}),bo=d`
|
|
18
|
+
:host {
|
|
19
|
+
font-family: monospace;
|
|
20
|
+
white-space: pre;
|
|
21
|
+
user-select: none;
|
|
22
|
+
}
|
|
23
|
+
`;var O=X(r=>(Qe("error"),m(Re,wo),typeof r=="string"?r:r instanceof Error?p`<strong>${r.name}:</strong> <span>${r.message}</span>`:"error")),wo=d`
|
|
58
24
|
:host {
|
|
59
25
|
font-family: monospace;
|
|
26
|
+
color: red;
|
|
60
27
|
}
|
|
61
|
-
`;Re.shadowView((t=>(e,s)=>{t.name("loading-indicator"),t.styles(Ie);const r=t.signal(0);return t.mount((()=>Le.hz(e,(()=>{const t=r.value+1;r.value=t<s.length?t:0})))),qe`${s[r.value]}`}));class Ve{#pt;constructor(t){this.#pt=t}#c=M.state({grabbed:void 0,hovering:void 0});dragzone={draggable:()=>"true",dragstart:t=>e=>{this.#c.grabbed=t},dragend:()=>t=>{this.#c.grabbed=void 0,this.#c.hovering=void 0}};dropzone={dragenter:()=>t=>{},dragleave:()=>t=>{(function(t){if(!t.relatedTarget||0===t.clientX&&0===t.clientY)return!0;const e=t.currentTarget.getBoundingClientRect(),s=t.clientX>=e.left&&t.clientX<=e.right,r=t.clientY>=e.top&&t.clientY<=e.bottom;return!(s&&r)})(t)&&(this.#c.hovering=void 0)},dragover:t=>e=>{const{out_of_band:s}=this.#pt;e.preventDefault(),(this.#c.grabbed||s&&s.predicate(e,t))&&(this.#c.hovering=t)},drop:t=>e=>{const{handle_drop:s,out_of_band:r}=this.#pt;e.preventDefault();const{grabbed:n}=this.#c;this.#c.grabbed=void 0,this.#c.hovering=void 0,n?s(e,n,t):r&&r.predicate(e,t)&&r.handle_drop(e,t)}};get grabbed(){return this.#c.grabbed}get hovering(){return this.#c.hovering}}const Ke=[..."aeiou"],We=[..."bcdfghjklmnprstvwxyz"],Qe=new Set(["fuc","sex","cum","dic","coc","pen","vag","pus","gay","fap","jiz","fag","cun","nig","jew","goy","sem","bal","fat","god","big","dog","cow","pet","vax","sis","rot","zog","ana","uti","cat","bag","cuc","fuk","fak","wet","cux","bug","gey","pig","rat","bat","dik","bed","boy","man","fem","men","nob","rub","fut","jap","tit","gun","job","nip","but","rim","guy","suc","dad","mom","buk","jis","peg","kox","ded","mum","son","nog","hun","wop","cuk"]);function Ge(t,e){const s=e.length-t;if(s<=0)return e;const r=e.length/s,n=[];let i=r;for(let t=0;t<e.length;t++)t>=Math.round(i)?i+=r:n.push(e[t]);return n.slice(0,t)}function Ze(t){return[...new Set(t)]}const Xe=Ze(Ge(256,We.map((t=>Ke.map((e=>We.map((s=>t+e+s)))))).flat(2).filter((t=>!Qe.has(t))))),Ye=Ze(Ge(256,Ke.map((t=>We.map((e=>Ke.map((s=>t+e+s)))))).flat(2).filter((t=>!Qe.has(t))))),Je=Ze([...Ge(192,Xe),...Ge(64,Ye)]);if(256!==Xe.length)throw new Error("xox not 256");if(256!==Ye.length)throw new Error("oxo not 256");if(256!==Je.length)throw new Error("syllables not 256");var ts;new Set([..."अआइईउऊऋएऐओऔकखगघङचछजझञटठडढणतथदधनपफबभमयरलवशषसह",..."அஆஇஈஉஊஎஏஐஒஓகஙசஜஞடணதநபமயரலவழளறன",..."অআইঈউঊএঐওকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ",..."ਅਆਇਈਉਊਏਐਓਕਖਗਘਙਚਛਜਝਞਟਠਡਢਣਤਥਦਧਨਪਫਬਭਮਯਰਲਵਸਹ",..."അആഇഈഉഊഎഏഐഒഓകഖഗഘങചഛജഝഞടഠഡഢണതഥദധനപഫബഭമയരലവശസഹളഴറ",..."અઆઇઈઉઊએઐઓકખગઘઙચછજઝઞટઠડઢણતથદધનપફબભમયરલવશષસહ",..."ଅଆଇଈଉଊଏଐଓଔକଖଗଘଙଚଛଜଝଞଟଠଡଢଣତଥଦଧନପଫବଭମଯରଲଶଷସହ"]),function(t){t.actualize=function t(e,s){return $(s).map((s=>"function"==typeof s?(...t)=>{e.transmute((e=>(s(e,(t=>{e=t}))(...t),e)))}:t(e,s)))},t.fn=function(){return t=>t},t.blueprint=function(){return t=>t},t.prepFn=t=>e=>(s,r)=>(...n)=>(e(t(s,r))(...n),s),t.prepBlueprint=e=>s=>s(t.prepFn(e)),t.prep=function(e){return{action:t.prepFn(e),blueprint:t.prepBlueprint(e)}}}(ts||(ts={}));
|
|
62
|
-
/**
|
|
63
|
-
* @license
|
|
64
|
-
* Copyright 2017 Google LLC
|
|
65
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
66
|
-
*/
|
|
67
|
-
class es extends we{constructor(t){if(super(t),this.it=Ut,t.type!==ve)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Ut||null==t)return this._t=void 0,this.it=t;if(t===Ot)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}es.directiveName="unsafeHTML",es.resultType=1;const ss=Object.freeze({eq(t,e){if(t.length!==e.length)return!1;for(let s=0;s<=t.length;s++)if(t.at(s)!==e.at(s))return!1;return!0},random:t=>crypto.getRandomValues(new Uint8Array(t))}),rs=Object.freeze({fromBytes:t=>[...t].map((t=>t.toString(16).padStart(2,"0"))).join(""),toBytes(t){if(t.length%2!=0)throw new Error("must have even number of hex characters");const e=new Uint8Array(t.length/2);for(let s=0;s<t.length;s+=2)e[s/2]=parseInt(t.slice(s,s+2),16);return e},random(t=32){return this.fromBytes(ss.random(t))},string:t=>rs.fromBytes(t),bytes:t=>rs.toBytes(t)});class ns extends Map{static require(t,e){const s=t.get(e);if(void 0===s)throw new Error(`required key not found: "${e}"`);return s}static guarantee(t,e,s){let r=t.get(e);return void 0===r&&(r=s(),t.set(e,r)),r}array(){return[...this]}require(t){return ns.require(this,t)}guarantee(t,e){return ns.guarantee(this,t,e)}}function is(){const t=new Set;function e(e){return t.add(e),()=>{t.delete(e)}}async function s(...e){await Promise.all([...t].map((t=>t(...e))))}async function r(){const{promise:t,resolve:s}=function(){let t,e;const s=new Promise(((s,r)=>{t=s,e=r}));return{promise:s,resolve:t,reject:e,entangle:function(r){return r.then(t).catch(e),s}}}(),r=e(((...t)=>{s(t),r()}));return t}function n(){t.clear()}return e.pub=s,e.sub=e,e.on=e,e.once=r,e.clear=n,s.pub=s,s.sub=e,s.on=e,s.once=r,s.clear=n,[s,e]}function os(t){return is()[1]}const as=new class{#ft=new ns;setGroup(t,e){return this.#ft.set(t,e),e}getGroup(t){return this.#ft.require(t)}};var cs=Q`@layer theme, view; @layer theme {
|
|
28
|
+
`;function z(r,e){return(t,o)=>nr(t,{pending:r,err:e,ok:o})}var Fl=z(P(10,[" "," ",". ",".. ","..."," .."," ."]),O);var Kl=z(P(3,["\u{1F30E}","\u{1F30F}","\u{1F30D}"]),O);var eu=z(P(10,["\u{1F312}","\u{1F313}","\u{1F314}","\u{1F315}","\u{1F316}","\u{1F317}","\u{1F318}","\u{1F311}","\u{1F311}","\u{1F311}"]),O);var nu=z(P(16,["|","/","-","\\"]),O);var uu=z(P(20,[":....",":....","::...",".::..","..::.","...::","....:","....:","...::","..::.",".::..","::..."]),O);var M=Object.freeze({eq(r,e){if(r.length!==e.length)return!1;for(let t=0;t<=r.length;t++)if(r.at(t)!==e.at(t))return!1;return!0},random(r){return crypto.getRandomValues(new Uint8Array(r))}});var R=Object.freeze({fromBytes(r){return[...r].map(e=>e.toString(16).padStart(2,"0")).join("")},toBytes(r){if(r.length%2!==0)throw new Error("must have even number of hex characters");let e=new Uint8Array(r.length/2);for(let t=0;t<r.length;t+=2)e[t/2]=parseInt(r.slice(t,t+2),16);return e},random(r=32){return this.fromBytes(M.random(r))},string(r){return R.fromBytes(r)},bytes(r){return R.toBytes(r)}});var vt=58,Ke="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",$t=Object.freeze({fromBytes(r){let e=BigInt("0x"+R.fromBytes(r)),t="";for(;e>0;){let o=e%BigInt(vt);e=e/BigInt(vt),t=Ke[Number(o)]+t}for(let o of r)if(o===0)t=Ke[0]+t;else break;return t},toBytes(r){let e=BigInt(0);for(let i of r){let l=Ke.indexOf(i);if(l===-1)throw new Error(`Invalid character '${i}' in base58 string`);e=e*BigInt(vt)+BigInt(l)}let t=e.toString(16);t.length%2!==0&&(t="0"+t);let o=R.toBytes(t),s=0;for(let i of r)if(i===Ke[0])s++;else break;let n=new Uint8Array(s+o.length);return n.set(o,s),n},random(r=32){return this.fromBytes(M.random(r))},string(r){return $t.fromBytes(r)},bytes(r){return $t.toBytes(r)}});var wr=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(e){this.lexicon=e,this.lookup=Object.fromEntries([...e.characters].map((t,o)=>[t,o])),this.negativePrefix=e.negativePrefix??"-"}toBytes(e){let t=Math.log2(this.lexicon.characters.length);if(Number.isInteger(t)){let l=0,a=0,c=[];for(let u of e){if(u===this.lexicon.padding?.character)continue;let f=this.lookup[u];if(f===void 0)throw new Error(`Invalid character: ${u}`);for(l=l<<t|f,a+=t;a>=8;)a-=8,c.push(l>>a&255)}return new Uint8Array(c)}let o=0n,s=BigInt(this.lexicon.characters.length),n=!1;e.startsWith(this.negativePrefix)&&(e=e.slice(this.negativePrefix.length),n=!0);for(let l of e){let a=this.lookup[l];if(a===void 0)throw new Error(`Invalid character: ${l}`);o=o*s+BigInt(a)}let i=[];for(;o>0n;)i.unshift(Number(o%256n)),o=o/256n;return new Uint8Array(i)}fromBytes(e){let t=Math.log2(this.lexicon.characters.length);if(Number.isInteger(t)){let i=0,l=0,a="";for(let c of e)for(i=i<<8|c,l+=8;l>=t;){l-=t;let u=i>>l&(1<<t)-1;a+=this.lexicon.characters[u]}if(l>0){let c=i<<t-l&(1<<t)-1;a+=this.lexicon.characters[c]}if(this.lexicon.padding)for(;a.length%this.lexicon.padding.size!==0;)a+=this.lexicon.padding.character;return a}let o=0n;for(let i of e)o=(o<<8n)+BigInt(i);if(o===0n)return this.lexicon.characters[0];let s=BigInt(this.lexicon.characters.length),n="";for(;o>0n;)n=this.lexicon.characters[Number(o%s)]+n,o=o/s;return n}toInteger(e){if(!e)return 0;let t=0n,o=!1,s=BigInt(this.lexicon.characters.length);e.startsWith(this.negativePrefix)&&(e=e.slice(this.negativePrefix.length),o=!0);for(let n of e){let i=this.lookup[n];if(i===void 0)throw new Error(`Invalid character: ${n}`);t=t*s+BigInt(i)}return Number(o?-t:t)}fromInteger(e){e=Math.floor(e);let t=e<0,o=BigInt(t?-e:e);if(o===0n)return this.lexicon.characters[0];let s=BigInt(this.lexicon.characters.length),n="";for(;o>0n;)n=this.lexicon.characters[Number(o%s)]+n,o=o/s;return t?`${this.negativePrefix}${n}`:n}random(e=32){return this.fromBytes(M.random(e))}};var At=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),e=>e.charCodeAt(0)):Uint8Array.from(Buffer.from(r,"base64"))},random(r=32){return this.fromBytes(M.random(r))},string(r){return At.fromBytes(r)},bytes(r){return At.toBytes(r)}});var vr=Object.freeze({fromBytes(r){return new TextDecoder().decode(r)},toBytes(r){return new TextEncoder().encode(r)},string(r){return vr.fromBytes(r)},bytes(r){return vr.toBytes(r)}});var St=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 $r(){let r,e,t=new Promise((s,n)=>{r=s,e=n});function o(s){return s.then(r).catch(e),t}return{promise:t,resolve:r,reject:e,entangle:o}}var A=class r extends Map{static require(e,t){let o=e.get(t);if(o===void 0)throw new Error(`required key not found: "${t}"`);return o}static guarantee(e,t,o){let s=e.get(t);return s===void 0&&(s=o(),e.set(t,s)),s}array(){return[...this]}require(e){return r.require(this,e)}guarantee(e,t){return r.guarantee(this,e,t)}};function vo(r){return{map:e=>Ar(r,e),filter:e=>Sr(r,e)}}vo.pipe=Object.freeze({map:r=>(e=>Ar(e,r)),filter:r=>(e=>Sr(e,r))});var Ar=(r,e)=>Object.fromEntries(Object.entries(r).map(([t,o])=>[t,e(o,t)])),Sr=(r,e)=>Object.fromEntries(Object.entries(r).filter(([t,o])=>e(o,t)));function $o(){let r=new Set;function e(n){return r.add(n),()=>{r.delete(n)}}async function t(...n){await Promise.all([...r].map(i=>i(...n)))}async function o(){let{promise:n,resolve:i}=$r(),l=e((...a)=>{i(a),l()});return n}function s(){r.clear()}return e.pub=t,e.sub=e,e.on=e,e.once=o,e.clear=s,t.pub=t,t.sub=e,t.on=e,t.once=o,t.clear=s,[t,e]}function j(r){let e=$o()[1];return r&&e.sub(r),e}var Ze=class{#e=new A;setGroup(e,t){return this.#e.set(e,t),t}getGroup(e){return this.#e.require(e)}};var Je=new Ze;var Ye=class{group;#e=new Le.DragAndDrops({acceptDrop:(e,t,o)=>this.group.move(t,o)});constructor(e){this.group=e}#t=h(void 0);get grabbed(){return this.#e.dragging}get hovering(){return this.#e.hovering??this.#t()}dragenter=(e,t)=>{e.preventDefault(),this.#e.dropzone(()=>t).dragenter(e),this.#t(t)};dragleave=e=>{let t=this.hovering;t&&this.#e.dropzone(()=>t).dragleave(e),this.#t(void 0)};dragstart=(e,t)=>{e.stopPropagation(),this.#e.dragzone(()=>t).dragstart(e)};dragover=(e,t)=>{e.preventDefault(),this.#e.dropzone(()=>t).dragover(e)};dragend=e=>{this.#e.$draggy(void 0),this.#e.$droppy(void 0),this.#t(void 0)};drop=(e,t)=>{e.preventDefault();let o=Array.from(e.dataTransfer?.files||[]);o.length&&this.group.upload(o,t);let s=this.grabbed?.id===this.hovering?.id,n=this.grabbed?.children.some(l=>this.hovering?.id===l.id),i=this.grabbed?.parent?.id===this.hovering?.id;!s&&!n&&!i&&this.#e.dropzone(()=>t).drop(e),this.#t(void 0)};change=(e,t)=>{let o=e.currentTarget,s=Array.from(o.files??[]);s.length&&this.group.upload(s,t)}};var Xe=class{signal=h([]);constructor(e){this.signal([e])}setTrail(e,t){if(e.target!==e.currentTarget)return;let o=[],s=t.kind==="folder"?t:t.parent;for(;s;)o.unshift(s),s=s.parent;this.signal(o)}get currentFolder(){return this.signal().at(-1)?.children??[]}};var et=class{config;trail;dropzone=new Ye(this);searchText=h("");selectedFilter=h("");selectedSort=h("");on={newFolder:j(),move:j(),delete:j(),rename:j(),upload:j(),search:j(),refresh:j()};constructor(e){this.config=e,this.selectedFilter(e.defaultFilter),this.selectedSort(e.defaultSort),this.trail=new Xe(e.root)}get permissions(){return this.config.permissions}getFilterFn(e){return this.config.filters.get(e)??(()=>!0)}getSearchFn(e){let t=e.trim().toLowerCase().split(/\s+/);return o=>this.config.search(t,o)}getSortFn(e){return this.config.sorts?.get(e)??(()=>0)}sort(e){let t=this.getSortFn(this.selectedSort());return[...e].sort(t)}matches(e){let t=this.getFilterFn(this.selectedFilter()),o=this.getSearchFn(this.searchText());return t(e)&&o(e)}move(e,t){if(!this.permissions(e).move)throw new Error("move permission not granted");e.detach(),t.attach(e),this.on.move.pub({item:e,target:t})}delete(e){if(!this.permissions(e).delete)throw new Error("delete permission not granted");e.destroy(),this.on.delete.pub({item:e})}rename(e,t){if(!this.permissions(e).rename)throw new Error("rename permission not granted");this.on.rename.pub({item:e,newName:t})}upload(e,t){if(!this.permissions(t).upload)throw new Error("upload permission not granted");this.on.upload.pub({files:e,target:t})}addFolder(e){if(!this.permissions(e).newFolder)throw new Error("add folder permission not granted");this.on.newFolder.pub({parent:e})}components=()=>this.components};var xe;(function(r){r.rename="rename",r.move="move",r.delete="delete",r.refresh="refresh",r.newFolder="newFolder",r.search="search",r.upload="upload"})(xe||(xe={}));var Ao=Object.values(xe);function _t(r,e={}){let t={};for(let o of Ao)t[o]=o in e?e[o]:r;return t}var _r={all:_t(!0),readOnly:_t(!1,{[xe.refresh]:!0,[xe.search]:!0}),none:_t(!1)};var tt=class{taxonomy;onChange=j();#e=new A;constructor(e){this.taxonomy=e}getSpecimen(e){return this.#e.require(e)}setSpecimen(e,t,o){this.#e.set(e,[t,o]),this.onChange.pub()}query(e){let[t,o]=this.getSpecimen(e),s=this.taxonomy.taxon(t);return{kind:t,taxon:s,specimen:o}}};var rt=class{#e=new A;constructor(e){for(let[t,o]of Object.entries(e))this.#e.set(t,o)}taxon(e){return this.#e.require(e)}};var ot=class{#e=new A;#t=new A;has(e){return this.#e.has(e)}getChildren(e){return this.#e.require(e)}getParent(e){return this.#t.get(e)}establishRoot(e){this.#e.set(e,new Set)}attach(e,...t){let o=this.getChildren(e);for(let s of t){if(this.getParent(s))throw new Error("child already has parent");o.add(s),this.#t.set(s,e),this.#e.set(s,new Set)}}detach(e){if(!this.has(e))return;let t=this.getParent(e);t&&(this.getChildren(t).delete(e),this.#t.delete(e))}destroy(e){let t=[...this.crawl(e)];for(let[o]of t)this.#e.delete(o),this.#t.delete(o)}*crawl(e,t=()=>!0){let o=[[e,[]]],s=new Set;for(;o.length;){let[n,i]=o.shift();if(!(s.has(n)||!t(n,i))){s.add(n),yield[n,i];for(let l of this.getChildren(n))o.push([l,[...i,n]])}}}};var st=class{codex;id;signal=h(this);constructor(e,t){this.codex=e,this.id=t}get kind(){return this.codex.clade.query(this.id).kind}isKind(e){return e===this.kind}get taxon(){return this.codex.clade.query(this.id).taxon}get specimen(){return this.codex.clade.query(this.id).specimen}get parent(){let e=this.codex.hierarchy.getParent(this.id);return e?this.codex.require(e):void 0}get children(){return[...this.codex.hierarchy.getChildren(this.id)].map(e=>this.codex.require(e))}attach(...e){return this.codex.hierarchy.attach(this.id,...e.map(t=>t.id)),this.signal(this),this}detach(){this.codex.hierarchy.detach(this.id),this.signal(this)}create(e,t){let o=this.codex.create(e,t);return this.attach(o),o}destroy(){this.codex.hierarchy.destroy(this.id),this.signal(this)}*crawl(e=()=>!0){let t=this.codex.hierarchy.crawl(this.id,(o,s)=>e(this.codex.require(o),s.map(n=>this.codex.require(n))));for(let[o,s]of t)yield[this.codex.require(o),s.map(n=>this.codex.require(n))]}};function Er(){return R.random()}var nt=class{clade;hierarchy;static setup(e){let t=new rt(e),o=new tt(t),s=new ot;return new this(o,s)}#e=new A;constructor(e,t){this.clade=e,this.hierarchy=t}create(e,t){let o=Er();this.clade.setSpecimen(o,e,t);let s=new st(this,o);return this.#e.set(o,s),s.signal()}root(e){return this.hierarchy.establishRoot(e.id),e.signal()}require(e){return this.#e.require(e).signal()}};var it=class r extends et{static config=()=>{let e=new A().set("audio",p`<sl-icon name=music-note-beamed></sl-icon>`).set("video",p`<sl-icon name=film></sl-icon>`).set("image",p`<sl-icon name=image></sl-icon>`).set("other",p`<sl-icon name=file-earmark></sl-icon>`),t=new Map().set("all",()=>!0).set("video",a=>a.isKind("folder")||a.isKind("file")&&a.specimen.format==="video").set("audio",a=>a.isKind("folder")||a.isKind("file")&&a.specimen.format==="audio"),o=new Map().set("label",(a,c)=>a.specimen.label.localeCompare(c.specimen.label)).set("format",(a,c)=>a.isKind("file")&&c.isKind("file")?a.specimen.format.localeCompare(c.specimen.format):a.isKind("file")?-1:c.isKind("file")?1:0),s=(a,c)=>{let u=a.join(" ").trim().toLowerCase();return u===""?!0:c.kind==="folder"?c.children.some(f=>s(a,f)):c.specimen.label.toLowerCase().includes(u)},n=nt.setup({folder:{icon:p`<sl-icon name="folder"></sl-icon>`},file:{icon:p`<sl-icon name="file"></sl-icon>`}}),i=n.root(n.create("folder",{label:"project"})),l=(a,c)=>a.isKind("file")?e.require(a.specimen.format):c?p`<sl-icon name="folder2-open"></sl-icon>`:a.taxon.icon;return{codex:n,root:i,sorts:o,filters:t,defaultFilter:"all",defaultSort:"label",search:(a,c)=>a.some(u=>c.kind.includes(u)||c.id.includes(u)||c.specimen.label.includes(u))||s(a,c),renderIcon:l,renderLabel:a=>a.specimen.label,renderPreview:a=>a.isKind("file")&&a.specimen.previewUrl?p`<img src=${a.specimen.previewUrl}>`:l(a,!1),permissions:a=>_r.all}};constructor(){super(r.config())}};var $=d`@layer theme, view; @layer theme {
|
|
68
29
|
|
|
69
30
|
* {
|
|
70
31
|
margin: 0;
|
|
@@ -72,7 +33,7 @@ class es extends we{constructor(t){if(super(t),this.it=Ut,t.type!==ve)throw Erro
|
|
|
72
33
|
box-sizing: border-box;
|
|
73
34
|
}
|
|
74
35
|
|
|
75
|
-
}`;function
|
|
36
|
+
}`;function kr(r){for(let e=r;e;e=e.parentElement){let t=e.getAttribute("group");if(t)return t}return"default"}function _(r){let e=kr(r);return Je.getGroup(e)}var Cr=S(()=>{let r=b(),e=_(r);return m($,d`
|
|
76
37
|
sl-button sl-icon {
|
|
77
38
|
font-size: 14px;
|
|
78
39
|
}
|
|
@@ -86,24 +47,24 @@ class es extends we{constructor(t){if(super(t),this.it=Ut,t.type!==ve)throw Erro
|
|
|
86
47
|
gap: 0.5em;
|
|
87
48
|
}
|
|
88
49
|
}
|
|
89
|
-
`)
|
|
50
|
+
`),p`
|
|
90
51
|
<div class="panel">
|
|
91
52
|
<sl-dropdown>
|
|
92
53
|
<sl-button size="small" slot="trigger" caret>
|
|
93
54
|
<sl-icon name="sort-down-alt"></sl-icon>
|
|
94
55
|
</sl-button>
|
|
95
|
-
<sl-menu @sl-select=${
|
|
96
|
-
${[...e.config.sorts?.keys()].map(
|
|
97
|
-
<sl-menu-item value=${
|
|
56
|
+
<sl-menu @sl-select=${o=>{let s=o.detail.item.value;e.selectedSort(s)}}>
|
|
57
|
+
${[...e.config.sorts?.keys()].map(o=>p`
|
|
58
|
+
<sl-menu-item value=${o}>
|
|
98
59
|
<div class=item>
|
|
99
|
-
<sl-icon name="check" slot="prefix" style="visibility: ${
|
|
100
|
-
<span>${
|
|
60
|
+
<sl-icon name="check" slot="prefix" style="visibility: ${o===e.selectedSort()?"visible":"hidden"}"></sl-icon>
|
|
61
|
+
<span>${o}</span>
|
|
101
62
|
</div>
|
|
102
63
|
</sl-menu-item>
|
|
103
|
-
`)
|
|
64
|
+
`)}
|
|
104
65
|
</sl-menu>
|
|
105
66
|
</sl-dropdown>
|
|
106
|
-
</div>`})
|
|
67
|
+
</div>`});var Br=S(()=>{let r=b(),e=_(r);return m($,d`
|
|
107
68
|
sl-menu {
|
|
108
69
|
margin-top: 0.3em;
|
|
109
70
|
|
|
@@ -113,24 +74,24 @@ class es extends we{constructor(t){if(super(t),this.it=Ut,t.type!==ve)throw Erro
|
|
|
113
74
|
gap: 0.5em;
|
|
114
75
|
}
|
|
115
76
|
}
|
|
116
|
-
`)
|
|
77
|
+
`),p`
|
|
117
78
|
<div class="panel">
|
|
118
79
|
<sl-dropdown>
|
|
119
80
|
<sl-button size="small" slot="trigger" caret>
|
|
120
81
|
<sl-icon name="funnel"></sl-icon>
|
|
121
82
|
</sl-button>
|
|
122
|
-
<sl-menu @sl-select=${
|
|
123
|
-
${[...e.config.filters?.keys()].map(
|
|
124
|
-
<sl-menu-item value=${
|
|
83
|
+
<sl-menu @sl-select=${o=>{let s=o.detail.item.value;e.selectedFilter(s)}}>
|
|
84
|
+
${[...e.config.filters?.keys()].map(o=>p`
|
|
85
|
+
<sl-menu-item value=${o}>
|
|
125
86
|
<div class=item>
|
|
126
|
-
<sl-icon name="check" slot="prefix" style="visibility: ${
|
|
127
|
-
<span>${
|
|
87
|
+
<sl-icon name="check" slot="prefix" style="visibility: ${o===e.selectedFilter()?"visible":"hidden"}"></sl-icon>
|
|
88
|
+
<span>${o}</span>
|
|
128
89
|
</div>
|
|
129
90
|
</sl-menu-item>
|
|
130
|
-
`)
|
|
91
|
+
`)}
|
|
131
92
|
</sl-menu>
|
|
132
93
|
</sl-dropdown>
|
|
133
|
-
</div>`})
|
|
94
|
+
</div>`});var Tr=d`
|
|
134
95
|
|
|
135
96
|
.toolbar {
|
|
136
97
|
display: flex;
|
|
@@ -244,49 +205,49 @@ sl-tooltip {
|
|
|
244
205
|
}
|
|
245
206
|
}
|
|
246
207
|
|
|
247
|
-
`;
|
|
208
|
+
`;var Pr=S(()=>{m($,Tr);let r=b(),e=Y(),t=_(r),{trail:o,config:s}=t,[n,i]=yr("tiles");N(()=>{let u=t.on.upload.sub(()=>e());return()=>u()});let l=()=>t.sort(o.currentFolder).filter(u=>t.matches(u));return p`
|
|
248
209
|
<div class="toolbar">
|
|
249
210
|
<sl-button-group label="View mode">
|
|
250
211
|
<sl-tooltip content="Tiles">
|
|
251
|
-
<sl-button size="small" outline data-active=${"tiles"
|
|
212
|
+
<sl-button size="small" outline data-active=${n==="tiles"} @click=${()=>i("tiles")}>
|
|
252
213
|
<sl-icon name="grid-3x3-gap"></sl-icon>
|
|
253
214
|
</sl-button>
|
|
254
215
|
</sl-tooltip>
|
|
255
216
|
<sl-tooltip content="Details">
|
|
256
|
-
<sl-button size="small" outline data-active=${"details"
|
|
217
|
+
<sl-button size="small" outline data-active=${n==="details"} @click=${()=>i("details")}>
|
|
257
218
|
<sl-icon name="list"></sl-icon>
|
|
258
219
|
</sl-button>
|
|
259
220
|
</sl-tooltip>
|
|
260
221
|
</sl-button-group>
|
|
261
222
|
</div>
|
|
262
223
|
|
|
263
|
-
${"details"
|
|
224
|
+
${n==="details"?p`
|
|
264
225
|
<div class="details">
|
|
265
|
-
${
|
|
266
|
-
<div @click=${
|
|
267
|
-
${
|
|
226
|
+
${l().map(u=>p`
|
|
227
|
+
<div @click=${f=>o.setTrail(f,u)} class="card">
|
|
228
|
+
${s.renderIcon(u,!1)}
|
|
268
229
|
<div class=meta>
|
|
269
|
-
<div class=name>${
|
|
270
|
-
<div class=type>${
|
|
230
|
+
<div class=name>${s.renderLabel(u)}</div>
|
|
231
|
+
<div class=type>${u.kind}</div>
|
|
271
232
|
</div>
|
|
272
233
|
</div>
|
|
273
|
-
`)
|
|
234
|
+
`)}
|
|
274
235
|
</div>
|
|
275
|
-
`:
|
|
236
|
+
`:p`
|
|
276
237
|
<div class="tiles">
|
|
277
|
-
${
|
|
278
|
-
<div class="item" @click="${
|
|
238
|
+
${l().map(u=>p`
|
|
239
|
+
<div class="item" @click="${f=>o.setTrail(f,u)}">
|
|
279
240
|
<div class="media-icon">
|
|
280
|
-
${
|
|
241
|
+
${s.renderPreview(u)??s.renderIcon(u,!1)}
|
|
281
242
|
</div>
|
|
282
|
-
<div class="label" title="${
|
|
283
|
-
${
|
|
243
|
+
<div class="label" title="${s.renderLabel(u)}">
|
|
244
|
+
${s.renderLabel(u)}
|
|
284
245
|
</div>
|
|
285
246
|
</div>
|
|
286
|
-
`)
|
|
247
|
+
`)}
|
|
287
248
|
</div>
|
|
288
249
|
`}
|
|
289
|
-
`})
|
|
250
|
+
`});var Or=d`
|
|
290
251
|
|
|
291
252
|
.dropzone {
|
|
292
253
|
width: 100%;
|
|
@@ -336,23 +297,23 @@ sl-tooltip {
|
|
|
336
297
|
color: var(--sl-color-neutral-700);
|
|
337
298
|
}
|
|
338
299
|
|
|
339
|
-
`;
|
|
340
|
-
<div class="dropzone" ?data-hovering=${
|
|
300
|
+
`;var zr=S(()=>{m($,Or);let r=b(),e=_(r),{dropzone:t,config:{root:o}}=e;return p`
|
|
301
|
+
<div class="dropzone" ?data-hovering=${t.hovering}>
|
|
341
302
|
<input
|
|
342
303
|
type="file"
|
|
343
304
|
class="dz-input"
|
|
344
|
-
@change=${t
|
|
345
|
-
@drop=${t
|
|
346
|
-
@dragover=${t
|
|
347
|
-
@dragenter=${t
|
|
348
|
-
@dragleave=${
|
|
305
|
+
@change=${s=>t.change(s,o)}
|
|
306
|
+
@drop=${s=>t.drop(s,o)}
|
|
307
|
+
@dragover=${s=>t.dragover(s,o)}
|
|
308
|
+
@dragenter=${s=>t.dragenter(s,o)}
|
|
309
|
+
@dragleave=${t.dragleave}
|
|
349
310
|
>
|
|
350
311
|
<div class=dz-info>
|
|
351
312
|
<sl-icon name="upload"></sl-icon>
|
|
352
313
|
Drop files here
|
|
353
314
|
</div>
|
|
354
315
|
</div>
|
|
355
|
-
`})
|
|
316
|
+
`});var Mr=d`
|
|
356
317
|
|
|
357
318
|
sl-tree-item::part(expand-button) {
|
|
358
319
|
rotate: none;
|
|
@@ -412,60 +373,62 @@ sl-tree-item[data-hover] {
|
|
|
412
373
|
background: rgba(0, 0, 0, 0.4);
|
|
413
374
|
}
|
|
414
375
|
|
|
415
|
-
`;
|
|
416
|
-
<sl-tree-item
|
|
417
|
-
draggable="true"
|
|
418
|
-
@dragstart=${e=>r.dragstart(e,t)}
|
|
419
|
-
@dragend=${r.dragend}
|
|
420
|
-
@click=${e=>n.setTrail(e,t)}
|
|
421
|
-
data-type=${t.kind}
|
|
422
|
-
?data-hover=${r.hovering?.id===t.id}
|
|
423
|
-
>
|
|
424
|
-
${"folder"===t.kind?(t=>qe`
|
|
376
|
+
`;var jr=X(r=>{m($,Mr);let e=Y(),{config:t}=r,{dropzone:o,trail:s,config:{root:n}}=r;N(()=>{let c=r.on.upload.sub(()=>e());return()=>c()});let i=c=>p`
|
|
425
377
|
<input
|
|
426
|
-
@dragenter=${
|
|
427
|
-
@dragleave=${
|
|
428
|
-
@dragover=${
|
|
429
|
-
@drop=${
|
|
430
|
-
@click=${
|
|
378
|
+
@dragenter=${u=>o.dragenter(u,c)}
|
|
379
|
+
@dragleave=${o.dragleave}
|
|
380
|
+
@dragover=${u=>o.dragover(u,c)}
|
|
381
|
+
@drop=${u=>o.drop(u,c)}
|
|
382
|
+
@click=${u=>u.preventDefault()}
|
|
431
383
|
id="file-import"
|
|
432
384
|
class="file-import folder-hover"
|
|
433
385
|
>
|
|
434
|
-
<span class="folder" slot="expand-icon">${
|
|
435
|
-
<span class="folder" slot="collapse-icon">${
|
|
436
|
-
${
|
|
437
|
-
|
|
438
|
-
${
|
|
439
|
-
${
|
|
440
|
-
`
|
|
441
|
-
|
|
386
|
+
<span class="folder" slot="expand-icon">${t.renderIcon(c,!1)}</span>
|
|
387
|
+
<span class="folder" slot="collapse-icon">${t.renderIcon(c,!0)}</span>
|
|
388
|
+
${t.renderLabel(c)}
|
|
389
|
+
`,l=c=>p`
|
|
390
|
+
${t.renderIcon(c,!1)}
|
|
391
|
+
${t.renderLabel(c)}
|
|
392
|
+
`,a=c=>p`
|
|
393
|
+
<sl-tree-item
|
|
394
|
+
draggable="true"
|
|
395
|
+
@dragstart=${u=>o.dragstart(u,c)}
|
|
396
|
+
@dragend=${o.dragend}
|
|
397
|
+
@click=${u=>s.setTrail(u,c)}
|
|
398
|
+
data-type=${c.kind}
|
|
399
|
+
?data-hover=${o.hovering?.id===c.id}
|
|
400
|
+
>
|
|
401
|
+
${c.kind==="folder"?i(c):l(c)}
|
|
402
|
+
${r.sort(c.children).map(u=>r.matches(u)?a(u):null)}
|
|
442
403
|
</sl-tree-item>
|
|
443
|
-
`;return
|
|
404
|
+
`;return p`
|
|
444
405
|
<sl-tree selection=leaf>
|
|
445
|
-
${
|
|
446
|
-
</sl-tree>`})
|
|
406
|
+
${a(n)}
|
|
407
|
+
</sl-tree>`});var Dr=S(()=>{m($);let r=b(),e=_(r);return p`
|
|
447
408
|
<div class="panel">
|
|
448
|
-
${
|
|
449
|
-
</div>`})
|
|
409
|
+
${jr(e)}
|
|
410
|
+
</div>`});var So=d`
|
|
450
411
|
sl-input::part(prefix) {
|
|
451
412
|
padding-left: 0.5em;
|
|
452
413
|
}
|
|
453
|
-
`,
|
|
414
|
+
`,Hr=S(()=>{m($,So);let r=b(),e=_(r);return p`
|
|
454
415
|
<sl-input
|
|
455
416
|
size='small'
|
|
456
417
|
pill
|
|
457
418
|
placeholder='Search'
|
|
458
419
|
clearable
|
|
459
|
-
@sl-input=${t=>e.searchText
|
|
420
|
+
@sl-input=${t=>e.searchText(t.target.value)}
|
|
460
421
|
>
|
|
461
422
|
<sl-icon name='search' slot='prefix'></sl-icon>
|
|
462
423
|
</sl-input>
|
|
463
|
-
`})
|
|
424
|
+
`});var Lr=S(()=>{m($);let r=_(b()),{trail:e,config:{codex:t,renderLabel:o}}=r,s=n=>i=>r.trail.setTrail(i,n);return p`
|
|
464
425
|
<sl-breadcrumb>
|
|
465
|
-
${
|
|
466
|
-
<sl-breadcrumb-item @click="${
|
|
467
|
-
${null
|
|
426
|
+
${e.signal().map(n=>p`
|
|
427
|
+
<sl-breadcrumb-item @click="${s(n)}">
|
|
428
|
+
${n===null?"root":o(t.require(n.id))}
|
|
468
429
|
</sl-breadcrumb-item>
|
|
469
|
-
`)
|
|
430
|
+
`)}
|
|
470
431
|
</sl-breadcrumb>
|
|
471
|
-
`})
|
|
432
|
+
`});var Nr={QuayOutliner:Dr,QuaySearchbar:Hr,QuayDropzone:zr,QuayBrowser:Pr,QuayBreadcrumb:Lr,QuayFilter:Br,QuaySort:Cr};function Rr(){document.documentElement.className="sl-theme-dark"}var Ur=Je.setGroup("default",new it),{codex:q,root:_o}=Ur.config,be="/assets/preview.webp",Eo=q.create("file",{format:"video",label:"01\u2011introduction.mp4",previewUrl:be}),ko=q.create("file",{format:"image",label:"cover.png",previewUrl:be}),Co=q.create("file",{format:"audio",label:"click.wav",previewUrl:null}),Ir=q.create("folder",{label:"sprites"}),Bo=q.create("file",{format:"image",label:"hero.png",previewUrl:be}),To=q.create("file",{format:"image",label:"enemy.png",previewUrl:be});q.root(_o).attach(Eo).attach(ko).attach(Co).attach(Ir);Ir.attach(Bo).attach(To);Ur.on.upload.sub(({files:r,target:e})=>{for(let t of r){let o=t.type.split("/")[0],s=q.create("file",{label:t.name,format:o,previewUrl:be});e.attach(s)}});Rr();v.register(Nr);
|
|
433
|
+
/*! For license information please see main.bundle.min.js.LEGAL.txt */
|
|
434
|
+
//# sourceMappingURL=main.bundle.min.js.map
|