@sveltia/cms 0.58.1 → 0.58.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/sveltia-cms.js +2 -2
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +2 -2
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
package/dist/sveltia-cms.mjs
CHANGED
|
@@ -556,7 +556,7 @@ ${i}`.trim()}function CB(t,e){if(Sd(t)!=="object")throw new TypeError("stringify
|
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
558
|
`);if(a.push(...Object.values(c.project.repository).map(({lastCommit:u})=>u)),!o.length)break}return Object.fromEntries(t.map(({path:c,sha:u},d)=>{const{size:f,rawTextBlob:h}=s[d],p=a[d],g={sha:u,size:Number(f),text:h,meta:{}};if(p){const{author:m,authorName:b,authorEmail:_,committedDate:v}=p,{id:y,username:x}=m??{},k=y?.match(/\d+/);g.meta={commitAuthor:{name:b,email:_,id:k?Number(k[0]):void 0,login:x},committedDate:new Date(v)}}return[c,g]}))},i4=async()=>{await QB(),await SC({repository:Ns,fetchDefaultBranchName:e4,fetchLastCommit:t4,fetchFileList:n4,fetchFileContents:r4})},s4=async t=>{const{owner:e,repo:n,branch:r=""}=Ns,{path:i}=t;return Ed(`/projects/${encodeURIComponent(`${e}/${n}`)}/repository/files/${encodeURIComponent(i)}/raw?ref=${encodeURIComponent(r)}`,{},{responseType:"blob"})},o4=async(t,e)=>{const{owner:n,repo:r,branch:i}=Ns;return(await Ed(`/projects/${encodeURIComponent(`${n}/${r}`)}/repository/commits`,{method:"POST",body:{branch:i,commit_message:vC(t,e),actions:await Promise.all(t.map(async({action:o,path:a,previousPath:c,data:u="",base64:d})=>({action:o,content:d??(typeof u!="string"?await O1(u):u),encoding:d||typeof u!="string"?"base64":"text",file_path:a,previous_path:c})))}})).web_url},a4={name:ha,label:AC,repository:Ns,statusDashboardURL:GB,checkStatus:YB,getRepositoryInfo:OC,init:JB,signIn:ZB,signOut:XB,fetchFiles:i4,fetchBlob:s4,commitChanges:o4},PC="local",l4="Local Repository";let cv;const c4=new Proxy({},{get:(t,e)=>(cv??LB)[e]}),D_=st(null),uv="root_dir_handle";let Ah;const u4=async({forceReload:t=!1,showPicker:e=!0}={})=>{if(!("showDirectoryPicker"in window))throw new Error("unsupported");let n=t?null:await Ah?.get(uv)??null;if(n)if(await n.requestPermission({mode:"readwrite"})!=="granted")n=null;else try{await n.entries().next()}catch(r){n=null,console.error(r)}return!n&&e&&(n=await window.showDirectoryPicker(),n&&(await n.getDirectoryHandle(".git"),await Ah?.set(uv,n))),n},d4=async()=>{await Ah?.delete(uv)},f4=()=>{const{name:t}=te(_t).backend;cv=Vp[t]?.getRepositoryInfo?.();const{databaseName:e}=cv??{};Ah=e?new Do(e,"file-system-handles"):null},h4=async({auto:t=!1})=>{const e=await u4({showPicker:!t});if(e)D_.set(e);else throw new Error("Directory handle could not be acquired");return{backendName:PC}},p4=async()=>{d4()},Hc=async t=>{let e=te(D_);if(!t)return e;const n=jn(t).split("/"),r=!0;for(const i of n)e=await(i.includes(".")?e.getFileHandle(i,{create:r}):e.getDirectoryHandle(i,{create:r}));return e},g4=async()=>{const t=te(D_),e=[],n=Kl([...te(C_).map(({filePathMap:o,folderPathMap:a})=>Object.values(o||(a??{}))).flat(1),...te(ci).map(({internalPath:o})=>o)].map(o=>jn(o??""))),r=o=>new RegExp(`^${on(o)}\\b`),i=n.map(r),s=async o=>{for await(const[a,c]of o.entries()){if(a.startsWith("."))continue;const u=(await t?.resolve(c))?.join("/")??"",d=i.some(f=>f.test(u));if(c.kind==="file"){if(!d)continue;try{let f=await c.getFile();f=new File([f],f.name,{type:f.type,lastModified:f.lastModified}),e.push({file:f,path:u})}catch(f){console.error(f)}}if(c.kind==="directory"){const f=r(u);if(!d&&!n.some(h=>f.test(h)))continue;await s(c)}}};return await s(t),Promise.all(e.map(async({file:o,path:a})=>({file:o,path:a.normalize(),size:o.size,sha:await(async()=>{try{return await Sa(o)}catch(c){console.error(c)}return""})()})))},m4=async()=>{const{entryFiles:t,assetFiles:e}=lv(await g4());await Promise.all(t.map(async i=>{try{i.text=await iO(i.file)}catch(s){i.text="",console.error(s)}}));const{entries:n,errors:r}=await kC(t);ei.set(n),A_.set(r),Xt.set(bC(e)),nc.set(!0)},v4=async t=>Promise.all(t.map(async({action:e,path:n,previousPath:r,data:i})=>{try{let s;if(e==="move"&&r){const{dirname:o,basename:a}=Pn(n);s=await Hc(r),o&&o!==Pn(r).dirname?await s.move(await Hc(o),a):await s.move(a)}if(["create","update","move"].includes(e)&&i){s??=await Hc(n);const o=await s.createWritable();try{await o.write(i)}catch{}finally{await o.close()}return s.getFile()}if(e==="delete"){const{dirname:o="",basename:a}=Pn(jn(n));let c=await Hc(o);if(await c.removeEntry(a),!o)return null;const u=o.split("/");for(;;){const d=[];for await(const h of c.keys())d.push(h);if(d.length>1||!u.length)break;const f=u.pop();c=await Hc(u.join("/")),c.removeEntry(f)}}}catch(s){console.error(s)}return null})),b4={name:PC,label:l4,repository:c4,init:f4,signIn:h4,signOut:p4,fetchFiles:m4,commitChanges:v4},Vp={github:WB,gitlab:a4,local:b4},Is=st(),Nn=mr([Is],([t],e,n)=>{n(r=>{const i=t?Vp[t]:void 0;return i&&i!==r&&i.init(),i})}),Oh=st(!0),Td=st({message:"",canRetry:!1}),$a=st(!0),dv=t=>{let e=t.cause?.message||te(le)("unexpected_error"),n=!1;t.name==="NotFoundError"&&(e=te(le)("sign_in_error.not_project_root"),n=!0),t.name==="AbortError"&&(e=te(le)(te(Is)==="local"?"sign_in_error.picker_dismissed":"sign_in_error.authentication_aborted"),n=!0),Td.set({message:e,canRetry:n}),console.error(t.message,t.cause)},_4=async()=>{const t=await Zr.get("sveltia-cms.user")||await Zr.get("decap-cms-user")||await Zr.get("netlify-cms-user");let e=Kn(t)&&t.backendName?t:void 0;const n=e?.backendName?.replace("proxy","local")??te(_t)?.backend?.name;Is.set(n);const r=te(Nn);if(e&&r)try{e=await r.signIn({token:e.token,auto:!0})}catch{e=void 0}if($a.set(!e),!(!e||!r)){di.set(e);try{await r.fetchFiles(),Td.set({message:"",canRetry:!1})}catch(i){[401,403,404].includes(i.cause?.status)?$a.set(!0):dv(i)}}},p0=async t=>{Is.set(t);const e=te(Nn);if(!e)return;let n;try{n=await e.signIn({auto:!1})}catch(r){$a.set(!0),dv(r);return}if($a.set(!n),!!n){di.set(n);try{await e.fetchFiles(),Td.set({message:"",canRetry:!1})}catch(r){dv(r)}}},y4=async()=>{await te(Nn)?.signOut(),await Zr.delete("sveltia-cms.user"),Is.set(void 0),di.set(void 0),$a.set(!0),nc.set(!1)};var w4=F('<div role="alert" class="message"> </div>'),x4=F('<div role="alert"> </div>'),k4=F('<div role="alert"><!></div>'),S4=F('<div role="none"><!></div>'),E4=F("<!> <!>",1),T4=F("<!> <!>",1),C4=F('<div role="alert"> </div>'),A4=F('<div role="none" class="buttons svelte-8a6wia"><!> <!></div>');const O4={hash:"svelte-8a6wia",code:".buttons.svelte-8a6wia {display:flex;flex-direction:column;align-items:center;gap:16px;}.buttons.svelte-8a6wia button {width:240px;}"};function P4(t,e){se(e,!0),Te(t,O4);const[n,r]=ve(),i=()=>z(_t,"$siteConfig",n),s=()=>z($a,"$unauthenticated",n),o=()=>z(le,"$_",n),a=()=>z(Td,"$signInError",n);let c=ae(!1),u=ae(!1),d=ae(!1);const f=w(()=>i()?.backend?.name),h=w(()=>l(f)?Vp[l(f)]:null),p=w(()=>i()?.backend?.repo?.split("/")?.[1]);an(()=>{const{hostname:x}=window.location;L(c,ie(x==="127.0.0.1"||x==="localhost"||x.endsWith(".localhost"))),L(u,"showDirectoryPicker"in window),L(d,ie(navigator.userAgentData?.brands.some(({brand:k})=>k==="Brave")??!1)),_4()});var g=A4(),m=D(g);{var b=x=>{var k=w4(),S=D(k);q(C=>J(S,C),[()=>o()("signing_in")]),T(x,k)},_=x=>{var k=V(),S=M(k);{var C=A=>{var P=x4(),$=D(P);q(N=>J($,N),[()=>o()("config.error.unsupported_backend",{values:{name:l(f)}})]),T(A,P)},E=A=>{var P=T4(),$=M(P);const N=w(()=>o()("sign_in_with_x",{values:{service:l(h).label}}));Xe($,{variant:"primary",get label(){return l(N)},onclick:async()=>{await p0(l(f))}});var I=R($,2);{var U=H=>{var B=E4(),W=M(B);const G=w(()=>o()("work_with_local_repo")),X=w(()=>!l(u));Xe(W,{variant:"primary",get label(){return l(G)},get disabled(){return l(X)},onclick:async()=>{await p0("local")}});var re=R(W,2);{var K=ne=>{var ce=k4(),pe=D(ce);{var Q=de=>{var _e=V(),ge=M(_e);fr(ge,()=>li.sanitize(o()("local_backend.disabled").replace("<a>",'<a href="https://github.com/sveltia/sveltia-cms#enabling-local-development-in-brave" target="_blank">'),{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","target"]})),T(de,_e)},Z=de=>{var _e=We();q(ge=>J(_e,ge),[()=>o()("local_backend.unsupported_browser")]),T(de,_e)};j(pe,de=>{l(d)?de(Q):de(Z,!1)})}T(ne,ce)},Y=ne=>{var ce=V(),pe=M(ce);{var Q=Z=>{var de=S4(),_e=D(de);{var ge=fe=>{var Pe=We();q(Ae=>J(Pe,Ae),[()=>o()("work_with_local_repo_description",{values:{repo:l(p)}})]),T(fe,Pe)},me=fe=>{var Pe=We();q(Ae=>J(Pe,Ae),[()=>o()("work_with_local_repo_description_no_repo")]),T(fe,Pe)};j(_e,fe=>{l(p)?fe(ge):fe(me,!1)})}T(Z,de)};j(pe,Z=>{a().message||Z(Q)},!0)}T(ne,ce)};j(re,ne=>{l(u)?ne(Y,!1):ne(K)})}T(H,B)};j(I,H=>{l(c)&&H(U)})}T(A,P)};j(S,A=>{l(h)?A(E,!1):A(C)},!0)}T(x,k)};j(m,x=>{s()?x(_,!1):x(b)})}var v=R(m,2);{var y=x=>{var k=C4(),S=D(k);q(()=>J(S,a().message)),T(x,k)};j(v,x=>{a().message&&a().canRetry&&x(y)})}T(t,g),oe(),r()}const it=st(),Wi=st(!0);it.subscribe(t=>{te(St).devModeEnabled&&console.info("entryDraft",t)});const Wa=st(!1),fv=st(!1),tu=st({show:!1,multiple:!1}),hv=st({id:void 0,show:!1,status:"success",message:void 0,count:1,sourceLocale:void 0}),Xo=st(null),mo=st(null),wi=st(),rc=st(),Vs=t=>{it.update(e=>(e&&Object.entries(t).forEach(([n,r])=>{e.expanderStates._[n]!==r&&(e.expanderStates._[n]=r)}),e))},LC=({collectionName:t,fileName:e,valueMap:n,keyPath:r})=>{const i=new Set;return r.split(".").forEach((s,o,a)=>{const c=a.slice(0,o+1).join("."),u=bn({collectionName:t,fileName:e,valueMap:n,keyPath:c}),d=/\.\d+$/.test(c);if(u?.widget==="object")d&&i.add(c),i.add(`${c}#`);else if(u?.widget==="list")i.add(d?c:`${c}#`);else if(o>0){const f=a.slice(0,o).join("."),h=bn({collectionName:t,fileName:e,valueMap:n,keyPath:f});h?.widget==="object"&&h.fields&&i.add(`${f}.${h.name}#`),h?.widget==="list"&&h.field&&i.add(c)}}),[...i]},L4=({collectionName:t,fileName:e,currentValues:n})=>{const r={};Object.entries(te(it)?.validities??{}).forEach(([i,s])=>{Object.entries(s).forEach(([o,{valid:a}])=>{a||LC({collectionName:t,fileName:e,valueMap:n[i],keyPath:o}).forEach(c=>{r[c]=!0})})}),Vs(r)},$4=async({repository:t})=>{const{databaseName:e}=t??{},n=e?new Do(e,"ui-settings"):null,r="entry-view",i={showPreview:!0,syncScrolling:!0,selectAssetsView:{type:"grid"},...await n?.get(r)??{}};wi.set(i),rc.set(i.selectAssetsView),wi.subscribe(s=>{(async()=>{try{Rn(s,await n?.get(r))||await n?.set(r,s)}catch{}})()}),rc.subscribe(s=>{if(!s||!Object.keys(s).length)return;const o=te(wi)?.selectAssetsView??{};Rn(s,o)||wi.update(a=>({...a,selectAssetsView:s}))})};Nn.subscribe(t=>{t&&!te(wi)&&$4(t)});const $C=mr([Wa,Ko],([t,e])=>t||e),pv=st(""),hs=st(""),Cd=(t=window.location)=>{const{pathname:e,searchParams:n}=new URL(`${t.origin}${t.hash.substring(1)}`);return{path:decodeURIComponent(e),params:Object.fromEntries(n)}},Bn=(t,{state:e={},replaceState:n=!1,notifyChange:r=!0}={})=>{const i=window.location.hash,s=`#${t}`,o=[{...e,from:i},"",s];n?window.history.replaceState(...o):window.history.pushState(...o),r&&window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:i,newURL:s}))},Nl=(t,e={})=>{window.history.state?.from?window.history.back():Bn(t,e)},NC=()=>{const{display_url:t,_siteURL:e}=te(_t);window.open(t||e||"/","_blank")};var N4=F('<img alt="" class="logo svelte-4zxkou">'),I4=F('<div role="alert" class="message"> </div>'),D4=F('<div role="alert" class="message"> </div>'),R4=F('<div role="alert" class="message"> </div>'),M4=F('<div role="alert"><div role="none" class="message"> </div> <div role="none" class="error svelte-4zxkou"><!></div></div>'),F4=F('<div role="alert" class="message"> </div>'),z4=F('<div role="alert" class="message"> </div> <!>',1),j4=F('<div role="none" class="container svelte-4zxkou"><div role="none" class="inner svelte-4zxkou"><!> <h1 class="svelte-4zxkou">Sveltia CMS</h1> <!></div></div>');const U4={hash:"svelte-4zxkou",code:".container.svelte-4zxkou {position:absolute;inset:0;z-index:101;flex:auto;display:flex;justify-content:center;align-items:center;gap:16px;padding:32px;transition:filter 250ms;}.container[inert].svelte-4zxkou {filter:opacity(0);}.container.svelte-4zxkou .inner:where(.svelte-4zxkou) {display:flex;flex-direction:column;align-items:center;gap:32px;min-width:240px;max-width:800px;min-height:240px;}.container.svelte-4zxkou .logo:where(.svelte-4zxkou) {max-width:160px;height:auto;}.container.svelte-4zxkou h1:where(.svelte-4zxkou) {font-size:48px;}.container.svelte-4zxkou .logo:where(.svelte-4zxkou) ~ h1:where(.svelte-4zxkou) {font-size:var(--sui-font-size-xxx-large);}.container.svelte-4zxkou .message {margin:0 0 16px;font-size:var(--sui-font-size-large);font-weight:var(--sui-font-weight-normal);text-align:center;}.container.svelte-4zxkou .error:where(.svelte-4zxkou) {border-radius:var(--sui-control-medium-border-radius);padding:12px;background-color:var(--sui-secondary-background-color);font-size:var(--sui-font-size-default);line-height:1.5;text-align:center;}"};function B4(t,e){se(e,!0),Te(t,U4);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z(di,"$user",n),o=()=>z(nc,"$dataLoaded",n),a=()=>z(_t,"$siteConfig",n),c=()=>z(ov,"$siteConfigError",n),u=()=>z(Gm,"$prefsError",n),d=()=>z(St,"$prefs",n),f=()=>z(Td,"$signInError",n),h=()=>z(mE,"$inAuthPopup",n),p=()=>z($a,"$unauthenticated",n),g=()=>z(wa,"$dataLoadedProgress",n);Ue(()=>{ot(hs,i()("welcome_to_sveltia_cms"))});var m=j4(),b=D(m),_=D(b);{var v=S=>{var C=N4();const E=w(()=>a()?.logo_url);q(A=>Se(C,"src",A),[()=>l(E)||`data:image/svg+xml;base64,${btoa(rE)}`]),T(S,C)};j(_,S=>{(a()||c())&&S(v)})}var y=R(_,4);{var x=S=>{var C=I4(),E=D(C);q(A=>J(E,`${c().message??""}
|
|
559
|
-
${A??""}`),[()=>i()("config.error.try_again")]),T(S,C)},k=S=>{var C=V(),E=M(C);{var A=$=>{var N=D4(),I=D(N);q(U=>J(I,U),[()=>i()(`prefs.error.${u().type}`)]),T($,N)},P=$=>{var N=V(),I=M(N);{var U=B=>{var W=R4(),G=D(W);q(X=>J(G,X),[()=>i()("loading_site_config")]),T(B,W)},H=B=>{var W=V(),G=M(W);{var X=K=>{var Y=M4(),ne=D(Y),ce=D(ne),pe=R(ne,2),Q=D(pe);fr(Q,()=>li.sanitize(At.parseInline(f().message),{ALLOWED_TAGS:["a","code"],ALLOWED_ATTR:["href"]})),q(Z=>J(ce,Z),[()=>i()("loading_site_data_error")]),T(K,Y)},re=K=>{var Y=V(),ne=M(Y);{var ce=Q=>{var Z=F4(),de=D(Z);q(_e=>J(de,_e),[()=>i()("authorizing")]),T(Q,Z)},pe=Q=>{var Z=V(),de=M(Z);{var _e=me=>{P4(me,{})},ge=me=>{var fe=V(),Pe=M(fe);{var Ae=De=>{var He=z4(),Ve=M(He),mt=D(Ve),et=R(Ve,2);{var ye=we=>{v$(we,{get now(){return g()}})};j(et,we=>{g()!==void 0&&we(ye)})}q(we=>J(mt,we),[()=>i()("loading_site_data")]),T(De,He)};j(Pe,De=>{o()||De(Ae)},!0)}T(me,fe)};j(de,me=>{!s()||p()?me(_e):me(ge,!1)},!0)}T(Q,Z)};j(ne,Q=>{h()?Q(ce):Q(pe,!1)},!0)}T(K,Y)};j(G,K=>{f().message&&!f().canRetry?K(X):K(re,!1)},!0)}T(B,W)};j(I,B=>{!a()||!d()?B(U):B(H,!1)},!0)}T($,N)};j(E,$=>{u()?$(A):$(P,!1)},!0)}T(S,C)};j(y,S=>{c()?S(x):S(k,!1)})}q(()=>m.inert=s()&&o()),T(t,m),oe(),r()}var q4=F('<div role="alert"> <!></div>');const H4={hash:"svelte-1tew8xu",code:".wrapper.svelte-1tew8xu {flex:none;display:flex;align-items:center;justify-content:center;gap:8px;height:32px;text-align:center;border-bottom:1px solid transparent;font-size:var(--sui-font-size-small);}.wrapper.minor.svelte-1tew8xu {border-color:var(--sui-warning-border-color);color:var(--sui-warning-foreground-color);background-color:var(--sui-warning-background-color);}.wrapper.major.svelte-1tew8xu {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color);}.wrapper.svelte-1tew8xu button {font-size:inherit !important;}"};function V4(t,e){se(e,!0),Te(t,H4);const[n,r]=ve(),i=()=>z(Nn,"$backend",n),s=()=>z(_t,"$siteConfig",n),o=()=>z(le,"$_",n),a=5*60*1e3;let c=0,u=ae(!1),d=ae("none");const f=async()=>{i()?.checkStatus&&L(d,ie(await i().checkStatus()))},h=()=>{f(),c=window.setInterval(()=>{f()},a)},p=()=>{window.clearInterval(c),L(d,"none")},g=()=>{l(u)&&(i()?.checkStatus&&!s()?.backend.api_root?h():p())};an(()=>(L(u,!0),()=>{p()})),Ue(()=>{l(u),i(),s(),g()});var m=V(),b=M(m);{var _=v=>{var y=q4(),x=D(y),k=R(x);const S=w(()=>o()("details"));Xe(k,{variant:"link",get label(){return l(S)},onclick:()=>{window.open(i()?.statusDashboardURL,"_blank")}}),q(C=>{Br(y,`wrapper ${l(d)??""} svelte-1tew8xu`),J(x,`${C??""} `)},[()=>o()(`backend_status.${l(d)}_incident`,{values:{service:i()?.label}})]),T(v,y)};j(b,v=>{["minor","major"].includes(l(d))&&v(_)})}T(t,m),oe(),r()}const gv="0.58.1";var W4=F('<div role="alert" class="wrapper svelte-103hdap"> <!></div>');const G4={hash:"svelte-103hdap",code:".wrapper.svelte-103hdap {flex:none;display:flex;align-items:center;justify-content:center;gap:8px;height:32px;text-align:center;border-bottom:1px solid var(--sui-info-border-color);color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);font-size:var(--sui-font-size-small);}.wrapper.svelte-103hdap button {font-size:inherit !important;}"};function K4(t,e){se(e,!0),Te(t,G4);const[n,r]=ve(),i=()=>z(le,"$_",n),s=60*60*1e3,o=10*60*1e3;let a=0,c=0,u=ae(!1);const d=async()=>{try{const g=await fetch("https://unpkg.com/@sveltia/cms/package.json");if(!g.ok)return;const{version:m}=await g.json();m&&m!==gv&&(c=window.setTimeout(()=>{L(u,!0)},o))}catch{}};an(()=>{if(document.querySelector('script[src^="https://unpkg.com/@sveltia/cms"]'))return d(),a=window.setInterval(()=>{d()},s),()=>{window.clearInterval(a),window.clearTimeout(c)}});var f=V(),h=M(f);{var p=g=>{var m=W4(),b=D(m),_=R(b);const v=w(()=>i()("update_now"));Xe(_,{variant:"link",get label(){return l(v)},onclick:()=>{window.location.reload()}}),q(y=>J(b,`${y??""} `),[()=>i()("update_available")]),T(g,m)};j(h,g=>{l(u)&&g(p)})}T(t,f),oe(),r()}var Y4=F('<div role="none" class="empty svelte-17yv21"><!></div>');const J4={hash:"svelte-17yv21",code:".empty.svelte-17yv21 {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:16px;width:100%;height:100%;text-align:center;}"};function Ir(t,e){Te(t,J4);let n=O(e,"children",3,void 0);var r=Y4(),i=D(r);Ie(i,()=>n()??ze),T(t,r)}var Z4=F("<img>"),X4=F("<video></video>",2),Q4=F("<audio></audio>"),eq=F('<video playsinline="" class="svelte-1va4mre"></video>',2),tq=F('<img alt="" class="svelte-1va4mre">'),nq=F('<div role="none" class="blur svelte-1va4mre"><div role="none" class="overlay svelte-1va4mre"></div> <!></div>'),rq=F('<div role="none"><!> <!></div>');const iq={hash:"svelte-1va4mre",code:".preview.svelte-1va4mre {display:inline-flex;align-items:center;justify-content:center;position:relative;width:100%;height:100%;}.preview.tile.svelte-1va4mre {border-width:1px;border-style:solid;border-color:transparent;padding:var(--tile-padding, 12px);}.preview.tile.svelte-1va4mre .sui.icon {font-size:48px;}.preview.icon.svelte-1va4mre {border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size, 32px);height:var(--icon-size, 32px);}.preview.tile.svelte-1va4mre, .preview.icon.svelte-1va4mre {overflow:hidden;aspect-ratio:1/1;}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) {display:contents;}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) > :where(.svelte-1va4mre) {position:absolute;inset:0;pointer-events:none;}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) .overlay {z-index:-1;backdrop-filter:blur(32px) brightness(0.8);}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) :is(img, video) {width:100%;height:100%;z-index:-2;object-fit:cover;transform:scale(1.2);}.preview.cover.svelte-1va4mre {padding:0;}.preview.cover.svelte-1va4mre > :is(img, video) {flex:auto;}.preview.svelte-1va4mre > :is(img, video) {flex:0;max-width:100%;max-height:100%;}.preview.dissolve.svelte-1va4mre :is(img, video) {opacity:0;transition:opacity 250ms;}.preview.dissolve.loaded.svelte-1va4mre :is(img, video) {opacity:1;}.checkerboard.svelte-1va4mre img:where(.svelte-1va4mre) {background-image:linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%), linear-gradient(45deg, #ccc 25%, #fff 25%, #fff 75%, #ccc 75%);background-size:8px 8px;background-position:0 0, 4px 4px;}.svelte-1va4mre:not(.checkerboard) img:where(.svelte-1va4mre) {background-color:#e5e5e5;}:is(img, video) {object-fit:contain;}.svelte-1va4mre:is(img, video):not([src]) {visibility:hidden;}.cover.svelte-1va4mre :is(img, video) {object-fit:cover;aspect-ratio:1/1;}"};function Cs(t,e){se(e,!0),Te(t,iq);let n=O(e,"loading",3,"lazy"),r=O(e,"asset",3,void 0),i=O(e,"src",15,void 0),s=O(e,"variant",3,void 0),o=O(e,"blurBackground",3,!1),a=O(e,"cover",3,!1),c=O(e,"checkerboard",3,!1),u=O(e,"dissolve",3,!0),d=O(e,"alt",3,""),f=O(e,"controls",3,!1),h=at(e,["$$slots","$$events","$$legacy","kind","loading","asset","src","variant","blurBackground","cover","checkerboard","dissolve","alt","controls"]),p=ae(void 0),g=ae(!1),m=ae(!1);const b=w(()=>!!r()&&!!s()),_=w(()=>l(b)||e.kind==="image"||r()?.name.endsWith(".pdf"));let v=!1;const y=async()=>{if(!(!r()||!l(p)||v)){v=!0,L(g,!1),n()==="lazy"&&await wu(l(p));try{i(l(b)?await pC(r()):await k_(r()))}catch{L(g,!0)}v=!1}},x=async()=>{!l(p)||!i()||((l(_)?!l(p).complete:!l(p).readyState)&&await new Promise($=>{l(p)?.addEventListener(l(_)?"load":"loadedmetadata",()=>{$(void 0)},{once:!0})}),u()&&await wu(l(p)),L(m,!0),r()&&l(b)&&i().startsWith("blob:")&&URL.revokeObjectURL(i()))};Ue(()=>{l(p),r(),y()}),Ue(()=>{l(p),i(),x()});var k=rq(),S=D(k);{var C=$=>{rt($,{name:"draft"})},E=$=>{var N=V(),I=M(N);{var U=B=>{var W=Z4();let G;Ot(W,X=>L(p,X),()=>l(p)),q(()=>G=xt(W,G,{loading:n(),src:i(),alt:d(),...h},"svelte-1va4mre")),T(B,W)},H=B=>{var W=V(),G=M(W);{var X=K=>{var Y=X4();let ne;Ot(Y,ce=>L(p,ce),()=>l(p)),q(()=>ne=xt(Y,ne,{src:i(),controls:f()||void 0,playsinline:!0,...h},"svelte-1va4mre")),T(K,Y)},re=K=>{var Y=V(),ne=M(Y);{var ce=Q=>{var Z=V(),de=M(Z);{var _e=me=>{var fe=Q4();let Pe;Ot(fe,Ae=>L(p,Ae),()=>l(p)),q(()=>Pe=xt(fe,Pe,{src:i(),controls:!0,playsinline:!0,...h},"svelte-1va4mre")),T(me,fe)},ge=me=>{rt(me,{name:"audio_file"})};j(de,me=>{f()?me(_e):me(ge,!1)})}T(Q,Z)},pe=Q=>{rt(Q,{name:"draft"})};j(ne,Q=>{e.kind==="audio"?Q(ce):Q(pe,!1)},!0)}T(K,Y)};j(G,K=>{e.kind==="video"?K(X):K(re,!1)},!0)}T(B,W)};j(I,B=>{l(_)?B(U):B(H,!1)},!0)}T($,N)};j(S,$=>{l(g)?$(C):$(E,!1)})}var A=R(S,2);{var P=$=>{var N=nq(),I=R(D(N),2);{var U=B=>{var W=eq();q(()=>Se(W,"src",i())),T(B,W)},H=B=>{var W=tq();q(()=>{Se(W,"loading",n()),Se(W,"src",i())}),T(B,W)};j(I,B=>{e.kind==="video"?B(U):B(H,!1)})}T($,N)};j(A,$=>{o()&&$(P)})}q(()=>{Br(k,`preview ${s()??""} svelte-1va4mre`),dt(k,"cover",a()),dt(k,"checkerboard",c()),dt(k,"dissolve",u()),dt(k,"loaded",l(m))}),T(t,k),oe()}const sq=/^(?:\d{4}-[01]\d-[0-3]\d)?(?:T?[0-2]\d:[0-5]\d)?(?::[0-5]\d)?(?:\.\d+)?(?:[+-][0-2]\d:[0-5]\d|Z)?$/,mv={year:"numeric",month:"short",day:"numeric"},vv={hour:"numeric",minute:"numeric",hour12:!0},g0=(t,e)=>{let n=()=>e?.().link,r=()=>e?.().collectionLabel,i=()=>e?.().entryLabel;var s=aq(),o=D(s);Xe(o,{role:"link",variant:"link",onclick:()=>Bn(n()),children:(a,c)=>{var u=oq(),d=D(u);q(()=>J(d,`${r()??""} › ${i()??""}`)),T(a,u)},$$slots:{default:!0}}),T(t,s)};var oq=F('<span role="none"> </span>'),aq=F("<p><!></p>"),lq=F('<div role="none" class="preview svelte-1i169qh"><!></div>'),cq=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),uq=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),dq=F('<a target="_blank"> </a>'),fq=F("<a> </a>"),hq=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),pq=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),gq=F("<p> </p>"),mq=F('<div role="none" class="detail svelte-1i169qh"><!> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section> <!> <!> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p><!></p></section> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p><!></p></section> <!> <!> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <!></section></div>');const vq={hash:"svelte-1i169qh",code:".detail.svelte-1i169qh {flex:none;overflow-x:hidden;overflow-y:auto;padding:16px;width:320px;}.detail.svelte-1i169qh .preview:where(.svelte-1i169qh) {overflow:hidden;margin:0 0 16px;border-radius:var(--sui-control-large-border-radius);background-color:var(--sui-content-background-color);aspect-ratio:1/1;}.detail.svelte-1i169qh section:where(.svelte-1i169qh) {margin:0 0 16px;}.detail.svelte-1i169qh section:where(.svelte-1i169qh) > * {margin:0 0 4px;word-break:break-all;}.detail.svelte-1i169qh h4:where(.svelte-1i169qh) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}"};function IC(t,e){se(e,!0),Te(t,vq);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z($n,"$appLocale",n);let o=O(e,"showPreview",3,!1),a=ae(ie({...Th}));const c=w(()=>e.asset.path),u=w(()=>e.asset.size),d=w(()=>e.asset.kind),f=w(()=>e.asset.commitAuthor),h=w(()=>e.asset.commitDate),p=w(()=>l(a).publicURL),g=w(()=>l(a).repoBlobURL),m=w(()=>l(a).dimensions),b=w(()=>l(a).duration),_=w(()=>l(a).usedEntries),v=w(()=>Pn(l(c))),y=w(()=>nt(l(v).extension,"")),x=w(()=>jp(l(d))||l(c).endsWith(".pdf")),k=async()=>{L(a,ie(e.asset?await Bp(e.asset):{...Th}))};Ue(()=>{e.asset,k()});var S=mq(),C=D(S);{var E=he=>{var Ce=lq(),je=D(Ce);const Ye=w(()=>l(d)==="image"),ut=w(()=>["audio","video"].includes(l(d)));Cs(je,{get kind(){return l(d)},get asset(){return e.asset},variant:"tile",get checkerboard(){return l(Ye)},get controls(){return l(ut)}}),T(he,Ce)};j(C,he=>{o()&&l(x)&&he(E)})}var A=R(C,2),P=D(A),$=D(P),N=R(P,2),I=D(N),U=R(A,2),H=D(U),B=D(H),W=R(H,2),G=D(W),X=R(U,2);{var re=he=>{var Ce=cq(),je=D(Ce),Ye=D(je),ut=R(je,2),lt=D(ut);q(Ke=>{J(Ye,Ke),J(lt,l(m)?`${l(m).width}×${l(m).height}`:"–")},[()=>i()("dimensions")]),T(he,Ce)};j(X,he=>{l(x)&&he(re)})}var K=R(X,2);{var Y=he=>{var Ce=uq(),je=D(Ce),Ye=D(je),ut=R(je,2),lt=D(ut);q((Ke,tt)=>{J(Ye,Ke),J(lt,tt)},[()=>i()("duration"),()=>l(b)?YU(l(b)):"–"]),T(he,Ce)};j(K,he=>{["audio","video"].includes(l(d))&&he(Y)})}var ne=R(K,2),ce=D(ne),pe=D(ce),Q=R(ce,2),Z=D(Q);{var de=he=>{var Ce=dq(),je=D(Ce);q(()=>{Se(Ce,"href",l(p)),J(je,l(p))}),T(he,Ce)},_e=he=>{var Ce=We("–");T(he,Ce)};j(Z,he=>{l(p)?he(de):he(_e,!1)})}var ge=R(ne,2),me=D(ge),fe=D(me),Pe=R(me,2),Ae=D(Pe);{var De=he=>{var Ce=fq(),je=D(Ce);q(()=>{Se(Ce,"href",l(g)),J(je,`/${l(c)??""}`)}),T(he,Ce)},He=he=>{var Ce=We();q(()=>J(Ce,`/${l(c)??""}`)),T(he,Ce)};j(Ae,he=>{l(g)?he(De):he(He,!1)})}var Ve=R(ge,2);{var mt=he=>{var Ce=hq(),je=D(Ce),Ye=D(je),ut=R(je,2),lt=D(ut);q(Ke=>{J(Ye,Ke),J(lt,l(f).name||l(f).login||l(f).email)},[()=>i()("sort_keys.commit_author")]),T(he,Ce)};j(Ve,he=>{l(f)&&he(mt)})}var et=R(Ve,2);{var ye=he=>{var Ce=pq(),je=D(Ce),Ye=D(je),ut=R(je,2),lt=D(ut);q((Ke,tt)=>{J(Ye,Ke),J(lt,tt)},[()=>i()("sort_keys.commit_date"),()=>l(h).toLocaleString(s()??void 0,{...mv,...vv})]),T(he,Ce)};j(et,he=>{l(h)&&he(ye)})}var we=R(et,2),xe=D(we),ke=D(xe),$e=R(xe,2);ht($e,17,()=>l(_),he=>he.sha,(he,Ce)=>{var je=V(),Ye=M(je);ht(Ye,17,()=>so(l(Ce)),ut=>ut.name,(ut,lt)=>{var Ke=V();const tt=w(()=>l(lt).label||l(lt).name);var Et=M(Ke);ht(Et,17,()=>Go(l(lt),l(Ce)),Bt=>Bt.name,(Bt,un)=>{g0(Bt,()=>({link:`/collections/${l(lt).name}/entries/${l(un).name}`,collectionLabel:l(tt),entryLabel:l(un).label||l(un).name}))},Bt=>{var un=Ge(()=>({link:`/collections/${l(lt).name}/entries/${l(Ce).subPath}`,collectionLabel:l(tt),entryLabel:Fo(l(lt),l(Ce),{useTemplate:!0})}));g0(Bt,()=>l(un))}),T(ut,Ke)}),T(he,je)},he=>{var Ce=gq(),je=D(Ce);q(Ye=>J(je,Ye),[()=>i()("sort_keys.none")]),T(he,Ce)}),q((he,Ce,je,Ye,ut,lt,Ke)=>{J($,he),J(I,Ce),J(B,je),J(G,Ye),J(pe,ut),J(fe,lt),J(ke,Ke)},[()=>i()("kind"),()=>i()(`file_type_labels.${l(y)}`,{default:Wo.getType(l(c))??l(y).toUpperCase()}),()=>i()("size"),()=>s()?b_(l(u)):"",()=>i()("public_url"),()=>i()("file_path"),()=>i()("used_in")]),T(t,S),oe(),r()}var bq=F("<!> <!> <!>",1),_q=F("<!> <!>",1);function DC(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=O(e,"assets",19,()=>[]),o=ae(ie([])),a=ae(!1);const c=ie({show:!1,text:"",status:"success"}),u=w(()=>s().length===1),d=w(()=>l(o).filter(({publicURL:S})=>!!S).map(({publicURL:S})=>S));let f;const h=async()=>{if(f=void 0,!l(u))return!1;const S=await Va(s()[0]);return f=S,_u(S.type)?!0:S.type.startsWith("image/")?typeof navigator.clipboard.write=="function":!1},p=async()=>{await navigator.clipboard.writeText(l(d).join(`
|
|
559
|
+
${A??""}`),[()=>i()("config.error.try_again")]),T(S,C)},k=S=>{var C=V(),E=M(C);{var A=$=>{var N=D4(),I=D(N);q(U=>J(I,U),[()=>i()(`prefs.error.${u().type}`)]),T($,N)},P=$=>{var N=V(),I=M(N);{var U=B=>{var W=R4(),G=D(W);q(X=>J(G,X),[()=>i()("loading_site_config")]),T(B,W)},H=B=>{var W=V(),G=M(W);{var X=K=>{var Y=M4(),ne=D(Y),ce=D(ne),pe=R(ne,2),Q=D(pe);fr(Q,()=>li.sanitize(At.parseInline(f().message),{ALLOWED_TAGS:["a","code"],ALLOWED_ATTR:["href"]})),q(Z=>J(ce,Z),[()=>i()("loading_site_data_error")]),T(K,Y)},re=K=>{var Y=V(),ne=M(Y);{var ce=Q=>{var Z=F4(),de=D(Z);q(_e=>J(de,_e),[()=>i()("authorizing")]),T(Q,Z)},pe=Q=>{var Z=V(),de=M(Z);{var _e=me=>{P4(me,{})},ge=me=>{var fe=V(),Pe=M(fe);{var Ae=De=>{var He=z4(),Ve=M(He),mt=D(Ve),et=R(Ve,2);{var ye=we=>{v$(we,{get now(){return g()}})};j(et,we=>{g()!==void 0&&we(ye)})}q(we=>J(mt,we),[()=>i()("loading_site_data")]),T(De,He)};j(Pe,De=>{o()||De(Ae)},!0)}T(me,fe)};j(de,me=>{!s()||p()?me(_e):me(ge,!1)},!0)}T(Q,Z)};j(ne,Q=>{h()?Q(ce):Q(pe,!1)},!0)}T(K,Y)};j(G,K=>{f().message&&!f().canRetry?K(X):K(re,!1)},!0)}T(B,W)};j(I,B=>{!a()||!d()?B(U):B(H,!1)},!0)}T($,N)};j(E,$=>{u()?$(A):$(P,!1)},!0)}T(S,C)};j(y,S=>{c()?S(x):S(k,!1)})}q(()=>m.inert=s()&&o()),T(t,m),oe(),r()}var q4=F('<div role="alert"> <!></div>');const H4={hash:"svelte-1tew8xu",code:".wrapper.svelte-1tew8xu {flex:none;display:flex;align-items:center;justify-content:center;gap:8px;height:32px;text-align:center;border-bottom:1px solid transparent;font-size:var(--sui-font-size-small);}.wrapper.minor.svelte-1tew8xu {border-color:var(--sui-warning-border-color);color:var(--sui-warning-foreground-color);background-color:var(--sui-warning-background-color);}.wrapper.major.svelte-1tew8xu {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color);}.wrapper.svelte-1tew8xu button {font-size:inherit !important;}"};function V4(t,e){se(e,!0),Te(t,H4);const[n,r]=ve(),i=()=>z(Nn,"$backend",n),s=()=>z(_t,"$siteConfig",n),o=()=>z(le,"$_",n),a=5*60*1e3;let c=0,u=ae(!1),d=ae("none");const f=async()=>{i()?.checkStatus&&L(d,ie(await i().checkStatus()))},h=()=>{f(),c=window.setInterval(()=>{f()},a)},p=()=>{window.clearInterval(c),L(d,"none")},g=()=>{l(u)&&(i()?.checkStatus&&!s()?.backend.api_root?h():p())};an(()=>(L(u,!0),()=>{p()})),Ue(()=>{l(u),i(),s(),g()});var m=V(),b=M(m);{var _=v=>{var y=q4(),x=D(y),k=R(x);const S=w(()=>o()("details"));Xe(k,{variant:"link",get label(){return l(S)},onclick:()=>{window.open(i()?.statusDashboardURL,"_blank")}}),q(C=>{Br(y,`wrapper ${l(d)??""} svelte-1tew8xu`),J(x,`${C??""} `)},[()=>o()(`backend_status.${l(d)}_incident`,{values:{service:i()?.label}})]),T(v,y)};j(b,v=>{["minor","major"].includes(l(d))&&v(_)})}T(t,m),oe(),r()}const gv="0.58.2";var W4=F('<div role="alert" class="wrapper svelte-103hdap"> <!></div>');const G4={hash:"svelte-103hdap",code:".wrapper.svelte-103hdap {flex:none;display:flex;align-items:center;justify-content:center;gap:8px;height:32px;text-align:center;border-bottom:1px solid var(--sui-info-border-color);color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);font-size:var(--sui-font-size-small);}.wrapper.svelte-103hdap button {font-size:inherit !important;}"};function K4(t,e){se(e,!0),Te(t,G4);const[n,r]=ve(),i=()=>z(le,"$_",n),s=60*60*1e3,o=10*60*1e3;let a=0,c=0,u=ae(!1);const d=async()=>{try{const g=await fetch("https://unpkg.com/@sveltia/cms/package.json");if(!g.ok)return;const{version:m}=await g.json();m&&m!==gv&&(c=window.setTimeout(()=>{L(u,!0)},o))}catch{}};an(()=>{if(document.querySelector('script[src^="https://unpkg.com/@sveltia/cms"]'))return d(),a=window.setInterval(()=>{d()},s),()=>{window.clearInterval(a),window.clearTimeout(c)}});var f=V(),h=M(f);{var p=g=>{var m=W4(),b=D(m),_=R(b);const v=w(()=>i()("update_now"));Xe(_,{variant:"link",get label(){return l(v)},onclick:()=>{window.location.reload()}}),q(y=>J(b,`${y??""} `),[()=>i()("update_available")]),T(g,m)};j(h,g=>{l(u)&&g(p)})}T(t,f),oe(),r()}var Y4=F('<div role="none" class="empty svelte-17yv21"><!></div>');const J4={hash:"svelte-17yv21",code:".empty.svelte-17yv21 {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:16px;width:100%;height:100%;text-align:center;}"};function Ir(t,e){Te(t,J4);let n=O(e,"children",3,void 0);var r=Y4(),i=D(r);Ie(i,()=>n()??ze),T(t,r)}var Z4=F("<img>"),X4=F("<video></video>",2),Q4=F("<audio></audio>"),eq=F('<video playsinline="" class="svelte-1va4mre"></video>',2),tq=F('<img alt="" class="svelte-1va4mre">'),nq=F('<div role="none" class="blur svelte-1va4mre"><div role="none" class="overlay svelte-1va4mre"></div> <!></div>'),rq=F('<div role="none"><!> <!></div>');const iq={hash:"svelte-1va4mre",code:".preview.svelte-1va4mre {display:inline-flex;align-items:center;justify-content:center;position:relative;width:100%;height:100%;}.preview.tile.svelte-1va4mre {border-width:1px;border-style:solid;border-color:transparent;padding:var(--tile-padding, 12px);}.preview.tile.svelte-1va4mre .sui.icon {font-size:48px;}.preview.icon.svelte-1va4mre {border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size, 32px);height:var(--icon-size, 32px);}.preview.tile.svelte-1va4mre, .preview.icon.svelte-1va4mre {overflow:hidden;aspect-ratio:1/1;}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) {display:contents;}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) > :where(.svelte-1va4mre) {position:absolute;inset:0;pointer-events:none;}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) .overlay {z-index:-1;backdrop-filter:blur(32px) brightness(0.8);}.preview.svelte-1va4mre .blur:where(.svelte-1va4mre) :is(img, video) {width:100%;height:100%;z-index:-2;object-fit:cover;transform:scale(1.2);}.preview.cover.svelte-1va4mre {padding:0;}.preview.cover.svelte-1va4mre > :is(img, video) {flex:auto;}.preview.svelte-1va4mre > :is(img, video) {flex:0;max-width:100%;max-height:100%;}.preview.dissolve.svelte-1va4mre :is(img, video) {opacity:0;transition:opacity 250ms;}.preview.dissolve.loaded.svelte-1va4mre :is(img, video) {opacity:1;}.checkerboard.svelte-1va4mre img:where(.svelte-1va4mre) {background-image:linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%), linear-gradient(45deg, #ccc 25%, #fff 25%, #fff 75%, #ccc 75%);background-size:8px 8px;background-position:0 0, 4px 4px;}.svelte-1va4mre:not(.checkerboard) img:where(.svelte-1va4mre) {background-color:#e5e5e5;}:is(img, video) {object-fit:contain;}.svelte-1va4mre:is(img, video):not([src]) {visibility:hidden;}.cover.svelte-1va4mre :is(img, video) {object-fit:cover;aspect-ratio:1/1;}"};function Cs(t,e){se(e,!0),Te(t,iq);let n=O(e,"loading",3,"lazy"),r=O(e,"asset",3,void 0),i=O(e,"src",15,void 0),s=O(e,"variant",3,void 0),o=O(e,"blurBackground",3,!1),a=O(e,"cover",3,!1),c=O(e,"checkerboard",3,!1),u=O(e,"dissolve",3,!0),d=O(e,"alt",3,""),f=O(e,"controls",3,!1),h=at(e,["$$slots","$$events","$$legacy","kind","loading","asset","src","variant","blurBackground","cover","checkerboard","dissolve","alt","controls"]),p=ae(void 0),g=ae(!1),m=ae(!1);const b=w(()=>!!r()&&!!s()),_=w(()=>l(b)||e.kind==="image"||r()?.name.endsWith(".pdf"));let v=!1;const y=async()=>{if(!(!r()||!l(p)||v)){v=!0,L(g,!1),n()==="lazy"&&await wu(l(p));try{i(l(b)?await pC(r()):await k_(r()))}catch{L(g,!0)}v=!1}},x=async()=>{!l(p)||!i()||((l(_)?!l(p).complete:!l(p).readyState)&&await new Promise($=>{l(p)?.addEventListener(l(_)?"load":"loadedmetadata",()=>{$(void 0)},{once:!0})}),u()&&await wu(l(p)),L(m,!0),r()&&l(b)&&i().startsWith("blob:")&&URL.revokeObjectURL(i()))};Ue(()=>{l(p),r(),y()}),Ue(()=>{l(p),i(),x()});var k=rq(),S=D(k);{var C=$=>{rt($,{name:"draft"})},E=$=>{var N=V(),I=M(N);{var U=B=>{var W=Z4();let G;Ot(W,X=>L(p,X),()=>l(p)),q(()=>G=xt(W,G,{loading:n(),src:i(),alt:d(),...h},"svelte-1va4mre")),T(B,W)},H=B=>{var W=V(),G=M(W);{var X=K=>{var Y=X4();let ne;Ot(Y,ce=>L(p,ce),()=>l(p)),q(()=>ne=xt(Y,ne,{src:i(),controls:f()||void 0,playsinline:!0,...h},"svelte-1va4mre")),T(K,Y)},re=K=>{var Y=V(),ne=M(Y);{var ce=Q=>{var Z=V(),de=M(Z);{var _e=me=>{var fe=Q4();let Pe;Ot(fe,Ae=>L(p,Ae),()=>l(p)),q(()=>Pe=xt(fe,Pe,{src:i(),controls:!0,playsinline:!0,...h},"svelte-1va4mre")),T(me,fe)},ge=me=>{rt(me,{name:"audio_file"})};j(de,me=>{f()?me(_e):me(ge,!1)})}T(Q,Z)},pe=Q=>{rt(Q,{name:"draft"})};j(ne,Q=>{e.kind==="audio"?Q(ce):Q(pe,!1)},!0)}T(K,Y)};j(G,K=>{e.kind==="video"?K(X):K(re,!1)},!0)}T(B,W)};j(I,B=>{l(_)?B(U):B(H,!1)},!0)}T($,N)};j(S,$=>{l(g)?$(C):$(E,!1)})}var A=R(S,2);{var P=$=>{var N=nq(),I=R(D(N),2);{var U=B=>{var W=eq();q(()=>Se(W,"src",i())),T(B,W)},H=B=>{var W=tq();q(()=>{Se(W,"loading",n()),Se(W,"src",i())}),T(B,W)};j(I,B=>{e.kind==="video"?B(U):B(H,!1)})}T($,N)};j(A,$=>{o()&&$(P)})}q(()=>{Br(k,`preview ${s()??""} svelte-1va4mre`),dt(k,"cover",a()),dt(k,"checkerboard",c()),dt(k,"dissolve",u()),dt(k,"loaded",l(m))}),T(t,k),oe()}const sq=/^(?:\d{4}-[01]\d-[0-3]\d)?(?:T?[0-2]\d:[0-5]\d)?(?::[0-5]\d)?(?:\.\d+)?(?:[+-][0-2]\d:[0-5]\d|Z)?$/,mv={year:"numeric",month:"short",day:"numeric"},vv={hour:"numeric",minute:"numeric",hour12:!0},g0=(t,e)=>{let n=()=>e?.().link,r=()=>e?.().collectionLabel,i=()=>e?.().entryLabel;var s=aq(),o=D(s);Xe(o,{role:"link",variant:"link",onclick:()=>Bn(n()),children:(a,c)=>{var u=oq(),d=D(u);q(()=>J(d,`${r()??""} › ${i()??""}`)),T(a,u)},$$slots:{default:!0}}),T(t,s)};var oq=F('<span role="none"> </span>'),aq=F("<p><!></p>"),lq=F('<div role="none" class="preview svelte-1i169qh"><!></div>'),cq=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),uq=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),dq=F('<a target="_blank"> </a>'),fq=F("<a> </a>"),hq=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),pq=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),gq=F("<p> </p>"),mq=F('<div role="none" class="detail svelte-1i169qh"><!> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section> <!> <!> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p><!></p></section> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p><!></p></section> <!> <!> <section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <!></section></div>');const vq={hash:"svelte-1i169qh",code:".detail.svelte-1i169qh {flex:none;overflow-x:hidden;overflow-y:auto;padding:16px;width:320px;}.detail.svelte-1i169qh .preview:where(.svelte-1i169qh) {overflow:hidden;margin:0 0 16px;border-radius:var(--sui-control-large-border-radius);background-color:var(--sui-content-background-color);aspect-ratio:1/1;}.detail.svelte-1i169qh section:where(.svelte-1i169qh) {margin:0 0 16px;}.detail.svelte-1i169qh section:where(.svelte-1i169qh) > * {margin:0 0 4px;word-break:break-all;}.detail.svelte-1i169qh h4:where(.svelte-1i169qh) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}"};function IC(t,e){se(e,!0),Te(t,vq);const[n,r]=ve(),i=()=>z(le,"$_",n),s=()=>z($n,"$appLocale",n);let o=O(e,"showPreview",3,!1),a=ae(ie({...Th}));const c=w(()=>e.asset.path),u=w(()=>e.asset.size),d=w(()=>e.asset.kind),f=w(()=>e.asset.commitAuthor),h=w(()=>e.asset.commitDate),p=w(()=>l(a).publicURL),g=w(()=>l(a).repoBlobURL),m=w(()=>l(a).dimensions),b=w(()=>l(a).duration),_=w(()=>l(a).usedEntries),v=w(()=>Pn(l(c))),y=w(()=>nt(l(v).extension,"")),x=w(()=>jp(l(d))||l(c).endsWith(".pdf")),k=async()=>{L(a,ie(e.asset?await Bp(e.asset):{...Th}))};Ue(()=>{e.asset,k()});var S=mq(),C=D(S);{var E=he=>{var Ce=lq(),je=D(Ce);const Ye=w(()=>l(d)==="image"),ut=w(()=>["audio","video"].includes(l(d)));Cs(je,{get kind(){return l(d)},get asset(){return e.asset},variant:"tile",get checkerboard(){return l(Ye)},get controls(){return l(ut)}}),T(he,Ce)};j(C,he=>{o()&&l(x)&&he(E)})}var A=R(C,2),P=D(A),$=D(P),N=R(P,2),I=D(N),U=R(A,2),H=D(U),B=D(H),W=R(H,2),G=D(W),X=R(U,2);{var re=he=>{var Ce=cq(),je=D(Ce),Ye=D(je),ut=R(je,2),lt=D(ut);q(Ke=>{J(Ye,Ke),J(lt,l(m)?`${l(m).width}×${l(m).height}`:"–")},[()=>i()("dimensions")]),T(he,Ce)};j(X,he=>{l(x)&&he(re)})}var K=R(X,2);{var Y=he=>{var Ce=uq(),je=D(Ce),Ye=D(je),ut=R(je,2),lt=D(ut);q((Ke,tt)=>{J(Ye,Ke),J(lt,tt)},[()=>i()("duration"),()=>l(b)?YU(l(b)):"–"]),T(he,Ce)};j(K,he=>{["audio","video"].includes(l(d))&&he(Y)})}var ne=R(K,2),ce=D(ne),pe=D(ce),Q=R(ce,2),Z=D(Q);{var de=he=>{var Ce=dq(),je=D(Ce);q(()=>{Se(Ce,"href",l(p)),J(je,l(p))}),T(he,Ce)},_e=he=>{var Ce=We("–");T(he,Ce)};j(Z,he=>{l(p)?he(de):he(_e,!1)})}var ge=R(ne,2),me=D(ge),fe=D(me),Pe=R(me,2),Ae=D(Pe);{var De=he=>{var Ce=fq(),je=D(Ce);q(()=>{Se(Ce,"href",l(g)),J(je,`/${l(c)??""}`)}),T(he,Ce)},He=he=>{var Ce=We();q(()=>J(Ce,`/${l(c)??""}`)),T(he,Ce)};j(Ae,he=>{l(g)?he(De):he(He,!1)})}var Ve=R(ge,2);{var mt=he=>{var Ce=hq(),je=D(Ce),Ye=D(je),ut=R(je,2),lt=D(ut);q(Ke=>{J(Ye,Ke),J(lt,l(f).name||l(f).login||l(f).email)},[()=>i()("sort_keys.commit_author")]),T(he,Ce)};j(Ve,he=>{l(f)&&he(mt)})}var et=R(Ve,2);{var ye=he=>{var Ce=pq(),je=D(Ce),Ye=D(je),ut=R(je,2),lt=D(ut);q((Ke,tt)=>{J(Ye,Ke),J(lt,tt)},[()=>i()("sort_keys.commit_date"),()=>l(h).toLocaleString(s()??void 0,{...mv,...vv})]),T(he,Ce)};j(et,he=>{l(h)&&he(ye)})}var we=R(et,2),xe=D(we),ke=D(xe),$e=R(xe,2);ht($e,17,()=>l(_),he=>he.sha,(he,Ce)=>{var je=V(),Ye=M(je);ht(Ye,17,()=>so(l(Ce)),ut=>ut.name,(ut,lt)=>{var Ke=V();const tt=w(()=>l(lt).label||l(lt).name);var Et=M(Ke);ht(Et,17,()=>Go(l(lt),l(Ce)),Bt=>Bt.name,(Bt,un)=>{g0(Bt,()=>({link:`/collections/${l(lt).name}/entries/${l(un).name}`,collectionLabel:l(tt),entryLabel:l(un).label||l(un).name}))},Bt=>{var un=Ge(()=>({link:`/collections/${l(lt).name}/entries/${l(Ce).subPath}`,collectionLabel:l(tt),entryLabel:Fo(l(lt),l(Ce),{useTemplate:!0})}));g0(Bt,()=>l(un))}),T(ut,Ke)}),T(he,je)},he=>{var Ce=gq(),je=D(Ce);q(Ye=>J(je,Ye),[()=>i()("sort_keys.none")]),T(he,Ce)}),q((he,Ce,je,Ye,ut,lt,Ke)=>{J($,he),J(I,Ce),J(B,je),J(G,Ye),J(pe,ut),J(fe,lt),J(ke,Ke)},[()=>i()("kind"),()=>i()(`file_type_labels.${l(y)}`,{default:Wo.getType(l(c))??l(y).toUpperCase()}),()=>i()("size"),()=>s()?b_(l(u)):"",()=>i()("public_url"),()=>i()("file_path"),()=>i()("used_in")]),T(t,S),oe(),r()}var bq=F("<!> <!> <!>",1),_q=F("<!> <!>",1);function DC(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=O(e,"assets",19,()=>[]),o=ae(ie([])),a=ae(!1);const c=ie({show:!1,text:"",status:"success"}),u=w(()=>s().length===1),d=w(()=>l(o).filter(({publicURL:S})=>!!S).map(({publicURL:S})=>S));let f;const h=async()=>{if(f=void 0,!l(u))return!1;const S=await Va(s()[0]);return f=S,_u(S.type)?!0:S.type.startsWith("image/")?typeof navigator.clipboard.write=="function":!1},p=async()=>{await navigator.clipboard.writeText(l(d).join(`
|
|
560
560
|
`))},g=async()=>{await navigator.clipboard.writeText(s().map(({path:S})=>`/${S}`).join(`
|
|
561
561
|
`))},m=async()=>{let S=f;if(_u(S.type)){await navigator.clipboard.writeText(await S.text());return}if(!S.type.startsWith("image/"))throw new Error("Unsupported type");S.type!=="image/png"&&(S=await uC(S)),await navigator.clipboard.write([new ClipboardItem({"image/png":S})])},b=async(S,C,E)=>{try{await S(),c.status="success",c.text=l(u)?C:E}catch{c.status="error",c.text=i()("clipboard_error")}finally{c.show=!0}};Ue(()=>{(async()=>(L(o,ie(await Promise.all(s().map(Bp)))),L(a,ie(await h()))))()});var _=_q(),v=M(_);const y=w(()=>!s().length),x=w(()=>i()("copy"));Ar(v,{variant:"ghost",get disabled(){return l(y)},get label(){return l(x)},popupPosition:"bottom-right",popup:C=>{const E=w(()=>i()("copy_options"));gr(C,{get"aria-label"(){return l(E)},children:(A,P)=>{var $=bq(),N=M($);const I=w(()=>l(u)?i()("public_url"):i()("public_urls")),U=w(()=>!l(d).length);Nt(N,{get label(){return l(I)},get disabled(){return l(U)},onclick:()=>{b(p,i()("asset_url_copied"),i()("asset_urls_copied"))}});var H=R(N,2);const B=w(()=>l(u)?i()("file_path"):i()("file_paths"));Nt(H,{get label(){return l(B)},onclick:()=>{b(g,i()("asset_path_copied"),i()("asset_paths_copied"))}});var W=R(H,2);const G=w(()=>i()("file_data")),X=w(()=>!l(a));Nt(W,{get label(){return l(G)},get disabled(){return l(X)},onclick:()=>{b(m,i()("asset_data_copied"),i()("asset_data_copied"))}}),T(A,$)},$$slots:{default:!0}})},$$slots:{popup:!0}});var k=R(v,2);Gn(k,{get show(){return c.show},set show(S){c.show=S},children:(S,C)=>{Wn(S,{get status(){return c.status},children:(E,A)=>{var P=We();q(()=>J(P,c.text)),T(E,P)},$$slots:{default:!0}})},$$slots:{default:!0}}),T(t,_),oe(),r()}const Ga={saved:!1,moved:!1,renamed:!1,deleted:!1,published:!1,count:1},pu=st({...Ga}),RC=async(t,e=[])=>{const n=te(ei),r=t.map(i=>{const{locales:s,slug:o}=n.find(a=>a.id===i)??{};if(s)return Object.values(s).map(({path:a})=>({action:"delete",slug:o,path:a}))}).flat(1).filter((i,s,o)=>i&&o.findIndex(a=>a?.path===i.path)===s);e.length&&r.push(...e.map(i=>({action:"delete",path:i}))),await te(Nn)?.commitChanges(r,{commitType:"delete",collection:te(Un)}),ei.set(n.filter(i=>!t.includes(i.id))),pu.set({...Ga,deleted:!0,count:t.length}),e.length&&Xt.update(i=>i.filter(s=>!e.includes(s.path)))},yq=({fieldConfig:t,keyPath:e})=>{const n={},{default:r,output_code_only:i=!1,keys:s={code:"code",lang:"lang"}}=t;if(i)n[e]=typeof r=="string"?r:"";else{const o=Kn(r)?r:void 0,a=o?o[s.code]:r,c=o?o[s.lang]:"";n[e]={},n[`${e}.${s.code}`]=typeof a=="string"?a:"",n[`${e}.${s.lang}`]=typeof c=="string"?c:""}return n},MC=(t,e)=>{const{default:n}=t;return typeof n!="string"?n:n.replaceAll(/{{(.+?)}}/g,(r,i)=>i==="locale"?e:i==="datetime"?new Date().toJSON().replace(/\d+\.\d+Z$/,"00.000Z"):i==="uuid"?tr():i==="uuid_short"?tr("short"):i==="uuid_shorter"?tr("shorter"):"")},wq=t=>{const{default:e,required:n=!0}=t;return e&&Kn(e)?e:n?{"":""}:{}},R_=({entryDraft:t,keyPath:e,locale:n})=>Object.entries(te(t).currentValues[n]??{}).filter(([r])=>r.startsWith(`${e}.`)).map(([r,i])=>[r.replace(`${e}.`,""),i]),xq=({pairs:t,edited:e})=>t.map(([n],r,i)=>{if(!n.trim()&&e[r])return"empty";if(n.trim()&&i.findIndex(s=>s[0]===n)!==r)return"duplicate"}),kq=({entryDraft:t,keyPath:e,locale:n,fieldConfig:r,pairs:i})=>{const{i18n:s}=r;Wi.set(!1),t.update(o=>(o&&Object.entries(o.currentValues).forEach(([a,c])=>{(a===n||s==="duplicate")&&(Object.entries(c).forEach(([u])=>{u.startsWith(`${e}.`)&&delete c[u]}),i.forEach(([u,d])=>{c[`${e}.${u}`]=d}))}),o)),Wi.set(!0)},FC=t=>{const{prefix:e,use_b32_encoding:n}=t,r=n?tm():tr();return e?`${e}${r}`:r},Sq=({fieldConfig:t,keyPath:e,newContent:n,value:r})=>{const{widget:i="string"}=t,s=()=>{n[e]=[],r.split(/,\s*/).forEach((o,a)=>{n[`${e}.${a}`]=o})};if(i==="boolean"){n[e]=r==="true";return}if(i==="list"){const{field:o,fields:a,types:c}=t;if(!(!!o||!!a||!!c)){s();return}}if(i==="markdown"){n[e]=eO(r);return}if(i==="number"){const{value_type:o="int"}=t;if(o==="int"||o==="float"){const a=o==="int"?Number.parseInt(r,10):Number.parseFloat(r);Number.isNaN(a)||(n[e]=a)}else n[e]=r;return}if(i==="relation"||i==="select"){const{multiple:o=!1}=t;if(o){s();return}}n[e]=r},Wp=(t,e,n={})=>{const r={},i=({fieldConfig:s,keyPath:o})=>{if(o in n){Sq({fieldConfig:s,keyPath:o,newContent:r,value:n[o]});return}const{widget:a="string",default:c}=s,u=kd({fieldConfig:s,locale:e}),d=Array.isArray(c)&&!!c.length;if(a==="list"){const{fields:f}=s;if(!d){r[o]=[];return}if(f){c.forEach((h,p)=>{Object.entries(h).forEach(([g,m])=>{r[[o,p,g].join(".")]=m})});return}c.forEach((h,p)=>{r[[o,p].join(".")]=h});return}if(a==="object"){const{fields:f,types:h}=s;!u||Array.isArray(h)?r[o]=null:f?.forEach(p=>{i({keyPath:[o,p.name].join("."),fieldConfig:p})});return}if(a==="boolean"){r[o]=typeof c=="boolean"?c:!1;return}if(a==="code"){Object.assign(r,yq({fieldConfig:s,keyPath:o}));return}if(a==="relation"||a==="select"){const{multiple:f=!1}=s;if(f){d?c.forEach((h,p)=>{r[[o,p].join(".")]=h}):r[o]=[];return}}if(a==="datetime"){r[o]=PU(s);return}if(a==="hidden"){r[o]=MC(s,e);return}if(a==="keyvalue"){Object.entries(wq(s)).forEach(([f,h])=>{r[`${o}.${f}`]=String(h)});return}r[o]=c!==void 0?c:""};return t.forEach(s=>{i({keyPath:s.name,fieldConfig:s})}),r},M_=({draft:{collectionName:t,fileName:e},locale:n,target:r={},getValueMap:i=void 0})=>{const s=Ii(t),o=e?s?._fileMap[e]:void 0;if(!s||e&&!o)return;const{defaultLocale:a,canonicalSlug:{key:c}}=(o??s)._i18n;return new Proxy(r,{set:(u,d,f)=>{if(u[d]!==f&&(u[d]=f),[c].includes(d))return!0;const h=typeof i=="function"?i():u,p=bn({collectionName:t,fileName:e,valueMap:h,keyPath:d});if(!p)return!0;const g=te(it)?.validities?.[n]?.[d];return g&&typeof f=="string"&&kd({fieldConfig:p,locale:n})&&(g.valueMissing=!f),te(Wi)&&p.i18n==="duplicate"&&n===a&&Object.entries(te(it).currentValues).forEach(([m,b])=>{if(d.includes(".")){const{path:_}=d.match(/(?<path>.+?)\.[^.]*$/)?.groups??{};if(!Object.keys(b).some(v=>v.startsWith(`${_}.`))&&!bn({collectionName:t,fileName:e,valueMap:h,keyPath:_}))return}m!==n&&b[d]!==f&&(b[d]=f)}),!0}})},nu=({collection:t,collectionFile:e,originalEntry:n={},dynamicValues:r,expanderStates:i})=>{const s=t.name,o=e?.name,{id:a,slug:c,locales:u}=n,d=a===void 0,{fields:f=[],_i18n:h}=e??t,{allLocales:p,initialLocales:g}=h,m=d?g:p.filter(v=>!!u?.[v]?.content),b=Object.fromEntries(p.map(v=>[v,m.includes(v)])),_=Object.fromEntries(m.map(v=>d?[v,Wp(f,v,r)]:[v,structuredClone(u?.[v].content)]));it.set({isNew:d&&!o,collectionName:s,collection:t,fileName:o,collectionFile:e,originalEntry:d?void 0:n,originalLocales:b,currentLocales:structuredClone(b),originalValues:_,currentValues:Object.fromEntries(m.map(v=>[v,M_({draft:{collectionName:s,fileName:o},locale:v,target:structuredClone(_[v])})])),files:{},validities:Object.fromEntries(p.map(v=>[v,{}])),expanderStates:i??{_:{}}}),Cq({collectionName:s,fileName:o,slug:c})},Eq=()=>{const t=te(it),{collectionName:e,fileName:n,collection:r,collectionFile:i,currentValues:s,validities:o}=t,{defaultLocale:a}=(i??r)._i18n,{canonicalSlug:{key:c}}=(i??r)._i18n;Object.entries(s).forEach(([u,d])=>{delete d[c],Object.keys(d).forEach(f=>{const h=bn({collectionName:e,fileName:n,valueMap:d,keyPath:f});h?.widget==="uuid"&&(u===a||[!0,"translate"].includes(h?.i18n??!1))&&(d[f]=FC(h)),h?.widget==="hidden"&&(u===a||[!0,"translate"].includes(h?.i18n??!1))&&(d[f]=MC(h,u))})}),Object.keys(o).forEach(u=>{o[u]={}}),it.set({...t,isNew:!0,originalEntry:void 0}),fv.set(!0)};let m0=0,xa;const zC={saved:!1,restored:!1,deleted:!1},Cf=st({show:!1}),Eo=st({...zC}),Gp=async(t,e="")=>{await xa?.delete([t,e])},F_=async(t,e="")=>{const n=await xa?.get([t,e]);return n?n.siteConfigVersion===te(O_)?n:(await Gp(t,e),null):null},Tq=async t=>{const{collectionName:e,originalEntry:n,originalLocales:r={},currentLocales:i={},originalValues:s={},currentValues:o={},files:a}=t,c=n?.slug||"";if(!Rn(r,i)||!Rn(s,o)){const d={timestamp:new Date,siteConfigVersion:te(O_),collectionName:e,slug:c,currentLocales:i,currentValues:fd(o),files:a};await xa?.put(d)}else await F_(e,c)&&await Gp(e,c)},Cq=async({collectionName:t,fileName:e,slug:n=""})=>{const r=await F_(t,n);if(!r)return;const{timestamp:i,currentLocales:s,currentValues:o,files:a}=r,c=await new Promise(u=>{Cf.set({show:!0,timestamp:i,resolve:u})});c!==void 0&&(c?(Wi.set(!1),it.update(u=>(u&&(u.currentLocales=s,Object.entries(o).forEach(([d,f])=>{Object.entries(f).forEach(([h,p])=>{typeof p=="string"&&[...p.matchAll(A1("g"))].forEach(([g])=>{const m=a[g];if(m instanceof File){const b=URL.createObjectURL(m);f[h]=p.replaceAll(g,b),u.files[b]=m}})}),u.currentValues[d]?Object.assign(u.currentValues[d],f):u.currentValues[d]=M_({draft:{collectionName:t,fileName:e},locale:d,target:structuredClone(f)}),u.originalValues[d]||(u.originalValues[d]={})})),u)),Wi.set(!0)):await Gp(t,n),Eo.set({restored:c,deleted:!c,saved:!1}))},Aq=async()=>{const t=te(it);if(!t||te(Eo).saved)return;const{collectionName:e,originalEntry:n}=t;await F_(e,n?.slug)&&Eo.set({restored:!1,deleted:!1,saved:!0})},Oq=()=>{Eo.set({...zC})};Nn.subscribe(t=>{if(t&&!xa){const{databaseName:e}=t.repository??{};if(e){xa=new Do(e,"draft-backups",{keyPath:["collectionName","slug"]});return}}xa=null});it.subscribe(t=>{globalThis.clearTimeout(m0),t&&xa&&(m0=globalThis.setTimeout(()=>{Tq(t)},500))});const jC=(t,e)=>{const{minlength:n,maxlength:r}=t,i=Number.isInteger(n)&&n<=(r??1/0),s=Number.isInteger(r)&&(n??0)<=r,o=e?[...e.trim()].length:0,a=i&&o<n,c=s&&o>r;return{count:o,hasMin:i,hasMax:s,tooShort:a,tooLong:c,invalid:a||c}},Pq=/^\/?(?<pattern>.+?)(?:\/(?<flags>[dgimsuvy]*))?$/,Lq=()=>{const{collection:t,collectionFile:e,fileName:n,currentLocales:r,currentValues:i,validities:s}=te(it),{i18nEnabled:o,defaultLocale:a}=(e??t)._i18n;let c=!0;return Object.entries(i).forEach(([u,d])=>{const f=Object.entries(d);if(!r[u]){s[u]=Object.fromEntries(f.map(([p])=>[p,{valid:!0}]));return}s[u]={};const h=(p,g)=>{const m=bn({collectionName:t.name,fileName:n,valueMap:d,keyPath:p});if(!m)return;const{widget:b="string",i18n:_=!1,pattern:v}=m,y=kd({fieldConfig:m,locale:u});if(u!==a&&(!o||_===!1||_==="none"||_==="duplicate"))return;if(!["select","relation"].includes(b)&&/\.\d+$/.test(p)){const H=p.replace(/\.\d+$/,"");if(H in s[u]||h(H,void 0),b==="list"){const{field:B,fields:W,types:G}=m;if(!B&&!W&&!G)return}}const{multiple:x=!1}=m,{min:k,max:S}=m;let C=!1,E=!1,A=!1,P=!1,$=!1,N=!1,I=!1;if(b==="list"){if(p in s[u])return;const H=new RegExp(`^${on(p)}\\.\\d+$`),B=Array.isArray(g)&&g.length?g:f.filter(([W])=>H.test(W)).map(([,W])=>W).filter(W=>W!==void 0)??[];y&&!B.length?C=!0:typeof k=="number"&&B.length<k?P=!0:typeof S=="number"&&B.length>S&&($=!0)}if(b==="object"&&y&&!g&&(C=!0),b==="keyvalue"){const H=p.match(/(.+?)(?:\.[^.]*)?$/)?.[1],B=bn({collectionName:t.name,fileName:n,valueMap:d,keyPath:H});if(H in s[u]||B?.widget!=="keyvalue")return;p=H;const G=R_({entryDraft:it,keyPath:H,locale:u});y&&!G.length?C=!0:typeof k=="number"&&G.length<k?P=!0:typeof S=="number"&&G.length>S&&($=!0)}if(!["object","list","hidden","compute","keyvalue"].includes(b)){if(b==="code"){const{output_code_only:H=!1,keys:B={code:"code",lang:"lang"}}=m,W=p.match(`(.+)\\.(?:${B.code}|${B.lang})$`)?.[1]??"";if(W&&(p=W),p in s[u])return;H||(g=d[`${p}.${B.code}`])}if(typeof g=="string"&&(g=g.trim()),y&&(g==null||g===""||x&&!g.length)&&(C=!0),Array.isArray(v)&&typeof v[0]=="string"){const{pattern:H,flags:B}=v[0].match(Pq)?.groups??{},W=new RegExp(H,B);H&&!W.test(String(g))&&(N=!0)}if(["string","text"].includes(b)&&({tooShort:E,tooLong:A}=jC(m,g)),b==="string"&&g){const{type:H="text"}=m;if(H!=="text"){const B=document.createElement("input");B.type=H,B.value=g,{typeMismatch:I}=B.validity}H==="email"&&!I&&!g.split("@")[1]?.includes(".")&&(I=!0)}if(b==="number"){const{value_type:H="int"}=m;typeof k=="number"&&g!==null&&Number(g)<k?P=!0:typeof S=="number"&&g!==null&&Number(g)>S&&($=!0),(H==="int"||H==="float")&&y&&g===null&&(I=!0)}}const U=new Proxy({valueMissing:C,tooShort:E,tooLong:A,rangeUnderflow:P,rangeOverflow:$,patternMismatch:N,typeMismatch:I},{get:(H,B)=>B==="valid"?!Object.values(H).some(Boolean):H[B]});s[u][p]=U,U.valid||(c=!1)};f.forEach(([p,g])=>{h(p,g)})}),it.update(u=>({...u,validities:s})),c},v0=(t,e=te(_t)?.output?.json??{})=>{const{indent_style:n="space",indent_size:r=n==="tab"?1:2}=e;return JSON.stringify(t,null,n==="tab"?" ".repeat(r):r).trim()},b0=t=>CB(t).trim(),_0=(t,e=te(_t)?.output?.yaml??{},n={})=>{const{indent_size:r=2,quote:i="none"}=e,{quote:s=!1}=n;return vd.stringify(t,null,{indent:r,lineWidth:0,defaultKeyType:"PLAIN",defaultStringType:s||i==="double"?"QUOTE_DOUBLE":i==="single"?"QUOTE_SINGLE":"PLAIN",singleQuote:!(s||i==="double")}).trim()},y0=async({content:t,_file:e})=>{const{format:n,fmDelimiters:r,yamlQuote:i=!1}=e,s=Uh[n]?.formatter;if(s)return`${(await s(t)).trim()}
|
|
562
562
|
`;try{if(/^ya?ml$/.test(n))return`${_0(t,void 0,{quote:i})}
|
|
@@ -585,7 +585,7 @@ td.svelte-5r6rgh {border-width:0;}th.svelte-5r6rgh {padding-block:4px;color:var(
|
|
|
585
585
|
${((l(X).length===1?l(p):void 0)||l(a)||l(o))??""}`),Se(Hr,"id",`list-${l(ge)??""}-item-list`),dt(Hr,"collapsed",!l(G))}),T(Ce,je)},he=Ce=>{Ln(Ce,{flex:!0,get readonly(){return Q()},get required(){return Z()},get invalid(){return de()},get"aria-errormessage"(){return`${ne()??""}-error`},oninput:()=>{Pe()},get value(){return l(me)},set value(je){L(me,je)},$$legacy:!0})};j(ke,Ce=>{l(S)?Ce($e):Ce(he,!1)})}T(ye,xe)},$$slots:{default:!0}}),oe(),r()}var g9=(t,e)=>{t.key==="Enter"&&(t.stopPropagation(),e())},m9=(t,e)=>{t.stopPropagation(),e()},v9=F('<section role="group" tabindex="0" class="svelte-11ls1m1"><h4 class="svelte-11ls1m1"> </h4> <!></section>');const b9={hash:"svelte-11ls1m1",code:"section.svelte-11ls1m1 {overflow:hidden;margin:8px 0;padding:8px 0;}section.svelte-11ls1m1 > * {margin-right:auto;margin-left:auto;max-width:768px;}section.svelte-11ls1m1 h4:where(.svelte-11ls1m1) {color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}section.svelte-11ls1m1 h4:where(.svelte-11ls1m1):not(:last-child) {margin-bottom:8px;}section.svelte-11ls1m1 p {margin:8px auto 0;-webkit-user-select:text;user-select:text;}section.svelte-11ls1m1 img {max-height:800px !important;}"};function V_(t,e){se(e,!0),Te(t,b9);const[n,r]=ve(),i=()=>z(it,"$entryDraft",n),s=w(()=>e.fieldConfig.name),o=w(()=>nt(e.fieldConfig.label,"")),a=w(()=>nt(e.fieldConfig.widget,"string")),c=w(()=>nt(e.fieldConfig.preview,!0)),u=w(()=>nt(e.fieldConfig.i18n,!1)),d=w(()=>["relation","select"].includes(l(a))),f=w(()=>l(d)?e.fieldConfig.multiple:void 0),h=w(()=>l(a)==="list"||l(d)&&l(f)),p=w(()=>i()?.collection),g=w(()=>i()?.collectionName??""),m=w(()=>i()?.collectionFile),b=w(()=>i()?.fileName),_=w(()=>yr(i()?.currentValues[e.locale]??{})),v=w(()=>(l(m)??l(p))?._i18n??Li),y=w(()=>l(v).i18nEnabled),x=w(()=>l(v).defaultLocale),k=w(()=>l(y)&&(l(u)===!0||l(u)==="translate")),S=w(()=>l(y)&&l(u)==="duplicate"),C=w(()=>new RegExp(`^${on(e.keyPath)}\\.\\d+$`)),E=w(()=>l(h)?Object.entries(l(_)).filter(([I])=>l(C).test(I)).map(([,I])=>I).filter(I=>I!==void 0):l(_)[e.keyPath]),A=()=>{Vs(Object.fromEntries(LC({collectionName:l(g),fileName:l(b),valueMap:l(_),keyPath:e.keyPath}).map(I=>[I,!0]))),window.requestAnimationFrame(()=>{const I=document.querySelector(`.content-editor .pane[data-mode="edit"] .field[data-key-path="${CSS.escape(e.keyPath)}"]`);I&&(typeof I.scrollIntoViewIfNeeded=="function"?I.scrollIntoViewIfNeeded():I.scrollIntoView(),I.classList.add("highlight"),window.setTimeout(()=>{I.classList.remove("highlight")},1500))})};var P=V(),$=M(P);{var N=I=>{var U=v9();U.__keydown=[g9,A],U.__click=[m9,A];var H=D(U),B=D(H),W=R(H,2);{var G=X=>{var re=V();const K=w(()=>N0[l(a)]);var Y=M(re);ki(Y,()=>l(K),(ne,ce)=>{ce(ne,{get keyPath(){return e.keyPath},get locale(){return e.locale},get fieldConfig(){return e.fieldConfig},get currentValue(){return l(E)}})}),T(X,re)};j(W,X=>{l(a)in N0&&X(G)})}q(()=>{Se(U,"data-widget",l(a)),Se(U,"data-key-path",e.keyPath),J(B,l(o)||l(s))}),T(I,U)};j($,I=>{l(a)!=="hidden"&&l(c)&&(e.locale===l(x)||l(k)||l(S))&&I(N)})}T(t,P),oe(),r()}Ma(["keydown","click"]);var _9=F('<div role="none" class="header svelte-1bztb9y"> </div>'),y9=F('<div role="group" class="subsection svelte-1bztb9y"><!> <div class="items svelte-1bztb9y"><!></div></div>');const w9={hash:"svelte-1bztb9y",code:".subsection.svelte-1bztb9y {margin:16px auto;border:2px solid var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.subsection.svelte-1bztb9y .title {font-size:inherit;font-weight:var(--sui-font-weight-normal);}.header.svelte-1bztb9y {display:flex;align-items:center;height:24px;padding-inline:8px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-secondary-border-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);}.items.svelte-1bztb9y {padding:8px 16px;}.items.svelte-1bztb9y:empty {display:none;}"};function hA(t,e){se(e,!0),Te(t,w9);const r=`${sr("section")}-header`;let i=ae(void 0);var s=y9(),o=D(s);{var a=d=>{var f=_9();Se(f,"id",r);var h=D(f);q(()=>J(h,e.label)),T(d,f)};j(o,d=>{e.label&&d(a)})}var c=R(o,2),u=D(c);pr(u,()=>wu(l(i)),null,d=>{var f=V(),h=M(f);Ie(h,()=>e.children??ze),T(d,f)}),Ot(s,d=>L(i,d),()=>l(i)),q(()=>Se(s,"aria-labelledby",e.label?r:void 0)),T(t,s),oe()}var x9=F('<p dir="auto"> </p>');function k9(t,e){se(e,!1);const[n,r]=ve(),i=()=>z(it,"$entryDraft",n),s=ue(),o=ue(),a=ue(),c=ue(),u=ue(),d=ue(),f=ue(),h=ue(),p=ue();let g=O(e,"locale",8),m=O(e,"keyPath",8),b=O(e,"fieldConfig",8),_=O(e,"currentValue",8);Me(()=>(l(s),l(o),l(a),l(c),l(u),gt(b())),()=>{(S=>(L(s,S.name),L(o,S.field),L(a,S.fields),L(c,S.types),L(u,nt(S.typeKey,"type"))))(b())}),Me(()=>(l(o),l(a),l(c)),()=>{L(d,!!(l(o)??l(a)??l(c)))}),Me(()=>gt(m()),()=>{L(f,new RegExp(`^${on(m())}\\.\\d+`))}),Me(()=>gt(g()),()=>{L(h,Zl(g()))}),Me(()=>(i(),gt(g()),l(f),gt(m()),l(s)),()=>{L(p,La(Object.fromEntries(Object.entries(i()?.currentValues[g()]??{}).filter(([S])=>l(f).test(S)).map(([S,C])=>[S.replace(new RegExp(`^${on(m())}`),l(s)),C])))[l(s)]??[])}),Ur(),Cr();var v=V(),y=M(v);{var x=S=>{var C=V(),E=M(C);ht(E,1,()=>l(p),Er,(A,P,$)=>{const N=Ge(()=>Array.isArray(l(c))?i()?.currentValues[g()][`${m()}.${$}.${l(u)}`]:void 0),I=Ge(()=>l(c)?.find(({name:B})=>B===l(N))),U=Ge(()=>l(I)?l(I).label||l(I).name:void 0),H=Ge(()=>l(N)?l(I)?.fields??[]:l(a)??(l(o)?[l(o)]:[]));hA(A,{get label(){return l(U)},children:(B,W)=>{var G=V(),X=M(G);ht(X,1,()=>l(H),re=>re.name,(re,K)=>{var Y=V(),ne=M(Y);pr(ne,()=>mn(0),null,ce=>{const pe=Ge(()=>l(o)?`${m()}.${$}`:`${m()}.${$}.${l(K).name}`);V_(ce,{get keyPath(){return l(pe)},get locale(){return g()},get fieldConfig(){return l(K)}})}),T(re,Y)}),T(B,G)},$$slots:{default:!0}})}),T(S,C)},k=S=>{var C=V(),E=M(C);{var A=P=>{var $=x9(),N=D($);q(I=>{Se($,"lang",g()),J(N,I),$.dir=$.dir},[()=>l(h).format(_())],Ge),T(P,$)};j(E,P=>{Array.isArray(_())&&_().length&&P(A)},!0)}T(S,C)};j(y,S=>{l(d)?S(x):S(k,!1)})}T(t,v),oe(),r()}var S9=(t,e,n)=>{!t.target.matches("button, input, textarea")&&t.key!=="Tab"&&t.preventDefault(),t.target===l(e)&&t.key==="Backspace"&&n()(new CustomEvent("remove"))},E9=F('<section role="group" class="field svelte-z6qmsu"><header role="none"><h4 role="none" class="svelte-z6qmsu"> </h4></header> <div role="none" class="widget-wrapper"><!></div></section>'),T9=F('<div role="group" class="wrapper svelte-z6qmsu" contenteditable="false" tabindex="0"><header role="none" class="svelte-z6qmsu"><h3 role="none" class="svelte-z6qmsu"> </h3> <!></header> <!></div>');const C9={hash:"svelte-z6qmsu",code:".wrapper.svelte-z6qmsu {display:inline-block;border:1px solid var(--sui-secondary-border-color);border-radius:4px;width:100%;color:var(--sui-secondary-foreground-color);background-color:var(--sui-primary-background-color);white-space:normal;-webkit-user-select:none;user-select:none;}.wrapper.svelte-z6qmsu:focus {outline-color:var(--sui-primary-accent-color-translucent);}.wrapper.svelte-z6qmsu > header:where(.svelte-z6qmsu) {display:flex;align-items:center;justify-content:space-between;color:var(--sui-secondary-foreground-color);background-color:var(--sui-selected-background-color);}.wrapper.svelte-z6qmsu > header:where(.svelte-z6qmsu) h3:where(.svelte-z6qmsu) {padding:0 8px;font-size:var(--sui-font-size-small);font-weight:600;}.wrapper.svelte-z6qmsu > header:where(.svelte-z6qmsu) button {padding:0;height:16px;}section.svelte-z6qmsu {margin:0;border-top:1px solid var(--sui-secondary-border-color);padding:16px;}section.svelte-z6qmsu h4:where(.svelte-z6qmsu) {margin-bottom:8px;font-size:var(--sui-font-size-small);font-weight:600;color:var(--sui-secondary-foreground-color);}"};function A9(t,e){se(e,!0),Te(t,C9);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=O(e,"values",19,()=>({})),o=O(e,"onChange",3,()=>{}),a=ae(void 0),c=ae(""),u=ae("");const d=ie({}),f=["image","string"],h=()=>l(a);an(()=>{window.requestAnimationFrame(()=>{L(c,ie(l(a)?.closest("[data-locale]")?.dataset.locale)),L(u,ie(l(a)?.closest("[data-key-path]")?.dataset.keyPath))})}),Ue(()=>{s(),Ee(()=>{Rn(s(),yr(d))||Object.assign(d,s())})}),Ue(()=>{const S=yr(d);Ee(()=>{Rn(s(),S)||o()(new CustomEvent("update",{detail:S}))})});var p=T9();p.__keydown=[S9,a,o];var g=D(p),m=D(g),b=D(m),_=R(m,2);const v=w(()=>i()("remove"));Xe(_,{size:"small",iconic:!0,get"aria-label"(){return l(v)},onclick:()=>{o()(new CustomEvent("remove"))},startIcon:C=>{rt(C,{name:"close"})},$$slots:{startIcon:!0}});var y=R(g,2);{var x=S=>{var C=V(),E=M(C);ht(E,17,()=>e.fields,({name:A,label:P,widget:$})=>A,(A,P)=>{let $=()=>l(P).name,N=()=>l(P).label,I=()=>l(P).widget;var U=V(),H=M(U);{var B=W=>{var G=E9();const X=w(()=>Pf[I()]);var re=D(G),K=D(re),Y=D(K),ne=R(re,2),ce=D(ne);const pe=w(()=>sr("field")),Q=w(()=>N()??$()),Z=w(()=>({name:$(),widget:I()}));ki(ce,()=>l(X),(de,_e)=>{_e(de,{get locale(){return l(c)},get keyPath(){return`${l(u)??""}:${$()??""}`},get fieldId(){return l(pe)},get fieldLabel(){return l(Q)},get fieldConfig(){return l(Z)},inEditorComponent:!0,get currentValue(){return d[$()]},set currentValue(ge){d[$()]=ge}})}),q(de=>{Se(G,"aria-label",de),Se(G,"data-widget",I()),Se(G,"data-key-path",`${l(u)??""}:${$()??""}`),J(Y,N())},[()=>i()("x_field",{values:{field:N()}})]),vi("keydown",G,de=>{de.stopPropagation()},!0),T(W,G)};j(H,W=>{I()&&f.includes(I())&&W(B)})}T(A,U)}),T(S,C)};j(y,S=>{l(c)&&l(u)&&S(x)})}Ot(p,S=>L(a,S),()=>l(a)),q(()=>{Se(p,"aria-label",e.label),J(b,e.label)}),T(t,p);var k=oe({getElement:h});return r(),k}Ma(["keydown"]);const P0=t=>Object.fromEntries(Object.entries(t).map(([e,n])=>[e,typeof n=="string"?n.trim().replace(/["()[[\]]/g,"\\$&"):""])),O9=t=>({image:{id:"image",icon:"image",label:te(le)("editor_components.image"),fields:[{name:"src",label:te(le)("editor_components.src"),widget:"image"},{name:"alt",label:te(le)("editor_components.alt"),widget:"string"},{name:"title",label:te(le)("editor_components.title"),widget:"string"},{name:"link",label:te(le)("editor_components.link"),widget:"string"}],pattern:/\[?!\[(?<alt>.*?)\]\((?<src>.*?)(?: "(?<title>.*?)")?\)(?:\]\((?<link>.*?)\))?/,toBlock:n=>{const{src:r,alt:i,title:s,link:o}=P0(n);if(!r)return"";const a=``;return o?`[${a}](${o})`:a},toPreview:n=>{const{src:r,alt:i,title:s,link:o}=P0(n),a=`<img src="${r}" alt="${i}" title="${s}">`;return o?`<a href="${o}">${a}</a>`:a}}})[t],P9=({id:t,label:e,fields:n,pattern:r,fromBlock:i,toBlock:s,toPreview:o})=>{const a=o({}).match(/\w+/)?.[0]??t;class c extends aS{__props;constructor(p,g){super(g),this.__props=p}static getType(){return t}isInline(){return!0}static clone(p){return new c(p.__props,p.__key)}static importJSON(p){return u().updateFromJSON(p)}exportJSON(){return{...this.__props,type:t,version:1}}createDOM(){let p,g=null;const m=async({type:_,detail:v})=>{await xl(),g??=Qv(p),g?.update(()=>{_==="update"&&(this.getWritable().__props=v),_==="remove"&&this.remove()})},b=Pv(A9,{target:document.createElement("div"),props:{label:e,fields:n,values:this.__props,onChange:m}});return G2(),p=b.getElement(),window.requestAnimationFrame(()=>{p.focus()}),p}exportDOM(){return{element:this.createDOM()}}static importDOM(){const p={[a]:()=>({conversion:g=>({node:u(Object.fromEntries(n.map(({name:m})=>[m,g[m]??""])))}),priority:3})};return t==="image"&&Object.assign(p,{a:g=>{if(g.firstChild?.nodeName.toLowerCase()==="img"){const{href:m}=g,{src:b,alt:_,title:v}=g.firstChild;return{conversion:()=>({node:u({src:b,alt:_,title:v,link:m}),after:()=>[]}),priority:4}}return null}}),p}updateDOM(){return!1}decorate(){return null}}const u=h=>new c(h??Object.fromEntries(n.map(({name:p})=>[p,""]))),d=h=>h instanceof c&&h.getType()===t;return{node:c,createNode:u,transformer:{dependencies:[c],export:h=>d(h)?s(h.__props):null,importRegExp:r,regExp:r,replace:(h,p)=>{const g=p,m=i?.(g)??g.groups??{};h.replace(u(m))},type:"text-match"}}},L0=new Map;class L9{constructor(e){const{id:n}=e,r=L0.get(n),i=r??P9(e);r||L0.set(n,i),Object.assign(this,{...e,...i})}}var $9=F('<div role="none" class="wrapper svelte-1e9a0b3"><!></div>');const N9={hash:"svelte-1e9a0b3",code:`.wrapper.svelte-1e9a0b3 {display:contents;}.wrapper.minimal.svelte-1e9a0b3 [role="textbox"],
|
|
586
586
|
.wrapper.minimal.svelte-1e9a0b3 textarea {overflow:auto;max-height:240px;}`};function I9(t,e){se(e,!0),Te(t,N9);let n=O(e,"currentValue",15),r=O(e,"required",3,!0),i=O(e,"readonly",3,!1),s=O(e,"invalid",3,!1),o=ae("");const a=w(()=>nt(e.fieldConfig.modes,()=>[...cO],!0)),c=w(()=>nt(e.fieldConfig.buttons,()=>[...dO],!0)),u=w(()=>nt(e.fieldConfig.editor_components,()=>[...hO],!0)),d=w(()=>nt(e.fieldConfig.minimal,!1)),f=w(()=>l(a).map(v=>uO[v]).filter(Boolean)),h=w(()=>[...l(c),...l(u).includes("code-block")?["code-block"]:[]].map(v=>fO[v]).filter(Boolean)),p=w(()=>[...l(u).map(v=>v==="code-block"||v in Ty?void 0:O9(v)).filter(v=>!!v),...Object.values(Ty)].map(v=>new L9(v))),g=()=>{const v=typeof n()=="string"?n():"";l(o)!==v&&L(o,ie(v))},m=()=>{const v=l(o);n()!==v&&n(v)};Ue(()=>{n(),Ee(()=>{g()})}),Ue(()=>{l(o),Ee(()=>{m()})});var b=$9(),_=D(b);pr(_,()=>mn(0),null,v=>{fM(v,{get lang(){return e.locale},get modes(){return l(f)},get buttons(){return l(h)},get components(){return l(p)},flex:!0,get readonly(){return i()},get required(){return r()},get invalid(){return s()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},autoResize:!0,get value(){return l(o)},set value(y){L(o,ie(y))}})}),q(()=>dt(b,"minimal",l(d))),T(t,b),oe()}function D9(){return{useNewRenderer:!0,renderer:{heading(...t){return At.Renderer.prototype.heading.call(this,...t).replace(/^<(h\d)/,'<$1 dir="auto"')},list(...t){return At.Renderer.prototype.list.call(this,...t).replace(/^<(ol|ul)/,'<$1 dir="auto"')},paragraph(...t){return At.Renderer.prototype.paragraph.call(this,...t).replace(/^<p/,'<p dir="auto"')}}}}var R9=F('<div role="none" class="svelte-xzrmoz"><!></div>');const M9={hash:"svelte-xzrmoz",code:"div.svelte-xzrmoz :is(h1, h2, h3, h4, h5, h6, p, ul, ol) {margin:1em 0 0;}div.svelte-xzrmoz :is(video, img) {max-width:100%;max-height:100%;}div.svelte-xzrmoz :is(a:has(img)) {display:inline-block;}div.svelte-xzrmoz :is(a:has(img)) :is(img) {pointer-events:none;}"};function F9(t,e){se(e,!0),Te(t,M9);const[n,r]=ve(),i=()=>z(it,"$entryDraft",n);let s=ae("");const o=w(()=>nt(e.fieldConfig.sanitize_preview,!1)),a={breaks:!0,async:!0,walkTokens:async f=>{if(f.type==="image"){const h=await tc(f.href,i()?.originalEntry);h&&(f.href=h)}}};At.use(D9()),Ue(()=>{(async()=>L(s,ie(await At.parse(e.currentValue??"",a))))()});var c=R9(),u=D(c);{var d=f=>{var h=V(),p=M(h);fr(p,()=>l(o)?li.sanitize(l(s)):l(s)),T(f,h)};j(u,f=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&f(d)})}T(t,c),oe(),r()}function z9(t,e){se(e,!0);let n=O(e,"currentValue",15),r=O(e,"required",3,!0),i=O(e,"readonly",3,!1),s=O(e,"invalid",3,!1),o=ae(void 0),a=ae("");const c=w(()=>nt(e.fieldConfig.value_type,"int")),u=w(()=>e.fieldConfig.min),d=w(()=>e.fieldConfig.max),f=w(()=>nt(e.fieldConfig.step,1)),h=w(()=>l(c)==="int"||l(c)==="float"),p=()=>{if(n()!==void 0){if(l(h)&&l(o)!==n())if(typeof n()=="number")L(o,ie(n()));else if(typeof n()=="string"){const y=n().trim()?Number(n()):NaN;L(o,ie(Number.isNaN(y)?void 0:y))}else L(o,void 0);!l(h)&&l(a)!==n()&&L(a,ie(String(n())))}},g=()=>{let y;l(h)?l(o)===void 0?y=NaN:l(c)==="int"?y=Number.parseInt(l(h)?String(l(o)):l(a),10):y=Number.parseFloat(l(h)?String(l(o)):l(a)):y=l(a),l(h)&&Number.isNaN(y)&&(y=null),n()!==y&&n(y)};Ue(()=>{n(),Ee(()=>{p()})}),Ue(()=>{l(a),Ee(()=>{g()})}),Ue(()=>{l(o),Ee(()=>{g()})});var m=V(),b=M(m);{var _=y=>{gM(y,{get min(){return l(u)},get max(){return l(d)},get step(){return l(f)},get readonly(){return i()},get required(){return r()},get invalid(){return s()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(o)},set value(x){L(o,ie(x))}})},v=y=>{Ln(y,{get readonly(){return i()},get required(){return r()},get invalid(){return s()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(a)},set value(x){L(a,ie(x))}})};j(b,y=>{l(h)?y(_):y(v,!1)})}T(t,m),oe()}var j9=F('<p dir="auto"><!></p>');function U9(t,e){se(e,!0);const n=w(()=>nt(e.fieldConfig.value_type,"int")),r=w(()=>Cp(e.locale)),i=w(()=>Intl.NumberFormat(l(r)));var s=V(),o=M(s);{var a=c=>{var u=j9(),d=D(u);{var f=p=>{var g=We();q(m=>J(g,m),[()=>l(i).format(Number(e.currentValue))]),T(p,g)},h=p=>{var g=We();q(()=>J(g,e.currentValue)),T(p,g)};j(d,p=>{l(n)==="int"||l(n)==="float"?p(f):p(h,!1)})}q(()=>{Se(u,"lang",e.locale),u.dir=u.dir}),T(c,u)};j(o,c=>{e.currentValue!==void 0&&e.currentValue!==null&&e.currentValue!==""&&c(a)})}T(t,s),oe()}const B9=({collectionName:t,fileName:e,keyPath:n,valueMap:r,locale:i,summaryTemplate:s})=>s?s.replaceAll(/{{(.+?)}}/g,(o,a)=>{const[c,...u]=a.split(/\s*\|\s*/);return zp({collectionName:t,fileName:e,valueMap:r,keyPath:`${n}.${c.replace(/^fields\./,"")}`,locale:i,transformations:u})}):r[`${n}.title`]||r[`${n}.name`]||Object.entries(r).find(([o,a])=>o.startsWith(`${n}.`)&&typeof a=="string"&&!!a)?.[1]||"";var q9=F('<div role="none" class="summary svelte-23x9on"> </div>'),H9=F('<!> <div role="none" class="item-list"><!></div>',1),V9=F('<div role="none" class="wrapper svelte-23x9on"><!></div>'),W9=F("<!> <!> <!>",1);const G9={hash:"svelte-23x9on",code:".wrapper.svelte-23x9on {display:contents;}.sui.checkbox + .wrapper.svelte-23x9on > .group {margin-top:8px;}.wrapper.svelte-23x9on > .group {border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);}.summary.svelte-23x9on {overflow:hidden;padding:8px;white-space:nowrap;text-overflow:ellipsis;}.summary.svelte-23x9on:empty {display:none;}"};function K9(t,e){se(e,!1),Te(t,G9);const[n,r]=ve(),i=()=>z(it,"$entryDraft",n),s=()=>z(le,"$_",n),o=ue(),a=ue(),c=ue(),u=ue(),d=ue(),f=ue(),h=ue(),p=ue(),g=ue(),m=ue(),b=ue(),_=ue(),v=ue(),y=ue(),x=ue(),k=ue(),S=ue(),C=ue(),E=ue(),A=ue(),P=ue(),$=ue(),N=ue(),I=ue(),U=ue();let H=O(e,"locale",8),B=O(e,"keyPath",8);O(e,"fieldId",8);let W=O(e,"fieldLabel",8),G=O(e,"fieldConfig",8);O(e,"currentValue",8),O(e,"readonly",8,!1);let X=O(e,"required",8,!0);O(e,"invalid",8,!1);let re=ue(""),K=ue();an(()=>{L(re,tr("short")),Vs({[l(C)]:l(v)?._[l(C)]??!l(c)})});const Y=async fe=>{ot(Wi,!1),fe&&(Object.keys(i()?.currentValues??{}).forEach(Ae=>{(Ae===H()||l(a)==="duplicate")&&Ct(it,Ee(i).currentValues[Ae][l(P)]=fe,Ee(i))}),await xl());const Pe=sA(Object.fromEntries(Object.entries(Wp(l(N),H())).map(([Ae,De])=>[`${B()}.${Ae}`,De])));Object.entries(i()?.currentValues??{}).forEach(([Ae,De])=>{(Ae===H()||l(a)==="duplicate")&&(Ct(it,Ee(i).currentValues[Ae]=Object.assign(De,fd({...Pe,...De})),Ee(i)),delete i().currentValues[Ae][B()])}),ot(Wi,!0)},ne=()=>{ot(Wi,!1),Object.entries(i()?.currentValues??{}).forEach(([fe,Pe])=>{(fe===H()||l(a)==="duplicate")&&(Object.keys(Pe).forEach(Ae=>{Ae.startsWith(`${B()}.`)&&(Ct(it,Ee(i).currentValues[fe][Ae]=null,Ee(i)),delete i()?.currentValues[fe][Ae])}),Ct(it,Ee(i).currentValues[fe][B()]=null,Ee(i)))}),ot(Wi,!0)},ce=()=>B9({collectionName:l(g),fileName:l(b),keyPath:B(),valueMap:l(x),locale:H(),summaryTemplate:l(I)});Me(()=>(l(o),l(a),l(c),l(u),l(d),l(f),l(h),gt(G())),()=>{(fe=>(L(o,fe.name),L(a,nt(fe.i18n,!1)),L(c,nt(fe.collapsed,!1)),L(u,fe.summary),L(d,fe.fields),L(f,fe.types),L(h,nt(fe.typeKey,"type"))))(G())}),Me(()=>i(),()=>{L(p,i()?.collection)}),Me(()=>i(),()=>{L(g,i()?.collectionName??"")}),Me(()=>i(),()=>{L(m,i()?.collectionFile)}),Me(()=>i(),()=>{L(b,i()?.fileName)}),Me(()=>i(),()=>{L(_,i()?.currentValues??{})}),Me(()=>i(),()=>{L(v,i()?.expanderStates??{})}),Me(()=>(l(y),l(m),l(p),Li),()=>{(fe=>L(y,fe.defaultLocale))((l(m)??l(p))?._i18n??Li)}),Me(()=>(l(_),gt(H())),()=>{L(x,l(_)[H()])}),Me(()=>(l(x),gt(B()),l(g),l(b)),()=>{L(k,Object.entries(l(x)).some(([fe,Pe])=>!!fe.startsWith(`${B()}.`)&&(Pe!==null||bn({collectionName:l(g),fileName:l(b),valueMap:l(x),keyPath:fe})?.widget==="object")))}),Me(()=>(gt(H()),l(y),l(a)),()=>{L(S,H()===l(y)||l(a)!==!1)}),Me(()=>gt(B()),()=>{L(C,`${B()}#`)}),Me(()=>(l(v),l(C)),()=>{L(E,l(v)?._[l(C)]??!0)}),Me(()=>l(f),()=>{L(A,Array.isArray(l(f)))}),Me(()=>(gt(B()),l(h)),()=>{L(P,`${B()}.${l(h)}`)}),Me(()=>(l(A),l(f),l(x),l(P)),()=>{L($,l(A)?l(f)?.find(({name:fe})=>fe===l(x)[l(P)]):void 0)}),Me(()=>(l(A),l($),l(d)),()=>{L(N,(l(A)?l($)?.fields:l(d))??[])}),Me(()=>(l(A),l($),l(u)),()=>{L(I,l(A)&&l($)?.summary||l(u))}),Me(()=>(gt(H()),l(y),l(a)),()=>{L(U,H()!==l(y)&&l(a)==="duplicate")}),Ur(),Cr();var pe=W9(),Q=M(pe);{var Z=fe=>{const Pe=Ge(()=>s()("add_x",{values:{name:W()||l(o)}}));Yu(fe,{get label(){return l(Pe)},get checked(){return l(k)},get disabled(){return l(U)},onChange:({detail:{checked:Ae}})=>{Ae?Y():ne()}})};j(Q,fe=>{X()||fe(Z)})}var de=R(Q,2);{var _e=fe=>{bv(fe,{get disabled(){return l(U)},get fieldConfig(){return G()},addItem:Y})};j(de,fe=>{l(A)&&!l(k)&&fe(_e)})}var ge=R(de,2);{var me=fe=>{var Pe=V9(),Ae=D(Pe);const De=Ge(()=>l(E)?void 0:`object-${l(re)}-summary`);hr(Ae,{get"aria-labelledby"(){return l(De)},children:(He,Ve)=>{var mt=H9(),et=M(mt);const ye=Ge(()=>l(A)?l($)?.label||l($)?.name:""),we=Ge(()=>l(N).length?()=>Vs({[l(C)]:!l(E)}):void 0);fA(et,{get label(){return l(ye)},get controlId(){return`object-${l(re)??""}-item-list`},get expanded(){return l(E)},get toggleExpanded(){return l(we)},get removeButtonVisible(){return l(A)},get removeButtonDisabled(){return l(U)},remove:()=>{ne()}});var xe=R(et,2),ke=D(xe);pr(ke,()=>wu(l(K)),null,$e=>{var he=V(),Ce=M(he);{var je=ut=>{var lt=V(),Ke=M(lt);ht(Ke,1,()=>l(N),tt=>tt.name,(tt,Et)=>{var Bt=V(),un=M(Bt);pr(un,()=>mn(0),null,En=>{const Jn=Ge(()=>[B(),l(Et).name].join("."));G_(En,{get keyPath(){return l(Jn)},get locale(){return H()},get fieldConfig(){return l(Et)}})}),T(tt,Bt)}),T(ut,lt)},Ye=ut=>{var lt=q9(),Ke=D(lt);q(tt=>{Se(lt,"id",`object-${l(re)??""}-summary`),J(Ke,tt)},[ce],Ge),T(ut,lt)};j(Ce,ut=>{l(E)?ut(je):ut(Ye,!1)})}T($e,he)}),Ot(xe,$e=>L(K,$e),()=>l(K)),q(()=>Se(xe,"id",`object-${l(re)??""}-item-list`)),T(He,mt)},$$slots:{default:!0}}),T(fe,Pe)};j(ge,fe=>{(!(!X()||l(A))||l(k))&&l(S)&&fe(me)})}T(t,pe),oe(),r()}function Y9(t,e){se(e,!1);const[n,r]=ve(),i=()=>z(it,"$entryDraft",n),s=ue(),o=ue(),a=ue(),c=ue(),u=ue(),d=ue(),f=ue(),h=ue(),p=ue(),g=ue();let m=O(e,"locale",8),b=O(e,"keyPath",8),_=O(e,"fieldConfig",8);O(e,"currentValue",8),Me(()=>(l(s),l(o),l(a),gt(_())),()=>{(k=>(L(s,k.fields),L(o,k.types),L(a,nt(k.typeKey,"type"))))(_())}),Me(()=>(i(),gt(m())),()=>{L(c,i()?.currentValues[m()]??{})}),Me(()=>(l(c),gt(b())),()=>{L(u,Object.entries(l(c)).some(([k,S])=>!!k.startsWith(`${b()}.`)&&!!S))}),Me(()=>l(o),()=>{L(d,Array.isArray(l(o)))}),Me(()=>(gt(b()),l(a)),()=>{L(f,`${b()}.${l(a)}`)}),Me(()=>(l(d),l(o),l(c),l(f)),()=>{L(h,l(d)?l(o)?.find(({name:k})=>k===l(c)[l(f)]):void 0)}),Me(()=>l(h),()=>{L(p,l(h)?l(h).label||l(h).name:void 0)}),Me(()=>(l(d),l(h),l(s)),()=>{L(g,(l(d)?l(h)?.fields:l(s))??[])}),Ur(),Cr();var v=V(),y=M(v);{var x=k=>{hA(k,{get label(){return l(p)},children:(S,C)=>{var E=V(),A=M(E);ht(A,1,()=>l(g),P=>P.name,(P,$)=>{var N=V(),I=M(N);pr(I,()=>mn(0),null,U=>{const H=Ge(()=>[b(),l($).name].join("."));V_(U,{get keyPath(){return l(H)},get locale(){return m()},get fieldConfig(){return l($)}})}),T(P,N)}),T(S,E)},$$slots:{default:!0}})};j(y,k=>{l(u)&&k(x)})}T(t,v),oe(),r()}function J9(t,e){se(e,!1);const[n,r]=ve(),i=()=>z(it,"$entryDraft",n),s=ue(),o=ue(),a=ue();let c=O(e,"locale",8),u=O(e,"keyPath",8),d=O(e,"fieldId",8),f=O(e,"fieldConfig",8),h=O(e,"currentValue",8),p=O(e,"readonly",8,!1),g=O(e,"required",8,!0),m=O(e,"invalid",8,!1),b=O(e,"options",8);const _=E=>{i()&&Object.keys(i().currentValues??{}).forEach(A=>{l(s)!=="duplicate"&&A!==c()||iA(A,u(),E)})},v=E=>{_(({valueList:A})=>{A.push(E)})},y=E=>{_(({valueList:A})=>{A.splice(A.indexOf(E),1)})};Me(()=>(l(s),l(o),l(a),gt(f())),()=>{(E=>(L(s,E.i18n),L(o,E.max),L(a,nt(E.dropdown_threshold,5))))(f())}),Ur(),Cr();var x=V(),k=M(x);{var S=E=>{R$(E,{get disabled(){return p()},get readonly(){return p()},get required(){return g()},get invalid(){return m()},get options(){return b()},get values(){return h()},get max(){return l(o)},get"aria-labelledby"(){return`${d()??""}-label`},get"aria-errormessage"(){return`${d()??""}-error`},onAddValue:({detail:{value:A}})=>{v(A)},onRemoveValue:({detail:{value:A}})=>{y(A)}})},C=E=>{OL(E,{get"aria-labelledby"(){return`${d()??""}-label`},children:(A,P)=>{var $=V(),N=M($);ht(N,1,b,({label:I,value:U})=>U,(I,U)=>{let H=()=>l(U).label,B=()=>l(U).value;const W=Ge(()=>h().includes(B()));Yu(I,{get label(){return H()},get value(){return B()},get readonly(){return p()},get required(){return g()},get invalid(){return m()},get checked(){return l(W)},get"aria-errormessage"(){return`${d()??""}-error`},onChange:({detail:{checked:G}})=>{G?v(B()):y(B())}})}),T(A,$)},$$slots:{default:!0}})};j(k,E=>{b().length>l(a)?E(S):E(C,!1)})}T(t,x),oe(),r()}function $0(t,e){se(e,!1);const[n,r]=ve(),i=()=>z(le,"$_",n),s=ue();O(e,"locale",8),O(e,"keyPath",8);let o=O(e,"fieldId",8),a=O(e,"fieldConfig",8),c=O(e,"currentValue",12),u=O(e,"readonly",8,!1),d=O(e,"required",8,!0),f=O(e,"invalid",8,!1),h=O(e,"options",8);Me(()=>(l(s),gt(a())),()=>{(_=>L(s,nt(_.dropdown_threshold,5)))(a())}),Me(()=>(gt(d()),gt(h()),i()),()=>{!d()&&!h().some(({value:_})=>_==="")&&h().unshift({label:i()("unselected_option"),value:"",searchValue:""})}),Ur(),Cr();var p=V(),g=M(p);{var m=_=>{Xu(_,{get readonly(){return u()},get required(){return d()},get invalid(){return f()},get"aria-labelledby"(){return`${o()??""}-label`},get"aria-errormessage"(){return`${o()??""}-error`},get value(){return c()},set value(v){c(v)},children:(v,y)=>{var x=V(),k=M(x);ht(k,1,h,({label:S,value:C,searchValue:E})=>C,(S,C)=>{let E=()=>l(C).label,A=()=>l(C).value,P=()=>l(C).searchValue;const $=Ge(()=>A()===c());ur(S,{get label(){return E()},get value(){return A()},get searchValue(){return P()},get selected(){return l($)},wrap:!0})}),T(v,x)},$$slots:{default:!0},$$legacy:!0})},b=_=>{y$(_,{get readonly(){return u()},get required(){return d()},get invalid(){return f()},get"aria-labelledby"(){return`${o()??""}-label`},get"aria-errormessage"(){return`${o()??""}-error`},onChange:({detail:{value:v}})=>{c(v)},children:(v,y)=>{var x=V(),k=M(x);ht(k,1,h,({label:S,value:C})=>C,(S,C)=>{let E=()=>l(C).label,A=()=>l(C).value;const P=Ge(()=>A()===c());S$(S,{get label(){return E()},get value(){return A()},get checked(){return l(P)}})}),T(v,x)},$$slots:{default:!0}})};j(g,_=>{h().length>l(s)?_(m):_(b,!1)})}T(t,p),oe(),r()}function pA(t,e){se(e,!1);const n=ue(),r=ue(),i=ue(),s=ue();let o=O(e,"locale",8),a=O(e,"keyPath",8),c=O(e,"fieldId",8);O(e,"fieldLabel",8);let u=O(e,"fieldConfig",8),d=O(e,"currentValue",12),f=O(e,"sortOptions",8,!1),h=O(e,"readonly",8,!1),p=O(e,"required",8,!0),g=O(e,"invalid",8,!1);Me(()=>(l(n),l(r),gt(u())),()=>{(_=>(L(n,_.options),L(r,_.multiple)))(u())}),Me(()=>(l(n),gt(f()),oi),()=>{L(i,(()=>{const _=l(n).map(v=>Kn(v)?v:{label:v,value:v});return f()&&_.sort((v,y)=>oi(v.label,y.label)),_})())}),Me(()=>(l(r),$0),()=>{L(s,l(r)?J9:$0)}),Ur(),Cr();var m=V(),b=M(m);ks(b,()=>JSON.stringify(l(i)),_=>{l(s)(_,{get locale(){return o()},get keyPath(){return a()},get fieldId(){return c()},get fieldConfig(){return u()},get readonly(){return h()},get required(){return p()},get invalid(){return g()},get options(){return l(i)},get currentValue(){return d()},set currentValue(v){d(v)},$$legacy:!0})}),T(t,m),oe()}var Z9=F('<div role="none" class="wrapper"><!></div>');function X9(t,e){se(e,!1);const n=ue(),r=ue(),i=ue(),s=ue();let o=O(e,"locale",8),a=O(e,"keyPath",8),c=O(e,"fieldId",8),u=O(e,"fieldLabel",8),d=O(e,"fieldConfig",8),f=O(e,"currentValue",12),h=O(e,"readonly",8,!1),p=O(e,"required",8,!0),g=O(e,"invalid",8,!1);Me(()=>(l(n),l(r),gt(d())),()=>{(v=>(L(n,v.collection),L(r,v.file)))(d())}),Me(()=>(l(r),l(n),zo),()=>{L(i,l(r)?[y_(l(n),l(r))].filter(Boolean):zo(l(n)))}),Me(()=>(gt(o()),gt(d()),l(i)),()=>{L(s,m_(o(),d(),l(i)))}),Ur(),Cr();var m=Z9(),b=D(m);const _=Ge(()=>({...d(),options:l(s)}));pA(b,{get locale(){return o()},get keyPath(){return a()},get fieldId(){return c()},get fieldLabel(){return u()},get fieldConfig(){return l(_)},get readonly(){return h()},get required(){return p()},get invalid(){return g()},sortOptions:!0,get currentValue(){return f()},set currentValue(v){f(v)},$$legacy:!0}),T(t,m),oe()}var Q9=F('<p dir="auto"> </p>');function e6(t,e){se(e,!1);const n=ue(),r=ue(),i=ue(),s=ue(),o=ue(),a=ue(),c=ue(),u=ue();let d=O(e,"locale",8);O(e,"keyPath",8);let f=O(e,"fieldConfig",8),h=O(e,"currentValue",8);Me(()=>(l(n),l(r),l(i),l(s),gt(f())),()=>{(b=>(L(n,b.collection),L(r,b.file),L(i,nt(b.multiple,!1)),L(s,b.value_field)))(f())}),Me(()=>(l(r),l(n),zo),()=>{L(o,l(r)?[y_(l(n),l(r))].filter(Boolean):zo(l(n)))}),Me(()=>(gt(d()),gt(f()),l(o)),()=>{L(a,m_(d(),f(),l(o)))}),Me(()=>(l(i),gt(h()),l(a),l(s)),()=>{L(c,(l(i)?h():[h()]).filter(b=>b!==void 0).map(b=>{const _=l(a).find(v=>v.value===b)?.label;return _&&_!==b?["slug","{{slug}}","{{fields.slug}}"].includes(l(s))?_:`${_} (${b})`:b}))}),Me(()=>gt(d()),()=>{L(u,Zl(d()))}),Ur(),Cr();var p=V(),g=M(p);{var m=b=>{var _=Q9(),v=D(_);q(y=>{Se(_,"lang",d()),J(v,y),_.dir=_.dir},[()=>l(u).format(l(c))],Ge),T(b,_)};j(g,b=>{l(c).length&&b(m)})}T(t,p),oe()}var t6=F('<p dir="auto"> </p>'),n6=F('<p dir="auto"> </p>');function r6(t,e){se(e,!1);const n=ue(),r=ue(),i=ue(),s=ue();let o=O(e,"locale",8);O(e,"keyPath",8);let a=O(e,"fieldConfig",8),c=O(e,"currentValue",8);const u=g=>l(i)&&l(n).find(m=>m.value===g)?.label||g;Me(()=>(l(n),l(r),gt(a())),()=>{(g=>(L(n,g.options),L(r,g.multiple)))(a())}),Me(()=>l(n),()=>{L(i,QS(l(n)))}),Me(()=>gt(o()),()=>{L(s,Zl(o()))}),Ur(),Cr();var d=V(),f=M(d);{var h=g=>{var m=t6(),b=D(m);q(_=>{Se(m,"lang",o()),J(b,_),m.dir=m.dir},[()=>l(s).format(c().map(u).sort())],Ge),T(g,m)},p=g=>{var m=V(),b=M(m);{var _=v=>{var y=n6(),x=D(y);q(k=>{Se(y,"lang",o()),J(x,k),y.dir=y.dir},[()=>u(c())],Ge),T(v,y)};j(b,v=>{c()!==void 0&&v(_)},!0)}T(g,m)};j(f,g=>{l(r)&&Array.isArray(c())&&c().length?g(h):g(p,!1)})}T(t,d),oe()}var i6=F('<div class="wrapper svelte-5qs6s0"><!> <span role="none" class="count svelte-5qs6s0"> </span> <!></div>');const s6={hash:"svelte-5qs6s0",code:".wrapper.svelte-5qs6s0 {flex:none;color:var(--sui-tertiary-foreground-color) !important;font-size:var(--sui-font-size-small);line-height:var(--sui-line-height-compact);text-align:right;}.count.invalid.svelte-5qs6s0 {color:var(--sui-error-foreground-color);}.count.svelte-5qs6s0:not(.invalid) {color:var(--sui-success-foreground-color);}"};function gA(t,e){se(e,!0),Te(t,s6);const[n,r]=ve(),i=()=>z(le,"$_",n),s=w(()=>e.fieldConfig.minlength),o=w(()=>e.fieldConfig.maxlength),a=w(()=>jC(e.fieldConfig,e.currentValue)),c=w(()=>l(a).count),u=w(()=>l(a).hasMin),d=w(()=>l(a).hasMax),f=w(()=>l(a).invalid);var h=V(),p=M(h);{var g=m=>{var b=i6(),_=D(b);{var v=C=>{var E=We();q(()=>J(E,`${l(s)??""}
|
|
587
587
|
/ `)),T(C,E)};j(_,C=>{l(u)&&C(v)})}var y=R(_,2),x=D(y),k=R(y,2);{var S=C=>{var E=We();q(()=>J(E,` /
|
|
588
|
-
${l(o)??""}`)),T(C,E)};j(k,C=>{l(d)&&C(S)})}q(C=>{Se(b,"aria-label",C),dt(y,"invalid",l(f)),J(x,l(c))},[()=>i()(l(u)&&l(d)?l(c)===1?"character_counter.min_max.one":"character_counter.min_max.many":l(u)?l(c)===1?"character_counter.min.one":"character_counter.min.many":l(c)===1?"character_counter.max.one":"character_counter.max.many",{values:{count:l(c),min:l(s),max:l(o)}})]),T(m,b)};j(p,m=>{(l(u)||l(d))&&m(g)})}T(t,h),oe(),r()}function o6(t,e){se(e,!0);const[n,r]=ve();let i=O(e,"currentValue",15),s=O(e,"required",3,!0),o=O(e,"readonly",3,!1),a=O(e,"invalid",3,!1),c=ae("");const u=w(()=>nt(e.fieldConfig.type,"text")),d=w(()=>nt(e.fieldConfig.prefix,"")),f=w(()=>nt(e.fieldConfig.suffix,"")),{extraHint:h}=As("field-editor")??{},p=()=>{let m=typeof i()=="string"?i():"";l(d)&&m.startsWith(l(d))&&(m=m.slice(l(d).length)),l(f)&&m.endsWith(l(f))&&(m=m.slice(0,-l(f).length)),l(c)!==m&&L(c,ie(m))},g=()=>{let m=l(c)
|
|
588
|
+
${l(o)??""}`)),T(C,E)};j(k,C=>{l(d)&&C(S)})}q(C=>{Se(b,"aria-label",C),dt(y,"invalid",l(f)),J(x,l(c))},[()=>i()(l(u)&&l(d)?l(c)===1?"character_counter.min_max.one":"character_counter.min_max.many":l(u)?l(c)===1?"character_counter.min.one":"character_counter.min.many":l(c)===1?"character_counter.max.one":"character_counter.max.many",{values:{count:l(c),min:l(s),max:l(o)}})]),T(m,b)};j(p,m=>{(l(u)||l(d))&&m(g)})}T(t,h),oe(),r()}function o6(t,e){se(e,!0);const[n,r]=ve();let i=O(e,"currentValue",15),s=O(e,"required",3,!0),o=O(e,"readonly",3,!1),a=O(e,"invalid",3,!1),c=ae("");const u=w(()=>nt(e.fieldConfig.type,"text")),d=w(()=>nt(e.fieldConfig.prefix,"")),f=w(()=>nt(e.fieldConfig.suffix,"")),{extraHint:h}=As("field-editor")??{},p=()=>{let m=typeof i()=="string"?i():"";l(d)&&m.startsWith(l(d))&&(m=m.slice(l(d).length)),l(f)&&m.endsWith(l(f))&&(m=m.slice(0,-l(f).length)),l(c)!==m&&L(c,ie(m))},g=()=>{let m=l(c).trim();m&&(l(d)||l(f))&&(m=`${l(d)}${m}${l(f)}`),i()!==m&&i(m)};Ue(()=>{i(),Ee(()=>{p()})}),Ue(()=>{l(c),Ee(()=>{g()})}),Ue(()=>{h&&ot(h,gA)}),Ln(t,{get lang(){return e.locale},get type(){return l(u)},get inputmode(){return l(u)},flex:!0,get readonly(){return o()},get required(){return s()},get invalid(){return a()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return l(c)},set value(m){L(c,ie(m))}}),oe(),r()}var a6=F('<iframe frameborder="0" allow="autoplay; encrypted-media; picture-in-picture" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" class="svelte-wmmi2b"></iframe>'),l6=F("<a> </a>"),c6=F('<div role="none"><!></div>');const u6={hash:"svelte-wmmi2b",code:"iframe.svelte-wmmi2b {display:block;margin:0 auto;width:100%;height:auto;aspect-ratio:16/9;}"};function d6(t,e){se(e,!0),Te(t,u6);const[n,r]=ve(),i=()=>z(le,"$_",n);let s=ae(void 0),o=ae(!0);const a=w(()=>XU(e.url));an(()=>{window.addEventListener("securitypolicyviolation",({blockedURI:h,violatedDirective:p})=>{h===new URL(l(a)).origin&&p==="frame-src"&&L(o,!1)})});var c=c6(),u=D(c);{var d=h=>{var p=V(),g=M(p);pr(g,()=>wu(l(s)),null,m=>{var b=a6();q((_,v)=>{Se(b,"src",_),Se(b,"title",v)},[()=>encodeURI(l(a)),()=>i()("youtube_video_player")]),T(m,b)}),T(h,p)},f=h=>{var p=l6(),g=D(p);q(m=>{Se(p,"href",m),J(g,e.url)},[()=>encodeURI(e.url)]),T(h,p)};j(u,h=>{l(o)?h(d):h(f,!1)})}Ot(c,h=>L(s,h),()=>l(s)),T(t,c),oe(),r()}var f6=F("<a> </a>"),h6=F("<a> </a>"),p6=F('<p dir="auto" class="svelte-1dlg8zk"><!></p>');const g6={hash:"svelte-1dlg8zk",code:".title.svelte-1dlg8zk {font-size:var(--sui-font-size-xxx-large);font-weight:var(--sui-font-weight-bold);}"};function m6(t,e){se(e,!0),Te(t,g6);const n=w(()=>e.fieldConfig.name),r=w(()=>nt(e.fieldConfig.type,"text"));var i=V(),s=M(i);{var o=a=>{var c=p6(),u=D(c);{var d=h=>{var p=V(),g=M(p);{var m=_=>{d6(_,{get url(){return e.currentValue}})},b=_=>{var v=f6(),y=D(v);q(x=>{Se(v,"href",x),J(y,e.currentValue)},[()=>encodeURI(e.currentValue)]),T(_,v)};j(g,_=>{ZU(e.currentValue)?_(m):_(b,!1)})}T(h,p)},f=h=>{var p=V(),g=M(p);{var m=_=>{var v=h6(),y=D(v);q(x=>{Se(v,"href",`mailto:${x??""}`),J(y,e.currentValue)},[()=>encodeURI(e.currentValue)]),T(_,v)},b=_=>{var v=We();q(()=>J(v,e.currentValue)),T(_,v)};j(g,_=>{l(r)==="email"?_(m):_(b,!1)},!0)}T(h,p)};j(u,h=>{l(r)==="url"||$v(e.currentValue)?h(d):h(f,!1)})}q(()=>{Se(c,"lang",e.locale),dt(c,"title",l(n)==="title"),c.dir=c.dir}),T(a,c)};j(s,a=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&a(o)})}T(t,i),oe()}function v6(t,e){se(e,!0);const[n,r]=ve();let i=O(e,"currentValue",15),s=O(e,"required",3,!0),o=O(e,"readonly",3,!1),a=O(e,"invalid",3,!1),c=ae("");const{extraHint:u}=As("field-editor")??{},d=()=>{const h=typeof i()=="string"?i():"";l(c)!==h&&L(c,ie(h))},f=()=>{const h=l(c);i()!==h&&i(h)};Ue(()=>{i(),Ee(()=>{d()})}),Ue(()=>{l(c),Ee(()=>{f()})}),Ue(()=>{u&&ot(u,gA)}),up(t,{get lang(){return e.locale},flex:!0,get readonly(){return o()},get required(){return s()},get invalid(){return a()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},autoResize:!0,get value(){return l(c)},set value(h){L(c,ie(h))}}),oe(),r()}var b6=F('<p dir="auto" class="svelte-tzbr78"> </p>');const _6={hash:"svelte-tzbr78",code:"p.svelte-tzbr78 {white-space:pre-wrap;}"};function y6(t,e){se(e,!0),Te(t,_6);var n=V(),r=M(n);{var i=s=>{var o=b6(),a=D(o);q(()=>{Se(o,"lang",e.locale),J(a,e.currentValue),o.dir=o.dir}),T(s,o)};j(r,s=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&s(i)})}T(t,n),oe()}function w6(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(it,"$entryDraft",n);let s=O(e,"currentValue",15),o=O(e,"required",3,!0),a=O(e,"readonly",3,!1),c=O(e,"invalid",3,!1);const u=w(()=>i()?.collection),d=w(()=>i()?.collectionFile),f=w(()=>(l(d)??l(u))?._i18n??Li),h=w(()=>l(f).defaultLocale);an(()=>{s()||(e.locale===l(h)||[!0,"translate"].includes(e.fieldConfig?.i18n??!1))&&s(FC(e.fieldConfig))});const p=w(()=>a()||e.fieldConfig.read_only!==!1);Ln(t,{flex:!0,get readonly(){return l(p)},get required(){return o()},get invalid(){return c()},get"aria-labelledby"(){return`${e.fieldId??""}-label`},get"aria-errormessage"(){return`${e.fieldId??""}-error`},get value(){return s()},set value(g){s(g)}}),oe(),r()}var x6=F('<p class="svelte-1e2mlgo"> </p>');const k6={hash:"svelte-1e2mlgo",code:"p.svelte-1e2mlgo {font-family:var(--sui-font-family-monospace);}"};function S6(t,e){se(e,!0),Te(t,k6);var n=V(),r=M(n);{var i=s=>{var o=x6(),a=D(o);q(()=>J(a,e.currentValue)),T(s,o)};j(r,s=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&s(i)})}T(t,n),oe()}const Pf={boolean:OH,code:$H,color:zH,compute:qH,datetime:YH,file:A0,image:A0,keyvalue:XV,list:p9,markdown:I9,number:z9,object:K9,relation:X9,select:pA,string:o6,text:v6,uuid:w6},N0={boolean:LH,code:IH,color:BH,compute:VH,datetime:XH,file:O0,image:O0,keyvalue:n9,list:k9,markdown:F9,number:U9,object:Y9,relation:e6,select:r6,string:m6,text:y6,uuid:S6};function W_(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Kp,"$translator",n),s=()=>z(le,"$_",n),o=()=>z(it,"$entryDraft",n);let a=O(e,"keyPath",3,""),c=O(e,"translate",3,!1);const u=w(()=>i().getSourceLanguage),d=w(()=>i().getTargetLanguage);var f=V(),h=M(f);ht(h,17,()=>e.otherLocales,Er,(p,g)=>{const m=w(()=>s()(c()?"translate_from_x":"copy_from_x",{values:{locale:ro(l(g))}})),b=w(()=>!o()?.currentLocales[e.locale]||!o().currentLocales[l(g)]||a()&&!yr(o().currentValues[l(g)])[a()]||!c()&&a()&&yr(o().currentValues[l(g)])[a()]===yr(o().currentValues[e.locale])[a()]||c()&&(!l(u)(e.locale)||!l(d)(l(g))));Nt(p,{get label(){return l(m)},get disabled(){return l(b)},onclick:()=>{aA(l(g),e.locale,{keyPath:a(),translate:c()})}})}),T(t,f),oe(),r()}function mA(t,e){se(e,!0);const[n,r]=ve(),i=()=>z(Kp,"$translator",n),s=()=>z(it,"$entryDraft",n),o=()=>z(le,"$_",n);let a=O(e,"size",3,"medium"),c=O(e,"keyPath",3,"");const u=w(()=>i()??{}),d=w(()=>l(u).getSourceLanguage),f=w(()=>l(u).getTargetLanguage),h=w(()=>!s()?.currentLocales[e.locale]||!l(d)(e.locale));var p=V(),g=M(p);{var m=_=>{const v=w(()=>{const[k]=e.otherLocales;return{otherLocale:k}}),y=w(()=>o()("translate_from_x",{values:{locale:ro(l(v).otherLocale)}})),x=w(()=>l(h)||!s()?.currentLocales[l(v).otherLocale]||!l(f)(l(v).otherLocale));Xe(_,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(y)},get title(){return l(y)},get disabled(){return l(x)},onclick:()=>{aA(l(v).otherLocale,e.locale,{keyPath:c(),translate:!0})},startIcon:S=>{rt(S,{name:"translate"})},$$slots:{startIcon:!0}})},b=_=>{const v=w(()=>o()("translate"));Ar(_,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(v)},get disabled(){return l(h)},endIcon:k=>{rt(k,{name:"translate"})},popup:k=>{const S=w(()=>o()("translation_options"));gr(k,{get"aria-label"(){return l(S)},children:(C,E)=>{W_(C,{get locale(){return e.locale},get otherLocales(){return e.otherLocales},get keyPath(){return c()},translate:!0})},$$slots:{default:!0}})},$$slots:{endIcon:!0,popup:!0}})};j(g,_=>{e.otherLocales.length===1?_(m):_(b,!1)})}T(t,p),oe(),r()}var E6=F('<div class="required svelte-1vsh88z">*</div>'),T6=F("<!> <!>",1),C6=F('<p class="comment svelte-1vsh88z"><!></p>'),A6=F("<!> <!> <!> <!> <!> <!> <!>",1),O6=F('<div role="none" class="svelte-1vsh88z"> </div>'),P6=F('<div role="none" class="before-input svelte-1vsh88z"><!></div>'),L6=F('<div role="none" class="prefix svelte-1vsh88z"> </div>'),$6=F('<div role="none" class="suffix svelte-1vsh88z"> </div>'),N6=F('<div role="none" class="after-input svelte-1vsh88z"><!></div>'),I6=F("<!> <!> <!> <!> <!>",1),D6=F('<p class="hint svelte-1vsh88z"><!></p>'),R6=F('<div role="none" class="footer svelte-1vsh88z"><!> <!></div>'),M6=F('<section role="group" class="field svelte-1vsh88z"><header role="none" class="svelte-1vsh88z"><h4 role="none" class="svelte-1vsh88z"> </h4> <!> <!> <!> <!></header> <!> <!> <div role="none" class="widget-wrapper svelte-1vsh88z"><!></div> <!></section>');const F6={hash:"svelte-1vsh88z",code:`@keyframes svelte-1vsh88z-highlight {
|
|
589
589
|
50% {
|
|
590
590
|
opacity: 0.2;
|
|
591
591
|
}
|