@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 CHANGED
@@ -399,7 +399,7 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
399
399
  - When a YouTube video URL is entered in a String field, it appears as an embedded video in the Preview pane. Check your site’s [CSP](#setting-up-content-security-policy) if the preview doesn’t work.
400
400
  - When a regular URL is entered in a String field, it appears as a link that can be opened in a new browser tab.
401
401
  - Supports the `type` option that accepts `url` or `email` as a value, which will validate the value as a URL or email.
402
- - Supports the `prefix` and `suffix` string options, which automatically prepend and/or append the developer-defined value to the user-input value.
402
+ - Supports the `prefix` and `suffix` string options, which automatically prepend and/or append the developer-defined value to the user-input value, if it’s not empty.
403
403
  - Boolean, Number and String
404
404
  - Supports the `before_input` and `after_input` string options, which allow developers to display custom labels before and/or after the input UI.[^28] Markdown is supported in the value.
405
405
  - Compatibility note: In Static CMS, these options are implemented as `prefix` and `suffix`, respectively, which have different meaning in Sveltia CMS.
@@ -556,7 +556,7 @@ ${i}`.trim()}function pB(t,e){if(dd(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:h,rawTextBlob:f}=s[d],p=a[d],g={sha:u,size:Number(h),text:f,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]}))},UB={name:za,label:IT,repository:As,statusDashboardURL:PB,checkStatus:$B,getRepositoryInfo:DT,init:NB,signIn:IB,signOut:DB,fetchFiles:async()=>{await RB(),await PT({repository:As,fetchDefaultBranchName:MB,fetchLastCommit:FB,fetchFileList:zB,fetchFileContents:jB})},fetchBlob:async t=>{const{owner:e,repo:n,branch:r=""}=As,{path:i}=t;return hd(`/projects/${encodeURIComponent(`${e}/${n}`)}/repository/files/${encodeURIComponent(i)}/raw?ref=${encodeURIComponent(r)}`,{},{responseType:"blob"})},commitChanges:async(t,e)=>{const{owner:n,repo:r,branch:i}=As;return(await hd(`/projects/${encodeURIComponent(`${n}/${r}`)}/repository/commits`,{method:"POST",body:{branch:i,commit_message:vT(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 Xy(u):u),encoding:d||typeof u!="string"?"base64":"text",file_path:a,previous_path:c})))}})).web_url}},RT="local",BB="Local Repository";let __;const qB=new Proxy({},{get:(t,e)=>(__??bB)[e]}),y_=it(null),w_="root_dir_handle";let Np;const HB=async({forceReload:t=!1,showPicker:e=!0}={})=>{if(!("showDirectoryPicker"in window))throw new Error("unsupported");let n=t?null:await Np?.get(w_)??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 Np?.set(w_,n))),n},VB=async()=>{await Np?.delete(w_)},WB=()=>{const{name:t}=te(_t).backend;__=Ip[t]?.getRepositoryInfo?.();const{databaseName:e}=__??{};Np=e?new No(e,"file-system-handles"):null},GB=async({auto:t=!1})=>{const e=await HB({showPicker:!t});if(e)y_.set(e);else throw new Error("Directory handle could not be acquired");return{backendName:RT}},KB=async()=>{VB()},gd=async t=>{let e=te(y_);if(!t)return e;const n=Fn(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},YB=async()=>{const t=te(y_),e=[],n=Ul([...te(a_).map(({filePathMap:o,folderPathMap:a})=>Object.values(o||(a??{}))).flat(1),...te(ai).map(({internalPath:o})=>o)].map(o=>Fn(o??""))),r=o=>new RegExp(`^${an(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(h=>h.test(u));if(c.kind==="file"){if(!d)continue;try{let h=await c.getFile();h=new File([h],h.name,{type:h.type,lastModified:h.lastModified}),e.push({file:h,path:u})}catch(h){console.error(h)}}if(c.kind==="directory"){const h=r(u);if(!d&&!n.some(f=>h.test(f)))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 ta(o)}catch(c){console.error(c)}return""})()})))},Ip={github:OB,gitlab:UB,local:{name:RT,label:BB,repository:qB,init:WB,signIn:GB,signOut:KB,fetchFiles:async()=>{const{entryFiles:t,assetFiles:e}=b_(await YB());await Promise.all(t.map(async i=>{try{i.text=await Z2(i.file)}catch(s){i.text="",console.error(s)}}));const{entries:n,errors:r}=await OT(t);Xr.set(n),l_.set(r),Qt.set(bT(e)),_c.set(!0)},commitChanges: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}=En(n);s=await gd(r),o&&o!==En(r).dirname?await s.move(await gd(o),a):await s.move(a)}if(["create","update","move"].includes(e)&&i){s??=await gd(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}=En(Fn(n));let c=await gd(o);if(await c.removeEntry(a),!o)return null;const u=o.split("/");for(;;){const d=[];for await(const f of c.keys())d.push(f);if(d.length>1||!u.length)break;const h=u.pop();c=await gd(u.join("/")),c.removeEntry(h)}}}catch(s){console.error(s)}return null}))}},Os=it(),On=cr([Os],([t],e,n)=>{n(r=>{const i=t?Ip[t]:void 0;return i&&i!==r&&i.init(),i})}),Dp=it(!0),md=it({message:"",canRetry:!1}),ja=it(!0),x_=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(Os)==="local"?"sign_in_error.picker_dismissed":"sign_in_error.authentication_aborted"),n=!0),md.set({message:e,canRetry:n}),console.error(t.message,t.cause)},JB=async()=>{const t=await Kr.get("sveltia-cms.user")||await Kr.get("decap-cms-user")||await Kr.get("netlify-cms-user");let e=Gn(t)&&t.backendName?t:void 0;const n=e?.backendName?.replace("proxy","local")??te(_t)?.backend?.name;Os.set(n);const r=te(On);if(e&&r)try{e=await r.signIn({token:e.token,auto:!0})}catch{e=void 0}if(ja.set(!e),!(!e||!r)){li.set(e);try{await r.fetchFiles(),md.set({message:"",canRetry:!1})}catch(i){[401,403,404].includes(i.cause?.status)?ja.set(!0):x_(i)}}},MT=async t=>{Os.set(t);const e=te(On);if(!e)return;let n;try{n=await e.signIn({auto:!1})}catch(r){ja.set(!0),x_(r);return}if(ja.set(!n),!!n){li.set(n);try{await e.fetchFiles(),md.set({message:"",canRetry:!1})}catch(r){x_(r)}}},ZB=async()=>{await te(On)?.signOut(),await Kr.delete("sveltia-cms.user"),Os.set(void 0),li.set(void 0),ja.set(!0),_c.set(!1)};var XB=F('<div role="alert" class="message"> </div>'),QB=F('<div role="alert"> </div>'),e4=F('<div role="alert"><!></div>'),t4=F('<div role="none"><!></div>'),n4=F("<!> <!>",1),r4=F("<!> <!>",1),i4=F('<div role="alert"> </div>'),s4=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 a4(t,e){se(e,!0),Te(t,o4);const[n,r]=ge(),i=()=>z(_t,"$siteConfig",n),s=()=>z(ja,"$unauthenticated",n),o=()=>z(le,"$_",n),a=()=>z(md,"$signInError",n);let c=ae(!1),u=ae(!1),d=ae(!1);const h=w(()=>i()?.backend?.name),f=w(()=>l(h)?Ip[l(h)]:null),p=w(()=>i()?.backend?.repo?.split("/")?.[1]);on(()=>{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)),JB()});var g=s4(),m=D(g);{var b=x=>{var k=XB(),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=QB(),$=D(P);q(N=>J($,N),[()=>o()("config.error.unsupported_backend",{values:{name:l(h)}})]),T(A,P)},E=A=>{var P=r4(),$=M(P);const N=w(()=>o()("sign_in_with_x",{values:{service:l(f).label}}));Xe($,{variant:"primary",get label(){return l(N)},onclick:async()=>{await MT(l(h))}});var I=R($,2);{var U=H=>{var B=n4(),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 MT("local")}});var re=R(W,2);{var K=ne=>{var ce=e4(),pe=D(ce);{var Q=de=>{var _e=V(),me=M(_e);lr(me,()=>ii.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(me=>J(_e,me),[()=>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=t4(),_e=D(de);{var me=fe=>{var Pe=We();q(Ae=>J(Pe,Ae),[()=>o()("work_with_local_repo_description",{values:{repo:l(p)}})]),T(fe,Pe)},ve=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(me):fe(ve,!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(f)?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=i4(),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 st=it(),Zi=it(!0);st.subscribe(t=>{te(St).devModeEnabled&&console.info("entryDraft",t)});const Ua=it(!1),k_=it(!1),vd=it({show:!1,multiple:!1}),S_=it({id:void 0,show:!1,status:"success",message:void 0,count:1,sourceLocale:void 0}),Ba=it(null),Vo=it(null),$i=it(),wc=it(),ao=t=>{st.update(e=>(e&&Object.entries(t).forEach(([n,r])=>{e.expanderStates._[n]!==r&&(e.expanderStates._[n]=r)}),e))},FT=({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=mn({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 h=a.slice(0,o).join("."),f=mn({collectionName:t,fileName:e,valueMap:n,keyPath:h});f?.widget==="object"&&f.fields&&i.add(`${h}.${f.name}#`),f?.widget==="list"&&f.field&&i.add(c)}}),[...i]},l4=({collectionName:t,fileName:e,currentValues:n})=>{const r={};Object.entries(te(st)?.validities??{}).forEach(([i,s])=>{Object.entries(s).forEach(([o,{valid:a}])=>{a||FT({collectionName:t,fileName:e,valueMap:n[i],keyPath:o}).forEach(c=>{r[c]=!0})})}),ao(r)},c4=async({repository:t})=>{const{databaseName:e}=t??{},n=e?new No(e,"ui-settings"):null,r="entry-view",i={showPreview:!0,syncScrolling:!0,selectAssetsView:{type:"grid"},...await n?.get(r)??{}};$i.set(i),wc.set(i.selectAssetsView),$i.subscribe(s=>{(async()=>{try{Dn(s,await n?.get(r))||await n?.set(r,s)}catch{}})()}),wc.subscribe(s=>{if(!s||!Object.keys(s).length)return;const o=te($i)?.selectAssetsView??{};Dn(s,o)||$i.update(a=>({...a,selectAssetsView:s}))})};On.subscribe(t=>{t&&!te($i)&&c4(t)});const zT=cr([Ua,qo],([t,e])=>t||e),E_=it(""),Ps=it(""),bd=(t=window.location)=>{const{pathname:e,searchParams:n}=new URL(`${t.origin}${t.hash.substring(1)}`);return{path:decodeURIComponent(e),params:Object.fromEntries(n)}},jn=(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}))},xc=(t,e={})=>{window.history.state?.from?window.history.back():jn(t,e)},jT=()=>{const{display_url:t,_siteURL:e}=te(_t);window.open(t||e||"/","_blank")};var u4=F('<img alt="" class="logo svelte-4zxkou">'),d4=F('<div role="alert" class="message"> </div>'),f4=F('<div role="alert" class="message"> </div>'),h4=F('<div role="alert" class="message"> </div>'),p4=F('<div role="alert"><div role="none" class="message"> </div> <div role="none" class="error svelte-4zxkou"><!></div></div>'),g4=F('<div role="alert" class="message"> </div>'),m4=F('<div role="alert" class="message"> </div> <!>',1),v4=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 b4={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 _4(t,e){se(e,!0),Te(t,b4);const[n,r]=ge(),i=()=>z(le,"$_",n),s=()=>z(li,"$user",n),o=()=>z(_c,"$dataLoaded",n),a=()=>z(_t,"$siteConfig",n),c=()=>z(u_,"$siteConfigError",n),u=()=>z(ob,"$prefsError",n),d=()=>z(St,"$prefs",n),h=()=>z(md,"$signInError",n),f=()=>z(Vk,"$inAuthPopup",n),p=()=>z(ja,"$unauthenticated",n),g=()=>z(Ma,"$dataLoadedProgress",n);Ue(()=>{ot(Ps,i()("welcome_to_sveltia_cms"))});var m=v4(),b=D(m),_=D(b);{var v=S=>{var C=u4();const E=w(()=>a()?.logo_url);q(A=>Se(C,"src",A),[()=>l(E)||`data:image/svg+xml;base64,${btoa(Sk)}`]),T(S,C)};j(_,S=>{(a()||c())&&S(v)})}var y=R(_,4);{var x=S=>{var C=d4(),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=f4(),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=h4(),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=p4(),ne=D(Y),ce=D(ne),pe=R(ne,2),Q=D(pe);lr(Q,()=>ii.sanitize(At.parseInline(h().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=g4(),de=D(Z);q(_e=>J(de,_e),[()=>i()("authorizing")]),T(Q,Z)},pe=Q=>{var Z=V(),de=M(Z);{var _e=ve=>{a4(ve,{})},me=ve=>{var fe=V(),Pe=M(fe);{var Ae=Re=>{var He=m4(),Ve=M(He),mt=D(Ve),et=R(Ve,2);{var ye=we=>{a$(we,{get now(){return g()}})};j(et,we=>{g()!==void 0&&we(ye)})}q(we=>J(mt,we),[()=>i()("loading_site_data")]),T(Re,He)};j(Pe,Re=>{o()||Re(Ae)},!0)}T(ve,fe)};j(de,ve=>{!s()||p()?ve(_e):ve(me,!1)},!0)}T(Q,Z)};j(ne,Q=>{f()?Q(ce):Q(pe,!1)},!0)}T(K,Y)};j(G,K=>{h().message&&!h().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 y4=F('<div role="alert"> <!></div>');const w4={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 x4(t,e){se(e,!0),Te(t,w4);const[n,r]=ge(),i=()=>z(On,"$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 h=async()=>{i()?.checkStatus&&L(d,ie(await i().checkStatus()))},f=()=>{h(),c=window.setInterval(()=>{h()},a)},p=()=>{window.clearInterval(c),L(d,"none")},g=()=>{l(u)&&(i()?.checkStatus&&!s()?.backend.api_root?f():p())};on(()=>(L(u,!0),()=>{p()})),Ue(()=>{l(u),i(),s(),g()});var m=V(),b=M(m);{var _=v=>{var y=y4(),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=>{$r(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 T_="0.58.1";var k4=F('<div role="alert" class="wrapper svelte-103hdap"> <!></div>');const S4={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 E4(t,e){se(e,!0),Te(t,S4);const[n,r]=ge(),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!==T_&&(c=window.setTimeout(()=>{L(u,!0)},o))}catch{}};on(()=>{if(document.querySelector('script[src^="https://unpkg.com/@sveltia/cms"]'))return d(),a=window.setInterval(()=>{d()},s),()=>{window.clearInterval(a),window.clearTimeout(c)}});var h=V(),f=M(h);{var p=g=>{var m=k4(),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(f,g=>{l(u)&&g(p)})}T(t,h),oe(),r()}var T4=F('<div role="none" class="empty svelte-17yv21"><!></div>');const C4={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 Br(t,e){Te(t,C4);let n=O(e,"children",3,void 0);var r=T4(),i=D(r);Ie(i,()=>n()??ze),T(t,r)}var A4=F("<img>"),O4=F("<video></video>",2),P4=F("<audio></audio>"),L4=F('<video playsinline="" class="svelte-1va4mre"></video>',2),$4=F('<img alt="" class="svelte-1va4mre">'),N4=F('<div role="none" class="blur svelte-1va4mre"><div role="none" class="overlay svelte-1va4mre"></div> <!></div>'),I4=F('<div role="none"><!> <!></div>');const D4={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 Ls(t,e){se(e,!0),Te(t,D4);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,""),h=O(e,"controls",3,!1),f=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 Vc(l(p));try{i(l(b)?await hT(r()):await n_(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 Vc(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=I4(),S=D(k);{var C=$=>{nt($,{name:"draft"})},E=$=>{var N=V(),I=M(N);{var U=B=>{var W=A4();let G;Tt(W,X=>L(p,X),()=>l(p)),q(()=>G=yt(W,G,{loading:n(),src:i(),alt:d(),...f},"svelte-1va4mre")),T(B,W)},H=B=>{var W=V(),G=M(W);{var X=K=>{var Y=O4();let ne;Tt(Y,ce=>L(p,ce),()=>l(p)),q(()=>ne=yt(Y,ne,{src:i(),controls:h()||void 0,playsinline:!0,...f},"svelte-1va4mre")),T(K,Y)},re=K=>{var Y=V(),ne=M(Y);{var ce=Q=>{var Z=V(),de=M(Z);{var _e=ve=>{var fe=P4();let Pe;Tt(fe,Ae=>L(p,Ae),()=>l(p)),q(()=>Pe=yt(fe,Pe,{src:i(),controls:!0,playsinline:!0,...f},"svelte-1va4mre")),T(ve,fe)},me=ve=>{nt(ve,{name:"audio_file"})};j(de,ve=>{h()?ve(_e):ve(me,!1)})}T(Q,Z)},pe=Q=>{nt(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=N4(),I=R(D(N),2);{var U=B=>{var W=L4();q(()=>Se(W,"src",i())),T(B,W)},H=B=>{var W=$4();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(()=>{$r(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 R4=/^(?:\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)?$/,C_={year:"numeric",month:"short",day:"numeric"},A_={hour:"numeric",minute:"numeric",hour12:!0},UT=(t,e)=>{let n=()=>e?.().link,r=()=>e?.().collectionLabel,i=()=>e?.().entryLabel;var s=F4(),o=D(s);Xe(o,{role:"link",variant:"link",onclick:()=>jn(n()),children:(a,c)=>{var u=M4(),d=D(u);q(()=>J(d,`${r()??""} › ${i()??""}`)),T(a,u)},$$slots:{default:!0}}),T(t,s)};var M4=F('<span role="none"> </span>'),F4=F("<p><!></p>"),z4=F('<div role="none" class="preview svelte-1i169qh"><!></div>'),j4=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),U4=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),B4=F('<a target="_blank"> </a>'),q4=F("<a> </a>"),H4=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),V4=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),W4=F("<p> </p>"),G4=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 K4={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 BT(t,e){se(e,!0),Te(t,K4);const[n,r]=ge(),i=()=>z(le,"$_",n),s=()=>z(Tn,"$appLocale",n);let o=O(e,"showPreview",3,!1),a=ae(ie({...Ap}));const c=w(()=>e.asset.path),u=w(()=>e.asset.size),d=w(()=>e.asset.kind),h=w(()=>e.asset.commitAuthor),f=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(()=>En(l(c))),y=w(()=>tt(l(v).extension,"")),x=w(()=>Ep(l(d))||l(c).endsWith(".pdf")),k=async()=>{L(a,ie(e.asset?await Op(e.asset):{...Ap}))};Ue(()=>{e.asset,k()});var S=G4(),C=D(S);{var E=he=>{var Ce=z4(),je=D(Ce);const Je=w(()=>l(d)==="image"),ut=w(()=>["audio","video"].includes(l(d)));Ls(je,{get kind(){return l(d)},get asset(){return e.asset},variant:"tile",get checkerboard(){return l(Je)},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=j4(),je=D(Ce),Je=D(je),ut=R(je,2),lt=D(ut);q(Ke=>{J(Je,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=U4(),je=D(Ce),Je=D(je),ut=R(je,2),lt=D(ut);q((Ke,rt)=>{J(Je,Ke),J(lt,rt)},[()=>i()("duration"),()=>l(b)?RU(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=B4(),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 me=R(ne,2),ve=D(me),fe=D(ve),Pe=R(ve,2),Ae=D(Pe);{var Re=he=>{var Ce=q4(),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(Re):he(He,!1)})}var Ve=R(me,2);{var mt=he=>{var Ce=H4(),je=D(Ce),Je=D(je),ut=R(je,2),lt=D(ut);q(Ke=>{J(Je,Ke),J(lt,l(h).name||l(h).login||l(h).email)},[()=>i()("sort_keys.commit_author")]),T(he,Ce)};j(Ve,he=>{l(h)&&he(mt)})}var et=R(Ve,2);{var ye=he=>{var Ce=V4(),je=D(Ce),Je=D(je),ut=R(je,2),lt=D(ut);q((Ke,rt)=>{J(Je,Ke),J(lt,rt)},[()=>i()("sort_keys.commit_date"),()=>l(f).toLocaleString(s()??void 0,{...C_,...A_})]),T(he,Ce)};j(et,he=>{l(f)&&he(ye)})}var we=R(et,2),xe=D(we),ke=D(xe),$e=R(xe,2);ft($e,17,()=>l(_),he=>he.sha,(he,Ce)=>{var je=V(),Je=M(je);ft(Je,17,()=>io(l(Ce)),ut=>ut.name,(ut,lt)=>{var Ke=V();const rt=w(()=>l(lt).label||l(lt).name);var Et=M(Ke);ft(Et,17,()=>Uo(l(lt),l(Ce)),Ht=>Ht.name,(Ht,vn)=>{UT(Ht,()=>({link:`/collections/${l(lt).name}/entries/${l(vn).name}`,collectionLabel:l(rt),entryLabel:l(vn).label||l(vn).name}))},Ht=>{var vn=Ge(()=>({link:`/collections/${l(lt).name}/entries/${l(Ce).subPath}`,collectionLabel:l(rt),entryLabel:jo(l(lt),l(Ce),{useTemplate:!0})}));UT(Ht,()=>l(vn))}),T(ut,Ke)}),T(he,je)},he=>{var Ce=W4(),je=D(Ce);q(Je=>J(je,Je),[()=>i()("sort_keys.none")]),T(he,Ce)}),q((he,Ce,je,Je,ut,lt,Ke)=>{J($,he),J(I,Ce),J(B,je),J(G,Je),J(pe,ut),J(fe,lt),J(ke,Ke)},[()=>i()("kind"),()=>i()(`file_type_labels.${l(y)}`,{default:$o.getType(l(c))??l(y).toUpperCase()}),()=>i()("size"),()=>s()?Gb(l(u)):"",()=>i()("public_url"),()=>i()("file_path"),()=>i()("used_in")]),T(t,S),oe(),r()}var Y4=F("<!> <!> <!>",1),J4=F("<!> <!>",1);function qT(t,e){se(e,!0);const[n,r]=ge(),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 h;const f=async()=>{if(h=void 0,!l(u))return!1;const S=await Ra(s()[0]);return h=S,zc(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=f4(),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=h4(),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=p4(),ne=D(Y),ce=D(ne),pe=R(ne,2),Q=D(pe);lr(Q,()=>ii.sanitize(At.parseInline(h().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=g4(),de=D(Z);q(_e=>J(de,_e),[()=>i()("authorizing")]),T(Q,Z)},pe=Q=>{var Z=V(),de=M(Z);{var _e=ve=>{a4(ve,{})},me=ve=>{var fe=V(),Pe=M(fe);{var Ae=Re=>{var He=m4(),Ve=M(He),mt=D(Ve),et=R(Ve,2);{var ye=we=>{a$(we,{get now(){return g()}})};j(et,we=>{g()!==void 0&&we(ye)})}q(we=>J(mt,we),[()=>i()("loading_site_data")]),T(Re,He)};j(Pe,Re=>{o()||Re(Ae)},!0)}T(ve,fe)};j(de,ve=>{!s()||p()?ve(_e):ve(me,!1)},!0)}T(Q,Z)};j(ne,Q=>{f()?Q(ce):Q(pe,!1)},!0)}T(K,Y)};j(G,K=>{h().message&&!h().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 y4=F('<div role="alert"> <!></div>');const w4={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 x4(t,e){se(e,!0),Te(t,w4);const[n,r]=ge(),i=()=>z(On,"$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 h=async()=>{i()?.checkStatus&&L(d,ie(await i().checkStatus()))},f=()=>{h(),c=window.setInterval(()=>{h()},a)},p=()=>{window.clearInterval(c),L(d,"none")},g=()=>{l(u)&&(i()?.checkStatus&&!s()?.backend.api_root?f():p())};on(()=>(L(u,!0),()=>{p()})),Ue(()=>{l(u),i(),s(),g()});var m=V(),b=M(m);{var _=v=>{var y=y4(),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=>{$r(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 T_="0.58.2";var k4=F('<div role="alert" class="wrapper svelte-103hdap"> <!></div>');const S4={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 E4(t,e){se(e,!0),Te(t,S4);const[n,r]=ge(),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!==T_&&(c=window.setTimeout(()=>{L(u,!0)},o))}catch{}};on(()=>{if(document.querySelector('script[src^="https://unpkg.com/@sveltia/cms"]'))return d(),a=window.setInterval(()=>{d()},s),()=>{window.clearInterval(a),window.clearTimeout(c)}});var h=V(),f=M(h);{var p=g=>{var m=k4(),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(f,g=>{l(u)&&g(p)})}T(t,h),oe(),r()}var T4=F('<div role="none" class="empty svelte-17yv21"><!></div>');const C4={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 Br(t,e){Te(t,C4);let n=O(e,"children",3,void 0);var r=T4(),i=D(r);Ie(i,()=>n()??ze),T(t,r)}var A4=F("<img>"),O4=F("<video></video>",2),P4=F("<audio></audio>"),L4=F('<video playsinline="" class="svelte-1va4mre"></video>',2),$4=F('<img alt="" class="svelte-1va4mre">'),N4=F('<div role="none" class="blur svelte-1va4mre"><div role="none" class="overlay svelte-1va4mre"></div> <!></div>'),I4=F('<div role="none"><!> <!></div>');const D4={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 Ls(t,e){se(e,!0),Te(t,D4);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,""),h=O(e,"controls",3,!1),f=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 Vc(l(p));try{i(l(b)?await hT(r()):await n_(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 Vc(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=I4(),S=D(k);{var C=$=>{nt($,{name:"draft"})},E=$=>{var N=V(),I=M(N);{var U=B=>{var W=A4();let G;Tt(W,X=>L(p,X),()=>l(p)),q(()=>G=yt(W,G,{loading:n(),src:i(),alt:d(),...f},"svelte-1va4mre")),T(B,W)},H=B=>{var W=V(),G=M(W);{var X=K=>{var Y=O4();let ne;Tt(Y,ce=>L(p,ce),()=>l(p)),q(()=>ne=yt(Y,ne,{src:i(),controls:h()||void 0,playsinline:!0,...f},"svelte-1va4mre")),T(K,Y)},re=K=>{var Y=V(),ne=M(Y);{var ce=Q=>{var Z=V(),de=M(Z);{var _e=ve=>{var fe=P4();let Pe;Tt(fe,Ae=>L(p,Ae),()=>l(p)),q(()=>Pe=yt(fe,Pe,{src:i(),controls:!0,playsinline:!0,...f},"svelte-1va4mre")),T(ve,fe)},me=ve=>{nt(ve,{name:"audio_file"})};j(de,ve=>{h()?ve(_e):ve(me,!1)})}T(Q,Z)},pe=Q=>{nt(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=N4(),I=R(D(N),2);{var U=B=>{var W=L4();q(()=>Se(W,"src",i())),T(B,W)},H=B=>{var W=$4();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(()=>{$r(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 R4=/^(?:\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)?$/,C_={year:"numeric",month:"short",day:"numeric"},A_={hour:"numeric",minute:"numeric",hour12:!0},UT=(t,e)=>{let n=()=>e?.().link,r=()=>e?.().collectionLabel,i=()=>e?.().entryLabel;var s=F4(),o=D(s);Xe(o,{role:"link",variant:"link",onclick:()=>jn(n()),children:(a,c)=>{var u=M4(),d=D(u);q(()=>J(d,`${r()??""} › ${i()??""}`)),T(a,u)},$$slots:{default:!0}}),T(t,s)};var M4=F('<span role="none"> </span>'),F4=F("<p><!></p>"),z4=F('<div role="none" class="preview svelte-1i169qh"><!></div>'),j4=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),U4=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),B4=F('<a target="_blank"> </a>'),q4=F("<a> </a>"),H4=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),V4=F('<section class="svelte-1i169qh"><h4 class="svelte-1i169qh"> </h4> <p> </p></section>'),W4=F("<p> </p>"),G4=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 K4={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 BT(t,e){se(e,!0),Te(t,K4);const[n,r]=ge(),i=()=>z(le,"$_",n),s=()=>z(Tn,"$appLocale",n);let o=O(e,"showPreview",3,!1),a=ae(ie({...Ap}));const c=w(()=>e.asset.path),u=w(()=>e.asset.size),d=w(()=>e.asset.kind),h=w(()=>e.asset.commitAuthor),f=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(()=>En(l(c))),y=w(()=>tt(l(v).extension,"")),x=w(()=>Ep(l(d))||l(c).endsWith(".pdf")),k=async()=>{L(a,ie(e.asset?await Op(e.asset):{...Ap}))};Ue(()=>{e.asset,k()});var S=G4(),C=D(S);{var E=he=>{var Ce=z4(),je=D(Ce);const Je=w(()=>l(d)==="image"),ut=w(()=>["audio","video"].includes(l(d)));Ls(je,{get kind(){return l(d)},get asset(){return e.asset},variant:"tile",get checkerboard(){return l(Je)},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=j4(),je=D(Ce),Je=D(je),ut=R(je,2),lt=D(ut);q(Ke=>{J(Je,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=U4(),je=D(Ce),Je=D(je),ut=R(je,2),lt=D(ut);q((Ke,rt)=>{J(Je,Ke),J(lt,rt)},[()=>i()("duration"),()=>l(b)?RU(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=B4(),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 me=R(ne,2),ve=D(me),fe=D(ve),Pe=R(ve,2),Ae=D(Pe);{var Re=he=>{var Ce=q4(),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(Re):he(He,!1)})}var Ve=R(me,2);{var mt=he=>{var Ce=H4(),je=D(Ce),Je=D(je),ut=R(je,2),lt=D(ut);q(Ke=>{J(Je,Ke),J(lt,l(h).name||l(h).login||l(h).email)},[()=>i()("sort_keys.commit_author")]),T(he,Ce)};j(Ve,he=>{l(h)&&he(mt)})}var et=R(Ve,2);{var ye=he=>{var Ce=V4(),je=D(Ce),Je=D(je),ut=R(je,2),lt=D(ut);q((Ke,rt)=>{J(Je,Ke),J(lt,rt)},[()=>i()("sort_keys.commit_date"),()=>l(f).toLocaleString(s()??void 0,{...C_,...A_})]),T(he,Ce)};j(et,he=>{l(f)&&he(ye)})}var we=R(et,2),xe=D(we),ke=D(xe),$e=R(xe,2);ft($e,17,()=>l(_),he=>he.sha,(he,Ce)=>{var je=V(),Je=M(je);ft(Je,17,()=>io(l(Ce)),ut=>ut.name,(ut,lt)=>{var Ke=V();const rt=w(()=>l(lt).label||l(lt).name);var Et=M(Ke);ft(Et,17,()=>Uo(l(lt),l(Ce)),Ht=>Ht.name,(Ht,vn)=>{UT(Ht,()=>({link:`/collections/${l(lt).name}/entries/${l(vn).name}`,collectionLabel:l(rt),entryLabel:l(vn).label||l(vn).name}))},Ht=>{var vn=Ge(()=>({link:`/collections/${l(lt).name}/entries/${l(Ce).subPath}`,collectionLabel:l(rt),entryLabel:jo(l(lt),l(Ce),{useTemplate:!0})}));UT(Ht,()=>l(vn))}),T(ut,Ke)}),T(he,je)},he=>{var Ce=W4(),je=D(Ce);q(Je=>J(je,Je),[()=>i()("sort_keys.none")]),T(he,Ce)}),q((he,Ce,je,Je,ut,lt,Ke)=>{J($,he),J(I,Ce),J(B,je),J(G,Je),J(pe,ut),J(fe,lt),J(ke,Ke)},[()=>i()("kind"),()=>i()(`file_type_labels.${l(y)}`,{default:$o.getType(l(c))??l(y).toUpperCase()}),()=>i()("size"),()=>s()?Gb(l(u)):"",()=>i()("public_url"),()=>i()("file_path"),()=>i()("used_in")]),T(t,S),oe(),r()}var Y4=F("<!> <!> <!>",1),J4=F("<!> <!>",1);function qT(t,e){se(e,!0);const[n,r]=ge(),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 h;const f=async()=>{if(h=void 0,!l(u))return!1;const S=await Ra(s()[0]);return h=S,zc(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=h;if(zc(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 cT(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(Op)))),L(a,ie(await f()))))()});var _=J4(),v=M(_);const y=w(()=>!s().length),x=w(()=>i()("copy"));wr(v,{variant:"ghost",get disabled(){return l(y)},get label(){return l(x)},popupPosition:"bottom-right",popup:C=>{const E=w(()=>i()("copy_options"));dr(C,{get"aria-label"(){return l(E)},children:(A,P)=>{var $=Y4(),N=M($);const I=w(()=>l(u)?i()("public_url"):i()("public_urls")),U=w(()=>!l(d).length);$t(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"));$t(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));$t(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);Hn(k,{get show(){return c.show},set show(S){c.show=S},children:(S,C)=>{qn(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 qa={saved:!1,moved:!1,renamed:!1,deleted:!1,published:!1,count:1},_d=it({...qa}),HT=async(t,e=[])=>{const n=te(Xr),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(On)?.commitChanges(r,{commitType:"delete",collection:te(zn)}),Xr.set(n.filter(i=>!t.includes(i.id))),_d.set({...qa,deleted:!0,count:t.length}),e.length&&Qt.update(i=>i.filter(s=>!e.includes(s.path)))},Z4=({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=Gn(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},VT=(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"?Jn():i==="uuid_short"?Jn("short"):i==="uuid_shorter"?Jn("shorter"):"")},X4=t=>{const{default:e,required:n=!0}=t;return e&&Gn(e)?e:n?{"":""}:{}},O_=({entryDraft:t,keyPath:e,locale:n})=>Object.entries(te(t).currentValues[n]??{}).filter(([r])=>r.startsWith(`${e}.`)).map(([r,i])=>[r.replace(`${e}.`,""),i]),Q4=({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"}),eq=({entryDraft:t,keyPath:e,locale:n,fieldConfig:r,pairs:i})=>{const{i18n:s}=r;Zi.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)),Zi.set(!0)},WT=t=>{const{prefix:e,use_b32_encoding:n}=t,r=n?_g():Jn();return e?`${e}${r}`:r},tq=({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]=G2(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},Rp=(t,e,n={})=>{const r={},i=({fieldConfig:s,keyPath:o})=>{if(o in n){tq({fieldConfig:s,keyPath:o,newContent:r,value:n[o]});return}const{widget:a="string",default:c}=s,u=cd({fieldConfig:s,locale:e}),d=Array.isArray(c)&&!!c.length;if(a==="list"){const{fields:h}=s;if(!d){r[o]=[];return}if(h){c.forEach((f,p)=>{Object.entries(f).forEach(([g,m])=>{r[[o,p,g].join(".")]=m})});return}c.forEach((f,p)=>{r[[o,p].join(".")]=f});return}if(a==="object"){const{fields:h,types:f}=s;!u||Array.isArray(f)?r[o]=null:h?.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,Z4({fieldConfig:s,keyPath:o}));return}if(a==="relation"||a==="select"){const{multiple:h=!1}=s;if(h){d?c.forEach((f,p)=>{r[[o,p].join(".")]=f}):r[o]=[];return}}if(a==="datetime"){r[o]=vU(s);return}if(a==="hidden"){r[o]=VT(s,e);return}if(a==="keyvalue"){Object.entries(X4(s)).forEach(([h,f])=>{r[`${o}.${h}`]=String(f)});return}r[o]=c!==void 0?c:""};return t.forEach(s=>{i({keyPath:s.name,fieldConfig:s})}),r},P_=({draft:{collectionName:t,fileName:e},locale:n,target:r={},getValueMap:i=void 0})=>{const s=Li(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,h)=>{if(u[d]!==h&&(u[d]=h),[c].includes(d))return!0;const f=typeof i=="function"?i():u,p=mn({collectionName:t,fileName:e,valueMap:f,keyPath:d});if(!p)return!0;const g=te(st)?.validities?.[n]?.[d];return g&&typeof h=="string"&&cd({fieldConfig:p,locale:n})&&(g.valueMissing=!h),te(Zi)&&p.i18n==="duplicate"&&n===a&&Object.entries(te(st).currentValues).forEach(([m,b])=>{if(d.includes(".")){const{path:_}=d.match(/(?<path>.+?)\.[^.]*$/)?.groups??{};if(!Object.keys(b).some(v=>v.startsWith(`${_}.`))&&!mn({collectionName:t,fileName:e,valueMap:f,keyPath:_}))return}m!==n&&b[d]!==h&&(b[d]=h)}),!0}})},yd=({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:h=[],_i18n:f}=e??t,{allLocales:p,initialLocales:g}=f,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,Rp(h,v,r)]:[v,structuredClone(u?.[v].content)]));st.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,P_({draft:{collectionName:s,fileName:o},locale:v,target:structuredClone(_[v])})])),files:{},validities:Object.fromEntries(p.map(v=>[v,{}])),expanderStates:i??{_:{}}}),iq({collectionName:s,fileName:o,slug:c})},nq=()=>{const t=te(st),{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(h=>{const f=mn({collectionName:e,fileName:n,valueMap:d,keyPath:h});f?.widget==="uuid"&&(u===a||[!0,"translate"].includes(f?.i18n??!1))&&(d[h]=WT(f)),f?.widget==="hidden"&&(u===a||[!0,"translate"].includes(f?.i18n??!1))&&(d[h]=VT(f,u))})}),Object.keys(o).forEach(u=>{o[u]={}}),st.set({...t,isNew:!0,originalEntry:void 0}),k_.set(!0)};let GT=0,Ha;const KT={saved:!1,restored:!1,deleted:!1},Mp=it({show:!1}),Wo=it({...KT}),Fp=async(t,e="")=>{await Ha?.delete([t,e])},L_=async(t,e="")=>{const n=await Ha?.get([t,e]);return n?n.siteConfigVersion===te(c_)?n:(await Fp(t,e),null):null},rq=async t=>{const{collectionName:e,originalEntry:n,originalLocales:r={},currentLocales:i={},originalValues:s={},currentValues:o={},files:a}=t,c=n?.slug||"";if(!Dn(r,i)||!Dn(s,o)){const d={timestamp:new Date,siteConfigVersion:te(c_),collectionName:e,slug:c,currentLocales:i,currentValues:Du(o),files:a};await Ha?.put(d)}else await L_(e,c)&&await Fp(e,c)},iq=async({collectionName:t,fileName:e,slug:n=""})=>{const r=await L_(t,n);if(!r)return;const{timestamp:i,currentLocales:s,currentValues:o,files:a}=r,c=await new Promise(u=>{Mp.set({show:!0,timestamp:i,resolve:u})});c!==void 0&&(c?(Zi.set(!1),st.update(u=>(u&&(u.currentLocales=s,Object.entries(o).forEach(([d,h])=>{Object.entries(h).forEach(([f,p])=>{typeof p=="string"&&[...p.matchAll(Zy("g"))].forEach(([g])=>{const m=a[g];if(m instanceof File){const b=URL.createObjectURL(m);h[f]=p.replaceAll(g,b),u.files[b]=m}})}),u.currentValues[d]?Object.assign(u.currentValues[d],h):u.currentValues[d]=P_({draft:{collectionName:t,fileName:e},locale:d,target:structuredClone(h)}),u.originalValues[d]||(u.originalValues[d]={})})),u)),Zi.set(!0)):await Fp(t,n),Wo.set({restored:c,deleted:!c,saved:!1}))},sq=async()=>{const t=te(st);if(!t||te(Wo).saved)return;const{collectionName:e,originalEntry:n}=t;await L_(e,n?.slug)&&Wo.set({restored:!1,deleted:!1,saved:!0})},oq=()=>{Wo.set({...KT})};On.subscribe(t=>{if(t&&!Ha){const{databaseName:e}=t.repository??{};if(e){Ha=new No(e,"draft-backups",{keyPath:["collectionName","slug"]});return}}Ha=null}),st.subscribe(t=>{globalThis.clearTimeout(GT),t&&Ha&&(GT=globalThis.setTimeout(()=>{rq(t)},500))});const YT=(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}},aq=/^\/?(?<pattern>.+?)(?:\/(?<flags>[dgimsuvy]*))?$/,lq=()=>{const{collection:t,collectionFile:e,fileName:n,currentLocales:r,currentValues:i,validities:s}=te(st),{i18nEnabled:o,defaultLocale:a}=(e??t)._i18n;let c=!0;return Object.entries(i).forEach(([u,d])=>{const h=Object.entries(d);if(!r[u]){s[u]=Object.fromEntries(h.map(([p])=>[p,{valid:!0}]));return}s[u]={};const f=(p,g)=>{const m=mn({collectionName:t.name,fileName:n,valueMap:d,keyPath:p});if(!m)return;const{widget:b="string",i18n:_=!1,pattern:v}=m,y=cd({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]||f(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(`^${an(p)}\\.\\d+$`),B=Array.isArray(g)&&g.length?g:h.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=mn({collectionName:t.name,fileName:n,valueMap:d,keyPath:H});if(H in s[u]||B?.widget!=="keyvalue")return;p=H;const G=O_({entryDraft:st,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(aq)?.groups??{},W=new RegExp(H,B);H&&!W.test(String(g))&&(N=!0)}if(["string","text"].includes(b)&&({tooShort:E,tooLong:A}=YT(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)};h.forEach(([p,g])=>{f(p,g)})}),st.update(u=>({...u,validities:s})),c},JT=(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()},ZT=t=>pB(t).trim(),XT=(t,e=te(_t)?.output?.yaml??{},n={})=>{const{indent_size:r=2,quote:i="none"}=e,{quote:s=!1}=n;return Ju.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()},QT=async({content:t,_file:e})=>{const{format:n,fmDelimiters:r,yamlQuote:i=!1}=e,s=Qd[n]?.formatter;if(s)return`${(await s(t)).trim()}
562
562
  `;try{if(/^ya?ml$/.test(n))return`${XT(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(Qr,"id",`list-${l(me)??""}-item-list`),dt(Qr,"collapsed",!l(G))}),T(Ce,je)},he=Ce=>{Cn(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(ve)},set value(je){L(ve,je)},$$legacy:!0})};j(ke,Ce=>{l(S)?Ce($e):Ce(he,!1)})}T(ye,xe)},$$slots:{default:!0}}),oe(),r()}var BV=(t,e)=>{t.key==="Enter"&&(t.stopPropagation(),e())},qV=(t,e)=>{t.stopPropagation(),e()},HV=F('<section role="group" tabindex="0" class="svelte-11ls1m1"><h4 class="svelte-11ls1m1"> </h4> <!></section>');const VV={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 U_(t,e){se(e,!0),Te(t,VV);const[n,r]=ge(),i=()=>z(st,"$entryDraft",n),s=w(()=>e.fieldConfig.name),o=w(()=>tt(e.fieldConfig.label,"")),a=w(()=>tt(e.fieldConfig.widget,"string")),c=w(()=>tt(e.fieldConfig.preview,!0)),u=w(()=>tt(e.fieldConfig.i18n,!1)),d=w(()=>["relation","select"].includes(l(a))),h=w(()=>l(d)?e.fieldConfig.multiple:void 0),f=w(()=>l(a)==="list"||l(d)&&l(h)),p=w(()=>i()?.collection),g=w(()=>i()?.collectionName??""),m=w(()=>i()?.collectionFile),b=w(()=>i()?.fileName),_=w(()=>br(i()?.currentValues[e.locale]??{})),v=w(()=>(l(m)??l(p))?._i18n??Ci),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(`^${an(e.keyPath)}\\.\\d+$`)),E=w(()=>l(f)?Object.entries(l(_)).filter(([I])=>l(C).test(I)).map(([,I])=>I).filter(I=>I!==void 0):l(_)[e.keyPath]),A=()=>{ao(Object.fromEntries(FT({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=HV();U.__keydown=[BV,A],U.__click=[qV,A];var H=D(U),B=D(H),W=R(H,2);{var G=X=>{var re=V();const K=w(()=>UC[l(a)]);var Y=M(re);mi(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 UC&&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()}ea(["keydown","click"]);var WV=F('<div role="none" class="header svelte-1bztb9y"> </div>'),GV=F('<div role="group" class="subsection svelte-1bztb9y"><!> <div class="items svelte-1bztb9y"><!></div></div>');const KV={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 DC(t,e){se(e,!0),Te(t,KV);const r=`${Zn("section")}-header`;let i=ae(void 0);var s=GV(),o=D(s);{var a=d=>{var h=WV();Se(h,"id",r);var f=D(h);q(()=>J(f,e.label)),T(d,h)};j(o,d=>{e.label&&d(a)})}var c=R(o,2),u=D(c);ar(u,()=>Vc(l(i)),null,d=>{var h=V(),f=M(h);Ie(f,()=>e.children??ze),T(d,h)}),Tt(s,d=>L(i,d),()=>l(i)),q(()=>Se(s,"aria-labelledby",e.label?r:void 0)),T(t,s),oe()}var YV=F('<p dir="auto"> </p>');function JV(t,e){se(e,!1);const[n,r]=ge(),i=()=>z(st,"$entryDraft",n),s=ue(),o=ue(),a=ue(),c=ue(),u=ue(),d=ue(),h=ue(),f=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,tt(S.typeKey,"type"))))(b())}),Me(()=>(l(o),l(a),l(c)),()=>{L(d,!!(l(o)??l(a)??l(c)))}),Me(()=>gt(m()),()=>{L(h,new RegExp(`^${an(m())}\\.\\d+`))}),Me(()=>gt(g()),()=>{L(f,sc(g()))}),Me(()=>(i(),gt(g()),l(h),gt(m()),l(s)),()=>{L(p,Pa(Object.fromEntries(Object.entries(i()?.currentValues[g()]??{}).filter(([S])=>l(h).test(S)).map(([S,C])=>[S.replace(new RegExp(`^${an(m())}`),l(s)),C])))[l(s)]??[])}),Pr(),yr();var v=V(),y=M(v);{var x=S=>{var C=V(),E=M(C);ft(E,1,()=>l(p),_r,(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)]:[]));DC(A,{get label(){return l(U)},children:(B,W)=>{var G=V(),X=M(G);ft(X,1,()=>l(H),re=>re.name,(re,K)=>{var Y=V(),ne=M(Y);ar(ne,()=>dn(0),null,ce=>{const pe=Ge(()=>l(o)?`${m()}.${$}`:`${m()}.${$}.${l(K).name}`);U_(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 $=YV(),N=D($);q(I=>{Se($,"lang",g()),J(N,I),$.dir=$.dir},[()=>l(f).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 ZV=(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"))},XV=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>'),QV=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 e9={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 t9(t,e){se(e,!0),Te(t,e9);const[n,r]=ge(),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({}),h=["image","string"],f=()=>l(a);on(()=>{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(()=>{Dn(s(),br(d))||Object.assign(d,s())})}),Ue(()=>{const S=br(d);Ee(()=>{Dn(s(),S)||o()(new CustomEvent("update",{detail:S}))})});var p=QV();p.__keydown=[ZV,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=>{nt(C,{name:"close"})},$$slots:{startIcon:!0}});var y=R(g,2);{var x=S=>{var C=V(),E=M(C);ft(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=XV();const X=w(()=>qp[I()]);var re=D(G),K=D(re),Y=D(K),ne=R(re,2),ce=D(ne);const pe=w(()=>Zn("field")),Q=w(()=>N()??$()),Z=w(()=>({name:$(),widget:I()}));mi(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(me){d[$()]=me}})}),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()}})]),gi("keydown",G,de=>{de.stopPropagation()},!0),T(W,G)};j(H,W=>{I()&&h.includes(I())&&W(B)})}T(A,U)}),T(S,C)};j(y,S=>{l(c)&&l(u)&&S(x)})}Tt(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:f});return r(),k}ea(["keydown"]);const RC=t=>Object.fromEntries(Object.entries(t).map(([e,n])=>[e,typeof n=="string"?n.trim().replace(/["()[[\]]/g,"\\$&"):""])),n9=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}=RC(n);if(!r)return"";const a=`![${i}](${r}${s?` "${s}"`:""})`;return o?`[${a}](${o})`:a},toPreview:n=>{const{src:r,alt:i,title:s,link:o}=RC(n),a=`<img src="${r}" alt="${i}" title="${s}">`;return o?`<a href="${o}">${a}</a>`:a}}})[t],r9=({id:t,label:e,fields:n,pattern:r,fromBlock:i,toBlock:s,toPreview:o})=>{const a=o({}).match(/\w+/)?.[0]??t;class c extends $0{__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 ol(),g??=lm(p),g?.update(()=>{_==="update"&&(this.getWritable().__props=v),_==="remove"&&this.remove()})},b=dg(t9,{target:document.createElement("div"),props:{label:e,fields:n,values:this.__props,onChange:m}});return j2(),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=f=>new c(f??Object.fromEntries(n.map(({name:p})=>[p,""]))),d=f=>f instanceof c&&f.getType()===t;return{node:c,createNode:u,transformer:{dependencies:[c],export:f=>d(f)?s(f.__props):null,importRegExp:r,regExp:r,replace:(f,p)=>{const g=p,m=i?.(g)??g.groups??{};f.replace(u(m))},type:"text-match"}}},MC=new Map;class i9{constructor(e){const{id:n}=e,r=MC.get(n),i=r??r9(e);r||MC.set(n,i),Object.assign(this,{...e,...i})}}var s9=F('<div role="none" class="wrapper svelte-1e9a0b3"><!></div>');const o9={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 a9(t,e){se(e,!0),Te(t,o9);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(()=>tt(e.fieldConfig.modes,()=>[...nO],!0)),c=w(()=>tt(e.fieldConfig.buttons,()=>[...iO],!0)),u=w(()=>tt(e.fieldConfig.editor_components,()=>[...oO],!0)),d=w(()=>tt(e.fieldConfig.minimal,!1)),h=w(()=>l(a).map(v=>rO[v]).filter(Boolean)),f=w(()=>[...l(c),...l(u).includes("code-block")?["code-block"]:[]].map(v=>sO[v]).filter(Boolean)),p=w(()=>[...l(u).map(v=>v==="code-block"||v in rw?void 0:n9(v)).filter(v=>!!v),...Object.values(rw)].map(v=>new i9(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=s9(),_=D(b);ar(_,()=>dn(0),null,v=>{eM(v,{get lang(){return e.locale},get modes(){return l(h)},get buttons(){return l(f)},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 l9(){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 c9=F('<div role="none" class="svelte-xzrmoz"><!></div>');const u9={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 d9(t,e){se(e,!0),Te(t,u9);const[n,r]=ge(),i=()=>z(st,"$entryDraft",n);let s=ae("");const o=w(()=>tt(e.fieldConfig.sanitize_preview,!1)),a={breaks:!0,async:!0,walkTokens:async h=>{if(h.type==="image"){const f=await bc(h.href,i()?.originalEntry);f&&(h.href=f)}}};At.use(l9()),Ue(()=>{(async()=>L(s,ie(await At.parse(e.currentValue??"",a))))()});var c=c9(),u=D(c);{var d=h=>{var f=V(),p=M(f);lr(p,()=>l(o)?ii.sanitize(l(s)):l(s)),T(h,f)};j(u,h=>{typeof e.currentValue=="string"&&e.currentValue.trim()&&h(d)})}T(t,c),oe(),r()}function f9(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(()=>tt(e.fieldConfig.value_type,"int")),u=w(()=>e.fieldConfig.min),d=w(()=>e.fieldConfig.max),h=w(()=>tt(e.fieldConfig.step,1)),f=w(()=>l(c)==="int"||l(c)==="float"),p=()=>{if(n()!==void 0){if(l(f)&&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(f)&&l(a)!==n()&&L(a,ie(String(n())))}},g=()=>{let y;l(f)?l(o)===void 0?y=NaN:l(c)==="int"?y=Number.parseInt(l(f)?String(l(o)):l(a),10):y=Number.parseFloat(l(f)?String(l(o)):l(a)):y=l(a),l(f)&&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=>{rM(y,{get min(){return l(u)},get max(){return l(d)},get step(){return l(h)},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=>{Cn(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(f)?y(_):y(v,!1)})}T(t,m),oe()}var h9=F('<p dir="auto"><!></p>');function p9(t,e){se(e,!0);const n=w(()=>tt(e.fieldConfig.value_type,"int")),r=w(()=>Xh(e.locale)),i=w(()=>Intl.NumberFormat(l(r)));var s=V(),o=M(s);{var a=c=>{var u=h9(),d=D(u);{var h=p=>{var g=We();q(m=>J(g,m),[()=>l(i).format(Number(e.currentValue))]),T(p,g)},f=p=>{var g=We();q(()=>J(g,e.currentValue)),T(p,g)};j(d,p=>{l(n)==="int"||l(n)==="float"?p(h):p(f,!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 g9=({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 yp({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 m9=F('<div role="none" class="summary svelte-23x9on"> </div>'),v9=F('<!> <div role="none" class="item-list"><!></div>',1),b9=F('<div role="none" class="wrapper svelte-23x9on"><!></div>'),_9=F("<!> <!> <!>",1);const y9={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 w9(t,e){se(e,!1),Te(t,y9);const[n,r]=ge(),i=()=>z(st,"$entryDraft",n),s=()=>z(le,"$_",n),o=ue(),a=ue(),c=ue(),u=ue(),d=ue(),h=ue(),f=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();on(()=>{L(re,Jn("short")),ao({[l(C)]:l(v)?._[l(C)]??!l(c)})});const Y=async fe=>{ot(Zi,!1),fe&&(Object.keys(i()?.currentValues??{}).forEach(Ae=>{(Ae===H()||l(a)==="duplicate")&&Ct(st,Ee(i).currentValues[Ae][l(P)]=fe,Ee(i))}),await ol());const Pe=wC(Object.fromEntries(Object.entries(Rp(l(N),H())).map(([Ae,Re])=>[`${B()}.${Ae}`,Re])));Object.entries(i()?.currentValues??{}).forEach(([Ae,Re])=>{(Ae===H()||l(a)==="duplicate")&&(Ct(st,Ee(i).currentValues[Ae]=Object.assign(Re,Du({...Pe,...Re})),Ee(i)),delete i().currentValues[Ae][B()])}),ot(Zi,!0)},ne=()=>{ot(Zi,!1),Object.entries(i()?.currentValues??{}).forEach(([fe,Pe])=>{(fe===H()||l(a)==="duplicate")&&(Object.keys(Pe).forEach(Ae=>{Ae.startsWith(`${B()}.`)&&(Ct(st,Ee(i).currentValues[fe][Ae]=null,Ee(i)),delete i()?.currentValues[fe][Ae])}),Ct(st,Ee(i).currentValues[fe][B()]=null,Ee(i)))}),ot(Zi,!0)},ce=()=>g9({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(h),l(f),gt(G())),()=>{(fe=>(L(o,fe.name),L(a,tt(fe.i18n,!1)),L(c,tt(fe.collapsed,!1)),L(u,fe.summary),L(d,fe.fields),L(h,fe.types),L(f,tt(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),Ci),()=>{(fe=>L(y,fe.defaultLocale))((l(m)??l(p))?._i18n??Ci)}),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||mn({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(h),()=>{L(A,Array.isArray(l(h)))}),Me(()=>(gt(B()),l(f)),()=>{L(P,`${B()}.${l(f)}`)}),Me(()=>(l(A),l(h),l(x),l(P)),()=>{L($,l(A)?l(h)?.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")}),Pr(),yr();var pe=_9(),Q=M(pe);{var Z=fe=>{const Pe=Ge(()=>s()("add_x",{values:{name:W()||l(o)}}));Gc(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=>{j_(fe,{get disabled(){return l(U)},get fieldConfig(){return G()},addItem:Y})};j(de,fe=>{l(A)&&!l(k)&&fe(_e)})}var me=R(de,2);{var ve=fe=>{var Pe=b9(),Ae=D(Pe);const Re=Ge(()=>l(E)?void 0:`object-${l(re)}-summary`);hr(Ae,{get"aria-labelledby"(){return l(Re)},children:(He,Ve)=>{var mt=v9(),et=M(mt);const ye=Ge(()=>l(A)?l($)?.label||l($)?.name:""),we=Ge(()=>l(N).length?()=>ao({[l(C)]:!l(E)}):void 0);IC(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);ar(ke,()=>Vc(l(K)),null,$e=>{var he=V(),Ce=M(he);{var je=ut=>{var lt=V(),Ke=M(lt);ft(Ke,1,()=>l(N),rt=>rt.name,(rt,Et)=>{var Ht=V(),vn=M(Ht);ar(vn,()=>dn(0),null,Pn=>{const tr=Ge(()=>[B(),l(Et).name].join("."));q_(Pn,{get keyPath(){return l(tr)},get locale(){return H()},get fieldConfig(){return l(Et)}})}),T(rt,Ht)}),T(ut,lt)},Je=ut=>{var lt=m9(),Ke=D(lt);q(rt=>{Se(lt,"id",`object-${l(re)??""}-summary`),J(Ke,rt)},[ce],Ge),T(ut,lt)};j(Ce,ut=>{l(E)?ut(je):ut(Je,!1)})}T($e,he)}),Tt(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(me,fe=>{(!(!X()||l(A))||l(k))&&l(S)&&fe(ve)})}T(t,pe),oe(),r()}function x9(t,e){se(e,!1);const[n,r]=ge(),i=()=>z(st,"$entryDraft",n),s=ue(),o=ue(),a=ue(),c=ue(),u=ue(),d=ue(),h=ue(),f=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,tt(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(h,`${b()}.${l(a)}`)}),Me(()=>(l(d),l(o),l(c),l(h)),()=>{L(f,l(d)?l(o)?.find(({name:k})=>k===l(c)[l(h)]):void 0)}),Me(()=>l(f),()=>{L(p,l(f)?l(f).label||l(f).name:void 0)}),Me(()=>(l(d),l(f),l(s)),()=>{L(g,(l(d)?l(f)?.fields:l(s))??[])}),Pr(),yr();var v=V(),y=M(v);{var x=k=>{DC(k,{get label(){return l(p)},children:(S,C)=>{var E=V(),A=M(E);ft(A,1,()=>l(g),P=>P.name,(P,$)=>{var N=V(),I=M(N);ar(I,()=>dn(0),null,U=>{const H=Ge(()=>[b(),l($).name].join("."));U_(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 k9(t,e){se(e,!1);const[n,r]=ge(),i=()=>z(st,"$entryDraft",n),s=ue(),o=ue(),a=ue();let c=O(e,"locale",8),u=O(e,"keyPath",8),d=O(e,"fieldId",8),h=O(e,"fieldConfig",8),f=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()||yC(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(h())),()=>{(E=>(L(s,E.i18n),L(o,E.max),L(a,tt(E.dropdown_threshold,5))))(h())}),Pr(),yr();var x=V(),k=M(x);{var S=E=>{T$(E,{get disabled(){return p()},get readonly(){return p()},get required(){return g()},get invalid(){return m()},get options(){return b()},get values(){return f()},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=>{_L(E,{get"aria-labelledby"(){return`${d()??""}-label`},children:(A,P)=>{var $=V(),N=M($);ft(N,1,b,({label:I,value:U})=>U,(I,U)=>{let H=()=>l(U).label,B=()=>l(U).value;const W=Ge(()=>f().includes(B()));Gc(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 FC(t,e){se(e,!1);const[n,r]=ge(),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),h=O(e,"invalid",8,!1),f=O(e,"options",8);Me(()=>(l(s),gt(a())),()=>{(_=>L(s,tt(_.dropdown_threshold,5)))(a())}),Me(()=>(gt(d()),gt(f()),i()),()=>{!d()&&!f().some(({value:_})=>_==="")&&f().unshift({label:i()("unselected_option"),value:"",searchValue:""})}),Pr(),yr();var p=V(),g=M(p);{var m=_=>{Zc(_,{get readonly(){return u()},get required(){return d()},get invalid(){return h()},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);ft(k,1,f,({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=_=>{u$(_,{get readonly(){return u()},get required(){return d()},get invalid(){return h()},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);ft(k,1,f,({label:S,value:C})=>C,(S,C)=>{let E=()=>l(C).label,A=()=>l(C).value;const P=Ge(()=>A()===c());p$(S,{get label(){return E()},get value(){return A()},get checked(){return l(P)}})}),T(v,x)},$$slots:{default:!0}})};j(g,_=>{f().length>l(s)?_(m):_(b,!1)})}T(t,p),oe(),r()}function zC(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),h=O(e,"sortOptions",8,!1),f=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(h()),ni),()=>{L(i,(()=>{const _=l(n).map(v=>Gn(v)?v:{label:v,value:v});return h()&&_.sort((v,y)=>ni(v.label,y.label)),_})())}),Me(()=>(l(r),FC),()=>{L(s,l(r)?k9:FC)}),Pr(),yr();var m=V(),b=M(m);us(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 f()},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 S9=F('<div role="none" class="wrapper"><!></div>');function E9(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),h=O(e,"currentValue",12),f=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),Bo),()=>{L(i,l(r)?[Jb(l(n),l(r))].filter(Boolean):Bo(l(n)))}),Me(()=>(gt(o()),gt(d()),l(i)),()=>{L(s,qb(o(),d(),l(i)))}),Pr(),yr();var m=S9(),b=D(m);const _=Ge(()=>({...d(),options:l(s)}));zC(b,{get locale(){return o()},get keyPath(){return a()},get fieldId(){return c()},get fieldLabel(){return u()},get fieldConfig(){return l(_)},get readonly(){return f()},get required(){return p()},get invalid(){return g()},sortOptions:!0,get currentValue(){return h()},set currentValue(v){h(v)},$$legacy:!0}),T(t,m),oe()}var T9=F('<p dir="auto"> </p>');function C9(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 h=O(e,"fieldConfig",8),f=O(e,"currentValue",8);Me(()=>(l(n),l(r),l(i),l(s),gt(h())),()=>{(b=>(L(n,b.collection),L(r,b.file),L(i,tt(b.multiple,!1)),L(s,b.value_field)))(h())}),Me(()=>(l(r),l(n),Bo),()=>{L(o,l(r)?[Jb(l(n),l(r))].filter(Boolean):Bo(l(n)))}),Me(()=>(gt(d()),gt(h()),l(o)),()=>{L(a,qb(d(),h(),l(o)))}),Me(()=>(l(i),gt(f()),l(a),l(s)),()=>{L(c,(l(i)?f():[f()]).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,sc(d()))}),Pr(),yr();var p=V(),g=M(p);{var m=b=>{var _=T9(),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 A9=F('<p dir="auto"> </p>'),O9=F('<p dir="auto"> </p>');function P9(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,yk(l(n)))}),Me(()=>gt(o()),()=>{L(s,sc(o()))}),Pr(),yr();var d=V(),h=M(d);{var f=g=>{var m=A9(),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=O9(),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(h,g=>{l(r)&&Array.isArray(c())&&c().length?g(f):g(p,!1)})}T(t,d),oe()}var L9=F('<div class="wrapper svelte-5qs6s0"><!> <span role="none" class="count svelte-5qs6s0"> </span> <!></div>');const $9={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 jC(t,e){se(e,!0),Te(t,$9);const[n,r]=ge(),i=()=>z(le,"$_",n),s=w(()=>e.fieldConfig.minlength),o=w(()=>e.fieldConfig.maxlength),a=w(()=>YT(e.fieldConfig,e.currentValue)),c=w(()=>l(a).count),u=w(()=>l(a).hasMin),d=w(()=>l(a).hasMax),h=w(()=>l(a).invalid);var f=V(),p=M(f);{var g=m=>{var b=L9(),_=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(h)),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,f),oe(),r()}function N9(t,e){se(e,!0);const[n,r]=ge();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(()=>tt(e.fieldConfig.type,"text")),d=w(()=>tt(e.fieldConfig.prefix,"")),h=w(()=>tt(e.fieldConfig.suffix,"")),{extraHint:f}=rs("field-editor")??{},p=()=>{let m=typeof i()=="string"?i():"";l(d)&&m.startsWith(l(d))&&(m=m.slice(l(d).length)),l(h)&&m.endsWith(l(h))&&(m=m.slice(0,-l(h).length)),l(c)!==m&&L(c,ie(m))},g=()=>{let m=l(c);l(d)&&!m.startsWith(l(d))&&(m=`${l(d)}${m}`),l(h)&&!m.endsWith(l(h))&&(m=`${m}${l(h)}`),i()!==m&&i(m)};Ue(()=>{i(),Ee(()=>{p()})}),Ue(()=>{l(c),Ee(()=>{g()})}),Ue(()=>{f&&ot(f,jC)}),Cn(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 I9=F('<iframe frameborder="0" allow="autoplay; encrypted-media; picture-in-picture" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" class="svelte-wmmi2b"></iframe>'),D9=F("<a> </a>"),R9=F('<div role="none"><!></div>');const M9={hash:"svelte-wmmi2b",code:"iframe.svelte-wmmi2b {display:block;margin:0 auto;width:100%;height:auto;aspect-ratio:16/9;}"};function F9(t,e){se(e,!0),Te(t,M9);const[n,r]=ge(),i=()=>z(le,"$_",n);let s=ae(void 0),o=ae(!0);const a=w(()=>zU(e.url));on(()=>{window.addEventListener("securitypolicyviolation",({blockedURI:f,violatedDirective:p})=>{f===new URL(l(a)).origin&&p==="frame-src"&&L(o,!1)})});var c=R9(),u=D(c);{var d=f=>{var p=V(),g=M(p);ar(g,()=>Vc(l(s)),null,m=>{var b=I9();q((_,v)=>{Se(b,"src",_),Se(b,"title",v)},[()=>encodeURI(l(a)),()=>i()("youtube_video_player")]),T(m,b)}),T(f,p)},h=f=>{var p=D9(),g=D(p);q(m=>{Se(p,"href",m),J(g,e.url)},[()=>encodeURI(e.url)]),T(f,p)};j(u,f=>{l(o)?f(d):f(h,!1)})}Tt(c,f=>L(s,f),()=>l(s)),T(t,c),oe(),r()}var z9=F("<a> </a>"),j9=F("<a> </a>"),U9=F('<p dir="auto" class="svelte-1dlg8zk"><!></p>');const B9={hash:"svelte-1dlg8zk",code:".title.svelte-1dlg8zk {font-size:var(--sui-font-size-xxx-large);font-weight:var(--sui-font-weight-bold);}"};function q9(t,e){se(e,!0),Te(t,B9);const n=w(()=>e.fieldConfig.name),r=w(()=>tt(e.fieldConfig.type,"text"));var i=V(),s=M(i);{var o=a=>{var c=U9(),u=D(c);{var d=f=>{var p=V(),g=M(p);{var m=_=>{F9(_,{get url(){return e.currentValue}})},b=_=>{var v=z9(),y=D(v);q(x=>{Se(v,"href",x),J(y,e.currentValue)},[()=>encodeURI(e.currentValue)]),T(_,v)};j(g,_=>{FU(e.currentValue)?_(m):_(b,!1)})}T(f,p)},h=f=>{var p=V(),g=M(p);{var m=_=>{var v=j9(),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(f,p)};j(u,f=>{l(r)==="url"||yg(e.currentValue)?f(d):f(h,!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 H9(t,e){se(e,!0);const[n,r]=ge();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}=rs("field-editor")??{},d=()=>{const f=typeof i()=="string"?i():"";l(c)!==f&&L(c,ie(f))},h=()=>{const f=l(c);i()!==f&&i(f)};Ue(()=>{i(),Ee(()=>{d()})}),Ue(()=>{l(c),Ee(()=>{h()})}),Ue(()=>{u&&ot(u,jC)}),gh(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(f){L(c,ie(f))}}),oe(),r()}var V9=F('<p dir="auto" class="svelte-tzbr78"> </p>');const W9={hash:"svelte-tzbr78",code:"p.svelte-tzbr78 {white-space:pre-wrap;}"};function G9(t,e){se(e,!0),Te(t,W9);var n=V(),r=M(n);{var i=s=>{var o=V9(),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 K9(t,e){se(e,!0);const[n,r]=ge(),i=()=>z(st,"$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),h=w(()=>(l(d)??l(u))?._i18n??Ci),f=w(()=>l(h).defaultLocale);on(()=>{s()||(e.locale===l(f)||[!0,"translate"].includes(e.fieldConfig?.i18n??!1))&&s(WT(e.fieldConfig))});const p=w(()=>a()||e.fieldConfig.read_only!==!1);Cn(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 Y9=F('<p class="svelte-1e2mlgo"> </p>');const J9={hash:"svelte-1e2mlgo",code:"p.svelte-1e2mlgo {font-family:var(--sui-font-family-monospace);}"};function Z9(t,e){se(e,!0),Te(t,J9);var n=V(),r=M(n);{var i=s=>{var o=Y9(),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 qp={boolean:sH,code:lH,color:gH,compute:_H,datetime:EH,file:LC,image:LC,keyvalue:EV,list:UV,markdown:a9,number:f9,object:w9,relation:E9,select:zC,string:N9,text:H9,uuid:K9},UC={boolean:aH,code:uH,color:bH,compute:wH,datetime:AH,file:$C,image:$C,keyvalue:OV,list:JV,markdown:d9,number:p9,object:x9,relation:C9,select:P9,string:q9,text:G9,uuid:Z9};function B_(t,e){se(e,!0);const[n,r]=ge(),i=()=>z(Up,"$translator",n),s=()=>z(le,"$_",n),o=()=>z(st,"$entryDraft",n);let a=O(e,"keyPath",3,""),c=O(e,"translate",3,!1);const u=w(()=>i().getSourceLanguage),d=w(()=>i().getTargetLanguage);var h=V(),f=M(h);ft(f,17,()=>e.otherLocales,_r,(p,g)=>{const m=w(()=>s()(c()?"translate_from_x":"copy_from_x",{values:{locale:Ks(l(g))}})),b=w(()=>!o()?.currentLocales[e.locale]||!o().currentLocales[l(g)]||a()&&!br(o().currentValues[l(g)])[a()]||!c()&&a()&&br(o().currentValues[l(g)])[a()]===br(o().currentValues[e.locale])[a()]||c()&&(!l(u)(e.locale)||!l(d)(l(g))));$t(p,{get label(){return l(m)},get disabled(){return l(b)},onclick:()=>{kC(l(g),e.locale,{keyPath:a(),translate:c()})}})}),T(t,h),oe(),r()}function BC(t,e){se(e,!0);const[n,r]=ge(),i=()=>z(Up,"$translator",n),s=()=>z(st,"$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),h=w(()=>l(u).getTargetLanguage),f=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:Ks(l(v).otherLocale)}})),x=w(()=>l(f)||!s()?.currentLocales[l(v).otherLocale]||!l(h)(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:()=>{kC(l(v).otherLocale,e.locale,{keyPath:c(),translate:!0})},startIcon:S=>{nt(S,{name:"translate"})},$$slots:{startIcon:!0}})},b=_=>{const v=w(()=>o()("translate"));wr(_,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(v)},get disabled(){return l(f)},endIcon:k=>{nt(k,{name:"translate"})},popup:k=>{const S=w(()=>o()("translation_options"));dr(k,{get"aria-label"(){return l(S)},children:(C,E)=>{B_(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 X9=F('<div class="required svelte-1vsh88z">*</div>'),Q9=F("<!> <!>",1),e6=F('<p class="comment svelte-1vsh88z"><!></p>'),t6=F("<!> <!> <!> <!> <!> <!> <!>",1),n6=F('<div role="none" class="svelte-1vsh88z"> </div>'),r6=F('<div role="none" class="before-input svelte-1vsh88z"><!></div>'),i6=F('<div role="none" class="prefix svelte-1vsh88z"> </div>'),s6=F('<div role="none" class="suffix svelte-1vsh88z"> </div>'),o6=F('<div role="none" class="after-input svelte-1vsh88z"><!></div>'),a6=F("<!> <!> <!> <!> <!>",1),l6=F('<p class="hint svelte-1vsh88z"><!></p>'),c6=F('<div role="none" class="footer svelte-1vsh88z"><!> <!></div>'),u6=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 d6={hash:"svelte-1vsh88z",code:`@keyframes svelte-1vsh88z-highlight {
588
+ ${l(o)??""}`)),T(C,E)};j(k,C=>{l(d)&&C(S)})}q(C=>{Se(b,"aria-label",C),dt(y,"invalid",l(h)),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,f),oe(),r()}function N9(t,e){se(e,!0);const[n,r]=ge();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(()=>tt(e.fieldConfig.type,"text")),d=w(()=>tt(e.fieldConfig.prefix,"")),h=w(()=>tt(e.fieldConfig.suffix,"")),{extraHint:f}=rs("field-editor")??{},p=()=>{let m=typeof i()=="string"?i():"";l(d)&&m.startsWith(l(d))&&(m=m.slice(l(d).length)),l(h)&&m.endsWith(l(h))&&(m=m.slice(0,-l(h).length)),l(c)!==m&&L(c,ie(m))},g=()=>{let m=l(c).trim();m&&(l(d)||l(h))&&(m=`${l(d)}${m}${l(h)}`),i()!==m&&i(m)};Ue(()=>{i(),Ee(()=>{p()})}),Ue(()=>{l(c),Ee(()=>{g()})}),Ue(()=>{f&&ot(f,jC)}),Cn(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 I9=F('<iframe frameborder="0" allow="autoplay; encrypted-media; picture-in-picture" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" class="svelte-wmmi2b"></iframe>'),D9=F("<a> </a>"),R9=F('<div role="none"><!></div>');const M9={hash:"svelte-wmmi2b",code:"iframe.svelte-wmmi2b {display:block;margin:0 auto;width:100%;height:auto;aspect-ratio:16/9;}"};function F9(t,e){se(e,!0),Te(t,M9);const[n,r]=ge(),i=()=>z(le,"$_",n);let s=ae(void 0),o=ae(!0);const a=w(()=>zU(e.url));on(()=>{window.addEventListener("securitypolicyviolation",({blockedURI:f,violatedDirective:p})=>{f===new URL(l(a)).origin&&p==="frame-src"&&L(o,!1)})});var c=R9(),u=D(c);{var d=f=>{var p=V(),g=M(p);ar(g,()=>Vc(l(s)),null,m=>{var b=I9();q((_,v)=>{Se(b,"src",_),Se(b,"title",v)},[()=>encodeURI(l(a)),()=>i()("youtube_video_player")]),T(m,b)}),T(f,p)},h=f=>{var p=D9(),g=D(p);q(m=>{Se(p,"href",m),J(g,e.url)},[()=>encodeURI(e.url)]),T(f,p)};j(u,f=>{l(o)?f(d):f(h,!1)})}Tt(c,f=>L(s,f),()=>l(s)),T(t,c),oe(),r()}var z9=F("<a> </a>"),j9=F("<a> </a>"),U9=F('<p dir="auto" class="svelte-1dlg8zk"><!></p>');const B9={hash:"svelte-1dlg8zk",code:".title.svelte-1dlg8zk {font-size:var(--sui-font-size-xxx-large);font-weight:var(--sui-font-weight-bold);}"};function q9(t,e){se(e,!0),Te(t,B9);const n=w(()=>e.fieldConfig.name),r=w(()=>tt(e.fieldConfig.type,"text"));var i=V(),s=M(i);{var o=a=>{var c=U9(),u=D(c);{var d=f=>{var p=V(),g=M(p);{var m=_=>{F9(_,{get url(){return e.currentValue}})},b=_=>{var v=z9(),y=D(v);q(x=>{Se(v,"href",x),J(y,e.currentValue)},[()=>encodeURI(e.currentValue)]),T(_,v)};j(g,_=>{FU(e.currentValue)?_(m):_(b,!1)})}T(f,p)},h=f=>{var p=V(),g=M(p);{var m=_=>{var v=j9(),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(f,p)};j(u,f=>{l(r)==="url"||yg(e.currentValue)?f(d):f(h,!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 H9(t,e){se(e,!0);const[n,r]=ge();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}=rs("field-editor")??{},d=()=>{const f=typeof i()=="string"?i():"";l(c)!==f&&L(c,ie(f))},h=()=>{const f=l(c);i()!==f&&i(f)};Ue(()=>{i(),Ee(()=>{d()})}),Ue(()=>{l(c),Ee(()=>{h()})}),Ue(()=>{u&&ot(u,jC)}),gh(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(f){L(c,ie(f))}}),oe(),r()}var V9=F('<p dir="auto" class="svelte-tzbr78"> </p>');const W9={hash:"svelte-tzbr78",code:"p.svelte-tzbr78 {white-space:pre-wrap;}"};function G9(t,e){se(e,!0),Te(t,W9);var n=V(),r=M(n);{var i=s=>{var o=V9(),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 K9(t,e){se(e,!0);const[n,r]=ge(),i=()=>z(st,"$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),h=w(()=>(l(d)??l(u))?._i18n??Ci),f=w(()=>l(h).defaultLocale);on(()=>{s()||(e.locale===l(f)||[!0,"translate"].includes(e.fieldConfig?.i18n??!1))&&s(WT(e.fieldConfig))});const p=w(()=>a()||e.fieldConfig.read_only!==!1);Cn(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 Y9=F('<p class="svelte-1e2mlgo"> </p>');const J9={hash:"svelte-1e2mlgo",code:"p.svelte-1e2mlgo {font-family:var(--sui-font-family-monospace);}"};function Z9(t,e){se(e,!0),Te(t,J9);var n=V(),r=M(n);{var i=s=>{var o=Y9(),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 qp={boolean:sH,code:lH,color:gH,compute:_H,datetime:EH,file:LC,image:LC,keyvalue:EV,list:UV,markdown:a9,number:f9,object:w9,relation:E9,select:zC,string:N9,text:H9,uuid:K9},UC={boolean:aH,code:uH,color:bH,compute:wH,datetime:AH,file:$C,image:$C,keyvalue:OV,list:JV,markdown:d9,number:p9,object:x9,relation:C9,select:P9,string:q9,text:G9,uuid:Z9};function B_(t,e){se(e,!0);const[n,r]=ge(),i=()=>z(Up,"$translator",n),s=()=>z(le,"$_",n),o=()=>z(st,"$entryDraft",n);let a=O(e,"keyPath",3,""),c=O(e,"translate",3,!1);const u=w(()=>i().getSourceLanguage),d=w(()=>i().getTargetLanguage);var h=V(),f=M(h);ft(f,17,()=>e.otherLocales,_r,(p,g)=>{const m=w(()=>s()(c()?"translate_from_x":"copy_from_x",{values:{locale:Ks(l(g))}})),b=w(()=>!o()?.currentLocales[e.locale]||!o().currentLocales[l(g)]||a()&&!br(o().currentValues[l(g)])[a()]||!c()&&a()&&br(o().currentValues[l(g)])[a()]===br(o().currentValues[e.locale])[a()]||c()&&(!l(u)(e.locale)||!l(d)(l(g))));$t(p,{get label(){return l(m)},get disabled(){return l(b)},onclick:()=>{kC(l(g),e.locale,{keyPath:a(),translate:c()})}})}),T(t,h),oe(),r()}function BC(t,e){se(e,!0);const[n,r]=ge(),i=()=>z(Up,"$translator",n),s=()=>z(st,"$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),h=w(()=>l(u).getTargetLanguage),f=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:Ks(l(v).otherLocale)}})),x=w(()=>l(f)||!s()?.currentLocales[l(v).otherLocale]||!l(h)(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:()=>{kC(l(v).otherLocale,e.locale,{keyPath:c(),translate:!0})},startIcon:S=>{nt(S,{name:"translate"})},$$slots:{startIcon:!0}})},b=_=>{const v=w(()=>o()("translate"));wr(_,{variant:"ghost",get size(){return a()},iconic:!0,popupPosition:"bottom-right",get"aria-label"(){return l(v)},get disabled(){return l(f)},endIcon:k=>{nt(k,{name:"translate"})},popup:k=>{const S=w(()=>o()("translation_options"));dr(k,{get"aria-label"(){return l(S)},children:(C,E)=>{B_(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 X9=F('<div class="required svelte-1vsh88z">*</div>'),Q9=F("<!> <!>",1),e6=F('<p class="comment svelte-1vsh88z"><!></p>'),t6=F("<!> <!> <!> <!> <!> <!> <!>",1),n6=F('<div role="none" class="svelte-1vsh88z"> </div>'),r6=F('<div role="none" class="before-input svelte-1vsh88z"><!></div>'),i6=F('<div role="none" class="prefix svelte-1vsh88z"> </div>'),s6=F('<div role="none" class="suffix svelte-1vsh88z"> </div>'),o6=F('<div role="none" class="after-input svelte-1vsh88z"><!></div>'),a6=F("<!> <!> <!> <!> <!>",1),l6=F('<p class="hint svelte-1vsh88z"><!></p>'),c6=F('<div role="none" class="footer svelte-1vsh88z"><!> <!></div>'),u6=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 d6={hash:"svelte-1vsh88z",code:`@keyframes svelte-1vsh88z-highlight {
589
589
  50% {
590
590
  opacity: 0.2;
591
591
  }