diff --git a/abstra_statics/dist/assets/ActionButton.vue_vue_type_script_setup_true_lang.fb00ed8b.js b/abstra_statics/dist/assets/ActionButton.vue_vue_type_script_setup_true_lang.fb00ed8b.js new file mode 100644 index 0000000000..da89dc2c44 --- /dev/null +++ b/abstra_statics/dist/assets/ActionButton.vue_vue_type_script_setup_true_lang.fb00ed8b.js @@ -0,0 +1,2 @@ +import{d as r,r as f,o as i,a3 as l,b,c as u,N as c,ad as y}from"./registerWidgets.68572380.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4f7bfa47-9157-4f96-b4be-fb0b5d46e89d",e._sentryDebugIdIdentifier="sentry-dbid-4f7bfa47-9157-4f96-b4be-fb0b5d46e89d")}catch{}})();const g=r({__name:"ActionButton",props:{action:null},emits:["next"],setup(e,{emit:n}){const o=e,s=f(null);i(()=>{s.value&&o.action.setElement(s.value),l.addAction(o.action)});const a=()=>n("next");return(m,t)=>(b(),u("button",{ref_key:"element",ref:s,class:"next-button",onClick:t[0]||(t[0]=d=>a()),onKeydown:t[1]||(t[1]=y(d=>a(),["enter"]))},c(e.action.name),545))}});export{g as _}; +//# sourceMappingURL=ActionButton.vue_vue_type_script_setup_true_lang.fb00ed8b.js.map diff --git a/abstra_statics/dist/assets/ApiKeys.8aba194d.js b/abstra_statics/dist/assets/ApiKeys.8aba194d.js new file mode 100644 index 0000000000..595315f23a --- /dev/null +++ b/abstra_statics/dist/assets/ApiKeys.8aba194d.js @@ -0,0 +1,2 @@ +var P=Object.defineProperty;var k=(a,e,t)=>e in a?P(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var f=(a,e,t)=>(k(a,typeof e!="symbol"?e+"":e,t),t);import{d as b,r as w,b as C,t as S,w as I,S as x,x as l,N as D,O as j,Q as M,q as N,K as $,c as B,e as A,z as v,F as K,J as z}from"./registerWidgets.68572380.js";import{a as E}from"./asyncComputed.896b7bde.js";import{P as V}from"./project.655b0999.js";import{C as g}from"./gateway.7cd64c5e.js";import{M as F}from"./member.cfc3d34b.js";import{A as O}from"./activeRecord.15082700.js";import"./index.5601bb74.js";import{C as W}from"./CrudView.22ff1852.js";import{M as Y}from"./Modal.dacb9a40.js";import{t as q}from"./icons.3acf9dc1.js";import"./passwordlessManager.8fb0aebd.js";import"./DropdownMenu.06bbb53d.js";import"./LoadingIndicator.5fb5b875.js";import"./lottie.e503152f.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="94c8732e-fe93-469d-a022-325d98b898ce",a._sentryDebugIdIdentifier="sentry-dbid-94c8732e-fe93-469d-a022-325d98b898ce")}catch{}})();class G{constructor(){f(this,"urlPath","api-keys")}async create({projectId:e,name:t}){return g.post(`projects/${e}/${this.urlPath}`,{name:t})}async delete(e,t){await g.delete(`projects/${e}/${this.urlPath}/${t}`)}async list(e){return g.get(`projects/${e}/${this.urlPath}`)}async get(){throw new Error("Not implemented")}async update(){throw new Error("Not implemented")}}const u=new G;class c{constructor(e){f(this,"record");this.record=new O(u,e,"id")}static async list(e){return(await u.list(e)).map(s=>new c(s))}static async create(e){const t=await u.create(e);return new c(t)}static async delete(e,t){await u.delete(e,t)}get id(){return this.record.get("id")}get name(){return this.record.get("name")}async save(){await this.record.save()}get createdAt(){return new Date(this.record.get("createdAt"))}hasChanges(){return this.record.hasChanges()}get ownerId(){return this.record.get("createdBy")}get value(){var e;return(e=this.record.get("value"))!=null?e:null}}const H=a=>(j("data-v-3da8363c"),a=a(),M(),a),J={class:"main-text"},L=H(()=>l("div",{class:"separator"},null,-1)),Q=["value"],T=b({__name:"ApiKeyModal",emits:["delete"],setup(a,{expose:e}){const t=w(null),s=w(""),m={maxWidth:"350px",height:"unset",padding:"30px"},y={display:"flex",flexDirection:"column",alignItems:"center",color:"#414A58",justifyContent:"center",lineHeight:"22px",fontSize:"18px",textAlign:"center",borderBottom:"none",gap:"23px",fontWeight:"700",marginBottom:"17px"},d={color:"#6D7C93",fontSize:"14px",textAlign:"center",justifyContent:"space-around"},h=o=>{var n;s.value=o,(n=t==null?void 0:t.value)==null||n.open()},p=()=>{var o;return(o=t==null?void 0:t.value)==null?void 0:o.close()};return e({open:h,close:p}),(o,n)=>(C(),S(Y,{ref_key:"modalRef",ref:t,"container-style":m,"header-style":y,"content-style":d},{header:I(()=>[x(" API Key Created ")]),content:I(()=>[l("div",J,[x(D("Your API key has been created. Please copy it and store it in a safe place. You will not be able to see it again.")+" ",1),L,l("input",{disabled:"",value:s.value},null,8,Q),l("div",{class:"buttons"},[l("button",{class:"cancel",onClick:p},"Close")])])]),_:1},512))}});const U=N(T,[["__scopeId","data-v-3da8363c"]]),ue=b({__name:"ApiKeys",setup(a){const e=[{key:"name",label:"API key name"}],s=z().params.projectId,{loading:m,result:y,refetch:d}=E(async()=>Promise.all([c.list(s),V.get(s).then(o=>F.list(o.organizationId))]).then(([o,n])=>o.map(r=>({apiKey:r,member:n.find(i=>i.authorId===r.ownerId)})))),h=async o=>{const n=await c.create({projectId:s,name:o.name});d(),n.value&&prompt("Copy this API key and paste it in the local editor to deploy your app:",n==null?void 0:n.value)},p=$(()=>{var o,n;return{columns:[{name:"Name"},{name:"Creation date"},{name:"Owner"},{name:"Actions"}],rows:(n=(o=y.value)==null?void 0:o.map(({apiKey:r,member:i})=>{var _;return{key:r.id,cells:[{text:r.name,classes:["title","centered"]},{text:r.createdAt.toLocaleString(),classes:[]},{text:(_=i==null?void 0:i.email)!=null?_:"Unknown"},{classes:["centered"],text:"actions",actions:[{label:"Delete",icon:q,dangerous:!0,onClick:async()=>{await c.delete(s,r.id),d()}}]}]}}))!=null?n:[]}});return(o,n)=>(C(),B(K,null,[A(W,{"entity-name":"API key","create-button-text":"Create API Key",loading:v(m),title:"API Keys",description:"API Keys are used to deploy your app from the local editor.","empty-title":"No API keys here yet",table:v(p),fields:e,onCreate:h},null,8,["loading","table"]),A(U)],64))}});export{ue as default}; +//# sourceMappingURL=ApiKeys.8aba194d.js.map diff --git a/abstra_statics/dist/assets/BackButton.9eaf8cad.js b/abstra_statics/dist/assets/BackButton.9eaf8cad.js new file mode 100644 index 0000000000..ee9bfedb0d --- /dev/null +++ b/abstra_statics/dist/assets/BackButton.9eaf8cad.js @@ -0,0 +1,2 @@ +import{q as n,b as o,c as a,x as r,d as _,a as d,t as i,w as l,e as u,S as f}from"./registerWidgets.68572380.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3e73d0a4-2a9a-4881-94fb-72085cec910e",e._sentryDebugIdIdentifier="sentry-dbid-3e73d0a4-2a9a-4881-94fb-72085cec910e")}catch{}})();const p={},w={width:"12",height:"10",viewBox:"0 0 12 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k=r("path",{d:"M2.8725 4.25L5.5575 1.5575L4.5 0.5L0 5L4.5 9.5L5.5575 8.4425L2.8725 5.75H12V4.25H2.8725Z",fill:"#6D7C93"},null,-1),B=[k];function h(e,t){return o(),a("svg",w,B)}const b=n(p,[["render",h]]),g=_({__name:"BackButton",props:{link:null},setup(e){return(t,s)=>{const c=d("router-link");return o(),i(c,{class:"link-button",to:e.link},{default:l(()=>[u(b),f(" Back ")]),_:1},8,["to"])}}});const m=n(g,[["__scopeId","data-v-56a12edc"]]);export{m as B}; +//# sourceMappingURL=BackButton.9eaf8cad.js.map diff --git a/abstra_statics/dist/assets/BackButton.b8e69812.js b/abstra_statics/dist/assets/BackButton.b8e69812.js new file mode 100644 index 0000000000..c211d927a0 --- /dev/null +++ b/abstra_statics/dist/assets/BackButton.b8e69812.js @@ -0,0 +1,2 @@ +import{x as a}from"./icons.3acf9dc1.js";import{d as c,a as r,b as i,c as d,e as _,z as l,S as u,q as f}from"./registerWidgets.68572380.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="706789bd-c697-4a21-926f-8e552373343c",e._sentryDebugIdIdentifier="sentry-dbid-706789bd-c697-4a21-926f-8e552373343c")}catch{}})();const p=c({__name:"BackButton",emits:["exitFullscreenPreview"],setup(e,{emit:t}){return(o,n)=>{const s=r("icon");return i(),d("button",{class:"back-btn",onClick:n[0]||(n[0]=b=>t("exitFullscreenPreview"))},[_(s,{class:"icon",path:l(a),width:"20",height:"20",fill:"#5A677A"},null,8,["path"]),u(" Editor ")])}}});const w=f(p,[["__scopeId","data-v-eaeb3a6e"]]);export{w as B}; +//# sourceMappingURL=BackButton.b8e69812.js.map diff --git a/abstra_statics/dist/assets/Builds.bd894aaa.js b/abstra_statics/dist/assets/Builds.bd894aaa.js new file mode 100644 index 0000000000..16bd0833f5 --- /dev/null +++ b/abstra_statics/dist/assets/Builds.bd894aaa.js @@ -0,0 +1,4 @@ +import{d as u,K as m,b as _,t as f,w as y,z as d,J as b,O as g,Q as h,x as i,S as n,q as w}from"./registerWidgets.68572380.js";import{a as I}from"./asyncComputed.896b7bde.js";import"./gateway.7cd64c5e.js";import{B as x}from"./build.a423d467.js";import"./index.5601bb74.js";import{C as v}from"./CrudView.22ff1852.js";import"./passwordlessManager.8fb0aebd.js";import"./activeRecord.15082700.js";import"./DropdownMenu.06bbb53d.js";import"./Modal.dacb9a40.js";import"./LoadingIndicator.5fb5b875.js";import"./lottie.e503152f.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="286460ea-677e-43f1-a0f9-453fb3c0a975",e._sentryDebugIdIdentifier="sentry-dbid-286460ea-677e-43f1-a0f9-453fb3c0a975")}catch{}})();const B=e=>(g("data-v-1b7a68a8"),e=e(),h(),e),C=B(()=>i("div",{class:"instructions"},[n(" Get started with the local editor in seconds: "),i("pre",null,` $ pip install abstra --upgrade + $ abstra serve ./your-project-directory + `),n(" And you're done! Explore the local editor and start building apps. ")],-1)),S=u({__name:"Builds",setup(e){const r=b().params.projectId,{loading:c,result:p}=I(()=>x.list(r)),l=m(()=>{var o,s;return{columns:[{name:"Id"},{name:"Creation date"},{name:"Status"}],rows:(s=(o=p.value)==null?void 0:o.map(t=>({key:t.id,cells:[{text:t.id,classes:["title","centered"]},{text:t.createdAt.toLocaleString(),classes:[]},{text:t.status,classes:["centered"]}]})))!=null?s:[]}});return(o,s)=>(_(),f(v,{"entity-name":"build",loading:d(c),title:"Builds",description:"Each build is a version of your app. You can create a new build by deploying your app from the local editor.","empty-title":"No builds here yet",table:d(l)},{"empty-description":y(()=>[C]),_:1},8,["loading","table"]))}});const K=w(S,[["__scopeId","data-v-1b7a68a8"]]);export{K as default}; +//# sourceMappingURL=Builds.bd894aaa.js.map diff --git a/abstra_statics/dist/assets/CircularLoading.30fd4d73.js b/abstra_statics/dist/assets/CircularLoading.30fd4d73.js new file mode 100644 index 0000000000..4465feabe7 --- /dev/null +++ b/abstra_statics/dist/assets/CircularLoading.30fd4d73.js @@ -0,0 +1,2 @@ +import{L as c}from"./lottie.e503152f.js";import{d as u,r as f,o as p,K as a,b as _,c as y,x as g,A as s,z as i,B as b,q as m}from"./registerWidgets.68572380.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6099985e-8ee4-44fc-b496-2fe451ac0871",e._sentryDebugIdIdentifier="sentry-dbid-6099985e-8ee4-44fc-b496-2fe451ac0871")}catch{}})();const v=u({__name:"CircularLoading",props:{direction:null,justify:null,size:null},setup(e){const t=e,o=f(null);p(()=>{!o.value||c.loadAnimation({container:o.value,renderer:"svg",loop:!0,autoplay:!0,path:"/circularLoading.json"})});const d=a(()=>{const{direction:n="row",justify:r="space-between"}=t;return{flexDirection:n,justifyContent:r}}),l=a(()=>{const{size:n="40"}=t;return{width:`${n}px`,height:`${n}px`}});return(n,r)=>(_(),y("div",{class:"container",style:s(i(d))},[g("div",{ref_key:"loading",ref:o,style:s(i(l))},null,4),b(n.$slots,"default",{},void 0,!0)],4))}});const I=m(v,[["__scopeId","data-v-a1f994d4"]]);export{I as L}; +//# sourceMappingURL=CircularLoading.30fd4d73.js.map diff --git a/abstra_statics/dist/assets/ConnectorEditor.6a950f7c.js b/abstra_statics/dist/assets/ConnectorEditor.6a950f7c.js new file mode 100644 index 0000000000..0acbaa856a --- /dev/null +++ b/abstra_statics/dist/assets/ConnectorEditor.6a950f7c.js @@ -0,0 +1,2 @@ +import{d as v,v as T,a9 as N,o as O,V as q,aa as P,b as t,c as s,B as M,q as C,F as $,L as k,x as d,N as I,e as y,K as S,D as m,t as w,ak as E,z as _,a6 as V,y as L,a8 as G,a as U,G as z,S as F,w as x,J,W as Q,O as W,Q as H}from"./registerWidgets.68572380.js";import{b as j}from"./index.5601bb74.js";import"./gateway.7cd64c5e.js";import{C as X}from"./connector.b06e57a5.js";import{a as Y}from"./asyncComputed.896b7bde.js";import{B as Z}from"./BackButton.9eaf8cad.js";import{S as K}from"./SaveButton.f5cf0ed0.js";import{L as ee}from"./CircularLoading.30fd4d73.js";import"./passwordlessManager.8fb0aebd.js";import"./activeRecord.15082700.js";import"./icons.3acf9dc1.js";import"./lottie.e503152f.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="589cd604-8147-4224-b75c-2196c40edfc5",e._sentryDebugIdIdentifier="sentry-dbid-589cd604-8147-4224-b75c-2196c40edfc5")}catch{}})();const te={class:"tab"},se=v({__name:"Tab",props:{title:null,icon:null},setup(e){const o=e,u=T({isActive:!1,title:o.title,icon:o.icon}),n=N("addTab");return O(()=>{n(u)}),(l,a)=>q((t(),s("div",te,[M(l.$slots,"default",{},void 0,!0)],512)),[[P,u.isActive]])}});const D=C(se,[["__scopeId","data-v-497e4e8e"]]),ne=["value"],ae=v({__name:"TextInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){return(u,n)=>(t(),s("input",{value:e.value,onChange:n[0]||(n[0]=l=>o("change",l.target.value))},null,40,ne))}}),oe=["value"],ce=v({__name:"NumberInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){return(u,n)=>(t(),s("input",{value:e.value,type:"number",onChange:n[0]||(n[0]=l=>o("change",l.target.value))},null,40,oe))}}),le=["value"],ue=v({__name:"BooleanInput",props:{value:{type:Boolean},schema:null},emits:["change"],setup(e,{emit:o}){return(u,n)=>(t(),s("input",{value:e.value,type:"checkbox",onChange:n[0]||(n[0]=l=>o("change",l.target.checked))},null,40,le))}}),re={class:"oi"},ie={class:"oi-item-label"},de=v({__name:"ObjectInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){var g;const u=e,n=T({value:(g=u.value)!=null?g:{}}),l=(h,c)=>{n.value[h]=c,a()},a=()=>{o("change",n.value)};return(h,c)=>(t(),s("div",re,[(t(!0),s($,null,k(u.schema.values,(b,i)=>(t(),s("div",{key:i,class:"oi-item"},[d("div",ie,I(i),1),y(B,{class:"oi-item-input",schema:b,value:n.value[i],onChange:f=>l(i,f)},null,8,["schema","value","onChange"])]))),128))]))}});const _e=C(de,[["__scopeId","data-v-bd751ecc"]]),he={class:"ai"},me=["onClick"],pe=v({__name:"ArrayInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){var c;const n=T({value:(c=e.value)!=null?c:[]}),l=()=>{n.value.push(void 0)},a=b=>{n.value.splice(b,1),h()},g=(b,i)=>{n.value[b]=i,h()},h=()=>{o("change",n.value)};return(b,i)=>(t(),s("div",he,[(t(!0),s($,null,k(n.value,(f,r)=>(t(),s("div",{key:r,class:"ai-item"},[y(B,{schema:e.schema.items,value:f,onChange:p=>g(r,p)},null,8,["schema","value","onChange"]),d("button",{class:"ai-item-remove",onClick:p=>a(r)},"x",8,me)]))),128)),d("button",{class:"ai-item-add",onClick:i[0]||(i[0]=f=>l())},"Add")]))}});const ve=C(pe,[["__scopeId","data-v-a6c8b9fb"]]),ge=["value"],be=["value"],fe=v({__name:"OptionsInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){return(u,n)=>(t(),s("select",{value:e.value,onChange:n[0]||(n[0]=l=>o("change",l.target.value))},[(t(!0),s($,null,k(e.schema.values,l=>(t(),s("option",{key:l,value:l},I(l),9,be))),128))],40,ge))}}),ye=["value"],$e=v({__name:"UnionInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){return(u,n)=>(t(),s("input",{value:e.value,onChange:n[0]||(n[0]=l=>o("change",l.target.value))},null,40,ye))}}),ke=["value"],Ie=v({__name:"AnyInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){return(u,n)=>(t(),s("input",{value:e.value,onChange:n[0]||(n[0]=l=>o("change",l.target.value))},null,40,ke))}}),Ce={string:ae,number:ce,boolean:ue,object:_e,array:ve,options:fe,any:Ie,union:$e},xe={class:"gi"},Se={key:0,class:"gi-header"},Te={key:0,class:"gi-label"},Me={key:1,class:"gi-tags"},we={key:0,class:"gi-required"},Be={key:1,class:"gi-required"},Ae={key:1,class:"gi-description"},Re=v({__name:"GenericInput",props:{value:null,schema:null},emits:["change"],setup(e,{emit:o}){const u=e,n=S(()=>({component:Ce[u.schema.type],props:{value:u.value,schema:u.schema}}));return(l,a)=>(t(),s("div",xe,["label"in e.schema?(t(),s("div",Se,["label"in e.schema?(t(),s("label",Te,I(e.schema.label),1)):m("",!0),"required"in e.schema||"secret"in e.schema?(t(),s("div",Me,["required"in e.schema&&e.schema.required?(t(),s("span",we,"[Required]")):m("",!0),"secret"in e.schema&&e.schema.secret?(t(),s("span",Be,"[Secret]")):m("",!0)])):m("",!0)])):m("",!0),"description"in e.schema?(t(),s("div",Ae,I(e.schema.description),1)):m("",!0),(t(),w(V(_(n).component),E({class:"gi-input"},_(n).props,{onChange:a[0]||(a[0]=g=>o("change",g))}),null,16))]))}});const B=C(Re,[["__scopeId","data-v-dd33d764"]]),je={class:"tab-menu"},De={class:"tabs"},Oe={key:0,class:"group"},qe={class:"group"},Ne=["onClick"],Pe={key:1,class:"group"},Ee={class:"content"},Ve=v({__name:"TabMenuUnderline",setup(e){const o=T([]),u=L(),n=a=>{const g=h=>h==a;o.forEach((h,c)=>{h.isActive=g(c)})},l=S(()=>o.findIndex(a=>a.isActive));return G("addTab",a=>{o.push(a)}),O(()=>{n(0)}),(a,g)=>{const h=U("icon");return t(),s("div",je,[d("div",De,[_(u).left?(t(),s("div",Oe,[M(a.$slots,"left",{},void 0,!0)])):m("",!0),d("div",qe,[(t(!0),s($,null,k(o,(c,b)=>(t(),s("button",{key:c.title,class:z(["form-tab",_(l)==b&&"active"]),onClick:i=>n(b)},[c.icon?(t(),w(h,{key:0,path:c.icon,fill:"#8692A5",width:"10",height:"10"},null,8,["path"])):m("",!0),F(" "+I(c.title),1)],10,Ne))),128))]),_(u).right?(t(),s("div",Pe,[M(a.$slots,"right",{},void 0,!0)])):m("",!0)]),d("div",Ee,[M(a.$slots,"default",{},void 0,!0)])])}}});const Le=C(Ve,[["__scopeId","data-v-f2e43fa2"]]),A=e=>(W("data-v-63dce332"),e=e(),H(),e),Ge={class:"page settings"},Ue={class:"page test"},ze={class:"test-method-selector"},Fe=A(()=>d("label",{class:"test-method-selector-label"},"Method",-1)),Je=A(()=>d("option",{value:null,disabled:"",selected:"",hidden:""},"Select a method",-1)),Qe=["value"],We={key:0,class:"test-method-parameters"},He=A(()=>d("label",{class:"test-method-parameters-label"},"Params",-1)),Xe={key:1,class:"test-method-response"},Ye=A(()=>d("label",{class:"test-method-response-label"},"Response",-1)),Ze={key:0,class:"test-method-response-errors"},Ke={key:1,class:"test-method-response-returns"},et={class:"test-method-response-returns-value"},tt=v({__name:"ConnectorEditor",setup(e){const o=S(()=>{var i;return`/projects/${(i=a.value)==null?void 0:i.projectId}/connectors`}),n=J().params.connectorId,{loading:l,result:a}=Y(()=>X.get(n)),g=S(()=>{var i;return(i=a.value)!=null&&i.schema.methods?Object.keys(a.value.schema.methods).reduce((f,r)=>{const p=a.value.schema.methods[r];return[...f,{key:r,...p}]},[]):[]}),h=S(()=>!a.value||!(a.value.type in j.schema)?null:j.schema[a.value.type]),c=T({testMethod:null,testParams:{},testResponse:null}),b=async()=>{!a.value||!c.testMethod||!c.testParams||(c.testResponse=await a.value.test(c.testMethod,c.testParams))};return(i,f)=>_(l)||!_(a)||!_(h)?(t(),w(ee,{key:0})):(t(),w(Le,{key:1,class:"connector-editor"},{left:x(()=>[y(Z,{link:_(o)},null,8,["link"])]),right:x(()=>[y(K,{model:_(a)},null,8,["model"])]),default:x(()=>[y(D,{title:"Settings"},{default:x(()=>[d("div",Ge,[(t(!0),s($,null,k(_(h).settings,(r,p)=>(t(),s("div",{key:p},[y(B,{schema:r,value:_(a).settings[p],onChange:R=>_(a).settings[p]=R},null,8,["schema","value","onChange"])]))),128))])]),_:1}),y(D,{title:"Test"},{default:x(()=>[d("div",Ue,[d("div",ze,[Fe,q(d("select",{"onUpdate:modelValue":f[0]||(f[0]=r=>c.testMethod=r),class:"test-method-selector-selector"},[Je,(t(!0),s($,null,k(_(g),r=>(t(),s("option",{key:r.key,value:r.key},I(r.label),9,Qe))),128))],512),[[Q,c.testMethod]])]),c.testMethod?(t(),s("div",We,[He,(t(!0),s($,null,k(_(a).schema.methods[c.testMethod].params,(r,p)=>(t(),s("div",{key:p,class:"test-field"},[y(B,{schema:r,value:c.testParams[p],onChange:R=>c.testParams[p]=R},null,8,["schema","value","onChange"])]))),128)),d("button",{class:"test-method-run",onClick:f[1]||(f[1]=r=>b())},"Test")])):m("",!0),c.testResponse?(t(),s("div",Xe,[Ye,c.testResponse.errors.length>0?(t(),s("div",Ze,[(t(!0),s($,null,k(c.testResponse.errors,r=>(t(),s("div",{key:r},I(r),1))),128))])):m("",!0),c.testResponse.returns&&Object.keys(c.testResponse.returns).length>0?(t(),s("div",Ke,[d("span",et,[d("pre",null,I(JSON.stringify(c.testResponse.returns,null,2)),1)])])):m("",!0)])):m("",!0)])]),_:1})]),_:1}))}});const mt=C(tt,[["__scopeId","data-v-63dce332"]]);export{mt as default}; +//# sourceMappingURL=ConnectorEditor.6a950f7c.js.map diff --git a/abstra_statics/dist/assets/Connectors.1ab645a4.js b/abstra_statics/dist/assets/Connectors.1ab645a4.js new file mode 100644 index 0000000000..f193512c95 --- /dev/null +++ b/abstra_statics/dist/assets/Connectors.1ab645a4.js @@ -0,0 +1,2 @@ +import{d as b,K as C,b as g,t as _,z as s,J as w,H as I}from"./registerWidgets.68572380.js";import{b as h}from"./index.5601bb74.js";import"./gateway.7cd64c5e.js";import{C as i}from"./connector.b06e57a5.js";import{a as k}from"./asyncComputed.896b7bde.js";import{g as x,t as D}from"./icons.3acf9dc1.js";import{C as E}from"./CrudView.22ff1852.js";import"./passwordlessManager.8fb0aebd.js";import"./activeRecord.15082700.js";import"./DropdownMenu.06bbb53d.js";import"./Modal.dacb9a40.js";import"./LoadingIndicator.5fb5b875.js";import"./lottie.e503152f.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="9ece9b4c-7e8f-4d7d-8c1c-f842c5cbe7ce",o._sentryDebugIdIdentifier="sentry-dbid-9ece9b4c-7e8f-4d7d-8c1c-f842c5cbe7ce")}catch{}})();const V=b({__name:"Connectors",setup(o){const n=w(),r=I(),a=n.params.projectId;async function l(e){const t=await i.create(a,e.name,e.type);r.push({name:"connectorEditor",params:{connectorId:t.id}})}const d=[{key:"name",label:"Connector name",type:"text"},{key:"type",label:"Connector type",type:Object.entries(h.schema).map(([e,t])=>({value:e,label:t.label}))}],{loading:p,result:m,refetch:u}=k(()=>i.list(a)),f=C(()=>{var e,t;return{columns:[{name:"Name"},{name:"Type"},{name:"actions"}],rows:(t=(e=m.value)==null?void 0:e.map(c=>({key:c.id,cells:[{text:c.name,classes:["centered"]},{text:c.type},{text:"Actions",classes:["centered"],actions:[{icon:x,label:"Edit",onClick({key:y}){r.push({name:"connectorEditor",params:{connectorId:y}})}},{icon:D,label:"Delete",dangerous:!0,async onClick(){await c.delete(),u()}}]}]})))!=null?t:[]}});return(e,t)=>(g(),_(E,{"entity-name":"connector",loading:s(p),title:"Connectors",description:"Each connector is a version of your app. You can create a new connector by deploying your app from the local editor.","empty-title":"No connectors here yet",table:s(f),fields:d,"create-button-text":"Create connector",onCreate:l},null,8,["loading","table"]))}});export{V as default}; +//# sourceMappingURL=Connectors.1ab645a4.js.map diff --git a/abstra_statics/dist/assets/CrudView.22ff1852.js b/abstra_statics/dist/assets/CrudView.22ff1852.js new file mode 100644 index 0000000000..5d40439b93 --- /dev/null +++ b/abstra_statics/dist/assets/CrudView.22ff1852.js @@ -0,0 +1,2 @@ +import{D as T,_ as A}from"./DropdownMenu.06bbb53d.js";import{d as B,r as I,v as z,b as t,t as f,w as C,S as D,N as o,x as l,c as s,L as h,V,ar as L,W as U,F as m,D as v,O as $,Q as N,q as M,K as E,B as F,A as W,z as j,a as q,G as S}from"./registerWidgets.68572380.js";import{M as G}from"./Modal.dacb9a40.js";import{L as H}from"./LoadingIndicator.5fb5b875.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},u=new Error().stack;u&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[u]="048c8dd8-c122-4062-b2c1-373b1cb3f029",e._sentryDebugIdIdentifier="sentry-dbid-048c8dd8-c122-4062-b2c1-373b1cb3f029")}catch{}})();const K=e=>($("data-v-ed693c76"),e=e(),N(),e),O={class:"main-text"},Q={class:"fields"},Y=["onUpdate:modelValue","type"],J=["onUpdate:modelValue"],P=["value"],R=K(()=>l("div",{class:"separator"},null,-1)),X={class:"buttons"},Z=B({__name:"CreationModal",props:{entityName:null,fields:null},emits:["create"],setup(e,{expose:u,emit:p}){const c=I(null),d=z({inputValue:{}}),b={maxWidth:"350px",height:"unset",padding:"30px"},g={borderBottom:"none",fontSize:"18px",marginBottom:"17px",display:"flex",flexDirection:"column",justifyContent:"center",color:"#4E596A",lineHeight:"22px"},r={color:"#414A58",fontSize:"14px",alignItems:"unset"},w=()=>{var i;return(i=c==null?void 0:c.value)==null?void 0:i.open()},_=()=>{var i;return(i=c==null?void 0:c.value)==null?void 0:i.close()},y=()=>{p("create",d.inputValue),_()};return u({open:w,close:_}),(i,x)=>(t(),f(G,{ref_key:"modalRef",ref:c,"container-style":b,"header-style":g,"content-style":r},{header:C(()=>[D(" Create a new "+o(e.entityName),1)]),content:C(()=>[l("div",O," You may edit the "+o(e.entityName)+" name afterwards at Settings. ",1),l("div",Q,[(t(!0),s(m,null,h(e.fields,n=>{var k;return t(),s("div",{key:n.key,class:"field"},[l("label",null,o(n.label),1),!n.type||typeof n.type=="string"?V((t(),s("input",{key:0,"onUpdate:modelValue":a=>d.inputValue[n.key]=a,type:(k=n.type)!=null?k:"text",class:"ws-name"},null,8,Y)),[[L,d.inputValue[n.key]]]):Array.isArray(n.type)?V((t(),s("select",{key:1,"onUpdate:modelValue":a=>d.inputValue[n.key]=a,class:"ws-name"},[(t(!0),s(m,null,h(n.type,a=>(t(),s("option",{key:typeof a=="string"?a:a.value,value:typeof a=="string"?a:a.value},o(typeof a=="string"?a:a.label),9,P))),128))],8,J)),[[U,d.inputValue[n.key]]]):v("",!0)])}),128))]),R,l("div",X,[l("button",{class:"cancel",onClick:_},"Cancel"),l("button",{class:"create",onClick:y},"Create "+o(e.entityName),1)])]),_:1},512))}});const ee=M(Z,[["__scopeId","data-v-ed693c76"]]),te=e=>($("data-v-8365dfdd"),e=e(),N(),e),ne={key:1,class:"crud-view"},se={class:"header"},ae={class:"title-wrapper"},le={class:"description"},oe={key:0,class:"empty-list"},ce=te(()=>l("img",{src:A},null,-1)),ie={class:"empty-list-title"},de={class:"empty-list-description"},re={key:2},ue=B({__name:"CrudView",props:{loading:{type:Boolean},title:null,description:null,createButtonText:null,emptyTitle:null,entityName:null,fields:null,table:null},emits:["create"],setup(e,{emit:u}){const p=e,c=I(null),d=()=>{var r;p.fields?(r=c.value)==null||r.open():u("create",{})};async function b(r){u("create",r)}const g=E(()=>({"--columnCount":`${p.table.columns.length}`}));return(r,w)=>{const _=q("router-link");return t(),s(m,null,[e.loading?(t(),f(H,{key:0})):(t(),s("div",ne,[l("div",se,[l("div",ae,[l("h1",null,o(e.title),1),l("p",le,o(e.description),1),e.createButtonText?(t(),s("button",{key:0,onClick:d},o(e.createButtonText),1)):v("",!0)])]),e.table.rows.length===0?(t(),s("div",oe,[ce,l("div",ie,o(e.emptyTitle),1),l("div",de,[F(r.$slots,"empty-description",{},void 0,!0)]),e.createButtonText?(t(),s("button",{key:0,onClick:d},o(e.createButtonText),1)):v("",!0)])):(t(),s("table",{key:1,style:W(j(g))},[l("th",null,[(t(!0),s(m,null,h(e.table.columns,(y,i)=>(t(),s("td",{key:i,class:"cell"},o(y.name),1))),128))]),(t(!0),s(m,null,h(e.table.rows,(y,i)=>{var x;return t(),s("tr",{key:i,class:S((x=y.classes)!=null?x:[])},[(t(!0),s(m,null,h(y.cells,(n,k)=>{var a;return t(),s("td",{key:k,class:S((a=n.classes)!=null?a:[])},[n.actions?(t(),f(T,{key:0,title:"Actions","highlight-last":!0,options:n.actions,payload:{key:y.key}},null,8,["options","payload"])):n.link?(t(),f(_,{key:1,to:n.link,class:"runtime-title"},{default:C(()=>[D(o(n.text),1)]),_:2},1032,["to"])):(t(),s("div",re,o(n.text),1))],2)}),128))],2)}),128))],4))])),e.fields?(t(),f(ee,{key:2,ref_key:"modalRef",ref:c,fields:e.fields,"entity-name":e.entityName,onCreate:b},null,8,["fields","entity-name"])):v("",!0)],64)}}});const fe=M(ue,[["__scopeId","data-v-8365dfdd"]]);export{fe as C}; +//# sourceMappingURL=CrudView.22ff1852.js.map diff --git a/abstra_statics/dist/assets/DashEditor.61a05330.css b/abstra_statics/dist/assets/DashEditor.61a05330.css new file mode 100644 index 0000000000..350c26a948 --- /dev/null +++ b/abstra_statics/dist/assets/DashEditor.61a05330.css @@ -0,0 +1 @@ +[data-v-fb3c93ab]:root{--main-font-family: DM Sans, sans-serif}[data-v-fb3c93ab]:root{--abstra-neutral-color: #bbb;--abstra-primary-color: #ffee56;--abstra-dark-text-color: #1b1b23;--abstra-normal-text-color: #414a58;--abstra-main-color-dark: #343b46;--abstra-main-color-light: #ffd84c;--abstra-secondary-color-dark: #4c5767;--abstra-secondary-color-light: #feab4c;--abstra-background-base: #f9fafb;--abstra-main-color-blue: #d14056}.p-dropdown[data-v-fb3c93ab]{border-radius:8px;border:1px solid #343b46;background-color:#fff;height:37px;padding:0 10px;align-items:center}.p-dropdown-panel[data-v-fb3c93ab]{background-color:#fff;padding:10px}.background-theme[data-v-fb3c93ab]{background-repeat:no-repeat;background-size:cover;background-position:center}*[data-v-fb3c93ab]{padding:0;margin:0}.dash-settings[data-v-fb3c93ab]{overflow:auto;width:960px;max-width:calc(100vw - 40px);padding-top:50px;align-self:center}.dash-settings .dash-property[data-v-fb3c93ab]{display:flex;flex-direction:column;margin-bottom:20px}.dash-settings .dash-property .property-label[data-v-fb3c93ab]{font-style:normal;font-weight:500;font-size:14px;line-height:20px;color:#5a677a;width:100px}.dash-settings .dash-property .property-input[data-v-fb3c93ab]{font-size:.8em;padding:.5em 1em;border:1px solid #d4d8de;border-radius:6px;align-self:stretch;color:#8692a5}.zoom-bar-wrapper[data-v-f937a967]{display:flex;justify-content:center;position:absolute;bottom:20px;width:100%;pointer-events:none}.zoom-bar-wrapper .zoom-bar[data-v-f937a967]{box-sizing:border-box;width:100px;height:40px;background-color:#fff;box-shadow:0 0 4px #00000040;padding:8px;border-radius:8px;display:flex;flex-direction:row;justify-content:space-between;color:#414a58;font-size:12px;align-items:center;user-select:none;pointer-events:all}.zoom-bar-wrapper .zoom-bar .zoom-control[data-v-f937a967]{display:inline-block;text-align:center;width:22px;cursor:pointer}[data-v-d6aed39d]:root{--main-font-family: DM Sans, sans-serif}[data-v-d6aed39d]:root{--abstra-neutral-color: #bbb;--abstra-primary-color: #ffee56;--abstra-dark-text-color: #1b1b23;--abstra-normal-text-color: #414a58;--abstra-main-color-dark: #343b46;--abstra-main-color-light: #ffd84c;--abstra-secondary-color-dark: #4c5767;--abstra-secondary-color-light: #feab4c;--abstra-background-base: #f9fafb;--abstra-main-color-blue: #d14056}.p-dropdown[data-v-d6aed39d]{border-radius:8px;border:1px solid #343b46;background-color:#fff;height:37px;padding:0 10px;align-items:center}.p-dropdown-panel[data-v-d6aed39d]{background-color:#fff;padding:10px}.param-types[data-v-d6aed39d]{display:flex;gap:5px}.prop-type[data-v-d6aed39d]{display:flex;background-color:#f6f6f6;border-radius:4px;padding:2px 4px;justify-content:center;align-items:center;height:fit-content;width:fit-content}.prop-type .type[data-v-d6aed39d]{font-weight:500;font-size:10px;line-height:13px;margin:0;display:flex}.prop-type .type[data-v-d6aed39d] a,.prop-type .type[data-v-d6aed39d] a:visited{color:#3d79d8;text-decoration:underline}[data-v-1159e0c0]:root{--main-font-family: DM Sans, sans-serif}[data-v-1159e0c0]:root{--abstra-neutral-color: #bbb;--abstra-primary-color: #ffee56;--abstra-dark-text-color: #1b1b23;--abstra-normal-text-color: #414a58;--abstra-main-color-dark: #343b46;--abstra-main-color-light: #ffd84c;--abstra-secondary-color-dark: #4c5767;--abstra-secondary-color-light: #feab4c;--abstra-background-base: #f9fafb;--abstra-main-color-blue: #d14056}.p-dropdown[data-v-1159e0c0]{border-radius:8px;border:1px solid #343b46;background-color:#fff;height:37px;padding:0 10px;align-items:center}.p-dropdown-panel[data-v-1159e0c0]{background-color:#fff;padding:10px}.input-container[data-v-1159e0c0]{position:relative;display:flex}.input-container .icon[data-v-1159e0c0]{position:absolute;opacity:0;top:10px;right:8px;transition:all .3s ease}.input-container:hover .prop-input[data-v-1159e0c0]{border-width:1px;border-style:solid;border-color:var(--vscode-settings-textInputBorder, #3482e5);background-color:var(--vscode-settings-textInputBackground, #f9fafb);color:var(--vscode-settings-textInputForeground)}.input-container:hover .icon[data-v-1159e0c0]{opacity:100}.input-container .prop-input[data-v-1159e0c0]{display:flex;resize:none;height:16px;flex:1;font-family:monospace;border-radius:4px;padding:12px 32px 12px 8px;border-width:1px;border-style:solid;border-color:var(--vscode-settings-textInputBorder, transparent);background-color:var(--vscode-settings-textInputBackground, #f9fafb);color:var(--vscode-settings-textInputForeground);transition:padding .3s ease;margin:2px 0}.error .prop-input[data-v-1159e0c0],.error .prop-input[data-v-1159e0c0]:hover{border:1px solid #d35249}[data-v-afec000d]:root{--main-font-family: DM Sans, sans-serif}[data-v-afec000d]:root{--abstra-neutral-color: #bbb;--abstra-primary-color: #ffee56;--abstra-dark-text-color: #1b1b23;--abstra-normal-text-color: #414a58;--abstra-main-color-dark: #343b46;--abstra-main-color-light: #ffd84c;--abstra-secondary-color-dark: #4c5767;--abstra-secondary-color-light: #feab4c;--abstra-background-base: #f9fafb;--abstra-main-color-blue: #d14056}.p-dropdown[data-v-afec000d]{border-radius:8px;border:1px solid #343b46;background-color:#fff;height:37px;padding:0 10px;align-items:center}.p-dropdown-panel[data-v-afec000d]{background-color:#fff;padding:10px}.suggestions[data-v-afec000d]{position:absolute;top:100%;left:0;width:100%;background-color:#fff;border:1px solid #f6f6f6;border-radius:4px;z-index:100;max-height:200px;overflow:auto;padding:4px 0;box-shadow:0 0 8px #0000000a;background-color:var(--vscode-panel-background, white)}.suggestions .suggestion[data-v-afec000d]{font-family:monospace;padding:4px 8px;cursor:pointer;color:var(--vscode-editor-foreground, #292f37)}.suggestions .suggestion[data-v-afec000d]:hover{background-color:var(--vscode-settings-textInputBackground, #f9fafb);color:var(--vscode-settings-textInputForeground)}[data-v-5e99cdec]:root{--main-font-family: DM Sans, sans-serif}[data-v-5e99cdec]:root{--abstra-neutral-color: #bbb;--abstra-primary-color: #ffee56;--abstra-dark-text-color: #1b1b23;--abstra-normal-text-color: #414a58;--abstra-main-color-dark: #343b46;--abstra-main-color-light: #ffd84c;--abstra-secondary-color-dark: #4c5767;--abstra-secondary-color-light: #feab4c;--abstra-background-base: #f9fafb;--abstra-main-color-blue: #d14056}.p-dropdown[data-v-5e99cdec]{border-radius:8px;border:1px solid #343b46;background-color:#fff;height:37px;padding:0 10px;align-items:center}.p-dropdown-panel[data-v-5e99cdec]{background-color:#fff;padding:10px}.python-wrapper[data-v-5e99cdec]{position:relative}[data-v-3ec8c3d5]:root{--main-font-family: DM Sans, sans-serif}[data-v-3ec8c3d5]:root{--abstra-neutral-color: #bbb;--abstra-primary-color: #ffee56;--abstra-dark-text-color: #1b1b23;--abstra-normal-text-color: #414a58;--abstra-main-color-dark: #343b46;--abstra-main-color-light: #ffd84c;--abstra-secondary-color-dark: #4c5767;--abstra-secondary-color-light: #feab4c;--abstra-background-base: #f9fafb;--abstra-main-color-blue: #d14056}.p-dropdown[data-v-3ec8c3d5]{border-radius:8px;border:1px solid #343b46;background-color:#fff;height:37px;padding:0 10px;align-items:center}.p-dropdown-panel[data-v-3ec8c3d5]{background-color:#fff;padding:10px}.widget-props-editor[data-v-3ec8c3d5]{box-shadow:0 0 8px #0000000a;background-color:var(--vscode-panel-background, white);overflow:auto;color:var(--vscode-editor-foreground, #292f37);position:relative}.widget-props-editor .wrapper[data-v-3ec8c3d5]{position:relative;display:flex;flex-direction:column;padding:20px 10px;box-sizing:border-box;max-height:100%;overflow-y:auto}.widget-props-editor .title[data-v-3ec8c3d5]{display:flex;flex-direction:row;justify-content:space-between;padding:20px 8px;border-bottom:1px solid #f6f6f6}.widget-props-editor .title h1[data-v-3ec8c3d5]{font-family:Inter;font-size:13px;font-weight:400;line-height:16px;letter-spacing:0em;text-align:left;margin:0}.widget-props-editor .title .close-icon[data-v-3ec8c3d5]{cursor:pointer}.widget-props-editor .prop-error[data-v-3ec8c3d5]{background-color:#d3524914;opacity:8;padding:4px 8px;border-radius:5px;color:#d35249;font-style:normal;font-weight:400;font-size:12px;line-height:17px;overflow:auto}.widget-props-editor .prop-error.variable-error[data-v-3ec8c3d5]{display:flex;flex-direction:row;justify-content:space-between}.widget-props-editor .prop-error.variable-error button[data-v-3ec8c3d5]{background-color:transparent;border:none;color:#d35249;cursor:pointer;font-size:12px;font-weight:400;line-height:17px;margin-left:8px;padding:0;text-decoration:underline}.widget-props-editor .handler[data-v-3ec8c3d5]{cursor:ew-resize;position:absolute;height:100%;width:2em;user-select:none;display:flex;justify-content:center;transform:translate(-50%);left:0px;top:0px}.widget-props-editor .handler:hover .feedback[data-v-3ec8c3d5]{background-color:#8692a5}.widget-props-editor .handler .feedback[data-v-3ec8c3d5]{height:100%;width:.3em}.section[data-v-3ec8c3d5]{display:flex;flex-direction:column;border-bottom:1px solid #f6f6f6}.section .section-header[data-v-3ec8c3d5]{display:flex;flex-direction:row;align-items:center;cursor:pointer;padding:8px 0}.section .section-header h2[data-v-3ec8c3d5]{font-family:Inter;font-size:11px;font-weight:500;line-height:13px;letter-spacing:0em;text-align:left}.section .section-description[data-v-3ec8c3d5]{font-family:DM Sans;font-size:12px;font-weight:400;line-height:16px;letter-spacing:0em;text-align:left;margin:8px 0}.section .section-content .widget-prop[data-v-3ec8c3d5]{display:flex;flex-direction:column;min-width:372px;gap:4px;padding:16px 0;border-bottom:1px solid #f6f6f6;box-sizing:border-box}.section .section-content .widget-prop .prop-label[data-v-3ec8c3d5]{display:flex;justify-content:space-between;font-weight:400;font-size:14px;line-height:18px;margin:0;color:var(--vscode-editor-foreground, #272d35)}.section .section-content .widget-prop .prop-description[data-v-3ec8c3d5]{font-weight:400;font-size:14px;line-height:18px;color:#8692a5;margin:0}[data-v-0d595f79]:root{--main-font-family: DM Sans, sans-serif}[data-v-0d595f79]:root{--abstra-neutral-color: #bbb;--abstra-primary-color: #ffee56;--abstra-dark-text-color: #1b1b23;--abstra-normal-text-color: #414a58;--abstra-main-color-dark: #343b46;--abstra-main-color-light: #ffd84c;--abstra-secondary-color-dark: #4c5767;--abstra-secondary-color-light: #feab4c;--abstra-background-base: #f9fafb;--abstra-main-color-blue: #d14056}.p-dropdown[data-v-0d595f79]{border-radius:8px;border:1px solid #343b46;background-color:#fff;height:37px;padding:0 10px;align-items:center}.p-dropdown-panel[data-v-0d595f79]{background-color:#fff;padding:10px}@keyframes click-icon-0d595f79{0%{fill:#5a677a}40%{fill:#3d79d8}80%{fill:#3d79d8}to{fill:#272d35}}.interact-menu[data-v-0d595f79]{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:8px;gap:8px;background:#fcfcfc;box-shadow:0 2px 4px #5d769c0d;border-radius:4px}.interact-menu .icon-container[data-v-0d595f79]{position:relative}.interact-menu .icon-container span[data-v-0d595f79]{display:none;position:absolute;text-align:center;width:140px;padding:10px 4px;background:#414a58;color:#fff;font-family:Inter;font-style:normal;font-weight:400;font-size:14px;line-height:20px;border-radius:3px;top:0px;left:-160px}.interact-menu .icon-container span.edit[data-v-0d595f79]{width:115px;left:-135px}.interact-menu .icon-container:hover span[data-v-0d595f79]{display:unset}.interact-menu .icon[data-v-0d595f79]{cursor:pointer;border-radius:4px;padding:8px;transition:background .3s ease-out}.interact-menu .icon.active[data-v-0d595f79]{background:#eaeaea}.interact-menu .icon.active[data-v-0d595f79] path{animation-name:click-icon-0d595f79;animation-duration:1.5s;fill:#272d35}.background-theme[data-v-615748d7]{background-repeat:no-repeat;background-size:cover;background-position:center}.header[data-v-615748d7]{position:absolute;font-size:14px;font-weight:500;color:#1b1b23;pointer-events:none}.collapsed-widget-metadata-card[data-v-2b654c57],.widget-metadata-card[data-v-2b654c57]{cursor:grab;padding:12px;border-radius:4px;align-items:center}.collapsed-widget-metadata-card[data-v-2b654c57]:hover,.widget-metadata-card[data-v-2b654c57]:hover{box-shadow:0 0 12px #00000014;background-color:var(--vscode-editor-hoverHighlightBackground)}.collapsed-widget-metadata-card[data-v-2b654c57]:active,.widget-metadata-card[data-v-2b654c57]:active{cursor:grabbing}.collapsed-widget-metadata-card .metadata-thumbnail[data-v-2b654c57],.widget-metadata-card .metadata-thumbnail[data-v-2b654c57]{grid-area:thumb;border-radius:4px;width:20px;height:40px;justify-self:center}.widget-metadata-card[data-v-2b654c57]{display:grid;grid-template-columns:40px 1fr;gap:0 12px;grid-template-areas:"thumb title" "thumb desc"}.widget-metadata-card .metadata-title[data-v-2b654c57]{grid-area:title;font-weight:500;font-size:14px;line-height:18px;color:var(--vscode-editor-foreground, #292f37)}.widget-metadata-card .metadata-description[data-v-2b654c57]{grid-area:desc;font-weight:500;font-size:12px;line-height:22px;height:22px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--vscode-editor-foreground, rgba(41, 47, 55, .5))}.collapsed-widget-metadata-card[data-v-2b654c57]{display:flex;flex-direction:column}.widgets-metadata[data-v-cb0151ea]{display:flex;flex-direction:column;justify-content:center;background-color:var(--vscode-panel-background, white);color:var(--vscode-editor-foreground, black);box-shadow:0 0 8px #0000000a}.widgets-metadata .search[data-v-cb0151ea]{display:flex;align-items:center;flex-direction:row;justify-content:center;margin-top:24px}.widgets-metadata .search .widgets-metadata-filter[data-v-cb0151ea]{border-width:1px;border-style:solid;border-color:var(--vscode-settings-textInputBorder, #dbdee4);background-color:var(--vscode-settings-textInputBackground);color:var(--vscode-settings-textInputForeground);padding:8px 20px 8px 40px;border-radius:4px;height:32px;width:100%;max-width:300px}.widgets-metadata .search .search-icon[data-v-cb0151ea]{position:absolute;left:30px}.widgets-metadata .widgets-metadata-list[data-v-cb0151ea]{flex:1;padding:0 5px 24px;margin-top:24px;width:320px;overflow:auto;display:flex;flex-direction:column;gap:12px}.widgets-metadata .widgets-metadata-list.collapsed[data-v-cb0151ea]{width:62px;overflow:hidden}.widgets-metadata .search.collapsed[data-v-cb0151ea]{height:32px;cursor:pointer}.dash-layout-editor[data-v-fa95dc62]{position:relative;height:100%;display:flex;background-color:var(--vscode-settings-textInputBackground, #f9fafb);overflow:hidden}.dash-layout-editor .editor[data-v-fa95dc62]{display:flex;flex-grow:1;flex-basis:0;overflow:hidden;position:relative;outline:none}.dash-layout-editor .editor .listeners[data-v-fa95dc62]{display:flex;flex:1;outline:none}.dash-layout-editor .editor .player[data-v-fa95dc62]{position:absolute}.dash-layout-editor .editor .player[data-v-fa95dc62]:not(.preview){pointer-events:none}.dash-layout-editor .editor .layout-canvas[data-v-fa95dc62]{position:absolute;top:0;left:0;width:100%;height:100%;user-select:none}.dash-layout-editor .editor .layout-canvas.hide[data-v-fa95dc62]{visibility:hidden}.dash-layout-editor .editor .interact-menu[data-v-fa95dc62]{position:absolute}[data-v-c0500bfa]:root{--main-font-family: DM Sans, sans-serif}[data-v-c0500bfa]:root{--abstra-neutral-color: #bbb;--abstra-primary-color: #ffee56;--abstra-dark-text-color: #1b1b23;--abstra-normal-text-color: #414a58;--abstra-main-color-dark: #343b46;--abstra-main-color-light: #ffd84c;--abstra-secondary-color-dark: #4c5767;--abstra-secondary-color-light: #feab4c;--abstra-background-base: #f9fafb;--abstra-main-color-blue: #d14056}.p-dropdown[data-v-c0500bfa]{border-radius:8px;border:1px solid #343b46;background-color:#fff;height:37px;padding:0 10px;align-items:center}.p-dropdown-panel[data-v-c0500bfa]{background-color:#fff;padding:10px}.loading[data-v-c0500bfa]{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center}.dash-editor[data-v-c0500bfa]{display:flex;flex-direction:column;overflow:hidden} diff --git a/abstra_statics/dist/assets/DashEditor.ded21d4d.js b/abstra_statics/dist/assets/DashEditor.ded21d4d.js new file mode 100644 index 0000000000..a9e075c5ee --- /dev/null +++ b/abstra_statics/dist/assets/DashEditor.ded21d4d.js @@ -0,0 +1,11 @@ +var Ds=Object.defineProperty;var ks=(e,t,s)=>t in e?Ds(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var ce=(e,t,s)=>(ks(e,typeof t!="symbol"?t+"":t,s),s);import{r as Ts}from"./index.23f9da39.js";import{T as $s,a as $t}from"./Tab.d7b23f26.js";import{d as Q,b as E,c as A,x as _,V as Ne,Y as Zt,e as T,O as pt,Q as ht,q,U as J,r as G,K as F,R as he,aa as ft,N as H,z as g,F as De,L as ke,A as Te,D as j,v as vt,X as gt,a as He,ad as Ns,G as ve,t as fe,ac as mt,o as Jt,aj as xs,E as Cs,ak as Ms,al as Ws,w as ye,S as Bs,am as Gs,H as Fs,J as Hs}from"./registerWidgets.68572380.js";import{i as Us,w as Ee,l as rt,v as zs,r as Qt,a as qt,s as be,p as Ks,b as re,c as b,d as Le,e as Vs,f as O,D as js,g as Nt,C as Zs,h as xt,j as Js,k as Ct,m as Xe,n as Mt}from"./DashPlayer.1858f538.js";import{R as Qs,S as qs,_ as Ys}from"./UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.a71462fc.js";import{L as Xs}from"./CircularLoading.30fd4d73.js";import{i as U,g as B,a as We,b as de,f as we,w as ne,c as yt,e as eo,h as to,s as so,j as oo,k as ao}from"./runnerData.09d29411.js";import{u as Ue}from"./log.13038e9d.js";import{p as ro,i as no,y as et,z as tt,A as io,u as lo,B as co}from"./icons.3acf9dc1.js";import{a as Wt}from"./asyncComputed.896b7bde.js";import{D as uo}from"./dashes.d2191afe.js";import{W as po}from"./workspaces.6e8c216b.js";import{B as ho}from"./BackButton.9eaf8cad.js";import{S as fo}from"./SaveButton.f5cf0ed0.js";import{P as vo}from"./PreviewButton.19201cd8.js";import{D as go}from"./DocsButton.a49e24b4.js";import"./passwordlessManager.8fb0aebd.js";import"./executeJs.00514c74.js";import"./PlayerNavbar.b0c1c386.js";import"./WidgetsFrame.b4601d67.js";import"./colors.5f5bc2fa.js";import"./Modal.dacb9a40.js";import"./Passwordless.6c7a116b.js";import"./forms.72f0b1a5.js";import"./activeRecord.15082700.js";import"./hooks.37ea1bed.js";import"./jobs.6823016f.js";import"./login.0baccba7.js";import"./lottie.e503152f.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="dd6aa911-f815-4720-981d-aedae10a9c6d",e._sentryDebugIdIdentifier="sentry-dbid-dd6aa911-f815-4720-981d-aedae10a9c6d")}catch{}})();const mo=e=>(pt("data-v-fb3c93ab"),e=e(),ht(),e),yo={class:"dash-settings"},wo={class:"dash-property"},_o=mo(()=>_("label",{class:"property-label"},"Name",-1)),So=Q({__name:"DashSettings",props:{dash:null},setup(e){return(t,s)=>(E(),A("div",yo,[_("div",wo,[_o,Ne(_("input",{"onUpdate:modelValue":s[0]||(s[0]=o=>e.dash.title=o),class:"property-input",placeholder:"Enter a name"},null,512),[[Zt,e.dash.title]])]),T(Qs,{runtime:e.dash},null,8,["runtime"])]))}});const Eo=q(So,[["__scopeId","data-v-fb3c93ab"]]);class wt{static get isMac(){return navigator.userAgent.includes("Mac OS X")}static get buildPlatform(){return{}.CURRENT_PLATFORM||"web"}}const bo=e=>wt.isMac&&e.ctrlKey,Re=e=>wt.isMac?e.metaKey:e.ctrlKey,nt=e=>e.altKey,ue=e=>e.shiftKey,st={alt:nt,"arrow-up":e=>e.code==="ArrowUp","arrow-down":e=>e.code==="ArrowDown","arrow-left":e=>e.code==="ArrowLeft","arrow-right":e=>e.code==="ArrowRight",ctrl:Re,delete:e=>wt.isMac?e.code==="Backspace":e.code==="Delete",enter:e=>e.code==="Enter",escape:e=>e.code==="Escape",shift:ue,space:e=>e.code==="Space",a:e=>e.code==="KeyA",b:e=>e.code==="KeyB",c:e=>e.code==="KeyC",d:e=>e.code==="KeyD",f:e=>e.code==="KeyF",g:e=>e.code==="KeyG",h:e=>e.code==="KeyH",k:e=>e.code==="KeyK",p:e=>e.code==="KeyP",v:e=>e.code==="KeyV",x:e=>e.code==="KeyX",z:e=>e.code==="KeyZ",0:e=>e.code==="Digit0","[":e=>e.code==="BracketLeft","]":e=>e.code==="BracketRight"};class Po{constructor(t){ce(this,"pressedKeys");ce(this,"evt");this.evt=t,this.pressedKeys={};const s=o=>a=>{Object.keys(st).forEach(i=>{st[i](a)&&this.setPressed(i,o)})};this.evt||(window.addEventListener("keydown",s(!0)),window.addEventListener("keyup",s(!1)))}setPressed(t,s){this.pressedKeys[t]=s}isPressed(t){var s;return this.evt?st[t](this.evt):(s=this.pressedKeys[t])!=null?s:!1}}const Io=new Po;/*! + * https://github.com/Starcounter-Jack/JSON-Patch + * (c) 2017-2022 Joachim Wester + * MIT licensed + */var Oo=globalThis&&globalThis.__extends||function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)a.hasOwnProperty(i)&&(o[i]=a[i])},e(t,s)};return function(t,s){e(t,s);function o(){this.constructor=t}t.prototype=s===null?Object.create(s):(o.prototype=s.prototype,new o)}}(),Ao=Object.prototype.hasOwnProperty;function it(e,t){return Ao.call(e,t)}function lt(e){if(Array.isArray(e)){for(var t=new Array(e.length),s=0;s=48&&o<=57){t++;continue}return!1}return!0}function pe(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function Yt(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function ut(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,s=e.length;t0&&h[f-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(s&&p===void 0&&(l[u]===void 0?p=h.slice(0,f).join("/"):f==v-1&&(p=t.path),p!==void 0&&P(t,0,e,p)),f++,Array.isArray(l)){if(u==="-")u=l.length;else{if(s&&!ct(u))throw new x("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",i,t,e);ct(u)&&(u=~~u)}if(f>=v){if(s&&t.op==="add"&&u>l.length)throw new x("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",i,t,e);var n=Ro[t.op].call(t,l,u,e);if(n.test===!1)throw new x("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return n}}else if(f>=v){var n=_e[t.op].call(t,l,u,e);if(n.test===!1)throw new x("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return n}if(l=l[u],s&&f0)throw new x('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,s);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new x("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,s);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new x("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,s);if((e.op==="add"||e.op==="replace"||e.op==="test")&&ut(e.value))throw new x("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,s);if(s){if(e.op=="add"){var a=e.path.split("/").length,i=o.split("/").length;if(a!==i+1&&a!==i)throw new x("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,s)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==o)throw new x("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,s)}else if(e.op==="move"||e.op==="copy"){var n={op:"_get",path:e.from,value:void 0},c=es([n],s);if(c&&c.name==="OPERATION_PATH_UNRESOLVABLE")throw new x("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,s)}}}else throw new x("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,s)}function es(e,t,s){try{if(!Array.isArray(e))throw new x("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)C(z(t),z(e),s||!0);else{s=s||Ge;for(var o=0;o0&&(e.patches=[],e.callback&&e.callback(o)),o}function St(e,t,s,o,a){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var i=lt(t),n=lt(e),c=!1,h=n.length-1;h>=0;h--){var l=n[h],f=e[l];if(it(t,l)&&!(t[l]===void 0&&f!==void 0&&Array.isArray(t)===!1)){var v=t[l];typeof f=="object"&&f!=null&&typeof v=="object"&&v!=null&&Array.isArray(f)===Array.isArray(v)?St(f,v,s,o+"/"+pe(l),a):f!==v&&(a&&s.push({op:"test",path:o+"/"+pe(l),value:z(f)}),s.push({op:"replace",path:o+"/"+pe(l),value:z(v)}))}else Array.isArray(e)===Array.isArray(t)?(a&&s.push({op:"test",path:o+"/"+pe(l),value:z(f)}),s.push({op:"remove",path:o+"/"+pe(l)}),c=!0):(a&&s.push({op:"test",path:o,value:e}),s.push({op:"replace",path:o,value:t}))}if(!(!c&&i.length==n.length))for(var h=0;h{var p,u;return(u=(p=de(v,t))==null?void 0:p.colStart)!=null?u:null}).filter(v=>v!==null)),c=Math.max(...i.map(v=>{var p,u;return(u=(p=de(v,t))==null?void 0:p.colEnd)!=null?u:null}).filter(v=>v!==null)),h=Math.min(...i.map(v=>{var p,u;return(u=(p=de(v,t))==null?void 0:p.rowStart)!=null?u:null}).filter(v=>v!==null)),l=c>a.columns-1?a.columns-1-c:n<0?-n:0,f=h<0?-h:0;return i.flatMap(v=>{const p=de(v,t);if(l===0&&f===0)return[];if(!p||!U(p))return[];const u=te(ee(v,B(t)),t);return[{op:"replace",path:`${u}/${v}/colStart`,backup:p,value:p.colStart+l},{op:"replace",path:`${u}/${v}/colEnd`,backup:p,value:p.colEnd+l},{op:"replace",path:`${u}/${v}/rowStart`,backup:p,value:p.rowStart+f},{op:"replace",path:`${u}/${v}/rowEnd`,backup:p,value:p.rowEnd+f}]})}const ee=(e,t,s=null)=>{for(const o in t){const a=t[o];if(U(a)){if(o==e)return s}else{const i=ee(e,a.slot,o);if(i)return i}}return null},Fo=(e,t)=>e.rowStart>=t.row&&e.rowStart{var s;return(s=Object.keys(t.slottables).find(o=>Fo(e,t.slottables[o].position)))!=null?s:null},Gt=(e,t)=>{const s=B(t),o=(i,n,c)=>{for(const h in n){if(h==i)return c;const l=n[h];if(U(l))continue;const f=o(i,l.slot,`${c}/${h}/slot`);if(f)return f}return null},a=o(e,s,We(t));if(!a)throw new Error("Widget not found in layout");return a},te=(e,t)=>e?`${We(t)}/${e}/slot`:We(t),Fe=(e,t,s)=>{if(s){const a=t.slottables[s];return{...e,rowStart:e.rowStart-a.position.row,rowEnd:e.rowEnd-a.position.row}}const o=Object.values(t.slottables).reduce((a,i)=>a+(i.position.rowQt(Object.entries(s.widgets).filter(([o])=>e.has(o)).map(([o,a])=>Ee(s.widgets[o].position,t)).filter(o=>o!==null));function Vo(e){const{mouseState:t,grid:s,calculatedPositions:o}=e;if(t.state!=="SLOTTABLE_RESIZING")return[];const a=o.slottables[t.slottableId],i={colStart:0,rowStart:a.position.row,colEnd:s.columns,rowEnd:a.position.row+a.position.height},n=s.rectFromArea(i);if(!n)return[];const c=ss(e,n,s.width,s.cellHeight);if(!c)return[];const h=s.areaFromRect(c);return[{op:"replace",path:`/slot/${t.slottableId}/height`,backup:a.position.height,value:h.rowEnd-h.rowStart+1}]}function jo(e){const{mouseState:t,selectedWidgets:s,grid:o,workingLayout:a,calculatedPositions:i}=e;if(t.state!=="RESIZING")return[];const n=t.side,c=Ko(e);if(!c)return[];const h=Array.from(s).filter(v=>{const p=i.widgets[v];return Us(Ee(p.position,o),c,n)}),{minWidth:l,minHeight:f}=ne[t.type].dashProperties;return h.flatMap(v=>{const p=i.widgets[v],u=Ee(p.position,o),P=ss(e,u,l,f);if(!P)return[];const I=ee(v,B(a.layout)),$=te(I,a.layout),L=o.areaFromRect(u),ie=Fe(o.areaFromRect(P),i,I);return[{op:"replace",path:`${$}/${v}/colStart`,backup:L.colStart,value:Math.max(ie.colStart,0)},{op:"replace",path:`${$}/${v}/colEnd`,backup:L.colEnd,value:Math.min(ie.colEnd,rt.columns-1)},{op:"replace",path:`${$}/${v}/rowStart`,backup:L.rowStart,value:Math.max(ie.rowStart,0)},{op:"replace",path:`${$}/${v}/rowEnd`,backup:L.rowEnd,value:ie.rowEnd}]})}function Zo(e){const{mouseState:t,grid:s,calculatedPositions:o}=e;if(t.state!=="DRAGGING")return{operations:[]};const a=Object.values(ne[t.type].pythonAPI.params).reduce((u,P)=>(P.isKwarg||!P.dashesInitialValue||(u[P.argName]=P.dashesInitialValue),u),{}),{initialWidth:i,initialHeight:n}=ne[t.type].dashProperties,c=s.areaFromRect({x:t.x,y:t.y,width:i,height:n,referential:"world"}),h=ts(c,o),l=te(h,e.workingLayout.layout),f=Ue(),v={id:f,type:t.type,props:{...a},...Fe(c,o,h),events:{}};return{operations:[{op:"add",path:`${l}/${f}`,value:v}],widgetId:f}}const os=({j:e},t)=>({row:e,height:t,order:0}),Jo=(e,t)=>Object.keys(e).reduce((s,o)=>(o===t||(s[o]=e[o]),s),{}),as=(e,t,s)=>{const o=s?{...t,slottables:Jo(t.slottables,s)}:t,a=Math.max(Object.values(o.slottables).reduce((n,c)=>c.position.row>=e.row?n:c.position.row+c.position.height<=e.row?n-c.position.height:n-(e.row-c.position.row),e.row),0),i=Qo(e,o);return{...e,row:a,order:i}},Ft=(e,t,s)=>Object.values(t.slottables).filter(o=>o.id!==s).find(o=>e.row>=o.position.row+o.position.height/2&&e.row<=o.position.row+o.position.height),Ht=(e,t,s)=>Object.values(t.slottables).filter(o=>o.id!==s).filter(o=>o.position.row+o.position.height/2>e.row&&o.position.row<=e.row+e.height).reduce((o,a)=>!o||a.position.order{var f,v;const s=Ft(e,t),o=Ht(e,t),a=s?Ht(s.position,t,s.id):null,i=o?Ft(o.position,t,o.id):null,n=[s,i].reduce((p,u)=>p?u&&p.position.order>u.position.order?u:p:u,null),c=[o,a].reduce((p,u)=>p?u&&p.position.order!o.has(v)&&!(s!=null&&s.some(p=>v==p))&&U(n[v])).sort((v,p)=>zs(we(v,B(t)),we(p,B(t)))),l=[...o,...s||[]].map(v=>we(v,B(t))).filter(v=>v!=null),f=[];return h.forEach(v=>{const p=we(v,B(t));if(!p||!U(p))return;let u=0,P={...p};const I=()=>l.some($=>qt(P,$));for(;I();)u++,P={...p,rowStart:p.rowStart+u,rowEnd:p.rowEnd+u};if(u){const $=te(i,t);f.push({op:"replace",path:`${$}/${v}/rowStart`,backup:p.rowStart,value:p.rowStart+u}),f.push({op:"replace",path:`${$}/${v}/rowEnd`,backup:p.rowEnd,value:p.rowEnd+u})}l.push(P)}),f}function Xo(e,t,s,o){const a=e.selectedWidgets;if(!a.size)return[];const i=[...a],n=[];return i.some(h=>{const l=ee(h,B(o)),f=l?yt(l,o).slot:B(o),v=Object.keys(f).filter(u=>!a.has(u)&&U(f[u])),p=de(h,o);return v.some(u=>qt(p,f[u]))})&&a.forEach(h=>{const l=we(h,B(o)),f=te(ee(h,B(o)),o);!l||!U(l)||(n.push({op:"replace",path:`${f}/${h}/rowStart`,backup:l.rowStart,value:l.rowStart-s}),n.push({op:"replace",path:`${f}/${h}/rowEnd`,backup:l.rowEnd,value:l.rowEnd-s}),n.push({op:"replace",path:`${f}/${h}/colStart`,backup:l.colStart,value:l.colStart-t}),n.push({op:"replace",path:`${f}/${h}/colEnd`,backup:l.colEnd,value:l.colEnd-t}))}),n}function ea(e,t){const s=[],o=[];for(const a of t){const i=Ue();s.push({op:"add",path:`/slot/${i}`,value:{...J.exports.cloneDeep(a),id:i}}),o.push(i)}return{operations:s,widgetsId:o}}function ta(e){const t=z(e.workingLayout.layout),s=Yo(e,t);C(t,s);const o=Ho(e);C(t,o);const a=Uo(e,t);C(t,a);const i=jo(e);C(t,i);const n=Vo(e);C(t,n);const c=Zo(e);C(t,c.operations);const h=qo(e);C(t,h.operations);const l=Et(e,t,c.widgetId?[c.widgetId]:[]);C(t,l);const f=rs(e,t,c.widgetId?[c.widgetId]:[]);return C(t,f),{layout:t,operations:[...s,...a,...o,...i,...n,...c.operations,...l,...f,...h.operations]}}function sa(e,t,s){const o=e.workingLayout.layout,a=zo(e,t,s,o);C(o,a);const i=Xo(e,t,s,o);C(o,i);const n=Et(e,o);return C(o,n),[...a,...i,...n]}function oa(e,t){const s=e.workingLayout.layout,o=ea(e,t);C(s,o.operations);const a=Et(e,s,o.widgetsId);C(s,a);const i=rs(e,s,o.widgetsId);return C(s,i),[...o.operations,...a,...i]}const aa={class:"zoom-bar"},ra={class:"zoom-value"},na=Q({__name:"ZoomBar",props:{camera:null},emits:["hover","leave"],setup(e,{emit:t}){const s=e,o=G(!1),a=G(null),i=()=>{var l;(l=s.camera)==null||l.zoomIn(1.1,{x:document.body.offsetWidth/2,y:document.body.offsetHeight/2,referential:"screen"})},n=()=>{var l;(l=s.camera)==null||l.zoomIn(.9,{x:document.body.offsetWidth/2,y:document.body.offsetHeight/2,referential:"screen"})},c=F(()=>{var h,l;return`${Math.floor(((l=(h=s.camera)==null?void 0:h.zoom)!=null?l:1)*100)}%`});return he(()=>{var h;return(h=s.camera)==null?void 0:h.zoom},()=>{clearTimeout(a.value),o.value=!0,a.value=setTimeout(()=>o.value=!1,3e3)}),(h,l)=>Ne((E(),A("div",{class:"zoom-bar-wrapper",onMouseover:l[0]||(l[0]=f=>t("hover")),onMouseleave:l[1]||(l[1]=f=>t("leave"))},[_("div",aa,[_("span",{class:"zoom-control",onClick:n},"-"),_("span",ra,H(g(c)),1),_("span",{class:"zoom-control",onClick:i},"+")])],544)),[[ft,e.camera&&o.value]])}});const ia=q(na,[["__scopeId","data-v-f937a967"]]),la=()=>window.location.href.startsWith("vscode-webview://"),ca=(e,t)=>{!la()||window.vscode.postMessage({type:"usage-event",event:{type:e,payload:t}})},ua=async({operations:e,name:t})=>{ca("widgets_updated",{checkpoint:t,operations:z(e)})};class bt{constructor(t,s){ce(this,"checkpointHistory",{undos:[],redos:[]});ce(this,"_save",null);this.workingLayout=t,this.appState=s}static create(t,s){return new bt(t,s)}setWorkingLayout(t){this.workingLayout=t}undo(){if(this.appState.isPreview||!this.checkpointHistory.undos.length)return;const t=this.checkpointHistory.undos.pop();if(t)return C(this.workingLayout,t.operations),this.checkpointHistory.redos.push(ot(t)),t}redo(){if(this.appState.isPreview)return;const t=this.checkpointHistory.redos.pop();if(t)return C(this.workingLayout,t.operations),this.checkpointHistory.undos.push(ot(t)),t}execute(t){this.appState.isPreview||(C(this.workingLayout,t.operations),this.checkpointHistory.undos.push(ot(t)),this.checkpointHistory.redos=[],this.save(),ua(t))}onSave(t){this._save=t}save(){var t;this.appState.isPreview||(t=this._save)==null||t.call(this)}}const ot=e=>({selection:e.selection,name:`RE: ${e.name}`,operations:e.operations.slice().reverse().map(t=>da(t))}),da=e=>{switch(e.op){case"add":return{op:"remove",backup:e.value,path:e.path};case"remove":return{op:"add",path:e.path,value:e.backup};case"replace":return{op:"replace",backup:e.value,path:e.path,value:e.backup}}};class Pt{constructor(t,s){ce(this,"operationQueue");this.layout=t,this.operationQueue=bt.create(t,s)}getRootSlot(){return B(this.layout)}getRootSlotPath(){return We(this.layout)}setLayout(t){this.operationQueue.setWorkingLayout(t)}static create(t,s){return new Pt(t,s)}getWidget(t){return de(t,this.layout)}getWidgetOrSlottable(t){const s=eo(t,this.layout);if(!s)throw new Error(`Could not find widget or slottable with id ${t}`);return s}get widgets(){return this.getRootSlot()}get allWidgets(){const t=s=>Object.entries(s).reduce((o,[a,i])=>U(i)?{...o,[a]:i}:{...o,...t(i.slot)},{});return t(this.widgets)}getSlottable(t){return yt(t,this.layout)}redo(){let t=this.operationQueue.redo();for(;t&&t.operations.length===0;)t=this.operationQueue.redo();return this.operationQueue.save(),t}undo(){let t=this.operationQueue.undo();for(;t&&t.operations.length===0;)t=this.operationQueue.undo();return this.operationQueue.save(),t}updateVariable(t,s){const o=this.getWidget(s);if(!U(o))return;const a=te(ee(s,this.getRootSlot()),this.layout);this.operationQueue.execute({name:"update variable",selection:new Set([s]),operations:[{op:"replace",backup:o.variable,value:t,path:`${a}/${s}/variable`}]})}updateProp({param:t,value:s},o){const a=n=>this.getWidgetOrSlottable(n).props,i=(n,c,h)=>{const l=Gt(n,this.layout);return[{op:"replace",backup:a(n)[c],value:h,path:`${l}/${n}/props/${c}`}]};this.operationQueue.execute({name:"update props",operations:o.flatMap(n=>i(n,t.argName,s)),selection:new Set(o)})}updateEvent({event:t,value:s},o){const a=n=>this.getWidget(n).events,i=(n,c,h)=>{const l=te(ee(n,this.getRootSlot()),this.layout);return[{op:"replace",backup:a(n)[c],value:h,path:`${l}/${n}/events/${c}`}]};this.operationQueue.execute({name:"update events",operations:o.flatMap(n=>i(n,t.key,s)),selection:new Set(o)})}delete(t){this.operationQueue.execute({name:"widgets deleted",operations:t.map(s=>{const o=Gt(s,this.layout);return{op:"remove",backup:this.getWidgetOrSlottable(s),path:`${o}/${s}`}}),selection:new Set(t)})}onSave(t){this.operationQueue.onSave(t)}updateVersion(){this.layout.version!=="0.2"&&this.operationQueue.execute({name:"Version updated",operations:[{op:"replace",backup:this.layout.version,value:"0.2",path:"/version"},{op:"add",value:this.layout.widgets,path:"/slot"},{op:"remove",path:"/widgets",backup:this.layout.widgets}],selection:new Set})}}const Ut={PandasDataFrame:"https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html",PlotlyFigure:"https://plotly.com/python-api-reference/generated/plotly.graph_objects.Figure.html","datetime.time":"https://docs.python.org/3/library/datetime.html#datetime.time","datetime.date":"https://docs.python.org/3/library/datetime.html#datetime.date","io.IOBase":"https://docs.python.org/3/library/io.html#io.IOBase","time.struct_time":"https://docs.python.org/3/library/time.html#time.struct_time"},pa="#E286A3",ha="#EF9542",fa="#B462DB",va="#40B6D3",ga="#6FB96E",ma=[pa,ha,fa,va,ga];function zt(e){let t=e;return Object.keys(Ut).forEach(s=>{if(e.includes(s)){const o=Ut[s];t=t.replace(s,`${s}`)}}),t}const Se={},ya=e=>t=>{if(Se[t])return Se[t];const s=Object.keys(Se).length%e.length;return Se[t]=e[s],e[s]},Kt=ya([...ma]),wa=()=>{Object.keys(Se).forEach(e=>delete Se[e])};class _a{constructor(){ce(this,"globalEventListeners",[])}addGlobalEventListener(t,s){addEventListener(t,s),this.globalEventListeners.find(o=>o.evt===t)||this.globalEventListeners.push({evt:t,handler:s})}removeGlobalEventListeners(){this.globalEventListeners.forEach(({evt:t,handler:s})=>{removeEventListener(t,s)}),this.globalEventListeners=[]}}const Sa={class:"param-types"},Ea=["innerHTML"],ba={key:1,class:"prop-type"},Pa=["innerHTML"],Ia=Q({__name:"ParamTypes",props:{param:null},setup(e){return(t,s)=>(E(),A("div",Sa,[e.param&&e.param.typeDescription?(E(!0),A(De,{key:0},ke(e.param.typeDescription,o=>(E(),A("div",{key:o,class:"prop-type"},[_("p",{class:"type",style:Te({color:g(Kt)(o)}),innerHTML:g(zt)(o)},null,12,Ea)]))),128)):e.param&&e.param.typeName?(E(),A("div",ba,[_("p",{class:"type",style:Te({color:g(Kt)(e.param.typeName)}),innerHTML:g(zt)(e.param.typeName)},null,12,Pa)])):j("",!0)]))}});const Vt=q(Ia,[["__scopeId","data-v-d6aed39d"]]),Oa=["value","placeholder"],Aa=["value","placeholder"],La=Q({__name:"PythonPropInputRaw",props:{hasError:{type:Boolean},placeholder:null,value:null,paramName:null,isCode:{type:Boolean},commit:{type:Function}},emits:["input","change","clearSuggestions"],setup(e,{emit:t}){const s=e,o=vt({isActive:!1,hasChanges:!1}),a=h=>{t("input",h),o.hasChanges=!0},i=()=>{o.isActive=!1,t("clearSuggestions")},n=h=>{h.preventDefault();const l=h.target,f=l.selectionStart,v=l.selectionEnd,p=l.value;l.value=p.substring(0,f)+" "+p.substring(v),l.selectionStart=l.selectionEnd=f+1,l.dispatchEvent(new Event("input"))},c=h=>{s.commit(h),o.hasChanges=!1};return gt(()=>{o.hasChanges&&s.commit(s.value)}),(h,l)=>{var v,p;const f=He("icon");return E(),A("div",{class:ve(["input-container",{error:e.hasError}])},[T(f,{path:g(ro),class:"icon",fill:e.hasError?"#D35249":o.isActive?"#3482E5":void 0},null,8,["path","fill"]),e.isCode?(E(),A("textarea",{key:0,value:e.value,class:"prop-input",placeholder:(v=e.placeholder)!=null?v:void 0,onInput:l[0]||(l[0]=u=>a(u.target.value)),onClick:l[1]||(l[1]=u=>o.isActive=!0),onBlur:i,onKeydown:l[2]||(l[2]=Ns(u=>n(u),["tab"])),onChange:l[3]||(l[3]=u=>c(u.target.value))},null,40,Oa)):(E(),A("input",{key:1,value:e.value,class:"prop-input",placeholder:(p=e.placeholder)!=null?p:void 0,onInput:l[4]||(l[4]=u=>a(u.target.value)),onClick:l[5]||(l[5]=u=>o.isActive=!0),onBlur:i,onChange:l[6]||(l[6]=u=>c(u.target.value))},null,40,Aa))],2)}}});const Ra=q(La,[["__scopeId","data-v-1159e0c0"]]),Da={class:"suggestions"},ka=["onMousedown"],Ta=Q({__name:"PythonAutoCompleteSuggestions",props:{suggestions:null},emits:["select"],setup(e,{emit:t}){return(s,o)=>Ne((E(),A("div",Da,[(E(!0),A(De,null,ke(e.suggestions,a=>(E(),A("div",{key:a,class:"suggestion",onMousedown:i=>t("select",a)},H(a),41,ka))),128))],512)),[[ft,e.suggestions.length]])}});const $a=q(Ta,[["__scopeId","data-v-afec000d"]]),Na={class:"python-wrapper"},xa=Q({__name:"PythonPropInput",props:{hasError:{type:Boolean},placeholder:null,value:null,paramName:null,dashPlayerState:null,isCode:{type:Boolean},commit:{type:Function}},emits:["input"],setup(e,{emit:t}){const s=e,o=F(()=>s.dashPlayerState.suggestionsFor),a=F(()=>s.dashPlayerState.suggestions),i=l=>{c(s.paramName,l),t("input",l)},n=l=>{h(),t("input",l),s.commit(l)},c=async(l,f)=>{!f||s.dashPlayerState.getAutocompleteSuggestions(l,f)},h=async()=>{await mt(),s.dashPlayerState.clearSuggestions()};return(l,f)=>(E(),A("div",Na,[T(Ra,{value:e.value,commit:e.commit,"is-code":e.isCode,"param-name":e.paramName,"dash-player-state":e.dashPlayerState,onInput:i,onClearSuggestions:h},null,8,["value","commit","is-code","param-name","dash-player-state"]),g(o)===e.paramName?(E(),fe($a,{key:0,suggestions:g(a),onSelect:n},null,8,["suggestions"])):j("",!0)]))}});const at=q(xa,[["__scopeId","data-v-5e99cdec"]]),se=e=>(pt("data-v-3ec8c3d5"),e=e(),ht(),e),Ca={class:"wrapper"},Ma={class:"title"},Wa={key:0,class:"widget-prop"},Ba=se(()=>_("h2",null,"Error",-1)),Ga=se(()=>_("p",{class:"section-description"}," Some errors were found while computing the widget. ",-1)),Fa=["textContent"],Ha={key:1,class:"section"},Ua=se(()=>_("h2",null,"VARIABLE",-1)),za={key:0,class:"section-content"},Ka={class:"widget-prop"},Va=se(()=>_("p",{class:"prop-label"},"Bind a variable",-1)),ja=se(()=>_("p",{class:"prop-description"}," Create a variable to be controlled by this widget. ",-1)),Za={class:"input-container"},Ja={key:0,class:"variable-error prop-error"},Qa=se(()=>_("pre",null,"Variable not defined",-1)),qa={key:1,class:"prop-error",textContent:"SyntaxError: This field must be a variable name"},Ya=["textContent"],Xa={key:2,class:"section"},er=se(()=>_("h2",null,"EVENTS",-1)),tr={key:0,class:"section-content"},sr=se(()=>_("p",{class:"section-description"}," Each event is a Python code that runs on specified situations ",-1)),or={class:"prop-label"},ar={class:"prop-description"},rr={class:"section"},nr=se(()=>_("h2",null,"PROPERTIES",-1)),ir={key:0,class:"section-content"},lr=se(()=>_("p",{class:"section-description"}," Each property is a Python expression, make sure to use the correct syntax. ",-1)),cr={class:"prop-label"},ur={class:"prop-description"},dr=["textContent"],pr=se(()=>_("div",{class:"feedback"},null,-1)),hr=[pr],fr=Q({__name:"WidgetEditor",props:{selectedWidgetErrors:null,layoutModel:null,selectedWidgets:null,dashPlayerState:null},emits:["close","create-variable"],setup(e,{emit:t}){const s=e,o=G(null);he(()=>s.selectedWidgetErrors,()=>{o.value=null});const a=w=>{I.openedSections.includes(w)?I.openedSections=I.openedSections.filter(S=>S!==w):I.openedSections.push(w)},i=w=>I.openedSections.includes(w),n=w=>U(w)?ne[w.type].name:be[w.type].name,c=F(()=>o.value===null?s.selectedWidgetErrors:o.value==="variable"?J.exports.omit(s.selectedWidgetErrors,"variable"):{...s.selectedWidgetErrors,props:J.exports.omit(s.selectedWidgetErrors.props,o.value)}),h=F(()=>l.value.type.includes("-input")&&l.value.type!=="click-input"),l=F(()=>s.selectedWidgets[0]),f=F(()=>{var R;if(!U(l.value))return;const S=((R=ne[l.value.type].pythonAPI.params)!=null?R:[]).find(N=>N.argName==="initial_value");return S||null});function v(w){this.style.height="0",this.style.height=this.scrollHeight-24+"px"}const p=new _a,u=G(null),P=402,I=vt({isActive:!1,resizing:!1,width:P,openedSections:["properties","variable"]});Jt(()=>{u.value&&(p.addGlobalEventListener("mouseup",()=>I.resizing=!1),p.addGlobalEventListener("mousemove",R=>$(R))),document.querySelectorAll(".widget-props-editor textarea").forEach(R=>{!R||(R.setAttribute("style","height:"+(R.scrollHeight-24)+"px;overflow-y:hidden;"),R.addEventListener("input",v,!1))})}),xs(()=>{wa(),p.removeGlobalEventListeners()});const $=w=>{I.resizing&&(I.width=Math.max(I.width-w.movementX,P))},L=F(()=>({width:`${I.width}px`})),ie=w=>be[w.type].params,ze=F(()=>{const w=(N,K)=>N.argName===K.argName&&N.typeName===K.typeName,S=(N,K,D)=>D.findIndex(Z=>w(N,Z))===K,R=N=>!N.formOnly;return s.selectedWidgets.flatMap(N=>{var K;return U(N)?(K=ne[N.type])==null?void 0:K.pythonAPI.params:ie(N)}).filter(Boolean).filter(R).filter(S)}),me=F(()=>{const w=(R,N)=>R.key===N.key,S=(R,N,K)=>K.findIndex(D=>w(R,D))===N;return s.selectedWidgets.flatMap(R=>{var N;return U(R)?(N=ne[R.type])==null?void 0:N.events:[]}).filter(Boolean).filter(S).filter(R=>R.key!=="change")}),Ke=w=>{s.layoutModel.updateVariable(w,l.value.id),o.value="variable"},xe=w=>S=>{s.layoutModel.updateProp({param:w,value:S},s.selectedWidgets.map(R=>R.id)),o.value=w.argName},Ve=w=>S=>{s.layoutModel.updateEvent({event:w,value:S},s.selectedWidgets.map(R=>R.id))},je=()=>{var w,S;return(S=(w=c.value.variable)==null?void 0:w.repr)==null?void 0:S.includes("SyntaxError")},Ze=()=>{var w,S;return(S=(w=c.value.variable)==null?void 0:w.repr)==null?void 0:S.includes("NameError")},m=w=>{var S;!w||((S=s.dashPlayerState.broker)==null||S.send({name:w,value:null,type:"variable-created",state:s.dashPlayerState.apiPageState}),t("create-variable",w))},M=()=>{var w,S;return((w=c.value.widget)==null?void 0:w.repr)&&!Object.values((S=c.value.props)!=null?S:{}).some(R=>R.repr)},X=()=>{var w;return(w=c.value.widget)==null?void 0:w.repr},Y=w=>{var S,R;return(R=(S=c.value.props)==null?void 0:S[w])==null?void 0:R.repr},Pe=w=>J.exports.upperFirst(w.replace(/_/g," "));return(w,S)=>{var N,K;const R=He("icon");return E(),A("div",{class:"widget-props-editor",style:Te(g(L))},[_("div",Ca,[_("div",Ma,[_("h1",null,H(n(g(l))),1),T(R,{path:g(no),fill:"#414A58",class:"close-icon",width:"16",height:"16",onClick:S[0]||(S[0]=D=>t("close"))},null,8,["path"])]),M()?(E(),A("div",Wa,[Ba,Ga,_("pre",{class:"prop-error",textContent:H(X())},null,8,Fa)])):j("",!0),g(h)?(E(),A("div",Ha,[_("div",{class:"section-header",onClick:S[1]||(S[1]=D=>a("variable"))},[T(R,{path:i("variable")?g(et):g(tt),fill:"#414A58",class:"chevron-icon",width:"16",height:"16"},null,8,["path"]),Ua]),i("variable")?(E(),A("div",za,[_("div",Ka,[Va,ja,_("div",Za,[T(at,{placeholder:"variable_name","param-name":"variable","dash-player-state":e.dashPlayerState,value:(N=g(l).variable)!=null?N:"",commit:Ke,"is-code":!1,onInput:S[2]||(S[2]=D=>g(l).variable=D)},null,8,["dash-player-state","value"])]),Ze()&&g(l).variable?(E(),A("div",Ja,[Qa,_("button",{onClick:S[3]||(S[3]=D=>m(g(l).variable))}," Create ")])):je()?(E(),A("pre",qa)):(K=g(c).variable)!=null&&K.repr?(E(),A("pre",{key:2,class:"prop-error",textContent:H(g(c).variable.repr)},null,8,Ya)):j("",!0),T(Vt,{param:g(f)},null,8,["param"])])])):j("",!0)])):j("",!0),g(me).length?(E(),A("div",Xa,[_("div",{class:"section-header",onClick:S[4]||(S[4]=D=>a("events"))},[T(R,{path:i("events")?g(et):g(tt),fill:"#414A58",class:"chevron-icon",width:"16",height:"16"},null,8,["path"]),er]),i("events")?(E(),A("div",tr,[sr,(E(!0),A(De,null,ke(g(me),D=>(E(),A("div",{key:D.key,class:"widget-prop"},[_("label",or,"On "+H(D.key),1),_("p",ar,"Executed after "+H(D.key),1),T(at,{"param-name":D.key,"dash-player-state":e.dashPlayerState,value:g(l).events[D.key],commit:Ve(D),"is-code":!0,onInput:Z=>g(l).events[D.key]=Z},null,8,["param-name","dash-player-state","value","commit","onInput"])]))),128))])):j("",!0)])):j("",!0),_("div",rr,[_("div",{class:"section-header",onClick:S[5]||(S[5]=D=>a("properties"))},[T(R,{path:i("properties")?g(et):g(tt),fill:"#414A58",class:"chevron-icon",width:"16",height:"16"},null,8,["path"]),nr]),i("properties")?(E(),A("div",ir,[lr,(E(!0),A(De,null,ke(g(ze),D=>{var Z;return E(),A("div",{key:D.argName,class:"widget-prop"},[_("p",cr,H(Pe(D.argName)),1),_("p",ur,H(D.description),1),T(at,{"has-error":!!Y(D.argName),placeholder:(Z=D.default)!=null?Z:void 0,"param-name":D.argName,"dash-player-state":e.dashPlayerState,value:g(l).props[D.argName],commit:xe(D),"is-code":!0,onInput:Je=>g(l).props[D.argName]=Je},null,8,["has-error","placeholder","param-name","dash-player-state","value","commit","onInput"]),Y(D.argName)?(E(),A("pre",{key:0,class:"prop-error",textContent:H(Y(D.argName))},null,8,dr)):j("",!0),T(Vt,{param:D},null,8,["param"])])}),128))])):j("",!0)])]),_("div",{ref_key:"handlerRef",ref:u,class:"handler",onMousedown:S[6]||(S[6]=Cs(D=>I.resizing=!0,["stop"]))},hr,544)],4)}}});const vr=q(fr,[["__scopeId","data-v-3ec8c3d5"]]),ns=e=>(pt("data-v-0d595f79"),e=e(),ht(),e),gr={class:"interact-menu"},mr={class:"icon-container"},yr=ns(()=>_("span",{class:"edit"},"Edit [Shift + P]",-1)),wr={class:"icon-container"},_r=ns(()=>_("span",null,"Interact [Shift + P]",-1)),Sr=Q({__name:"InteractMenu",props:{isPreview:{type:Boolean}},emits:["changePreview"],setup(e,{emit:t}){return(s,o)=>{const a=He("icon");return E(),A("div",gr,[_("div",mr,[T(a,{class:ve(["icon",{active:!e.isPreview}]),path:g(io),fill:"#5A677A",onClick:o[0]||(o[0]=i=>t("changePreview",!1))},null,8,["class","path"]),yr]),_("div",wr,[T(a,{class:ve(["icon",{active:e.isPreview}]),path:g(lo),fill:"#5A677A",onClick:o[1]||(o[1]=i=>t("changePreview",!0))},null,8,["class","path"]),_r])])}}});const Er=q(Sr,[["__scopeId","data-v-0d595f79"]]),br={class:"header"},Pr={key:0},Ir={key:1},Or=Q({__name:"RuntimeHeader",props:{title:{type:String},path:{type:String,required:!0}},setup(e){return(t,s)=>(E(),A("div",br,[e.title?(E(),A("p",Pr,H(e.title),1)):(E(),A("p",Ir,H(e.path),1))]))}});const Ar=q(Or,[["__scopeId","data-v-615748d7"]]);function Lr(e){var s;const t=(s=document.getSelection())==null?void 0:s.toString();return(e==null?void 0:e.selectionStart)!==void 0||!!t}const Rr={key:0,class:"widget-metadata-card"},Dr=["src"],kr={class:"metadata-title"},Tr={class:"metadata-description"},$r={key:1,class:"collapsed-widget-metadata-card"},Nr=["src"],xr=Q({__name:"WidgetMetadataCard",props:{metadata:null,collapsed:{type:Boolean}},setup(e){const t=window.__baseURL?`${window.__baseURL}/media`:"",s=a=>a in be?`${t}/${be[a].thumbname}`:`${t}/widget-thumbs/${to(a)}.svg`,o=window.__vscodeTheme===2?"dark":"light";return(a,i)=>e.collapsed?(E(),A("div",$r,[_("img",{class:"metadata-thumbnail",src:s(e.metadata.type),style:Te(g(o)==="dark"?{filter:"invert(1)"}:"")},null,12,Nr)])):(E(),A("div",Rr,[_("img",{class:"metadata-thumbnail",src:s(e.metadata.type),style:Te(g(o)==="dark"?{filter:"invert(1)"}:"")},null,12,Dr),_("div",kr,H(e.metadata.name),1),_("div",Tr,H(e.metadata.description),1)]))}});const Cr=q(xr,[["__scopeId","data-v-2b654c57"]]),Me={"click-input":-1,"text-output":0,"number-input":1,"text-input":2,"link-output":3,"multiple-choice-input":4,"file-input":5,"email-input":6,"markdown-output":7,"dropdown-input":8,"date-input":9,"cards-input":10,"textarea-input":11,"list-input":12,"file-output":13,"html-output":14,"pandas-output":15,"checkbox-input":16,"cnpj-input":17,"code-input":18,"progress-output":19,"pandas-row-selection-input":20,"image-input":21,"password-input":22,"currency-input":23,"iframe-output":24,"checklist-input":25,"image-output":26,"nps-input":27,"phone-input":28},Mr=Q({__name:"WidgetsMetadataList",emits:["dragstart","hover","leave"],setup(e,{emit:t}){const s=G(""),o=G(),a=G(!0),i=()=>{a.value=!1},n=()=>{a.value=!0,h()},c=async()=>{await mt(),o.value&&o.value.focus()},h=()=>{s.value=""},l=Object.values(ne).concat(Object.entries(be).map(([p,u])=>({type:p,...u}))).reduce((p,u)=>u.formOnly?p:{...p,[u.type]:u},{}),f=F(()=>s.value?Object.values(l).map(p=>({widget:p,score:so(p,s.value.split(" "))})).filter(({score:p})=>p>0).sort(({score:p},{score:u})=>u-p).map(({widget:p})=>p):Object.values(l).sort((p,u)=>{const P=p.type,I=u.type;if(P in Me){if(!(I in Me))return-1}else return 1;return Me[P]-Me[I]}));function v(p,u){t("dragstart",p,u)}return(p,u)=>{const P=He("icon");return E(),A("div",{class:"widgets-metadata",onMouseover:i,onMouseleave:n},[_("div",Ms({class:["search",{collapsed:a.value}]},Ws(a.value?{click:c}:{},!0)),[T(P,{path:g(co),class:"search-icon"},null,8,["path"]),a.value?j("",!0):Ne((E(),A("input",{key:0,ref_key:"searchInput",ref:o,"onUpdate:modelValue":u[0]||(u[0]=I=>s.value=I),type:"search",class:"widgets-metadata-filter",placeholder:"Find widgets"},null,512)),[[Zt,s.value]])],16),_("div",{class:ve(["widgets-metadata-list",{collapsed:a.value}])},[(E(!0),A(De,null,ke(g(f),I=>(E(),fe(Cr,{key:I.type,metadata:I,draggable:!0,collapsed:a.value,onDragstart:$=>v($,I.type)},{default:ye(()=>[Bs(H(I.type),1)]),_:2},1032,["metadata","collapsed","onDragstart"]))),128))],2)],32)}}});const Wr=q(Mr,[["__scopeId","data-v-cb0151ea"]]),Br=e=>t=>J.exports.uniq(e.map(Ks(t))).length===1,Gr=e=>e.some(t=>ne[t.type].autoHeight);function Fr(e,t){const s=Br(e),o=Gr(e),a=[],i=16,n=6;return s("colStart")&&a.push({rect:{x:t.x-n/2,y:t.y+t.height/2-i/2,width:n,height:i,referential:"screen"},side:"left"}),s("colEnd")&&a.push({rect:{x:t.x+t.width-n/2,y:t.y+t.height/2-i/2,width:n,height:i,referential:"screen"},side:"right"}),s("colStart")&&s("rowStart")&&!o&&a.push({rect:{x:t.x-n/2,y:t.y-n/2,width:n,height:n,referential:"screen"},side:"top-left"}),s("colEnd")&&s("rowStart")&&!o&&a.push({rect:{x:t.x+t.width-n/2,y:t.y-n/2,width:n,height:n,referential:"screen"},side:"top-right"}),s("colStart")&&s("rowEnd")&&!o&&a.push({rect:{x:t.x-n/2,y:t.y+t.height-n/2,width:n,height:n,referential:"screen"},side:"bottom-left"}),s("colEnd")&&s("rowEnd")&&!o&&a.push({rect:{x:t.x+t.width-n/2,y:t.y+t.height-n/2,width:n,height:n,referential:"screen"},side:"bottom-right"}),s("rowStart")&&!o&&a.push({rect:{x:t.x+t.width/2-i/2,y:t.y-n/2,width:i,height:n,referential:"screen"},side:"top"}),s("rowEnd")&&!o&&a.push({rect:{x:t.x+t.width/2-i/2,y:t.y+t.height-n/2,width:i,height:n,referential:"screen"},side:"bottom"}),a}const Hr=e=>({type:"copyAndPaste",selectedWidgets:e});function Ur(e,t){return e.setData("text/plain",JSON.stringify(Hr(t))),!0}function zr(e,t,s){const o=e.getData("text/plain");try{const a=o&&JSON.parse(o);if(!(a&&"type"in a&&a.type==="copyAndPaste"&&"selectedWidgets"in a&&Array.isArray(a.selectedWidgets)))return!1;const n=oa(t,a.selectedWidgets);return s.operationQueue.execute({name:"paste",operations:n,selection:t.selectedWidgets}),!0}catch{return!1}}class Kr{constructor(t){ce(this,"event");this.event=t}setData(t,s){var o;(o=this.event.clipboardData)==null||o.setData(t,s)}getData(t){var s,o;return(o=(s=this.event.clipboardData)==null?void 0:s.getData(t))!=null?o:null}getTransferItems(){var t,s;return Object.values((s=(t=this.event.clipboardData)==null?void 0:t.items)!=null?s:[]).map(jr)}}class Vr{constructor(t){ce(this,"item");this.item=t}get type(){return this.item.type}getAsString(){return new Promise(t=>this.item.getAsString(s=>t(s)))}getJSONValue(){return this.getAsString().then(t=>{try{return t?JSON.parse(t):null}catch{return null}})}getAsFile(){return this.item.getAsFile()}}function jr(e){return new Vr(e)}function jt(e){return new Kr(e)}const Zr={class:"dash-layout-editor"},Jr=Q({__name:"DashLayoutEditor",props:{dash:null,params:null,dashPlayerState:null,workspace:null},emits:["navigate","change-preview","create-variable"],setup(e,{emit:t}){const s=e,o=()=>L.updateVersion(),a=G(null),i=G(null),n=r=>t("navigate",r),c=r=>t("create-variable",r),h=r=>t("change-preview",r),l=()=>{var r;return(r=O)==null?void 0:r.correct()},f=r=>{if(!O)return;const d={x:r.pageX,y:r.pageY,referential:"screen"},y=O.screenPoint2world(d);if(m.value.state==="PANNING"){const k={dx:-r.movementX,dy:-r.movementY},W=O.screenDelta2world({dx:k.dx,dy:k.dy,referential:"screen"});O.translate(W),r.preventDefault(),r.stopPropagation();return}m.value.state==="MOVING"&&(m.value.mousePos=y,m.value.duplicating=nt(r)),m.value.state==="MOVING_SLOTTABLE"&&(m.value.mousePos=y),m.value.state==="JUST_CLICKED"&&Nt(m.value.pos,y)*O.zoom>5&&(b.has(m.value.widgetId)||(ue(r)?b.addToSelectedWidgets(m.value.widgetId):(b.resetSelection(),b.addToSelectedWidgets(m.value.widgetId))),m.value={state:"MOVING",initialMousePos:m.value.pos,mousePos:y,duplicating:nt(r)}),m.value.state==="JUST_CLICKED_SLOTTABLE_SELECTOR"&&Nt(m.value.mousePos,y)*O.zoom>5&&(m.value={state:"MOVING_SLOTTABLE",initialMousePos:O.screenPoint2world(m.value.mousePos),mousePos:y,slottableId:m.value.slottableId}),m.value.state==="SELECTING"&&(m.value.mousePos=d),m.value.state==="RESIZING"&&(m.value.mousePos=d),m.value.state==="SLOTTABLE_RESIZING"&&(m.value.mousePos=d),Rt(d)},v=r=>{Lr(r==null?void 0:r.target)||Ur(jt(r),b.selectedWidgets)&&r.preventDefault()},p=r=>{zr(jt(r),Z(),L)&&r.preventDefault()},u=vt({active:!1,hoverZoomBar:!1}),P=()=>{u.hoverZoomBar=!0},I=()=>{u.hoverZoomBar=!1},$=G(null),L=Pt.create(J.exports.cloneDeep(s.dash.layout),re);he(s.dash.layout,()=>{L.setLayout(s.dash.layout)});const ie=F(()=>re.isPreview),ze=F(()=>Object.keys(s.dash.rootSlot).reduce((r,d)=>{const y=s.dash.rootSlot[d];return y.position&&(r[d]=y),r},{}));let me=null;const Ke=J.exports.throttle(()=>{J.exports.isEqual(s.dash.rootSlot,me)||(me=J.exports.cloneDeep(s.dash.rootSlot),is())},500),xe=()=>{L.onSave(async()=>{!s.workspace||(s.dash.layout=L.layout,s.dashPlayerState.updateDashData(s.dash.makeRunnerData(s.workspace)),Ke())})};xe(),he(L,xe);const Ve=F(()=>Object.keys(L.widgets).reduce((r,d)=>{var V,oe,ae;const y=(V=s.dashPlayerState.computedErrors.props)==null?void 0:V[d],k=(oe=s.dashPlayerState.computedErrors.variables)==null?void 0:oe[d],W=(ae=s.dashPlayerState.computedErrors.widgets)==null?void 0:ae[d];return!y&&!k&&!W||!Object.keys({...y,...k,...W}).length?r:r?[...r,d]:[d]},[])),je=F(()=>{var r,d,y,k,W,V;return{props:(d=s.dashPlayerState.computedErrors.props)==null?void 0:d[(r=b.selectedSlottableId)!=null?r:b.selectedWidgetId],widget:(k=s.dashPlayerState.computedErrors.widgets)==null?void 0:k[(y=b.selectedSlottableId)!=null?y:b.selectedWidgetId],variable:(V=s.dashPlayerState.computedErrors.variables)==null?void 0:V[(W=b.selectedSlottableId)!=null?W:b.selectedWidgetId]}});function Ze(r,d){if(!O)return;const y=O.screenPoint2world({x:r.pageX,y:r.pageY,referential:"screen"});b.resetSelection(),d in be?m.value={state:"DRAGGING_SLOTTABLE",...y,type:d}:m.value={state:"DRAGGING",...y,type:d}}const m=G({state:"IDLE"});let M={state:"NONE"};const X=F(()=>(rt.setDashRunnerData(s.dashPlayerState.navbarVisible,s.dashPlayerState.hasSidebar),rt));he(X,()=>{var r;return(r=O)==null?void 0:r.updateGrid(X.value)});const Y=G(null),Pe=G(null),w=G(null),S=G(null);function R(){var k,W;const r=Pe.value,d=S.value;if(!r)throw new Error(`canvas = ${r}`);if(!d)throw new Error(`editor = ${d}`);O.setProjectedCanvas(r),O.correct(),d.addEventListener("wheel",N),r.addEventListener("mousedown",D),r.addEventListener("drop",Lt),r.addEventListener("dragover",ls),(k=r.parentElement)==null||k.addEventListener("keydown",ws),(W=r.parentElement)==null||W.addEventListener("keyup",_s);const y=r.getContext("2d");if(!y)throw new Error(`I can't get no context 2d ${r}`);$.value=Zs.create(r),Qe(y)}function N(r){if(!O)return;const d={x:r.pageX,y:r.pageY,referential:"screen"};if(Re(r)||bo(r))O.zoomIn(Math.exp(-Math.sign(r.deltaY)*.05),d),r.preventDefault();else{const y=ue(r)?{dx:r.deltaY,dy:0}:{dx:r.deltaX,dy:r.deltaY},k=O.screenDelta2world({dx:y.dx,dy:y.dy,referential:"screen"});O.translate(k)}r.stopPropagation()}function K(r){var d;Le.overrideProps(r,{condition:!((d=Le.props)!=null&&d[r].condition)})}function D(r){var k;if(!O)return;const d={x:r.pageX,y:r.pageY,referential:"screen"};if(r.button==1||r.button==0&&Io.isPressed("space")){m.value={state:"PANNING",initialMousePos:d,mousePos:d};return}const y=O.screenPoint2world(d);M.state==="HOVERING_WIDGET"?m.value={state:"JUST_CLICKED",pos:y,widgetId:M.widgetId}:M.state==="HOVERING_RESIZE_HANDLER"?m.value={state:"RESIZING",side:M.side,initialMousePos:d,mousePos:d,type:(k=b.selectedWidget)==null?void 0:k.type}:M.state==="HOVERING_TOGGLE"?m.value={state:"JUST_CLICKED_TOGGLE",mousePos:d,slottable:M.slottable}:M.state==="HOVERING_SLOTTABLE_RESIZE_HANDLER"?m.value={state:"SLOTTABLE_RESIZING",initialMousePos:d,mousePos:d,slottableId:M.slottableId,side:"bottom"}:M.state==="HOVERING_SLOTTABLE_SELECTOR"?m.value={state:"JUST_CLICKED_SLOTTABLE_SELECTOR",slottableId:M.slottableId,mousePos:d}:(ue(r)||b.resetSelection(),m.value={state:"SELECTING",initialMousePos:d,mousePos:d})}const Z=()=>{var r;return{mouseState:m.value,grid:X.value,camera:O,workingLayout:L,hoverState:M,resizeHandlerRects:Ot(),widgetsInRectangularSelection:qe(),selectedWidgets:new Set(b.selectedWidgetsIds),dash:s.dash,calculatedPositions:xt(s.dashPlayerState.runnerData.layout.slot,(r=Le.props)!=null?r:{},X.value),selectedSlottable:b.selectedSlottableId}},Je=()=>{var W,V,oe,ae,Ie,Oe,Ae,Dt,kt,Tt;const r=O.screenRect2world(O.canvasRect),d=O.screenDelta2world({dx:8,dy:8,referential:"screen"}),y=O.screenRect2world({x:(W=i.value)==null?void 0:W.$el.getBoundingClientRect().x,y:(V=i.value)==null?void 0:V.$el.getBoundingClientRect().y,width:(oe=i.value)==null?void 0:oe.$el.getBoundingClientRect().width,height:(ae=i.value)==null?void 0:ae.$el.getBoundingClientRect().height,referential:"screen"});Ye({origin:{x:Math.min(X.value.width+d.dx,r.x+r.width-y.width-d.dx),y:Math.max(r.y+d.dy,0),referential:"world"},element:(Ie=i==null?void 0:i.value)==null?void 0:Ie.$el,ignoreZoom:!0});const k=O.screenRect2world({x:(Oe=Y.value)==null?void 0:Oe.$el.getBoundingClientRect().x,y:(Ae=Y.value)==null?void 0:Ae.$el.getBoundingClientRect().y,width:(Dt=Y.value)==null?void 0:Dt.$el.getBoundingClientRect().width,height:(kt=Y.value)==null?void 0:kt.$el.getBoundingClientRect().height,referential:"screen"});Ye({origin:{x:0,y:-k.height-d.dy,referential:"world"},element:(Tt=Y==null?void 0:Y.value)==null?void 0:Tt.$el,ignoreZoom:!0})},is=()=>{var r;(r=s.dashPlayerState.broker)==null||r.send({type:"widgets-changed",state:s.dashPlayerState.apiPageState,dashDefinition:{slot:s.dash.rootSlot}})},le=G(null);function Qe(r){var V,oe,ae,Ie,Oe,Ae;if(!O||!s.workspace)return;Ye({origin:{x:0,y:0,referential:"world"},element:(V=a==null?void 0:a.value)==null?void 0:V.$el}),Je();const d=r.canvas.getBoundingClientRect();if(r.canvas.width=r.canvas.offsetWidth,r.canvas.height=r.canvas.offsetHeight,r.clearRect(0,0,r.canvas.width,r.canvas.height),r.translate(-d.x,-d.y),r.canvas.style.cursor=(ae=(oe=$.value)==null?void 0:oe.cursor(m.value,M))!=null?ae:"default",!$.value){requestAnimationFrame(()=>Qe(r));return}const y=Z(),k=ta(y);(!J.exports.isEqual(k.operations,(Ie=le.value)==null?void 0:Ie.operations)||!J.exports.isEqual(k.layout,(Oe=le.value)==null?void 0:Oe.layout))&&(le.value=k,s.dashPlayerState.updateRunnerData(s.dash.makeRunnerData(s.workspace,le.value.layout))),le.value&&$.value.render({...y,computedState:le.value,isPreview:re.isPreview,calculatedPositions:xt(s.dash.makeRunnerData(s.workspace,le.value.layout).layout.slot,(Ae=Le.props)!=null?Ae:{},X.value)}),requestAnimationFrame(()=>Qe(r))}s.dashPlayerState.onWidgetsComputedMessage(r=>{var k;const d=Object.keys(s.dashPlayerState.runnerData.layout.slot),y=Object.keys((k=r.props)!=null?k:{});oo(d,y)}),Jt(()=>{o(),me=J.exports.cloneDeep(ao(ze.value,ne)),Le.setInitialEditProps(s.dash.rootSlot),b.setLayoutModel(L),addEventListener("resize",l),addEventListener("copy",v),addEventListener("paste",p),addEventListener("mousemove",f),mt(()=>{R()})}),gt(()=>{removeEventListener("resize",l),removeEventListener("copy",v),removeEventListener("paste",p),removeEventListener("mousemove",f),Vs()});function ls(r){if(!O)return;r.preventDefault();const d=O.screenPoint2world({x:r.pageX,y:r.pageY,referential:"screen"});m.value={...m.value,...d}}const cs=()=>{m.value.state==="IDLE"&&b.resetSelection(),At({referential:"screen",x:0,y:0})},It=()=>{b.selectedSlottableId?L.delete([b.selectedSlottableId]):L.delete(b.selectedWidgetsIds),b.resetSelection()},us=r=>{if(Re(r)&&ue(r)){r.preventDefault(),r.stopPropagation();const d=L.redo();if(d){if(d.operations.some(y=>y.op==="remove")){b.resetSelection();return}b.selectedWidgetsIds=[...new Set(d.selection)]}return}else if(Re(r)){r.preventDefault(),r.stopPropagation();const d=L.undo();if(d){if(d.operations.some(y=>y.op==="remove")){b.resetSelection();return}b.selectedWidgetsIds=[...new Set(d.selection)]}return}},Ce=(r,d)=>{const[y,k]={up:[0,-1],down:[0,1],left:[-1,0],right:[1,0]}[d],W=sa(r,y,k);L.operationQueue.execute({name:`move ${d}`,operations:W,selection:r.selectedWidgets})},ds=()=>{Ce(Z(),"up")},ps=()=>{Ce(Z(),"down")},hs=()=>{Ce(Z(),"left")},fs=()=>{Ce(Z(),"right")},vs=r=>{Re(r)&&(r.preventDefault(),r.stopPropagation(),b.selectAll())};he(()=>s.dashPlayerState.authenticating,r=>{r&&(re.isPreview=!0)});const gs=r=>{ue(r)&&h(!re.isPreview)},ms=()=>{m.value.state!=="PANNING"&&(m.value.state="START_PANNING")},ys=r=>({escape:()=>cs(),backspace:()=>It(),delete:()=>It(),z:()=>us(r),arrowup:()=>ds(),arrowdown:()=>ps(),arrowleft:()=>hs(),arrowright:()=>fs(),a:()=>vs(r),p:()=>gs(r),space:()=>ms()}),ws=r=>{var d,y;return(y=(d=ys(r))[r.key.toLowerCase().trim()?r.key.toLowerCase():r.code.toLowerCase()])==null?void 0:y.call(d)},_s=()=>{m.value.state="IDLE"};function Ss(){if(m.value.state!=="SELECTING")return null;const{x:r,y:d}=m.value.initialMousePos,{x:y,y:k}=m.value.mousePos;return{x:Math.min(r,y),y:Math.min(d,k),width:Math.abs(r-y),height:Math.abs(d-k),referential:"screen"}}function qe(){if(!O)throw new Error("No camera value yet");const r=Ss();return r?new Set(Object.keys(s.dashPlayerState.widgets).filter(d=>Js(O.worldRect2screen(Ee(s.dashPlayerState.getWidgetPosition(d),X.value)),r))):new Set}function Es(){return b.selectedWidgetsIds.every(r=>Object.keys(s.dashPlayerState.widgets).includes(r))}const bs=()=>Qt(Object.entries(s.dashPlayerState.widgets).filter(([r])=>b.has(r)).map(([r,d])=>Ee(d.position,X.value)));function Ot(){if(!O)throw new Error("No camera value yet");const r=bs();return!r||!Es()?[]:Fr(b.selectedWidgets,O.worldRect2screen(r))}function At(r){m.value={state:"IDLE"},Rt(r)}const Ps=r=>{m.value=m.value,ue(r)?qe().forEach(d=>{b.toggleWidgetSelection(d)}):(b.resetSelection(),qe().forEach(d=>{b.addToSelectedWidgets(d)}))};function Lt(r){var y;(y=le.value)!=null&&y.operations.length&&L.operationQueue.execute({name:"mouse up",operations:le.value.operations,selection:new Set(b.selectedWidgetsIds)}),m.value.state==="SELECTING"&&Ps(r),m.value.state==="JUST_CLICKED"&&(ue(r)?b.toggleWidgetSelection(m.value.widgetId):(b.clearWidgetSelection(),b.selectedSlottableId=null,b.addToSelectedWidgets(m.value.widgetId))),m.value.state==="JUST_CLICKED_TOGGLE"&&K(m.value.slottable),m.value.state==="JUST_CLICKED_SLOTTABLE_SELECTOR"&&(b.selectedSlottableId=m.value.slottableId);const d={x:r.pageX,y:r.pageY,referential:"screen"};At(d)}addEventListener("mouseup",Lt);const Is=r=>{for(const d of Ot())if(Ct(r,d.rect)){M={state:"HOVERING_RESIZE_HANDLER",side:d.side};return}},Os=r=>{var y;const d=(y=Object.keys(s.dashPlayerState.widgets).find(k=>Ct(O.screenPoint2world(r),Ee(s.dashPlayerState.getWidgetPosition(k),X.value))))!=null?y:null;d?M={state:"HOVERING_WIDGET",widgetId:d}:M={state:"NONE"}},As=r=>{const d=Xe.getToggleUnderCursor(r);d&&(M={state:"HOVERING_TOGGLE",slottable:d.id})},Ls=r=>{const d=Xe.getSelectorUnderCursor(r);d&&(M={state:"HOVERING_SLOTTABLE_SELECTOR",slottableId:d.id})},Rs=r=>{const d=Xe.getResizerUnderCursor(r);d&&(M={state:"HOVERING_SLOTTABLE_RESIZE_HANDLER",slottableId:d.id})};function Rt(r){!O||(Os(r),Is(r),As(r),Ls(r),Rs(r))}const Ye=r=>{const{origin:d,element:y,ignoreZoom:k}=r;if(!O||!y||!y.style)return;const W=O.worldPoint2screen(d),V=Pe.value.getBoundingClientRect(),oe=[`translate(${W.x-V.x}px, ${W.y-V.y}px)`,k?null:`scale(${O.zoom})`].filter(ae=>ae).join(" ");Object.assign(y.style,{transform:oe,transformOrigin:"top left"})};return(r,d)=>(E(),A("div",Zr,[Ne(T(Wr,{onDragstart:Ze},null,512),[[ft,!g(ie)]]),_("div",{ref_key:"editor",ref:w,class:ve(["editor"])},[_("div",{ref_key:"listeners",ref:S,class:"listeners",tabindex:"0"},[T(js,{ref_key:"player",ref:a,class:ve(["player",{preview:g(re).isPreview}]),style:{top:0,left:0,height:"unset"},"is-preview":!0,params:e.params,camera:g(O),"editing-mode":!g(re).isPreview,"force-responsivity":"desktop","widgets-with-errors":g(Ve),"dash-player-state":e.dashPlayerState,onNavigate:n},null,8,["class","params","camera","editing-mode","widgets-with-errors","dash-player-state"]),_("canvas",{ref_key:"canvas",ref:Pe,class:ve(["layout-canvas",{hide:g(ie)}])},null,2)],512),T(Ar,{ref_key:"runtimeHeader",ref:Y,title:e.dashPlayerState.runnerData.title,path:e.dashPlayerState.runnerData.path},null,8,["title","path"]),T(Er,{ref_key:"interactMenu",ref:i,class:"interact-menu","is-preview":g(re).isPreview,onChangePreview:h},null,8,["is-preview"])],512),(g(b).selectedWidgetsIds.length>0||g(b).selectedSlottableId)&&!g(re).isPreview&&m.value.state==="IDLE"?(E(),fe(vr,{key:0,"selected-widget-errors":g(je),"layout-model":g(L),"selected-widgets":g(b).selectedSlottable?[g(b).selectedSlottable]:g(b).selectedWidgets,"dash-player-state":e.dashPlayerState,onClose:d[0]||(d[0]=y=>g(b).clearWidgetSelection()),onCreateVariable:c},null,8,["selected-widget-errors","layout-model","selected-widgets","dash-player-state"])):j("",!0),T(ia,{camera:g(O),class:"zoom-bar",onHover:P,onLeave:I},null,8,["camera"])]))}});const Qr=q(Jr,[["__scopeId","data-v-fa95dc62"]]),qr={class:"dash-editor"},Yr=Q({__name:"DashEditor",setup(e){const t=Fs(),s=Hs(),{result:o}=Wt(()=>po.get()),a=({id:u,type:P})=>{P==="dash"?(t.push({name:"dashEditor",params:{dashId:u},query:s.query}),c()):t.push({name:"editor",params:{formId:u},query:s.query})},{loading:i,result:n,refetch:c}=Wt(()=>uo.get(s.params.dashPath)),h=u=>{re.isPreview=u},l=u=>{var P;return(P=n.value)==null?void 0:P.addVariableToCode(u)};let f=Gs(null);const v=()=>{var u;if(!(!n.value||!o.value)){if(n.value.path===((u=f.value)==null?void 0:u.runnerData.path)){f.value.updateDashData(n.value.makeRunnerData(o.value));return}f.value=Mt.create(n.value.makeRunnerData(o.value),!0),f.value.onRedirect(({url:P,queryParams:I})=>Ts(t,P,I))}},p=()=>{var u;!f.value||(u=f.value)==null||u.resetState()};return he([n,o],v),gt(()=>{var u;!n.value||!o.value||Mt.delete((u=n.value)==null?void 0:u.makeRunnerData(o.value).path)}),(u,P)=>{var I;return E(),A("div",qr,[g(i)||!g(n)||!g(o)?(E(),fe(Xs,{key:0,class:"loading",justify:"center"})):(E(),fe($s,{key:1},{left:ye(()=>[T(ho,{link:"/_editor/dashes"})]),right:ye(()=>[T(go,{path:"dashes/overview"}),T(vo,{model:g(n)},null,8,["model"]),T(fo,{model:g(n)},null,8,["model"])]),default:ye(()=>[T($t,{title:"Layout editor"},{default:ye(()=>[g(f)?(E(),fe(Qr,{key:0,workspace:g(o),dash:g(n),"dash-player-state":g(f),params:g(s).query,onNavigate:a,onChangePreview:h,onCreateVariable:l},null,8,["workspace","dash","dash-player-state","params"])):j("",!0)]),_:1}),T($t,{title:"Settings"},{default:ye(()=>[T(Eo,{dash:g(n)},null,8,["dash"])]),_:1})]),_:1})),g(n)?(E(),fe(qs,{key:2,"dash-player-state":g(f)||void 0,runtime:"dashes",onRestart:p},null,8,["dash-player-state"])):j("",!0),T(Ys,{"has-changes":(I=g(n))==null?void 0:I.hasChanges()},null,8,["has-changes"])])}}});const Dn=q(Yr,[["__scopeId","data-v-c0500bfa"]]);export{Dn as default}; +//# sourceMappingURL=DashEditor.ded21d4d.js.map diff --git a/abstra_statics/dist/assets/DashPlayer.1858f538.js b/abstra_statics/dist/assets/DashPlayer.1858f538.js new file mode 100644 index 0000000000..acc601b244 --- /dev/null +++ b/abstra_statics/dist/assets/DashPlayer.1858f538.js @@ -0,0 +1,2 @@ +var ct=Object.defineProperty;var gt=(i,t,e)=>t in i?ct(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var l=(i,t,e)=>(gt(i,typeof t!="symbol"?t+"":t,e),e);import{p as T}from"./passwordlessManager.8fb0aebd.js";import{r as O,an as ut,q as A,b as y,c as E,O as pt,Q as wt,x as M,d as q,K as P,a as bt,F as ft,L as yt,A as $,e as L,z as C,D as rt,t as I,ak as mt,al as vt,a6 as xt,G as ot,y as St,w as D,B as tt,o as Et,R as Rt,ao as _t,ap as kt,U as Wt}from"./registerWidgets.68572380.js";import{i as B,l as Pt,w as nt,m as v}from"./runnerData.09d29411.js";import{e as Ct,R as It}from"./executeJs.00514c74.js";import{l as et}from"./log.13038e9d.js";import{P as Mt}from"./Passwordless.6c7a116b.js";import{W as Lt}from"./WidgetsFrame.b4601d67.js";import{e as Dt}from"./icons.3acf9dc1.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[t]="b064f48b-a121-44e3-8723-55775ba06e44",i._sentryDebugIdIdentifier="sentry-dbid-b064f48b-a121-44e3-8723-55775ba06e44")}catch{}})();function Ht(i,t){return{dx:t.x-i.x,dy:t.y-i.y,referential:i.referential}}function zt(i,t){return i.rowEnd=i.x&&t.y<=i.y&&t.y+t.height>=i.y:t.xi.x&&t.yi.y}function Fe(i,t){return!(i.x>t.x+t.width||t.x>i.x+i.width||i.y>t.y+t.height||t.y>i.y+i.height)}function Ve(i,t){return!(i.colStart>t.colEnd||t.colStart>i.colEnd||i.rowStart>t.rowEnd||t.rowStart>i.rowEnd)}function qe(i,t,e){const s=i.y===t.y,r=i.x===t.x,o=i.x+i.width===t.x+t.width,n=i.y+i.height===t.y+t.height;switch(e){case"left":return r;case"right":return o;case"top":return s;case"bottom":return n;case"top-left":return s&&r;case"top-right":return s&&o;case"bottom-left":return n&&r;case"bottom-right":return n&&o}}const Gt=i=>i.reduce((t,e)=>{const s=t?Math.min(t.x,e.x):e.x,r=t?Math.min(t.y,e.y):e.y,o=t?Math.max(t.x+t.width,e.x+e.width):e.x+e.width,n=t?Math.max(t.y+t.height,e.y+e.height):e.y+e.height;return{x:s,y:r,width:o-s,height:n-r,referential:e.referential}},null);function Ze(i,t){return Math.sqrt((i.x-t.x)**2+(i.y-t.y)**2)}function At(i){const t=[];let e=0;for(const s in i){const[r,o]=i[s];e+=i.filter(([a,h,g],d)=>!(o.position.colStart>h.position.colEnd||h.position.colStart>o.position.colEnd)&&h.position.rowEnd+g>o.position.rowStart&&d<+s).reduce((a,h)=>a+Math.max(h[2],0),0);const n=Ot(o,{deltaJ:e,deltaI:0});t.push([r,n])}return t}const Tt="rgba(0, 128, 233, 0.05)";class N{constructor(t){l(this,"context");this.canvas=t,this.context=this.canvas.getContext("2d"),H.setContext(this.context)}static create(t){return new N(t)}render({mouseState:t,grid:e,camera:s,hoverState:r,resizeHandlerRects:o,widgetsInRectangularSelection:n,selectedWidgets:a,computedState:h,isPreview:g,calculatedPositions:d,selectedSlottable:c}){if(!s)throw new Error("No camera value yet");this.renderFrame(e,s),this.renderGrid(e,s,t),this.renderWidgetShadow(h,e,s,d.widgets),this.renderWidgetHoverBorders(r,t,s,e,d.widgets),this.renderSelectionHull(t,s,e,a,d.widgets),this.renderWidgetsSelectionBorders(t,a,s,e,d.widgets),this.renderRectangularSelection(t),this.renderRectangularSelectionHovers(t,n,s,e,d.widgets),this.renderResizeHandlers(t,o),g||(H.slottables=d.slottables,H.renderSlottables(c))}renderFrame(t,e){const s={x:0,y:0,width:t.width,height:t.height+t.navbarLength,referential:"world"};this.context.fillStyle="transparent",this.context.shadowColor="rgba(0,0,0,0.1)",this.context.shadowBlur=15;const r=e.worldRect2screen(s);this.context.fillRect(r.x,r.y,r.width,r.height),this.context.clearRect(r.x,r.y,r.width,r.height)}getGridDots(t,e){var d;const s=[],r=e.worldPoint2screen({y:0,x:0,referential:"world"}),o=(d=e.projectedElement)==null?void 0:d.getBoundingClientRect(),n=t.margin*e.zoom,a=t.gap*e.zoom,h=t._cellHeight*e.zoom,g=(o.y+o.height-r.y-n)/(h+a);for(const c in Array(t.columns+1).fill(null))for(const w in Array(Math.ceil(g+1)).fill(null))s.push(e.worldPoint2screen({x:t.margin+parseInt(c)*(t.cellWidth+t.gap),y:t.margin+parseInt(w)*(t.cellHeight+t.gap)+t.navbarLength,referential:"world"}));return s}renderGrid(t,e,s){if(s.state==="MOVING"||s.state==="RESIZING"||s.state==="SLOTTABLE_RESIZING"||s.state==="MOVING_SLOTTABLE"||s.state==="DRAGGING_SLOTTABLE"||s.state==="DRAGGING"){this.context.fillStyle="rgba(0,0,0,0.1)";for(const r of this.getGridDots(t,e))this.context.beginPath(),this.context.ellipse(r.x,r.y,2,2,0,0,2*Math.PI),this.context.fill()}}renderWidgetShadow(t,e,s,r){this.context.fillStyle="rgba(0, 0, 0, 0.1)";for(const o in r){if(!t.operations.some(h=>h.path.includes(o)))continue;const n=r[o],a=s.worldRect2screen(k(n.position,e));this.context.fillRect(a.x,a.y,a.width,a.height)}}renderWidgetHoverBorders(t,e,s,r,o){if(this.context.strokeStyle="#ababab",t.state==="HOVERING_WIDGET"&&e.state==="IDLE"){const n=o[t.widgetId];if(!n)return;const a=s.worldRect2screen(k(n.position,r));this.context.strokeRect(a.x,a.y,a.width,a.height)}else(e.state==="MOVING"||e.state==="RESIZING"||e.state==="DRAGGING"||e.state==="SELECTING")&&Object.keys(o).forEach(n=>{const a=o[n],h=s.worldRect2screen(k(a.position,r));this.context.strokeRect(h.x,h.y,h.width,h.height)})}renderWidgetsSelectionBorders(t,e,s,r,o){if(t.state==="IDLE"||t.state==="SELECTING"){this.context.strokeStyle="#3482E5",this.context.lineWidth=2;for(const n of e){const a=o[n],h=s.worldRect2screen(k(a.position,r));this.context.strokeRect(h.x,h.y,h.width,h.height)}}}renderRectangularSelection(t){if(this.context.fillStyle=Tt,t.state==="SELECTING"){const e=Math.min(t.initialMousePos.x,t.mousePos.x),s=Math.min(t.initialMousePos.y,t.mousePos.y),r=Math.abs(t.initialMousePos.x-t.mousePos.x),o=Math.abs(t.initialMousePos.y-t.mousePos.y),n={x:e,y:s,width:r,height:o};this.context.fillRect(n.x,n.y,r,o)}}renderRectangularSelectionHovers(t,e,s,r,o){if(this.context.strokeStyle="#3482E5",t.state==="SELECTING")for(const n of e){const a=o[n],h=s.worldRect2screen(k(a.position,r));this.context.strokeRect(h.x,h.y,h.width,h.height)}}renderSelectionHull(t,e,s,r,o){const n=Gt(Object.entries(o).filter(([h])=>r.has(h)).map(([h,g])=>k(g.position,s)).filter(h=>h!==null));if(t.state!=="IDLE"||!n)return;this.context.strokeStyle="#3482E5";const a=e.worldRect2screen(n);this.context.strokeRect(a.x,a.y,a.width,a.height)}static drawResizeHandler(t,e){t.fillStyle="white",t.strokeStyle="#3482E5",t.lineWidth=1,t.fillRect(e.x,e.y,e.width,e.height),t.strokeRect(e.x,e.y,e.width,e.height)}renderResizeHandlers(t,e){if(t.state!=="MOVING")for(const{rect:s}of e)N.drawResizeHandler(this.context,s)}cursor(t,e){if(t.state==="MOVING")return"grabbing";if(t.state==="SELECTING")return"crosshair";if(t.state==="RESIZING")switch(t.side){case"bottom":case"top":return"ns-resize";case"left":case"right":return"ew-resize"}else{if(t.state==="START_PANNING")return"grab";if(t.state==="PANNING")return"grabbing";if(t.state==="JUST_CLICKED_TOGGLE")return"grabbing";if(e.state==="HOVERING_WIDGET")return"grab";if(e.state==="HOVERING_RESIZE_HANDLER")switch(e.side){case"bottom":case"top":return"ns-resize";case"left":case"right":return"ew-resize";case"top-left":case"bottom-right":return"nwse-resize";case"top-right":case"bottom-left":return"nesw-resize"}else return e.state==="HOVERING_TOGGLE"?"pointer":e.state==="HOVERING_SLOTTABLE_RESIZE_HANDLER"?"ns-resize":e.state==="HOVERING_SLOTTABLE_SELECTOR"?"pointer":"default"}}}const U=()=>document.body.classList.contains("vscode-dark"),F=window.__baseURL?`${window.__baseURL}/media`:"",jt=(i,t,e,s,r,o)=>{let n=[];return at(t)||(o||(n=n.concat(Ft(i,e,s,r))),o&&(n=n.concat($t(i,e,s,r)).concat(Bt(i,e,s,r)))),n.concat(Vt(i,e,s,t,r)).concat(Zt(i,e,s,r))},at=i=>{var t;return!((t=i.condition)==null||t)},$t=(i,t,e,s)=>{const{row:r,height:o}=i.position,{x:n,y:a,height:h,width:g}=t.getCell(0,r),d=o*h,c=g*t.columns,w={x:n,y:a,width:c,height:d,referential:"world"},p=3,b=2,m=e.worldRect2screen(w);return s.strokeStyle="#3482E5",s.lineWidth=b,s.strokeRect(m.x+p,m.y,m.width-2*p,m.height),[]},Bt=(i,t,e,s)=>{const r=Ut(i,t,e);return N.drawResizeHandler(s,r),[{type:"resizer",position:r,elementId:i.id}]},Ut=(i,t,e)=>{const{row:o,height:n}=i.position,{x:a,y:h,height:g,width:d}=t.getCell(0,o),c=n*g,w=d*t.columns,p=e.worldRect2screen({x:a,y:h,width:w,height:c,referential:"world"});return{x:p.x+p.width/2-20/2,y:p.y+p.height-6/2,width:20,height:6,referential:"screen"}},Ft=(i,t,e,s)=>{const{row:r,height:o}=i.position,{x:n,y:a,height:h,width:g}=t.getCell(0,r),d=o*h,c=g*t.columns,w={x:n,y:a,width:c,height:d,referential:"world"},p=4,b=3,m=2,S=e.worldRect2screen(w);return s.strokeStyle="rgb(39, 67, 255, 0.13)",s.lineWidth=m,s.beginPath(),s.roundRect(S.x+b,S.y,S.width-2*b,S.height,p),s.stroke(),[]},Vt=(i,t,e,s,r)=>{const{row:o,height:n}=i.position,a=qt(o,n,t,e),h=new Image(a.width,a.height);return h.src=at(s)?`${F}/chevron-down-${U()?"dark":"light"}.svg`:`${F}/chevron-up-${U()?"dark":"light"}.svg`,h.style.viewBox=`0 0 ${a.width} ${a.height}`,r.drawImage(h,a.x,a.y,a.width,a.height),[{type:"toggle",position:a,elementId:i.id}]},qt=(i,t,e,s)=>{const{y:r}=e.getCell(0,t),o=24,n=24,a={x:-30,y:r+e.cellHeight*i-n,width:o,height:n,referential:"world"};return s.worldRect2screen(a)},Zt=(i,t,e,s)=>{const{row:r}=i.position,o=Jt(r,t,e),n=new Image(o.width,o.height);return n.src=`${F}/drag-${U()?"dark":"light"}.svg`,s.drawImage(n,o.x,o.y,o.width,o.height),[{type:"selector",position:o,elementId:i.id}]},Jt=(i,t,e)=>{const{y:s}=t.getCell(0,i),r={x:-30,y:s,width:24,height:24,referential:"world"};return e.worldRect2screen(r)},Kt={"if-block":jt};class Z{constructor(t,e,s){l(this,"context",null);l(this,"_slottables",[]);l(this,"selectableElements",[]);l(this,"getSlottableRenderedElement",(t,e)=>{var s;return(s=this.selectableElements.find(r=>r.elementId===t&&r.type===e))!=null?s:null});l(this,"getRenderedElementUnderCursor",(t,e)=>this._slottables.find(s=>{var o,n;const r=(n=(o=this.getSlottableRenderedElement(s.id,t))==null?void 0:o.position)!=null?n:null;return r?Nt(e,r):!1})||null);l(this,"getSelectorUnderCursor",t=>this.getRenderedElementUnderCursor("selector",t));l(this,"getToggleUnderCursor",t=>this.getRenderedElementUnderCursor("toggle",t));l(this,"getResizerUnderCursor",t=>this.getRenderedElementUnderCursor("resizer",t));this.layoutGrid=t,this.camera=e,this.propsHandler=s}static create(t,e,s){return new Z(t,e,s)}setContext(t){this.context=t}set slottables(t){if(!this.context)throw new Error("No context set yet");this._slottables=Object.values(t)}renderSlottables(t){if(this.selectableElements=[],this._slottables.length!==0)for(const e of this._slottables)this.selectableElements=this.selectableElements.concat(this.renderSlottable(e,t===e.id))}renderSlottable(t,e){var s,r;return Kt[t.type](t,(r=(s=this.propsHandler.props)==null?void 0:s[t.id])!=null?r:{},this.layoutGrid,this.camera,this.context,e)}}const Yt=960,st=12,Qt=0,Xt=24,te=32,ee=8;class J{constructor(){l(this,"width",Yt);l(this,"columns",st);l(this,"gap",Qt);l(this,"margin",Xt);l(this,"_cellHeight",te);l(this,"padding",ee);l(this,"navbarVisible",!1);l(this,"hasSidebar",!1);l(this,"_dashPlayerState",null)}static create(){return new J}setDashRunnerData(t,e){this.navbarVisible=t,this.hasSidebar=e}setDashPlayerState(t){this._dashPlayerState=t}static get columns(){return st}get cellHeight(){return this._cellHeight}get navbarLength(){return this.navbarVisible?48:0}get cellWidth(){const t=this.columns-1;return(this.width-2*this.margin-t*this.gap)/this.columns}get rows(){var t,e,s,r;return Math.max(Object.values((e=(t=this._dashPlayerState)==null?void 0:t.widgets)!=null?e:{}).map(o=>o.position.rowEnd).reduce((o,n)=>Math.max(o,n),0)+4,Object.values((r=(s=this._dashPlayerState)==null?void 0:s.calculatedPositions.slottables)!=null?r:{}).map(o=>o.position.row+o.position.height).reduce((o,n)=>Math.max(o,n),0)+4,20)}get sidebarWidth(){return this.hasSidebar?240:0}getCell(t,e){return{x:this.margin+t*(this.cellWidth+(t>0?this.gap:0)),y:this.margin+this.navbarLength+e*(this._cellHeight+(e>0?this.gap:0)),width:this.cellWidth,height:this._cellHeight,referential:"world"}}getCellFrom(t,e){const s=this.getCell(t.i,t.j);return this.cellAt(s.x+e.dx,s.y+e.dy)}areaFromRect(t){const e=this.cellAt(t.x,t.y),s={dx:t.width-1,dy:t.height-1,referential:"world"},r=this.getCellFrom(e,s);return{colStart:e.i,rowStart:e.j,colEnd:r.i,rowEnd:r.j}}rectFromArea(t){const e=this.getCell(t.colStart,t.rowStart),s=this.getCell(t.colEnd,t.rowEnd);return{x:e.x,y:e.y,width:s.x+s.width-e.x,height:s.y+s.height-e.y,referential:"world"}}get height(){return this.rows*(this._cellHeight+this.gap)-this.gap+2*this.margin}cellAt(t,e){return{i:Math.floor((t-this.margin)/(this.cellWidth+this.gap)),j:Math.floor((e-this.margin-this.navbarLength)/(this._cellHeight+this.gap))}}snap(t,e){const s=e==="bottom-right"||e==="top-right"?1:0,r=e==="bottom-left"||e==="bottom-right"?1:0,o=this.cellWidth+this.gap,n=this._cellHeight+this.gap,a=this.margin+this.cellWidth*s,h=this.margin+this.navbarLength+this.cellHeight*r,g=t.x-a,d=t.y-h;return{x:a+o*Math.round(g/o),y:h+n*Math.round(d/n),referential:"world"}}snapDelta(t){const e=this.cellWidth+this.gap,s=this._cellHeight+this.gap;return{dx:e*Math.round(t.dx/e),dy:s*Math.round(t.dy/s),referential:"world"}}height2rows(t){return Math.ceil((t+this.gap)/(this.cellHeight+this.gap))}}const u={left:20,right:20,top:20,bottom:200};class K{constructor(t){l(this,"x",0);l(this,"y",0);l(this,"_projectedElement",null);l(this,"grid");l(this,"_zoom",1);this.grid=t}static create(t){return new K(t)}setProjectedCanvas(t){this._projectedElement=t,this.fit()}get projectedElement(){if(!this._projectedElement)throw new Error("Camera has no projected element");return this._projectedElement}updateGrid(t){this.grid=t}get zoom(){return this._zoom}set zoom(t){this._zoom=t}fit(){const t=this.canvasRect,e=Math.max(t.width-u.left-u.right,0),s=Math.max(t.height-u.top-u.bottom,0);this.zoom=1;const r=Math.min(e/this.grid.width,s/this.grid.height);this.zoomIn(r,{x:t.x+t.width/2,y:t.y+t.height/2,referential:"screen"}),this.x=e>this.grid.width*r?-(t.x+t.width/2-r*this.grid.width/2)/r:-(t.x+u.left)/r,this.y=se.x+u.left,r=t.x+t.widthe.width,a=t.height>e.height,h=t.y+t.heighte.y+u.top,d=t.y+t.height/2-(e.y+e.height/2),c=this.screenDelta2world({dx:n?r&&s?0:s?t.x-e.x-u.right:r?t.x+t.width-(e.x+e.width)+u.left:0:o,dy:a?h&&g?0:g?t.y-e.y-u.top:h?t.y+t.height-(e.y+e.height)+u.bottom:0:d,referential:"screen"});this.x+=c.dx,this.y+=c.dy}}class f{constructor(){l(this,"shaker",O(Date.now()))}observe(){this.shaker.value}trigger(){this.shaker.value=Date.now()}}class Y{constructor(){l(this,"_isPreview",!1);l(this,"observable");this.observable=new f}static create(){return new Y}get isPreview(){return this.observable.observe(),this._isPreview}set isPreview(t){this.observable.trigger(),this._isPreview=t}}const se={name:"If Block",description:"A block of elements that is only rendered depending on a condition",params:[{typeName:"Boolean",argName:"condition",isKwarg:!1,default:null}],defaultEditProps:{condition:!0},thumbname:"IfBlock.svg"},ie={"if-block":se};class Q{constructor(){l(this,"_overridenProps",{});l(this,"_props",null);l(this,"observable",new f);l(this,"setInitialEditProps",t=>{var e;for(const s in t){const r=t[s],{defaultEditProps:o}=(e=ie[r.type])!=null?e:{};o&&this.overrideProps(s,o),B(r)||this.setInitialEditProps(r.slot)}})}static create(){return new Q}get props(){return this.observable.observe(),V.isPreview?this._props:this.editModeOverrideProps(this._props)}overrideProps(t,e){this.observable.trigger(),this._overridenProps[t]=e}getOverridenPropFromWidgetId(t,e){var s,r;return(r=(s=this._overridenProps)==null?void 0:s[t])==null?void 0:r[e]}editModeOverrideProps(t){return t&&Object.keys(t).reduce((e,s)=>(e[s]={...t[s],...this._overridenProps[s]},e),{})}setProps(t){this.observable.trigger(),this._props=t}}const Je=i=>t=>t[i],re=i=>[...new Set(i)];class X{constructor(t){l(this,"_selectedWidgetsIds",[]);l(this,"_selectedSlottableId",null);l(this,"layoutModel",null);l(this,"observable",new f);this.appState=t}static create(t){return new X(t)}setLayoutModel(t){this.layoutModel=t}get selectedWidgetsIds(){return this.observable.observe(),this._selectedWidgetsIds}set selectedWidgetsIds(t){t.length!==0&&this.resetSelection(),this._selectedWidgetsIds=re(t),this.observable.trigger()}get selectedWidgetId(){return this.selectedWidgetsIds[0]}get selectedWidget(){return this.layoutModel&&this.selectedWidgetId?this.layoutModel.getWidget(this.selectedWidgetId):null}get selectedWidgets(){return this.layoutModel?this.selectedWidgetsIds.map(t=>this.layoutModel.getWidget(t)):[]}addWidget(t){this.selectedWidgetsIds=[...this.selectedWidgetsIds,t]}addToSelectedWidgets(t){if(!this.layoutModel)return;const e=this.layoutModel.getWidgetOrSlottable(t);(!B(e)||this.selectedWidget&&!B(this.selectedWidget))&&this.clearWidgetSelection(),this.addWidget(t)}toggleWidgetSelection(t){this.selectedWidgetsIds.includes(t)?this.removeWidget(t):this.addWidget(t)}removeWidget(t){this.selectedWidgetsIds=this.selectedWidgetsIds.filter(e=>e!==t)}clearWidgetSelection(){this.selectedWidgetsIds=[]}selectAll(){!this.layoutModel||(this.selectedWidgetsIds=Object.keys(this.layoutModel.allWidgets))}get selectedSlottableId(){return this.observable.observe(),this._selectedSlottableId}set selectedSlottableId(t){t&&this.resetSelection(),this._selectedSlottableId=t,this.observable.trigger()}get selectedSlottable(){return this.layoutModel&&this.selectedSlottableId?this.layoutModel.getSlottable(this.selectedSlottableId):null}has(t){return this.selectedWidgetsIds.includes(t)}resetSelection(){this.clearWidgetSelection(),this.selectedSlottableId=null}}let H,_,it,V,W,oe;function ne(){_=J.create(),it=K.create(_),V=Y.create(),W=Q.create(),H=Z.create(_,it,W),oe=X.create(V)}ne();function ae(i,t){const e=i[t.type];if(!e){console.warn("no callback for",t.type);return}e.forEach(s=>s(t))}const le=i=>({wasClean:i.wasClean,code:i.code,reason:i.reason}),R=class{constructor(t,e){l(this,"isPreview");l(this,"queryParams");l(this,"ws",null);l(this,"callbacks",{});l(this,"onCloseCallbacks",[]);l(this,"params",{version:"0.2",slot:{}});l(this,"_executionId",null);l(this,"state","IDLE");l(this,"observable",new f);l(this,"runningStartCallbacks",[]);l(this,"messageHandlers",{IDLE:t=>{t.type=="execution-id"&&(this._executionId=t.executionId,this.send({type:"client-start",state:{widgets:Pt(this.dash.layout).reduce((e,s)=>({...e,[s]:{value:null}}),{})},params:this.queryParams}),this.state="READY",this.observable.trigger())},READY:t=>{if(t.type==="program-start-failed"){this.state="ERROR";return}t.type!=="auth:require-info"&&(t.type=="widgets-computed"&&(this.notifyRunningStart(t),this.state="RUNNING"),this.observable.trigger())},RUNNING:()=>{this.observable.trigger()},ERROR:()=>{this.observable.trigger()}});this.dash=e,this.isPreview=t.isPreview,this.queryParams=t.params}static create(t,e){return R._instance&&R._instance.close(),R._instance=new R(t,e),R._instance}get url(){return`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/_socket?dashPath=${this.dash.path}&isPreview=${this.isPreview}`}get executionId(){return this._executionId}get isClosed(){return this.observable.observe(),this.ws?this.ws.readyState!==WebSocket.OPEN:!0}resetState(){this.close()}on(t,e){this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e)}clearWSEvents(){!this.ws||(this.ws.onclose=()=>{},this.ws.onerror=()=>{},this.ws.onmessage=()=>{})}async connect(t,e=1){e>3||(this.params=t!=null?t:this.params,await new Promise(s=>{this.clearWSEvents(),this.ws=new WebSocket(this.url),this.ws.onopen=()=>{this.observable.trigger(),s()},this.ws.onclose=r=>{this.observable.trigger(),this.onCloseCallbacks.forEach(o=>o(le(r)))},this.ws.onmessage=r=>{const o=JSON.parse(r.data);this.messageHandlers[this.state](o),ae(this.callbacks,o)}}).catch(()=>{this.connect(this.params,e+1)}))}onClose(t){this.onCloseCallbacks.push(t)}close(){if(!this.ws){console.warn("no websocket to close");return}this.clearWSEvents(),this.ws.close()}async send(t){if(!this.ws){console.warn("no websocket to send");return}this.isClosed&&await this.connect(this.params),this.ws.send(JSON.stringify(t))}notifyRunningStart(t){this.runningStartCallbacks.forEach(e=>e(t))}onRunningStart(t){this.runningStartCallbacks.push(t)}};let z=R;l(z,"_instance");function he(i,t){const e=Object.entries(i).sort((o,n)=>zt(o[1].position,n[1].position)),s=o=>document.querySelector(`[widget-id='${o}']`);return At(e.map(([o,n])=>[o,n,s(o)?t.height2rows(s(o).offsetHeight)-(n.position.rowEnd-n.position.rowStart):0])).reduce((o,[n,a])=>({...o,[n]:{...a,position:{...a.position,rowEnd:nt[a.type].autoHeight&&s(n)?a.position.rowStart+t.height2rows(s(n).offsetHeight):a.position.rowEnd}}}),{})}const de=(i,t,e)=>t&&!t.condition?{computedElement:{...i,position:{...i.position,row:i.position.row+e,height:0}},updateOffset:0,addOffset:0,slot:{}}:{computedElement:{...i,position:{...i.position,row:i.position.row+e}},updateOffset:i.position.height,addOffset:i.position.row,slot:i.slot},ce={"if-block":de},ge=(i,t,e)=>ue(lt(Object.values(i),{widgets:[],slottables:[]},0,t),e),ue=(i,t)=>({widgets:he(i.widgets.reduce((e,s)=>({...e,[s.id]:s}),{}),t),slottables:i.slottables.reduce((e,s)=>({...e,[s.id]:s}),{})}),pe=(i,t)=>{if(v(i)&&v(t))return t.position.rowStart-i.position.rowStart;if(v(i)&&!v(t))return t.position.row-i.position.rowStart===0?-1:t.position.row-i.position.rowStart;if(!v(i)&&v(t))return t.position.rowStart-i.position.row===0?1:t.position.rowStart-i.position.row;if(!v(i)&&!v(t)){if(t.position.row-i.position.row===0){if(t.position.order===i.position.order)throw new Error("Two slottables with the same order in the same row");return t.position.order-i.position.order}return t.position.row-i.position.row}return 0},lt=(i,t,e,s)=>i.sort(pe).reduce((r,o)=>we(o,e,r,s),t),we=(i,t,e,s)=>v(i)?be(i,t,e):fe(i,t,e,s),be=(i,t,e)=>(e.widgets.push({...i,position:ht(i.position,t)}),e),fe=(i,t,e,s)=>{const{computedElement:r,slot:o,updateOffset:n,addOffset:a}=ce[i.type](i,s[i.id],t),h=ye(e,n);return h.slottables.push(r),lt(Object.values(o),h,t+a,s)},ye=(i,t)=>({widgets:me(i.widgets,t),slottables:ve(i.slottables,t)}),me=(i,t)=>i.map(e=>({...e,position:ht(e.position,t)})),ve=(i,t)=>i.map(e=>({...e,position:{...e.position,row:e.position.row+t}})),ht=(i,t)=>({...i,rowStart:i.rowStart+t,rowEnd:i.rowEnd+t}),x=class{constructor(t,e){l(this,"isPreview");l(this,"_broker",null);l(this,"_variables",null);l(this,"_state",{responses:{},queryParams:{}});l(this,"_stateTimestamp",Date.now());l(this,"authState",{user:null,authenticating:!1});l(this,"_previewRunnerData",null);l(this,"_observables",{runnerData:new f,variables:new f,computedErrors:new f,broker:new f,user:new f,authenticating:new f,isWaitingEventResponse:new f,alerts:new f});l(this,"_computedErrors",{widgets:{},props:{},variables:{}});l(this,"_autocompleteState",{suggestionsFor:null,suggestions:[],shaker:new f});l(this,"programStartFailed",!1);l(this,"programStartFailedMessage","");l(this,"initializeResponses",()=>{Object.keys(this.widgets).forEach(t=>{if(!this.getResponse(t)){const e=new ut(this.getWidgetProps(t));this.setResponse(t,e)}})});l(this,"updateUserCallbacks",[]);l(this,"onWidgetsComputedCallbacks",[]);l(this,"onCloseCallbacks",[]);l(this,"onNoCreditsMessageCallbacks",[]);l(this,"onRedirectCallback",null);l(this,"listeners",[]);l(this,"_isWaitingEventResponse",null);l(this,"_alerts",[]);l(this,"_countAlerts",0);this._dash=t,this.isPreview=e,this.loadClaims()}static create(t,e=!0){return x._instances[t.path]&&x._instances[t.path].destroy(),x._instances[t.path]=new x(t,e),x._instances[t.path]}static delete(t){delete x._instances[t]}destroy(){this._broker&&(this.setProps(null,null),this._broker.close(),x.delete(this.runnerData.path))}updateRunnerData(t){this._observables.runnerData.trigger(),this._previewRunnerData=t}resetState(){this._broker&&(this.setProps(null,null),this._broker.close(),this.initializeBroker(),this.clearSuggestions())}get brokerIsClosed(){var t,e;return(e=(t=this.broker)==null?void 0:t.isClosed)!=null?e:!0}get runnerData(){return this._observables.runnerData.observe(),this._dash}get state(){return this._state}get variables(){return this._observables.variables.observe(),this._variables}updateDashData(t){if(this._observables.runnerData.trigger(),!t)throw new Error("dash is null");if(!t.layout)throw new Error("dash.layout is null");this._dash=t}initializeBroker(t={}){var e;this.setBroker(z.create({isPreview:this.isPreview,params:t},this.runnerData)),this.programStartFailed=!1,this.programStartFailedMessage="",this.broker.connect(this.runnerData.layout),this.broker.on("stdout",s=>{et.log({type:"stdout",log:s.log})}),this.broker.on("stderr",s=>{et.log({type:"stderr",log:s.log})}),this.broker.onClose(s=>{this.programStartFailed||(this.computedErrors=this.makeWidgetsError("Runtime connection closed")),this.closeCallback(s)}),(e=this.broker)==null||e.onRunningStart(s=>{s.variables&&Object.keys(s.variables).forEach(r=>this._state.responses[r].setValue(s.variables[r]))}),this.broker.on("widgets-computed",s=>{this.isWaitingEventResponse===s.stateTimestamp&&setTimeout(()=>{this.isWaitingEventResponse=null},1500),this.widgetsComputedMessage(s),s.errors&&(this.computedErrors=s.errors),s.props&&this.setProps(s.props,s.variables,s.stateTimestamp)}),this.broker.on("not-enough-credits",()=>{this.noCreditsMessage()}),this.broker.on("program-start-failed",s=>{var r,o;this.programStartFailed=!0,this.programStartFailedMessage=(r=s.error)!=null?r:"",this.computedErrors=this.makeWidgetsError((o=s.error)!=null?o:"Program start failed")}),this.broker.on("redirect",s=>{this.redirect(s)}),this.broker.on("auth:require-info",()=>{this.startAuth()}),this.broker.on("auth:valid-jwt",()=>{this.endAuth()}),this.broker.on("auth:invalid-jwt",()=>{console.warn("invalid jwt"),this.badAuth()}),this.broker.on("autocomplete:suggestions",({suggestionsFor:s,suggestions:r})=>{this._autocompleteState.suggestionsFor=s,this._autocompleteState.suggestions=r,this._autocompleteState.shaker.trigger()}),this.resetListeners(),this.broker.on("alert",s=>{this.alerts=[...this.alerts,{message:s.message,severity:s.severity,id:this.countAlerts++}]}),this.broker.on("execute-js:request",async s=>{var r;(r=this.broker)==null||r.send({type:"execute-js:response",value:await Ct(s)})})}get computedErrors(){return this._observables.computedErrors.observe(),this._computedErrors}set computedErrors(t){this._observables.computedErrors.trigger(),this._computedErrors=t}setProps(t,e,s){s&&s!==this._stateTimestamp||(this._observables.variables.trigger(),W.setProps(t))}setBroker(t){this._observables.broker.trigger(),this._broker=t}get broker(){return this._observables.broker.observe(),this._broker}makeWidgetsError(t){return{widgets:Object.keys(this.runnerData.layout.slot).reduce((s,r)=>(s[r]={repr:t},s),{}),props:{},variables:{}}}setResponse(t,e){this._stateTimestamp=Date.now(),this._state.responses[t]=e}getResponse(t){return this._state.responses[t]}get responses(){return this.initializeResponses(),this._state.responses}onUpdateUser(t){this.updateUserCallbacks.push(t)}onWidgetsComputedMessage(t){this.onWidgetsComputedCallbacks.push(t)}widgetsComputedMessage(t){this.onWidgetsComputedCallbacks.forEach(e=>e(t))}onClose(t){this.onCloseCallbacks.push(t)}closeCallback(t){this.onCloseCallbacks.forEach(e=>e(t))}onNoCreditsMessage(t){this.onNoCreditsMessageCallbacks.push(t)}noCreditsMessage(){this.onNoCreditsMessageCallbacks.forEach(t=>t())}onRedirect(t){this.onRedirectCallback=t}redirect(t){!this.onRedirectCallback||this.onRedirectCallback(t)}on(t,e){var s;this.listeners.push({type:t,callback:e}),(s=this.broker)==null||s.on(t,e)}onMany(t,e){t.forEach(s=>this.on(s,e))}resetListeners(){this.listeners.forEach(({type:t,callback:e})=>{var s;(s=this.broker)==null||s.on(t,e)})}get apiPageState(){const t=Object.keys(this.widgets).reduce((e,s)=>{var r,o;return{...e,[s]:{value:(o=(r=this._state.responses[s])==null?void 0:r.value)!=null?o:null}}},{});return{timestamp:this._stateTimestamp,widgets:t}}sendUser(){!this.broker||!this.authState.user||this.broker.send({type:"auth:saved-jwt",jwt:this.authState.user.jwt})}updateUser(t){this.authState.user=t,this.updateUserCallbacks.forEach(e=>e(t)),this.sendUser()}get user(){return this._observables.user.observe(),this.authState.user}startAuth(){this.authState.user?this.sendUser():this.authenticating=!0}endAuth(){this.authenticating=!1}badAuth(){T.removeUser(),this.authState.user=null,this.authenticating=!0}loadClaims(){this._observables.user.observe(),this.authState.user=T.getUser()}logout(){T.removeUser(),this.loadClaims(),this.resetState()}get authenticating(){return this._observables.authenticating.observe(),this.authState.authenticating}set authenticating(t){this.authState.authenticating=t,this._observables.authenticating.trigger()}get suggestionsFor(){return this._autocompleteState.shaker.observe(),this._autocompleteState.suggestionsFor}get suggestions(){return this._autocompleteState.shaker.observe(),this._autocompleteState.suggestions}clearSuggestions(){this._autocompleteState.suggestionsFor=null,this._autocompleteState.suggestions=[],this._autocompleteState.shaker.trigger()}getAutocompleteSuggestions(t,e){var s;!this.isPreview||(t!==this.suggestionsFor&&this.clearSuggestions(),(s=this.broker)==null||s.send({type:"autocomplete:load",suggestionsFor:t,code:e}))}getLayoutWidget(t){return this.widgets[t]}get calculatedPositions(){var t,e,s;return this._observables.runnerData.observe(),ge((e=(t=this._previewRunnerData)==null?void 0:t.layout.slot)!=null?e:this.runnerData.layout.slot,(s=W.props)!=null?s:{},_)}get widgets(){return this.calculatedPositions.widgets}getWidgetPosition(t){return this.widgets[t].position}getWidgetProps(t){var e;return(e=W.props)==null?void 0:e[t]}get props(){return W.props}getWidgetEvents(t){return this.getLayoutWidget(t).events||[]}get navbarVisible(){var r;const{logoUrl:t,brandName:e}=this.runnerData,s=(r=this.user)==null?void 0:r.claims.email;return!!(this.hasSidebar||t||e||s)}get hasSidebar(){const t=this.runnerData.sidebar;return!t||t.length==0?!1:t.some(e=>e.visible)}get widgetsListeners(){return Object.entries(this.widgets).reduce((t,[e,s])=>({...t,[e]:this.listenersFromWidget(e,s.type)}),{})}listenersFromWidget(t,e){return nt[e].events.reduce((s,r)=>({...s,[r.key]:o=>{this.setResponse(t,o),this.widgetInput(t),this.widgetEvent(t,r.key,o)}}),{})}get isWaitingEventResponse(){return this._observables.isWaitingEventResponse.observe(),this._isWaitingEventResponse}set isWaitingEventResponse(t){this._isWaitingEventResponse=t,this._observables.isWaitingEventResponse.trigger()}widgetInput(t){!this.broker||this.broker.send({type:"widget-input",widgetId:t,state:this.apiPageState})}widgetEvent(t,e,s){if(!this.broker)return;const r=this.apiPageState;this.broker.send({type:"widget-event",event:{type:e,payload:s},widgetId:t,state:r}),this.getWidgetEvents(t).includes(e)&&(this.isWaitingEventResponse=r.timestamp)}get alerts(){return this._observables.alerts.observe(),this._alerts}set alerts(t){this._observables.alerts.trigger(),this._alerts=t}get countAlerts(){return this._observables.alerts.observe(),this._countAlerts}set countAlerts(t){this._observables.alerts.trigger(),this._countAlerts=t}};let j=x;l(j,"_instances",{});const xe={},Se=i=>(pt("data-v-5d7ea65b"),i=i(),wt(),i),Ee={class:"dash-loading"},Re=Se(()=>M("div",{class:"dash-loading-container"},[M("div",{class:"loading-bar-background"}),M("div",{class:"loading-bar"})],-1)),_e=[Re];function ke(i,t){return y(),E("div",Ee,_e)}const We=A(xe,[["render",ke],["__scopeId","data-v-5d7ea65b"]]);function G(){return window.matchMedia("(min-width: 1200px)").matches}const Pe={key:0,class:"error-widget"},Ce={key:0},Ie={key:2,class:"loading"},Me=q({__name:"WidgetsGrid",props:{camera:null,isPreview:{type:Boolean},widgetsWithErrors:null,grid:null,widgetsListeners:null,widgetsProps:null,widgetsResponses:null,widgets:null,forceResponsivity:null},setup(i){const t=i,e=P(()=>({...s.value,padding:`${t.grid.margin}px`,gap:`${t.grid.gap}px`,maxWidth:`${t.grid.width}px`,height:`${t.grid.height}px`,gridTemplateColumns:`repeat(${t.grid.columns}, ${t.grid.cellWidth}px)`,gridTemplateRows:`repeat(auto-fill, ${t.grid.cellHeight}px)`})),s=P(()=>{const d=G()?t.grid.sidebarWidth+(r.value-t.grid.sidebarWidth-960)/2:(r.value-960)/2;return{"--dash-right-margin":`${G()?(r.value-t.grid.sidebarWidth-960)/2:(r.value-960)/2}px`,"--dash-left-margin":`${d}px`}}),r=O(window.innerWidth);window.addEventListener("resize",()=>{r.value=window.innerWidth});const o=d=>{const c=d.target;c.scrollHeight>c.clientHeight&&d.stopPropagation()};function n(d){return{gridColumnStart:`${d.position.colStart+1}`,gridColumnEnd:`${d.position.colEnd+2}`,gridRowStart:`${d.position.rowStart+1}`,gridRowEnd:`${d.position.rowEnd+2}`,padding:`${t.grid.padding}px`}}const a=d=>{const c=d.position.rowEnd-d.position.rowStart+1;return c*t.grid.cellHeight+(c-1)*t.grid.gap-2*t.grid.padding},h=d=>{const c=d.position.colEnd-d.position.colStart+1;return c*t.grid.cellWidth+(c-1)*t.grid.gap-2*t.grid.padding},g=d=>{var c,w;return Object.keys((w=(c=t.widgetsProps)==null?void 0:c[d])!=null?w:{}).length>0};return(d,c)=>{const w=bt("icon");return y(),E("div",{class:ot(["dash",i.forceResponsivity]),style:$(C(e))},[(y(!0),E(ft,null,yt(i.widgets,(p,b)=>{var m,S;return y(),E("div",{key:b,class:"widget",style:$(n(p)),onWheel:o},[((m=i.widgetsWithErrors)==null?void 0:m.find(dt=>dt==b))&&i.isPreview?(y(),E("div",Pe,[L(w,{width:"20",height:"20",path:C(Dt),fill:"#D35249"},null,8,["path"]),h(p)>=160&&a(p)>=120?(y(),E("p",Ce," Ops! There is an error in this widget's properties ")):rt("",!0)])):g(b)?(y(),I(xt(p.type),mt({key:1,data:i.widgetsProps[b],response:i.widgetsResponses[b],runtime:"dash","container-width":h(p),"container-height":a(p),zoom:(S=i.camera)==null?void 0:S.zoom,"widget-id":b},vt(i.widgetsListeners[b])),null,16,["data","response","container-width","container-height","zoom","widget-id"])):(y(),E("div",Ie))],36)}),128))],6)}}});const Le=A(Me,[["__scopeId","data-v-d79b1ce4"]]),De=q({__name:"LayoutPresenter",props:{widgets:null,props:null,responses:null,widgetsListeners:null,camera:null,forceResponsivity:null,grid:null,widgetsWithErrors:null,runnerData:null,isPreview:{type:Boolean}},setup(i){const t=St();return(e,s)=>(y(),I(Lt,{class:"dash-player","main-color":i.runnerData.mainColor,"font-family":i.runnerData.fontFamily,theme:i.runnerData.theme,runtime:"dash"},{default:D(()=>[tt(e.$slots,"header",{},void 0,!0),C(t).overrideMain?tt(e.$slots,"overrideMain",{key:1},void 0,!0):(y(),I(Le,{key:0,camera:i.camera,"is-preview":i.isPreview,"widgets-with-errors":i.widgetsWithErrors,grid:i.grid,"widgets-listeners":i.widgetsListeners,"widgets-props":i.props,"widgets-responses":i.responses,widgets:i.widgets,"force-responsivity":i.forceResponsivity},null,8,["camera","is-preview","widgets-with-errors","grid","widgets-listeners","widgets-props","widgets-responses","widgets","force-responsivity"]))]),_:3},8,["main-color","font-family","theme"]))}});const He=A(De,[["__scopeId","data-v-6e933df3"]]),ze=q({__name:"DashPlayer",props:{isPreview:{type:Boolean,required:!0},dashPlayerState:{type:Object,required:!0},forceResponsivity:{type:String,default:null},camera:{type:Object,default:null},widgetsWithErrors:{type:Array,default:()=>[]},editingMode:{type:Boolean,default:!1},params:Object},emits:["navigate","logout"],setup(i,{emit:t}){const e=i,s=O(null),r=O(window.innerWidth);window.addEventListener("resize",()=>{r.value=window.innerWidth});const o=d=>t("navigate",d),n=d=>{e.dashPlayerState.updateUser(d)},a=P(()=>(_.setDashRunnerData(e.dashPlayerState.navbarVisible,e.dashPlayerState.hasSidebar),_.setDashPlayerState(e.dashPlayerState),_)),h=P(()=>{const d=G()?a.value.sidebarWidth+(r.value-a.value.sidebarWidth-960)/2:(r.value-960)/2;return{"--dash-right-margin":`${G()?(r.value-a.value.sidebarWidth-960)/2:(r.value-960)/2}px`,"--dash-left-margin":`${d}px`}}),g=P(()=>({...h.value,padding:`${a.value.margin}px`,width:`${a.value.width}px`,gap:`${a.value.gap}px`,height:"100%",boxSizing:"border-box"}));return e.dashPlayerState.initializeBroker(e.params),e.dashPlayerState.onNoCreditsMessage(()=>{var d;(d=s.value)==null||d.open()}),Et(()=>{if(e.dashPlayerState.initializeResponses(),Object.keys(e.dashPlayerState.widgets).some(d=>d===""))throw new Error("This dash has an outdated layout. Please contact support it.")}),Rt(()=>e.dashPlayerState.widgets,(d,c)=>{Wt.exports.isEqual(d,c)||e.dashPlayerState.initializeResponses()}),(d,c)=>(y(),I(He,{widgets:i.dashPlayerState.widgets,props:i.dashPlayerState.props,responses:i.dashPlayerState.responses,"widgets-listeners":i.dashPlayerState.widgetsListeners,camera:i.camera,"force-responsivity":i.forceResponsivity,grid:C(a),"widgets-with-errors":i.widgetsWithErrors,"runner-data":i.dashPlayerState.runnerData,"is-preview":i.isPreview},_t({header:D(()=>{var w;return[L(It,{ref_key:"runtimeCommonsRef",ref:s,type:"dashes",runtime:i.dashPlayerState.runnerData,"full-width":!0,"is-preview":i.isPreview,"user-email":(w=i.dashPlayerState.user)==null?void 0:w.claims.email,"force-responsivity":i.forceResponsivity,alerts:i.dashPlayerState.alerts,onNavigate:o,onLogout:c[0]||(c[0]=p=>i.dashPlayerState.logout())},null,8,["runtime","is-preview","user-email","force-responsivity","alerts"]),L(kt,null,{default:D(()=>[i.dashPlayerState.isWaitingEventResponse?(y(),I(We,{key:0})):rt("",!0)]),_:1})]}),_:2},[i.dashPlayerState.authenticating?{name:"overrideMain",fn:D(()=>[M("div",{class:ot(["auth-form",i.forceResponsivity]),style:$(C(g))},[L(Mt,{class:"form-auth",onDone:n})],6)]),key:"0"}:void 0]),1032,["widgets","props","responses","widgets-listeners","camera","force-responsivity","grid","widgets-with-errors","runner-data","is-preview"]))}});const Ke=A(ze,[["__scopeId","data-v-cb3cd3cb"]]);export{N as C,Ke as D,Ve as a,V as b,oe as c,W as d,ne as e,it as f,Ze as g,ge as h,qe as i,Fe as j,Nt as k,_ as l,H as m,j as n,Je as p,Gt as r,ie as s,zt as v,k as w}; +//# sourceMappingURL=DashPlayer.1858f538.js.map diff --git a/abstra_statics/dist/assets/DashPreview.0e05b2a9.js b/abstra_statics/dist/assets/DashPreview.0e05b2a9.js new file mode 100644 index 0000000000..d64b04edc9 --- /dev/null +++ b/abstra_statics/dist/assets/DashPreview.0e05b2a9.js @@ -0,0 +1,2 @@ +import{d as v,K as D,b as u,c as g,z as t,t as p,D as c,F as w,J as k,H as b,q as I}from"./registerWidgets.68572380.js";import{D as P,n as q}from"./DashPlayer.1858f538.js";import{L as x}from"./CircularLoading.30fd4d73.js";import{r as B}from"./index.23f9da39.js";import{B as R}from"./BackButton.b8e69812.js";import{a as l}from"./asyncComputed.896b7bde.js";import{D as C}from"./dashes.d2191afe.js";import{W as F}from"./workspaces.6e8c216b.js";import"./passwordlessManager.8fb0aebd.js";import"./runnerData.09d29411.js";import"./executeJs.00514c74.js";import"./PlayerNavbar.b0c1c386.js";import"./icons.3acf9dc1.js";import"./WidgetsFrame.b4601d67.js";import"./colors.5f5bc2fa.js";import"./Modal.dacb9a40.js";import"./log.13038e9d.js";import"./Passwordless.6c7a116b.js";import"./lottie.e503152f.js";import"./activeRecord.15082700.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="80fc90d7-768e-4768-bd33-135fc5c66758",s._sentryDebugIdIdentifier="sentry-dbid-80fc90d7-768e-4768-bd33-135fc5c66758")}catch{}})();const E=v({__name:"DashPreview",setup(s){const r=k(),o=b(),m=({id:e,type:n})=>{n==="dash"?(o.push({name:"dashPreview",params:{dashId:e},query:r.query}),h()):o.push({name:"form-preview",params:{formId:e},query:r.query})},f=()=>{var e;!((e=a.value)!=null&&e.path)||o.push(`/_editor/dash/${encodeURIComponent(a.value.path)}`)},{loading:y,result:a,refetch:h}=l(()=>C.get(r.params.dashPath)),{result:d}=l(()=>F.get()),i=D(()=>{if(!a.value||!d.value||!a.value.makeRunnerData(d.value))return null;const e=q.create(a.value.makeRunnerData(d.value),!1);return e.onRedirect(({url:n,queryParams:_})=>B(o,n,_)),e});return(e,n)=>(u(),g(w,null,[t(y)||!t(a)?(u(),p(x,{key:0,class:"loading",justify:"center"})):c("",!0),t(i)?(u(),p(P,{key:1,class:"player",dash:t(i).runnerData,"is-preview":!0,params:t(r).query,"dash-player-state":t(i),onNavigate:m},null,8,["dash","params","dash-player-state"])):c("",!0),t(a)?(u(),p(R,{key:2,onExitFullscreenPreview:f})):c("",!0)],64))}});const Z=I(E,[["__scopeId","data-v-dde58483"]]);export{Z as default}; +//# sourceMappingURL=DashPreview.0e05b2a9.js.map diff --git a/abstra_statics/dist/assets/Dashes.23317a13.js b/abstra_statics/dist/assets/Dashes.23317a13.js new file mode 100644 index 0000000000..3a8705441d --- /dev/null +++ b/abstra_statics/dist/assets/Dashes.23317a13.js @@ -0,0 +1,2 @@ +import{d as b,K as y,b as D,t as w,z as l,H as g}from"./registerWidgets.68572380.js";import{f as _,g as k,h as C}from"./icons.3acf9dc1.js";import{a as I}from"./asyncComputed.896b7bde.js";import{D as p}from"./dashes.d2191afe.js";import{R as x}from"./RuntimeList.4dae376a.js";import"./activeRecord.15082700.js";import"./runnerData.09d29411.js";import"./DropdownMenu.06bbb53d.js";import"./CircularLoading.30fd4d73.js";import"./lottie.e503152f.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="55db069c-05b7-4a8e-ba46-f71417e21802",o._sentryDebugIdIdentifier="sentry-dbid-55db069c-05b7-4a8e-ba46-f71417e21802")}catch{}})();const z=b({__name:"Dashes",setup(o){const s=g(),{loading:r,result:n,refetch:c}=I(()=>p.list()),d=({key:e})=>s.push({path:`/_editor/dash/${encodeURIComponent(e)}`}),u=async({key:e})=>{var a,t;await((t=(a=n.value)==null?void 0:a.find(i=>i.path===e))==null?void 0:t.duplicate()),c()},h=async()=>{const e=await p.create();d({key:e.path})},m=async({key:e})=>{var a,t;confirm("Are you sure you want to delete this dash?")&&(await((t=(a=n.value)==null?void 0:a.find(i=>i.path===e))==null?void 0:t.delete()),c())},f=y(()=>{var e,a;return{columns:[{name:"Dash Name"},{name:"Path"},{name:"Dash Actions"}],rows:(a=(e=n.value)==null?void 0:e.map(t=>({key:t.path,cells:[{text:t.title,classes:["title","centered"],link:`/_editor/dash/${encodeURIComponent(t.path)}`},{text:t.path},{text:"",classes:["centered"],actions:[{icon:_,label:"Delete",onClick:m,dangerous:!0},{icon:k,label:"Edit Dash",onClick:d},{icon:C,label:"Duplicate",onClick:u}]}]})))!=null?a:[]}});return(e,a)=>(D(),w(x,{loading:l(r),title:"Python Dashes",description:"Create a dashboard page with charts and inputs interacting with your python code.","create-button-text":"Create Dash","empty-title":"No dashes here yet","video-url":"https://www.youtube.com/embed/oYMptrk7QNE",table:l(f),onCreate:h},null,8,["loading","table"]))}});export{z as default}; +//# sourceMappingURL=Dashes.23317a13.js.map diff --git a/abstra_statics/dist/assets/DocsButton.a49e24b4.js b/abstra_statics/dist/assets/DocsButton.a49e24b4.js new file mode 100644 index 0000000000..806575643e --- /dev/null +++ b/abstra_statics/dist/assets/DocsButton.a49e24b4.js @@ -0,0 +1,2 @@ +import{d as o,b as c,c as f,q as _}from"./registerWidgets.68572380.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f5ef1710-2193-412f-82eb-48c6f0134232",e._sentryDebugIdIdentifier="sentry-dbid-f5ef1710-2193-412f-82eb-48c6f0134232")}catch{}})();const a=["href"],r=o({__name:"DocsButton",props:{path:null},setup(e){return(t,n)=>{var s;return c(),f("a",{class:"docs-button",href:`https://docs.abstra.io/${(s=e.path)!=null?s:""}`,target:"_blank"}," Docs ",8,a)}}});const u=_(r,[["__scopeId","data-v-9fec5678"]]);export{u as D}; +//# sourceMappingURL=DocsButton.a49e24b4.js.map diff --git a/abstra_statics/dist/assets/DropdownMenu.06bbb53d.js b/abstra_statics/dist/assets/DropdownMenu.06bbb53d.js new file mode 100644 index 0000000000..26c7665393 --- /dev/null +++ b/abstra_statics/dist/assets/DropdownMenu.06bbb53d.js @@ -0,0 +1,2 @@ +import{d as h,K as m,b as n,c as o,A as w,z as c,q as g,B as k,G as y,v as C,e as d,w as x,N as u,D as p,t as b,I as _,F as B,L as D,x as f}from"./registerWidgets.68572380.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="541908bd-9c93-4e6d-bf8e-c823e1ddb000",e._sentryDebugIdIdentifier="sentry-dbid-541908bd-9c93-4e6d-bf8e-c823e1ddb000")}catch{}})();const j="/assets/empty-box.758770e4.svg",I=h({__name:"Triangle",props:{color:{type:String,required:!1}},setup(e){const t=e,s=m(()=>t.color?{borderColor:`${t.color} transparent transparent transparent`}:{});return(l,i)=>(n(),o("div",{class:"triangle",style:w(c(s))},null,4))}});const S=g(I,[["__scopeId","data-v-7ca41e33"]]),q=h({__name:"BoxShadowButton",props:{active:{type:Boolean}},setup(e){return(t,s)=>(n(),o("button",{class:y(["box-shadow-button",{active:e.active}])},[k(t.$slots,"default",{},void 0,!0)],2))}});const $=g(q,[["__scopeId","data-v-04d82775"]]),L={class:"dropdown-menu"},N={key:0},z={key:0,class:"options"},A=["onClick"],M={key:0,class:"line"},O=h({__name:"DropdownMenu",props:{title:{type:String,required:!1},options:{type:Array,required:!0},highlightLast:{type:Boolean,required:!1,default:!1},selectIcon:{type:Object,required:!1},payload:{required:!1,default:()=>({}),type:Object}},setup(e){const t=e,s=C({open:!1}),l=m(()=>t.options[t.options.length-1]),i=async v=>{await v(t.payload),s.open=!1};return(v,r)=>(n(),o("div",L,[d($,{class:"title",active:s.open,onClick:r[0]||(r[0]=a=>s.open=!s.open)},{default:x(()=>[e.title?(n(),o("span",N,u(e.title),1)):p("",!0),e.selectIcon?(n(),b(_,{key:1,class:"select-icon",width:"18",height:"18",path:e.selectIcon,fill:"#6D7C93"},null,8,["path"])):(n(),b(S,{key:2,class:"icon",color:"#414a58"}))]),_:1},8,["active"]),s.open?(n(),o("div",z,[(n(!0),o(B,null,D(e.options.slice(0,-1),a=>(n(),o("div",{key:a.label,class:y(["option",{dangerous:!!a.dangerous}]),onClick:T=>i(a.onClick)},[d(_,{class:"option-icon",width:"14",height:"14",path:a.icon,fill:"#6D7C93"},null,8,["path"]),f("span",null,u(a.label),1)],10,A))),128)),e.highlightLast?(n(),o("div",M)):p("",!0),f("div",{class:y(["option",{dangerous:!!c(l).dangerous}]),onClick:r[1]||(r[1]=a=>i(c(l).onClick))},[d(_,{class:"option-icon",width:"14",height:"14",path:c(l).icon,fill:"#6D7C93"},null,8,["path"]),f("span",null,u(c(l).label),1)],2)])):p("",!0)]))}});const E=g(O,[["__scopeId","data-v-c4232f59"]]);export{E as D,j as _}; +//# sourceMappingURL=DropdownMenu.06bbb53d.js.map diff --git a/abstra_statics/dist/assets/EnvVars.4d26947a.js b/abstra_statics/dist/assets/EnvVars.4d26947a.js new file mode 100644 index 0000000000..17f627321d --- /dev/null +++ b/abstra_statics/dist/assets/EnvVars.4d26947a.js @@ -0,0 +1,2 @@ +var b=Object.defineProperty;var w=(a,e,t)=>e in a?b(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var u=(a,e,t)=>(w(a,typeof e!="symbol"?e+"":e,t),t);import{d as g,K as v,b as k,t as $,z as p,J as C}from"./registerWidgets.68572380.js";import{a as I}from"./asyncComputed.896b7bde.js";import{C as l}from"./gateway.7cd64c5e.js";import{A as _}from"./activeRecord.15082700.js";import"./index.5601bb74.js";import{C as j}from"./CrudView.22ff1852.js";import{t as A}from"./icons.3acf9dc1.js";import"./passwordlessManager.8fb0aebd.js";import"./DropdownMenu.06bbb53d.js";import"./Modal.dacb9a40.js";import"./LoadingIndicator.5fb5b875.js";import"./lottie.e503152f.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="a3284ce6-9563-4cf3-a5db-88b5554ab248",a._sentryDebugIdIdentifier="sentry-dbid-a3284ce6-9563-4cf3-a5db-88b5554ab248")}catch{}})();class P{constructor(){u(this,"urlPath","env-vars")}async create(e){return l.post(`projects/${e.projectId}/${this.urlPath}`,{name:e.name,value:e.value})}async delete(e,t){await l.delete(`projects/${e}/${this.urlPath}/${t}`)}async list(e){return l.get(`projects/${e}/${this.urlPath}`)}async get(e){return l.get(`${this.urlPath}/${e}`)}async update(e,t){return l.patch(`${this.urlPath}/${e}`,t)}}const n=new P;class s{constructor(e,t){u(this,"record");this.projectId=e,this.record=new _(n,t,"id")}static async list(e){return(await n.list(e)).map(r=>new s(e,r))}static async create(e,t,r){const o=await n.create({projectId:e,name:t,value:r});return new s(e,o)}static async get(e,t){const r=await n.get(t);return new s(e,r)}static async update(e,t,r){const o=await n.update(t,r);return new s(e,o)}get key(){return this.record.get("name")}get value(){return this.record.get("value")}set value(e){this.record.set("value",e)}async save(){await this.record.save()}async delete(){await n.delete(this.projectId,this.key)}hasChanges(){return this.record.hasChanges()}}const F=g({__name:"EnvVars",setup(a){const t=C().params.projectId,{loading:r,result:o,refetch:m}=I(()=>s.list(t)),y=[{label:"Variable name",key:"key"},{label:"Variable value",key:"value",type:"password"}];async function f({key:c,value:i}){await s.create(t,c,i),m()}const h=v(()=>{var c,i;return{columns:[{name:"Key"},{name:"Actions"}],rows:(i=(c=o.value)==null?void 0:c.map(d=>({key:d.key,cells:[{text:d.key,classes:["title","centered"]},{text:"Actions",classes:["centered"],actions:[{icon:A,label:"Delete",async onClick(){await d.delete(),m()},dangerous:!0}]}]})))!=null?i:[]}});return(c,i)=>(k(),$(j,{"entity-name":"env-vars",loading:p(r),title:"Environment Variables",description:"Set environment variables for your project.","empty-title":"No environment variables set",table:p(h),"create-button-text":"Add Environment Variable",fields:p(y),onCreate:f},null,8,["loading","table","fields"]))}});export{F as default}; +//# sourceMappingURL=EnvVars.4d26947a.js.map diff --git a/abstra_statics/dist/assets/Error.d9528cf5.js b/abstra_statics/dist/assets/Error.d9528cf5.js new file mode 100644 index 0000000000..736c3af703 --- /dev/null +++ b/abstra_statics/dist/assets/Error.d9528cf5.js @@ -0,0 +1,2 @@ +import{d as c,K as i,b as l,c as _,x as r,N as s,z as p,O as u,Q as f,q as y}from"./registerWidgets.68572380.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="be34e6c0-4af2-437d-9e02-907e5909c500",e._sentryDebugIdIdentifier="sentry-dbid-be34e6c0-4af2-437d-9e02-907e5909c500")}catch{}})();const a=e=>(u("data-v-d3846761"),e=e(),f(),e),b={class:"error"},h=a(()=>r("h1",{class:"error-header"},"Error",-1)),g={class:"error-body"},m={class:"error-message"},v={class:"error-details"},I=a(()=>r("span",null,"Reload",-1)),E=[I],w=c({__name:"Error",props:{error:{type:Object,required:!0},repeated:{type:Boolean,required:!1}},emits:["reload"],setup(e,{emit:o}){const t=e,d=i(()=>t.repeated?"Ooops. The same error occured, please try again later.":"An error occurred while loading.");function n(){o("reload")}return(x,D)=>(l(),_("div",b,[h,r("div",g,[r("div",m,[r("p",null,s(p(d)),1),r("p",v,s(e.error.name)+": "+s(e.error.message),1)]),r("div",{class:"error-actions"},[r("button",{class:"btn btn-primary",onClick:n},E)])])]))}});const B=y(w,[["__scopeId","data-v-d3846761"]]);export{B as E}; +//# sourceMappingURL=Error.d9528cf5.js.map diff --git a/abstra_statics/dist/assets/FormEditor.52758ec5.js b/abstra_statics/dist/assets/FormEditor.52758ec5.js new file mode 100644 index 0000000000..fe3c9e17a0 --- /dev/null +++ b/abstra_statics/dist/assets/FormEditor.52758ec5.js @@ -0,0 +1,2 @@ +import{d as P,r as w,v as T,b as c,c as d,x as r,F as S,L as C,N as F,V as K,a1 as R,e as s,O as H,Q as W,q as L,K as A,z as a,t as k,w as f,D as U,H as z,J as G}from"./registerWidgets.68572380.js";import{L as J}from"./CircularLoading.30fd4d73.js";import{E as O}from"./Error.d9528cf5.js";import{R as Q,F as j}from"./broker.8e45271f.js";import{R as X,_ as Y,S as Z}from"./UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.a71462fc.js";import{T as ee,a as B}from"./Tab.d7b23f26.js";import{l as D}from"./log.13038e9d.js";import{a as I}from"./asyncComputed.896b7bde.js";import{F as te}from"./forms.72f0b1a5.js";import{W as ae}from"./workspaces.6e8c216b.js";import{B as re}from"./BackButton.9eaf8cad.js";import{S as oe}from"./SaveButton.f5cf0ed0.js";import{D as se}from"./DocsButton.a49e24b4.js";import{P as le}from"./PreviewButton.19201cd8.js";import"./lottie.e503152f.js";import"./passwordlessManager.8fb0aebd.js";import"./icons.3acf9dc1.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.fb00ed8b.js";import"./Passwordless.6c7a116b.js";import"./executeJs.00514c74.js";import"./PlayerNavbar.b0c1c386.js";import"./index.23f9da39.js";import"./WidgetsFrame.b4601d67.js";import"./colors.5f5bc2fa.js";import"./Modal.dacb9a40.js";import"./dashes.d2191afe.js";import"./activeRecord.15082700.js";import"./runnerData.09d29411.js";import"./hooks.37ea1bed.js";import"./jobs.6823016f.js";import"./login.0baccba7.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},m=new Error().stack;m&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[m]="f31352bc-61cc-4d09-bafd-23e2661ef4fa",o._sentryDebugIdIdentifier="sentry-dbid-f31352bc-61cc-4d09-bafd-23e2661ef4fa")}catch{}})();const ne="forms_workspace_id_path_key",M=o=>(H("data-v-6ccbe7b5"),o=o(),W(),o),ie={class:"form-settings"},ce={class:"content"},ue={class:"subsection-label"},me={class:"property-label"},de=["value","placeholder","onChange"],pe={class:"content"},fe={class:"property"},_e=M(()=>r("div",{class:"property-label"},"Start smart form automatically",-1)),ve={class:"property"},be=M(()=>r("div",{class:"property-label"}," Allow the user to restart the smart form after it is over ",-1)),he=P({__name:"FormSettings",props:{form:null},setup(o){const t=w(o.form),_=[{label:"General",props:[{label:"Form name",valueKey:"title"}]},{label:"Welcome Screen",props:[{label:"Title",fallbackKey:"title",valueKey:"welcomeTitle"},{label:"Subtitle",valueKey:"startMessage"},{label:"Start button text",valueKey:"startButtonText"}]},{label:"Ending Screen",props:[{label:"Title",valueKey:"endMessage"},{label:"Restart button text",valueKey:"restartButtonText"}]},{label:"Alert Messages",props:[{label:"Error message",valueKey:"errorMessage"}]}],v=T({pathError:null,sectionsShown:[!0,!1,!1]}),h=p=>{p.detail.includes(ne)&&(v.pathError=l)},l="This path is already being used by another form or dash on your workspace";return addEventListener("hasura-error",h),(p,u)=>(c(),d("div",ie,[r("div",ce,[(c(),d(S,null,C(_,n=>r("div",{key:n.label,class:"subsection"},[r("div",ue,F(n.label),1),(c(!0),d(S,null,C(n.props,i=>{var b;return c(),d("div",{key:i.label,class:"property column"},[r("div",me,F(i.label),1),r("input",{class:"property-input",type:"text",value:t.value[i.valueKey],placeholder:(b=i.fallbackKey?t.value[i.fallbackKey]:null)!=null?b:"Enter message",onChange:y=>t.value[i.valueKey]=y.target.value},null,40,de)])}),128))])),64))]),r("div",pe,[r("div",fe,[K(r("input",{"onUpdate:modelValue":u[0]||(u[0]=n=>t.value.autoStart=n),class:"checkbox-input",type:"checkbox"},null,512),[[R,t.value.autoStart]]),_e]),r("div",ve,[K(r("input",{"onUpdate:modelValue":u[1]||(u[1]=n=>t.value.allowRestart=n),class:"checkbox-input",type:"checkbox"},null,512),[[R,t.value.allowRestart]]),be])]),s(X,{runtime:t.value},null,8,["runtime"])]))}});const ye=L(he,[["__scopeId","data-v-6ccbe7b5"]]),ge={class:"page"},ke={key:1,class:"error"},we=P({__name:"FormEditor",setup(o){const m=z(),t=G(),_=T({fullscreen:!1,rightPanelCollapsed:!1,hasChanges:!1,started:!1});addEventListener("keydown",e=>{(e.ctrlKey||e.metaKey)&&e.key==="s"&&(e.preventDefault(),b())});const v=w(null),{loading:h,result:l,error:p,refetch:u}=I(async()=>{const e=await te.get(t.params.formPath);return g(),e}),{result:n}=I(()=>ae.get()),i=w(!1);async function b(){var e;i.value=!0;try{await((e=l.value)==null?void 0:e.save())}finally{i.value=!1}}const y=A(()=>Q.create({isLocal:!1,formPath:t.params.formPath,isPreview:!0})),q=()=>{D.clear()},g=async()=>{var e;return D.log({type:"restart"}),(e=v.value)==null?void 0:e.run()},V=({path:e,type:x})=>{x==="dash"?m.push({name:"dashEditor",params:{dashPath:e},query:t.query}):(m.push({name:"editor",params:{formPath:e},query:t.query}),u())},N=()=>{_.started=!0},$=()=>{_.started=!1};return(e,x)=>{var E;return c(),d(S,null,[r("div",ge,[a(h)||!a(l)||!a(n)?(c(),k(J,{key:0})):a(p)?(c(),d("div",ke,[s(O,{error:a(p),onReload:a(u)},null,8,["error","onReload"])])):(c(),k(ee,{key:2},{left:f(()=>[s(re,{link:"/_editor/forms"})]),right:f(()=>[s(se),s(le,{model:a(l)},null,8,["model"]),s(oe,{model:a(l)},null,8,["model"])]),default:f(()=>[s(B,{title:"Preview"},{default:f(()=>[s(j,{ref_key:"runner",ref:v,form:a(l).makeRunnerData(a(n)),params:a(t).query,"is-preview":!0,"enable-auto-focus":!1,broker:a(y),style:{height:"unset",flex:1,overflow:"hidden"},onNavigate:V,onLogout:g,onExit:$,onStart:N},null,8,["form","params","broker"])]),_:1}),s(B,{title:"Settings"},{default:f(()=>[s(ye,{form:a(l)},null,8,["form"])]),_:1})]),_:1})),a(l)?(c(),k(Z,{key:3,runtime:"forms",onRestart:g,onClearTerminal:q})):U("",!0)]),s(Y,{"has-changes":(E=a(l))==null?void 0:E.hasChanges()},null,8,["has-changes"])],64)}}});const et=L(we,[["__scopeId","data-v-b68827d7"]]);export{et as default}; +//# sourceMappingURL=FormEditor.52758ec5.js.map diff --git a/abstra_statics/dist/assets/FormPreview.c5552641.js b/abstra_statics/dist/assets/FormPreview.c5552641.js new file mode 100644 index 0000000000..1d73186f2a --- /dev/null +++ b/abstra_statics/dist/assets/FormPreview.c5552641.js @@ -0,0 +1,2 @@ +import{d as P,v as x,r as F,K as R,b as n,c as i,z as e,t as B,e as d,x as I,H as q,J as E,q as D}from"./registerWidgets.68572380.js";import{L}from"./CircularLoading.30fd4d73.js";import{E as C}from"./Error.d9528cf5.js";import{F as N,R as H}from"./broker.8e45271f.js";import{B as M}from"./BackButton.b8e69812.js";import{a as _}from"./asyncComputed.896b7bde.js";import{F as V}from"./forms.72f0b1a5.js";import{W}from"./workspaces.6e8c216b.js";import"./lottie.e503152f.js";import"./passwordlessManager.8fb0aebd.js";import"./icons.3acf9dc1.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.fb00ed8b.js";import"./Passwordless.6c7a116b.js";import"./executeJs.00514c74.js";import"./PlayerNavbar.b0c1c386.js";import"./index.23f9da39.js";import"./WidgetsFrame.b4601d67.js";import"./colors.5f5bc2fa.js";import"./Modal.dacb9a40.js";import"./log.13038e9d.js";import"./activeRecord.15082700.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="f13ef0ea-17c9-4003-980b-ed16d992d5b8",s._sentryDebugIdIdentifier="sentry-dbid-f13ef0ea-17c9-4003-980b-ed16d992d5b8")}catch{}})();const z={class:"page"},J={key:1,class:"error"},K={key:2,style:{width:"100%",height:"100%",display:"flex"}},S={style:{width:"100%",height:"100%",display:"flex"}},U=P({__name:"FormPreview",setup(s){const t=q(),r=E(),a=x({started:!1}),m=F(null),{loading:h,result:c,error:u,refetch:f}=_(()=>V.get(r.params.formPath)),{result:p}=_(()=>W.get()),y=R(()=>H.create({isLocal:!1,formPath:r.params.formPath,isPreview:!0})),v=async()=>{var o;if(!a.started){(o=m.value)==null||o.run();return}a.started=!1},b=({path:o,type:l})=>{l==="dash"?t.push({name:"dashPreview",params:{dashPath:o},query:r.query}):(t.push({name:"form-preview",params:{formPath:o},query:r.query}),f())},g=()=>{t.push(`/_editor/form/${encodeURIComponent(r.params.formPath)}`)},w=()=>{a.started=!0},k=()=>{a.started=!1};return(o,l)=>(n(),i("div",z,[e(h)||!e(c)||!e(p)?(n(),B(L,{key:0})):e(u)?(n(),i("div",J,[d(C,{error:e(u),onReload:e(f)},null,8,["error","onReload"])])):(n(),i("main",K,[I("div",S,[d(N,{ref_key:"runner",ref:m,form:e(c).makeRunnerData(e(p)),params:e(r).query,"is-preview":!0,"enable-auto-focus":!0,broker:e(y),style:{height:"unset",flex:1,overflow:"hidden"},onNavigate:b,onLogout:v,onExit:k,onStart:w},null,8,["form","params","broker"]),d(M,{onExitFullscreenPreview:g})])]))]))}});const ue=D(U,[["__scopeId","data-v-f7c2ba13"]]);export{ue as default}; +//# sourceMappingURL=FormPreview.c5552641.js.map diff --git a/abstra_statics/dist/assets/Forms.192325c4.js b/abstra_statics/dist/assets/Forms.192325c4.js new file mode 100644 index 0000000000..7e8b16d4c0 --- /dev/null +++ b/abstra_statics/dist/assets/Forms.192325c4.js @@ -0,0 +1,2 @@ +import{d as b,K as h,b as g,t as w,z as d,H as _}from"./registerWidgets.68572380.js";import{f as F,g as C,h as k}from"./icons.3acf9dc1.js";import{a as D}from"./asyncComputed.896b7bde.js";import{F as m}from"./forms.72f0b1a5.js";import{R as I}from"./RuntimeList.4dae376a.js";import"./activeRecord.15082700.js";import"./DropdownMenu.06bbb53d.js";import"./CircularLoading.30fd4d73.js";import"./lottie.e503152f.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="533a834f-a982-432a-8a5a-805ed0f6142b",a._sentryDebugIdIdentifier="sentry-dbid-533a834f-a982-432a-8a5a-805ed0f6142b")}catch{}})();const $=b({__name:"Forms",setup(a){const n=_(),{loading:i,result:r,refetch:c}=D(()=>m.list()),l=({key:e})=>n.push({path:`/_editor/form/${encodeURIComponent(e)}`}),u=async({key:e})=>{var o,t;await((t=(o=r.value)==null?void 0:o.find(s=>s.path===e))==null?void 0:t.duplicate()),c()},p=async()=>{const e=await m.create();l({key:e.path})},f=async({key:e})=>{var o,t;confirm("Are you sure you want to delete this form?")&&(await((t=(o=r.value)==null?void 0:o.find(s=>s.path===e))==null?void 0:t.delete()),c())},y=h(()=>{var e,o;return{columns:[{name:"Form Name"},{name:"Path"},{name:"Form Actions"}],rows:(o=(e=r.value)==null?void 0:e.map(t=>({key:t.path,cells:[{text:t.title,classes:["title","centered"],link:`/_editor/form/${encodeURIComponent(t.path)}`},{text:t.path},{text:"",classes:["centered"],actions:[{icon:F,label:"Delete",onClick:f,dangerous:!0},{icon:C,label:"Edit Form",onClick:l},{icon:k,label:"Duplicate",onClick:u}]}]})))!=null?o:[]}});return(e,o)=>(g(),w(I,{loading:d(i),title:"Dynamic Python forms",description:"Create forms with advanced logic, easy integrations and custom branding.","create-button-text":"Create Form","empty-title":"No forms here yet","video-url":"https://www.youtube.com/embed/tN7SRGmVPwc",table:d(y),onCreate:p},null,8,["loading","table"]))}});export{$ as default}; +//# sourceMappingURL=Forms.192325c4.js.map diff --git a/abstra_statics/dist/assets/Home.a461dd95.js b/abstra_statics/dist/assets/Home.a461dd95.js new file mode 100644 index 0000000000..af69265c3e --- /dev/null +++ b/abstra_statics/dist/assets/Home.a461dd95.js @@ -0,0 +1,2 @@ +import{M as r}from"./Modal.dacb9a40.js";import{d as a,v as c,r as d,b as _,c as f,e as n,w as l,F as i,a as m,x as u,q as p}from"./registerWidgets.68572380.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="658f3e62-6d9e-403c-a58c-ab5ff83ed833",e._sentryDebugIdIdentifier="sentry-dbid-658f3e62-6d9e-403c-a58c-ab5ff83ed833")}catch{}})();const b=["src"],y=a({__name:"Home",setup(e){const o=c({onboardingForm:""}),t=d(null);return(g,v)=>{const s=m("router-view");return _(),f(i,null,[n(s,{class:"router"}),n(r,{ref_key:"modal",ref:t},{content:l(()=>[u("iframe",{class:"form",src:o.onboardingForm},null,8,b)]),_:1},512)],64)}}});const I=p(y,[["__scopeId","data-v-8c8bc27e"]]);export{I as default}; +//# sourceMappingURL=Home.a461dd95.js.map diff --git a/abstra_statics/dist/assets/HookEditor.b2cb625a.js b/abstra_statics/dist/assets/HookEditor.b2cb625a.js new file mode 100644 index 0000000000..92985ce0df --- /dev/null +++ b/abstra_statics/dist/assets/HookEditor.b2cb625a.js @@ -0,0 +1,2 @@ +import{d as w,b as o,c as a,e as n,q as C,r as $,S as k,N as f,x as t,F as x,L as H,v as E,a as R,t as V,z as d,V as g,Y as T,a1 as U,D as B,O as q,Q as O,w as y,J}from"./registerWidgets.68572380.js";import{T as N,a as D}from"./Tab.d7b23f26.js";import{L as P}from"./CircularLoading.30fd4d73.js";import{R as A,_ as G,S as M}from"./UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.a71462fc.js";import{a as L}from"./asyncComputed.896b7bde.js";import{H as Q}from"./hooks.37ea1bed.js";import{B as F}from"./BackButton.9eaf8cad.js";import{C as j,D as z,f as Y}from"./icons.3acf9dc1.js";import{l as I}from"./log.13038e9d.js";import{S as K}from"./SaveButton.f5cf0ed0.js";import{D as W}from"./DocsButton.a49e24b4.js";import"./lottie.e503152f.js";import"./forms.72f0b1a5.js";import"./activeRecord.15082700.js";import"./dashes.d2191afe.js";import"./runnerData.09d29411.js";import"./jobs.6823016f.js";import"./workspaces.6e8c216b.js";import"./login.0baccba7.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="29cb364c-464f-40e2-a2c9-2e6f981ae055",s._sentryDebugIdIdentifier="sentry-dbid-29cb364c-464f-40e2-a2c9-2e6f981ae055")}catch{}})();const X={class:"hook-settings"},Z=w({__name:"HookSettings",props:{hook:null},setup(s){return(r,c)=>(o(),a("div",X,[n(A,{runtime:s.hook},null,8,["runtime"])]))}});const ee=C(Z,[["__scopeId","data-v-6e8accf0"]]),oe={class:"options-wrapper"},te=["onClick"],se=w({__name:"ADropdown",props:{options:null,value:null},emits:["select"],setup(s,{emit:r}){const c=$(null),e=m=>{var u;r("select",m),(u=c.value)==null||u.blur()};return(m,u)=>(o(),a("div",{ref_key:"dropdown",ref:c,class:"dropdown",tabindex:"1"},[k(f(s.value)+" ",1),t("div",oe,[(o(!0),a(x,null,H(s.options,v=>(o(),a("div",{key:v.value,class:"option",onClick:p=>e(v.value)},f(v.label),9,te))),128))])],512))}});const ae=C(se,[["__scopeId","data-v-cac46a2e"]]),S=s=>(q("data-v-55f3fd4a"),s=s(),O(),s),ne={class:"hook-runner"},le={class:"title"},ie={class:"section"},re=S(()=>t("div",{class:"section-header"},"Request configuration",-1)),de=S(()=>t("div",{class:"subsection-label"},"Method",-1)),ce={class:"subsection-label"},ue=["onUpdate:modelValue"],pe=["onUpdate:modelValue"],_e={key:0,class:"subsection-label"},he={class:"property"},me=S(()=>t("div",{class:"property-label"},"Body is JSON",-1)),ve={class:"section"},fe=S(()=>t("div",{class:"section-header"},"Response",-1)),ye={key:0,class:"section"},ke={class:"no-execution-message"},be={key:1,class:"section"},ge=w({__name:"HookRunner",props:{hook:null},setup(s){const r=s,c=[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"PUT",value:"PUT"},{label:"PATCH",value:"PATCH"}],e=E({queryParams:[{name:"",value:""}],method:"GET",body:"",loading:!1,isBodyJson:!0}),m=async()=>{const p={"Content-Type":e.isBodyJson?"application/json":"text/plain"},i=await r.hook.test({method:e.method,query:e.queryParams.reduce((_,{name:l,value:h})=>(l&&h&&(_[l]=h),_),{}),body:e.body,headers:{...p}});e.response=i,i.stderr&&I.log({type:"stderr",log:i.stderr}),i.stdout&&I.log({type:"stdout",log:i.stdout})},u=()=>{e.queryParams.push({name:"",value:""})},v=p=>{e.queryParams=e.queryParams.filter((i,_)=>_!==p)};return(p,i)=>{const _=R("icon");return o(),a("div",ne,[t("div",le,[k(" Test your hook here "),e.loading?(o(),V(P,{key:0})):(o(),a("button",{key:1,class:"execution-button",onClick:m},[n(_,{path:d(j),width:"14",height:"14",fill:"#ffffff"},null,8,["path"]),k(" Run ")]))]),t("div",ie,[re,de,n(ae,{value:e.method,options:c,onSelect:i[0]||(i[0]=l=>e.method=l)},null,8,["value"]),t("div",ce,[k(" Query Params "),n(_,{class:"action-icon",path:d(z),width:"16",height:"16","fill-hover":"#777777",onClick:u},null,8,["path"])]),(o(!0),a(x,null,H(e.queryParams,(l,h)=>(o(),a("div",{key:h,class:"params-input"},[g(t("input",{"onUpdate:modelValue":b=>l.name=b,type:"text",placeholder:"name"},null,8,ue),[[T,l.name]]),g(t("input",{"onUpdate:modelValue":b=>l.value=b,type:"text",placeholder:"value"},null,8,pe),[[T,l.value]]),n(_,{class:"delete-icon",path:d(Y),"fill-hover":"#777777",onClick:b=>v(h)},null,8,["path","onClick"])]))),128)),e.method!=="GET"?(o(),a("div",_e,[k(" Request Body "),t("div",he,[g(t("input",{"onUpdate:modelValue":i[1]||(i[1]=l=>e.isBodyJson=l),class:"checkbox-input",type:"checkbox"},null,512),[[U,e.isBodyJson]]),me])])):B("",!0),e.method!=="GET"?g((o(),a("textarea",{key:1,"onUpdate:modelValue":i[2]||(i[2]=l=>e.body=l)},null,512)),[[T,e.body]]):B("",!0)]),t("div",ve,[fe,e.loading?(o(),a("div",ye,[t("div",ke,[n(P)])])):e.response?(o(),a("div",be,[t("pre",null,"Status: "+f(e.response.status),1),(o(!0),a(x,null,H(e.response.headers,(l,h)=>(o(),a("pre",{key:h},f(h)+": "+f(l),1))),128)),t("pre",null,f(e.response.body),1)])):B("",!0)])])}}});const xe=C(ge,[["__scopeId","data-v-55f3fd4a"]]),we={class:"page"},Ce={key:0,class:"loading"},Se=w({__name:"HookEditor",setup(s){const r=J(),{loading:c,result:e}=L(async()=>await Q.get(r.params.hookPath)),m=async u=>{e.value&&(e.value.path=u,await e.value.save())};return(u,v)=>{var p;return o(),a(x,null,[t("div",we,[d(c)||!d(e)?(o(),a("div",Ce,[n(P)])):(o(),V(N,{key:1,class:"editor"},{left:y(()=>[n(F,{link:"/_editor/hooks"})]),right:y(()=>[n(W,{path:"hooks"}),n(K,{model:d(e)},null,8,["model"])]),default:y(()=>[n(D,{title:"Debug"},{default:y(()=>[n(xe,{hook:d(e)},null,8,["hook"])]),_:1}),n(D,{title:"Settings"},{default:y(()=>[n(ee,{hook:d(e),onUpdatePath:m},null,8,["hook"])]),_:1})]),_:1})),n(M,{runtime:"hooks"})]),n(G,{"has-changes":(p=d(e))==null?void 0:p.hasChanges()},null,8,["has-changes"])],64)}}});const Qe=C(Se,[["__scopeId","data-v-c357ba21"]]);export{Qe as default}; +//# sourceMappingURL=HookEditor.b2cb625a.js.map diff --git a/abstra_statics/dist/assets/Hooks.2deecdea.js b/abstra_statics/dist/assets/Hooks.2deecdea.js new file mode 100644 index 0000000000..761b732ef5 --- /dev/null +++ b/abstra_statics/dist/assets/Hooks.2deecdea.js @@ -0,0 +1,2 @@ +import{d as y,K as b,b as h,t as g,z as d,H as _}from"./registerWidgets.68572380.js";import{f as H,g as w,h as C}from"./icons.3acf9dc1.js";import{a as I}from"./asyncComputed.896b7bde.js";import{H as u}from"./hooks.37ea1bed.js";import{R as x}from"./RuntimeList.4dae376a.js";import"./activeRecord.15082700.js";import"./DropdownMenu.06bbb53d.js";import"./CircularLoading.30fd4d73.js";import"./lottie.e503152f.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="c1bea91c-0e1e-4aa5-a201-740a8bbfa7a2",a._sentryDebugIdIdentifier="sentry-dbid-c1bea91c-0e1e-4aa5-a201-740a8bbfa7a2")}catch{}})();const U=y({__name:"Hooks",setup(a){const n=_(),{loading:r,result:s,refetch:c}=I(()=>u.list()),l=({key:e})=>n.push({path:`/_editor/hook/${encodeURIComponent(e)}`}),p=async({key:e})=>{var o,t;await((t=(o=s.value)==null?void 0:o.find(i=>i.path===e))==null?void 0:t.duplicate()),c()},m=async()=>{const e=await u.create();l({key:e.path})},f=async({key:e})=>{var o,t;confirm("Are you sure you want to delete this hook?")&&(await((t=(o=s.value)==null?void 0:o.find(i=>i.path===e))==null?void 0:t.delete()),c())},k=b(()=>{var e,o;return{columns:[{name:"Hook Name"},{name:"Path"},{name:"Hook Actions"}],rows:(o=(e=s.value)==null?void 0:e.map(t=>({key:t.path,cells:[{text:t.title,classes:["title","centered"],link:`/_editor/hook/${encodeURIComponent(t.path)}`},{text:t.path},{text:"",classes:["centered"],actions:[{icon:H,label:"Delete",onClick:f,dangerous:!0},{icon:w,label:"Edit Hook",onClick:l},{icon:C,label:"Duplicate",onClick:p}]}]})))!=null?o:[]}});return(e,o)=>(h(),g(x,{loading:d(r),title:"Python Hooks",description:"Trigger your Python scripts with a request.","create-button-text":"Create Hook","empty-title":"No hooks here yet",table:d(k),onCreate:m},null,8,["loading","table"]))}});export{U as default}; +//# sourceMappingURL=Hooks.2deecdea.js.map diff --git a/abstra_statics/dist/assets/JobEditor.dca96468.js b/abstra_statics/dist/assets/JobEditor.dca96468.js new file mode 100644 index 0000000000..f5ec8d2509 --- /dev/null +++ b/abstra_statics/dist/assets/JobEditor.dca96468.js @@ -0,0 +1,2 @@ +import{a0 as se,d as R,o as oe,v as q,r as $,b as T,c as X,x as _,F as x,L as A,N as C,z as k,V as j,aa as L,S as N,O as K,Q,q as H,R as ee,K as U,e as D,G as te,t as P,D as ue,w as F,J as ce}from"./registerWidgets.68572380.js";import{T as le,a as he}from"./Tab.d7b23f26.js";import{L as de}from"./CircularLoading.30fd4d73.js";import{a as pe}from"./asyncComputed.896b7bde.js";import{J as fe}from"./jobs.6823016f.js";import{S as ve}from"./SaveButton.f5cf0ed0.js";import{B as me}from"./BackButton.9eaf8cad.js";import{_ as ye,R as _e,S as ge}from"./UnsavedChangesHandler.vue_vue_type_script_setup_true_lang.a71462fc.js";import{l as ne}from"./log.13038e9d.js";import{D as be}from"./DocsButton.a49e24b4.js";import"./lottie.e503152f.js";import"./activeRecord.15082700.js";import"./icons.3acf9dc1.js";import"./forms.72f0b1a5.js";import"./dashes.d2191afe.js";import"./runnerData.09d29411.js";import"./hooks.37ea1bed.js";import"./workspaces.6e8c216b.js";import"./login.0baccba7.js";(function(){try{var d=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},g=new Error().stack;g&&(d._sentryDebugIds=d._sentryDebugIds||{},d._sentryDebugIds[g]="3182cbab-b5a3-4531-8c0e-14675808a585",d._sentryDebugIdIdentifier="sentry-dbid-3182cbab-b5a3-4531-8c0e-14675808a585")}catch{}})();var re={exports:{}};(function(d,g){(function(v,p){d.exports=p()})(globalThis,function(){return(()=>{var l={794:(m,u,S)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CronParser=void 0;var n=S(586),y=function(){function c(t,e,i){e===void 0&&(e=!0),i===void 0&&(i=!1),this.expression=t,this.dayOfWeekStartIndexZero=e,this.monthStartIndexZero=i}return c.prototype.parse=function(){var t=this.extractParts(this.expression);return this.normalize(t),this.validate(t),t},c.prototype.extractParts=function(t){if(!this.expression)throw new Error("Expression is empty");var e=t.trim().split(/[ ]+/);if(e.length<5)throw new Error("Expression has only ".concat(e.length," part").concat(e.length==1?"":"s",". At least 5 parts are required."));if(e.length==5)e.unshift(""),e.push("");else if(e.length==6){var i=/\d{4}$/.test(e[5])||e[4]=="?"||e[2]=="?";i?e.unshift(""):e.push("")}else if(e.length>7)throw new Error("Expression has ".concat(e.length," parts; too many!"));return e},c.prototype.normalize=function(t){var e=this;if(t[3]=t[3].replace("?","*"),t[5]=t[5].replace("?","*"),t[2]=t[2].replace("?","*"),t[0].indexOf("0/")==0&&(t[0]=t[0].replace("0/","*/")),t[1].indexOf("0/")==0&&(t[1]=t[1].replace("0/","*/")),t[2].indexOf("0/")==0&&(t[2]=t[2].replace("0/","*/")),t[3].indexOf("1/")==0&&(t[3]=t[3].replace("1/","*/")),t[4].indexOf("1/")==0&&(t[4]=t[4].replace("1/","*/")),t[6].indexOf("1/")==0&&(t[6]=t[6].replace("1/","*/")),t[5]=t[5].replace(/(^\d)|([^#/\s]\d)/g,function(O){var M=O.replace(/\D/,""),w=M;return e.dayOfWeekStartIndexZero?M=="7"&&(w="0"):w=(parseInt(M)-1).toString(),O.replace(M,w)}),t[5]=="L"&&(t[5]="6"),t[3]=="?"&&(t[3]="*"),t[3].indexOf("W")>-1&&(t[3].indexOf(",")>-1||t[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var i={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var o in i)t[5]=t[5].replace(new RegExp(o,"gi"),i[o].toString());t[4]=t[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(O){var M=O.replace(/\D/,""),w=M;return e.monthStartIndexZero&&(w=(parseInt(M)+1).toString()),O.replace(M,w)});var r={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var a in r)t[4]=t[4].replace(new RegExp(a,"gi"),r[a].toString());t[0]=="0"&&(t[0]=""),!/\*|\-|\,|\//.test(t[2])&&(/\*|\//.test(t[1])||/\*|\//.test(t[0]))&&(t[2]+="-".concat(t[2]));for(var s=0;s-1&&!/^\*|\-|\,/.test(t[s])){var h=null;switch(s){case 4:h="12";break;case 5:h="6";break;case 6:h="9999";break;default:h=null;break}if(h!==null){var b=t[s].split("/");t[s]="".concat(b[0],"-").concat(h,"/").concat(b[1])}}},c.prototype.validate=function(t){this.assertNoInvalidCharacters("DOW",t[5]),this.assertNoInvalidCharacters("DOM",t[3]),this.validateRange(t)},c.prototype.validateRange=function(t){n.default.secondRange(t[0]),n.default.minuteRange(t[1]),n.default.hourRange(t[2]),n.default.dayOfMonthRange(t[3]),n.default.monthRange(t[4],this.monthStartIndexZero),n.default.dayOfWeekRange(t[5],this.dayOfWeekStartIndexZero)},c.prototype.assertNoInvalidCharacters=function(t,e){var i=e.match(/[A-KM-VX-Z]+/gi);if(i&&i.length)throw new Error("".concat(t," part contains invalid values: '").concat(i.toString(),"'"))},c}();u.CronParser=y},728:(m,u,S)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ExpressionDescriptor=void 0;var n=S(910),y=S(794),c=function(){function t(e,i){if(this.expression=e,this.options=i,this.expressionParts=new Array(5),!this.options.locale&&t.defaultLocale&&(this.options.locale=t.defaultLocale),!t.locales[this.options.locale]){var o=Object.keys(t.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(o,"'.")),this.options.locale=o}this.i18n=t.locales[this.options.locale],i.use24HourTimeFormat===void 0&&(i.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return t.toString=function(e,i){var o=i===void 0?{}:i,r=o.throwExceptionOnParseError,a=r===void 0?!0:r,s=o.verbose,h=s===void 0?!1:s,b=o.dayOfWeekStartIndexZero,O=b===void 0?!0:b,M=o.monthStartIndexZero,w=M===void 0?!1:M,I=o.use24HourTimeFormat,E=o.locale,V=E===void 0?null:E,W={throwExceptionOnParseError:a,verbose:h,dayOfWeekStartIndexZero:O,monthStartIndexZero:w,use24HourTimeFormat:I,locale:V},J=new t(e,W);return J.getFullDescription()},t.initialize=function(e,i){i===void 0&&(i="en"),t.specialCharacters=["/","-",",","*"],t.defaultLocale=i,e.load(t.locales)},t.prototype.getFullDescription=function(){var e="";try{var i=new y.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);this.expressionParts=i.parse();var o=this.getTimeOfDayDescription(),r=this.getDayOfMonthDescription(),a=this.getMonthDescription(),s=this.getDayOfWeekDescription(),h=this.getYearDescription();e+=o+r+s+a+h,e=this.transformVerbosity(e,!!this.options.verbose),e=e.charAt(0).toLocaleUpperCase()+e.substr(1)}catch(b){if(!this.options.throwExceptionOnParseError)e=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(b)}return e},t.prototype.getTimeOfDayDescription=function(){var e=this.expressionParts[0],i=this.expressionParts[1],o=this.expressionParts[2],r="";if(!n.StringUtilities.containsAny(i,t.specialCharacters)&&!n.StringUtilities.containsAny(o,t.specialCharacters)&&!n.StringUtilities.containsAny(e,t.specialCharacters))r+=this.i18n.atSpace()+this.formatTime(o,i,e);else if(!e&&i.indexOf("-")>-1&&!(i.indexOf(",")>-1)&&!(i.indexOf("/")>-1)&&!n.StringUtilities.containsAny(o,t.specialCharacters)){var a=i.split("-");r+=n.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(o,a[0],""),this.formatTime(o,a[1],""))}else if(!e&&o.indexOf(",")>-1&&o.indexOf("-")==-1&&o.indexOf("/")==-1&&!n.StringUtilities.containsAny(i,t.specialCharacters)){var s=o.split(",");r+=this.i18n.at();for(var h=0;h1){var a=r[r.length-1].index;o=o.substring(0,a)+":59"+o.substring(a+3)}}return o},t.prototype.getDayOfWeekDescription=function(){var e=this,i=this.i18n.daysOfTheWeek(),o=null;return this.expressionParts[5]=="*"?o="":o=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(r,a){var s=r;return r.indexOf("#")>-1?s=r.substr(0,r.indexOf("#")):r.indexOf("L")>-1&&(s=s.replace("L","")),e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(a)[parseInt(s)]:i[parseInt(s)]},function(r){return parseInt(r)==1?"":n.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(r),r)},function(r){var a=r.substring(0,r.indexOf("-")),s=e.expressionParts[3]!="*";return s?e.i18n.commaAndX0ThroughX1(a):e.i18n.commaX0ThroughX1(a)},function(r){var a=null;if(r.indexOf("#")>-1){var s=r.substring(r.indexOf("#")+1),h=r.substring(0,r.indexOf("#")),b=null;switch(s){case"1":b=e.i18n.first(h);break;case"2":b=e.i18n.second(h);break;case"3":b=e.i18n.third(h);break;case"4":b=e.i18n.fourth(h);break;case"5":b=e.i18n.fifth(h);break}a=e.i18n.commaOnThe(s)+b+e.i18n.spaceX0OfTheMonth()}else if(r.indexOf("L")>-1)a=e.i18n.commaOnTheLastX0OfTheMonth(r.replace("L",""));else{var O=e.expressionParts[3]!="*";a=O?e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(r)}return a}),o},t.prototype.getMonthDescription=function(){var e=this,i=this.i18n.monthsOfTheYear(),o=this.getSegmentDescription(this.expressionParts[4],"",function(r,a){return a&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(a)[parseInt(r)-1]:i[parseInt(r)-1]},function(r){return parseInt(r)==1?"":n.StringUtilities.format(e.i18n.commaEveryX0Months(r),r)},function(r){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(r){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()});return o},t.prototype.getDayOfMonthDescription=function(){var e=this,i=null,o=this.expressionParts[3];switch(o){case"L":i=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":i=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var r=o.match(/(\d{1,2}W)|(W\d{1,2})/);if(r){var a=parseInt(r[0].replace("W","")),s=a==1?this.i18n.firstWeekday():n.StringUtilities.format(this.i18n.weekdayNearestDayX0(),a.toString());i=n.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),s);break}else{var h=o.match(/L-(\d{1,2})/);if(h){var b=h[1];i=n.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(b),b);break}else{if(o=="*"&&this.expressionParts[5]!="*")return"";i=this.getSegmentDescription(o,this.i18n.commaEveryDay(),function(O){return O=="L"?e.i18n.lastDay():e.i18n.dayX0?n.StringUtilities.format(e.i18n.dayX0(),O):O},function(O){return O=="1"?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(O)},function(O){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(O)},function(O){return e.i18n.commaOnDayX0OfTheMonth(O)})}break}}return i},t.prototype.getYearDescription=function(){var e=this,i=this.getSegmentDescription(this.expressionParts[6],"",function(o){return/^\d+$/.test(o)?new Date(parseInt(o),1).getFullYear().toString():o},function(o){return n.StringUtilities.format(e.i18n.commaEveryX0Years(o),o)},function(o){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(o){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()});return i},t.prototype.getSegmentDescription=function(e,i,o,r,a,s){var h=null,b=e.indexOf("/")>-1,O=e.indexOf("-")>-1,M=e.indexOf(",")>-1;if(!e)h="";else if(e==="*")h=i;else if(!b&&!O&&!M)h=n.StringUtilities.format(s(e),o(e));else if(M){for(var w=e.split(","),I="",E=0;E0&&w.length>2&&(I+=",",E0&&w.length>1&&(E==w.length-1||w.length==2)&&(I+="".concat(this.i18n.spaceAnd()," ")),w[E].indexOf("/")>-1||w[E].indexOf("-")>-1){var V=w[E].indexOf("-")>-1&&w[E].indexOf("/")==-1,W=this.getSegmentDescription(w[E],i,o,r,V?this.i18n.commaX0ThroughX1:a,s);V&&(W=W.replace(", ","")),I+=W}else b?I+=this.getSegmentDescription(w[E],i,o,r,a,s):I+=o(w[E]);b?h=I:h=n.StringUtilities.format(s(e),I)}else if(b){var w=e.split("/");if(h=n.StringUtilities.format(r(w[1]),w[1]),w[0].indexOf("-")>-1){var J=this.generateRangeSegmentDescription(w[0],a,o);J.indexOf(", ")!=0&&(h+=", "),h+=J}else if(w[0].indexOf("*")==-1){var Z=n.StringUtilities.format(s(w[0]),o(w[0]));Z=Z.replace(", ",""),h+=n.StringUtilities.format(this.i18n.commaStartingX0(),Z)}}else O&&(h=this.generateRangeSegmentDescription(e,a,o));return h},t.prototype.generateRangeSegmentDescription=function(e,i,o){var r="",a=e.split("-"),s=o(a[0],1),h=o(a[1],2),b=i(e);return r+=n.StringUtilities.format(b,s,h),r},t.prototype.formatTime=function(e,i,o){var r=parseInt(e),a="",s=!1;this.options.use24HourTimeFormat||(s=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),a=s?"".concat(this.getPeriod(r)," "):" ".concat(this.getPeriod(r)),r>12&&(r-=12),r===0&&(r=12));var h=i,b="";return o&&(b=":".concat(("00"+o).substring(o.length))),"".concat(s?a:"").concat(("00"+r.toString()).substring(r.toString().length),":").concat(("00"+h.toString()).substring(h.toString().length)).concat(b).concat(s?"":a)},t.prototype.transformVerbosity=function(e,i){return i||(e=e.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),e=e.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),e=e.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),e=e.replace(/\, ?$/,"")),e},t.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},t.locales={},t}();u.ExpressionDescriptor=c},336:(m,u,S)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.enLocaleLoader=void 0;var n=S(751),y=function(){function c(){}return c.prototype.load=function(t){t.en=new n.en},c}();u.enLocaleLoader=y},751:(m,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.en=void 0;var S=function(){function n(){}return n.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},n.prototype.atX0MinutesPastTheHourGt20=function(){return null},n.prototype.commaMonthX0ThroughMonthX1=function(){return null},n.prototype.commaYearX0ThroughYearX1=function(){return null},n.prototype.use24HourTimeFormatByDefault=function(){return!1},n.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occured when generating the expression description. Check the cron expression syntax."},n.prototype.everyMinute=function(){return"every minute"},n.prototype.everyHour=function(){return"every hour"},n.prototype.atSpace=function(){return"At "},n.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},n.prototype.at=function(){return"At"},n.prototype.spaceAnd=function(){return" and"},n.prototype.everySecond=function(){return"every second"},n.prototype.everyX0Seconds=function(){return"every %s seconds"},n.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},n.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},n.prototype.everyX0Minutes=function(){return"every %s minutes"},n.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},n.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},n.prototype.everyX0Hours=function(){return"every %s hours"},n.prototype.betweenX0AndX1=function(){return"between %s and %s"},n.prototype.atX0=function(){return"at %s"},n.prototype.commaEveryDay=function(){return", every day"},n.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},n.prototype.commaX0ThroughX1=function(){return", %s through %s"},n.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},n.prototype.first=function(){return"first"},n.prototype.second=function(){return"second"},n.prototype.third=function(){return"third"},n.prototype.fourth=function(){return"fourth"},n.prototype.fifth=function(){return"fifth"},n.prototype.commaOnThe=function(){return", on the "},n.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},n.prototype.lastDay=function(){return"the last day"},n.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},n.prototype.commaOnlyOnX0=function(){return", only on %s"},n.prototype.commaAndOnX0=function(){return", and on %s"},n.prototype.commaEveryX0Months=function(){return", every %s months"},n.prototype.commaOnlyInX0=function(){return", only in %s"},n.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},n.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},n.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},n.prototype.firstWeekday=function(){return"first weekday"},n.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},n.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},n.prototype.commaEveryX0Days=function(){return", every %s days"},n.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},n.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},n.prototype.commaEveryHour=function(){return", every hour"},n.prototype.commaEveryX0Years=function(){return", every %s years"},n.prototype.commaStartingX0=function(){return", starting %s"},n.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},n.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},n}();u.en=S},586:(m,u)=>{Object.defineProperty(u,"__esModule",{value:!0});function S(y,c){if(!y)throw new Error(c)}var n=function(){function y(){}return y.secondRange=function(c){for(var t=c.split(","),e=0;e=0&&i<=59,"seconds part must be >= 0 and <= 59")}},y.minuteRange=function(c){for(var t=c.split(","),e=0;e=0&&i<=59,"minutes part must be >= 0 and <= 59")}},y.hourRange=function(c){for(var t=c.split(","),e=0;e=0&&i<=23,"hours part must be >= 0 and <= 23")}},y.dayOfMonthRange=function(c){for(var t=c.split(","),e=0;e=1&&i<=31,"DOM part must be >= 1 and <= 31")}},y.monthRange=function(c,t){for(var e=c.split(","),i=0;i=1&&o<=12,t?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},y.dayOfWeekRange=function(c,t){for(var e=c.split(","),i=0;i=0&&o<=6,t?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},y}();u.default=n},910:(m,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.StringUtilities=void 0;var S=function(){function n(){}return n.format=function(y){for(var c=[],t=1;t-1})},n}();u.StringUtilities=S}},v={};function p(m){var u=v[m];if(u!==void 0)return u.exports;var S=v[m]={exports:{}};return l[m](S,S.exports,p),S.exports}var f={};return(()=>{var m=f;Object.defineProperty(m,"__esModule",{value:!0}),m.toString=void 0;var u=p(728),S=p(336);u.ExpressionDescriptor.initialize(new S.enLocaleLoader),m.default=u.ExpressionDescriptor;var n=u.ExpressionDescriptor.toString;m.toString=n})(),f})()})})(re);const ae=se(re.exports),Se=d=>{const[g,l,v,p,f]=d.split(" ");return{minute:g,hour:l,day:v,month:p,weekday:f}};function B(d){if(d==="*")return{values:[-1]};{const l=d.split(","),v=[];for(let p=0;p[...Array(60).keys()].reduce((d,g)=>(g%15||d.push(g),d),[]),we=()=>[...Array(31).keys()].map(d=>d+1),G=()=>{const d=[];for(let g=0;g<24;g++)for(let l=0;l<60;l+=30)g<12?l<10?d.push(`${g}:0${l} AM`):d.push(`${g}:${l} AM`):g===12?l<10?d.push(`${g}:0${l} PM`):d.push(`${g}:${l} PM`):l<10?d.push(`${g-12}:0${l} PM`):d.push(`${g-12}:${l} PM`);return d},Te={0:"0",1:"01",2:"02",3:"03",4:"04",5:"05",6:"06",7:"07",8:"08",9:"09",10:"10",11:"11",12:"12",13:"13",14:"14",15:"15",16:"16",17:"17",18:"18",19:"19",20:"20",21:"21",22:"22",23:"23",24:"24",25:"25",26:"26",27:"27",28:"28",29:"29",30:"30",31:"31",32:"32",33:"33",34:"34",35:"35",36:"36",37:"37",38:"38",39:"39",40:"40",41:"41",42:"42",43:"43",44:"44",45:"45",46:"46",47:"47",48:"48",49:"49",50:"50",51:"51",52:"52",53:"53",54:"54",55:"55",56:"56",57:"57",58:"58",59:"59"},ke={0:"0",1:"01",2:"02",3:"03",4:"04",5:"05",6:"06",7:"07",8:"08",9:"09",10:"10",11:"11",12:"12",13:"13",14:"14",15:"15",16:"16",17:"17",18:"18",19:"19",20:"20",21:"21",22:"22",23:"23"},Xe={1:"01",2:"02",3:"03",4:"04",5:"05",6:"06",7:"07",8:"08",9:"09",10:"10",11:"11",12:"12",13:"13",14:"14",15:"15",16:"16",17:"17",18:"18",19:"19",20:"20",21:"21",22:"22",23:"23",24:"24",25:"25",26:"26",27:"27",28:"28",29:"29",30:"30",31:"31"},Me={1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"},z={0:"Sunday",1:"Monday",2:"Tuesday",3:"Wednesday",4:"Thursday",5:"Friday",6:"Saturday"},Ee=["hourly","daily","weekly","monthly"],De={hourly:{minute:"0",hour:"*",day:"*",month:"*",weekday:"*"},daily:{minute:"0",hour:"6",day:"*",month:"*",weekday:"*"},weekly:{minute:"0",hour:"6",day:"*",month:"*",weekday:"1"},monthly:{minute:"0",hour:"6",day:"1",month:"*",weekday:"*"}},Ce=d=>(K("data-v-4a09321b"),d=d(),Q(),d),Ie={class:"cron-settings-wrapper"},$e={class:"cron-selector"},xe={class:"periodicity"},Ae=Ce(()=>_("div",{class:"label"},"Recurrence",-1)),je=["selected"],Le=["selected"],Ue=["value","selected"],Ne={class:"periodicity"},Re={class:"schedule"},He=["value","selected"],We={class:"schedule"},Be=["value","selected"],Ye={class:"schedule"},Ve=["value","selected"],Je=["value","selected"],Fe={class:"schedule"},Ze=["value","selected"],Ge=["value","selected"],Pe=R({__name:"CronEditor",props:{crontab:null},emits:["changeCrontab","saveCrontab","showAdvancedSettings"],setup(d,{emit:g}){const l=d;function v(o,r){const a=parseInt(o),s=parseInt(r),h=a>=12?"PM":"AM",b=a%12,O=s<10?`0${s}`:s;return`${b}:${O} ${h}`}oe(()=>{const{hour:o,day:r,weekday:a,month:s,minute:h}=l.crontab;s=="*"&&a==="*"&&r!=="*"&&!u([r,o,h])?f.value="monthly":s==="*"&&r==="*"&&a!=="*"&&!u([a,o,h])?f.value="weekly":r==="*"&&a==="*"&&s==="*"&&o!=="*"&&!u([o,h])?f.value="daily":o=="*"&&r==="*"&&a==="*"&&s==="*"&&!u([h])?f.value="hourly":f.value="custom"});const p=q({minute:l.crontab.minute,hour:l.crontab.hour,day:l.crontab.day,month:l.crontab.month,weekday:l.crontab.weekday}),f=$(""),m=$(1),u=o=>o.some(r=>r.includes("-")||r.includes(",")),S=o=>{p.minute=o.minute,p.hour=o.hour,p.day=o.day,p.month=o.month,p.weekday=o.weekday},n=o=>{m.value=0,f.value=o.target.value,S(De[f.value]),g("changeCrontab",p)},y=o=>{m.value=0;const r=o.target.value;p.minute=r,g("changeCrontab",p)},c=o=>{m.value=0;const r=o.target.value;let a=r.split(":")[0],s=r.split(":")[1];a=r.split(" ")[1]==="AM"||a==="12"?a:(Number(a)+12).toString(),s=s.split(" ")[0],p.minute=s,p.hour=a,g("changeCrontab",p)},t=o=>{m.value=0;const r=o.target.value;p.weekday=r,g("changeCrontab",p)},e=o=>{m.value=0;const r=o.target.value;p.day=r,g("changeCrontab",p)},i=()=>{f.value="custom",g("showAdvancedSettings")};return(o,r)=>(T(),X("div",Ie,[_("div",$e,[_("div",xe,[Ae,_("select",{class:"select",onChange:n},[_("option",{value:"",selected:!f.value,disabled:"",hidden:""}," Choose a periodicity ",8,je),_("option",{value:"",selected:f.value=="custom",disabled:"",hidden:""}," Custom ",8,Le),(T(!0),X(x,null,A(k(Ee),(a,s)=>(T(),X("option",{key:s,value:a,selected:a==f.value},C(a),9,Ue))),128))],32)]),_("div",Ne,[j(_("div",Re,[N(" at "),_("select",{class:"select",onChange:y},[(T(!0),X(x,null,A(k(Oe)(),(a,s)=>(T(),X("option",{key:s,value:a,selected:a==parseInt(p.minute)},C(a),9,He))),128))],32),N(" minutes ")],512),[[L,f.value==="hourly"]]),j(_("div",We,[N(" at "),_("select",{class:"select",onChange:c},[(T(!0),X(x,null,A(k(G)(),(a,s)=>(T(),X("option",{key:s,value:a,selected:a===v(p.hour,p.minute)},C(a),9,Be))),128))],32)],512),[[L,f.value==="daily"]]),j(_("div",Ye,[N(" on "),_("select",{class:"select",onChange:t},[(T(!0),X(x,null,A(k(z),(a,s)=>(T(),X("option",{key:s,value:s,selected:a===Object.values(k(z))[parseInt(p.weekday)]},C(a),9,Ve))),128))],32),N(" at "),_("select",{class:"select",onChange:c},[(T(!0),X(x,null,A(k(G)(),(a,s)=>(T(),X("option",{key:s,value:a,selected:a===v(p.hour,p.minute)},C(a),9,Je))),128))],32)],512),[[L,f.value==="weekly"]]),j(_("div",Fe,[N(" on "),_("select",{class:"select",onChange:e},[(T(!0),X(x,null,A(k(we)(),(a,s)=>(T(),X("option",{key:s,value:a,selected:a===parseInt(p.day)},C(a),9,Ze))),128))],32),N(" at "),_("select",{class:"select",onChange:c},[(T(!0),X(x,null,A(k(G)(),(a,s)=>(T(),X("option",{key:s,value:a,selected:a===v(p.hour,p.minute)},C(a),9,Ge))),128))],32)],512),[[L,f.value==="monthly"]])]),_("span",{class:"advanced-settings",onClick:i},"Advanced settings")])]))}});const ze=H(Pe,[["__scopeId","data-v-4a09321b"]]),qe=d=>(K("data-v-a5e38138"),d=d(),Q(),d),Ke={class:"container"},Qe=qe(()=>_("div",{class:"header"},[_("span",null,"Choice")],-1)),et={class:"body"},tt={class:"checkbox"},nt=["id","checked"],ot=["for"],rt={class:"name"},at=R({__name:"Choice",props:{choiceOptions:null,values:null},emits:["changeValues"],setup(d,{emit:g}){const l=d,v=$([]),p=$(l.choiceOptions);oe(()=>{l.values&&(v.value=l.values,l.values[0]===-1?v.value=[...Object.keys(l.choiceOptions).map(Number)]:v.value=l.values)}),ee(()=>l.values,()=>{l.values&&(l.values[0]!==-1?v.value=l.values:v.value=[...Object.keys(l.choiceOptions).map(Number)])});const f=U(()=>u.value.join(",")),m=U(()=>[...v.value].sort((y,c)=>y-c)),u=U(()=>{var y=[],c,t;for(let e=0;ev.value.includes(Number(y)),n=y=>{if(y.preventDefault(),v.value.length===1&&y&&y.target&&!y.target.checked){alert("You must select at least one item"),y.target.checked=!0;return}const c=y.target.id;S(c)?v.value=v.value.filter(t=>t!==Number(c)):v.value.push(Number(c)),g("changeValues",f.value?f.value:"*")};return(y,c)=>(T(),X("div",Ke,[Qe,_("div",et,[(T(!0),X(x,null,A(p.value,(t,e)=>(T(),X("div",{key:e,class:"item"},[_("div",tt,[_("input",{id:e,type:"checkbox",checked:S(e),onInput:n},null,40,nt),_("label",{for:`${e}`},null,8,ot)]),_("div",rt,C(t),1)]))),128))])]))}});const it=H(at,[["__scopeId","data-v-a5e38138"]]),st={class:"wrapper"},ut=R({__name:"TimeSelector",props:{initialValue:null,options:null,type:null},emits:["change"],setup(d,{emit:g}){const l=d,v=$(l.initialValue),p=f=>{g("change",l.type,f)};return ee(()=>l.initialValue,f=>{v.value=f}),(f,m)=>(T(),X("div",st,[D(it,{"choice-options":d.options,values:v.value.values,onChangeValues:p},null,8,["choice-options","values"])]))}});const Y=H(ut,[["__scopeId","data-v-a1b10267"]]),ct={class:"cron-settings-wrapper"},lt={class:"cron-settings"},ht={class:"human-readable"},dt={class:"cron-editor"},pt={class:"cron-tabs"},ft=["onClick"],vt={class:"actions"},mt=R({__name:"AdvancedCronEditor",props:{job:null},emits:["updateSchedule"],setup(d,{emit:g}){const v=$(d.job),{minute:p,hour:f,day:m,month:u,weekday:S}=Se(v.value.schedule),n=q({weekday:S,month:u,day:m,hour:f,minute:p}),y=["Month","Day of Month","Hours","Minutes","Days of week"],c=$(0),t=h=>{c.value=h},e=U(()=>o.value===v.value.schedule),i=U(()=>ae.toString(o.value)),o=U(()=>`${n.minute} ${n.hour} ${n.day} ${n.month} ${n.weekday}`),r=(h,b)=>{n[h]=b},a=()=>{g("updateSchedule",o.value)},s=()=>{n.minute=p,n.hour=f,n.day=m,n.month=u,n.weekday=S};return(h,b)=>(T(),X("div",ct,[_("div",lt,[_("p",ht,'"'+C(k(i))+'" - GMT+0',1),_("div",dt,[_("div",pt,[(T(),X(x,null,A(y,(O,M)=>_("span",{key:M,class:te(["cron-tab",{active:c.value===M}]),onClick:w=>t(M)},C(O),11,ft)),64))]),j(D(Y,{"initial-value":k(B)(n.month),options:k(Me),type:"month",onChange:r},null,8,["initial-value","options"]),[[L,c.value===0]]),j(D(Y,{"initial-value":k(B)(n.day),options:k(Xe),type:"day",onChange:r},null,8,["initial-value","options"]),[[L,c.value===1]]),j(D(Y,{"initial-value":k(B)(n.hour),options:k(ke),type:"hour",onChange:r},null,8,["initial-value","options"]),[[L,c.value===2]]),j(D(Y,{"initial-value":k(B)(n.minute),options:k(Te),type:"minute",onChange:r},null,8,["initial-value","options"]),[[L,c.value===3]]),j(D(Y,{"initial-value":k(B)(n.weekday),options:k(z),type:"weekday",onChange:r},null,8,["initial-value","options"]),[[L,c.value===4]]),_("div",vt,[_("button",{class:"save-button button",onClick:s}," Reset changes "),_("button",{class:te(["save-button","button",k(e)?"disabled":""]),onClick:a}," Set changes ",2)])])])]))}});const yt=H(mt,[["__scopeId","data-v-07f4693a"]]),_t={class:"modal-wrapper"},gt={class:"modal"},bt={class:"modal-content-wrapper"},St=R({__name:"AdvancedSettingsModal",props:{job:null},emits:["close","saveCrontab"],setup(d,{emit:g}){const v=$(d.job),p=m=>{g("saveCrontab",m)},f=()=>{g("close")};return(m,u)=>(T(),X("div",_t,[_("div",gt,[_("span",{class:"close",onClick:f},"\xD7"),_("div",bt,[D(yt,{job:v.value,onUpdateSchedule:p},null,8,["job"])])])]))}});const Ot=H(St,[["__scopeId","data-v-184784f2"]]),ie=d=>(K("data-v-53b723be"),d=d(),Q(),d),wt={class:"schedule-editor"},Tt={class:"schedule-settings"},kt=ie(()=>_("div",{class:"title"},"Schedule settings",-1)),Xt=ie(()=>_("div",{class:"subtitle"},"Time Zone: GMT+0000",-1)),Mt={class:"readable-cron"},Et=R({__name:"ScheduleEditor",props:{job:null},setup(d){const g=d,l=$(!1),v=$(g.job),p=()=>{l.value=!l.value},f=()=>{l.value=!1},m=t=>({weekday:t.split(" ")[4],month:t.split(" ")[3],day:t.split(" ")[2],hour:t.split(" ")[1],minute:t.split(" ")[0]}),u=q(m(v.value.schedule)),S=U(()=>ae.toString(n.value)),n=U(()=>`${u.minute} ${u.hour} ${u.day} ${u.month} ${u.weekday}`),y=t=>{u.minute==t.minute&&u.hour==t.hour&&u.day==t.day&&u.month==t.month&&u.weekday==t.weekday||(u.minute=t.minute,u.hour=t.hour,u.day=t.day,u.month=t.month,u.weekday=t.weekday,v.value.schedule=n.value)},c=t=>{t?(v.value.schedule=t,Object.assign(u,m(t))):v.value.schedule=n.value,f()};return ee(()=>v.value.schedule,t=>{y({minute:t.split(" ")[0],hour:t.split(" ")[1],day:t.split(" ")[2],month:t.split(" ")[3],weekday:t.split(" ")[4]})}),(t,e)=>(T(),X("div",wt,[_("div",Tt,[kt,Xt,D(ze,{class:"recurrence-settings",crontab:u,onChangeCrontab:y,onSaveCrontab:c,onShowAdvancedSettings:p},null,8,["crontab"])]),_("div",Mt,C(k(S)),1),l.value?(T(),P(Ot,{key:0,job:v.value,onClose:f,onSaveCrontab:c},null,8,["job"])):ue("",!0)]))}});const Dt=H(Et,[["__scopeId","data-v-53b723be"]]),Ct={class:"job-editor"},It={class:"settings"},$t=R({__name:"JobEditor",setup(d){const g=ce(),{result:l,loading:v}=pe(()=>fe.get(g.params.jobId));async function p(){if(!l.value)return;const{stdout:f,stderr:m}=await l.value.test();ne.log({type:"stdout",log:f}),ne.log({type:"stderr",log:m})}return(f,m)=>{var u;return T(),X("div",Ct,[k(v)||!k(l)?(T(),P(de,{key:0})):(T(),P(le,{key:1},{left:F(()=>[D(me,{link:"/_editor/jobs"})]),right:F(()=>[D(be,{path:"jobs"}),D(ve,{model:k(l)},null,8,["model"])]),default:F(()=>[D(he,{title:"Settings"},{default:F(()=>[_("div",It,[D(_e,{runtime:k(l)},null,8,["runtime"]),D(Dt,{style:{width:"100%",height:"100%"},job:k(l)},null,8,["job"])])]),_:1})]),_:1})),D(ge,{runtime:"jobs",onRestart:p}),D(ye,{"has-changes":(u=k(l))==null?void 0:u.hasChanges()},null,8,["has-changes"])])}}});const Kt=H($t,[["__scopeId","data-v-6a6e4133"]]);export{Kt as default}; +//# sourceMappingURL=JobEditor.dca96468.js.map diff --git a/abstra_statics/dist/assets/Jobs.3ee058c4.js b/abstra_statics/dist/assets/Jobs.3ee058c4.js new file mode 100644 index 0000000000..f529a79f7c --- /dev/null +++ b/abstra_statics/dist/assets/Jobs.3ee058c4.js @@ -0,0 +1,2 @@ +import{d as y,K as _,b as g,t as h,z as d,H as J}from"./registerWidgets.68572380.js";import{f as k,g as w,h as C}from"./icons.3acf9dc1.js";import{a as I}from"./asyncComputed.896b7bde.js";import{J as b}from"./jobs.6823016f.js";import{R as x}from"./RuntimeList.4dae376a.js";import"./activeRecord.15082700.js";import"./DropdownMenu.06bbb53d.js";import"./CircularLoading.30fd4d73.js";import"./lottie.e503152f.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new Error().stack;i&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[i]="0908bba3-c0b5-4832-80bc-855fd56b2fcc",n._sentryDebugIdIdentifier="sentry-dbid-0908bba3-c0b5-4832-80bc-855fd56b2fcc")}catch{}})();const U=y({__name:"Jobs",setup(n){const i=J(),{loading:r,result:a,refetch:c}=I(()=>b.list()),l=({key:e})=>i.push({path:`/_editor/job/${encodeURIComponent(e)}`}),u=async({key:e})=>{var o,t;await((t=(o=a.value)==null?void 0:o.find(s=>s.identifier===e))==null?void 0:t.duplicate()),c()},f=async()=>{const e=await b.create();l({key:e.identifier})},p=async({key:e})=>{var o,t;confirm("Are you sure you want to delete this job?")&&(await((t=(o=a.value)==null?void 0:o.find(s=>s.identifier===e))==null?void 0:t.delete()),c())},m=_(()=>{var e,o;return{columns:[{name:"Job Name"},{name:"Path"},{name:"Job Actions"}],rows:(o=(e=a.value)==null?void 0:e.map(t=>({key:t.identifier,cells:[{text:t.title,classes:["title","centered"],link:`/_editor/job/${encodeURIComponent(t.identifier)}`},{text:t.identifier},{text:"",classes:["centered"],actions:[{icon:k,label:"Delete",onClick:p,dangerous:!0},{icon:w,label:"Edit Job",onClick:l},{icon:C,label:"Duplicate",onClick:u}]}]})))!=null?o:[]}});return(e,o)=>(g(),h(x,{loading:d(r),title:"Python Jobs",description:"Schedule Python scripts like events on a calendar","create-button-text":"Create Job","empty-title":"No jobs here yet",table:d(m),onCreate:f},null,8,["loading","table"]))}});export{U as default}; +//# sourceMappingURL=Jobs.3ee058c4.js.map diff --git a/abstra_statics/dist/assets/LoadingIndicator.5fb5b875.js b/abstra_statics/dist/assets/LoadingIndicator.5fb5b875.js new file mode 100644 index 0000000000..094d330ae1 --- /dev/null +++ b/abstra_statics/dist/assets/LoadingIndicator.5fb5b875.js @@ -0,0 +1,2 @@ +import{L as a}from"./lottie.e503152f.js";import{d as t,r as d,o as r,b as s,c as i,x as c,B as _,q as l}from"./registerWidgets.68572380.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="5c31b8dc-c99e-4a6e-bbd5-4817baf59d15",n._sentryDebugIdIdentifier="sentry-dbid-5c31b8dc-c99e-4a6e-bbd5-4817baf59d15")}catch{}})();const u={class:"container"},f=t({__name:"LoadingIndicator",setup(n){const e=d(null);return r(()=>{!e.value||a.loadAnimation({container:e.value,renderer:"svg",loop:!0,autoplay:!0,path:"/circularLoading.json"})}),(o,p)=>(s(),i("div",u,[c("div",{ref_key:"animation",ref:e,class:"animation"},null,512),_(o.$slots,"default",{},void 0,!0)]))}});const g=l(f,[["__scopeId","data-v-c30401d8"]]);export{g as L}; +//# sourceMappingURL=LoadingIndicator.5fb5b875.js.map diff --git a/abstra_statics/dist/assets/Login.1e724be9.js b/abstra_statics/dist/assets/Login.1e724be9.js new file mode 100644 index 0000000000..29f34e7a52 --- /dev/null +++ b/abstra_statics/dist/assets/Login.1e724be9.js @@ -0,0 +1,2 @@ +import{P as r}from"./Passwordless.6c7a116b.js";import{N as a}from"./Navbar.03b5b117.js";import{d as i,b as c,c as d,e as t,H as _,q as p}from"./registerWidgets.68572380.js";import{M as m}from"./member.cfc3d34b.js";import"./CircularLoading.30fd4d73.js";import"./lottie.e503152f.js";import"./icons.3acf9dc1.js";import"./passwordlessManager.8fb0aebd.js";import"./logo.084e5d7c.js";import"./asyncComputed.896b7bde.js";import"./gateway.7cd64c5e.js";import"./activeRecord.15082700.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="65c8643e-ce1e-4e5b-9799-8db43bb06e2e",e._sentryDebugIdIdentifier="sentry-dbid-65c8643e-ce1e-4e5b-9799-8db43bb06e2e")}catch{}})();const b={class:"login"},l=i({__name:"Login",setup(e){const o=_();async function s(n){await m.login(),o.push({name:"home"})}return(n,f)=>(c(),d("div",b,[t(a,{class:"nav"}),t(r,{class:"passwordless",onDone:s})]))}});const N=p(l,[["__scopeId","data-v-c9b2b4e6"]]);export{N as default}; +//# sourceMappingURL=Login.1e724be9.js.map diff --git a/abstra_statics/dist/assets/Logs.3ed6aae0.js b/abstra_statics/dist/assets/Logs.3ed6aae0.js new file mode 100644 index 0000000000..abe3c25252 --- /dev/null +++ b/abstra_statics/dist/assets/Logs.3ed6aae0.js @@ -0,0 +1,79 @@ +import{as as H,at as T,au as b,av as p,aw as N,ax as j,ay as W,az as J,aA as Q,aB as Y,a as P,aC as Z,b as d,c as u,ak as x,B as y,S as V,N as h,D as O,x as n,G as F,e as D,w as k,ap as X,A as C,ao as q,F as A,L as U,V as K,d as $,v as G,z as v,t as ee,Y as B,ag as te,J as ie,O as se,Q as le,q as ne}from"./registerWidgets.68572380.js";import{C as oe}from"./gateway.7cd64c5e.js";import{B as ae}from"./build.a423d467.js";import"./index.5601bb74.js";import{a as re}from"./asyncComputed.896b7bde.js";import{L as de}from"./LoadingIndicator.5fb5b875.js";import"./passwordlessManager.8fb0aebd.js";import"./activeRecord.15082700.js";import"./lottie.e503152f.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1001791a-7dbe-4bb3-bc15-676602b26615",e._sentryDebugIdIdentifier="sentry-dbid-1001791a-7dbe-4bb3-bc15-676602b26615")}catch{}})();class ue{list(t){const s=new URLSearchParams({offset:t.offset.toString(),limit:t.limit.toString(),from:t.from.getTime().toString(),to:t.to.getTime().toString(),search:t.search});return oe.get(`projects/${t.projectId}/builds/${t.buildId}/logs?${s}`)}}const ce=new ue;class E{constructor(t,s,a,l,i,m,S){this.executionId=t,this.runtimeType=s,this.runtimeName=a,this.payload=l,this.event=i,this.buildId=m,this.createdAt=S}static fromDTO(t){return new E(t.executionId,t.runtimeType,t.runtimeName,t.payload,t.event,t.buildId,new Date(t.createdAt))}static async list(t){return(await ce.list(t)).logs.map(E.fromDTO)}}var R={name:"Dropdown",emits:["update:modelValue","change","focus","blur","before-show","before-hide","show","hide","filter"],props:{modelValue:null,options:Array,optionLabel:null,optionValue:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},editable:Boolean,placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},dataKey:null,showClear:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:String,default:null},inputStyle:{type:null,default:null},inputProps:{type:null,default:null},panelClass:{type:String,default:null},panelStyle:{type:null,default:null},panelProps:{type:null,default:null},filterInputProps:{type:null,default:null},clearIconProps:{type:null,default:null},appendTo:{type:String,default:"body"},loading:{type:Boolean,default:!1},clearIcon:{type:String,default:"pi pi-times"},dropdownIcon:{type:String,default:"pi pi-chevron-down"},filterIcon:{type:String,default:"pi pi-search"},loadingIcon:{type:String,default:"pi pi-spinner pi-spin"},resetFilterOnHide:{type:Boolean,default:!1},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!0},autoFilterFocus:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},"aria-label":{type:String,default:null},"aria-labelledby":{type:String,default:null}},outsideClickListener:null,scrollHandler:null,resizeListener:null,overlay:null,list:null,virtualScroller:null,searchTimeout:null,searchValue:null,isModelValueChanged:!1,focusOnHover:!1,data(){return{id:this.$attrs.id,focused:!1,focusedOptionIndex:-1,filterValue:null,overlayVisible:!1}},watch:{"$attrs.id":function(e){this.id=e||H()},modelValue(){this.isModelValueChanged=!0},options(){this.autoUpdateModel()}},mounted(){this.id=this.id||H(),this.autoUpdateModel()},updated(){this.overlayVisible&&this.isModelValueChanged&&this.scrollInView(this.findSelectedOptionIndex()),this.isModelValueChanged=!1},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(T.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel(e){return this.optionLabel?b.resolveFieldData(e,this.optionLabel):e},getOptionValue(e){return this.optionValue?b.resolveFieldData(e,this.optionValue):e},getOptionRenderKey(e,t){return(this.dataKey?b.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},isOptionDisabled(e){return this.optionDisabled?b.resolveFieldData(e,this.optionDisabled):!1},isOptionGroup(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel(e){return b.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren(e){return b.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter(t=>this.isOptionGroup(t)).length:e)+1},show(e){this.$emit("before-show"),this.overlayVisible=!0,this.focusedOptionIndex=this.focusedOptionIndex!==-1?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,e&&p.focus(this.$refs.focusInput)},hide(e){const t=()=>{this.$emit("before-hide"),this.overlayVisible=!1,this.focusedOptionIndex=-1,this.searchValue="",this.resetFilterOnHide&&(this.filterValue=null),e&&p.focus(this.$refs.focusInput)};setTimeout(()=>{t()},0)},onFocus(e){this.disabled||(this.focused=!0,this.focusedOptionIndex=this.focusedOptionIndex!==-1?this.focusedOptionIndex:this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.overlayVisible&&this.scrollInView(this.focusedOptionIndex),this.$emit("focus",e))},onBlur(e){this.focused=!1,this.focusedOptionIndex=-1,this.searchValue="",this.$emit("blur",e)},onKeyDown(e){if(this.disabled){e.preventDefault();return}const t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,this.editable);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,this.editable);break;case"Home":this.onHomeKey(e,this.editable);break;case"End":this.onEndKey(e,this.editable);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Space":this.onSpaceKey(e,this.editable);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e,this.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!t&&b.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key));break}},onEditableInput(e){const t=e.target.value;this.searchValue="",!this.searchOptions(e,t)&&(this.focusedOptionIndex=-1),this.$emit("update:modelValue",t)},onContainerClick(e){this.disabled||this.loading||p.hasClass(e.target,"p-dropdown-clear-icon")||e.target.tagName==="INPUT"||(!this.overlay||!this.overlay.contains(e.target))&&(this.overlayVisible?this.hide(!0):this.show(!0))},onClearClick(e){this.updateModel(e,null)},onFirstHiddenFocus(e){const t=e.relatedTarget===this.$refs.focusInput?p.getFirstFocusableElement(this.overlay,":not(.p-hidden-focusable)"):this.$refs.focusInput;p.focus(t)},onLastHiddenFocus(e){const t=e.relatedTarget===this.$refs.focusInput?p.getLastFocusableElement(this.overlay,":not(.p-hidden-focusable)"):this.$refs.focusInput;p.focus(t)},onOptionSelect(e,t,s=!0){const a=this.getOptionValue(t);this.updateModel(e,a),s&&this.hide(!0)},onOptionMouseMove(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onFilterChange(e){const t=e.target.value;this.filterValue=t,this.focusedOptionIndex=-1,this.$emit("filter",{originalEvent:e,value:t}),!this.virtualScrollerDisabled&&this.virtualScroller.scrollToIndex(0)},onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0);break}},onFilterBlur(){this.focusedOptionIndex=-1},onFilterUpdated(){this.overlayVisible&&this.alignOverlay()},onOverlayClick(e){N.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown(e){switch(e.code){case"Escape":this.onEscapeKey(e);break}},onArrowDownKey(e){const t=this.focusedOptionIndex!==-1?this.findNextOptionIndex(this.focusedOptionIndex):this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()},onArrowUpKey(e,t=!1){if(e.altKey&&!t)this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{const s=this.focusedOptionIndex!==-1?this.findPrevOptionIndex(this.focusedOptionIndex):this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,s),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey(e,t=!1){t&&(this.focusedOptionIndex=-1)},onHomeKey(e,t=!1){t?(e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1):(this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show()),e.preventDefault()},onEndKey(e,t=!1){if(t){const s=e.currentTarget,a=s.value.length;s.setSelectionRange(a,a),this.focusedOptionIndex=-1}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()},onPageUpKey(e){this.scrollInView(0),e.preventDefault()},onPageDownKey(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey(e){this.overlayVisible?(this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):this.onArrowDownKey(e),e.preventDefault()},onSpaceKey(e,t=!1){!t&&this.onEnterKey(e)},onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey(e,t=!1){t||(this.overlayVisible&&this.hasFocusableElements()?(p.focus(this.$refs.firstHiddenFocusableElementOnOverlay),e.preventDefault()):(this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(this.filter)))},onBackspaceKey(e,t=!1){t&&!this.overlayVisible&&this.show()},onOverlayEnter(e){T.set("overlay",e,this.$primevue.config.zIndex.overlay),this.alignOverlay(),this.scrollInView(),this.autoFilterFocus&&p.focus(this.$refs.filterInput)},onOverlayAfterEnter(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave(e){T.clear(e)},alignOverlay(){this.appendTo==="self"?p.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=p.getOuterWidth(this.$el)+"px",p.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&this.overlay&&!this.$el.contains(e.target)&&!this.overlay.contains(e.target)&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new j(this.$refs.container,()=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!p.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},hasFocusableElements(){return p.getFocusableElements(this.overlay,":not(.p-hidden-focusable)").length>0},isOptionMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected(e){return b.equals(this.modelValue,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex(){return this.visibleOptions.findIndex(e=>this.isValidOption(e))},findLastOptionIndex(){return b.findLastIndex(this.visibleOptions,e=>this.isValidOption(e))},findNextOptionIndex(e){const t=ethis.isValidOption(s)):-1;return t>-1?t+e+1:e},findPrevOptionIndex(e){const t=e>0?b.findLastIndex(this.visibleOptions.slice(0,e),s=>this.isValidOption(s)):-1;return t>-1?t:e},findSelectedOptionIndex(){return this.hasSelectedOption?this.visibleOptions.findIndex(e=>this.isValidSelectedOption(e)):-1},findFirstFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex(){const e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions(e,t){this.searchValue=(this.searchValue||"")+t;let s=-1,a=!1;return this.focusedOptionIndex!==-1?(s=this.visibleOptions.slice(this.focusedOptionIndex).findIndex(l=>this.isOptionMatched(l)),s=s===-1?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex(l=>this.isOptionMatched(l)):s+this.focusedOptionIndex):s=this.visibleOptions.findIndex(l=>this.isOptionMatched(l)),s!==-1&&(a=!0),s===-1&&this.focusedOptionIndex===-1&&(s=this.findFirstFocusedOptionIndex()),s!==-1&&this.changeFocusedOptionIndex(e,s),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),a},changeFocusedOptionIndex(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView(e=-1){const t=e!==-1?`${this.id}_${e}`:this.focusedOptionId,s=p.findSingle(this.list,`li[id="${t}"]`);s?s.scrollIntoView&&s.scrollIntoView({block:"nearest",inline:"start"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroller&&this.virtualScroller.scrollToIndex(e!==-1?e:this.focusedOptionIndex)},0)},autoUpdateModel(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions(e){return(e||[]).reduce((t,s,a)=>{t.push({optionGroup:s,group:!0,index:a});const l=this.getOptionGroupChildren(s);return l&&l.forEach(i=>t.push(i)),t},[])},overlayRef(e){this.overlay=e},listRef(e,t){this.list=e,t&&t(e)},virtualScrollerRef(e){this.virtualScroller=e}},computed:{containerClass(){return["p-dropdown p-component p-inputwrapper",{"p-disabled":this.disabled,"p-dropdown-clearable":this.showClear&&!this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue,"p-inputwrapper-focus":this.focused||this.overlayVisible,"p-overlay-open":this.overlayVisible}]},inputStyleClass(){return["p-dropdown-label p-inputtext",this.inputClass,{"p-placeholder":!this.editable&&this.label===this.placeholder,"p-dropdown-label-empty":!this.editable&&!this.$slots.value&&(this.label==="p-emptylabel"||this.label.length===0)}]},panelStyleClass(){return["p-dropdown-panel p-component",this.panelClass,{"p-input-filled":this.$primevue.config.inputStyle==="filled","p-ripple-disabled":this.$primevue.config.ripple===!1}]},dropdownIconClass(){return["p-dropdown-trigger-icon",this.loading?this.loadingIcon:this.dropdownIcon]},visibleOptions(){const e=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];if(this.filterValue){const t=W.filter(e,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);if(this.optionGroupLabel){const s=this.options||[],a=[];return s.forEach(l=>{const i=l.items.filter(m=>t.includes(m));i.length>0&&a.push({...l,items:[...i]})}),this.flatOptions(a)}return t}return e},hasSelectedOption(){return b.isNotEmpty(this.modelValue)},label(){const e=this.findSelectedOptionIndex();return e!==-1?this.getOptionLabel(this.visibleOptions[e]):this.placeholder||"p-emptylabel"},editableInputValue(){const e=this.findSelectedOptionIndex();return e!==-1?this.getOptionLabel(this.visibleOptions[e]):this.modelValue||""},equalityKey(){return this.optionValue?null:this.dataKey},searchFields(){return this.filterFields||[this.optionLabel]},filterResultMessageText(){return b.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}","1"):this.emptySelectionMessageText},focusedOptionId(){return this.focusedOptionIndex!==-1?`${this.id}_${this.focusedOptionIndex}`:null},ariaSetSize(){return this.visibleOptions.filter(e=>!this.isOptionGroup(e)).length},virtualScrollerDisabled(){return!this.virtualScrollerOptions}},directives:{ripple:J},components:{VirtualScroller:Q,Portal:Y}};const he=["id"],pe=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],fe=["id","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-disabled"],be={class:"p-dropdown-trigger"},ye={key:0,class:"p-dropdown-header"},ge={class:"p-dropdown-filter-container"},me=["value","placeholder","aria-owns","aria-activedescendant"],ve={role:"status","aria-live":"polite",class:"p-hidden-accessible"},Oe=["id"],Ie=["id"],we=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove"],xe={key:0,class:"p-dropdown-empty-message",role:"option"},Se={key:1,class:"p-dropdown-empty-message",role:"option"},Le={key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},Ve={role:"status","aria-live":"polite",class:"p-hidden-accessible"};function Fe(e,t,s,a,l,i){const m=P("VirtualScroller"),S=P("Portal"),L=Z("ripple");return d(),u("div",{ref:"container",id:l.id,class:F(i.containerClass),onClick:t[16]||(t[16]=(...o)=>i.onContainerClick&&i.onContainerClick(...o))},[s.editable?(d(),u("input",x({key:0,ref:"focusInput",id:s.inputId,type:"text",style:s.inputStyle,class:i.inputStyleClass,value:i.editableInputValue,placeholder:s.placeholder,tabindex:s.disabled?-1:s.tabindex,disabled:s.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":l.overlayVisible,"aria-controls":l.id+"_list","aria-activedescendant":l.focused?i.focusedOptionId:void 0,onFocus:t[0]||(t[0]=(...o)=>i.onFocus&&i.onFocus(...o)),onBlur:t[1]||(t[1]=(...o)=>i.onBlur&&i.onBlur(...o)),onKeydown:t[2]||(t[2]=(...o)=>i.onKeyDown&&i.onKeyDown(...o)),onInput:t[3]||(t[3]=(...o)=>i.onEditableInput&&i.onEditableInput(...o))},s.inputProps),null,16,pe)):(d(),u("span",x({key:1,ref:"focusInput",id:s.inputId,style:s.inputStyle,class:i.inputStyleClass,tabindex:s.disabled?-1:s.tabindex,role:"combobox","aria-label":e.ariaLabel||(i.label==="p-emptylabel"?void 0:i.label),"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":l.overlayVisible,"aria-controls":l.id+"_list","aria-activedescendant":l.focused?i.focusedOptionId:void 0,"aria-disabled":s.disabled,onFocus:t[4]||(t[4]=(...o)=>i.onFocus&&i.onFocus(...o)),onBlur:t[5]||(t[5]=(...o)=>i.onBlur&&i.onBlur(...o)),onKeydown:t[6]||(t[6]=(...o)=>i.onKeyDown&&i.onKeyDown(...o))},s.inputProps),[y(e.$slots,"value",{value:s.modelValue,placeholder:s.placeholder},()=>[V(h(i.label==="p-emptylabel"?"\xA0":i.label||"empty"),1)])],16,fe)),s.showClear&&s.modelValue!=null?(d(),u("i",x({key:2,class:["p-dropdown-clear-icon",s.clearIcon],onClick:t[7]||(t[7]=(...o)=>i.onClearClick&&i.onClearClick(...o))},s.clearIconProps),null,16)):O("",!0),n("div",be,[y(e.$slots,"indicator",{},()=>[n("span",{class:F(i.dropdownIconClass),"aria-hidden":"true"},null,2)])]),D(S,{appendTo:s.appendTo},{default:k(()=>[D(X,{name:"p-connected-overlay",onEnter:i.onOverlayEnter,onAfterEnter:i.onOverlayAfterEnter,onLeave:i.onOverlayLeave,onAfterLeave:i.onOverlayAfterLeave},{default:k(()=>[l.overlayVisible?(d(),u("div",x({key:0,ref:i.overlayRef,style:s.panelStyle,class:i.panelStyleClass,onClick:t[14]||(t[14]=(...o)=>i.onOverlayClick&&i.onOverlayClick(...o)),onKeydown:t[15]||(t[15]=(...o)=>i.onOverlayKeyDown&&i.onOverlayKeyDown(...o))},s.panelProps),[n("span",{ref:"firstHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[8]||(t[8]=(...o)=>i.onFirstHiddenFocus&&i.onFirstHiddenFocus(...o))},null,544),y(e.$slots,"header",{value:s.modelValue,options:i.visibleOptions}),s.filter?(d(),u("div",ye,[n("div",ge,[n("input",x({ref:"filterInput",type:"text",value:l.filterValue,onVnodeUpdated:t[9]||(t[9]=(...o)=>i.onFilterUpdated&&i.onFilterUpdated(...o)),class:"p-dropdown-filter p-inputtext p-component",placeholder:s.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":l.id+"_list","aria-activedescendant":i.focusedOptionId,onKeydown:t[10]||(t[10]=(...o)=>i.onFilterKeyDown&&i.onFilterKeyDown(...o)),onBlur:t[11]||(t[11]=(...o)=>i.onFilterBlur&&i.onFilterBlur(...o)),onInput:t[12]||(t[12]=(...o)=>i.onFilterChange&&i.onFilterChange(...o))},s.filterInputProps),null,16,me),n("span",{class:F(["p-dropdown-filter-icon",s.filterIcon])},null,2)]),n("span",ve,h(i.filterResultMessageText),1)])):O("",!0),n("div",{class:"p-dropdown-items-wrapper",style:C({"max-height":i.virtualScrollerDisabled?s.scrollHeight:""})},[D(m,x({ref:i.virtualScrollerRef},s.virtualScrollerOptions,{items:i.visibleOptions,style:{height:s.scrollHeight},tabindex:-1,disabled:i.virtualScrollerDisabled}),q({content:k(({styleClass:o,contentRef:w,items:c,getItemOptions:r,contentStyle:z,itemSize:_})=>[n("ul",{ref:f=>i.listRef(f,w),id:l.id+"_list",class:F(["p-dropdown-items",o]),style:C(z),role:"listbox"},[(d(!0),u(A,null,U(c,(f,g)=>(d(),u(A,{key:i.getOptionRenderKey(f,i.getOptionIndex(g,r))},[i.isOptionGroup(f)?(d(),u("li",{key:0,id:l.id+"_"+i.getOptionIndex(g,r),style:C({height:_?_+"px":void 0}),class:"p-dropdown-item-group",role:"option"},[y(e.$slots,"optiongroup",{option:f.optionGroup,index:i.getOptionIndex(g,r)},()=>[V(h(i.getOptionGroupLabel(f.optionGroup)),1)])],12,Ie)):K((d(),u("li",{key:1,id:l.id+"_"+i.getOptionIndex(g,r),style:C({height:_?_+"px":void 0}),class:F(["p-dropdown-item",{"p-highlight":i.isSelected(f),"p-focus":l.focusedOptionIndex===i.getOptionIndex(g,r),"p-disabled":i.isOptionDisabled(f)}]),role:"option","aria-label":i.getOptionLabel(f),"aria-selected":i.isSelected(f),"aria-disabled":i.isOptionDisabled(f),"aria-setsize":i.ariaSetSize,"aria-posinset":i.getAriaPosInset(i.getOptionIndex(g,r)),onClick:M=>i.onOptionSelect(M,f),onMousemove:M=>i.onOptionMouseMove(M,i.getOptionIndex(g,r))},[y(e.$slots,"option",{option:f,index:i.getOptionIndex(g,r)},()=>[V(h(i.getOptionLabel(f)),1)])],46,we)),[[L]])],64))),128)),l.filterValue&&(!c||c&&c.length===0)?(d(),u("li",xe,[y(e.$slots,"emptyfilter",{},()=>[V(h(i.emptyFilterMessageText),1)])])):!s.options||s.options&&s.options.length===0?(d(),u("li",Se,[y(e.$slots,"empty",{},()=>[V(h(i.emptyMessageText),1)])])):O("",!0)],14,Oe)]),_:2},[e.$slots.loader?{name:"loader",fn:k(({options:o})=>[y(e.$slots,"loader",{options:o})]),key:"0"}:void 0]),1040,["items","style","disabled"])],4),y(e.$slots,"footer",{value:s.modelValue,options:i.visibleOptions}),!s.options||s.options&&s.options.length===0?(d(),u("span",Le,h(i.emptyMessageText),1)):O("",!0),n("span",Ve,h(i.selectedMessageText),1),n("span",{ref:"lastHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[13]||(t[13]=(...o)=>i.onLastHiddenFocus&&i.onLastHiddenFocus(...o))},null,544)],16)):O("",!0)]),_:3},8,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]),_:3},8,["appendTo"])],10,he)}function _e(e,t){t===void 0&&(t={});var s=t.insertAt;if(!(!e||typeof document>"u")){var a=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css",s==="top"&&a.firstChild?a.insertBefore(l,a.firstChild):a.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}var ke=` +.p-dropdown { + display: inline-flex; + cursor: pointer; + position: relative; + user-select: none; +} +.p-dropdown-clear-icon { + position: absolute; + top: 50%; + margin-top: -0.5rem; +} +.p-dropdown-trigger { + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; +} +.p-dropdown-label { + display: block; + white-space: nowrap; + overflow: hidden; + flex: 1 1 auto; + width: 1%; + text-overflow: ellipsis; + cursor: pointer; +} +.p-dropdown-label-empty { + overflow: hidden; + opacity: 0; +} +input.p-dropdown-label { + cursor: default; +} +.p-dropdown .p-dropdown-panel { + min-width: 100%; +} +.p-dropdown-panel { + position: absolute; + top: 0; + left: 0; +} +.p-dropdown-items-wrapper { + overflow: auto; +} +.p-dropdown-item { + cursor: pointer; + font-weight: normal; + white-space: nowrap; + position: relative; + overflow: hidden; +} +.p-dropdown-item-group { + cursor: auto; +} +.p-dropdown-items { + margin: 0; + padding: 0; + list-style-type: none; +} +.p-dropdown-filter { + width: 100%; +} +.p-dropdown-filter-container { + position: relative; +} +.p-dropdown-filter-icon { + position: absolute; + top: 50%; + margin-top: -0.5rem; +} +.p-fluid .p-dropdown { + display: flex; +} +.p-fluid .p-dropdown .p-dropdown-label { + width: 1%; +} +`;_e(ke);R.render=Fe;const I=e=>(se("data-v-b02e5d24"),e=e(),le(),e),Ce={key:1,class:"logs"},De=I(()=>n("h1",null,"Logs",-1)),Ke={class:"filters"},Ee={class:"field field-build"},Me=I(()=>n("label",null,"Build",-1)),Te={class:"field"},Be=I(()=>n("label",null,"From",-1)),Ae={class:"field"},He=I(()=>n("label",null,"To",-1)),Pe={class:"field"},Ge=I(()=>n("label",null,"Search",-1)),Ue={key:0,class:"log-list"},Re={class:"search-summary"},ze={class:"log"},Ne={class:"log-header"},je={key:0,class:"log-date log-header-item"},We=I(()=>n("span",{class:"log-header-item-name"},"Build",-1)),Je=[We],Qe=te('
Date
Runtime
Execution
Event
',4),Ye={class:"log-header"},Ze={key:0,class:"log-date log-header-item"},Xe={class:"log-header-item-value"},qe={class:"log-date log-header-item"},$e={class:"log-header-item-value"},et={class:"log-runtime log-header-item"},tt={class:"log-header-item-value"},it={class:"log-execution log-header-item"},st={class:"log-header-item-value"},lt={class:"log-event log-header-item"},nt={class:"log-header-item-value"},ot={class:"log-payload"},at=["textContent"],rt={key:1,class:"no-logs"},dt=I(()=>n("p",null,"No logs found.",-1)),ut=[dt],ct=$({__name:"Logs",setup(e){const s=ie().params.projectId,a=G({buildOptions:[{label:"Latest",value:"latest"},{label:"All",value:"all"}],buildsLoading:!1,buildLoaded:!1}),l=G({selectedBuild:"all",from:new Date(Date.now()-1e3*60*60*24*7).toISOString().slice(0,16),to:new Date().toISOString().slice(0,16),search:"",limit:50,offset:0}),i=async()=>{if(a.buildLoaded)return;a.buildsLoading=!0;const w=await ae.list(s);a.buildOptions=[...a.buildOptions,...w.map(c=>({label:c.label,value:c.id}))],a.buildLoaded=!0,a.buildsLoading=!1},m=w=>{l.selectedBuild=w.value,o()},{loading:S,result:L,refetch:o}=re(()=>E.list({projectId:s,limit:l.limit,offset:l.offset,buildId:l.selectedBuild,from:new Date(l.from),to:new Date(l.to),search:l.search}));return(w,c)=>v(S)||!v(L)?(d(),ee(de,{key:0})):(d(),u("div",Ce,[De,n("div",Ke,[n("div",Ee,[Me,D(v(R),{modelValue:l.selectedBuild,"onUpdate:modelValue":c[0]||(c[0]=r=>l.selectedBuild=r),class:"build-dropdown",options:a.buildOptions,"option-label":"label","option-value":"value",loading:a.buildsLoading,filter:!1,onShow:i,onChange:m},null,8,["modelValue","options","loading"])]),n("div",Te,[Be,K(n("input",{"onUpdate:modelValue":c[1]||(c[1]=r=>l.from=r),type:"datetime-local"},null,512),[[B,l.from]])]),n("div",Ae,[He,K(n("input",{"onUpdate:modelValue":c[2]||(c[2]=r=>l.to=r),type:"datetime-local"},null,512),[[B,l.to]])]),n("div",Pe,[Ge,K(n("input",{"onUpdate:modelValue":c[3]||(c[3]=r=>l.search=r),type:"search"},null,512),[[B,l.search]])]),n("button",{onClick:c[4]||(c[4]=(...r)=>v(o)&&v(o)(...r))},"Filter")]),v(L).length>0?(d(),u("div",Ue,[n("div",Re," Showing from "+h(l.offset+1)+" to "+h(l.offset+l.limit),1),n("details",ze,[n("summary",Ne,[l.selectedBuild=="all"?(d(),u("div",je,Je)):O("",!0),Qe])]),(d(!0),u(A,null,U(v(L),r=>(d(),u("details",{key:r.createdAt.toString(),class:"log"},[n("summary",Ye,[l.selectedBuild=="all"?(d(),u("div",Ze,[n("span",Xe,h(r.buildId.split("-")[0]),1)])):O("",!0),n("div",qe,[n("span",$e,h(r.createdAt.toISOString()),1)]),n("div",et,[n("span",tt,h(r.runtimeType)+":"+h(r.runtimeName),1)]),n("div",it,[n("span",st,h(r.executionId.slice(0,8)),1)]),n("div",lt,[n("span",nt,h(r.event),1)])]),n("div",ot,[n("pre",{class:"log-payload-content",textContent:h(r.payload)},null,8,at)])]))),128))])):(d(),u("div",rt,ut))]))}});const It=ne(ct,[["__scopeId","data-v-b02e5d24"]]);export{It as default}; +//# sourceMappingURL=Logs.3ed6aae0.js.map diff --git a/abstra_statics/dist/assets/Members.e30a0caf.js b/abstra_statics/dist/assets/Members.e30a0caf.js new file mode 100644 index 0000000000..c1201b731a --- /dev/null +++ b/abstra_statics/dist/assets/Members.e30a0caf.js @@ -0,0 +1,2 @@ +import{d as u,K as f,b as y,t as g,z as s,J as _}from"./registerWidgets.68572380.js";import{a as w}from"./asyncComputed.896b7bde.js";import"./gateway.7cd64c5e.js";import{M as i}from"./member.cfc3d34b.js";import"./index.5601bb74.js";import{C as I}from"./CrudView.22ff1852.js";import"./passwordlessManager.8fb0aebd.js";import"./activeRecord.15082700.js";import"./DropdownMenu.06bbb53d.js";import"./Modal.dacb9a40.js";import"./LoadingIndicator.5fb5b875.js";import"./lottie.e503152f.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="b500a84e-403e-408d-8c33-71c1edb2b03c",e._sentryDebugIdIdentifier="sentry-dbid-b500a84e-403e-408d-8c33-71c1edb2b03c")}catch{}})();const J=u({__name:"Members",setup(e){const a=_().params.organizationId,m=[{key:"email",label:"Email"}],l=async t=>{await i.create(a,t.email),p()},{loading:d,result:c,refetch:p}=w(()=>i.list(a)),b=f(()=>{var t,r;return{columns:[{name:"Email"},{name:"Role"}],rows:(r=(t=c.value)==null?void 0:t.map(n=>({key:n.email,cells:[{text:n.email,classes:["title","centered"]},{text:n.role,classes:["centered"]}]})))!=null?r:[]}});return(t,r)=>(y(),g(I,{"entity-name":"members",loading:s(d),title:"Organization members",description:"List all organization members.","empty-title":"No members yet",table:s(b),"create-button-text":"Add members",fields:m,onCreate:l},null,8,["loading","table"]))}});export{J as default}; +//# sourceMappingURL=Members.e30a0caf.js.map diff --git a/abstra_statics/dist/assets/Modal.dacb9a40.js b/abstra_statics/dist/assets/Modal.dacb9a40.js new file mode 100644 index 0000000000..4ca9e0891c --- /dev/null +++ b/abstra_statics/dist/assets/Modal.dacb9a40.js @@ -0,0 +1,2 @@ +import{d as p,y as _,v as b,b as r,c,x as i,z as v,A as a,B as f,D as m,E as S,G as g,q as k}from"./registerWidgets.68572380.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="5f813a3a-53f8-4ff4-b7b3-60aa14d4e74c",e._sentryDebugIdIdentifier="sentry-dbid-5f813a3a-53f8-4ff4-b7b3-60aa14d4e74c")}catch{}})();const h=p({__name:"Modal",props:{containerStyle:null,headerStyle:null,contentStyle:null},emits:["open","close"],setup(e,{expose:s,emit:t}){const u=_(),y=()=>{n.isOpened=!0,t("open")},o=()=>{n.isOpened=!1,t("close")};s({open:y,close:o});const n=b({isOpened:!1});return(l,d)=>(r(),c("div",{class:g(["background",n.isOpened&&"visible"]),onClick:o},[i("div",{class:"container",style:a(e.containerStyle),onClick:d[0]||(d[0]=S(()=>{},["stop"]))},[v(u).header?(r(),c("div",{key:0,class:"header",style:a(e.headerStyle)},[f(l.$slots,"header",{},void 0,!0)],4)):m("",!0),i("div",{class:"content",style:a(e.contentStyle)},[f(l.$slots,"content",{},void 0,!0)],4)],4)],2))}});const I=k(h,[["__scopeId","data-v-24f739ca"]]);export{I as M}; +//# sourceMappingURL=Modal.dacb9a40.js.map diff --git a/abstra_statics/dist/assets/Navbar.03b5b117.js b/abstra_statics/dist/assets/Navbar.03b5b117.js new file mode 100644 index 0000000000..77345c88aa --- /dev/null +++ b/abstra_statics/dist/assets/Navbar.03b5b117.js @@ -0,0 +1,2 @@ +import{_ as k}from"./logo.084e5d7c.js";import{q as i,b as s,c as o,O as u,Q as b,x as t,d as p,H as I,a as x,z as _,N as f,e as r,w as g,S as m,F as $,L as w,D as L,aq as N}from"./registerWidgets.68572380.js";import{p as l}from"./passwordlessManager.8fb0aebd.js";import{a as C}from"./asyncComputed.896b7bde.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="baa5545f-70c0-43f5-bb5f-6ecba434448b",e._sentryDebugIdIdentifier="sentry-dbid-baa5545f-70c0-43f5-bb5f-6ecba434448b")}catch{}})();const B={},v=e=>(u("data-v-439be421"),e=e(),b(),e),D={class:"logo"},S=v(()=>t("img",{class:"logo-img",src:k,alt:"Abstra cloud logo"},null,-1)),V=v(()=>t("span",null,"Abstra Cloud",-1)),q=[S,V];function A(e,a){return s(),o("div",D,q)}const E=i(B,[["render",A],["__scopeId","data-v-439be421"]]),F={key:0},R={key:1,class:"logged"},U={class:"author-email"},z={key:2},H=p({__name:"LoginBlock",setup(e){const a=I(),{result:c,loading:n,refetch:d}=C(async()=>l.getUser());function h(){l.removeUser(),d(),a.push({name:"login"})}return(P,W)=>{const y=x("router-link");return _(n)?(s(),o("div",F,"loading...")):_(c)?(s(),o("div",R,[t("span",U,f(_(c).claims.email),1),t("button",{class:"btn",onClick:h},"Logout")])):(s(),o("div",z,[r(y,{class:"btn",to:"/login"},{default:g(()=>[m("Login")]),_:1})]))}}});const M=i(H,[["__scopeId","data-v-6c08207b"]]),O=e=>(u("data-v-cf48b8cc"),e=e(),b(),e),Q={class:"nav"},T={class:"left"},j={key:0,class:"breadcrumb-container"},G=O(()=>t("span",{class:"divider"},">",-1)),J={class:"right"},K=p({__name:"Navbar",props:{breadcrumb:null},setup(e){return(a,c)=>(s(),o("nav",Q,[t("div",T,[r(E),e.breadcrumb?(s(),o("div",j,[(s(!0),o($,null,w(e.breadcrumb,(n,d)=>(s(),o("span",{key:d,class:"breadcrumb-item"},[r(_(N),{class:"breadcrumb-link",to:n.path},{default:g(()=>[m(f(n.label),1)]),_:2},1032,["to"]),G]))),128))])):L("",!0)]),t("div",J,[r(M)])]))}});const se=i(K,[["__scopeId","data-v-cf48b8cc"]]);export{se as N}; +//# sourceMappingURL=Navbar.03b5b117.js.map diff --git a/abstra_statics/dist/assets/Organization.75e049c4.js b/abstra_statics/dist/assets/Organization.75e049c4.js new file mode 100644 index 0000000000..a3d0e1842d --- /dev/null +++ b/abstra_statics/dist/assets/Organization.75e049c4.js @@ -0,0 +1,2 @@ +import{S as d}from"./Sidebar.698020b7.js";import{N as m}from"./Navbar.03b5b117.js";import{F as l,G as p,H as u}from"./icons.3acf9dc1.js";import{d as b,K as _,b as f,c as g,e as t,z as r,x as v,F as y,J as z,a as w,q as I}from"./registerWidgets.68572380.js";import{a as h}from"./asyncComputed.896b7bde.js";import"./gateway.7cd64c5e.js";import{O}from"./organization.9b0cf47a.js";import"./index.5601bb74.js";import"./Tooltip.4f102cfe.js";import"./logo.084e5d7c.js";import"./passwordlessManager.8fb0aebd.js";import"./activeRecord.15082700.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="adda43c7-bb67-4f1f-a7e7-8a8a91f19230",e._sentryDebugIdIdentifier="sentry-dbid-adda43c7-bb67-4f1f-a7e7-8a8a91f19230")}catch{}})();const x={class:"organization"},k=b({__name:"Organization",setup(e){const n=z().params.organizationId,{result:o}=h(()=>O.get(n)),s=_(()=>o.value?[{label:o.value.name,path:`/organizations/${o.value.id}`}]:void 0),i=[{name:"Organization",items:[{name:"Projects",icon:l,path:"projects"},{name:"Members",icon:p,path:"members"},{name:"Billing",icon:u,path:"billing",unavailable:!0}]}];return(B,D)=>{const c=w("router-view");return f(),g(y,null,[t(m,{breadcrumb:r(s)},null,8,["breadcrumb"]),v("div",x,[t(d,{class:"sidebar",sections:r(i)},null,8,["sections"]),t(c)])],64)}}});const K=I(k,[["__scopeId","data-v-7eef90b7"]]);export{K as default}; +//# sourceMappingURL=Organization.75e049c4.js.map diff --git a/abstra_statics/dist/assets/OrganizationSettings.4b7308b3.js b/abstra_statics/dist/assets/OrganizationSettings.4b7308b3.js new file mode 100644 index 0000000000..31632eba23 --- /dev/null +++ b/abstra_statics/dist/assets/OrganizationSettings.4b7308b3.js @@ -0,0 +1,2 @@ +import{q as t,b as s,c as o}from"./registerWidgets.68572380.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e984eabc-83de-476b-8a7f-df42082b3b07",e._sentryDebugIdIdentifier="sentry-dbid-e984eabc-83de-476b-8a7f-df42082b3b07")}catch{}})();const r={},a={class:"organization-settings"};function d(e,n){return s(),o("div",a,"Organization settings")}const f=t(r,[["render",d]]);export{f as default}; +//# sourceMappingURL=OrganizationSettings.4b7308b3.js.map diff --git a/abstra_statics/dist/assets/Organizations.406a6e23.js b/abstra_statics/dist/assets/Organizations.406a6e23.js new file mode 100644 index 0000000000..eed3f4823e --- /dev/null +++ b/abstra_statics/dist/assets/Organizations.406a6e23.js @@ -0,0 +1,2 @@ +import{d as y,K as z,b,c as O,e as c,x as w,z as d,F as k,H as h,q as x}from"./registerWidgets.68572380.js";import{f as C,g as v}from"./icons.3acf9dc1.js";import{a as I}from"./asyncComputed.896b7bde.js";import"./gateway.7cd64c5e.js";import{O as l}from"./organization.9b0cf47a.js";import"./index.5601bb74.js";import{C as N}from"./CrudView.22ff1852.js";import{N as D}from"./Navbar.03b5b117.js";import"./passwordlessManager.8fb0aebd.js";import"./activeRecord.15082700.js";import"./DropdownMenu.06bbb53d.js";import"./Modal.dacb9a40.js";import"./LoadingIndicator.5fb5b875.js";import"./lottie.e503152f.js";import"./logo.084e5d7c.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="a1608b14-a6d9-48ef-82c6-d4fb91ca3d88",n._sentryDebugIdIdentifier="sentry-dbid-a1608b14-a6d9-48ef-82c6-d4fb91ca3d88")}catch{}})();const A={class:"organizations"},B=y({__name:"Organizations",setup(n){const o=[{key:"name",label:"Organization Name"}],i=h(),{loading:m,result:r,refetch:p}=I(()=>l.list()),s=({key:e})=>{i.push({name:"organization",params:{organizationId:e}})},u=async e=>{const t=await l.create(e.name);s({key:t.id})},g=async({key:e})=>{var t,a;confirm("Are you sure you want to delete this organization?")&&(await((a=(t=r.value)==null?void 0:t.find(_=>_.id===e))==null?void 0:a.delete()),p())},f=z(()=>{var e,t;return{columns:[{name:"Organization Name"},{name:"Path"},{name:"Organization Actions"}],rows:(t=(e=r.value)==null?void 0:e.map(a=>({key:a.id,cells:[{text:a.name,classes:["title","centered"],link:`/organizations/${encodeURIComponent(a.id)}`},{text:a.id},{text:"",classes:["centered"],actions:[{icon:C,label:"Delete",onClick:g,dangerous:!0},{icon:v,label:"Edit Organization",onClick:s}]}]})))!=null?t:[]}});return(e,t)=>(b(),O(k,null,[c(D),w("div",A,[c(N,{"entity-name":"organization",loading:d(m),title:"My organizations",description:"An organization is your company\u2019s account. Add co-workers, manage their access, organize projects and billing.","create-button-text":"Create Organization","empty-title":"No organizations here yet",table:d(f),fields:o,onCreate:u},null,8,["loading","table"])])],64))}});const L=x(B,[["__scopeId","data-v-360ce05c"]]);export{L as default}; +//# sourceMappingURL=Organizations.406a6e23.js.map diff --git a/abstra_statics/dist/assets/Passwordless.6c7a116b.js b/abstra_statics/dist/assets/Passwordless.6c7a116b.js new file mode 100644 index 0000000000..18b060c8da --- /dev/null +++ b/abstra_statics/dist/assets/Passwordless.6c7a116b.js @@ -0,0 +1,2 @@ +import{L as S}from"./CircularLoading.30fd4d73.js";import{d as h,v,b as s,c as a,x as o,N as g,V as b,Y as w,ad as I,D as p,O as T,Q as x,q as y,z as V,S as B,e as f}from"./registerWidgets.68572380.js";import{v as C}from"./icons.3acf9dc1.js";import{p as k}from"./passwordlessManager.8fb0aebd.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="30d9ffb4-e3df-4247-8eaa-e0544afe51dd",t._sentryDebugIdIdentifier="sentry-dbid-30d9ffb4-e3df-4247-8eaa-e0544afe51dd")}catch{}})();const $=t=>(T("data-v-1b435c3a"),t=t(),x(),t),D={class:"auth-info"},E={class:"auth-header"},K={class:"auth-label"},N=$(()=>o("div",{class:"description"},"To continue we need you to authenticate",-1)),P=["onKeyup"],R={key:0,class:"span-error"},L=$(()=>o("div",{class:"spacer"},null,-1)),M=h({__name:"AuthInfo",props:{invalid:{type:Boolean,default:!1},header:{type:String}},emits:["sendAuthInfo"],setup(t,{emit:n}){const e=v({email:""}),c=()=>{n("sendAuthInfo",e)};return(_,l)=>(s(),a("div",D,[o("div",E,[o("div",K,g(t.header),1),N]),b(o("input",{"onUpdate:modelValue":l[0]||(l[0]=u=>e.email=u),type:"email",placeholder:"Email address",class:"input email-input",onKeyup:I(c,["enter"])},null,40,P),[[w,e.email]]),t.invalid?(s(),a("span",R," Email invalid, please try again. ")):p("",!0),L,o("button",{class:"next-button",onClick:c}," Send a verification email ")]))}});const U=y(M,[["__scopeId","data-v-1b435c3a"]]),A=t=>(T("data-v-9316d802"),t=t(),x(),t),q={class:"auth-token"},z={class:"auth-label"},O=["onKeyup"],Q={key:0,class:"span-error"},Y={key:1,class:"span-error"},j=A(()=>o("div",{class:"spacer"},null,-1)),F={class:"button-icon",viewBox:"0 0 24 24"},G=["d"],H=A(()=>o("div",{class:"footer"}," If you haven't received the verification code, try again or choose another email ",-1)),J=h({__name:"AuthToken",props:{expired:{type:Boolean},invalid:{type:Boolean},email:null},emits:["sendToken","restartAuth","resendToken"],setup(t,{emit:n}){const e=v({token:""}),c=()=>{n("restartAuth")},_=()=>{n("resendToken")},l=()=>{n("sendToken",e.token)};return(u,i)=>(s(),a("div",q,[o("div",z," Check "+g(t.email)+"'s inbox and enter your verification code below ",1),b(o("input",{"onUpdate:modelValue":i[0]||(i[0]=d=>e.token=d),type:"text",placeholder:"Type your verification code",class:"input",onKeyup:I(l,["enter"])},null,40,O),[[w,e.token]]),t.expired?(s(),a("span",Q," Token expired, try to resend it. ")):p("",!0),t.invalid?(s(),a("span",Y," Token invalid, please try again or go back and alter you email address. ")):p("",!0),j,o("button",{class:"next-button",onClick:l},"Verify Email"),o("button",{class:"secondary-button back",onClick:c},[(s(),a("svg",F,[o("path",{d:V(C)},null,8,G)])),B(" Try Again ")]),o("button",{class:"secondary-button back",onClick:_}," Resend Email "),H]))}});const W=y(J,[["__scopeId","data-v-9316d802"]]),X={key:0,class:"form"},Z={class:"form-wrapper"},ee={class:"widget"},te={key:1,class:"form"},oe={class:"form-wrapper"},ne={class:"widget"},se={key:2,class:"form"},ae={class:"form-wrapper"},ie={class:"loading"},de=h({__name:"Passwordless",props:{header:{type:String,default:"Validate your email"}},emits:["done"],setup(t,{emit:n}){const e=v({stage:"collect-info",info:null,token:null,invalid:!1}),c=async i=>{e.info=i,e.stage="loading";const d=await k.authenticate(i.email);e.invalid=!!d,d?e.stage="collect-info":e.stage="collect-token"},_=async i=>{var d;if(!!((d=e.info)!=null&&d.email)){e.token=i,e.stage="loading";try{const r=await k.verify(e.info.email,e.token);if(!r)throw new Error("no user");n("done",r),e.stage="done"}catch{e.invalid=!0,e.stage="collect-token"}}},l=()=>{e.info&&c(e.info)},u=()=>{e.stage="collect-info",e.info=null,e.token=null,e.invalid=!1};return(i,d)=>{var r,m;return e.stage==="collect-info"?(s(),a("div",X,[o("div",Z,[o("div",ee,[f(U,{invalid:e.invalid,header:t.header,onSendAuthInfo:c},null,8,["invalid","header"])])])])):e.stage==="collect-token"?(s(),a("div",te,[o("div",oe,[o("div",ne,[f(W,{invalid:e.invalid,email:(m=(r=e.info)==null?void 0:r.email)!=null?m:"",onSendToken:_,onResendToken:l,onRestartAuth:u},null,8,["invalid","email"])])])])):(s(),a("div",se,[o("div",ae,[o("div",ie,[f(S)])])]))}}});const ue=y(de,[["__scopeId","data-v-cdf5651f"]]);export{ue as P}; +//# sourceMappingURL=Passwordless.6c7a116b.js.map diff --git a/abstra_statics/dist/assets/Player.1c4efb25.js b/abstra_statics/dist/assets/Player.1c4efb25.js new file mode 100644 index 0000000000..ce53685da9 --- /dev/null +++ b/abstra_statics/dist/assets/Player.1c4efb25.js @@ -0,0 +1,2 @@ +import{r as R}from"./index.23f9da39.js";import{u as g}from"./log.13038e9d.js";import{F as q,R as x}from"./broker.8e45271f.js";import{d as S,v as B,R as w,K as f,z as o,b as s,c as u,e as K,t as b,J as E,H as L,O as N,Q as O,x as d,q as T}from"./registerWidgets.68572380.js";import{D as F,n as C}from"./DashPlayer.1858f538.js";import{a as V}from"./asyncComputed.896b7bde.js";import{r as j,n as z}from"./runnerData.09d29411.js";import{L as A}from"./CircularLoading.30fd4d73.js";import"./passwordlessManager.8fb0aebd.js";import"./icons.3acf9dc1.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.fb00ed8b.js";import"./Passwordless.6c7a116b.js";import"./executeJs.00514c74.js";import"./PlayerNavbar.b0c1c386.js";import"./WidgetsFrame.b4601d67.js";import"./colors.5f5bc2fa.js";import"./Modal.dacb9a40.js";import"./lottie.e503152f.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="3479000c-61ec-4266-985c-b425fbcfa419",a._sentryDebugIdIdentifier="sentry-dbid-3479000c-61ec-4266-985c-b425fbcfa419")}catch{}})();async function H(a){const e=await fetch(`/_api/${a}`);if(e.status==404)return null;if(!e.ok)throw new Error(await e.text());const{form:n,dash:c}=await e.json();return{form:n&&j(n),dash:c&&z(c)}}const p=a=>(N("data-v-7a49cef6"),a=a(),O(),a),J={key:0,class:"loading"},Q={key:1,class:"error"},$=p(()=>d("h1",null,"Oops! Something went wrong",-1)),G=p(()=>d("p",null,"An unknown error ocurred. Please try again or contact support.",-1)),M=[$,G],U={key:2,class:"form"},W={key:3,class:"dash-wrapper"},X={key:4,class:"error not-found"},Y=p(()=>d("h1",null,"Page not found",-1)),Z=p(()=>d("p",null,"The page you requested could not be found.",-1)),ee=[Y,Z],te=S({__name:"Player",setup(a){const e=E(),n=L(),c=B({playerKey:g()}),m=({path:t})=>{n.push({name:"player",query:e.query,params:{path:t.split("/")}})},_=async()=>{c.playerKey=g()};w([()=>e.path,()=>e.query],()=>_());const{loading:k,result:r,error:D}=V(()=>{var t;return H((t=e.path.slice(1))!=null?t:"")}),y=f(()=>i.value?x.create({isLocal:!1,isPreview:!1,formPath:i.value.path}):null),i=f(()=>{var t,l;return(l=(t=r.value)==null?void 0:t.form)!=null?l:null}),h=f(()=>{var l,v;if(!((l=r.value)!=null&&l.dash))return null;const t=C.create((v=r.value)==null?void 0:v.dash,!1);return t.onRedirect(({url:P,queryParams:I})=>R(n,P,I)),t});return w(r,()=>{var t;!r.value||(r.value.form?document.title=(t=r.value.form.welcomeTitle)!=null?t:r.value.form.title:r.value.dash&&(document.title=r.value.dash.title))}),(t,l)=>o(k)?(s(),u("div",J,[K(A)])):o(D)?(s(),u("div",Q,M)):o(i)&&o(y)?(s(),u("div",U,[(s(),b(q,{key:c.playerKey,class:"player",form:o(i),params:o(e).query,broker:o(y),"enable-auto-focus":!0,onNavigate:m,onLogout:_},null,8,["form","params","broker"]))])):o(h)?(s(),u("div",W,[(s(),b(F,{key:c.playerKey,class:"player","is-preview":!1,params:o(e).query,"dash-player-state":o(h),onNavigate:m},null,8,["params","dash-player-state"]))])):(s(),u("div",X,ee))}});const we=T(te,[["__scopeId","data-v-7a49cef6"]]);export{we as default}; +//# sourceMappingURL=Player.1c4efb25.js.map diff --git a/abstra_statics/dist/assets/PlayerNavbar.b0c1c386.js b/abstra_statics/dist/assets/PlayerNavbar.b0c1c386.js new file mode 100644 index 0000000000..bd18144db5 --- /dev/null +++ b/abstra_statics/dist/assets/PlayerNavbar.b0c1c386.js @@ -0,0 +1,2 @@ +import{m as k,l as S}from"./icons.3acf9dc1.js";import{d as h,K as v,b as s,c as n,x as o,F as p,L as R,z as i,G as m,N as f,q as _,v as I,D as l,e as N,I as w,t as x,O as C,Q as D}from"./registerWidgets.68572380.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="54c98034-19ba-45f9-b3ba-0b9c93991da2",e._sentryDebugIdIdentifier="sentry-dbid-54c98034-19ba-45f9-b3ba-0b9c93991da2")}catch{}})();const $={class:"sidebar-content"},B={class:"section"},E=["onClick"],P=h({__name:"Sidebar",props:{currentRuntime:null,displaySidebar:{type:Boolean},forceResponsivity:null},emits:["selectRuntime","closeSidebar"],setup(e,{emit:r}){const d=e,u=v(()=>d.currentRuntime.runtimeType==="dash"),c=t=>{a(t.id)||r("selectRuntime",t)},y=v(()=>d.currentRuntime.sidebar.filter(t=>t.visible)),a=t=>t===d.currentRuntime.id;return(t,g)=>(s(),n("div",{class:m(["sidebar",e.forceResponsivity,{open:e.displaySidebar,dash:i(u)}])},[o("div",$,[o("div",B,[(s(!0),n(p,null,R(i(y),b=>(s(),n("div",{key:b.id,class:m(["item",{active:a(b.id)}]),onClick:Q=>c(b)},[o("div",{class:m(["item-title",{open:e.displaySidebar}])},f(b.name),3)],10,E))),128))])])],2))}});const U=_(P,[["__scopeId","data-v-09ca60c8"]]),T=e=>(C("data-v-e5f51e3c"),e=e(),D(),e),V={class:"left-side"},z=["d"],F={key:1,class:"brand"},L=["src"],q={key:1,class:"brand-name"},G=T(()=>o("div",null,null,-1)),K={key:0,class:"signed-email"},O=h({__name:"PlayerNavbar",props:{runtime:null,brandName:null,userEmail:null,forceResponsivity:null},emits:["logout","navigate"],setup(e,{emit:r}){const d=e,u=I({displaySidebar:!1}),c=v(()=>{const a=d.runtime.sidebar;return!a||a.length==0?!1:a.some(t=>t.visible)}),y=a=>r("navigate",a);return(a,t)=>(s(),n(p,null,[i(c)||e.runtime.logoUrl||e.runtime.brandName||e.userEmail?(s(),n("div",{key:0,class:m(["navbar",(e.runtime.runtimeType=="dash"||i(c))&&"background"])},[o("div",V,[i(c)?(s(),n("svg",{key:0,class:m(["sidebar-menu-icon",e.forceResponsivity,{dash:e.runtime.runtimeType=="dash"}]),viewBox:"0 0 24 24",fill:"var(--color-main)",onClick:t[0]||(t[0]=g=>u.displaySidebar=!u.displaySidebar)},[o("path",{d:i(k)},null,8,z)],2)):l("",!0),e.runtime.logoUrl||e.runtime.brandName?(s(),n("div",F,[e.runtime.logoUrl?(s(),n("img",{key:0,src:e.runtime.logoUrl,class:"logo-image"},null,8,L)):l("",!0),e.runtime.brandName?(s(),n("p",q,f(e.runtime.brandName),1)):l("",!0)])):l("",!0)]),G,e.userEmail?(s(),n("div",K,[o("span",null,f(e.userEmail),1),N(w,{width:"20",height:"20",class:"logout",path:i(S),fill:"var(--color-main)",onClick:t[1]||(t[1]=g=>r("logout"))},null,8,["path"])])):l("",!0)],2)):l("",!0),i(c)?(s(),x(U,{key:1,"current-runtime":e.runtime,"display-sidebar":u.displaySidebar,"force-responsivity":e.forceResponsivity,onSelectRuntime:y},null,8,["current-runtime","display-sidebar","force-responsivity"])):l("",!0)],64))}});const H=_(O,[["__scopeId","data-v-e5f51e3c"]]);export{H as P}; +//# sourceMappingURL=PlayerNavbar.b0c1c386.js.map diff --git a/abstra_statics/dist/assets/PreviewButton.19201cd8.js b/abstra_statics/dist/assets/PreviewButton.19201cd8.js new file mode 100644 index 0000000000..47340156ec --- /dev/null +++ b/abstra_statics/dist/assets/PreviewButton.19201cd8.js @@ -0,0 +1,2 @@ +import{u as a}from"./icons.3acf9dc1.js";import{d,J as u,H as i,a as p,b as _,c as l,e as b,z as f,S as m,q as y}from"./registerWidgets.68572380.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="765e9b11-29b4-4ced-812c-8222be623d16",e._sentryDebugIdIdentifier="sentry-dbid-765e9b11-29b4-4ced-812c-8222be623d16")}catch{}})();const v=d({__name:"PreviewButton",props:{model:null},setup(e){const t=e,o=u(),s=i(),r=()=>{const n=o.query;s.push({path:`/_editor/${t.model.routeName}/${encodeURIComponent(t.model.path)}/preview`,query:n})};return(n,w)=>{const c=p("icon");return _(),l("button",{class:"preview-button",onClick:r},[b(c,{class:"icon",path:f(a),width:"20",height:"20",fill:"#5A677A"},null,8,["path"]),m(" Preview ")])}}});const I=y(v,[["__scopeId","data-v-4b4c109d"]]);export{I as P}; +//# sourceMappingURL=PreviewButton.19201cd8.js.map diff --git a/abstra_statics/dist/assets/Project.d16c89ed.js b/abstra_statics/dist/assets/Project.d16c89ed.js new file mode 100644 index 0000000000..d2d272225a --- /dev/null +++ b/abstra_statics/dist/assets/Project.d16c89ed.js @@ -0,0 +1,2 @@ +import{d as b,K as i,b as _,c as g,e as s,z as c,x as l,F as v,J as f,a as y,q as h}from"./registerWidgets.68572380.js";import{a as d}from"./asyncComputed.896b7bde.js";import{P as I}from"./project.655b0999.js";import"./gateway.7cd64c5e.js";import{O as j}from"./organization.9b0cf47a.js";import"./index.5601bb74.js";import{N as z}from"./Navbar.03b5b117.js";import{S as w}from"./Sidebar.698020b7.js";import{I as P,J as k,E as x,K as B,L as $,M as C,F as D,G as E,H as M}from"./icons.3acf9dc1.js";import"./activeRecord.15082700.js";import"./passwordlessManager.8fb0aebd.js";import"./logo.084e5d7c.js";import"./Tooltip.4f102cfe.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[o]="3db73f79-9daa-4be0-8510-49966b07e4cd",a._sentryDebugIdIdentifier="sentry-dbid-3db73f79-9daa-4be0-8510-49966b07e4cd")}catch{}})();const N={class:"project"},S={class:"content-wrapper"},F=b({__name:"Project",setup(a){const r=f().params.projectId,{result:e}=d(()=>I.get(r)),{result:t}=d(()=>e.value?j.get(e.value.organizationId):Promise.resolve(null)),p=i(()=>{var n;return t.value&&e.value?[{label:(n=t.value)==null?void 0:n.name,path:`/organizations/${t.value.id}`},{label:e.value.name,path:`/projects/${e.value.id}`}]:void 0}),m=i(()=>e.value?[{name:"Project",items:[{name:"Builds",path:"builds",icon:P},{name:"Connectors",path:"connectors",icon:k},{name:"API Keys",path:"api-keys",icon:x},{name:"Env Vars",path:"env-vars",icon:B},{name:"Logs",icon:$,path:"logs",beta:!0},{name:"Settings",icon:C,path:"settings"}]},{name:"Organization",items:[{name:"Projects",icon:D,path:`/organizations/${e.value.organizationId}/projects`},{name:"Members",icon:E,path:`/organizations/${e.value.organizationId}/members`},{name:"Billing",icon:M,path:`/organizations/${e.value.organizationId}/billing`,unavailable:!0}]}]:[]);return(n,K)=>{const u=y("router-view");return _(),g(v,null,[s(z,{class:"nav",breadcrumb:c(p)},null,8,["breadcrumb"]),l("div",N,[s(w,{class:"sidebar",sections:c(m)},null,8,["sections"]),l("div",S,[s(u)])])],64)}}});const X=h(F,[["__scopeId","data-v-f3927501"]]);export{X as default}; +//# sourceMappingURL=Project.d16c89ed.js.map diff --git a/abstra_statics/dist/assets/ProjectSettings.be807dd8.js b/abstra_statics/dist/assets/ProjectSettings.be807dd8.js new file mode 100644 index 0000000000..e454efc519 --- /dev/null +++ b/abstra_statics/dist/assets/ProjectSettings.be807dd8.js @@ -0,0 +1,2 @@ +import{a as S}from"./asyncComputed.896b7bde.js";import{P as I}from"./project.655b0999.js";import"./gateway.7cd64c5e.js";import{d as f,v as C,b as n,c,x as t,e as l,z as r,S as a,N as p,D as _,t as x,a as D,O as v,Q as g,q as y,J as E}from"./registerWidgets.68572380.js";import"./index.5601bb74.js";import{s as P}from"./index.23f9da39.js";import{L as N}from"./CircularLoading.30fd4d73.js";import{N as B,e as A,O as V}from"./icons.3acf9dc1.js";import"./activeRecord.15082700.js";import"./passwordlessManager.8fb0aebd.js";import"./lottie.e503152f.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="a9777fc0-5868-4d8c-9031-58cabdaa09d0",s._sentryDebugIdIdentifier="sentry-dbid-a9777fc0-5868-4d8c-9031-58cabdaa09d0")}catch{}})();const i=s=>(v("data-v-263381f5"),s=s(),g(),s),$={class:"subdomain-editor"},H={class:"title"},L=i(()=>t("div",{class:"subtitle"}," Every project in Abstra Cloud comes with a default subdomain, which will appear on all shared project links. ",-1)),O={key:0,class:"subdomain-presenter"},T={class:"link-item"},z=i(()=>t("div",{class:"link-title"},"Forms and Dashes available at:",-1)),R={class:"link"},q={class:"custom-subdomain"},F={class:"link-item"},J=i(()=>t("div",{class:"link-title"},"Hooks available at:",-1)),M={class:"link"},Q={class:"custom-subdomain"},U={key:1,class:"subdomain-value-editor"},G={class:"subdomain-change-warning"},K={class:"section-title"},W=i(()=>t("div",{class:"section-body"}," Changing the project's subdomain will result in the replacement of the previous URL, which may break any links you've shared previously. ",-1)),X={class:"input-section"},Y={class:"subdomain-value-input"},Z=i(()=>t("span",null,"https://",-1)),tt=["value"],et=i(()=>t("span",null,".abstra.app",-1)),st={key:0,class:"error"},ot={class:"option-buttons"},at=f({__name:"SubdomainEditor",props:{project:null},setup(s){const o=s,e=C({name:o.project.subdomain,error:"",editing:!1,loading:!1}),d=()=>e.editing=!0,m=()=>{k(),e.editing=!1,e.error=""},h=async()=>{e.error="",e.loading=!0,await j(),e.error||(e.editing=!1),e.loading=!1},j=async()=>{if(!(!o.project||o.project.subdomain===e.name)){if(!e.name){e.error="Subdomain cannot be empty";return}o.project.subdomain=e.name,await o.project.save()}},k=()=>e.name=o.project.subdomain,w=b=>{e.name=P(b.target.value,{replacement:"-",lower:!0,strict:!0})};return(b,lt)=>{const u=D("icon");return n(),c("div",$,[t("h2",H,[l(u,{width:"22",height:"22",path:r(B),fill:"#414A58"},null,8,["path"]),a("Subdomain ")]),L,e.editing?(n(),c("div",U,[t("div",G,[t("div",K,[l(u,{path:r(A),width:"12",height:"12",fill:"#D35249"},null,8,["path"]),a(" Be careful ")]),W]),t("div",X,[t("div",Y,[Z,t("input",{value:e.name,type:"text",onInput:w},null,40,tt),et]),e.error?(n(),c("div",st,[l(u,{path:r(V),fill:"#D35249",width:"12",height:"12"},null,8,["path"]),a(" "+p(e.error),1)])):_("",!0),t("div",ot,[t("button",{class:"cancel-button",onClick:m},"Cancel"),t("button",{class:"save-button",onClick:h},[a(" Save Changes "),e.loading?(n(),x(N,{key:0,size:"16"})):_("",!0)])])])])):(n(),c("div",O,[t("div",T,[z,t("div",R,[a(" https://"),t("span",q,p(s.project.subdomain),1),a(".abstra.app/[PATH] ")])]),t("div",F,[J,t("div",M,[a(" https://"),t("span",Q,p(s.project.subdomain),1),a(".abstra.app/_hooks/[PATH] ")])]),t("button",{onClick:d},"Edit Subdomain")]))])}}});const nt=y(at,[["__scopeId","data-v-263381f5"]]),it=s=>(v("data-v-0990f6ef"),s=s(),g(),s),ct={key:0,class:"project-settings"},rt=it(()=>t("div",{class:"header"},[t("div",{class:"title-wrapper"},[t("h1",null,"Project Settings")])],-1)),dt=f({__name:"ProjectSettings",setup(s){const e=E().params.projectId,{result:d}=S(()=>I.get(e));return(m,h)=>r(d)?(n(),c("div",ct,[rt,l(nt,{project:r(d)},null,8,["project"])])):_("",!0)}});const kt=y(dt,[["__scopeId","data-v-0990f6ef"]]);export{kt as default}; +//# sourceMappingURL=ProjectSettings.be807dd8.js.map diff --git a/abstra_statics/dist/assets/Projects.04e404e9.js b/abstra_statics/dist/assets/Projects.04e404e9.js new file mode 100644 index 0000000000..5ea697cc11 --- /dev/null +++ b/abstra_statics/dist/assets/Projects.04e404e9.js @@ -0,0 +1,2 @@ +import{d as j,K as P,z as s,b as w,t as _,D as k,J as h,H as C}from"./registerWidgets.68572380.js";import{f as I,g as x}from"./icons.3acf9dc1.js";import{a as z}from"./asyncComputed.896b7bde.js";import{P as d}from"./project.655b0999.js";import"./gateway.7cd64c5e.js";import{O as D}from"./organization.9b0cf47a.js";import"./index.5601bb74.js";import{C as N}from"./CrudView.22ff1852.js";import"./activeRecord.15082700.js";import"./passwordlessManager.8fb0aebd.js";import"./DropdownMenu.06bbb53d.js";import"./Modal.dacb9a40.js";import"./LoadingIndicator.5fb5b875.js";import"./lottie.e503152f.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="fffa6f61-30fc-421c-be59-8e170d144a6e",r._sentryDebugIdIdentifier="sentry-dbid-fffa6f61-30fc-421c-be59-8e170d144a6e")}catch{}})();const q=j({__name:"Projects",setup(r){const a=[{key:"name",label:"Project Name"}],i=h().params.organizationId,m=C(),{loading:u,result:n,refetch:f}=z(()=>Promise.all([d.list(i),D.get(i)]).then(([e,t])=>({projects:e,organization:t}))),c=({key:e})=>m.push({name:"project",params:{projectId:e}}),p=async e=>{const t=await d.create({organizationId:i,name:e.name});c({key:t.id})},y=async({key:e})=>{var t,o;confirm("Are you sure you want to delete this project?")&&(await((o=(t=n.value)==null?void 0:t.projects.find(g=>g.id===e))==null?void 0:o.delete()),f())},b=P(()=>{var e,t;return{columns:[{name:"Project Name"},{name:"Path"},{name:"Project Actions"}],rows:(t=(e=n.value)==null?void 0:e.projects.map(o=>({key:o.id,cells:[{text:o.name,classes:["title","centered"],link:`/projects/${encodeURIComponent(o.id)}`},{text:o.id},{text:"",classes:["centered"],actions:[{icon:I,label:"Delete",onClick:y,dangerous:!0},{icon:x,label:"Edit Project",onClick:c}]}]})))!=null?t:[]}});return(e,t)=>s(n)?(w(),_(N,{key:0,"entity-name":"project",loading:s(u),title:`${s(n).organization.name}'s Projects`,description:"Organize your team's work into different Projects, each with it's own subdomain.","create-button-text":"Create Project","empty-title":"No projects here yet",table:s(b),fields:a,onCreate:p},null,8,["loading","title","table"])):k("",!0)}});export{q as default}; +//# sourceMappingURL=Projects.04e404e9.js.map diff --git a/abstra_statics/dist/assets/RuntimeList.4dae376a.js b/abstra_statics/dist/assets/RuntimeList.4dae376a.js new file mode 100644 index 0000000000..a93c6c4f47 --- /dev/null +++ b/abstra_statics/dist/assets/RuntimeList.4dae376a.js @@ -0,0 +1,2 @@ +import{D as v,_ as g}from"./DropdownMenu.06bbb53d.js";import{L as w}from"./CircularLoading.30fd4d73.js";import{d as x,b as t,t as d,c as a,x as s,N as n,B as I,F as u,L as m,D as B,a as D,G as _,w as C,S as L,O as S,Q as T,q as N}from"./registerWidgets.68572380.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},l=new Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="2d1aecd3-c2b4-40bc-ba0b-f741ba94ba79",e._sentryDebugIdIdentifier="sentry-dbid-2d1aecd3-c2b4-40bc-ba0b-f741ba94ba79")}catch{}})();const b=e=>(S("data-v-a0aa59f6"),e=e(),T(),e),R={key:1,class:"runtimes-container"},U={class:"header"},V={class:"title-wrapper"},E={class:"description"},F={key:0,class:"empty-list"},j=b(()=>s("img",{src:g},null,-1)),q={class:"empty-list-title"},z={class:"empty-list-description"},A={key:1},G={key:2},M={key:2,class:"video-section"},O=b(()=>s("h1",null,"See it in action",-1)),Q=["src"],$=x({__name:"RuntimeList",props:{loading:{type:Boolean},title:null,description:null,createButtonText:null,emptyTitle:null,videoUrl:null,table:null},emits:["create"],setup(e,{emit:l}){async function c(){l("create")}return(f,H)=>{const h=D("router-link");return e.loading?(t(),d(w,{key:0,class:"loading-wrapper",justify:"center"})):(t(),a("div",R,[s("div",U,[s("div",V,[s("h1",null,n(e.title),1),s("p",E,n(e.description),1),s("button",{onClick:c},n(e.createButtonText),1)])]),e.table.rows.length===0?(t(),a("div",F,[j,s("div",q,n(e.emptyTitle),1),s("div",z,[I(f.$slots,"empty-description",{},void 0,!0)]),s("button",{onClick:c},n(e.createButtonText),1)])):(t(),a("table",A,[s("thead",null,[(t(!0),a(u,null,m(e.table.columns,(i,r)=>(t(),a("td",{key:r,class:"cell"},n(i.name),1))),128))]),(t(!0),a(u,null,m(e.table.rows,(i,r)=>{var y;return t(),a("tr",{key:r,class:_((y=i.classes)!=null?y:[])},[(t(!0),a(u,null,m(i.cells,(o,k)=>{var p;return t(),a("td",{key:k,class:_((p=o.classes)!=null?p:[])},[o.actions?(t(),d(v,{key:0,title:"Actions","highlight-last":!0,options:o.actions,payload:{key:i.key}},null,8,["options","payload"])):o.link?(t(),d(h,{key:1,to:o.link,class:"runtime-title"},{default:C(()=>[L(n(o.text),1)]),_:2},1032,["to"])):(t(),a("div",G,n(o.text),1))],2)}),128))],2)}),128))])),e.videoUrl?(t(),a("section",M,[O,s("iframe",{class:"runtimes-example-video",src:e.videoUrl,title:"runtimes example",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""},null,8,Q)])):B("",!0)]))}}});const W=N($,[["__scopeId","data-v-a0aa59f6"]]);export{W as R}; +//# sourceMappingURL=RuntimeList.4dae376a.js.map diff --git a/abstra_statics/dist/assets/SaveButton.f5cf0ed0.js b/abstra_statics/dist/assets/SaveButton.f5cf0ed0.js new file mode 100644 index 0000000000..39dec1184e --- /dev/null +++ b/abstra_statics/dist/assets/SaveButton.f5cf0ed0.js @@ -0,0 +1,2 @@ +import{j as c}from"./icons.3acf9dc1.js";import{d as i,r as u,b as f,c as v,e as p,z as y,S as _,N as m,G as b,a as g,q as h}from"./registerWidgets.68572380.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9c9dab33-05ae-45cd-9605-3eda2c829c65",e._sentryDebugIdIdentifier="sentry-dbid-9c9dab33-05ae-45cd-9605-3eda2c829c65")}catch{}})();const S=i({__name:"SaveButton",props:{model:null},setup(e){const n=e,t=u(!1);async function s(){t.value=!0;try{await n.model.save()}finally{t.value=!1}}return addEventListener("keydown",a=>{(a.metaKey||a.ctrlKey)&&a.key==="s"&&(a.preventDefault(),s())}),addEventListener("beforeunload",a=>{n.model.hasChanges()&&(a.preventDefault(),a.returnValue="")}),(a,o)=>{var d,l;const r=g("icon");return f(),v("button",{class:b(["save-button",{changes:(d=e.model)==null?void 0:d.hasChanges()}]),onClick:o[0]||(o[0]=w=>s())},[p(r,{class:"icon",path:y(c),width:"20",height:"20",fill:"#5A677A"},null,8,["path"]),_(" "+m(t.value?"Saving ...":(l=e.model)!=null&&l.hasChanges()?"Save":"Saved"),1)],2)}}});const k=h(S,[["__scopeId","data-v-0e370bd3"]]);export{k as S}; +//# sourceMappingURL=SaveButton.f5cf0ed0.js.map diff --git a/abstra_statics/dist/assets/Sidebar.698020b7.js b/abstra_statics/dist/assets/Sidebar.698020b7.js new file mode 100644 index 0000000000..0cdf991d84 --- /dev/null +++ b/abstra_statics/dist/assets/Sidebar.698020b7.js @@ -0,0 +1,2 @@ +import{d as v,r as w,b as a,c as s,F as u,L as _,H as k,J as m,x as b,N as p,G as f,e as h,I as g,D as l,t as x,w as D,z as I,q as C}from"./registerWidgets.68572380.js";import{e as S}from"./icons.3acf9dc1.js";import{T as B}from"./Tooltip.4f102cfe.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="2ab44a5e-7302-474b-8618-b685ada14feb",t._sentryDebugIdIdentifier="sentry-dbid-2ab44a5e-7302-474b-8618-b685ada14feb")}catch{}})();const N={class:"sidebar"},T={class:"section-name"},O=["onClick"],E={class:"item-name"},L={key:0,class:"tag soon"},V={key:1,class:"tag beta"},z={key:2,class:"tag cloud"},F=v({__name:"Sidebar",props:{sections:null},setup(t){var i;const n=k(),d=m(),c=w((i=d.name)!=null?i:"forms"),y=o=>{o.unavailable||(n.push(o.path),c.value=o.path)};return(o,R)=>(a(),s("div",N,[(a(!0),s(u,null,_(t.sections,r=>(a(),s("div",{key:r.name,class:"section"},[b("span",T,p(r.name),1),(a(!0),s(u,null,_(r.items,e=>(a(),s("div",{key:e.name,role:"button",class:f(["item",{active:c.value===e.path,disabled:e.unavailable||r.cloud}]),tabindex:"0",onClick:q=>y(e)},[h(g,{class:f(["icon",{disabled:e.unavailable,active:c.value===e.path}]),path:e.icon,width:"20",height:"20"},null,8,["class","path"]),b("span",E,p(e.name),1),e.unavailable?(a(),s("span",L,"SOON")):l("",!0),e.beta?(a(),s("span",V,"BETA")):l("",!0),e.cloud?(a(),s("span",z,"CLOUD")):l("",!0),e.warning?(a(),x(B,{key:3,class:"warning",text:e.warning,fixed:!0,top:18,left:18},{default:D(()=>[h(g,{path:I(S),fill:"#D35249",width:"20",height:"20"},null,8,["path"])]),_:2},1032,["text"])):l("",!0)],10,O))),128))]))),128))]))}});const J=C(F,[["__scopeId","data-v-65839ebd"]]);export{J as S}; +//# sourceMappingURL=Sidebar.698020b7.js.map diff --git a/abstra_statics/dist/assets/SidebarEditor.b088e959.js b/abstra_statics/dist/assets/SidebarEditor.b088e959.js new file mode 100644 index 0000000000..45a3f3449a --- /dev/null +++ b/abstra_statics/dist/assets/SidebarEditor.b088e959.js @@ -0,0 +1,11 @@ +import{Z as qr,$ as _r,p as tn,a0 as en,d as jr,r as rn,R as nn,o as on,U as _e,b as ur,c as wr,e as Ge,w as an,z as ee,x as jt,N as Er,V as sn,a1 as ln,O as Fr,Q as Lr,q as Ur,t as fn}from"./registerWidgets.68572380.js";import{W as un}from"./workspaces.6e8c216b.js";import{a as cn}from"./asyncComputed.896b7bde.js";import{L as dn}from"./CircularLoading.30fd4d73.js";import{S as vn}from"./SaveButton.f5cf0ed0.js";import{S as hn}from"./SidebarPreview.12cd3f9f.js";import"./activeRecord.15082700.js";import"./lottie.e503152f.js";import"./icons.3acf9dc1.js";import"./PlayerNavbar.b0c1c386.js";import"./runnerData.09d29411.js";import"./colors.5f5bc2fa.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="71038f59-0fb0-4180-a9e2-b0e17ff12a87",s._sentryDebugIdIdentifier="sentry-dbid-71038f59-0fb0-4180-a9e2-b0e17ff12a87")}catch{}})();var $r={exports:{}};/**! + * Sortable 1.14.0 + * @author RubaXa + * @author owenm + * @license MIT + */function xr(s,r){var n=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);r&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(s,e).enumerable})),n.push.apply(n,i)}return n}function Ht(s){for(var r=1;r=0)&&(n[e]=s[e]);return n}function mn(s,r){if(s==null)return{};var n=gn(s,r),i,e;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(s);for(e=0;e=0)&&(!Object.prototype.propertyIsEnumerable.call(s,i)||(n[i]=s[i]))}return n}function yn(s){return Sn(s)||bn(s)||En(s)||xn()}function Sn(s){if(Array.isArray(s))return cr(s)}function bn(s){if(typeof Symbol<"u"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}function En(s,r){if(!!s){if(typeof s=="string")return cr(s,r);var n=Object.prototype.toString.call(s).slice(8,-1);if(n==="Object"&&s.constructor&&(n=s.constructor.name),n==="Map"||n==="Set")return Array.from(s);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cr(s,r)}}function cr(s,r){(r==null||r>s.length)&&(r=s.length);for(var n=0,i=new Array(r);n"&&(r=r.substring(1)),s)try{if(s.matches)return s.matches(r);if(s.msMatchesSelector)return s.msMatchesSelector(r);if(s.webkitMatchesSelector)return s.webkitMatchesSelector(r)}catch{return!1}return!1}}function Tn(s){return s.host&&s!==document&&s.host.nodeType?s.host:s.parentNode}function $t(s,r,n,i){if(s){n=n||document;do{if(r!=null&&(r[0]===">"?s.parentNode===n&&Xe(s,r):Xe(s,r))||i&&s===n)return s;if(s===n)break}while(s=Tn(s))}return null}var Ir=/\s+/g;function st(s,r,n){if(s&&r)if(s.classList)s.classList[n?"add":"remove"](r);else{var i=(" "+s.className+" ").replace(Ir," ").replace(" "+r+" "," ");s.className=(i+(n?" "+r:"")).replace(Ir," ")}}function L(s,r,n){var i=s&&s.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(s,""):s.currentStyle&&(n=s.currentStyle),r===void 0?n:n[r];!(r in i)&&r.indexOf("webkit")===-1&&(r="-webkit-"+r),i[r]=n+(typeof n=="string"?"":"px")}}function ne(s,r){var n="";if(typeof s=="string")n=s;else do{var i=L(s,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!r&&(s=s.parentNode));var e=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return e&&new e(n)}function Kr(s,r,n){if(s){var i=s.getElementsByTagName(r),e=0,f=i.length;if(n)for(;e=f:t=e<=f,!t)return i;if(i===Kt())break;i=Zt(i,!1)}return!1}function ue(s,r,n,i){for(var e=0,f=0,t=s.children;f2&&arguments[2]!==void 0?arguments[2]:{},e=i.evt,f=mn(i,Mn);Re.pluginEvent.bind(K)(r,n,Ht({dragEl:A,parentEl:ut,ghostEl:z,rootEl:ot,nextEl:re,lastDownEl:Ke,cloneEl:ct,cloneHidden:Qt,dragStarted:Ee,putSortable:Et,activeSortable:K.active,originalEvent:e,oldIndex:fe,oldDraggableIndex:De,newIndex:Nt,newDraggableIndex:Jt,hideGhostForTarget:zr,unhideGhostForTarget:Jr,cloneNowHidden:function(){Qt=!0},cloneNowShown:function(){Qt=!1},dispatchSortableEvent:function(o){Tt({sortable:n,name:o,originalEvent:e})}},f))};function Tt(s){be(Ht({putSortable:Et,cloneEl:ct,targetEl:A,rootEl:ot,oldIndex:fe,oldDraggableIndex:De,newIndex:Nt,newDraggableIndex:Jt},s))}var A,ut,z,ot,re,Ke,ct,Qt,fe,Nt,De,Jt,je,Et,le=!1,Ye=!1,ze=[],_t,Lt,nr,or,Cr,Ar,Ee,ie,Pe,Ce=!1,we=!1,He,xt,ar=[],dr=!1,Je=[],Ze=typeof document<"u",Fe=Gr,Rr=Ae||Xt?"cssFloat":"float",jn=Ze&&!In&&!Gr&&"draggable"in document.createElement("div"),Wr=function(){if(!!Ze){if(Xt)return!1;var s=document.createElement("x");return s.style.cssText="pointer-events:auto",s.style.pointerEvents==="auto"}}(),Xr=function(r,n){var i=L(r),e=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),f=ue(r,0,n),t=ue(r,1,n),o=f&&L(f),a=t&&L(t),l=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+at(f).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+at(t).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(f&&o.float&&o.float!=="none"){var u=o.float==="left"?"left":"right";return t&&(a.clear==="both"||a.clear===u)?"vertical":"horizontal"}return f&&(o.display==="block"||o.display==="flex"||o.display==="table"||o.display==="grid"||l>=e&&i[Rr]==="none"||t&&i[Rr]==="none"&&l+c>e)?"vertical":"horizontal"},wn=function(r,n,i){var e=i?r.left:r.top,f=i?r.right:r.bottom,t=i?r.width:r.height,o=i?n.left:n.top,a=i?n.right:n.bottom,l=i?n.width:n.height;return e===o||f===a||e+t/2===o+l/2},Fn=function(r,n){var i;return ze.some(function(e){var f=e[Ot].options.emptyInsertThreshold;if(!(!f||gr(e))){var t=at(e),o=r>=t.left-f&&r<=t.right+f,a=n>=t.top-f&&n<=t.bottom+f;if(o&&a)return i=e}}),i},Yr=function(r){function n(f,t){return function(o,a,l,c){var u=o.options.group.name&&a.options.group.name&&o.options.group.name===a.options.group.name;if(f==null&&(t||u))return!0;if(f==null||f===!1)return!1;if(t&&f==="clone")return f;if(typeof f=="function")return n(f(o,a,l,c),t)(o,a,l,c);var d=(t?o:a).options.group.name;return f===!0||typeof f=="string"&&f===d||f.join&&f.indexOf(d)>-1}}var i={},e=r.group;(!e||Be(e)!="object")&&(e={name:e}),i.name=e.name,i.checkPull=n(e.pull,!0),i.checkPut=n(e.put),i.revertClone=e.revertClone,r.group=i},zr=function(){!Wr&&z&&L(z,"display","none")},Jr=function(){!Wr&&z&&L(z,"display","")};Ze&&document.addEventListener("click",function(s){if(Ye)return s.preventDefault(),s.stopPropagation&&s.stopPropagation(),s.stopImmediatePropagation&&s.stopImmediatePropagation(),Ye=!1,!1},!0);var te=function(r){if(A){r=r.touches?r.touches[0]:r;var n=Fn(r.clientX,r.clientY);if(n){var i={};for(var e in r)r.hasOwnProperty(e)&&(i[e]=r[e]);i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[Ot]._onDragOver(i)}}},Ln=function(r){A&&A.parentNode[Ot]._isOutsideThisEl(r.target)};function K(s,r){if(!(s&&s.nodeType&&s.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(s));this.el=s,this.options=r=wt({},r),s[Ot]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(s.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Xr(s,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,o){t.setData("Text",o.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:K.supportPointer!==!1&&"PointerEvent"in window&&!Ie,emptyInsertThreshold:5};Re.initializePlugins(this,s,n);for(var i in n)!(i in r)&&(r[i]=n[i]);Yr(r);for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this));this.nativeDraggable=r.forceFallback?!1:jn,this.nativeDraggable&&(this.options.touchStartThreshold=1),r.supportPointer?Z(s,"pointerdown",this._onTapStart):(Z(s,"mousedown",this._onTapStart),Z(s,"touchstart",this._onTapStart)),this.nativeDraggable&&(Z(s,"dragover",this),Z(s,"dragenter",this)),ze.push(this.el),r.store&&r.store.get&&this.sort(r.store.get(this)||[]),wt(this,An())}K.prototype={constructor:K,_isOutsideThisEl:function(r){!this.el.contains(r)&&r!==this.el&&(ie=null)},_getDirection:function(r,n){return typeof this.options.direction=="function"?this.options.direction.call(this,r,n,A):this.options.direction},_onTapStart:function(r){if(!!r.cancelable){var n=this,i=this.el,e=this.options,f=e.preventOnFilter,t=r.type,o=r.touches&&r.touches[0]||r.pointerType&&r.pointerType==="touch"&&r,a=(o||r).target,l=r.target.shadowRoot&&(r.path&&r.path[0]||r.composedPath&&r.composedPath()[0])||a,c=e.filter;if(Wn(i),!A&&!(/mousedown|pointerdown/.test(t)&&r.button!==0||e.disabled)&&!l.isContentEditable&&!(!this.nativeDraggable&&Ie&&a&&a.tagName.toUpperCase()==="SELECT")&&(a=$t(a,e.draggable,i,!1),!(a&&a.animated)&&Ke!==a)){if(fe=dt(a),De=dt(a,e.draggable),typeof c=="function"){if(c.call(this,r,a,this)){Tt({sortable:n,rootEl:l,name:"filter",targetEl:a,toEl:i,fromEl:i}),Pt("filter",n,{evt:r}),f&&r.cancelable&&r.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=$t(l,u.trim(),i,!1),u)return Tt({sortable:n,rootEl:u,name:"filter",targetEl:a,fromEl:i,toEl:i}),Pt("filter",n,{evt:r}),!0}),c)){f&&r.cancelable&&r.preventDefault();return}e.handle&&!$t(l,e.handle,i,!1)||this._prepareDragStart(r,o,a)}}},_prepareDragStart:function(r,n,i){var e=this,f=e.el,t=e.options,o=f.ownerDocument,a;if(i&&!A&&i.parentNode===f){var l=at(i);if(ot=f,A=i,ut=A.parentNode,re=A.nextSibling,Ke=i,je=t.group,K.dragged=A,_t={target:A,clientX:(n||r).clientX,clientY:(n||r).clientY},Cr=_t.clientX-l.left,Ar=_t.clientY-l.top,this._lastX=(n||r).clientX,this._lastY=(n||r).clientY,A.style["will-change"]="all",a=function(){if(Pt("delayEnded",e,{evt:r}),K.eventCanceled){e._onDrop();return}e._disableDelayedDragEvents(),!Or&&e.nativeDraggable&&(A.draggable=!0),e._triggerDragStart(r,n),Tt({sortable:e,name:"choose",originalEvent:r}),st(A,t.chosenClass,!0)},t.ignore.split(",").forEach(function(c){Kr(A,c.trim(),ir)}),Z(o,"dragover",te),Z(o,"mousemove",te),Z(o,"touchmove",te),Z(o,"mouseup",e._onDrop),Z(o,"touchend",e._onDrop),Z(o,"touchcancel",e._onDrop),Or&&this.nativeDraggable&&(this.options.touchStartThreshold=4,A.draggable=!0),Pt("delayStart",this,{evt:r}),t.delay&&(!t.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Ae||Xt))){if(K.eventCanceled){this._onDrop();return}Z(o,"mouseup",e._disableDelayedDrag),Z(o,"touchend",e._disableDelayedDrag),Z(o,"touchcancel",e._disableDelayedDrag),Z(o,"mousemove",e._delayedDragTouchMoveHandler),Z(o,"touchmove",e._delayedDragTouchMoveHandler),t.supportPointer&&Z(o,"pointermove",e._delayedDragTouchMoveHandler),e._dragStartTimer=setTimeout(a,t.delay)}else a()}},_delayedDragTouchMoveHandler:function(r){var n=r.touches?r.touches[0]:r;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){A&&ir(A),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var r=this.el.ownerDocument;Q(r,"mouseup",this._disableDelayedDrag),Q(r,"touchend",this._disableDelayedDrag),Q(r,"touchcancel",this._disableDelayedDrag),Q(r,"mousemove",this._delayedDragTouchMoveHandler),Q(r,"touchmove",this._delayedDragTouchMoveHandler),Q(r,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(r,n){n=n||r.pointerType=="touch"&&r,!this.nativeDraggable||n?this.options.supportPointer?Z(document,"pointermove",this._onTouchMove):n?Z(document,"touchmove",this._onTouchMove):Z(document,"mousemove",this._onTouchMove):(Z(A,"dragend",this),Z(ot,"dragstart",this._onDragStart));try{document.selection?Ve(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(r,n){if(le=!1,ot&&A){Pt("dragStarted",this,{evt:n}),this.nativeDraggable&&Z(document,"dragover",Ln);var i=this.options;!r&&st(A,i.dragClass,!1),st(A,i.ghostClass,!0),K.active=this,r&&this._appendGhost(),Tt({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Lt){this._lastX=Lt.clientX,this._lastY=Lt.clientY,zr();for(var r=document.elementFromPoint(Lt.clientX,Lt.clientY),n=r;r&&r.shadowRoot&&(r=r.shadowRoot.elementFromPoint(Lt.clientX,Lt.clientY),r!==n);)n=r;if(A.parentNode[Ot]._isOutsideThisEl(r),n)do{if(n[Ot]){var i=void 0;if(i=n[Ot]._onDragOver({clientX:Lt.clientX,clientY:Lt.clientY,target:r,rootEl:n}),i&&!this.options.dragoverBubble)break}r=n}while(n=n.parentNode);Jr()}},_onTouchMove:function(r){if(_t){var n=this.options,i=n.fallbackTolerance,e=n.fallbackOffset,f=r.touches?r.touches[0]:r,t=z&&ne(z,!0),o=z&&t&&t.a,a=z&&t&&t.d,l=Fe&&xt&&Dr(xt),c=(f.clientX-_t.clientX+e.x)/(o||1)+(l?l[0]-ar[0]:0)/(o||1),u=(f.clientY-_t.clientY+e.y)/(a||1)+(l?l[1]-ar[1]:0)/(a||1);if(!K.active&&!le){if(i&&Math.max(Math.abs(f.clientX-this._lastX),Math.abs(f.clientY-this._lastY))=0&&(Tt({rootEl:ut,name:"add",toEl:ut,fromEl:ot,originalEvent:r}),Tt({sortable:this,name:"remove",toEl:ut,originalEvent:r}),Tt({rootEl:ut,name:"sort",toEl:ut,fromEl:ot,originalEvent:r}),Tt({sortable:this,name:"sort",toEl:ut,originalEvent:r})),Et&&Et.save()):Nt!==fe&&Nt>=0&&(Tt({sortable:this,name:"update",toEl:ut,originalEvent:r}),Tt({sortable:this,name:"sort",toEl:ut,originalEvent:r})),K.active&&((Nt==null||Nt===-1)&&(Nt=fe,Jt=De),Tt({sortable:this,name:"end",toEl:ut,originalEvent:r}),this.save()))),this._nulling()},_nulling:function(){Pt("nulling",this),ot=A=ut=z=re=ct=Ke=Qt=_t=Lt=Ee=Nt=Jt=fe=De=ie=Pe=Et=je=K.dragged=K.ghost=K.clone=K.active=null,Je.forEach(function(r){r.checked=!0}),Je.length=nr=or=0},handleEvent:function(r){switch(r.type){case"drop":case"dragend":this._onDrop(r);break;case"dragenter":case"dragover":A&&(this._onDragOver(r),Un(r));break;case"selectstart":r.preventDefault();break}},toArray:function(){for(var r=[],n,i=this.el.children,e=0,f=i.length,t=this.options;ei.right+e||s.clientX<=i.right&&s.clientY>i.bottom&&s.clientX>=i.left:s.clientX>i.right&&s.clientY>i.top||s.clientX<=i.right&&s.clientY>i.bottom+e}function Kn(s,r,n,i,e,f,t,o){var a=i?s.clientY:s.clientX,l=i?n.height:n.width,c=i?n.top:n.left,u=i?n.bottom:n.right,d=!1;if(!t){if(o&&Hec+l*f/2:au-He)return-Pe}else if(a>c+l*(1-e)/2&&au-l*f/2)?a>c+l/2?1:-1:0}function Hn(s){return dt(A)1&&(Y.forEach(function(o){f.addAnimationState({target:o,rect:Ct?at(o):t}),er(o),o.fromRect=t,i.removeAnimationState(o)}),Ct=!1,Qn(!this.options.removeCloneOnHide,e))},dragOverCompleted:function(n){var i=n.sortable,e=n.isOwner,f=n.insertion,t=n.activeSortable,o=n.parentEl,a=n.putSortable,l=this.options;if(f){if(e&&t._hideClone(),ye=!1,l.animation&&Y.length>1&&(Ct||!e&&!t.options.sort&&!a)){var c=at(et,!1,!0,!0);Y.forEach(function(d){d!==et&&(Pr(d,c),o.appendChild(d))}),Ct=!0}if(!e)if(Ct||$e(),Y.length>1){var u=Ue;t._showClone(i),t.options.animation&&!Ue&&u&&Rt.forEach(function(d){t.addAnimationState({target:d,rect:Se}),d.fromRect=Se,d.thisAnimationDuration=null})}else t._showClone(i)}},dragOverAnimationCapture:function(n){var i=n.dragRect,e=n.isOwner,f=n.activeSortable;if(Y.forEach(function(o){o.thisAnimationDuration=null}),f.options.animation&&!e&&f.multiDrag.isMultiDrag){Se=wt({},i);var t=ne(et,!0);Se.top-=t.f,Se.left-=t.e}},dragOverAnimationComplete:function(){Ct&&(Ct=!1,$e())},drop:function(n){var i=n.originalEvent,e=n.rootEl,f=n.parentEl,t=n.sortable,o=n.dispatchSortableEvent,a=n.oldIndex,l=n.putSortable,c=l||this.sortable;if(!!i){var u=this.options,d=f.children;if(!se)if(u.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),st(et,u.selectedClass,!~Y.indexOf(et)),~Y.indexOf(et))Y.splice(Y.indexOf(et),1),me=null,be({sortable:t,rootEl:e,name:"deselect",targetEl:et,originalEvt:i});else{if(Y.push(et),be({sortable:t,rootEl:e,name:"select",targetEl:et,originalEvt:i}),i.shiftKey&&me&&t.el.contains(me)){var v=dt(me),h=dt(et);if(~v&&~h&&v!==h){var p,g;for(h>v?(g=v,p=h):(g=h,p=v+1);g1){var S=at(et),b=dt(et,":not(."+this.options.selectedClass+")");if(!ye&&u.animation&&(et.thisAnimationDuration=null),c.captureAnimationState(),!ye&&(u.animation&&(et.fromRect=S,Y.forEach(function(x){if(x.thisAnimationDuration=null,x!==et){var D=Ct?at(x):S;x.fromRect=D,c.addAnimationState({target:x,rect:D})}})),$e(),Y.forEach(function(x){d[b]?f.insertBefore(x,d[b]):f.appendChild(x),b++}),a===dt(et))){var T=!1;Y.forEach(function(x){if(x.sortableIndex!==dt(x)){T=!0;return}}),T&&o("update")}Y.forEach(function(x){er(x)}),c.animateAll()}Ut=c}(e===f||l&&l.lastPutMode!=="clone")&&Rt.forEach(function(x){x.parentNode&&x.parentNode.removeChild(x)})}},nullingGlobal:function(){this.isMultiDrag=se=!1,Rt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),Q(document,"pointerup",this._deselectMultiDrag),Q(document,"mouseup",this._deselectMultiDrag),Q(document,"touchend",this._deselectMultiDrag),Q(document,"keydown",this._checkKeyDown),Q(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(n){if(!(typeof se<"u"&&se)&&Ut===this.sortable&&!(n&&$t(n.target,this.options.draggable,this.sortable.el,!1))&&!(n&&n.button!==0))for(;Y.length;){var i=Y[0];st(i,this.options.selectedClass,!1),Y.shift(),be({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:i,originalEvt:n})}},_checkKeyDown:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},wt(s,{pluginName:"multiDrag",utils:{select:function(n){var i=n.parentNode[Ot];!i||!i.options.multiDrag||~Y.indexOf(n)||(Ut&&Ut!==i&&(Ut.multiDrag._deselectMultiDrag(),Ut=i),st(n,i.options.selectedClass,!0),Y.push(n))},deselect:function(n){var i=n.parentNode[Ot],e=Y.indexOf(n);!i||!i.options.multiDrag||!~e||(st(n,i.options.selectedClass,!1),Y.splice(e,1))}},eventProperties:function(){var n=this,i=[],e=[];return Y.forEach(function(f){i.push({multiDragElement:f,index:f.sortableIndex});var t;Ct&&f!==et?t=-1:Ct?t=dt(f,":not(."+n.options.selectedClass+")"):t=dt(f),e.push({multiDragElement:f,index:t})}),{items:yn(Y),clones:[].concat(Rt),oldIndicies:i,newIndicies:e}},optionListeners:{multiDragKey:function(n){return n=n.toLowerCase(),n==="ctrl"?n="Control":n.length>1&&(n=n.charAt(0).toUpperCase()+n.substr(1)),n}}})}function Qn(s,r){Y.forEach(function(n,i){var e=r.children[n.sortableIndex+(s?Number(i):0)];e?r.insertBefore(n,e):r.appendChild(n)})}function Mr(s,r){Rt.forEach(function(n,i){var e=r.children[n.sortableIndex+(s?Number(i):0)];e?r.insertBefore(n,e):r.appendChild(n)})}function $e(){Y.forEach(function(s){s!==et&&s.parentNode&&s.parentNode.removeChild(s)})}K.mount(new Xn);K.mount(Sr,yr);const Zn=Object.freeze(Object.defineProperty({__proto__:null,default:K,MultiDrag:Jn,Sortable:K,Swap:Yn},Symbol.toStringTag,{value:"Module"})),kn=qr(Zn);(function(s,r){(function(i,e){s.exports=e(_r,kn)})(typeof self<"u"?self:tn,function(n,i){return function(e){var f={};function t(o){if(f[o])return f[o].exports;var a=f[o]={i:o,l:!1,exports:{}};return e[o].call(a.exports,a,a.exports,t),a.l=!0,a.exports}return t.m=e,t.c=f,t.d=function(o,a,l){t.o(o,a)||Object.defineProperty(o,a,{enumerable:!0,get:l})},t.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},t.t=function(o,a){if(a&1&&(o=t(o)),a&8||a&4&&typeof o=="object"&&o&&o.__esModule)return o;var l=Object.create(null);if(t.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:o}),a&2&&typeof o!="string")for(var c in o)t.d(l,c,function(u){return o[u]}.bind(null,c));return l},t.n=function(o){var a=o&&o.__esModule?function(){return o.default}:function(){return o};return t.d(a,"a",a),a},t.o=function(o,a){return Object.prototype.hasOwnProperty.call(o,a)},t.p="",t(t.s="fb15")}({"00ee":function(e,f,t){var o=t("b622"),a=o("toStringTag"),l={};l[a]="z",e.exports=String(l)==="[object z]"},"0366":function(e,f,t){var o=t("1c0b");e.exports=function(a,l,c){if(o(a),l===void 0)return a;switch(c){case 0:return function(){return a.call(l)};case 1:return function(u){return a.call(l,u)};case 2:return function(u,d){return a.call(l,u,d)};case 3:return function(u,d,v){return a.call(l,u,d,v)}}return function(){return a.apply(l,arguments)}}},"057f":function(e,f,t){var o=t("fc6a"),a=t("241c").f,l={}.toString,c=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(d){try{return a(d)}catch{return c.slice()}};e.exports.f=function(v){return c&&l.call(v)=="[object Window]"?u(v):a(o(v))}},"06cf":function(e,f,t){var o=t("83ab"),a=t("d1e7"),l=t("5c6c"),c=t("fc6a"),u=t("c04e"),d=t("5135"),v=t("0cfb"),h=Object.getOwnPropertyDescriptor;f.f=o?h:function(g,S){if(g=c(g),S=u(S,!0),v)try{return h(g,S)}catch{}if(d(g,S))return l(!a.f.call(g,S),g[S])}},"0cfb":function(e,f,t){var o=t("83ab"),a=t("d039"),l=t("cc12");e.exports=!o&&!a(function(){return Object.defineProperty(l("div"),"a",{get:function(){return 7}}).a!=7})},"13d5":function(e,f,t){var o=t("23e7"),a=t("d58f").left,l=t("a640"),c=t("ae40"),u=l("reduce"),d=c("reduce",{1:0});o({target:"Array",proto:!0,forced:!u||!d},{reduce:function(h){return a(this,h,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(e,f,t){var o=t("c6b6"),a=t("9263");e.exports=function(l,c){var u=l.exec;if(typeof u=="function"){var d=u.call(l,c);if(typeof d!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return d}if(o(l)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return a.call(l,c)}},"159b":function(e,f,t){var o=t("da84"),a=t("fdbc"),l=t("17c2"),c=t("9112");for(var u in a){var d=o[u],v=d&&d.prototype;if(v&&v.forEach!==l)try{c(v,"forEach",l)}catch{v.forEach=l}}},"17c2":function(e,f,t){var o=t("b727").forEach,a=t("a640"),l=t("ae40"),c=a("forEach"),u=l("forEach");e.exports=!c||!u?function(v){return o(this,v,arguments.length>1?arguments[1]:void 0)}:[].forEach},"1be4":function(e,f,t){var o=t("d066");e.exports=o("document","documentElement")},"1c0b":function(e,f){e.exports=function(t){if(typeof t!="function")throw TypeError(String(t)+" is not a function");return t}},"1c7e":function(e,f,t){var o=t("b622"),a=o("iterator"),l=!1;try{var c=0,u={next:function(){return{done:!!c++}},return:function(){l=!0}};u[a]=function(){return this},Array.from(u,function(){throw 2})}catch{}e.exports=function(d,v){if(!v&&!l)return!1;var h=!1;try{var p={};p[a]=function(){return{next:function(){return{done:h=!0}}}},d(p)}catch{}return h}},"1d80":function(e,f){e.exports=function(t){if(t==null)throw TypeError("Can't call method on "+t);return t}},"1dde":function(e,f,t){var o=t("d039"),a=t("b622"),l=t("2d00"),c=a("species");e.exports=function(u){return l>=51||!o(function(){var d=[],v=d.constructor={};return v[c]=function(){return{foo:1}},d[u](Boolean).foo!==1})}},"23cb":function(e,f,t){var o=t("a691"),a=Math.max,l=Math.min;e.exports=function(c,u){var d=o(c);return d<0?a(d+u,0):l(d,u)}},"23e7":function(e,f,t){var o=t("da84"),a=t("06cf").f,l=t("9112"),c=t("6eeb"),u=t("ce4e"),d=t("e893"),v=t("94ca");e.exports=function(h,p){var g=h.target,S=h.global,b=h.stat,T,x,D,O,F,U;if(S?x=o:b?x=o[g]||u(g,{}):x=(o[g]||{}).prototype,x)for(D in p){if(F=p[D],h.noTargetGet?(U=a(x,D),O=U&&U.value):O=x[D],T=v(S?D:g+(b?".":"#")+D,h.forced),!T&&O!==void 0){if(typeof F==typeof O)continue;d(F,O)}(h.sham||O&&O.sham)&&l(F,"sham",!0),c(x,D,F,h)}}},"241c":function(e,f,t){var o=t("ca84"),a=t("7839"),l=a.concat("length","prototype");f.f=Object.getOwnPropertyNames||function(u){return o(u,l)}},"25f0":function(e,f,t){var o=t("6eeb"),a=t("825a"),l=t("d039"),c=t("ad6d"),u="toString",d=RegExp.prototype,v=d[u],h=l(function(){return v.call({source:"a",flags:"b"})!="/a/b"}),p=v.name!=u;(h||p)&&o(RegExp.prototype,u,function(){var S=a(this),b=String(S.source),T=S.flags,x=String(T===void 0&&S instanceof RegExp&&!("flags"in d)?c.call(S):T);return"/"+b+"/"+x},{unsafe:!0})},"2ca0":function(e,f,t){var o=t("23e7"),a=t("06cf").f,l=t("50c4"),c=t("5a34"),u=t("1d80"),d=t("ab13"),v=t("c430"),h="".startsWith,p=Math.min,g=d("startsWith"),S=!v&&!g&&!!function(){var b=a(String.prototype,"startsWith");return b&&!b.writable}();o({target:"String",proto:!0,forced:!S&&!g},{startsWith:function(T){var x=String(u(this));c(T);var D=l(p(arguments.length>1?arguments[1]:void 0,x.length)),O=String(T);return h?h.call(x,O,D):x.slice(D,D+O.length)===O}})},"2d00":function(e,f,t){var o=t("da84"),a=t("342f"),l=o.process,c=l&&l.versions,u=c&&c.v8,d,v;u?(d=u.split("."),v=d[0]+d[1]):a&&(d=a.match(/Edge\/(\d+)/),(!d||d[1]>=74)&&(d=a.match(/Chrome\/(\d+)/),d&&(v=d[1]))),e.exports=v&&+v},"342f":function(e,f,t){var o=t("d066");e.exports=o("navigator","userAgent")||""},"35a1":function(e,f,t){var o=t("f5df"),a=t("3f8c"),l=t("b622"),c=l("iterator");e.exports=function(u){if(u!=null)return u[c]||u["@@iterator"]||a[o(u)]}},"37e8":function(e,f,t){var o=t("83ab"),a=t("9bf2"),l=t("825a"),c=t("df75");e.exports=o?Object.defineProperties:function(d,v){l(d);for(var h=c(v),p=h.length,g=0,S;p>g;)a.f(d,S=h[g++],v[S]);return d}},"3bbe":function(e,f,t){var o=t("861d");e.exports=function(a){if(!o(a)&&a!==null)throw TypeError("Can't set "+String(a)+" as a prototype");return a}},"3ca3":function(e,f,t){var o=t("6547").charAt,a=t("69f3"),l=t("7dd0"),c="String Iterator",u=a.set,d=a.getterFor(c);l(String,"String",function(v){u(this,{type:c,string:String(v),index:0})},function(){var h=d(this),p=h.string,g=h.index,S;return g>=p.length?{value:void 0,done:!0}:(S=o(p,g),h.index+=S.length,{value:S,done:!1})})},"3f8c":function(e,f){e.exports={}},4160:function(e,f,t){var o=t("23e7"),a=t("17c2");o({target:"Array",proto:!0,forced:[].forEach!=a},{forEach:a})},"428f":function(e,f,t){var o=t("da84");e.exports=o},"44ad":function(e,f,t){var o=t("d039"),a=t("c6b6"),l="".split;e.exports=o(function(){return!Object("z").propertyIsEnumerable(0)})?function(c){return a(c)=="String"?l.call(c,""):Object(c)}:Object},"44d2":function(e,f,t){var o=t("b622"),a=t("7c73"),l=t("9bf2"),c=o("unscopables"),u=Array.prototype;u[c]==null&&l.f(u,c,{configurable:!0,value:a(null)}),e.exports=function(d){u[c][d]=!0}},"44e7":function(e,f,t){var o=t("861d"),a=t("c6b6"),l=t("b622"),c=l("match");e.exports=function(u){var d;return o(u)&&((d=u[c])!==void 0?!!d:a(u)=="RegExp")}},4930:function(e,f,t){var o=t("d039");e.exports=!!Object.getOwnPropertySymbols&&!o(function(){return!String(Symbol())})},"4d64":function(e,f,t){var o=t("fc6a"),a=t("50c4"),l=t("23cb"),c=function(u){return function(d,v,h){var p=o(d),g=a(p.length),S=l(h,g),b;if(u&&v!=v){for(;g>S;)if(b=p[S++],b!=b)return!0}else for(;g>S;S++)if((u||S in p)&&p[S]===v)return u||S||0;return!u&&-1}};e.exports={includes:c(!0),indexOf:c(!1)}},"4de4":function(e,f,t){var o=t("23e7"),a=t("b727").filter,l=t("1dde"),c=t("ae40"),u=l("filter"),d=c("filter");o({target:"Array",proto:!0,forced:!u||!d},{filter:function(h){return a(this,h,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(e,f,t){var o=t("0366"),a=t("7b0b"),l=t("9bdd"),c=t("e95a"),u=t("50c4"),d=t("8418"),v=t("35a1");e.exports=function(p){var g=a(p),S=typeof this=="function"?this:Array,b=arguments.length,T=b>1?arguments[1]:void 0,x=T!==void 0,D=v(g),O=0,F,U,I,N,j,X;if(x&&(T=o(T,b>2?arguments[2]:void 0,2)),D!=null&&!(S==Array&&c(D)))for(N=D.call(g),j=N.next,U=new S;!(I=j.call(N)).done;O++)X=x?l(N,T,[I.value,O],!0):I.value,d(U,O,X);else for(F=u(g.length),U=new S(F);F>O;O++)X=x?T(g[O],O):g[O],d(U,O,X);return U.length=O,U}},"4fad":function(e,f,t){var o=t("23e7"),a=t("6f53").entries;o({target:"Object",stat:!0},{entries:function(c){return a(c)}})},"50c4":function(e,f,t){var o=t("a691"),a=Math.min;e.exports=function(l){return l>0?a(o(l),9007199254740991):0}},5135:function(e,f){var t={}.hasOwnProperty;e.exports=function(o,a){return t.call(o,a)}},5319:function(e,f,t){var o=t("d784"),a=t("825a"),l=t("7b0b"),c=t("50c4"),u=t("a691"),d=t("1d80"),v=t("8aa5"),h=t("14c3"),p=Math.max,g=Math.min,S=Math.floor,b=/\$([$&'`]|\d\d?|<[^>]*>)/g,T=/\$([$&'`]|\d\d?)/g,x=function(D){return D===void 0?D:String(D)};o("replace",2,function(D,O,F,U){var I=U.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,N=U.REPLACE_KEEPS_$0,j=I?"$":"$0";return[function(R,W){var M=d(this),G=R==null?void 0:R[D];return G!==void 0?G.call(R,M,W):O.call(String(M),R,W)},function(C,R){if(!I&&N||typeof R=="string"&&R.indexOf(j)===-1){var W=F(O,C,this,R);if(W.done)return W.value}var M=a(C),G=String(this),_=typeof R=="function";_||(R=String(R));var rt=M.global;if(rt){var yt=M.unicode;M.lastIndex=0}for(var lt=[];;){var ft=h(M,G);if(ft===null||(lt.push(ft),!rt))break;var gt=String(ft[0]);gt===""&&(M.lastIndex=v(G,c(M.lastIndex),yt))}for(var mt="",ht=0,nt=0;nt=ht&&(mt+=G.slice(ht,At)+St,ht=At+it.length)}return mt+G.slice(ht)}];function X(C,R,W,M,G,_){var rt=W+C.length,yt=M.length,lt=T;return G!==void 0&&(G=l(G),lt=b),O.call(_,lt,function(ft,gt){var mt;switch(gt.charAt(0)){case"$":return"$";case"&":return C;case"`":return R.slice(0,W);case"'":return R.slice(rt);case"<":mt=G[gt.slice(1,-1)];break;default:var ht=+gt;if(ht===0)return ft;if(ht>yt){var nt=S(ht/10);return nt===0?ft:nt<=yt?M[nt-1]===void 0?gt.charAt(1):M[nt-1]+gt.charAt(1):ft}mt=M[ht-1]}return mt===void 0?"":mt})}})},5692:function(e,f,t){var o=t("c430"),a=t("c6cd");(e.exports=function(l,c){return a[l]||(a[l]=c!==void 0?c:{})})("versions",[]).push({version:"3.6.5",mode:o?"pure":"global",copyright:"\xA9 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(e,f,t){var o=t("d066"),a=t("241c"),l=t("7418"),c=t("825a");e.exports=o("Reflect","ownKeys")||function(d){var v=a.f(c(d)),h=l.f;return h?v.concat(h(d)):v}},"5a34":function(e,f,t){var o=t("44e7");e.exports=function(a){if(o(a))throw TypeError("The method doesn't accept regular expressions");return a}},"5c6c":function(e,f){e.exports=function(t,o){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:o}}},"5db7":function(e,f,t){var o=t("23e7"),a=t("a2bf"),l=t("7b0b"),c=t("50c4"),u=t("1c0b"),d=t("65f0");o({target:"Array",proto:!0},{flatMap:function(h){var p=l(this),g=c(p.length),S;return u(h),S=d(p,0),S.length=a(S,p,p,g,0,1,h,arguments.length>1?arguments[1]:void 0),S}})},6547:function(e,f,t){var o=t("a691"),a=t("1d80"),l=function(c){return function(u,d){var v=String(a(u)),h=o(d),p=v.length,g,S;return h<0||h>=p?c?"":void 0:(g=v.charCodeAt(h),g<55296||g>56319||h+1===p||(S=v.charCodeAt(h+1))<56320||S>57343?c?v.charAt(h):g:c?v.slice(h,h+2):(g-55296<<10)+(S-56320)+65536)}};e.exports={codeAt:l(!1),charAt:l(!0)}},"65f0":function(e,f,t){var o=t("861d"),a=t("e8b5"),l=t("b622"),c=l("species");e.exports=function(u,d){var v;return a(u)&&(v=u.constructor,typeof v=="function"&&(v===Array||a(v.prototype))?v=void 0:o(v)&&(v=v[c],v===null&&(v=void 0))),new(v===void 0?Array:v)(d===0?0:d)}},"69f3":function(e,f,t){var o=t("7f9a"),a=t("da84"),l=t("861d"),c=t("9112"),u=t("5135"),d=t("f772"),v=t("d012"),h=a.WeakMap,p,g,S,b=function(I){return S(I)?g(I):p(I,{})},T=function(I){return function(N){var j;if(!l(N)||(j=g(N)).type!==I)throw TypeError("Incompatible receiver, "+I+" required");return j}};if(o){var x=new h,D=x.get,O=x.has,F=x.set;p=function(I,N){return F.call(x,I,N),N},g=function(I){return D.call(x,I)||{}},S=function(I){return O.call(x,I)}}else{var U=d("state");v[U]=!0,p=function(I,N){return c(I,U,N),N},g=function(I){return u(I,U)?I[U]:{}},S=function(I){return u(I,U)}}e.exports={set:p,get:g,has:S,enforce:b,getterFor:T}},"6eeb":function(e,f,t){var o=t("da84"),a=t("9112"),l=t("5135"),c=t("ce4e"),u=t("8925"),d=t("69f3"),v=d.get,h=d.enforce,p=String(String).split("String");(e.exports=function(g,S,b,T){var x=T?!!T.unsafe:!1,D=T?!!T.enumerable:!1,O=T?!!T.noTargetGet:!1;if(typeof b=="function"&&(typeof S=="string"&&!l(b,"name")&&a(b,"name",S),h(b).source=p.join(typeof S=="string"?S:"")),g===o){D?g[S]=b:c(S,b);return}else x?!O&&g[S]&&(D=!0):delete g[S];D?g[S]=b:a(g,S,b)})(Function.prototype,"toString",function(){return typeof this=="function"&&v(this).source||u(this)})},"6f53":function(e,f,t){var o=t("83ab"),a=t("df75"),l=t("fc6a"),c=t("d1e7").f,u=function(d){return function(v){for(var h=l(v),p=a(h),g=p.length,S=0,b=[],T;g>S;)T=p[S++],(!o||c.call(h,T))&&b.push(d?[T,h[T]]:h[T]);return b}};e.exports={entries:u(!0),values:u(!1)}},"73d9":function(e,f,t){var o=t("44d2");o("flatMap")},7418:function(e,f){f.f=Object.getOwnPropertySymbols},"746f":function(e,f,t){var o=t("428f"),a=t("5135"),l=t("e538"),c=t("9bf2").f;e.exports=function(u){var d=o.Symbol||(o.Symbol={});a(d,u)||c(d,u,{value:l.f(u)})}},7839:function(e,f){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(e,f,t){var o=t("1d80");e.exports=function(a){return Object(o(a))}},"7c73":function(e,f,t){var o=t("825a"),a=t("37e8"),l=t("7839"),c=t("d012"),u=t("1be4"),d=t("cc12"),v=t("f772"),h=">",p="<",g="prototype",S="script",b=v("IE_PROTO"),T=function(){},x=function(I){return p+S+h+I+p+"/"+S+h},D=function(I){I.write(x("")),I.close();var N=I.parentWindow.Object;return I=null,N},O=function(){var I=d("iframe"),N="java"+S+":",j;return I.style.display="none",u.appendChild(I),I.src=String(N),j=I.contentWindow.document,j.open(),j.write(x("document.F=Object")),j.close(),j.F},F,U=function(){try{F=document.domain&&new ActiveXObject("htmlfile")}catch{}U=F?D(F):O();for(var I=l.length;I--;)delete U[g][l[I]];return U()};c[b]=!0,e.exports=Object.create||function(N,j){var X;return N!==null?(T[g]=o(N),X=new T,T[g]=null,X[b]=N):X=U(),j===void 0?X:a(X,j)}},"7dd0":function(e,f,t){var o=t("23e7"),a=t("9ed3"),l=t("e163"),c=t("d2bb"),u=t("d44e"),d=t("9112"),v=t("6eeb"),h=t("b622"),p=t("c430"),g=t("3f8c"),S=t("ae93"),b=S.IteratorPrototype,T=S.BUGGY_SAFARI_ITERATORS,x=h("iterator"),D="keys",O="values",F="entries",U=function(){return this};e.exports=function(I,N,j,X,C,R,W){a(j,N,X);var M=function(nt){if(nt===C&<)return lt;if(!T&&nt in rt)return rt[nt];switch(nt){case D:return function(){return new j(this,nt)};case O:return function(){return new j(this,nt)};case F:return function(){return new j(this,nt)}}return function(){return new j(this)}},G=N+" Iterator",_=!1,rt=I.prototype,yt=rt[x]||rt["@@iterator"]||C&&rt[C],lt=!T&&yt||M(C),ft=N=="Array"&&rt.entries||yt,gt,mt,ht;if(ft&&(gt=l(ft.call(new I)),b!==Object.prototype&>.next&&(!p&&l(gt)!==b&&(c?c(gt,b):typeof gt[x]!="function"&&d(gt,x,U)),u(gt,G,!0,!0),p&&(g[G]=U))),C==O&&yt&&yt.name!==O&&(_=!0,lt=function(){return yt.call(this)}),(!p||W)&&rt[x]!==lt&&d(rt,x,lt),g[N]=lt,C)if(mt={values:M(O),keys:R?lt:M(D),entries:M(F)},W)for(ht in mt)(T||_||!(ht in rt))&&v(rt,ht,mt[ht]);else o({target:N,proto:!0,forced:T||_},mt);return mt}},"7f9a":function(e,f,t){var o=t("da84"),a=t("8925"),l=o.WeakMap;e.exports=typeof l=="function"&&/native code/.test(a(l))},"825a":function(e,f,t){var o=t("861d");e.exports=function(a){if(!o(a))throw TypeError(String(a)+" is not an object");return a}},"83ab":function(e,f,t){var o=t("d039");e.exports=!o(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},8418:function(e,f,t){var o=t("c04e"),a=t("9bf2"),l=t("5c6c");e.exports=function(c,u,d){var v=o(u);v in c?a.f(c,v,l(0,d)):c[v]=d}},"861d":function(e,f){e.exports=function(t){return typeof t=="object"?t!==null:typeof t=="function"}},8875:function(e,f,t){var o,a,l;(function(c,u){a=[],o=u,l=typeof o=="function"?o.apply(f,a):o,l!==void 0&&(e.exports=l)})(typeof self<"u"?self:this,function(){function c(){var u=Object.getOwnPropertyDescriptor(document,"currentScript");if(!u&&"currentScript"in document&&document.currentScript||u&&u.get!==c&&document.currentScript)return document.currentScript;try{throw new Error}catch(F){var d=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,v=/@([^@]*):(\d+):(\d+)\s*$/ig,h=d.exec(F.stack)||v.exec(F.stack),p=h&&h[1]||!1,g=h&&h[2]||!1,S=document.location.href.replace(document.location.hash,""),b,T,x,D=document.getElementsByTagName("script");p===S&&(b=document.documentElement.outerHTML,T=new RegExp("(?:[^\\n]+?\\n){0,"+(g-2)+"}[^<]* - - - - + + + + diff --git a/abstra_statics/dist/editor.html b/abstra_statics/dist/editor.html index ae5de7e8cc..c4fecba516 100644 --- a/abstra_statics/dist/editor.html +++ b/abstra_statics/dist/editor.html @@ -25,9 +25,9 @@ y.parentNode.insertBefore(t, y); })(window, document, "clarity", "script", "i1elnllo70"); - - - + + + diff --git a/abstra_statics/dist/player.html b/abstra_statics/dist/player.html index d272d2535f..8d5578a2a4 100644 --- a/abstra_statics/dist/player.html +++ b/abstra_statics/dist/player.html @@ -14,8 +14,8 @@ }, }; - - + +