@budibase/server 2.8.18-alpha.3 → 2.8.18-alpha.4

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.
@@ -1844,7 +1844,7 @@ Use Save As... to download, then click back to return to this page.`)&&(location
1844
1844
  Take note of these passwords or download the CSV file.`)},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_1$c(n1){let e1;return{c(){e1=text("Passwords CSV")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot$e(n1){let e1,t1,r1,o1=n1[1]&&create_if_block_1$7(n1),i1=n1[0]&&create_if_block$c(n1);return{c(){o1&&o1.c(),e1=space$1(),i1&&i1.c(),t1=empty$1()},m(a1,s1){o1&&o1.m(a1,s1),insert$1(a1,e1,s1),i1&&i1.m(a1,s1),insert$1(a1,t1,s1),r1=!0},p(a1,s1){a1[1]?o1?(o1.p(a1,s1),s1&2&&transition_in(o1,1)):(o1=create_if_block_1$7(a1),o1.c(),transition_in(o1,1),o1.m(e1.parentNode,e1)):o1&&(group_outros(),transition_out(o1,1,1,()=>{o1=null}),check_outros()),a1[0]?i1?(i1.p(a1,s1),s1&1&&transition_in(i1,1)):(i1=create_if_block$c(a1),i1.c(),transition_in(i1,1),i1.m(t1.parentNode,t1)):i1&&(group_outros(),transition_out(i1,1,1,()=>{i1=null}),check_outros())},i(a1){r1||(transition_in(o1),transition_in(i1),r1=!0)},o(a1){transition_out(o1),transition_out(i1),r1=!1},d(a1){o1&&o1.d(a1),a1&&detach(e1),i1&&i1.d(a1),a1&&detach(t1)}}}function create_fragment$i(n1){let e1,t1;return e1=new ModalContent({props:{size:"L",title:n1[2],confirmText:"Done",showCancelButton:!1,cancelText:"Cancel",showCloseIcon:!1,$$slots:{default:[create_default_slot$e]},$$scope:{ctx:n1}}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,[o1]){const i1={};o1&4&&(i1.title=r1[2]),o1&65595&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function instance$j(n1,e1,t1){let{userData:r1}=e1,{createUsersResponse:o1}=e1,i1,a1,s1,l1,c1,u1,f1;const p1=()=>{i1?t1(2,s1="Users created!"):a1&&t1(2,s1="Oops!")},d1=()=>{i1?t1(3,l1="However there was a problem creating some users."):t1(3,l1="There was a problem creating some users.")},m1=()=>{c1=r1.reduce((v1,k1)=>(v1[k1.email]=k1,v1),{}),t1(4,u1=o1.successful.map(v1=>({email:v1.email,password:c1[v1.email].password}))),t1(5,f1=o1.unsuccessful.map(v1=>({email:v1.email,reason:v1.reason})))};onMount(()=>{t1(0,i1=o1.successful.length),t1(1,a1=o1.unsuccessful.length),p1(),d1(),m1()});const _1={email:{},password:{}},h1={email:{},reason:{}},b1=()=>{const v1="passwords.csv",k1=parseToCsv(["email","password"],u1);$1(v1,k1)},$1=(v1,k1)=>{const S1=document.createElement("a");S1.setAttribute("href","data:text/csv;charset=utf-8,"+encodeURIComponent(k1)),S1.setAttribute("download",v1),S1.style.display="none",document.body.appendChild(S1),S1.click(),document.body.removeChild(S1)};return n1.$$set=v1=>{"userData"in v1&&t1(9,r1=v1.userData),"createUsersResponse"in v1&&t1(10,o1=v1.createUsersResponse)},[i1,a1,s1,l1,u1,f1,_1,h1,b1,r1,o1]}class PasswordModal extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$j,create_fragment$i,safe_not_equal,{userData:9,createUsersResponse:10})}}function create_if_block_1$6(n1){let e1,t1;return e1=new Body({props:{size:"XS",$$slots:{default:[create_default_slot_2$7]},$$scope:{ctx:n1}}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_2$7(n1){let e1;return{c(){e1=text(`Your users should now receive an email invite to get access to their
1845
1845
  Budibase account`)},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_if_block$b(n1){let e1,t1,r1,o1;return e1=new Body({props:{size:"XS",$$slots:{default:[create_default_slot_1$b]},$$scope:{ctx:n1}}}),r1=new Table$1({props:{schema:n1[5],data:n1[4],allowEditColumns:!1,allowEditRows:!1,allowSelectRows:!1,customRenderers:[{column:"reason",component:InviteResponseRenderer}]}}),{c(){create_component(e1.$$.fragment),t1=space$1(),create_component(r1.$$.fragment)},m(i1,a1){mount_component(e1,i1,a1),insert$1(i1,t1,a1),mount_component(r1,i1,a1),o1=!0},p(i1,a1){const s1={};a1&1032&&(s1.$$scope={dirty:a1,ctx:i1}),e1.$set(s1);const l1={};a1&16&&(l1.data=i1[4]),r1.$set(l1)},i(i1){o1||(transition_in(e1.$$.fragment,i1),transition_in(r1.$$.fragment,i1),o1=!0)},o(i1){transition_out(e1.$$.fragment,i1),transition_out(r1.$$.fragment,i1),o1=!1},d(i1){destroy_component(e1,i1),i1&&detach(t1),destroy_component(r1,i1)}}}function create_default_slot_1$b(n1){let e1;return{c(){e1=text(n1[3])},m(t1,r1){insert$1(t1,e1,r1)},p(t1,r1){r1&8&&set_data(e1,t1[3])},d(t1){t1&&detach(e1)}}}function create_default_slot$d(n1){let e1,t1,r1,o1=n1[0]&&create_if_block_1$6(n1),i1=n1[1]&&create_if_block$b(n1);return{c(){o1&&o1.c(),e1=space$1(),i1&&i1.c(),t1=empty$1()},m(a1,s1){o1&&o1.m(a1,s1),insert$1(a1,e1,s1),i1&&i1.m(a1,s1),insert$1(a1,t1,s1),r1=!0},p(a1,s1){a1[0]?o1?s1&1&&transition_in(o1,1):(o1=create_if_block_1$6(a1),o1.c(),transition_in(o1,1),o1.m(e1.parentNode,e1)):o1&&(group_outros(),transition_out(o1,1,1,()=>{o1=null}),check_outros()),a1[1]?i1?(i1.p(a1,s1),s1&2&&transition_in(i1,1)):(i1=create_if_block$b(a1),i1.c(),transition_in(i1,1),i1.m(t1.parentNode,t1)):i1&&(group_outros(),transition_out(i1,1,1,()=>{i1=null}),check_outros())},i(a1){r1||(transition_in(o1),transition_in(i1),r1=!0)},o(a1){transition_out(o1),transition_out(i1),r1=!1},d(a1){o1&&o1.d(a1),a1&&detach(e1),i1&&i1.d(a1),a1&&detach(t1)}}}function create_fragment$h(n1){let e1,t1;return e1=new ModalContent({props:{size:"L",showCancelButton:!1,title:n1[2],confirmText:"Done",$$slots:{default:[create_default_slot$d]},$$scope:{ctx:n1}}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,[o1]){const i1={};o1&4&&(i1.title=r1[2]),o1&1051&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function instance$i(n1,e1,t1){let{inviteUsersResponse:r1}=e1,o1,i1,a1,s1,l1;const c1=()=>{o1?t1(2,a1="Users invited!"):i1&&t1(2,a1="Oops!")},u1=()=>{o1?t1(3,s1="However there was a problem inviting some users."):t1(3,s1="There was a problem inviting users.")},f1=()=>{t1(4,l1=r1.unsuccessful.map(d1=>({email:d1.email,reason:d1.reason})))};onMount(()=>{t1(0,o1=r1.successful.length),t1(1,i1=r1.unsuccessful.length),c1(),u1(),f1()});const p1={email:{},reason:{}};return n1.$$set=d1=>{"inviteUsersResponse"in d1&&t1(6,r1=d1.inviteUsersResponse)},[o1,i1,a1,s1,l1,p1,r1]}class InvitedModal extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$i,create_fragment$h,safe_not_equal,{inviteUsersResponse:6})}}const ImportUsersModal_svelte_svelte_type_style_lang="";function create_default_slot_1$a(n1){let e1;return{c(){e1=text("Import your users email addresses from a CSV file")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_else_block$4(n1){let e1;return{c(){e1=text("Upload")},m(t1,r1){insert$1(t1,e1,r1)},p:noop$5,d(t1){t1&&detach(e1)}}}function create_if_block_2$3(n1){let e1=n1[5][0].name+"",t1;return{c(){t1=text(e1)},m(r1,o1){insert$1(r1,t1,o1)},p(r1,o1){o1&32&&e1!==(e1=r1[5][0].name+"")&&set_data(t1,e1)},d(r1){r1&&detach(t1)}}}function create_if_block_1$5(n1){let e1,t1,r1,o1=capitalise(n1[4].license.plan.type)+"",i1,a1,s1=n1[4].userLimit+"",l1,c1,u1;return t1=new Icon({props:{name:"Info"}}),{c(){e1=element("div"),create_component(t1.$$.fragment),r1=space$1(),i1=text(o1),a1=text(" plan is limited to "),l1=text(s1),c1=text(`
1846
1846
  users. Upgrade your plan to add more users`),attr(e1,"class","user-notification svelte-86xxnk")},m(f1,p1){insert$1(f1,e1,p1),mount_component(t1,e1,null),append$1(e1,r1),append$1(e1,i1),append$1(e1,a1),append$1(e1,l1),append$1(e1,c1),u1=!0},p(f1,p1){(!u1||p1&16)&&o1!==(o1=capitalise(f1[4].license.plan.type)+"")&&set_data(i1,o1),(!u1||p1&16)&&s1!==(s1=f1[4].userLimit+"")&&set_data(l1,s1)},i(f1){u1||(transition_in(t1.$$.fragment,f1),u1=!0)},o(f1){transition_out(t1.$$.fragment,f1),u1=!1},d(f1){f1&&detach(e1),destroy_component(t1)}}}function create_if_block$a(n1){let e1,t1,r1;function o1(a1){n1[12](a1)}let i1={placeholder:"No groups",label:"Groups",options:n1[8],getOptionLabel:func$1,getOptionValue:func_1$1};return n1[6]!==void 0&&(i1.value=n1[6]),e1=new Multiselect_1({props:i1}),binding_callbacks.push(()=>bind$3(e1,"value",o1)),{c(){create_component(e1.$$.fragment)},m(a1,s1){mount_component(e1,a1,s1),r1=!0},p(a1,s1){const l1={};s1&256&&(l1.options=a1[8]),!t1&&s1&64&&(t1=!0,l1.value=a1[6],add_flush_callback(()=>t1=!1)),e1.$set(l1)},i(a1){r1||(transition_in(e1.$$.fragment,a1),r1=!0)},o(a1){transition_out(e1.$$.fragment,a1),r1=!1},d(a1){destroy_component(e1,a1)}}}function create_default_slot$c(n1){let e1,t1,r1,o1,i1,a1,s1,l1,c1,u1,f1,p1,d1,m1,_1;e1=new Body({props:{size:"S",$$slots:{default:[create_default_slot_1$a]},$$scope:{ctx:n1}}});function h1(A1,E1){return A1[5][0]?create_if_block_2$3:create_else_block$4}let b1=h1(n1),$1=b1(n1),v1=n1[3]&&create_if_block_1$5(n1);function k1(A1){n1[11](A1)}let S1={options:BuilderRoleDescriptions};n1[2]!==void 0&&(S1.value=n1[2]),c1=new RadioGroup_1({props:S1}),binding_callbacks.push(()=>bind$3(c1,"value",k1));let C1=n1[4].groupsEnabled&&create_if_block$a(n1);return{c(){create_component(e1.$$.fragment),t1=space$1(),r1=element("div"),o1=element("input"),i1=space$1(),a1=element("label"),$1.c(),s1=space$1(),v1&&v1.c(),l1=space$1(),create_component(c1.$$.fragment),f1=space$1(),C1&&C1.c(),p1=empty$1(),attr(o1,"id","file-upload"),attr(o1,"accept",".csv"),attr(o1,"type","file"),attr(o1,"class","svelte-86xxnk"),attr(a1,"for","file-upload"),attr(a1,"class","svelte-86xxnk"),toggle_class(a1,"uploaded",n1[5][0]),attr(r1,"class","dropzone svelte-86xxnk")},m(A1,E1){mount_component(e1,A1,E1),insert$1(A1,t1,E1),insert$1(A1,r1,E1),append$1(r1,o1),append$1(r1,i1),append$1(r1,a1),$1.m(a1,null),insert$1(A1,s1,E1),v1&&v1.m(A1,E1),insert$1(A1,l1,E1),mount_component(c1,A1,E1),insert$1(A1,f1,E1),C1&&C1.m(A1,E1),insert$1(A1,p1,E1),d1=!0,m1||(_1=listen(o1,"change",n1[9]),m1=!0)},p(A1,E1){const z1={};E1&524288&&(z1.$$scope={dirty:E1,ctx:A1}),e1.$set(z1),b1===(b1=h1(A1))&&$1?$1.p(A1,E1):($1.d(1),$1=b1(A1),$1&&($1.c(),$1.m(a1,null))),(!d1||E1&32)&&toggle_class(a1,"uploaded",A1[5][0]),A1[3]?v1?(v1.p(A1,E1),E1&8&&transition_in(v1,1)):(v1=create_if_block_1$5(A1),v1.c(),transition_in(v1,1),v1.m(l1.parentNode,l1)):v1&&(group_outros(),transition_out(v1,1,1,()=>{v1=null}),check_outros());const I1={};!u1&&E1&4&&(u1=!0,I1.value=A1[2],add_flush_callback(()=>u1=!1)),c1.$set(I1),A1[4].groupsEnabled?C1?(C1.p(A1,E1),E1&16&&transition_in(C1,1)):(C1=create_if_block$a(A1),C1.c(),transition_in(C1,1),C1.m(p1.parentNode,p1)):C1&&(group_outros(),transition_out(C1,1,1,()=>{C1=null}),check_outros())},i(A1){d1||(transition_in(e1.$$.fragment,A1),transition_in(v1),transition_in(c1.$$.fragment,A1),transition_in(C1),d1=!0)},o(A1){transition_out(e1.$$.fragment,A1),transition_out(v1),transition_out(c1.$$.fragment,A1),transition_out(C1),d1=!1},d(A1){destroy_component(e1,A1),A1&&detach(t1),A1&&detach(r1),$1.d(),A1&&detach(s1),v1&&v1.d(A1),A1&&detach(l1),destroy_component(c1,A1),A1&&detach(f1),C1&&C1.d(A1),A1&&detach(p1),m1=!1,_1()}}}function create_fragment$g(n1){let e1,t1;return e1=new ModalContent({props:{size:"M",title:"Import users",confirmText:"Done",cancelText:"Cancel",showCloseIcon:!1,onConfirm:n1[13],disabled:n1[7],$$slots:{default:[create_default_slot$c]},$$scope:{ctx:n1}}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,[o1]){const i1={};o1&71&&(i1.onConfirm=r1[13]),o1&128&&(i1.disabled=r1[7]),o1&524668&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}const BYTES_IN_MB=1e6,MAX_USERS_UPLOAD_LIMIT=1e3,func$1=n1=>n1.name,func_1$1=n1=>n1._id;function instance$h(n1,e1,t1){let r1,o1,i1,a1,s1,l1,c1;component_subscribe(n1,admin,C1=>t1(16,s1=C1)),component_subscribe(n1,licensing,C1=>t1(4,l1=C1)),component_subscribe(n1,groups,C1=>t1(8,c1=C1));const u1=BYTES_IN_MB*5;let{createUsersFromCsv:f1}=e1,p1=[],d1,m1=[],_1=[],h1=null;const b1=C1=>{if(s1.cloud&&C1.length>MAX_USERS_UPLOAD_LIMIT)return notifications.error("Max limit for upload is 1000 users. Please reduce file size and try again."),!1;for(const A1 of C1)emailValidator(A1)!==!0&&r1.push(A1);return r1.length?(notifications.error(`Error, please check the following email${r1.length>1?"s":""}: ${r1.join(", ")}`),!1):!0};async function $1(C1){const A1=Array.from(C1.target.files);if(A1.some(z1=>z1.size>=u1)){notifications.error(`Files cannot exceed ${u1/BYTES_IN_MB}MB. Please try again with smaller files.`);return}let E1=new FileReader;E1.addEventListener("load",function(z1){d1=z1.target.result,t1(5,p1=A1),t1(1,m1=d1.split(/\r?\n/))}),E1.readAsText(A1[0])}function v1(C1){h1=C1,t1(2,h1)}function k1(C1){_1=C1,t1(6,_1)}const S1=()=>f1({userEmails:m1,usersRole:h1,userGroups:_1});return n1.$$set=C1=>{"createUsersFromCsv"in C1&&t1(0,f1=C1.createUsersFromCsv)},n1.$$.update=()=>{n1.$$.dirty&18&&t1(10,o1=l1.userCount+m1.length),n1.$$.dirty&1024&&t1(3,i1=licensing.usersLimitExceeded(o1)),n1.$$.dirty&14&&t1(7,a1=!m1.length||!b1(m1)||!h1||i1)},r1=[],[f1,m1,h1,i1,l1,p1,_1,a1,c1,$1,o1,v1,k1,S1]}class ImportUsersModal extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$h,create_fragment$g,safe_not_equal,{createUsersFromCsv:0})}}const index_svelte_svelte_type_style_lang="";function create_default_slot_12(n1){let e1;return{c(){e1=text("Users")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_11(n1){let e1;return{c(){e1=text("Add users and control who gets access to your published apps")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_10$1(n1){let e1,t1,r1,o1;return e1=new Heading({props:{$$slots:{default:[create_default_slot_12]},$$scope:{ctx:n1}}}),r1=new Body({props:{$$slots:{default:[create_default_slot_11]},$$scope:{ctx:n1}}}),{c(){create_component(e1.$$.fragment),t1=space$1(),create_component(r1.$$.fragment)},m(i1,a1){mount_component(e1,i1,a1),insert$1(i1,t1,a1),mount_component(r1,i1,a1),o1=!0},p(i1,a1){const s1={};a1[1]&2097152&&(s1.$$scope={dirty:a1,ctx:i1}),e1.$set(s1);const l1={};a1[1]&2097152&&(l1.$$scope={dirty:a1,ctx:i1}),r1.$set(l1)},i(i1){o1||(transition_in(e1.$$.fragment,i1),transition_in(r1.$$.fragment,i1),o1=!0)},o(i1){transition_out(e1.$$.fragment,i1),transition_out(r1.$$.fragment,i1),o1=!1},d(i1){destroy_component(e1,i1),i1&&detach(t1),destroy_component(r1,i1)}}}function create_if_block_2$2(n1){let e1,t1;return e1=new InlineAlert({props:{type:"error",onConfirm:n1[33],buttonText:n1[20]?"Upgrade":"View plans",cta:!0,header:"Account de-activated",message:`Due to the free plan user limit being exceeded, your account has been de-activated.
1847
- Upgrade your plan to re-activate your account.`}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1[0]&1048584&&(i1.onConfirm=r1[33]),o1[0]&1048576&&(i1.buttonText=r1[20]?"Upgrade":"View plans"),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_else_block$3(n1){let e1,t1;return e1=new SCIMBanner({}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p:noop$5,i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_if_block_1$4(n1){let e1,t1;return e1=new ButtonGroup({props:{$$slots:{default:[create_default_slot_7$3]},$$scope:{ctx:n1}}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1[0]&527432|o1[1]&2097152&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_9$2(n1){let e1;return{c(){e1=text("Add users")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_8$2(n1){let e1;return{c(){e1=text("Import")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_7$3(n1){let e1,t1,r1,o1;return e1=new Button({props:{disabled:n1[19],cta:!0,$$slots:{default:[create_default_slot_9$2]},$$scope:{ctx:n1}}}),e1.$on("click",function(){is_function(n1[3].userLimitReached?n1[11].show:n1[6].show)&&(n1[3].userLimitReached?n1[11].show:n1[6].show).apply(this,arguments)}),r1=new Button({props:{disabled:n1[19],secondary:!0,$$slots:{default:[create_default_slot_8$2]},$$scope:{ctx:n1}}}),r1.$on("click",function(){is_function(n1[3].userLimitReached?n1[11].show:n1[10].show)&&(n1[3].userLimitReached?n1[11].show:n1[10].show).apply(this,arguments)}),{c(){create_component(e1.$$.fragment),t1=space$1(),create_component(r1.$$.fragment)},m(i1,a1){mount_component(e1,i1,a1),insert$1(i1,t1,a1),mount_component(r1,i1,a1),o1=!0},p(i1,a1){n1=i1;const s1={};a1[0]&524288&&(s1.disabled=n1[19]),a1[1]&2097152&&(s1.$$scope={dirty:a1,ctx:n1}),e1.$set(s1);const l1={};a1[0]&524288&&(l1.disabled=n1[19]),a1[1]&2097152&&(l1.$$scope={dirty:a1,ctx:n1}),r1.$set(l1)},i(i1){o1||(transition_in(e1.$$.fragment,i1),transition_in(r1.$$.fragment,i1),o1=!0)},o(i1){transition_out(e1.$$.fragment,i1),transition_out(r1.$$.fragment,i1),o1=!1},d(i1){destroy_component(e1,i1),i1&&detach(t1),destroy_component(r1,i1)}}}function create_if_block$9(n1){let e1,t1;return e1=new DeleteRowsButton({props:{item:"user",selectedRows:n1[12],deleteRows:n1[27]}}),e1.$on("updaterows",n1[35]),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1[0]&4096&&(i1.selectedRows=r1[12]),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_6$4(n1){let e1,t1,r1,o1,i1,a1,s1,l1,c1,u1,f1,p1,d1,m1,_1,h1,b1,$1,v1,k1,S1,C1;e1=new Layout$n({props:{gap:"XS",noPadding:!0,$$slots:{default:[create_default_slot_10$1]},$$scope:{ctx:n1}}}),r1=new Divider({});let A1=n1[3].errUserLimit&&create_if_block_2$2(n1);const E1=[create_if_block_1$4,create_else_block$3],z1=[];function I1(F1,q1){return F1[19]?1:0}s1=I1(n1),l1=z1[s1]=E1[s1](n1);function N1(F1){n1[34](F1)}let V1={placeholder:"Search"};n1[0]!==void 0&&(V1.value=n1[0]),f1=new Search_1({props:V1}),binding_callbacks.push(()=>bind$3(f1,"value",N1));let U1=n1[12].length>0&&create_if_block$9(n1);function R1(F1){n1[36](F1)}let D1={schema:n1[1],data:n1[5],allowEditColumns:!1,allowEditRows:!1,allowSelectRows:!n1[19],customRenderers:n1[23],loading:!n1[2].loaded||!n1[4]};return n1[12]!==void 0&&(D1.selectedRows=n1[12]),_1=new Table$1({props:D1}),binding_callbacks.push(()=>bind$3(_1,"selectedRows",R1)),_1.$on("click",n1[37]),v1=new Pagination$1({props:{page:n1[2].pageNumber+1,hasPrevPage:n1[2].loading?!1:n1[2].hasPrevPage,hasNextPage:n1[2].loading?!1:n1[2].hasNextPage,goToPrevPage:n1[22].prevPage,goToNextPage:n1[22].nextPage}}),S1=new Table$1({props:{schema:n1[18],data:n1[16],allowEditColumns:!1,allowEditRows:!1,customRenderers:n1[23],loading:!n1[15],allowClickRows:!1}}),{c(){create_component(e1.$$.fragment),t1=space$1(),create_component(r1.$$.fragment),o1=space$1(),A1&&A1.c(),i1=space$1(),a1=element("div"),l1.c(),c1=space$1(),u1=element("div"),create_component(f1.$$.fragment),d1=space$1(),U1&&U1.c(),m1=space$1(),create_component(_1.$$.fragment),b1=space$1(),$1=element("div"),create_component(v1.$$.fragment),k1=space$1(),create_component(S1.$$.fragment),attr(u1,"class","controls-right svelte-146drlc"),attr(a1,"class","controls svelte-146drlc"),attr($1,"class","pagination svelte-146drlc")},m(F1,q1){mount_component(e1,F1,q1),insert$1(F1,t1,q1),mount_component(r1,F1,q1),insert$1(F1,o1,q1),A1&&A1.m(F1,q1),insert$1(F1,i1,q1),insert$1(F1,a1,q1),z1[s1].m(a1,null),append$1(a1,c1),append$1(a1,u1),mount_component(f1,u1,null),append$1(u1,d1),U1&&U1.m(u1,null),insert$1(F1,m1,q1),mount_component(_1,F1,q1),insert$1(F1,b1,q1),insert$1(F1,$1,q1),mount_component(v1,$1,null),insert$1(F1,k1,q1),mount_component(S1,F1,q1),C1=!0},p(F1,q1){const K1={};q1[1]&2097152&&(K1.$$scope={dirty:q1,ctx:F1}),e1.$set(K1),F1[3].errUserLimit?A1?(A1.p(F1,q1),q1[0]&8&&transition_in(A1,1)):(A1=create_if_block_2$2(F1),A1.c(),transition_in(A1,1),A1.m(i1.parentNode,i1)):A1&&(group_outros(),transition_out(A1,1,1,()=>{A1=null}),check_outros());let J1=s1;s1=I1(F1),s1===J1?z1[s1].p(F1,q1):(group_outros(),transition_out(z1[J1],1,1,()=>{z1[J1]=null}),check_outros(),l1=z1[s1],l1?l1.p(F1,q1):(l1=z1[s1]=E1[s1](F1),l1.c()),transition_in(l1,1),l1.m(a1,c1));const Q1={};!p1&&q1[0]&1&&(p1=!0,Q1.value=F1[0],add_flush_callback(()=>p1=!1)),f1.$set(Q1),F1[12].length>0?U1?(U1.p(F1,q1),q1[0]&4096&&transition_in(U1,1)):(U1=create_if_block$9(F1),U1.c(),transition_in(U1,1),U1.m(u1,null)):U1&&(group_outros(),transition_out(U1,1,1,()=>{U1=null}),check_outros());const Z1={};q1[0]&2&&(Z1.schema=F1[1]),q1[0]&32&&(Z1.data=F1[5]),q1[0]&524288&&(Z1.allowSelectRows=!F1[19]),q1[0]&20&&(Z1.loading=!F1[2].loaded||!F1[4]),!h1&&q1[0]&4096&&(h1=!0,Z1.selectedRows=F1[12],add_flush_callback(()=>h1=!1)),_1.$set(Z1);const G1={};q1[0]&4&&(G1.page=F1[2].pageNumber+1),q1[0]&4&&(G1.hasPrevPage=F1[2].loading?!1:F1[2].hasPrevPage),q1[0]&4&&(G1.hasNextPage=F1[2].loading?!1:F1[2].hasNextPage),v1.$set(G1);const W1={};q1[0]&262144&&(W1.schema=F1[18]),q1[0]&65536&&(W1.data=F1[16]),q1[0]&32768&&(W1.loading=!F1[15]),S1.$set(W1)},i(F1){C1||(transition_in(e1.$$.fragment,F1),transition_in(r1.$$.fragment,F1),transition_in(A1),transition_in(l1),transition_in(f1.$$.fragment,F1),transition_in(U1),transition_in(_1.$$.fragment,F1),transition_in(v1.$$.fragment,F1),transition_in(S1.$$.fragment,F1),C1=!0)},o(F1){transition_out(e1.$$.fragment,F1),transition_out(r1.$$.fragment,F1),transition_out(A1),transition_out(l1),transition_out(f1.$$.fragment,F1),transition_out(U1),transition_out(_1.$$.fragment,F1),transition_out(v1.$$.fragment,F1),transition_out(S1.$$.fragment,F1),C1=!1},d(F1){destroy_component(e1,F1),F1&&detach(t1),destroy_component(r1,F1),F1&&detach(o1),A1&&A1.d(F1),F1&&detach(i1),F1&&detach(a1),z1[s1].d(),destroy_component(f1),U1&&U1.d(),F1&&detach(m1),destroy_component(_1,F1),F1&&detach(b1),F1&&detach($1),destroy_component(v1),F1&&detach(k1),destroy_component(S1,F1)}}}function create_default_slot_5$4(n1){let e1,t1;return e1=new AddUserModal({props:{showOnboardingTypeModal:n1[24]}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p:noop$5,i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_4$5(n1){let e1,t1;return e1=new InvitedModal({props:{inviteUsersResponse:n1[17]}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1[0]&131072&&(i1.inviteUsersResponse=r1[17]),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_3$5(n1){let e1,t1;return e1=new OnboardingTypeModal({props:{chooseCreationType:n1[26]}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p:noop$5,i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_2$6(n1){let e1,t1;return e1=new PasswordModal({props:{createUsersResponse:n1[13],userData:n1[14].users}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1[0]&8192&&(i1.createUsersResponse=r1[13]),o1[0]&16384&&(i1.userData=r1[14].users),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_1$9(n1){let e1,t1;return e1=new ImportUsersModal({props:{createUsersFromCsv:n1[25]}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p:noop$5,i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot$b(n1){let e1,t1;return e1=new UpgradeModal({props:{isOwner:n1[20]}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1[0]&1048576&&(i1.isOwner=r1[20]),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_fragment$f(n1){let e1,t1,r1,o1,i1,a1,s1,l1,c1,u1,f1,p1,d1,m1;e1=new Layout$n({props:{noPadding:!0,gap:"M",$$slots:{default:[create_default_slot_6$4]},$$scope:{ctx:n1}}});let _1={$$slots:{default:[create_default_slot_5$4]},$$scope:{ctx:n1}};r1=new Modal({props:_1}),n1[38](r1);let h1={$$slots:{default:[create_default_slot_4$5]},$$scope:{ctx:n1}};i1=new Modal({props:h1}),n1[39](i1);let b1={$$slots:{default:[create_default_slot_3$5]},$$scope:{ctx:n1}};s1=new Modal({props:b1}),n1[40](s1);let $1={disableCancel:!0,$$slots:{default:[create_default_slot_2$6]},$$scope:{ctx:n1}};c1=new Modal({props:$1}),n1[41](c1);let v1={$$slots:{default:[create_default_slot_1$9]},$$scope:{ctx:n1}};f1=new Modal({props:v1}),n1[42](f1);let k1={$$slots:{default:[create_default_slot$b]},$$scope:{ctx:n1}};return d1=new Modal({props:k1}),n1[43](d1),{c(){create_component(e1.$$.fragment),t1=space$1(),create_component(r1.$$.fragment),o1=space$1(),create_component(i1.$$.fragment),a1=space$1(),create_component(s1.$$.fragment),l1=space$1(),create_component(c1.$$.fragment),u1=space$1(),create_component(f1.$$.fragment),p1=space$1(),create_component(d1.$$.fragment)},m(S1,C1){mount_component(e1,S1,C1),insert$1(S1,t1,C1),mount_component(r1,S1,C1),insert$1(S1,o1,C1),mount_component(i1,S1,C1),insert$1(S1,a1,C1),mount_component(s1,S1,C1),insert$1(S1,l1,C1),mount_component(c1,S1,C1),insert$1(S1,u1,C1),mount_component(f1,S1,C1),insert$1(S1,p1,C1),mount_component(d1,S1,C1),m1=!0},p(S1,C1){const A1={};C1[0]&4037759|C1[1]&2097152&&(A1.$$scope={dirty:C1,ctx:S1}),e1.$set(A1);const E1={};C1[1]&2097152&&(E1.$$scope={dirty:C1,ctx:S1}),r1.$set(E1);const z1={};C1[0]&131072|C1[1]&2097152&&(z1.$$scope={dirty:C1,ctx:S1}),i1.$set(z1);const I1={};C1[1]&2097152&&(I1.$$scope={dirty:C1,ctx:S1}),s1.$set(I1);const N1={};C1[0]&24576|C1[1]&2097152&&(N1.$$scope={dirty:C1,ctx:S1}),c1.$set(N1);const V1={};C1[1]&2097152&&(V1.$$scope={dirty:C1,ctx:S1}),f1.$set(V1);const U1={};C1[0]&1048576|C1[1]&2097152&&(U1.$$scope={dirty:C1,ctx:S1}),d1.$set(U1)},i(S1){m1||(transition_in(e1.$$.fragment,S1),transition_in(r1.$$.fragment,S1),transition_in(i1.$$.fragment,S1),transition_in(s1.$$.fragment,S1),transition_in(c1.$$.fragment,S1),transition_in(f1.$$.fragment,S1),transition_in(d1.$$.fragment,S1),m1=!0)},o(S1){transition_out(e1.$$.fragment,S1),transition_out(r1.$$.fragment,S1),transition_out(i1.$$.fragment,S1),transition_out(s1.$$.fragment,S1),transition_out(c1.$$.fragment,S1),transition_out(f1.$$.fragment,S1),transition_out(d1.$$.fragment,S1),m1=!1},d(S1){destroy_component(e1,S1),S1&&detach(t1),n1[38](null),destroy_component(r1,S1),S1&&detach(o1),n1[39](null),destroy_component(i1,S1),S1&&detach(a1),n1[40](null),destroy_component(s1,S1),S1&&detach(l1),n1[41](null),destroy_component(c1,S1),S1&&detach(u1),n1[42](null),destroy_component(f1,S1),S1&&detach(p1),n1[43](null),destroy_component(d1,S1)}}}function instance$g(n1,e1,t1){let r1,o1,i1,a1,s1,l1,c1,u1,f1,p1,d1,m1,_1;component_subscribe(n1,organisation,m0=>t1(44,l1=m0)),component_subscribe(n1,groups,m0=>t1(29,c1=m0)),component_subscribe(n1,licensing,m0=>t1(3,f1=m0)),component_subscribe(n1,features,m0=>t1(30,p1=m0)),component_subscribe(n1,auth,m0=>t1(31,d1=m0)),component_subscribe(n1,admin,m0=>t1(32,m1=m0)),component_subscribe(n1,goto,m0=>t1(21,_1=m0));const h1=fetchData({API,datasource:{type:"user"}});component_subscribe(n1,h1,m0=>t1(2,u1=m0));let b1=!f1.groupsEnabled||(c1==null?void 0:c1.length),$1=[],v1,k1,S1,C1,A1,E1,z1,I1=[],N1,V1=[{column:"userGroups",component:GroupsTableRenderer},{column:"apps",component:AppsTableRenderer},{column:"role",component:RoleTableRenderer}],U1=[];const R1=m0=>{if(!m0)return{};let S2=JSON.parse(JSON.stringify(m0));return S2.email.displayName="Pending Invites",S2};let D1=!1,F1=[],q1=[];const K1=m0=>m0.map(S2=>{const{admin:B0,builder:w0,userGroups:z0,apps:u0}=S2.info;return{email:S2.email,builder:w0,admin:B0,userGroups:z0,apps:u0?[...new Set(Object.keys(u0))]:void 0}}),Q1=debounce(m0=>{h1.update({query:{email:m0}})},250),Z1=async m0=>{var S2;t1(14,U1=await W1(m0)),(S2=U1==null?void 0:U1.users)!=null&&S2.length&&(l1.isSSOEnforced?await _0(OnboardingType.EMAIL):S1.show())};async function G1(){var S2;const m0=(S2=U1==null?void 0:U1.users)==null?void 0:S2.map(B0=>({email:B0.email,builder:B0.role===BudibaseRoles.Developer,admin:B0.role===BudibaseRoles.Admin,groups:U1.groups}));try{t1(17,s1=await users.invite(m0)),t1(28,F1=await users.getInvites()),k1.show()}catch{notifications.error("Error inviting user")}}const W1=async m0=>{var w0,z0;const S2=((w0=await users.fetch())==null?void 0:w0.map(u0=>u0.email))||[],B0=[];for(const u0 of(z0=m0==null?void 0:m0.users)!=null?z0:[]){const{email:S0}=u0;B0.find(p0=>p0.email===S0)||S2.includes(S0)||B0.push(u0)}return B0.length||notifications.info("Duplicated! There is no new users to add."),{...m0,users:B0}},s0=async m0=>{const{userEmails:S2,usersRole:B0,userGroups:w0}=m0,z0=[];for(const u0 of S2){const S0={email:u0,role:B0,password:Math.random().toString(36).substring(2,22),forceResetPassword:!0};z0.push(S0)}if(t1(14,U1=await W1({groups:w0,users:z0})),!!U1.users.length)return n0()};async function n0(){try{t1(13,N1=await users.create(await W1(U1))),notifications.success("Successfully created user"),await groups.actions.init(),C1.show(),await h1.refresh()}catch{notifications.error("Error creating user")}}async function _0(m0){m0===OnboardingType.EMAIL?await G1():await n0()}const l0=async()=>{try{let m0=I1.map(S2=>S2._id);if(m0.includes(get_store_value(auth).user._id)){notifications.error("You cannot delete yourself");return}await users.bulkDelete(m0),notifications.success(`Successfully deleted ${I1.length} rows`),t1(12,I1=[]),await h1.refresh()}catch{notifications.error("Error deleting rows")}};onMount(async()=>{try{await groups.actions.init(),t1(4,b1=!0),t1(28,F1=await users.getInvites()),t1(15,D1=!0)}catch{notifications.error("Error fetching user group data")}});const e0=()=>{r1?f1.goToUpgradePage():window.open("https://budibase.com/pricing/","_blank")};function y0(m0){z1=m0,t1(0,z1)}function R0(m0){bubble.call(this,n1,m0)}function r0(m0){I1=m0,t1(12,I1)}const $0=({detail:m0})=>_1(`./${m0._id}`);function H0(m0){binding_callbacks[m0?"unshift":"push"](()=>{v1=m0,t1(6,v1)})}function N0(m0){binding_callbacks[m0?"unshift":"push"](()=>{k1=m0,t1(7,k1)})}function s2(m0){binding_callbacks[m0?"unshift":"push"](()=>{S1=m0,t1(8,S1)})}function b2(m0){binding_callbacks[m0?"unshift":"push"](()=>{C1=m0,t1(9,C1)})}function d2(m0){binding_callbacks[m0?"unshift":"push"](()=>{A1=m0,t1(10,A1)})}function e2(m0){binding_callbacks[m0?"unshift":"push"](()=>{E1=m0,t1(11,E1)})}return n1.$$.update=()=>{var m0;n1.$$.dirty[1]&3&&t1(20,r1=d1.accountPortalAccess&&m1.cloud),n1.$$.dirty[0]&1073741824|n1.$$.dirty[1]&1&&t1(19,o1=!d1.isAdmin||p1.isScimEnabled),n1.$$.dirty[0]&1&&Q1(z1),n1.$$.dirty[0]&8&&t1(1,i1={email:{sortable:!1,width:"2fr",minWidth:"200px"},role:{sortable:!1,width:"1fr"},...f1.groupsEnabled&&{userGroups:{sortable:!1,displayName:"Groups",width:"1fr"}},apps:{sortable:!1,width:"1fr"}}),n1.$$.dirty[0]&2&&t1(18,a1=R1(i1)),n1.$$.dirty[0]&536870916&&t1(5,$1=(m0=u1.rows)==null?void 0:m0.map(S2=>{let B0=[];return c1.forEach(w0=>{var z0;w0.users&&((z0=w0.users)==null||z0.forEach(u0=>{u0._id===S2._id&&B0.push(w0)}))}),{...S2,name:S2.firstName?S2.firstName+" "+S2.lastName:"",userGroups:B0,apps:[...new Set(Object.keys(S2.roles))]}})),n1.$$.dirty[0]&268435456&&t1(16,q1=K1(F1))},t1(14,U1=[]),t1(17,s1={successful:[],unsuccessful:[]}),[z1,i1,u1,f1,b1,$1,v1,k1,S1,C1,A1,E1,I1,N1,U1,D1,q1,s1,a1,o1,r1,_1,h1,V1,Z1,s0,_0,l0,F1,c1,p1,d1,m1,e0,y0,R0,r0,$0,H0,N0,s2,b2,d2,e2]}class Users extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$g,create_fragment$f,safe_not_equal,{},null,[-1,-1])}}function get_each_context$2(n1,e1,t1){const r1=n1.slice();return r1[7]=e1[t1].title,r1[8]=e1[t1].href,r1}function create_default_slot_2$5(n1){let e1;const t1=n1[5].default,r1=create_slot(t1,n1,n1[6],null);return{c(){r1&&r1.c()},m(o1,i1){r1&&r1.m(o1,i1),e1=!0},p(o1,i1){r1&&r1.p&&(!e1||i1&64)&&update_slot_base(r1,t1,o1,o1[6],e1?get_slot_changes(t1,o1[6],i1,null):get_all_dirty_from_scope(o1[6]),null)},i(o1){e1||(transition_in(r1,o1),e1=!0)},o(o1){transition_out(r1,o1),e1=!1},d(o1){r1&&r1.d(o1)}}}function create_each_block$2(n1){let e1,t1;return e1=new SideNavItem({props:{text:n1[7],url:n1[8],active:n1[1](n1[8])}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1&1&&(i1.text=r1[7]),o1&1&&(i1.url=r1[8]),o1&3&&(i1.active=r1[1](r1[8])),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_1$8(n1){let e1,t1,r1=n1[0],o1=[];for(let a1=0;a1<r1.length;a1+=1)o1[a1]=create_each_block$2(get_each_context$2(n1,r1,a1));const i1=a1=>transition_out(o1[a1],1,1,()=>{o1[a1]=null});return{c(){for(let a1=0;a1<o1.length;a1+=1)o1[a1].c();e1=empty$1()},m(a1,s1){for(let l1=0;l1<o1.length;l1+=1)o1[l1].m(a1,s1);insert$1(a1,e1,s1),t1=!0},p(a1,s1){if(s1&3){r1=a1[0];let l1;for(l1=0;l1<r1.length;l1+=1){const c1=get_each_context$2(a1,r1,l1);o1[l1]?(o1[l1].p(c1,s1),transition_in(o1[l1],1)):(o1[l1]=create_each_block$2(c1),o1[l1].c(),transition_in(o1[l1],1),o1[l1].m(e1.parentNode,e1))}for(group_outros(),l1=r1.length;l1<o1.length;l1+=1)i1(l1);check_outros()}},i(a1){if(!t1){for(let s1=0;s1<r1.length;s1+=1)transition_in(o1[s1]);t1=!0}},o(a1){o1=o1.filter(Boolean);for(let s1=0;s1<o1.length;s1+=1)transition_out(o1[s1]);t1=!1},d(a1){destroy_each(o1,a1),a1&&detach(e1)}}}function create_side_nav_slot(n1){let e1,t1,r1;return t1=new SideNav({props:{$$slots:{default:[create_default_slot_1$8]},$$scope:{ctx:n1}}}),{c(){e1=element("div"),create_component(t1.$$.fragment),attr(e1,"slot","side-nav")},m(o1,i1){insert$1(o1,e1,i1),mount_component(t1,e1,null),r1=!0},p(o1,i1){const a1={};i1&67&&(a1.$$scope={dirty:i1,ctx:o1}),t1.$set(a1)},i(o1){r1||(transition_in(t1.$$.fragment,o1),r1=!0)},o(o1){transition_out(t1.$$.fragment,o1),r1=!1},d(o1){o1&&detach(e1),destroy_component(t1)}}}function create_default_slot$a(n1){let e1,t1;return e1=new Content({props:{narrow:!n1[2],$$slots:{"side-nav":[create_side_nav_slot],default:[create_default_slot_2$5]},$$scope:{ctx:n1}}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1&4&&(i1.narrow=!r1[2]),o1&67&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_fragment$e(n1){let e1,t1;return e1=new Page({props:{$$slots:{default:[create_default_slot$a]},$$scope:{ctx:n1}}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,[o1]){const i1={};o1&71&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function instance$f(n1,e1,t1){let r1,o1,i1,a1,s1;component_subscribe(n1,goto,u1=>t1(3,i1=u1)),component_subscribe(n1,menu,u1=>t1(4,a1=u1)),component_subscribe(n1,isActive,u1=>t1(1,s1=u1));let{$$slots:l1={},$$scope:c1}=e1;return onMount(async()=>{try{await features.init()}catch(u1){notifications.error(`Error fetching feature configs - ${(u1==null?void 0:u1.message)||"unknown error"}`)}}),n1.$$set=u1=>{"$$scope"in u1&&t1(6,c1=u1.$$scope)},n1.$$.update=()=>{var u1;n1.$$.dirty&2&&t1(2,r1=s1("./users/index")||s1("./groups/index")),n1.$$.dirty&16&&t1(0,o1=((u1=a1.find(f1=>f1.title==="Users"))==null?void 0:u1.subPages)||[]),n1.$$.dirty&9&&!o1.length&&i1("../")},[o1,s1,r1,i1,a1,l1,c1]}class Layout$2 extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$f,create_fragment$e,safe_not_equal,{})}}function create_if_block$8(n1){let e1,t1,r1,o1;const i1=[create_if_block_1$3,create_if_block_2$1],a1=[];function s1(l1,c1){var u1,f1;return l1[1].cloud&&((f1=(u1=l1[2])==null?void 0:u1.user)==null?void 0:f1.accountPortalAccess)?0:!l1[1].cloud&&l1[2].isAdmin?1:-1}return~(e1=s1(n1))&&(t1=a1[e1]=i1[e1](n1)),{c(){t1&&t1.c(),r1=empty$1()},m(l1,c1){~e1&&a1[e1].m(l1,c1),insert$1(l1,r1,c1),o1=!0},p(l1,c1){let u1=e1;e1=s1(l1),e1===u1?~e1&&a1[e1].p(l1,c1):(t1&&(group_outros(),transition_out(a1[u1],1,1,()=>{a1[u1]=null}),check_outros()),~e1?(t1=a1[e1],t1?t1.p(l1,c1):(t1=a1[e1]=i1[e1](l1),t1.c()),transition_in(t1,1),t1.m(r1.parentNode,r1)):t1=null)},i(l1){o1||(transition_in(t1),o1=!0)},o(l1){transition_out(t1),o1=!1},d(l1){~e1&&a1[e1].d(l1),l1&&detach(r1)}}}function create_if_block_2$1(n1){let e1,t1;return e1=new Button({props:{cta:!0,size:"S",$$slots:{default:[create_default_slot_1$7]},$$scope:{ctx:n1}}}),e1.$on("click",n1[6]),e1.$on("click",n1[7]),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1&256&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_if_block_1$3(n1){let e1,t1;return e1=new Button({props:{cta:!0,size:"S",$$slots:{default:[create_default_slot$9]},$$scope:{ctx:n1}}}),e1.$on("click",n1[4]),e1.$on("click",n1[5]),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1&256&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_1$7(n1){let e1;return{c(){e1=text("Upgrade")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot$9(n1){let e1;return{c(){e1=text("Upgrade")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_fragment$d(n1){let e1=isEnabled(TENANT_FEATURE_FLAGS.LICENSING)&&!n1[0].isEnterprisePlan,t1,r1,o1=e1&&create_if_block$8(n1);return{c(){o1&&o1.c(),t1=empty$1()},m(i1,a1){o1&&o1.m(i1,a1),insert$1(i1,t1,a1),r1=!0},p(i1,[a1]){a1&1&&(e1=isEnabled(TENANT_FEATURE_FLAGS.LICENSING)&&!i1[0].isEnterprisePlan),e1?o1?(o1.p(i1,a1),a1&1&&transition_in(o1,1)):(o1=create_if_block$8(i1),o1.c(),transition_in(o1,1),o1.m(t1.parentNode,t1)):o1&&(group_outros(),transition_out(o1,1,1,()=>{o1=null}),check_outros())},i(i1){r1||(transition_in(o1),r1=!0)},o(i1){transition_out(o1),r1=!1},d(i1){o1&&o1.d(i1),i1&&detach(t1)}}}function instance$e(n1,e1,t1){let r1,o1,i1,a1;component_subscribe(n1,licensing,f1=>t1(0,r1=f1)),component_subscribe(n1,admin,f1=>t1(1,o1=f1)),component_subscribe(n1,auth,f1=>t1(2,i1=f1)),component_subscribe(n1,goto,f1=>t1(3,a1=f1));function s1(f1){bubble.call(this,n1,f1)}const l1=()=>{window.open(o1.accountPortalUrl+"/portal/upgrade","_blank")},c1=()=>a1("/builder/portal/account/upgrade");function u1(f1){bubble.call(this,n1,f1)}return[r1,o1,i1,a1,s1,l1,c1,u1]}class UpgradeButton extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$e,create_fragment$d,safe_not_equal,{})}}const Logo_svelte_svelte_type_style_lang="";function create_fragment$c(n1){let e1,t1,r1,o1;return{c(){e1=element("img"),src_url_equal(e1.src,t1=n1[0].logoUrl||Logo$1)||attr(e1,"src",t1),attr(e1,"alt","Budibase Logo"),attr(e1,"class","svelte-19hn6ob")},m(i1,a1){insert$1(i1,e1,a1),r1||(o1=listen(e1,"click",n1[2]),r1=!0)},p(i1,[a1]){a1&1&&!src_url_equal(e1.src,t1=i1[0].logoUrl||Logo$1)&&attr(e1,"src",t1)},i:noop$5,o:noop$5,d(i1){i1&&detach(e1),r1=!1,o1()}}}function instance$d(n1,e1,t1){let r1,o1;return component_subscribe(n1,organisation,a1=>t1(0,r1=a1)),component_subscribe(n1,goto,a1=>t1(1,o1=a1)),[r1,o1,()=>o1("./apps")]}class Logo_1 extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$d,create_fragment$c,safe_not_equal,{})}}const MobileMenu_svelte_svelte_type_style_lang="";function get_each_context$1(n1,e1,t1){const r1=n1.slice();return r1[5]=e1[t1].title,r1[6]=e1[t1].subPages,r1}function get_each_context_1(n1,e1,t1){const r1=n1.slice();return r1[5]=e1[t1].title,r1[9]=e1[t1].href,r1}function get_each_context_2(n1,e1,t1){const r1=n1.slice();return r1[5]=e1[t1].title,r1[9]=e1[t1].href,r1[6]=e1[t1].subPages,r1}function create_if_block_2(n1){let e1,t1,r1,o1,i1;return{c(){e1=element("div"),attr(e1,"class","mobile-nav-underlay svelte-tof9hg")},m(a1,s1){insert$1(a1,e1,s1),r1=!0,o1||(i1=listen(e1,"click",n1[3]),o1=!0)},p:noop$5,i(a1){r1||(add_render_callback(()=>{t1||(t1=create_bidirectional_transition(e1,fade,{duration:130},!0)),t1.run(1)}),r1=!0)},o(a1){t1||(t1=create_bidirectional_transition(e1,fade,{duration:130},!1)),t1.run(0),r1=!1},d(a1){a1&&detach(e1),a1&&t1&&t1.end(),o1=!1,i1()}}}function create_if_block_1$2(n1){let e1,t1;return e1=new SideNavItem({props:{text:n1[5],url:n1[9],active:n1[2](n1[9])}}),e1.$on("click",n1[3]),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1&2&&(i1.text=r1[5]),o1&2&&(i1.url=r1[9]),o1&6&&(i1.active=r1[2](r1[9])),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_each_block_2(n1){var o1;let e1,t1,r1=!((o1=n1[6])!=null&&o1.length)&&create_if_block_1$2(n1);return{c(){r1&&r1.c(),e1=empty$1()},m(i1,a1){r1&&r1.m(i1,a1),insert$1(i1,e1,a1),t1=!0},p(i1,a1){var s1;(s1=i1[6])!=null&&s1.length?r1&&(group_outros(),transition_out(r1,1,1,()=>{r1=null}),check_outros()):r1?(r1.p(i1,a1),a1&2&&transition_in(r1,1)):(r1=create_if_block_1$2(i1),r1.c(),transition_in(r1,1),r1.m(e1.parentNode,e1))},i(i1){t1||(transition_in(r1),t1=!0)},o(i1){transition_out(r1),t1=!1},d(i1){r1&&r1.d(i1),i1&&detach(e1)}}}function create_if_block$7(n1){let e1,t1=n1[5]+"",r1,o1,i1,a1,s1=n1[6],l1=[];for(let u1=0;u1<s1.length;u1+=1)l1[u1]=create_each_block_1(get_each_context_1(n1,s1,u1));const c1=u1=>transition_out(l1[u1],1,1,()=>{l1[u1]=null});return{c(){e1=element("div"),r1=text(t1),o1=space$1();for(let u1=0;u1<l1.length;u1+=1)l1[u1].c();i1=empty$1(),attr(e1,"class","category svelte-tof9hg")},m(u1,f1){insert$1(u1,e1,f1),append$1(e1,r1),insert$1(u1,o1,f1);for(let p1=0;p1<l1.length;p1+=1)l1[p1].m(u1,f1);insert$1(u1,i1,f1),a1=!0},p(u1,f1){if((!a1||f1&2)&&t1!==(t1=u1[5]+"")&&set_data(r1,t1),f1&14){s1=u1[6];let p1;for(p1=0;p1<s1.length;p1+=1){const d1=get_each_context_1(u1,s1,p1);l1[p1]?(l1[p1].p(d1,f1),transition_in(l1[p1],1)):(l1[p1]=create_each_block_1(d1),l1[p1].c(),transition_in(l1[p1],1),l1[p1].m(i1.parentNode,i1))}for(group_outros(),p1=s1.length;p1<l1.length;p1+=1)c1(p1);check_outros()}},i(u1){if(!a1){for(let f1=0;f1<s1.length;f1+=1)transition_in(l1[f1]);a1=!0}},o(u1){l1=l1.filter(Boolean);for(let f1=0;f1<l1.length;f1+=1)transition_out(l1[f1]);a1=!1},d(u1){u1&&detach(e1),u1&&detach(o1),destroy_each(l1,u1),u1&&detach(i1)}}}function create_each_block_1(n1){let e1,t1;return e1=new SideNavItem({props:{text:n1[5],url:n1[9],active:n1[2](n1[9])}}),e1.$on("click",n1[3]),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1&2&&(i1.text=r1[5]),o1&2&&(i1.url=r1[9]),o1&6&&(i1.active=r1[2](r1[9])),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_each_block$1(n1){var o1;let e1,t1,r1=((o1=n1[6])==null?void 0:o1.length)&&create_if_block$7(n1);return{c(){r1&&r1.c(),e1=empty$1()},m(i1,a1){r1&&r1.m(i1,a1),insert$1(i1,e1,a1),t1=!0},p(i1,a1){var s1;(s1=i1[6])!=null&&s1.length?r1?(r1.p(i1,a1),a1&2&&transition_in(r1,1)):(r1=create_if_block$7(i1),r1.c(),transition_in(r1,1),r1.m(e1.parentNode,e1)):r1&&(group_outros(),transition_out(r1,1,1,()=>{r1=null}),check_outros())},i(i1){t1||(transition_in(r1),t1=!0)},o(i1){transition_out(r1),t1=!1},d(i1){r1&&r1.d(i1),i1&&detach(e1)}}}function create_default_slot_1$6(n1){let e1,t1,r1,o1=n1[1],i1=[];for(let u1=0;u1<o1.length;u1+=1)i1[u1]=create_each_block_2(get_each_context_2(n1,o1,u1));const a1=u1=>transition_out(i1[u1],1,1,()=>{i1[u1]=null});let s1=n1[1],l1=[];for(let u1=0;u1<s1.length;u1+=1)l1[u1]=create_each_block$1(get_each_context$1(n1,s1,u1));const c1=u1=>transition_out(l1[u1],1,1,()=>{l1[u1]=null});return{c(){for(let u1=0;u1<i1.length;u1+=1)i1[u1].c();e1=space$1();for(let u1=0;u1<l1.length;u1+=1)l1[u1].c();t1=empty$1()},m(u1,f1){for(let p1=0;p1<i1.length;p1+=1)i1[p1].m(u1,f1);insert$1(u1,e1,f1);for(let p1=0;p1<l1.length;p1+=1)l1[p1].m(u1,f1);insert$1(u1,t1,f1),r1=!0},p(u1,f1){if(f1&14){o1=u1[1];let p1;for(p1=0;p1<o1.length;p1+=1){const d1=get_each_context_2(u1,o1,p1);i1[p1]?(i1[p1].p(d1,f1),transition_in(i1[p1],1)):(i1[p1]=create_each_block_2(d1),i1[p1].c(),transition_in(i1[p1],1),i1[p1].m(e1.parentNode,e1))}for(group_outros(),p1=o1.length;p1<i1.length;p1+=1)a1(p1);check_outros()}if(f1&14){s1=u1[1];let p1;for(p1=0;p1<s1.length;p1+=1){const d1=get_each_context$1(u1,s1,p1);l1[p1]?(l1[p1].p(d1,f1),transition_in(l1[p1],1)):(l1[p1]=create_each_block$1(d1),l1[p1].c(),transition_in(l1[p1],1),l1[p1].m(t1.parentNode,t1))}for(group_outros(),p1=s1.length;p1<l1.length;p1+=1)c1(p1);check_outros()}},i(u1){if(!r1){for(let f1=0;f1<o1.length;f1+=1)transition_in(i1[f1]);for(let f1=0;f1<s1.length;f1+=1)transition_in(l1[f1]);r1=!0}},o(u1){i1=i1.filter(Boolean);for(let f1=0;f1<i1.length;f1+=1)transition_out(i1[f1]);l1=l1.filter(Boolean);for(let f1=0;f1<l1.length;f1+=1)transition_out(l1[f1]);r1=!1},d(u1){destroy_each(i1,u1),u1&&detach(e1),destroy_each(l1,u1),u1&&detach(t1)}}}function create_default_slot$8(n1){let e1,t1,r1,o1,i1,a1,s1,l1,c1,u1;return t1=new Logo_1({}),o1=new SideNav({props:{$$slots:{default:[create_default_slot_1$6]},$$scope:{ctx:n1}}}),s1=new UpgradeButton({}),s1.$on("click",n1[3]),{c(){e1=element("div"),create_component(t1.$$.fragment),r1=space$1(),create_component(o1.$$.fragment),i1=space$1(),a1=element("div"),create_component(s1.$$.fragment)},m(f1,p1){insert$1(f1,e1,p1),mount_component(t1,e1,null),insert$1(f1,r1,p1),mount_component(o1,f1,p1),insert$1(f1,i1,p1),insert$1(f1,a1,p1),mount_component(s1,a1,null),l1=!0,c1||(u1=listen(e1,"click",n1[3]),c1=!0)},p(f1,p1){const d1={};p1&16390&&(d1.$$scope={dirty:p1,ctx:f1}),o1.$set(d1)},i(f1){l1||(transition_in(t1.$$.fragment,f1),transition_in(o1.$$.fragment,f1),transition_in(s1.$$.fragment,f1),l1=!0)},o(f1){transition_out(t1.$$.fragment,f1),transition_out(o1.$$.fragment,f1),transition_out(s1.$$.fragment,f1),l1=!1},d(f1){f1&&detach(e1),destroy_component(t1),f1&&detach(r1),destroy_component(o1,f1),f1&&detach(i1),f1&&detach(a1),destroy_component(s1),c1=!1,u1()}}}function create_fragment$b(n1){let e1,t1,r1,o1,i1=n1[0]&&create_if_block_2(n1);return r1=new Layout$n({props:{noPadding:!0,gap:"M",$$slots:{default:[create_default_slot$8]},$$scope:{ctx:n1}}}),{c(){i1&&i1.c(),e1=space$1(),t1=element("div"),create_component(r1.$$.fragment),attr(t1,"class","mobile-nav svelte-tof9hg"),toggle_class(t1,"visible",n1[0])},m(a1,s1){i1&&i1.m(a1,s1),insert$1(a1,e1,s1),insert$1(a1,t1,s1),mount_component(r1,t1,null),o1=!0},p(a1,[s1]){a1[0]?i1?(i1.p(a1,s1),s1&1&&transition_in(i1,1)):(i1=create_if_block_2(a1),i1.c(),transition_in(i1,1),i1.m(e1.parentNode,e1)):i1&&(group_outros(),transition_out(i1,1,1,()=>{i1=null}),check_outros());const l1={};s1&16390&&(l1.$$scope={dirty:s1,ctx:a1}),r1.$set(l1),(!o1||s1&1)&&toggle_class(t1,"visible",a1[0])},i(a1){o1||(transition_in(i1),transition_in(r1.$$.fragment,a1),o1=!0)},o(a1){transition_out(i1),transition_out(r1.$$.fragment,a1),o1=!1},d(a1){i1&&i1.d(a1),a1&&detach(e1),a1&&detach(t1),destroy_component(r1)}}}function instance$c(n1,e1,t1){let r1,o1;component_subscribe(n1,menu,l1=>t1(1,r1=l1)),component_subscribe(n1,isActive,l1=>t1(2,o1=l1));let{visible:i1=!1}=e1;const a1=createEventDispatcher(),s1=()=>a1("close");return n1.$$set=l1=>{"visible"in l1&&t1(0,i1=l1.visible)},[i1,r1,o1,s1]}class MobileMenu extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$c,create_fragment$b,safe_not_equal,{visible:0})}}function create_default_slot$7(n1){let e1,t1,r1;function o1(a1){n1[1](a1)}let i1={options:Themes,placeholder:null,getOptionLabel:func,getOptionValue:func_1};return n1[0].theme!==void 0&&(i1.value=n1[0].theme),e1=new Select_1$1({props:i1}),binding_callbacks.push(()=>bind$3(e1,"value",o1)),{c(){create_component(e1.$$.fragment)},m(a1,s1){mount_component(e1,a1,s1),r1=!0},p(a1,s1){const l1={};!t1&&s1&1&&(t1=!0,l1.value=a1[0].theme,add_flush_callback(()=>t1=!1)),e1.$set(l1)},i(a1){r1||(transition_in(e1.$$.fragment,a1),r1=!0)},o(a1){transition_out(e1.$$.fragment,a1),r1=!1},d(a1){destroy_component(e1,a1)}}}function create_fragment$a(n1){let e1,t1;return e1=new ModalContent({props:{title:"Theme",$$slots:{default:[create_default_slot$7]},$$scope:{ctx:n1}}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,[o1]){const i1={};o1&5&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}const func=n1=>n1.name,func_1=n1=>n1.class;function instance$b(n1,e1,t1){let r1;component_subscribe(n1,themeStore,i1=>t1(0,r1=i1));function o1(i1){n1.$$.not_equal(r1.theme,i1)&&(r1.theme=i1,themeStore.set(r1))}return[r1,o1]}class ThemeModal extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$b,create_fragment$a,safe_not_equal,{})}}function create_default_slot_1$5(n1){let e1;return{c(){e1=text("Your API key for accessing the Budibase public API:")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot$6(n1){let e1,t1,r1,o1,i1;e1=new Body({props:{size:"S",$$slots:{default:[create_default_slot_1$5]},$$scope:{ctx:n1}}});function a1(l1){n1[2](l1)}let s1={};return n1[0]!==void 0&&(s1.value=n1[0]),r1=new CopyInput({props:s1}),binding_callbacks.push(()=>bind$3(r1,"value",a1)),{c(){create_component(e1.$$.fragment),t1=space$1(),create_component(r1.$$.fragment)},m(l1,c1){mount_component(e1,l1,c1),insert$1(l1,t1,c1),mount_component(r1,l1,c1),i1=!0},p(l1,c1){const u1={};c1&8&&(u1.$$scope={dirty:c1,ctx:l1}),e1.$set(u1);const f1={};!o1&&c1&1&&(o1=!0,f1.value=l1[0],add_flush_callback(()=>o1=!1)),r1.$set(f1)},i(l1){i1||(transition_in(e1.$$.fragment,l1),transition_in(r1.$$.fragment,l1),i1=!0)},o(l1){transition_out(e1.$$.fragment,l1),transition_out(r1.$$.fragment,l1),i1=!1},d(l1){destroy_component(e1,l1),l1&&detach(t1),destroy_component(r1,l1)}}}function create_fragment$9(n1){let e1,t1;return e1=new ModalContent({props:{title:"API Key",showSecondaryButton:!0,secondaryButtonText:"Regenerate key",secondaryAction:n1[1],showCancelButton:!1,confirmText:"Close",$$slots:{default:[create_default_slot$6]},$$scope:{ctx:n1}}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,[o1]){const i1={};o1&9&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function instance$a(n1,e1,t1){let r1=null;async function o1(){try{t1(0,r1=await auth.generateAPIKey()),notifications.success("New API key generated")}catch{notifications.error("Unable to generate new API key")}return keepOpen}onMount(async()=>{try{t1(0,r1=await auth.fetchAPIKey())}catch{notifications.error("Unable to fetch API key")}});function i1(a1){r1=a1,t1(0,r1)}return[r1,o1,i1]}class APIKeyModal extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$a,create_fragment$9,safe_not_equal,{})}}const UserDropdown_svelte_svelte_type_style_lang="";function create_default_slot_10(n1){let e1;return{c(){e1=text("My profile")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_9$1(n1){let e1;return{c(){e1=text("Theme")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_if_block$6(n1){let e1,t1;return e1=new Item({props:{icon:"LockClosed",$$slots:{default:[create_default_slot_8$1]},$$scope:{ctx:n1}}}),e1.$on("click",n1[9]),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1&65536&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_8$1(n1){let e1;return{c(){e1=text("Update password")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_7$2(n1){let e1;return{c(){e1=text("View API key")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_6$3(n1){let e1;return{c(){e1=text("Close developer mode")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_5$3(n1){let e1;return{c(){e1=text("Log out")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_4$4(n1){let e1,t1,r1,o1,i1,a1,s1,l1,c1,u1,f1;e1=new Item({props:{icon:"UserEdit",$$slots:{default:[create_default_slot_10]},$$scope:{ctx:n1}}}),e1.$on("click",n1[7]),r1=new Item({props:{icon:"Moon",$$slots:{default:[create_default_slot_9$1]},$$scope:{ctx:n1}}}),r1.$on("click",n1[8]);let p1=!n1[4].isSSO&&create_if_block$6(n1);return a1=new Item({props:{icon:"Key",$$slots:{default:[create_default_slot_7$2]},$$scope:{ctx:n1}}}),a1.$on("click",n1[10]),l1=new Item({props:{icon:"UserDeveloper",$$slots:{default:[create_default_slot_6$3]},$$scope:{ctx:n1}}}),l1.$on("click",n1[11]),u1=new Item({props:{icon:"LogOut",$$slots:{default:[create_default_slot_5$3]},$$scope:{ctx:n1}}}),u1.$on("click",n1[6]),{c(){create_component(e1.$$.fragment),t1=space$1(),create_component(r1.$$.fragment),o1=space$1(),p1&&p1.c(),i1=space$1(),create_component(a1.$$.fragment),s1=space$1(),create_component(l1.$$.fragment),c1=space$1(),create_component(u1.$$.fragment)},m(d1,m1){mount_component(e1,d1,m1),insert$1(d1,t1,m1),mount_component(r1,d1,m1),insert$1(d1,o1,m1),p1&&p1.m(d1,m1),insert$1(d1,i1,m1),mount_component(a1,d1,m1),insert$1(d1,s1,m1),mount_component(l1,d1,m1),insert$1(d1,c1,m1),mount_component(u1,d1,m1),f1=!0},p(d1,m1){const _1={};m1&65536&&(_1.$$scope={dirty:m1,ctx:d1}),e1.$set(_1);const h1={};m1&65536&&(h1.$$scope={dirty:m1,ctx:d1}),r1.$set(h1),d1[4].isSSO?p1&&(group_outros(),transition_out(p1,1,1,()=>{p1=null}),check_outros()):p1?(p1.p(d1,m1),m1&16&&transition_in(p1,1)):(p1=create_if_block$6(d1),p1.c(),transition_in(p1,1),p1.m(i1.parentNode,i1));const b1={};m1&65536&&(b1.$$scope={dirty:m1,ctx:d1}),a1.$set(b1);const $1={};m1&65536&&($1.$$scope={dirty:m1,ctx:d1}),l1.$set($1);const v1={};m1&65536&&(v1.$$scope={dirty:m1,ctx:d1}),u1.$set(v1)},i(d1){f1||(transition_in(e1.$$.fragment,d1),transition_in(r1.$$.fragment,d1),transition_in(p1),transition_in(a1.$$.fragment,d1),transition_in(l1.$$.fragment,d1),transition_in(u1.$$.fragment,d1),f1=!0)},o(d1){transition_out(e1.$$.fragment,d1),transition_out(r1.$$.fragment,d1),transition_out(p1),transition_out(a1.$$.fragment,d1),transition_out(l1.$$.fragment,d1),transition_out(u1.$$.fragment,d1),f1=!1},d(d1){destroy_component(e1,d1),d1&&detach(t1),destroy_component(r1,d1),d1&&detach(o1),p1&&p1.d(d1),d1&&detach(i1),destroy_component(a1,d1),d1&&detach(s1),destroy_component(l1,d1),d1&&detach(c1),destroy_component(u1,d1)}}}function create_control_slot(n1){let e1,t1,r1,o1,i1;return t1=new UserAvatar({props:{user:n1[4].user,showTooltip:!1}}),o1=new Icon({props:{size:"XL",name:"ChevronDown"}}),{c(){e1=element("div"),create_component(t1.$$.fragment),r1=space$1(),create_component(o1.$$.fragment),attr(e1,"slot","control"),attr(e1,"class","user-dropdown svelte-1k1fmmj")},m(a1,s1){insert$1(a1,e1,s1),mount_component(t1,e1,null),append$1(e1,r1),mount_component(o1,e1,null),i1=!0},p(a1,s1){const l1={};s1&16&&(l1.user=a1[4].user),t1.$set(l1)},i(a1){i1||(transition_in(t1.$$.fragment,a1),transition_in(o1.$$.fragment,a1),i1=!0)},o(a1){transition_out(t1.$$.fragment,a1),transition_out(o1.$$.fragment,a1),i1=!1},d(a1){a1&&detach(e1),destroy_component(t1),destroy_component(o1)}}}function create_default_slot_3$4(n1){let e1,t1;return e1=new ThemeModal({}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_2$4(n1){let e1,t1;return e1=new ProfileModal({}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_1$4(n1){let e1,t1;return e1=new ChangePasswordModal({}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot$5(n1){let e1,t1;return e1=new APIKeyModal({}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_fragment$8(n1){let e1,t1,r1,o1,i1,a1,s1,l1,c1,u1;e1=new ActionMenu({props:{align:"right",$$slots:{control:[create_control_slot],default:[create_default_slot_4$4]},$$scope:{ctx:n1}}});let f1={$$slots:{default:[create_default_slot_3$4]},$$scope:{ctx:n1}};r1=new Modal({props:f1}),n1[12](r1);let p1={$$slots:{default:[create_default_slot_2$4]},$$scope:{ctx:n1}};i1=new Modal({props:p1}),n1[13](i1);let d1={$$slots:{default:[create_default_slot_1$4]},$$scope:{ctx:n1}};s1=new Modal({props:d1}),n1[14](s1);let m1={$$slots:{default:[create_default_slot$5]},$$scope:{ctx:n1}};return c1=new Modal({props:m1}),n1[15](c1),{c(){create_component(e1.$$.fragment),t1=space$1(),create_component(r1.$$.fragment),o1=space$1(),create_component(i1.$$.fragment),a1=space$1(),create_component(s1.$$.fragment),l1=space$1(),create_component(c1.$$.fragment)},m(_1,h1){mount_component(e1,_1,h1),insert$1(_1,t1,h1),mount_component(r1,_1,h1),insert$1(_1,o1,h1),mount_component(i1,_1,h1),insert$1(_1,a1,h1),mount_component(s1,_1,h1),insert$1(_1,l1,h1),mount_component(c1,_1,h1),u1=!0},p(_1,[h1]){const b1={};h1&65599&&(b1.$$scope={dirty:h1,ctx:_1}),e1.$set(b1);const $1={};h1&65536&&($1.$$scope={dirty:h1,ctx:_1}),r1.$set($1);const v1={};h1&65536&&(v1.$$scope={dirty:h1,ctx:_1}),i1.$set(v1);const k1={};h1&65536&&(k1.$$scope={dirty:h1,ctx:_1}),s1.$set(k1);const S1={};h1&65536&&(S1.$$scope={dirty:h1,ctx:_1}),c1.$set(S1)},i(_1){u1||(transition_in(e1.$$.fragment,_1),transition_in(r1.$$.fragment,_1),transition_in(i1.$$.fragment,_1),transition_in(s1.$$.fragment,_1),transition_in(c1.$$.fragment,_1),u1=!0)},o(_1){transition_out(e1.$$.fragment,_1),transition_out(r1.$$.fragment,_1),transition_out(i1.$$.fragment,_1),transition_out(s1.$$.fragment,_1),transition_out(c1.$$.fragment,_1),u1=!1},d(_1){destroy_component(e1,_1),_1&&detach(t1),n1[12](null),destroy_component(r1,_1),_1&&detach(o1),n1[13](null),destroy_component(i1,_1),_1&&detach(a1),n1[14](null),destroy_component(s1,_1),_1&&detach(l1),n1[15](null),destroy_component(c1,_1)}}}function instance$9(n1,e1,t1){let r1,o1;component_subscribe(n1,auth,v1=>t1(4,r1=v1)),component_subscribe(n1,goto,v1=>t1(5,o1=v1));let i1,a1,s1,l1;const c1=async()=>{try{await auth.logout()}catch{}},u1=()=>a1.show(),f1=()=>i1.show(),p1=()=>s1.show(),d1=()=>l1.show(),m1=()=>o1("../apps");function _1(v1){binding_callbacks[v1?"unshift":"push"](()=>{i1=v1,t1(0,i1)})}function h1(v1){binding_callbacks[v1?"unshift":"push"](()=>{a1=v1,t1(1,a1)})}function b1(v1){binding_callbacks[v1?"unshift":"push"](()=>{s1=v1,t1(2,s1)})}function $1(v1){binding_callbacks[v1?"unshift":"push"](()=>{l1=v1,t1(3,l1)})}return[i1,a1,s1,l1,r1,o1,c1,u1,f1,p1,d1,m1,_1,h1,b1,$1]}class UserDropdown extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$9,create_fragment$8,safe_not_equal,{})}}const HelpMenu_svelte_svelte_type_style_lang="";function create_default_slot_7$1(n1){let e1;return{c(){e1=text("Help resources")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_6$2(n1){let e1;return{c(){e1=text("Help docs")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_5$2(n1){let e1;return{c(){e1=text("Discussions")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_4$3(n1){let e1;return{c(){e1=text("Discord")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_3$3(n1){let e1;return{c(){e1=text("Budibase University")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_if_block$5(n1){let e1,t1,r1,o1,i1,a1,s1,l1,c1;o1=new FontAwesomeIcon({props:{name:"fa-solid fa-envelope"}}),a1=new Body({props:{size:"S",$$slots:{default:[create_default_slot_2$3]},$$scope:{ctx:n1}}});let u1=!n1[3]&&create_if_block_1$1(n1);return{c(){e1=element("a"),t1=element("div"),r1=element("div"),create_component(o1.$$.fragment),i1=space$1(),create_component(a1.$$.fragment),s1=space$1(),u1&&u1.c(),attr(r1,"class","icon svelte-33ytqw"),attr(t1,"class","premiumLinkContent svelte-33ytqw"),toggle_class(t1,"disabled",!n1[3]),attr(e1,"href",l1=n1[3]?"mailto:support@budibase.com":"/builder/portal/account/usage"),attr(e1,"class","svelte-33ytqw")},m(f1,p1){insert$1(f1,e1,p1),append$1(e1,t1),append$1(t1,r1),mount_component(o1,r1,null),append$1(t1,i1),mount_component(a1,t1,null),append$1(e1,s1),u1&&u1.m(e1,null),c1=!0},p(f1,p1){const d1={};p1&256&&(d1.$$scope={dirty:p1,ctx:f1}),a1.$set(d1),(!c1||p1&8)&&toggle_class(t1,"disabled",!f1[3]),f1[3]?u1&&(group_outros(),transition_out(u1,1,1,()=>{u1=null}),check_outros()):u1?p1&8&&transition_in(u1,1):(u1=create_if_block_1$1(f1),u1.c(),transition_in(u1,1),u1.m(e1,null)),(!c1||p1&8&&l1!==(l1=f1[3]?"mailto:support@budibase.com":"/builder/portal/account/usage"))&&attr(e1,"href",l1)},i(f1){c1||(transition_in(o1.$$.fragment,f1),transition_in(a1.$$.fragment,f1),transition_in(u1),c1=!0)},o(f1){transition_out(o1.$$.fragment,f1),transition_out(a1.$$.fragment,f1),transition_out(u1),c1=!1},d(f1){f1&&detach(e1),destroy_component(o1),destroy_component(a1),u1&&u1.d()}}}function create_default_slot_2$3(n1){let e1;return{c(){e1=text("Email support")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_if_block_1$1(n1){let e1,t1,r1,o1,i1,a1;return r1=new FontAwesomeIcon({props:{name:"fa-solid fa-lock"}}),i1=new Body({props:{size:"XS",$$slots:{default:[create_default_slot_1$3]},$$scope:{ctx:n1}}}),{c(){e1=element("div"),t1=element("div"),create_component(r1.$$.fragment),o1=space$1(),create_component(i1.$$.fragment),attr(t1,"class","icon svelte-33ytqw"),attr(e1,"class","premiumBadge svelte-33ytqw")},m(s1,l1){insert$1(s1,e1,l1),append$1(e1,t1),mount_component(r1,t1,null),append$1(e1,o1),mount_component(i1,e1,null),a1=!0},i(s1){a1||(transition_in(r1.$$.fragment,s1),transition_in(i1.$$.fragment,s1),a1=!0)},o(s1){transition_out(r1.$$.fragment,s1),transition_out(i1.$$.fragment,s1),a1=!1},d(s1){s1&&detach(e1),destroy_component(r1),destroy_component(i1)}}}function create_default_slot_1$3(n1){let e1;return{c(){e1=text("Premium")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot$4(n1){let e1,t1,r1,o1,i1,a1,s1,l1,c1,u1,f1,p1,d1,m1,_1,h1,b1,$1,v1,k1,S1,C1,A1,E1,z1,I1,N1,V1,U1,R1,D1,F1,q1,K1,J1,Q1,Z1,G1,W1,s0,n0,_0=isEnabled(TENANT_FEATURE_FLAGS.LICENSING),l0,e0,y0;r1=new Heading({props:{size:"XS",$$slots:{default:[create_default_slot_7$1]},$$scope:{ctx:n1}}}),a1=new FontAwesomeIcon({props:{name:"fa-solid fa-xmark"}}),p1=new FontAwesomeIcon({props:{name:"fa-solid fa-book"}}),m1=new Body({props:{size:"S",$$slots:{default:[create_default_slot_6$2]},$$scope:{ctx:n1}}}),k1=new FontAwesomeIcon({props:{name:"fa-brands fa-github"}}),C1=new Body({props:{size:"S",$$slots:{default:[create_default_slot_5$2]},$$scope:{ctx:n1}}}),V1=new FontAwesomeIcon({props:{name:"fa-brands fa-discord"}}),R1=new Body({props:{size:"S",$$slots:{default:[create_default_slot_4$3]},$$scope:{ctx:n1}}}),Q1=new FontAwesomeIcon({props:{name:"fa-solid fa-play"}}),G1=new Body({props:{size:"S",$$slots:{default:[create_default_slot_3$3]},$$scope:{ctx:n1}}});let R0=_0&&create_if_block$5(n1);return{c(){e1=element("nav"),t1=element("div"),create_component(r1.$$.fragment),o1=space$1(),i1=element("button"),create_component(a1.$$.fragment),s1=space$1(),l1=element("div"),c1=space$1(),u1=element("a"),f1=element("div"),create_component(p1.$$.fragment),d1=space$1(),create_component(m1.$$.fragment),_1=space$1(),h1=element("div"),b1=space$1(),$1=element("a"),v1=element("div"),create_component(k1.$$.fragment),S1=space$1(),create_component(C1.$$.fragment),A1=space$1(),E1=element("div"),z1=space$1(),I1=element("a"),N1=element("div"),create_component(V1.$$.fragment),U1=space$1(),create_component(R1.$$.fragment),D1=space$1(),F1=element("div"),q1=space$1(),K1=element("a"),J1=element("div"),create_component(Q1.$$.fragment),Z1=space$1(),create_component(G1.$$.fragment),W1=space$1(),s0=element("div"),n0=space$1(),R0&&R0.c(),attr(i1,"class","closeButton svelte-33ytqw"),attr(t1,"class","header svelte-33ytqw"),attr(l1,"class","divider svelte-33ytqw"),attr(f1,"class","icon svelte-33ytqw"),attr(u1,"target","_blank"),attr(u1,"href","https://docs.budibase.com/docs"),attr(u1,"class","svelte-33ytqw"),attr(h1,"class","divider svelte-33ytqw"),attr(v1,"class","icon svelte-33ytqw"),attr($1,"target","_blank"),attr($1,"href","https://github.com/Budibase/budibase/discussions"),attr($1,"class","svelte-33ytqw"),attr(E1,"class","divider svelte-33ytqw"),attr(N1,"class","icon svelte-33ytqw"),attr(I1,"target","_blank"),attr(I1,"href","https://discord.com/invite/ZepTmGbtfF"),attr(I1,"class","svelte-33ytqw"),attr(F1,"class","divider svelte-33ytqw"),attr(J1,"class","icon svelte-33ytqw"),attr(K1,"target","_blank"),attr(K1,"href","https://vimeo.com/showcase/budibase-university"),attr(K1,"class","svelte-33ytqw"),attr(s0,"class","divider svelte-33ytqw"),attr(e1,"class","helpMenu svelte-33ytqw")},m(r0,$0){insert$1(r0,e1,$0),append$1(e1,t1),mount_component(r1,t1,null),append$1(t1,o1),append$1(t1,i1),mount_component(a1,i1,null),append$1(e1,s1),append$1(e1,l1),append$1(e1,c1),append$1(e1,u1),append$1(u1,f1),mount_component(p1,f1,null),append$1(u1,d1),mount_component(m1,u1,null),append$1(e1,_1),append$1(e1,h1),append$1(e1,b1),append$1(e1,$1),append$1($1,v1),mount_component(k1,v1,null),append$1($1,S1),mount_component(C1,$1,null),append$1(e1,A1),append$1(e1,E1),append$1(e1,z1),append$1(e1,I1),append$1(I1,N1),mount_component(V1,N1,null),append$1(I1,U1),mount_component(R1,I1,null),append$1(e1,D1),append$1(e1,F1),append$1(e1,q1),append$1(e1,K1),append$1(K1,J1),mount_component(Q1,J1,null),append$1(K1,Z1),mount_component(G1,K1,null),append$1(e1,W1),append$1(e1,s0),append$1(e1,n0),R0&&R0.m(e1,null),l0=!0,e0||(y0=listen(i1,"click",function(){is_function(n1[1])&&n1[1].apply(this,arguments)}),e0=!0)},p(r0,$0){n1=r0;const H0={};$0&256&&(H0.$$scope={dirty:$0,ctx:n1}),r1.$set(H0);const N0={};$0&256&&(N0.$$scope={dirty:$0,ctx:n1}),m1.$set(N0);const s2={};$0&256&&(s2.$$scope={dirty:$0,ctx:n1}),C1.$set(s2);const b2={};$0&256&&(b2.$$scope={dirty:$0,ctx:n1}),R1.$set(b2);const d2={};$0&256&&(d2.$$scope={dirty:$0,ctx:n1}),G1.$set(d2),_0&&R0.p(n1,$0)},i(r0){l0||(transition_in(r1.$$.fragment,r0),transition_in(a1.$$.fragment,r0),transition_in(p1.$$.fragment,r0),transition_in(m1.$$.fragment,r0),transition_in(k1.$$.fragment,r0),transition_in(C1.$$.fragment,r0),transition_in(V1.$$.fragment,r0),transition_in(R1.$$.fragment,r0),transition_in(Q1.$$.fragment,r0),transition_in(G1.$$.fragment,r0),transition_in(R0),l0=!0)},o(r0){transition_out(r1.$$.fragment,r0),transition_out(a1.$$.fragment,r0),transition_out(p1.$$.fragment,r0),transition_out(m1.$$.fragment,r0),transition_out(k1.$$.fragment,r0),transition_out(C1.$$.fragment,r0),transition_out(V1.$$.fragment,r0),transition_out(R1.$$.fragment,r0),transition_out(Q1.$$.fragment,r0),transition_out(G1.$$.fragment,r0),transition_out(R0),l0=!1},d(r0){r0&&detach(e1),destroy_component(r1),destroy_component(a1),destroy_component(p1),destroy_component(m1),destroy_component(k1),destroy_component(C1),destroy_component(V1),destroy_component(R1),destroy_component(Q1),destroy_component(G1),R0&&R0.d(),e0=!1,y0()}}}function create_fragment$7(n1){let e1,t1,r1,o1,i1,a1,s1,l1,c1;function u1(d1){n1[5](d1)}function f1(d1){n1[6](d1)}let p1={maxHeight:1e3,anchor:n1[2],$$slots:{default:[create_default_slot$4]},$$scope:{ctx:n1}};return n1[0]!==void 0&&(p1.show=n1[0]),n1[1]!==void 0&&(p1.hide=n1[1]),o1=new Popover({props:p1}),binding_callbacks.push(()=>bind$3(o1,"show",u1)),binding_callbacks.push(()=>bind$3(o1,"hide",f1)),{c(){e1=element("div"),t1=element("button"),t1.textContent="Help",r1=space$1(),create_component(o1.$$.fragment),attr(t1,"class","openMenu svelte-33ytqw"),attr(e1,"class","help svelte-33ytqw")},m(d1,m1){insert$1(d1,e1,m1),append$1(e1,t1),append$1(e1,r1),mount_component(o1,e1,null),n1[7](e1),s1=!0,l1||(c1=listen(t1,"click",function(){is_function(n1[0])&&n1[0].apply(this,arguments)}),l1=!0)},p(d1,[m1]){n1=d1;const _1={};m1&4&&(_1.anchor=n1[2]),m1&266&&(_1.$$scope={dirty:m1,ctx:n1}),!i1&&m1&1&&(i1=!0,_1.show=n1[0],add_flush_callback(()=>i1=!1)),!a1&&m1&2&&(a1=!0,_1.hide=n1[1],add_flush_callback(()=>a1=!1)),o1.$set(_1)},i(d1){s1||(transition_in(o1.$$.fragment,d1),s1=!0)},o(d1){transition_out(o1.$$.fragment,d1),s1=!1},d(d1){d1&&detach(e1),destroy_component(o1),n1[7](null),l1=!1,c1()}}}function instance$8(n1,e1,t1){let r1,o1;component_subscribe(n1,licensing,f1=>t1(4,o1=f1));let i1,a1,s1;function l1(f1){i1=f1,t1(0,i1)}function c1(f1){a1=f1,t1(1,a1)}function u1(f1){binding_callbacks[f1?"unshift":"push"](()=>{s1=f1,t1(2,s1)})}return n1.$$.update=()=>{n1.$$.dirty&16&&t1(3,r1=o1.license&&!o1.isFreePlan)},[i1,a1,s1,r1,o1,l1,c1,u1]}class HelpMenu extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$8,create_fragment$7,safe_not_equal,{})}}const _layout_svelte_svelte_type_style_lang="";function get_each_context(n1,e1,t1){const r1=n1.slice();return r1[17]=e1[t1].title,r1[18]=e1[t1].href,r1}function create_if_block$4(n1){let e1,t1,r1,o1;const i1=[create_if_block_1,create_else_block$2],a1=[];function s1(l1,c1){return l1[4]?0:1}return e1=s1(n1),t1=a1[e1]=i1[e1](n1),{c(){t1.c(),r1=empty$1()},m(l1,c1){a1[e1].m(l1,c1),insert$1(l1,r1,c1),o1=!0},p(l1,c1){let u1=e1;e1=s1(l1),e1===u1?a1[e1].p(l1,c1):(group_outros(),transition_out(a1[u1],1,1,()=>{a1[u1]=null}),check_outros(),t1=a1[e1],t1?t1.p(l1,c1):(t1=a1[e1]=i1[e1](l1),t1.c()),transition_in(t1,1),t1.m(r1.parentNode,r1))},i(l1){o1||(transition_in(t1),o1=!0)},o(l1){transition_out(t1),o1=!1},d(l1){a1[e1].d(l1),l1&&detach(r1)}}}function create_else_block$2(n1){let e1,t1,r1,o1,i1,a1,s1,l1,c1,u1,f1,p1,d1,m1,_1,h1,b1,$1,v1,k1,S1,C1,A1;e1=new HelpMenu({}),a1=new Logo_1({}),c1=new Tabs({props:{selected:n1[3],$$slots:{default:[create_default_slot$3]},$$scope:{ctx:n1}}}),p1=new Icon({props:{hoverable:!0,name:"ShowMenu"}}),p1.$on("click",n1[7]),_1=new UpgradeButton({}),$1=new UserDropdown({});const E1=n1[11].default,z1=create_slot(E1,n1,n1[13],null);return C1=new MobileMenu({props:{visible:n1[2]}}),C1.$on("close",n1[8]),{c(){create_component(e1.$$.fragment),t1=space$1(),r1=element("div"),o1=element("div"),i1=element("div"),create_component(a1.$$.fragment),s1=space$1(),l1=element("div"),create_component(c1.$$.fragment),u1=space$1(),f1=element("div"),create_component(p1.$$.fragment),d1=space$1(),m1=element("div"),create_component(_1.$$.fragment),h1=space$1(),b1=element("div"),create_component($1.$$.fragment),v1=space$1(),k1=element("div"),z1&&z1.c(),S1=space$1(),create_component(C1.$$.fragment),attr(i1,"class","branding svelte-15ejd1k"),attr(l1,"class","desktop svelte-15ejd1k"),attr(f1,"class","mobile svelte-15ejd1k"),attr(m1,"class","desktop svelte-15ejd1k"),attr(b1,"class","dropdown"),attr(o1,"class","nav svelte-15ejd1k"),attr(k1,"class","main svelte-15ejd1k"),attr(r1,"class","container svelte-15ejd1k")},m(I1,N1){mount_component(e1,I1,N1),insert$1(I1,t1,N1),insert$1(I1,r1,N1),append$1(r1,o1),append$1(o1,i1),mount_component(a1,i1,null),append$1(o1,s1),append$1(o1,l1),mount_component(c1,l1,null),append$1(o1,u1),append$1(o1,f1),mount_component(p1,f1,null),append$1(o1,d1),append$1(o1,m1),mount_component(_1,m1,null),append$1(o1,h1),append$1(o1,b1),mount_component($1,b1,null),append$1(r1,v1),append$1(r1,k1),z1&&z1.m(k1,null),append$1(r1,S1),mount_component(C1,r1,null),A1=!0},p(I1,N1){const V1={};N1&8&&(V1.selected=I1[3]),N1&8257&&(V1.$$scope={dirty:N1,ctx:I1}),c1.$set(V1),z1&&z1.p&&(!A1||N1&8192)&&update_slot_base(z1,E1,I1,I1[13],A1?get_slot_changes(E1,I1[13],N1,null):get_all_dirty_from_scope(I1[13]),null);const U1={};N1&4&&(U1.visible=I1[2]),C1.$set(U1)},i(I1){A1||(transition_in(e1.$$.fragment,I1),transition_in(a1.$$.fragment,I1),transition_in(c1.$$.fragment,I1),transition_in(p1.$$.fragment,I1),transition_in(_1.$$.fragment,I1),transition_in($1.$$.fragment,I1),transition_in(z1,I1),transition_in(C1.$$.fragment,I1),A1=!0)},o(I1){transition_out(e1.$$.fragment,I1),transition_out(a1.$$.fragment,I1),transition_out(c1.$$.fragment,I1),transition_out(p1.$$.fragment,I1),transition_out(_1.$$.fragment,I1),transition_out($1.$$.fragment,I1),transition_out(z1,I1),transition_out(C1.$$.fragment,I1),A1=!1},d(I1){destroy_component(e1,I1),I1&&detach(t1),I1&&detach(r1),destroy_component(a1),destroy_component(c1),destroy_component(p1),destroy_component(_1),destroy_component($1),z1&&z1.d(I1),destroy_component(C1)}}}function create_if_block_1(n1){let e1;const t1=n1[11].default,r1=create_slot(t1,n1,n1[13],null);return{c(){r1&&r1.c()},m(o1,i1){r1&&r1.m(o1,i1),e1=!0},p(o1,i1){r1&&r1.p&&(!e1||i1&8192)&&update_slot_base(r1,t1,o1,o1[13],e1?get_slot_changes(t1,o1[13],i1,null):get_all_dirty_from_scope(o1[13]),null)},i(o1){e1||(transition_in(r1,o1),e1=!0)},o(o1){transition_out(r1,o1),e1=!1},d(o1){r1&&r1.d(o1)}}}function create_each_block(n1){let e1,t1;function r1(){return n1[12](n1[18])}return e1=new Tab({props:{title:n1[17]}}),e1.$on("click",r1),{c(){create_component(e1.$$.fragment)},m(o1,i1){mount_component(e1,o1,i1),t1=!0},p(o1,i1){n1=o1;const a1={};i1&1&&(a1.title=n1[17]),e1.$set(a1)},i(o1){t1||(transition_in(e1.$$.fragment,o1),t1=!0)},o(o1){transition_out(e1.$$.fragment,o1),t1=!1},d(o1){destroy_component(e1,o1)}}}function create_default_slot$3(n1){let e1,t1,r1=n1[0],o1=[];for(let a1=0;a1<r1.length;a1+=1)o1[a1]=create_each_block(get_each_context(n1,r1,a1));const i1=a1=>transition_out(o1[a1],1,1,()=>{o1[a1]=null});return{c(){for(let a1=0;a1<o1.length;a1+=1)o1[a1].c();e1=empty$1()},m(a1,s1){for(let l1=0;l1<o1.length;l1+=1)o1[l1].m(a1,s1);insert$1(a1,e1,s1),t1=!0},p(a1,s1){if(s1&65){r1=a1[0];let l1;for(l1=0;l1<r1.length;l1+=1){const c1=get_each_context(a1,r1,l1);o1[l1]?(o1[l1].p(c1,s1),transition_in(o1[l1],1)):(o1[l1]=create_each_block(c1),o1[l1].c(),transition_in(o1[l1],1),o1[l1].m(e1.parentNode,e1))}for(group_outros(),l1=r1.length;l1<o1.length;l1+=1)i1(l1);check_outros()}},i(a1){if(!t1){for(let s1=0;s1<r1.length;s1+=1)transition_in(o1[s1]);t1=!0}},o(a1){o1=o1.filter(Boolean);for(let s1=0;s1<o1.length;s1+=1)transition_out(o1[s1]);t1=!1},d(a1){destroy_each(o1,a1),a1&&detach(e1)}}}function create_fragment$6(n1){let e1,t1,r1=n1[5].user&&n1[1]&&create_if_block$4(n1);return{c(){r1&&r1.c(),e1=empty$1()},m(o1,i1){r1&&r1.m(o1,i1),insert$1(o1,e1,i1),t1=!0},p(o1,[i1]){o1[5].user&&o1[1]?r1?(r1.p(o1,i1),i1&34&&transition_in(r1,1)):(r1=create_if_block$4(o1),r1.c(),transition_in(r1,1),r1.m(e1.parentNode,e1)):r1&&(group_outros(),transition_out(r1,1,1,()=>{r1=null}),check_outros())},i(o1){t1||(transition_in(r1),t1=!0)},o(o1){transition_out(r1),t1=!1},d(o1){r1&&r1.d(o1),o1&&detach(e1)}}}function instance$7(n1,e1,t1){let r1,o1,i1,a1,s1,l1,c1,u1;component_subscribe(n1,redirect,k1=>t1(14,o1=k1)),component_subscribe(n1,auth,k1=>t1(5,i1=k1)),component_subscribe(n1,isActive,k1=>t1(15,a1=k1)),component_subscribe(n1,apps,k1=>t1(9,s1=k1)),component_subscribe(n1,menu,k1=>t1(0,l1=k1)),component_subscribe(n1,url$2,k1=>t1(10,c1=k1)),component_subscribe(n1,goto,k1=>t1(6,u1=k1));let{$$slots:f1={},$$scope:p1}=e1,d1=!1,m1=!1,_1="Apps";const h1=k1=>{for(let S1 of k1)if(a1(S1.href)){_1!==S1.title&&t1(3,_1=S1.title);break}},b1=()=>t1(2,m1=!0),$1=()=>t1(2,m1=!1);onMount(async()=>{var k1,S1;if(i1.user)if(!((S1=(k1=i1.user)==null?void 0:k1.builder)!=null&&S1.global))o1("../");else{try{await Promise.all([apps.load(),organisation.init()])}catch{notifications.error("Error getting org config")}t1(1,d1=!0)}});const v1=k1=>u1(k1);return n1.$$set=k1=>{"$$scope"in k1&&t1(13,p1=k1.$$scope)},n1.$$.update=()=>{n1.$$.dirty&1025&&(c1(),h1(l1)),n1.$$.dirty&512&&t1(4,r1=!s1.length)},[l1,d1,m1,_1,r1,i1,u1,b1,$1,s1,c1,f1,v1,p1]}class Layout$1 extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$7,create_fragment$6,safe_not_equal,{})}}function create_if_block$3(n1){let e1;const t1=n1[11].default,r1=create_slot(t1,n1,n1[10],null);return{c(){r1&&r1.c()},m(o1,i1){r1&&r1.m(o1,i1),e1=!0},p(o1,i1){r1&&r1.p&&(!e1||i1&1024)&&update_slot_base(r1,t1,o1,o1[10],e1?get_slot_changes(t1,o1[10],i1,null):get_all_dirty_from_scope(o1[10]),null)},i(o1){e1||(transition_in(r1,o1),e1=!0)},o(o1){transition_out(r1,o1),e1=!1},d(o1){r1&&r1.d(o1)}}}function create_fragment$5(n1){let e1,t1,r1,o1;e1=new Branding$1({});let i1=n1[0]&&create_if_block$3(n1);return{c(){create_component(e1.$$.fragment),t1=space$1(),i1&&i1.c(),r1=empty$1()},m(a1,s1){mount_component(e1,a1,s1),insert$1(a1,t1,s1),i1&&i1.m(a1,s1),insert$1(a1,r1,s1),o1=!0},p(a1,[s1]){a1[0]?i1?(i1.p(a1,s1),s1&1&&transition_in(i1,1)):(i1=create_if_block$3(a1),i1.c(),transition_in(i1,1),i1.m(r1.parentNode,r1)):i1&&(group_outros(),transition_out(i1,1,1,()=>{i1=null}),check_outros())},i(a1){o1||(transition_in(e1.$$.fragment,a1),transition_in(i1),o1=!0)},o(a1){transition_out(e1.$$.fragment,a1),transition_out(i1),o1=!1},d(a1){destroy_component(e1,a1),a1&&detach(t1),i1&&i1.d(a1),a1&&detach(r1)}}}function instance$6(n1,e1,t1){let r1,o1,i1,a1,s1,l1,c1,u1,f1,p1,d1,m1;component_subscribe(n1,auth,k1=>t1(6,u1=k1)),component_subscribe(n1,redirect,k1=>t1(7,f1=k1)),component_subscribe(n1,isActive,k1=>t1(8,p1=k1)),component_subscribe(n1,admin,k1=>t1(9,d1=k1)),component_subscribe(n1,params,k1=>t1(14,m1=k1));let{$$slots:_1={},$$scope:h1}=e1,b1=!1;const $1=async()=>{const k1=window.location.host;if(k1.includes("localhost:")||!i1)return;const S1=new URL(i1).host;let C1;const A1=k1.split(S1).filter(E1=>E1!=="");if(A1.length===1&&(C1=A1[0].replace(/\./g,"")),l1&&l1.tenantId){if(!C1){if(!window.location.host.includes("localhost")){let E1=window.location.href;E1=E1.replace("://",`://${l1.tenantId}.`),window.location.href=E1}return}if(C1&&l1.tenantId!==C1)try{await auth.logout(),await auth.setOrganisation(null)}catch{console.error(`Tenant mis-match - "${C1}" and "${l1.tenantId}" - logout`)}}else await auth.setOrganisation(C1)};async function v1(){await API.analyticsPing({source:"builder"})}return onMount(async()=>{try{await auth.getSelf(),await admin.init(),u1.user&&await licensing.init(),m1["?template"]&&await auth.setInitInfo({init_template:m1["?template"]}),r1&&await $1()}catch{}t1(0,b1=!0),await v1()}),n1.$$set=k1=>{"$$scope"in k1&&t1(10,h1=k1.$$scope)},n1.$$.update=()=>{var k1,S1,C1;if(n1.$$.dirty&512&&t1(5,r1=d1.multiTenancy),n1.$$.dirty&512&&t1(2,o1=(S1=(k1=d1==null?void 0:d1.checklist)==null?void 0:k1.adminUser)==null?void 0:S1.checked),n1.$$.dirty&512&&(i1=d1==null?void 0:d1.baseUrl),n1.$$.dirty&64&&t1(4,a1=u1.tenantSet),n1.$$.dirty&512&&t1(1,s1=d1==null?void 0:d1.cloud),n1.$$.dirty&64&&(l1=u1.user),n1.$$.dirty&514&&t1(3,c1=s1&&!d1.disableAccountPortal),n1.$$.dirty&1023){const A1=d1.loaded&&u1.loaded;if(b1&&A1&&!u1.user&&!getCookie(Cookies.ReturnUrl)&&!u1.postLogout&&!p1("./auth")&&!p1("./invite")&&!p1("./admin")){const E1=window.location.pathname;setCookie(Cookies.ReturnUrl,E1)}if(b1&&!c1&&A1&&r1&&!a1)f1("./auth/org");else if(b1&&!c1&&A1&&!o1)f1("./admin");else if(b1&&(o1||s1)&&!u1.user&&!p1("./auth")&&!p1("./invite")&&!p1("./admin"))f1("./auth");else if((C1=u1.user)!=null&&C1.forceResetPassword)f1("./auth/reset");else if(b1&&A1&&u1.user){const E1=getCookie(Cookies.ReturnUrl);E1&&(removeCookie(Cookies.ReturnUrl),window.location.href=E1)}}},[b1,s1,o1,c1,a1,r1,u1,f1,p1,d1,h1,_1]}class Layout extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$6,create_fragment$5,safe_not_equal,{})}}function instance$5(n1,e1,t1){let r1;return component_subscribe(n1,redirect,o1=>t1(0,r1=o1)),onMount(async()=>{try{await auth.checkQueryString()}catch{notifications.error("Error setting org")}r1("./builder")}),[]}class Pages extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$5,null,safe_not_equal,{})}}const _tree={root:!0,children:[{isDir:!0,children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/admin/index",id:"_builder_admin_index",component:()=>Admin}],isLayout:!0,path:"/builder/admin",id:"_builder_admin__layout",component:()=>Layout$m},{isDir:!0,children:[{isDir:!0,children:[{isFallback:!0,path:"/builder/app/:application/_fallback",id:"_builder_app__application__fallback",component:()=>Fallback$1},{isIndex:!0,isPage:!0,path:"/builder/app/:application/index",id:"_builder_app__application_index",component:()=>U5Bapplicationu5D},{isDir:!0,children:[{isDir:!0,children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/datasource/:datasourceId/index",id:"_builder_app__application_data_datasource__datasourceId_index",component:()=>U5BdatasourceIdu5D$1}],isLayout:!0,path:"/builder/app/:application/data/datasource/:datasourceId",id:"_builder_app__application_data_datasource__datasourceId__layout",component:()=>Layout$l},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/datasource/bb_internal/index",id:"_builder_app__application_data_datasource_bb_internal_index",component:()=>Bb_internal}],path:"/builder/app/:application/data/datasource/bb_internal"},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/datasource/datasource_internal_bb_default/index",id:"_builder_app__application_data_datasource_datasource_internal_bb_default_index",component:()=>Datasource_internal_bb_default}],path:"/builder/app/:application/data/datasource/datasource_internal_bb_default"},{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/datasource/index",id:"_builder_app__application_data_datasource_index",component:()=>Datasource}],isLayout:!0,path:"/builder/app/:application/data/datasource",id:"_builder_app__application_data_datasource__layout",component:()=>Layout$k},{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/index",id:"_builder_app__application_data_index",component:()=>Data},{isPage:!0,path:"/builder/app/:application/data/new",id:"_builder_app__application_data_new",component:()=>New$3},{isDir:!0,ext:"",children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/query/:queryId/index",id:"_builder_app__application_data_query__queryId_index",component:()=>U5BqueryIdu5D}],isLayout:!0,path:"/builder/app/:application/data/query/:queryId",id:"_builder_app__application_data_query__queryId__layout",component:()=>Layout$j},{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/query/index",id:"_builder_app__application_data_query_index",component:()=>Query},{isDir:!0,ext:"",children:[{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/query/new/:datasourceId/index",id:"_builder_app__application_data_query_new__datasourceId_index",component:()=>U5BdatasourceIdu5D}],path:"/builder/app/:application/data/query/new/:datasourceId"},{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/query/new/index",id:"_builder_app__application_data_query_new_index",component:()=>New$2}],path:"/builder/app/:application/data/query/new"}],path:"/builder/app/:application/data/query"},{isDir:!0,ext:"",children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/table/:tableId/index",id:"_builder_app__application_data_table__tableId_index",component:()=>U5BtableIdu5D},{isDir:!0,ext:"",children:[{isDir:!0,ext:"",children:[{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/table/:tableId/relationship/:rowId/:field/index",id:"_builder_app__application_data_table__tableId_relationship__rowId__field_index",component:()=>U5Bfieldu5D}],path:"/builder/app/:application/data/table/:tableId/relationship/:rowId/:field"},{isIndex:!0,isPage:!0,ownMeta:{index:!1},meta:{index:!1,recursive:!0,preload:!1,prerender:!0},path:"/builder/app/:application/data/table/:tableId/relationship/:rowId/index",id:"_builder_app__application_data_table__tableId_relationship__rowId_index",component:()=>U5BrowIdu5D}],path:"/builder/app/:application/data/table/:tableId/relationship/:rowId"},{isIndex:!0,isPage:!0,ownMeta:{index:!1},meta:{index:!1,recursive:!0,preload:!1,prerender:!0},path:"/builder/app/:application/data/table/:tableId/relationship/index",id:"_builder_app__application_data_table__tableId_relationship_index",component:()=>Relationship}],path:"/builder/app/:application/data/table/:tableId/relationship"}],isLayout:!0,path:"/builder/app/:application/data/table/:tableId",id:"_builder_app__application_data_table__tableId__layout",component:()=>Layout$i},{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/table/index",id:"_builder_app__application_data_table_index",component:()=>Table}],path:"/builder/app/:application/data/table"},{isDir:!0,ext:"",children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/view/:viewName/index",id:"_builder_app__application_data_view__viewName_index",component:()=>U5BviewNameu5D}],isLayout:!0,path:"/builder/app/:application/data/view/:viewName",id:"_builder_app__application_data_view__viewName__layout",component:()=>Layout$h},{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/view/index",id:"_builder_app__application_data_view_index",component:()=>View}],path:"/builder/app/:application/data/view"}],isLayout:!0,ownMeta:{index:1},meta:{index:1,recursive:!0,preload:!1,prerender:!0},path:"/builder/app/:application/data",id:"_builder_app__application_data__layout",component:()=>Layout_1$2},{isDir:!0,children:[{isDir:!0,children:[{isFallback:!0,path:"/builder/app/:application/design/:screenId/_fallback",id:"_builder_app__application_design__screenId__fallback",component:()=>Fallback},{isDir:!0,ext:"",children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/components/:componentId/index",id:"_builder_app__application_design__screenId_components__componentId_index",component:()=>U5BcomponentIdu5D},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/components/:componentId/new/index",id:"_builder_app__application_design__screenId_components__componentId_new_index",component:()=>New$1}],path:"/builder/app/:application/design/:screenId/components/:componentId/new"}],isLayout:!0,path:"/builder/app/:application/design/:screenId/components/:componentId",id:"_builder_app__application_design__screenId_components__componentId__layout",component:()=>Layout$g},{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/components/index",id:"_builder_app__application_design__screenId_components_index",component:()=>Components}],path:"/builder/app/:application/design/:screenId/components"},{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/index",id:"_builder_app__application_design__screenId_index",component:()=>U5BscreenIdu5D},{isDir:!0,children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/layouts/:layoutId/index",id:"_builder_app__application_design__screenId_layouts__layoutId_index",component:()=>U5BlayoutIdu5D}],isLayout:!0,path:"/builder/app/:application/design/:screenId/layouts/:layoutId",id:"_builder_app__application_design__screenId_layouts__layoutId__layout",component:()=>Layout$f},{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/layouts/index",id:"_builder_app__application_design__screenId_layouts_index",component:()=>Layouts}],isLayout:!0,path:"/builder/app/:application/design/:screenId/layouts",id:"_builder_app__application_design__screenId_layouts__layout",component:()=>Layout$e},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/navigation/index",id:"_builder_app__application_design__screenId_navigation_index",component:()=>Navigation}],path:"/builder/app/:application/design/:screenId/navigation"},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/screens/index",id:"_builder_app__application_design__screenId_screens_index",component:()=>Screens}],path:"/builder/app/:application/design/:screenId/screens"},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/theme/index",id:"_builder_app__application_design__screenId_theme_index",component:()=>Theme}],path:"/builder/app/:application/design/:screenId/theme"}],isLayout:!0,path:"/builder/app/:application/design/:screenId",id:"_builder_app__application_design__screenId__layout",component:()=>Layout$d},{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/index",id:"_builder_app__application_design_index",component:()=>Design},{isPage:!0,path:"/builder/app/:application/design/new",id:"_builder_app__application_design_new",component:()=>New}],isLayout:!0,ownMeta:{index:2},meta:{index:2,recursive:!0,preload:!1,prerender:!0},path:"/builder/app/:application/design",id:"_builder_app__application_design__layout",component:()=>Layout$c},{isDir:!0,children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/automation/:automationId/index",id:"_builder_app__application_automation__automationId_index",component:()=>U5BautomationIdu5D}],isLayout:!0,path:"/builder/app/:application/automation/:automationId",id:"_builder_app__application_automation__automationId__layout",component:()=>Layout$b},{isIndex:!0,isPage:!0,path:"/builder/app/:application/automation/index",id:"_builder_app__application_automation_index",component:()=>Automation}],isLayout:!0,ownMeta:{index:3},meta:{index:3,recursive:!0,preload:!1,prerender:!0},path:"/builder/app/:application/automation",id:"_builder_app__application_automation__layout",component:()=>Layout_1$1},{isDir:!0,children:[{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/settings/automation-history/index",id:"_builder_app__application_settings_automationHistory_index",component:()=>Automation_history}],path:"/builder/app/:application/settings/automation-history"},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/settings/backups/index",id:"_builder_app__application_settings_backups_index",component:()=>Backups}],path:"/builder/app/:application/settings/backups"},{isPage:!0,path:"/builder/app/:application/settings/embed",id:"_builder_app__application_settings_embed",component:()=>Embed},{isPage:!0,path:"/builder/app/:application/settings/export",id:"_builder_app__application_settings_export",component:()=>Export},{isIndex:!0,isPage:!0,path:"/builder/app/:application/settings/index",id:"_builder_app__application_settings_index",component:()=>Settings$1},{isPage:!0,path:"/builder/app/:application/settings/name-and-url",id:"_builder_app__application_settings_nameAndUrl",component:()=>Name_and_url},{isPage:!0,path:"/builder/app/:application/settings/version",id:"_builder_app__application_settings_version",component:()=>Version$1}],isLayout:!0,ownMeta:{index:4},meta:{index:4,recursive:!0,preload:!1,prerender:!0},path:"/builder/app/:application/settings",id:"_builder_app__application_settings__layout",component:()=>Layout_1}],isLayout:!0,path:"/builder/app/:application",id:"_builder_app__application__layout",component:()=>Layout$a},{isIndex:!0,isPage:!0,path:"/builder/app/index",id:"_builder_app_index",component:()=>App$1}],isLayout:!0,path:"/builder/app",id:"_builder_app__layout",component:()=>Layout$9},{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/apps/index",id:"_builder_apps_index",component:()=>Apps$1}],isLayout:!0,path:"/builder/apps",id:"_builder_apps__layout",component:()=>Layout$8},{isDir:!0,children:[{isPage:!0,path:"/builder/auth/forgot",id:"_builder_auth_forgot",component:()=>Forgot},{isIndex:!0,isPage:!0,path:"/builder/auth/index",id:"_builder_auth_index",component:()=>Auth$1},{isPage:!0,path:"/builder/auth/login",id:"_builder_auth_login",component:()=>Login},{isPage:!0,path:"/builder/auth/org",id:"_builder_auth_org",component:()=>Org},{isPage:!0,path:"/builder/auth/reset",id:"_builder_auth_reset",component:()=>Reset}],isLayout:!0,path:"/builder/auth",id:"_builder_auth__layout",component:()=>Layout$7},{isPage:!0,path:"/builder/Branding",id:"_builder_Branding",component:()=>Branding$1},{isIndex:!0,isPage:!0,path:"/builder/index",id:"_builder_index",component:()=>Builder},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/invite/index",id:"_builder_invite_index",component:()=>Invite}],path:"/builder/invite"},{isDir:!0,children:[{isDir:!0,children:[{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/portal/account/auditLogs/index",id:"_builder_portal_account_auditLogs_index",component:()=>AuditLogs}],path:"/builder/portal/account/auditLogs"},{isIndex:!0,isPage:!0,path:"/builder/portal/account/index",id:"_builder_portal_account_index",component:()=>Account},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/portal/account/systemLogs/index",id:"_builder_portal_account_systemLogs_index",component:()=>SystemLogs}],path:"/builder/portal/account/systemLogs"},{isPage:!0,path:"/builder/portal/account/upgrade",id:"_builder_portal_account_upgrade",component:()=>Upgrade},{isPage:!0,path:"/builder/portal/account/usage",id:"_builder_portal_account_usage",component:()=>Usage_1}],isLayout:!0,path:"/builder/portal/account",id:"_builder_portal_account__layout",component:()=>Layout$6},{isDir:!0,children:[{isPage:!0,path:"/builder/portal/apps/create",id:"_builder_portal_apps_create",component:()=>Create},{isIndex:!0,isPage:!0,path:"/builder/portal/apps/index",id:"_builder_portal_apps_index",component:()=>Apps},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/portal/apps/onboarding/index",id:"_builder_portal_apps_onboarding_index",component:()=>Onboarding}],path:"/builder/portal/apps/onboarding"},{isPage:!0,path:"/builder/portal/apps/templates",id:"_builder_portal_apps_templates",component:()=>Templates}],isLayout:!0,path:"/builder/portal/apps",id:"_builder_portal_apps__layout",component:()=>Layout$5},{isIndex:!0,isPage:!0,path:"/builder/portal/index",id:"_builder_portal_index",component:()=>Portal},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/portal/plugins/index",id:"_builder_portal_plugins_index",component:()=>Plugins}],path:"/builder/portal/plugins"},{isDir:!0,children:[{isDir:!0,ext:"",children:[{isPage:!0,path:"/builder/portal/settings/auth/google",id:"_builder_portal_settings_auth_google",component:()=>Google},{isIndex:!0,isPage:!0,path:"/builder/portal/settings/auth/index",id:"_builder_portal_settings_auth_index",component:()=>Auth},{isPage:!0,path:"/builder/portal/settings/auth/scim",id:"_builder_portal_settings_auth_scim",component:()=>Scim}],path:"/builder/portal/settings/auth"},{isPage:!0,path:"/builder/portal/settings/branding",id:"_builder_portal_settings_branding",component:()=>Branding},{isPage:!0,path:"/builder/portal/settings/diagnostics",id:"_builder_portal_settings_diagnostics",component:()=>Diagnostics},{isDir:!0,children:[{isPage:!0,path:"/builder/portal/settings/email/:template",id:"_builder_portal_settings_email__template",component:()=>U5Btemplateu5D},{isIndex:!0,isPage:!0,path:"/builder/portal/settings/email/index",id:"_builder_portal_settings_email_index",component:()=>Email}],isLayout:!0,path:"/builder/portal/settings/email",id:"_builder_portal_settings_email__layout",component:()=>Layout$4},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/portal/settings/environment/index",id:"_builder_portal_settings_environment_index",component:()=>Environment}],path:"/builder/portal/settings/environment"},{isIndex:!0,isPage:!0,path:"/builder/portal/settings/index",id:"_builder_portal_settings_index",component:()=>Settings},{isPage:!0,path:"/builder/portal/settings/organisation",id:"_builder_portal_settings_organisation",component:()=>Organisation},{isPage:!0,path:"/builder/portal/settings/version",id:"_builder_portal_settings_version",component:()=>Version}],isLayout:!0,path:"/builder/portal/settings",id:"_builder_portal_settings__layout",component:()=>Layout$3},{isDir:!0,children:[{isDir:!0,ext:"",children:[{isPage:!0,path:"/builder/portal/users/groups/:groupId",id:"_builder_portal_users_groups__groupId",component:()=>U5BgroupIdu5D},{isIndex:!0,isPage:!0,path:"/builder/portal/users/groups/index",id:"_builder_portal_users_groups_index",component:()=>Groups}],path:"/builder/portal/users/groups"},{isIndex:!0,isPage:!0,path:"/builder/portal/users/index",id:"_builder_portal_users_index",component:()=>Users$1},{isDir:!0,ext:"",children:[{isPage:!0,path:"/builder/portal/users/users/:userId",id:"_builder_portal_users_users__userId",component:()=>U5BuserIdu5D},{isIndex:!0,isPage:!0,path:"/builder/portal/users/users/index",id:"_builder_portal_users_users_index",component:()=>Users}],path:"/builder/portal/users/users"}],isLayout:!0,path:"/builder/portal/users",id:"_builder_portal_users__layout",component:()=>Layout$2}],isLayout:!0,path:"/builder/portal",id:"_builder_portal__layout",component:()=>Layout$1}],isLayout:!0,path:"/builder",id:"_builder__layout",component:()=>Layout},{isIndex:!0,isPage:!0,path:"/index",id:"_index",component:()=>Pages}],path:"/"},{tree,routes}=buildClientTree(_tree);var shams=function n1(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e1={},t1=Symbol("test"),r1=Object(t1);if(typeof t1=="string"||Object.prototype.toString.call(t1)!=="[object Symbol]"||Object.prototype.toString.call(r1)!=="[object Symbol]")return!1;var o1=42;e1[t1]=o1;for(t1 in e1)return!1;if(typeof Object.keys=="function"&&Object.keys(e1).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e1).length!==0)return!1;var i1=Object.getOwnPropertySymbols(e1);if(i1.length!==1||i1[0]!==t1||!Object.prototype.propertyIsEnumerable.call(e1,t1))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a1=Object.getOwnPropertyDescriptor(e1,t1);if(a1.value!==o1||a1.enumerable!==!0)return!1}return!0},origSymbol=typeof Symbol<"u"&&Symbol,hasSymbolSham=shams,hasSymbols$2=function n1(){return typeof origSymbol!="function"||typeof Symbol!="function"||typeof origSymbol("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:hasSymbolSham()},ERROR_MESSAGE="Function.prototype.bind called on incompatible ",slice=Array.prototype.slice,toStr$1=Object.prototype.toString,funcType="[object Function]",implementation$1=function n1(e1){var t1=this;if(typeof t1!="function"||toStr$1.call(t1)!==funcType)throw new TypeError(ERROR_MESSAGE+t1);for(var r1=slice.call(arguments,1),o1,i1=function(){if(this instanceof o1){var u1=t1.apply(this,r1.concat(slice.call(arguments)));return Object(u1)===u1?u1:this}else return t1.apply(e1,r1.concat(slice.call(arguments)))},a1=Math.max(0,t1.length-r1.length),s1=[],l1=0;l1<a1;l1++)s1.push("$"+l1);if(o1=Function("binder","return function ("+s1.join(",")+"){ return binder.apply(this,arguments); }")(i1),t1.prototype){var c1=function(){};c1.prototype=t1.prototype,o1.prototype=new c1,c1.prototype=null}return o1},implementation=implementation$1,functionBind=Function.prototype.bind||implementation,bind$2=functionBind,src=bind$2.call(Function.call,Object.prototype.hasOwnProperty),undefined$2,$SyntaxError$1=SyntaxError,$Function$1=Function,$TypeError$2=TypeError,getEvalledConstructor$1=function(n1){try{return $Function$1('"use strict"; return ('+n1+").constructor;")()}catch{}},$gOPD$1=Object.getOwnPropertyDescriptor;if($gOPD$1)try{$gOPD$1({},"")}catch{$gOPD$1=null}var throwTypeError$1=function(){throw new $TypeError$2},ThrowTypeError$1=$gOPD$1?function(){try{return arguments.callee,throwTypeError$1}catch{try{return $gOPD$1(arguments,"callee").get}catch{return throwTypeError$1}}}():throwTypeError$1,hasSymbols$1=hasSymbols$2(),getProto$1=Object.getPrototypeOf||function(n1){return n1.__proto__},needsEval$1={},TypedArray$1=typeof Uint8Array>"u"?undefined$2:getProto$1(Uint8Array),INTRINSICS$1={"%AggregateError%":typeof AggregateError>"u"?undefined$2:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?undefined$2:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols$1?getProto$1([][Symbol.iterator]()):undefined$2,"%AsyncFromSyncIteratorPrototype%":undefined$2,"%AsyncFunction%":needsEval$1,"%AsyncGenerator%":needsEval$1,"%AsyncGeneratorFunction%":needsEval$1,"%AsyncIteratorPrototype%":needsEval$1,"%Atomics%":typeof Atomics>"u"?undefined$2:Atomics,"%BigInt%":typeof BigInt>"u"?undefined$2:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?undefined$2:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?undefined$2:Float32Array,"%Float64Array%":typeof Float64Array>"u"?undefined$2:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?undefined$2:FinalizationRegistry,"%Function%":$Function$1,"%GeneratorFunction%":needsEval$1,"%Int8Array%":typeof Int8Array>"u"?undefined$2:Int8Array,"%Int16Array%":typeof Int16Array>"u"?undefined$2:Int16Array,"%Int32Array%":typeof Int32Array>"u"?undefined$2:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols$1?getProto$1(getProto$1([][Symbol.iterator]())):undefined$2,"%JSON%":typeof JSON=="object"?JSON:undefined$2,"%Map%":typeof Map>"u"?undefined$2:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hasSymbols$1?undefined$2:getProto$1(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?undefined$2:Promise,"%Proxy%":typeof Proxy>"u"?undefined$2:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?undefined$2:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?undefined$2:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hasSymbols$1?undefined$2:getProto$1(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?undefined$2:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols$1?getProto$1(""[Symbol.iterator]()):undefined$2,"%Symbol%":hasSymbols$1?Symbol:undefined$2,"%SyntaxError%":$SyntaxError$1,"%ThrowTypeError%":ThrowTypeError$1,"%TypedArray%":TypedArray$1,"%TypeError%":$TypeError$2,"%Uint8Array%":typeof Uint8Array>"u"?undefined$2:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?undefined$2:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?undefined$2:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?undefined$2:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?undefined$2:WeakMap,"%WeakRef%":typeof WeakRef>"u"?undefined$2:WeakRef,"%WeakSet%":typeof WeakSet>"u"?undefined$2:WeakSet},doEval$1=function n1(e1){var t1;if(e1==="%AsyncFunction%")t1=getEvalledConstructor$1("async function () {}");else if(e1==="%GeneratorFunction%")t1=getEvalledConstructor$1("function* () {}");else if(e1==="%AsyncGeneratorFunction%")t1=getEvalledConstructor$1("async function* () {}");else if(e1==="%AsyncGenerator%"){var r1=n1("%AsyncGeneratorFunction%");r1&&(t1=r1.prototype)}else if(e1==="%AsyncIteratorPrototype%"){var o1=n1("%AsyncGenerator%");o1&&(t1=getProto$1(o1.prototype))}return INTRINSICS$1[e1]=t1,t1},LEGACY_ALIASES$1={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind$1=functionBind,hasOwn$2=src,$concat$2=bind$1.call(Function.call,Array.prototype.concat),$spliceApply$1=bind$1.call(Function.apply,Array.prototype.splice),$replace$2=bind$1.call(Function.call,String.prototype.replace),$strSlice$1=bind$1.call(Function.call,String.prototype.slice),$exec$1=bind$1.call(Function.call,RegExp.prototype.exec),rePropName$1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar$1=/\\(\\)?/g,stringToPath$1=function n1(e1){var t1=$strSlice$1(e1,0,1),r1=$strSlice$1(e1,-1);if(t1==="%"&&r1!=="%")throw new $SyntaxError$1("invalid intrinsic syntax, expected closing `%`");if(r1==="%"&&t1!=="%")throw new $SyntaxError$1("invalid intrinsic syntax, expected opening `%`");var o1=[];return $replace$2(e1,rePropName$1,function(i1,a1,s1,l1){o1[o1.length]=s1?$replace$2(l1,reEscapeChar$1,"$1"):a1||i1}),o1},getBaseIntrinsic$1=function n1(e1,t1){var r1=e1,o1;if(hasOwn$2(LEGACY_ALIASES$1,r1)&&(o1=LEGACY_ALIASES$1[r1],r1="%"+o1[0]+"%"),hasOwn$2(INTRINSICS$1,r1)){var i1=INTRINSICS$1[r1];if(i1===needsEval$1&&(i1=doEval$1(r1)),typeof i1>"u"&&!t1)throw new $TypeError$2("intrinsic "+e1+" exists, but is not available. Please file an issue!");return{alias:o1,name:r1,value:i1}}throw new $SyntaxError$1("intrinsic "+e1+" does not exist!")},getIntrinsic$1=function n1(e1,t1){if(typeof e1!="string"||e1.length===0)throw new $TypeError$2("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t1!="boolean")throw new $TypeError$2('"allowMissing" argument must be a boolean');if($exec$1(/^%?[^%]*%?$/,e1)===null)throw new $SyntaxError$1("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r1=stringToPath$1(e1),o1=r1.length>0?r1[0]:"",i1=getBaseIntrinsic$1("%"+o1+"%",t1),a1=i1.name,s1=i1.value,l1=!1,c1=i1.alias;c1&&(o1=c1[0],$spliceApply$1(r1,$concat$2([0,1],c1)));for(var u1=1,f1=!0;u1<r1.length;u1+=1){var p1=r1[u1],d1=$strSlice$1(p1,0,1),m1=$strSlice$1(p1,-1);if((d1==='"'||d1==="'"||d1==="`"||m1==='"'||m1==="'"||m1==="`")&&d1!==m1)throw new $SyntaxError$1("property names with quotes must have matching quotes");if((p1==="constructor"||!f1)&&(l1=!0),o1+="."+p1,a1="%"+o1+"%",hasOwn$2(INTRINSICS$1,a1))s1=INTRINSICS$1[a1];else if(s1!=null){if(!(p1 in s1)){if(!t1)throw new $TypeError$2("base intrinsic for "+e1+" exists, but the property is not available.");return}if($gOPD$1&&u1+1>=r1.length){var _1=$gOPD$1(s1,p1);f1=!!_1,f1&&"get"in _1&&!("originalValue"in _1.get)?s1=_1.get:s1=s1[p1]}else f1=hasOwn$2(s1,p1),s1=s1[p1];f1&&!l1&&(INTRINSICS$1[a1]=s1)}}return s1},undefined$1,$SyntaxError=SyntaxError,$Function=Function,$TypeError$1=TypeError,getEvalledConstructor=function(n1){try{return $Function('"use strict"; return ('+n1+").constructor;")()}catch{}},$gOPD=Object.getOwnPropertyDescriptor;if($gOPD)try{$gOPD({},"")}catch{$gOPD=null}var throwTypeError=function(){throw new $TypeError$1},ThrowTypeError=$gOPD?function(){try{return arguments.callee,throwTypeError}catch{try{return $gOPD(arguments,"callee").get}catch{return throwTypeError}}}():throwTypeError,hasSymbols=hasSymbols$2(),getProto=Object.getPrototypeOf||function(n1){return n1.__proto__},needsEval={},TypedArray=typeof Uint8Array>"u"?undefined$1:getProto(Uint8Array),INTRINSICS={"%AggregateError%":typeof AggregateError>"u"?undefined$1:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?undefined$1:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols?getProto([][Symbol.iterator]()):undefined$1,"%AsyncFromSyncIteratorPrototype%":undefined$1,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":typeof Atomics>"u"?undefined$1:Atomics,"%BigInt%":typeof BigInt>"u"?undefined$1:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?undefined$1:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?undefined$1:Float32Array,"%Float64Array%":typeof Float64Array>"u"?undefined$1:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?undefined$1:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":typeof Int8Array>"u"?undefined$1:Int8Array,"%Int16Array%":typeof Int16Array>"u"?undefined$1:Int16Array,"%Int32Array%":typeof Int32Array>"u"?undefined$1:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols?getProto(getProto([][Symbol.iterator]())):undefined$1,"%JSON%":typeof JSON=="object"?JSON:undefined$1,"%Map%":typeof Map>"u"?undefined$1:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hasSymbols?undefined$1:getProto(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?undefined$1:Promise,"%Proxy%":typeof Proxy>"u"?undefined$1:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?undefined$1:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?undefined$1:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hasSymbols?undefined$1:getProto(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?undefined$1:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols?getProto(""[Symbol.iterator]()):undefined$1,"%Symbol%":hasSymbols?Symbol:undefined$1,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError$1,"%Uint8Array%":typeof Uint8Array>"u"?undefined$1:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?undefined$1:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?undefined$1:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?undefined$1:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?undefined$1:WeakMap,"%WeakRef%":typeof WeakRef>"u"?undefined$1:WeakRef,"%WeakSet%":typeof WeakSet>"u"?undefined$1:WeakSet},doEval=function n1(e1){var t1;if(e1==="%AsyncFunction%")t1=getEvalledConstructor("async function () {}");else if(e1==="%GeneratorFunction%")t1=getEvalledConstructor("function* () {}");else if(e1==="%AsyncGeneratorFunction%")t1=getEvalledConstructor("async function* () {}");else if(e1==="%AsyncGenerator%"){var r1=n1("%AsyncGeneratorFunction%");r1&&(t1=r1.prototype)}else if(e1==="%AsyncIteratorPrototype%"){var o1=n1("%AsyncGenerator%");o1&&(t1=getProto(o1.prototype))}return INTRINSICS[e1]=t1,t1},LEGACY_ALIASES={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind=functionBind,hasOwn$1=src,$concat$1=bind.call(Function.call,Array.prototype.concat),$spliceApply=bind.call(Function.apply,Array.prototype.splice),$replace$1=bind.call(Function.call,String.prototype.replace),$strSlice=bind.call(Function.call,String.prototype.slice),$exec=bind.call(Function.call,RegExp.prototype.exec),rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=function n1(e1){var t1=$strSlice(e1,0,1),r1=$strSlice(e1,-1);if(t1==="%"&&r1!=="%")throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if(r1==="%"&&t1!=="%")throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var o1=[];return $replace$1(e1,rePropName,function(i1,a1,s1,l1){o1[o1.length]=s1?$replace$1(l1,reEscapeChar,"$1"):a1||i1}),o1},getBaseIntrinsic=function n1(e1,t1){var r1=e1,o1;if(hasOwn$1(LEGACY_ALIASES,r1)&&(o1=LEGACY_ALIASES[r1],r1="%"+o1[0]+"%"),hasOwn$1(INTRINSICS,r1)){var i1=INTRINSICS[r1];if(i1===needsEval&&(i1=doEval(r1)),typeof i1>"u"&&!t1)throw new $TypeError$1("intrinsic "+e1+" exists, but is not available. Please file an issue!");return{alias:o1,name:r1,value:i1}}throw new $SyntaxError("intrinsic "+e1+" does not exist!")},getIntrinsic=function n1(e1,t1){if(typeof e1!="string"||e1.length===0)throw new $TypeError$1("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t1!="boolean")throw new $TypeError$1('"allowMissing" argument must be a boolean');if($exec(/^%?[^%]*%?$/,e1)===null)throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r1=stringToPath(e1),o1=r1.length>0?r1[0]:"",i1=getBaseIntrinsic("%"+o1+"%",t1),a1=i1.name,s1=i1.value,l1=!1,c1=i1.alias;c1&&(o1=c1[0],$spliceApply(r1,$concat$1([0,1],c1)));for(var u1=1,f1=!0;u1<r1.length;u1+=1){var p1=r1[u1],d1=$strSlice(p1,0,1),m1=$strSlice(p1,-1);if((d1==='"'||d1==="'"||d1==="`"||m1==='"'||m1==="'"||m1==="`")&&d1!==m1)throw new $SyntaxError("property names with quotes must have matching quotes");if((p1==="constructor"||!f1)&&(l1=!0),o1+="."+p1,a1="%"+o1+"%",hasOwn$1(INTRINSICS,a1))s1=INTRINSICS[a1];else if(s1!=null){if(!(p1 in s1)){if(!t1)throw new $TypeError$1("base intrinsic for "+e1+" exists, but the property is not available.");return}if($gOPD&&u1+1>=r1.length){var _1=$gOPD(s1,p1);f1=!!_1,f1&&"get"in _1&&!("originalValue"in _1.get)?s1=_1.get:s1=s1[p1]}else f1=hasOwn$1(s1,p1),s1=s1[p1];f1&&!l1&&(INTRINSICS[a1]=s1)}}return s1},callBind$1={exports:{}};(function(n1){var e1=functionBind,t1=getIntrinsic,r1=t1("%Function.prototype.apply%"),o1=t1("%Function.prototype.call%"),i1=t1("%Reflect.apply%",!0)||e1.call(o1,r1),a1=t1("%Object.getOwnPropertyDescriptor%",!0),s1=t1("%Object.defineProperty%",!0),l1=t1("%Math.max%");if(s1)try{s1({},"a",{value:1})}catch{s1=null}n1.exports=function(f1){var p1=i1(e1,o1,arguments);if(a1&&s1){var d1=a1(p1,"length");d1.configurable&&s1(p1,"length",{value:1+l1(0,f1.length-(arguments.length-1))})}return p1};var c1=function(){return i1(e1,r1,arguments)};s1?s1(n1.exports,"apply",{value:c1}):n1.exports.apply=c1})(callBind$1);var GetIntrinsic$1=getIntrinsic,callBind=callBind$1.exports,$indexOf=callBind(GetIntrinsic$1("String.prototype.indexOf")),callBound$1=function n1(e1,t1){var r1=GetIntrinsic$1(e1,!!t1);return typeof r1=="function"&&$indexOf(e1,".prototype.")>-1?callBind(r1):r1},hasMap=typeof Map=="function"&&Map.prototype,mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,mapSize=hasMap&&mapSizeDescriptor&&typeof mapSizeDescriptor.get=="function"?mapSizeDescriptor.get:null,mapForEach=hasMap&&Map.prototype.forEach,hasSet=typeof Set=="function"&&Set.prototype,setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,setSize=hasSet&&setSizeDescriptor&&typeof setSizeDescriptor.get=="function"?setSizeDescriptor.get:null,setForEach=hasSet&&Set.prototype.forEach,hasWeakMap=typeof WeakMap=="function"&&WeakMap.prototype,weakMapHas=hasWeakMap?WeakMap.prototype.has:null,hasWeakSet=typeof WeakSet=="function"&&WeakSet.prototype,weakSetHas=hasWeakSet?WeakSet.prototype.has:null,hasWeakRef=typeof WeakRef=="function"&&WeakRef.prototype,weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null,booleanValueOf=Boolean.prototype.valueOf,objectToString=Object.prototype.toString,functionToString=Function.prototype.toString,$match=String.prototype.match,$slice=String.prototype.slice,$replace=String.prototype.replace,$toUpperCase=String.prototype.toUpperCase,$toLowerCase=String.prototype.toLowerCase,$test=RegExp.prototype.test,$concat=Array.prototype.concat,$join=Array.prototype.join,$arrSlice=Array.prototype.slice,$floor=Math.floor,bigIntValueOf=typeof BigInt=="function"?BigInt.prototype.valueOf:null,gOPS=Object.getOwnPropertySymbols,symToString=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,hasShammedSymbols=typeof Symbol=="function"&&typeof Symbol.iterator=="object",toStringTag=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hasShammedSymbols?"object":"symbol")?Symbol.toStringTag:null,isEnumerable=Object.prototype.propertyIsEnumerable,gPO=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n1){return n1.__proto__}:null);function addNumericSeparator(n1,e1){if(n1===1/0||n1===-1/0||n1!==n1||n1&&n1>-1e3&&n1<1e3||$test.call(/e/,e1))return e1;var t1=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n1=="number"){var r1=n1<0?-$floor(-n1):$floor(n1);if(r1!==n1){var o1=String(r1),i1=$slice.call(e1,o1.length+1);return $replace.call(o1,t1,"$&_")+"."+$replace.call($replace.call(i1,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(e1,t1,"$&_")}var utilInspect=require$$0,inspectCustom=utilInspect.custom,inspectSymbol=isSymbol(inspectCustom)?inspectCustom:null,objectInspect=function n1(e1,t1,r1,o1){var i1=t1||{};if(has$3(i1,"quoteStyle")&&i1.quoteStyle!=="single"&&i1.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has$3(i1,"maxStringLength")&&(typeof i1.maxStringLength=="number"?i1.maxStringLength<0&&i1.maxStringLength!==1/0:i1.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a1=has$3(i1,"customInspect")?i1.customInspect:!0;if(typeof a1!="boolean"&&a1!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has$3(i1,"indent")&&i1.indent!==null&&i1.indent!==" "&&!(parseInt(i1.indent,10)===i1.indent&&i1.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has$3(i1,"numericSeparator")&&typeof i1.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s1=i1.numericSeparator;if(typeof e1>"u")return"undefined";if(e1===null)return"null";if(typeof e1=="boolean")return e1?"true":"false";if(typeof e1=="string")return inspectString(e1,i1);if(typeof e1=="number"){if(e1===0)return 1/0/e1>0?"0":"-0";var l1=String(e1);return s1?addNumericSeparator(e1,l1):l1}if(typeof e1=="bigint"){var c1=String(e1)+"n";return s1?addNumericSeparator(e1,c1):c1}var u1=typeof i1.depth>"u"?5:i1.depth;if(typeof r1>"u"&&(r1=0),r1>=u1&&u1>0&&typeof e1=="object")return isArray$3(e1)?"[Array]":"[Object]";var f1=getIndent(i1,r1);if(typeof o1>"u")o1=[];else if(indexOf(o1,e1)>=0)return"[Circular]";function p1(U1,R1,D1){if(R1&&(o1=$arrSlice.call(o1),o1.push(R1)),D1){var F1={depth:i1.depth};return has$3(i1,"quoteStyle")&&(F1.quoteStyle=i1.quoteStyle),n1(U1,F1,r1+1,o1)}return n1(U1,i1,r1+1,o1)}if(typeof e1=="function"&&!isRegExp$1(e1)){var d1=nameOf(e1),m1=arrObjKeys(e1,p1);return"[Function"+(d1?": "+d1:" (anonymous)")+"]"+(m1.length>0?" { "+$join.call(m1,", ")+" }":"")}if(isSymbol(e1)){var _1=hasShammedSymbols?$replace.call(String(e1),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(e1);return typeof e1=="object"&&!hasShammedSymbols?markBoxed(_1):_1}if(isElement(e1)){for(var h1="<"+$toLowerCase.call(String(e1.nodeName)),b1=e1.attributes||[],$1=0;$1<b1.length;$1++)h1+=" "+b1[$1].name+"="+wrapQuotes(quote(b1[$1].value),"double",i1);return h1+=">",e1.childNodes&&e1.childNodes.length&&(h1+="..."),h1+="</"+$toLowerCase.call(String(e1.nodeName))+">",h1}if(isArray$3(e1)){if(e1.length===0)return"[]";var v1=arrObjKeys(e1,p1);return f1&&!singleLineValues(v1)?"["+indentedJoin(v1,f1)+"]":"[ "+$join.call(v1,", ")+" ]"}if(isError(e1)){var k1=arrObjKeys(e1,p1);return!("cause"in Error.prototype)&&"cause"in e1&&!isEnumerable.call(e1,"cause")?"{ ["+String(e1)+"] "+$join.call($concat.call("[cause]: "+p1(e1.cause),k1),", ")+" }":k1.length===0?"["+String(e1)+"]":"{ ["+String(e1)+"] "+$join.call(k1,", ")+" }"}if(typeof e1=="object"&&a1){if(inspectSymbol&&typeof e1[inspectSymbol]=="function"&&utilInspect)return utilInspect(e1,{depth:u1-r1});if(a1!=="symbol"&&typeof e1.inspect=="function")return e1.inspect()}if(isMap(e1)){var S1=[];return mapForEach.call(e1,function(U1,R1){S1.push(p1(R1,e1,!0)+" => "+p1(U1,e1))}),collectionOf("Map",mapSize.call(e1),S1,f1)}if(isSet(e1)){var C1=[];return setForEach.call(e1,function(U1){C1.push(p1(U1,e1))}),collectionOf("Set",setSize.call(e1),C1,f1)}if(isWeakMap(e1))return weakCollectionOf("WeakMap");if(isWeakSet(e1))return weakCollectionOf("WeakSet");if(isWeakRef(e1))return weakCollectionOf("WeakRef");if(isNumber(e1))return markBoxed(p1(Number(e1)));if(isBigInt(e1))return markBoxed(p1(bigIntValueOf.call(e1)));if(isBoolean(e1))return markBoxed(booleanValueOf.call(e1));if(isString(e1))return markBoxed(p1(String(e1)));if(!isDate(e1)&&!isRegExp$1(e1)){var A1=arrObjKeys(e1,p1),E1=gPO?gPO(e1)===Object.prototype:e1 instanceof Object||e1.constructor===Object,z1=e1 instanceof Object?"":"null prototype",I1=!E1&&toStringTag&&Object(e1)===e1&&toStringTag in e1?$slice.call(toStr(e1),8,-1):z1?"Object":"",N1=E1||typeof e1.constructor!="function"?"":e1.constructor.name?e1.constructor.name+" ":"",V1=N1+(I1||z1?"["+$join.call($concat.call([],I1||[],z1||[]),": ")+"] ":"");return A1.length===0?V1+"{}":f1?V1+"{"+indentedJoin(A1,f1)+"}":V1+"{ "+$join.call(A1,", ")+" }"}return String(e1)};function wrapQuotes(n1,e1,t1){var r1=(t1.quoteStyle||e1)==="double"?'"':"'";return r1+n1+r1}function quote(n1){return $replace.call(String(n1),/"/g,"&quot;")}function isArray$3(n1){return toStr(n1)==="[object Array]"&&(!toStringTag||!(typeof n1=="object"&&toStringTag in n1))}function isDate(n1){return toStr(n1)==="[object Date]"&&(!toStringTag||!(typeof n1=="object"&&toStringTag in n1))}function isRegExp$1(n1){return toStr(n1)==="[object RegExp]"&&(!toStringTag||!(typeof n1=="object"&&toStringTag in n1))}function isError(n1){return toStr(n1)==="[object Error]"&&(!toStringTag||!(typeof n1=="object"&&toStringTag in n1))}function isString(n1){return toStr(n1)==="[object String]"&&(!toStringTag||!(typeof n1=="object"&&toStringTag in n1))}function isNumber(n1){return toStr(n1)==="[object Number]"&&(!toStringTag||!(typeof n1=="object"&&toStringTag in n1))}function isBoolean(n1){return toStr(n1)==="[object Boolean]"&&(!toStringTag||!(typeof n1=="object"&&toStringTag in n1))}function isSymbol(n1){if(hasShammedSymbols)return n1&&typeof n1=="object"&&n1 instanceof Symbol;if(typeof n1=="symbol")return!0;if(!n1||typeof n1!="object"||!symToString)return!1;try{return symToString.call(n1),!0}catch{}return!1}function isBigInt(n1){if(!n1||typeof n1!="object"||!bigIntValueOf)return!1;try{return bigIntValueOf.call(n1),!0}catch{}return!1}var hasOwn=Object.prototype.hasOwnProperty||function(n1){return n1 in this};function has$3(n1,e1){return hasOwn.call(n1,e1)}function toStr(n1){return objectToString.call(n1)}function nameOf(n1){if(n1.name)return n1.name;var e1=$match.call(functionToString.call(n1),/^function\s*([\w$]+)/);return e1?e1[1]:null}function indexOf(n1,e1){if(n1.indexOf)return n1.indexOf(e1);for(var t1=0,r1=n1.length;t1<r1;t1++)if(n1[t1]===e1)return t1;return-1}function isMap(n1){if(!mapSize||!n1||typeof n1!="object")return!1;try{mapSize.call(n1);try{setSize.call(n1)}catch{return!0}return n1 instanceof Map}catch{}return!1}function isWeakMap(n1){if(!weakMapHas||!n1||typeof n1!="object")return!1;try{weakMapHas.call(n1,weakMapHas);try{weakSetHas.call(n1,weakSetHas)}catch{return!0}return n1 instanceof WeakMap}catch{}return!1}function isWeakRef(n1){if(!weakRefDeref||!n1||typeof n1!="object")return!1;try{return weakRefDeref.call(n1),!0}catch{}return!1}function isSet(n1){if(!setSize||!n1||typeof n1!="object")return!1;try{setSize.call(n1);try{mapSize.call(n1)}catch{return!0}return n1 instanceof Set}catch{}return!1}function isWeakSet(n1){if(!weakSetHas||!n1||typeof n1!="object")return!1;try{weakSetHas.call(n1,weakSetHas);try{weakMapHas.call(n1,weakMapHas)}catch{return!0}return n1 instanceof WeakSet}catch{}return!1}function isElement(n1){return!n1||typeof n1!="object"?!1:typeof HTMLElement<"u"&&n1 instanceof HTMLElement?!0:typeof n1.nodeName=="string"&&typeof n1.getAttribute=="function"}function inspectString(n1,e1){if(n1.length>e1.maxStringLength){var t1=n1.length-e1.maxStringLength,r1="... "+t1+" more character"+(t1>1?"s":"");return inspectString($slice.call(n1,0,e1.maxStringLength),e1)+r1}var o1=$replace.call($replace.call(n1,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lowbyte);return wrapQuotes(o1,"single",e1)}function lowbyte(n1){var e1=n1.charCodeAt(0),t1={8:"b",9:"t",10:"n",12:"f",13:"r"}[e1];return t1?"\\"+t1:"\\x"+(e1<16?"0":"")+$toUpperCase.call(e1.toString(16))}function markBoxed(n1){return"Object("+n1+")"}function weakCollectionOf(n1){return n1+" { ? }"}function collectionOf(n1,e1,t1,r1){var o1=r1?indentedJoin(t1,r1):$join.call(t1,", ");return n1+" ("+e1+") {"+o1+"}"}function singleLineValues(n1){for(var e1=0;e1<n1.length;e1++)if(indexOf(n1[e1],`
1847
+ Upgrade your plan to re-activate your account.`}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1[0]&1048584&&(i1.onConfirm=r1[33]),o1[0]&1048576&&(i1.buttonText=r1[20]?"Upgrade":"View plans"),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_else_block$3(n1){let e1,t1;return e1=new SCIMBanner({}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p:noop$5,i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_if_block_1$4(n1){let e1,t1;return e1=new ButtonGroup({props:{$$slots:{default:[create_default_slot_7$3]},$$scope:{ctx:n1}}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1[0]&527432|o1[1]&2097152&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_9$2(n1){let e1;return{c(){e1=text("Add users")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_8$2(n1){let e1;return{c(){e1=text("Import")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_7$3(n1){let e1,t1,r1,o1;return e1=new Button({props:{disabled:n1[19],cta:!0,$$slots:{default:[create_default_slot_9$2]},$$scope:{ctx:n1}}}),e1.$on("click",function(){is_function(n1[3].userLimitReached?n1[11].show:n1[6].show)&&(n1[3].userLimitReached?n1[11].show:n1[6].show).apply(this,arguments)}),r1=new Button({props:{disabled:n1[19],secondary:!0,$$slots:{default:[create_default_slot_8$2]},$$scope:{ctx:n1}}}),r1.$on("click",function(){is_function(n1[3].userLimitReached?n1[11].show:n1[10].show)&&(n1[3].userLimitReached?n1[11].show:n1[10].show).apply(this,arguments)}),{c(){create_component(e1.$$.fragment),t1=space$1(),create_component(r1.$$.fragment)},m(i1,a1){mount_component(e1,i1,a1),insert$1(i1,t1,a1),mount_component(r1,i1,a1),o1=!0},p(i1,a1){n1=i1;const s1={};a1[0]&524288&&(s1.disabled=n1[19]),a1[1]&2097152&&(s1.$$scope={dirty:a1,ctx:n1}),e1.$set(s1);const l1={};a1[0]&524288&&(l1.disabled=n1[19]),a1[1]&2097152&&(l1.$$scope={dirty:a1,ctx:n1}),r1.$set(l1)},i(i1){o1||(transition_in(e1.$$.fragment,i1),transition_in(r1.$$.fragment,i1),o1=!0)},o(i1){transition_out(e1.$$.fragment,i1),transition_out(r1.$$.fragment,i1),o1=!1},d(i1){destroy_component(e1,i1),i1&&detach(t1),destroy_component(r1,i1)}}}function create_if_block$9(n1){let e1,t1;return e1=new DeleteRowsButton({props:{item:"user",selectedRows:n1[12],deleteRows:n1[27]}}),e1.$on("updaterows",n1[35]),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1[0]&4096&&(i1.selectedRows=r1[12]),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_6$4(n1){let e1,t1,r1,o1,i1,a1,s1,l1,c1,u1,f1,p1,d1,m1,_1,h1,b1,$1,v1,k1,S1,C1;e1=new Layout$n({props:{gap:"XS",noPadding:!0,$$slots:{default:[create_default_slot_10$1]},$$scope:{ctx:n1}}}),r1=new Divider({});let A1=n1[3].errUserLimit&&create_if_block_2$2(n1);const E1=[create_if_block_1$4,create_else_block$3],z1=[];function I1(F1,q1){return F1[19]?1:0}s1=I1(n1),l1=z1[s1]=E1[s1](n1);function N1(F1){n1[34](F1)}let V1={placeholder:"Search"};n1[0]!==void 0&&(V1.value=n1[0]),f1=new Search_1({props:V1}),binding_callbacks.push(()=>bind$3(f1,"value",N1));let U1=n1[12].length>0&&create_if_block$9(n1);function R1(F1){n1[36](F1)}let D1={schema:n1[1],data:n1[5],allowEditColumns:!1,allowEditRows:!1,allowSelectRows:!n1[19],customRenderers:n1[23],loading:!n1[2].loaded||!n1[4]};return n1[12]!==void 0&&(D1.selectedRows=n1[12]),_1=new Table$1({props:D1}),binding_callbacks.push(()=>bind$3(_1,"selectedRows",R1)),_1.$on("click",n1[37]),v1=new Pagination$1({props:{page:n1[2].pageNumber+1,hasPrevPage:n1[2].loading?!1:n1[2].hasPrevPage,hasNextPage:n1[2].loading?!1:n1[2].hasNextPage,goToPrevPage:n1[22].prevPage,goToNextPage:n1[22].nextPage}}),S1=new Table$1({props:{schema:n1[18],data:n1[16],allowEditColumns:!1,allowEditRows:!1,customRenderers:n1[23],loading:!n1[15],allowClickRows:!1}}),{c(){create_component(e1.$$.fragment),t1=space$1(),create_component(r1.$$.fragment),o1=space$1(),A1&&A1.c(),i1=space$1(),a1=element("div"),l1.c(),c1=space$1(),u1=element("div"),create_component(f1.$$.fragment),d1=space$1(),U1&&U1.c(),m1=space$1(),create_component(_1.$$.fragment),b1=space$1(),$1=element("div"),create_component(v1.$$.fragment),k1=space$1(),create_component(S1.$$.fragment),attr(u1,"class","controls-right svelte-146drlc"),attr(a1,"class","controls svelte-146drlc"),attr($1,"class","pagination svelte-146drlc")},m(F1,q1){mount_component(e1,F1,q1),insert$1(F1,t1,q1),mount_component(r1,F1,q1),insert$1(F1,o1,q1),A1&&A1.m(F1,q1),insert$1(F1,i1,q1),insert$1(F1,a1,q1),z1[s1].m(a1,null),append$1(a1,c1),append$1(a1,u1),mount_component(f1,u1,null),append$1(u1,d1),U1&&U1.m(u1,null),insert$1(F1,m1,q1),mount_component(_1,F1,q1),insert$1(F1,b1,q1),insert$1(F1,$1,q1),mount_component(v1,$1,null),insert$1(F1,k1,q1),mount_component(S1,F1,q1),C1=!0},p(F1,q1){const K1={};q1[1]&2097152&&(K1.$$scope={dirty:q1,ctx:F1}),e1.$set(K1),F1[3].errUserLimit?A1?(A1.p(F1,q1),q1[0]&8&&transition_in(A1,1)):(A1=create_if_block_2$2(F1),A1.c(),transition_in(A1,1),A1.m(i1.parentNode,i1)):A1&&(group_outros(),transition_out(A1,1,1,()=>{A1=null}),check_outros());let J1=s1;s1=I1(F1),s1===J1?z1[s1].p(F1,q1):(group_outros(),transition_out(z1[J1],1,1,()=>{z1[J1]=null}),check_outros(),l1=z1[s1],l1?l1.p(F1,q1):(l1=z1[s1]=E1[s1](F1),l1.c()),transition_in(l1,1),l1.m(a1,c1));const Q1={};!p1&&q1[0]&1&&(p1=!0,Q1.value=F1[0],add_flush_callback(()=>p1=!1)),f1.$set(Q1),F1[12].length>0?U1?(U1.p(F1,q1),q1[0]&4096&&transition_in(U1,1)):(U1=create_if_block$9(F1),U1.c(),transition_in(U1,1),U1.m(u1,null)):U1&&(group_outros(),transition_out(U1,1,1,()=>{U1=null}),check_outros());const Z1={};q1[0]&2&&(Z1.schema=F1[1]),q1[0]&32&&(Z1.data=F1[5]),q1[0]&524288&&(Z1.allowSelectRows=!F1[19]),q1[0]&20&&(Z1.loading=!F1[2].loaded||!F1[4]),!h1&&q1[0]&4096&&(h1=!0,Z1.selectedRows=F1[12],add_flush_callback(()=>h1=!1)),_1.$set(Z1);const G1={};q1[0]&4&&(G1.page=F1[2].pageNumber+1),q1[0]&4&&(G1.hasPrevPage=F1[2].loading?!1:F1[2].hasPrevPage),q1[0]&4&&(G1.hasNextPage=F1[2].loading?!1:F1[2].hasNextPage),v1.$set(G1);const W1={};q1[0]&262144&&(W1.schema=F1[18]),q1[0]&65536&&(W1.data=F1[16]),q1[0]&32768&&(W1.loading=!F1[15]),S1.$set(W1)},i(F1){C1||(transition_in(e1.$$.fragment,F1),transition_in(r1.$$.fragment,F1),transition_in(A1),transition_in(l1),transition_in(f1.$$.fragment,F1),transition_in(U1),transition_in(_1.$$.fragment,F1),transition_in(v1.$$.fragment,F1),transition_in(S1.$$.fragment,F1),C1=!0)},o(F1){transition_out(e1.$$.fragment,F1),transition_out(r1.$$.fragment,F1),transition_out(A1),transition_out(l1),transition_out(f1.$$.fragment,F1),transition_out(U1),transition_out(_1.$$.fragment,F1),transition_out(v1.$$.fragment,F1),transition_out(S1.$$.fragment,F1),C1=!1},d(F1){destroy_component(e1,F1),F1&&detach(t1),destroy_component(r1,F1),F1&&detach(o1),A1&&A1.d(F1),F1&&detach(i1),F1&&detach(a1),z1[s1].d(),destroy_component(f1),U1&&U1.d(),F1&&detach(m1),destroy_component(_1,F1),F1&&detach(b1),F1&&detach($1),destroy_component(v1),F1&&detach(k1),destroy_component(S1,F1)}}}function create_default_slot_5$4(n1){let e1,t1;return e1=new AddUserModal({props:{showOnboardingTypeModal:n1[24]}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p:noop$5,i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_4$5(n1){let e1,t1;return e1=new InvitedModal({props:{inviteUsersResponse:n1[17]}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1[0]&131072&&(i1.inviteUsersResponse=r1[17]),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_3$5(n1){let e1,t1;return e1=new OnboardingTypeModal({props:{chooseCreationType:n1[26]}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p:noop$5,i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_2$6(n1){let e1,t1;return e1=new PasswordModal({props:{createUsersResponse:n1[13],userData:n1[14].users}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1[0]&8192&&(i1.createUsersResponse=r1[13]),o1[0]&16384&&(i1.userData=r1[14].users),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_1$9(n1){let e1,t1;return e1=new ImportUsersModal({props:{createUsersFromCsv:n1[25]}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p:noop$5,i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot$b(n1){let e1,t1;return e1=new UpgradeModal({props:{isOwner:n1[20]}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1[0]&1048576&&(i1.isOwner=r1[20]),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_fragment$f(n1){let e1,t1,r1,o1,i1,a1,s1,l1,c1,u1,f1,p1,d1,m1;e1=new Layout$n({props:{noPadding:!0,gap:"M",$$slots:{default:[create_default_slot_6$4]},$$scope:{ctx:n1}}});let _1={$$slots:{default:[create_default_slot_5$4]},$$scope:{ctx:n1}};r1=new Modal({props:_1}),n1[38](r1);let h1={$$slots:{default:[create_default_slot_4$5]},$$scope:{ctx:n1}};i1=new Modal({props:h1}),n1[39](i1);let b1={$$slots:{default:[create_default_slot_3$5]},$$scope:{ctx:n1}};s1=new Modal({props:b1}),n1[40](s1);let $1={disableCancel:!0,$$slots:{default:[create_default_slot_2$6]},$$scope:{ctx:n1}};c1=new Modal({props:$1}),n1[41](c1);let v1={$$slots:{default:[create_default_slot_1$9]},$$scope:{ctx:n1}};f1=new Modal({props:v1}),n1[42](f1);let k1={$$slots:{default:[create_default_slot$b]},$$scope:{ctx:n1}};return d1=new Modal({props:k1}),n1[43](d1),{c(){create_component(e1.$$.fragment),t1=space$1(),create_component(r1.$$.fragment),o1=space$1(),create_component(i1.$$.fragment),a1=space$1(),create_component(s1.$$.fragment),l1=space$1(),create_component(c1.$$.fragment),u1=space$1(),create_component(f1.$$.fragment),p1=space$1(),create_component(d1.$$.fragment)},m(S1,C1){mount_component(e1,S1,C1),insert$1(S1,t1,C1),mount_component(r1,S1,C1),insert$1(S1,o1,C1),mount_component(i1,S1,C1),insert$1(S1,a1,C1),mount_component(s1,S1,C1),insert$1(S1,l1,C1),mount_component(c1,S1,C1),insert$1(S1,u1,C1),mount_component(f1,S1,C1),insert$1(S1,p1,C1),mount_component(d1,S1,C1),m1=!0},p(S1,C1){const A1={};C1[0]&4037759|C1[1]&2097152&&(A1.$$scope={dirty:C1,ctx:S1}),e1.$set(A1);const E1={};C1[1]&2097152&&(E1.$$scope={dirty:C1,ctx:S1}),r1.$set(E1);const z1={};C1[0]&131072|C1[1]&2097152&&(z1.$$scope={dirty:C1,ctx:S1}),i1.$set(z1);const I1={};C1[1]&2097152&&(I1.$$scope={dirty:C1,ctx:S1}),s1.$set(I1);const N1={};C1[0]&24576|C1[1]&2097152&&(N1.$$scope={dirty:C1,ctx:S1}),c1.$set(N1);const V1={};C1[1]&2097152&&(V1.$$scope={dirty:C1,ctx:S1}),f1.$set(V1);const U1={};C1[0]&1048576|C1[1]&2097152&&(U1.$$scope={dirty:C1,ctx:S1}),d1.$set(U1)},i(S1){m1||(transition_in(e1.$$.fragment,S1),transition_in(r1.$$.fragment,S1),transition_in(i1.$$.fragment,S1),transition_in(s1.$$.fragment,S1),transition_in(c1.$$.fragment,S1),transition_in(f1.$$.fragment,S1),transition_in(d1.$$.fragment,S1),m1=!0)},o(S1){transition_out(e1.$$.fragment,S1),transition_out(r1.$$.fragment,S1),transition_out(i1.$$.fragment,S1),transition_out(s1.$$.fragment,S1),transition_out(c1.$$.fragment,S1),transition_out(f1.$$.fragment,S1),transition_out(d1.$$.fragment,S1),m1=!1},d(S1){destroy_component(e1,S1),S1&&detach(t1),n1[38](null),destroy_component(r1,S1),S1&&detach(o1),n1[39](null),destroy_component(i1,S1),S1&&detach(a1),n1[40](null),destroy_component(s1,S1),S1&&detach(l1),n1[41](null),destroy_component(c1,S1),S1&&detach(u1),n1[42](null),destroy_component(f1,S1),S1&&detach(p1),n1[43](null),destroy_component(d1,S1)}}}function instance$g(n1,e1,t1){let r1,o1,i1,a1,s1,l1,c1,u1,f1,p1,d1,m1,_1;component_subscribe(n1,organisation,m0=>t1(44,l1=m0)),component_subscribe(n1,groups,m0=>t1(29,c1=m0)),component_subscribe(n1,licensing,m0=>t1(3,f1=m0)),component_subscribe(n1,features,m0=>t1(30,p1=m0)),component_subscribe(n1,auth,m0=>t1(31,d1=m0)),component_subscribe(n1,admin,m0=>t1(32,m1=m0)),component_subscribe(n1,goto,m0=>t1(21,_1=m0));const h1=fetchData({API,datasource:{type:"user"}});component_subscribe(n1,h1,m0=>t1(2,u1=m0));let b1=!f1.groupsEnabled||(c1==null?void 0:c1.length),$1=[],v1,k1,S1,C1,A1,E1,z1,I1=[],N1,V1=[{column:"userGroups",component:GroupsTableRenderer},{column:"apps",component:AppsTableRenderer},{column:"role",component:RoleTableRenderer}],U1=[];const R1=m0=>{if(!m0)return{};let S2=JSON.parse(JSON.stringify(m0));return S2.email.displayName="Pending Invites",S2};let D1=!1,F1=[],q1=[];const K1=m0=>m0.map(S2=>{const{admin:B0,builder:w0,userGroups:z0,apps:u0}=S2.info;return{email:S2.email,builder:w0,admin:B0,userGroups:z0,apps:u0?[...new Set(Object.keys(u0))]:void 0}}),Q1=debounce(m0=>{h1.update({query:{email:m0}})},250),Z1=async m0=>{var S2;t1(14,U1=await W1(m0)),(S2=U1==null?void 0:U1.users)!=null&&S2.length&&(l1.isSSOEnforced?await _0(OnboardingType.EMAIL):S1.show())};async function G1(){var S2;const m0=(S2=U1==null?void 0:U1.users)==null?void 0:S2.map(B0=>({email:B0.email,builder:B0.role===BudibaseRoles.Developer,admin:B0.role===BudibaseRoles.Admin,groups:U1.groups}));try{t1(17,s1=await users.invite(m0)),t1(28,F1=await users.getInvites()),k1.show()}catch{notifications.error("Error inviting user")}}const W1=async m0=>{var w0,z0;const S2=((w0=await users.fetch())==null?void 0:w0.map(u0=>u0.email))||[],B0=[];for(const u0 of(z0=m0==null?void 0:m0.users)!=null?z0:[]){const{email:S0}=u0;B0.find(p0=>p0.email===S0)||S2.includes(S0)||B0.push(u0)}return B0.length||notifications.info("Duplicated! There is no new users to add."),{...m0,users:B0}},s0=async m0=>{const{userEmails:S2,usersRole:B0,userGroups:w0}=m0,z0=[];for(const u0 of S2){const S0={email:u0,role:B0,password:Math.random().toString(36).substring(2,22),forceResetPassword:!0};z0.push(S0)}if(t1(14,U1=await W1({groups:w0,users:z0})),!!U1.users.length)return n0()};async function n0(){try{t1(13,N1=await users.create(await W1(U1))),notifications.success("Successfully created user"),await groups.actions.init(),C1.show(),await h1.refresh()}catch{notifications.error("Error creating user")}}async function _0(m0){m0===OnboardingType.EMAIL?await G1():await n0()}const l0=async()=>{try{let m0=I1.map(S2=>S2._id);if(m0.includes(get_store_value(auth).user._id)){notifications.error("You cannot delete yourself");return}await users.bulkDelete(m0),notifications.success(`Successfully deleted ${I1.length} rows`),t1(12,I1=[]),await h1.refresh()}catch{notifications.error("Error deleting rows")}};onMount(async()=>{try{await groups.actions.init(),t1(4,b1=!0),t1(28,F1=await users.getInvites()),t1(15,D1=!0)}catch{notifications.error("Error fetching user group data")}});const e0=()=>{r1?f1.goToUpgradePage():window.open("https://budibase.com/pricing/","_blank")};function y0(m0){z1=m0,t1(0,z1)}function R0(m0){bubble.call(this,n1,m0)}function r0(m0){I1=m0,t1(12,I1)}const $0=({detail:m0})=>_1(`./${m0._id}`);function H0(m0){binding_callbacks[m0?"unshift":"push"](()=>{v1=m0,t1(6,v1)})}function N0(m0){binding_callbacks[m0?"unshift":"push"](()=>{k1=m0,t1(7,k1)})}function s2(m0){binding_callbacks[m0?"unshift":"push"](()=>{S1=m0,t1(8,S1)})}function b2(m0){binding_callbacks[m0?"unshift":"push"](()=>{C1=m0,t1(9,C1)})}function d2(m0){binding_callbacks[m0?"unshift":"push"](()=>{A1=m0,t1(10,A1)})}function e2(m0){binding_callbacks[m0?"unshift":"push"](()=>{E1=m0,t1(11,E1)})}return n1.$$.update=()=>{var m0;n1.$$.dirty[1]&3&&t1(20,r1=d1.accountPortalAccess&&m1.cloud),n1.$$.dirty[0]&1073741824|n1.$$.dirty[1]&1&&t1(19,o1=!d1.isAdmin||p1.isScimEnabled),n1.$$.dirty[0]&1&&Q1(z1),n1.$$.dirty[0]&8&&t1(1,i1={email:{sortable:!1,width:"2fr",minWidth:"200px"},role:{sortable:!1,width:"1fr"},...f1.groupsEnabled&&{userGroups:{sortable:!1,displayName:"Groups",width:"1fr"}},apps:{sortable:!1,width:"1fr"}}),n1.$$.dirty[0]&2&&t1(18,a1=R1(i1)),n1.$$.dirty[0]&536870916&&t1(5,$1=(m0=u1.rows)==null?void 0:m0.map(S2=>{let B0=[];return c1.forEach(w0=>{var z0;w0.users&&((z0=w0.users)==null||z0.forEach(u0=>{u0._id===S2._id&&B0.push(w0)}))}),{...S2,name:S2.firstName?S2.firstName+" "+S2.lastName:"",userGroups:B0,apps:[...new Set(Object.keys(S2.roles))]}})),n1.$$.dirty[0]&268435456&&t1(16,q1=K1(F1))},t1(14,U1=[]),t1(17,s1={successful:[],unsuccessful:[]}),[z1,i1,u1,f1,b1,$1,v1,k1,S1,C1,A1,E1,I1,N1,U1,D1,q1,s1,a1,o1,r1,_1,h1,V1,Z1,s0,_0,l0,F1,c1,p1,d1,m1,e0,y0,R0,r0,$0,H0,N0,s2,b2,d2,e2]}class Users extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$g,create_fragment$f,safe_not_equal,{},null,[-1,-1])}}function get_each_context$2(n1,e1,t1){const r1=n1.slice();return r1[7]=e1[t1].title,r1[8]=e1[t1].href,r1}function create_default_slot_2$5(n1){let e1;const t1=n1[5].default,r1=create_slot(t1,n1,n1[6],null);return{c(){r1&&r1.c()},m(o1,i1){r1&&r1.m(o1,i1),e1=!0},p(o1,i1){r1&&r1.p&&(!e1||i1&64)&&update_slot_base(r1,t1,o1,o1[6],e1?get_slot_changes(t1,o1[6],i1,null):get_all_dirty_from_scope(o1[6]),null)},i(o1){e1||(transition_in(r1,o1),e1=!0)},o(o1){transition_out(r1,o1),e1=!1},d(o1){r1&&r1.d(o1)}}}function create_each_block$2(n1){let e1,t1;return e1=new SideNavItem({props:{text:n1[7],url:n1[8],active:n1[1](n1[8])}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1&1&&(i1.text=r1[7]),o1&1&&(i1.url=r1[8]),o1&3&&(i1.active=r1[1](r1[8])),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_1$8(n1){let e1,t1,r1=n1[0],o1=[];for(let a1=0;a1<r1.length;a1+=1)o1[a1]=create_each_block$2(get_each_context$2(n1,r1,a1));const i1=a1=>transition_out(o1[a1],1,1,()=>{o1[a1]=null});return{c(){for(let a1=0;a1<o1.length;a1+=1)o1[a1].c();e1=empty$1()},m(a1,s1){for(let l1=0;l1<o1.length;l1+=1)o1[l1].m(a1,s1);insert$1(a1,e1,s1),t1=!0},p(a1,s1){if(s1&3){r1=a1[0];let l1;for(l1=0;l1<r1.length;l1+=1){const c1=get_each_context$2(a1,r1,l1);o1[l1]?(o1[l1].p(c1,s1),transition_in(o1[l1],1)):(o1[l1]=create_each_block$2(c1),o1[l1].c(),transition_in(o1[l1],1),o1[l1].m(e1.parentNode,e1))}for(group_outros(),l1=r1.length;l1<o1.length;l1+=1)i1(l1);check_outros()}},i(a1){if(!t1){for(let s1=0;s1<r1.length;s1+=1)transition_in(o1[s1]);t1=!0}},o(a1){o1=o1.filter(Boolean);for(let s1=0;s1<o1.length;s1+=1)transition_out(o1[s1]);t1=!1},d(a1){destroy_each(o1,a1),a1&&detach(e1)}}}function create_side_nav_slot(n1){let e1,t1,r1;return t1=new SideNav({props:{$$slots:{default:[create_default_slot_1$8]},$$scope:{ctx:n1}}}),{c(){e1=element("div"),create_component(t1.$$.fragment),attr(e1,"slot","side-nav")},m(o1,i1){insert$1(o1,e1,i1),mount_component(t1,e1,null),r1=!0},p(o1,i1){const a1={};i1&67&&(a1.$$scope={dirty:i1,ctx:o1}),t1.$set(a1)},i(o1){r1||(transition_in(t1.$$.fragment,o1),r1=!0)},o(o1){transition_out(t1.$$.fragment,o1),r1=!1},d(o1){o1&&detach(e1),destroy_component(t1)}}}function create_default_slot$a(n1){let e1,t1;return e1=new Content({props:{narrow:!n1[2],$$slots:{"side-nav":[create_side_nav_slot],default:[create_default_slot_2$5]},$$scope:{ctx:n1}}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1&4&&(i1.narrow=!r1[2]),o1&67&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_fragment$e(n1){let e1,t1;return e1=new Page({props:{$$slots:{default:[create_default_slot$a]},$$scope:{ctx:n1}}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,[o1]){const i1={};o1&71&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function instance$f(n1,e1,t1){let r1,o1,i1,a1,s1;component_subscribe(n1,goto,u1=>t1(3,i1=u1)),component_subscribe(n1,menu,u1=>t1(4,a1=u1)),component_subscribe(n1,isActive,u1=>t1(1,s1=u1));let{$$slots:l1={},$$scope:c1}=e1;return onMount(async()=>{try{await features.init()}catch(u1){notifications.error(`Error fetching feature configs - ${(u1==null?void 0:u1.message)||"unknown error"}`)}}),n1.$$set=u1=>{"$$scope"in u1&&t1(6,c1=u1.$$scope)},n1.$$.update=()=>{var u1;n1.$$.dirty&2&&t1(2,r1=s1("./users/index")||s1("./groups/index")),n1.$$.dirty&16&&t1(0,o1=((u1=a1.find(f1=>f1.title==="Users"))==null?void 0:u1.subPages)||[]),n1.$$.dirty&9&&!o1.length&&i1("../")},[o1,s1,r1,i1,a1,l1,c1]}class Layout$2 extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$f,create_fragment$e,safe_not_equal,{})}}function create_if_block$8(n1){let e1,t1,r1,o1;const i1=[create_if_block_1$3,create_if_block_2$1],a1=[];function s1(l1,c1){var u1,f1;return l1[1].cloud&&((f1=(u1=l1[2])==null?void 0:u1.user)==null?void 0:f1.accountPortalAccess)?0:!l1[1].cloud&&l1[2].isAdmin?1:-1}return~(e1=s1(n1))&&(t1=a1[e1]=i1[e1](n1)),{c(){t1&&t1.c(),r1=empty$1()},m(l1,c1){~e1&&a1[e1].m(l1,c1),insert$1(l1,r1,c1),o1=!0},p(l1,c1){let u1=e1;e1=s1(l1),e1===u1?~e1&&a1[e1].p(l1,c1):(t1&&(group_outros(),transition_out(a1[u1],1,1,()=>{a1[u1]=null}),check_outros()),~e1?(t1=a1[e1],t1?t1.p(l1,c1):(t1=a1[e1]=i1[e1](l1),t1.c()),transition_in(t1,1),t1.m(r1.parentNode,r1)):t1=null)},i(l1){o1||(transition_in(t1),o1=!0)},o(l1){transition_out(t1),o1=!1},d(l1){~e1&&a1[e1].d(l1),l1&&detach(r1)}}}function create_if_block_2$1(n1){let e1,t1;return e1=new Button({props:{cta:!0,size:"S",$$slots:{default:[create_default_slot_1$7]},$$scope:{ctx:n1}}}),e1.$on("click",n1[6]),e1.$on("click",n1[7]),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1&256&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_if_block_1$3(n1){let e1,t1;return e1=new Button({props:{cta:!0,size:"S",$$slots:{default:[create_default_slot$9]},$$scope:{ctx:n1}}}),e1.$on("click",n1[4]),e1.$on("click",n1[5]),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1&256&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_1$7(n1){let e1;return{c(){e1=text("Upgrade")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot$9(n1){let e1;return{c(){e1=text("Upgrade")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_fragment$d(n1){let e1=isEnabled(TENANT_FEATURE_FLAGS.LICENSING)&&!n1[0].isEnterprisePlan,t1,r1,o1=e1&&create_if_block$8(n1);return{c(){o1&&o1.c(),t1=empty$1()},m(i1,a1){o1&&o1.m(i1,a1),insert$1(i1,t1,a1),r1=!0},p(i1,[a1]){a1&1&&(e1=isEnabled(TENANT_FEATURE_FLAGS.LICENSING)&&!i1[0].isEnterprisePlan),e1?o1?(o1.p(i1,a1),a1&1&&transition_in(o1,1)):(o1=create_if_block$8(i1),o1.c(),transition_in(o1,1),o1.m(t1.parentNode,t1)):o1&&(group_outros(),transition_out(o1,1,1,()=>{o1=null}),check_outros())},i(i1){r1||(transition_in(o1),r1=!0)},o(i1){transition_out(o1),r1=!1},d(i1){o1&&o1.d(i1),i1&&detach(t1)}}}function instance$e(n1,e1,t1){let r1,o1,i1,a1;component_subscribe(n1,licensing,f1=>t1(0,r1=f1)),component_subscribe(n1,admin,f1=>t1(1,o1=f1)),component_subscribe(n1,auth,f1=>t1(2,i1=f1)),component_subscribe(n1,goto,f1=>t1(3,a1=f1));function s1(f1){bubble.call(this,n1,f1)}const l1=()=>{window.open(o1.accountPortalUrl+"/portal/upgrade","_blank")},c1=()=>a1("/builder/portal/account/upgrade");function u1(f1){bubble.call(this,n1,f1)}return[r1,o1,i1,a1,s1,l1,c1,u1]}class UpgradeButton extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$e,create_fragment$d,safe_not_equal,{})}}const Logo_svelte_svelte_type_style_lang="";function create_fragment$c(n1){let e1,t1,r1,o1;return{c(){e1=element("img"),src_url_equal(e1.src,t1=n1[0].logoUrl||Logo$1)||attr(e1,"src",t1),attr(e1,"alt","Budibase Logo"),attr(e1,"class","svelte-19hn6ob")},m(i1,a1){insert$1(i1,e1,a1),r1||(o1=listen(e1,"click",n1[2]),r1=!0)},p(i1,[a1]){a1&1&&!src_url_equal(e1.src,t1=i1[0].logoUrl||Logo$1)&&attr(e1,"src",t1)},i:noop$5,o:noop$5,d(i1){i1&&detach(e1),r1=!1,o1()}}}function instance$d(n1,e1,t1){let r1,o1;return component_subscribe(n1,organisation,a1=>t1(0,r1=a1)),component_subscribe(n1,goto,a1=>t1(1,o1=a1)),[r1,o1,()=>o1("./apps")]}class Logo_1 extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$d,create_fragment$c,safe_not_equal,{})}}const MobileMenu_svelte_svelte_type_style_lang="";function get_each_context$1(n1,e1,t1){const r1=n1.slice();return r1[5]=e1[t1].title,r1[6]=e1[t1].subPages,r1}function get_each_context_1(n1,e1,t1){const r1=n1.slice();return r1[5]=e1[t1].title,r1[9]=e1[t1].href,r1}function get_each_context_2(n1,e1,t1){const r1=n1.slice();return r1[5]=e1[t1].title,r1[9]=e1[t1].href,r1[6]=e1[t1].subPages,r1}function create_if_block_2(n1){let e1,t1,r1,o1,i1;return{c(){e1=element("div"),attr(e1,"class","mobile-nav-underlay svelte-tof9hg")},m(a1,s1){insert$1(a1,e1,s1),r1=!0,o1||(i1=listen(e1,"click",n1[3]),o1=!0)},p:noop$5,i(a1){r1||(add_render_callback(()=>{t1||(t1=create_bidirectional_transition(e1,fade,{duration:130},!0)),t1.run(1)}),r1=!0)},o(a1){t1||(t1=create_bidirectional_transition(e1,fade,{duration:130},!1)),t1.run(0),r1=!1},d(a1){a1&&detach(e1),a1&&t1&&t1.end(),o1=!1,i1()}}}function create_if_block_1$2(n1){let e1,t1;return e1=new SideNavItem({props:{text:n1[5],url:n1[9],active:n1[2](n1[9])}}),e1.$on("click",n1[3]),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1&2&&(i1.text=r1[5]),o1&2&&(i1.url=r1[9]),o1&6&&(i1.active=r1[2](r1[9])),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_each_block_2(n1){var o1;let e1,t1,r1=!((o1=n1[6])!=null&&o1.length)&&create_if_block_1$2(n1);return{c(){r1&&r1.c(),e1=empty$1()},m(i1,a1){r1&&r1.m(i1,a1),insert$1(i1,e1,a1),t1=!0},p(i1,a1){var s1;(s1=i1[6])!=null&&s1.length?r1&&(group_outros(),transition_out(r1,1,1,()=>{r1=null}),check_outros()):r1?(r1.p(i1,a1),a1&2&&transition_in(r1,1)):(r1=create_if_block_1$2(i1),r1.c(),transition_in(r1,1),r1.m(e1.parentNode,e1))},i(i1){t1||(transition_in(r1),t1=!0)},o(i1){transition_out(r1),t1=!1},d(i1){r1&&r1.d(i1),i1&&detach(e1)}}}function create_if_block$7(n1){let e1,t1=n1[5]+"",r1,o1,i1,a1,s1=n1[6],l1=[];for(let u1=0;u1<s1.length;u1+=1)l1[u1]=create_each_block_1(get_each_context_1(n1,s1,u1));const c1=u1=>transition_out(l1[u1],1,1,()=>{l1[u1]=null});return{c(){e1=element("div"),r1=text(t1),o1=space$1();for(let u1=0;u1<l1.length;u1+=1)l1[u1].c();i1=empty$1(),attr(e1,"class","category svelte-tof9hg")},m(u1,f1){insert$1(u1,e1,f1),append$1(e1,r1),insert$1(u1,o1,f1);for(let p1=0;p1<l1.length;p1+=1)l1[p1].m(u1,f1);insert$1(u1,i1,f1),a1=!0},p(u1,f1){if((!a1||f1&2)&&t1!==(t1=u1[5]+"")&&set_data(r1,t1),f1&14){s1=u1[6];let p1;for(p1=0;p1<s1.length;p1+=1){const d1=get_each_context_1(u1,s1,p1);l1[p1]?(l1[p1].p(d1,f1),transition_in(l1[p1],1)):(l1[p1]=create_each_block_1(d1),l1[p1].c(),transition_in(l1[p1],1),l1[p1].m(i1.parentNode,i1))}for(group_outros(),p1=s1.length;p1<l1.length;p1+=1)c1(p1);check_outros()}},i(u1){if(!a1){for(let f1=0;f1<s1.length;f1+=1)transition_in(l1[f1]);a1=!0}},o(u1){l1=l1.filter(Boolean);for(let f1=0;f1<l1.length;f1+=1)transition_out(l1[f1]);a1=!1},d(u1){u1&&detach(e1),u1&&detach(o1),destroy_each(l1,u1),u1&&detach(i1)}}}function create_each_block_1(n1){let e1,t1;return e1=new SideNavItem({props:{text:n1[5],url:n1[9],active:n1[2](n1[9])}}),e1.$on("click",n1[3]),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1&2&&(i1.text=r1[5]),o1&2&&(i1.url=r1[9]),o1&6&&(i1.active=r1[2](r1[9])),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_each_block$1(n1){var o1;let e1,t1,r1=((o1=n1[6])==null?void 0:o1.length)&&create_if_block$7(n1);return{c(){r1&&r1.c(),e1=empty$1()},m(i1,a1){r1&&r1.m(i1,a1),insert$1(i1,e1,a1),t1=!0},p(i1,a1){var s1;(s1=i1[6])!=null&&s1.length?r1?(r1.p(i1,a1),a1&2&&transition_in(r1,1)):(r1=create_if_block$7(i1),r1.c(),transition_in(r1,1),r1.m(e1.parentNode,e1)):r1&&(group_outros(),transition_out(r1,1,1,()=>{r1=null}),check_outros())},i(i1){t1||(transition_in(r1),t1=!0)},o(i1){transition_out(r1),t1=!1},d(i1){r1&&r1.d(i1),i1&&detach(e1)}}}function create_default_slot_1$6(n1){let e1,t1,r1,o1=n1[1],i1=[];for(let u1=0;u1<o1.length;u1+=1)i1[u1]=create_each_block_2(get_each_context_2(n1,o1,u1));const a1=u1=>transition_out(i1[u1],1,1,()=>{i1[u1]=null});let s1=n1[1],l1=[];for(let u1=0;u1<s1.length;u1+=1)l1[u1]=create_each_block$1(get_each_context$1(n1,s1,u1));const c1=u1=>transition_out(l1[u1],1,1,()=>{l1[u1]=null});return{c(){for(let u1=0;u1<i1.length;u1+=1)i1[u1].c();e1=space$1();for(let u1=0;u1<l1.length;u1+=1)l1[u1].c();t1=empty$1()},m(u1,f1){for(let p1=0;p1<i1.length;p1+=1)i1[p1].m(u1,f1);insert$1(u1,e1,f1);for(let p1=0;p1<l1.length;p1+=1)l1[p1].m(u1,f1);insert$1(u1,t1,f1),r1=!0},p(u1,f1){if(f1&14){o1=u1[1];let p1;for(p1=0;p1<o1.length;p1+=1){const d1=get_each_context_2(u1,o1,p1);i1[p1]?(i1[p1].p(d1,f1),transition_in(i1[p1],1)):(i1[p1]=create_each_block_2(d1),i1[p1].c(),transition_in(i1[p1],1),i1[p1].m(e1.parentNode,e1))}for(group_outros(),p1=o1.length;p1<i1.length;p1+=1)a1(p1);check_outros()}if(f1&14){s1=u1[1];let p1;for(p1=0;p1<s1.length;p1+=1){const d1=get_each_context$1(u1,s1,p1);l1[p1]?(l1[p1].p(d1,f1),transition_in(l1[p1],1)):(l1[p1]=create_each_block$1(d1),l1[p1].c(),transition_in(l1[p1],1),l1[p1].m(t1.parentNode,t1))}for(group_outros(),p1=s1.length;p1<l1.length;p1+=1)c1(p1);check_outros()}},i(u1){if(!r1){for(let f1=0;f1<o1.length;f1+=1)transition_in(i1[f1]);for(let f1=0;f1<s1.length;f1+=1)transition_in(l1[f1]);r1=!0}},o(u1){i1=i1.filter(Boolean);for(let f1=0;f1<i1.length;f1+=1)transition_out(i1[f1]);l1=l1.filter(Boolean);for(let f1=0;f1<l1.length;f1+=1)transition_out(l1[f1]);r1=!1},d(u1){destroy_each(i1,u1),u1&&detach(e1),destroy_each(l1,u1),u1&&detach(t1)}}}function create_default_slot$8(n1){let e1,t1,r1,o1,i1,a1,s1,l1,c1,u1;return t1=new Logo_1({}),o1=new SideNav({props:{$$slots:{default:[create_default_slot_1$6]},$$scope:{ctx:n1}}}),s1=new UpgradeButton({}),s1.$on("click",n1[3]),{c(){e1=element("div"),create_component(t1.$$.fragment),r1=space$1(),create_component(o1.$$.fragment),i1=space$1(),a1=element("div"),create_component(s1.$$.fragment)},m(f1,p1){insert$1(f1,e1,p1),mount_component(t1,e1,null),insert$1(f1,r1,p1),mount_component(o1,f1,p1),insert$1(f1,i1,p1),insert$1(f1,a1,p1),mount_component(s1,a1,null),l1=!0,c1||(u1=listen(e1,"click",n1[3]),c1=!0)},p(f1,p1){const d1={};p1&16390&&(d1.$$scope={dirty:p1,ctx:f1}),o1.$set(d1)},i(f1){l1||(transition_in(t1.$$.fragment,f1),transition_in(o1.$$.fragment,f1),transition_in(s1.$$.fragment,f1),l1=!0)},o(f1){transition_out(t1.$$.fragment,f1),transition_out(o1.$$.fragment,f1),transition_out(s1.$$.fragment,f1),l1=!1},d(f1){f1&&detach(e1),destroy_component(t1),f1&&detach(r1),destroy_component(o1,f1),f1&&detach(i1),f1&&detach(a1),destroy_component(s1),c1=!1,u1()}}}function create_fragment$b(n1){let e1,t1,r1,o1,i1=n1[0]&&create_if_block_2(n1);return r1=new Layout$n({props:{noPadding:!0,gap:"M",$$slots:{default:[create_default_slot$8]},$$scope:{ctx:n1}}}),{c(){i1&&i1.c(),e1=space$1(),t1=element("div"),create_component(r1.$$.fragment),attr(t1,"class","mobile-nav svelte-tof9hg"),toggle_class(t1,"visible",n1[0])},m(a1,s1){i1&&i1.m(a1,s1),insert$1(a1,e1,s1),insert$1(a1,t1,s1),mount_component(r1,t1,null),o1=!0},p(a1,[s1]){a1[0]?i1?(i1.p(a1,s1),s1&1&&transition_in(i1,1)):(i1=create_if_block_2(a1),i1.c(),transition_in(i1,1),i1.m(e1.parentNode,e1)):i1&&(group_outros(),transition_out(i1,1,1,()=>{i1=null}),check_outros());const l1={};s1&16390&&(l1.$$scope={dirty:s1,ctx:a1}),r1.$set(l1),(!o1||s1&1)&&toggle_class(t1,"visible",a1[0])},i(a1){o1||(transition_in(i1),transition_in(r1.$$.fragment,a1),o1=!0)},o(a1){transition_out(i1),transition_out(r1.$$.fragment,a1),o1=!1},d(a1){i1&&i1.d(a1),a1&&detach(e1),a1&&detach(t1),destroy_component(r1)}}}function instance$c(n1,e1,t1){let r1,o1;component_subscribe(n1,menu,l1=>t1(1,r1=l1)),component_subscribe(n1,isActive,l1=>t1(2,o1=l1));let{visible:i1=!1}=e1;const a1=createEventDispatcher(),s1=()=>a1("close");return n1.$$set=l1=>{"visible"in l1&&t1(0,i1=l1.visible)},[i1,r1,o1,s1]}class MobileMenu extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$c,create_fragment$b,safe_not_equal,{visible:0})}}function create_default_slot$7(n1){let e1,t1,r1;function o1(a1){n1[1](a1)}let i1={options:Themes,placeholder:null,getOptionLabel:func,getOptionValue:func_1};return n1[0].theme!==void 0&&(i1.value=n1[0].theme),e1=new Select_1$1({props:i1}),binding_callbacks.push(()=>bind$3(e1,"value",o1)),{c(){create_component(e1.$$.fragment)},m(a1,s1){mount_component(e1,a1,s1),r1=!0},p(a1,s1){const l1={};!t1&&s1&1&&(t1=!0,l1.value=a1[0].theme,add_flush_callback(()=>t1=!1)),e1.$set(l1)},i(a1){r1||(transition_in(e1.$$.fragment,a1),r1=!0)},o(a1){transition_out(e1.$$.fragment,a1),r1=!1},d(a1){destroy_component(e1,a1)}}}function create_fragment$a(n1){let e1,t1;return e1=new ModalContent({props:{title:"Theme",$$slots:{default:[create_default_slot$7]},$$scope:{ctx:n1}}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,[o1]){const i1={};o1&5&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}const func=n1=>n1.name,func_1=n1=>n1.class;function instance$b(n1,e1,t1){let r1;component_subscribe(n1,themeStore,i1=>t1(0,r1=i1));function o1(i1){n1.$$.not_equal(r1.theme,i1)&&(r1.theme=i1,themeStore.set(r1))}return[r1,o1]}class ThemeModal extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$b,create_fragment$a,safe_not_equal,{})}}function create_default_slot_1$5(n1){let e1;return{c(){e1=text("Your API key for accessing the Budibase public API:")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot$6(n1){let e1,t1,r1,o1,i1;e1=new Body({props:{size:"S",$$slots:{default:[create_default_slot_1$5]},$$scope:{ctx:n1}}});function a1(l1){n1[2](l1)}let s1={};return n1[0]!==void 0&&(s1.value=n1[0]),r1=new CopyInput({props:s1}),binding_callbacks.push(()=>bind$3(r1,"value",a1)),{c(){create_component(e1.$$.fragment),t1=space$1(),create_component(r1.$$.fragment)},m(l1,c1){mount_component(e1,l1,c1),insert$1(l1,t1,c1),mount_component(r1,l1,c1),i1=!0},p(l1,c1){const u1={};c1&8&&(u1.$$scope={dirty:c1,ctx:l1}),e1.$set(u1);const f1={};!o1&&c1&1&&(o1=!0,f1.value=l1[0],add_flush_callback(()=>o1=!1)),r1.$set(f1)},i(l1){i1||(transition_in(e1.$$.fragment,l1),transition_in(r1.$$.fragment,l1),i1=!0)},o(l1){transition_out(e1.$$.fragment,l1),transition_out(r1.$$.fragment,l1),i1=!1},d(l1){destroy_component(e1,l1),l1&&detach(t1),destroy_component(r1,l1)}}}function create_fragment$9(n1){let e1,t1;return e1=new ModalContent({props:{title:"API Key",showSecondaryButton:!0,secondaryButtonText:"Regenerate key",secondaryAction:n1[1],showCancelButton:!1,confirmText:"Close",$$slots:{default:[create_default_slot$6]},$$scope:{ctx:n1}}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,[o1]){const i1={};o1&9&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function instance$a(n1,e1,t1){let r1=null;async function o1(){try{t1(0,r1=await auth.generateAPIKey()),notifications.success("New API key generated")}catch{notifications.error("Unable to generate new API key")}return keepOpen}onMount(async()=>{try{t1(0,r1=await auth.fetchAPIKey())}catch{notifications.error("Unable to fetch API key")}});function i1(a1){r1=a1,t1(0,r1)}return[r1,o1,i1]}class APIKeyModal extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$a,create_fragment$9,safe_not_equal,{})}}const UserDropdown_svelte_svelte_type_style_lang="";function create_default_slot_10(n1){let e1;return{c(){e1=text("My profile")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_9$1(n1){let e1;return{c(){e1=text("Theme")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_if_block$6(n1){let e1,t1;return e1=new Item({props:{icon:"LockClosed",$$slots:{default:[create_default_slot_8$1]},$$scope:{ctx:n1}}}),e1.$on("click",n1[9]),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1&65536&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_8$1(n1){let e1;return{c(){e1=text("Update password")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_7$2(n1){let e1;return{c(){e1=text("View API key")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_6$3(n1){let e1;return{c(){e1=text("Close developer mode")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_5$3(n1){let e1;return{c(){e1=text("Log out")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_4$4(n1){let e1,t1,r1,o1,i1,a1,s1,l1,c1,u1,f1;e1=new Item({props:{icon:"UserEdit",$$slots:{default:[create_default_slot_10]},$$scope:{ctx:n1}}}),e1.$on("click",n1[7]),r1=new Item({props:{icon:"Moon",$$slots:{default:[create_default_slot_9$1]},$$scope:{ctx:n1}}}),r1.$on("click",n1[8]);let p1=!n1[4].isSSO&&create_if_block$6(n1);return a1=new Item({props:{icon:"Key",$$slots:{default:[create_default_slot_7$2]},$$scope:{ctx:n1}}}),a1.$on("click",n1[10]),l1=new Item({props:{icon:"UserDeveloper",$$slots:{default:[create_default_slot_6$3]},$$scope:{ctx:n1}}}),l1.$on("click",n1[11]),u1=new Item({props:{icon:"LogOut",$$slots:{default:[create_default_slot_5$3]},$$scope:{ctx:n1}}}),u1.$on("click",n1[6]),{c(){create_component(e1.$$.fragment),t1=space$1(),create_component(r1.$$.fragment),o1=space$1(),p1&&p1.c(),i1=space$1(),create_component(a1.$$.fragment),s1=space$1(),create_component(l1.$$.fragment),c1=space$1(),create_component(u1.$$.fragment)},m(d1,m1){mount_component(e1,d1,m1),insert$1(d1,t1,m1),mount_component(r1,d1,m1),insert$1(d1,o1,m1),p1&&p1.m(d1,m1),insert$1(d1,i1,m1),mount_component(a1,d1,m1),insert$1(d1,s1,m1),mount_component(l1,d1,m1),insert$1(d1,c1,m1),mount_component(u1,d1,m1),f1=!0},p(d1,m1){const _1={};m1&65536&&(_1.$$scope={dirty:m1,ctx:d1}),e1.$set(_1);const h1={};m1&65536&&(h1.$$scope={dirty:m1,ctx:d1}),r1.$set(h1),d1[4].isSSO?p1&&(group_outros(),transition_out(p1,1,1,()=>{p1=null}),check_outros()):p1?(p1.p(d1,m1),m1&16&&transition_in(p1,1)):(p1=create_if_block$6(d1),p1.c(),transition_in(p1,1),p1.m(i1.parentNode,i1));const b1={};m1&65536&&(b1.$$scope={dirty:m1,ctx:d1}),a1.$set(b1);const $1={};m1&65536&&($1.$$scope={dirty:m1,ctx:d1}),l1.$set($1);const v1={};m1&65536&&(v1.$$scope={dirty:m1,ctx:d1}),u1.$set(v1)},i(d1){f1||(transition_in(e1.$$.fragment,d1),transition_in(r1.$$.fragment,d1),transition_in(p1),transition_in(a1.$$.fragment,d1),transition_in(l1.$$.fragment,d1),transition_in(u1.$$.fragment,d1),f1=!0)},o(d1){transition_out(e1.$$.fragment,d1),transition_out(r1.$$.fragment,d1),transition_out(p1),transition_out(a1.$$.fragment,d1),transition_out(l1.$$.fragment,d1),transition_out(u1.$$.fragment,d1),f1=!1},d(d1){destroy_component(e1,d1),d1&&detach(t1),destroy_component(r1,d1),d1&&detach(o1),p1&&p1.d(d1),d1&&detach(i1),destroy_component(a1,d1),d1&&detach(s1),destroy_component(l1,d1),d1&&detach(c1),destroy_component(u1,d1)}}}function create_control_slot(n1){let e1,t1,r1,o1,i1;return t1=new UserAvatar({props:{user:n1[4].user,showTooltip:!1}}),o1=new Icon({props:{size:"XL",name:"ChevronDown"}}),{c(){e1=element("div"),create_component(t1.$$.fragment),r1=space$1(),create_component(o1.$$.fragment),attr(e1,"slot","control"),attr(e1,"class","user-dropdown svelte-1k1fmmj")},m(a1,s1){insert$1(a1,e1,s1),mount_component(t1,e1,null),append$1(e1,r1),mount_component(o1,e1,null),i1=!0},p(a1,s1){const l1={};s1&16&&(l1.user=a1[4].user),t1.$set(l1)},i(a1){i1||(transition_in(t1.$$.fragment,a1),transition_in(o1.$$.fragment,a1),i1=!0)},o(a1){transition_out(t1.$$.fragment,a1),transition_out(o1.$$.fragment,a1),i1=!1},d(a1){a1&&detach(e1),destroy_component(t1),destroy_component(o1)}}}function create_default_slot_3$4(n1){let e1,t1;return e1=new ThemeModal({}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_2$4(n1){let e1,t1;return e1=new ProfileModal({}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_1$4(n1){let e1,t1;return e1=new ChangePasswordModal({}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot$5(n1){let e1,t1;return e1=new APIKeyModal({}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_fragment$8(n1){let e1,t1,r1,o1,i1,a1,s1,l1,c1,u1;e1=new ActionMenu({props:{align:"right",$$slots:{control:[create_control_slot],default:[create_default_slot_4$4]},$$scope:{ctx:n1}}});let f1={$$slots:{default:[create_default_slot_3$4]},$$scope:{ctx:n1}};r1=new Modal({props:f1}),n1[12](r1);let p1={$$slots:{default:[create_default_slot_2$4]},$$scope:{ctx:n1}};i1=new Modal({props:p1}),n1[13](i1);let d1={$$slots:{default:[create_default_slot_1$4]},$$scope:{ctx:n1}};s1=new Modal({props:d1}),n1[14](s1);let m1={$$slots:{default:[create_default_slot$5]},$$scope:{ctx:n1}};return c1=new Modal({props:m1}),n1[15](c1),{c(){create_component(e1.$$.fragment),t1=space$1(),create_component(r1.$$.fragment),o1=space$1(),create_component(i1.$$.fragment),a1=space$1(),create_component(s1.$$.fragment),l1=space$1(),create_component(c1.$$.fragment)},m(_1,h1){mount_component(e1,_1,h1),insert$1(_1,t1,h1),mount_component(r1,_1,h1),insert$1(_1,o1,h1),mount_component(i1,_1,h1),insert$1(_1,a1,h1),mount_component(s1,_1,h1),insert$1(_1,l1,h1),mount_component(c1,_1,h1),u1=!0},p(_1,[h1]){const b1={};h1&65599&&(b1.$$scope={dirty:h1,ctx:_1}),e1.$set(b1);const $1={};h1&65536&&($1.$$scope={dirty:h1,ctx:_1}),r1.$set($1);const v1={};h1&65536&&(v1.$$scope={dirty:h1,ctx:_1}),i1.$set(v1);const k1={};h1&65536&&(k1.$$scope={dirty:h1,ctx:_1}),s1.$set(k1);const S1={};h1&65536&&(S1.$$scope={dirty:h1,ctx:_1}),c1.$set(S1)},i(_1){u1||(transition_in(e1.$$.fragment,_1),transition_in(r1.$$.fragment,_1),transition_in(i1.$$.fragment,_1),transition_in(s1.$$.fragment,_1),transition_in(c1.$$.fragment,_1),u1=!0)},o(_1){transition_out(e1.$$.fragment,_1),transition_out(r1.$$.fragment,_1),transition_out(i1.$$.fragment,_1),transition_out(s1.$$.fragment,_1),transition_out(c1.$$.fragment,_1),u1=!1},d(_1){destroy_component(e1,_1),_1&&detach(t1),n1[12](null),destroy_component(r1,_1),_1&&detach(o1),n1[13](null),destroy_component(i1,_1),_1&&detach(a1),n1[14](null),destroy_component(s1,_1),_1&&detach(l1),n1[15](null),destroy_component(c1,_1)}}}function instance$9(n1,e1,t1){let r1,o1;component_subscribe(n1,auth,v1=>t1(4,r1=v1)),component_subscribe(n1,goto,v1=>t1(5,o1=v1));let i1,a1,s1,l1;const c1=async()=>{try{await auth.logout()}catch{}},u1=()=>a1.show(),f1=()=>i1.show(),p1=()=>s1.show(),d1=()=>l1.show(),m1=()=>o1("../apps");function _1(v1){binding_callbacks[v1?"unshift":"push"](()=>{i1=v1,t1(0,i1)})}function h1(v1){binding_callbacks[v1?"unshift":"push"](()=>{a1=v1,t1(1,a1)})}function b1(v1){binding_callbacks[v1?"unshift":"push"](()=>{s1=v1,t1(2,s1)})}function $1(v1){binding_callbacks[v1?"unshift":"push"](()=>{l1=v1,t1(3,l1)})}return[i1,a1,s1,l1,r1,o1,c1,u1,f1,p1,d1,m1,_1,h1,b1,$1]}class UserDropdown extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$9,create_fragment$8,safe_not_equal,{})}}const HelpMenu_svelte_svelte_type_style_lang="";function create_default_slot_7$1(n1){let e1;return{c(){e1=text("Help resources")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_6$2(n1){let e1;return{c(){e1=text("Help docs")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_5$2(n1){let e1;return{c(){e1=text("Discussions")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_4$3(n1){let e1;return{c(){e1=text("Discord")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot_3$3(n1){let e1;return{c(){e1=text("Budibase University")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_if_block$5(n1){let e1,t1,r1,o1,i1,a1,s1,l1,c1;o1=new FontAwesomeIcon({props:{name:"fa-solid fa-envelope"}}),a1=new Body({props:{size:"S",$$slots:{default:[create_default_slot_2$3]},$$scope:{ctx:n1}}});let u1=!n1[3]&&create_if_block_1$1(n1);return{c(){e1=element("a"),t1=element("div"),r1=element("div"),create_component(o1.$$.fragment),i1=space$1(),create_component(a1.$$.fragment),s1=space$1(),u1&&u1.c(),attr(r1,"class","icon svelte-33ytqw"),attr(t1,"class","premiumLinkContent svelte-33ytqw"),toggle_class(t1,"disabled",!n1[3]),attr(e1,"href",l1=n1[3]?"mailto:support@budibase.com":"/builder/portal/account/usage"),attr(e1,"class","svelte-33ytqw")},m(f1,p1){insert$1(f1,e1,p1),append$1(e1,t1),append$1(t1,r1),mount_component(o1,r1,null),append$1(t1,i1),mount_component(a1,t1,null),append$1(e1,s1),u1&&u1.m(e1,null),c1=!0},p(f1,p1){const d1={};p1&256&&(d1.$$scope={dirty:p1,ctx:f1}),a1.$set(d1),(!c1||p1&8)&&toggle_class(t1,"disabled",!f1[3]),f1[3]?u1&&(group_outros(),transition_out(u1,1,1,()=>{u1=null}),check_outros()):u1?p1&8&&transition_in(u1,1):(u1=create_if_block_1$1(f1),u1.c(),transition_in(u1,1),u1.m(e1,null)),(!c1||p1&8&&l1!==(l1=f1[3]?"mailto:support@budibase.com":"/builder/portal/account/usage"))&&attr(e1,"href",l1)},i(f1){c1||(transition_in(o1.$$.fragment,f1),transition_in(a1.$$.fragment,f1),transition_in(u1),c1=!0)},o(f1){transition_out(o1.$$.fragment,f1),transition_out(a1.$$.fragment,f1),transition_out(u1),c1=!1},d(f1){f1&&detach(e1),destroy_component(o1),destroy_component(a1),u1&&u1.d()}}}function create_default_slot_2$3(n1){let e1;return{c(){e1=text("Email support")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_if_block_1$1(n1){let e1,t1,r1,o1,i1,a1;return r1=new FontAwesomeIcon({props:{name:"fa-solid fa-lock"}}),i1=new Body({props:{size:"XS",$$slots:{default:[create_default_slot_1$3]},$$scope:{ctx:n1}}}),{c(){e1=element("div"),t1=element("div"),create_component(r1.$$.fragment),o1=space$1(),create_component(i1.$$.fragment),attr(t1,"class","icon svelte-33ytqw"),attr(e1,"class","premiumBadge svelte-33ytqw")},m(s1,l1){insert$1(s1,e1,l1),append$1(e1,t1),mount_component(r1,t1,null),append$1(e1,o1),mount_component(i1,e1,null),a1=!0},i(s1){a1||(transition_in(r1.$$.fragment,s1),transition_in(i1.$$.fragment,s1),a1=!0)},o(s1){transition_out(r1.$$.fragment,s1),transition_out(i1.$$.fragment,s1),a1=!1},d(s1){s1&&detach(e1),destroy_component(r1),destroy_component(i1)}}}function create_default_slot_1$3(n1){let e1;return{c(){e1=text("Business")},m(t1,r1){insert$1(t1,e1,r1)},d(t1){t1&&detach(e1)}}}function create_default_slot$4(n1){let e1,t1,r1,o1,i1,a1,s1,l1,c1,u1,f1,p1,d1,m1,_1,h1,b1,$1,v1,k1,S1,C1,A1,E1,z1,I1,N1,V1,U1,R1,D1,F1,q1,K1,J1,Q1,Z1,G1,W1,s0,n0,_0=isEnabled(TENANT_FEATURE_FLAGS.LICENSING),l0,e0,y0;r1=new Heading({props:{size:"XS",$$slots:{default:[create_default_slot_7$1]},$$scope:{ctx:n1}}}),a1=new FontAwesomeIcon({props:{name:"fa-solid fa-xmark"}}),p1=new FontAwesomeIcon({props:{name:"fa-solid fa-book"}}),m1=new Body({props:{size:"S",$$slots:{default:[create_default_slot_6$2]},$$scope:{ctx:n1}}}),k1=new FontAwesomeIcon({props:{name:"fa-brands fa-github"}}),C1=new Body({props:{size:"S",$$slots:{default:[create_default_slot_5$2]},$$scope:{ctx:n1}}}),V1=new FontAwesomeIcon({props:{name:"fa-brands fa-discord"}}),R1=new Body({props:{size:"S",$$slots:{default:[create_default_slot_4$3]},$$scope:{ctx:n1}}}),Q1=new FontAwesomeIcon({props:{name:"fa-solid fa-play"}}),G1=new Body({props:{size:"S",$$slots:{default:[create_default_slot_3$3]},$$scope:{ctx:n1}}});let R0=_0&&create_if_block$5(n1);return{c(){e1=element("nav"),t1=element("div"),create_component(r1.$$.fragment),o1=space$1(),i1=element("button"),create_component(a1.$$.fragment),s1=space$1(),l1=element("div"),c1=space$1(),u1=element("a"),f1=element("div"),create_component(p1.$$.fragment),d1=space$1(),create_component(m1.$$.fragment),_1=space$1(),h1=element("div"),b1=space$1(),$1=element("a"),v1=element("div"),create_component(k1.$$.fragment),S1=space$1(),create_component(C1.$$.fragment),A1=space$1(),E1=element("div"),z1=space$1(),I1=element("a"),N1=element("div"),create_component(V1.$$.fragment),U1=space$1(),create_component(R1.$$.fragment),D1=space$1(),F1=element("div"),q1=space$1(),K1=element("a"),J1=element("div"),create_component(Q1.$$.fragment),Z1=space$1(),create_component(G1.$$.fragment),W1=space$1(),s0=element("div"),n0=space$1(),R0&&R0.c(),attr(i1,"class","closeButton svelte-33ytqw"),attr(t1,"class","header svelte-33ytqw"),attr(l1,"class","divider svelte-33ytqw"),attr(f1,"class","icon svelte-33ytqw"),attr(u1,"target","_blank"),attr(u1,"href","https://docs.budibase.com/docs"),attr(u1,"class","svelte-33ytqw"),attr(h1,"class","divider svelte-33ytqw"),attr(v1,"class","icon svelte-33ytqw"),attr($1,"target","_blank"),attr($1,"href","https://github.com/Budibase/budibase/discussions"),attr($1,"class","svelte-33ytqw"),attr(E1,"class","divider svelte-33ytqw"),attr(N1,"class","icon svelte-33ytqw"),attr(I1,"target","_blank"),attr(I1,"href","https://discord.com/invite/ZepTmGbtfF"),attr(I1,"class","svelte-33ytqw"),attr(F1,"class","divider svelte-33ytqw"),attr(J1,"class","icon svelte-33ytqw"),attr(K1,"target","_blank"),attr(K1,"href","https://vimeo.com/showcase/budibase-university"),attr(K1,"class","svelte-33ytqw"),attr(s0,"class","divider svelte-33ytqw"),attr(e1,"class","helpMenu svelte-33ytqw")},m(r0,$0){insert$1(r0,e1,$0),append$1(e1,t1),mount_component(r1,t1,null),append$1(t1,o1),append$1(t1,i1),mount_component(a1,i1,null),append$1(e1,s1),append$1(e1,l1),append$1(e1,c1),append$1(e1,u1),append$1(u1,f1),mount_component(p1,f1,null),append$1(u1,d1),mount_component(m1,u1,null),append$1(e1,_1),append$1(e1,h1),append$1(e1,b1),append$1(e1,$1),append$1($1,v1),mount_component(k1,v1,null),append$1($1,S1),mount_component(C1,$1,null),append$1(e1,A1),append$1(e1,E1),append$1(e1,z1),append$1(e1,I1),append$1(I1,N1),mount_component(V1,N1,null),append$1(I1,U1),mount_component(R1,I1,null),append$1(e1,D1),append$1(e1,F1),append$1(e1,q1),append$1(e1,K1),append$1(K1,J1),mount_component(Q1,J1,null),append$1(K1,Z1),mount_component(G1,K1,null),append$1(e1,W1),append$1(e1,s0),append$1(e1,n0),R0&&R0.m(e1,null),l0=!0,e0||(y0=listen(i1,"click",function(){is_function(n1[1])&&n1[1].apply(this,arguments)}),e0=!0)},p(r0,$0){n1=r0;const H0={};$0&256&&(H0.$$scope={dirty:$0,ctx:n1}),r1.$set(H0);const N0={};$0&256&&(N0.$$scope={dirty:$0,ctx:n1}),m1.$set(N0);const s2={};$0&256&&(s2.$$scope={dirty:$0,ctx:n1}),C1.$set(s2);const b2={};$0&256&&(b2.$$scope={dirty:$0,ctx:n1}),R1.$set(b2);const d2={};$0&256&&(d2.$$scope={dirty:$0,ctx:n1}),G1.$set(d2),_0&&R0.p(n1,$0)},i(r0){l0||(transition_in(r1.$$.fragment,r0),transition_in(a1.$$.fragment,r0),transition_in(p1.$$.fragment,r0),transition_in(m1.$$.fragment,r0),transition_in(k1.$$.fragment,r0),transition_in(C1.$$.fragment,r0),transition_in(V1.$$.fragment,r0),transition_in(R1.$$.fragment,r0),transition_in(Q1.$$.fragment,r0),transition_in(G1.$$.fragment,r0),transition_in(R0),l0=!0)},o(r0){transition_out(r1.$$.fragment,r0),transition_out(a1.$$.fragment,r0),transition_out(p1.$$.fragment,r0),transition_out(m1.$$.fragment,r0),transition_out(k1.$$.fragment,r0),transition_out(C1.$$.fragment,r0),transition_out(V1.$$.fragment,r0),transition_out(R1.$$.fragment,r0),transition_out(Q1.$$.fragment,r0),transition_out(G1.$$.fragment,r0),transition_out(R0),l0=!1},d(r0){r0&&detach(e1),destroy_component(r1),destroy_component(a1),destroy_component(p1),destroy_component(m1),destroy_component(k1),destroy_component(C1),destroy_component(V1),destroy_component(R1),destroy_component(Q1),destroy_component(G1),R0&&R0.d(),e0=!1,y0()}}}function create_fragment$7(n1){let e1,t1,r1,o1,i1,a1,s1,l1,c1;function u1(d1){n1[5](d1)}function f1(d1){n1[6](d1)}let p1={maxHeight:1e3,anchor:n1[2],$$slots:{default:[create_default_slot$4]},$$scope:{ctx:n1}};return n1[0]!==void 0&&(p1.show=n1[0]),n1[1]!==void 0&&(p1.hide=n1[1]),o1=new Popover({props:p1}),binding_callbacks.push(()=>bind$3(o1,"show",u1)),binding_callbacks.push(()=>bind$3(o1,"hide",f1)),{c(){e1=element("div"),t1=element("button"),t1.textContent="Help",r1=space$1(),create_component(o1.$$.fragment),attr(t1,"class","openMenu svelte-33ytqw"),attr(e1,"class","help svelte-33ytqw")},m(d1,m1){insert$1(d1,e1,m1),append$1(e1,t1),append$1(e1,r1),mount_component(o1,e1,null),n1[7](e1),s1=!0,l1||(c1=listen(t1,"click",function(){is_function(n1[0])&&n1[0].apply(this,arguments)}),l1=!0)},p(d1,[m1]){n1=d1;const _1={};m1&4&&(_1.anchor=n1[2]),m1&266&&(_1.$$scope={dirty:m1,ctx:n1}),!i1&&m1&1&&(i1=!0,_1.show=n1[0],add_flush_callback(()=>i1=!1)),!a1&&m1&2&&(a1=!0,_1.hide=n1[1],add_flush_callback(()=>a1=!1)),o1.$set(_1)},i(d1){s1||(transition_in(o1.$$.fragment,d1),s1=!0)},o(d1){transition_out(o1.$$.fragment,d1),s1=!1},d(d1){d1&&detach(e1),destroy_component(o1),n1[7](null),l1=!1,c1()}}}function instance$8(n1,e1,t1){let r1,o1;component_subscribe(n1,licensing,f1=>t1(4,o1=f1));let i1,a1,s1;function l1(f1){i1=f1,t1(0,i1)}function c1(f1){a1=f1,t1(1,a1)}function u1(f1){binding_callbacks[f1?"unshift":"push"](()=>{s1=f1,t1(2,s1)})}return n1.$$.update=()=>{n1.$$.dirty&16&&t1(3,r1=o1.isBusinessPlan||o1.isEnterprisePlan)},[i1,a1,s1,r1,o1,l1,c1,u1]}class HelpMenu extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$8,create_fragment$7,safe_not_equal,{})}}const _layout_svelte_svelte_type_style_lang="";function get_each_context(n1,e1,t1){const r1=n1.slice();return r1[17]=e1[t1].title,r1[18]=e1[t1].href,r1}function create_if_block$4(n1){let e1,t1,r1,o1;const i1=[create_if_block_1,create_else_block$2],a1=[];function s1(l1,c1){return l1[4]?0:1}return e1=s1(n1),t1=a1[e1]=i1[e1](n1),{c(){t1.c(),r1=empty$1()},m(l1,c1){a1[e1].m(l1,c1),insert$1(l1,r1,c1),o1=!0},p(l1,c1){let u1=e1;e1=s1(l1),e1===u1?a1[e1].p(l1,c1):(group_outros(),transition_out(a1[u1],1,1,()=>{a1[u1]=null}),check_outros(),t1=a1[e1],t1?t1.p(l1,c1):(t1=a1[e1]=i1[e1](l1),t1.c()),transition_in(t1,1),t1.m(r1.parentNode,r1))},i(l1){o1||(transition_in(t1),o1=!0)},o(l1){transition_out(t1),o1=!1},d(l1){a1[e1].d(l1),l1&&detach(r1)}}}function create_else_block$2(n1){let e1,t1,r1,o1,i1,a1,s1,l1,c1,u1,f1,p1,d1,m1,_1,h1,b1,$1,v1,k1,S1,C1,A1;e1=new HelpMenu({}),a1=new Logo_1({}),c1=new Tabs({props:{selected:n1[3],$$slots:{default:[create_default_slot$3]},$$scope:{ctx:n1}}}),p1=new Icon({props:{hoverable:!0,name:"ShowMenu"}}),p1.$on("click",n1[7]),_1=new UpgradeButton({}),$1=new UserDropdown({});const E1=n1[11].default,z1=create_slot(E1,n1,n1[13],null);return C1=new MobileMenu({props:{visible:n1[2]}}),C1.$on("close",n1[8]),{c(){create_component(e1.$$.fragment),t1=space$1(),r1=element("div"),o1=element("div"),i1=element("div"),create_component(a1.$$.fragment),s1=space$1(),l1=element("div"),create_component(c1.$$.fragment),u1=space$1(),f1=element("div"),create_component(p1.$$.fragment),d1=space$1(),m1=element("div"),create_component(_1.$$.fragment),h1=space$1(),b1=element("div"),create_component($1.$$.fragment),v1=space$1(),k1=element("div"),z1&&z1.c(),S1=space$1(),create_component(C1.$$.fragment),attr(i1,"class","branding svelte-15ejd1k"),attr(l1,"class","desktop svelte-15ejd1k"),attr(f1,"class","mobile svelte-15ejd1k"),attr(m1,"class","desktop svelte-15ejd1k"),attr(b1,"class","dropdown"),attr(o1,"class","nav svelte-15ejd1k"),attr(k1,"class","main svelte-15ejd1k"),attr(r1,"class","container svelte-15ejd1k")},m(I1,N1){mount_component(e1,I1,N1),insert$1(I1,t1,N1),insert$1(I1,r1,N1),append$1(r1,o1),append$1(o1,i1),mount_component(a1,i1,null),append$1(o1,s1),append$1(o1,l1),mount_component(c1,l1,null),append$1(o1,u1),append$1(o1,f1),mount_component(p1,f1,null),append$1(o1,d1),append$1(o1,m1),mount_component(_1,m1,null),append$1(o1,h1),append$1(o1,b1),mount_component($1,b1,null),append$1(r1,v1),append$1(r1,k1),z1&&z1.m(k1,null),append$1(r1,S1),mount_component(C1,r1,null),A1=!0},p(I1,N1){const V1={};N1&8&&(V1.selected=I1[3]),N1&8257&&(V1.$$scope={dirty:N1,ctx:I1}),c1.$set(V1),z1&&z1.p&&(!A1||N1&8192)&&update_slot_base(z1,E1,I1,I1[13],A1?get_slot_changes(E1,I1[13],N1,null):get_all_dirty_from_scope(I1[13]),null);const U1={};N1&4&&(U1.visible=I1[2]),C1.$set(U1)},i(I1){A1||(transition_in(e1.$$.fragment,I1),transition_in(a1.$$.fragment,I1),transition_in(c1.$$.fragment,I1),transition_in(p1.$$.fragment,I1),transition_in(_1.$$.fragment,I1),transition_in($1.$$.fragment,I1),transition_in(z1,I1),transition_in(C1.$$.fragment,I1),A1=!0)},o(I1){transition_out(e1.$$.fragment,I1),transition_out(a1.$$.fragment,I1),transition_out(c1.$$.fragment,I1),transition_out(p1.$$.fragment,I1),transition_out(_1.$$.fragment,I1),transition_out($1.$$.fragment,I1),transition_out(z1,I1),transition_out(C1.$$.fragment,I1),A1=!1},d(I1){destroy_component(e1,I1),I1&&detach(t1),I1&&detach(r1),destroy_component(a1),destroy_component(c1),destroy_component(p1),destroy_component(_1),destroy_component($1),z1&&z1.d(I1),destroy_component(C1)}}}function create_if_block_1(n1){let e1;const t1=n1[11].default,r1=create_slot(t1,n1,n1[13],null);return{c(){r1&&r1.c()},m(o1,i1){r1&&r1.m(o1,i1),e1=!0},p(o1,i1){r1&&r1.p&&(!e1||i1&8192)&&update_slot_base(r1,t1,o1,o1[13],e1?get_slot_changes(t1,o1[13],i1,null):get_all_dirty_from_scope(o1[13]),null)},i(o1){e1||(transition_in(r1,o1),e1=!0)},o(o1){transition_out(r1,o1),e1=!1},d(o1){r1&&r1.d(o1)}}}function create_each_block(n1){let e1,t1;function r1(){return n1[12](n1[18])}return e1=new Tab({props:{title:n1[17]}}),e1.$on("click",r1),{c(){create_component(e1.$$.fragment)},m(o1,i1){mount_component(e1,o1,i1),t1=!0},p(o1,i1){n1=o1;const a1={};i1&1&&(a1.title=n1[17]),e1.$set(a1)},i(o1){t1||(transition_in(e1.$$.fragment,o1),t1=!0)},o(o1){transition_out(e1.$$.fragment,o1),t1=!1},d(o1){destroy_component(e1,o1)}}}function create_default_slot$3(n1){let e1,t1,r1=n1[0],o1=[];for(let a1=0;a1<r1.length;a1+=1)o1[a1]=create_each_block(get_each_context(n1,r1,a1));const i1=a1=>transition_out(o1[a1],1,1,()=>{o1[a1]=null});return{c(){for(let a1=0;a1<o1.length;a1+=1)o1[a1].c();e1=empty$1()},m(a1,s1){for(let l1=0;l1<o1.length;l1+=1)o1[l1].m(a1,s1);insert$1(a1,e1,s1),t1=!0},p(a1,s1){if(s1&65){r1=a1[0];let l1;for(l1=0;l1<r1.length;l1+=1){const c1=get_each_context(a1,r1,l1);o1[l1]?(o1[l1].p(c1,s1),transition_in(o1[l1],1)):(o1[l1]=create_each_block(c1),o1[l1].c(),transition_in(o1[l1],1),o1[l1].m(e1.parentNode,e1))}for(group_outros(),l1=r1.length;l1<o1.length;l1+=1)i1(l1);check_outros()}},i(a1){if(!t1){for(let s1=0;s1<r1.length;s1+=1)transition_in(o1[s1]);t1=!0}},o(a1){o1=o1.filter(Boolean);for(let s1=0;s1<o1.length;s1+=1)transition_out(o1[s1]);t1=!1},d(a1){destroy_each(o1,a1),a1&&detach(e1)}}}function create_fragment$6(n1){let e1,t1,r1=n1[5].user&&n1[1]&&create_if_block$4(n1);return{c(){r1&&r1.c(),e1=empty$1()},m(o1,i1){r1&&r1.m(o1,i1),insert$1(o1,e1,i1),t1=!0},p(o1,[i1]){o1[5].user&&o1[1]?r1?(r1.p(o1,i1),i1&34&&transition_in(r1,1)):(r1=create_if_block$4(o1),r1.c(),transition_in(r1,1),r1.m(e1.parentNode,e1)):r1&&(group_outros(),transition_out(r1,1,1,()=>{r1=null}),check_outros())},i(o1){t1||(transition_in(r1),t1=!0)},o(o1){transition_out(r1),t1=!1},d(o1){r1&&r1.d(o1),o1&&detach(e1)}}}function instance$7(n1,e1,t1){let r1,o1,i1,a1,s1,l1,c1,u1;component_subscribe(n1,redirect,k1=>t1(14,o1=k1)),component_subscribe(n1,auth,k1=>t1(5,i1=k1)),component_subscribe(n1,isActive,k1=>t1(15,a1=k1)),component_subscribe(n1,apps,k1=>t1(9,s1=k1)),component_subscribe(n1,menu,k1=>t1(0,l1=k1)),component_subscribe(n1,url$2,k1=>t1(10,c1=k1)),component_subscribe(n1,goto,k1=>t1(6,u1=k1));let{$$slots:f1={},$$scope:p1}=e1,d1=!1,m1=!1,_1="Apps";const h1=k1=>{for(let S1 of k1)if(a1(S1.href)){_1!==S1.title&&t1(3,_1=S1.title);break}},b1=()=>t1(2,m1=!0),$1=()=>t1(2,m1=!1);onMount(async()=>{var k1,S1;if(i1.user)if(!((S1=(k1=i1.user)==null?void 0:k1.builder)!=null&&S1.global))o1("../");else{try{await Promise.all([apps.load(),organisation.init()])}catch{notifications.error("Error getting org config")}t1(1,d1=!0)}});const v1=k1=>u1(k1);return n1.$$set=k1=>{"$$scope"in k1&&t1(13,p1=k1.$$scope)},n1.$$.update=()=>{n1.$$.dirty&1025&&(c1(),h1(l1)),n1.$$.dirty&512&&t1(4,r1=!s1.length)},[l1,d1,m1,_1,r1,i1,u1,b1,$1,s1,c1,f1,v1,p1]}class Layout$1 extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$7,create_fragment$6,safe_not_equal,{})}}function create_if_block$3(n1){let e1;const t1=n1[11].default,r1=create_slot(t1,n1,n1[10],null);return{c(){r1&&r1.c()},m(o1,i1){r1&&r1.m(o1,i1),e1=!0},p(o1,i1){r1&&r1.p&&(!e1||i1&1024)&&update_slot_base(r1,t1,o1,o1[10],e1?get_slot_changes(t1,o1[10],i1,null):get_all_dirty_from_scope(o1[10]),null)},i(o1){e1||(transition_in(r1,o1),e1=!0)},o(o1){transition_out(r1,o1),e1=!1},d(o1){r1&&r1.d(o1)}}}function create_fragment$5(n1){let e1,t1,r1,o1;e1=new Branding$1({});let i1=n1[0]&&create_if_block$3(n1);return{c(){create_component(e1.$$.fragment),t1=space$1(),i1&&i1.c(),r1=empty$1()},m(a1,s1){mount_component(e1,a1,s1),insert$1(a1,t1,s1),i1&&i1.m(a1,s1),insert$1(a1,r1,s1),o1=!0},p(a1,[s1]){a1[0]?i1?(i1.p(a1,s1),s1&1&&transition_in(i1,1)):(i1=create_if_block$3(a1),i1.c(),transition_in(i1,1),i1.m(r1.parentNode,r1)):i1&&(group_outros(),transition_out(i1,1,1,()=>{i1=null}),check_outros())},i(a1){o1||(transition_in(e1.$$.fragment,a1),transition_in(i1),o1=!0)},o(a1){transition_out(e1.$$.fragment,a1),transition_out(i1),o1=!1},d(a1){destroy_component(e1,a1),a1&&detach(t1),i1&&i1.d(a1),a1&&detach(r1)}}}function instance$6(n1,e1,t1){let r1,o1,i1,a1,s1,l1,c1,u1,f1,p1,d1,m1;component_subscribe(n1,auth,k1=>t1(6,u1=k1)),component_subscribe(n1,redirect,k1=>t1(7,f1=k1)),component_subscribe(n1,isActive,k1=>t1(8,p1=k1)),component_subscribe(n1,admin,k1=>t1(9,d1=k1)),component_subscribe(n1,params,k1=>t1(14,m1=k1));let{$$slots:_1={},$$scope:h1}=e1,b1=!1;const $1=async()=>{const k1=window.location.host;if(k1.includes("localhost:")||!i1)return;const S1=new URL(i1).host;let C1;const A1=k1.split(S1).filter(E1=>E1!=="");if(A1.length===1&&(C1=A1[0].replace(/\./g,"")),l1&&l1.tenantId){if(!C1){if(!window.location.host.includes("localhost")){let E1=window.location.href;E1=E1.replace("://",`://${l1.tenantId}.`),window.location.href=E1}return}if(C1&&l1.tenantId!==C1)try{await auth.logout(),await auth.setOrganisation(null)}catch{console.error(`Tenant mis-match - "${C1}" and "${l1.tenantId}" - logout`)}}else await auth.setOrganisation(C1)};async function v1(){await API.analyticsPing({source:"builder"})}return onMount(async()=>{try{await auth.getSelf(),await admin.init(),u1.user&&await licensing.init(),m1["?template"]&&await auth.setInitInfo({init_template:m1["?template"]}),r1&&await $1()}catch{}t1(0,b1=!0),await v1()}),n1.$$set=k1=>{"$$scope"in k1&&t1(10,h1=k1.$$scope)},n1.$$.update=()=>{var k1,S1,C1;if(n1.$$.dirty&512&&t1(5,r1=d1.multiTenancy),n1.$$.dirty&512&&t1(2,o1=(S1=(k1=d1==null?void 0:d1.checklist)==null?void 0:k1.adminUser)==null?void 0:S1.checked),n1.$$.dirty&512&&(i1=d1==null?void 0:d1.baseUrl),n1.$$.dirty&64&&t1(4,a1=u1.tenantSet),n1.$$.dirty&512&&t1(1,s1=d1==null?void 0:d1.cloud),n1.$$.dirty&64&&(l1=u1.user),n1.$$.dirty&514&&t1(3,c1=s1&&!d1.disableAccountPortal),n1.$$.dirty&1023){const A1=d1.loaded&&u1.loaded;if(b1&&A1&&!u1.user&&!getCookie(Cookies.ReturnUrl)&&!u1.postLogout&&!p1("./auth")&&!p1("./invite")&&!p1("./admin")){const E1=window.location.pathname;setCookie(Cookies.ReturnUrl,E1)}if(b1&&!c1&&A1&&r1&&!a1)f1("./auth/org");else if(b1&&!c1&&A1&&!o1)f1("./admin");else if(b1&&(o1||s1)&&!u1.user&&!p1("./auth")&&!p1("./invite")&&!p1("./admin"))f1("./auth");else if((C1=u1.user)!=null&&C1.forceResetPassword)f1("./auth/reset");else if(b1&&A1&&u1.user){const E1=getCookie(Cookies.ReturnUrl);E1&&(removeCookie(Cookies.ReturnUrl),window.location.href=E1)}}},[b1,s1,o1,c1,a1,r1,u1,f1,p1,d1,h1,_1]}class Layout extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$6,create_fragment$5,safe_not_equal,{})}}function instance$5(n1,e1,t1){let r1;return component_subscribe(n1,redirect,o1=>t1(0,r1=o1)),onMount(async()=>{try{await auth.checkQueryString()}catch{notifications.error("Error setting org")}r1("./builder")}),[]}class Pages extends SvelteComponent{constructor(e1){super(),init$2(this,e1,instance$5,null,safe_not_equal,{})}}const _tree={root:!0,children:[{isDir:!0,children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/admin/index",id:"_builder_admin_index",component:()=>Admin}],isLayout:!0,path:"/builder/admin",id:"_builder_admin__layout",component:()=>Layout$m},{isDir:!0,children:[{isDir:!0,children:[{isFallback:!0,path:"/builder/app/:application/_fallback",id:"_builder_app__application__fallback",component:()=>Fallback$1},{isIndex:!0,isPage:!0,path:"/builder/app/:application/index",id:"_builder_app__application_index",component:()=>U5Bapplicationu5D},{isDir:!0,children:[{isDir:!0,children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/datasource/:datasourceId/index",id:"_builder_app__application_data_datasource__datasourceId_index",component:()=>U5BdatasourceIdu5D$1}],isLayout:!0,path:"/builder/app/:application/data/datasource/:datasourceId",id:"_builder_app__application_data_datasource__datasourceId__layout",component:()=>Layout$l},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/datasource/bb_internal/index",id:"_builder_app__application_data_datasource_bb_internal_index",component:()=>Bb_internal}],path:"/builder/app/:application/data/datasource/bb_internal"},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/datasource/datasource_internal_bb_default/index",id:"_builder_app__application_data_datasource_datasource_internal_bb_default_index",component:()=>Datasource_internal_bb_default}],path:"/builder/app/:application/data/datasource/datasource_internal_bb_default"},{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/datasource/index",id:"_builder_app__application_data_datasource_index",component:()=>Datasource}],isLayout:!0,path:"/builder/app/:application/data/datasource",id:"_builder_app__application_data_datasource__layout",component:()=>Layout$k},{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/index",id:"_builder_app__application_data_index",component:()=>Data},{isPage:!0,path:"/builder/app/:application/data/new",id:"_builder_app__application_data_new",component:()=>New$3},{isDir:!0,ext:"",children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/query/:queryId/index",id:"_builder_app__application_data_query__queryId_index",component:()=>U5BqueryIdu5D}],isLayout:!0,path:"/builder/app/:application/data/query/:queryId",id:"_builder_app__application_data_query__queryId__layout",component:()=>Layout$j},{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/query/index",id:"_builder_app__application_data_query_index",component:()=>Query},{isDir:!0,ext:"",children:[{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/query/new/:datasourceId/index",id:"_builder_app__application_data_query_new__datasourceId_index",component:()=>U5BdatasourceIdu5D}],path:"/builder/app/:application/data/query/new/:datasourceId"},{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/query/new/index",id:"_builder_app__application_data_query_new_index",component:()=>New$2}],path:"/builder/app/:application/data/query/new"}],path:"/builder/app/:application/data/query"},{isDir:!0,ext:"",children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/table/:tableId/index",id:"_builder_app__application_data_table__tableId_index",component:()=>U5BtableIdu5D},{isDir:!0,ext:"",children:[{isDir:!0,ext:"",children:[{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/table/:tableId/relationship/:rowId/:field/index",id:"_builder_app__application_data_table__tableId_relationship__rowId__field_index",component:()=>U5Bfieldu5D}],path:"/builder/app/:application/data/table/:tableId/relationship/:rowId/:field"},{isIndex:!0,isPage:!0,ownMeta:{index:!1},meta:{index:!1,recursive:!0,preload:!1,prerender:!0},path:"/builder/app/:application/data/table/:tableId/relationship/:rowId/index",id:"_builder_app__application_data_table__tableId_relationship__rowId_index",component:()=>U5BrowIdu5D}],path:"/builder/app/:application/data/table/:tableId/relationship/:rowId"},{isIndex:!0,isPage:!0,ownMeta:{index:!1},meta:{index:!1,recursive:!0,preload:!1,prerender:!0},path:"/builder/app/:application/data/table/:tableId/relationship/index",id:"_builder_app__application_data_table__tableId_relationship_index",component:()=>Relationship}],path:"/builder/app/:application/data/table/:tableId/relationship"}],isLayout:!0,path:"/builder/app/:application/data/table/:tableId",id:"_builder_app__application_data_table__tableId__layout",component:()=>Layout$i},{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/table/index",id:"_builder_app__application_data_table_index",component:()=>Table}],path:"/builder/app/:application/data/table"},{isDir:!0,ext:"",children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/view/:viewName/index",id:"_builder_app__application_data_view__viewName_index",component:()=>U5BviewNameu5D}],isLayout:!0,path:"/builder/app/:application/data/view/:viewName",id:"_builder_app__application_data_view__viewName__layout",component:()=>Layout$h},{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/view/index",id:"_builder_app__application_data_view_index",component:()=>View}],path:"/builder/app/:application/data/view"}],isLayout:!0,ownMeta:{index:1},meta:{index:1,recursive:!0,preload:!1,prerender:!0},path:"/builder/app/:application/data",id:"_builder_app__application_data__layout",component:()=>Layout_1$2},{isDir:!0,children:[{isDir:!0,children:[{isFallback:!0,path:"/builder/app/:application/design/:screenId/_fallback",id:"_builder_app__application_design__screenId__fallback",component:()=>Fallback},{isDir:!0,ext:"",children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/components/:componentId/index",id:"_builder_app__application_design__screenId_components__componentId_index",component:()=>U5BcomponentIdu5D},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/components/:componentId/new/index",id:"_builder_app__application_design__screenId_components__componentId_new_index",component:()=>New$1}],path:"/builder/app/:application/design/:screenId/components/:componentId/new"}],isLayout:!0,path:"/builder/app/:application/design/:screenId/components/:componentId",id:"_builder_app__application_design__screenId_components__componentId__layout",component:()=>Layout$g},{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/components/index",id:"_builder_app__application_design__screenId_components_index",component:()=>Components}],path:"/builder/app/:application/design/:screenId/components"},{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/index",id:"_builder_app__application_design__screenId_index",component:()=>U5BscreenIdu5D},{isDir:!0,children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/layouts/:layoutId/index",id:"_builder_app__application_design__screenId_layouts__layoutId_index",component:()=>U5BlayoutIdu5D}],isLayout:!0,path:"/builder/app/:application/design/:screenId/layouts/:layoutId",id:"_builder_app__application_design__screenId_layouts__layoutId__layout",component:()=>Layout$f},{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/layouts/index",id:"_builder_app__application_design__screenId_layouts_index",component:()=>Layouts}],isLayout:!0,path:"/builder/app/:application/design/:screenId/layouts",id:"_builder_app__application_design__screenId_layouts__layout",component:()=>Layout$e},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/navigation/index",id:"_builder_app__application_design__screenId_navigation_index",component:()=>Navigation}],path:"/builder/app/:application/design/:screenId/navigation"},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/screens/index",id:"_builder_app__application_design__screenId_screens_index",component:()=>Screens}],path:"/builder/app/:application/design/:screenId/screens"},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/theme/index",id:"_builder_app__application_design__screenId_theme_index",component:()=>Theme}],path:"/builder/app/:application/design/:screenId/theme"}],isLayout:!0,path:"/builder/app/:application/design/:screenId",id:"_builder_app__application_design__screenId__layout",component:()=>Layout$d},{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/index",id:"_builder_app__application_design_index",component:()=>Design},{isPage:!0,path:"/builder/app/:application/design/new",id:"_builder_app__application_design_new",component:()=>New}],isLayout:!0,ownMeta:{index:2},meta:{index:2,recursive:!0,preload:!1,prerender:!0},path:"/builder/app/:application/design",id:"_builder_app__application_design__layout",component:()=>Layout$c},{isDir:!0,children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/automation/:automationId/index",id:"_builder_app__application_automation__automationId_index",component:()=>U5BautomationIdu5D}],isLayout:!0,path:"/builder/app/:application/automation/:automationId",id:"_builder_app__application_automation__automationId__layout",component:()=>Layout$b},{isIndex:!0,isPage:!0,path:"/builder/app/:application/automation/index",id:"_builder_app__application_automation_index",component:()=>Automation}],isLayout:!0,ownMeta:{index:3},meta:{index:3,recursive:!0,preload:!1,prerender:!0},path:"/builder/app/:application/automation",id:"_builder_app__application_automation__layout",component:()=>Layout_1$1},{isDir:!0,children:[{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/settings/automation-history/index",id:"_builder_app__application_settings_automationHistory_index",component:()=>Automation_history}],path:"/builder/app/:application/settings/automation-history"},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/settings/backups/index",id:"_builder_app__application_settings_backups_index",component:()=>Backups}],path:"/builder/app/:application/settings/backups"},{isPage:!0,path:"/builder/app/:application/settings/embed",id:"_builder_app__application_settings_embed",component:()=>Embed},{isPage:!0,path:"/builder/app/:application/settings/export",id:"_builder_app__application_settings_export",component:()=>Export},{isIndex:!0,isPage:!0,path:"/builder/app/:application/settings/index",id:"_builder_app__application_settings_index",component:()=>Settings$1},{isPage:!0,path:"/builder/app/:application/settings/name-and-url",id:"_builder_app__application_settings_nameAndUrl",component:()=>Name_and_url},{isPage:!0,path:"/builder/app/:application/settings/version",id:"_builder_app__application_settings_version",component:()=>Version$1}],isLayout:!0,ownMeta:{index:4},meta:{index:4,recursive:!0,preload:!1,prerender:!0},path:"/builder/app/:application/settings",id:"_builder_app__application_settings__layout",component:()=>Layout_1}],isLayout:!0,path:"/builder/app/:application",id:"_builder_app__application__layout",component:()=>Layout$a},{isIndex:!0,isPage:!0,path:"/builder/app/index",id:"_builder_app_index",component:()=>App$1}],isLayout:!0,path:"/builder/app",id:"_builder_app__layout",component:()=>Layout$9},{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/apps/index",id:"_builder_apps_index",component:()=>Apps$1}],isLayout:!0,path:"/builder/apps",id:"_builder_apps__layout",component:()=>Layout$8},{isDir:!0,children:[{isPage:!0,path:"/builder/auth/forgot",id:"_builder_auth_forgot",component:()=>Forgot},{isIndex:!0,isPage:!0,path:"/builder/auth/index",id:"_builder_auth_index",component:()=>Auth$1},{isPage:!0,path:"/builder/auth/login",id:"_builder_auth_login",component:()=>Login},{isPage:!0,path:"/builder/auth/org",id:"_builder_auth_org",component:()=>Org},{isPage:!0,path:"/builder/auth/reset",id:"_builder_auth_reset",component:()=>Reset}],isLayout:!0,path:"/builder/auth",id:"_builder_auth__layout",component:()=>Layout$7},{isPage:!0,path:"/builder/Branding",id:"_builder_Branding",component:()=>Branding$1},{isIndex:!0,isPage:!0,path:"/builder/index",id:"_builder_index",component:()=>Builder},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/invite/index",id:"_builder_invite_index",component:()=>Invite}],path:"/builder/invite"},{isDir:!0,children:[{isDir:!0,children:[{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/portal/account/auditLogs/index",id:"_builder_portal_account_auditLogs_index",component:()=>AuditLogs}],path:"/builder/portal/account/auditLogs"},{isIndex:!0,isPage:!0,path:"/builder/portal/account/index",id:"_builder_portal_account_index",component:()=>Account},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/portal/account/systemLogs/index",id:"_builder_portal_account_systemLogs_index",component:()=>SystemLogs}],path:"/builder/portal/account/systemLogs"},{isPage:!0,path:"/builder/portal/account/upgrade",id:"_builder_portal_account_upgrade",component:()=>Upgrade},{isPage:!0,path:"/builder/portal/account/usage",id:"_builder_portal_account_usage",component:()=>Usage_1}],isLayout:!0,path:"/builder/portal/account",id:"_builder_portal_account__layout",component:()=>Layout$6},{isDir:!0,children:[{isPage:!0,path:"/builder/portal/apps/create",id:"_builder_portal_apps_create",component:()=>Create},{isIndex:!0,isPage:!0,path:"/builder/portal/apps/index",id:"_builder_portal_apps_index",component:()=>Apps},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/portal/apps/onboarding/index",id:"_builder_portal_apps_onboarding_index",component:()=>Onboarding}],path:"/builder/portal/apps/onboarding"},{isPage:!0,path:"/builder/portal/apps/templates",id:"_builder_portal_apps_templates",component:()=>Templates}],isLayout:!0,path:"/builder/portal/apps",id:"_builder_portal_apps__layout",component:()=>Layout$5},{isIndex:!0,isPage:!0,path:"/builder/portal/index",id:"_builder_portal_index",component:()=>Portal},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/portal/plugins/index",id:"_builder_portal_plugins_index",component:()=>Plugins}],path:"/builder/portal/plugins"},{isDir:!0,children:[{isDir:!0,ext:"",children:[{isPage:!0,path:"/builder/portal/settings/auth/google",id:"_builder_portal_settings_auth_google",component:()=>Google},{isIndex:!0,isPage:!0,path:"/builder/portal/settings/auth/index",id:"_builder_portal_settings_auth_index",component:()=>Auth},{isPage:!0,path:"/builder/portal/settings/auth/scim",id:"_builder_portal_settings_auth_scim",component:()=>Scim}],path:"/builder/portal/settings/auth"},{isPage:!0,path:"/builder/portal/settings/branding",id:"_builder_portal_settings_branding",component:()=>Branding},{isPage:!0,path:"/builder/portal/settings/diagnostics",id:"_builder_portal_settings_diagnostics",component:()=>Diagnostics},{isDir:!0,children:[{isPage:!0,path:"/builder/portal/settings/email/:template",id:"_builder_portal_settings_email__template",component:()=>U5Btemplateu5D},{isIndex:!0,isPage:!0,path:"/builder/portal/settings/email/index",id:"_builder_portal_settings_email_index",component:()=>Email}],isLayout:!0,path:"/builder/portal/settings/email",id:"_builder_portal_settings_email__layout",component:()=>Layout$4},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/portal/settings/environment/index",id:"_builder_portal_settings_environment_index",component:()=>Environment}],path:"/builder/portal/settings/environment"},{isIndex:!0,isPage:!0,path:"/builder/portal/settings/index",id:"_builder_portal_settings_index",component:()=>Settings},{isPage:!0,path:"/builder/portal/settings/organisation",id:"_builder_portal_settings_organisation",component:()=>Organisation},{isPage:!0,path:"/builder/portal/settings/version",id:"_builder_portal_settings_version",component:()=>Version}],isLayout:!0,path:"/builder/portal/settings",id:"_builder_portal_settings__layout",component:()=>Layout$3},{isDir:!0,children:[{isDir:!0,ext:"",children:[{isPage:!0,path:"/builder/portal/users/groups/:groupId",id:"_builder_portal_users_groups__groupId",component:()=>U5BgroupIdu5D},{isIndex:!0,isPage:!0,path:"/builder/portal/users/groups/index",id:"_builder_portal_users_groups_index",component:()=>Groups}],path:"/builder/portal/users/groups"},{isIndex:!0,isPage:!0,path:"/builder/portal/users/index",id:"_builder_portal_users_index",component:()=>Users$1},{isDir:!0,ext:"",children:[{isPage:!0,path:"/builder/portal/users/users/:userId",id:"_builder_portal_users_users__userId",component:()=>U5BuserIdu5D},{isIndex:!0,isPage:!0,path:"/builder/portal/users/users/index",id:"_builder_portal_users_users_index",component:()=>Users}],path:"/builder/portal/users/users"}],isLayout:!0,path:"/builder/portal/users",id:"_builder_portal_users__layout",component:()=>Layout$2}],isLayout:!0,path:"/builder/portal",id:"_builder_portal__layout",component:()=>Layout$1}],isLayout:!0,path:"/builder",id:"_builder__layout",component:()=>Layout},{isIndex:!0,isPage:!0,path:"/index",id:"_index",component:()=>Pages}],path:"/"},{tree,routes}=buildClientTree(_tree);var shams=function n1(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e1={},t1=Symbol("test"),r1=Object(t1);if(typeof t1=="string"||Object.prototype.toString.call(t1)!=="[object Symbol]"||Object.prototype.toString.call(r1)!=="[object Symbol]")return!1;var o1=42;e1[t1]=o1;for(t1 in e1)return!1;if(typeof Object.keys=="function"&&Object.keys(e1).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e1).length!==0)return!1;var i1=Object.getOwnPropertySymbols(e1);if(i1.length!==1||i1[0]!==t1||!Object.prototype.propertyIsEnumerable.call(e1,t1))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a1=Object.getOwnPropertyDescriptor(e1,t1);if(a1.value!==o1||a1.enumerable!==!0)return!1}return!0},origSymbol=typeof Symbol<"u"&&Symbol,hasSymbolSham=shams,hasSymbols$2=function n1(){return typeof origSymbol!="function"||typeof Symbol!="function"||typeof origSymbol("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:hasSymbolSham()},ERROR_MESSAGE="Function.prototype.bind called on incompatible ",slice=Array.prototype.slice,toStr$1=Object.prototype.toString,funcType="[object Function]",implementation$1=function n1(e1){var t1=this;if(typeof t1!="function"||toStr$1.call(t1)!==funcType)throw new TypeError(ERROR_MESSAGE+t1);for(var r1=slice.call(arguments,1),o1,i1=function(){if(this instanceof o1){var u1=t1.apply(this,r1.concat(slice.call(arguments)));return Object(u1)===u1?u1:this}else return t1.apply(e1,r1.concat(slice.call(arguments)))},a1=Math.max(0,t1.length-r1.length),s1=[],l1=0;l1<a1;l1++)s1.push("$"+l1);if(o1=Function("binder","return function ("+s1.join(",")+"){ return binder.apply(this,arguments); }")(i1),t1.prototype){var c1=function(){};c1.prototype=t1.prototype,o1.prototype=new c1,c1.prototype=null}return o1},implementation=implementation$1,functionBind=Function.prototype.bind||implementation,bind$2=functionBind,src=bind$2.call(Function.call,Object.prototype.hasOwnProperty),undefined$2,$SyntaxError$1=SyntaxError,$Function$1=Function,$TypeError$2=TypeError,getEvalledConstructor$1=function(n1){try{return $Function$1('"use strict"; return ('+n1+").constructor;")()}catch{}},$gOPD$1=Object.getOwnPropertyDescriptor;if($gOPD$1)try{$gOPD$1({},"")}catch{$gOPD$1=null}var throwTypeError$1=function(){throw new $TypeError$2},ThrowTypeError$1=$gOPD$1?function(){try{return arguments.callee,throwTypeError$1}catch{try{return $gOPD$1(arguments,"callee").get}catch{return throwTypeError$1}}}():throwTypeError$1,hasSymbols$1=hasSymbols$2(),getProto$1=Object.getPrototypeOf||function(n1){return n1.__proto__},needsEval$1={},TypedArray$1=typeof Uint8Array>"u"?undefined$2:getProto$1(Uint8Array),INTRINSICS$1={"%AggregateError%":typeof AggregateError>"u"?undefined$2:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?undefined$2:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols$1?getProto$1([][Symbol.iterator]()):undefined$2,"%AsyncFromSyncIteratorPrototype%":undefined$2,"%AsyncFunction%":needsEval$1,"%AsyncGenerator%":needsEval$1,"%AsyncGeneratorFunction%":needsEval$1,"%AsyncIteratorPrototype%":needsEval$1,"%Atomics%":typeof Atomics>"u"?undefined$2:Atomics,"%BigInt%":typeof BigInt>"u"?undefined$2:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?undefined$2:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?undefined$2:Float32Array,"%Float64Array%":typeof Float64Array>"u"?undefined$2:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?undefined$2:FinalizationRegistry,"%Function%":$Function$1,"%GeneratorFunction%":needsEval$1,"%Int8Array%":typeof Int8Array>"u"?undefined$2:Int8Array,"%Int16Array%":typeof Int16Array>"u"?undefined$2:Int16Array,"%Int32Array%":typeof Int32Array>"u"?undefined$2:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols$1?getProto$1(getProto$1([][Symbol.iterator]())):undefined$2,"%JSON%":typeof JSON=="object"?JSON:undefined$2,"%Map%":typeof Map>"u"?undefined$2:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hasSymbols$1?undefined$2:getProto$1(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?undefined$2:Promise,"%Proxy%":typeof Proxy>"u"?undefined$2:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?undefined$2:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?undefined$2:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hasSymbols$1?undefined$2:getProto$1(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?undefined$2:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols$1?getProto$1(""[Symbol.iterator]()):undefined$2,"%Symbol%":hasSymbols$1?Symbol:undefined$2,"%SyntaxError%":$SyntaxError$1,"%ThrowTypeError%":ThrowTypeError$1,"%TypedArray%":TypedArray$1,"%TypeError%":$TypeError$2,"%Uint8Array%":typeof Uint8Array>"u"?undefined$2:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?undefined$2:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?undefined$2:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?undefined$2:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?undefined$2:WeakMap,"%WeakRef%":typeof WeakRef>"u"?undefined$2:WeakRef,"%WeakSet%":typeof WeakSet>"u"?undefined$2:WeakSet},doEval$1=function n1(e1){var t1;if(e1==="%AsyncFunction%")t1=getEvalledConstructor$1("async function () {}");else if(e1==="%GeneratorFunction%")t1=getEvalledConstructor$1("function* () {}");else if(e1==="%AsyncGeneratorFunction%")t1=getEvalledConstructor$1("async function* () {}");else if(e1==="%AsyncGenerator%"){var r1=n1("%AsyncGeneratorFunction%");r1&&(t1=r1.prototype)}else if(e1==="%AsyncIteratorPrototype%"){var o1=n1("%AsyncGenerator%");o1&&(t1=getProto$1(o1.prototype))}return INTRINSICS$1[e1]=t1,t1},LEGACY_ALIASES$1={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind$1=functionBind,hasOwn$2=src,$concat$2=bind$1.call(Function.call,Array.prototype.concat),$spliceApply$1=bind$1.call(Function.apply,Array.prototype.splice),$replace$2=bind$1.call(Function.call,String.prototype.replace),$strSlice$1=bind$1.call(Function.call,String.prototype.slice),$exec$1=bind$1.call(Function.call,RegExp.prototype.exec),rePropName$1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar$1=/\\(\\)?/g,stringToPath$1=function n1(e1){var t1=$strSlice$1(e1,0,1),r1=$strSlice$1(e1,-1);if(t1==="%"&&r1!=="%")throw new $SyntaxError$1("invalid intrinsic syntax, expected closing `%`");if(r1==="%"&&t1!=="%")throw new $SyntaxError$1("invalid intrinsic syntax, expected opening `%`");var o1=[];return $replace$2(e1,rePropName$1,function(i1,a1,s1,l1){o1[o1.length]=s1?$replace$2(l1,reEscapeChar$1,"$1"):a1||i1}),o1},getBaseIntrinsic$1=function n1(e1,t1){var r1=e1,o1;if(hasOwn$2(LEGACY_ALIASES$1,r1)&&(o1=LEGACY_ALIASES$1[r1],r1="%"+o1[0]+"%"),hasOwn$2(INTRINSICS$1,r1)){var i1=INTRINSICS$1[r1];if(i1===needsEval$1&&(i1=doEval$1(r1)),typeof i1>"u"&&!t1)throw new $TypeError$2("intrinsic "+e1+" exists, but is not available. Please file an issue!");return{alias:o1,name:r1,value:i1}}throw new $SyntaxError$1("intrinsic "+e1+" does not exist!")},getIntrinsic$1=function n1(e1,t1){if(typeof e1!="string"||e1.length===0)throw new $TypeError$2("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t1!="boolean")throw new $TypeError$2('"allowMissing" argument must be a boolean');if($exec$1(/^%?[^%]*%?$/,e1)===null)throw new $SyntaxError$1("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r1=stringToPath$1(e1),o1=r1.length>0?r1[0]:"",i1=getBaseIntrinsic$1("%"+o1+"%",t1),a1=i1.name,s1=i1.value,l1=!1,c1=i1.alias;c1&&(o1=c1[0],$spliceApply$1(r1,$concat$2([0,1],c1)));for(var u1=1,f1=!0;u1<r1.length;u1+=1){var p1=r1[u1],d1=$strSlice$1(p1,0,1),m1=$strSlice$1(p1,-1);if((d1==='"'||d1==="'"||d1==="`"||m1==='"'||m1==="'"||m1==="`")&&d1!==m1)throw new $SyntaxError$1("property names with quotes must have matching quotes");if((p1==="constructor"||!f1)&&(l1=!0),o1+="."+p1,a1="%"+o1+"%",hasOwn$2(INTRINSICS$1,a1))s1=INTRINSICS$1[a1];else if(s1!=null){if(!(p1 in s1)){if(!t1)throw new $TypeError$2("base intrinsic for "+e1+" exists, but the property is not available.");return}if($gOPD$1&&u1+1>=r1.length){var _1=$gOPD$1(s1,p1);f1=!!_1,f1&&"get"in _1&&!("originalValue"in _1.get)?s1=_1.get:s1=s1[p1]}else f1=hasOwn$2(s1,p1),s1=s1[p1];f1&&!l1&&(INTRINSICS$1[a1]=s1)}}return s1},undefined$1,$SyntaxError=SyntaxError,$Function=Function,$TypeError$1=TypeError,getEvalledConstructor=function(n1){try{return $Function('"use strict"; return ('+n1+").constructor;")()}catch{}},$gOPD=Object.getOwnPropertyDescriptor;if($gOPD)try{$gOPD({},"")}catch{$gOPD=null}var throwTypeError=function(){throw new $TypeError$1},ThrowTypeError=$gOPD?function(){try{return arguments.callee,throwTypeError}catch{try{return $gOPD(arguments,"callee").get}catch{return throwTypeError}}}():throwTypeError,hasSymbols=hasSymbols$2(),getProto=Object.getPrototypeOf||function(n1){return n1.__proto__},needsEval={},TypedArray=typeof Uint8Array>"u"?undefined$1:getProto(Uint8Array),INTRINSICS={"%AggregateError%":typeof AggregateError>"u"?undefined$1:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?undefined$1:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols?getProto([][Symbol.iterator]()):undefined$1,"%AsyncFromSyncIteratorPrototype%":undefined$1,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":typeof Atomics>"u"?undefined$1:Atomics,"%BigInt%":typeof BigInt>"u"?undefined$1:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?undefined$1:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?undefined$1:Float32Array,"%Float64Array%":typeof Float64Array>"u"?undefined$1:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?undefined$1:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":typeof Int8Array>"u"?undefined$1:Int8Array,"%Int16Array%":typeof Int16Array>"u"?undefined$1:Int16Array,"%Int32Array%":typeof Int32Array>"u"?undefined$1:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols?getProto(getProto([][Symbol.iterator]())):undefined$1,"%JSON%":typeof JSON=="object"?JSON:undefined$1,"%Map%":typeof Map>"u"?undefined$1:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hasSymbols?undefined$1:getProto(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?undefined$1:Promise,"%Proxy%":typeof Proxy>"u"?undefined$1:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?undefined$1:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?undefined$1:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hasSymbols?undefined$1:getProto(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?undefined$1:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols?getProto(""[Symbol.iterator]()):undefined$1,"%Symbol%":hasSymbols?Symbol:undefined$1,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError$1,"%Uint8Array%":typeof Uint8Array>"u"?undefined$1:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?undefined$1:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?undefined$1:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?undefined$1:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?undefined$1:WeakMap,"%WeakRef%":typeof WeakRef>"u"?undefined$1:WeakRef,"%WeakSet%":typeof WeakSet>"u"?undefined$1:WeakSet},doEval=function n1(e1){var t1;if(e1==="%AsyncFunction%")t1=getEvalledConstructor("async function () {}");else if(e1==="%GeneratorFunction%")t1=getEvalledConstructor("function* () {}");else if(e1==="%AsyncGeneratorFunction%")t1=getEvalledConstructor("async function* () {}");else if(e1==="%AsyncGenerator%"){var r1=n1("%AsyncGeneratorFunction%");r1&&(t1=r1.prototype)}else if(e1==="%AsyncIteratorPrototype%"){var o1=n1("%AsyncGenerator%");o1&&(t1=getProto(o1.prototype))}return INTRINSICS[e1]=t1,t1},LEGACY_ALIASES={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind=functionBind,hasOwn$1=src,$concat$1=bind.call(Function.call,Array.prototype.concat),$spliceApply=bind.call(Function.apply,Array.prototype.splice),$replace$1=bind.call(Function.call,String.prototype.replace),$strSlice=bind.call(Function.call,String.prototype.slice),$exec=bind.call(Function.call,RegExp.prototype.exec),rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=function n1(e1){var t1=$strSlice(e1,0,1),r1=$strSlice(e1,-1);if(t1==="%"&&r1!=="%")throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if(r1==="%"&&t1!=="%")throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var o1=[];return $replace$1(e1,rePropName,function(i1,a1,s1,l1){o1[o1.length]=s1?$replace$1(l1,reEscapeChar,"$1"):a1||i1}),o1},getBaseIntrinsic=function n1(e1,t1){var r1=e1,o1;if(hasOwn$1(LEGACY_ALIASES,r1)&&(o1=LEGACY_ALIASES[r1],r1="%"+o1[0]+"%"),hasOwn$1(INTRINSICS,r1)){var i1=INTRINSICS[r1];if(i1===needsEval&&(i1=doEval(r1)),typeof i1>"u"&&!t1)throw new $TypeError$1("intrinsic "+e1+" exists, but is not available. Please file an issue!");return{alias:o1,name:r1,value:i1}}throw new $SyntaxError("intrinsic "+e1+" does not exist!")},getIntrinsic=function n1(e1,t1){if(typeof e1!="string"||e1.length===0)throw new $TypeError$1("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t1!="boolean")throw new $TypeError$1('"allowMissing" argument must be a boolean');if($exec(/^%?[^%]*%?$/,e1)===null)throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r1=stringToPath(e1),o1=r1.length>0?r1[0]:"",i1=getBaseIntrinsic("%"+o1+"%",t1),a1=i1.name,s1=i1.value,l1=!1,c1=i1.alias;c1&&(o1=c1[0],$spliceApply(r1,$concat$1([0,1],c1)));for(var u1=1,f1=!0;u1<r1.length;u1+=1){var p1=r1[u1],d1=$strSlice(p1,0,1),m1=$strSlice(p1,-1);if((d1==='"'||d1==="'"||d1==="`"||m1==='"'||m1==="'"||m1==="`")&&d1!==m1)throw new $SyntaxError("property names with quotes must have matching quotes");if((p1==="constructor"||!f1)&&(l1=!0),o1+="."+p1,a1="%"+o1+"%",hasOwn$1(INTRINSICS,a1))s1=INTRINSICS[a1];else if(s1!=null){if(!(p1 in s1)){if(!t1)throw new $TypeError$1("base intrinsic for "+e1+" exists, but the property is not available.");return}if($gOPD&&u1+1>=r1.length){var _1=$gOPD(s1,p1);f1=!!_1,f1&&"get"in _1&&!("originalValue"in _1.get)?s1=_1.get:s1=s1[p1]}else f1=hasOwn$1(s1,p1),s1=s1[p1];f1&&!l1&&(INTRINSICS[a1]=s1)}}return s1},callBind$1={exports:{}};(function(n1){var e1=functionBind,t1=getIntrinsic,r1=t1("%Function.prototype.apply%"),o1=t1("%Function.prototype.call%"),i1=t1("%Reflect.apply%",!0)||e1.call(o1,r1),a1=t1("%Object.getOwnPropertyDescriptor%",!0),s1=t1("%Object.defineProperty%",!0),l1=t1("%Math.max%");if(s1)try{s1({},"a",{value:1})}catch{s1=null}n1.exports=function(f1){var p1=i1(e1,o1,arguments);if(a1&&s1){var d1=a1(p1,"length");d1.configurable&&s1(p1,"length",{value:1+l1(0,f1.length-(arguments.length-1))})}return p1};var c1=function(){return i1(e1,r1,arguments)};s1?s1(n1.exports,"apply",{value:c1}):n1.exports.apply=c1})(callBind$1);var GetIntrinsic$1=getIntrinsic,callBind=callBind$1.exports,$indexOf=callBind(GetIntrinsic$1("String.prototype.indexOf")),callBound$1=function n1(e1,t1){var r1=GetIntrinsic$1(e1,!!t1);return typeof r1=="function"&&$indexOf(e1,".prototype.")>-1?callBind(r1):r1},hasMap=typeof Map=="function"&&Map.prototype,mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,mapSize=hasMap&&mapSizeDescriptor&&typeof mapSizeDescriptor.get=="function"?mapSizeDescriptor.get:null,mapForEach=hasMap&&Map.prototype.forEach,hasSet=typeof Set=="function"&&Set.prototype,setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,setSize=hasSet&&setSizeDescriptor&&typeof setSizeDescriptor.get=="function"?setSizeDescriptor.get:null,setForEach=hasSet&&Set.prototype.forEach,hasWeakMap=typeof WeakMap=="function"&&WeakMap.prototype,weakMapHas=hasWeakMap?WeakMap.prototype.has:null,hasWeakSet=typeof WeakSet=="function"&&WeakSet.prototype,weakSetHas=hasWeakSet?WeakSet.prototype.has:null,hasWeakRef=typeof WeakRef=="function"&&WeakRef.prototype,weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null,booleanValueOf=Boolean.prototype.valueOf,objectToString=Object.prototype.toString,functionToString=Function.prototype.toString,$match=String.prototype.match,$slice=String.prototype.slice,$replace=String.prototype.replace,$toUpperCase=String.prototype.toUpperCase,$toLowerCase=String.prototype.toLowerCase,$test=RegExp.prototype.test,$concat=Array.prototype.concat,$join=Array.prototype.join,$arrSlice=Array.prototype.slice,$floor=Math.floor,bigIntValueOf=typeof BigInt=="function"?BigInt.prototype.valueOf:null,gOPS=Object.getOwnPropertySymbols,symToString=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,hasShammedSymbols=typeof Symbol=="function"&&typeof Symbol.iterator=="object",toStringTag=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hasShammedSymbols?"object":"symbol")?Symbol.toStringTag:null,isEnumerable=Object.prototype.propertyIsEnumerable,gPO=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n1){return n1.__proto__}:null);function addNumericSeparator(n1,e1){if(n1===1/0||n1===-1/0||n1!==n1||n1&&n1>-1e3&&n1<1e3||$test.call(/e/,e1))return e1;var t1=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n1=="number"){var r1=n1<0?-$floor(-n1):$floor(n1);if(r1!==n1){var o1=String(r1),i1=$slice.call(e1,o1.length+1);return $replace.call(o1,t1,"$&_")+"."+$replace.call($replace.call(i1,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(e1,t1,"$&_")}var utilInspect=require$$0,inspectCustom=utilInspect.custom,inspectSymbol=isSymbol(inspectCustom)?inspectCustom:null,objectInspect=function n1(e1,t1,r1,o1){var i1=t1||{};if(has$3(i1,"quoteStyle")&&i1.quoteStyle!=="single"&&i1.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has$3(i1,"maxStringLength")&&(typeof i1.maxStringLength=="number"?i1.maxStringLength<0&&i1.maxStringLength!==1/0:i1.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a1=has$3(i1,"customInspect")?i1.customInspect:!0;if(typeof a1!="boolean"&&a1!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has$3(i1,"indent")&&i1.indent!==null&&i1.indent!==" "&&!(parseInt(i1.indent,10)===i1.indent&&i1.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has$3(i1,"numericSeparator")&&typeof i1.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s1=i1.numericSeparator;if(typeof e1>"u")return"undefined";if(e1===null)return"null";if(typeof e1=="boolean")return e1?"true":"false";if(typeof e1=="string")return inspectString(e1,i1);if(typeof e1=="number"){if(e1===0)return 1/0/e1>0?"0":"-0";var l1=String(e1);return s1?addNumericSeparator(e1,l1):l1}if(typeof e1=="bigint"){var c1=String(e1)+"n";return s1?addNumericSeparator(e1,c1):c1}var u1=typeof i1.depth>"u"?5:i1.depth;if(typeof r1>"u"&&(r1=0),r1>=u1&&u1>0&&typeof e1=="object")return isArray$3(e1)?"[Array]":"[Object]";var f1=getIndent(i1,r1);if(typeof o1>"u")o1=[];else if(indexOf(o1,e1)>=0)return"[Circular]";function p1(U1,R1,D1){if(R1&&(o1=$arrSlice.call(o1),o1.push(R1)),D1){var F1={depth:i1.depth};return has$3(i1,"quoteStyle")&&(F1.quoteStyle=i1.quoteStyle),n1(U1,F1,r1+1,o1)}return n1(U1,i1,r1+1,o1)}if(typeof e1=="function"&&!isRegExp$1(e1)){var d1=nameOf(e1),m1=arrObjKeys(e1,p1);return"[Function"+(d1?": "+d1:" (anonymous)")+"]"+(m1.length>0?" { "+$join.call(m1,", ")+" }":"")}if(isSymbol(e1)){var _1=hasShammedSymbols?$replace.call(String(e1),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(e1);return typeof e1=="object"&&!hasShammedSymbols?markBoxed(_1):_1}if(isElement(e1)){for(var h1="<"+$toLowerCase.call(String(e1.nodeName)),b1=e1.attributes||[],$1=0;$1<b1.length;$1++)h1+=" "+b1[$1].name+"="+wrapQuotes(quote(b1[$1].value),"double",i1);return h1+=">",e1.childNodes&&e1.childNodes.length&&(h1+="..."),h1+="</"+$toLowerCase.call(String(e1.nodeName))+">",h1}if(isArray$3(e1)){if(e1.length===0)return"[]";var v1=arrObjKeys(e1,p1);return f1&&!singleLineValues(v1)?"["+indentedJoin(v1,f1)+"]":"[ "+$join.call(v1,", ")+" ]"}if(isError(e1)){var k1=arrObjKeys(e1,p1);return!("cause"in Error.prototype)&&"cause"in e1&&!isEnumerable.call(e1,"cause")?"{ ["+String(e1)+"] "+$join.call($concat.call("[cause]: "+p1(e1.cause),k1),", ")+" }":k1.length===0?"["+String(e1)+"]":"{ ["+String(e1)+"] "+$join.call(k1,", ")+" }"}if(typeof e1=="object"&&a1){if(inspectSymbol&&typeof e1[inspectSymbol]=="function"&&utilInspect)return utilInspect(e1,{depth:u1-r1});if(a1!=="symbol"&&typeof e1.inspect=="function")return e1.inspect()}if(isMap(e1)){var S1=[];return mapForEach.call(e1,function(U1,R1){S1.push(p1(R1,e1,!0)+" => "+p1(U1,e1))}),collectionOf("Map",mapSize.call(e1),S1,f1)}if(isSet(e1)){var C1=[];return setForEach.call(e1,function(U1){C1.push(p1(U1,e1))}),collectionOf("Set",setSize.call(e1),C1,f1)}if(isWeakMap(e1))return weakCollectionOf("WeakMap");if(isWeakSet(e1))return weakCollectionOf("WeakSet");if(isWeakRef(e1))return weakCollectionOf("WeakRef");if(isNumber(e1))return markBoxed(p1(Number(e1)));if(isBigInt(e1))return markBoxed(p1(bigIntValueOf.call(e1)));if(isBoolean(e1))return markBoxed(booleanValueOf.call(e1));if(isString(e1))return markBoxed(p1(String(e1)));if(!isDate(e1)&&!isRegExp$1(e1)){var A1=arrObjKeys(e1,p1),E1=gPO?gPO(e1)===Object.prototype:e1 instanceof Object||e1.constructor===Object,z1=e1 instanceof Object?"":"null prototype",I1=!E1&&toStringTag&&Object(e1)===e1&&toStringTag in e1?$slice.call(toStr(e1),8,-1):z1?"Object":"",N1=E1||typeof e1.constructor!="function"?"":e1.constructor.name?e1.constructor.name+" ":"",V1=N1+(I1||z1?"["+$join.call($concat.call([],I1||[],z1||[]),": ")+"] ":"");return A1.length===0?V1+"{}":f1?V1+"{"+indentedJoin(A1,f1)+"}":V1+"{ "+$join.call(A1,", ")+" }"}return String(e1)};function wrapQuotes(n1,e1,t1){var r1=(t1.quoteStyle||e1)==="double"?'"':"'";return r1+n1+r1}function quote(n1){return $replace.call(String(n1),/"/g,"&quot;")}function isArray$3(n1){return toStr(n1)==="[object Array]"&&(!toStringTag||!(typeof n1=="object"&&toStringTag in n1))}function isDate(n1){return toStr(n1)==="[object Date]"&&(!toStringTag||!(typeof n1=="object"&&toStringTag in n1))}function isRegExp$1(n1){return toStr(n1)==="[object RegExp]"&&(!toStringTag||!(typeof n1=="object"&&toStringTag in n1))}function isError(n1){return toStr(n1)==="[object Error]"&&(!toStringTag||!(typeof n1=="object"&&toStringTag in n1))}function isString(n1){return toStr(n1)==="[object String]"&&(!toStringTag||!(typeof n1=="object"&&toStringTag in n1))}function isNumber(n1){return toStr(n1)==="[object Number]"&&(!toStringTag||!(typeof n1=="object"&&toStringTag in n1))}function isBoolean(n1){return toStr(n1)==="[object Boolean]"&&(!toStringTag||!(typeof n1=="object"&&toStringTag in n1))}function isSymbol(n1){if(hasShammedSymbols)return n1&&typeof n1=="object"&&n1 instanceof Symbol;if(typeof n1=="symbol")return!0;if(!n1||typeof n1!="object"||!symToString)return!1;try{return symToString.call(n1),!0}catch{}return!1}function isBigInt(n1){if(!n1||typeof n1!="object"||!bigIntValueOf)return!1;try{return bigIntValueOf.call(n1),!0}catch{}return!1}var hasOwn=Object.prototype.hasOwnProperty||function(n1){return n1 in this};function has$3(n1,e1){return hasOwn.call(n1,e1)}function toStr(n1){return objectToString.call(n1)}function nameOf(n1){if(n1.name)return n1.name;var e1=$match.call(functionToString.call(n1),/^function\s*([\w$]+)/);return e1?e1[1]:null}function indexOf(n1,e1){if(n1.indexOf)return n1.indexOf(e1);for(var t1=0,r1=n1.length;t1<r1;t1++)if(n1[t1]===e1)return t1;return-1}function isMap(n1){if(!mapSize||!n1||typeof n1!="object")return!1;try{mapSize.call(n1);try{setSize.call(n1)}catch{return!0}return n1 instanceof Map}catch{}return!1}function isWeakMap(n1){if(!weakMapHas||!n1||typeof n1!="object")return!1;try{weakMapHas.call(n1,weakMapHas);try{weakSetHas.call(n1,weakSetHas)}catch{return!0}return n1 instanceof WeakMap}catch{}return!1}function isWeakRef(n1){if(!weakRefDeref||!n1||typeof n1!="object")return!1;try{return weakRefDeref.call(n1),!0}catch{}return!1}function isSet(n1){if(!setSize||!n1||typeof n1!="object")return!1;try{setSize.call(n1);try{mapSize.call(n1)}catch{return!0}return n1 instanceof Set}catch{}return!1}function isWeakSet(n1){if(!weakSetHas||!n1||typeof n1!="object")return!1;try{weakSetHas.call(n1,weakSetHas);try{weakMapHas.call(n1,weakMapHas)}catch{return!0}return n1 instanceof WeakSet}catch{}return!1}function isElement(n1){return!n1||typeof n1!="object"?!1:typeof HTMLElement<"u"&&n1 instanceof HTMLElement?!0:typeof n1.nodeName=="string"&&typeof n1.getAttribute=="function"}function inspectString(n1,e1){if(n1.length>e1.maxStringLength){var t1=n1.length-e1.maxStringLength,r1="... "+t1+" more character"+(t1>1?"s":"");return inspectString($slice.call(n1,0,e1.maxStringLength),e1)+r1}var o1=$replace.call($replace.call(n1,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lowbyte);return wrapQuotes(o1,"single",e1)}function lowbyte(n1){var e1=n1.charCodeAt(0),t1={8:"b",9:"t",10:"n",12:"f",13:"r"}[e1];return t1?"\\"+t1:"\\x"+(e1<16?"0":"")+$toUpperCase.call(e1.toString(16))}function markBoxed(n1){return"Object("+n1+")"}function weakCollectionOf(n1){return n1+" { ? }"}function collectionOf(n1,e1,t1,r1){var o1=r1?indentedJoin(t1,r1):$join.call(t1,", ");return n1+" ("+e1+") {"+o1+"}"}function singleLineValues(n1){for(var e1=0;e1<n1.length;e1++)if(indexOf(n1[e1],`
1848
1848
  `)>=0)return!1;return!0}function getIndent(n1,e1){var t1;if(n1.indent===" ")t1=" ";else if(typeof n1.indent=="number"&&n1.indent>0)t1=$join.call(Array(n1.indent+1)," ");else return null;return{base:t1,prev:$join.call(Array(e1+1),t1)}}function indentedJoin(n1,e1){if(n1.length===0)return"";var t1=`
1849
1849
  `+e1.prev+e1.base;return t1+$join.call(n1,","+t1)+`
1850
1850
  `+e1.prev}function arrObjKeys(n1,e1){var t1=isArray$3(n1),r1=[];if(t1){r1.length=n1.length;for(var o1=0;o1<n1.length;o1++)r1[o1]=has$3(n1,o1)?e1(n1[o1],n1):""}var i1=typeof gOPS=="function"?gOPS(n1):[],a1;if(hasShammedSymbols){a1={};for(var s1=0;s1<i1.length;s1++)a1["$"+i1[s1]]=i1[s1]}for(var l1 in n1)!has$3(n1,l1)||t1&&String(Number(l1))===l1&&l1<n1.length||hasShammedSymbols&&a1["$"+l1]instanceof Symbol||($test.call(/[^\w$]/,l1)?r1.push(e1(l1,n1)+": "+e1(n1[l1],n1)):r1.push(l1+": "+e1(n1[l1],n1)));if(typeof gOPS=="function")for(var c1=0;c1<i1.length;c1++)isEnumerable.call(n1,i1[c1])&&r1.push("["+e1(i1[c1])+"]: "+e1(n1[i1[c1]],n1));return r1}var GetIntrinsic=getIntrinsic$1,callBound=callBound$1,inspect=objectInspect,$TypeError=GetIntrinsic("%TypeError%"),$WeakMap=GetIntrinsic("%WeakMap%",!0),$Map=GetIntrinsic("%Map%",!0),$weakMapGet=callBound("WeakMap.prototype.get",!0),$weakMapSet=callBound("WeakMap.prototype.set",!0),$weakMapHas=callBound("WeakMap.prototype.has",!0),$mapGet=callBound("Map.prototype.get",!0),$mapSet=callBound("Map.prototype.set",!0),$mapHas=callBound("Map.prototype.has",!0),listGetNode=function(n1,e1){for(var t1=n1,r1;(r1=t1.next)!==null;t1=r1)if(r1.key===e1)return t1.next=r1.next,r1.next=n1.next,n1.next=r1,r1},listGet=function(n1,e1){var t1=listGetNode(n1,e1);return t1&&t1.value},listSet=function(n1,e1,t1){var r1=listGetNode(n1,e1);r1?r1.value=t1:n1.next={key:e1,next:n1.next,value:t1}},listHas=function(n1,e1){return!!listGetNode(n1,e1)},sideChannel=function n1(){var e1,t1,r1,o1={assert:function(i1){if(!o1.has(i1))throw new $TypeError("Side channel does not contain "+inspect(i1))},get:function(i1){if($WeakMap&&i1&&(typeof i1=="object"||typeof i1=="function")){if(e1)return $weakMapGet(e1,i1)}else if($Map){if(t1)return $mapGet(t1,i1)}else if(r1)return listGet(r1,i1)},has:function(i1){if($WeakMap&&i1&&(typeof i1=="object"||typeof i1=="function")){if(e1)return $weakMapHas(e1,i1)}else if($Map){if(t1)return $mapHas(t1,i1)}else if(r1)return listHas(r1,i1);return!1},set:function(i1,a1){$WeakMap&&i1&&(typeof i1=="object"||typeof i1=="function")?(e1||(e1=new $WeakMap),$weakMapSet(e1,i1,a1)):$Map?(t1||(t1=new $Map),$mapSet(t1,i1,a1)):(r1||(r1={key:{},next:null}),listSet(r1,i1,a1))}};return o1},replace=String.prototype.replace,percentTwenties=/%20/g,Format={RFC1738:"RFC1738",RFC3986:"RFC3986"},formats$3={default:Format.RFC3986,formatters:{RFC1738:function(n1){return replace.call(n1,percentTwenties,"+")},RFC3986:function(n1){return String(n1)}},RFC1738:Format.RFC1738,RFC3986:Format.RFC3986},formats$2=formats$3,has$2=Object.prototype.hasOwnProperty,isArray$2=Array.isArray,hexTable=function(){for(var n1=[],e1=0;e1<256;++e1)n1.push("%"+((e1<16?"0":"")+e1.toString(16)).toUpperCase());return n1}(),compactQueue=function n1(e1){for(;e1.length>1;){var t1=e1.pop(),r1=t1.obj[t1.prop];if(isArray$2(r1)){for(var o1=[],i1=0;i1<r1.length;++i1)typeof r1[i1]<"u"&&o1.push(r1[i1]);t1.obj[t1.prop]=o1}}},arrayToObject=function n1(e1,t1){for(var r1=t1&&t1.plainObjects?Object.create(null):{},o1=0;o1<e1.length;++o1)typeof e1[o1]<"u"&&(r1[o1]=e1[o1]);return r1},merge=function n1(e1,t1,r1){if(!t1)return e1;if(typeof t1!="object"){if(isArray$2(e1))e1.push(t1);else if(e1&&typeof e1=="object")(r1&&(r1.plainObjects||r1.allowPrototypes)||!has$2.call(Object.prototype,t1))&&(e1[t1]=!0);else return[e1,t1];return e1}if(!e1||typeof e1!="object")return[e1].concat(t1);var o1=e1;return isArray$2(e1)&&!isArray$2(t1)&&(o1=arrayToObject(e1,r1)),isArray$2(e1)&&isArray$2(t1)?(t1.forEach(function(i1,a1){if(has$2.call(e1,a1)){var s1=e1[a1];s1&&typeof s1=="object"&&i1&&typeof i1=="object"?e1[a1]=n1(s1,i1,r1):e1.push(i1)}else e1[a1]=i1}),e1):Object.keys(t1).reduce(function(i1,a1){var s1=t1[a1];return has$2.call(i1,a1)?i1[a1]=n1(i1[a1],s1,r1):i1[a1]=s1,i1},o1)},assign=function n1(e1,t1){return Object.keys(t1).reduce(function(r1,o1){return r1[o1]=t1[o1],r1},e1)},decode=function(n1,e1,t1){var r1=n1.replace(/\+/g," ");if(t1==="iso-8859-1")return r1.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r1)}catch{return r1}},encode=function n1(e1,t1,r1,o1,i1){if(e1.length===0)return e1;var a1=e1;if(typeof e1=="symbol"?a1=Symbol.prototype.toString.call(e1):typeof e1!="string"&&(a1=String(e1)),r1==="iso-8859-1")return escape(a1).replace(/%u[0-9a-f]{4}/gi,function(u1){return"%26%23"+parseInt(u1.slice(2),16)+"%3B"});for(var s1="",l1=0;l1<a1.length;++l1){var c1=a1.charCodeAt(l1);if(c1===45||c1===46||c1===95||c1===126||c1>=48&&c1<=57||c1>=65&&c1<=90||c1>=97&&c1<=122||i1===formats$2.RFC1738&&(c1===40||c1===41)){s1+=a1.charAt(l1);continue}if(c1<128){s1=s1+hexTable[c1];continue}if(c1<2048){s1=s1+(hexTable[192|c1>>6]+hexTable[128|c1&63]);continue}if(c1<55296||c1>=57344){s1=s1+(hexTable[224|c1>>12]+hexTable[128|c1>>6&63]+hexTable[128|c1&63]);continue}l1+=1,c1=65536+((c1&1023)<<10|a1.charCodeAt(l1)&1023),s1+=hexTable[240|c1>>18]+hexTable[128|c1>>12&63]+hexTable[128|c1>>6&63]+hexTable[128|c1&63]}return s1},compact=function n1(e1){for(var t1=[{obj:{o:e1},prop:"o"}],r1=[],o1=0;o1<t1.length;++o1)for(var i1=t1[o1],a1=i1.obj[i1.prop],s1=Object.keys(a1),l1=0;l1<s1.length;++l1){var c1=s1[l1],u1=a1[c1];typeof u1=="object"&&u1!==null&&r1.indexOf(u1)===-1&&(t1.push({obj:a1,prop:c1}),r1.push(u1))}return compactQueue(t1),e1},isRegExp=function n1(e1){return Object.prototype.toString.call(e1)==="[object RegExp]"},isBuffer=function n1(e1){return!e1||typeof e1!="object"?!1:!!(e1.constructor&&e1.constructor.isBuffer&&e1.constructor.isBuffer(e1))},combine=function n1(e1,t1){return[].concat(e1,t1)},maybeMap=function n1(e1,t1){if(isArray$2(e1)){for(var r1=[],o1=0;o1<e1.length;o1+=1)r1.push(t1(e1[o1]));return r1}return t1(e1)},utils$2={arrayToObject,assign,combine,compact,decode,encode,isBuffer,isRegExp,maybeMap,merge},getSideChannel=sideChannel,utils$1=utils$2,formats$1=formats$3,has$1=Object.prototype.hasOwnProperty,arrayPrefixGenerators={brackets:function n1(e1){return e1+"[]"},comma:"comma",indices:function n1(e1,t1){return e1+"["+t1+"]"},repeat:function n1(e1){return e1}},isArray$1=Array.isArray,split=String.prototype.split,push=Array.prototype.push,pushToArray=function(n1,e1){push.apply(n1,isArray$1(e1)?e1:[e1])},toISO=Date.prototype.toISOString,defaultFormat=formats$1.default,defaults$1={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:utils$1.encode,encodeValuesOnly:!1,format:defaultFormat,formatter:formats$1.formatters[defaultFormat],indices:!1,serializeDate:function n1(e1){return toISO.call(e1)},skipNulls:!1,strictNullHandling:!1},isNonNullishPrimitive=function n1(e1){return typeof e1=="string"||typeof e1=="number"||typeof e1=="boolean"||typeof e1=="symbol"||typeof e1=="bigint"},sentinel={},stringify$1=function n1(e1,t1,r1,o1,i1,a1,s1,l1,c1,u1,f1,p1,d1,m1,_1,h1){for(var b1=e1,$1=h1,v1=0,k1=!1;($1=$1.get(sentinel))!==void 0&&!k1;){var S1=$1.get(e1);if(v1+=1,typeof S1<"u"){if(S1===v1)throw new RangeError("Cyclic object value");k1=!0}typeof $1.get(sentinel)>"u"&&(v1=0)}if(typeof l1=="function"?b1=l1(t1,b1):b1 instanceof Date?b1=f1(b1):r1==="comma"&&isArray$1(b1)&&(b1=utils$1.maybeMap(b1,function(J1){return J1 instanceof Date?f1(J1):J1})),b1===null){if(i1)return s1&&!m1?s1(t1,defaults$1.encoder,_1,"key",p1):t1;b1=""}if(isNonNullishPrimitive(b1)||utils$1.isBuffer(b1)){if(s1){var C1=m1?t1:s1(t1,defaults$1.encoder,_1,"key",p1);if(r1==="comma"&&m1){for(var A1=split.call(String(b1),","),E1="",z1=0;z1<A1.length;++z1)E1+=(z1===0?"":",")+d1(s1(A1[z1],defaults$1.encoder,_1,"value",p1));return[d1(C1)+(o1&&isArray$1(b1)&&A1.length===1?"[]":"")+"="+E1]}return[d1(C1)+"="+d1(s1(b1,defaults$1.encoder,_1,"value",p1))]}return[d1(t1)+"="+d1(String(b1))]}var I1=[];if(typeof b1>"u")return I1;var N1;if(r1==="comma"&&isArray$1(b1))N1=[{value:b1.length>0?b1.join(",")||null:void 0}];else if(isArray$1(l1))N1=l1;else{var V1=Object.keys(b1);N1=c1?V1.sort(c1):V1}for(var U1=o1&&isArray$1(b1)&&b1.length===1?t1+"[]":t1,R1=0;R1<N1.length;++R1){var D1=N1[R1],F1=typeof D1=="object"&&typeof D1.value<"u"?D1.value:b1[D1];if(!(a1&&F1===null)){var q1=isArray$1(b1)?typeof r1=="function"?r1(U1,D1):U1:U1+(u1?"."+D1:"["+D1+"]");h1.set(e1,v1);var K1=getSideChannel();K1.set(sentinel,h1),pushToArray(I1,n1(F1,q1,r1,o1,i1,a1,s1,l1,c1,u1,f1,p1,d1,m1,_1,K1))}}return I1},normalizeStringifyOptions=function n1(e1){if(!e1)return defaults$1;if(e1.encoder!==null&&typeof e1.encoder<"u"&&typeof e1.encoder!="function")throw new TypeError("Encoder has to be a function.");var t1=e1.charset||defaults$1.charset;if(typeof e1.charset<"u"&&e1.charset!=="utf-8"&&e1.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r1=formats$1.default;if(typeof e1.format<"u"){if(!has$1.call(formats$1.formatters,e1.format))throw new TypeError("Unknown format option provided.");r1=e1.format}var o1=formats$1.formatters[r1],i1=defaults$1.filter;return(typeof e1.filter=="function"||isArray$1(e1.filter))&&(i1=e1.filter),{addQueryPrefix:typeof e1.addQueryPrefix=="boolean"?e1.addQueryPrefix:defaults$1.addQueryPrefix,allowDots:typeof e1.allowDots>"u"?defaults$1.allowDots:!!e1.allowDots,charset:t1,charsetSentinel:typeof e1.charsetSentinel=="boolean"?e1.charsetSentinel:defaults$1.charsetSentinel,delimiter:typeof e1.delimiter>"u"?defaults$1.delimiter:e1.delimiter,encode:typeof e1.encode=="boolean"?e1.encode:defaults$1.encode,encoder:typeof e1.encoder=="function"?e1.encoder:defaults$1.encoder,encodeValuesOnly:typeof e1.encodeValuesOnly=="boolean"?e1.encodeValuesOnly:defaults$1.encodeValuesOnly,filter:i1,format:r1,formatter:o1,serializeDate:typeof e1.serializeDate=="function"?e1.serializeDate:defaults$1.serializeDate,skipNulls:typeof e1.skipNulls=="boolean"?e1.skipNulls:defaults$1.skipNulls,sort:typeof e1.sort=="function"?e1.sort:null,strictNullHandling:typeof e1.strictNullHandling=="boolean"?e1.strictNullHandling:defaults$1.strictNullHandling}},stringify_1=function(n1,e1){var t1=n1,r1=normalizeStringifyOptions(e1),o1,i1;typeof r1.filter=="function"?(i1=r1.filter,t1=i1("",t1)):isArray$1(r1.filter)&&(i1=r1.filter,o1=i1);var a1=[];if(typeof t1!="object"||t1===null)return"";var s1;e1&&e1.arrayFormat in arrayPrefixGenerators?s1=e1.arrayFormat:e1&&"indices"in e1?s1=e1.indices?"indices":"repeat":s1="indices";var l1=arrayPrefixGenerators[s1];if(e1&&"commaRoundTrip"in e1&&typeof e1.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c1=l1==="comma"&&e1&&e1.commaRoundTrip;o1||(o1=Object.keys(t1)),r1.sort&&o1.sort(r1.sort);for(var u1=getSideChannel(),f1=0;f1<o1.length;++f1){var p1=o1[f1];r1.skipNulls&&t1[p1]===null||pushToArray(a1,stringify$1(t1[p1],p1,l1,c1,r1.strictNullHandling,r1.skipNulls,r1.encode?r1.encoder:null,r1.filter,r1.sort,r1.allowDots,r1.serializeDate,r1.format,r1.formatter,r1.encodeValuesOnly,r1.charset,u1))}var d1=a1.join(r1.delimiter),m1=r1.addQueryPrefix===!0?"?":"";return r1.charsetSentinel&&(r1.charset==="iso-8859-1"?m1+="utf8=%26%2310003%3B&":m1+="utf8=%E2%9C%93&"),d1.length>0?m1+d1:""},utils=utils$2,has=Object.prototype.hasOwnProperty,isArray=Array.isArray,defaults={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:utils.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},interpretNumericEntities=function(n1){return n1.replace(/&#(\d+);/g,function(e1,t1){return String.fromCharCode(parseInt(t1,10))})},parseArrayValue=function(n1,e1){return n1&&typeof n1=="string"&&e1.comma&&n1.indexOf(",")>-1?n1.split(","):n1},isoSentinel="utf8=%26%2310003%3B",charsetSentinel="utf8=%E2%9C%93",parseValues=function n1(e1,t1){var r1={},o1=t1.ignoreQueryPrefix?e1.replace(/^\?/,""):e1,i1=t1.parameterLimit===1/0?void 0:t1.parameterLimit,a1=o1.split(t1.delimiter,i1),s1=-1,l1,c1=t1.charset;if(t1.charsetSentinel)for(l1=0;l1<a1.length;++l1)a1[l1].indexOf("utf8=")===0&&(a1[l1]===charsetSentinel?c1="utf-8":a1[l1]===isoSentinel&&(c1="iso-8859-1"),s1=l1,l1=a1.length);for(l1=0;l1<a1.length;++l1)if(l1!==s1){var u1=a1[l1],f1=u1.indexOf("]="),p1=f1===-1?u1.indexOf("="):f1+1,d1,m1;p1===-1?(d1=t1.decoder(u1,defaults.decoder,c1,"key"),m1=t1.strictNullHandling?null:""):(d1=t1.decoder(u1.slice(0,p1),defaults.decoder,c1,"key"),m1=utils.maybeMap(parseArrayValue(u1.slice(p1+1),t1),function(_1){return t1.decoder(_1,defaults.decoder,c1,"value")})),m1&&t1.interpretNumericEntities&&c1==="iso-8859-1"&&(m1=interpretNumericEntities(m1)),u1.indexOf("[]=")>-1&&(m1=isArray(m1)?[m1]:m1),has.call(r1,d1)?r1[d1]=utils.combine(r1[d1],m1):r1[d1]=m1}return r1},parseObject=function(n1,e1,t1,r1){for(var o1=r1?e1:parseArrayValue(e1,t1),i1=n1.length-1;i1>=0;--i1){var a1,s1=n1[i1];if(s1==="[]"&&t1.parseArrays)a1=[].concat(o1);else{a1=t1.plainObjects?Object.create(null):{};var l1=s1.charAt(0)==="["&&s1.charAt(s1.length-1)==="]"?s1.slice(1,-1):s1,c1=parseInt(l1,10);!t1.parseArrays&&l1===""?a1={0:o1}:!isNaN(c1)&&s1!==l1&&String(c1)===l1&&c1>=0&&t1.parseArrays&&c1<=t1.arrayLimit?(a1=[],a1[c1]=o1):l1!=="__proto__"&&(a1[l1]=o1)}o1=a1}return o1},parseKeys=function n1(e1,t1,r1,o1){if(!!e1){var i1=r1.allowDots?e1.replace(/\.([^.[]+)/g,"[$1]"):e1,a1=/(\[[^[\]]*])/,s1=/(\[[^[\]]*])/g,l1=r1.depth>0&&a1.exec(i1),c1=l1?i1.slice(0,l1.index):i1,u1=[];if(c1){if(!r1.plainObjects&&has.call(Object.prototype,c1)&&!r1.allowPrototypes)return;u1.push(c1)}for(var f1=0;r1.depth>0&&(l1=s1.exec(i1))!==null&&f1<r1.depth;){if(f1+=1,!r1.plainObjects&&has.call(Object.prototype,l1[1].slice(1,-1))&&!r1.allowPrototypes)return;u1.push(l1[1])}return l1&&u1.push("["+i1.slice(l1.index)+"]"),parseObject(u1,t1,r1,o1)}},normalizeParseOptions=function n1(e1){if(!e1)return defaults;if(e1.decoder!==null&&e1.decoder!==void 0&&typeof e1.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e1.charset<"u"&&e1.charset!=="utf-8"&&e1.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t1=typeof e1.charset>"u"?defaults.charset:e1.charset;return{allowDots:typeof e1.allowDots>"u"?defaults.allowDots:!!e1.allowDots,allowPrototypes:typeof e1.allowPrototypes=="boolean"?e1.allowPrototypes:defaults.allowPrototypes,allowSparse:typeof e1.allowSparse=="boolean"?e1.allowSparse:defaults.allowSparse,arrayLimit:typeof e1.arrayLimit=="number"?e1.arrayLimit:defaults.arrayLimit,charset:t1,charsetSentinel:typeof e1.charsetSentinel=="boolean"?e1.charsetSentinel:defaults.charsetSentinel,comma:typeof e1.comma=="boolean"?e1.comma:defaults.comma,decoder:typeof e1.decoder=="function"?e1.decoder:defaults.decoder,delimiter:typeof e1.delimiter=="string"||utils.isRegExp(e1.delimiter)?e1.delimiter:defaults.delimiter,depth:typeof e1.depth=="number"||e1.depth===!1?+e1.depth:defaults.depth,ignoreQueryPrefix:e1.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e1.interpretNumericEntities=="boolean"?e1.interpretNumericEntities:defaults.interpretNumericEntities,parameterLimit:typeof e1.parameterLimit=="number"?e1.parameterLimit:defaults.parameterLimit,parseArrays:e1.parseArrays!==!1,plainObjects:typeof e1.plainObjects=="boolean"?e1.plainObjects:defaults.plainObjects,strictNullHandling:typeof e1.strictNullHandling=="boolean"?e1.strictNullHandling:defaults.strictNullHandling}},parse$1=function(n1,e1){var t1=normalizeParseOptions(e1);if(n1===""||n1===null||typeof n1>"u")return t1.plainObjects?Object.create(null):{};for(var r1=typeof n1=="string"?parseValues(n1,t1):n1,o1=t1.plainObjects?Object.create(null):{},i1=Object.keys(r1),a1=0;a1<i1.length;++a1){var s1=i1[a1],l1=parseKeys(s1,r1[s1],t1,typeof n1=="string");o1=utils.merge(o1,l1,t1)}return t1.allowSparse===!0?o1:utils.compact(o1)},stringify=stringify_1,parse=parse$1,formats=formats$3,lib={formats,parse,stringify};const DayPassWarningModal_svelte_svelte_type_style_lang="";function create_else_block$1(n1){let e1,t1;return e1=new ModalContent({props:{title:n1[5],size:"M",showCancelButton:!1,$$slots:{default:[create_default_slot_4$2]},$$scope:{ctx:n1}}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1&32&&(i1.title=r1[5]),o1&131268&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_if_block$2(n1){let e1,t1;return e1=new ModalContent({props:{title:n1[5],size:"M",confirmText:"Upgrade",onConfirm:n1[15],$$slots:{default:[create_default_slot_1$2]},$$scope:{ctx:n1}}}),{c(){create_component(e1.$$.fragment)},m(r1,o1){mount_component(e1,r1,o1),t1=!0},p(r1,o1){const i1={};o1&32&&(i1.title=r1[5]),o1&256&&(i1.onConfirm=r1[15]),o1&131284&&(i1.$$scope={dirty:o1,ctx:r1}),e1.$set(i1)},i(r1){t1||(transition_in(e1.$$.fragment,r1),t1=!0)},o(r1){transition_out(e1.$$.fragment,r1),t1=!1},d(r1){destroy_component(e1,r1)}}}function create_default_slot_6$1(n1){let e1,t1,r1,o1,i1,a1,s1,l1=n1[7]==1?"":"s",c1,u1,f1,p1,d1;return p1=new TooltipWrapper({props:{tooltip:n1[6],size:"S"}}),{c(){e1=text("You have used "),t1=element("span"),r1=text(n1[2]),o1=text("%"),i1=text(` of
@@ -9,7 +9,7 @@
9
9
  <link href="/builder/fonts/source-sans-pro/600.css" rel="stylesheet" />
10
10
  <link href="/builder/fonts/source-sans-pro/700.css" rel="stylesheet" />
11
11
  <link href="/builder/fonts/remixicon.css" rel="stylesheet" />
12
- <script type="module" crossorigin src="/builder/assets/index.e17075ac.js"></script>
12
+ <script type="module" crossorigin src="/builder/assets/index.14fe56a3.js"></script>
13
13
  <link rel="stylesheet" href="/builder/assets/index.ebe7db7e.css">
14
14
  </head>
15
15
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/server",
3
3
  "email": "hi@budibase.com",
4
- "version": "2.8.18-alpha.3",
4
+ "version": "2.8.18-alpha.4",
5
5
  "description": "Budibase Web Server",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -46,12 +46,12 @@
46
46
  "license": "GPL-3.0",
47
47
  "dependencies": {
48
48
  "@apidevtools/swagger-parser": "10.0.3",
49
- "@budibase/backend-core": "2.8.18-alpha.3",
50
- "@budibase/client": "2.8.18-alpha.3",
51
- "@budibase/pro": "2.8.18-alpha.3",
52
- "@budibase/shared-core": "2.8.18-alpha.3",
53
- "@budibase/string-templates": "2.8.18-alpha.3",
54
- "@budibase/types": "2.8.18-alpha.3",
49
+ "@budibase/backend-core": "2.8.18-alpha.4",
50
+ "@budibase/client": "2.8.18-alpha.4",
51
+ "@budibase/pro": "2.8.18-alpha.4",
52
+ "@budibase/shared-core": "2.8.18-alpha.4",
53
+ "@budibase/string-templates": "2.8.18-alpha.4",
54
+ "@budibase/types": "2.8.18-alpha.4",
55
55
  "@bull-board/api": "3.7.0",
56
56
  "@bull-board/koa": "3.9.4",
57
57
  "@elastic/elasticsearch": "7.10.0",
@@ -196,5 +196,5 @@
196
196
  }
197
197
  }
198
198
  },
199
- "gitHead": "5a45eb1ec761babf9a2dd7795b99ee05c758930b"
199
+ "gitHead": "194f7171f9e93714fcc8d1b4c2a36cd686d4a649"
200
200
  }