From 015d00f90dda641daeb3828e8841deb40ca348bb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 18:00:39 +0000 Subject: [PATCH] Update web components build artifact --- webcomponents/dist/flow-launcher-docs-web-components.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webcomponents/dist/flow-launcher-docs-web-components.js b/webcomponents/dist/flow-launcher-docs-web-components.js index d56ad11..3acea5e 100644 --- a/webcomponents/dist/flow-launcher-docs-web-components.js +++ b/webcomponents/dist/flow-launcher-docs-web-components.js @@ -1,3 +1,3 @@ function t(){}const e=t=>t;function n(t){return t()}function i(){return Object.create(null)}function r(t){t.forEach(n)}function o(t){return"function"==typeof t}function l(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let a;function s(t,e){return t===e||(a||(a=document.createElement("a")),a.href=e,t===a.href)}function c(t,e,n,i){return t[1]&&i?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](i(e))):n.ctx}const u="undefined"!=typeof window;let d=u?()=>window.performance.now():()=>Date.now(),p=u?t=>requestAnimationFrame(t):t;const f=new Set;function h(t){f.forEach((e=>{e.c(t)||(f.delete(e),e.f())})),0!==f.size&&p(h)}function m(t,e){t.appendChild(e)}function g(t,e,n){const i=$(t);if(!i.getElementById(e)){const t=k("style");t.id=e,t.textContent=n,b(i,t)}}function $(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function v(t){const e=k("style");return e.textContent="/* empty */",b($(t),e),e.sheet}function b(t,e){return m(t.head||t,e),e.sheet}function y(t,e,n){t.insertBefore(e,n||null)}function x(t){t.parentNode&&t.parentNode.removeChild(t)}function w(t,e){for(let n=0;nt.removeEventListener(e,n,i)}function I(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function S(t,e){e=""+e,t.data!==e&&(t.data=e)}function T(t,e){t.value=null==e?"":e}function B(t,e,n,i){null==n?t.style.removeProperty(e):t.style.setProperty(e,n,i?"important":"")}function O(t,e,n){for(let n=0;n>>0}(u)}_${a}`,p=$(t),{stylesheet:f,rules:h}=E.get(p)||function(t,e){const n={stylesheet:v(e),rules:{}};return E.set(t,n),n}(p,t);h[d]||(h[d]=!0,f.insertRule(`@keyframes ${d} ${u}`,f.cssRules.length));const m=t.style.animation||"";return t.style.animation=`${m?`${m}, `:""}${d} ${i}ms linear ${r}ms 1 both`,L+=1,d}function q(t,e){const n=(t.style.animation||"").split(", "),i=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),r=n.length-i.length;r&&(t.style.animation=i.join(", "),L-=r,L||p((()=>{L||(E.forEach((t=>{const{ownerNode:e}=t.stylesheet;e&&x(e)})),E.clear())})))}function D(n,i,r,o){if(!i)return t;const l=n.getBoundingClientRect();if(i.left===l.left&&i.right===l.right&&i.top===l.top&&i.bottom===l.bottom)return t;const{delay:a=0,duration:s=300,easing:c=e,start:u=d()+a,end:m=u+s,tick:g=t,css:$}=r(n,{from:i,to:l},o);let v,b=!0,y=!1;function x(){$&&q(n,v),b=!1}return function(t){let e;0===f.size&&p(h),new Promise((n=>{f.add(e={c:t,f:n})}))}((t=>{if(!y&&t>=u&&(y=!0),y&&t>=m&&(g(1,0),x()),!b)return!1;if(y){const e=0+1*c((t-u)/s);g(e,1-e)}return!0})),$&&(v=F(n,0,1,s,a,c,$)),a||(y=!0),g(0,1),x}function z(t){const e=getComputedStyle(t);if("absolute"!==e.position&&"fixed"!==e.position){const{width:n,height:i}=e,r=t.getBoundingClientRect();t.style.position="absolute",t.style.width=n,t.style.height=i,function(t,e){const n=t.getBoundingClientRect();if(e.left!==n.left||e.top!==n.top){const i=getComputedStyle(t),r="none"===i.transform?"":i.transform;t.style.transform=`${r} translate(${e.left-n.left}px, ${e.top-n.top}px)`}}(t,r)}}function V(t){M=t}function P(){if(!M)throw new Error("Function called outside component initialization");return M}function R(){const t=P();return(e,n,{cancelable:i=!1}={})=>{const r=t.$$.callbacks[e];if(r){const o=function(t,e,{bubbles:n=!1,cancelable:i=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:i})}(e,n,{cancelable:i});return r.slice().forEach((e=>{e.call(t,o)})),!o.defaultPrevented}return!0}}function U(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const Y=[],H=[];let W=[];const J=[],K=Promise.resolve();let Z=!1;function G(){Z||(Z=!0,K.then(it))}function Q(){return G(),K}function X(t){W.push(t)}function tt(t){J.push(t)}const et=new Set;let nt=0;function it(){if(0!==nt)return;const t=M;do{try{for(;nt{ot.delete(t),i&&(n&&t.d(1),i())})),t.o(e)}else i&&i()}function pt(t,e){const n=e.token={};function i(t,i,r,o){if(e.token!==n)return;e.resolved=o;let l=e.ctx;void 0!==r&&(l=l.slice(),l[r]=o);const a=t&&(e.current=t)(l);let s=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==i&&t&&(st(),dt(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),ct())})):e.block.d(1),a.c(),ut(a,1),a.m(e.mount(),e.anchor),s=!0),e.block=a,e.blocks&&(e.blocks[i]=a),s&&it()}if(!(r=t)||"object"!=typeof r&&"function"!=typeof r||"function"!=typeof r.then){if(e.current!==e.then)return i(e.then,1,e.value,t),!0;e.resolved=t}else{const n=P();if(t.then((t=>{V(n),i(e.then,1,e.value,t),V(null)}),(t=>{if(V(n),i(e.catch,2,e.error,t),V(null),!e.hasCatch)throw t})),e.current!==e.pending)return i(e.pending,0),!0}var r}function ft(t){return void 0!==t?.length?t:Array.from(t)}function ht(t,e){dt(t,1,1,(()=>{e.delete(t.key)}))}function mt(t,e){t.f(),ht(t,e)}function gt(t,e,n,i,o,l,a,s,c,u,d,p){let f=t.length,h=l.length,m=f;const g={};for(;m--;)g[t[m].key]=m;const $=[],v=new Map,b=new Map,y=[];for(m=h;m--;){const t=p(o,l,m),r=n(t);let s=a.get(r);s?i&&y.push((()=>s.p(t,e))):(s=u(r,t),s.c()),v.set(r,$[m]=s),r in g&&b.set(r,Math.abs(m-g[r]))}const x=new Set,w=new Set;function k(t){ut(t,1),t.m(s,d),a.set(t.key,t),d=t.first,h--}for(;f&&h;){const e=$[h-1],n=t[f-1],i=e.key,r=n.key;e===n?(d=e.first,f--,h--):v.has(r)?!a.has(i)||x.has(i)?k(e):w.has(r)?f--:b.get(i)>b.get(r)?(w.add(i),k(e)):(x.add(r),f--):(c(n,a),f--)}for(;f--;){const e=t[f];v.has(e.key)||c(e,a)}for(;h;)k($[h-1]);return r(y),$}function $t(t,e,n){const i=t.$$.props[e];void 0!==i&&(t.$$.bound[i]=n,n(t.$$.ctx[i]))}function vt(t){t&&t.c()}function bt(t,e,i){const{fragment:l,after_update:a}=t.$$;l&&l.m(e,i),X((()=>{const e=t.$$.on_mount.map(n).filter(o);t.$$.on_destroy?t.$$.on_destroy.push(...e):r(e),t.$$.on_mount=[]})),a.forEach(X)}function yt(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];W.forEach((i=>-1===t.indexOf(i)?e.push(i):n.push(i))),n.forEach((t=>t())),W=e}(n.after_update),r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function xt(e,n,o,l,a,s,c=null,u=[-1]){const d=M;V(e);const p=e.$$={fragment:null,ctx:[],props:s,update:t,not_equal:a,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(d?d.$$.context:[])),callbacks:i(),dirty:u,skip_bound:!1,root:n.target||d.$$.root};c&&c(p.root);let f=!1;if(p.ctx=o?o(e,n.props||{},((t,n,...i)=>{const r=i.length?i[0]:n;return p.ctx&&a(p.ctx[t],p.ctx[t]=r)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](r),f&&function(t,e){-1===t.$$.dirty[0]&&(Y.push(t),G(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<(e[t].attribute||t).toLowerCase()))}};return Object.keys(e).forEach((t=>{Object.defineProperty(l.prototype,t,{get(){return this.$$c&&t in this.$$c?this.$$c[t]:this.$$d[t]},set(n){n=wt(t,n,e),this.$$d[t]=n,this.$$c?.$set({[t]:n})}})})),i.forEach((t=>{Object.defineProperty(l.prototype,t,{get(){return this.$$c?.[t]}})})),o&&(l=o(l)),t.element=l,l}"function"==typeof HTMLElement&&(at=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;constructor(t,e,n){super(),this.$$ctor=t,this.$$s=e,n&&this.attachShadow({mode:"open"})}addEventListener(t,e,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,n)}removeEventListener(t,e,n){if(super.removeEventListener(t,e,n),this.$$c){const t=this.$$l_u.get(e);t&&(t(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn||this.$$c)return;function t(t){return()=>{let e;return{c:function(){e=k("slot"),"default"!==t&&I(e,"name",t)},m:function(t,n){y(t,e,n)},d:function(t){t&&x(e)}}}}const e={},n=function(t){const e={};return t.childNodes.forEach((t=>{e[t.slot||"default"]=!0})),e}(this);for(const r of this.$$s)r in n&&(e[r]=[t(r)]);for(const o of this.attributes){const l=this.$$g_p(o.name);l in this.$$d||(this.$$d[l]=wt(l,o.value,this.$$p_d,"toProp"))}for(const a in this.$$p_d)a in this.$$d||void 0===this[a]||(this.$$d[a]=this[a],delete this[a]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:e,$$scope:{ctx:[]}}});const i=()=>{this.$$r=!0;for(const t in this.$$p_d)if(this.$$d[t]=this.$$c.$$.ctx[this.$$c.$$.props[t]],this.$$p_d[t].reflect){const e=wt(t,this.$$d[t],this.$$p_d,"toAttribute");null==e?this.removeAttribute(this.$$p_d[t].attribute||t):this.setAttribute(this.$$p_d[t].attribute||t,e)}this.$$r=!1};this.$$c.$$.after_update.push(i),i();for(const s in this.$$l)for(const c of this.$$l[s]){const u=this.$$c.$on(s,c);this.$$l_u.set(c,u)}this.$$l={}}}attributeChangedCallback(t,e,n){this.$$r||(t=this.$$g_p(t),this.$$d[t]=wt(t,n,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(t){return Object.keys(this.$$p_d).find((e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t))||t}});class At{$$=void 0;$$set=void 0;$destroy(){yt(this,1),this.$destroy=t}$on(e,n){if(!o(n))return t;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const t=i.indexOf(n);-1!==t&&i.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function _t(t){g(t,"svelte-1dyfkqi","button.svelte-1dyfkqi{--bg:#373737;--border:#3f3f3f;--border-bottom:#3f3f3f;--bg-hover:#2f2f2f;--text:#ffffff;background-color:var(--bg);border:1px solid var(--border);border-bottom-color:var(--border-bottom);transition:background-color 0.15s;padding:10px 8px;border-radius:6px;color:var(--text)}button.svelte-1dyfkqi:hover{background-color:var(--bg-hover)}button.svelte-1dyfkqi:active{border-bottom-color:var(--border)}button.light.svelte-1dyfkqi{--bg:#fefefe;--border:#e5e5e5;--border-bottom:#868686;--bg-hover:#f6f6f6;--text:#000000}button.isIconButton.svelte-1dyfkqi{padding:0;line-height:1;display:grid;place-items:center}button.disabled.svelte-1dyfkqi{opacity:0.5;pointer-events:none}")}function Ct(t){let e,n,i,r;const o=t[5].default,l=function(t,e,n,i){if(t){const r=c(t,e,n,i);return t[0](r)}}(o,t,t[4],null);return{c(){e=k("button"),l&&l.c(),e.disabled=t[1],I(e,"class","svelte-1dyfkqi"),N(e,"light",t[2]),N(e,"isIconButton",t[0]),N(e,"disabled",t[1])},m(o,a){y(o,e,a),l&&l.m(e,null),n=!0,i||(r=j(e,"click",t[6]),i=!0)},p(t,[i]){l&&l.p&&(!n||16&i)&&function(t,e,n,i,r,o){if(r){const l=c(e,n,i,o);t.p(l,r)}}(l,o,t,t[4],n?function(t,e,n,i){if(t[2]&&i){const r=t[2](i(n));if(void 0===e.dirty)return r;if("object"==typeof r){const t=[],n=Math.max(e.dirty.length,r.length);for(let i=0;i32){const e=[],n=t.ctx.length/32;for(let t=0;t{"theme"in t&&n(3,l=t.theme),"isIconButton"in t&&n(0,a=t.isIconButton),"disabled"in t&&n(1,s=t.disabled),"$$scope"in t&&n(4,o=t.$$scope)},t.$$.update=()=>{8&t.$$.dirty&&n(2,i="light"===l)},[a,s,i,l,o,r,function(e){U.call(this,t,e)}]}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4");class It extends At{constructor(t){super(),xt(this,t,jt,Ct,l,{theme:3,isIconButton:0,disabled:1},_t)}get theme(){return this.$$.ctx[3]}set theme(t){this.$$set({theme:t}),it()}get isIconButton(){return this.$$.ctx[0]}set isIconButton(t){this.$$set({isIconButton:t}),it()}get disabled(){return this.$$.ctx[1]}set disabled(t){this.$$set({disabled:t}),it()}}function St(t){g(t,"svelte-1938d2j","input.svelte-1938d2j,textarea.svelte-1938d2j{--bg:#373737;--border:#3f3f3f;--border-bottom:#3f3f3f;--text:#ffffff;--focus:#a94dc1;background-color:var(--bg);border-radius:6px;border:1px solid var(--border);border-bottom:1px solid var(--border-bottom);padding:10px 10px 11px;color:var(--text);transition:background-color 0.15s, border-color 0.15s;resize:none;outline:none}input.svelte-1938d2j:hover,textarea.svelte-1938d2j:hover{background-color:var(--text-hover-bg-color)}input.svelte-1938d2j:focus,textarea.svelte-1938d2j:focus{background-color:var(--text-focus-bg-color);padding-bottom:10px;border-bottom:2px solid var(--focus);outline:none}input.light.svelte-1938d2j,textarea.light.svelte-1938d2j{--bg:#fefefe;--border:#e5e5e5;--border-bottom:#868686;--text:#000000;--focus:#a94dc1}")}function Tt(t){let e,n,i;return{c(){e=k("textarea"),I(e,"rows","4"),e.readOnly=t[3],I(e,"placeholder",t[4]),I(e,"class","svelte-1938d2j"),N(e,"light",t[5])},m(r,o){y(r,e,o),T(e,t[0]),n||(i=j(e,"input",t[9]),n=!0)},p(t,n){8&n&&(e.readOnly=t[3]),16&n&&I(e,"placeholder",t[4]),1&n&&T(e,t[0]),32&n&&N(e,"light",t[5])},d(t){t&&x(e),n=!1,i()}}}function Bt(t){let e;function n(t,e){return t[1]?Nt:Ot}let i=n(t),r=i(t);return{c(){r.c(),e=C()},m(t,n){r.m(t,n),y(t,e,n)},p(t,o){i===(i=n(t))&&r?r.p(t,o):(r.d(1),r=i(t),r&&(r.c(),r.m(e.parentNode,e)))},d(t){t&&x(e),r.d(t)}}}function Ot(t){let e,n,i;return{c(){e=k("input"),e.readOnly=t[3],I(e,"placeholder",t[4]),I(e,"class","svelte-1938d2j"),N(e,"light",t[5])},m(r,o){y(r,e,o),T(e,t[0]),n||(i=j(e,"input",t[8]),n=!0)},p(t,n){8&n&&(e.readOnly=t[3]),16&n&&I(e,"placeholder",t[4]),1&n&&e.value!==t[0]&&T(e,t[0]),32&n&&N(e,"light",t[5])},d(t){t&&x(e),n=!1,i()}}}function Nt(t){let e,n,i;return{c(){e=k("input"),I(e,"type","password"),e.readOnly=t[3],I(e,"placeholder",t[4]),I(e,"class","svelte-1938d2j"),N(e,"light",t[5])},m(r,o){y(r,e,o),T(e,t[0]),n||(i=j(e,"input",t[7]),n=!0)},p(t,n){8&n&&(e.readOnly=t[3]),16&n&&I(e,"placeholder",t[4]),1&n&&e.value!==t[0]&&T(e,t[0]),32&n&&N(e,"light",t[5])},d(t){t&&x(e),n=!1,i()}}}function Et(e){let n;function i(t,e){return t[2]?Tt:Bt}let r=i(e),o=r(e);return{c(){o.c(),n=C()},m(t,e){o.m(t,e),y(t,n,e)},p(t,[e]){r===(r=i(t))&&o?o.p(t,e):(o.d(1),o=r(t),o&&(o.c(),o.m(n.parentNode,n)))},i:t,o:t,d(t){t&&x(n),o.d(t)}}}function Mt(t,e,n){let i,{theme:r="dark"}=e,{password:o=!1}=e,{multiline:l=!1}=e,{value:a=""}=e,{readonly:s=!1}=e,{placeholder:c=""}=e;return t.$$set=t=>{"theme"in t&&n(6,r=t.theme),"password"in t&&n(1,o=t.password),"multiline"in t&&n(2,l=t.multiline),"value"in t&&n(0,a=t.value),"readonly"in t&&n(3,s=t.readonly),"placeholder"in t&&n(4,c=t.placeholder)},t.$$.update=()=>{64&t.$$.dirty&&n(5,i="light"===r)},[a,o,l,s,c,i,r,function(){a=this.value,n(0,a)},function(){a=this.value,n(0,a)},function(){a=this.value,n(0,a)}]}kt(It,{theme:{},isIconButton:{type:"Boolean"},disabled:{type:"Boolean"}},["default"],[],!0);class Lt extends At{constructor(t){super(),xt(this,t,Mt,Et,l,{theme:6,password:1,multiline:2,value:0,readonly:3,placeholder:4},St)}get theme(){return this.$$.ctx[6]}set theme(t){this.$$set({theme:t}),it()}get password(){return this.$$.ctx[1]}set password(t){this.$$set({password:t}),it()}get multiline(){return this.$$.ctx[2]}set multiline(t){this.$$set({multiline:t}),it()}get value(){return this.$$.ctx[0]}set value(t){this.$$set({value:t}),it()}get readonly(){return this.$$.ctx[3]}set readonly(t){this.$$set({readonly:t}),it()}get placeholder(){return this.$$.ctx[4]}set placeholder(t){this.$$set({placeholder:t}),it()}}function Ft(t){g(t,"svelte-ud6huf","div.svelte-ud6huf{--bg:#373737;--bg-hover:#2f2f2f;--bg-active:#222222;--text:#ffffff;--arrow:#a2a2a2;--border:#3f3f3f;--border-active:#222222;--border-bottom:#3f3f3f;position:relative;display:grid}div.svelte-ud6huf::after{content:'';position:absolute;top:50%;right:10px;width:8px;height:8px;border-right:1px solid var(--arrow);border-bottom:1px solid var(--arrow);transform:translateY(calc(-50% - 2px)) rotate(45deg);pointer-events:none}select.svelte-ud6huf{background-color:var(--bg);border:1px solid var(--border);border-radius:6px;border-bottom-color:var(--border-bottom);color:var(--text);padding:10px 30px 10px 10px;appearance:none;position:relative;outline:none}select.svelte-ud6huf:hover{background-color:var(--bg-hover)}select.svelte-ud6huf:active{background-color:var(--bg-active);border-color:var(--border-active)}select.svelte-ud6huf::after{content:'';position:absolute;top:50%;right:10px;width:12px;height:12px;transform:translateY(-50%);border:solid var(--arrow);border-width:0 1px 1px 0;transition:border-color 0.15s;z-index:100}select.svelte-ud6huf:hover::after{border-color:var(--dropdown-hover-arrow-color)}div.light.svelte-ud6huf{--bg:#fefefe;--bg-hover:#ffffff;--bg-active:#d9d9d9;--text:#000000;--arrow:#727272;--border:#e5e5e5;--border-active:#e5e5e5;--border-bottom:#868686}")}function qt(t,e,n){const i=t.slice();return i[9]=e[n][0],i[6]=e[n][1],i}function Dt(t,e,n){const i=t.slice();return i[6]=e[n],i}function zt(t){let e,n=ft(Object.entries(t[1])),i=[];for(let e=0;ee[5].call(i))),I(n,"class","svelte-ud6huf"),N(n,"light",e[3])},m(t,r){y(t,n,r),m(n,i),c.m(i,null),O(i,e[0],!0),o||(l=j(i,"change",e[5]),o=!0)},p(t,[e]){s===(s=a(t,e))&&c?c.p(t,e):(c.d(1),c=s(t),c&&(c.c(),c.m(i,null))),3&e&&O(i,t[0]),8&e&&N(n,"light",t[3])},i:t,o:t,d(t){t&&x(n),c.d(),o=!1,l()}}}function Yt(t,e,n){let i,{theme:r="dark"}=e,{options:o=[]}=e,{value:l=""}=e,{readonly:a=!1}=e;return t.$$set=t=>{"theme"in t&&n(4,r=t.theme),"options"in t&&n(1,o=t.options),"value"in t&&n(0,l=t.value),"readonly"in t&&n(2,a=t.readonly)},t.$$.update=()=>{16&t.$$.dirty&&n(3,i="light"===r)},[l,o,a,i,r,function(){l=function(t){const e=t.querySelector(":checked");return e&&e.__value}(this),n(0,l),n(1,o)}]}kt(Lt,{theme:{},password:{type:"Boolean"},multiline:{type:"Boolean"},value:{},readonly:{type:"Boolean"},placeholder:{}},[],[],!0);class Ht extends At{constructor(t){super(),xt(this,t,Yt,Ut,l,{theme:4,options:1,value:0,readonly:2},Ft)}get theme(){return this.$$.ctx[4]}set theme(t){this.$$set({theme:t}),it()}get options(){return this.$$.ctx[1]}set options(t){this.$$set({options:t}),it()}get value(){return this.$$.ctx[0]}set value(t){this.$$set({value:t}),it()}get readonly(){return this.$$.ctx[2]}set readonly(t){this.$$set({readonly:t}),it()}}function Wt(t){g(t,"svelte-h5gznx","label.svelte-h5gznx{--bg:#373737;--bg-hover:#2f2f2f;--border:#aaaaaa;--checkmark:#3e373f;--checked:#db9ee5;position:relative;width:20px;height:20px}label.svelte-h5gznx::before{content:'';position:absolute;inset:0;border-radius:6px;border:1px solid var(--border);background-color:var(--bg);z-index:1;transition:background-color 0.15s, border-color 0.15s}label.svelte-h5gznx::after{content:'';position:absolute;top:2px;left:6px;width:6px;height:12px;z-index:2;border:solid var(--checkmark);border-width:0 2px 2px 0;transform:rotate(45deg);opacity:0;transition:opacity 0.15s}label.svelte-h5gznx:hover::before{background-color:var(--bg-hover)}input[type=\"checkbox\"].svelte-h5gznx{display:none}label.svelte-h5gznx:has(:checked)::before{background-color:var(--checked);border-color:var(--checked)}label.svelte-h5gznx:has(:checked)::after{opacity:1}label.light.svelte-h5gznx{--bg:#fefefe;--bg-hover:#f6f6f6;--border:#aaaaaa;--checkmark:#f7eef9;--checked:#db9ee5}label.readonly.svelte-h5gznx{pointer-events:none}")}function Jt(e){let n,i,r,o;return{c(){n=k("label"),i=k("input"),I(i,"type","checkbox"),I(i,"class","svelte-h5gznx"),I(n,"class","svelte-h5gznx"),N(n,"light",e[2]),N(n,"readonly",e[1])},m(t,l){y(t,n,l),m(n,i),i.checked=e[0],r||(o=j(i,"change",e[4]),r=!0)},p(t,[e]){1&e&&(i.checked=t[0]),4&e&&N(n,"light",t[2]),2&e&&N(n,"readonly",t[1])},i:t,o:t,d(t){t&&x(n),r=!1,o()}}}function Kt(t,e,n){let i,{theme:r="dark"}=e,{value:o=!1}=e,{readonly:l=!1}=e;return t.$$set=t=>{"theme"in t&&n(3,r=t.theme),"value"in t&&n(0,o=t.value),"readonly"in t&&n(1,l=t.readonly)},t.$$.update=()=>{8&t.$$.dirty&&n(2,i="light"===r)},[o,l,i,r,function(){o=this.checked,n(0,o)}]}kt(Ht,{theme:{},options:{},value:{},readonly:{type:"Boolean"}},[],[],!0);class Zt extends At{constructor(t){super(),xt(this,t,Kt,Jt,l,{theme:3,value:0,readonly:1},Wt)}get theme(){return this.$$.ctx[3]}set theme(t){this.$$set({theme:t}),it()}get value(){return this.$$.ctx[0]}set value(t){this.$$set({value:t}),it()}get readonly(){return this.$$.ctx[1]}set readonly(t){this.$$set({readonly:t}),it()}}function Gt(t,e){if(!t){var n,i=document.querySelector('head > link[rel="stylesheet"][title="light"]');e((null==i?void 0:i.disabled)?"dark":"light"),n=function(){if(!t){var n=document.querySelector('head > link[rel="stylesheet"][title="light"]');if(e((null==n?void 0:n.disabled)?"dark":"light"),n){var i=new MutationObserver((function(){e((null==n?void 0:n.disabled)?"dark":"light")}));return i.observe(n,{attributes:!0,childList:!1}),function(){return i.disconnect()}}}},P().$$.on_mount.push(n)}}function Qt(t){g(t,"svelte-11dmszu",'.grid.svelte-11dmszu{--bg-color:#2b2b2b;--border-color:#2b2b2b;--label-color:#dcdcdc;--description-color:#cfcfcf;background-color:var(--bg-color);border:1px solid var(--border-color);border-radius:6px;padding:8px 20px;display:grid;grid-template-columns:1fr minmax(35%, auto);gap:25px;align-items:center;font-family:"Segoe UI", "Microsoft YaHei UI", "Microsoft Sans Serif", sans-serif}.grid.light.svelte-11dmszu{--bg-color:#fbfbfb;--border-color:#e5e5e5;--label-color:#1e1e1e;--description-color:#5f5f5f}.grid.full.svelte-11dmszu{grid-template-columns:1fr}.left.svelte-11dmszu{display:flex;flex-direction:column;gap:4px;line-height:1.15}.right.svelte-11dmszu{display:grid;align-items:center}.right.with-button.svelte-11dmszu{grid-template-columns:1fr auto;gap:10px}.right.checkbox.svelte-11dmszu{justify-content:end}.label.svelte-11dmszu{font-size:16px;color:var(--label-color)}.description.svelte-11dmszu{font-size:14px;color:var(--description-color)}')}function Xt(t){let e,n;return{c(){e=k("div"),n=A(t[2]),I(e,"class","label svelte-11dmszu")},m(t,i){y(t,e,i),m(e,n)},p(t,e){4&e&&S(n,t[2])},d(t){t&&x(e)}}}function te(t){let e,n,i,r;const o=[le,oe,re,ie,ne,ee],l=[];function a(t,e){return"input"===t[4]?0:"inputWithFileBtn"===t[4]?1:"passwordBox"===t[4]?2:"textarea"===t[4]?3:"dropdown"===t[4]?4:"checkbox"===t[4]?5:-1}return~(n=a(t))&&(i=l[n]=o[n](t)),{c(){e=k("div"),i&&i.c(),I(e,"class","right svelte-11dmszu"),N(e,"with-button","inputWithFileBtn"===t[4]),N(e,"checkbox","checkbox"===t[4])},m(t,i){y(t,e,i),~n&&l[n].m(e,null),r=!0},p(t,s){let c=n;n=a(t),n===c?~n&&l[n].p(t,s):(i&&(st(),dt(l[c],1,1,(()=>{l[c]=null})),ct()),~n?(i=l[n],i?i.p(t,s):(i=l[n]=o[n](t),i.c()),ut(i,1),i.m(e,null)):i=null),(!r||16&s)&&N(e,"with-button","inputWithFileBtn"===t[4]),(!r||16&s)&&N(e,"checkbox","checkbox"===t[4])},i(t){r||(ut(i),r=!0)},o(t){dt(i),r=!1},d(t){t&&x(e),~n&&l[n].d()}}}function ee(t){let e,n,i;function r(e){t[15](e)}let o={theme:t[1],readonly:t[6]};return void 0!==t[7]&&(o.value=t[7]),e=new Zt({props:o}),H.push((()=>$t(e,"value",r))),{c(){vt(e.$$.fragment)},m(t,n){bt(e,t,n),i=!0},p(t,i){const r={};2&i&&(r.theme=t[1]),64&i&&(r.readonly=t[6]),!n&&128&i&&(n=!0,r.value=t[7],tt((()=>n=!1))),e.$set(r)},i(t){i||(ut(e.$$.fragment,t),i=!0)},o(t){dt(e.$$.fragment,t),i=!1},d(t){yt(e,t)}}}function ne(t){let e,n,i;function r(e){t[14](e)}let o={theme:t[1],readonly:t[6],options:t[5]};return void 0!==t[0]&&(o.value=t[0]),e=new Ht({props:o}),H.push((()=>$t(e,"value",r))),{c(){vt(e.$$.fragment)},m(t,n){bt(e,t,n),i=!0},p(t,i){const r={};2&i&&(r.theme=t[1]),64&i&&(r.readonly=t[6]),32&i&&(r.options=t[5]),!n&&1&i&&(n=!0,r.value=t[0],tt((()=>n=!1))),e.$set(r)},i(t){i||(ut(e.$$.fragment,t),i=!0)},o(t){dt(e.$$.fragment,t),i=!1},d(t){yt(e,t)}}}function ie(t){let e,n,i;function r(e){t[13](e)}let o={theme:t[1],readonly:t[6],multiline:!0};return void 0!==t[0]&&(o.value=t[0]),e=new Lt({props:o}),H.push((()=>$t(e,"value",r))),{c(){vt(e.$$.fragment)},m(t,n){bt(e,t,n),i=!0},p(t,i){const r={};2&i&&(r.theme=t[1]),64&i&&(r.readonly=t[6]),!n&&1&i&&(n=!0,r.value=t[0],tt((()=>n=!1))),e.$set(r)},i(t){i||(ut(e.$$.fragment,t),i=!0)},o(t){dt(e.$$.fragment,t),i=!1},d(t){yt(e,t)}}}function re(t){let e,n,i;function r(e){t[12](e)}let o={theme:t[1],readonly:t[6],password:!0};return void 0!==t[0]&&(o.value=t[0]),e=new Lt({props:o}),H.push((()=>$t(e,"value",r))),{c(){vt(e.$$.fragment)},m(t,n){bt(e,t,n),i=!0},p(t,i){const r={};2&i&&(r.theme=t[1]),64&i&&(r.readonly=t[6]),!n&&1&i&&(n=!0,r.value=t[0],tt((()=>n=!1))),e.$set(r)},i(t){i||(ut(e.$$.fragment,t),i=!0)},o(t){dt(e.$$.fragment,t),i=!1},d(t){yt(e,t)}}}function oe(t){let e,n,i,r,o;function l(e){t[11](e)}let a={theme:t[1],readonly:t[6]};return void 0!==t[0]&&(a.value=t[0]),e=new Lt({props:a}),H.push((()=>$t(e,"value",l))),r=new It({props:{theme:t[1],$$slots:{default:[ae]},$$scope:{ctx:t}}}),{c(){vt(e.$$.fragment),i=_(),vt(r.$$.fragment)},m(t,n){bt(e,t,n),y(t,i,n),bt(r,t,n),o=!0},p(t,i){const o={};2&i&&(o.theme=t[1]),64&i&&(o.readonly=t[6]),!n&&1&i&&(n=!0,o.value=t[0],tt((()=>n=!1))),e.$set(o);const l={};2&i&&(l.theme=t[1]),65536&i&&(l.$$scope={dirty:i,ctx:t}),r.$set(l)},i(t){o||(ut(e.$$.fragment,t),ut(r.$$.fragment,t),o=!0)},o(t){dt(e.$$.fragment,t),dt(r.$$.fragment,t),o=!1},d(t){t&&x(i),yt(e,t),yt(r,t)}}}function le(t){let e,n,i;function r(e){t[10](e)}let o={theme:t[1],readonly:t[6]};return void 0!==t[0]&&(o.value=t[0]),e=new Lt({props:o}),H.push((()=>$t(e,"value",r))),{c(){vt(e.$$.fragment)},m(t,n){bt(e,t,n),i=!0},p(t,i){const r={};2&i&&(r.theme=t[1]),64&i&&(r.readonly=t[6]),!n&&1&i&&(n=!0,r.value=t[0],tt((()=>n=!1))),e.$set(r)},i(t){i||(ut(e.$$.fragment,t),i=!0)},o(t){dt(e.$$.fragment,t),i=!1},d(t){yt(e,t)}}}function ae(t){let e;return{c(){e=A("Browse")},m(t,n){y(t,e,n)},d(t){t&&x(e)}}}function se(t){let e,n,i,r,o,l,a,s="textBlock"!==t[4]&&Xt(t),c="textBlock"!==t[4]&&te(t);return{c(){e=k("div"),n=k("div"),s&&s.c(),i=_(),r=k("div"),o=A(t[3]),l=_(),c&&c.c(),I(r,"class","description svelte-11dmszu"),I(n,"class","left svelte-11dmszu"),I(e,"class","grid svelte-11dmszu"),N(e,"full",t[9]),N(e,"light",t[8])},m(t,u){y(t,e,u),m(e,n),s&&s.m(n,null),m(n,i),m(n,r),m(r,o),m(e,l),c&&c.m(e,null),a=!0},p(t,[r]){"textBlock"!==t[4]?s?s.p(t,r):(s=Xt(t),s.c(),s.m(n,i)):s&&(s.d(1),s=null),(!a||8&r)&&S(o,t[3]),"textBlock"!==t[4]?c?(c.p(t,r),16&r&&ut(c,1)):(c=te(t),c.c(),ut(c,1),c.m(e,null)):c&&(st(),dt(c,1,1,(()=>{c=null})),ct()),(!a||512&r)&&N(e,"full",t[9]),(!a||256&r)&&N(e,"light",t[8])},i(t){a||(ut(c),a=!0)},o(t){dt(c),a=!1},d(t){t&&x(e),s&&s.d(),c&&c.d()}}}function ce(t,e,n){let i,r,o,{label:l=""}=e,{description:a=""}=e,{value:s=""}=e,{type:c="textBlock"}=e,{options:u=[]}=e,{readonly:d=!1}=e,{theme:p}=e;return Gt(p,(t=>n(1,p=t))),t.$$set=t=>{"label"in t&&n(2,l=t.label),"description"in t&&n(3,a=t.description),"value"in t&&n(0,s=t.value),"type"in t&&n(4,c=t.type),"options"in t&&n(5,u=t.options),"readonly"in t&&n(6,d=t.readonly),"theme"in t&&n(1,p=t.theme)},t.$$.update=()=>{1&t.$$.dirty&&n(7,i="true"===s||!0===s),2&t.$$.dirty&&n(8,r="light"===p),16&t.$$.dirty&&n(9,o="textBlock"===c)},[s,p,l,a,c,u,d,i,r,o,function(t){s=t,n(0,s)},function(t){s=t,n(0,s)},function(t){s=t,n(0,s)},function(t){s=t,n(0,s)},function(t){s=t,n(0,s)},function(t){i=t,n(7,i),n(0,s)}]}kt(Zt,{theme:{},value:{type:"Boolean"},readonly:{type:"Boolean"}},[],[],!0);class ue extends At{constructor(t){super(),xt(this,t,ce,se,l,{label:2,description:3,value:0,type:4,options:5,readonly:6,theme:1},Qt)}get label(){return this.$$.ctx[2]}set label(t){this.$$set({label:t}),it()}get description(){return this.$$.ctx[3]}set description(t){this.$$set({description:t}),it()}get value(){return this.$$.ctx[0]}set value(t){this.$$set({value:t}),it()}get type(){return this.$$.ctx[4]}set type(t){this.$$set({type:t}),it()}get options(){return this.$$.ctx[5]}set options(t){this.$$set({options:t}),it()}get readonly(){return this.$$.ctx[6]}set readonly(t){this.$$set({readonly:t}),it()}get theme(){return this.$$.ctx[1]}set theme(t){this.$$set({theme:t}),it()}}function de(t){const e=t-1;return e*e*e+1}function pe(t){return--t*t*t*t*t+1}function fe(t,{from:e,to:n},i={}){const r=getComputedStyle(t),l="none"===r.transform?"":r.transform,[a,s]=r.transformOrigin.split(" ").map(parseFloat),c=e.left+e.width*a/n.width-(n.left+a),u=e.top+e.height*s/n.height-(n.top+s),{delay:d=0,duration:p=(t=>120*Math.sqrt(t)),easing:f=de}=i;return{delay:d,duration:o(p)?p(Math.sqrt(c*c+u*u)):p,easing:f,css:(t,i)=>{const r=i*c,o=i*u,a=t+i*e.width/n.width,s=t+i*e.height/n.height;return`transform: ${l} translate(${r}px, ${o}px) scale(${a}, ${s});`}}}function he(t){g(t,"svelte-1wr2l6q","dialog.svelte-1wr2l6q{--bg:#2b2b2b;--color:#eeeeee;--overlay:#00000088;color:var(--color);background-color:var(--bg);border:none;font-family:sans-serif;width:500px;padding:24px;border-radius:12px}dialog.light.svelte-1wr2l6q{--bg:#eeeeee;--color:#111111;--overlay:#00000088}dialog.svelte-1wr2l6q::backdrop{background-color:var(--overlay);opacity:1;backdrop-filter:blur(4px)}.contents.svelte-1wr2l6q{display:flex;flex-direction:column;gap:36px}.label-with-input.svelte-1wr2l6q{display:flex;flex-direction:column;gap:8px}.label-with-checkbox.svelte-1wr2l6q{display:flex;align-items:center;gap:8px}.error.svelte-1wr2l6q{color:#ff0000}.action-buttons.svelte-1wr2l6q{display:flex;justify-content:flex-end;gap:12px}")}function me(t){let e,n,i,r,o,l,a,s,c,u,d,p;function f(e){t[14](e)}let h={theme:t[1]};function g(e){t[15](e)}void 0!==t[0].attributes.name&&(h.value=t[0].attributes.name),r=new Lt({props:h}),H.push((()=>$t(r,"value",f)));let $={theme:t[1]};return void 0!==t[0].attributes.label&&($.value=t[0].attributes.label),u=new Lt({props:$}),H.push((()=>$t(u,"value",g))),{c(){e=k("div"),n=k("div"),n.innerHTML="Input name to reference it in the code, it should follow the general JavaScript/Python naming conventions,\n i.e. be named like thisIsMyVariable for JavaScript or this_is_my_variable for\n Python:",i=_(),vt(r.$$.fragment),l=_(),a=k("div"),s=k("div"),s.textContent="Input label (displayed to the left of the input):",c=_(),vt(u.$$.fragment),I(n,"class","svelte-1wr2l6q"),N(n,"error",t[6]),I(e,"class","label-with-input svelte-1wr2l6q"),I(a,"class","label-with-input svelte-1wr2l6q")},m(t,o){y(t,e,o),m(e,n),m(e,i),bt(r,e,null),y(t,l,o),y(t,a,o),m(a,s),m(a,c),bt(u,a,null),p=!0},p(t,e){(!p||64&e)&&N(n,"error",t[6]);const i={};2&e&&(i.theme=t[1]),!o&&1&e&&(o=!0,i.value=t[0].attributes.name,tt((()=>o=!1))),r.$set(i);const l={};2&e&&(l.theme=t[1]),!d&&1&e&&(d=!0,l.value=t[0].attributes.label,tt((()=>d=!1))),u.$set(l)},i(t){p||(ut(r.$$.fragment,t),ut(u.$$.fragment,t),p=!0)},o(t){dt(r.$$.fragment,t),dt(u.$$.fragment,t),p=!1},d(t){t&&(x(e),x(l),x(a)),yt(r),yt(u)}}}function ge(t){let e;return{c(){e=A("Text block content:")},m(t,n){y(t,e,n)},d(t){t&&x(e)}}}function $e(t){let e;return{c(){e=A("Input description (displayed in smaller font right below the label):")},m(t,n){y(t,e,n)},d(t){t&&x(e)}}}function ve(t){let e,n,i,r,o,l;function a(e){t[17](e)}let s={theme:t[1],multiline:!0};return void 0!==t[3]&&(s.value=t[3]),r=new Lt({props:s}),H.push((()=>$t(r,"value",a))),{c(){e=k("div"),n=k("div"),n.textContent="Dropdown options, one per line:",i=_(),vt(r.$$.fragment),I(n,"class","svelte-1wr2l6q"),N(n,"error",t[7]),I(e,"class","label-with-input svelte-1wr2l6q")},m(t,o){y(t,e,o),m(e,n),m(e,i),bt(r,e,null),l=!0},p(t,e){(!l||128&e)&&N(n,"error",t[7]);const i={};2&e&&(i.theme=t[1]),!o&&8&e&&(o=!0,i.value=t[3],tt((()=>o=!1))),r.$set(i)},i(t){l||(ut(r.$$.fragment,t),l=!0)},o(t){dt(r.$$.fragment,t),l=!1},d(t){t&&x(e),yt(r)}}}function be(t){let e,n,i,r,o,l,a,s="checkbox"===t[0].type&&ye(t);const c=[ke,we,xe],u=[];function d(t,e){return"input"===t[0].type||"inputWithFileBtn"===t[0].type||"passwordBox"===t[0].type?0:"textarea"===t[0].type?1:"dropdown"===t[0].type?2:-1}return~(o=d(t))&&(l=u[o]=c[o](t)),{c(){e=k("div"),n=k("div"),i=A("Input default value:\n "),s&&s.c(),r=_(),l&&l.c(),I(n,"class","label-with-checkbox svelte-1wr2l6q"),I(e,"class","label-with-input svelte-1wr2l6q")},m(t,l){y(t,e,l),m(e,n),m(n,i),s&&s.m(n,null),m(e,r),~o&&u[o].m(e,null),a=!0},p(t,i){"checkbox"===t[0].type?s?(s.p(t,i),1&i&&ut(s,1)):(s=ye(t),s.c(),ut(s,1),s.m(n,null)):s&&(st(),dt(s,1,1,(()=>{s=null})),ct());let r=o;o=d(t),o===r?~o&&u[o].p(t,i):(l&&(st(),dt(u[r],1,1,(()=>{u[r]=null})),ct()),~o?(l=u[o],l?l.p(t,i):(l=u[o]=c[o](t),l.c()),ut(l,1),l.m(e,null)):l=null)},i(t){a||(ut(s),ut(l),a=!0)},o(t){dt(s),dt(l),a=!1},d(t){t&&x(e),s&&s.d(),~o&&u[o].d()}}}function ye(t){let e,n,i;function r(e){t[18](e)}let o={theme:t[1]};return void 0!==t[5]&&(o.value=t[5]),e=new Zt({props:o}),H.push((()=>$t(e,"value",r))),{c(){vt(e.$$.fragment)},m(t,n){bt(e,t,n),i=!0},p(t,i){const r={};2&i&&(r.theme=t[1]),!n&&32&i&&(n=!0,r.value=t[5],tt((()=>n=!1))),e.$set(r)},i(t){i||(ut(e.$$.fragment,t),i=!0)},o(t){dt(e.$$.fragment,t),i=!1},d(t){yt(e,t)}}}function xe(t){let e,n,i;function r(e){t[21](e)}let o={theme:t[1],options:t[0].attributes.options};return void 0!==t[0].attributes.defaultValue&&(o.value=t[0].attributes.defaultValue),e=new Ht({props:o}),H.push((()=>$t(e,"value",r))),{c(){vt(e.$$.fragment)},m(t,n){bt(e,t,n),i=!0},p(t,i){const r={};2&i&&(r.theme=t[1]),1&i&&(r.options=t[0].attributes.options),!n&&1&i&&(n=!0,r.value=t[0].attributes.defaultValue,tt((()=>n=!1))),e.$set(r)},i(t){i||(ut(e.$$.fragment,t),i=!0)},o(t){dt(e.$$.fragment,t),i=!1},d(t){yt(e,t)}}}function we(t){let e,n,i;function r(e){t[20](e)}let o={theme:t[1],multiline:!0};return void 0!==t[0].attributes.defaultValue&&(o.value=t[0].attributes.defaultValue),e=new Lt({props:o}),H.push((()=>$t(e,"value",r))),{c(){vt(e.$$.fragment)},m(t,n){bt(e,t,n),i=!0},p(t,i){const r={};2&i&&(r.theme=t[1]),!n&&1&i&&(n=!0,r.value=t[0].attributes.defaultValue,tt((()=>n=!1))),e.$set(r)},i(t){i||(ut(e.$$.fragment,t),i=!0)},o(t){dt(e.$$.fragment,t),i=!1},d(t){yt(e,t)}}}function ke(t){let e,n,i;function r(e){t[19](e)}let o={theme:t[1]};return void 0!==t[0].attributes.defaultValue&&(o.value=t[0].attributes.defaultValue),e=new Lt({props:o}),H.push((()=>$t(e,"value",r))),{c(){vt(e.$$.fragment)},m(t,n){bt(e,t,n),i=!0},p(t,i){const r={};2&i&&(r.theme=t[1]),!n&&1&i&&(n=!0,r.value=t[0].attributes.defaultValue,tt((()=>n=!1))),e.$set(r)},i(t){i||(ut(e.$$.fragment,t),i=!0)},o(t){dt(e.$$.fragment,t),i=!1},d(t){yt(e,t)}}}function Ae(t){let e;return{c(){e=A("Cancel")},m(t,n){y(t,e,n)},d(t){t&&x(e)}}}function _e(t){let e,n=t[2]?"Save":"Add";return{c(){e=A(n)},m(t,n){y(t,e,n)},p(t,i){4&i&&n!==(n=t[2]?"Save":"Add")&&S(e,n)},d(t){t&&x(e)}}}function Ce(t){let e,n,i,r,o,l,a,s,c,u,d,p,f,h,g,$,v,b,w,A,C,S,T,B;function O(e){t[13](e)}let E={theme:t[1],options:t[8]};void 0!==t[0].type&&(E.value=t[0].type),l=new Ht({props:E}),H.push((()=>$t(l,"value",O)));let M="textBlock"!==t[0].type&&me(t);function L(t,e){return"textBlock"!==t[0].type?$e:ge}let F=L(t),q=F(t);function D(e){t[16](e)}let z={theme:t[1]};void 0!==t[0].attributes.description&&(z.value=t[0].attributes.description),f=new Lt({props:z}),H.push((()=>$t(f,"value",D)));let V="dropdown"===t[0].type&&ve(t),P="textBlock"!==t[0].type&&be(t);return w=new It({props:{theme:t[1],$$slots:{default:[Ae]},$$scope:{ctx:t}}}),w.$on("click",t[9]),C=new It({props:{theme:t[1],disabled:t[6]||t[7],$$slots:{default:[_e]},$$scope:{ctx:t}}}),C.$on("click",t[10]),{c(){e=k("dialog"),n=k("div"),i=k("div"),r=k("div"),r.textContent="Input type:",o=_(),vt(l.$$.fragment),s=_(),M&&M.c(),c=_(),u=k("div"),d=k("div"),q.c(),p=_(),vt(f.$$.fragment),g=_(),V&&V.c(),$=_(),P&&P.c(),v=_(),b=k("div"),vt(w.$$.fragment),A=_(),vt(C.$$.fragment),I(i,"class","label-with-input svelte-1wr2l6q"),I(u,"class","label-with-input svelte-1wr2l6q"),I(b,"class","action-buttons svelte-1wr2l6q"),I(n,"class","contents svelte-1wr2l6q"),I(e,"class","svelte-1wr2l6q"),N(e,"light","light"===t[1])},m(a,h){y(a,e,h),m(e,n),m(n,i),m(i,r),m(i,o),bt(l,i,null),m(n,s),M&&M.m(n,null),m(n,c),m(n,u),m(u,d),q.m(d,null),m(u,p),bt(f,u,null),m(n,g),V&&V.m(n,null),m(n,$),P&&P.m(n,null),m(n,v),m(n,b),bt(w,b,null),m(b,A),bt(C,b,null),t[22](e),S=!0,T||(B=j(window,"keyup",t[11]),T=!0)},p(t,[i]){const r={};2&i&&(r.theme=t[1]),!a&&1&i&&(a=!0,r.value=t[0].type,tt((()=>a=!1))),l.$set(r),"textBlock"!==t[0].type?M?(M.p(t,i),1&i&&ut(M,1)):(M=me(t),M.c(),ut(M,1),M.m(n,c)):M&&(st(),dt(M,1,1,(()=>{M=null})),ct()),F!==(F=L(t))&&(q.d(1),q=F(t),q&&(q.c(),q.m(d,null)));const o={};2&i&&(o.theme=t[1]),!h&&1&i&&(h=!0,o.value=t[0].attributes.description,tt((()=>h=!1))),f.$set(o),"dropdown"===t[0].type?V?(V.p(t,i),1&i&&ut(V,1)):(V=ve(t),V.c(),ut(V,1),V.m(n,$)):V&&(st(),dt(V,1,1,(()=>{V=null})),ct()),"textBlock"!==t[0].type?P?(P.p(t,i),1&i&&ut(P,1)):(P=be(t),P.c(),ut(P,1),P.m(n,v)):P&&(st(),dt(P,1,1,(()=>{P=null})),ct());const s={};2&i&&(s.theme=t[1]),16777216&i&&(s.$$scope={dirty:i,ctx:t}),w.$set(s);const u={};2&i&&(u.theme=t[1]),192&i&&(u.disabled=t[6]||t[7]),16777220&i&&(u.$$scope={dirty:i,ctx:t}),C.$set(u),(!S||2&i)&&N(e,"light","light"===t[1])},i(t){S||(ut(l.$$.fragment,t),ut(M),ut(f.$$.fragment,t),ut(V),ut(P),ut(w.$$.fragment,t),ut(C.$$.fragment,t),S=!0)},o(t){dt(l.$$.fragment,t),dt(M),dt(f.$$.fragment,t),dt(V),dt(P),dt(w.$$.fragment,t),dt(C.$$.fragment,t),S=!1},d(n){n&&x(e),yt(l),M&&M.d(),q.d(),yt(f),V&&V.d(),P&&P.d(),yt(w),yt(C),t[22](null),T=!1,B()}}}customElements.define("settings-component-demo",kt(ue,{label:{reflect:!0},description:{reflect:!0},value:{reflect:!0},type:{reflect:!0},options:{reflect:!0,type:"Array"},readonly:{reflect:!0,type:"Boolean"},theme:{}},[],[],!0));const je=/^[a-z_$][0-9a-z_$]*$/i;function Ie(t,e,n){let{theme:i}=e;const r=R();let o,l,a=null,s=!1,c="",{data:u={id:"",type:"textBlock",attributes:{name:"",label:"",description:"",defaultValue:"",options:[]}}}=e,{editingMode:d=!1}=e;function p(){null==a||a.close()}return t.$$set=t=>{"theme"in t&&n(1,i=t.theme),"data"in t&&n(0,u=t.data),"editingMode"in t&&n(2,d=t.editingMode)},t.$$.update=()=>{if(9&t.$$.dirty&&"dropdown"===u.type&&(n(0,u.attributes.options=c.split("\n").map((t=>t.trim())).filter(Boolean),u),u.attributes.options.length&&!u.attributes.options.includes(u.attributes.defaultValue.toString())&&n(0,u.attributes.defaultValue=u.attributes.options[0],u)),1&t.$$.dirty){let t=u.attributes.name.trim();n(6,o=!t.match(je)&&"textBlock"!==u.type)}1&t.$$.dirty&&n(7,l="dropdown"===u.type&&0===u.attributes.options.filter((t=>t.trim())).length)},[u,i,d,c,a,s,o,l,{textBlock:"Block of text",input:"Text input",inputWithFileBtn:"Text input with 'Browse' button",textarea:"Textarea",passwordBox:"Password input",dropdown:"Dropdown",checkbox:"Checkbox"},p,function(){n(0,u.attributes.name=u.attributes.name.trim(),u),n(0,u.attributes.label=u.attributes.label.trim(),u),n(0,u.attributes.description=u.attributes.description.trim(),u),"checkbox"===u.type?n(0,u.attributes.defaultValue=s,u):n(0,u.attributes.defaultValue=u.attributes.defaultValue.toString().trim(),u),r("save",u),a.close()},function(t){"Escape"===t.key&&p()},function(){var t,e;a&&(n(5,s=!!u.attributes.defaultValue),n(3,c=null!==(e=null===(t=u.attributes.options)||void 0===t?void 0:t.join("\n"))&&void 0!==e?e:""),n(4,a.inert=!0,a),a.showModal(),n(4,a.inert=!1,a))},function(e){t.$$.not_equal(u.type,e)&&(u.type=e,n(0,u),n(3,c))},function(e){t.$$.not_equal(u.attributes.name,e)&&(u.attributes.name=e,n(0,u),n(3,c))},function(e){t.$$.not_equal(u.attributes.label,e)&&(u.attributes.label=e,n(0,u),n(3,c))},function(e){t.$$.not_equal(u.attributes.description,e)&&(u.attributes.description=e,n(0,u),n(3,c))},function(t){c=t,n(3,c)},function(t){s=t,n(5,s)},function(e){t.$$.not_equal(u.attributes.defaultValue,e)&&(u.attributes.defaultValue=e,n(0,u),n(3,c))},function(e){t.$$.not_equal(u.attributes.defaultValue,e)&&(u.attributes.defaultValue=e,n(0,u),n(3,c))},function(e){t.$$.not_equal(u.attributes.defaultValue,e)&&(u.attributes.defaultValue=e,n(0,u),n(3,c))},function(t){H[t?"unshift":"push"]((()=>{a=t,n(4,a)}))}]}class Se extends At{constructor(t){super(),xt(this,t,Ie,Ce,l,{theme:1,data:0,editingMode:2,show:12},he)}get theme(){return this.$$.ctx[1]}set theme(t){this.$$set({theme:t}),it()}get data(){return this.$$.ctx[0]}set data(t){this.$$set({data:t}),it()}get editingMode(){return this.$$.ctx[2]}set editingMode(t){this.$$set({editingMode:t}),it()}get show(){return this.$$.ctx[12]}}function Te(t){g(t,"svelte-1bwjvc6",".code-display.svelte-1bwjvc6{--button:#34434b;--button-text:#ffffff;border:1px solid var(--button);border-radius:4px 4px 0 0;position:relative}.code-display.light.svelte-1bwjvc6{--button:#808080;--button-text:#ffffff}.filename.svelte-1bwjvc6{padding:8px;background-color:var(--button);color:var(--button-text);border:none;display:flex;align-items:center;border-bottom-right-radius:4px;position:absolute;top:0;left:0;z-index:1}.limitHeight.svelte-1bwjvc6{max-height:250px;overflow:auto}pre.svelte-1bwjvc6{margin-top:0 !important;margin-bottom:0 !important;padding-top:24px !important}pre.svelte-1bwjvc6::after{display:none}")}function Be(t){let e,n;return{c(){e=k("div"),n=A(t[0]),I(e,"class","filename svelte-1bwjvc6")},m(t,i){y(t,e,i),m(e,n)},p(t,e){1&e&&S(n,t[0])},d(t){t&&x(e)}}}function Oe(e){let n,i,r,o,l,a,s,c=e[1]&&Be(e);return{c(){n=k("div"),c&&c.c(),i=_(),r=k("div"),o=k("pre"),l=k("code"),a=A(e[3]),I(l,"class",s="lang-"+e[2]+" svelte-1bwjvc6"),I(o,"data-lang",e[2]),I(o,"class","svelte-1bwjvc6"),I(r,"class","svelte-1bwjvc6"),N(r,"limitHeight",e[4]),I(n,"class","code-display svelte-1bwjvc6"),N(n,"light","light"===e[5])},m(t,s){y(t,n,s),c&&c.m(n,null),m(n,i),m(n,r),m(r,o),m(o,l),m(l,a),e[7](l)},p(t,[e]){t[1]?c?c.p(t,e):(c=Be(t),c.c(),c.m(n,i)):c&&(c.d(1),c=null),8&e&&S(a,t[3]),4&e&&s!==(s="lang-"+t[2]+" svelte-1bwjvc6")&&I(l,"class",s),4&e&&I(o,"data-lang",t[2]),16&e&&N(r,"limitHeight",t[4]),32&e&&N(n,"light","light"===t[5])},i:t,o:t,d(t){t&&x(n),c&&c.d(),e[7](null)}}}function Ne(t,e,n){let{filename:i}=e,{displayFilename:r=!1}=e,{language:o}=e,{code:l}=e,{limitHeight:a=!0}=e,{theme:s}=e,c=null;return t.$$set=t=>{"filename"in t&&n(0,i=t.filename),"displayFilename"in t&&n(1,r=t.displayFilename),"language"in t&&n(2,o=t.language),"code"in t&&n(3,l=t.code),"limitHeight"in t&&n(4,a=t.limitHeight),"theme"in t&&n(5,s=t.theme)},t.$$.update=()=>{72&t.$$.dirty&&l&&c&&window.Prism&&Q().then((()=>{window.Prism.highlightElement(c)}))},[i,r,o,l,a,s,c,function(t){H[t?"unshift":"push"]((()=>{c=t,n(6,c)}))}]}kt(Se,{theme:{},data:{},editingMode:{type:"Boolean"}},[],["show"],!0);class Ee extends At{constructor(t){super(),xt(this,t,Ne,Oe,l,{filename:0,displayFilename:1,language:2,code:3,limitHeight:4,theme:5},Te)}get filename(){return this.$$.ctx[0]}set filename(t){this.$$set({filename:t}),it()}get displayFilename(){return this.$$.ctx[1]}set displayFilename(t){this.$$set({displayFilename:t}),it()}get language(){return this.$$.ctx[2]}set language(t){this.$$set({language:t}),it()}get code(){return this.$$.ctx[3]}set code(t){this.$$set({code:t}),it()}get limitHeight(){return this.$$.ctx[4]}set limitHeight(t){this.$$set({limitHeight:t}),it()}get theme(){return this.$$.ctx[5]}set theme(t){this.$$set({theme:t}),it()}}kt(Ee,{filename:{},displayFilename:{type:"Boolean"},language:{},code:{},limitHeight:{type:"Boolean"},theme:{}},[],[],!0);var Me=function(t){return"interface Settings {\n\t".concat(t.filter((function(t){return"textBlock"!==t.type})).map((function(t){var e;if("dropdown"!==t.type)return"".concat(t.attributes.name,": ").concat(t.attributes.defaultValue?"string":"string | undefined",";");var n=null===(e=t.attributes.options)||void 0===e?void 0:e.map((function(t){return'"'.concat(t.replace(/"/g,'\\"'),'"')})).join(" | ");return"".concat(t.attributes.name,": ").concat(n,";")})).join("\n\t"),"\n}")},Le=function(t){return"/**\n * @typedef {object} Settings\n ".concat(t.filter((function(t){return"textBlock"!==t.type})).map((function(t){var e;if("dropdown"!==t.type)return"* @property {".concat(t.attributes.defaultValue?"string":"string | undefined","} ").concat(t.attributes.name);var n=null===(e=t.attributes.options)||void 0===e?void 0:e.map((function(t){return'"'.concat(t.replace(/"/g,'\\"'),'"')})).join(" | ");return"* @property {".concat(n,"} ").concat(t.attributes.name)})).join("\n "),"\n */")},Fe=function(t){var e=t.some((function(t){return"dropdown"===t.type}));return"from typing import TypedDict".concat(e?", Literal":"","\n\n\nSettings = TypedDict('Settings', {\n\t").concat(t.filter((function(t){return"textBlock"!==t.type})).map((function(t){var e;if("dropdown"!==t.type)return"'".concat(t.attributes.name,"': ").concat(t.attributes.defaultValue?"str":"str | None");var n=null===(e=t.attributes.options)||void 0===e?void 0:e.map((function(t){return'"'.concat(t.replace(/"/g,'\\"'),'"')})).join(", ");return"'".concat(t.attributes.name,"': Literal[").concat(n,"]")})).join(",\n\t"),"\n})")}; /*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ -function qe(t){return null==t}var De={isNothing:qe,isObject:function(t){return"object"==typeof t&&null!==t},toArray:function(t){return Array.isArray(t)?t:qe(t)?[]:[t]},repeat:function(t,e){var n,i="";for(n=0;na&&(e=i-a+(o=" ... ").length),n-i>a&&(n=i+a-(l=" ...").length),{str:o+t.slice(e,n).replace(/\t/g,"→")+l,pos:i-e+o.length}}function Ue(t,e){return De.repeat(" ",e-t.length)+t}var Ye=function(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var n,i=/\r?\n|\r|\0/g,r=[0],o=[],l=-1;n=i.exec(t.buffer);)o.push(n.index),r.push(n.index+n[0].length),t.position<=n.index&&l<0&&(l=r.length-2);l<0&&(l=r.length-1);var a,s,c="",u=Math.min(t.line+e.linesAfter,o.length).toString().length,d=e.maxLength-(e.indent+u+3);for(a=1;a<=e.linesBefore&&!(l-a<0);a++)s=Re(t.buffer,r[l-a],o[l-a],t.position-(r[l]-r[l-a]),d),c=De.repeat(" ",e.indent)+Ue((t.line-a+1).toString(),u)+" | "+s.str+"\n"+c;for(s=Re(t.buffer,r[l],o[l],t.position,d),c+=De.repeat(" ",e.indent)+Ue((t.line+1).toString(),u)+" | "+s.str+"\n",c+=De.repeat("-",e.indent+u+3+s.pos)+"^\n",a=1;a<=e.linesAfter&&!(l+a>=o.length);a++)s=Re(t.buffer,r[l+a],o[l+a],t.position-(r[l]-r[l+a]),d),c+=De.repeat(" ",e.indent)+Ue((t.line+a+1).toString(),u)+" | "+s.str+"\n";return c.replace(/\n$/,"")},He=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],We=["scalar","sequence","mapping"];var Je=function(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===He.indexOf(e))throw new Pe('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=function(t){var e={};return null!==t&&Object.keys(t).forEach((function(n){t[n].forEach((function(t){e[String(t)]=n}))})),e}(e.styleAliases||null),-1===We.indexOf(this.kind))throw new Pe('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')};function Ke(t,e){var n=[];return t[e].forEach((function(t){var e=n.length;n.forEach((function(n,i){n.tag===t.tag&&n.kind===t.kind&&n.multi===t.multi&&(e=i)})),n[e]=t})),n}function Ze(t){return this.extend(t)}Ze.prototype.extend=function(t){var e=[],n=[];if(t instanceof Je)n.push(t);else if(Array.isArray(t))n=n.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new Pe("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit))}e.forEach((function(t){if(!(t instanceof Je))throw new Pe("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new Pe("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new Pe("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(t){if(!(t instanceof Je))throw new Pe("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(Ze.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=Ke(i,"implicit"),i.compiledExplicit=Ke(i,"explicit"),i.compiledTypeMap=function(){var t,e,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(n.multi[t.kind].push(t),n.multi.fallback.push(t)):n[t.kind][t.tag]=n.fallback[t.tag]=t}for(t=0,e=arguments.length;t=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),rn=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var on=/^[-+]?[0-9]+e/;var ln=new Je("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return null!==t&&!(!rn.test(t)||"_"===t[t.length-1])},construct:function(t){var e,n;return n="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:n*parseFloat(e,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||De.isNegativeZero(t))},represent:function(t,e){var n;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(De.isNegativeZero(t))return"-0.0";return n=t.toString(10),on.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"}),an=Ge.extend({implicit:[Qe,Xe,nn,ln]}),sn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),cn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var un=new Je("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return null!==t&&(null!==sn.exec(t)||null!==cn.exec(t))},construct:function(t){var e,n,i,r,o,l,a,s,c=0,u=null;if(null===(e=sn.exec(t))&&(e=cn.exec(t)),null===e)throw new Error("Date resolve error");if(n=+e[1],i=+e[2]-1,r=+e[3],!e[4])return new Date(Date.UTC(n,i,r));if(o=+e[4],l=+e[5],a=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(u=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(u=-u)),s=new Date(Date.UTC(n,i,r,o,l,a,c)),u&&s.setTime(s.getTime()-u),s},instanceOf:Date,represent:function(t){return t.toISOString()}});var dn=new Je("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}}),pn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var fn=new Je("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,n,i=0,r=t.length,o=pn;for(n=0;n64)){if(e<0)return!1;i+=6}return i%8==0},construct:function(t){var e,n,i=t.replace(/[\r\n=]/g,""),r=i.length,o=pn,l=0,a=[];for(e=0;e>16&255),a.push(l>>8&255),a.push(255&l)),l=l<<6|o.indexOf(i.charAt(e));return 0===(n=r%4*6)?(a.push(l>>16&255),a.push(l>>8&255),a.push(255&l)):18===n?(a.push(l>>10&255),a.push(l>>2&255)):12===n&&a.push(l>>4&255),new Uint8Array(a)},predicate:function(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)},represent:function(t){var e,n,i="",r=0,o=t.length,l=pn;for(e=0;e>18&63],i+=l[r>>12&63],i+=l[r>>6&63],i+=l[63&r]),r=(r<<8)+t[e];return 0===(n=o%3)?(i+=l[r>>18&63],i+=l[r>>12&63],i+=l[r>>6&63],i+=l[63&r]):2===n?(i+=l[r>>10&63],i+=l[r>>4&63],i+=l[r<<2&63],i+=l[64]):1===n&&(i+=l[r>>2&63],i+=l[r<<4&63],i+=l[64],i+=l[64]),i}}),hn=Object.prototype.hasOwnProperty,mn=Object.prototype.toString;var gn=new Je("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,n,i,r,o,l=[],a=t;for(e=0,n=a.length;e>10),56320+(t-65536&1023))}for(var Rn=new Array(256),Un=new Array(256),Yn=0;Yn<256;Yn++)Rn[Yn]=Vn(Yn)?1:0,Un[Yn]=Vn(Yn);function Hn(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||xn,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Wn(t,e){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=Ye(n),new Pe(e,n)}function Jn(t,e){throw Wn(t,e)}function Kn(t,e){t.onWarning&&t.onWarning.call(null,Wn(t,e))}var Zn={YAML:function(t,e,n){var i,r,o;null!==t.version&&Jn(t,"duplication of %YAML directive"),1!==n.length&&Jn(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&Jn(t,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&Jn(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=o<2,1!==o&&2!==o&&Kn(t,"unsupported YAML version of the document")},TAG:function(t,e,n){var i,r;2!==n.length&&Jn(t,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],Nn.test(i)||Jn(t,"ill-formed tag handle (first argument) of the TAG directive"),wn.call(t.tagMap,i)&&Jn(t,'there is a previously declared suffix for "'+i+'" tag handle'),En.test(r)||Jn(t,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch(e){Jn(t,"tag prefix is malformed: "+r)}t.tagMap[i]=r}};function Gn(t,e,n,i){var r,o,l,a;if(e1&&(t.result+=De.repeat("\n",e-1))}function ri(t,e){var n,i,r=t.tag,o=t.anchor,l=[],a=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=l),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,Jn(t,"tab characters must not be used in indentation")),45===i)&&qn(t.input.charCodeAt(t.position+1));)if(a=!0,t.position++,ei(t,!0,-1)&&t.lineIndent<=e)l.push(null),i=t.input.charCodeAt(t.position);else if(n=t.line,ai(t,e,_n,!1,!0),l.push(t.result),ei(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&0!==i)Jn(t,"bad indentation of a sequence entry");else if(t.lineIndente?h=1:t.lineIndent===e?h=0:t.lineIndente?h=1:t.lineIndent===e?h=0:t.lineIndente)&&($&&(l=t.line,a=t.lineStart,s=t.position),ai(t,e,Cn,!0,r)&&($?m=t.result:g=t.result),$||(Xn(t,p,f,h,m,g,l,a,s),h=m=g=null),ei(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&0!==c)Jn(t,"bad indentation of a mapping entry");else if(t.lineIndent=0))break;0===r?Jn(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?Jn(t,"repeat of an indentation width identifier"):(u=e+r-1,c=!0)}if(Fn(o)){do{o=t.input.charCodeAt(++t.position)}while(Fn(o));if(35===o)do{o=t.input.charCodeAt(++t.position)}while(!Ln(o)&&0!==o)}for(;0!==o;){for(ti(t),t.lineIndent=0,o=t.input.charCodeAt(t.position);(!c||t.lineIndentu&&(u=t.lineIndent),Ln(o))d++;else{if(t.lineIndent0){for(r=l,o=0;r>0;r--)(l=zn(a=t.input.charCodeAt(++t.position)))>=0?o=(o<<4)+l:Jn(t,"expected hexadecimal character");t.result+=Pn(o),t.position++}else Jn(t,"unknown escape sequence");n=i=t.position}else Ln(a)?(Gn(t,n,i,!0),ii(t,ei(t,!1,e)),n=i=t.position):t.position===t.lineStart&&ni(t)?Jn(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}Jn(t,"unexpected end of the stream within a double quoted scalar")}(t,p)?g=!0:!function(t){var e,n,i;if(42!==(i=t.input.charCodeAt(t.position)))return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!qn(i)&&!Dn(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&Jn(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),wn.call(t.anchorMap,n)||Jn(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],ei(t,!0,-1),!0}(t)?function(t,e,n){var i,r,o,l,a,s,c,u,d=t.kind,p=t.result;if(qn(u=t.input.charCodeAt(t.position))||Dn(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(qn(i=t.input.charCodeAt(t.position+1))||n&&Dn(i)))return!1;for(t.kind="scalar",t.result="",r=o=t.position,l=!1;0!==u;){if(58===u){if(qn(i=t.input.charCodeAt(t.position+1))||n&&Dn(i))break}else if(35===u){if(qn(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&ni(t)||n&&Dn(u))break;if(Ln(u)){if(a=t.line,s=t.lineStart,c=t.lineIndent,ei(t,!1,-1),t.lineIndent>=e){l=!0,u=t.input.charCodeAt(t.position);continue}t.position=o,t.line=a,t.lineStart=s,t.lineIndent=c;break}}l&&(Gn(t,r,o,!1),ii(t,t.line-a),r=o=t.position,l=!1),Fn(u)||(o=t.position+1),u=t.input.charCodeAt(++t.position)}return Gn(t,r,o,!1),!!t.result||(t.kind=d,t.result=p,!1)}(t,p,kn===n)&&(g=!0,null===t.tag&&(t.tag="?")):(g=!0,null===t.tag&&null===t.anchor||Jn(t,"alias node should not have any properties")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===h&&(g=a&&ri(t,f))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&Jn(t,'unacceptable node kind for ! tag; it should be "scalar", not "'+t.kind+'"'),s=0,c=t.implicitTypes.length;s"),null!==t.result&&d.kind!==t.kind&&Jn(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result,t.tag)?(t.result=d.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Jn(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||g}function si(t){var e,n,i,r,o=t.position,l=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(r=t.input.charCodeAt(t.position))&&(ei(t,!0,-1),r=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==r));){for(l=!0,r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!qn(r);)r=t.input.charCodeAt(++t.position);for(i=[],(n=t.input.slice(e,t.position)).length<1&&Jn(t,"directive name must not be less than one character in length");0!==r;){for(;Fn(r);)r=t.input.charCodeAt(++t.position);if(35===r){do{r=t.input.charCodeAt(++t.position)}while(0!==r&&!Ln(r));break}if(Ln(r))break;for(e=t.position;0!==r&&!qn(r);)r=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==r&&ti(t),wn.call(Zn,n)?Zn[n](t,n,i):Kn(t,'unknown document directive "'+n+'"')}ei(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,ei(t,!0,-1)):l&&Jn(t,"directives end mark is expected"),ai(t,t.lineIndent-1,Cn,!1,!0),ei(t,!0,-1),t.checkLineBreaks&&Bn.test(t.input.slice(o,t.position))&&Kn(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&ni(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,ei(t,!0,-1)):t.position=55296&&i<=56319&&e+1=56320&&n<=57343?1024*(i-55296)+n-56320+65536:i}function Qi(t){return/^\n* /.test(t)}var Xi=1,tr=2,er=3,nr=4,ir=5;function rr(t,e,n,i,r,o,l,a){var s,c,u=0,d=null,p=!1,f=!1,h=-1!==i,m=-1,g=Ji(c=Gi(t,0))&&c!==fi&&!Wi(c)&&c!==Ci&&c!==Ti&&c!==ji&&c!==_i&&c!==Oi&&c!==Ni&&c!==Mi&&c!==Fi&&c!==yi&&c!==wi&&c!==Ai&&c!==vi&&c!==Li&&c!==Ii&&c!==Si&&c!==ki&&c!==bi&&c!==xi&&c!==Bi&&c!==Ei&&function(t){return!Wi(t)&&t!==ji}(Gi(t,t.length-1));if(e||l)for(s=0;s=65536?s+=2:s++){if(!Ji(u=Gi(t,s)))return ir;g=g&&Zi(u,d,a),d=u}else{for(s=0;s=65536?s+=2:s++){if((u=Gi(t,s))===mi)p=!0,h&&(f=f||s-m-1>i&&" "!==t[m+1],m=s);else if(!Ji(u))return ir;g=g&&Zi(u,d,a),d=u}f=f||h&&s-m-1>i&&" "!==t[m+1]}return p||f?n>9&&Qi(t)?ir:l?o===Ri?ir:tr:f?nr:er:!g||l||r(t)?o===Ri?ir:tr:Xi}function or(t,e,n,i,r){t.dump=function(){if(0===e.length)return t.quotingType===Ri?'""':"''";if(!t.noCompatMode&&(-1!==Di.indexOf(e)||zi.test(e)))return t.quotingType===Ri?'"'+e+'"':"'"+e+"'";var o=t.indent*Math.max(1,n),l=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),a=i||t.flowLevel>-1&&n>=t.flowLevel;switch(rr(e,a,t.indent,l,(function(e){return function(t,e){var n,i;for(n=0,i=t.implicitTypes.length;n"+lr(e,t.indent)+ar(Yi(function(t,e){var n,i,r=/(\n+)([^\n]*)/g,o=(a=t.indexOf("\n"),a=-1!==a?a:t.length,r.lastIndex=a,sr(t.slice(0,a),e)),l="\n"===t[0]||" "===t[0];var a;for(;i=r.exec(t);){var s=i[1],c=i[2];n=" "===c[0],o+=s+(l||n||""===c?"":"\n")+sr(c,e),l=n}return o}(e,l),o));case ir:return'"'+function(t){for(var e,n="",i=0,r=0;r=65536?r+=2:r++)i=Gi(t,r),!(e=qi[i])&&Ji(i)?(n+=t[r],i>=65536&&(n+=t[r+1])):n+=e||Vi(i);return n}(e)+'"';default:throw new Pe("impossible error: invalid scalar style")}}()}function lr(t,e){var n=Qi(t)?String(e):"",i="\n"===t[t.length-1];return n+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function ar(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function sr(t,e){if(""===t||" "===t[0])return t;for(var n,i,r=/ [^ ]/g,o=0,l=0,a=0,s="";n=r.exec(t);)(a=n.index)-o>e&&(i=l>o?l:a,s+="\n"+t.slice(o,i),o=i+1),l=a;return s+="\n",t.length-o>e&&l>o?s+=t.slice(o,l)+"\n"+t.slice(l+1):s+=t.slice(o),s.slice(1)}function cr(t,e,n,i){var r,o,l,a="",s=t.tag;for(r=0,o=n.length;r tag resolver accepts not "'+s+'" style');i=a.represent[s](e,s)}t.dump=i}return!0}return!1}function dr(t,e,n,i,r,o,l){t.tag=null,t.dump=n,ur(t,n,!1)||ur(t,n,!0);var a,s=di.call(t.dump),c=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var u,d,p="[object Object]"===s||"[object Array]"===s;if(p&&(d=-1!==(u=t.duplicates.indexOf(n))),(null!==t.tag&&"?"!==t.tag||d||2!==t.indent&&e>0)&&(r=!1),d&&t.usedDuplicates[u])t.dump="*ref_"+u;else{if(p&&d&&!t.usedDuplicates[u]&&(t.usedDuplicates[u]=!0),"[object Object]"===s)i&&0!==Object.keys(t.dump).length?(!function(t,e,n,i){var r,o,l,a,s,c,u="",d=t.tag,p=Object.keys(n);if(!0===t.sortKeys)p.sort();else if("function"==typeof t.sortKeys)p.sort(t.sortKeys);else if(t.sortKeys)throw new Pe("sortKeys must be a boolean or a function");for(r=0,o=p.length;r1024)&&(t.dump&&mi===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,s&&(c+=Hi(t,e)),dr(t,e+1,a,!0,s)&&(t.dump&&mi===t.dump.charCodeAt(0)?c+=":":c+=": ",u+=c+=t.dump));t.tag=d,t.dump=u||"{}"}(t,e,t.dump,r),d&&(t.dump="&ref_"+u+t.dump)):(!function(t,e,n){var i,r,o,l,a,s="",c=t.tag,u=Object.keys(n);for(i=0,r=u.length;i1024&&(a+="? "),a+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),dr(t,e,l,!1,!1)&&(s+=a+=t.dump));t.tag=c,t.dump="{"+s+"}"}(t,e,t.dump),d&&(t.dump="&ref_"+u+" "+t.dump));else if("[object Array]"===s)i&&0!==t.dump.length?(t.noArrayIndent&&!l&&e>0?cr(t,e-1,t.dump,r):cr(t,e,t.dump,r),d&&(t.dump="&ref_"+u+t.dump)):(!function(t,e,n){var i,r,o,l="",a=t.tag;for(i=0,r=n.length;i",t.dump=a+" "+t.dump)}return!0}function pr(t,e){var n,i,r=[],o=[];for(fr(t,r,o),n=0,i=o.length;nt.push(e)))},r(){e.forEach((e=>t.splice(t.indexOf(e),1)))}}}(t[8][0]),{c(){e=k("dialog"),n=k("div"),vt(i.$$.fragment),o=_(),l=k("div"),a=k("div"),a.textContent="Typings for your programming language:",s=_(),c=k("div"),u=k("label"),d=k("input"),p=A("\n TypeScript"),f=_(),h=k("label"),g=k("input"),$=A("\n JavaScript"),v=_(),b=k("label"),w=k("input"),C=A("\n Python"),S=_(),B=k("div"),vt(O.$$.fragment),E=_(),M=k("div"),vt(L.$$.fragment),F=_(),q=k("div"),vt(D.$$.fragment),z=_(),V=k("div"),vt(P.$$.fragment),I(a,"class","typings-label svelte-r37fg4"),I(d,"type","radio"),I(d,"name","lang"),d.__value="ts",T(d,d.__value),I(g,"type","radio"),I(g,"name","lang"),g.__value="js",T(g,g.__value),I(w,"type","radio"),I(w,"name","lang"),w.__value="py",T(w,w.__value),I(c,"class","languages svelte-r37fg4"),I(l,"class","typings-choice-container svelte-r37fg4"),I(B,"class","svelte-r37fg4"),N(B,"hidden","ts"!==t[1]),I(M,"class","svelte-r37fg4"),N(M,"hidden","js"!==t[1]),I(q,"class","svelte-r37fg4"),N(q,"hidden","py"!==t[1]),I(V,"class","action-buttons svelte-r37fg4"),I(n,"class","dialog-content svelte-r37fg4"),I(e,"class","svelte-r37fg4"),N(e,"light","light"===t[0]),U.p(d,g,w)},m(r,x){y(r,e,x),m(e,n),bt(i,n,null),m(n,o),m(n,l),m(l,a),m(l,s),m(l,c),m(c,u),m(u,d),d.checked=d.__value===t[1],m(u,p),m(c,f),m(c,h),m(h,g),g.checked=g.__value===t[1],m(h,$),m(c,v),m(c,b),m(b,w),w.checked=w.__value===t[1],m(b,C),m(n,S),m(n,B),bt(O,B,null),m(n,E),m(n,M),bt(L,M,null),m(n,F),m(n,q),bt(D,q,null),m(n,z),m(n,V),bt(P,V,null),t[11](e),R=!0,Y||(H=[j(window,"keyup",t[5]),j(d,"change",t[7]),j(g,"change",t[9]),j(w,"change",t[10])],Y=!0)},p(t,[n]){const r={};1&n&&(r.theme=t[0]),8&n&&(r.code=t[3].yaml),i.$set(r),2&n&&(d.checked=d.__value===t[1]),2&n&&(g.checked=g.__value===t[1]),2&n&&(w.checked=w.__value===t[1]);const o={};1&n&&(o.theme=t[0]),8&n&&(o.code=t[3].ts),O.$set(o),(!R||2&n)&&N(B,"hidden","ts"!==t[1]);const l={};1&n&&(l.theme=t[0]),8&n&&(l.code=t[3].js),L.$set(l),(!R||2&n)&&N(M,"hidden","js"!==t[1]);const a={};1&n&&(a.theme=t[0]),8&n&&(a.code=t[3].py),D.$set(a),(!R||2&n)&&N(q,"hidden","py"!==t[1]);const s={};1&n&&(s.theme=t[0]),16384&n&&(s.$$scope={dirty:n,ctx:t}),P.$set(s),(!R||1&n)&&N(e,"light","light"===t[0])},i(t){R||(ut(i.$$.fragment,t),ut(O.$$.fragment,t),ut(L.$$.fragment,t),ut(D.$$.fragment,t),ut(P.$$.fragment,t),R=!0)},o(t){dt(i.$$.fragment,t),dt(O.$$.fragment,t),dt(L.$$.fragment,t),dt(D.$$.fragment,t),dt(P.$$.fragment,t),R=!1},d(n){n&&x(e),yt(i),yt(O),yt(L),yt(D),yt(P),t[11](null),U.r(),Y=!1,r(H)}}}const yr="__settings-typings-language__";function xr(t,e,n){var i;let{theme:r}=e,o=[],l=null,a=null!==(i=sessionStorage.getItem(yr))&&void 0!==i?i:"typescript",s={js:"",py:"",ts:"",yaml:""};function c(){null==l||l.close()}return t.$$set=t=>{"theme"in t&&n(0,r=t.theme)},t.$$.update=()=>{2&t.$$.dirty&&sessionStorage.setItem(yr,a)},[r,a,l,s,c,function(t){"Escape"===t.key&&c()},function(t){o=t,n(3,s={js:Le(o),py:Fe(o),ts:Me(o),yaml:gr(o)}),null==l||l.showModal()},function(){a=this.__value,n(1,a)},[[]],function(){a=this.__value,n(1,a)},function(){a=this.__value,n(1,a)},function(t){H[t?"unshift":"push"]((()=>{l=t,n(2,l)}))}]}class wr extends At{constructor(t){super(),xt(this,t,xr,br,l,{theme:0,show:6},$r)}get theme(){return this.$$.ctx[0]}set theme(t){this.$$set({theme:t}),it()}get show(){return this.$$.ctx[6]}}function kr(e){let n,i;return{c:t,m(t,r){n||(i=j(window,"paste",e[0]),n=!0)},p:t,i:t,o:t,d(t){n=!1,i()}}}function Ar(t){var e=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function l(t){try{s(i.next(t))}catch(t){o(t)}}function a(t){try{s(i.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(l,a)}s((i=i.apply(t,e||[])).next())}))};const n=R(),i=["textBlock","input","inputWithFileBtn","passwordBox","textarea","dropdown","checkbox"];function r(t){return(null==t?void 0:t.body)&&Array.isArray(t.body)&&t.body.every((t=>i.includes(t.type)&&t.attributes))}return[function(t){var i,o,l,a,s,c;return e(this,void 0,void 0,(function*(){const e=t.target,u=e.tagName;if("INPUT"===u||"TEXTAREA"===u||e.isContentEditable)return;let d;if(null===(o=null===(i=t.clipboardData)||void 0===i?void 0:i.files)||void 0===o?void 0:o.length){for(const e of Array.from(null!==(a=null===(l=t.clipboardData)||void 0===l?void 0:l.files)&&void 0!==a?a:[]))if("SettingsTemplate.yaml"===e.name)try{const t=hr(yield e.text());if(r(t)){d=t;break}}catch(t){}}else try{const e=hr(null!==(c=null===(s=t.clipboardData)||void 0===s?void 0:s.getData("text"))&&void 0!==c?c:"{}");r(e)&&(d=e)}catch(t){}if(d){for(const t of d.body)t.id=crypto.randomUUID();n("setData",d.body)}}))}]}kt(wr,{theme:{}},[],["show"],!0);class _r extends At{constructor(t){super(),xt(this,t,Ar,kr,l,{})}}function Cr(t){g(t,"svelte-6h781n",".settings-generator.svelte-6h781n{--component-bg:#1f282d;--error:#910000}.settings-generator.light.svelte-6h781n{--component-bg:#eeeeee;--error:#ff7e7e}.top-buttons.svelte-6h781n{display:flex;justify-content:flex-end;margin-bottom:12px;gap:12px}.no-fields.svelte-6h781n{margin-top:36px;gap:8px;font-weight:bold;font-size:20px;text-align:center;font-family:sans-serif}.components.svelte-6h781n{display:flex;flex-direction:column;gap:8px}.component.svelte-6h781n{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;padding:8px;background-color:var(--component-bg);border:2px solid var(--component-bg);border-radius:8px;transition:background-color 0.15s}.component.error.svelte-6h781n{border-color:var(--error)}.action-buttons.svelte-6h781n{--size:40px;display:grid;align-self:stretch;grid-template-rows:repeat(2, 1fr);gap:4px;min-width:var(--size);min-height:calc(var(--size) * 2)}.action-buttons.svelte-6h781n button{font-size:20px}")}function jr(t,e,n){const i=t.slice();return i[29]=e[n],i[31]=n,i}function Ir(t){let e,n,i,r,o,l,a;return n=new It({props:{theme:t[0],disabled:0===t[5].length,$$slots:{default:[Sr]},$$scope:{ctx:t}}}),n.$on("click",t[13]),r=new It({props:{theme:t[0],$$slots:{default:[Tr]},$$scope:{ctx:t}}}),r.$on("click",t[14]),l=new It({props:{theme:t[0],$$slots:{default:[Br]},$$scope:{ctx:t}}}),l.$on("click",t[15]),{c(){e=k("div"),vt(n.$$.fragment),i=_(),vt(r.$$.fragment),o=_(),vt(l.$$.fragment),I(e,"class","top-buttons svelte-6h781n")},m(t,s){y(t,e,s),bt(n,e,null),m(e,i),bt(r,e,null),m(e,o),bt(l,e,null),a=!0},p(t,e){const i={};1&e[0]&&(i.theme=t[0]),32&e[0]&&(i.disabled=0===t[5].length),2&e[1]&&(i.$$scope={dirty:e,ctx:t}),n.$set(i);const o={};1&e[0]&&(o.theme=t[0]),2&e[1]&&(o.$$scope={dirty:e,ctx:t}),r.$set(o);const a={};1&e[0]&&(a.theme=t[0]),2&e[1]&&(a.$$scope={dirty:e,ctx:t}),l.$set(a)},i(t){a||(ut(n.$$.fragment,t),ut(r.$$.fragment,t),ut(l.$$.fragment,t),a=!0)},o(t){dt(n.$$.fragment,t),dt(r.$$.fragment,t),dt(l.$$.fragment,t),a=!1},d(t){t&&x(e),yt(n),yt(r),yt(l)}}}function Sr(t){let e;return{c(){e=A("❌ Remove all fields")},m(t,n){y(t,e,n)},d(t){t&&x(e)}}}function Tr(t){let e;return{c(){e=A("⚙️ Generate SettingsTemplate.yaml")},m(t,n){y(t,e,n)},d(t){t&&x(e)}}}function Br(t){let e;return{c(){e=A("➕ Add new field")},m(t,n){y(t,e,n)},d(t){t&&x(e)}}}function Or(t){let e,n,i=[],r=new Map,o=ft(t[5]);const l=t=>t[29].id;for(let e=0;e0&&Ir(t);const h=[Nr,Or],g=[];function $(t,e){return 0===t[5].length?0:1}function v(e){t[25](e)}o=$(t),l=g[o]=h[o](t);let b={theme:t[0],editingMode:t[9]};void 0!==t[7]&&(b.data=t[7]),s=new Se({props:b}),H.push((()=>$t(s,"data",v))),t[26](s),s.$on("save",t[18]);let w={theme:t[0]};return d=new wr({props:w}),t[27](d),{c(){vt(e.$$.fragment),n=_(),i=k("div"),f&&f.c(),r=_(),l.c(),a=_(),vt(s.$$.fragment),u=_(),vt(d.$$.fragment),I(i,"class","settings-generator svelte-6h781n"),N(i,"light","light"===t[0])},m(t,l){bt(e,t,l),y(t,n,l),y(t,i,l),f&&f.m(i,null),m(i,r),g[o].m(i,null),y(t,a,l),bt(s,t,l),y(t,u,l),bt(d,t,l),p=!0},p(t,e){t[5].length>0?f?(f.p(t,e),32&e[0]&&ut(f,1)):(f=Ir(t),f.c(),ut(f,1),f.m(i,r)):f&&(st(),dt(f,1,1,(()=>{f=null})),ct());let n=o;o=$(t),o===n?g[o].p(t,e):(st(),dt(g[n],1,1,(()=>{g[n]=null})),ct(),l=g[o],l?l.p(t,e):(l=g[o]=h[o](t),l.c()),ut(l,1),l.m(i,null)),(!p||1&e[0])&&N(i,"light","light"===t[0]);const a={};1&e[0]&&(a.theme=t[0]),512&e[0]&&(a.editingMode=t[9]),!c&&128&e[0]&&(c=!0,a.data=t[7],tt((()=>c=!1))),s.$set(a);const u={};1&e[0]&&(u.theme=t[0]),d.$set(u)},i(t){p||(ut(e.$$.fragment,t),ut(f),ut(l),ut(s.$$.fragment,t),ut(d.$$.fragment,t),p=!0)},o(t){dt(e.$$.fragment,t),dt(f),dt(l),dt(s.$$.fragment,t),dt(d.$$.fragment,t),p=!1},d(r){r&&(x(n),x(i),x(a),x(u)),yt(e,r),f&&f.d(),g[o].d(),t[26](null),yt(s,r),t[27](null),yt(d,r)}}}kt(_r,{},[],[],!0);const Vr="__settings-data__";function Pr(t,e,n){var i=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function l(t){try{s(i.next(t))}catch(t){o(t)}}function a(t){try{s(i.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(l,a)}s((i=i.apply(t,e||[])).next())}))};let r={duration:300,easing:pe},{upButtonText:o="⬆️"}=e,{downButtonText:l="⬇️"}=e,{editButtonText:a="✏️"}=e,{removeButtonText:s="❌"}=e,{theme:c}=e;Gt(c,(t=>n(0,c=t)));let u=null,d={type:"input",attributes:{name:"textInput",label:"Label",description:"Description",defaultValue:"Default value",options:[]}},p=null,f=!1,h=[];try{h=JSON.parse(sessionStorage.getItem(Vr)||"[]")}catch(t){sessionStorage.removeItem(Vr)}function m(t){0!==t&&n(5,[h[t],h[t-1]]=[h[t-1],h[t]],h)}function g(t){t!==h.length-1&&n(5,[h[t],h[t+1]]=[h[t+1],h[t]],h)}function $(t){var e;return i(this,void 0,void 0,(function*(){const i=-1!==t?h[t]:null;n(9,f=-1!==t),n(7,d=i?Object.assign({},i):{type:"input",attributes:{name:"textInput",label:"",description:"",defaultValue:"",options:[]}}),(null===(e=null==d?void 0:d.attributes)||void 0===e?void 0:e.options)?n(7,d.attributes.options=[...d.attributes.options],d):d||n(7,d.attributes.options=[],d),yield Q(),null==u||u.show()}))}function v(t){h.splice(t,1),n(5,h)}function b(t){return h.some((e=>"textBlock"!==t.type&&(e.attributes.name===t.attributes.name&&e.id!==t.id)))}return t.$$set=t=>{"upButtonText"in t&&n(1,o=t.upButtonText),"downButtonText"in t&&n(2,l=t.downButtonText),"editButtonText"in t&&n(3,a=t.editButtonText),"removeButtonText"in t&&n(4,s=t.removeButtonText),"theme"in t&&n(0,c=t.theme)},t.$$.update=()=>{32&t.$$.dirty[0]&&sessionStorage.setItem(Vr,JSON.stringify(h))},[c,o,l,a,s,h,u,d,p,f,r,m,g,function(){confirm("Are you sure you want to remove all fields?")&&n(5,h=[])},function(){h.some(b)?alert("Some fields have the same name. Fix that before continuing."):null==p||p.show(h)},function(){$(-1)},$,v,function(t){const e=t.detail;if(e.id){const t=h.findIndex((t=>t.id===e.id));n(5,h[t]=e,h),n(5,h)}else e.id=crypto.randomUUID(),h.push(e),n(5,h)},function(t){n(5,h=t.detail)},b,t=>m(t),t=>g(t),t=>$(t),t=>v(t),function(t){d=t,n(7,d)},function(t){H[t?"unshift":"push"]((()=>{u=t,n(6,u)}))},function(t){H[t?"unshift":"push"]((()=>{p=t,n(8,p)}))}]}class Rr extends At{constructor(t){super(),xt(this,t,Pr,zr,l,{upButtonText:1,downButtonText:2,editButtonText:3,removeButtonText:4,theme:0},Cr,[-1,-1])}get upButtonText(){return this.$$.ctx[1]}set upButtonText(t){this.$$set({upButtonText:t}),it()}get downButtonText(){return this.$$.ctx[2]}set downButtonText(t){this.$$set({downButtonText:t}),it()}get editButtonText(){return this.$$.ctx[3]}set editButtonText(t){this.$$set({editButtonText:t}),it()}get removeButtonText(){return this.$$.ctx[4]}set removeButtonText(t){this.$$set({removeButtonText:t}),it()}get theme(){return this.$$.ctx[0]}set theme(t){this.$$set({theme:t}),it()}}function Ur(t){g(t,"svelte-11sdfa7",".icon.svelte-11sdfa7{width:32px;aspect-ratio:1}.icon-with-name.svelte-11sdfa7{display:flex;align-items:center;gap:8px}")}function Yr(e){let n,i,r,o,l,a,c,u,d,p,f,h,g,$,v,b,w,C,j=e[0].Name+"",T=e[0].Description+"",B=e[0].Author+"",O=e[0].Version+"";return{c(){n=k("tr"),i=k("td"),r=k("div"),o=k("img"),a=_(),c=k("a"),u=A(j),p=_(),f=k("td"),h=A(T),g=_(),$=k("td"),v=A(B),b=_(),w=k("td"),C=A(O),s(o.src,l=e[0].IcoPath)||I(o,"src",l),I(o,"alt",""),I(o,"class","icon svelte-11sdfa7"),I(c,"href",d=e[0].UrlSourceCode),I(c,"target","_blank"),I(c,"rel","noopener noreferrer"),I(r,"class","icon-with-name svelte-11sdfa7")},m(t,e){y(t,n,e),m(n,i),m(i,r),m(r,o),m(r,a),m(r,c),m(c,u),m(n,p),m(n,f),m(f,h),m(n,g),m(n,$),m($,v),m(n,b),m(n,w),m(w,C)},p(t,[e]){1&e&&!s(o.src,l=t[0].IcoPath)&&I(o,"src",l),1&e&&j!==(j=t[0].Name+"")&&S(u,j),1&e&&d!==(d=t[0].UrlSourceCode)&&I(c,"href",d),1&e&&T!==(T=t[0].Description+"")&&S(h,T),1&e&&B!==(B=t[0].Author+"")&&S(v,B),1&e&&O!==(O=t[0].Version+"")&&S(C,O)},i:t,o:t,d(t){t&&x(n)}}}function Hr(t,e,n){let{plugin:i}=e;return t.$$set=t=>{"plugin"in t&&n(0,i=t.plugin)},[i]}customElements.define("settings-generator",kt(Rr,{upButtonText:{},downButtonText:{},editButtonText:{},removeButtonText:{},theme:{}},[],[],!1));class Wr extends At{constructor(t){super(),xt(this,t,Hr,Yr,l,{plugin:0},Ur)}get plugin(){return this.$$.ctx[0]}set plugin(t){this.$$set({plugin:t}),it()}}function Jr(t){g(t,"svelte-qa1t6z",".loader.svelte-qa1t6z{--color:#000;--color-transparent:#0000;position:relative;width:100px;aspect-ratio:1;background-image:conic-gradient(var(--color-transparent), var(--color));mask:radial-gradient(farthest-side, #0000 85%, #000 85%);border-radius:50%;animation:svelte-qa1t6z-spin-spinner 1s infinite linear}.loader.light.svelte-qa1t6z{--color:#444;--color-transparent:#4440}@keyframes svelte-qa1t6z-spin-spinner{to{transform:rotate(1turn)}}")}function Kr(e){let n;return{c(){n=k("div"),I(n,"class","loader svelte-qa1t6z"),N(n,"light","light"===e[0])},m(t,e){y(t,n,e)},p(t,[e]){1&e&&N(n,"light","light"===t[0])},i:t,o:t,d(t){t&&x(n)}}}function Zr(t,e,n){let{theme:i}=e;return t.$$set=t=>{"theme"in t&&n(0,i=t.theme)},[i]}kt(Wr,{plugin:{}},[],[],!0);class Gr extends At{constructor(t){super(),xt(this,t,Zr,Kr,l,{theme:0},Jr)}get theme(){return this.$$.ctx[0]}set theme(t){this.$$set({theme:t}),it()}}function Qr(t,e,n){const i=t.slice();return i[12]=e[n],i}function Xr(t){let e,n,i,r;return i=new It({props:{theme:t[0],$$slots:{default:[to]},$$scope:{ctx:t}}}),i.$on("click",t[7]),{c(){e=k("p"),n=A("An error occurred while downloading the list of plugins.\n "),vt(i.$$.fragment)},m(t,o){y(t,e,o),m(e,n),bt(i,e,null),r=!0},p(t,e){const n={};1&e&&(n.theme=t[0]),65536&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n)},i(t){r||(ut(i.$$.fragment,t),r=!0)},o(t){dt(i.$$.fragment,t),r=!1},d(t){t&&x(e),yt(i)}}}function to(t){let e;return{c(){e=A("Try again")},m(t,n){y(t,e,n)},d(t){t&&x(e)}}}function eo(t){let e,n,i,r;const o=[io,no],l=[];function a(t,e){return 0===t[1].length?0:1}return e=a(t),n=l[e]=o[e](t),{c(){n.c(),i=C()},m(t,n){l[e].m(t,n),y(t,i,n),r=!0},p(t,r){let s=e;e=a(t),e===s?l[e].p(t,r):(st(),dt(l[s],1,1,(()=>{l[s]=null})),ct(),n=l[e],n?n.p(t,r):(n=l[e]=o[e](t),n.c()),ut(n,1),n.m(i.parentNode,i))},i(t){r||(ut(n),r=!0)},o(t){dt(n),r=!1},d(t){t&&x(i),l[e].d(t)}}}function no(t){let e,n,i,r,o,l,a,s,c,u,d,p,f=[],h=new Map;function g(e){t[9](e)}let $={theme:t[0],placeholder:"Search plugins"};function v(e){t[10](e)}void 0!==t[3]&&($.value=t[3]),n=new Lt({props:$}),H.push((()=>$t(n,"value",g)));let b={theme:t[0],options:t[6]};void 0!==t[2]&&(b.value=t[2]),o=new Ht({props:b}),H.push((()=>$t(o,"value",v)));let w=ft(t[4]);const A=t=>t[12].ID;for(let e=0;eName Description Author Version",u=_(),d=k("tbody");for(let t=0;ti=!1))),n.$set(r);const a={};1&e&&(a.theme=t[0]),!l&&4&e&&(l=!0,a.value=t[2],tt((()=>l=!1))),o.$set(a),16&e&&(w=ft(t[4]),st(),f=gt(f,e,A,1,t,w,h,d,ht,ro,null,Qr),ct())},i(t){if(!p){ut(n.$$.fragment,t),ut(o.$$.fragment,t);for(let t=0;te.parentNode,r.anchor=e,i=!0},p(e,[i]){t=e,r.ctx=t,32&i&&n!==(n=t[5])&&pt(n,r)||function(t,e,n){const i=e.slice(),{resolved:r}=t;t.current===t.then&&(i[t.value]=r),t.current===t.catch&&(i[t.error]=r),t.block.p(i,n)}(r,t,i)},i(t){i||(ut(r.block),i=!0)},o(t){for(let t=0;t<3;t+=1){dt(r.blocks[t])}i=!1},d(t){t&&x(e),r.block.d(t),r.token=null,r=null}}}function ao(t,e,n){let{theme:i}=e;Gt(i,(t=>n(0,i=t)));let r=[];let o,l="default",a="",s=[];function c(){n(5,o=fetch("https://cdn.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json").then((t=>t.json())).then((t=>n(1,r=t.map(((t,e)=>(t.defaultIndex=e,t)))))))}c();let u="";return t.$$set=t=>{"theme"in t&&n(0,i=t.theme)},t.$$.update=()=>{270&t.$$.dirty&&(n(8,u=a.trim().toLowerCase()),n(4,s=r.filter((t=>0===u.length||(t.Name.toLowerCase().includes(u)||t.Description.toLowerCase().includes(u)||t.Author.toLowerCase().includes(u)))).sort(((t,e)=>{var n,i;switch(l){case"nameAsc":return t.Name.localeCompare(e.Name);case"nameDesc":return e.Name.localeCompare(t.Name);case"authorAsc":return t.Author.localeCompare(e.Author);case"authorDesc":return e.Author.localeCompare(t.Author);case"dateAsc":return t.DateAdded.localeCompare(e.DateAdded);case"dateDesc":return e.DateAdded.localeCompare(t.DateAdded);case"updatedAsc":return t.LatestReleaseDate&&e.LatestReleaseDate?null===(n=t.LatestReleaseDate)||void 0===n?void 0:n.localeCompare(e.LatestReleaseDate):1e9;case"updatedDesc":return e.LatestReleaseDate&&t.LatestReleaseDate?null===(i=e.LatestReleaseDate)||void 0===i?void 0:i.localeCompare(t.LatestReleaseDate):1e9;case"default":return t.defaultIndex-e.defaultIndex;default:return 0}}))))},[i,r,l,a,s,o,{default:"Sorting: Default",nameAsc:"Sorting: Name (A-Z)",nameDesc:"Sorting: Name (Z-A)",authorAsc:"Sorting: Author (A-Z)",authorDesc:"Sorting: Author (Z-A)",dateAsc:"Sorting: Date (Oldest first)",dateDesc:"Sorting: Date (Newest first)",updatedAsc:"Sorting: Last update date (Oldest first)",updatedDesc:"Sorting: Last update date (Newest first)"},c,u,function(t){a=t,n(3,a)},function(t){l=t,n(2,l)}]}kt(Gr,{theme:{}},[],[],!0);class so extends At{constructor(t){super(),xt(this,t,ao,lo,l,{theme:0})}get theme(){return this.$$.ctx[0]}set theme(t){this.$$set({theme:t}),it()}}customElements.define("plugin-directory",kt(so,{theme:{}},[],[],!1));export{ue as ComponentDemo,so as PluginDirectory,Rr as SettingsGenerator}; +function qe(t){return null==t}var De={isNothing:qe,isObject:function(t){return"object"==typeof t&&null!==t},toArray:function(t){return Array.isArray(t)?t:qe(t)?[]:[t]},repeat:function(t,e){var n,i="";for(n=0;na&&(e=i-a+(o=" ... ").length),n-i>a&&(n=i+a-(l=" ...").length),{str:o+t.slice(e,n).replace(/\t/g,"→")+l,pos:i-e+o.length}}function Ue(t,e){return De.repeat(" ",e-t.length)+t}var Ye=function(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var n,i=/\r?\n|\r|\0/g,r=[0],o=[],l=-1;n=i.exec(t.buffer);)o.push(n.index),r.push(n.index+n[0].length),t.position<=n.index&&l<0&&(l=r.length-2);l<0&&(l=r.length-1);var a,s,c="",u=Math.min(t.line+e.linesAfter,o.length).toString().length,d=e.maxLength-(e.indent+u+3);for(a=1;a<=e.linesBefore&&!(l-a<0);a++)s=Re(t.buffer,r[l-a],o[l-a],t.position-(r[l]-r[l-a]),d),c=De.repeat(" ",e.indent)+Ue((t.line-a+1).toString(),u)+" | "+s.str+"\n"+c;for(s=Re(t.buffer,r[l],o[l],t.position,d),c+=De.repeat(" ",e.indent)+Ue((t.line+1).toString(),u)+" | "+s.str+"\n",c+=De.repeat("-",e.indent+u+3+s.pos)+"^\n",a=1;a<=e.linesAfter&&!(l+a>=o.length);a++)s=Re(t.buffer,r[l+a],o[l+a],t.position-(r[l]-r[l+a]),d),c+=De.repeat(" ",e.indent)+Ue((t.line+a+1).toString(),u)+" | "+s.str+"\n";return c.replace(/\n$/,"")},He=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],We=["scalar","sequence","mapping"];var Je=function(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===He.indexOf(e))throw new Pe('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=function(t){var e={};return null!==t&&Object.keys(t).forEach((function(n){t[n].forEach((function(t){e[String(t)]=n}))})),e}(e.styleAliases||null),-1===We.indexOf(this.kind))throw new Pe('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')};function Ke(t,e){var n=[];return t[e].forEach((function(t){var e=n.length;n.forEach((function(n,i){n.tag===t.tag&&n.kind===t.kind&&n.multi===t.multi&&(e=i)})),n[e]=t})),n}function Ze(t){return this.extend(t)}Ze.prototype.extend=function(t){var e=[],n=[];if(t instanceof Je)n.push(t);else if(Array.isArray(t))n=n.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new Pe("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit))}e.forEach((function(t){if(!(t instanceof Je))throw new Pe("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new Pe("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new Pe("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(t){if(!(t instanceof Je))throw new Pe("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(Ze.prototype);return i.implicit=(this.implicit||[]).concat(e),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=Ke(i,"implicit"),i.compiledExplicit=Ke(i,"explicit"),i.compiledTypeMap=function(){var t,e,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(n.multi[t.kind].push(t),n.multi.fallback.push(t)):n[t.kind][t.tag]=n.fallback[t.tag]=t}for(t=0,e=arguments.length;t=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),rn=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var on=/^[-+]?[0-9]+e/;var ln=new Je("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return null!==t&&!(!rn.test(t)||"_"===t[t.length-1])},construct:function(t){var e,n;return n="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:n*parseFloat(e,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||De.isNegativeZero(t))},represent:function(t,e){var n;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(De.isNegativeZero(t))return"-0.0";return n=t.toString(10),on.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"}),an=Ge.extend({implicit:[Qe,Xe,nn,ln]}),sn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),cn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var un=new Je("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return null!==t&&(null!==sn.exec(t)||null!==cn.exec(t))},construct:function(t){var e,n,i,r,o,l,a,s,c=0,u=null;if(null===(e=sn.exec(t))&&(e=cn.exec(t)),null===e)throw new Error("Date resolve error");if(n=+e[1],i=+e[2]-1,r=+e[3],!e[4])return new Date(Date.UTC(n,i,r));if(o=+e[4],l=+e[5],a=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(u=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(u=-u)),s=new Date(Date.UTC(n,i,r,o,l,a,c)),u&&s.setTime(s.getTime()-u),s},instanceOf:Date,represent:function(t){return t.toISOString()}});var dn=new Je("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}}),pn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var fn=new Je("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,n,i=0,r=t.length,o=pn;for(n=0;n64)){if(e<0)return!1;i+=6}return i%8==0},construct:function(t){var e,n,i=t.replace(/[\r\n=]/g,""),r=i.length,o=pn,l=0,a=[];for(e=0;e>16&255),a.push(l>>8&255),a.push(255&l)),l=l<<6|o.indexOf(i.charAt(e));return 0===(n=r%4*6)?(a.push(l>>16&255),a.push(l>>8&255),a.push(255&l)):18===n?(a.push(l>>10&255),a.push(l>>2&255)):12===n&&a.push(l>>4&255),new Uint8Array(a)},predicate:function(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)},represent:function(t){var e,n,i="",r=0,o=t.length,l=pn;for(e=0;e>18&63],i+=l[r>>12&63],i+=l[r>>6&63],i+=l[63&r]),r=(r<<8)+t[e];return 0===(n=o%3)?(i+=l[r>>18&63],i+=l[r>>12&63],i+=l[r>>6&63],i+=l[63&r]):2===n?(i+=l[r>>10&63],i+=l[r>>4&63],i+=l[r<<2&63],i+=l[64]):1===n&&(i+=l[r>>2&63],i+=l[r<<4&63],i+=l[64],i+=l[64]),i}}),hn=Object.prototype.hasOwnProperty,mn=Object.prototype.toString;var gn=new Je("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,n,i,r,o,l=[],a=t;for(e=0,n=a.length;e>10),56320+(t-65536&1023))}for(var Rn=new Array(256),Un=new Array(256),Yn=0;Yn<256;Yn++)Rn[Yn]=Vn(Yn)?1:0,Un[Yn]=Vn(Yn);function Hn(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||xn,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Wn(t,e){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=Ye(n),new Pe(e,n)}function Jn(t,e){throw Wn(t,e)}function Kn(t,e){t.onWarning&&t.onWarning.call(null,Wn(t,e))}var Zn={YAML:function(t,e,n){var i,r,o;null!==t.version&&Jn(t,"duplication of %YAML directive"),1!==n.length&&Jn(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&Jn(t,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&Jn(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=o<2,1!==o&&2!==o&&Kn(t,"unsupported YAML version of the document")},TAG:function(t,e,n){var i,r;2!==n.length&&Jn(t,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],Nn.test(i)||Jn(t,"ill-formed tag handle (first argument) of the TAG directive"),wn.call(t.tagMap,i)&&Jn(t,'there is a previously declared suffix for "'+i+'" tag handle'),En.test(r)||Jn(t,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch(e){Jn(t,"tag prefix is malformed: "+r)}t.tagMap[i]=r}};function Gn(t,e,n,i){var r,o,l,a;if(e1&&(t.result+=De.repeat("\n",e-1))}function ri(t,e){var n,i,r=t.tag,o=t.anchor,l=[],a=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=l),i=t.input.charCodeAt(t.position);0!==i&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,Jn(t,"tab characters must not be used in indentation")),45===i)&&qn(t.input.charCodeAt(t.position+1));)if(a=!0,t.position++,ei(t,!0,-1)&&t.lineIndent<=e)l.push(null),i=t.input.charCodeAt(t.position);else if(n=t.line,ai(t,e,_n,!1,!0),l.push(t.result),ei(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&0!==i)Jn(t,"bad indentation of a sequence entry");else if(t.lineIndente?h=1:t.lineIndent===e?h=0:t.lineIndente?h=1:t.lineIndent===e?h=0:t.lineIndente)&&($&&(l=t.line,a=t.lineStart,s=t.position),ai(t,e,Cn,!0,r)&&($?m=t.result:g=t.result),$||(Xn(t,p,f,h,m,g,l,a,s),h=m=g=null),ei(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&0!==c)Jn(t,"bad indentation of a mapping entry");else if(t.lineIndent=0))break;0===r?Jn(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?Jn(t,"repeat of an indentation width identifier"):(u=e+r-1,c=!0)}if(Fn(o)){do{o=t.input.charCodeAt(++t.position)}while(Fn(o));if(35===o)do{o=t.input.charCodeAt(++t.position)}while(!Ln(o)&&0!==o)}for(;0!==o;){for(ti(t),t.lineIndent=0,o=t.input.charCodeAt(t.position);(!c||t.lineIndentu&&(u=t.lineIndent),Ln(o))d++;else{if(t.lineIndent0){for(r=l,o=0;r>0;r--)(l=zn(a=t.input.charCodeAt(++t.position)))>=0?o=(o<<4)+l:Jn(t,"expected hexadecimal character");t.result+=Pn(o),t.position++}else Jn(t,"unknown escape sequence");n=i=t.position}else Ln(a)?(Gn(t,n,i,!0),ii(t,ei(t,!1,e)),n=i=t.position):t.position===t.lineStart&&ni(t)?Jn(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}Jn(t,"unexpected end of the stream within a double quoted scalar")}(t,p)?g=!0:!function(t){var e,n,i;if(42!==(i=t.input.charCodeAt(t.position)))return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!qn(i)&&!Dn(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&Jn(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),wn.call(t.anchorMap,n)||Jn(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],ei(t,!0,-1),!0}(t)?function(t,e,n){var i,r,o,l,a,s,c,u,d=t.kind,p=t.result;if(qn(u=t.input.charCodeAt(t.position))||Dn(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(qn(i=t.input.charCodeAt(t.position+1))||n&&Dn(i)))return!1;for(t.kind="scalar",t.result="",r=o=t.position,l=!1;0!==u;){if(58===u){if(qn(i=t.input.charCodeAt(t.position+1))||n&&Dn(i))break}else if(35===u){if(qn(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&ni(t)||n&&Dn(u))break;if(Ln(u)){if(a=t.line,s=t.lineStart,c=t.lineIndent,ei(t,!1,-1),t.lineIndent>=e){l=!0,u=t.input.charCodeAt(t.position);continue}t.position=o,t.line=a,t.lineStart=s,t.lineIndent=c;break}}l&&(Gn(t,r,o,!1),ii(t,t.line-a),r=o=t.position,l=!1),Fn(u)||(o=t.position+1),u=t.input.charCodeAt(++t.position)}return Gn(t,r,o,!1),!!t.result||(t.kind=d,t.result=p,!1)}(t,p,kn===n)&&(g=!0,null===t.tag&&(t.tag="?")):(g=!0,null===t.tag&&null===t.anchor||Jn(t,"alias node should not have any properties")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===h&&(g=a&&ri(t,f))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&Jn(t,'unacceptable node kind for ! tag; it should be "scalar", not "'+t.kind+'"'),s=0,c=t.implicitTypes.length;s"),null!==t.result&&d.kind!==t.kind&&Jn(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result,t.tag)?(t.result=d.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Jn(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||g}function si(t){var e,n,i,r,o=t.position,l=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(r=t.input.charCodeAt(t.position))&&(ei(t,!0,-1),r=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==r));){for(l=!0,r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!qn(r);)r=t.input.charCodeAt(++t.position);for(i=[],(n=t.input.slice(e,t.position)).length<1&&Jn(t,"directive name must not be less than one character in length");0!==r;){for(;Fn(r);)r=t.input.charCodeAt(++t.position);if(35===r){do{r=t.input.charCodeAt(++t.position)}while(0!==r&&!Ln(r));break}if(Ln(r))break;for(e=t.position;0!==r&&!qn(r);)r=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==r&&ti(t),wn.call(Zn,n)?Zn[n](t,n,i):Kn(t,'unknown document directive "'+n+'"')}ei(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,ei(t,!0,-1)):l&&Jn(t,"directives end mark is expected"),ai(t,t.lineIndent-1,Cn,!1,!0),ei(t,!0,-1),t.checkLineBreaks&&Bn.test(t.input.slice(o,t.position))&&Kn(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&ni(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,ei(t,!0,-1)):t.position=55296&&i<=56319&&e+1=56320&&n<=57343?1024*(i-55296)+n-56320+65536:i}function Qi(t){return/^\n* /.test(t)}var Xi=1,tr=2,er=3,nr=4,ir=5;function rr(t,e,n,i,r,o,l,a){var s,c,u=0,d=null,p=!1,f=!1,h=-1!==i,m=-1,g=Ji(c=Gi(t,0))&&c!==fi&&!Wi(c)&&c!==Ci&&c!==Ti&&c!==ji&&c!==_i&&c!==Oi&&c!==Ni&&c!==Mi&&c!==Fi&&c!==yi&&c!==wi&&c!==Ai&&c!==vi&&c!==Li&&c!==Ii&&c!==Si&&c!==ki&&c!==bi&&c!==xi&&c!==Bi&&c!==Ei&&function(t){return!Wi(t)&&t!==ji}(Gi(t,t.length-1));if(e||l)for(s=0;s=65536?s+=2:s++){if(!Ji(u=Gi(t,s)))return ir;g=g&&Zi(u,d,a),d=u}else{for(s=0;s=65536?s+=2:s++){if((u=Gi(t,s))===mi)p=!0,h&&(f=f||s-m-1>i&&" "!==t[m+1],m=s);else if(!Ji(u))return ir;g=g&&Zi(u,d,a),d=u}f=f||h&&s-m-1>i&&" "!==t[m+1]}return p||f?n>9&&Qi(t)?ir:l?o===Ri?ir:tr:f?nr:er:!g||l||r(t)?o===Ri?ir:tr:Xi}function or(t,e,n,i,r){t.dump=function(){if(0===e.length)return t.quotingType===Ri?'""':"''";if(!t.noCompatMode&&(-1!==Di.indexOf(e)||zi.test(e)))return t.quotingType===Ri?'"'+e+'"':"'"+e+"'";var o=t.indent*Math.max(1,n),l=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),a=i||t.flowLevel>-1&&n>=t.flowLevel;switch(rr(e,a,t.indent,l,(function(e){return function(t,e){var n,i;for(n=0,i=t.implicitTypes.length;n"+lr(e,t.indent)+ar(Yi(function(t,e){var n,i,r=/(\n+)([^\n]*)/g,o=(a=t.indexOf("\n"),a=-1!==a?a:t.length,r.lastIndex=a,sr(t.slice(0,a),e)),l="\n"===t[0]||" "===t[0];var a;for(;i=r.exec(t);){var s=i[1],c=i[2];n=" "===c[0],o+=s+(l||n||""===c?"":"\n")+sr(c,e),l=n}return o}(e,l),o));case ir:return'"'+function(t){for(var e,n="",i=0,r=0;r=65536?r+=2:r++)i=Gi(t,r),!(e=qi[i])&&Ji(i)?(n+=t[r],i>=65536&&(n+=t[r+1])):n+=e||Vi(i);return n}(e)+'"';default:throw new Pe("impossible error: invalid scalar style")}}()}function lr(t,e){var n=Qi(t)?String(e):"",i="\n"===t[t.length-1];return n+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function ar(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function sr(t,e){if(""===t||" "===t[0])return t;for(var n,i,r=/ [^ ]/g,o=0,l=0,a=0,s="";n=r.exec(t);)(a=n.index)-o>e&&(i=l>o?l:a,s+="\n"+t.slice(o,i),o=i+1),l=a;return s+="\n",t.length-o>e&&l>o?s+=t.slice(o,l)+"\n"+t.slice(l+1):s+=t.slice(o),s.slice(1)}function cr(t,e,n,i){var r,o,l,a="",s=t.tag;for(r=0,o=n.length;r tag resolver accepts not "'+s+'" style');i=a.represent[s](e,s)}t.dump=i}return!0}return!1}function dr(t,e,n,i,r,o,l){t.tag=null,t.dump=n,ur(t,n,!1)||ur(t,n,!0);var a,s=di.call(t.dump),c=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var u,d,p="[object Object]"===s||"[object Array]"===s;if(p&&(d=-1!==(u=t.duplicates.indexOf(n))),(null!==t.tag&&"?"!==t.tag||d||2!==t.indent&&e>0)&&(r=!1),d&&t.usedDuplicates[u])t.dump="*ref_"+u;else{if(p&&d&&!t.usedDuplicates[u]&&(t.usedDuplicates[u]=!0),"[object Object]"===s)i&&0!==Object.keys(t.dump).length?(!function(t,e,n,i){var r,o,l,a,s,c,u="",d=t.tag,p=Object.keys(n);if(!0===t.sortKeys)p.sort();else if("function"==typeof t.sortKeys)p.sort(t.sortKeys);else if(t.sortKeys)throw new Pe("sortKeys must be a boolean or a function");for(r=0,o=p.length;r1024)&&(t.dump&&mi===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,s&&(c+=Hi(t,e)),dr(t,e+1,a,!0,s)&&(t.dump&&mi===t.dump.charCodeAt(0)?c+=":":c+=": ",u+=c+=t.dump));t.tag=d,t.dump=u||"{}"}(t,e,t.dump,r),d&&(t.dump="&ref_"+u+t.dump)):(!function(t,e,n){var i,r,o,l,a,s="",c=t.tag,u=Object.keys(n);for(i=0,r=u.length;i1024&&(a+="? "),a+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),dr(t,e,l,!1,!1)&&(s+=a+=t.dump));t.tag=c,t.dump="{"+s+"}"}(t,e,t.dump),d&&(t.dump="&ref_"+u+" "+t.dump));else if("[object Array]"===s)i&&0!==t.dump.length?(t.noArrayIndent&&!l&&e>0?cr(t,e-1,t.dump,r):cr(t,e,t.dump,r),d&&(t.dump="&ref_"+u+t.dump)):(!function(t,e,n){var i,r,o,l="",a=t.tag;for(i=0,r=n.length;i",t.dump=a+" "+t.dump)}return!0}function pr(t,e){var n,i,r=[],o=[];for(fr(t,r,o),n=0,i=o.length;nt.push(e)))},r(){e.forEach((e=>t.splice(t.indexOf(e),1)))}}}(t[8][0]),{c(){e=k("dialog"),n=k("div"),vt(i.$$.fragment),o=_(),l=k("div"),a=k("div"),a.textContent="Typings for your programming language:",s=_(),c=k("div"),u=k("label"),d=k("input"),p=A("\n TypeScript"),f=_(),h=k("label"),g=k("input"),$=A("\n JavaScript"),v=_(),b=k("label"),w=k("input"),C=A("\n Python"),S=_(),B=k("div"),vt(O.$$.fragment),E=_(),M=k("div"),vt(L.$$.fragment),F=_(),q=k("div"),vt(D.$$.fragment),z=_(),V=k("div"),vt(P.$$.fragment),I(a,"class","typings-label svelte-r37fg4"),I(d,"type","radio"),I(d,"name","lang"),d.__value="ts",T(d,d.__value),I(g,"type","radio"),I(g,"name","lang"),g.__value="js",T(g,g.__value),I(w,"type","radio"),I(w,"name","lang"),w.__value="py",T(w,w.__value),I(c,"class","languages svelte-r37fg4"),I(l,"class","typings-choice-container svelte-r37fg4"),I(B,"class","svelte-r37fg4"),N(B,"hidden","ts"!==t[1]),I(M,"class","svelte-r37fg4"),N(M,"hidden","js"!==t[1]),I(q,"class","svelte-r37fg4"),N(q,"hidden","py"!==t[1]),I(V,"class","action-buttons svelte-r37fg4"),I(n,"class","dialog-content svelte-r37fg4"),I(e,"class","svelte-r37fg4"),N(e,"light","light"===t[0]),U.p(d,g,w)},m(r,x){y(r,e,x),m(e,n),bt(i,n,null),m(n,o),m(n,l),m(l,a),m(l,s),m(l,c),m(c,u),m(u,d),d.checked=d.__value===t[1],m(u,p),m(c,f),m(c,h),m(h,g),g.checked=g.__value===t[1],m(h,$),m(c,v),m(c,b),m(b,w),w.checked=w.__value===t[1],m(b,C),m(n,S),m(n,B),bt(O,B,null),m(n,E),m(n,M),bt(L,M,null),m(n,F),m(n,q),bt(D,q,null),m(n,z),m(n,V),bt(P,V,null),t[11](e),R=!0,Y||(H=[j(window,"keyup",t[5]),j(d,"change",t[7]),j(g,"change",t[9]),j(w,"change",t[10])],Y=!0)},p(t,[n]){const r={};1&n&&(r.theme=t[0]),8&n&&(r.code=t[3].yaml),i.$set(r),2&n&&(d.checked=d.__value===t[1]),2&n&&(g.checked=g.__value===t[1]),2&n&&(w.checked=w.__value===t[1]);const o={};1&n&&(o.theme=t[0]),8&n&&(o.code=t[3].ts),O.$set(o),(!R||2&n)&&N(B,"hidden","ts"!==t[1]);const l={};1&n&&(l.theme=t[0]),8&n&&(l.code=t[3].js),L.$set(l),(!R||2&n)&&N(M,"hidden","js"!==t[1]);const a={};1&n&&(a.theme=t[0]),8&n&&(a.code=t[3].py),D.$set(a),(!R||2&n)&&N(q,"hidden","py"!==t[1]);const s={};1&n&&(s.theme=t[0]),16384&n&&(s.$$scope={dirty:n,ctx:t}),P.$set(s),(!R||1&n)&&N(e,"light","light"===t[0])},i(t){R||(ut(i.$$.fragment,t),ut(O.$$.fragment,t),ut(L.$$.fragment,t),ut(D.$$.fragment,t),ut(P.$$.fragment,t),R=!0)},o(t){dt(i.$$.fragment,t),dt(O.$$.fragment,t),dt(L.$$.fragment,t),dt(D.$$.fragment,t),dt(P.$$.fragment,t),R=!1},d(n){n&&x(e),yt(i),yt(O),yt(L),yt(D),yt(P),t[11](null),U.r(),Y=!1,r(H)}}}const yr="__settings-typings-language__";function xr(t,e,n){var i;let{theme:r}=e,o=[],l=null,a=null!==(i=sessionStorage.getItem(yr))&&void 0!==i?i:"typescript",s={js:"",py:"",ts:"",yaml:""};function c(){null==l||l.close()}return t.$$set=t=>{"theme"in t&&n(0,r=t.theme)},t.$$.update=()=>{2&t.$$.dirty&&sessionStorage.setItem(yr,a)},[r,a,l,s,c,function(t){"Escape"===t.key&&c()},function(t){o=t,n(3,s={js:Le(o),py:Fe(o),ts:Me(o),yaml:gr(o)}),null==l||l.showModal()},function(){a=this.__value,n(1,a)},[[]],function(){a=this.__value,n(1,a)},function(){a=this.__value,n(1,a)},function(t){H[t?"unshift":"push"]((()=>{l=t,n(2,l)}))}]}class wr extends At{constructor(t){super(),xt(this,t,xr,br,l,{theme:0,show:6},$r)}get theme(){return this.$$.ctx[0]}set theme(t){this.$$set({theme:t}),it()}get show(){return this.$$.ctx[6]}}function kr(e){let n,i;return{c:t,m(t,r){n||(i=j(window,"paste",e[0]),n=!0)},p:t,i:t,o:t,d(t){n=!1,i()}}}function Ar(t){var e=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function l(t){try{s(i.next(t))}catch(t){o(t)}}function a(t){try{s(i.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(l,a)}s((i=i.apply(t,e||[])).next())}))};const n=R(),i=["textBlock","input","inputWithFileBtn","passwordBox","textarea","dropdown","checkbox"];function r(t){return(null==t?void 0:t.body)&&Array.isArray(t.body)&&t.body.every((t=>i.includes(t.type)&&t.attributes))}return[function(t){var i,o,l,a,s,c;return e(this,void 0,void 0,(function*(){const e=t.target,u=e.tagName;if("INPUT"===u||"TEXTAREA"===u||e.isContentEditable)return;let d;if(null===(o=null===(i=t.clipboardData)||void 0===i?void 0:i.files)||void 0===o?void 0:o.length){for(const e of Array.from(null!==(a=null===(l=t.clipboardData)||void 0===l?void 0:l.files)&&void 0!==a?a:[]))if("SettingsTemplate.yaml"===e.name)try{const t=hr(yield e.text());if(r(t)){d=t;break}}catch(t){}}else try{const e=hr(null!==(c=null===(s=t.clipboardData)||void 0===s?void 0:s.getData("text"))&&void 0!==c?c:"{}");r(e)&&(d=e)}catch(t){}if(d){for(const t of d.body)t.id=crypto.randomUUID();n("setData",d.body)}}))}]}kt(wr,{theme:{}},[],["show"],!0);class _r extends At{constructor(t){super(),xt(this,t,Ar,kr,l,{})}}function Cr(t){g(t,"svelte-6h781n",".settings-generator.svelte-6h781n{--component-bg:#1f282d;--error:#910000}.settings-generator.light.svelte-6h781n{--component-bg:#eeeeee;--error:#ff7e7e}.top-buttons.svelte-6h781n{display:flex;justify-content:flex-end;margin-bottom:12px;gap:12px}.no-fields.svelte-6h781n{margin-top:36px;gap:8px;font-weight:bold;font-size:20px;text-align:center;font-family:sans-serif}.components.svelte-6h781n{display:flex;flex-direction:column;gap:8px}.component.svelte-6h781n{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;padding:8px;background-color:var(--component-bg);border:2px solid var(--component-bg);border-radius:8px;transition:background-color 0.15s}.component.error.svelte-6h781n{border-color:var(--error)}.action-buttons.svelte-6h781n{--size:40px;display:grid;align-self:stretch;grid-template-rows:repeat(2, 1fr);gap:4px;min-width:var(--size);min-height:calc(var(--size) * 2)}.action-buttons.svelte-6h781n button{font-size:20px}")}function jr(t,e,n){const i=t.slice();return i[29]=e[n],i[31]=n,i}function Ir(t){let e,n,i,r,o,l,a;return n=new It({props:{theme:t[0],disabled:0===t[5].length,$$slots:{default:[Sr]},$$scope:{ctx:t}}}),n.$on("click",t[13]),r=new It({props:{theme:t[0],$$slots:{default:[Tr]},$$scope:{ctx:t}}}),r.$on("click",t[14]),l=new It({props:{theme:t[0],$$slots:{default:[Br]},$$scope:{ctx:t}}}),l.$on("click",t[15]),{c(){e=k("div"),vt(n.$$.fragment),i=_(),vt(r.$$.fragment),o=_(),vt(l.$$.fragment),I(e,"class","top-buttons svelte-6h781n")},m(t,s){y(t,e,s),bt(n,e,null),m(e,i),bt(r,e,null),m(e,o),bt(l,e,null),a=!0},p(t,e){const i={};1&e[0]&&(i.theme=t[0]),32&e[0]&&(i.disabled=0===t[5].length),2&e[1]&&(i.$$scope={dirty:e,ctx:t}),n.$set(i);const o={};1&e[0]&&(o.theme=t[0]),2&e[1]&&(o.$$scope={dirty:e,ctx:t}),r.$set(o);const a={};1&e[0]&&(a.theme=t[0]),2&e[1]&&(a.$$scope={dirty:e,ctx:t}),l.$set(a)},i(t){a||(ut(n.$$.fragment,t),ut(r.$$.fragment,t),ut(l.$$.fragment,t),a=!0)},o(t){dt(n.$$.fragment,t),dt(r.$$.fragment,t),dt(l.$$.fragment,t),a=!1},d(t){t&&x(e),yt(n),yt(r),yt(l)}}}function Sr(t){let e;return{c(){e=A("❌ Remove all fields")},m(t,n){y(t,e,n)},d(t){t&&x(e)}}}function Tr(t){let e;return{c(){e=A("⚙️ Generate SettingsTemplate.yaml")},m(t,n){y(t,e,n)},d(t){t&&x(e)}}}function Br(t){let e;return{c(){e=A("➕ Add new field")},m(t,n){y(t,e,n)},d(t){t&&x(e)}}}function Or(t){let e,n,i=[],r=new Map,o=ft(t[5]);const l=t=>t[29].id;for(let e=0;e0&&Ir(t);const h=[Nr,Or],g=[];function $(t,e){return 0===t[5].length?0:1}function v(e){t[25](e)}o=$(t),l=g[o]=h[o](t);let b={theme:t[0],editingMode:t[9]};void 0!==t[7]&&(b.data=t[7]),s=new Se({props:b}),H.push((()=>$t(s,"data",v))),t[26](s),s.$on("save",t[18]);let w={theme:t[0]};return d=new wr({props:w}),t[27](d),{c(){vt(e.$$.fragment),n=_(),i=k("div"),f&&f.c(),r=_(),l.c(),a=_(),vt(s.$$.fragment),u=_(),vt(d.$$.fragment),I(i,"class","settings-generator svelte-6h781n"),N(i,"light","light"===t[0])},m(t,l){bt(e,t,l),y(t,n,l),y(t,i,l),f&&f.m(i,null),m(i,r),g[o].m(i,null),y(t,a,l),bt(s,t,l),y(t,u,l),bt(d,t,l),p=!0},p(t,e){t[5].length>0?f?(f.p(t,e),32&e[0]&&ut(f,1)):(f=Ir(t),f.c(),ut(f,1),f.m(i,r)):f&&(st(),dt(f,1,1,(()=>{f=null})),ct());let n=o;o=$(t),o===n?g[o].p(t,e):(st(),dt(g[n],1,1,(()=>{g[n]=null})),ct(),l=g[o],l?l.p(t,e):(l=g[o]=h[o](t),l.c()),ut(l,1),l.m(i,null)),(!p||1&e[0])&&N(i,"light","light"===t[0]);const a={};1&e[0]&&(a.theme=t[0]),512&e[0]&&(a.editingMode=t[9]),!c&&128&e[0]&&(c=!0,a.data=t[7],tt((()=>c=!1))),s.$set(a);const u={};1&e[0]&&(u.theme=t[0]),d.$set(u)},i(t){p||(ut(e.$$.fragment,t),ut(f),ut(l),ut(s.$$.fragment,t),ut(d.$$.fragment,t),p=!0)},o(t){dt(e.$$.fragment,t),dt(f),dt(l),dt(s.$$.fragment,t),dt(d.$$.fragment,t),p=!1},d(r){r&&(x(n),x(i),x(a),x(u)),yt(e,r),f&&f.d(),g[o].d(),t[26](null),yt(s,r),t[27](null),yt(d,r)}}}kt(_r,{},[],[],!0);const Vr="__settings-data__";function Pr(t,e,n){var i=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function l(t){try{s(i.next(t))}catch(t){o(t)}}function a(t){try{s(i.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(l,a)}s((i=i.apply(t,e||[])).next())}))};let r={duration:300,easing:pe},{upButtonText:o="⬆️"}=e,{downButtonText:l="⬇️"}=e,{editButtonText:a="✏️"}=e,{removeButtonText:s="❌"}=e,{theme:c}=e;Gt(c,(t=>n(0,c=t)));let u=null,d={type:"input",attributes:{name:"textInput",label:"Label",description:"Description",defaultValue:"Default value",options:[]}},p=null,f=!1,h=[];try{h=JSON.parse(sessionStorage.getItem(Vr)||"[]")}catch(t){sessionStorage.removeItem(Vr)}function m(t){0!==t&&n(5,[h[t],h[t-1]]=[h[t-1],h[t]],h)}function g(t){t!==h.length-1&&n(5,[h[t],h[t+1]]=[h[t+1],h[t]],h)}function $(t){var e;return i(this,void 0,void 0,(function*(){const i=-1!==t?h[t]:null;n(9,f=-1!==t),n(7,d=i?Object.assign({},i):{type:"input",attributes:{name:"textInput",label:"",description:"",defaultValue:"",options:[]}}),(null===(e=null==d?void 0:d.attributes)||void 0===e?void 0:e.options)?n(7,d.attributes.options=[...d.attributes.options],d):d||n(7,d.attributes.options=[],d),yield Q(),null==u||u.show()}))}function v(t){h.splice(t,1),n(5,h)}function b(t){return h.some((e=>"textBlock"!==t.type&&(e.attributes.name===t.attributes.name&&e.id!==t.id)))}return t.$$set=t=>{"upButtonText"in t&&n(1,o=t.upButtonText),"downButtonText"in t&&n(2,l=t.downButtonText),"editButtonText"in t&&n(3,a=t.editButtonText),"removeButtonText"in t&&n(4,s=t.removeButtonText),"theme"in t&&n(0,c=t.theme)},t.$$.update=()=>{32&t.$$.dirty[0]&&sessionStorage.setItem(Vr,JSON.stringify(h))},[c,o,l,a,s,h,u,d,p,f,r,m,g,function(){confirm("Are you sure you want to remove all fields?")&&n(5,h=[])},function(){h.some(b)?alert("Some fields have the same name. Fix that before continuing."):null==p||p.show(h)},function(){$(-1)},$,v,function(t){const e=t.detail;if(e.id){const t=h.findIndex((t=>t.id===e.id));n(5,h[t]=e,h),n(5,h)}else e.id=crypto.randomUUID(),h.push(e),n(5,h)},function(t){n(5,h=t.detail)},b,t=>m(t),t=>g(t),t=>$(t),t=>v(t),function(t){d=t,n(7,d)},function(t){H[t?"unshift":"push"]((()=>{u=t,n(6,u)}))},function(t){H[t?"unshift":"push"]((()=>{p=t,n(8,p)}))}]}class Rr extends At{constructor(t){super(),xt(this,t,Pr,zr,l,{upButtonText:1,downButtonText:2,editButtonText:3,removeButtonText:4,theme:0},Cr,[-1,-1])}get upButtonText(){return this.$$.ctx[1]}set upButtonText(t){this.$$set({upButtonText:t}),it()}get downButtonText(){return this.$$.ctx[2]}set downButtonText(t){this.$$set({downButtonText:t}),it()}get editButtonText(){return this.$$.ctx[3]}set editButtonText(t){this.$$set({editButtonText:t}),it()}get removeButtonText(){return this.$$.ctx[4]}set removeButtonText(t){this.$$set({removeButtonText:t}),it()}get theme(){return this.$$.ctx[0]}set theme(t){this.$$set({theme:t}),it()}}function Ur(t){g(t,"svelte-11sdfa7",".icon.svelte-11sdfa7{width:32px;aspect-ratio:1}.icon-with-name.svelte-11sdfa7{display:flex;align-items:center;gap:8px}")}function Yr(e){let n,i,r,o,l,a,c,u,d,p,f,h,g,$,v,b,w,C,j=e[0].Name+"",T=(e[0].Description??"")+"",B=(e[0].Author??"")+"",O=(e[0].Version??"")+"";return{c(){n=k("tr"),i=k("td"),r=k("div"),o=k("img"),a=_(),c=k("a"),u=A(j),p=_(),f=k("td"),h=A(T),g=_(),$=k("td"),v=A(B),b=_(),w=k("td"),C=A(O),s(o.src,l=e[0].IcoPath)||I(o,"src",l),I(o,"alt",""),I(o,"class","icon svelte-11sdfa7"),I(c,"href",d=e[0].UrlSourceCode),I(c,"target","_blank"),I(c,"rel","noopener noreferrer"),I(r,"class","icon-with-name svelte-11sdfa7")},m(t,e){y(t,n,e),m(n,i),m(i,r),m(r,o),m(r,a),m(r,c),m(c,u),m(n,p),m(n,f),m(f,h),m(n,g),m(n,$),m($,v),m(n,b),m(n,w),m(w,C)},p(t,[e]){1&e&&!s(o.src,l=t[0].IcoPath)&&I(o,"src",l),1&e&&j!==(j=t[0].Name+"")&&S(u,j),1&e&&d!==(d=t[0].UrlSourceCode)&&I(c,"href",d),1&e&&T!==(T=(t[0].Description??"")+"")&&S(h,T),1&e&&B!==(B=(t[0].Author??"")+"")&&S(v,B),1&e&&O!==(O=(t[0].Version??"")+"")&&S(C,O)},i:t,o:t,d(t){t&&x(n)}}}function Hr(t,e,n){let{plugin:i}=e;return t.$$set=t=>{"plugin"in t&&n(0,i=t.plugin)},[i]}customElements.define("settings-generator",kt(Rr,{upButtonText:{},downButtonText:{},editButtonText:{},removeButtonText:{},theme:{}},[],[],!1));class Wr extends At{constructor(t){super(),xt(this,t,Hr,Yr,l,{plugin:0},Ur)}get plugin(){return this.$$.ctx[0]}set plugin(t){this.$$set({plugin:t}),it()}}function Jr(t){g(t,"svelte-qa1t6z",".loader.svelte-qa1t6z{--color:#000;--color-transparent:#0000;position:relative;width:100px;aspect-ratio:1;background-image:conic-gradient(var(--color-transparent), var(--color));mask:radial-gradient(farthest-side, #0000 85%, #000 85%);border-radius:50%;animation:svelte-qa1t6z-spin-spinner 1s infinite linear}.loader.light.svelte-qa1t6z{--color:#444;--color-transparent:#4440}@keyframes svelte-qa1t6z-spin-spinner{to{transform:rotate(1turn)}}")}function Kr(e){let n;return{c(){n=k("div"),I(n,"class","loader svelte-qa1t6z"),N(n,"light","light"===e[0])},m(t,e){y(t,n,e)},p(t,[e]){1&e&&N(n,"light","light"===t[0])},i:t,o:t,d(t){t&&x(n)}}}function Zr(t,e,n){let{theme:i}=e;return t.$$set=t=>{"theme"in t&&n(0,i=t.theme)},[i]}kt(Wr,{plugin:{}},[],[],!0);class Gr extends At{constructor(t){super(),xt(this,t,Zr,Kr,l,{theme:0},Jr)}get theme(){return this.$$.ctx[0]}set theme(t){this.$$set({theme:t}),it()}}function Qr(t,e,n){const i=t.slice();return i[12]=e[n],i}function Xr(t){let e,n,i,r;return i=new It({props:{theme:t[0],$$slots:{default:[to]},$$scope:{ctx:t}}}),i.$on("click",t[7]),{c(){e=k("p"),n=A("An error occurred while downloading the list of plugins.\n "),vt(i.$$.fragment)},m(t,o){y(t,e,o),m(e,n),bt(i,e,null),r=!0},p(t,e){const n={};1&e&&(n.theme=t[0]),65536&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n)},i(t){r||(ut(i.$$.fragment,t),r=!0)},o(t){dt(i.$$.fragment,t),r=!1},d(t){t&&x(e),yt(i)}}}function to(t){let e;return{c(){e=A("Try again")},m(t,n){y(t,e,n)},d(t){t&&x(e)}}}function eo(t){let e,n,i,r;const o=[io,no],l=[];function a(t,e){return 0===t[1].length?0:1}return e=a(t),n=l[e]=o[e](t),{c(){n.c(),i=C()},m(t,n){l[e].m(t,n),y(t,i,n),r=!0},p(t,r){let s=e;e=a(t),e===s?l[e].p(t,r):(st(),dt(l[s],1,1,(()=>{l[s]=null})),ct(),n=l[e],n?n.p(t,r):(n=l[e]=o[e](t),n.c()),ut(n,1),n.m(i.parentNode,i))},i(t){r||(ut(n),r=!0)},o(t){dt(n),r=!1},d(t){t&&x(i),l[e].d(t)}}}function no(t){let e,n,i,r,o,l,a,s,c,u,d,p,f=[],h=new Map;function g(e){t[9](e)}let $={theme:t[0],placeholder:"Search plugins"};function v(e){t[10](e)}void 0!==t[3]&&($.value=t[3]),n=new Lt({props:$}),H.push((()=>$t(n,"value",g)));let b={theme:t[0],options:t[6]};void 0!==t[2]&&(b.value=t[2]),o=new Ht({props:b}),H.push((()=>$t(o,"value",v)));let w=ft(t[4]);const A=t=>t[12].ID;for(let e=0;eName Description Author Version",u=_(),d=k("tbody");for(let t=0;ti=!1))),n.$set(r);const a={};1&e&&(a.theme=t[0]),!l&&4&e&&(l=!0,a.value=t[2],tt((()=>l=!1))),o.$set(a),16&e&&(w=ft(t[4]),st(),f=gt(f,e,A,1,t,w,h,d,ht,ro,null,Qr),ct())},i(t){if(!p){ut(n.$$.fragment,t),ut(o.$$.fragment,t);for(let t=0;te.parentNode,r.anchor=e,i=!0},p(e,[i]){t=e,r.ctx=t,32&i&&n!==(n=t[5])&&pt(n,r)||function(t,e,n){const i=e.slice(),{resolved:r}=t;t.current===t.then&&(i[t.value]=r),t.current===t.catch&&(i[t.error]=r),t.block.p(i,n)}(r,t,i)},i(t){i||(ut(r.block),i=!0)},o(t){for(let t=0;t<3;t+=1){dt(r.blocks[t])}i=!1},d(t){t&&x(e),r.block.d(t),r.token=null,r=null}}}function ao(t,e,n){let{theme:i}=e;Gt(i,(t=>n(0,i=t)));let r=[];let o,l="default",a="",s=[];function c(){n(5,o=fetch("https://cdn.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json").then((t=>t.json())).then((t=>n(1,r=t.map(((t,e)=>(t.defaultIndex=e,t)))))))}c();let u="";return t.$$set=t=>{"theme"in t&&n(0,i=t.theme)},t.$$.update=()=>{270&t.$$.dirty&&(n(8,u=a.trim().toLowerCase()),n(4,s=r.filter((t=>{var e,n;return 0===u.length||(t.Name.toLowerCase().includes(u)||(null===(e=t.Description)||void 0===e?void 0:e.toLowerCase().includes(u))||(null===(n=t.Author)||void 0===n?void 0:n.toLowerCase().includes(u)))})).sort(((t,e)=>{var n,i,r,o,a,s;switch(l){case"nameAsc":return t.Name.localeCompare(e.Name);case"nameDesc":return e.Name.localeCompare(t.Name);case"authorAsc":return null!==(i=null===(n=t.Author)||void 0===n?void 0:n.localeCompare(null==e?void 0:e.Author))&&void 0!==i?i:-1;case"authorDesc":return null!==(o=null===(r=e.Author)||void 0===r?void 0:r.localeCompare(null==t?void 0:t.Author))&&void 0!==o?o:1;case"dateAsc":return t.DateAdded.localeCompare(e.DateAdded);case"dateDesc":return e.DateAdded.localeCompare(t.DateAdded);case"updatedAsc":return t.LatestReleaseDate&&e.LatestReleaseDate?null===(a=t.LatestReleaseDate)||void 0===a?void 0:a.localeCompare(e.LatestReleaseDate):1e9;case"updatedDesc":return e.LatestReleaseDate&&t.LatestReleaseDate?null===(s=e.LatestReleaseDate)||void 0===s?void 0:s.localeCompare(t.LatestReleaseDate):1e9;case"default":return t.defaultIndex-e.defaultIndex;default:return 0}}))))},[i,r,l,a,s,o,{default:"Sorting: Default",nameAsc:"Sorting: Name (A-Z)",nameDesc:"Sorting: Name (Z-A)",authorAsc:"Sorting: Author (A-Z)",authorDesc:"Sorting: Author (Z-A)",dateAsc:"Sorting: Date (Oldest first)",dateDesc:"Sorting: Date (Newest first)",updatedAsc:"Sorting: Last update date (Oldest first)",updatedDesc:"Sorting: Last update date (Newest first)"},c,u,function(t){a=t,n(3,a)},function(t){l=t,n(2,l)}]}kt(Gr,{theme:{}},[],[],!0);class so extends At{constructor(t){super(),xt(this,t,ao,lo,l,{theme:0})}get theme(){return this.$$.ctx[0]}set theme(t){this.$$set({theme:t}),it()}}customElements.define("plugin-directory",kt(so,{theme:{}},[],[],!1));export{ue as ComponentDemo,so as PluginDirectory,Rr as SettingsGenerator};