@budibase/server 2.0.30-alpha.13 → 2.0.30-alpha.14

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.
Files changed (152) hide show
  1. package/builder/assets/{index.a5f772fd.js → index.099ad307.js} +3 -3
  2. package/builder/index.html +1 -1
  3. package/coverage/clover.xml +2 -2
  4. package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
  5. package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
  6. package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
  7. package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
  8. package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
  9. package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
  10. package/coverage/lcov-report/api/controllers/index.html +1 -1
  11. package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
  12. package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
  13. package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
  14. package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
  15. package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
  16. package/coverage/lcov-report/api/controllers/query/index.html +1 -1
  17. package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
  18. package/coverage/lcov-report/api/controllers/role.js.html +1 -1
  19. package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
  20. package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
  21. package/coverage/lcov-report/api/controllers/row/index.html +1 -1
  22. package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
  23. package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
  24. package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
  25. package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
  26. package/coverage/lcov-report/api/controllers/script.js.html +1 -1
  27. package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
  28. package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
  29. package/coverage/lcov-report/api/controllers/table/index.html +1 -1
  30. package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
  31. package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
  32. package/coverage/lcov-report/api/controllers/user.js.html +1 -1
  33. package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
  34. package/coverage/lcov-report/api/controllers/view/index.html +1 -1
  35. package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
  36. package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
  37. package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
  38. package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
  39. package/coverage/lcov-report/api/index.html +1 -1
  40. package/coverage/lcov-report/api/index.js.html +1 -1
  41. package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
  42. package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
  43. package/coverage/lcov-report/api/routes/automation.js.html +1 -1
  44. package/coverage/lcov-report/api/routes/backup.js.html +1 -1
  45. package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
  46. package/coverage/lcov-report/api/routes/component.js.html +1 -1
  47. package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
  48. package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
  49. package/coverage/lcov-report/api/routes/dev.js.html +1 -1
  50. package/coverage/lcov-report/api/routes/index.html +1 -1
  51. package/coverage/lcov-report/api/routes/integration.js.html +1 -1
  52. package/coverage/lcov-report/api/routes/layout.js.html +1 -1
  53. package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
  54. package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
  55. package/coverage/lcov-report/api/routes/permission.js.html +1 -1
  56. package/coverage/lcov-report/api/routes/query.js.html +1 -1
  57. package/coverage/lcov-report/api/routes/role.js.html +1 -1
  58. package/coverage/lcov-report/api/routes/routing.js.html +1 -1
  59. package/coverage/lcov-report/api/routes/screen.js.html +1 -1
  60. package/coverage/lcov-report/api/routes/script.js.html +1 -1
  61. package/coverage/lcov-report/api/routes/table.js.html +1 -1
  62. package/coverage/lcov-report/api/routes/templates.js.html +1 -1
  63. package/coverage/lcov-report/api/routes/user.js.html +1 -1
  64. package/coverage/lcov-report/api/routes/utils/index.html +1 -1
  65. package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
  66. package/coverage/lcov-report/api/routes/view.js.html +1 -1
  67. package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
  68. package/coverage/lcov-report/automations/actions.js.html +1 -1
  69. package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
  70. package/coverage/lcov-report/automations/bullboard.js.html +1 -1
  71. package/coverage/lcov-report/automations/index.html +1 -1
  72. package/coverage/lcov-report/automations/index.js.html +1 -1
  73. package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
  74. package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
  75. package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
  76. package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
  77. package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
  78. package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
  79. package/coverage/lcov-report/automations/steps/index.html +1 -1
  80. package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
  81. package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
  82. package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
  83. package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
  84. package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
  85. package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
  86. package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
  87. package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
  88. package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
  89. package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
  90. package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
  91. package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
  92. package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
  93. package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
  94. package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
  95. package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
  96. package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
  97. package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
  98. package/coverage/lcov-report/automations/triggers.js.html +1 -1
  99. package/coverage/lcov-report/constants/index.html +1 -1
  100. package/coverage/lcov-report/constants/index.js.html +1 -1
  101. package/coverage/lcov-report/constants/layouts.js.html +1 -1
  102. package/coverage/lcov-report/constants/screens.js.html +1 -1
  103. package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
  104. package/coverage/lcov-report/db/index.html +1 -1
  105. package/coverage/lcov-report/db/index.js.html +1 -1
  106. package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
  107. package/coverage/lcov-report/db/linkedRows/index.html +1 -1
  108. package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
  109. package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
  110. package/coverage/lcov-report/db/newid.js.html +1 -1
  111. package/coverage/lcov-report/db/utils.js.html +1 -1
  112. package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
  113. package/coverage/lcov-report/events/index.html +1 -1
  114. package/coverage/lcov-report/events/index.js.html +1 -1
  115. package/coverage/lcov-report/events/utils.js.html +1 -1
  116. package/coverage/lcov-report/index.html +1 -1
  117. package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
  118. package/coverage/lcov-report/integrations/tests/index.html +1 -1
  119. package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
  120. package/coverage/lcov-report/middleware/builder.js.html +1 -1
  121. package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
  122. package/coverage/lcov-report/middleware/index.html +1 -1
  123. package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
  124. package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
  125. package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
  126. package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
  127. package/coverage/lcov-report/middleware/utils.js.html +1 -1
  128. package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
  129. package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
  130. package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
  131. package/coverage/lcov-report/utilities/global.js.html +1 -1
  132. package/coverage/lcov-report/utilities/index.html +1 -1
  133. package/coverage/lcov-report/utilities/index.js.html +1 -1
  134. package/coverage/lcov-report/utilities/plugins.js.html +1 -1
  135. package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
  136. package/coverage/lcov-report/utilities/queue/index.html +1 -1
  137. package/coverage/lcov-report/utilities/routing/index.html +1 -1
  138. package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
  139. package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
  140. package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
  141. package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
  142. package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
  143. package/coverage/lcov-report/utilities/security.js.html +1 -1
  144. package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
  145. package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
  146. package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
  147. package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
  148. package/coverage/lcov-report/utilities/users.js.html +1 -1
  149. package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
  150. package/dist/package.json +6 -6
  151. package/dist/tsconfig.build.tsbuildinfo +1 -1
  152. package/package.json +7 -7
@@ -866,7 +866,7 @@ Use Save As... to download, then click back to return to this page.`)&&(location
866
866
  This action cannot be undone.`)},m(l,s){C(l,e,s),C(l,t,s),x(t,i),x(t,a),C(l,o,s)},p(l,s){s&1&&r!==(r=l[0].name+"")&&_t(i,r)},d(l){l&&M(e),l&&M(t),l&&M(o)}}}function ZVe(n){let e,t,r,i,a,o;e=new Fu({props:{$$slots:{control:[XVe],default:[KVe]},$$scope:{ctx:n}}});let l={okText:"Delete Datasource",onOk:n[3],title:"Confirm Deletion",$$slots:{default:[JVe]},$$scope:{ctx:n}};r=new Os({props:l}),n[4](r);let s={datasource:n[0]};return a=new WVe({props:s}),n[5](a),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),O(a.$$.fragment)},m(u,c){H(e,u,c),C(u,t,c),H(r,u,c),C(u,i,c),H(a,u,c),o=!0},p(u,[c]){const f={};c&1030&&(f.$$scope={dirty:c,ctx:u}),e.$set(f);const h={};c&1025&&(h.$$scope={dirty:c,ctx:u}),r.$set(h);const m={};c&1&&(m.datasource=u[0]),a.$set(m)},i(u){o||(b(e.$$.fragment,u),b(r.$$.fragment,u),b(a.$$.fragment,u),o=!0)},o(u){$(e.$$.fragment,u),$(r.$$.fragment,u),$(a.$$.fragment,u),o=!1},d(u){B(e,u),u&&M(t),n[4](null),B(r,u),u&&M(i),n[5](null),B(a,u)}}}function QVe(n,e,t){let r,i,a,o;Ne(n,si,m=>t(6,r=m)),Ne(n,Hr,m=>t(7,i=m)),Ne(n,Di,m=>t(8,a=m)),Ne(n,ya,m=>t(9,o=m));let{datasource:l}=e,s,u;async function c(){var m;try{let _=a.selected;if(!_&&o.selected){const A=o.selected;_=(m=a.list.find(E=>A.includes(E._id)))==null?void 0:m._id}const y=i.selected;await Di.delete(l),yt.success("Datasource deleted");const w=Object.values((l==null?void 0:l.entities)||{});(_===l._id||w&&w.find(A=>A._id===(y==null?void 0:y._id)))&&r("./datasource")}catch{yt.error("Error deleting datasource")}}function f(m){He[m?"unshift":"push"](()=>{s=m,t(1,s)})}function h(m){He[m?"unshift":"push"](()=>{u=m,t(2,u)})}return n.$$set=m=>{"datasource"in m&&t(0,l=m.datasource)},[l,s,u,c,f,h]}class eRe extends Re{constructor(e){super(),Ve(this,e,QVe,ZVe,Oe,{datasource:0})}}function tRe(n){let e;return{c(){e=le("Delete")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function nRe(n){let e;return{c(){e=le("Duplicate")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function rRe(n){let e,t,r,i;return e=new pi({props:{icon:"Delete",$$slots:{default:[tRe]},$$scope:{ctx:n}}}),e.$on("click",function(){Mn(n[0].show)&&n[0].show.apply(this,arguments)}),r=new pi({props:{icon:"Duplicate",$$slots:{default:[nRe]},$$scope:{ctx:n}}}),r.$on("click",n[2]),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,o){n=a;const l={};o&256&&(l.$$scope={dirty:o,ctx:n}),e.$set(l);const s={};o&256&&(s.$$scope={dirty:o,ctx:n}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function iRe(n){let e,t,r;return t=new dn({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"slot","control"),D(e,"class","icon svelte-kjkbox")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p:mt,i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function aRe(n){let e;return{c(){e=le("Are you sure you wish to delete this query? This action cannot be undone.")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function oRe(n){let e,t,r,i;e=new Fu({props:{$$slots:{control:[iRe],default:[rRe]},$$scope:{ctx:n}}});let a={okText:"Delete Query",onOk:n[1],title:"Confirm Deletion",$$slots:{default:[aRe]},$$scope:{ctx:n}};return r=new Os({props:a}),n[5](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),C(o,t,l),H(r,o,l),i=!0},p(o,[l]){const s={};l&257&&(s.$$scope={dirty:l,ctx:o}),e.$set(s);const u={};l&256&&(u.$$scope={dirty:l,ctx:o}),r.$set(u)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&M(t),n[5](null),B(r,o)}}}function lRe(n,e,t){let r,i;Ne(n,si,f=>t(6,r=f)),Ne(n,ya,f=>t(7,i=f));let{query:a}=e,{onClickQuery:o}=e,l;async function s(){try{const h=i.selected===a._id;await ya.delete(a),await Di.fetch(),h&&(await Di.select(a.datasourceId),r(`./datasource/${a.datasourceId}`)),yt.success("Query deleted")}catch{yt.error("Error deleting query")}}async function u(){try{const f=await ya.duplicate(a);o(f)}catch{yt.error("Error duplicating query")}}function c(f){He[f?"unshift":"push"](()=>{l=f,t(0,l)})}return n.$$set=f=>{"query"in f&&t(3,a=f.query),"onClickQuery"in f&&t(4,o=f.onClickQuery)},[l,s,u,a,o,c]}class sRe extends Re{constructor(e){super(),Ve(this,e,lRe,oRe,Oe,{query:3,onClickQuery:4})}}const uRe=n=>({}),SO=n=>({}),cRe=n=>({}),LO=n=>({});function EO(n){let e,t,r,i,a;return t=new dn({props:{size:"S",name:"ChevronRight"}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","icon arrow svelte-1vakwx8"),De(e,"opened",n[7]),De(e,"relative",n[3]===0),De(e,"absolute",n[3]>0)},m(o,l){C(o,e,l),H(t,e,null),r=!0,i||(a=At(e,"click",n[17]),i=!0)},p(o,l){l&128&&De(e,"opened",o[7]),l&8&&De(e,"relative",o[3]===0),l&8&&De(e,"absolute",o[3]>0)},i(o){r||(b(t.$$.fragment,o),r=!0)},o(o){$(t.$$.fragment,o),r=!1},d(o){o&&M(e),B(t),i=!1,a()}}}function fRe(n){let e,t,r;return t=new dn({props:{color:n[10],size:"S",name:n[0]}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","icon svelte-1vakwx8"),De(e,"right",n[13])},m(i,a){C(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a&1024&&(o.color=i[10]),a&1&&(o.name=i[0]),t.$set(o),a&8192&&De(e,"right",i[13])},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function pRe(n){let e,t,r;return{c(){e=J("div"),t=le(n[9]),D(e,"class","iconText svelte-1vakwx8"),D(e,"style",r=n[10]?`color: ${n[10]};`:"")},m(i,a){C(i,e,a),x(e,t)},p(i,a){a&512&&_t(t,i[9]),a&1024&&r!==(r=i[10]?`color: ${i[10]};`:"")&&D(e,"style",r)},i:mt,o:mt,d(i){i&&M(e)}}}function TO(n){let e,t;const r=n[20].default,i=Xn(r,n,n[19],null);return{c(){e=J("div"),i&&i.c(),D(e,"class","actions svelte-1vakwx8")},m(a,o){C(a,e,o),i&&i.m(e,null),t=!0},p(a,o){i&&i.p&&(!t||o&524288)&&Zn(i,r,a,a[19],t?Jn(r,a[19],o,null):Qn(a[19]),null)},i(a){t||(b(i,a),t=!0)},o(a){$(i,a),t=!1},d(a){a&&M(e),i&&i.d(a)}}}function DO(n){let e,t;const r=n[20].right,i=Xn(r,n,n[19],SO);return{c(){e=J("div"),i&&i.c(),D(e,"class","right svelte-1vakwx8")},m(a,o){C(a,e,o),i&&i.m(e,null),t=!0},p(a,o){i&&i.p&&(!t||o&524288)&&Zn(i,r,a,a[19],t?Jn(r,a[19],o,uRe):Qn(a[19]),SO)},i(a){t||(b(i,a),t=!0)},o(a){$(i,a),t=!1},d(a){a&&M(e),i&&i.d(a)}}}function dRe(n){let e,t,r,i,a,o,l,s,u,c,f,h,m,_,y,w=n[1]&&EO(n);const A=n[20].icon,E=Xn(A,n,n[19],LO),T=[pRe,fRe],I=[];function P(q,W){return q[9]?0:q[0]?1:-1}~(a=P(n))&&(o=I[a]=T[a](n));let F=n[2]&&TO(n),j=n[18].right&&DO(n);return{c(){e=J("div"),t=J("div"),w&&w.c(),r=U(),E&&E.c(),i=U(),o&&o.c(),l=U(),s=J("div"),u=le(n[4]),c=U(),F&&F.c(),f=U(),j&&j.c(),D(s,"class","text svelte-1vakwx8"),D(t,"class","nav-item-content svelte-1vakwx8"),D(e,"class","nav-item svelte-1vakwx8"),D(e,"style",h=`padding-left: calc(${n[3]*14}px)`),D(e,"draggable",n[8]),D(e,"ondragover","return false"),D(e,"ondragenter","return false"),D(e,"id",n[14]),De(e,"border",n[5]),De(e,"selected",n[6]),De(e,"withActions",n[2]),De(e,"scrollable",n[11]),De(e,"highlighted",n[12])},m(q,W){C(q,e,W),x(e,t),w&&w.m(t,null),x(t,r),E&&E.m(t,null),x(t,i),~a&&I[a].m(t,null),x(t,l),x(t,s),x(s,u),x(t,c),F&&F.m(t,null),x(t,f),j&&j.m(t,null),n[25](t),m=!0,_||(y=[At(e,"dragend",n[21]),At(e,"dragstart",n[22]),At(e,"dragover",n[23]),At(e,"drop",n[24]),At(e,"click",n[16])],_=!0)},p(q,[W]){q[1]?w?(w.p(q,W),W&2&&b(w,1)):(w=EO(q),w.c(),b(w,1),w.m(t,r)):w&&(we(),$(w,1,1,()=>{w=null}),ke()),E&&E.p&&(!m||W&524288)&&Zn(E,A,q,q[19],m?Jn(A,q[19],W,cRe):Qn(q[19]),LO);let te=a;a=P(q),a===te?~a&&I[a].p(q,W):(o&&(we(),$(I[te],1,1,()=>{I[te]=null}),ke()),~a?(o=I[a],o?o.p(q,W):(o=I[a]=T[a](q),o.c()),b(o,1),o.m(t,l)):o=null),(!m||W&16)&&_t(u,q[4]),q[2]?F?(F.p(q,W),W&4&&b(F,1)):(F=TO(q),F.c(),b(F,1),F.m(t,f)):F&&(we(),$(F,1,1,()=>{F=null}),ke()),q[18].right?j?(j.p(q,W),W&262144&&b(j,1)):(j=DO(q),j.c(),b(j,1),j.m(t,null)):j&&(we(),$(j,1,1,()=>{j=null}),ke()),(!m||W&8&&h!==(h=`padding-left: calc(${q[3]*14}px)`))&&D(e,"style",h),(!m||W&256)&&D(e,"draggable",q[8]),(!m||W&16384)&&D(e,"id",q[14]),W&32&&De(e,"border",q[5]),W&64&&De(e,"selected",q[6]),W&4&&De(e,"withActions",q[2]),W&2048&&De(e,"scrollable",q[11]),W&4096&&De(e,"highlighted",q[12])},i(q){m||(b(w),b(E,q),b(o),b(F),b(j),m=!0)},o(q){$(w),$(E,q),$(o),$(F),$(j),m=!1},d(q){q&&M(e),w&&w.d(),E&&E.d(q),~a&&I[a].d(),F&&F.d(),j&&j.d(),n[25](null),_=!1,Vi(y)}}}function hRe(n,e,t){let{$$slots:r={},$$scope:i}=e;const a=hp(r);let{icon:o}=e,{withArrow:l=!1}=e,{withActions:s=!0}=e,{indentLevel:u=0}=e,{text:c}=e,{border:f=!0}=e,{selected:h=!1}=e,{opened:m=!1}=e,{draggable:_=!1}=e,{iconText:y}=e,{iconColor:w}=e,{scrollable:A=!1}=e,{highlighted:E=!1}=e,{rightAlignIcon:T=!1}=e,{id:I}=e;const P=A4("scroll"),F=Un();let j;const q=()=>{te(),F("click")},W=ne=>{ne.stopPropagation(),F("iconClick")},te=()=>{if(!P||!j)return;const ne=j.getBoundingClientRect();P.scrollTo(ne)};function Q(ne){Bn.call(this,n,ne)}function oe(ne){Bn.call(this,n,ne)}function ie(ne){Bn.call(this,n,ne)}function K(ne){Bn.call(this,n,ne)}function G(ne){He[ne?"unshift":"push"](()=>{j=ne,t(15,j)})}return n.$$set=ne=>{"icon"in ne&&t(0,o=ne.icon),"withArrow"in ne&&t(1,l=ne.withArrow),"withActions"in ne&&t(2,s=ne.withActions),"indentLevel"in ne&&t(3,u=ne.indentLevel),"text"in ne&&t(4,c=ne.text),"border"in ne&&t(5,f=ne.border),"selected"in ne&&t(6,h=ne.selected),"opened"in ne&&t(7,m=ne.opened),"draggable"in ne&&t(8,_=ne.draggable),"iconText"in ne&&t(9,y=ne.iconText),"iconColor"in ne&&t(10,w=ne.iconColor),"scrollable"in ne&&t(11,A=ne.scrollable),"highlighted"in ne&&t(12,E=ne.highlighted),"rightAlignIcon"in ne&&t(13,T=ne.rightAlignIcon),"id"in ne&&t(14,I=ne.id),"$$scope"in ne&&t(19,i=ne.$$scope)},n.$$.update=()=>{n.$$.dirty&32832&&h&&j&&te()},[o,l,s,u,c,f,h,m,_,y,w,A,E,T,I,j,q,W,a,i,r,Q,oe,ie,K,G]}class M5 extends Re{constructor(e){super(),Ve(this,e,hRe,dRe,Oe,{icon:0,withArrow:1,withActions:2,indentLevel:3,text:4,border:5,selected:6,opened:7,draggable:8,iconText:9,iconColor:10,scrollable:11,highlighted:12,rightAlignIcon:13,id:14})}}function HO(n,e,t){const r=n.slice();return r[22]=e[t],r}function BO(n){let e,t;return e=new Fu({props:{$$slots:{control:[_Re],default:[vRe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&33554438&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function OO(n){let e,t;return e=new pi({props:{icon:"Edit",$$slots:{default:[mRe]},$$scope:{ctx:n}}}),e.$on("click",function(){Mn(n[2].show)&&n[2].show.apply(this,arguments)}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){n=r;const a={};i&33554432&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function mRe(n){let e;return{c(){e=le("Edit")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function gRe(n){let e;return{c(){e=le("Delete")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function vRe(n){let e,t,r,i=!n[1]&&OO(n);return t=new pi({props:{icon:"Delete",$$slots:{default:[gRe]},$$scope:{ctx:n}}}),t.$on("click",n[9]),{c(){i&&i.c(),e=U(),O(t.$$.fragment)},m(a,o){i&&i.m(a,o),C(a,e,o),H(t,a,o),r=!0},p(a,o){a[1]?i&&(we(),$(i,1,1,()=>{i=null}),ke()):i?(i.p(a,o),o&2&&b(i,1)):(i=OO(a),i.c(),b(i,1),i.m(e.parentNode,e));const l={};o&33554432&&(l.$$scope={dirty:o,ctx:a}),t.$set(l)},i(a){r||(b(i),b(t.$$.fragment,a),r=!0)},o(a){$(i),$(t.$$.fragment,a),r=!1},d(a){i&&i.d(a),a&&M(e),B(t,a)}}}function _Re(n){let e,t,r;return t=new dn({props:{s:!0,hoverable:!0,name:"MoreSmallList"}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"slot","control"),D(e,"class","icon svelte-1ogygrq")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p:mt,i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function bRe(n){let e,t,r;function i(o){n[14](o)}let a={label:"Table Name",thin:!0,error:n[4]};return n[0].name!==void 0&&(a.value=n[0].name),e=new En({props:a}),He.push(()=>nt(e,"value",i)),e.$on("input",n[13]),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){const s={};l&16&&(s.error=o[4]),!t&&l&1&&(t=!0,s.value=o[0].name,rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function yRe(n){let e,t;return e=new _r({props:{title:"Edit Table",confirmText:"Save",onConfirm:n[12],disabled:n[0].name===n[8]||n[4],$$slots:{default:[bRe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&17&&(a.disabled=r[0].name===r[8]||r[4]),i&33554449&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function IO(n){let e,t=n[22]+"",r;return{c(){e=J("div"),r=le(t),D(e,"class","svelte-1ogygrq")},m(i,a){C(i,e,a),x(e,r)},p(i,a){a&32&&t!==(t=i[22]+"")&&_t(r,t)},d(i){i&&M(e)}}}function $Re(n){let e,t,r,i=n[0].name+"",a,o,l,s,u,c,f,h,m,_,y,w,A=n[5],E=[];for(let P=0;P<A.length;P+=1)E[P]=IO(HO(n,A,P));function T(P){n[16](P)}let I={placeholder:n[0].name,dataCy:"delete-table-confirm"};return n[6]!==void 0&&(I.value=n[6]),_=new En({props:I}),He.push(()=>nt(_,"value",T)),{c(){e=J("p"),t=le(`Are you sure you wish to delete the table
867
867
  `),r=J("b"),a=le(i),o=le("?"),l=le(`
868
868
  The following will also be deleted:`),s=U(),u=J("b"),c=J("div");for(let P=0;P<E.length;P+=1)E[P].c();f=U(),h=J("p"),h.textContent=`This action cannot be undone - to continue please enter the table name below
869
- to confirm.`,m=U(),O(_.$$.fragment),D(c,"class","delete-items svelte-1ogygrq")},m(P,F){C(P,e,F),x(e,t),x(e,r),x(r,a),x(r,o),x(e,l),C(P,s,F),C(P,u,F),x(u,c);for(let j=0;j<E.length;j+=1)E[j].m(c,null);C(P,f,F),C(P,h,F),C(P,m,F),H(_,P,F),w=!0},p(P,F){if((!w||F&1)&&i!==(i=P[0].name+"")&&_t(a,i),F&32){A=P[5];let q;for(q=0;q<A.length;q+=1){const W=HO(P,A,q);E[q]?E[q].p(W,F):(E[q]=IO(W),E[q].c(),E[q].m(c,null))}for(;q<E.length;q+=1)E[q].d(1);E.length=A.length}const j={};F&1&&(j.placeholder=P[0].name),!y&&F&64&&(y=!0,j.value=P[6],rt(()=>y=!1)),_.$set(j)},i(P){w||(b(_.$$.fragment,P),w=!0)},o(P){$(_.$$.fragment,P),w=!1},d(P){P&&M(e),P&&M(s),P&&M(u),Dn(E,P),P&&M(f),P&&M(h),P&&M(m),B(_,P)}}}function wRe(n){let e,t,r,i,a,o=n[7]&&BO(n),l={$$slots:{default:[yRe]},$$scope:{ctx:n}};t=new ir({props:l}),n[15](t);let s={okText:"Delete Table",onOk:n[10],onCancel:n[11],title:"Confirm Deletion",disabled:n[6]!==n[0].name,$$slots:{default:[$Re]},$$scope:{ctx:n}};return i=new Os({props:s}),n[17](i),{c(){o&&o.c(),e=U(),O(t.$$.fragment),r=U(),O(i.$$.fragment)},m(u,c){o&&o.m(u,c),C(u,e,c),H(t,u,c),C(u,r,c),H(i,u,c),a=!0},p(u,[c]){u[7]?o?(o.p(u,c),c&128&&b(o,1)):(o=BO(u),o.c(),b(o,1),o.m(e.parentNode,e)):o&&(we(),$(o,1,1,()=>{o=null}),ke());const f={};c&33554449&&(f.$$scope={dirty:c,ctx:u}),t.$set(f);const h={};c&65&&(h.disabled=u[6]!==u[0].name),c&33554529&&(h.$$scope={dirty:c,ctx:u}),i.$set(h)},i(u){a||(b(o),b(t.$$.fragment,u),b(i.$$.fragment,u),a=!0)},o(u){$(o),$(t.$$.fragment,u),$(i.$$.fragment,u),a=!1},d(u){o&&o.d(u),u&&M(e),n[15](null),B(t,u),u&&M(r),n[17](null),B(i,u)}}}function kRe(n,e,t){let r,i,a,o,l;Ne(n,si,W=>t(19,a=W)),Ne(n,Hr,W=>t(20,o=W)),Ne(n,Xt,W=>t(21,l=W));let{table:s}=e,u,c,f="",h=s.name,m,_,y;function w(){m=l.screens.filter(W=>W.autoTableId===s._id),t(5,_=["All table data"].concat(m.map(W=>`Screen ${W.props._instanceName}`))),c.show()}async function A(){const W=o.selected;try{await Hr.delete(s),await Xt.actions.screens.delete(m),await Hr.fetch(),s.type==="external"&&await Di.fetch(),yt.success("Table deleted"),W&&W._id===s._id&&a("./table")}catch{yt.error("Error deleting table")}}function E(){t(6,y="")}async function T(){await Hr.save(s),yt.success("Table renamed successfully")}function I(W){const te=W.target.value;t(4,f=h===te?`Table with name ${te} already exists. Please choose another name.`:"")}function P(W){n.$$.not_equal(s.name,W)&&(s.name=W,t(0,s))}function F(W){He[W?"unshift":"push"](()=>{u=W,t(2,u)})}function j(W){y=W,t(6,y)}function q(W){He[W?"unshift":"push"](()=>{c=W,t(3,c)})}return n.$$set=W=>{"table"in W&&t(0,s=W.table)},n.$$.update=()=>{n.$$.dirty&1&&t(1,r=(s==null?void 0:s.type)==="external"),n.$$.dirty&3&&t(7,i=!r||(s==null?void 0:s.created))},[s,r,u,c,f,_,y,i,h,w,A,E,T,I,P,F,j,q]}class zRe extends Re{constructor(e){super(),Ve(this,e,kRe,wRe,Oe,{table:0})}}function ARe(n){let e;return{c(){e=le("Edit")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function MRe(n){let e;return{c(){e=le("Delete")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function CRe(n){let e,t,r,i;return e=new pi({props:{icon:"Edit",$$slots:{default:[ARe]},$$scope:{ctx:n}}}),e.$on("click",function(){Mn(n[1].show)&&n[1].show.apply(this,arguments)}),r=new pi({props:{icon:"Delete",$$slots:{default:[MRe]},$$scope:{ctx:n}}}),r.$on("click",function(){Mn(n[2].show)&&n[2].show.apply(this,arguments)}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,o){n=a;const l={};o&1024&&(l.$$scope={dirty:o,ctx:n}),e.$set(l);const s={};o&1024&&(s.$$scope={dirty:o,ctx:n}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function SRe(n){let e,t,r;return t=new dn({props:{s:!0,hoverable:!0,name:"MoreSmallList"}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"slot","control"),D(e,"class","icon open-popover")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p:mt,i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function LRe(n){let e,t,r;function i(o){n[5](o)}let a={label:"View Name",thin:!0};return n[0].name!==void 0&&(a.value=n[0].name),e=new En({props:a}),He.push(()=>nt(e,"value",i)),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){const s={};!t&&l&1&&(t=!0,s.value=o[0].name,rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function ERe(n){let e,t;return e=new _r({props:{title:"Edit View",onConfirm:n[3],confirmText:"Save",$$slots:{default:[LRe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&1025&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function TRe(n){let e,t,r,i,a,o;e=new Fu({props:{$$slots:{control:[SRe],default:[CRe]},$$scope:{ctx:n}}});let l={$$slots:{default:[ERe]},$$scope:{ctx:n}};r=new ir({props:l}),n[6](r);let s={body:`Are you sure you wish to delete the view '${n[0].name}'? Your data will be deleted and this action cannot be undone.`,okText:"Delete View",onOk:n[4],title:"Confirm Deletion"};return a=new Os({props:s}),n[7](a),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),O(a.$$.fragment)},m(u,c){H(e,u,c),C(u,t,c),H(r,u,c),C(u,i,c),H(a,u,c),o=!0},p(u,[c]){const f={};c&1030&&(f.$$scope={dirty:c,ctx:u}),e.$set(f);const h={};c&1025&&(h.$$scope={dirty:c,ctx:u}),r.$set(h);const m={};c&1&&(m.body=`Are you sure you wish to delete the view '${u[0].name}'? Your data will be deleted and this action cannot be undone.`),a.$set(m)},i(u){o||(b(e.$$.fragment,u),b(r.$$.fragment,u),b(a.$$.fragment,u),o=!0)},o(u){$(e.$$.fragment,u),$(r.$$.fragment,u),$(a.$$.fragment,u),o=!1},d(u){B(e,u),u&&M(t),n[6](null),B(r,u),u&&M(i),n[7](null),B(a,u)}}}function DRe(n,e,t){let r;Ne(n,si,m=>t(8,r=m));let{view:i}=e,a,o=i.name,l;async function s(){await Ru.save({originalName:o,...i}),yt.success("View renamed successfully")}async function u(){try{const m=i.name,_=i.tableId;await Ru.delete(m),yt.success("View deleted"),r(`./table/${_}`)}catch{yt.error("Error deleting view")}}function c(m){n.$$.not_equal(i.name,m)&&(i.name=m,t(0,i))}function f(m){He[m?"unshift":"push"](()=>{a=m,t(1,a)})}function h(m){He[m?"unshift":"push"](()=>{l=m,t(2,l)})}return n.$$set=m=>{"view"in m&&t(0,i=m.view)},[i,a,l,s,u,c,f,h]}class HRe extends Re{constructor(e){super(),Ve(this,e,DRe,TRe,Oe,{view:0})}}function PO(n,e,t){const r=n.slice();return r[13]=e[t],r[15]=t,r}function VO(n,e,t){const r=n.slice();return r[16]=e[t],r[15]=t,r}function RO(n){let e,t,r=n[2],i=[];for(let o=0;o<r.length;o+=1)i[o]=jO(PO(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){e=J("div");for(let o=0;o<i.length;o+=1)i[o].c();D(e,"class","hierarchy-items-container")},m(o,l){C(o,e,l);for(let s=0;s<i.length;s+=1)i[s].m(e,null);t=!0},p(o,l){if(l&55){r=o[2];let s;for(s=0;s<r.length;s+=1){const u=PO(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=jO(u),i[s].c(),b(i[s],1),i[s].m(e,null))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){o&&M(e),Dn(i,o)}}}function NO(n){let e,t;return e=new zRe({props:{table:n[13]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4&&(a.table=r[13]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function BRe(n){let e,t,r=n[13]._id!==z4.USERS&&NO(n);return{c(){r&&r.c(),e=$t()},m(i,a){r&&r.m(i,a),C(i,e,a),t=!0},p(i,a){i[13]._id!==z4.USERS?r?(r.p(i,a),a&4&&b(r,1)):(r=NO(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(i){t||(b(r),t=!0)},o(i){$(r),t=!1},d(i){r&&r.d(i),i&&M(e)}}}function ORe(n){let e,t,r;return e=new HRe({props:{view:{name:n[16],...n[13].views[n[16]]}}}),{c(){O(e.$$.fragment),t=U()},m(i,a){H(e,i,a),C(i,t,a),r=!0},p(i,a){const o={};a&4&&(o.view={name:i[16],...i[13].views[i[16]]}),e.$set(o)},i(i){r||(b(e.$$.fragment,i),r=!0)},o(i){$(e.$$.fragment,i),r=!1},d(i){B(e,i),i&&M(t)}}}function FO(n,e){let t,r,i;function a(){return e[9](e[13],e[16])}return r=new M5({props:{indentLevel:2,icon:"Remove",text:e[16],selected:e[1]===e[16],$$slots:{default:[ORe]},$$scope:{ctx:e}}}),r.$on("click",a),{key:n,first:null,c(){t=$t(),O(r.$$.fragment),this.first=t},m(o,l){C(o,t,l),H(r,o,l),i=!0},p(o,l){e=o;const s={};l&4&&(s.text=e[16]),l&6&&(s.selected=e[1]===e[16]),l&262148&&(s.$$scope={dirty:l,ctx:e}),r.$set(s)},i(o){i||(b(r.$$.fragment,o),i=!0)},o(o){$(r.$$.fragment,o),i=!1},d(o){o&&M(t),B(r,o)}}}function jO(n){var c;let e,t,r=[],i=new Map,a,o;function l(){return n[8](n[13])}e=new M5({props:{indentLevel:1,border:n[15]>0,icon:n[13]._id===z4.USERS?"UserGroup":"Table",text:n[13].name,selected:((c=n[0].selected)==null?void 0:c._id)===n[13]._id,$$slots:{default:[BRe]},$$scope:{ctx:n}}}),e.$on("click",l);let s=[...Object.keys(n[13].views||{})].sort();const u=f=>f[15];for(let f=0;f<s.length;f+=1){let h=VO(n,s,f),m=u(h);i.set(m,r[f]=FO(m,h))}return{c(){O(e.$$.fragment),t=U();for(let f=0;f<r.length;f+=1)r[f].c();a=$t()},m(f,h){H(e,f,h),C(f,t,h);for(let m=0;m<r.length;m+=1)r[m].m(f,h);C(f,a,h),o=!0},p(f,h){var _;n=f;const m={};h&4&&(m.icon=n[13]._id===z4.USERS?"UserGroup":"Table"),h&4&&(m.text=n[13].name),h&5&&(m.selected=((_=n[0].selected)==null?void 0:_._id)===n[13]._id),h&262148&&(m.$$scope={dirty:h,ctx:n}),e.$set(m),h&38&&(s=[...Object.keys(n[13].views||{})].sort(),we(),r=Il(r,h,u,1,n,s,i,a.parentNode,Mc,FO,a,VO),ke())},i(f){if(!o){b(e.$$.fragment,f);for(let h=0;h<s.length;h+=1)b(r[h]);o=!0}},o(f){$(e.$$.fragment,f);for(let h=0;h<r.length;h+=1)$(r[h]);o=!1},d(f){B(e,f),f&&M(t);for(let h=0;h<r.length;h+=1)r[h].d(f);f&&M(a)}}}function IRe(n){var i;let e,t,r=((i=n[3])==null?void 0:i._id)&&RO(n);return{c(){r&&r.c(),e=$t()},m(a,o){r&&r.m(a,o),C(a,e,o),t=!0},p(a,[o]){var l;(l=a[3])!=null&&l._id?r?(r.p(a,o),o&8&&b(r,1)):(r=RO(a),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(a){t||(b(r),t=!0)},o(a){$(r),t=!1},d(a){r&&r.d(a),a&&M(e)}}}function PRe(n,e,t){let r,i,a,o,l,s;Ne(n,si,w=>t(10,a=w)),Ne(n,Hr,w=>t(0,o=w)),Ne(n,Ru,w=>t(7,l=w)),Ne(n,xd,w=>t(3,s=w));const u=(w,A)=>{var E,T;return((E=w.name)==null?void 0:E.toLowerCase())>((T=A.name)==null?void 0:T.toLowerCase())};let{sourceId:c}=e;function f(w){Hr.select(w),a(`./table/${w._id}`)}function h(w){Ru.select(w),a(`./view/${w.name}`)}function m(w,A){r!==A&&h({name:A,...w.views[A]})}const _=w=>f(w),y=(w,A)=>m(w,A);return n.$$set=w=>{"sourceId"in w&&t(6,c=w.sourceId)},n.$$.update=()=>{n.$$.dirty&128&&t(1,r=l.selected&&l.selected.name),n.$$.dirty&65&&t(2,i=o.list.filter(w=>w.sourceId===c).sort(u))},[o,r,i,s,f,m,c,l,_,y]}class VRe extends Re{constructor(e){super(),Ve(this,e,PRe,IRe,Oe,{sourceId:6})}}function xO(n,e,t){const r=n.slice();return r[18]=e[t],r[20]=t,r}function UO(n,e,t){const r=n.slice();return r[21]=e[t],r}function qO(n){let e,t,r=n[0],i=[];for(let o=0;o<r.length;o+=1)i[o]=KO(xO(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){e=J("div");for(let o=0;o<i.length;o+=1)i[o].c();D(e,"class","hierarchy-items-container")},m(o,l){C(o,e,l);for(let s=0;s<i.length;s+=1)i[s].m(e,null);t=!0},p(o,l){if(l&61){r=o[0];let s;for(s=0;s<r.length;s+=1){const u=xO(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=KO(u),i[s].c(),b(i[s],1),i[s].m(e,null))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){o&&M(e),Dn(i,o)}}}function WO(n){let e,t;return e=new eRe({props:{datasource:n[18]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&1&&(a.datasource=r[18]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function RRe(n){let e,t,r=n[18]._id!==Q$&&WO(n);return{c(){r&&r.c(),e=$t()},m(i,a){r&&r.m(i,a),C(i,e,a),t=!0},p(i,a){i[18]._id!==Q$?r?(r.p(i,a),a&1&&b(r,1)):(r=WO(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(i){t||(b(r),t=!0)},o(i){$(r),t=!1},d(i){r&&r.d(i),i&&M(e)}}}function NRe(n){let e,t,r;return t=new QK({props:{integrationType:n[18].source,schema:n[18].schema,size:"18"}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","datasource-icon svelte-11am1jd"),D(e,"slot","icon")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a&1&&(o.integrationType=i[18].source),a&1&&(o.schema=i[18].schema),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function GO(n){let e,t,r,i;e=new VRe({props:{sourceId:n[18]._id}});function a(...u){return n[11](n[18],...u)}let o=n[2].list.filter(a),l=[];for(let u=0;u<o.length;u+=1)l[u]=YO(UO(n,o,u));const s=u=>$(l[u],1,1,()=>{l[u]=null});return{c(){O(e.$$.fragment),t=U();for(let u=0;u<l.length;u+=1)l[u].c();r=$t()},m(u,c){H(e,u,c),C(u,t,c);for(let f=0;f<l.length;f+=1)l[f].m(u,c);C(u,r,c),i=!0},p(u,c){n=u;const f={};if(c&1&&(f.sourceId=n[18]._id),e.$set(f),c&21){o=n[2].list.filter(a);let h;for(h=0;h<o.length;h+=1){const m=UO(n,o,h);l[h]?(l[h].p(m,c),b(l[h],1)):(l[h]=YO(m),l[h].c(),b(l[h],1),l[h].m(r.parentNode,r))}for(we(),h=o.length;h<l.length;h+=1)s(h);ke()}},i(u){if(!i){b(e.$$.fragment,u);for(let c=0;c<o.length;c+=1)b(l[c]);i=!0}},o(u){$(e.$$.fragment,u),l=l.filter(Boolean);for(let c=0;c<l.length;c+=1)$(l[c]);i=!1},d(u){B(e,u),u&&M(t),Dn(l,u),u&&M(r)}}}function FRe(n){let e,t,r;return e=new sRe({props:{query:n[21],onClickQuery:n[4]}}),{c(){O(e.$$.fragment),t=U()},m(i,a){H(e,i,a),C(i,t,a),r=!0},p(i,a){const o={};a&5&&(o.query=i[21]),e.$set(o)},i(i){r||(b(e.$$.fragment,i),r=!0)},o(i){$(e.$$.fragment,i),r=!1},d(i){B(e,i),i&&M(t)}}}function YO(n){let e,t;function r(){return n[12](n[21])}return e=new M5({props:{indentLevel:1,icon:"SQLQuery",iconText:oB(n[18],n[21]),iconColor:lB(n[18],n[21]),text:sB(n[18],n[21]),opened:n[2].selected===n[21]._id,selected:n[2].selected===n[21]._id,$$slots:{default:[FRe]},$$scope:{ctx:n}}}),e.$on("click",r),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){n=i;const o={};a&5&&(o.iconText=oB(n[18],n[21])),a&5&&(o.iconColor=lB(n[18],n[21])),a&5&&(o.text=sB(n[18],n[21])),a&5&&(o.opened=n[2].selected===n[21]._id),a&5&&(o.selected=n[2].selected===n[21]._id),a&16777221&&(o.$$scope={dirty:a,ctx:n}),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function KO(n){let e,t,r,i;function a(){return n[9](n[18])}function o(){return n[10](n[18])}e=new M5({props:{border:n[20]>0,text:n[18].name,opened:n[18].open,selected:n[18].selected,withArrow:!0,$$slots:{icon:[NRe],default:[RRe]},$$scope:{ctx:n}}}),e.$on("click",a),e.$on("iconClick",o);let l=n[18].open&&GO(n);return{c(){O(e.$$.fragment),t=U(),l&&l.c(),r=$t()},m(s,u){H(e,s,u),C(s,t,u),l&&l.m(s,u),C(s,r,u),i=!0},p(s,u){n=s;const c={};u&1&&(c.text=n[18].name),u&1&&(c.opened=n[18].open),u&1&&(c.selected=n[18].selected),u&16777217&&(c.$$scope={dirty:u,ctx:n}),e.$set(c),n[18].open?l?(l.p(n,u),u&1&&b(l,1)):(l=GO(n),l.c(),b(l,1),l.m(r.parentNode,r)):l&&(we(),$(l,1,1,()=>{l=null}),ke())},i(s){i||(b(e.$$.fragment,s),b(l),i=!0)},o(s){$(e.$$.fragment,s),$(l),i=!1},d(s){B(e,s),s&&M(t),l&&l.d(s),s&&M(r)}}}function jRe(n){var i;let e,t,r=((i=n[1])==null?void 0:i._id)&&qO(n);return{c(){r&&r.c(),e=$t()},m(a,o){r&&r.m(a,o),C(a,e,o),t=!0},p(a,[o]){var l;(l=a[1])!=null&&l._id?r?(r.p(a,o),o&2&&b(r,1)):(r=qO(a),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(a){t||(b(r),t=!0)},o(a){$(r),t=!1},d(a){r&&r.d(a),a&&M(e)}}}function xRe(n,e,t){let r,i,a,o,l,s,u;Ne(n,Cc,P=>t(13,a=P)),Ne(n,si,P=>t(14,o=P)),Ne(n,Di,P=>t(8,l=P)),Ne(n,xd,P=>t(1,s=P)),Ne(n,ya,P=>t(2,u=P));let c=[];function f(P){_(P),Di.select(P._id),o(`./datasource/${P._id}`)}function h(P){ya.select(P),o(`./datasource/${P.datasourceId}/${P._id}`)}function m(P){t(6,c=c.filter(F=>P._id!==F))}function _(P){c.includes(P._id)||t(6,c=[...c,P._id])}function y(P){c.includes(P._id)?m(P):_(P)}ar(async()=>{try{await Di.fetch(),await ya.fetch()}catch{yt.error("Error fetching datasources and queries")}});const w=P=>{var W,te;if(a.selectedDatasource===P._id)return!0;if(!P.entities)return!1;let F=P.entities;if(Array.isArray(F)||(F=Object.values(F)),a.selectedTable){const Q=(W=pn(Hr).selected)==null?void 0:W._id;return F.find(oe=>oe._id===Q)!=null}const j=(te=pn(Ru).selected)==null?void 0:te.name;return F.find(Q=>{var oe;return((oe=Q.views)==null?void 0:oe[j])!=null})!=null},A=P=>f(P),E=P=>y(P),T=(P,F)=>F.datasourceId===P._id,I=P=>h(P);return n.$$.update=()=>{n.$$.dirty&320&&t(0,r=Array.isArray(l.list)?l.list.map(P=>{const F=l.selected===P._id,j=c.includes(P._id),q=w(P),W=l.list.length===1;return{...P,selected:F,open:F||j||q||W}}):[]),n.$$.dirty&1&&t(7,i=r.find(P=>P.open)),n.$$.dirty&128&&i&&_(i)},[r,s,u,f,h,y,c,i,l,A,E,T,I]}class URe extends Re{constructor(e){super(),Ve(this,e,xRe,jRe,Oe,{})}}function qRe(n){let e,t,r,i,a;e=new URe({});function o(s){n[5](s)}let l={};return n[0]!==void 0&&(l.modal=n[0]),r=new tX({props:l}),He.push(()=>nt(r,"modal",o)),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(s,u){H(e,s,u),C(s,t,u),H(r,s,u),a=!0},p(s,u){const c={};!i&&u&1&&(i=!0,c.modal=s[0],rt(()=>i=!1)),r.$set(c)},i(s){a||(b(e.$$.fragment,s),b(r.$$.fragment,s),a=!0)},o(s){$(e.$$.fragment,s),$(r.$$.fragment,s),a=!1},d(s){B(e,s),s&&M(t),B(r,s)}}}function WRe(n){let e,t;return e=new F1({props:{title:"Sources",$$slots:{default:[qRe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&65&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function XO(n){let e,t;return e=new dn({props:{hoverable:!0,name:"AddCircle"}}),e.$on("click",function(){Mn(n[0].show)&&n[0].show.apply(this,arguments)}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){n=r},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function GRe(n){let e,t,r,i,a,o,l,s,u;r=new Y2({props:{selected:YRe,$$slots:{default:[WRe]},$$scope:{ctx:n}}}),r.$on("select",n[2]);let c=n[0]&&XO(n);const f=n[4].default,h=Xn(f,n,n[6],null);return{c(){e=J("div"),t=J("div"),O(r.$$.fragment),i=U(),a=J("div"),c&&c.c(),l=U(),s=J("div"),h&&h.c(),D(a,"class","add-button svelte-1oe3r6d"),D(a,"data-cy",o=`new-${n[1]?"datasource":"table"}`),D(t,"class","nav svelte-1oe3r6d"),D(s,"class","content svelte-1oe3r6d"),D(e,"class","root svelte-1oe3r6d")},m(m,_){C(m,e,_),x(e,t),H(r,t,null),x(t,i),x(t,a),c&&c.m(a,null),x(e,l),x(e,s),h&&h.m(s,null),u=!0},p(m,[_]){const y={};_&65&&(y.$$scope={dirty:_,ctx:m}),r.$set(y),m[0]?c?(c.p(m,_),_&1&&b(c,1)):(c=XO(m),c.c(),b(c,1),c.m(a,null)):c&&(we(),$(c,1,1,()=>{c=null}),ke()),(!u||_&2&&o!==(o=`new-${m[1]?"datasource":"table"}`))&&D(a,"data-cy",o),h&&h.p&&(!u||_&64)&&Zn(h,f,m,m[6],u?Jn(f,m[6],_,null):Qn(m[6]),null)},i(m){u||(b(r.$$.fragment,m),b(c),b(h,m),u=!0)},o(m){$(r.$$.fragment,m),$(c),$(h,m),u=!1},d(m){m&&M(e),B(r),c&&c.d(),h&&h.d(m)}}}let YRe="Sources";function KRe(n,e,t){let r,i,a;Ne(n,ua,f=>t(7,i=f)),Ne(n,Cc,f=>t(3,a=f));let{$$slots:o={},$$scope:l}=e,s;function u(){i("./table")}function c(f){s=f,t(0,s)}return n.$$set=f=>{"$$scope"in f&&t(6,l=f.$$scope)},n.$$.update=()=>{n.$$.dirty&8&&t(1,r=a.selectedDatasource&&a.selectedDatasource!==Q$)},[s,r,u,a,o,c,l]}class XRe extends Re{constructor(e){super(),Ve(this,e,KRe,GRe,Oe,{})}}function JRe(n,e,t){let r;return Ne(n,ua,i=>t(0,r=i)),r("../screens"),[]}class ZRe extends Re{constructor(e){super(),Ve(this,e,JRe,null,Oe,{})}}class QRe extends Re{constructor(e){super(),Ve(this,e,null,null,Oe,{})}}function JO(n){let e,t;return e=new dn({props:{name:"ArrowLeft",hoverable:!0}}),e.$on("click",function(){Mn(n[7])&&n[7].apply(this,arguments)}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){n=r},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function ZO(n){let e,t;return e=new dn({props:{name:n[1]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2&&(a.name=r[1]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function eNe(n){let e=(n[0]||"")+"",t;return{c(){t=le(e)},m(r,i){C(r,t,i)},p(r,i){i&1&&e!==(e=(r[0]||"")+"")&&_t(t,e)},d(r){r&&M(t)}}}function QO(n){let e,t;return e=new dn({props:{name:n[11]?"Minimize":"Maximize",hoverable:!0}}),e.$on("click",n[13]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2048&&(a.name=r[11]?"Minimize":"Maximize"),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function eI(n){let e,t,r,i,a;return t=new dn({props:{name:"Add"}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","add-button svelte-1bxbycf")},m(o,l){C(o,e,l),H(t,e,null),r=!0,i||(a=At(e,"click",function(){Mn(n[6])&&n[6].apply(this,arguments)}),i=!0)},p(o,l){n=o},i(o){r||(b(t.$$.fragment,o),r=!0)},o(o){$(t.$$.fragment,o),r=!1},d(o){o&&M(e),B(t),i=!1,a()}}}function tI(n){let e,t;return e=new dn({props:{name:"Close",hoverable:!0}}),e.$on("click",function(){Mn(n[8])&&n[8].apply(this,arguments)}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){n=r},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function tNe(n){let e,t,r,i,a,o,l,s,u,c,f,h,m=n[4]&&JO(n),_=n[1]&&ZO(n);o=new Rn({props:{size:"XXS",$$slots:{default:[eNe]},$$scope:{ctx:n}}});let y=n[2]&&QO(n),w=n[3]&&eI(n),A=n[5]&&tI(n);const E=n[12].default,T=Xn(E,n,n[14],null);return{c(){e=J("div"),t=J("div"),m&&m.c(),r=U(),_&&_.c(),i=U(),a=J("div"),O(o.$$.fragment),l=U(),y&&y.c(),s=U(),w&&w.c(),u=U(),A&&A.c(),c=U(),f=J("div"),T&&T.c(),D(a,"class","title svelte-1bxbycf"),D(t,"class","header svelte-1bxbycf"),D(f,"class","body svelte-1bxbycf"),D(e,"class","panel svelte-1bxbycf"),De(e,"wide",n[11]),De(e,"borderLeft",n[9]),De(e,"borderRight",n[10])},m(I,P){C(I,e,P),x(e,t),m&&m.m(t,null),x(t,r),_&&_.m(t,null),x(t,i),x(t,a),H(o,a,null),x(t,l),y&&y.m(t,null),x(t,s),w&&w.m(t,null),x(t,u),A&&A.m(t,null),x(e,c),x(e,f),T&&T.m(f,null),h=!0},p(I,[P]){I[4]?m?(m.p(I,P),P&16&&b(m,1)):(m=JO(I),m.c(),b(m,1),m.m(t,r)):m&&(we(),$(m,1,1,()=>{m=null}),ke()),I[1]?_?(_.p(I,P),P&2&&b(_,1)):(_=ZO(I),_.c(),b(_,1),_.m(t,i)):_&&(we(),$(_,1,1,()=>{_=null}),ke());const F={};P&16385&&(F.$$scope={dirty:P,ctx:I}),o.$set(F),I[2]?y?(y.p(I,P),P&4&&b(y,1)):(y=QO(I),y.c(),b(y,1),y.m(t,s)):y&&(we(),$(y,1,1,()=>{y=null}),ke()),I[3]?w?(w.p(I,P),P&8&&b(w,1)):(w=eI(I),w.c(),b(w,1),w.m(t,u)):w&&(we(),$(w,1,1,()=>{w=null}),ke()),I[5]?A?(A.p(I,P),P&32&&b(A,1)):(A=tI(I),A.c(),b(A,1),A.m(t,null)):A&&(we(),$(A,1,1,()=>{A=null}),ke()),T&&T.p&&(!h||P&16384)&&Zn(T,E,I,I[14],h?Jn(E,I[14],P,null):Qn(I[14]),null),P&2048&&De(e,"wide",I[11]),P&512&&De(e,"borderLeft",I[9]),P&1024&&De(e,"borderRight",I[10])},i(I){h||(b(m),b(_),b(o.$$.fragment,I),b(y),b(w),b(A),b(T,I),h=!0)},o(I){$(m),$(_),$(o.$$.fragment,I),$(y),$(w),$(A),$(T,I),h=!1},d(I){I&&M(e),m&&m.d(),_&&_.d(),B(o),y&&y.d(),w&&w.d(),A&&A.d(),T&&T.d(I)}}}function nNe(n,e,t){let{$$slots:r={},$$scope:i}=e,{title:a}=e,{icon:o}=e,{expandable:l=!1}=e,{showAddButton:s=!1}=e,{showBackButton:u=!1}=e,{showCloseButton:c=!1}=e,{onClickAddButton:f}=e,{onClickBackButton:h}=e,{onClickCloseButton:m}=e,{borderLeft:_=!1}=e,{borderRight:y=!1}=e,w=!1;const A=()=>t(11,w=!w);return n.$$set=E=>{"title"in E&&t(0,a=E.title),"icon"in E&&t(1,o=E.icon),"expandable"in E&&t(2,l=E.expandable),"showAddButton"in E&&t(3,s=E.showAddButton),"showBackButton"in E&&t(4,u=E.showBackButton),"showCloseButton"in E&&t(5,c=E.showCloseButton),"onClickAddButton"in E&&t(6,f=E.onClickAddButton),"onClickBackButton"in E&&t(7,h=E.onClickBackButton),"onClickCloseButton"in E&&t(8,m=E.onClickCloseButton),"borderLeft"in E&&t(9,_=E.borderLeft),"borderRight"in E&&t(10,y=E.borderRight),"$$scope"in E&&t(14,i=E.$$scope)},[a,o,l,s,u,c,f,h,m,_,y,w,r,A,i]}class W3 extends Re{constructor(e){super(),Ve(this,e,nNe,tNe,Oe,{title:0,icon:1,expandable:2,showAddButton:3,showBackButton:4,showCloseButton:5,onClickAddButton:6,onClickBackButton:7,onClickCloseButton:8,borderLeft:9,borderRight:10})}}const rNe=[{name:"Blocks",icon:"Article",children:["tableblock","cardsblock","repeaterblock","formblock"]},{name:"Layout",icon:"ClassicGridView",children:["container","section"]},{name:"Data",icon:"Data",children:["dataprovider","repeater","table","dynamicfilter","daterangepicker"]},{name:"Basic",icon:"TextParagraph",children:["heading","text","button","tag","spectrumcard","cardstat","divider","image","link","icon","embed","markdownviewer","backgroundimage","embeddedmap"]},{name:"Form",icon:"Form",children:["form","formstep","fieldgroup","stringfield","numberfield","passwordfield","optionsfield","booleanfield","longformfield","attachmentfield","jsonfield","relationshipfield","datetimefield","multifieldselect","s3upload","codescanner"]},{name:"Chart",icon:"GraphBarVertical",children:["bar","line","area","candlestick","pie","donut"]}];function nI(n,e,t){const r=n.slice();return r[36]=e[t],r}function rI(n,e,t){const r=n.slice();return r[30]=e[t],r}function iI(n,e,t){const r=n.slice();return r[33]=e[t],r}function aI(n){let e,t;return e=new v7({props:{compact:!0,justified:!0,$$slots:{default:[oNe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&1|i[1]&256&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function iNe(n){let e;return{c(){e=le("Components")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function aNe(n){let e;return{c(){e=le("Blocks")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function oNe(n){let e,t,r,i;return e=new Sr({props:{fullWidth:!0,selected:n[0]==="components",$$slots:{default:[iNe]},$$scope:{ctx:n}}}),e.$on("click",n[18]),r=new Sr({props:{fullWidth:!0,selected:n[0]==="blocks",$$slots:{default:[aNe]},$$scope:{ctx:n}}}),r.$on("click",n[19]),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o[0]&1&&(l.selected=a[0]==="components"),o[1]&256&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o[0]&1&&(s.selected=a[0]==="blocks"),o[1]&256&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function lNe(n){let e,t,r,i;return e=new jt({props:{size:"S",$$slots:{default:[uNe]},$$scope:{ctx:n}}}),r=new Rt({props:{noPadding:!0,gap:"XS",$$slots:{default:[fNe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o[1]&256&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o[0]&32|o[1]&256&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function sNe(n){let e,t,r,i;const a=[dNe,pNe],o=[];function l(s,u){return s[6].length?0:1}return e=l(n),t=o[e]=a[e](n),{c(){t.c(),r=$t()},m(s,u){o[e].m(s,u),C(s,r,u),i=!0},p(s,u){let c=e;e=l(s),e===c?o[e].p(s,u):(we(),$(o[c],1,1,()=>{o[c]=null}),ke(),t=o[e],t?t.p(s,u):(t=o[e]=a[e](s),t.c()),b(t,1),t.m(r.parentNode,r))},i(s){i||(b(t),i=!0)},o(s){$(t),i=!1},d(s){o[e].d(s),s&&M(r)}}}function uNe(n){let e;return{c(){e=le("Blocks are collections of pre-built components")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function cNe(n){let e=n[36].name+"",t;return{c(){t=le(e)},m(r,i){C(r,t,i)},p(r,i){i[0]&32&&e!==(e=r[36].name+"")&&_t(t,e)},d(r){r&&M(t)}}}function oI(n){let e,t,r,i,a,o,l,s;t=new dn({props:{name:n[36].icon}}),i=new jt({props:{size:"XS",$$slots:{default:[cNe]},$$scope:{ctx:n}}});function u(){return n[23](n[36])}function c(){return n[24](n[36])}return{c(){e=J("div"),O(t.$$.fragment),r=U(),O(i.$$.fragment),a=U(),D(e,"draggable","true"),D(e,"class","component svelte-63iy97")},m(f,h){C(f,e,h),H(t,e,null),x(e,r),H(i,e,null),x(e,a),o=!0,l||(s=[At(e,"click",u),At(e,"dragstart",c),At(e,"dragend",n[10])],l=!0)},p(f,h){n=f;const m={};h[0]&32&&(m.name=n[36].icon),t.$set(m);const _={};h[0]&32|h[1]&256&&(_.$$scope={dirty:h,ctx:n}),i.$set(_)},i(f){o||(b(t.$$.fragment,f),b(i.$$.fragment,f),o=!0)},o(f){$(t.$$.fragment,f),$(i.$$.fragment,f),o=!1},d(f){f&&M(e),B(t),B(i),l=!1,Vi(s)}}}function fNe(n){let e,t,r=n[5],i=[];for(let o=0;o<r.length;o+=1)i[o]=oI(nI(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=$t()},m(o,l){for(let s=0;s<i.length;s+=1)i[s].m(o,l);C(o,e,l),t=!0},p(o,l){if(l[0]&1824){r=o[5];let s;for(s=0;s<r.length;s+=1){const u=nI(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=oI(u),i[s].c(),b(i[s],1),i[s].m(e.parentNode,e))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){Dn(i,o),o&&M(e)}}}function pNe(n){let e,t;return e=new jt({props:{size:"S",$$slots:{default:[hNe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[1]&256&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function dNe(n){let e,t,r=n[6],i=[];for(let o=0;o<r.length;o+=1)i[o]=sI(rI(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=$t()},m(o,l){for(let s=0;s<i.length;s+=1)i[s].m(o,l);C(o,e,l),t=!0},p(o,l){if(l[0]&1880){r=o[6];let s;for(s=0;s<r.length;s+=1){const u=rI(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=sI(u),i[s].c(),b(i[s],1),i[s].m(e.parentNode,e))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){Dn(i,o),o&&M(e)}}}function hNe(n){let e;return{c(){e=le("There aren't any components matching the current filter")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function mNe(n){let e=n[33].name+"",t;return{c(){t=le(e)},m(r,i){C(r,t,i)},p(r,i){i[0]&64&&e!==(e=r[33].name+"")&&_t(t,e)},d(r){r&&M(t)}}}function lI(n){let e,t,r,i,a,o,l,s;t=new dn({props:{name:n[33].icon}}),i=new jt({props:{size:"XS",$$slots:{default:[mNe]},$$scope:{ctx:n}}});function u(){return n[20](n[33])}function c(){return n[21](n[33])}return{c(){e=J("div"),O(t.$$.fragment),r=U(),O(i.$$.fragment),D(e,"draggable","true"),D(e,"data-cy",a=`component-${n[33].name}`),D(e,"class","component svelte-63iy97"),De(e,"selected",n[3]===n[4][n[33].component])},m(f,h){C(f,e,h),H(t,e,null),x(e,r),H(i,e,null),o=!0,l||(s=[At(e,"dragstart",u),At(e,"dragend",n[10]),At(e,"click",c),At(e,"mouseover",n[22])],l=!0)},p(f,h){n=f;const m={};h[0]&64&&(m.name=n[33].icon),t.$set(m);const _={};h[0]&64|h[1]&256&&(_.$$scope={dirty:h,ctx:n}),i.$set(_),(!o||h[0]&64&&a!==(a=`component-${n[33].name}`))&&D(e,"data-cy",a),h[0]&88&&De(e,"selected",n[3]===n[4][n[33].component])},i(f){o||(b(t.$$.fragment,f),b(i.$$.fragment,f),o=!0)},o(f){$(t.$$.fragment,f),$(i.$$.fragment,f),o=!1},d(f){f&&M(e),B(t),B(i),l=!1,Vi(s)}}}function gNe(n){let e,t=n[30].name+"",r,i,a,o,l=n[30].children,s=[];for(let c=0;c<l.length;c+=1)s[c]=lI(iI(n,l,c));const u=c=>$(s[c],1,1,()=>{s[c]=null});return{c(){e=J("div"),r=le(t),i=U();for(let c=0;c<s.length;c+=1)s[c].c();a=U(),D(e,"class","category-label svelte-63iy97")},m(c,f){C(c,e,f),x(e,r),C(c,i,f);for(let h=0;h<s.length;h+=1)s[h].m(c,f);C(c,a,f),o=!0},p(c,f){if((!o||f[0]&64)&&t!==(t=c[30].name+"")&&_t(r,t),f[0]&1880){l=c[30].children;let h;for(h=0;h<l.length;h+=1){const m=iI(c,l,h);s[h]?(s[h].p(m,f),b(s[h],1)):(s[h]=lI(m),s[h].c(),b(s[h],1),s[h].m(a.parentNode,a))}for(we(),h=l.length;h<s.length;h+=1)u(h);ke()}},i(c){if(!o){for(let f=0;f<l.length;f+=1)b(s[f]);o=!0}},o(c){s=s.filter(Boolean);for(let f=0;f<s.length;f+=1)$(s[f]);o=!1},d(c){c&&M(e),c&&M(i),Dn(s,c),c&&M(a)}}}function sI(n){let e,t;return e=new Rt({props:{noPadding:!0,gap:"XS",$$slots:{default:[gNe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&88|i[1]&256&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function vNe(n){let e,t,r,i,a,o,l,s;function u(y){n[16](y)}let c={placeholder:"Search",value:n[1]};n[2]!==void 0&&(c.inputRef=n[2]),e=new b5({props:c}),He.push(()=>nt(e,"inputRef",u)),e.$on("change",n[17]);let f=!n[1]&&aI(n);const h=[sNe,lNe],m=[];function _(y,w){return y[1]||y[0]==="components"?0:1}return a=_(n),o=m[a]=h[a](n),{c(){O(e.$$.fragment),r=U(),f&&f.c(),i=U(),o.c(),l=$t()},m(y,w){H(e,y,w),C(y,r,w),f&&f.m(y,w),C(y,i,w),m[a].m(y,w),C(y,l,w),s=!0},p(y,w){const A={};w[0]&2&&(A.value=y[1]),!t&&w[0]&4&&(t=!0,A.inputRef=y[2],rt(()=>t=!1)),e.$set(A),y[1]?f&&(we(),$(f,1,1,()=>{f=null}),ke()):f?(f.p(y,w),w[0]&2&&b(f,1)):(f=aI(y),f.c(),b(f,1),f.m(i.parentNode,i));let E=a;a=_(y),a===E?m[a].p(y,w):(we(),$(m[E],1,1,()=>{m[E]=null}),ke(),o=m[a],o?o.p(y,w):(o=m[a]=h[a](y),o.c()),b(o,1),o.m(l.parentNode,l))},i(y){s||(b(e.$$.fragment,y),b(f),b(o),s=!0)},o(y){$(e.$$.fragment,y),$(f),$(o),s=!1},d(y){B(e,y),y&&M(r),f&&f.d(y),y&&M(i),m[a].d(y),y&&M(l)}}}function _Ne(n){let e,t;return e=new Rt({props:{paddingX:"L",paddingY:"XL",gap:"S",$$slots:{default:[vNe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&127|i[1]&256&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function bNe(n){let e,t,r,i;return t=new W3({props:{title:"Add component",showCloseButton:!0,onClickCloseButton:n[25],borderLeft:!0,$$slots:{default:[_Ne]},$$scope:{ctx:n}}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","container svelte-63iy97")},m(a,o){C(a,e,o),H(t,e,null),i=!0},p(a,o){const l={};o[0]&128&&(l.onClickCloseButton=a[25]),o[0]&127|o[1]&256&&(l.$$scope={dirty:o,ctx:a}),t.$set(l)},i(a){i||(b(t.$$.fragment,a),a&&Po(()=>{r||(r=w0(e,k0,{x:260,duration:300},!0)),r.run(1)}),i=!0)},o(a){$(t.$$.fragment,a),a&&(r||(r=w0(e,k0,{x:260,duration:300},!1)),r.run(0)),i=!1},d(a){a&&M(e),B(t),a&&r&&r.end()}}}function yNe(n,e,t){let r,i,a,o,l,s,u,c;Ne(n,si,se=>t(7,s=se)),Ne(n,Xt,se=>t(14,u=se)),Ne(n,I3,se=>t(15,c=se));let f="components",h,m,_,y=[];const w=se=>{let pe={};return se.forEach((ze,he)=>{pe[ze]=he}),pe},A=(se,pe,ze)=>{let he=[];return ze!=null&&ze.length&&he.push({name:"Plugins",isCategory:!0,children:ze.map($e=>({...pe[$e],name:pe[$e].friendlyName||pe[$e].name})).sort(($e,Ce)=>$e.name.toLowerCase()<Ce.name.toLowerCase()?-1:1)}),se.forEach($e=>{if(typeof $e=="string"){const Ce=pe[`@budibase/standard-components/${$e}`];Ce&&he.push({...Ce,isCategory:!1})}else he.push({...$e,isCategory:!0,children:A($e.children||[],pe)})}),he},E=(se,pe,ze,he)=>{if(t(3,_=he?0:null),t(11,y=[]),!(se!=null&&se.length))return[];he||(se=se.filter(Ce=>Ce.name!=="Blocks"));let $e=[];return se.forEach(Ce=>{let ge=Ce.children.filter(st=>{var ve;const Ae=st.name.toLowerCase();return he&&!Ae.includes(he.toLowerCase())?!1:!((ve=ze==null?void 0:ze.illegalChildren)!=null&&ve.includes(Ae))});ge.length&&($e.push({...Ce,children:ge}),t(11,y=y.concat(ge.map(st=>st.component))))}),se=$e,se},T=async se=>{try{await Xt.actions.components.create(se),s("../")}catch{yt.error("Error creating component")}},I=se=>{if(se.key==="Tab")return _==null?t(3,_=0):t(3,_=(_+1)%y.length),se.preventDefault(),se.stopPropagation(),!1;se.key==="Enter"&&y[_]&&T(y[_])};ar(()=>(m.focus(),window.addEventListener("keydown",I),()=>{window.removeEventListener("keydown",I)}));const P=se=>{Xt.actions.dnd.start(se)},F=()=>{Xt.actions.dnd.stop()};function j(se){m=se,t(2,m)}const q=se=>t(1,h=se.detail),W=()=>t(0,f="components"),te=()=>t(0,f="blocks"),Q=se=>P(se.component),oe=se=>T(se.component),ie=()=>t(3,_=null),K=se=>T(se.component),G=se=>P(se.component),ne=()=>s("../");return n.$$.update=()=>{n.$$.dirty[0]&32768&&t(13,r=Xt.actions.components.getDefinition(c==null?void 0:c._component)),n.$$.dirty[0]&16384&&t(12,i=A(rNe,u.components,u.customComponents)),n.$$.dirty[0]&12291&&t(6,a=E(i,f,r,h)),n.$$.dirty[0]&4096&&t(5,o=i.find(se=>se.name==="Blocks").children),n.$$.dirty[0]&2048&&t(4,l=w(y))},[f,h,m,_,l,o,a,s,T,P,F,y,i,r,u,c,j,q,W,te,Q,oe,ie,K,G,ne]}class $Ne extends Re{constructor(e){super(),Ve(this,e,yNe,bNe,Oe,{},null,[-1,-1])}}function wNe(n){let e,t;return e=new $Ne({}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p:mt,i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}class kNe extends Re{constructor(e){super(),Ve(this,e,null,wNe,Oe,{})}}const Oz=n=>{var j,q,W,te;const{urlParam:e,stateKey:t,validate:r,baseUrl:i="..",fallbackUrl:a,store:o,routify:l,beforeNavigate:s}=n||{};if(!e||!t||!i||!e||!(o!=null&&o.subscribe)||!l||!((j=l.params)!=null&&j.subscribe)||!((q=l.goto)!=null&&q.subscribe)||!((W=l.redirect)!=null&&W.subscribe)||!((te=l.page)!=null&&te.subscribe)){console.warn("syncURLToState invoked with missing parameters");return}let u=pn(l.params),c=pn(l.goto),f=pn(l.redirect),h=pn(l.page),m=null;const _=(Q,oe)=>{if(s){const ie=s(Q,oe);ie!=null&&ie.url&&(Q=ie.url),ie!=null&&ie.params&&(oe=ie.params)}c(Q,oe)},y=Q=>{f(Q)},w=Q=>{var ne;const oe=JSON.stringify(Q),ie=oe!==m;m=oe;const K=Q==null?void 0:Q[e],G=(ne=pn(o))==null?void 0:ne[t];if(!(!ie||!K)){if(r&&a&&!r(K)){y(a);return}K!==G&&o.update(se=>(se[t]=K,se))}},A=Q=>{let oe=!1;const ie=u==null?void 0:u[e],K=Q==null?void 0:Q[t];if(K!==ie&&(oe=!0,r&&a&&!r(K))){y(a);return}if(!!oe&&!pn(a_)){const G={...u,[e]:K};_(h.path,G)}};w(u);const E=l.params.subscribe(Q=>{u=Q,w(Q)}),T=l.goto.subscribe(Q=>{c=Q}),I=l.redirect.subscribe(Q=>{f=Q}),P=l.page.subscribe(Q=>{h=Q}),F=o.subscribe(A);return()=>{E(),T(),I(),P(),F()}};function zNe(n){let e;return{c(){e=le("Delete")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function uI(n){let e,t;return e=new pi({props:{icon:"Export",keyBind:"Ctrl+E",$$slots:{default:[ANe]},$$scope:{ctx:n}}}),e.$on("click",n[7]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&16384&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function ANe(n){let e;return{c(){e=le("Eject block")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function MNe(n){let e;return{c(){e=le("Move up")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function CNe(n){let e;return{c(){e=le("Move down")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function SNe(n){let e;return{c(){e=le("Duplicate")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function LNe(n){let e;return{c(){e=le("Cut")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function ENe(n){let e;return{c(){e=le("Copy")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function TNe(n){let e;return{c(){e=le("Paste")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function DNe(n){let e,t,r,i,a,o,l,s,u,c,f,h,m,_,y;e=new pi({props:{icon:"Delete",keyBind:"!BackAndroid",$$slots:{default:[zNe]},$$scope:{ctx:n}}}),e.$on("click",n[6]);let w=n[0]&&uI(n);return i=new pi({props:{icon:"ChevronUp",keyBind:"Ctrl+!ArrowUp",$$slots:{default:[MNe]},$$scope:{ctx:n}}}),i.$on("click",n[8]),o=new pi({props:{icon:"ChevronDown",keyBind:"Ctrl+!ArrowDown",$$slots:{default:[CNe]},$$scope:{ctx:n}}}),o.$on("click",n[9]),s=new pi({props:{icon:"Duplicate",keyBind:"Ctrl+D",$$slots:{default:[SNe]},$$scope:{ctx:n}}}),s.$on("click",n[10]),c=new pi({props:{icon:"Cut",keyBind:"Ctrl+X",$$slots:{default:[LNe]},$$scope:{ctx:n}}}),c.$on("click",n[11]),h=new pi({props:{icon:"Copy",keyBind:"Ctrl+C",$$slots:{default:[ENe]},$$scope:{ctx:n}}}),h.$on("click",n[12]),_=new pi({props:{icon:"LayersSendToBack",keyBind:"Ctrl+V",disabled:n[1],$$slots:{default:[TNe]},$$scope:{ctx:n}}}),_.$on("click",n[13]),{c(){O(e.$$.fragment),t=U(),w&&w.c(),r=U(),O(i.$$.fragment),a=U(),O(o.$$.fragment),l=U(),O(s.$$.fragment),u=U(),O(c.$$.fragment),f=U(),O(h.$$.fragment),m=U(),O(_.$$.fragment)},m(A,E){H(e,A,E),C(A,t,E),w&&w.m(A,E),C(A,r,E),H(i,A,E),C(A,a,E),H(o,A,E),C(A,l,E),H(s,A,E),C(A,u,E),H(c,A,E),C(A,f,E),H(h,A,E),C(A,m,E),H(_,A,E),y=!0},p(A,E){const T={};E&16384&&(T.$$scope={dirty:E,ctx:A}),e.$set(T),A[0]?w?(w.p(A,E),E&1&&b(w,1)):(w=uI(A),w.c(),b(w,1),w.m(r.parentNode,r)):w&&(we(),$(w,1,1,()=>{w=null}),ke());const I={};E&16384&&(I.$$scope={dirty:E,ctx:A}),i.$set(I);const P={};E&16384&&(P.$$scope={dirty:E,ctx:A}),o.$set(P);const F={};E&16384&&(F.$$scope={dirty:E,ctx:A}),s.$set(F);const j={};E&16384&&(j.$$scope={dirty:E,ctx:A}),c.$set(j);const q={};E&16384&&(q.$$scope={dirty:E,ctx:A}),h.$set(q);const W={};E&2&&(W.disabled=A[1]),E&16384&&(W.$$scope={dirty:E,ctx:A}),_.$set(W)},i(A){y||(b(e.$$.fragment,A),b(w),b(i.$$.fragment,A),b(o.$$.fragment,A),b(s.$$.fragment,A),b(c.$$.fragment,A),b(h.$$.fragment,A),b(_.$$.fragment,A),y=!0)},o(A){$(e.$$.fragment,A),$(w),$(i.$$.fragment,A),$(o.$$.fragment,A),$(s.$$.fragment,A),$(c.$$.fragment,A),$(h.$$.fragment,A),$(_.$$.fragment,A),y=!1},d(A){B(e,A),A&&M(t),w&&w.d(A),A&&M(r),B(i,A),A&&M(a),B(o,A),A&&M(l),B(s,A),A&&M(u),B(c,A),A&&M(f),B(h,A),A&&M(m),B(_,A)}}}function HNe(n){let e,t,r;return t=new dn({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"slot","control"),D(e,"class","icon svelte-u6s22l")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p:mt,i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function BNe(n){let e,t;return e=new Fu({props:{$$slots:{control:[HNe],default:[DNe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&16387&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function ONe(n,e,t){let r,i,a,o;Ne(n,Xt,A=>t(5,o=A));let{component:l}=e;const s=(A,E=!1)=>{document.dispatchEvent(new CustomEvent("component-menu",{detail:{key:A,ctrlKey:E,id:l==null?void 0:l._id}}))},u=()=>s("Delete"),c=()=>s("e",!0),f=()=>s("ArrowUp",!0),h=()=>s("ArrowDown",!0),m=()=>s("d",!0),_=()=>s("x",!0),y=()=>s("c",!0),w=()=>s("v",!0);return n.$$set=A=>{"component"in A&&t(3,l=A.component)},n.$$.update=()=>{n.$$.dirty&8&&t(4,r=Xt.actions.components.getDefinition(l==null?void 0:l._component)),n.$$.dirty&32&&t(1,i=!o.componentToPaste),n.$$.dirty&16&&t(0,a=(r==null?void 0:r.block)===!0)},[a,i,s,l,r,o,u,c,f,h,m,_,y,w]}class INe extends Re{constructor(e){super(),Ve(this,e,ONe,BNe,Oe,{component:3})}}const $c={ABOVE:"above",BELOW:"below",INSIDE:"inside"},cI={source:null,target:null,targetParent:null,dropPosition:null,dragging:!1,valid:!1},PNe=()=>{const n=$i(cI),e={dragstart:t=>{!t||n.set({source:t,target:null,dropPosition:null,dragging:!0,valid:!1})},dragover:({component:t,mousePosition:r})=>{var f,h;const i=Xt.actions.components.getDefinition(t._component),a=i==null?void 0:i.hasChildren,o=((f=t._children)==null?void 0:f.length)>0;let l,s,u;a?r<=.33?l=$c.ABOVE:r>=.66?l=$c.BELOW:l=$c.INSIDE:l=r>.5?$c.BELOW:$c.ABOVE,l===$c.BELOW&&o?(s=t._children[0],l=$c.ABOVE):s=t;const c=pn(n);l===c.dropPosition&&(s==null?void 0:s._id)===((h=c.target)==null?void 0:h._id)||(s&&(u=vc(pn(Ja).props,s._id)),n.update(m=>{var _;return{...m,dropPosition:l,target:s,targetParent:u,valid:((_=k4(m.source,s._id))==null?void 0:_.length)===0}}))},reset:()=>{n.set(cI)},drop:async()=>{const t=pn(n);!t.valid||!t.source||!t.target||(e.reset(),Xt.actions.components.copy(t.source,!0,!1),await Xt.actions.components.paste(t.target,t.dropPosition))}};return{subscribe:n.subscribe,actions:e}},o5=PNe();function fI(n,e,t){const r=n.slice();r[22]=e[t],r[25]=t;const i=r[11](r[22],r[4],r[2]);return r[23]=i,r}function VNe(n){let e,t;return e=new INe({props:{component:n[22]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&8&&(a.component=r[22]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function pI(n){let e,t;return e=new lX({props:{components:n[22]._children,dndStore:o5,level:n[0]+1}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&8&&(a.components=r[22]._children),i&1&&(a.level=r[0]+1),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function dI(n,e){let t,r,i,a,o,l,s,u;function c(){return e[14](e[22])}function f(){return e[15](e[22])}function h(...y){return e[16](e[22],...y)}r=new M5({props:{scrollable:!0,draggable:!0,text:e[6](e[22]),icon:e[7](e[22]),withArrow:e[8](e[22]),indentLevel:e[0]+1,selected:e[1].selectedComponentId===e[22]._id,opened:e[23],highlighted:e[12](e[22]),$$slots:{default:[VNe]},$$scope:{ctx:e}}}),r.$on("dragend",o5.actions.reset),r.$on("dragstart",c),r.$on("dragover",function(){Mn(e[5](e[22],e[25]))&&e[5](e[22],e[25]).apply(this,arguments)}),r.$on("iconClick",f),r.$on("drop",h);let m=e[23]&&pI(e);function _(){return e[17](e[22])}return{key:n,first:null,c(){t=J("li"),O(r.$$.fragment),i=U(),m&&m.c(),a=U(),D(t,"id",o=`component-${e[22]._id}`),D(t,"class","svelte-kv7hxn"),this.first=t},m(y,w){C(y,t,w),H(r,t,null),x(t,i),m&&m.m(t,null),x(t,a),l=!0,s||(u=At(t,"click",i_(_)),s=!0)},p(y,w){e=y;const A={};w&8&&(A.text=e[6](e[22])),w&8&&(A.icon=e[7](e[22])),w&8&&(A.withArrow=e[8](e[22])),w&1&&(A.indentLevel=e[0]+1),w&10&&(A.selected=e[1].selectedComponentId===e[22]._id),w&28&&(A.opened=e[23]),w&8&&(A.highlighted=e[12](e[22])),w&67108872&&(A.$$scope={dirty:w,ctx:e}),r.$set(A),e[23]?m?(m.p(e,w),w&28&&b(m,1)):(m=pI(e),m.c(),b(m,1),m.m(t,a)):m&&(we(),$(m,1,1,()=>{m=null}),ke()),(!l||w&8&&o!==(o=`component-${e[22]._id}`))&&D(t,"id",o)},i(y){l||(b(r.$$.fragment,y),b(m),l=!0)},o(y){$(r.$$.fragment,y),$(m),l=!1},d(y){y&&M(t),B(r),m&&m.d(),s=!1,u()}}}function RNe(n){let e,t=[],r=new Map,i,a=n[3]||[];const o=l=>l[22]._id;for(let l=0;l<a.length;l+=1){let s=fI(n,a,l),u=o(s);r.set(u,t[l]=dI(u,s))}return{c(){e=J("ul");for(let l=0;l<t.length;l+=1)t[l].c();D(e,"class","svelte-kv7hxn")},m(l,s){C(l,e,s);for(let u=0;u<t.length;u+=1)t[u].m(e,null);i=!0},p(l,[s]){s&8191&&(a=l[3]||[],we(),t=Il(t,s,o,1,l,a,r,e,Mc,dI,null,fI),ke())},i(l){if(!i){for(let s=0;s<a.length;s+=1)b(t[s]);i=!0}},o(l){for(let s=0;s<t.length;s+=1)$(t[s]);i=!1},d(l){l&&M(e);for(let s=0;s<t.length;s+=1)t[s].d()}}}function NNe(n,e,t){let r,i,a,o,l,s;Ne(n,I3,W=>t(19,a=W)),Ne(n,o5,W=>t(20,o=W)),Ne(n,Xt,W=>t(1,l=W)),Ne(n,R4e,W=>t(4,s=W));let{components:u=[]}=e,{level:c=0}=e,f={};const h=(W,te)=>Q=>{const oe=Q.offsetY/Q.currentTarget.offsetHeight;return o5.actions.dragover({component:W,index:te,mousePosition:oe}),!1},m=W=>{if(W._instanceName)return W._instanceName;const te=W._component.replace("@budibase/standard-components/","")||"component";return Ac(te)},_=W=>{const te=Xt.actions.components.getDefinition(W==null?void 0:W._component);return te==null?void 0:te.icon},y=W=>{const te=Xt.actions.components.getDefinition(W==null?void 0:W._component);return te==null?void 0:te.hasChildren},w=W=>{var te;return y(W)&&((te=W._children)==null?void 0:te.length)};function A(W){f[W]?delete f[W]:t(2,f[W]=!0,f),t(2,f)}const E=async(W,te)=>{var Q,oe;W.stopPropagation();try{const ie=Xt.actions.components.getDefinition((Q=o.source)==null?void 0:Q._component);if(!ie)return;const K=ie.name.toLowerCase(),G=k4(r.props,te._id);for(let ne of G){const se=Xt.actions.components.getDefinition(ne==null?void 0:ne._component);if(((oe=se==null?void 0:se.illegalChildren)==null?void 0:oe.indexOf(K))>-1){yt.warning(`${ie.name} cannot be a child of ${se.name} (${ne._instanceName})`);return}}await o5.actions.drop()}catch(ie){console.error(ie),yt.error("Error saving component")}},T=(W,te,Q)=>{var oe;return(oe=W==null?void 0:W._children)!=null&&oe.length?te.includes(W._id)?!0:!Q[W._id]:!1},I=W=>{var oe,ie,K;const te=(oe=pn(I3))==null?void 0:oe._id,Q=(ie=pn(Ja))==null?void 0:ie.props._id;return!te||te===Q?!1:((K=k4(a,W._id))==null?void 0:K.length)>0},P=W=>o5.actions.dragstart(W),F=W=>A(W._id),j=(W,te)=>{E(te,W)},q=W=>{G1(Xt,l.selectedComponentId=W._id,l)};return n.$$set=W=>{"components"in W&&t(13,u=W.components),"level"in W&&t(0,c=W.level)},n.$$.update=()=>{n.$$.dirty&8194&&t(3,i=u==null?void 0:u.filter(W=>{var te,Q;return!((te=l.componentToPaste)!=null&&te.isCut)||W._id!==((Q=l.componentToPaste)==null?void 0:Q._id)}))},r=pn(Ja),[c,l,f,i,s,h,m,_,w,A,E,T,I,u,P,F,j,q]}class lX extends Re{constructor(e){super(),Ve(this,e,NNe,RNe,Oe,{components:13,level:0})}}function hI(n){let e,t;return e=new Fu({props:{$$slots:{control:[UNe],default:[xNe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&514&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function FNe(n){let e;return{c(){e=le("Copy")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function jNe(n){let e;return{c(){e=le("Paste")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function xNe(n){let e,t,r,i;return e=new pi({props:{icon:"Copy",keyBind:"Ctrl+C",$$slots:{default:[FNe]},$$scope:{ctx:n}}}),e.$on("click",n[7]),r=new pi({props:{icon:"LayersSendToBack",keyBind:"Ctrl+V",disabled:n[1],$$slots:{default:[jNe]},$$scope:{ctx:n}}}),r.$on("click",n[8]),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&512&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&2&&(s.disabled=a[1]),o&512&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function UNe(n){let e,t,r;return t=new dn({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"slot","control"),D(e,"class","icon svelte-u6s22l")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p:mt,i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function qNe(n){let e,t,r=n[0]&&hI(n);return{c(){r&&r.c(),e=$t()},m(i,a){r&&r.m(i,a),C(i,e,a),t=!0},p(i,[a]){i[0]?r?(r.p(i,a),a&1&&b(r,1)):(r=hI(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(i){t||(b(r),t=!0)},o(i){$(r),t=!1},d(i){r&&r.d(i),i&&M(e)}}}function WNe(n,e,t){let r,i,a,o;Ne(n,Xt,h=>t(6,o=h));let{component:l}=e;const s=(h=!1)=>{Xt.actions.components.copy(l,h)},u=h=>{try{Xt.actions.components.paste(l,h)}catch{yt.error("Error saving component")}},c=()=>s(!1),f=()=>u("inside");return n.$$set=h=>{"component"in h&&t(4,l=h.component)},n.$$.update=()=>{n.$$.dirty&16&&t(5,r=Xt.actions.components.getDefinition(l==null?void 0:l._component)),n.$$.dirty&64&&t(1,i=!o.componentToPaste),n.$$.dirty&32&&t(0,a=(r==null?void 0:r.editable)!==!1&&(r==null?void 0:r.static)!==!0)},[a,i,s,u,l,r,o,c,f]}class GNe extends Re{constructor(e){super(),Ve(this,e,WNe,qNe,Oe,{component:4})}}function mI(n){let e,t;return{c(){e=J("div"),D(e,"class","indicator svelte-9uy3y5"),yn(e,"--x",n[2]+"px"),yn(e,"--y",n[3]+"px"),yn(e,"--width",n[4]+"px"),yn(e,"--height",n[5]+"px"),De(e,"above",n[1]===$c.ABOVE),De(e,"below",n[1]===$c.BELOW),De(e,"inside",n[1]===$c.INSIDE)},m(r,i){C(r,e,i)},p(r,i){i&4&&yn(e,"--x",r[2]+"px"),i&8&&yn(e,"--y",r[3]+"px"),i&16&&yn(e,"--width",r[4]+"px"),i&32&&yn(e,"--height",r[5]+"px"),i&2&&De(e,"above",r[1]===$c.ABOVE),i&2&&De(e,"below",r[1]===$c.BELOW),i&2&&De(e,"inside",r[1]===$c.INSIDE)},i(r){t||Po(()=>{t=Cd(e,np,{duration:130}),t.start()})},o:mt,d(r){r&&M(e)}}}function YNe(n){let e,t=n[0]&&n[1]&&mI(n);return{c(){t&&t.c(),e=$t()},m(r,i){t&&t.m(r,i),C(r,e,i)},p(r,[i]){r[0]&&r[1]?t?(t.p(r,i),i&3&&b(t,1)):(t=mI(r),t.c(),b(t,1),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i(r){b(t)},o:mt,d(r){t&&t.d(r),r&&M(e)}}}function KNe(n,e,t){let{component:r}=e,{position:i}=e,a,o,l,s;const u=c=>{var m;const f=document.getElementById(`component-${c==null?void 0:c._id}`),h=(m=f==null?void 0:f.children[0])==null?void 0:m.children[0];!f||(t(2,a=h.offsetLeft),t(3,o=h.offsetTop),t(4,l=h.clientWidth),t(5,s=h.clientHeight))};return n.$$set=c=>{"component"in c&&t(0,r=c.component),"position"in c&&t(1,i=c.position)},n.$$.update=()=>{n.$$.dirty&1&&u(r)},[r,i,a,o,l,s]}class sX extends Re{constructor(e){super(),Ve(this,e,KNe,YNe,Oe,{component:0,position:1})}}function XNe(n){var l,s;let e,t,r,i,a={title:"Confirm Deletion",body:`Are you sure you want to delete "${(l=n[2])==null?void 0:l._instanceName}"?`,okText:"Delete Component",onOk:n[4]};e=new Os({props:a}),n[5](e);let o={title:"Eject block",body:`Ejecting a block breaks it down into multiple components and cannot be undone. Are you sure you want to eject "${(s=n[3])==null?void 0:s._instanceName}"?`,onOk:n[6],okText:"Eject block"};return r=new Os({props:o}),n[7](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(u,c){H(e,u,c),C(u,t,c),H(r,u,c),i=!0},p(u,[c]){var m,_;const f={};c&4&&(f.body=`Are you sure you want to delete "${(m=u[2])==null?void 0:m._instanceName}"?`),c&4&&(f.onOk=u[4]),e.$set(f);const h={};c&8&&(h.body=`Ejecting a block breaks it down into multiple components and cannot be undone. Are you sure you want to eject "${(_=u[3])==null?void 0:_._instanceName}"?`),c&8&&(h.onOk=u[6]),r.$set(h)},i(u){i||(b(e.$$.fragment,u),b(r.$$.fragment,u),i=!0)},o(u){$(e.$$.fragment,u),$(r.$$.fragment,u),i=!1},d(u){n[5](null),B(e,u),u&&M(t),n[7](null),B(r,u)}}}function JNe(n,e,t){let r,i,a,o;Ne(n,Ja,T=>t(8,r=T)),Ne(n,I3,T=>t(9,i=T)),Ne(n,si,T=>t(10,a=T)),Ne(n,y6,T=>t(11,o=T));let l,s,u,c;const f={["^ArrowUp"]:async T=>{await Xt.actions.components.moveUp(T)},["^ArrowDown"]:async T=>{await Xt.actions.components.moveDown(T)},["^c"]:T=>{Xt.actions.components.copy(T,!1)},["^x"]:T=>{Xt.actions.components.copy(T,!0)},["^v"]:async T=>{await Xt.actions.components.paste(T,"inside")},["^d"]:async T=>{Xt.actions.components.copy(T),await Xt.actions.components.paste(T,"below")},["^e"]:T=>{t(3,c=T),s.show()},["^Enter"]:()=>{a("./new")},Delete:T=>{if((T==null?void 0:T._id)===r.props._id)return!1;t(2,u=T),l.show()},ArrowUp:()=>{Xt.actions.components.selectPrevious()},ArrowDown:()=>{Xt.actions.components.selectNext()},Escape:()=>{if(!o("/new"))return!1;a("./")}},h=async(T,I,P,F=!1)=>{if(!I||!P)return!1;try{P==="Backspace"&&(P="Delete"),F&&(P="^"+P);const j=f[P];if(j)T&&(T.preventDefault(),T.stopPropagation());else return!1;return j(I)}catch(j){console.error(j),yt.error("Error handling key press")}},m=async T=>{var P;if(T.repeat)return;const I=(P=document.activeElement)==null?void 0:P.tagName.toLowerCase();if(!(["input","textarea"].indexOf(I)!==-1&&T.key!=="Escape"))return await h(T,i,T.key,T.ctrlKey||T.metaKey)},_=async T=>{const{id:I,key:P,ctrlKey:F}=T.detail,j=ru(r.props,I);return await h(null,j,P,F)};ar(()=>(document.addEventListener("keydown",m),document.addEventListener("component-menu",_),()=>{document.removeEventListener("keydown",m),document.removeEventListener("component-menu",_)}));const y=()=>Xt.actions.components.delete(u);function w(T){He[T?"unshift":"push"](()=>{l=T,t(0,l)})}const A=()=>Xt.actions.components.requestEjectBlock(c==null?void 0:c._id);function E(T){He[T?"unshift":"push"](()=>{s=T,t(1,s)})}return[l,s,u,c,y,w,A,E]}class ZNe extends Re{constructor(e){super(),Ve(this,e,JNe,XNe,Oe,{})}}function QNe(n){let e,t,r,i;const a=n[3].default,o=Xn(a,n,n[2],null);return{c(){e=J("div"),o&&o.c(),D(e,"ondragover","return false"),D(e,"ondragenter","return false"),D(e,"class","svelte-1vzr6kt")},m(l,s){C(l,e,s),o&&o.m(e,null),n[4](e),t=!0,r||(i=At(e,"drop",n[1]),r=!0)},p(l,[s]){o&&o.p&&(!t||s&4)&&Zn(o,a,l,l[2],t?Jn(a,l[2],s,null):Qn(l[2]),null)},i(l){t||(b(o,l),t=!0)},o(l){$(o,l),t=!1},d(l){l&&M(e),o&&o.d(l),n[4](null),r=!1,i()}}}function eFe(n,e,t){let{$$slots:r={},$$scope:i}=e,a;Od("scroll",{scrollTo:u=>{if(!u)return;const c=259,f=32,{scrollLeft:h,scrollTop:m,offsetHeight:_}=a;let y=a.getBoundingClientRect(),w={};const A=u.left+u.width+h-36;A>c?w.left=A-c:w.left=0,w.left===h&&delete w.left;const E=u.top-(y==null?void 0:y.top)+m;E>m+_-2*f?w.top=E-_+2*f:E<m+f?w.top=E-f:delete w.top,!(w.left==null&&w.top==null)&&a.scroll({...w,behavior:"smooth"})}});const l=async()=>{try{await o5.actions.drop()}catch(u){console.error(u),yt.error("Error saving component")}};function s(u){He[u?"unshift":"push"](()=>{a=u,t(0,a)})}return n.$$set=u=>{"$$scope"in u&&t(2,i=u.$$scope)},[a,l,i,r,s]}class tFe extends Re{constructor(e){super(),Ve(this,e,eFe,QNe,Oe,{})}}function nFe(n){let e;return{c(){e=le("Add component")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function rFe(n){var r;let e,t;return e=new GNe({props:{component:(r=n[2])==null?void 0:r.props}}),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){var l;const o={};a&4&&(o.component=(l=i[2])==null?void 0:l.props),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function gI(n){let e,t,r,i;e=new sX({props:{component:n[3].target,position:n[3].dropPosition}});let a=n[3].dropPosition!==$c.INSIDE&&vI(n);return{c(){O(e.$$.fragment),t=U(),a&&a.c(),r=$t()},m(o,l){H(e,o,l),C(o,t,l),a&&a.m(o,l),C(o,r,l),i=!0},p(o,l){const s={};l&8&&(s.component=o[3].target),l&8&&(s.position=o[3].dropPosition),e.$set(s),o[3].dropPosition!==$c.INSIDE?a?(a.p(o,l),l&8&&b(a,1)):(a=vI(o),a.c(),b(a,1),a.m(r.parentNode,r)):a&&(we(),$(a,1,1,()=>{a=null}),ke())},i(o){i||(b(e.$$.fragment,o),b(a),i=!0)},o(o){$(e.$$.fragment,o),$(a),i=!1},d(o){B(e,o),o&&M(t),a&&a.d(o),o&&M(r)}}}function vI(n){let e,t;return e=new sX({props:{component:n[3].targetParent,position:$c.INSIDE}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&8&&(a.component=r[3].targetParent),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function iFe(n){var u,c,f;let e,t,r,i,a,o,l;r=new M5({props:{text:"Screen",indentLevel:0,selected:n[1].selectedComponentId===((u=n[2])==null?void 0:u.props._id),opened:!0,scrollable:!0,icon:"WebPage",id:`component-${(c=n[2])==null?void 0:c.props._id}`,$$slots:{default:[rFe]},$$scope:{ctx:n}}}),r.$on("drop",n[4]),r.$on("click",n[6]),a=new lX({props:{level:0,components:(f=n[2])==null?void 0:f.props._children}});let s=n[3].dragging&&n[3].valid&&gI(n);return{c(){e=J("ul"),t=J("li"),O(r.$$.fragment),i=U(),O(a.$$.fragment),o=U(),s&&s.c(),D(t,"class","svelte-1ohljq5"),D(e,"class","svelte-1ohljq5")},m(h,m){C(h,e,m),x(e,t),H(r,t,null),x(t,i),H(a,t,null),x(t,o),s&&s.m(t,null),l=!0},p(h,m){var w,A,E;const _={};m&6&&(_.selected=h[1].selectedComponentId===((w=h[2])==null?void 0:w.props._id)),m&4&&(_.id=`component-${(A=h[2])==null?void 0:A.props._id}`),m&132&&(_.$$scope={dirty:m,ctx:h}),r.$set(_);const y={};m&4&&(y.components=(E=h[2])==null?void 0:E.props._children),a.$set(y),h[3].dragging&&h[3].valid?s?(s.p(h,m),m&8&&b(s,1)):(s=gI(h),s.c(),b(s,1),s.m(t,null)):s&&(we(),$(s,1,1,()=>{s=null}),ke())},i(h){l||(b(r.$$.fragment,h),b(a.$$.fragment,h),b(s),l=!0)},o(h){$(r.$$.fragment,h),$(a.$$.fragment,h),$(s),l=!1},d(h){h&&M(e),B(r),B(a),s&&s.d()}}}function aFe(n){let e,t,r,i,a;return t=new $n({props:{cta:!0,$$slots:{default:[nFe]},$$scope:{ctx:n}}}),t.$on("click",n[5]),i=new tFe({props:{$$slots:{default:[iFe]},$$scope:{ctx:n}}}),{c(){e=J("div"),O(t.$$.fragment),r=U(),O(i.$$.fragment),D(e,"class","add-component svelte-1ohljq5")},m(o,l){C(o,e,l),H(t,e,null),C(o,r,l),H(i,o,l),a=!0},p(o,l){const s={};l&128&&(s.$$scope={dirty:l,ctx:o}),t.$set(s);const u={};l&142&&(u.$$scope={dirty:l,ctx:o}),i.$set(u)},i(o){a||(b(t.$$.fragment,o),b(i.$$.fragment,o),a=!0)},o(o){$(t.$$.fragment,o),$(i.$$.fragment,o),a=!1},d(o){o&&M(e),B(t),o&&M(r),B(i,o)}}}function oFe(n){let e,t,r,i;return e=new W3({props:{title:"Components",showExpandIcon:!0,borderRight:!0,$$slots:{default:[aFe]},$$scope:{ctx:n}}}),r=new ZNe({}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,[o]){const l={};o&143&&(l.$$scope={dirty:o,ctx:a}),e.$set(l)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function lFe(n,e,t){let r,i,a,o;return Ne(n,si,c=>t(0,r=c)),Ne(n,Xt,c=>t(1,i=c)),Ne(n,Ja,c=>t(2,a=c)),Ne(n,o5,c=>t(3,o=c)),[r,i,a,o,async()=>{try{await o5.actions.drop()}catch(c){console.error(c),yt.error("Error saving component")}},()=>r("./new"),()=>{G1(Xt,i.selectedComponentId=a==null?void 0:a.props._id,i)}]}class sFe extends Re{constructor(e){super(),Ve(this,e,lFe,oFe,Oe,{})}}function _I(n){let e,t,r;return t=new un({props:{$$slots:{default:[uFe]},$$scope:{ctx:n}}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","label svelte-12naooy")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a&4194305&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function uFe(n){let e;return{c(){e=le(n[0])},m(t,r){C(t,e,r)},p(t,r){r&1&&_t(e,t[0])},d(t){t&&M(e)}}}function bI(n){let e;return{c(){e=J("div"),D(e,"class","text svelte-12naooy")},m(t,r){C(t,e,r),e.innerHTML=n[8]},p(t,r){r&256&&(e.innerHTML=t[8])},d(t){t&&M(e)}}}function cFe(n){let e,t,r,i,a,o,l,s,u=n[4]!=="boolean"&&n[0]&&_I(n);const c=[{componentInstance:n[1]},{value:n[10]},{updateOnChange:!1},{onChange:n[12]},{bindings:n[9]},{name:n[3]},{text:n[0]},{nested:n[6]},{key:n[3]},{type:n[4]},n[5]];var f=n[2];function h(_){let y={};for(let w=0;w<c.length;w+=1)y=au(y,c[w]);return{props:y}}f&&(i=new f(h()),i.$on("change",n[12]));let m=n[8]&&bI(n);return{c(){e=J("div"),u&&u.c(),t=U(),r=J("div"),i&&O(i.$$.fragment),o=U(),m&&m.c(),D(r,"data-cy",a=`${n[3]}-prop-control`),D(r,"class","control svelte-12naooy"),D(e,"class","property-control svelte-12naooy"),D(e,"data-cy",l=`setting-${n[3]}`),De(e,"highlighted",n[7]&&n[11])},m(_,y){C(_,e,y),u&&u.m(e,null),x(e,t),x(e,r),i&&H(i,r,null),x(e,o),m&&m.m(e,null),s=!0},p(_,[y]){_[4]!=="boolean"&&_[0]?u?(u.p(_,y),y&17&&b(u,1)):(u=_I(_),u.c(),b(u,1),u.m(e,t)):u&&(we(),$(u,1,1,()=>{u=null}),ke());const w=y&5755?Id(c,[y&2&&{componentInstance:_[1]},y&1024&&{value:_[10]},c[2],y&4096&&{onChange:_[12]},y&512&&{bindings:_[9]},y&8&&{name:_[3]},y&1&&{text:_[0]},y&64&&{nested:_[6]},y&8&&{key:_[3]},y&16&&{type:_[4]},y&32&&_6(_[5])]):{};if(f!==(f=_[2])){if(i){we();const A=i;$(A.$$.fragment,1,0,()=>{B(A,1)}),ke()}f?(i=new f(h()),i.$on("change",_[12]),O(i.$$.fragment),b(i.$$.fragment,1),H(i,r,null)):i=null}else f&&i.$set(w);(!s||y&8&&a!==(a=`${_[3]}-prop-control`))&&D(r,"data-cy",a),_[8]?m?m.p(_,y):(m=bI(_),m.c(),m.m(e,null)):m&&(m.d(1),m=null),(!s||y&8&&l!==(l=`setting-${_[3]}`))&&D(e,"data-cy",l),y&2176&&De(e,"highlighted",_[7]&&_[11])},i(_){s||(b(u),i&&b(i.$$.fragment,_),s=!0)},o(_){$(u),i&&$(i.$$.fragment,_),s=!1},d(_){_&&M(e),u&&u.d(),i&&B(i),m&&m.d()}}}function fFe(n,e,t){let r,i,a,o,{label:l=""}=e,{componentInstance:s={}}=e,{control:u=null}=e,{key:c=""}=e,{type:f=""}=e,{value:h=null}=e,{defaultValue:m=null}=e,{props:_={}}=e,{onChange:y=()=>{}}=e,{bindings:w=[]}=e,{componentBindings:A=[]}=e,{nested:E=!1}=e,{highlighted:T=!1}=e,{info:I=null}=e;const P=(q,W,te)=>te?[...W||[],...q||[]]:q,F=q=>{let W=q;q&&typeof q=="object"&&("detail"in q?W=q.detail:"target"in q&&(W=q.target.value)),f==="number"&&(W=parseInt(W)),y(typeof W=="string"?o(W):W)},j=(q,W,te)=>{const Q=P3(te,q);return Q==null&&W!==void 0?W:Q};return h5(()=>{T&&Xt.actions.settings.highlight(null)}),n.$$set=q=>{"label"in q&&t(0,l=q.label),"componentInstance"in q&&t(1,s=q.componentInstance),"control"in q&&t(2,u=q.control),"key"in q&&t(3,c=q.key),"type"in q&&t(4,f=q.type),"value"in q&&t(13,h=q.value),"defaultValue"in q&&t(14,m=q.defaultValue),"props"in q&&t(5,_=q.props),"onChange"in q&&t(15,y=q.onChange),"bindings"in q&&t(16,w=q.bindings),"componentBindings"in q&&t(17,A=q.componentBindings),"nested"in q&&t(6,E=q.nested),"highlighted"in q&&t(7,T=q.highlighted),"info"in q&&t(8,I=q.info)},n.$$.update=()=>{n.$$.dirty&8192&&t(11,r=h==null||h===""),n.$$.dirty&196672&&t(9,i=P(w,A,E)),n.$$.dirty&25088&&t(10,a=j(h,m,i)),n.$$.dirty&1024,n.$$.dirty&512&&(o=q=>Df(i,q))},[l,s,u,c,f,_,E,T,I,i,a,r,F,h,m,y,w,A]}class B7 extends Re{constructor(e){super(),Ve(this,e,fFe,cFe,Oe,{label:0,componentInstance:1,control:2,key:3,type:4,value:13,defaultValue:14,props:5,onChange:15,bindings:16,componentBindings:17,nested:6,highlighted:7,info:8})}}class uX{constructor(e){this._isScreen=e,this._children=[],this._json={}}addChild(e){return this._children.push(e),this}customProps(e){for(let t of Object.keys(e))this._json[t]=e[t];return this}json(){const e=z1.cloneDeep(this._json);if(this._children.length!==0)for(let t of this._children)this._isScreen?e.props._children.push(t.json()):e._children.push(t.json());return e}}class u5 extends uX{constructor(e){super(!1),this._children=[],this._json={_id:C4(),_component:e,_styles:{normal:{},hover:{},active:{},selected:{}},_instanceName:"",_children:[]}}normalStyle(e){return this._json._styles.normal=e,this}hoverStyle(e){return this._json._styles.hover=e,this}customStyle(e){return this._json._styles.custom=e,this}instanceName(e){return this._json._instanceName=e,this}type(e){return this._json.type=e,this}text(e){return this._json.text=e,this}}function C5(n){return n.split("/").map(e=>(e=decodeURIComponent(e),e=e.replace(/ /g,"-"),e.startsWith(":")||(e=encodeURIComponent(e)),e)).join("/").toLowerCase()}class O7 extends uX{constructor(){super(!0),this._json={showNavigation:!0,width:"Large",props:{_id:C4(),_component:"@budibase/standard-components/container",_styles:{normal:{},hover:{},active:{},selected:{}},_children:[],_instanceName:"",direction:"column",hAlign:"stretch",vAlign:"top",size:"grow",gap:"M"},routing:{route:"",roleId:"BASIC",homeScreen:!1},name:"screen-id"}}normalStyle(e){return this._json.props._styles.normal=e,this}component(e){return this._json.props._component=e,this}table(e){return this._json.props.table=e,this}route(e){return this._json.routing.route=e,this}name(e){return this._json.name=e,this}instanceName(e){return this._json.props._instanceName=e,this}customProps(e){for(let t of Object.keys(e))this._json.props[t]=e[t];return this}}function pFe(n){return n.map(e=>({name:`${e.name} - New`,create:()=>vFe(e),id:dFe,table:e._id}))}const cX=n=>C5(`/${n.name}/new/row`),dFe="NEW_ROW_TEMPLATE",hFe=n=>C5(`/${n.name}`),mFe=n=>{let e=[];return Object.entries(n||{}).forEach(([t,r])=>{!t||!r||r!=null&&r.autocolumn||e.push(t)}),e},gFe=n=>{const e={type:"table",tableId:n._id},{schema:t}=X2(null,e,{formSchema:!0}),r=new u5("@budibase/standard-components/formblock");return r.customProps({title:"New row",actionType:"Create",actionUrl:hFe(n),showDeleteButton:!1,showSaveButton:!0,fields:mFe(t),dataSource:{label:n.name,tableId:n._id,type:"table"},labelPosition:"left",size:"spectrum--medium"}).instanceName(`${n.name} - Form block`),r},vFe=n=>{const e=gFe(n);return new O7().instanceName(`${n.name} - New`).route(cX(n)).addChild(pX(n.name,"New row")).addChild(e).json()};function _Fe(n){return n.map(e=>({name:`${e.name} - List`,create:()=>$Fe(e),id:bFe,table:e._id}))}const bFe="ROW_LIST_TEMPLATE",fX=n=>C5(`/${n.name}`),yFe=n=>{const e=new u5("@budibase/standard-components/tableblock");return e.customProps({linkRows:!0,linkURL:`${fX(n)}/:id`,showAutoColumns:!1,showTitleButton:!0,titleButtonText:"Create new",titleButtonURL:cX(n),title:n.name,dataSource:{label:n.name,name:n._id,tableId:n._id,type:"table"},size:"spectrum--medium",paginate:!0,rowCount:8}).instanceName(`${n.name} - Table block`),e},$Fe=n=>new O7().route(fX(n)).instanceName(`${n.name} - List`).addChild(yFe(n)).json();function sw(n){return`var(--spectrum-global-color-gray-${n})`}function wFe(n){return new u5("@budibase/standard-components/link").text(n).customProps({url:`/${n.toLowerCase()}`,openInNewTab:!1,color:sw(700),size:"S",align:"left"})}function pX(n,e){const t=wFe(n).instanceName("Back Link"),r=new u5("@budibase/standard-components/text").type("none").normalStyle({"margin-right":"4px","margin-left":"4px"}).text(">").instanceName("Arrow").customProps({color:sw(700),size:"S",align:"left"}),i=new u5("@budibase/standard-components/text").text(e).instanceName("Identifier").customProps({color:sw(700),size:"S",align:"left"});return new u5("@budibase/standard-components/container").customProps({gap:"N",direction:"row",hAlign:"left",vAlign:"middle",size:"shrink"}).normalStyle({width:"600px","margin-right":"auto","margin-left":"auto"}).instanceName("Breadcrumbs").addChild(t).addChild(r).addChild(i)}const kFe={string:"stringfield",number:"numberfield",options:"optionsfield",array:"multifieldselect",boolean:"booleanfield",longform:"longformfield",datetime:"datetimefield",attachment:"attachmentfield",link:"relationshipfield",json:"jsonfield",barcodeqr:"codescanner"};function zFe(n){const{schema:e}=X2(null,n,{formSchema:!0});let t=[];return Object.keys(e||{}).forEach(i=>{const a=e[i];if(a.autocolumn||a.nestedJSON)return;const o=typeof a=="object"?a.type:a,l=kFe[o],s=`@budibase/standard-components/${l}`;if(l){const u=new u5(s).instanceName(i).customProps({field:i,label:i,placeholder:i});if(o==="options")u.customProps({placeholder:"Choose an option",optionsType:"select",optionsSource:"schema"});else if(o==="longform")u.customProps({format:"auto"});else if(o==="array")u.customProps({placeholder:"Choose an option",optionsSource:"schema"});else if(o==="link"){let c=a.relationshipType==="one-to-many"?"Choose an option":"Choose some options";u.customProps({placeholder:c})}else o==="boolean"?u.customProps({text:i,label:""}):o==="datetime"&&u.customProps({enableTime:!(a!=null&&a.dateOnly),timeOnly:a==null?void 0:a.timeOnly,ignoreTimezones:a.ignoreTimezones});t.push(u)}}),t}function AFe(n){let e;return{c(){e=le("Update form fields")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function MFe(n){let e,t,r,i,a;t=new Sr({props:{secondary:!0,wide:!0,$$slots:{default:[AFe]},$$scope:{ctx:n}}}),t.$on("click",n[3]);let o={body:"All components inside this group will be deleted and replaced with fields to match the schema. Are you sure you want to update this Field Group?",okText:"Update",onOk:n[1],title:"Confirm Form Field Update"};return i=new Os({props:o}),n[4](i),{c(){e=J("div"),O(t.$$.fragment),r=U(),O(i.$$.fragment)},m(l,s){C(l,e,s),H(t,e,null),C(l,r,s),H(i,l,s),a=!0},p(l,[s]){const u={};s&64&&(u.$$scope={dirty:s,ctx:l}),t.$set(u);const c={};i.$set(c)},i(l){a||(b(t.$$.fragment,l),b(i.$$.fragment,l),a=!0)},o(l){$(t.$$.fragment,l),$(i.$$.fragment,l),a=!1},d(l){l&&M(e),B(t),l&&M(r),n[4](null),B(i,l)}}}function CFe(n,e,t){let r;Ne(n,ml,u=>t(5,r=u));let{componentInstance:i}=e,a;const o=async()=>{const u=N_(r==null?void 0:r.props,i._id,h=>h._component.endsWith("/form")),c=u==null?void 0:u.dataSource,f=zFe(c);try{await Xt.actions.components.updateSetting("_children",f.map(h=>h.json()))}catch{yt.error("Error resetting form fields")}},l=()=>a==null?void 0:a.show();function s(u){He[u?"unshift":"push"](()=>{a=u,t(0,a)})}return n.$$set=u=>{"componentInstance"in u&&t(2,i=u.componentInstance)},[a,o,i,l,s]}class SFe extends Re{constructor(e){super(),Ve(this,e,CFe,MFe,Oe,{componentInstance:2})}}function LFe(n){let e;return{c(){e=le("Eject block")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function EFe(n){let e,t,r;return t=new Sr({props:{secondary:!0,$$slots:{default:[LFe]},$$scope:{ctx:n}}}),t.$on("click",n[0]),{c(){e=J("div"),O(t.$$.fragment)},m(i,a){C(i,e,a),H(t,e,null),r=!0},p(i,[a]){const o={};a&2&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function TFe(n){return[()=>{document.dispatchEvent(new KeyboardEvent("keydown",{key:"e",ctrlKey:!0}))}]}class DFe extends Re{constructor(e){super(),Ve(this,e,TFe,EFe,Oe,{})}}function yI(n,e,t){const r=n.slice();return r[12]=e[t],r[13]=e,r[14]=t,r}function HFe(n){let e;return{c(){e=le("Bindings")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function $I(n){let e,t;return e=new $n({props:{secondary:!0,$$slots:{default:[BFe]},$$scope:{ctx:n}}}),e.$on("click",n[4]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&32768&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function BFe(n){let e;return{c(){e=le("Add Binding")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function OFe(n){let e;return{c(){e=le(`Enter a value for each binding. The default values will be used for any
869
+ to confirm.`,m=U(),O(_.$$.fragment),D(c,"class","delete-items svelte-1ogygrq")},m(P,F){C(P,e,F),x(e,t),x(e,r),x(r,a),x(r,o),x(e,l),C(P,s,F),C(P,u,F),x(u,c);for(let j=0;j<E.length;j+=1)E[j].m(c,null);C(P,f,F),C(P,h,F),C(P,m,F),H(_,P,F),w=!0},p(P,F){if((!w||F&1)&&i!==(i=P[0].name+"")&&_t(a,i),F&32){A=P[5];let q;for(q=0;q<A.length;q+=1){const W=HO(P,A,q);E[q]?E[q].p(W,F):(E[q]=IO(W),E[q].c(),E[q].m(c,null))}for(;q<E.length;q+=1)E[q].d(1);E.length=A.length}const j={};F&1&&(j.placeholder=P[0].name),!y&&F&64&&(y=!0,j.value=P[6],rt(()=>y=!1)),_.$set(j)},i(P){w||(b(_.$$.fragment,P),w=!0)},o(P){$(_.$$.fragment,P),w=!1},d(P){P&&M(e),P&&M(s),P&&M(u),Dn(E,P),P&&M(f),P&&M(h),P&&M(m),B(_,P)}}}function wRe(n){let e,t,r,i,a,o=n[7]&&BO(n),l={$$slots:{default:[yRe]},$$scope:{ctx:n}};t=new ir({props:l}),n[15](t);let s={okText:"Delete Table",onOk:n[10],onCancel:n[11],title:"Confirm Deletion",disabled:n[6]!==n[0].name,$$slots:{default:[$Re]},$$scope:{ctx:n}};return i=new Os({props:s}),n[17](i),{c(){o&&o.c(),e=U(),O(t.$$.fragment),r=U(),O(i.$$.fragment)},m(u,c){o&&o.m(u,c),C(u,e,c),H(t,u,c),C(u,r,c),H(i,u,c),a=!0},p(u,[c]){u[7]?o?(o.p(u,c),c&128&&b(o,1)):(o=BO(u),o.c(),b(o,1),o.m(e.parentNode,e)):o&&(we(),$(o,1,1,()=>{o=null}),ke());const f={};c&33554449&&(f.$$scope={dirty:c,ctx:u}),t.$set(f);const h={};c&65&&(h.disabled=u[6]!==u[0].name),c&33554529&&(h.$$scope={dirty:c,ctx:u}),i.$set(h)},i(u){a||(b(o),b(t.$$.fragment,u),b(i.$$.fragment,u),a=!0)},o(u){$(o),$(t.$$.fragment,u),$(i.$$.fragment,u),a=!1},d(u){o&&o.d(u),u&&M(e),n[15](null),B(t,u),u&&M(r),n[17](null),B(i,u)}}}function kRe(n,e,t){let r,i,a,o,l;Ne(n,si,W=>t(19,a=W)),Ne(n,Hr,W=>t(20,o=W)),Ne(n,Xt,W=>t(21,l=W));let{table:s}=e,u,c,f="",h=s.name,m,_,y;function w(){m=l.screens.filter(W=>W.autoTableId===s._id),t(5,_=["All table data"].concat(m.map(W=>`Screen ${W.props._instanceName}`))),c.show()}async function A(){const W=o.selected;try{await Hr.delete(s),await Xt.actions.screens.delete(m),await Hr.fetch(),s.type==="external"&&await Di.fetch(),yt.success("Table deleted"),W&&W._id===s._id&&a("./table")}catch{yt.error("Error deleting table")}}function E(){t(6,y="")}async function T(){await Hr.save(s),yt.success("Table renamed successfully")}function I(W){const te=W.target.value;t(4,f=h===te?`Table with name ${te} already exists. Please choose another name.`:"")}function P(W){n.$$.not_equal(s.name,W)&&(s.name=W,t(0,s))}function F(W){He[W?"unshift":"push"](()=>{u=W,t(2,u)})}function j(W){y=W,t(6,y)}function q(W){He[W?"unshift":"push"](()=>{c=W,t(3,c)})}return n.$$set=W=>{"table"in W&&t(0,s=W.table)},n.$$.update=()=>{n.$$.dirty&1&&t(1,r=(s==null?void 0:s.type)==="external"),n.$$.dirty&3&&t(7,i=!r||(s==null?void 0:s.created))},[s,r,u,c,f,_,y,i,h,w,A,E,T,I,P,F,j,q]}class zRe extends Re{constructor(e){super(),Ve(this,e,kRe,wRe,Oe,{table:0})}}function ARe(n){let e;return{c(){e=le("Edit")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function MRe(n){let e;return{c(){e=le("Delete")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function CRe(n){let e,t,r,i;return e=new pi({props:{icon:"Edit",$$slots:{default:[ARe]},$$scope:{ctx:n}}}),e.$on("click",function(){Mn(n[1].show)&&n[1].show.apply(this,arguments)}),r=new pi({props:{icon:"Delete",$$slots:{default:[MRe]},$$scope:{ctx:n}}}),r.$on("click",function(){Mn(n[2].show)&&n[2].show.apply(this,arguments)}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,o){n=a;const l={};o&1024&&(l.$$scope={dirty:o,ctx:n}),e.$set(l);const s={};o&1024&&(s.$$scope={dirty:o,ctx:n}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function SRe(n){let e,t,r;return t=new dn({props:{s:!0,hoverable:!0,name:"MoreSmallList"}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"slot","control"),D(e,"class","icon open-popover")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p:mt,i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function LRe(n){let e,t,r;function i(o){n[5](o)}let a={label:"View Name",thin:!0};return n[0].name!==void 0&&(a.value=n[0].name),e=new En({props:a}),He.push(()=>nt(e,"value",i)),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){const s={};!t&&l&1&&(t=!0,s.value=o[0].name,rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function ERe(n){let e,t;return e=new _r({props:{title:"Edit View",onConfirm:n[3],confirmText:"Save",$$slots:{default:[LRe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&1025&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function TRe(n){let e,t,r,i,a,o;e=new Fu({props:{$$slots:{control:[SRe],default:[CRe]},$$scope:{ctx:n}}});let l={$$slots:{default:[ERe]},$$scope:{ctx:n}};r=new ir({props:l}),n[6](r);let s={body:`Are you sure you wish to delete the view '${n[0].name}'? Your data will be deleted and this action cannot be undone.`,okText:"Delete View",onOk:n[4],title:"Confirm Deletion"};return a=new Os({props:s}),n[7](a),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),O(a.$$.fragment)},m(u,c){H(e,u,c),C(u,t,c),H(r,u,c),C(u,i,c),H(a,u,c),o=!0},p(u,[c]){const f={};c&1030&&(f.$$scope={dirty:c,ctx:u}),e.$set(f);const h={};c&1025&&(h.$$scope={dirty:c,ctx:u}),r.$set(h);const m={};c&1&&(m.body=`Are you sure you wish to delete the view '${u[0].name}'? Your data will be deleted and this action cannot be undone.`),a.$set(m)},i(u){o||(b(e.$$.fragment,u),b(r.$$.fragment,u),b(a.$$.fragment,u),o=!0)},o(u){$(e.$$.fragment,u),$(r.$$.fragment,u),$(a.$$.fragment,u),o=!1},d(u){B(e,u),u&&M(t),n[6](null),B(r,u),u&&M(i),n[7](null),B(a,u)}}}function DRe(n,e,t){let r;Ne(n,si,m=>t(8,r=m));let{view:i}=e,a,o=i.name,l;async function s(){await Ru.save({originalName:o,...i}),yt.success("View renamed successfully")}async function u(){try{const m=i.name,_=i.tableId;await Ru.delete(m),yt.success("View deleted"),r(`./table/${_}`)}catch{yt.error("Error deleting view")}}function c(m){n.$$.not_equal(i.name,m)&&(i.name=m,t(0,i))}function f(m){He[m?"unshift":"push"](()=>{a=m,t(1,a)})}function h(m){He[m?"unshift":"push"](()=>{l=m,t(2,l)})}return n.$$set=m=>{"view"in m&&t(0,i=m.view)},[i,a,l,s,u,c,f,h]}class HRe extends Re{constructor(e){super(),Ve(this,e,DRe,TRe,Oe,{view:0})}}function PO(n,e,t){const r=n.slice();return r[13]=e[t],r[15]=t,r}function VO(n,e,t){const r=n.slice();return r[16]=e[t],r[15]=t,r}function RO(n){let e,t,r=n[2],i=[];for(let o=0;o<r.length;o+=1)i[o]=jO(PO(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){e=J("div");for(let o=0;o<i.length;o+=1)i[o].c();D(e,"class","hierarchy-items-container")},m(o,l){C(o,e,l);for(let s=0;s<i.length;s+=1)i[s].m(e,null);t=!0},p(o,l){if(l&55){r=o[2];let s;for(s=0;s<r.length;s+=1){const u=PO(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=jO(u),i[s].c(),b(i[s],1),i[s].m(e,null))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){o&&M(e),Dn(i,o)}}}function NO(n){let e,t;return e=new zRe({props:{table:n[13]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4&&(a.table=r[13]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function BRe(n){let e,t,r=n[13]._id!==z4.USERS&&NO(n);return{c(){r&&r.c(),e=$t()},m(i,a){r&&r.m(i,a),C(i,e,a),t=!0},p(i,a){i[13]._id!==z4.USERS?r?(r.p(i,a),a&4&&b(r,1)):(r=NO(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(i){t||(b(r),t=!0)},o(i){$(r),t=!1},d(i){r&&r.d(i),i&&M(e)}}}function ORe(n){let e,t,r;return e=new HRe({props:{view:{name:n[16],...n[13].views[n[16]]}}}),{c(){O(e.$$.fragment),t=U()},m(i,a){H(e,i,a),C(i,t,a),r=!0},p(i,a){const o={};a&4&&(o.view={name:i[16],...i[13].views[i[16]]}),e.$set(o)},i(i){r||(b(e.$$.fragment,i),r=!0)},o(i){$(e.$$.fragment,i),r=!1},d(i){B(e,i),i&&M(t)}}}function FO(n,e){let t,r,i;function a(){return e[9](e[13],e[16])}return r=new M5({props:{indentLevel:2,icon:"Remove",text:e[16],selected:e[1]===e[16],$$slots:{default:[ORe]},$$scope:{ctx:e}}}),r.$on("click",a),{key:n,first:null,c(){t=$t(),O(r.$$.fragment),this.first=t},m(o,l){C(o,t,l),H(r,o,l),i=!0},p(o,l){e=o;const s={};l&4&&(s.text=e[16]),l&6&&(s.selected=e[1]===e[16]),l&262148&&(s.$$scope={dirty:l,ctx:e}),r.$set(s)},i(o){i||(b(r.$$.fragment,o),i=!0)},o(o){$(r.$$.fragment,o),i=!1},d(o){o&&M(t),B(r,o)}}}function jO(n){var c;let e,t,r=[],i=new Map,a,o;function l(){return n[8](n[13])}e=new M5({props:{indentLevel:1,border:n[15]>0,icon:n[13]._id===z4.USERS?"UserGroup":"Table",text:n[13].name,selected:((c=n[0].selected)==null?void 0:c._id)===n[13]._id,$$slots:{default:[BRe]},$$scope:{ctx:n}}}),e.$on("click",l);let s=[...Object.keys(n[13].views||{})].sort();const u=f=>f[15];for(let f=0;f<s.length;f+=1){let h=VO(n,s,f),m=u(h);i.set(m,r[f]=FO(m,h))}return{c(){O(e.$$.fragment),t=U();for(let f=0;f<r.length;f+=1)r[f].c();a=$t()},m(f,h){H(e,f,h),C(f,t,h);for(let m=0;m<r.length;m+=1)r[m].m(f,h);C(f,a,h),o=!0},p(f,h){var _;n=f;const m={};h&4&&(m.icon=n[13]._id===z4.USERS?"UserGroup":"Table"),h&4&&(m.text=n[13].name),h&5&&(m.selected=((_=n[0].selected)==null?void 0:_._id)===n[13]._id),h&262148&&(m.$$scope={dirty:h,ctx:n}),e.$set(m),h&38&&(s=[...Object.keys(n[13].views||{})].sort(),we(),r=Il(r,h,u,1,n,s,i,a.parentNode,Mc,FO,a,VO),ke())},i(f){if(!o){b(e.$$.fragment,f);for(let h=0;h<s.length;h+=1)b(r[h]);o=!0}},o(f){$(e.$$.fragment,f);for(let h=0;h<r.length;h+=1)$(r[h]);o=!1},d(f){B(e,f),f&&M(t);for(let h=0;h<r.length;h+=1)r[h].d(f);f&&M(a)}}}function IRe(n){var i;let e,t,r=((i=n[3])==null?void 0:i._id)&&RO(n);return{c(){r&&r.c(),e=$t()},m(a,o){r&&r.m(a,o),C(a,e,o),t=!0},p(a,[o]){var l;(l=a[3])!=null&&l._id?r?(r.p(a,o),o&8&&b(r,1)):(r=RO(a),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(a){t||(b(r),t=!0)},o(a){$(r),t=!1},d(a){r&&r.d(a),a&&M(e)}}}function PRe(n,e,t){let r,i,a,o,l,s;Ne(n,si,w=>t(10,a=w)),Ne(n,Hr,w=>t(0,o=w)),Ne(n,Ru,w=>t(7,l=w)),Ne(n,xd,w=>t(3,s=w));const u=(w,A)=>{var E,T;return((E=w.name)==null?void 0:E.toLowerCase())>((T=A.name)==null?void 0:T.toLowerCase())};let{sourceId:c}=e;function f(w){Hr.select(w),a(`./table/${w._id}`)}function h(w){Ru.select(w),a(`./view/${w.name}`)}function m(w,A){r!==A&&h({name:A,...w.views[A]})}const _=w=>f(w),y=(w,A)=>m(w,A);return n.$$set=w=>{"sourceId"in w&&t(6,c=w.sourceId)},n.$$.update=()=>{n.$$.dirty&128&&t(1,r=l.selected&&l.selected.name),n.$$.dirty&65&&t(2,i=o.list.filter(w=>w.sourceId===c).sort(u))},[o,r,i,s,f,m,c,l,_,y]}class VRe extends Re{constructor(e){super(),Ve(this,e,PRe,IRe,Oe,{sourceId:6})}}function xO(n,e,t){const r=n.slice();return r[18]=e[t],r[20]=t,r}function UO(n,e,t){const r=n.slice();return r[21]=e[t],r}function qO(n){let e,t,r=n[0],i=[];for(let o=0;o<r.length;o+=1)i[o]=KO(xO(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){e=J("div");for(let o=0;o<i.length;o+=1)i[o].c();D(e,"class","hierarchy-items-container")},m(o,l){C(o,e,l);for(let s=0;s<i.length;s+=1)i[s].m(e,null);t=!0},p(o,l){if(l&61){r=o[0];let s;for(s=0;s<r.length;s+=1){const u=xO(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=KO(u),i[s].c(),b(i[s],1),i[s].m(e,null))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){o&&M(e),Dn(i,o)}}}function WO(n){let e,t;return e=new eRe({props:{datasource:n[18]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&1&&(a.datasource=r[18]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function RRe(n){let e,t,r=n[18]._id!==Q$&&WO(n);return{c(){r&&r.c(),e=$t()},m(i,a){r&&r.m(i,a),C(i,e,a),t=!0},p(i,a){i[18]._id!==Q$?r?(r.p(i,a),a&1&&b(r,1)):(r=WO(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(i){t||(b(r),t=!0)},o(i){$(r),t=!1},d(i){r&&r.d(i),i&&M(e)}}}function NRe(n){let e,t,r;return t=new QK({props:{integrationType:n[18].source,schema:n[18].schema,size:"18"}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","datasource-icon svelte-11am1jd"),D(e,"slot","icon")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a&1&&(o.integrationType=i[18].source),a&1&&(o.schema=i[18].schema),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function GO(n){let e,t,r,i;e=new VRe({props:{sourceId:n[18]._id}});function a(...u){return n[11](n[18],...u)}let o=n[2].list.filter(a),l=[];for(let u=0;u<o.length;u+=1)l[u]=YO(UO(n,o,u));const s=u=>$(l[u],1,1,()=>{l[u]=null});return{c(){O(e.$$.fragment),t=U();for(let u=0;u<l.length;u+=1)l[u].c();r=$t()},m(u,c){H(e,u,c),C(u,t,c);for(let f=0;f<l.length;f+=1)l[f].m(u,c);C(u,r,c),i=!0},p(u,c){n=u;const f={};if(c&1&&(f.sourceId=n[18]._id),e.$set(f),c&21){o=n[2].list.filter(a);let h;for(h=0;h<o.length;h+=1){const m=UO(n,o,h);l[h]?(l[h].p(m,c),b(l[h],1)):(l[h]=YO(m),l[h].c(),b(l[h],1),l[h].m(r.parentNode,r))}for(we(),h=o.length;h<l.length;h+=1)s(h);ke()}},i(u){if(!i){b(e.$$.fragment,u);for(let c=0;c<o.length;c+=1)b(l[c]);i=!0}},o(u){$(e.$$.fragment,u),l=l.filter(Boolean);for(let c=0;c<l.length;c+=1)$(l[c]);i=!1},d(u){B(e,u),u&&M(t),Dn(l,u),u&&M(r)}}}function FRe(n){let e,t,r;return e=new sRe({props:{query:n[21],onClickQuery:n[4]}}),{c(){O(e.$$.fragment),t=U()},m(i,a){H(e,i,a),C(i,t,a),r=!0},p(i,a){const o={};a&5&&(o.query=i[21]),e.$set(o)},i(i){r||(b(e.$$.fragment,i),r=!0)},o(i){$(e.$$.fragment,i),r=!1},d(i){B(e,i),i&&M(t)}}}function YO(n){let e,t;function r(){return n[12](n[21])}return e=new M5({props:{indentLevel:1,icon:"SQLQuery",iconText:oB(n[18],n[21]),iconColor:lB(n[18],n[21]),text:sB(n[18],n[21]),opened:n[2].selected===n[21]._id,selected:n[2].selected===n[21]._id,$$slots:{default:[FRe]},$$scope:{ctx:n}}}),e.$on("click",r),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){n=i;const o={};a&5&&(o.iconText=oB(n[18],n[21])),a&5&&(o.iconColor=lB(n[18],n[21])),a&5&&(o.text=sB(n[18],n[21])),a&5&&(o.opened=n[2].selected===n[21]._id),a&5&&(o.selected=n[2].selected===n[21]._id),a&16777221&&(o.$$scope={dirty:a,ctx:n}),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function KO(n){let e,t,r,i;function a(){return n[9](n[18])}function o(){return n[10](n[18])}e=new M5({props:{border:n[20]>0,text:n[18].name,opened:n[18].open,selected:n[18].selected,withArrow:!0,$$slots:{icon:[NRe],default:[RRe]},$$scope:{ctx:n}}}),e.$on("click",a),e.$on("iconClick",o);let l=n[18].open&&GO(n);return{c(){O(e.$$.fragment),t=U(),l&&l.c(),r=$t()},m(s,u){H(e,s,u),C(s,t,u),l&&l.m(s,u),C(s,r,u),i=!0},p(s,u){n=s;const c={};u&1&&(c.text=n[18].name),u&1&&(c.opened=n[18].open),u&1&&(c.selected=n[18].selected),u&16777217&&(c.$$scope={dirty:u,ctx:n}),e.$set(c),n[18].open?l?(l.p(n,u),u&1&&b(l,1)):(l=GO(n),l.c(),b(l,1),l.m(r.parentNode,r)):l&&(we(),$(l,1,1,()=>{l=null}),ke())},i(s){i||(b(e.$$.fragment,s),b(l),i=!0)},o(s){$(e.$$.fragment,s),$(l),i=!1},d(s){B(e,s),s&&M(t),l&&l.d(s),s&&M(r)}}}function jRe(n){var i;let e,t,r=((i=n[1])==null?void 0:i._id)&&qO(n);return{c(){r&&r.c(),e=$t()},m(a,o){r&&r.m(a,o),C(a,e,o),t=!0},p(a,[o]){var l;(l=a[1])!=null&&l._id?r?(r.p(a,o),o&2&&b(r,1)):(r=qO(a),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(a){t||(b(r),t=!0)},o(a){$(r),t=!1},d(a){r&&r.d(a),a&&M(e)}}}function xRe(n,e,t){let r,i,a,o,l,s,u;Ne(n,Cc,P=>t(13,a=P)),Ne(n,si,P=>t(14,o=P)),Ne(n,Di,P=>t(8,l=P)),Ne(n,xd,P=>t(1,s=P)),Ne(n,ya,P=>t(2,u=P));let c=[];function f(P){_(P),Di.select(P._id),o(`./datasource/${P._id}`)}function h(P){ya.select(P),o(`./datasource/${P.datasourceId}/${P._id}`)}function m(P){t(6,c=c.filter(F=>P._id!==F))}function _(P){c.includes(P._id)||t(6,c=[...c,P._id])}function y(P){c.includes(P._id)?m(P):_(P)}ar(async()=>{try{await Di.fetch(),await ya.fetch()}catch{yt.error("Error fetching datasources and queries")}});const w=P=>{var W,te;if(a.selectedDatasource===P._id)return!0;if(!P.entities)return!1;let F=P.entities;if(Array.isArray(F)||(F=Object.values(F)),a.selectedTable){const Q=(W=pn(Hr).selected)==null?void 0:W._id;return F.find(oe=>oe._id===Q)!=null}const j=(te=pn(Ru).selected)==null?void 0:te.name;return F.find(Q=>{var oe;return((oe=Q.views)==null?void 0:oe[j])!=null})!=null},A=P=>f(P),E=P=>y(P),T=(P,F)=>F.datasourceId===P._id,I=P=>h(P);return n.$$.update=()=>{n.$$.dirty&320&&t(0,r=Array.isArray(l.list)?l.list.map(P=>{const F=l.selected===P._id,j=c.includes(P._id),q=w(P),W=l.list.length===1;return{...P,selected:F,open:F||j||q||W}}):[]),n.$$.dirty&1&&t(7,i=r.find(P=>P.open)),n.$$.dirty&128&&i&&_(i)},[r,s,u,f,h,y,c,i,l,A,E,T,I]}class URe extends Re{constructor(e){super(),Ve(this,e,xRe,jRe,Oe,{})}}function qRe(n){let e,t,r,i,a;e=new URe({});function o(s){n[5](s)}let l={};return n[0]!==void 0&&(l.modal=n[0]),r=new tX({props:l}),He.push(()=>nt(r,"modal",o)),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(s,u){H(e,s,u),C(s,t,u),H(r,s,u),a=!0},p(s,u){const c={};!i&&u&1&&(i=!0,c.modal=s[0],rt(()=>i=!1)),r.$set(c)},i(s){a||(b(e.$$.fragment,s),b(r.$$.fragment,s),a=!0)},o(s){$(e.$$.fragment,s),$(r.$$.fragment,s),a=!1},d(s){B(e,s),s&&M(t),B(r,s)}}}function WRe(n){let e,t;return e=new F1({props:{title:"Sources",$$slots:{default:[qRe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&65&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function XO(n){let e,t;return e=new dn({props:{hoverable:!0,name:"AddCircle"}}),e.$on("click",function(){Mn(n[0].show)&&n[0].show.apply(this,arguments)}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){n=r},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function GRe(n){let e,t,r,i,a,o,l,s,u;r=new Y2({props:{selected:YRe,$$slots:{default:[WRe]},$$scope:{ctx:n}}}),r.$on("select",n[2]);let c=n[0]&&XO(n);const f=n[4].default,h=Xn(f,n,n[6],null);return{c(){e=J("div"),t=J("div"),O(r.$$.fragment),i=U(),a=J("div"),c&&c.c(),l=U(),s=J("div"),h&&h.c(),D(a,"class","add-button svelte-1oe3r6d"),D(a,"data-cy",o=`new-${n[1]?"datasource":"table"}`),D(t,"class","nav svelte-1oe3r6d"),D(s,"class","content svelte-1oe3r6d"),D(e,"class","root svelte-1oe3r6d")},m(m,_){C(m,e,_),x(e,t),H(r,t,null),x(t,i),x(t,a),c&&c.m(a,null),x(e,l),x(e,s),h&&h.m(s,null),u=!0},p(m,[_]){const y={};_&65&&(y.$$scope={dirty:_,ctx:m}),r.$set(y),m[0]?c?(c.p(m,_),_&1&&b(c,1)):(c=XO(m),c.c(),b(c,1),c.m(a,null)):c&&(we(),$(c,1,1,()=>{c=null}),ke()),(!u||_&2&&o!==(o=`new-${m[1]?"datasource":"table"}`))&&D(a,"data-cy",o),h&&h.p&&(!u||_&64)&&Zn(h,f,m,m[6],u?Jn(f,m[6],_,null):Qn(m[6]),null)},i(m){u||(b(r.$$.fragment,m),b(c),b(h,m),u=!0)},o(m){$(r.$$.fragment,m),$(c),$(h,m),u=!1},d(m){m&&M(e),B(r),c&&c.d(),h&&h.d(m)}}}let YRe="Sources";function KRe(n,e,t){let r,i,a;Ne(n,ua,f=>t(7,i=f)),Ne(n,Cc,f=>t(3,a=f));let{$$slots:o={},$$scope:l}=e,s;function u(){i("./table")}function c(f){s=f,t(0,s)}return n.$$set=f=>{"$$scope"in f&&t(6,l=f.$$scope)},n.$$.update=()=>{n.$$.dirty&8&&t(1,r=a.selectedDatasource&&a.selectedDatasource!==Q$)},[s,r,u,a,o,c,l]}class XRe extends Re{constructor(e){super(),Ve(this,e,KRe,GRe,Oe,{})}}function JRe(n,e,t){let r;return Ne(n,ua,i=>t(0,r=i)),r("../screens"),[]}class ZRe extends Re{constructor(e){super(),Ve(this,e,JRe,null,Oe,{})}}class QRe extends Re{constructor(e){super(),Ve(this,e,null,null,Oe,{})}}function JO(n){let e,t;return e=new dn({props:{name:"ArrowLeft",hoverable:!0}}),e.$on("click",function(){Mn(n[7])&&n[7].apply(this,arguments)}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){n=r},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function ZO(n){let e,t;return e=new dn({props:{name:n[1]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2&&(a.name=r[1]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function eNe(n){let e=(n[0]||"")+"",t;return{c(){t=le(e)},m(r,i){C(r,t,i)},p(r,i){i&1&&e!==(e=(r[0]||"")+"")&&_t(t,e)},d(r){r&&M(t)}}}function QO(n){let e,t;return e=new dn({props:{name:n[11]?"Minimize":"Maximize",hoverable:!0}}),e.$on("click",n[13]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2048&&(a.name=r[11]?"Minimize":"Maximize"),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function eI(n){let e,t,r,i,a;return t=new dn({props:{name:"Add"}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","add-button svelte-1bxbycf")},m(o,l){C(o,e,l),H(t,e,null),r=!0,i||(a=At(e,"click",function(){Mn(n[6])&&n[6].apply(this,arguments)}),i=!0)},p(o,l){n=o},i(o){r||(b(t.$$.fragment,o),r=!0)},o(o){$(t.$$.fragment,o),r=!1},d(o){o&&M(e),B(t),i=!1,a()}}}function tI(n){let e,t;return e=new dn({props:{name:"Close",hoverable:!0}}),e.$on("click",function(){Mn(n[8])&&n[8].apply(this,arguments)}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){n=r},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function tNe(n){let e,t,r,i,a,o,l,s,u,c,f,h,m=n[4]&&JO(n),_=n[1]&&ZO(n);o=new Rn({props:{size:"XXS",$$slots:{default:[eNe]},$$scope:{ctx:n}}});let y=n[2]&&QO(n),w=n[3]&&eI(n),A=n[5]&&tI(n);const E=n[12].default,T=Xn(E,n,n[14],null);return{c(){e=J("div"),t=J("div"),m&&m.c(),r=U(),_&&_.c(),i=U(),a=J("div"),O(o.$$.fragment),l=U(),y&&y.c(),s=U(),w&&w.c(),u=U(),A&&A.c(),c=U(),f=J("div"),T&&T.c(),D(a,"class","title svelte-1bxbycf"),D(t,"class","header svelte-1bxbycf"),D(f,"class","body svelte-1bxbycf"),D(e,"class","panel svelte-1bxbycf"),De(e,"wide",n[11]),De(e,"borderLeft",n[9]),De(e,"borderRight",n[10])},m(I,P){C(I,e,P),x(e,t),m&&m.m(t,null),x(t,r),_&&_.m(t,null),x(t,i),x(t,a),H(o,a,null),x(t,l),y&&y.m(t,null),x(t,s),w&&w.m(t,null),x(t,u),A&&A.m(t,null),x(e,c),x(e,f),T&&T.m(f,null),h=!0},p(I,[P]){I[4]?m?(m.p(I,P),P&16&&b(m,1)):(m=JO(I),m.c(),b(m,1),m.m(t,r)):m&&(we(),$(m,1,1,()=>{m=null}),ke()),I[1]?_?(_.p(I,P),P&2&&b(_,1)):(_=ZO(I),_.c(),b(_,1),_.m(t,i)):_&&(we(),$(_,1,1,()=>{_=null}),ke());const F={};P&16385&&(F.$$scope={dirty:P,ctx:I}),o.$set(F),I[2]?y?(y.p(I,P),P&4&&b(y,1)):(y=QO(I),y.c(),b(y,1),y.m(t,s)):y&&(we(),$(y,1,1,()=>{y=null}),ke()),I[3]?w?(w.p(I,P),P&8&&b(w,1)):(w=eI(I),w.c(),b(w,1),w.m(t,u)):w&&(we(),$(w,1,1,()=>{w=null}),ke()),I[5]?A?(A.p(I,P),P&32&&b(A,1)):(A=tI(I),A.c(),b(A,1),A.m(t,null)):A&&(we(),$(A,1,1,()=>{A=null}),ke()),T&&T.p&&(!h||P&16384)&&Zn(T,E,I,I[14],h?Jn(E,I[14],P,null):Qn(I[14]),null),P&2048&&De(e,"wide",I[11]),P&512&&De(e,"borderLeft",I[9]),P&1024&&De(e,"borderRight",I[10])},i(I){h||(b(m),b(_),b(o.$$.fragment,I),b(y),b(w),b(A),b(T,I),h=!0)},o(I){$(m),$(_),$(o.$$.fragment,I),$(y),$(w),$(A),$(T,I),h=!1},d(I){I&&M(e),m&&m.d(),_&&_.d(),B(o),y&&y.d(),w&&w.d(),A&&A.d(),T&&T.d(I)}}}function nNe(n,e,t){let{$$slots:r={},$$scope:i}=e,{title:a}=e,{icon:o}=e,{expandable:l=!1}=e,{showAddButton:s=!1}=e,{showBackButton:u=!1}=e,{showCloseButton:c=!1}=e,{onClickAddButton:f}=e,{onClickBackButton:h}=e,{onClickCloseButton:m}=e,{borderLeft:_=!1}=e,{borderRight:y=!1}=e,w=!1;const A=()=>t(11,w=!w);return n.$$set=E=>{"title"in E&&t(0,a=E.title),"icon"in E&&t(1,o=E.icon),"expandable"in E&&t(2,l=E.expandable),"showAddButton"in E&&t(3,s=E.showAddButton),"showBackButton"in E&&t(4,u=E.showBackButton),"showCloseButton"in E&&t(5,c=E.showCloseButton),"onClickAddButton"in E&&t(6,f=E.onClickAddButton),"onClickBackButton"in E&&t(7,h=E.onClickBackButton),"onClickCloseButton"in E&&t(8,m=E.onClickCloseButton),"borderLeft"in E&&t(9,_=E.borderLeft),"borderRight"in E&&t(10,y=E.borderRight),"$$scope"in E&&t(14,i=E.$$scope)},[a,o,l,s,u,c,f,h,m,_,y,w,r,A,i]}class W3 extends Re{constructor(e){super(),Ve(this,e,nNe,tNe,Oe,{title:0,icon:1,expandable:2,showAddButton:3,showBackButton:4,showCloseButton:5,onClickAddButton:6,onClickBackButton:7,onClickCloseButton:8,borderLeft:9,borderRight:10})}}const rNe=[{name:"Blocks",icon:"Article",children:["tableblock","cardsblock","repeaterblock","formblock","chartblock"]},{name:"Layout",icon:"ClassicGridView",children:["container","section"]},{name:"Data",icon:"Data",children:["dataprovider","repeater","table","dynamicfilter","daterangepicker"]},{name:"Basic",icon:"TextParagraph",children:["heading","text","button","tag","spectrumcard","cardstat","divider","image","link","icon","embed","markdownviewer","backgroundimage","embeddedmap"]},{name:"Form",icon:"Form",children:["form","formstep","fieldgroup","stringfield","numberfield","passwordfield","optionsfield","booleanfield","longformfield","attachmentfield","jsonfield","relationshipfield","datetimefield","multifieldselect","s3upload","codescanner"]},{name:"Chart",icon:"GraphBarVertical",children:["bar","line","area","candlestick","pie","donut"]}];function nI(n,e,t){const r=n.slice();return r[36]=e[t],r}function rI(n,e,t){const r=n.slice();return r[30]=e[t],r}function iI(n,e,t){const r=n.slice();return r[33]=e[t],r}function aI(n){let e,t;return e=new v7({props:{compact:!0,justified:!0,$$slots:{default:[oNe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&1|i[1]&256&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function iNe(n){let e;return{c(){e=le("Components")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function aNe(n){let e;return{c(){e=le("Blocks")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function oNe(n){let e,t,r,i;return e=new Sr({props:{fullWidth:!0,selected:n[0]==="components",$$slots:{default:[iNe]},$$scope:{ctx:n}}}),e.$on("click",n[18]),r=new Sr({props:{fullWidth:!0,selected:n[0]==="blocks",$$slots:{default:[aNe]},$$scope:{ctx:n}}}),r.$on("click",n[19]),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o[0]&1&&(l.selected=a[0]==="components"),o[1]&256&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o[0]&1&&(s.selected=a[0]==="blocks"),o[1]&256&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function lNe(n){let e,t,r,i;return e=new jt({props:{size:"S",$$slots:{default:[uNe]},$$scope:{ctx:n}}}),r=new Rt({props:{noPadding:!0,gap:"XS",$$slots:{default:[fNe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o[1]&256&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o[0]&32|o[1]&256&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function sNe(n){let e,t,r,i;const a=[dNe,pNe],o=[];function l(s,u){return s[6].length?0:1}return e=l(n),t=o[e]=a[e](n),{c(){t.c(),r=$t()},m(s,u){o[e].m(s,u),C(s,r,u),i=!0},p(s,u){let c=e;e=l(s),e===c?o[e].p(s,u):(we(),$(o[c],1,1,()=>{o[c]=null}),ke(),t=o[e],t?t.p(s,u):(t=o[e]=a[e](s),t.c()),b(t,1),t.m(r.parentNode,r))},i(s){i||(b(t),i=!0)},o(s){$(t),i=!1},d(s){o[e].d(s),s&&M(r)}}}function uNe(n){let e;return{c(){e=le("Blocks are collections of pre-built components")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function cNe(n){let e=n[36].name+"",t;return{c(){t=le(e)},m(r,i){C(r,t,i)},p(r,i){i[0]&32&&e!==(e=r[36].name+"")&&_t(t,e)},d(r){r&&M(t)}}}function oI(n){let e,t,r,i,a,o,l,s;t=new dn({props:{name:n[36].icon}}),i=new jt({props:{size:"XS",$$slots:{default:[cNe]},$$scope:{ctx:n}}});function u(){return n[23](n[36])}function c(){return n[24](n[36])}return{c(){e=J("div"),O(t.$$.fragment),r=U(),O(i.$$.fragment),a=U(),D(e,"draggable","true"),D(e,"class","component svelte-63iy97")},m(f,h){C(f,e,h),H(t,e,null),x(e,r),H(i,e,null),x(e,a),o=!0,l||(s=[At(e,"click",u),At(e,"dragstart",c),At(e,"dragend",n[10])],l=!0)},p(f,h){n=f;const m={};h[0]&32&&(m.name=n[36].icon),t.$set(m);const _={};h[0]&32|h[1]&256&&(_.$$scope={dirty:h,ctx:n}),i.$set(_)},i(f){o||(b(t.$$.fragment,f),b(i.$$.fragment,f),o=!0)},o(f){$(t.$$.fragment,f),$(i.$$.fragment,f),o=!1},d(f){f&&M(e),B(t),B(i),l=!1,Vi(s)}}}function fNe(n){let e,t,r=n[5],i=[];for(let o=0;o<r.length;o+=1)i[o]=oI(nI(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=$t()},m(o,l){for(let s=0;s<i.length;s+=1)i[s].m(o,l);C(o,e,l),t=!0},p(o,l){if(l[0]&1824){r=o[5];let s;for(s=0;s<r.length;s+=1){const u=nI(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=oI(u),i[s].c(),b(i[s],1),i[s].m(e.parentNode,e))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){Dn(i,o),o&&M(e)}}}function pNe(n){let e,t;return e=new jt({props:{size:"S",$$slots:{default:[hNe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[1]&256&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function dNe(n){let e,t,r=n[6],i=[];for(let o=0;o<r.length;o+=1)i[o]=sI(rI(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=$t()},m(o,l){for(let s=0;s<i.length;s+=1)i[s].m(o,l);C(o,e,l),t=!0},p(o,l){if(l[0]&1880){r=o[6];let s;for(s=0;s<r.length;s+=1){const u=rI(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=sI(u),i[s].c(),b(i[s],1),i[s].m(e.parentNode,e))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){Dn(i,o),o&&M(e)}}}function hNe(n){let e;return{c(){e=le("There aren't any components matching the current filter")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function mNe(n){let e=n[33].name+"",t;return{c(){t=le(e)},m(r,i){C(r,t,i)},p(r,i){i[0]&64&&e!==(e=r[33].name+"")&&_t(t,e)},d(r){r&&M(t)}}}function lI(n){let e,t,r,i,a,o,l,s;t=new dn({props:{name:n[33].icon}}),i=new jt({props:{size:"XS",$$slots:{default:[mNe]},$$scope:{ctx:n}}});function u(){return n[20](n[33])}function c(){return n[21](n[33])}return{c(){e=J("div"),O(t.$$.fragment),r=U(),O(i.$$.fragment),D(e,"draggable","true"),D(e,"data-cy",a=`component-${n[33].name}`),D(e,"class","component svelte-63iy97"),De(e,"selected",n[3]===n[4][n[33].component])},m(f,h){C(f,e,h),H(t,e,null),x(e,r),H(i,e,null),o=!0,l||(s=[At(e,"dragstart",u),At(e,"dragend",n[10]),At(e,"click",c),At(e,"mouseover",n[22])],l=!0)},p(f,h){n=f;const m={};h[0]&64&&(m.name=n[33].icon),t.$set(m);const _={};h[0]&64|h[1]&256&&(_.$$scope={dirty:h,ctx:n}),i.$set(_),(!o||h[0]&64&&a!==(a=`component-${n[33].name}`))&&D(e,"data-cy",a),h[0]&88&&De(e,"selected",n[3]===n[4][n[33].component])},i(f){o||(b(t.$$.fragment,f),b(i.$$.fragment,f),o=!0)},o(f){$(t.$$.fragment,f),$(i.$$.fragment,f),o=!1},d(f){f&&M(e),B(t),B(i),l=!1,Vi(s)}}}function gNe(n){let e,t=n[30].name+"",r,i,a,o,l=n[30].children,s=[];for(let c=0;c<l.length;c+=1)s[c]=lI(iI(n,l,c));const u=c=>$(s[c],1,1,()=>{s[c]=null});return{c(){e=J("div"),r=le(t),i=U();for(let c=0;c<s.length;c+=1)s[c].c();a=U(),D(e,"class","category-label svelte-63iy97")},m(c,f){C(c,e,f),x(e,r),C(c,i,f);for(let h=0;h<s.length;h+=1)s[h].m(c,f);C(c,a,f),o=!0},p(c,f){if((!o||f[0]&64)&&t!==(t=c[30].name+"")&&_t(r,t),f[0]&1880){l=c[30].children;let h;for(h=0;h<l.length;h+=1){const m=iI(c,l,h);s[h]?(s[h].p(m,f),b(s[h],1)):(s[h]=lI(m),s[h].c(),b(s[h],1),s[h].m(a.parentNode,a))}for(we(),h=l.length;h<s.length;h+=1)u(h);ke()}},i(c){if(!o){for(let f=0;f<l.length;f+=1)b(s[f]);o=!0}},o(c){s=s.filter(Boolean);for(let f=0;f<s.length;f+=1)$(s[f]);o=!1},d(c){c&&M(e),c&&M(i),Dn(s,c),c&&M(a)}}}function sI(n){let e,t;return e=new Rt({props:{noPadding:!0,gap:"XS",$$slots:{default:[gNe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&88|i[1]&256&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function vNe(n){let e,t,r,i,a,o,l,s;function u(y){n[16](y)}let c={placeholder:"Search",value:n[1]};n[2]!==void 0&&(c.inputRef=n[2]),e=new b5({props:c}),He.push(()=>nt(e,"inputRef",u)),e.$on("change",n[17]);let f=!n[1]&&aI(n);const h=[sNe,lNe],m=[];function _(y,w){return y[1]||y[0]==="components"?0:1}return a=_(n),o=m[a]=h[a](n),{c(){O(e.$$.fragment),r=U(),f&&f.c(),i=U(),o.c(),l=$t()},m(y,w){H(e,y,w),C(y,r,w),f&&f.m(y,w),C(y,i,w),m[a].m(y,w),C(y,l,w),s=!0},p(y,w){const A={};w[0]&2&&(A.value=y[1]),!t&&w[0]&4&&(t=!0,A.inputRef=y[2],rt(()=>t=!1)),e.$set(A),y[1]?f&&(we(),$(f,1,1,()=>{f=null}),ke()):f?(f.p(y,w),w[0]&2&&b(f,1)):(f=aI(y),f.c(),b(f,1),f.m(i.parentNode,i));let E=a;a=_(y),a===E?m[a].p(y,w):(we(),$(m[E],1,1,()=>{m[E]=null}),ke(),o=m[a],o?o.p(y,w):(o=m[a]=h[a](y),o.c()),b(o,1),o.m(l.parentNode,l))},i(y){s||(b(e.$$.fragment,y),b(f),b(o),s=!0)},o(y){$(e.$$.fragment,y),$(f),$(o),s=!1},d(y){B(e,y),y&&M(r),f&&f.d(y),y&&M(i),m[a].d(y),y&&M(l)}}}function _Ne(n){let e,t;return e=new Rt({props:{paddingX:"L",paddingY:"XL",gap:"S",$$slots:{default:[vNe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&127|i[1]&256&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function bNe(n){let e,t,r,i;return t=new W3({props:{title:"Add component",showCloseButton:!0,onClickCloseButton:n[25],borderLeft:!0,$$slots:{default:[_Ne]},$$scope:{ctx:n}}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","container svelte-63iy97")},m(a,o){C(a,e,o),H(t,e,null),i=!0},p(a,o){const l={};o[0]&128&&(l.onClickCloseButton=a[25]),o[0]&127|o[1]&256&&(l.$$scope={dirty:o,ctx:a}),t.$set(l)},i(a){i||(b(t.$$.fragment,a),a&&Po(()=>{r||(r=w0(e,k0,{x:260,duration:300},!0)),r.run(1)}),i=!0)},o(a){$(t.$$.fragment,a),a&&(r||(r=w0(e,k0,{x:260,duration:300},!1)),r.run(0)),i=!1},d(a){a&&M(e),B(t),a&&r&&r.end()}}}function yNe(n,e,t){let r,i,a,o,l,s,u,c;Ne(n,si,se=>t(7,s=se)),Ne(n,Xt,se=>t(14,u=se)),Ne(n,I3,se=>t(15,c=se));let f="components",h,m,_,y=[];const w=se=>{let pe={};return se.forEach((ze,he)=>{pe[ze]=he}),pe},A=(se,pe,ze)=>{let he=[];return ze!=null&&ze.length&&he.push({name:"Plugins",isCategory:!0,children:ze.map($e=>({...pe[$e],name:pe[$e].friendlyName||pe[$e].name})).sort(($e,Ce)=>$e.name.toLowerCase()<Ce.name.toLowerCase()?-1:1)}),se.forEach($e=>{if(typeof $e=="string"){const Ce=pe[`@budibase/standard-components/${$e}`];Ce&&he.push({...Ce,isCategory:!1})}else he.push({...$e,isCategory:!0,children:A($e.children||[],pe)})}),he},E=(se,pe,ze,he)=>{if(t(3,_=he?0:null),t(11,y=[]),!(se!=null&&se.length))return[];he||(se=se.filter(Ce=>Ce.name!=="Blocks"));let $e=[];return se.forEach(Ce=>{let ge=Ce.children.filter(st=>{var ve;const Ae=st.name.toLowerCase();return he&&!Ae.includes(he.toLowerCase())?!1:!((ve=ze==null?void 0:ze.illegalChildren)!=null&&ve.includes(Ae))});ge.length&&($e.push({...Ce,children:ge}),t(11,y=y.concat(ge.map(st=>st.component))))}),se=$e,se},T=async se=>{try{await Xt.actions.components.create(se),s("../")}catch{yt.error("Error creating component")}},I=se=>{if(se.key==="Tab")return _==null?t(3,_=0):t(3,_=(_+1)%y.length),se.preventDefault(),se.stopPropagation(),!1;se.key==="Enter"&&y[_]&&T(y[_])};ar(()=>(m.focus(),window.addEventListener("keydown",I),()=>{window.removeEventListener("keydown",I)}));const P=se=>{Xt.actions.dnd.start(se)},F=()=>{Xt.actions.dnd.stop()};function j(se){m=se,t(2,m)}const q=se=>t(1,h=se.detail),W=()=>t(0,f="components"),te=()=>t(0,f="blocks"),Q=se=>P(se.component),oe=se=>T(se.component),ie=()=>t(3,_=null),K=se=>T(se.component),G=se=>P(se.component),ne=()=>s("../");return n.$$.update=()=>{n.$$.dirty[0]&32768&&t(13,r=Xt.actions.components.getDefinition(c==null?void 0:c._component)),n.$$.dirty[0]&16384&&t(12,i=A(rNe,u.components,u.customComponents)),n.$$.dirty[0]&12291&&t(6,a=E(i,f,r,h)),n.$$.dirty[0]&4096&&t(5,o=i.find(se=>se.name==="Blocks").children),n.$$.dirty[0]&2048&&t(4,l=w(y))},[f,h,m,_,l,o,a,s,T,P,F,y,i,r,u,c,j,q,W,te,Q,oe,ie,K,G,ne]}class $Ne extends Re{constructor(e){super(),Ve(this,e,yNe,bNe,Oe,{},null,[-1,-1])}}function wNe(n){let e,t;return e=new $Ne({}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p:mt,i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}class kNe extends Re{constructor(e){super(),Ve(this,e,null,wNe,Oe,{})}}const Oz=n=>{var j,q,W,te;const{urlParam:e,stateKey:t,validate:r,baseUrl:i="..",fallbackUrl:a,store:o,routify:l,beforeNavigate:s}=n||{};if(!e||!t||!i||!e||!(o!=null&&o.subscribe)||!l||!((j=l.params)!=null&&j.subscribe)||!((q=l.goto)!=null&&q.subscribe)||!((W=l.redirect)!=null&&W.subscribe)||!((te=l.page)!=null&&te.subscribe)){console.warn("syncURLToState invoked with missing parameters");return}let u=pn(l.params),c=pn(l.goto),f=pn(l.redirect),h=pn(l.page),m=null;const _=(Q,oe)=>{if(s){const ie=s(Q,oe);ie!=null&&ie.url&&(Q=ie.url),ie!=null&&ie.params&&(oe=ie.params)}c(Q,oe)},y=Q=>{f(Q)},w=Q=>{var ne;const oe=JSON.stringify(Q),ie=oe!==m;m=oe;const K=Q==null?void 0:Q[e],G=(ne=pn(o))==null?void 0:ne[t];if(!(!ie||!K)){if(r&&a&&!r(K)){y(a);return}K!==G&&o.update(se=>(se[t]=K,se))}},A=Q=>{let oe=!1;const ie=u==null?void 0:u[e],K=Q==null?void 0:Q[t];if(K!==ie&&(oe=!0,r&&a&&!r(K))){y(a);return}if(!!oe&&!pn(a_)){const G={...u,[e]:K};_(h.path,G)}};w(u);const E=l.params.subscribe(Q=>{u=Q,w(Q)}),T=l.goto.subscribe(Q=>{c=Q}),I=l.redirect.subscribe(Q=>{f=Q}),P=l.page.subscribe(Q=>{h=Q}),F=o.subscribe(A);return()=>{E(),T(),I(),P(),F()}};function zNe(n){let e;return{c(){e=le("Delete")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function uI(n){let e,t;return e=new pi({props:{icon:"Export",keyBind:"Ctrl+E",$$slots:{default:[ANe]},$$scope:{ctx:n}}}),e.$on("click",n[7]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&16384&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function ANe(n){let e;return{c(){e=le("Eject block")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function MNe(n){let e;return{c(){e=le("Move up")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function CNe(n){let e;return{c(){e=le("Move down")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function SNe(n){let e;return{c(){e=le("Duplicate")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function LNe(n){let e;return{c(){e=le("Cut")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function ENe(n){let e;return{c(){e=le("Copy")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function TNe(n){let e;return{c(){e=le("Paste")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function DNe(n){let e,t,r,i,a,o,l,s,u,c,f,h,m,_,y;e=new pi({props:{icon:"Delete",keyBind:"!BackAndroid",$$slots:{default:[zNe]},$$scope:{ctx:n}}}),e.$on("click",n[6]);let w=n[0]&&uI(n);return i=new pi({props:{icon:"ChevronUp",keyBind:"Ctrl+!ArrowUp",$$slots:{default:[MNe]},$$scope:{ctx:n}}}),i.$on("click",n[8]),o=new pi({props:{icon:"ChevronDown",keyBind:"Ctrl+!ArrowDown",$$slots:{default:[CNe]},$$scope:{ctx:n}}}),o.$on("click",n[9]),s=new pi({props:{icon:"Duplicate",keyBind:"Ctrl+D",$$slots:{default:[SNe]},$$scope:{ctx:n}}}),s.$on("click",n[10]),c=new pi({props:{icon:"Cut",keyBind:"Ctrl+X",$$slots:{default:[LNe]},$$scope:{ctx:n}}}),c.$on("click",n[11]),h=new pi({props:{icon:"Copy",keyBind:"Ctrl+C",$$slots:{default:[ENe]},$$scope:{ctx:n}}}),h.$on("click",n[12]),_=new pi({props:{icon:"LayersSendToBack",keyBind:"Ctrl+V",disabled:n[1],$$slots:{default:[TNe]},$$scope:{ctx:n}}}),_.$on("click",n[13]),{c(){O(e.$$.fragment),t=U(),w&&w.c(),r=U(),O(i.$$.fragment),a=U(),O(o.$$.fragment),l=U(),O(s.$$.fragment),u=U(),O(c.$$.fragment),f=U(),O(h.$$.fragment),m=U(),O(_.$$.fragment)},m(A,E){H(e,A,E),C(A,t,E),w&&w.m(A,E),C(A,r,E),H(i,A,E),C(A,a,E),H(o,A,E),C(A,l,E),H(s,A,E),C(A,u,E),H(c,A,E),C(A,f,E),H(h,A,E),C(A,m,E),H(_,A,E),y=!0},p(A,E){const T={};E&16384&&(T.$$scope={dirty:E,ctx:A}),e.$set(T),A[0]?w?(w.p(A,E),E&1&&b(w,1)):(w=uI(A),w.c(),b(w,1),w.m(r.parentNode,r)):w&&(we(),$(w,1,1,()=>{w=null}),ke());const I={};E&16384&&(I.$$scope={dirty:E,ctx:A}),i.$set(I);const P={};E&16384&&(P.$$scope={dirty:E,ctx:A}),o.$set(P);const F={};E&16384&&(F.$$scope={dirty:E,ctx:A}),s.$set(F);const j={};E&16384&&(j.$$scope={dirty:E,ctx:A}),c.$set(j);const q={};E&16384&&(q.$$scope={dirty:E,ctx:A}),h.$set(q);const W={};E&2&&(W.disabled=A[1]),E&16384&&(W.$$scope={dirty:E,ctx:A}),_.$set(W)},i(A){y||(b(e.$$.fragment,A),b(w),b(i.$$.fragment,A),b(o.$$.fragment,A),b(s.$$.fragment,A),b(c.$$.fragment,A),b(h.$$.fragment,A),b(_.$$.fragment,A),y=!0)},o(A){$(e.$$.fragment,A),$(w),$(i.$$.fragment,A),$(o.$$.fragment,A),$(s.$$.fragment,A),$(c.$$.fragment,A),$(h.$$.fragment,A),$(_.$$.fragment,A),y=!1},d(A){B(e,A),A&&M(t),w&&w.d(A),A&&M(r),B(i,A),A&&M(a),B(o,A),A&&M(l),B(s,A),A&&M(u),B(c,A),A&&M(f),B(h,A),A&&M(m),B(_,A)}}}function HNe(n){let e,t,r;return t=new dn({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"slot","control"),D(e,"class","icon svelte-u6s22l")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p:mt,i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function BNe(n){let e,t;return e=new Fu({props:{$$slots:{control:[HNe],default:[DNe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&16387&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function ONe(n,e,t){let r,i,a,o;Ne(n,Xt,A=>t(5,o=A));let{component:l}=e;const s=(A,E=!1)=>{document.dispatchEvent(new CustomEvent("component-menu",{detail:{key:A,ctrlKey:E,id:l==null?void 0:l._id}}))},u=()=>s("Delete"),c=()=>s("e",!0),f=()=>s("ArrowUp",!0),h=()=>s("ArrowDown",!0),m=()=>s("d",!0),_=()=>s("x",!0),y=()=>s("c",!0),w=()=>s("v",!0);return n.$$set=A=>{"component"in A&&t(3,l=A.component)},n.$$.update=()=>{n.$$.dirty&8&&t(4,r=Xt.actions.components.getDefinition(l==null?void 0:l._component)),n.$$.dirty&32&&t(1,i=!o.componentToPaste),n.$$.dirty&16&&t(0,a=(r==null?void 0:r.block)===!0)},[a,i,s,l,r,o,u,c,f,h,m,_,y,w]}class INe extends Re{constructor(e){super(),Ve(this,e,ONe,BNe,Oe,{component:3})}}const $c={ABOVE:"above",BELOW:"below",INSIDE:"inside"},cI={source:null,target:null,targetParent:null,dropPosition:null,dragging:!1,valid:!1},PNe=()=>{const n=$i(cI),e={dragstart:t=>{!t||n.set({source:t,target:null,dropPosition:null,dragging:!0,valid:!1})},dragover:({component:t,mousePosition:r})=>{var f,h;const i=Xt.actions.components.getDefinition(t._component),a=i==null?void 0:i.hasChildren,o=((f=t._children)==null?void 0:f.length)>0;let l,s,u;a?r<=.33?l=$c.ABOVE:r>=.66?l=$c.BELOW:l=$c.INSIDE:l=r>.5?$c.BELOW:$c.ABOVE,l===$c.BELOW&&o?(s=t._children[0],l=$c.ABOVE):s=t;const c=pn(n);l===c.dropPosition&&(s==null?void 0:s._id)===((h=c.target)==null?void 0:h._id)||(s&&(u=vc(pn(Ja).props,s._id)),n.update(m=>{var _;return{...m,dropPosition:l,target:s,targetParent:u,valid:((_=k4(m.source,s._id))==null?void 0:_.length)===0}}))},reset:()=>{n.set(cI)},drop:async()=>{const t=pn(n);!t.valid||!t.source||!t.target||(e.reset(),Xt.actions.components.copy(t.source,!0,!1),await Xt.actions.components.paste(t.target,t.dropPosition))}};return{subscribe:n.subscribe,actions:e}},o5=PNe();function fI(n,e,t){const r=n.slice();r[22]=e[t],r[25]=t;const i=r[11](r[22],r[4],r[2]);return r[23]=i,r}function VNe(n){let e,t;return e=new INe({props:{component:n[22]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&8&&(a.component=r[22]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function pI(n){let e,t;return e=new lX({props:{components:n[22]._children,dndStore:o5,level:n[0]+1}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&8&&(a.components=r[22]._children),i&1&&(a.level=r[0]+1),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function dI(n,e){let t,r,i,a,o,l,s,u;function c(){return e[14](e[22])}function f(){return e[15](e[22])}function h(...y){return e[16](e[22],...y)}r=new M5({props:{scrollable:!0,draggable:!0,text:e[6](e[22]),icon:e[7](e[22]),withArrow:e[8](e[22]),indentLevel:e[0]+1,selected:e[1].selectedComponentId===e[22]._id,opened:e[23],highlighted:e[12](e[22]),$$slots:{default:[VNe]},$$scope:{ctx:e}}}),r.$on("dragend",o5.actions.reset),r.$on("dragstart",c),r.$on("dragover",function(){Mn(e[5](e[22],e[25]))&&e[5](e[22],e[25]).apply(this,arguments)}),r.$on("iconClick",f),r.$on("drop",h);let m=e[23]&&pI(e);function _(){return e[17](e[22])}return{key:n,first:null,c(){t=J("li"),O(r.$$.fragment),i=U(),m&&m.c(),a=U(),D(t,"id",o=`component-${e[22]._id}`),D(t,"class","svelte-kv7hxn"),this.first=t},m(y,w){C(y,t,w),H(r,t,null),x(t,i),m&&m.m(t,null),x(t,a),l=!0,s||(u=At(t,"click",i_(_)),s=!0)},p(y,w){e=y;const A={};w&8&&(A.text=e[6](e[22])),w&8&&(A.icon=e[7](e[22])),w&8&&(A.withArrow=e[8](e[22])),w&1&&(A.indentLevel=e[0]+1),w&10&&(A.selected=e[1].selectedComponentId===e[22]._id),w&28&&(A.opened=e[23]),w&8&&(A.highlighted=e[12](e[22])),w&67108872&&(A.$$scope={dirty:w,ctx:e}),r.$set(A),e[23]?m?(m.p(e,w),w&28&&b(m,1)):(m=pI(e),m.c(),b(m,1),m.m(t,a)):m&&(we(),$(m,1,1,()=>{m=null}),ke()),(!l||w&8&&o!==(o=`component-${e[22]._id}`))&&D(t,"id",o)},i(y){l||(b(r.$$.fragment,y),b(m),l=!0)},o(y){$(r.$$.fragment,y),$(m),l=!1},d(y){y&&M(t),B(r),m&&m.d(),s=!1,u()}}}function RNe(n){let e,t=[],r=new Map,i,a=n[3]||[];const o=l=>l[22]._id;for(let l=0;l<a.length;l+=1){let s=fI(n,a,l),u=o(s);r.set(u,t[l]=dI(u,s))}return{c(){e=J("ul");for(let l=0;l<t.length;l+=1)t[l].c();D(e,"class","svelte-kv7hxn")},m(l,s){C(l,e,s);for(let u=0;u<t.length;u+=1)t[u].m(e,null);i=!0},p(l,[s]){s&8191&&(a=l[3]||[],we(),t=Il(t,s,o,1,l,a,r,e,Mc,dI,null,fI),ke())},i(l){if(!i){for(let s=0;s<a.length;s+=1)b(t[s]);i=!0}},o(l){for(let s=0;s<t.length;s+=1)$(t[s]);i=!1},d(l){l&&M(e);for(let s=0;s<t.length;s+=1)t[s].d()}}}function NNe(n,e,t){let r,i,a,o,l,s;Ne(n,I3,W=>t(19,a=W)),Ne(n,o5,W=>t(20,o=W)),Ne(n,Xt,W=>t(1,l=W)),Ne(n,R4e,W=>t(4,s=W));let{components:u=[]}=e,{level:c=0}=e,f={};const h=(W,te)=>Q=>{const oe=Q.offsetY/Q.currentTarget.offsetHeight;return o5.actions.dragover({component:W,index:te,mousePosition:oe}),!1},m=W=>{if(W._instanceName)return W._instanceName;const te=W._component.replace("@budibase/standard-components/","")||"component";return Ac(te)},_=W=>{const te=Xt.actions.components.getDefinition(W==null?void 0:W._component);return te==null?void 0:te.icon},y=W=>{const te=Xt.actions.components.getDefinition(W==null?void 0:W._component);return te==null?void 0:te.hasChildren},w=W=>{var te;return y(W)&&((te=W._children)==null?void 0:te.length)};function A(W){f[W]?delete f[W]:t(2,f[W]=!0,f),t(2,f)}const E=async(W,te)=>{var Q,oe;W.stopPropagation();try{const ie=Xt.actions.components.getDefinition((Q=o.source)==null?void 0:Q._component);if(!ie)return;const K=ie.name.toLowerCase(),G=k4(r.props,te._id);for(let ne of G){const se=Xt.actions.components.getDefinition(ne==null?void 0:ne._component);if(((oe=se==null?void 0:se.illegalChildren)==null?void 0:oe.indexOf(K))>-1){yt.warning(`${ie.name} cannot be a child of ${se.name} (${ne._instanceName})`);return}}await o5.actions.drop()}catch(ie){console.error(ie),yt.error("Error saving component")}},T=(W,te,Q)=>{var oe;return(oe=W==null?void 0:W._children)!=null&&oe.length?te.includes(W._id)?!0:!Q[W._id]:!1},I=W=>{var oe,ie,K;const te=(oe=pn(I3))==null?void 0:oe._id,Q=(ie=pn(Ja))==null?void 0:ie.props._id;return!te||te===Q?!1:((K=k4(a,W._id))==null?void 0:K.length)>0},P=W=>o5.actions.dragstart(W),F=W=>A(W._id),j=(W,te)=>{E(te,W)},q=W=>{G1(Xt,l.selectedComponentId=W._id,l)};return n.$$set=W=>{"components"in W&&t(13,u=W.components),"level"in W&&t(0,c=W.level)},n.$$.update=()=>{n.$$.dirty&8194&&t(3,i=u==null?void 0:u.filter(W=>{var te,Q;return!((te=l.componentToPaste)!=null&&te.isCut)||W._id!==((Q=l.componentToPaste)==null?void 0:Q._id)}))},r=pn(Ja),[c,l,f,i,s,h,m,_,w,A,E,T,I,u,P,F,j,q]}class lX extends Re{constructor(e){super(),Ve(this,e,NNe,RNe,Oe,{components:13,level:0})}}function hI(n){let e,t;return e=new Fu({props:{$$slots:{control:[UNe],default:[xNe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&514&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function FNe(n){let e;return{c(){e=le("Copy")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function jNe(n){let e;return{c(){e=le("Paste")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function xNe(n){let e,t,r,i;return e=new pi({props:{icon:"Copy",keyBind:"Ctrl+C",$$slots:{default:[FNe]},$$scope:{ctx:n}}}),e.$on("click",n[7]),r=new pi({props:{icon:"LayersSendToBack",keyBind:"Ctrl+V",disabled:n[1],$$slots:{default:[jNe]},$$scope:{ctx:n}}}),r.$on("click",n[8]),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&512&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&2&&(s.disabled=a[1]),o&512&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function UNe(n){let e,t,r;return t=new dn({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"slot","control"),D(e,"class","icon svelte-u6s22l")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p:mt,i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function qNe(n){let e,t,r=n[0]&&hI(n);return{c(){r&&r.c(),e=$t()},m(i,a){r&&r.m(i,a),C(i,e,a),t=!0},p(i,[a]){i[0]?r?(r.p(i,a),a&1&&b(r,1)):(r=hI(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(i){t||(b(r),t=!0)},o(i){$(r),t=!1},d(i){r&&r.d(i),i&&M(e)}}}function WNe(n,e,t){let r,i,a,o;Ne(n,Xt,h=>t(6,o=h));let{component:l}=e;const s=(h=!1)=>{Xt.actions.components.copy(l,h)},u=h=>{try{Xt.actions.components.paste(l,h)}catch{yt.error("Error saving component")}},c=()=>s(!1),f=()=>u("inside");return n.$$set=h=>{"component"in h&&t(4,l=h.component)},n.$$.update=()=>{n.$$.dirty&16&&t(5,r=Xt.actions.components.getDefinition(l==null?void 0:l._component)),n.$$.dirty&64&&t(1,i=!o.componentToPaste),n.$$.dirty&32&&t(0,a=(r==null?void 0:r.editable)!==!1&&(r==null?void 0:r.static)!==!0)},[a,i,s,u,l,r,o,c,f]}class GNe extends Re{constructor(e){super(),Ve(this,e,WNe,qNe,Oe,{component:4})}}function mI(n){let e,t;return{c(){e=J("div"),D(e,"class","indicator svelte-9uy3y5"),yn(e,"--x",n[2]+"px"),yn(e,"--y",n[3]+"px"),yn(e,"--width",n[4]+"px"),yn(e,"--height",n[5]+"px"),De(e,"above",n[1]===$c.ABOVE),De(e,"below",n[1]===$c.BELOW),De(e,"inside",n[1]===$c.INSIDE)},m(r,i){C(r,e,i)},p(r,i){i&4&&yn(e,"--x",r[2]+"px"),i&8&&yn(e,"--y",r[3]+"px"),i&16&&yn(e,"--width",r[4]+"px"),i&32&&yn(e,"--height",r[5]+"px"),i&2&&De(e,"above",r[1]===$c.ABOVE),i&2&&De(e,"below",r[1]===$c.BELOW),i&2&&De(e,"inside",r[1]===$c.INSIDE)},i(r){t||Po(()=>{t=Cd(e,np,{duration:130}),t.start()})},o:mt,d(r){r&&M(e)}}}function YNe(n){let e,t=n[0]&&n[1]&&mI(n);return{c(){t&&t.c(),e=$t()},m(r,i){t&&t.m(r,i),C(r,e,i)},p(r,[i]){r[0]&&r[1]?t?(t.p(r,i),i&3&&b(t,1)):(t=mI(r),t.c(),b(t,1),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i(r){b(t)},o:mt,d(r){t&&t.d(r),r&&M(e)}}}function KNe(n,e,t){let{component:r}=e,{position:i}=e,a,o,l,s;const u=c=>{var m;const f=document.getElementById(`component-${c==null?void 0:c._id}`),h=(m=f==null?void 0:f.children[0])==null?void 0:m.children[0];!f||(t(2,a=h.offsetLeft),t(3,o=h.offsetTop),t(4,l=h.clientWidth),t(5,s=h.clientHeight))};return n.$$set=c=>{"component"in c&&t(0,r=c.component),"position"in c&&t(1,i=c.position)},n.$$.update=()=>{n.$$.dirty&1&&u(r)},[r,i,a,o,l,s]}class sX extends Re{constructor(e){super(),Ve(this,e,KNe,YNe,Oe,{component:0,position:1})}}function XNe(n){var l,s;let e,t,r,i,a={title:"Confirm Deletion",body:`Are you sure you want to delete "${(l=n[2])==null?void 0:l._instanceName}"?`,okText:"Delete Component",onOk:n[4]};e=new Os({props:a}),n[5](e);let o={title:"Eject block",body:`Ejecting a block breaks it down into multiple components and cannot be undone. Are you sure you want to eject "${(s=n[3])==null?void 0:s._instanceName}"?`,onOk:n[6],okText:"Eject block"};return r=new Os({props:o}),n[7](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(u,c){H(e,u,c),C(u,t,c),H(r,u,c),i=!0},p(u,[c]){var m,_;const f={};c&4&&(f.body=`Are you sure you want to delete "${(m=u[2])==null?void 0:m._instanceName}"?`),c&4&&(f.onOk=u[4]),e.$set(f);const h={};c&8&&(h.body=`Ejecting a block breaks it down into multiple components and cannot be undone. Are you sure you want to eject "${(_=u[3])==null?void 0:_._instanceName}"?`),c&8&&(h.onOk=u[6]),r.$set(h)},i(u){i||(b(e.$$.fragment,u),b(r.$$.fragment,u),i=!0)},o(u){$(e.$$.fragment,u),$(r.$$.fragment,u),i=!1},d(u){n[5](null),B(e,u),u&&M(t),n[7](null),B(r,u)}}}function JNe(n,e,t){let r,i,a,o;Ne(n,Ja,T=>t(8,r=T)),Ne(n,I3,T=>t(9,i=T)),Ne(n,si,T=>t(10,a=T)),Ne(n,y6,T=>t(11,o=T));let l,s,u,c;const f={["^ArrowUp"]:async T=>{await Xt.actions.components.moveUp(T)},["^ArrowDown"]:async T=>{await Xt.actions.components.moveDown(T)},["^c"]:T=>{Xt.actions.components.copy(T,!1)},["^x"]:T=>{Xt.actions.components.copy(T,!0)},["^v"]:async T=>{await Xt.actions.components.paste(T,"inside")},["^d"]:async T=>{Xt.actions.components.copy(T),await Xt.actions.components.paste(T,"below")},["^e"]:T=>{t(3,c=T),s.show()},["^Enter"]:()=>{a("./new")},Delete:T=>{if((T==null?void 0:T._id)===r.props._id)return!1;t(2,u=T),l.show()},ArrowUp:()=>{Xt.actions.components.selectPrevious()},ArrowDown:()=>{Xt.actions.components.selectNext()},Escape:()=>{if(!o("/new"))return!1;a("./")}},h=async(T,I,P,F=!1)=>{if(!I||!P)return!1;try{P==="Backspace"&&(P="Delete"),F&&(P="^"+P);const j=f[P];if(j)T&&(T.preventDefault(),T.stopPropagation());else return!1;return j(I)}catch(j){console.error(j),yt.error("Error handling key press")}},m=async T=>{var P;if(T.repeat)return;const I=(P=document.activeElement)==null?void 0:P.tagName.toLowerCase();if(!(["input","textarea"].indexOf(I)!==-1&&T.key!=="Escape"))return await h(T,i,T.key,T.ctrlKey||T.metaKey)},_=async T=>{const{id:I,key:P,ctrlKey:F}=T.detail,j=ru(r.props,I);return await h(null,j,P,F)};ar(()=>(document.addEventListener("keydown",m),document.addEventListener("component-menu",_),()=>{document.removeEventListener("keydown",m),document.removeEventListener("component-menu",_)}));const y=()=>Xt.actions.components.delete(u);function w(T){He[T?"unshift":"push"](()=>{l=T,t(0,l)})}const A=()=>Xt.actions.components.requestEjectBlock(c==null?void 0:c._id);function E(T){He[T?"unshift":"push"](()=>{s=T,t(1,s)})}return[l,s,u,c,y,w,A,E]}class ZNe extends Re{constructor(e){super(),Ve(this,e,JNe,XNe,Oe,{})}}function QNe(n){let e,t,r,i;const a=n[3].default,o=Xn(a,n,n[2],null);return{c(){e=J("div"),o&&o.c(),D(e,"ondragover","return false"),D(e,"ondragenter","return false"),D(e,"class","svelte-1vzr6kt")},m(l,s){C(l,e,s),o&&o.m(e,null),n[4](e),t=!0,r||(i=At(e,"drop",n[1]),r=!0)},p(l,[s]){o&&o.p&&(!t||s&4)&&Zn(o,a,l,l[2],t?Jn(a,l[2],s,null):Qn(l[2]),null)},i(l){t||(b(o,l),t=!0)},o(l){$(o,l),t=!1},d(l){l&&M(e),o&&o.d(l),n[4](null),r=!1,i()}}}function eFe(n,e,t){let{$$slots:r={},$$scope:i}=e,a;Od("scroll",{scrollTo:u=>{if(!u)return;const c=259,f=32,{scrollLeft:h,scrollTop:m,offsetHeight:_}=a;let y=a.getBoundingClientRect(),w={};const A=u.left+u.width+h-36;A>c?w.left=A-c:w.left=0,w.left===h&&delete w.left;const E=u.top-(y==null?void 0:y.top)+m;E>m+_-2*f?w.top=E-_+2*f:E<m+f?w.top=E-f:delete w.top,!(w.left==null&&w.top==null)&&a.scroll({...w,behavior:"smooth"})}});const l=async()=>{try{await o5.actions.drop()}catch(u){console.error(u),yt.error("Error saving component")}};function s(u){He[u?"unshift":"push"](()=>{a=u,t(0,a)})}return n.$$set=u=>{"$$scope"in u&&t(2,i=u.$$scope)},[a,l,i,r,s]}class tFe extends Re{constructor(e){super(),Ve(this,e,eFe,QNe,Oe,{})}}function nFe(n){let e;return{c(){e=le("Add component")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function rFe(n){var r;let e,t;return e=new GNe({props:{component:(r=n[2])==null?void 0:r.props}}),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){var l;const o={};a&4&&(o.component=(l=i[2])==null?void 0:l.props),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function gI(n){let e,t,r,i;e=new sX({props:{component:n[3].target,position:n[3].dropPosition}});let a=n[3].dropPosition!==$c.INSIDE&&vI(n);return{c(){O(e.$$.fragment),t=U(),a&&a.c(),r=$t()},m(o,l){H(e,o,l),C(o,t,l),a&&a.m(o,l),C(o,r,l),i=!0},p(o,l){const s={};l&8&&(s.component=o[3].target),l&8&&(s.position=o[3].dropPosition),e.$set(s),o[3].dropPosition!==$c.INSIDE?a?(a.p(o,l),l&8&&b(a,1)):(a=vI(o),a.c(),b(a,1),a.m(r.parentNode,r)):a&&(we(),$(a,1,1,()=>{a=null}),ke())},i(o){i||(b(e.$$.fragment,o),b(a),i=!0)},o(o){$(e.$$.fragment,o),$(a),i=!1},d(o){B(e,o),o&&M(t),a&&a.d(o),o&&M(r)}}}function vI(n){let e,t;return e=new sX({props:{component:n[3].targetParent,position:$c.INSIDE}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&8&&(a.component=r[3].targetParent),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function iFe(n){var u,c,f;let e,t,r,i,a,o,l;r=new M5({props:{text:"Screen",indentLevel:0,selected:n[1].selectedComponentId===((u=n[2])==null?void 0:u.props._id),opened:!0,scrollable:!0,icon:"WebPage",id:`component-${(c=n[2])==null?void 0:c.props._id}`,$$slots:{default:[rFe]},$$scope:{ctx:n}}}),r.$on("drop",n[4]),r.$on("click",n[6]),a=new lX({props:{level:0,components:(f=n[2])==null?void 0:f.props._children}});let s=n[3].dragging&&n[3].valid&&gI(n);return{c(){e=J("ul"),t=J("li"),O(r.$$.fragment),i=U(),O(a.$$.fragment),o=U(),s&&s.c(),D(t,"class","svelte-1ohljq5"),D(e,"class","svelte-1ohljq5")},m(h,m){C(h,e,m),x(e,t),H(r,t,null),x(t,i),H(a,t,null),x(t,o),s&&s.m(t,null),l=!0},p(h,m){var w,A,E;const _={};m&6&&(_.selected=h[1].selectedComponentId===((w=h[2])==null?void 0:w.props._id)),m&4&&(_.id=`component-${(A=h[2])==null?void 0:A.props._id}`),m&132&&(_.$$scope={dirty:m,ctx:h}),r.$set(_);const y={};m&4&&(y.components=(E=h[2])==null?void 0:E.props._children),a.$set(y),h[3].dragging&&h[3].valid?s?(s.p(h,m),m&8&&b(s,1)):(s=gI(h),s.c(),b(s,1),s.m(t,null)):s&&(we(),$(s,1,1,()=>{s=null}),ke())},i(h){l||(b(r.$$.fragment,h),b(a.$$.fragment,h),b(s),l=!0)},o(h){$(r.$$.fragment,h),$(a.$$.fragment,h),$(s),l=!1},d(h){h&&M(e),B(r),B(a),s&&s.d()}}}function aFe(n){let e,t,r,i,a;return t=new $n({props:{cta:!0,$$slots:{default:[nFe]},$$scope:{ctx:n}}}),t.$on("click",n[5]),i=new tFe({props:{$$slots:{default:[iFe]},$$scope:{ctx:n}}}),{c(){e=J("div"),O(t.$$.fragment),r=U(),O(i.$$.fragment),D(e,"class","add-component svelte-1ohljq5")},m(o,l){C(o,e,l),H(t,e,null),C(o,r,l),H(i,o,l),a=!0},p(o,l){const s={};l&128&&(s.$$scope={dirty:l,ctx:o}),t.$set(s);const u={};l&142&&(u.$$scope={dirty:l,ctx:o}),i.$set(u)},i(o){a||(b(t.$$.fragment,o),b(i.$$.fragment,o),a=!0)},o(o){$(t.$$.fragment,o),$(i.$$.fragment,o),a=!1},d(o){o&&M(e),B(t),o&&M(r),B(i,o)}}}function oFe(n){let e,t,r,i;return e=new W3({props:{title:"Components",showExpandIcon:!0,borderRight:!0,$$slots:{default:[aFe]},$$scope:{ctx:n}}}),r=new ZNe({}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,[o]){const l={};o&143&&(l.$$scope={dirty:o,ctx:a}),e.$set(l)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function lFe(n,e,t){let r,i,a,o;return Ne(n,si,c=>t(0,r=c)),Ne(n,Xt,c=>t(1,i=c)),Ne(n,Ja,c=>t(2,a=c)),Ne(n,o5,c=>t(3,o=c)),[r,i,a,o,async()=>{try{await o5.actions.drop()}catch(c){console.error(c),yt.error("Error saving component")}},()=>r("./new"),()=>{G1(Xt,i.selectedComponentId=a==null?void 0:a.props._id,i)}]}class sFe extends Re{constructor(e){super(),Ve(this,e,lFe,oFe,Oe,{})}}function _I(n){let e,t,r;return t=new un({props:{$$slots:{default:[uFe]},$$scope:{ctx:n}}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","label svelte-12naooy")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a&4194305&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function uFe(n){let e;return{c(){e=le(n[0])},m(t,r){C(t,e,r)},p(t,r){r&1&&_t(e,t[0])},d(t){t&&M(e)}}}function bI(n){let e;return{c(){e=J("div"),D(e,"class","text svelte-12naooy")},m(t,r){C(t,e,r),e.innerHTML=n[8]},p(t,r){r&256&&(e.innerHTML=t[8])},d(t){t&&M(e)}}}function cFe(n){let e,t,r,i,a,o,l,s,u=n[4]!=="boolean"&&n[0]&&_I(n);const c=[{componentInstance:n[1]},{value:n[10]},{updateOnChange:!1},{onChange:n[12]},{bindings:n[9]},{name:n[3]},{text:n[0]},{nested:n[6]},{key:n[3]},{type:n[4]},n[5]];var f=n[2];function h(_){let y={};for(let w=0;w<c.length;w+=1)y=au(y,c[w]);return{props:y}}f&&(i=new f(h()),i.$on("change",n[12]));let m=n[8]&&bI(n);return{c(){e=J("div"),u&&u.c(),t=U(),r=J("div"),i&&O(i.$$.fragment),o=U(),m&&m.c(),D(r,"data-cy",a=`${n[3]}-prop-control`),D(r,"class","control svelte-12naooy"),D(e,"class","property-control svelte-12naooy"),D(e,"data-cy",l=`setting-${n[3]}`),De(e,"highlighted",n[7]&&n[11])},m(_,y){C(_,e,y),u&&u.m(e,null),x(e,t),x(e,r),i&&H(i,r,null),x(e,o),m&&m.m(e,null),s=!0},p(_,[y]){_[4]!=="boolean"&&_[0]?u?(u.p(_,y),y&17&&b(u,1)):(u=_I(_),u.c(),b(u,1),u.m(e,t)):u&&(we(),$(u,1,1,()=>{u=null}),ke());const w=y&5755?Id(c,[y&2&&{componentInstance:_[1]},y&1024&&{value:_[10]},c[2],y&4096&&{onChange:_[12]},y&512&&{bindings:_[9]},y&8&&{name:_[3]},y&1&&{text:_[0]},y&64&&{nested:_[6]},y&8&&{key:_[3]},y&16&&{type:_[4]},y&32&&_6(_[5])]):{};if(f!==(f=_[2])){if(i){we();const A=i;$(A.$$.fragment,1,0,()=>{B(A,1)}),ke()}f?(i=new f(h()),i.$on("change",_[12]),O(i.$$.fragment),b(i.$$.fragment,1),H(i,r,null)):i=null}else f&&i.$set(w);(!s||y&8&&a!==(a=`${_[3]}-prop-control`))&&D(r,"data-cy",a),_[8]?m?m.p(_,y):(m=bI(_),m.c(),m.m(e,null)):m&&(m.d(1),m=null),(!s||y&8&&l!==(l=`setting-${_[3]}`))&&D(e,"data-cy",l),y&2176&&De(e,"highlighted",_[7]&&_[11])},i(_){s||(b(u),i&&b(i.$$.fragment,_),s=!0)},o(_){$(u),i&&$(i.$$.fragment,_),s=!1},d(_){_&&M(e),u&&u.d(),i&&B(i),m&&m.d()}}}function fFe(n,e,t){let r,i,a,o,{label:l=""}=e,{componentInstance:s={}}=e,{control:u=null}=e,{key:c=""}=e,{type:f=""}=e,{value:h=null}=e,{defaultValue:m=null}=e,{props:_={}}=e,{onChange:y=()=>{}}=e,{bindings:w=[]}=e,{componentBindings:A=[]}=e,{nested:E=!1}=e,{highlighted:T=!1}=e,{info:I=null}=e;const P=(q,W,te)=>te?[...W||[],...q||[]]:q,F=q=>{let W=q;q&&typeof q=="object"&&("detail"in q?W=q.detail:"target"in q&&(W=q.target.value)),f==="number"&&(W=parseInt(W)),y(typeof W=="string"?o(W):W)},j=(q,W,te)=>{const Q=P3(te,q);return Q==null&&W!==void 0?W:Q};return h5(()=>{T&&Xt.actions.settings.highlight(null)}),n.$$set=q=>{"label"in q&&t(0,l=q.label),"componentInstance"in q&&t(1,s=q.componentInstance),"control"in q&&t(2,u=q.control),"key"in q&&t(3,c=q.key),"type"in q&&t(4,f=q.type),"value"in q&&t(13,h=q.value),"defaultValue"in q&&t(14,m=q.defaultValue),"props"in q&&t(5,_=q.props),"onChange"in q&&t(15,y=q.onChange),"bindings"in q&&t(16,w=q.bindings),"componentBindings"in q&&t(17,A=q.componentBindings),"nested"in q&&t(6,E=q.nested),"highlighted"in q&&t(7,T=q.highlighted),"info"in q&&t(8,I=q.info)},n.$$.update=()=>{n.$$.dirty&8192&&t(11,r=h==null||h===""),n.$$.dirty&196672&&t(9,i=P(w,A,E)),n.$$.dirty&25088&&t(10,a=j(h,m,i)),n.$$.dirty&1024,n.$$.dirty&512&&(o=q=>Df(i,q))},[l,s,u,c,f,_,E,T,I,i,a,r,F,h,m,y,w,A]}class B7 extends Re{constructor(e){super(),Ve(this,e,fFe,cFe,Oe,{label:0,componentInstance:1,control:2,key:3,type:4,value:13,defaultValue:14,props:5,onChange:15,bindings:16,componentBindings:17,nested:6,highlighted:7,info:8})}}class uX{constructor(e){this._isScreen=e,this._children=[],this._json={}}addChild(e){return this._children.push(e),this}customProps(e){for(let t of Object.keys(e))this._json[t]=e[t];return this}json(){const e=z1.cloneDeep(this._json);if(this._children.length!==0)for(let t of this._children)this._isScreen?e.props._children.push(t.json()):e._children.push(t.json());return e}}class u5 extends uX{constructor(e){super(!1),this._children=[],this._json={_id:C4(),_component:e,_styles:{normal:{},hover:{},active:{},selected:{}},_instanceName:"",_children:[]}}normalStyle(e){return this._json._styles.normal=e,this}hoverStyle(e){return this._json._styles.hover=e,this}customStyle(e){return this._json._styles.custom=e,this}instanceName(e){return this._json._instanceName=e,this}type(e){return this._json.type=e,this}text(e){return this._json.text=e,this}}function C5(n){return n.split("/").map(e=>(e=decodeURIComponent(e),e=e.replace(/ /g,"-"),e.startsWith(":")||(e=encodeURIComponent(e)),e)).join("/").toLowerCase()}class O7 extends uX{constructor(){super(!0),this._json={showNavigation:!0,width:"Large",props:{_id:C4(),_component:"@budibase/standard-components/container",_styles:{normal:{},hover:{},active:{},selected:{}},_children:[],_instanceName:"",direction:"column",hAlign:"stretch",vAlign:"top",size:"grow",gap:"M"},routing:{route:"",roleId:"BASIC",homeScreen:!1},name:"screen-id"}}normalStyle(e){return this._json.props._styles.normal=e,this}component(e){return this._json.props._component=e,this}table(e){return this._json.props.table=e,this}route(e){return this._json.routing.route=e,this}name(e){return this._json.name=e,this}instanceName(e){return this._json.props._instanceName=e,this}customProps(e){for(let t of Object.keys(e))this._json.props[t]=e[t];return this}}function pFe(n){return n.map(e=>({name:`${e.name} - New`,create:()=>vFe(e),id:dFe,table:e._id}))}const cX=n=>C5(`/${n.name}/new/row`),dFe="NEW_ROW_TEMPLATE",hFe=n=>C5(`/${n.name}`),mFe=n=>{let e=[];return Object.entries(n||{}).forEach(([t,r])=>{!t||!r||r!=null&&r.autocolumn||e.push(t)}),e},gFe=n=>{const e={type:"table",tableId:n._id},{schema:t}=X2(null,e,{formSchema:!0}),r=new u5("@budibase/standard-components/formblock");return r.customProps({title:"New row",actionType:"Create",actionUrl:hFe(n),showDeleteButton:!1,showSaveButton:!0,fields:mFe(t),dataSource:{label:n.name,tableId:n._id,type:"table"},labelPosition:"left",size:"spectrum--medium"}).instanceName(`${n.name} - Form block`),r},vFe=n=>{const e=gFe(n);return new O7().instanceName(`${n.name} - New`).route(cX(n)).addChild(pX(n.name,"New row")).addChild(e).json()};function _Fe(n){return n.map(e=>({name:`${e.name} - List`,create:()=>$Fe(e),id:bFe,table:e._id}))}const bFe="ROW_LIST_TEMPLATE",fX=n=>C5(`/${n.name}`),yFe=n=>{const e=new u5("@budibase/standard-components/tableblock");return e.customProps({linkRows:!0,linkURL:`${fX(n)}/:id`,showAutoColumns:!1,showTitleButton:!0,titleButtonText:"Create new",titleButtonURL:cX(n),title:n.name,dataSource:{label:n.name,name:n._id,tableId:n._id,type:"table"},size:"spectrum--medium",paginate:!0,rowCount:8}).instanceName(`${n.name} - Table block`),e},$Fe=n=>new O7().route(fX(n)).instanceName(`${n.name} - List`).addChild(yFe(n)).json();function sw(n){return`var(--spectrum-global-color-gray-${n})`}function wFe(n){return new u5("@budibase/standard-components/link").text(n).customProps({url:`/${n.toLowerCase()}`,openInNewTab:!1,color:sw(700),size:"S",align:"left"})}function pX(n,e){const t=wFe(n).instanceName("Back Link"),r=new u5("@budibase/standard-components/text").type("none").normalStyle({"margin-right":"4px","margin-left":"4px"}).text(">").instanceName("Arrow").customProps({color:sw(700),size:"S",align:"left"}),i=new u5("@budibase/standard-components/text").text(e).instanceName("Identifier").customProps({color:sw(700),size:"S",align:"left"});return new u5("@budibase/standard-components/container").customProps({gap:"N",direction:"row",hAlign:"left",vAlign:"middle",size:"shrink"}).normalStyle({width:"600px","margin-right":"auto","margin-left":"auto"}).instanceName("Breadcrumbs").addChild(t).addChild(r).addChild(i)}const kFe={string:"stringfield",number:"numberfield",options:"optionsfield",array:"multifieldselect",boolean:"booleanfield",longform:"longformfield",datetime:"datetimefield",attachment:"attachmentfield",link:"relationshipfield",json:"jsonfield",barcodeqr:"codescanner"};function zFe(n){const{schema:e}=X2(null,n,{formSchema:!0});let t=[];return Object.keys(e||{}).forEach(i=>{const a=e[i];if(a.autocolumn||a.nestedJSON)return;const o=typeof a=="object"?a.type:a,l=kFe[o],s=`@budibase/standard-components/${l}`;if(l){const u=new u5(s).instanceName(i).customProps({field:i,label:i,placeholder:i});if(o==="options")u.customProps({placeholder:"Choose an option",optionsType:"select",optionsSource:"schema"});else if(o==="longform")u.customProps({format:"auto"});else if(o==="array")u.customProps({placeholder:"Choose an option",optionsSource:"schema"});else if(o==="link"){let c=a.relationshipType==="one-to-many"?"Choose an option":"Choose some options";u.customProps({placeholder:c})}else o==="boolean"?u.customProps({text:i,label:""}):o==="datetime"&&u.customProps({enableTime:!(a!=null&&a.dateOnly),timeOnly:a==null?void 0:a.timeOnly,ignoreTimezones:a.ignoreTimezones});t.push(u)}}),t}function AFe(n){let e;return{c(){e=le("Update form fields")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function MFe(n){let e,t,r,i,a;t=new Sr({props:{secondary:!0,wide:!0,$$slots:{default:[AFe]},$$scope:{ctx:n}}}),t.$on("click",n[3]);let o={body:"All components inside this group will be deleted and replaced with fields to match the schema. Are you sure you want to update this Field Group?",okText:"Update",onOk:n[1],title:"Confirm Form Field Update"};return i=new Os({props:o}),n[4](i),{c(){e=J("div"),O(t.$$.fragment),r=U(),O(i.$$.fragment)},m(l,s){C(l,e,s),H(t,e,null),C(l,r,s),H(i,l,s),a=!0},p(l,[s]){const u={};s&64&&(u.$$scope={dirty:s,ctx:l}),t.$set(u);const c={};i.$set(c)},i(l){a||(b(t.$$.fragment,l),b(i.$$.fragment,l),a=!0)},o(l){$(t.$$.fragment,l),$(i.$$.fragment,l),a=!1},d(l){l&&M(e),B(t),l&&M(r),n[4](null),B(i,l)}}}function CFe(n,e,t){let r;Ne(n,ml,u=>t(5,r=u));let{componentInstance:i}=e,a;const o=async()=>{const u=N_(r==null?void 0:r.props,i._id,h=>h._component.endsWith("/form")),c=u==null?void 0:u.dataSource,f=zFe(c);try{await Xt.actions.components.updateSetting("_children",f.map(h=>h.json()))}catch{yt.error("Error resetting form fields")}},l=()=>a==null?void 0:a.show();function s(u){He[u?"unshift":"push"](()=>{a=u,t(0,a)})}return n.$$set=u=>{"componentInstance"in u&&t(2,i=u.componentInstance)},[a,o,i,l,s]}class SFe extends Re{constructor(e){super(),Ve(this,e,CFe,MFe,Oe,{componentInstance:2})}}function LFe(n){let e;return{c(){e=le("Eject block")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function EFe(n){let e,t,r;return t=new Sr({props:{secondary:!0,$$slots:{default:[LFe]},$$scope:{ctx:n}}}),t.$on("click",n[0]),{c(){e=J("div"),O(t.$$.fragment)},m(i,a){C(i,e,a),H(t,e,null),r=!0},p(i,[a]){const o={};a&2&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function TFe(n){return[()=>{document.dispatchEvent(new KeyboardEvent("keydown",{key:"e",ctrlKey:!0}))}]}class DFe extends Re{constructor(e){super(),Ve(this,e,TFe,EFe,Oe,{})}}function yI(n,e,t){const r=n.slice();return r[12]=e[t],r[13]=e,r[14]=t,r}function HFe(n){let e;return{c(){e=le("Bindings")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function $I(n){let e,t;return e=new $n({props:{secondary:!0,$$slots:{default:[BFe]},$$scope:{ctx:n}}}),e.$on("click",n[4]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&32768&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function BFe(n){let e;return{c(){e=le("Add Binding")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function OFe(n){let e;return{c(){e=le(`Enter a value for each binding. The default values will be used for any
870
870
  values left blank.`)},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function IFe(n){let e;return{c(){e=le(`Bindings come in two parts: the binding name, and a default/fallback
871
871
  value. These bindings can be used as Handlebars expressions throughout the
872
872
  query.`)},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function PFe(n){let e;function t(a,o){return a[2]?OFe:IFe}let r=t(n),i=r(n);return{c(){i.c(),e=$t()},m(a,o){i.m(a,o),C(a,e,o)},p(a,o){r!==(r=t(a))&&(i.d(1),i=r(a),i&&(i.c(),i.m(e.parentNode,e)))},d(a){i.d(a),a&&M(e)}}}function VFe(n){let e,t;function r(){return n[11](n[14])}return e=new dn({props:{hoverable:!0,name:"Close"}}),e.$on("click",r),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){n=i},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function RFe(n){var i;let e,t;function r(...a){return n[10](n[12],...a)}return e=new Za({props:{title:`Query binding "${n[12].name}"`,placeholder:"Value",thin:!0,value:P3(n[3],(i=n[1])==null?void 0:i[n[12].name]),bindings:n[3]}}),e.$on("change",r),{c(){O(e.$$.fragment)},m(a,o){H(e,a,o),t=!0},p(a,o){var s;n=a;const l={};o&1&&(l.title=`Query binding "${n[12].name}"`),o&11&&(l.value=P3(n[3],(s=n[1])==null?void 0:s[n[12].name])),o&8&&(l.bindings=n[3]),e.$set(l)},i(a){t||(b(e.$$.fragment,a),t=!0)},o(a){$(e.$$.fragment,a),t=!1},d(a){B(e,a)}}}function wI(n){let e,t,r,i,a,o,l,s,u,c;function f(T){n[7](T,n[12])}let h={placeholder:"Binding Name",thin:!0,disabled:n[2]};n[12].name!==void 0&&(h.value=n[12].name),e=new En({props:h}),He.push(()=>nt(e,"value",f));function m(T){n[8](T,n[12])}function _(...T){return n[9](n[12],...T)}let y={placeholder:"Default",thin:!0,disabled:n[2]};n[12].default!==void 0&&(y.value=n[12].default),i=new En({props:y}),He.push(()=>nt(i,"value",m)),i.$on("change",_);const w=[RFe,VFe],A=[];function E(T,I){return T[2]?0:1}return l=E(n),s=A[l]=w[l](n),{c(){O(e.$$.fragment),r=U(),O(i.$$.fragment),o=U(),s.c(),u=$t()},m(T,I){H(e,T,I),C(T,r,I),H(i,T,I),C(T,o,I),A[l].m(T,I),C(T,u,I),c=!0},p(T,I){n=T;const P={};I&4&&(P.disabled=n[2]),!t&&I&1&&(t=!0,P.value=n[12].name,rt(()=>t=!1)),e.$set(P);const F={};I&4&&(F.disabled=n[2]),!a&&I&1&&(a=!0,F.value=n[12].default,rt(()=>a=!1)),i.$set(F);let j=l;l=E(n),l===j?A[l].p(n,I):(we(),$(A[j],1,1,()=>{A[j]=null}),ke(),s=A[l],s?s.p(n,I):(s=A[l]=w[l](n),s.c()),b(s,1),s.m(u.parentNode,u))},i(T){c||(b(e.$$.fragment,T),b(i.$$.fragment,T),b(s),c=!0)},o(T){$(e.$$.fragment,T),$(i.$$.fragment,T),$(s),c=!1},d(T){B(e,T),T&&M(r),B(i,T),T&&M(o),A[l].d(T),T&&M(u)}}}function NFe(n){let e,t,r,i,a,o,l,s;t=new Rn({props:{size:"XS",$$slots:{default:[HFe]},$$scope:{ctx:n}}});let u=!n[2]&&$I(n);a=new jt({props:{size:"S",$$slots:{default:[PFe]},$$scope:{ctx:n}}});let c=n[0],f=[];for(let m=0;m<c.length;m+=1)f[m]=wI(yI(n,c,m));const h=m=>$(f[m],1,1,()=>{f[m]=null});return{c(){e=J("div"),O(t.$$.fragment),r=U(),u&&u.c(),i=U(),O(a.$$.fragment),o=U(),l=J("div");for(let m=0;m<f.length;m+=1)f[m].c();D(e,"class","controls svelte-bpqao2"),De(e,"height",!n[2]),D(l,"class","bindings svelte-bpqao2"),De(l,"bindable",n[2])},m(m,_){C(m,e,_),H(t,e,null),x(e,r),u&&u.m(e,null),C(m,i,_),H(a,m,_),C(m,o,_),C(m,l,_);for(let y=0;y<f.length;y+=1)f[y].m(l,null);s=!0},p(m,_){const y={};_&32768&&(y.$$scope={dirty:_,ctx:m}),t.$set(y),m[2]?u&&(we(),$(u,1,1,()=>{u=null}),ke()):u?(u.p(m,_),_&4&&b(u,1)):(u=$I(m),u.c(),b(u,1),u.m(e,null)),_&4&&De(e,"height",!m[2]);const w={};if(_&32772&&(w.$$scope={dirty:_,ctx:m}),a.$set(w),_&111){c=m[0];let A;for(A=0;A<c.length;A+=1){const E=yI(m,c,A);f[A]?(f[A].p(E,_),b(f[A],1)):(f[A]=wI(E),f[A].c(),b(f[A],1),f[A].m(l,null))}for(we(),A=c.length;A<f.length;A+=1)h(A);ke()}_&4&&De(l,"bindable",m[2])},i(m){if(!s){b(t.$$.fragment,m),b(u),b(a.$$.fragment,m);for(let _=0;_<c.length;_+=1)b(f[_]);s=!0}},o(m){$(t.$$.fragment,m),$(u),$(a.$$.fragment,m),f=f.filter(Boolean);for(let _=0;_<f.length;_+=1)$(f[_]);s=!1},d(m){m&&M(e),B(t),u&&u.d(),m&&M(i),B(a,m),m&&M(o),m&&M(l),Dn(f,m)}}}function FFe(n){let e,t;return e=new Rt({props:{noPadding:n[2],gap:"S",$$slots:{default:[NFe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&4&&(a.noPadding=r[2]),i&32783&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function jFe(n,e,t){let{bindable:r=!0}=e,{queryBindings:i=[]}=e,{bindings:a=[]}=e,{customParams:o={}}=e;function l(){t(0,i=[...i,{}])}function s(y){i.splice(y,1),t(0,i)}function u(y,w){t(1,o[y]=Df(a,w),o)}function c(y,w){n.$$.not_equal(w.name,y)&&(w.name=y,t(0,i))}function f(y,w){n.$$.not_equal(w.default,y)&&(w.default=y,t(0,i))}const h=(y,w)=>u(y.name,w.detail),m=(y,w)=>u(y.name,w.detail),_=y=>s(y);return n.$$set=y=>{"bindable"in y&&t(2,r=y.bindable),"queryBindings"in y&&t(0,i=y.queryBindings),"bindings"in y&&t(3,a=y.bindings),"customParams"in y&&t(1,o=y.customParams)},[i,o,r,a,l,s,u,c,f,h,m,_]}class dX extends Re{constructor(e){super(),Ve(this,e,jFe,FFe,Oe,{bindable:2,queryBindings:0,bindings:3,customParams:1})}}function kI(n,e,t){const r=n.slice();return r[45]=e[t],r}function zI(n,e,t){const r=n.slice();return r[48]=e[t],r}function AI(n,e,t){const r=n.slice();return r[51]=e[t],r}function MI(n,e,t){const r=n.slice();return r[51]=e[t],r}function CI(n,e,t){const r=n.slice();return r[56]=e[t],r}function SI(n,e,t){const r=n.slice();return r[59]=e[t],r}function LI(n,e,t){const r=n.slice();return r[62]=e[t],r}function EI(n,e,t){const r=n.slice();return r[65]=e[t],r}function TI(n){let e,t,r,i,a,o,l={title:"Query Bindings",$$slots:{body:[GFe],buttons:[UFe]},$$scope:{ctx:n}};return r=new Hf({props:l}),n[30](r),{c(){e=J("i"),t=U(),O(r.$$.fragment),D(e,"class","ri-settings-5-line svelte-xmd5g6")},m(s,u){C(s,e,u),C(s,t,u),H(r,s,u),i=!0,a||(o=At(e,"click",n[21]),a=!0)},p(s,u){const c={};u[0]&259|u[2]&64&&(c.$$scope={dirty:u,ctx:s}),r.$set(c)},i(s){i||(b(r.$$.fragment,s),i=!0)},o(s){$(r.$$.fragment,s),i=!1},d(s){s&&M(e),s&&M(t),n[30](null),B(r,s),a=!1,o()}}}function xFe(n){let e;return{c(){e=le("Save")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function UFe(n){let e,t;return e=new $n({props:{slot:"buttons",cta:!0,$$slots:{default:[xFe]},$$scope:{ctx:n}}}),e.$on("click",n[22]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[2]&64&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function DI(n){let e,t,r,i;function a(s){n[28](s)}function o(s){n[29](s)}let l={queryBindings:n[19](n[1])};return n[8]!==void 0&&(l.customParams=n[8]),n[0]!==void 0&&(l.bindings=n[0]),e=new dX({props:l}),He.push(()=>nt(e,"customParams",a)),He.push(()=>nt(e,"bindings",o)),{c(){O(e.$$.fragment)},m(s,u){H(e,s,u),i=!0},p(s,u){const c={};u[0]&2&&(c.queryBindings=s[19](s[1])),!t&&u[0]&256&&(t=!0,c.customParams=s[8],rt(()=>t=!1)),!r&&u[0]&1&&(r=!0,c.bindings=s[0],rt(()=>r=!1)),e.$set(c)},i(s){i||(b(e.$$.fragment,s),i=!0)},o(s){$(e.$$.fragment,s),i=!1},d(s){B(e,s)}}}function qFe(n){let e=n[19](n[1]).length>0,t,r,i,a=e&&DI(n);return r=new Cz({props:{height:200,query:n[1],schema:n[18](n[1]),datasource:n[20](n[1]),editable:!1}}),{c(){a&&a.c(),t=U(),O(r.$$.fragment)},m(o,l){a&&a.m(o,l),C(o,t,l),H(r,o,l),i=!0},p(o,l){l[0]&2&&(e=o[19](o[1]).length>0),e?a?(a.p(o,l),l[0]&2&&b(a,1)):(a=DI(o),a.c(),b(a,1),a.m(t.parentNode,t)):a&&(we(),$(a,1,1,()=>{a=null}),ke());const s={};l[0]&2&&(s.query=o[1]),l[0]&2&&(s.schema=o[18](o[1])),l[0]&2&&(s.datasource=o[20](o[1])),r.$set(s)},i(o){i||(b(a),b(r.$$.fragment,o),i=!0)},o(o){$(a),$(r.$$.fragment,o),i=!1},d(o){a&&a.d(o),o&&M(t),B(r,o)}}}function WFe(n){let e,t;return e=new Rt({props:{noPadding:!0,gap:"XS",$$slots:{default:[qFe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&259|i[2]&64&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function GFe(n){let e,t;return e=new S4({props:{slot:"body",$$slots:{default:[WFe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&259|i[2]&64&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function YFe(n){let e;return{c(){e=le("Tables")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function HI(n){let e,t=n[65].label+"",r,i,a;function o(){return n[32](n[65])}return{c(){e=J("li"),r=le(t),D(e,"class","svelte-xmd5g6")},m(l,s){C(l,e,s),x(e,r),i||(a=At(e,"click",o),i=!0)},p(l,s){n=l,s[0]&32768&&t!==(t=n[65].label+"")&&_t(r,t)},d(l){l&&M(e),i=!1,a()}}}function BI(n){let e,t,r,i,a,o,l;e=new di({}),i=new Rn({props:{size:"XS",$$slots:{default:[KFe]},$$scope:{ctx:n}}});let s=n[14],u=[];for(let c=0;c<s.length;c+=1)u[c]=OI(LI(n,s,c));return{c(){O(e.$$.fragment),t=U(),r=J("div"),O(i.$$.fragment),a=U(),o=J("ul");for(let c=0;c<u.length;c+=1)u[c].c();D(r,"class","title svelte-xmd5g6"),D(o,"class","svelte-xmd5g6")},m(c,f){H(e,c,f),C(c,t,f),C(c,r,f),H(i,r,null),C(c,a,f),C(c,o,f);for(let h=0;h<u.length;h+=1)u[h].m(o,null);l=!0},p(c,f){const h={};if(f[2]&64&&(h.$$scope={dirty:f,ctx:c}),i.$set(h),f[0]&147456){s=c[14];let m;for(m=0;m<s.length;m+=1){const _=LI(c,s,m);u[m]?u[m].p(_,f):(u[m]=OI(_),u[m].c(),u[m].m(o,null))}for(;m<u.length;m+=1)u[m].d(1);u.length=s.length}},i(c){l||(b(e.$$.fragment,c),b(i.$$.fragment,c),l=!0)},o(c){$(e.$$.fragment,c),$(i.$$.fragment,c),l=!1},d(c){B(e,c),c&&M(t),c&&M(r),B(i),c&&M(a),c&&M(o),Dn(u,c)}}}function KFe(n){let e;return{c(){e=le("Views")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function OI(n){let e,t=n[62].label+"",r,i,a;function o(){return n[33](n[62])}return{c(){e=J("li"),r=le(t),D(e,"class","svelte-xmd5g6")},m(l,s){C(l,e,s),x(e,r),i||(a=At(e,"click",o),i=!0)},p(l,s){n=l,s[0]&16384&&t!==(t=n[62].label+"")&&_t(r,t)},d(l){l&&M(e),i=!1,a()}}}function II(n){let e,t,r,i,a,o,l;e=new di({}),i=new Rn({props:{size:"XS",$$slots:{default:[XFe]},$$scope:{ctx:n}}});let s=n[13],u=[];for(let c=0;c<s.length;c+=1)u[c]=PI(SI(n,s,c));return{c(){O(e.$$.fragment),t=U(),r=J("div"),O(i.$$.fragment),a=U(),o=J("ul");for(let c=0;c<u.length;c+=1)u[c].c();D(r,"class","title svelte-xmd5g6"),D(o,"class","svelte-xmd5g6")},m(c,f){H(e,c,f),C(c,t,f),C(c,r,f),H(i,r,null),C(c,a,f),C(c,o,f);for(let h=0;h<u.length;h+=1)u[h].m(o,null);l=!0},p(c,f){const h={};if(f[2]&64&&(h.$$scope={dirty:f,ctx:c}),i.$set(h),f[0]&139266){s=c[13];let m;for(m=0;m<s.length;m+=1){const _=SI(c,s,m);u[m]?u[m].p(_,f):(u[m]=PI(_),u[m].c(),u[m].m(o,null))}for(;m<u.length;m+=1)u[m].d(1);u.length=s.length}},i(c){l||(b(e.$$.fragment,c),b(i.$$.fragment,c),l=!0)},o(c){$(e.$$.fragment,c),$(i.$$.fragment,c),l=!1},d(c){B(e,c),c&&M(t),c&&M(r),B(i),c&&M(a),c&&M(o),Dn(u,c)}}}function XFe(n){let e;return{c(){e=le("Queries")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function PI(n){let e,t=n[59].label+"",r,i,a,o;function l(){return n[34](n[59])}return{c(){e=J("li"),r=le(t),i=U(),D(e,"class","svelte-xmd5g6"),De(e,"selected",n[1]===n[59])},m(s,u){C(s,e,u),x(e,r),x(e,i),a||(o=At(e,"click",l),a=!0)},p(s,u){n=s,u[0]&8192&&t!==(t=n[59].label+"")&&_t(r,t),u[0]&8194&&De(e,"selected",n[1]===n[59])},d(s){s&&M(e),a=!1,o()}}}function VI(n){let e,t,r,i,a,o,l;e=new di({}),i=new Rn({props:{size:"XS",$$slots:{default:[JFe]},$$scope:{ctx:n}}});let s=n[11],u=[];for(let c=0;c<s.length;c+=1)u[c]=RI(CI(n,s,c));return{c(){O(e.$$.fragment),t=U(),r=J("div"),O(i.$$.fragment),a=U(),o=J("ul");for(let c=0;c<u.length;c+=1)u[c].c();D(r,"class","title svelte-xmd5g6"),D(o,"class","svelte-xmd5g6")},m(c,f){H(e,c,f),C(c,t,f),C(c,r,f),H(i,r,null),C(c,a,f),C(c,o,f);for(let h=0;h<u.length;h+=1)u[h].m(o,null);l=!0},p(c,f){const h={};if(f[2]&64&&(h.$$scope={dirty:f,ctx:c}),i.$set(h),f[0]&133120){s=c[11];let m;for(m=0;m<s.length;m+=1){const _=CI(c,s,m);u[m]?u[m].p(_,f):(u[m]=RI(_),u[m].c(),u[m].m(o,null))}for(;m<u.length;m+=1)u[m].d(1);u.length=s.length}},i(c){l||(b(e.$$.fragment,c),b(i.$$.fragment,c),l=!0)},o(c){$(e.$$.fragment,c),$(i.$$.fragment,c),l=!1},d(c){B(e,c),c&&M(t),c&&M(r),B(i),c&&M(a),c&&M(o),Dn(u,c)}}}function JFe(n){let e;return{c(){e=le("Relationships")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function RI(n){let e,t=n[56].label+"",r,i,a;function o(){return n[35](n[56])}return{c(){e=J("li"),r=le(t),D(e,"class","svelte-xmd5g6")},m(l,s){C(l,e,s),x(e,r),i||(a=At(e,"click",o),i=!0)},p(l,s){n=l,s[0]&2048&&t!==(t=n[56].label+"")&&_t(r,t)},d(l){l&&M(e),i=!1,a()}}}function NI(n){let e,t,r,i,a,o,l;e=new di({}),i=new Rn({props:{size:"XS",$$slots:{default:[ZFe]},$$scope:{ctx:n}}});let s=n[10],u=[];for(let c=0;c<s.length;c+=1)u[c]=FI(MI(n,s,c));return{c(){O(e.$$.fragment),t=U(),r=J("div"),O(i.$$.fragment),a=U(),o=J("ul");for(let c=0;c<u.length;c+=1)u[c].c();D(r,"class","title svelte-xmd5g6"),D(o,"class","svelte-xmd5g6")},m(c,f){H(e,c,f),C(c,t,f),C(c,r,f),H(i,r,null),C(c,a,f),C(c,o,f);for(let h=0;h<u.length;h+=1)u[h].m(o,null);l=!0},p(c,f){const h={};if(f[2]&64&&(h.$$scope={dirty:f,ctx:c}),i.$set(h),f[0]&132096){s=c[10];let m;for(m=0;m<s.length;m+=1){const _=MI(c,s,m);u[m]?u[m].p(_,f):(u[m]=FI(_),u[m].c(),u[m].m(o,null))}for(;m<u.length;m+=1)u[m].d(1);u.length=s.length}},i(c){l||(b(e.$$.fragment,c),b(i.$$.fragment,c),l=!0)},o(c){$(e.$$.fragment,c),$(i.$$.fragment,c),l=!1},d(c){B(e,c),c&&M(t),c&&M(r),B(i),c&&M(a),c&&M(o),Dn(u,c)}}}function ZFe(n){let e;return{c(){e=le("Fields")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function FI(n){let e,t=n[51].label+"",r,i,a;function o(){return n[36](n[51])}return{c(){e=J("li"),r=le(t),D(e,"class","svelte-xmd5g6")},m(l,s){C(l,e,s),x(e,r),i||(a=At(e,"click",o),i=!0)},p(l,s){n=l,s[0]&1024&&t!==(t=n[51].label+"")&&_t(r,t)},d(l){l&&M(e),i=!1,a()}}}function jI(n){let e,t,r,i,a,o,l;e=new di({}),i=new Rn({props:{size:"XS",$$slots:{default:[QFe]},$$scope:{ctx:n}}});let s=n[9],u=[];for(let c=0;c<s.length;c+=1)u[c]=xI(AI(n,s,c));return{c(){O(e.$$.fragment),t=U(),r=J("div"),O(i.$$.fragment),a=U(),o=J("ul");for(let c=0;c<u.length;c+=1)u[c].c();D(r,"class","title svelte-xmd5g6"),D(o,"class","svelte-xmd5g6")},m(c,f){H(e,c,f),C(c,t,f),C(c,r,f),H(i,r,null),C(c,a,f),C(c,o,f);for(let h=0;h<u.length;h+=1)u[h].m(o,null);l=!0},p(c,f){const h={};if(f[2]&64&&(h.$$scope={dirty:f,ctx:c}),i.$set(h),f[0]&131584){s=c[9];let m;for(m=0;m<s.length;m+=1){const _=AI(c,s,m);u[m]?u[m].p(_,f):(u[m]=xI(_),u[m].c(),u[m].m(o,null))}for(;m<u.length;m+=1)u[m].d(1);u.length=s.length}},i(c){l||(b(e.$$.fragment,c),b(i.$$.fragment,c),l=!0)},o(c){$(e.$$.fragment,c),$(i.$$.fragment,c),l=!1},d(c){B(e,c),c&&M(t),c&&M(r),B(i),c&&M(a),c&&M(o),Dn(u,c)}}}function QFe(n){let e;return{c(){e=le("JSON Arrays")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function xI(n){let e,t=n[51].label+"",r,i,a;function o(){return n[37](n[51])}return{c(){e=J("li"),r=le(t),D(e,"class","svelte-xmd5g6")},m(l,s){C(l,e,s),x(e,r),i||(a=At(e,"click",o),i=!0)},p(l,s){n=l,s[0]&512&&t!==(t=n[51].label+"")&&_t(r,t)},d(l){l&&M(e),i=!1,a()}}}function UI(n){let e,t,r,i,a,o,l;e=new di({}),i=new Rn({props:{size:"XS",$$slots:{default:[eje]},$$scope:{ctx:n}}});let s=n[12],u=[];for(let c=0;c<s.length;c+=1)u[c]=qI(zI(n,s,c));return{c(){O(e.$$.fragment),t=U(),r=J("div"),O(i.$$.fragment),a=U(),o=J("ul");for(let c=0;c<u.length;c+=1)u[c].c();D(r,"class","title svelte-xmd5g6"),D(o,"class","svelte-xmd5g6")},m(c,f){H(e,c,f),C(c,t,f),C(c,r,f),H(i,r,null),C(c,a,f),C(c,o,f);for(let h=0;h<u.length;h+=1)u[h].m(o,null);l=!0},p(c,f){const h={};if(f[2]&64&&(h.$$scope={dirty:f,ctx:c}),i.$set(h),f[0]&135170){s=c[12];let m;for(m=0;m<s.length;m+=1){const _=zI(c,s,m);u[m]?u[m].p(_,f):(u[m]=qI(_),u[m].c(),u[m].m(o,null))}for(;m<u.length;m+=1)u[m].d(1);u.length=s.length}},i(c){l||(b(e.$$.fragment,c),b(i.$$.fragment,c),l=!0)},o(c){$(e.$$.fragment,c),$(i.$$.fragment,c),l=!1},d(c){B(e,c),c&&M(t),c&&M(r),B(i),c&&M(a),c&&M(o),Dn(u,c)}}}function eje(n){let e;return{c(){e=le("Data Providers")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function qI(n){let e,t=n[48].label+"",r,i,a,o;function l(){return n[38](n[48])}return{c(){e=J("li"),r=le(t),i=U(),D(e,"class","svelte-xmd5g6"),De(e,"selected",n[1]===n[48])},m(s,u){C(s,e,u),x(e,r),x(e,i),a||(o=At(e,"click",l),a=!0)},p(s,u){n=s,u[0]&4096&&t!==(t=n[48].label+"")&&_t(r,t),u[0]&4098&&De(e,"selected",n[1]===n[48])},d(s){s&&M(e),a=!1,o()}}}function WI(n){let e,t,r,i,a,o,l;e=new di({}),i=new Rn({props:{size:"XS",$$slots:{default:[tje]},$$scope:{ctx:n}}});let s=n[2],u=[];for(let c=0;c<s.length;c+=1)u[c]=GI(kI(n,s,c));return{c(){O(e.$$.fragment),t=U(),r=J("div"),O(i.$$.fragment),a=U(),o=J("ul");for(let c=0;c<u.length;c+=1)u[c].c();D(r,"class","title svelte-xmd5g6"),D(o,"class","svelte-xmd5g6")},m(c,f){H(e,c,f),C(c,t,f),C(c,r,f),H(i,r,null),C(c,a,f),C(c,o,f);for(let h=0;h<u.length;h+=1)u[h].m(o,null);l=!0},p(c,f){const h={};if(f[2]&64&&(h.$$scope={dirty:f,ctx:c}),i.$set(h),f[0]&131076){s=c[2];let m;for(m=0;m<s.length;m+=1){const _=kI(c,s,m);u[m]?u[m].p(_,f):(u[m]=GI(_),u[m].c(),u[m].m(o,null))}for(;m<u.length;m+=1)u[m].d(1);u.length=s.length}},i(c){l||(b(e.$$.fragment,c),b(i.$$.fragment,c),l=!0)},o(c){$(e.$$.fragment,c),$(i.$$.fragment,c),l=!1},d(c){B(e,c),c&&M(t),c&&M(r),B(i),c&&M(a),c&&M(o),Dn(u,c)}}}function tje(n){let e;return{c(){e=le("Other")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function GI(n){let e,t=n[45].label+"",r,i,a;function o(){return n[39](n[45])}return{c(){e=J("li"),r=le(t),D(e,"class","svelte-xmd5g6")},m(l,s){C(l,e,s),x(e,r),i||(a=At(e,"click",o),i=!0)},p(l,s){n=l,s[0]&4&&t!==(t=n[45].label+"")&&_t(r,t)},d(l){l&&M(e),i=!1,a()}}}function nje(n){var j,q,W,te,Q,oe,ie;let e,t,r,i,a,o,l,s,u,c,f,h,m;r=new Rn({props:{size:"XS",$$slots:{default:[YFe]},$$scope:{ctx:n}}});let _=n[15],y=[];for(let K=0;K<_.length;K+=1)y[K]=HI(EI(n,_,K));let w=((j=n[14])==null?void 0:j.length)&&BI(n),A=((q=n[13])==null?void 0:q.length)&&II(n),E=((W=n[11])==null?void 0:W.length)&&VI(n),T=((te=n[10])==null?void 0:te.length)&&NI(n),I=((Q=n[9])==null?void 0:Q.length)&&jI(n),P=n[3]&&((oe=n[12])==null?void 0:oe.length)&&UI(n),F=((ie=n[2])==null?void 0:ie.length)&&WI(n);return{c(){e=J("div"),t=J("div"),O(r.$$.fragment),i=U(),a=J("ul");for(let K=0;K<y.length;K+=1)y[K].c();o=U(),w&&w.c(),l=U(),A&&A.c(),s=U(),E&&E.c(),u=U(),T&&T.c(),c=U(),I&&I.c(),f=U(),P&&P.c(),h=U(),F&&F.c(),D(t,"class","title svelte-xmd5g6"),D(a,"class","svelte-xmd5g6"),D(e,"class","dropdown svelte-xmd5g6")},m(K,G){C(K,e,G),x(e,t),H(r,t,null),x(e,i),x(e,a);for(let ne=0;ne<y.length;ne+=1)y[ne].m(a,null);x(e,o),w&&w.m(e,null),x(e,l),A&&A.m(e,null),x(e,s),E&&E.m(e,null),x(e,u),T&&T.m(e,null),x(e,c),I&&I.m(e,null),x(e,f),P&&P.m(e,null),x(e,h),F&&F.m(e,null),m=!0},p(K,G){var se,pe,ze,he,$e,Ce,ge;const ne={};if(G[2]&64&&(ne.$$scope={dirty:G,ctx:K}),r.$set(ne),G[0]&163840){_=K[15];let st;for(st=0;st<_.length;st+=1){const Ae=EI(K,_,st);y[st]?y[st].p(Ae,G):(y[st]=HI(Ae),y[st].c(),y[st].m(a,null))}for(;st<y.length;st+=1)y[st].d(1);y.length=_.length}(se=K[14])!=null&&se.length?w?(w.p(K,G),G[0]&16384&&b(w,1)):(w=BI(K),w.c(),b(w,1),w.m(e,l)):w&&(we(),$(w,1,1,()=>{w=null}),ke()),(pe=K[13])!=null&&pe.length?A?(A.p(K,G),G[0]&8192&&b(A,1)):(A=II(K),A.c(),b(A,1),A.m(e,s)):A&&(we(),$(A,1,1,()=>{A=null}),ke()),(ze=K[11])!=null&&ze.length?E?(E.p(K,G),G[0]&2048&&b(E,1)):(E=VI(K),E.c(),b(E,1),E.m(e,u)):E&&(we(),$(E,1,1,()=>{E=null}),ke()),(he=K[10])!=null&&he.length?T?(T.p(K,G),G[0]&1024&&b(T,1)):(T=NI(K),T.c(),b(T,1),T.m(e,c)):T&&(we(),$(T,1,1,()=>{T=null}),ke()),($e=K[9])!=null&&$e.length?I?(I.p(K,G),G[0]&512&&b(I,1)):(I=jI(K),I.c(),b(I,1),I.m(e,f)):I&&(we(),$(I,1,1,()=>{I=null}),ke()),K[3]&&((Ce=K[12])==null?void 0:Ce.length)?P?(P.p(K,G),G[0]&4104&&b(P,1)):(P=UI(K),P.c(),b(P,1),P.m(e,h)):P&&(we(),$(P,1,1,()=>{P=null}),ke()),(ge=K[2])!=null&&ge.length?F?(F.p(K,G),G[0]&4&&b(F,1)):(F=WI(K),F.c(),b(F,1),F.m(e,null)):F&&(we(),$(F,1,1,()=>{F=null}),ke())},i(K){m||(b(r.$$.fragment,K),b(w),b(A),b(E),b(T),b(I),b(P),b(F),m=!0)},o(K){$(r.$$.fragment,K),$(w),$(A),$(E),$(T),$(I),$(P),$(F),m=!1},d(K){K&&M(e),B(r),Dn(y,K),w&&w.d(),A&&A.d(),E&&E.d(),T&&T.d(),I&&I.d(),P&&P.d(),F&&F.d()}}}function rje(n){var u;let e,t,r,i,a,o;t=new mn({props:{readonly:!0,value:n[16],options:[n[16]]}}),t.$on("click",function(){Mn(n[6].show)&&n[6].show.apply(this,arguments)});let l=((u=n[1])==null?void 0:u.type)==="query"&&TI(n),s={anchor:n[5],dataCy:`dataSource-popover-${n[4].selectedComponentId}`,$$slots:{default:[nje]},$$scope:{ctx:n}};return a=new Rd({props:s}),n[40](a),{c(){e=J("div"),O(t.$$.fragment),r=U(),l&&l.c(),i=U(),O(a.$$.fragment),D(e,"class","container svelte-xmd5g6")},m(c,f){C(c,e,f),H(t,e,null),x(e,r),l&&l.m(e,null),n[31](e),C(c,i,f),H(a,c,f),o=!0},p(c,f){var _;n=c;const h={};f[0]&65536&&(h.value=n[16]),f[0]&65536&&(h.options=[n[16]]),t.$set(h),((_=n[1])==null?void 0:_.type)==="query"?l?(l.p(n,f),f[0]&2&&b(l,1)):(l=TI(n),l.c(),b(l,1),l.m(e,null)):l&&(we(),$(l,1,1,()=>{l=null}),ke());const m={};f[0]&32&&(m.anchor=n[5]),f[0]&16&&(m.dataCy=`dataSource-popover-${n[4].selectedComponentId}`),f[0]&65038|f[2]&64&&(m.$$scope={dirty:f,ctx:n}),a.$set(m)},i(c){o||(b(t.$$.fragment,c),b(l),b(a.$$.fragment,c),o=!0)},o(c){$(t.$$.fragment,c),$(l),$(a.$$.fragment,c),o=!1},d(c){c&&M(e),B(t),l&&l.d(),n[31](null),c&&M(i),n[40](null),B(a,c)}}}function ije(n,e,t){let r,i,a,o,l,s,u,c,f,h,m,_,y,w,A;Ne(n,Di,gt=>t(41,h=gt)),Ne(n,ya,gt=>t(25,m=gt)),Ne(n,w5,gt=>t(42,_=gt)),Ne(n,Xt,gt=>t(4,y=gt)),Ne(n,ml,gt=>t(26,w=gt)),Ne(n,Hr,gt=>t(27,A=gt));let{value:E={}}=e,{otherSources:T}=e,{showAllQueries:I}=e,{bindings:P=[]}=e,{showDataProviders:F=!0}=e;const j=Un(),q=["attachment","array"];let W,te,Q,oe;const ie=gt=>{j("change",gt),te.hide()},K=gt=>{const Ze=h.list.find(We=>We._id===gt.datasourceId).source;return _[Ze].query[gt.queryVerb]},G=gt=>{var Ze;return((Ze=m.list.find(We=>We._id===(gt==null?void 0:gt._id)))==null?void 0:Ze.parameters)||[]},ne=gt=>h.list.find(Ze=>Ze._id===(gt==null?void 0:gt.datasourceId)),se=()=>{t(8,oe=E.queryParams),Q.show()},pe=()=>{ie({...E,queryParams:oe}),Q.hide()};function ze(gt){oe=gt,t(8,oe)}function he(gt){P=gt,t(0,P)}function $e(gt){He[gt?"unshift":"push"](()=>{Q=gt,t(7,Q)})}function Ce(gt){He[gt?"unshift":"push"](()=>{W=gt,t(5,W)})}const ge=gt=>ie(gt),st=gt=>ie(gt),Ae=gt=>ie(gt),ve=gt=>ie(gt),je=gt=>ie(gt),xe=gt=>ie(gt),_e=gt=>ie(gt),ut=gt=>ie(gt);function dt(gt){He[gt?"unshift":"push"](()=>{te=gt,t(6,te)})}return n.$$set=gt=>{"value"in gt&&t(1,E=gt.value),"otherSources"in gt&&t(2,T=gt.otherSources),"showAllQueries"in gt&&t(23,I=gt.showAllQueries),"bindings"in gt&&t(0,P=gt.bindings),"showDataProviders"in gt&&t(3,F=gt.showDataProviders)},n.$$.update=()=>{var gt;n.$$.dirty[0]&2&&t(16,r=(gt=E==null?void 0:E.label)!=null?gt:"Choose an option"),n.$$.dirty[0]&134217728&&t(15,i=A.list.map(Ze=>({label:Ze.name,tableId:Ze._id,type:"table"}))),n.$$.dirty[0]&134217728&&t(14,a=A.list.reduce((Ze,We)=>{let tt=Object.entries(We.views||{}).map(([Bt,an])=>({label:Bt,name:Bt,...an,type:"view"}));return[...Ze,...tt]},[])),n.$$.dirty[0]&41943040&&t(13,o=m.list.filter(Ze=>I||Ze.queryVerb==="read"||Ze.readable).map(Ze=>({label:Ze.name,name:Ze.name,...Ze,type:"query"}))),n.$$.dirty[0]&67108880&&t(24,l=l6(w,y.selectedComponentId)),n.$$.dirty[0]&16777216&&t(12,s=l.filter(Ze=>{var We;return(We=Ze._component)==null?void 0:We.endsWith("/dataprovider")}).map(Ze=>({label:Ze._instanceName,name:Ze._instanceName,providerId:Ze._id,value:`{{ literal ${Mo(Ze._id)} }}`,type:"provider"}))),n.$$.dirty[0]&1&&t(11,u=P.filter(Ze=>{var We;return((We=Ze.fieldSchema)==null?void 0:We.type)==="link"}).map(Ze=>{const{providerId:We,readableBinding:tt,fieldSchema:Bt}=Ze||{},{name:an,tableId:Tt}=Bt||{},de=Mo(We);return{providerId:We,label:tt,fieldName:an,tableId:Tt,type:"link",rowId:`{{ ${de}.${Mo("_id")} }}`,rowTableId:`{{ ${de}.${Mo("tableId")} }}`}})),n.$$.dirty[0]&1&&t(10,c=P.filter(Ze=>{var We;return q.includes((We=Ze.fieldSchema)==null?void 0:We.type)}).map(Ze=>{const{providerId:We,readableBinding:tt,runtimeBinding:Bt}=Ze,{name:an,type:Tt,tableId:de}=Ze.fieldSchema;return{providerId:We,label:tt,fieldName:an,fieldType:Tt,tableId:de,type:"field",value:`{{ literal ${Bt} }}`}})),n.$$.dirty[0]&1&&t(9,f=P.filter(Ze=>{var We;return((We=Ze.fieldSchema)==null?void 0:We.type)==="jsonarray"}).map(Ze=>{const{providerId:We,readableBinding:tt,runtimeBinding:Bt,tableId:an}=Ze,{name:Tt,type:de,prefixKeys:Xe}=Ze.fieldSchema;return{providerId:We,label:tt,fieldName:Tt,fieldType:de,tableId:an,prefixKeys:Xe,type:"jsonarray",value:`{{ literal ${Bt} }}`}}))},[P,E,T,F,y,W,te,Q,oe,f,c,u,s,o,a,i,r,ie,K,G,ne,se,pe,I,l,m,w,A,ze,he,$e,Ce,ge,st,Ae,ve,je,xe,_e,ut,dt]}class hX extends Re{constructor(e){super(),Ve(this,e,ije,rje,Oe,{value:1,otherSources:2,showAllQueries:23,bindings:0,showDataProviders:3},null,[-1,-1,-1])}}function aje(n){let e,t;return e=new mn({props:{options:n[1],value:n[0]}}),e.$on("change",n[3]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&2&&(a.options=r[1]),i&1&&(a.value=r[0]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function oje(n,e,t){let r,i;Ne(n,Di,l=>t(2,i=l));let{value:a=null}=e;function o(l){Bn.call(this,n,l)}return n.$$set=l=>{"value"in l&&t(0,a=l.value)},n.$$.update=()=>{n.$$.dirty&4&&t(1,r=i.list.filter(l=>{var s;return l.source==="S3"&&!((s=l.config)!=null&&s.endpoint)}).map(l=>({label:l.name,value:l._id})))},[a,r,i,o]}class lje extends Re{constructor(e){super(),Ve(this,e,oje,aje,Oe,{value:0})}}function sje(n){let e,t;return e=new mn({props:{value:n[0],placeholder:null,options:n[1],getOptionLabel:uje,getOptionValue:n[2]}}),e.$on("change",n[6]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&1&&(a.value=r[0]),i&2&&(a.options=r[1]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}const uje=n=>n._instanceName;function cje(n,e,t){let r,i,a,o;Ne(n,Xt,f=>t(4,a=f)),Ne(n,ml,f=>t(5,o=f));let{value:l}=e;const s=Un(),u=f=>`{{ literal ${Mo(f._id)} }}`;ar(()=>{!(l&&i.find(h=>u(h)===l)!=null)&&i.length&&s("change",u(i[i.length-1]))});function c(f){Bn.call(this,n,f)}return n.$$set=f=>{"value"in f&&t(0,l=f.value)},n.$$.update=()=>{n.$$.dirty&48&&t(3,r=k4(o==null?void 0:o.props,a.selectedComponentId)),n.$$.dirty&8&&t(1,i=r.filter(f=>{var h;return(h=f._component)==null?void 0:h.endsWith("/dataprovider")}))},[l,i,u,r,a,o,c]}class fje extends Re{constructor(e){super(),Ve(this,e,cje,sje,Oe,{value:0})}}function I7(n,{from:e,to:t},r={}){const i=getComputedStyle(n),a=i.transform==="none"?"":i.transform,[o,l]=i.transformOrigin.split(" ").map(parseFloat),s=e.left+e.width*o/t.width-(t.left+o),u=e.top+e.height*l/t.height-(t.top+l),{delay:c=0,duration:f=m=>Math.sqrt(m)*120,easing:h=Uw}=r;return{delay:c,duration:Mn(f)?f(Math.sqrt(s*s+u*u)):f,easing:h,css:(m,_)=>{const y=_*s,w=_*u,A=m+_*e.width/t.width,E=m+_*e.height/t.height;return`transform: ${a} translate(${y}px, ${w}px) scale(${A}, ${E});`}}}const pje="finalize",dje="consider";function s6(n,e,t){n.dispatchEvent(new CustomEvent(pje,{detail:{items:e,info:t}}))}function pp(n,e,t){n.dispatchEvent(new CustomEvent(dje,{detail:{items:e,info:t}}))}const Q_="draggedEntered",P7="draggedLeft",eb="draggedOverIndex",Iz="draggedLeftDocument",jv={LEFT_FOR_ANOTHER:"leftForAnother",OUTSIDE_OF_ANY:"outsideOfAny"};function hje(n,e,t){n.dispatchEvent(new CustomEvent(Q_,{detail:{indexObj:e,draggedEl:t}}))}function mje(n,e,t){n.dispatchEvent(new CustomEvent(P7,{detail:{draggedEl:e,type:jv.LEFT_FOR_ANOTHER,theOtherDz:t}}))}function gje(n,e){n.dispatchEvent(new CustomEvent(P7,{detail:{draggedEl:e,type:jv.OUTSIDE_OF_ANY}}))}function vje(n,e,t){n.dispatchEvent(new CustomEvent(eb,{detail:{indexObj:e,draggedEl:t}}))}function _je(n){window.dispatchEvent(new CustomEvent(Iz,{detail:{draggedEl:n}}))}const f2={DRAG_STARTED:"dragStarted",DRAGGED_ENTERED:Q_,DRAGGED_ENTERED_ANOTHER:"dragEnteredAnother",DRAGGED_OVER_INDEX:eb,DRAGGED_LEFT:P7,DRAGGED_LEFT_ALL:"draggedLeftAll",DROPPED_INTO_ZONE:"droppedIntoZone",DROPPED_INTO_ANOTHER:"droppedIntoAnother",DROPPED_OUTSIDE_OF_ANY:"droppedOutsideOfAny",DRAG_STOPPED:"dragStopped"},G2={POINTER:"pointer",KEYBOARD:"keyboard"},tb="isDndShadowItem",Pz="data-is-dnd-shadow-item",Vz="id:dnd-shadow-placeholder-0000",bje="dnd-action-dragged-el";let iu="id",uw=0;function mX(){uw++}function gX(){if(uw===0)throw new Error("Bug! trying to decrement when there are no dropzones");uw--}const yje=typeof window>"u";function vX(n){let e;const t=n.getBoundingClientRect(),r=getComputedStyle(n),i=r.transform;if(i){let a,o,l,s;if(i.startsWith("matrix3d("))e=i.slice(9,-1).split(/, /),a=+e[0],o=+e[5],l=+e[12],s=+e[13];else if(i.startsWith("matrix("))e=i.slice(7,-1).split(/, /),a=+e[0],o=+e[3],l=+e[4],s=+e[5];else return t;const u=r.transformOrigin,c=t.x-l-(1-a)*parseFloat(u),f=t.y-s-(1-o)*parseFloat(u.slice(u.indexOf(" ")+1)),h=a?t.width/a:n.offsetWidth,m=o?t.height/o:n.offsetHeight;return{x:c,y:f,width:h,height:m,top:f,right:c+h,bottom:f+m,left:c}}else return t}function _X(n){const e=vX(n);return{top:e.top+window.scrollY,bottom:e.bottom+window.scrollY,left:e.left+window.scrollX,right:e.right+window.scrollX}}function Rz(n){const e=n.getBoundingClientRect();return{top:e.top+window.scrollY,bottom:e.bottom+window.scrollY,left:e.left+window.scrollX,right:e.right+window.scrollX}}function bX(n){return{x:(n.left+n.right)/2,y:(n.top+n.bottom)/2}}function $je(n,e){return Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2))}function Nz(n,e){return n.y<=e.bottom&&n.y>=e.top&&n.x>=e.left&&n.x<=e.right}function a7(n){return bX(Rz(n))}function YI(n,e){const t=a7(n),r=_X(e);return Nz(t,r)}function wje(n,e){const t=a7(n),r=a7(e);return $je(t,r)}function kje(n){const e=Rz(n);return e.right<0||e.left>document.documentElement.scrollWidth||e.bottom<0||e.top>document.documentElement.scrollHeight}function zje(n,e){const t=Rz(e);return Nz(n,t)?{top:n.y-t.top,bottom:t.bottom-n.y,left:n.x-t.left,right:Math.min(t.right,document.documentElement.clientWidth)-n.x}:null}let xh;function yX(){xh=new Map}yX();function Aje(n){const e=Array.from(n.children).findIndex(t=>t.getAttribute(Pz));if(e>=0)return xh.has(n)||xh.set(n,new Map),xh.get(n).set(e,_X(n.children[e])),e}function Mje(n,e){if(!YI(n,e))return null;const t=e.children;if(t.length===0)return{index:0,isProximityBased:!0};const r=Aje(e);for(let o=0;o<t.length;o++)if(YI(n,t[o])){const l=xh.has(e)&&xh.get(e).get(o);return l&&!Nz(a7(n),l)?{index:r,isProximityBased:!1}:{index:o,isProximityBased:!1}}let i=Number.MAX_VALUE,a;for(let o=0;o<t.length;o++){const l=wje(n,t[o]);l<i&&(i=l,a=o)}return{index:a,isProximityBased:!0}}const eg=25;function $X(){let n;function e(){n={directionObj:void 0,stepPx:0}}e();function t(a){const{directionObj:o,stepPx:l}=n;o&&(a.scrollBy(o.x*l,o.y*l),window.requestAnimationFrame(()=>t(a)))}function r(a){return eg-a}function i(a,o){if(!o)return!1;const l=zje(a,o);if(l===null)return e(),!1;const s=!!n.directionObj;let[u,c]=[!1,!1];return o.scrollHeight>o.clientHeight&&(l.bottom<eg?(u=!0,n.directionObj={x:0,y:1},n.stepPx=r(l.bottom)):l.top<eg&&(u=!0,n.directionObj={x:0,y:-1},n.stepPx=r(l.top)),!s&&u)||o.scrollWidth>o.clientWidth&&(l.right<eg?(c=!0,n.directionObj={x:1,y:0},n.stepPx=r(l.right)):l.left<eg&&(c=!0,n.directionObj={x:-1,y:0},n.stepPx=r(l.left)),!s&&c)?(t(o),!0):(e(),!1)}return{scrollIfNeeded:i,resetScrolling:e}}function Vy(n){return JSON.stringify(n,null,2)}function KI(n){if(!n)throw new Error("cannot get depth of a falsy node");return wX(n,0)}function wX(n,e=0){return n.parentElement?wX(n.parentElement,e+1):e-1}function Cje(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!{}.hasOwnProperty.call(e,t)||e[t]!==n[t])return!1;return!0}function Sje(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}const Lje=200,XI=10,{scrollIfNeeded:Eje,resetScrolling:Tje}=$X();let cw;function Dje(n,e,t=Lje){let r,i,a=!1,o;const l=Array.from(e).sort((u,c)=>KI(c)-KI(u));function s(){const u=a7(n);if(!Eje(u,r)&&o&&Math.abs(o.x-u.x)<XI&&Math.abs(o.y-u.y)<XI){cw=window.setTimeout(s,t);return}if(kje(n)){_je(n);return}o=u;let f=!1;for(const h of l){const m=Mje(n,h);if(m===null)continue;const{index:_}=m;f=!0,h!==r?(r&&mje(r,n,h),hje(h,m,n),r=h):_!==i&&(vje(h,m,n),i=_);break}!f&&a&&r?(gje(r,n),r=void 0,i=void 0,a=!1):a=!0,cw=window.setTimeout(s,t)}s()}function Hje(){clearTimeout(cw),Tje(),yX()}const Bje=300;let xv;function Uv(n){const e=n.touches?n.touches[0]:n;xv={x:e.clientX,y:e.clientY}}const{scrollIfNeeded:Oje,resetScrolling:Ije}=$X();let kX;function zX(){xv&&Oje(xv,document.documentElement),kX=window.setTimeout(zX,Bje)}function Pje(){window.addEventListener("mousemove",Uv),window.addEventListener("touchmove",Uv),zX()}function Vje(){window.removeEventListener("mousemove",Uv),window.removeEventListener("touchmove",Uv),xv=void 0,window.clearTimeout(kX),Ije()}const Rje=.2;function ld(n){return`${n} ${Rje}s ease`}function Nje(n,e){const t=n.getBoundingClientRect(),r=n.cloneNode(!0);AX(n,r),r.id=bje,r.style.position="fixed";let i=t.top,a=t.left;if(r.style.top=`${i}px`,r.style.left=`${a}px`,e){const o=bX(t);i-=o.y-e.y,a-=o.x-e.x,window.setTimeout(()=>{r.style.top=`${i}px`,r.style.left=`${a}px`},0)}return r.style.margin="0",r.style.boxSizing="border-box",r.style.height=`${t.height}px`,r.style.width=`${t.width}px`,r.style.transition=`${ld("top")}, ${ld("left")}, ${ld("background-color")}, ${ld("opacity")}, ${ld("color")} `,window.setTimeout(()=>r.style.transition+=`, ${ld("width")}, ${ld("height")}`,0),r.style.zIndex="9999",r.style.cursor="grabbing",r}function Fje(n){n.style.cursor="grab"}function jje(n,e,t,r,i){const a=e.getBoundingClientRect(),o=n.getBoundingClientRect(),l=a.width-o.width,s=a.height-o.height;if(l||s){const u={left:(t-o.left)/o.width,top:(r-o.top)/o.height};n.style.height=`${a.height}px`,n.style.width=`${a.width}px`,n.style.left=`${parseFloat(n.style.left)-u.left*l}px`,n.style.top=`${parseFloat(n.style.top)-u.top*s}px`}AX(e,n),i()}function AX(n,e){const t=window.getComputedStyle(n);Array.from(t).filter(r=>r.startsWith("background")||r.startsWith("padding")||r.startsWith("font")||r.startsWith("text")||r.startsWith("align")||r.startsWith("justify")||r.startsWith("display")||r.startsWith("flex")||r.startsWith("border")||r==="opacity"||r==="color"||r==="list-style-type").forEach(r=>e.style.setProperty(r,t.getPropertyValue(r),t.getPropertyPriority(r)))}function xje(n,e){n.draggable=!1,n.ondragstart=()=>!1,e?(n.style.userSelect="",n.style.WebkitUserSelect="",n.style.cursor=""):(n.style.userSelect="none",n.style.WebkitUserSelect="none",n.style.cursor="grab")}function Uje(n){n.style.display="none",n.style.position="fixed",n.style.zIndex="-5"}function qje(n){n.style.visibility="hidden",n.setAttribute(Pz,"true")}function Wje(n){n.style.visibility="",n.removeAttribute(Pz)}function W9(n,e=()=>{},t=()=>[]){n.forEach(r=>{const i=e(r);Object.keys(i).forEach(a=>{r.style[a]=i[a]}),t(r).forEach(a=>r.classList.add(a))})}function qv(n,e=()=>{},t=()=>[]){n.forEach(r=>{const i=e(r);Object.keys(i).forEach(a=>{r.style[a]=""}),t(r).forEach(a=>r.classList.contains(a)&&r.classList.remove(a))})}function Gje(n){const e=n.style.minHeight;n.style.minHeight=window.getComputedStyle(n).getPropertyValue("height");const t=n.style.minWidth;return n.style.minWidth=window.getComputedStyle(n).getPropertyValue("width"),function(){n.style.minHeight=e,n.style.minWidth=t}}const Yje="--any--",Kje=100,JI=3,ZI={outline:"rgba(255, 255, 102, 0.7) solid 2px"};let J4,Iu,Ef,nb,is,rb,u6,Sf,K5,Yf,Hh=!1,Fz=!1,jz,V7=!1;const D3=new Map,Ts=new Map,Ry=new WeakMap;function Xje(n,e){D3.has(e)||D3.set(e,new Set),D3.get(e).has(n)||(D3.get(e).add(n),mX())}function QI(n,e){D3.get(e).delete(n),gX(),D3.get(e).size===0&&D3.delete(e)}function Jje(){Pje();const n=D3.get(nb);for(const t of n)t.addEventListener(Q_,MX),t.addEventListener(P7,CX),t.addEventListener(eb,SX);window.addEventListener(Iz,c6);const e=Math.max(Kje,...Array.from(n.keys()).map(t=>Ts.get(t).dropAnimationDurationMs));Dje(Iu,n,e*1.07)}function Zje(){Vje();const n=D3.get(nb);for(const e of n)e.removeEventListener(Q_,MX),e.removeEventListener(P7,CX),e.removeEventListener(eb,SX);window.removeEventListener(Iz,c6),Hje()}function Qje(n){return n.findIndex(e=>e[iu]===Vz)}function ib(n){return n.findIndex(e=>!!e[tb]&&e[iu]!==Vz)}function MX(n){let{items:e,dropFromOthersDisabled:t}=Ts.get(n.currentTarget);if(t&&n.currentTarget!==is)return;if(V7=!1,e=e.filter(o=>o[iu]!==u6[iu]),is!==n.currentTarget){const l=Ts.get(is).items.filter(s=>!s[tb]);pp(is,l,{trigger:f2.DRAGGED_ENTERED_ANOTHER,id:Ef[iu],source:G2.POINTER})}else{const o=Qje(e);o!==-1&&e.splice(o,1)}const{index:r,isProximityBased:i}=n.detail.indexObj,a=i&&r===n.currentTarget.children.length-1?r+1:r;Sf=n.currentTarget,e.splice(a,0,u6),pp(n.currentTarget,e,{trigger:f2.DRAGGED_ENTERED,id:Ef[iu],source:G2.POINTER})}function CX(n){if(!Hh)return;const{items:e,dropFromOthersDisabled:t}=Ts.get(n.currentTarget);if(t&&n.currentTarget!==is&&n.currentTarget!==Sf)return;const r=ib(e),i=e.splice(r,1)[0];Sf=void 0;const{type:a,theOtherDz:o}=n.detail;if(a===jv.OUTSIDE_OF_ANY||a===jv.LEFT_FOR_ANOTHER&&o!==is&&Ts.get(o).dropFromOthersDisabled){V7=!0,Sf=is;const l=Ts.get(is).items;l.splice(rb,0,i),pp(is,l,{trigger:f2.DRAGGED_LEFT_ALL,id:Ef[iu],source:G2.POINTER})}pp(n.currentTarget,e,{trigger:f2.DRAGGED_LEFT,id:Ef[iu],source:G2.POINTER})}function SX(n){const{items:e,dropFromOthersDisabled:t}=Ts.get(n.currentTarget);if(t&&n.currentTarget!==is)return;V7=!1;const{index:r}=n.detail.indexObj,i=ib(e);e.splice(i,1),e.splice(r,0,u6),pp(n.currentTarget,e,{trigger:f2.DRAGGED_OVER_INDEX,id:Ef[iu],source:G2.POINTER})}function Wv(n){n.preventDefault();const e=n.touches?n.touches[0]:n;Yf={x:e.clientX,y:e.clientY},Iu.style.transform=`translate3d(${Yf.x-K5.x}px, ${Yf.y-K5.y}px, 0)`}function c6(){Fz=!0,window.removeEventListener("mousemove",Wv),window.removeEventListener("touchmove",Wv),window.removeEventListener("mouseup",c6),window.removeEventListener("touchend",c6),Zje(),Fje(Iu),Sf||(Sf=is);let{items:n,type:e}=Ts.get(Sf);qv(D3.get(e),i=>Ts.get(i).dropTargetStyle,i=>Ts.get(i).dropTargetClasses);let t=ib(n);t===-1&&(t=rb),n=n.map(i=>i[tb]?Ef:i);function r(){jz(),s6(Sf,n,{trigger:V7?f2.DROPPED_OUTSIDE_OF_ANY:f2.DROPPED_INTO_ZONE,id:Ef[iu],source:G2.POINTER}),Sf!==is&&s6(is,Ts.get(is).items,{trigger:f2.DROPPED_INTO_ANOTHER,id:Ef[iu],source:G2.POINTER}),Wje(Sf.children[t]),txe()}exe(t,r)}function exe(n,e){const t=vX(Sf.children[n]),r={x:t.left-parseFloat(Iu.style.left),y:t.top-parseFloat(Iu.style.top)},{dropAnimationDurationMs:i}=Ts.get(Sf),a=`transform ${i}ms ease`;Iu.style.transition=Iu.style.transition?Iu.style.transition+","+a:a,Iu.style.transform=`translate3d(${r.x}px, ${r.y}px, 0)`,window.setTimeout(e,i)}function txe(){Iu.remove(),J4.remove(),Iu=void 0,J4=void 0,Ef=void 0,nb=void 0,is=void 0,rb=void 0,u6=void 0,Sf=void 0,K5=void 0,Yf=void 0,Hh=!1,Fz=!1,jz=void 0,V7=!1}function nxe(n,e){const t={items:void 0,type:void 0,flipDurationMs:0,dragDisabled:!1,morphDisabled:!1,dropFromOthersDisabled:!1,dropTargetStyle:ZI,dropTargetClasses:[],transformDraggedElement:()=>{},centreDraggedOnCursor:!1};let r=new Map;function i(){window.addEventListener("mousemove",l,{passive:!1}),window.addEventListener("touchmove",l,{passive:!1,capture:!1}),window.addEventListener("mouseup",o,{passive:!1}),window.addEventListener("touchend",o,{passive:!1})}function a(){window.removeEventListener("mousemove",l),window.removeEventListener("touchmove",l),window.removeEventListener("mouseup",o),window.removeEventListener("touchend",o)}function o(){a(),J4=void 0,K5=void 0,Yf=void 0}function l(f){f.preventDefault();const h=f.touches?f.touches[0]:f;Yf={x:h.clientX,y:h.clientY},(Math.abs(Yf.x-K5.x)>=JI||Math.abs(Yf.y-K5.y)>=JI)&&(a(),u())}function s(f){if(f.target!==f.currentTarget&&(f.target.value!==void 0||f.target.isContentEditable)||f.button||Hh)return;f.stopPropagation();const h=f.touches?f.touches[0]:f;K5={x:h.clientX,y:h.clientY},Yf={...K5},J4=f.currentTarget,i()}function u(){Hh=!0;const f=r.get(J4);rb=f,is=J4.parentElement;const h=is.getRootNode(),m=h.body||h,{items:_,type:y,centreDraggedOnCursor:w}=t;Ef={..._[f]},nb=y,u6={...Ef,[tb]:!0};const A={...u6,[iu]:Vz};Iu=Nje(J4,w&&Yf);function E(){Iu.parentElement?window.requestAnimationFrame(E):(m.appendChild(Iu),Iu.focus(),Jje(),Uje(J4),m.appendChild(J4))}window.requestAnimationFrame(E),W9(Array.from(D3.get(t.type)).filter(T=>T===is||!Ts.get(T).dropFromOthersDisabled),T=>Ts.get(T).dropTargetStyle,T=>Ts.get(T).dropTargetClasses),_.splice(f,1,A),jz=Gje(is),pp(is,_,{trigger:f2.DRAG_STARTED,id:Ef[iu],source:G2.POINTER}),window.addEventListener("mousemove",Wv,{passive:!1}),window.addEventListener("touchmove",Wv,{passive:!1,capture:!1}),window.addEventListener("mouseup",c6,{passive:!1}),window.addEventListener("touchend",c6,{passive:!1})}function c({items:f=void 0,flipDurationMs:h=0,type:m=Yje,dragDisabled:_=!1,morphDisabled:y=!1,dropFromOthersDisabled:w=!1,dropTargetStyle:A=ZI,dropTargetClasses:E=[],transformDraggedElement:T=()=>{},centreDraggedOnCursor:I=!1}){t.dropAnimationDurationMs=h,t.type&&m!==t.type&&QI(n,t.type),t.type=m,Xje(n,m),t.items=[...f],t.dragDisabled=_,t.morphDisabled=y,t.transformDraggedElement=T,t.centreDraggedOnCursor=I,Hh&&!Fz&&(!Cje(A,t.dropTargetStyle)||!Sje(E,t.dropTargetClasses))&&(qv([n],()=>t.dropTargetStyle,()=>E),W9([n],()=>A,()=>E)),t.dropTargetStyle=A,t.dropTargetClasses=[...E];function P(j,q){return Ts.get(j)?Ts.get(j)[q]:t[q]}Hh&&t.dropFromOthersDisabled!==w&&(w?qv([n],j=>P(j,"dropTargetStyle"),j=>P(j,"dropTargetClasses")):W9([n],j=>P(j,"dropTargetStyle"),j=>P(j,"dropTargetClasses"))),t.dropFromOthersDisabled=w,Ts.set(n,t);const F=ib(t.items);for(let j=0;j<n.children.length;j++){const q=n.children[j];if(xje(q,_),j===F){y||jje(Iu,q,Yf.x,Yf.y,()=>t.transformDraggedElement(Iu,Ef,j)),qje(q);continue}q.removeEventListener("mousedown",Ry.get(q)),q.removeEventListener("touchstart",Ry.get(q)),_||(q.addEventListener("mousedown",s),q.addEventListener("touchstart",s),Ry.set(q,s)),r.set(q,j)}}return c(e),{update:f=>{c(f)},destroy:()=>{QI(n,t.type),Ts.delete(n)}}}const fw={DND_ZONE_ACTIVE:"dnd-zone-active",DND_ZONE_DRAG_DISABLED:"dnd-zone-drag-disabled"},rxe={[fw.DND_ZONE_ACTIVE]:"Tab to one the items and press space-bar or enter to start dragging it",[fw.DND_ZONE_DRAG_DISABLED]:"This is a disabled drag and drop list"},ixe="dnd-action-aria-alert";let o2;function eP(){o2=document.createElement("div"),function(){o2.id=ixe,o2.style.position="fixed",o2.style.bottom="0",o2.style.left="0",o2.style.zIndex="-5",o2.style.opacity="0",o2.style.height="0",o2.style.width="0",o2.setAttribute("role","alert")}(),document.body.prepend(o2),Object.entries(rxe).forEach(([n,e])=>document.body.prepend(oxe(n,e)))}function axe(){return yje?null:(document.readyState==="complete"?eP():window.addEventListener("DOMContentLoaded",eP),{...fw})}function oxe(n,e){const t=document.createElement("div");return t.id=n,t.innerHTML=`<p>${e}</p>`,t.style.display="none",t.style.position="fixed",t.style.zIndex="-5",t}function Uh(n){o2.innerHTML="";const e=document.createTextNode(n);o2.appendChild(e),o2.style.display="none",o2.style.display="inline"}const lxe="--any--",tP={outline:"rgba(255, 255, 102, 0.7) solid 2px"};let Kf=!1,pw,kc,Md="",hd,g4,Z5="";const Gv=new WeakSet,nP=new WeakMap,rP=new WeakMap,dw=new Map,Ou=new Map,E3=new Map,iP=axe();function sxe(n,e){E3.size===0&&(window.addEventListener("keydown",LX),window.addEventListener("click",EX)),E3.has(e)||E3.set(e,new Set),E3.get(e).has(n)||(E3.get(e).add(n),mX())}function aP(n,e){kc===n&&o7(),E3.get(e).delete(n),gX(),E3.get(e).size===0&&E3.delete(e),E3.size===0&&(window.removeEventListener("keydown",LX),window.removeEventListener("click",EX))}function LX(n){if(!!Kf)switch(n.key){case"Escape":{o7();break}}}function EX(){!Kf||Gv.has(document.activeElement)||o7()}function uxe(n){if(!Kf)return;const e=n.currentTarget;if(e===kc)return;Md=e.getAttribute("aria-label")||"";const{items:t}=Ou.get(kc),r=t.find(u=>u[iu]===g4),i=t.indexOf(r),a=t.splice(i,1)[0],{items:o,autoAriaDisabled:l}=Ou.get(e);e.getBoundingClientRect().top<kc.getBoundingClientRect().top||e.getBoundingClientRect().left<kc.getBoundingClientRect().left?(o.push(a),l||Uh(`Moved item ${Z5} to the end of the list ${Md}`)):(o.unshift(a),l||Uh(`Moved item ${Z5} to the beginning of the list ${Md}`)),s6(kc,t,{trigger:f2.DROPPED_INTO_ANOTHER,id:g4,source:G2.KEYBOARD}),s6(e,o,{trigger:f2.DROPPED_INTO_ZONE,id:g4,source:G2.KEYBOARD}),kc=e}function TX(){dw.forEach(({update:n},e)=>n(Ou.get(e)))}function o7(n=!0){Ou.get(kc).autoAriaDisabled||Uh(`Stopped dragging item ${Z5}`),Gv.has(document.activeElement)&&document.activeElement.blur(),n&&pp(kc,Ou.get(kc).items,{trigger:f2.DRAG_STOPPED,id:g4,source:G2.KEYBOARD}),qv(E3.get(pw),e=>Ou.get(e).dropTargetStyle,e=>Ou.get(e).dropTargetClasses),hd=null,g4=null,Z5="",pw=null,kc=null,Md="",Kf=!1,TX()}function cxe(n,e){const t={items:void 0,type:void 0,dragDisabled:!1,zoneTabIndex:0,dropFromOthersDisabled:!1,dropTargetStyle:tP,dropTargetClasses:[],autoAriaDisabled:!1};function r(c,f,h){c.length<=1||c.splice(h,1,c.splice(f,1,c[h])[0])}function i(c){switch(c.key){case"Enter":case" ":{if((c.target.disabled!==void 0||c.target.href||c.target.isContentEditable)&&!Gv.has(c.target))return;c.preventDefault(),c.stopPropagation(),Kf?o7():a(c);break}case"ArrowDown":case"ArrowRight":{if(!Kf)return;c.preventDefault(),c.stopPropagation();const{items:f}=Ou.get(n),h=Array.from(n.children),m=h.indexOf(c.currentTarget);m<h.length-1&&(t.autoAriaDisabled||Uh(`Moved item ${Z5} to position ${m+2} in the list ${Md}`),r(f,m,m+1),s6(n,f,{trigger:f2.DROPPED_INTO_ZONE,id:g4,source:G2.KEYBOARD}));break}case"ArrowUp":case"ArrowLeft":{if(!Kf)return;c.preventDefault(),c.stopPropagation();const{items:f}=Ou.get(n),m=Array.from(n.children).indexOf(c.currentTarget);m>0&&(t.autoAriaDisabled||Uh(`Moved item ${Z5} to position ${m} in the list ${Md}`),r(f,m,m-1),s6(n,f,{trigger:f2.DROPPED_INTO_ZONE,id:g4,source:G2.KEYBOARD}));break}}}function a(c){l(c.currentTarget),kc=n,pw=t.type,Kf=!0;const f=Array.from(E3.get(t.type)).filter(h=>h===kc||!Ou.get(h).dropFromOthersDisabled);if(W9(f,h=>Ou.get(h).dropTargetStyle,h=>Ou.get(h).dropTargetClasses),!t.autoAriaDisabled){let h=`Started dragging item ${Z5}. Use the arrow keys to move it within its list ${Md}`;f.length>1&&(h+=", or tab to another list in order to move the item into it"),Uh(h)}pp(n,Ou.get(n).items,{trigger:f2.DRAG_STARTED,id:g4,source:G2.KEYBOARD}),TX()}function o(c){!Kf||c.currentTarget!==hd&&(c.stopPropagation(),o7(!1),a(c))}function l(c){const{items:f}=Ou.get(n),h=Array.from(n.children),m=h.indexOf(c);hd=c,hd.tabIndex=0,g4=f[m][iu],Z5=h[m].getAttribute("aria-label")||""}function s({items:c=[],type:f=lxe,dragDisabled:h=!1,zoneTabIndex:m=0,dropFromOthersDisabled:_=!1,dropTargetStyle:y=tP,dropTargetClasses:w=[],autoAriaDisabled:A=!1}){t.items=[...c],t.dragDisabled=h,t.dropFromOthersDisabled=_,t.zoneTabIndex=m,t.dropTargetStyle=y,t.dropTargetClasses=w,t.autoAriaDisabled=A,A||(n.setAttribute("aria-disabled",h),n.setAttribute("role","list"),n.setAttribute("aria-describedby",h?iP.DND_ZONE_DRAG_DISABLED:iP.DND_ZONE_ACTIVE)),t.type&&f!==t.type&&aP(n,t.type),t.type=f,sxe(n,f),Ou.set(n,t),Kf?n.tabIndex=n===kc||hd.contains(n)||t.dropFromOthersDisabled||kc&&t.type!==Ou.get(kc).type?-1:0:n.tabIndex=t.zoneTabIndex,n.addEventListener("focus",uxe);for(let E=0;E<n.children.length;E++){const T=n.children[E];Gv.add(T),T.tabIndex=Kf?-1:0,A||T.setAttribute("role","listitem"),T.removeEventListener("keydown",nP.get(T)),T.removeEventListener("click",rP.get(T)),h||(T.addEventListener("keydown",i),nP.set(T,i),T.addEventListener("click",o),rP.set(T,o)),Kf&&t.items[E][iu]===g4&&(hd=T,hd.tabIndex=0,T.focus())}}s(e);const u={update:c=>{s(c)},destroy:()=>{aP(n,t.type),Ou.delete(n),dw.delete(n)}};return dw.set(n,u),u}function ab(n,e){oP(e);const t=nxe(n,e),r=cxe(n,e);return{update:i=>{oP(i),t.update(i),r.update(i)},destroy:()=>{t.destroy(),r.destroy()}}}function oP(n){const{items:e,flipDurationMs:t,type:r,dragDisabled:i,morphDisabled:a,dropFromOthersDisabled:o,zoneTabIndex:l,dropTargetStyle:s,dropTargetClasses:u,transformDraggedElement:c,autoAriaDisabled:f,centreDraggedOnCursor:h,...m}=n;if(Object.keys(m).length>0&&console.warn("dndzone will ignore unknown options",m),!e)throw new Error("no 'items' key provided to dndzone");const _=e.find(y=>!{}.hasOwnProperty.call(y,iu));if(_)throw new Error(`missing '${iu}' property for item ${Vy(_)}`);if(u&&!Array.isArray(u))throw new Error(`dropTargetClasses should be an array but instead it is a ${typeof u}, ${Vy(u)}`);if(l&&!fxe(l))throw new Error(`zoneTabIndex should be a number but instead it is a ${typeof l}, ${Vy(l)}`)}function fxe(n){return!isNaN(n)&&function(e){return(e|0)===e}(parseFloat(n))}function pxe(n){let e;return{c(){e=le("Screen")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function dxe(n){let e,t,r,i,a,o,l,s,u,c;t=new un({props:{small:!0,$$slots:{default:[pxe]},$$scope:{ctx:n}}}),i=new Za({props:{title:"Destination URL",placeholder:"/screen",value:n[0].url,bindings:n[1]}}),i.$on("change",n[2]);function f(m){n[3](m)}let h={text:"Open screen in modal"};return n[0].peek!==void 0&&(h.value=n[0].peek),s=new ju({props:h}),He.push(()=>nt(s,"value",f)),{c(){e=J("div"),O(t.$$.fragment),r=U(),O(i.$$.fragment),a=U(),o=J("div"),l=U(),O(s.$$.fragment),D(e,"class","root svelte-15fuuda")},m(m,_){C(m,e,_),H(t,e,null),x(e,r),H(i,e,null),x(e,a),x(e,o),x(e,l),H(s,e,null),c=!0},p(m,[_]){const y={};_&16&&(y.$$scope={dirty:_,ctx:m}),t.$set(y);const w={};_&1&&(w.value=m[0].url),_&2&&(w.bindings=m[1]),i.$set(w);const A={};!u&&_&1&&(u=!0,A.value=m[0].peek,rt(()=>u=!1)),s.$set(A)},i(m){c||(b(t.$$.fragment,m),b(i.$$.fragment,m),b(s.$$.fragment,m),c=!0)},o(m){$(t.$$.fragment,m),$(i.$$.fragment,m),$(s.$$.fragment,m),c=!1},d(m){m&&M(e),B(t),B(i),B(s)}}}function hxe(n,e,t){let{parameters:r}=e,{bindings:i=[]}=e;const a=l=>t(0,r.url=l.detail,r);function o(l){n.$$.not_equal(r.peek,l)&&(r.peek=l,t(0,r))}return n.$$set=l=>{"parameters"in l&&t(0,r=l.parameters),"bindings"in l&&t(1,i=l.bindings)},[r,i,a,o]}class mxe extends Re{constructor(e){super(),Ve(this,e,hxe,dxe,Oe,{parameters:0,bindings:1})}}function lP(n,e,t){const r=n.slice();return r[16]=e[t],r[18]=t,r}function sP(n){let e,t,r,i,a=n[4],o=[];for(let s=0;s<a.length;s+=1)o[s]=uP(lP(n,a,s));const l=s=>$(o[s],1,1,()=>{o[s]=null});return r=new $n({props:{icon:"AddCircle",secondary:!0,$$slots:{default:[yxe]},$$scope:{ctx:n}}}),r.$on("click",n[5]),{c(){for(let s=0;s<o.length;s+=1)o[s].c();e=U(),t=J("div"),O(r.$$.fragment),yn(t,"margin-top","10px")},m(s,u){for(let c=0;c<o.length;c+=1)o[c].m(s,u);C(s,e,u),C(s,t,u),H(r,t,null),i=!0},p(s,u){if(u&479){a=s[4];let f;for(f=0;f<a.length;f+=1){const h=lP(s,a,f);o[f]?(o[f].p(h,u),b(o[f],1)):(o[f]=uP(h),o[f].c(),b(o[f],1),o[f].m(e.parentNode,e))}for(we(),f=a.length;f<o.length;f+=1)l(f);ke()}const c={};u&524290&&(c.$$scope={dirty:u,ctx:s}),r.$set(c)},i(s){if(!i){for(let u=0;u<a.length;u+=1)b(o[u]);b(r.$$.fragment,s),i=!0}},o(s){o=o.filter(Boolean);for(let u=0;u<o.length;u+=1)$(o[u]);$(r.$$.fragment,s),i=!1},d(s){Dn(o,s),s&&M(e),s&&M(t),B(r)}}}function gxe(n){let e;return{c(){e=le(n[1])},m(t,r){C(t,e,r)},p(t,r){r&2&&_t(e,t[1])},d(t){t&&M(e)}}}function vxe(n){let e,t;function r(...i){return n[11](n[18],...i)}return e=new En({props:{thin:!0,secondary:!0,value:n[16][0]}}),e.$on("change",r),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){n=i;const o={};a&16&&(o.value=n[16][0]),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function _xe(n){let e,t;function r(...i){return n[10](n[18],...i)}return e=new mn({props:{value:n[16][0],options:n[0].map(cP)}}),e.$on("change",r),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){n=i;const o={};a&16&&(o.value=n[16][0]),a&1&&(o.options=n[0].map(cP)),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function bxe(n){let e;return{c(){e=le(n[2])},m(t,r){C(t,e,r)},p(t,r){r&4&&_t(e,t[2])},d(t){t&&M(e)}}}function uP(n){let e,t,r,i,a,o,l,s,u,c,f;e=new un({props:{small:!0,$$slots:{default:[gxe]},$$scope:{ctx:n}}});const h=[_xe,vxe],m=[];function _(A,E){return A[0]?0:1}r=_(n),i=m[r]=h[r](n),o=new un({props:{small:!0,$$slots:{default:[bxe]},$$scope:{ctx:n}}});function y(...A){return n[12](n[18],...A)}s=new Za({props:{title:`Value for "${n[16][0]}"`,value:n[16][1],bindings:n[3]}}),s.$on("change",y);function w(){return n[13](n[16])}return c=new Sr({props:{size:"S",quiet:!0,icon:"Delete"}}),c.$on("click",w),{c(){O(e.$$.fragment),t=U(),i.c(),a=U(),O(o.$$.fragment),l=U(),O(s.$$.fragment),u=U(),O(c.$$.fragment)},m(A,E){H(e,A,E),C(A,t,E),m[r].m(A,E),C(A,a,E),H(o,A,E),C(A,l,E),H(s,A,E),C(A,u,E),H(c,A,E),f=!0},p(A,E){n=A;const T={};E&524290&&(T.$$scope={dirty:E,ctx:n}),e.$set(T);let I=r;r=_(n),r===I?m[r].p(n,E):(we(),$(m[I],1,1,()=>{m[I]=null}),ke(),i=m[r],i?i.p(n,E):(i=m[r]=h[r](n),i.c()),b(i,1),i.m(a.parentNode,a));const P={};E&524292&&(P.$$scope={dirty:E,ctx:n}),o.$set(P);const F={};E&16&&(F.title=`Value for "${n[16][0]}"`),E&16&&(F.value=n[16][1]),E&8&&(F.bindings=n[3]),s.$set(F)},i(A){f||(b(e.$$.fragment,A),b(i),b(o.$$.fragment,A),b(s.$$.fragment,A),b(c.$$.fragment,A),f=!0)},o(A){$(e.$$.fragment,A),$(i),$(o.$$.fragment,A),$(s.$$.fragment,A),$(c.$$.fragment,A),f=!1},d(A){B(e,A),A&&M(t),m[r].d(A),A&&M(a),B(o,A),A&&M(l),B(s,A),A&&M(u),B(c,A)}}}function yxe(n){let e,t;return{c(){e=le(`Add
@@ -883,7 +883,7 @@ Use Save As... to download, then click back to return to this page.`)&&(location
883
883
  being executed.`)},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function _qe(n){let e,t,r,i,a,o,l,s,u,c,f,h,m,_;t=new jt({props:{size:"S",$$slots:{default:[vqe]},$$scope:{ctx:n}}});function y(P){n[4](P)}let w={options:n[2],placeholder:null};n[0].type!==void 0&&(w.value=n[0].type),i=new mn({props:w}),He.push(()=>nt(i,"value",y)),l=new Za({props:{placeholder:"Value",value:n[0].value,bindings:n[1]}}),l.$on("change",n[5]);function A(P){n[6](P)}let E={options:n[3],placeholder:null};n[0].operator!==void 0&&(E.value=n[0].operator),u=new mn({props:E}),He.push(()=>nt(u,"value",A));function T(P){n[7](P)}let I={placeholder:"Reference value",bindings:n[1]};return n[0].referenceValue!==void 0&&(I.value=n[0].referenceValue),h=new Za({props:I}),He.push(()=>nt(h,"value",T)),h.$on("change",n[8]),{c(){e=J("div"),O(t.$$.fragment),r=U(),O(i.$$.fragment),o=U(),O(l.$$.fragment),s=U(),O(u.$$.fragment),f=U(),O(h.$$.fragment),D(e,"class","root svelte-1yfkfsp")},m(P,F){C(P,e,F),H(t,e,null),x(e,r),H(i,e,null),x(e,o),H(l,e,null),x(e,s),H(u,e,null),x(e,f),H(h,e,null),_=!0},p(P,[F]){const j={};F&512&&(j.$$scope={dirty:F,ctx:P}),t.$set(j);const q={};!a&&F&1&&(a=!0,q.value=P[0].type,rt(()=>a=!1)),i.$set(q);const W={};F&1&&(W.value=P[0].value),F&2&&(W.bindings=P[1]),l.$set(W);const te={};!c&&F&1&&(c=!0,te.value=P[0].operator,rt(()=>c=!1)),u.$set(te);const Q={};F&2&&(Q.bindings=P[1]),!m&&F&1&&(m=!0,Q.value=P[0].referenceValue,rt(()=>m=!1)),h.$set(Q)},i(P){_||(b(t.$$.fragment,P),b(i.$$.fragment,P),b(l.$$.fragment,P),b(u.$$.fragment,P),b(h.$$.fragment,P),_=!0)},o(P){$(t.$$.fragment,P),$(i.$$.fragment,P),$(l.$$.fragment,P),$(u.$$.fragment,P),$(h.$$.fragment,P),_=!1},d(P){P&&M(e),B(t),B(i),B(l),B(u),B(h)}}}function bqe(n,e,t){let{parameters:r}=e,{bindings:i}=e;const a=[{label:"Continue if",value:"continue"},{label:"Stop if",value:"stop"}],o=[{label:"Equals",value:"equal"},{label:"Not equals",value:"notEqual"}];ar(()=>{r.type||t(0,r.type="continue",r),r.operator||t(0,r.operator="equal",r)});function l(h){n.$$.not_equal(r.type,h)&&(r.type=h,t(0,r))}const s=h=>t(0,r.value=h.detail,r);function u(h){n.$$.not_equal(r.operator,h)&&(r.operator=h,t(0,r))}function c(h){n.$$.not_equal(r.referenceValue,h)&&(r.referenceValue=h,t(0,r))}const f=h=>t(0,r.referenceValue=h.detail,r);return n.$$set=h=>{"parameters"in h&&t(0,r=h.parameters),"bindings"in h&&t(1,i=h.bindings)},[r,i,a,o,l,s,u,c,f]}class yqe extends Re{constructor(e){super(),Ve(this,e,bqe,_qe,Oe,{parameters:0,bindings:1})}}function $qe(n){let e;return{c(){e=le("Form")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function wqe(n){let e;return{c(){e=le("Type")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function kqe(n){let e;return{c(){e=le("Field")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function zP(n){let e,t,r,i;return e=new un({props:{small:!0,$$slots:{default:[zqe]},$$scope:{ctx:n}}}),r=new Za({props:{bindings:n[1],value:n[0].value}}),r.$on("change",n[12]),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&8192&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&2&&(s.bindings=a[1]),o&1&&(s.value=a[0].value),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function zqe(n){let e;return{c(){e=le("Value")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function Aqe(n){let e,t,r,i,a,o,l,s,u,c,f,h,m,_,y,w,A;t=new un({props:{small:!0,$$slots:{default:[$qe]},$$scope:{ctx:n}}});function E(W){n[9](W)}let T={options:n[2],getOptionLabel:Mqe,getOptionValue:Cqe};n[0].componentId!==void 0&&(T.value=n[0].componentId),i=new mn({props:T}),He.push(()=>nt(i,"value",E)),l=new un({props:{small:!0,$$slots:{default:[wqe]},$$scope:{ctx:n}}});function I(W){n[10](W)}let P={placeholder:null,options:n[4]};n[0].type!==void 0&&(P.value=n[0].type),u=new mn({props:P}),He.push(()=>nt(u,"value",I)),h=new un({props:{small:!0,$$slots:{default:[kqe]},$$scope:{ctx:n}}});function F(W){n[11](W)}let j={options:n[3]};n[0].field!==void 0&&(j.value=n[0].field),_=new gp({props:j}),He.push(()=>nt(_,"value",F));let q=n[0].type==="set"&&zP(n);return{c(){e=J("div"),O(t.$$.fragment),r=U(),O(i.$$.fragment),o=U(),O(l.$$.fragment),s=U(),O(u.$$.fragment),f=U(),O(h.$$.fragment),m=U(),O(_.$$.fragment),w=U(),q&&q.c(),D(e,"class","root svelte-ss4wgk")},m(W,te){C(W,e,te),H(t,e,null),x(e,r),H(i,e,null),x(e,o),H(l,e,null),x(e,s),H(u,e,null),x(e,f),H(h,e,null),x(e,m),H(_,e,null),x(e,w),q&&q.m(e,null),A=!0},p(W,[te]){const Q={};te&8192&&(Q.$$scope={dirty:te,ctx:W}),t.$set(Q);const oe={};te&4&&(oe.options=W[2]),!a&&te&1&&(a=!0,oe.value=W[0].componentId,rt(()=>a=!1)),i.$set(oe);const ie={};te&8192&&(ie.$$scope={dirty:te,ctx:W}),l.$set(ie);const K={};!c&&te&1&&(c=!0,K.value=W[0].type,rt(()=>c=!1)),u.$set(K);const G={};te&8192&&(G.$$scope={dirty:te,ctx:W}),h.$set(G);const ne={};te&8&&(ne.options=W[3]),!y&&te&1&&(y=!0,ne.value=W[0].field,rt(()=>y=!1)),_.$set(ne),W[0].type==="set"?q?(q.p(W,te),te&1&&b(q,1)):(q=zP(W),q.c(),b(q,1),q.m(e,null)):q&&(we(),$(q,1,1,()=>{q=null}),ke())},i(W){A||(b(t.$$.fragment,W),b(i.$$.fragment,W),b(l.$$.fragment,W),b(u.$$.fragment,W),b(h.$$.fragment,W),b(_.$$.fragment,W),b(q),A=!0)},o(W){$(t.$$.fragment,W),$(i.$$.fragment,W),$(l.$$.fragment,W),$(u.$$.fragment,W),$(h.$$.fragment,W),$(_.$$.fragment,W),$(q),A=!1},d(W){W&&M(e),B(t),B(i),B(l),B(u),B(h),B(_),q&&q.d()}}}const Mqe=n=>n._instanceName,Cqe=n=>n._id;function Sqe(n,e,t){let r,i,a,o,l,s;Ne(n,Xt,w=>t(7,l=w)),Ne(n,ml,w=>t(8,s=w));let{parameters:u}=e,{bindings:c=[]}=e;const f=[{label:"Set value",value:"set"},{label:"Reset to default value",value:"reset"}];ar(()=>{u.type||t(0,u.type="set",u)});function h(w){n.$$.not_equal(u.componentId,w)&&(u.componentId=w,t(0,u))}function m(w){n.$$.not_equal(u.type,w)&&(u.type=w,t(0,u))}function _(w){n.$$.not_equal(u.field,w)&&(u.field=w,t(0,u))}const y=w=>t(0,u.value=w.detail,u);return n.$$set=w=>{"parameters"in w&&t(0,u=w.parameters),"bindings"in w&&t(1,c=w.bindings)},n.$$.update=()=>{n.$$.dirty&257&&t(6,r=ru(s.props,u.componentId)),n.$$.dirty&64&&t(5,i=Zk(r)),n.$$.dirty&32&&t(3,a=Object.keys(i||{})),n.$$.dirty&384&&t(2,o=L7(s,l.selectedComponentId,"ValidateForm"))},[u,c,o,a,f,i,r,l,s,h,m,_,y]}class Lqe extends Re{constructor(e){super(),Ve(this,e,Sqe,Aqe,Oe,{parameters:0,bindings:1})}}function Eqe(n){let e;return{c(){e=le("Type")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function Tqe(n){let e;return{c(){e=le("Message")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function Dqe(n){let e,t,r,i,a,o,l,s,u,c,f,h,m,_,y;t=new un({props:{$$slots:{default:[Eqe]},$$scope:{ctx:n}}});function w(I){n[3](I)}let A={options:n[2],placeholder:null};n[0].type!==void 0&&(A.value=n[0].type),i=new mn({props:A}),He.push(()=>nt(i,"value",w)),l=new un({props:{$$slots:{default:[Tqe]},$$scope:{ctx:n}}}),u=new Za({props:{bindings:n[1],value:n[0].message}}),u.$on("change",n[4]),f=new un({});function E(I){n[5](I)}let T={text:"Auto dismiss"};return n[0].autoDismiss!==void 0&&(T.value=n[0].autoDismiss),m=new ju({props:T}),He.push(()=>nt(m,"value",E)),{c(){e=J("div"),O(t.$$.fragment),r=U(),O(i.$$.fragment),o=U(),O(l.$$.fragment),s=U(),O(u.$$.fragment),c=U(),O(f.$$.fragment),h=U(),O(m.$$.fragment),D(e,"class","root svelte-ss4wgk")},m(I,P){C(I,e,P),H(t,e,null),x(e,r),H(i,e,null),x(e,o),H(l,e,null),x(e,s),H(u,e,null),x(e,c),H(f,e,null),x(e,h),H(m,e,null),y=!0},p(I,[P]){const F={};P&64&&(F.$$scope={dirty:P,ctx:I}),t.$set(F);const j={};!a&&P&1&&(a=!0,j.value=I[0].type,rt(()=>a=!1)),i.$set(j);const q={};P&64&&(q.$$scope={dirty:P,ctx:I}),l.$set(q);const W={};P&2&&(W.bindings=I[1]),P&1&&(W.value=I[0].message),u.$set(W);const te={};!_&&P&1&&(_=!0,te.value=I[0].autoDismiss,rt(()=>_=!1)),m.$set(te)},i(I){y||(b(t.$$.fragment,I),b(i.$$.fragment,I),b(l.$$.fragment,I),b(u.$$.fragment,I),b(f.$$.fragment,I),b(m.$$.fragment,I),y=!0)},o(I){$(t.$$.fragment,I),$(i.$$.fragment,I),$(l.$$.fragment,I),$(u.$$.fragment,I),$(f.$$.fragment,I),$(m.$$.fragment,I),y=!1},d(I){I&&M(e),B(t),B(i),B(l),B(u),B(f),B(m)}}}function Hqe(n,e,t){let{parameters:r}=e,{bindings:i=[]}=e;const a=[{label:"Success",value:"success"},{label:"Warning",value:"warning"},{label:"Error",value:"error"},{label:"Info",value:"info"}];ar(()=>{r.type||t(0,r.type="success",r),r.autoDismiss==null&&t(0,r.autoDismiss=!0,r)});function o(u){n.$$.not_equal(r.type,u)&&(r.type=u,t(0,r))}const l=u=>t(0,r.message=u.detail,r);function s(u){n.$$.not_equal(r.autoDismiss,u)&&(r.autoDismiss=u,t(0,r))}return n.$$set=u=>{"parameters"in u&&t(0,r=u.parameters),"bindings"in u&&t(1,i=u.bindings)},[r,i,a,o,l,s]}class Bqe extends Re{constructor(e){super(),Ve(this,e,Hqe,Dqe,Oe,{parameters:0,bindings:1})}}const Oqe=Object.freeze(Object.defineProperty({__proto__:null,NavigateTo:mxe,SaveRow:Txe,DeleteRow:Rxe,ExecuteQuery:Gxe,TriggerAutomation:iUe,ValidateForm:cUe,LogOut:gUe,ClearForm:wUe,CloseScreenModal:CUe,ChangeFormStep:OUe,UpdateState:jUe,RefreshDataProvider:YUe,DuplicateRow:rqe,S3Upload:uqe,ExportData:gqe,ContinueIf:yqe,UpdateFieldValue:Lqe,ShowNotification:Bqe},Symbol.toStringTag,{value:"Module"})),Iqe=(n=!1)=>EY.actions.filter(e=>{var t;return n||!e.dependsOnFeature?!0:((t=pn(Xt).clientFeatures)==null?void 0:t[e.dependsOnFeature])===!0}).map(e=>({...e,component:Oqe[e.component]})).filter(e=>e.component!=null);function AP(n,e,t){const r=n.slice();return r[24]=e[t],r[26]=t,r}function MP(n,e,t){const r=n.slice();return r[27]=e[t][0],r[28]=e[t][1],r[30]=t,r}function CP(n,e,t){const r=n.slice();return r[31]=e[t],r}function SP(n){let e=n[3].id,t,r,i=LP(n);return{c(){i.c(),t=$t()},m(a,o){i.m(a,o),C(a,t,o),r=!0},p(a,o){o[0]&8&&Oe(e,e=a[3].id)?(we(),$(i,1,1,mt),ke(),i=LP(a),i.c(),b(i,1),i.m(t.parentNode,t)):i.p(a,o)},i(a){r||(b(i),r=!0)},o(a){$(i),r=!1},d(a){a&&M(t),i.d(a)}}}function LP(n){let e,t,r;var i=n[5];function a(o){return{props:{parameters:o[3].parameters,bindings:o[6],nested:o[1]}}}return i&&(t=new i(a(n))),{c(){e=J("div"),t&&O(t.$$.fragment),D(e,"class","selected-action-container")},m(o,l){C(o,e,l),t&&H(t,e,null),r=!0},p(o,l){const s={};if(l[0]&8&&(s.parameters=o[3].parameters),l[0]&64&&(s.bindings=o[6]),l[0]&2&&(s.nested=o[1]),i!==(i=o[5])){if(t){we();const u=t;$(u.$$.fragment,1,0,()=>{B(u,1)}),ke()}i?(t=new i(a(o)),O(t.$$.fragment),b(t.$$.fragment,1),H(t,e,null)):t=null}else i&&t.$set(s)},i(o){r||(t&&b(t.$$.fragment,o),r=!0)},o(o){t&&$(t.$$.fragment,o),r=!1},d(o){o&&M(e),t&&B(t)}}}function Pqe(n){let e,t,r=n[5]&&!n[4]&&SP(n);return{c(){r&&r.c(),e=$t()},m(i,a){r&&r.m(i,a),C(i,e,a),t=!0},p(i,a){i[5]&&!i[4]?r?(r.p(i,a),a[0]&48&&b(r,1)):(r=SP(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(i){t||(b(r),t=!0)},o(i){$(r),t=!1},d(i){r&&r.d(i),i&&M(e)}}}function Vqe(n){let e,t;return e=new Rt({props:{noPadding:!0,$$slots:{default:[Pqe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&122|i[1]&8&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function EP(n){var m;let e,t,r,i,a,o,l,s=((m=n[0])==null?void 0:m.length)>0&&TP(n);function u(_){n[20](_)}let c={placeholder:"Search"};n[2]!==void 0&&(c.value=n[2]),i=new b5({props:c}),He.push(()=>nt(i,"value",u));let f=Object.entries(n[7]),h=[];for(let _=0;_<f.length;_+=1)h[_]=HP(MP(n,f,_));return{c(){e=J("div"),s&&s.c(),t=U(),r=J("div"),O(i.$$.fragment),o=U();for(let _=0;_<h.length;_+=1)h[_].c();D(r,"class","search-wrap svelte-28n6ts"),D(e,"class","actions-list svelte-28n6ts")},m(_,y){C(_,e,y),s&&s.m(e,null),x(e,t),x(e,r),H(i,r,null),x(e,o);for(let w=0;w<h.length;w+=1)h[w].m(e,null);l=!0},p(_,y){var A;((A=_[0])==null?void 0:A.length)>0?s?(s.p(_,y),y[0]&1&&b(s,1)):(s=TP(_),s.c(),b(s,1),s.m(e,t)):s&&(we(),$(s,1,1,()=>{s=null}),ke());const w={};if(!a&&y[0]&4&&(a=!0,w.value=_[2],rt(()=>a=!1)),i.$set(w),y[0]&2176){f=Object.entries(_[7]);let E;for(E=0;E<f.length;E+=1){const T=MP(_,f,E);h[E]?h[E].p(T,y):(h[E]=HP(T),h[E].c(),h[E].m(e,null))}for(;E<h.length;E+=1)h[E].d(1);h.length=f.length}},i(_){l||(b(s),b(i.$$.fragment,_),l=!0)},o(_){$(s),$(i.$$.fragment,_),l=!1},d(_){_&&M(e),s&&s.d(),B(i),Dn(h,_)}}}function TP(n){let e,t,r;return t=new Sr({props:{secondary:!0,icon:"ArrowLeft",$$slots:{default:[Rqe]},$$scope:{ctx:n}}}),t.$on("click",n[9]),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","svelte-28n6ts")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a[1]&8&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function Rqe(n){let e;return{c(){e=le("Back")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function DP(n){let e,t,r=n[31].name+"",i,a,o;return{c(){e=J("li"),t=J("span"),i=le(r),D(t,"class","action-name svelte-28n6ts"),D(e,"class","svelte-28n6ts")},m(l,s){C(l,e,s),x(e,t),x(t,i),a||(o=At(e,"click",function(){Mn(n[11](n[31]))&&n[11](n[31]).apply(this,arguments)}),a=!0)},p(l,s){n=l,s[0]&128&&r!==(r=n[31].name+"")&&_t(i,r)},d(l){l&&M(e),a=!1,o()}}}function HP(n){let e,t=n[27]+"",r,i,a,o,l=n[28],s=[];for(let u=0;u<l.length;u+=1)s[u]=DP(CP(n,l,u));return{c(){e=J("div"),r=le(t),i=U(),a=J("ul");for(let u=0;u<s.length;u+=1)s[u].c();o=U(),D(e,"class","heading svelte-28n6ts"),De(e,"top-entry",n[30]===0),D(a,"class","svelte-28n6ts")},m(u,c){C(u,e,c),x(e,r),C(u,i,c),C(u,a,c);for(let f=0;f<s.length;f+=1)s[f].m(a,null);x(a,o)},p(u,c){if(c[0]&128&&t!==(t=u[27]+"")&&_t(r,t),c[0]&2176){l=u[28];let f;for(f=0;f<l.length;f+=1){const h=CP(u,l,f);s[f]?s[f].p(h,c):(s[f]=DP(h),s[f].c(),s[f].m(a,o))}for(;f<s.length;f+=1)s[f].d(1);s.length=l.length}},d(u){u&&M(e),u&&M(i),u&&M(a),Dn(s,u)}}}function BP(n){let e,t,r,i,a=[],o=new Map,l,s,u,c;t=new $n({props:{secondary:!0,$$slots:{default:[Nqe]},$$scope:{ctx:n}}}),t.$on("click",n[9]);let f=n[0];const h=m=>m[24].id;for(let m=0;m<f.length;m+=1){let _=AP(n,f,m),y=h(_);o.set(y,a[m]=OP(y,_))}return{c(){e=J("div"),O(t.$$.fragment),r=U(),i=J("div");for(let m=0;m<a.length;m+=1)a[m].c();D(i,"class","actions svelte-28n6ts")},m(m,_){C(m,e,_),H(t,e,null),C(m,r,_),C(m,i,_);for(let y=0;y<a.length;y+=1)a[y].m(i,null);s=!0,u||(c=[Bl(l=ab.call(null,i,{items:n[0],flipDurationMs:hw,dropTargetStyle:{outline:"none"}})),At(i,"consider",n[12]),At(i,"finalize",n[13])],u=!0)},p(m,_){const y={};if(_[1]&8&&(y.$$scope={dirty:_,ctx:m}),t.$set(y),_[0]&1289){f=m[0],we();for(let w=0;w<a.length;w+=1)a[w].r();a=Il(a,_,h,1,m,f,o,i,m7,OP,null,AP);for(let w=0;w<a.length;w+=1)a[w].a();ke()}l&&Mn(l.update)&&_[0]&1&&l.update.call(null,{items:m[0],flipDurationMs:hw,dropTargetStyle:{outline:"none"}})},i(m){if(!s){b(t.$$.fragment,m);for(let _=0;_<f.length;_+=1)b(a[_]);s=!0}},o(m){$(t.$$.fragment,m);for(let _=0;_<a.length;_+=1)$(a[_]);s=!1},d(m){m&&M(e),B(t),m&&M(r),m&&M(i);for(let _=0;_<a.length;_+=1)a[_].d();u=!1,Vi(c)}}}function Nqe(n){let e;return{c(){e=le("Add Action")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function OP(n,e){let t,r,i,a,o=e[26]+1+"",l,s,u=e[24][Yv]+"",c,f,h,m,_,y=mt,w,A,E;r=new dn({props:{name:"DragHandle",size:"XL"}});function T(){return e[21](e[26])}return h=new dn({props:{name:"Close",hoverable:!0,size:"S"}}),h.$on("click",T),{key:n,first:null,c(){t=J("div"),O(r.$$.fragment),i=U(),a=J("div"),l=le(o),s=le(".\xA0"),c=le(u),f=U(),O(h.$$.fragment),m=U(),D(a,"class","action-header svelte-28n6ts"),D(t,"class","action-container svelte-28n6ts"),De(t,"selected",e[24]===e[3]),this.first=t},m(I,P){C(I,t,P),H(r,t,null),x(t,i),x(t,a),x(a,l),x(a,s),x(a,c),x(t,f),H(h,t,null),x(t,m),w=!0,A||(E=At(t,"click",function(){Mn(e[10](e[24]))&&e[10](e[24]).apply(this,arguments)}),A=!0)},p(I,P){e=I,(!w||P[0]&1)&&o!==(o=e[26]+1+"")&&_t(l,o),(!w||P[0]&1)&&u!==(u=e[24][Yv]+"")&&_t(c,u),P[0]&9&&De(t,"selected",e[24]===e[3])},r(){_=t.getBoundingClientRect()},f(){h7(t),y()},a(){y(),y=d7(t,_,I7,{duration:hw})},i(I){w||(b(r.$$.fragment,I),b(h.$$.fragment,I),w=!0)},o(I){$(r.$$.fragment,I),$(h.$$.fragment,I),w=!1},d(I){I&&M(t),B(r),B(h),A=!1,E()}}}function Fqe(n){var o;let e,t,r,i=(n[4]||!((o=n[0])!=null&&o.length))&&EP(n),a=n[0]&&n[0].length>0&&!n[4]&&BP(n);return{c(){i&&i.c(),e=U(),a&&a.c(),t=$t()},m(l,s){i&&i.m(l,s),C(l,e,s),a&&a.m(l,s),C(l,t,s),r=!0},p(l,s){var u;l[4]||!((u=l[0])!=null&&u.length)?i?(i.p(l,s),s[0]&17&&b(i,1)):(i=EP(l),i.c(),b(i,1),i.m(e.parentNode,e)):i&&(we(),$(i,1,1,()=>{i=null}),ke()),l[0]&&l[0].length>0&&!l[4]?a?(a.p(l,s),s[0]&17&&b(a,1)):(a=BP(l),a.c(),b(a,1),a.m(t.parentNode,t)):a&&(we(),$(a,1,1,()=>{a=null}),ke())},i(l){r||(b(i),b(a),r=!0)},o(l){$(i),$(a),r=!1},d(l){i&&i.d(l),l&&M(e),a&&a.d(l),l&&M(t)}}}function jqe(n){let e,t;return e=new Rt({props:{noPadding:!0,gap:"S",slot:"sidebar",$$slots:{default:[Fqe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&157|i[1]&8&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function xqe(n){let e,t;return e=new S4({props:{$$slots:{sidebar:[jqe],default:[Vqe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&255|i[1]&8&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}const hw=150,Yv="##eventHandlerType";function Uqe(n,e,t){let r,i,a,o,l,s,u,c;Ne(n,Xt,Q=>t(18,u=Q)),Ne(n,ml,Q=>t(19,c=Q));const f=Iqe();let{key:h}=e,{actions:m}=e,{bindings:_=[]}=e,{nested:y}=e,w,A=m!=null&&m.length?m[0]:null;const E=Q=>{m.splice(Q,1),t(0,m)},T=()=>{t(2,w=null),t(4,r=!r)},I=Q=>{const oe={parameters:{},[Yv]:Q.name,id:c2.exports.generate()};m||t(0,m=[]),t(0,m=[...m,oe]),t(3,A=oe)},P=Q=>()=>{t(3,A=Q)},F=Q=>{I(Q),T()};function j(Q){t(0,m=Q.detail.items)}function q(Q){t(0,m=Q.detail.items)}function W(Q){w=Q,t(2,w)}const te=Q=>E(Q);return n.$$set=Q=>{"key"in Q&&t(14,h=Q.key),"actions"in Q&&t(0,m=Q.actions),"bindings"in Q&&t(15,_=Q.bindings),"nested"in Q&&t(1,y=Q.nested)},n.$$.update=()=>{var Q;n.$$.dirty[0]&1&&t(4,r=!(m!=null&&m.length)),n.$$.dirty[0]&4&&t(17,i=typeof w=="string"?w.toLowerCase().trim():""),n.$$.dirty[0]&131072&&t(7,a=f.reduce((oe,ie)=>{let K=ie.name.toLowerCase().trim();return i.length&&K.indexOf(i)<0||(oe[ie.type]=oe[ie.type]||[],oe[ie.type].push(ie)),oe},{})),n.$$.dirty[0]&9&&A&&!(m!=null&&m.includes(A))&&t(3,A=m==null?void 0:m[0]),n.$$.dirty[0]&802825&&t(16,o=epe(c,u.selectedComponentId,h,m,A==null?void 0:A.id)),n.$$.dirty[0]&98304&&t(6,l=o.concat(_)),n.$$.dirty[0]&1&&m&&m.forEach(oe=>{oe.id||(oe.id=c2.exports.generate())}),n.$$.dirty[0]&8&&t(5,s=A&&((Q=f.find(oe=>oe.name===A[Yv]))==null?void 0:Q.component))},[m,y,w,A,r,s,l,a,E,T,P,F,j,q,h,_,o,i,u,c,W,te]}class qqe extends Re{constructor(e){super(),Ve(this,e,Uqe,xqe,Oe,{key:14,actions:0,bindings:15,nested:1},null,[-1,-1])}}function Wqe(n){let e;return{c(){e=le("Define actions")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function Gqe(n){let e;return{c(){e=le("Define what actions to run.")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function Yqe(n){let e;return{c(){e=le("Save")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function Kqe(n){let e,t;return e=new $n({props:{cta:!0,slot:"buttons",$$slots:{default:[Yqe]},$$scope:{ctx:n}}}),e.$on("click",n[8]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&65536&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Xqe(n){let e,t,r;function i(o){n[11](o)}let a={slot:"body",eventType:n[1],bindings:n[2],key:n[0],nested:n[3]};return n[5]!==void 0&&(a.actions=n[5]),e=new qqe({props:a}),He.push(()=>nt(e,"actions",i)),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){const s={};l&2&&(s.eventType=o[1]),l&4&&(s.bindings=o[2]),l&1&&(s.key=o[0]),l&8&&(s.nested=o[3]),!t&&l&32&&(t=!0,s.actions=o[5],rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function Jqe(n){let e,t,r,i,a,o,l;i=new Sr({props:{$$slots:{default:[Wqe]},$$scope:{ctx:n}}}),i.$on("click",n[7]);let s={title:"Actions",$$slots:{body:[Xqe],buttons:[Kqe],description:[Gqe]},$$scope:{ctx:n}};return o=new Hf({props:s}),n[12](o),{c(){e=J("div"),t=le(n[6]),r=U(),O(i.$$.fragment),a=U(),O(o.$$.fragment),D(e,"class","action-count svelte-mu0gih")},m(u,c){C(u,e,c),x(e,t),C(u,r,c),H(i,u,c),C(u,a,c),H(o,u,c),l=!0},p(u,[c]){(!l||c&64)&&_t(t,u[6]);const f={};c&65536&&(f.$$scope={dirty:c,ctx:u}),i.$set(f);const h={};c&65583&&(h.$$scope={dirty:c,ctx:u}),o.$set(h)},i(u){l||(b(i.$$.fragment,u),b(o.$$.fragment,u),l=!0)},o(u){$(i.$$.fragment,u),$(o.$$.fragment,u),l=!1},d(u){u&&M(e),u&&M(r),B(i,u),u&&M(a),n[12](null),B(o,u)}}}function Zqe(n,e,t){let r,i,a;Ne(n,Or,T=>t(13,a=T));const o=Un();let{key:l}=e,{value:s=[]}=e,{name:u}=e,{bindings:c}=e,{nested:f}=e,h,m;const _=()=>{t(5,m=z1.cloneDeep(s)),h.show()},y=async()=>{const T=m.filter(I=>I["##eventHandlerType"]==="Trigger Automation");for(let I of T)await w(I.parameters);o("change",m),yt.success("Component actions saved."),h.hide()},w=async T=>{var I,P;if(!(T.automationId||!T.newAutomationName))try{await Or.actions.create({name:T.newAutomationName});const F=a.blockDefinitions.TRIGGER.APP,j=a.selectedAutomation.constructBlock("TRIGGER","APP",F);j.inputs={fields:Object.keys((I=T.fields)!=null?I:{}).reduce((q,W)=>(q[W]="string",q),{})},Or.actions.addBlockToAutomation(j),await Or.actions.save((P=a.selectedAutomation)==null?void 0:P.automation),T.automationId=a.selectedAutomation.automation._id,delete T.newAutomationName}catch{yt.error("Error creating automation")}};function A(T){m=T,t(5,m)}function E(T){He[T?"unshift":"push"](()=>{h=T,t(4,h)})}return n.$$set=T=>{"key"in T&&t(0,l=T.key),"value"in T&&t(9,s=T.value),"name"in T&&t(1,u=T.name),"bindings"in T&&t(2,c=T.bindings),"nested"in T&&t(3,f=T.nested)},n.$$.update=()=>{n.$$.dirty&512&&t(10,r=s==null?void 0:s.length),n.$$.dirty&1024&&t(6,i=`${r||"No"} action${r!==1?"s":""} set`)},[l,u,c,f,h,m,i,_,y,s,r,A,E]}class DX extends Re{constructor(e){super(),Ve(this,e,Zqe,Jqe,Oe,{key:0,value:9,name:1,bindings:2,nested:3})}}function Qqe(n){var r;let e,t;return e=new mn({props:{value:(r=n[0])==null?void 0:r.tableId,options:n[1],getOptionValue:eWe,getOptionLabel:tWe}}),e.$on("change",n[2]),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,[a]){var l;const o={};a&1&&(o.value=(l=i[0])==null?void 0:l.tableId),a&2&&(o.options=i[1]),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}const eWe=n=>n.tableId,tWe=n=>n.label;function nWe(n,e,t){let r,i;Ne(n,Hr,s=>t(3,i=s));let{value:a}=e;const o=Un(),l=s=>{const u=r==null?void 0:r.find(c=>c.tableId===s.detail);o("change",u)};return n.$$set=s=>{"value"in s&&t(0,a=s.value)},n.$$.update=()=>{n.$$.dirty&8&&t(1,r=i.list.map(s=>({label:s.name,tableId:s._id,type:"table"})))},[a,r,l,i]}class rWe extends Re{constructor(e){super(),Ve(this,e,nWe,Qqe,Oe,{value:0})}}function iWe(n){let e,t;return e=new y5({props:{value:n[0],spectrumTheme:n[1].theme}}),e.$on("change",n[2]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&1&&(a.value=r[0]),i&2&&(a.spectrumTheme=r[1].theme),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function aWe(n,e,t){let r;Ne(n,Xt,o=>t(1,r=o));let{value:i}=e;function a(o){Bn.call(this,n,o)}return n.$$set=o=>{"value"in o&&t(0,i=o.value)},[i,r,a]}class Uz extends Re{constructor(e){super(),Ve(this,e,aWe,iWe,Oe,{value:0})}}const IP={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 PP(n,e,t){const r=n.slice();return r[29]=e[t],r}function VP(n,e,t){const r=n.slice();return r[32]=e[t],r[34]=t,r}function oWe(n){let e;return{c(){e=le(n[8])},m(t,r){C(t,e,r)},p(t,r){r[0]&256&&_t(e,t[8])},d(t){t&&M(e)}}}function lWe(n){let e;return{c(){e=J("span"),e.textContent="-"},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function RP(n){let e,t=n[32]+"",r,i,a,o,l;function s(){return n[20](n[32])}let u=n[34]!==n[9].length-1&&lWe();return{c(){e=J("span"),r=le(t),i=U(),u&&u.c(),a=$t(),D(e,"class","letter svelte-vhpvzd"),De(e,"letter-selected",n[32]===n[2])},m(c,f){C(c,e,f),x(e,r),C(c,i,f),u&&u.m(c,f),C(c,a,f),o||(l=At(e,"click",s),o=!0)},p(c,f){n=c,f[0]&516&&De(e,"letter-selected",n[32]===n[2])},d(c){c&&M(e),c&&M(i),u&&u.d(c),c&&M(a),o=!1,l()}}}function sWe(n){let e;return{c(){e=le("Search")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function uWe(n){let e,t,r=`There is no icons for this ${n[1]?"search":"page"}`,i;return{c(){e=J("div"),t=J("h5"),i=le(r),D(e,"class","no-icons svelte-vhpvzd")},m(a,o){C(a,e,o),x(e,t),x(t,i)},p(a,o){o[0]&2&&r!==(r=`There is no icons for this ${a[1]?"search":"page"}`)&&_t(i,r)},d(a){a&&M(e)}}}function cWe(n){let e,t=!n[5]&&NP(n);return{c(){e=J("div"),t&&t.c(),D(e,"class","icon-area svelte-vhpvzd")},m(r,i){C(r,e,i),t&&t.m(e,null)},p(r,i){r[5]?t&&(t.d(1),t=null):t?t.p(r,i):(t=NP(r),t.c(),t.m(e,null))},d(r){r&&M(e),t&&t.d()}}}function NP(n){let e,t=n[7],r=[];for(let i=0;i<t.length;i+=1)r[i]=FP(PP(n,t,i));return{c(){for(let i=0;i<r.length;i+=1)r[i].c();e=$t()},m(i,a){for(let o=0;o<r.length;o+=1)r[o].m(i,a);C(i,e,a)},p(i,a){if(a[0]&129){t=i[7];let o;for(o=0;o<t.length;o+=1){const l=PP(i,t,o);r[o]?r[o].p(l,a):(r[o]=FP(l),r[o].c(),r[o].m(e.parentNode,e))}for(;o<r.length;o+=1)r[o].d(1);r.length=t.length}},d(i){Dn(r,i),i&&M(e)}}}function FP(n){let e,t,r,i,a,o,l=n[29]+"",s,u,c,f,h,m,_,y,w,A=n[29]+"",E,T,I,P,F;function j(){return n[24](n[29])}function q(){return n[25](n[29])}return{c(){e=J("div"),t=J("div"),r=J("i"),a=U(),o=J("div"),s=le(l),u=le("-fill"),c=U(),f=J("div"),h=J("div"),m=J("i"),y=U(),w=J("div"),E=le(A),T=le("-line"),I=U(),D(r,"class",i=y0(`ri-${n[29]}-fill ri-xl`)+" svelte-vhpvzd"),D(t,"class","icon-preview svelte-vhpvzd"),D(o,"class","icon-label svelte-vhpvzd"),D(e,"class","icon-container svelte-vhpvzd"),De(e,"selected",n[0]===`ri-${n[29]}-fill`),D(m,"class",_=y0(`ri-${n[29]}-line ri-xl`)+" svelte-vhpvzd"),D(h,"class","icon-preview svelte-vhpvzd"),D(w,"class","icon-label svelte-vhpvzd"),D(f,"class","icon-container svelte-vhpvzd"),De(f,"selected",n[0]===`ri-${n[29]}-line`)},m(W,te){C(W,e,te),x(e,t),x(t,r),x(e,a),x(e,o),x(o,s),x(o,u),C(W,c,te),C(W,f,te),x(f,h),x(h,m),x(f,y),x(f,w),x(w,E),x(w,T),x(f,I),P||(F=[At(e,"click",j),At(f,"click",q)],P=!0)},p(W,te){n=W,te[0]&128&&i!==(i=y0(`ri-${n[29]}-fill ri-xl`)+" svelte-vhpvzd")&&D(r,"class",i),te[0]&128&&l!==(l=n[29]+"")&&_t(s,l),te[0]&129&&De(e,"selected",n[0]===`ri-${n[29]}-fill`),te[0]&128&&_!==(_=y0(`ri-${n[29]}-line ri-xl`)+" svelte-vhpvzd")&&D(m,"class",_),te[0]&128&&A!==(A=n[29]+"")&&_t(E,A),te[0]&129&&De(f,"selected",n[0]===`ri-${n[29]}-line`)},d(W){W&&M(e),W&&M(c),W&&M(f),P=!1,Vi(F)}}}function fWe(n){let e,t,r,i,a,o,l,s,u,c,f,h,m,_,y,w,A,E,T,I,P,F,j,q=n[9],W=[];for(let G=0;G<q.length;G+=1)W[G]=RP(VP(n,q,G));function te(G){n[21](G)}let Q={thin:!0,placeholder:"Search Icon"};n[1]!==void 0&&(Q.value=n[1]),l=new En({props:Q}),He.push(()=>nt(l,"value",te)),c=new $n({props:{secondary:!0,$$slots:{default:[sWe]},$$scope:{ctx:n}}}),c.$on("click",n[13]);function oe(G,ne){return G[7].length>0?cWe:uWe}let ie=oe(n),K=ie(n);return{c(){e=J("div"),t=J("div"),r=J("div");for(let G=0;G<W.length;G+=1)W[G].c();i=U(),a=J("div"),o=J("div"),O(l.$$.fragment),u=U(),O(c.$$.fragment),f=U(),h=J("div"),m=J("div"),_=J("span"),_.innerHTML='<i class="page-btn ri-arrow-left-line ri-sm svelte-vhpvzd"></i>',y=U(),w=J("span"),A=le(n[6]),E=U(),T=J("span"),T.innerHTML='<i class="page-btn ri-arrow-right-line ri-sm svelte-vhpvzd"></i>',I=U(),K.c(),D(r,"class","alphabet-area svelte-vhpvzd"),D(o,"class","input-wrapper svelte-vhpvzd"),D(a,"class","search-input svelte-vhpvzd"),D(m,"class","pager"),D(h,"class","page-area svelte-vhpvzd"),D(t,"class","search-area svelte-vhpvzd"),D(e,"class","container svelte-vhpvzd")},m(G,ne){C(G,e,ne),x(e,t),x(t,r);for(let se=0;se<W.length;se+=1)W[se].m(r,null);x(t,i),x(t,a),x(a,o),H(l,o,null),x(a,u),H(c,a,null),x(t,f),x(t,h),x(h,m),x(m,_),x(m,y),x(m,w),x(w,A),x(m,E),x(m,T),x(e,I),K.m(e,null),P=!0,F||(j=[At(_,"click",n[22]),At(T,"click",n[23])],F=!0)},p(G,ne){if(ne[0]&1540){q=G[9];let ze;for(ze=0;ze<q.length;ze+=1){const he=VP(G,q,ze);W[ze]?W[ze].p(he,ne):(W[ze]=RP(he),W[ze].c(),W[ze].m(r,null))}for(;ze<W.length;ze+=1)W[ze].d(1);W.length=q.length}const se={};!s&&ne[0]&2&&(s=!0,se.value=G[1],rt(()=>s=!1)),l.$set(se);const pe={};ne[1]&16&&(pe.$$scope={dirty:ne,ctx:G}),c.$set(pe),(!P||ne[0]&64)&&_t(A,G[6]),ie===(ie=oe(G))&&K?K.p(G,ne):(K.d(1),K=ie(G),K&&(K.c(),K.m(e,null)))},i(G){P||(b(l.$$.fragment,G),b(c.$$.fragment,G),P=!0)},o(G){$(l.$$.fragment,G),$(c.$$.fragment,G),P=!1},d(G){G&&M(e),Dn(W,G),B(l),B(c),K.d(),F=!1,Vi(j)}}}function pWe(n){let e,t,r,i,a;t=new Sr({props:{$$slots:{default:[oWe]},$$scope:{ctx:n}}}),t.$on("click",function(){Mn(n[4].show)&&n[4].show.apply(this,arguments)});let o={anchor:n[3],dataCy:"icon-popover",$$slots:{default:[fWe]},$$scope:{ctx:n}};return i=new Rd({props:o}),n[26](i),i.$on("open",n[11]),{c(){e=J("div"),O(t.$$.fragment),r=U(),O(i.$$.fragment)},m(l,s){C(l,e,s),H(t,e,null),n[19](e),C(l,r,s),H(i,l,s),a=!0},p(l,s){n=l;const u={};s[0]&256|s[1]&16&&(u.$$scope={dirty:s,ctx:n}),t.$set(u);const c={};s[0]&8&&(c.anchor=n[3]),s[0]&231|s[1]&16&&(c.$$scope={dirty:s,ctx:n}),i.$set(c)},i(l){a||(b(t.$$.fragment,l),b(i.$$.fragment,l),a=!0)},o(l){$(t.$$.fragment,l),$(i.$$.fragment,l),a=!1},d(l){l&&M(e),B(t),n[19](null),l&&M(r),n[26](null),B(i,l)}}}const dWe=Object.keys(IP).reduce((n,e)=>[...n,...Object.keys(IP[e])],[]);function Ny(n){const e=new RegExp(`^${n}`,"i");return dWe.filter(t=>e.test(t))}function hWe(n,e,t){let r,i,a,o,l;const s=Un();let{value:u=""}=e,{maxIconsPerPage:c=30}=e,f="",h="A",m=1,_=Ny(h);const y=["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 w,A,E=!1;async function T(ne){t(15,m=1),t(1,f=""),t(5,E=!0),t(2,h=ne),t(16,_=Ny(ne)),await X5(),t(5,E=!1)}async function I(){t(5,E=!0);const ne=_.findIndex(se=>se.value===u);ne!==-1&&t(15,m=Math.ceil(ne/c)),await X5(),t(5,E=!1)}async function P(){if(u){const ne=r.substring(0,1);await T(ne),await I()}}async function F(ne){t(5,E=!0),ne&&m<i?t(15,m++,m):!ne&&m>1&&t(15,m--,m),await X5(),t(5,E=!1)}async function j(){t(15,m=1),t(5,E=!0),t(16,_=Ny(f)),await X5(),t(5,E=!1)}function q(ne){He[ne?"unshift":"push"](()=>{w=ne,t(3,w)})}const W=ne=>T(ne);function te(ne){f=ne,t(1,f)}const Q=()=>F(!1),oe=()=>F(!0),ie=ne=>t(0,u=`ri-${ne}-fill`),K=ne=>t(0,u=`ri-${ne}-line`);function G(ne){He[ne?"unshift":"push"](()=>{A=ne,t(4,A)})}return n.$$set=ne=>{"value"in ne&&t(0,u=ne.value),"maxIconsPerPage"in ne&&t(14,c=ne.maxIconsPerPage)},n.$$.update=()=>{n.$$.dirty[0]&1&&s("change",u),n.$$.dirty[0]&1&&t(8,r=u?u.substring(3):"Pick icon"),n.$$.dirty[0]&81920&&t(17,i=Math.ceil(_.length/c)),n.$$.dirty[0]&49152&&t(18,a=c*m),n.$$.dirty[0]&344064&&t(7,o=_.slice(a-c,a)),n.$$.dirty[0]&163840&&t(6,l=`Page ${m} of ${i}`)},[u,f,h,w,A,E,l,o,r,y,T,P,F,j,c,m,_,i,a,q,W,te,Q,oe,ie,K,G]}class mWe extends Re{constructor(e){super(),Ve(this,e,hWe,pWe,Oe,{value:0,maxIconsPerPage:14},null,[-1,-1])}}function gWe(n){let e,t;return e=new mn({props:{placeholder:n[0],value:n[2],options:n[1]}}),e.$on("change",n[3]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&1&&(a.placeholder=r[0]),i&4&&(a.value=r[2]),i&2&&(a.options=r[1]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function vWe(n,e,t){let r,i,a,o,l;Ne(n,ml,_=>t(8,l=_));let{componentInstance:s={}}=e,{value:u=""}=e,{placeholder:c}=e;const f=Un(),h=(_,y)=>!Array.isArray(y)||y.indexOf(_)===-1?null:_,m=_=>{t(2,o=h(_.detail,a)),f("change",o)};return n.$$set=_=>{"componentInstance"in _&&t(4,s=_.componentInstance),"value"in _&&t(5,u=_.value),"placeholder"in _&&t(0,c=_.placeholder)},n.$$.update=()=>{n.$$.dirty&272&&t(7,r=E4(l,s)),n.$$.dirty&384&&t(6,i=X2(l,r).schema),n.$$.dirty&64&&t(1,a=Object.keys(i||{})),n.$$.dirty&34&&t(2,o=h(u,a))},[c,a,o,m,s,u,i,r,l]}class _We extends Re{constructor(e){super(),Ve(this,e,vWe,gWe,Oe,{componentInstance:4,value:5,placeholder:0})}}function bWe(n){let e,t;return e=new g5({props:{placeholder:n[0],value:n[2],options:n[1]}}),e.$on("change",n[3]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&1&&(a.placeholder=r[0]),i&4&&(a.value=r[2]),i&2&&(a.options=r[1]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function yWe(n,e,t){let r,i,a,o,l;Ne(n,ml,_=>t(8,l=_));let{componentInstance:s={}}=e,{value:u=""}=e,{placeholder:c}=e;const f=Un(),h=(_,y)=>(Array.isArray(_)||(_=[]),_.filter(w=>y.indexOf(w)!==-1)),m=_=>{t(2,o=h(_.detail,a)),f("change",o)};return n.$$set=_=>{"componentInstance"in _&&t(4,s=_.componentInstance),"value"in _&&t(5,u=_.value),"placeholder"in _&&t(0,c=_.placeholder)},n.$$.update=()=>{n.$$.dirty&272&&t(7,r=E4(l,s)),n.$$.dirty&384&&t(6,i=X2(l,r).schema),n.$$.dirty&64&&t(1,a=Object.keys(i||{})),n.$$.dirty&34&&t(2,o=h(u,a))},[c,a,o,m,s,u,i,r,l]}class $We extends Re{constructor(e){super(),Ve(this,e,yWe,bWe,Oe,{componentInstance:4,value:5,placeholder:0})}}function wWe(n){let e,t;return e=new g5({props:{placeholder:n[0],value:n[2],options:n[1]}}),e.$on("change",n[3]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&1&&(a.placeholder=r[0]),i&4&&(a.value=r[2]),i&2&&(a.options=r[1]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function jP(n,e){return Array.isArray(n)||(n=[]),n.filter(t=>e.indexOf(t)!==-1)}function kWe(n,e,t){let r,i,a,o,l,s;Ne(n,Hr,y=>t(9,l=y)),Ne(n,ml,y=>t(8,s=y));let{componentInstance:u={}}=e,{value:c=""}=e,{placeholder:f}=e;const h=Un();function m(y,w){let A=Object.values(w);if(!(y!=null&&y.tableId))return A.map(T=>T.name);const E=l.list.find(T=>T._id===y.tableId);return Hz(A,{allowLinks:E==null?void 0:E.sql}).map(T=>T.name)}const _=y=>{t(2,o=jP(y.detail,a)),h("change",o)};return n.$$set=y=>{"componentInstance"in y&&t(4,u=y.componentInstance),"value"in y&&t(5,c=y.value),"placeholder"in y&&t(0,f=y.placeholder)},n.$$.update=()=>{n.$$.dirty&272&&t(7,r=E4(s,u)),n.$$.dirty&384&&t(6,i=X2(s,r).schema),n.$$.dirty&192&&t(1,a=m(r,i||{})),n.$$.dirty&34&&t(2,o=jP(c,a))},[f,a,o,_,u,c,i,r,s]}class zWe extends Re{constructor(e){super(),Ve(this,e,kWe,wWe,Oe,{componentInstance:4,value:5,placeholder:0})}}function AWe(n){let e,t;const r=[n[1],{showAllQueries:!0},{showDataProviders:!1},{otherSources:n[0]}];let i={};for(let a=0;a<r.length;a+=1)i=au(i,r[a]);return e=new hX({props:i}),e.$on("change",n[2]),{c(){O(e.$$.fragment)},m(a,o){H(e,a,o),t=!0},p(a,[o]){const l=o&3?Id(r,[o&2&&_6(a[1]),r[1],r[2],o&1&&{otherSources:a[0]}]):{};e.$set(l)},i(a){t||(b(e.$$.fragment,a),t=!0)},o(a){$(e.$$.fragment,a),t=!1},d(a){B(e,a)}}}function MWe(n,e,t){const r=[{name:"Custom",label:"Custom"}];function i(a){Bn.call(this,n,a)}return n.$$set=a=>{t(1,e=au(au({},e),Ng(a)))},e=Ng(e),[r,e,i]}class CWe extends Re{constructor(e){super(),Ve(this,e,MWe,AWe,Oe,{})}}function xP(n,e,t){const r=n.slice();return r[8]=e[t][0],r[0]=e[t][1],r}function SWe(n){let e=n[4][n[0]].name+"",t;return{c(){t=le(e)},m(r,i){C(r,t,i)},p(r,i){i&1&&e!==(e=r[4][r[0]].name+"")&&_t(t,e)},d(r){r&&M(t)}}}function LWe(n){let e=n[0].name+"",t;return{c(){t=le(e)},m(r,i){C(r,t,i)},p:mt,d(r){r&&M(t)}}}function UP(n){let e,t,r,i,a,o,l,s;t=new dn({props:{color:"white",size:"L",name:n[0].icon}}),i=new jt({props:{size:"XS",$$slots:{default:[LWe]},$$scope:{ctx:n}}});function u(){return n[5](n[8])}return{c(){e=J("button"),O(t.$$.fragment),r=U(),O(i.$$.fragment),a=U(),D(e,"class","layout svelte-dl48fo"),De(e,"selected",n[1]===n[8])},m(c,f){C(c,e,f),H(t,e,null),x(e,r),H(i,e,null),x(e,a),o=!0,l||(s=At(e,"click",u),l=!0)},p(c,f){n=c;const h={};f&2048&&(h.$$scope={dirty:f,ctx:n}),i.$set(h),f&18&&De(e,"selected",n[1]===n[8])},i(c){o||(b(t.$$.fragment,c),b(i.$$.fragment,c),o=!0)},o(c){$(t.$$.fragment,c),$(i.$$.fragment,c),o=!1},d(c){c&&M(e),B(t),B(i),l=!1,s()}}}function EWe(n){let e,t,r=Object.entries(n[4]),i=[];for(let o=0;o<r.length;o+=1)i[o]=UP(xP(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){e=J("div");for(let o=0;o<i.length;o+=1)i[o].c();D(e,"class","container svelte-dl48fo")},m(o,l){C(o,e,l);for(let s=0;s<i.length;s+=1)i[s].m(e,null);t=!0},p(o,l){if(l&18){r=Object.entries(o[4]);let s;for(s=0;s<r.length;s+=1){const u=xP(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=UP(u),i[s].c(),b(i[s],1),i[s].m(e,null))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){o&&M(e),Dn(i,o)}}}function TWe(n){let e,t;return e=new _r({props:{onConfirm:n[6],size:"L",title:"Select layout",$$slots:{default:[EWe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2&&(a.onConfirm=r[6]),i&2050&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function DWe(n){let e,t,r,i;e=new Sr({props:{$$slots:{default:[SWe]},$$scope:{ctx:n}}}),e.$on("click",function(){Mn(n[2].show)&&n[2].show.apply(this,arguments)});let a={$$slots:{default:[TWe]},$$scope:{ctx:n}};return r=new ir({props:a}),n[7](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),C(o,t,l),H(r,o,l),i=!0},p(o,[l]){n=o;const s={};l&2049&&(s.$$scope={dirty:l,ctx:n}),e.$set(s);const u={};l&2050&&(u.$$scope={dirty:l,ctx:n}),r.$set(u)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&M(t),n[7](null),B(r,o)}}}function HWe(n,e,t){const r=Un();let{value:i=""}=e,a=i,o,l={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 s=f=>t(1,a=f),u=()=>r("change",a);function c(f){He[f?"unshift":"push"](()=>{o=f,t(2,o)})}return n.$$set=f=>{"value"in f&&t(0,i=f.value)},[i,a,o,r,l,s,u,c]}class BWe extends Re{constructor(e){super(),Ve(this,e,HWe,DWe,Oe,{value:0})}}function OWe(n){let e;return{c(){e=le("Define filters")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function IWe(n){let e;return{c(){e=le("Save")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function PWe(n){let e,t;return e=new $n({props:{cta:!0,slot:"buttons",$$slots:{default:[IWe]},$$scope:{ctx:n}}}),e.$on("click",n[6]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&262144&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function VWe(n){let e,t,r;function i(o){n[12](o)}let a={slot:"body",filters:n[4],bindings:n[0],schemaFields:n[5]};return n[3]!==void 0&&(a.allOr=n[3]),e=new Bz({props:a}),He.push(()=>nt(e,"allOr",i)),e.$on("change",n[13]),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){const s={};l&16&&(s.filters=o[4]),l&1&&(s.bindings=o[0]),l&32&&(s.schemaFields=o[5]),!t&&l&8&&(t=!0,s.allOr=o[3],rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function RWe(n){let e,t,r,i;e=new Sr({props:{$$slots:{default:[OWe]},$$scope:{ctx:n}}}),e.$on("click",function(){Mn(n[1].show)&&n[1].show.apply(this,arguments)});let a={title:"Filtering",$$slots:{body:[VWe],buttons:[PWe]},$$scope:{ctx:n}};return r=new Hf({props:a}),n[14](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),C(o,t,l),H(r,o,l),i=!0},p(o,[l]){n=o;const s={};l&262144&&(s.$$scope={dirty:l,ctx:n}),e.$set(s);const u={};l&262205&&(u.$$scope={dirty:l,ctx:n}),r.$set(u)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&M(t),n[14](null),B(r,o)}}}const HX=/\d[0-9]*:/g;function NWe(n){var t;let e=1;for(let r of n)r.field&&((t=r.field)==null?void 0:t.match(HX))==null&&(r.field=`${e++}:${r.field}`);return n}function FWe(n,e,t){let r,i,a,o,l;Ne(n,ml,P=>t(11,l=P));const s=Un();let{value:u=[]}=e,{componentInstance:c}=e,{bindings:f=[]}=e,h,m=null,_,y;function w(P){const F=[];for(let j of P){let q=j.field;if(j.operator==="allOr"){y=t(3,_=!0);continue}if(typeof j.field=="string"&&j.field.match(HX)!=null){const W=q.split(":"),te=W[0];isNaN(parseInt(te))||(W.shift(),q=W.join(":"))}F.push({...j,field:q})}return F}async function A(){!m&&_!==y&&t(2,m=r);const P=m==null?void 0:m.filter(F=>F.operator!=="allOr");_&&P&&P.push({operator:"allOr"}),P&&s("change",NWe(P)),yt.success("Filters saved."),h.hide()}function E(P){_=P,t(3,_)}const T=P=>{t(2,m=P.detail)};function I(P){He[P?"unshift":"push"](()=>{h=P,t(1,h)})}return n.$$set=P=>{"value"in P&&t(7,u=P.value),"componentInstance"in P&&t(8,c=P.componentInstance),"bindings"in P&&t(0,f=P.bindings)},n.$$.update=()=>{var P;n.$$.dirty&128&&t(4,r=w(u||[])),n.$$.dirty&2304&&t(10,i=E4(l,c)),n.$$.dirty&3072&&t(9,a=(P=X2(l,i))==null?void 0:P.schema),n.$$.dirty&512&&t(5,o=Object.values(a||{}))},[f,h,m,_,r,o,A,u,c,a,i,l,E,T,I]}class jWe extends Re{constructor(e){super(),Ve(this,e,FWe,RWe,Oe,{value:7,componentInstance:8,bindings:0})}}function qP(n){let e,t,r,i,a;return t=new dn({props:{size:"S",name:"FlashOn"}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","icon svelte-11tgeq8"),D(e,"data-cy","text-binding-button")},m(o,l){C(o,e,l),H(t,e,null),r=!0,i||(a=At(e,"click",function(){Mn(n[9].show)&&n[9].show.apply(this,arguments)}),i=!0)},p(o,l){n=o},i(o){r||(b(t.$$.fragment,o),r=!0)},o(o){$(t.$$.fragment,o),r=!1},d(o){o&&M(e),B(t),i=!1,a()}}}function xWe(n){let e;return{c(){e=le("Add the objects on the left to enrich your text.")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function UWe(n){let e;return{c(){e=le("Save")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function qWe(n){let e,t;return e=new $n({props:{cta:!0,slot:"buttons",$$slots:{default:[UWe]},$$scope:{ctx:n}}}),e.$on("click",n[14]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&33554432&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function WWe(n){let e,t,r;var i=n[0];function a(o){return{props:{slot:"body",value:o[8],close:o[14],bindings:o[1],allowJS:o[6]}}}return i&&(e=new i(a(n)),e.$on("change",n[22])),{c(){e&&O(e.$$.fragment),t=$t()},m(o,l){e&&H(e,o,l),C(o,t,l),r=!0},p(o,l){const s={};if(l&256&&(s.value=o[8]),l&2&&(s.bindings=o[1]),l&64&&(s.allowJS=o[6]),i!==(i=o[0])){if(e){we();const u=e;$(u.$$.fragment,1,0,()=>{B(u,1)}),ke()}i?(e=new i(a(o)),e.$on("change",o[22]),O(e.$$.fragment),b(e.$$.fragment,1),H(e,t.parentNode,t)):e=null}else i&&e.$set(s)},i(o){r||(e&&b(e.$$.fragment,o),r=!0)},o(o){e&&$(e.$$.fragment,o),r=!1},d(o){o&&M(t),e&&B(e,o)}}}function GWe(n){let e,t,r,i,a,o;t=new gp({props:{label:n[4],disabled:n[5],readonly:n[12],value:n[12]?"(JavaScript function)":n[8],placeholder:n[3],options:n[11],error:n[7]}}),t.$on("type",n[19]),t.$on("pick",n[20]),t.$on("blur",n[21]);let l=!n[5]&&qP(n),s={title:n[2],$$slots:{body:[WWe],buttons:[qWe],description:[xWe]},$$scope:{ctx:n}};return a=new Hf({props:s}),n[23](a),{c(){e=J("div"),O(t.$$.fragment),r=U(),l&&l.c(),i=U(),O(a.$$.fragment),D(e,"class","control svelte-11tgeq8"),De(e,"disabled",n[5])},m(u,c){C(u,e,c),H(t,e,null),x(e,r),l&&l.m(e,null),C(u,i,c),H(a,u,c),o=!0},p(u,[c]){const f={};c&16&&(f.label=u[4]),c&32&&(f.disabled=u[5]),c&4096&&(f.readonly=u[12]),c&4352&&(f.value=u[12]?"(JavaScript function)":u[8]),c&8&&(f.placeholder=u[3]),c&2048&&(f.options=u[11]),c&128&&(f.error=u[7]),t.$set(f),u[5]?l&&(we(),$(l,1,1,()=>{l=null}),ke()):l?(l.p(u,c),c&32&&b(l,1)):(l=qP(u),l.c(),b(l,1),l.m(e,null)),c&32&&De(e,"disabled",u[5]);const h={};c&4&&(h.title=u[2]),c&33555779&&(h.$$scope={dirty:c,ctx:u}),a.$set(h)},i(u){o||(b(t.$$.fragment,u),b(l),b(a.$$.fragment,u),o=!0)},o(u){$(t.$$.fragment,u),$(l),$(a.$$.fragment,u),o=!1},d(u){u&&M(e),B(t),l&&l.d(),u&&M(i),n[23](null),B(a,u)}}}function YWe(n,e,t){let r,i,a,o,{panel:l=i7}=e,{value:s=""}=e,{bindings:u=[]}=e,{title:c="Bindings"}=e,{placeholder:f}=e,{label:h}=e,{disabled:m=!1}=e,{options:_}=e,{allowJS:y=!0}=e,{appendBindingsAsOptions:w=!0}=e,{error:A}=e;const E=Un();let T;const I=()=>{P(i),T.hide()},P=(oe,ie)=>{ie&&!(_!=null&&_.includes(oe))&&(oe=`{{ ${oe} }}`),E("change",Df(u,oe))},F=(oe,ie,K)=>K?[].concat(oe||[]).concat((ie==null?void 0:ie.map(G=>G.readableBinding))||[]):oe,j=oe=>P(oe.detail,!1),q=oe=>P(oe.detail,!0),W=()=>E("blur"),te=oe=>t(10,i=oe.detail);function Q(oe){He[oe?"unshift":"push"](()=>{T=oe,t(9,T)})}return n.$$set=oe=>{"panel"in oe&&t(0,l=oe.panel),"value"in oe&&t(16,s=oe.value),"bindings"in oe&&t(1,u=oe.bindings),"title"in oe&&t(2,c=oe.title),"placeholder"in oe&&t(3,f=oe.placeholder),"label"in oe&&t(4,h=oe.label),"disabled"in oe&&t(5,m=oe.disabled),"options"in oe&&t(17,_=oe.options),"allowJS"in oe&&t(6,y=oe.allowJS),"appendBindingsAsOptions"in oe&&t(18,w=oe.appendBindingsAsOptions),"error"in oe&&t(7,A=oe.error)},n.$$.update=()=>{n.$$.dirty&65538&&t(8,r=P3(u,s)),n.$$.dirty&256&&t(10,i=r),n.$$.dirty&65536&&t(12,a=k7(s)),n.$$.dirty&393218&&t(11,o=F(_,u,w))},[l,u,c,f,h,m,y,A,r,T,i,o,a,E,I,P,s,_,w,j,q,W,te,Q]}class BX extends Re{constructor(e){super(),Ve(this,e,YWe,GWe,Oe,{panel:0,value:16,bindings:1,title:2,placeholder:3,label:4,disabled:5,options:17,allowJS:6,appendBindingsAsOptions:18,error:7})}}function KWe(n){let e,t;return e=new BX({props:{value:n[0],bindings:n[1],placeholder:n[2],options:n[3],appendBindingsAsOptions:!1}}),e.$on("change",n[5]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&1&&(a.value=r[0]),i&2&&(a.bindings=r[1]),i&4&&(a.placeholder=r[2]),i&8&&(a.options=r[3]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function XWe(n,e,t){let r,i;Ne(n,Xt,u=>t(4,i=u));let{value:a}=e,{bindings:o}=e,{placeholder:l}=e;function s(u){Bn.call(this,n,u)}return n.$$set=u=>{"value"in u&&t(0,a=u.value),"bindings"in u&&t(1,o=u.bindings),"placeholder"in u&&t(2,l=u.placeholder)},n.$$.update=()=>{n.$$.dirty&16&&t(3,r=i.screens.map(u=>{var c;return(c=u.routing)==null?void 0:c.route}).filter(u=>u!=null))},[a,o,l,r,i,s]}class JWe extends Re{constructor(e){super(),Ve(this,e,XWe,KWe,Oe,{value:0,bindings:1,placeholder:2})}}function WP(n,e,t){const r=n.slice();return r[6]=e[t],r[7]=e,r[8]=t,r}function GP(n){let e,t;return e=new jt({props:{size:"S",$$slots:{default:[ZWe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function ZWe(n){let e;return{c(){e=le("Add an option to get started.")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function YP(n){let e,t,r,i,a,o,l,s=[],u=new Map,c;t=new un({props:{$$slots:{default:[QWe]},$$scope:{ctx:n}}}),i=new un({props:{$$slots:{default:[eGe]},$$scope:{ctx:n}}});let f=n[0];const h=m=>m[6].id;for(let m=0;m<f.length;m+=1){let _=WP(n,f,m),y=h(_);u.set(y,s[m]=KP(y,_))}return{c(){e=J("div"),O(t.$$.fragment),r=U(),O(i.$$.fragment),a=U(),o=J("div"),l=U();for(let m=0;m<s.length;m+=1)s[m].c();D(e,"class","options svelte-12ls1u")},m(m,_){C(m,e,_),H(t,e,null),x(e,r),H(i,e,null),x(e,a),x(e,o),x(e,l);for(let y=0;y<s.length;y+=1)s[y].m(e,null);c=!0},p(m,_){const y={};_&512&&(y.$$scope={dirty:_,ctx:m}),t.$set(y);const w={};_&512&&(w.$$scope={dirty:_,ctx:m}),i.$set(w),_&3&&(f=m[0],we(),s=Il(s,_,h,1,m,f,u,e,Mc,KP,null,WP),ke())},i(m){if(!c){b(t.$$.fragment,m),b(i.$$.fragment,m);for(let _=0;_<f.length;_+=1)b(s[_]);c=!0}},o(m){$(t.$$.fragment,m),$(i.$$.fragment,m);for(let _=0;_<s.length;_+=1)$(s[_]);c=!1},d(m){m&&M(e),B(t),B(i);for(let _=0;_<s.length;_+=1)s[_].d()}}}function QWe(n){let e;return{c(){e=le("Label")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function eGe(n){let e;return{c(){e=le("Value")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function KP(n,e){let t,r,i,a,o,l,s,u,c;function f(w){e[3](w,e[6])}let h={placeholder:"Label"};e[6].label!==void 0&&(h.value=e[6].label),r=new En({props:h}),He.push(()=>nt(r,"value",f));function m(w){e[4](w,e[6])}let _={placeholder:"Value"};e[6].value!==void 0&&(_.value=e[6].value),o=new En({props:_}),He.push(()=>nt(o,"value",m));function y(){return e[5](e[6])}return u=new dn({props:{name:"Close",hoverable:!0,size:"S"}}),u.$on("click",y),{key:n,first:null,c(){t=$t(),O(r.$$.fragment),a=U(),O(o.$$.fragment),s=U(),O(u.$$.fragment),this.first=t},m(w,A){C(w,t,A),H(r,w,A),C(w,a,A),H(o,w,A),C(w,s,A),H(u,w,A),c=!0},p(w,A){e=w;const E={};!i&&A&1&&(i=!0,E.value=e[6].label,rt(()=>i=!1)),r.$set(E);const T={};!l&&A&1&&(l=!0,T.value=e[6].value,rt(()=>l=!1)),o.$set(T)},i(w){c||(b(r.$$.fragment,w),b(o.$$.fragment,w),b(u.$$.fragment,w),c=!0)},o(w){$(r.$$.fragment,w),$(o.$$.fragment,w),$(u.$$.fragment,w),c=!1},d(w){w&&M(t),B(r,w),w&&M(a),B(o,w),w&&M(s),B(u,w)}}}function tGe(n){let e;return{c(){e=le("Add Option")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function nGe(n){var s;let e,t,r,i,a,o=!n[0].length&&GP(n),l=((s=n[0])==null?void 0:s.length)&&YP(n);return i=new $n({props:{icon:"AddCircle",size:"M",secondary:!0,$$slots:{default:[tGe]},$$scope:{ctx:n}}}),i.$on("click",n[2]),{c(){o&&o.c(),e=U(),l&&l.c(),t=U(),r=J("div"),O(i.$$.fragment)},m(u,c){o&&o.m(u,c),C(u,e,c),l&&l.m(u,c),C(u,t,c),C(u,r,c),H(i,r,null),a=!0},p(u,c){var h;u[0].length?o&&(we(),$(o,1,1,()=>{o=null}),ke()):o?c&1&&b(o,1):(o=GP(u),o.c(),b(o,1),o.m(e.parentNode,e)),(h=u[0])!=null&&h.length?l?(l.p(u,c),c&1&&b(l,1)):(l=YP(u),l.c(),b(l,1),l.m(t.parentNode,t)):l&&(we(),$(l,1,1,()=>{l=null}),ke());const f={};c&512&&(f.$$scope={dirty:c,ctx:u}),i.$set(f)},i(u){a||(b(o),b(l),b(i.$$.fragment,u),a=!0)},o(u){$(o),$(l),$(i.$$.fragment,u),a=!1},d(u){o&&o.d(u),u&&M(e),l&&l.d(u),u&&M(t),u&&M(r),B(i)}}}function rGe(n){let e,t,r;return t=new Rt({props:{noPadding:!0,gap:"S",$$slots:{default:[nGe]},$$scope:{ctx:n}}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","container svelte-12ls1u")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a&513&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function iGe(n){let e,t;return e=new S4({props:{$$slots:{default:[rGe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&513&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function aGe(n,e,t){let{options:r=[]}=e;const i=u=>{t(0,r=r.filter(c=>c.id!==u))},a=()=>{t(0,r=[...r,{id:c2.exports.generate(),label:null,value:null}])};function o(u,c){n.$$.not_equal(c.label,u)&&(c.label=u,t(0,r))}function l(u,c){n.$$.not_equal(c.value,u)&&(c.value=u,t(0,r))}const s=u=>i(u.id);return n.$$set=u=>{"options"in u&&t(0,r=u.options)},[r,i,a,o,l,s]}class oGe extends Re{constructor(e){super(),Ve(this,e,aGe,iGe,Oe,{options:0})}}function lGe(n){let e;return{c(){e=le("Define Options")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function sGe(n){let e;return{c(){e=le("Define the options for this picker.")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function uGe(n){let e;return{c(){e=le("Save")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function cGe(n){let e,t;return e=new $n({props:{cta:!0,slot:"buttons",$$slots:{default:[uGe]},$$scope:{ctx:n}}}),e.$on("click",n[2]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&128&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function fGe(n){let e,t,r;function i(o){n[4](o)}let a={slot:"body"};return n[1]!==void 0&&(a.options=n[1]),e=new oGe({props:a}),He.push(()=>nt(e,"options",i)),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){const s={};!t&&l&2&&(t=!0,s.options=o[1],rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function pGe(n){let e,t,r,i;e=new Sr({props:{$$slots:{default:[lGe]},$$scope:{ctx:n}}}),e.$on("click",function(){Mn(n[0].show)&&n[0].show.apply(this,arguments)});let a={title:"Options",$$slots:{body:[fGe],buttons:[cGe],description:[sGe]},$$scope:{ctx:n}};return r=new Hf({props:a}),n[5](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),C(o,t,l),H(r,o,l),i=!0},p(o,[l]){n=o;const s={};l&128&&(s.$$scope={dirty:l,ctx:n}),e.$set(s);const u={};l&130&&(u.$$scope={dirty:l,ctx:n}),r.$set(u)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&M(t),n[5](null),B(r,o)}}}function dGe(n,e,t){const r=Un();let{value:i}=e,a,o=i||[];const l=async()=>{t(1,o=o.filter(c=>c.value||c.label));for(let c=0;c<o.length;c++){let f=o[c];f.label=f.label?f.label:f.value,f.value=f.value?f.value:f.label,t(1,o[c]=f,o)}r("change",o),a.hide()};function s(c){o=c,t(1,o)}function u(c){He[c?"unshift":"push"](()=>{a=c,t(0,a)})}return n.$$set=c=>{"value"in c&&t(3,i=c.value)},[a,o,l,i,s,u]}class hGe extends Re{constructor(e){super(),Ve(this,e,dGe,pGe,Oe,{value:3})}}function mGe(n){let e,t;return e=new gp({props:{value:n[0],options:n[1]}}),e.$on("change",n[8]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&1&&(a.value=r[0]),i&2&&(a.options=r[1]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function gGe(n,e,t){let r,i,a,o,l;Ne(n,ml,m=>t(7,l=m));let{componentInstance:s}=e,{value:u}=e,{type:c}=e;const f=(m,_)=>{let y=Object.entries(m!=null?m:{}),w=[];return _==="field/options"||_==="field/barcode/qr"?w=[_,"field/string"]:w=[_],w=w.map(A=>A.slice(A.indexOf("/")+1)),y=y.filter(A=>w.includes(A[1].type)),y.map(A=>A[0])};function h(m){Bn.call(this,n,m)}return n.$$set=m=>{"componentInstance"in m&&t(2,s=m.componentInstance),"value"in m&&t(0,u=m.value),"type"in m&&t(3,c=m.type)},n.$$.update=()=>{n.$$.dirty&132&&t(6,r=N_(l==null?void 0:l.props,s._id,m=>m._component==="@budibase/standard-components/form")),n.$$.dirty&192&&t(5,i=E4(l,r)),n.$$.dirty&160&&t(4,a=X2(l,i,{formSchema:!0}).schema),n.$$.dirty&24&&t(1,o=f(a,c))},[u,o,s,c,a,i,r,l,h]}class z3 extends Re{constructor(e){super(),Ve(this,e,gGe,mGe,Oe,{componentInstance:2,value:0,type:3})}}function XP(n,e,t){const r=n.slice();return r[29]=e[t],r[30]=e,r[31]=t,r}function JP(n,e,t){const r=n.slice();return r[29]=e[t],r}function vGe(n){let e;return{c(){e=le("Schema validation rules")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function _Ge(n){let e,t;return e=new jt({props:{size:"S",$$slots:{default:[yGe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[1]&8&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function bGe(n){let e,t,r=n[5],i=[];for(let o=0;o<r.length;o+=1)i[o]=ZP(JP(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){e=J("div");for(let o=0;o<i.length;o+=1)i[o].c();D(e,"class","links svelte-lcp0nr")},m(o,l){C(o,e,l);for(let s=0;s<i.length;s+=1)i[s].m(e,null);t=!0},p(o,l){if(l[0]&50){r=o[5];let s;for(s=0;s<r.length;s+=1){const u=JP(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=ZP(u),i[s].c(),b(i[s],1),i[s].m(e,null))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){o&&M(e),Dn(i,o)}}}function yGe(n){let e;return{c(){e=le("There are no built-in validation rules from the schema.")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function ZP(n){let e,t,r,i,a,o,l,s,u,c,f,h;return t=new mn({props:{placeholder:"Constraint",value:n[29].constraint,options:n[4],disabled:!0}}),i=new mn({props:{placeholder:null,value:"Value",options:["Binding","Value"],disabled:!0}}),o=new Za({props:{placeholder:"Constraint value",value:n[29].value,bindings:n[1],disabled:!0}}),s=new Za({props:{placeholder:"Error message",value:n[29].error,bindings:n[1],disabled:!0}}),{c(){e=J("div"),O(t.$$.fragment),r=U(),O(i.$$.fragment),a=U(),O(o.$$.fragment),l=U(),O(s.$$.fragment),u=U(),c=J("div"),f=U(),D(e,"class","rule schema svelte-lcp0nr")},m(m,_){C(m,e,_),H(t,e,null),x(e,r),H(i,e,null),x(e,a),H(o,e,null),x(e,l),H(s,e,null),x(e,u),x(e,c),x(e,f),h=!0},p(m,_){const y={};_[0]&32&&(y.value=m[29].constraint),_[0]&16&&(y.options=m[4]),t.$set(y);const w={};_[0]&32&&(w.value=m[29].value),_[0]&2&&(w.bindings=m[1]),o.$set(w);const A={};_[0]&32&&(A.value=m[29].error),_[0]&2&&(A.bindings=m[1]),s.$set(A)},i(m){h||(b(t.$$.fragment,m),b(i.$$.fragment,m),b(o.$$.fragment,m),b(s.$$.fragment,m),h=!0)},o(m){$(t.$$.fragment,m),$(i.$$.fragment,m),$(o.$$.fragment,m),$(s.$$.fragment,m),h=!1},d(m){m&&M(e),B(t),B(i),B(o),B(s)}}}function $Ge(n){let e,t,r,i,a,o;e=new Rn({props:{size:"XS",$$slots:{default:[vGe]},$$scope:{ctx:n}}});const l=[bGe,_Ge],s=[];function u(c,f){var h;return(h=c[5])!=null&&h.length?0:1}return r=u(n),i=s[r]=l[r](n),{c(){O(e.$$.fragment),t=U(),i.c(),a=$t()},m(c,f){H(e,c,f),C(c,t,f),s[r].m(c,f),C(c,a,f),o=!0},p(c,f){const h={};f[1]&8&&(h.$$scope={dirty:f,ctx:c}),e.$set(h);let m=r;r=u(c),r===m?s[r].p(c,f):(we(),$(s[m],1,1,()=>{s[m]=null}),ke(),i=s[r],i?i.p(c,f):(i=s[r]=l[r](c),i.c()),b(i,1),i.m(a.parentNode,a))},i(c){o||(b(e.$$.fragment,c),b(i),o=!0)},o(c){$(e.$$.fragment,c),$(i),o=!1},d(c){B(e,c),c&&M(t),s[r].d(c),c&&M(a)}}}function wGe(n){let e;return{c(){e=le("Custom validation rules")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function QP(n){let e,t=[],r=new Map,i,a=n[0];const o=l=>l[29].id;for(let l=0;l<a.length;l+=1){let s=XP(n,a,l),u=o(s);r.set(u,t[l]=eV(u,s))}return{c(){e=J("div");for(let l=0;l<t.length;l+=1)t[l].c();D(e,"class","links svelte-lcp0nr")},m(l,s){C(l,e,s);for(let u=0;u<t.length;u+=1)t[u].m(e,null);i=!0},p(l,s){s[0]&415&&(a=l[0],we(),t=Il(t,s,o,1,l,a,r,e,Mc,eV,null,XP),ke())},i(l){if(!i){for(let s=0;s<a.length;s+=1)b(t[s]);i=!0}},o(l){for(let s=0;s<t.length;s+=1)$(t[s]);i=!1},d(l){l&&M(e);for(let s=0;s<t.length;s+=1)t[s].d()}}}function kGe(n){let e,t,r,i,a;const o=[EGe,LGe,SGe,CGe,MGe],l=[];function s(u,c){return c[0]&1&&(e=null),e==null&&(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=s(n,[-1,-1]),r=l[t]=o[t](n),{c(){r.c(),i=$t()},m(u,c){l[t].m(u,c),C(u,i,c),a=!0},p(u,c){let f=t;t=s(u,c),t===f?l[t].p(u,c):(we(),$(l[f],1,1,()=>{l[f]=null}),ke(),r=l[t],r?r.p(u,c):(r=l[t]=o[t](u),r.c()),b(r,1),r.m(i.parentNode,i))},i(u){a||(b(r),a=!0)},o(u){$(r),a=!1},d(u){l[t].d(u),u&&M(i)}}}function zGe(n){let e,t,r;function i(o){n[16](o,n[29])}let a={placeholder:"Constraint value"};return n[29].value!==void 0&&(a.value=n[29].value),e=new En({props:a}),He.push(()=>nt(e,"value",i)),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){n=o;const s={};!t&&l[0]&1&&(t=!0,s.value=n[29].value,rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function AGe(n){let e,t;function r(...i){return n[15](n[29],n[30],n[31],...i)}return e=new Za({props:{placeholder:"Constraint value",value:n[29].value,bindings:n[1],disabled:n[29].constraint==="required"}}),e.$on("change",r),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){n=i;const o={};a[0]&1&&(o.value=n[29].value),a[0]&2&&(o.bindings=n[1]),a[0]&1&&(o.disabled=n[29].constraint==="required"),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function MGe(n){let e,t;return e=new Za({props:{disabled:!0}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p:mt,i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function CGe(n){let e,t,r;function i(o){n[19](o,n[29])}let a={enableTime:!1,disabled:n[29].constraint==="required"};return n[29].value!==void 0&&(a.value=n[29].value),e=new rp({props:a}),He.push(()=>nt(e,"value",i)),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){n=o;const s={};l[0]&1&&(s.disabled=n[29].constraint==="required"),!t&&l[0]&1&&(t=!0,s.value=n[29].value,rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function SGe(n){let e,t,r;function i(o){n[18](o,n[29])}let a={disabled:n[29].constraint==="required",options:[{label:"True",value:"true"},{label:"False",value:"false"}]};return n[29].value!==void 0&&(a.value=n[29].value),e=new mn({props:a}),He.push(()=>nt(e,"value",i)),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){n=o;const s={};l[0]&1&&(s.disabled=n[29].constraint==="required"),!t&&l[0]&1&&(t=!0,s.value=n[29].value,rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function LGe(n){let e,t;return e=new mn({props:{disabled:n[29].constraint==="required",options:n[2].schema[n[3]].constraints.inclusion,getOptionLabel:IGe,getOptionValue:PGe,value:n[29].value}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&1&&(a.disabled=r[29].constraint==="required"),i[0]&12&&(a.options=r[2].schema[r[3]].constraints.inclusion),i[0]&1&&(a.value=r[29].value),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function EGe(n){let e,t,r;function i(o){n[17](o,n[29])}let a={disabled:n[29].constraint==="required",placeholder:"Constraint value"};return n[29].value!==void 0&&(a.value=n[29].value),e=new En({props:a}),He.push(()=>nt(e,"value",i)),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){n=o;const s={};l[0]&1&&(s.disabled=n[29].constraint==="required"),!t&&l[0]&1&&(t=!0,s.value=n[29].value,rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function eV(n,e){let t,r,i,a,o,l,s,u,c,f,h,m,_,y,w,A,E,T;function I(K){e[13](K,e[29])}let P={options:e[4],placeholder:"Constraint"};e[29].constraint!==void 0&&(P.value=e[29].constraint),r=new mn({props:P}),He.push(()=>nt(r,"value",I));function F(K){e[14](K,e[29])}let j={disabled:e[29].constraint==="required",placeholder:null,options:["Binding","Value"]};e[29].valueType!==void 0&&(j.value=e[29].valueType),o=new mn({props:j}),He.push(()=>nt(o,"value",F));const q=[AGe,zGe,kGe],W=[];function te(K,G){return G[0]&1&&(u=null),K[29].valueType==="Binding"?0:(u==null&&(u=!!(K[29].type!=="array"&&["maxLength","minLength","regex","notRegex","contains","notContains"].includes(K[29].constraint))),u?1:2)}c=te(e,[-1,-1]),f=W[c]=q[c](e);function Q(...K){return e[20](e[29],e[30],e[31],...K)}m=new Za({props:{placeholder:"Error message",value:e[29].error,bindings:e[1]}}),m.$on("change",Q);function oe(){return e[21](e[29])}y=new dn({props:{name:"Duplicate",hoverable:!0,size:"S"}}),y.$on("click",oe);function ie(){return e[22](e[29])}return A=new dn({props:{name:"Close",hoverable:!0,size:"S"}}),A.$on("click",ie),{key:n,first:null,c(){t=J("div"),O(r.$$.fragment),a=U(),O(o.$$.fragment),s=U(),f.c(),h=U(),O(m.$$.fragment),_=U(),O(y.$$.fragment),w=U(),O(A.$$.fragment),E=U(),D(t,"class","rule svelte-lcp0nr"),this.first=t},m(K,G){C(K,t,G),H(r,t,null),x(t,a),H(o,t,null),x(t,s),W[c].m(t,null),x(t,h),H(m,t,null),x(t,_),H(y,t,null),x(t,w),H(A,t,null),x(t,E),T=!0},p(K,G){e=K;const ne={};G[0]&16&&(ne.options=e[4]),!i&&G[0]&1&&(i=!0,ne.value=e[29].constraint,rt(()=>i=!1)),r.$set(ne);const se={};G[0]&1&&(se.disabled=e[29].constraint==="required"),!l&&G[0]&1&&(l=!0,se.value=e[29].valueType,rt(()=>l=!1)),o.$set(se);let pe=c;c=te(e,G),c===pe?W[c].p(e,G):(we(),$(W[pe],1,1,()=>{W[pe]=null}),ke(),f=W[c],f?f.p(e,G):(f=W[c]=q[c](e),f.c()),b(f,1),f.m(t,h));const ze={};G[0]&1&&(ze.value=e[29].error),G[0]&2&&(ze.bindings=e[1]),m.$set(ze)},i(K){T||(b(r.$$.fragment,K),b(o.$$.fragment,K),b(f),b(m.$$.fragment,K),b(y.$$.fragment,K),b(A.$$.fragment,K),T=!0)},o(K){$(r.$$.fragment,K),$(o.$$.fragment,K),$(f),$(m.$$.fragment,K),$(y.$$.fragment,K),$(A.$$.fragment,K),T=!1},d(K){K&&M(t),B(r),B(o),W[c].d(),B(m),B(y),B(A)}}}function TGe(n){let e;return{c(){e=le("Add Rule")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function DGe(n){var s;let e,t,r,i,a,o;e=new Rn({props:{size:"XS",$$slots:{default:[wGe]},$$scope:{ctx:n}}});let l=((s=n[0])==null?void 0:s.length)&&QP(n);return a=new $n({props:{secondary:!0,icon:"Add",$$slots:{default:[TGe]},$$scope:{ctx:n}}}),a.$on("click",n[6]),{c(){O(e.$$.fragment),t=U(),l&&l.c(),r=U(),i=J("div"),O(a.$$.fragment),D(i,"class","button")},m(u,c){H(e,u,c),C(u,t,c),l&&l.m(u,c),C(u,r,c),C(u,i,c),H(a,i,null),o=!0},p(u,c){var m;const f={};c[1]&8&&(f.$$scope={dirty:c,ctx:u}),e.$set(f),(m=u[0])!=null&&m.length?l?(l.p(u,c),c[0]&1&&b(l,1)):(l=QP(u),l.c(),b(l,1),l.m(r.parentNode,r)):l&&(we(),$(l,1,1,()=>{l=null}),ke());const h={};c[1]&8&&(h.$$scope={dirty:c,ctx:u}),a.$set(h)},i(u){o||(b(e.$$.fragment,u),b(l),b(a.$$.fragment,u),o=!0)},o(u){$(e.$$.fragment,u),$(l),$(a.$$.fragment,u),o=!1},d(u){B(e,u),u&&M(t),l&&l.d(u),u&&M(r),u&&M(i),B(a)}}}function HGe(n){var a;let e,t,r,i;return e=new Rt({props:{noPadding:!0,gap:(a=n[5])!=null&&a.length?"S":"XS",$$slots:{default:[$Ge]},$$scope:{ctx:n}}}),r=new Rt({props:{noPadding:!0,gap:"S",$$slots:{default:[DGe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),C(o,t,l),H(r,o,l),i=!0},p(o,l){var c;const s={};l[0]&32&&(s.gap=(c=o[5])!=null&&c.length?"S":"XS"),l[0]&50|l[1]&8&&(s.$$scope={dirty:l,ctx:o}),e.$set(s);const u={};l[0]&31|l[1]&8&&(u.$$scope={dirty:l,ctx:o}),r.$set(u)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&M(t),B(r,o)}}}function BGe(n){let e,t,r;return t=new Rt({props:{noPadding:!0,gap:"M",$$slots:{default:[HGe]},$$scope:{ctx:n}}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","container svelte-lcp0nr")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a[0]&63|a[1]&8&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function OGe(n){let e,t;return e=new S4({props:{$$slots:{default:[BGe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&63|i[1]&8&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}const IGe=n=>n,PGe=n=>n;function VGe(n,e,t){let r,i,a,o,l,s,u;Ne(n,I3,ne=>t(11,s=ne)),Ne(n,ml,ne=>t(12,u=ne));let{rules:c=[]}=e,{bindings:f=[]}=e,{type:h}=e;const m={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"}},_={string:[m.Required,m.MaxLength,m.Equal,m.NotEqual,m.Regex,m.NotRegex],number:[m.Required,m.MaxValue,m.MinValue,m.Equal,m.NotEqual],boolean:[m.Required,m.Equal,m.NotEqual],datetime:[m.Required,m.MaxValue,m.MinValue,m.Equal,m.NotEqual],attachment:[m.Required],link:[m.Required,m.Contains,m.NotContains,m.MinLength,m.MaxLength],array:[m.Required,m.MinLength,m.MaxLength,m.Contains,m.NotContains]},y=ne=>_[ne],w=(ne,se)=>{if(!ne||!se)return null;const pe=N_(ne.props,se._id,ze=>ze._component.endsWith("/form"));return X2(ne,pe==null?void 0:pe.dataSource)},A=(ne,se)=>{var $e,Ce,ge,st,Ae,ve;if(!ne||!se)return[];const pe=($e=se.schema)==null?void 0:$e[ne],ze=pe==null?void 0:pe.constraints;if(!ze)return[];let he=[];if((ne===((Ce=se==null?void 0:se.table)==null?void 0:Ce.primaryDisplay)||((ge=ze.presence)==null?void 0:ge.allowEmpty)===!1)&&he.push({constraint:"required",error:"Required field"}),E((st=ze.length)==null?void 0:st.maximum)){const je=ze.length.maximum;he.push({constraint:"maxLength",value:je,error:`Maximum ${je} characters`})}if(E((Ae=ze.numericality)==null?void 0:Ae.greaterThanOrEqualTo)){const je=ze.numericality.greaterThanOrEqualTo;he.push({constraint:"minValue",value:je,error:`Minimum value is ${je}`})}if(E((ve=ze.numericality)==null?void 0:ve.lessThanOrEqualTo)){const je=ze.numericality.lessThanOrEqualTo;he.push({constraint:"maxValue",value:je,error:`Maximum value is ${je}`})}return he},E=ne=>ne!=null&&ne!=="",T=()=>{t(0,c=[...c||[],{valueType:"Binding",type:o,id:c2.exports.generate(),value:o=="array"?[]:null}])},I=ne=>{t(0,c=c.filter(se=>se.id!==ne))},P=ne=>{const pe={...c.find(ze=>ze.id===ne),id:c2.exports.generate()};t(0,c=[...c,pe])};function F(ne,se){n.$$.not_equal(se.constraint,ne)&&(se.constraint=ne,t(0,c))}function j(ne,se){n.$$.not_equal(se.valueType,ne)&&(se.valueType=ne,t(0,c))}const q=(ne,se,pe,ze)=>t(0,se[pe].value=ze.detail,c);function W(ne,se){n.$$.not_equal(se.value,ne)&&(se.value=ne,t(0,c))}function te(ne,se){n.$$.not_equal(se.value,ne)&&(se.value=ne,t(0,c))}function Q(ne,se){n.$$.not_equal(se.value,ne)&&(se.value=ne,t(0,c))}function oe(ne,se){n.$$.not_equal(se.value,ne)&&(se.value=ne,t(0,c))}const ie=(ne,se,pe,ze)=>t(0,se[pe].error=ze.detail,c),K=ne=>P(ne.id),G=ne=>I(ne.id);return n.$$set=ne=>{"rules"in ne&&t(0,c=ne.rules),"bindings"in ne&&t(1,f=ne.bindings),"type"in ne&&t(9,h=ne.type)},n.$$.update=()=>{n.$$.dirty[0]&6144&&t(2,r=w(u,s)),n.$$.dirty[0]&2048&&t(3,i=s==null?void 0:s.field),n.$$.dirty[0]&12&&t(5,a=A(i,r||{})),n.$$.dirty[0]&512&&t(10,o=(h==null?void 0:h.split("/")[1])||"string"),n.$$.dirty[0]&1024&&t(4,l=y(o))},[c,f,r,i,l,a,T,I,P,h,o,s,u,F,j,q,W,te,Q,oe,ie,K,G]}class RGe extends Re{constructor(e){super(),Ve(this,e,VGe,OGe,Oe,{rules:0,bindings:1,type:9},null,[-1,-1])}}function NGe(n){let e;return{c(){e=le("Configure validation")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function FGe(n){let e;return{c(){e=le("Configure validation rules for this field.")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function jGe(n){let e;return{c(){e=le("Save")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function xGe(n){let e,t;return e=new $n({props:{cta:!0,slot:"buttons",$$slots:{default:[jGe]},$$scope:{ctx:n}}}),e.$on("click",n[5]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&512&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function UGe(n){let e,t,r;function i(o){n[6](o)}let a={slot:"body",type:n[3],bindings:n[1],componentDefinition:n[2]};return n[0]!==void 0&&(a.rules=n[0]),e=new RGe({props:a}),He.push(()=>nt(e,"rules",i)),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){const s={};l&8&&(s.type=o[3]),l&2&&(s.bindings=o[1]),l&4&&(s.componentDefinition=o[2]),!t&&l&1&&(t=!0,s.rules=o[0],rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function qGe(n){let e,t,r,i;e=new Sr({props:{$$slots:{default:[NGe]},$$scope:{ctx:n}}}),e.$on("click",function(){Mn(n[4].show)&&n[4].show.apply(this,arguments)});let a={title:"Validation Rules",$$slots:{body:[UGe],buttons:[xGe],description:[FGe]},$$scope:{ctx:n}};return r=new Hf({props:a}),n[7](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),C(o,t,l),H(r,o,l),i=!0},p(o,[l]){n=o;const s={};l&512&&(s.$$scope={dirty:l,ctx:n}),e.$set(s);const u={};l&527&&(u.$$scope={dirty:l,ctx:n}),r.$set(u)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&M(t),n[7](null),B(r,o)}}}function WGe(n,e,t){let{value:r=[]}=e,{bindings:i=[]}=e,{componentDefinition:a}=e,{type:o}=e,l;const s=Un(),u=()=>{s("change",r),l.hide()};function c(h){r=h,t(0,r)}function f(h){He[h?"unshift":"push"](()=>{l=h,t(4,l)})}return n.$$set=h=>{"value"in h&&t(0,r=h.value),"bindings"in h&&t(1,i=h.bindings),"componentDefinition"in h&&t(2,a=h.componentDefinition),"type"in h&&t(3,o=h.type)},[r,i,a,o,l,u,c,f]}class sd extends Re{constructor(e){super(),Ve(this,e,WGe,qGe,Oe,{value:0,bindings:1,componentDefinition:2,type:3})}}function GGe(n){let e;return{c(){e=le("Background color")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function YGe(n){let e,t,r,i;return e=new un({props:{$$slots:{default:[GGe]},$$scope:{ctx:n}}}),r=new y5({props:{value:n[0].background,alignRight:!0,spectrumTheme:n[1].theme}}),r.$on("change",n[5]),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&128&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&1&&(s.value=a[0].background),o&2&&(s.spectrumTheme=a[1].theme),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function KGe(n){let e;return{c(){e=le("Text color")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function XGe(n){let e,t,r,i;return e=new un({props:{$$slots:{default:[KGe]},$$scope:{ctx:n}}}),r=new y5({props:{value:n[0].color,alignRight:!0,spectrumTheme:n[1].theme}}),r.$on("change",n[6]),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&128&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&1&&(s.value=a[0].color),o&2&&(s.spectrumTheme=a[1].theme),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function JGe(n){let e,t,r,i,a,o,l,s,u,c,f,h;function m(A){n[2](A)}let _={label:"Width",placeholder:"Auto"};n[0].width!==void 0&&(_.value=n[0].width),e=new En({props:_}),He.push(()=>nt(e,"value",m));function y(A){n[3](A)}let w={label:"Alignment",options:["Left","Center","Right"],placeholder:"Default"};return n[0].align!==void 0&&(w.value=n[0].align),i=new mn({props:w}),He.push(()=>nt(i,"value",y)),l=new Za({props:{label:"Value",value:n[0].template,placeholder:"{{ Value }}",bindings:[{readableBinding:"Value",runtimeBinding:"[value]",category:`Column: ${n[0].name}`,icon:"TableColumnMerge"}]}}),l.$on("change",n[4]),u=new Rt({props:{noPadding:!0,gap:"XS",$$slots:{default:[YGe]},$$scope:{ctx:n}}}),f=new Rt({props:{noPadding:!0,gap:"XS",$$slots:{default:[XGe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),r=U(),O(i.$$.fragment),o=U(),O(l.$$.fragment),s=U(),O(u.$$.fragment),c=U(),O(f.$$.fragment)},m(A,E){H(e,A,E),C(A,r,E),H(i,A,E),C(A,o,E),H(l,A,E),C(A,s,E),H(u,A,E),C(A,c,E),H(f,A,E),h=!0},p(A,E){const T={};!t&&E&1&&(t=!0,T.value=A[0].width,rt(()=>t=!1)),e.$set(T);const I={};!a&&E&1&&(a=!0,I.value=A[0].align,rt(()=>a=!1)),i.$set(I);const P={};E&1&&(P.value=A[0].template),E&1&&(P.bindings=[{readableBinding:"Value",runtimeBinding:"[value]",category:`Column: ${A[0].name}`,icon:"TableColumnMerge"}]),l.$set(P);const F={};E&131&&(F.$$scope={dirty:E,ctx:A}),u.$set(F);const j={};E&131&&(j.$$scope={dirty:E,ctx:A}),f.$set(j)},i(A){h||(b(e.$$.fragment,A),b(i.$$.fragment,A),b(l.$$.fragment,A),b(u.$$.fragment,A),b(f.$$.fragment,A),h=!0)},o(A){$(e.$$.fragment,A),$(i.$$.fragment,A),$(l.$$.fragment,A),$(u.$$.fragment,A),$(f.$$.fragment,A),h=!1},d(A){B(e,A),A&&M(r),B(i,A),A&&M(o),B(l,A),A&&M(s),B(u,A),A&&M(c),B(f,A)}}}function ZGe(n){let e,t,r;return t=new Rt({props:{noPadding:!0,gap:"S",$$slots:{default:[JGe]},$$scope:{ctx:n}}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","container svelte-4eq5in")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a&131&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function QGe(n){let e,t;return e=new S4({props:{$$slots:{default:[ZGe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&131&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function eYe(n,e,t){let r;Ne(n,Xt,c=>t(1,r=c));let{column:i}=e;function a(c){n.$$.not_equal(i.width,c)&&(i.width=c,t(0,i))}function o(c){n.$$.not_equal(i.align,c)&&(i.align=c,t(0,i))}const l=c=>t(0,i.template=c.detail,i),s=c=>t(0,i.background=c.detail,i),u=c=>t(0,i.color=c.detail,i);return n.$$set=c=>{"column"in c&&t(0,i=c.column)},[i,r,a,o,l,s,u]}class tYe extends Re{constructor(e){super(),Ve(this,e,eYe,QGe,Oe,{column:0})}}function nYe(n){let e,t=n[0].name+"",r,i;return{c(){e=le('"'),r=le(t),i=le('" column settings')},m(a,o){C(a,e,o),C(a,r,o),C(a,i,o)},p(a,o){o&1&&t!==(t=a[0].name+"")&&_t(r,t)},d(a){a&&M(e),a&&M(r),a&&M(i)}}}function rYe(n){let e;return{c(){e=le("Save")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function iYe(n){let e,t;return e=new $n({props:{cta:!0,slot:"buttons",$$slots:{default:[rYe]},$$scope:{ctx:n}}}),e.$on("click",n[4]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&256&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function aYe(n){let e,t,r;function i(o){n[5](o)}let a={slot:"body"};return n[1]!==void 0&&(a.column=n[1]),e=new tYe({props:a}),He.push(()=>nt(e,"column",i)),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){const s={};!t&&l&2&&(t=!0,s.column=o[1],rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function oYe(n){let e,t,r,i;e=new dn({props:{name:"Settings",hoverable:!0,size:"S"}}),e.$on("click",n[3]);let a={title:"Table Columns",$$slots:{body:[aYe],buttons:[iYe],description:[nYe]},$$scope:{ctx:n}};return r=new Hf({props:a}),n[6](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),C(o,t,l),H(r,o,l),i=!0},p(o,[l]){const s={};l&259&&(s.$$scope={dirty:l,ctx:o}),r.$set(s)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&M(t),n[6](null),B(r,o)}}}function lYe(n,e,t){let{column:r}=e,i,a;const o=f=>{t(1,i={...f})},l=()=>{o(r),a.show()},s=()=>{t(0,r=i),a.hide()};function u(f){i=f,t(1,i)}function c(f){He[f?"unshift":"push"](()=>{a=f,t(2,a)})}return n.$$set=f=>{"column"in f&&t(0,r=f.column)},n.$$.update=()=>{n.$$.dirty&1&&o(r)},[r,i,a,l,s,u,c]}class sYe extends Re{constructor(e){super(),Ve(this,e,lYe,oYe,Oe,{column:0})}}function tV(n,e,t){const r=n.slice();return r[19]=e[t],r[20]=e,r[21]=t,r}function uYe(n){let e,t,r,i;return r=new jt({props:{size:"S",$$slots:{default:[fYe]},$$scope:{ctx:n}}}),{c(){e=J("div"),t=J("div"),O(r.$$.fragment),D(t,"class","wide svelte-17kmdew"),D(e,"class","column svelte-17kmdew")},m(a,o){C(a,e,o),x(e,t),H(r,t,null),i=!0},p(a,o){const l={};o&4194304&&(l.$$scope={dirty:o,ctx:a}),r.$set(l)},i(a){i||(b(r.$$.fragment,a),i=!0)},o(a){$(r.$$.fragment,a),i=!1},d(a){a&&M(e),B(r)}}}function cYe(n){let e,t;return e=new Rt({props:{noPadding:!0,gap:"XS",$$slots:{default:[hYe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4194307&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function fYe(n){let e,t,r;return{c(){e=le(`By default, all table columns will automatically be shown.
884
884
  `),t=J("br"),r=le(`
885
885
  You can manually control which columns are included in your table,
886
- and their appearance, by adding them below.`)},m(i,a){C(i,e,a),C(i,t,a),C(i,r,a)},p:mt,d(i){i&&M(e),i&&M(t),i&&M(r)}}}function pYe(n){let e;return{c(){e=le("Column")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function dYe(n){let e;return{c(){e=le("Label")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function nV(n,e){let t,r,i,a,o,l,s,u,c,f,h,m,_,y,w,A,E,T=mt,I,P,F;i=new dn({props:{name:"DragHandle",size:"XL"}});function j(G){e[12](G,e[19])}function q(...G){return e[13](e[19],e[20],e[21],...G)}let W={placeholder:"Column",options:e[2](e[19].name)};e[19].name!==void 0&&(W.value=e[19].name),l=new mn({props:W}),He.push(()=>nt(l,"value",j)),l.$on("change",q);function te(G){e[14](G,e[19])}let Q={placeholder:"Label"};e[19].displayName!==void 0&&(Q.value=e[19].displayName),c=new En({props:Q}),He.push(()=>nt(c,"value",te));function oe(G){e[15](G,e[19],e[20],e[21])}let ie={};e[19]!==void 0&&(ie.column=e[19]),m=new sYe({props:ie}),He.push(()=>nt(m,"column",oe));function K(){return e[16](e[19])}return w=new dn({props:{name:"Close",hoverable:!0,size:"S",disabled:e[0].length===1}}),w.$on("click",K),{key:n,first:null,c(){t=J("div"),r=J("div"),O(i.$$.fragment),o=U(),O(l.$$.fragment),u=U(),O(c.$$.fragment),h=U(),O(m.$$.fragment),y=U(),O(w.$$.fragment),A=U(),D(r,"class","handle svelte-17kmdew"),D(r,"aria-label","drag-handle"),D(r,"style",a=e[1]?"cursor: grab":"cursor: grabbing"),D(t,"class","column svelte-17kmdew"),this.first=t},m(G,ne){C(G,t,ne),x(t,r),H(i,r,null),x(t,o),H(l,t,null),x(t,u),H(c,t,null),x(t,h),H(m,t,null),x(t,y),H(w,t,null),x(t,A),I=!0,P||(F=At(r,"mousedown",e[11]),P=!0)},p(G,ne){e=G,(!I||ne&2&&a!==(a=e[1]?"cursor: grab":"cursor: grabbing"))&&D(r,"style",a);const se={};ne&1&&(se.options=e[2](e[19].name)),!s&&ne&1&&(s=!0,se.value=e[19].name,rt(()=>s=!1)),l.$set(se);const pe={};!f&&ne&1&&(f=!0,pe.value=e[19].displayName,rt(()=>f=!1)),c.$set(pe);const ze={};!_&&ne&1&&(_=!0,ze.column=e[19],rt(()=>_=!1)),m.$set(ze);const he={};ne&1&&(he.disabled=e[0].length===1),w.$set(he)},r(){E=t.getBoundingClientRect()},f(){h7(t),T()},a(){T(),T=d7(t,E,I7,{duration:mw})},i(G){I||(b(i.$$.fragment,G),b(l.$$.fragment,G),b(c.$$.fragment,G),b(m.$$.fragment,G),b(w.$$.fragment,G),I=!0)},o(G){$(i.$$.fragment,G),$(l.$$.fragment,G),$(c.$$.fragment,G),$(m.$$.fragment,G),$(w.$$.fragment,G),I=!1},d(G){G&&M(t),B(i),B(l),B(c),B(m),B(w),P=!1,F()}}}function hYe(n){let e,t,r,i,a,o,l,s,u,c,f,h,m=[],_=new Map,y,w,A,E;i=new un({props:{size:"L",$$slots:{default:[pYe]},$$scope:{ctx:n}}}),o=new un({props:{size:"L",$$slots:{default:[dYe]},$$scope:{ctx:n}}});let T=n[0];const I=P=>P[19].id;for(let P=0;P<T.length;P+=1){let F=tV(n,T,P),j=I(F);_.set(j,m[P]=nV(j,F))}return{c(){e=J("div"),t=J("div"),r=U(),O(i.$$.fragment),a=U(),O(o.$$.fragment),l=U(),s=J("div"),u=U(),c=J("div"),f=U(),h=J("div");for(let P=0;P<m.length;P+=1)m[P].c();D(e,"class","column svelte-17kmdew"),D(h,"class","columns svelte-17kmdew")},m(P,F){C(P,e,F),x(e,t),x(e,r),H(i,e,null),x(e,a),H(o,e,null),x(e,l),x(e,s),x(e,u),x(e,c),C(P,f,F),C(P,h,F);for(let j=0;j<m.length;j+=1)m[j].m(h,null);w=!0,A||(E=[Bl(y=ab.call(null,h,{items:n[0],flipDurationMs:mw,dropTargetStyle:{outline:"none"},dragDisabled:n[1]})),At(h,"finalize",n[6]),At(h,"consider",n[5])],A=!0)},p(P,F){const j={};F&4194304&&(j.$$scope={dirty:F,ctx:P}),i.$set(j);const q={};if(F&4194304&&(q.$$scope={dirty:F,ctx:P}),o.$set(q),F&23){T=P[0],we();for(let W=0;W<m.length;W+=1)m[W].r();m=Il(m,F,I,1,P,T,_,h,m7,nV,null,tV);for(let W=0;W<m.length;W+=1)m[W].a();ke()}y&&Mn(y.update)&&F&3&&y.update.call(null,{items:P[0],flipDurationMs:mw,dropTargetStyle:{outline:"none"},dragDisabled:P[1]})},i(P){if(!w){b(i.$$.fragment,P),b(o.$$.fragment,P);for(let F=0;F<T.length;F+=1)b(m[F]);w=!0}},o(P){$(i.$$.fragment,P),$(o.$$.fragment,P);for(let F=0;F<m.length;F+=1)$(m[F]);w=!1},d(P){P&&M(e),B(i),B(o),P&&M(f),P&&M(h);for(let F=0;F<m.length;F+=1)m[F].d();A=!1,Vi(E)}}}function mYe(n){let e;return{c(){e=le("Add column")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function gYe(n){let e;return{c(){e=le("Add all columns")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function rV(n){let e,t;return e=new $n({props:{secondary:!0,quiet:!0,$$slots:{default:[vYe]},$$scope:{ctx:n}}}),e.$on("click",n[8]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4194304&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function vYe(n){let e;return{c(){e=le("Reset columns")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function _Ye(n){var y;let e,t,r,i,a,o,l,s,u,c;const f=[cYe,uYe],h=[];function m(w,A){var E;return(E=w[0])!=null&&E.length?0:1}e=m(n),t=h[e]=f[e](n),o=new $n({props:{secondary:!0,icon:"Add",$$slots:{default:[mYe]},$$scope:{ctx:n}}}),o.$on("click",n[3]),s=new $n({props:{secondary:!0,quiet:!0,$$slots:{default:[gYe]},$$scope:{ctx:n}}}),s.$on("click",n[7]);let _=((y=n[0])==null?void 0:y.length)&&rV(n);return{c(){t.c(),r=U(),i=J("div"),a=J("div"),O(o.$$.fragment),l=U(),O(s.$$.fragment),u=U(),_&&_.c(),D(a,"class","buttons wide svelte-17kmdew"),D(i,"class","column svelte-17kmdew")},m(w,A){h[e].m(w,A),C(w,r,A),C(w,i,A),x(i,a),H(o,a,null),x(a,l),H(s,a,null),x(a,u),_&&_.m(a,null),c=!0},p(w,A){var P;let E=e;e=m(w),e===E?h[e].p(w,A):(we(),$(h[E],1,1,()=>{h[E]=null}),ke(),t=h[e],t?t.p(w,A):(t=h[e]=f[e](w),t.c()),b(t,1),t.m(r.parentNode,r));const T={};A&4194304&&(T.$$scope={dirty:A,ctx:w}),o.$set(T);const I={};A&4194304&&(I.$$scope={dirty:A,ctx:w}),s.$set(I),(P=w[0])!=null&&P.length?_?(_.p(w,A),A&1&&b(_,1)):(_=rV(w),_.c(),b(_,1),_.m(a,null)):_&&(we(),$(_,1,1,()=>{_=null}),ke())},i(w){c||(b(t),b(o.$$.fragment,w),b(s.$$.fragment,w),b(_),c=!0)},o(w){$(t),$(o.$$.fragment,w),$(s.$$.fragment,w),$(_),c=!1},d(w){h[e].d(w),w&&M(r),w&&M(i),B(o),B(s),_&&_.d()}}}function bYe(n){let e,t,r;return t=new Rt({props:{noPadding:!0,gap:"S",$$slots:{default:[_Ye]},$$scope:{ctx:n}}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","container svelte-17kmdew")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a&4194307&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function yYe(n){let e,t;return e=new S4({props:{$$slots:{default:[bYe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&4194307&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}const mw=150;function $Ye(n,e,t){let r,{columns:i=[]}=e,{options:a=[]}=e,{schema:o={}}=e,l=!0;const s=(F,j)=>{let q={};return F.forEach(W=>{q[W]=!0}),j==null||j.forEach(W=>{delete q[W.name]}),Object.keys(q)},u=F=>!F||r.includes(F)?r:[F,...r],c=()=>{t(0,i=[...i,{}])},f=F=>{t(0,i=i.filter(j=>j.id!==F))},h=F=>{t(0,i=F.detail.items)},m=F=>{h(F),t(1,l=!0)},_=()=>{let F=i||[];a.forEach(j=>{const q=o[j],W=i&&i.findIndex(te=>te.name===j)!==-1;!(q!=null&&q.autocolumn)&&!W&&F.push({name:j,displayName:j})}),t(0,i=F)},y=()=>{t(0,i=[])},w=()=>t(1,l=!1);function A(F,j){n.$$.not_equal(j.name,F)&&(j.name=F,t(0,i))}const E=(F,j,q,W)=>t(0,j[q].displayName=W.detail,i);function T(F,j){n.$$.not_equal(j.displayName,F)&&(j.displayName=F,t(0,i))}function I(F,j,q,W){q[W]=F,t(0,i)}const P=F=>f(F.id);return n.$$set=F=>{"columns"in F&&t(0,i=F.columns),"options"in F&&t(9,a=F.options),"schema"in F&&t(10,o=F.schema)},n.$$.update=()=>{n.$$.dirty&513&&(r=s(a,i)),n.$$.dirty&1&&i.forEach(F=>{F.id||(F.id=c2.exports.generate())})},[i,l,u,c,f,h,m,_,y,a,o,w,A,E,T,I,P]}class wYe extends Re{constructor(e){super(),Ve(this,e,$Ye,yYe,Oe,{columns:0,options:9,schema:10})}}function kYe(n){let e;return{c(){e=le("Configure columns")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function zYe(n){let e;return{c(){e=le("Configure the columns in your table.")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function AYe(n){let e;return{c(){e=le("Save")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function MYe(n){let e,t;return e=new $n({props:{cta:!0,slot:"buttons",$$slots:{default:[AYe]},$$scope:{ctx:n}}}),e.$on("click",n[5]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&131072&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function CYe(n){let e,t,r;function i(o){n[11](o)}let a={slot:"body",options:n[0],schema:n[1]};return n[3]!==void 0&&(a.columns=n[3]),e=new wYe({props:a}),He.push(()=>nt(e,"columns",i)),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){const s={};l&1&&(s.options=o[0]),l&2&&(s.schema=o[1]),!t&&l&8&&(t=!0,s.columns=o[3],rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function SYe(n){let e,t,r,i;e=new Sr({props:{$$slots:{default:[kYe]},$$scope:{ctx:n}}}),e.$on("click",n[4]);let a={title:"Table Columns",$$slots:{body:[CYe],buttons:[MYe],description:[zYe]},$$scope:{ctx:n}};return r=new Hf({props:a}),n[12](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),C(o,t,l),H(r,o,l),i=!0},p(o,[l]){const s={};l&131072&&(s.$$scope={dirty:l,ctx:o}),e.$set(s);const u={};l&131083&&(u.$$scope={dirty:l,ctx:o}),r.$set(u)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&M(t),n[12](null),B(r,o)}}}function LYe(n,e,t){let r,i,a,o,l;Ne(n,ml,I=>t(10,l=I));let{componentInstance:s}=e,{value:u=[]}=e;const c=Un();let f,h;const m=(I,P)=>{const F=X2(I,P).schema;return F&&(delete F._id,delete F._rev),F},_=I=>{t(3,h=z1.cloneDeep(I))},y=(I,P)=>!Array.isArray(I)||!I.length?[]:(typeof I[0]=="string"&&(I=I.map(F=>({name:F,displayName:F}))),I.filter(F=>P.includes(F.name))),w=()=>{_(o),f.show()},A=()=>{c("change",y(h,a)),f.hide()};function E(I){h=I,t(3,h)}function T(I){He[I?"unshift":"push"](()=>{f=I,t(2,f)})}return n.$$set=I=>{"componentInstance"in I&&t(6,s=I.componentInstance),"value"in I&&t(7,u=I.value)},n.$$.update=()=>{n.$$.dirty&1088&&t(9,r=E4(l,s)),n.$$.dirty&1536&&t(1,i=m(l,r)),n.$$.dirty&2&&t(0,a=Object.keys(i||{})),n.$$.dirty&129&&t(8,o=y(u,a)),n.$$.dirty&256&&_(o)},[a,i,f,h,w,A,s,u,o,r,l,E,T]}class EYe extends Re{constructor(e){super(),Ve(this,e,LYe,SYe,Oe,{componentInstance:6,value:7})}}function iV(n,e,t){const r=n.slice();return r[4]=e[t],r}function aV(n){let e,t;function r(){return n[3](n[4])}return e=new Sr({props:{icon:n[4].barIcon,quiet:!0,selected:n[4].value===n[0]}}),e.$on("click",r),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){n=i;const o={};a&4&&(o.icon=n[4].barIcon),a&5&&(o.selected=n[4].value===n[0]),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function TYe(n){let e,t,r=n[2],i=[];for(let o=0;o<r.length;o+=1)i[o]=aV(iV(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=$t()},m(o,l){for(let s=0;s<i.length;s+=1)i[s].m(o,l);C(o,e,l),t=!0},p(o,l){if(l&7){r=o[2];let s;for(s=0;s<r.length;s+=1){const u=iV(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=aV(u),i[s].c(),b(i[s],1),i[s].m(e.parentNode,e))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){Dn(i,o),o&&M(e)}}}function DYe(n){let e,t;return e=new v7({props:{$$slots:{default:[TYe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&135&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function HYe(n,e,t){let{value:r}=e,{onChange:i}=e,{options:a}=e;const o=l=>i(l.value);return n.$$set=l=>{"value"in l&&t(0,r=l.value),"onChange"in l&&t(1,i=l.onChange),"options"in l&&t(2,a=l.options)},[r,i,a,o]}class BYe extends Re{constructor(e){super(),Ve(this,e,HYe,DYe,Oe,{value:0,onChange:1,options:2})}}const OYe={text:BX,select:mn,dataSource:hX,"dataSource/s3":lje,dataProvider:fje,boolean:ju,number:nq,event:DX,table:rWe,color:Uz,icon:mWe,field:_We,multifield:$We,searchfield:zWe,options:hGe,schema:CWe,section:BWe,filter:jWe,url:JWe,columns:EYe,"field/string":z3,"field/number":z3,"field/options":z3,"field/boolean":z3,"field/longform":z3,"field/datetime":z3,"field/attachment":z3,"field/link":z3,"field/array":z3,"field/json":z3,"field/barcode/qr":z3,"validation/string":sd,"validation/array":sd,"validation/number":sd,"validation/boolean":sd,"validation/datetime":sd,"validation/attachment":sd,"validation/link":sd},l7=n=>{const{type:e,showInBar:t,barStyle:r}=n||{};return e?t&&e==="select"&&r==="buttons"?BYe:OYe[e]:null};function oV(n,e,t){const r=n.slice();return r[12]=e[t],r[14]=t,r}function lV(n,e,t){const r=n.slice();return r[15]=e[t],r}function sV(n){let e,t;return e=new l_({props:{name:n[12].name,collapsible:!1,$$slots:{default:[IYe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&32&&(a.name=r[12].name),i&262271&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function uV(n){let e,t;return e=new B7({props:{control:En,label:"Name",key:"_instanceName",value:n[1]._instanceName,onChange:n[8]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2&&(a.value=r[1]._instanceName),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function cV(n){let e,t;function r(...i){return n[9](n[15],...i)}return e=new B7({props:{type:n[15].type,control:l7(n[15]),label:n[15].label,key:n[15].key,value:n[1][n[15].key],defaultValue:n[15].defaultValue,nested:n[15].nested,onChange:r,highlighted:n[6].highlightedSettingKey===n[15].key,info:n[15].info,props:{placeholder:n[15].placeholder||null,options:n[15].options||[],min:n[15].min||null,max:n[15].max||null},bindings:n[2],componentBindings:n[3],componentInstance:n[1],componentDefinition:n[0]}}),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){n=i;const o={};a&32&&(o.type=n[15].type),a&32&&(o.control=l7(n[15])),a&32&&(o.label=n[15].label),a&32&&(o.key=n[15].key),a&34&&(o.value=n[1][n[15].key]),a&32&&(o.defaultValue=n[15].defaultValue),a&32&&(o.nested=n[15].nested),a&32&&(o.onChange=r),a&96&&(o.highlighted=n[6].highlightedSettingKey===n[15].key),a&32&&(o.info=n[15].info),a&32&&(o.props={placeholder:n[15].placeholder||null,options:n[15].options||[],min:n[15].min||null,max:n[15].max||null}),a&4&&(o.bindings=n[2]),a&8&&(o.componentBindings=n[3]),a&2&&(o.componentInstance=n[1]),a&1&&(o.componentDefinition=n[0]),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function fV(n,e){let t,r,i,a=e[15].visible&&cV(e);return{key:n,first:null,c(){t=$t(),a&&a.c(),r=$t(),this.first=t},m(o,l){C(o,t,l),a&&a.m(o,l),C(o,r,l),i=!0},p(o,l){e=o,e[15].visible?a?(a.p(e,l),l&32&&b(a,1)):(a=cV(e),a.c(),b(a,1),a.m(r.parentNode,r)):a&&(we(),$(a,1,1,()=>{a=null}),ke())},i(o){i||(b(a),i=!0)},o(o){$(a),i=!1},d(o){o&&M(t),a&&a.d(o),o&&M(r)}}}function pV(n){let e,t;return e=new SFe({props:{componentInstance:n[1]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2&&(a.componentInstance=r[1]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function dV(n){let e,t;return e=new DFe({}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function IYe(n){var y,w,A;let e=n[14]===0&&!n[1]._component.endsWith("/layout")&&!n[4],t,r=[],i=new Map,a,o=n[14]===0&&((w=(y=n[0])==null?void 0:y.component)==null?void 0:w.endsWith("/fieldgroup")),l,s,u,c=e&&uV(n),f=n[12].settings;const h=E=>E[15].key;for(let E=0;E<f.length;E+=1){let T=lV(n,f,E),I=h(T);i.set(I,r[E]=fV(I,T))}let m=o&&pV(n),_=n[14]===0&&((A=n[0])==null?void 0:A.block)&&dV();return{c(){c&&c.c(),t=U();for(let E=0;E<r.length;E+=1)r[E].c();a=U(),m&&m.c(),l=U(),_&&_.c(),s=U()},m(E,T){c&&c.m(E,T),C(E,t,T);for(let I=0;I<r.length;I+=1)r[I].m(E,T);C(E,a,T),m&&m.m(E,T),C(E,l,T),_&&_.m(E,T),C(E,s,T),u=!0},p(E,T){var I,P,F;T&50&&(e=E[14]===0&&!E[1]._component.endsWith("/layout")&&!E[4]),e?c?(c.p(E,T),T&50&&b(c,1)):(c=uV(E),c.c(),b(c,1),c.m(t.parentNode,t)):c&&(we(),$(c,1,1,()=>{c=null}),ke()),T&239&&(f=E[12].settings,we(),r=Il(r,T,h,1,E,f,i,a.parentNode,Mc,fV,a,lV),ke()),T&33&&(o=E[14]===0&&((P=(I=E[0])==null?void 0:I.component)==null?void 0:P.endsWith("/fieldgroup"))),o?m?(m.p(E,T),T&33&&b(m,1)):(m=pV(E),m.c(),b(m,1),m.m(l.parentNode,l)):m&&(we(),$(m,1,1,()=>{m=null}),ke()),E[14]===0&&((F=E[0])==null?void 0:F.block)?_?T&33&&b(_,1):(_=dV(),_.c(),b(_,1),_.m(s.parentNode,s)):_&&(we(),$(_,1,1,()=>{_=null}),ke())},i(E){if(!u){b(c);for(let T=0;T<f.length;T+=1)b(r[T]);b(m),b(_),u=!0}},o(E){$(c);for(let T=0;T<r.length;T+=1)$(r[T]);$(m),$(_),u=!1},d(E){c&&c.d(E),E&&M(t);for(let T=0;T<r.length;T+=1)r[T].d(E);E&&M(a),m&&m.d(E),E&&M(l),_&&_.d(E),E&&M(s)}}}function hV(n,e){let t,r,i,a=e[12].visible&&sV(e);return{key:n,first:null,c(){t=$t(),a&&a.c(),r=$t(),this.first=t},m(o,l){C(o,t,l),a&&a.m(o,l),C(o,r,l),i=!0},p(o,l){e=o,e[12].visible?a?(a.p(e,l),l&32&&b(a,1)):(a=sV(e),a.c(),b(a,1),a.m(r.parentNode,r)):a&&(we(),$(a,1,1,()=>{a=null}),ke())},i(o){i||(b(a),i=!0)},o(o){$(a),i=!1},d(o){o&&M(t),a&&a.d(o),o&&M(r)}}}function PYe(n){let e=[],t=new Map,r,i,a=n[5];const o=l=>l[12].name;for(let l=0;l<a.length;l+=1){let s=oV(n,a,l),u=o(s);t.set(u,e[l]=hV(u,s))}return{c(){for(let l=0;l<e.length;l+=1)e[l].c();r=$t()},m(l,s){for(let u=0;u<e.length;u+=1)e[u].m(l,s);C(l,r,s),i=!0},p(l,[s]){s&255&&(a=l[5],we(),e=Il(e,s,o,1,l,a,t,r.parentNode,Mc,hV,r,oV),ke())},i(l){if(!i){for(let s=0;s<a.length;s+=1)b(e[s]);i=!0}},o(l){for(let s=0;s<e.length;s+=1)$(e[s]);i=!1},d(l){for(let s=0;s<e.length;s+=1)e[s].d(l);l&&M(r)}}}function VYe(n,e,t){let r,i;Ne(n,Xt,y=>t(6,i=y));let{componentDefinition:a}=e,{componentInstance:o}=e,{bindings:l}=e,{componentBindings:s}=e,{isScreen:u=!1}=e;const c=(y,w,A)=>{var F;const E=(F=w==null?void 0:w.settings)!=null?F:[],T=E.filter(j=>!j.section),I=E.filter(j=>j.section);let P=[{name:"General",settings:T},...I||[]];return P.forEach(j=>{j.settings.forEach(q=>{q.visible=h(y,q,A)}),j.visible=j.settings.some(q=>q.visible)}),P},f=async(y,w)=>{try{await Xt.actions.components.updateSetting(y,w)}catch{yt.error("Error updating component prop")}},h=(y,w,A)=>{if((w==null?void 0:w.type)==="event"&&A||!l7(w))return!1;if(w.dependsOn){let T=w.dependsOn,I=null,P=!!w.dependsOn.invert;if(typeof w.dependsOn=="object"&&(T=w.dependsOn.setting,I=w.dependsOn.value),!T)return!1;if(I==null){const F=y[T];return F===!1?!1:F===!0?!0:!z1.isEmpty(F)}return P?y[T]!==I:y[T]===I}return!0},m=y=>f("_instanceName",y),_=(y,w)=>f(y.key,w);return n.$$set=y=>{"componentDefinition"in y&&t(0,a=y.componentDefinition),"componentInstance"in y&&t(1,o=y.componentInstance),"bindings"in y&&t(2,l=y.bindings),"componentBindings"in y&&t(3,s=y.componentBindings),"isScreen"in y&&t(4,u=y.isScreen)},n.$$.update=()=>{n.$$.dirty&19&&t(5,r=c(o,a,u))},[a,o,l,s,u,r,i,f,m,_]}class RYe extends Re{constructor(e){super(),Ve(this,e,VYe,PYe,Oe,{componentDefinition:0,componentInstance:1,bindings:2,componentBindings:3,isScreen:4})}}function mV(n,e,t){const r=n.slice();return r[11]=e[t],r}function gV(n,e){let t,r,i,a;function o(...l){return e[10](e[11],...l)}return r=new B7({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:o,props:e[8](e[11]),bindings:e[4]}}),{key:n,first:null,c(){t=J("div"),O(r.$$.fragment),i=U(),yn(t,"grid-column",e[11].column||"auto"),this.first=t},m(l,s){C(l,t,s),H(r,t,null),x(t,i),a=!0},p(l,s){e=l;const u={};s&36&&(u.label=`${e[11].label}${e[7](e[5],e[11])?" *":""}`),s&4&&(u.control=e[11].control),s&4&&(u.key=e[11].key),s&36&&(u.value=e[5][e[11].key]),s&4&&(u.onChange=o),s&4&&(u.props=e[8](e[11])),s&16&&(u.bindings=e[4]),r.$set(u),(!a||s&4)&&yn(t,"grid-column",e[11].column||"auto")},i(l){a||(b(r.$$.fragment,l),a=!0)},o(l){$(r.$$.fragment,l),a=!1},d(l){l&&M(t),B(r)}}}function NYe(n){let e,t=[],r=new Map,i,a=n[2];const o=l=>`${l[3]._id}-${l[11].key}-${l[11].label}`;for(let l=0;l<a.length;l+=1){let s=mV(n,a,l),u=o(s);r.set(u,t[l]=gV(u,s))}return{c(){e=J("div");for(let l=0;l<t.length;l+=1)t[l].c();D(e,"class","group-content svelte-1u21n8y"),yn(e,"grid-template-columns",n[1]||"1fr")},m(l,s){C(l,e,s);for(let u=0;u<t.length;u+=1)t[u].m(e,null);i=!0},p(l,s){s&956&&(a=l[2],we(),t=Il(t,s,o,1,l,a,r,e,Mc,gV,null,mV),ke()),(!i||s&2)&&yn(e,"grid-template-columns",l[1]||"1fr")},i(l){if(!i){for(let s=0;s<a.length;s+=1)b(t[s]);i=!0}},o(l){for(let s=0;s<t.length;s+=1)$(t[s]);i=!1},d(l){l&&M(e);for(let s=0;s<t.length;s+=1)t[s].d()}}}function FYe(n){let e,t;return e=new l_({props:{collapsible:!1,name:`${n[0]}${n[6]?" *":""}`,$$slots:{default:[NYe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&65&&(a.name=`${r[0]}${r[6]?" *":""}`),i&16438&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function jYe(n,e,t){let r,i,{name:a}=e,{columns:o}=e,{properties:l}=e,{componentInstance:s}=e,{bindings:u=[]}=e;const c=(_,y)=>_[y.key]!=null&&_[y.key]!=="",f=_=>{let y={..._||{}};return delete y.label,delete y.key,delete y.control,y},h=async(_,y)=>{try{await Xt.actions.components.updateStyle(_,y)}catch{yt.error("Error updating style")}},m=(_,y)=>h(_.key,y);return n.$$set=_=>{"name"in _&&t(0,a=_.name),"columns"in _&&t(1,o=_.columns),"properties"in _&&t(2,l=_.properties),"componentInstance"in _&&t(3,s=_.componentInstance),"bindings"in _&&t(4,u=_.bindings)},n.$$.update=()=>{var _;n.$$.dirty&8&&t(5,r=s._styles.normal||{}),n.$$.dirty&36&&t(6,i=(_=l==null?void 0:l.some(y=>c(r,y)))!=null?_:!1)},[a,o,l,s,u,r,i,c,f,h,m]}class xYe extends Re{constructor(e){super(),Ve(this,e,jYe,FYe,Oe,{name:0,columns:1,properties:2,componentInstance:3,bindings:4})}}const OX={label:"Margin",columns:"1fr 1fr",settings:[{label:"Top",key:"margin-top",control:mn,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:mn,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:mn,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:mn,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%"}]}]},UYe={label:"Padding",columns:"1fr 1fr",settings:[{label:"Top",key:"padding-top",control:mn,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:mn,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:mn,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:mn,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%"}]}]},qYe={label:"Size",columns:"1fr 1fr",settings:[{label:"Width",key:"width",control:En,placeholder:"Auto"},{label:"Height",key:"height",control:En,placeholder:"Auto"}]},WYe={label:"Background",columns:"auto 1fr",settings:[{label:"Color",key:"background",control:Uz},{label:"Gradient",key:"background-image",control:mn,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%);"}]}]},GYe={label:"Border",columns:"1fr 1fr",settings:[{label:"Color",key:"border-color",control:Uz},{label:"Width",key:"border-width",control:mn,column:"1 / 2",placeholder:"None",options:[{label:"Small",value:"1px"},{label:"Medium",value:"2px"},{label:"Large",value:"4px"}]},{label:"Style",key:"border-style",control:mn,column:"2 / 3",placeholder:"None",options:[{label:"Solid",value:"solid"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"}]},{label:"Radius",key:"border-radius",control:mn,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:mn,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)"}]}]},gw=[OX],vV=Object.freeze(Object.defineProperty({__proto__:null,margin:OX,padding:UYe,size:qYe,background:WYe,border:GYe,all:gw},Symbol.toStringTag,{value:"Module"}));function _V(n,e,t){const r=n.slice();return r[5]=e[t],r}function bV(n){let e,t,r=n[2],i=[];for(let o=0;o<r.length;o+=1)i[o]=yV(_V(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=$t()},m(o,l){for(let s=0;s<i.length;s+=1)i[s].m(o,l);C(o,e,l),t=!0},p(o,l){if(l&7){r=o[2];let s;for(s=0;s<r.length;s+=1){const u=_V(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=yV(u),i[s].c(),b(i[s],1),i[s].m(e.parentNode,e))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){Dn(i,o),o&&M(e)}}}function yV(n){let e,t;return e=new xYe({props:{style:n[5],name:n[5].label,columns:n[5].columns,properties:n[5].settings,componentInstance:n[0],bindings:n[1]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4&&(a.style=r[5]),i&4&&(a.name=r[5].label),i&4&&(a.columns=r[5].columns),i&4&&(a.properties=r[5].settings),i&1&&(a.componentInstance=r[0]),i&2&&(a.bindings=r[1]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function YYe(n){var i;let e,t,r=((i=n[2])==null?void 0:i.length)>0&&bV(n);return{c(){r&&r.c(),e=$t()},m(a,o){r&&r.m(a,o),C(a,e,o),t=!0},p(a,[o]){var l;((l=a[2])==null?void 0:l.length)>0?r?(r.p(a,o),o&4&&b(r,1)):(r=bV(a),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(a){t||(b(r),t=!0)},o(a){$(r),t=!1},d(a){r&&r.d(a),a&&M(e)}}}function KYe(n,e,t){let r,{componentDefinition:i}=e,{componentInstance:a}=e,{bindings:o}=e;const l=s=>{var c;if(!((c=s==null?void 0:s.styles)!=null&&c.length))return[...gw];let u=[...gw];return s.styles.forEach(f=>{vV[f]&&u.push(vV[f])}),u};return n.$$set=s=>{"componentDefinition"in s&&t(3,i=s.componentDefinition),"componentInstance"in s&&t(0,a=s.componentInstance),"bindings"in s&&t(1,o=s.bindings)},n.$$.update=()=>{n.$$.dirty&8&&t(2,r=l(i))},[a,o,r,i]}class XYe extends Re{constructor(e){super(),Ve(this,e,KYe,YYe,Oe,{componentDefinition:3,componentInstance:0,bindings:1})}}function JYe(n){let e;return{c(){e=le("Edit custom CSS")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function ZYe(n){let e,t,r;return t=new Sr({props:{$$slots:{default:[JYe]},$$scope:{ctx:n}}}),t.$on("click",n[4]),{c(){e=J("div"),O(t.$$.fragment)},m(i,a){C(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a&1024&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function QYe(n){let e;return{c(){e=le("Custom CSS overrides all other component styles.")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function eKe(n){let e;return{c(){e=le("Save")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function tKe(n){let e,t;return e=new $n({props:{cta:!0,slot:"buttons",$$slots:{default:[eKe]},$$scope:{ctx:n}}}),e.$on("click",n[5]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&1024&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function nKe(n){let e,t,r;var i=i7;function a(o){return{props:{slot:"body",value:o[1],allowJS:!0,bindings:o[3]}}}return i&&(e=new i(a(n)),e.$on("change",n[8])),{c(){e&&O(e.$$.fragment),t=$t()},m(o,l){e&&H(e,o,l),C(o,t,l),r=!0},p(o,l){const s={};if(l&2&&(s.value=o[1]),l&8&&(s.bindings=o[3]),i!==(i=i7)){if(e){we();const u=e;$(u.$$.fragment,1,0,()=>{B(u,1)}),ke()}i?(e=new i(a(o)),e.$on("change",o[8]),O(e.$$.fragment),b(e.$$.fragment,1),H(e,t.parentNode,t)):e=null}else i&&e.$set(s)},i(o){r||(e&&b(e.$$.fragment,o),r=!0)},o(o){e&&$(e.$$.fragment,o),r=!1},d(o){o&&M(t),e&&B(e,o)}}}function $V(n){let e,t,r={title:"Custom CSS",$$slots:{body:[nKe],buttons:[tKe],description:[QYe]},$$scope:{ctx:n}};return e=new Hf({props:r}),n[9](e),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){const o={};a&1034&&(o.$$scope={dirty:a,ctx:i}),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){n[9](null),B(e,i)}}}function rKe(n){var l,s,u;let e,t,r=(l=n[0])==null?void 0:l._id,i,a;e=new l_({props:{name:`Custom CSS${(u=(s=n[0])==null?void 0:s._styles)!=null&&u.custom?" *":""}`,collapsible:!1,$$slots:{default:[ZYe]},$$scope:{ctx:n}}});let o=$V(n);return{c(){O(e.$$.fragment),t=U(),o.c(),i=$t()},m(c,f){H(e,c,f),C(c,t,f),o.m(c,f),C(c,i,f),a=!0},p(c,[f]){var m,_,y;const h={};f&1&&(h.name=`Custom CSS${(_=(m=c[0])==null?void 0:m._styles)!=null&&_.custom?" *":""}`),f&1024&&(h.$$scope={dirty:f,ctx:c}),e.$set(h),f&1&&Oe(r,r=(y=c[0])==null?void 0:y._id)?(we(),$(o,1,1,mt),ke(),o=$V(c),o.c(),b(o,1),o.m(i.parentNode,i)):o.p(c,f)},i(c){a||(b(e.$$.fragment,c),b(o),a=!0)},o(c){$(e.$$.fragment,c),$(o),a=!1},d(c){B(e,c),c&&M(t),c&&M(i),o.d(c)}}}function iKe(n,e,t){let r,i,a;Ne(n,Xt,m=>t(6,i=m)),Ne(n,Ja,m=>t(7,a=m));let{componentInstance:o}=e,l,s;const u=()=>{var m;t(1,l=P3(r,(m=o==null?void 0:o._styles)==null?void 0:m.custom)),s.show()},c=async()=>{try{const m=Df(r,l);await Xt.actions.components.updateCustomStyle(m)}catch{yt.error("Error updating custom style")}s.hide()},f=m=>t(1,l=m.detail);function h(m){He[m?"unshift":"push"](()=>{s=m,t(2,s)})}return n.$$set=m=>{"componentInstance"in m&&t(0,o=m.componentInstance)},n.$$.update=()=>{n.$$.dirty&192&&t(3,r=Xk(a,i.selectedComponentId))},[o,l,s,r,u,c,i,a,f,h]}class aKe extends Re{constructor(e){super(),Ve(this,e,iKe,rKe,Oe,{componentInstance:0})}}function wV(n,e,t){const r=n.slice();r[31]=e[t],r[33]=e,r[34]=t;const i=r[7](r[31].setting);return r[32]=i,r}function oKe(n){let e,t;return e=new jt({props:{size:"S",$$slots:{default:[sKe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[1]&16&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function lKe(n){let e,t=[],r=new Map,i,a,o,l,s=n[0];const u=c=>c[31].id;for(let c=0;c<s.length;c+=1){let f=wV(n,s,c),h=u(f);r.set(h,t[c]=zV(h,f))}return{c(){e=J("div");for(let c=0;c<t.length;c+=1)t[c].c();D(e,"class","conditions svelte-1vod3ll")},m(c,f){C(c,e,f);for(let h=0;h<t.length;h+=1)t[h].m(e,null);a=!0,o||(l=[Bl(i=ab.call(null,e,{items:n[0],flipDurationMs:vw,dropTargetStyle:{outline:"none"},dragDisabled:n[3]})),At(e,"finalize",n[11]),At(e,"consider",n[12])],o=!0)},p(c,f){if(f[0]&59135){s=c[0],we();for(let h=0;h<t.length;h+=1)t[h].r();t=Il(t,f,u,1,c,s,r,e,m7,zV,null,wV);for(let h=0;h<t.length;h+=1)t[h].a();ke()}i&&Mn(i.update)&&f[0]&9&&i.update.call(null,{items:c[0],flipDurationMs:vw,dropTargetStyle:{outline:"none"},dragDisabled:c[3]})},i(c){if(!a){for(let f=0;f<s.length;f+=1)b(t[f]);a=!0}},o(c){for(let f=0;f<t.length;f+=1)$(t[f]);a=!1},d(c){c&&M(e);for(let f=0;f<t.length;f+=1)t[f].d();o=!1,Vi(l)}}}function sKe(n){let e;return{c(){e=le("Add your first condition to get started.")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function kV(n){let e,t,r,i,a,o,l,s,u;function c(y){n[19](y,n[31])}let f={options:n[4]};n[31].setting!==void 0&&(f.value=n[31].setting),e=new mn({props:f}),He.push(()=>nt(e,"value",c));const h=[cKe,uKe],m=[];function _(y,w){return y[32]?0:1}return o=_(n),l=m[o]=h[o](n),{c(){O(e.$$.fragment),r=U(),i=J("div"),i.textContent="TO",a=U(),l.c(),s=$t()},m(y,w){H(e,y,w),C(y,r,w),C(y,i,w),C(y,a,w),m[o].m(y,w),C(y,s,w),u=!0},p(y,w){n=y;const A={};w[0]&16&&(A.options=n[4]),!t&&w[0]&1&&(t=!0,A.value=n[31].setting,rt(()=>t=!1)),e.$set(A);let E=o;o=_(n),o===E?m[o].p(n,w):(we(),$(m[E],1,1,()=>{m[E]=null}),ke(),l=m[o],l?l.p(n,w):(l=m[o]=h[o](n),l.c()),b(l,1),l.m(s.parentNode,s))},i(y){u||(b(e.$$.fragment,y),b(l),u=!0)},o(y){$(e.$$.fragment,y),$(l),u=!1},d(y){B(e,y),y&&M(r),y&&M(i),y&&M(a),m[o].d(y),y&&M(s)}}}function uKe(n){let e,t;return e=new mn({props:{disabled:!0,placeholder:" "}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p:mt,i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function cKe(n){let e,t;function r(...i){return n[20](n[31],n[33],n[34],...i)}return e=new B7({props:{type:n[32].type,control:l7(n[32]),key:n[32].key,value:n[31].settingValue,componentInstance:n[2],onChange:r,props:{options:n[32].options,placeholder:n[32].placeholder},bindings:n[1]}}),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){n=i;const o={};a[0]&1&&(o.type=n[32].type),a[0]&1&&(o.control=l7(n[32])),a[0]&1&&(o.key=n[32].key),a[0]&1&&(o.value=n[31].settingValue),a[0]&4&&(o.componentInstance=n[2]),a[0]&1&&(o.onChange=r),a[0]&1&&(o.props={options:n[32].options,placeholder:n[32].placeholder}),a[0]&2&&(o.bindings=n[1]),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function fKe(n){let e,t,r;function i(o){n[28](o,n[31])}let a={placeholder:"Value",disabled:n[31].noValue,options:["True","False"]};return n[31].referenceValue!==void 0&&(a.value=n[31].referenceValue),e=new mn({props:a}),He.push(()=>nt(e,"value",i)),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){n=o;const s={};l[0]&1&&(s.disabled=n[31].noValue),!t&&l[0]&1&&(t=!0,s.value=n[31].referenceValue,rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function pKe(n){let e,t,r;function i(o){n[27](o,n[31])}let a={placeholder:"Value",disabled:n[31].noValue};return n[31].referenceValue!==void 0&&(a.value=n[31].referenceValue),e=new rp({props:a}),He.push(()=>nt(e,"value",i)),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){n=o;const s={};l[0]&1&&(s.disabled=n[31].noValue),!t&&l[0]&1&&(t=!0,s.value=n[31].referenceValue,rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function dKe(n){let e,t;function r(...i){return n[26](n[31],n[33],n[34],...i)}return e=new Za({props:{disabled:n[31].noValue,bindings:n[1],placeholder:"Value",value:n[31].referenceValue}}),e.$on("change",r),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){n=i;const o={};a[0]&1&&(o.disabled=n[31].noValue),a[0]&2&&(o.bindings=n[1]),a[0]&1&&(o.value=n[31].referenceValue),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function zV(n,e){let t,r,i,a,o,l,s,u,c,f,h,m,_,y,w,A,E,T,I,P,F,j,q,W,te,Q,oe,ie,K=mt,G,ne,se;i=new dn({props:{name:"DragHandle",size:"XL"}});function pe(Ze){e[18](Ze,e[31])}let ze={placeholder:null,options:e[5]};e[31].action!==void 0&&(ze.value=e[31].action),l=new mn({props:ze}),He.push(()=>nt(l,"value",pe));let he=e[31].action==="update"&&kV(e);function $e(...Ze){return e[21](e[31],e[33],e[34],...Ze)}m=new Za({props:{bindings:e[1],placeholder:"Value",value:e[31].newValue}}),m.$on("change",$e);function Ce(Ze){e[22](Ze,e[31])}function ge(...Ze){return e[23](e[31],...Ze)}let st={placeholder:null,options:e[13](e[31])};e[31].operator!==void 0&&(st.value=e[31].operator),y=new mn({props:st}),He.push(()=>nt(y,"value",Ce)),y.$on("change",ge);function Ae(Ze){e[24](Ze,e[31])}function ve(...Ze){return e[25](e[31],...Ze)}let je={disabled:e[31].noValue||e[31].operator==="oneOf",options:e[6],placeholder:null};e[31].valueType!==void 0&&(je.value=e[31].valueType),E=new mn({props:je}),He.push(()=>nt(E,"value",Ae)),E.$on("change",ve);const xe=[dKe,pKe,fKe],_e=[];function ut(Ze,We){return We[0]&1&&(P=null),P==null&&(P=!!["string","number"].includes(Ze[31].valueType)),P?0:Ze[31].valueType==="datetime"?1:Ze[31].valueType==="boolean"?2:-1}~(F=ut(e,[-1,-1]))&&(j=_e[F]=xe[F](e));function dt(){return e[29](e[31])}W=new dn({props:{name:"Duplicate",hoverable:!0,size:"S"}}),W.$on("click",dt);function gt(){return e[30](e[31])}return Q=new dn({props:{name:"Close",hoverable:!0,size:"S"}}),Q.$on("click",gt),{key:n,first:null,c(){t=J("div"),r=J("div"),O(i.$$.fragment),o=U(),O(l.$$.fragment),u=U(),he&&he.c(),c=U(),f=J("div"),f.textContent="IF",h=U(),O(m.$$.fragment),_=U(),O(y.$$.fragment),A=U(),O(E.$$.fragment),I=U(),j&&j.c(),q=U(),O(W.$$.fragment),te=U(),O(Q.$$.fragment),oe=U(),D(r,"class","handle svelte-1vod3ll"),D(r,"aria-label","drag-handle"),D(r,"style",a=e[3]?"cursor: grab":"cursor: grabbing"),D(t,"class","condition svelte-1vod3ll"),De(t,"update",e[31].action==="update"),this.first=t},m(Ze,We){C(Ze,t,We),x(t,r),H(i,r,null),x(t,o),H(l,t,null),x(t,u),he&&he.m(t,null),x(t,c),x(t,f),x(t,h),H(m,t,null),x(t,_),H(y,t,null),x(t,A),H(E,t,null),x(t,I),~F&&_e[F].m(t,null),x(t,q),H(W,t,null),x(t,te),H(Q,t,null),x(t,oe),G=!0,ne||(se=At(r,"mousedown",e[17]),ne=!0)},p(Ze,We){e=Ze,(!G||We[0]&8&&a!==(a=e[3]?"cursor: grab":"cursor: grabbing"))&&D(r,"style",a);const tt={};!s&&We[0]&1&&(s=!0,tt.value=e[31].action,rt(()=>s=!1)),l.$set(tt),e[31].action==="update"?he?(he.p(e,We),We[0]&1&&b(he,1)):(he=kV(e),he.c(),b(he,1),he.m(t,c)):he&&(we(),$(he,1,1,()=>{he=null}),ke());const Bt={};We[0]&2&&(Bt.bindings=e[1]),We[0]&1&&(Bt.value=e[31].newValue),m.$set(Bt);const an={};We[0]&1&&(an.options=e[13](e[31])),!w&&We[0]&1&&(w=!0,an.value=e[31].operator,rt(()=>w=!1)),y.$set(an);const Tt={};We[0]&1&&(Tt.disabled=e[31].noValue||e[31].operator==="oneOf"),!T&&We[0]&1&&(T=!0,Tt.value=e[31].valueType,rt(()=>T=!1)),E.$set(Tt);let de=F;F=ut(e,We),F===de?~F&&_e[F].p(e,We):(j&&(we(),$(_e[de],1,1,()=>{_e[de]=null}),ke()),~F?(j=_e[F],j?j.p(e,We):(j=_e[F]=xe[F](e),j.c()),b(j,1),j.m(t,q)):j=null),We[0]&1&&De(t,"update",e[31].action==="update")},r(){ie=t.getBoundingClientRect()},f(){h7(t),K()},a(){K(),K=d7(t,ie,I7,{duration:vw})},i(Ze){G||(b(i.$$.fragment,Ze),b(l.$$.fragment,Ze),b(he),b(m.$$.fragment,Ze),b(y.$$.fragment,Ze),b(E.$$.fragment,Ze),b(j),b(W.$$.fragment,Ze),b(Q.$$.fragment,Ze),G=!0)},o(Ze){$(i.$$.fragment,Ze),$(l.$$.fragment,Ze),$(he),$(m.$$.fragment,Ze),$(y.$$.fragment,Ze),$(E.$$.fragment,Ze),$(j),$(W.$$.fragment,Ze),$(Q.$$.fragment,Ze),G=!1},d(Ze){Ze&&M(t),B(i),B(l),he&&he.d(),B(m),B(y),B(E),~F&&_e[F].d(),B(W),B(Q),ne=!1,se()}}}function hKe(n){let e;return{c(){e=le("Add condition")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function mKe(n){let e,t,r,i,a,o;const l=[lKe,oKe],s=[];function u(c,f){var h;return(h=c[0])!=null&&h.length?0:1}return e=u(n),t=s[e]=l[e](n),a=new $n({props:{secondary:!0,icon:"Add",$$slots:{default:[hKe]},$$scope:{ctx:n}}}),a.$on("click",n[8]),{c(){t.c(),r=U(),i=J("div"),O(a.$$.fragment)},m(c,f){s[e].m(c,f),C(c,r,f),C(c,i,f),H(a,i,null),o=!0},p(c,f){let h=e;e=u(c),e===h?s[e].p(c,f):(we(),$(s[h],1,1,()=>{s[h]=null}),ke(),t=s[e],t?t.p(c,f):(t=s[e]=l[e](c),t.c()),b(t,1),t.m(r.parentNode,r));const m={};f[1]&16&&(m.$$scope={dirty:f,ctx:c}),a.$set(m)},i(c){o||(b(t),b(a.$$.fragment,c),o=!0)},o(c){$(t),$(a.$$.fragment,c),o=!1},d(c){s[e].d(c),c&&M(r),c&&M(i),B(a)}}}function gKe(n){let e,t,r;return t=new Rt({props:{noPadding:!0,$$slots:{default:[mKe]},$$scope:{ctx:n}}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","container svelte-1vod3ll")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a[0]&31|a[1]&16&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function vKe(n){let e,t;return e=new S4({props:{$$slots:{default:[gKe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&31|i[1]&16&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}const vw=150;function _Ke(n,e,t){let r,i,a;Ne(n,I3,pe=>t(2,a=pe));let{conditions:o=[]}=e,{bindings:l=[]}=e;const s=[{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 c=!0;const f=pe=>r.find(ze=>ze.key===pe),h=()=>{t(0,o=[...o,{valueType:"string",id:c2.exports.generate(),action:"hide",operator:Zf.Equals.value}])},m=pe=>{t(0,o=o.filter(ze=>ze.id!==pe))},_=pe=>{const he={...o.find($e=>$e.id===pe),id:c2.exports.generate()};t(0,o=[...o,he])},y=pe=>{w(pe),t(3,c=!0)},w=pe=>{t(0,o=pe.detail.items)},A=pe=>I$(pe.valueType),E=(pe,ze)=>{const he=[Zf.Empty.value,Zf.NotEmpty.value];pe.noValue=he.includes(ze),(pe.noValue||ze==="oneOf")&&(pe.referenceValue=null,pe.valueType="string")},T=(pe,ze)=>{var $e;pe.referenceValue=null;const he=I$(ze).map(Ce=>Ce.value);he.includes(pe.operator)||(pe.operator=($e=he[0])!=null?$e:Zf.Equals.value,E(pe,pe.operator))},I=()=>t(3,c=!1);function P(pe,ze){n.$$.not_equal(ze.action,pe)&&(ze.action=pe,t(0,o))}function F(pe,ze){n.$$.not_equal(ze.setting,pe)&&(ze.setting=pe,t(0,o))}const j=(pe,ze,he,$e)=>t(0,ze[he].settingValue=$e,o),q=(pe,ze,he,$e)=>t(0,ze[he].newValue=$e.detail,o);function W(pe,ze){n.$$.not_equal(ze.operator,pe)&&(ze.operator=pe,t(0,o))}const te=(pe,ze)=>E(pe,ze.detail);function Q(pe,ze){n.$$.not_equal(ze.valueType,pe)&&(ze.valueType=pe,t(0,o))}const oe=(pe,ze)=>T(pe,ze.detail),ie=(pe,ze,he,$e)=>t(0,ze[he].referenceValue=$e.detail,o);function K(pe,ze){n.$$.not_equal(ze.referenceValue,pe)&&(ze.referenceValue=pe,t(0,o))}function G(pe,ze){n.$$.not_equal(ze.referenceValue,pe)&&(ze.referenceValue=pe,t(0,o))}const ne=pe=>_(pe.id),se=pe=>m(pe.id);return n.$$set=pe=>{"conditions"in pe&&t(0,o=pe.conditions),"bindings"in pe&&t(1,l=pe.bindings)},n.$$.update=()=>{var pe;n.$$.dirty[0]&4&&t(16,r=(pe=L6(a==null?void 0:a._component))==null?void 0:pe.concat({label:"Custom CSS",key:"_css",type:"text"})),n.$$.dirty[0]&65536&&t(4,i=r.map(ze=>({label:ze.label,value:ze.key}))),n.$$.dirty[0]&1&&o.forEach(ze=>{ze.id||(ze.id=c2.exports.generate())})},[o,l,a,c,i,s,u,f,h,m,_,y,w,A,E,T,r,I,P,F,j,q,W,te,Q,oe,ie,K,G,ne,se]}class bKe extends Re{constructor(e){super(),Ve(this,e,_Ke,vKe,Oe,{conditions:0,bindings:1},null,[-1,-1])}}function yKe(n){let e;return{c(){e=le("Configure conditions")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function $Ke(n){let e,t,r,i,a,o;return a=new Sr({props:{$$slots:{default:[yKe]},$$scope:{ctx:n}}}),a.$on("click",n[4]),{c(){e=J("div"),t=le(n[3]),r=U(),i=J("div"),O(a.$$.fragment),D(e,"class","conditionCount svelte-gl19jt")},m(l,s){C(l,e,s),x(e,t),C(l,r,s),C(l,i,s),H(a,i,null),o=!0},p(l,s){(!o||s&8)&&_t(t,l[3]);const u={};s&2048&&(u.$$scope={dirty:s,ctx:l}),a.$set(u)},i(l){o||(b(a.$$.fragment,l),o=!0)},o(l){$(a.$$.fragment,l),o=!1},d(l){l&&M(e),l&&M(r),l&&M(i),B(a)}}}function wKe(n){let e;return{c(){e=le("Show, hide and update components in response to conditions being met.")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function kKe(n){let e;return{c(){e=le("Save")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function zKe(n){let e,t;return e=new $n({props:{cta:!0,slot:"buttons",$$slots:{default:[kKe]},$$scope:{ctx:n}}}),e.$on("click",n[9]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2048&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function AKe(n){let e,t,r;function i(o){n[8](o)}let a={slot:"body",bindings:n[0]};return n[1]!==void 0&&(a.conditions=n[1]),e=new bKe({props:a}),He.push(()=>nt(e,"conditions",i)),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){const s={};l&1&&(s.bindings=o[0]),!t&&l&2&&(t=!0,s.conditions=o[1],rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function MKe(n){let e,t,r,i;e=new l_({props:{name:"Conditions",collapsible:!1,$$slots:{default:[$Ke]},$$scope:{ctx:n}}});let a={title:"Conditions",$$slots:{body:[AKe],buttons:[zKe],description:[wKe]},$$scope:{ctx:n}};return r=new Hf({props:a}),n[10](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),C(o,t,l),H(r,o,l),i=!0},p(o,[l]){const s={};l&2056&&(s.$$scope={dirty:l,ctx:o}),e.$set(s);const u={};l&2051&&(u.$$scope={dirty:l,ctx:o}),r.$set(u)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&M(t),n[10](null),B(r,o)}}}function CKe(n,e,t){let r,i,{componentInstance:a}=e,{bindings:o}=e,l,s;const u=()=>{var _;t(1,l=JSON.parse(JSON.stringify((_=a==null?void 0:a._conditions)!=null?_:[]))),s.show()},c=async()=>{try{await Xt.actions.components.updateConditions(l)}catch{yt.error("Error updating conditions")}s.hide()};function f(_){l=_,t(1,l)}const h=()=>c();function m(_){He[_?"unshift":"push"](()=>{s=_,t(2,s)})}return n.$$set=_=>{"componentInstance"in _&&t(6,a=_.componentInstance),"bindings"in _&&t(0,o=_.bindings)},n.$$.update=()=>{var _;n.$$.dirty&64&&t(7,r=(_=a==null?void 0:a._conditions)==null?void 0:_.length),n.$$.dirty&128&&t(3,i=`${r||"No"} condition${r!==1?"s":""} set`)},[o,l,s,i,u,c,a,r,f,h,m]}class SKe extends Re{constructor(e){super(),Ve(this,e,CKe,MKe,Oe,{componentInstance:6,bindings:0})}}function AV(n){let e=n[1]._id,t,r,i=MV(n);return{c(){i.c(),t=$t()},m(a,o){i.m(a,o),C(a,t,o),r=!0},p(a,o){o&2&&Oe(e,e=a[1]._id)?(we(),$(i,1,1,mt),ke(),i=MV(a),i.c(),b(i,1),i.m(t.parentNode,t)):i.p(a,o)},i(a){r||(b(i),r=!0)},o(a){$(i),r=!1},d(a){a&&M(t),i.d(a)}}}function LKe(n){let e,t,r,i,a,o,l,s;return e=new RYe({props:{componentInstance:n[6],componentDefinition:n[5],bindings:n[4],componentBindings:n[3],isScreen:n[0]}}),r=new XYe({props:{componentInstance:n[6],componentDefinition:n[5],bindings:n[4]}}),a=new aKe({props:{componentInstance:n[6],componentDefinition:n[5],bindings:n[4]}}),l=new SKe({props:{componentInstance:n[6],componentDefinition:n[5],bindings:n[4]}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),O(a.$$.fragment),o=U(),O(l.$$.fragment)},m(u,c){H(e,u,c),C(u,t,c),H(r,u,c),C(u,i,c),H(a,u,c),C(u,o,c),H(l,u,c),s=!0},p(u,c){const f={};c&64&&(f.componentInstance=u[6]),c&32&&(f.componentDefinition=u[5]),c&16&&(f.bindings=u[4]),c&8&&(f.componentBindings=u[3]),c&1&&(f.isScreen=u[0]),e.$set(f);const h={};c&64&&(h.componentInstance=u[6]),c&32&&(h.componentDefinition=u[5]),c&16&&(h.bindings=u[4]),r.$set(h);const m={};c&64&&(m.componentInstance=u[6]),c&32&&(m.componentDefinition=u[5]),c&16&&(m.bindings=u[4]),a.$set(m);const _={};c&64&&(_.componentInstance=u[6]),c&32&&(_.componentDefinition=u[5]),c&16&&(_.bindings=u[4]),l.$set(_)},i(u){s||(b(e.$$.fragment,u),b(r.$$.fragment,u),b(a.$$.fragment,u),b(l.$$.fragment,u),s=!0)},o(u){$(e.$$.fragment,u),$(r.$$.fragment,u),$(a.$$.fragment,u),$(l.$$.fragment,u),s=!1},d(u){B(e,u),u&&M(t),B(r,u),u&&M(i),B(a,u),u&&M(o),B(l,u)}}}function MV(n){var r;let e,t;return e=new W3({props:{title:n[2],icon:(r=n[5])==null?void 0:r.icon,borderLeft:!0,$$slots:{default:[LKe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){var l;const o={};a&4&&(o.title=i[2]),a&32&&(o.icon=(l=i[5])==null?void 0:l.icon),a&633&&(o.$$scope={dirty:a,ctx:i}),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function EKe(n){let e,t,r=n[1]&&AV(n);return{c(){r&&r.c(),e=$t()},m(i,a){r&&r.m(i,a),C(i,e,a),t=!0},p(i,[a]){i[1]?r?(r.p(i,a),a&2&&b(r,1)):(r=AV(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(i){t||(b(r),t=!0)},o(i){$(r),t=!1},d(i){r&&r.d(i),i&&M(e)}}}function TKe(n,e,t){let r,i,a,o,l,s,u,c,f;return Ne(n,I3,h=>t(1,u=h)),Ne(n,Ja,h=>t(7,c=h)),Ne(n,Xt,h=>t(8,f=h)),n.$$.update=()=>{n.$$.dirty&2&&t(6,r=u),n.$$.dirty&2&&t(5,i=Xt.actions.components.getDefinition(u==null?void 0:u._component)),n.$$.dirty&384&&t(4,a=Xk(c,f.selectedComponentId)),n.$$.dirty&384&&t(3,o=G5e(c,f.selectedComponentId)),n.$$.dirty&130&&t(0,l=(u==null?void 0:u._id)===(c==null?void 0:c.props._id)),n.$$.dirty&3&&t(2,s=l?"Screen":u==null?void 0:u._instanceName)},[l,u,s,o,a,i,r,c,f]}class DKe extends Re{constructor(e){super(),Ve(this,e,TKe,EKe,Oe,{})}}function HKe(n){let e,t,r,i,a;e=new sFe({}),r=new DKe({});const o=n[1].default,l=Xn(o,n,n[0],null);return{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),l&&l.c()},m(s,u){H(e,s,u),C(s,t,u),H(r,s,u),C(s,i,u),l&&l.m(s,u),a=!0},p(s,[u]){l&&l.p&&(!a||u&1)&&Zn(l,o,s,s[0],a?Jn(o,s[0],u,null):Qn(s[0]),null)},i(s){a||(b(e.$$.fragment,s),b(r.$$.fragment,s),b(l,s),a=!0)},o(s){$(e.$$.fragment,s),$(r.$$.fragment,s),$(l,s),a=!1},d(s){B(e,s),s&&M(t),B(r,s),s&&M(i),l&&l.d(s)}}}function BKe(n,e,t){let r;Ne(n,Ja,s=>t(2,r=s));let{$$slots:i={},$$scope:a}=e;const l=Oz({urlParam:"componentId",stateKey:"selectedComponentId",validate:s=>!!ru(r.props,s),fallbackUrl:"../",store:Xt,routify:tv,beforeNavigate:s=>(s!=null&&s.endsWith("/index")&&(s=s.replace("/index","")),s!=null&&s.endsWith("/new")&&(s=s.replace("/new","")),{url:s})});return h5(l),n.$$set=s=>{"$$scope"in s&&t(0,a=s.$$scope)},[a,i]}class OKe extends Re{constructor(e){super(),Ve(this,e,BKe,HKe,Oe,{})}}function IKe(n,e,t){let r,i,a;return Ne(n,ua,o=>t(0,r=o)),Ne(n,Ja,o=>t(1,i=o)),Ne(n,I3,o=>t(2,a=o)),ar(()=>{r(a?`./${a._id}`:i?`./${i.props._id}`:"../")}),[]}class PKe extends Re{constructor(e){super(),Ve(this,e,IKe,null,Oe,{})}}function VKe(n,e,t){let r;return Ne(n,ua,i=>t(0,r=i)),r("./screens"),[]}class RKe extends Re{constructor(e){super(),Ve(this,e,VKe,null,Oe,{})}}function NKe(n){let e;return{c(){e=le("Delete")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function FKe(n){let e,t;return e=new pi({props:{icon:"Delete",$$slots:{default:[NKe]},$$scope:{ctx:n}}}),e.$on("click",function(){Mn(n[0].show)&&n[0].show.apply(this,arguments)}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){n=r;const a={};i&16&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function jKe(n){let e,t,r;return t=new dn({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"slot","control"),D(e,"class","icon svelte-u6s22l")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p:mt,i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function xKe(n){let e,t,r,i;e=new Fu({props:{$$slots:{control:[jKe],default:[FKe]},$$scope:{ctx:n}}});let a={title:"Confirm Deletion",body:"Are you sure you wish to delete this layout?",okText:"Delete layout",onOk:n[1]};return r=new Os({props:a}),n[3](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),C(o,t,l),H(r,o,l),i=!0},p(o,[l]){const s={};l&17&&(s.$$scope={dirty:l,ctx:o}),e.$set(s);const u={};r.$set(u)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&M(t),n[3](null),B(r,o)}}}function UKe(n,e,t){let{layout:r}=e,i;const a=async()=>{try{await Xt.actions.layouts.delete(r),yt.success("Layout deleted successfully")}catch(l){yt.error((l==null?void 0:l.message)||"Error deleting layout")}};function o(l){He[l?"unshift":"push"](()=>{i=l,t(0,i)})}return n.$$set=l=>{"layout"in l&&t(2,r=l.layout)},[i,a,r,o]}class qKe extends Re{constructor(e){super(),Ve(this,e,UKe,xKe,Oe,{layout:2})}}function CV(n,e,t){const r=n.slice();return r[2]=e[t],r}function WKe(n){let e,t,r;return e=new qKe({props:{layout:n[2]}}),{c(){O(e.$$.fragment),t=U()},m(i,a){H(e,i,a),C(i,t,a),r=!0},p(i,a){const o={};a&1&&(o.layout=i[2]),e.$set(o)},i(i){r||(b(e.$$.fragment,i),r=!0)},o(i){$(e.$$.fragment,i),r=!1},d(i){B(e,i),i&&M(t)}}}function SV(n,e){let t,r,i;function a(){return e[1](e[2])}return r=new M5({props:{icon:"Experience",indentLevel:0,selected:e[0].selectedLayoutId===e[2]._id,text:e[2].name,$$slots:{default:[WKe]},$$scope:{ctx:e}}}),r.$on("click",a),{key:n,first:null,c(){t=$t(),O(r.$$.fragment),this.first=t},m(o,l){C(o,t,l),H(r,o,l),i=!0},p(o,l){e=o;const s={};l&1&&(s.selected=e[0].selectedLayoutId===e[2]._id),l&1&&(s.text=e[2].name),l&33&&(s.$$scope={dirty:l,ctx:e}),r.$set(s)},i(o){i||(b(r.$$.fragment,o),i=!0)},o(o){$(r.$$.fragment,o),i=!1},d(o){o&&M(t),B(r,o)}}}function GKe(n){let e,t=[],r=new Map,i,a=n[0].layouts;const o=l=>l[2]._id;for(let l=0;l<a.length;l+=1){let s=CV(n,a,l),u=o(s);r.set(u,t[l]=SV(u,s))}return{c(){e=J("div");for(let l=0;l<t.length;l+=1)t[l].c();D(e,"class","layouts svelte-1yaxv10")},m(l,s){C(l,e,s);for(let u=0;u<t.length;u+=1)t[u].m(e,null);i=!0},p(l,s){s&1&&(a=l[0].layouts,we(),t=Il(t,s,o,1,l,a,r,e,Mc,SV,null,CV),ke())},i(l){if(!i){for(let s=0;s<a.length;s+=1)b(t[s]);i=!0}},o(l){for(let s=0;s<t.length;s+=1)$(t[s]);i=!1},d(l){l&&M(e);for(let s=0;s<t.length;s+=1)t[s].d()}}}function YKe(n){let e,t;return e=new W3({props:{title:"Layouts",borderRight:!0,$$slots:{default:[GKe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&33&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function KKe(n,e,t){let r;return Ne(n,Xt,a=>t(0,r=a)),[r,a=>Xt.actions.layouts.select(a._id)]}class XKe extends Re{constructor(e){super(),Ve(this,e,KKe,YKe,Oe,{})}}function JKe(n){let e;return{c(){e=le(`Custom layouts are being deprecated. They will be removed in a future
886
+ and their appearance, by adding them below.`)},m(i,a){C(i,e,a),C(i,t,a),C(i,r,a)},p:mt,d(i){i&&M(e),i&&M(t),i&&M(r)}}}function pYe(n){let e;return{c(){e=le("Column")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function dYe(n){let e;return{c(){e=le("Label")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function nV(n,e){let t,r,i,a,o,l,s,u,c,f,h,m,_,y,w,A,E,T=mt,I,P,F;i=new dn({props:{name:"DragHandle",size:"XL"}});function j(G){e[12](G,e[19])}function q(...G){return e[13](e[19],e[20],e[21],...G)}let W={placeholder:"Column",options:e[2](e[19].name)};e[19].name!==void 0&&(W.value=e[19].name),l=new mn({props:W}),He.push(()=>nt(l,"value",j)),l.$on("change",q);function te(G){e[14](G,e[19])}let Q={placeholder:"Label"};e[19].displayName!==void 0&&(Q.value=e[19].displayName),c=new En({props:Q}),He.push(()=>nt(c,"value",te));function oe(G){e[15](G,e[19],e[20],e[21])}let ie={};e[19]!==void 0&&(ie.column=e[19]),m=new sYe({props:ie}),He.push(()=>nt(m,"column",oe));function K(){return e[16](e[19])}return w=new dn({props:{name:"Close",hoverable:!0,size:"S",disabled:e[0].length===1}}),w.$on("click",K),{key:n,first:null,c(){t=J("div"),r=J("div"),O(i.$$.fragment),o=U(),O(l.$$.fragment),u=U(),O(c.$$.fragment),h=U(),O(m.$$.fragment),y=U(),O(w.$$.fragment),A=U(),D(r,"class","handle svelte-17kmdew"),D(r,"aria-label","drag-handle"),D(r,"style",a=e[1]?"cursor: grab":"cursor: grabbing"),D(t,"class","column svelte-17kmdew"),this.first=t},m(G,ne){C(G,t,ne),x(t,r),H(i,r,null),x(t,o),H(l,t,null),x(t,u),H(c,t,null),x(t,h),H(m,t,null),x(t,y),H(w,t,null),x(t,A),I=!0,P||(F=At(r,"mousedown",e[11]),P=!0)},p(G,ne){e=G,(!I||ne&2&&a!==(a=e[1]?"cursor: grab":"cursor: grabbing"))&&D(r,"style",a);const se={};ne&1&&(se.options=e[2](e[19].name)),!s&&ne&1&&(s=!0,se.value=e[19].name,rt(()=>s=!1)),l.$set(se);const pe={};!f&&ne&1&&(f=!0,pe.value=e[19].displayName,rt(()=>f=!1)),c.$set(pe);const ze={};!_&&ne&1&&(_=!0,ze.column=e[19],rt(()=>_=!1)),m.$set(ze);const he={};ne&1&&(he.disabled=e[0].length===1),w.$set(he)},r(){E=t.getBoundingClientRect()},f(){h7(t),T()},a(){T(),T=d7(t,E,I7,{duration:mw})},i(G){I||(b(i.$$.fragment,G),b(l.$$.fragment,G),b(c.$$.fragment,G),b(m.$$.fragment,G),b(w.$$.fragment,G),I=!0)},o(G){$(i.$$.fragment,G),$(l.$$.fragment,G),$(c.$$.fragment,G),$(m.$$.fragment,G),$(w.$$.fragment,G),I=!1},d(G){G&&M(t),B(i),B(l),B(c),B(m),B(w),P=!1,F()}}}function hYe(n){let e,t,r,i,a,o,l,s,u,c,f,h,m=[],_=new Map,y,w,A,E;i=new un({props:{size:"L",$$slots:{default:[pYe]},$$scope:{ctx:n}}}),o=new un({props:{size:"L",$$slots:{default:[dYe]},$$scope:{ctx:n}}});let T=n[0];const I=P=>P[19].id;for(let P=0;P<T.length;P+=1){let F=tV(n,T,P),j=I(F);_.set(j,m[P]=nV(j,F))}return{c(){e=J("div"),t=J("div"),r=U(),O(i.$$.fragment),a=U(),O(o.$$.fragment),l=U(),s=J("div"),u=U(),c=J("div"),f=U(),h=J("div");for(let P=0;P<m.length;P+=1)m[P].c();D(e,"class","column svelte-17kmdew"),D(h,"class","columns svelte-17kmdew")},m(P,F){C(P,e,F),x(e,t),x(e,r),H(i,e,null),x(e,a),H(o,e,null),x(e,l),x(e,s),x(e,u),x(e,c),C(P,f,F),C(P,h,F);for(let j=0;j<m.length;j+=1)m[j].m(h,null);w=!0,A||(E=[Bl(y=ab.call(null,h,{items:n[0],flipDurationMs:mw,dropTargetStyle:{outline:"none"},dragDisabled:n[1]})),At(h,"finalize",n[6]),At(h,"consider",n[5])],A=!0)},p(P,F){const j={};F&4194304&&(j.$$scope={dirty:F,ctx:P}),i.$set(j);const q={};if(F&4194304&&(q.$$scope={dirty:F,ctx:P}),o.$set(q),F&23){T=P[0],we();for(let W=0;W<m.length;W+=1)m[W].r();m=Il(m,F,I,1,P,T,_,h,m7,nV,null,tV);for(let W=0;W<m.length;W+=1)m[W].a();ke()}y&&Mn(y.update)&&F&3&&y.update.call(null,{items:P[0],flipDurationMs:mw,dropTargetStyle:{outline:"none"},dragDisabled:P[1]})},i(P){if(!w){b(i.$$.fragment,P),b(o.$$.fragment,P);for(let F=0;F<T.length;F+=1)b(m[F]);w=!0}},o(P){$(i.$$.fragment,P),$(o.$$.fragment,P);for(let F=0;F<m.length;F+=1)$(m[F]);w=!1},d(P){P&&M(e),B(i),B(o),P&&M(f),P&&M(h);for(let F=0;F<m.length;F+=1)m[F].d();A=!1,Vi(E)}}}function mYe(n){let e;return{c(){e=le("Add column")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function gYe(n){let e;return{c(){e=le("Add all columns")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function rV(n){let e,t;return e=new $n({props:{secondary:!0,quiet:!0,$$slots:{default:[vYe]},$$scope:{ctx:n}}}),e.$on("click",n[8]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4194304&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function vYe(n){let e;return{c(){e=le("Reset columns")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function _Ye(n){var y;let e,t,r,i,a,o,l,s,u,c;const f=[cYe,uYe],h=[];function m(w,A){var E;return(E=w[0])!=null&&E.length?0:1}e=m(n),t=h[e]=f[e](n),o=new $n({props:{secondary:!0,icon:"Add",$$slots:{default:[mYe]},$$scope:{ctx:n}}}),o.$on("click",n[3]),s=new $n({props:{secondary:!0,quiet:!0,$$slots:{default:[gYe]},$$scope:{ctx:n}}}),s.$on("click",n[7]);let _=((y=n[0])==null?void 0:y.length)&&rV(n);return{c(){t.c(),r=U(),i=J("div"),a=J("div"),O(o.$$.fragment),l=U(),O(s.$$.fragment),u=U(),_&&_.c(),D(a,"class","buttons wide svelte-17kmdew"),D(i,"class","column svelte-17kmdew")},m(w,A){h[e].m(w,A),C(w,r,A),C(w,i,A),x(i,a),H(o,a,null),x(a,l),H(s,a,null),x(a,u),_&&_.m(a,null),c=!0},p(w,A){var P;let E=e;e=m(w),e===E?h[e].p(w,A):(we(),$(h[E],1,1,()=>{h[E]=null}),ke(),t=h[e],t?t.p(w,A):(t=h[e]=f[e](w),t.c()),b(t,1),t.m(r.parentNode,r));const T={};A&4194304&&(T.$$scope={dirty:A,ctx:w}),o.$set(T);const I={};A&4194304&&(I.$$scope={dirty:A,ctx:w}),s.$set(I),(P=w[0])!=null&&P.length?_?(_.p(w,A),A&1&&b(_,1)):(_=rV(w),_.c(),b(_,1),_.m(a,null)):_&&(we(),$(_,1,1,()=>{_=null}),ke())},i(w){c||(b(t),b(o.$$.fragment,w),b(s.$$.fragment,w),b(_),c=!0)},o(w){$(t),$(o.$$.fragment,w),$(s.$$.fragment,w),$(_),c=!1},d(w){h[e].d(w),w&&M(r),w&&M(i),B(o),B(s),_&&_.d()}}}function bYe(n){let e,t,r;return t=new Rt({props:{noPadding:!0,gap:"S",$$slots:{default:[_Ye]},$$scope:{ctx:n}}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","container svelte-17kmdew")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a&4194307&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function yYe(n){let e,t;return e=new S4({props:{$$slots:{default:[bYe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&4194307&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}const mw=150;function $Ye(n,e,t){let r,{columns:i=[]}=e,{options:a=[]}=e,{schema:o={}}=e,l=!0;const s=(F,j)=>{let q={};return F.forEach(W=>{q[W]=!0}),j==null||j.forEach(W=>{delete q[W.name]}),Object.keys(q)},u=F=>!F||r.includes(F)?r:[F,...r],c=()=>{t(0,i=[...i,{}])},f=F=>{t(0,i=i.filter(j=>j.id!==F))},h=F=>{t(0,i=F.detail.items)},m=F=>{h(F),t(1,l=!0)},_=()=>{let F=i||[];a.forEach(j=>{const q=o[j],W=i&&i.findIndex(te=>te.name===j)!==-1;!(q!=null&&q.autocolumn)&&!W&&F.push({name:j,displayName:j})}),t(0,i=F)},y=()=>{t(0,i=[])},w=()=>t(1,l=!1);function A(F,j){n.$$.not_equal(j.name,F)&&(j.name=F,t(0,i))}const E=(F,j,q,W)=>t(0,j[q].displayName=W.detail,i);function T(F,j){n.$$.not_equal(j.displayName,F)&&(j.displayName=F,t(0,i))}function I(F,j,q,W){q[W]=F,t(0,i)}const P=F=>f(F.id);return n.$$set=F=>{"columns"in F&&t(0,i=F.columns),"options"in F&&t(9,a=F.options),"schema"in F&&t(10,o=F.schema)},n.$$.update=()=>{n.$$.dirty&513&&(r=s(a,i)),n.$$.dirty&1&&i.forEach(F=>{F.id||(F.id=c2.exports.generate())})},[i,l,u,c,f,h,m,_,y,a,o,w,A,E,T,I,P]}class wYe extends Re{constructor(e){super(),Ve(this,e,$Ye,yYe,Oe,{columns:0,options:9,schema:10})}}function kYe(n){let e;return{c(){e=le("Configure columns")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function zYe(n){let e;return{c(){e=le("Configure the columns in your table.")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function AYe(n){let e;return{c(){e=le("Save")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function MYe(n){let e,t;return e=new $n({props:{cta:!0,slot:"buttons",$$slots:{default:[AYe]},$$scope:{ctx:n}}}),e.$on("click",n[5]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&131072&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function CYe(n){let e,t,r;function i(o){n[11](o)}let a={slot:"body",options:n[0],schema:n[1]};return n[3]!==void 0&&(a.columns=n[3]),e=new wYe({props:a}),He.push(()=>nt(e,"columns",i)),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){const s={};l&1&&(s.options=o[0]),l&2&&(s.schema=o[1]),!t&&l&8&&(t=!0,s.columns=o[3],rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function SYe(n){let e,t,r,i;e=new Sr({props:{$$slots:{default:[kYe]},$$scope:{ctx:n}}}),e.$on("click",n[4]);let a={title:"Table Columns",$$slots:{body:[CYe],buttons:[MYe],description:[zYe]},$$scope:{ctx:n}};return r=new Hf({props:a}),n[12](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),C(o,t,l),H(r,o,l),i=!0},p(o,[l]){const s={};l&131072&&(s.$$scope={dirty:l,ctx:o}),e.$set(s);const u={};l&131083&&(u.$$scope={dirty:l,ctx:o}),r.$set(u)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&M(t),n[12](null),B(r,o)}}}function LYe(n,e,t){let r,i,a,o,l;Ne(n,ml,I=>t(10,l=I));let{componentInstance:s}=e,{value:u=[]}=e;const c=Un();let f,h;const m=(I,P)=>{const F=X2(I,P).schema;return F&&(delete F._id,delete F._rev),F},_=I=>{t(3,h=z1.cloneDeep(I))},y=(I,P)=>!Array.isArray(I)||!I.length?[]:(typeof I[0]=="string"&&(I=I.map(F=>({name:F,displayName:F}))),I.filter(F=>P.includes(F.name))),w=()=>{_(o),f.show()},A=()=>{c("change",y(h,a)),f.hide()};function E(I){h=I,t(3,h)}function T(I){He[I?"unshift":"push"](()=>{f=I,t(2,f)})}return n.$$set=I=>{"componentInstance"in I&&t(6,s=I.componentInstance),"value"in I&&t(7,u=I.value)},n.$$.update=()=>{n.$$.dirty&1088&&t(9,r=E4(l,s)),n.$$.dirty&1536&&t(1,i=m(l,r)),n.$$.dirty&2&&t(0,a=Object.keys(i||{})),n.$$.dirty&129&&t(8,o=y(u,a)),n.$$.dirty&256&&_(o)},[a,i,f,h,w,A,s,u,o,r,l,E,T]}class EYe extends Re{constructor(e){super(),Ve(this,e,LYe,SYe,Oe,{componentInstance:6,value:7})}}function iV(n,e,t){const r=n.slice();return r[4]=e[t],r}function aV(n){let e,t;function r(){return n[3](n[4])}return e=new Sr({props:{icon:n[4].barIcon,quiet:!0,selected:n[4].value===n[0]}}),e.$on("click",r),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){n=i;const o={};a&4&&(o.icon=n[4].barIcon),a&5&&(o.selected=n[4].value===n[0]),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function TYe(n){let e,t,r=n[2],i=[];for(let o=0;o<r.length;o+=1)i[o]=aV(iV(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=$t()},m(o,l){for(let s=0;s<i.length;s+=1)i[s].m(o,l);C(o,e,l),t=!0},p(o,l){if(l&7){r=o[2];let s;for(s=0;s<r.length;s+=1){const u=iV(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=aV(u),i[s].c(),b(i[s],1),i[s].m(e.parentNode,e))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){Dn(i,o),o&&M(e)}}}function DYe(n){let e,t;return e=new v7({props:{$$slots:{default:[TYe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&135&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function HYe(n,e,t){let{value:r}=e,{onChange:i}=e,{options:a}=e;const o=l=>i(l.value);return n.$$set=l=>{"value"in l&&t(0,r=l.value),"onChange"in l&&t(1,i=l.onChange),"options"in l&&t(2,a=l.options)},[r,i,a,o]}class BYe extends Re{constructor(e){super(),Ve(this,e,HYe,DYe,Oe,{value:0,onChange:1,options:2})}}const OYe={text:BX,select:mn,dataSource:hX,"dataSource/s3":lje,dataProvider:fje,boolean:ju,number:nq,event:DX,table:rWe,color:Uz,icon:mWe,field:_We,multifield:$We,searchfield:zWe,options:hGe,schema:CWe,section:BWe,filter:jWe,url:JWe,columns:EYe,"field/string":z3,"field/number":z3,"field/options":z3,"field/boolean":z3,"field/longform":z3,"field/datetime":z3,"field/attachment":z3,"field/link":z3,"field/array":z3,"field/json":z3,"field/barcode/qr":z3,"validation/string":sd,"validation/array":sd,"validation/number":sd,"validation/boolean":sd,"validation/datetime":sd,"validation/attachment":sd,"validation/link":sd},l7=n=>{const{type:e,showInBar:t,barStyle:r}=n||{};return e?t&&e==="select"&&r==="buttons"?BYe:OYe[e]:null};function oV(n,e,t){const r=n.slice();return r[13]=e[t],r[15]=t,r}function lV(n,e,t){const r=n.slice();return r[16]=e[t],r}function sV(n){let e,t;return e=new l_({props:{name:n[13].name,collapsible:!1,$$slots:{default:[IYe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&32&&(a.name=r[13].name),i&524415&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function uV(n){let e,t;return e=new B7({props:{control:En,label:"Name",key:"_instanceName",value:n[1]._instanceName,onChange:n[8]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2&&(a.value=r[1]._instanceName),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function cV(n){let e,t;function r(...i){return n[9](n[16],...i)}return e=new B7({props:{type:n[16].type,control:l7(n[16]),label:n[16].label,key:n[16].key,value:n[1][n[16].key],defaultValue:n[16].defaultValue,nested:n[16].nested,onChange:r,highlighted:n[6].highlightedSettingKey===n[16].key,info:n[16].info,props:{placeholder:n[16].placeholder||null,options:n[16].options||[],min:n[16].min||null,max:n[16].max||null},bindings:n[2],componentBindings:n[3],componentInstance:n[1],componentDefinition:n[0]}}),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){n=i;const o={};a&32&&(o.type=n[16].type),a&32&&(o.control=l7(n[16])),a&32&&(o.label=n[16].label),a&32&&(o.key=n[16].key),a&34&&(o.value=n[1][n[16].key]),a&32&&(o.defaultValue=n[16].defaultValue),a&32&&(o.nested=n[16].nested),a&32&&(o.onChange=r),a&96&&(o.highlighted=n[6].highlightedSettingKey===n[16].key),a&32&&(o.info=n[16].info),a&32&&(o.props={placeholder:n[16].placeholder||null,options:n[16].options||[],min:n[16].min||null,max:n[16].max||null}),a&4&&(o.bindings=n[2]),a&8&&(o.componentBindings=n[3]),a&2&&(o.componentInstance=n[1]),a&1&&(o.componentDefinition=n[0]),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function fV(n,e){let t,r,i,a=e[16].visible&&cV(e);return{key:n,first:null,c(){t=$t(),a&&a.c(),r=$t(),this.first=t},m(o,l){C(o,t,l),a&&a.m(o,l),C(o,r,l),i=!0},p(o,l){e=o,e[16].visible?a?(a.p(e,l),l&32&&b(a,1)):(a=cV(e),a.c(),b(a,1),a.m(r.parentNode,r)):a&&(we(),$(a,1,1,()=>{a=null}),ke())},i(o){i||(b(a),i=!0)},o(o){$(a),i=!1},d(o){o&&M(t),a&&a.d(o),o&&M(r)}}}function pV(n){let e,t;return e=new SFe({props:{componentInstance:n[1]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2&&(a.componentInstance=r[1]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function dV(n){let e,t;return e=new DFe({}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function IYe(n){var y,w,A;let e=n[15]===0&&!n[1]._component.endsWith("/layout")&&!n[4],t,r=[],i=new Map,a,o=n[15]===0&&((w=(y=n[0])==null?void 0:y.component)==null?void 0:w.endsWith("/fieldgroup")),l,s,u,c=e&&uV(n),f=n[13].settings;const h=E=>E[16].key;for(let E=0;E<f.length;E+=1){let T=lV(n,f,E),I=h(T);i.set(I,r[E]=fV(I,T))}let m=o&&pV(n),_=n[15]===0&&((A=n[0])==null?void 0:A.block)&&dV();return{c(){c&&c.c(),t=U();for(let E=0;E<r.length;E+=1)r[E].c();a=U(),m&&m.c(),l=U(),_&&_.c(),s=U()},m(E,T){c&&c.m(E,T),C(E,t,T);for(let I=0;I<r.length;I+=1)r[I].m(E,T);C(E,a,T),m&&m.m(E,T),C(E,l,T),_&&_.m(E,T),C(E,s,T),u=!0},p(E,T){var I,P,F;T&50&&(e=E[15]===0&&!E[1]._component.endsWith("/layout")&&!E[4]),e?c?(c.p(E,T),T&50&&b(c,1)):(c=uV(E),c.c(),b(c,1),c.m(t.parentNode,t)):c&&(we(),$(c,1,1,()=>{c=null}),ke()),T&239&&(f=E[13].settings,we(),r=Il(r,T,h,1,E,f,i,a.parentNode,Mc,fV,a,lV),ke()),T&33&&(o=E[15]===0&&((P=(I=E[0])==null?void 0:I.component)==null?void 0:P.endsWith("/fieldgroup"))),o?m?(m.p(E,T),T&33&&b(m,1)):(m=pV(E),m.c(),b(m,1),m.m(l.parentNode,l)):m&&(we(),$(m,1,1,()=>{m=null}),ke()),E[15]===0&&((F=E[0])==null?void 0:F.block)?_?T&33&&b(_,1):(_=dV(),_.c(),b(_,1),_.m(s.parentNode,s)):_&&(we(),$(_,1,1,()=>{_=null}),ke())},i(E){if(!u){b(c);for(let T=0;T<f.length;T+=1)b(r[T]);b(m),b(_),u=!0}},o(E){$(c);for(let T=0;T<r.length;T+=1)$(r[T]);$(m),$(_),u=!1},d(E){c&&c.d(E),E&&M(t);for(let T=0;T<r.length;T+=1)r[T].d(E);E&&M(a),m&&m.d(E),E&&M(l),_&&_.d(E),E&&M(s)}}}function hV(n,e){let t,r,i,a=e[13].visible&&sV(e);return{key:n,first:null,c(){t=$t(),a&&a.c(),r=$t(),this.first=t},m(o,l){C(o,t,l),a&&a.m(o,l),C(o,r,l),i=!0},p(o,l){e=o,e[13].visible?a?(a.p(e,l),l&32&&b(a,1)):(a=sV(e),a.c(),b(a,1),a.m(r.parentNode,r)):a&&(we(),$(a,1,1,()=>{a=null}),ke())},i(o){i||(b(a),i=!0)},o(o){$(a),i=!1},d(o){o&&M(t),a&&a.d(o),o&&M(r)}}}function PYe(n){let e=[],t=new Map,r,i,a=n[5];const o=l=>l[13].name;for(let l=0;l<a.length;l+=1){let s=oV(n,a,l),u=o(s);t.set(u,e[l]=hV(u,s))}return{c(){for(let l=0;l<e.length;l+=1)e[l].c();r=$t()},m(l,s){for(let u=0;u<e.length;u+=1)e[u].m(l,s);C(l,r,s),i=!0},p(l,[s]){s&255&&(a=l[5],we(),e=Il(e,s,o,1,l,a,t,r.parentNode,Mc,hV,r,oV),ke())},i(l){if(!i){for(let s=0;s<a.length;s+=1)b(e[s]);i=!0}},o(l){for(let s=0;s<e.length;s+=1)$(e[s]);i=!1},d(l){for(let s=0;s<e.length;s+=1)e[s].d(l);l&&M(r)}}}function VYe(n,e,t){let r,i;Ne(n,Xt,w=>t(6,i=w));let{componentDefinition:a}=e,{componentInstance:o}=e,{bindings:l}=e,{componentBindings:s}=e,{isScreen:u=!1}=e;const c=(w,A,E)=>{var j;const T=(j=A==null?void 0:A.settings)!=null?j:[],I=T.filter(q=>!q.section),P=T.filter(q=>q.section);let F=[{name:"General",settings:I},...P||[]];return F.forEach(q=>{q.visible=h(w,q),q.visible&&(q.settings.forEach(W=>{W.visible=m(w,W,E)}),q.visible=q.settings.some(W=>W.visible))}),F},f=async(w,A)=>{try{await Xt.actions.components.updateSetting(w,A)}catch{yt.error("Error updating component prop")}},h=(w,A)=>{if(A.dependsOn){let E=A.dependsOn,T=null,I=!!A.dependsOn.invert;if(typeof A.dependsOn=="object"&&(E=A.dependsOn.setting,T=A.dependsOn.value),!E)return!1;if(T==null){const P=w[E];return P===!1?!1:P===!0?!0:!z1.isEmpty(P)}return I?w[E]!==T:w[E]===T}return!0},m=(w,A,E)=>(A==null?void 0:A.type)==="event"&&E||!l7(A)?!1:h(w,A),_=w=>f("_instanceName",w),y=(w,A)=>f(w.key,A);return n.$$set=w=>{"componentDefinition"in w&&t(0,a=w.componentDefinition),"componentInstance"in w&&t(1,o=w.componentInstance),"bindings"in w&&t(2,l=w.bindings),"componentBindings"in w&&t(3,s=w.componentBindings),"isScreen"in w&&t(4,u=w.isScreen)},n.$$.update=()=>{n.$$.dirty&19&&t(5,r=c(o,a,u))},[a,o,l,s,u,r,i,f,_,y]}class RYe extends Re{constructor(e){super(),Ve(this,e,VYe,PYe,Oe,{componentDefinition:0,componentInstance:1,bindings:2,componentBindings:3,isScreen:4})}}function mV(n,e,t){const r=n.slice();return r[11]=e[t],r}function gV(n,e){let t,r,i,a;function o(...l){return e[10](e[11],...l)}return r=new B7({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:o,props:e[8](e[11]),bindings:e[4]}}),{key:n,first:null,c(){t=J("div"),O(r.$$.fragment),i=U(),yn(t,"grid-column",e[11].column||"auto"),this.first=t},m(l,s){C(l,t,s),H(r,t,null),x(t,i),a=!0},p(l,s){e=l;const u={};s&36&&(u.label=`${e[11].label}${e[7](e[5],e[11])?" *":""}`),s&4&&(u.control=e[11].control),s&4&&(u.key=e[11].key),s&36&&(u.value=e[5][e[11].key]),s&4&&(u.onChange=o),s&4&&(u.props=e[8](e[11])),s&16&&(u.bindings=e[4]),r.$set(u),(!a||s&4)&&yn(t,"grid-column",e[11].column||"auto")},i(l){a||(b(r.$$.fragment,l),a=!0)},o(l){$(r.$$.fragment,l),a=!1},d(l){l&&M(t),B(r)}}}function NYe(n){let e,t=[],r=new Map,i,a=n[2];const o=l=>`${l[3]._id}-${l[11].key}-${l[11].label}`;for(let l=0;l<a.length;l+=1){let s=mV(n,a,l),u=o(s);r.set(u,t[l]=gV(u,s))}return{c(){e=J("div");for(let l=0;l<t.length;l+=1)t[l].c();D(e,"class","group-content svelte-1u21n8y"),yn(e,"grid-template-columns",n[1]||"1fr")},m(l,s){C(l,e,s);for(let u=0;u<t.length;u+=1)t[u].m(e,null);i=!0},p(l,s){s&956&&(a=l[2],we(),t=Il(t,s,o,1,l,a,r,e,Mc,gV,null,mV),ke()),(!i||s&2)&&yn(e,"grid-template-columns",l[1]||"1fr")},i(l){if(!i){for(let s=0;s<a.length;s+=1)b(t[s]);i=!0}},o(l){for(let s=0;s<t.length;s+=1)$(t[s]);i=!1},d(l){l&&M(e);for(let s=0;s<t.length;s+=1)t[s].d()}}}function FYe(n){let e,t;return e=new l_({props:{collapsible:!1,name:`${n[0]}${n[6]?" *":""}`,$$slots:{default:[NYe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&65&&(a.name=`${r[0]}${r[6]?" *":""}`),i&16438&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function jYe(n,e,t){let r,i,{name:a}=e,{columns:o}=e,{properties:l}=e,{componentInstance:s}=e,{bindings:u=[]}=e;const c=(_,y)=>_[y.key]!=null&&_[y.key]!=="",f=_=>{let y={..._||{}};return delete y.label,delete y.key,delete y.control,y},h=async(_,y)=>{try{await Xt.actions.components.updateStyle(_,y)}catch{yt.error("Error updating style")}},m=(_,y)=>h(_.key,y);return n.$$set=_=>{"name"in _&&t(0,a=_.name),"columns"in _&&t(1,o=_.columns),"properties"in _&&t(2,l=_.properties),"componentInstance"in _&&t(3,s=_.componentInstance),"bindings"in _&&t(4,u=_.bindings)},n.$$.update=()=>{var _;n.$$.dirty&8&&t(5,r=s._styles.normal||{}),n.$$.dirty&36&&t(6,i=(_=l==null?void 0:l.some(y=>c(r,y)))!=null?_:!1)},[a,o,l,s,u,r,i,c,f,h,m]}class xYe extends Re{constructor(e){super(),Ve(this,e,jYe,FYe,Oe,{name:0,columns:1,properties:2,componentInstance:3,bindings:4})}}const OX={label:"Margin",columns:"1fr 1fr",settings:[{label:"Top",key:"margin-top",control:mn,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:mn,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:mn,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:mn,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%"}]}]},UYe={label:"Padding",columns:"1fr 1fr",settings:[{label:"Top",key:"padding-top",control:mn,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:mn,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:mn,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:mn,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%"}]}]},qYe={label:"Size",columns:"1fr 1fr",settings:[{label:"Width",key:"width",control:En,placeholder:"Auto"},{label:"Height",key:"height",control:En,placeholder:"Auto"}]},WYe={label:"Background",columns:"auto 1fr",settings:[{label:"Color",key:"background",control:Uz},{label:"Gradient",key:"background-image",control:mn,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%);"}]}]},GYe={label:"Border",columns:"1fr 1fr",settings:[{label:"Color",key:"border-color",control:Uz},{label:"Width",key:"border-width",control:mn,column:"1 / 2",placeholder:"None",options:[{label:"Small",value:"1px"},{label:"Medium",value:"2px"},{label:"Large",value:"4px"}]},{label:"Style",key:"border-style",control:mn,column:"2 / 3",placeholder:"None",options:[{label:"Solid",value:"solid"},{label:"Dotted",value:"dotted"},{label:"Dashed",value:"dashed"}]},{label:"Radius",key:"border-radius",control:mn,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:mn,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)"}]}]},gw=[OX],vV=Object.freeze(Object.defineProperty({__proto__:null,margin:OX,padding:UYe,size:qYe,background:WYe,border:GYe,all:gw},Symbol.toStringTag,{value:"Module"}));function _V(n,e,t){const r=n.slice();return r[5]=e[t],r}function bV(n){let e,t,r=n[2],i=[];for(let o=0;o<r.length;o+=1)i[o]=yV(_V(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=$t()},m(o,l){for(let s=0;s<i.length;s+=1)i[s].m(o,l);C(o,e,l),t=!0},p(o,l){if(l&7){r=o[2];let s;for(s=0;s<r.length;s+=1){const u=_V(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=yV(u),i[s].c(),b(i[s],1),i[s].m(e.parentNode,e))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){Dn(i,o),o&&M(e)}}}function yV(n){let e,t;return e=new xYe({props:{style:n[5],name:n[5].label,columns:n[5].columns,properties:n[5].settings,componentInstance:n[0],bindings:n[1]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4&&(a.style=r[5]),i&4&&(a.name=r[5].label),i&4&&(a.columns=r[5].columns),i&4&&(a.properties=r[5].settings),i&1&&(a.componentInstance=r[0]),i&2&&(a.bindings=r[1]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function YYe(n){var i;let e,t,r=((i=n[2])==null?void 0:i.length)>0&&bV(n);return{c(){r&&r.c(),e=$t()},m(a,o){r&&r.m(a,o),C(a,e,o),t=!0},p(a,[o]){var l;((l=a[2])==null?void 0:l.length)>0?r?(r.p(a,o),o&4&&b(r,1)):(r=bV(a),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(a){t||(b(r),t=!0)},o(a){$(r),t=!1},d(a){r&&r.d(a),a&&M(e)}}}function KYe(n,e,t){let r,{componentDefinition:i}=e,{componentInstance:a}=e,{bindings:o}=e;const l=s=>{var c;if(!((c=s==null?void 0:s.styles)!=null&&c.length))return[...gw];let u=[...gw];return s.styles.forEach(f=>{vV[f]&&u.push(vV[f])}),u};return n.$$set=s=>{"componentDefinition"in s&&t(3,i=s.componentDefinition),"componentInstance"in s&&t(0,a=s.componentInstance),"bindings"in s&&t(1,o=s.bindings)},n.$$.update=()=>{n.$$.dirty&8&&t(2,r=l(i))},[a,o,r,i]}class XYe extends Re{constructor(e){super(),Ve(this,e,KYe,YYe,Oe,{componentDefinition:3,componentInstance:0,bindings:1})}}function JYe(n){let e;return{c(){e=le("Edit custom CSS")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function ZYe(n){let e,t,r;return t=new Sr({props:{$$slots:{default:[JYe]},$$scope:{ctx:n}}}),t.$on("click",n[4]),{c(){e=J("div"),O(t.$$.fragment)},m(i,a){C(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a&1024&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function QYe(n){let e;return{c(){e=le("Custom CSS overrides all other component styles.")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function eKe(n){let e;return{c(){e=le("Save")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function tKe(n){let e,t;return e=new $n({props:{cta:!0,slot:"buttons",$$slots:{default:[eKe]},$$scope:{ctx:n}}}),e.$on("click",n[5]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&1024&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function nKe(n){let e,t,r;var i=i7;function a(o){return{props:{slot:"body",value:o[1],allowJS:!0,bindings:o[3]}}}return i&&(e=new i(a(n)),e.$on("change",n[8])),{c(){e&&O(e.$$.fragment),t=$t()},m(o,l){e&&H(e,o,l),C(o,t,l),r=!0},p(o,l){const s={};if(l&2&&(s.value=o[1]),l&8&&(s.bindings=o[3]),i!==(i=i7)){if(e){we();const u=e;$(u.$$.fragment,1,0,()=>{B(u,1)}),ke()}i?(e=new i(a(o)),e.$on("change",o[8]),O(e.$$.fragment),b(e.$$.fragment,1),H(e,t.parentNode,t)):e=null}else i&&e.$set(s)},i(o){r||(e&&b(e.$$.fragment,o),r=!0)},o(o){e&&$(e.$$.fragment,o),r=!1},d(o){o&&M(t),e&&B(e,o)}}}function $V(n){let e,t,r={title:"Custom CSS",$$slots:{body:[nKe],buttons:[tKe],description:[QYe]},$$scope:{ctx:n}};return e=new Hf({props:r}),n[9](e),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){const o={};a&1034&&(o.$$scope={dirty:a,ctx:i}),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){n[9](null),B(e,i)}}}function rKe(n){var l,s,u;let e,t,r=(l=n[0])==null?void 0:l._id,i,a;e=new l_({props:{name:`Custom CSS${(u=(s=n[0])==null?void 0:s._styles)!=null&&u.custom?" *":""}`,collapsible:!1,$$slots:{default:[ZYe]},$$scope:{ctx:n}}});let o=$V(n);return{c(){O(e.$$.fragment),t=U(),o.c(),i=$t()},m(c,f){H(e,c,f),C(c,t,f),o.m(c,f),C(c,i,f),a=!0},p(c,[f]){var m,_,y;const h={};f&1&&(h.name=`Custom CSS${(_=(m=c[0])==null?void 0:m._styles)!=null&&_.custom?" *":""}`),f&1024&&(h.$$scope={dirty:f,ctx:c}),e.$set(h),f&1&&Oe(r,r=(y=c[0])==null?void 0:y._id)?(we(),$(o,1,1,mt),ke(),o=$V(c),o.c(),b(o,1),o.m(i.parentNode,i)):o.p(c,f)},i(c){a||(b(e.$$.fragment,c),b(o),a=!0)},o(c){$(e.$$.fragment,c),$(o),a=!1},d(c){B(e,c),c&&M(t),c&&M(i),o.d(c)}}}function iKe(n,e,t){let r,i,a;Ne(n,Xt,m=>t(6,i=m)),Ne(n,Ja,m=>t(7,a=m));let{componentInstance:o}=e,l,s;const u=()=>{var m;t(1,l=P3(r,(m=o==null?void 0:o._styles)==null?void 0:m.custom)),s.show()},c=async()=>{try{const m=Df(r,l);await Xt.actions.components.updateCustomStyle(m)}catch{yt.error("Error updating custom style")}s.hide()},f=m=>t(1,l=m.detail);function h(m){He[m?"unshift":"push"](()=>{s=m,t(2,s)})}return n.$$set=m=>{"componentInstance"in m&&t(0,o=m.componentInstance)},n.$$.update=()=>{n.$$.dirty&192&&t(3,r=Xk(a,i.selectedComponentId))},[o,l,s,r,u,c,i,a,f,h]}class aKe extends Re{constructor(e){super(),Ve(this,e,iKe,rKe,Oe,{componentInstance:0})}}function wV(n,e,t){const r=n.slice();r[31]=e[t],r[33]=e,r[34]=t;const i=r[7](r[31].setting);return r[32]=i,r}function oKe(n){let e,t;return e=new jt({props:{size:"S",$$slots:{default:[sKe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[1]&16&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function lKe(n){let e,t=[],r=new Map,i,a,o,l,s=n[0];const u=c=>c[31].id;for(let c=0;c<s.length;c+=1){let f=wV(n,s,c),h=u(f);r.set(h,t[c]=zV(h,f))}return{c(){e=J("div");for(let c=0;c<t.length;c+=1)t[c].c();D(e,"class","conditions svelte-1vod3ll")},m(c,f){C(c,e,f);for(let h=0;h<t.length;h+=1)t[h].m(e,null);a=!0,o||(l=[Bl(i=ab.call(null,e,{items:n[0],flipDurationMs:vw,dropTargetStyle:{outline:"none"},dragDisabled:n[3]})),At(e,"finalize",n[11]),At(e,"consider",n[12])],o=!0)},p(c,f){if(f[0]&59135){s=c[0],we();for(let h=0;h<t.length;h+=1)t[h].r();t=Il(t,f,u,1,c,s,r,e,m7,zV,null,wV);for(let h=0;h<t.length;h+=1)t[h].a();ke()}i&&Mn(i.update)&&f[0]&9&&i.update.call(null,{items:c[0],flipDurationMs:vw,dropTargetStyle:{outline:"none"},dragDisabled:c[3]})},i(c){if(!a){for(let f=0;f<s.length;f+=1)b(t[f]);a=!0}},o(c){for(let f=0;f<t.length;f+=1)$(t[f]);a=!1},d(c){c&&M(e);for(let f=0;f<t.length;f+=1)t[f].d();o=!1,Vi(l)}}}function sKe(n){let e;return{c(){e=le("Add your first condition to get started.")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function kV(n){let e,t,r,i,a,o,l,s,u;function c(y){n[19](y,n[31])}let f={options:n[4]};n[31].setting!==void 0&&(f.value=n[31].setting),e=new mn({props:f}),He.push(()=>nt(e,"value",c));const h=[cKe,uKe],m=[];function _(y,w){return y[32]?0:1}return o=_(n),l=m[o]=h[o](n),{c(){O(e.$$.fragment),r=U(),i=J("div"),i.textContent="TO",a=U(),l.c(),s=$t()},m(y,w){H(e,y,w),C(y,r,w),C(y,i,w),C(y,a,w),m[o].m(y,w),C(y,s,w),u=!0},p(y,w){n=y;const A={};w[0]&16&&(A.options=n[4]),!t&&w[0]&1&&(t=!0,A.value=n[31].setting,rt(()=>t=!1)),e.$set(A);let E=o;o=_(n),o===E?m[o].p(n,w):(we(),$(m[E],1,1,()=>{m[E]=null}),ke(),l=m[o],l?l.p(n,w):(l=m[o]=h[o](n),l.c()),b(l,1),l.m(s.parentNode,s))},i(y){u||(b(e.$$.fragment,y),b(l),u=!0)},o(y){$(e.$$.fragment,y),$(l),u=!1},d(y){B(e,y),y&&M(r),y&&M(i),y&&M(a),m[o].d(y),y&&M(s)}}}function uKe(n){let e,t;return e=new mn({props:{disabled:!0,placeholder:" "}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p:mt,i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function cKe(n){let e,t;function r(...i){return n[20](n[31],n[33],n[34],...i)}return e=new B7({props:{type:n[32].type,control:l7(n[32]),key:n[32].key,value:n[31].settingValue,componentInstance:n[2],onChange:r,props:{options:n[32].options,placeholder:n[32].placeholder},bindings:n[1]}}),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){n=i;const o={};a[0]&1&&(o.type=n[32].type),a[0]&1&&(o.control=l7(n[32])),a[0]&1&&(o.key=n[32].key),a[0]&1&&(o.value=n[31].settingValue),a[0]&4&&(o.componentInstance=n[2]),a[0]&1&&(o.onChange=r),a[0]&1&&(o.props={options:n[32].options,placeholder:n[32].placeholder}),a[0]&2&&(o.bindings=n[1]),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function fKe(n){let e,t,r;function i(o){n[28](o,n[31])}let a={placeholder:"Value",disabled:n[31].noValue,options:["True","False"]};return n[31].referenceValue!==void 0&&(a.value=n[31].referenceValue),e=new mn({props:a}),He.push(()=>nt(e,"value",i)),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){n=o;const s={};l[0]&1&&(s.disabled=n[31].noValue),!t&&l[0]&1&&(t=!0,s.value=n[31].referenceValue,rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function pKe(n){let e,t,r;function i(o){n[27](o,n[31])}let a={placeholder:"Value",disabled:n[31].noValue};return n[31].referenceValue!==void 0&&(a.value=n[31].referenceValue),e=new rp({props:a}),He.push(()=>nt(e,"value",i)),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){n=o;const s={};l[0]&1&&(s.disabled=n[31].noValue),!t&&l[0]&1&&(t=!0,s.value=n[31].referenceValue,rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function dKe(n){let e,t;function r(...i){return n[26](n[31],n[33],n[34],...i)}return e=new Za({props:{disabled:n[31].noValue,bindings:n[1],placeholder:"Value",value:n[31].referenceValue}}),e.$on("change",r),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){n=i;const o={};a[0]&1&&(o.disabled=n[31].noValue),a[0]&2&&(o.bindings=n[1]),a[0]&1&&(o.value=n[31].referenceValue),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function zV(n,e){let t,r,i,a,o,l,s,u,c,f,h,m,_,y,w,A,E,T,I,P,F,j,q,W,te,Q,oe,ie,K=mt,G,ne,se;i=new dn({props:{name:"DragHandle",size:"XL"}});function pe(Ze){e[18](Ze,e[31])}let ze={placeholder:null,options:e[5]};e[31].action!==void 0&&(ze.value=e[31].action),l=new mn({props:ze}),He.push(()=>nt(l,"value",pe));let he=e[31].action==="update"&&kV(e);function $e(...Ze){return e[21](e[31],e[33],e[34],...Ze)}m=new Za({props:{bindings:e[1],placeholder:"Value",value:e[31].newValue}}),m.$on("change",$e);function Ce(Ze){e[22](Ze,e[31])}function ge(...Ze){return e[23](e[31],...Ze)}let st={placeholder:null,options:e[13](e[31])};e[31].operator!==void 0&&(st.value=e[31].operator),y=new mn({props:st}),He.push(()=>nt(y,"value",Ce)),y.$on("change",ge);function Ae(Ze){e[24](Ze,e[31])}function ve(...Ze){return e[25](e[31],...Ze)}let je={disabled:e[31].noValue||e[31].operator==="oneOf",options:e[6],placeholder:null};e[31].valueType!==void 0&&(je.value=e[31].valueType),E=new mn({props:je}),He.push(()=>nt(E,"value",Ae)),E.$on("change",ve);const xe=[dKe,pKe,fKe],_e=[];function ut(Ze,We){return We[0]&1&&(P=null),P==null&&(P=!!["string","number"].includes(Ze[31].valueType)),P?0:Ze[31].valueType==="datetime"?1:Ze[31].valueType==="boolean"?2:-1}~(F=ut(e,[-1,-1]))&&(j=_e[F]=xe[F](e));function dt(){return e[29](e[31])}W=new dn({props:{name:"Duplicate",hoverable:!0,size:"S"}}),W.$on("click",dt);function gt(){return e[30](e[31])}return Q=new dn({props:{name:"Close",hoverable:!0,size:"S"}}),Q.$on("click",gt),{key:n,first:null,c(){t=J("div"),r=J("div"),O(i.$$.fragment),o=U(),O(l.$$.fragment),u=U(),he&&he.c(),c=U(),f=J("div"),f.textContent="IF",h=U(),O(m.$$.fragment),_=U(),O(y.$$.fragment),A=U(),O(E.$$.fragment),I=U(),j&&j.c(),q=U(),O(W.$$.fragment),te=U(),O(Q.$$.fragment),oe=U(),D(r,"class","handle svelte-1vod3ll"),D(r,"aria-label","drag-handle"),D(r,"style",a=e[3]?"cursor: grab":"cursor: grabbing"),D(t,"class","condition svelte-1vod3ll"),De(t,"update",e[31].action==="update"),this.first=t},m(Ze,We){C(Ze,t,We),x(t,r),H(i,r,null),x(t,o),H(l,t,null),x(t,u),he&&he.m(t,null),x(t,c),x(t,f),x(t,h),H(m,t,null),x(t,_),H(y,t,null),x(t,A),H(E,t,null),x(t,I),~F&&_e[F].m(t,null),x(t,q),H(W,t,null),x(t,te),H(Q,t,null),x(t,oe),G=!0,ne||(se=At(r,"mousedown",e[17]),ne=!0)},p(Ze,We){e=Ze,(!G||We[0]&8&&a!==(a=e[3]?"cursor: grab":"cursor: grabbing"))&&D(r,"style",a);const tt={};!s&&We[0]&1&&(s=!0,tt.value=e[31].action,rt(()=>s=!1)),l.$set(tt),e[31].action==="update"?he?(he.p(e,We),We[0]&1&&b(he,1)):(he=kV(e),he.c(),b(he,1),he.m(t,c)):he&&(we(),$(he,1,1,()=>{he=null}),ke());const Bt={};We[0]&2&&(Bt.bindings=e[1]),We[0]&1&&(Bt.value=e[31].newValue),m.$set(Bt);const an={};We[0]&1&&(an.options=e[13](e[31])),!w&&We[0]&1&&(w=!0,an.value=e[31].operator,rt(()=>w=!1)),y.$set(an);const Tt={};We[0]&1&&(Tt.disabled=e[31].noValue||e[31].operator==="oneOf"),!T&&We[0]&1&&(T=!0,Tt.value=e[31].valueType,rt(()=>T=!1)),E.$set(Tt);let de=F;F=ut(e,We),F===de?~F&&_e[F].p(e,We):(j&&(we(),$(_e[de],1,1,()=>{_e[de]=null}),ke()),~F?(j=_e[F],j?j.p(e,We):(j=_e[F]=xe[F](e),j.c()),b(j,1),j.m(t,q)):j=null),We[0]&1&&De(t,"update",e[31].action==="update")},r(){ie=t.getBoundingClientRect()},f(){h7(t),K()},a(){K(),K=d7(t,ie,I7,{duration:vw})},i(Ze){G||(b(i.$$.fragment,Ze),b(l.$$.fragment,Ze),b(he),b(m.$$.fragment,Ze),b(y.$$.fragment,Ze),b(E.$$.fragment,Ze),b(j),b(W.$$.fragment,Ze),b(Q.$$.fragment,Ze),G=!0)},o(Ze){$(i.$$.fragment,Ze),$(l.$$.fragment,Ze),$(he),$(m.$$.fragment,Ze),$(y.$$.fragment,Ze),$(E.$$.fragment,Ze),$(j),$(W.$$.fragment,Ze),$(Q.$$.fragment,Ze),G=!1},d(Ze){Ze&&M(t),B(i),B(l),he&&he.d(),B(m),B(y),B(E),~F&&_e[F].d(),B(W),B(Q),ne=!1,se()}}}function hKe(n){let e;return{c(){e=le("Add condition")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function mKe(n){let e,t,r,i,a,o;const l=[lKe,oKe],s=[];function u(c,f){var h;return(h=c[0])!=null&&h.length?0:1}return e=u(n),t=s[e]=l[e](n),a=new $n({props:{secondary:!0,icon:"Add",$$slots:{default:[hKe]},$$scope:{ctx:n}}}),a.$on("click",n[8]),{c(){t.c(),r=U(),i=J("div"),O(a.$$.fragment)},m(c,f){s[e].m(c,f),C(c,r,f),C(c,i,f),H(a,i,null),o=!0},p(c,f){let h=e;e=u(c),e===h?s[e].p(c,f):(we(),$(s[h],1,1,()=>{s[h]=null}),ke(),t=s[e],t?t.p(c,f):(t=s[e]=l[e](c),t.c()),b(t,1),t.m(r.parentNode,r));const m={};f[1]&16&&(m.$$scope={dirty:f,ctx:c}),a.$set(m)},i(c){o||(b(t),b(a.$$.fragment,c),o=!0)},o(c){$(t),$(a.$$.fragment,c),o=!1},d(c){s[e].d(c),c&&M(r),c&&M(i),B(a)}}}function gKe(n){let e,t,r;return t=new Rt({props:{noPadding:!0,$$slots:{default:[mKe]},$$scope:{ctx:n}}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","container svelte-1vod3ll")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a[0]&31|a[1]&16&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function vKe(n){let e,t;return e=new S4({props:{$$slots:{default:[gKe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&31|i[1]&16&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}const vw=150;function _Ke(n,e,t){let r,i,a;Ne(n,I3,pe=>t(2,a=pe));let{conditions:o=[]}=e,{bindings:l=[]}=e;const s=[{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 c=!0;const f=pe=>r.find(ze=>ze.key===pe),h=()=>{t(0,o=[...o,{valueType:"string",id:c2.exports.generate(),action:"hide",operator:Zf.Equals.value}])},m=pe=>{t(0,o=o.filter(ze=>ze.id!==pe))},_=pe=>{const he={...o.find($e=>$e.id===pe),id:c2.exports.generate()};t(0,o=[...o,he])},y=pe=>{w(pe),t(3,c=!0)},w=pe=>{t(0,o=pe.detail.items)},A=pe=>I$(pe.valueType),E=(pe,ze)=>{const he=[Zf.Empty.value,Zf.NotEmpty.value];pe.noValue=he.includes(ze),(pe.noValue||ze==="oneOf")&&(pe.referenceValue=null,pe.valueType="string")},T=(pe,ze)=>{var $e;pe.referenceValue=null;const he=I$(ze).map(Ce=>Ce.value);he.includes(pe.operator)||(pe.operator=($e=he[0])!=null?$e:Zf.Equals.value,E(pe,pe.operator))},I=()=>t(3,c=!1);function P(pe,ze){n.$$.not_equal(ze.action,pe)&&(ze.action=pe,t(0,o))}function F(pe,ze){n.$$.not_equal(ze.setting,pe)&&(ze.setting=pe,t(0,o))}const j=(pe,ze,he,$e)=>t(0,ze[he].settingValue=$e,o),q=(pe,ze,he,$e)=>t(0,ze[he].newValue=$e.detail,o);function W(pe,ze){n.$$.not_equal(ze.operator,pe)&&(ze.operator=pe,t(0,o))}const te=(pe,ze)=>E(pe,ze.detail);function Q(pe,ze){n.$$.not_equal(ze.valueType,pe)&&(ze.valueType=pe,t(0,o))}const oe=(pe,ze)=>T(pe,ze.detail),ie=(pe,ze,he,$e)=>t(0,ze[he].referenceValue=$e.detail,o);function K(pe,ze){n.$$.not_equal(ze.referenceValue,pe)&&(ze.referenceValue=pe,t(0,o))}function G(pe,ze){n.$$.not_equal(ze.referenceValue,pe)&&(ze.referenceValue=pe,t(0,o))}const ne=pe=>_(pe.id),se=pe=>m(pe.id);return n.$$set=pe=>{"conditions"in pe&&t(0,o=pe.conditions),"bindings"in pe&&t(1,l=pe.bindings)},n.$$.update=()=>{var pe;n.$$.dirty[0]&4&&t(16,r=(pe=L6(a==null?void 0:a._component))==null?void 0:pe.concat({label:"Custom CSS",key:"_css",type:"text"})),n.$$.dirty[0]&65536&&t(4,i=r.map(ze=>({label:ze.label,value:ze.key}))),n.$$.dirty[0]&1&&o.forEach(ze=>{ze.id||(ze.id=c2.exports.generate())})},[o,l,a,c,i,s,u,f,h,m,_,y,w,A,E,T,r,I,P,F,j,q,W,te,Q,oe,ie,K,G,ne,se]}class bKe extends Re{constructor(e){super(),Ve(this,e,_Ke,vKe,Oe,{conditions:0,bindings:1},null,[-1,-1])}}function yKe(n){let e;return{c(){e=le("Configure conditions")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function $Ke(n){let e,t,r,i,a,o;return a=new Sr({props:{$$slots:{default:[yKe]},$$scope:{ctx:n}}}),a.$on("click",n[4]),{c(){e=J("div"),t=le(n[3]),r=U(),i=J("div"),O(a.$$.fragment),D(e,"class","conditionCount svelte-gl19jt")},m(l,s){C(l,e,s),x(e,t),C(l,r,s),C(l,i,s),H(a,i,null),o=!0},p(l,s){(!o||s&8)&&_t(t,l[3]);const u={};s&2048&&(u.$$scope={dirty:s,ctx:l}),a.$set(u)},i(l){o||(b(a.$$.fragment,l),o=!0)},o(l){$(a.$$.fragment,l),o=!1},d(l){l&&M(e),l&&M(r),l&&M(i),B(a)}}}function wKe(n){let e;return{c(){e=le("Show, hide and update components in response to conditions being met.")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function kKe(n){let e;return{c(){e=le("Save")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function zKe(n){let e,t;return e=new $n({props:{cta:!0,slot:"buttons",$$slots:{default:[kKe]},$$scope:{ctx:n}}}),e.$on("click",n[9]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2048&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function AKe(n){let e,t,r;function i(o){n[8](o)}let a={slot:"body",bindings:n[0]};return n[1]!==void 0&&(a.conditions=n[1]),e=new bKe({props:a}),He.push(()=>nt(e,"conditions",i)),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){const s={};l&1&&(s.bindings=o[0]),!t&&l&2&&(t=!0,s.conditions=o[1],rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function MKe(n){let e,t,r,i;e=new l_({props:{name:"Conditions",collapsible:!1,$$slots:{default:[$Ke]},$$scope:{ctx:n}}});let a={title:"Conditions",$$slots:{body:[AKe],buttons:[zKe],description:[wKe]},$$scope:{ctx:n}};return r=new Hf({props:a}),n[10](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),C(o,t,l),H(r,o,l),i=!0},p(o,[l]){const s={};l&2056&&(s.$$scope={dirty:l,ctx:o}),e.$set(s);const u={};l&2051&&(u.$$scope={dirty:l,ctx:o}),r.$set(u)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&M(t),n[10](null),B(r,o)}}}function CKe(n,e,t){let r,i,{componentInstance:a}=e,{bindings:o}=e,l,s;const u=()=>{var _;t(1,l=JSON.parse(JSON.stringify((_=a==null?void 0:a._conditions)!=null?_:[]))),s.show()},c=async()=>{try{await Xt.actions.components.updateConditions(l)}catch{yt.error("Error updating conditions")}s.hide()};function f(_){l=_,t(1,l)}const h=()=>c();function m(_){He[_?"unshift":"push"](()=>{s=_,t(2,s)})}return n.$$set=_=>{"componentInstance"in _&&t(6,a=_.componentInstance),"bindings"in _&&t(0,o=_.bindings)},n.$$.update=()=>{var _;n.$$.dirty&64&&t(7,r=(_=a==null?void 0:a._conditions)==null?void 0:_.length),n.$$.dirty&128&&t(3,i=`${r||"No"} condition${r!==1?"s":""} set`)},[o,l,s,i,u,c,a,r,f,h,m]}class SKe extends Re{constructor(e){super(),Ve(this,e,CKe,MKe,Oe,{componentInstance:6,bindings:0})}}function AV(n){let e=n[1]._id,t,r,i=MV(n);return{c(){i.c(),t=$t()},m(a,o){i.m(a,o),C(a,t,o),r=!0},p(a,o){o&2&&Oe(e,e=a[1]._id)?(we(),$(i,1,1,mt),ke(),i=MV(a),i.c(),b(i,1),i.m(t.parentNode,t)):i.p(a,o)},i(a){r||(b(i),r=!0)},o(a){$(i),r=!1},d(a){a&&M(t),i.d(a)}}}function LKe(n){let e,t,r,i,a,o,l,s;return e=new RYe({props:{componentInstance:n[6],componentDefinition:n[5],bindings:n[4],componentBindings:n[3],isScreen:n[0]}}),r=new XYe({props:{componentInstance:n[6],componentDefinition:n[5],bindings:n[4]}}),a=new aKe({props:{componentInstance:n[6],componentDefinition:n[5],bindings:n[4]}}),l=new SKe({props:{componentInstance:n[6],componentDefinition:n[5],bindings:n[4]}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),O(a.$$.fragment),o=U(),O(l.$$.fragment)},m(u,c){H(e,u,c),C(u,t,c),H(r,u,c),C(u,i,c),H(a,u,c),C(u,o,c),H(l,u,c),s=!0},p(u,c){const f={};c&64&&(f.componentInstance=u[6]),c&32&&(f.componentDefinition=u[5]),c&16&&(f.bindings=u[4]),c&8&&(f.componentBindings=u[3]),c&1&&(f.isScreen=u[0]),e.$set(f);const h={};c&64&&(h.componentInstance=u[6]),c&32&&(h.componentDefinition=u[5]),c&16&&(h.bindings=u[4]),r.$set(h);const m={};c&64&&(m.componentInstance=u[6]),c&32&&(m.componentDefinition=u[5]),c&16&&(m.bindings=u[4]),a.$set(m);const _={};c&64&&(_.componentInstance=u[6]),c&32&&(_.componentDefinition=u[5]),c&16&&(_.bindings=u[4]),l.$set(_)},i(u){s||(b(e.$$.fragment,u),b(r.$$.fragment,u),b(a.$$.fragment,u),b(l.$$.fragment,u),s=!0)},o(u){$(e.$$.fragment,u),$(r.$$.fragment,u),$(a.$$.fragment,u),$(l.$$.fragment,u),s=!1},d(u){B(e,u),u&&M(t),B(r,u),u&&M(i),B(a,u),u&&M(o),B(l,u)}}}function MV(n){var r;let e,t;return e=new W3({props:{title:n[2],icon:(r=n[5])==null?void 0:r.icon,borderLeft:!0,$$slots:{default:[LKe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){var l;const o={};a&4&&(o.title=i[2]),a&32&&(o.icon=(l=i[5])==null?void 0:l.icon),a&633&&(o.$$scope={dirty:a,ctx:i}),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function EKe(n){let e,t,r=n[1]&&AV(n);return{c(){r&&r.c(),e=$t()},m(i,a){r&&r.m(i,a),C(i,e,a),t=!0},p(i,[a]){i[1]?r?(r.p(i,a),a&2&&b(r,1)):(r=AV(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(i){t||(b(r),t=!0)},o(i){$(r),t=!1},d(i){r&&r.d(i),i&&M(e)}}}function TKe(n,e,t){let r,i,a,o,l,s,u,c,f;return Ne(n,I3,h=>t(1,u=h)),Ne(n,Ja,h=>t(7,c=h)),Ne(n,Xt,h=>t(8,f=h)),n.$$.update=()=>{n.$$.dirty&2&&t(6,r=u),n.$$.dirty&2&&t(5,i=Xt.actions.components.getDefinition(u==null?void 0:u._component)),n.$$.dirty&384&&t(4,a=Xk(c,f.selectedComponentId)),n.$$.dirty&384&&t(3,o=G5e(c,f.selectedComponentId)),n.$$.dirty&130&&t(0,l=(u==null?void 0:u._id)===(c==null?void 0:c.props._id)),n.$$.dirty&3&&t(2,s=l?"Screen":u==null?void 0:u._instanceName)},[l,u,s,o,a,i,r,c,f]}class DKe extends Re{constructor(e){super(),Ve(this,e,TKe,EKe,Oe,{})}}function HKe(n){let e,t,r,i,a;e=new sFe({}),r=new DKe({});const o=n[1].default,l=Xn(o,n,n[0],null);return{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),l&&l.c()},m(s,u){H(e,s,u),C(s,t,u),H(r,s,u),C(s,i,u),l&&l.m(s,u),a=!0},p(s,[u]){l&&l.p&&(!a||u&1)&&Zn(l,o,s,s[0],a?Jn(o,s[0],u,null):Qn(s[0]),null)},i(s){a||(b(e.$$.fragment,s),b(r.$$.fragment,s),b(l,s),a=!0)},o(s){$(e.$$.fragment,s),$(r.$$.fragment,s),$(l,s),a=!1},d(s){B(e,s),s&&M(t),B(r,s),s&&M(i),l&&l.d(s)}}}function BKe(n,e,t){let r;Ne(n,Ja,s=>t(2,r=s));let{$$slots:i={},$$scope:a}=e;const l=Oz({urlParam:"componentId",stateKey:"selectedComponentId",validate:s=>!!ru(r.props,s),fallbackUrl:"../",store:Xt,routify:tv,beforeNavigate:s=>(s!=null&&s.endsWith("/index")&&(s=s.replace("/index","")),s!=null&&s.endsWith("/new")&&(s=s.replace("/new","")),{url:s})});return h5(l),n.$$set=s=>{"$$scope"in s&&t(0,a=s.$$scope)},[a,i]}class OKe extends Re{constructor(e){super(),Ve(this,e,BKe,HKe,Oe,{})}}function IKe(n,e,t){let r,i,a;return Ne(n,ua,o=>t(0,r=o)),Ne(n,Ja,o=>t(1,i=o)),Ne(n,I3,o=>t(2,a=o)),ar(()=>{r(a?`./${a._id}`:i?`./${i.props._id}`:"../")}),[]}class PKe extends Re{constructor(e){super(),Ve(this,e,IKe,null,Oe,{})}}function VKe(n,e,t){let r;return Ne(n,ua,i=>t(0,r=i)),r("./screens"),[]}class RKe extends Re{constructor(e){super(),Ve(this,e,VKe,null,Oe,{})}}function NKe(n){let e;return{c(){e=le("Delete")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function FKe(n){let e,t;return e=new pi({props:{icon:"Delete",$$slots:{default:[NKe]},$$scope:{ctx:n}}}),e.$on("click",function(){Mn(n[0].show)&&n[0].show.apply(this,arguments)}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){n=r;const a={};i&16&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function jKe(n){let e,t,r;return t=new dn({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"slot","control"),D(e,"class","icon svelte-u6s22l")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p:mt,i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function xKe(n){let e,t,r,i;e=new Fu({props:{$$slots:{control:[jKe],default:[FKe]},$$scope:{ctx:n}}});let a={title:"Confirm Deletion",body:"Are you sure you wish to delete this layout?",okText:"Delete layout",onOk:n[1]};return r=new Os({props:a}),n[3](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),C(o,t,l),H(r,o,l),i=!0},p(o,[l]){const s={};l&17&&(s.$$scope={dirty:l,ctx:o}),e.$set(s);const u={};r.$set(u)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&M(t),n[3](null),B(r,o)}}}function UKe(n,e,t){let{layout:r}=e,i;const a=async()=>{try{await Xt.actions.layouts.delete(r),yt.success("Layout deleted successfully")}catch(l){yt.error((l==null?void 0:l.message)||"Error deleting layout")}};function o(l){He[l?"unshift":"push"](()=>{i=l,t(0,i)})}return n.$$set=l=>{"layout"in l&&t(2,r=l.layout)},[i,a,r,o]}class qKe extends Re{constructor(e){super(),Ve(this,e,UKe,xKe,Oe,{layout:2})}}function CV(n,e,t){const r=n.slice();return r[2]=e[t],r}function WKe(n){let e,t,r;return e=new qKe({props:{layout:n[2]}}),{c(){O(e.$$.fragment),t=U()},m(i,a){H(e,i,a),C(i,t,a),r=!0},p(i,a){const o={};a&1&&(o.layout=i[2]),e.$set(o)},i(i){r||(b(e.$$.fragment,i),r=!0)},o(i){$(e.$$.fragment,i),r=!1},d(i){B(e,i),i&&M(t)}}}function SV(n,e){let t,r,i;function a(){return e[1](e[2])}return r=new M5({props:{icon:"Experience",indentLevel:0,selected:e[0].selectedLayoutId===e[2]._id,text:e[2].name,$$slots:{default:[WKe]},$$scope:{ctx:e}}}),r.$on("click",a),{key:n,first:null,c(){t=$t(),O(r.$$.fragment),this.first=t},m(o,l){C(o,t,l),H(r,o,l),i=!0},p(o,l){e=o;const s={};l&1&&(s.selected=e[0].selectedLayoutId===e[2]._id),l&1&&(s.text=e[2].name),l&33&&(s.$$scope={dirty:l,ctx:e}),r.$set(s)},i(o){i||(b(r.$$.fragment,o),i=!0)},o(o){$(r.$$.fragment,o),i=!1},d(o){o&&M(t),B(r,o)}}}function GKe(n){let e,t=[],r=new Map,i,a=n[0].layouts;const o=l=>l[2]._id;for(let l=0;l<a.length;l+=1){let s=CV(n,a,l),u=o(s);r.set(u,t[l]=SV(u,s))}return{c(){e=J("div");for(let l=0;l<t.length;l+=1)t[l].c();D(e,"class","layouts svelte-1yaxv10")},m(l,s){C(l,e,s);for(let u=0;u<t.length;u+=1)t[u].m(e,null);i=!0},p(l,s){s&1&&(a=l[0].layouts,we(),t=Il(t,s,o,1,l,a,r,e,Mc,SV,null,CV),ke())},i(l){if(!i){for(let s=0;s<a.length;s+=1)b(t[s]);i=!0}},o(l){for(let s=0;s<t.length;s+=1)$(t[s]);i=!1},d(l){l&&M(e);for(let s=0;s<t.length;s+=1)t[s].d()}}}function YKe(n){let e,t;return e=new W3({props:{title:"Layouts",borderRight:!0,$$slots:{default:[GKe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&33&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function KKe(n,e,t){let r;return Ne(n,Xt,a=>t(0,r=a)),[r,a=>Xt.actions.layouts.select(a._id)]}class XKe extends Re{constructor(e){super(),Ve(this,e,KKe,YKe,Oe,{})}}function JKe(n){let e;return{c(){e=le(`Custom layouts are being deprecated. They will be removed in a future
887
887
  release.`)},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function ZKe(n){let e;return{c(){e=le("You can save the content of this layout by pressing the button below.")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function QKe(n){let e;return{c(){e=le(`This will copy all components inside your layout, which you can then paste
888
888
  into a screen.`)},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function eXe(n){let e;return{c(){e=le("Copy components")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function tXe(n){let e,t,r,i,a,o,l,s;return e=new A6({props:{type:"warning",showCloseButton:!1,$$slots:{default:[JKe]},$$scope:{ctx:n}}}),r=new jt({props:{size:"S",$$slots:{default:[ZKe]},$$scope:{ctx:n}}}),a=new jt({props:{size:"S",$$slots:{default:[QKe]},$$scope:{ctx:n}}}),l=new $n({props:{cta:!0,$$slots:{default:[eXe]},$$scope:{ctx:n}}}),l.$on("click",n[1]),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),O(a.$$.fragment),o=U(),O(l.$$.fragment)},m(u,c){H(e,u,c),C(u,t,c),H(r,u,c),C(u,i,c),H(a,u,c),C(u,o,c),H(l,u,c),s=!0},p(u,c){const f={};c&4&&(f.$$scope={dirty:c,ctx:u}),e.$set(f);const h={};c&4&&(h.$$scope={dirty:c,ctx:u}),r.$set(h);const m={};c&4&&(m.$$scope={dirty:c,ctx:u}),a.$set(m);const _={};c&4&&(_.$$scope={dirty:c,ctx:u}),l.$set(_)},i(u){s||(b(e.$$.fragment,u),b(r.$$.fragment,u),b(a.$$.fragment,u),b(l.$$.fragment,u),s=!0)},o(u){$(e.$$.fragment,u),$(r.$$.fragment,u),$(a.$$.fragment,u),$(l.$$.fragment,u),s=!1},d(u){B(e,u),u&&M(t),B(r,u),u&&M(i),B(a,u),u&&M(o),B(l,u)}}}function nXe(n){let e,t;return e=new Rt({props:{paddingX:"L",paddingY:"XL",gap:"S",$$slots:{default:[tXe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function rXe(n){var r;let e,t;return e=new W3({props:{title:(r=n[0])==null?void 0:r.name,icon:"Experience",borderLeft:!0,$$slots:{default:[nXe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,[a]){var l;const o={};a&1&&(o.title=(l=i[0])==null?void 0:l.name),a&4&&(o.$$scope={dirty:a,ctx:i}),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function iXe(n,e,t){let r;return Ne(n,MY,a=>t(0,r=a)),[r,()=>{let a=new u5("@budibase/standard-components/container").instanceName(r.name).customProps({gap:"M",direction:"column",hAlign:"stretch",vAlign:"top",size:"shrink"}).json();a._children=r.props._children,a=JSON.parse(JSON.stringify(a).replace("@budibase/standard-components/screenslot","@budibase/standard-components/container")),Xt.actions.components.copy(a),yt.success("Components copied successfully")}]}class aXe extends Re{constructor(e){super(),Ve(this,e,iXe,rXe,Oe,{})}}function oXe(n){let e,t,r,i;return e=new XKe({}),r=new aXe({}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p:mt,i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}class lXe extends Re{constructor(e){super(),Ve(this,e,null,oXe,Oe,{})}}function sXe(n){let e;const t=n[1].default,r=Xn(t,n,n[0],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,[a]){r&&r.p&&(!e||a&1)&&Zn(r,t,i,i[0],e?Jn(t,i[0],a,null):Qn(i[0]),null)},i(i){e||(b(r,i),e=!0)},o(i){$(r,i),e=!1},d(i){r&&r.d(i)}}}function uXe(n,e,t){let r;Ne(n,Xt,l=>t(2,r=l));let{$$slots:i={},$$scope:a}=e;const o=Oz({urlParam:"layoutId",stateKey:"selectedLayoutId",validate:l=>{var s;return(s=r.layouts)==null?void 0:s.some(u=>u._id===l)},fallbackUrl:"../",store:Xt,routify:tv});return h5(o),n.$$set=l=>{"$$scope"in l&&t(0,a=l.$$scope)},[a,i]}class cXe extends Re{constructor(e){super(),Ve(this,e,uXe,sXe,Oe,{})}}function fXe(n,e,t){let r,i;return Ne(n,Xt,a=>t(0,r=a)),Ne(n,ua,a=>t(1,i=a)),ar(()=>{var a;(a=r.layouts)!=null&&a.length&&i(`./${r.layouts[0]._id}`)}),[]}class pXe extends Re{constructor(e){super(),Ve(this,e,fXe,null,Oe,{})}}function dXe(n){let e;const t=n[3].default,r=Xn(t,n,n[2],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,[a]){r&&r.p&&(!e||a&4)&&Zn(r,t,i,i[2],e?Jn(t,i[2],a,null):Qn(i[2]),null)},i(i){e||(b(r,i),e=!0)},o(i){$(r,i),e=!1},d(i){r&&r.d(i)}}}function hXe(n,e,t){let r,i;Ne(n,ua,l=>t(0,r=l)),Ne(n,Xt,l=>t(1,i=l));let{$$slots:a={},$$scope:o}=e;return n.$$set=l=>{"$$scope"in l&&t(2,o=l.$$scope)},n.$$.update=()=>{var l;n.$$.dirty&3&&((l=i.layouts)!=null&&l.length||r("../"))},[r,i,o,a]}class mXe extends Re{constructor(e){super(),Ve(this,e,hXe,dXe,Oe,{})}}function gXe(n){let e,t,r;function i(o){n[5](o)}let a={options:n[3],getOptionLabel:vXe,getOptionValue:_Xe,getOptionColour:n[4],placeholder:n[2],error:n[1]};return n[0]!==void 0&&(a.value=n[0]),e=new mn({props:a}),He.push(()=>nt(e,"value",i)),e.$on("change",n[6]),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,[l]){const s={};l&8&&(s.options=o[3]),l&4&&(s.placeholder=o[2]),l&2&&(s.error=o[1]),!t&&l&1&&(t=!0,s.value=o[0],rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}const vXe=n=>n.name,_Xe=n=>n._id;function bXe(n,e,t){let r;Ne(n,Hl,c=>t(3,r=c));let{value:i}=e,{error:a}=e,{placeholder:o=null}=e;const l=c=>O3(c._id);function s(c){i=c,t(0,i)}function u(c){Bn.call(this,n,c)}return n.$$set=c=>{"value"in c&&t(0,i=c.value),"error"in c&&t(1,a=c.error),"placeholder"in c&&t(2,o=c.placeholder)},[i,a,o,r,l,s,u]}class qz extends Re{constructor(e){super(),Ve(this,e,bXe,gXe,Oe,{value:0,error:1,placeholder:2})}}function LV(n,e,t){const r=n.slice();return r[13]=e[t],r[14]=e,r[15]=t,r}function EV(n){let e,t=[],r=new Map,i,a,o,l,s=n[0];const u=c=>c[13].id;for(let c=0;c<s.length;c+=1){let f=LV(n,s,c),h=u(f);r.set(h,t[c]=TV(h,f))}return{c(){e=J("div");for(let c=0;c<t.length;c+=1)t[c].c();D(e,"class","links svelte-1fwphm1")},m(c,f){C(c,e,f);for(let h=0;h<t.length;h+=1)t[h].m(e,null);a=!0,o||(l=[Bl(i=ab.call(null,e,{items:n[0],flipDurationMs:_w,dropTargetStyle:{outline:"none"},dragDisabled:n[1]})),At(e,"finalize",n[6]),At(e,"consider",n[5])],o=!0)},p(c,f){if(f&23){s=c[0],we();for(let h=0;h<t.length;h+=1)t[h].r();t=Il(t,f,u,1,c,s,r,e,m7,TV,null,LV);for(let h=0;h<t.length;h+=1)t[h].a();ke()}i&&Mn(i.update)&&f&3&&i.update.call(null,{items:c[0],flipDurationMs:_w,dropTargetStyle:{outline:"none"},dragDisabled:c[1]})},i(c){if(!a){for(let f=0;f<s.length;f+=1)b(t[f]);a=!0}},o(c){for(let f=0;f<t.length;f+=1)$(t[f]);a=!1},d(c){c&&M(e);for(let f=0;f<t.length;f+=1)t[f].d();o=!1,Vi(l)}}}function TV(n,e){let t,r,i,a,o,l,s,u,c,f,h,m,_,y,w,A,E,T=mt,I,P,F;i=new dn({props:{name:"DragHandle",size:"XL"}});function j(K){e[9](K,e[13])}let q={placeholder:"Text"};e[13].text!==void 0&&(q.value=e[13].text),l=new En({props:q}),He.push(()=>nt(l,"value",j));function W(K){e[10](K,e[13])}let te={placeholder:"URL",options:e[2]};e[13].url!==void 0&&(te.value=e[13].url),c=new gp({props:te}),He.push(()=>nt(c,"value",W));function Q(K){e[11](K,e[13])}let oe={placeholder:"Minimum role"};e[13].roleId!==void 0&&(oe.value=e[13].roleId),m=new qz({props:oe}),He.push(()=>nt(m,"value",Q));function ie(){return e[12](e[13])}return w=new dn({props:{name:"Close",hoverable:!0,size:"S"}}),w.$on("click",ie),{key:n,first:null,c(){t=J("div"),r=J("div"),O(i.$$.fragment),o=U(),O(l.$$.fragment),u=U(),O(c.$$.fragment),h=U(),O(m.$$.fragment),y=U(),O(w.$$.fragment),A=U(),D(r,"class","handle svelte-1fwphm1"),D(r,"aria-label","drag-handle"),D(r,"style",a=e[1]?"cursor: grab":"cursor: grabbing"),D(t,"class","link svelte-1fwphm1"),this.first=t},m(K,G){C(K,t,G),x(t,r),H(i,r,null),x(t,o),H(l,t,null),x(t,u),H(c,t,null),x(t,h),H(m,t,null),x(t,y),H(w,t,null),x(t,A),I=!0,P||(F=At(r,"mousedown",e[8]),P=!0)},p(K,G){e=K,(!I||G&2&&a!==(a=e[1]?"cursor: grab":"cursor: grabbing"))&&D(r,"style",a);const ne={};!s&&G&1&&(s=!0,ne.value=e[13].text,rt(()=>s=!1)),l.$set(ne);const se={};G&4&&(se.options=e[2]),!f&&G&1&&(f=!0,se.value=e[13].url,rt(()=>f=!1)),c.$set(se);const pe={};!_&&G&1&&(_=!0,pe.value=e[13].roleId,rt(()=>_=!1)),m.$set(pe)},r(){E=t.getBoundingClientRect()},f(){h7(t),T()},a(){T(),T=d7(t,E,I7,{duration:_w})},i(K){I||(b(i.$$.fragment,K),b(l.$$.fragment,K),b(c.$$.fragment,K),b(m.$$.fragment,K),b(w.$$.fragment,K),I=!0)},o(K){$(i.$$.fragment,K),$(l.$$.fragment,K),$(c.$$.fragment,K),$(m.$$.fragment,K),$(w.$$.fragment,K),I=!1},d(K){K&&M(t),B(i),B(l),B(c),B(m),B(w),P=!1,F()}}}function yXe(n){let e;return{c(){e=le("Add Link")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function $Xe(n){var o;let e,t,r,i,a=((o=n[0])==null?void 0:o.length)&&EV(n);return r=new $n({props:{secondary:!0,icon:"Add",$$slots:{default:[yXe]},$$scope:{ctx:n}}}),r.$on("click",n[3]),{c(){a&&a.c(),e=U(),t=J("div"),O(r.$$.fragment)},m(l,s){a&&a.m(l,s),C(l,e,s),C(l,t,s),H(r,t,null),i=!0},p(l,s){var c;(c=l[0])!=null&&c.length?a?(a.p(l,s),s&1&&b(a,1)):(a=EV(l),a.c(),b(a,1),a.m(e.parentNode,e)):a&&(we(),$(a,1,1,()=>{a=null}),ke());const u={};s&65536&&(u.$$scope={dirty:s,ctx:l}),r.$set(u)},i(l){i||(b(a),b(r.$$.fragment,l),i=!0)},o(l){$(a),$(r.$$.fragment,l),i=!1},d(l){a&&a.d(l),l&&M(e),l&&M(t),B(r)}}}function wXe(n){let e,t,r;return t=new Rt({props:{noPadding:!0,gap:"S",$$slots:{default:[$Xe]},$$scope:{ctx:n}}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","container svelte-1fwphm1")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a&65543&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function kXe(n){let e,t;return e=new S4({props:{$$slots:{default:[wXe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&65543&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}const _w=150;function zXe(n,e,t){let r,i;Ne(n,Xt,w=>t(7,i=w));let{links:a=[]}=e,o=!0;const l=()=>{t(0,a=[...a,{}])},s=w=>{t(0,a=a.filter(A=>A.id!==w))},u=w=>{t(0,a=w.detail.items)},c=w=>{u(w),t(1,o=!0)},f=()=>t(1,o=!1);function h(w,A){n.$$.not_equal(A.text,w)&&(A.text=w,t(0,a))}function m(w,A){n.$$.not_equal(A.url,w)&&(A.url=w,t(0,a))}function _(w,A){n.$$.not_equal(A.roleId,w)&&(A.roleId=w,t(0,a))}const y=w=>s(w.id);return n.$$set=w=>{"links"in w&&t(0,a=w.links)},n.$$.update=()=>{n.$$.dirty&1&&a.forEach(w=>{w.id||(w.id=c2.exports.generate())}),n.$$.dirty&128&&t(2,r=i.screens.map(w=>{var A;return(A=w.routing)==null?void 0:A.route}).filter(w=>w!=null))},[a,o,r,l,s,u,c,i,f,h,m,_,y]}class AXe extends Re{constructor(e){super(),Ve(this,e,zXe,kXe,Oe,{links:0})}}function MXe(n){let e;return{c(){e=le("Configure links")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function CXe(n){let e;return{c(){e=le("Configure the links in your navigation bar.")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function SXe(n){let e;return{c(){e=le("Save")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function LXe(n){let e,t;return e=new $n({props:{cta:!0,slot:"buttons",$$slots:{default:[SXe]},$$scope:{ctx:n}}}),e.$on("click",n[3]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&128&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function EXe(n){let e,t,r;function i(o){n[4](o)}let a={slot:"body"};return n[1]!==void 0&&(a.links=n[1]),e=new AXe({props:a}),He.push(()=>nt(e,"links",i)),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){const s={};!t&&l&2&&(t=!0,s.links=o[1],rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function TXe(n){let e,t,r,i;e=new $n({props:{cta:!0,$$slots:{default:[MXe]},$$scope:{ctx:n}}}),e.$on("click",n[2]);let a={title:"Navigation Links",width:"calc(100% - 334px)",$$slots:{body:[EXe],buttons:[LXe],description:[CXe]},$$scope:{ctx:n}};return r=new Hf({props:a}),n[5](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),C(o,t,l),H(r,o,l),i=!0},p(o,[l]){const s={};l&128&&(s.$$scope={dirty:l,ctx:o}),e.$set(s);const u={};l&130&&(u.$$scope={dirty:l,ctx:o}),r.$set(u)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&M(t),n[5](null),B(r,o)}}}function DXe(n,e,t){let r;Ne(n,Xt,c=>t(6,r=c));let i,a;const o=()=>{t(1,a=z1.cloneDeep(r.navigation.links||[])),i.show()},l=async()=>{let c=r.navigation;c.links=a,await Xt.actions.navigation.save(c),i.hide()};function s(c){a=c,t(1,a)}function u(c){He[c?"unshift":"push"](()=>{i=c,t(0,i)})}return[i,a,o,l,s,u]}class HXe extends Re{constructor(e){super(),Ve(this,e,DXe,TXe,Oe,{})}}function BXe(n){let e;return{c(){e=le("Position")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function OXe(n){let e,t,r,i;return e=new Sr({props:{selected:n[0].navigation.navigation==="Top",quiet:n[0].navigation.navigation!=="Top",icon:"PaddingTop"}}),e.$on("click",n[2]),r=new Sr({props:{selected:n[0].navigation.navigation==="Left",quiet:n[0].navigation.navigation!=="Left",icon:"PaddingLeft"}}),r.$on("click",n[3]),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&1&&(l.selected=a[0].navigation.navigation==="Top"),o&1&&(l.quiet=a[0].navigation.navigation!=="Top"),e.$set(l);const s={};o&1&&(s.selected=a[0].navigation.navigation==="Left"),o&1&&(s.quiet=a[0].navigation.navigation!=="Left"),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function IXe(n){let e,t,r,i;return e=new un({props:{$$slots:{default:[BXe]},$$scope:{ctx:n}}}),r=new v7({props:{quiet:!0,$$slots:{default:[OXe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&4096&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&4097&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function DV(n){let e,t,r,i;return e=new ju({props:{text:"Sticky header",value:n[0].navigation.sticky}}),e.$on("change",n[4]),r=new mn({props:{label:"Width",options:["Max","Large","Medium","Small"],plaveholder:null,value:n[0].navigation.navWidth}}),r.$on("change",n[5]),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&1&&(l.value=a[0].navigation.sticky),e.$set(l);const s={};o&1&&(s.value=a[0].navigation.navWidth),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function HV(n){let e,t;return e=new En({props:{value:n[0].navigation.logoUrl,placeholder:"Add logo URL",updateOnChange:!1}}),e.$on("change",n[7]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&1&&(a.value=r[0].navigation.logoUrl),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function PXe(n){let e,t,r,i;e=new ju({props:{text:"Logo",value:!n[0].navigation.hideLogo}}),e.$on("change",n[6]);let a=!n[0].navigation.hideLogo&&HV(n);return{c(){O(e.$$.fragment),t=U(),a&&a.c(),r=$t()},m(o,l){H(e,o,l),C(o,t,l),a&&a.m(o,l),C(o,r,l),i=!0},p(o,l){const s={};l&1&&(s.value=!o[0].navigation.hideLogo),e.$set(s),o[0].navigation.hideLogo?a&&(we(),$(a,1,1,()=>{a=null}),ke()):a?(a.p(o,l),l&1&&b(a,1)):(a=HV(o),a.c(),b(a,1),a.m(r.parentNode,r))},i(o){i||(b(e.$$.fragment,o),b(a),i=!0)},o(o){$(e.$$.fragment,o),$(a),i=!1},d(o){B(e,o),o&&M(t),a&&a.d(o),o&&M(r)}}}function BV(n){let e,t;return e=new En({props:{value:n[0].navigation.title,placeholder:"Add title",updateOnChange:!1}}),e.$on("change",n[9]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&1&&(a.value=r[0].navigation.title),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function VXe(n){let e,t,r,i;e=new ju({props:{text:"Title",value:!n[0].navigation.hideTitle}}),e.$on("change",n[8]);let a=!n[0].navigation.hideTitle&&BV(n);return{c(){O(e.$$.fragment),t=U(),a&&a.c(),r=$t()},m(o,l){H(e,o,l),C(o,t,l),a&&a.m(o,l),C(o,r,l),i=!0},p(o,l){const s={};l&1&&(s.value=!o[0].navigation.hideTitle),e.$set(s),o[0].navigation.hideTitle?a&&(we(),$(a,1,1,()=>{a=null}),ke()):a?(a.p(o,l),l&1&&b(a,1)):(a=BV(o),a.c(),b(a,1),a.m(r.parentNode,r))},i(o){i||(b(e.$$.fragment,o),b(a),i=!0)},o(o){$(e.$$.fragment,o),$(a),i=!1},d(o){B(e,o),o&&M(t),a&&a.d(o),o&&M(r)}}}function RXe(n){let e;return{c(){e=le("Background color")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function NXe(n){let e,t,r,i;return e=new un({props:{$$slots:{default:[RXe]},$$scope:{ctx:n}}}),r=new y5({props:{spectrumTheme:n[0].theme,value:n[0].navigation.navBackground||fp.navBackground}}),r.$on("change",n[10]),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&4096&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&1&&(s.spectrumTheme=a[0].theme),o&1&&(s.value=a[0].navigation.navBackground||fp.navBackground),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function FXe(n){let e;return{c(){e=le("Text color")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function jXe(n){let e,t,r,i;return e=new un({props:{$$slots:{default:[FXe]},$$scope:{ctx:n}}}),r=new y5({props:{spectrumTheme:n[0].theme,value:n[0].navigation.navTextColor||fp.navTextColor}}),r.$on("change",n[11]),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&4096&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&1&&(s.spectrumTheme=a[0].theme),o&1&&(s.value=a[0].navigation.navTextColor||fp.navTextColor),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function xXe(n){let e,t,r,i,a,o,l,s,u,c,f,h,m;e=new HXe({}),r=new Rt({props:{noPadding:!0,gap:"XS",$$slots:{default:[IXe]},$$scope:{ctx:n}}});let _=n[0].navigation.navigation==="Top"&&DV(n);return o=new Rt({props:{noPadding:!0,gap:"XS",$$slots:{default:[PXe]},$$scope:{ctx:n}}}),s=new Rt({props:{noPadding:!0,gap:"XS",$$slots:{default:[VXe]},$$scope:{ctx:n}}}),c=new Rt({props:{noPadding:!0,gap:"XS",$$slots:{default:[NXe]},$$scope:{ctx:n}}}),h=new Rt({props:{noPadding:!0,gap:"XS",$$slots:{default:[jXe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),_&&_.c(),a=U(),O(o.$$.fragment),l=U(),O(s.$$.fragment),u=U(),O(c.$$.fragment),f=U(),O(h.$$.fragment)},m(y,w){H(e,y,w),C(y,t,w),H(r,y,w),C(y,i,w),_&&_.m(y,w),C(y,a,w),H(o,y,w),C(y,l,w),H(s,y,w),C(y,u,w),H(c,y,w),C(y,f,w),H(h,y,w),m=!0},p(y,w){const A={};w&4097&&(A.$$scope={dirty:w,ctx:y}),r.$set(A),y[0].navigation.navigation==="Top"?_?(_.p(y,w),w&1&&b(_,1)):(_=DV(y),_.c(),b(_,1),_.m(a.parentNode,a)):_&&(we(),$(_,1,1,()=>{_=null}),ke());const E={};w&4097&&(E.$$scope={dirty:w,ctx:y}),o.$set(E);const T={};w&4097&&(T.$$scope={dirty:w,ctx:y}),s.$set(T);const I={};w&4097&&(I.$$scope={dirty:w,ctx:y}),c.$set(I);const P={};w&4097&&(P.$$scope={dirty:w,ctx:y}),h.$set(P)},i(y){m||(b(e.$$.fragment,y),b(r.$$.fragment,y),b(_),b(o.$$.fragment,y),b(s.$$.fragment,y),b(c.$$.fragment,y),b(h.$$.fragment,y),m=!0)},o(y){$(e.$$.fragment,y),$(r.$$.fragment,y),$(_),$(o.$$.fragment,y),$(s.$$.fragment,y),$(c.$$.fragment,y),$(h.$$.fragment,y),m=!1},d(y){B(e,y),y&&M(t),B(r,y),y&&M(i),_&&_.d(y),y&&M(a),B(o,y),y&&M(l),B(s,y),y&&M(u),B(c,y),y&&M(f),B(h,y)}}}function UXe(n){let e,t;return e=new Rt({props:{paddingX:"L",paddingY:"XL",gap:"S",$$slots:{default:[xXe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4097&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function qXe(n){let e,t;return e=new W3({props:{title:"Navigation",borderRight:!0,$$slots:{default:[UXe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&4097&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function WXe(n,e,t){let r;Ne(n,Xt,y=>t(0,r=y));const i=async(y,w)=>{try{let A=r.navigation;A[y]=w,await Xt.actions.navigation.save(A)}catch{yt.error("Error updating navigation settings")}};return[r,i,()=>i("navigation","Top"),()=>i("navigation","Left"),y=>i("sticky",y.detail),y=>i("navWidth",y.detail),y=>i("hideLogo",!y.detail),y=>i("logoUrl",y.detail),y=>i("hideTitle",!y.detail),y=>i("title",y.detail),y=>i("navBackground",y.detail),y=>i("navTextColor",y.detail)]}class GXe extends Re{constructor(e){super(),Ve(this,e,WXe,qXe,Oe,{})}}function OV(n){let e,t;return e=new A6({props:{type:"warning",extraButtonText:"Detach custom layout",extraButtonAction:n[1],showCloseButton:!1,$$slots:{default:[YXe]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function YXe(n){let e;return{c(){e=le(`You can't preview your navigation settings using this screen as it uses
889
889
  a custom layout, which is deprecated`)},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function KXe(n){let e;return{c(){e=le("Your navigation is configured for all the screens within your app.")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function XXe(n){let e;return{c(){e=le(`You can hide and show your navigation for each screen in the screen
@@ -936,7 +936,7 @@ Use Save As... to download, then click back to return to this page.`)&&(location
936
936
  `),t=J("i"),i=le(r),a=le("?"),o=le(`
937
937
  This action cannot be undone.`)},m(l,s){C(l,e,s),C(l,t,s),x(t,i),x(t,a),C(l,o,s)},p(l,s){s&1&&r!==(r=l[0].name+"")&&_t(i,r)},d(l){l&&M(e),l&&M(t),l&&M(o)}}}function Nnt(n){let e,t,r,i,a,o;e=new Fu({props:{$$slots:{control:[Vnt],default:[Pnt]},$$scope:{ctx:n}}});let l={okText:"Delete Automation",onOk:n[3],title:"Confirm Deletion",$$slots:{default:[Rnt]},$$scope:{ctx:n}};r=new Os({props:l}),n[5](r);let s={automation:n[0]};return a=new Hnt({props:s}),n[6](a),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),O(a.$$.fragment)},m(u,c){H(e,u,c),C(u,t,c),H(r,u,c),C(u,i,c),H(a,u,c),o=!0},p(u,[c]){const f={};c&518&&(f.$$scope={dirty:c,ctx:u}),e.$set(f);const h={};c&513&&(h.$$scope={dirty:c,ctx:u}),r.$set(h);const m={};c&1&&(m.automation=u[0]),a.$set(m)},i(u){o||(b(e.$$.fragment,u),b(r.$$.fragment,u),b(a.$$.fragment,u),o=!0)},o(u){$(e.$$.fragment,u),$(r.$$.fragment,u),$(a.$$.fragment,u),o=!1},d(u){B(e,u),u&&M(t),n[5](null),B(r,u),u&&M(i),n[6](null),B(a,u)}}}function Fnt(n,e,t){let r,i;Ne(n,Or,h=>t(7,r=h)),Ne(n,si,h=>t(8,i=h));let{automation:a}=e,o,l;async function s(){try{await Or.actions.delete(a),yt.success("Automation deleted successfully"),i("../automate")}catch{yt.error("Error deleting automation")}}async function u(){try{await Or.actions.duplicate(a),yt.success("Automation has been duplicated successfully"),i(`./${r.selectedAutomation.automation._id}`)}catch{yt.error("Error duplicating automation")}}function c(h){He[h?"unshift":"push"](()=>{o=h,t(1,o)})}function f(h){He[h?"unshift":"push"](()=>{l=h,t(2,l)})}return n.$$set=h=>{"automation"in h&&t(0,a=h.automation)},[a,o,l,s,u,c,f]}class jnt extends Re{constructor(e){super(),Ve(this,e,Fnt,Nnt,Oe,{automation:0})}}function tN(n,e,t){const r=n.slice();return r[5]=e[t],r[7]=t,r}function xnt(n){let e,t,r;return e=new jnt({props:{automation:n[5]}}),{c(){O(e.$$.fragment),t=U()},m(i,a){H(e,i,a),C(i,t,a),r=!0},p(i,a){const o={};a&1&&(o.automation=i[5]),e.$set(o)},i(i){r||(b(e.$$.fragment,i),r=!0)},o(i){$(e.$$.fragment,i),r=!1},d(i){B(e,i),i&&M(t)}}}function nN(n){let e,t;function r(){return n[3](n[5])}return e=new M5({props:{border:n[7]>0,icon:"ShareAndroid",text:n[5].name,selected:n[5]._id===n[1],$$slots:{default:[xnt]},$$scope:{ctx:n}}}),e.$on("click",r),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){n=i;const o={};a&1&&(o.text=n[5].name),a&3&&(o.selected=n[5]._id===n[1]),a&257&&(o.$$scope={dirty:a,ctx:n}),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function Unt(n){let e,t,r=n[0].automations.sort(rN),i=[];for(let o=0;o<r.length;o+=1)i[o]=nN(tN(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){e=J("div");for(let o=0;o<i.length;o+=1)i[o].c();D(e,"class","automations-list svelte-g64vb")},m(o,l){C(o,e,l);for(let s=0;s<i.length;s+=1)i[s].m(e,null);t=!0},p(o,[l]){if(l&7){r=o[0].automations.sort(rN);let s;for(s=0;s<r.length;s+=1){const u=tN(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=nN(u),i[s].c(),b(i[s],1),i[s].m(e,null))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){o&&M(e),Dn(i,o)}}}const rN=n=>n.name;function qnt(n,e,t){let r,i,a;Ne(n,si,s=>t(4,i=s)),Ne(n,Or,s=>t(0,a=s)),ar(async()=>{try{await Or.actions.fetch()}catch{yt.error("Error getting automations list")}});function o(s){Or.actions.select(s),i(`./${s._id}`)}const l=s=>o(s);return n.$$.update=()=>{var s,u;n.$$.dirty&1&&t(1,r=(u=(s=a.selectedAutomation)==null?void 0:s.automation)==null?void 0:u._id)},[a,r,o,l]}class Wnt extends Re{constructor(e){super(),Ve(this,e,qnt,Unt,Oe,{})}}function iN(n,e,t){const r=n.slice();return r[17]=e[t][0],r[18]=e[t][1],r}function Gnt(n){let e;return{c(){e=le(`Please name your automation, then select a trigger. Every automation must
938
938
  start with a trigger.`)},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function Ynt(n){let e;return{c(){e=le("Triggers")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function Knt(n){let e=n[18].name+"",t;return{c(){t=le(e)},m(r,i){C(r,t,i)},p(r,i){i&8&&e!==(e=r[18].name+"")&&_t(t,e)},d(r){r&&M(t)}}}function aN(n){let e,t,r,i,a,o,l,s,u,c;r=new dn({props:{name:n[18].icon}}),o=new jt({props:{size:"S",$$slots:{default:[Knt]},$$scope:{ctx:n}}});function f(){return n[13](n[18])}return{c(){e=J("div"),t=J("div"),O(r.$$.fragment),i=U(),a=J("span"),O(o.$$.fragment),l=U(),D(a,"class","icon-spacing svelte-d3iboa"),D(t,"class","item-body svelte-d3iboa"),D(e,"class","item svelte-d3iboa"),De(e,"selected",n[2]===n[18].name)},m(h,m){C(h,e,m),x(e,t),H(r,t,null),x(t,i),x(t,a),H(o,a,null),x(e,l),s=!0,u||(c=At(e,"click",f),u=!0)},p(h,m){n=h;const _={};m&8&&(_.name=n[18].icon),r.$set(_);const y={};m&2097160&&(y.$$scope={dirty:m,ctx:n}),o.$set(y),m&12&&De(e,"selected",n[2]===n[18].name)},i(h){s||(b(r.$$.fragment,h),b(o.$$.fragment,h),s=!0)},o(h){$(r.$$.fragment,h),$(o.$$.fragment,h),s=!1},d(h){h&&M(e),B(r),B(o),u=!1,c()}}}function Xnt(n){let e,t,r,i;e=new jt({props:{size:"S",$$slots:{default:[Ynt]},$$scope:{ctx:n}}});let a=n[3],o=[];for(let s=0;s<a.length;s+=1)o[s]=aN(iN(n,a,s));const l=s=>$(o[s],1,1,()=>{o[s]=null});return{c(){O(e.$$.fragment),t=U(),r=J("div");for(let s=0;s<o.length;s+=1)o[s].c();D(r,"class","item-list svelte-d3iboa")},m(s,u){H(e,s,u),C(s,t,u),C(s,r,u);for(let c=0;c<o.length;c+=1)o[c].m(r,null);i=!0},p(s,u){const c={};if(u&2097152&&(c.$$scope={dirty:u,ctx:s}),e.$set(c),u&76){a=s[3];let f;for(f=0;f<a.length;f+=1){const h=iN(s,a,f);o[f]?(o[f].p(h,u),b(o[f],1)):(o[f]=aN(h),o[f].c(),b(o[f],1),o[f].m(r,null))}for(we(),f=a.length;f<o.length;f+=1)l(f);ke()}},i(s){if(!i){b(e.$$.fragment,s);for(let u=0;u<a.length;u+=1)b(o[u]);i=!0}},o(s){$(e.$$.fragment,s),o=o.filter(Boolean);for(let u=0;u<o.length;u+=1)$(o[u]);i=!1},d(s){B(e,s),s&&M(t),s&&M(r),Dn(o,s)}}}function Jnt(n){let e,t,r,i,a,o,l,s,u,c;e=new h_({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."}}),r=new jt({props:{size:"XS",$$slots:{default:[Gnt]},$$scope:{ctx:n}}});function f(_){n[10](_)}function h(_){n[11](_)}let m={label:"Name"};return n[0]!==void 0&&(m.value=n[0]),n[4]!==void 0&&(m.error=n[4]),a=new En({props:m}),He.push(()=>nt(a,"value",f)),He.push(()=>nt(a,"error",h)),a.$on("change",n[12]),u=new Rt({props:{noPadding:!0,$$slots:{default:[Xnt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),O(a.$$.fragment),s=U(),O(u.$$.fragment)},m(_,y){H(e,_,y),C(_,t,y),H(r,_,y),C(_,i,y),H(a,_,y),C(_,s,y),H(u,_,y),c=!0},p(_,y){const w={};y&2097152&&(w.$$scope={dirty:y,ctx:_}),r.$set(w);const A={};!o&&y&1&&(o=!0,A.value=_[0],rt(()=>o=!1)),!l&&y&16&&(l=!0,A.error=_[4],rt(()=>l=!1)),a.$set(A);const E={};y&2097164&&(E.$$scope={dirty:y,ctx:_}),u.$set(E)},i(_){c||(b(e.$$.fragment,_),b(r.$$.fragment,_),b(a.$$.fragment,_),b(u.$$.fragment,_),c=!0)},o(_){$(e.$$.fragment,_),$(r.$$.fragment,_),$(a.$$.fragment,_),$(u.$$.fragment,_),c=!1},d(_){B(e,_),_&&M(t),B(r,_),_&&M(i),B(a,_),_&&M(s),B(u,_)}}}function Znt(n){let e,t;return e=new _r({props:{title:"Create Automation",confirmText:"Save",size:"M",onConfirm:n[5],disabled:!n[2]||!n[0],$$slots:{default:[Jnt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&5&&(a.disabled=!r[2]||!r[0]),i&2097183&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Qnt(n,e,t){let r,i,a,o,l,s;Ne(n,Or,I=>t(8,o=I)),Ne(n,si,I=>t(16,l=I)),Ne(n,xd,I=>t(9,s=I));let u,c,f=!1,h,{webhookModal:m}=e;async function _(){var I;try{await Or.actions.create({name:u,instanceId:r});const P=o.selectedAutomation.constructBlock("TRIGGER",h.stepId,h);Or.actions.addBlockToAutomation(P),h.stepId===f6.WEBHOOK&&m.show,await Or.actions.save((I=o.selectedAutomation)==null?void 0:I.automation),yt.success(`Automation ${u} created`),l(`./${o.selectedAutomation.automation._id}`)}catch{yt.error("Error creating automation")}}const y=I=>{h=I,t(2,c=I.name)};function w(I){u=I,t(0,u)}function A(I){i=I,t(4,i),t(1,f),t(0,u)}const E=()=>t(1,f=!0),T=I=>y(I);return n.$$set=I=>{"webhookModal"in I&&t(7,m=I.webhookModal)},n.$$.update=()=>{n.$$.dirty&512&&(r=s._id),n.$$.dirty&3&&t(4,i=f&&!u?"Please specify a name for the automation.":null),n.$$.dirty&256&&t(3,a=Object.entries(o.blockDefinitions.TRIGGER))},[u,f,c,a,i,_,y,m,o,s,w,A,E,T]}class FX extends Re{constructor(e){super(),Ve(this,e,Qnt,Znt,Oe,{webhookModal:7})}}function ert(n){let e,t;return e=new FX({props:{webhookModal:n[1]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2&&(a.webhookModal=r[1]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function trt(n){let e,t,r,i;e=new Wnt({});let a={$$slots:{default:[ert]},$$scope:{ctx:n}};return r=new ir({props:a}),n[2](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),C(o,t,l),H(r,o,l),i=!0},p(o,l){const s={};l&10&&(s.$$scope={dirty:l,ctx:o}),r.$set(s)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&M(t),n[2](null),B(r,o)}}}function nrt(n){let e,t;return e=new F1({props:{title:"Automations",$$slots:{default:[trt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&11&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function rrt(n){let e,t,r,i,a,o;return t=new Y2({props:{selected:"Automations",$$slots:{default:[nrt]},$$scope:{ctx:n}}}),a=new dn({props:{hoverable:!0,name:"AddCircle"}}),a.$on("click",function(){Mn(n[0].show)&&n[0].show.apply(this,arguments)}),{c(){e=J("div"),O(t.$$.fragment),r=U(),i=J("div"),O(a.$$.fragment),D(i,"class","add-button svelte-mcmub4"),D(e,"class","title svelte-mcmub4")},m(l,s){C(l,e,s),H(t,e,null),x(e,r),x(e,i),H(a,i,null),o=!0},p(l,[s]){n=l;const u={};s&11&&(u.$$scope={dirty:s,ctx:n}),t.$set(u)},i(l){o||(b(t.$$.fragment,l),b(a.$$.fragment,l),o=!0)},o(l){$(t.$$.fragment,l),$(a.$$.fragment,l),o=!1},d(l){l&&M(e),B(t),B(a)}}}function irt(n,e,t){let{modal:r}=e,{webhookModal:i}=e;function a(o){He[o?"unshift":"push"](()=>{r=o,t(0,r)})}return n.$$set=o=>{"modal"in o&&t(0,r=o.modal),"webhookModal"in o&&t(1,i=o.webhookModal)},[r,i,a]}class art extends Re{constructor(e){super(),Ve(this,e,irt,rrt,Oe,{modal:0,webhookModal:1})}}function oN(n,e,t){const r=n.slice();return r[8]=e[t],r[10]=t,r}function lN(n){var u;let e,t,r,i,a;function o(c){n[6](c)}let l={showTestStatus:!0,block:n[8],isTrigger:n[10]===0,testResult:(u=n[2])==null?void 0:u[n[10]]};n[3]!==void 0&&(l.showParameters=n[3]),e=new NX({props:l}),He.push(()=>nt(e,"showParameters",o));let s=n[3]&&n[3][n[8].id]&&sN(n);return{c(){O(e.$$.fragment),r=U(),s&&s.c(),i=$t()},m(c,f){H(e,c,f),C(c,r,f),s&&s.m(c,f),C(c,i,f),a=!0},p(c,f){var m;const h={};f&2&&(h.block=c[8]),f&4&&(h.testResult=(m=c[2])==null?void 0:m[c[10]]),!t&&f&8&&(t=!0,h.showParameters=c[3],rt(()=>t=!1)),e.$set(h),c[3]&&c[3][c[8].id]?s?(s.p(c,f),f&10&&b(s,1)):(s=sN(c),s.c(),b(s,1),s.m(i.parentNode,i)):s&&(we(),$(s,1,1,()=>{s=null}),ke())},i(c){a||(b(e.$$.fragment,c),b(s),a=!0)},o(c){$(e.$$.fragment,c),$(s),a=!1},d(c){B(e,c),c&&M(r),s&&s.d(c),c&&M(i)}}}function sN(n){var s,u;let e,t,r,i,a,o;e=new di({props:{noMargin:!0}});let l=((u=(s=n[2])==null?void 0:s[n[10]])==null?void 0:u.outputs.iterations)&&uN(n);return a=new Y2({props:{noHorizPadding:!0,selected:"Input",$$slots:{default:[urt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),l&&l.c(),r=U(),i=J("div"),O(a.$$.fragment),D(i,"class","tabs svelte-1iblsnb")},m(c,f){H(e,c,f),C(c,t,f),l&&l.m(c,f),C(c,r,f),C(c,i,f),H(a,i,null),o=!0},p(c,f){var m,_;(_=(m=c[2])==null?void 0:m[c[10]])!=null&&_.outputs.iterations?l?(l.p(c,f),f&4&&b(l,1)):(l=uN(c),l.c(),b(l,1),l.m(r.parentNode,r)):l&&(we(),$(l,1,1,()=>{l=null}),ke());const h={};f&2052&&(h.$$scope={dirty:f,ctx:c}),a.$set(h)},i(c){o||(b(e.$$.fragment,c),b(l),b(a.$$.fragment,c),o=!0)},o(c){$(e.$$.fragment,c),$(l),$(a.$$.fragment,c),o=!1},d(c){B(e,c),c&&M(t),l&&l.d(c),c&&M(r),c&&M(i),B(a)}}}function uN(n){let e,t,r,i,a,o;return t=new dn({props:{name:"Reuse"}}),a=new un({props:{$$slots:{default:[ort]},$$scope:{ctx:n}}}),{c(){e=J("div"),O(t.$$.fragment),r=U(),i=J("div"),O(a.$$.fragment),yn(i,"margin-left","10px"),yn(e,"display","flex"),yn(e,"padding","10px 10px 0px 12px")},m(l,s){C(l,e,s),H(t,e,null),x(e,r),x(e,i),H(a,i,null),o=!0},p(l,s){const u={};s&2052&&(u.$$scope={dirty:s,ctx:l}),a.$set(u)},i(l){o||(b(t.$$.fragment,l),b(a.$$.fragment,l),o=!0)},o(l){$(t.$$.fragment,l),$(a.$$.fragment,l),o=!1},d(l){l&&M(e),B(t),B(a)}}}function ort(n){var a,o;let e,t=((o=(a=n[2])==null?void 0:a[n[10]])==null?void 0:o.outputs.iterations)+"",r,i;return{c(){e=le("This loop ran "),r=le(t),i=le(" times.")},m(l,s){C(l,e,s),C(l,r,s),C(l,i,s)},p(l,s){var u,c;s&4&&t!==(t=((c=(u=l[2])==null?void 0:u[l[10]])==null?void 0:c.outputs.iterations)+"")&&_t(r,t)},d(l){l&&M(e),l&&M(r),l&&M(i)}}}function lrt(n){var r,i;let e,t;return e=new F3({props:{minHeight:"80px",disabled:!0,value:Kv((i=(r=n[2])==null?void 0:r[n[10]])==null?void 0:i.inputs,"No input")}}),{c(){O(e.$$.fragment)},m(a,o){H(e,a,o),t=!0},p(a,o){var s,u;const l={};o&4&&(l.value=Kv((u=(s=a[2])==null?void 0:s[a[10]])==null?void 0:u.inputs,"No input")),e.$set(l)},i(a){t||(b(e.$$.fragment,a),t=!0)},o(a){$(e.$$.fragment,a),t=!1},d(a){B(e,a)}}}function srt(n){var r,i;let e,t;return e=new F3({props:{minHeight:"100px",disabled:!0,value:Kv((i=(r=n[2])==null?void 0:r[n[10]])==null?void 0:i.outputs,"No output")}}),{c(){O(e.$$.fragment)},m(a,o){H(e,a,o),t=!0},p(a,o){var s,u;const l={};o&4&&(l.value=Kv((u=(s=a[2])==null?void 0:s[a[10]])==null?void 0:u.outputs,"No output")),e.$set(l)},i(a){t||(b(e.$$.fragment,a),t=!0)},o(a){$(e.$$.fragment,a),t=!1},d(a){B(e,a)}}}function urt(n){let e,t,r,i;return e=new F1({props:{title:"Input",$$slots:{default:[lrt]},$$scope:{ctx:n}}}),r=new F1({props:{title:"Output",$$slots:{default:[srt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),C(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&2052&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&2052&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&M(t),B(r,a)}}}function cN(n){let e;return{c(){e=J("div"),D(e,"class","separator svelte-1iblsnb")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function fN(n){let e,t,r,i,a,o=n[8].stepId!==V3.LOOP&&lN(n),l=n[1].length-1!==n[10]&&cN();return{c(){e=J("div"),o&&o.c(),r=U(),l&&l.c(),i=$t(),D(e,"class","block svelte-1iblsnb"),D(e,"style",t=n[0]?`width: ${n[0]}`:"")},m(s,u){C(s,e,u),o&&o.m(e,null),C(s,r,u),l&&l.m(s,u),C(s,i,u),a=!0},p(s,u){s[8].stepId!==V3.LOOP?o?(o.p(s,u),u&2&&b(o,1)):(o=lN(s),o.c(),b(o,1),o.m(e,null)):o&&(we(),$(o,1,1,()=>{o=null}),ke()),(!a||u&1&&t!==(t=s[0]?`width: ${s[0]}`:""))&&D(e,"style",t),s[1].length-1!==s[10]?l||(l=cN(),l.c(),l.m(i.parentNode,i)):l&&(l.d(1),l=null)},i(s){a||(b(o),a=!0)},o(s){$(o),a=!1},d(s){s&&M(e),o&&o.d(),s&&M(r),l&&l.d(s),s&&M(i)}}}function crt(n){let e,t,r=n[1],i=[];for(let o=0;o<r.length;o+=1)i[o]=fN(oN(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){e=J("div");for(let o=0;o<i.length;o+=1)i[o].c();D(e,"class","container svelte-1iblsnb")},m(o,l){C(o,e,l);for(let s=0;s<i.length;s+=1)i[s].m(e,null);t=!0},p(o,[l]){if(l&15){r=o[1];let s;for(s=0;s<r.length;s+=1){const u=oN(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=fN(u),i[s].c(),b(i[s],1),i[s].m(e,null))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){o&&M(e),Dn(i,o)}}}function Kv(n,e){return n?JSON.stringify(n,null,2):e}function frt(n,e,t){let r,{automation:i}=e,{testResults:a}=e,{width:o="400px"}=e,l,s;function u(f){return f==null?void 0:f.steps.filter(h=>h.stepId!==V3.LOOP||[])}function c(f){l=f,t(3,l)}return n.$$set=f=>{"automation"in f&&t(4,i=f.automation),"testResults"in f&&t(5,a=f.testResults),"width"in f&&t(0,o=f.width)},n.$$.update=()=>{if(n.$$.dirty&32&&t(2,r=u(a)),n.$$.dirty&22){if(t(1,s=[]),i)i.definition.trigger&&s.push(i.definition.trigger),t(1,s=s.concat(i.definition.steps||[]).filter(f=>f.stepId!==V3.LOOP));else if(r){t(1,s=r||[]);let f=0;for(let h of s)h.id=f++}}},[o,s,r,l,i,a,c]}class jX extends Re{constructor(e){super(),Ve(this,e,frt,crt,Oe,{automation:4,testResults:5,width:0})}}function prt(n){let e,t,r,i,a,o,l,s,u,c,f,h,m;return r=new dn({props:{name:"MultipleCheck"}}),s=new dn({props:{hoverable:!0,name:"Close"}}),s.$on("click",n[4]),c=new di({}),h=new jX({props:{automation:n[0],testResults:n[2]}}),{c(){e=J("div"),t=J("div"),O(r.$$.fragment),i=U(),a=J("div"),a.textContent="Test Details",o=U(),l=J("div"),O(s.$$.fragment),u=U(),O(c.$$.fragment),f=U(),O(h.$$.fragment),yn(a,"padding-left","var(--spacing-l)"),D(t,"class","title-text svelte-nwwj95"),yn(l,"padding-right","var(--spacing-xl)"),D(e,"class","title svelte-nwwj95")},m(_,y){C(_,e,y),x(e,t),H(r,t,null),x(t,i),x(t,a),x(e,o),x(e,l),H(s,l,null),C(_,u,y),H(c,_,y),C(_,f,y),H(h,_,y),m=!0},p(_,[y]){const w={};y&1&&(w.automation=_[0]),y&4&&(w.testResults=_[2]),h.$set(w)},i(_){m||(b(r.$$.fragment,_),b(s.$$.fragment,_),b(c.$$.fragment,_),b(h.$$.fragment,_),m=!0)},o(_){$(r.$$.fragment,_),$(s.$$.fragment,_),$(c.$$.fragment,_),$(h.$$.fragment,_),m=!1},d(_){_&&M(e),B(r),B(s),_&&M(u),B(c,_),_&&M(f),B(h,_)}}}function drt(n,e,t){let r;Ne(n,Or,s=>t(1,r=s));let{automation:i}=e,a,o;const l=async()=>{G1(Or,r.showTestPanel=!1,r)};return n.$$set=s=>{"automation"in s&&t(0,i=s.automation)},n.$$.update=()=>{var s;n.$$.dirty&11&&(t(3,a=[]),i?(i.definition.trigger&&a.push(i.definition.trigger),t(3,a=a.concat(i.definition.steps||[]).filter(u=>u.stepId!==V3.LOOP))):r.selectedAutomation&&t(0,i=r.selectedAutomation)),n.$$.dirty&2&&t(2,o=(s=r.selectedAutomation)==null?void 0:s.testResults)},[i,r,o,a,l]}class hrt extends Re{constructor(e){super(),Ve(this,e,drt,prt,Oe,{automation:0})}}function mrt(n){let e,t,r,i;return r=new Rt({props:{gap:"S",justifyItems:"center",$$slots:{default:[yrt]},$$scope:{ctx:n}}}),{c(){e=J("div"),t=J("div"),O(r.$$.fragment),D(t,"class","main svelte-374m3f"),D(e,"class","centered svelte-374m3f")},m(a,o){C(a,e,o),x(e,t),H(r,t,null),i=!0},p(a,o){const l={};o&258&&(l.$$scope={dirty:o,ctx:a}),r.$set(l)},i(a){i||(b(r.$$.fragment,a),i=!0)},o(a){$(r.$$.fragment,a),i=!1},d(a){a&&M(e),B(r)}}}function grt(n){let e;const t=n[4].default,r=Xn(t,n,n[8],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a&256)&&Zn(r,t,i,i[8],e?Jn(t,i[8],a,null):Qn(i[8]),null)},i(i){e||(b(r,i),e=!0)},o(i){$(r,i),e=!1},d(i){r&&r.d(i)}}}function vrt(n){let e;return{c(){e=le("You have no automations")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function _rt(n){let e;return{c(){e=le("Let's fix that. Call the bots!")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function brt(n){let e;return{c(){e=le("Create automation")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function yrt(n){let e,t,r,i,a,o,l,s,u;return i=new Rn({props:{size:"M",$$slots:{default:[vrt]},$$scope:{ctx:n}}}),o=new jt({props:{size:"M",$$slots:{default:[_rt]},$$scope:{ctx:n}}}),s=new $n({props:{size:"M",cta:!0,$$slots:{default:[brt]},$$scope:{ctx:n}}}),s.$on("click",n[5]),{c(){e=lt("svg"),t=lt("use"),r=U(),O(i.$$.fragment),a=U(),O(o.$$.fragment),l=U(),O(s.$$.fragment),Gr(t,"xlink:href","#spectrum-icon-18-WorkflowAdd"),D(e,"width","60px"),D(e,"height","60px"),D(e,"class","spectrum-Icon"),D(e,"focusable","false")},m(c,f){C(c,e,f),x(e,t),C(c,r,f),H(i,c,f),C(c,a,f),H(o,c,f),C(c,l,f),H(s,c,f),u=!0},p(c,f){const h={};f&256&&(h.$$scope={dirty:f,ctx:c}),i.$set(h);const m={};f&256&&(m.$$scope={dirty:f,ctx:c}),o.$set(m);const _={};f&256&&(_.$$scope={dirty:f,ctx:c}),s.$set(_)},i(c){u||(b(i.$$.fragment,c),b(o.$$.fragment,c),b(s.$$.fragment,c),u=!0)},o(c){$(i.$$.fragment,c),$(o.$$.fragment,c),$(s.$$.fragment,c),u=!1},d(c){c&&M(e),c&&M(r),B(i,c),c&&M(a),B(o,c),c&&M(l),B(s,c)}}}function pN(n){let e,t,r;return t=new hrt({props:{automation:n[3]}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","setup svelte-374m3f")},m(i,a){C(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a&8&&(o.automation=i[3]),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),B(t)}}}function $rt(n){let e,t;return e=new FX({props:{webhookModal:n[2]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4&&(a.webhookModal=r[2]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function wrt(n){let e,t;return e=new Kz({}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function krt(n){let e,t,r,i,a,o,l,s,u,c,f,h,m;r=new art({props:{modal:n[1],webhookModal:n[2]}});const _=[grt,mrt],y=[];function w(I,P){return I[3]?0:1}o=w(n),l=y[o]=_[o](n);let A=n[0].showTestPanel&&pN(n),E={$$slots:{default:[$rt]},$$scope:{ctx:n}};c=new ir({props:E}),n[6](c);let T={width:"30%",$$slots:{default:[wrt]},$$scope:{ctx:n}};return h=new ir({props:T}),n[7](h),{c(){e=J("div"),t=J("div"),O(r.$$.fragment),i=U(),a=J("div"),l.c(),s=U(),A&&A.c(),u=U(),O(c.$$.fragment),f=U(),O(h.$$.fragment),D(t,"class","nav svelte-374m3f"),D(a,"class","content svelte-374m3f"),D(e,"class","root svelte-374m3f")},m(I,P){C(I,e,P),x(e,t),H(r,t,null),x(e,i),x(e,a),y[o].m(a,null),x(e,s),A&&A.m(e,null),x(e,u),H(c,e,null),x(e,f),H(h,e,null),m=!0},p(I,[P]){const F={};P&2&&(F.modal=I[1]),P&4&&(F.webhookModal=I[2]),r.$set(F);let j=o;o=w(I),o===j?y[o].p(I,P):(we(),$(y[j],1,1,()=>{y[j]=null}),ke(),l=y[o],l?l.p(I,P):(l=y[o]=_[o](I),l.c()),b(l,1),l.m(a,null)),I[0].showTestPanel?A?(A.p(I,P),P&1&&b(A,1)):(A=pN(I),A.c(),b(A,1),A.m(e,u)):A&&(we(),$(A,1,1,()=>{A=null}),ke());const q={};P&260&&(q.$$scope={dirty:P,ctx:I}),c.$set(q);const W={};P&256&&(W.$$scope={dirty:P,ctx:I}),h.$set(W)},i(I){m||(b(r.$$.fragment,I),b(l),b(A),b(c.$$.fragment,I),b(h.$$.fragment,I),m=!0)},o(I){$(r.$$.fragment,I),$(l),$(A),$(c.$$.fragment,I),$(h.$$.fragment,I),m=!1},d(I){I&&M(e),B(r),y[o].d(),A&&A.d(),n[6](null),B(c),n[7](null),B(h)}}}function zrt(n,e,t){let r,i;Ne(n,Or,h=>t(0,i=h));let{$$slots:a={},$$scope:o}=e,l,s;ar(()=>{G1(Or,i.showTestPanel=!1,i)});const u=()=>l.show();function c(h){He[h?"unshift":"push"](()=>{l=h,t(1,l)})}function f(h){He[h?"unshift":"push"](()=>{s=h,t(2,s)})}return n.$$set=h=>{"$$scope"in h&&t(8,o=h.$$scope)},n.$$.update=()=>{var h;n.$$.dirty&1&&t(3,r=((h=i.selectedAutomation)==null?void 0:h.automation)||i.automations[0])},[i,l,s,r,a,u,c,f,o]}class Art extends Re{constructor(e){super(),Ve(this,e,zrt,krt,Oe,{})}}function Mrt(n){let e,t,r,i,a,o,l;function s(c){n[4](c)}let u={};return n[2]!==void 0&&(u.value=n[2]),a=new En({props:u}),He.push(()=>nt(a,"value",s)),{c(){e=J("span"),e.textContent=`The changes you have made will be deleted and the application reverted
939
- back to its production state.`,t=U(),r=J("span"),r.textContent="Please enter your app name to continue.",i=U(),O(a.$$.fragment)},m(c,f){C(c,e,f),C(c,t,f),C(c,r,f),C(c,i,f),H(a,c,f),l=!0},p(c,f){const h={};!o&&f&4&&(o=!0,h.value=c[2],rt(()=>o=!1)),a.$set(h)},i(c){l||(b(a.$$.fragment,c),l=!0)},o(c){$(a.$$.fragment,c),l=!1},d(c){c&&M(e),c&&M(t),c&&M(r),c&&M(i),B(a,c)}}}function Crt(n){let e,t;return e=new _r({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:n[3],disabled:n[2]!==n[0].name,$$slots:{default:[Mrt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&5&&(a.disabled=r[2]!==r[0].name),i&132&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Srt(n){let e,t,r,i;e=new dn({props:{name:"Revert",hoverable:!0,tooltip:"Revert changes",dataCy:"revert-application-topnav"}}),e.$on("click",function(){Mn(n[1].show)&&n[1].show.apply(this,arguments)});let a={$$slots:{default:[Crt]},$$scope:{ctx:n}};return r=new ir({props:a}),n[5](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),C(o,t,l),H(r,o,l),i=!0},p(o,[l]){n=o;const s={};l&133&&(s.$$scope={dirty:l,ctx:n}),r.$set(s)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&M(t),n[5](null),B(r,o)}}}function Lrt(n,e,t){let r,i;Ne(n,Xt,c=>t(0,i=c));let a,o;const l=async()=>{try{await nn.revertAppChanges(r);const c=await nn.fetchAppPackage(r);await Xt.actions.initialise(c),yt.info("Changes reverted successfully")}catch(c){yt.error(`Error reverting changes: ${c}`)}};function s(c){o=c,t(2,o)}function u(c){He[c?"unshift":"push"](()=>{a=c,t(1,a)})}return n.$$.update=()=>{n.$$.dirty&1&&(r=i.appId)},[i,a,o,l,s,u]}class Ert extends Re{constructor(e){super(),Ve(this,e,Lrt,Srt,Oe,{})}}const Trt="@budibase/client",Drt="2.0.30-alpha.12",Hrt="MPL-2.0",Brt="dist/budibase-client.js",Ort="dist/budibase-client.js",Irt="module",Prt="src/index.js",Vrt={".":{import:"./dist/budibase-client.js",require:"./dist/budibase-client.js"},"./package.json":"./package.json","./manifest.json":"./manifest.json"},Rrt={build:"rollup -c","dev:builder":"rollup -cw"},Nrt={"@budibase/bbui":"2.0.30-alpha.12","@budibase/frontend-core":"2.0.30-alpha.12","@budibase/string-templates":"2.0.30-alpha.12","@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",downloadjs:"1.4.7","html5-qrcode":"^2.2.1",leaflet:"^1.7.1",regexparam:"^1.3.0","sanitize-html":"^2.7.0",screenfull:"^6.0.1",shortid:"^2.2.15","socket.io-client":"^4.5.1",svelte:"^3.49.0","svelte-apexcharts":"^1.0.2","svelte-flatpickr":"^3.1.0","svelte-spa-router":"^3.0.5"},Frt={"@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-polyfill-node":"^0.8.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"},jrt="d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",Dd={name:Trt,version:Drt,license:Hrt,module:Brt,main:Ort,type:Irt,svelte:Prt,exports:Vrt,scripts:Rrt,dependencies:Nrt,devDependencies:Frt,gitHead:jrt};function dN(n){let e,t;return e=new j3({props:{hoverable:!0,notice:!0,$$slots:{default:[xrt]},$$scope:{ctx:n}}}),e.$on("click",function(){Mn(n[2].show)&&n[2].show.apply(this,arguments)}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){n=r;const a={};i&4096&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function xrt(n){let e;return{c(){e=le("Update available")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function Urt(n){let e,t;return e=new jt({props:{size:"S",$$slots:{default:[Wrt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4098&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function qrt(n){let e,t;return e=new jt({props:{size:"S",$$slots:{default:[Grt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4098&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Wrt(n){let e,t,r=n[1].version+"",i,a;return{c(){e=le("This app is currently using version "),t=J("b"),i=le(r),a=le(` which is the
939
+ back to its production state.`,t=U(),r=J("span"),r.textContent="Please enter your app name to continue.",i=U(),O(a.$$.fragment)},m(c,f){C(c,e,f),C(c,t,f),C(c,r,f),C(c,i,f),H(a,c,f),l=!0},p(c,f){const h={};!o&&f&4&&(o=!0,h.value=c[2],rt(()=>o=!1)),a.$set(h)},i(c){l||(b(a.$$.fragment,c),l=!0)},o(c){$(a.$$.fragment,c),l=!1},d(c){c&&M(e),c&&M(t),c&&M(r),c&&M(i),B(a,c)}}}function Crt(n){let e,t;return e=new _r({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:n[3],disabled:n[2]!==n[0].name,$$slots:{default:[Mrt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&5&&(a.disabled=r[2]!==r[0].name),i&132&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Srt(n){let e,t,r,i;e=new dn({props:{name:"Revert",hoverable:!0,tooltip:"Revert changes",dataCy:"revert-application-topnav"}}),e.$on("click",function(){Mn(n[1].show)&&n[1].show.apply(this,arguments)});let a={$$slots:{default:[Crt]},$$scope:{ctx:n}};return r=new ir({props:a}),n[5](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),C(o,t,l),H(r,o,l),i=!0},p(o,[l]){n=o;const s={};l&133&&(s.$$scope={dirty:l,ctx:n}),r.$set(s)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&M(t),n[5](null),B(r,o)}}}function Lrt(n,e,t){let r,i;Ne(n,Xt,c=>t(0,i=c));let a,o;const l=async()=>{try{await nn.revertAppChanges(r);const c=await nn.fetchAppPackage(r);await Xt.actions.initialise(c),yt.info("Changes reverted successfully")}catch(c){yt.error(`Error reverting changes: ${c}`)}};function s(c){o=c,t(2,o)}function u(c){He[c?"unshift":"push"](()=>{a=c,t(1,a)})}return n.$$.update=()=>{n.$$.dirty&1&&(r=i.appId)},[i,a,o,l,s,u]}class Ert extends Re{constructor(e){super(),Ve(this,e,Lrt,Srt,Oe,{})}}const Trt="@budibase/client",Drt="2.0.30-alpha.13",Hrt="MPL-2.0",Brt="dist/budibase-client.js",Ort="dist/budibase-client.js",Irt="module",Prt="src/index.js",Vrt={".":{import:"./dist/budibase-client.js",require:"./dist/budibase-client.js"},"./package.json":"./package.json","./manifest.json":"./manifest.json"},Rrt={build:"rollup -c","dev:builder":"rollup -cw"},Nrt={"@budibase/bbui":"2.0.30-alpha.13","@budibase/frontend-core":"2.0.30-alpha.13","@budibase/string-templates":"2.0.30-alpha.13","@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",downloadjs:"1.4.7","html5-qrcode":"^2.2.1",leaflet:"^1.7.1",regexparam:"^1.3.0","sanitize-html":"^2.7.0",screenfull:"^6.0.1",shortid:"^2.2.15","socket.io-client":"^4.5.1",svelte:"^3.49.0","svelte-apexcharts":"^1.0.2","svelte-flatpickr":"^3.1.0","svelte-spa-router":"^3.0.5"},Frt={"@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-polyfill-node":"^0.8.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"},jrt="d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",Dd={name:Trt,version:Drt,license:Hrt,module:Brt,main:Ort,type:Irt,svelte:Prt,exports:Vrt,scripts:Rrt,dependencies:Nrt,devDependencies:Frt,gitHead:jrt};function dN(n){let e,t;return e=new j3({props:{hoverable:!0,notice:!0,$$slots:{default:[xrt]},$$scope:{ctx:n}}}),e.$on("click",function(){Mn(n[2].show)&&n[2].show.apply(this,arguments)}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){n=r;const a={};i&4096&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function xrt(n){let e;return{c(){e=le("Update available")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function Urt(n){let e,t;return e=new jt({props:{size:"S",$$slots:{default:[Wrt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4098&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function qrt(n){let e,t;return e=new jt({props:{size:"S",$$slots:{default:[Grt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4098&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Wrt(n){let e,t,r=n[1].version+"",i,a;return{c(){e=le("This app is currently using version "),t=J("b"),i=le(r),a=le(` which is the
940
940
  latest version available.`)},m(o,l){C(o,e,l),C(o,t,l),x(t,i),C(o,a,l)},p(o,l){l&2&&r!==(r=o[1].version+"")&&_t(i,r)},d(o){o&&M(e),o&&M(t),o&&M(a)}}}function Grt(n){let e,t,r=n[1].version+"",i,a,o,l;return{c(){e=le("This app is currently using version "),t=J("b"),i=le(r),a=le(`, but version
941
941
  `),o=J("b"),o.textContent=`${Dd.version}`,l=le(` is available. Updates can contain new features,
942
942
  performance improvements and bug fixes.`)},m(s,u){C(s,e,u),C(s,t,u),x(t,i),C(s,a,u),C(s,o,u),C(s,l,u)},p(s,u){u&2&&r!==(r=s[1].version+"")&&_t(i,r)},d(s){s&&M(e),s&&M(t),s&&M(a),s&&M(o),s&&M(l)}}}function hN(n){let e,t;return e=new jt({props:{size:"S",$$slots:{default:[Yrt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4098&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Yrt(n){let e,t,r=n[1].revertableVersion+"",i,a;return{c(){e=le(`You can revert this app to version