@budibase/server 1.0.74-alpha.2 → 1.0.76-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/builder/assets/{index.8331cc39.js → index.ca3cbe3a.js} +3 -3
- package/builder/index.html +1 -1
- package/coverage/clover.xml +2 -2
- package/coverage/lcov-report/api/controllers/analytics.js.html +1 -1
- package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/controllers/application.js.html +1 -1
- package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
- package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
- package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
- package/coverage/lcov-report/api/controllers/component.js.html +1 -1
- package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
- package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
- package/coverage/lcov-report/api/controllers/index.html +1 -1
- package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
- package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
- package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
- package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
- package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/role.js.html +1 -1
- package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
- package/coverage/lcov-report/api/controllers/script.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
- package/coverage/lcov-report/api/controllers/user.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
- package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
- package/coverage/lcov-report/api/index.html +1 -1
- package/coverage/lcov-report/api/index.js.html +1 -1
- package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
- package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/routes/application.js.html +1 -1
- package/coverage/lcov-report/api/routes/auth.js.html +1 -1
- package/coverage/lcov-report/api/routes/automation.js.html +1 -1
- package/coverage/lcov-report/api/routes/backup.js.html +1 -1
- package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
- package/coverage/lcov-report/api/routes/component.js.html +1 -1
- package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
- package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
- package/coverage/lcov-report/api/routes/dev.js.html +1 -1
- package/coverage/lcov-report/api/routes/index.html +1 -1
- package/coverage/lcov-report/api/routes/index.js.html +1 -1
- package/coverage/lcov-report/api/routes/integration.js.html +1 -1
- package/coverage/lcov-report/api/routes/layout.js.html +1 -1
- package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
- package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
- package/coverage/lcov-report/api/routes/permission.js.html +1 -1
- package/coverage/lcov-report/api/routes/query.js.html +1 -1
- package/coverage/lcov-report/api/routes/role.js.html +1 -1
- package/coverage/lcov-report/api/routes/routing.js.html +1 -1
- package/coverage/lcov-report/api/routes/row.js.html +1 -1
- package/coverage/lcov-report/api/routes/screen.js.html +1 -1
- package/coverage/lcov-report/api/routes/script.js.html +1 -1
- package/coverage/lcov-report/api/routes/static.js.html +1 -1
- package/coverage/lcov-report/api/routes/table.js.html +1 -1
- package/coverage/lcov-report/api/routes/templates.js.html +1 -1
- package/coverage/lcov-report/api/routes/user.js.html +1 -1
- package/coverage/lcov-report/api/routes/view.js.html +1 -1
- package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/actions.js.html +1 -1
- package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
- package/coverage/lcov-report/automations/bullboard.js.html +1 -1
- package/coverage/lcov-report/automations/index.html +1 -1
- package/coverage/lcov-report/automations/index.js.html +1 -1
- package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
- package/coverage/lcov-report/automations/steps/createRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/deleteRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
- package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
- package/coverage/lcov-report/automations/steps/index.html +1 -1
- package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
- package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
- package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
- package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
- package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
- package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/triggers.js.html +1 -1
- package/coverage/lcov-report/automations/utils.js.html +1 -1
- package/coverage/lcov-report/constants/index.html +1 -1
- package/coverage/lcov-report/constants/index.js.html +1 -1
- package/coverage/lcov-report/constants/layouts.js.html +1 -1
- package/coverage/lcov-report/constants/screens.js.html +1 -1
- package/coverage/lcov-report/db/client.js.html +1 -1
- package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
- package/coverage/lcov-report/db/index.html +1 -1
- package/coverage/lcov-report/db/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
- package/coverage/lcov-report/db/newid.js.html +1 -1
- package/coverage/lcov-report/db/utils.js.html +1 -1
- package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
- package/coverage/lcov-report/events/index.html +1 -1
- package/coverage/lcov-report/events/index.js.html +1 -1
- package/coverage/lcov-report/events/utils.js.html +1 -1
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
- package/coverage/lcov-report/integrations/tests/index.html +1 -1
- package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
- package/coverage/lcov-report/middleware/authorized.js.html +1 -1
- package/coverage/lcov-report/middleware/builder.js.html +1 -1
- package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
- package/coverage/lcov-report/middleware/index.html +1 -1
- package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
- package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/usageQuota.js.html +1 -1
- package/coverage/lcov-report/middleware/utils.js.html +1 -1
- package/coverage/lcov-report/threads/automation.js.html +1 -1
- package/coverage/lcov-report/threads/index.html +1 -1
- package/coverage/lcov-report/threads/index.js.html +1 -1
- package/coverage/lcov-report/threads/query.js.html +1 -1
- package/coverage/lcov-report/threads/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/bcrypt.js.html +1 -1
- package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
- package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
- package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
- package/coverage/lcov-report/utilities/global.js.html +1 -1
- package/coverage/lcov-report/utilities/index.html +1 -1
- package/coverage/lcov-report/utilities/index.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
- package/coverage/lcov-report/utilities/security.js.html +1 -1
- package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
- package/coverage/lcov-report/utilities/users.js.html +1 -1
- package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
- package/dist/package.json +4 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
|
@@ -373,7 +373,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
373
373
|
`},stringify:{args:["obj"],numArgs:1,description:`<p>Stringify an object using <code>JSON.stringify</code>.</p>
|
|
374
374
|
`}},date:{date:{args:["datetime","format"],numArgs:2,example:'{{date now "DD-MM-YYYY" "America/New_York" }} -> 21-01-2021',description:`<p>Format a date using moment.js date formatting - the timezone is optional and uses the tz database.</p>
|
|
375
375
|
`},duration:{args:["time","durationType"],numArgs:2,example:'{{duration timeLeft "seconds"}} -> a few seconds',description:`<p>Produce a humanized duration left/until given an amount of time and the type of time measurement.</p>
|
|
376
|
-
`}}},ti=gt(function(r,e){const{registerAll:t,registerMinimum:n}=y3,{atob:i,btoa:s}=Ca,{FIND_HBS_REGEX:l,findDoubleHbsInstances:o}=Ca,a=ta.create();t(a);const u=ta.create();n(u);const f={noHelpers:!1,cacheTemplates:!1,noEscaping:!1,escapeNewlines:!1,noFinalise:!1};function c(g){try{JSON.stringify(g)}catch{throw"Unable to process inputs to JSON, cannot recurse"}}let p={};function d(g,h){h=Ee(Ee({},f),h);const v=`${g}-${JSON.stringify(h)}`;if(h.cacheTemplates&&p[v])return p[v];g=$j(g,h),h.noEscaping&&(g=e.disableEscaping(g));const C=(h.noHelpers?u:a).compile(g,{strict:!1});return p[v]=C,C}r.exports.processObject=async(g,h,v)=>{c(g);for(let C of Object.keys(g||{}))if(g[C]!=null){let k=g[C];typeof k=="string"?g[C]=await r.exports.processString(g[C],h,v):typeof k=="object"&&(g[C]=await r.exports.processObject(g[C],h,v))}return g},r.exports.processString=async(g,h,v)=>r.exports.processStringSync(g,h,v),r.exports.processObjectSync=(g,h,v)=>{c(g);for(let C of Object.keys(g||{})){let k=g[C];typeof k=="string"?g[C]=r.exports.processStringSync(g[C],h,v):typeof k=="object"&&(g[C]=r.exports.processObjectSync(g[C],h,v))}return g},r.exports.processStringSync=(g,h,v)=>{const C=g;if(typeof g!="string")throw"Cannot process non-string types.";try{const k=d(g,v),I=1e3*Math.floor(Date.now()/1e3);return bj(k(Ee({now:new Date(I).toISOString(),__opts:v},h)))}catch{return C}},r.exports.disableEscaping=g=>{const h=o(g);if(h==null)return g;for(let v of h)g=g.replace(v,`{${v}}`);return g},r.exports.makePropSafe=g=>`[${g}]`.replace("[[","[").replace("]]","]"),r.exports.isValid=(g,h)=>{const v=["string","number","object","array","cannot read property","undefined"],C=["expecting '"],k={};try{return d(g,rt(Ee({},h),{noFinalise:!0}))(k),!0}catch(I){const S=I&&I.message?I.message:I;if(!S)return!1;const T=C.some(N=>S.toLowerCase().includes(N));return v.some(N=>S.toLowerCase().includes(N))&&!T}},r.exports.getManifest=()=>vj,r.exports.isJSBinding=g=>r.exports.decodeJSBinding(g)!=null,r.exports.encodeJSBinding=g=>`{{ js "${s(g)}" }}`,r.exports.decodeJSBinding=g=>{if(!g||typeof g!="string"||!g.trim().startsWith("{{ js "))return null;const h=new RegExp(/{{ js "(.*)" }}/),v=g.match(h);return!v||v.length<2?null:i(v[1])},r.exports.doesContainStrings=(g,h)=>{let v=new RegExp(l),C=g.match(v);if(C==null)return!1;for(let k of C){let I=k;e.isJSBinding(k)&&(I=e.decodeJSBinding(k));let S=!0;for(let T of h)I.includes(T)||(S=!1);if(S)return!0}return!1},r.exports.doesContainString=(g,h)=>e.doesContainStrings(g,[h])});const O3=ti.isValid,On=ti.makePropSafe,wj=ti.getManifest,Uf=ti.isJSBinding,p1=ti.encodeJSBinding,Ff=ti.decodeJSBinding,Vf=ti.processStringSync;ti.processObjectSync;ti.processString;ti.processObject;ti.doesContainStrings;ti.doesContainString;ti.disableEscaping;w3((r,e)=>(e=rt(Ee({},e),{alert:void 0,setInterval:void 0,setTimeout:void 0}),f2.createContext(e),f2.runInNewContext(r,e,{timeout:1e3})));const yj=[{name:"Save Row",component:"SaveRow",context:[{label:"Saved row",value:"row"}]},{name:"Duplicate Row",component:"DuplicateRow",context:[{label:"Duplicated row",value:"row"}]},{name:"Delete Row",component:"DeleteRow"},{name:"Navigate To",component:"NavigateTo"},{name:"Execute Query",component:"ExecuteQuery",context:[{label:"Query result",value:"result"}]},{name:"Trigger Automation",component:"TriggerAutomation"},{name:"Validate Form",component:"ValidateForm"},{name:"Log Out",component:"LogOut"},{name:"Clear Form",component:"ClearForm"},{name:"Close Screen Modal",component:"CloseScreenModal"},{name:"Change Form Step",component:"ChangeFormStep"},{name:"Refresh Data Provider",component:"RefreshDataProvider"},{name:"Update State",component:"UpdateState",dependsOnFeature:"state"},{name:"Upload File to S3",component:"S3Upload",context:[{label:"File URL",value:"publicUrl"}]}];var T3={actions:yj};const kj=/{{([^}]+)}}/g,Cj=/\$\("([^")]+)"\)/g,Sj=/{{[\S\s]*?}}/g,Aj=(r,e)=>{const t=Oj(r,e),n=Tj(),i=Pj(r),s=Ij(),l=Lj();return[...t,...i,...l,...n,...s]},Ej=(r,e)=>{if(!r||!e)return[];const t=Bs(r.props,e),n=Ye.actions.components.getDefinition(t==null?void 0:t._component);return(n==null?void 0:n.context)?I3(r,t):[]},co=(r,e,t)=>{if(!r||!e)return[];const n=qs(r.props,e);return n.pop(),n.filter(i=>{const s=Ye.actions.components.getDefinition(i._component);return(s==null?void 0:s.context)?t?(Array.isArray(s.context)?s.context:[s.context]).find(o=>o.type===t)!=null:!0:!1})},Hf=(r,e,t)=>{if(!r||!e)return[];const n=qs(r.props,e);return n.pop(),n.filter(i=>{var l;const s=Ye.actions.components.getDefinition(i._component);return(l=s==null?void 0:s.actions)==null?void 0:l.includes(t)})},ks=(r,e)=>{const t=Qo(e==null?void 0:e._component),n=t.find(l=>l.type==="dataProvider");if(n){const l=e[n.key],o=Mj(l),a=Bs(r.props,o);return ks(r,a)}const i=["dataSource","table","schema"],s=t.find(l=>i.includes(l.type));return s?s.type==="table"?{tableId:e[s==null?void 0:s.key],type:"table"}:e[s==null?void 0:s.key]:null},Oj=(r,e)=>{const t=co(r,e);return I3(r,t)},I3=(r,e)=>{if(!r||!e)return[];Array.isArray(e)||(e=[e]);let t=[];return e.forEach(n=>{const i=Ye.actions.components.getDefinition(n._component);(Array.isArray(i.context)?i.context:[i.context]).forEach(l=>{var g;if(!(l==null?void 0:l.type))return;let o,a,u,f=l.suffix;if(l.type==="form")o=L3(n),u="Fields";else if(l.type==="static")o={},(l.values||[]).forEach(v=>{o[v.key]={name:v.label,type:"string"}});else if(l.type==="schema"){const h=ks(r,n);if(!h)return;const v=Ni(r,h);if(o=v.schema,a=v.table,h.type==="jsonarray"){const C=h.label.split(".");u=C[C.length-1]}else u=(g=v.table)==null?void 0:g.name}if(!o)return;const c=Object.keys(o).sort();let p=n._id;f&&(p+=`-${f}`);const d=On(p);c.forEach(h=>{const v=o[h],C=h.split(".").map(On).join("."),k=`${d}.${C}`;let I=n._instanceName;u&&(I+=`.${u}`),I+=`.${v.name||h}`,t.push({type:"context",runtimeBinding:k,readableBinding:I,fieldSchema:v,providerId:p,tableId:a==null?void 0:a._id})})})}),t},Tj=()=>{let r=[];const{schema:e}=Wf(cs.USERS),t=Object.keys(e).sort(),n=On("user");return t.forEach(i=>{const s=e[i];r.push({type:"context",runtimeBinding:`${n}.${On(i)}`,readableBinding:`Current User.${i}`,fieldSchema:s,providerId:"user"})}),r},Ij=()=>{var e;let r=[];if((e=lt(Ye).clientFeatures)==null?void 0:e.deviceAwareness){const t=On("device");r.push({type:"context",runtimeBinding:`${t}.${On("mobile")}`,readableBinding:"Device.Mobile"}),r.push({type:"context",runtimeBinding:`${t}.${On("tablet")}`,readableBinding:"Device.Tablet"})}return r},Lj=()=>{var e;let r=[];if((e=lt(Ye).clientFeatures)==null?void 0:e.state){const t=On("state");r=P3().map(n=>({type:"context",runtimeBinding:`${t}.${On(n)}`,readableBinding:`State.${n}`}))}return r},Pj=r=>{var s,l;const t=((l=(s=r==null?void 0:r.routing)==null?void 0:s.route)!=null?l:"").split("/");let n=[];t.forEach(o=>{o.startsWith(":")&&o.length>1&&n.push(o.replace(/:/g,"").replace(/\?/g,""))});const i=On("url");return n.map(o=>({type:"context",runtimeBinding:`${i}.${On(o)}`,readableBinding:`URL.${o}`}))},Nj=(r,e)=>{const t=r==null?void 0:r.findIndex(s=>s.id===e);if(t==null||t===-1)return[];const n=r.slice(0,t);let i=[];return n.forEach((s,l)=>{const o=T3.actions.find(a=>a.name===s["##eventHandlerType"]);o.context&&o.context.forEach(a=>{i.push({readableBinding:`Action ${l+1}.${a.label}`,runtimeBinding:`actions.${l}.${a.value}`})})}),i},Wf=(r,e)=>Ni(null,{type:"table",tableId:r},e),Ni=(r,e,t)=>{var s,l;t=t||{};let n,i;if(e){const{type:o}=e,a=lt(At).list;if(o==="provider"){const g=Bs(r.props,e.providerId),h=ks(r,g);return Ni(r,h,t)}else if(o==="query")i=lt($n).list.find(h=>h._id===e._id);else if(o==="field"){i={name:e.fieldName};const{fieldType:g}=e;g==="attachment"?n={url:{type:"string"},name:{type:"string"}}:g==="array"&&(n={value:{type:"string"}})}else if(o==="jsonarray"){i=a.find(h=>h._id===e.tableId);let g=i==null?void 0:i.schema;n=G0(g,e)}else i=a.find(g=>g._id===e.tableId);if(i&&!n&&(o==="view"?n=hn.cloneDeep((l=(s=i.views)==null?void 0:s[e.name])==null?void 0:l.schema):o==="query"&&(t.formSchema||t.searchableSchema)?(n={},(i.parameters||[]).forEach(h=>{(h==null?void 0:h.name)&&(n[h.name]=rt(Ee({},h),{type:"string"}))})):n=hn.cloneDeep(i.schema)),n){let g={};Object.keys(n).forEach(h=>{const v=n[h];if((v==null?void 0:v.type)==="json"){const C=Y0(v,{squashObjects:!0});Object.keys(C).forEach(k=>{g[`${h}.${k}`]={type:C[k].type,nestedJSON:!0}})}}),n=Ee(Ee({},n),g)}const u=i&&!i.sql,f=["table","link"].includes(e.type);let c=f,p=f&&u;t.formSchema?(c=!1,p=!1):t.searchableSchema&&(c=f&&u),n&&(c&&(n._id={type:"string"}),p&&(n._rev={type:"string"}));let d={};Object.entries(n||{}).forEach(([g,h])=>{typeof h=="string"?d[g]={type:h,name:g}:d[g]=rt(Ee({},h),{name:g})}),n=d}return{schema:n,table:i}},L3=r=>{var i;let e={};if(!r)return e;const n=Qo(r._component).find(s=>s.key==="field"&&s.type.startsWith("field/"));if(n&&r.field){const s=n.type.split("field/")[1];s&&(e[r.field]={type:s})}return(i=r._children)==null||i.forEach(s=>{const l=L3(s);e=Ee(Ee({},e),l)}),e},P3=()=>{let r=[];r=r.concat(lt(Ye).layouts||[]),r=r.concat(lt(Ye).screens||[]);let e=[];r.forEach(n=>{Fu(n.props,i=>{Qo(i._component).filter(l=>l.type==="event").forEach(l=>{e.push(i[l.key])})})});let t=new Set;return e.forEach(n=>{!Array.isArray(n)||n.forEach(i=>{var s,l,o;i["##eventHandlerType"]==="Update State"&&((s=i.parameters)==null?void 0:s.type)==="set"&&((l=i.parameters)==null?void 0:l.key)&&((o=i.parameters)==null?void 0:o.value)&&t.add(i.parameters.key)})}),Array.from(t)},N3=(r,e="Invalid binding")=>{for(let[t,n]of Object.entries(r))n&&typeof n=="object"?r[t]=N3(n,e):typeof n=="string"&&(r[t]=n.replace(Sj,e));return r},Rj=(r,e,t)=>{if(!(r==null?void 0:r.includes(e)))return!1;if(t==="readableBinding")return!0;const n=r.replace(/\s+/g,""),i=e.replace(/\s+/g,"");return![`[${i}]`,`"${i}"`,`'${i}'`].find(l=>n==null?void 0:n.includes(l))},R3=(r,e,t,n)=>r.substring(0,e)+n+r.substring(t),M3=(r,e,t)=>{const n=Uf(e);n&&(e=Ff(e));const i=n?Cj:kj,s=t==="runtimeBinding"?"readableBinding":"runtimeBinding";if(typeof e!="string")return e;const l=r.map(u=>u[s]).sort((u,f)=>f.length-u.length),o=e.match(i)||[];let a=e;for(let u of o){let f=u,c=f;for(let p of l)if(n||Rj(f,p,t)){const d=r.find(h=>h[s]===p);let g;do if(g=c.indexOf(p),g!==-1){let h=g+p.length,v=Array(d[t].length+1).join("*");c=R3(c,g,h,v),f=R3(f,g,h,d[t])}while(g!==-1)}a=a.replace(u,f)}return n&&(a=p1(a)),a},Mj=r=>{var e;return(e=r==null?void 0:r.match(/{{\s*literal\s*\[+([^\]]+)].*}}/))==null?void 0:e[1]},Sl=(r,e)=>M3(r,e,"runtimeBinding"),po=(r,e)=>M3(r,e,"readableBinding"),d1={apps:[],name:"",url:"",description:"",layouts:[],screens:[],components:[],clientFeatures:{spectrumThemes:!1,intelligentLoading:!1,deviceAwareness:!1,state:!1,customThemes:!1,devicePreview:!1,messagePassing:!1},currentFrontEndType:"none",selectedScreenId:"",selectedLayoutId:"",selectedComponentId:"",errors:[],hasAppPackage:!1,libraries:null,appId:"",routes:{},clientLibPath:"",theme:"",customTheme:{},previewDevice:"desktop"},Dj=()=>{const r=fn(Ee({},d1));return r.actions={reset:()=>{r.set(Ee({},d1))},initialise:async e=>{const{layouts:t,screens:n,application:i,clientLibPath:s}=e;let l=await Ze.fetchComponentLibDefinitions(i.appId);r.update(o=>rt(Ee({},o),{libraries:i.componentLibraries,components:l,clientFeatures:Ee(Ee({},d1.clientFeatures),l.features),name:i.name,description:i.description,appId:i.appId,url:i.url,layouts:t||[],screens:n||[],theme:i.theme||"spectrum--light",customTheme:i.customTheme,hasAppPackage:!0,appInstance:i.instance,clientLibPath:s,previousTopNavPath:{},version:i.version,revertableVersion:i.revertableVersion})),pl.set(i.instance),await Zt.init(),await js.init(),await $n.init(),await At.init()},theme:{save:async e=>{const t=lt(r).appId;await Ze.saveAppMetadata({appId:t,metadata:{theme:e}}),r.update(n=>(n.theme=e,n))}},customTheme:{save:async e=>{const t=lt(r).appId;await Ze.saveAppMetadata({appId:t,metadata:{customTheme:e}}),r.update(n=>(n.customTheme=e,n))}},routing:{fetch:async()=>{const e=await Ze.fetchAppRoutes();r.update(t=>(t.routes=e.routes,t))}},screens:{select:e=>{r.update(t=>{var s;let n=lt(Xs),i=n.find(l=>l._id===e)||n[0];return i&&(Ks.set(i.routing.roleId),t.currentFrontEndType=Jn.SCREEN,t.selectedScreenId=i._id,t.currentView="detail",t.selectedComponentId=(s=i.props)==null?void 0:s._id),t})},save:async e=>{const t=e._id===void 0,n=await Ze.saveScreen(e);return r.update(i=>{const s=i.screens.findIndex(l=>l._id===n._id);return s!==-1?i.screens.splice(s,1,n):i.screens.push(n),i}),await r.actions.routing.fetch(),t&&r.actions.screens.select(n._id),n},delete:async e=>{const t=Array.isArray(e)?e:[e],n=[];t.forEach(s=>{n.push(Ze.deleteScreen({screenId:s._id,screenRev:s._rev})),n.push(r.actions.components.links.delete(s.routing.route,s.props._instanceName))}),await Promise.all(n);const i=t.map(s=>s._id);r.update(s=>(s.screens=s.screens.filter(l=>!i.includes(l._id)),i.includes(s.selectedScreenId)&&(s.selectedScreenId=null),s)),await r.actions.routing.fetch()}},preview:{saveSelected:async()=>{const e=lt(r),t=lt(dn);return e.currentFrontEndType!==Jn.LAYOUT?await r.actions.screens.save(t):await r.actions.layouts.save(t)},setDevice:e=>{r.update(t=>(t.previewDevice=e,t))}},layouts:{select:e=>{r.update(t=>{var i;const n=r.actions.layouts.find(e)||lt(r).layouts[0];if(!!n)return t.currentFrontEndType=Jn.LAYOUT,t.currentView="detail",t.selectedLayoutId=n._id,t.selectedComponentId=(i=n.props)==null?void 0:i._id,t})},save:async e=>{const t=e._id===void 0,n=await Ze.saveLayout(e);return r.update(i=>{const s=i.layouts.findIndex(l=>l._id===n._id);return s!==-1?i.layouts.splice(s,1,n):i.layouts.push(n),i}),t&&r.actions.layouts.select(n._id),n},find:e=>e?lt(r).layouts.find(n=>n._id===e):lt(Yf),delete:async e=>{!(e==null?void 0:e._id)||(await Ze.deleteLayout({layoutId:e._id,layoutRev:e._rev}),r.update(t=>(e._id===t.selectedLayoutId&&(t.selectedLayoutId=lt(Yf)._id),t.layouts=t.layouts.filter(n=>n._id!==e._id),t)))}},components:{select:e=>{const t=lt(dn);if(!t||!e)return;if(zs(t.props,e._id)==null){lt(r).currentFrontEndType===Jn.LAYOUT?r.actions.layouts.select(t._id):r.actions.screens.select(t._id);return}r.update(i=>(i.selectedComponentId=e._id,i.currentView="component",i))},getDefinition:e=>e?(e.startsWith("@budibase")||(e=`@budibase/standard-components/${e}`),lt(r).components[e]):null,createInstance:(e,t)=>{const n=r.actions.components.getDefinition(e);if(!n)return null;const i=Qo(e);let s=Ee({},t);i.forEach(o=>{o.defaultValue!==void 0&&(s[o.key]=o.defaultValue)});let l={};if(n.hasChildren&&(l._children=[]),e.endsWith("/formstep")){const o=Vu(lt(dn).props,lt(ni)._id,u=>u._component.endsWith("/form")),a=Fu(o,u=>u._component.endsWith("/formstep"));l.step=a.length+1,l._instanceName=`Step ${a.length+1}`}return Ee(Ee({_id:Ui(),_component:n.component,_styles:{normal:{},hover:{},active:{}},_instanceName:`New ${n.name}`},hn.cloneDeep(s)),l)},create:async(e,t)=>{const n=lt(ni),i=lt(dn),s=r.actions.components.createInstance(e,t);if(!s||!i)return;let l;if(n){const o=r.actions.components.getDefinition(n._component);(o==null?void 0:o.hasChildren)?l=n:l=zs(i.props,n._id)}else l=i.props;if(!!l)return l._children||(l._children=[]),l._children.push(s),await r.actions.preview.saveSelected(),r.update(o=>(o.currentView="component",o.selectedComponentId=s._id,o)),zn.captureEvent(Qn.COMPONENT.CREATED,{name:s._component}),s},delete:async e=>{var s;if(!e)return;const t=lt(dn);if(!t)return;if(e=Bs(t.props,e._id),(s=e._component)==null?void 0:s.endsWith("/screenslot"))throw"You can't delete the screen slot";if(Pp(e,"@budibase/standard-components/screenslot")!=null)throw"You can't delete a component that contains the screen slot";const i=zs(t.props,e._id);i&&(i._children=i._children.filter(l=>l._id!==e._id),r.actions.components.select(i)),await r.actions.preview.saveSelected()},copy:(e,t=!1)=>{const n=lt(dn);if(!n)return null;if(r.update(i=>(i.componentToPaste=hn.cloneDeep(e),i.componentToPaste.isCut=t,i)),t){const i=zs(n.props,e._id);i&&(i._children=i._children.filter(s=>s._id!==e._id),r.actions.components.select(i))}},paste:async(e,t,n=!1)=>{let i=[];r.update(s=>{if(!s.componentToPaste)return s;const l=s.componentToPaste.isCut;!l&&!n&&(s.componentToPaste=N3(s.componentToPaste,"")),delete s.componentToPaste.isCut;let o=hn.cloneDeep(s.componentToPaste);if(l)s.componentToPaste=null;else{const a=u=>{var f;!u||(u._id=Ui(),(f=u._children)==null||f.forEach(a))};a(o)}if(t==="inside")e._children||(e._children=[]),e._children.push(o);else{const a=lt(dn);if(!a)return s;const u=zs(a.props,e._id);if(!u)return s;const f=u._children.indexOf(e),c=t==="above"?f:f+1;u._children.splice(c,0,hn.cloneDeep(o))}return i.push(r.actions.preview.saveSelected()),r.actions.components.select(o),s}),await Promise.all(i)},updateStyle:async(e,t)=>{const n=lt(ni);t==null||t===""?delete n._styles.normal[e]:n._styles.normal[e]=t,await r.actions.preview.saveSelected()},updateCustomStyle:async e=>{const t=lt(ni);t._styles.custom=e,await r.actions.preview.saveSelected()},updateConditions:async e=>{const t=lt(ni);t._conditions=e,await r.actions.preview.saveSelected()},updateProp:async(e,t)=>{let n=lt(ni);!e||!n||n[e]!==t&&(n[e]=t,r.update(i=>(i.selectedComponentId=n._id,i)),await r.actions.preview.saveSelected())},links:{save:async(e,t)=>{const n=lt(Yf);if(!!n){if(n.props._component.endsWith("layout"))n.props.links||(n.props.links=[]),n.props.links.push({text:t,url:e});else{const i=Pp(n.props,"@budibase/standard-components/navigation");if(!i)return;let s;i._children&&i._children.length?(s=hn.cloneDeep(i._children[0]),s._id=Ui(),s._instanceName=`${t} Link`,s.url=e,s.text=t):(s=rt(Ee({},r.actions.components.createInstance("link")),{url:e,text:t,_instanceName:`${t} Link`}),i._children=[...i._children,s])}await r.actions.layouts.save(n)}},delete:async(e,t)=>{const n=lt(Yf);if(!!n){if(n.props._component.endsWith("layout"))n.props.links=n.props.links.filter(i=>!(i.text===t&&i.url===e));else{const i=Pp(n.props,"@budibase/standard-components/navigation");if(!i)return;i._children=i._children.filter(s=>!(s.url===e&&s.text===t))}await r.actions.layouts.save(n)}}}}},r};class D3{constructor(e){this.automation=e}hasTrigger(){return this.automation.definition.trigger}addTestData(e){this.automation.testData=Ee(Ee({},this.automation.testData),e)}addBlock(e,t){if(!this.hasTrigger()&&e.type==="TRIGGER"){const i=Ee({id:Br.generate()},e);return this.automation.definition.trigger=i,i}const n=Ee({id:Br.generate()},e);return this.automation.definition.steps.splice(t,0,n),n}updateBlock(e,t){const{steps:n,trigger:i}=this.automation.definition;if(i&&i.id===t){this.automation.definition.trigger=e;return}const s=n.findIndex(l=>l.id===t);if(s<0)throw new Error("Block not found.");n.splice(s,1,e),this.automation.definition.steps=n}deleteBlock(e){const{steps:t,trigger:n}=this.automation.definition;if(n&&n.id===e){this.automation.definition.trigger=null;return}const i=t.findIndex(s=>s.id===e);if(i<0)throw new Error("Block not found.");t.splice(i,1),this.automation.definition.steps=t}constructBlock(e,t,n){return rt(Ee({},n),{inputs:n.inputs||{},stepId:t,type:e})}}const jj={automations:[],blockDefinitions:{TRIGGER:[],ACTION:[]},selectedAutomation:null},Bj=()=>{const r=fn(jj);return r.actions=zj(r),r},zj=r=>({fetch:async()=>{const e=await Promise.all([Ze.getAutomations(),Ze.getAutomationDefinitions()]);r.update(t=>{var i;let n=(i=t.selectedAutomation)==null?void 0:i.automation;return t.automations=e[0],t.blockDefinitions={TRIGGER:e[1].trigger,ACTION:e[1].action},n&&(n=e[0].filter(s=>s._id===n._id),t.selectedAutomation=new D3(n[0])),t})},create:async({name:e})=>{const t={name:e,type:"automation",definition:{steps:[]}},n=await Ze.createAutomation(t);r.update(i=>(i.automations=[...i.automations,n.automation],r.actions.select(n.automation),i))},save:async e=>{const t=await Ze.updateAutomation(e);r.update(n=>{const i=t.automation,s=n.automations.findIndex(l=>l._id===e._id);if(s!==-1)return n.automations.splice(s,1,i),n.automations=[...n.automations],r.actions.select(i),n})},delete:async e=>{await Ze.deleteAutomation({automationId:e==null?void 0:e._id,automationRev:e==null?void 0:e._rev}),r.update(t=>{const n=t.automations.findIndex(i=>i._id===(e==null?void 0:e._id));return t.automations.splice(n,1),t.automations=[...t.automations],t.selectedAutomation=null,t.selectedBlock=null,t})},test:async(e,t)=>{r.update(i=>(i.selectedAutomation.testResults=null,i));const n=await Ze.testAutomation({automationId:e==null?void 0:e._id,testData:t});r.update(i=>(i.selectedAutomation.testResults=n,i))},select:e=>{r.update(t=>{var i;let n=(i=t.selectedAutomation)==null?void 0:i.testResults;return t.selectedAutomation=new D3(hn.cloneDeep(e)),t.selectedAutomation.testResults=n,t.selectedBlock=null,t})},addTestDataToAutomation:e=>{r.update(t=>(t.selectedAutomation.addTestData(e),t))},addBlockToAutomation:(e,t)=>{r.update(n=>{const i=n.selectedAutomation.addBlock(hn.cloneDeep(e),t);return n.selectedBlock=i,n}),zn.captureEvent(Qn.AUTOMATION.BLOCK_ADDED,{name:e.name})},deleteAutomationBlock:e=>{r.update(t=>{const n=t.selectedAutomation.automation.definition.steps.findIndex(l=>l.id===e.id);t.selectedAutomation.deleteBlock(e.id);const i=t.selectedAutomation.automation.definition.steps;let s;return i[n]!=null?s=i[n]:i[n-1]!=null?s=i[n-1]:s=t.selectedAutomation.automation.definition.trigger||null,t.selectedBlock=s,t})}}),qj=()=>{const r=document.documentElement,e={theme:"darkest",options:["lightest","light","dark","darkest"]},t=rL("bb-theme",e);return t.subscribe(n=>{if(n.darkMode!==void 0){t.set(e);return}n.options.forEach(i=>{r.classList.toggle(`spectrum--${i}`,i===n.theme)})}),t},Ye=Dj(),xt=Bj(),Gf=qj(),dn=qi(Ye,r=>{const e=r.currentFrontEndType;return e===Jn.SCREEN?r.screens.find(t=>t._id===r.selectedScreenId):e===Jn.LAYOUT?r.layouts.find(t=>t._id===r.selectedLayoutId):null}),ni=qi([Ye,dn],([r,e])=>!e||!r.selectedComponentId?null:Bs(e.props,r.selectedComponentId));qi(Ye,r=>r.currentFrontEndType===Jn.SCREEN?r.selectedScreenId:r.selectedLayoutId);const Uj=qi(dn,r=>r==null?void 0:r.name),Xs=qi(Ye,r=>r.screens),Yf=qi(Ye,r=>{var e;return(e=r.layouts)==null?void 0:e.find(t=>t._id===RL.MASTER.PRIVATE)}),Ks=fn("BASIC"),Jf=fn(null),j3={platformUrl:"",logoUrl:void 0,docsUrl:void 0,company:"Budibase",oidc:void 0,google:void 0,oidcCallbackUrl:"",googleCallbackUrl:""};function Fj(){const r=fn(j3),{subscribe:e,set:t}=r;async function n(){const s=lt(Ut).tenantId,l=await Ze.getTenantConfig(s);t(rt(Ee(Ee({},j3),l.config),{_rev:l._rev}))}async function i(s){const l=lt(r);delete l.oidc,delete l.google,delete l.oidcCallbackUrl,delete l.googleCallbackUrl,await Ze.saveConfig({type:"settings",config:Ee(Ee({},lt(r)),s),_rev:lt(r)._rev}),await n()}return{subscribe:e,set:t,save:i,init:n}}const mr=Fj();function Vj(){const{subscribe:r,set:e}=fn([]);async function t(){const a=await Ze.getUsers();e(a)}async function n({email:a,builder:u,admin:f}){return Ze.inviteUser({email:a,builder:u,admin:f})}async function i(a,u){return Ze.acceptInvite({inviteCode:a,password:u})}async function s({email:a,password:u,admin:f,builder:c,forceResetPassword:p}){const d={email:a,password:u,roles:{}};p&&(d.forceResetPassword=p),c&&(d.builder={global:!0}),f&&(d.admin={global:!0}),await Ze.saveUser(d),await t()}async function l(a){await Ze.deleteUser(a),Ms.exports.update(u=>u.filter(f=>f._id!==a))}async function o(a){await Ze.saveUser(a)}return{subscribe:r,init:t,invite:n,acceptInvite:i,create:s,save:o,delete:l}}const bi=Vj();function Hj(){const e=fn({loaded:!1,multiTenancy:!1,cloud:!1,isDev:!1,disableAccountPortal:!1,accountPortalUrl:"",importComplete:!1,onboardingProgress:0,checklist:{apps:{checked:!1},smtp:{checked:!1},adminUser:{checked:!1},sso:{checked:!1}}});async function t(){const l=lt(Ut).tenantId,o=await Ze.getChecklist(l),a=Object.keys(o).length,u=Object.values(o).filter(f=>f==null?void 0:f.checked).length;await i(),e.update(f=>(f.loaded=!0,f.checklist=o,f.onboardingProgress=u/a*100,f))}async function n(){const l=await Ze.checkImportComplete();e.update(o=>(o.importComplete=l?l.imported:!1,o))}async function i(){const l=await Ze.getEnvironment();e.update(o=>(o.multiTenancy=l.multiTenancy,o.cloud=l.cloud,o.disableAccountPortal=l.disableAccountPortal,o.accountPortalUrl=l.accountPortalUrl,o.isDev=l.isDev,o))}function s(){e.update(l=>(l.loaded=!1,l))}return{subscribe:e.subscribe,init:t,checkImportComplete:n,unload:s}}const kn=Hj(),m1=r=>{const e=(r==null?void 0:r.split("_"))||[];return e.length?e[e.length-1]:null};function Wj(){const r=fn([]);async function e(){const n=await Ze.getApps();if(Array.isArray(n)){let i={},s=n.filter(a=>a.status===Jo.DEV),l=n.filter(a=>a.status===Jo.DEPLOYED);s.forEach(a=>{const u=m1(a.appId);i[u]=rt(Ee({},a),{devId:a.appId,devRev:a._rev})}),l.forEach(a=>{const u=m1(a.appId);!i[u]||(i[u]=rt(Ee(Ee({},i[u]),a),{prodId:a.appId,prodRev:a._rev}))});const o=Object.values(i);o.forEach(a=>{a.appId=m1(a.devId),delete a._id,delete a._rev}),r.set(o)}else r.set([])}async function t(n,i){await Ze.saveAppMetadata({appId:n,metadata:i}),r.update(s=>{const l=s.findIndex(o=>o.instance._id===n);if(l!==-1){let o=s[l];o=Ee(Ee({},o),i),s.apps=s.splice(l,1,o)}return s})}return{subscribe:r.subscribe,load:e,update:t}}const Ri=Wj();function Gj(){const r=fn({});return{subscribe:r.subscribe,templates:{fetch:async()=>{const e=await Ze.getEmailTemplateDefinitions(),t=await Ze.getEmailTemplates();r.set({definitions:e,templates:t})},save:async e=>{const t=await Ze.saveEmailTemplate(e);e._rev=t._rev,e._id=t._id,r.update(n=>{const i=n.templates.findIndex(s=>s.purpose===t.purpose);return n.templates.splice(i,1,e),n})}}}}const Qf=Gj();function Yj(){const r=fn({user:null,tenantId:"default",tenantSet:!1,loaded:!1,postLogout:!1}),e=qi(r,a=>{var p,d;let u=null,f=!1,c=!1;if(a.user){const g=a.user;g.firstName?(u=g.firstName[0],g.lastName&&(u+=g.lastName[0])):g.email?u=g.email[0]:u="Unknown",f=!!((p=g.admin)==null?void 0:p.global),c=!!((d=g.builder)==null?void 0:d.global)}return{user:a.user,tenantId:a.tenantId,tenantSet:a.tenantSet,loaded:a.loaded,postLogout:a.postLogout,initials:u,isAdmin:f,isBuilder:c}});function t(a){r.update(u=>(u.loaded=!0,u.user=a,a&&(u.tenantId=a.tenantId||"default",u.tenantSet=!0),u)),a&&zn.activate().then(()=>{var u,f,c;zn.identify(a._id,a),zn.showChat({email:a.email,created_at:(a.createdAt||Date.now())/1e3,name:(u=a.account)==null?void 0:u.name,user_id:a._id,tenant:a.tenantId,"Company size":(f=a.account)==null?void 0:f.size,"Job role":(c=a.account)==null?void 0:c.profession})}).catch(()=>{})}async function n(a){const u=lt(e).tenantId;r.update(f=>(f.tenantId=a,f.tenantSet=!!a,f)),u!==a&&await kn.init()}async function i(a){return await Ze.setInitInfo(a),r.update(u=>(u.initInfo=a,u)),a}function s(){r.update(a=>(a.postLogout=!0,a))}async function l(){const a=await Ze.getInitInfo();return r.update(u=>(u.initInfo=a,u)),a}const o={checkQueryString:async()=>{const a=new URLSearchParams(window.location.search);if(a.has("tenantId")){const u=a.get("tenantId");await n(u)}},setOrg:async a=>{await n(a)},getSelf:async()=>{try{const a=await Ze.fetchBuilderSelf();t(a)}catch{t(null)}},login:async a=>{const u=lt(e).tenantId;await Ze.logIn({username:a.username,password:a.password,tenantId:u}),await o.getSelf()},logout:async()=>{t(null),s(),await Ze.logOut(),await i({})},updateSelf:async a=>{const u=Ee(Ee({},lt(r).user),a);await Ze.updateSelf(u),t(u)},forgotPassword:async a=>{const u=lt(e).tenantId;await Ze.requestForgotPassword({tenantId:u,email:a})},resetPassword:async(a,u)=>{const f=lt(e).tenantId;await Ze.resetPassword({tenantId:f,password:a,resetCode:u})}};return Ee({subscribe:e.subscribe,setOrganisation:n,getInitInfo:l,setInitInfo:i},o)}const Ut=Yj(),B3={logo:void 0,name:void 0,uuid:void 0};function Jj(){const r=fn(B3),{set:e,subscribe:t}=r;return{subscribe:t,set:e,init:async()=>{const n=lt(Ut).tenantId,i=await Ze.getOIDCConfig(n);Object.keys(i||{}).length?e(...i):e(B3)}}}const g1=Jj();function Qj(){const{subscribe:r,set:e}=fn([]);return{subscribe:r,load:async()=>{const t=await Ze.getAppTemplates();e(t)}}}const z3=Qj(),Ze=nL({attachHeaders:r=>{r["x-budibase-app-id"]=lt(Ye).appId;const e=lt(Ut).user;(e==null?void 0:e.csrfToken)&&(r["x-csrf-token"]=e.csrfToken)},onError:r=>{const{url:e,message:t,status:n,method:i,handled:s}=r||{};if(!s){console.error("Unhandled error from API client",r);return}console.warn(`[Builder] HTTP ${n} on ${i}:${e}
|
|
376
|
+
`}}},ti=gt(function(r,e){const{registerAll:t,registerMinimum:n}=y3,{atob:i,btoa:s}=Ca,{FIND_HBS_REGEX:l,findDoubleHbsInstances:o}=Ca,a=ta.create();t(a);const u=ta.create();n(u);const f={noHelpers:!1,cacheTemplates:!1,noEscaping:!1,escapeNewlines:!1,noFinalise:!1};function c(g){try{JSON.stringify(g)}catch{throw"Unable to process inputs to JSON, cannot recurse"}}let p={};function d(g,h){h=Ee(Ee({},f),h);const v=`${g}-${JSON.stringify(h)}`;if(h.cacheTemplates&&p[v])return p[v];g=$j(g,h),h.noEscaping&&(g=e.disableEscaping(g));const C=(h.noHelpers?u:a).compile(g,{strict:!1});return p[v]=C,C}r.exports.processObject=async(g,h,v)=>{c(g);for(let C of Object.keys(g||{}))if(g[C]!=null){let k=g[C];typeof k=="string"?g[C]=await r.exports.processString(g[C],h,v):typeof k=="object"&&(g[C]=await r.exports.processObject(g[C],h,v))}return g},r.exports.processString=async(g,h,v)=>r.exports.processStringSync(g,h,v),r.exports.processObjectSync=(g,h,v)=>{c(g);for(let C of Object.keys(g||{})){let k=g[C];typeof k=="string"?g[C]=r.exports.processStringSync(g[C],h,v):typeof k=="object"&&(g[C]=r.exports.processObjectSync(g[C],h,v))}return g},r.exports.processStringSync=(g,h,v)=>{const C=g;if(typeof g!="string")throw"Cannot process non-string types.";try{const k=d(g,v),I=1e3*Math.floor(Date.now()/1e3);return bj(k(Ee({now:new Date(I).toISOString(),__opts:v},h)))}catch{return C}},r.exports.disableEscaping=g=>{const h=o(g);if(h==null)return g;const v=[...new Set(h)];for(let C of v){const k=new RegExp(`${C}(?!})`,"g");g=g.replace(k,`{${C}}`)}return g},r.exports.makePropSafe=g=>`[${g}]`.replace("[[","[").replace("]]","]"),r.exports.isValid=(g,h)=>{const v=["string","number","object","array","cannot read property","undefined"],C=["expecting '"],k={};try{return d(g,rt(Ee({},h),{noFinalise:!0}))(k),!0}catch(I){const S=I&&I.message?I.message:I;if(!S)return!1;const T=C.some(N=>S.toLowerCase().includes(N));return v.some(N=>S.toLowerCase().includes(N))&&!T}},r.exports.getManifest=()=>vj,r.exports.isJSBinding=g=>r.exports.decodeJSBinding(g)!=null,r.exports.encodeJSBinding=g=>`{{ js "${s(g)}" }}`,r.exports.decodeJSBinding=g=>{if(!g||typeof g!="string"||!g.trim().startsWith("{{ js "))return null;const h=new RegExp(/{{ js "(.*)" }}/),v=g.match(h);return!v||v.length<2?null:i(v[1])},r.exports.doesContainStrings=(g,h)=>{let v=new RegExp(l),C=g.match(v);if(C==null)return!1;for(let k of C){let I=k;e.isJSBinding(k)&&(I=e.decodeJSBinding(k));let S=!0;for(let T of h)I.includes(T)||(S=!1);if(S)return!0}return!1},r.exports.doesContainString=(g,h)=>e.doesContainStrings(g,[h])});const O3=ti.isValid,On=ti.makePropSafe,wj=ti.getManifest,Uf=ti.isJSBinding,p1=ti.encodeJSBinding,Ff=ti.decodeJSBinding,Vf=ti.processStringSync;ti.processObjectSync;ti.processString;ti.processObject;ti.doesContainStrings;ti.doesContainString;ti.disableEscaping;w3((r,e)=>(e=rt(Ee({},e),{alert:void 0,setInterval:void 0,setTimeout:void 0}),f2.createContext(e),f2.runInNewContext(r,e,{timeout:1e3})));const yj=[{name:"Save Row",component:"SaveRow",context:[{label:"Saved row",value:"row"}]},{name:"Duplicate Row",component:"DuplicateRow",context:[{label:"Duplicated row",value:"row"}]},{name:"Delete Row",component:"DeleteRow"},{name:"Navigate To",component:"NavigateTo"},{name:"Execute Query",component:"ExecuteQuery",context:[{label:"Query result",value:"result"}]},{name:"Trigger Automation",component:"TriggerAutomation"},{name:"Validate Form",component:"ValidateForm"},{name:"Log Out",component:"LogOut"},{name:"Clear Form",component:"ClearForm"},{name:"Close Screen Modal",component:"CloseScreenModal"},{name:"Change Form Step",component:"ChangeFormStep"},{name:"Refresh Data Provider",component:"RefreshDataProvider"},{name:"Update State",component:"UpdateState",dependsOnFeature:"state"},{name:"Upload File to S3",component:"S3Upload",context:[{label:"File URL",value:"publicUrl"}]}];var T3={actions:yj};const kj=/{{([^}]+)}}/g,Cj=/\$\("([^")]+)"\)/g,Sj=/{{[\S\s]*?}}/g,Aj=(r,e)=>{const t=Oj(r,e),n=Tj(),i=Pj(r),s=Ij(),l=Lj();return[...t,...i,...l,...n,...s]},Ej=(r,e)=>{if(!r||!e)return[];const t=Bs(r.props,e),n=Ye.actions.components.getDefinition(t==null?void 0:t._component);return(n==null?void 0:n.context)?I3(r,t):[]},co=(r,e,t)=>{if(!r||!e)return[];const n=qs(r.props,e);return n.pop(),n.filter(i=>{const s=Ye.actions.components.getDefinition(i._component);return(s==null?void 0:s.context)?t?(Array.isArray(s.context)?s.context:[s.context]).find(o=>o.type===t)!=null:!0:!1})},Hf=(r,e,t)=>{if(!r||!e)return[];const n=qs(r.props,e);return n.pop(),n.filter(i=>{var l;const s=Ye.actions.components.getDefinition(i._component);return(l=s==null?void 0:s.actions)==null?void 0:l.includes(t)})},ks=(r,e)=>{const t=Qo(e==null?void 0:e._component),n=t.find(l=>l.type==="dataProvider");if(n){const l=e[n.key],o=Mj(l),a=Bs(r.props,o);return ks(r,a)}const i=["dataSource","table","schema"],s=t.find(l=>i.includes(l.type));return s?s.type==="table"?{tableId:e[s==null?void 0:s.key],type:"table"}:e[s==null?void 0:s.key]:null},Oj=(r,e)=>{const t=co(r,e);return I3(r,t)},I3=(r,e)=>{if(!r||!e)return[];Array.isArray(e)||(e=[e]);let t=[];return e.forEach(n=>{const i=Ye.actions.components.getDefinition(n._component);(Array.isArray(i.context)?i.context:[i.context]).forEach(l=>{var g;if(!(l==null?void 0:l.type))return;let o,a,u,f=l.suffix;if(l.type==="form")o=L3(n),u="Fields";else if(l.type==="static")o={},(l.values||[]).forEach(v=>{o[v.key]={name:v.label,type:"string"}});else if(l.type==="schema"){const h=ks(r,n);if(!h)return;const v=Ni(r,h);if(o=v.schema,a=v.table,h.type==="jsonarray"){const C=h.label.split(".");u=C[C.length-1]}else u=(g=v.table)==null?void 0:g.name}if(!o)return;const c=Object.keys(o).sort();let p=n._id;f&&(p+=`-${f}`);const d=On(p);c.forEach(h=>{const v=o[h],C=h.split(".").map(On).join("."),k=`${d}.${C}`;let I=n._instanceName;u&&(I+=`.${u}`),I+=`.${v.name||h}`,t.push({type:"context",runtimeBinding:k,readableBinding:I,fieldSchema:v,providerId:p,tableId:a==null?void 0:a._id})})})}),t},Tj=()=>{let r=[];const{schema:e}=Wf(cs.USERS),t=Object.keys(e).sort(),n=On("user");return t.forEach(i=>{const s=e[i];r.push({type:"context",runtimeBinding:`${n}.${On(i)}`,readableBinding:`Current User.${i}`,fieldSchema:s,providerId:"user"})}),r},Ij=()=>{var e;let r=[];if((e=lt(Ye).clientFeatures)==null?void 0:e.deviceAwareness){const t=On("device");r.push({type:"context",runtimeBinding:`${t}.${On("mobile")}`,readableBinding:"Device.Mobile"}),r.push({type:"context",runtimeBinding:`${t}.${On("tablet")}`,readableBinding:"Device.Tablet"})}return r},Lj=()=>{var e;let r=[];if((e=lt(Ye).clientFeatures)==null?void 0:e.state){const t=On("state");r=P3().map(n=>({type:"context",runtimeBinding:`${t}.${On(n)}`,readableBinding:`State.${n}`}))}return r},Pj=r=>{var s,l;const t=((l=(s=r==null?void 0:r.routing)==null?void 0:s.route)!=null?l:"").split("/");let n=[];t.forEach(o=>{o.startsWith(":")&&o.length>1&&n.push(o.replace(/:/g,"").replace(/\?/g,""))});const i=On("url");return n.map(o=>({type:"context",runtimeBinding:`${i}.${On(o)}`,readableBinding:`URL.${o}`}))},Nj=(r,e)=>{const t=r==null?void 0:r.findIndex(s=>s.id===e);if(t==null||t===-1)return[];const n=r.slice(0,t);let i=[];return n.forEach((s,l)=>{const o=T3.actions.find(a=>a.name===s["##eventHandlerType"]);o.context&&o.context.forEach(a=>{i.push({readableBinding:`Action ${l+1}.${a.label}`,runtimeBinding:`actions.${l}.${a.value}`})})}),i},Wf=(r,e)=>Ni(null,{type:"table",tableId:r},e),Ni=(r,e,t)=>{var s,l;t=t||{};let n,i;if(e){const{type:o}=e,a=lt(At).list;if(o==="provider"){const g=Bs(r.props,e.providerId),h=ks(r,g);return Ni(r,h,t)}else if(o==="query")i=lt($n).list.find(h=>h._id===e._id);else if(o==="field"){i={name:e.fieldName};const{fieldType:g}=e;g==="attachment"?n={url:{type:"string"},name:{type:"string"}}:g==="array"&&(n={value:{type:"string"}})}else if(o==="jsonarray"){i=a.find(h=>h._id===e.tableId);let g=i==null?void 0:i.schema;n=G0(g,e)}else i=a.find(g=>g._id===e.tableId);if(i&&!n&&(o==="view"?n=hn.cloneDeep((l=(s=i.views)==null?void 0:s[e.name])==null?void 0:l.schema):o==="query"&&(t.formSchema||t.searchableSchema)?(n={},(i.parameters||[]).forEach(h=>{(h==null?void 0:h.name)&&(n[h.name]=rt(Ee({},h),{type:"string"}))})):n=hn.cloneDeep(i.schema)),n){let g={};Object.keys(n).forEach(h=>{const v=n[h];if((v==null?void 0:v.type)==="json"){const C=Y0(v,{squashObjects:!0});Object.keys(C).forEach(k=>{g[`${h}.${k}`]={type:C[k].type,nestedJSON:!0}})}}),n=Ee(Ee({},n),g)}const u=i&&!i.sql,f=["table","link"].includes(e.type);let c=f,p=f&&u;t.formSchema?(c=!1,p=!1):t.searchableSchema&&(c=f&&u),n&&(c&&(n._id={type:"string"}),p&&(n._rev={type:"string"}));let d={};Object.entries(n||{}).forEach(([g,h])=>{typeof h=="string"?d[g]={type:h,name:g}:d[g]=rt(Ee({},h),{name:g})}),n=d}return{schema:n,table:i}},L3=r=>{var i;let e={};if(!r)return e;const n=Qo(r._component).find(s=>s.key==="field"&&s.type.startsWith("field/"));if(n&&r.field){const s=n.type.split("field/")[1];s&&(e[r.field]={type:s})}return(i=r._children)==null||i.forEach(s=>{const l=L3(s);e=Ee(Ee({},e),l)}),e},P3=()=>{let r=[];r=r.concat(lt(Ye).layouts||[]),r=r.concat(lt(Ye).screens||[]);let e=[];r.forEach(n=>{Fu(n.props,i=>{Qo(i._component).filter(l=>l.type==="event").forEach(l=>{e.push(i[l.key])})})});let t=new Set;return e.forEach(n=>{!Array.isArray(n)||n.forEach(i=>{var s,l,o;i["##eventHandlerType"]==="Update State"&&((s=i.parameters)==null?void 0:s.type)==="set"&&((l=i.parameters)==null?void 0:l.key)&&((o=i.parameters)==null?void 0:o.value)&&t.add(i.parameters.key)})}),Array.from(t)},N3=(r,e="Invalid binding")=>{for(let[t,n]of Object.entries(r))n&&typeof n=="object"?r[t]=N3(n,e):typeof n=="string"&&(r[t]=n.replace(Sj,e));return r},Rj=(r,e,t)=>{if(!(r==null?void 0:r.includes(e)))return!1;if(t==="readableBinding")return!0;const n=r.replace(/\s+/g,""),i=e.replace(/\s+/g,"");return![`[${i}]`,`"${i}"`,`'${i}'`].find(l=>n==null?void 0:n.includes(l))},R3=(r,e,t,n)=>r.substring(0,e)+n+r.substring(t),M3=(r,e,t)=>{const n=Uf(e);n&&(e=Ff(e));const i=n?Cj:kj,s=t==="runtimeBinding"?"readableBinding":"runtimeBinding";if(typeof e!="string")return e;const l=r.map(u=>u[s]).sort((u,f)=>f.length-u.length),o=e.match(i)||[];let a=e;for(let u of o){let f=u,c=f;for(let p of l)if(n||Rj(f,p,t)){const d=r.find(h=>h[s]===p);let g;do if(g=c.indexOf(p),g!==-1){let h=g+p.length,v=Array(d[t].length+1).join("*");c=R3(c,g,h,v),f=R3(f,g,h,d[t])}while(g!==-1)}a=a.replace(u,f)}return n&&(a=p1(a)),a},Mj=r=>{var e;return(e=r==null?void 0:r.match(/{{\s*literal\s*\[+([^\]]+)].*}}/))==null?void 0:e[1]},Sl=(r,e)=>M3(r,e,"runtimeBinding"),po=(r,e)=>M3(r,e,"readableBinding"),d1={apps:[],name:"",url:"",description:"",layouts:[],screens:[],components:[],clientFeatures:{spectrumThemes:!1,intelligentLoading:!1,deviceAwareness:!1,state:!1,customThemes:!1,devicePreview:!1,messagePassing:!1},currentFrontEndType:"none",selectedScreenId:"",selectedLayoutId:"",selectedComponentId:"",errors:[],hasAppPackage:!1,libraries:null,appId:"",routes:{},clientLibPath:"",theme:"",customTheme:{},previewDevice:"desktop"},Dj=()=>{const r=fn(Ee({},d1));return r.actions={reset:()=>{r.set(Ee({},d1))},initialise:async e=>{const{layouts:t,screens:n,application:i,clientLibPath:s}=e;let l=await Ze.fetchComponentLibDefinitions(i.appId);r.update(o=>rt(Ee({},o),{libraries:i.componentLibraries,components:l,clientFeatures:Ee(Ee({},d1.clientFeatures),l.features),name:i.name,description:i.description,appId:i.appId,url:i.url,layouts:t||[],screens:n||[],theme:i.theme||"spectrum--light",customTheme:i.customTheme,hasAppPackage:!0,appInstance:i.instance,clientLibPath:s,previousTopNavPath:{},version:i.version,revertableVersion:i.revertableVersion})),pl.set(i.instance),await Zt.init(),await js.init(),await $n.init(),await At.init()},theme:{save:async e=>{const t=lt(r).appId;await Ze.saveAppMetadata({appId:t,metadata:{theme:e}}),r.update(n=>(n.theme=e,n))}},customTheme:{save:async e=>{const t=lt(r).appId;await Ze.saveAppMetadata({appId:t,metadata:{customTheme:e}}),r.update(n=>(n.customTheme=e,n))}},routing:{fetch:async()=>{const e=await Ze.fetchAppRoutes();r.update(t=>(t.routes=e.routes,t))}},screens:{select:e=>{r.update(t=>{var s;let n=lt(Xs),i=n.find(l=>l._id===e)||n[0];return i&&(Ks.set(i.routing.roleId),t.currentFrontEndType=Jn.SCREEN,t.selectedScreenId=i._id,t.currentView="detail",t.selectedComponentId=(s=i.props)==null?void 0:s._id),t})},save:async e=>{const t=e._id===void 0,n=await Ze.saveScreen(e);return r.update(i=>{const s=i.screens.findIndex(l=>l._id===n._id);return s!==-1?i.screens.splice(s,1,n):i.screens.push(n),i}),await r.actions.routing.fetch(),t&&r.actions.screens.select(n._id),n},delete:async e=>{const t=Array.isArray(e)?e:[e],n=[];t.forEach(s=>{n.push(Ze.deleteScreen({screenId:s._id,screenRev:s._rev})),n.push(r.actions.components.links.delete(s.routing.route,s.props._instanceName))}),await Promise.all(n);const i=t.map(s=>s._id);r.update(s=>(s.screens=s.screens.filter(l=>!i.includes(l._id)),i.includes(s.selectedScreenId)&&(s.selectedScreenId=null),s)),await r.actions.routing.fetch()}},preview:{saveSelected:async()=>{const e=lt(r),t=lt(dn);return e.currentFrontEndType!==Jn.LAYOUT?await r.actions.screens.save(t):await r.actions.layouts.save(t)},setDevice:e=>{r.update(t=>(t.previewDevice=e,t))}},layouts:{select:e=>{r.update(t=>{var i;const n=r.actions.layouts.find(e)||lt(r).layouts[0];if(!!n)return t.currentFrontEndType=Jn.LAYOUT,t.currentView="detail",t.selectedLayoutId=n._id,t.selectedComponentId=(i=n.props)==null?void 0:i._id,t})},save:async e=>{const t=e._id===void 0,n=await Ze.saveLayout(e);return r.update(i=>{const s=i.layouts.findIndex(l=>l._id===n._id);return s!==-1?i.layouts.splice(s,1,n):i.layouts.push(n),i}),t&&r.actions.layouts.select(n._id),n},find:e=>e?lt(r).layouts.find(n=>n._id===e):lt(Yf),delete:async e=>{!(e==null?void 0:e._id)||(await Ze.deleteLayout({layoutId:e._id,layoutRev:e._rev}),r.update(t=>(e._id===t.selectedLayoutId&&(t.selectedLayoutId=lt(Yf)._id),t.layouts=t.layouts.filter(n=>n._id!==e._id),t)))}},components:{select:e=>{const t=lt(dn);if(!t||!e)return;if(zs(t.props,e._id)==null){lt(r).currentFrontEndType===Jn.LAYOUT?r.actions.layouts.select(t._id):r.actions.screens.select(t._id);return}r.update(i=>(i.selectedComponentId=e._id,i.currentView="component",i))},getDefinition:e=>e?(e.startsWith("@budibase")||(e=`@budibase/standard-components/${e}`),lt(r).components[e]):null,createInstance:(e,t)=>{const n=r.actions.components.getDefinition(e);if(!n)return null;const i=Qo(e);let s=Ee({},t);i.forEach(o=>{o.defaultValue!==void 0&&(s[o.key]=o.defaultValue)});let l={};if(n.hasChildren&&(l._children=[]),e.endsWith("/formstep")){const o=Vu(lt(dn).props,lt(ni)._id,u=>u._component.endsWith("/form")),a=Fu(o,u=>u._component.endsWith("/formstep"));l.step=a.length+1,l._instanceName=`Step ${a.length+1}`}return Ee(Ee({_id:Ui(),_component:n.component,_styles:{normal:{},hover:{},active:{}},_instanceName:`New ${n.name}`},hn.cloneDeep(s)),l)},create:async(e,t)=>{const n=lt(ni),i=lt(dn),s=r.actions.components.createInstance(e,t);if(!s||!i)return;let l;if(n){const o=r.actions.components.getDefinition(n._component);(o==null?void 0:o.hasChildren)?l=n:l=zs(i.props,n._id)}else l=i.props;if(!!l)return l._children||(l._children=[]),l._children.push(s),await r.actions.preview.saveSelected(),r.update(o=>(o.currentView="component",o.selectedComponentId=s._id,o)),zn.captureEvent(Qn.COMPONENT.CREATED,{name:s._component}),s},delete:async e=>{var s;if(!e)return;const t=lt(dn);if(!t)return;if(e=Bs(t.props,e._id),(s=e._component)==null?void 0:s.endsWith("/screenslot"))throw"You can't delete the screen slot";if(Pp(e,"@budibase/standard-components/screenslot")!=null)throw"You can't delete a component that contains the screen slot";const i=zs(t.props,e._id);i&&(i._children=i._children.filter(l=>l._id!==e._id),r.actions.components.select(i)),await r.actions.preview.saveSelected()},copy:(e,t=!1)=>{const n=lt(dn);if(!n)return null;if(r.update(i=>(i.componentToPaste=hn.cloneDeep(e),i.componentToPaste.isCut=t,i)),t){const i=zs(n.props,e._id);i&&(i._children=i._children.filter(s=>s._id!==e._id),r.actions.components.select(i))}},paste:async(e,t,n=!1)=>{let i=[];r.update(s=>{if(!s.componentToPaste)return s;const l=s.componentToPaste.isCut;!l&&!n&&(s.componentToPaste=N3(s.componentToPaste,"")),delete s.componentToPaste.isCut;let o=hn.cloneDeep(s.componentToPaste);if(l)s.componentToPaste=null;else{const a=u=>{var f;!u||(u._id=Ui(),(f=u._children)==null||f.forEach(a))};a(o)}if(t==="inside")e._children||(e._children=[]),e._children.push(o);else{const a=lt(dn);if(!a)return s;const u=zs(a.props,e._id);if(!u)return s;const f=u._children.indexOf(e),c=t==="above"?f:f+1;u._children.splice(c,0,hn.cloneDeep(o))}return i.push(r.actions.preview.saveSelected()),r.actions.components.select(o),s}),await Promise.all(i)},updateStyle:async(e,t)=>{const n=lt(ni);t==null||t===""?delete n._styles.normal[e]:n._styles.normal[e]=t,await r.actions.preview.saveSelected()},updateCustomStyle:async e=>{const t=lt(ni);t._styles.custom=e,await r.actions.preview.saveSelected()},updateConditions:async e=>{const t=lt(ni);t._conditions=e,await r.actions.preview.saveSelected()},updateProp:async(e,t)=>{let n=lt(ni);!e||!n||n[e]!==t&&(n[e]=t,r.update(i=>(i.selectedComponentId=n._id,i)),await r.actions.preview.saveSelected())},links:{save:async(e,t)=>{const n=lt(Yf);if(!!n){if(n.props._component.endsWith("layout"))n.props.links||(n.props.links=[]),n.props.links.push({text:t,url:e});else{const i=Pp(n.props,"@budibase/standard-components/navigation");if(!i)return;let s;i._children&&i._children.length?(s=hn.cloneDeep(i._children[0]),s._id=Ui(),s._instanceName=`${t} Link`,s.url=e,s.text=t):(s=rt(Ee({},r.actions.components.createInstance("link")),{url:e,text:t,_instanceName:`${t} Link`}),i._children=[...i._children,s])}await r.actions.layouts.save(n)}},delete:async(e,t)=>{const n=lt(Yf);if(!!n){if(n.props._component.endsWith("layout"))n.props.links=n.props.links.filter(i=>!(i.text===t&&i.url===e));else{const i=Pp(n.props,"@budibase/standard-components/navigation");if(!i)return;i._children=i._children.filter(s=>!(s.url===e&&s.text===t))}await r.actions.layouts.save(n)}}}}},r};class D3{constructor(e){this.automation=e}hasTrigger(){return this.automation.definition.trigger}addTestData(e){this.automation.testData=Ee(Ee({},this.automation.testData),e)}addBlock(e,t){if(!this.hasTrigger()&&e.type==="TRIGGER"){const i=Ee({id:Br.generate()},e);return this.automation.definition.trigger=i,i}const n=Ee({id:Br.generate()},e);return this.automation.definition.steps.splice(t,0,n),n}updateBlock(e,t){const{steps:n,trigger:i}=this.automation.definition;if(i&&i.id===t){this.automation.definition.trigger=e;return}const s=n.findIndex(l=>l.id===t);if(s<0)throw new Error("Block not found.");n.splice(s,1,e),this.automation.definition.steps=n}deleteBlock(e){const{steps:t,trigger:n}=this.automation.definition;if(n&&n.id===e){this.automation.definition.trigger=null;return}const i=t.findIndex(s=>s.id===e);if(i<0)throw new Error("Block not found.");t.splice(i,1),this.automation.definition.steps=t}constructBlock(e,t,n){return rt(Ee({},n),{inputs:n.inputs||{},stepId:t,type:e})}}const jj={automations:[],blockDefinitions:{TRIGGER:[],ACTION:[]},selectedAutomation:null},Bj=()=>{const r=fn(jj);return r.actions=zj(r),r},zj=r=>({fetch:async()=>{const e=await Promise.all([Ze.getAutomations(),Ze.getAutomationDefinitions()]);r.update(t=>{var i;let n=(i=t.selectedAutomation)==null?void 0:i.automation;return t.automations=e[0],t.blockDefinitions={TRIGGER:e[1].trigger,ACTION:e[1].action},n&&(n=e[0].filter(s=>s._id===n._id),t.selectedAutomation=new D3(n[0])),t})},create:async({name:e})=>{const t={name:e,type:"automation",definition:{steps:[]}},n=await Ze.createAutomation(t);r.update(i=>(i.automations=[...i.automations,n.automation],r.actions.select(n.automation),i))},save:async e=>{const t=await Ze.updateAutomation(e);r.update(n=>{const i=t.automation,s=n.automations.findIndex(l=>l._id===e._id);if(s!==-1)return n.automations.splice(s,1,i),n.automations=[...n.automations],r.actions.select(i),n})},delete:async e=>{await Ze.deleteAutomation({automationId:e==null?void 0:e._id,automationRev:e==null?void 0:e._rev}),r.update(t=>{const n=t.automations.findIndex(i=>i._id===(e==null?void 0:e._id));return t.automations.splice(n,1),t.automations=[...t.automations],t.selectedAutomation=null,t.selectedBlock=null,t})},test:async(e,t)=>{r.update(i=>(i.selectedAutomation.testResults=null,i));const n=await Ze.testAutomation({automationId:e==null?void 0:e._id,testData:t});r.update(i=>(i.selectedAutomation.testResults=n,i))},select:e=>{r.update(t=>{var i;let n=(i=t.selectedAutomation)==null?void 0:i.testResults;return t.selectedAutomation=new D3(hn.cloneDeep(e)),t.selectedAutomation.testResults=n,t.selectedBlock=null,t})},addTestDataToAutomation:e=>{r.update(t=>(t.selectedAutomation.addTestData(e),t))},addBlockToAutomation:(e,t)=>{r.update(n=>{const i=n.selectedAutomation.addBlock(hn.cloneDeep(e),t);return n.selectedBlock=i,n}),zn.captureEvent(Qn.AUTOMATION.BLOCK_ADDED,{name:e.name})},deleteAutomationBlock:e=>{r.update(t=>{const n=t.selectedAutomation.automation.definition.steps.findIndex(l=>l.id===e.id);t.selectedAutomation.deleteBlock(e.id);const i=t.selectedAutomation.automation.definition.steps;let s;return i[n]!=null?s=i[n]:i[n-1]!=null?s=i[n-1]:s=t.selectedAutomation.automation.definition.trigger||null,t.selectedBlock=s,t})}}),qj=()=>{const r=document.documentElement,e={theme:"darkest",options:["lightest","light","dark","darkest"]},t=rL("bb-theme",e);return t.subscribe(n=>{if(n.darkMode!==void 0){t.set(e);return}n.options.forEach(i=>{r.classList.toggle(`spectrum--${i}`,i===n.theme)})}),t},Ye=Dj(),xt=Bj(),Gf=qj(),dn=qi(Ye,r=>{const e=r.currentFrontEndType;return e===Jn.SCREEN?r.screens.find(t=>t._id===r.selectedScreenId):e===Jn.LAYOUT?r.layouts.find(t=>t._id===r.selectedLayoutId):null}),ni=qi([Ye,dn],([r,e])=>!e||!r.selectedComponentId?null:Bs(e.props,r.selectedComponentId));qi(Ye,r=>r.currentFrontEndType===Jn.SCREEN?r.selectedScreenId:r.selectedLayoutId);const Uj=qi(dn,r=>r==null?void 0:r.name),Xs=qi(Ye,r=>r.screens),Yf=qi(Ye,r=>{var e;return(e=r.layouts)==null?void 0:e.find(t=>t._id===RL.MASTER.PRIVATE)}),Ks=fn("BASIC"),Jf=fn(null),j3={platformUrl:"",logoUrl:void 0,docsUrl:void 0,company:"Budibase",oidc:void 0,google:void 0,oidcCallbackUrl:"",googleCallbackUrl:""};function Fj(){const r=fn(j3),{subscribe:e,set:t}=r;async function n(){const s=lt(Ut).tenantId,l=await Ze.getTenantConfig(s);t(rt(Ee(Ee({},j3),l.config),{_rev:l._rev}))}async function i(s){const l=lt(r);delete l.oidc,delete l.google,delete l.oidcCallbackUrl,delete l.googleCallbackUrl,await Ze.saveConfig({type:"settings",config:Ee(Ee({},lt(r)),s),_rev:lt(r)._rev}),await n()}return{subscribe:e,set:t,save:i,init:n}}const mr=Fj();function Vj(){const{subscribe:r,set:e}=fn([]);async function t(){const a=await Ze.getUsers();e(a)}async function n({email:a,builder:u,admin:f}){return Ze.inviteUser({email:a,builder:u,admin:f})}async function i(a,u){return Ze.acceptInvite({inviteCode:a,password:u})}async function s({email:a,password:u,admin:f,builder:c,forceResetPassword:p}){const d={email:a,password:u,roles:{}};p&&(d.forceResetPassword=p),c&&(d.builder={global:!0}),f&&(d.admin={global:!0}),await Ze.saveUser(d),await t()}async function l(a){await Ze.deleteUser(a),Ms.exports.update(u=>u.filter(f=>f._id!==a))}async function o(a){await Ze.saveUser(a)}return{subscribe:r,init:t,invite:n,acceptInvite:i,create:s,save:o,delete:l}}const bi=Vj();function Hj(){const e=fn({loaded:!1,multiTenancy:!1,cloud:!1,isDev:!1,disableAccountPortal:!1,accountPortalUrl:"",importComplete:!1,onboardingProgress:0,checklist:{apps:{checked:!1},smtp:{checked:!1},adminUser:{checked:!1},sso:{checked:!1}}});async function t(){const l=lt(Ut).tenantId,o=await Ze.getChecklist(l),a=Object.keys(o).length,u=Object.values(o).filter(f=>f==null?void 0:f.checked).length;await i(),e.update(f=>(f.loaded=!0,f.checklist=o,f.onboardingProgress=u/a*100,f))}async function n(){const l=await Ze.checkImportComplete();e.update(o=>(o.importComplete=l?l.imported:!1,o))}async function i(){const l=await Ze.getEnvironment();e.update(o=>(o.multiTenancy=l.multiTenancy,o.cloud=l.cloud,o.disableAccountPortal=l.disableAccountPortal,o.accountPortalUrl=l.accountPortalUrl,o.isDev=l.isDev,o))}function s(){e.update(l=>(l.loaded=!1,l))}return{subscribe:e.subscribe,init:t,checkImportComplete:n,unload:s}}const kn=Hj(),m1=r=>{const e=(r==null?void 0:r.split("_"))||[];return e.length?e[e.length-1]:null};function Wj(){const r=fn([]);async function e(){const n=await Ze.getApps();if(Array.isArray(n)){let i={},s=n.filter(a=>a.status===Jo.DEV),l=n.filter(a=>a.status===Jo.DEPLOYED);s.forEach(a=>{const u=m1(a.appId);i[u]=rt(Ee({},a),{devId:a.appId,devRev:a._rev})}),l.forEach(a=>{const u=m1(a.appId);!i[u]||(i[u]=rt(Ee(Ee({},i[u]),a),{prodId:a.appId,prodRev:a._rev}))});const o=Object.values(i);o.forEach(a=>{a.appId=m1(a.devId),delete a._id,delete a._rev}),r.set(o)}else r.set([])}async function t(n,i){await Ze.saveAppMetadata({appId:n,metadata:i}),r.update(s=>{const l=s.findIndex(o=>o.instance._id===n);if(l!==-1){let o=s[l];o=Ee(Ee({},o),i),s.apps=s.splice(l,1,o)}return s})}return{subscribe:r.subscribe,load:e,update:t}}const Ri=Wj();function Gj(){const r=fn({});return{subscribe:r.subscribe,templates:{fetch:async()=>{const e=await Ze.getEmailTemplateDefinitions(),t=await Ze.getEmailTemplates();r.set({definitions:e,templates:t})},save:async e=>{const t=await Ze.saveEmailTemplate(e);e._rev=t._rev,e._id=t._id,r.update(n=>{const i=n.templates.findIndex(s=>s.purpose===t.purpose);return n.templates.splice(i,1,e),n})}}}}const Qf=Gj();function Yj(){const r=fn({user:null,tenantId:"default",tenantSet:!1,loaded:!1,postLogout:!1}),e=qi(r,a=>{var p,d;let u=null,f=!1,c=!1;if(a.user){const g=a.user;g.firstName?(u=g.firstName[0],g.lastName&&(u+=g.lastName[0])):g.email?u=g.email[0]:u="Unknown",f=!!((p=g.admin)==null?void 0:p.global),c=!!((d=g.builder)==null?void 0:d.global)}return{user:a.user,tenantId:a.tenantId,tenantSet:a.tenantSet,loaded:a.loaded,postLogout:a.postLogout,initials:u,isAdmin:f,isBuilder:c}});function t(a){r.update(u=>(u.loaded=!0,u.user=a,a&&(u.tenantId=a.tenantId||"default",u.tenantSet=!0),u)),a&&zn.activate().then(()=>{var u,f,c;zn.identify(a._id,a),zn.showChat({email:a.email,created_at:(a.createdAt||Date.now())/1e3,name:(u=a.account)==null?void 0:u.name,user_id:a._id,tenant:a.tenantId,"Company size":(f=a.account)==null?void 0:f.size,"Job role":(c=a.account)==null?void 0:c.profession})}).catch(()=>{})}async function n(a){const u=lt(e).tenantId;r.update(f=>(f.tenantId=a,f.tenantSet=!!a,f)),u!==a&&await kn.init()}async function i(a){return await Ze.setInitInfo(a),r.update(u=>(u.initInfo=a,u)),a}function s(){r.update(a=>(a.postLogout=!0,a))}async function l(){const a=await Ze.getInitInfo();return r.update(u=>(u.initInfo=a,u)),a}const o={checkQueryString:async()=>{const a=new URLSearchParams(window.location.search);if(a.has("tenantId")){const u=a.get("tenantId");await n(u)}},setOrg:async a=>{await n(a)},getSelf:async()=>{try{const a=await Ze.fetchBuilderSelf();t(a)}catch{t(null)}},login:async a=>{const u=lt(e).tenantId;await Ze.logIn({username:a.username,password:a.password,tenantId:u}),await o.getSelf()},logout:async()=>{t(null),s(),await Ze.logOut(),await i({})},updateSelf:async a=>{const u=Ee(Ee({},lt(r).user),a);await Ze.updateSelf(u),t(u)},forgotPassword:async a=>{const u=lt(e).tenantId;await Ze.requestForgotPassword({tenantId:u,email:a})},resetPassword:async(a,u)=>{const f=lt(e).tenantId;await Ze.resetPassword({tenantId:f,password:a,resetCode:u})}};return Ee({subscribe:e.subscribe,setOrganisation:n,getInitInfo:l,setInitInfo:i},o)}const Ut=Yj(),B3={logo:void 0,name:void 0,uuid:void 0};function Jj(){const r=fn(B3),{set:e,subscribe:t}=r;return{subscribe:t,set:e,init:async()=>{const n=lt(Ut).tenantId,i=await Ze.getOIDCConfig(n);Object.keys(i||{}).length?e(...i):e(B3)}}}const g1=Jj();function Qj(){const{subscribe:r,set:e}=fn([]);return{subscribe:r,load:async()=>{const t=await Ze.getAppTemplates();e(t)}}}const z3=Qj(),Ze=nL({attachHeaders:r=>{r["x-budibase-app-id"]=lt(Ye).appId;const e=lt(Ut).user;(e==null?void 0:e.csrfToken)&&(r["x-csrf-token"]=e.csrfToken)},onError:r=>{const{url:e,message:t,status:n,method:i,handled:s}=r||{};if(!s){console.error("Unhandled error from API client",r);return}console.warn(`[Builder] HTTP ${n} on ${i}:${e}
|
|
377
377
|
${t}`),n===403&&(Op(Go.Auth),!e.includes("self")&&!e.includes("login")&&location.reload())}});function q3(r){return r&&!!r.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)||"Please enter a valid email"}function U3(r){return r!=null&&r!==""||"This field is required"}function Xf(r,...e){let t=!1;const n=fn(r||""),i=qi(n,l=>Xj(l,e)),s=qi(n,()=>t||(t=!0,!1));return[n,i,s]}function Xj(r,e){const t=e.find(n=>n(r)!==!0);return t&&t(r)}function Kj(r){let e,t,n,i,s,l;function o(c){r[12](c)}let a={label:"Password",type:"password",error:r[3]&&r[4]};r[1]!==void 0&&(a.value=r[1]),e=new et({props:a}),Z.push(()=>ce(e,"value",o));function u(c){r[13](c)}let f={label:"Repeat Password",type:"password",error:r[2]&&r[1]!==r[0]&&"Passwords must match"};return r[0]!==void 0&&(f.value=r[0]),i=new et({props:f}),Z.push(()=>ce(i,"value",u)),{c(){A(e.$$.fragment),n=R(),A(i.$$.fragment)},m(c,p){E(e,c,p),$(c,n,p),E(i,c,p),l=!0},p(c,p){const d={};p&24&&(d.error=c[3]&&c[4]),!t&&p&2&&(t=!0,d.value=c[1],pe(()=>t=!1)),e.$set(d);const g={};p&7&&(g.error=c[2]&&c[1]!==c[0]&&"Passwords must match"),!s&&p&1&&(s=!0,g.value=c[0],pe(()=>s=!1)),i.$set(g)},i(c){l||(m(e.$$.fragment,c),m(i.$$.fragment,c),l=!0)},o(c){_(e.$$.fragment,c),_(i.$$.fragment,c),l=!1},d(c){O(e,c),c&&b(n),O(i,c)}}}function Zj(r){let e,t;return e=new Qe({props:{gap:"XS",noPadding:!0,$$slots:{default:[Kj]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,[i]){const s={};i&32799&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function xj(r,e,t){let n,i,s,l,o,{password:a}=e,{error:u}=e;const[f,c,p]=Xf("",U3);ue(r,f,k=>t(1,i=k)),ue(r,c,k=>t(4,o=k)),ue(r,p,k=>t(3,l=k));const[d,g,h]=Xf("",U3);ue(r,d,k=>t(0,n=k)),ue(r,h,k=>t(2,s=k));function v(k){i=k,f.set(i)}function C(k){n=k,d.set(n)}return r.$$set=k=>{"password"in k&&t(10,a=k.password),"error"in k&&t(11,u=k.error)},r.$$.update=()=>{r.$$.dirty&2&&t(10,a=i),r.$$.dirty&15&&t(11,u=!i||!l||!s||i!==n)},[n,i,s,l,o,f,c,p,d,h,a,u,v,C]}class Kf extends se{constructor(e){super();le(this,e,xj,Zj,ne,{password:10,error:11})}}function eB(r){let e;return{c(){e=H(`Please upload the file that was exported from your Cloud environment to get
|
|
378
378
|
started`)},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function tB(r){let e,t,n,i;return e=new Je({props:{$$slots:{default:[eB]},$$scope:{ctx:r}}}),n=new Uo({props:{gallery:!1,label:"File to import",value:[r[0].file]}}),n.$on("change",r[2]),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(s,l){E(e,s,l),$(s,t,l),E(n,s,l),i=!0},p(s,l){const o={};l&16&&(o.$$scope={dirty:l,ctx:s}),e.$set(o);const a={};l&1&&(a.value=[s[0].file]),n.$set(a)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){O(e,s),s&&b(t),O(n,s)}}}function nB(r){let e,t;return e=new jt({props:{title:"Import apps",confirmText:"Import apps",onConfirm:r[1],disabled:!r[0].file,$$slots:{default:[tB]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,[i]){const s={};i&1&&(s.disabled=!n[0].file),i&17&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function rB(r,e,t){let n;async function i(){try{let l=new FormData;l.append("importFile",n.file),await Ze.importApps(l),await kn.checkImportComplete(),ye.success("Import complete, please finish registration!")}catch{ye.error("Failed to import apps")}}const s=l=>{var o;t(0,n.file=(o=l.detail)==null?void 0:o[0],n)};return t(0,n={file:null}),[n,i,s]}class iB extends se{constructor(e){super();le(this,e,rB,nB,ne,{})}}var vr="/builder/assets/bb-emblem.4e4717da.svg";function sB(r){let e,t;return e=new iB({}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function lB(r){let e;return{c(){e=H("Create an admin user")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function oB(r){let e;return{c(){e=H("The admin user has access to everything in Budibase.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function aB(r){let e,t,n,i;return e=new wt({props:{size:"M",$$slots:{default:[lB]},$$scope:{ctx:r}}}),n=new Je({props:{size:"M",textAlign:"center",$$slots:{default:[oB]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(s,l){E(e,s,l),$(s,t,l),E(n,s,l),i=!0},p(s,l){const o={};l&131072&&(o.$$scope={dirty:l,ctx:s}),e.$set(o);const a={};l&131072&&(a.$$scope={dirty:l,ctx:s}),n.$set(a)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){O(e,s),s&&b(t),O(n,s)}}}function uB(r){let e,t,n,i,s,l,o;function a(d){r[11](d)}let u={label:"Email"};r[0].email!==void 0&&(u.value=r[0].email),e=new et({props:u}),Z.push(()=>ce(e,"value",a));function f(d){r[12](d)}function c(d){r[13](d)}let p={};return r[0].password!==void 0&&(p.password=r[0].password),r[1]!==void 0&&(p.error=r[1]),i=new Kf({props:p}),Z.push(()=>ce(i,"password",f)),Z.push(()=>ce(i,"error",c)),{c(){A(e.$$.fragment),n=R(),A(i.$$.fragment)},m(d,g){E(e,d,g),$(d,n,g),E(i,d,g),o=!0},p(d,g){const h={};!t&&g&1&&(t=!0,h.value=d[0].email,pe(()=>t=!1)),e.$set(h);const v={};!s&&g&1&&(s=!0,v.password=d[0].password,pe(()=>s=!1)),!l&&g&2&&(l=!0,v.error=d[1],pe(()=>l=!1)),i.$set(v)},i(d){o||(m(e.$$.fragment,d),m(i.$$.fragment,d),o=!0)},o(d){_(e.$$.fragment,d),_(i.$$.fragment,d),o=!1},d(d){O(e,d),d&&b(n),O(i,d)}}}function fB(r){let e;return{c(){e=H("Create super admin user")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function cB(r){let e,t;return e=new Gt({props:{quiet:!0,$$slots:{default:[dB]},$$scope:{ctx:r}}}),e.$on("click",r[15]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&131072&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function pB(r){let e,t;return e=new Gt({props:{quiet:!0,$$slots:{default:[mB]},$$scope:{ctx:r}}}),e.$on("click",r[14]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&131072&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function dB(r){let e;return{c(){e=H("Import from cloud")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function mB(r){let e;return{c(){e=H("Change organisation")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function gB(r){let e,t,n,i,s,l;e=new ut({props:{cta:!0,disabled:r[1],$$slots:{default:[fB]},$$scope:{ctx:r}}}),e.$on("click",r[7]);const o=[pB,cB],a=[];function u(f,c){return f[5]?0:!f[3]&&!f[4]?1:-1}return~(n=u(r))&&(i=a[n]=o[n](r)),{c(){A(e.$$.fragment),t=R(),i&&i.c(),s=Oe()},m(f,c){E(e,f,c),$(f,t,c),~n&&a[n].m(f,c),$(f,s,c),l=!0},p(f,c){const p={};c&2&&(p.disabled=f[1]),c&131072&&(p.$$scope={dirty:c,ctx:f}),e.$set(p);let d=n;n=u(f),n===d?~n&&a[n].p(f,c):(i&&(ee(),_(a[d],1,1,()=>{a[d]=null}),te()),~n?(i=a[n],i?i.p(f,c):(i=a[n]=o[n](f),i.c()),m(i,1),i.m(s.parentNode,s)):i=null)},i(f){l||(m(e.$$.fragment,f),m(i),l=!0)},o(f){_(e.$$.fragment,f),_(i),l=!1},d(f){O(e,f),f&&b(t),~n&&a[n].d(f),f&&b(s)}}}function _B(r){let e,t,n,i,s,l,o,a,u;return i=new Qe({props:{gap:"XS",justifyItems:"center",noPadding:!0,$$slots:{default:[aB]},$$scope:{ctx:r}}}),l=new Qe({props:{gap:"XS",noPadding:!0,$$slots:{default:[uB]},$$scope:{ctx:r}}}),a=new Qe({props:{gap:"XS",noPadding:!0,$$slots:{default:[gB]},$$scope:{ctx:r}}}),{c(){e=M("img"),n=R(),A(i.$$.fragment),s=R(),A(l.$$.fragment),o=R(),A(a.$$.fragment),y(e,"alt","logo"),un(e.src,t=vr)||y(e,"src",t),y(e,"class","svelte-135kmhj")},m(f,c){$(f,e,c),$(f,n,c),E(i,f,c),$(f,s,c),E(l,f,c),$(f,o,c),E(a,f,c),u=!0},p(f,c){const p={};c&131072&&(p.$$scope={dirty:c,ctx:f}),i.$set(p);const d={};c&131075&&(d.$$scope={dirty:c,ctx:f}),l.$set(d);const g={};c&131198&&(g.$$scope={dirty:c,ctx:f}),a.$set(g)},i(f){u||(m(i.$$.fragment,f),m(l.$$.fragment,f),m(a.$$.fragment,f),u=!0)},o(f){_(i.$$.fragment,f),_(l.$$.fragment,f),_(a.$$.fragment,f),u=!1},d(f){f&&b(e),f&&b(n),O(i,f),f&&b(s),O(l,f),f&&b(o),O(a,f)}}}function hB(r){let e,t,n,i,s,l,o={padding:!1,width:"600px",$$slots:{default:[sB]},$$scope:{ctx:r}};return e=new St({props:o}),r[10](e),s=new Qe({props:{$$slots:{default:[_B]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment),t=R(),n=M("section"),i=M("div"),A(s.$$.fragment),y(i,"class","container svelte-135kmhj"),y(n,"class","svelte-135kmhj")},m(a,u){E(e,a,u),$(a,t,u),$(a,n,u),P(n,i),E(s,i,null),l=!0},p(a,[u]){const f={};u&131072&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const c={};u&131199&&(c.$$scope={dirty:u,ctx:a}),s.$set(c)},i(a){l||(m(e.$$.fragment,a),m(s.$$.fragment,a),l=!0)},o(a){_(e.$$.fragment,a),_(s.$$.fragment,a),l=!1},d(a){r[10](null),O(e,a),a&&b(t),a&&b(n),O(s)}}}function $B(r,e,t){let n,i,s,l,o,a,u;ue(r,Bt,S=>t(6,o=S)),ue(r,kn,S=>t(8,a=S)),ue(r,Ut,S=>t(9,u=S));let f={},c,p;async function d(){try{t(0,f.tenantId=n,f),await Ze.createAdminUser(f),ye.success("Admin user created"),await kn.init(),o("../portal")}catch{ye.error("Failed to create admin user")}}Yt(async()=>{if(!s)try{await kn.checkImportComplete()}catch{ye.error("Error checking import status")}});function g(S){Z[S?"unshift":"push"](()=>{p=S,t(2,p)})}function h(S){r.$$.not_equal(f.email,S)&&(f.email=S,t(0,f))}function v(S){r.$$.not_equal(f.password,S)&&(f.password=S,t(0,f))}function C(S){c=S,t(1,c)}const k=()=>{kn.unload(),o("../auth/org")},I=()=>{p.show()};return r.$$.update=()=>{r.$$.dirty&512&&(n=u.tenantId),r.$$.dirty&256&&t(5,i=a.multiTenancy),r.$$.dirty&256&&t(3,s=a.cloud),r.$$.dirty&256&&t(4,l=a.importComplete)},[f,c,p,s,l,i,o,d,a,u,g,h,v,C,k,I]}class bB extends se{constructor(e){super();le(this,e,$B,hB,ne,{})}}function F3(r){let e;const t=r[4].default,n=ht(t,r,r[3],null);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&8)&&$t(n,t,i,i[3],e?vt(t,i[3],s,null):bt(i[3]),null)},i(i){e||(m(n,i),e=!0)},o(i){_(n,i),e=!1},d(i){n&&n.d(i)}}}function vB(r){let e,t,n=r[0]&&F3(r);return{c(){n&&n.c(),e=Oe()},m(i,s){n&&n.m(i,s),$(i,e,s),t=!0},p(i,[s]){i[0]?n?(n.p(i,s),s&1&&m(n,1)):(n=F3(i),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(ee(),_(n,1,1,()=>{n=null}),te())},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){n&&n.d(i),i&&b(e)}}}function wB(r,e,t){let n,i,s,l;ue(r,fi,f=>t(6,s=f)),ue(r,kn,f=>t(2,l=f));let{$$slots:o={},$$scope:a}=e,u=!1;return Yt(()=>{var f;((f=l==null?void 0:l.checklist)==null?void 0:f.adminUser.checked)||i?s("../"):t(0,u=!0)}),r.$$set=f=>{"$$scope"in f&&t(3,a=f.$$scope)},r.$$.update=()=>{r.$$.dirty&4&&t(1,n=l.cloud),r.$$.dirty&6&&(i=n&&!l.disableAccountPortal)},[u,n,l,a,o]}class yB extends se{constructor(e){super();le(this,e,wB,vB,ne,{})}}function V3(r,e,t){const n=r.slice();return n[9]=e[t].key,n[10]=e[t].displayName,n[11]=e[t].type,n[12]=e,n[13]=t,n}function kB(r){let e=r[10]+"",t;return{c(){t=H(e)},m(n,i){$(n,t,i)},p(n,i){i&16&&e!==(e=n[10]+"")&&Ie(t,e)},d(n){n&&b(t)}}}function H3(r){let e,t,n;function i(l){r[5](l,r[9])}let s={};return r[3][r[9]]!==void 0&&(s.value=r[3][r[9]]),e=new et({props:s}),Z.push(()=>ce(e,"value",i)),e.$on("change",r[6]),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){r=l;const a={};!t&&o&24&&(t=!0,a.value=r[3][r[9]],pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function W3(r){let e,t,n;function i(l){r[7](l,r[9])}let s={options:r[1][r[9]].data[r[2].queryVerb],getOptionLabel:SB};return r[3][r[9]]!==void 0&&(s.value=r[3][r[9]]),e=new Ke({props:s}),Z.push(()=>ce(e,"value",i)),e.$on("change",r[8]),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){r=l;const a={};o&22&&(a.options=r[1][r[9]].data[r[2].queryVerb]),!t&&o&24&&(t=!0,a.value=r[3][r[9]],pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function G3(r){let e,t,n,i,s,l;t=new xe({props:{$$slots:{default:[kB]},$$scope:{ctx:r}}});let o=r[11]==="string"&&H3(r),a=r[11]==="list"&&W3(r);return{c(){e=M("div"),A(t.$$.fragment),n=R(),o&&o.c(),i=R(),a&&a.c(),s=R(),y(e,"class","config-field svelte-grhqzt")},m(u,f){$(u,e,f),E(t,e,null),P(e,n),o&&o.m(e,null),P(e,i),a&&a.m(e,null),P(e,s),l=!0},p(u,f){const c={};f&16400&&(c.$$scope={dirty:f,ctx:u}),t.$set(c),u[11]==="string"?o?(o.p(u,f),f&16&&m(o,1)):(o=H3(u),o.c(),m(o,1),o.m(e,i)):o&&(ee(),_(o,1,1,()=>{o=null}),te()),u[11]==="list"?a?(a.p(u,f),f&16&&m(a,1)):(a=W3(u),a.c(),m(a,1),a.m(e,s)):a&&(ee(),_(a,1,1,()=>{a=null}),te())},i(u){l||(m(t.$$.fragment,u),m(o),m(a),l=!0)},o(u){_(t.$$.fragment,u),_(o),_(a),l=!1},d(u){u&&b(e),O(t),o&&o.d(),a&&a.d()}}}function CB(r){let e,t,n=r[4],i=[];for(let l=0;l<n.length;l+=1)i[l]=G3(V3(r,n,l));const s=l=>_(i[l],1,1,()=>{i[l]=null});return{c(){for(let l=0;l<i.length;l+=1)i[l].c();e=Oe()},m(l,o){for(let a=0;a<i.length;a+=1)i[a].m(l,o);$(l,e,o),t=!0},p(l,[o]){if(o&31){n=l[4];let a;for(a=0;a<n.length;a+=1){const u=V3(l,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=G3(u),i[a].c(),m(i[a],1),i[a].m(e.parentNode,e))}for(ee(),a=n.length;a<i.length;a+=1)s(a);te()}},i(l){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(l){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(l){_t(i,l),l&&b(e)}}}const SB=r=>r;function AB(r,e,t){let n,i,{populateExtraQuery:s}=e,{config:l}=e,{query:o}=e;function a(p,d){r.$$.not_equal(i[d],p)&&(i[d]=p,t(3,i),t(2,o))}const u=()=>s(i);function f(p,d){r.$$.not_equal(i[d],p)&&(i[d]=p,t(3,i),t(2,o))}const c=()=>s(i);return r.$$set=p=>{"populateExtraQuery"in p&&t(0,s=p.populateExtraQuery),"config"in p&&t(1,l=p.config),"query"in p&&t(2,o=p.query)},r.$$.update=()=>{r.$$.dirty&2&&t(4,n=Object.keys(l).map(p=>rt(Ee({},l[p]),{key:p}))),r.$$.dirty&4&&t(3,i=o.fields.extra||{})},[s,l,o,i,n,a,u,f,c]}class EB extends se{constructor(e){super();le(this,e,AB,CB,ne,{populateExtraQuery:0,config:1,query:2})}}function Y3(r){let e,t;return e=new xe({props:{small:!0,$$slots:{default:[OB]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&33554434&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function OB(r){let e;return{c(){e=H(r[1])},m(t,n){$(t,e,n)},p(t,n){n&2&&Ie(e,t[1])},d(t){t&&b(e)}}}function TB(r){let e,t,n,i,s,l=r[1]&&Y3(r);return{c(){l&&l.c(),e=R(),t=M("div"),n=M("textarea"),y(n,"tabindex","0"),n.readOnly=!0,n.value=r[0],y(n,"class","svelte-8k8uv"),y(t,"style",i=`--code-mirror-height: ${r[2]}px`),y(t,"class","svelte-8k8uv")},m(o,a){l&&l.m(o,a),$(o,e,a),$(o,t,a),P(t,n),r[13](n),s=!0},p(o,[a]){o[1]?l?(l.p(o,a),a&2&&m(l,1)):(l=Y3(o),l.c(),m(l,1),l.m(e.parentNode,e)):l&&(ee(),_(l,1,1,()=>{l=null}),te()),(!s||a&1)&&(n.value=o[0]),(!s||a&4&&i!==(i=`--code-mirror-height: ${o[2]}px`))&&y(t,"style",i)},i(o){s||(m(l),s=!0)},o(o){_(l),s=!1},d(o){l&&l.d(o),o&&b(e),o&&b(t),r[13](null)}}}function J3(r){return new Promise(e=>setTimeout(e,r))}function IB(r,e,t){let n;ue(r,Gf,q=>t(18,n=q));const i=mt(),s={DARK:"tomorrow-night-eighties",LIGHT:"default"};let{label:l}=e,{value:o=""}=e,{readOnly:a=!1}=e,{lineNumbers:u=!0}=e,{tab:f=!0}=e,{mode:c}=e,{editorHeight:p=500}=e,d,g;async function h(q,U){U!==c&&await j(t(4,c=U)),t(0,o=q),N=!0,T&&T.setValue(o),N=!1}function v(q){if(t(0,o=q),T){const{left:U,top:J}=T.getScrollInfo();T.setValue(t(0,o=q)),T.scrollTo(U,J)}}function C(){T.refresh()}function k(){T.focus()}const I={js:{name:"javascript",json:!1},json:{name:"javascript",json:!0},sql:{name:"sql"},svelte:{name:"handlebars",base:"text/html"}},S={};let T,N=!1,D=!1;Yt(()=>(j(c).then(()=>{T&&T.setValue(o||"")}),()=>{D=!0,T&&T.toTextArea()}));let G=!0;async function j(q){if(D||!Jr)return;T&&T.toTextArea();const U={lineNumbers:u,lineWrapping:!0,indentWithTabs:!0,indentUnit:2,tabSize:2,value:"",mode:I[q]||{name:q},readOnly:a,autoCloseBrackets:!0,autoCloseTags:!0,theme:n.theme.includes("light")?s.LIGHT:s.DARK};f||(U.extraKeys={Tab:f,"Shift-Tab":f}),G&&await J3(50),!D&&(Jr.commands.autocomplete=function(J){Jr.showHint(J,Jr.hint.javascript)},t(12,T=Jr.fromTextArea(S.editor,U)),T.on("change",J=>{if(!N){const F=J.getValue();i("change",{value:F})}}),G&&await J3(50),T.refresh(),G=!1)}function B(q){Z[q?"unshift":"push"](()=>{S.editor=q,t(3,S)})}return r.$$set=q=>{"label"in q&&t(1,l=q.label),"value"in q&&t(0,o=q.value),"readOnly"in q&&t(5,a=q.readOnly),"lineNumbers"in q&&t(6,u=q.lineNumbers),"tab"in q&&t(7,f=q.tab),"mode"in q&&t(4,c=q.mode),"editorHeight"in q&&t(2,p=q.editorHeight)},r.$$.update=()=>{r.$$.dirty&4096&&T&&d&&g&&T.refresh()},[o,l,p,S,c,a,u,f,h,v,C,k,T,B]}class Zs extends se{constructor(e){super();le(this,e,IB,TB,ne,{label:1,value:0,readOnly:5,lineNumbers:6,tab:7,mode:4,editorHeight:2,set:8,update:9,resize:10,focus:11})}get set(){return this.$$.ctx[8]}get update(){return this.$$.ctx[9]}get resize(){return this.$$.ctx[10]}get focus(){return this.$$.ctx[11]}}function Q3(r){const e=fn({status:"LOADING",data:{},error:{}});async function t(){e.update(n=>rt(Ee({},n),{status:"LOADING"}));try{const n=await Ze.get({url:r});e.set({data:n,status:"SUCCESS"})}catch(n){e.set({data:{},error:n,status:"ERROR"})}}return t(),{subscribe:e.subscribe,refresh:t}}const wr=r=>r.substring(0,1).toUpperCase()+r.substring(1),X3=r=>r.substring(0,1).toLowerCase()+r.substring(1);function K3(r,e,t){const n=r.slice();return n[29]=e[t],n[30]=e,n[31]=t,n}function Z3(r,e,t){const n=r.slice();return n[32]=e[t],n}function x3(r){let e,t,n,i=r[4]&&ev(r),s=r[15],l=[];for(let a=0;a<s.length;a+=1)l[a]=lv(K3(r,s,a));const o=a=>_(l[a],1,1,()=>{l[a]=null});return{c(){i&&i.c(),e=R(),t=M("div");for(let a=0;a<l.length;a+=1)l[a].c();y(t,"class","container svelte-1gk02qa"),oe(t,"container-active",r[6]),oe(t,"container-menu",r[13]),oe(t,"readOnly",r[1]),oe(t,"readOnly-menu",r[1]&&r[13])},m(a,u){i&&i.m(a,u),$(a,e,u),$(a,t,u);for(let f=0;f<l.length;f+=1)l[f].m(t,null);n=!0},p(a,u){if(a[4]?i?(i.p(a,u),u[0]&16&&m(i,1)):(i=ev(a),i.c(),m(i,1),i.m(e.parentNode,e)):i&&(ee(),_(i,1,1,()=>{i=null}),te()),u[0]&504290){s=a[15];let f;for(f=0;f<s.length;f+=1){const c=K3(a,s,f);l[f]?(l[f].p(c,u),m(l[f],1)):(l[f]=lv(c),l[f].c(),m(l[f],1),l[f].m(t,null))}for(ee(),f=s.length;f<l.length;f+=1)o(f);te()}u[0]&64&&oe(t,"container-active",a[6]),u[0]&8192&&oe(t,"container-menu",a[13]),u[0]&2&&oe(t,"readOnly",a[1]),u[0]&8194&&oe(t,"readOnly-menu",a[1]&&a[13])},i(a){if(!n){m(i);for(let u=0;u<s.length;u+=1)m(l[u]);n=!0}},o(a){_(i),l=l.filter(Boolean);for(let u=0;u<l.length;u+=1)_(l[u]);n=!1},d(a){i&&i.d(a),a&&b(e),a&&b(t),_t(l,a)}}}function ev(r){let e,t,n,i,s,l;t=new xe({props:{tooltip:r[11],$$slots:{default:[LB]},$$scope:{ctx:r}}}),i=new xe({props:{$$slots:{default:[PB]},$$scope:{ctx:r}}});let o=r[6]&&tv(r);return{c(){e=M("div"),A(t.$$.fragment),n=R(),A(i.$$.fragment),s=R(),o&&o.c(),y(e,"class","container svelte-1gk02qa"),oe(e,"container-active",r[6])},m(a,u){$(a,e,u),E(t,e,null),P(e,n),E(i,e,null),P(e,s),o&&o.m(e,null),l=!0},p(a,u){const f={};u[0]&2048&&(f.tooltip=a[11]),u[0]&1152|u[1]&16&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const c={};u[0]&768|u[1]&16&&(c.$$scope={dirty:u,ctx:a}),i.$set(c),a[6]?o?u[0]&64&&m(o,1):(o=tv(a),o.c(),m(o,1),o.m(e,null)):o&&(ee(),_(o,1,1,()=>{o=null}),te()),u[0]&64&&oe(e,"container-active",a[6])},i(a){l||(m(t.$$.fragment,a),m(i.$$.fragment,a),m(o),l=!0)},o(a){_(t.$$.fragment,a),_(i.$$.fragment,a),_(o),l=!1},d(a){a&&b(e),O(t),O(i),o&&o.d()}}}function LB(r){let e=(r[10]||r[7])+"",t;return{c(){t=H(e)},m(n,i){$(n,t,i)},p(n,i){i[0]&1152&&e!==(e=(n[10]||n[7])+"")&&Ie(t,e)},d(n){n&&b(t)}}}function PB(r){let e=(r[9]||r[8])+"",t;return{c(){t=H(e)},m(n,i){$(n,t,i)},p(n,i){i[0]&768&&e!==(e=(n[9]||n[8])+"")&&Ie(t,e)},d(n){n&&b(t)}}}function tv(r){let e,t;return e=new xe({props:{$$slots:{default:[NB]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function NB(r){let e;return{c(){e=H("Active")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function RB(r){let e,t,n;function i(l){r[23](l,r[29])}let s={placeholder:r[8],readonly:r[1]};return r[29].value!==void 0&&(s.value=r[29].value),e=new et({props:s}),Z.push(()=>ce(e,"value",i)),e.$on("change",r[18]),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){r=l;const a={};o[0]&256&&(a.placeholder=r[8]),o[0]&2&&(a.readonly=r[1]),!t&&o[0]&32768&&(t=!0,a.value=r[29].value,pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function MB(r){let e,t,n;function i(l){r[22](l,r[29])}let s={options:r[5]};return r[29].value!==void 0&&(s.value=r[29].value),e=new Ke({props:s}),Z.push(()=>ce(e,"value",i)),e.$on("change",r[18]),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){r=l;const a={};o[0]&32&&(a.options=r[5]),!t&&o[0]&32768&&(t=!0,a.value=r[29].value,pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function nv(r){let e,t,n;function i(l){r[24](l,r[31])}let s={};return r[16][r[31]]!==void 0&&(s.value=r[16][r[31]]),e=new Fn({props:s}),Z.push(()=>ce(e,"value",i)),e.$on("change",r[18]),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){r=l;const a={};!t&&o[0]&65536&&(t=!0,a.value=r[16][r[31]],pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function rv(r){let e,t;function n(){return r[25](r[31])}return e=new pt({props:{hoverable:!0,name:"Close"}}),e.$on("click",n),{c(){A(e.$$.fragment)},m(i,s){E(e,i,s),t=!0},p(i,s){r=i},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){O(e,i)}}}function iv(r){let e,t;return e=new Er({props:{$$slots:{control:[BB],default:[jB]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i[0]&36864|i[1]&16&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function DB(r){let e=r[32].text+"",t;return{c(){t=H(e)},m(n,i){$(n,t,i)},p(n,i){i[0]&4096&&e!==(e=n[32].text+"")&&Ie(t,e)},d(n){n&&b(t)}}}function sv(r){let e,t;function n(){return r[26](r[32],r[29])}return e=new tn({props:{$$slots:{default:[DB]},$$scope:{ctx:r}}}),e.$on("click",n),{c(){A(e.$$.fragment)},m(i,s){E(e,i,s),t=!0},p(i,s){r=i;const l={};s[0]&4096|s[1]&16&&(l.$$scope={dirty:s,ctx:r}),e.$set(l)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){O(e,i)}}}function jB(r){let e,t,n=r[12],i=[];for(let l=0;l<n.length;l+=1)i[l]=sv(Z3(r,n,l));const s=l=>_(i[l],1,1,()=>{i[l]=null});return{c(){for(let l=0;l<i.length;l+=1)i[l].c();e=R()},m(l,o){for(let a=0;a<i.length;a+=1)i[a].m(l,o);$(l,e,o),t=!0},p(l,o){if(o[0]&36864){n=l[12];let a;for(a=0;a<n.length;a+=1){const u=Z3(l,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=sv(u),i[a].c(),m(i[a],1),i[a].m(e.parentNode,e))}for(ee(),a=n.length;a<i.length;a+=1)s(a);te()}},i(l){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(l){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(l){_t(i,l),l&&b(e)}}}function BB(r){let e,t,n,i;return t=new pt({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){e=M("div"),A(t.$$.fragment),n=R(),y(e,"slot","control"),y(e,"class","control icon svelte-1gk02qa")},m(s,l){$(s,e,l),E(t,e,null),P(e,n),i=!0},p:Te,i(s){i||(m(t.$$.fragment,s),i=!0)},o(s){_(t.$$.fragment,s),i=!1},d(s){s&&b(e),O(t)}}}function lv(r){var I;let e,t,n,i,s,l,o,a,u,f;function c(S){r[21](S,r[29])}let p={placeholder:r[7],readonly:r[1]};r[29].name!==void 0&&(p.value=r[29].name),e=new et({props:p}),Z.push(()=>ce(e,"value",c)),e.$on("change",r[18]);const d=[MB,RB],g=[];function h(S,T){return S[5]?0:1}i=h(r),s=g[i]=d[i](r);let v=r[6]&&nv(r),C=!r[1]&&rv(r),k=((I=r[12])==null?void 0:I.length)>0&&r[13]&&iv(r);return{c(){A(e.$$.fragment),n=R(),s.c(),l=R(),v&&v.c(),o=R(),C&&C.c(),a=R(),k&&k.c(),u=Oe()},m(S,T){E(e,S,T),$(S,n,T),g[i].m(S,T),$(S,l,T),v&&v.m(S,T),$(S,o,T),C&&C.m(S,T),$(S,a,T),k&&k.m(S,T),$(S,u,T),f=!0},p(S,T){var G;r=S;const N={};T[0]&128&&(N.placeholder=r[7]),T[0]&2&&(N.readonly=r[1]),!t&&T[0]&32768&&(t=!0,N.value=r[29].name,pe(()=>t=!1)),e.$set(N);let D=i;i=h(r),i===D?g[i].p(r,T):(ee(),_(g[D],1,1,()=>{g[D]=null}),te(),s=g[i],s?s.p(r,T):(s=g[i]=d[i](r),s.c()),m(s,1),s.m(l.parentNode,l)),r[6]?v?(v.p(r,T),T[0]&64&&m(v,1)):(v=nv(r),v.c(),m(v,1),v.m(o.parentNode,o)):v&&(ee(),_(v,1,1,()=>{v=null}),te()),r[1]?C&&(ee(),_(C,1,1,()=>{C=null}),te()):C?(C.p(r,T),T[0]&2&&m(C,1)):(C=rv(r),C.c(),m(C,1),C.m(a.parentNode,a)),((G=r[12])==null?void 0:G.length)>0&&r[13]?k?(k.p(r,T),T[0]&12288&&m(k,1)):(k=iv(r),k.c(),m(k,1),k.m(u.parentNode,u)):k&&(ee(),_(k,1,1,()=>{k=null}),te())},i(S){f||(m(e.$$.fragment,S),m(s),m(v),m(C),m(k),f=!0)},o(S){_(e.$$.fragment,S),_(s),_(v),_(C),_(k),f=!1},d(S){O(e,S),S&&b(n),g[i].d(S),S&&b(l),v&&v.d(S),S&&b(o),C&&C.d(S),S&&b(a),k&&k.d(S),S&&b(u)}}}function ov(r){let e,t,n;return t=new Gt({props:{icon:"Add",secondary:!0,thin:!0,outline:!0,$$slots:{default:[zB]},$$scope:{ctx:r}}}),t.$on("click",r[14]),{c(){e=M("div"),A(t.$$.fragment)},m(i,s){$(i,e,s),E(t,e,null),n=!0},p(i,s){const l={};s[0]&8|s[1]&16&&(l.$$scope={dirty:s,ctx:i}),t.$set(l)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function zB(r){let e,t=(r[3]?` ${X3(r[3])}`:"")+"",n;return{c(){e=H("Add"),n=H(t)},m(i,s){$(i,e,s),$(i,n,s)},p(i,s){s[0]&8&&t!==(t=(i[3]?` ${X3(i[3])}`:"")+"")&&Ie(n,t)},d(i){i&&b(e),i&&b(n)}}}function qB(r){let e=Object.keys(r[0]||{}).length>0,t,n,i,s=e&&x3(r),l=!r[1]&&!r[2]&&ov(r);return{c(){s&&s.c(),t=R(),l&&l.c(),n=Oe()},m(o,a){s&&s.m(o,a),$(o,t,a),l&&l.m(o,a),$(o,n,a),i=!0},p(o,a){a[0]&1&&(e=Object.keys(o[0]||{}).length>0),e?s?(s.p(o,a),a[0]&1&&m(s,1)):(s=x3(o),s.c(),m(s,1),s.m(t.parentNode,t)):s&&(ee(),_(s,1,1,()=>{s=null}),te()),!o[1]&&!o[2]?l?(l.p(o,a),a[0]&6&&m(l,1)):(l=ov(o),l.c(),m(l,1),l.m(n.parentNode,n)):l&&(ee(),_(l,1,1,()=>{l=null}),te())},i(o){i||(m(s),m(l),i=!0)},o(o){_(s),_(l),i=!1},d(o){s&&s.d(o),o&&b(t),l&&l.d(o),o&&b(n)}}}function UB(r,e,t){let n=mt(),{defaults:i}=e,{object:s=i||{}}=e,{activity:l={}}=e,{readOnly:o}=e,{noAddButton:a}=e,{name:u}=e,{headings:f=!1}=e,{options:c}=e,{toggle:p}=e,{keyPlaceholder:d="Key"}=e,{valuePlaceholder:g="Value"}=e,{valueHeading:h}=e,{keyHeading:v}=e,{tooltip:C}=e,{menuItems:k}=e,{showMenu:I=!1}=e,S=Object.entries(s||{}).map(([V,Q])=>({name:V,value:Q})),T=N(l);function N(V){if(!V||typeof V!="object")return[];const Q=Array(S.length);for(let[me,re]of Object.entries(V)){const x=S.find(_e=>_e.name===me),ae=S.indexOf(x);Q[ae]=ae!==-1?re:!0}return Q}function D(){t(15,S=[...S,{name:"",value:""}]),t(16,T=[...T,!0]),j()}function G(V){S.splice(V,1),T.splice(V,1),j()}function j(){t(15,S);const V={};for(let Q=0;Q<S.length;Q++){const me=S[Q].name;me&&(V[me]=T[Q])}t(19,l=V),n("change",S)}function B(V,Q){r.$$.not_equal(Q.name,V)&&(Q.name=V,t(15,S))}function q(V,Q){r.$$.not_equal(Q.value,V)&&(Q.value=V,t(15,S))}function U(V,Q){r.$$.not_equal(Q.value,V)&&(Q.value=V,t(15,S))}function J(V,Q){r.$$.not_equal(T[Q],V)&&(T[Q]=V,t(16,T))}const F=V=>G(V),W=(V,Q)=>V.onClick(Q);return r.$$set=V=>{"defaults"in V&&t(20,i=V.defaults),"object"in V&&t(0,s=V.object),"activity"in V&&t(19,l=V.activity),"readOnly"in V&&t(1,o=V.readOnly),"noAddButton"in V&&t(2,a=V.noAddButton),"name"in V&&t(3,u=V.name),"headings"in V&&t(4,f=V.headings),"options"in V&&t(5,c=V.options),"toggle"in V&&t(6,p=V.toggle),"keyPlaceholder"in V&&t(7,d=V.keyPlaceholder),"valuePlaceholder"in V&&t(8,g=V.valuePlaceholder),"valueHeading"in V&&t(9,h=V.valueHeading),"keyHeading"in V&&t(10,v=V.keyHeading),"tooltip"in V&&t(11,C=V.tooltip),"menuItems"in V&&t(12,k=V.menuItems),"showMenu"in V&&t(13,I=V.showMenu)},r.$$.update=()=>{r.$$.dirty[0]&32768&&t(0,s=S.reduce((V,Q)=>rt(Ee({},V),{[Q.name]:Q.value}),{}))},[s,o,a,u,f,c,p,d,g,h,v,C,k,I,D,S,T,G,j,l,i,B,q,U,J,F,W]}class vi extends se{constructor(e){super();le(this,e,UB,qB,ne,{defaults:20,object:0,activity:19,readOnly:1,noAddButton:2,name:3,headings:4,options:5,toggle:6,keyPlaceholder:7,valuePlaceholder:8,valueHeading:9,keyHeading:10,tooltip:11,menuItems:12,showMenu:13,addEntry:14},null,[-1,-1])}get addEntry(){return this.$$.ctx[14]}}function av(r,e,t){const n=r.slice();return n[10]=e[t],n[11]=e,n[12]=t,n}function FB(r){var f,c;let e,t,n,i,s,l,o;t=new xe({props:{small:!0,$$slots:{default:[WB]},$$scope:{ctx:r}}});function a(p){r[9](p,r[10])}let u={placeholder:"Enter "+r[5](r[10]),outline:!0,disabled:!r[2],type:(f=r[1].fields[r[10]])==null?void 0:f.type,required:(c=r[1].fields[r[10]])==null?void 0:c.required};return r[0][r[10]]!==void 0&&(u.value=r[0][r[10]]),i=new et({props:u}),Z.push(()=>ce(i,"value",a)),{c(){e=M("div"),A(t.$$.fragment),n=R(),A(i.$$.fragment),l=R(),y(e,"class","horizontal svelte-uj8wfq")},m(p,d){$(p,e,d),E(t,e,null),P(e,n),E(i,e,null),P(e,l),o=!0},p(p,d){var v,C;r=p;const g={};d&8200&&(g.$$scope={dirty:d,ctx:r}),t.$set(g);const h={};d&8&&(h.placeholder="Enter "+r[5](r[10])),d&4&&(h.disabled=!r[2]),d&10&&(h.type=(v=r[1].fields[r[10]])==null?void 0:v.type),d&10&&(h.required=(C=r[1].fields[r[10]])==null?void 0:C.required),!s&&d&9&&(s=!0,h.value=r[0][r[10]],pe(()=>s=!1)),i.$set(h)},i(p){o||(m(t.$$.fragment,p),m(i.$$.fragment,p),o=!0)},o(p){_(t.$$.fragment,p),_(i.$$.fragment,p),o=!1},d(p){p&&b(e),O(t),O(i)}}}function VB(r){let e,t,n,i,s,l;t=new xe({props:{extraSmall:!0,grey:!0,$$slots:{default:[GB]},$$scope:{ctx:r}}});function o(...a){return r[8](r[10],...a)}return i=new Zs({props:{mode:"json",readOnly:!r[2],value:r[0][r[10]]}}),i.$on("change",o),{c(){e=M("div"),A(t.$$.fragment),n=R(),A(i.$$.fragment),s=R()},m(a,u){$(a,e,u),E(t,e,null),P(e,n),E(i,e,null),P(e,s),l=!0},p(a,u){r=a;const f={};u&8200&&(f.$$scope={dirty:u,ctx:r}),t.$set(f);const c={};u&4&&(c.readOnly=!r[2]),u&9&&(c.value=r[0][r[10]]),i.$set(c)},i(a){l||(m(t.$$.fragment,a),m(i.$$.fragment,a),l=!0)},o(a){_(t.$$.fragment,a),_(i.$$.fragment,a),l=!1},d(a){a&&b(e),O(t),O(i)}}}function HB(r){let e,t,n,i,s;e=new xe({props:{small:!0,$$slots:{default:[YB]},$$scope:{ctx:r}}});function l(a){r[7](a,r[10])}let o={name:r[5](r[10]),readOnly:!r[2]};return r[0][r[10]]!==void 0&&(o.object=r[0][r[10]]),n=new vi({props:o}),Z.push(()=>ce(n,"object",l)),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(a,u){E(e,a,u),$(a,t,u),E(n,a,u),s=!0},p(a,u){r=a;const f={};u&8200&&(f.$$scope={dirty:u,ctx:r}),e.$set(f);const c={};u&8&&(c.name=r[5](r[10])),u&4&&(c.readOnly=!r[2]),!i&&u&9&&(i=!0,c.object=r[0][r[10]],pe(()=>i=!1)),n.$set(c)},i(a){s||(m(e.$$.fragment,a),m(n.$$.fragment,a),s=!0)},o(a){_(e.$$.fragment,a),_(n.$$.fragment,a),s=!1},d(a){O(e,a),a&&b(t),O(n,a)}}}function WB(r){let e=r[5](r[10])+"",t;return{c(){t=H(e)},m(n,i){$(n,t,i)},p(n,i){i&8&&e!==(e=n[5](n[10])+"")&&Ie(t,e)},d(n){n&&b(t)}}}function GB(r){let e=r[5](r[10])+"",t;return{c(){t=H(e)},m(n,i){$(n,t,i)},p(n,i){i&8&&e!==(e=n[5](n[10])+"")&&Ie(t,e)},d(n){n&&b(t)}}}function YB(r){let e=r[5](r[10])+"",t;return{c(){t=H(e)},m(n,i){$(n,t,i)},p(n,i){i&8&&e!==(e=n[5](n[10])+"")&&Ie(t,e)},d(n){n&&b(t)}}}function uv(r){let e,t,n,i;const s=[HB,VB,FB],l=[];function o(a,u){var f,c;return((f=a[1].fields[a[10]])==null?void 0:f.type)==="object"?0:((c=a[1].fields[a[10]])==null?void 0:c.type)==="json"?1:2}return e=o(r),t=l[e]=s[e](r),{c(){t.c(),n=Oe()},m(a,u){l[e].m(a,u),$(a,n,u),i=!0},p(a,u){let f=e;e=o(a),e===f?l[e].p(a,u):(ee(),_(l[f],1,1,()=>{l[f]=null}),te(),t=l[e],t?t.p(a,u):(t=l[e]=s[e](a),t.c()),m(t,1),t.m(n.parentNode,n))},i(a){i||(m(t),i=!0)},o(a){_(t),i=!1},d(a){l[e].d(a),a&&b(n)}}}function JB(r){let e,t,n=r[3],i=[];for(let l=0;l<n.length;l+=1)i[l]=uv(av(r,n,l));const s=l=>_(i[l],1,1,()=>{i[l]=null});return{c(){for(let l=0;l<i.length;l+=1)i[l].c();e=Oe()},m(l,o){for(let a=0;a<i.length;a+=1)i[a].m(l,o);$(l,e,o),t=!0},p(l,o){if(o&47){n=l[3];let a;for(a=0;a<n.length;a+=1){const u=av(l,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=uv(u),i[a].c(),m(i[a],1),i[a].m(e.parentNode,e))}for(ee(),a=n.length;a<i.length;a+=1)s(a);te()}},i(l){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(l){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(l){_t(i,l),l&&b(e)}}}function fv(r){let e,t;return e=new Zs({props:{label:"Query",mode:"json",readOnly:!r[2],value:r[0].customData}}),e.$on("change",r[4]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&4&&(s.readOnly=!n[2]),i&1&&(s.value=n[0].customData),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function QB(r){let e,t,n,i,s,l,o;t=new Qe({props:{noPadding:!0,gap:"S",$$slots:{default:[JB]},$$scope:{ctx:r}}});let a=r[1].customisable&&fv(r);return{c(){e=M("form"),A(t.$$.fragment),n=R(),a&&a.c(),i=Oe()},m(u,f){$(u,e,f),E(t,e,null),$(u,n,f),a&&a.m(u,f),$(u,i,f),s=!0,l||(o=Le(e,"submit",wu(r[6])),l=!0)},p(u,[f]){const c={};f&8207&&(c.$$scope={dirty:f,ctx:u}),t.$set(c),u[1].customisable?a?(a.p(u,f),f&2&&m(a,1)):(a=fv(u),a.c(),m(a,1),a.m(i.parentNode,i)):a&&(ee(),_(a,1,1,()=>{a=null}),te())},i(u){s||(m(t.$$.fragment,u),m(a),s=!0)},o(u){_(t.$$.fragment,u),_(a),s=!1},d(u){u&&b(e),O(t),u&&b(n),a&&a.d(u),u&&b(i),l=!1,o()}}}function XB(r,e,t){let n,{fields:i={}}=e,{schema:s}=e,{editable:l}=e;function o({detail:d}){t(0,i.customData=d.value,i)}function a(d){var h,v;let g;return((h=s.fields[d])==null?void 0:h.display)?g=(v=s.fields[d])==null?void 0:v.display:g=d,wr(g)}function u(d){at.call(this,r,d)}function f(d,g){r.$$.not_equal(i[g],d)&&(i[g]=d,t(0,i))}const c=(d,{detail:g})=>t(0,i[d]=g.value,i);function p(d,g){r.$$.not_equal(i[g],d)&&(i[g]=d,t(0,i))}return r.$$set=d=>{"fields"in d&&t(0,i=d.fields),"schema"in d&&t(1,s=d.schema),"editable"in d&&t(2,l=d.editable)},r.$$.update=()=>{r.$$.dirty&2&&t(3,n=Object.keys((s==null?void 0:s.fields)||{}))},[i,s,l,n,o,a,u,f,c,p]}class KB extends se{constructor(e){super();le(this,e,XB,QB,ne,{fields:0,schema:1,editable:2})}}function cv(r){let e=r[0]._id,t,n,i=dv(r);return{c(){i.c(),t=Oe()},m(s,l){i.m(s,l),$(s,t,l),n=!0},p(s,l){l&1&&ne(e,e=s[0]._id)?(ee(),_(i,1,1,Te),te(),i=dv(s),i.c(),m(i),i.m(t.parentNode,t)):i.p(s,l)},i(s){n||(m(i),n=!0)},o(s){_(i),n=!1},d(s){s&&b(t),i.d(s)}}}function ZB(r){let e,t,n,i,s;function l(u){r[8](u)}let o={schema:r[1],editable:r[2]};r[0].fields!==void 0&&(o.fields=r[0].fields),e=new KB({props:o}),Z.push(()=>ce(e,"fields",l));let a=r[1].urlDisplay&&pv(r);return{c(){A(e.$$.fragment),n=R(),a&&a.c(),i=Oe()},m(u,f){E(e,u,f),$(u,n,f),a&&a.m(u,f),$(u,i,f),s=!0},p(u,f){const c={};f&2&&(c.schema=u[1]),f&4&&(c.editable=u[2]),!t&&f&1&&(t=!0,c.fields=u[0].fields,pe(()=>t=!1)),e.$set(c),u[1].urlDisplay?a?(a.p(u,f),f&2&&m(a,1)):(a=pv(u),a.c(),m(a,1),a.m(i.parentNode,i)):a&&(ee(),_(a,1,1,()=>{a=null}),te())},i(u){s||(m(e.$$.fragment,u),m(a),s=!0)},o(u){_(e.$$.fragment,u),_(a),s=!1},d(u){O(e,u),u&&b(n),a&&a.d(u),u&&b(i)}}}function xB(r){let e,t;return e=new Zs({props:{editorHeight:r[3],label:"Query",mode:"json",readOnly:!r[2],value:r[0].fields.json,parameters:r[0].parameters}}),e.$on("change",r[6]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&8&&(s.editorHeight=n[3]),i&4&&(s.readOnly=!n[2]),i&1&&(s.value=n[0].fields.json),i&1&&(s.parameters=n[0].parameters),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function ez(r){let e,t;return e=new Zs({props:{editorHeight:r[3],label:"Query",mode:"sql",readOnly:!r[2],value:r[0].fields.sql,parameters:r[0].parameters}}),e.$on("change",r[6]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&8&&(s.editorHeight=n[3]),i&4&&(s.readOnly=!n[2]),i&1&&(s.value=n[0].fields.sql),i&1&&(s.parameters=n[0].parameters),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function pv(r){let e,t,n,i,s;return t=new xe({props:{small:!0,$$slots:{default:[tz]},$$scope:{ctx:r}}}),i=new et({props:{thin:!0,outline:!0,disabled:!0,value:r[4]}}),{c(){e=M("div"),A(t.$$.fragment),n=R(),A(i.$$.fragment),y(e,"class","url-row svelte-59z4gq")},m(l,o){$(l,e,o),E(t,e,null),P(e,n),E(i,e,null),s=!0},p(l,o){const a={};o&512&&(a.$$scope={dirty:o,ctx:l}),t.$set(a);const u={};o&16&&(u.value=l[4]),i.$set(u)},i(l){s||(m(t.$$.fragment,l),m(i.$$.fragment,l),s=!0)},o(l){_(t.$$.fragment,l),_(i.$$.fragment,l),s=!1},d(l){l&&b(e),O(t),O(i)}}}function tz(r){let e;return{c(){e=H("URL")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function dv(r){let e,t,n,i;const s=[ez,xB,ZB],l=[];function o(a,u){return a[1].type===a[5].SQL?0:a[1].type===a[5].JSON?1:a[1].type===a[5].FIELDS?2:-1}return~(e=o(r))&&(t=l[e]=s[e](r)),{c(){t&&t.c(),n=Oe()},m(a,u){~e&&l[e].m(a,u),$(a,n,u),i=!0},p(a,u){let f=e;e=o(a),e===f?~e&&l[e].p(a,u):(t&&(ee(),_(l[f],1,1,()=>{l[f]=null}),te()),~e?(t=l[e],t?t.p(a,u):(t=l[e]=s[e](a),t.c()),m(t,1),t.m(n.parentNode,n)):t=null)},i(a){i||(m(t),i=!0)},o(a){_(t),i=!1},d(a){~e&&l[e].d(a),a&&b(n)}}}function nz(r){let e,t,n=r[1]&&cv(r);return{c(){n&&n.c(),e=Oe()},m(i,s){n&&n.m(i,s),$(i,e,s),t=!0},p(i,[s]){i[1]?n?(n.p(i,s),s&2&&m(n,1)):(n=cv(i),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(ee(),_(n,1,1,()=>{n=null}),te())},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){n&&n.d(i),i&&b(e)}}}function rz(r,e,t){let n;const i={SQL:"sql",JSON:"json",FIELDS:"fields"};let{query:s}=e,{datasource:l}=e,{schema:o}=e,{editable:a=!0}=e,{height:u=500}=e;function f({detail:p}){t(0,s.fields[o.type]=p.value,s)}function c(p){r.$$.not_equal(s.fields,p)&&(s.fields=p,t(0,s))}return r.$$set=p=>{"query"in p&&t(0,s=p.query),"datasource"in p&&t(7,l=p.datasource),"schema"in p&&t(1,o=p.schema),"editable"in p&&t(2,a=p.editable),"height"in p&&t(3,u=p.height)},r.$$.update=()=>{r.$$.dirty&131&&t(4,n=o.urlDisplay&&`${l.config.url}${s.fields.path?"/"+s.fields.path:""}${s.fields.queryString?"?"+s.fields.queryString:""}`)},[s,o,a,u,n,i,f,l,c]}class _1 extends se{constructor(e){super();le(this,e,rz,nz,ne,{query:0,datasource:7,schema:1,editable:2,height:3})}}function iz(r){let e,t,n;return t=new rS({props:{size:r[0],color:"var(--ink)",unit:"px"}}),{c(){e=M("div"),A(t.$$.fragment),y(e,"class","spinner-container svelte-1wtx5yq")},m(i,s){$(i,e,s),E(t,e,null),n=!0},p(i,[s]){const l={};s&1&&(l.size=i[0]),t.$set(l)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function sz(r,e,t){let{size:n="60"}=e;return r.$$set=i=>{"size"in i&&t(0,n=i.size)},[n]}class mv extends se{constructor(e){super();le(this,e,sz,iz,ne,{size:0})}}function lz(r){let e,t,n;const i=r[11].default,s=ht(i,r,r[13],null);return{c(){e=H(r[1]),t=R(),s&&s.c()},m(l,o){$(l,e,o),$(l,t,o),s&&s.m(l,o),n=!0},p(l,o){(!n||o&2)&&Ie(e,l[1]),s&&s.p&&(!n||o&8192)&&$t(s,i,l,l[13],n?vt(i,l[13],o,null):bt(l[13]),null)},i(l){n||(m(s,l),n=!0)},o(l){_(s,l),n=!1},d(l){l&&b(e),l&&b(t),s&&s.d(l)}}}function oz(r){let e,t;return e=new Je({props:{size:"S",$$slots:{default:[lz]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&8194&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function az(r){let e,t;return e=new jt({props:{onConfirm:r[4],title:r[0],confirmText:r[2],cancelText:r[3],warning:r[6],disabled:r[7],$$slots:{default:[oz]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&16&&(s.onConfirm=n[4]),i&1&&(s.title=n[0]),i&4&&(s.confirmText=n[2]),i&8&&(s.cancelText=n[3]),i&64&&(s.warning=n[6]),i&128&&(s.disabled=n[7]),i&8194&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function uz(r){let e,t,n={$$slots:{default:[az]},$$scope:{ctx:r}};return e=new St({props:n}),r[12](e),e.$on("hide",function(){dt(r[5])&&r[5].apply(this,arguments)}),{c(){A(e.$$.fragment)},m(i,s){E(e,i,s),t=!0},p(i,[s]){r=i;const l={};s&8415&&(l.$$scope={dirty:s,ctx:r}),e.$set(l)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){r[12](null),O(e,i)}}}function fz(r,e,t){let{$$slots:n={},$$scope:i}=e,{title:s=""}=e,{body:l=""}=e,{okText:o="Confirm"}=e,{cancelText:a="Cancel"}=e,{onOk:u=void 0}=e,{onCancel:f=void 0}=e,{warning:c=!0}=e,{disabled:p}=e,d;const g=()=>{d.show()},h=()=>{d.hide()};function v(C){Z[C?"unshift":"push"](()=>{d=C,t(8,d)})}return r.$$set=C=>{"title"in C&&t(0,s=C.title),"body"in C&&t(1,l=C.body),"okText"in C&&t(2,o=C.okText),"cancelText"in C&&t(3,a=C.cancelText),"onOk"in C&&t(4,u=C.onOk),"onCancel"in C&&t(5,f=C.onCancel),"warning"in C&&t(6,c=C.warning),"disabled"in C&&t(7,p=C.disabled),"$$scope"in C&&t(13,i=C.$$scope)},[s,l,o,a,u,f,c,p,d,g,h,n,v,i]}class yr extends se{constructor(e){super();le(this,e,fz,uz,ne,{title:0,body:1,okText:2,cancelText:3,onOk:4,onCancel:5,warning:6,disabled:7,show:9,hide:10})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[10]}}function cz(r){let e,t=r[0].length+"",n,i;return{c(){e=H(`Delete
|
|
379
379
|
`),n=H(t),i=H(`
|
|
@@ -1220,7 +1220,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
1220
1220
|
browser.`)},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Fte(r){let e,t,n,i,s,l,o,a,u,f,c,p;t=new xe({props:{small:!0,$$slots:{default:[Bte]},$$scope:{ctx:r}}});function d(k){r[4](k)}let g={placeholder:null,options:r[3]};r[0].type!==void 0&&(g.value=r[0].type),i=new Ke({props:g}),Z.push(()=>ce(i,"value",d)),o=new xe({props:{small:!0,$$slots:{default:[zte]},$$scope:{ctx:r}}});function h(k){r[5](k)}let v={options:r[2]};r[0].key!==void 0&&(v.value=r[0].key),u=new Fl({props:v}),Z.push(()=>ce(u,"value",h));let C=r[0].type==="set"&&ew(r);return{c(){e=M("div"),A(t.$$.fragment),n=R(),A(i.$$.fragment),l=R(),A(o.$$.fragment),a=R(),A(u.$$.fragment),c=R(),C&&C.c(),y(e,"class","root svelte-ss4wgk")},m(k,I){$(k,e,I),E(t,e,null),P(e,n),E(i,e,null),P(e,l),E(o,e,null),P(e,a),E(u,e,null),P(e,c),C&&C.m(e,null),p=!0},p(k,[I]){const S={};I&256&&(S.$$scope={dirty:I,ctx:k}),t.$set(S);const T={};!s&&I&1&&(s=!0,T.value=k[0].type,pe(()=>s=!1)),i.$set(T);const N={};I&256&&(N.$$scope={dirty:I,ctx:k}),o.$set(N);const D={};!f&&I&1&&(f=!0,D.value=k[0].key,pe(()=>f=!1)),u.$set(D),k[0].type==="set"?C?(C.p(k,I),I&1&&m(C,1)):(C=ew(k),C.c(),m(C,1),C.m(e,null)):C&&(ee(),_(C,1,1,()=>{C=null}),te())},i(k){p||(m(t.$$.fragment,k),m(i.$$.fragment,k),m(o.$$.fragment,k),m(u.$$.fragment,k),m(C),p=!0)},o(k){_(t.$$.fragment,k),_(i.$$.fragment,k),_(o.$$.fragment,k),_(u.$$.fragment,k),_(C),p=!1},d(k){k&&b(e),O(t),O(i),O(o),O(u),C&&C.d()}}}function Vte(r,e,t){let{parameters:n}=e,{bindings:i=[]}=e;const s=P3(),l=[{label:"Set value",value:"set"},{label:"Delete value",value:"delete"}];Yt(()=>{n.type||t(0,n.type="set",n)});function o(c){r.$$.not_equal(n.type,c)&&(n.type=c,t(0,n))}function a(c){r.$$.not_equal(n.key,c)&&(n.key=c,t(0,n))}const u=c=>t(0,n.value=c.detail,n);function f(c){r.$$.not_equal(n.persist,c)&&(n.persist=c,t(0,n))}return r.$$set=c=>{"parameters"in c&&t(0,n=c.parameters),"bindings"in c&&t(1,i=c.bindings)},[n,i,s,l,o,a,u,f]}class Hte extends se{constructor(e){super();le(this,e,Vte,Fte,ne,{parameters:0,bindings:1})}}function Wte(r){let e;return{c(){e=H("Data Provider")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Gte(r){let e,t,n,i,s,l;t=new xe({props:{small:!0,$$slots:{default:[Wte]},$$scope:{ctx:r}}});function o(u){r[4](u)}let a={options:r[1],getOptionLabel:Yte,getOptionValue:Jte};return r[0].componentId!==void 0&&(a.value=r[0].componentId),i=new Ke({props:a}),Z.push(()=>ce(i,"value",o)),{c(){e=M("div"),A(t.$$.fragment),n=R(),A(i.$$.fragment),y(e,"class","root svelte-1bky1ml")},m(u,f){$(u,e,f),E(t,e,null),P(e,n),E(i,e,null),l=!0},p(u,[f]){const c={};f&32&&(c.$$scope={dirty:f,ctx:u}),t.$set(c);const p={};f&2&&(p.options=u[1]),!s&&f&1&&(s=!0,p.value=u[0].componentId,pe(()=>s=!1)),i.$set(p)},i(u){l||(m(t.$$.fragment,u),m(i.$$.fragment,u),l=!0)},o(u){_(t.$$.fragment,u),_(i.$$.fragment,u),l=!1},d(u){u&&b(e),O(t),O(i)}}}const Yte=r=>r._instanceName,Jte=r=>r._id;function Qte(r,e,t){let n,i,s;ue(r,Ye,a=>t(2,i=a)),ue(r,dn,a=>t(3,s=a));let{parameters:l}=e;function o(a){r.$$.not_equal(l.componentId,a)&&(l.componentId=a,t(0,l))}return r.$$set=a=>{"parameters"in a&&t(0,l=a.parameters)},r.$$.update=()=>{r.$$.dirty&12&&t(1,n=Hf(s,i.selectedComponentId,"RefreshDatasource"))},[l,n,i,s,o]}class Xte extends se{constructor(e){super();le(this,e,Qte,Gte,ne,{parameters:0})}}function Kte(r){let e,t,n;return{c(){e=H(`Choose the data source that provides the row you would like to duplicate.
|
|
1221
1221
|
`),t=M("br"),n=H(`
|
|
1222
1222
|
You can always add or override fields manually.`)},m(i,s){$(i,e,s),$(i,t,s),$(i,n,s)},d(i){i&&b(e),i&&b(t),i&&b(n)}}}function Zte(r){let e;return{c(){e=H("Data Source")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function xte(r){let e;return{c(){e=H("Duplicate to Table")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function tw(r){let e,t,n,i,s;e=new xe({props:{small:!0,$$slots:{default:[ene]},$$scope:{ctx:r}}});function l(a){r[14](a)}let o={placeholder:"Are you sure you want to duplicate this row?"};return r[0].confirmText!==void 0&&(o.value=r[0].confirmText),n=new et({props:o}),Z.push(()=>ce(n,"value",l)),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(a,u){E(e,a,u),$(a,t,u),E(n,a,u),s=!0},p(a,u){const f={};u&262144&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const c={};!i&&u&1&&(i=!0,c.value=a[0].confirmText,pe(()=>i=!1)),n.$set(c)},i(a){s||(m(e.$$.fragment,a),m(n.$$.fragment,a),s=!0)},o(a){_(e.$$.fragment,a),_(n.$$.fragment,a),s=!1},d(a){O(e,a),a&&b(t),O(n,a)}}}function ene(r){let e;return{c(){e=H("Confirm text")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function nw(r){let e,t,n;return t=new E1({props:{parameterFields:r[0].fields,schemaFields:r[3],bindings:r[1]}}),t.$on("change",r[5]),{c(){e=M("div"),A(t.$$.fragment),y(e,"class","fields svelte-1wlyndf")},m(i,s){$(i,e,s),E(t,e,null),n=!0},p(i,s){const l={};s&1&&(l.parameterFields=i[0].fields),s&8&&(l.schemaFields=i[3]),s&2&&(l.bindings=i[1]),t.$set(l)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function tne(r){let e,t,n,i,s,l,o,a,u,f,c,p,d,g,h,v,C,k,I,S,T;t=new Je({props:{size:"S",$$slots:{default:[Kte]},$$scope:{ctx:r}}}),s=new xe({props:{small:!0,$$slots:{default:[Zte]},$$scope:{ctx:r}}});function N(F){r[11](F)}let D={options:r[4],placeholder:"None"};r[0].providerId!==void 0&&(D.value=r[0].providerId),o=new Ke({props:D}),Z.push(()=>ce(o,"value",N)),f=new xe({props:{small:!0,$$slots:{default:[xte]},$$scope:{ctx:r}}});function G(F){r[12](F)}let j={options:r[2],getOptionLabel:nne,getOptionValue:rne};r[0].tableId!==void 0&&(j.value=r[0].tableId),p=new Ke({props:j}),Z.push(()=>ce(p,"value",G)),h=new xe({props:{small:!0}});function B(F){r[13](F)}let q={text:"Require confirmation"};r[0].confirm!==void 0&&(q.value=r[0].confirm),C=new pi({props:q}),Z.push(()=>ce(C,"value",B));let U=r[0].confirm&&tw(r),J=r[0].tableId&&nw(r);return{c(){e=M("div"),A(t.$$.fragment),n=R(),i=M("div"),A(s.$$.fragment),l=R(),A(o.$$.fragment),u=R(),A(f.$$.fragment),c=R(),A(p.$$.fragment),g=R(),A(h.$$.fragment),v=R(),A(C.$$.fragment),I=R(),U&&U.c(),S=R(),J&&J.c(),y(i,"class","params svelte-1wlyndf"),y(e,"class","root svelte-1wlyndf")},m(F,W){$(F,e,W),E(t,e,null),P(e,n),P(e,i),E(s,i,null),P(i,l),E(o,i,null),P(i,u),E(f,i,null),P(i,c),E(p,i,null),P(i,g),E(h,i,null),P(i,v),E(C,i,null),P(i,I),U&&U.m(i,null),P(e,S),J&&J.m(e,null),T=!0},p(F,[W]){const V={};W&262144&&(V.$$scope={dirty:W,ctx:F}),t.$set(V);const Q={};W&262144&&(Q.$$scope={dirty:W,ctx:F}),s.$set(Q);const me={};W&16&&(me.options=F[4]),!a&&W&1&&(a=!0,me.value=F[0].providerId,pe(()=>a=!1)),o.$set(me);const re={};W&262144&&(re.$$scope={dirty:W,ctx:F}),f.$set(re);const x={};W&4&&(x.options=F[2]),!d&&W&1&&(d=!0,x.value=F[0].tableId,pe(()=>d=!1)),p.$set(x);const ae={};!k&&W&1&&(k=!0,ae.value=F[0].confirm,pe(()=>k=!1)),C.$set(ae),F[0].confirm?U?(U.p(F,W),W&1&&m(U,1)):(U=tw(F),U.c(),m(U,1),U.m(i,null)):U&&(ee(),_(U,1,1,()=>{U=null}),te()),F[0].tableId?J?(J.p(F,W),W&1&&m(J,1)):(J=nw(F),J.c(),m(J,1),J.m(e,null)):J&&(ee(),_(J,1,1,()=>{J=null}),te())},i(F){T||(m(t.$$.fragment,F),m(s.$$.fragment,F),m(o.$$.fragment,F),m(f.$$.fragment,F),m(p.$$.fragment,F),m(h.$$.fragment,F),m(C.$$.fragment,F),m(U),m(J),T=!0)},o(F){_(t.$$.fragment,F),_(s.$$.fragment,F),_(o.$$.fragment,F),_(f.$$.fragment,F),_(p.$$.fragment,F),_(h.$$.fragment,F),_(C.$$.fragment,F),_(U),_(J),T=!1},d(F){F&&b(e),O(t),O(s),O(o),O(f),O(p),O(h),O(C),U&&U.d(),J&&J.d()}}}const nne=r=>r.name,rne=r=>r._id;function ine(r,e,t){let n,i,s,l,o,a,u,f;ue(r,At,T=>t(8,a=T)),ue(r,dn,T=>t(9,u=T)),ue(r,Ye,T=>t(10,f=T));let{parameters:c}=e,{bindings:p=[]}=e;const d=(T,N)=>{const D=Ye.actions.components.getDefinition(T==null?void 0:T._component);return D?(Array.isArray(D.context)?D.context:[D.context]).find(j=>(j==null?void 0:j.type)===N):null},g=(T,N)=>{const D=T.map(B=>({component:B,context:d(B,"form")})),G=N.map(B=>({component:B,context:d(B,"schema")}));return D.concat(G).map(({component:B,context:q})=>{let U=B._id;return q.suffix&&(U+=`-${q.suffix}`),{label:B._instanceName,value:U}})},h=(T,N)=>{const{schema:D}=Wf(N);return delete D._id,delete D._rev,Object.values(D||{})},v=T=>{t(0,c.fields=T.detail,c)};function C(T){r.$$.not_equal(c.providerId,T)&&(c.providerId=T,t(0,c))}function k(T){r.$$.not_equal(c.tableId,T)&&(c.tableId=T,t(0,c))}function I(T){r.$$.not_equal(c.confirm,T)&&(c.confirm=T,t(0,c))}function S(T){r.$$.not_equal(c.confirmText,T)&&(c.confirmText=T,t(0,c))}return r.$$set=T=>{"parameters"in T&&t(0,c=T.parameters),"bindings"in T&&t(1,p=T.bindings)},r.$$.update=()=>{r.$$.dirty&1536&&t(7,n=co(u,f.selectedComponentId,"form")),r.$$.dirty&1536&&t(6,i=co(u,f.selectedComponentId,"schema")),r.$$.dirty&192&&t(4,s=g(n,i)),r.$$.dirty&513&&t(3,l=h(u,c==null?void 0:c.tableId)),r.$$.dirty&256&&t(2,o=a.list||[])},[c,p,o,l,s,v,i,n,a,u,f,C,k,I,S]}class sne extends se{constructor(e){super();le(this,e,ine,tne,ne,{parameters:0,bindings:1})}}function lne(r){let e;return{c(){e=H("S3 Upload Component")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function one(r){let e,t,n,i,s,l;t=new xe({props:{small:!0,$$slots:{default:[lne]},$$scope:{ctx:r}}});function o(u){r[3](u)}let a={options:r[1],getOptionLabel:ane,getOptionValue:une};return r[0].componentId!==void 0&&(a.value=r[0].componentId),i=new Ke({props:a}),Z.push(()=>ce(i,"value",o)),{c(){e=M("div"),A(t.$$.fragment),n=R(),A(i.$$.fragment),y(e,"class","root svelte-omr0ht")},m(u,f){$(u,e,f),E(t,e,null),P(e,n),E(i,e,null),l=!0},p(u,[f]){const c={};f&16&&(c.$$scope={dirty:f,ctx:u}),t.$set(c);const p={};f&2&&(p.options=u[1]),!s&&f&1&&(s=!0,p.value=u[0].componentId,pe(()=>s=!1)),i.$set(p)},i(u){l||(m(t.$$.fragment,u),m(i.$$.fragment,u),l=!0)},o(u){_(t.$$.fragment,u),_(i.$$.fragment,u),l=!1},d(u){u&&b(e),O(t),O(i)}}}const ane=r=>r._instanceName,une=r=>r._id;function fne(r,e,t){let n,i;ue(r,dn,o=>t(2,i=o));let{parameters:s}=e;function l(o){r.$$.not_equal(s.componentId,o)&&(s.componentId=o,t(0,s))}return r.$$set=o=>{"parameters"in o&&t(0,s=o.parameters)},r.$$.update=()=>{r.$$.dirty&4&&t(1,n=Fu(i.props,o=>o._component.endsWith("s3upload")))},[s,n,i,l]}class cne extends se{constructor(e){super();le(this,e,fne,one,ne,{parameters:0})}}var pne=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",NavigateTo:hee,SaveRow:Nee,DeleteRow:Fee,ExecuteQuery:Xee,TriggerAutomation:ote,ValidateForm:dte,LogOut:bte,ClearForm:Ste,CloseScreenModal:Tte,ChangeFormStep:jte,UpdateState:Hte,RefreshDataProvider:Xte,DuplicateRow:sne,S3Upload:cne});const dne=(r=!1)=>T3.actions.filter(e=>{var t;return r||!e.dependsOnFeature?!0:((t=lt(Ye).clientFeatures)==null?void 0:t[e.dependsOnFeature])===!0}).map(e=>rt(Ee({},e),{component:pne[e.component]})).filter(e=>e.component!=null);function rw(r,e,t){const n=r.slice();return n[13]=e[t],n}function iw(r,e,t){const n=r.slice();return n[16]=e[t],n[18]=t,n}function sw(r){let e=r[1].id,t,n,i=lw(r);return{c(){i.c(),t=Oe()},m(s,l){i.m(s,l),$(s,t,l),n=!0},p(s,l){l&2&&ne(e,e=s[1].id)?(ee(),_(i,1,1,Te),te(),i=lw(s),i.c(),m(i),i.m(t.parentNode,t)):i.p(s,l)},i(s){n||(m(i),n=!0)},o(s){_(i),n=!1},d(s){s&&b(t),i.d(s)}}}function lw(r){let e,t,n;var i=r[2];function s(l){return{props:{parameters:l[1].parameters,bindings:l[3]}}}return i&&(t=new i(s(r))),{c(){e=M("div"),t&&A(t.$$.fragment),y(e,"class","selected-action-container")},m(l,o){$(l,e,o),t&&E(t,e,null),n=!0},p(l,o){const a={};if(o&2&&(a.parameters=l[1].parameters),o&8&&(a.bindings=l[3]),i!==(i=l[2])){if(t){ee();const u=t;_(u.$$.fragment,1,0,()=>{O(u,1)}),te()}i?(t=new i(s(l)),A(t.$$.fragment),m(t.$$.fragment,1),E(t,e,null)):t=null}else i&&t.$set(a)},i(l){n||(t&&m(t.$$.fragment,l),n=!0)},o(l){t&&_(t.$$.fragment,l),n=!1},d(l){l&&b(e),t&&O(t)}}}function mne(r){let e,t,n=r[2]&&sw(r);return{c(){n&&n.c(),e=Oe()},m(i,s){n&&n.m(i,s),$(i,e,s),t=!0},p(i,s){i[2]?n?(n.p(i,s),s&4&&m(n,1)):(n=sw(i),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(ee(),_(n,1,1,()=>{n=null}),te())},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){n&&n.d(i),i&&b(e)}}}function gne(r){let e,t;return e=new Qe({props:{noPadding:!0,$$slots:{default:[mne]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&524302&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function ow(r){let e,t=[],n=new Map,i,s,l,o,a=r[0];const u=f=>f[16].id;for(let f=0;f<a.length;f+=1){let c=iw(r,a,f),p=u(c);n.set(p,t[f]=aw(p,c))}return{c(){e=M("div");for(let f=0;f<t.length;f+=1)t[f].c();y(e,"class","actions svelte-1dgx8bt")},m(f,c){$(f,e,c);for(let p=0;p<t.length;p+=1)t[p].m(e,null);s=!0,l||(o=[$r(i=Tu.call(null,e,{items:r[0],flipDurationMs:O1,dropTargetStyle:{outline:"none"}})),Le(e,"consider",r[8]),Le(e,"finalize",r[9])],l=!0)},p(f,c){if(c&163){a=f[0],ee();for(let p=0;p<t.length;p+=1)t[p].r();t=er(t,c,u,1,f,a,n,e,jo,aw,null,iw);for(let p=0;p<t.length;p+=1)t[p].a();te()}i&&dt(i.update)&&c&1&&i.update.call(null,{items:f[0],flipDurationMs:O1,dropTargetStyle:{outline:"none"}})},i(f){if(!s){for(let c=0;c<a.length;c+=1)m(t[c]);s=!0}},o(f){for(let c=0;c<t.length;c+=1)_(t[c]);s=!1},d(f){f&&b(e);for(let c=0;c<t.length;c+=1)t[c].d();l=!1,En(o)}}}function aw(r,e){let t,n,i,s,l=e[18]+1+"",o,a,u=e[16][nc]+"",f,c,p,d,g,h=Te,v,C,k;n=new pt({props:{name:"DragHandle",size:"XL"}});function I(){return e[12](e[18])}return p=new pt({props:{name:"Close",hoverable:!0,size:"S"}}),p.$on("click",I),{key:r,first:null,c(){t=M("div"),A(n.$$.fragment),i=R(),s=M("div"),o=H(l),a=H(".\xA0"),f=H(u),c=R(),A(p.$$.fragment),d=R(),y(s,"class","action-header svelte-1dgx8bt"),y(t,"class","action-container svelte-1dgx8bt"),oe(t,"selected",e[16]===e[1]),this.first=t},m(S,T){$(S,t,T),E(n,t,null),P(t,i),P(t,s),P(s,o),P(s,a),P(s,f),P(t,c),E(p,t,null),P(t,d),v=!0,C||(k=Le(t,"click",function(){dt(e[7](e[16]))&&e[7](e[16]).apply(this,arguments)}),C=!0)},p(S,T){e=S,(!v||T&1)&&l!==(l=e[18]+1+"")&&Ie(o,l),(!v||T&1)&&u!==(u=e[16][nc]+"")&&Ie(f,u),T&3&&oe(t,"selected",e[16]===e[1])},r(){g=t.getBoundingClientRect()},f(){Bo(t),h()},a(){h(),h=zo(t,g,qo,{duration:O1})},i(S){v||(m(n.$$.fragment,S),m(p.$$.fragment,S),v=!0)},o(S){_(n.$$.fragment,S),_(p.$$.fragment,S),v=!1},d(S){S&&b(t),O(n),O(p),C=!1,k()}}}function _ne(r){let e=r[13].name+"",t,n;return{c(){t=H(e),n=R()},m(i,s){$(i,t,s),$(i,n,s)},p:Te,d(i){i&&b(t),i&&b(n)}}}function uw(r){let e,t;return e=new tn({props:{$$slots:{default:[_ne]},$$scope:{ctx:r}}}),e.$on("click",r[6](r[13])),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&524288&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function hne(r){let e,t,n=r[4],i=[];for(let l=0;l<n.length;l+=1)i[l]=uw(rw(r,n,l));const s=l=>_(i[l],1,1,()=>{i[l]=null});return{c(){for(let l=0;l<i.length;l+=1)i[l].c();e=Oe()},m(l,o){for(let a=0;a<i.length;a+=1)i[a].m(l,o);$(l,e,o),t=!0},p(l,o){if(o&80){n=l[4];let a;for(a=0;a<n.length;a+=1){const u=rw(l,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=uw(u),i[a].c(),m(i[a],1),i[a].m(e.parentNode,e))}for(ee(),a=n.length;a<i.length;a+=1)s(a);te()}},i(l){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(l){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(l){_t(i,l),l&&b(e)}}}function $ne(r){let e;return{c(){e=H("Add Action")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function bne(r){let e,t;return e=new ut({props:{slot:"control",secondary:!0,$$slots:{default:[$ne]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&524288&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function vne(r){let e,t,n,i=r[0]&&r[0].length>0&&ow(r);return t=new Er({props:{$$slots:{control:[bne],default:[hne]},$$scope:{ctx:r}}}),{c(){i&&i.c(),e=R(),A(t.$$.fragment)},m(s,l){i&&i.m(s,l),$(s,e,l),E(t,s,l),n=!0},p(s,l){s[0]&&s[0].length>0?i?(i.p(s,l),l&1&&m(i,1)):(i=ow(s),i.c(),m(i,1),i.m(e.parentNode,e)):i&&(ee(),_(i,1,1,()=>{i=null}),te());const o={};l&524288&&(o.$$scope={dirty:l,ctx:s}),t.$set(o)},i(s){n||(m(i),m(t.$$.fragment,s),n=!0)},o(s){_(i),_(t.$$.fragment,s),n=!1},d(s){i&&i.d(s),s&&b(e),O(t,s)}}}function wne(r){let e,t;return e=new Qe({props:{noPadding:!0,gap:"S",slot:"sidebar",$$slots:{default:[vne]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&524291&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function yne(r){let e,t;return e=new Fi({props:{$$slots:{sidebar:[wne],default:[gne]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,[i]){const s={};i&524303&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}const O1=150,nc="##eventHandlerType";function kne(r,e,t){let n,i,s;const l=dne();let{actions:o}=e,{bindings:a=[]}=e,u=(o==null?void 0:o.length)?o[0]:null;const f=v=>{o.splice(v,1),t(0,o)},c=v=>()=>{const C={parameters:{},[nc]:v.name,id:Br.generate()};o||t(0,o=[]),t(0,o=[...o,C]),t(1,u=C)},p=v=>()=>{t(1,u=v)};function d(v){t(0,o=v.detail.items)}function g(v){t(0,o=v.detail.items)}const h=v=>f(v);return r.$$set=v=>{"actions"in v&&t(0,o=v.actions),"bindings"in v&&t(10,a=v.bindings)},r.$$.update=()=>{var v;r.$$.dirty&3&&u&&!(o==null?void 0:o.includes(u))&&t(1,u=o==null?void 0:o[0]),r.$$.dirty&3&&t(11,n=Nj(o,u==null?void 0:u.id)),r.$$.dirty&3072&&t(3,i=n.concat(a)),r.$$.dirty&1&&o&&o.forEach(C=>{C.id||(C.id=Br.generate())}),r.$$.dirty&2&&t(2,s=u&&((v=l.find(C=>C.name===u[nc]))==null?void 0:v.component))},[o,u,s,i,l,f,c,p,d,g,a,n,h]}class Cne extends se{constructor(e){super();le(this,e,kne,yne,ne,{actions:0,bindings:10})}}function Sne(r){let e;return{c(){e=H("Define actions")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Ane(r){let e;return{c(){e=H("Define what actions to run.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Ene(r){let e;return{c(){e=H("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function One(r){let e,t;return e=new ut({props:{cta:!0,slot:"buttons",$$slots:{default:[Ene]},$$scope:{ctx:r}}}),e.$on("click",r[5]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&4096&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Tne(r){let e,t,n;function i(l){r[7](l)}let s={slot:"body",eventType:r[0],bindings:r[1]};return r[3]!==void 0&&(s.actions=r[3]),e=new Cne({props:s}),Z.push(()=>ce(e,"actions",i)),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){const a={};o&1&&(a.eventType=l[0]),o&2&&(a.bindings=l[1]),!t&&o&8&&(t=!0,a.actions=l[3],pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function Ine(r){let e,t,n,i;e=new Gt({props:{$$slots:{default:[Sne]},$$scope:{ctx:r}}}),e.$on("click",r[4]);let s={title:"Actions",$$slots:{body:[Tne],buttons:[One],description:[Ane]},$$scope:{ctx:r}};return n=new ci({props:s}),r[8](n),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(l,o){E(e,l,o),$(l,t,o),E(n,l,o),i=!0},p(l,[o]){const a={};o&4096&&(a.$$scope={dirty:o,ctx:l}),e.$set(a);const u={};o&4107&&(u.$$scope={dirty:o,ctx:l}),n.$set(u)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){O(e,l),l&&b(t),r[8](null),O(n,l)}}}function Lne(r,e,t){let n;ue(r,xt,h=>t(9,n=h));const i=mt();let{value:s=[]}=e,{name:l}=e,{bindings:o}=e,a,u;const f=()=>{t(3,u=hn.cloneDeep(s)),a.show()},c=async()=>{const h=u.filter(v=>v["##eventHandlerType"]==="Trigger Automation");for(let v of h)await p(v.parameters);i("change",u),ye.success("Component actions saved."),a.hide()},p=async h=>{var v;if(!(h.automationId||!h.newAutomationName))try{await xt.actions.create({name:h.newAutomationName});const C=n.blockDefinitions.TRIGGER.APP,k=n.selectedAutomation.constructBlock("TRIGGER","APP",C);k.inputs={fields:Object.keys(h.fields).reduce((I,S)=>(I[S]="string",I),{})},xt.actions.addBlockToAutomation(k),await xt.actions.save((v=n.selectedAutomation)==null?void 0:v.automation),h.automationId=n.selectedAutomation.automation._id,delete h.newAutomationName}catch{ye.error("Error creating automation")}};function d(h){u=h,t(3,u)}function g(h){Z[h?"unshift":"push"](()=>{a=h,t(2,a)})}return r.$$set=h=>{"value"in h&&t(6,s=h.value),"name"in h&&t(0,l=h.name),"bindings"in h&&t(1,o=h.bindings)},[l,o,a,u,f,c,s,d,g]}class Pne extends se{constructor(e){super();le(this,e,Lne,Ine,ne,{value:6,name:0,bindings:1})}}function fw(r,e,t){const n=r.slice();return n[3]=e[t],n}function cw(r){let e,t=r[3].name+"",n,i;return{c(){e=M("option"),n=H(t),e.__value=i=r[3]._id,e.value=e.__value},m(s,l){$(s,e,l),P(e,n)},p(s,l){l&2&&t!==(t=s[3].name+"")&&Ie(n,t),l&2&&i!==(i=s[3]._id)&&(e.__value=i,e.value=e.__value)},d(s){s&&b(e)}}}function Nne(r){let e,t,n,i=r[1].list,s=[];for(let l=0;l<i.length;l+=1)s[l]=cw(fw(r,i,l));return{c(){e=M("option"),e.textContent="Choose a table",t=R();for(let l=0;l<s.length;l+=1)s[l].c();n=Oe(),e.__value="",e.value=e.__value},m(l,o){$(l,e,o),$(l,t,o);for(let a=0;a<s.length;a+=1)s[a].m(l,o);$(l,n,o)},p(l,o){if(o&2){i=l[1].list;let a;for(a=0;a<i.length;a+=1){const u=fw(l,i,a);s[a]?s[a].p(u,o):(s[a]=cw(u),s[a].c(),s[a].m(n.parentNode,n))}for(;a<s.length;a+=1)s[a].d(1);s.length=i.length}},d(l){l&&b(e),l&&b(t),_t(s,l),l&&b(n)}}}function Rne(r){let e,t,n;return t=new Ke({props:{extraThin:!0,secondary:!0,wide:!0,value:r[0],$$slots:{default:[Nne]},$$scope:{ctx:r}}}),t.$on("change",r[2]),{c(){e=M("div"),A(t.$$.fragment),y(e,"class","svelte-16jzcsd")},m(i,s){$(i,e,s),E(t,e,null),n=!0},p(i,[s]){const l={};s&1&&(l.value=i[0]),s&66&&(l.$$scope={dirty:s,ctx:i}),t.$set(l)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function Mne(r,e,t){let n;ue(r,At,l=>t(1,n=l));let{value:i}=e;function s(l){at.call(this,r,l)}return r.$$set=l=>{"value"in l&&t(0,i=l.value)},[i,n,s]}class Dne extends se{constructor(e){super();le(this,e,Mne,Rne,ne,{value:0})}}function jne(r){let e,t;return e=new Vl({props:{value:r[0],spectrumTheme:r[1].theme}}),e.$on("change",r[2]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,[i]){const s={};i&1&&(s.value=n[0]),i&2&&(s.spectrumTheme=n[1].theme),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Bne(r,e,t){let n;ue(r,Ye,l=>t(1,n=l));let{value:i}=e;function s(l){at.call(this,r,l)}return r.$$set=l=>{"value"in l&&t(0,i=l.value)},[i,n,s]}class T1 extends se{constructor(e){super();le(this,e,Bne,jne,ne,{value:0})}}var pw={Buildings:{home:["house","\u623F\u5B50","\u5BB6","\u4E3B\u9875"],"home-2":["house","\u623F\u5B50","\u5BB6","\u4E3B\u9875"],"home-3":["house","\u623F\u5B50","\u5BB6","\u4E3B\u9875"],"home-4":["house","\u623F\u5B50","\u5BB6","\u4E3B\u9875"],"home-5":["house","\u623F\u5B50","\u5BB6","\u4E3B\u9875"],"home-6":["house","\u623F\u5B50","\u5BB6","\u4E3B\u9875"],"home-7":["house","\u623F\u5B50","\u5BB6","\u4E3B\u9875"],"home-8":["house","\u623F\u5B50","\u5BB6","\u4E3B\u9875"],"home-gear":["house","\u623F\u5B50","\u5DE5\u5382"],"home-wifi":["smart home","\u623F\u5B50","\u5BB6\u5177","\u667A\u80FD\u5BB6\u5C45"],"home-smile":["house","smart home","smile","\u623F\u5B50","\u667A\u80FD\u5BB6\u5C45","\u5FAE\u7B11"],"home-smile-2":["house","smart home","smile","\u623F\u5B50","\u667A\u80FD\u5BB6\u5C45","\u5FAE\u7B11"],"home-heart":["house","\u5FC3","\u623F\u5B50","\u5BB6","\u4E3B\u9875","\u5B64\u513F\u9662"],building:["city","office","enterprise","\u5EFA\u7B51","\u57CE\u5E02","\u697C","\u529E\u516C\u697C","\u5199\u5B57\u697C","\u4F01\u4E1A"],"building-2":["city","office","construction","enterprise","\u57CE\u5E02","\u5EFA\u7B51","\u697C","\u4F01\u4E1A"],"building-3":["factory","plant","enterprise","\u5DE5\u5382","\u5EFA\u7B51","\u697C","\u4F01\u4E1A"],"building-4":["city","office","enterprise","\u5EFA\u7B51","\u57CE\u5E02","\u697C","\u529E\u516C\u697C","\u5199\u5B57\u697C","\u4F01\u4E1A"],hotel:["building","hotel","office","enterprise","tavern","\u5EFA\u7B51","\u9152\u5E97","\u697C","\u529E\u516C\u697C","\u5199\u5B57\u697C","\u4F01\u4E1A"],community:["building","hotel","\u793E\u533A","\u5EFA\u7B51","\u9152\u5E97"],government:["building","\u653F\u5E9C","\u5EFA\u7B51","\u5927\u4F1A\u5802"],bank:["bank","finance","savings","banking","\u94F6\u884C","\u4EA4\u6613\u6240"],store:["shop","mall","supermarket","\u5546\u5E97","\u8D85\u5E02","\u5E97\u94FA","\u5546\u5BB6"],"store-2":["shop","mall","supermarket","\u5546\u5E97","\u8D85\u5E02","\u5E97\u94FA","\u5546\u5BB6"],"store-3":["shop","mall","supermarket","\u5546\u5E97","\u8D85\u5E02","\u5E97\u94FA","\u5546\u5BB6"],hospital:["medical","health","\u533B\u9662"],"ancient-gate":["historical","genre","scenic","trip","travel","\u65C5\u884C","\u65C5\u6E38","\u57CE\u95E8","\u53E4\u4EE3","\u5386\u53F2","\u666F\u533A"],"ancient-pavilion":["historical","genre","scenic","trip","travel","\u65C5\u884C","\u65C5\u6E38","\u51C9\u4EAD","\u53E4\u4EE3","\u5386\u53F2","\u666F\u533A"]},Business:{mail:["envelope","email","inbox","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u6536\u4EF6\u7BB1"],"mail-open":["envelope","email","inbox","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u6536\u4EF6\u7BB1"],"mail-send":["envelope","email","inbox","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u53D1\u9001","\u53D1\u4EF6\u7BB1"],"mail-unread":["envelope","email","inbox","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u672A\u8BFB"],"mail-add":["envelope","email","inbox","add","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u65B0\u589E","\u6DFB\u52A0"],"mail-check":["envelope","email","inbox","read","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u5DF2\u8BFB"],"mail-close":["envelope","email","inbox","failed","x","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u5931\u8D25"],"mail-download":["envelope","email","inbox","download","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u4E0B\u8F7D"],"mail-forbid":["envelope","email","inbox","privacy","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u7981\u6B62"],"mail-lock":["envelope","email","inbox","lock","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u52A0\u5BC6"],"mail-settings":["envelope","email","inbox","settings","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u8BBE\u7F6E"],"mail-star":["envelope","email","inbox","favorite","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u6536\u85CF","\u559C\u6B22"],"mail-volume":["envelope","email","inbox","promotional email","email campaign","subscription","\u4FE1\u5C01","\u90AE\u7BB1","\u90AE\u4EF6","\u6536\u4EF6\u7BB1","\u63A8\u5E7F","\u8BA2\u9605"],inbox:["\u6536\u4EF6\u7BB1"],"inbox-archive":["\u6536\u4EF6\u7BB1","\u5F52\u6863","\u6536\u7EB3"],"inbox-unarchive":["unzip","unpack","extract","\u6536\u4EF6\u7BB1","\u53D6\u6D88\u5F52\u6863","\u8FD8\u539F","\u89E3\u538B\u7F29"],cloud:["weather","\u4E91\u7AEF"],"cloud-off":["offline-mode","connection-fail","slash","weather","\u4E91\u7AEF","\u65AD\u7F51","\u65E0\u4FE1\u53F7","\u8FDE\u63A5\u5931\u8D25"],attachment:["annex","paperclip","\u9644\u4EF6","\u66F2\u522B\u9488"],profile:["id","\u6863\u6848","\u8D44\u6599","\u8EAB\u4EFD\u8BC1","\u8BC1\u4EF6"],archive:["box","\u6536\u7EB3","\u5F52\u6863","\u5B58\u6863","\u76D2\u5B50","\u7EB8\u7BB1"],"archive-drawer":["night table","\u6536\u7EB3","\u62BD\u5C49","\u5F52\u6863","\u5B58\u6863","\u5E8A\u5934\u67DC"],at:["@","mention","\u63D0\u5230","\u5728"],award:["medal","achievement","badge","\u6210\u5C31","\u5956\u724C","\u91D1\u724C","\u52CB\u7AE0"],medal:["award","achievement","badge","\u6210\u5C31","\u5956\u724C","\u91D1\u724C","\u52CB\u7AE0"],"medal-2":["award","achievement","badge","\u6210\u5C31","\u5956\u724C","\u91D1\u724C","\u52CB\u7AE0"],"bar-chart":["statistics","rhythm","\u67F1\u72B6\u56FE","\u7EDF\u8BA1","\u97F5\u5F8B","\u8282\u594F"],"bar-chart-horizontal":["statistics","rhythm","\u67F1\u72B6\u56FE","\u7EDF\u8BA1","\u97F5\u5F8B","\u8282\u594F"],"bar-chart-2":["statistics","rhythm","\u67F1\u72B6\u56FE","\u7EDF\u8BA1","\u6392\u884C","\u8282\u594F"],"bar-chart-box":["statistics","rhythm","\u67F1\u72B6\u56FE","\u7EDF\u8BA1","\u8282\u594F"],"bar-chart-grouped":["statistics","rhythm","\u67F1\u72B6\u56FE","\u7EDF\u8BA1","\u5206\u7EC4"],"bubble-chart":["data","analysis","statistics","\u6C14\u6CE1\u56FE","\u7EDF\u8BA1"],"pie-chart":["data","analysis","\u997C\u56FE","\u997C\u72B6\u56FE","\u6570\u636E","\u5206\u6790"],"pie-chart-2":["data","analysis","\u997C\u56FE","\u997C\u72B6\u56FE","\u6570\u636E","\u5206\u6790"],"pie-chart-box":["data","analysis","\u997C\u56FE","\u997C\u72B6\u56FE","\u6570\u636E","\u5206\u6790"],"donut-chart":["data","analysis","\u73AF\u5F62\u56FE","\u6570\u636E","\u5206\u6790"],"line-chart":["data","analysis","stats","\u6298\u7EBF\u56FE","\u6570\u636E","\u5206\u6790"],bookmark:["tag","\u4E66\u7B7E","\u6807\u8BB0"],"bookmark-2":["tag","\u4E66\u7B7E","\u6807\u8BB0"],"bookmark-3":["tag","\u4E66\u7B7E","\u6807\u8BB0","\u8363\u8A89"],briefcase:["bag","baggage","\u516C\u6587\u5305","\u884C\u674E\u7BB1","\u65C5\u884C\u7BB1","\u76AE\u5305"],"briefcase-2":["bag","baggage","\u516C\u6587\u5305","\u884C\u674E\u7BB1","\u65C5\u884C\u7BB1","\u76AE\u5305"],"briefcase-3":["bag","baggage","\u516C\u6587\u5305","\u884C\u674E\u7BB1","\u65C5\u884C\u7BB1","\u76AE\u5305"],"briefcase-4":["bag","baggage","\u516C\u6587\u5305","\u884C\u674E\u7BB1","\u65C5\u884C\u7BB1","\u76AE\u5305"],"briefcase-5":["bag","baggage","\u516C\u6587\u5305","\u884C\u674E\u7BB1","\u65C5\u884C\u7BB1","\u76AE\u5305"],calculator:["\u8BA1\u7B97\u5668","\u8BA1\u7B97\u673A"],calendar:["date","plan","schedule","agenda","\u65E5\u5386","\u65E5\u671F","\u6708\u4EFD","\u8BA1\u5212","\u65E5\u7A0B","\u65F6\u95F4\u8868"],"calendar-2":["date","plan","schedule","agenda","\u65E5\u5386","\u65E5\u671F","\u6708\u4EFD","\u8BA1\u5212","\u65E5\u7A0B","\u65F6\u95F4\u8868"],"calendar-event":["date","plan","schedule","agenda","\u65E5\u5386","\u65E5\u671F","\u6708\u4EFD","\u8BA1\u5212","\u65E5\u7A0B","\u65F6\u95F4\u8868"],"calendar-todo":["date","plan","schedule","agenda","\u65E5\u5386","\u65E5\u671F","\u6708\u4EFD","\u8BA1\u5212","\u65E5\u7A0B","\u65F6\u95F4\u8868"],"calendar-check":["date","plan","schedule","agenda","check-in","punch","\u65E5\u5386","\u65E5\u671F","\u6708\u4EFD","\u8BA1\u5212","\u65E5\u7A0B","\u65F6\u95F4\u8868","\u7B7E\u5230","\u6253\u5361"],"customer-service":["headset","\u5BA2\u670D","\u552E\u540E","\u8033\u673A","\u8033\u9EA6"],"customer-service-2":["headset","\u5BA2\u670D","\u552E\u540E","\u8033\u673A","\u8033\u9EA6"],flag:["banner","pin","\u65D7\u5E1C","\u65D7\u5B50","\u56FD\u65D7","\u6807\u8BB0"],"flag-2":["banner","pin","\u65D7\u5E1C","\u65D7\u5B50","\u56FD\u65D7","\u6807\u8BB0"],global:["earth","union","world","language","\u5730\u7403","\u8054\u5408","\u4E16\u754C","\u5168\u7403","\u8BED\u8A00"],honour:["honor","glory","\u9526\u65D7","\u8363\u8A89","\u8363\u8000","\u519B\u8854"],links:["connection","address","\u8054\u7CFB","\u94FE\u63A5","\u5730\u5740"],printer:["\u6253\u5370\u673A"],"printer-cloud":["\u6253\u5370\u673A","\u4E91\u6253\u5370"],"record-mail":["voice mail","tape","\u5F55\u97F3","\u7559\u8A00","\u8BED\u97F3\u4FE1\u7BB1","\u78C1\u5E26"],reply:["forward","\u56DE\u590D\u5168\u90E8","\u56DE\u590D\u6240\u6709"],"reply-all":["forward","\u56DE\u590D","\u7B54\u590D","\u7559\u8A00","\u8F6C\u53D1"],"send-plane":["\u53D1\u9001","\u7EB8\u98DE\u673A"],"send-plane-2":["\u53D1\u9001","\u7EB8\u98DE\u673A"],projector:["projection","meeting","\u6295\u5F71\u4EEA","\u4F1A\u8BAE\u5BA4"],"projector-2":["projection","meeting","\u6295\u5F71\u4EEA","\u4F1A\u8BAE\u5BA4","\u6781\u7C73"],slideshow:["presentation","meeting","PPT","keynote","\u6295\u5F71","\u653E\u6620","\u6F14\u793A","\u6F14\u8BB2","\u5E7B\u706F\u7247","\u4F1A\u8BAE\u5BA4"],"slideshow-2":["presentation","meeting","\u6295\u5F71","\u653E\u6620","\u6F14\u793A","\u6F14\u8BB2","\u5E7B\u706F\u7247","\u4F1A\u8BAE\u5BA4"],"slideshow-3":["presentation","meeting","\u6295\u5F71","\u653E\u6620","\u6F14\u793A","\u6F14\u8BB2","\u89C6\u9891\u4F1A\u8BAE","\u5E7B\u706F\u7247","\u4F1A\u8BAE\u5BA4"],"slideshow-4":["presentation","meeting","\u6295\u5F71","\u653E\u6620","\u6F14\u793A","\u6F14\u8BB2","\u53EF\u89C6\u5BF9\u8BB2","\u5E7B\u706F\u7247","\u4F1A\u8BAE\u5BA4"],window:["browser","program","web","\u7A97\u53E3","\u6D4F\u89C8\u5668","\u7A0B\u5E8F","\u7F51\u7AD9"],"window-2":["browser","program","web","\u7A97\u53E3","\u6D4F\u89C8\u5668","\u7A0B\u5E8F","\u7F51\u7AD9"],stack:["layers","\u56FE\u5C42","\u53E0\u52A0","\u5806\u6808"],service:["heart","handshake","cooperation","\u670D\u52A1","\u63E1\u624B","\u5FC3","\u5408\u4F5C"],registered:["\u6CE8\u518C","\u5546\u6807"],trademark:["\u6CE8\u518C","\u5546\u6807"],advertisement:["ad","\u5E7F\u544A","\u63A8\u5E7F"],copyleft:["\u8457\u4F50\u6743"],copyright:["\u7248\u6743"],"creative-commons":["\u77E5\u8BC6\u5171\u4EAB"],"creative-commons-by":["attribution","copyright","\u7248\u6743","\u77E5\u8BC6\u5171\u4EAB","\u7F72\u540D"],"creative-commons-nc":["noncommercial","copyright","\u7248\u6743","\u77E5\u8BC6\u5171\u4EAB","\u975E\u5546\u4E1A\u7528\u9014"],"creative-commons-nd":["no derivative works","copyright","\u7248\u6743","\u77E5\u8BC6\u5171\u4EAB","\u7981\u6B62\u6F14\u7ECE"],"creative-commons-sa":["share alike","copyright","\u7248\u6743","\u77E5\u8BC6\u5171\u4EAB","\u76F8\u540C\u65B9\u5F0F\u5171\u4EAB"],"creative-commons-zero":["cc0","copyright","\u7248\u6743","\u77E5\u8BC6\u5171\u4EAB"]},Communication:{"chat-1":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"chat-2":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"chat-3":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"chat-4":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],message:["chat","comment","reply","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"message-2":["chat","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"message-3":["chat","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"chat-check":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA","\u5DF2\u9605"],"chat-delete":["message","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA","\u6E05\u9664","\u5220\u9664"],"chat-forward":["message","comment","\u6D88\u606F","\u804A\u5929","\u8F6C\u53D1"],"chat-upload":["message","comment","\u6D88\u606F","\u804A\u5929","\u4E0A\u4F20"],"chat-download":["message","comment","\u6D88\u606F","\u4E0B\u8F7D"],"chat-new":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"chat-settings":["message","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA","\u8BBE\u7F6E"],"chat-smile":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"chat-smile-2":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"chat-smile-3":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA"],"chat-heart":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA","\u5FC3","\u70B9\u8D5E","\u6536\u85CF"],"chat-off":["message","reply","comment","slash","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA","\u7981\u6B62","\u5173\u95ED"],feedback:["message","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA","\u53CD\u9988"],discuss:["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA","\u8BA8\u8BBA","\u7FA4\u804A"],"question-answer":["message","reply","comment","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA","\u8BA8\u8BBA","\u7FA4\u804A"],questionnaire:["message","comment","help","\u6D88\u606F","\u804A\u5929","\u56DE\u590D","\u8BC4\u8BBA","\u8BA8\u8BBA","\u8C03\u67E5\u95EE\u5377","\u5E2E\u52A9"],"video-chat":["message","comment","\u6D88\u606F","\u89C6\u9891\u804A\u5929"],"chat-voice":["message","comment","\u6D88\u606F","\u8BED\u97F3\u6D88\u606F"],"chat-quote":["message","reply","comment","\u6D88\u606F","\u5F15\u7528\u56DE\u590D"],"chat-follow-up":["message","reply","comment","\u6D88\u606F","+1","\u8DDF\u5E16"],"chat-poll":["message","vote","questionnaire","\u6D88\u606F","\u6295\u7968","\u95EE\u5377\u8C03\u67E5"],"chat-history":["message","\u5386\u53F2\u6D88\u606F","\u6D88\u606F\u8BB0\u5F55"],"chat-private":["message","\u79C1\u5BC6\u6D88\u606F","\u5BC6\u804A"]},Design:{pencil:["edit","\u94C5\u7B14","\u7F16\u8F91"],edit:["pencil","\u94C5\u7B14","\u7F16\u8F91"],"edit-2":["pencil","\u94C5\u7B14","\u7F16\u8F91"],"ball-pen":["\u5706\u73E0\u7B14"],"quill-pen":["\u7FBD\u6BDB\u7B14","\u94A2\u7B14","\u7F16\u8F91"],"pen-nib":["\u94A2\u7B14","\u7B14\u5C16"],"ink-bottle":["\u58A8\u6C34\u74F6"],"mark-pen":["\u9A6C\u514B\u7B14"],markup:["\u6807\u8BB0","\u9A6C\u514B"],"edit-box":["\u7F16\u8F91"],"edit-circle":["\u7F16\u8F91"],sip:["\u5438\u7BA1","\u53D6\u8272\u5668"],brush:["\u7B14\u5237","\u753B\u7B14","\u5237\u5B50"],"brush-2":["\u5237\u5B50"],"brush-3":["\u5237\u5B50"],"brush-4":["\u5237\u5B50"],"paint-brush":["\u586B\u8272","\u586B\u5145","\u5237\u5B50"],contrast:["brightness","tonalit","\u5BF9\u6BD4\u5EA6","\u4EAE\u5EA6","\u8272\u8C03"],"contrast-2":["moon","dark","brightness","tonalit","\u6708\u4EAE","\u591C\u95F4","\u5BF9\u6BD4\u5EA6","\u4EAE\u5EA6","\u8272\u8C03"],drop:["water","blur","\u6A21\u7CCA","\u6C34","\u6EF4"],"blur-off":["water","drop","slash","\u6A21\u7CCA","\u6C34","\u6EF4","\u7981\u6B62","\u5173\u95ED"],"contrast-drop":["water","brightness","tonalit","\u6C34","\u5BF9\u6BD4\u5EA6","\u4EAE\u5EA6","\u8272\u8C03","\u6EF4"],"contrast-drop-2":["water","brightness","tonalit","\u6C34","\u5BF9\u6BD4\u5EA6","\u4EAE\u5EA6","\u8272\u8C03","\u6EF4"],compasses:["\u5706\u89C4"],"compasses-2":["\u5706\u89C4"],scissors:["\u526A\u5200","\u88C1\u526A"],"scissors-cut":["\u526A\u5200","\u88C1\u526A"],"scissors-2":["\u526A\u5200","\u88C1\u526A","\u622A\u5C4F"],slice:["knife","\u5207\u56FE","\u5207\u7247","\u5200"],eraser:["remove formatting","\u6A61\u76AE","\u64E6\u9664","\u6E05\u9664\u683C\u5F0F"],ruler:["\u5C3A\u5B50"],"ruler-2":["\u5C3A\u5B50"],"pencil-ruler":["design","\u94C5\u7B14","\u5C3A\u5B50","\u6587\u5177","\u8BBE\u8BA1"],"pencil-ruler-2":["design","\u94C5\u7B14","\u5C3A\u5B50","\u6587\u5177","\u8BBE\u8BA1"],"t-box":["\u6587\u5B57","\u5B57\u4F53","\u5B57\u53F7"],"input-method":["\u8F93\u5165\u6CD5","\u6587\u5B57"],artboard:["grid","crop","\u753B\u677F","\u88C1\u5207"],"artboard-2":["\u753B\u677F"],crop:["\u88C1\u5207"],"crop-2":["\u88C1\u5207"],screenshot:["capture","\u5C4F\u5E55\u622A\u56FE","\u622A\u5C4F"],"screenshot-2":["capture","\u5C4F\u5E55\u622A\u56FE","\u622A\u5C4F"],"drag-move":["arrow","\u62D6\u62FD","\u79FB\u52A8","\u7BAD\u5934"],"drag-move-2":["arrow","\u62D6\u62FD","\u79FB\u52A8","\u7BAD\u5934"],focus:["aim","target","\u7126\u70B9","\u805A\u7126","\u76EE\u6807","\u9776\u5FC3"],"focus-2":["aim","target","bullseye","\u7126\u70B9","\u805A\u7126","\u76EE\u6807","\u9776\u5FC3"],"focus-3":["aim","target","bullseye","\u7126\u70B9","\u805A\u7126","\u76EE\u6807","\u9776\u5FC3"],paint:["\u586B\u8272","\u586B\u5145","\u6CB9\u6F06\u6876"],palette:["\u8C03\u8272\u76D8","\u8272\u677F"],pantone:["\u8272\u677F","\u6F58\u901A\u8272","\u8272\u53F7"],shape:["border","\u5F62\u72B6","\u63CF\u8FB9","\u8FB9\u6846"],"shape-2":["border","\u5F62\u72B6","\u63CF\u8FB9","\u8FB9\u6846"],magic:["fantasy","magic stick","beautify","\u9B54\u6CD5\u68D2","\u7F8E\u5316","\u5E7B\u60F3","\u9B54\u5E7B"],anticlockwise:["rotate","left","\u5DE6\u7FFB\u8F6C","\u5DE6\u65CB\u8F6C"],"anticlockwise-2":["rotate","left","\u5DE6\u7FFB\u8F6C","\u5DE6\u65CB\u8F6C"],clockwise:["rotate","right","\u53F3\u7FFB\u8F6C","\u53F3\u65CB\u8F6C"],"clockwise-2":["rotate","right","\u53F3\u7FFB\u8F6C","\u53F3\u65CB\u8F6C"],hammer:["\u9524\u5B50"],tools:["settings","\u5DE5\u5177","\u8BBE\u7F6E"],"drag-drop":["drag and drop","mouse","\u62D6\u62FD","\u9F20\u6807"],table:["\u8868\u683C"],"table-alt":["\u8868\u683C"],layout:["\u5E03\u5C40"],"layout-2":["collage","\u5E03\u5C40","\u62FC\u8D34\u753B"],"layout-3":["collage","\u5E03\u5C40","\u62FC\u8D34\u753B"],"layout-4":["collage","\u5E03\u5C40","\u62FC\u8D34\u753B"],"layout-5":["collage","\u5E03\u5C40","\u62FC\u8D34\u753B"],"layout-6":["collage","\u5E03\u5C40","\u62FC\u8D34\u753B"],"layout-column":["\u5DE6\u53F3\u5E03\u5C40"],"layout-row":["\u4E0A\u4E0B\u5E03\u5C40"],"layout-top":["\u9876\u90E8\u5E03\u5C40","\u9876\u90E8\u5BFC\u822A"],"layout-right":["\u53F3\u4FA7\u5E03\u5C40","\u53F3\u4FA7\u5BFC\u822A"],"layout-bottom":["\u5E95\u90E8\u5E03\u5C40","\u5E95\u90E8\u5BFC\u822A"],"layout-left":["\u5DE6\u4FA7\u5E03\u5C40","\u5DE6\u4FA7\u5BFC\u822A"],"layout-top-2":["\u9876\u90E8\u5E03\u5C40","\u9876\u90E8\u5BFC\u822A"],"layout-right-2":["\u53F3\u4FA7\u5E03\u5C40","\u53F3\u4FA7\u5BFC\u822A"],"layout-bottom-2":["\u5E95\u90E8\u5E03\u5C40","\u5E95\u90E8\u5BFC\u822A"],"layout-left-2":["\u5DE6\u4FA7\u5E03\u5C40","\u5DE6\u4FA7\u5BFC\u822A"],"layout-grid":["\u5361\u7247\u5E03\u5C40","\u7F51\u683C"],"layout-masonry":["collage","\u7011\u5E03\u6D41\u5E03\u5C40","\u62FC\u8D34\u753B"],collage:["\u7011\u5E03\u6D41\u5E03\u5C40","\u62FC\u8D34\u753B"],grid:["table","\u7F51\u683C","\u8868\u683C"]},Development:{bug:["\u866B\u5B50"],"bug-2":["\u866B\u5B50"],code:["\u4EE3\u7801","\u7F16\u7A0B"],"code-s":["\u4EE3\u7801","\u7F16\u7A0B"],"code-s-slash":["\u4EE3\u7801","\u7F16\u7A0B"],"code-box":["\u4EE3\u7801","\u7F16\u7A0B"],"terminal-box":["code","command line","\u7EC8\u7AEF","\u4EE3\u7801","\u547D\u4EE4\u884C"],terminal:["code","command line","\u7EC8\u7AEF","\u4EE3\u7801","\u547D\u4EE4\u884C"],"terminal-window":["code","command line","\u7EC8\u7AEF","\u4EE3\u7801","\u547D\u4EE4\u884C"],parentheses:["code","math","\u5C0F\u62EC\u53F7"],brackets:["code","math","\u4E2D\u62EC\u53F7"],braces:["code","math","\u5927\u62EC\u53F7","\u82B1\u62EC\u53F7"],command:["apple key","\u82B1\u952E","\u82F9\u679C\u952E"],cursor:["mouse","\u6307\u9488","\u9F20\u6807"],"git-commit":["node","\u63D0\u4EA4"],"git-pull-request":["\u5408\u5E76\u7533\u8BF7"],"git-merge":["\u5408\u5E76"],"git-branch":["\u5206\u652F"],"git-repository":["\u4ED3\u5E93"],"git-repository-commits":["\u4ED3\u5E93","\u63D0\u4EA4"],"git-repository-private":["\u79C1\u5BC6\u4ED3\u5E93","\u79C1\u4EBA\u4ED3\u5E93"],html5:["html","h5"],css3:["css"]},Device:{tv:["\u7535\u89C6"],"tv-2":["monitor","\u7535\u89C6","\u663E\u793A\u5668"],computer:["monitor","\u7535\u8111","\u663E\u793A\u5668"],mac:["monitor","\u663E\u793A\u5668"],macbook:["laptop","\u7B14\u8BB0\u672C"],cellphone:["\u624B\u673A","\u7535\u8BDD"],smartphone:["mobile","\u624B\u673A"],tablet:["\u5E73\u677F\u7535\u8111"],device:["\u8BBE\u5907"],phone:["\u7535\u8BDD"],database:["storage","\u6570\u636E\u5E93","\u5B58\u50A8"],"database-2":["storage","\u6570\u636E\u5E93","\u5B58\u50A8"],server:["\u670D\u52A1\u5668"],"hard-drive":["disc","storage","\u786C\u76D8","\u5B58\u50A8"],"hard-drive-2":["disc","server","storage","\u786C\u76D8","\u670D\u52A1\u5668","\u5B58\u50A8"],install:["\u5B89\u88C5"],uninstall:["\u5378\u8F7D"],save:["floppy","\u4FDD\u5B58","\u8F6F\u76D8"],"save-2":["floppy","\u4FDD\u5B58","\u8F6F\u76D8"],"save-3":["floppy","\u4FDD\u5B58","\u8F6F\u76D8"],"sd-card":["\u5185\u5B58\u5361"],"sd-card-mini":["\u5185\u5B58\u5361"],"sim-card":["\u7535\u8BDD\u5361"],"sim-card-2":["\u7535\u8BDD\u5361"],"dual-sim-1":["sim card","\u7535\u8BDD\u5361","\u5361\u69FD","\u53CC\u5361\u53CC\u5F85"],"dual-sim-2":["sim card","\u7535\u8BDD\u5361","\u5361\u69FD","\u53CC\u5361\u53CC\u5F85"],"u-disk":["U\u76D8","\u4F18\u76D8"],battery:["\u7535\u6C60"],"battery-charge":["\u7535\u6C60","\u5145\u7535"],"battery-low":["\u7535\u6C60","\u4F4E\u7535\u91CF"],"battery-2":["\u7535\u6C60"],"battery-2-charge":["\u7535\u6C60","\u5145\u7535"],"battery-saver":["\u7535\u6C60","\u7701\u7535\u6A21\u5F0F"],"battery-share":["\u7535\u6C60\u5171\u4EAB","\u5171\u4EAB\u7535\u91CF"],cast:["mirroring","\u6295\u5C4F","\u65E0\u7EBF","\u5E7F\u64AD"],airplay:["mirroring","\u6295\u5C4F","\u65E0\u7EBF"],cpu:["\u4E2D\u592E\u5904\u7406\u5668"],gradienter:["\u6C34\u5E73\u4EEA"],keyboard:["input","\u952E\u76D8","\u8F93\u5165"],"keyboard-box":["input","\u952E\u76D8","\u8F93\u5165"],mouse:["\u9F20\u6807"],sensor:["capacitor","\u4F20\u611F\u5668","\u7535\u5BB9\u5668"],router:["wifi","signal tower","radio","station","\u8DEF\u7531\u5668","\u4FE1\u53F7\u5854","\u5E7F\u64AD","\u57FA\u7AD9","\u6D41\u91CF"],radar:["satellite receiver","\u96F7\u8FBE","\u536B\u661F\u63A5\u6536\u5668","\u9505"],gamepad:["consoles","controller","\u6E38\u620F\u624B\u67C4"],"remote-control":["controller","\u9065\u63A7\u5668"],"remote-control-2":["controller","\u9065\u63A7\u5668"],"device-recover":["\u6062\u590D\u51FA\u5382\u8BBE\u7F6E"],hotspot:["\u624B\u673A\u70ED\u70B9"],"phone-find":["\u627E\u56DE\u624B\u673A"],"phone-lock":["\u9501\u5B9A\u624B\u673A"],"rotate-lock":["\u9501\u5B9A\u65CB\u8F6C\u5C4F\u5E55"],restart:["reload","refresh","\u91CD\u542F"],"shut-down":["power off","\u5173\u673A"],fingerprint:["\u6307\u7EB9"],"fingerprint-2":["\u6307\u7EB9"],barcode:["scan","\u626B\u7801","\u6761\u5F62\u7801","\u6761\u7801"],"barcode-box":["scan","\u626B\u7801","\u6761\u5F62\u7801","\u6761\u7801"],"qr-code":["\u4E8C\u7EF4\u7801"],"qr-scan":["\u4E8C\u7EF4\u7801","\u626B\u63CF"],"qr-scan-2":["\u4E8C\u7EF4\u7801","\u626B\u63CF"],scan:["\u626B\u63CF"],"scan-2":["\u626B\u63CF"],rss:["feed","subscribe","\u8BA2\u9605"],gps:["signal","\u5B9A\u4F4D","\u4FE1\u53F7"],"base-station":["wifi","signal tower","router","cast","\u57FA\u7AD9","\u4FE1\u53F7\u5854","\u8DEF\u7531\u5668","\u5E7F\u64AD","\u6D41\u91CF"],bluetooth:["wireless","\u84DD\u7259","\u65E0\u7EBF"],"bluetooth-connect":["wireless","\u84DD\u7259","\u8FDE\u63A5","\u65E0\u7EBF"],wifi:["\u65E0\u7EBF\u7F51"],"wifi-off":["slash","offline","connection-fail","\u65E0\u7EBF\u7F51","\u5173\u95ED","\u65AD\u7F51","\u94FE\u63A5\u5931\u8D25"],"signal-wifi":["cellular","strength","\u65E0\u7EBF\u7F51","\u4FE1\u53F7"],"signal-wifi-1":["cellular","strength","\u65E0\u7EBF\u7F51","\u4FE1\u53F7"],"signal-wifi-2":["cellular","strength","\u65E0\u7EBF\u7F51","\u4FE1\u53F7"],"signal-wifi-3":["cellular","strength","\u65E0\u7EBF\u7F51","\u4FE1\u53F7"],"signal-wifi-error":["cellular","offline","connection-fail","\u65E0\u7EBF\u7F51","\u65AD\u7F51","\u94FE\u63A5\u5931\u8D25","\u65E0\u4FE1\u53F7"],"signal-wifi-off":["cellular","slash","offline","connection-fail","\u65E0\u7EBF\u7F51","\u5173\u95ED","\u65AD\u7F51","\u94FE\u63A5\u5931\u8D25"],"wireless-charging":["power","flash","\u65E0\u7EBF\u5145\u7535","\u95EA\u5145"],"dashboard-2":["\u4EEA\u8868\u76D8"],"dashboard-3":["\u4EEA\u8868\u76D8"],usb:["\u4F18\u76D8"]},Document:{file:["new","paper","\u6587\u4EF6","\u6587\u6863","\u65B0\u5EFA"],"file-2":["new","paper","\u6587\u4EF6","\u6587\u6863","\u65B0\u5EFA"],"file-3":["new","paper","\u6587\u4EF6","\u6587\u6863","\u65B0\u5EFA"],"file-4":["new","paper","\u6587\u4EF6","\u6587\u6863","\u65B0\u5EFA"],"sticky-note":["new","paper","\u6587\u4EF6","\u6587\u6863","\u65B0\u5EFA","\u4FBF\u7B7E\u7EB8","\u4FBF\u5229\u8D34"],"sticky-note-2":["new","paper","\u6587\u4EF6","\u6587\u6863","\u65B0\u5EFA","\u4FBF\u7B7E\u7EB8","\u4FBF\u5229\u8D34"],"file-edit":["\u6587\u4EF6","\u6587\u6863","\u7F16\u8F91"],draft:["\u8349\u7A3F\u7BB1","\u6587\u4EF6","\u6587\u6863","\u7F16\u8F91"],"file-paper":["\u6587\u4EF6","\u6587\u6863","\u7EB8","\u8C31"],"file-paper-2":["\u6587\u4EF6","\u6587\u6863","\u7EB8","\u8C31"],"file-text":["\u6587\u4EF6","\u6587\u6863","\u6587\u672C"],"file-list":["\u6E05\u5355","\u5217\u8868"],"file-list-2":["\u6E05\u5355","\u5217\u8868"],"file-list-3":["newspaper","\u6E05\u5355","\u5217\u8868","\u62A5\u7EB8"],bill:["\u8D26\u5355"],"file-copy":["duplicate","clone","\u590D\u5236","\u514B\u9686"],"file-copy-2":["duplicate","clone","\u590D\u5236","\u514B\u9686"],clipboard:["copy","\u590D\u5236","\u526A\u5207\u677F"],survey:["research","questionnaire","\u8C03\u67E5","\u95EE\u5377","\u8C03\u7814"],article:["newspaper","\u6587\u7AE0","\u62A5\u7EB8"],newspaper:["\u62A5\u7EB8"],"file-zip":["7z","rar","\u538B\u7F29\u5305"],"file-mark":["\u6587\u4EF6","\u6587\u6863","\u6807\u8BB0"],task:["todo","\u4EFB\u52A1","\u5F85\u529E"],todo:["\u5F85\u529E"],book:["read","dictionary","booklet","\u4E66","\u9605\u8BFB","\u5B57\u5178","\u5C0F\u518C\u5B50"],"book-mark":["read","dictionary","booklet","\u4E66","\u9605\u8BFB","\u5B57\u5178","\u5C0F\u518C\u5B50","\u4E66\u7B7E"],"book-2":["read","dictionary","booklet","\u4E66","\u9605\u8BFB","\u5B57\u5178","\u5C0F\u518C\u5B50"],"book-3":["read","dictionary","booklet","\u4E66","\u9605\u8BFB","\u5B57\u5178","\u5C0F\u518C\u5B50"],"book-open":["read","booklet","magazine","\u4E66","\u9605\u8BFB","\u5C0F\u518C\u5B50","\u6742\u5FD7"],"book-read":["booklet","magazine","\u4E66","\u9605\u8BFB","\u5C0F\u518C\u5B50","\u6742\u5FD7"],"contacts-book":["\u901A\u8BAF\u5F55","\u8054\u7CFB\u4EBA"],"contacts-book-2":["\u901A\u8BAF\u5F55","\u8054\u7CFB\u4EBA"],"contacts-book-upload":["upload","\u901A\u8BAF\u5F55","\u8054\u7CFB\u4EBA","\u4E0A\u4F20"],booklet:["notebook","\u624B\u518C","\u7B14\u8BB0\u672C","\u5C0F\u518C\u5B50"],"file-code":["config","\u6587\u4EF6","\u6587\u6863","\u4EE3\u7801","\u811A\u672C","\u914D\u7F6E\u6587\u4EF6"],"file-pdf":["\u6587\u4EF6","\u6587\u6863"],"file-word":["\u6587\u6863"],"file-ppt":["\u6587\u4EF6","\u6587\u6863"],"file-excel":["\u6587\u6863","\u8868\u5355"],"file-word-2":["\u6587\u6863"],"file-ppt-2":["\u6587\u4EF6","\u6587\u6863"],"file-excel-2":["\u6587\u6863","\u8868\u5355"],"file-hwp":["\u6587\u4EF6","\u6587\u6863","hangul word processor"],keynote:["\u6F14\u793A\u6587\u7A3F","\u5E7B\u706F\u7247","\u8BB2\u6F14"],numbers:["\u8868\u683C"],pages:["\u6587\u7A3F"],"file-search":["\u6587\u4EF6","\u6587\u6863","\u641C\u7D22"],"file-add":["new","\u6587\u4EF6","\u6587\u6863","\u65B0\u5EFA"],"file-reduce":["\u6587\u4EF6","\u6587\u6863","\u51CF"],"file-settings":["\u6587\u4EF6","\u6587\u6863","\u8BBE\u7F6E"],"file-upload":["\u6587\u4EF6","\u6587\u6863","\u4E0A\u4F20"],"file-transfer":["\u6587\u4EF6","\u6587\u6863","\u4F20\u8F93"],"file-download":["\u6587\u4EF6","\u6587\u6863","\u4E0B\u8F7D"],"file-lock":["\u6587\u4EF6","\u6587\u6863","\u9501"],"file-chart":["report","\u6587\u4EF6","\u6587\u6863","\u67F1\u72B6\u56FE","\u62A5\u8868"],"file-chart-2":["report","\u6587\u4EF6","\u6587\u6863","\u997C\u56FE","\u62A5\u8868"],"file-music":["\u6587\u4EF6","\u6587\u6863","\u97F3\u4E50"],"file-gif":["\u6587\u4EF6","\u6587\u6863","\u52A8\u56FE"],"file-forbid":["\u6587\u4EF6","\u6587\u6863","\u7981\u7528"],"file-info":["\u6587\u4EF6","\u6587\u6863","\u4FE1\u606F"],"file-warning":["alert","\u6587\u4EF6","\u6587\u6863","\u8B66\u544A","\u63D0\u9192"],"file-unknow":["\u6587\u4EF6","\u6587\u6863","\u672A\u77E5","\u95EE\u53F7"],"file-user":["\u6587\u4EF6","\u6587\u6863","\u7528\u6237"],"file-shield":["protected","secured","\u6587\u4EF6","\u6587\u6863","\u76FE\u724C","\u4FDD\u62A4","\u5B89\u5168"],"file-shield-2":["protected","secured","\u6587\u4EF6","\u6587\u6863","\u76FE\u724C","\u4FDD\u62A4","\u5B89\u5168"],"file-damage":["breakdown","broken","\u6587\u4EF6","\u6587\u6863","\u635F\u574F","\u7834\u635F","\u7834\u88C2"],"file-history":["record","\u6587\u4EF6","\u6587\u6863","\u8BB0\u5F55","\u5386\u53F2"],"file-shred":["shredder","shred","destroy","cut","\u6587\u6863","\u9500\u6BC1","\u788E\u7EB8\u673A","\u7834\u88C2","\u7C89\u788E"],"file-cloud":["\u6587\u4EF6","\u6587\u6863","\u4E91"],folder:["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863"],"folder-2":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863"],"folder-3":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863"],"folder-4":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863"],"folder-5":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863"],folders:["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u6279\u91CF"],"folder-add":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u6DFB\u52A0"],"folder-reduce":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u51CF"],"folder-settings":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u8BBE\u7F6E"],"folder-upload":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u4E0A\u4F20"],"folder-transfer":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u4F20\u8F93"],"folder-download":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u4E0B\u8F7D"],"folder-lock":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u9501"],"folder-chart":["report","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u67F1\u72B6\u56FE","\u62A5\u8868"],"folder-chart-2":["report","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u997C\u56FE","\u62A5\u8868"],"folder-music":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u97F3\u4E50"],"folder-forbid":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u7981\u7528"],"folder-info":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u4FE1\u606F"],"folder-warning":["alert","directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u8B66\u544A","\u63D0\u9192"],"folder-unknow":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u672A\u77E5"],"folder-user":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u7528\u6237"],"folder-shield":["directory","file","protected","secured","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u4FDD\u62A4","\u76FE\u724C","\u5B89\u5168"],"folder-shield-2":["directory","file","protected","secured","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u4FDD\u62A4","\u76FE\u724C","\u5B89\u5168"],"folder-shared":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u5206\u4EAB"],"folder-received":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u63A5\u6536"],"folder-open":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u6253\u5F00"],"folder-keyhole":["directory","encryption","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u6253\u5F00","\u52A0\u5BC6\u6587\u6863"],"folder-zip":["directory","file","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u6253\u5F00","\u538B\u7F29"],"folder-history":["directory","file","record","\u6587\u4EF6\u5939","\u76EE\u5F55","\u6587\u6863","\u8BB0\u5F55","\u5386\u53F2"],markdown:["arrow","\u7BAD\u5934","\u4E0B"]},Editor:{bold:["\u52A0\u7C97"],italic:["\u659C\u4F53"],heading:["\u6807\u9898"],text:["\u5B57\u4F53"],"font-color":["\u6587\u5B57\u8272"],"font-size":["\u5B57\u53F7","\u5B57\u4F53\u5927\u5C0F"],"font-size-2":["\u5B57\u53F7","\u5B57\u4F53\u5927\u5C0F"],underline:["\u4E0B\u5212\u7EBF"],emphasis:["\u7740\u91CD\u53F7"],"emphasis-cn":["\u7740\u91CD\u53F7"],strikethrough:["remove formatting","\u5220\u9664\u7EBF"],"strikethrough-2":["remove formatting","\u5220\u9664\u7EBF"],"format-clear":["remove formatting","\u6E05\u9664\u683C\u5F0F"],"align-left":["\u5DE6\u5BF9\u9F50"],"align-center":["\u5C45\u4E2D\u5BF9\u9F50"],"align-right":["\u53F3\u5BF9\u9F50"],"align-justify":["\u6392\u5217\u5BF9\u9F50"],"align-top":["\u9876\u90E8\u5BF9\u9F50"],"align-vertically":["\u5782\u76F4\u5BF9\u9F50"],"align-bottom":["\u5E95\u90E8\u5BF9\u9F50"],"list-check":["check list","\u6E05\u5355\u5217\u8868"],"list-check-2":["check list","\u6E05\u5355\u5217\u8868"],"list-ordered":["number list","\u6709\u5E8F\u5217\u8868"],"list-unordered":["bullet list","\u65E0\u5E8F\u5217\u8868"],"indent-decrease":["indent more","\u7F29\u8FDB"],"indent-increase":["indent less","\u7F29\u8FDB"],"line-height":["\u884C\u9AD8"],"text-spacing":["\u5B57\u95F4\u8DDD"],"text-wrap":["\u6587\u672C\u6362\u884C"],"attachment-2":["annex","paperclip","\u9644\u4EF6","\u66F2\u522B\u9488"],link:["connection","address","\u8054\u7CFB","\u94FE\u63A5","\u5730\u5740"],"link-unlink":["connection","remove address","\u53BB\u9664\u94FE\u63A5"],"link-m":["connection","address","\u8054\u7CFB","\u94FE\u63A5","\u5730\u5740"],"link-unlink-m":["connection","remove address","\u53BB\u9664\u94FE\u63A5"],separator:["\u5206\u5272\u7EBF"],space:["\u7A7A\u683C"],"page-separator":["insert","\u5206\u9875\u7B26","\u63D2\u5165"],"code-view":["\u4EE3\u7801\u89C6\u56FE"],"double-quotes-l":["left","quotation marks","\u53CC\u5F15\u53F7"],"double-quotes-r":["right","quotation marks","\u53CC\u5F15\u53F7"],"single-quotes-l":["left","quotation marks","\u5355\u5F15\u53F7"],"single-quotes-r":["right","quotation marks","\u5355\u5F15\u53F7"],"table-2":["\u8868\u683C"],subscript:["\u89D2\u6807","\u4E0B\u6807","\u811A\u6CE8"],"subscript-2":["\u89D2\u6807","\u4E0B\u6807","\u811A\u6CE8"],superscript:["\u89D2\u6807","\u4E0A\u6807"],"superscript-2":["\u89D2\u6807","\u4E0A\u6807"],paragraph:["\u6BB5\u843D"],"text-direction-l":["\u6587\u672C\u5DE6\u5BF9\u9F50"],"text-direction-r":["\u6587\u672C\u5DE6\u5BF9\u9F50"],functions:["\u529F\u80FD"],omega:["\u03A9","\u7279\u6B8A\u7B26\u53F7"],hashtag:["#","\u4E95\u53F7"],asterisk:["*","\u661F\u53F7"],"question-mark":["\u95EE\u53F7"],translate:["translator","\u7FFB\u8BD1"],"translate-2":["translator","\u7FFB\u8BD1"],"a-b":["a/b testing","ab testing","ab\u6D4B\u8BD5"],"english-input":["\u82F1\u6587\u8F93\u5165\u6CD5"],"pinyin-input":["\u62FC\u97F3\u8F93\u5165\u6CD5"],"wubi-input":["\u4E94\u7B14\u8F93\u5165\u6CD5"],"input-cursor-move":["\u79FB\u52A8\u8F93\u5165\u5149\u6807"],"number-1":["1","\u4E00","\u6570\u5B57"],"number-2":["2","\u4E8C","\u6570\u5B57"],"number-3":["3","\u4E09","\u6570\u5B57"],"number-4":["4","\u56DB","\u6570\u5B57"],"number-5":["5","\u4E94","\u6570\u5B57"],"number-6":["6","\u516D","\u6570\u5B57"],"number-7":["7","\u4E03","\u6570\u5B57"],"number-8":["8","\u516B","\u6570\u5B57"],"number-9":["9","\u4E5D","\u6570\u5B57"],"number-0":["0","\u96F6","\u6570\u5B57"],"sort-asc":["ranking","ordering","sorting","ascending","descending","\u5347\u5E8F\u6392\u5217","\u6392\u5E8F"],"sort-desc":["ranking","ordering","\u964D\u5E8F\u6392\u5217","\u6392\u5E8F"],"bring-forward":["arrange","\u5C42\u7EA7","\u5411\u4E0A\u4E00\u5C42"],"send-backward":["arrange","\u5C42\u7EA7","\u5411\u4E0B\u4E00\u5C42"],"bring-to-front":["arrange","\u5C42\u7EA7","\u79FB\u5230\u6700\u524D\u9762"],"send-to-back":["arrange","\u5C42\u7EA7","\u79FB\u5230\u6700\u540E\u9762"],"h-1":["heading","\u4E00\u7EA7\u6807\u9898"],"h-2":["heading","\u4E00\u7EA7\u6807\u9898"],"h-3":["heading","\u4E00\u7EA7\u6807\u9898"],"h-4":["heading","\u4E00\u7EA7\u6807\u9898"],"h-5":["heading","\u4E00\u7EA7\u6807\u9898"],"h-6":["heading","\u4E00\u7EA7\u6807\u9898"],"insert-column-left":["\u6DFB\u52A0\u5217","\u5DE6\u4FA7"],"insert-column-right":["\u6DFB\u52A0\u5217","\u53F3\u4FA7"],"insert-row-top":["\u6DFB\u52A0\u884C","\u9876\u90E8"],"insert-row-bottom":["\u6DFB\u52A0\u884C","\u5E95\u90E8"],"delete-column":["\u5220\u9664\u5217","\u5E95\u90E8"],"delete-row":["\u6DFB\u52A0\u884C","\u5E95\u90E8"],"merge-cells-horizontal":["\u5408\u5E76\u5355\u5143\u683C"],"merge-cells-vertical":["\u5408\u5E76\u5355\u5143\u683C"],"split-cells-horizontal":["\u62C6\u5206\u5355\u5143\u683C"],"split-cells-vertical":["\u62C6\u5206\u5355\u5143\u683C"],"flow-chart":["\u6D41\u7A0B\u56FE"],"mind-map":["mindmap","\u8111\u56FE","\u601D\u7EF4\u5BFC\u56FE"],"node-tree":["\u8282\u70B9","\u5C42\u7EA7\u5173\u7CFB\u56FE"],"organization-chart":["\u7EC4\u7EC7\u67B6\u6784\u56FE","\u5C40\u57DF\u7F51"],"rounded-corner":["\u5706\u89D2"]},Finance:{wallet:["\u94B1\u5305","\u5361\u5305"],"wallet-2":["\u94B1\u5305","\u5361\u5305"],"wallet-3":["\u94B1\u5305","\u5361\u5305"],"bank-card":["credit","purchase","payment","cc","\u94F6\u884C\u5361","\u4FE1\u7528\u5361","\u8D2D\u4E70","\u6D88\u8D39","\u652F\u4ED8"],"bank-card-2":["credit","purchase","payment","cc","\u94F6\u884C\u5361","\u4FE1\u7528\u5361","\u8D2D\u4E70","\u6D88\u8D39","\u652F\u4ED8"],"secure-payment":["credit","purchase","payment","cc","\u94F6\u884C\u5361","\u4FE1\u7528\u5361","\u8D2D\u4E70","\u6D88\u8D39","\u652F\u4ED8","\u5B89\u5168"],refund:["credit card","repayment","cc","\u94F6\u884C\u5361","\u4FE1\u7528\u5361\u8FD8\u6B3E"],"refund-2":["credit card","repayment","cc","\u94F6\u884C\u5361","\u4FE1\u7528\u5361\u8FD8\u6B3E"],safe:["\u4FDD\u9669\u67DC","\u4FDD\u9669\u7BB1"],"safe-2":["\u4FDD\u9669\u67DC","\u4FDD\u9669\u7BB1"],"price-tag":["label","\u6807\u7B7E","\u4EF7\u7B7E"],"price-tag-2":["label","\u6807\u7B7E","\u4EF7\u7B7E"],"price-tag-3":["label","\u6807\u7B7E","\u4EF7\u7B7E"],ticket:["coupon","\u7968","\u4F18\u60E0\u5238","\u4EE3\u91D1\u5238"],"ticket-2":["coupon","\u7968","\u4F18\u60E0\u5238","\u4EE3\u91D1\u5238"],coupon:["ticket","\u7968","\u4F18\u60E0\u5238","\u4EE3\u91D1\u5238"],"coupon-2":["ticket","\u7968","\u4F18\u60E0\u5238","\u4EE3\u91D1\u5238"],"coupon-3":["ticket","\u7968","\u4F18\u60E0\u5238","\u4EE3\u91D1\u5238"],"coupon-4":["\u4F18\u60E0\u5238","\u4EE3\u91D1\u5238"],"coupon-5":["\u4F18\u60E0\u5238","\u4EE3\u91D1\u5238"],"shopping-bag":["purse","\u8D2D\u7269\u888B","\u8D2D\u4E70","\u6D88\u8D39","\u5546\u57CE"],"shopping-bag-2":["\u8D2D\u7269\u888B","\u8D2D\u4E70","\u6D88\u8D39","\u5546\u57CE"],"shopping-bag-3":["\u8D2D\u7269\u888B","\u8D2D\u4E70","\u6D88\u8D39","\u5546\u57CE"],"shopping-basket":["\u8D2D\u7269\u7BEE","\u8D2D\u4E70","\u6D88\u8D39","\u5546\u57CE"],"shopping-basket-2":["\u8D2D\u7269\u7BEE","\u8D2D\u4E70","\u6D88\u8D39","\u5546\u57CE"],"shopping-cart":["\u8D2D\u7269\u8F66","\u8D2D\u4E70","\u6D88\u8D39","\u5546\u57CE"],"shopping-cart-2":["\u8D2D\u7269\u8F66","\u8D2D\u4E70","\u6D88\u8D39","\u5546\u57CE"],vip:["\u4F1A\u5458"],"vip-crown":["king","queen","\u7687\u51A0","\u4F1A\u5458","\u56FD\u738B","\u5973\u738B","\u738B\u540E"],"vip-crown-2":["king","queen","\u7687\u51A0","\u4F1A\u5458","\u56FD\u738B","\u5973\u738B","\u738B\u540E"],"vip-diamond":["\u94BB\u77F3","\u4F1A\u5458"],trophy:["\u5956\u54C1","\u5956\u676F","\u91D1\u676F"],exchange:["swap","\u4EA4\u6362","\u6362\u7B97","\u5151\u6362"],"exchange-box":["swap","\u4EA4\u6362","\u6362\u7B97","\u5151\u6362"],swap:["exchange","\u4EA4\u6362","\u6362\u7B97","\u5151\u6362"],"swap-box":["exchange","\u4EA4\u6362","\u6362\u7B97","\u5151\u6362"],"exchange-dollar":["swap","transfer","\u4EA4\u6362","\u6362\u7B97","\u5151\u6362","\u7F8E\u5143","\u8F6C\u8D26"],"exchange-cny":["swap","transfer","\u4EA4\u6362","\u6362\u7B97","\u5151\u6362","\u4EBA\u6C11\u5E01","\u8F6C\u8D26"],"exchange-funds":["swap","transfer","\u4EA4\u6362","\u6362\u7B97","\u5151\u6362","\u57FA\u91D1","\u80A1\u7968","\u8F6C\u8D26"],"increase-decrease":["\u8BA1\u7B97\u5668"],percent:["\u767E\u5206\u4E4B","\u767E\u5206\u6BD4"],"copper-coin":["currency","payment","\u94DC\u5E01","\u786C\u5E01","\u8D27\u5E01","\u94B1","\u652F\u4ED8"],"copper-diamond":["currency","coins","\u91D1\u5E01","\u94BB\u77F3","\u8D27\u5E01","\u94B1","\u652F\u4ED8"],"money-cny-box":["currency","payment","\u8D27\u5E01","\u94B1","\u652F\u4ED8","\u4EBA\u6C11\u5E01"],"money-cny-circle":["currency","coins","\u91D1\u5E01","payment","\u8D27\u5E01","\u94B1","\u652F\u4ED8","\u4EBA\u6C11\u5E01"],"money-dollar-box":["currency","payment","\u8D27\u5E01","\u94B1","\u652F\u4ED8","\u7F8E\u5143"],"money-dollar-circle":["currency","coins","\u91D1\u5E01","payment","cent","penny","\u8D27\u5E01","\u94B1","\u652F\u4ED8","\u7F8E\u5143","\u7F8E\u5206","\u4FBF\u58EB"],"money-euro-box":["currency","payment","\u8D27\u5E01","\u94B1","\u652F\u4ED8","\u6B27\u5143"],"money-euro-circle":["currency","coins","\u91D1\u5E01","payment","\u8D27\u5E01","\u94B1","\u652F\u4ED8","\u6B27\u5143"],"money-pound-box":["currency","payment","\u8D27\u5E01","\u94B1","\u652F\u4ED8","\u82F1\u9551"],"money-pound-circle":["currency","coins","\u91D1\u5E01","payment","\u8D27\u5E01","\u94B1","\u652F\u4ED8","\u82F1\u9551"],"bit-coin":["currency","payment","\u8D27\u5E01","\u94B1","\u6BD4\u7279\u5E01"],coin:["\u91D1\u5E01","\u786C\u5E01"],coins:["\u91D1\u5E01","\u786C\u5E01"],currency:["cash","payment","\u8D27\u5E01","\u94B1"],funds:["foundation","stock","\u57FA\u91D1","\u80A1\u7968"],"funds-box":["foundation","stock","\u57FA\u91D1","\u80A1\u7968"],"red-packet":["\u7EA2\u5305"],"water-flash":["\u6C34\u7535\u8D39"],stock:["\u80A1\u7968"],auction:["hammer","\u62CD\u5356","\u9524\u5B50"],gift:["present","\u793C\u7269"],"gift-2":["present","\u793C\u7269"],"hand-coin":["donate","business","\u6350\u8D60"],"hand-heart":["help","donate","volunteer","welfare","\u5E2E\u52A9","\u7231\u5FC3","\u6350\u8D60","\u5FD7\u613F\u8005","\u516C\u76CA"],"24-hours":["last","24\u5C0F\u65F6\u8425\u4E1A"]},"Health & Medical":{heart:["like","love","favorite","\u5FC3","\u559C\u6B22","\u7231","\u6536\u85CF"],"heart-2":["like","love","favorite","\u5FC3","\u559C\u6B22","\u7231","\u6536\u85CF"],"heart-3":["like","love","favorite","\u5FC3","\u559C\u6B22","\u7231","\u6536\u85CF"],"heart-add":["like","love","favorite","\u5FC3","\u559C\u6B22","\u7231","\u6536\u85CF"],dislike:["like","love","remove favorite","\u5FC3","\u4E0D\u559C\u6B22","\u53D6\u6D88\u6536\u85CF"],hearts:["romance","\u7231\u60C5","\u6D6A\u6F2B","\u5FC3"],"heart-pulse":["heart rate","\u8109\u640F","\u5FC3\u7387"],pulse:["wave","heart rate","\u8109\u640F","\u5FC3\u7387","\u6CE2"],empathize:["care","heart","\u540C\u7406\u5FC3","\u5173\u7231","\u5FC3"],nurse:["doctors","\u533B\u751F","\u62A4\u58EB"],dossier:["\u75C5\u4F8B"],"health-book":["\u5065\u5EB7\u624B\u518C","\u533B\u7597\u624B\u518C"],"first-aid-kit":["case","\u6025\u6551\u7BB1"],capsule:["medicine"," \u80F6\u56CA","\u836F"],"medicine-bottle":["\u836F\u74F6"],flask:["testing","experimental","experiment","\u70E7\u74F6","\u5B9E\u9A8C","\u8BD5\u9A8C"],"test-tube":["testing","experimental","experiment","\u8BD5\u7BA1","\u5B9E\u9A8C","\u8BD5\u9A8C"],microscope:["testing","experimental","experiment","\u663E\u5FAE\u955C","\u5B9E\u9A8C","\u8BD5\u9A8C"],"hand-sanitizer":["alcohol","\u9152\u7CBE\u6D88\u6BD2\u6D17\u624B\u6DB2"],"mental-health":["\u5FC3\u7406\u5065\u5EB7"],psychotherapy:["\u5FC3\u7406\u6CBB\u7597"],stethoscope:["\u542C\u8BCA\u5668"],syringe:["\u6CE8\u5C04\u5668"],thermometer:["\u4F53\u6E29\u8BA1"],"infrared-thermometer":["\u7EA2\u5916\u7EBF\u4F53\u6E29\u8BA1","\u4F53\u6E29\u67AA"],"surgical-mask":["\u5916\u79D1\u533B\u7528\u53E3\u7F69"],virus:["\u75C5\u6BD2"],lungs:["\u80BA\u90E8"],"rest-time":["close","\u4F11\u606F\u65F6\u95F4","\u6253\u70CA"],zzz:["\u7761\u89C9"]},Logos:{alipay:["zhifubao","\u652F\u4ED8\u5B9D"],amazon:["\u4E9A\u9A6C\u900A"],android:["applications","\u5B89\u5353","\u5E94\u7528"],angularjs:["angular","programming framework"],"app-store":["applications","\u82F9\u679C\u5E94\u7528\u5546\u5E97"],apple:["\u82F9\u679C"],baidu:["du","claw","\u767E\u5EA6","\u722A"],behance:["behance"],bilibili:["\u54D4\u54E9\u54D4\u54E9"],centos:["linux","system","\u7CFB\u7EDF"],chrome:["\u8C37\u6B4C\u6D4F\u89C8\u5668"],codepen:["\u4EE3\u7801\u7B14"],coreos:["linux","system","\u7CFB\u7EDF"],dingding:["\u9489\u9489"],discord:["game","chat"],disqus:["comments"],douban:["\u8C46\u74E3"],dribbble:["\u8FFD\u6CE2"],drive:["google drive","\u8C37\u6B4C\u4E91\u7AEF\u786C\u76D8"],dropbox:["\u591A\u5B9D\u7BB1"],edge:["microsoft edge","edge\u6D4F\u89C8\u5668"],evernote:["\u5370\u8C61\u7B14\u8BB0"],facebook:["\u8138\u4E66"],"facebook-circle":["\u8138\u4E66"],"facebook-box":["\u8138\u4E66"],finder:["macintosh","\u4EFF\u8FBE"],firefox:["\u706B\u72D0\u6D4F\u89C8\u5668"],flutter:["google"],gatsby:["gatsby"],github:["github"],gitlab:["gitlab"],google:["\u8C37\u6B4C"],"google-play":["applications","\u8C37\u6B4C\u5E94\u7528\u5546\u5E97"],"honor-of-kings":["game","\u738B\u8005\u8363\u8000"],ie:["internet explorer","\u6D4F\u89C8\u5668"],instagram:["\u7167\u7247\u5899"],invision:["invision"],"kakao-talk":["kakao talk","chat"],line:["\u8FDE\u6211"],linkedin:["\u9886\u82F1"],"linkedin-box":["\u9886\u82F1"],mastercard:["bank card","\u94F6\u884C\u5361"],mastodon:["mastodon","\u957F\u6BDB\u8C61"],medium:["\u5A92\u4F53"],messenger:["facebook","\u8138\u4E66","\u4FE1\u4F7F"],microsoft:["windows","\u7A97\u6237","\u5FAE\u8F6F"],"mini-program":["\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F"],"netease-cloud-music":["netease cloud music","\u7F51\u6613\u4E91\u97F3\u4E50"],netflix:["\u7F51\u98DE"],npmjs:["npm","nodejs"],"open-source":["opensource","\u5F00\u6E90"],opera:["\u6B27\u670B\u6D4F\u89C8\u5668"],patreon:["donate","money","\u6350\u8D60","\u6253\u8D4F"],paypal:["\u8D1D\u5B9D"],pinterest:["\u62FC\u8DA3"],pixelfed:["photography","pixelfed"],playstation:["ps"],"product-hunt":["product hunt"],qq:["penguin","tencent","\u817E\u8BAF","\u4F01\u9E45"],reactjs:["react","programming framework","facebook"],reddit:["reddit"],remixicon:["remix icon","\u56FE\u6807"],safari:["safari\u6D4F\u89C8\u5668"],skype:["skype"],slack:["slack"],snapchat:["ghost","\u8272\u62C9\u5E03","\u5E7D\u7075"],soundcloud:["\u58F0\u4E91"],spectrum:["spectrum"],spotify:["music","\u97F3\u4E50"],"stack-overflow":["stack overflow"],stackshare:["share","\u5206\u4EAB","\u6280\u672F\u6808"],steam:["game","store"],switch:["nintendo","\u4EFB\u5929\u5802"],taobao:["\u6DD8\u5B9D"],telegram:["telegram"],trello:["trello"],tumblr:["\u6C64\u535A\u4E50"],twitch:["twitch"],twitter:["\u63A8\u7279"],ubuntu:["linux","system","\u7CFB\u7EDF"],unsplash:["photos"],vimeo:["\u89C6\u9891"],visa:["bank card","\u94F6\u884C\u5361"],vuejs:["vue","programming framework"],wechat:["\u5FAE\u4FE1"],"wechat-2":["\u5FAE\u4FE1"],"wechat-pay":["\u5FAE\u4FE1\u652F\u4ED8"],weibo:["\u65B0\u6D6A\u5FAE\u535A"],whatsapp:["\u74E6\u6B21\u827E\u666E"],windows:["microsoft","\u7A97\u6237","\u5FAE\u8F6F"],xbox:["xbox"],xing:["xing"],youtube:["\u4F18\u5154","\u6CB9\u7BA1"],zcool:["zcool","\u7AD9\u9177"],zhihu:["\u77E5\u4E4E"]},Map:{"map-pin":["location","navigation","\u5730\u56FE","\u5750\u6807","\u5B9A\u4F4D","\u5BFC\u822A","\u4F4D\u7F6E"],"map-pin-2":["location","navigation","\u5730\u56FE","\u5750\u6807","\u5B9A\u4F4D","\u5BFC\u822A","\u4F4D\u7F6E"],"map-pin-3":["location","navigation","\u5730\u56FE","\u5750\u6807","\u5B9A\u4F4D","\u5BFC\u822A","\u4F4D\u7F6E"],"map-pin-4":["location","navigation","\u5730\u56FE","\u5750\u6807","\u5B9A\u4F4D","\u5BFC\u822A","\u4F4D\u7F6E"],"map-pin-5":["location","navigation","\u5730\u56FE","\u5750\u6807","\u5B9A\u4F4D","\u5BFC\u822A","\u4F4D\u7F6E"],"map-pin-add":["location","navigation","\u5730\u56FE","\u5750\u6807","\u5B9A\u4F4D","\u5BFC\u822A","\u4F4D\u7F6E","\u65B0\u589E","\u6DFB\u52A0"],"map-pin-range":["location","navigation","\u5730\u56FE","\u5750\u6807","\u5B9A\u4F4D","\u5BFC\u822A","\u4F4D\u7F6E","\u8303\u56F4"],"map-pin-time":["location","navigation","\u5730\u56FE","\u5750\u6807","\u5B9A\u4F4D","\u5BFC\u822A","\u4F4D\u7F6E","\u65F6\u95F4"],"map-pin-user":["location","navigation","\u5730\u56FE","\u5750\u6807","\u5B9A\u4F4D","\u5BFC\u822A","\u4F4D\u7F6E","\u7528\u6237"],"pin-distance":["\u5750\u6807","\u8DDD\u79BB"],pushpin:["\u56FE\u9489"],"pushpin-2":["\u56FE\u9489"],compass:["navigation","safari","direction","discover","\u6307\u5357\u9488","\u5BFC\u822A","\u65B9\u5411","\u53D1\u73B0","\u63A2\u7D22"],"compass-2":["navigation","direction","discover","\u6307\u5357\u9488","\u5BFC\u822A","\u65B9\u5411","\u53D1\u73B0","\u63A2\u7D22"],"compass-3":["navigation","safari","direction","discover","\u6307\u5357\u9488","\u5BFC\u822A","\u65B9\u5411","\u53D1\u73B0","\u63A2\u7D22"],"compass-4":["navigation","direction","discover","\u6307\u5357\u9488","\u5BFC\u822A","\u65B9\u5411","\u53D1\u73B0","\u63A2\u7D22"],"compass-discover":["navigation","direction","\u6307\u5357\u9488","\u5BFC\u822A","\u65B9\u5411","\u53D1\u73B0","\u63A2\u7D22"],anchor:["\u951A"],"china-railway":["\u4E2D\u94C1","\u94C1\u8DEF","\u706B\u8F66"],"space-ship":["\u592A\u7A7A\u98DE\u8239"],rocket:["\u706B\u7BAD"],"rocket-2":["space ship","\u706B\u7BAD","\u592A\u7A7A\u98DE\u8239"],map:["navigation","travel","\u5730\u56FE","\u5BFC\u822A","\u65C5\u884C"],"map-2":["location","navigation","travel","\u5730\u56FE","\u5B9A\u4F4D","\u5BFC\u822A","\u65C5\u884C"],"treasure-map":["thriller","adventure","\u5730\u56FE","\u85CF\u5B9D\u56FE"],"road-map":["navigation","travel","\u5730\u56FE","\u5BFC\u822A","\u65C5\u884C"],earth:["global","union","world","language","\u5730\u7403","\u5168\u7403","\u8054\u5408","\u4E16\u754C","\u8BED\u8A00"],globe:["earth","\u5730\u7403\u4EEA"],parking:["\u505C\u8F66\u573A"],"parking-box":["\u505C\u8F66\u573A"],route:["path","\u8DEF\u7EBF"],guide:["path","\u6307\u5F15","\u8DEF\u7EBF"],"gas-station":["\u52A0\u6C14\u7AD9","\u52A0\u6CB9\u7AD9"],"charging-pile":["\u5145\u7535\u6869"],"charging-pile-2":["\u5145\u7535\u6869"],car:["\u6C7D\u8F66"],"car-washing":["\u6C7D\u8F66","\u6D17\u8F66"],roadster:["car","\u6C7D\u8F66","\u8DD1\u8F66"],taxi:["car","\u51FA\u79DF\u8F66","\u6C7D\u8F66"],"taxi-wifi":["car","\u51FA\u79DF\u8F66","\u6C7D\u8F66"],"police-car":["\u6C7D\u8F66","\u8B66\u8F66"],bus:["\u5927\u5DF4","\u5DF4\u58EB"],"bus-2":["\u5927\u5DF4","\u5DF4\u58EB"],"bus-wifi":["\u5927\u5DF4","\u5DF4\u58EB"],truck:["van","delivery","\u5361\u8F66","\u8D27\u8F66","\u8FD0\u8F93"],train:["\u706B\u8F66"],"train-wifi":["\u706B\u8F66"],subway:["\u5730\u94C1"],"subway-wifi":["\u5730\u94C1"],"flight-takeoff":["airplane","plane","origin","\u8D77\u98DE","\u51FA\u53D1","\u59CB\u53D1","\u8D77\u70B9","\u98DE\u673A"],"flight-land":["airplane","plane","destination","\u7740\u9646","\u5230\u8FBE","\u62B5\u8FBE","\u7EC8\u70B9","\u98DE\u673A"],plane:["fight","\u98DE\u673A","\u822A\u73ED"],sailboat:["\u5E06\u8239"],ship:["\u8F6E\u8239","\u822A\u6D77","\u6D77\u8FD0"],"ship-2":["\u8F6E\u8239"],bike:["\u81EA\u884C\u8F66"],"e-bike":["take out","takeaway","\u7535\u52A8\u8F66","\u5916\u5356"],"e-bike-2":["take out","takeaway","\u7535\u52A8\u8F66","\u5916\u5356"],takeaway:["take out","takeaway","\u7535\u52A8\u8F66","\u5916\u5356"],motorbike:["\u6469\u6258\u8F66"],caravan:["\u623F\u8F66"],walk:["\u6B65\u884C"],run:["\u5954\u8DD1","\u8DD1\u6B65"],riding:["bike","\u9A91\u884C","\u81EA\u884C\u8F66"],barricade:["\u8DEF\u969C"],footprint:["\u811A\u5370","\u8DB3\u8FF9"],"traffic-light":["\u4EA4\u901A","\u4FE1\u53F7\u706F"],"signal-tower":["base station","antenna","\u4FE1\u53F7\u5854","\u57FA\u7AD9","\u5929\u7EBF"],restaurant:["\u9910\u5385","\u996D\u5E97"],"restaurant-2":["\u9910\u5385","\u996D\u5E97"],cup:["tea","coffee","\u676F\u5B50","\u5496\u5561","\u8336"],goblet:["cup","wine glass","\u9AD8\u811A\u676F","\u9152\u676F"],"hotel-bed":["\u9152\u5E97","\u5E8A"],navigation:["gps","\u5BFC\u822A"],oil:["\u6C7D\u6CB9","\u673A\u6CB9"],direction:["right","\u65B9\u5411","\u53F3\u8F6C"],steering:["drive","\u65B9\u5411\u76D8","\u9A7E\u8F66"],"steering-2":["drive","\u65B9\u5411\u76D8","\u9A7E\u8F66"],lifebuoy:["life ring","\u6551\u751F\u5708"],passport:["passports","\u62A4\u7167"],suitcase:["travel","\u65C5\u884C","\u884C\u674E\u7BB1"],"suitcase-2":["travel","\u65C5\u884C","\u884C\u674E\u7BB1","\u62C9\u6746\u7BB1"],"suitcase-3":["travel","\u65C5\u884C","boarding case","\u884C\u674E\u7BB1","\u62C9\u6746\u7BB1","\u767B\u673A\u7BB1"],"luggage-deposit":["consignment","\u884C\u674E\u7BB1","\u884C\u674E\u5BC4\u5B58","\u6258\u8FD0"],"luggage-cart":["\u884C\u674E\u8F66"]},Media:{image:["picture","photo","\u56FE\u7247","\u7167\u7247"],"image-2":["picture","photo","\u56FE\u7247","\u7167\u7247"],"image-add":["picture","photo","\u56FE\u7247","\u7167\u7247","\u6DFB\u52A0"],"image-edit":["picture","photo","\u56FE\u7247","\u7167\u7247","\u7F16\u8F91"],landscape:["picture","image","photo","\u56FE\u7247","\u7167\u7247"],gallery:["picture","image","\u56FE\u7247","\u76F8\u518C"],"gallery-upload":["picture","image","\u56FE\u7247","\u76F8\u518C","\u4E0A\u4F20"],video:["\u89C6\u9891"],movie:["film","video","\u7535\u5F71","\u786C\u76D8","\u89C6\u9891"],"movie-2":["film","video","\u7535\u5F71","\u786C\u76D8","\u89C6\u9891"],film:["movie","video","\u5F71\u7247","\u7535\u5F71","\u89C6\u9891"],clapperboard:["movie","film","\u573A\u8BB0\u677F","\u7535\u5F71"],vidicon:["video","camera","\u6444\u50CF\u673A","\u6444\u5F71\u673A","\u89C6\u9891"],"vidicon-2":["camera","\u6444\u50CF\u673A","\u6444\u5F71\u673A"],live:["video","camera","\u6444\u50CF\u673A","\u6444\u5F71\u673A","\u89C6\u9891","\u76F4\u64AD"],"video-add":["camera","\u6444\u50CF\u673A","\u6444\u5F71\u673A","\u89C6\u9891","\u6DFB\u52A0"],"video-upload":["camera","\u6444\u50CF\u673A","\u6444\u5F71\u673A","\u89C6\u9891","\u4E0A\u4F20"],"video-download":["camera","\u6444\u50CF\u673A","\u6444\u5F71\u673A","\u89C6\u9891","\u4E0B\u8F7D"],dv:["vidicon","camera","\u6444\u50CF\u673A","\u6444\u5F71\u673A"],camera:["photo","\u7167\u76F8\u673A","\u62CD\u7167","\u7167\u7247"],"camera-off":["photo","slash","\u7167\u76F8\u673A","\u62CD\u7167","\u7167\u7247","\u7981\u6B62","\u5173\u95ED"],"camera-2":["photo","\u7167\u76F8\u673A","\u62CD\u7167","\u7167\u7247"],"camera-3":["photo","\u7167\u76F8\u673A","\u62CD\u7167","\u7167\u7247"],"camera-lens":["aperture","photo","\u7167\u76F8\u673A","\u62CD\u7167","\u7167\u7247","\u670B\u53CB\u5708"],"camera-switch":["\u7167\u76F8\u673A","\u62CD\u7167","\u7FFB\u8F6C"],polaroid:["camera","\u76F8\u673A","\u5B9D\u4E3D\u6765"],"polaroid-2":["camera","\u76F8\u673A","\u5B9D\u4E3D\u6765"],"phone-camera":["\u624B\u673A\u76F8\u673A","\u624B\u673A\u6444\u50CF\u5934"],webcam:["\u6444\u50CF\u5934"],mv:["music video","\u97F3\u4E50"],music:["\u97F3\u4E50"],"music-2":["\u97F3\u4E50"],disc:["music","album","\u97F3\u4E50","\u5531\u7247"],album:["music","\u5531\u7247","\u97F3\u4E50"],dvd:["cd","dvd","record","\u5149\u76D8","\u523B\u5F55"],headphone:["music","headset","\u8033\u673A","\u97F3\u4E50"],radio:["\u6536\u97F3\u673A","\u7535\u53F0"],"radio-2":["\u6536\u97F3\u673A","\u7535\u53F0"],tape:["\u5F55\u97F3","\u78C1\u5E26"],mic:["record","voice","\u8BDD\u7B52","\u8BED\u97F3","\u5F55\u97F3","\u58F0\u97F3"],"mic-2":["record","voice","\u8BDD\u7B52","\u8BED\u97F3","\u5F55\u97F3","\u58F0\u97F3"],"mic-off":["record","voice","slash","\u5173\u95ED\u8BDD\u7B52","\u5173\u95ED\u8BED\u97F3","\u5F55\u97F3","\u5173\u95ED\u58F0\u97F3","\u9759\u97F3","\u7981\u6B62"],"volume-down":["trumpet","sound","speaker","\u97F3\u91CF\u4F4E","\u5587\u53ED","\u58F0\u97F3","\u626C\u58F0\u5668"],"volume-mute":["trumpet","sound","off","\u97F3\u91CF\u4F4E","\u5587\u53ED","\u58F0\u97F3","\u9759\u97F3"],"volume-up":["trumpet","sound","speaker","\u97F3\u91CF\u9AD8","\u5587\u53ED","\u58F0\u97F3","\u626C\u58F0\u5668"],"volume-vibrate":["trumpet","sound","speaker","\u5587\u53ED","\u58F0\u97F3","\u626C\u58F0\u5668","\u9707\u52A8\u6A21\u5F0F"],"volume-off-vibrate":["trumpet","sound","speaker","\u9759\u97F3","\u5587\u53ED","\u58F0\u97F3","\u626C\u58F0\u5668","\u9759\u97F3\u6A21\u5F0F"],speaker:["\u97F3\u54CD"],"speaker-2":["\u97F3\u54CD"],"speaker-3":["\u97F3\u54CD"],"surround-sound":["\u73AF\u7ED5\u7ACB\u4F53\u58F0"],broadcast:["\u5E7F\u64AD"],notification:["bell","alarm","\u901A\u77E5","\u94C3\u94DB","\u63D0\u9192"],"notification-2":["bell","alarm","\u901A\u77E5","\u94C3\u94DB","\u63D0\u9192"],"notification-3":["bell","alarm","\u901A\u77E5","\u94C3\u94DB","\u63D0\u9192"],"notification-4":["bell","alarm","\u901A\u77E5","\u94C3\u94DB","\u63D0\u9192"],"notification-off":["bell","alarm","silent","slash","\u901A\u77E5","\u94C3\u94DB","\u63D0\u9192","\u514D\u6253\u6270","\u9759\u97F3","\u5173\u95ED","\u7981\u6B62"],"play-circle":["start","\u64AD\u653E","\u5F00\u59CB"],"pause-circle":["\u6682\u505C"],"record-circle":["\u5F55\u97F3"],"stop-circle":["\u505C\u6B62"],eject:["\u63A8\u51FA"],play:["start","\u64AD\u653E","\u5F00\u59CB"],pause:["\u6682\u505C"],stop:["\u505C\u6B62"],rewind:["fast","\u5FEB\u9000"],speed:["fast","\u5FEB\u8FDB"],"skip-back":["\u4E0A\u4E00\u66F2"],"skip-forward":["\u4E0B\u4E00\u66F2"],"play-mini":["\u64AD\u653E"],"pause-mini":["\u6682\u505C"],"stop-mini":["\u505C\u6B62"],"rewind-mini":["fast","\u5FEB\u9000"],"speed-mini":["fast","\u5FEB\u8FDB"],"skip-back-mini":["\u4E0A\u4E00\u66F2"],"skip-forward-mini":["\u4E0B\u4E00\u66F2"],repeat:["\u5FAA\u73AF\u64AD\u653E"],"repeat-2":["\u5FAA\u73AF\u64AD\u653E"],"repeat-one":["\u5355\u66F2\u5FAA\u73AF"],"order-play":["\u987A\u5E8F\u64AD\u653E"],shuffle:["\u968F\u673A\u64AD\u653E"],"play-list":["\u64AD\u653E\u5217\u8868"],"play-list-2":["\u64AD\u653E\u5217\u8868"],"play-list-add":["\u5217\u8868","\u6DFB\u52A0"],fullscreen:["maximize","\u5168\u5C4F","\u6700\u5927\u5316"],"fullscreen-exit":["minimize","\u9000\u51FA\u5168\u5C4F","\u6700\u5C0F\u5316"],equalizer:["sliders","controls","settings","filter","\u5747\u8861\u5668","\u63A7\u5236\u5668","\u8BBE\u7F6E","\u7B5B\u9009"],"sound-module":["sliders","controls","settings","filter","\u5747\u8861\u5668","\u63A7\u5236\u5668","\u8BBE\u7F6E","\u7B5B\u9009"],rhythm:["\u8282\u594F","\u97F5\u5F8B"],voiceprint:["\u58F0\u7EB9"],hq:["high quality","\u9AD8\u8D28\u91CF","\u9AD8\u54C1\u8D28"],hd:["high definition","\u9AD8\u6E05\u6670\u5EA6"],"4k":["high definition","high quality","\u9AD8\u6E05\u6670\u5EA6","\u9AD8\u54C1\u8D28","\u8D85\u6E05"],"closed-captioning":["\u9690\u85CF\u5B57\u5E55"],"aspect-ratio":["\u5BBD\u9AD8\u6BD4","\u6BD4\u4F8B"],"picture-in-picture":["\u753B\u4E2D\u753B","\u5C0F\u7A97"],"picture-in-picture-2":["\u753B\u4E2D\u753B","\u5C0F\u7A97"],"picture-in-picture-exit":["\u9000\u51FA\u753B\u4E2D\u753B","\u9000\u51FA\u5C0F\u7A97"]},System:{apps:["\u5E94\u7528"],"apps-2":["\u5E94\u7528"],function:["layout","\u529F\u80FD","\u5E94\u7528","\u5361\u7247\u5E03\u5C40"],dashboard:["\u4EEA\u8868\u76D8"],menu:["navigation","hamburger","\u5BFC\u822A","\u83DC\u5355","\u6C49\u5821\u5305"],"menu-2":["navigation","hamburger","\u5BFC\u822A","\u83DC\u5355","\u6C49\u5821\u5305"],"menu-3":["navigation","hamburger","\u5BFC\u822A","\u83DC\u5355","\u6C49\u5821\u5305"],"menu-4":["navigation","hamburger","\u5BFC\u822A","\u83DC\u5355","\u6C49\u5821\u5305"],"menu-5":["navigation","hamburger","\u5BFC\u822A","\u83DC\u5355","\u6C49\u5821\u5305"],"menu-add":["navigation","hamburger","\u5BFC\u822A","\u83DC\u5355","\u6C49\u5821\u5305","\u6DFB\u52A0"],"menu-fold":["navigation","hamburger","\u5BFC\u822A","\u83DC\u5355","\u6C49\u5821\u5305","\u5C55\u5F00"],more:["ellipsis","\u66F4\u591A","\u7701\u7565"],"more-2":["ellipsis","\u66F4\u591A","\u7701\u7565"],star:["favorite","like","mark","\u661F\u661F","\u661F\u6807","\u559C\u6B22"],"star-s":["favorite","like","mark","\u661F\u661F","\u661F\u6807","\u559C\u6B22","\u534A\u661F"],"star-half":["favorite","like","mark","\u661F\u661F","\u661F\u6807","\u559C\u6B22"],"star-half-s":["favorite","like","mark","\u661F\u661F","\u661F\u6807","\u559C\u6B22","\u534A\u661F"],settings:["edit","gear","preferences","\u504F\u597D\u8BBE\u7F6E","\u7F16\u8F91","\u9F7F\u8F6E"],"settings-2":["edit","gear","preferences","\u504F\u597D\u8BBE\u7F6E","\u7F16\u8F91","\u9F7F\u8F6E"],"settings-3":["edit","gear","preferences","\u504F\u597D\u8BBE\u7F6E","\u7F16\u8F91","\u9F7F\u8F6E"],"settings-4":["edit","gear","preferences","\u504F\u597D\u8BBE\u7F6E","\u7F16\u8F91","\u9F7F\u8F6E"],"settings-5":["edit","gear","preferences","\u504F\u597D\u8BBE\u7F6E","\u7F16\u8F91","\u9F7F\u8F6E"],"settings-6":["edit","gear","preferences","\u504F\u597D\u8BBE\u7F6E","\u7F16\u8F91","\u9F7F\u8F6E"],"list-settings":["\u5217\u8868","\u8BBE\u7F6E"],forbid:["slash","ban","\u7981\u6B62","\u7981\u7528"],"forbid-2":["slash","ban","\u7981\u6B62","\u7981\u7528"],information:["\u4FE1\u606F"],"error-warning":["alert","\u8B66\u544A","\u9519\u8BEF"],question:["help","\u95EE\u53F7","\u5E2E\u52A9"],alert:["\u63D0\u9192","\u8B66\u544A"],spam:["alert","\u5783\u573E\u90AE\u4EF6","\u8B66\u544A"],"spam-2":["alert","\u5783\u573E\u90AE\u4EF6","\u8B66\u544A"],"spam-3":["alert","\u5783\u573E\u90AE\u4EF6","\u8B66\u544A"],"checkbox-blank":["\u590D\u9009\u6846","\u7A7A"],checkbox:["\u590D\u9009\u6846"],"checkbox-indeterminate":["\u590D\u9009\u6846"],"add-box":["plus","new","\u590D\u9009\u6846","\u6DFB\u52A0","\u52A0\u53F7","\u65B0\u589E"],"checkbox-blank-circle":["\u590D\u9009\u6846","\u7A7A"],"checkbox-circle":["\u590D\u9009\u6846"],"indeterminate-circle":["slash","ban","\u590D\u9009\u6846","\u7981"],"add-circle":["plus","new","\u590D\u9009\u6846","\u6DFB\u52A0","\u52A0\u53F7","\u65B0\u589E"],"close-circle":["cancel","remove","delete","empty","x","\u5173\u95ED","\u53D6\u6D88","\u79FB\u9664","\u5220\u9664","\u6E05\u7A7A"],"radio-button":["\u5355\u9009\u6846"],"checkbox-multiple-blank":["\u590D\u9009\u6846","\u7A7A"],"checkbox-multiple":["\u590D\u9009\u6846","\u7A7A"],check:["\u5BF9\u52FE"],"check-double":["read","done","double-tick","\u53CC\u5BF9\u52FE","\u5DF2\u8BFB"],close:["cancel","remove","delete","empty","x","\u5173\u95ED","\u53D6\u6D88","\u79FB\u9664","\u5220\u9664","\u6E05\u7A7A"],add:["plus","new","\u6DFB\u52A0","\u65B0\u589E","\u52A0\u53F7"],subtract:["\u51CF"],divide:["\u9664\u4EE5"],"arrow-left-up":["corner","\u5DE6\u4E0A"],"arrow-up":["\u7BAD\u5934","\u5411\u4E0A"],"arrow-right-up":["corner","\u53F3\u4E0A"],"arrow-right":["forward","\u7BAD\u5934","\u5411\u53F3"],"arrow-right-down":["corner","\u53F3\u4E0B"],"arrow-down":["\u7BAD\u5934","\u5411\u4E0B"],"arrow-left-down":["corner","\u7BAD\u5934","\u5DE6\u4E0B"],"arrow-left":["backward","\u7BAD\u5934","\u5411\u5DE6","\u8FD4\u56DE"],"arrow-up-circle":["\u7BAD\u5934","\u5411\u4E0A"],"arrow-right-circle":["forward","\u7BAD\u5934","\u5411\u53F3"],"arrow-down-circle":["\u7BAD\u5934","\u5411\u4E0B","\u4E0B\u8F7D"],"arrow-left-circle":["backward","\u7BAD\u5934","\u5411\u5DE6","\u8FD4\u56DE"],"arrow-up-s":["\u7BAD\u5934","\u5411\u4E0A"],"arrow-down-s":["\u7BAD\u5934","\u5411\u4E0B"],"arrow-right-s":["forward","\u7BAD\u5934","\u5411\u53F3"],"arrow-left-s":["backward","\u7BAD\u5934","\u5411\u5DE6","\u8FD4\u56DE"],"arrow-drop-up":["\u7BAD\u5934","\u5411\u4E0A"],"arrow-drop-right":["forward","\u7BAD\u5934","\u5411\u53F3"],"arrow-drop-down":["\u7BAD\u5934","\u5411\u4E0B"],"arrow-drop-left":["backward","\u7BAD\u5934","\u5411\u5DE6","\u8FD4\u56DE"],"arrow-left-right":["exchange","swap","\u7BAD\u5934","\u5DE6\u53F3","\u4EA4\u6362","\u6362\u7B97","\u5151\u6362"],"arrow-up-down":["exchange","swap","\u7BAD\u5934","\u4E0A\u4E0B","\u4EA4\u6362","\u6362\u7B97","\u5151\u6362"],"arrow-go-back":["undo","\u7BAD\u5934","\u8FD4\u56DE","\u64A4\u9500","\u64A4\u56DE"],"arrow-go-forward":["redo","\u7BAD\u5934","\u91CD\u505A","\u64A4\u56DE"],download:["\u4E0B\u8F7D"],upload:["\u4E0A\u4F20"],"download-2":["\u4E0B\u8F7D"],"upload-2":["\u4E0A\u4F20"],"download-cloud":["\u4E0B\u8F7D","\u4E91"],"download-cloud-2":["\u4E0B\u8F7D","\u4E91"],"upload-cloud":["\u4E0A\u4F20","\u4E91"],"upload-cloud-2":["\u4E0A\u4F20","\u4E91"],"login-box":["sign in","\u767B\u5F55"],"logout-box":["sign out","\u767B\u51FA","\u6CE8\u9500"],"logout-box-r":["sign out","\u767B\u51FA","\u6CE8\u9500"],"login-circle":["sign in","\u767B\u5F55"],"logout-circle":["sign out","\u767B\u51FA","\u6CE8\u9500"],"logout-circle-r":["sign out","\u767B\u51FA","\u6CE8\u9500"],refresh:["synchronization","reload","restart","spinner","loader","ajax","update","\u5237\u65B0","\u540C\u6B65"],shield:["safety","protect","\u76FE\u724C","\u536B\u58EB","\u5B89\u5168","\u9632\u5FA1"],"shield-cross":["safety","protect","\u76FE\u724C","\u536B\u58EB","\u5B89\u5168","\u9632\u5FA1","\u95EA\u7535"],"shield-flash":["safety","protect","\u76FE\u724C","\u536B\u58EB","\u5B89\u5168","\u9632\u5FA1"],"shield-star":["safety","protect","\u76FE\u724C","\u536B\u58EB","\u5B89\u5168","\u9632\u5FA1","\u661F\u661F"],"shield-user":["safety","protect","user protected","guarantor","\u76FE\u724C","\u536B\u58EB","\u5B89\u5168","\u9632\u5FA1","\u7528\u6237"],"shield-keyhole":["safety","protect","guarantor","\u76FE\u724C","\u536B\u58EB","\u5B89\u5168","\u9632\u5FA1","\u94A5\u5319\u5B54"],"shield-check":["safety","protect","\u76FE\u724C","\u536B\u58EB","\u5B89\u5168","\u9632\u5FA1"],"delete-back":["backspace","\u5220\u9664","\u9000\u683C"],"delete-back-2":["backspace","\u5220\u9664","\u9000\u683C"],"delete-bin":["trash","remove","ash-bin","garbage","dustbin","uninstall","\u5378\u8F7D","\u5220\u9664","\u5783\u573E\u6876"],"delete-bin-2":["trash","remove","ash-bin","garbage","dustbin","uninstall","\u5378\u8F7D","\u5220\u9664","\u5783\u573E\u6876"],"delete-bin-3":["trash","remove","ash-bin","garbage","dustbin","uninstall","\u5378\u8F7D","\u5220\u9664","\u5783\u573E\u6876"],"delete-bin-4":["trash","remove","ash-bin","garbage","dustbin","uninstall","\u5378\u8F7D","\u5220\u9664","\u5783\u573E\u6876"],"delete-bin-5":["trash","remove","ash-bin","garbage","dustbin","uninstall","\u5378\u8F7D","\u5220\u9664","\u5783\u573E\u6876"],"delete-bin-6":["trash","remove","ash-bin","garbage","dustbin","uninstall","\u5378\u8F7D","\u5220\u9664","\u5783\u573E\u6876"],"delete-bin-7":["trash","remove","ash-bin","garbage","dustbin","uninstall","\u5378\u8F7D","\u5220\u9664","\u5783\u573E\u6876"],lock:["security","password","\u9501\u5B50","\u5B89\u5168","\u5BC6\u7801"],"lock-2":["security","password","\u9501\u5B50","\u5B89\u5168","\u5BC6\u7801"],"lock-password":["security","\u9501\u5B50","\u5B89\u5168","\u5BC6\u7801"],"lock-unlock":["security","password","\u9501\u5B50","\u5B89\u5168","\u5BC6\u7801"],eye:["watch","view","\u773C\u775B","\u67E5\u770B"],"eye-off":["slash","\u773C\u775B","\u4E0D\u53EF\u89C1","\u5173\u95ED","\u7981\u6B62"],"eye-2":["watch","view","\u773C\u775B","\u67E5\u770B"],"eye-close":["x","\u95ED\u773C"],search:["\u641C\u7D22","\u653E\u5927\u955C"],"search-2":["\u641C\u7D22","\u653E\u5927\u955C"],"search-eye":["\u641C\u7D22","\u653E\u5927\u955C","\u773C\u775B"],"zoom-in":["\u653E\u5927","\u653E\u5927\u955C"],"zoom-out":["\u7F29\u5C0F","\u653E\u5927\u955C"],"find-replace":["\u67E5\u627E","\u641C\u7D22","\u66FF\u6362"],share:["\u5206\u4EAB","\u8F6C\u53D1"],"share-box":["\u5206\u4EAB","\u8F6C\u53D1"],"share-circle":["\u5206\u4EAB","\u8F6C\u53D1"],"share-forward":["\u5206\u4EAB","\u8F6C\u53D1"],"share-forward-2":["\u5206\u4EAB","\u8F6C\u53D1"],"share-forward-box":["\u5206\u4EAB","\u8F6C\u53D1"],"side-bar":["\u4FA7\u8FB9\u680F"],time:["clock","\u65F6\u95F4","\u65F6\u949F","\u949F\u8868"],timer:["chronograph","stopwatch","\u79D2\u8868","\u8BA1\u65F6\u5668"],"timer-2":["chronograph","stopwatch","\u79D2\u8868","\u8BA1\u65F6\u5668"],"timer-flash":["chronograph","stopwatch","\u79D2\u8868","\u8BA1\u65F6\u5668","\u95EA\u7535"],alarm:["\u95F9\u949F"],history:["record","recent","time machine","\u5386\u53F2\u8BB0\u5F55","\u6700\u8FD1"],"thumb-down":["dislike","bad","\u4E0D\u559C\u6B22","\u4E0D\u597D"],"thumb-up":["like","good","\u559C\u6B22","\u597D"],"alarm-warning":["alert","report","police light","\u544A\u8B66","\u4E3E\u62A5","\u8B66\u706F"],"notification-badge":["red dot","\u901A\u77E5","\u5C0F\u7EA2\u70B9"],toggle:["switch","\u5F00\u5173","\u89E6\u53D1\u5668"],filter:["filtration","\u7B5B\u9009","\u8FC7\u6EE4"],"filter-2":["filtration","\u7B5B\u9009","\u8FC7\u6EE4"],"filter-3":["filtration","\u7B5B\u9009","\u8FC7\u6EE4"],"filter-off":["filtration","clear-filter","\u7B5B\u9009","\u8FC7\u6EE4"],loader:["loader","spinner","ajax","waiting","delay","\u52A0\u8F7D\u4E2D","\u8F7D\u5165\u4E2D","\u6B63\u5728\u52A0\u8F7D"],"loader-2":["loader","spinner","ajax","waiting","delay","\u52A0\u8F7D\u4E2D","\u8F7D\u5165\u4E2D","\u6B63\u5728\u52A0\u8F7D"],"loader-3":["loader","spinner","ajax","waiting","delay","\u52A0\u8F7D\u4E2D","\u8F7D\u5165\u4E2D","\u6B63\u5728\u52A0\u8F7D"],"loader-4":["loader","spinner","ajax","waiting","delay","\u52A0\u8F7D\u4E2D","\u8F7D\u5165\u4E2D","\u6B63\u5728\u52A0\u8F7D"],"loader-5":["loader","spinner","ajax","waiting","delay","\u52A0\u8F7D\u4E2D","\u8F7D\u5165\u4E2D","\u6B63\u5728\u52A0\u8F7D"],"external-link":["\u5916\u94FE"]},"User & Faces":{user:["\u7528\u6237"],"user-2":["\u7528\u6237"],"user-3":["\u7528\u6237"],"user-4":["\u7528\u6237"],"user-5":["\u7528\u6237"],"user-6":["\u7528\u6237"],"user-smile":["\u7528\u6237","\u5FAE\u7B11"],"account-box":["\u7528\u6237","\u8D26\u6237"],"account-circle":["\u7528\u6237","\u8D26\u6237"],"account-pin-box":["\u7528\u6237","\u8D26\u6237"],"account-pin-circle":["\u7528\u6237","\u8D26\u6237"],"user-add":["\u7528\u6237","\u6DFB\u52A0","\u65B0\u589E"],"user-follow":["\u5173\u6CE8"],"user-unfollow":["\u7528\u6237","\u53D6\u6D88\u5173\u6CE8"],"user-shared":["transfer","\u7528\u6237","\u6211\u5206\u4EAB\u7684","\u53D1\u9001"],"user-shared-2":["transfer","\u7528\u6237","\u6211\u5206\u4EAB\u7684","\u53D1\u9001"],"user-received":["\u7528\u6237","\u6211\u63A5\u6536\u7684","\u6536\u53D6"],"user-received-2":["\u7528\u6237","\u6211\u63A5\u6536\u7684","\u6536\u53D6"],"user-location":["\u7528\u6237","\u5B9A\u4F4D"],"user-search":["\u7528\u6237","\u67E5\u627E"],"user-settings":["admin","\u7528\u6237","\u8BBE\u7F6E","\u7BA1\u7406\u5458"],"user-star":["\u7528\u6237","\u5173\u6CE8"],"user-heart":["\u7528\u6237","\u5173\u6CE8"],admin:["admin","\u7528\u6237","\u7BA1\u7406\u5458"],contacts:["\u8054\u7CFB\u4EBA"],group:["team","\u56E2\u961F","\u7FA4\u7EC4"],"group-2":["team","\u56E2\u961F","\u7FA4\u7EC4"],team:["\u56E2\u961F","\u5C0F\u7EC4","\u7FA4\u4E3B"],"user-voice":["\u7528\u6237","\u5F55\u97F3","\u6F14\u8BB2"],emotion:["\u8868\u60C5","\u7B11\u8138"],"emotion-2":["\u8868\u60C5","\u7B11\u8138"],"emotion-happy":["\u8868\u60C5","\u5F00\u5FC3"],"emotion-normal":["\u8868\u60C5","\u4E00\u822C"],"emotion-unhappy":["\u8868\u60C5","\u4E0D\u5F00\u5FC3"],"emotion-laugh":["comedy","happy","\u8868\u60C5","\u5927\u7B11","\u7B11\u8138","\u5F00\u5FC3","\u559C\u5267"],"emotion-sad":["drama","tears","\u60B2\u5267","\u54ED\u6CE3","\u6CEA"],skull:["ghost","\u9AB7\u9AC5","\u9B3C\u602A"],"skull-2":["ghost","horror","thriller","\u9AB7\u9AC5","\u9B3C\u602A","\u6050\u60E7","\u6050\u6016"],men:["gender","man","male","\u7537\u4EBA","\u7537\u6027"],women:["gender","woman","female","\u5973\u4EBA","\u5973\u6027"],travesti:["\u5973\u4EBA","\u5973\u6027"],genderless:["\u5973\u4EBA","\u5973\u6027"],"open-arm":["\u5F20\u5F00\u53CC\u81C2"],"body-scan":["gesture recognition","body","\u626B\u63CF\u8EAB\u4F53","\u4F53\u6001\u8BC6\u522B","\u52A8\u4F5C\u4E4B\u522B","\u624B\u52BF\u8BC6\u522B"],parent:["patriarch","\u7236\u6BCD","\u4EB2\u5B50","\u5BB6\u957F"],robot:["mechanic","\u673A\u5668\u4EBA"],aliens:["science fiction","ET","\u5916\u661F\u4EBA","\u79D1\u5E7B\u5C0F\u8BF4"],"bear-smile":["cartoon","anime","cartoon","\u5C0F\u718A","\u5FAE\u7B11","\u513F\u7AE5","\u52A8\u753B\u7247","\u5361\u901A","\u52A8\u6F2B"],mickey:["cartoon","disney","\u8FEA\u58EB\u5C3C","\u7C73\u8001\u9F20","\u5FAE\u7B11","\u513F\u7AE5","\u52A8\u753B\u7247"],criminal:["horror","thriller","\u7F6A\u72AF","\u72AF\u7F6A","\u6050\u6016"],ghost:["horror","thriller","\u9B3C\u602A","\u6050\u6016","\u6050\u60E7"],"ghost-2":["horror","\u9B3C\u602A","\u6050\u6016","\u6050\u60E7"],"ghost-smile":["\u9B3C\u602A","\u7B11"],"star-smile":["animation","\u52A8\u753B","\u5FAE\u7B11","\u661F\u661F"],spy:["incognito mode","detective","secret","\u95F4\u8C0D","\u4FA6\u63A2","\u65E0\u75D5\u6A21\u5F0F","\u9690\u79C1\u6A21\u5F0F"]},Weather:{sun:["light mode","sunny","\u592A\u9633","\u767D\u5929\u6A21\u5F0F","\u6674\u5929"],moon:["dark mode","night","\u6708\u4EAE","\u591C\u95F4\u6A21\u5F0F","\u6708\u7259"],flashlight:["\u95EA\u7535"],cloudy:["\u591A\u4E91"],"cloudy-2":["\u591A\u4E91"],mist:["\u96FE\u6C14","\u96FE\u973E"],foggy:["\u5927\u96FE"],"cloud-windy":["\u98CE"],windy:["\u5927\u98CE","\u522E\u98CE"],rainy:["\u4E0B\u96E8","\u96E8\u5929"],drizzle:["\u5C0F\u96E8"],showers:["\u4E2D\u96E8"],"heavy-showers":["\u5927\u96E8"],thunderstorms:["\u96F7\u66B4","\u96F7\u9635\u96E8"],hail:["\u51B0\u96F9"],snowy:["\u4E0B\u96EA","\u96EA\u5929"],"sun-cloudy":["\u6674\u8F6C\u591A\u4E91"],"moon-cloudy":["\u591C\u95F4\u591A\u4E91"],tornado:["\u9F99\u5377\u98CE"],typhoon:["cyclone","tornado","\u9F99\u5377\u98CE","\u65CB\u98CE","\u53F0\u98CE"],haze:["\u9634\u973E","\u8584\u96FE"],"haze-2":["\u9634\u973E","\u8584\u96FE"],"sun-foggy":["\u8584\u96FE"],"moon-foggy":["\u8584\u96FE"],"moon-clear":["\u591C\u95F4\u6A21\u5F0F","\u591C\u95F4\u65E0\u4E91"],"temp-hot":["temperature","\u6E29\u5EA6","\u9AD8\u6E29","\u70ED"],"temp-cold":["temperature","\u6E29\u5EA6","\u4F4E\u6E29","\u51B7"],celsius:["temperature","\u6E29\u5EA6","\u6444\u6C0F\u5EA6"],fahrenheit:["temperature","\u6E29\u5EA6","\u534E\u6C0F\u5EA6"],fire:["hot","\u706B","\u70ED\u95E8"],blaze:["\u706B\u707E"],earthquake:["\u5730\u9707"],flood:["\u6D2A\u6C34"],meteor:["\u6D41\u661F","\u9668\u77F3"],rainbow:["\u5F69\u8679"]},Others:{basketball:["sports","\u8FD0\u52A8","\u7BEE\u7403"],bell:["cartoon","anime","doraemon","\u94C3\u94DB","\u54C6\u5566A\u68A6","\u5361\u901A","\u52A8\u6F2B"],billiards:["sports","\u8FD0\u52A8","\u53F0\u7403","8"],boxing:["sports","\u8FD0\u52A8","\u62F3\u51FB"],cake:["anniversary","\u86CB\u7CD5"],"cake-2":["anniversary","\u86CB\u7CD5"],"cake-3":["\u86CB\u7CD5"],"door-lock":["\u95E8\u9501"],"door-lock-box":["\u95E8\u9501"],football:["sports","\u8FD0\u52A8","\u8DB3\u7403"],game:["pac man","\u6E38\u620F","\u5403\u8C46\u4EBA"],handbag:["fashion","\u65F6\u5C1A","\u624B\u63D0\u5305","\u5973\u5305"],key:["password","\u94A5\u5319","\u5BC6\u7801"],"key-2":["password","\u94A5\u5319","\u5BC6\u7801"],knife:["\u5200"],"knife-blood":["crime","\u5200","\u72AF\u7F6A","\u8840","\u6740\u4EBA"],lightbulb:["energy","creativity","\u706F\u6CE1","\u80FD\u6E90"],"lightbulb-flash":["energy","creativity","\u706F\u6CE1","\u80FD\u6E90","\u95EA\u7535"],outlet:["\u63D2\u5EA7"],"outlet-2":["\u63D2\u5EA7"],"ping-pong":["sports","table tennis","\u8FD0\u52A8","\u4E52\u4E53\u7403"],plug:["\u4E8C\u811A\u63D2\u5934"],"plug-2":["\u4E09\u811A\u63D2\u5934"],reserved:["\u5DF2\u9884\u5B9A"],shirt:["clothes","\u886C\u886B","\u8863\u670D"],sword:["war","\u5200\u5251","\u6218\u4E89","\u6218\u6597","\u7384\u5E7B"],"t-shirt":["skin","theme","T\u6064","\u76AE\u80A4","\u4E3B\u9898"],"t-shirt-2":["skin","theme","T\u6064","\u76AE\u80A4","\u4E3B\u9898"],"t-shirt-air":["dry","T\u6064","\u98CE\u5E72","\u70D8\u5E72"],umbrella:["protect","\u96E8\u4F1E","\u4FDD\u62A4"],"character-recognition":["ocr","\u6587\u5B57\u8BC6\u522B"],"voice-recognition":["asr","\u8BED\u97F3\u8BC6\u522B"],leaf:["energy","ecology","\u6811\u53F6","\u8282\u80FD","\u73AF\u4FDD","\u8BED\u97F3\u8BC6\u522B"],plant:["\u690D\u7269"],seedling:["\u6811\u82D7","\u690D\u7269"],recycle:["recyclable","\u53EF\u56DE\u6536"],scales:["balance","\u79F0","\u5929\u5E73","\u5929\u79E4"],"scales-2":["\u53A8\u623F\u79F0"],"scales-3":["balance","\u79F0","\u5929\u5E73","\u5929\u79E4"],fridge:["refrigerator","\u7535\u51B0\u7BB1"],wheelchair:["accessbility","\u8F6E\u6905","\u53EF\u8BBF\u95EE\u6027","\u8F85\u52A9\u529F\u80FD"],cactus:["desertr","\u4ED9\u4EBA\u638C","\u6C99\u6F20"],door:["\u95E8"],"door-open":["\u5F00\u95E8"],"door-closed":["\u5173\u95E8"]}};function dw(r,e,t){const n=r.slice();return n[29]=e[t],n}function mw(r,e,t){const n=r.slice();return n[32]=e[t],n[34]=t,n}function zne(r){let e;return{c(){e=H(r[8])},m(t,n){$(t,e,n)},p(t,n){n[0]&256&&Ie(e,t[8])},d(t){t&&b(e)}}}function qne(r){let e;return{c(){e=M("span"),e.textContent="-"},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function gw(r){let e,t=r[32]+"",n,i,s,l,o;function a(){return r[20](r[32])}let u=r[34]!==r[9].length-1&&qne();return{c(){e=M("span"),n=H(t),i=R(),u&&u.c(),s=Oe(),y(e,"class","letter svelte-vhpvzd"),oe(e,"letter-selected",r[32]===r[2])},m(f,c){$(f,e,c),P(e,n),$(f,i,c),u&&u.m(f,c),$(f,s,c),l||(o=Le(e,"click",a),l=!0)},p(f,c){r=f,c[0]&516&&oe(e,"letter-selected",r[32]===r[2])},d(f){f&&b(e),f&&b(i),u&&u.d(f),f&&b(s),l=!1,o()}}}function Une(r){let e;return{c(){e=H("Search")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Fne(r){let e,t,n=`There is no icons for this ${r[1]?"search":"page"}`,i;return{c(){e=M("div"),t=M("h5"),i=H(n),y(e,"class","no-icons svelte-vhpvzd")},m(s,l){$(s,e,l),P(e,t),P(t,i)},p(s,l){l[0]&2&&n!==(n=`There is no icons for this ${s[1]?"search":"page"}`)&&Ie(i,n)},d(s){s&&b(e)}}}function Vne(r){let e,t=!r[5]&&_w(r);return{c(){e=M("div"),t&&t.c(),y(e,"class","icon-area svelte-vhpvzd")},m(n,i){$(n,e,i),t&&t.m(e,null)},p(n,i){n[5]?t&&(t.d(1),t=null):t?t.p(n,i):(t=_w(n),t.c(),t.m(e,null))},d(n){n&&b(e),t&&t.d()}}}function _w(r){let e,t=r[7],n=[];for(let i=0;i<t.length;i+=1)n[i]=hw(dw(r,t,i));return{c(){for(let i=0;i<n.length;i+=1)n[i].c();e=Oe()},m(i,s){for(let l=0;l<n.length;l+=1)n[l].m(i,s);$(i,e,s)},p(i,s){if(s[0]&129){t=i[7];let l;for(l=0;l<t.length;l+=1){const o=dw(i,t,l);n[l]?n[l].p(o,s):(n[l]=hw(o),n[l].c(),n[l].m(e.parentNode,e))}for(;l<n.length;l+=1)n[l].d(1);n.length=t.length}},d(i){_t(n,i),i&&b(e)}}}function hw(r){let e,t,n,i,s,l,o=r[29]+"",a,u,f,c,p,d,g,h,v,C=r[29]+"",k,I,S,T,N;function D(){return r[24](r[29])}function G(){return r[25](r[29])}return{c(){e=M("div"),t=M("div"),n=M("i"),s=R(),l=M("div"),a=H(o),u=H("-fill"),f=R(),c=M("div"),p=M("div"),d=M("i"),h=R(),v=M("div"),k=H(C),I=H("-line"),S=R(),y(n,"class",i=""+(lr(`ri-${r[29]}-fill ri-xl`)+" svelte-vhpvzd")),y(t,"class","icon-preview svelte-vhpvzd"),y(l,"class","icon-label svelte-vhpvzd"),y(e,"class","icon-container svelte-vhpvzd"),oe(e,"selected",r[0]===`ri-${r[29]}-fill`),y(d,"class",g=""+(lr(`ri-${r[29]}-line ri-xl`)+" svelte-vhpvzd")),y(p,"class","icon-preview svelte-vhpvzd"),y(v,"class","icon-label svelte-vhpvzd"),y(c,"class","icon-container svelte-vhpvzd"),oe(c,"selected",r[0]===`ri-${r[29]}-line`)},m(j,B){$(j,e,B),P(e,t),P(t,n),P(e,s),P(e,l),P(l,a),P(l,u),$(j,f,B),$(j,c,B),P(c,p),P(p,d),P(c,h),P(c,v),P(v,k),P(v,I),P(c,S),T||(N=[Le(e,"click",D),Le(c,"click",G)],T=!0)},p(j,B){r=j,B[0]&128&&i!==(i=""+(lr(`ri-${r[29]}-fill ri-xl`)+" svelte-vhpvzd"))&&y(n,"class",i),B[0]&128&&o!==(o=r[29]+"")&&Ie(a,o),B[0]&129&&oe(e,"selected",r[0]===`ri-${r[29]}-fill`),B[0]&128&&g!==(g=""+(lr(`ri-${r[29]}-line ri-xl`)+" svelte-vhpvzd"))&&y(d,"class",g),B[0]&128&&C!==(C=r[29]+"")&&Ie(k,C),B[0]&129&&oe(c,"selected",r[0]===`ri-${r[29]}-line`)},d(j){j&&b(e),j&&b(f),j&&b(c),T=!1,En(N)}}}function Hne(r){let e,t,n,i,s,l,o,a,u,f,c,p,d,g,h,v,C,k,I,S,T,N,D,G=r[9],j=[];for(let W=0;W<G.length;W+=1)j[W]=gw(mw(r,G,W));function B(W){r[21](W)}let q={thin:!0,placeholder:"Search Icon"};r[1]!==void 0&&(q.value=r[1]),o=new et({props:q}),Z.push(()=>ce(o,"value",B)),f=new ut({props:{secondary:!0,$$slots:{default:[Une]},$$scope:{ctx:r}}}),f.$on("click",r[13]);function U(W,V){return W[7].length>0?Vne:Fne}let J=U(r),F=J(r);return{c(){e=M("div"),t=M("div"),n=M("div");for(let W=0;W<j.length;W+=1)j[W].c();i=R(),s=M("div"),l=M("div"),A(o.$$.fragment),u=R(),A(f.$$.fragment),c=R(),p=M("div"),d=M("div"),g=M("span"),g.innerHTML='<i class="page-btn ri-arrow-left-line ri-sm svelte-vhpvzd"></i>',h=R(),v=M("span"),C=H(r[6]),k=R(),I=M("span"),I.innerHTML='<i class="page-btn ri-arrow-right-line ri-sm svelte-vhpvzd"></i>',S=R(),F.c(),y(n,"class","alphabet-area svelte-vhpvzd"),y(l,"class","input-wrapper svelte-vhpvzd"),y(s,"class","search-input svelte-vhpvzd"),y(d,"class","pager"),y(p,"class","page-area svelte-vhpvzd"),y(t,"class","search-area svelte-vhpvzd"),y(e,"class","container svelte-vhpvzd")},m(W,V){$(W,e,V),P(e,t),P(t,n);for(let Q=0;Q<j.length;Q+=1)j[Q].m(n,null);P(t,i),P(t,s),P(s,l),E(o,l,null),P(s,u),E(f,s,null),P(t,c),P(t,p),P(p,d),P(d,g),P(d,h),P(d,v),P(v,C),P(d,k),P(d,I),P(e,S),F.m(e,null),T=!0,N||(D=[Le(g,"click",r[22]),Le(I,"click",r[23])],N=!0)},p(W,V){if(V[0]&1540){G=W[9];let re;for(re=0;re<G.length;re+=1){const x=mw(W,G,re);j[re]?j[re].p(x,V):(j[re]=gw(x),j[re].c(),j[re].m(n,null))}for(;re<j.length;re+=1)j[re].d(1);j.length=G.length}const Q={};!a&&V[0]&2&&(a=!0,Q.value=W[1],pe(()=>a=!1)),o.$set(Q);const me={};V[1]&16&&(me.$$scope={dirty:V,ctx:W}),f.$set(me),(!T||V[0]&64)&&Ie(C,W[6]),J===(J=U(W))&&F?F.p(W,V):(F.d(1),F=J(W),F&&(F.c(),F.m(e,null)))},i(W){T||(m(o.$$.fragment,W),m(f.$$.fragment,W),T=!0)},o(W){_(o.$$.fragment,W),_(f.$$.fragment,W),T=!1},d(W){W&&b(e),_t(j,W),O(o),O(f),F.d(),N=!1,En(D)}}}function Wne(r){let e,t,n,i,s;t=new Gt({props:{$$slots:{default:[zne]},$$scope:{ctx:r}}}),t.$on("click",function(){dt(r[4].show)&&r[4].show.apply(this,arguments)});let l={anchor:r[3],$$slots:{default:[Hne]},$$scope:{ctx:r}};return i=new kp({props:l}),r[26](i),i.$on("open",r[11]),{c(){e=M("div"),A(t.$$.fragment),n=R(),A(i.$$.fragment)},m(o,a){$(o,e,a),E(t,e,null),r[19](e),$(o,n,a),E(i,o,a),s=!0},p(o,a){r=o;const u={};a[0]&256|a[1]&16&&(u.$$scope={dirty:a,ctx:r}),t.$set(u);const f={};a[0]&8&&(f.anchor=r[3]),a[0]&231|a[1]&16&&(f.$$scope={dirty:a,ctx:r}),i.$set(f)},i(o){s||(m(t.$$.fragment,o),m(i.$$.fragment,o),s=!0)},o(o){_(t.$$.fragment,o),_(i.$$.fragment,o),s=!1},d(o){o&&b(e),O(t),r[19](null),o&&b(n),r[26](null),O(i,o)}}}const Gne=Object.keys(pw).reduce((r,e)=>[...r,...Object.keys(pw[e])],[]);function I1(r){const e=new RegExp(`^${r}`,"i");return Gne.filter(t=>e.test(t))}function Yne(r,e,t){let n,i,s,l,o;const a=mt();let{value:u=""}=e,{maxIconsPerPage:f=30}=e,c="",p="A",d=1,g=I1(p);const h=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];let v,C,k=!1;async function I(V){t(15,d=1),t(1,c=""),t(5,k=!0),t(2,p=V),t(16,g=I1(V)),await Ul(),t(5,k=!1)}async function S(){t(5,k=!0);const V=g.findIndex(Q=>Q.value===u);V!==-1&&t(15,d=Math.ceil(V/f)),await Ul(),t(5,k=!1)}async function T(){if(u){const V=n.substring(0,1);await I(V),await S()}}async function N(V){t(5,k=!0),V&&d<i?t(15,d++,d):!V&&d>1&&t(15,d--,d),await Ul(),t(5,k=!1)}async function D(){t(15,d=1),t(5,k=!0),t(16,g=I1(c)),await Ul(),t(5,k=!1)}function G(V){Z[V?"unshift":"push"](()=>{v=V,t(3,v)})}const j=V=>I(V);function B(V){c=V,t(1,c)}const q=()=>N(!1),U=()=>N(!0),J=V=>t(0,u=`ri-${V}-fill`),F=V=>t(0,u=`ri-${V}-line`);function W(V){Z[V?"unshift":"push"](()=>{C=V,t(4,C)})}return r.$$set=V=>{"value"in V&&t(0,u=V.value),"maxIconsPerPage"in V&&t(14,f=V.maxIconsPerPage)},r.$$.update=()=>{r.$$.dirty[0]&1&&a("change",u),r.$$.dirty[0]&1&&t(8,n=u?u.substring(3):"Pick icon"),r.$$.dirty[0]&81920&&t(17,i=Math.ceil(g.length/f)),r.$$.dirty[0]&49152&&t(18,s=f*d),r.$$.dirty[0]&344064&&t(7,l=g.slice(s-f,s)),r.$$.dirty[0]&163840&&t(6,o=`Page ${d} of ${i}`)},[u,c,p,v,C,k,o,l,n,h,I,T,N,D,f,d,g,i,s,G,j,B,q,U,J,F,W]}class Jne extends se{constructor(e){super();le(this,e,Yne,Wne,ne,{value:0,maxIconsPerPage:14},null,[-1,-1])}}function Qne(r){let e,t;return e=new Ke({props:{placeholder:r[0],value:r[2],options:r[1]}}),e.$on("change",r[3]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,[i]){const s={};i&1&&(s.placeholder=n[0]),i&4&&(s.value=n[2]),i&2&&(s.options=n[1]),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Xne(r,e,t){let n,i,s,l,o;ue(r,dn,g=>t(8,o=g));let{componentInstance:a={}}=e,{value:u=""}=e,{placeholder:f}=e;const c=mt(),p=(g,h)=>!Array.isArray(h)||h.indexOf(g)===-1?null:g,d=g=>{t(2,l=p(g.detail,s)),c("change",l)};return r.$$set=g=>{"componentInstance"in g&&t(4,a=g.componentInstance),"value"in g&&t(5,u=g.value),"placeholder"in g&&t(0,f=g.placeholder)},r.$$.update=()=>{r.$$.dirty&272&&t(7,n=ks(o,a)),r.$$.dirty&384&&t(6,i=Ni(o,n).schema),r.$$.dirty&64&&t(1,s=Object.keys(i||{})),r.$$.dirty&34&&t(2,l=p(u,s))},[f,s,l,d,a,u,i,n,o]}class Kne extends se{constructor(e){super();le(this,e,Xne,Qne,ne,{componentInstance:4,value:5,placeholder:0})}}function Zne(r){let e,t;return e=new Ho({props:{placeholder:r[0],value:r[2],options:r[1]}}),e.$on("change",r[3]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,[i]){const s={};i&1&&(s.placeholder=n[0]),i&4&&(s.value=n[2]),i&2&&(s.options=n[1]),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function xne(r,e,t){let n,i,s,l,o;ue(r,dn,g=>t(8,o=g));let{componentInstance:a={}}=e,{value:u=""}=e,{placeholder:f}=e;const c=mt(),p=(g,h)=>(Array.isArray(g)||(g=[]),g.filter(v=>h.indexOf(v)!==-1)),d=g=>{t(2,l=p(g.detail,s)),c("change",l)};return r.$$set=g=>{"componentInstance"in g&&t(4,a=g.componentInstance),"value"in g&&t(5,u=g.value),"placeholder"in g&&t(0,f=g.placeholder)},r.$$.update=()=>{r.$$.dirty&272&&t(7,n=ks(o,a)),r.$$.dirty&384&&t(6,i=Ni(o,n).schema),r.$$.dirty&64&&t(1,s=Object.keys(i||{})),r.$$.dirty&34&&t(2,l=p(u,s))},[f,s,l,d,a,u,i,n,o]}class ere extends se{constructor(e){super();le(this,e,xne,Zne,ne,{componentInstance:4,value:5,placeholder:0})}}function tre(r){let e,t;return e=new Ho({props:{placeholder:r[0],value:r[2],options:r[1]}}),e.$on("change",r[3]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,[i]){const s={};i&1&&(s.placeholder=n[0]),i&4&&(s.value=n[2]),i&2&&(s.options=n[1]),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function $w(r,e){return Array.isArray(r)||(r=[]),r.filter(t=>e.indexOf(t)!==-1)}function nre(r,e,t){let n,i,s,l,o,a;ue(r,At,h=>t(9,o=h)),ue(r,dn,h=>t(8,a=h));let{componentInstance:u={}}=e,{value:f=""}=e,{placeholder:c}=e;const p=mt();function d(h,v){let C=Object.values(v);if(!(h==null?void 0:h.tableId))return C;const k=o.list.find(I=>I._id===h.tableId);return k1(C,{allowLinks:k==null?void 0:k.sql}).map(I=>I.name)}const g=h=>{t(2,l=$w(h.detail,s)),p("change",l)};return r.$$set=h=>{"componentInstance"in h&&t(4,u=h.componentInstance),"value"in h&&t(5,f=h.value),"placeholder"in h&&t(0,c=h.placeholder)},r.$$.update=()=>{r.$$.dirty&272&&t(7,n=ks(a,u)),r.$$.dirty&384&&t(6,i=Ni(a,n,{searchableSchema:!0}).schema),r.$$.dirty&192&&t(1,s=d(n,i||{})),r.$$.dirty&34&&t(2,l=$w(f,s))},[c,s,l,g,u,f,i,n,a]}class rre extends se{constructor(e){super();le(this,e,nre,tre,ne,{componentInstance:4,value:5,placeholder:0})}}function ire(r){let e,t;const n=[r[1],{showAllQueries:!0},{otherSources:r[0]}];let i={};for(let s=0;s<n.length;s+=1)i=zi(i,n[s]);return e=new z6({props:i}),e.$on("change",r[2]),{c(){A(e.$$.fragment)},m(s,l){E(e,s,l),t=!0},p(s,[l]){const o=l&3?Cu(n,[l&2&&Su(s[1]),n[1],l&1&&{otherSources:s[0]}]):{};e.$set(o)},i(s){t||(m(e.$$.fragment,s),t=!0)},o(s){_(e.$$.fragment,s),t=!1},d(s){O(e,s)}}}function sre(r,e,t){const n=[{name:"Custom",label:"Custom"}];function i(s){at.call(this,r,s)}return r.$$set=s=>{t(1,e=zi(zi({},e),Eu(s)))},e=Eu(e),[n,e,i]}class lre extends se{constructor(e){super();le(this,e,sre,ire,ne,{})}}function bw(r,e,t){const n=r.slice();return n[8]=e[t][0],n[0]=e[t][1],n}function ore(r){let e=r[4][r[0]].name+"",t;return{c(){t=H(e)},m(n,i){$(n,t,i)},p(n,i){i&1&&e!==(e=n[4][n[0]].name+"")&&Ie(t,e)},d(n){n&&b(t)}}}function are(r){let e=r[0].name+"",t;return{c(){t=H(e)},m(n,i){$(n,t,i)},p:Te,d(n){n&&b(t)}}}function vw(r){let e,t,n,i,s,l,o,a;t=new pt({props:{color:"white",size:"L",name:r[0].icon}}),i=new Je({props:{size:"XS",$$slots:{default:[are]},$$scope:{ctx:r}}});function u(){return r[5](r[8])}return{c(){e=M("button"),A(t.$$.fragment),n=R(),A(i.$$.fragment),s=R(),y(e,"class","layout svelte-dl48fo"),oe(e,"selected",r[1]===r[8])},m(f,c){$(f,e,c),E(t,e,null),P(e,n),E(i,e,null),P(e,s),l=!0,o||(a=Le(e,"click",u),o=!0)},p(f,c){r=f;const p={};c&2048&&(p.$$scope={dirty:c,ctx:r}),i.$set(p),c&18&&oe(e,"selected",r[1]===r[8])},i(f){l||(m(t.$$.fragment,f),m(i.$$.fragment,f),l=!0)},o(f){_(t.$$.fragment,f),_(i.$$.fragment,f),l=!1},d(f){f&&b(e),O(t),O(i),o=!1,a()}}}function ure(r){let e,t,n=Object.entries(r[4]),i=[];for(let l=0;l<n.length;l+=1)i[l]=vw(bw(r,n,l));const s=l=>_(i[l],1,1,()=>{i[l]=null});return{c(){e=M("div");for(let l=0;l<i.length;l+=1)i[l].c();y(e,"class","container svelte-dl48fo")},m(l,o){$(l,e,o);for(let a=0;a<i.length;a+=1)i[a].m(e,null);t=!0},p(l,o){if(o&18){n=Object.entries(l[4]);let a;for(a=0;a<n.length;a+=1){const u=bw(l,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=vw(u),i[a].c(),m(i[a],1),i[a].m(e,null))}for(ee(),a=n.length;a<i.length;a+=1)s(a);te()}},i(l){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(l){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(l){l&&b(e),_t(i,l)}}}function fre(r){let e,t;return e=new jt({props:{onConfirm:r[6],size:"L",title:"Select layout",$$slots:{default:[ure]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&2&&(s.onConfirm=n[6]),i&2050&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function cre(r){let e,t,n,i;e=new Gt({props:{$$slots:{default:[ore]},$$scope:{ctx:r}}}),e.$on("click",function(){dt(r[2].show)&&r[2].show.apply(this,arguments)});let s={$$slots:{default:[fre]},$$scope:{ctx:r}};return n=new St({props:s}),r[7](n),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(l,o){E(e,l,o),$(l,t,o),E(n,l,o),i=!0},p(l,[o]){r=l;const a={};o&2049&&(a.$$scope={dirty:o,ctx:r}),e.$set(a);const u={};o&2050&&(u.$$scope={dirty:o,ctx:r}),n.$set(u)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){O(e,l),l&&b(t),r[7](null),O(n,l)}}}function pre(r,e,t){const n=mt();let{value:i=""}=e,s=i,l,o={mainSidebar:{name:"Main with Sidebar",icon:"ColumnTwoB"},sidebarMain:{name:"Sidebar with Main",icon:"ColumnTwoC"},twoColumns:{name:"Two columns",icon:"ColumnTwoA"},threeColumns:{name:"Three columns",icon:"ViewColumn"}};const a=c=>t(1,s=c),u=()=>n("change",s);function f(c){Z[c?"unshift":"push"](()=>{l=c,t(2,l)})}return r.$$set=c=>{"value"in c&&t(0,i=c.value)},[i,s,l,n,o,a,u,f]}class dre extends se{constructor(e){super();le(this,e,pre,cre,ne,{value:0})}}function ww(r,e,t){const n=r.slice();return n[12]=e[t],n[13]=e,n[14]=t,n}function yw(r){let e,t=[],n=new Map,i,s,l,o,a=r[0];const u=f=>f[12].id;for(let f=0;f<a.length;f+=1){let c=ww(r,a,f),p=u(c);n.set(p,t[f]=kw(p,c))}return{c(){e=M("div");for(let f=0;f<t.length;f+=1)t[f].c();y(e,"class","links svelte-1mnha07")},m(f,c){$(f,e,c);for(let p=0;p<t.length;p+=1)t[p].m(e,null);s=!0,l||(o=[$r(i=Tu.call(null,e,{items:r[0],flipDurationMs:L1,dropTargetStyle:{outline:"none"},dragDisabled:r[1]})),Le(e,"finalize",r[6]),Le(e,"consider",r[5])],l=!0)},p(f,c){if(c&23){a=f[0],ee();for(let p=0;p<t.length;p+=1)t[p].r();t=er(t,c,u,1,f,a,n,e,jo,kw,null,ww);for(let p=0;p<t.length;p+=1)t[p].a();te()}i&&dt(i.update)&&c&3&&i.update.call(null,{items:f[0],flipDurationMs:L1,dropTargetStyle:{outline:"none"},dragDisabled:f[1]})},i(f){if(!s){for(let c=0;c<a.length;c+=1)m(t[c]);s=!0}},o(f){for(let c=0;c<t.length;c+=1)_(t[c]);s=!1},d(f){f&&b(e);for(let c=0;c<t.length;c+=1)t[c].d();l=!1,En(o)}}}function kw(r,e){let t,n,i,s,l,o,a,u,f,c,p,d,g,h,v=Te,C,k,I;i=new pt({props:{name:"DragHandle",size:"XL"}});function S(j){e[9](j,e[12])}let T={placeholder:"Text"};e[12].text!==void 0&&(T.value=e[12].text),o=new et({props:T}),Z.push(()=>ce(o,"value",S));function N(j){e[10](j,e[12])}let D={placeholder:"URL",options:e[2]};e[12].url!==void 0&&(D.value=e[12].url),f=new Fl({props:D}),Z.push(()=>ce(f,"value",N));function G(){return e[11](e[12])}return d=new pt({props:{name:"Close",hoverable:!0,size:"S"}}),d.$on("click",G),{key:r,first:null,c(){t=M("div"),n=M("div"),A(i.$$.fragment),l=R(),A(o.$$.fragment),u=R(),A(f.$$.fragment),p=R(),A(d.$$.fragment),g=R(),y(n,"class","handle svelte-1mnha07"),y(n,"aria-label","drag-handle"),y(n,"style",s=e[1]?"cursor: grab":"cursor: grabbing"),y(t,"class","link svelte-1mnha07"),this.first=t},m(j,B){$(j,t,B),P(t,n),E(i,n,null),P(t,l),E(o,t,null),P(t,u),E(f,t,null),P(t,p),E(d,t,null),P(t,g),C=!0,k||(I=Le(n,"mousedown",e[8]),k=!0)},p(j,B){e=j,(!C||B&2&&s!==(s=e[1]?"cursor: grab":"cursor: grabbing"))&&y(n,"style",s);const q={};!a&&B&1&&(a=!0,q.value=e[12].text,pe(()=>a=!1)),o.$set(q);const U={};B&4&&(U.options=e[2]),!c&&B&1&&(c=!0,U.value=e[12].url,pe(()=>c=!1)),f.$set(U)},r(){h=t.getBoundingClientRect()},f(){Bo(t),v()},a(){v(),v=zo(t,h,qo,{duration:L1})},i(j){C||(m(i.$$.fragment,j),m(o.$$.fragment,j),m(f.$$.fragment,j),m(d.$$.fragment,j),C=!0)},o(j){_(i.$$.fragment,j),_(o.$$.fragment,j),_(f.$$.fragment,j),_(d.$$.fragment,j),C=!1},d(j){j&&b(t),O(i),O(o),O(f),O(d),k=!1,I()}}}function mre(r){let e;return{c(){e=H("Add Link")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function gre(r){var l;let e,t,n,i,s=((l=r[0])==null?void 0:l.length)&&yw(r);return n=new ut({props:{secondary:!0,icon:"Add",$$slots:{default:[mre]},$$scope:{ctx:r}}}),n.$on("click",r[3]),{c(){s&&s.c(),e=R(),t=M("div"),A(n.$$.fragment)},m(o,a){s&&s.m(o,a),$(o,e,a),$(o,t,a),E(n,t,null),i=!0},p(o,a){var f;((f=o[0])==null?void 0:f.length)?s?(s.p(o,a),a&1&&m(s,1)):(s=yw(o),s.c(),m(s,1),s.m(e.parentNode,e)):s&&(ee(),_(s,1,1,()=>{s=null}),te());const u={};a&32768&&(u.$$scope={dirty:a,ctx:o}),n.$set(u)},i(o){i||(m(s),m(n.$$.fragment,o),i=!0)},o(o){_(s),_(n.$$.fragment,o),i=!1},d(o){s&&s.d(o),o&&b(e),o&&b(t),O(n)}}}function _re(r){let e,t,n;return t=new Qe({props:{noPadding:!0,gap:"S",$$slots:{default:[gre]},$$scope:{ctx:r}}}),{c(){e=M("div"),A(t.$$.fragment),y(e,"class","container svelte-1mnha07")},m(i,s){$(i,e,s),E(t,e,null),n=!0},p(i,s){const l={};s&32775&&(l.$$scope={dirty:s,ctx:i}),t.$set(l)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function hre(r){let e,t;return e=new Fi({props:{$$slots:{default:[_re]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,[i]){const s={};i&32775&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}const L1=150;function $re(r,e,t){let n,i;ue(r,Ye,h=>t(7,i=h));let{links:s=[]}=e,l=!0;const o=()=>{t(0,s=[...s,{}])},a=h=>{t(0,s=s.filter(v=>v.id!==h))},u=h=>{t(0,s=h.detail.items)},f=h=>{u(h),t(1,l=!0)},c=()=>t(1,l=!1);function p(h,v){r.$$.not_equal(v.text,h)&&(v.text=h,t(0,s))}function d(h,v){r.$$.not_equal(v.url,h)&&(v.url=h,t(0,s))}const g=h=>a(h.id);return r.$$set=h=>{"links"in h&&t(0,s=h.links)},r.$$.update=()=>{r.$$.dirty&1&&s.forEach(h=>{h.id||(h.id=Br.generate())}),r.$$.dirty&128&&t(2,n=i.screens.map(h=>{var v;return(v=h.routing)==null?void 0:v.route}).filter(h=>h!=null))},[s,l,n,o,a,u,f,i,c,p,d,g]}class bre extends se{constructor(e){super();le(this,e,$re,hre,ne,{links:0})}}function vre(r){let e;return{c(){e=H("Configure links")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function wre(r){let e;return{c(){e=H("Configure the links in your navigation bar.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function yre(r){let e;return{c(){e=H("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function kre(r){let e,t;return e=new ut({props:{cta:!0,slot:"buttons",$$slots:{default:[yre]},$$scope:{ctx:r}}}),e.$on("click",r[2]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&128&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Cre(r){let e,t,n;function i(l){r[4](l)}let s={slot:"body"};return r[1]!==void 0&&(s.links=r[1]),e=new bre({props:s}),Z.push(()=>ce(e,"links",i)),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){const a={};!t&&o&2&&(t=!0,a.links=l[1],pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function Sre(r){let e,t,n,i;e=new Gt({props:{$$slots:{default:[vre]},$$scope:{ctx:r}}}),e.$on("click",function(){dt(r[0].show)&&r[0].show.apply(this,arguments)});let s={title:"Navigation Links",$$slots:{body:[Cre],buttons:[kre],description:[wre]},$$scope:{ctx:r}};return n=new ci({props:s}),r[5](n),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(l,o){E(e,l,o),$(l,t,o),E(n,l,o),i=!0},p(l,[o]){r=l;const a={};o&128&&(a.$$scope={dirty:o,ctx:r}),e.$set(a);const u={};o&130&&(u.$$scope={dirty:o,ctx:r}),n.$set(u)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){O(e,l),l&&b(t),r[5](null),O(n,l)}}}function Are(r,e,t){let{value:n=[]}=e,i,s=hn.cloneDeep(n||[]);const l=mt(),o=()=>{l("change",s),i.hide()};function a(f){s=f,t(1,s)}function u(f){Z[f?"unshift":"push"](()=>{i=f,t(0,i)})}return r.$$set=f=>{"value"in f&&t(3,n=f.value)},[i,s,o,n,a,u]}class Ere extends se{constructor(e){super();le(this,e,Are,Sre,ne,{value:3})}}function Ore(r){let e;return{c(){e=H("Define filters")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Tre(r){let e;return{c(){e=H("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Ire(r){let e,t;return e=new ut({props:{cta:!0,slot:"buttons",$$slots:{default:[Tre]},$$scope:{ctx:r}}}),e.$on("click",r[4]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&8192&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Lre(r){let e,t,n;function i(l){r[10](l)}let s={slot:"body",bindings:r[0],schemaFields:r[3]};return r[2]!==void 0&&(s.filters=r[2]),e=new C1({props:s}),Z.push(()=>ce(e,"filters",i)),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){const a={};o&1&&(a.bindings=l[0]),o&8&&(a.schemaFields=l[3]),!t&&o&4&&(t=!0,a.filters=l[2],pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function Pre(r){let e,t,n,i;e=new Gt({props:{$$slots:{default:[Ore]},$$scope:{ctx:r}}}),e.$on("click",function(){dt(r[1].show)&&r[1].show.apply(this,arguments)});let s={title:"Filtering",$$slots:{body:[Lre],buttons:[Ire]},$$scope:{ctx:r}};return n=new ci({props:s}),r[11](n),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(l,o){E(e,l,o),$(l,t,o),E(n,l,o),i=!0},p(l,[o]){r=l;const a={};o&8192&&(a.$$scope={dirty:o,ctx:r}),e.$set(a);const u={};o&8205&&(u.$$scope={dirty:o,ctx:r}),n.$set(u)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){O(e,l),l&&b(t),r[11](null),O(n,l)}}}function Nre(r,e,t){let n,i,s,l;ue(r,dn,v=>t(9,l=v));const o=mt();let{value:a=[]}=e,{componentInstance:u}=e,{bindings:f=[]}=e,c,p=a||[];const d=async()=>{o("change",p),ye.success("Filters saved."),c.hide()};function g(v){p=v,t(2,p)}function h(v){Z[v?"unshift":"push"](()=>{c=v,t(1,c)})}return r.$$set=v=>{"value"in v&&t(5,a=v.value),"componentInstance"in v&&t(6,u=v.componentInstance),"bindings"in v&&t(0,f=v.bindings)},r.$$.update=()=>{var v;r.$$.dirty&576&&t(8,n=ks(l,u)),r.$$.dirty&768&&t(7,i=(v=Ni(l,n,{searchableSchema:!0}))==null?void 0:v.schema),r.$$.dirty&128&&t(3,s=Object.values(i||{}))},[f,c,p,s,d,a,u,i,n,l,g,h]}class Rre extends se{constructor(e){super();le(this,e,Nre,Pre,ne,{value:5,componentInstance:6,bindings:0})}}function Cw(r){let e,t,n,i,s;return t=new pt({props:{size:"S",name:"FlashOn"}}),{c(){e=M("div"),A(t.$$.fragment),y(e,"class","icon svelte-1q3yltm"),y(e,"data-cy","text-binding-button")},m(l,o){$(l,e,o),E(t,e,null),n=!0,i||(s=Le(e,"click",function(){dt(r[8].show)&&r[8].show.apply(this,arguments)}),i=!0)},p(l,o){r=l},i(l){n||(m(t.$$.fragment,l),n=!0)},o(l){_(t.$$.fragment,l),n=!1},d(l){l&&b(e),O(t),i=!1,s()}}}function Mre(r){let e;return{c(){e=H("Add the objects on the left to enrich your text.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Dre(r){let e;return{c(){e=H("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function jre(r){let e,t;return e=new ut({props:{cta:!0,slot:"buttons",$$slots:{default:[Dre]},$$scope:{ctx:r}}}),e.$on("click",r[12]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&8388608&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Bre(r){let e,t,n;var i=r[0];function s(l){return{props:{slot:"body",value:l[7],close:l[12],bindings:l[1],allowJS:l[6]}}}return i&&(e=new i(s(r)),e.$on("change",r[19])),{c(){e&&A(e.$$.fragment),t=Oe()},m(l,o){e&&E(e,l,o),$(l,t,o),n=!0},p(l,o){const a={};if(o&128&&(a.value=l[7]),o&2&&(a.bindings=l[1]),o&64&&(a.allowJS=l[6]),i!==(i=l[0])){if(e){ee();const u=e;_(u.$$.fragment,1,0,()=>{O(u,1)}),te()}i?(e=new i(s(l)),e.$on("change",l[19]),A(e.$$.fragment),m(e.$$.fragment,1),E(e,t.parentNode,t)):e=null}else i&&e.$set(a)},i(l){n||(e&&m(e.$$.fragment,l),n=!0)},o(l){e&&_(e.$$.fragment,l),n=!1},d(l){l&&b(t),e&&O(e,l)}}}function zre(r){let e,t,n,i,s,l;t=new Fl({props:{label:r[4],disabled:r[5],readonly:r[11],value:r[11]?"(JavaScript function)":r[7],placeholder:r[3],options:r[10]}}),t.$on("type",r[17]),t.$on("pick",r[18]);let o=!r[5]&&Cw(r),a={title:r[2],$$slots:{body:[Bre],buttons:[jre],description:[Mre]},$$scope:{ctx:r}};return s=new ci({props:a}),r[20](s),{c(){e=M("div"),A(t.$$.fragment),n=R(),o&&o.c(),i=R(),A(s.$$.fragment),y(e,"class","control svelte-1q3yltm")},m(u,f){$(u,e,f),E(t,e,null),P(e,n),o&&o.m(e,null),$(u,i,f),E(s,u,f),l=!0},p(u,[f]){const c={};f&16&&(c.label=u[4]),f&32&&(c.disabled=u[5]),f&2048&&(c.readonly=u[11]),f&2176&&(c.value=u[11]?"(JavaScript function)":u[7]),f&8&&(c.placeholder=u[3]),f&1024&&(c.options=u[10]),t.$set(c),u[5]?o&&(ee(),_(o,1,1,()=>{o=null}),te()):o?(o.p(u,f),f&32&&m(o,1)):(o=Cw(u),o.c(),m(o,1),o.m(e,null));const p={};f&4&&(p.title=u[2]),f&8389315&&(p.$$scope={dirty:f,ctx:u}),s.$set(p)},i(u){l||(m(t.$$.fragment,u),m(o),m(s.$$.fragment,u),l=!0)},o(u){_(t.$$.fragment,u),_(o),_(s.$$.fragment,u),l=!1},d(u){u&&b(e),O(t),o&&o.d(),u&&b(i),r[20](null),O(s,u)}}}function qre(r,e,t){let n,i,s,l,{panel:o=v1}=e,{value:a=""}=e,{bindings:u=[]}=e,{title:f="Bindings"}=e,{placeholder:c}=e,{label:p}=e,{disabled:d=!1}=e,{options:g}=e,{allowJS:h=!0}=e,{appendBindingsAsOptions:v=!0}=e;const C=mt();let k;const I=()=>{S(i),k.hide()},S=(B,q)=>{q&&!(g==null?void 0:g.includes(B))&&(B=`{{ ${B} }}`),C("change",Sl(u,B))},T=(B,q,U)=>U?[].concat(B||[]).concat((q==null?void 0:q.map(J=>J.readableBinding))||[]):B,N=B=>S(B.detail,!1),D=B=>S(B.detail,!0),G=B=>t(9,i=B.detail);function j(B){Z[B?"unshift":"push"](()=>{k=B,t(8,k)})}return r.$$set=B=>{"panel"in B&&t(0,o=B.panel),"value"in B&&t(14,a=B.value),"bindings"in B&&t(1,u=B.bindings),"title"in B&&t(2,f=B.title),"placeholder"in B&&t(3,c=B.placeholder),"label"in B&&t(4,p=B.label),"disabled"in B&&t(5,d=B.disabled),"options"in B&&t(15,g=B.options),"allowJS"in B&&t(6,h=B.allowJS),"appendBindingsAsOptions"in B&&t(16,v=B.appendBindingsAsOptions)},r.$$.update=()=>{r.$$.dirty&16386&&t(7,n=po(u,a)),r.$$.dirty&128&&t(9,i=n),r.$$.dirty&16384&&t(11,s=Uf(a)),r.$$.dirty&98306&&t(10,l=T(g,u,v))},[o,u,f,c,p,d,h,n,k,i,l,s,I,S,a,g,v,N,D,G,j]}class Sw extends se{constructor(e){super();le(this,e,qre,zre,ne,{panel:0,value:14,bindings:1,title:2,placeholder:3,label:4,disabled:5,options:15,allowJS:6,appendBindingsAsOptions:16})}}function Ure(r){let e,t;return e=new Sw({props:{value:r[0],bindings:r[1],options:r[2],appendBindingsAsOptions:!1}}),e.$on("change",r[4]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,[i]){const s={};i&1&&(s.value=n[0]),i&2&&(s.bindings=n[1]),i&4&&(s.options=n[2]),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Fre(r,e,t){let n,i;ue(r,Ye,a=>t(3,i=a));let{value:s}=e,{bindings:l}=e;function o(a){at.call(this,r,a)}return r.$$set=a=>{"value"in a&&t(0,s=a.value),"bindings"in a&&t(1,l=a.bindings)},r.$$.update=()=>{r.$$.dirty&8&&t(2,n=i.screens.map(a=>{var u;return(u=a.routing)==null?void 0:u.route}).filter(a=>a!=null))},[s,l,n,i,o]}class Vre extends se{constructor(e){super();le(this,e,Fre,Ure,ne,{value:0,bindings:1})}}function Aw(r,e,t){const n=r.slice();return n[6]=e[t],n[7]=e,n[8]=t,n}function Ew(r){let e,t;return e=new Je({props:{size:"S",$$slots:{default:[Hre]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Hre(r){let e;return{c(){e=H("Add an option to get started.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Ow(r){let e,t=[],n=new Map,i,s=r[0];const l=o=>o[6].id;for(let o=0;o<s.length;o+=1){let a=Aw(r,s,o),u=l(a);n.set(u,t[o]=Tw(u,a))}return{c(){e=M("div");for(let o=0;o<t.length;o+=1)t[o].c();y(e,"class","options svelte-12ls1u")},m(o,a){$(o,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);i=!0},p(o,a){a&3&&(s=o[0],ee(),t=er(t,a,l,1,o,s,n,e,jr,Tw,null,Aw),te())},i(o){if(!i){for(let a=0;a<s.length;a+=1)m(t[a]);i=!0}},o(o){for(let a=0;a<t.length;a+=1)_(t[a]);i=!1},d(o){o&&b(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function Tw(r,e){let t,n,i,s,l,o,a,u,f;function c(v){e[3](v,e[6])}let p={placeholder:"Label",label:"Label",labelPosition:"left"};e[6].label!==void 0&&(p.value=e[6].label),n=new et({props:p}),Z.push(()=>ce(n,"value",c));function d(v){e[4](v,e[6])}let g={placeholder:"Value",label:"Value",labelPosition:"left"};e[6].value!==void 0&&(g.value=e[6].value),l=new et({props:g}),Z.push(()=>ce(l,"value",d));function h(){return e[5](e[6])}return u=new pt({props:{name:"Close",hoverable:!0,size:"S"}}),u.$on("click",h),{key:r,first:null,c(){t=Oe(),A(n.$$.fragment),s=R(),A(l.$$.fragment),a=R(),A(u.$$.fragment),this.first=t},m(v,C){$(v,t,C),E(n,v,C),$(v,s,C),E(l,v,C),$(v,a,C),E(u,v,C),f=!0},p(v,C){e=v;const k={};!i&&C&1&&(i=!0,k.value=e[6].label,pe(()=>i=!1)),n.$set(k);const I={};!o&&C&1&&(o=!0,I.value=e[6].value,pe(()=>o=!1)),l.$set(I)},i(v){f||(m(n.$$.fragment,v),m(l.$$.fragment,v),m(u.$$.fragment,v),f=!0)},o(v){_(n.$$.fragment,v),_(l.$$.fragment,v),_(u.$$.fragment,v),f=!1},d(v){v&&b(t),O(n,v),v&&b(s),O(l,v),v&&b(a),O(u,v)}}}function Wre(r){let e;return{c(){e=H("Add Option")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Gre(r){var a;let e,t,n,i,s,l=!r[0].length&&Ew(r),o=((a=r[0])==null?void 0:a.length)&&Ow(r);return i=new ut({props:{icon:"AddCircle",size:"M",secondary:!0,$$slots:{default:[Wre]},$$scope:{ctx:r}}}),i.$on("click",r[2]),{c(){l&&l.c(),e=R(),o&&o.c(),t=R(),n=M("div"),A(i.$$.fragment)},m(u,f){l&&l.m(u,f),$(u,e,f),o&&o.m(u,f),$(u,t,f),$(u,n,f),E(i,n,null),s=!0},p(u,f){var p;u[0].length?l&&(ee(),_(l,1,1,()=>{l=null}),te()):l?f&1&&m(l,1):(l=Ew(u),l.c(),m(l,1),l.m(e.parentNode,e)),((p=u[0])==null?void 0:p.length)?o?(o.p(u,f),f&1&&m(o,1)):(o=Ow(u),o.c(),m(o,1),o.m(t.parentNode,t)):o&&(ee(),_(o,1,1,()=>{o=null}),te());const c={};f&512&&(c.$$scope={dirty:f,ctx:u}),i.$set(c)},i(u){s||(m(l),m(o),m(i.$$.fragment,u),s=!0)},o(u){_(l),_(o),_(i.$$.fragment,u),s=!1},d(u){l&&l.d(u),u&&b(e),o&&o.d(u),u&&b(t),u&&b(n),O(i)}}}function Yre(r){let e,t,n;return t=new Qe({props:{noPadding:!0,gap:"S",$$slots:{default:[Gre]},$$scope:{ctx:r}}}),{c(){e=M("div"),A(t.$$.fragment),y(e,"class","container svelte-12ls1u")},m(i,s){$(i,e,s),E(t,e,null),n=!0},p(i,s){const l={};s&513&&(l.$$scope={dirty:s,ctx:i}),t.$set(l)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function Jre(r){let e,t;return e=new Fi({props:{$$slots:{default:[Yre]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,[i]){const s={};i&513&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Qre(r,e,t){let{options:n=[]}=e;const i=u=>{t(0,n=n.filter(f=>f.id!==u))},s=()=>{t(0,n=[...n,{id:Br.generate(),label:null,value:null}])};function l(u,f){r.$$.not_equal(f.label,u)&&(f.label=u,t(0,n))}function o(u,f){r.$$.not_equal(f.value,u)&&(f.value=u,t(0,n))}const a=u=>i(u.id);return r.$$set=u=>{"options"in u&&t(0,n=u.options)},[n,i,s,l,o,a]}class Xre extends se{constructor(e){super();le(this,e,Qre,Jre,ne,{options:0})}}function Kre(r){let e;return{c(){e=H("Define Options")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Zre(r){let e;return{c(){e=H("Define the options for this picker.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function xre(r){let e;return{c(){e=H("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function eie(r){let e,t;return e=new ut({props:{cta:!0,slot:"buttons",$$slots:{default:[xre]},$$scope:{ctx:r}}}),e.$on("click",r[2]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&128&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function tie(r){let e,t,n;function i(l){r[4](l)}let s={slot:"body"};return r[1]!==void 0&&(s.options=r[1]),e=new Xre({props:s}),Z.push(()=>ce(e,"options",i)),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){const a={};!t&&o&2&&(t=!0,a.options=l[1],pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function nie(r){let e,t,n,i;e=new Gt({props:{$$slots:{default:[Kre]},$$scope:{ctx:r}}}),e.$on("click",function(){dt(r[0].show)&&r[0].show.apply(this,arguments)});let s={title:"Options",$$slots:{body:[tie],buttons:[eie],description:[Zre]},$$scope:{ctx:r}};return n=new ci({props:s}),r[5](n),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(l,o){E(e,l,o),$(l,t,o),E(n,l,o),i=!0},p(l,[o]){r=l;const a={};o&128&&(a.$$scope={dirty:o,ctx:r}),e.$set(a);const u={};o&130&&(u.$$scope={dirty:o,ctx:r}),n.$set(u)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){O(e,l),l&&b(t),r[5](null),O(n,l)}}}function rie(r,e,t){const n=mt();let{value:i}=e,s,l=i||[];const o=async()=>{t(1,l=l.filter(f=>f.value&&f.label)),n("change",l),s.hide()};function a(f){l=f,t(1,l)}function u(f){Z[f?"unshift":"push"](()=>{s=f,t(0,s)})}return r.$$set=f=>{"value"in f&&t(3,i=f.value)},[s,l,o,i,a,u]}class iie extends se{constructor(e){super();le(this,e,rie,nie,ne,{value:3})}}function sie(r){let e,t;return e=new Fl({props:{value:r[0],options:r[1]}}),e.$on("change",r[8]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,[i]){const s={};i&1&&(s.value=n[0]),i&2&&(s.options=n[1]),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function lie(r,e,t){let n,i,s,l,o;ue(r,dn,d=>t(7,o=d));let{componentInstance:a}=e,{value:u}=e,{type:f}=e;const c=(d,g)=>{let h=Object.entries(d!=null?d:{}),v=[];return g==="field/options"?v=[g,"field/string"]:v=[g],v=v.map(C=>C.split("/")[1]),h=h.filter(C=>v.includes(C[1].type)),h.map(C=>C[0])};function p(d){at.call(this,r,d)}return r.$$set=d=>{"componentInstance"in d&&t(2,a=d.componentInstance),"value"in d&&t(0,u=d.value),"type"in d&&t(3,f=d.type)},r.$$.update=()=>{r.$$.dirty&132&&t(6,n=Vu(o.props,a._id,d=>d._component==="@budibase/standard-components/form")),r.$$.dirty&192&&t(5,i=ks(o,n)),r.$$.dirty&160&&t(4,s=Ni(o,i,{formSchema:!0}).schema),r.$$.dirty&24&&t(1,l=c(s,f))},[u,l,a,f,s,i,n,o,p]}class es extends se{constructor(e){super();le(this,e,lie,sie,ne,{componentInstance:2,value:0,type:3})}}function Iw(r,e,t){const n=r.slice();return n[29]=e[t],n[30]=e,n[31]=t,n}function Lw(r,e,t){const n=r.slice();return n[29]=e[t],n}function oie(r){let e;return{c(){e=H("Schema validation rules")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function aie(r){let e,t;return e=new Je({props:{size:"S",$$slots:{default:[fie]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i[1]&8&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function uie(r){let e,t,n=r[5],i=[];for(let l=0;l<n.length;l+=1)i[l]=Pw(Lw(r,n,l));const s=l=>_(i[l],1,1,()=>{i[l]=null});return{c(){e=M("div");for(let l=0;l<i.length;l+=1)i[l].c();y(e,"class","links svelte-lcp0nr")},m(l,o){$(l,e,o);for(let a=0;a<i.length;a+=1)i[a].m(e,null);t=!0},p(l,o){if(o[0]&50){n=l[5];let a;for(a=0;a<n.length;a+=1){const u=Lw(l,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=Pw(u),i[a].c(),m(i[a],1),i[a].m(e,null))}for(ee(),a=n.length;a<i.length;a+=1)s(a);te()}},i(l){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(l){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(l){l&&b(e),_t(i,l)}}}function fie(r){let e;return{c(){e=H("There are no built-in validation rules from the schema.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Pw(r){let e,t,n,i,s,l,o,a,u,f,c,p;return t=new Ke({props:{placeholder:"Constraint",value:r[29].constraint,options:r[4],disabled:!0}}),i=new Ke({props:{placeholder:null,value:"Value",options:["Binding","Value"],disabled:!0}}),l=new Kn({props:{placeholder:"Constraint value",value:r[29].value,bindings:r[1],disabled:!0}}),a=new Kn({props:{placeholder:"Error message",value:r[29].error,bindings:r[1],disabled:!0}}),{c(){e=M("div"),A(t.$$.fragment),n=R(),A(i.$$.fragment),s=R(),A(l.$$.fragment),o=R(),A(a.$$.fragment),u=R(),f=M("div"),c=R(),y(e,"class","rule schema svelte-lcp0nr")},m(d,g){$(d,e,g),E(t,e,null),P(e,n),E(i,e,null),P(e,s),E(l,e,null),P(e,o),E(a,e,null),P(e,u),P(e,f),P(e,c),p=!0},p(d,g){const h={};g[0]&32&&(h.value=d[29].constraint),g[0]&16&&(h.options=d[4]),t.$set(h);const v={};g[0]&32&&(v.value=d[29].value),g[0]&2&&(v.bindings=d[1]),l.$set(v);const C={};g[0]&32&&(C.value=d[29].error),g[0]&2&&(C.bindings=d[1]),a.$set(C)},i(d){p||(m(t.$$.fragment,d),m(i.$$.fragment,d),m(l.$$.fragment,d),m(a.$$.fragment,d),p=!0)},o(d){_(t.$$.fragment,d),_(i.$$.fragment,d),_(l.$$.fragment,d),_(a.$$.fragment,d),p=!1},d(d){d&&b(e),O(t),O(i),O(l),O(a)}}}function cie(r){let e,t,n,i,s,l;e=new wt({props:{size:"XS",$$slots:{default:[oie]},$$scope:{ctx:r}}});const o=[uie,aie],a=[];function u(f,c){var p;return((p=f[5])==null?void 0:p.length)?0:1}return n=u(r),i=a[n]=o[n](r),{c(){A(e.$$.fragment),t=R(),i.c(),s=Oe()},m(f,c){E(e,f,c),$(f,t,c),a[n].m(f,c),$(f,s,c),l=!0},p(f,c){const p={};c[1]&8&&(p.$$scope={dirty:c,ctx:f}),e.$set(p);let d=n;n=u(f),n===d?a[n].p(f,c):(ee(),_(a[d],1,1,()=>{a[d]=null}),te(),i=a[n],i?i.p(f,c):(i=a[n]=o[n](f),i.c()),m(i,1),i.m(s.parentNode,s))},i(f){l||(m(e.$$.fragment,f),m(i),l=!0)},o(f){_(e.$$.fragment,f),_(i),l=!1},d(f){O(e,f),f&&b(t),a[n].d(f),f&&b(s)}}}function pie(r){let e;return{c(){e=H("Custom validation rules")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Nw(r){let e,t=[],n=new Map,i,s=r[0];const l=o=>o[29].id;for(let o=0;o<s.length;o+=1){let a=Iw(r,s,o),u=l(a);n.set(u,t[o]=Rw(u,a))}return{c(){e=M("div");for(let o=0;o<t.length;o+=1)t[o].c();y(e,"class","links svelte-lcp0nr")},m(o,a){$(o,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);i=!0},p(o,a){a[0]&415&&(s=o[0],ee(),t=er(t,a,l,1,o,s,n,e,jr,Rw,null,Iw),te())},i(o){if(!i){for(let a=0;a<s.length;a+=1)m(t[a]);i=!0}},o(o){for(let a=0;a<t.length;a+=1)_(t[a]);i=!1},d(o){o&&b(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function die(r){let e,t,n,i,s;const l=[vie,bie,$ie,hie,_ie],o=[];function a(u,f){return(e==null||f[0]&1)&&(e=!!["string","number","options","longform"].includes(u[29].type)),e?0:u[29].type==="array"?1:u[29].type==="boolean"?2:u[29].type==="datetime"?3:4}return t=a(r,[-1,-1]),n=o[t]=l[t](r),{c(){n.c(),i=Oe()},m(u,f){o[t].m(u,f),$(u,i,f),s=!0},p(u,f){let c=t;t=a(u,f),t===c?o[t].p(u,f):(ee(),_(o[c],1,1,()=>{o[c]=null}),te(),n=o[t],n?n.p(u,f):(n=o[t]=l[t](u),n.c()),m(n,1),n.m(i.parentNode,i))},i(u){s||(m(n),s=!0)},o(u){_(n),s=!1},d(u){o[t].d(u),u&&b(i)}}}function mie(r){let e,t,n;function i(l){r[16](l,r[29])}let s={placeholder:"Constraint value"};return r[29].value!==void 0&&(s.value=r[29].value),e=new et({props:s}),Z.push(()=>ce(e,"value",i)),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){r=l;const a={};!t&&o[0]&1&&(t=!0,a.value=r[29].value,pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function gie(r){let e,t;function n(...i){return r[15](r[29],r[30],r[31],...i)}return e=new Kn({props:{placeholder:"Constraint value",value:r[29].value,bindings:r[1],disabled:r[29].constraint==="required"}}),e.$on("change",n),{c(){A(e.$$.fragment)},m(i,s){E(e,i,s),t=!0},p(i,s){r=i;const l={};s[0]&1&&(l.value=r[29].value),s[0]&2&&(l.bindings=r[1]),s[0]&1&&(l.disabled=r[29].constraint==="required"),e.$set(l)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){O(e,i)}}}function _ie(r){let e,t;return e=new Kn({props:{disabled:!0}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p:Te,i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function hie(r){let e,t,n;function i(l){r[19](l,r[29])}let s={enableTime:!1,disabled:r[29].constraint==="required"};return r[29].value!==void 0&&(s.value=r[29].value),e=new Ds({props:s}),Z.push(()=>ce(e,"value",i)),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){r=l;const a={};o[0]&1&&(a.disabled=r[29].constraint==="required"),!t&&o[0]&1&&(t=!0,a.value=r[29].value,pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function $ie(r){let e,t,n;function i(l){r[18](l,r[29])}let s={disabled:r[29].constraint==="required",options:[{label:"True",value:"true"},{label:"False",value:"false"}]};return r[29].value!==void 0&&(s.value=r[29].value),e=new Ke({props:s}),Z.push(()=>ce(e,"value",i)),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){r=l;const a={};o[0]&1&&(a.disabled=r[29].constraint==="required"),!t&&o[0]&1&&(t=!0,a.value=r[29].value,pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function bie(r){let e,t;return e=new Ke({props:{disabled:r[29].constraint==="required",options:r[2].schema[r[3]].constraints.inclusion,getOptionLabel:Aie,getOptionValue:Eie,value:r[29].value}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i[0]&1&&(s.disabled=n[29].constraint==="required"),i[0]&12&&(s.options=n[2].schema[n[3]].constraints.inclusion),i[0]&1&&(s.value=n[29].value),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function vie(r){let e,t,n;function i(l){r[17](l,r[29])}let s={disabled:r[29].constraint==="required",placeholder:"Constraint value"};return r[29].value!==void 0&&(s.value=r[29].value),e=new et({props:s}),Z.push(()=>ce(e,"value",i)),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){r=l;const a={};o[0]&1&&(a.disabled=r[29].constraint==="required"),!t&&o[0]&1&&(t=!0,a.value=r[29].value,pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function Rw(r,e){let t,n,i,s,l,o,a,u,f,c,p,d,g,h,v,C,k,I;function S(F){e[13](F,e[29])}let T={options:e[4],placeholder:"Constraint"};e[29].constraint!==void 0&&(T.value=e[29].constraint),n=new Ke({props:T}),Z.push(()=>ce(n,"value",S));function N(F){e[14](F,e[29])}let D={disabled:e[29].constraint==="required",placeholder:null,options:["Binding","Value"]};e[29].valueType!==void 0&&(D.value=e[29].valueType),l=new Ke({props:D}),Z.push(()=>ce(l,"value",N));const G=[gie,mie,die],j=[];function B(F,W){return F[29].valueType==="Binding"?0:((u==null||W[0]&1)&&(u=!!(F[29].type!=="array"&&["maxLength","minLength","regex","notRegex","contains","notContains"].includes(F[29].constraint))),u?1:2)}f=B(e,[-1,-1]),c=j[f]=G[f](e);function q(...F){return e[20](e[29],e[30],e[31],...F)}d=new Kn({props:{placeholder:"Error message",value:e[29].error,bindings:e[1]}}),d.$on("change",q);function U(){return e[21](e[29])}h=new pt({props:{name:"Duplicate",hoverable:!0,size:"S"}}),h.$on("click",U);function J(){return e[22](e[29])}return C=new pt({props:{name:"Close",hoverable:!0,size:"S"}}),C.$on("click",J),{key:r,first:null,c(){t=M("div"),A(n.$$.fragment),s=R(),A(l.$$.fragment),a=R(),c.c(),p=R(),A(d.$$.fragment),g=R(),A(h.$$.fragment),v=R(),A(C.$$.fragment),k=R(),y(t,"class","rule svelte-lcp0nr"),this.first=t},m(F,W){$(F,t,W),E(n,t,null),P(t,s),E(l,t,null),P(t,a),j[f].m(t,null),P(t,p),E(d,t,null),P(t,g),E(h,t,null),P(t,v),E(C,t,null),P(t,k),I=!0},p(F,W){e=F;const V={};W[0]&16&&(V.options=e[4]),!i&&W[0]&1&&(i=!0,V.value=e[29].constraint,pe(()=>i=!1)),n.$set(V);const Q={};W[0]&1&&(Q.disabled=e[29].constraint==="required"),!o&&W[0]&1&&(o=!0,Q.value=e[29].valueType,pe(()=>o=!1)),l.$set(Q);let me=f;f=B(e,W),f===me?j[f].p(e,W):(ee(),_(j[me],1,1,()=>{j[me]=null}),te(),c=j[f],c?c.p(e,W):(c=j[f]=G[f](e),c.c()),m(c,1),c.m(t,p));const re={};W[0]&1&&(re.value=e[29].error),W[0]&2&&(re.bindings=e[1]),d.$set(re)},i(F){I||(m(n.$$.fragment,F),m(l.$$.fragment,F),m(c),m(d.$$.fragment,F),m(h.$$.fragment,F),m(C.$$.fragment,F),I=!0)},o(F){_(n.$$.fragment,F),_(l.$$.fragment,F),_(c),_(d.$$.fragment,F),_(h.$$.fragment,F),_(C.$$.fragment,F),I=!1},d(F){F&&b(t),O(n),O(l),j[f].d(),O(d),O(h),O(C)}}}function wie(r){let e;return{c(){e=H("Add Rule")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function yie(r){var a;let e,t,n,i,s,l;e=new wt({props:{size:"XS",$$slots:{default:[pie]},$$scope:{ctx:r}}});let o=((a=r[0])==null?void 0:a.length)&&Nw(r);return s=new ut({props:{secondary:!0,icon:"Add",$$slots:{default:[wie]},$$scope:{ctx:r}}}),s.$on("click",r[6]),{c(){A(e.$$.fragment),t=R(),o&&o.c(),n=R(),i=M("div"),A(s.$$.fragment),y(i,"class","button")},m(u,f){E(e,u,f),$(u,t,f),o&&o.m(u,f),$(u,n,f),$(u,i,f),E(s,i,null),l=!0},p(u,f){var d;const c={};f[1]&8&&(c.$$scope={dirty:f,ctx:u}),e.$set(c),((d=u[0])==null?void 0:d.length)?o?(o.p(u,f),f[0]&1&&m(o,1)):(o=Nw(u),o.c(),m(o,1),o.m(n.parentNode,n)):o&&(ee(),_(o,1,1,()=>{o=null}),te());const p={};f[1]&8&&(p.$$scope={dirty:f,ctx:u}),s.$set(p)},i(u){l||(m(e.$$.fragment,u),m(o),m(s.$$.fragment,u),l=!0)},o(u){_(e.$$.fragment,u),_(o),_(s.$$.fragment,u),l=!1},d(u){O(e,u),u&&b(t),o&&o.d(u),u&&b(n),u&&b(i),O(s)}}}function kie(r){var s;let e,t,n,i;return e=new Qe({props:{noPadding:!0,gap:((s=r[5])==null?void 0:s.length)?"S":"XS",$$slots:{default:[cie]},$$scope:{ctx:r}}}),n=new Qe({props:{noPadding:!0,gap:"S",$$slots:{default:[yie]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(l,o){E(e,l,o),$(l,t,o),E(n,l,o),i=!0},p(l,o){var f;const a={};o[0]&32&&(a.gap=((f=l[5])==null?void 0:f.length)?"S":"XS"),o[0]&50|o[1]&8&&(a.$$scope={dirty:o,ctx:l}),e.$set(a);const u={};o[0]&31|o[1]&8&&(u.$$scope={dirty:o,ctx:l}),n.$set(u)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){O(e,l),l&&b(t),O(n,l)}}}function Cie(r){let e,t,n;return t=new Qe({props:{noPadding:!0,gap:"M",$$slots:{default:[kie]},$$scope:{ctx:r}}}),{c(){e=M("div"),A(t.$$.fragment),y(e,"class","container svelte-lcp0nr")},m(i,s){$(i,e,s),E(t,e,null),n=!0},p(i,s){const l={};s[0]&63|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),t.$set(l)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function Sie(r){let e,t;return e=new Fi({props:{$$slots:{default:[Cie]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i[0]&63|i[1]&8&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}const Aie=r=>r,Eie=r=>r;function Oie(r,e,t){let n,i,s,l,o,a,u;ue(r,ni,V=>t(11,a=V)),ue(r,dn,V=>t(12,u=V));let{rules:f=[]}=e,{bindings:c=[]}=e,{type:p}=e;const d={Required:{label:"Required",value:"required"},MinLength:{label:"Min length",value:"minLength"},MaxLength:{label:"Max length",value:"maxLength"},MaxValue:{label:"Max value",value:"maxValue"},MinValue:{label:"Min value",value:"minValue"},Equal:{label:"Must equal",value:"equal"},NotEqual:{label:"Must not equal",value:"notEqual"},Regex:{label:"Must match regex",value:"regex"},NotRegex:{label:"Must not match regex",value:"notRegex"},Contains:{label:"Must contain",value:"contains"},NotContains:{label:"Must not contain",value:"notContains"}},g={string:[d.Required,d.MaxLength,d.Equal,d.NotEqual,d.Regex,d.NotRegex],number:[d.Required,d.MaxValue,d.MinValue,d.Equal,d.NotEqual],boolean:[d.Required,d.Equal,d.NotEqual],datetime:[d.Required,d.MaxValue,d.MinValue,d.Equal,d.NotEqual],attachment:[d.Required],link:[d.Required,d.Contains,d.NotContains,d.MinLength,d.MaxLength],array:[d.Required,d.MinLength,d.MaxLength,d.Contains,d.NotContains]},h=V=>g[V],v=(V,Q)=>{if(!V||!Q)return null;const me=Vu(V.props,Q._id,re=>re._component.endsWith("/form"));return Ni(V,me==null?void 0:me.dataSource)},C=(V,Q)=>{var ae,_e,Re,be,ve,he;if(!V||!Q)return[];const me=(ae=Q.schema)==null?void 0:ae[V],re=me==null?void 0:me.constraints;if(!re)return[];let x=[];if((V===((_e=Q==null?void 0:Q.table)==null?void 0:_e.primaryDisplay)||((Re=re.presence)==null?void 0:Re.allowEmpty)===!1)&&x.push({constraint:"required",error:"Required field"}),k((be=re.length)==null?void 0:be.maximum)){const Pe=re.length.maximum;x.push({constraint:"maxLength",value:Pe,error:`Maximum ${Pe} characters`})}if(k((ve=re.numericality)==null?void 0:ve.greaterThanOrEqualTo)){const Pe=re.numericality.greaterThanOrEqualTo;x.push({constraint:"minValue",value:Pe,error:`Minimum value is ${Pe}`})}if(k((he=re.numericality)==null?void 0:he.lessThanOrEqualTo)){const Pe=re.numericality.lessThanOrEqualTo;x.push({constraint:"maxValue",value:Pe,error:`Maximum value is ${Pe}`})}return x},k=V=>V!=null&&V!=="",I=()=>{t(0,f=[...f||[],{valueType:"Binding",type:l,id:Br.generate(),value:l=="array"?[]:null}])},S=V=>{t(0,f=f.filter(Q=>Q.id!==V))},T=V=>{const Q=f.find(re=>re.id===V),me=rt(Ee({},Q),{id:Br.generate()});t(0,f=[...f,me])};function N(V,Q){r.$$.not_equal(Q.constraint,V)&&(Q.constraint=V,t(0,f))}function D(V,Q){r.$$.not_equal(Q.valueType,V)&&(Q.valueType=V,t(0,f))}const G=(V,Q,me,re)=>t(0,Q[me].value=re.detail,f);function j(V,Q){r.$$.not_equal(Q.value,V)&&(Q.value=V,t(0,f))}function B(V,Q){r.$$.not_equal(Q.value,V)&&(Q.value=V,t(0,f))}function q(V,Q){r.$$.not_equal(Q.value,V)&&(Q.value=V,t(0,f))}function U(V,Q){r.$$.not_equal(Q.value,V)&&(Q.value=V,t(0,f))}const J=(V,Q,me,re)=>t(0,Q[me].error=re.detail,f),F=V=>T(V.id),W=V=>S(V.id);return r.$$set=V=>{"rules"in V&&t(0,f=V.rules),"bindings"in V&&t(1,c=V.bindings),"type"in V&&t(9,p=V.type)},r.$$.update=()=>{r.$$.dirty[0]&6144&&t(2,n=v(u,a)),r.$$.dirty[0]&2048&&t(3,i=a==null?void 0:a.field),r.$$.dirty[0]&12&&t(5,s=C(i,n||{})),r.$$.dirty[0]&512&&t(10,l=(p==null?void 0:p.split("/")[1])||"string"),r.$$.dirty[0]&1024&&t(4,o=h(l))},[f,c,n,i,o,s,I,S,T,p,l,a,u,N,D,G,j,B,q,U,J,F,W]}class Tie extends se{constructor(e){super();le(this,e,Oie,Sie,ne,{rules:0,bindings:1,type:9},null,[-1,-1])}}function Iie(r){let e;return{c(){e=H("Configure validation")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Lie(r){let e;return{c(){e=H("Configure validation rules for this field.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Pie(r){let e;return{c(){e=H("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Nie(r){let e,t;return e=new ut({props:{cta:!0,slot:"buttons",$$slots:{default:[Pie]},$$scope:{ctx:r}}}),e.$on("click",r[5]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&512&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Rie(r){let e,t,n;function i(l){r[6](l)}let s={slot:"body",type:r[3],bindings:r[1],componentDefinition:r[2]};return r[0]!==void 0&&(s.rules=r[0]),e=new Tie({props:s}),Z.push(()=>ce(e,"rules",i)),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){const a={};o&8&&(a.type=l[3]),o&2&&(a.bindings=l[1]),o&4&&(a.componentDefinition=l[2]),!t&&o&1&&(t=!0,a.rules=l[0],pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function Mie(r){let e,t,n,i;e=new Gt({props:{$$slots:{default:[Iie]},$$scope:{ctx:r}}}),e.$on("click",function(){dt(r[4].show)&&r[4].show.apply(this,arguments)});let s={title:"Validation Rules",$$slots:{body:[Rie],buttons:[Nie],description:[Lie]},$$scope:{ctx:r}};return n=new ci({props:s}),r[7](n),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(l,o){E(e,l,o),$(l,t,o),E(n,l,o),i=!0},p(l,[o]){r=l;const a={};o&512&&(a.$$scope={dirty:o,ctx:r}),e.$set(a);const u={};o&527&&(u.$$scope={dirty:o,ctx:r}),n.$set(u)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){O(e,l),l&&b(t),r[7](null),O(n,l)}}}function Die(r,e,t){let{value:n=[]}=e,{bindings:i=[]}=e,{componentDefinition:s}=e,{type:l}=e,o;const a=mt(),u=()=>{a("change",n),o.hide()};function f(p){n=p,t(0,n)}function c(p){Z[p?"unshift":"push"](()=>{o=p,t(4,o)})}return r.$$set=p=>{"value"in p&&t(0,n=p.value),"bindings"in p&&t(1,i=p.bindings),"componentDefinition"in p&&t(2,s=p.componentDefinition),"type"in p&&t(3,l=p.type)},[n,i,s,l,o,u,f,c]}class Al extends se{constructor(e){super();le(this,e,Die,Mie,ne,{value:0,bindings:1,componentDefinition:2,type:3})}}function Mw(r,e,t){const n=r.slice();return n[16]=e[t],n[17]=e,n[18]=t,n}function jie(r){let e,t,n,i,s;return i=new Je({props:{size:"S",$$slots:{default:[zie]},$$scope:{ctx:r}}}),{c(){e=M("div"),t=M("div"),n=R(),A(i.$$.fragment),y(e,"class","column svelte-1thtvxm")},m(l,o){$(l,e,o),P(e,t),P(e,n),E(i,e,null),s=!0},p(l,o){const a={};o&524288&&(a.$$scope={dirty:o,ctx:l}),i.$set(a)},i(l){s||(m(i.$$.fragment,l),s=!0)},o(l){_(i.$$.fragment,l),s=!1},d(l){l&&b(e),O(i)}}}function Bie(r){let e,t;return e=new Qe({props:{noPadding:!0,gap:"XS",$$slots:{default:[Fie]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&524291&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function zie(r){let e;return{c(){e=H("Add the first column to your table.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function qie(r){let e;return{c(){e=H("Column")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Uie(r){let e;return{c(){e=H("Label")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Dw(r,e){let t,n,i,s,l,o,a,u,f,c,p,d,g,h,v=Te,C,k,I;i=new pt({props:{name:"DragHandle",size:"XL"}});function S(B){e[10](B,e[16])}function T(...B){return e[11](e[16],e[17],e[18],...B)}let N={placeholder:"Column",options:e[2](e[16].name)};e[16].name!==void 0&&(N.value=e[16].name),o=new Ke({props:N}),Z.push(()=>ce(o,"value",S)),o.$on("change",T);function D(B){e[12](B,e[16])}let G={placeholder:"Label"};e[16].displayName!==void 0&&(G.value=e[16].displayName),f=new et({props:G}),Z.push(()=>ce(f,"value",D));function j(){return e[13](e[16])}return d=new pt({props:{name:"Close",hoverable:!0,size:"S",disabled:e[0].length===1}}),d.$on("click",j),{key:r,first:null,c(){t=M("div"),n=M("div"),A(i.$$.fragment),l=R(),A(o.$$.fragment),u=R(),A(f.$$.fragment),p=R(),A(d.$$.fragment),g=R(),y(n,"class","handle svelte-1thtvxm"),y(n,"aria-label","drag-handle"),y(n,"style",s=e[1]?"cursor: grab":"cursor: grabbing"),y(t,"class","column svelte-1thtvxm"),this.first=t},m(B,q){$(B,t,q),P(t,n),E(i,n,null),P(t,l),E(o,t,null),P(t,u),E(f,t,null),P(t,p),E(d,t,null),P(t,g),C=!0,k||(I=Le(n,"mousedown",e[9]),k=!0)},p(B,q){e=B,(!C||q&2&&s!==(s=e[1]?"cursor: grab":"cursor: grabbing"))&&y(n,"style",s);const U={};q&1&&(U.options=e[2](e[16].name)),!a&&q&1&&(a=!0,U.value=e[16].name,pe(()=>a=!1)),o.$set(U);const J={};!c&&q&1&&(c=!0,J.value=e[16].displayName,pe(()=>c=!1)),f.$set(J);const F={};q&1&&(F.disabled=e[0].length===1),d.$set(F)},r(){h=t.getBoundingClientRect()},f(){Bo(t),v()},a(){v(),v=zo(t,h,qo,{duration:P1})},i(B){C||(m(i.$$.fragment,B),m(o.$$.fragment,B),m(f.$$.fragment,B),m(d.$$.fragment,B),C=!0)},o(B){_(i.$$.fragment,B),_(o.$$.fragment,B),_(f.$$.fragment,B),_(d.$$.fragment,B),C=!1},d(B){B&&b(t),O(i),O(o),O(f),O(d),k=!1,I()}}}function Fie(r){let e,t,n,i,s,l,o,a,u,f,c=[],p=new Map,d,g,h,v;i=new xe({props:{size:"L",$$slots:{default:[qie]},$$scope:{ctx:r}}}),l=new xe({props:{size:"L",$$slots:{default:[Uie]},$$scope:{ctx:r}}});let C=r[0];const k=I=>I[16].id;for(let I=0;I<C.length;I+=1){let S=Mw(r,C,I),T=k(S);p.set(T,c[I]=Dw(T,S))}return{c(){e=M("div"),t=M("div"),n=R(),A(i.$$.fragment),s=R(),A(l.$$.fragment),o=R(),a=M("div"),u=R(),f=M("div");for(let I=0;I<c.length;I+=1)c[I].c();y(e,"class","column svelte-1thtvxm"),y(f,"class","columns svelte-1thtvxm")},m(I,S){$(I,e,S),P(e,t),P(e,n),E(i,e,null),P(e,s),E(l,e,null),P(e,o),P(e,a),$(I,u,S),$(I,f,S);for(let T=0;T<c.length;T+=1)c[T].m(f,null);g=!0,h||(v=[$r(d=Tu.call(null,f,{items:r[0],flipDurationMs:P1,dropTargetStyle:{outline:"none"},dragDisabled:r[1]})),Le(f,"finalize",r[6]),Le(f,"consider",r[5])],h=!0)},p(I,S){const T={};S&524288&&(T.$$scope={dirty:S,ctx:I}),i.$set(T);const N={};if(S&524288&&(N.$$scope={dirty:S,ctx:I}),l.$set(N),S&23){C=I[0],ee();for(let D=0;D<c.length;D+=1)c[D].r();c=er(c,S,k,1,I,C,p,f,jo,Dw,null,Mw);for(let D=0;D<c.length;D+=1)c[D].a();te()}d&&dt(d.update)&&S&3&&d.update.call(null,{items:I[0],flipDurationMs:P1,dropTargetStyle:{outline:"none"},dragDisabled:I[1]})},i(I){if(!g){m(i.$$.fragment,I),m(l.$$.fragment,I);for(let S=0;S<C.length;S+=1)m(c[S]);g=!0}},o(I){_(i.$$.fragment,I),_(l.$$.fragment,I);for(let S=0;S<c.length;S+=1)_(c[S]);g=!1},d(I){I&&b(e),O(i),O(l),I&&b(u),I&&b(f);for(let S=0;S<c.length;S+=1)c[S].d();h=!1,En(v)}}}function Vie(r){let e;return{c(){e=H("Add column")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Hie(r){let e;return{c(){e=H("Reset columns")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Wie(r){let e,t,n,i,s,l,o,a,u,f,c,p;const d=[Bie,jie],g=[];function h(v,C){var k;return((k=v[0])==null?void 0:k.length)?0:1}return e=h(r),t=g[e]=d[e](r),u=new ut({props:{secondary:!0,icon:"Add",$$slots:{default:[Vie]},$$scope:{ctx:r}}}),u.$on("click",r[3]),c=new ut({props:{secondary:!0,quiet:!0,$$slots:{default:[Hie]},$$scope:{ctx:r}}}),c.$on("click",r[7]),{c(){t.c(),n=R(),i=M("div"),s=M("div"),l=M("div"),o=R(),a=M("div"),A(u.$$.fragment),f=R(),A(c.$$.fragment),y(a,"class","buttons svelte-1thtvxm"),y(s,"class","column svelte-1thtvxm"),y(i,"class","columns svelte-1thtvxm")},m(v,C){g[e].m(v,C),$(v,n,C),$(v,i,C),P(i,s),P(s,l),P(s,o),P(s,a),E(u,a,null),P(a,f),E(c,a,null),p=!0},p(v,C){let k=e;e=h(v),e===k?g[e].p(v,C):(ee(),_(g[k],1,1,()=>{g[k]=null}),te(),t=g[e],t?t.p(v,C):(t=g[e]=d[e](v),t.c()),m(t,1),t.m(n.parentNode,n));const I={};C&524288&&(I.$$scope={dirty:C,ctx:v}),u.$set(I);const S={};C&524288&&(S.$$scope={dirty:C,ctx:v}),c.$set(S)},i(v){p||(m(t),m(u.$$.fragment,v),m(c.$$.fragment,v),p=!0)},o(v){_(t),_(u.$$.fragment,v),_(c.$$.fragment,v),p=!1},d(v){g[e].d(v),v&&b(n),v&&b(i),O(u),O(c)}}}function Gie(r){let e,t,n;return t=new Qe({props:{noPadding:!0,gap:"S",$$slots:{default:[Wie]},$$scope:{ctx:r}}}),{c(){e=M("div"),A(t.$$.fragment),y(e,"class","container svelte-1thtvxm")},m(i,s){$(i,e,s),E(t,e,null),n=!0},p(i,s){const l={};s&524291&&(l.$$scope={dirty:s,ctx:i}),t.$set(l)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function Yie(r){let e,t;return e=new Fi({props:{$$slots:{default:[Gie]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,[i]){const s={};i&524291&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}const P1=150;function Jie(r,e,t){let n,{columns:i=[]}=e,{options:s=[]}=e,l=!0;const o=(I,S)=>{let T={};return I.forEach(N=>{T[N]=!0}),S==null||S.forEach(N=>{delete T[N.name]}),Object.keys(T)},a=I=>!I||n.includes(I)?n:[I,...n],u=()=>{t(0,i=[...i,{}])},f=I=>{t(0,i=i.filter(S=>S.id!==I))},c=I=>{t(0,i=I.detail.items)},p=I=>{c(I),t(1,l=!0)},d=()=>{t(0,i=s.map(I=>({name:I,displayName:I})))},g=()=>t(1,l=!1);function h(I,S){r.$$.not_equal(S.name,I)&&(S.name=I,t(0,i))}const v=(I,S,T,N)=>t(0,S[T].displayName=N.detail,i);function C(I,S){r.$$.not_equal(S.displayName,I)&&(S.displayName=I,t(0,i))}const k=I=>f(I.id);return r.$$set=I=>{"columns"in I&&t(0,i=I.columns),"options"in I&&t(8,s=I.options)},r.$$.update=()=>{r.$$.dirty&257&&(n=o(s,i)),r.$$.dirty&1&&i.forEach(I=>{I.id||(I.id=Br.generate())})},[i,l,a,u,f,c,p,d,s,g,h,v,C,k]}class Qie extends se{constructor(e){super();le(this,e,Jie,Yie,ne,{columns:0,options:8})}}function Xie(r){let e;return{c(){e=H("Configure columns")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Kie(r){let e;return{c(){e=H("Configure the columns in your table.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Zie(r){let e;return{c(){e=H("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function xie(r){let e,t;return e=new ut({props:{cta:!0,slot:"buttons",$$slots:{default:[Zie]},$$scope:{ctx:r}}}),e.$on("click",r[3]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&32768&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function ese(r){let e,t,n;function i(l){r[10](l)}let s={slot:"body",options:r[0]};return r[2]!==void 0&&(s.columns=r[2]),e=new Qie({props:s}),Z.push(()=>ce(e,"columns",i)),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){const a={};o&1&&(a.options=l[0]),!t&&o&4&&(t=!0,a.columns=l[2],pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function tse(r){let e,t,n,i;e=new Gt({props:{$$slots:{default:[Xie]},$$scope:{ctx:r}}}),e.$on("click",function(){dt(r[1].show)&&r[1].show.apply(this,arguments)});let s={title:"Table Columns",$$slots:{body:[ese],buttons:[xie],description:[Kie]},$$scope:{ctx:r}};return n=new ci({props:s}),r[11](n),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(l,o){E(e,l,o),$(l,t,o),E(n,l,o),i=!0},p(l,[o]){r=l;const a={};o&32768&&(a.$$scope={dirty:o,ctx:r}),e.$set(a);const u={};o&32773&&(u.$$scope={dirty:o,ctx:r}),n.$set(u)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){O(e,l),l&&b(t),r[11](null),O(n,l)}}}function nse(r,e,t){let n,i,s,l,o;ue(r,dn,k=>t(9,o=k));let{componentInstance:a}=e,{value:u=[]}=e;const f=mt();let c,p;const d=k=>{t(2,p=hn.cloneDeep(k))},g=(k,I)=>!Array.isArray(k)||!k.length?I.map(S=>({name:S,displayName:S})):(typeof k[0]=="string"&&(k=k.map(S=>({name:S,displayName:S}))),k.filter(S=>I.includes(S.name))),h=()=>{f("change",g(p,s)),c.hide()};function v(k){p=k,t(2,p)}function C(k){Z[k?"unshift":"push"](()=>{c=k,t(1,c)})}return r.$$set=k=>{"componentInstance"in k&&t(4,a=k.componentInstance),"value"in k&&t(5,u=k.value)},r.$$.update=()=>{r.$$.dirty&528&&t(8,n=ks(o,a)),r.$$.dirty&768&&t(7,i=Ni(o,n).schema),r.$$.dirty&128&&t(0,s=Object.keys(i||{})),r.$$.dirty&33&&t(6,l=g(u,s)),r.$$.dirty&64&&d(l)},[s,c,p,h,a,u,l,i,n,o,v,C]}class rse extends se{constructor(e){super();le(this,e,nse,tse,ne,{componentInstance:4,value:5})}}const ise={text:Sw,select:Ke,dataSource:z6,"dataSource/s3":uee,dataProvider:dee,boolean:pi,number:S_,event:Pne,table:Dne,color:T1,icon:Jne,field:Kne,multifield:ere,searchfield:rre,options:iie,schema:lre,section:dre,navigation:Ere,filter:Rre,url:Vre,columns:rse,"field/string":es,"field/number":es,"field/options":es,"field/boolean":es,"field/longform":es,"field/datetime":es,"field/attachment":es,"field/link":es,"field/array":es,"field/json":es,"validation/string":Al,"validation/array":Al,"validation/number":Al,"validation/boolean":Al,"validation/datetime":Al,"validation/attachment":Al,"validation/link":Al},rc=r=>ise[r];function jw(r,e,t){const n=r.slice();return n[15]=e[t],n[17]=t,n}function Bw(r,e,t){const n=r.slice();return n[18]=e[t],n}function zw(r){let e,t;return e=new Ta({props:{control:et,label:"Name",key:"_instanceName",value:r[1]._instanceName,onChange:r[9]}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&2&&(s.value=n[1]._instanceName),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function qw(r){var i,s;let e,t;function n(...l){return r[10](r[18],...l)}return e=new Ta({props:{type:r[18].type,control:rc(r[18].type),label:r[18].label,key:r[18].key,value:(s=r[1][r[18].key])!=null?s:(i=r[1][r[18].key])==null?void 0:i.defaultValue,nested:r[18].nested,onChange:n,props:{options:r[18].options||[],placeholder:r[18].placeholder||null,min:r[18].min||null,max:r[18].max||null},bindings:r[2],componentBindings:r[3],componentInstance:r[1],componentDefinition:r[0]}}),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),t=!0},p(l,o){var u,f;r=l;const a={};o&16&&(a.type=r[18].type),o&16&&(a.control=rc(r[18].type)),o&16&&(a.label=r[18].label),o&16&&(a.key=r[18].key),o&18&&(a.value=(f=r[1][r[18].key])!=null?f:(u=r[1][r[18].key])==null?void 0:u.defaultValue),o&16&&(a.nested=r[18].nested),o&16&&(a.onChange=n),o&16&&(a.props={options:r[18].options||[],placeholder:r[18].placeholder||null,min:r[18].min||null,max:r[18].max||null}),o&4&&(a.bindings=r[2]),o&8&&(a.componentBindings=r[3]),o&2&&(a.componentInstance=r[1]),o&1&&(a.componentDefinition=r[0]),e.$set(a)},i(l){t||(m(e.$$.fragment,l),t=!0)},o(l){_(e.$$.fragment,l),t=!1},d(l){O(e,l)}}}function Uw(r,e){let t,n=e[6](e[18]),i,s,l=n&&qw(e);return{key:r,first:null,c(){t=Oe(),l&&l.c(),i=Oe(),this.first=t},m(o,a){$(o,t,a),l&&l.m(o,a),$(o,i,a),s=!0},p(o,a){e=o,a&16&&(n=e[6](e[18])),n?l?(l.p(e,a),a&16&&m(l,1)):(l=qw(e),l.c(),m(l,1),l.m(i.parentNode,i)):l&&(ee(),_(l,1,1,()=>{l=null}),te())},i(o){s||(m(l),s=!0)},o(o){_(l),s=!1},d(o){o&&b(t),l&&l.d(o),o&&b(i)}}}function Fw(r){let e,t;return e=new Hx({props:{componentInstance:r[1]}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&2&&(s.componentInstance=n[1]),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Vw(r){let e,t=r[15].info+"";return{c(){e=M("div"),y(e,"class","text svelte-1hyi8iv")},m(n,i){$(n,e,i),e.innerHTML=t},p(n,i){i&16&&t!==(t=n[15].info+"")&&(e.innerHTML=t)},d(n){n&&b(e)}}}function sse(r){var h,v,C;let e=r[17]===0&&!r[1]._component.endsWith("/layout"),t,n=[],i=new Map,s,l=r[17]===0&&((v=(h=r[0])==null?void 0:h.component)==null?void 0:v.endsWith("/fieldgroup")),o,a,u,f=e&&zw(r),c=r[15].settings;const p=k=>k[18].key;for(let k=0;k<c.length;k+=1){let I=Bw(r,c,k),S=p(I);i.set(S,n[k]=Uw(S,I))}let d=l&&Fw(r),g=((C=r[15])==null?void 0:C.info)&&Vw(r);return{c(){f&&f.c(),t=R();for(let k=0;k<n.length;k+=1)n[k].c();s=R(),d&&d.c(),o=R(),g&&g.c(),a=R()},m(k,I){f&&f.m(k,I),$(k,t,I);for(let S=0;S<n.length;S+=1)n[S].m(k,I);$(k,s,I),d&&d.m(k,I),$(k,o,I),g&&g.m(k,I),$(k,a,I),u=!0},p(k,I){var S,T,N;I&18&&(e=k[17]===0&&!k[1]._component.endsWith("/layout")),e?f?(f.p(k,I),I&18&&m(f,1)):(f=zw(k),f.c(),m(f,1),f.m(t.parentNode,t)):f&&(ee(),_(f,1,1,()=>{f=null}),te()),I&127&&(c=k[15].settings,ee(),n=er(n,I,p,1,k,c,i,s.parentNode,jr,Uw,s,Bw),te()),I&17&&(l=k[17]===0&&((T=(S=k[0])==null?void 0:S.component)==null?void 0:T.endsWith("/fieldgroup"))),l?d?(d.p(k,I),I&17&&m(d,1)):(d=Fw(k),d.c(),m(d,1),d.m(o.parentNode,o)):d&&(ee(),_(d,1,1,()=>{d=null}),te()),((N=k[15])==null?void 0:N.info)?g?g.p(k,I):(g=Vw(k),g.c(),g.m(a.parentNode,a)):g&&(g.d(1),g=null)},i(k){if(!u){m(f);for(let I=0;I<c.length;I+=1)m(n[I]);m(d),u=!0}},o(k){_(f);for(let I=0;I<n.length;I+=1)_(n[I]);_(d),u=!1},d(k){f&&f.d(k),k&&b(t);for(let I=0;I<n.length;I+=1)n[I].d(k);k&&b(s),d&&d.d(k),k&&b(o),g&&g.d(k),k&&b(a)}}}function Hw(r,e){let t,n,i;return n=new Fo({props:{name:e[15].name,collapsible:!1,$$slots:{default:[sse]},$$scope:{ctx:e}}}),{key:r,first:null,c(){t=Oe(),A(n.$$.fragment),this.first=t},m(s,l){$(s,t,l),E(n,s,l),i=!0},p(s,l){e=s;const o={};l&16&&(o.name=e[15].name),l&2097183&&(o.$$scope={dirty:l,ctx:e}),n.$set(o)},i(s){i||(m(n.$$.fragment,s),i=!0)},o(s){_(n.$$.fragment,s),i=!1},d(s){s&&b(t),O(n,s)}}}function lse(r){let e=[],t=new Map,n,i,s=r[4];const l=o=>o[15].name;for(let o=0;o<s.length;o+=1){let a=jw(r,s,o),u=l(a);t.set(u,e[o]=Hw(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=Oe()},m(o,a){for(let u=0;u<e.length;u+=1)e[u].m(o,a);$(o,n,a),i=!0},p(o,[a]){a&127&&(s=o[4],ee(),e=er(e,a,l,1,o,s,t,n.parentNode,jr,Hw,n,jw),te())},i(o){if(!i){for(let a=0;a<s.length;a+=1)m(e[a]);i=!0}},o(o){for(let a=0;a<e.length;a+=1)_(e[a]);i=!1},d(o){for(let a=0;a<e.length;a+=1)e[a].d(o);o&&b(n)}}}function ose(r,e,t){let n,i,{componentDefinition:s}=e,{componentInstance:l}=e,{assetInstance:o}=e,{bindings:a}=e,{componentBindings:u}=e;const f=h=>{var I;const v=(I=h==null?void 0:h.settings)!=null?I:[],C=v.filter(S=>!S.section),k=v.filter(S=>S.section);return[{name:"General",info:s==null?void 0:s.info,settings:C},...k||[]]},c=async(h,v)=>{try{await Ye.actions.components.updateProp(h,v)}catch{ye.error("Error updating component prop")}},p=h=>{if(!rc(h==null?void 0:h.type))return!1;if(h.dependsOn){let C=h.dependsOn,k=null;if(typeof h.dependsOn=="object"&&(C=h.dependsOn.setting,k=h.dependsOn.value),!C)return!1;if(k==null){const I=l[C];return I===!1?!1:I===!0?!0:!hn.isEmpty(I)}return l[C]===k}return!0},d=h=>c("_instanceName",h),g=(h,v)=>c(h.key,v);return r.$$set=h=>{"componentDefinition"in h&&t(0,s=h.componentDefinition),"componentInstance"in h&&t(1,l=h.componentInstance),"assetInstance"in h&&t(7,o=h.assetInstance),"bindings"in h&&t(2,a=h.bindings),"componentBindings"in h&&t(3,u=h.componentBindings)},r.$$.update=()=>{r.$$.dirty&1&&t(4,n=f(s)),r.$$.dirty&128&&t(8,i=o&&o.favicon),r.$$.dirty&256},[s,l,a,u,n,c,p,o,i,d,g]}class ase extends se{constructor(e){super();le(this,e,ose,lse,ne,{componentDefinition:0,componentInstance:1,assetInstance:7,bindings:2,componentBindings:3})}}function Ww(r,e,t){const n=r.slice();return n[11]=e[t],n}function Gw(r,e){let t,n,i,s;function l(...o){return e[10](e[11],...o)}return n=new Ta({props:{label:`${e[11].label}${e[7](e[5],e[11])?" *":""}`,control:e[11].control,key:e[11].key,value:e[5][e[11].key],onChange:l,props:e[8](e[11]),bindings:e[4]}}),{key:r,first:null,c(){t=M("div"),A(n.$$.fragment),i=R(),Ft(t,"grid-column",e[11].column||"auto"),this.first=t},m(o,a){$(o,t,a),E(n,t,null),P(t,i),s=!0},p(o,a){e=o;const u={};a&36&&(u.label=`${e[11].label}${e[7](e[5],e[11])?" *":""}`),a&4&&(u.control=e[11].control),a&4&&(u.key=e[11].key),a&36&&(u.value=e[5][e[11].key]),a&4&&(u.onChange=l),a&4&&(u.props=e[8](e[11])),a&16&&(u.bindings=e[4]),n.$set(u),(!s||a&4)&&Ft(t,"grid-column",e[11].column||"auto")},i(o){s||(m(n.$$.fragment,o),s=!0)},o(o){_(n.$$.fragment,o),s=!1},d(o){o&&b(t),O(n)}}}function use(r){let e,t=[],n=new Map,i,s=r[2];const l=o=>`${o[3]._id}-${o[11].key}-${o[11].label}`;for(let o=0;o<s.length;o+=1){let a=Ww(r,s,o),u=l(a);n.set(u,t[o]=Gw(u,a))}return{c(){e=M("div");for(let o=0;o<t.length;o+=1)t[o].c();y(e,"class","group-content svelte-1u21n8y"),Ft(e,"grid-template-columns",r[1]||"1fr")},m(o,a){$(o,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);i=!0},p(o,a){a&956&&(s=o[2],ee(),t=er(t,a,l,1,o,s,n,e,jr,Gw,null,Ww),te()),(!i||a&2)&&Ft(e,"grid-template-columns",o[1]||"1fr")},i(o){if(!i){for(let a=0;a<s.length;a+=1)m(t[a]);i=!0}},o(o){for(let a=0;a<t.length;a+=1)_(t[a]);i=!1},d(o){o&&b(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function fse(r){let e,t;return e=new Fo({props:{collapsible:!1,name:`${r[0]}${r[6]?" *":""}`,$$slots:{default:[use]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,[i]){const s={};i&65&&(s.name=`${n[0]}${n[6]?" *":""}`),i&16438&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function cse(r,e,t){let n,i,{name:s}=e,{columns:l}=e,{properties:o}=e,{componentInstance:a}=e,{bindings:u=[]}=e;const f=(g,h)=>g[h.key]!=null&&g[h.key]!=="",c=g=>{let h=Ee({},g||{});return delete h.label,delete h.key,delete h.control,h},p=async(g,h)=>{try{await Ye.actions.components.updateStyle(g,h)}catch{ye.error("Error updating style")}},d=(g,h)=>p(g.key,h);return r.$$set=g=>{"name"in g&&t(0,s=g.name),"columns"in g&&t(1,l=g.columns),"properties"in g&&t(2,o=g.properties),"componentInstance"in g&&t(3,a=g.componentInstance),"bindings"in g&&t(4,u=g.bindings)},r.$$.update=()=>{var g;r.$$.dirty&8&&t(5,n=a._styles.normal||{}),r.$$.dirty&36&&t(6,i=(g=o==null?void 0:o.some(h=>f(n,h)))!=null?g:!1)},[s,l,o,a,u,n,i,f,c,p,d]}class pse extends se{constructor(e){super();le(this,e,cse,fse,ne,{name:0,columns:1,properties:2,componentInstance:3,bindings:4})}}const Yw={label:"Margin",columns:"1fr 1fr",settings:[{label:"Top",key:"margin-top",control:Ke,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]},{label:"Right",key:"margin-right",control:Ke,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]},{label:"Bottom",key:"margin-bottom",control:Ke,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]},{label:"Left",key:"margin-left",control:Ke,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]}]},dse={label:"Padding",columns:"1fr 1fr",settings:[{label:"Top",key:"padding-top",control:Ke,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]},{label:"Right",key:"padding-right",control:Ke,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]},{label:"Bottom",key:"padding-bottom",control:Ke,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]},{label:"Left",key:"padding-left",control:Ke,placeholder:"None",options:[{label:"4px",value:"4px"},{label:"8px",value:"8px"},{label:"12px",value:"12px"},{label:"16px",value:"16px"},{label:"20px",value:"20px"},{label:"32px",value:"32px"},{label:"48px",value:"48px"},{label:"64px",value:"64px"},{label:"128px",value:"128px"},{label:"256px",value:"256px"},{label:"Auto",value:"auto"},{label:"100%",value:"100%"}]}]},mse={label:"Size",columns:"1fr 1fr",settings:[{label:"Width",key:"width",control:et,placeholder:"Auto"},{label:"Height",key:"height",control:et,placeholder:"Auto"}]},gse={label:"Background",columns:"auto 1fr",settings:[{label:"Color",key:"background",control:T1},{label:"Gradient",key:"background-image",control:Ke,options:[{label:"Warm Flame",value:"linear-gradient(45deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%);"},{label:"Night Fade",value:"linear-gradient(to top, #a18cd1 0%, #fbc2eb 100%);"},{label:"Spring Warmth",value:"linear-gradient(to top, #fad0c4 0%, #ffd1ff 100%);"},{label:"Sunny Morning",value:"linear-gradient(120deg, #f6d365 0%, #fda085 100%);"},{label:"Winter Neva",value:"linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);"},{label:"Tempting Azure",value:"linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);"},{label:"Heavy Rain",value:"linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%);"},{label:"Deep Blue",value:"linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%);"},{label:"Near Moon",value:"linear-gradient(to top, #5ee7df 0%, #b490ca 100%);"},{label:"Wild Apple",value:"linear-gradient(to top, #d299c2 0%, #fef9d7 100%);"},{label:"Plum Plate",value:"linear-gradient(135deg, #667eea 0%, #764ba2 100%);"},{label:"Peach Kiss",value:"radial-gradient(circle farthest-corner at 50% 100%,rgba(255,173,138,.50), rgba(255,248,247,1) 100%);"},{label:"Flamingo Sunrise",value:"-webkit-radial-gradient(center top, rgb(255, 250, 245), rgb(255, 242, 242))"},{label:"Budi Mist",value:"radial-gradient(circle, rgba(252,215,212,1) 0%, rgba(255,227,214,1) 50%, rgba(207,218,255,1) 100%);"},{label:"Ballet Slipper",value:"linear-gradient(135deg, rgba(252,215,212,1) 20%, rgba(207,218,255,1) 100%);"},{label:"Black Noir",value:"linear-gradient(312deg, rgba(60,60,60,1) 0%, rgba(42,42,42,1) 100%);"}]}]},_se={label:"Border",columns:"1fr 1fr",settings:[{label:"Color",key:"border-color",control:T1},{label:"Width",key:"border-width",control:Ke,column:"1 / 2",placeholder:"None",options:[{label:"Small",value:"1px"},{label:"Medium",value:"2px"},{label:"Large",value:"4px"}]},{label:"Style",key:"border-style",control:Ke,column:"2 / 3",placeholder:"None",options:[{label:"Solid",value:"solid"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"}]},{label:"Radius",key:"border-radius",control:Ke,placeholder:"None",options:[{label:"Small",value:"0.25rem"},{label:"Medium",value:"0.5rem"},{label:"Large",value:"1rem"},{label:"Round",value:"100%"}]},{label:"Shadow",key:"box-shadow",control:Ke,placeholder:"None",options:[{label:"Small",value:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)"},{label:"Medium",value:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},{label:"Large",value:"0 8px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"}]}]},N1=[Yw];var Jw=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",margin:Yw,padding:dse,size:mse,background:gse,border:_se,all:N1});function Qw(r,e,t){const n=r.slice();return n[5]=e[t],n}function Xw(r){let e,t,n=r[2],i=[];for(let l=0;l<n.length;l+=1)i[l]=Kw(Qw(r,n,l));const s=l=>_(i[l],1,1,()=>{i[l]=null});return{c(){for(let l=0;l<i.length;l+=1)i[l].c();e=Oe()},m(l,o){for(let a=0;a<i.length;a+=1)i[a].m(l,o);$(l,e,o),t=!0},p(l,o){if(o&7){n=l[2];let a;for(a=0;a<n.length;a+=1){const u=Qw(l,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=Kw(u),i[a].c(),m(i[a],1),i[a].m(e.parentNode,e))}for(ee(),a=n.length;a<i.length;a+=1)s(a);te()}},i(l){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(l){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(l){_t(i,l),l&&b(e)}}}function Kw(r){let e,t;return e=new pse({props:{style:r[5],name:r[5].label,columns:r[5].columns,properties:r[5].settings,componentInstance:r[0],bindings:r[1]}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&4&&(s.style=n[5]),i&4&&(s.name=n[5].label),i&4&&(s.columns=n[5].columns),i&4&&(s.properties=n[5].settings),i&1&&(s.componentInstance=n[0]),i&2&&(s.bindings=n[1]),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function hse(r){var i;let e,t,n=((i=r[2])==null?void 0:i.length)>0&&Xw(r);return{c(){n&&n.c(),e=Oe()},m(s,l){n&&n.m(s,l),$(s,e,l),t=!0},p(s,[l]){var o;((o=s[2])==null?void 0:o.length)>0?n?(n.p(s,l),l&4&&m(n,1)):(n=Xw(s),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(ee(),_(n,1,1,()=>{n=null}),te())},i(s){t||(m(n),t=!0)},o(s){_(n),t=!1},d(s){n&&n.d(s),s&&b(e)}}}function $se(r,e,t){let n,{componentDefinition:i}=e,{componentInstance:s}=e,{bindings:l}=e;const o=a=>{var f;if(!((f=a==null?void 0:a.styles)==null?void 0:f.length))return[...N1];let u=[...N1];return a.styles.forEach(c=>{Jw[c]&&u.push(Jw[c])}),u};return r.$$set=a=>{"componentDefinition"in a&&t(3,i=a.componentDefinition),"componentInstance"in a&&t(0,s=a.componentInstance),"bindings"in a&&t(1,l=a.bindings)},r.$$.update=()=>{r.$$.dirty&8&&t(2,n=o(i))},[s,l,n,i]}class bse extends se{constructor(e){super();le(this,e,$se,hse,ne,{componentDefinition:3,componentInstance:0,bindings:1})}}function vse(r){let e;return{c(){e=H("Edit custom CSS")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function wse(r){let e,t,n;return t=new Gt({props:{$$slots:{default:[vse]},$$scope:{ctx:r}}}),t.$on("click",r[3]),{c(){e=M("div"),A(t.$$.fragment)},m(i,s){$(i,e,s),E(t,e,null),n=!0},p(i,s){const l={};s&128&&(l.$$scope={dirty:s,ctx:i}),t.$set(l)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function yse(r){let e;return{c(){e=H("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function kse(r){let e,t;return e=new ut({props:{cta:!0,slot:"buttons",$$slots:{default:[yse]},$$scope:{ctx:r}}}),e.$on("click",r[4]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&128&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Cse(r){let e;return{c(){e=H("Custom CSS overrides all other component styles.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Sse(r){let e,t,n,i,s;e=new Je({props:{size:"S",$$slots:{default:[Cse]},$$scope:{ctx:r}}});function l(a){r[5](a)}let o={placeholder:"Enter some CSS..."};return r[1]!==void 0&&(o.value=r[1]),n=new Xr({props:o}),Z.push(()=>ce(n,"value",l)),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(a,u){E(e,a,u),$(a,t,u),E(n,a,u),s=!0},p(a,u){const f={};u&128&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const c={};!i&&u&2&&(i=!0,c.value=a[1],pe(()=>i=!1)),n.$set(c)},i(a){s||(m(e.$$.fragment,a),m(n.$$.fragment,a),s=!0)},o(a){_(e.$$.fragment,a),_(n.$$.fragment,a),s=!1},d(a){O(e,a),a&&b(t),O(n,a)}}}function Ase(r){let e,t,n;return t=new Qe({props:{gap:"S",noPadding:!0,$$slots:{default:[Sse]},$$scope:{ctx:r}}}),{c(){e=M("div"),A(t.$$.fragment),y(e,"class","content svelte-ernmz2")},m(i,s){$(i,e,s),E(t,e,null),n=!0},p(i,s){const l={};s&130&&(l.$$scope={dirty:s,ctx:i}),t.$set(l)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function Ese(r){let e,t;return e=new Fi({props:{slot:"body",$$slots:{default:[Ase]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&130&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Zw(r){let e,t,n={title:"Custom CSS",$$slots:{body:[Ese],buttons:[kse]},$$scope:{ctx:r}};return e=new ci({props:n}),r[6](e),{c(){A(e.$$.fragment)},m(i,s){E(e,i,s),t=!0},p(i,s){const l={};s&130&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){r[6](null),O(e,i)}}}function Ose(r){var o,a,u;let e,t,n=(o=r[0])==null?void 0:o._id,i,s;e=new Fo({props:{name:`Custom CSS${((u=(a=r[0])==null?void 0:a._styles)==null?void 0:u.custom)?" *":""}`,collapsible:!1,$$slots:{default:[wse]},$$scope:{ctx:r}}});let l=Zw(r);return{c(){A(e.$$.fragment),t=R(),l.c(),i=Oe()},m(f,c){E(e,f,c),$(f,t,c),l.m(f,c),$(f,i,c),s=!0},p(f,[c]){var d,g,h;const p={};c&1&&(p.name=`Custom CSS${((g=(d=f[0])==null?void 0:d._styles)==null?void 0:g.custom)?" *":""}`),c&128&&(p.$$scope={dirty:c,ctx:f}),e.$set(p),c&1&&ne(n,n=(h=f[0])==null?void 0:h._id)?(ee(),_(l,1,1,Te),te(),l=Zw(f),l.c(),m(l),l.m(i.parentNode,i)):l.p(f,c)},i(f){s||(m(e.$$.fragment,f),m(l),s=!0)},o(f){_(e.$$.fragment,f),_(l),s=!1},d(f){O(e,f),f&&b(t),f&&b(i),l.d(f)}}}function Tse(r,e,t){let{componentInstance:n}=e,i,s;const l=()=>{var f;t(1,i=(f=n==null?void 0:n._styles)==null?void 0:f.custom),s.show()},o=async()=>{try{await Ye.actions.components.updateCustomStyle(i)}catch{ye.error("Error updating custom style")}s.hide()};function a(f){i=f,t(1,i)}function u(f){Z[f?"unshift":"push"](()=>{s=f,t(2,s)})}return r.$$set=f=>{"componentInstance"in f&&t(0,n=f.componentInstance)},[n,i,s,l,o,a,u]}class Ise extends se{constructor(e){super();le(this,e,Tse,Ose,ne,{componentInstance:0})}}function xw(r,e,t){const n=r.slice();return n[32]=e[t],n[33]=e,n[34]=t,n}function Lse(r){let e,t;return e=new Je({props:{size:"S",$$slots:{default:[Nse]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i[1]&16&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Pse(r){let e,t=[],n=new Map,i,s,l,o,a=r[0];const u=f=>f[32].id;for(let f=0;f<a.length;f+=1){let c=xw(r,a,f),p=u(c);n.set(p,t[f]=t8(p,c))}return{c(){e=M("div");for(let f=0;f<t.length;f+=1)t[f].c();y(e,"class","conditions svelte-1vod3ll")},m(f,c){$(f,e,c);for(let p=0;p<t.length;p+=1)t[p].m(e,null);s=!0,l||(o=[$r(i=Tu.call(null,e,{items:r[0],flipDurationMs:R1,dropTargetStyle:{outline:"none"},dragDisabled:r[3]})),Le(e,"finalize",r[12]),Le(e,"consider",r[13])],l=!0)},p(f,c){if(c[0]&118271){a=f[0],ee();for(let p=0;p<t.length;p+=1)t[p].r();t=er(t,c,u,1,f,a,n,e,jo,t8,null,xw);for(let p=0;p<t.length;p+=1)t[p].a();te()}i&&dt(i.update)&&c[0]&9&&i.update.call(null,{items:f[0],flipDurationMs:R1,dropTargetStyle:{outline:"none"},dragDisabled:f[3]})},i(f){if(!s){for(let c=0;c<a.length;c+=1)m(t[c]);s=!0}},o(f){for(let c=0;c<t.length;c+=1)_(t[c]);s=!1},d(f){f&&b(e);for(let c=0;c<t.length;c+=1)t[c].d();l=!1,En(o)}}}function Nse(r){let e;return{c(){e=H("Add your first condition to get started.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function e8(r){let e,t,n,i,s,l,o,a,u,f;function c(v){r[20](v,r[32])}let p={options:r[4]};r[32].setting!==void 0&&(p.value=r[32].setting),e=new Ke({props:p}),Z.push(()=>ce(e,"value",c));const d=[Mse,Rse],g=[];function h(v,C){return(l==null||C[0]&1)&&(l=!!v[7](v[32].setting)),l?0:1}return o=h(r,[-1,-1]),a=g[o]=d[o](r),{c(){A(e.$$.fragment),n=R(),i=M("div"),i.textContent="TO",s=R(),a.c(),u=Oe()},m(v,C){E(e,v,C),$(v,n,C),$(v,i,C),$(v,s,C),g[o].m(v,C),$(v,u,C),f=!0},p(v,C){r=v;const k={};C[0]&16&&(k.options=r[4]),!t&&C[0]&1&&(t=!0,k.value=r[32].setting,pe(()=>t=!1)),e.$set(k);let I=o;o=h(r,C),o===I?g[o].p(r,C):(ee(),_(g[I],1,1,()=>{g[I]=null}),te(),a=g[o],a?a.p(r,C):(a=g[o]=d[o](r),a.c()),m(a,1),a.m(u.parentNode,u))},i(v){f||(m(e.$$.fragment,v),m(a),f=!0)},o(v){_(e.$$.fragment,v),_(a),f=!1},d(v){O(e,v),v&&b(n),v&&b(i),v&&b(s),g[o].d(v),v&&b(u)}}}function Rse(r){let e,t;return e=new Ke({props:{disabled:!0,placeholder:" "}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p:Te,i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Mse(r){let e,t;function n(...i){return r[21](r[32],r[33],r[34],...i)}return e=new Ta({props:{type:r[7](r[32].setting).type,control:r[8](r[32].setting),key:r[7](r[32].setting).key,value:r[32].settingValue,componentInstance:r[2],onChange:n,props:{options:r[7](r[32].setting).options,placeholder:r[7](r[32].setting).placeholder},bindings:r[1]}}),{c(){A(e.$$.fragment)},m(i,s){E(e,i,s),t=!0},p(i,s){r=i;const l={};s[0]&1&&(l.type=r[7](r[32].setting).type),s[0]&1&&(l.control=r[8](r[32].setting)),s[0]&1&&(l.key=r[7](r[32].setting).key),s[0]&1&&(l.value=r[32].settingValue),s[0]&4&&(l.componentInstance=r[2]),s[0]&1&&(l.onChange=n),s[0]&1&&(l.props={options:r[7](r[32].setting).options,placeholder:r[7](r[32].setting).placeholder}),s[0]&2&&(l.bindings=r[1]),e.$set(l)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){O(e,i)}}}function Dse(r){let e,t,n;function i(l){r[29](l,r[32])}let s={placeholder:"Value",disabled:r[32].noValue,options:["True","False"]};return r[32].referenceValue!==void 0&&(s.value=r[32].referenceValue),e=new Ke({props:s}),Z.push(()=>ce(e,"value",i)),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){r=l;const a={};o[0]&1&&(a.disabled=r[32].noValue),!t&&o[0]&1&&(t=!0,a.value=r[32].referenceValue,pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function jse(r){let e,t,n;function i(l){r[28](l,r[32])}let s={placeholder:"Value",disabled:r[32].noValue};return r[32].referenceValue!==void 0&&(s.value=r[32].referenceValue),e=new Ds({props:s}),Z.push(()=>ce(e,"value",i)),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){r=l;const a={};o[0]&1&&(a.disabled=r[32].noValue),!t&&o[0]&1&&(t=!0,a.value=r[32].referenceValue,pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function Bse(r){let e,t;function n(...i){return r[27](r[32],r[33],r[34],...i)}return e=new Kn({props:{disabled:r[32].noValue,bindings:r[1],placeholder:"Value",value:r[32].referenceValue}}),e.$on("change",n),{c(){A(e.$$.fragment)},m(i,s){E(e,i,s),t=!0},p(i,s){r=i;const l={};s[0]&1&&(l.disabled=r[32].noValue),s[0]&2&&(l.bindings=r[1]),s[0]&1&&(l.value=r[32].referenceValue),e.$set(l)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){O(e,i)}}}function t8(r,e){let t,n,i,s,l,o,a,u,f,c,p,d,g,h,v,C,k,I,S,T,N,D,G,j,B,q,U,J,F=Te,W,V,Q;i=new pt({props:{name:"DragHandle",size:"XL"}});function me(qe){e[19](qe,e[32])}let re={placeholder:null,options:e[5]};e[32].action!==void 0&&(re.value=e[32].action),o=new Ke({props:re}),Z.push(()=>ce(o,"value",me));let x=e[32].action==="update"&&e8(e);function ae(...qe){return e[22](e[32],e[33],e[34],...qe)}d=new Kn({props:{bindings:e[1],placeholder:"Value",value:e[32].newValue}}),d.$on("change",ae);function _e(qe){e[23](qe,e[32])}function Re(...qe){return e[24](e[32],...qe)}let be={placeholder:null,options:e[14](e[32])};e[32].operator!==void 0&&(be.value=e[32].operator),h=new Ke({props:be}),Z.push(()=>ce(h,"value",_e)),h.$on("change",Re);function ve(qe){e[25](qe,e[32])}function he(...qe){return e[26](e[32],...qe)}let Pe={disabled:e[32].noValue,options:e[6],placeholder:null};e[32].valueType!==void 0&&(Pe.value=e[32].valueType),k=new Ke({props:Pe}),Z.push(()=>ce(k,"value",ve)),k.$on("change",he);const Fe=[Bse,jse,Dse],ie=[];function Ce(qe,ke){return(T==null||ke[0]&1)&&(T=!!["string","number"].includes(qe[32].valueType)),T?0:qe[32].valueType==="datetime"?1:qe[32].valueType==="boolean"?2:-1}~(N=Ce(e,[-1,-1]))&&(D=ie[N]=Fe[N](e));function de(){return e[30](e[32])}j=new pt({props:{name:"Duplicate",hoverable:!0,size:"S"}}),j.$on("click",de);function Se(){return e[31](e[32])}return q=new pt({props:{name:"Close",hoverable:!0,size:"S"}}),q.$on("click",Se),{key:r,first:null,c(){t=M("div"),n=M("div"),A(i.$$.fragment),l=R(),A(o.$$.fragment),u=R(),x&&x.c(),f=R(),c=M("div"),c.textContent="IF",p=R(),A(d.$$.fragment),g=R(),A(h.$$.fragment),C=R(),A(k.$$.fragment),S=R(),D&&D.c(),G=R(),A(j.$$.fragment),B=R(),A(q.$$.fragment),U=R(),y(n,"class","handle svelte-1vod3ll"),y(n,"aria-label","drag-handle"),y(n,"style",s=e[3]?"cursor: grab":"cursor: grabbing"),y(t,"class","condition svelte-1vod3ll"),oe(t,"update",e[32].action==="update"),this.first=t},m(qe,ke){$(qe,t,ke),P(t,n),E(i,n,null),P(t,l),E(o,t,null),P(t,u),x&&x.m(t,null),P(t,f),P(t,c),P(t,p),E(d,t,null),P(t,g),E(h,t,null),P(t,C),E(k,t,null),P(t,S),~N&&ie[N].m(t,null),P(t,G),E(j,t,null),P(t,B),E(q,t,null),P(t,U),W=!0,V||(Q=Le(n,"mousedown",e[18]),V=!0)},p(qe,ke){e=qe,(!W||ke[0]&8&&s!==(s=e[3]?"cursor: grab":"cursor: grabbing"))&&y(n,"style",s);const Ge={};!a&&ke[0]&1&&(a=!0,Ge.value=e[32].action,pe(()=>a=!1)),o.$set(Ge),e[32].action==="update"?x?(x.p(e,ke),ke[0]&1&&m(x,1)):(x=e8(e),x.c(),m(x,1),x.m(t,f)):x&&(ee(),_(x,1,1,()=>{x=null}),te());const Lt={};ke[0]&2&&(Lt.bindings=e[1]),ke[0]&1&&(Lt.value=e[32].newValue),d.$set(Lt);const Ue={};ke[0]&1&&(Ue.options=e[14](e[32])),!v&&ke[0]&1&&(v=!0,Ue.value=e[32].operator,pe(()=>v=!1)),h.$set(Ue);const ft={};ke[0]&1&&(ft.disabled=e[32].noValue),!I&&ke[0]&1&&(I=!0,ft.value=e[32].valueType,pe(()=>I=!1)),k.$set(ft);let Pt=N;N=Ce(e,ke),N===Pt?~N&&ie[N].p(e,ke):(D&&(ee(),_(ie[Pt],1,1,()=>{ie[Pt]=null}),te()),~N?(D=ie[N],D?D.p(e,ke):(D=ie[N]=Fe[N](e),D.c()),m(D,1),D.m(t,G)):D=null),ke[0]&1&&oe(t,"update",e[32].action==="update")},r(){J=t.getBoundingClientRect()},f(){Bo(t),F()},a(){F(),F=zo(t,J,qo,{duration:R1})},i(qe){W||(m(i.$$.fragment,qe),m(o.$$.fragment,qe),m(x),m(d.$$.fragment,qe),m(h.$$.fragment,qe),m(k.$$.fragment,qe),m(D),m(j.$$.fragment,qe),m(q.$$.fragment,qe),W=!0)},o(qe){_(i.$$.fragment,qe),_(o.$$.fragment,qe),_(x),_(d.$$.fragment,qe),_(h.$$.fragment,qe),_(k.$$.fragment,qe),_(D),_(j.$$.fragment,qe),_(q.$$.fragment,qe),W=!1},d(qe){qe&&b(t),O(i),O(o),x&&x.d(),O(d),O(h),O(k),~N&&ie[N].d(),O(j),O(q),V=!1,Q()}}}function zse(r){let e;return{c(){e=H("Add condition")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function qse(r){let e,t,n,i,s,l;const o=[Pse,Lse],a=[];function u(f,c){var p;return((p=f[0])==null?void 0:p.length)?0:1}return e=u(r),t=a[e]=o[e](r),s=new ut({props:{secondary:!0,icon:"Add",$$slots:{default:[zse]},$$scope:{ctx:r}}}),s.$on("click",r[9]),{c(){t.c(),n=R(),i=M("div"),A(s.$$.fragment)},m(f,c){a[e].m(f,c),$(f,n,c),$(f,i,c),E(s,i,null),l=!0},p(f,c){let p=e;e=u(f),e===p?a[e].p(f,c):(ee(),_(a[p],1,1,()=>{a[p]=null}),te(),t=a[e],t?t.p(f,c):(t=a[e]=o[e](f),t.c()),m(t,1),t.m(n.parentNode,n));const d={};c[1]&16&&(d.$$scope={dirty:c,ctx:f}),s.$set(d)},i(f){l||(m(t),m(s.$$.fragment,f),l=!0)},o(f){_(t),_(s.$$.fragment,f),l=!1},d(f){a[e].d(f),f&&b(n),f&&b(i),O(s)}}}function Use(r){let e,t,n;return t=new Qe({props:{noPadding:!0,$$slots:{default:[qse]},$$scope:{ctx:r}}}),{c(){e=M("div"),A(t.$$.fragment),y(e,"class","container svelte-1vod3ll")},m(i,s){$(i,e,s),E(t,e,null),n=!0},p(i,s){const l={};s[0]&31|s[1]&16&&(l.$$scope={dirty:s,ctx:i}),t.$set(l)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function Fse(r){let e,t;return e=new Fi({props:{$$slots:{default:[Use]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i[0]&31|i[1]&16&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}const R1=150;function Vse(r,e,t){let n,i,s;ue(r,ni,re=>t(2,s=re));let{conditions:l=[]}=e,{bindings:o=[]}=e;const a=[{label:"Hide component",value:"hide"},{label:"Show component",value:"show"},{label:"Update setting",value:"update"}],u=[{value:"string",label:"Binding"},{value:"number",label:"Number"},{value:"datetime",label:"Date"},{value:"boolean",label:"Boolean"}];let f=!0;const c=re=>n.find(x=>x.key===re),p=re=>{const x=c(re);return rc((x==null?void 0:x.type)||"text")},d=()=>{t(0,l=[...l,{valueType:"string",id:Br.generate(),action:"hide",operator:Or.Equals.value}])},g=re=>{t(0,l=l.filter(x=>x.id!==re))},h=re=>{const x=l.find(_e=>_e.id===re),ae=rt(Ee({},x),{id:Br.generate()});t(0,l=[...l,ae])},v=re=>{C(re),t(3,f=!0)},C=re=>{t(0,l=re.detail.items)},k=re=>Yo(re.valueType),I=(re,x)=>{const ae=[Or.Empty.value,Or.NotEmpty.value];re.noValue=ae.includes(x),re.noValue&&(re.referenceValue=null,re.valueType="string")},S=(re,x)=>{var _e;re.referenceValue=null;const ae=Yo(x).map(Re=>Re.value);ae.includes(re.operator)||(re.operator=(_e=ae[0])!=null?_e:Or.Equals.value,I(re,re.operator))},T=()=>t(3,f=!1);function N(re,x){r.$$.not_equal(x.action,re)&&(x.action=re,t(0,l))}function D(re,x){r.$$.not_equal(x.setting,re)&&(x.setting=re,t(0,l))}const G=(re,x,ae,_e)=>t(0,x[ae].settingValue=_e,l),j=(re,x,ae,_e)=>t(0,x[ae].newValue=_e.detail,l);function B(re,x){r.$$.not_equal(x.operator,re)&&(x.operator=re,t(0,l))}const q=(re,x)=>I(re,x.detail);function U(re,x){r.$$.not_equal(x.valueType,re)&&(x.valueType=re,t(0,l))}const J=(re,x)=>S(re,x.detail),F=(re,x,ae,_e)=>t(0,x[ae].referenceValue=_e.detail,l);function W(re,x){r.$$.not_equal(x.referenceValue,re)&&(x.referenceValue=re,t(0,l))}function V(re,x){r.$$.not_equal(x.referenceValue,re)&&(x.referenceValue=re,t(0,l))}const Q=re=>h(re.id),me=re=>g(re.id);return r.$$set=re=>{"conditions"in re&&t(0,l=re.conditions),"bindings"in re&&t(1,o=re.bindings)},r.$$.update=()=>{r.$$.dirty[0]&4&&t(17,n=Qo(s==null?void 0:s._component)),r.$$.dirty[0]&131072&&t(4,i=n.map(re=>({label:re.label,value:re.key}))),r.$$.dirty[0]&1&&l.forEach(re=>{re.id||(re.id=Br.generate())})},[l,o,s,f,i,a,u,c,p,d,g,h,v,C,k,I,S,n,T,N,D,G,j,B,q,U,J,F,W,V,Q,me]}class Hse extends se{constructor(e){super();le(this,e,Vse,Fse,ne,{conditions:0,bindings:1},null,[-1,-1])}}function Wse(r){let e;return{c(){e=H("Configure conditions")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Gse(r){let e,t,n;return t=new Gt({props:{$$slots:{default:[Wse]},$$scope:{ctx:r}}}),t.$on("click",r[4]),{c(){e=M("div"),A(t.$$.fragment)},m(i,s){$(i,e,s),E(t,e,null),n=!0},p(i,s){const l={};s&512&&(l.$$scope={dirty:s,ctx:i}),t.$set(l)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function Yse(r){let e;return{c(){e=H("Show, hide and update components in response to conditions being met.")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Jse(r){let e;return{c(){e=H("Save")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Qse(r){let e,t;return e=new ut({props:{cta:!0,slot:"buttons",$$slots:{default:[Jse]},$$scope:{ctx:r}}}),e.$on("click",r[7]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&512&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Xse(r){let e,t,n;function i(l){r[6](l)}let s={slot:"body",bindings:r[1]};return r[2]!==void 0&&(s.conditions=r[2]),e=new Hse({props:s}),Z.push(()=>ce(e,"conditions",i)),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){const a={};o&2&&(a.bindings=l[1]),!t&&o&4&&(t=!0,a.conditions=l[2],pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function Kse(r){var l;let e,t,n,i;e=new Fo({props:{name:`Conditions${((l=r[0])==null?void 0:l._conditions)?" *":""}`,collapsible:!1,$$slots:{default:[Gse]},$$scope:{ctx:r}}});let s={title:"Conditions",$$slots:{body:[Xse],buttons:[Qse],description:[Yse]},$$scope:{ctx:r}};return n=new ci({props:s}),r[8](n),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(o,a){E(e,o,a),$(o,t,a),E(n,o,a),i=!0},p(o,[a]){var c;const u={};a&1&&(u.name=`Conditions${((c=o[0])==null?void 0:c._conditions)?" *":""}`),a&512&&(u.$$scope={dirty:a,ctx:o}),e.$set(u);const f={};a&518&&(f.$$scope={dirty:a,ctx:o}),n.$set(f)},i(o){i||(m(e.$$.fragment,o),m(n.$$.fragment,o),i=!0)},o(o){_(e.$$.fragment,o),_(n.$$.fragment,o),i=!1},d(o){O(e,o),o&&b(t),r[8](null),O(n,o)}}}function Zse(r,e,t){let{componentInstance:n}=e,{bindings:i}=e,s,l;const o=()=>{var p;t(2,s=JSON.parse(JSON.stringify((p=n==null?void 0:n._conditions)!=null?p:[]))),l.show()},a=async()=>{try{await Ye.actions.components.updateConditions(s)}catch{ye.error("Error updating conditions")}l.hide()};function u(p){s=p,t(2,s)}const f=()=>a();function c(p){Z[p?"unshift":"push"](()=>{l=p,t(3,l)})}return r.$$set=p=>{"componentInstance"in p&&t(0,n=p.componentInstance),"bindings"in p&&t(1,i=p.bindings)},[n,i,s,l,o,a,u,f,c]}class xse extends se{constructor(e){super();le(this,e,Zse,Kse,ne,{componentInstance:0,bindings:1})}}function n8(r){let e,t,n,i,s,l,o,a,u,f;return e=new Ix({props:{componentInstance:r[3],componentDefinition:r[2],bindings:r[1]}}),n=new ase({props:{componentInstance:r[3],componentDefinition:r[2],bindings:r[1],componentBindings:r[0]}}),s=new bse({props:{componentInstance:r[3],componentDefinition:r[2],bindings:r[1]}}),o=new Ise({props:{componentInstance:r[3],componentDefinition:r[2],bindings:r[1]}}),u=new xse({props:{componentInstance:r[3],componentDefinition:r[2],bindings:r[1]}}),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment),i=R(),A(s.$$.fragment),l=R(),A(o.$$.fragment),a=R(),A(u.$$.fragment)},m(c,p){E(e,c,p),$(c,t,p),E(n,c,p),$(c,i,p),E(s,c,p),$(c,l,p),E(o,c,p),$(c,a,p),E(u,c,p),f=!0},p(c,p){const d={};p&8&&(d.componentInstance=c[3]),p&4&&(d.componentDefinition=c[2]),p&2&&(d.bindings=c[1]),e.$set(d);const g={};p&8&&(g.componentInstance=c[3]),p&4&&(g.componentDefinition=c[2]),p&2&&(g.bindings=c[1]),p&1&&(g.componentBindings=c[0]),n.$set(g);const h={};p&8&&(h.componentInstance=c[3]),p&4&&(h.componentDefinition=c[2]),p&2&&(h.bindings=c[1]),s.$set(h);const v={};p&8&&(v.componentInstance=c[3]),p&4&&(v.componentDefinition=c[2]),p&2&&(v.bindings=c[1]),o.$set(v);const C={};p&8&&(C.componentInstance=c[3]),p&4&&(C.componentDefinition=c[2]),p&2&&(C.bindings=c[1]),u.$set(C)},i(c){f||(m(e.$$.fragment,c),m(n.$$.fragment,c),m(s.$$.fragment,c),m(o.$$.fragment,c),m(u.$$.fragment,c),f=!0)},o(c){_(e.$$.fragment,c),_(n.$$.fragment,c),_(s.$$.fragment,c),_(o.$$.fragment,c),_(u.$$.fragment,c),f=!1},d(c){O(e,c),c&&b(t),O(n,c),c&&b(i),O(s,c),c&&b(l),O(o,c),c&&b(a),O(u,c)}}}function ele(r){var s;let e,t=(s=r[3])==null?void 0:s._id,n,i=n8(r);return{c(){e=M("div"),i.c(),y(e,"class","container svelte-1n3t1jx")},m(l,o){$(l,e,o),i.m(e,null),n=!0},p(l,o){var a;o&8&&ne(t,t=(a=l[3])==null?void 0:a._id)?(ee(),_(i,1,1,Te),te(),i=n8(l),i.c(),m(i),i.m(e,null)):i.p(l,o)},i(l){n||(m(i),n=!0)},o(l){_(i),n=!1},d(l){l&&b(e),i.d(l)}}}function tle(r){let e,t;return e=new gn({props:{title:"Settings",$$slots:{default:[ele]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&143&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function nle(r){let e,t;return e=new zr({props:{selected:"Settings",noPadding:!0,$$slots:{default:[tle]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,[i]){const s={};i&143&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function rle(r,e,t){let n,i,s,l,o,a,u;return ue(r,Ye,f=>t(4,o=f)),ue(r,dn,f=>t(5,a=f)),ue(r,ni,f=>t(6,u=f)),r.$$.update=()=>{r.$$.dirty&64&&t(3,n=u),r.$$.dirty&64&&t(2,i=Ye.actions.components.getDefinition(u==null?void 0:u._component)),r.$$.dirty&48&&t(1,s=Aj(a,o.selectedComponentId)),r.$$.dirty&48&&t(0,l=Ej(a,o.selectedComponentId))},[l,s,i,n,o,a,u]}class ile extends se{constructor(e){super();le(this,e,rle,nle,ne,{})}}var sle=[{name:"Blocks",icon:"Article",children:["tableblock","cardsblock","repeaterblock"]},{name:"Layout",icon:"ClassicGridView",children:["container","section"]},{name:"Data",icon:"Data",children:["dataprovider","repeater","table","dynamicfilter"]},{name:"Form",icon:"Form",children:["form","formstep","fieldgroup","stringfield","numberfield","passwordfield","optionsfield","booleanfield","longformfield","datetimefield","attachmentfield","relationshipfield","daterangepicker","multifieldselect","jsonfield","s3upload"]},{name:"Card",icon:"Card",children:["spectrumcard","cardstat"]},{name:"Chart",icon:"GraphBarVertical",children:["bar","line","area","pie","donut","candlestick"]},{name:"Elements",icon:"TextParagraph",children:["heading","text","button","tag","divider","image","backgroundimage","link","icon","embed","markdownviewer"]}];function r8(r,e,t){const n=r.slice();return n[9]=e[t],n}function i8(r,e,t){const n=r.slice();return n[9]=e[t],n}function s8(r){let e,t;function n(){return r[7](r[9])}return e=new tn({props:{dataCy:`component-${r[9].name}`,icon:r[9].icon,disabled:r[3](r[9],r[1]),$$slots:{default:[lle]},$$scope:{ctx:r}}}),e.$on("click",n),{c(){A(e.$$.fragment)},m(i,s){E(e,i,s),t=!0},p(i,s){r=i;const l={};s&1&&(l.dataCy=`component-${r[9].name}`),s&1&&(l.icon=r[9].icon),s&3&&(l.disabled=r[3](r[9],r[1])),s&16385&&(l.$$scope={dirty:s,ctx:r}),e.$set(l)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){O(e,i)}}}function lle(r){let e=r[9].name+"",t;return{c(){t=H(e)},m(n,i){$(n,t,i)},p(n,i){i&1&&e!==(e=n[9].name+"")&&Ie(t,e)},d(n){n&&b(t)}}}function l8(r){let e=!r[9].showOnAsset||r[9].showOnAsset.includes(r[2]),t,n,i=e&&s8(r);return{c(){i&&i.c(),t=Oe()},m(s,l){i&&i.m(s,l),$(s,t,l),n=!0},p(s,l){l&5&&(e=!s[9].showOnAsset||s[9].showOnAsset.includes(s[2])),e?i?(i.p(s,l),l&5&&m(i,1)):(i=s8(s),i.c(),m(i,1),i.m(t.parentNode,t)):i&&(ee(),_(i,1,1,()=>{i=null}),te())},i(s){n||(m(i),n=!0)},o(s){_(i),n=!1},d(s){i&&i.d(s),s&&b(t)}}}function ole(r){let e,t,n=r[9].children||[],i=[];for(let l=0;l<n.length;l+=1)i[l]=l8(i8(r,n,l));const s=l=>_(i[l],1,1,()=>{i[l]=null});return{c(){for(let l=0;l<i.length;l+=1)i[l].c();e=R()},m(l,o){for(let a=0;a<i.length;a+=1)i[a].m(l,o);$(l,e,o),t=!0},p(l,o){if(o&31){n=l[9].children||[];let a;for(a=0;a<n.length;a+=1){const u=i8(l,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=l8(u),i[a].c(),m(i[a],1),i[a].m(e.parentNode,e))}for(ee(),a=n.length;a<i.length;a+=1)s(a);te()}},i(l){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(l){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(l){_t(i,l),l&&b(e)}}}function o8(r){let e,t;return e=new pt({props:{size:"S",name:"ChevronDown"}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function ale(r){let e,t=r[9].name+"",n,i,s,l,o=r[9].isCategory&&o8();return{c(){e=M("div"),n=H(t),i=R(),o&&o.c(),s=R(),y(e,"class","buttonContent svelte-15cdrfq")},m(a,u){$(a,e,u),P(e,n),P(e,i),o&&o.m(e,null),$(a,s,u),l=!0},p(a,u){(!l||u&1)&&t!==(t=a[9].name+"")&&Ie(n,t),a[9].isCategory?o?u&1&&m(o,1):(o=o8(),o.c(),m(o,1),o.m(e,null)):o&&(ee(),_(o,1,1,()=>{o=null}),te())},i(a){l||(m(o),l=!0)},o(a){_(o),l=!1},d(a){a&&b(e),o&&o.d(),a&&b(s)}}}function ule(r){let e,t;function n(){return r[6](r[9])}return e=new Gt({props:{icon:r[9].icon,disabled:!r[9].isCategory&&r[3](r[9],r[1]),quiet:!0,size:"S",slot:"control",dataCy:`category-${r[9].name}`,$$slots:{default:[ale]},$$scope:{ctx:r}}}),e.$on("click",n),{c(){A(e.$$.fragment)},m(i,s){E(e,i,s),t=!0},p(i,s){r=i;const l={};s&1&&(l.icon=r[9].icon),s&3&&(l.disabled=!r[9].isCategory&&r[3](r[9],r[1])),s&1&&(l.dataCy=`category-${r[9].name}`),s&16385&&(l.$$scope={dirty:s,ctx:r}),e.$set(l)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){O(e,i)}}}function a8(r){let e,t;return e=new Er({props:{disabled:!r[9].isCategory,$$slots:{control:[ule],default:[ole]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&1&&(s.disabled=!n[9].isCategory),i&16391&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function fle(r){let e,t,n=r[0],i=[];for(let l=0;l<n.length;l+=1)i[l]=a8(r8(r,n,l));const s=l=>_(i[l],1,1,()=>{i[l]=null});return{c(){e=M("div");for(let l=0;l<i.length;l+=1)i[l].c();y(e,"class","components svelte-15cdrfq")},m(l,o){$(l,e,o);for(let a=0;a<i.length;a+=1)i[a].m(e,null);t=!0},p(l,[o]){if(o&31){n=l[0];let a;for(a=0;a<n.length;a+=1){const u=r8(l,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=a8(u),i[a].c(),m(i[a],1),i[a].m(e,null))}for(ee(),a=n.length;a<i.length;a+=1)s(a);te()}},i(l){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(l){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(l){l&&b(e),_t(i,l)}}}function cle(r,e,t){let n,i,s,l;ue(r,Ye,p=>t(5,i=p)),ue(r,ni,p=>t(1,s=p)),ue(r,Uj,p=>t(2,l=p));const o=({name:p},d)=>{var h;const g=Ye.actions.components.getDefinition(d==null?void 0:d._component);return(h=g==null?void 0:g.illegalChildren)==null?void 0:h.includes(p.toLowerCase())},a=(p,d)=>{let g=[];return p.forEach(h=>{if(typeof h=="string"){const v=d[`@budibase/standard-components/${h}`];v&&g.push(rt(Ee({},v),{isCategory:!1}))}else g.push(rt(Ee({},h),{isCategory:!0,children:a(h.children||[],d)}))}),g},u=async p=>{if(!p.isCategory)try{await Ye.actions.components.create(p.component)}catch{ye.error("Error creating component")}},f=p=>u(p),c=p=>u(p);return r.$$.update=()=>{r.$$.dirty&32&&t(0,n=a(sle,i.components))},[n,s,l,o,u,i,f,c]}class ple extends se{constructor(e){super();le(this,e,cle,fle,ne,{})}}const u8={MOVE:"move",COPY:"copy"},Vr={ABOVE:"above",BELOW:"below",INSIDE:"inside"};function f8(){const r=fn({});return r.actions={dragstart:e=>{r.update(t=>(t.dragged=e,t))},dragover:({component:e,index:t,canHaveChildrenButIsEmpty:n,mousePosition:i})=>{r.update(s=>(s.targetComponent=e,n&&t===0?(i<.4&&(s.dropPosition=Vr.ABOVE),i>.8&&(s.dropPosition=Vr.BELOW),i>.4&&i<.8&&(s.dropPosition=Vr.INSIDE),s):(i>.5?s.dropPosition=Vr.BELOW:s.dropPosition=n?Vr.INSIDE:Vr.ABOVE,s)))},reset:()=>{r.update(e=>(e.dropPosition="",e.targetComponent=null,e.dragged=null,e))},drop:async()=>{const e=lt(r);e.targetComponent===e.dragged||!e.targetComponent||!e.dragged||qs(e.dragged,e.targetComponent._id).map(i=>i._id).includes(e.targetComponent._id)||(Ye.actions.components.copy(e.dragged,!0),await Ye.actions.components.paste(e.targetComponent,e.dropPosition),r.actions.reset())}},r}function c8(r){var l;let e,t,n,i;e=new Er({props:{$$slots:{control:[kle],default:[yle]},$$scope:{ctx:r}}});let s={title:"Confirm Deletion",body:`Are you sure you wish to delete this '${(l=r[0])==null?void 0:l.name}' component?`,okText:"Delete Component",onOk:r[8]};return n=new yr({props:s}),r[18](n),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(o,a){E(e,o,a),$(o,t,a),E(n,o,a),i=!0},p(o,a){var c;const u={};a&524314&&(u.$$scope={dirty:a,ctx:o}),e.$set(u);const f={};a&1&&(f.body=`Are you sure you wish to delete this '${(c=o[0])==null?void 0:c.name}' component?`),n.$set(f)},i(o){i||(m(e.$$.fragment,o),m(n.$$.fragment,o),i=!0)},o(o){_(e.$$.fragment,o),_(n.$$.fragment,o),i=!1},d(o){O(e,o),o&&b(t),r[18](null),O(n,o)}}}function dle(r){let e;return{c(){e=H("Delete")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function mle(r){let e;return{c(){e=H("Move up")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function gle(r){let e;return{c(){e=H("Move down")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function _le(r){let e;return{c(){e=H("Duplicate")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function hle(r){let e;return{c(){e=H("Cut")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function $le(r){let e;return{c(){e=H("Copy")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function ble(r){let e;return{c(){e=H("Paste above")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function vle(r){let e;return{c(){e=H("Paste below")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function wle(r){let e;return{c(){e=H("Paste inside")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function yle(r){let e,t,n,i,s,l,o,a,u,f,c,p,d,g,h,v,C,k;return e=new tn({props:{icon:"Delete",$$slots:{default:[dle]},$$scope:{ctx:r}}}),e.$on("click",function(){dt(r[1].show)&&r[1].show.apply(this,arguments)}),n=new tn({props:{noClose:!0,icon:"ChevronUp",$$slots:{default:[mle]},$$scope:{ctx:r}}}),n.$on("click",r[5]),s=new tn({props:{noClose:!0,icon:"ChevronDown",$$slots:{default:[gle]},$$scope:{ctx:r}}}),s.$on("click",r[6]),o=new tn({props:{noClose:!0,icon:"Duplicate",$$slots:{default:[_le]},$$scope:{ctx:r}}}),o.$on("click",r[7]),u=new tn({props:{icon:"Cut",$$slots:{default:[hle]},$$scope:{ctx:r}}}),u.$on("click",r[13]),c=new tn({props:{icon:"Copy",$$slots:{default:[$le]},$$scope:{ctx:r}}}),c.$on("click",r[14]),d=new tn({props:{icon:"LayersBringToFront",disabled:r[3],$$slots:{default:[ble]},$$scope:{ctx:r}}}),d.$on("click",r[15]),h=new tn({props:{icon:"LayersSendToBack",disabled:r[3],$$slots:{default:[vle]},$$scope:{ctx:r}}}),h.$on("click",r[16]),C=new tn({props:{icon:"ShowOneLayer",disabled:r[3]||r[4],$$slots:{default:[wle]},$$scope:{ctx:r}}}),C.$on("click",r[17]),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment),i=R(),A(s.$$.fragment),l=R(),A(o.$$.fragment),a=R(),A(u.$$.fragment),f=R(),A(c.$$.fragment),p=R(),A(d.$$.fragment),g=R(),A(h.$$.fragment),v=R(),A(C.$$.fragment)},m(I,S){E(e,I,S),$(I,t,S),E(n,I,S),$(I,i,S),E(s,I,S),$(I,l,S),E(o,I,S),$(I,a,S),E(u,I,S),$(I,f,S),E(c,I,S),$(I,p,S),E(d,I,S),$(I,g,S),E(h,I,S),$(I,v,S),E(C,I,S),k=!0},p(I,S){r=I;const T={};S&524288&&(T.$$scope={dirty:S,ctx:r}),e.$set(T);const N={};S&524288&&(N.$$scope={dirty:S,ctx:r}),n.$set(N);const D={};S&524288&&(D.$$scope={dirty:S,ctx:r}),s.$set(D);const G={};S&524288&&(G.$$scope={dirty:S,ctx:r}),o.$set(G);const j={};S&524288&&(j.$$scope={dirty:S,ctx:r}),u.$set(j);const B={};S&524288&&(B.$$scope={dirty:S,ctx:r}),c.$set(B);const q={};S&8&&(q.disabled=r[3]),S&524288&&(q.$$scope={dirty:S,ctx:r}),d.$set(q);const U={};S&8&&(U.disabled=r[3]),S&524288&&(U.$$scope={dirty:S,ctx:r}),h.$set(U);const J={};S&24&&(J.disabled=r[3]||r[4]),S&524288&&(J.$$scope={dirty:S,ctx:r}),C.$set(J)},i(I){k||(m(e.$$.fragment,I),m(n.$$.fragment,I),m(s.$$.fragment,I),m(o.$$.fragment,I),m(u.$$.fragment,I),m(c.$$.fragment,I),m(d.$$.fragment,I),m(h.$$.fragment,I),m(C.$$.fragment,I),k=!0)},o(I){_(e.$$.fragment,I),_(n.$$.fragment,I),_(s.$$.fragment,I),_(o.$$.fragment,I),_(u.$$.fragment,I),_(c.$$.fragment,I),_(d.$$.fragment,I),_(h.$$.fragment,I),_(C.$$.fragment,I),k=!1},d(I){O(e,I),I&&b(t),O(n,I),I&&b(i),O(s,I),I&&b(l),O(o,I),I&&b(a),O(u,I),I&&b(f),O(c,I),I&&b(p),O(d,I),I&&b(g),O(h,I),I&&b(v),O(C,I)}}}function kle(r){let e,t,n;return t=new pt({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){e=M("div"),A(t.$$.fragment),y(e,"slot","control"),y(e,"class","icon")},m(i,s){$(i,e,s),E(t,e,null),n=!0},p:Te,i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function Cle(r){let e,t,n=r[2]&&c8(r);return{c(){n&&n.c(),e=Oe()},m(i,s){n&&n.m(i,s),$(i,e,s),t=!0},p(i,[s]){i[2]?n?(n.p(i,s),s&4&&m(n,1)):(n=c8(i),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(ee(),_(n,1,1,()=>{n=null}),te())},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){n&&n.d(i),i&&b(e)}}}function Sle(r,e,t){let n,i,s,l,o;ue(r,Ye,N=>t(12,o=N));let{component:a}=e,u;const f=()=>{const N=lt(dn),D=zs(N.props,a._id);if(!D)return;const G=D._children.indexOf(a);if(G!==0)try{const j=D._children.filter(B=>B!==a);j.splice(G-1,0,a),D._children=j,Ye.actions.preview.saveSelected()}catch{ye.error("Error saving screen")}},c=()=>{const N=lt(dn),D=zs(N.props,a._id);if(!D)return;const G=D._children.indexOf(a);if(G!==D._children.length-1)try{const j=D._children.filter(B=>B!==a);j.splice(G+1,0,a),D._children=j,Ye.actions.preview.saveSelected()}catch{ye.error("Error saving screen")}},p=()=>{g(!1),h("below",!0)},d=async()=>{try{await Ye.actions.components.delete(a)}catch{ye.error("Error deleting component")}},g=(N=!1)=>{Ye.actions.components.copy(a,N)},h=(N,D=!1)=>{try{Ye.actions.components.paste(a,N,D)}catch{ye.error("Error saving component")}},v=()=>g(!0),C=()=>g(!1),k=()=>h("above"),I=()=>h("below"),S=()=>h("inside");function T(N){Z[N?"unshift":"push"](()=>{u=N,t(1,u)})}return r.$$set=N=>{"component"in N&&t(11,a=N.component)},r.$$.update=()=>{r.$$.dirty&2048&&t(0,n=Ye.actions.components.getDefinition(a==null?void 0:a._component)),r.$$.dirty&2049&&t(4,i=!a||!(n==null?void 0:n.hasChildren)),r.$$.dirty&4096&&t(3,s=!o.componentToPaste),r.$$.dirty&1&&t(2,l=(n==null?void 0:n.editable)!==!1&&(n==null?void 0:n.static)!==!0)},[n,u,l,s,i,f,c,p,d,g,h,a,o,v,C,k,I,S,T]}class Ale extends se{constructor(e){super();le(this,e,Sle,Cle,ne,{component:11})}}function p8(r,e,t){const n=r.slice();return n[16]=e[t],n[18]=t,n}function d8(r){let e,t,n;return{c(){e=M("div"),y(e,"ondragover","return false"),y(e,"ondragenter","return false"),y(e,"class","drop-item svelte-1kt57h3"),Ft(e,"margin-left",(r[3]+1)*16+"px")},m(i,s){$(i,e,s),t||(n=Le(e,"drop",r[13]),t=!0)},p(i,s){s&8&&Ft(e,"margin-left",(i[3]+1)*16+"px")},d(i){i&&b(e),t=!1,n()}}}function Ele(r){let e,t;return e=new Ale({props:{component:r[16]}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&1&&(s.component=n[16]),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function m8(r){let e,t;return e=new M1({props:{components:r[16]._children,currentComponent:r[1],onSelect:r[2],dragDropStore:r[4],level:r[3]+1}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&1&&(s.components=n[16]._children),i&2&&(s.currentComponent=n[1]),i&4&&(s.onSelect=n[2]),i&16&&(s.dragDropStore=n[4]),i&8&&(s.level=n[3]+1),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function g8(r){let e,t,n;return{c(){e=M("div"),y(e,"ondragover","return false"),y(e,"ondragenter","return false"),y(e,"class","drop-item svelte-1kt57h3"),Ft(e,"margin-left",(r[3]+(r[6].dropPosition===Vr.INSIDE?3:1))*16+"px")},m(i,s){$(i,e,s),t||(n=Le(e,"drop",r[13]),t=!0)},p(i,s){s&72&&Ft(e,"margin-left",(i[3]+(i[6].dropPosition===Vr.INSIDE?3:1))*16+"px")},d(i){i&&b(e),t=!1,n()}}}function _8(r,e){var v,C,k,I;let t,n,i,s,l,o,a,u,f,c=((v=e[6])==null?void 0:v.targetComponent)===e[16]&&e[6].dropPosition===Vr.ABOVE&&d8(e);function p(){return e[14](e[16])}i=new As({props:{draggable:!0,text:e[11](e[16]),withArrow:!0,indentLevel:e[3]+1,selected:e[7].selectedComponentId===e[16]._id,opened:!e[5][e[16]._id]&&((k=(C=e[16])==null?void 0:C._children)==null?void 0:k.length),$$slots:{default:[Ele]},$$scope:{ctx:e}}}),i.$on("dragend",function(){dt(e[4].actions.reset)&&e[4].actions.reset.apply(this,arguments)}),i.$on("dragstart",function(){dt(e[9](e[16]))&&e[9](e[16]).apply(this,arguments)}),i.$on("dragover",function(){dt(e[10](e[16],e[18]))&&e[10](e[16],e[18]).apply(this,arguments)}),i.$on("iconClick",p),i.$on("drop",e[13]);let d=e[16]._children&&!e[5][e[16]._id]&&m8(e),g=((I=e[6])==null?void 0:I.targetComponent)===e[16]&&(e[6].dropPosition===Vr.INSIDE||e[6].dropPosition===Vr.BELOW)&&g8(e);function h(){return e[15](e[16])}return{key:r,first:null,c(){t=M("li"),c&&c.c(),n=R(),A(i.$$.fragment),s=R(),d&&d.c(),l=R(),g&&g.c(),o=R(),this.first=t},m(S,T){$(S,t,T),c&&c.m(t,null),P(t,n),E(i,t,null),P(t,s),d&&d.m(t,null),P(t,l),g&&g.m(t,null),P(t,o),a=!0,u||(f=Le(t,"click",hp(h)),u=!0)},p(S,T){var D,G,j,B;e=S,((D=e[6])==null?void 0:D.targetComponent)===e[16]&&e[6].dropPosition===Vr.ABOVE?c?c.p(e,T):(c=d8(e),c.c(),c.m(t,n)):c&&(c.d(1),c=null);const N={};T&1&&(N.text=e[11](e[16])),T&8&&(N.indentLevel=e[3]+1),T&129&&(N.selected=e[7].selectedComponentId===e[16]._id),T&33&&(N.opened=!e[5][e[16]._id]&&((j=(G=e[16])==null?void 0:G._children)==null?void 0:j.length)),T&524289&&(N.$$scope={dirty:T,ctx:e}),i.$set(N),e[16]._children&&!e[5][e[16]._id]?d?(d.p(e,T),T&33&&m(d,1)):(d=m8(e),d.c(),m(d,1),d.m(t,l)):d&&(ee(),_(d,1,1,()=>{d=null}),te()),((B=e[6])==null?void 0:B.targetComponent)===e[16]&&(e[6].dropPosition===Vr.INSIDE||e[6].dropPosition===Vr.BELOW)?g?g.p(e,T):(g=g8(e),g.c(),g.m(t,o)):g&&(g.d(1),g=null)},i(S){a||(m(i.$$.fragment,S),m(d),a=!0)},o(S){_(i.$$.fragment,S),_(d),a=!1},d(S){S&&b(t),c&&c.d(),O(i),d&&d.d(),g&&g.d(),u=!1,f()}}}function Ole(r){let e,t=[],n=new Map,i,s=r[0];const l=o=>o[16]._id;for(let o=0;o<s.length;o+=1){let a=p8(r,s,o),u=l(a);n.set(u,t[o]=_8(u,a))}return{c(){e=M("ul");for(let o=0;o<t.length;o+=1)t[o].c();y(e,"class","svelte-1kt57h3")},m(o,a){$(o,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);i=!0},p(o,[a]){a&16383&&(s=o[0],ee(),t=er(t,a,l,1,o,s,n,e,jr,_8,null,p8),te())},i(o){if(!i){for(let a=0;a<s.length;a+=1)m(t[a]);i=!0}},o(o){for(let a=0;a<t.length;a+=1)_(t[a]);i=!1},d(o){o&&b(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function Tle(r,e,t){let n,i=Te,s=()=>(i(),i=m_(c,T=>t(6,n=T)),c),l;ue(r,Ye,T=>t(7,l=T)),r.$$.on_destroy.push(()=>i());let{components:o=[]}=e,{currentComponent:a}=e,{onSelect:u=()=>{}}=e,{level:f=0}=e,{dragDropStore:c}=e;s();let p={};const d=T=>{Ye.actions.components.select(T)},g=T=>N=>{N.dataTransfer.dropEffect=u8.MOVE,c.actions.dragstart(T)},h=(T,N)=>D=>{var q;const G=Ye.actions.components.getDefinition(T._component),j=(G==null?void 0:G.hasChildren)&&!((q=T._children)==null?void 0:q.length);D.dataTransfer.dropEffect=u8.COPY;const B=D.offsetY/D.currentTarget.offsetHeight;return c.actions.dragover({component:T,index:N,canHaveChildrenButIsEmpty:j,mousePosition:B}),!1},v=T=>{if(T._instanceName)return T._instanceName;const N=T._component.replace("@budibase/standard-components/","")||"component";return wr(N)};function C(T){p[T]?delete p[T]:t(5,p[T]=!0,p),t(5,p)}const k=async()=>{try{await c.actions.drop()}catch{ye.error("Error saving component")}},I=T=>C(T._id),S=T=>d(T);return r.$$set=T=>{"components"in T&&t(0,o=T.components),"currentComponent"in T&&t(1,a=T.currentComponent),"onSelect"in T&&t(2,u=T.onSelect),"level"in T&&t(3,f=T.level),"dragDropStore"in T&&s(t(4,c=T.dragDropStore))},[o,a,u,f,c,p,n,l,d,g,h,v,C,k,I,S]}class M1 extends se{constructor(e){super();le(this,e,Tle,Ole,ne,{components:0,currentComponent:1,onSelect:2,level:3,dragDropStore:4})}}function Ile(r){let e;return{c(){e=H("Delete")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Lle(r){let e,t;return e=new tn({props:{icon:"Delete",$$slots:{default:[Ile]},$$scope:{ctx:r}}}),e.$on("click",function(){dt(r[0].show)&&r[0].show.apply(this,arguments)}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){r=n;const s={};i&128&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Ple(r){let e,t,n;return t=new pt({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){e=M("div"),A(t.$$.fragment),y(e,"slot","control"),y(e,"class","icon")},m(i,s){$(i,e,s),E(t,e,null),n=!0},p:Te,i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function Nle(r){let e,t,n,i;e=new Er({props:{$$slots:{control:[Ple],default:[Lle]},$$scope:{ctx:r}}});let s={title:"Confirm Deletion",body:"Are you sure you wish to delete this screen?",okText:"Delete Screen",onOk:r[1]};return n=new yr({props:s}),r[5](n),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(l,o){E(e,l,o),$(l,t,o),E(n,l,o),i=!0},p(l,[o]){const a={};o&129&&(a.$$scope={dirty:o,ctx:l}),e.$set(a);const u={};n.$set(u)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){O(e,l),l&&b(t),r[5](null),O(n,l)}}}function Rle(r,e,t){let n,i,s;ue(r,Bt,f=>t(6,i=f)),ue(r,Xs,f=>t(4,s=f));let{screenId:l}=e,o;const a=async()=>{try{await Ye.actions.screens.delete(n),i("../"),ye.success("Deleted screen successfully.")}catch{ye.error("Error deleting screen")}};function u(f){Z[f?"unshift":"push"](()=>{o=f,t(0,o)})}return r.$$set=f=>{"screenId"in f&&t(2,l=f.screenId)},r.$$.update=()=>{r.$$.dirty&20&&t(3,n=s.find(f=>f._id===l))},[o,a,l,n,s,u]}class Mle extends se{constructor(e){super();le(this,e,Rle,Nle,ne,{screenId:2})}}function h8(r,e,t){const n=r.slice();return n[23]=e[t],n}function $8(r){let e,t,n,i;e=new As({props:{icon:"FolderOutline",text:r[1],opened:r[6],border:r[3],withArrow:r[0].subpaths}}),e.$on("click",r[13]);let s=r[6]&&b8(r);return{c(){A(e.$$.fragment),t=R(),s&&s.c(),n=Oe()},m(l,o){E(e,l,o),$(l,t,o),s&&s.m(l,o),$(l,n,o),i=!0},p(l,o){const a={};o&2&&(a.text=l[1]),o&64&&(a.opened=l[6]),o&8&&(a.border=l[3]),o&1&&(a.withArrow=l[0].subpaths),e.$set(a),l[6]?s?(s.p(l,o),o&64&&m(s,1)):(s=b8(l),s.c(),m(s,1),s.m(n.parentNode,n)):s&&(ee(),_(s,1,1,()=>{s=null}),te())},i(l){i||(m(e.$$.fragment,l),m(s),i=!0)},o(l){_(e.$$.fragment,l),_(s),i=!1},d(l){O(e,l),l&&b(t),s&&s.d(l),l&&b(n)}}}function b8(r){let e=[],t=new Map,n,i,s=r[5];const l=o=>o[23].id;for(let o=0;o<s.length;o+=1){let a=h8(r,s,o),u=l(a);t.set(u,e[o]=w8(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=Oe()},m(o,a){for(let u=0;u<e.length;u+=1)e[u].m(o,a);$(o,n,a),i=!0},p(o,a){a&7989&&(s=o[5],ee(),e=er(e,a,l,1,o,s,t,n.parentNode,jr,w8,n,h8),te())},i(o){if(!i){for(let a=0;a<s.length;a+=1)m(e[a]);i=!0}},o(o){for(let a=0;a<e.length;a+=1)_(e[a]);i=!1},d(o){for(let a=0;a<e.length;a+=1)e[a].d(o);o&&b(n)}}}function Dle(r){let e,t;return e=new Mle({props:{screenId:r[23].id}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&32&&(s.screenId=n[23].id),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function v8(r){let e,t;return e=new M1({props:{level:1,components:r[4].props._children,currentComponent:r[9],dragDropStore:r[11]}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&16&&(s.components=n[4].props._children),i&512&&(s.currentComponent=n[9]),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function w8(r,e){var u,f;let t,n,i,s,l;function o(){return e[20](e[23])}n=new As({props:{icon:"WebPage",indentLevel:e[2]||1,selected:e[8].selectedScreenId===e[23].id,opened:e[8].selectedScreenId===e[23].id,text:((u=e[10][e[23].route])==null?void 0:u[e[23].role])||e[23].route,withArrow:e[0].subpaths,$$slots:{default:[Dle]},$$scope:{ctx:e}}}),n.$on("click",o);let a=((f=e[4])==null?void 0:f._id)===e[23].id&&v8(e);return{key:r,first:null,c(){t=Oe(),A(n.$$.fragment),i=R(),a&&a.c(),s=Oe(),this.first=t},m(c,p){$(c,t,p),E(n,c,p),$(c,i,p),a&&a.m(c,p),$(c,s,p),l=!0},p(c,p){var g,h;e=c;const d={};p&4&&(d.indentLevel=e[2]||1),p&288&&(d.selected=e[8].selectedScreenId===e[23].id),p&288&&(d.opened=e[8].selectedScreenId===e[23].id),p&32&&(d.text=((g=e[10][e[23].route])==null?void 0:g[e[23].role])||e[23].route),p&1&&(d.withArrow=e[0].subpaths),p&67108896&&(d.$$scope={dirty:p,ctx:e}),n.$set(d),((h=e[4])==null?void 0:h._id)===e[23].id?a?(a.p(e,p),p&48&&m(a,1)):(a=v8(e),a.c(),m(a,1),a.m(s.parentNode,s)):a&&(ee(),_(a,1,1,()=>{a=null}),te())},i(c){l||(m(n.$$.fragment,c),m(a),l=!0)},o(c){_(n.$$.fragment,c),_(a),l=!1},d(c){c&&b(t),O(n,c),c&&b(i),a&&a.d(c),c&&b(s)}}}function jle(r){let e,t,n=!r[7]&&$8(r);return{c(){n&&n.c(),e=Oe()},m(i,s){n&&n.m(i,s),$(i,e,s),t=!0},p(i,[s]){i[7]?n&&(ee(),_(n,1,1,()=>{n=null}),te()):n?(n.p(i,s),s&128&&m(n,1)):(n=$8(i),n.c(),m(n,1),n.m(e.parentNode,e))},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){n&&n.d(i),i&&b(e)}}}function Ble(r,e,t){let n,i,s,l,o,a,u,f,c,p,d;ue(r,Jf,B=>t(18,f=B)),ue(r,dn,B=>t(19,c=B)),ue(r,Ye,B=>t(8,p=B)),ue(r,ni,B=>t(9,d=B));const g={"/":{BASIC:"Home",PUBLIC:"Home",ADMIN:"Home",POWER:"Home"}},h=f8();let{route:v}=e,{path:C}=e,{indent:k}=e,{border:I}=e,S=!1;const T=B=>{Ye.actions.screens.select(B)},N=B=>{let q=[];return Object.entries(B.subpaths).forEach(([U,J])=>{Object.entries(J.screens).forEach(([F,W])=>{q.push({id:W,route:U,role:F})})}),q},D=(B,q)=>B.filter(U=>!q||U.route.includes(q)),G=()=>{lt(Jf)||t(14,S=!S)},j=B=>T(B.id);return r.$$set=B=>{"route"in B&&t(0,v=B.route),"path"in B&&t(1,C=B.path),"indent"in B&&t(2,k=B.indent),"border"in B&&t(3,I=B.border)},r.$$.update=()=>{var B;r.$$.dirty&524288&&t(4,n=c),r.$$.dirty&1&&t(17,i=N(v)),r.$$.dirty&393216&&t(5,s=D(i,f)),r.$$.dirty&262176&&t(15,l=f&&s.length>0),r.$$.dirty&262176&&t(7,o=f&&!s.length),r.$$.dirty&17&&t(16,a=v.subpaths[(B=n==null?void 0:n.routing)==null?void 0:B.route]!==void 0),r.$$.dirty&114688&&t(6,u=S||a||l)},[v,C,k,I,n,s,u,o,p,d,g,h,T,G,S,l,a,i,f,c,j]}class zle extends se{constructor(e){super();le(this,e,Ble,jle,ne,{route:0,path:1,indent:2,border:3})}}function y8(r,e,t){const n=r.slice();return n[4]=e[t],n[6]=t,n}function k8(r,e){let t,n,i;return n=new zle({props:{border:e[6]>0,path:e[4],route:e[0][e[4]]}}),{key:r,first:null,c(){t=Oe(),A(n.$$.fragment),this.first=t},m(s,l){$(s,t,l),E(n,s,l),i=!0},p(s,l){e=s;const o={};l&2&&(o.border=e[6]>0),l&2&&(o.path=e[4]),l&3&&(o.route=e[0][e[4]]),n.$set(o)},i(s){i||(m(n.$$.fragment,s),i=!0)},o(s){_(n.$$.fragment,s),i=!1},d(s){s&&b(t),O(n,s)}}}function C8(r){let e;return{c(){e=M("div"),e.textContent="There aren't any screens configured with this access role.",y(e,"class","empty svelte-9rt57y")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function qle(r){let e,t=[],n=new Map,i,s,l=r[1];const o=u=>u[4];for(let u=0;u<l.length;u+=1){let f=y8(r,l,u),c=o(f);n.set(c,t[u]=k8(c,f))}let a=!r[1].length&&C8();return{c(){e=M("div");for(let u=0;u<t.length;u+=1)t[u].c();i=R(),a&&a.c(),y(e,"class","root")},m(u,f){$(u,e,f);for(let c=0;c<t.length;c+=1)t[c].m(e,null);P(e,i),a&&a.m(e,null),s=!0},p(u,[f]){f&3&&(l=u[1],ee(),t=er(t,f,o,1,u,l,n,e,jr,k8,i,y8),te()),u[1].length?a&&(a.d(1),a=null):a||(a=C8(),a.c(),a.m(e,null))},i(u){if(!s){for(let f=0;f<l.length;f+=1)m(t[f]);s=!0}},o(u){for(let f=0;f<t.length;f+=1)_(t[f]);s=!1},d(u){u&&b(e);for(let f=0;f<t.length;f+=1)t[f].d();a&&a.d()}}}function Ule(r,e,t){let n,i,s;ue(r,Ye,o=>t(2,i=o)),ue(r,Ks,o=>t(3,s=o));let l={};return r.$$.update=()=>{if(r.$$.dirty&12){const o=i.routes,a=Object.keys(o||{}).sort(),u=s,f=i.selectedScreenId;let c=!1,p,d={},g;a.forEach(h=>{const v=o[h];Object.entries(v.subpaths).forEach(([C,k])=>{Object.entries(k.screens).forEach(([I,S])=>{S===f&&(g=I,c=I===u),I===u&&(p||(p=S),d[h]||(d[h]={subpaths:{}}),d[h].subpaths[C]={screens:{[u]:S}})})})}),t(0,l=d),!c&&g?Ks.set(g):!c&&p&&Ye.actions.screens.select(p)}r.$$.dirty&1&&t(1,n=Object.keys(l||{}).sort())},[l,n,i,s]}class Fle extends se{constructor(e){super();le(this,e,Ule,qle,ne,{})}}function Vle(r){let e;return{c(){e=H("Edit")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Hle(r){let e;return{c(){e=H("Delete")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Wle(r){let e,t,n,i;return e=new tn({props:{icon:"Edit",$$slots:{default:[Vle]},$$scope:{ctx:r}}}),e.$on("click",function(){dt(r[1].show)&&r[1].show.apply(this,arguments)}),n=new tn({props:{icon:"Delete",$$slots:{default:[Hle]},$$scope:{ctx:r}}}),n.$on("click",function(){dt(r[0].show)&&r[0].show.apply(this,arguments)}),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(s,l){E(e,s,l),$(s,t,l),E(n,s,l),i=!0},p(s,l){r=s;const o={};l&512&&(o.$$scope={dirty:l,ctx:r}),e.$set(o);const a={};l&512&&(a.$$scope={dirty:l,ctx:r}),n.$set(a)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){O(e,s),s&&b(t),O(n,s)}}}function Gle(r){let e,t,n;return t=new pt({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){e=M("div"),A(t.$$.fragment),y(e,"slot","control"),y(e,"class","icon")},m(i,s){$(i,e,s),E(t,e,null),n=!0},p:Te,i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function Yle(r){let e,t,n;function i(l){r[7](l)}let s={thin:!0,type:"text",label:"Name"};return r[2]!==void 0&&(s.value=r[2]),e=new et({props:s}),Z.push(()=>ce(e,"value",i)),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){const a={};!t&&o&4&&(t=!0,a.value=l[2],pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function Jle(r){let e,t;return e=new jt({props:{title:"Edit Layout Name",confirmText:"Save",onConfirm:r[4],disabled:!r[2],$$slots:{default:[Yle]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&4&&(s.disabled=!n[2]),i&516&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Qle(r){let e,t,n,i,s,l;e=new Er({props:{$$slots:{control:[Gle],default:[Wle]},$$scope:{ctx:r}}});let o={title:"Confirm Deletion",body:"Are you sure you wish to delete this layout?",okText:"Delete Layout",onOk:r[3]};n=new yr({props:o}),r[6](n);let a={$$slots:{default:[Jle]},$$scope:{ctx:r}};return s=new St({props:a}),r[8](s),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment),i=R(),A(s.$$.fragment)},m(u,f){E(e,u,f),$(u,t,f),E(n,u,f),$(u,i,f),E(s,u,f),l=!0},p(u,[f]){const c={};f&515&&(c.$$scope={dirty:f,ctx:u}),e.$set(c);const p={};n.$set(p);const d={};f&516&&(d.$$scope={dirty:f,ctx:u}),s.$set(d)},i(u){l||(m(e.$$.fragment,u),m(n.$$.fragment,u),m(s.$$.fragment,u),l=!0)},o(u){_(e.$$.fragment,u),_(n.$$.fragment,u),_(s.$$.fragment,u),l=!1},d(u){O(e,u),u&&b(t),r[6](null),O(n,u),u&&b(i),r[8](null),O(s,u)}}}function Xle(r,e,t){let{layout:n}=e,i,s,l=n.name;const o=async()=>{try{await Ye.actions.layouts.delete(n),ye.success("Layout deleted successfully")}catch{ye.error("Error deleting layout")}},a=async()=>{try{const p=hn.cloneDeep(n);p.name=l,await Ye.actions.layouts.save(p),ye.success("Layout saved successfully")}catch{ye.error("Error saving layout")}};function u(p){Z[p?"unshift":"push"](()=>{i=p,t(0,i)})}function f(p){l=p,t(2,l)}function c(p){Z[p?"unshift":"push"](()=>{s=p,t(1,s)})}return r.$$set=p=>{"layout"in p&&t(5,n=p.layout)},[i,s,l,o,a,n,u,f,c]}class Kle extends se{constructor(e){super();le(this,e,Xle,Qle,ne,{layout:5})}}function Zle(r){let e,t;return e=new Kle({props:{layout:r[0]}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&1&&(s.layout=n[0]),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function S8(r){let e,t;return e=new M1({props:{components:r[0].props._children,currentComponent:r[3],dragDropStore:r[4]}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&1&&(s.components=n[0].props._children),i&8&&(s.currentComponent=n[3]),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function xle(r){var l;let e,t,n,i;e=new As({props:{border:r[1],icon:"ClassicGridView",text:r[0].name,withArrow:!0,selected:r[2].selectedLayoutId===r[0]._id,opened:r[2].selectedLayoutId===r[0]._id,$$slots:{default:[Zle]},$$scope:{ctx:r}}}),e.$on("click",r[5]);let s=r[2].selectedLayoutId===r[0]._id&&((l=r[0].props)==null?void 0:l._children)&&S8(r);return{c(){A(e.$$.fragment),t=R(),s&&s.c(),n=Oe()},m(o,a){E(e,o,a),$(o,t,a),s&&s.m(o,a),$(o,n,a),i=!0},p(o,[a]){var f;const u={};a&2&&(u.border=o[1]),a&1&&(u.text=o[0].name),a&5&&(u.selected=o[2].selectedLayoutId===o[0]._id),a&5&&(u.opened=o[2].selectedLayoutId===o[0]._id),a&65&&(u.$$scope={dirty:a,ctx:o}),e.$set(u),o[2].selectedLayoutId===o[0]._id&&((f=o[0].props)==null?void 0:f._children)?s?(s.p(o,a),a&5&&m(s,1)):(s=S8(o),s.c(),m(s,1),s.m(n.parentNode,n)):s&&(ee(),_(s,1,1,()=>{s=null}),te())},i(o){i||(m(e.$$.fragment,o),m(s),i=!0)},o(o){_(e.$$.fragment,o),_(s),i=!1},d(o){O(e,o),o&&b(t),s&&s.d(o),o&&b(n)}}}function eoe(r,e,t){let n,i;ue(r,Ye,u=>t(2,n=u)),ue(r,ni,u=>t(3,i=u));let{layout:s}=e,{border:l}=e;const o=f8(),a=()=>{Ye.actions.layouts.select(s._id)};return r.$$set=u=>{"layout"in u&&t(0,s=u.layout),"border"in u&&t(1,l=u.border)},[s,l,n,i,o,a]}class toe extends se{constructor(e){super();le(this,e,eoe,xle,ne,{layout:0,border:1})}}function noe(r){let e,t,n;function i(l){r[2](l)}let s={thin:!0,label:"Name"};return r[0]!==void 0&&(s.value=r[0]),e=new et({props:s}),Z.push(()=>ce(e,"value",i)),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){const a={};!t&&o&1&&(t=!0,a.value=l[0],pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function roe(r){let e,t;return e=new jt({props:{title:"Create Layout",confirmText:"Create",onConfirm:r[1],$$slots:{default:[noe]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,[i]){const s={};i&9&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function ioe(r,e,t){let n="";async function i(){try{await Ye.actions.layouts.save({name:n}),ye.success(`Layout ${n} created successfully`)}catch{ye.error("Error creating layout")}}function s(l){n=l,t(0,n)}return[n,i,s]}class soe extends se{constructor(e){super();le(this,e,ioe,roe,ne,{})}}function A8(r,e,t){const n=r.slice();return n[15]=e[t],n[17]=t,n}function loe(r){let e,t,n,i,s,l,o,a,u,f;n=new Ke({props:{value:r[3],label:"Filter by Access",getOptionLabel:coe,getOptionValue:poe,options:r[4]}}),n.$on("change",r[8]);function c(d){r[10](d)}let p={placeholder:"Enter a route to search",label:"Search Screens"};return r[5]!==void 0&&(p.value=r[5]),s=new Bu({props:p}),Z.push(()=>ce(s,"value",c)),u=new Fle({}),{c(){e=M("div"),t=M("div"),A(n.$$.fragment),i=R(),A(s.$$.fragment),o=R(),a=M("div"),A(u.$$.fragment),y(t,"class","role-select svelte-1m5uhpn"),y(a,"class","nav-items-container"),y(e,"class","tab-content-padding svelte-1m5uhpn")},m(d,g){$(d,e,g),P(e,t),E(n,t,null),P(t,i),E(s,t,null),P(e,o),P(e,a),E(u,a,null),f=!0},p(d,g){const h={};g&8&&(h.value=d[3]),g&16&&(h.options=d[4]),n.$set(h);const v={};!l&&g&32&&(l=!0,v.value=d[5],pe(()=>l=!1)),s.$set(v)},i(d){f||(m(n.$$.fragment,d),m(s.$$.fragment,d),m(u.$$.fragment,d),f=!0)},o(d){_(n.$$.fragment,d),_(s.$$.fragment,d),_(u.$$.fragment,d),f=!1},d(d){d&&b(e),O(n),O(s),O(u)}}}function E8(r,e){let t,n,i;return n=new toe({props:{layout:e[15],border:e[17]>0}}),{key:r,first:null,c(){t=Oe(),A(n.$$.fragment),this.first=t},m(s,l){$(s,t,l),E(n,s,l),i=!0},p(s,l){e=s;const o={};l&64&&(o.layout=e[15]),l&64&&(o.border=e[17]>0),n.$set(o)},i(s){i||(m(n.$$.fragment,s),i=!0)},o(s){_(n.$$.fragment,s),i=!1},d(s){s&&b(t),O(n,s)}}}function ooe(r){let e,t;return e=new soe({}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function aoe(r){let e,t=[],n=new Map,i,s,l,o=r[6].layouts;const a=f=>f[15]._id;for(let f=0;f<o.length;f+=1){let c=A8(r,o,f),p=a(c);n.set(p,t[f]=E8(p,c))}let u={$$slots:{default:[ooe]},$$scope:{ctx:r}};return s=new St({props:u}),r[11](s),{c(){e=M("div");for(let f=0;f<t.length;f+=1)t[f].c();i=R(),A(s.$$.fragment),y(e,"class","tab-content-padding svelte-1m5uhpn")},m(f,c){$(f,e,c);for(let p=0;p<t.length;p+=1)t[p].m(e,null);P(e,i),E(s,e,null),l=!0},p(f,c){c&64&&(o=f[6].layouts,ee(),t=er(t,c,a,1,f,o,n,e,jr,E8,i,A8),te());const p={};c&262144&&(p.$$scope={dirty:c,ctx:f}),s.$set(p)},i(f){if(!l){for(let c=0;c<o.length;c+=1)m(t[c]);m(s.$$.fragment,f),l=!0}},o(f){for(let c=0;c<t.length;c+=1)_(t[c]);_(s.$$.fragment,f),l=!1},d(f){f&&b(e);for(let c=0;c<t.length;c+=1)t[c].d();r[11](null),O(s)}}}function uoe(r){let e,t,n,i;return e=new gn({props:{title:"Screens",$$slots:{default:[loe]},$$scope:{ctx:r}}}),n=new gn({props:{title:"Layouts",$$slots:{default:[aoe]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(s,l){E(e,s,l),$(s,t,l),E(n,s,l),i=!0},p(s,l){const o={};l&262200&&(o.$$scope={dirty:l,ctx:s}),e.$set(o);const a={};l&262210&&(a.$$scope={dirty:l,ctx:s}),n.$set(a)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){O(e,s),s&&b(t),O(n,s)}}}function foe(r){let e,t,n,i,s,l;return t=new zr({props:{selected:r[2],$$slots:{default:[uoe]},$$scope:{ctx:r}}}),t.$on("select",r[7]),s=new pt({props:{hoverable:!0,name:"AddCircle"}}),s.$on("click",function(){dt(r[2]==="Layouts"?r[1].show():r[0]())&&(r[2]==="Layouts"?r[1].show():r[0]()).apply(this,arguments)}),{c(){e=M("div"),A(t.$$.fragment),n=R(),i=M("div"),A(s.$$.fragment),y(i,"class","add-button svelte-1m5uhpn"),y(e,"class","title svelte-1m5uhpn")},m(o,a){$(o,e,a),E(t,e,null),P(e,n),P(e,i),E(s,i,null),l=!0},p(o,[a]){r=o;const u={};a&4&&(u.selected=r[2]),a&262266&&(u.$$scope={dirty:a,ctx:r}),t.$set(u)},i(o){l||(m(t.$$.fragment,o),m(s.$$.fragment,o),l=!0)},o(o){_(t.$$.fragment,o),_(s.$$.fragment,o),l=!1},d(o){o&&b(e),O(t),O(s)}}}const coe=r=>r.name,poe=r=>r._id;function doe(r,e,t){let n,i,s,l,o,a,u,f;ue(r,Xs,k=>t(12,i=k)),ue(r,Bt,k=>t(13,s=k)),ue(r,tr,k=>t(9,l=k)),ue(r,Ks,k=>t(3,o=k)),ue(r,Vi,k=>t(4,a=k)),ue(r,Jf,k=>t(5,u=k)),ue(r,Ye,k=>t(6,f=k));let{showModal:c}=e;const p=[{title:"Screens",key:"screen"},{title:"Layouts",key:"layout"}];let d;const g=({detail:k})=>{const{key:I}=p.find(S=>S.title===k);s(`../${I}`)},h=k=>{var T;const I=k.detail,S=(T=i.find(N=>N.routing.roleId===I))==null?void 0:T._id;S?Ye.actions.screens.select(S):Ye.update(N=>(N.selectedScreenId=null,N)),Ks.set(I)};Yt(async()=>{try{await Ye.actions.routing.fetch()}catch{ye.error("Error fetching routes")}});function v(k){u=k,Jf.set(u)}function C(k){Z[k?"unshift":"push"](()=>{d=k,t(1,d)})}return r.$$set=k=>{"showModal"in k&&t(0,c=k.showModal)},r.$$.update=()=>{var k;r.$$.dirty&512&&t(2,n=((k=p.find(I=>I.key===l.assetType))==null?void 0:k.title)||"Screens")},[c,d,n,o,a,u,f,g,h,l,v,C]}class moe extends se{constructor(e){super();le(this,e,doe,foe,ne,{showModal:0})}}function goe(r){let e,t,n;return t=new Ke({props:{value:r[0].theme,options:r[1],placeholder:null}}),t.$on("change",r[3]),{c(){e=M("div"),A(t.$$.fragment),y(e,"class","svelte-12k7lrs")},m(i,s){$(i,e,s),E(t,e,null),n=!0},p(i,[s]){const l={};s&1&&(l.value=i[0].theme),t.$set(l)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function _oe(r,e,t){let n;ue(r,Ye,o=>t(0,n=o));const i=[{label:"Lightest",value:"spectrum--lightest"},{label:"Light",value:"spectrum--light"},{label:"Dark",value:"spectrum--dark"},{label:"Darkest",value:"spectrum--darkest"}],s=async o=>{try{await Ye.actions.theme.save(o),await Ye.actions.customTheme.save(rt(Ee({},lt(Ye).customTheme),{navBackground:o==="spectrum--light"?"var(--spectrum-global-color-gray-50)":"var(--spectrum-global-color-gray-100)"}))}catch{ye.error("Error updating theme")}};return[n,i,s,o=>s(o.detail)]}class O8 extends se{constructor(e){super();le(this,e,_oe,goe,ne,{})}}function hoe(r){let e;return{c(){e=H("Theme")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function $oe(r){let e;return{c(){e=H("Theme")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function boe(r){let e;return{c(){e=H("Button roundness")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function voe(r){let e;return{c(){e=H("Accent color")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function woe(r){let e;return{c(){e=H("Accent color (hover)")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function yoe(r){let e;return{c(){e=H("Navigation bar background color")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function koe(r){let e;return{c(){e=H("Navigation bar text color")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Coe(r){var V,Q,me,re,x;let e,t,n,i,s,l,o,a,u,f,c,p,d,g,h,v,C,k,I,S,T,N,D,G,j,B,q,U,J,F,W;return t=new xe({props:{size:"L",$$slots:{default:[$oe]},$$scope:{ctx:r}}}),i=new O8({}),o=new xe({props:{size:"L",$$slots:{default:[boe]},$$scope:{ctx:r}}}),f=new Ke({props:{placeholder:null,value:((V=r[1].customTheme)==null?void 0:V.buttonBorderRadius)||r[2].buttonBorderRadius,options:r[3]}}),f.$on("change",r[4]("buttonBorderRadius")),d=new xe({props:{size:"L",$$slots:{default:[voe]},$$scope:{ctx:r}}}),h=new Vl({props:{spectrumTheme:r[1].theme,value:((Q=r[1].customTheme)==null?void 0:Q.primaryColor)||r[2].primaryColor}}),h.$on("change",r[4]("primaryColor")),k=new xe({props:{size:"L",$$slots:{default:[woe]},$$scope:{ctx:r}}}),S=new Vl({props:{spectrumTheme:r[1].theme,value:((me=r[1].customTheme)==null?void 0:me.primaryColorHover)||r[2].primaryColorHover}}),S.$on("change",r[4]("primaryColorHover")),D=new xe({props:{size:"L",$$slots:{default:[yoe]},$$scope:{ctx:r}}}),j=new Vl({props:{spectrumTheme:r[1].theme,value:((re=r[1].customTheme)==null?void 0:re.navBackground)||r[2].navBackground}}),j.$on("change",r[4]("navBackground")),U=new xe({props:{size:"L",$$slots:{default:[koe]},$$scope:{ctx:r}}}),F=new Vl({props:{spectrumTheme:r[1].theme,value:((x=r[1].customTheme)==null?void 0:x.navTextColor)||r[2].navTextColor}}),F.$on("change",r[4]("navTextColor")),{c(){e=M("div"),A(t.$$.fragment),n=R(),A(i.$$.fragment),s=R(),l=M("div"),A(o.$$.fragment),a=R(),u=M("div"),A(f.$$.fragment),c=R(),p=M("div"),A(d.$$.fragment),g=R(),A(h.$$.fragment),v=R(),C=M("div"),A(k.$$.fragment),I=R(),A(S.$$.fragment),T=R(),N=M("div"),A(D.$$.fragment),G=R(),A(j.$$.fragment),B=R(),q=M("div"),A(U.$$.fragment),J=R(),A(F.$$.fragment),y(e,"class","setting svelte-16s1p8l"),y(u,"class","select-wrapper svelte-16s1p8l"),y(l,"class","setting svelte-16s1p8l"),y(p,"class","setting svelte-16s1p8l"),y(C,"class","setting svelte-16s1p8l"),y(N,"class","setting svelte-16s1p8l"),y(q,"class","setting svelte-16s1p8l")},m(ae,_e){$(ae,e,_e),E(t,e,null),P(e,n),E(i,e,null),$(ae,s,_e),$(ae,l,_e),E(o,l,null),P(l,a),P(l,u),E(f,u,null),$(ae,c,_e),$(ae,p,_e),E(d,p,null),P(p,g),E(h,p,null),$(ae,v,_e),$(ae,C,_e),E(k,C,null),P(C,I),E(S,C,null),$(ae,T,_e),$(ae,N,_e),E(D,N,null),P(N,G),E(j,N,null),$(ae,B,_e),$(ae,q,_e),E(U,q,null),P(q,J),E(F,q,null),W=!0},p(ae,_e){var ke,Ge,Lt,Ue,ft;const Re={};_e&128&&(Re.$$scope={dirty:_e,ctx:ae}),t.$set(Re);const be={};_e&128&&(be.$$scope={dirty:_e,ctx:ae}),o.$set(be);const ve={};_e&2&&(ve.value=((ke=ae[1].customTheme)==null?void 0:ke.buttonBorderRadius)||ae[2].buttonBorderRadius),f.$set(ve);const he={};_e&128&&(he.$$scope={dirty:_e,ctx:ae}),d.$set(he);const Pe={};_e&2&&(Pe.spectrumTheme=ae[1].theme),_e&2&&(Pe.value=((Ge=ae[1].customTheme)==null?void 0:Ge.primaryColor)||ae[2].primaryColor),h.$set(Pe);const Fe={};_e&128&&(Fe.$$scope={dirty:_e,ctx:ae}),k.$set(Fe);const ie={};_e&2&&(ie.spectrumTheme=ae[1].theme),_e&2&&(ie.value=((Lt=ae[1].customTheme)==null?void 0:Lt.primaryColorHover)||ae[2].primaryColorHover),S.$set(ie);const Ce={};_e&128&&(Ce.$$scope={dirty:_e,ctx:ae}),D.$set(Ce);const de={};_e&2&&(de.spectrumTheme=ae[1].theme),_e&2&&(de.value=((Ue=ae[1].customTheme)==null?void 0:Ue.navBackground)||ae[2].navBackground),j.$set(de);const Se={};_e&128&&(Se.$$scope={dirty:_e,ctx:ae}),U.$set(Se);const qe={};_e&2&&(qe.spectrumTheme=ae[1].theme),_e&2&&(qe.value=((ft=ae[1].customTheme)==null?void 0:ft.navTextColor)||ae[2].navTextColor),F.$set(qe)},i(ae){W||(m(t.$$.fragment,ae),m(i.$$.fragment,ae),m(o.$$.fragment,ae),m(f.$$.fragment,ae),m(d.$$.fragment,ae),m(h.$$.fragment,ae),m(k.$$.fragment,ae),m(S.$$.fragment,ae),m(D.$$.fragment,ae),m(j.$$.fragment,ae),m(U.$$.fragment,ae),m(F.$$.fragment,ae),W=!0)},o(ae){_(t.$$.fragment,ae),_(i.$$.fragment,ae),_(o.$$.fragment,ae),_(f.$$.fragment,ae),_(d.$$.fragment,ae),_(h.$$.fragment,ae),_(k.$$.fragment,ae),_(S.$$.fragment,ae),_(D.$$.fragment,ae),_(j.$$.fragment,ae),_(U.$$.fragment,ae),_(F.$$.fragment,ae),W=!1},d(ae){ae&&b(e),O(t),O(i),ae&&b(s),ae&&b(l),O(o),O(f),ae&&b(c),ae&&b(p),O(d),O(h),ae&&b(v),ae&&b(C),O(k),O(S),ae&&b(T),ae&&b(N),O(D),O(j),ae&&b(B),ae&&b(q),O(U),O(F)}}}function Soe(r){let e,t;return e=new Qe({props:{noPadding:!0,gap:"S",$$slots:{default:[Coe]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&130&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Aoe(r){let e;return{c(){e=H("Reset")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Eoe(r){let e,t,n;return t=new ut({props:{secondary:!0,quiet:!0,$$slots:{default:[Aoe]},$$scope:{ctx:r}}}),t.$on("click",r[5]),{c(){e=M("div"),A(t.$$.fragment),y(e,"slot","footer")},m(i,s){$(i,e,s),E(t,e,null),n=!0},p(i,s){const l={};s&128&&(l.$$scope={dirty:s,ctx:i}),t.$set(l)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function Ooe(r){let e,t;return e=new jt({props:{showConfirmButton:!1,cancelText:"View changes",showCloseIcon:!1,title:"Theme settings",$$slots:{footer:[Eoe],default:[Soe]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&130&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Toe(r){let e,t,n,i,s;t=new Gt({props:{icon:"Brush",$$slots:{default:[hoe]},$$scope:{ctx:r}}}),t.$on("click",function(){dt(r[0].show)&&r[0].show.apply(this,arguments)});let l={$$slots:{default:[Ooe]},$$scope:{ctx:r}};return i=new St({props:l}),r[6](i),{c(){e=M("div"),A(t.$$.fragment),n=R(),A(i.$$.fragment),y(e,"class","container svelte-16s1p8l")},m(o,a){$(o,e,a),E(t,e,null),$(o,n,a),E(i,o,a),s=!0},p(o,[a]){r=o;const u={};a&128&&(u.$$scope={dirty:a,ctx:r}),t.$set(u);const f={};a&130&&(f.$$scope={dirty:a,ctx:r}),i.$set(f)},i(o){s||(m(t.$$.fragment,o),m(i.$$.fragment,o),s=!0)},o(o){_(t.$$.fragment,o),_(i.$$.fragment,o),s=!1},d(o){o&&b(e),O(t),o&&b(n),r[6](null),O(i,o)}}}function Ioe(r,e,t){let n;ue(r,Ye,f=>t(1,n=f));let i;const s={primaryColor:"var(--spectrum-global-color-blue-600)",primaryColorHover:"var(--spectrum-global-color-blue-500)",buttonBorderRadius:"16px",navBackground:"var(--spectrum-global-color-gray-50)",navTextColor:"var(--spectrum-global-color-gray-800)"},l=[{label:"None",value:"0"},{label:"Small",value:"4px"},{label:"Medium",value:"8px"},{label:"Large",value:"16px"}],o=f=>async c=>{try{Ye.actions.customTheme.save(rt(Ee({},lt(Ye).customTheme),{[f]:c.detail}))}catch{ye.error("Error updating custom theme")}},a=()=>{try{const f=lt(Ye).theme;Ye.actions.customTheme.save(rt(Ee({},s),{navBackground:f==="spectrum--light"?"var(--spectrum-global-color-gray-50)":"var(--spectrum-global-color-gray-100)"}))}catch{ye.error("Error saving custom theme")}};function u(f){Z[f?"unshift":"push"](()=>{i=f,t(0,i)})}return[i,n,s,l,o,a,u]}class Loe extends se{constructor(e){super();le(this,e,Ioe,Toe,ne,{})}}function Poe(r){let e,t,n,i,s,l;return e=new Gt({props:{icon:"DeviceDesktop",selected:r[0].previewDevice==="desktop"}}),e.$on("click",r[1]),n=new Gt({props:{icon:"DeviceTablet",selected:r[0].previewDevice==="tablet"}}),n.$on("click",r[2]),s=new Gt({props:{icon:"DevicePhone",selected:r[0].previewDevice==="mobile"}}),s.$on("click",r[3]),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment),i=R(),A(s.$$.fragment)},m(o,a){E(e,o,a),$(o,t,a),E(n,o,a),$(o,i,a),E(s,o,a),l=!0},p(o,a){const u={};a&1&&(u.selected=o[0].previewDevice==="desktop"),e.$set(u);const f={};a&1&&(f.selected=o[0].previewDevice==="tablet"),n.$set(f);const c={};a&1&&(c.selected=o[0].previewDevice==="mobile"),s.$set(c)},i(o){l||(m(e.$$.fragment,o),m(n.$$.fragment,o),m(s.$$.fragment,o),l=!0)},o(o){_(e.$$.fragment,o),_(n.$$.fragment,o),_(s.$$.fragment,o),l=!1},d(o){O(e,o),o&&b(t),O(n,o),o&&b(i),O(s,o)}}}function Noe(r){let e,t;return e=new bh({props:{compact:!0,$$slots:{default:[Poe]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,[i]){const s={};i&17&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Roe(r,e,t){let n;return ue(r,Ye,o=>t(0,n=o)),[n,()=>Ye.actions.preview.setDevice("desktop"),()=>Ye.actions.preview.setDevice("tablet"),()=>Ye.actions.preview.setDevice("mobile")]}class Moe extends se{constructor(e){super();le(this,e,Roe,Noe,ne,{})}}var T8="/builder/assets/bb-space-man.5be51a45.svg";function Doe(r){let e,t,n,i,s,l;function o(c){r[7](c)}let a={label:"Name"};r[0]!==void 0&&(a.value=r[0]),e=new et({props:a}),Z.push(()=>ce(e,"value",o));function u(c){r[8](c)}let f={label:"URL",error:r[5]};return r[1]!==void 0&&(f.value=r[1]),i=new et({props:f}),Z.push(()=>ce(i,"value",u)),i.$on("change",r[6]),{c(){A(e.$$.fragment),n=R(),A(i.$$.fragment)},m(c,p){E(e,c,p),$(c,n,p),E(i,c,p),l=!0},p(c,p){const d={};!t&&p&1&&(t=!0,d.value=c[0],pe(()=>t=!1)),e.$set(d);const g={};p&32&&(g.error=c[5]),!s&&p&2&&(s=!0,g.value=c[1],pe(()=>s=!1)),i.$set(g)},i(c){l||(m(e.$$.fragment,c),m(i.$$.fragment,c),l=!0)},o(c){_(e.$$.fragment,c),_(i.$$.fragment,c),l=!1},d(c){O(e,c),c&&b(n),O(i,c)}}}function I8(r){let e,t,n;return t=new Vo({props:{size:"S"}}),{c(){e=M("div"),A(t.$$.fragment),y(e,"class","footer-progress svelte-19rzw36")},m(i,s){$(i,e,s),E(t,e,null),n=!0},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function joe(r){let e,t,n=r[4]&&I8();return{c(){e=M("div"),n&&n.c(),y(e,"slot","footer")},m(i,s){$(i,e,s),n&&n.m(e,null),t=!0},p(i,s){i[4]?n?s&16&&m(n,1):(n=I8(),n.c(),m(n,1),n.m(e,null)):n&&(ee(),_(n,1,1,()=>{n=null}),te())},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){i&&b(e),n&&n.d()}}}function Boe(r){let e,t;return e=new jt({props:{size:"M",title:"Enter details",confirmText:"Continue",onCancel:r[9],onConfirm:r[10],cancelText:"Back",disabled:!r[0]||!r[1]||r[5],$$slots:{footer:[joe],default:[Doe]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,[i]){const s={};i&4&&(s.onCancel=n[9]),i&8&&(s.onConfirm=n[10]),i&35&&(s.disabled=!n[0]||!n[1]||n[5]),i&32819&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function zoe(r,e,t){let n,i;ue(r,Xs,k=>t(11,n=k)),ue(r,Ks,k=>t(12,i=k));let{screenName:s}=e,{url:l}=e,{chooseModal:o}=e,{save:a}=e,{showProgressCircle:u=!1}=e,f,c=i||"BASIC";const p=k=>{k.detail.startsWith("/")||t(1,l="/"+k.detail),t(1,l=mo(l)),d(l,c)?t(5,f="This URL is already taken for this access role"):t(5,f="")},d=(k,I)=>n.some(S=>S.routing.route.toLowerCase()===k.toLowerCase()&&S.routing.roleId===I);Do(()=>{t(0,s=""),t(1,l="")});function g(k){s=k,t(0,s)}function h(k){l=k,t(1,l)}const v=()=>o(0),C=()=>a();return r.$$set=k=>{"screenName"in k&&t(0,s=k.screenName),"url"in k&&t(1,l=k.url),"chooseModal"in k&&t(2,o=k.chooseModal),"save"in k&&t(3,a=k.save),"showProgressCircle"in k&&t(4,u=k.showProgressCircle)},[s,l,o,a,u,f,p,g,h,v,C]}class qoe extends se{constructor(e){super();le(this,e,zoe,Boe,ne,{screenName:0,url:1,chooseModal:2,save:3,showProgressCircle:4})}}function Uoe(r){return r.map(e=>({name:`${e.name} - Detail`,create:()=>Woe(e),id:Foe,table:e.name}))}const Foe="ROW_DETAIL_TEMPLATE",Voe=r=>mo(`/${r.name}/:id`);function Hoe(r,e,t,n){const i=p6(r,t),s=new Yn("@budibase/standard-components/button").text("Delete").customProps({type:"secondary",quiet:!0,size:"M",onClick:[{parameters:{tableId:r._id,rowId:`{{ ${On(n)}.${On("_id")} }}`,revId:`{{ ${On(n)}.${On("_rev")} }}`,confirm:!0},"##eventHandlerType":"Delete Row"},{parameters:{url:tc(r)},"##eventHandlerType":"Navigate To"}]}).instanceName("Delete Button"),l=new Yn("@budibase/standard-components/container").instanceName("Button Container").customProps({direction:"row",hAlign:"right",vAlign:"middle",size:"shrink",gap:"M"}).addChild(s).addChild(i);return d6(e).addChild(l)}const Woe=r=>{const e=new Yn("@budibase/standard-components/dataprovider").instanceName("Data Provider").customProps({dataSource:{label:r.name,name:r._id,tableId:r._id,type:"table"},filter:[{field:"_id",operator:"equal",type:"string",value:`{{ ${On("url")}.${On("id")} }}`,valueType:"Binding"}],limit:1,paginate:!1}),t=new Yn("@budibase/standard-components/repeater").instanceName("Repeater").customProps({dataProvider:`{{ literal ${On(e._json._id)} }}`,noRowsMessage:"We couldn't find a row to display"}),n=f6().instanceName("Form").customProps({actionType:"Update",size:"spectrum--medium",dataSource:{label:r.name,tableId:r._id,type:"table"}}),i=new Yn("@budibase/standard-components/fieldgroup").instanceName("Field Group").customProps({labelPosition:"left"}),s={type:"table",tableId:r._id};A1(s).forEach(u=>{i.addChild(u)});const l=n._json._id,o=t._json._id,a=r.primaryDisplay?`{{ ${On(o)}.${On(r.primaryDisplay)} }}`:null;return n.addChild(c6(r.name,a||"Edit")).addChild(Hoe(r,a||"Edit Row",l,o)).addChild(i),t.addChild(n),e.addChild(t),new Oa().instanceName(`${r.name} - Detail`).route(Voe(r)).customProps({hAlign:"center"}).addChild(e).json()};var Goe={name:"Create from scratch",id:"createFromScratch",create:()=>Yoe(),table:"Create from scratch"};const Yoe=()=>new Oa().instanceName("New Screen").json(),Joe=r=>[...Lx(r),...Uoe(r),...Mx(r)],Qoe=(r,e)=>()=>{const t=e();return t.name=t.props._id,t.routing.route=t.routing.route.toLowerCase(),t};var L8=(r,e)=>{const t=s=>rt(Ee({},s),{create:Qoe(r,s.create)}),n=t(Goe),i=Joe(e).map(t);return[n,...i.sort((s,l)=>s.name>l.name?1:-1)]};function P8(r,e,t){const n=r.slice();return n[20]=e[t],n}function Xoe(r){let e;return{c(){e=H(`Please select the screens you would like to add to your application.
|
|
1223
|
-
Autogenerated screens come with CRUD functionality.`)},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Koe(r){let e;return{c(){e=H("Blank screen")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function N8(r){let e,t,n;return t=new pt({props:{size:"S",name:"CheckmarkCircleOutline"}}),{c(){e=M("div"),A(t.$$.fragment),y(e,"class","checkmark-spacing svelte-1t0fa8v")},m(i,s){$(i,e,s),E(t,e,null),n=!0},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function R8(r){let e,t,n,i;e=new Wn({props:{size:"S",$$slots:{default:[Zoe]},$$scope:{ctx:r}}});let s=r[4].list.filter(z8),l=[];for(let a=0;a<s.length;a+=1)l[a]=D8(P8(r,s,a));const o=a=>_(l[a],1,1,()=>{l[a]=null});return{c(){A(e.$$.fragment),t=R();for(let a=0;a<l.length;a+=1)l[a].c();n=Oe()},m(a,u){E(e,a,u),$(a,t,u);for(let f=0;f<l.length;f+=1)l[f].m(a,u);$(a,n,u),i=!0},p(a,u){const f={};if(u&8388608&&(f.$$scope={dirty:u,ctx:a}),e.$set(f),u&150){s=a[4].list.filter(z8);let c;for(c=0;c<s.length;c+=1){const p=P8(a,s,c);l[c]?(l[c].p(p,u),m(l[c],1)):(l[c]=D8(p),l[c].c(),m(l[c],1),l[c].m(n.parentNode,n))}for(ee(),c=s.length;c<l.length;c+=1)o(c);te()}},i(a){if(!i){m(e.$$.fragment,a);for(let u=0;u<s.length;u+=1)m(l[u]);i=!0}},o(a){_(e.$$.fragment,a),l=l.filter(Boolean);for(let u=0;u<l.length;u+=1)_(l[u]);i=!1},d(a){O(e,a),a&&b(t),_t(l,a),a&&b(n)}}}function Zoe(r){let e;return{c(){e=H("Autogenerated Screens")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function M8(r){let e,t,n;return t=new pt({props:{size:"S",name:"CheckmarkCircleOutline"}}),{c(){e=M("div"),A(t.$$.fragment),y(e,"class","checkmark-spacing svelte-1t0fa8v")},m(i,s){$(i,e,s),E(t,e,null),n=!0},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function D8(r){let e,t,n,i=r[20].name+"",s,l,o,a=r[1].find(d),u,f,c,p;function d(...C){return r[10](r[20],...C)}let g=a&&M8();function h(){return r[14](r[20])}function v(...C){return r[15](r[20],...C)}return{c(){e=M("div"),t=M("div"),n=M("div"),s=H(i),l=R(),o=M("div"),g&&g.c(),u=R(),y(n,"class","text svelte-1t0fa8v"),y(t,"class","content svelte-1t0fa8v"),Ft(o,"color","var(--spectrum-global-color-green-600)"),Ft(o,"float","right"),y(e,"class","item svelte-1t0fa8v"),oe(e,"disabled",r[2]),oe(e,"selected",r[1].find(v))},m(C,k){$(C,e,k),P(e,t),P(t,n),P(n,s),P(e,l),P(e,o),g&&g.m(o,null),P(e,u),f=!0,c||(p=Le(e,"click",h),c=!0)},p(C,k){r=C,(!f||k&16)&&i!==(i=r[20].name+"")&&Ie(s,i),k&18&&(a=r[1].find(d)),a?g?k&18&&m(g,1):(g=M8(),g.c(),m(g,1),g.m(o,null)):g&&(ee(),_(g,1,1,()=>{g=null}),te()),k&4&&oe(e,"disabled",r[2]),k&18&&oe(e,"selected",r[1].find(v))},i(C){f||(m(g),f=!0)},o(C){_(g),f=!1},d(C){C&&b(e),g&&g.d(),c=!1,p()}}}function xoe(r){let e,t,n,i,s,l,o=r[1].find(r[11]),a,u=r[4].list.filter(B8).length>0,f,c,p,d;e=new Wn({props:{size:"S",$$slots:{default:[Koe]},$$scope:{ctx:r}}});let g=o&&N8(),h=u&&R8(r);return{c(){A(e.$$.fragment),t=R(),n=M("div"),i=M("div"),i.innerHTML='<div class="text svelte-1t0fa8v">Blank</div>',s=R(),l=M("div"),g&&g.c(),a=R(),h&&h.c(),f=Oe(),y(i,"data-cy","blank-screen"),y(i,"class","content svelte-1t0fa8v"),Ft(l,"color","var(--spectrum-global-color-green-600)"),Ft(l,"float","right"),y(n,"class","item svelte-1t0fa8v"),oe(n,"selected",r[1].find(r[13])),oe(n,"disabled",r[3])},m(v,C){E(e,v,C),$(v,t,C),$(v,n,C),P(n,i),P(n,s),P(n,l),g&&g.m(l,null),$(v,a,C),h&&h.m(v,C),$(v,f,C),c=!0,p||(d=Le(n,"click",r[12]),p=!0)},p(v,C){const k={};C&8388608&&(k.$$scope={dirty:C,ctx:v}),e.$set(k),C&2&&(o=v[1].find(v[11])),o?g?C&2&&m(g,1):(g=N8(),g.c(),m(g,1),g.m(l,null)):g&&(ee(),_(g,1,1,()=>{g=null}),te()),C&2&&oe(n,"selected",v[1].find(v[13])),C&8&&oe(n,"disabled",v[3]),C&16&&(u=v[4].list.filter(B8).length>0),u?h?(h.p(v,C),C&16&&m(h,1)):(h=R8(v),h.c(),m(h,1),h.m(f.parentNode,f)):h&&(ee(),_(h,1,1,()=>{h=null}),te())},i(v){c||(m(e.$$.fragment,v),m(g),m(h),c=!0)},o(v){_(e.$$.fragment,v),_(g),_(h),c=!1},d(v){O(e,v),v&&b(t),v&&b(n),g&&g.d(),v&&b(a),h&&h.d(v),v&&b(f),p=!1,d()}}}function eae(r){let e,t,n,i;return e=new Je({props:{size:"S",$$slots:{default:[Xoe]},$$scope:{ctx:r}}}),n=new Qe({props:{noPadding:!0,gap:"S",$$slots:{default:[xoe]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(s,l){E(e,s,l),$(s,t,l),E(n,s,l),i=!0},p(s,l){const o={};l&8388608&&(o.$$scope={dirty:l,ctx:s}),e.$set(o);const a={};l&8388638&&(a.$$scope={dirty:l,ctx:s}),n.$set(a)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){O(e,s),s&&b(t),O(n,s)}}}function j8(r){let e,t,n;return t=new Vo({props:{size:"S"}}),{c(){e=M("div"),A(t.$$.fragment),y(e,"class","footer-progress svelte-1t0fa8v")},m(i,s){$(i,e,s),E(t,e,null),n=!0},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function tae(r){let e,t,n=r[0]&&j8();return{c(){e=M("div"),n&&n.c(),y(e,"slot","footer")},m(i,s){$(i,e,s),n&&n.m(e,null),t=!0},p(i,s){i[0]?n?s&1&&m(n,1):(n=j8(),n.c(),m(n,1),n.m(e,null)):n&&(ee(),_(n,1,1,()=>{n=null}),te())},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){i&&b(e),n&&n.d()}}}function nae(r){let e,t,n;return t=new jt({props:{title:"Add screens",confirmText:"Add Screens",cancelText:"Cancel",onConfirm:r[16],disabled:!r[1].length,size:"L",$$slots:{footer:[tae],default:[eae]},$$scope:{ctx:r}}}),{c(){e=M("div"),A(t.$$.fragment)},m(i,s){$(i,e,s),E(t,e,null),n=!0},p(i,[s]){const l={};s&2&&(l.disabled=!i[1].length),s&8388639&&(l.$$scope={dirty:s,ctx:i}),t.$set(l)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}const D1="createFromScratch",B8=r=>r._id!=="ta_users",z8=r=>r._id!=="ta_users";function rae(r,e,t){let n,i,s,l;ue(r,At,D=>t(4,s=D)),ue(r,Ye,D=>t(17,l=D));let{chooseModal:o}=e,{save:a}=e,{showProgressCircle:u=!1}=e,f=[];const c=mt();function p(){c("save",{screens:f})}let d=L8(l,s.list);const g=async()=>{i?(p(),await a()):(p(),o(1))},h=D=>{if(f.find(G=>G.table===D.name))t(1,f=f.filter(G=>G.table!==D.name));else{let G=L8(l,s.list).filter(j=>j.table===D.name);t(1,f=[...G,...f])}};Do(()=>{t(1,f=[])});const v=(D,G)=>G.table===D.name,C=D=>D.id===D1,k=()=>h(d.find(D=>D.id===D1)),I=D=>D.id.includes(D1),S=D=>h(D),T=(D,G)=>G.table===D.name,N=()=>g();return r.$$set=D=>{"chooseModal"in D&&t(8,o=D.chooseModal),"save"in D&&t(9,a=D.save),"showProgressCircle"in D&&t(0,u=D.showProgressCircle)},r.$$.update=()=>{r.$$.dirty&2&&t(2,n=(f==null?void 0:f.length)===1),r.$$.dirty&6&&t(3,i=(f==null?void 0:f.length)>0&&!n)},[u,f,n,i,s,d,g,h,o,a,v,C,k,I,S,T,N]}class iae extends se{constructor(e){super();le(this,e,rae,nae,ne,{chooseModal:8,save:9,showProgressCircle:0})}}function sae(r){let e,t;return e=new iae({props:{showProgressCircle:r[4],save:r[5],chooseModal:r[7]}}),e.$on("save",r[6]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&16&&(s.showProgressCircle=n[4]),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function lae(r){let e,t,n,i;function s(a){r[10](a)}function l(a){r[11](a)}let o={showProgressCircle:r[4],save:r[5],chooseModal:r[7]};return r[2]!==void 0&&(o.screenName=r[2]),r[3]!==void 0&&(o.url=r[3]),e=new qoe({props:o}),Z.push(()=>ce(e,"screenName",s)),Z.push(()=>ce(e,"url",l)),{c(){A(e.$$.fragment)},m(a,u){E(e,a,u),i=!0},p(a,u){const f={};u&16&&(f.showProgressCircle=a[4]),!t&&u&4&&(t=!0,f.screenName=a[2],pe(()=>t=!1)),!n&&u&8&&(n=!0,f.url=a[3],pe(()=>n=!1)),e.$set(f)},i(a){i||(m(e.$$.fragment,a),i=!0)},o(a){_(e.$$.fragment,a),i=!1},d(a){O(e,a)}}}function oae(r){let e,t,n,i,s={$$slots:{default:[sae]},$$scope:{ctx:r}};e=new St({props:s}),r[9](e);let l={$$slots:{default:[lae]},$$scope:{ctx:r}};return n=new St({props:l}),r[12](n),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(o,a){E(e,o,a),$(o,t,a),E(n,o,a),i=!0},p(o,[a]){const u={};a&16777232&&(u.$$scope={dirty:a,ctx:o}),e.$set(u);const f={};a&16777244&&(f.$$scope={dirty:a,ctx:o}),n.$set(f)},i(o){i||(m(e.$$.fragment,o),m(n.$$.fragment,o),i=!0)},o(o){_(e.$$.fragment,o),_(n.$$.fragment,o),i=!1},d(o){r[9](null),O(e,o),o&&b(t),r[12](null),O(n,o)}}}function aae(r,e,t){let n,i,s;ue(r,Xs,q=>t(16,n=q)),ue(r,Ye,q=>t(17,i=q)),ue(r,Ks,q=>t(18,s=q));let l,o,a,u="",f="",c=[],p=s||"BASIC",d=!1,g,h=[];const v=async()=>{for(let q of c){let U=q.create();h.push(U),zn.captureEvent(Qn.SCREEN.CREATED,{template:q.id||q.name})}},C=async()=>{t(4,d=!0);try{await v();for(let q of h)await k(q);await Ye.actions.routing.fetch(),c=[],h=[],t(2,u=""),t(3,f="")}catch{ye.error("Error creating screens")}t(4,d=!1)},k=async q=>{let U=i.screens.filter(F=>F.props._instanceName==q.props._instanceName).length;if(U>0){let F=q.routing.route.split("/");F[1]=`${F[1]}-${U+1}`,q.routing.route=F.join("/")}let J=f?mo(`${f}`):q.routing.route;if(q){if(J?I(J,p)?g="This URL is already taken for this access role":g="":g="URL is required",g)return!1;if(u&&(q.props._instanceName=u),q.routing.route=J,q.routing.roleId=p,await Ye.actions.screens.save(q),q.props._instanceName.endsWith("List"))try{await Ye.actions.components.links.save(q.routing.route,q.routing.route.split("/")[1])}catch{ye.error("Error creating link to screen")}}},I=(q,U)=>n.some(J=>J.routing.route.toLowerCase()===q.toLowerCase()&&J.routing.roleId===U),S=()=>{l.show()},T=q=>{c=q.detail.screens},N=q=>{q===0?l.show():q===1?a.show():q===2&&o.show()};function D(q){Z[q?"unshift":"push"](()=>{l=q,t(0,l)})}function G(q){u=q,t(2,u)}function j(q){f=q,t(3,f)}function B(q){Z[q?"unshift":"push"](()=>{a=q,t(1,a)})}return[l,a,u,f,d,C,T,N,S,D,G,j,B]}class uae extends se{constructor(e){super();le(this,e,aae,oae,ne,{showModal:8})}get showModal(){return this.$$.ctx[8]}}function fae(r){let e,t,n,i;return n=new Qe({props:{gap:"S",justifyItems:"center",$$slots:{default:[mae]},$$scope:{ctx:r}}}),{c(){e=M("div"),t=M("div"),A(n.$$.fragment),y(t,"class","main svelte-1nyfb82"),y(e,"class","centered svelte-1nyfb82")},m(s,l){$(s,e,l),P(e,t),E(n,t,null),i=!0},p(s,l){const o={};l&516&&(o.$$scope={dirty:l,ctx:s}),n.$set(o)},i(s){i||(m(n.$$.fragment,s),i=!0)},o(s){_(n.$$.fragment,s),i=!1},d(s){s&&b(e),O(n)}}}function cae(r){let e,t,n,i,s,l,o,a,u=r[0].version,f;t=new ple({});let c=r[0].clientFeatures.devicePreview&&q8();const p=[_ae,gae],d=[];function g(v,C){return v[0].clientFeatures.customThemes?0:v[0].clientFeatures.spectrumThemes?1:-1}~(s=g(r))&&(l=d[s]=p[s](r));let h=U8();return{c(){e=M("div"),A(t.$$.fragment),n=R(),c&&c.c(),i=R(),l&&l.c(),o=R(),a=M("div"),h.c(),y(e,"class","preview-header svelte-1nyfb82"),y(a,"class","preview-content svelte-1nyfb82")},m(v,C){$(v,e,C),E(t,e,null),P(e,n),c&&c.m(e,null),P(e,i),~s&&d[s].m(e,null),$(v,o,C),$(v,a,C),h.m(a,null),f=!0},p(v,C){v[0].clientFeatures.devicePreview?c?C&1&&m(c,1):(c=q8(),c.c(),m(c,1),c.m(e,i)):c&&(ee(),_(c,1,1,()=>{c=null}),te());let k=s;s=g(v),s!==k&&(l&&(ee(),_(d[k],1,1,()=>{d[k]=null}),te()),~s?(l=d[s],l||(l=d[s]=p[s](v),l.c()),m(l,1),l.m(e,null)):l=null),C&1&&ne(u,u=v[0].version)&&(ee(),_(h,1,1,Te),te(),h=U8(),h.c(),m(h),h.m(a,null))},i(v){f||(m(t.$$.fragment,v),m(c),m(l),m(h),f=!0)},o(v){_(t.$$.fragment,v),_(c),_(l),_(h),f=!1},d(v){v&&b(e),O(t),c&&c.d(),~s&&d[s].d(),v&&b(o),v&&b(a),h.d(v)}}}function pae(r){let e;return{c(){e=H("LET\u2019S BRING THIS APP TO LIFE")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function dae(r){let e,t,n,i,s;return n=new pt({props:{name:"Add"}}),{c(){e=M("div"),t=M("div"),A(n.$$.fragment),i=H(`
|
|
1223
|
+
Autogenerated screens come with CRUD functionality.`)},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Koe(r){let e;return{c(){e=H("Blank screen")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function N8(r){let e,t,n;return t=new pt({props:{size:"S",name:"CheckmarkCircleOutline"}}),{c(){e=M("div"),A(t.$$.fragment),y(e,"class","checkmark-spacing svelte-1t0fa8v")},m(i,s){$(i,e,s),E(t,e,null),n=!0},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function R8(r){let e,t,n,i;e=new Wn({props:{size:"S",$$slots:{default:[Zoe]},$$scope:{ctx:r}}});let s=r[4].list.filter(z8),l=[];for(let a=0;a<s.length;a+=1)l[a]=D8(P8(r,s,a));const o=a=>_(l[a],1,1,()=>{l[a]=null});return{c(){A(e.$$.fragment),t=R();for(let a=0;a<l.length;a+=1)l[a].c();n=Oe()},m(a,u){E(e,a,u),$(a,t,u);for(let f=0;f<l.length;f+=1)l[f].m(a,u);$(a,n,u),i=!0},p(a,u){const f={};if(u&8388608&&(f.$$scope={dirty:u,ctx:a}),e.$set(f),u&150){s=a[4].list.filter(z8);let c;for(c=0;c<s.length;c+=1){const p=P8(a,s,c);l[c]?(l[c].p(p,u),m(l[c],1)):(l[c]=D8(p),l[c].c(),m(l[c],1),l[c].m(n.parentNode,n))}for(ee(),c=s.length;c<l.length;c+=1)o(c);te()}},i(a){if(!i){m(e.$$.fragment,a);for(let u=0;u<s.length;u+=1)m(l[u]);i=!0}},o(a){_(e.$$.fragment,a),l=l.filter(Boolean);for(let u=0;u<l.length;u+=1)_(l[u]);i=!1},d(a){O(e,a),a&&b(t),_t(l,a),a&&b(n)}}}function Zoe(r){let e;return{c(){e=H("Autogenerated Screens")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function M8(r){let e,t,n;return t=new pt({props:{size:"S",name:"CheckmarkCircleOutline"}}),{c(){e=M("div"),A(t.$$.fragment),y(e,"class","checkmark-spacing svelte-1t0fa8v")},m(i,s){$(i,e,s),E(t,e,null),n=!0},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function D8(r){let e,t,n,i=r[20].name+"",s,l,o,a=r[1].find(d),u,f,c,p;function d(...C){return r[10](r[20],...C)}let g=a&&M8();function h(){return r[14](r[20])}function v(...C){return r[15](r[20],...C)}return{c(){e=M("div"),t=M("div"),n=M("div"),s=H(i),l=R(),o=M("div"),g&&g.c(),u=R(),y(n,"class","text svelte-1t0fa8v"),y(t,"class","content svelte-1t0fa8v"),Ft(o,"color","var(--spectrum-global-color-green-600)"),Ft(o,"float","right"),y(e,"class","item svelte-1t0fa8v"),oe(e,"disabled",r[2]),oe(e,"selected",r[1].find(v))},m(C,k){$(C,e,k),P(e,t),P(t,n),P(n,s),P(e,l),P(e,o),g&&g.m(o,null),P(e,u),f=!0,c||(p=Le(e,"click",h),c=!0)},p(C,k){r=C,(!f||k&16)&&i!==(i=r[20].name+"")&&Ie(s,i),k&18&&(a=r[1].find(d)),a?g?k&18&&m(g,1):(g=M8(),g.c(),m(g,1),g.m(o,null)):g&&(ee(),_(g,1,1,()=>{g=null}),te()),k&4&&oe(e,"disabled",r[2]),k&18&&oe(e,"selected",r[1].find(v))},i(C){f||(m(g),f=!0)},o(C){_(g),f=!1},d(C){C&&b(e),g&&g.d(),c=!1,p()}}}function xoe(r){let e,t,n,i,s,l,o=r[1].find(r[11]),a,u=r[4].list.filter(B8).length>0,f,c,p,d;e=new Wn({props:{size:"S",$$slots:{default:[Koe]},$$scope:{ctx:r}}});let g=o&&N8(),h=u&&R8(r);return{c(){A(e.$$.fragment),t=R(),n=M("div"),i=M("div"),i.innerHTML='<div class="text svelte-1t0fa8v">Blank</div>',s=R(),l=M("div"),g&&g.c(),a=R(),h&&h.c(),f=Oe(),y(i,"data-cy","blank-screen"),y(i,"class","content svelte-1t0fa8v"),Ft(l,"color","var(--spectrum-global-color-green-600)"),Ft(l,"float","right"),y(n,"class","item svelte-1t0fa8v"),oe(n,"selected",r[1].find(r[13])),oe(n,"disabled",r[3])},m(v,C){E(e,v,C),$(v,t,C),$(v,n,C),P(n,i),P(n,s),P(n,l),g&&g.m(l,null),$(v,a,C),h&&h.m(v,C),$(v,f,C),c=!0,p||(d=Le(n,"click",r[12]),p=!0)},p(v,C){const k={};C&8388608&&(k.$$scope={dirty:C,ctx:v}),e.$set(k),C&2&&(o=v[1].find(v[11])),o?g?C&2&&m(g,1):(g=N8(),g.c(),m(g,1),g.m(l,null)):g&&(ee(),_(g,1,1,()=>{g=null}),te()),C&2&&oe(n,"selected",v[1].find(v[13])),C&8&&oe(n,"disabled",v[3]),C&16&&(u=v[4].list.filter(B8).length>0),u?h?(h.p(v,C),C&16&&m(h,1)):(h=R8(v),h.c(),m(h,1),h.m(f.parentNode,f)):h&&(ee(),_(h,1,1,()=>{h=null}),te())},i(v){c||(m(e.$$.fragment,v),m(g),m(h),c=!0)},o(v){_(e.$$.fragment,v),_(g),_(h),c=!1},d(v){O(e,v),v&&b(t),v&&b(n),g&&g.d(),v&&b(a),h&&h.d(v),v&&b(f),p=!1,d()}}}function eae(r){let e,t,n,i;return e=new Je({props:{size:"S",$$slots:{default:[Xoe]},$$scope:{ctx:r}}}),n=new Qe({props:{noPadding:!0,gap:"S",$$slots:{default:[xoe]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(s,l){E(e,s,l),$(s,t,l),E(n,s,l),i=!0},p(s,l){const o={};l&8388608&&(o.$$scope={dirty:l,ctx:s}),e.$set(o);const a={};l&8388638&&(a.$$scope={dirty:l,ctx:s}),n.$set(a)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){O(e,s),s&&b(t),O(n,s)}}}function j8(r){let e,t,n;return t=new Vo({props:{size:"S"}}),{c(){e=M("div"),A(t.$$.fragment),y(e,"class","footer-progress svelte-1t0fa8v")},m(i,s){$(i,e,s),E(t,e,null),n=!0},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function tae(r){let e,t,n=r[0]&&j8();return{c(){e=M("div"),n&&n.c(),y(e,"slot","footer")},m(i,s){$(i,e,s),n&&n.m(e,null),t=!0},p(i,s){i[0]?n?s&1&&m(n,1):(n=j8(),n.c(),m(n,1),n.m(e,null)):n&&(ee(),_(n,1,1,()=>{n=null}),te())},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){i&&b(e),n&&n.d()}}}function nae(r){let e,t,n;return t=new jt({props:{title:"Add screens",confirmText:"Add Screens",cancelText:"Cancel",onConfirm:r[16],disabled:!r[1].length,size:"L",$$slots:{footer:[tae],default:[eae]},$$scope:{ctx:r}}}),{c(){e=M("div"),A(t.$$.fragment)},m(i,s){$(i,e,s),E(t,e,null),n=!0},p(i,[s]){const l={};s&2&&(l.disabled=!i[1].length),s&8388639&&(l.$$scope={dirty:s,ctx:i}),t.$set(l)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}const D1="createFromScratch",B8=r=>r._id!=="ta_users",z8=r=>r._id!=="ta_users";function rae(r,e,t){let n,i,s,l;ue(r,At,D=>t(4,s=D)),ue(r,Ye,D=>t(17,l=D));let{chooseModal:o}=e,{save:a}=e,{showProgressCircle:u=!1}=e,f=[];const c=mt();function p(){c("save",{screens:f})}let d=L8(l,s.list);const g=async()=>{i?(p(),await a()):(p(),o(1))},h=D=>{if(f.find(G=>G.table===D.name))t(1,f=f.filter(G=>G.table!==D.name));else{let G=L8(l,s.list).filter(j=>j.table===D.name);t(1,f=[...G,...f])}};Do(()=>{t(1,f=[])});const v=(D,G)=>G.table===D.name,C=D=>D.id===D1,k=()=>h(d.find(D=>D.id===D1)),I=D=>D.id.includes(D1),S=D=>h(D),T=(D,G)=>G.table===D.name,N=()=>g();return r.$$set=D=>{"chooseModal"in D&&t(8,o=D.chooseModal),"save"in D&&t(9,a=D.save),"showProgressCircle"in D&&t(0,u=D.showProgressCircle)},r.$$.update=()=>{r.$$.dirty&2&&t(2,n=(f==null?void 0:f.length)===1),r.$$.dirty&6&&t(3,i=(f==null?void 0:f.length)>0&&!n)},[u,f,n,i,s,d,g,h,o,a,v,C,k,I,S,T,N]}class iae extends se{constructor(e){super();le(this,e,rae,nae,ne,{chooseModal:8,save:9,showProgressCircle:0})}}function sae(r){let e,t;return e=new iae({props:{showProgressCircle:r[4],save:r[5],chooseModal:r[7]}}),e.$on("save",r[6]),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&16&&(s.showProgressCircle=n[4]),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function lae(r){let e,t,n,i;function s(a){r[11](a)}function l(a){r[12](a)}let o={showProgressCircle:r[4],save:r[5],chooseModal:r[7]};return r[2]!==void 0&&(o.screenName=r[2]),r[3]!==void 0&&(o.url=r[3]),e=new qoe({props:o}),Z.push(()=>ce(e,"screenName",s)),Z.push(()=>ce(e,"url",l)),{c(){A(e.$$.fragment)},m(a,u){E(e,a,u),i=!0},p(a,u){const f={};u&16&&(f.showProgressCircle=a[4]),!t&&u&4&&(t=!0,f.screenName=a[2],pe(()=>t=!1)),!n&&u&8&&(n=!0,f.url=a[3],pe(()=>n=!1)),e.$set(f)},i(a){i||(m(e.$$.fragment,a),i=!0)},o(a){_(e.$$.fragment,a),i=!1},d(a){O(e,a)}}}function oae(r){let e,t,n,i,s={$$slots:{default:[sae]},$$scope:{ctx:r}};e=new St({props:s}),r[10](e);let l={$$slots:{default:[lae]},$$scope:{ctx:r}};return n=new St({props:l}),r[13](n),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(o,a){E(e,o,a),$(o,t,a),E(n,o,a),i=!0},p(o,[a]){const u={};a&16777232&&(u.$$scope={dirty:a,ctx:o}),e.$set(u);const f={};a&16777244&&(f.$$scope={dirty:a,ctx:o}),n.$set(f)},i(o){i||(m(e.$$.fragment,o),m(n.$$.fragment,o),i=!0)},o(o){_(e.$$.fragment,o),_(n.$$.fragment,o),i=!1},d(o){r[10](null),O(e,o),o&&b(t),r[13](null),O(n,o)}}}function aae(r,e,t){let n,i,s,l;ue(r,Xs,q=>t(18,i=q)),ue(r,Ye,q=>t(19,s=q)),ue(r,Ks,q=>t(9,l=q));let o,a,u,f="",c="",p=[],d=!1,g,h=[];const v=async()=>{for(let q of p){let U=q.create();h.push(U),zn.captureEvent(Qn.SCREEN.CREATED,{template:q.id||q.name})}},C=async()=>{t(4,d=!0);try{await v();for(let q of h)await k(q);await Ye.actions.routing.fetch(),p=[],h=[],t(2,f=""),t(3,c="")}catch{ye.error("Error creating screens")}t(4,d=!1)},k=async q=>{let U=s.screens.filter(F=>F.props._instanceName==q.props._instanceName).length;if(U>0){let F=q.routing.route.split("/");F[1]=`${F[1]}-${U+1}`,q.routing.route=F.join("/")}let J=c?mo(`${c}`):q.routing.route;if(q){if(J?I(J,n)?g="This URL is already taken for this access role":g="":g="URL is required",g)return!1;if(f&&(q.props._instanceName=f),q.routing.route=J,q.routing.roleId=n,await Ye.actions.screens.save(q),q.props._instanceName.endsWith("List"))try{await Ye.actions.components.links.save(q.routing.route,q.routing.route.split("/")[1])}catch{ye.error("Error creating link to screen")}}},I=(q,U)=>i.some(J=>J.routing.route.toLowerCase()===q.toLowerCase()&&J.routing.roleId===U),S=()=>{o.show()},T=q=>{p=q.detail.screens},N=q=>{q===0?o.show():q===1?u.show():q===2&&a.show()};function D(q){Z[q?"unshift":"push"](()=>{o=q,t(0,o)})}function G(q){f=q,t(2,f)}function j(q){c=q,t(3,c)}function B(q){Z[q?"unshift":"push"](()=>{u=q,t(1,u)})}return r.$$.update=()=>{r.$$.dirty&512&&(n=l||"BASIC")},[o,u,f,c,d,C,T,N,S,l,D,G,j,B]}class uae extends se{constructor(e){super();le(this,e,aae,oae,ne,{showModal:8})}get showModal(){return this.$$.ctx[8]}}function fae(r){let e,t,n,i;return n=new Qe({props:{gap:"S",justifyItems:"center",$$slots:{default:[mae]},$$scope:{ctx:r}}}),{c(){e=M("div"),t=M("div"),A(n.$$.fragment),y(t,"class","main svelte-1nyfb82"),y(e,"class","centered svelte-1nyfb82")},m(s,l){$(s,e,l),P(e,t),E(n,t,null),i=!0},p(s,l){const o={};l&516&&(o.$$scope={dirty:l,ctx:s}),n.$set(o)},i(s){i||(m(n.$$.fragment,s),i=!0)},o(s){_(n.$$.fragment,s),i=!1},d(s){s&&b(e),O(n)}}}function cae(r){let e,t,n,i,s,l,o,a,u=r[0].version,f;t=new ple({});let c=r[0].clientFeatures.devicePreview&&q8();const p=[_ae,gae],d=[];function g(v,C){return v[0].clientFeatures.customThemes?0:v[0].clientFeatures.spectrumThemes?1:-1}~(s=g(r))&&(l=d[s]=p[s](r));let h=U8();return{c(){e=M("div"),A(t.$$.fragment),n=R(),c&&c.c(),i=R(),l&&l.c(),o=R(),a=M("div"),h.c(),y(e,"class","preview-header svelte-1nyfb82"),y(a,"class","preview-content svelte-1nyfb82")},m(v,C){$(v,e,C),E(t,e,null),P(e,n),c&&c.m(e,null),P(e,i),~s&&d[s].m(e,null),$(v,o,C),$(v,a,C),h.m(a,null),f=!0},p(v,C){v[0].clientFeatures.devicePreview?c?C&1&&m(c,1):(c=q8(),c.c(),m(c,1),c.m(e,i)):c&&(ee(),_(c,1,1,()=>{c=null}),te());let k=s;s=g(v),s!==k&&(l&&(ee(),_(d[k],1,1,()=>{d[k]=null}),te()),~s?(l=d[s],l||(l=d[s]=p[s](v),l.c()),m(l,1),l.m(e,null)):l=null),C&1&&ne(u,u=v[0].version)&&(ee(),_(h,1,1,Te),te(),h=U8(),h.c(),m(h),h.m(a,null))},i(v){f||(m(t.$$.fragment,v),m(c),m(l),m(h),f=!0)},o(v){_(t.$$.fragment,v),_(c),_(l),_(h),f=!1},d(v){v&&b(e),O(t),c&&c.d(),~s&&d[s].d(),v&&b(o),v&&b(a),h.d(v)}}}function pae(r){let e;return{c(){e=H("LET\u2019S BRING THIS APP TO LIFE")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function dae(r){let e,t,n,i,s;return n=new pt({props:{name:"Add"}}),{c(){e=M("div"),t=M("div"),A(n.$$.fragment),i=H(`
|
|
1224
1224
|
Add Screen`),y(t,"class","background-icon svelte-1nyfb82"),Ft(t,"color","white"),y(e,"class","new-screen-button svelte-1nyfb82")},m(l,o){$(l,e,o),P(e,t),E(n,t,null),P(e,i),s=!0},p:Te,i(l){s||(m(n.$$.fragment,l),s=!0)},o(l){_(n.$$.fragment,l),s=!1},d(l){l&&b(e),O(n)}}}function mae(r){let e,t,n,i,s,l,o,a;return s=new Wn({props:{size:"M",$$slots:{default:[pae]},$$scope:{ctx:r}}}),o=new ut({props:{size:"M",cta:!0,$$slots:{default:[dae]},$$scope:{ctx:r}}}),o.$on("click",r[7]),{c(){e=M("img"),n=R(),i=M("div"),A(s.$$.fragment),l=R(),A(o.$$.fragment),y(e,"class","img-size svelte-1nyfb82"),y(e,"alt","logo"),un(e.src,t=T8)||y(e,"src",t),y(i,"class","new-screen-text svelte-1nyfb82")},m(u,f){$(u,e,f),$(u,n,f),$(u,i,f),E(s,i,null),$(u,l,f),E(o,u,f),a=!0},p(u,f){const c={};f&512&&(c.$$scope={dirty:f,ctx:u}),s.$set(c);const p={};f&512&&(p.$$scope={dirty:f,ctx:u}),o.$set(p)},i(u){a||(m(s.$$.fragment,u),m(o.$$.fragment,u),a=!0)},o(u){_(s.$$.fragment,u),_(o.$$.fragment,u),a=!1},d(u){u&&b(e),u&&b(n),u&&b(i),O(s),u&&b(l),O(o,u)}}}function q8(r){let e,t;return e=new Moe({}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function gae(r){let e,t;return e=new O8({}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function _ae(r){let e,t;return e=new Loe({}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function U8(r){let e,t;return e=new dx({}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function F8(r){let e,t,n;return t=new ile({}),{c(){e=M("div"),A(t.$$.fragment),y(e,"class","components-pane svelte-1nyfb82")},m(i,s){$(i,e,s),E(t,e,null),n=!0},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),O(t)}}}function hae(r){let e,t,n,i,s,l,o,a,u,f,c,p,d;n=new moe({props:{showModal:r[2]}});const g=[cae,fae],h=[];function v(N,D){return N[1]?0:1}l=v(r),o=h[l]=g[l](r);let C=r[3]!=null&&F8();const k=r[6].default,I=ht(k,r,r[9],null);function S(N){r[8](N)}let T={};return r[2]!==void 0&&(T.showModal=r[2]),c=new uae({props:T}),Z.push(()=>ce(c,"showModal",S)),{c(){e=M("div"),t=M("div"),A(n.$$.fragment),i=R(),s=M("div"),o.c(),a=R(),C&&C.c(),u=R(),I&&I.c(),f=R(),A(c.$$.fragment),y(t,"class","ui-nav svelte-1nyfb82"),y(s,"class","preview-pane svelte-1nyfb82"),y(e,"class","root svelte-1nyfb82")},m(N,D){$(N,e,D),P(e,t),E(n,t,null),P(e,i),P(e,s),h[l].m(s,null),P(e,a),C&&C.m(e,null),$(N,u,D),I&&I.m(N,D),$(N,f,D),E(c,N,D),d=!0},p(N,[D]){const G={};D&4&&(G.showModal=N[2]),n.$set(G);let j=l;l=v(N),l===j?h[l].p(N,D):(ee(),_(h[j],1,1,()=>{h[j]=null}),te(),o=h[l],o?o.p(N,D):(o=h[l]=g[l](N),o.c()),m(o,1),o.m(s,null)),N[3]!=null?C?D&8&&m(C,1):(C=F8(),C.c(),m(C,1),C.m(e,null)):C&&(ee(),_(C,1,1,()=>{C=null}),te()),I&&I.p&&(!d||D&512)&&$t(I,k,N,N[9],d?vt(k,N[9],D,null):bt(N[9]),null);const B={};!p&&D&4&&(p=!0,B.showModal=N[2],pe(()=>p=!1)),c.$set(B)},i(N){d||(m(n.$$.fragment,N),m(o),m(C),m(I,N),m(c.$$.fragment,N),d=!0)},o(N){_(n.$$.fragment,N),_(o),_(C),_(I,N),_(c.$$.fragment,N),d=!1},d(N){N&&b(e),O(n),h[l].d(),C&&C.d(),N&&b(u),I&&I.d(N),N&&b(f),O(c,N)}}}function $ae(r,e,t){let n,i,s,l,o,a;ue(r,Bt,S=>t(14,n=S)),ue(r,Ye,S=>t(0,i=S)),ue(r,dn,S=>t(1,s=S)),ue(r,Ou,S=>t(4,l=S)),ue(r,tr,S=>t(5,o=S)),ue(r,ni,S=>t(3,a=S));let{$$slots:u={},$$scope:f}=e,c,p,d,g=!1,h;const v=(S,T)=>{if(g||(g=!0,!S.assetType))return;const N=lt(Ye),D=lt(dn);let G=S.assetType;[Jn.LAYOUT,Jn.SCREEN].includes(G)||(G=Jn.SCREEN),G!==N.currentFrontEndType&&Ye.update(U=>(U.currentFrontEndType=G,U));const j=decodeURI(S.asset);let B;if(j){let U,J;G===Jn.SCREEN?(U=lt(Xs),J=Ye.actions.screens):(U=N.layouts,J=Ye.actions.layouts),B=U.find(F=>F._id===j),B&&B._id!==(D==null?void 0:D._id)&&J.select(j)}const q=T.split("/").pop();if(B&&q){const U=Bs(B.props,q);U&&U._id!==N.selectedComponentId&&Ye.actions.components.select(U)}},C=(S,T,N)=>{if(S===c&&T===p&&N===d)return;c=S,p=T,d=N;const D=lt(tr),G=lt(Ou),j=D.assetType,B=D.asset,q=G.split("/").pop();if(S!==j||(T==null?void 0:T._id)!==B||N!==q){let U="../";[Jn.SCREEN,Jn.LAYOUT].includes(S)&&(U+=`${S}`,(T==null?void 0:T._id)&&(U+=`/${T._id}`,N&&(U+=`/${qs(T.props,N).slice(1).map(W=>W._id).join("/")}`))),n(U)}},k=()=>h();function I(S){h=S,t(2,h)}return r.$$set=S=>{"$$scope"in S&&t(9,f=S.$$scope)},r.$$.update=()=>{r.$$.dirty&48&&v(o,l),r.$$.dirty&3&&C(i.currentFrontEndType,s,i.selectedComponentId)},[i,s,h,a,l,o,u,k,I,f]}class bae extends se{constructor(e){super();le(this,e,$ae,hae,ne,{})}}function vae(r,e,t){let n;return ue(r,Bt,i=>t(0,n=i)),n(`./${Jn.SCREEN}`),[]}class wae extends se{constructor(e){super();le(this,e,vae,null,ne,{})}}function yae(r){let e;const t=r[1].default,n=ht(t,r,r[0],null);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,[s]){n&&n.p&&(!e||s&1)&&$t(n,t,i,i[0],e?vt(t,i[0],s,null):bt(i[0]),null)},i(i){e||(m(n,i),e=!0)},o(i){_(n,i),e=!1},d(i){n&&n.d(i)}}}function kae(r,e,t){let{$$slots:n={},$$scope:i}=e;return r.$$set=s=>{"$$scope"in s&&t(0,i=s.$$scope)},[i,n]}class Cae extends se{constructor(e){super();le(this,e,kae,yae,ne,{})}}function Sae(r){let e,t,n;function i(l){r[3](l)}let s={options:r[1].list,getOptionLabel:Aae,getOptionValue:Eae};return r[0]!==void 0&&(s.value=r[0]),e=new Ke({props:s}),Z.push(()=>ce(e,"value",i)),e.$on("change",r[2]),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,[o]){const a={};o&2&&(a.options=l[1].list),!t&&o&1&&(t=!0,a.value=l[0],pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}const Aae=r=>r.name,Eae=r=>r._id;function Oae(r,e,t){let n;ue(r,At,a=>t(1,n=a));const i=mt();let{value:s}=e;const l=a=>{t(0,s=a.detail),i("change",a.detail)};function o(a){s=a,t(0,s)}return r.$$set=a=>{"value"in a&&t(0,s=a.value)},[s,n,l,o]}class Tae extends se{constructor(e){super();le(this,e,Oae,Sae,ne,{value:0})}}function V8(r,e,t){const n=r.slice();return n[17]=e[t][0],n[18]=e[t][1],n[19]=e,n[20]=t,n}function H8(r){let e,t,n=r[2],i=[];for(let l=0;l<n.length;l+=1)i[l]=G8(V8(r,n,l));const s=l=>_(i[l],1,1,()=>{i[l]=null});return{c(){e=M("div");for(let l=0;l<i.length;l+=1)i[l].c();y(e,"class","schema-fields svelte-qnw5bo")},m(l,o){$(l,e,o);for(let a=0;a<i.length;a+=1)i[a].m(e,null);t=!0},p(l,o){if(o&87){n=l[2];let a;for(a=0;a<n.length;a+=1){const u=V8(l,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=G8(u),i[a].c(),m(i[a],1),i[a].m(e,null))}for(ee(),a=n.length;a<i.length;a+=1)s(a);te()}},i(l){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(l){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(l){l&&b(e),_t(i,l)}}}function W8(r){let e,t,n,i,s;const l=[Dae,Mae,Rae,Nae,Pae,Lae,Iae],o=[];function a(u,f){return(e==null||f&4)&&(e=!!(qae(u[18])&&u[18].type!=="array")),e?0:u[18].type==="datetime"?1:u[18].type==="boolean"?2:u[18].type==="array"?3:u[18].type==="longform"?4:u[18].type==="link"?5:u[18].type==="string"||u[18].type==="number"?6:-1}return~(t=a(r,-1))&&(n=o[t]=l[t](r)),{c(){n&&n.c(),i=Oe()},m(u,f){~t&&o[t].m(u,f),$(u,i,f),s=!0},p(u,f){let c=t;t=a(u,f),t===c?~t&&o[t].p(u,f):(n&&(ee(),_(o[c],1,1,()=>{o[c]=null}),te()),~t?(n=o[t],n?n.p(u,f):(n=o[t]=l[t](u),n.c()),m(n,1),n.m(i.parentNode,i)):n=null)},i(u){s||(m(n),s=!0)},o(u){_(n),s=!1},d(u){~t&&o[t].d(u),u&&b(i)}}}function Iae(r){let e,t,n,i;const s=[Bae,jae],l=[];function o(a,u){return a[4].selectedAutomation.automation.testData?0:1}return e=o(r),t=l[e]=s[e](r),{c(){t.c(),n=Oe()},m(a,u){l[e].m(a,u),$(a,n,u),i=!0},p(a,u){let f=e;e=o(a),e===f?l[e].p(a,u):(ee(),_(l[f],1,1,()=>{l[f]=null}),te(),t=l[e],t?t.p(a,u):(t=l[e]=s[e](a),t.c()),m(t,1),t.m(n.parentNode,n))},i(a){i||(m(t),i=!0)},o(a){_(t),i=!1},d(a){l[e].d(a),a&&b(n)}}}function Lae(r){let e,t,n;function i(l){r[13](l,r[17])}let s={schema:r[18]};return r[0][r[17]]!==void 0&&(s.linkedRows=r[0][r[17]]),e=new gv({props:s}),Z.push(()=>ce(e,"linkedRows",i)),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){r=l;const a={};o&4&&(a.schema=r[18]),!t&&o&5&&(t=!0,a.linkedRows=r[0][r[17]],pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function Pae(r){let e,t,n;function i(l){r[12](l,r[17])}let s={label:r[17]};return r[0][r[17]]!==void 0&&(s.value=r[0][r[17]]),e=new Xr({props:s}),Z.push(()=>ce(e,"value",i)),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){r=l;const a={};o&4&&(a.label=r[17]),!t&&o&5&&(t=!0,a.value=r[0][r[17]],pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function Nae(r){let e,t,n;function i(l){r[11](l,r[17])}let s={label:r[17],options:r[18].constraints.inclusion};return r[0][r[17]]!==void 0&&(s.value=r[0][r[17]]),e=new Ho({props:s}),Z.push(()=>ce(e,"value",i)),{c(){A(e.$$.fragment)},m(l,o){E(e,l,o),n=!0},p(l,o){r=l;const a={};o&4&&(a.label=r[17]),o&4&&(a.options=r[18].constraints.inclusion),!t&&o&5&&(t=!0,a.value=r[0][r[17]],pe(()=>t=!1)),e.$set(a)},i(l){n||(m(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){O(e,l)}}}function Rae(r){let e,t;function n(...i){return r[10](r[17],...i)}return e=new Fn({props:{text:r[17],value:r[0][r[17]]}}),e.$on("change",n),{c(){A(e.$$.fragment)},m(i,s){E(e,i,s),t=!0},p(i,s){r=i;const l={};s&4&&(l.text=r[17]),s&5&&(l.value=r[0][r[17]]),e.$set(l)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){O(e,i)}}}function Mae(r){let e,t;function n(...i){return r[9](r[17],...i)}return e=new Ds({props:{label:r[17],value:r[0][r[17]]}}),e.$on("change",n),{c(){A(e.$$.fragment)},m(i,s){E(e,i,s),t=!0},p(i,s){r=i;const l={};s&4&&(l.label=r[17]),s&5&&(l.value=r[0][r[17]]),e.$set(l)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){O(e,i)}}}function Dae(r){let e,t;function n(...i){return r[8](r[17],...i)}return e=new Ke({props:{label:r[17],value:r[0][r[17]],options:r[18].constraints.inclusion}}),e.$on("change",n),{c(){A(e.$$.fragment)},m(i,s){E(e,i,s),t=!0},p(i,s){r=i;const l={};s&4&&(l.label=r[17]),s&5&&(l.value=r[0][r[17]]),s&4&&(l.options=r[18].constraints.inclusion),e.$set(l)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){O(e,i)}}}function jae(r){let e,t;function n(...i){return r[15](r[17],...i)}return e=new Kn({props:{panel:Cs,value:r[0][r[17]],label:r[17],type:"string",bindings:r[1],fillWidth:!0,allowJS:!1}}),e.$on("change",n),{c(){A(e.$$.fragment)},m(i,s){E(e,i,s),t=!0},p(i,s){r=i;const l={};s&5&&(l.value=r[0][r[17]]),s&4&&(l.label=r[17]),s&2&&(l.bindings=r[1]),e.$set(l)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){O(e,i)}}}function Bae(r){let e,t;function n(...i){return r[14](r[17],...i)}return e=new xf({props:{value:r[0][r[17]],panel:Cs,label:r[17],type:r[0].customType,bindings:r[1]}}),e.$on("change",n),{c(){A(e.$$.fragment)},m(i,s){E(e,i,s),t=!0},p(i,s){r=i;const l={};s&5&&(l.value=r[0][r[17]]),s&4&&(l.label=r[17]),s&1&&(l.type=r[0].customType),s&2&&(l.bindings=r[1]),e.$set(l)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){O(e,i)}}}function G8(r){let e,t,n=!r[18].autocolumn&&W8(r);return{c(){n&&n.c(),e=Oe()},m(i,s){n&&n.m(i,s),$(i,e,s),t=!0},p(i,s){i[18].autocolumn?n&&(ee(),_(n,1,1,()=>{n=null}),te()):n?(n.p(i,s),s&4&&m(n,1)):(n=W8(i),n.c(),m(n,1),n.m(e.parentNode,e))},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){n&&n.d(i),i&&b(e)}}}function zae(r){let e,t,n,i;e=new Ke({props:{value:r[0].tableId,options:r[3].list,getOptionLabel:Uae,getOptionValue:Fae}}),e.$on("change",r[5]);let s=r[2].length&&H8(r);return{c(){A(e.$$.fragment),t=R(),s&&s.c(),n=Oe()},m(l,o){E(e,l,o),$(l,t,o),s&&s.m(l,o),$(l,n,o),i=!0},p(l,[o]){const a={};o&1&&(a.value=l[0].tableId),o&8&&(a.options=l[3].list),e.$set(a),l[2].length?s?(s.p(l,o),o&4&&m(s,1)):(s=H8(l),s.c(),m(s,1),s.m(n.parentNode,n)):s&&(ee(),_(s,1,1,()=>{s=null}),te())},i(l){i||(m(e.$$.fragment,l),m(s),i=!0)},o(l){_(e.$$.fragment,l),_(s),i=!1},d(l){O(e,l),l&&b(t),s&&s.d(l),l&&b(n)}}}function qae(r){var e,t;return!!((t=(e=r.constraints)==null?void 0:e.inclusion)==null?void 0:t.length)}const Uae=r=>r.name,Fae=r=>r._id;function Vae(r,e,t){let n,i;ue(r,At,S=>t(3,n=S)),ue(r,xt,S=>t(4,i=S));const s=mt();let{value:l}=e,{bindings:o}=e,a,u;const f=S=>{t(0,l.tableId=S.detail,l),s("change",l)},c=(S,T)=>{t(0,l[T]=S.detail,l),s("change",l)},p=(S,T)=>c(T,S),d=(S,T)=>c(T,S),g=(S,T)=>c(T,S);function h(S,T){r.$$.not_equal(l[T],S)&&(l[T]=S,t(0,l),t(3,n),t(7,a),t(2,u))}function v(S,T){r.$$.not_equal(l[T],S)&&(l[T]=S,t(0,l),t(3,n),t(7,a),t(2,u))}function C(S,T){r.$$.not_equal(l[T],S)&&(l[T]=S,t(0,l),t(3,n),t(7,a),t(2,u))}const k=(S,T)=>c(T,S),I=(S,T)=>c(T,S);return r.$$set=S=>{"value"in S&&t(0,l=S.value),"bindings"in S&&t(1,o=S.bindings)},r.$$.update=()=>{var S;r.$$.dirty&141&&(t(7,a=n.list.find(T=>T._id===(l==null?void 0:l.tableId))),t(2,u=Object.entries((S=a==null?void 0:a.schema)!=null?S:{})),u.map(([,T])=>{!T.autocolumn&&!l[T.name]&&t(0,l[T.name]="",l)})),r.$$.dirty&1&&(l==null?void 0:l.tableId)==null&&t(0,l={tableId:""})},[l,o,u,n,i,f,c,a,p,d,g,h,v,C,k,I]}class Hae extends se{constructor(e){super();le(this,e,Vae,zae,ne,{value:0,bindings:1})}}function Y8(r,e,t){const n=r.slice();return n[9]=e[t],n}function J8(r){let e,t,n,i,s,l,o,a,u,f;t=new et({props:{value:r[9].name,secondary:!0,placeholder:"Enter field name"}}),t.$on("change",function(){dt(r[6](r[9].name))&&r[6](r[9].name).apply(this,arguments)});function c(...d){return r[7](r[9],...d)}i=new Ke({props:{value:r[9].type,options:r[3]}}),i.$on("change",c);function p(){return r[8](r[9])}return{c(){e=M("div"),A(t.$$.fragment),n=R(),A(i.$$.fragment),s=R(),l=M("i"),o=R(),y(l,"class","remove-field ri-delete-bin-line svelte-qc7xvc"),y(e,"class","field svelte-qc7xvc")},m(d,g){$(d,e,g),E(t,e,null),P(e,n),E(i,e,null),P(e,s),P(e,l),P(e,o),a=!0,u||(f=Le(l,"click",p),u=!0)},p(d,g){r=d;const h={};g&2&&(h.value=r[9].name),t.$set(h);const v={};g&2&&(v.value=r[9].type),i.$set(v)},i(d){a||(m(t.$$.fragment,d),m(i.$$.fragment,d),a=!0)},o(d){_(t.$$.fragment,d),_(i.$$.fragment,d),a=!1},d(d){d&&b(e),O(t),O(i),u=!1,f()}}}function Wae(r){let e,t,n,i,s,l,o,a,u,f=r[1],c=[];for(let d=0;d<f.length;d+=1)c[d]=J8(Y8(r,f,d));const p=d=>_(c[d],1,1,()=>{c[d]=null});return{c(){e=M("div"),t=M("div"),n=M("i"),i=R(),s=M("div"),l=R();for(let d=0;d<c.length;d+=1)c[d].c();y(n,"class","ri-add-line svelte-qc7xvc"),y(t,"class","add-field svelte-qc7xvc"),y(s,"class","spacer svelte-qc7xvc"),y(e,"class","root svelte-qc7xvc")},m(d,g){$(d,e,g),P(e,t),P(t,n),P(e,i),P(e,s),P(e,l);for(let h=0;h<c.length;h+=1)c[h].m(e,null);o=!0,a||(u=Le(n,"click",r[4]),a=!0)},p(d,[g]){if(g&111){f=d[1];let h;for(h=0;h<f.length;h+=1){const v=Y8(d,f,h);c[h]?(c[h].p(v,g),m(c[h],1)):(c[h]=J8(v),c[h].c(),m(c[h],1),c[h].m(e,null))}for(ee(),h=f.length;h<c.length;h+=1)p(h);te()}},i(d){if(!o){for(let g=0;g<f.length;g+=1)m(c[g]);o=!0}},o(d){c=c.filter(Boolean);for(let g=0;g<c.length;g+=1)_(c[g]);o=!1},d(d){d&&b(e),_t(c,d),a=!1,u()}}}function Gae(r,e,t){let n;const i=mt();let{value:s={}}=e;const l=[{label:"Text",value:"string"},{label:"Number",value:"number"},{label:"Boolean",value:"boolean"},{label:"DateTime",value:"datetime"}];function o(){const p=Ee({},s);p[""]="string",i("change",p)}function a(p){const d=Ee({},s);delete d[p],i("change",d)}const u=p=>d=>{let g=[...n];const h=d.detail;h?g.find(v=>v.name===p).name=h:g=g.filter(v=>v.name!==p),t(0,s=g.reduce((v,C)=>(v[C.name]=C.type,v),{})),i("change",s)},f=(p,d)=>{t(0,s[p.name]=d.detail,s),i("change",s)},c=p=>a(p.name);return r.$$set=p=>{"value"in p&&t(0,s=p.value)},r.$$.update=()=>{r.$$.dirty&1&&t(1,n=s?Object.entries(s).map(([p,d])=>({name:p,type:d})):[])},[s,n,i,l,o,a,u,f,c]}class Yae extends se{constructor(e){super();le(this,e,Gae,Wae,ne,{value:0})}}function Jae(r){let e,t,n,i,s,l,o,a;return t=new et({props:{readonly:!0,value:j1(r[0])}}),s=new pt({props:{size:"S",name:"Copy"}}),{c(){e=M("div"),A(t.$$.fragment),n=R(),i=M("div"),A(s.$$.fragment),y(i,"class","icon svelte-bmyadj"),y(e,"class","svelte-bmyadj")},m(u,f){$(u,e,f),E(t,e,null),P(e,n),P(e,i),E(s,i,null),l=!0,o||(a=Le(i,"click",r[2]),o=!0)},p(u,[f]){const c={};f&1&&(c.value=j1(u[0])),t.$set(c)},i(u){l||(m(t.$$.fragment,u),m(s.$$.fragment,u),l=!0)},o(u){_(t.$$.fragment,u),_(s.$$.fragment,u),l=!1},d(u){u&&b(e),O(t),O(s),o=!1,a()}}}function j1(r){return r?`${window.location.origin}/${r}`:""}function Qae(r,e,t){let{value:n}=e;function i(){const l=document.createElement("textarea");document.body.appendChild(l),l.value=j1(n),l.select(),document.execCommand("copy"),document.body.removeChild(l),ye.success("URL copied to clipboard")}const s=()=>i();return r.$$set=l=>{"value"in l&&t(0,n=l.value)},[n,i,s]}class Q8 extends se{constructor(e){super();le(this,e,Qae,Jae,ne,{value:0})}}function X8(r){let e,t,n,i,s=(r[2]>1?"s":"")+"",l,o;return{c(){e=M("p"),t=H(`Request received! We found
|
|
1225
1225
|
`),n=H(r[2]),i=H(`
|
|
1226
1226
|
bindable value`),l=H(s),o=H("."),y(e,"class","finished-text svelte-12gur68")},m(a,u){$(a,e,u),P(e,t),P(e,n),P(e,i),P(e,l),P(e,o)},p(a,u){u&4&&Ie(n,a[2]),u&4&&s!==(s=(a[2]>1?"s":"")+"")&&Ie(l,s)},d(a){a&&b(e)}}}function Xae(r){let e,t,n,i,s,l;n=new Q8({props:{value:r[1]}});let o=r[0]&&X8(r);return{c(){e=M("p"),e.innerHTML=`Webhooks are for receiving data. To make them easier please use the URL
|
|
@@ -1235,7 +1235,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
1235
1235
|
This action cannot be undone.`)},m(o,a){$(o,e,a),$(o,t,a),P(t,i),P(t,s),$(o,l,a)},p(o,a){a&1&&n!==(n=o[0].name+"")&&Ie(i,n)},d(o){o&&b(e),o&&b(t),o&&b(l)}}}function Tce(r){let e,t,n,i,s,l;e=new Er({props:{$$slots:{control:[Ece],default:[Ace]},$$scope:{ctx:r}}});let o={okText:"Delete Automation",onOk:r[3],title:"Confirm Deletion",$$slots:{default:[Oce]},$$scope:{ctx:r}};n=new yr({props:o}),r[4](n);let a={automation:r[0]};return s=new kce({props:a}),r[5](s),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment),i=R(),A(s.$$.fragment)},m(u,f){E(e,u,f),$(u,t,f),E(n,u,f),$(u,i,f),E(s,u,f),l=!0},p(u,[f]){const c={};f&134&&(c.$$scope={dirty:f,ctx:u}),e.$set(c);const p={};f&129&&(p.$$scope={dirty:f,ctx:u}),n.$set(p);const d={};f&1&&(d.automation=u[0]),s.$set(d)},i(u){l||(m(e.$$.fragment,u),m(n.$$.fragment,u),m(s.$$.fragment,u),l=!0)},o(u){_(e.$$.fragment,u),_(n.$$.fragment,u),_(s.$$.fragment,u),l=!1},d(u){O(e,u),u&&b(t),r[4](null),O(n,u),u&&b(i),r[5](null),O(s,u)}}}function Ice(r,e,t){let n;ue(r,Bt,f=>t(6,n=f));let{automation:i}=e,s,l;async function o(){try{await xt.actions.delete(i),ye.success("Automation deleted successfully"),n("../automate")}catch{ye.error("Error deleting automation")}}function a(f){Z[f?"unshift":"push"](()=>{s=f,t(1,s)})}function u(f){Z[f?"unshift":"push"](()=>{l=f,t(2,l)})}return r.$$set=f=>{"automation"in f&&t(0,i=f.automation)},[i,s,l,o,a,u]}class Lce extends se{constructor(e){super();le(this,e,Ice,Tce,ne,{automation:0})}}function ky(r,e,t){const n=r.slice();return n[5]=e[t],n[7]=t,n}function Pce(r){let e,t,n;return e=new Lce({props:{automation:r[5]}}),{c(){A(e.$$.fragment),t=R()},m(i,s){E(e,i,s),$(i,t,s),n=!0},p(i,s){const l={};s&1&&(l.automation=i[5]),e.$set(l)},i(i){n||(m(e.$$.fragment,i),n=!0)},o(i){_(e.$$.fragment,i),n=!1},d(i){O(e,i),i&&b(t)}}}function Cy(r){let e,t;function n(){return r[3](r[5])}return e=new As({props:{border:r[7]>0,icon:"ShareAndroid",text:r[5].name,selected:r[5]._id===r[1],$$slots:{default:[Pce]},$$scope:{ctx:r}}}),e.$on("click",n),{c(){A(e.$$.fragment)},m(i,s){E(e,i,s),t=!0},p(i,s){r=i;const l={};s&1&&(l.text=r[5].name),s&3&&(l.selected=r[5]._id===r[1]),s&257&&(l.$$scope={dirty:s,ctx:r}),e.$set(l)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){O(e,i)}}}function Nce(r){let e,t,n=r[0].automations,i=[];for(let l=0;l<n.length;l+=1)i[l]=Cy(ky(r,n,l));const s=l=>_(i[l],1,1,()=>{i[l]=null});return{c(){e=M("div");for(let l=0;l<i.length;l+=1)i[l].c();y(e,"class","automations-list svelte-g64vb")},m(l,o){$(l,e,o);for(let a=0;a<i.length;a+=1)i[a].m(e,null);t=!0},p(l,[o]){if(o&7){n=l[0].automations;let a;for(a=0;a<n.length;a+=1){const u=ky(l,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=Cy(u),i[a].c(),m(i[a],1),i[a].m(e,null))}for(ee(),a=n.length;a<i.length;a+=1)s(a);te()}},i(l){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(l){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(l){l&&b(e),_t(i,l)}}}function Rce(r,e,t){let n,i,s;ue(r,Bt,a=>t(4,i=a)),ue(r,xt,a=>t(0,s=a)),Yt(async()=>{try{await xt.actions.fetch()}catch{ye.error("Error getting automations list")}});function l(a){xt.actions.select(a),i(`./${a._id}`)}const o=a=>l(a);return r.$$.update=()=>{var a,u;r.$$.dirty&1&&t(1,n=(u=(a=s.selectedAutomation)==null?void 0:a.automation)==null?void 0:u._id)},[s,n,l,o]}class Mce extends se{constructor(e){super();le(this,e,Rce,Nce,ne,{})}}function Sy(r,e,t){const n=r.slice();return n[17]=e[t][0],n[18]=e[t][1],n}function Dce(r){let e;return{c(){e=H(`Please name your automation, then select a trigger. Every automation must
|
|
1236
1236
|
start with a trigger.`)},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function jce(r){let e;return{c(){e=H("Triggers")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Bce(r){let e=r[18].name+"",t;return{c(){t=H(e)},m(n,i){$(n,t,i)},p(n,i){i&8&&e!==(e=n[18].name+"")&&Ie(t,e)},d(n){n&&b(t)}}}function Ay(r){let e,t,n,i,s,l,o,a,u,f;n=new pt({props:{name:r[18].icon}}),l=new Je({props:{size:"S",$$slots:{default:[Bce]},$$scope:{ctx:r}}});function c(){return r[13](r[18])}return{c(){e=M("div"),t=M("div"),A(n.$$.fragment),i=R(),s=M("span"),A(l.$$.fragment),o=R(),y(s,"class","icon-spacing svelte-d3iboa"),y(t,"class","item-body svelte-d3iboa"),y(e,"class","item svelte-d3iboa"),oe(e,"selected",r[2]===r[18].name)},m(p,d){$(p,e,d),P(e,t),E(n,t,null),P(t,i),P(t,s),E(l,s,null),P(e,o),a=!0,u||(f=Le(e,"click",c),u=!0)},p(p,d){r=p;const g={};d&8&&(g.name=r[18].icon),n.$set(g);const h={};d&2097160&&(h.$$scope={dirty:d,ctx:r}),l.$set(h),d&12&&oe(e,"selected",r[2]===r[18].name)},i(p){a||(m(n.$$.fragment,p),m(l.$$.fragment,p),a=!0)},o(p){_(n.$$.fragment,p),_(l.$$.fragment,p),a=!1},d(p){p&&b(e),O(n),O(l),u=!1,f()}}}function zce(r){let e,t,n,i;e=new Je({props:{size:"S",$$slots:{default:[jce]},$$scope:{ctx:r}}});let s=r[3],l=[];for(let a=0;a<s.length;a+=1)l[a]=Ay(Sy(r,s,a));const o=a=>_(l[a],1,1,()=>{l[a]=null});return{c(){A(e.$$.fragment),t=R(),n=M("div");for(let a=0;a<l.length;a+=1)l[a].c();y(n,"class","item-list svelte-d3iboa")},m(a,u){E(e,a,u),$(a,t,u),$(a,n,u);for(let f=0;f<l.length;f+=1)l[f].m(n,null);i=!0},p(a,u){const f={};if(u&2097152&&(f.$$scope={dirty:u,ctx:a}),e.$set(f),u&76){s=a[3];let c;for(c=0;c<s.length;c+=1){const p=Sy(a,s,c);l[c]?(l[c].p(p,u),m(l[c],1)):(l[c]=Ay(p),l[c].c(),m(l[c],1),l[c].m(n,null))}for(ee(),c=s.length;c<l.length;c+=1)o(c);te()}},i(a){if(!i){m(e.$$.fragment,a);for(let u=0;u<s.length;u+=1)m(l[u]);i=!0}},o(a){_(e.$$.fragment,a),l=l.filter(Boolean);for(let u=0;u<l.length;u+=1)_(l[u]);i=!1},d(a){O(e,a),a&&b(t),a&&b(n),_t(l,a)}}}function qce(r){let e,t,n,i,s,l,o,a,u,f;e=new Ep({props:{header:"You must publish your app to activate your automations.",message:"To test your automation before publishing, you can use the 'Run Test' functionality on the next screen."}}),n=new Je({props:{size:"XS",$$slots:{default:[Dce]},$$scope:{ctx:r}}});function c(g){r[10](g)}function p(g){r[11](g)}let d={label:"Name"};return r[0]!==void 0&&(d.value=r[0]),r[4]!==void 0&&(d.error=r[4]),s=new et({props:d}),Z.push(()=>ce(s,"value",c)),Z.push(()=>ce(s,"error",p)),s.$on("change",r[12]),u=new Qe({props:{noPadding:!0,$$slots:{default:[zce]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment),i=R(),A(s.$$.fragment),a=R(),A(u.$$.fragment)},m(g,h){E(e,g,h),$(g,t,h),E(n,g,h),$(g,i,h),E(s,g,h),$(g,a,h),E(u,g,h),f=!0},p(g,h){const v={};h&2097152&&(v.$$scope={dirty:h,ctx:g}),n.$set(v);const C={};!l&&h&1&&(l=!0,C.value=g[0],pe(()=>l=!1)),!o&&h&16&&(o=!0,C.error=g[4],pe(()=>o=!1)),s.$set(C);const k={};h&2097164&&(k.$$scope={dirty:h,ctx:g}),u.$set(k)},i(g){f||(m(e.$$.fragment,g),m(n.$$.fragment,g),m(s.$$.fragment,g),m(u.$$.fragment,g),f=!0)},o(g){_(e.$$.fragment,g),_(n.$$.fragment,g),_(s.$$.fragment,g),_(u.$$.fragment,g),f=!1},d(g){O(e,g),g&&b(t),O(n,g),g&&b(i),O(s,g),g&&b(a),O(u,g)}}}function Uce(r){let e,t;return e=new jt({props:{title:"Create Automation",confirmText:"Save",size:"M",onConfirm:r[5],disabled:!r[2]||!r[0],$$slots:{default:[qce]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,[i]){const s={};i&5&&(s.disabled=!n[2]||!n[0]),i&2097183&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Fce(r,e,t){let n,i,s,l,o,a;ue(r,xt,S=>t(8,l=S)),ue(r,Bt,S=>t(16,o=S)),ue(r,pl,S=>t(9,a=S));let u,f,c=!1,p,{webhookModal:d}=e;async function g(){var S;try{await xt.actions.create({name:u,instanceId:n});const T=l.selectedAutomation.constructBlock("TRIGGER",p.stepId,p);xt.actions.addBlockToAutomation(T),p.stepId==="WEBHOOK"&&d.show,await xt.actions.save((S=l.selectedAutomation)==null?void 0:S.automation),ye.success(`Automation ${u} created`),o(`./${l.selectedAutomation.automation._id}`),zn.captureEvent(Qn.AUTOMATION.CREATED,{name:u})}catch{ye.error("Error creating automation")}}const h=S=>{p=S,t(2,f=S.name)};function v(S){u=S,t(0,u)}function C(S){i=S,t(4,i),t(1,c),t(0,u)}const k=()=>t(1,c=!0),I=S=>h(S);return r.$$set=S=>{"webhookModal"in S&&t(7,d=S.webhookModal)},r.$$.update=()=>{r.$$.dirty&512&&(n=a._id),r.$$.dirty&3&&t(4,i=c&&!u?"Please specify a name for the automation.":null),r.$$.dirty&256&&t(3,s=Object.entries(l.blockDefinitions.TRIGGER))},[u,c,f,s,i,g,h,d,l,a,v,C,k,I]}class Ey extends se{constructor(e){super();le(this,e,Fce,Uce,ne,{webhookModal:7})}}function Vce(r){let e,t;return e=new Ey({props:{webhookModal:r[1]}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&2&&(s.webhookModal=n[1]),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Hce(r){let e,t,n,i,s;t=new Mce({});let l={$$slots:{default:[Vce]},$$scope:{ctx:r}};return i=new St({props:l}),r[2](i),{c(){e=M("div"),A(t.$$.fragment),n=R(),A(i.$$.fragment),y(e,"class","tab-content-padding svelte-1r2f9up")},m(o,a){$(o,e,a),E(t,e,null),P(e,n),E(i,e,null),s=!0},p(o,a){const u={};a&10&&(u.$$scope={dirty:a,ctx:o}),i.$set(u)},i(o){s||(m(t.$$.fragment,o),m(i.$$.fragment,o),s=!0)},o(o){_(t.$$.fragment,o),_(i.$$.fragment,o),s=!1},d(o){o&&b(e),O(t),r[2](null),O(i)}}}function Wce(r){let e,t;return e=new gn({props:{title:"Automations",$$slots:{default:[Hce]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&11&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Gce(r){let e,t,n,i,s,l;return t=new zr({props:{selected:"Automations",$$slots:{default:[Wce]},$$scope:{ctx:r}}}),s=new pt({props:{hoverable:!0,name:"AddCircle"}}),s.$on("click",function(){dt(r[0].show)&&r[0].show.apply(this,arguments)}),{c(){e=M("div"),A(t.$$.fragment),n=R(),i=M("div"),A(s.$$.fragment),y(i,"class","add-button svelte-1r2f9up"),y(i,"data-cy","new-screen"),y(e,"class","title svelte-1r2f9up")},m(o,a){$(o,e,a),E(t,e,null),P(e,n),P(e,i),E(s,i,null),l=!0},p(o,[a]){r=o;const u={};a&11&&(u.$$scope={dirty:a,ctx:r}),t.$set(u)},i(o){l||(m(t.$$.fragment,o),m(s.$$.fragment,o),l=!0)},o(o){_(t.$$.fragment,o),_(s.$$.fragment,o),l=!1},d(o){o&&b(e),O(t),O(s)}}}function Yce(r,e,t){let{modal:n}=e,{webhookModal:i}=e;function s(l){Z[l?"unshift":"push"](()=>{n=l,t(0,n)})}return r.$$set=l=>{"modal"in l&&t(0,n=l.modal),"webhookModal"in l&&t(1,i=l.webhookModal)},[n,i,s]}class Jce extends se{constructor(e){super();le(this,e,Yce,Gce,ne,{modal:0,webhookModal:1})}}function Qce(r){let e,t,n,i;return n=new Qe({props:{gap:"S",justifyItems:"center",$$slots:{default:[epe]},$$scope:{ctx:r}}}),{c(){e=M("div"),t=M("div"),A(n.$$.fragment),y(t,"class","main svelte-16gumu0"),y(e,"class","centered svelte-16gumu0")},m(s,l){$(s,e,l),P(e,t),E(n,t,null),i=!0},p(s,l){const o={};l&257&&(o.$$scope={dirty:l,ctx:s}),n.$set(o)},i(s){i||(m(n.$$.fragment,s),i=!0)},o(s){_(n.$$.fragment,s),i=!1},d(s){s&&b(e),O(n)}}}function Xce(r){let e;const t=r[4].default,n=ht(t,r,r[8],null);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&256)&&$t(n,t,i,i[8],e?vt(t,i[8],s,null):bt(i[8]),null)},i(i){e||(m(n,i),e=!0)},o(i){_(n,i),e=!1},d(i){n&&n.d(i)}}}function Kce(r){let e;return{c(){e=H("You have no automations")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Zce(r){let e;return{c(){e=H("Let's fix that. Call the bots!")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function xce(r){let e;return{c(){e=H("Create automation")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function epe(r){let e,t,n,i,s,l,o,a,u;return i=new wt({props:{size:"M",$$slots:{default:[Kce]},$$scope:{ctx:r}}}),l=new Je({props:{size:"M",$$slots:{default:[Zce]},$$scope:{ctx:r}}}),a=new ut({props:{size:"M",cta:!0,$$slots:{default:[xce]},$$scope:{ctx:r}}}),a.$on("click",r[5]),{c(){e=ge("svg"),t=ge("use"),n=R(),A(i.$$.fragment),s=R(),A(l.$$.fragment),o=R(),A(a.$$.fragment),Ht(t,"xlink:href","#spectrum-icon-18-WorkflowAdd"),y(e,"width","60px"),y(e,"height","60px"),y(e,"class","spectrum-Icon"),y(e,"focusable","false")},m(f,c){$(f,e,c),P(e,t),$(f,n,c),E(i,f,c),$(f,s,c),E(l,f,c),$(f,o,c),E(a,f,c),u=!0},p(f,c){const p={};c&256&&(p.$$scope={dirty:c,ctx:f}),i.$set(p);const d={};c&256&&(d.$$scope={dirty:c,ctx:f}),l.$set(d);const g={};c&256&&(g.$$scope={dirty:c,ctx:f}),a.$set(g)},i(f){u||(m(i.$$.fragment,f),m(l.$$.fragment,f),m(a.$$.fragment,f),u=!0)},o(f){_(i.$$.fragment,f),_(l.$$.fragment,f),_(a.$$.fragment,f),u=!1},d(f){f&&b(e),f&&b(n),O(i,f),f&&b(s),O(l,f),f&&b(o),O(a,f)}}}function tpe(r){let e,t;return e=new Ey({props:{webhookModal:r[1]}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&2&&(s.webhookModal=n[1]),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function npe(r){let e,t;return e=new B1({}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function rpe(r){let e,t,n,i,s,l,o,a,u,f,c,p;n=new Jce({props:{modal:r[0],webhookModal:r[1]}});const d=[Xce,Qce],g=[];function h(k,I){return k[2]?0:1}l=h(r),o=g[l]=d[l](r);let v={$$slots:{default:[tpe]},$$scope:{ctx:r}};u=new St({props:v}),r[6](u);let C={width:"30%",$$slots:{default:[npe]},$$scope:{ctx:r}};return c=new St({props:C}),r[7](c),{c(){e=M("div"),t=M("div"),A(n.$$.fragment),i=R(),s=M("div"),o.c(),a=R(),A(u.$$.fragment),f=R(),A(c.$$.fragment),y(t,"class","nav svelte-16gumu0"),y(s,"class","content svelte-16gumu0"),y(e,"class","root svelte-16gumu0")},m(k,I){$(k,e,I),P(e,t),E(n,t,null),P(e,i),P(e,s),g[l].m(s,null),P(e,a),E(u,e,null),P(e,f),E(c,e,null),p=!0},p(k,[I]){const S={};I&1&&(S.modal=k[0]),I&2&&(S.webhookModal=k[1]),n.$set(S);let T=l;l=h(k),l===T?g[l].p(k,I):(ee(),_(g[T],1,1,()=>{g[T]=null}),te(),o=g[l],o?o.p(k,I):(o=g[l]=d[l](k),o.c()),m(o,1),o.m(s,null));const N={};I&258&&(N.$$scope={dirty:I,ctx:k}),u.$set(N);const D={};I&256&&(D.$$scope={dirty:I,ctx:k}),c.$set(D)},i(k){p||(m(n.$$.fragment,k),m(o),m(u.$$.fragment,k),m(c.$$.fragment,k),p=!0)},o(k){_(n.$$.fragment,k),_(o),_(u.$$.fragment,k),_(c.$$.fragment,k),p=!1},d(k){k&&b(e),O(n),g[l].d(),r[6](null),O(u),r[7](null),O(c)}}}function ipe(r,e,t){let n,i;ue(r,xt,p=>t(3,i=p));let{$$slots:s={},$$scope:l}=e,o,a;const u=()=>o.show();function f(p){Z[p?"unshift":"push"](()=>{o=p,t(0,o)})}function c(p){Z[p?"unshift":"push"](()=>{a=p,t(1,a)})}return r.$$set=p=>{"$$scope"in p&&t(8,l=p.$$scope)},r.$$.update=()=>{r.$$.dirty&8&&t(2,n=i.automations[0])},[o,a,n,i,s,u,f,c,l]}class spe extends se{constructor(e){super();le(this,e,ipe,rpe,ne,{})}}function lpe(r){let e;return{c(){e=H("Publish")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function ope(r){let e,t;return e=new jt({props:{title:"Enjoying Budibase?",size:"L",showConfirmButton:!1,showCancelButton:!1}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p:Te,i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function ape(r){let e;return{c(){e=M("span"),e.textContent=`The changes you have made will be published to the production version of
|
|
1237
1237
|
the application.`},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function upe(r){let e,t;return e=new jt({props:{title:"Publish to Production",confirmText:"Publish",onConfirm:r[2],$$slots:{default:[ape]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&64&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function fpe(r){let e,t,n,i,s,l;e=new ut({props:{secondary:!0,$$slots:{default:[lpe]},$$scope:{ctx:r}}}),e.$on("click",function(){dt(r[1].show)&&r[1].show.apply(this,arguments)});let o={$$slots:{default:[ope]},$$scope:{ctx:r}};n=new St({props:o}),r[3](n);let a={$$slots:{default:[upe]},$$scope:{ctx:r}};return s=new St({props:a}),r[4](s),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment),i=R(),A(s.$$.fragment)},m(u,f){E(e,u,f),$(u,t,f),E(n,u,f),$(u,i,f),E(s,u,f),l=!0},p(u,[f]){r=u;const c={};f&64&&(c.$$scope={dirty:f,ctx:r}),e.$set(c);const p={};f&64&&(p.$$scope={dirty:f,ctx:r}),n.$set(p);const d={};f&64&&(d.$$scope={dirty:f,ctx:r}),s.$set(d)},i(u){l||(m(e.$$.fragment,u),m(n.$$.fragment,u),m(s.$$.fragment,u),l=!0)},o(u){_(e.$$.fragment,u),_(n.$$.fragment,u),_(s.$$.fragment,u),l=!1},d(u){O(e,u),u&&b(t),r[3](null),O(n,u),u&&b(i),r[4](null),O(s,u)}}}function cpe(r,e,t){let n;ue(r,Ye,u=>t(5,n=u));let i,s;async function l(){try{await Ze.deployAppChanges(),zn.captureEvent(Qn.APP.PUBLISHED,{appId:n.appId}),ye.success("Application published successfully")}catch(u){zn.captureException(u),ye.error("Error publishing app")}}function o(u){Z[u?"unshift":"push"](()=>{i=u,t(0,i)})}function a(u){Z[u?"unshift":"push"](()=>{s=u,t(1,s)})}return[i,s,l,o,a]}class ppe extends se{constructor(e){super();le(this,e,cpe,fpe,ne,{})}}function dpe(r){let e,t,n,i,s,l,o;function a(f){r[4](f)}let u={};return r[2]!==void 0&&(u.value=r[2]),s=new et({props:u}),Z.push(()=>ce(s,"value",a)),{c(){e=M("span"),e.textContent=`The changes you have made will be deleted and the application reverted
|
|
1238
|
-
back to its production state.`,t=R(),n=M("span"),n.textContent="Please enter your app name to continue.",i=R(),A(s.$$.fragment)},m(f,c){$(f,e,c),$(f,t,c),$(f,n,c),$(f,i,c),E(s,f,c),o=!0},p(f,c){const p={};!l&&c&4&&(l=!0,p.value=f[2],pe(()=>l=!1)),s.$set(p)},i(f){o||(m(s.$$.fragment,f),o=!0)},o(f){_(s.$$.fragment,f),o=!1},d(f){f&&b(e),f&&b(t),f&&b(n),f&&b(i),O(s,f)}}}function mpe(r){let e,t;return e=new jt({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:r[3],disabled:r[2]!==r[0].name,$$slots:{default:[dpe]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&5&&(s.disabled=n[2]!==n[0].name),i&132&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function gpe(r){let e,t,n,i;e=new pt({props:{name:"Revert",hoverable:!0}}),e.$on("click",function(){dt(r[1].show)&&r[1].show.apply(this,arguments)});let s={$$slots:{default:[mpe]},$$scope:{ctx:r}};return n=new St({props:s}),r[5](n),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(l,o){E(e,l,o),$(l,t,o),E(n,l,o),i=!0},p(l,[o]){r=l;const a={};o&133&&(a.$$scope={dirty:o,ctx:r}),n.$set(a)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){O(e,l),l&&b(t),r[5](null),O(n,l)}}}function _pe(r,e,t){let n,i;ue(r,Ye,f=>t(0,i=f));let s,l;const o=async()=>{try{await Ze.revertAppChanges(n);const f=await Ze.fetchAppPackage(n);await Ye.actions.initialise(f),ye.info("Changes reverted successfully")}catch(f){ye.error(`Error reverting changes: ${f}`)}};function a(f){l=f,t(2,l)}function u(f){Z[f?"unshift":"push"](()=>{s=f,t(1,s)})}return r.$$.update=()=>{r.$$.dirty&1&&(n=i.appId)},[i,s,l,o,a,u]}class hpe extends se{constructor(e){super();le(this,e,_pe,gpe,ne,{})}}const $pe="@budibase/client",bpe="1.0.
|
|
1238
|
+
back to its production state.`,t=R(),n=M("span"),n.textContent="Please enter your app name to continue.",i=R(),A(s.$$.fragment)},m(f,c){$(f,e,c),$(f,t,c),$(f,n,c),$(f,i,c),E(s,f,c),o=!0},p(f,c){const p={};!l&&c&4&&(l=!0,p.value=f[2],pe(()=>l=!1)),s.$set(p)},i(f){o||(m(s.$$.fragment,f),o=!0)},o(f){_(s.$$.fragment,f),o=!1},d(f){f&&b(e),f&&b(t),f&&b(n),f&&b(i),O(s,f)}}}function mpe(r){let e,t;return e=new jt({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:r[3],disabled:r[2]!==r[0].name,$$slots:{default:[dpe]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&5&&(s.disabled=n[2]!==n[0].name),i&132&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function gpe(r){let e,t,n,i;e=new pt({props:{name:"Revert",hoverable:!0}}),e.$on("click",function(){dt(r[1].show)&&r[1].show.apply(this,arguments)});let s={$$slots:{default:[mpe]},$$scope:{ctx:r}};return n=new St({props:s}),r[5](n),{c(){A(e.$$.fragment),t=R(),A(n.$$.fragment)},m(l,o){E(e,l,o),$(l,t,o),E(n,l,o),i=!0},p(l,[o]){r=l;const a={};o&133&&(a.$$scope={dirty:o,ctx:r}),n.$set(a)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){O(e,l),l&&b(t),r[5](null),O(n,l)}}}function _pe(r,e,t){let n,i;ue(r,Ye,f=>t(0,i=f));let s,l;const o=async()=>{try{await Ze.revertAppChanges(n);const f=await Ze.fetchAppPackage(n);await Ye.actions.initialise(f),ye.info("Changes reverted successfully")}catch(f){ye.error(`Error reverting changes: ${f}`)}};function a(f){l=f,t(2,l)}function u(f){Z[f?"unshift":"push"](()=>{s=f,t(1,s)})}return r.$$.update=()=>{r.$$.dirty&1&&(n=i.appId)},[i,s,l,o,a,u]}class hpe extends se{constructor(e){super();le(this,e,_pe,gpe,ne,{})}}const $pe="@budibase/client",bpe="1.0.75",vpe="MPL-2.0",wpe="dist/budibase-client.js",ype="dist/budibase-client.js",kpe="module",Cpe="src/index.js",Spe={".":{import:"./dist/budibase-client.js",require:"./dist/budibase-client.js"},"./package.json":"./package.json","./manifest.json":"./manifest.json"},Ape={build:"rollup -c","dev:builder":"rollup -cw"},Epe={"@budibase/bbui":"^1.0.75","@budibase/frontend-core":"^1.0.75","@budibase/string-templates":"^1.0.75","@spectrum-css/button":"^3.0.3","@spectrum-css/card":"^3.0.3","@spectrum-css/divider":"^1.0.3","@spectrum-css/link":"^3.1.3","@spectrum-css/page":"^3.0.1","@spectrum-css/tag":"^3.1.4","@spectrum-css/typography":"^3.0.2","@spectrum-css/vars":"^3.0.1",apexcharts:"^3.22.1",dayjs:"^1.10.5",regexparam:"^1.3.0","rollup-plugin-polyfill-node":"^0.8.0",shortid:"^2.2.15",svelte:"^3.38.2","svelte-apexcharts":"^1.0.2","svelte-flatpickr":"^3.1.0","svelte-spa-router":"^3.0.5"},Ope={"@rollup/plugin-alias":"^3.1.5","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-node-resolve":"^11.2.1",postcss:"^8.2.10",rollup:"^2.44.0","rollup-plugin-json":"^4.0.0","rollup-plugin-postcss":"^4.0.0","rollup-plugin-svelte":"^7.1.0","rollup-plugin-svg":"^2.0.0","rollup-plugin-terser":"^7.0.2","rollup-plugin-visualizer":"^5.5.4"},Tpe="d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc";var z1={name:$pe,version:bpe,license:vpe,module:wpe,main:ype,type:kpe,svelte:Cpe,exports:Spe,scripts:Ape,dependencies:Epe,devDependencies:Ope,gitHead:Tpe};function Ipe(r){let e,t;return e=new Je({props:{size:"S",$$slots:{default:[Ppe]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&513&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Lpe(r){let e,t;return e=new Je({props:{size:"S",$$slots:{default:[Npe]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&513&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Ppe(r){let e,t,n=r[0].version+"",i,s;return{c(){e=H("This app is currently using version "),t=M("b"),i=H(n),s=H(` which is the
|
|
1239
1239
|
latest version available.`)},m(l,o){$(l,e,o),$(l,t,o),P(t,i),$(l,s,o)},p(l,o){o&1&&n!==(n=l[0].version+"")&&Ie(i,n)},d(l){l&&b(e),l&&b(t),l&&b(s)}}}function Npe(r){let e,t,n=r[0].version+"",i,s,l,o;return{c(){e=H("This app is currently using version "),t=M("b"),i=H(n),s=H(`, but version
|
|
1240
1240
|
`),l=M("b"),l.textContent=`${z1.version}`,o=H(` is available. Updates can contain new features,
|
|
1241
1241
|
performance improvements and bug fixes.`)},m(a,u){$(a,e,u),$(a,t,u),P(t,i),$(a,s,u),$(a,l,u),$(a,o,u)},p(a,u){u&1&&n!==(n=a[0].version+"")&&Ie(i,n)},d(a){a&&b(e),a&&b(t),a&&b(s),a&&b(l),a&&b(o)}}}function Oy(r){let e,t;return e=new Je({props:{size:"S",$$slots:{default:[Rpe]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(n,i){E(e,n,i),t=!0},p(n,i){const s={};i&513&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){O(e,n)}}}function Rpe(r){let e,t,n=r[0].revertableVersion+"",i,s;return{c(){e=H(`You can revert this app to version
|