import{s as be,e as b,t as Z,a as D,d as y,g as P,i as Q,f as h,c as j,j as _,k as N,l as m,ah as ce,B as de,u as ee,L as Ge,m as he,N as Xe,H as K,I as Ae,A as Ve,ai as Be,aj as Qt,ak as We,al as Le,a7 as vn,am as $t,b as me,an as bn,J as nl,Q as yn,R as kn,U as _s,K as es,z as ll,D as il,E as rl,F as ol}from"../chunks/scheduler.BZlHRu_0.js";import{S as ye,i as ke,k as Ze,c as G,a as X,m as Y,t as V,f as qe,b as H,e as J,g as _e,d as ve,j as yt}from"../chunks/index.a_oafgNU.js";import{i as pe,ao as wn,h as He,ap as Qe,aq as Cn,ar as ot,as as $n,at as Tn,au as Oe,av as rt,aw as ts,ax as ss,ay as ns,az as al,aA as et,aB as cl,aC as ul,aD as It,aE as Dt,aF as vs,aG as fl,aH as bs,aI as ys,aJ as Lt,aK as dl,aL as hl,aM as ls,aN as ml,aO as ze,aP as wt,aQ as Nt,aR as at,aS as ks,aT as pl,aU as gl,aV as _l,aW as is,aX as jt,aY as vl,aZ as bl,a_ as En,a$ as lt,b0 as Sn,b1 as yl,b2 as Pt,b3 as kl,b4 as In,b5 as wl,b6 as Cl,b7 as $l,b8 as Tl,b9 as El,ba as Sl,bb as Nn,bc as Il,bd as Nl,I as Me,j as Al,be as Ol,bf as Ll,bg as kt,bh as An,bi as Pl,a as Dl,bj as ct,bk as ut,bl as jl,u as Ml,bm as Fl,bn as rs,ae as Jt,bo as Vl,bp as Tt,bq as On,br as Ln}from"../chunks/VennDiagram.svelte_svelte_type_style_lang.BbIdL-mm.js";import{p as Bl,i as ql,b as Hl}from"../chunks/entry.ZK3zkBMq.js";import{B as ft}from"../chunks/Button.ihrsuxI6.js";import{s as Xt}from"../chunks/index.CqVitEmB.js";import{A as Rl,a as Ul}from"../chunks/AccordionItem.t-zz0kvx.js";import{C as Kl,P as Kt}from"../chunks/Prismjs.CfrhxI5K.js";function ws(l){let e,t;return{c(){e=b("span"),t=Z(l[1]),this.h()},l(s){e=y(s,"SPAN",{class:!0});var n=P(e);t=Q(n,l[1]),n.forEach(h),this.h()},h(){_(e,"class","text-red-500 font-bold text-sm")},m(s,n){N(s,e,n),m(e,t)},p(s,n){n&2&&he(t,s[1])},d(s){s&&h(e)}}}function xl(l){let e,t,s,n,i,r,o,a=l[1]&&ws(l);return{c(){e=b("label"),t=Z(`Source name `),s=b("input"),n=D(),i=b("div"),a&&a.c(),this.h()},l(c){e=y(c,"LABEL",{for:!0,class:!0});var u=P(e);t=Q(u,`Source name `),s=y(u,"INPUT",{name:!0,class:!0}),u.forEach(h),n=j(c),i=y(c,"DIV",{class:!0});var f=P(i);a&&a.l(f),f.forEach(h),this.h()},h(){s.required=!0,_(s,"name","sourceName"),_(s,"class","rounded border border-gray-300 p-1 ml-auto w-2/3 text-gray-950 align-middle text-sm"),_(e,"for","sourceName"),_(e,"class","flex justify-between w-full"),_(i,"class","flex justify-end w-full")},m(c,u){N(c,e,u),m(e,t),m(e,s),ce(s,l[0]),N(c,n,u),N(c,i,u),a&&a.m(i,null),r||(o=[de(s,"input",l[2]),de(s,"change",l[3])],r=!0)},p(c,[u]){u&1&&s.value!==c[0]&&ce(s,c[0]),c[1]?a?a.p(c,u):(a=ws(c),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},i:ee,o:ee,d(c){c&&(h(e),h(n),h(i)),a&&a.d(),r=!1,Ge(o)}}}const zl=/^[\w_]+$/,Pn=(l,e)=>l.length<1?"Source name must be set.":zl.test(l)?l&&e.some(t=>t.name===l)?`A source named ${l} already exists.`:"":"Source names can only contain letters, numbers, and underscores.";function Gl(l,e,t){let{sourceName:s}=e,{nameError:n}=e;function i(){s=this.value,t(0,s)}const r=()=>t(1,n="");return l.$$set=o=>{"sourceName"in o&&t(0,s=o.sourceName),"nameError"in o&&t(1,n=o.nameError)},[s,n,i,r]}class Dn extends ye{constructor(e){super(),ke(this,e,Gl,xl,be,{sourceName:0,nameError:1})}}function Cs(l,e,t){const s=l.slice();s[11]=e[t][0],s[12]=e[t][1];const n=s[12].package.package.evidence.datasources;return s[13]=n,s}function $s(l,e,t){const s=l.slice();return s[16]=e[t],s}function Yl(l){let e,t=l[16]+"",s,n;return{c(){e=b("option"),s=Z(t),this.h()},l(i){e=y(i,"OPTION",{});var r=P(e);s=Q(r,t),r.forEach(h),this.h()},h(){e.__value=n=l[16],ce(e,e.__value)},m(i,r){N(i,e,r),m(e,s)},p(i,r){r&1&&t!==(t=i[16]+"")&&he(s,t),r&1&&n!==(n=i[16])&&(e.__value=n,ce(e,e.__value))},d(i){i&&h(e)}}}function Jl(l){let e;function t(i,r){return i[16].length?Wl:Xl}let s=t(l),n=s(l);return{c(){n.c(),e=me()},l(i){n.l(i),e=me()},m(i,r){n.m(i,r),N(i,e,r)},p(i,r){s===(s=t(i))&&n?n.p(i,r):(n.d(1),n=s(i),n&&(n.c(),n.m(e.parentNode,e)))},d(i){i&&h(e),n.d(i)}}}function Xl(l){return{c:ee,l:ee,m:ee,p:ee,d:ee}}function Wl(l){let e,t=l[16][0]+"",s,n;return{c(){e=b("option"),s=Z(t),this.h()},l(i){e=y(i,"OPTION",{});var r=P(e);s=Q(r,t),r.forEach(h),this.h()},h(){e.__value=n=l[16][0],ce(e,e.__value)},m(i,r){N(i,e,r),m(e,s)},p(i,r){r&1&&t!==(t=i[16][0]+"")&&he(s,t),r&1&&n!==(n=i[16][0])&&(e.__value=n,ce(e,e.__value))},d(i){i&&h(e)}}}function Ts(l){let e,t;function s(r,o){return o&1&&(e=null),e==null&&(e=!!Array.isArray(r[16])),e?Jl:Yl}let n=s(l,-1),i=n(l);return{c(){i.c(),t=me()},l(r){i.l(r),t=me()},m(r,o){i.m(r,o),N(r,t,o)},p(r,o){n===(n=s(r,o))&&i?i.p(r,o):(i.d(1),i=n(r),i&&(i.c(),i.m(t.parentNode,t)))},d(r){r&&h(t),i.d(r)}}}function Es(l){let e,t,s=pe(l[13]),n=[];for(let i=0;iZe(f,"sourceName",R)),Xe.push(()=>Ze(f,"nameError",A)),v=new ft({props:{size:"md",icon:wn,variant:"success",type:"submit",$$slots:{default:[Zl]},$$scope:{ctx:l}}}),{c(){e=b("div"),t=b("form"),s=b("h3"),s.textContent=n,i=D(),r=b("label"),o=Z(`Datasource Type `),a=b("select");for(let E=0;E<$.length;E+=1)$[E].c();c=D(),u=b("div"),G(f.$$.fragment),g=D(),k=b("div"),G(v.$$.fragment),this.h()},l(E){e=y(E,"DIV",{class:!0});var I=P(e);t=y(I,"FORM",{class:!0});var O=P(t);s=y(O,"H3",{class:!0,"data-svelte-h":!0}),K(s)!=="svelte-1dhduhd"&&(s.textContent=n),i=j(O),r=y(O,"LABEL",{for:!0,class:!0});var L=P(r);o=Q(L,`Datasource Type `),a=y(L,"SELECT",{name:!0,class:!0});var T=P(a);for(let W=0;W<$.length;W+=1)$[W].l(T);T.forEach(h),L.forEach(h),c=j(O),u=y(O,"DIV",{});var q=P(u);X(f.$$.fragment,q),q.forEach(h),g=j(O),k=y(O,"DIV",{class:!0});var U=P(k);X(v.$$.fragment,U),U.forEach(h),O.forEach(h),I.forEach(h),this.h()},h(){_(s,"class","text-sm uppercase gray-600 font-bold text-left"),a.required=!0,_(a,"name","sourceType"),_(a,"class","rounded border border-gray-300 p-1 ml-auto w-2/3 text-gray-950 align-middle text-sm"),l[2]===void 0&&Ae(()=>l[7].call(a)),_(r,"for","sourceType"),_(r,"class","flex justify-between w-full"),_(k,"class","ml-auto"),_(t,"class","flex flex-col w-full gap-4"),_(e,"class","col-span-4 w-full flex justify-end items-end flex-col py-4 px-4 rounded"),Ve(e,"bg-gray-100",!l[1])},m(E,I){N(E,e,I),m(e,t),m(t,s),m(t,i),m(t,r),m(r,o),m(r,a);for(let O=0;O<$.length;O+=1)$[O]&&$[O].m(a,null);Be(a,l[2],!0),m(t,c),m(t,u),Y(f,u,null),m(t,g),m(t,k),Y(v,k,null),C=!0,S||(F=[de(a,"change",l[7]),de(t,"submit",Qt(l[5]))],S=!0)},p(E,[I]){if(I&1){M=pe(Object.entries(E[0]));let T;for(T=0;Td=!1)),!p&&I&16&&(p=!0,O.nameError=E[4],We(()=>p=!1)),f.$set(O);const L={};I&524288&&(L.$$scope={dirty:I,ctx:E}),v.$set(L),(!C||I&2)&&Ve(e,"bg-gray-100",!E[1])},i(E){C||(V(f.$$.fragment,E),V(v.$$.fragment,E),E&&Ae(()=>{C&&(w||(w=qe(e,He,{},!0)),w.run(1))}),C=!0)},o(E){H(f.$$.fragment,E),H(v.$$.fragment,E),E&&(w||(w=qe(e,He,{},!1)),w.run(0)),C=!1},d(E){E&&h(e),Le($,E),J(f),J(v),E&&w&&w.end(),S=!1,Ge(F)}}}function ei(l,e,t){let{availablePackages:s}=e,{ghost:n=!1}=e,{existingSources:i=[]}=e,r="",o="";const a=vn();let c="";function u(){t(4,c=Pn(o,i)),!c&&(a("newSource",{newSourceType:r,newSourceName:o}),t(3,o=""))}function f(){r=$t(this),t(2,r),t(0,s)}function d(g){o=g,t(3,o)}function p(g){c=g,t(4,c)}return l.$$set=g=>{"availablePackages"in g&&t(0,s=g.availablePackages),"ghost"in g&&t(1,n=g.ghost),"existingSources"in g&&t(6,i=g.existingSources)},[s,n,r,o,c,u,i,f,d,p]}class jn extends ye{constructor(e){super(),ke(this,e,ei,Ql,be,{availablePackages:0,ghost:1,existingSources:6})}}var ti={default:{a:{viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"#2c3e50",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2"},{d:"M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z"},{d:"M9 17v-4"},{d:"M12 17v-1"},{d:"M15 17v-2"},{d:"M12 17v-1"}]}},si={default:{a:{viewBox:"0 0 200 200",style:"enable-background:new 0 0 791.9 221.6;"},path:[{fill:"currentColor",d:"M 13.53 126.114 C 13.53 126.114 64.492 162.546 67.591 164.363 C 70.582 166.179 74.963 166.606 78.808 165.111 C 82.655 163.615 85.54 160.196 86.395 156.777 C 87.356 153.358 99.002 91.819 99.002 91.819 C 99.108 90.964 99.428 88.507 98.147 86.156 C 96.331 82.951 92.271 81.242 88.638 82.31 C 85.754 83.165 84.258 85.302 83.83 86.049 C 83.19 87.224 82.014 89.148 79.877 90.857 C 78.275 92.139 76.672 92.887 75.924 93.208 C 69.407 95.879 62.142 93.635 57.975 88.293 C 55.411 84.981 50.817 83.699 46.757 85.302 C 42.697 86.904 40.347 91.071 40.667 95.238 C 41.415 101.862 37.676 108.486 31.052 111.156 C 27.526 112.546 23.787 112.546 20.475 111.477 C 19.727 111.263 17.056 110.623 14.385 112.118 C 11.073 113.828 9.363 117.887 10.218 121.52 C 10.859 123.978 12.783 125.58 13.53 126.114 Z",style:"transform-origin: 122.948px 117.753px;"},{fill:"currentColor",d:"M 98.467 46.305 C 98.467 46.305 116.63 106.349 117.912 109.554 C 119.194 112.866 122.399 115.858 126.352 117.032 C 130.306 118.101 134.686 117.247 137.463 115.11 C 140.242 112.973 187.143 71.412 187.143 71.412 C 187.785 70.879 189.494 69.062 189.922 66.391 C 190.455 62.759 188.212 58.912 184.793 57.523 C 182.015 56.455 179.451 57.203 178.703 57.523 C 177.528 58.057 175.391 58.805 172.72 58.912 C 170.583 59.019 168.981 58.592 168.126 58.378 C 161.395 56.455 156.908 50.259 156.908 43.528 C 156.802 39.361 154.023 35.515 149.857 34.339 C 145.583 33.164 141.203 34.98 138.959 38.506 C 135.434 44.275 128.489 47.16 121.651 45.237 C 118.019 44.168 115.027 41.925 113.104 39.04 C 112.57 38.399 110.86 36.263 107.869 35.728 C 104.236 35.087 100.283 37.224 98.788 40.536 C 97.612 43.1 98.254 45.451 98.467 46.305 Z",style:"transform-origin: 122.948px 117.753px;"}]}},ni={default:{a:{role:"img",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"#2c3e50",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},title:[{}],path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4"},{d:"M13.5 6.5l4 4"}]}};const Wt=Object.freeze(Object.defineProperty({__proto__:null,Clipboard:ti,Motherduck:si,Pencil:ni},Symbol.toStringTag,{value:"Module"}));function li(l){const e=JSON.parse(l);return e.data&&(e.data=Bl(e.data)),e}function Ss(l){return HTMLElement.prototype.cloneNode.call(l)}function ii(l,e=()=>{}){const t=async({action:n,result:i,reset:r=!0,invalidateAll:o=!0})=>{i.type==="success"&&(r&&HTMLFormElement.prototype.reset.call(l),o&&await ql()),(location.origin+location.pathname===n.origin+n.pathname||i.type==="redirect"||i.type==="error")&&Hl(i)};async function s(n){var g,k,v,w;if(((g=n.submitter)!=null&&g.hasAttribute("formmethod")?n.submitter.formMethod:Ss(l).method)!=="post")return;n.preventDefault();const r=new URL((k=n.submitter)!=null&&k.hasAttribute("formaction")?n.submitter.formAction:Ss(l).action),o=new FormData(l),a=(v=n.submitter)==null?void 0:v.getAttribute("name");a&&o.append(a,((w=n.submitter)==null?void 0:w.getAttribute("value"))??"");const c=new AbortController;let u=!1;const d=await e({action:r,cancel:()=>u=!0,controller:c,formData:o,formElement:l,submitter:n.submitter})??t;if(u)return;let p;try{const C=await fetch(r,{method:"POST",headers:{accept:"application/json","x-sveltekit-action":"true"},cache:"no-store",body:o,signal:c.signal});p=li(await C.text()),p.type==="error"&&(p.status=C.status)}catch(C){if((C==null?void 0:C.name)==="AbortError")return;p={type:"error",error:C}}d({action:r,formData:o,formElement:l,update:C=>t({action:r,result:p,reset:C==null?void 0:C.reset,invalidateAll:C==null?void 0:C.invalidateAll}),result:p})}return HTMLFormElement.prototype.addEventListener.call(l,"submit",s),{destroy(){HTMLFormElement.prototype.removeEventListener.call(l,"submit",s)}}}const ht={collection:"map",default:!0,nodeClass:Qe,tag:"tag:yaml.org,2002:map",resolve(l,e){return Cn(l)||e("Expected a mapping for this tag"),l},createNode:(l,e,t)=>Qe.from(l,e,t)},mt={collection:"seq",default:!0,nodeClass:ot,tag:"tag:yaml.org,2002:seq",resolve(l,e){return $n(l)||e("Expected a sequence for this tag"),l},createNode:(l,e,t)=>ot.from(l,e,t)},Mt={identify:l=>typeof l=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:l=>l,stringify(l,e,t,s){return e=Object.assign({actualString:!0},e),Tn(l,e,t,s)}},Ft={identify:l=>l==null,createNode:()=>new Oe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Oe(null),stringify:({source:l},e)=>typeof l=="string"&&Ft.test.test(l)?l:e.options.nullStr},os={identify:l=>typeof l=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:l=>new Oe(l[0]==="t"||l[0]==="T"),stringify({source:l,value:e},t){if(l&&os.test.test(l)){const s=l[0]==="t"||l[0]==="T";if(e===s)return l}return e?t.options.trueStr:t.options.falseStr}};function Fe({format:l,minFractionDigits:e,tag:t,value:s}){if(typeof s=="bigint")return String(s);const n=typeof s=="number"?s:Number(s);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let i=JSON.stringify(s);if(!l&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(i)){let r=i.indexOf(".");r<0&&(r=i.length,i+=".");let o=e-(i.length-r-1);for(;o-- >0;)i+="0"}return i}const Mn={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:l=>l.slice(-3).toLowerCase()==="nan"?NaN:l[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Fe},Fn={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:l=>parseFloat(l),stringify(l){const e=Number(l.value);return isFinite(e)?e.toExponential():Fe(l)}},Vn={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(l){const e=new Oe(parseFloat(l)),t=l.indexOf(".");return t!==-1&&l[l.length-1]==="0"&&(e.minFractionDigits=l.length-t-1),e},stringify:Fe},Vt=l=>typeof l=="bigint"||Number.isInteger(l),as=(l,e,t,{intAsBigInt:s})=>s?BigInt(l):parseInt(l.substring(e),t);function Bn(l,e,t){const{value:s}=l;return Vt(s)&&s>=0?t+s.toString(e):Fe(l)}const qn={identify:l=>Vt(l)&&l>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(l,e,t)=>as(l,2,8,t),stringify:l=>Bn(l,8,"0o")},Hn={identify:Vt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(l,e,t)=>as(l,0,10,t),stringify:Fe},Rn={identify:l=>Vt(l)&&l>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(l,e,t)=>as(l,2,16,t),stringify:l=>Bn(l,16,"0x")},ri=[ht,mt,Mt,Ft,os,qn,Hn,Rn,Mn,Fn,Vn];function Is(l){return typeof l=="bigint"||Number.isInteger(l)}const At=({value:l})=>JSON.stringify(l),oi=[{identify:l=>typeof l=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:l=>l,stringify:At},{identify:l=>l==null,createNode:()=>new Oe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:At},{identify:l=>typeof l=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:l=>l==="true",stringify:At},{identify:Is,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(l,e,{intAsBigInt:t})=>t?BigInt(l):parseInt(l,10),stringify:({value:l})=>Is(l)?l.toString():JSON.stringify(l)},{identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:l=>parseFloat(l),stringify:At}],ai={default:!0,tag:"",test:/^/,resolve(l,e){return e(`Unresolved plain scalar ${JSON.stringify(l)}`),l}},ci=[ht,mt].concat(oi,ai),cs={identify:l=>l instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(l,e){if(typeof Buffer=="function")return Buffer.from(l,"base64");if(typeof atob=="function"){const t=atob(l.replace(/[\n\r]/g,"")),s=new Uint8Array(t.length);for(let n=0;nl===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Oe(!0),stringify:Un},xn={identify:l=>l===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Oe(!1),stringify:Un},ui={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:l=>l.slice(-3).toLowerCase()==="nan"?NaN:l[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Fe},fi={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:l=>parseFloat(l.replace(/_/g,"")),stringify(l){const e=Number(l.value);return isFinite(e)?e.toExponential():Fe(l)}},di={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(l){const e=new Oe(parseFloat(l.replace(/_/g,""))),t=l.indexOf(".");if(t!==-1){const s=l.substring(t+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:Fe},Et=l=>typeof l=="bigint"||Number.isInteger(l);function Bt(l,e,t,{intAsBigInt:s}){const n=l[0];if((n==="-"||n==="+")&&(e+=1),l=l.substring(e).replace(/_/g,""),s){switch(t){case 2:l=`0b${l}`;break;case 8:l=`0o${l}`;break;case 16:l=`0x${l}`;break}const r=BigInt(l);return n==="-"?BigInt(-1)*r:r}const i=parseInt(l,t);return n==="-"?-1*i:i}function us(l,e,t){const{value:s}=l;if(Et(s)){const n=s.toString(e);return s<0?"-"+t+n.substr(1):t+n}return Fe(l)}const hi={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(l,e,t)=>Bt(l,2,2,t),stringify:l=>us(l,2,"0b")},mi={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(l,e,t)=>Bt(l,1,8,t),stringify:l=>us(l,8,"0")},pi={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(l,e,t)=>Bt(l,0,10,t),stringify:Fe},gi={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(l,e,t)=>Bt(l,2,16,t),stringify:l=>us(l,16,"0x")};function fs(l,e){const t=l[0],s=t==="-"||t==="+"?l.substring(1):l,n=r=>e?BigInt(r):Number(r),i=s.replace(/_/g,"").split(":").reduce((r,o)=>r*n(60)+n(o),n(0));return t==="-"?n(-1)*i:i}function zn(l){let{value:e}=l,t=r=>r;if(typeof e=="bigint")t=r=>BigInt(r);else if(isNaN(e)||!isFinite(e))return Fe(l);let s="";e<0&&(s="-",e*=t(-1));const n=t(60),i=[e%n];return e<60?i.unshift(0):(e=(e-i[0])/n,i.unshift(e%n),e>=60&&(e=(e-i[0])/n,i.unshift(e))),s+i.map(r=>String(r).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Gn={identify:l=>typeof l=="bigint"||Number.isInteger(l),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(l,e,{intAsBigInt:t})=>fs(l,t),stringify:zn},Yn={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:l=>fs(l,!1),stringify:zn},qt={identify:l=>l instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(l){const e=l.match(qt.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,t,s,n,i,r,o]=e.map(Number),a=e[7]?Number((e[7]+"00").substr(1,3)):0;let c=Date.UTC(t,s-1,n,i||0,r||0,o||0,a);const u=e[8];if(u&&u!=="Z"){let f=fs(u,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:l})=>l.toISOString().replace(/(T00:00:00)?\.000Z$/,"")},Ns=[ht,mt,Mt,Ft,Kn,xn,hi,mi,pi,gi,ui,fi,di,cs,rt,ts,ss,ns,Gn,Yn,qt],As=new Map([["core",ri],["failsafe",[ht,mt,Mt]],["json",ci],["yaml11",Ns],["yaml-1.1",Ns]]),Os={binary:cs,bool:os,float:Vn,floatExp:Fn,floatNaN:Mn,floatTime:Yn,int:Hn,intHex:Rn,intOct:qn,intTime:Gn,map:ht,merge:rt,null:Ft,omap:ts,pairs:ss,seq:mt,set:ns,timestamp:qt},_i={"tag:yaml.org,2002:binary":cs,"tag:yaml.org,2002:merge":rt,"tag:yaml.org,2002:omap":ts,"tag:yaml.org,2002:pairs":ss,"tag:yaml.org,2002:set":ns,"tag:yaml.org,2002:timestamp":qt};function xt(l,e,t){const s=As.get(e);if(s&&!l)return t&&!s.includes(rt)?s.concat(rt):s.slice();let n=s;if(!n)if(Array.isArray(l))n=[];else{const i=Array.from(As.keys()).filter(r=>r!=="yaml11").map(r=>JSON.stringify(r)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${i} or define customTags array`)}if(Array.isArray(l))for(const i of l)n=n.concat(i);else typeof l=="function"&&(n=l(n.slice()));return t&&(n=n.concat(rt)),n.reduce((i,r)=>{const o=typeof r=="string"?Os[r]:r;if(!o){const a=JSON.stringify(r),c=Object.keys(Os).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${a}; use one of ${c}`)}return i.includes(o)||i.push(o),i},[])}const vi=(l,e)=>l.keye.key?1:0;class Ht{constructor({compat:e,customTags:t,merge:s,resolveKnownTags:n,schema:i,sortMapEntries:r,toStringDefaults:o}){this.compat=Array.isArray(e)?xt(e,"compat"):e?xt(null,e):null,this.name=typeof i=="string"&&i||"core",this.knownTags=n?_i:{},this.tags=xt(t,this.name,s),this.toStringOptions=o??null,Object.defineProperty(this,al,{value:ht}),Object.defineProperty(this,et,{value:Mt}),Object.defineProperty(this,cl,{value:mt}),this.sortMapEntries=typeof r=="function"?r:r===!0?vi:null}clone(){const e=Object.create(Ht.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function bi(l,e){var a;const t=[];let s=e.directives===!0;if(e.directives!==!1&&l.directives){const c=l.directives.toString(l);c?(t.push(c),s=!0):l.directives.docStart&&(s=!0)}s&&t.push("---");const n=ul(l,e),{commentString:i}=n.options;if(l.commentBefore){t.length!==1&&t.unshift("");const c=i(l.commentBefore);t.unshift(It(c,""))}let r=!1,o=null;if(l.contents){if(Dt(l.contents)){if(l.contents.spaceBefore&&s&&t.push(""),l.contents.commentBefore){const f=i(l.contents.commentBefore);t.push(It(f,""))}n.forceBlockIndent=!!l.comment,o=l.contents.comment}const c=o?void 0:()=>r=!0;let u=vs(l.contents,n,()=>o=null,c);o&&(u+=fl(u,"",i(o))),(u[0]==="|"||u[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${u}`:t.push(u)}else t.push(vs(l.contents,n));if((a=l.directives)!=null&&a.docEnd)if(l.comment){const c=i(l.comment);c.includes(` `)?(t.push("..."),t.push(It(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=l.comment;c&&r&&(c=c.replace(/^\n+/,"")),c&&((!r||o)&&t[t.length-1]!==""&&t.push(""),t.push(It(i(c),"")))}return t.join(` `)+` `}class pt{constructor(e,t,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,bs,{value:ys});let n=null;typeof t=="function"||Array.isArray(t)?n=t:s===void 0&&t&&(s=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=i;let{version:r}=i;s!=null&&s._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(r=this.directives.yaml.version)):this.directives=new Lt({version:r}),this.setSchema(r,s),this.contents=e===void 0?null:this.createNode(e,n,s)}clone(){const e=Object.create(pt.prototype,{[bs]:{value:ys}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Dt(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){st(this.contents)&&this.contents.add(e)}addIn(e,t){st(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const s=dl(this);e.anchor=!t||s.has(t)?hl(t||"a",s):t}return new ls(e.anchor)}createNode(e,t,s){let n;if(typeof t=="function")e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){const v=C=>typeof C=="number"||C instanceof String||C instanceof Number,w=t.filter(v).map(String);w.length>0&&(t=t.concat(w)),n=t}else s===void 0&&t&&(s=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:r,flow:o,keepUndefined:a,onTagObj:c,tag:u}=s??{},{onAnchor:f,setAnchors:d,sourceObjects:p}=_l(this,r||"a"),g={aliasDuplicateObjects:i??!0,keepUndefined:a??!1,onAnchor:f,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:p},k=ml(e,u,g);return o&&ze(k)&&(k.flow=!0),d(),k}createPair(e,t,s={}){const n=this.createNode(e,null,s),i=this.createNode(t,null,s);return new wt(n,i)}delete(e){return st(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Nt(e)?this.contents==null?!1:(this.contents=null,!0):st(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return ze(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Nt(e)?!t&&at(this.contents)?this.contents.value:this.contents:ze(this.contents)?this.contents.getIn(e,t):void 0}has(e){return ze(this.contents)?this.contents.has(e):!1}hasIn(e){return Nt(e)?this.contents!==void 0:ze(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=ks(this.schema,[e],t):st(this.contents)&&this.contents.set(e,t)}setIn(e,t){Nt(e)?this.contents=t:this.contents==null?this.contents=ks(this.schema,Array.from(e),t):st(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let s;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Lt({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Lt({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{const n=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(s)this.schema=new Ht(Object.assign(s,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:s,maxAliasCount:n,onAnchor:i,reviver:r}={}){const o={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=pl(this.contents,t??"",o);if(typeof i=="function")for(const{count:c,res:u}of o.anchors.values())i(u,c);return typeof r=="function"?gl(r,{"":a},"",a):a}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return bi(this,e)}}function st(l){if(ze(l))return!0;throw new Error("Expected a YAML collection as document contents")}function dt(l,{flow:e,indicator:t,next:s,offset:n,onError:i,parentIndent:r,startOnNewline:o}){let a=!1,c=o,u=o,f="",d="",p=!1,g=!1,k=null,v=null,w=null,C=null,S=null,F=null,M=null;for(const A of l)switch(g&&(A.type!=="space"&&A.type!=="newline"&&A.type!=="comma"&&i(A.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),k&&(c&&A.type!=="comment"&&A.type!=="newline"&&i(k,"TAB_AS_INDENT","Tabs are not allowed as indentation"),k=null),A.type){case"space":!e&&(t!=="doc-start"||(s==null?void 0:s.type)!=="flow-collection")&&A.source.includes(" ")&&(k=A),u=!0;break;case"comment":{u||i(A,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const B=A.source.substring(1)||" ";f?f+=d+B:f=B,d="",c=!1;break}case"newline":c?f?f+=A.source:a=!0:d+=A.source,c=!0,p=!0,(v||w)&&(C=A),u=!0;break;case"anchor":v&&i(A,"MULTIPLE_ANCHORS","A node can have at most one anchor"),A.source.endsWith(":")&&i(A.offset+A.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),v=A,M===null&&(M=A.offset),c=!1,u=!1,g=!0;break;case"tag":{w&&i(A,"MULTIPLE_TAGS","A node can have at most one tag"),w=A,M===null&&(M=A.offset),c=!1,u=!1,g=!0;break}case t:(v||w)&&i(A,"BAD_PROP_ORDER",`Anchors and tags must be after the ${A.source} indicator`),F&&i(A,"UNEXPECTED_TOKEN",`Unexpected ${A.source} in ${e??"collection"}`),F=A,c=t==="seq-item-ind"||t==="explicit-key-ind",u=!1;break;case"comma":if(e){S&&i(A,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),S=A,c=!1,u=!1;break}default:i(A,"UNEXPECTED_TOKEN",`Unexpected ${A.type} token`),c=!1,u=!1}const $=l[l.length-1],R=$?$.offset+$.source.length:n;return g&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&i(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),k&&(c&&k.indent<=r||(s==null?void 0:s.type)==="block-map"||(s==null?void 0:s.type)==="block-seq")&&i(k,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:S,found:F,spaceBefore:a,comment:f,hasNewline:p,anchor:v,tag:w,newlineAfterProp:C,end:R,start:M??R}}function Ct(l){if(!l)return null;switch(l.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(l.source.includes(` `))return!0;if(l.end){for(const e of l.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of l.items){for(const t of e.start)if(t.type==="newline")return!0;if(e.sep){for(const t of e.sep)if(t.type==="newline")return!0}if(Ct(e.key)||Ct(e.value))return!0}return!1;default:return!0}}function Zt(l,e,t){if((e==null?void 0:e.type)==="flow-collection"){const s=e.end[0];s.indent===l&&(s.source==="]"||s.source==="}")&&Ct(e)&&t(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Jn(l,e,t){const{uniqueKeys:s}=l.options;if(s===!1)return!1;const n=typeof s=="function"?s:(i,r)=>i===r||at(i)&&at(r)&&i.value===r.value;return e.some(i=>n(i.key,t))}const Ls="All mapping items must start at the same column";function yi({composeNode:l,composeEmptyNode:e},t,s,n,i){var u;const r=(i==null?void 0:i.nodeClass)??Qe,o=new r(t.schema);t.atRoot&&(t.atRoot=!1);let a=s.offset,c=null;for(const f of s.items){const{start:d,key:p,sep:g,value:k}=f,v=dt(d,{indicator:"explicit-key-ind",next:p??(g==null?void 0:g[0]),offset:a,onError:n,parentIndent:s.indent,startOnNewline:!0}),w=!v.found;if(w){if(p&&(p.type==="block-seq"?n(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==s.indent&&n(a,"BAD_INDENT",Ls)),!v.anchor&&!v.tag&&!g){c=v.end,v.comment&&(o.comment?o.comment+=` `+v.comment:o.comment=v.comment);continue}(v.newlineAfterProp||Ct(p))&&n(p??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((u=v.found)==null?void 0:u.indent)!==s.indent&&n(a,"BAD_INDENT",Ls);t.atKey=!0;const C=v.end,S=p?l(t,p,v,n):e(t,C,d,null,v,n);t.schema.compat&&Zt(s.indent,p,n),t.atKey=!1,Jn(t,o.items,S)&&n(C,"DUPLICATE_KEY","Map keys must be unique");const F=dt(g??[],{indicator:"map-value-ind",next:k,offset:S.range[2],onError:n,parentIndent:s.indent,startOnNewline:!p||p.type==="block-scalar"});if(a=F.end,F.found){w&&((k==null?void 0:k.type)==="block-map"&&!F.hasNewline&&n(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&v.startl&&(l.type==="block-map"||l.type==="block-seq");function wi({composeNode:l,composeEmptyNode:e},t,s,n,i){const r=s.start.source==="{",o=r?"flow map":"flow sequence",a=(i==null?void 0:i.nodeClass)??(r?Qe:ot),c=new a(t.schema);c.flow=!0;const u=t.atRoot;u&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let f=s.offset+s.start.source.length;for(let v=0;v0){const v=jt(g,k,t.options.strict,n);v.comment&&(c.comment?c.comment+=` `+v.comment:c.comment=v.comment),c.range=[s.offset,k,v.offset]}else c.range=[s.offset,k,k];return c}function Yt(l,e,t,s,n,i){const r=t.type==="block-map"?yi(l,e,t,s,i):t.type==="block-seq"?ki(l,e,t,s,i):wi(l,e,t,s,i),o=r.constructor;return n==="!"||n===o.tagName?(r.tag=o.tagName,r):(n&&(r.tag=n),r)}function Ci(l,e,t,s,n){var d;const i=s.tag,r=i?e.directives.tagName(i.source,p=>n(i,"TAG_RESOLVE_FAILED",p)):null;if(t.type==="block-seq"){const{anchor:p,newlineAfterProp:g}=s,k=p&&i?p.offset>i.offset?p:i:p??i;k&&(!g||g.offsetp.tag===r&&p.collection===o);if(!a){const p=e.schema.knownTags[r];if(p&&p.collection===o)e.schema.tags.push(Object.assign({},p,{default:!1})),a=p;else return p!=null&&p.collection?n(i,"BAD_COLLECTION_TYPE",`${p.tag} used for ${o} collection, but expects ${p.collection}`,!0):n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,!0),Yt(l,e,t,n,r)}const c=Yt(l,e,t,n,r,a),u=((d=a.resolve)==null?void 0:d.call(a,c,p=>n(i,"TAG_RESOLVE_FAILED",p),e.options))??c,f=Dt(u)?u:new Oe(u);return f.range=c.range,f.tag=r,a!=null&&a.format&&(f.format=a.format),f}function Xn(l,e,t,s){const{value:n,type:i,comment:r,range:o}=e.type==="block-scalar"?vl(l,e,s):bl(e,l.options.strict,s),a=t?l.directives.tagName(t.source,f=>s(t,"TAG_RESOLVE_FAILED",f)):null;let c;l.options.stringKeys&&l.atKey?c=l.schema[et]:a?c=$i(l.schema,n,a,t,s):e.type==="scalar"?c=Ti(l,n,e,s):c=l.schema[et];let u;try{const f=c.resolve(n,d=>s(t??e,"TAG_RESOLVE_FAILED",d),l.options);u=at(f)?f:new Oe(f)}catch(f){const d=f instanceof Error?f.message:String(f);s(t??e,"TAG_RESOLVE_FAILED",d),u=new Oe(n)}return u.range=o,u.source=n,i&&(u.type=i),a&&(u.tag=a),c.format&&(u.format=c.format),r&&(u.comment=r),u}function $i(l,e,t,s,n){var o;if(t==="!")return l[et];const i=[];for(const a of l.tags)if(!a.collection&&a.tag===t)if(a.default&&a.test)i.push(a);else return a;for(const a of i)if((o=a.test)!=null&&o.test(e))return a;const r=l.knownTags[t];return r&&!r.collection?(l.tags.push(Object.assign({},r,{default:!1,test:void 0})),r):(n(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),l[et])}function Ti({atKey:l,directives:e,schema:t},s,n,i){const r=t.tags.find(o=>{var a;return(o.default===!0||l&&o.default==="key")&&((a=o.test)==null?void 0:a.test(s))})||t[et];if(t.compat){const o=t.compat.find(a=>{var c;return a.default&&((c=a.test)==null?void 0:c.test(s))})??t[et];if(r.tag!==o.tag){const a=e.tagString(r.tag),c=e.tagString(o.tag),u=`Value may be parsed as either ${a} or ${c}`;i(n,"TAG_RESOLVE_FAILED",u,!0)}}return r}function Ei(l,e,t){if(e){t===null&&(t=e.length);for(let s=t-1;s>=0;--s){let n=e[s];switch(n.type){case"space":case"comment":case"newline":l-=n.source.length;continue}for(n=e[++s];(n==null?void 0:n.type)==="space";)l+=n.source.length,n=e[++s];break}}return l}const Si={composeNode:Wn,composeEmptyNode:ds};function Wn(l,e,t,s){const n=l.atKey,{spaceBefore:i,comment:r,anchor:o,tag:a}=t;let c,u=!0;switch(e.type){case"alias":c=Ii(l,e,s),(o||a)&&s(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Xn(l,e,a,s),o&&(c.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=Ci(Si,l,e,t,s),o&&(c.anchor=o.source.substring(1));break;default:{const f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;s(e,"UNEXPECTED_TOKEN",f),c=ds(l,e.offset,void 0,null,t,s),u=!1}}return o&&c.anchor===""&&s(o,"BAD_ALIAS","Anchor cannot be an empty string"),n&&l.options.stringKeys&&(!at(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&s(a??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(c.spaceBefore=!0),r&&(e.type==="scalar"&&e.source===""?c.comment=r:c.commentBefore=r),l.options.keepSourceTokens&&u&&(c.srcToken=e),c}function ds(l,e,t,s,{spaceBefore:n,comment:i,anchor:r,tag:o,end:a},c){const u={type:"scalar",offset:Ei(e,t,s),indent:-1,source:""},f=Xn(l,u,o,c);return r&&(f.anchor=r.source.substring(1),f.anchor===""&&c(r,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(f.spaceBefore=!0),i&&(f.comment=i,f.range[2]=a),f}function Ii({options:l},{offset:e,source:t,end:s},n){const i=new ls(t.substring(1));i.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&n(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const r=e+t.length,o=jt(s,r,l.strict,n);return i.range=[e,r,o.offset],o.comment&&(i.comment=o.comment),i}function Ni(l,e,{offset:t,start:s,value:n,end:i},r){const o=Object.assign({_directives:e},l),a=new pt(void 0,o),c={atKey:!1,atRoot:!0,directives:a.directives,options:a.options,schema:a.schema},u=dt(s,{indicator:"doc-start",next:n??(i==null?void 0:i[0]),offset:t,onError:r,parentIndent:0,startOnNewline:!0});u.found&&(a.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!u.hasNewline&&r(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),a.contents=n?Wn(c,n,u,r):ds(c,u.end,s,null,u,r);const f=a.contents.range[2],d=jt(i,f,!1,r);return d.comment&&(a.comment=d.comment),a.range=[t,f,d.offset],a}function bt(l){if(typeof l=="number")return[l,l+1];if(Array.isArray(l))return l.length===2?l:[l[0],l[1]];const{offset:e,source:t}=l;return[e,e+(typeof t=="string"?t.length:1)]}function Ps(l){var n;let e="",t=!1,s=!1;for(let i=0;i{const r=bt(t);i?this.warnings.push(new En(r,s,n)):this.errors.push(new lt(r,s,n))},this.directives=new Lt({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:s,afterEmptyLine:n}=Ps(this.prelude);if(s){const i=e.contents;if(t)e.comment=e.comment?`${e.comment} ${s}`:s;else if(n||e.directives.docStart||!i)e.commentBefore=s;else if(ze(i)&&!i.flow&&i.items.length>0){let r=i.items[0];is(r)&&(r=r.key);const o=r.commentBefore;r.commentBefore=o?`${s} ${o}`:s}else{const r=i.commentBefore;i.commentBefore=r?`${s} ${r}`:s}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Ps(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,s=-1){for(const n of e)yield*this.next(n);yield*this.end(t,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,s,n)=>{const i=bt(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",s,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=Ni(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new lt(bt(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){const s="Unexpected doc-end without preceding document";this.errors.push(new lt(bt(e),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;const t=jt(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const s=this.doc.comment;this.doc.comment=s?`${s} ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new lt(bt(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const s=Object.assign({_directives:this.directives},this.options),n=new pt(void 0,s);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,t,t],this.decorate(n,!1),yield n}}}class Zn{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,s=this.lineStarts.length;for(;t>1;this.lineStarts[i]=0;)switch(l[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((t=l[++e])==null?void 0:t.type)==="space";);return l.splice(e,l.length)}function js(l){if(l.start.type==="flow-seq-start")for(const e of l.items)e.sep&&!e.value&&!Je(e.start,"explicit-key-ind")&&!Je(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Qn(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class ms{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Sn,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const s of this.lexer.lex(e,t))yield*this.next(s);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const t=yl(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{const s=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in s?s.indent:0:t.type==="flow-collection"&&s.type==="document"&&(t.indent=0),t.type==="flow-collection"&&js(t),s.type){case"document":s.value=t;break;case"block-scalar":s.props.push(t);break;case"block-map":{const n=s.items[s.items.length-1];if(n.value){s.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{const n=s.items[s.items.length-1];n.value?s.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{const n=s.items[s.items.length-1];!n||n.value?s.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&Ds(n.start)===-1&&(t.indent===0||n.start.every(i=>i.type!=="comment"||i.indent=e.indent){const n=!this.onKeyLine&&this.indent===e.indent,i=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind";let r=[];if(i&&t.sep&&!t.value){const o=[];for(let a=0;ae.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(r=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):i||t.value?(r.push(this.sourceToken),e.items.push({start:r,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Je(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(Qn(t.key)&&!Je(t.sep,"newline")){const o=nt(t.start),a=t.key,c=t.sep;c.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:c}]})}else r.length>0?t.sep=t.sep.concat(r,this.sourceToken):t.sep.push(this.sourceToken);else if(Je(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const o=nt(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:r,key:null,sep:[this.sourceToken]}):Je(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);i||t.value?(e.items.push({start:r,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{const o=this.startBlockValue(e);if(o){n&&o.type!=="block-seq"&&e.items.push({start:r}),this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var s;const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const n="end"in t.value?t.value.end:void 0,i=Array.isArray(n)?n[n.length-1]:void 0;(i==null?void 0:i.type)==="comment"?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],i=(s=n==null?void 0:n.value)==null?void 0:s.end;if(Array.isArray(i)){Array.prototype.push.apply(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||Je(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){const n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s&&s.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const s=this.startBlockValue(e);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{const s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===e.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){const n=Ot(s),i=nt(n);js(e);const r=e.end.splice(1,e.end.length);r.push(this.sourceToken);const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(` `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(` `,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=Ot(e),s=nt(t);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=Ot(e),s=nt(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function el(l){const e=l.prettyErrors!==!1;return{lineCounter:l.lineCounter||e&&new Zn||null,prettyErrors:e}}function Ai(l,e={}){const{lineCounter:t,prettyErrors:s}=el(e),n=new ms(t==null?void 0:t.addNewLine),i=new hs(e),r=Array.from(i.compose(n.parse(l)));if(s&&t)for(const o of r)o.errors.forEach(Pt(l,t)),o.warnings.forEach(Pt(l,t));return r.length>0?r:Object.assign([],{empty:!0},i.streamInfo())}function tl(l,e={}){const{lineCounter:t,prettyErrors:s}=el(e),n=new ms(t==null?void 0:t.addNewLine),i=new hs(e);let r=null;for(const o of i.compose(n.parse(l),!0,l.length))if(!r)r=o;else if(r.options.logLevel!=="silent"){r.errors.push(new lt(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&t&&(r.errors.forEach(Pt(l,t)),r.warnings.forEach(Pt(l,t))),r}function Oi(l,e,t){let s;typeof e=="function"?s=e:t===void 0&&e&&typeof e=="object"&&(t=e);const n=tl(l,t);if(!n)return null;if(n.warnings.forEach(i=>kl(n.options.logLevel,i)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:s},t))}function Li(l,e,t){let s=null;if(typeof e=="function"||Array.isArray(e)?s=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){const n=Math.round(t);t=n<1?void 0:n>8?{indent:8}:{indent:n}}if(l===void 0){const{keepUndefined:n}=t??e??{};if(!n)return}return In(l)&&!s?l.toString(t):new pt(l,s,t).toString(t)}const Ms=Object.freeze(Object.defineProperty({__proto__:null,Alias:ls,CST:wl,Composer:hs,Document:pt,Lexer:Sn,LineCounter:Zn,Pair:wt,Parser:ms,Scalar:Oe,Schema:Ht,YAMLError:Cl,YAMLMap:Qe,YAMLParseError:lt,YAMLSeq:ot,YAMLWarning:En,isAlias:$l,isCollection:ze,isDocument:In,isMap:Cn,isNode:Dt,isPair:is,isScalar:at,isSeq:$n,parse:Oi,parseAllDocuments:Ai,parseDocument:tl,stringify:Li,visit:Tl,visitAsync:El},Symbol.toStringTag,{value:"Module"}));function Fs(l,e,t){const s=l.slice();return s[23]=e[t],s}function Vs(l){let e,t;return e=new Nn({props:{$$slots:{default:[Pi]},$$scope:{ctx:l}}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p(s,n){const i={};n&67108865&&(i.$$scope={dirty:n,ctx:s}),e.$set(i)},i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function Pi(l){let e=l[0].description+"",t;return{c(){t=Z(e)},l(s){t=Q(s,e)},m(s,n){N(s,t,n)},p(s,n){n&1&&e!==(e=s[0].description+"")&&he(t,e)},d(s){s&&h(t)}}}function Bs(l){let e,t="*";return{c(){e=b("sup"),e.textContent=t,this.h()},l(s){e=y(s,"SUP",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-1lfjahc"&&(e.textContent=t),this.h()},h(){_(e,"class","text-red-500")},m(s,n){N(s,e,n)},d(s){s&&h(e)}}}function Di(l){let e,t,s;return{c(){e=b("input"),this.h()},l(n){e=y(n,"INPUT",{type:!0,class:!0}),this.h()},h(){e.disabled=l[6],_(e,"type","file"),_(e,"class","svelte-wh0uj")},m(n,i){N(n,e,i),t||(s=de(e,"change",l[8]),t=!0)},p(n,i){i&64&&(e.disabled=n[6])},d(n){n&&h(e),t=!1,s()}}}function ji(l){let e,t,s,n,i,r=pe(l[0].options),o=[];for(let a=0;al[20].call(e))},m(a,c){N(a,e,c),m(e,t);for(let u=0;uZe(t,"options",i)),{c(){e=b("section"),G(t.$$.fragment),this.h()},l(a){e=y(a,"SECTION",{class:!0});var c=P(e);X(t.$$.fragment,c),c.forEach(h),this.h()},h(){_(e,"class","ml-4 flex flex-col gap-2 mt-2")},m(a,c){N(a,e,c),Y(t,e,null),n=!0},p(a,c){var f;const u={};c&2&&(u.rootOptions=a[1]),c&4&&(u.reveal=a[2]),c&64&&(u.disabled=a[6]),c&17&&(u.optionSpec=(f=a[0].children)==null?void 0:f[a[4]]),!s&&c&8&&(s=!0,u.options=a[3],We(()=>s=!1)),t.$set(u)},i(a){n||(V(t.$$.fragment,a),n=!0)},o(a){H(t.$$.fragment,a),n=!1},d(a){a&&h(e),J(t)}}}function Ki(l){var R,A;let e,t,s,n,i,r,o,a,c,u,f,d,p,g,k=Object.keys(((A=(R=l[0])==null?void 0:R.children)==null?void 0:A[l[4]])??{}).length,v,w=l[0].description&&Vs(l),C=l[0].required&&Bs();function S(B,E){if(E&1&&(p=null),B[0].type==="string")return Bi;if(B[0].type==="multiline")return Vi;if(B[0].type==="boolean")return Fi;if(B[0].type==="number")return Mi;if(p==null&&(p=!!(B[0].type==="select"&&Array.isArray(B[0].options))),p)return ji;if(B[0].type==="file")return Di}let F=S(l,-1),M=F&&F(l),$=k&&Hs(l);return{c(){e=b("div"),t=b("label"),s=b("div"),n=b("p"),w&&w.c(),i=D(),r=b("span"),o=Z(l[7]),a=D(),C&&C.c(),c=D(),u=b("p"),f=Z(l[5]),d=D(),M&&M.c(),g=D(),$&&$.c(),this.h()},l(B){e=y(B,"DIV",{class:!0});var E=P(e);t=y(E,"LABEL",{class:!0});var I=P(t);s=y(I,"DIV",{class:!0});var O=P(s);n=y(O,"P",{class:!0});var L=P(n);w&&w.l(L),i=j(L),r=y(L,"SPAN",{});var T=P(r);o=Q(T,l[7]),a=j(T),C&&C.l(T),T.forEach(h),L.forEach(h),c=j(O),u=y(O,"P",{class:!0});var q=P(u);f=Q(q,l[5]),q.forEach(h),O.forEach(h),d=j(I),M&&M.l(I),I.forEach(h),g=j(E),$&&$.l(E),E.forEach(h),this.h()},h(){_(n,"class","flex items-center gap-1"),_(u,"class","text-red-500 text-xs font-bold"),_(s,"class","mr-2 inline-flex flex-col gap-1"),_(t,"class","flex justify-between w-full items-start"),Ve(t,"h-11",l[0].type!=="multiline"),Ve(t,"h-auto",l[0].type==="multiline"),_(e,"class","w-full")},m(B,E){N(B,e,E),m(e,t),m(t,s),m(s,n),w&&w.m(n,null),m(n,i),m(n,r),m(r,o),m(r,a),C&&C.m(r,null),m(s,c),m(s,u),m(u,f),m(t,d),M&&M.m(t,null),m(e,g),$&&$.m(e,null),v=!0},p(B,[E]){var I,O;B[0].description?w?(w.p(B,E),E&1&&V(w,1)):(w=Vs(B),w.c(),V(w,1),w.m(n,i)):w&&(_e(),H(w,1,1,()=>{w=null}),ve()),(!v||E&128)&&he(o,B[7]),B[0].required?C||(C=Bs(),C.c(),C.m(r,null)):C&&(C.d(1),C=null),(!v||E&32)&&he(f,B[5]),F===(F=S(B,E))&&M?M.p(B,E):(M&&M.d(1),M=F&&F(B),M&&(M.c(),M.m(t,null))),(!v||E&1)&&Ve(t,"h-11",B[0].type!=="multiline"),(!v||E&1)&&Ve(t,"h-auto",B[0].type==="multiline"),E&17&&(k=Object.keys(((O=(I=B[0])==null?void 0:I.children)==null?void 0:O[B[4]])??{}).length),k?$?($.p(B,E),E&17&&V($,1)):($=Hs(B),$.c(),V($,1),$.m(e,null)):$&&(_e(),H($,1,1,()=>{$=null}),ve())},i(B){v||(V(w),V($),v=!0)},o(B){H(w),H($),v=!1},d(B){B&&h(e),w&&w.d(),C&&C.d(),M&&M.d(),$&&$.d()}}}function xi(l,e,t){let s,n,i,{spec:r}=e,{key:o}=e,{options:a}=e,{disabled:c}=e,{rootOptions:u}=e,{reveal:f}=e;const d=`_${o}`;let p,g;r.children?r.nest?(p=d,g=a[o]??{}):(p=o,g=a):(p=o,g={});let k=a[p],v={};async function w(E){if(!E.target)return;const{files:I}=E.target;if(!I)return;const[O]=I;switch(r.fileFormat){case"json":try{t(9,a[p]=await O.text().then(L=>JSON.parse(L)),a)}catch(L){t(5,C="Failed to parse YAML file"),console.warn(L)}break;case"yaml":try{t(9,a[p]=await O.text().then(L=>Ms.parse(L)),a)}catch(L){t(5,C="Failed to parse JSON file"),console.warn(L)}break;default:{const L=await O.text();try{t(9,a[p]=JSON.parse(L),a);break}catch{}try{t(9,a[p]=Ms.parse(L),a);break}catch{}t(9,a[p]=await O.text(),a);break}}}let C="";function S(){k=this.value,t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function F(){k=this.value,t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function M(){k=this.value,t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function $(){k=this.checked,t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function R(){k=bn(this.value),t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function A(){k=$t(this),t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function B(E){g=E,t(3,g),t(0,r),t(4,k),t(10,o),t(9,a),t(13,v),t(12,p),t(14,n),t(1,u)}return l.$$set=E=>{"spec"in E&&t(0,r=E.spec),"key"in E&&t(10,o=E.key),"options"in E&&t(9,a=E.options),"disabled"in E&&t(11,c=E.disabled),"rootOptions"in E&&t(1,u=E.rootOptions),"reveal"in E&&t(2,f=E.reveal)},l.$$.update=()=>{var E,I,O;if(l.$$.dirty&1025&&t(7,s=r.title??o),l.$$.dirty&3&&t(14,n=r.references?Sl.query(u,r.references):null),l.$$.dirty&16384&&n!=null&&n.length&&t(4,k=n[0]),l.$$.dirty&13849)if(r!=null&&r.children&&!Object.keys(r.children[k]??{}).length){if(t(9,a[o]=k,a),delete a[d],typeof g=="object")for(const L of Object.keys(v))delete g[L];else console.warn(`child_value_target was unexpectedly not an object ${g}`,{key:o,options:a,spec:r});t(13,v=((E=r==null?void 0:r.children)==null?void 0:E[k])??{})}else(I=r==null?void 0:r.children)!=null&&I[k]&&(r.nest?(t(12,p=d),typeof a[o]!="object"&&t(9,a[o]={},a),t(3,g=a[o])):(t(12,p=o),t(3,g=a)),t(9,a[p]=k,a),t(13,v=((O=r==null?void 0:r.children)==null?void 0:O[k])??{}));l.$$.dirty&4112&&t(9,a[p]=k,a),l.$$.dirty&18433&&t(6,i=c||r.forceReference||r.references&&n!==null)},[r,u,f,g,k,C,i,s,w,a,o,c,p,v,n,S,F,M,$,R,A,B]}class zi extends ye{constructor(e){super(),ke(this,e,xi,Ki,be,{spec:0,key:10,options:9,disabled:11,rootOptions:1,reveal:2})}}function Rs(l,e,t){const s=l.slice();return s[6]=e[t][0],s[7]=e[t][1],s}function Us(l){let e,t,s;function n(r){l[5](r)}let i={reveal:l[4],disabled:l[2],key:l[6],spec:l[7],rootOptions:l[3]};return l[0]!==void 0&&(i.options=l[0]),e=new zi({props:i}),Xe.push(()=>Ze(e,"options",n)),{c(){G(e.$$.fragment)},l(r){X(e.$$.fragment,r)},m(r,o){Y(e,r,o),s=!0},p(r,o){const a={};o&16&&(a.reveal=r[4]),o&4&&(a.disabled=r[2]),o&2&&(a.key=r[6]),o&2&&(a.spec=r[7]),o&8&&(a.rootOptions=r[3]),!t&&o&1&&(t=!0,a.options=r[0],We(()=>t=!1)),e.$set(a)},i(r){s||(V(e.$$.fragment,r),s=!0)},o(r){H(e.$$.fragment,r),s=!1},d(r){J(e,r)}}}function Gi(l){let e,t,s=pe(Object.entries(l[1])),n=[];for(let r=0;rH(n[r],1,1,()=>{n[r]=null});return{c(){for(let r=0;r{"optionSpec"in c&&t(1,s=c.optionSpec),"options"in c&&t(0,n=c.options),"disabled"in c&&t(2,i=c.disabled),"rootOptions"in c&&t(3,r=c.rootOptions),"reveal"in c&&t(4,o=c.reveal)},[n,s,i,r,o,a]}class sl extends ye{constructor(e){super(),ke(this,e,Yi,Gi,be,{optionSpec:1,options:0,disabled:2,rootOptions:3,reveal:4})}}function Ji(l){let e,t="Configuration Updated";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-c31ocd"&&(e.textContent=t),this.h()},h(){_(e,"class","text-green-500 font-bold text-xs")},m(s,n){N(s,e,n)},p:ee,d(s){s&&h(e)}}}function Xi(l){let e,t;return{c(){e=b("p"),t=Z(l[3]),this.h()},l(s){e=y(s,"P",{class:!0});var n=P(e);t=Q(n,l[3]),n.forEach(h),this.h()},h(){_(e,"class","text-red-500 font-bold text-xs")},m(s,n){N(s,e,n),m(e,t)},p(s,n){n&8&&he(t,s[3])},d(s){s&&h(e)}}}function Ks(l){let e,t,s,n="Source Options",i,r,o,a;function c(f){l[15](f)}let u={reveal:l[2],disabled:l[4]||l[7],rootOptions:l[0].options,optionSpec:l[1].options};return l[0].options!==void 0&&(u.options=l[0].options),r=new sl({props:u}),Xe.push(()=>Ze(r,"options",c)),{c(){e=b("hr"),t=D(),s=b("h4"),s.textContent=n,i=D(),G(r.$$.fragment),this.h()},l(f){e=y(f,"HR",{}),t=j(f),s=y(f,"H4",{class:!0,"data-svelte-h":!0}),K(s)!=="svelte-4l22ps"&&(s.textContent=n),i=j(f),X(r.$$.fragment,f),this.h()},h(){_(s,"class","text-xs uppercase text-gray-600 font-bold")},m(f,d){N(f,e,d),N(f,t,d),N(f,s,d),N(f,i,d),Y(r,f,d),a=!0},p(f,d){const p={};d&4&&(p.reveal=f[2]),d&144&&(p.disabled=f[4]||f[7]),d&1&&(p.rootOptions=f[0].options),d&2&&(p.optionSpec=f[1].options),!o&&d&1&&(o=!0,p.options=f[0].options,We(()=>o=!1)),r.$set(p)},i(f){a||(V(r.$$.fragment,f),a=!0)},o(f){H(r.$$.fragment,f),a=!1},d(f){f&&(h(e),h(t),h(s),h(i)),J(r,f)}}}function Wi(l){let e,t="Connection Successful!";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-odatav"&&(e.textContent=t),this.h()},h(){_(e,"class","text-green-500 font-bold text-xs")},m(s,n){N(s,e,n)},p:ee,d(s){s&&h(e)}}}function Zi(l){let e,t;return{c(){e=b("p"),t=Z(l[6]),this.h()},l(s){e=y(s,"P",{class:!0});var n=P(e);t=Q(n,l[6]),n.forEach(h),this.h()},h(){_(e,"class","text-red-500 font-bold text-xs")},m(s,n){N(s,e,n),m(e,t)},p(s,n){n&64&&he(t,s[6])},d(s){s&&h(e)}}}function Qi(l){let e=l[7]?"Loading...":"Test Connection",t;return{c(){t=Z(e)},l(s){t=Q(s,e)},m(s,n){N(s,t,n)},p(s,n){n&128&&e!==(e=s[7]?"Loading...":"Test Connection")&&he(t,e)},d(s){s&&h(t)}}}function er(l){let e;return{c(){e=Z("Confirm Changes")},l(t){e=Q(t,"Confirm Changes")},m(t,s){N(t,e,s)},d(t){t&&h(e)}}}function tr(l){let e,t,s,n=l[0].name+"",i,r,o,a,c,u="Source Info",f,d,p,g,k,v,w,C,S,F,M,$,R,A,B=Object.keys(l[1].options).length,E,I,O,L,T,q,U,W,x,z,se,ne;function $e(te,le){if(te[3])return Xi;if(te[5])return Ji}let Ee=$e(l),ae=Ee&&Ee(l);function Se(te){l[12](te)}function ie(te){l[13](te)}let ue={};l[0].name!==void 0&&(ue.sourceName=l[0].name),l[9]!==void 0&&(ue.nameError=l[9]),d=new Dn({props:ue}),Xe.push(()=>Ze(d,"sourceName",Se)),Xe.push(()=>Ze(d,"nameError",ie));let oe=B&&Ks(l);function we(te,le){if(te[6])return Zi;if(te[8])return Wi}let Ce=we(l),re=Ce&&Ce(l);return U=new ft({props:{outline:!0,size:"md",formaction:"?/testSource",disabled:l[7]||l[4],icon:Il,$$slots:{default:[Qi]},$$scope:{ctx:l}}}),x=new ft({props:{variant:"success",icon:wn,size:"md",disabled:l[4]||l[7],type:"submit",$$slots:{default:[er]},$$scope:{ctx:l}}}),{c(){e=b("form"),t=b("h3"),s=Z("Configure "),i=Z(n),r=D(),o=b("section"),ae&&ae.c(),a=D(),c=b("h4"),c.textContent=u,f=D(),G(d.$$.fragment),k=D(),v=b("label"),w=Z(`Source Type `),C=b("input"),F=D(),M=b("label"),$=Z(`Reveal Secret Values `),R=b("input"),A=D(),oe&&oe.c(),E=D(),I=b("input"),L=D(),T=b("div"),re&&re.c(),q=D(),G(U.$$.fragment),W=D(),G(x.$$.fragment),this.h()},l(te){e=y(te,"FORM",{action:!0,method:!0,class:!0});var le=P(e);t=y(le,"H3",{class:!0});var Ne=P(t);s=Q(Ne,"Configure "),i=Q(Ne,n),Ne.forEach(h),r=j(le),o=y(le,"SECTION",{class:!0});var Te=P(o);ae&&ae.l(Te),a=j(Te),c=y(Te,"H4",{class:!0,"data-svelte-h":!0}),K(c)!=="svelte-1itqiv6"&&(c.textContent=u),f=j(Te),X(d.$$.fragment,Te),k=j(Te),v=y(Te,"LABEL",{class:!0});var De=P(v);w=Q(De,`Source Type `),C=y(De,"INPUT",{class:!0}),De.forEach(h),F=j(Te),M=y(Te,"LABEL",{class:!0});var je=P(M);$=Q(je,`Reveal Secret Values `),R=y(je,"INPUT",{type:!0,class:!0}),je.forEach(h),A=j(Te),oe&&oe.l(Te),Te.forEach(h),E=j(le),I=y(le,"INPUT",{type:!0,name:!0}),L=j(le),T=y(le,"DIV",{class:!0});var Re=P(T);re&&re.l(Re),q=j(Re),X(U.$$.fragment,Re),W=j(Re),X(x.$$.fragment,Re),Re.forEach(h),le.forEach(h),this.h()},h(){_(t,"class","text-sm uppercase gray-600 font-bold"),_(c,"class","text-xs uppercase text-gray-600 font-bold"),C.disabled=!0,C.value=S=l[0].type,_(C,"class","rounded border border-gray-300 p-1 ml-auto w-2/3 text-gray-950 align-middle text-sm"),_(v,"class","flex justify-between"),_(R,"type","checkbox"),_(R,"class","rounded border border-gray-300 p-1 ml-auto w-5 text-gray-950 align-middle text-sm"),_(M,"class","flex justify-between"),_(o,"class","flex flex-col gap-2"),_(I,"type","hidden"),I.value=O=JSON.stringify(l[0]),_(I,"name","source"),_(T,"class","flex gap-2 justify-end items-center mt-4"),_(e,"action","?/updateSource"),_(e,"method","POST"),_(e,"class","w-full bg-gray-100 px-4 py-2 rounded")},m(te,le){N(te,e,le),m(e,t),m(t,s),m(t,i),m(e,r),m(e,o),ae&&ae.m(o,null),m(o,a),m(o,c),m(o,f),Y(d,o,null),m(o,k),m(o,v),m(v,w),m(v,C),m(o,F),m(o,M),m(M,$),m(M,R),R.checked=l[2],m(o,A),oe&&oe.m(o,null),m(e,E),m(e,I),m(e,L),m(e,T),re&&re.m(T,null),m(T,q),Y(U,T,null),m(T,W),Y(x,T,null),z=!0,se||(ne=[de(R,"change",l[14]),nl(ii.call(null,e,l[10]))],se=!0)},p(te,[le]){(!z||le&1)&&n!==(n=te[0].name+"")&&he(i,n),Ee===(Ee=$e(te))&&ae?ae.p(te,le):(ae&&ae.d(1),ae=Ee&&Ee(te),ae&&(ae.c(),ae.m(o,a)));const Ne={};!p&&le&1&&(p=!0,Ne.sourceName=te[0].name,We(()=>p=!1)),!g&&le&512&&(g=!0,Ne.nameError=te[9],We(()=>g=!1)),d.$set(Ne),(!z||le&1&&S!==(S=te[0].type)&&C.value!==S)&&(C.value=S),le&4&&(R.checked=te[2]),le&2&&(B=Object.keys(te[1].options).length),B?oe?(oe.p(te,le),le&2&&V(oe,1)):(oe=Ks(te),oe.c(),V(oe,1),oe.m(o,null)):oe&&(_e(),H(oe,1,1,()=>{oe=null}),ve()),(!z||le&1&&O!==(O=JSON.stringify(te[0])))&&(I.value=O),Ce===(Ce=we(te))&&re?re.p(te,le):(re&&re.d(1),re=Ce&&Ce(te),re&&(re.c(),re.m(T,q)));const Te={};le&144&&(Te.disabled=te[7]||te[4]),le&131200&&(Te.$$scope={dirty:le,ctx:te}),U.$set(Te);const De={};le&144&&(De.disabled=te[4]||te[7]),le&131072&&(De.$$scope={dirty:le,ctx:te}),x.$set(De)},i(te){z||(V(d.$$.fragment,te),V(oe),V(U.$$.fragment,te),V(x.$$.fragment,te),z=!0)},o(te){H(d.$$.fragment,te),H(oe),H(U.$$.fragment,te),H(x.$$.fragment,te),z=!1},d(te){te&&h(e),ae&&ae.d(),J(d),oe&&oe.d(),re&&re.d(),J(U),J(x),se=!1,Ge(ne)}}}function sr(l,e,t){let{sourcePlugin:s}=e,{source:n}=e,{sources:i}=e;const r=vn();let o;n.initialName=n.name;let a="",c=!1,u=!1,f="",d=!1,p=!1,g="";const k=({action:F,cancel:M})=>{if(t(4,c=!1),t(7,d=!1),t(9,g=Pn(n.name,i.filter($=>$!==n))),g){M();return}switch(F.search){case"?/updateSource":t(4,c=!0),t(3,a=""),t(5,u=!1);break;case"?/testSource":t(7,d=!0),t(6,f=""),t(8,p=!1);break}return({result:$,action:R})=>{var A;if($.type==="failure"){if(typeof $.data=="string")t(3,a=$.data);else if(typeof $.data=="object"&&"message"in $.data)switch(R.search){case"?/updateSource":t(3,a=$.data.message);break;case"?/testSource":t(6,f=$.data.message);break}else t(3,a="Error saving datasource.");t(4,c=!1),t(5,u=!1),t(7,d=!1),t(8,p=!1);return}switch(R.search){case"?/updateSource":$.type==="success"&&Object.assign(n,(A=$.data)==null?void 0:A.updatedSource),t(4,c=!1),t(5,u=!0),r("sourceUpdated",n);break;case"?/testSource":$.type==="success"&&t(6,f=""),t(7,d=!1),t(8,p=!0);break}}};function v(F){l.$$.not_equal(n.name,F)&&(n.name=F,t(0,n))}function w(F){g=F,t(9,g)}function C(){o=this.checked,t(2,o)}function S(F){l.$$.not_equal(n.options,F)&&(n.options=F,t(0,n))}return l.$$set=F=>{"sourcePlugin"in F&&t(1,s=F.sourcePlugin),"source"in F&&t(0,n=F.source),"sources"in F&&t(11,i=F.sources)},[n,s,o,a,c,u,f,d,p,g,k,i,v,w,C,S]}class nr extends ye{constructor(e){super(),ke(this,e,sr,tr,be,{sourcePlugin:1,source:0,sources:11})}}function lr(l){let e,t;return e=new Me({props:{src:Al,class:"w-6 h-6"}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p:ee,i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function ir(l){let e,t;return e=new Me({props:{src:Ol,class:"w-6 h-6 text-red-500"}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p:ee,i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function rr(l){let e,t;return e=new Me({props:{src:Wt[l[4]],class:"w-6 h-6"}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p(s,n){const i={};n&16&&(i.src=Wt[s[4]]),e.$set(i)},i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function or(l){let e,t;return e=new Me({props:{src:Xt[l[4]],class:"w-6 h-6"}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p(s,n){const i={};n&16&&(i.src=Xt[s[4]]),e.$set(i)},i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function xs(l){let e,t,s=l[0].type+"",n,i,r,o,a;return o=new Nn({props:{$$slots:{default:[ar]},$$scope:{ctx:l}}}),{c(){e=b("p"),t=Z("No connector for "),n=Z(s),i=Z(" is available"),r=D(),G(o.$$.fragment),this.h()},l(c){e=y(c,"P",{class:!0});var u=P(e);t=Q(u,"No connector for "),n=Q(u,s),i=Q(u," is available"),u.forEach(h),r=j(c),X(o.$$.fragment,c),this.h()},h(){_(e,"class","text-red-500 font-bold")},m(c,u){N(c,e,u),m(e,t),m(e,n),m(e,i),N(c,r,u),Y(o,c,u),a=!0},p(c,u){(!a||u&1)&&s!==(s=c[0].type+"")&&he(n,s);const f={};u&2048&&(f.$$scope={dirty:u,ctx:c}),o.$set(f)},i(c){a||(V(o.$$.fragment,c),a=!0)},o(c){H(o.$$.fragment,c),a=!1},d(c){c&&(h(e),h(r)),J(o,c)}}}function ar(l){let e;return{c(){e=Z("Make sure you have installed it, and included it in your evidence.plugins.yaml file")},l(t){e=Q(t,"Make sure you have installed it, and included it in your evidence.plugins.yaml file")},m(t,s){N(t,e,s)},d(t){t&&h(e)}}}function cr(l){let e;return{c(){e=Z("Edit")},l(t){e=Q(t,"Edit")},m(t,s){N(t,e,s)},d(t){t&&h(e)}}}function zs(l){let e,t,s,n;return t=new nr({props:{sources:l[1],source:l[0],sourcePlugin:l[2]}}),t.$on("sourceUpdated",l[10]),{c(){e=b("div"),G(t.$$.fragment),this.h()},l(i){e=y(i,"DIV",{class:!0});var r=P(e);X(t.$$.fragment,r),r.forEach(h),this.h()},h(){_(e,"class","col-span-4")},m(i,r){N(i,e,r),Y(t,e,null),n=!0},p(i,r){const o={};r&2&&(o.sources=i[1]),r&1&&(o.source=i[0]),r&4&&(o.sourcePlugin=i[2]),t.$set(o)},i(i){n||(V(t.$$.fragment,i),i&&Ae(()=>{n&&(s||(s=qe(e,He,{},!0)),s.run(1))}),n=!0)},o(i){H(t.$$.fragment,i),i&&(s||(s=qe(e,He,{},!1)),s.run(0)),n=!1},d(i){i&&h(e),J(t),i&&s&&s.end()}}}function ur(l){let e,t,s,n,i,r,o,a=l[0].name+"",c,u,f,d,p=l[0].type+"",g,k,v,w,C,S,F,M,$;const R=[or,rr,ir,lr],A=[];function B(O,L){return L&16&&(t=null),L&16&&(s=null),t==null&&(t=!!O[5](O[4])),t?0:(s==null&&(s=!!O[6](O[4])),s?1:O[2]?3:2)}n=B(l,-1),i=A[n]=R[n](l);let E=!l[2]&&xs(l);S=new ft({props:{size:"md",icon:Nl,disabled:!l[2],$$slots:{default:[cr]},$$scope:{ctx:l}}}),S.$on("click",l[9]);let I=l[3]&&zs(l);return{c(){e=b("div"),i.c(),r=D(),o=b("p"),c=Z(a),u=D(),f=b("div"),d=b("p"),g=Z(p),v=D(),E&&E.c(),w=D(),C=b("div"),G(S.$$.fragment),F=D(),I&&I.c(),M=me(),this.h()},l(O){e=y(O,"DIV",{class:!0});var L=P(e);i.l(L),r=j(L),o=y(L,"P",{});var T=P(o);c=Q(T,a),T.forEach(h),u=j(L),f=y(L,"DIV",{class:!0});var q=P(f);d=y(q,"P",{title:!0});var U=P(d);g=Q(U,p),U.forEach(h),v=j(q),E&&E.l(q),q.forEach(h),w=j(L),C=y(L,"DIV",{class:!0});var W=P(C);X(S.$$.fragment,W),W.forEach(h),L.forEach(h),F=j(O),I&&I.l(O),M=me(),this.h()},h(){var O;_(d,"title",k=(O=l[2])==null?void 0:O.package.package.name),_(f,"class","flex gap-2 items-center"),_(C,"class","flex justify-end"),_(e,"class","contents text-xs odd:bg-gray-200")},m(O,L){N(O,e,L),A[n].m(e,null),m(e,r),m(e,o),m(o,c),m(e,u),m(e,f),m(f,d),m(d,g),m(f,v),E&&E.m(f,null),m(e,w),m(e,C),Y(S,C,null),N(O,F,L),I&&I.m(O,L),N(O,M,L),$=!0},p(O,[L]){var U;let T=n;n=B(O,L),n===T?A[n].p(O,L):(_e(),H(A[T],1,1,()=>{A[T]=null}),ve(),i=A[n],i?i.p(O,L):(i=A[n]=R[n](O),i.c()),V(i,1),i.m(e,r)),(!$||L&1)&&a!==(a=O[0].name+"")&&he(c,a),(!$||L&1)&&p!==(p=O[0].type+"")&&he(g,p),(!$||L&4&&k!==(k=(U=O[2])==null?void 0:U.package.package.name))&&_(d,"title",k),O[2]?E&&(_e(),H(E,1,1,()=>{E=null}),ve()):E?(E.p(O,L),L&4&&V(E,1)):(E=xs(O),E.c(),V(E,1),E.m(f,null));const q={};L&4&&(q.disabled=!O[2]),L&2048&&(q.$$scope={dirty:L,ctx:O}),S.$set(q),O[3]?I?(I.p(O,L),L&8&&V(I,1)):(I=zs(O),I.c(),V(I,1),I.m(M.parentNode,M)):I&&(_e(),H(I,1,1,()=>{I=null}),ve())},i(O){$||(V(i),V(E),V(S.$$.fragment,O),V(I),$=!0)},o(O){H(i),H(E),H(S.$$.fragment,O),H(I),$=!1},d(O){O&&(h(e),h(F),h(M)),A[n].d(),E&&E.d(),J(S),I&&I.d(O)}}}function fr(l,e,t){let s,n,{source:i}=e,{sources:r}=e,{availableSourcePlugins:o}=e,{startOpen:a=!1}=e,c=a;const u=g=>typeof g<"u"&&g in Xt,f=g=>typeof g<"u"&&g in Wt,d=()=>t(3,c=!c),p=g=>t(0,i=g.detail);return l.$$set=g=>{"source"in g&&t(0,i=g.source),"sources"in g&&t(1,r=g.sources),"availableSourcePlugins"in g&&t(7,o=g.availableSourcePlugins),"startOpen"in g&&t(8,a=g.startOpen)},l.$$.update=()=>{l.$$.dirty&129&&t(2,s=o==null?void 0:o[i.type]),l.$$.dirty&4&&t(4,n=s==null?void 0:s.package.package.evidence.icon)},[i,r,s,c,n,u,f,o,a,d,p]}class dr extends ye{constructor(e){super(),ke(this,e,fr,ur,be,{source:0,sources:1,availableSourcePlugins:7,startOpen:8})}}function Gs(l,e,t){const s=l.slice();return s[8]=e[t],s}function Ys(l,e,t){const s=l.slice();return s[11]=e[t],s}function hr(l){let e,t,s;return t=new jn({props:{ghost:!0,availablePackages:l[5]}}),t.$on("newSource",l[6]),{c(){e=b("section"),G(t.$$.fragment),this.h()},l(n){e=y(n,"SECTION",{class:!0});var i=P(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","col-span-4")},m(n,i){N(n,e,i),Y(t,e,null),s=!0},p(n,i){const r={};i&32&&(r.availablePackages=n[5]),t.$set(r)},i(n){s||(V(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function mr(l){let e,t='

Name

Type

',s,n,i,r,o,a,c,u,f=l[4].length&&Js(l),d=pe(l[1]),p=[];for(let v=0;vH(p[v],1,1,()=>{p[v]=null});o=new ft({props:{icon:Ll,size:"md",variant:"success",$$slots:{default:[pr]},$$scope:{ctx:l}}}),o.$on("click",l[7]);let k=l[2]&&Zs(l);return{c(){e=b("div"),e.innerHTML=t,s=D(),f&&f.c(),n=D();for(let v=0;v{k=null}),ve())},i(v){if(!u){for(let w=0;wConfiguring Data Sources →`,g;const k=[mr,hr],v=[];function w(C,S){return C[1].length>0?0:1}return o=w(l),a=v[o]=k[o](l),{c(){e=b("section"),t=b("div"),s=b("h2"),s.textContent=n,i=D(),r=b("div"),a.c(),c=D(),u=b("div"),f=D(),d=b("div"),d.innerHTML=p,this.h()},l(C){e=y(C,"SECTION",{class:!0});var S=P(e);t=y(S,"DIV",{class:!0});var F=P(t);s=y(F,"H2",{class:!0,"data-svelte-h":!0}),K(s)!=="svelte-timue1"&&(s.textContent=n),i=j(F),r=y(F,"DIV",{class:!0});var M=P(r);a.l(M),M.forEach(h),c=j(F),u=y(F,"DIV",{}),P(u).forEach(h),F.forEach(h),f=j(S),d=y(S,"DIV",{class:!0,"data-svelte-h":!0}),K(d)!=="svelte-ple3bn"&&(d.innerHTML=p),S.forEach(h),this.h()},h(){_(s,"class","font-semibold text-lg mb-2"),_(r,"class","grid grid-rows-auto source-config-table gap-x-2 gap-y-2 justify-center items-center w-full svelte-2j5e0k"),_(t,"class","p-3 rounded-t w-full border-gray-200 border-t border-l border-r"),_(d,"class","p-4 rounded-b w-full bg-gray-100 text-sm border-[1px] border-gray-200"),_(e,"class","w-full mt-8")},m(C,S){N(C,e,S),m(e,t),m(t,s),m(t,i),m(t,r),v[o].m(r,null),m(t,c),m(t,u),m(e,f),m(e,d),g=!0},p(C,[S]){let F=o;o=w(C),o===F?v[o].p(C,S):(_e(),H(v[F],1,1,()=>{v[F]=null}),ve(),a=v[o],a?a.p(C,S):(a=v[o]=k[o](C),a.c()),V(a,1),a.m(r,null))},i(C){g||(V(a),g=!0)},o(C){H(a),g=!1},d(C){C&&h(e),v[o].d()}}}function _r(l,e,t){let s,{availableSourcePlugins:n={}}=e,{sources:i=[]}=e,r=i.length===0,o;function a(f){const{newSourceType:d,newSourceName:p}=f.detail;d&&(i.push({name:p,type:d,options:{},environmentVariables:{}}),t(3,o=p),t(2,r=!1))}let c=[];const u=()=>t(2,r=!r);return l.$$set=f=>{"availableSourcePlugins"in f&&t(0,n=f.availableSourcePlugins),"sources"in f&&t(1,i=f.sources)},l.$$.update=()=>{if(l.$$.dirty&1&&t(5,s=Object.values(n).reduce((f,d)=>{const p=d.package.package;return f[p.name]||(f[p.name]=d),f},{})),l.$$.dirty&2&&i.length){const f=i.reduce((d,p)=>(d.sourceNames.has(p.name)&&d.duplicateNames.add(p.name),d.sourceNames.add(p.name),d),{sourceNames:new Set,duplicateNames:new Set});t(4,c=Array.from(f.duplicateNames))}},[n,i,r,o,c,s,a,u]}class vr extends ye{constructor(e){super(),ke(this,e,_r,gr,be,{availableSourcePlugins:0,sources:1})}}function br(l){let e,t="Deploying to Evidence Cloud",s,n,i="Evidence Cloud allows you to:",r,o,a,c,u,f="<",d,p,g=">",k,v,w,C,S="Authenticate users",F,M,$="Schedule updates to your data",R,A,B="Re-build when you push changes to your project",E,I,O='';return{c(){e=b("h2"),e.textContent=t,s=D(),n=b("p"),n.textContent=i,r=D(),o=b("ul"),a=b("li"),c=Z("Host your project at "),u=b("code"),d=Z(f),p=Z("project-name"),k=Z(g),v=Z(".evidence.app"),w=D(),C=b("li"),C.textContent=S,F=D(),M=b("li"),M.textContent=$,R=D(),A=b("li"),A.textContent=B,E=D(),I=b("div"),I.innerHTML=O,this.h()},l(L){e=y(L,"H2",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-18vqxr8"&&(e.textContent=t),s=j(L),n=y(L,"P",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-1p7rrak"&&(n.textContent=i),r=j(L),o=y(L,"UL",{class:!0});var T=P(o);a=y(T,"LI",{class:!0});var q=P(a);c=Q(q,"Host your project at "),u=y(q,"CODE",{});var U=P(u);d=Q(U,f),p=Q(U,"project-name"),k=Q(U,g),v=Q(U,".evidence.app"),U.forEach(h),q.forEach(h),w=j(T),C=y(T,"LI",{class:!0,"data-svelte-h":!0}),K(C)!=="svelte-19f0lwd"&&(C.textContent=S),F=j(T),M=y(T,"LI",{class:!0,"data-svelte-h":!0}),K(M)!=="svelte-lawnhl"&&(M.textContent=$),R=j(T),A=y(T,"LI",{class:!0,"data-svelte-h":!0}),K(A)!=="svelte-1q65sxp"&&(A.textContent=B),T.forEach(h),E=j(L),I=y(L,"DIV",{class:!0,"data-svelte-h":!0}),K(I)!=="svelte-1ki3osy"&&(I.innerHTML=O),this.h()},h(){_(e,"class","svelte-1316edx"),_(n,"class","svelte-1316edx"),_(a,"class","svelte-1316edx"),_(C,"class","svelte-1316edx"),_(M,"class","svelte-1316edx"),_(A,"class","svelte-1316edx"),_(o,"class","svelte-1316edx"),_(I,"class","new-format-buttons my-3 svelte-1316edx")},m(L,T){N(L,e,T),N(L,s,T),N(L,n,T),N(L,r,T),N(L,o,T),m(o,a),m(a,c),m(a,u),m(u,d),m(u,p),m(u,k),m(u,v),m(o,w),m(o,C),m(o,F),m(o,M),m(o,R),m(o,A),N(L,E,T),N(L,I,T)},p:ee,i:ee,o:ee,d(L){L&&(h(e),h(s),h(n),h(r),h(o),h(E),h(I))}}}class yr extends ye{constructor(e){super(),ke(this,e,null,br,be,{})}}function kr(l){let e,t,s=(l[1]?"····················":l[0])+"",n;return{c(){e=b("span"),t=new yn(!1),this.h()},l(i){e=y(i,"SPAN",{});var r=P(e);t=kn(r,!1),r.forEach(h),this.h()},h(){t.a=null,Ve(e,"text-xs",l[2])},m(i,r){N(i,e,r),t.m(s,e)},p(i,r){r&3&&s!==(s=(i[1]?"····················":i[0])+"")&&t.p(s),r&4&&Ve(e,"text-xs",i[2])},i(i){i&&(n||Ae(()=>{n=yt(e,kt,{}),n.start()}))},o:ee,d(i){i&&h(e)}}}function wr(l){let e,t="Copied",s;return{c(){e=b("span"),e.textContent=t},l(n){e=y(n,"SPAN",{"data-svelte-h":!0}),K(e)!=="svelte-18eylsc"&&(e.textContent=t)},m(n,i){N(n,e,i)},p:ee,i(n){n&&(s||Ae(()=>{s=yt(e,kt,{}),s.start()}))},o:ee,d(n){n&&h(e)}}}function Cr(l){let e,t;return e=new An({props:{class:"bx--snippet__icon"}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function $r(l){let e,t;return e=new An({props:{class:"bx--snippet__icon",color:"var(--green-900)"}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function Tr(l){let e,t,s,n,i,r,o,a,c;function u(v,w){return v[4]?wr:kr}let f=u(l),d=f(l);const p=[$r,Cr],g=[];function k(v,w){return v[4]?0:1}return i=k(l),r=g[i]=p[i](l),{c(){e=b("button"),t=b("span"),d.c(),s=D(),n=b("div"),r.c(),this.h()},l(v){e=y(v,"BUTTON",{type:!0,class:!0});var w=P(e);t=y(w,"SPAN",{class:!0});var C=P(t);d.l(C),C.forEach(h),s=j(w),n=y(w,"DIV",{class:!0});var S=P(n);r.l(S),S.forEach(h),w.forEach(h),this.h()},h(){_(t,"class","var-value svelte-1bkhr6m"),_(n,"class","w-4 h-4"),_(e,"type","button"),_(e,"class","container h-6 w-6 svelte-1bkhr6m"),Ve(e,"copied",l[4])},m(v,w){N(v,e,w),m(e,t),d.m(t,null),m(e,s),m(e,n),g[i].m(n,null),o=!0,a||(c=de(e,"click",l[5]),a=!0)},p(v,[w]){f===(f=u(v))&&d?d.p(v,w):(d.d(1),d=f(v),d&&(d.c(),V(d,1),d.m(t,null)));let C=i;i=k(v),i!==C&&(_e(),H(g[C],1,1,()=>{g[C]=null}),ve(),r=g[i],r||(r=g[i]=p[i](v),r.c()),V(r,1),r.m(n,null)),(!o||w&16)&&Ve(e,"copied",v[4])},i(v){o||(V(d),V(r),o=!0)},o(v){H(r),o=!1},d(v){v&&h(e),d.d(),g[i].d(),a=!1,c()}}}function Er(l,e,t){let{text:s=void 0}=e,{hideText:n=!1}=e,{small:i=!1}=e,r=!1;const o=function(){t(4,r=!1)};let{copy:a=async u=>{try{r||(await navigator.clipboard.writeText(u),t(4,r=!0),setTimeout(o,2e3))}catch{}}}=e;const c=()=>{s!==void 0&&a(s)};return l.$$set=u=>{"text"in u&&t(0,s=u.text),"hideText"in u&&t(1,n=u.hideText),"small"in u&&t(2,i=u.small),"copy"in u&&t(3,a=u.copy)},[s,n,i,a,r,c]}class Ke extends ye{constructor(e){super(),ke(this,e,Er,Tr,be,{text:0,hideText:1,small:2,copy:3})}}function Sr(l){let e,t="Deploying to Netlify",s,n,i='
  • Start a new netlify project →
  • Choose the repo containing this project
  • Update the site settings to match those below
  • ',r,o,a="Basic Build Settings",c,u,f,d="Build command",p,g,k,v,w,C,S="Publish directory",F,M,$,R,A,B="Advanced Build Settings",E,I,O=`Click 'Show Advanced' add your environment variables.`,L;return k=new Ke({props:{text:"npm run sources && npm run build"}}),$=new Ke({props:{text:"build/"}}),{c(){e=b("h2"),e.textContent=t,s=D(),n=b("ol"),n.innerHTML=i,r=D(),o=b("div"),o.textContent=a,c=D(),u=b("div"),f=b("span"),f.textContent=d,p=D(),g=b("div"),G(k.$$.fragment),v=D(),w=b("div"),C=b("span"),C.textContent=S,F=D(),M=b("div"),G($.$$.fragment),R=D(),A=b("div"),A.textContent=B,E=D(),I=b("p"),I.innerHTML=O,this.h()},l(T){e=y(T,"H2",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-a8hbx"&&(e.textContent=t),s=j(T),n=y(T,"OL",{"data-svelte-h":!0}),K(n)!=="svelte-1krc6dk"&&(n.innerHTML=i),r=j(T),o=y(T,"DIV",{class:!0,"data-svelte-h":!0}),K(o)!=="svelte-dxwvxl"&&(o.textContent=a),c=j(T),u=y(T,"DIV",{class:!0});var q=P(u);f=y(q,"SPAN",{class:!0,"data-svelte-h":!0}),K(f)!=="svelte-1fx13w6"&&(f.textContent=d),p=j(q),g=y(q,"DIV",{class:!0});var U=P(g);X(k.$$.fragment,U),U.forEach(h),q.forEach(h),v=j(T),w=y(T,"DIV",{class:!0});var W=P(w);C=y(W,"SPAN",{class:!0,"data-svelte-h":!0}),K(C)!=="svelte-pc7ih"&&(C.textContent=S),F=j(W),M=y(W,"DIV",{class:!0});var x=P(M);X($.$$.fragment,x),x.forEach(h),W.forEach(h),R=j(T),A=y(T,"DIV",{class:!0,"data-svelte-h":!0}),K(A)!=="svelte-1rcjgh9"&&(A.textContent=B),E=j(T),I=y(T,"P",{class:!0,"data-svelte-h":!0}),K(I)!=="svelte-9upacm"&&(I.innerHTML=O),this.h()},h(){_(e,"class","svelte-xfr0fu"),_(o,"class","separator svelte-xfr0fu"),_(f,"class","setting svelte-xfr0fu"),_(g,"class","setting-value svelte-xfr0fu"),_(u,"class","setting-row svelte-xfr0fu"),_(C,"class","setting svelte-xfr0fu"),_(M,"class","setting-value svelte-xfr0fu"),_(w,"class","setting-row svelte-xfr0fu"),_(A,"class","separator svelte-xfr0fu"),_(I,"class","svelte-xfr0fu")},m(T,q){N(T,e,q),N(T,s,q),N(T,n,q),N(T,r,q),N(T,o,q),N(T,c,q),N(T,u,q),m(u,f),m(u,p),m(u,g),Y(k,g,null),N(T,v,q),N(T,w,q),m(w,C),m(w,F),m(w,M),Y($,M,null),N(T,R,q),N(T,A,q),N(T,E,q),N(T,I,q),L=!0},i(T){L||(V(k.$$.fragment,T),V($.$$.fragment,T),L=!0)},o(T){H(k.$$.fragment,T),H($.$$.fragment,T),L=!1},d(T){T&&(h(e),h(s),h(n),h(r),h(o),h(c),h(u),h(v),h(w),h(R),h(A),h(E),h(I)),J(k),J($)}}}function Ir(l){let e,t="You'll need to set up a git repo before deploying to netlify.";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-drfbb5"&&(e.textContent=t),this.h()},h(){_(e,"class","svelte-xfr0fu")},m(s,n){N(s,e,n)},i:ee,o:ee,d(s){s&&h(e)}}}function Nr(l){let e,t="You'll need to connect to at least one datasource before deploying to netlify.";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-1wqvgt"&&(e.textContent=t),this.h()},h(){_(e,"class","svelte-xfr0fu")},m(s,n){N(s,e,n)},i:ee,o:ee,d(s){s&&h(e)}}}function Ar(l){let e,t,s,n;const i=[Nr,Ir,Sr],r=[];function o(a,c){return a[1].length?a[0].gitRepo?2:1:0}return e=o(l),t=r[e]=i[e](l),{c(){t.c(),s=me()},l(a){t.l(a),s=me()},m(a,c){r[e].m(a,c),N(a,s,c),n=!0},p(a,[c]){let u=e;e=o(a),e!==u&&(_e(),H(r[u],1,1,()=>{r[u]=null}),ve(),t=r[e],t||(t=r[e]=i[e](a),t.c()),V(t,1),t.m(s.parentNode,s))},i(a){n||(V(t),n=!0)},o(a){H(t),n=!1},d(a){a&&h(s),r[e].d(a)}}}function Or(l,e,t){let{settings:s}=e,{sources:n}=e;return l.$$set=i=>{"settings"in i&&t(0,s=i.settings),"sources"in i&&t(1,n=i.sources)},[s,n]}class Lr extends ye{constructor(e){super(),ke(this,e,Or,Ar,be,{settings:0,sources:1})}}function Pr(l){let e,t="Deploying to Vercel",s,n,i='
  • Start a new Vercel project →
  • Choose the repo containing this project
  • Configure your project to match the settings below
  • ',r,o,a="Build and Output Settings",c,u,f,d="Build Command",p,g,k,v,w,C,S="Output Directory",F,M,$,R,A,B,E="Install Command",I,O,L,T;return k=new Ke({props:{text:"npm run sources && npm run build"}}),$=new Ke({props:{text:"build/"}}),L=new Ke({props:{text:"npm install"}}),{c(){e=b("h2"),e.textContent=t,s=D(),n=b("ol"),n.innerHTML=i,r=D(),o=b("div"),o.textContent=a,c=D(),u=b("div"),f=b("span"),f.textContent=d,p=D(),g=b("div"),G(k.$$.fragment),v=D(),w=b("div"),C=b("span"),C.textContent=S,F=D(),M=b("div"),G($.$$.fragment),R=D(),A=b("div"),B=b("span"),B.textContent=E,I=D(),O=b("div"),G(L.$$.fragment),this.h()},l(q){e=y(q,"H2",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-ly0hw5"&&(e.textContent=t),s=j(q),n=y(q,"OL",{"data-svelte-h":!0}),K(n)!=="svelte-13j0dqb"&&(n.innerHTML=i),r=j(q),o=y(q,"DIV",{class:!0,"data-svelte-h":!0}),K(o)!=="svelte-fbi9z5"&&(o.textContent=a),c=j(q),u=y(q,"DIV",{class:!0});var U=P(u);f=y(U,"SPAN",{class:!0,"data-svelte-h":!0}),K(f)!=="svelte-2ttm1i"&&(f.textContent=d),p=j(U),g=y(U,"DIV",{class:!0});var W=P(g);X(k.$$.fragment,W),W.forEach(h),U.forEach(h),v=j(q),w=y(q,"DIV",{class:!0});var x=P(w);C=y(x,"SPAN",{class:!0,"data-svelte-h":!0}),K(C)!=="svelte-wq73qv"&&(C.textContent=S),F=j(x),M=y(x,"DIV",{class:!0});var z=P(M);X($.$$.fragment,z),z.forEach(h),x.forEach(h),R=j(q),A=y(q,"DIV",{class:!0});var se=P(A);B=y(se,"SPAN",{class:!0,"data-svelte-h":!0}),K(B)!=="svelte-xn7157"&&(B.textContent=E),I=j(se),O=y(se,"DIV",{class:!0});var ne=P(O);X(L.$$.fragment,ne),ne.forEach(h),se.forEach(h),this.h()},h(){_(e,"class","svelte-1d62oiw"),_(o,"class","separator svelte-1d62oiw"),_(f,"class","setting svelte-1d62oiw"),_(g,"class","setting-value svelte-1d62oiw"),_(u,"class","setting-row svelte-1d62oiw"),_(C,"class","setting svelte-1d62oiw"),_(M,"class","setting-value svelte-1d62oiw"),_(w,"class","setting-row svelte-1d62oiw"),_(B,"class","setting svelte-1d62oiw"),_(O,"class","setting-value svelte-1d62oiw"),_(A,"class","setting-row svelte-1d62oiw")},m(q,U){N(q,e,U),N(q,s,U),N(q,n,U),N(q,r,U),N(q,o,U),N(q,c,U),N(q,u,U),m(u,f),m(u,p),m(u,g),Y(k,g,null),N(q,v,U),N(q,w,U),m(w,C),m(w,F),m(w,M),Y($,M,null),N(q,R,U),N(q,A,U),m(A,B),m(A,I),m(A,O),Y(L,O,null),T=!0},i(q){T||(V(k.$$.fragment,q),V($.$$.fragment,q),V(L.$$.fragment,q),T=!0)},o(q){H(k.$$.fragment,q),H($.$$.fragment,q),H(L.$$.fragment,q),T=!1},d(q){q&&(h(e),h(s),h(n),h(r),h(o),h(c),h(u),h(v),h(w),h(R),h(A)),J(k),J($),J(L)}}}function Dr(l){let e,t="You'll need to set up a git repo before deploying to Vercel.";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-1urjqdt"&&(e.textContent=t),this.h()},h(){_(e,"class","svelte-1d62oiw")},m(s,n){N(s,e,n)},i:ee,o:ee,d(s){s&&h(e)}}}function jr(l){let e,t="You'll need to connect to at least one datasource before deploying to Vercel.";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-1evai4d"&&(e.textContent=t),this.h()},h(){_(e,"class","svelte-1d62oiw")},m(s,n){N(s,e,n)},i:ee,o:ee,d(s){s&&h(e)}}}function Mr(l){let e,t,s,n;const i=[jr,Dr,Pr],r=[];function o(a,c){return a[1].length?a[0].gitRepo?2:1:0}return e=o(l),t=r[e]=i[e](l),{c(){t.c(),s=me()},l(a){t.l(a),s=me()},m(a,c){r[e].m(a,c),N(a,s,c),n=!0},p(a,[c]){let u=e;e=o(a),e!==u&&(_e(),H(r[u],1,1,()=>{r[u]=null}),ve(),t=r[e],t||(t=r[e]=i[e](a),t.c()),V(t,1),t.m(s.parentNode,s))},i(a){n||(V(t),n=!0)},o(a){H(t),n=!1},d(a){a&&h(s),r[e].d(a)}}}function Fr(l,e,t){let{settings:s}=e,{sources:n}=e;return l.$$set=i=>{"settings"in i&&t(0,s=i.settings),"sources"in i&&t(1,n=i.sources)},[s,n]}class Vr extends ye{constructor(e){super(),ke(this,e,Fr,Mr,be,{settings:0,sources:1})}}function Br(l){let e,t="Deploying your Project",s,n,i="In production, Evidence functions like a static site generator:",r,o,a=`
  • Running npm run build will build a static site in the /build directory using the credentials in the datasource connections panel, which you can host in a variety of environments
  • `,c,u,f="Building Your Project",d,p,g,k="Build command",v,w,C,S,F,M,$="Publish directory",R,A,B,E;return C=new Ke({props:{text:"npm run sources && npm run build"}}),B=new Ke({props:{text:"build/"}}),{c(){e=b("h2"),e.textContent=t,s=D(),n=b("p"),n.textContent=i,r=D(),o=b("ol"),o.innerHTML=a,c=D(),u=b("div"),u.textContent=f,d=D(),p=b("div"),g=b("span"),g.textContent=k,v=D(),w=b("div"),G(C.$$.fragment),S=D(),F=b("div"),M=b("span"),M.textContent=$,R=D(),A=b("div"),G(B.$$.fragment),this.h()},l(I){e=y(I,"H2",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-1bt7a83"&&(e.textContent=t),s=j(I),n=y(I,"P",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-1gcreas"&&(n.textContent=i),r=j(I),o=y(I,"OL",{"data-svelte-h":!0}),K(o)!=="svelte-1dvvhh6"&&(o.innerHTML=a),c=j(I),u=y(I,"DIV",{class:!0,"data-svelte-h":!0}),K(u)!=="svelte-1sj8kng"&&(u.textContent=f),d=j(I),p=y(I,"DIV",{class:!0});var O=P(p);g=y(O,"SPAN",{class:!0,"data-svelte-h":!0}),K(g)!=="svelte-1fx13w6"&&(g.textContent=k),v=j(O),w=y(O,"DIV",{class:!0});var L=P(w);X(C.$$.fragment,L),L.forEach(h),O.forEach(h),S=j(I),F=y(I,"DIV",{class:!0});var T=P(F);M=y(T,"SPAN",{class:!0,"data-svelte-h":!0}),K(M)!=="svelte-pc7ih"&&(M.textContent=$),R=j(T),A=y(T,"DIV",{class:!0});var q=P(A);X(B.$$.fragment,q),q.forEach(h),T.forEach(h),this.h()},h(){_(e,"class","svelte-8zw4no"),_(n,"class","svelte-8zw4no"),_(u,"class","separator svelte-8zw4no"),_(g,"class","setting svelte-8zw4no"),_(w,"class","setting-value svelte-8zw4no"),_(p,"class","setting-row svelte-8zw4no"),_(M,"class","setting svelte-8zw4no"),_(A,"class","setting-value svelte-8zw4no"),_(F,"class","setting-row svelte-8zw4no")},m(I,O){N(I,e,O),N(I,s,O),N(I,n,O),N(I,r,O),N(I,o,O),N(I,c,O),N(I,u,O),N(I,d,O),N(I,p,O),m(p,g),m(p,v),m(p,w),Y(C,w,null),N(I,S,O),N(I,F,O),m(F,M),m(F,R),m(F,A),Y(B,A,null),E=!0},p:ee,i(I){E||(V(C.$$.fragment,I),V(B.$$.fragment,I),E=!0)},o(I){H(C.$$.fragment,I),H(B.$$.fragment,I),E=!1},d(I){I&&(h(e),h(s),h(n),h(r),h(o),h(c),h(u),h(d),h(p),h(S),h(F)),J(C),J(B)}}}class qr extends ye{constructor(e){super(),ke(this,e,null,Br,be,{})}}function Qs(l,e,t){const s=l.slice();return s[3]=e[t],s}function en(l,e,t){const s=l.slice();return s[6]=e[t][0],s[7]=e[t][1],s}function Hr(l){let e,t;return e=new Rl({props:{$$slots:{default:[zr]},$$scope:{ctx:l}}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p(s,n){const i={};n&1025&&(i.$$scope={dirty:n,ctx:s}),e.$set(i)},i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function Rr(l){let e,t,s,n=`GCloud authentication isn't supported in cloud deployments, as it needs access to a browser. Set up one of the other authentication options for a deployment.`;return{c(){e=b("hr"),t=D(),s=b("p"),s.textContent=n},l(i){e=y(i,"HR",{}),t=j(i),s=y(i,"P",{"data-svelte-h":!0}),K(s)!=="svelte-x2laf0"&&(s.textContent=n)},m(i,r){N(i,e,r),N(i,t,r),N(i,s,r)},p:ee,i:ee,o:ee,d(i){i&&(h(e),h(t),h(s))}}}function Ur(l){let e,t,s,n=`External browser authentication isn't supported in cloud deployments, as it needs access to a browser. Set up one of the other authentication options for a deployment.`;return{c(){e=b("hr"),t=D(),s=b("p"),s.textContent=n},l(i){e=y(i,"HR",{}),t=j(i),s=y(i,"P",{"data-svelte-h":!0}),K(s)!=="svelte-1m8xj5p"&&(s.textContent=n)},m(i,r){N(i,e,r),N(i,t,r),N(i,s,r)},p:ee,i:ee,o:ee,d(i){i&&(h(e),h(t),h(s))}}}function Kr(l){let e;return{c(){e=Z("Copy All")},l(t){e=Q(t,"Copy All")},m(t,s){N(t,e,s)},d(t){t&&h(e)}}}function tn(l){let e,t,s,n,i,r,o,a;return s=new Ke({props:{text:l[6]}}),r=new Ke({props:{text:l[7],hideText:!0}}),{c(){e=b("div"),t=b("div"),G(s.$$.fragment),n=D(),i=b("div"),G(r.$$.fragment),o=D(),this.h()},l(c){e=y(c,"DIV",{class:!0});var u=P(e);t=y(u,"DIV",{class:!0});var f=P(t);X(s.$$.fragment,f),f.forEach(h),n=j(u),i=y(u,"DIV",{class:!0});var d=P(i);X(r.$$.fragment,d),d.forEach(h),o=j(u),u.forEach(h),this.h()},h(){_(t,"class","var-name svelte-172eppj"),_(i,"class","var-value svelte-172eppj"),_(e,"class","environment-variable svelte-172eppj")},m(c,u){N(c,e,u),m(e,t),Y(s,t,null),m(e,n),m(e,i),Y(r,i,null),m(e,o),a=!0},p(c,u){const f={};u&1&&(f.text=c[6]),s.$set(f);const d={};u&1&&(d.text=c[7]),r.$set(d)},i(c){a||(V(s.$$.fragment,c),V(r.$$.fragment,c),a=!0)},o(c){H(s.$$.fragment,c),H(r.$$.fragment,c),a=!1},d(c){c&&h(e),J(s),J(r)}}}function sn(l){let e,t,s=pe(Object.entries(l[3].environmentVariables)),n=[];for(let r=0;rH(n[r],1,1,()=>{n[r]=null});return{c(){for(let r=0;rH(u[d],1,1,()=>{u[d]=null});return{c(){e=b("div"),G(t.$$.fragment),s=D(),n=b("div"),n.innerHTML=i,r=D();for(let d=0;duse different environment variable values.`,s,n,i,r,o;const a=[Ur,Rr,Hr],c=[];function u(f,d){return f[1].authenticator==="externalbrowser"?0:f[1].authenticator==="gcloud-cli"?1:2}return n=u(l),i=c[n]=a[n](l),{c(){e=b("p"),e.innerHTML=t,s=D(),i.c(),r=me()},l(f){e=y(f,"P",{"data-svelte-h":!0}),K(e)!=="svelte-m9w29g"&&(e.innerHTML=t),s=j(f),i.l(f),r=me()},m(f,d){N(f,e,d),N(f,s,d),c[n].m(f,d),N(f,r,d),o=!0},p(f,[d]){i.p(f,d)},i(f){o||(V(i),o=!0)},o(f){H(i),o=!1},d(f){f&&(h(e),h(s),h(r)),c[n].d(f)}}}function Yr(l,e,t){let{sources:s}=e,n={};function i(){const r=s.reduce((o,a)=>[o,Object.entries(a.environmentVariables).map(([c,u])=>`${c}="${u.replace(/\\n/g,` `)}"`).join(` `)].join(` `),"");navigator.clipboard.writeText(r),Pl.add({title:"",status:"success",message:"Copied environment variables to clipboard"})}return l.$$set=r=>{"sources"in r&&t(0,s=r.sources)},[s,n,i]}class Jr extends ye{constructor(e){super(),ke(this,e,Yr,Gr,be,{sources:0})}}function nn(l,e,t){const s=l.slice();return s[5]=e[t],s}function ln(l){let e,t=l[5].name+"",s,n;return{c(){e=b("option"),s=Z(t),n=D(),this.h()},l(i){e=y(i,"OPTION",{});var r=P(e);s=Q(r,t),n=j(r),r.forEach(h),this.h()},h(){e.__value=l[5],ce(e,e.__value)},m(i,r){N(i,e,r),m(e,s),m(e,n)},p:ee,d(i){i&&h(e)}}}function rn(l){let e,t,s,n;var i=l[2].FormComponent;function r(o,a){return{props:{settings:o[0],sources:o[1]}}}return i&&(t=_s(i,r(l))),{c(){e=b("div"),t&&G(t.$$.fragment),this.h()},l(o){e=y(o,"DIV",{class:!0});var a=P(e);t&&X(t.$$.fragment,a),a.forEach(h),this.h()},h(){_(e,"class","panel svelte-1kcncuj")},m(o,a){N(o,e,a),t&&Y(t,e,null),n=!0},p(o,a){if(a&4&&i!==(i=o[2].FormComponent)){if(t){_e();const c=t;H(c.$$.fragment,1,0,()=>{J(c,1)}),ve()}i?(t=_s(i,r(o)),G(t.$$.fragment),V(t.$$.fragment,1),Y(t,e,null)):t=null}else if(i){const c={};a&1&&(c.settings=o[0]),a&2&&(c.sources=o[1]),t.$set(c)}},i(o){n||(t&&V(t.$$.fragment,o),o&&Ae(()=>{n&&(s||(s=qe(e,He,{},!0)),s.run(1))}),n=!0)},o(o){t&&H(t.$$.fragment,o),o&&(s||(s=qe(e,He,{},!1)),s.run(0)),n=!1},d(o){o&&h(e),t&&J(t),o&&s&&s.end()}}}function Xr(l){let e,t,s,n,i="Deployment",r,o,a=`Evidence projects can be deployed to a variety of cloud environments. The easiest way to deploy your project is with Evidence Cloud.`,c,u,f="Environment Variables",d,p,g,k,v,w="Deployment Environment",C,S,F,M,$,R='Learn more about Deploying your Project →',A,B,E;g=new Jr({props:{sources:l[1]}});let I=pe(l[3]),O=[];for(let T=0;Tl[4].call(S)),_(s,"class","panel svelte-1kcncuj"),_(t,"class","deploy-settings-box svelte-1kcncuj"),_($,"class","svelte-1kcncuj"),_(e,"id","deploy"),_(e,"class","svelte-1kcncuj")},m(T,q){N(T,e,q),m(e,t),m(t,s),m(s,n),m(s,r),m(s,o),m(s,c),m(s,u),m(s,d),m(s,p),Y(g,p,null),m(s,k),m(s,v),m(s,C),m(s,S);for(let U=0;U{L=null}),ve())},i(T){A||(V(g.$$.fragment,T),V(L),A=!0)},o(T){H(g.$$.fragment,T),H(L),A=!1},d(T){T&&h(e),J(g),Le(O,T),L&&L.d(),B=!1,E()}}}function Wr(l,e,t){let{settings:s}=e,{sources:n}=e,i=[{id:"evidence",name:"Evidence Cloud",FormComponent:yr},{id:"netlify",name:"Netlify",FormComponent:Lr},{id:"vercel",name:"Vercel",FormComponent:Vr},{id:"other",name:"Self-host (other)",FormComponent:qr}],r=i[0];function o(){r=$t(this),t(2,r),t(3,i)}return l.$$set=a=>{"settings"in a&&t(0,s=a.settings),"sources"in a&&t(1,n=a.sources)},[s,n,r,i,o]}class Zr extends ye{constructor(e){super(),ke(this,e,Wr,Xr,be,{settings:0,sources:1})}}function on(l,e,t){const s=l.slice();return s[2]=e[t],s[3]=e,s[4]=t,s}function an(l){let e,t,s=l[2].formatTag+"",n,i,r,o=l[2].formatCode+"",a,c,u,f,d,p,g,k,v=ct(l[2])+"",w,C,S,F;function M(){l[1].call(f,l[3],l[4])}return{c(){e=b("tr"),t=b("td"),n=Z(s),i=D(),r=b("td"),a=Z(o),c=D(),u=b("td"),f=b("input"),g=D(),k=b("td"),w=Z(v),C=D(),this.h()},l($){e=y($,"TR",{});var R=P(e);t=y(R,"TD",{class:!0});var A=P(t);n=Q(A,s),A.forEach(h),i=j(R),r=y(R,"TD",{class:!0});var B=P(r);a=Q(B,o),B.forEach(h),c=j(R),u=y(R,"TD",{class:!0});var E=P(u);f=y(E,"INPUT",{id:!0,placeholder:!0,class:!0}),E.forEach(h),g=j(R),k=y(R,"TD",{class:!0});var I=P(k);w=Q(I,v),I.forEach(h),C=j(R),R.forEach(h),this.h()},h(){_(t,"class","svelte-6vtoxm"),_(r,"class","svelte-6vtoxm"),_(f,"id",d="id_format_row"+l[2].formatTag),_(f,"placeholder",p=l[2].exampleInput||ut(l[2].valueType)),_(f,"class","align_left input_box svelte-6vtoxm"),_(u,"class","svelte-6vtoxm"),_(k,"class","align_right svelte-6vtoxm")},m($,R){N($,e,R),m(e,t),m(t,n),m(e,i),m(e,r),m(r,a),m(e,c),m(e,u),m(u,f),ce(f,l[2].userInput),m(e,g),m(e,k),m(k,w),m(e,C),S||(F=[de(f,"input",M),de(f,"blur",function(){es(l[2].userInput=void 0)&&(l[2].userInput=void 0).apply(this,arguments)})],S=!0)},p($,R){l=$,R&1&&s!==(s=l[2].formatTag+"")&&he(n,s),R&1&&o!==(o=l[2].formatCode+"")&&he(a,o),R&1&&d!==(d="id_format_row"+l[2].formatTag)&&_(f,"id",d),R&1&&p!==(p=l[2].exampleInput||ut(l[2].valueType))&&_(f,"placeholder",p),R&1&&f.value!==l[2].userInput&&ce(f,l[2].userInput),R&1&&v!==(v=ct(l[2])+"")&&he(w,v)},d($){$&&h(e),S=!1,Ge(F)}}}function Qr(l){let e,t,s='Format Name Format Code Example Input Example Output',n,i=pe(l[0]),r=[];for(let o=0;o{"formats"in i&&t(0,s=i.formats)},[s,n]}class ps extends ye{constructor(e){super(),ke(this,e,eo,Qr,be,{formats:0})}}function cn(l){let e,t,s,n;const i=l[4].default,r=ll(i,l,l[3],null);return{c(){e=b("div"),r&&r.c(),this.h()},l(o){e=y(o,"DIV",{class:!0});var a=P(e);r&&r.l(a),a.forEach(h),this.h()},h(){_(e,"class","collapsibleContents svelte-hde9ry"),e.hidden=t=!l[0]},m(o,a){N(o,e,a),r&&r.m(e,null),n=!0},p(o,a){r&&r.p&&(!n||a&8)&&il(r,i,o,o[3],n?ol(i,o[3],a,null):rl(o[3]),null),(!n||a&1&&t!==(t=!o[0]))&&(e.hidden=t)},i(o){n||(V(r,o),o&&Ae(()=>{n&&(s||(s=qe(e,He,{},!0)),s.run(1))}),n=!0)},o(o){H(r,o),o&&(s||(s=qe(e,He,{},!1)),s.run(0)),n=!1},d(o){o&&h(e),r&&r.d(o),o&&s&&s.end()}}}function to(l){let e,t,s,n,i,r,o,a,c,u,f;o=new Kl({props:{toggled:l[0],size:"16"}});let d=l[0]&&cn(l);return{c(){e=b("div"),t=b("collapsibleHeader"),s=b("button"),n=b("h3"),i=Z(l[1]),r=D(),G(o.$$.fragment),a=D(),d&&d.c(),this.h()},l(p){e=y(p,"DIV",{class:!0});var g=P(e);t=y(g,"COLLAPSIBLEHEADER",{class:!0});var k=P(t);s=y(k,"BUTTON",{"area-expanded":!0,class:!0});var v=P(s);n=y(v,"H3",{class:!0});var w=P(n);i=Q(w,l[1]),w.forEach(h),r=j(v),X(o.$$.fragment,v),v.forEach(h),k.forEach(h),a=j(g),d&&d.l(g),g.forEach(h),this.h()},h(){_(n,"class","svelte-hde9ry"),_(s,"area-expanded",l[0]),_(s,"class","svelte-hde9ry"),_(t,"class","svelte-hde9ry"),_(e,"class","collapsibleSection svelte-hde9ry")},m(p,g){N(p,e,g),m(e,t),m(t,s),m(s,n),m(n,i),m(s,r),Y(o,s,null),m(e,a),d&&d.m(e,null),c=!0,u||(f=de(s,"click",Qt(l[2])),u=!0)},p(p,[g]){(!c||g&2)&&he(i,p[1]);const k={};g&1&&(k.toggled=p[0]),o.$set(k),(!c||g&1)&&_(s,"area-expanded",p[0]),p[0]?d?(d.p(p,g),g&1&&V(d,1)):(d=cn(p),d.c(),V(d,1),d.m(e,null)):d&&(_e(),H(d,1,1,()=>{d=null}),ve())},i(p){c||(V(o.$$.fragment,p),V(d),c=!0)},o(p){H(o.$$.fragment,p),H(d),c=!1},d(p){p&&h(e),J(o),d&&d.d(),u=!1,f()}}}function so(l,e,t){let{$$slots:s={},$$scope:n}=e,{headerText:i}=e,{expanded:r=!0}=e,o=()=>{t(0,r=!r)};return l.$$set=a=>{"headerText"in a&&t(1,i=a.headerText),"expanded"in a&&t(0,r=a.expanded),"$$scope"in a&&t(3,n=a.$$scope)},[r,i,o,n,s]}class it extends ye{constructor(e){super(),ke(this,e,so,to,be,{headerText:1,expanded:0})}}function un(l,e,t){const s=l.slice();return s[5]=e[t],s[6]=e,s[7]=t,s}function no(l,e,t){const s=l.slice();return s[8]=e[t],s}function lo(l){let e,t=l[8].displayName+"",s;return{c(){e=b("option"),s=Z(t),this.h()},l(n){e=y(n,"OPTION",{name:!0,id:!0});var i=P(e);s=Q(i,t),i.forEach(h),this.h()},h(){_(e,"name",l[8].primaryCode),_(e,"id",l[8].primaryCode),e.__value=l[8].primaryCode,ce(e,e.__value)},m(n,i){N(n,e,i),m(e,s)},p:ee,d(n){n&&h(e)}}}function fn(l){let e,t,s,n='Format Name Format Code Example Input Example Output',i,r=[],o=new Map,a,c,u=pe(l[0].filter(l[3]));const f=d=>d[5].formatTag;for(let d=0;d{c&&(a||(a=qe(e,He,{},!0)),a.run(1))}),c=!0}},o(d){d&&(a||(a=qe(e,He,{},!1)),a.run(0)),c=!1},d(d){d&&h(e);for(let p=0;p{r=yt(s,kt,{}),r.start()})),E&&(f||Ae(()=>{f=yt(a,kt,{}),f.start()})),E&&(M||Ae(()=>{M=yt(C,kt,{}),M.start()}))},o:ee,d(E){E&&h(t),R=!1,Ge(A)}}}function io(l){let e,t,s="Choose a currency",n,i,r,o,a,c=pe(jl),u=[];for(let d=0;dl[2].call(e))},m(d,p){N(d,e,p),m(e,t),m(e,n);for(let g=0;g{f=null}),ve())},i(d){V(f)},o(d){H(f)},d(d){d&&(h(e),h(i),h(r)),Le(u,d),f&&f.d(d),o=!1,a()}}}function ro(l,e,t){let{formats:s}=e,n="Choose a currency";function i(){n=$t(this),t(1,n)}const r=a=>a.parentFormat===n;function o(a,c){a[c].userInput=this.value,t(0,s),t(1,n)}return l.$$set=a=>{"formats"in a&&t(0,s=a.formats)},[s,n,i,r,o]}class oo extends ye{constructor(e){super(),ke(this,e,ro,io,be,{formats:0})}}function hn(l,e,t){const s=l.slice();return s[4]=e[t],s[5]=e,s[6]=t,s}function mn(l){let e,t,s=l[4].formatTag+"",n,i,r,o=l[4].formatCode+"",a,c,u,f,d,p,g,k,v=ct(l[4])+"",w,C,S,F,M,$,R,A,B,E;function I(){l[2].call(f,l[5],l[6])}$=new Me({props:{src:rs}});function O(){return l[3](l[4])}return{c(){e=b("tr"),t=b("td"),n=Z(s),i=D(),r=b("td"),a=Z(o),c=D(),u=b("td"),f=b("input"),g=D(),k=b("td"),w=Z(v),C=D(),S=b("td"),F=b("button"),M=b("div"),G($.$$.fragment),R=D(),this.h()},l(L){e=y(L,"TR",{});var T=P(e);t=y(T,"TD",{class:!0});var q=P(t);n=Q(q,s),q.forEach(h),i=j(T),r=y(T,"TD",{class:!0});var U=P(r);a=Q(U,o),U.forEach(h),c=j(T),u=y(T,"TD",{class:!0});var W=P(u);f=y(W,"INPUT",{id:!0,placeholder:!0,class:!0}),W.forEach(h),g=j(T),k=y(T,"TD",{class:!0});var x=P(k);w=Q(x,v),x.forEach(h),C=j(T),S=y(T,"TD",{class:!0});var z=P(S);F=y(z,"BUTTON",{type:!0,tooltip:!0,class:!0});var se=P(F);M=y(se,"DIV",{class:!0});var ne=P(M);X($.$$.fragment,ne),ne.forEach(h),se.forEach(h),z.forEach(h),R=j(T),T.forEach(h),this.h()},h(){_(t,"class","svelte-hjwpz"),_(r,"class","svelte-hjwpz"),_(f,"id",d="id_format_row"+l[4].formatTag),_(f,"placeholder",p=l[4].exampleInput||ut(l[4].valueType)),_(f,"class","align_left input_box svelte-hjwpz"),_(u,"class","svelte-hjwpz"),_(k,"class","align_right svelte-hjwpz"),_(M,"class","deleteIcon svelte-hjwpz"),_(F,"type","button"),_(F,"tooltip","Remove"),_(F,"class","mb-0.5 svelte-hjwpz"),_(S,"class","svelte-hjwpz")},m(L,T){N(L,e,T),m(e,t),m(t,n),m(e,i),m(e,r),m(r,a),m(e,c),m(e,u),m(u,f),ce(f,l[4].userInput),m(e,g),m(e,k),m(k,w),m(e,C),m(e,S),m(S,F),m(F,M),Y($,M,null),m(e,R),A=!0,B||(E=[de(f,"input",I),de(f,"blur",function(){es(l[4].userInput=void 0)&&(l[4].userInput=void 0).apply(this,arguments)}),de(F,"click",O)],B=!0)},p(L,T){l=L,(!A||T&1)&&s!==(s=l[4].formatTag+"")&&he(n,s),(!A||T&1)&&o!==(o=l[4].formatCode+"")&&he(a,o),(!A||T&1&&d!==(d="id_format_row"+l[4].formatTag))&&_(f,"id",d),(!A||T&1&&p!==(p=l[4].exampleInput||ut(l[4].valueType)))&&_(f,"placeholder",p),T&1&&f.value!==l[4].userInput&&ce(f,l[4].userInput),(!A||T&1)&&v!==(v=ct(l[4])+"")&&he(w,v)},i(L){A||(V($.$$.fragment,L),A=!0)},o(L){H($.$$.fragment,L),A=!1},d(L){L&&h(e),J($),B=!1,Ge(E)}}}function ao(l){let e,t,s='Format Name Format Code Example Input Example Output ',n,i,r=pe(l[0]),o=[];for(let c=0;cH(o[c],1,1,()=>{o[c]=null});return{c(){e=b("table"),t=b("thead"),t.innerHTML=s,n=D();for(let c=0;cn(o);return l.$$set=o=>{"formats"in o&&t(0,s=o.formats),"deleteHandler"in o&&t(1,n=o.deleteHandler)},[s,n,i,r]}class uo extends ye{constructor(e){super(),ke(this,e,co,ao,be,{formats:0,deleteHandler:1})}}function pn(l,e,t){const s=l.slice();return s[14]=e[t],s}function gn(l){let e,t;return e=new it({props:{headerText:"Saved Custom Formats",expanded:!1,$$slots:{default:[fo]},$$scope:{ctx:l}}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p(s,n){const i={};n&131073&&(i.$$scope={dirty:n,ctx:s}),e.$set(i)},i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function fo(l){let e,t;return e=new uo({props:{formats:l[0].customFormats,deleteHandler:l[6]}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p(s,n){const i={};n&1&&(i.formats=s[0].customFormats),e.$set(i)},i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function _n(l){let e,t=l[14]+"",s,n;return{c(){e=b("option"),s=Z(t),n=D(),this.h()},l(i){e=y(i,"OPTION",{});var r=P(e);s=Q(r,t),n=j(r),r.forEach(h),this.h()},h(){e.__value=l[14],ce(e,e.__value)},m(i,r){N(i,e,r),m(e,s),m(e,n)},p:ee,d(i){i&&h(e)}}}function ho(l){let e,t,s,n,i="Value Type",r,o,a,c,u,f="Format Name",d,p,g,k,v,w="Format Code",C,S,F,M,$,R,A,B,E,I,O,L,T,q,U=l[0].customFormats&&l[0].customFormats.length>0&&gn(l),W=pe(l[5]),x=[];for(let z=0;zl[9].call(o)),_(s,"class","input-item svelte-19ljrgt"),_(u,"for","formatTag"),_(u,"class","svelte-19ljrgt"),_(p,"id","formatTag"),_(p,"type","text"),_(p,"placeholder","myformat"),_(p,"class","svelte-19ljrgt"),_(c,"class","input-item svelte-19ljrgt"),_(v,"for","formatCode"),_(v,"class","svelte-19ljrgt"),_(S,"id","formatCode"),_(S,"type","text"),_(S,"placeholder",F=l[3]==="date"?"mm/dd/yyyy":"$#,##0.0"),_(S,"class","svelte-19ljrgt"),_(k,"class","input-item svelte-19ljrgt"),_(R,"id","submitCustomFormatButton"),_(R,"type","submit"),R.disabled=B=!(l[1]&&l[2]),_(R,"class","svelte-19ljrgt"),_($,"class","new-format-buttons svelte-19ljrgt"),O.a=null,_(I,"class","error svelte-19ljrgt"),_(t,"autocomplete","off"),_(t,"class","addFormatForm")},m(z,se){U&&U.m(z,se),N(z,e,se),N(z,t,se),m(t,s),m(s,n),m(s,r),m(s,o);for(let ne=0;ne0?U?(U.p(z,se),se&1&&V(U,1)):(U=gn(z),U.c(),V(U,1),U.m(e.parentNode,e)):U&&(_e(),H(U,1,1,()=>{U=null}),ve()),se&32){W=pe(z[5]);let ne;for(ne=0;ne0)t(4,c=w.join("
    "));else{let S=await(await fetch(Jt("/api/customFormattingSettings.json"),{method:"POST",body:JSON.stringify({newCustomFormat:{formatTag:r,formatCode:o,valueType:a}})})).json();S?(t(0,n=S),d()):t(4,c=`Unable to create new custom format ${r}`)}}function d(){t(1,r=""),t(2,o=""),t(3,a="number"),t(4,c="")}function p(){var M;let w=[];/^[a-zA-Z][a-zA-Z0-9]*$/.test(r)||w.push(`"${r}" is not a valid format name. The format name should always start with a letter and only contain letters and numbers.`);let C=10,S,F;a==="date"&&(C=new Date);try{S=Vl.format(o,C)}catch($){F=$}return S||w.push(`Format "${o}" is invalid for type "${a}".`),F&&w.push(F),(s.find($=>$.formatTag===r)||(M=n.customFormats)!=null&&M.find($=>$.formatTag===r))&&w.push(`The format name "${r}"" is already assigned to an existing format.`),w}function g(){a=$t(this),t(3,a),t(5,i)}function k(){r=this.value,t(1,r)}function v(){o=this.value,t(2,o)}return l.$$set=w=>{"builtInFormats"in w&&t(8,s=w.builtInFormats),"customFormattingSettings"in w&&t(0,n=w.customFormattingSettings)},[n,r,o,a,c,i,u,f,s,g,k,v]}class po extends ye{constructor(e){super(),ke(this,e,mo,ho,be,{builtInFormats:8,customFormattingSettings:0})}}function go(l){let e,t;return e=new ps({props:{formats:Tt.filter(ko)}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p:ee,i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function _o(l){let e,t;return e=new oo({props:{formats:Tt.filter(wo)}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p:ee,i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function vo(l){let e,t;return e=new ps({props:{formats:Tt.filter(Co)}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p:ee,i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function bo(l){let e,t;return e=new ps({props:{formats:Tt.filter($o)}}),{c(){G(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){Y(e,s,n),t=!0},p:ee,i(s){t||(V(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function yo(l){let e,t,s,n,i="Value Formatting",r,o,a=`Evidence supports built-in formats (like usd and pct) and Excel-style formats (like $#,##0.0). The easiest way to apply these formats is using component props. For example:`,c,u,f="In the Value component, you can use the fmt prop",d,p,g,k,v,w,C,S="In charts, you can use the xFmt and yFmt props",F,M,$,R,A,B,E,I=`You can also set formats within your SQL queries using SQL format tags. Use these by aliasing your column names and appending a format. For example:`,O,L,T,q,U,W,x,z,se="Built-in Formats",ne,$e,Ee="All built-in formats are listed below for reference.",ae,Se,ie,ue,oe,we,Ce,re,te,le,Ne,Te="Custom Formats",De,je,Re='Add new formats to your project. Custom formats use excel-style format codes.',Rt,xe,Ut,Ye,gs='Learn more about formatting in Evidence →',St;return g=new Kt({props:{code:l[3]}}),$=new Kt({props:{code:l[2]}}),T=new Kt({props:{code:l[1]}}),Se=new it({props:{headerText:"Dates",expanded:!1,$$slots:{default:[go]},$$scope:{ctx:l}}}),ue=new it({props:{headerText:"Currencies",expanded:!1,$$slots:{default:[_o]},$$scope:{ctx:l}}}),we=new it({props:{headerText:"Numbers",expanded:!1,$$slots:{default:[vo]},$$scope:{ctx:l}}}),re=new it({props:{headerText:"Percentages",expanded:!1,$$slots:{default:[bo]},$$scope:{ctx:l}}}),xe=new po({props:{builtInFormats:Tt,customFormattingSettings:l[0]}}),{c(){e=b("form"),t=b("div"),s=b("div"),n=b("h2"),n.textContent=i,r=D(),o=b("p"),o.innerHTML=a,c=D(),u=b("p"),u.innerHTML=f,d=D(),p=b("div"),G(g.$$.fragment),k=D(),v=b("br"),w=D(),C=b("p"),C.innerHTML=S,F=D(),M=b("div"),G($.$$.fragment),R=D(),A=b("br"),B=D(),E=b("p"),E.textContent=I,O=D(),L=b("div"),G(T.$$.fragment),q=D(),U=b("p"),W=D(),x=b("div"),z=b("h2"),z.textContent=se,ne=D(),$e=b("p"),$e.textContent=Ee,ae=D(),G(Se.$$.fragment),ie=D(),G(ue.$$.fragment),oe=D(),G(we.$$.fragment),Ce=D(),G(re.$$.fragment),te=D(),le=b("div"),Ne=b("h2"),Ne.textContent=Te,De=D(),je=b("p"),je.innerHTML=Re,Rt=D(),G(xe.$$.fragment),Ut=D(),Ye=b("footer"),Ye.innerHTML=gs,this.h()},l(fe){e=y(fe,"FORM",{id:!0,class:!0});var Ie=P(e);t=y(Ie,"DIV",{class:!0});var Ue=P(t);s=y(Ue,"DIV",{class:!0});var ge=P(s);n=y(ge,"H2",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-1pt91sq"&&(n.textContent=i),r=j(ge),o=y(ge,"P",{class:!0,"data-svelte-h":!0}),K(o)!=="svelte-y867uy"&&(o.innerHTML=a),c=j(ge),u=y(ge,"P",{class:!0,"data-svelte-h":!0}),K(u)!=="svelte-1b5sps4"&&(u.innerHTML=f),d=j(ge),p=y(ge,"DIV",{class:!0});var gt=P(p);X(g.$$.fragment,gt),gt.forEach(h),k=j(ge),v=y(ge,"BR",{}),w=j(ge),C=y(ge,"P",{class:!0,"data-svelte-h":!0}),K(C)!=="svelte-1uln7kb"&&(C.innerHTML=S),F=j(ge),M=y(ge,"DIV",{class:!0});var _t=P(M);X($.$$.fragment,_t),_t.forEach(h),R=j(ge),A=y(ge,"BR",{}),B=j(ge),E=y(ge,"P",{class:!0,"data-svelte-h":!0}),K(E)!=="svelte-146t22d"&&(E.textContent=I),O=j(ge),L=y(ge,"DIV",{class:!0});var vt=P(L);X(T.$$.fragment,vt),vt.forEach(h),q=j(ge),U=y(ge,"P",{class:!0}),P(U).forEach(h),ge.forEach(h),W=j(Ue),x=y(Ue,"DIV",{class:!0});var Pe=P(x);z=y(Pe,"H2",{class:!0,"data-svelte-h":!0}),K(z)!=="svelte-ef4j4e"&&(z.textContent=se),ne=j(Pe),$e=y(Pe,"P",{class:!0,"data-svelte-h":!0}),K($e)!=="svelte-1uuy1j1"&&($e.textContent=Ee),ae=j(Pe),X(Se.$$.fragment,Pe),ie=j(Pe),X(ue.$$.fragment,Pe),oe=j(Pe),X(we.$$.fragment,Pe),Ce=j(Pe),X(re.$$.fragment,Pe),Pe.forEach(h),te=j(Ue),le=y(Ue,"DIV",{class:!0});var tt=P(le);Ne=y(tt,"H2",{class:!0,"data-svelte-h":!0}),K(Ne)!=="svelte-1avfhcl"&&(Ne.textContent=Te),De=j(tt),je=y(tt,"P",{class:!0,"data-svelte-h":!0}),K(je)!=="svelte-zf74ph"&&(je.innerHTML=Re),Rt=j(tt),X(xe.$$.fragment,tt),tt.forEach(h),Ue.forEach(h),Ut=j(Ie),Ye=y(Ie,"FOOTER",{class:!0,"data-svelte-h":!0}),K(Ye)!=="svelte-1yt3qws"&&(Ye.innerHTML=gs),Ie.forEach(h),this.h()},h(){_(n,"class","svelte-e6lr4p"),_(o,"class","svelte-e6lr4p"),_(u,"class","svelte-e6lr4p"),_(p,"class","code-container p-2 svelte-e6lr4p"),_(C,"class","svelte-e6lr4p"),_(M,"class","code-container p-2 svelte-e6lr4p"),_(E,"class","svelte-e6lr4p"),_(L,"class","code-container p-2 svelte-e6lr4p"),_(U,"class","svelte-e6lr4p"),_(s,"class","panel svelte-e6lr4p"),_(z,"class","svelte-e6lr4p"),_($e,"class","svelte-e6lr4p"),_(x,"class","panel svelte-e6lr4p"),_(Ne,"class","svelte-e6lr4p"),_(je,"class","svelte-e6lr4p"),_(le,"class","panel svelte-e6lr4p"),_(t,"class","formatting-settings-box svelte-e6lr4p"),_(Ye,"class","svelte-e6lr4p"),_(e,"id","formatting"),_(e,"class","svelte-e6lr4p")},m(fe,Ie){N(fe,e,Ie),m(e,t),m(t,s),m(s,n),m(s,r),m(s,o),m(s,c),m(s,u),m(s,d),m(s,p),Y(g,p,null),m(s,k),m(s,v),m(s,w),m(s,C),m(s,F),m(s,M),Y($,M,null),m(s,R),m(s,A),m(s,B),m(s,E),m(s,O),m(s,L),Y(T,L,null),m(s,q),m(s,U),m(t,W),m(t,x),m(x,z),m(x,ne),m(x,$e),m(x,ae),Y(Se,x,null),m(x,ie),Y(ue,x,null),m(x,oe),Y(we,x,null),m(x,Ce),Y(re,x,null),m(t,te),m(t,le),m(le,Ne),m(le,De),m(le,je),m(le,Rt),Y(xe,le,null),m(e,Ut),m(e,Ye),St=!0},p(fe,[Ie]){const Ue={};Ie&16&&(Ue.$$scope={dirty:Ie,ctx:fe}),Se.$set(Ue);const ge={};Ie&16&&(ge.$$scope={dirty:Ie,ctx:fe}),ue.$set(ge);const gt={};Ie&16&&(gt.$$scope={dirty:Ie,ctx:fe}),we.$set(gt);const _t={};Ie&16&&(_t.$$scope={dirty:Ie,ctx:fe}),re.$set(_t);const vt={};Ie&1&&(vt.customFormattingSettings=fe[0]),xe.$set(vt)},i(fe){St||(V(g.$$.fragment,fe),V($.$$.fragment,fe),V(T.$$.fragment,fe),V(Se.$$.fragment,fe),V(ue.$$.fragment,fe),V(we.$$.fragment,fe),V(re.$$.fragment,fe),V(xe.$$.fragment,fe),St=!0)},o(fe){H(g.$$.fragment,fe),H($.$$.fragment,fe),H(T.$$.fragment,fe),H(Se.$$.fragment,fe),H(ue.$$.fragment,fe),H(we.$$.fragment,fe),H(re.$$.fragment,fe),H(xe.$$.fragment,fe),St=!1},d(fe){fe&&h(e),J(g),J($),J(T),J(Se),J(ue),J(we),J(re),J(xe)}}}const ko=l=>l.formatCategory==="date",wo=l=>l.formatCategory==="currency",Co=l=>l.formatCategory==="number",$o=l=>l.formatCategory==="percent";function To(l,e,t){let{customFormattingSettings:s}=e,n=`select growth as growth_pct, -- formatted as a percentage sales as sales_usd -- formatted as US dollars from table`,i=``,r="";return l.$$set=o=>{"customFormattingSettings"in o&&t(0,s=o.customFormattingSettings)},[s,n,i,r]}class Eo extends ye{constructor(e){super(),ke(this,e,To,yo,be,{customFormattingSettings:0})}}function So(l){let e,t,s="Each time you run a query, we get the following pieces of information:",n,i,r="
  • A random identifier that is stored in .evidence/customization/.profile.json
  • An anonymized identifier based on the git repository you're using for the project
  • Whether your project is running in development or build mode
  • Whether your query returned from the cache, from your datasource, or returned an error
  • The type of Evidence datasource connectors you are using (postgres, snowflake, etc.)
  • The operating system your project is running on (windows, mac, etc.)
  • ",o,a,c="Sharing anonymous usage data is one of the best ways you can support Evidence.",u,f,d,p="Share anonymous usage data",g,k,v,w,C,S,F;return{c(){e=b("div"),t=b("p"),t.textContent=s,n=D(),i=b("ol"),i.innerHTML=r,o=D(),a=b("p"),a.textContent=c,u=D(),f=b("div"),d=b("label"),d.textContent=p,g=D(),k=b("label"),v=b("input"),w=D(),C=b("span"),this.h()},l(M){e=y(M,"DIV",{});var $=P(e);t=y($,"P",{class:!0,"data-svelte-h":!0}),K(t)!=="svelte-5h9nz3"&&(t.textContent=s),n=j($),i=y($,"OL",{class:!0,"data-svelte-h":!0}),K(i)!=="svelte-1yd05qf"&&(i.innerHTML=r),o=j($),a=y($,"P",{class:!0,"data-svelte-h":!0}),K(a)!=="svelte-1o2o3k3"&&(a.textContent=c),u=j($),f=y($,"DIV",{class:!0});var R=P(f);d=y(R,"LABEL",{for:!0,class:!0,"data-svelte-h":!0}),K(d)!=="svelte-2u0hrt"&&(d.textContent=p),g=j(R),k=y(R,"LABEL",{class:!0});var A=P(k);v=y(A,"INPUT",{type:!0,id:!0,class:!0}),w=j(A),C=y(A,"SPAN",{class:!0}),P(C).forEach(h),A.forEach(h),R.forEach(h),$.forEach(h),this.h()},h(){_(t,"class","svelte-v1sgh9"),_(i,"class","list-decimal px-8"),_(a,"class","svelte-v1sgh9"),_(d,"for","telemetry-toggle"),_(d,"class","svelte-v1sgh9"),_(v,"type","checkbox"),_(v,"id","telemetry-toggle"),_(v,"class","svelte-v1sgh9"),_(C,"class","slider svelte-v1sgh9"),_(k,"class","switch svelte-v1sgh9"),_(f,"class","input-item svelte-v1sgh9")},m(M,$){N(M,e,$),m(e,t),m(e,n),m(e,i),m(e,o),m(e,a),m(e,u),m(e,f),m(f,d),m(f,g),m(f,k),m(k,v),v.checked=l[0],m(k,w),m(k,C),S||(F=[de(v,"change",l[3]),de(v,"change",l[1])],S=!0)},p(M,$){$&1&&(v.checked=M[0])},d(M){M&&h(e),S=!1,Ge(F)}}}function Io(l){let e,t,s,n,i="Telemetry",r,o,a=`Evidence collects anonymous usage data to help us understand how often the tool is being used.`,c,u,f,d,p='The source code for our telemetry can be found here →',g;return u=new it({props:{headerText:"More",expanded:!1,$$slots:{default:[So]},$$scope:{ctx:l}}}),{c(){e=b("form"),t=b("div"),s=b("div"),n=b("h2"),n.textContent=i,r=D(),o=b("p"),o.textContent=a,c=D(),G(u.$$.fragment),f=D(),d=b("footer"),d.innerHTML=p,this.h()},l(k){e=y(k,"FORM",{id:!0,class:!0});var v=P(e);t=y(v,"DIV",{class:!0});var w=P(t);s=y(w,"DIV",{class:!0});var C=P(s);n=y(C,"H2",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-picrrj"&&(n.textContent=i),r=j(C),o=y(C,"P",{class:!0,"data-svelte-h":!0}),K(o)!=="svelte-1tknaya"&&(o.textContent=a),c=j(C),X(u.$$.fragment,C),C.forEach(h),w.forEach(h),f=j(v),d=y(v,"FOOTER",{class:!0,"data-svelte-h":!0}),K(d)!=="svelte-1fitj1j"&&(d.innerHTML=p),v.forEach(h),this.h()},h(){_(n,"class","svelte-v1sgh9"),_(o,"class","svelte-v1sgh9"),_(s,"class","panel svelte-v1sgh9"),_(t,"class","telemetry-settings-box svelte-v1sgh9"),_(d,"class","svelte-v1sgh9"),_(e,"id","telemetry"),_(e,"class","svelte-v1sgh9")},m(k,v){N(k,e,v),m(e,t),m(t,s),m(s,n),m(s,r),m(s,o),m(s,c),Y(u,s,null),m(e,f),m(e,d),g=!0},p(k,[v]){const w={};v&17&&(w.$$scope={dirty:v,ctx:k}),u.$set(w)},i(k){g||(V(u.$$.fragment,k),g=!0)},o(k){H(u.$$.fragment,k),g=!1},d(k){k&&h(e),J(u)}}}function No(l,e,t){let{settings:s}=e,n=(s.send_anonymous_usage_stats??"yes")==="yes";async function i(){t(2,s.send_anonymous_usage_stats=n?"yes":"no",s),await fetch(Jt("/api/settings.json"),{method:"POST",body:JSON.stringify({settings:s})})}function r(){n=this.checked,t(0,n)}return l.$$set=o=>{"settings"in o&&t(2,s=o.settings)},[n,i,s,r]}class Ao extends ye{constructor(e){super(),ke(this,e,No,Io,be,{settings:2})}}function Oo(l){let e,t,s;return t=new Me({props:{src:rs,theme:"filled",class:"h-6 w-6 text-red-700"}}),{c(){e=b("span"),G(t.$$.fragment),this.h()},l(n){e=y(n,"SPAN",{class:!0});var i=P(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","gitx-icon svelte-1riw2gy")},m(n,i){N(n,e,i),Y(t,e,null),s=!0},i(n){s||(V(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function Lo(l){let e,t,s;return t=new Me({props:{src:On,theme:"filled",class:"h-6 w-6 text-green-700"}}),{c(){e=b("span"),G(t.$$.fragment),this.h()},l(n){e=y(n,"SPAN",{class:!0});var i=P(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","gitcheck-icon svelte-1riw2gy")},m(n,i){N(n,e,i),Y(t,e,null),s=!0},i(n){s||(V(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function Po(l){let e,t,s,n,i="Use your code editor to initialize a repo or run `git init` in a terminal",r;return t=new Me({props:{src:Ln,class:"h-5 w-5 pb-0.5"}}),{c(){e=b("span"),G(t.$$.fragment),s=D(),n=b("span"),n.textContent=i,this.h()},l(o){e=y(o,"SPAN",{class:!0});var a=P(e);X(t.$$.fragment,a),s=j(a),n=y(a,"SPAN",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-qlaf2o"&&(n.textContent=i),a.forEach(h),this.h()},h(){_(n,"class","info-msg svelte-1riw2gy"),_(e,"class","help-icon svelte-1riw2gy")},m(o,a){N(o,e,a),Y(t,e,null),m(e,s),m(e,n),r=!0},p:ee,i(o){r||(V(t.$$.fragment,o),r=!0)},o(o){H(t.$$.fragment,o),r=!1},d(o){o&&h(e),J(t)}}}function Do(l){let e,t,s,n=l[0].localGitRepo+"",i;return{c(){e=b("div"),t=b("span"),s=Z("Tracking "),i=Z(n),this.h()},l(r){e=y(r,"DIV",{class:!0});var o=P(e);t=y(o,"SPAN",{class:!0});var a=P(t);s=Q(a,"Tracking "),i=Q(a,n),a.forEach(h),o.forEach(h),this.h()},h(){_(t,"class","repo-location svelte-1riw2gy"),_(e,"class","result-msg svelte-1riw2gy")},m(r,o){N(r,e,o),m(e,t),m(t,s),m(t,i)},p(r,o){o&1&&n!==(n=r[0].localGitRepo+"")&&he(i,n)},i:ee,o:ee,d(r){r&&h(e)}}}function jo(l){let e,t,s;return t=new Me({props:{src:rs,theme:"filled",class:"h-6 w-6 text-red-700"}}),{c(){e=b("span"),G(t.$$.fragment),this.h()},l(n){e=y(n,"SPAN",{class:!0});var i=P(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","gitx-icon svelte-1riw2gy")},m(n,i){N(n,e,i),Y(t,e,null),s=!0},i(n){s||(V(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function Mo(l){let e,t,s;return t=new Me({props:{src:On,theme:"filled",class:"h-6 w-6 text-green-700"}}),{c(){e=b("span"),G(t.$$.fragment),this.h()},l(n){e=y(n,"SPAN",{class:!0});var i=P(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","gitcheck-icon svelte-1riw2gy")},m(n,i){N(n,e,i),Y(t,e,null),s=!0},i(n){s||(V(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function Fo(l){let e,t,s,n,i="Publish your git repo to a platform like GitHub or GitLab",r;return t=new Me({props:{src:Ln,class:"h-5 w-5 pb-0.5"}}),{c(){e=b("span"),G(t.$$.fragment),s=D(),n=b("span"),n.textContent=i,this.h()},l(o){e=y(o,"SPAN",{class:!0});var a=P(e);X(t.$$.fragment,a),s=j(a),n=y(a,"SPAN",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-mv1gko"&&(n.textContent=i),a.forEach(h),this.h()},h(){_(n,"class","info-msg svelte-1riw2gy"),_(e,"class","help-icon svelte-1riw2gy")},m(o,a){N(o,e,a),Y(t,e,null),m(e,s),m(e,n),r=!0},p:ee,i(o){r||(V(t.$$.fragment,o),r=!0)},o(o){H(t.$$.fragment,o),r=!1},d(o){o&&h(e),J(t)}}}function Vo(l){let e,t,s,n=l[0].gitRepo.replace(".git","")+"",i,r;return{c(){e=b("div"),t=b("a"),s=b("span"),i=Z(n),this.h()},l(o){e=y(o,"DIV",{class:!0});var a=P(e);t=y(a,"A",{href:!0,target:!0,rel:!0});var c=P(t);s=y(c,"SPAN",{class:!0});var u=P(s);i=Q(u,n),u.forEach(h),c.forEach(h),a.forEach(h),this.h()},h(){_(s,"class","repo-location svelte-1riw2gy"),_(t,"href",r=l[0].gitRepo.replace(".git","")),_(t,"target","_blank"),_(t,"rel","noreferrer"),_(e,"class","result-msg svelte-1riw2gy")},m(o,a){N(o,e,a),m(e,t),m(t,s),m(s,i)},p(o,a){a&1&&n!==(n=o[0].gitRepo.replace(".git","")+"")&&he(i,n),a&1&&r!==(r=o[0].gitRepo.replace(".git",""))&&_(t,"href",r)},i:ee,o:ee,d(o){o&&h(e)}}}function Bo(l){let e,t,s,n,i="Version Control",r,o,a,c,u,f,d="Local Git Repo",p,g,k,v,w,C,S,F,M,$="Git Repo Published",R,A,B,E,I,O='Learn more about Setting Up Version Control →',L;const T=[Lo,Oo],q=[];function U(ie,ue){return ie[0].localGitRepo?0:1}a=U(l),c=q[a]=T[a](l);const W=[Do,Po],x=[];function z(ie,ue){return ie[0].localGitRepo?0:1}g=z(l),k=x[g]=W[g](l);const se=[Mo,jo],ne=[];function $e(ie,ue){return ie[0].gitRepo?0:1}C=$e(l),S=ne[C]=se[C](l);const Ee=[Vo,Fo],ae=[];function Se(ie,ue){return ie[0].gitRepo?0:1}return A=Se(l),B=ae[A]=Ee[A](l),{c(){e=b("form"),t=b("div"),s=b("div"),n=b("h2"),n.textContent=i,r=Z(` Use version control to keep track of changes to your project. A published git repo is needed if you want to deploy your Evidence project online. `),o=b("div"),c.c(),u=D(),f=b("span"),f.textContent=d,p=D(),k.c(),v=D(),w=b("div"),S.c(),F=D(),M=b("span"),M.textContent=$,R=D(),B.c(),E=D(),I=b("footer"),I.innerHTML=O,this.h()},l(ie){e=y(ie,"FORM",{id:!0,class:!0});var ue=P(e);t=y(ue,"DIV",{class:!0});var oe=P(t);s=y(oe,"DIV",{class:!0});var we=P(s);n=y(we,"H2",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-n9hgtt"&&(n.textContent=i),r=Q(we,` Use version control to keep track of changes to your project. A published git repo is needed if you want to deploy your Evidence project online. `),o=y(we,"DIV",{class:!0});var Ce=P(o);c.l(Ce),u=j(Ce),f=y(Ce,"SPAN",{class:!0,"data-svelte-h":!0}),K(f)!=="svelte-moy7v6"&&(f.textContent=d),p=j(Ce),k.l(Ce),Ce.forEach(h),v=j(we),w=y(we,"DIV",{class:!0});var re=P(w);S.l(re),F=j(re),M=y(re,"SPAN",{class:!0,"data-svelte-h":!0}),K(M)!=="svelte-1wsobt7"&&(M.textContent=$),R=j(re),B.l(re),re.forEach(h),we.forEach(h),oe.forEach(h),E=j(ue),I=y(ue,"FOOTER",{class:!0,"data-svelte-h":!0}),K(I)!=="svelte-1e01ncp"&&(I.innerHTML=O),ue.forEach(h),this.h()},h(){_(n,"class","svelte-1riw2gy"),_(f,"class","item-label svelte-1riw2gy"),_(o,"class","git-item svelte-1riw2gy"),_(M,"class","item-label svelte-1riw2gy"),_(w,"class","git-item svelte-1riw2gy"),_(s,"class","panel svelte-1riw2gy"),_(t,"class","version-control-box svelte-1riw2gy"),_(I,"class","svelte-1riw2gy"),_(e,"id","version-control"),_(e,"class","svelte-1riw2gy")},m(ie,ue){N(ie,e,ue),m(e,t),m(t,s),m(s,n),m(s,r),m(s,o),q[a].m(o,null),m(o,u),m(o,f),m(o,p),x[g].m(o,null),m(s,v),m(s,w),ne[C].m(w,null),m(w,F),m(w,M),m(w,R),ae[A].m(w,null),m(e,E),m(e,I),L=!0},p(ie,[ue]){let oe=a;a=U(ie),a!==oe&&(_e(),H(q[oe],1,1,()=>{q[oe]=null}),ve(),c=q[a],c||(c=q[a]=T[a](ie),c.c()),V(c,1),c.m(o,u));let we=g;g=z(ie),g===we?x[g].p(ie,ue):(_e(),H(x[we],1,1,()=>{x[we]=null}),ve(),k=x[g],k?k.p(ie,ue):(k=x[g]=W[g](ie),k.c()),V(k,1),k.m(o,null));let Ce=C;C=$e(ie),C!==Ce&&(_e(),H(ne[Ce],1,1,()=>{ne[Ce]=null}),ve(),S=ne[C],S||(S=ne[C]=se[C](ie),S.c()),V(S,1),S.m(w,F));let re=A;A=Se(ie),A===re?ae[A].p(ie,ue):(_e(),H(ae[re],1,1,()=>{ae[re]=null}),ve(),B=ae[A],B?B.p(ie,ue):(B=ae[A]=Ee[A](ie),B.c()),V(B,1),B.m(w,null))},i(ie){L||(V(c),V(k),V(S),V(B),L=!0)},o(ie){H(c),H(k),H(S),H(B),L=!1},d(ie){ie&&h(e),q[a].d(),x[g].d(),ne[C].d(),ae[A].d()}}}function qo(l,e,t){let{settings:s}=e;return l.$$set=n=>{"settings"in n&&t(0,s=n.settings)},[s]}class Ho extends ye{constructor(e){super(),ke(this,e,qo,Bo,be,{settings:0})}}const Ro=async({fetch:l,data:e})=>({...e,settings:{},gitIgnore:""}),ta=Object.freeze(Object.defineProperty({__proto__:null,load:Ro},Symbol.toStringTag,{value:"Module"}));function Uo(l){let e,t="Settings are only available in development mode.";return{c(){e=b("p"),e.textContent=t},l(s){e=y(s,"P",{"data-svelte-h":!0}),K(e)!=="svelte-591hpj"&&(e.textContent=t)},m(s,n){N(s,e,n)},p:ee,i:ee,o:ee,d(s){s&&h(e)}}}function Ko(l){let e,t,s,n,i,r,o,a,c,u,f,d,p;return t=new Ho({props:{settings:l[0]}}),n=new vr({props:{availableSourcePlugins:l[3],sources:l[2]}}),r=new Zr({props:{settings:l[0],sources:l[2]}}),a=new Eo({props:{customFormattingSettings:l[1]}}),u=new Ao({props:{settings:l[0]}}),{c(){e=b("div"),G(t.$$.fragment),s=D(),G(n.$$.fragment),i=D(),G(r.$$.fragment),o=D(),G(a.$$.fragment),c=D(),G(u.$$.fragment),f=D(),d=b("br"),this.h()},l(g){e=y(g,"DIV",{class:!0});var k=P(e);X(t.$$.fragment,k),s=j(k),X(n.$$.fragment,k),i=j(k),X(r.$$.fragment,k),o=j(k),X(a.$$.fragment,k),c=j(k),X(u.$$.fragment,k),k.forEach(h),f=j(g),d=y(g,"BR",{}),this.h()},h(){_(e,"class","mt-12")},m(g,k){N(g,e,k),Y(t,e,null),m(e,s),Y(n,e,null),m(e,i),Y(r,e,null),m(e,o),Y(a,e,null),m(e,c),Y(u,e,null),N(g,f,k),N(g,d,k),p=!0},p(g,k){const v={};k&1&&(v.settings=g[0]),t.$set(v);const w={};k&8&&(w.availableSourcePlugins=g[3]),k&4&&(w.sources=g[2]),n.$set(w);const C={};k&1&&(C.settings=g[0]),k&4&&(C.sources=g[2]),r.$set(C);const S={};k&2&&(S.customFormattingSettings=g[1]),a.$set(S);const F={};k&1&&(F.settings=g[0]),u.$set(F)},i(g){p||(V(t.$$.fragment,g),V(n.$$.fragment,g),V(r.$$.fragment,g),V(a.$$.fragment,g),V(u.$$.fragment,g),p=!0)},o(g){H(t.$$.fragment,g),H(n.$$.fragment,g),H(r.$$.fragment,g),H(a.$$.fragment,g),H(u.$$.fragment,g),p=!1},d(g){g&&(h(e),h(f),h(d)),J(t),J(n),J(r),J(a),J(u)}}}function xo(l){let e,t,s,n;const i=[Ko,Uo],r=[];function o(a,c){return 1}return e=o(),t=r[e]=i[e](l),{c(){t.c(),s=me()},l(a){t.l(a),s=me()},m(a,c){r[e].m(a,c),N(a,s,c),n=!0},p(a,[c]){t.p(a,c)},i(a){n||(V(t),n=!0)},o(a){H(t),n=!1},d(a){a&&h(s),r[e].d(a)}}}function zo(l,e,t){let{data:s}=e,{settings:n,customFormattingSettings:i,sources:r,plugins:o}=s;return console.log({settings:n,sources:r,plugins:o}),l.$$set=a=>{"data"in a&&t(4,s=a.data)},l.$$.update=()=>{l.$$.dirty&16&&t(0,{settings:n,customFormattingSettings:i,sources:r,plugins:o}=s,n,(t(1,i),t(4,s)),(t(2,r),t(4,s)),(t(3,o),t(4,s)))},[n,i,r,o,s]}class sa extends ye{constructor(e){super(),ke(this,e,zo,xo,be,{data:4})}}export{sa as component,ta as universal};