1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-04-26 09:13:05 +02:00
pocketbase/ui/dist/assets/index-9f490143.js

161 lines
991 KiB
JavaScript
Raw Normal View History

var i0=Object.defineProperty;var s0=(n,e,t)=>e in n?i0(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var sr=(n,e,t)=>(s0(n,typeof e!="symbol"?e+"":e,t),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=t(s);fetch(s.href,l)}})();function x(){}const Tl=n=>n;function je(n,e){for(const t in e)n[t]=e[t];return n}function l0(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function g_(n){return n()}function cu(){return Object.create(null)}function $e(n){n.forEach(g_)}function Et(n){return typeof n=="function"}function ge(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Rl;function un(n,e){return n===e?!0:(Rl||(Rl=document.createElement("a")),Rl.href=e,n===Rl.href)}function o0(n){return Object.keys(n).length===0}function ma(n,...e){if(n==null){for(const i of e)i(void 0);return x}const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function r0(n){let e;return ma(n,t=>e=t)(),e}function Ge(n,e,t){n.$$.on_destroy.push(ma(e,t))}function Ct(n,e,t,i){if(n){const s=__(n,e,t,i);return n[0](s)}}function __(n,e,t,i){return n[1]&&i?je(t.ctx.slice(),n[1](i(e))):t.ctx}function $t(n,e,t,i){if(n[2]&&i){const s=n[2](i(t));if(e.dirty===void 0)return s;if(typeof s=="object"){const l=[],o=Math.max(e.dirty.length,s.length);for(let r=0;r<o;r+=1)l[r]=e.dirty[r]|s[r];return l}return e.dirty|s}return e.dirty}function Mt(n,e,t,i,s,l){if(s){const o=__(e,t,i,l);n.p(o,s)}}function Ot(n){if(n.ctx.length>32){const e=[],t=n.ctx.length/32;for(let i=0;i<t;i++)e[i]=-1;return e}return-1}function xt(n){const e={};for(const t in n)t[0]!=="$"&&(e[t]=n[t]);return e}function tt(n,e){const t={};e=new Set(e);for(const i in n)!e.has(i)&&i[0]!=="$"&&(t[i]=n[i]);return t}function ii(n){return n??""}function an(n,e,t){return n.set(t),e}function Te(n){return n&&Et(n.destroy)?n.destroy:x}function du(n){const e=typeof n=="string"&&n.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[n,"px"]}const b_=typeof window<"u";let qo=b_?()=>window.performance.now():()=>Date.now(),ga=b_?n=>requestAnimationFrame(n):x;const ks=new Set;function v_(n){ks.forEach(e=>{e.c(n)||(ks.delete(e),e.f())}),ks.size!==0&&ga(v_)}function jo(n){let e;return ks.size===0&&ga(v_),{promise:new Promise(t=>{ks.add(e={c:n,f:t})}),abort(){ks.delete(e)}}}function b(n,e){n.appendChild(e)}function y_(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function a0(n){const e=v("style");return e.textContent="/* empty */",u0(y_(n),e),e.sheet}function u0(n,e){return b(n.head||n,e),e.sheet}function w(n,e,t){n.insertBefore(e,t||null)}function k(n){n.parentNode&&n.parentNode.removeChild(n)}function vt(n,e){for(let t=0;t<n.length;t+=1)n[t]&&n[t].d(e)}function v(n){return document.createElement(n)}function W(n){return document.createTextNode(n)}function E(){return W(" ")}function ye(){return W("")}function Y(n,e,t,i){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}function Ze(n){return function(e){return e.preventDefault(),n.call(this,e)}}function Sn(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function p(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}const f0=["width","height"];function di(n,e){const t=Object.getOwnPropertyDescriptors(n.__proto__);for(const i in e)e[i]==null?n.removeAttribute(i):i==="style"?n.style.cssText=e[i]:i==="__value"?n.value
2023-09-01 09:22:49 +03:00
`;for(let _=0;_<=1;_+=a){const y=e+(t-e)*l(_);u+=_*100+`%{${o(y,1-y)}}
`}const f=u+`100% {${o(t,1-t)}}
}`,c=`__svelte_${p0(f)}_${r}`,d=y_(n),{stylesheet:h,rules:g}=go.get(d)||h0(d,n);g[c]||(g[c]=!0,h.insertRule(`@keyframes ${c} ${f}`,h.cssRules.length));const m=n.style.animation||"";return n.style.animation=`${m?`${m}, `:""}${c} ${i}ms linear ${s}ms 1 both`,_o+=1,c}function pl(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),s=t.length-i.length;s&&(n.style.animation=i.join(", "),_o-=s,_o||m0())}function m0(){ga(()=>{_o||(go.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&k(e)}),go.clear())})}function g0(n,e,t,i){if(!e)return x;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return x;const{delay:l=0,duration:o=300,easing:r=Tl,start:a=qo()+l,end:u=a+o,tick:f=x,css:c}=t(n,{from:e,to:s},i);let d=!0,h=!1,g;function m(){c&&(g=dl(n,0,1,o,l,r,c)),l||(h=!0)}function _(){c&&pl(n,g),d=!1}return jo(y=>{if(!h&&y>=a&&(h=!0),h&&y>=u&&(f(1,0),_()),!d)return!1;if(h){const S=y-a,C=0+1*r(S/o);f(C,1-C)}return!0}),m(),f(0,1),_}function _0(n){const e=getComputedStyle(n);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:i}=e,s=n.getBoundingClientRect();n.style.position="absolute",n.style.width=t,n.style.height=i,w_(n,s)}}function w_(n,e){const t=n.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const i=getComputedStyle(n),s=i.transform==="none"?"":i.transform;n.style.transform=`${s} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let hl;function wi(n){hl=n}function Cl(){if(!hl)throw new Error("Function called outside component initialization");return hl}function Kt(n){Cl().$$.on_mount.push(n)}function b0(n){Cl().$$.after_update.push(n)}function Ps(n){Cl().$$.on_destroy.push(n)}function dt(){const n=Cl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=k_(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function Fe(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const ys=[],te=[];let ws=[];const zr=[],S_=Promise.resolve();let Br=!1;function T_(){Br||(Br=!0,S_.then(_a))}function sn(){return T_(),S_}function xe(n){ws.push(n)}function _e(n){zr.push(n)}const lr=new Set;let hs=0;function _a(){if(hs!==0)return;const n=hl;do{try{for(;hs<ys.length;){const e=ys[hs];hs++,wi(e),v0(e.$$)}}catch(e){throw ys.length=0,hs=0,e}for(wi(null),ys.length=0,hs=0;te.length;)te.pop()();for(let e=0;e<ws.length;e+=1){const t=ws[e];lr.has(t)||(lr.add(t),t())}ws.length=0}while(ys.length);for(;zr.length;)zr.pop()();Br=!1,lr.clear(),wi(n)}function v0(n){if(n.fragment!==null){n.update(),$e(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(xe)}}function y0(n){const e=[],t=[];ws.forEach(i=>n.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),ws=e}let zs;function ba(){return zs||(zs=Promise.resolve(),zs.then(()=>{zs=null})),zs}function ss(n,e,t){n.dispatchEvent(k_(`${e?"intro":"outro"}${t}`))}const oo=new Set;let ui;function re(){ui={r:0,c:[],p:ui}}function ae(){ui.r||$e(ui.c),ui=ui.p}function A(n,e){n&&n.i&&(oo.delete(n),n.i(e))}function I(n,e,t,i){if(n&&n.o){if(oo.has(n))return;oo.add(n),ui.c.push(()=>{oo.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const va={duration:0};function C_(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function u(){o&&pl(n,o)}function f(){const{delay:d=0,duration:h=300,easing:g=Tl,tick:m=x,css:_}=s||va;_&&(o=dl(n,0,1,h,d,g,_,a++)),m(0,1);const y=qo()+d,S=y+h;r&&r.abort(),l=!0,xe(()=>ss(n,!0,"start")),r=jo(C=>{if(l){if(C>=S)return m(1,0),ss(n,!0,"end"),u(),l=!1;if(C>=y){const T=g((C-y)/h);m(T,1-T)}}return l})}let c=!1;return{start(){c||(c=!0,pl(n),Et(s)?(s=s(i),ba().then(f)):f())},invalidate(){c=!1},end(){l&&(u(),l=!1)}}}function ya(n,e,t){const i={direction:"out"};let s=e(n,t,i),l=!0,o;const r=ui;r.r+=1;let a;function u(){const{delay:f=0,duration:c=300,easing:d=Tl,tick:h=x,css:g}=s||va;g&&(o=dl(n,1,0,c,f,d,g));const m=qo()+f,_=m+c;xe(()=>ss(n,!1,"start")),"inert"in n&&(a=n.inert,n.inert=!0),jo(y=>{if(l){if(y>=_)return h(0,1),ss(
2023-09-01 09:22:49 +03:00
`),t+=i.map(s=>{let l="";return s.name.includes("(")||s.name.includes(" ")?l+=s.name:l+="`"+s.name+"`",s.collate&&(l+=" COLLATE "+s.collate),s.sort&&(l+=" "+s.sort.toUpperCase()),l}).join(`,
`),i.length>1&&(t+=`
`),t+=")",e.where&&(t+=` WHERE ${e.where}`),t}static replaceIndexTableName(e,t){const i=j.parseIndex(e);return i.tableName=t,j.buildIndex(i)}static replaceIndexColumn(e,t,i){if(t===i)return e;const s=j.parseIndex(e);let l=!1;for(let o of s.columns)o.name===t&&(o.name=i,l=!0);return l?j.buildIndex(s):e}static normalizeSearchFilter(e,t){if(e=(e||"").trim(),!e||!t.length)return e;const i=["=","!=","~","!~",">",">=","<","<="];for(const s of i)if(e.includes(s))return e;return e=isNaN(e)&&e!="true"&&e!="false"?`"${e.replace(/^[\"\'\`]|[\"\'\`]$/gm,"")}"`:e,t.map(s=>`${s}~${e}`).join("||")}static initCollection(e){return Object.assign({id:"",created:"",updated:"",name:"",type:"base",system:!1,listRule:null,viewRule:null,createRule:null,updateRule:null,deleteRule:null,schema:[],indexes:[],options:{}},e)}static initSchemaField(e){return Object.assign({id:"",name:"",type:"text",system:!1,required:!1,options:{}},e)}static triggerResize(){window.dispatchEvent(new Event("resize"))}static getQueryParams(){let e="",t=window.location.href;const i=t.indexOf("?");return i>-1&&(e=t.substring(i+1),t=t.substring(0,i)),Object.fromEntries(new URLSearchParams(e))}static replaceQueryParams(e){e=e||{};let t="",i=window.location.href;const s=i.indexOf("?");s>-1&&(t=i.substring(s+1),i=i.substring(0,s));const l=new URLSearchParams(t);for(let o in e){const r=e[o];r===null?l.delete(o):l.set(o,r)}t=l.toString(),t!=""&&(i+="?"+t),window.location.replace(i)}}const Wo=Ln([]);function ko(n,e=4e3){return Yo(n,"info",e)}function zt(n,e=3e3){return Yo(n,"success",e)}function Ci(n,e=4500){return Yo(n,"error",e)}function Zy(n,e=4500){return Yo(n,"warning",e)}function Yo(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{Ab(i)},t)};Wo.update(s=>(La(s,i.message),j.pushOrReplaceByKey(s,i,"message"),s))}function Ab(n){Wo.update(e=>(La(e,n),e))}function Ia(){Wo.update(n=>{for(let e of n)La(n,e);return[]})}function La(n,e){let t;typeof e=="string"?t=j.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),j.removeByKey(n,"message",t.message))}const Mi=Ln({});function ln(n){Mi.set(n||{})}function pi(n){Mi.update(e=>(j.deleteByPath(e,n),e))}const Pa=Ln({});function Xr(n){Pa.set(n||{})}const Zn=Ln([]),hi=Ln({}),wo=Ln(!1),Ib=Ln({});function Xy(n){Zn.update(e=>{const t=j.findByKey(e,"id",n);return t?hi.set(t):e.length&&hi.set(e[0]),e})}function Qy(n){hi.update(e=>j.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),Zn.update(e=>(j.pushOrReplaceByKey(e,n,"id"),Na(),j.sortCollections(e)))}function xy(n){Zn.update(e=>(j.removeByKey(e,"id",n.id),hi.update(t=>t.id===n.id?e[0]:t),Na(),e))}async function ek(n=null){wo.set(!0);try{let e=await ce.collections.getFullList(200,{sort:"+name"});e=j.sortCollections(e),Zn.set(e);const t=n&&j.findByKey(e,"id",n);t?hi.set(t):e.length&&hi.set(e[0]),Na()}catch(e){ce.error(e)}wo.set(!1)}function Na(){Ib.update(n=>(Zn.update(e=>{var t;for(let i of e)n[i.id]=!!((t=i.schema)!=null&&t.find(s=>{var l;return s.type=="file"&&((l=s.options)==null?void 0:l.protected)}));return e}),n))}const mr="pb_admin_file_token";Vo.prototype.logout=function(n=!0){this.authStore.clear(),n&&us("/login")};Vo.prototype.error=function(n,e=!0,t=""){if(!n||!(n instanceof Error)||n.isAbort)return;const i=(n==null?void 0:n.status)<<0||400,s=(n==null?void 0:n.data)||{},l=s.message||n.message||t;if(e&&l&&Ci(l),j.isEmpty(s.data)||ln(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),us("/")};Vo.prototype.getAdminFileToken=async function(n=""){let e=!0;if(n){const i=r0(Ib);e=typeof i[n]<"u"?i[n]:!0}if(!e)return"";let t=localStorage.getItem(mr)||"";return(!t||wa(t,10))&&(t&&localStorage.removeItem(mr),this._adminFileTokenRequest||(this._adminFileTokenRequest=this.files.getToken()),t=await this._adminFileTokenRequest,localStorage.setItem(mr,t),this._adminFileTokenRequest=null),t};class tk extends I_{save(e,t){super.save(e,t),t&&!t.collectionId&&Xr(t)}clear(){super.clear(),Xr(null)}}const ce=new Vo("../",new tk("pb_admin_auth"));ce.authStore.model&&!ce.authStore.model.collectionId&&Xr(ce.authStore.model
2023-09-01 09:22:49 +03:00
transform: ${u} translate(${(1-m)*c}${d}, ${(1-m)*h}${g});
opacity: ${a-f*_}`}}function lt(n,{delay:e=0,duration:t=400,easing:i=Ko,axis:s="y"}={}){const l=getComputedStyle(n),o=+l.opacity,r=s==="y"?"height":"width",a=parseFloat(l[r]),u=s==="y"?["top","bottom"]:["left","right"],f=u.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),c=parseFloat(l[`padding${f[0]}`]),d=parseFloat(l[`padding${f[1]}`]),h=parseFloat(l[`margin${f[0]}`]),g=parseFloat(l[`margin${f[1]}`]),m=parseFloat(l[`border${f[0]}Width`]),_=parseFloat(l[`border${f[1]}Width`]);return{delay:e,duration:t,easing:i,css:y=>`overflow: hidden;opacity: ${Math.min(y*20,1)*o};${r}: ${y*a}px;padding-${u[0]}: ${y*c}px;padding-${u[1]}: ${y*d}px;margin-${u[0]}: ${y*h}px;margin-${u[1]}: ${y*g}px;border-${u[0]}-width: ${y*m}px;border-${u[1]}-width: ${y*_}px;`}}function Qt(n,{delay:e=0,duration:t=400,easing:i=Ko,start:s=0,opacity:l=0}={}){const o=getComputedStyle(n),r=+o.opacity,a=o.transform==="none"?"":o.transform,u=1-s,f=r*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>`
2023-09-01 09:22:49 +03:00
transform: ${a} scale(${1-u*d});
opacity: ${r-f*d}
`}}let Qr,Gi;const xr="app-tooltip";function Gu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Hi(){return Gi=Gi||document.querySelector("."+xr),Gi||(Gi=document.createElement("div"),Gi.classList.add(xr),document.body.appendChild(Gi)),Gi}function Pb(n,e){let t=Hi();if(!t.classList.contains("active")||!(e!=null&&e.text)){ea();return}t.textContent=e.text,t.className=xr+" active",e.class&&t.classList.add(e.class),e.position&&t.classList.add(e.position),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),o=0,r=0,a=5;e.position=="left"?(o=l.top+l.height/2-i/2,r=l.left-s-a):e.position=="right"?(o=l.top+l.height/2-i/2,r=l.right+a):e.position=="top"?(o=l.top-i-a,r=l.left+l.width/2-s/2):e.position=="top-left"?(o=l.top-i-a,r=l.left):e.position=="top-right"?(o=l.top-i-a,r=l.right-s):e.position=="bottom-left"?(o=l.top+l.height+a,r=l.left):e.position=="bottom-right"?(o=l.top+l.height+a,r=l.right-s):(o=l.top+l.height+a,r=l.left+l.width/2-s/2),r+s>document.documentElement.clientWidth&&(r=document.documentElement.clientWidth-s),r=r>=0?r:0,o+i>document.documentElement.clientHeight&&(o=document.documentElement.clientHeight-i),o=o>=0?o:0,t.style.top=o+"px",t.style.left=r+"px"}function ea(){clearTimeout(Qr),Hi().classList.remove("active"),Hi().activeNode=void 0}function ak(n,e){Hi().activeNode=n,clearTimeout(Qr),Qr=setTimeout(()=>{Hi().classList.add("active"),Pb(n,e)},isNaN(e.delay)?0:e.delay)}function Be(n,e){let t=Gu(e);function i(){ak(n,t)}function s(){ea()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&j.isFocusable(n))&&n.addEventListener("click",s),Hi(),{update(l){var o,r;t=Gu(l),(r=(o=Hi())==null?void 0:o.activeNode)!=null&&r.contains(n)&&Pb(n,t)},destroy(){var l,o;(o=(l=Hi())==null?void 0:l.activeNode)!=null&&o.contains(n)&&ea(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function Zu(n,e,t){const i=n.slice();return i[12]=e[t],i}const uk=n=>({}),Xu=n=>({uniqueId:n[4]});function fk(n){let e,t,i=pe(n[3]),s=[];for(let o=0;o<i.length;o+=1)s[o]=Qu(Zu(n,i,o));const l=o=>I(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o<s.length;o+=1)s[o].c();e=ye()},m(o,r){for(let a=0;a<s.length;a+=1)s[a]&&s[a].m(o,r);w(o,e,r),t=!0},p(o,r){if(r&8){i=pe(o[3]);let a;for(a=0;a<i.length;a+=1){const u=Zu(o,i,a);s[a]?(s[a].p(u,r),A(s[a],1)):(s[a]=Qu(u),s[a].c(),A(s[a],1),s[a].m(e.parentNode,e))}for(re(),a=i.length;a<s.length;a+=1)l(a);ae()}},i(o){if(!t){for(let r=0;r<i.length;r+=1)A(s[r]);t=!0}},o(o){s=s.filter(Boolean);for(let r=0;r<s.length;r+=1)I(s[r]);t=!1},d(o){o&&k(e),vt(s,o)}}}function ck(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("i"),p(t,"class","ri-error-warning-fill txt-danger"),p(e,"class","form-field-addon inline-error-icon")},m(a,u){w(a,e,u),b(e,t),l=!0,o||(r=Te(i=Be.call(null,t,{position:"left",text:n[3].map(So).join(`
`)})),o=!0)},p(a,u){i&&Et(i.update)&&u&8&&i.update.call(null,{position:"left",text:a[3].map(So).join(`
`)})},i(a){l||(a&&xe(()=>{l&&(s||(s=He(t,Qt,{duration:150,start:.7},!0)),s.run(1))}),l=!0)},o(a){a&&(s||(s=He(t,Qt,{duration:150,start:.7},!1)),s.run(0)),l=!1},d(a){a&&k(e),a&&s&&s.end(),o=!1,r()}}}function Qu(n){let e,t,i=So(n[12])+"",s,l,o,r;return{c(){e=v("div"),t=v("pre"),s=W(i),l=E(),p(e,"class","help-block help-block-error")},m(a,u){w(a,e,u),b(e,t),b(t,s),b(e,l),r=!0},p(a,u){(!r||u&8)&&i!==(i=So(a[12])+"")&&le(s,i)},i(a){r||(a&&xe(()=>{r&&(o||(o=He(e,lt,{duration:150},!0)),o.run(1))}),r=!0)},o(a){a&&(o||(o=He(e,lt,{duration:150},!1)),o.run(0)),r=!1},d(a){a&&k(e),a&&o&&o.end()}}}function dk(n){let e,t,i,s,l,o,r;const a=n[9].default,u=Ct(a,n,n[8],Xu),f=[ck,fk],c=[];function d(h,g){return h[0]&&h[3].length?0:1}return i=d(n),s=c[i]=f[i](n),{c(){e=v("div"),u&&u.c(),t=E(),s.c(),p(e,"class",n[1]),Q(e,"error",n[3].length)},m(h,g){w(h,e,g),u&&u.m(e,null),b(e,t),c[i].m(e,null),n[11](e),l=!0,o||(r=Y(e,"click",n[10]),o=!0)},p(h,[g]){u&&u.p&&(!l||g&256)&&Mt(u,a,h,h[8],l?$t(a,h[8],g,uk):Ot(h[8]),Xu);let m=i;i=d(h),i===m?c[i].p(h,g):(re(),I(c[m],1,1,()=>{c[m]=null}),ae(),s=c[i],s?s.p(h,g):(s=c[i]=f[i](h),s.c()),A(s,1),s.m(e,null)),(!l||g&2)&&p(e,"class",h[1]),(!l||g&10)&&Q(e,"error",h[3].length)},i(h){l||(A(u,h),A(s),l=!0)},o(h){I(u,h),I(s),l=!1},d(h){h&&k(e),u&&u.d(h),c[i].d(),n[11](null),o=!1,r()}}}const xu="Invalid value";function So(n){return typeof n=="object"?(n==null?void 0:n.message)||(n==null?void 0:n.code)||xu:n||xu}function pk(n,e,t){let i;Ge(n,Mi,m=>t(7,i=m));let{$$slots:s={},$$scope:l}=e;const o="field_"+j.randomString(7);let{name:r=""}=e,{inlineError:a=!1}=e,{class:u=void 0}=e,f,c=[];function d(){pi(r)}Kt(()=>(f.addEventListener("input",d),f.addEventListener("change",d),()=>{f.removeEventListener("input",d),f.removeEventListener("change",d)}));function h(m){Fe.call(this,n,m)}function g(m){te[m?"unshift":"push"](()=>{f=m,t(2,f)})}return n.$$set=m=>{"name"in m&&t(5,r=m.name),"inlineError"in m&&t(0,a=m.inlineError),"class"in m&&t(1,u=m.class),"$$scope"in m&&t(8,l=m.$$scope)},n.$$.update=()=>{n.$$.dirty&160&&t(3,c=j.toArray(j.getNestedVal(i,r)))},[a,u,f,c,o,r,d,i,l,s,h,g]}class me extends ve{constructor(e){super(),be(this,e,pk,dk,ge,{name:5,inlineError:0,class:1,changed:6})}get changed(){return this.$$.ctx[6]}}function hk(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Email"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","email"),p(l,"autocomplete","off"),p(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0]),l.focus(),r||(a=Y(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&l.value!==u[0]&&de(l,u[0])},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function mk(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=W("Password"),s=E(),l=v("input"),r=E(),a=v("div"),a.textContent="Minimum 10 characters.",p(e,"for",i=n[9]),p(l,"type","password"),p(l,"autocomplete","new-password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),b(e,t),w(c,s,d),w(c,l,d),de(l,n[1]),w(c,r,d),w(c,a,d),u||(f=Y(l,"input",n[6]),u=!0)},p(c,d){d&512&&i!==(i=c[9])&&p(e,"for",i),d&512&&o!==(o=c[9])&&p(l,"id",o),d&2&&l.value!==c[1]&&de(l,c[1])},d(c){c&&(k(e),k(s),k(l),k(r),k(a)),u=!1,f()}}}function gk(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Password confirm"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[2]),r||(a=Y(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&4&&l.value!==u[2]&&de(l,u[2])},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function _k(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;return s=new me({props:{class:"form-field required",name:"email",$$slots:{default:[hk,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),o=new me({props:{class:"form-field required",name:"password",$$slots:{default:[mk,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),a=new me({props:{class:"form-field required",name:"passwordConfirm",
2023-09-01 09:22:49 +03:00
* Chart.js v3.9.1
* https://www.chartjs.org
* (c) 2022 Chart.js Contributors
* Released under the MIT License
*/function bi(){}const Qk=function(){let n=0;return function(){return n++}}();function bt(n){return n===null||typeof n>"u"}function Lt(n){if(Array.isArray&&Array.isArray(n))return!0;const e=Object.prototype.toString.call(n);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function st(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const Yt=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function Hn(n,e){return Yt(n)?n:e}function rt(n,e){return typeof n>"u"?e:n}const xk=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,Nb=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function Vt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function kt(n,e,t,i){let s,l,o;if(Lt(n))if(l=n.length,i)for(s=l-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;s<l;s++)e.call(t,n[s],s);else if(st(n))for(o=Object.keys(n),l=o.length,s=0;s<l;s++)e.call(t,n[o[s]],o[s])}function Co(n,e){let t,i,s,l;if(!n||!e||n.length!==e.length)return!1;for(t=0,i=n.length;t<i;++t)if(s=n[t],l=e[t],s.datasetIndex!==l.datasetIndex||s.index!==l.index)return!1;return!0}function $o(n){if(Lt(n))return n.map($o);if(st(n)){const e=Object.create(null),t=Object.keys(n),i=t.length;let s=0;for(;s<i;++s)e[t[s]]=$o(n[t[s]]);return e}return n}function Fb(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function e2(n,e,t,i){if(!Fb(n))return;const s=e[n],l=t[n];st(s)&&st(l)?gl(s,l,i):e[n]=$o(l)}function gl(n,e,t){const i=Lt(e)?e:[e],s=i.length;if(!st(n))return n;t=t||{};const l=t.merger||e2;for(let o=0;o<s;++o){if(e=i[o],!st(e))continue;const r=Object.keys(e);for(let a=0,u=r.length;a<u;++a)l(r[a],n,e,t)}return n}function ol(n,e){return gl(n,e,{merger:t2})}function t2(n,e,t){if(!Fb(n))return;const i=e[n],s=t[n];st(i)&&st(s)?ol(i,s):Object.prototype.hasOwnProperty.call(e,n)||(e[n]=$o(s))}const pf={"":n=>n,x:n=>n.x,y:n=>n.y};function zi(n,e){return(pf[e]||(pf[e]=n2(e)))(n)}function n2(n){const e=i2(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function i2(n){const e=n.split("."),t=[];let i="";for(const s of e)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(t.push(i),i="");return t}function Fa(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Jn=n=>typeof n<"u",Bi=n=>typeof n=="function",hf=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function s2(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Ut=Math.PI,wt=2*Ut,l2=wt+Ut,Mo=Number.POSITIVE_INFINITY,o2=Ut/180,Bt=Ut/2,Ks=Ut/4,mf=Ut*2/3,Wn=Math.log10,ci=Math.sign;function gf(n){const e=Math.round(n);n=rl(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Wn(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function r2(n){const e=[],t=Math.sqrt(n);let i;for(i=1;i<t;i++)n%i===0&&(e.push(i),e.push(n/i));return t===(t|0)&&e.push(t),e.sort((s,l)=>s-l).pop(),e}function Ds(n){return!isNaN(parseFloat(n))&&isFinite(n)}function rl(n,e,t){return Math.abs(n-e)<t}function a2(n,e){const t=Math.round(n);return t-e<=n&&t+e>=n}function Rb(n,e,t){let i,s,l;for(i=0,s=n.length;i<s;i++)l=n[i][t],isNaN(l)||(e.min=Math.min(e.min,l),e.max=Math.max(e.max,l))}function ni(n){return n*(Ut/180)}function Ra(n){return n*(180/Ut)}function _f(n){if(!Yt(n))return;let e=1,t=0;for(;Math.round(n*e)/e!==n;)e*=10,t++;return t}function qb(n,e){const t=e.x-n.x,i=e.y-n.y,s=Math.sqrt(t*t+i*i);let l=Math.atan2(i,t);return l<-.5*Ut&&(l+=wt),{angle:l,distance:s}}function ta(n,e){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function u2(n,e){return(n-e+l2)%wt-Ut}function Dn(n){return(n%wt+wt)%wt}function _l(n,e,t,i){const s=Dn(n),l=Dn(e),o=Dn(t),r=Dn(l-s),a=Dn(o-s),u=Dn(s-l),f=Dn(s-o);return s===l||s===o||i&&l===o||r>a&&u<f}function mn(n,e,t){return Math.max(e,Math.min(t,n))}function f2(n){return mn(n,-32768,32767)}function bl(n,e,t,i=1e-6){return n>=Math.min(e,t)-i&&n<=Math.max(e,t)+i}function qa(n,e,t){t=t||(o=>n[o]<e);let i=n.length-1,s=0,l;for(;i-s>1;)l=s+i>>1,t(l)?s=l:i=l;return{lo:s,hi:i}}const is=(n,e,t,i)=>qa(n,t,i?s=>n[s][e]<=t:s=>n[s][e]<t),c2=(n,e,t)=>qa(n,t,i=>n[i][e]>=t);function d2(n,e,
2023-09-01 09:22:49 +03:00
* @kurkle/color v0.2.1
* https://github.com/kurkle/color#readme
* (c) 2022 Jukka Kurkela
* Released under the MIT License
*/function Al(n){return n+.5|0}const Ri=(n,e,t)=>Math.max(Math.min(n,t),e);function nl(n){return Ri(Al(n*2.55),0,255)}function Vi(n){return Ri(Al(n*255),0,255)}function ki(n){return Ri(Al(n/2.55)/100,0,1)}function wf(n){return Ri(Al(n*100),0,100)}const jn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},na=[..."0123456789ABCDEF"],g2=n=>na[n&15],_2=n=>na[(n&240)>>4]+na[n&15],Wl=n=>(n&240)>>4===(n&15),b2=n=>Wl(n.r)&&Wl(n.g)&&Wl(n.b)&&Wl(n.a);function v2(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&jn[n[1]]*17,g:255&jn[n[2]]*17,b:255&jn[n[3]]*17,a:e===5?jn[n[4]]*17:255}:(e===7||e===9)&&(t={r:jn[n[1]]<<4|jn[n[2]],g:jn[n[3]]<<4|jn[n[4]],b:jn[n[5]]<<4|jn[n[6]],a:e===9?jn[n[7]]<<4|jn[n[8]]:255})),t}const y2=(n,e)=>n<255?e(n):"";function k2(n){var e=b2(n)?g2:_2;return n?"#"+e(n.r)+e(n.g)+e(n.b)+y2(n.a,e):void 0}const w2=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Wb(n,e,t){const i=e*Math.min(t,1-t),s=(l,o=(l+n/30)%12)=>t-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function S2(n,e,t){const i=(s,l=(s+n/60)%6)=>t-t*e*Math.max(Math.min(l,4-l,1),0);return[i(5),i(3),i(1)]}function T2(n,e,t){const i=Wb(n,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)i[s]*=1-e-t,i[s]+=e;return i}function C2(n,e,t,i,s){return n===s?(e-t)/i+(e<t?6:0):e===s?(t-n)/i+2:(n-e)/i+4}function ja(n){const t=n.r/255,i=n.g/255,s=n.b/255,l=Math.max(t,i,s),o=Math.min(t,i,s),r=(l+o)/2;let a,u,f;return l!==o&&(f=l-o,u=r>.5?f/(2-l-o):f/(l+o),a=C2(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function Ha(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(Vi)}function Va(n,e,t){return Ha(Wb,n,e,t)}function $2(n,e,t){return Ha(T2,n,e,t)}function M2(n,e,t){return Ha(S2,n,e,t)}function Yb(n){return(n%360+360)%360}function O2(n){const e=w2.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?nl(+e[5]):Vi(+e[5]));const s=Yb(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=$2(s,l,o):e[1]==="hsv"?i=M2(s,l,o):i=Va(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function E2(n,e){var t=ja(n);t[0]=Yb(t[0]+e),t=Va(t),n.r=t[0],n.g=t[1],n.b=t[2]}function D2(n){if(!n)return;const e=ja(n),t=e[0],i=wf(e[1]),s=wf(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${ki(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const Sf={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Tf={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"
2023-09-01 09:22:49 +03:00
* Chart.js v3.9.1
* https://www.chartjs.org
* (c) 2022 Chart.js Contributors
* Released under the MIT License
*/class Lw{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,i,s){const l=t.listeners[s],o=t.duration;l.forEach(r=>r({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(i-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Vb.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const l=i.items;let o=l.length-1,r=!1,a;for(;o>=0;--o)a=l[o],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(e),r=!0):(l[o]=l[l.length-1],l.pop());r&&(s.draw(),this._notify(s,i,e,"progress")),l.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),t+=l.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var vi=new Lw;const Ff="transparent",Pw={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=$f(n||Ff),s=i.valid&&$f(e||Ff);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class Nw{constructor(e,t,i,s){const l=t[i];s=Jl([e.to,s,l,e.from]);const o=Jl([e.from,l,s]);this._active=!0,this._fn=e.fn||Pw[e.type||typeof o],this._easing=al[e.easing]||al.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const s=this._target[this._prop],l=i-this._start,o=this._duration-l;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=Jl([e.to,t,s,e.from]),this._from=Jl([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,s=this._prop,l=this._from,o=this._loop,r=this._to;let a;if(this._active=l!==r&&(o||t<i),!this._active){this._target[s]=r,this._notify(!0);return}if(t<0){this._target[s]=l;return}a=t/i%2,a=o&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[s]=this._fn(l,r,a)}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][t]()}}const Fw=["x","y","borderWidth","radius","tension"],Rw=["color","borderColor","backgroundColor"];at.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const qw=Object.keys(at.animation);at.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"});at.set("animations",{colors:{type:"color",properties:Rw},numbers:{type:"number",properties:Fw}});at.describe("animations",{_fallback:"animation"});at.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:n=>n|0}}}});class r1{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!st(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!st(s))return;const l={};for(con
2023-09-01 09:22:49 +03:00
`)>-1?n.split(`
`):n}function e4(n,e){const{element:t,datasetIndex:i,index:s}=e,l=n.getDatasetMeta(i).controller,{label:o,value:r}=l.getLabelAndValue(s);return{chart:n,label:o,parsed:l.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:r,dataset:l.getDataset(),dataIndex:s,datasetIndex:i,element:t}}function pc(n,e){const t=n.chart.ctx,{body:i,footer:s,title:l}=n,{boxWidth:o,boxHeight:r}=e,a=An(e.bodyFont),u=An(e.titleFont),f=An(e.footerFont),c=l.length,d=s.length,h=i.length,g=Gn(e.padding);let m=g.height,_=0,y=i.reduce((T,$)=>T+$.before.length+$.lines.length+$.after.length,0);if(y+=n.beforeBody.length+n.afterBody.length,c&&(m+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),y){const T=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;m+=h*T+(y-h)*a.lineHeight+(y-1)*e.bodySpacing}d&&(m+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let S=0;const C=function(T){_=Math.max(_,t.measureText(T).width+S)};return t.save(),t.font=u.string,kt(n.title,C),t.font=a.string,kt(n.beforeBody.concat(n.afterBody),C),S=e.displayColors?o+2+e.boxPadding:0,kt(i,T=>{kt(T.before,C),kt(T.lines,C),kt(T.after,C)}),S=0,t.font=f.string,kt(n.footer,C),t.restore(),_+=g.width,{width:_,height:m}}function t4(n,e){const{y:t,height:i}=e;return t<i/2?"top":t>n.height-i/2?"bottom":"center"}function n4(n,e,t,i){const{x:s,width:l}=i,o=t.caretSize+t.caretPadding;if(n==="left"&&s+l+o>e.width||n==="right"&&s-l-o<0)return!0}function i4(n,e,t,i){const{x:s,width:l}=t,{width:o,chartArea:{left:r,right:a}}=n;let u="center";return i==="center"?u=s<=(r+a)/2?"left":"right":s<=l/2?u="left":s>=o-l/2&&(u="right"),n4(u,n,e,t)&&(u="center"),u}function hc(n,e,t){const i=t.yAlign||e.yAlign||t4(n,t);return{xAlign:t.xAlign||e.xAlign||i4(n,e,t,i),yAlign:i}}function s4(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function l4(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function mc(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:o}=n,{xAlign:r,yAlign:a}=t,u=s+l,{topLeft:f,topRight:c,bottomLeft:d,bottomRight:h}=Ts(o);let g=s4(e,r);const m=l4(e,a,u);return a==="center"?r==="left"?g+=u:r==="right"&&(g-=u):r==="left"?g-=Math.max(f,d)+s:r==="right"&&(g+=Math.max(c,h)+s),{x:mn(g,0,i.width-e.width),y:mn(m,0,i.height-e.height)}}function to(n,e,t){const i=Gn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function gc(n){return ai([],yi(n))}function o4(n,e,t){return Wi(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function _c(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class ca extends Oi{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart||e._chart,this._chart=this.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&t.options.animation&&i.animations,l=new r1(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=o4(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:i}=t,s=i.beforeTitle.apply(this,[e]),l=i.title.apply(this,[e]),o=i.afterTitle.apply(this,[e]);let r=[];return r=ai(r,yi(s)),r=ai(r,yi(l)),r=ai(r,yi(o)),r}getBeforeBody(e,t){return gc(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return kt(e,l=>{const o={before:[],lines:[],after:[]},r=_c(i,l);ai(o.before,yi(r.beforeLabel.call(this,l))
2023-09-01 09:22:49 +03:00
* chartjs-adapter-luxon v1.3.1
* https://www.chartjs.org
* (c) 2023 chartjs-adapter-luxon Contributors
* Released under the MIT license
*/const M4={datetime:Ye.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:Ye.TIME_WITH_SECONDS,minute:Ye.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};d1._date.override({_id:"luxon",_create:function(n){return Ye.fromMillis(n,this.options)},init(n){this.options.locale||(this.options.locale=n.locale)},formats:function(){return M4},parse:function(n,e){const t=this.options,i=typeof n;return n===null||i==="undefined"?null:(i==="number"?n=this._create(n):i==="string"?typeof e=="string"?n=Ye.fromFormat(n,e,t):n=Ye.fromISO(n,t):n instanceof Date?n=Ye.fromJSDate(n,t):i==="object"&&!(n instanceof Ye)&&(n=Ye.fromObject(n,t)),n.isValid?n.valueOf():null)},format:function(n,e){const t=this._create(n);return typeof e=="string"?t.toFormat(e):t.toLocaleString(e)},add:function(n,e,t){const i={};return i[t]=e,this._create(n).plus(i).valueOf()},diff:function(n,e,t){return this._create(n).diff(this._create(e)).as(t).valueOf()},startOf:function(n,e,t){if(e==="isoWeek"){t=Math.trunc(Math.min(Math.max(0,t),6));const i=this._create(n);return i.minus({days:(i.weekday-t+7)%7}).startOf("day").valueOf()}return e?this._create(n).startOf(e).valueOf():n},endOf:function(n,e){return this._create(n).endOf(e).valueOf()}});function Cc(n){let e,t,i;return{c(){e=v("div"),p(e,"class","chart-loader loader svelte-vh4sl8")},m(s,l){w(s,e,l),i=!0},i(s){i||(s&&xe(()=>{i&&(t||(t=He(e,Qt,{duration:150},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=He(e,Qt,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function O4(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=W(n[1]),t=E(),s=W(i)},m(l,o){w(l,e,o),w(l,t,o),w(l,s,o)},p(l,o){o&2&&le(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&le(s,i)},d(l){l&&(k(e),k(t),k(s))}}}function E4(n){let e;return{c(){e=W("Loading...")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function D4(n){let e,t,i,s,l,o=n[2]&&Cc();function r(f,c){return f[2]?E4:O4}let a=r(n),u=a(n);return{c(){e=v("div"),o&&o.c(),t=E(),i=v("canvas"),s=E(),l=v("div"),u.c(),p(i,"class","chart-canvas svelte-vh4sl8"),Vr(i,"height","250px"),Vr(i,"width","100%"),p(e,"class","chart-wrapper svelte-vh4sl8"),Q(e,"loading",n[2]),p(l,"class","txt-hint m-t-xs txt-right")},m(f,c){w(f,e,c),o&&o.m(e,null),b(e,t),b(e,i),n[8](i),w(f,s,c),w(f,l,c),u.m(l,null)},p(f,[c]){f[2]?o?c&4&&A(o,1):(o=Cc(),o.c(),A(o,1),o.m(e,t)):o&&(re(),I(o,1,1,()=>{o=null}),ae()),c&4&&Q(e,"loading",f[2]),a===(a=r(f))&&u?u.p(f,c):(u.d(1),u=a(f),u&&(u.c(),u.m(l,null)))},i(f){A(o)},o(f){I(o)},d(f){f&&(k(e),k(s),k(l)),o&&o.d(),n[8](null),u.d()}}}function A4(n,e,t){let{filter:i=""}=e,{presets:s=""}=e,l,o,r=[],a=0,u=!1;async function f(){return t(2,u=!0),ce.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(h=>{c();for(let g of h)r.push({x:new Date(g.date),y:g.total}),t(1,a+=g.total);r.push({x:new Date,y:void 0})}).catch(h=>{h!=null&&h.isAbort||(c(),console.warn(h),ce.error(h,(h==null?void 0:h.status)!=400))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,r=[])}Kt(()=>(No.register(Yi,xo,Xo,iu,Nl,xS,r4),t(6,o=new No(l,{type:"line",data:{datasets:[{label:"Total requests",data:r,borderColor:"#ef4565",pointBackgroundColor:"#ef4565",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,pointRadius:1,pointBorderWidth:0,fill:!0}]},options:{animation:!1,interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,grid:{color:"#edf0f3",borderColor:"#dee3e8"},ticks:{precision:0,maxTicksLimit:6,autoSkip:!0,color:"#666f75"}},x:{type:"time",time:{unit:"hour",tooltipFormat:"DD h a"},grid:{borderColor:"#dee3e8",color:h=>h.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:h=>h.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function d(h){te[h?"unshift":"push"](()=>{l=h,t(0,l)})}return n.$$set=h=>{"filter"in h&&t(3,i=h.filter),"presets"in h&&t(4,s=h.presets)},n.$$.update=()=>{n.$$.dirty&24&&(typeof i<"u"||typeof s<"u")&&f(),n.$$.dirty&192&&typeof r<"u"&&o&&(t(6,o.data.datasets[0].d
2023-09-01 09:22:49 +03:00
* Prism: Lightweight, robust, elegant syntax highlighting
*
* @license MIT <https://opensource.org/licenses/MIT>
* @author Lea Verou <https://lea.verou.me>
* @namespace
* @public
*/var t=function(i){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,o={},r={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function S(C){return C instanceof a?new a(C.type,S(C.content),C.alias):Array.isArray(C)?C.map(S):C.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(S){return Object.prototype.toString.call(S).slice(8,-1)},objId:function(S){return S.__id||Object.defineProperty(S,"__id",{value:++l}),S.__id},clone:function S(C,T){T=T||{};var $,O;switch(r.util.type(C)){case"Object":if(O=r.util.objId(C),T[O])return T[O];$={},T[O]=$;for(var M in C)C.hasOwnProperty(M)&&($[M]=S(C[M],T));return $;case"Array":return O=r.util.objId(C),T[O]?T[O]:($=[],T[O]=$,C.forEach(function(D,L){$[L]=S(D,T)}),$);default:return C}},getLanguage:function(S){for(;S;){var C=s.exec(S.className);if(C)return C[1].toLowerCase();S=S.parentElement}return"none"},setLanguage:function(S,C){S.className=S.className.replace(RegExp(s,"gi"),""),S.classList.add("language-"+C)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch($){var S=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec($.stack)||[])[1];if(S){var C=document.getElementsByTagName("script");for(var T in C)if(C[T].src==S)return C[T]}return null}},isActive:function(S,C,T){for(var $="no-"+C;S;){var O=S.classList;if(O.contains(C))return!0;if(O.contains($))return!1;S=S.parentElement}return!!T}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(S,C){var T=r.util.clone(r.languages[S]);for(var $ in C)T[$]=C[$];return T},insertBefore:function(S,C,T,$){$=$||r.languages;var O=$[S],M={};for(var D in O)if(O.hasOwnProperty(D)){if(D==C)for(var L in T)T.hasOwnProperty(L)&&(M[L]=T[L]);T.hasOwnProperty(D)||(M[D]=O[D])}var N=$[S];return $[S]=M,r.languages.DFS(r.languages,function(P,F){F===N&&P!=S&&(this[P]=M)}),M},DFS:function S(C,T,$,O){O=O||{};var M=r.util.objId;for(var D in C)if(C.hasOwnProperty(D)){T.call(C,D,C[D],$||D);var L=C[D],N=r.util.type(L);N==="Object"&&!O[M(L)]?(O[M(L)]=!0,S(L,T,null,O)):N==="Array"&&!O[M(L)]&&(O[M(L)]=!0,S(L,T,D,O))}}},plugins:{},highlightAll:function(S,C){r.highlightAllUnder(document,S,C)},highlightAllUnder:function(S,C,T){var $={callback:T,container:S,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",$),$.elements=Array.prototype.slice.apply($.container.querySelectorAll($.selector)),r.hooks.run("before-all-elements-highlight",$);for(var O=0,M;M=$.elements[O++];)r.highlightElement(M,C===!0,$.callback)},highlightElement:function(S,C,T){var $=r.util.getLanguage(S),O=r.languages[$];r.util.setLanguage(S,$);var M=S.parentElement;M&&M.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(M,$);var D=S.textContent,L={element:S,language:$,grammar:O,code:D};function N(F){L.highlightedCode=F,r.hooks.run("before-insert",L),L.element.innerHTML=L.highlightedCode,r.hooks.run("after-highlight",L),r.hooks.run("complete",L),T&&T.call(L.element)}if(r.hooks.run("before-sanity-check",L),M=L.element.parentElement,M&&M.nodeName.toLowerCase()==="pre"&&!M.hasAttribute("tabindex")&&M.setAttribute("tabindex","0"),!L.code){r.hooks.run("complete",L),T&&T.call(L.element);return}if(r.hooks.run("before-highlight",L),!L.grammar){N(r.util.encode(L.code));return}if(C&&i.Worker){var P=new Worker(r.filename);P.onmessage=function(F){N(F.data)},P.postMessage(JSON.stringify({language:L.language,code:L.code,immediateClose:!0}))}else N(r.highlight(L.code,L.grammar,L.language))},highlight:function(S,C,T){var $={code:S,grammar:C,language:T};if(r.hooks.run("before-tokenize",$),!$.grammar)throw new Error('The language "'+$.language+'" has no grammar.');return $.tokens=r.tokenize($.code,$.grammar),r.hooks.run("after-tokenize",$),a.stringify(r.util.encode($.tokens),$.language)},tokenize:function(S,C){var T=C.rest;if(T){for(var $ in T)C[$]=T[$];delete C.rest}var O=new c;return d(O,O.head,S),f(S,O,C,O.head,0),g(O)},hooks:{all:{},add:function
`),_.hasAttribute("data-start")||_.setAttribute("data-start",String(L+1))}y.textContent=O,t.highlightElement(y)},function(O){_.setAttribute(r,f),y.textContent=O})}}),t.plugins.fileHighlight={highlight:function(_){for(var y=(_||document).querySelectorAll(c),S=0,C;C=y[S++];)t.highlightElement(C)}};var g=!1;t.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(I1);var P4=I1.exports;const xs=L4(P4);var N4={exports:{}};(function(n){(function(){if(typeof Prism>"u")return;var e=Object.assign||function(o,r){for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);return o};function t(o){this.defaults=e({},o)}function i(o){return o.replace(/-(\w)/g,function(r,a){return a.toUpperCase()})}function s(o){for(var r=0,a=0;a<o.length;++a)o.charCodeAt(a)==" ".charCodeAt(0)&&(r+=3);return o.length+r}var l={"remove-trailing":"boolean","remove-indent":"boolean","left-trim":"boolean","right-trim":"boolean","break-lines":"number",indent:"number","remove-initial-line-feed":"boolean","tabs-to-spaces":"number","spaces-to-tabs":"number"};t.prototype={setDefaults:function(o){this.defaults=e(this.defaults,o)},normalize:function(o,r){r=e(this.defaults,r);for(var a in r){var u=i(a);a!=="normalize"&&u!=="setDefaults"&&r[a]&&this[u]&&(o=this[u].call(this,o,r[a]))}return o},leftTrim:function(o){return o.replace(/^\s+/,"")},rightTrim:function(o){return o.replace(/\s+$/,"")},tabsToSpaces:function(o,r){return r=r|0||4,o.replace(/\t/g,new Array(++r).join(" "))},spacesToTabs:function(o,r){return r=r|0||4,o.replace(RegExp(" {"+r+"}","g")," ")},removeTrailing:function(o){return o.replace(/\s*?$/gm,"")},removeInitialLineFeed:function(o){return o.replace(/^(?:\r?\n|\r)/,"")},removeIndent:function(o){var r=o.match(/^[^\S\n\r]*(?=\S)/gm);return!r||!r[0].length||(r.sort(function(a,u){return a.length-u.length}),!r[0].length)?o:o.replace(RegExp("^"+r[0],"gm"),"")},indent:function(o,r){return o.replace(/^[^\S\n\r]*(?=\S)/gm,new Array(++r).join(" ")+"$&")},breakLines:function(o,r){r=r===!0?80:r|0||80;for(var a=o.split(`
2023-09-01 09:22:49 +03:00
`),u=0;u<a.length;++u)if(!(s(a[u])<=r)){for(var f=a[u].split(/(\s+)/g),c=0,d=0;d<f.length;++d){var h=s(f[d]);c+=h,c>r&&(f[d]=`
`+f[d],c=h)}a[u]=f.join("")}return a.join(`
`)}},n.exports&&(n.exports=t),Prism.plugins.NormalizeWhitespace=new t({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(o){var r=Prism.plugins.NormalizeWhitespace;if(!(o.settings&&o.settings["whitespace-normalization"]===!1)&&Prism.util.isActive(o.element,"whitespace-normalization",!0)){if((!o.element||!o.element.parentNode)&&o.code){o.code=r.normalize(o.code,o.settings);return}var a=o.element.parentNode;if(!(!o.code||!a||a.nodeName.toLowerCase()!=="pre")){o.settings==null&&(o.settings={});for(var u in l)if(Object.hasOwnProperty.call(l,u)){var f=l[u];if(a.hasAttribute("data-"+u))try{var c=JSON.parse(a.getAttribute("data-"+u)||"true");typeof c===f&&(o.settings[u]=c)}catch{}}for(var d=a.childNodes,h="",g="",m=!1,_=0;_<d.length;++_){var y=d[_];y==o.element?m=!0:y.nodeName==="#text"&&(m?g+=y.nodeValue:h+=y.nodeValue,a.removeChild(y),--_)}if(!o.element.children.length||!Prism.plugins.KeepMarkup)o.code=h+o.code+g,o.code=r.normalize(o.code,o.settings);else{var S=h+o.element.innerHTML+g;o.element.innerHTML=r.normalize(S,o.settings),o.code=o.element.textContent}}}})})()})(N4);(function(n){var e=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],t=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,i={pattern:RegExp(t+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};n.languages.dart=n.languages.extend("clike",{"class-name":[i,{pattern:RegExp(t+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:i.inside}],keyword:e,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),n.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:n.languages.dart}}},string:/[\s\S]+/}},string:void 0}),n.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),n.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":i,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);function F4(n){let e,t,i;return{c(){e=v("div"),t=v("code"),p(t,"class","svelte-10s5tkd"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){w(s,e,l),b(e,t),t.innerHTML=n[1]},p(s,[l]){l&2&&(t.innerHTML=s[1]),l&1&&i!==(i="code-wrapper prism-light "+s[0]+" svelte-10s5tkd")&&p(e,"class",i)},i:x,o:x,d(s){s&&k(e)}}}function R4(n,e,t){let{class:i=""}=e,{content:s=""}=e,{language:l="javascript"}=e,o="";function r(a){return a=typeof a=="string"?a:"",a=xs.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),xs.highlight(a,xs.languages[l]||xs.languages.javascript,l)}return n.$$set=a=>{"class"in a&&t(0,i=a.class),"content"in a&&t(2,s=a.content),"language"in a&&t(3,l=a.language)},n.$$.update=()=>{n.$$.dirty&4&&typeof xs<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class L1 extends ve{constructor(e){super(),be(this,e,R4,F4,ge,{class:0,content:2,language:3})}}const q4=n=>({}),Mc=n=>({}),j4=n=>({}),Oc=n=>({});function Ec(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,C=n[4]&&!n[2]&&Dc(n);const T=n[19].header,$=Ct(T,n,n[18],Oc);let O=n[4]&&n[2]&&Ac(n);const M=n[19].default,D=Ct(M,n,n[18],null),L=n[19].footer,N=Ct(L,n,n[18],Mc);return{c(){e=v("div"),t=v("div"),s=E(),l=v("div"),o=v("div"),C&&C.c(),r=E(),$&&$.c(),a=E(),O&&O.c(),u=E(),f=v("div"),D&&D.c(),c=E(),d=v("div"),N&&N.c(),p(t,
This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(_,y){(!c||y&256&&l!==(l=_[8]))&&p(e,"for",l);const S={};y&256&&(S.id=_[8]),y&1&&(S.disabled=!j.isEmpty(_[0].options.onlyDomains)),!a&&y&1&&(a=!0,S.value=_[0].options.exceptDomains,_e(()=>a=!1)),r.$set(S)},i(_){c||(A(r.$$.fragment,_),c=!0)},o(_){I(r.$$.fragment,_),c=!1},d(_){_&&(k(e),k(o),k(u),k(f)),V(r,_),d=!1,h()}}}function sC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function g(_){n[4](_)}let m={id:n[8]+".options.onlyDomains",disabled:!j.isEmpty(n[0].options.exceptDomains)};return n[0].options.onlyDomains!==void 0&&(m.value=n[0].options.onlyDomains),r=new js({props:m}),te.push(()=>he(r,"value",g)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=E(),s=v("i"),o=E(),z(r.$$.fragment),u=E(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[8]+".options.onlyDomains"),p(f,"class","help-block")},m(_,y){w(_,e,y),b(e,t),b(e,i),b(e,s),w(_,o,y),H(r,_,y),w(_,u,y),w(_,f,y),c=!0,d||(h=Te(Be.call(null,s,{text:`List of domains that are ONLY allowed.
This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(_,y){(!c||y&256&&l!==(l=_[8]+".options.onlyDomains"))&&p(e,"for",l);const S={};y&256&&(S.id=_[8]+".options.onlyDomains"),y&1&&(S.disabled=!j.isEmpty(_[0].options.exceptDomains)),!a&&y&1&&(a=!0,S.value=_[0].options.onlyDomains,_e(()=>a=!1)),r.$set(S)},i(_){c||(A(r.$$.fragment,_),c=!0)},o(_){I(r.$$.fragment,_),c=!1},d(_){_&&(k(e),k(o),k(u),k(f)),V(r,_),d=!1,h()}}}function lC(n){let e,t,i,s,l,o,r;return i=new me({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[iC,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:n}}}),o=new me({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[sC,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(a,u){w(a,e,u),b(e,t),H(i,t,null),b(e,s),b(e,l),H(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&769&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.onlyDomains"),u&769&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&k(e),V(i),V(o)}}}function oC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[lC]},$$scope:{ctx:n}};for(let r=0;r<s.length;r+=1)o=je(o,s[r]);return n[0]!==void 0&&(o.field=n[0]),e=new gi({props:o}),te.push(()=>he(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),{c(){z(e.$$.fragment)},m(r,a){H(e,r,a),i=!0},p(r,[a]){const u=a&6?_t(s,[a&2&&{key:r[1]},a&4&&Dt(r[2])]):{};a&515&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],_e(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function rC(n,e,t){const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e;function r(d){n.$$.not_equal(l.options.exceptDomains,d)&&(l.options.exceptDomains=d,t(0,l))}function a(d){n.$$.not_equal(l.options.onlyDomains,d)&&(l.options.onlyDomains=d,t(0,l))}function u(d){l=d,t(0,l)}function f(d){Fe.call(this,n,d)}function c(d){Fe.call(this,n,d)}return n.$$set=d=>{e=je(je({},e),xt(d)),t(2,s=tt(e,i)),"field"in d&&t(0,l=d.field),"key"in d&&t(1,o=d.key)},[l,o,s,r,a,u,f,c]}class F1 extends ve{constructor(e){super(),be(this,e,rC,oC,ge,{field:0,key:1})}}function aC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;r<s.length;r+=1)o=je(o,s[r]);return n[0]!==void 0&&(o.field=n[0]),e=new F1({props:o}),te.push(()=>he(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),{c(){z(e.$$.fragment)},m(r,a){H(e,r,a),i=!0},p(r,[a]){const u=a&6?_t(s,[a&2&&{key:r[1]},a&4&&Dt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],_e(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function uC(n,e,t){const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e;function r(f){l=f,t(0,l)}function a(f){Fe.call(this,n,f)}function u(f){Fe.call(this,n,f)}return n.$$set=f=>{e=je(je({},e),xt(f)),t(2,s=tt(e,i)),"field"in f&&t(0,l=f.field),"key"in f&&t(1,o=f.key)},[l,o,s,r,a,u]}class fC extends ve{constructor(e){super(),be(this,e,uC,aC,ge,{field:0,key:1})}}function cC(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="Strip urls domain",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[8]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[8])},m(c,d){w(c,e,d),e.checked=n[0].options.convertUrls,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[Y(e,"change",n[3]),Te(Be.call(null,r,{text:"This could help making the editor content more portable between environments since there will be no local base url to replace."}))],u=!0)},p(c,d){d&256&&t!==(t=c[8])&&p(e,"id",t),d&1&&(e.checked=c[0].options.convertUrls),d&256&&a!==(a=c[8])&&p(s,"for",a)},d(c){c&&(k(e),k(i),k(s)),u=!1,$e(f)}}}function dC
2023-09-01 09:22:49 +03:00
<span class='flatpickr-weekday'>
`+Z.join("</span><span class='flatpickr-weekday'>")+`
2023-09-01 09:22:49 +03:00
</span>
`}}function oe(){t.calendarContainer.classList.add("hasWeeks");var K=mt("div","flatpickr-weekwrapper");K.appendChild(mt("span","flatpickr-weekday",t.l10n.weekAbbreviation));var Z=mt("div","flatpickr-weeks");return K.appendChild(Z),{weekWrapper:K,weekNumbers:Z}}function ee(K,Z){Z===void 0&&(Z=!0);var ie=Z?K:K-t.currentMonth;ie<0&&t._hidePrevMonthArrow===!0||ie>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=ie,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,et("onYearChange"),R()),F(),et("onMonthChange"),Jt())}function se(K,Z){if(K===void 0&&(K=!0),Z===void 0&&(Z=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,Z===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var ie=Fr(t.config),fe=ie.hours,Oe=ie.minutes,Pe=ie.seconds;h(fe,Oe,Pe)}t.redraw(),K&&et("onChange")}function Ee(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),et("onClose")}function Re(){t.config!==void 0&&et("onDestroy");for(var K=t._handlers.length;K--;)t._handlers[K].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var Z=t.calendarContainer.parentNode;if(Z.lastChild&&Z.removeChild(Z.lastChild),Z.parentNode){for(;Z.firstChild;)Z.parentNode.insertBefore(Z.firstChild,Z);Z.parentNode.removeChild(Z)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(ie){try{delete t[ie]}catch{}})}function Ve(K){return t.calendarContainer.contains(K)}function We(K){if(t.isOpen&&!t.config.inline){var Z=Mn(K),ie=Ve(Z),fe=Z===t.input||Z===t.altInput||t.element.contains(Z)||K.path&&K.path.indexOf&&(~K.path.indexOf(t.input)||~K.path.indexOf(t.altInput)),Oe=!fe&&!ie&&!Ve(K.relatedTarget),Pe=!t.config.ignoredFocusElements.some(function(Ne){return Ne.contains(Z)});Oe&&Pe&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&a(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function ke(K){if(!(!K||t.config.minDate&&K<t.config.minDate.getFullYear()||t.config.maxDate&&K>t.config.maxDate.getFullYear())){var Z=K,ie=t.currentYear!==Z;t.currentYear=Z||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),ie&&(t.redraw(),et("onYearChange"),R())}}function Me(K,Z){var ie;Z===void 0&&(Z=!0);var fe=t.parseDate(K,void 0,Z);if(t.config.minDate&&fe&&On(fe,t.config.minDate,Z!==void 0?Z:!t.minDateHasTime)<0||t.config.maxDate&&fe&&On(fe,t.config.maxDate,Z!==void 0?Z:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)ret
`),r=v("code"),r.textContent="multipart/form-data",a=W(`
requests, the following normalization rules are applied if the `),u=v("code"),u.textContent="json",f=W(` field
2023-09-01 09:22:49 +03:00
is a
`),c=v("strong"),c.textContent="plain string",d=W(`:
`),h=v("ul"),g=v("li"),g.innerHTML="&quot;true&quot; is converted to the json <code>true</code>",m=E(),_=v("li"),_.innerHTML="&quot;false&quot; is converted to the json <code>false</code>",y=E(),S=v("li"),S.innerHTML="&quot;null&quot; is converted to the json <code>null</code>",C=E(),T=v("li"),T.innerHTML="&quot;[1,2,3]&quot; is converted to the json <code>[1,2,3]</code>",$=E(),O=v("li"),D=W(M),L=W(" is converted to the json "),N=v("code"),N.textContent='{"a":1,"b":2}',P=E(),F=v("li"),F.textContent="numeric strings are converted to json number",R=E(),q=v("li"),q.textContent="double quoted strings are left as they are (aka. without normalizations)",B=E(),G=v("li"),G.textContent="any other string (empty string too) is double quoted",X=W(`
2023-09-01 09:22:49 +03:00
Alternatively, if you want to avoid the string value normalizations, you can wrap your
data inside an object, eg.`),J=v("code"),J.textContent='{"data": anything}',p(i,"class","content"),p(t,"class","alert alert-warning m-b-0 m-t-10"),p(e,"class","block")},m(ee,se){w(ee,e,se),b(e,t),b(t,i),b(i,s),b(i,l),b(i,o),b(i,r),b(i,a),b(i,u),b(i,f),b(i,c),b(i,d),b(i,h),b(h,g),b(h,m),b(h,_),b(h,y),b(h,S),b(h,C),b(h,T),b(h,$),b(h,O),b(O,D),b(O,L),b(O,N),b(h,P),b(h,F),b(h,R),b(h,q),b(h,B),b(h,G),b(i,X),b(i,J),oe=!0},i(ee){oe||(ee&&xe(()=>{oe&&(U||(U=He(e,lt,{duration:150},!0)),U.run(1))}),oe=!0)},o(ee){ee&&(U||(U=He(e,lt,{duration:150},!1)),U.run(0)),oe=!1},d(ee){ee&&k(e),ee&&U&&U.end()}}}function s$(n){let e,t,i,s,l,o,r;function a(d,h){return d[2]?i$:n$}let u=a(n),f=u(n),c=n[2]&&kd();return{c(){e=v("button"),t=v("strong"),t.textContent="String value normalizations",i=E(),f.c(),s=E(),c&&c.c(),l=ye(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","inline-flex txt-sm flex-gap-5 link-hint")},m(d,h){w(d,e,h),b(e,t),b(e,i),f.m(e,null),w(d,s,h),c&&c.m(d,h),w(d,l,h),o||(r=Y(e,"click",n[4]),o=!0)},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(e,null))),d[2]?c?h&4&&A(c,1):(c=kd(),c.c(),A(c,1),c.m(l.parentNode,l)):c&&(re(),I(c,1,1,()=>{c=null}),ae())},d(d){d&&(k(e),k(s),k(l)),f.d(),c&&c.d(d),o=!1,r()}}}function l$(n){let e,t,i;const s=[{key:n[1]},n[3]];function l(r){n[5](r)}let o={$$slots:{options:[s$]},$$scope:{ctx:n}};for(let r=0;r<s.length;r+=1)o=je(o,s[r]);return n[0]!==void 0&&(o.field=n[0]),e=new gi({props:o}),te.push(()=>he(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),{c(){z(e.$$.fragment)},m(r,a){H(e,r,a),i=!0},p(r,[a]){const u=a&10?_t(s,[a&2&&{key:r[1]},a&8&&Dt(r[3])]):{};a&260&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],_e(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function o$(n,e,t){const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e,r=!1;const a=()=>{t(2,r=!r)};function u(d){l=d,t(0,l)}function f(d){Fe.call(this,n,d)}function c(d){Fe.call(this,n,d)}return n.$$set=d=>{e=je(je({},e),xt(d)),t(3,s=tt(e,i)),"field"in d&&t(0,l=d.field),"key"in d&&t(1,o=d.key)},[l,o,r,s,a,u,f,c]}class r$ extends ve{constructor(e){super(),be(this,e,o$,l$,ge,{field:0,key:1})}}function a$(n){let e,t=(n[0].ext||"N/A")+"",i,s,l,o=n[0].mimeType+"",r;return{c(){e=v("span"),i=W(t),s=E(),l=v("small"),r=W(o),p(e,"class","txt"),p(l,"class","txt-hint")},m(a,u){w(a,e,u),b(e,i),w(a,s,u),w(a,l,u),b(l,r)},p(a,[u]){u&1&&t!==(t=(a[0].ext||"N/A")+"")&&le(i,t),u&1&&o!==(o=a[0].mimeType+"")&&le(r,o)},i:x,o:x,d(a){a&&(k(e),k(s),k(l))}}}function u$(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class wd extends ve{constructor(e){super(),be(this,e,u$,a$,ge,{item:0})}}const f$=[{ext:".xpm",mimeType:"image/x-xpixmap"},{ext:".7z",mimeType:"application/x-7z-compressed"},{ext:".zip",mimeType:"application/zip"},{ext:".xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{ext:".docx",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{ext:".pptx",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{ext:".epub",mimeType:"application/epub+zip"},{ext:".jar",mimeType:"application/jar"},{ext:".odt",mimeType:"application/vnd.oasis.opendocument.text"},{ext:".ott",mimeType:"application/vnd.oasis.opendocument.text-template"},{ext:".ods",mimeType:"application/vnd.oasis.opendocument.spreadsheet"},{ext:".ots",mimeType:"application/vnd.oasis.opendocument.spreadsheet-template"},{ext:".odp",mimeType:"application/vnd.oasis.opendocument.presentation"},{ext:".otp",mimeType:"application/vnd.oasis.opendocument.presentation-template"},{ext:".odg",mimeType:"application/vnd.oasis.opendocument.graphics"},{ext:".otg",mimeType:"application/vnd.oasis.opendocument.graphics-template"},{ext:".odf",mimeType:"application/vnd.oasis.opendocument.formula"},{ext:".odc",mimeType:"application/vnd.oasis.opendocument.chart"},{ext:".sxc",mimeType:"application/vnd.sun.xml.calc"},{ext:".pdf",mimeType:"application/pdf"},{ext:".fdf",mimeType:"application/vnd.fdf"},{ext:
Leave empty for no restriction.`,position:"top"})),S=!0)},p(O,M){(!y||M&4194304&&l!==(l=O[22]))&&p(e,"for",l);const D={};M&4194304&&(D.id=O[22]),M&8&&(D.items=O[3]),!a&&M&1&&(a=!0,D.keyOfSelected=O[0].options.mimeTypes,_e(()=>a=!1)),r.$set(D);const L={};M&16777217&&(L.$$scope={dirty:M,ctx:O}),_.$set(L)},i(O){y||(A(r.$$.fragment,O),A(_.$$.fragment,O),y=!0)},o(O){I(r.$$.fragment,O),I(_.$$.fragment,O),y=!1},d(O){O&&(k(e),k(o),k(u),k(f)),V(r,O),V(_),S=!1,C()}}}function m$(n){let e;return{c(){e=v("ul"),e.innerHTML=`<li><strong>WxH</strong>
2023-09-01 09:22:49 +03:00
(eg. 100x50) - crop to WxH viewbox (from center)</li> <li><strong>WxHt</strong>
(eg. 100x50t) - crop to WxH viewbox (from top)</li> <li><strong>WxHb</strong>
(eg. 100x50b) - crop to WxH viewbox (from bottom)</li> <li><strong>WxHf</strong>
(eg. 100x50f) - fit inside a WxH viewbox (without cropping)</li> <li><strong>0xH</strong>
(eg. 0x50) - resize to H height preserving the aspect ratio</li> <li><strong>Wx0</strong>
(eg. 100x0) - resize to W width preserving the aspect ratio</li>`,p(e,"class","m-0")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function g$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,C,T,$;function O(D){n[13](D)}let M={id:n[22],placeholder:"eg. 50x50, 480x720"};return n[0].options.thumbs!==void 0&&(M.value=n[0].options.thumbs),r=new js({props:M}),te.push(()=>he(r,"value",O)),S=new Pn({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[m$]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Thumb sizes",i=E(),s=v("i"),o=E(),z(r.$$.fragment),u=E(),f=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=E(),h=v("button"),g=v("span"),g.textContent="Supported formats",m=E(),_=v("i"),y=E(),z(S.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[22]),p(c,"class","txt"),p(g,"class","txt link-primary"),p(_,"class","ri-arrow-drop-down-fill"),p(h,"type","button"),p(h,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(D,L){w(D,e,L),b(e,t),b(e,i),b(e,s),w(D,o,L),H(r,D,L),w(D,u,L),w(D,f,L),b(f,c),b(f,d),b(f,h),b(h,g),b(h,m),b(h,_),b(h,y),H(S,h,null),C=!0,T||($=Te(Be.call(null,s,{text:"List of additional thumb sizes for image files, along with the default thumb size of 100x100. The thumbs are generated lazily on first access.",position:"top"})),T=!0)},p(D,L){(!C||L&4194304&&l!==(l=D[22]))&&p(e,"for",l);const N={};L&4194304&&(N.id=D[22]),!a&&L&1&&(a=!0,N.value=D[0].options.thumbs,_e(()=>a=!1)),r.$set(N);const P={};L&16777216&&(P.$$scope={dirty:L,ctx:D}),S.$set(P)},i(D){C||(A(r.$$.fragment,D),A(S.$$.fragment,D),C=!0)},o(D){I(r.$$.fragment,D),I(S.$$.fragment,D),C=!1},d(D){D&&(k(e),k(o),k(u),k(f)),V(r,D),V(S),T=!1,$()}}}function _$(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=W("Max file size"),s=E(),l=v("input"),r=E(),a=v("div"),a.textContent="Must be in bytes.",p(e,"for",i=n[22]),p(l,"type","number"),p(l,"id",o=n[22]),p(l,"step","1"),p(l,"min","0"),p(a,"class","help-block")},m(c,d){w(c,e,d),b(e,t),w(c,s,d),w(c,l,d),de(l,n[0].options.maxSize),w(c,r,d),w(c,a,d),u||(f=Y(l,"input",n[14]),u=!0)},p(c,d){d&4194304&&i!==(i=c[22])&&p(e,"for",i),d&4194304&&o!==(o=c[22])&&p(l,"id",o),d&1&&yt(l.value)!==c[0].options.maxSize&&de(l,c[0].options.maxSize)},d(c){c&&(k(e),k(s),k(l),k(r),k(a)),u=!1,f()}}}function Sd(n){let e,t,i;return t=new me({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[b$,({uniqueId:s})=>({22:s}),({uniqueId:s})=>s?4194304:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","col-sm-3")},m(s,l){w(s,e,l),H(t,e,null),i=!0},p(s,l){const o={};l&2&&(o.name="schema."+s[1]+".options.maxSelect"),l&20971521&&(o.$$scope={dirty:l,ctx:s}),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&k(e),V(t)}}}function b$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Max select"),s=E(),l=v("input"),p(e,"for",i=n[22]),p(l,"id",o=n[22]),p(l,"type","number"),p(l,"step","1"),p(l,"min","2"),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].options.maxSelect),r||(a=Y(l,"input",n[15]),r=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&o!==(o=u[22])&&p(l,"id",o),f&1&&yt(l.value)!==u[0].options.maxSelect&&de(l,u[0].options.maxSelect)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function v$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;i=new me({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[h$,({uniqueId:m})=>({22:m}),({uniqueId:m})=>m?4194304:0]},$$scope:{ctx:n}}}),o=new me({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[g$,({uniqueId:m})=>({22:m}),({uniqueId:m})=>m?4194304:0]},$$scope:{ctx:n}}}),f=new me({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[_$,({uniqueId:m})=>({22:m}),({uniqueId:m})=>m?4194304:0]},$$scope:{ctx:n}}});let g=!n[2]&&Sd(n);return{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),a=E(),u=v("div"),z(f.$$.fragment),d=E(),g&&g.c(),p(t,"clas
2023-09-01 09:22:49 +03:00
`),position:"top"})),c=!0)},p(m,_){var S,C;l&&Et(l.update)&&_&20&&l.update.call(null,{text:[`Whether on ${((S=m[4])==null?void 0:S.name)||"relation"} record deletion to delete also the current corresponding collection record(s).`,m[2]?null:`For "Multiple" relation fields the cascade delete is triggered only when all ${((C=m[4])==null?void 0:C.name)||"relation"} ids are removed from the corresponding record.`].filter(Boolean).join(`
2023-09-01 09:22:49 +03:00
`),position:"top"}),(!f||_&8388608&&o!==(o=m[23]))&&p(e,"for",o);const y={};_&8388608&&(y.id=m[23]),!u&&_&1&&(u=!0,y.keyOfSelected=m[0].options.cascadeDelete,_e(()=>u=!1)),a.$set(y)},i(m){f||(A(a.$$.fragment,m),f=!0)},o(m){I(a.$$.fragment,m),f=!1},d(m){m&&(k(e),k(r)),V(a,m),c=!1,d()}}}function I$(n){let e,t,i,s,l,o=!n[2]&&Td(n);return s=new me({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[A$,({uniqueId:r})=>({23:r}),({uniqueId:r})=>r?8388608:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),o&&o.c(),t=E(),i=v("div"),z(s.$$.fragment),p(i,"class","col-sm-12"),p(e,"class","grid grid-sm")},m(r,a){w(r,e,a),o&&o.m(e,null),b(e,t),b(e,i),H(s,i,null),l=!0},p(r,a){r[2]?o&&(re(),I(o,1,1,()=>{o=null}),ae()):o?(o.p(r,a),a&4&&A(o,1)):(o=Td(r),o.c(),A(o,1),o.m(e,t));const u={};a&2&&(u.name="schema."+r[1]+".options.cascadeDelete"),a&41943061&&(u.$$scope={dirty:a,ctx:r}),s.$set(u)},i(r){l||(A(o),A(s.$$.fragment,r),l=!0)},o(r){I(o),I(s.$$.fragment,r),l=!1},d(r){r&&k(e),o&&o.d(),V(s)}}}function L$(n){let e,t,i,s,l;const o=[{key:n[1]},n[8]];function r(f){n[17](f)}let a={$$slots:{options:[I$],default:[O$,({interactive:f})=>({24:f}),({interactive:f})=>f?16777216:0]},$$scope:{ctx:n}};for(let f=0;f<o.length;f+=1)a=je(a,o[f]);n[0]!==void 0&&(a.field=n[0]),e=new gi({props:a}),te.push(()=>he(e,"field",r)),e.$on("rename",n[18]),e.$on("remove",n[19]);let u={};return s=new ou({props:u}),n[20](s),s.$on("save",n[21]),{c(){z(e.$$.fragment),i=E(),z(s.$$.fragment)},m(f,c){H(e,f,c),w(f,i,c),H(s,f,c),l=!0},p(f,[c]){const d=c&258?_t(o,[c&2&&{key:f[1]},c&256&&Dt(f[8])]):{};c&50331711&&(d.$$scope={dirty:c,ctx:f}),!t&&c&1&&(t=!0,d.field=f[0],_e(()=>t=!1)),e.$set(d);const h={};s.$set(h)},i(f){l||(A(e.$$.fragment,f),A(s.$$.fragment,f),l=!0)},o(f){I(e.$$.fragment,f),I(s.$$.fragment,f),l=!1},d(f){f&&k(i),V(e,f),n[20](null),V(s,f)}}}function P$(n,e,t){var P;let i,s;const l=["field","key"];let o=tt(e,l),r;Ge(n,Zn,F=>t(10,r=F));let{field:a}=e,{key:u=""}=e;const f=[{label:"Single",value:!0},{label:"Multiple",value:!1}],c=[{label:"False",value:!1},{label:"True",value:!0}];let d=null,h=((P=a.options)==null?void 0:P.maxSelect)==1,g=h;function m(){t(0,a.options={maxSelect:1,collectionId:null,cascadeDelete:!1},a),t(2,h=!0),t(9,g=h)}function _(){a.options.minSelect=yt(this.value),t(0,a),t(9,g),t(2,h)}function y(){a.options.maxSelect=yt(this.value),t(0,a),t(9,g),t(2,h)}function S(F){n.$$.not_equal(a.options.cascadeDelete,F)&&(a.options.cascadeDelete=F,t(0,a),t(9,g),t(2,h))}const C=()=>d==null?void 0:d.show();function T(F){n.$$.not_equal(a.options.collectionId,F)&&(a.options.collectionId=F,t(0,a),t(9,g),t(2,h))}function $(F){h=F,t(2,h)}function O(F){a=F,t(0,a),t(9,g),t(2,h)}function M(F){Fe.call(this,n,F)}function D(F){Fe.call(this,n,F)}function L(F){te[F?"unshift":"push"](()=>{d=F,t(3,d)})}const N=F=>{var R,q;(q=(R=F==null?void 0:F.detail)==null?void 0:R.collection)!=null&&q.id&&F.detail.collection.type!="view"&&t(0,a.options.collectionId=F.detail.collection.id,a)};return n.$$set=F=>{e=je(je({},e),xt(F)),t(8,o=tt(e,l)),"field"in F&&t(0,a=F.field),"key"in F&&t(1,u=F.key)},n.$$.update=()=>{n.$$.dirty&1024&&t(5,i=r.filter(F=>F.type!="view")),n.$$.dirty&516&&g!=h&&(t(9,g=h),h?(t(0,a.options.minSelect=null,a),t(0,a.options.maxSelect=1,a)):t(0,a.options.maxSelect=null,a)),n.$$.dirty&1&&j.isEmpty(a.options)&&m(),n.$$.dirty&1025&&t(4,s=r.find(F=>F.id==a.options.collectionId)||null)},[a,u,h,d,s,i,f,c,o,g,r,_,y,S,C,T,$,O,M,D,L,N]}class N$ extends ve{constructor(e){super(),be(this,e,P$,L$,ge,{field:0,key:1})}}const F$=n=>({dragging:n&4,dragover:n&8}),Cd=n=>({dragging:n[2],dragover:n[3]});function R$(n){let e,t,i,s,l;const o=n[10].default,r=Ct(o,n,n[9],Cd);return{c(){e=v("div"),r&&r.c(),p(e,"draggable",t=!n[1]),p(e,"class","draggable svelte-28orm4"),Q(e,"dragging",n[2]),Q(e,"dragover",n[3])},m(a,u){w(a,e,u),r&&r.m(e,null),i=!0,s||(l=[Y(e,"dragover",Ze(n[11])),Y(e,"dragleave",Ze(n[12])),Y(e,"dragend",n[13]),Y(e,"dragstart",n[14]),Y(e,"drop",n[15])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&524)&&Mt(r,o,a,a[9],i?$t(o,a[9],u,F$):Ot(a[9]),Cd),(!i||u&2&&t!==(t=!a[1]))&&
`),t=v("code"),t.textContent="username",i=W(` ,
`),s=v("code"),s.textContent="email",l=W(` ,
`),o=v("code"),o.textContent="emailVisibility",r=W(` ,
`),a=v("code"),a.textContent="verified",p(t,"class","txt-sm"),p(s,"class","txt-sm"),p(o,"class","txt-sm"),p(a,"class","txt-sm")},m(u,f){w(u,e,f),w(u,t,f),w(u,i,f),w(u,s,f),w(u,l,f),w(u,o,f),w(u,r,f),w(u,a,f)},d(u){u&&(k(e),k(t),k(i),k(s),k(l),k(o),k(r),k(a))}}}function j$(n){let e,t,i,s;function l(u){n[6](u,n[17],n[18],n[19])}function o(){return n[7](n[19])}var r=n[1][n[17].type];function a(u,f){let c={key:u[4](u[17])};return u[17]!==void 0&&(c.field=u[17]),{props:c}}return r&&(e=Pt(r,a(n)),te.push(()=>he(e,"field",l)),e.$on("remove",o),e.$on("rename",n[8])),{c(){e&&z(e.$$.fragment),i=E()},m(u,f){e&&H(e,u,f),w(u,i,f),s=!0},p(u,f){if(n=u,f&1&&r!==(r=n[1][n[17].type])){if(e){re();const c=e;I(c.$$.fragment,1,0,()=>{V(c,1)}),ae()}r?(e=Pt(r,a(n)),te.push(()=>he(e,"field",l)),e.$on("remove",o),e.$on("rename",n[8]),z(e.$$.fragment),A(e.$$.fragment,1),H(e,i.parentNode,i)):e=null}else if(r){const c={};f&1&&(c.key=n[4](n[17])),!t&&f&1&&(t=!0,c.field=n[17],_e(()=>t=!1)),e.$set(c)}},i(u){s||(e&&A(e.$$.fragment,u),s=!0)},o(u){e&&I(e.$$.fragment,u),s=!1},d(u){u&&k(i),e&&V(e,u)}}}function Od(n,e){let t,i,s,l;function o(a){e[9](a)}let r={index:e[19],disabled:e[17].toDelete||e[17].id&&e[17].system,dragHandleClass:"drag-handle-wrapper",$$slots:{default:[j$]},$$scope:{ctx:e}};return e[0].schema!==void 0&&(r.list=e[0].schema),i=new Fl({props:r}),te.push(()=>he(i,"list",o)),i.$on("drag",e[10]),i.$on("sort",e[11]),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),H(i,a,u),l=!0},p(a,u){e=a;const f={};u&1&&(f.index=e[19]),u&1&&(f.disabled=e[17].toDelete||e[17].id&&e[17].system),u&1048577&&(f.$$scope={dirty:u,ctx:e}),!s&&u&1&&(s=!0,f.list=e[0].schema,_e(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){I(i.$$.fragment,a),l=!1},d(a){a&&k(t),V(i,a)}}}function H$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=[],g=new Map,m,_,y,S,C,T,$,O,M=n[0].type==="auth"&&Md(),D=pe(n[0].schema);const L=F=>F[17];for(let F=0;F<D.length;F+=1){let R=$d(n,D,F),q=L(R);g.set(q,h[F]=Od(q,R))}_=new TT({props:{class:"btn btn-block btn-outline"}}),_.$on("select",n[12]);function N(F){n[13](F)}let P={};return n[0]!==void 0&&(P.collection=n[0]),T=new yT({props:P}),te.push(()=>he(T,"collection",N)),{c(){e=v("div"),t=v("p"),i=W(`System fields:
`),s=v("code"),s.textContent="id",l=W(` ,
`),o=v("code"),o.textContent="created",r=W(` ,
`),a=v("code"),a.textContent="updated",u=E(),M&&M.c(),f=W(`
.`),c=E(),d=v("div");for(let F=0;F<h.length;F+=1)h[F].c();m=E(),z(_.$$.fragment),y=E(),S=v("hr"),C=E(),z(T.$$.fragment),p(s,"class","txt-sm"),p(o,"class","txt-sm"),p(a,"class","txt-sm"),p(t,"class","txt-sm"),p(e,"class","block m-b-25"),p(d,"class","schema-fields")},m(F,R){w(F,e,R),b(e,t),b(t,i),b(t,s),b(t,l),b(t,o),b(t,r),b(t,a),b(t,u),M&&M.m(t,null),b(t,f),w(F,c,R),w(F,d,R);for(let q=0;q<h.length;q+=1)h[q]&&h[q].m(d,null);w(F,m,R),H(_,F,R),w(F,y,R),w(F,S,R),w(F,C,R),H(T,F,R),O=!0},p(F,[R]){F[0].type==="auth"?M||(M=Md(),M.c(),M.m(t,f)):M&&(M.d(1),M=null),R&55&&(D=pe(F[0].schema),re(),h=gt(h,R,L,1,F,D,g,d,Rt,Od,null,$d),ae());const q={};!$&&R&1&&($=!0,q.collection=F[0],_e(()=>$=!1)),T.$set(q)},i(F){if(!O){for(let R=0;R<D.length;R+=1)A(h[R]);A(_.$$.fragment,F),A(T.$$.fragment,F),O=!0}},o(F){for(let R=0;R<h.length;R+=1)I(h[R]);I(_.$$.fragment,F),I(T.$$.fragment,F),O=!1},d(F){F&&(k(e),k(c),k(d),k(m),k(y),k(S),k(C)),M&&M.d();for(let R=0;R<h.length;R+=1)h[R].d();V(_,F),V(T,F)}}}function V$(n,e,t){let i,{collection:s}=e;const l={text:BT,number:XT,bool:eC,email:F1,url:fC,editor:mC,date:AC,select:t$,json:r$,file:T$,relation:N$};function o(T){s.schema[T]&&(s.schema.splice(T,1),t(0,s))}function r(T="text"){const $=j.initSchemaField({name:a(),type:T});$.onMountSelect=!0,s.schema.push($),t(0,s)}function a(T="field"){let $="";for(;u(T+$);)++$;return T+$}function u(T){var $;return!!(($=s==null?void 0:s.schema)!=null&&$.find(O=>O.name===T))}function f(T){return i.findIndex($=>$===T)}function c(T,$){var O;!((O=s==null?void 0:s.schema)!=null&&O.length)||T===$||!$||t(0,s.indexes=s.indexes.map(M=>j.replaceIndexColumn(M,T,$)),s)}function d(T,$,O,M){O[M]=T,t(0,s)}const h=T=>o(T),g=T=>c(T.detail.oldName,T.detail.newName);function m(T){n.$$.not_equal(s.schema,T)&&(s.schema=T,t(0,s))}const _=T=>{if(!T.detail)return;const $=T.detail.target;$.style.opacity=0,setTimeout(()=>{var O;(O=$==null?void 0:$.style)==null||O.removeProperty("opacity")},0),T.detail.dataTransfer.setDragImage($,0,0)},y=()=>{ln({})},S=T=>r(T.detail);function C(T){s=T,t(0,s)}return n.$$set=T=>{"collection"in T&&t(0,s=T.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof s.schema>"u"&&t(0,s.schema=[],s),n.$$.dirty&1&&(i=s.schema.filter(T=>!T.toDelete)||[])},[s,l,o,r,f,c,d,h,g,m,_,y,S,C]}class z$ extends ve{constructor(e){super(),be(this,e,V$,H$,ge,{collection:0})}}const B$=n=>({isAdminOnly:n&512}),Ed=n=>({isAdminOnly:n[9]}),U$=n=>({isAdminOnly:n&512}),Dd=n=>({isAdminOnly:n[9]}),W$=n=>({isAdminOnly:n&512}),Ad=n=>({isAdminOnly:n[9]});function Y$(n){let e,t;return e=new me({props:{class:"form-field rule-field "+(n[4]?"requied":"")+" "+(n[9]?"disabled":""),name:n[3],$$slots:{default:[J$,({uniqueId:i})=>({18:i}),({uniqueId:i})=>i?262144:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&528&&(l.class="form-field rule-field "+(i[4]?"requied":"")+" "+(i[9]?"disabled":"")),s&8&&(l.name=i[3]),s&295655&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function K$(n){let e;return{c(){e=v("div"),e.innerHTML='<span class="loader"></span>',p(e,"class","txt-center")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function Id(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='<i class="ri-lock-line"></i> <span class="txt">Set Admins only</span>',p(e,"type","button"),p(e,"class","btn btn-sm btn-transparent btn-hint lock-toggle svelte-1akuazq")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[11]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function Ld(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='<small class="txt svelte-1akuazq">Unlock and set custom rule</small> <div class="icon svelte-1akuazq"><i class="ri-lock-unlock-line svelte-1akuazq"></i></div>',p(e,"type","button"),p(e,"class","unlock-overlay svelte-1akuazq"),p(e,"aria-label","Unlock and set custom rule")},m(o,r){w(o,e,r),i=!0,s||(l=Y(e,"click",n[10]),s=!0)},p:x,i(o){i||(o&&xe(()=>{i&&(t||(t=He(e,Qt,{duration:150,start:.98},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Qt,{duration:150,start:.98},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end()
<br/> <code>@request.auth.id != &quot;&quot; &amp;&amp; created &gt; &quot;2022-01-01 00:00:00&quot;</code>`,p(s,"class","m-b-0"),p(o,"class","inline-flex flex-gap-5"),p(a,"class","m-t-10 m-b-5"),p(f,"class","m-b-0"),p(d,"class","inline-flex flex-gap-5"),p(g,"class","m-t-10 m-b-5"),p(_,"class","m-b-0"),p(S,"class","inline-flex flex-gap-5"),p(T,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(P,F){w(P,e,F),b(e,t),b(t,i),b(i,s),b(i,l),b(i,o);for(let R=0;R<N.length;R+=1)N[R]&&N[R].m(o,null);b(i,r),b(i,a),b(i,u),b(i,f),b(i,c),b(i,d),b(i,h),b(i,g),b(i,m),b(i,_),b(i,y),b(i,S),b(i,C),b(i,T),b(i,$),b(i,O),D=!0},p(P,F){if(F&4){L=pe(P[2]);let R;for(R=0;R<L.length;R+=1){const q=Nd(P,L,R);N[R]?N[R].p(q,F):(N[R]=Rd(q),N[R].c(),N[R].m(o,null))}for(;R<N.length;R+=1)N[R].d(1);N.length=L.length}},i(P){D||(P&&xe(()=>{D&&(M||(M=He(e,lt,{duration:150},!0)),M.run(1))}),D=!0)},o(P){P&&(M||(M=He(e,lt,{duration:150},!1)),M.run(0)),D=!1},d(P){P&&k(e),vt(N,P),P&&M&&M.end()}}}function Rd(n){let e,t=n[11]+"",i;return{c(){e=v("code"),i=W(t)},m(s,l){w(s,e,l),b(e,i)},p(s,l){l&4&&t!==(t=s[11]+"")&&le(i,t)},d(s){s&&k(e)}}}function qd(n){let e,t,i,s,l,o,r,a,u;function f(_){n[6](_)}let c={label:"Create rule",formKey:"createRule",collection:n[0],$$slots:{afterLabel:[X$,({isAdminOnly:_})=>({10:_}),({isAdminOnly:_})=>_?1024:0]},$$scope:{ctx:n}};n[0].createRule!==void 0&&(c.rule=n[0].createRule),e=new Ms({props:c}),te.push(()=>he(e,"rule",f));function d(_){n[7](_)}let h={label:"Update rule",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(h.rule=n[0].updateRule),s=new Ms({props:h}),te.push(()=>he(s,"rule",d));function g(_){n[8](_)}let m={label:"Delete rule",formKey:"deleteRule",collection:n[0]};return n[0].deleteRule!==void 0&&(m.rule=n[0].deleteRule),r=new Ms({props:m}),te.push(()=>he(r,"rule",g)),{c(){z(e.$$.fragment),i=E(),z(s.$$.fragment),o=E(),z(r.$$.fragment)},m(_,y){H(e,_,y),w(_,i,y),H(s,_,y),w(_,o,y),H(r,_,y),u=!0},p(_,y){const S={};y&1&&(S.collection=_[0]),y&17408&&(S.$$scope={dirty:y,ctx:_}),!t&&y&1&&(t=!0,S.rule=_[0].createRule,_e(()=>t=!1)),e.$set(S);const C={};y&1&&(C.collection=_[0]),!l&&y&1&&(l=!0,C.rule=_[0].updateRule,_e(()=>l=!1)),s.$set(C);const T={};y&1&&(T.collection=_[0]),!a&&y&1&&(a=!0,T.rule=_[0].deleteRule,_e(()=>a=!1)),r.$set(T)},i(_){u||(A(e.$$.fragment,_),A(s.$$.fragment,_),A(r.$$.fragment,_),u=!0)},o(_){I(e.$$.fragment,_),I(s.$$.fragment,_),I(r.$$.fragment,_),u=!1},d(_){_&&(k(i),k(o)),V(e,_),V(s,_),V(r,_)}}}function jd(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-information-line link-hint")},m(s,l){w(s,e,l),t||(i=Te(Be.call(null,e,{text:'The Create rule is executed after a "dry save" of the submitted data, giving you access to the main record fields as in every other rule.',position:"top"})),t=!0)},d(s){s&&k(e),t=!1,i()}}}function X$(n){let e,t=!n[10]&&jd();return{c(){t&&t.c(),e=ye()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[10]?t&&(t.d(1),t=null):t||(t=jd(),t.c(),t.m(e.parentNode,e))},d(i){i&&k(e),t&&t.d(i)}}}function Hd(n){let e,t,i;function s(o){n[9](o)}let l={label:"Manage rule",formKey:"options.manageRule",placeholder:"",required:n[0].options.manageRule!==null,collection:n[0],$$slots:{default:[Q$]},$$scope:{ctx:n}};return n[0].options.manageRule!==void 0&&(l.rule=n[0].options.manageRule),e=new Ms({props:l}),te.push(()=>he(e,"rule",s)),{c(){z(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r&1&&(a.required=o[0].options.manageRule!==null),r&1&&(a.collection=o[0]),r&16384&&(a.$$scope={dirty:r,ctx:o}),!t&&r&1&&(t=!0,a.rule=o[0].options.manageRule,_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function Q$(n){let e,t,i;return{c(){e=v("p"),e.textContent=`This API rule gives admin-like permissions to allow fully managing the auth record(s), eg.
2023-09-01 09:22:49 +03:00
changing the password without requiring to enter the old one, directly updating the verified
state or email, etc.`,t=E(),i=v("p"),i.innerHTML="This rule is executed in addition to the <code>create</code> and <code>update</code> API rules."},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},p:x,d(s){s&&(k(e),k(t),k(i))}}}function x$(n){var F,R;let e,t,i,s,l,o=n[1]?"Hide available fields":"Show available fields",r,a,u,f,c,d,h,g,m,_,y,S,C,T,$=n[1]&&Fd(n);function O(q){n[4](q)}let M={label:"List/Search rule",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(M.rule=n[0].listRule),f=new Ms({props:M}),te.push(()=>he(f,"rule",O));function D(q){n[5](q)}let L={label:"View rule",formKey:"viewRule",collection:n[0]};n[0].viewRule!==void 0&&(L.rule=n[0].viewRule),h=new Ms({props:L}),te.push(()=>he(h,"rule",D));let N=((F=n[0])==null?void 0:F.type)!=="view"&&qd(n),P=((R=n[0])==null?void 0:R.type)==="auth"&&Hd(n);return{c(){e=v("div"),t=v("div"),i=v("p"),i.innerHTML=`All rules follow the
2023-09-01 09:22:49 +03:00
<a href="https://pocketbase.io/docs/api-rules-and-filters/" target="_blank" rel="noopener noreferrer">PocketBase filter syntax and operators
</a>.`,s=E(),l=v("button"),r=W(o),a=E(),$&&$.c(),u=E(),z(f.$$.fragment),d=E(),z(h.$$.fragment),m=E(),N&&N.c(),_=E(),P&&P.c(),y=ye(),p(l,"type","button"),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex txt-sm txt-hint m-b-5"),p(e,"class","block m-b-sm handle")},m(q,B){w(q,e,B),b(e,t),b(t,i),b(t,s),b(t,l),b(l,r),b(e,a),$&&$.m(e,null),w(q,u,B),H(f,q,B),w(q,d,B),H(h,q,B),w(q,m,B),N&&N.m(q,B),w(q,_,B),P&&P.m(q,B),w(q,y,B),S=!0,C||(T=Y(l,"click",n[3]),C=!0)},p(q,[B]){var J,U;(!S||B&2)&&o!==(o=q[1]?"Hide available fields":"Show available fields")&&le(r,o),q[1]?$?($.p(q,B),B&2&&A($,1)):($=Fd(q),$.c(),A($,1),$.m(e,null)):$&&(re(),I($,1,1,()=>{$=null}),ae());const G={};B&1&&(G.collection=q[0]),!c&&B&1&&(c=!0,G.rule=q[0].listRule,_e(()=>c=!1)),f.$set(G);const X={};B&1&&(X.collection=q[0]),!g&&B&1&&(g=!0,X.rule=q[0].viewRule,_e(()=>g=!1)),h.$set(X),((J=q[0])==null?void 0:J.type)!=="view"?N?(N.p(q,B),B&1&&A(N,1)):(N=qd(q),N.c(),A(N,1),N.m(_.parentNode,_)):N&&(re(),I(N,1,1,()=>{N=null}),ae()),((U=q[0])==null?void 0:U.type)==="auth"?P?(P.p(q,B),B&1&&A(P,1)):(P=Hd(q),P.c(),A(P,1),P.m(y.parentNode,y)):P&&(re(),I(P,1,1,()=>{P=null}),ae())},i(q){S||(A($),A(f.$$.fragment,q),A(h.$$.fragment,q),A(N),A(P),S=!0)},o(q){I($),I(f.$$.fragment,q),I(h.$$.fragment,q),I(N),I(P),S=!1},d(q){q&&(k(e),k(u),k(d),k(m),k(_),k(y)),$&&$.d(),V(f,q),V(h,q),N&&N.d(q),P&&P.d(q),C=!1,T()}}}function eM(n,e,t){let i,{collection:s}=e,l=!1;const o=()=>t(1,l=!l);function r(h){n.$$.not_equal(s.listRule,h)&&(s.listRule=h,t(0,s))}function a(h){n.$$.not_equal(s.viewRule,h)&&(s.viewRule=h,t(0,s))}function u(h){n.$$.not_equal(s.createRule,h)&&(s.createRule=h,t(0,s))}function f(h){n.$$.not_equal(s.updateRule,h)&&(s.updateRule=h,t(0,s))}function c(h){n.$$.not_equal(s.deleteRule,h)&&(s.deleteRule=h,t(0,s))}function d(h){n.$$.not_equal(s.options.manageRule,h)&&(s.options.manageRule=h,t(0,s))}return n.$$set=h=>{"collection"in h&&t(0,s=h.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=j.getAllCollectionIdentifiers(s))},[s,l,i,o,r,a,u,f,c,d]}class tM extends ve{constructor(e){super(),be(this,e,eM,x$,ge,{collection:0})}}function Vd(n,e,t){const i=n.slice();return i[9]=e[t],i}function nM(n){let e,t,i,s;function l(a){n[5](a)}var o=n[1];function r(a,u){let f={id:a[8],placeholder:"eg. SELECT id, name from posts",language:"sql-select",minHeight:"150"};return a[0].options.query!==void 0&&(f.value=a[0].options.query),{props:f}}return o&&(e=Pt(o,r(n)),te.push(()=>he(e,"value",l)),e.$on("change",n[6])),{c(){e&&z(e.$$.fragment),i=ye()},m(a,u){e&&H(e,a,u),w(a,i,u),s=!0},p(a,u){if(u&2&&o!==(o=a[1])){if(e){re();const f=e;I(f.$$.fragment,1,0,()=>{V(f,1)}),ae()}o?(e=Pt(o,r(a)),te.push(()=>he(e,"value",l)),e.$on("change",a[6]),z(e.$$.fragment),A(e.$$.fragment,1),H(e,i.parentNode,i)):e=null}else if(o){const f={};u&256&&(f.id=a[8]),!t&&u&1&&(t=!0,f.value=a[0].options.query,_e(()=>t=!1)),e.$set(f)}},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&I(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&V(e,a)}}}function iM(n){let e;return{c(){e=v("textarea"),e.disabled=!0,p(e,"rows","7"),p(e,"placeholder","Loading...")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function zd(n){let e,t,i=pe(n[3]),s=[];for(let l=0;l<i.length;l+=1)s[l]=Bd(Vd(n,i,l));return{c(){e=v("div"),t=v("div");for(let l=0;l<s.length;l+=1)s[l].c();p(t,"class","content"),p(e,"class","help-block help-block-error")},m(l,o){w(l,e,o),b(e,t);for(let r=0;r<s.length;r+=1)s[r]&&s[r].m(t,null)},p(l,o){if(o&8){i=pe(l[3]);let r;for(r=0;r<i.length;r+=1){const a=Vd(l,i,r);s[r]?s[r].p(a,o):(s[r]=Bd(a),s[r].c(),s[r].m(t,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=i.length}},d(l){l&&k(e),vt(s,l)}}}function Bd(n){let e,t=n[9]+"",i;return{c(){e=v("p"),i=W(t)},m(s,l){w(s,e,l),b(e,i)},p(s,l){l&8&&t!==(t=s[9]+"")&&le(i,t)},d(s){s&&k(e)}}}function sM(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[iM,nM],h=[];function g(_,y){return _[2]?0:1}l=g(n),o=h[l]=d[l](n);let m=n[3].length&&zd(n);return{c(){e=v("label"),t=v("span"),t.textContent="Select query",s=E(),o.c(),r=E(),a=v("div"),a.innerHTML=`<ul><li>Wildcard columns (<code>*</code>
2023-09-01 09:22:49 +03:00
<br/>
If your query doesn&#39;t have a suitable one, you can use the universal
<code>(ROW_NUMBER() OVER()) as id</code>.</li> <li>Expressions must be aliased with a valid formatted field name (eg.
<code>MAX(balance) as maxBalance</code>).</li></ul>`,u=E(),m&&m.c(),f=ye(),p(t,"class","txt"),p(e,"for",i=n[8]),p(a,"class","help-block")},m(_,y){w(_,e,y),b(e,t),w(_,s,y),h[l].m(_,y),w(_,r,y),w(_,a,y),w(_,u,y),m&&m.m(_,y),w(_,f,y),c=!0},p(_,y){(!c||y&256&&i!==(i=_[8]))&&p(e,"for",i);let S=l;l=g(_),l===S?h[l].p(_,y):(re(),I(h[S],1,1,()=>{h[S]=null}),ae(),o=h[l],o?o.p(_,y):(o=h[l]=d[l](_),o.c()),A(o,1),o.m(r.parentNode,r)),_[3].length?m?m.p(_,y):(m=zd(_),m.c(),m.m(f.parentNode,f)):m&&(m.d(1),m=null)},i(_){c||(A(o),c=!0)},o(_){I(o),c=!1},d(_){_&&(k(e),k(s),k(r),k(a),k(u),k(f)),h[l].d(_),m&&m.d(_)}}}function lM(n){let e,t;return e=new me({props:{class:"form-field required "+(n[3].length?"error":""),name:"options.query",$$slots:{default:[sM,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field required "+(i[3].length?"error":"")),s&4367&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function oM(n,e,t){let i;Ge(n,Mi,c=>t(4,i=c));let{collection:s}=e,l,o=!1,r=[];function a(c){var g;t(3,r=[]);const d=j.getNestedVal(c,"schema",null);if(j.isEmpty(d))return;if(d!=null&&d.message){r.push(d==null?void 0:d.message);return}const h=j.extractColumnsFromQuery((g=s==null?void 0:s.options)==null?void 0:g.query);j.removeByValue(h,"id"),j.removeByValue(h,"created"),j.removeByValue(h,"updated");for(let m in d)for(let _ in d[m]){const y=d[m][_].message,S=h[m]||m;r.push(j.sentenize(S+": "+y))}}Kt(async()=>{t(2,o=!0);try{t(1,l=(await ut(()=>import("./CodeEditor-4c129c80.js"),["./CodeEditor-4c129c80.js","./index-808c8630.js"],import.meta.url)).default)}catch(c){console.warn(c)}t(2,o=!1)});function u(c){n.$$.not_equal(s.options.query,c)&&(s.options.query=c,t(0,s))}const f=()=>{r.length&&pi("schema")};return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&16&&a(i)},[s,l,o,r,i,u,f]}class rM extends ve{constructor(e){super(),be(this,e,oM,lM,ge,{collection:0})}}const aM=n=>({active:n&1}),Ud=n=>({active:n[0]});function Wd(n){let e,t,i;const s=n[15].default,l=Ct(s,n,n[14],null);return{c(){e=v("div"),l&&l.c(),p(e,"class","accordion-content")},m(o,r){w(o,e,r),l&&l.m(e,null),i=!0},p(o,r){l&&l.p&&(!i||r&16384)&&Mt(l,s,o,o[14],i?$t(s,o[14],r,null):Ot(o[14]),null)},i(o){i||(A(l,o),o&&xe(()=>{i&&(t||(t=He(e,lt,{duration:150},!0)),t.run(1))}),i=!0)},o(o){I(l,o),o&&(t||(t=He(e,lt,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&k(e),l&&l.d(o),o&&t&&t.end()}}}function uM(n){let e,t,i,s,l,o,r;const a=n[15].header,u=Ct(a,n,n[14],Ud);let f=n[0]&&Wd(n);return{c(){e=v("div"),t=v("button"),u&&u.c(),i=E(),f&&f.c(),p(t,"type","button"),p(t,"class","accordion-header"),p(t,"draggable",n[2]),Q(t,"interactive",n[3]),p(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),Q(e,"active",n[0])},m(c,d){w(c,e,d),b(e,t),u&&u.m(t,null),b(e,i),f&&f.m(e,null),n[22](e),l=!0,o||(r=[Y(t,"click",Ze(n[17])),Y(t,"drop",Ze(n[18])),Y(t,"dragstart",n[19]),Y(t,"dragenter",n[20]),Y(t,"dragleave",n[21]),Y(t,"dragover",Ze(n[16]))],o=!0)},p(c,[d]){u&&u.p&&(!l||d&16385)&&Mt(u,a,c,c[14],l?$t(a,c[14],d,aM):Ot(c[14]),Ud),(!l||d&4)&&p(t,"draggable",c[2]),(!l||d&8)&&Q(t,"interactive",c[3]),c[0]?f?(f.p(c,d),d&1&&A(f,1)):(f=Wd(c),f.c(),A(f,1),f.m(e,null)):f&&(re(),I(f,1,1,()=>{f=null}),ae()),(!l||d&130&&s!==(s="accordion "+(c[7]?"drag-over":"")+" "+c[1]))&&p(e,"class",s),(!l||d&131)&&Q(e,"active",c[0])},i(c){l||(A(u,c),A(f),l=!0)},o(c){I(u,c),I(f),l=!1},d(c){c&&k(e),u&&u.d(c),f&&f.d(),n[22](null),o=!1,$e(r)}}}function fM(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=dt();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:c=!0}=e,{single:d=!1}=e,h=!1;function g(){return!!f}function m(){S(),t(0,f=!0),l("expand")}function _(){t(0,f=!1),clearTimeout(r),l("collapse")}function y(){l("toggle"),f?_():m()}function S(){if(d&&o.closest(".accordions")){const N=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const P of N)P.click()}}Kt
This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(_,y){(!c||y&4096&&l!==(l=_[12]))&&p(e,"for",l);const S={};y&4096&&(S.id=_[12]),y&1&&(S.disabled=!j.isEmpty(_[0].options.onlyEmailDomains)),!a&&y&1&&(a=!0,S.value=_[0].options.exceptEmailDomains,_e(()=>a=!1)),r.$set(S)},i(_){c||(A(r.$$.fragment,_),c=!0)},o(_){I(r.$$.fragment,_),c=!1},d(_){_&&(k(e),k(o),k(u),k(f)),V(r,_),d=!1,h()}}}function bM(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function g(_){n[8](_)}let m={id:n[12],disabled:!j.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(m.value=n[0].options.onlyEmailDomains),r=new js({props:m}),te.push(()=>he(r,"value",g)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=E(),s=v("i"),o=E(),z(r.$$.fragment),u=E(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(_,y){w(_,e,y),b(e,t),b(e,i),b(e,s),w(_,o,y),H(r,_,y),w(_,u,y),w(_,f,y),c=!0,d||(h=Te(Be.call(null,s,{text:`Email domains that are ONLY allowed to sign up.
This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(_,y){(!c||y&4096&&l!==(l=_[12]))&&p(e,"for",l);const S={};y&4096&&(S.id=_[12]),y&1&&(S.disabled=!j.isEmpty(_[0].options.exceptEmailDomains)),!a&&y&1&&(a=!0,S.value=_[0].options.onlyEmailDomains,_e(()=>a=!1)),r.$set(S)},i(_){c||(A(r.$$.fragment,_),c=!0)},o(_){I(r.$$.fragment,_),c=!1},d(_){_&&(k(e),k(o),k(u),k(f)),V(r,_),d=!1,h()}}}function vM(n){let e,t,i,s;e=new me({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[gM,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&Kd(n);return{c(){z(e.$$.fragment),t=E(),l&&l.c(),i=ye()},m(o,r){H(e,o,r),w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowEmailAuth?l?(l.p(o,r),r&1&&A(l,1)):(l=Kd(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(re(),I(l,1,1,()=>{l=null}),ae())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){I(e.$$.fragment,o),I(l),s=!1},d(o){o&&(k(t),k(i)),V(e,o),l&&l.d(o)}}}function yM(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function kM(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Jd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Te(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&xe(()=>{i&&(t||(t=He(e,Qt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Qt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function wM(n){let e,t,i,s,l,o;function r(c,d){return c[0].options.allowEmailAuth?kM:yM}let a=r(n),u=a(n),f=n[2]&&Jd();return{c(){e=v("div"),e.innerHTML='<i class="ri-mail-star-line"></i> <span class="txt">Email/Password</span>',t=E(),i=v("div"),s=E(),u.c(),l=E(),f&&f.c(),o=ye(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(c,d){w(c,e,d),w(c,t,d),w(c,i,d),w(c,s,d),u.m(c,d),w(c,l,d),f&&f.m(c,d),w(c,o,d)},p(c,d){a!==(a=r(c))&&(u.d(1),u=a(c),u&&(u.c(),u.m(l.parentNode,l))),c[2]?f?d&4&&A(f,1):(f=Jd(),f.c(),A(f,1),f.m(o.parentNode,o)):f&&(re(),I(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(t),k(i),k(s),k(l),k(o)),u.d(c),f&&f.d(c)}}}function SM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=W("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){w(u,e,f),e.checked=n[0].options.allowOAuth2Auth,w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[9]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowOAuth2Auth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function Gd(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='<div class="flex p-t-base"><a href="#/settings/auth-providers" target="_blank" class="btn btn-sm btn-outline"><span class="txt">Manage OAuth2 providers</span></a></div>',p(e,"class","block")},m(s,l){w(s,e,l),i=!0},i(s){i||(s&&xe(()=>{i&&(t||(t=He(e,lt,{duration:150},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=He(e,lt,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function TM(n){let e,t,i,s;e=new me({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[SM,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&Gd();return{c(){z(e.$$.fragment),t=E(),l&&l.c(),i=ye()},m(o,r){H(e,o,r),w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowOAuth2Auth?l?r&1&&A(l,1):(l=Gd(),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(re(),I(l,1,1,()=>{l=null}),ae())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){I(e.$$.fragment,o),I(l),s=!1},d(o){o&&(k(t),k(i)),V(e,o),l&&l.d(o)}}}function CM(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function $M(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-s
Also note that some OAuth2 providers (like Twitter), don't return an email and the authentication may fail if the email field is required.`,position:"right"}))],u=!0)},p(c,d){d&4096&&t!==(t=c[12])&&p(e,"id",t),d&1&&(e.checked=c[0].options.requireEmail),d&4096&&a!==(a=c[12])&&p(s,"for",a)},d(c){c&&(k(e),k(i),k(s)),u=!1,$e(f)}}}function DM(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y;return s=new po({props:{single:!0,$$slots:{header:[mM],default:[dM]},$$scope:{ctx:n}}}),o=new po({props:{single:!0,$$slots:{header:[wM],default:[vM]},$$scope:{ctx:n}}}),a=new po({props:{single:!0,$$slots:{header:[MM],default:[TM]},$$scope:{ctx:n}}}),g=new me({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[OM,({uniqueId:S})=>({12:S}),({uniqueId:S})=>S?4096:0]},$$scope:{ctx:n}}}),_=new me({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[EM,({uniqueId:S})=>({12:S}),({uniqueId:S})=>S?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("h4"),e.textContent="Auth methods",t=E(),i=v("div"),z(s.$$.fragment),l=E(),z(o.$$.fragment),r=E(),z(a.$$.fragment),u=E(),f=v("hr"),c=E(),d=v("h4"),d.textContent="General",h=E(),z(g.$$.fragment),m=E(),z(_.$$.fragment),p(e,"class","section-title"),p(i,"class","accordions"),p(d,"class","section-title")},m(S,C){w(S,e,C),w(S,t,C),w(S,i,C),H(s,i,null),b(i,l),H(o,i,null),b(i,r),H(a,i,null),w(S,u,C),w(S,f,C),w(S,c,C),w(S,d,C),w(S,h,C),H(g,S,C),w(S,m,C),H(_,S,C),y=!0},p(S,[C]){const T={};C&8201&&(T.$$scope={dirty:C,ctx:S}),s.$set(T);const $={};C&8197&&($.$$scope={dirty:C,ctx:S}),o.$set($);const O={};C&8195&&(O.$$scope={dirty:C,ctx:S}),a.$set(O);const M={};C&12289&&(M.$$scope={dirty:C,ctx:S}),g.$set(M);const D={};C&12289&&(D.$$scope={dirty:C,ctx:S}),_.$set(D)},i(S){y||(A(s.$$.fragment,S),A(o.$$.fragment,S),A(a.$$.fragment,S),A(g.$$.fragment,S),A(_.$$.fragment,S),y=!0)},o(S){I(s.$$.fragment,S),I(o.$$.fragment,S),I(a.$$.fragment,S),I(g.$$.fragment,S),I(_.$$.fragment,S),y=!1},d(S){S&&(k(e),k(t),k(i),k(u),k(f),k(c),k(d),k(h),k(m)),V(s),V(o),V(a),V(g,S),V(_,S)}}}function AM(n,e,t){let i,s,l,o;Ge(n,Mi,m=>t(4,o=m));let{collection:r}=e;function a(){r.options.allowUsernameAuth=this.checked,t(0,r)}function u(){r.options.allowEmailAuth=this.checked,t(0,r)}function f(m){n.$$.not_equal(r.options.exceptEmailDomains,m)&&(r.options.exceptEmailDomains=m,t(0,r))}function c(m){n.$$.not_equal(r.options.onlyEmailDomains,m)&&(r.options.onlyEmailDomains=m,t(0,r))}function d(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function h(){r.options.minPasswordLength=yt(this.value),t(0,r)}function g(){r.options.requireEmail=this.checked,t(0,r)}return n.$$set=m=>{"collection"in m&&t(0,r=m.collection)},n.$$.update=()=>{var m,_,y,S;n.$$.dirty&1&&r.type==="auth"&&j.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!j.isEmpty((m=o==null?void 0:o.options)==null?void 0:m.allowEmailAuth)||!j.isEmpty((_=o==null?void 0:o.options)==null?void 0:_.onlyEmailDomains)||!j.isEmpty((y=o==null?void 0:o.options)==null?void 0:y.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!j.isEmpty((S=o==null?void 0:o.options)==null?void 0:S.allowOAuth2Auth))},t(3,i=!1),[r,l,s,i,o,a,u,f,c,d,h,g]}class IM extends ve{constructor(e){super(),be(this,e,AM,DM,ge,{collection:0})}}function Xd(n,e,t){const i=n.slice();return i[18]=e[t],i}function Qd(n,e,t){const i=n.slice();return i[18]=e[t],i}function xd(n,e,t){const i=n.slice();return i[18]=e[t],i}function ep(n){let e;return{c(){e=v("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function tp(n){let e,t,i,s,l=n[3]&&np(n),o=!n[4]&&ip(n);return{c(){e=v("h6"),e.textContent="Changes:",t=E(),i=v("ul"),l&&l.c(),s=E(),o&&o.c(),p(i,"class","changes-list svelte-xqpcsf")},m(r,a){w(r,e,a),w(r,t,a),w(r,i,a),l&&l.m(i,null),b(i,s),o&&o.m(i,null)},p(r,a){r[3]?l?l.p(r,a):(l=np(r),l.c(),l.m(i,s)):l&&(l.d(1),l=null),r[4]?o&&(o.d(1),o=null):o?o.p(r,a):(o=ip(r),o.c(),o.m(i,null))},d(r){r&&(k(e),k(t),k(i)),l&&l.d(),o&&o.d()}}}function np(n)
`),s=v("strong"),o=W(l),r=E(),a=v("i"),u=E(),f=v("strong"),d=W(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex"),p(e,"class","svelte-xqpcsf")},m(m,_){w(m,e,_),b(e,t),b(t,i),b(t,s),b(s,o),b(t,r),b(t,a),b(t,u),b(t,f),b(f,d)},p(m,_){var y,S;_&2&&l!==(l=((y=m[1])==null?void 0:y.name)+"")&&le(o,l),_&4&&c!==(c=((S=m[2])==null?void 0:S.name)+"")&&le(d,c)},d(m){m&&k(e)}}}function ip(n){let e,t,i,s=pe(n[6]),l=[];for(let f=0;f<s.length;f+=1)l[f]=sp(xd(n,s,f));let o=pe(n[8]),r=[];for(let f=0;f<o.length;f+=1)r[f]=lp(Qd(n,o,f));let a=pe(n[7]),u=[];for(let f=0;f<a.length;f+=1)u[f]=op(Xd(n,a,f));return{c(){for(let f=0;f<l.length;f+=1)l[f].c();e=E();for(let f=0;f<r.length;f+=1)r[f].c();t=E();for(let f=0;f<u.length;f+=1)u[f].c();i=ye()},m(f,c){for(let d=0;d<l.length;d+=1)l[d]&&l[d].m(f,c);w(f,e,c);for(let d=0;d<r.length;d+=1)r[d]&&r[d].m(f,c);w(f,t,c);for(let d=0;d<u.length;d+=1)u[d]&&u[d].m(f,c);w(f,i,c)},p(f,c){if(c&64){s=pe(f[6]);let d;for(d=0;d<s.length;d+=1){const h=xd(f,s,d);l[d]?l[d].p(h,c):(l[d]=sp(h),l[d].c(),l[d].m(e.parentNode,e))}for(;d<l.length;d+=1)l[d].d(1);l.length=s.length}if(c&256){o=pe(f[8]);let d;for(d=0;d<o.length;d+=1){const h=Qd(f,o,d);r[d]?r[d].p(h,c):(r[d]=lp(h),r[d].c(),r[d].m(t.parentNode,t))}for(;d<r.length;d+=1)r[d].d(1);r.length=o.length}if(c&128){a=pe(f[7]);let d;for(d=0;d<a.length;d+=1){const h=Xd(f,a,d);u[d]?u[d].p(h,c):(u[d]=op(h),u[d].c(),u[d].m(i.parentNode,i))}for(;d<u.length;d+=1)u[d].d(1);u.length=a.length}},d(f){f&&(k(e),k(t),k(i)),vt(l,f),vt(r,f),vt(u,f)}}}function sp(n){let e,t,i,s=n[18].name+"",l,o,r;return{c(){e=v("li"),t=W(`Multiple to single value conversion of field
`),i=v("strong"),l=W(s),o=E(),r=v("em"),r.textContent="(will keep only the last array item)",p(r,"class","txt-sm"),p(e,"class","svelte-xqpcsf")},m(a,u){w(a,e,u),b(e,t),b(e,i),b(i,l),b(e,o),b(e,r)},p(a,u){u&64&&s!==(s=a[18].name+"")&&le(l,s)},d(a){a&&k(e)}}}function lp(n){let e,t,i,s,l=n[18].originalName+"",o,r,a,u,f,c=n[18].name+"",d;return{c(){e=v("li"),t=v("div"),i=W(`Renamed field
`),s=v("strong"),o=W(l),r=E(),a=v("i"),u=E(),f=v("strong"),d=W(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex"),p(e,"class","svelte-xqpcsf")},m(h,g){w(h,e,g),b(e,t),b(t,i),b(t,s),b(s,o),b(t,r),b(t,a),b(t,u),b(t,f),b(f,d)},p(h,g){g&256&&l!==(l=h[18].originalName+"")&&le(o,l),g&256&&c!==(c=h[18].name+"")&&le(d,c)},d(h){h&&k(e)}}}function op(n){let e,t,i,s=n[18].name+"",l,o;return{c(){e=v("li"),t=W("Removed field "),i=v("span"),l=W(s),o=E(),p(i,"class","txt-bold"),p(e,"class","txt-danger svelte-xqpcsf")},m(r,a){w(r,e,a),b(e,t),b(e,i),b(i,l),b(e,o)},p(r,a){a&128&&s!==(s=r[18].name+"")&&le(l,s)},d(r){r&&k(e)}}}function LM(n){let e,t,i,s,l,o,r,a,u=n[7].length&&ep(),f=n[9]&&tp(n);return{c(){e=v("div"),t=v("div"),t.innerHTML='<i class="ri-error-warning-line"></i>',i=E(),s=v("div"),l=v("p"),l.textContent=`If any of the collection changes is part of another collection rule, filter or view query,
you'll have to update it manually!`,o=E(),u&&u.c(),r=E(),f&&f.c(),a=ye(),p(t,"class","icon"),p(s,"class","content txt-bold"),p(e,"class","alert alert-warning")},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),b(s,l),b(s,o),u&&u.m(s,null),w(c,r,d),f&&f.m(c,d),w(c,a,d)},p(c,d){c[7].length?u||(u=ep(),u.c(),u.m(s,null)):u&&(u.d(1),u=null),c[9]?f?f.p(c,d):(f=tp(c),f.c(),f.m(a.parentNode,a)):f&&(f.d(1),f=null)},d(c){c&&(k(e),k(r),k(a)),u&&u.d(),f&&f.d(c)}}}function PM(n){let e;return{c(){e=v("h4"),e.textContent="Confirm collection changes"},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function NM(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='<span class="txt">Cancel</span>',t=E(),i=v("button"),i.innerHTML='<span class="txt">Confirm</span>',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),e.focus(),s||(l=[Y(e,"click",n[12]),Y(i,"click",n[13])],s=!0)},p:x,d(o){o&&(k(e),k(t),k(i)),s=!1,$e(l)}}}function FM(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[NM],header:[PM],default:[LM]},$$scope:{ctx:n}};return e=new on({props:i}),n[14](e),e.$on("hide",n[15]),e.$on("show",n[16]),{c(){z(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&33555422&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[14](null),V(e,s)}}}function RM(n,e,t){let i,s,l,o,r,a;const u=dt();let f,c,d;async function h($,O){t(1,c=$),t(2,d=O),await sn(),i||l.length||o.length||r.length?f==null||f.show():m()}function g(){f==null||f.hide()}function m(){g(),u("confirm")}const _=()=>g(),y=()=>m();function S($){te[$?"unshift":"push"](()=>{f=$,t(5,f)})}function C($){Fe.call(this,n,$)}function T($){Fe.call(this,n,$)}return n.$$.update=()=>{var $,O,M;n.$$.dirty&6&&t(3,i=(c==null?void 0:c.name)!=(d==null?void 0:d.name)),n.$$.dirty&4&&t(4,s=(d==null?void 0:d.type)==="view"),n.$$.dirty&4&&t(8,l=(($=d==null?void 0:d.schema)==null?void 0:$.filter(D=>D.id&&!D.toDelete&&D.originalName!=D.name))||[]),n.$$.dirty&4&&t(7,o=((O=d==null?void 0:d.schema)==null?void 0:O.filter(D=>D.id&&D.toDelete))||[]),n.$$.dirty&6&&t(6,r=((M=d==null?void 0:d.schema)==null?void 0:M.filter(D=>{var N,P,F;const L=(N=c==null?void 0:c.schema)==null?void 0:N.find(R=>R.id==D.id);return L?((P=L.options)==null?void 0:P.maxSelect)!=1&&((F=D.options)==null?void 0:F.maxSelect)==1:!1}))||[]),n.$$.dirty&24&&t(9,a=!s||i)},[g,c,d,i,s,f,r,o,l,a,m,h,_,y,S,C,T]}class qM extends ve{constructor(e){super(),be(this,e,RM,FM,ge,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function rp(n,e,t){const i=n.slice();return i[49]=e[t][0],i[50]=e[t][1],i}function jM(n){let e,t,i;function s(o){n[35](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new z$({props:l}),te.push(()=>he(e,"collection",s)),{c(){z(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function HM(n){let e,t,i;function s(o){n[34](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new rM({props:l}),te.push(()=>he(e,"collection",s)),{c(){z(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function ap(n){let e,t,i,s;function l(r){n[36](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new tM({props:o}),te.push(()=>he(t,"collection",l)),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){w(r,e,a),H(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],_e(()=>i=!1)),t.$set(u)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){I(t.$$.fragment,r),s=!1},d(r){r&&k(e),V(t)}}}function up(n){let e,t,i,s;function l(r){n[37](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new IM({props:o}),te.push(()=>he(t,"collection",l)),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","tab-item"),Q(e,"active",n[3]===Ls)},m(r
`),position:"left"})),i=!0)},p(l,[o]){t&&Et(t.update)&&o&1&&t.update.call(null,{text:l[0].join(`
`),position:"left"})},i:x,o:x,d(l){l&&k(e),i=!1,s()}}}const Rp="yyyy-MM-dd HH:mm:ss.SSS";function p6(n,e,t){let{model:i}=e,s=[];function l(){t(0,s=[]),i.created&&s.push("Created: "+j.formatToLocalDate(i.created,Rp)+" Local"),i.updated&&s.push("Updated: "+j.formatToLocalDate(i.updated,Rp)+" Local")}return n.$$set=o=>{"model"in o&&t(1,i=o.model)},n.$$.update=()=>{n.$$.dirty&2&&i&&l()},[s,i]}class V1 extends ve{constructor(e){super(),be(this,e,p6,d6,ge,{model:1})}}function h6(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class",t=n[2]?n[1]:n[0]),p(e,"aria-label","Copy")},m(o,r){w(o,e,r),s||(l=[Te(i=Be.call(null,e,n[2]?"":"Copy")),Y(e,"click",Sn(n[3]))],s=!0)},p(o,[r]){r&7&&t!==(t=o[2]?o[1]:o[0])&&p(e,"class",t),i&&Et(i.update)&&r&4&&i.update.call(null,o[2]?"":"Copy")},i:x,o:x,d(o){o&&k(e),s=!1,$e(l)}}}function m6(n,e,t){let{value:i=""}=e,{idleClasses:s="ri-file-copy-line txt-sm link-hint"}=e,{successClasses:l="ri-check-line txt-sm txt-success"}=e,{successDuration:o=500}=e,r;function a(){i&&(j.copyToClipboard(i),clearTimeout(r),t(2,r=setTimeout(()=>{clearTimeout(r),t(2,r=null)},o)))}return Kt(()=>()=>{r&&clearTimeout(r)}),n.$$set=u=>{"value"in u&&t(4,i=u.value),"idleClasses"in u&&t(0,s=u.idleClasses),"successClasses"in u&&t(1,l=u.successClasses),"successDuration"in u&&t(5,o=u.successDuration)},[s,l,r,a,i,o]}class Hs extends ve{constructor(e){super(),be(this,e,m6,h6,ge,{value:4,idleClasses:0,successClasses:1,successDuration:5})}}function g6(n){let e,t,i,s,l,o,r,a,u,f;return l=new Hs({props:{value:n[1]}}),{c(){e=v("div"),t=v("span"),i=W(n[1]),s=E(),z(l.$$.fragment),o=E(),r=v("i"),p(t,"class","secret svelte-1md8247"),p(r,"class","ri-refresh-line txt-sm link-hint"),p(r,"aria-label","Refresh"),p(e,"class","flex flex-gap-5 p-5")},m(c,d){w(c,e,d),b(e,t),b(t,i),n[6](t),b(e,s),H(l,e,null),b(e,o),b(e,r),a=!0,u||(f=[Te(Be.call(null,r,"Refresh")),Y(r,"click",n[4])],u=!0)},p(c,d){(!a||d&2)&&le(i,c[1]);const h={};d&2&&(h.value=c[1]),l.$set(h)},i(c){a||(A(l.$$.fragment,c),a=!0)},o(c){I(l.$$.fragment,c),a=!1},d(c){c&&k(e),n[6](null),V(l),u=!1,$e(f)}}}function _6(n){let e,t,i,s,l,o,r,a,u,f;function c(h){n[7](h)}let d={class:"dropdown dropdown-upside dropdown-center dropdown-nowrap",$$slots:{default:[g6]},$$scope:{ctx:n}};return n[3]!==void 0&&(d.active=n[3]),s=new Pn({props:d}),te.push(()=>he(s,"active",c)),s.$on("show",n[4]),{c(){e=v("button"),t=v("i"),i=E(),z(s.$$.fragment),p(t,"class","ri-sparkling-line"),p(e,"tabindex","-1"),p(e,"type","button"),p(e,"aria-label","Generate"),p(e,"class",o="btn btn-circle "+n[0]+" svelte-1md8247")},m(h,g){w(h,e,g),b(e,t),b(e,i),H(s,e,null),a=!0,u||(f=Te(r=Be.call(null,e,n[3]?"":"Generate")),u=!0)},p(h,[g]){const m={};g&518&&(m.$$scope={dirty:g,ctx:h}),!l&&g&8&&(l=!0,m.active=h[3],_e(()=>l=!1)),s.$set(m),(!a||g&1&&o!==(o="btn btn-circle "+h[0]+" svelte-1md8247"))&&p(e,"class",o),r&&Et(r.update)&&g&8&&r.update.call(null,h[3]?"":"Generate")},i(h){a||(A(s.$$.fragment,h),a=!0)},o(h){I(s.$$.fragment,h),a=!1},d(h){h&&k(e),V(s),u=!1,f()}}}function b6(n,e,t){const i=dt();let{class:s="btn-sm btn-hint btn-transparent"}=e,{length:l=32}=e,o="",r,a=!1;async function u(){if(t(1,o=j.randomSecret(l)),i("generate",o),await sn(),r){let d=document.createRange();d.selectNode(r),window.getSelection().removeAllRanges(),window.getSelection().addRange(d)}}function f(d){te[d?"unshift":"push"](()=>{r=d,t(2,r)})}function c(d){a=d,t(3,a)}return n.$$set=d=>{"class"in d&&t(0,s=d.class),"length"in d&&t(5,l=d.length)},[s,o,r,a,u,l,f,c]}class z1 extends ve{constructor(e){super(),be(this,e,b6,_6,ge,{class:0,length:5})}}function v6(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Username",o=E(),r=v("input"),p(t,"class",j.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"for",l=n[13]),p(r,"type","text"),p(r,"requried",a=!n[2]),p(r,"placeholder",u=n[2]?"Leave empty to auto generate...":n[4]),p(r,"id",f=n[13])},m(h,g){w(h,e,g),b(e,t),b(e,i),b(e,s),w(h,o,g),w(h,r,g),de(r,n[0].username),c||(d=Y(r,"input",n[5]),c=!0)},p(h,g){g&8192&&l!==(l=h[13])&&p(e,"for",l),g&4&&a!==(a=!h[2])&&p(r,"requried",a),g&4&
2023-09-01 09:22:49 +03:00
form-field form-field-list form-field-file
`+(n[4].required?"required":"")+`
`+(n[9]?"dragover":"")+`
`,name:n[4].name,$$slots:{default:[q5,({uniqueId:o})=>({28:o}),({uniqueId:o})=>[o?268435456:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","block")},m(o,r){w(o,e,r),H(t,e,null),i=!0,s||(l=[Y(e,"dragover",Ze(n[25])),Y(e,"dragleave",n[26]),Y(e,"drop",n[15])],s=!0)},p(o,r){const a={};r[0]&528&&(a.class=`
2023-09-01 09:22:49 +03:00
form-field form-field-list form-field-file
`+(o[4].required?"required":"")+`
`+(o[9]?"dragover":"")+`
`),r[0]&16&&(a.name=o[4].name),r[0]&268439039|r[1]&64&&(a.$$scope={dirty:r,ctx:o}),t.$set(a)},i(o){i||(A(t.$$.fragment,o),i=!0)},o(o){I(t.$$.fragment,o),i=!1},d(o){o&&k(e),V(t),s=!1,$e(l)}}}function H5(n,e,t){let i,s,l,{record:o}=e,{field:r}=e,{value:a=""}=e,{uploadedFiles:u=[]}=e,{deletedFileNames:f=[]}=e,c,d,h=!1,g="";function m(B){j.removeByValue(f,B),t(2,f)}function _(B){j.pushUnique(f,B),t(2,f)}function y(B){j.isEmpty(u[B])||u.splice(B,1),t(1,u)}function S(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:a,uploadedFiles:u,deletedFileNames:f},bubbles:!0}))}function C(B){var X,J;B.preventDefault(),t(9,h=!1);const G=((X=B.dataTransfer)==null?void 0:X.files)||[];if(!(l||!G.length)){for(const U of G){const oe=s.length+u.length-f.length;if(((J=r.options)==null?void 0:J.maxSelect)<=oe)break;u.push(U)}t(1,u)}}Kt(async()=>{t(10,g=await ce.getAdminFileToken(o.collectionId))});const T=B=>m(B),$=B=>_(B);function O(B){a=B,t(0,a),t(6,i),t(4,r)}const M=B=>y(B);function D(B){u=B,t(1,u)}function L(B){te[B?"unshift":"push"](()=>{c=B,t(7,c)})}const N=()=>{for(let B of c.files)u.push(B);t(1,u),t(7,c.value=null,c)},P=()=>c==null?void 0:c.click();function F(B){te[B?"unshift":"push"](()=>{d=B,t(8,d)})}const R=()=>{t(9,h=!0)},q=()=>{t(9,h=!1)};return n.$$set=B=>{"record"in B&&t(3,o=B.record),"field"in B&&t(4,r=B.field),"value"in B&&t(0,a=B.value),"uploadedFiles"in B&&t(1,u=B.uploadedFiles),"deletedFileNames"in B&&t(2,f=B.deletedFileNames)},n.$$.update=()=>{var B,G;n.$$.dirty[0]&2&&(Array.isArray(u)||t(1,u=j.toArray(u))),n.$$.dirty[0]&4&&(Array.isArray(f)||t(2,f=j.toArray(f))),n.$$.dirty[0]&16&&t(6,i=((B=r.options)==null?void 0:B.maxSelect)>1),n.$$.dirty[0]&65&&j.isEmpty(a)&&t(0,a=i?[]:""),n.$$.dirty[0]&1&&t(5,s=j.toArray(a)),n.$$.dirty[0]&54&&t(11,l=(s.length||u.length)&&((G=r.options)==null?void 0:G.maxSelect)<=s.length+u.length-f.length),n.$$.dirty[0]&6&&(u!==-1||f!==-1)&&S()},[a,u,f,o,r,s,i,c,d,h,g,l,m,_,y,C,T,$,O,M,D,L,N,P,F,R,q]}class V5 extends ve{constructor(e){super(),be(this,e,H5,j5,ge,{record:3,field:4,value:0,uploadedFiles:1,deletedFileNames:2},null,[-1,-1])}}function Gp(n){return typeof n=="function"?{threshold:100,callback:n}:n||{}}function z5(n,e){e=Gp(e),e!=null&&e.callback&&e.callback();function t(i){if(!(e!=null&&e.callback))return;i.target.scrollHeight-i.target.clientHeight-i.target.scrollTop<=e.threshold&&e.callback()}return n.addEventListener("scroll",t),n.addEventListener("resize",t),{update(i){e=Gp(i)},destroy(){n.removeEventListener("scroll",t),n.removeEventListener("resize",t)}}}function Zp(n,e,t){const i=n.slice();i[5]=e[t];const s=j.toArray(i[0][i[5]]).slice(0,5);return i[6]=s,i}function Xp(n,e,t){const i=n.slice();return i[9]=e[t],i}function Qp(n){let e,t;return e=new ru({props:{record:n[0],filename:n[9],size:"xs"}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&1&&(l.record=i[0]),s&5&&(l.filename=i[9]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function xp(n){let e=!j.isEmpty(n[9]),t,i,s=e&&Qp(n);return{c(){s&&s.c(),t=ye()},m(l,o){s&&s.m(l,o),w(l,t,o),i=!0},p(l,o){o&5&&(e=!j.isEmpty(l[9])),e?s?(s.p(l,o),o&5&&A(s,1)):(s=Qp(l),s.c(),A(s,1),s.m(t.parentNode,t)):s&&(re(),I(s,1,1,()=>{s=null}),ae())},i(l){i||(A(s),i=!0)},o(l){I(s),i=!1},d(l){l&&k(t),s&&s.d(l)}}}function eh(n){let e,t,i=pe(n[6]),s=[];for(let o=0;o<i.length;o+=1)s[o]=xp(Xp(n,i,o));const l=o=>I(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o<s.length;o+=1)s[o].c();e=ye()},m(o,r){for(let a=0;a<s.length;a+=1)s[a]&&s[a].m(o,r);w(o,e,r),t=!0},p(o,r){if(r&5){i=pe(o[6]);let a;for(a=0;a<i.length;a+=1){const u=Xp(o,i,a);s[a]?(s[a].p(u,r),A(s[a],1)):(s[a]=xp(u),s[a].c(),A(s[a],1),s[a].m(e.parentNode,e))}for(re(),a=i.length;a<s.length;a+=1)l(a);ae()}},i(o){if(!t){for(let r=0;r<i.length;r+=1)A(s[r]);t=!0}},o(o){s=s.filter(Boolean);for(let r=0;r<s.length;r+=1)I(s[r]);t=!1},d(o){o&&k(e),vt(s,o)}}}function B5(n){let e,t,i,s,l,o,r=j.truncate(j.displayValue(n[0],n[1]),70)+"",a,u,f,c,d=pe(n[2]),h=[];for(let m=0;m<d.length;m+=1)h[m]=eh(Zp(n,d,m));const g=m=>I(h[m],1,1,()=>{h[m
`),L&&L.c(),h=E(),m.c(),_=ye(),p(e,"class","flex m-b-base flex-gap-10"),p(l,"class","list picker-list m-b-base svelte-1u8jhky"),p(c,"class","section-title")},m(R,q){w(R,e,q),H(t,e,null),b(e,i),T&&T.m(e,null),w(R,s,q),w(R,l,q);for(let B=0;B<o.length;B+=1)o[B]&&o[B].m(l,null);M&&M.m(l,null),b(l,a),D&&D.m(l,null),w(R,f,q),w(R,c,q),b(c,d),L&&L.m(c,null),w(R,h,q),P[g].m(R,q),w(R,_,q),y=!0,S||(C=Te(u=z5.call(null,l,n[36])),S=!0)},p(R,q){const B={};q[0]&4&&(B.value=R[2]),q[0]&32&&(B.autocompleteCollection=R[5]),t.$set(B),R[11]?T&&(T.d(1),T=null):T?T.p(R,q):(T=ih(R),T.c(),T.m(e,null)),q[0]&143252&&($=pe(R[8]),re(),o=gt(o,q,O,1,R,$,r,l,Rt,ah,a,nh),ae(),!$.length&&M?M.p(R,q):$.length?M&&(M.d(1),M=null):(M=sh(R),M.c(),M.m(l,a))),R[13]?D||(D=uh(),D.c(),D.m(l,null)):D&&(D.d(1),D=null),u&&Et(u.update)&&q[0]&4104&&u.update.call(null,R[36]),R[4]>1?L?L.p(R,q):(L=fh(R),L.c(),L.m(c,null)):L&&(L.d(1),L=null);let G=g;g=F(R),g===G?P[g].p(R,q):(re(),I(P[G],1,1,()=>{P[G]=null}),ae(),m=P[g],m?m.p(R,q):(m=P[g]=N[g](R),m.c()),A(m,1),m.m(_.parentNode,_))},i(R){if(!y){A(t.$$.fragment,R);for(let q=0;q<$.length;q+=1)A(o[q]);A(m),y=!0}},o(R){I(t.$$.fragment,R);for(let q=0;q<o.length;q+=1)I(o[q]);I(m),y=!1},d(R){R&&(k(e),k(s),k(l),k(f),k(c),k(h),k(_)),V(t),T&&T.d();for(let q=0;q<o.length;q+=1)o[q].d();M&&M.d(),D&&D.d(),L&&L.d(),P[g].d(R),S=!1,C()}}}function X5(n){var r;let e,t,i,s=(((r=n[5])==null?void 0:r.name)||"")+"",l,o;return{c(){e=v("h4"),t=W("Select "),i=v("strong"),l=W(s),o=W(" records")},m(a,u){w(a,e,u),b(e,t),b(e,i),b(i,l),b(e,o)},p(a,u){var f;u[0]&32&&s!==(s=(((f=a[5])==null?void 0:f.name)||"")+"")&&le(l,s)},d(a){a&&k(e)}}}function Q5(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='<span class="txt">Cancel</span>',t=E(),i=v("button"),i.innerHTML='<span class="txt">Set selection</span>',p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),s||(l=[Y(e,"click",n[28]),Y(i,"click",n[29])],s=!0)},p:x,d(o){o&&(k(e),k(t),k(i)),s=!1,$e(l)}}}function x5(n){let e,t,i,s;const l=[{popup:!0},{class:"overlay-panel-xl"},n[19]];let o={$$slots:{footer:[Q5],header:[X5],default:[Z5]},$$scope:{ctx:n}};for(let a=0;a<l.length;a+=1)o=je(o,l[a]);e=new on({props:o}),n[39](e),e.$on("hide",n[40]),e.$on("show",n[41]);let r={collection:n[5]};return i=new uu({props:r}),n[42](i),i.$on("save",n[43]),i.$on("delete",n[44]),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(a,u){H(e,a,u),w(a,t,u),H(i,a,u),s=!0},p(a,u){const f=u[0]&524288?_t(l,[l[0],l[1],Dt(a[19])]):{};u[0]&16380|u[1]&33554432&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const c={};u[0]&32&&(c.collection=a[5]),i.$set(c)},i(a){s||(A(e.$$.fragment,a),A(i.$$.fragment,a),s=!0)},o(a){I(e.$$.fragment,a),I(i.$$.fragment,a),s=!1},d(a){a&&k(t),n[39](null),V(e,a),n[42](null),V(i,a)}}}const lo=50;function eO(n,e,t){let i,s,l,o,r,a,u,f;const c=["value","field","show","hide"];let d=tt(e,c),h;Ge(n,Zn,Ce=>t(26,h=Ce));const g=dt(),m="picker_"+j.randomString(5);let{value:_}=e,{field:y}=e,S,C,T="",$=[],O=[],M=1,D=0,L=!1,N=!1;function P(){return t(2,T=""),t(8,$=[]),t(6,O=[]),R(),q(!0),S==null?void 0:S.show()}function F(){return S==null?void 0:S.hide()}async function R(){const Ce=j.toArray(_);if(!s||!Ce.length)return;t(24,N=!0);let pt=[];const qt=Ce.slice(),fn=[];for(;qt.length>0;){const nn=[];for(const rn of qt.splice(0,lo))nn.push(`id="${rn}"`);fn.push(ce.collection(s).getFullList({batch:lo,filter:nn.join("||"),fields:"*:excerpt(200)",requestKey:null}))}try{await Promise.all(fn).then(nn=>{pt=pt.concat(...nn)}),t(6,O=[]);for(const nn of Ce){const rn=j.findByKey(pt,"id",nn);rn&&O.push(rn)}T.trim()||t(8,$=j.filterDuplicatesByKey(O.concat($))),t(24,N=!1)}catch(nn){nn.isAbort||(ce.error(nn),t(24,N=!1))}}async function q(Ce=!1){if(s){t(3,L=!0),Ce&&(T.trim()?t(8,$=[]):t(8,$=j.toArray(O).slice()));try{const pt=Ce?1:M+1,qt=j.getAllCollectionIdentifiers(l),fn=await ce.collection(s).getList(pt,lo,{filter:j.normalizeSearchFilter(T,qt),sort:o?"":"-created",fields:"*:excerpt(200)",skipTotal:1,requestKey:m+"loadList"});t(8,$=j.filterDuplicatesByKey($.concat(fn.i
(record: `+n[44].id+")")),Y(e,"click",Ze(function(){Et(n[20](n[44],n[48]))&&n[20](n[44],n[48]).apply(this,arguments)}))],l=!0)},p(f,c){n=f,a===(a=r(n,c))&&u?u.p(n,c):(u.d(1),u=a(n),u&&(u.c(),u.m(e,i))),s&&Et(s.update)&&c[0]&32&&s.update.call(null,n[48]+`
(record: `+n[44].id+")"),c[0]&589856&&Q(e,"thumb-warning",n[16](n[44],n[48]))},d(f){f&&k(e),u.d(),l=!1,$e(o)}}}function $h(n,e){let t,i,s=pe(e[45]),l=[];for(let o=0;o<s.length;o+=1)l[o]=Ch(kh(e,s,o));return{key:n,first:null,c(){t=ye();for(let o=0;o<l.length;o+=1)l[o].c();i=ye(),this.first=t},m(o,r){w(o,t,r);for(let a=0;a<l.length;a+=1)l[a]&&l[a].m(o,r);w(o,i,r)},p(o,r){if(e=o,r[0]&1638432){s=pe(e[45]);let a;for(a=0;a<s.length;a+=1){const u=kh(e,s,a);l[a]?l[a].p(u,r):(l[a]=Ch(u),l[a].c(),l[a].m(i.parentNode,i))}for(;a<l.length;a+=1)l[a].d(1);l.length=s.length}},d(o){o&&(k(t),k(i)),vt(l,o)}}}function Mh(n){let e;return{c(){e=v("div"),e.innerHTML='<span class="loader loader-sm active"></span>',p(e,"class","block txt-center")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function kO(n){let e,t;function i(r,a){if(r[15])return bO;if(!r[6])return _O}let s=i(n),l=s&&s(n),o=n[6]&&Mh();return{c(){l&&l.c(),e=E(),o&&o.c(),t=ye()},m(r,a){l&&l.m(r,a),w(r,e,a),o&&o.m(r,a),w(r,t,a)},p(r,a){s===(s=i(r))&&l?l.p(r,a):(l&&l.d(1),l=s&&s(r),l&&(l.c(),l.m(e.parentNode,e))),r[6]?o||(o=Mh(),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},d(r){r&&(k(e),k(t)),l&&l.d(r),o&&o.d(r)}}}function wO(n){let e,t,i,s;const l=[gO,mO],o=[];function r(a,u){return a[7].length?1:0}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ye()},m(a,u){o[e].m(a,u),w(a,i,u),s=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),I(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){I(t),s=!1},d(a){a&&k(i),o[e].d(a)}}}function SO(n){let e,t;return{c(){e=v("h4"),t=W(n[0])},m(i,s){w(i,e,s),b(e,t)},p(i,s){s[0]&1&&le(t,i[0])},d(i){i&&k(e)}}}function Oh(n){let e,t;return e=new me({props:{class:"form-field file-picker-size-select",$$slots:{default:[TO,({uniqueId:i})=>({23:i}),({uniqueId:i})=>[i?8388608:0]]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s[0]&8402944|s[1]&8388608&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function TO(n){let e,t,i;function s(o){n[28](o)}let l={upside:!0,id:n[23],items:n[11],disabled:!n[13],selectPlaceholder:"Select size"};return n[12]!==void 0&&(l.keyOfSelected=n[12]),e=new Ei({props:l}),te.push(()=>he(e,"keyOfSelected",s)),{c(){z(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r[0]&8388608&&(a.id=o[23]),r[0]&2048&&(a.items=o[11]),r[0]&8192&&(a.disabled=!o[13]),!t&&r[0]&4096&&(t=!0,a.keyOfSelected=o[12],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function CO(n){var g;let e,t,i,s=j.hasImageExtension((g=n[9])==null?void 0:g.name),l,o,r,a,u,f,c,d,h=s&&Oh(n);return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=E(),h&&h.c(),l=E(),o=v("button"),r=v("span"),a=W(n[1]),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent m-r-auto"),e.disabled=n[6],p(r,"class","txt"),p(o,"type","button"),p(o,"class","btn btn-expanded"),o.disabled=u=!n[13]},m(m,_){w(m,e,_),b(e,t),w(m,i,_),h&&h.m(m,_),w(m,l,_),w(m,o,_),b(o,r),b(r,a),f=!0,c||(d=[Y(e,"click",n[2]),Y(o,"click",n[21])],c=!0)},p(m,_){var y;(!f||_[0]&64)&&(e.disabled=m[6]),_[0]&512&&(s=j.hasImageExtension((y=m[9])==null?void 0:y.name)),s?h?(h.p(m,_),_[0]&512&&A(h,1)):(h=Oh(m),h.c(),A(h,1),h.m(l.parentNode,l)):h&&(re(),I(h,1,1,()=>{h=null}),ae()),(!f||_[0]&2)&&le(a,m[1]),(!f||_[0]&8192&&u!==(u=!m[13]))&&(o.disabled=u)},i(m){f||(A(h),f=!0)},o(m){I(h),f=!1},d(m){m&&(k(e),k(i),k(l),k(o)),h&&h.d(m),c=!1,$e(d)}}}function $O(n){let e,t,i,s;const l=[{popup:!0},{class:"file-picker-popup"},n[22]];let o={$$slots:{footer:[CO],header:[SO],default:[wO]},$$scope:{ctx:n}};for(let a=0;a<l.length;a+=1)o=je(o,l[a]);e=new on({props:o}),n[33](e),e.$on("hide",n[34]),e.$on("show",n[35]);let r={collection:n[8]};return i=new uu({props:r}),n[36](i),i.$on("save",n[37]),i.$on("delete",n[38]),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(a,u){H(e,a,u),w(a,t,u),H(i,a,u),s=!0},p(a,u){const f=u[0]&4194304?_t(l,[l[0],l[1],Dt(a[22])]):{};u[0]&131059|u[1]&8388608&&(f.$$scope={dirty:u,ctx:a}),e.$
2023-09-01 09:22:49 +03:00
...
-----END PRIVATE KEY-----`),p(a,"class","help-block")},m(c,d){w(c,e,d),b(e,t),w(c,s,d),w(c,l,d),de(l,n[5]),w(c,r,d),w(c,a,d),u||(f=Y(l,"input",n[16]),u=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&p(e,"for",i),d&8388608&&o!==(o=c[23])&&p(l,"id",o),d&32&&de(l,c[5])},d(c){c&&(k(e),k(s),k(l),k(r),k(a)),u=!1,f()}}}function ZO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S;return s=new me({props:{class:"form-field required",name:"clientId",$$slots:{default:[WO,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),r=new me({props:{class:"form-field required",name:"teamId",$$slots:{default:[YO,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),f=new me({props:{class:"form-field required",name:"keyId",$$slots:{default:[KO,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),h=new me({props:{class:"form-field required",name:"duration",$$slots:{default:[JO,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),m=new me({props:{class:"form-field required",name:"privateKey",$$slots:{default:[GO,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),i=v("div"),z(s.$$.fragment),l=E(),o=v("div"),z(r.$$.fragment),a=E(),u=v("div"),z(f.$$.fragment),c=E(),d=v("div"),z(h.$$.fragment),g=E(),z(m.$$.fragment),p(i,"class","col-lg-6"),p(o,"class","col-lg-6"),p(u,"class","col-lg-6"),p(d,"class","col-lg-6"),p(t,"class","grid"),p(e,"id",n[9]),p(e,"autocomplete","off")},m(C,T){w(C,e,T),b(e,t),b(t,i),H(s,i,null),b(t,l),b(t,o),H(r,o,null),b(t,a),b(t,u),H(f,u,null),b(t,c),b(t,d),H(h,d,null),b(t,g),H(m,t,null),_=!0,y||(S=Y(e,"submit",Ze(n[17])),y=!0)},p(C,T){const $={};T&25165828&&($.$$scope={dirty:T,ctx:C}),s.$set($);const O={};T&25165832&&(O.$$scope={dirty:T,ctx:C}),r.$set(O);const M={};T&25165840&&(M.$$scope={dirty:T,ctx:C}),f.$set(M);const D={};T&25165888&&(D.$$scope={dirty:T,ctx:C}),h.$set(D);const L={};T&25165856&&(L.$$scope={dirty:T,ctx:C}),m.$set(L)},i(C){_||(A(s.$$.fragment,C),A(r.$$.fragment,C),A(f.$$.fragment,C),A(h.$$.fragment,C),A(m.$$.fragment,C),_=!0)},o(C){I(s.$$.fragment,C),I(r.$$.fragment,C),I(f.$$.fragment,C),I(h.$$.fragment,C),I(m.$$.fragment,C),_=!1},d(C){C&&k(e),V(s),V(r),V(f),V(h),V(m),y=!1,S()}}}function XO(n){let e;return{c(){e=v("h4"),e.textContent="Generate Apple client secret",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function QO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("button"),t=W("Close"),i=E(),s=v("button"),l=v("i"),o=E(),r=v("span"),r.textContent="Generate and set secret",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[7],p(l,"class","ri-key-line"),p(r,"class","txt"),p(s,"type","submit"),p(s,"form",n[9]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[8]||n[7],Q(s,"btn-loading",n[7])},m(c,d){w(c,e,d),b(e,t),w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=Y(e,"click",n[0]),u=!0)},p(c,d){d&128&&(e.disabled=c[7]),d&384&&a!==(a=!c[8]||c[7])&&(s.disabled=a),d&128&&Q(s,"btn-loading",c[7])},d(c){c&&(k(e),k(i),k(s)),u=!1,f()}}}function xO(n){let e,t,i={overlayClose:!n[7],escClose:!n[7],beforeHide:n[18],popup:!0,$$slots:{footer:[QO],header:[XO],default:[ZO]},$$scope:{ctx:n}};return e=new on({props:i}),n[19](e),e.$on("show",n[20]),e.$on("hide",n[21]),{c(){z(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&128&&(o.overlayClose=!s[7]),l&128&&(o.escClose=!s[7]),l&128&&(o.beforeHide=s[18]),l&16777724&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[19](null),V(e,s)}}}const ho=15777e3;function eE(n,e,t){let i;const s=dt(),l="apple_secret_"+j.randomString(5);let o,r,a,u,f,c,d=!1;function h(N={}){t(2,r=N.clientId||""),t(3,a=N.teamId||""),t(4,u=N.keyId||""),t(5,f=N.privateKey||""),t(6,c=N.duration||ho),ln({}),o==null||o.show()}function g(){return o==null?void 0:o.hide()}async function m(){t(7,d=!0);try{const N=await ce.settings.generateAppleClientSecret(r,a,u,f.trim(),c);t(7,d=!1),zt("Successfully generated client secret."),s("submit",N),o==null||o.hide()}catch(N){ce.error(N)}t(7,d=!1)}function _(){r=t
`),r=v("button"),r.textContent="Restore draft",a=E(),u=v("button"),u.innerHTML='<i class="ri-close-line"></i>',f=E(),c=v("div"),p(i,"class","icon"),p(r,"type","button"),p(r,"class","btn btn-sm btn-secondary"),p(l,"class","flex flex-gap-xs"),p(u,"type","button"),p(u,"class","close"),p(u,"aria-label","Discard draft"),p(t,"class","alert alert-info m-0"),p(c,"class","clearfix p-b-base"),p(e,"class","block")},m(_,y){w(_,e,y),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),b(l,r),b(t,a),b(t,u),b(e,f),b(e,c),h=!0,g||(m=[Y(r,"click",n[38]),Te(Be.call(null,u,"Discard draft")),Y(u,"click",Ze(n[39]))],g=!0)},p:x,i(_){h||(d&&d.end(1),h=!0)},o(_){_&&(d=ya(e,lt,{duration:150})),h=!1},d(_){_&&k(e),_&&d&&d.end(),g=!1,$e(m)}}}function Ph(n){let e,t,i;return t=new V1({props:{model:n[3]}}),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","form-field-addon")},m(s,l){w(s,e,l),H(t,e,null),i=!0},p(s,l){const o={};l[0]&8&&(o.model=s[3]),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&k(e),V(t)}}}function cE(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y=!n[6]&&Ph(n);return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="id",l=E(),o=v("span"),a=E(),y&&y.c(),u=E(),f=v("input"),p(t,"class",ii(j.getFieldTypeIcon("primary"))+" svelte-qc5ngu"),p(s,"class","txt"),p(o,"class","flex-fill"),p(e,"for",r=n[72]),p(f,"type","text"),p(f,"id",c=n[72]),p(f,"placeholder",d=n[7]?"":"Leave empty to auto generate..."),p(f,"minlength","15"),f.readOnly=h=!n[6]},m(S,C){w(S,e,C),b(e,t),b(e,i),b(e,s),b(e,l),b(e,o),w(S,a,C),y&&y.m(S,C),w(S,u,C),w(S,f,C),de(f,n[3].id),g=!0,m||(_=Y(f,"input",n[40]),m=!0)},p(S,C){(!g||C[2]&1024&&r!==(r=S[72]))&&p(e,"for",r),S[6]?y&&(re(),I(y,1,1,()=>{y=null}),ae()):y?(y.p(S,C),C[0]&64&&A(y,1)):(y=Ph(S),y.c(),A(y,1),y.m(u.parentNode,u)),(!g||C[2]&1024&&c!==(c=S[72]))&&p(f,"id",c),(!g||C[0]&128&&d!==(d=S[7]?"":"Leave empty to auto generate..."))&&p(f,"placeholder",d),(!g||C[0]&64&&h!==(h=!S[6]))&&(f.readOnly=h),C[0]&8&&f.value!==S[3].id&&de(f,S[3].id)},i(S){g||(A(y),g=!0)},o(S){I(y),g=!1},d(S){S&&(k(e),k(a),k(u),k(f)),y&&y.d(S),m=!1,_()}}}function Nh(n){var u,f;let e,t,i,s,l;function o(c){n[41](c)}let r={isNew:n[6],collection:n[0]};n[3]!==void 0&&(r.record=n[3]),e=new M6({props:r}),te.push(()=>he(e,"record",o));let a=((f=(u=n[0])==null?void 0:u.schema)==null?void 0:f.length)&&Fh();return{c(){z(e.$$.fragment),i=E(),a&&a.c(),s=ye()},m(c,d){H(e,c,d),w(c,i,d),a&&a.m(c,d),w(c,s,d),l=!0},p(c,d){var g,m;const h={};d[0]&64&&(h.isNew=c[6]),d[0]&1&&(h.collection=c[0]),!t&&d[0]&8&&(t=!0,h.record=c[3],_e(()=>t=!1)),e.$set(h),(m=(g=c[0])==null?void 0:g.schema)!=null&&m.length?a||(a=Fh(),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(c){l||(A(e.$$.fragment,c),l=!0)},o(c){I(e.$$.fragment,c),l=!1},d(c){c&&(k(i),k(s)),V(e,c),a&&a.d(c)}}}function Fh(n){let e;return{c(){e=v("hr")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function dE(n){let e,t,i;function s(o){n[54](o,n[69])}let l={field:n[69]};return n[3][n[69].name]!==void 0&&(l.value=n[3][n[69].name]),e=new oO({props:l}),te.push(()=>he(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[69]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[69].name],_e(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function pE(n){let e,t,i,s,l;function o(f){n[51](f,n[69])}function r(f){n[52](f,n[69])}function a(f){n[53](f,n[69])}let u={field:n[69],record:n[3]};return n[3][n[69].name]!==void 0&&(u.value=n[3][n[69].name]),n[4][n[69].name]!==void 0&&(u.uploadedFiles=n[4][n[69].name]),n[5][n[69].name]!==void 0&&(u.deletedFileNames=n[5][n[69].name]),e=new V5({props:u}),te.push(()=>he(e,"value",o)),te.push(()=>he(e,"uploadedFiles",r)),te.push(()=>he(e,"deletedFileNames",a)),{c(){z(e.$$.fragment)},m(f,c){H(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[69]),c[0]&8&&(d.record=n[3]),!t&&c[0]&9&&(t=!0,d.value=n[3][n[69].name],_e(()=>t=!1)),!i&&c[0]&17&&(i=!0,d.uploadedFiles=n[4][n[69].name],_e(()=>i=!1)),!s&&c[0]&33&&(s=!0,d.deletedFileNames=n[5][n[69].name],_e(()=>s=!1)),e.$set(d)},i(f){l||(A(e.$$.
2023-09-01 09:22:49 +03:00
record-panel
`+(n[16]?"overlay-panel-xl":"overlay-panel-lg")+`
`+(n[14]&&!n[6]?"colored-header":"")+`
`,btnClose:!n[7],escClose:!n[7],overlayClose:!n[7],beforeHide:n[55],$$slots:{footer:[OE],header:[ME],default:[SE]},$$scope:{ctx:n}};return e=new on({props:i}),n[56](e),e.$on("hide",n[57]),e.$on("show",n[58]),{c(){z(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,l){const o={};l[0]&81984&&(o.class=`
2023-09-01 09:22:49 +03:00
record-panel
`+(s[16]?"overlay-panel-xl":"overlay-panel-lg")+`
`+(s[14]&&!s[6]?"colored-header":"")+`
`),l[0]&128&&(o.btnClose=!s[7]),l[0]&128&&(o.escClose=!s[7]),l[0]&128&&(o.overlayClose=!s[7]),l[0]&4352&&(o.beforeHide=s[55]),l[0]&60925|l[2]&2048&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[56](null),V(e,s)}}}const rs="form",Sl="providers";function DE(n,e,t){let i,s,l,o,r;const a=dt(),u="record_"+j.randomString(5);let{collection:f}=e,c,d=null,h=null,g=null,m=!1,_=!1,y={},S={},C=JSON.stringify(d),T=C,$=rs,O=!0,M=!0;function D(ue){return F(ue),t(12,_=!0),t(13,$=rs),c==null?void 0:c.show()}function L(){return c==null?void 0:c.hide()}function N(){t(12,_=!1),L()}async function P(ue){if(ue&&typeof ue=="string"){try{return await ce.collection(f.id).getOne(ue)}catch(De){De.isAbort||(N(),console.warn("resolveModel:",De),Ci(`Unable to load record with id "${ue}"`))}return null}return ue}async function F(ue){t(7,M=!0),ln({}),t(4,y={}),t(5,S={}),t(2,d=typeof ue=="string"?{id:ue,collectionId:f==null?void 0:f.id,collectionName:f==null?void 0:f.name}:ue||{}),t(3,h=structuredClone(d)),t(2,d=await P(ue)||{}),t(3,h=structuredClone(d)),await sn(),t(10,g=B()),!g||J(h,g)?t(10,g=null):(delete g.password,delete g.passwordConfirm),t(28,C=JSON.stringify(h)),t(7,M=!1)}async function R(ue){var Xe,Jt;ln({}),t(2,d=ue||{}),t(4,y={}),t(5,S={});const De=((Jt=(Xe=f==null?void 0:f.schema)==null?void 0:Xe.filter(nt=>nt.type!="file"))==null?void 0:Jt.map(nt=>nt.name))||[];for(let nt in ue)De.includes(nt)||t(3,h[nt]=ue[nt],h);await sn(),t(28,C=JSON.stringify(h)),U()}function q(){return"record_draft_"+((f==null?void 0:f.id)||"")+"_"+((d==null?void 0:d.id)||"")}function B(ue){try{const De=window.localStorage.getItem(q());if(De)return JSON.parse(De)}catch{}return ue}function G(ue){try{window.localStorage.setItem(q(),ue)}catch(De){console.warn("updateDraft failure:",De),window.localStorage.removeItem(q())}}function X(){g&&(t(3,h=g),t(10,g=null))}function J(ue,De){var It;const Xe=structuredClone(ue||{}),Jt=structuredClone(De||{}),nt=(It=f==null?void 0:f.schema)==null?void 0:It.filter(Rn=>Rn.type==="file");for(let Rn of nt)delete Xe[Rn.name],delete Jt[Rn.name];const At=["expand","password","passwordConfirm"];for(let Rn of At)delete Xe[Rn],delete Jt[Rn];return JSON.stringify(Xe)==JSON.stringify(Jt)}function U(){t(10,g=null),window.localStorage.removeItem(q())}async function oe(ue=!0){if(!(m||!r||!(f!=null&&f.id))){t(11,m=!0);try{const De=se();let Xe;O?Xe=await ce.collection(f.id).create(De):Xe=await ce.collection(f.id).update(h.id,De),zt(O?"Successfully created record.":"Successfully updated record."),U(),ue?N():R(Xe),a("save",{isNew:O,record:Xe})}catch(De){ce.error(De)}t(11,m=!1)}}function ee(){d!=null&&d.id&&_n("Do you really want to delete the selected record?",()=>ce.collection(d.collectionId).delete(d.id).then(()=>{L(),zt("Successfully deleted record."),a("delete",d)}).catch(ue=>{ce.error(ue)}))}function se(){const ue=structuredClone(h||{}),De=new FormData,Xe={id:ue.id},Jt={};for(const nt of(f==null?void 0:f.schema)||[])Xe[nt.name]=!0,nt.type=="json"&&(Jt[nt.name]=!0);i&&(Xe.username=!0,Xe.email=!0,Xe.emailVisibility=!0,Xe.password=!0,Xe.passwordConfirm=!0,Xe.verified=!0);for(const nt in ue)if(Xe[nt]){if(typeof ue[nt]>"u"&&(ue[nt]=null),Jt[nt]&&ue[nt]!=="")try{JSON.parse(ue[nt])}catch(At){const It={};throw It[nt]={code:"invalid_json",message:At.toString()},new Kn({status:400,response:{data:It}})}j.addValueToFormData(De,nt,ue[nt])}for(const nt in y){const At=j.toArray(y[nt]);for(const It of At)De.append(nt,It)}for(const nt in S){const At=j.toArray(S[nt]);for(const It of At)De.append(nt+"."+It,"")}return De}function Ee(){!(f!=null&&f.id)||!(d!=null&&d.email)||_n(`Do you really want to sent verification email to ${d.email}?`,()=>ce.collection(f.id).requestVerification(d.email).then(()=>{zt(`Successfully sent verification email to ${d.email}.`)}).catch(ue=>{ce.error(ue)}))}function Re(){!(f!=null&&f.id)||!(d!=null&&d.email)||_n(`Do you really want to sent password reset email to ${d.email}?`,()=>ce.collection(f.id).requestPasswordReset(d.email).then(()=>{zt(`Successfully sent password reset
`),f=v("button"),f.textContent="{APP_NAME} ",c=W(`,
`),d=v("button"),d.textContent="{APP_URL} ",h=W("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(a,"class","help-block")},m(_,y){w(_,e,y),b(e,t),w(_,s,y),w(_,l,y),de(l,n[0].subject),w(_,r,y),w(_,a,y),b(a,u),b(a,f),b(a,c),b(a,d),b(a,h),g||(m=[Y(l,"input",n[13]),Y(f,"click",n[14]),Y(d,"click",n[15])],g=!0)},p(_,y){y[1]&1&&i!==(i=_[31])&&p(e,"for",i),y[1]&1&&o!==(o=_[31])&&p(l,"id",o),y[0]&1&&l.value!==_[0].subject&&de(l,_[0].subject)},d(_){_&&(k(e),k(s),k(l),k(r),k(a)),g=!1,$e(m)}}}function jA(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y;return{c(){e=v("label"),t=W("Action URL"),s=E(),l=v("input"),r=E(),a=v("div"),u=W(`Available placeholder parameters:
`),f=v("button"),f.textContent="{APP_NAME} ",c=W(`,
`),d=v("button"),d.textContent="{APP_URL} ",h=W(`,
`),g=v("button"),g.textContent="{TOKEN} ",m=W("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(g,"type","button"),p(g,"class","label label-sm link-primary txt-mono"),p(g,"title","Required parameter"),p(a,"class","help-block")},m(S,C){w(S,e,C),b(e,t),w(S,s,C),w(S,l,C),de(l,n[0].actionUrl),w(S,r,C),w(S,a,C),b(a,u),b(a,f),b(a,c),b(a,d),b(a,h),b(a,g),b(a,m),_||(y=[Y(l,"input",n[16]),Y(f,"click",n[17]),Y(d,"click",n[18]),Y(g,"click",n[19])],_=!0)},p(S,C){C[1]&1&&i!==(i=S[31])&&p(e,"for",i),C[1]&1&&o!==(o=S[31])&&p(l,"id",o),C[0]&1&&l.value!==S[0].actionUrl&&de(l,S[0].actionUrl)},d(S){S&&(k(e),k(s),k(l),k(r),k(a)),_=!1,$e(y)}}}function HA(n){let e,t,i,s;return{c(){e=v("textarea"),p(e,"id",t=n[31]),p(e,"class","txt-mono"),p(e,"spellcheck","false"),p(e,"rows","14"),e.required=!0},m(l,o){w(l,e,o),de(e,n[0].body),i||(s=Y(e,"input",n[21]),i=!0)},p(l,o){o[1]&1&&t!==(t=l[31])&&p(e,"id",t),o[0]&1&&de(e,l[0].body)},i:x,o:x,d(l){l&&k(e),i=!1,s()}}}function VA(n){let e,t,i,s;function l(a){n[20](a)}var o=n[4];function r(a,u){let f={id:a[31],language:"html"};return a[0].body!==void 0&&(f.value=a[0].body),{props:f}}return o&&(e=Pt(o,r(n)),te.push(()=>he(e,"value",l))),{c(){e&&z(e.$$.fragment),i=ye()},m(a,u){e&&H(e,a,u),w(a,i,u),s=!0},p(a,u){if(u[0]&16&&o!==(o=a[4])){if(e){re();const f=e;I(f.$$.fragment,1,0,()=>{V(f,1)}),ae()}o?(e=Pt(o,r(a)),te.push(()=>he(e,"value",l)),z(e.$$.fragment),A(e.$$.fragment,1),H(e,i.parentNode,i)):e=null}else if(o){const f={};u[1]&1&&(f.id=a[31]),!t&&u[0]&1&&(t=!0,f.value=a[0].body,_e(()=>t=!1)),e.$set(f)}},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&I(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&V(e,a)}}}function zA(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,C,T;const $=[VA,HA],O=[];function M(D,L){return D[4]&&!D[5]?0:1}return l=M(n),o=O[l]=$[l](n),{c(){e=v("label"),t=W("Body (HTML)"),s=E(),o.c(),r=E(),a=v("div"),u=W(`Available placeholder parameters:
`),f=v("button"),f.textContent="{APP_NAME} ",c=W(`,
`),d=v("button"),d.textContent="{APP_URL} ",h=W(`,
`),g=v("button"),g.textContent="{TOKEN} ",m=W(`,
`),_=v("button"),_.textContent="{ACTION_URL} ",y=W("."),p(e,"for",i=n[31]),p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(g,"type","button"),p(g,"class","label label-sm link-primary txt-mono"),p(_,"type","button"),p(_,"class","label label-sm link-primary txt-mono"),p(_,"title","Required parameter"),p(a,"class","help-block")},m(D,L){w(D,e,L),b(e,t),w(D,s,L),O[l].m(D,L),w(D,r,L),w(D,a,L),b(a,u),b(a,f),b(a,c),b(a,d),b(a,h),b(a,g),b(a,m),b(a,_),b(a,y),S=!0,C||(T=[Y(f,"click",n[22]),Y(d,"click",n[23]),Y(g,"click",n[24]),Y(_,"click",n[25])],C=!0)},p(D,L){(!S||L[1]&1&&i!==(i=D[31]))&&p(e,"for",i);let N=l;l=M(D),l===N?O[l].p(D,L):(re(),I(O[N],1,1,()=>{O[N]=null}),ae(),o=O[l],o?o.p(D,L):(o=O[l]=$[l](D),o.c()),A(o,1),o.m(r.parentNode,r))},i(D){S||(A(o),S=!0)},o(D){I(o),S=!1},d(D){D&&(k(e),k(s),k(r),k(a)),O[l].d(D),C=!1,$e(T)}}}function BA(n){let e,t,i,s,l,o;return e=new me({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[qA,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new me({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[jA,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new me({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[zA,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment),s=E(),z(l.$$.fragment)},m(r,a){H(e,r,a),w(r,t,a),H(i,r,a),w(r,s,a),H(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const c={};a[0]&2&&(c.name=r[1]+".body"),a[0]&49|a[1]&3&&(c.$$scope={dirty:a,ctx:r}),l.$set(c)},i(r){o||(A(e.$$.fragment,r),A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){I(e.$$.fragment,r),I(i.$$.fragment,r),I(l.$$.fragment,r),o=!1},d(r){r&&(k(t),k(s)),V(e,r),V(i,r),V(l,r)}}}function Km(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Te(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&xe(()=>{i&&(t||(t=He(e,Qt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Qt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function UA(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Km();return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),l=W(n[2]),o=E(),r=v("div"),a=E(),f&&f.c(),u=ye(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),b(s,l),w(c,o,d),w(c,r,d),w(c,a,d),f&&f.m(c,d),w(c,u,d)},p(c,d){d[0]&4&&le(l,c[2]),c[6]?f?d[0]&64&&A(f,1):(f=Km(),f.c(),A(f,1),f.m(u.parentNode,u)):f&&(re(),I(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(o),k(r),k(a),k(u)),f&&f.d(c)}}}function WA(n){let e,t;const i=[n[8]];let s={$$slots:{header:[UA],default:[BA]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=je(s,i[l]);return e=new po({props:s}),n[26](e),e.$on("expand",n[27]),e.$on("collapse",n[28]),e.$on("toggle",n[29]),{c(){z(e.$$.fragment)},m(l,o){H(e,l,o),t=!0},p(l,o){const r=o[0]&256?_t(i,[Dt(l[8])]):{};o[0]&119|o[1]&2&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(A(e.$$.fragment,l),t=!0)},o(l){I(e.$$.fragment,l),t=!1},d(l){n[26](null),V(e,l)}}}let Jm;function YA(n,e,t){let i;const s=["key","title","config","expand","collapse","collapseSiblings"];let l=tt(e,s),o;Ge(n,Mi,U=>t(12,o=U));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c=Jm,d=!1;function h(){f==null||f.expand()}function g(){f==null||f.collapse()}function m(){f==null||f.collapseSiblings()}async function _(){c||d||(t(5,d=!0),t(4,c=(await ut(()=>import("./CodeEditor-4c129c80.js"),["./CodeEditor-4c129c80.js","./index-808c8630.js"],import.meta.url)).default),Jm=c,t(5,d=!1))}function y(U){j.copyToClipboard(U),ko(`Copied ${U} to clipboard`,2e3)}_();function S(){u.subject=this.value,t(0,u)}const C=()=>y("{APP_NAME}"),T=()=>y("{APP_U
2023-09-01 09:22:49 +03:00
from the
`),r=v("strong"),u=W(a),f=W(`
2023-09-01 09:22:49 +03:00
to the
`),c=v("strong"),h=W(d),g=W(`.
`),m=v("br"),_=W(`
2023-09-01 09:22:49 +03:00
There are numerous command line tools that can help you, such as:
`),y=v("a"),y.textContent=`rclone
`,S=W(`,
`),C=v("a"),C.textContent=`s5cmd
`,T=W(", etc."),$=E(),O=v("div"),p(i,"class","icon"),p(y,"href","https://github.com/rclone/rclone"),p(y,"target","_blank"),p(y,"rel","noopener noreferrer"),p(y,"class","txt-bold"),p(C,"href","https://github.com/peak/s5cmd"),p(C,"target","_blank"),p(C,"rel","noopener noreferrer"),p(C,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p(O,"class","clearfix m-t-base")},m(N,P){w(N,e,P),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),b(l,r),b(r,u),b(l,f),b(l,c),b(c,h),b(l,g),b(l,m),b(l,_),b(l,y),b(l,S),b(l,C),b(l,T),b(e,$),b(e,O),D=!0},p(N,P){var F;(!D||P&1)&&a!==(a=(F=N[0].s3)!=null&&F.enabled?"S3 storage":"local file system")&&le(u,a),(!D||P&2)&&d!==(d=N[1].s3.enabled?"S3 storage":"local file system")&&le(h,d)},i(N){D||(N&&xe(()=>{D&&(M||(M=He(e,lt,{duration:150},!0)),M.run(1))}),D=!0)},o(N){N&&(M||(M=He(e,lt,{duration:150},!1)),M.run(0)),D=!1},d(N){N&&k(e),N&&M&&M.end()}}}function L8(n){var i;let e,t=((i=n[0].s3)==null?void 0:i.enabled)!=n[1].s3.enabled&&ng(n);return{c(){t&&t.c(),e=ye()},m(s,l){t&&t.m(s,l),w(s,e,l)},p(s,l){var o;((o=s[0].s3)==null?void 0:o.enabled)!=s[1].s3.enabled?t?(t.p(s,l),l&3&&A(t,1)):(t=ng(s),t.c(),A(t,1),t.m(e.parentNode,e)):t&&(re(),I(t,1,1,()=>{t=null}),ae())},d(s){s&&k(e),t&&t.d(s)}}}function ig(n){let e;function t(l,o){return l[4]?F8:l[5]?N8:P8}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){l&&k(e),s.d(l)}}}function P8(n){let e;return{c(){e=v("div"),e.innerHTML='<i class="ri-checkbox-circle-line txt-success"></i> <span class="txt">S3 connected successfully</span>',p(e,"class","label label-sm label-success entrance-right")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function N8(n){let e,t,i,s;return{c(){e=v("div"),e.innerHTML='<i class="ri-error-warning-line txt-warning"></i> <span class="txt">Failed to establish S3 connection</span>',p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;w(l,e,o),i||(s=Te(t=Be.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&Et(t.update)&&o&32&&t.update.call(null,(r=l[5].data)==null?void 0:r.message)},d(l){l&&k(e),i=!1,s()}}}function F8(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function sg(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Reset",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3]},m(l,o){w(l,e,o),b(e,t),i||(s=Y(e,"click",n[14]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&k(e),i=!1,s()}}}function R8(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_;const y=[I8,A8],S=[];function C(T,$){return T[2]?0:1}return d=C(n),h=S[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=W(n[7]),r=E(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="<p>By default PocketBase uses the local file system to store uploaded files.</p> <p>If you have limited disk space, you could optionally connect to an S3 compatible storage.</p>",c=E(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(T,$){w(T,e,$),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(T,r,$),w(T,a,$),b(a,u),b(u,f),b(u,c),S[d].m(u,null),g=!0,m||(_=Y(u,"submit",Ze(n[16])),m=!0)},p(T,$){(!g||$&128)&&le(o,T[7]);let O=d;d=C(T),d===O?S[d].p(T,$):(re(),I(S[O],1,1,()=>{S[O]=null}),ae(),h=S[d],h?h.p(T,$):(h=S[d]=y[d](T),h.c()),A(h,1),h.m(u,null))},i(T){g||(A(h),g=!0)},o(T){I(h),g=!1},d(T){T&&(k(e),k(r),k(a)),S[d].d(),m=!1,_()}}}function q8(n){let e,t,i,s;return e=new Di({}),i=new Tn({props:{$$slots:{default:[R8]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(l,o){H(e,l,o),w(l,t,o),H(i,l,o),s=!0},p(l,[o]){const r={};o&524543&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){l&&k(t),V(
another PocketBase environment.</p>`,t=E(),i=v("div"),s=v("button"),s.innerHTML='<span class="txt">Copy</span>',l=E(),z(o.$$.fragment),r=E(),a=v("div"),u=v("div"),f=E(),c=v("button"),c.innerHTML='<i class="ri-download-line"></i> <span class="txt">Download as JSON</span>',p(e,"class","content txt-xl m-b-base"),p(s,"type","button"),p(s,"class","btn btn-sm btn-transparent fade copy-schema svelte-jm5c4z"),p(i,"tabindex","0"),p(i,"class","export-preview svelte-jm5c4z"),p(u,"class","flex-fill"),p(c,"type","button"),p(c,"class","btn btn-expanded"),p(a,"class","flex m-t-base")},m(m,_){w(m,e,_),w(m,t,_),w(m,i,_),b(i,s),b(i,l),H(o,i,null),n[8](i),w(m,r,_),w(m,a,_),b(a,u),b(a,f),b(a,c),d=!0,h||(g=[Y(s,"click",n[7]),Y(i,"keydown",n[9]),Y(c,"click",n[10])],h=!0)},p(m,_){const y={};_&4&&(y.content=m[2]),o.$set(y)},i(m){d||(A(o.$$.fragment,m),d=!0)},o(m){I(o.$$.fragment,m),d=!1},d(m){m&&(k(e),k(t),k(i),k(r),k(a)),V(o),n[8](null),h=!1,$e(g)}}}function mI(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function gI(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[mI,hI],g=[];function m(_,y){return _[1]?0:1}return f=m(n),c=g[f]=h[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=W(n[3]),r=E(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(_,y){w(_,e,y),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(_,r,y),w(_,a,y),b(a,u),g[f].m(u,null),d=!0},p(_,y){(!d||y&8)&&le(o,_[3]);let S=f;f=m(_),f===S?g[f].p(_,y):(re(),I(g[S],1,1,()=>{g[S]=null}),ae(),c=g[f],c?c.p(_,y):(c=g[f]=h[f](_),c.c()),A(c,1),c.m(u,null))},i(_){d||(A(c),d=!0)},o(_){I(c),d=!1},d(_){_&&(k(e),k(r),k(a)),g[f].d()}}}function _I(n){let e,t,i,s;return e=new Di({}),i=new Tn({props:{$$slots:{default:[gI]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(l,o){H(e,l,o),w(l,t,o),H(i,l,o),s=!0},p(l,[o]){const r={};o&8207&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){l&&k(t),V(e,l),V(i,l)}}}function bI(n,e,t){let i,s;Ge(n,Nt,_=>t(3,s=_)),an(Nt,s="Export collections",s);const l="export_"+j.randomString(5);let o,r=[],a=!1;u();async function u(){t(1,a=!0);try{t(6,r=await ce.collections.getFullList(100,{$cancelKey:l,sort:"updated"}));for(let _ of r)delete _.created,delete _.updated}catch(_){ce.error(_)}t(1,a=!1)}function f(){j.downloadJson(r,"pb_schema")}function c(){j.copyToClipboard(i),ko("The configuration was copied to your clipboard!",3e3)}const d=()=>c();function h(_){te[_?"unshift":"push"](()=>{o=_,t(0,o)})}const g=_=>{if(_.ctrlKey&&_.code==="KeyA"){_.preventDefault();const y=window.getSelection(),S=document.createRange();S.selectNodeContents(o),y.removeAllRanges(),y.addRange(S)}},m=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,c,r,d,h,g,m]}class vI extends ve{constructor(e){super(),be(this,e,bI,_I,ge,{})}}function bg(n,e,t){const i=n.slice();return i[14]=e[t],i}function vg(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function yg(n,e,t){const i=n.slice();return i[14]=e[t],i}function kg(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function wg(n,e,t){const i=n.slice();return i[14]=e[t],i}function Sg(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function Tg(n,e,t){const i=n.slice();return i[30]=e[t],i}function yI(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&Cg(),a=n[0].name!==n[1].name&&$g(n);return{c(){e=v("div"),r&&r.c(),t=E(),a&&a.c(),i=E(),s=v("strong"),o=W(l),p(s,"class","txt"),p(e,"class","inline-flex fleg-gap-5")},m(u,f){w(u,e,f),r&&r.m(e,null),b(e,t),a&&a.m(e,null),b(e,i),b(e,s),b(s,o)},p(u,f){u[9]?r||(r=Cg(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=$g(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&le(o,l)},d(u){u&&k(e),r&&r.d(),a&&a.d()}}}function kI(n){var o;let e,t,i,s=((o=n[0])==null?voi
- ${T.join(`
- `)}`,()=>{g()}):g()}async function g(){if(!u){t(4,u=!0);try{await ce.collections.import(o,a),zt("Successfully imported collections configuration."),i("submit")}catch(T){ce.error(T)}t(4,u=!1),c()}}const m=()=>h(),_=()=>!u;function y(T){te[T?"unshift":"push"](()=>{s=T,t(1,s)})}function S(T){Fe.call(this,n,T)}function C(T){Fe.call(this,n,T)}return n.$$.update=()=>{n.$$.dirty&384&&Array.isArray(l)&&Array.isArray(o)&&d()},[c,s,r,a,u,h,f,l,o,m,_,y,S,C]}class AI extends ve{constructor(e){super(),be(this,e,DI,EI,ge,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function qg(n,e,t){const i=n.slice();return i[32]=e[t],i}function jg(n,e,t){const i=n.slice();return i[35]=e[t],i}function Hg(n,e,t){const i=n.slice();return i[32]=e[t],i}function II(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,C,T,$,O,M;a=new me({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[PI,({uniqueId:R})=>({40:R}),({uniqueId:R})=>[0,R?512:0]]},$$scope:{ctx:n}}});let D=!1,L=n[6]&&n[1].length&&!n[7]&&zg(),N=n[6]&&n[1].length&&n[7]&&Bg(n),P=n[13].length&&e_(n),F=!!n[0]&&t_(n);return{c(){e=v("input"),t=E(),i=v("div"),s=v("p"),l=W(`Paste below the collections configuration you want to import or
`),o=v("button"),o.innerHTML='<span class="txt">Load from JSON file</span>',r=E(),z(a.$$.fragment),u=E(),f=E(),L&&L.c(),c=E(),N&&N.c(),d=E(),P&&P.c(),h=E(),g=v("div"),F&&F.c(),m=E(),_=v("div"),y=E(),S=v("button"),C=v("span"),C.textContent="Review",p(e,"type","file"),p(e,"class","hidden"),p(e,"accept",".json"),p(o,"class","btn btn-outline btn-sm m-l-5"),Q(o,"btn-loading",n[12]),p(i,"class","content txt-xl m-b-base"),p(_,"class","flex-fill"),p(C,"class","txt"),p(S,"type","button"),p(S,"class","btn btn-expanded btn-warning m-l-auto"),S.disabled=T=!n[14],p(g,"class","flex m-t-base")},m(R,q){w(R,e,q),n[19](e),w(R,t,q),w(R,i,q),b(i,s),b(s,l),b(s,o),w(R,r,q),H(a,R,q),w(R,u,q),w(R,f,q),L&&L.m(R,q),w(R,c,q),N&&N.m(R,q),w(R,d,q),P&&P.m(R,q),w(R,h,q),w(R,g,q),F&&F.m(g,null),b(g,m),b(g,_),b(g,y),b(g,S),b(S,C),$=!0,O||(M=[Y(e,"change",n[20]),Y(o,"click",n[21]),Y(S,"click",n[26])],O=!0)},p(R,q){(!$||q[0]&4096)&&Q(o,"btn-loading",R[12]);const B={};q[0]&64&&(B.class="form-field "+(R[6]?"":"field-error")),q[0]&65|q[1]&1536&&(B.$$scope={dirty:q,ctx:R}),a.$set(B),R[6]&&R[1].length&&!R[7]?L||(L=zg(),L.c(),L.m(c.parentNode,c)):L&&(L.d(1),L=null),R[6]&&R[1].length&&R[7]?N?N.p(R,q):(N=Bg(R),N.c(),N.m(d.parentNode,d)):N&&(N.d(1),N=null),R[13].length?P?P.p(R,q):(P=e_(R),P.c(),P.m(h.parentNode,h)):P&&(P.d(1),P=null),R[0]?F?F.p(R,q):(F=t_(R),F.c(),F.m(g,m)):F&&(F.d(1),F=null),(!$||q[0]&16384&&T!==(T=!R[14]))&&(S.disabled=T)},i(R){$||(A(a.$$.fragment,R),A(D),$=!0)},o(R){I(a.$$.fragment,R),I(D),$=!1},d(R){R&&(k(e),k(t),k(i),k(r),k(u),k(f),k(c),k(d),k(h),k(g)),n[19](null),V(a,R),L&&L.d(R),N&&N.d(R),P&&P.d(R),F&&F.d(),O=!1,$e(M)}}}function LI(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function Vg(n){let e;return{c(){e=v("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function PI(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[6]&&Vg();return{c(){e=v("label"),t=W("Collections"),s=E(),l=v("textarea"),r=E(),c&&c.c(),a=ye(),p(e,"for",i=n[40]),p(e,"class","p-b-10"),p(l,"id",o=n[40]),p(l,"class","code"),p(l,"spellcheck","false"),p(l,"rows","15"),l.required=!0},m(d,h){w(d,e,h),b(e,t),w(d,s,h),w(d,l,h),de(l,n[0]),w(d,r,h),c&&c.m(d,h),w(d,a,h),u||(f=Y(l,"input",n[22]),u=!0)},p(d,h){h[1]&512&&i!==(i=d[40])&&p(e,"for",i),h[1]&512&&o!==(o=d[40])&&p(l,"id",o),h[0]&1&&de(l,d[0]),d[0]&&!d[6]?c||(c=Vg(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&(k(e),k(s),k(l),k(r),k(a)),c&&c.d(d),u=!1,f()}}}function zg(n){let e;return{c(){e=v("div"),e.innerHTML='<div class="icon"><i class="ri-information-line"></i></div> <div class="content"><string>Your collections configuration is already up-to-date!</string></div>',p(e,"class","alert alert-info")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Bg(n){let e,t,i,s,l,o=n[9].length&&Ug(n),r=n[4].length&&Kg(n),a=n[8].length&&Xg(n);return{c(){e=v("h5"),e.textContent="Detected changes",t=E(),i=v("div"),o&&o.c(),s=E(),r&&r.c(),l=E(),a&&a.c(),p(e,"class","section-title"),p(i,"class","list")},m(u,f){w(u,e,f),w(u,t,f),w(u,i,f),o&&o.m(i,null),b(i,s),r&&r.m(i,null),b(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=Ug(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=Kg(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=Xg(u),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(u){u&&(k(e),k(t),k(i)),o&&o.d(),r&&r.d(),a&&a.d()}}}function Ug(n){let e=[],t=new Map,i,s=pe(n[9]);const l=o=>o[32].id;for(let o=0;o<s.length;o+=1){let r=Hg(n,s,o),a=l(r);t.set(a,e[o]=Yg(a,r))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=ye()},m(o,r){for(let a=0;a<e.length;a+=1)e[a]&&e[a].m(o,r);w(o,i,r)},p(o,r){r[0]&512&&(s=pe(o[9]),e=gt(e,r,l,1,o,s,t,i.parentNode,Ui,Yg,i,Hg))},d(o){o&&k(i);for(let r=0;r<e.length;r+=1)e[r].d(o)}}}function Wg(n){let e,t,i=n[32].id+"",s,l;return{c(){e=v("small"),t=W("("),s=W(i),l=W(")"),p(e,"class","txt-hint")},m(o,r){w(o,e,r),b(e,t),b(e,s),b(e,l)},p(o,r){r[0]&512&&i!==(i=o[32].id+"")&&le(s,i)},d(o){o&&k(e)}}}function Yg(n,e){let t,i,s,l,o=e[32].name+
2023-09-01 09:22:49 +03:00
imported with different IDs. You can replace them in the import if you want
to.</string>`,l=E(),o=v("button"),o.innerHTML='<span class="txt">Replace with original ids</span>',p(t,"class","icon"),p(s,"class","content"),p(o,"type","button"),p(o,"class","btn btn-warning btn-sm btn-outline"),p(e,"class","alert alert-warning m-t-base")},m(u,f){w(u,e,f),b(e,t),b(e,i),b(e,s),b(e,l),b(e,o),r||(a=Y(o,"click",n[24]),r=!0)},p:x,d(u){u&&k(e),r=!1,a()}}}function t_(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='<span class="txt">Clear</span>',p(e,"type","button"),p(e,"class","btn btn-transparent link-hint")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[25]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function NI(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[LI,II],g=[];function m(_,y){return _[5]?0:1}return f=m(n),c=g[f]=h[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=W(n[15]),r=E(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(_,y){w(_,e,y),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(_,r,y),w(_,a,y),b(a,u),g[f].m(u,null),d=!0},p(_,y){(!d||y[0]&32768)&&le(o,_[15]);let S=f;f=m(_),f===S?g[f].p(_,y):(re(),I(g[S],1,1,()=>{g[S]=null}),ae(),c=g[f],c?c.p(_,y):(c=g[f]=h[f](_),c.c()),A(c,1),c.m(u,null))},i(_){d||(A(c),d=!0)},o(_){I(c),d=!1},d(_){_&&(k(e),k(r),k(a)),g[f].d()}}}function FI(n){let e,t,i,s,l,o;e=new Di({}),i=new Tn({props:{$$slots:{default:[NI]},$$scope:{ctx:n}}});let r={};return l=new AI({props:r}),n[27](l),l.$on("submit",n[28]),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment),s=E(),z(l.$$.fragment)},m(a,u){H(e,a,u),w(a,t,u),H(i,a,u),w(a,s,u),H(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){I(e.$$.fragment,a),I(i.$$.fragment,a),I(l.$$.fragment,a),o=!1},d(a){a&&(k(t),k(s)),V(e,a),V(i,a),n[27](null),V(l,a)}}}function RI(n,e,t){let i,s,l,o,r,a,u;Ge(n,Nt,U=>t(15,u=U)),an(Nt,u="Import collections",u);let f,c,d="",h=!1,g=[],m=[],_=!0,y=[],S=!1;C();async function C(){t(5,S=!0);try{t(2,m=await ce.collections.getFullList(200));for(let U of m)delete U.created,delete U.updated}catch(U){ce.error(U)}t(5,S=!1)}function T(){if(t(4,y=[]),!!i)for(let U of g){const oe=j.findByKey(m,"id",U.id);!(oe!=null&&oe.id)||!j.hasCollectionChanges(oe,U,_)||y.push({new:U,old:oe})}}function $(){t(1,g=[]);try{t(1,g=JSON.parse(d))}catch{}Array.isArray(g)?t(1,g=j.filterDuplicatesByKey(g)):t(1,g=[]);for(let U of g)delete U.created,delete U.updated,U.schema=j.filterDuplicatesByKey(U.schema)}function O(){var U,oe;for(let ee of g){const se=j.findByKey(m,"name",ee.name)||j.findByKey(m,"id",ee.id);if(!se)continue;const Ee=ee.id,Re=se.id;ee.id=Re;const Ve=Array.isArray(se.schema)?se.schema:[],We=Array.isArray(ee.schema)?ee.schema:[];for(const ke of We){const Me=j.findByKey(Ve,"name",ke.name);Me&&Me.id&&(ke.id=Me.id)}for(let ke of g)if(Array.isArray(ke.schema))for(let Me of ke.schema)(U=Me.options)!=null&&U.collectionId&&((oe=Me.options)==null?void 0:oe.collectionId)===Ee&&(Me.options.collectionId=Re)}t(0,d=JSON.stringify(g,null,4))}function M(U){t(12,h=!0);const oe=new FileReader;oe.onload=async ee=>{t(12,h=!1),t(10,f.value="",f),t(0,d=ee.target.result),await sn(),g.length||(Ci("Invalid collections configuration."),D())},oe.onerror=ee=>{console.warn(ee),Ci("Failed to load the imported JSON."),t(12,h=!1),t(10,f.value="",f)},oe.readAsText(U)}function D(){t(0,d=""),t(10,f.value="",f),ln({})}function L(U){te[U?"unshift":"push"](()=>{f=U,t(10,f)})}const N=()=>{f.files.length&&M(f.files[0])},P=()=>{f.click()};function F(){d=this.value,t(0,d)}function R(){_=this.checked,t(3,_)}const q=()=>O(),B=()=>D(),G=()=>c==null?void 0:c.show(m,g,_);function X(U){te[U?"unshift":"push"](()=>{c=U,t(11,c)})}const J=()=>D();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&$(),n.$$.dirty[0]&3&&t(6,i=!!d&&g.length&&g.length===g.filter(U=>!!U.id&&!!U.name).length),n.$$.dirty[0]&78&&t(9,s=m.filter(U=>i&&_&&!j.findByKey(g,"id",U.id))),n.
2023-09-01 09:22:49 +03:00
database will be temporary &quot;locked&quot; (this usually happens only during the ZIP generation).</p> <p class="txt-bold">If you are using S3 storage for the collections file upload, you&#39;ll have to backup them
separately since they are not locally stored and will not be included in the final backup!</p></div>`,t=E(),i=v("form"),z(s.$$.fragment),p(e,"class","alert alert-info"),p(i,"id",n[4]),p(i,"autocomplete","off")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),H(s,i,null),l=!0,o||(r=Y(i,"submit",Ze(n[5])),o=!0)},p(a,u){const f={};u&98308&&(f.$$scope={dirty:u,ctx:a}),s.$set(f)},i(a){l||(A(s.$$.fragment,a),l=!0)},o(a){I(s.$$.fragment,a),l=!1},d(a){a&&(k(e),k(t),k(i)),V(s),o=!1,r()}}}function VI(n){let e;return{c(){e=v("h4"),e.textContent="Initialize new backup",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function zI(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=E(),s=v("button"),l=v("span"),l.textContent="Start backup",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[3],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[4]),p(s,"class","btn btn-expanded"),s.disabled=n[3],Q(s,"btn-loading",n[3])},m(a,u){w(a,e,u),b(e,t),w(a,i,u),w(a,s,u),b(s,l),o||(r=Y(e,"click",n[0]),o=!0)},p(a,u){u&8&&(e.disabled=a[3]),u&8&&(s.disabled=a[3]),u&8&&Q(s,"btn-loading",a[3])},d(a){a&&(k(e),k(i),k(s)),o=!1,r()}}}function BI(n){let e,t,i={class:"backup-create-panel",beforeOpen:n[8],beforeHide:n[9],popup:!0,$$slots:{footer:[zI],header:[VI],default:[HI]},$$scope:{ctx:n}};return e=new on({props:i}),n[10](e),e.$on("show",n[11]),e.$on("hide",n[12]),{c(){z(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&8&&(o.beforeOpen=s[8]),l&8&&(o.beforeHide=s[9]),l&65548&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[10](null),V(e,s)}}}function UI(n,e,t){const i=dt(),s="backup_create_"+j.randomString(5);let l,o="",r=!1,a;function u(S){ln({}),t(3,r=!1),t(2,o=S||""),l==null||l.show()}function f(){return l==null?void 0:l.hide()}async function c(){if(!r){t(3,r=!0),clearTimeout(a),a=setTimeout(()=>{f()},1500);try{await ce.backups.create(o,{$cancelKey:s}),t(3,r=!1),f(),i("submit"),zt("Successfully generated new backup.")}catch(S){S.isAbort||ce.error(S)}clearTimeout(a),t(3,r=!1)}}Ps(()=>{clearTimeout(a)});function d(){o=this.value,t(2,o)}const h=()=>r?(ko("A backup has already been started, please wait."),!1):!0,g=()=>(r&&ko("The backup was started but may take a while to complete. You can come back later.",4500),!0);function m(S){te[S?"unshift":"push"](()=>{l=S,t(1,l)})}function _(S){Fe.call(this,n,S)}function y(S){Fe.call(this,n,S)}return[f,l,o,r,s,c,u,d,h,g,m,_,y]}class WI extends ve{constructor(e){super(),be(this,e,UI,BI,ge,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function YI(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Backup name"),s=E(),l=v("input"),p(e,"for",i=n[15]),p(l,"type","text"),p(l,"id",o=n[15]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[2]),r||(a=Y(l,"input",n[9]),r=!0)},p(u,f){f&32768&&i!==(i=u[15])&&p(e,"for",i),f&32768&&o!==(o=u[15])&&p(l,"id",o),f&4&&l.value!==u[2]&&de(l,u[2])},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function KI(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_;return u=new Hs({props:{value:n[1]}}),h=new me({props:{class:"form-field required m-0",name:"name",$$slots:{default:[YI,({uniqueId:y})=>({15:y}),({uniqueId:y})=>y?32768:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.innerHTML=`<div class="icon"><i class="ri-alert-line"></i></div> <div class="content"><p class="txt-bold">Please proceed with caution.
2023-09-01 09:22:49 +03:00
<br/>
Backup restore is still experimental and currently works only on UNIX based systems.</p> <p>The restore operation will attempt to replace your existing <code>pb_data</code> with the one from
the backup and will restart the application process.</p> <p>Nothing will happen if the backup file is invalid or incompatible.</p></div>`,t=E(),i=v("div"),s=W(`Type the backup name
`),l=v("div"),o=v("span"),r=W(n[1]),a=E(),z(u.$$.fragment),f=W(`
to confirm:`),c=E(),d=v("form"),z(h.$$.fragment),p(e,"class","alert alert-danger"),p(o,"class","txt"),p(l,"class","label"),p(i,"class","content m-b-sm"),p(d,"id",n[6]),p(d,"autocomplete","off")},m(y,S){w(y,e,S),w(y,t,S),w(y,i,S),b(i,s),b(i,l),b(l,o),b(o,r),b(l,a),H(u,l,null),b(i,f),w(y,c,S),w(y,d,S),H(h,d,null),g=!0,m||(_=Y(d,"submit",Ze(n[7])),m=!0)},p(y,S){(!g||S&2)&&le(r,y[1]);const C={};S&2&&(C.value=y[1]),u.$set(C);const T={};S&98308&&(T.$$scope={dirty:S,ctx:y}),h.$set(T)},i(y){g||(A(u.$$.fragment,y),A(h.$$.fragment,y),g=!0)},o(y){I(u.$$.fragment,y),I(h.$$.fragment,y),g=!1},d(y){y&&(k(e),k(t),k(i),k(c),k(d)),V(u),V(h),m=!1,_()}}}function JI(n){let e,t,i,s;return{c(){e=v("h4"),t=W("Restore "),i=v("strong"),s=W(n[1]),p(e,"class","popup-title txt-ellipsis svelte-1fcgldh")},m(l,o){w(l,e,o),b(e,t),b(e,i),b(i,s)},p(l,o){o&2&&le(s,l[1])},d(l){l&&k(e)}}}function GI(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=W("Cancel"),i=E(),s=v("button"),l=v("span"),l.textContent="Restore backup",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=o=!n[5]||n[4],Q(s,"btn-loading",n[4])},m(u,f){w(u,e,f),b(e,t),w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"click",n[0]),r=!0)},p(u,f){f&16&&(e.disabled=u[4]),f&48&&o!==(o=!u[5]||u[4])&&(s.disabled=o),f&16&&Q(s,"btn-loading",u[4])},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function ZI(n){let e,t,i={class:"backup-restore-panel",overlayClose:!n[4],escClose:!n[4],beforeHide:n[10],popup:!0,$$slots:{footer:[GI],header:[JI],default:[KI]},$$scope:{ctx:n}};return e=new on({props:i}),n[11](e),e.$on("show",n[12]),e.$on("hide",n[13]),{c(){z(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[10]),l&65590&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[11](null),V(e,s)}}}function XI(n,e,t){let i;const s="backup_restore_"+j.randomString(5);let l,o="",r="",a=!1,u=null;function f(S){ln({}),t(2,r=""),t(1,o=S),t(4,a=!1),l==null||l.show()}function c(){return l==null?void 0:l.hide()}async function d(){var S;if(!(!i||a)){clearTimeout(u),t(4,a=!0);try{await ce.backups.restore(o),u=setTimeout(()=>{window.location.reload()},2e3)}catch(C){clearTimeout(u),C!=null&&C.isAbort||(t(4,a=!1),Ci(((S=C.response)==null?void 0:S.message)||C.message))}}}Ps(()=>{clearTimeout(u)});function h(){r=this.value,t(2,r)}const g=()=>!a;function m(S){te[S?"unshift":"push"](()=>{l=S,t(3,l)})}function _(S){Fe.call(this,n,S)}function y(S){Fe.call(this,n,S)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=r!=""&&o==r)},[c,o,r,l,a,i,s,d,f,h,g,m,_,y]}class QI extends ve{constructor(e){super(),be(this,e,XI,ZI,ge,{show:8,hide:0})}get show(){return this.$$.ctx[8]}get hide(){return this.$$.ctx[0]}}function n_(n,e,t){const i=n.slice();return i[22]=e[t],i}function i_(n,e,t){const i=n.slice();return i[19]=e[t],i}function xI(n){let e=[],t=new Map,i,s,l=pe(n[3]);const o=a=>a[22].key;for(let a=0;a<l.length;a+=1){let u=n_(n,l,a),f=o(u);t.set(f,e[a]=l_(f,u))}let r=null;return l.length||(r=s_()),{c(){for(let a=0;a<e.length;a+=1)e[a].c();i=ye(),r&&r.c()},m(a,u){for(let f=0;f<e.length;f+=1)e[f]&&e[f].m(a,u);w(a,i,u),r&&r.m(a,u),s=!0},p(a,u){u&876&&(l=pe(a[3]),re(),e=gt(e,u,o,1,a,l,t,i.parentNode,Rt,l_,i,n_),ae(),!l.length&&r?r.p(a,u):l.length?r&&(r.d(1),r=null):(r=s_(),r.c(),r.m(i.parentNode,i)))},i(a){if(!s){for(let u=0;u<l.length;u+=1)A(e[u]);s=!0}},o(a){for(let u=0;u<e.length;u+=1)I(e[u]);s=!1},d(a){a&&k(i);for(let u=0;u<e.length;u+=1)e[u].d(a);r&&r.d(a)}}}function eL(n){let e,t=pe(Array(n[3].length||1)),i=[];for(let s=0;s<t.length;s+=1)i[s]=o_(i_(n,t,s));return{c(){for(let s=0;s<i.length;s+=1)i[s].c();e=ye()},m(s,l){for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(s,l);w(s,e,l)},p(s,l){if(l&8){t=pe(Array(s[3].length||1));let o;for(o=0;o<t.length;o+=1){const r=i_(s,t,o);i[o]?i[o].p(r,l):(i[o]=o_(),i[o].c(),i[o].m(e.parentNode,e))}for(;o<i.length;o+=1)i[o].d(1);i.length=t.length}},i:x,o:x,d(s){s&&k(e),vt(i,s)}}}f
`),T=v("span"),T.textContent="macros",$=W(`.
`),O=v("br"),M=W(`
The timezone is in UTC.`),p(e,"for",i=n[31]),l.required=!0,p(l,"type","text"),p(l,"id",o=n[31]),p(l,"class","txt-lg txt-mono"),p(l,"placeholder","* * * * *"),l.autofocus=r=!((F=(P=n[0])==null?void 0:P.backups)!=null&&F.cron),p(c,"class","txt"),p(h,"class","ri-arrow-drop-down-fill"),p(f,"type","button"),p(f,"class","btn btn-sm btn-outline p-r-0"),p(u,"class","form-field-addon"),p(T,"class","link-primary"),p(y,"class","help-block")},m(P,F){var R,q;w(P,e,F),b(e,t),w(P,s,F),w(P,l,F),de(l,n[1].backups.cron),w(P,a,F),w(P,u,F),b(u,f),b(f,c),b(f,d),b(f,h),b(f,g),H(m,f,null),w(P,_,F),w(P,y,F),b(y,S),b(S,C),b(S,T),b(S,$),b(S,O),b(S,M),D=!0,(q=(R=n[0])==null?void 0:R.backups)!=null&&q.cron||l.focus(),L||(N=[Y(l,"input",n[18]),Te(Be.call(null,T,`@yearly
@annually
@monthly
@weekly
@daily
@midnight
@hourly`))],L=!0)},p(P,F){var q,B;(!D||F[1]&1&&i!==(i=P[31]))&&p(e,"for",i),(!D||F[1]&1&&o!==(o=P[31]))&&p(l,"id",o),(!D||F[0]&1&&r!==(r=!((B=(q=P[0])==null?void 0:q.backups)!=null&&B.cron)))&&(l.autofocus=r),F[0]&2&&l.value!==P[1].backups.cron&&de(l,P[1].backups.cron);const R={};F[0]&2|F[1]&2&&(R.$$scope={dirty:F,ctx:P}),m.$set(R)},i(P){D||(A(m.$$.fragment,P),D=!0)},o(P){I(m.$$.fragment,P),D=!1},d(P){P&&(k(e),k(s),k(l),k(a),k(u),k(_),k(y)),V(m),L=!1,$e(N)}}}function hL(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Max @auto backups to keep"),s=E(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","number"),p(l,"id",o=n[31]),p(l,"min","1")},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[1].backups.cronMaxKeep),r||(a=Y(l,"input",n[23]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&2&&yt(l.value)!==u[1].backups.cronMaxKeep&&de(l,u[1].backups.cronMaxKeep)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function f_(n){let e;function t(l,o){return l[7]?_L:l[8]?gL:mL}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){l&&k(e),s.d(l)}}}function mL(n){let e;return{c(){e=v("div"),e.innerHTML='<i class="ri-checkbox-circle-line txt-success"></i> <span class="txt">S3 connected successfully</span>',p(e,"class","label label-sm label-success entrance-right")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function gL(n){let e,t,i,s;return{c(){e=v("div"),e.innerHTML='<i class="ri-error-warning-line txt-warning"></i> <span class="txt">Failed to establish S3 connection</span>',p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;w(l,e,o),i||(s=Te(t=Be.call(null,e,(r=n[8].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&Et(t.update)&&o[0]&256&&t.update.call(null,(r=l[8].data)==null?void 0:r.message)},d(l){l&&k(e),i=!1,s()}}}function _L(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function c_(n){let e,t,i,s,l;return{c(){e=v("button"),t=v("span"),t.textContent="Reset",p(t,"class","txt"),p(e,"type","submit"),p(e,"class","btn btn-hint btn-transparent"),e.disabled=i=!n[9]||n[5]},m(o,r){w(o,e,r),b(e,t),s||(l=Y(e,"click",n[27]),s=!0)},p(o,r){r[0]&544&&i!==(i=!o[9]||o[5])&&(e.disabled=i)},d(o){o&&k(e),s=!1,l()}}}function bL(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,m,_,y,S,C,T,$,O,M,D,L,N,P;h=new Jo({props:{class:"btn-sm",tooltip:"Refresh"}}),h.$on("refresh",n[13]),m=new aL({props:{class:"btn-sm"}}),m.$on("success",n[13]);let F={};y=new lL({props:F}),n[15](y);function R(X,J){return X[6]?fL:uL}let q=R(n),B=q(n),G=n[6]&&!n[4]&&a_(n);return{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=W(n[10]),r=E(),a=v("div"),u=v("div"),f=v("div"),c=v("span"),c.textContent="Backup and restore your PocketBase data",d=E(),z(h.$$.fragment),g=E(),z(m.$$.fragment),_=E(),z(y.$$.fragment),S=E(),C=v("hr"),T=E(),$=v("button"),O=v("span"),O.textContent="Backups options",M=E(),B.c(),D=E(),G&&G.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(c,"class","txt-xl"),p(f,"class","flex m-b-sm flex-gap-10"),p(O,"class","txt"),p($,"type","button"),p($,"class","btn btn-secondary"),$.disabled=n[4],Q($,"btn-loading",n[4]),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(X,J){w(X,e,J),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(X,r,J),w(X,a,J),b(a,u),b(u,f),b(f,c),b(f,d),H(h,f,null),b(f,g),H(m,f,null),b(u,_),H(y,u,null),b(u,S),b(u,C),b(u,T),b(u,$),b($,O),b($,M),B.m($,null),b(u,D),G&&G.m(u,null),L=!0,N||(P=[Y($,"click",n[16]),Y(u,"submit",Ze(n[11]))],N=!0)},p(X,J){(!L||J[0]&1024)&&le(o,X[10]);const U={};y.$set(U),q!==(q=R(X))&&(B.d(1),B=q(X),B&&(B.c(),B.m($,null))),(!L||J[0]&16)&&($.disabled=X[4]),(!L||J[0]&16)&&Q($,"btn-loading",X[4]),X[6]&&!X[4]?G?(G.p(X,J),J[0]&80&&A(G,1)):(G=a_(X),G.c(),A(G,1),G.m(u,null)):G&&(re(),I(G,1,1,()=>{G=null}),ae())},i(X){L||(A(h.$$.fragment,X),A(m.$$.fragment,X),A(y.$$.fragment,X),A(G),L=!0)},o(X){I(h.$$.fragment,X),I(m.$$.fragment,X),I(