@sveltia/cms 0.5.1 → 0.5.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/dist/sveltia-cms.js +1 -1
- package/package.json +1 -1
package/dist/sveltia-cms.js
CHANGED
|
@@ -444,7 +444,7 @@ ${c}`}catch{}}return""},Dc=(t,e,s)=>{const{path:n,identifier_field:r="title"}=ms
|
|
|
444
444
|
}`,{input:{branch:{repositoryNameWithOwner:n,branchName:r},message:{headline:t},fileChanges:{additions:e,deletions:s},expectedHeadOid:i}});return l},SO=async(t,{commitType:e="update",collection:s}={})=>{await Ck(Ik(t,{commitType:e,collection:s}),{additions:await Promise.all(t.map(async({path:n,data:r,base64:i})=>({path:n,contents:i||await CT(r)})))})},EO=async(t,{commitType:e="delete",collection:s}={})=>{await Ck(Ik(t,{commitType:e,collection:s}),{deletions:t.map(({path:n})=>({path:n}))})},TO={label:gO,url:bO,signIn:yO,signOut:kO,fetchFiles:wO,saveFiles:SO,deleteFiles:EO};var js,Fr;class AO{constructor(e,s){Xh(this,js);this.database=void 0,this.databaseName=e,this.storeName=s}async set(e,s){return Cr(this,js,Fr).call(this,n=>n.put(s,e))}async setAll(e){return Cr(this,js,Fr).call(this,s=>{e.forEach(([n,r])=>{s.put(r,n)})})}async get(e){return Cr(this,js,Fr).call(this,s=>s.get(e))}async getAll(){return Cr(this,js,Fr).call(this,e=>e.getAll())}async delete(e){return Cr(this,js,Fr).call(this,s=>s.delete(e))}async clear(){return Cr(this,js,Fr).call(this,e=>e.clear())}}js=new WeakSet,Fr=async function(e){return this.database||(this.database=await new Promise(s=>{const n=window.indexedDB.open(this.databaseName,1);n.onupgradeneeded=()=>{n.result.createObjectStore(this.storeName)},n.onsuccess=()=>{s(n.result)}})),new Promise(s=>{const n=this.database.transaction([this.storeName],"readwrite"),r=n.objectStore(this.storeName),i=e(r);i?i.onsuccess=()=>{s(i.result)}:n.oncomplete=()=>{s()}})};const OO="Local Repository",LO=null,xd=Me(null),Vf="root_dir_handle";let aa;const NO=async({forceReload:t=!1}={})=>{if(!("showDirectoryPicker"in window))throw new Error("unsupported");const{backend:e}=ne(ct);aa=new AO(`${e.name}:${e.repo}`,"file-system-handles");let s=t?void 0:await aa.get(Vf);if(s)if(await s.requestPermission({mode:"readwrite"})!=="granted")s=void 0;else try{await s.entries().next()}catch{s=void 0}return s||(s=await window.showDirectoryPicker(),await aa.set(Vf,s)),s},PO=async()=>{await aa.delete(Vf)},IO=async()=>(xd.set(await NO()),{backendName:"local"}),CO=async()=>{PO()},Dk=async t=>{const e=mr(t).split("/"),s=!0;let n=ne(xd);for(const r of e)n=await(r.includes(".")?n.getFileHandle(r,{create:s}):n.getDirectoryHandle(r,{create:s}));return n},DO=async()=>{const t=ne(xd),e=[],s=[...ne(Od).map(({file:r,folder:i})=>r||i),...ne(os).map(({internalPath:r})=>r)],n=async r=>{for await(const[i,l]of r.entries())if(!i.startsWith(".")){if(l.kind==="file")try{const o=(await t.resolve(l)).join("/");if(!s.some(u=>o.startsWith(u)))continue;const a=await l.getFile();e.push({file:a,path:o,name:i,sha:await va(a),size:a.size,text:i.match(/\.(?:json|markdown|md|toml|ya?ml)$/i)?await PT(a):null})}catch(o){console.error(o)}l.kind==="directory"&&await n(l)}};return await n(t),e},MO=async()=>{const{entryFiles:t,assetFiles:e}=Ak(await DO());Ts.set(Nk(t)),Rn.set(Pk(e))},RO=async t=>{await Promise.all(t.map(async({path:e,data:s})=>{const r=await(await Dk(e)).createWritable();await r.write(s),await r.close()}))},FO=async t=>{await Promise.all(t.map(async({path:e})=>{const s=mr(e).split("/"),n=s.pop();await(await Dk(s.join("/"))).removeEntry(n)}))},UO={label:OO,url:LO,signIn:IO,signOut:CO,fetchFiles:MO,saveFiles:RO,deleteFiles:FO},Mk={github:TO,local:UO},Tr=Me();var jO=function t(e,s){if(e===s)return!0;if(e&&s&&typeof e=="object"&&typeof s=="object"){if(e.constructor!==s.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=s.length)return!1;for(r=n;r--!==0;)if(!t(e[r],s[r]))return!1;return!0}if(e.constructor===RegExp)return e.source===s.source&&e.flags===s.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===s.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===s.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(s).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(s,i[r]))return!1;for(r=n;r--!==0;){var l=i[r];if(!t(e[l],s[l]))return!1}return!0}return e!==e&&s!==s};const Un=nd(jO),Yf="sveltia-cms.prefs",mt=Me({},t=>{(async()=>{try{const e=await Jt.get(Yf)||{};e.apiKeys||(e.apiKeys={}),t(e)}catch{}})()});mt.subscribe(async t=>{if(!t||t.error||!Object.keys(t).length)return;try{Un(t,await Jt.get(Yf))||await Jt.set(Yf,t)}catch{}const{locale:e,theme:s,devModeEnabled:n=!1}=t;e&&ne(xb).includes(e)&&Tn.set(e);const r=!s||s==="auto",i=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";Object.assign(document.documentElement.dataset,{theme:r?i:s,autoTheming:r,env:n?"dev":"prod"})});const ct=Me(),{DEV:BO,VITE_CONFIG_PORT:zO}={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1},HO=t=>{var e,s;if(!$r(t))throw new Error(ne(_e)("config.error.parse_failed"));if(!((e=t.collections)!=null&&e.length))throw new Error(ne(_e)("config.error.no_collection"));if(!((s=t.backend)!=null&&s.name))throw new Error(ne(_e)("config.error.no_backend"));if(!(t.backend.name in Mk))throw new Error(ne(_e)("config.error.unsupported_backend",{values:{name:t.backend.name}}));if(!t.media_folder)throw new Error(ne(_e)("config.error.no_media_folder"))},VO=async()=>{const{href:t="./config.yml"}=document.querySelector('link[type="text/yaml"][rel="cms-config-url"]')||{};let e,s;try{try{e=await fetch(t)}catch{throw new Error(ne(_e)("config.error.fetch_failed"))}if(!e.ok)throw new Error(ne(_e)("config.error.fetch_failed"));try{s=xi.parse(await e.text())}catch{throw new Error(ne(_e)("config.error.parse_failed"))}HO(s),BO&&!s.site_url&&(s.site_url=`http://localhost:${zO||5174}`),ct.set(s)}catch(n){ct.set({error:n.name==="Error"?n.message:ne(_e)("config.error.unexpected")}),console.error(n)}};ct.subscribe(t=>{if(ne(mt).devModeEnabled&&console.info("siteConfig",t),!t||t.error)return;const{media_folder:e,public_folder:s,collections:n}=t;Lt.set(ms(n[0].name));const r=[...n.filter(({folder:c})=>!!c).map(({name:c,folder:f,extension:d,format:h,frontmatter_delimiter:m})=>({collectionName:c,folder:f,extension:d,format:h,frontmatterDelimiter:m})),...n.filter(({files:c})=>!!c).map(({name:c,files:f,extension:d,format:h,frontmatter_delimiter:m})=>f.map(({name:g,file:b})=>({collectionName:c,fileName:g,file:b,extension:d,format:h,frontmatterDelimiter:m}))).flat(1)],i=mr(e),l=s?`/${mr(s)}`:`/${i}`,o={collectionName:null,internalPath:i,publicPath:l,entryRelative:!1},a=n.map(c=>{const{name:f,folder:d,path:h}=c;let{media_folder:m="",public_folder:g=""}=c;if(!h&&!m)return null;const b=!(m&&(m.startsWith("/")||m.includes("{{media_folder}}")));return m=m.replace("{{media_folder}}",i),g=g.replace("{{public_folder}}",l),{collectionName:f,internalPath:mr(b?d:m),publicPath:g,entryRelative:b}}),u=[o,...a.filter(Boolean).sort((c,f)=>c.internalPath.localeCompare(f.internalPath))];Od.set(r),os.set(u),ne(mt).devModeEnabled&&(console.info("allContentPaths",r),console.info("allAssetPaths",u))});const Sn=Me(),YO=async t=>{const{site_domain:e=document.domain,base_url:s="https://api.netlify.com",auth_endpoint:n="auth"}=ne(ct).backend,r=600,i=800,{availHeight:l,availWidth:o}=window.screen,a=l/2-i/2,u=o/2-r/2,c=window.open(`${s}/${n}?provider=${t}&site_id=${e}&scope=repo`,"auth",`width=${r},height=${i},top=${a},left=${u}`);return new Promise(f=>{const d=({origin:h,data:m})=>{if(h!==s||typeof m!="string")return;if(m===`authorizing:${t}`){c.postMessage(m,h);return}const[,g,b]=m.match(new RegExp(`^authorization:${t}:(success|error):(.+)`))||[];let y;try{y=b?JSON.parse(b):void 0}catch{}f(g==="success"&&$r(y)&&typeof y.token=="string"?y.token:null),window.removeEventListener("message",d),c.close()};window.addEventListener("message",d)})};function GO(t){ge(t,"svelte-8a6wia",".buttons.svelte-8a6wia{display:flex;flex-direction:column;align-items:center;gap:16px}.buttons.svelte-8a6wia button{width:240px}")}function WO(t){let e,s=t[7]("config.error.unsupported_backend",{values:{name:t[0]}})+"",n;return{c(){e=P("div"),n=Y(s),M(e,"role","alert")},m(r,i){w(r,e,i),N(e,n)},p(r,i){i&129&&s!==(s=r[7]("config.error.unsupported_backend",{values:{name:r[0]}})+"")&&G(n,s)},i:K,o:K,d(r){r&&k(e)}}}function qO(t){let e,s;return e=new Ie({props:{class:"primary",label:t[7]("sign_in_with_x",{values:{name:t[6].label}})}}),e.$on("click",t[10]),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&192&&(i.label=n[7]("sign_in_with_x",{values:{name:n[6].label}})),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function KO(t){let e,s,n,r;const i=[JO,XO],l=[];function o(a,u){return a[2]?0:1}return e=o(t),s=l[e]=i[e](t),{c(){s.c(),n=J()},m(a,u){l[e].m(a,u),w(a,n,u),r=!0},p(a,u){let c=e;e=o(a),e===c?l[e].p(a,u):(H(),_(l[c],1,1,()=>{l[c]=null}),V(),s=l[e],s?s.p(a,u):(s=l[e]=i[e](a),s.c()),p(s,1),s.m(n.parentNode,n))},i(a){r||(p(s),r=!0)},o(a){_(s),r=!1},d(a){a&&k(n),l[e].d(a)}}}function ZO(t){let e,s=t[7]("unsupported.storage")+"",n;return{c(){e=P("div"),n=Y(s),M(e,"role","alert")},m(r,i){w(r,e,i),N(e,n)},p(r,i){i&128&&s!==(s=r[7]("unsupported.storage")+"")&&G(n,s)},i:K,o:K,d(r){r&&k(e)}}}function XO(t){let e,s;return e=new Ie({props:{class:"primary",label:t[7]("work_with_local_repo")}}),e.$on("click",t[9]),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&128&&(i.label=n[7]("work_with_local_repo")),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function JO(t){let e,s=t[7]("unsupported.browser")+"",n;return{c(){e=P("div"),n=Y(s),M(e,"role","alert")},m(r,i){w(r,e,i),N(e,n)},p(r,i){i&128&&s!==(s=r[7]("unsupported.browser")+"")&&G(n,s)},i:K,o:K,d(r){r&&k(e)}}}function QO(t){let e,s=t[7](`unsupported.${t[5]}`)+"",n;return{c(){e=P("div"),n=Y(s),M(e,"role","alert")},m(r,i){w(r,e,i),N(e,n)},p(r,i){i&160&&s!==(s=r[7](`unsupported.${r[5]}`)+"")&&G(n,s)},d(r){r&&k(e)}}}function xO(t){let e,s,n,r,i,l,o;const a=[ZO,KO,qO,WO],u=[];function c(h,m){return h[3]?0:h[1]?1:h[6]?2:3}s=c(t),n=u[s]=a[s](t);function f(h){t[11](h)}let d={showCancel:!1,$$slots:{default:[QO]},$$scope:{ctx:t}};return t[4]!==void 0&&(d.open=t[4]),i=new ls({props:d}),de.push(()=>We(i,"open",f)),{c(){e=P("div"),n.c(),r=R(),T(i.$$.fragment),M(e,"class","buttons svelte-8a6wia")},m(h,m){w(h,e,m),u[s].m(e,null),w(h,r,m),S(i,h,m),o=!0},p(h,[m]){let g=s;s=c(h),s===g?u[s].p(h,m):(H(),_(u[g],1,1,()=>{u[g]=null}),V(),n=u[s],n?n.p(h,m):(n=u[s]=a[s](h),n.c()),p(n,1),n.m(e,null));const b={};m&16544&&(b.$$scope={dirty:m,ctx:h}),!l&&m&16&&(l=!0,b.open=h[4],Ke(()=>l=!1)),i.$set(b)},i(h){o||(p(n),p(i.$$.fragment,h),o=!0)},o(h){_(n),_(i.$$.fragment,h),o=!1},d(h){h&&(k(e),k(r)),u[s].d(),E(i,h)}}}function eL(t,e,s){var y;let n,r,i,l;U(t,Tr,v=>s(6,n=v)),U(t,Sn,v=>s(12,r=v)),U(t,ct,v=>s(13,i=v)),U(t,_e,v=>s(7,l=v));let o=(y=i.backend)==null?void 0:y.name,a=!1,u=!1,c=!1,f=!1,d;const h=async(v="")=>{try{const $=await n.signIn(v);De(Sn,r=$,r),await Jt.set("sveltia-cms.user",$)}catch($){s(4,f=!0),s(5,d="unexpected"),console.error($)}};Qt(()=>{s(1,a=!!window.location.hostname.match(/^(?:.+\.)?localhost$/)),s(2,u=a&&!("showDirectoryPicker"in window)),a&&s(0,o="local"),(async()=>{try{const{backendName:v,token:$}=await Jt.get("sveltia-cms.user")||await Jt.get("netlify-cms-user")||{};if(v){if(["local","proxy"].includes(v))return;s(0,o=v),await Cb(),n&&$&&await h($)}}catch{s(3,c=!0)}})()});const m=async()=>{await h()},g=async()=>{await h()};function b(v){f=v,s(4,f)}return t.$$.update=()=>{t.$$.dirty&1&&De(Tr,n=Mk[o],n)},[o,a,u,c,f,d,n,l,h,m,g,b]}class tL extends X{constructor(e){super(),Z(this,e,eL,xO,W,{},GO)}}function nL(t){ge(t,"svelte-nantjd",".container.svelte-nantjd.svelte-nantjd.svelte-nantjd{position:fixed;inset:0;display:flex;justify-content:center;align-items:center;gap:16px}.container.svelte-nantjd div.svelte-nantjd.svelte-nantjd{display:flex;flex-direction:column;align-items:center;gap:32px;min-width:240px;height:240px}.container.svelte-nantjd .logo.svelte-nantjd.svelte-nantjd{max-width:160px;height:auto}.container.svelte-nantjd h1.svelte-nantjd.svelte-nantjd{font-size:48px}.container.svelte-nantjd .logo.svelte-nantjd~h1.svelte-nantjd{font-size:var(--sui-font-size-xxx-large)}.container.svelte-nantjd h2{margin:0 0 16px;font-size:var(--sui-font-size-large);font-weight:normal}")}function sL(t){let e,s=t[4]("loading_site_data")+"",n;return{c(){e=P("h2"),n=Y(s)},m(r,i){w(r,e,i),N(e,n)},p(r,i){i&16&&s!==(s=r[4]("loading_site_data")+"")&&G(n,s)},i:K,o:K,d(r){r&&k(e)}}}function rL(t){let e,s;return e=new tL({}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function iL(t){let e,s=t[4](`prefs.error.${t[1].error}`)+"",n;return{c(){e=P("h2"),n=Y(s)},m(r,i){w(r,e,i),N(e,n)},p(r,i){i&18&&s!==(s=r[4](`prefs.error.${r[1].error}`)+"")&&G(n,s)},i:K,o:K,d(r){r&&k(e)}}}function lL(t){let e,s=t[2].error+"",n,r,i=t[4]("config.error.try_again")+"",l;return{c(){e=P("h2"),n=Y(s),r=R(),l=Y(i)},m(o,a){w(o,e,a),N(e,n),N(e,r),N(e,l)},p(o,a){a&4&&s!==(s=o[2].error+"")&&G(n,s),a&16&&i!==(i=o[4]("config.error.try_again")+"")&&G(l,i)},i:K,o:K,d(o){o&&k(e)}}}function oL(t){let e,s=t[4]("loading_site_config")+"",n;return{c(){e=P("h2"),n=Y(s)},m(r,i){w(r,e,i),N(e,n)},p(r,i){i&16&&s!==(s=r[4]("loading_site_config")+"")&&G(n,s)},i:K,o:K,d(r){r&&k(e)}}}function aL(t){let e,s,n,r,i,l,o,a,u,c;const f=[oL,lL,iL,rL,sL],d=[];function h(m,g){var b;return m[2]?m[2].error?1:(b=m[1])!=null&&b.error?2:m[0]?m[3]?-1:4:3:0}return~(a=h(t))&&(u=d[a]=f[a](t)),{c(){var m;e=P("div"),s=P("div"),n=P("img"),i=R(),l=P("h1"),l.textContent="Sveltia CMS",o=R(),u&&u.c(),M(n,"loading","lazy"),Jr(n.src,r=((m=t[2])==null?void 0:m.logo_url)||`data:image/svg+xml;base64,${btoa(af)}`)||M(n,"src",r),M(n,"alt",""),M(n,"class","logo svelte-nantjd"),M(l,"class","svelte-nantjd"),M(s,"class","svelte-nantjd"),M(e,"class","container svelte-nantjd")},m(m,g){w(m,e,g),N(e,s),N(s,n),N(s,i),N(s,l),N(s,o),~a&&d[a].m(s,null),c=!0},p(m,[g]){var y;(!c||g&4&&!Jr(n.src,r=((y=m[2])==null?void 0:y.logo_url)||`data:image/svg+xml;base64,${btoa(af)}`))&&M(n,"src",r);let b=a;a=h(m),a===b?~a&&d[a].p(m,g):(u&&(H(),_(d[b],1,1,()=>{d[b]=null}),V()),~a?(u=d[a],u?u.p(m,g):(u=d[a]=f[a](m),u.c()),p(u,1),u.m(s,null)):u=null)},i(m){c||(p(u),c=!0)},o(m){_(u),c=!1},d(m){m&&k(e),~a&&d[a].d()}}}function uL(t,e,s){let n,r,i,l,o;return U(t,mf,a=>s(3,n=a)),U(t,Sn,a=>s(0,r=a)),U(t,mt,a=>s(1,i=a)),U(t,ct,a=>s(2,l=a)),U(t,_e,a=>s(4,o=a)),Qt(()=>{VO()}),t.$$.update=()=>{t.$$.dirty&7&&l&&!l.error&&i&&!i.error&&r&&(async()=>(await ne(Tr).fetchFiles(),De(mf,n=!0,n)))()},[r,i,l,n,o]}class cL extends X{constructor(e){super(),Z(this,e,uL,aL,W,{},nL)}}const Gf="sveltia-cms.assets-view",Ul=t=>{var e;return t==="*"?ne(_e)("all_files"):t?((e=ne(ct).collections.find(({name:s})=>s===t))==null?void 0:e.label)||"":ne(_e)("uncategorized")},Ba=t=>{const{media_folder:e}=ne(ct);if(!t)return Ul("*");if(t===e)return Ul(void 0);const s=ne(os).find(({internalPath:n})=>n===t);return s?Ul(s.collectionName):""},fL=(t,{key:e,order:s}={})=>{var l,o;if(!e||!s)return t;const n=[...t],r={commit_author:String,commit_date:Date}[e]||((o=(l=n[0])==null?void 0:l[e])==null?void 0:o.constructor)||String,i=a=>{const{commitAuthor:{name:u,email:c}={},commitDate:f}=a;return e==="commit_author"?u||c:e==="commit_date"?f:a[e]||""};return n.sort((a,u)=>{const c=i(a),f=i(u);return r===String?c.localeCompare(f):c-f}),s==="descending"&&n.reverse(),n},dL=(t,{field:e,pattern:s}={field:void 0,pattern:void 0})=>{if(!e)return t;if(e==="fileType")return t.filter(({path:r})=>s==="other"?!Object.values(gf).some(i=>r.match(i)):r.match(gf[s]));const n=typeof s=="string"?new RegExp(s):void 0;return t.filter(r=>{const i=r[e];return n?String(i||"").match(n):i===s})},hL=(t,{field:e,pattern:s}={field:void 0,pattern:void 0})=>{if(!e)return t.length?{"*":t}:{};const n=typeof s=="string"?new RegExp(s):void 0,r={},i=ne(_e)("other");return t.forEach(l=>{const o=l[e];let a;n?[a=i]=String(o||"").match(n)||[]:a=o,a in r||(r[a]=[]),r[a].push(l)}),Object.fromEntries(Object.entries(r).sort(([l],[o])=>l.localeCompare(o)))},pL={type:"grid",sort:{key:"name",order:"ascending"}},za=Me({},t=>{(async()=>{try{t(await Jt.get(Gf)||{})}catch{}})()}),Dn=Me({}),mL=En([Sn],([t],e)=>{const s=["name"];(t==null?void 0:t.backendName)!=="local"&&s.push("commit_author","commit_date"),e(s)}),Nu=En([Rn,rs],([t,e],s)=>{s(t&&e?t.filter(({folder:n})=>e===n):t?[...t]:[])}),Rk=En([Nu,Dn],([t,e],s)=>{let n=[...t];n=fL(n,e==null?void 0:e.sort),n=dL(n,e==null?void 0:e.filter),s(hL(n,e==null?void 0:e.group))});Nu.subscribe(t=>{_r.set([]),ne(mt).devModeEnabled&&console.info("listedAssets",t)});rs.subscribe(t=>{const e=ne(za)[t||"*"]||JSON.parse(JSON.stringify(pL));Un(e,Dn)||Dn.set(e)});Dn.subscribe(t=>{const e=ne(rs)||"*",s=ne(za)[e]||{};Un(t,s)||za.update(n=>({...n,[e]:t}))});za.subscribe(t=>{!t||!Object.keys(t).length||(async()=>{try{Un(t,await Jt.get(Gf))||await Jt.set(Gf,t)}catch{}})()});const _L=async({files:t,folder:e},s)=>{await ne(Tr).saveFiles(t.map(i=>({path:[e,i.name].join("/"),data:i})),s);const{collectionName:n=null}=ne(os).findLast(({internalPath:i})=>e===i)||{},r=await Promise.all(t.map(async i=>({url:URL.createObjectURL(i),name:i.name,path:[e,i.name].join("/"),sha:await va(i),size:i.size,kind:Nd(i.name),text:null,collectionName:n,folder:e})));Rn.update(i=>[...i.filter(l=>!r.some(o=>o.path===l.path)),...r])},gL=async t=>{const e=t.map(({path:s})=>({path:s}));await ne(Tr).deleteFiles(e,{commitType:"deleteMedia"}),Rn.update(s=>s.filter(n=>!t.includes(n)))};function bL(t){let e=t[2]("confirm_deleting_selected_files",{values:{number:t[1].length}})+"",s;return{c(){s=Y(e)},m(n,r){w(n,s,r)},p(n,r){r&6&&e!==(e=n[2]("confirm_deleting_selected_files",{values:{number:n[1].length}})+"")&&G(s,e)},d(n){n&&k(s)}}}function yL(t){let e=t[2]("confirm_deleting_all_files")+"",s;return{c(){s=Y(e)},m(n,r){w(n,s,r)},p(n,r){r&4&&e!==(e=n[2]("confirm_deleting_all_files")+"")&&G(s,e)},d(n){n&&k(s)}}}function kL(t){let e=t[2]("confirm_deleting_selected_file")+"",s;return{c(){s=Y(e)},m(n,r){w(n,s,r)},p(n,r){r&4&&e!==(e=n[2]("confirm_deleting_selected_file")+"")&&G(s,e)},d(n){n&&k(s)}}}function wL(t){let e;function s(i,l){return i[1].length===1?kL:i[1].length===i[3].length?yL:bL}let n=s(t),r=n(t);return{c(){r.c(),e=J()},m(i,l){r.m(i,l),w(i,e,l)},p(i,l){n===(n=s(i))&&r?r.p(i,l):(r.d(1),r=n(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){i&&k(e),r.d(i)}}}function vL(t){let e,s,n;function r(l){t[5](l)}let i={title:t[1].length===1?t[2]("delete_file"):t[2]("delete_files"),okLabel:t[2]("delete"),$$slots:{default:[wL]},$$scope:{ctx:t}};return t[0]!==void 0&&(i.open=t[0]),e=new ls({props:i}),de.push(()=>We(e,"open",r)),e.$on("ok",t[6]),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&6&&(a.title=l[1].length===1?l[2]("delete_file"):l[2]("delete_files")),o&4&&(a.okLabel=l[2]("delete")),o&142&&(a.$$scope={dirty:o,ctx:l}),!s&&o&1&&(s=!0,a.open=l[0],Ke(()=>s=!1)),e.$set(a)},i(l){n||(p(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function $L(t,e,s){let n,r;U(t,_e,c=>s(2,n=c)),U(t,Nu,c=>s(3,r=c));let{open:i=!1}=e,{assets:l=[]}=e;const o=xs();function a(c){i=c,s(0,i)}const u=()=>{gL(l),o("delete")};return t.$$set=c=>{"open"in c&&s(0,i=c.open),"assets"in c&&s(1,l=c.assets)},[i,l,n,r,o,a,u]}class Fk extends X{constructor(e){super(),Z(this,e,$L,vL,W,{open:0,assets:1})}}const ua=Me(""),go=(t=window.location)=>{const{pathname:e,searchParams:s}=new URL(`${t.origin}${t.hash.substring(1)}`);return{path:decodeURIComponent(e),params:Object.fromEntries([...s.entries()])}},qt=(t,{state:e={},replaceState:s=!1}={})=>{const n=window.location.hash,r=`#${t}`,i=[{...e,from:n},"",r];s?window.history.replaceState(...i):window.history.pushState(...i),window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:n,newURL:r}))},zi=(t,e={})=>{var s;(s=window.history.state)!=null&&s.from?window.history.back():qt(t,e)},Uk=()=>{const{display_url:t,site_url:e}=ne(ct);window.open(t||e||"/","_blank")};function SL(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"arrow_back_ios_new",label:t[2]("cancel")}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&4&&(i.label=n[2]("cancel")),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function EL(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"delete"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function TL(t){let e,s,n,r=t[3].name+"",i,l,o,a,u,c;return e=new Ie({props:{class:"ghost iconic",$$slots:{"start-icon":[SL]},$$scope:{ctx:t}}}),e.$on("click",t[4]),o=new _n({props:{flex:!0}}),u=new Ie({props:{class:"secondary",label:t[2]("delete"),$$slots:{"start-icon":[EL]},$$scope:{ctx:t}}}),u.$on("click",t[5]),{c(){T(e.$$.fragment),s=R(),n=P("h2"),i=Y(r),l=R(),T(o.$$.fragment),a=R(),T(u.$$.fragment)},m(f,d){S(e,f,d),w(f,s,d),w(f,n,d),N(n,i),w(f,l,d),S(o,f,d),w(f,a,d),S(u,f,d),c=!0},p(f,d){const h={};d&260&&(h.$$scope={dirty:d,ctx:f}),e.$set(h),(!c||d&8)&&r!==(r=f[3].name+"")&&G(i,r);const m={};d&4&&(m.label=f[2]("delete")),d&256&&(m.$$scope={dirty:d,ctx:f}),u.$set(m)},i(f){c||(p(e.$$.fragment,f),p(o.$$.fragment,f),p(u.$$.fragment,f),c=!0)},o(f){_(e.$$.fragment,f),_(o.$$.fragment,f),_(u.$$.fragment,f),c=!1},d(f){f&&(k(s),k(n),k(l),k(a)),E(e,f),E(o,f),E(u,f)}}}function AL(t){let e,s,n,r,i;e=new tr({props:{class:"primary",$$slots:{default:[TL]},$$scope:{ctx:t}}});function l(a){t[6](a)}let o={assets:[t[3]]};return t[0]!==void 0&&(o.open=t[0]),n=new Fk({props:o}),de.push(()=>We(n,"open",l)),n.$on("delete",t[7]),{c(){T(e.$$.fragment),s=R(),T(n.$$.fragment)},m(a,u){S(e,a,u),w(a,s,u),S(n,a,u),i=!0},p(a,[u]){const c={};u&271&&(c.$$scope={dirty:u,ctx:a}),e.$set(c);const f={};u&8&&(f.assets=[a[3]]),!r&&u&1&&(r=!0,f.open=a[0],Ke(()=>r=!1)),n.$set(f)},i(a){i||(p(e.$$.fragment,a),p(n.$$.fragment,a),i=!0)},o(a){_(e.$$.fragment,a),_(n.$$.fragment,a),i=!1},d(a){a&&k(s),E(e,a),E(n,a)}}}function OL(t,e,s){let n,r,i;U(t,rs,f=>s(1,n=f)),U(t,_e,f=>s(2,r=f)),U(t,ei,f=>s(3,i=f));let l=!1;const o=()=>{zi(n?`/assets/${n}`:"/assets")},a=()=>{s(0,l=!0)};function u(f){l=f,s(0,l)}return[l,n,r,i,o,a,u,()=>{zi(n?`/assets/${n}`:"/assets")}]}let LL=class extends X{constructor(e){super(),Z(this,e,OL,AL,W,{})}};function NL(t){ge(t,"svelte-z4b0dv","img.svelte-z4b0dv{width:100%;height:100%;object-fit:contain;background-color:var(--sui-tertiary-background-color)}img.cover.svelte-z4b0dv{object-fit:cover}img.checkerboard.svelte-z4b0dv{background-image:linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%), linear-gradient(45deg, #eee 25%, #fff 25%, #fff 75%, #eee 75%);background-size:16px 16px;background-position:0 0, 8px 8px}")}function PL(t){let e,s,n=[{loading:t[0]},{src:s=t[1]},{alt:t[2]},t[5]],r={};for(let i=0;i<n.length;i+=1)r=x(r,n[i]);return{c(){e=P("img"),Ee(e,r),le(e,"checkerboard",t[3]),le(e,"cover",t[4]),le(e,"svelte-z4b0dv",!0)},m(i,l){w(i,e,l)},p(i,[l]){Ee(e,r=He(n,[l&1&&{loading:i[0]},l&2&&!Jr(e.src,s=i[1])&&{src:s},l&4&&{alt:i[2]},l&32&&i[5]])),le(e,"checkerboard",i[3]),le(e,"cover",i[4]),le(e,"svelte-z4b0dv",!0)},i:K,o:K,d(i){i&&k(e)}}}function IL(t,e,s){const n=["loading","src","alt","checkerboard","cover"];let r=he(e,n),{loading:i="lazy"}=e,{src:l=""}=e,{alt:o=""}=e,{checkerboard:a=!1}=e,{cover:u=!1}=e;return t.$$set=c=>{e=x(x({},e),Ze(c)),s(5,r=he(e,n)),"loading"in c&&s(0,i=c.loading),"src"in c&&s(1,l=c.src),"alt"in c&&s(2,o=c.alt),"checkerboard"in c&&s(3,a=c.checkerboard),"cover"in c&&s(4,u=c.cover)},[i,l,o,a,u,r]}let _s=class extends X{constructor(e){super(),Z(this,e,IL,PL,W,{loading:0,src:1,alt:2,checkerboard:3,cover:4},NL)}};function CL(t){ge(t,"svelte-151yxdm","video.svelte-151yxdm{width:100%;height:100%;object-fit:contain}video.cover.svelte-151yxdm{object-fit:cover}")}function DL(t){let e,s,n=[{playsInline:!0},{src:s=t[0]},t[2]],r={};for(let i=0;i<n.length;i+=1)r=x(r,n[i]);return{c(){e=P("video"),Ee(e,r),le(e,"cover",t[1]),le(e,"svelte-151yxdm",!0)},m(i,l){w(i,e,l)},p(i,[l]){Ee(e,r=He(n,[{playsInline:!0},l&1&&!Jr(e.src,s=i[0])&&{src:s},l&4&&i[2]])),le(e,"cover",i[1]),le(e,"svelte-151yxdm",!0)},i:K,o:K,d(i){i&&k(e)}}}function ML(t,e,s){const n=["src","cover"];let r=he(e,n),{src:i=""}=e,{cover:l=!1}=e;return t.$$set=o=>{e=x(x({},e),Ze(o)),s(2,r=he(e,n)),"src"in o&&s(0,i=o.src),"cover"in o&&s(1,l=o.cover)},[i,l,r]}class bo extends X{constructor(e){super(),Z(this,e,ML,DL,W,{src:0,cover:1},CL)}}function RL(t){ge(t,"svelte-18iyge6",".detail.svelte-18iyge6.svelte-18iyge6{flex:none;overflow-x:hidden;overflow-y:auto;width:320px;padding:16px}.detail.svelte-18iyge6 .preview.svelte-18iyge6{overflow:hidden;margin:0 0 16px;border-radius:var(--sui-control-medium-border-radius);aspect-ratio:1/1}.detail.svelte-18iyge6 section.svelte-18iyge6{margin:0 0 16px}.detail.svelte-18iyge6 h4.svelte-18iyge6,.detail.svelte-18iyge6 p.svelte-18iyge6{margin:0 0 4px;font-size:inherit;word-break:break-all}")}function qm(t,e,s){const n=t.slice();n[19]=e[s].sha,n[20]=e[s].slug,n[21]=e[s].locales,n[22]=e[s].collectionName,n[23]=e[s].fileName;const r=ms(n[22]);n[24]=r;const i=n[24]._i18n;n[25]=i.defaultLocale!==void 0?i.defaultLocale:"default";const l=n[21][n[25]]||{};return n[26]=l.content,n}function Km(t){let e,s,n,r=t[2]==="image"&&Zm(t),i=t[2]==="video"&&Xm(t);return{c(){e=P("div"),r&&r.c(),s=R(),i&&i.c(),M(e,"class","preview svelte-18iyge6")},m(l,o){w(l,e,o),r&&r.m(e,null),N(e,s),i&&i.m(e,null),n=!0},p(l,o){l[2]==="image"?r?(r.p(l,o),o&4&&p(r,1)):(r=Zm(l),r.c(),p(r,1),r.m(e,s)):r&&(H(),_(r,1,1,()=>{r=null}),V()),l[2]==="video"?i?(i.p(l,o),o&4&&p(i,1)):(i=Xm(l),i.c(),p(i,1),i.m(e,null)):i&&(H(),_(i,1,1,()=>{i=null}),V())},i(l){n||(p(r),p(i),n=!0)},o(l){_(r),_(i),n=!1},d(l){l&&k(e),r&&r.d(),i&&i.d()}}}function Zm(t){let e,s;return e=new _s({props:{src:Nt(t[0]),checkerboard:!0}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&1&&(i.src=Nt(n[0])),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function Xm(t){let e,s;return e=new bo({props:{src:Nt(t[0])}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&1&&(i.src=Nt(n[0])),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function Jm(t){let e,s,n=t[14]("dimensions")+"",r,i,l,o=t[5]?`${t[5].width}×${t[5].height}`:"–",a;return{c(){e=P("section"),s=P("h4"),r=Y(n),i=R(),l=P("p"),a=Y(o),M(s,"class","svelte-18iyge6"),M(l,"class","svelte-18iyge6"),M(e,"class","svelte-18iyge6")},m(u,c){w(u,e,c),N(e,s),N(s,r),N(e,i),N(e,l),N(l,a)},p(u,c){c&16384&&n!==(n=u[14]("dimensions")+"")&&G(r,n),c&32&&o!==(o=u[5]?`${u[5].width}×${u[5].height}`:"–")&&G(a,o)},d(u){u&&k(e)}}}function Qm(t){let e,s,n=t[14]("duration")+"",r,i,l,o=(t[6]?hm(t[6]):"–")+"",a;return{c(){e=P("section"),s=P("h4"),r=Y(n),i=R(),l=P("p"),a=Y(o),M(s,"class","svelte-18iyge6"),M(l,"class","svelte-18iyge6"),M(e,"class","svelte-18iyge6")},m(u,c){w(u,e,c),N(e,s),N(s,r),N(e,i),N(e,l),N(l,a)},p(u,c){c&16384&&n!==(n=u[14]("duration")+"")&&G(r,n),c&64&&o!==(o=(u[6]?hm(u[6]):"–")+"")&&G(a,o)},d(u){u&&k(e)}}}function FL(t){let e,s;return{c(){e=P("a"),s=Y(t[4]),M(e,"href",t[4])},m(n,r){w(n,e,r),N(e,s)},p(n,r){r&16&&G(s,n[4]),r&16&&M(e,"href",n[4])},d(n){n&&k(e)}}}function UL(t){let e;return{c(){e=Y("–")},m(s,n){w(s,e,n)},p:K,d(s){s&&k(e)}}}function jL(t){let e,s;return{c(){e=Y("/"),s=Y(t[3])},m(n,r){w(n,e,r),w(n,s,r)},p(n,r){r&8&&G(s,n[3])},d(n){n&&(k(e),k(s))}}}function BL(t){let e,s,n;return{c(){e=P("a"),s=Y("/"),n=Y(t[3]),M(e,"href",t[10])},m(r,i){w(r,e,i),N(e,s),N(e,n)},p(r,i){i&8&&G(n,r[3]),i&1024&&M(e,"href",r[10])},d(r){r&&k(e)}}}function xm(t){let e,s,n=t[14]("sort_keys.commit_author")+"",r,i,l,o=(t[12].name||t[12].email)+"",a;return{c(){e=P("section"),s=P("h4"),r=Y(n),i=R(),l=P("p"),a=Y(o),M(s,"class","svelte-18iyge6"),M(l,"class","svelte-18iyge6"),M(e,"class","svelte-18iyge6")},m(u,c){w(u,e,c),N(e,s),N(s,r),N(e,i),N(e,l),N(l,a)},p(u,c){c&16384&&n!==(n=u[14]("sort_keys.commit_author")+"")&&G(r,n),c&4096&&o!==(o=(u[12].name||u[12].email)+"")&&G(a,o)},d(u){u&&k(e)}}}function e_(t){let e,s,n=t[14]("sort_keys.commit_date")+"",r,i,l,o=t[11].toLocaleString(t[15])+"",a;return{c(){e=P("section"),s=P("h4"),r=Y(n),i=R(),l=P("p"),a=Y(o),M(s,"class","svelte-18iyge6"),M(l,"class","svelte-18iyge6"),M(e,"class","svelte-18iyge6")},m(u,c){w(u,e,c),N(e,s),N(s,r),N(e,i),N(e,l),N(l,a)},p(u,c){c&16384&&n!==(n=u[14]("sort_keys.commit_date")+"")&&G(r,n),c&34816&&o!==(o=u[11].toLocaleString(u[15])+"")&&G(a,o)},d(u){u&&k(e)}}}function t_(t){let e,s=t[14]("sort_keys.none")+"",n;return{c(){e=P("p"),n=Y(s),M(e,"class","svelte-18iyge6")},m(r,i){w(r,e,i),N(e,n)},p(r,i){i&16384&&s!==(s=r[14]("sort_keys.none")+"")&&G(n,s)},d(r){r&&k(e)}}}function zL(t){let e=(t[26][t[24].identifier_field]||t[26].title||t[26].name||t[26].label)+"",s;return{c(){s=Y(e)},m(n,r){w(n,s,r)},p(n,r){r&128&&e!==(e=(n[26][n[24].identifier_field]||n[26].title||n[26].name||n[26].label)+"")&&G(s,e)},d(n){n&&k(s)}}}function HL(t){let e=t[24].files.find(n).label+"",s;function n(...r){return t[16](t[23],...r)}return{c(){s=Y(e)},m(r,i){w(r,s,i)},p(r,i){t=r,i&128&&e!==(e=t[24].files.find(n).label+"")&&G(s,e)},d(r){r&&k(s)}}}function VL(t){let e,s=(t[24].label||t[24].name)+"",n,r;function i(a,u){if(a[24].files)return HL;if(a[26])return zL}let l=i(t),o=l&&l(t);return{c(){e=P("span"),n=Y(s),r=Y(` »
|
|
445
445
|
`),o&&o.c()},m(a,u){w(a,e,u),N(e,n),N(e,r),o&&o.m(e,null)},p(a,u){u&128&&s!==(s=(a[24].label||a[24].name)+"")&&G(n,s),l===(l=i(a))&&o?o.p(a,u):(o&&o.d(1),o=l&&l(a),o&&(o.c(),o.m(e,null)))},d(a){a&&k(e),o&&o.d()}}}function n_(t,e){let s,n,r,i;function l(){return e[17](e[22],e[23],e[20])}return n=new Ie({props:{class:"link",$$slots:{default:[VL]},$$scope:{ctx:e}}}),n.$on("click",l),{key:t,first:null,c(){s=P("p"),T(n.$$.fragment),r=R(),M(s,"class","svelte-18iyge6"),this.first=s},m(o,a){w(o,s,a),S(n,s,null),N(s,r),i=!0},p(o,a){e=o;const u={};a&536871040&&(u.$$scope={dirty:a,ctx:e}),n.$set(u)},i(o){i||(p(n.$$.fragment,o),i=!0)},o(o){_(n.$$.fragment,o),i=!1},d(o){o&&k(s),E(n)}}}function YL(t){let e,s,n,r,i=t[14]("kind")+"",l,o,a,u=t[14](`file_type_labels.${t[9]}`,{default:t[9].toUpperCase()})+"",c,f,d,h,m=t[14]("size")+"",g,b,y,v=el(t[13])+"",$,C,O,A=["audio","video"].includes(t[2]),I,D,L,B=t[14]("public_url")+"",z,Q,F,te,q,ue,It,dt=t[14]("file_path")+"",kt,Tt,wt,ee,en,Vn,zt,An,bs=t[14]("used_in")+"",rr,ui,Zt=[],Lr=new Map,tn,Pt=t[1]&&t[8]&&Km(t),ie=t[8]&&Jm(t),Pe=A&&Qm(t);function cn(we,je){return je&16&&(te=null),te==null&&(te=!!(!we[4]||we[4].startsWith("blob:"))),te?UL:FL}let Xe=cn(t,-1),ye=Xe(t);function tt(we,je){return we[10]?BL:jL}let Ve=tt(t),rt=Ve(t),at=t[12]&&xm(t),gt=t[11]&&e_(t),Yn=ae(t[7]);const _l=we=>we[19];for(let we=0;we<Yn.length;we+=1){let je=qm(t,Yn,we),Is=_l(je);Lr.set(Is,Zt[we]=n_(Is,je))}let Rt=null;return Yn.length||(Rt=t_(t)),{c(){e=P("div"),Pt&&Pt.c(),s=R(),n=P("section"),r=P("h4"),l=Y(i),o=R(),a=P("p"),c=Y(u),f=R(),d=P("section"),h=P("h4"),g=Y(m),b=R(),y=P("p"),$=Y(v),C=R(),ie&&ie.c(),O=R(),Pe&&Pe.c(),I=R(),D=P("section"),L=P("h4"),z=Y(B),Q=R(),F=P("p"),ye.c(),q=R(),ue=P("section"),It=P("h4"),kt=Y(dt),Tt=R(),wt=P("p"),rt.c(),ee=R(),at&&at.c(),en=R(),gt&>.c(),Vn=R(),zt=P("section"),An=P("h4"),rr=Y(bs),ui=R();for(let we=0;we<Zt.length;we+=1)Zt[we].c();Rt&&Rt.c(),M(r,"class","svelte-18iyge6"),M(a,"class","svelte-18iyge6"),M(n,"class","svelte-18iyge6"),M(h,"class","svelte-18iyge6"),M(y,"class","svelte-18iyge6"),M(d,"class","svelte-18iyge6"),M(L,"class","svelte-18iyge6"),M(F,"class","svelte-18iyge6"),M(D,"class","svelte-18iyge6"),M(It,"class","svelte-18iyge6"),M(wt,"class","svelte-18iyge6"),M(ue,"class","svelte-18iyge6"),M(An,"class","svelte-18iyge6"),M(zt,"class","svelte-18iyge6"),M(e,"class","detail svelte-18iyge6")},m(we,je){w(we,e,je),Pt&&Pt.m(e,null),N(e,s),N(e,n),N(n,r),N(r,l),N(n,o),N(n,a),N(a,c),N(e,f),N(e,d),N(d,h),N(h,g),N(d,b),N(d,y),N(y,$),N(e,C),ie&&ie.m(e,null),N(e,O),Pe&&Pe.m(e,null),N(e,I),N(e,D),N(D,L),N(L,z),N(D,Q),N(D,F),ye.m(F,null),N(e,q),N(e,ue),N(ue,It),N(It,kt),N(ue,Tt),N(ue,wt),rt.m(wt,null),N(e,ee),at&&at.m(e,null),N(e,en),gt&>.m(e,null),N(e,Vn),N(e,zt),N(zt,An),N(An,rr),N(zt,ui);for(let Is=0;Is<Zt.length;Is+=1)Zt[Is]&&Zt[Is].m(zt,null);Rt&&Rt.m(zt,null),tn=!0},p(we,[je]){we[1]&&we[8]?Pt?(Pt.p(we,je),je&258&&p(Pt,1)):(Pt=Km(we),Pt.c(),p(Pt,1),Pt.m(e,s)):Pt&&(H(),_(Pt,1,1,()=>{Pt=null}),V()),(!tn||je&16384)&&i!==(i=we[14]("kind")+"")&&G(l,i),(!tn||je&16896)&&u!==(u=we[14](`file_type_labels.${we[9]}`,{default:we[9].toUpperCase()})+"")&&G(c,u),(!tn||je&16384)&&m!==(m=we[14]("size")+"")&&G(g,m),(!tn||je&8192)&&v!==(v=el(we[13])+"")&&G($,v),we[8]?ie?ie.p(we,je):(ie=Jm(we),ie.c(),ie.m(e,O)):ie&&(ie.d(1),ie=null),je&4&&(A=["audio","video"].includes(we[2])),A?Pe?Pe.p(we,je):(Pe=Qm(we),Pe.c(),Pe.m(e,I)):Pe&&(Pe.d(1),Pe=null),(!tn||je&16384)&&B!==(B=we[14]("public_url")+"")&&G(z,B),Xe===(Xe=cn(we,je))&&ye?ye.p(we,je):(ye.d(1),ye=Xe(we),ye&&(ye.c(),ye.m(F,null))),(!tn||je&16384)&&dt!==(dt=we[14]("file_path")+"")&&G(kt,dt),Ve===(Ve=tt(we))&&rt?rt.p(we,je):(rt.d(1),rt=Ve(we),rt&&(rt.c(),rt.m(wt,null))),we[12]?at?at.p(we,je):(at=xm(we),at.c(),at.m(e,en)):at&&(at.d(1),at=null),we[11]?gt?gt.p(we,je):(gt=e_(we),gt.c(),gt.m(e,Vn)):gt&&(gt.d(1),gt=null),(!tn||je&16384)&&bs!==(bs=we[14]("used_in")+"")&&G(rr,bs),je&16512&&(Yn=ae(we[7]),H(),Zt=pt(Zt,je,_l,1,we,Yn,Lr,zt,ht,n_,null,qm),V(),!Yn.length&&Rt?Rt.p(we,je):Yn.length?Rt&&(Rt.d(1),Rt=null):(Rt=t_(we),Rt.c(),Rt.m(zt,null)))},i(we){if(!tn){p(Pt);for(let je=0;je<Yn.length;je+=1)p(Zt[je]);tn=!0}},o(we){_(Pt);for(let je=0;je<Zt.length;je+=1)_(Zt[je]);tn=!1},d(we){we&&k(e),Pt&&Pt.d(),ie&&ie.d(),Pe&&Pe.d(),ye.d(),rt.d(),at&&at.d(),gt&>.d();for(let je=0;je<Zt.length;je+=1)Zt[je].d();Rt&&Rt.d()}}}function GL(t,e,s){let n,r,i,l,o,a,u,c,f,d;U(t,_e,A=>s(14,f=A)),U(t,Tn,A=>s(15,d=A));let{asset:h=void 0}=e,{showPreview:m=!1}=e,g,b,y,v=[];const $=async()=>{s(4,{displayURL:g,dimensions:b,duration:y,usedEntries:v}=await UT(h),g,s(5,b),s(6,y),s(7,v))},C=(A,{name:I})=>I===A,O=(A,I,D)=>{qt(`/collections/${A}/entries/${I||D}`)};return t.$$set=A=>{"asset"in A&&s(0,h=A.asset),"showPreview"in A&&s(1,m=A.showPreview)},t.$$.update=()=>{t.$$.dirty&1&&s(3,{path:n,size:r,kind:i,commitAuthor:l,commitDate:o,repoFileURL:a}=h,n,(s(13,r),s(0,h)),(s(2,i),s(0,h)),(s(12,l),s(0,h)),(s(11,o),s(0,h)),(s(10,a),s(0,h))),t.$$.dirty&8&&s(9,[,u=""]=n.match(/\.([^.]+)$/)||[],u),t.$$.dirty&4&&s(8,c=["image","video"].includes(i)),t.$$.dirty&1&&$()},[h,m,i,n,g,b,y,v,c,u,a,o,l,r,f,d,C,O]}class jk extends X{constructor(e){super(),Z(this,e,GL,YL,W,{asset:0,showPreview:1},RL)}}function WL(t){ge(t,"svelte-1vo7rzg",".empty.svelte-1vo7rzg{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;height:100%}")}function qL(t){let e,s;const n=t[1].default,r=Ae(n,t,t[0],null);return{c(){e=P("div"),r&&r.c(),M(e,"class","empty svelte-1vo7rzg")},m(i,l){w(i,e,l),r&&r.m(e,null),s=!0},p(i,[l]){r&&r.p&&(!s||l&1)&&Le(r,n,i,i[0],s?Oe(n,i[0],l,null):Ne(i[0]),null)},i(i){s||(p(r,i),s=!0)},o(i){_(r,i),s=!1},d(i){i&&k(e),r&&r.d(i)}}}function KL(t,e,s){let{$$slots:n={},$$scope:r}=e;return t.$$set=i=>{"$$scope"in i&&s(0,r=i.$$scope)},[r,n]}class zn extends X{constructor(e){super(),Z(this,e,KL,qL,W,{},WL)}}function ZL(t){ge(t,"svelte-1sv2f0a",".editor.svelte-1sv2f0a.svelte-1sv2f0a{position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-primary-background-color)}.editor.svelte-1sv2f0a .row.svelte-1sv2f0a{flex:auto;display:flex;overflow:hidden}.editor.svelte-1sv2f0a .row .preview.svelte-1sv2f0a{flex:auto;overflow:hidden;border-right:1px solid var(--sui-primary-border-color)}")}function XL(t){let e,s;return e=new zn({props:{$$slots:{default:[xL]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&6&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function JL(t){let e,s;return e=new bo({props:{src:Nt(t[0]),controls:!0}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&1&&(i.src=Nt(n[0])),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function QL(t){let e,s;return e=new _s({props:{src:Nt(t[0]),alt:t[0].name,checkerboard:!0}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&1&&(i.src=Nt(n[0])),r&1&&(i.alt=n[0].name),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function xL(t){let e,s=t[1]("no_preview_available")+"",n;return{c(){e=P("span"),n=Y(s)},m(r,i){w(r,e,i),N(e,n)},p(r,i){i&2&&s!==(s=r[1]("no_preview_available")+"")&&G(n,s)},d(r){r&&k(e)}}}function eN(t){let e,s,n,r,i,l,o,a,u,c;s=new LL({});const f=[QL,JL,XL],d=[];function h(m,g){return m[0].kind==="image"?0:m[0].kind==="video"?1:2}return l=h(t),o=d[l]=f[l](t),u=new jk({props:{asset:t[0]}}),{c(){e=P("div"),T(s.$$.fragment),n=R(),r=P("div"),i=P("div"),o.c(),a=R(),T(u.$$.fragment),M(i,"class","preview svelte-1sv2f0a"),M(r,"class","row svelte-1sv2f0a"),M(e,"class","editor svelte-1sv2f0a")},m(m,g){w(m,e,g),S(s,e,null),N(e,n),N(e,r),N(r,i),d[l].m(i,null),N(r,a),S(u,r,null),c=!0},p(m,[g]){let b=l;l=h(m),l===b?d[l].p(m,g):(H(),_(d[b],1,1,()=>{d[b]=null}),V(),o=d[l],o?o.p(m,g):(o=d[l]=f[l](m),o.c()),p(o,1),o.m(i,null));const y={};g&1&&(y.asset=m[0]),u.$set(y)},i(m){c||(p(s.$$.fragment,m),p(o),p(u.$$.fragment,m),c=!0)},o(m){_(s.$$.fragment,m),_(o),_(u.$$.fragment,m),c=!1},d(m){m&&k(e),E(s),d[l].d(),E(u)}}}function tN(t,e,s){let n,r;return U(t,ei,i=>s(0,n=i)),U(t,_e,i=>s(1,r=i)),[n,r]}class nN extends X{constructor(e){super(),Z(this,e,tN,eN,W,{},ZL)}}function sN(t){let e,s;return e=new s0({props:{checked:t[1].includes(t[0])}}),e.$on("change",t[2]),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,[r]){const i={};r&3&&(i.checked=n[1].includes(n[0])),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function rN(t,e,s){let n;U(t,_r,l=>s(1,n=l));let{asset:r=void 0}=e;const i=({detail:{checked:l}})=>{_r.update(o=>{const a=o.indexOf(r);return l&&a===-1&&o.push(r),!l&&a>-1&&o.splice(a,1),o})};return t.$$set=l=>{"asset"in l&&s(0,r=l.asset)},[r,n,i]}class iN extends X{constructor(e){super(),Z(this,e,rN,sN,W,{asset:0})}}function lN(t){let e,s;return e=new iN({props:{asset:t[0]}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&1&&(i.asset=n[0]),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function s_(t){let e,s;return e=new _s({props:{src:Nt(t[0]),checkerboard:!0}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&1&&(i.src=Nt(n[0])),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function r_(t){let e,s;return e=new bo({props:{src:Nt(t[0])}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&1&&(i.src=Nt(n[0])),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function oN(t){let e,s,n,r=t[1]==="image"&&s_(t),i=t[1]==="video"&&r_(t);return{c(){r&&r.c(),e=R(),i&&i.c(),s=J()},m(l,o){r&&r.m(l,o),w(l,e,o),i&&i.m(l,o),w(l,s,o),n=!0},p(l,o){l[1]==="image"?r?(r.p(l,o),o&2&&p(r,1)):(r=s_(l),r.c(),p(r,1),r.m(e.parentNode,e)):r&&(H(),_(r,1,1,()=>{r=null}),V()),l[1]==="video"?i?(i.p(l,o),o&2&&p(i,1)):(i=r_(l),i.c(),p(i,1),i.m(s.parentNode,s)):i&&(H(),_(i,1,1,()=>{i=null}),V())},i(l){n||(p(r),p(i),n=!0)},o(l){_(r),_(i),n=!1},d(l){l&&(k(e),k(s)),r&&r.d(l),i&&i.d(l)}}}function aN(t){let e,s;return{c(){e=P("span"),s=Y(t[2])},m(n,r){w(n,e,r),N(e,s)},p(n,r){r&4&&G(s,n[2])},d(n){n&&k(e)}}}function uN(t){let e,s,n,r,i,l;return e=new In({props:{class:"checkbox",$$slots:{default:[lN]},$$scope:{ctx:t}}}),n=new In({props:{class:"image",$$slots:{default:[oN]},$$scope:{ctx:t}}}),i=new In({props:{class:"title",$$slots:{default:[aN]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment),s=R(),T(n.$$.fragment),r=R(),T(i.$$.fragment)},m(o,a){S(e,o,a),w(o,s,a),S(n,o,a),w(o,r,a),S(i,o,a),l=!0},p(o,a){const u={};a&129&&(u.$$scope={dirty:a,ctx:o}),e.$set(u);const c={};a&131&&(c.$$scope={dirty:a,ctx:o}),n.$set(c);const f={};a&132&&(f.$$scope={dirty:a,ctx:o}),i.$set(f)},i(o){l||(p(e.$$.fragment,o),p(n.$$.fragment,o),p(i.$$.fragment,o),l=!0)},o(o){_(e.$$.fragment,o),_(n.$$.fragment,o),_(i.$$.fragment,o),l=!1},d(o){o&&(k(s),k(r)),E(e,o),E(n,o),E(i,o)}}}function cN(t){let e,s;return e=new co({props:{"aria-selected":t[3].includes(t[0]),$$slots:{default:[uN]},$$scope:{ctx:t}}}),e.$on("click",t[6]),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,[r]){const i={};r&9&&(i["aria-selected"]=n[3].includes(n[0])),r&135&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function fN(t,e,s){let n,r,i,l,o;U(t,_r,c=>s(3,i=c)),U(t,ei,c=>s(4,l=c)),U(t,Dn,c=>s(5,o=c));let{asset:a=void 0}=e;const u=()=>{De(ei,l=a,l),o!=null&&o.showInfo||Dn.update(c=>({...c,showInfo:!(o!=null&&o.showInfo)}))};return t.$$set=c=>{"asset"in c&&s(0,a=c.asset)},t.$$.update=()=>{t.$$.dirty&1&&s(2,{name:n,kind:r}=a,n,(s(1,r),s(0,a)))},[a,r,n,i,l,o,u]}class dN extends X{constructor(e){super(),Z(this,e,fN,cN,W,{asset:0})}}function hN(t){let e,s,n;return{c(){e=P("input"),M(e,"type","file"),e.hidden=!0,M(e,"accept",t[0]),e.multiple=t[1]},m(r,i){w(r,e,i),t[5](e),s||(n=Ce(e,"change",t[4]),s=!0)},p(r,[i]){i&1&&M(e,"accept",r[0]),i&2&&(e.multiple=r[1])},i:K,o:K,d(r){r&&k(e),t[5](null),s=!1,n()}}}function pN(t,e,s){let n,{accept:r=void 0}=e,{multiple:i=!1}=e;const l=()=>{n==null||n.click()};function o(u){Re.call(this,t,u)}function a(u){de[u?"unshift":"push"](()=>{n=u,s(2,n)})}return t.$$set=u=>{"accept"in u&&s(0,r=u.accept),"multiple"in u&&s(1,i=u.multiple)},[r,i,n,l,o,a]}class eh extends X{constructor(e){super(),Z(this,e,pN,hN,W,{accept:0,multiple:1,open:3})}get open(){return this.$$.ctx[3]}}function mN(t){ge(t,"svelte-v02e1d",".files.svelte-v02e1d.svelte-v02e1d{display:flex;flex-direction:column;gap:16px;padding:16px 0 0}.file.svelte-v02e1d.svelte-v02e1d{display:flex;align-items:center;gap:16px}.file.svelte-v02e1d img,.file.svelte-v02e1d .image.svelte-v02e1d{width:48px;height:48px;aspect-ratio:1/1;object-fit:cover;border-radius:var(--sui-control-medium-border-radius)}.file.svelte-v02e1d .image.svelte-v02e1d{display:flex;justify-content:center;align-items:center;background-color:var(--sui-tertiary-background-color)}.file.svelte-v02e1d .meta.svelte-v02e1d{flex:auto;display:flex;flex-direction:column;gap:4px}.file.svelte-v02e1d .meta .size.svelte-v02e1d{font-size:var(--sui-font-size-small);color:var(--sui-secondary-foreground-color)}")}function i_(t,e,s){const n=t.slice();n[3]=e[s],n[9]=s;const r=n[3];n[4]=r.name,n[5]=r.type,n[6]=r.size;const i=n[4].match(/\.([^.]+)$/)||[];return n[7]=i[1]!==void 0?i[1]:"",n}function _N(t){let e,s,n;return s=new ke({props:{name:"draft"}}),{c(){e=P("span"),T(s.$$.fragment),M(e,"class","image svelte-v02e1d")},m(r,i){w(r,e,i),S(s,e,null),n=!0},p:K,i(r){n||(p(s.$$.fragment,r),n=!0)},o(r){_(s.$$.fragment,r),n=!1},d(r){r&&k(e),E(s)}}}function gN(t){let e,s;return e=new _s({props:{src:URL.createObjectURL(t[3])}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&1&&(i.src=URL.createObjectURL(n[3])),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function bN(t){let e,s;return e=new ke({props:{name:"close",label:t[1]("remove")}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&2&&(i.label=n[1]("remove")),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function l_(t){let e,s,n,r,i,l,o,a=t[4]+"",u,c,f,d=el(t[6])+"",h,m,g=t[1](`file_type_labels.${t[7]}`,{default:t[7].toUpperCase()})+"",b,y,v,$,C;const O=[gN,_N],A=[];function I(L,B){return B&1&&(s=null),s==null&&(s=!!L[5].startsWith("image/")),s?0:1}n=I(t,-1),r=A[n]=O[n](t);function D(...L){return t[2](t[9],...L)}return v=new Ie({props:{class:"ghost iconic",$$slots:{default:[bN]},$$scope:{ctx:t}}}),v.$on("click",D),{c(){e=P("div"),r.c(),i=R(),l=P("div"),o=P("div"),u=Y(a),c=R(),f=P("div"),h=Y(d),m=Y(`
|
|
446
446
|
·
|
|
447
|
-
`),b=Y(g),y=R(),T(v.$$.fragment),$=R(),M(o,"class","name"),M(f,"class","size svelte-v02e1d"),M(l,"class","meta svelte-v02e1d"),M(e,"class","file svelte-v02e1d")},m(L,B){w(L,e,B),A[n].m(e,null),N(e,i),N(e,l),N(l,o),N(o,u),N(l,c),N(l,f),N(f,h),N(f,m),N(f,b),N(e,y),S(v,e,null),N(e,$),C=!0},p(L,B){t=L;let z=n;n=I(t,B),n===z?A[n].p(t,B):(H(),_(A[z],1,1,()=>{A[z]=null}),V(),r=A[n],r?r.p(t,B):(r=A[n]=O[n](t),r.c()),p(r,1),r.m(e,i)),(!C||B&1)&&a!==(a=t[4]+"")&&G(u,a),(!C||B&1)&&d!==(d=el(t[6])+"")&&G(h,d),(!C||B&3)&&g!==(g=t[1](`file_type_labels.${t[7]}`,{default:t[7].toUpperCase()})+"")&&G(b,g);const Q={};B&1026&&(Q.$$scope={dirty:B,ctx:t}),v.$set(Q)},i(L){C||(p(r),p(v.$$.fragment,L),C=!0)},o(L){_(r),_(v.$$.fragment,L),C=!1},d(L){L&&k(e),A[n].d(),E(v)}}}function yN(t){let e,s,n=ae(t[0]),r=[];for(let l=0;l<n.length;l+=1)r[l]=l_(i_(t,n,l));const i=l=>_(r[l],1,1,()=>{r[l]=null});return{c(){e=P("div");for(let l=0;l<r.length;l+=1)r[l].c();M(e,"class","files svelte-v02e1d")},m(l,o){w(l,e,o);for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(e,null);s=!0},p(l,[o]){if(o&3){n=ae(l[0]);let a;for(a=0;a<n.length;a+=1){const u=i_(l,n,a);r[a]?(r[a].p(u,o),p(r[a],1)):(r[a]=l_(u),r[a].c(),p(r[a],1),r[a].m(e,null))}for(H(),a=n.length;a<r.length;a+=1)i(a);V()}},i(l){if(!s){for(let o=0;o<n.length;o+=1)p(r[o]);s=!0}},o(l){r=r.filter(Boolean);for(let o=0;o<r.length;o+=1)_(r[o]);s=!1},d(l){l&&k(e),fs(r,l)}}}function kN(t,e,s){let n;U(t,_e,l=>s(1,n=l));let{files:r=[]}=e;const i=(l,o)=>{o.stopPropagation(),r.splice(l,1),s(0,r)};return t.$$set=l=>{"files"in l&&s(0,r=l.files)},[r,n,i]}class th extends X{constructor(e){super(),Z(this,e,kN,yN,W,{files:0},mN)}}function wN(t){ge(t,"svelte-f569ze",".drop-target.svelte-f569ze.svelte-f569ze{display:flex;flex-direction:column;height:100%;position:relative;overflow:auto;pointer-events:auto}.drop-target.svelte-f569ze .svelte-f569ze{pointer-events:none}.drop-indicator.svelte-f569ze.svelte-f569ze{position:absolute;inset:0;z-index:10;background-color:hsl(var(--sui-background-color-4-hsl)/80%);backdrop-filter:blur(8px);pointer-events:none}.drop-indicator.svelte-f569ze div.svelte-f569ze{position:absolute;inset:32px;display:flex;justify-content:center;align-items:center;font-size:var(--sui-font-size-xxx-large);border-width:8px;border-style:dashed;border-color:var(--sui-primary-accent-color-foreground);border-radius:8px}.content.svelte-f569ze.svelte-f569ze{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;overflow:auto;height:100%;min-height:320px}")}function vN(t){let e,s,n,r=t[2]&&o_(t),i=t[3]&&t[5].length&&a_(t);return{c(){e=P("div"),r&&r.c(),s=R(),i&&i.c(),M(e,"class","content svelte-f569ze")},m(l,o){w(l,e,o),r&&r.m(e,null),N(e,s),i&&i.m(e,null),n=!0},p(l,o){l[2]?r?(r.p(l,o),o&4&&p(r,1)):(r=o_(l),r.c(),p(r,1),r.m(e,s)):r&&(H(),_(r,1,1,()=>{r=null}),V()),l[3]&&l[5].length?i?(i.p(l,o),o&40&&p(i,1)):(i=a_(l),i.c(),p(i,1),i.m(e,null)):i&&(H(),_(i,1,1,()=>{i=null}),V())},i(l){n||(p(r),p(i),n=!0)},o(l){_(r),_(i),n=!1},d(l){l&&k(e),r&&r.d(),i&&i.d()}}}function $N(t){let e;const s=t[11].default,n=Ae(s,t,t[21],null);return{c(){n&&n.c()},m(r,i){n&&n.m(r,i),e=!0},p(r,i){n&&n.p&&(!e||i&2097152)&&Le(n,s,r,r[21],e?Oe(s,r[21],i,null):Ne(r[21]),null)},i(r){e||(p(n,r),e=!0)},o(r){_(n,r),e=!1},d(r){n&&n.d(r)}}}function SN(t){let e,s,n,r;function i(o){t[12](o)}let l={};return t[5]!==void 0&&(l.files=t[5]),s=new th({props:l}),de.push(()=>We(s,"files",i)),{c(){e=P("div"),T(s.$$.fragment),M(e,"class","content svelte-f569ze")},m(o,a){w(o,e,a),S(s,e,null),r=!0},p(o,a){const u={};!n&&a&32&&(n=!0,u.files=o[5],Ke(()=>n=!1)),s.$set(u)},i(o){r||(p(s.$$.fragment,o),r=!0)},o(o){_(s.$$.fragment,o),r=!1},d(o){o&&k(e),E(s)}}}function o_(t){let e,s=t[8]("drop_files_or_browse")+"",n,r,i,l,o;return l=new Ie({props:{class:"primary",label:t[8]("upload"),$$slots:{"start-icon":[EN]},$$scope:{ctx:t}}}),l.$on("click",t[13]),{c(){e=P("div"),n=Y(s),r=R(),i=P("div"),T(l.$$.fragment),M(e,"class","svelte-f569ze"),M(i,"class","svelte-f569ze")},m(a,u){w(a,e,u),N(e,n),w(a,r,u),w(a,i,u),S(l,i,null),o=!0},p(a,u){(!o||u&256)&&s!==(s=a[8]("drop_files_or_browse")+"")&&G(n,s);const c={};u&256&&(c.label=a[8]("upload")),u&2097152&&(c.$$scope={dirty:u,ctx:a}),l.$set(c)},i(a){o||(p(l.$$.fragment,a),o=!0)},o(a){_(l.$$.fragment,a),o=!1},d(a){a&&(k(e),k(r),k(i)),E(l)}}}function EN(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"cloud_upload"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function a_(t){let e,s,n;function r(l){t[14](l)}let i={};return t[5]!==void 0&&(i.files=t[5]),e=new th({props:i}),de.push(()=>We(e,"files",r)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,o){const a={};!s&&o&32&&(s=!0,a.files=l[5],Ke(()=>s=!1)),e.$set(a)},i(l){n||(p(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function u_(t){let e,s,n=t[8]("drop_files_here")+"",r;return{c(){e=P("div"),s=P("div"),r=Y(n),M(s,"class","svelte-f569ze"),M(e,"class","drop-indicator svelte-f569ze")},m(i,l){w(i,e,l),N(e,s),N(s,r)},p(i,l){l&256&&n!==(n=i[8]("drop_files_here")+"")&&G(r,n)},d(i){i&&k(e)}}}function TN(t){let e,s,n,r,i,l,o,a,u;const c=[SN,$N,vN],f=[];function d(g,b){return!g[2]&&g[3]&&g[5].length?0:g[10].default?1:2}s=d(t),n=f[s]=c[s](t);let h=t[6]&&u_(t),m={accept:t[0],multiple:t[1]};return l=new eh({props:m}),t[19](l),l.$on("change",t[20]),{c(){e=P("div"),n.c(),r=R(),h&&h.c(),i=R(),T(l.$$.fragment),M(e,"class","drop-target svelte-f569ze"),M(e,"role","none")},m(g,b){w(g,e,b),f[s].m(e,null),N(e,r),h&&h.m(e,null),w(g,i,b),S(l,g,b),o=!0,a||(u=[Ce(e,"dragover",Hs(t[15])),Ce(e,"dragleave",Hs(t[16])),Ce(e,"dragend",Hs(t[17])),Ce(e,"drop",Hs(t[18]))],a=!0)},p(g,[b]){let y=s;s=d(g),s===y?f[s].p(g,b):(H(),_(f[y],1,1,()=>{f[y]=null}),V(),n=f[s],n?n.p(g,b):(n=f[s]=c[s](g),n.c()),p(n,1),n.m(e,r)),g[6]?h?h.p(g,b):(h=u_(g),h.c(),h.m(e,null)):h&&(h.d(1),h=null);const v={};b&1&&(v.accept=g[0]),b&2&&(v.multiple=g[1]),l.$set(v)},i(g){o||(p(n),p(l.$$.fragment,g),o=!0)},o(g){_(n),_(l.$$.fragment,g),o=!1},d(g){g&&(k(e),k(i)),f[s].d(),h&&h.d(),t[19](null),E(l,g),a=!1,on(u)}}}function AN(t,e,s){let n;U(t,_e,B=>s(8,n=B));let{$$slots:r={},$$scope:i}=e;const l=ro(r);let{accept:o=void 0}=e,{multiple:a=!1}=e,{showUploadButton:u=!1}=e,{showFilePreview:c=!1}=e;const f=xs();let d=!1,h,m=[];const g=()=>{h.open()},b=B=>{s(5,m=a?B:B.slice(0,1))};function y(B){m=B,s(5,m)}const v=()=>{g()};function $(B){m=B,s(5,m)}const C=({dataTransfer:B})=>{B.dropEffect="copy",s(6,d=!0)},O=()=>{s(6,d=!1)},A=()=>{s(6,d=!1)},I=async({dataTransfer:B})=>{s(6,d=!1),b(await NT(B,{accept:o}))};function D(B){de[B?"unshift":"push"](()=>{h=B,s(7,h)})}const L=({target:B})=>{b([...B.files])};return t.$$set=B=>{"accept"in B&&s(0,o=B.accept),"multiple"in B&&s(1,a=B.multiple),"showUploadButton"in B&&s(2,u=B.showUploadButton),"showFilePreview"in B&&s(3,c=B.showFilePreview),"$$scope"in B&&s(21,i=B.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&f("select",{files:m})},[o,a,u,c,g,m,d,h,n,b,l,r,y,v,$,C,O,A,I,D,L,i]}class Pu extends X{constructor(e){super(),Z(this,e,AN,TN,W,{accept:0,multiple:1,showUploadButton:2,showFilePreview:3,openFilePicker:4},wN)}get openFilePicker(){return this.$$.ctx[4]}}function ON(t){ge(t,"svelte-uo4tby",'.basic-grid-view.svelte-uo4tby{display:contents}.basic-grid-view.svelte-uo4tby .table-body{display:grid;grid-template-columns:repeat(auto-fill, minmax(var(--grid-size, 200px), 1fr));gap:16px;border-width:0}.basic-grid-view.svelte-uo4tby [role="row"]{position:relative;overflow:hidden;border-width:1px;border-style:solid;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);padding:0;height:auto;aspect-ratio:1/1;text-align:left;cursor:pointer}.basic-grid-view.svelte-uo4tby [role="row"] .table-cell{display:block;position:absolute}.basic-grid-view.svelte-uo4tby [role="row"] .checkbox{inset:16px auto auto 16px;z-index:2}.basic-grid-view.svelte-uo4tby [role="row"] .title{inset:auto 0 0 0;z-index:1;padding:16px 16px 16px 16px;background-color:hsl(var(--sui-background-color-4-hsl)/80%)}.basic-grid-view.svelte-uo4tby [role="row"] .title span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;height:40px;line-height:1.5}.basic-grid-view.svelte-uo4tby [role="row"] .image{inset:0;z-index:1}.basic-grid-view.svelte-uo4tby [role="row"][aria-selected="true"]{border-color:var(--sui-primary-accent-color)}')}function LN(t){let e;const s=t[0].default,n=Ae(s,t,t[1],null);return{c(){n&&n.c()},m(r,i){n&&n.m(r,i),e=!0},p(r,i){n&&n.p&&(!e||i&2)&&Le(n,s,r,r[1],e?Oe(s,r[1],i,null):Ne(r[1]),null)},i(r){e||(p(n,r),e=!0)},o(r){_(n,r),e=!1},d(r){n&&n.d(r)}}}function NN(t){let e,s;return e=new o0({props:{$$slots:{default:[LN]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&2&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function PN(t){let e,s,n;return s=new a0({props:{"aria-multiselectable":"true",$$slots:{default:[NN]},$$scope:{ctx:t}}}),{c(){e=P("div"),T(s.$$.fragment),M(e,"class","basic-grid-view svelte-uo4tby")},m(r,i){w(r,e,i),S(s,e,null),n=!0},p(r,[i]){const l={};i&2&&(l.$$scope={dirty:i,ctx:r}),s.$set(l)},i(r){n||(p(s.$$.fragment,r),n=!0)},o(r){_(s.$$.fragment,r),n=!1},d(r){r&&k(e),E(s)}}}function IN(t,e,s){let{$$slots:n={},$$scope:r}=e;return t.$$set=i=>{"$$scope"in i&&s(1,r=i.$$scope)},[n,r]}class Ha extends X{constructor(e){super(),Z(this,e,IN,PN,W,{},ON)}}function CN(t){ge(t,"svelte-1as64c",'.basic-list-view.svelte-1as64c{display:contents}.basic-list-view.svelte-1as64c [role="grid"] [role="row"]{width:100%;height:48px;cursor:pointer}.basic-list-view.svelte-1as64c [role="grid"] [role="row"]:hover{background-color:var(--sui-highlight-background-color)}.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"]{vertical-align:middle;overflow:hidden;text-overflow:ellipsis;height:40px;padding:0 8px;max-width:100%;color:var(--sui-secondary-foreground-color);white-space:nowrap}.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"] .label{overflow:hidden;text-overflow:ellipsis}.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"]:first-child{padding-left:16px}.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"]:last-child{padding-right:16px}.basic-list-view.svelte-1as64c [role="grid"] [role="row"] [role="gridcell"]{border-width:1px 0 0;border-color:var(--sui-control-border-color)}.basic-list-view.svelte-1as64c [role="grid"] [role="row"]:last-child [role="gridcell"]{border-width:1px 0}.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"].checkbox{width:16px}.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"].title{width:100%;color:var(--sui-primary-foreground-color)}.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"].image{width:32px}.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"].image img{background-color:var(--sui-primary-accent-color-foreground)}.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"].image img,.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"].image video{width:32px;height:32px;border-radius:var(--sui-control-medium-border-radius)}')}function DN(t){let e;const s=t[0].default,n=Ae(s,t,t[1],null);return{c(){n&&n.c()},m(r,i){n&&n.m(r,i),e=!0},p(r,i){n&&n.p&&(!e||i&2)&&Le(n,s,r,r[1],e?Oe(s,r[1],i,null):Ne(r[1]),null)},i(r){e||(p(n,r),e=!0)},o(r){_(n,r),e=!1},d(r){n&&n.d(r)}}}function MN(t){let e,s;return e=new o0({props:{$$slots:{default:[DN]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&2&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function RN(t){let e,s,n;return s=new a0({props:{$$slots:{default:[MN]},$$scope:{ctx:t}}}),{c(){e=P("div"),T(s.$$.fragment),M(e,"class","basic-list-view svelte-1as64c")},m(r,i){w(r,e,i),S(s,e,null),n=!0},p(r,[i]){const l={};i&2&&(l.$$scope={dirty:i,ctx:r}),s.$set(l)},i(r){n||(p(s.$$.fragment,r),n=!0)},o(r){_(s.$$.fragment,r),n=!1},d(r){r&&k(e),E(s)}}}function FN(t,e,s){let{$$slots:n={},$$scope:r}=e;return t.$$set=i=>{"$$scope"in i&&s(1,r=i.$$scope)},[n,r]}class ti extends X{constructor(e){super(),Z(this,e,FN,RN,W,{},CN)}}function c_(t,e,s){const n=t.slice();return n[7]=e[s][0],n[8]=e[s][1],n}function f_(t,e,s){const n=t.slice();return n[11]=e[s],n}function UN(t){let e,s;return e=new zn({props:{$$slots:{default:[BN]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&16416&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function jN(t){let e,s;return e=new Pu({props:{multiple:!0,$$slots:{default:[VN]},$$scope:{ctx:t}}}),e.$on("select",t[6]),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&16401&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function BN(t){let e,s=t[5]("no_files_found")+"",n;return{c(){e=P("span"),n=Y(s)},m(r,i){w(r,e,i),N(e,n)},p(r,i){i&32&&s!==(s=r[5]("no_files_found")+"")&&G(n,s)},d(r){r&&k(e)}}}function d_(t){let e,s=t[7]+"",n;return{c(){e=P("h3"),n=Y(s)},m(r,i){w(r,e,i),N(e,n)},p(r,i){i&1&&s!==(s=r[7]+"")&&G(n,s)},d(r){r&&k(e)}}}function h_(t,e){let s,n,r;return n=new dN({props:{asset:e[11]}}),{key:t,first:null,c(){s=J(),T(n.$$.fragment),this.first=s},m(i,l){w(i,s,l),S(n,i,l),r=!0},p(i,l){e=i;const o={};l&1&&(o.asset=e[11]),n.$set(o)},i(i){r||(p(n.$$.fragment,i),r=!0)},o(i){_(n.$$.fragment,i),r=!1},d(i){i&&k(s),E(n,i)}}}function zN(t){let e=[],s=new Map,n,r,i=ae(t[8]);const l=o=>o[11].path;for(let o=0;o<i.length;o+=1){let a=f_(t,i,o),u=l(a);s.set(u,e[o]=h_(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=J()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);w(o,n,a),r=!0},p(o,a){a&1&&(i=ae(o[8]),H(),e=pt(e,a,l,1,o,i,s,n.parentNode,ht,h_,n,f_),V())},i(o){if(!r){for(let a=0;a<i.length;a+=1)p(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)_(e[a]);r=!1},d(o){o&&k(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function HN(t){let e,s,n,r,i=t[7]!=="*"&&d_(t);var l=t[4].type==="list"?ti:Ha;function o(a,u){return{props:{$$slots:{default:[zN]},$$scope:{ctx:a}}}}return l&&(s=Kt(l,o(t))),{c(){i&&i.c(),e=R(),s&&T(s.$$.fragment),n=R()},m(a,u){i&&i.m(a,u),w(a,e,u),s&&S(s,a,u),w(a,n,u),r=!0},p(a,u){if(a[7]!=="*"?i?i.p(a,u):(i=d_(a),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null),u&16&&l!==(l=a[4].type==="list"?ti:Ha)){if(s){H();const c=s;_(c.$$.fragment,1,0,()=>{E(c,1)}),V()}l?(s=Kt(l,o(a)),T(s.$$.fragment),p(s.$$.fragment,1),S(s,n.parentNode,n)):s=null}else if(l){const c={};u&16385&&(c.$$scope={dirty:u,ctx:a}),s.$set(c)}},i(a){r||(s&&p(s.$$.fragment,a),r=!0)},o(a){s&&_(s.$$.fragment,a),r=!1},d(a){a&&(k(e),k(n)),i&&i.d(a),s&&E(s,a)}}}function p_(t,e){let s,n,r;return n=new gn({props:{$$slots:{default:[HN]},$$scope:{ctx:e}}}),{key:t,first:null,c(){s=J(),T(n.$$.fragment),this.first=s},m(i,l){w(i,s,l),S(n,i,l),r=!0},p(i,l){e=i;const o={};l&16401&&(o.$$scope={dirty:l,ctx:e}),n.$set(o)},i(i){r||(p(n.$$.fragment,i),r=!0)},o(i){_(n.$$.fragment,i),r=!1},d(i){i&&k(s),E(n,i)}}}function VN(t){let e=[],s=new Map,n,r,i=ae(Object.entries(t[0]));const l=o=>o[7];for(let o=0;o<i.length;o+=1){let a=c_(t,i,o),u=l(a);s.set(u,e[o]=p_(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=J()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);w(o,n,a),r=!0},p(o,a){a&17&&(i=ae(Object.entries(o[0])),H(),e=pt(e,a,l,1,o,i,s,n.parentNode,ht,p_,n,c_),V())},i(o){if(!r){for(let a=0;a<i.length;a+=1)p(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)_(e[a]);r=!1},d(o){o&&k(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function YN(t){let e,s,n,r,i;const l=[jN,UN],o=[];function a(u,c){return c&1&&(s=null),s==null&&(s=!!Object.values(u[0]).flat(1).length),s?0:1}return n=a(t,-1),r=o[n]=l[n](t),{c(){e=P("div"),r.c(),M(e,"class","list-container")},m(u,c){w(u,e,c),o[n].m(e,null),i=!0},p(u,[c]){let f=n;n=a(u,c),n===f?o[n].p(u,c):(H(),_(o[f],1,1,()=>{o[f]=null}),V(),r=o[n],r?r.p(u,c):(r=o[n]=l[n](u),r.c()),p(r,1),r.m(e,null))},i(u){i||(p(r),i=!0)},o(u){_(r),i=!1},d(u){u&&k(e),o[n].d()}}}function GN(t,e,s){let n,r,i,l,o,a;return U(t,Rk,c=>s(0,n=c)),U(t,Nn,c=>s(1,r=c)),U(t,rs,c=>s(2,i=c)),U(t,ct,c=>s(3,l=c)),U(t,Dn,c=>s(4,o=c)),U(t,_e,c=>s(5,a=c)),[n,r,i,l,o,a,({detail:{files:c}})=>{De(Nn,r={folder:i||l.media_folder,files:c},r)}]}class WN extends X{constructor(e){super(),Z(this,e,GN,YN,W,{})}}function m_(t,e,s){const n=t.slice();n[6]=e[s].collectionName,n[7]=e[s].internalPath;const r=n[7]===n[2];return n[8]=r,n}function qN(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"folder"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function __(t,e){let s,n,r;function i(){return e[4](e[7])}function l(...o){return e[5](e[7],e[8],...o)}return n=new ds({props:{selected:e[8],label:Ul(e[6]),$$slots:{"start-icon":[qN]},$$scope:{ctx:e}}}),n.$on("click",i),n.$on("dragover",l),n.$on("dragleave",JN),n.$on("dragend",QN),n.$on("drop",xN),{key:t,first:null,c(){s=J(),T(n.$$.fragment),this.first=s},m(o,a){w(o,s,a),S(n,o,a),r=!0},p(o,a){e=o;const u={};a&5&&(u.selected=e[8]),a&1&&(u.label=Ul(e[6])),a&2048&&(u.$$scope={dirty:a,ctx:e}),n.$set(u)},i(o){r||(p(n.$$.fragment,o),r=!0)},o(o){_(n.$$.fragment,o),r=!1},d(o){o&&k(s),E(n,o)}}}function KN(t){let e=[],s=new Map,n,r,i=ae(t[0]);const l=o=>o[6];for(let o=0;o<i.length;o+=1){let a=m_(t,i,o),u=l(a);s.set(u,e[o]=__(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=J()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);w(o,n,a),r=!0},p(o,a){a&5&&(i=ae(o[0]),H(),e=pt(e,a,l,1,o,i,s,n.parentNode,ht,__,n,m_),V())},i(o){if(!r){for(let a=0;a<i.length;a+=1)p(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)_(e[a]);r=!1},d(o){o&&k(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function ZN(t){let e,s,n=t[1]("collections")+"",r,i,l,o;return l=new uo({props:{$$slots:{default:[KN]},$$scope:{ctx:t}}}),{c(){e=P("section"),s=P("h2"),r=Y(n),i=R(),T(l.$$.fragment)},m(a,u){w(a,e,u),N(e,s),N(s,r),N(e,i),S(l,e,null),o=!0},p(a,u){(!o||u&2)&&n!==(n=a[1]("collections")+"")&&G(r,n);const c={};u&2053&&(c.$$scope={dirty:u,ctx:a}),l.$set(c)},i(a){o||(p(l.$$.fragment,a),o=!0)},o(a){_(l.$$.fragment,a),o=!1},d(a){a&&k(e),E(l)}}}function XN(t){let e,s;return e=new gn({props:{class:"primary-sidebar",$$slots:{default:[ZN]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,[r]){const i={};r&2055&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}const JN=t=>{t.preventDefault(),t.target.classList.remove("dragover")},QN=t=>{t.preventDefault(),t.target.classList.remove("dragover")},xN=t=>{t.preventDefault(),t.target.classList.remove("dragover")};function e6(t,e,s){let n,r,i,l;U(t,os,u=>s(3,r=u)),U(t,_e,u=>s(1,i=u)),U(t,rs,u=>s(2,l=u));const o=u=>{qt(u?`/assets/${u}`:"/assets")},a=(u,c,f)=>{f.preventDefault(),!u||c?f.dataTransfer.dropEffect="none":(f.dataTransfer.dropEffect="move",f.target.classList.add("dragover"))};return t.$$.update=()=>{t.$$.dirty&8&&s(0,n=[{collectionName:"*",internalPath:void 0},...r])},[n,i,l,r,o,a]}let t6=class extends X{constructor(e){super(),Z(this,e,e6,XN,W,{})}};function g_(t){let e,s,n;return{c(){e=P("span"),s=Y("/"),n=Y(t[2])},m(r,i){w(r,e,i),N(e,s),N(e,n)},p(r,i){i&4&&G(n,r[2])},d(r){r&&k(e)}}}function n6(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"delete"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function s6(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"cloud_upload"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function r6(t){let e,s=Ba(t[2])+"",n,r,i,l,o,a,u,c,f,d=t[2]&&g_(t);return l=new _n({props:{flex:!0}}),a=new Ie({props:{class:"secondary",disabled:!t[3].length,label:t[4]("delete"),$$slots:{"start-icon":[n6]},$$scope:{ctx:t}}}),a.$on("click",t[7]),c=new Ie({props:{class:"primary",label:t[4]("upload"),$$slots:{"start-icon":[s6]},$$scope:{ctx:t}}}),c.$on("click",t[8]),{c(){e=P("h2"),n=Y(s),r=R(),d&&d.c(),i=R(),T(l.$$.fragment),o=R(),T(a.$$.fragment),u=R(),T(c.$$.fragment)},m(h,m){w(h,e,m),N(e,n),N(e,r),d&&d.m(e,null),w(h,i,m),S(l,h,m),w(h,o,m),S(a,h,m),w(h,u,m),S(c,h,m),f=!0},p(h,m){(!f||m&4)&&s!==(s=Ba(h[2])+"")&&G(n,s),h[2]?d?d.p(h,m):(d=g_(h),d.c(),d.m(e,null)):d&&(d.d(1),d=null);const g={};m&8&&(g.disabled=!h[3].length),m&16&&(g.label=h[4]("delete")),m&4096&&(g.$$scope={dirty:m,ctx:h}),a.$set(g);const b={};m&16&&(b.label=h[4]("upload")),m&4096&&(b.$$scope={dirty:m,ctx:h}),c.$set(b)},i(h){f||(p(l.$$.fragment,h),p(a.$$.fragment,h),p(c.$$.fragment,h),f=!0)},o(h){_(l.$$.fragment,h),_(a.$$.fragment,h),_(c.$$.fragment,h),f=!1},d(h){h&&(k(e),k(i),k(o),k(u)),d&&d.d(),E(l,h),E(a,h),E(c,h)}}}function i6(t){let e,s,n,r,i,l,o;e=new tr({props:{class:"primary",$$slots:{default:[r6]},$$scope:{ctx:t}}});let a={multiple:!0};n=new eh({props:a}),t[9](n),n.$on("change",t[10]);function u(f){t[11](f)}let c={assets:t[3]};return t[1]!==void 0&&(c.open=t[1]),i=new Fk({props:c}),de.push(()=>We(i,"open",u)),{c(){T(e.$$.fragment),s=R(),T(n.$$.fragment),r=R(),T(i.$$.fragment)},m(f,d){S(e,f,d),w(f,s,d),S(n,f,d),w(f,r,d),S(i,f,d),o=!0},p(f,[d]){const h={};d&4127&&(h.$$scope={dirty:d,ctx:f}),e.$set(h);const m={};n.$set(m);const g={};d&8&&(g.assets=f[3]),!l&&d&2&&(l=!0,g.open=f[1],Ke(()=>l=!1)),i.$set(g)},i(f){o||(p(e.$$.fragment,f),p(n.$$.fragment,f),p(i.$$.fragment,f),o=!0)},o(f){_(e.$$.fragment,f),_(n.$$.fragment,f),_(i.$$.fragment,f),o=!1},d(f){f&&(k(s),k(r)),E(e,f),t[9](null),E(n,f),E(i,f)}}}function l6(t,e,s){let n,r,i,l,o;U(t,rs,g=>s(2,n=g)),U(t,_r,g=>s(3,r=g)),U(t,_e,g=>s(4,i=g)),U(t,Nn,g=>s(5,l=g)),U(t,ct,g=>s(6,o=g));let a,u=!1;const c=()=>{s(1,u=!0)},f=()=>{a.open()};function d(g){de[g?"unshift":"push"](()=>{a=g,s(0,a)})}const h=({target:g})=>{De(Nn,l={folder:n||o.media_folder,files:[...g.files]},l)};function m(g){u=g,s(1,u)}return[a,u,n,r,i,l,o,c,f,d,h,m]}let o6=class extends X{constructor(e){super(),Z(this,e,l6,i6,W,{})}};function b_(t){let e,s;return e=new gn({props:{class:"secondary-sidebar",$$slots:{default:[f6]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&15&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function a6(t){let e,s;return e=new zn({props:{$$slots:{default:[c6]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&12&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function u6(t){let e,s;return e=new jk({props:{asset:t[1],showPreview:t[0].type==="list"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&2&&(i.asset=n[1]),r&1&&(i.showPreview=n[0].type==="list"),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function c6(t){let e,s=t[2]("select_asset_show_info")+"",n;return{c(){e=P("span"),n=Y(s)},m(r,i){w(r,e,i),N(e,n)},p(r,i){i&4&&s!==(s=r[2]("select_asset_show_info")+"")&&G(n,s)},d(r){r&&k(e)}}}function f6(t){let e,s,n,r;const i=[u6,a6],l=[];function o(a,u){return a[1]?0:1}return e=o(t),s=l[e]=i[e](t),{c(){s.c(),n=J()},m(a,u){l[e].m(a,u),w(a,n,u),r=!0},p(a,u){let c=e;e=o(a),e===c?l[e].p(a,u):(H(),_(l[c],1,1,()=>{l[c]=null}),V(),s=l[e],s?s.p(a,u):(s=l[e]=i[e](a),s.c()),p(s,1),s.m(n.parentNode,n))},i(a){r||(p(s),r=!0)},o(a){_(s),r=!1},d(a){a&&k(n),l[e].d(a)}}}function d6(t){var r;let e,s,n=((r=t[0])==null?void 0:r.showInfo)&&b_(t);return{c(){n&&n.c(),e=J()},m(i,l){n&&n.m(i,l),w(i,e,l),s=!0},p(i,[l]){var o;(o=i[0])!=null&&o.showInfo?n?(n.p(i,l),l&1&&p(n,1)):(n=b_(i),n.c(),p(n,1),n.m(e.parentNode,e)):n&&(H(),_(n,1,1,()=>{n=null}),V())},i(i){s||(p(n),s=!0)},o(i){_(n),s=!1},d(i){i&&k(e),n&&n.d(i)}}}function h6(t,e,s){let n,r,i;return U(t,Dn,l=>s(0,n=l)),U(t,ei,l=>s(1,r=l)),U(t,_e,l=>s(2,i=l)),[n,r,i]}let p6=class extends X{constructor(e){super(),Z(this,e,h6,d6,W,{})}};function y_(t,e,s){const n=t.slice();return n[9]=e[s].label,n[10]=e[s].field,n[11]=e[s].pattern,n}function m6(t){let e,s;return e=new ke({props:{slot:"end-icon",name:"arrow_drop_down"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function k_(t){var r,i;let e,s;function n(){return t[8](t[10],t[11])}return e=new rl({props:{label:t[9],checked:((r=t[6].filter)==null?void 0:r.field)===t[10]&&((i=t[6].filter)==null?void 0:i.pattern)===t[11]}}),e.$on("click",n),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),s=!0},p(l,o){var u,c;t=l;const a={};o&16&&(a.label=t[9]),o&80&&(a.checked=((u=t[6].filter)==null?void 0:u.field)===t[10]&&((c=t[6].filter)==null?void 0:c.pattern)===t[11]),e.$set(a)},i(l){s||(p(e.$$.fragment,l),s=!0)},o(l){_(e.$$.fragment,l),s=!1},d(l){E(e,l)}}}function _6(t){let e,s,n,r;e=new rl({props:{label:t[3]||t[5]("sort_keys.none"),checked:!t[6].filter}}),e.$on("click",t[7]);let i=ae(t[4]),l=[];for(let a=0;a<i.length;a+=1)l[a]=k_(y_(t,i,a));const o=a=>_(l[a],1,1,()=>{l[a]=null});return{c(){T(e.$$.fragment),s=R();for(let a=0;a<l.length;a+=1)l[a].c();n=J()},m(a,u){S(e,a,u),w(a,s,u);for(let c=0;c<l.length;c+=1)l[c]&&l[c].m(a,u);w(a,n,u),r=!0},p(a,u){const c={};if(u&40&&(c.label=a[3]||a[5]("sort_keys.none")),u&64&&(c.checked=!a[6].filter),e.$set(c),u&84){i=ae(a[4]);let f;for(f=0;f<i.length;f+=1){const d=y_(a,i,f);l[f]?(l[f].p(d,u),p(l[f],1)):(l[f]=k_(d),l[f].c(),p(l[f],1),l[f].m(n.parentNode,n))}for(H(),f=i.length;f<l.length;f+=1)o(f);V()}},i(a){if(!r){p(e.$$.fragment,a);for(let u=0;u<i.length;u+=1)p(l[u]);r=!0}},o(a){_(e.$$.fragment,a),l=l.filter(Boolean);for(let u=0;u<l.length;u+=1)_(l[u]);r=!1},d(a){a&&(k(s),k(n)),E(e,a),fs(l,a)}}}function g6(t){let e,s;return e=new Ls({props:{slot:"popup",$$slots:{default:[_6]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&16508&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function b6(t){let e,s;return e=new er({props:{class:"ghost",label:t[0]||t[5]("filter_by"),disabled:t[1],$$slots:{popup:[g6],"end-icon":[m6]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,[r]){const i={};r&33&&(i.label=n[0]||n[5]("filter_by")),r&2&&(i.disabled=n[1]),r&16508&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function y6(t,e,s){let n,r,i=K,l=()=>(i(),i=Mn(u,m=>s(6,r=m)),u);U(t,_e,m=>s(5,n=m)),t.$$.on_destroy.push(()=>i());let{label:o=""}=e,{disabled:a=!1}=e,{currentView:u=Me({})}=e;l();let{noneLabel:c=""}=e,{filters:f=[]}=e;const d=()=>{u.update(m=>({...m,filter:void 0}))},h=(m,g)=>{u.update(b=>({...b,filter:{field:m,pattern:g}}))};return t.$$set=m=>{"label"in m&&s(0,o=m.label),"disabled"in m&&s(1,a=m.disabled),"currentView"in m&&l(s(2,u=m.currentView)),"noneLabel"in m&&s(3,c=m.noneLabel),"filters"in m&&s(4,f=m.filters)},[o,a,u,c,f,n,r,d,h]}class Bk extends X{constructor(e){super(),Z(this,e,y6,b6,W,{label:0,disabled:1,currentView:2,noneLabel:3,filters:4})}}function w_(t,e,s){const n=t.slice();return n[8]=e[s],n}function v_(t,e,s){const n=t.slice();return n[11]=e[s].key,n[12]=e[s].label,n}function k6(t){let e,s;return e=new ke({props:{slot:"end-icon",name:"arrow_drop_down"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function $_(t,e){var l;let s,n,r;function i(){return e[6](e[11])}return n=new rl({props:{label:e[12],checked:((l=e[5].sort)==null?void 0:l.key)===e[11]}}),n.$on("click",i),{key:t,first:null,c(){s=J(),T(n.$$.fragment),this.first=s},m(o,a){w(o,s,a),S(n,o,a),r=!0},p(o,a){var c;e=o;const u={};a&8&&(u.label=e[12]),a&40&&(u.checked=((c=e[5].sort)==null?void 0:c.key)===e[11]),n.$set(u)},i(o){r||(p(n.$$.fragment,o),r=!0)},o(o){_(n.$$.fragment,o),r=!1},d(o){o&&k(s),E(n,o)}}}function w6(t){let e=[],s=new Map,n,r,i=ae(t[3]);const l=o=>o[11];for(let o=0;o<i.length;o+=1){let a=v_(t,i,o),u=l(a);s.set(u,e[o]=$_(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=J()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);w(o,n,a),r=!0},p(o,a){a&44&&(i=ae(o[3]),H(),e=pt(e,a,l,1,o,i,s,n.parentNode,ht,$_,n,v_),V())},i(o){if(!r){for(let a=0;a<i.length;a+=1)p(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)_(e[a]);r=!1},d(o){o&&k(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function S_(t){var r;let e,s;function n(){return t[7](t[8])}return e=new rl({props:{label:t[4](t[8]),disabled:!t[5].sort,checked:((r=t[5].sort)==null?void 0:r.order)===t[8]}}),e.$on("click",n),{c(){T(e.$$.fragment)},m(i,l){S(e,i,l),s=!0},p(i,l){var a;t=i;const o={};l&16&&(o.label=t[4](t[8])),l&32&&(o.disabled=!t[5].sort),l&32&&(o.checked=((a=t[5].sort)==null?void 0:a.order)===t[8]),e.$set(o)},i(i){s||(p(e.$$.fragment,i),s=!0)},o(i){_(e.$$.fragment,i),s=!1},d(i){E(e,i)}}}function v6(t){let e,s,n=ae(["ascending","descending"]),r=[];for(let l=0;l<2;l+=1)r[l]=S_(w_(t,n,l));const i=l=>_(r[l],1,1,()=>{r[l]=null});return{c(){for(let l=0;l<2;l+=1)r[l].c();e=J()},m(l,o){for(let a=0;a<2;a+=1)r[a]&&r[a].m(l,o);w(l,e,o),s=!0},p(l,o){if(o&52){n=ae(["ascending","descending"]);let a;for(a=0;a<2;a+=1){const u=w_(l,n,a);r[a]?(r[a].p(u,o),p(r[a],1)):(r[a]=S_(u),r[a].c(),p(r[a],1),r[a].m(e.parentNode,e))}for(H(),a=2;a<2;a+=1)i(a);V()}},i(l){if(!s){for(let o=0;o<2;o+=1)p(r[o]);s=!0}},o(l){r=r.filter(Boolean);for(let o=0;o<2;o+=1)_(r[o]);s=!1},d(l){l&&k(e),fs(r,l)}}}function $6(t){let e,s,n,r,i,l;return e=new Gp({props:{ariaLabel:t[4]("sort_field"),$$slots:{default:[w6]},$$scope:{ctx:t}}}),n=new wn({}),i=new Gp({props:{ariaLabel:t[4]("sort_order"),$$slots:{default:[v6]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment),s=R(),T(n.$$.fragment),r=R(),T(i.$$.fragment)},m(o,a){S(e,o,a),w(o,s,a),S(n,o,a),w(o,r,a),S(i,o,a),l=!0},p(o,a){const u={};a&16&&(u.ariaLabel=o[4]("sort_field")),a&32812&&(u.$$scope={dirty:a,ctx:o}),e.$set(u);const c={};a&16&&(c.ariaLabel=o[4]("sort_order")),a&32820&&(c.$$scope={dirty:a,ctx:o}),i.$set(c)},i(o){l||(p(e.$$.fragment,o),p(n.$$.fragment,o),p(i.$$.fragment,o),l=!0)},o(o){_(e.$$.fragment,o),_(n.$$.fragment,o),_(i.$$.fragment,o),l=!1},d(o){o&&(k(s),k(r)),E(e,o),E(n,o),E(i,o)}}}function S6(t){let e,s;return e=new Ls({props:{slot:"popup",$$slots:{default:[$6]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&32828&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function E6(t){let e,s;return e=new er({props:{class:"ghost",label:t[0]||t[4]("sort_by"),disabled:t[1],$$slots:{popup:[S6],"end-icon":[k6]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,[r]){const i={};r&17&&(i.label=n[0]||n[4]("sort_by")),r&2&&(i.disabled=n[1]),r&32828&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function T6(t,e,s){let n,r,i=K,l=()=>(i(),i=Mn(u,h=>s(5,r=h)),u);U(t,_e,h=>s(4,n=h)),t.$$.on_destroy.push(()=>i());let{label:o=""}=e,{disabled:a=!1}=e,{currentView:u=Me({})}=e;l();let{fields:c=[]}=e;const f=h=>{const m=["date","commit_date"].includes(h)?"descending":"ascending";u.update(g=>({...g,sort:{key:h,order:m}}))},d=h=>{u.update(m=>{var g;return{...m,sort:{key:(g=r.sort)==null?void 0:g.key,order:h}}})};return t.$$set=h=>{"label"in h&&s(0,o=h.label),"disabled"in h&&s(1,a=h.disabled),"currentView"in h&&l(s(2,u=h.currentView)),"fields"in h&&s(3,c=h.fields)},[o,a,u,c,n,r,f,d]}class zk extends X{constructor(e){super(),Z(this,e,T6,E6,W,{label:0,disabled:1,currentView:2,fields:3})}}function A6(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"format_list_bulleted",label:t[2]("list_view")}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&4&&(i.label=n[2]("list_view")),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function O6(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"grid_view",label:t[2]("grid_view")}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&4&&(i.label=n[2]("grid_view")),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function L6(t){let e,s,n,r;return e=new Wl({props:{disabled:t[0],selected:t[3].type!=="grid",class:"ghost iconic",$$slots:{"start-icon":[A6]},$$scope:{ctx:t}}}),e.$on("click",t[4]),n=new Wl({props:{disabled:t[0],selected:t[3].type==="grid",class:"ghost iconic",$$slots:{"start-icon":[O6]},$$scope:{ctx:t}}}),n.$on("click",t[5]),{c(){T(e.$$.fragment),s=R(),T(n.$$.fragment)},m(i,l){S(e,i,l),w(i,s,l),S(n,i,l),r=!0},p(i,l){const o={};l&1&&(o.disabled=i[0]),l&8&&(o.selected=i[3].type!=="grid"),l&68&&(o.$$scope={dirty:l,ctx:i}),e.$set(o);const a={};l&1&&(a.disabled=i[0]),l&8&&(a.selected=i[3].type==="grid"),l&68&&(a.$$scope={dirty:l,ctx:i}),n.$set(a)},i(i){r||(p(e.$$.fragment,i),p(n.$$.fragment,i),r=!0)},o(i){_(e.$$.fragment,i),_(n.$$.fragment,i),r=!1},d(i){i&&k(s),E(e,i),E(n,i)}}}function N6(t){let e,s;return e=new od({props:{disabled:t[0],ariaLabel:t[2]("switch_view"),$$slots:{default:[L6]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,[r]){const i={};r&1&&(i.disabled=n[0]),r&4&&(i.ariaLabel=n[2]("switch_view")),r&79&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function P6(t,e,s){let n,r,i=K,l=()=>(i(),i=Mn(a,f=>s(3,r=f)),a);U(t,_e,f=>s(2,n=f)),t.$$.on_destroy.push(()=>i());let{disabled:o=!1}=e,{currentView:a=Me({})}=e;l();const u=()=>{a.update(f=>({...f,type:"list"}))},c=()=>{a.update(f=>({...f,type:"grid"}))};return t.$$set=f=>{"disabled"in f&&s(0,o=f.disabled),"currentView"in f&&l(s(1,a=f.currentView))},[o,a,n,r,u,c]}class nh extends X{constructor(e){super(),Z(this,e,P6,N6,W,{disabled:0,currentView:1})}}function E_(t){let e,s;return e=new tr({props:{class:"secondary",$$slots:{default:[C6]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&8317&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function I6(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"info",label:t[4]("show_info")}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&16&&(i.label=n[4]("show_info")),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function C6(t){var y;let e,s,n,r,i,l,o,a,u,c,f,d,h,m,g,b;return e=new Ie({props:{class:"ghost",disabled:t[2].length===Object.values(t[3]).flat(1).length,label:t[4]("select_all")}}),e.$on("click",t[8]),n=new Ie({props:{class:"ghost",disabled:!t[2].length,label:t[4]("clear_selection")}}),n.$on("click",t[9]),i=new _n({props:{flex:!0}}),o=new zk({props:{disabled:!t[0],currentView:Dn,fields:t[5].map(t[10])}}),u=new Bk({props:{label:t[4]("file_type"),disabled:!t[0],currentView:Dn,noneLabel:t[4]("all"),filters:pm.map(t[11])}}),f=new nh({props:{disabled:!t[0],currentView:Dn}}),h=new wn({}),g=new Ie({props:{class:"ghost iconic",disabled:!t[0],pressed:!!((y=t[6])!=null&&y.showInfo),$$slots:{"start-icon":[I6]},$$scope:{ctx:t}}}),g.$on("click",t[12]),{c(){T(e.$$.fragment),s=R(),T(n.$$.fragment),r=R(),T(i.$$.fragment),l=R(),T(o.$$.fragment),a=R(),T(u.$$.fragment),c=R(),T(f.$$.fragment),d=R(),T(h.$$.fragment),m=R(),T(g.$$.fragment)},m(v,$){S(e,v,$),w(v,s,$),S(n,v,$),w(v,r,$),S(i,v,$),w(v,l,$),S(o,v,$),w(v,a,$),S(u,v,$),w(v,c,$),S(f,v,$),w(v,d,$),S(h,v,$),w(v,m,$),S(g,v,$),b=!0},p(v,$){var B;const C={};$&12&&(C.disabled=v[2].length===Object.values(v[3]).flat(1).length),$&16&&(C.label=v[4]("select_all")),e.$set(C);const O={};$&4&&(O.disabled=!v[2].length),$&16&&(O.label=v[4]("clear_selection")),n.$set(O);const A={};$&1&&(A.disabled=!v[0]),$&48&&(A.fields=v[5].map(v[10])),o.$set(A);const I={};$&16&&(I.label=v[4]("file_type")),$&1&&(I.disabled=!v[0]),$&16&&(I.noneLabel=v[4]("all")),$&16&&(I.filters=pm.map(v[11])),u.$set(I);const D={};$&1&&(D.disabled=!v[0]),f.$set(D);const L={};$&1&&(L.disabled=!v[0]),$&64&&(L.pressed=!!((B=v[6])!=null&&B.showInfo)),$&8208&&(L.$$scope={dirty:$,ctx:v}),g.$set(L)},i(v){b||(p(e.$$.fragment,v),p(n.$$.fragment,v),p(i.$$.fragment,v),p(o.$$.fragment,v),p(u.$$.fragment,v),p(f.$$.fragment,v),p(h.$$.fragment,v),p(g.$$.fragment,v),b=!0)},o(v){_(e.$$.fragment,v),_(n.$$.fragment,v),_(i.$$.fragment,v),_(o.$$.fragment,v),_(u.$$.fragment,v),_(f.$$.fragment,v),_(h.$$.fragment,v),_(g.$$.fragment,v),b=!1},d(v){v&&(k(s),k(r),k(l),k(a),k(c),k(d),k(m)),E(e,v),E(n,v),E(i,v),E(o,v),E(u,v),E(f,v),E(h,v),E(g,v)}}}function D6(t){let e,s,n=!t[1].files&&E_(t);return{c(){n&&n.c(),e=J()},m(r,i){n&&n.m(r,i),w(r,e,i),s=!0},p(r,[i]){r[1].files?n&&(H(),_(n,1,1,()=>{n=null}),V()):n?(n.p(r,i),i&2&&p(n,1)):(n=E_(r),n.c(),p(n,1),n.m(e.parentNode,e))},i(r){s||(p(n),s=!0)},o(r){_(n),s=!1},d(r){r&&k(e),n&&n.d(r)}}}function M6(t,e,s){let n,r,i,l,o,a,u,c;U(t,Nu,b=>s(7,r=b)),U(t,Lt,b=>s(1,i=b)),U(t,_r,b=>s(2,l=b)),U(t,Rk,b=>s(3,o=b)),U(t,_e,b=>s(4,a=b)),U(t,mL,b=>s(5,u=b)),U(t,Dn,b=>s(6,c=b));const f=()=>{De(_r,l=Object.values(o).flat(1),l)},d=()=>{De(_r,l=[],l)},h=b=>({key:b,label:a(`sort_keys.${b}`)}),m=b=>({label:a(b),field:"fileType",pattern:b}),g=()=>{Dn.update(b=>({...b,showInfo:!(c!=null&&c.showInfo)}))};return t.$$.update=()=>{t.$$.dirty&128&&s(0,n=!!r.length)},[n,i,l,o,a,u,c,r,f,d,h,m,g]}let R6=class extends X{constructor(e){super(),Z(this,e,M6,D6,W,{})}};const F6="deepl",U6="DeepL",j6="https://www.deepl.com/pro-api",B6="https://www.deepl.com/account/summary",z6=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?::fx)?/,H6=["BG,CS,DA,DE,EL,EN,ES,ET,FI,FR,HU,ID,IT,JA,KO,LT,LV,NB,NL,PL,PT,RO,RU,SK,SL,SV,TR,UK,ZH"].join(",").split(","),V6=["BG,CS,DA,DE,EL,EN,EN-GB,EN-US,ES,ET,FI,FR,HU,ID,IT,JA,KO,LT,LV,NB,NL,PL,PT,PT-BR,PT-PT,RO,RU,SK","SL,SV,TR,UK,ZH"].join(",").split(","),Y6=async(t,{sourceLocale:e="",targetLocale:s,apiKey:n})=>{const r=new URLSearchParams([...t.map(a=>["text",a]),["source_lang",e.toUpperCase()],["target_lang",s.toUpperCase()],["tag_handling","html"],["split_sentences","1"],["auth_key",n]]),l=`https://${n.endsWith(":fx")?"api-free.deepl.com":"api.deepl.com"}/v2/translate?${r.toString()}`,{translations:o}=await fetch(l).then(a=>a.json());return o.map(a=>a.text)},Hk={serviceId:F6,serviceLabel:U6,landingURL:j6,apiKeyURL:B6,apiKeyPattern:z6,sourceLanguages:H6,targetLanguages:V6,translate:Y6},T_={deepl:Hk},Va=Me(Hk),jl=Me(!1),Bl=Me(),Wf="sveltia-cms.entry-view",Hi=Me({}),Vi=Me({}),yo=Me({}),yr=Me({},t=>{(async()=>{try{const e=await Jt.get(Wf)||{showPreview:!0,syncScrolling:!0,selectAssetsView:{type:"grid"}};t(e),yo.set(e.selectAssetsView)}catch{}})()}),Ue=Me(),G6=(t,e={})=>{const s={},n=({fieldConfig:r,keyPath:i})=>{if(i in e){s[i]=e[i];return}const{widget:l,default:o}=r,a=Array.isArray(o)&&!!o.length;if(l==="list"){const{fields:u,field:c}=r;if(!a){s[i]=[];return}if(u||c){o.forEach((f,d)=>{Object.entries(f).forEach(([h,m])=>{s[[i,d,h].join(".")]=m})});return}o.forEach((f,d)=>{s[[i,d].join(".")]=f});return}if(l==="object"){const{fields:u}=r;u.forEach(c=>{n({keyPath:[i,c.name].join("."),fieldConfig:c})});return}if(l==="boolean"){s[i]=typeof o=="boolean"?o:!1;return}if(l==="relation"||l==="select"){const{multiple:u=!1}=r;if(u){s[i]=a?o:[];return}}s[i]=o!==void 0?o:""};return t.forEach(r=>{n({keyPath:r.name,fieldConfig:r})}),mn.unflatten(s)},qf=({draft:{collectionName:t,fileName:e},prop:s,locale:n,target:r={},getValueMap:i=void 0})=>{const l=ms(t),{defaultLocale:o="default"}=l._i18n;return new Proxy(r,{set:(a,u,c)=>{const f=typeof i=="function"?i():a,d=mo(t,e,u,f);return d?(d.i18n==="duplicate"&&n===o&&Object.entries(ne(Ue)[s]).forEach(([h,m])=>{h!==n&&m[u]!==c&&(m[u]=c)}),Reflect.set(a,u,c)):!0}})},Yo=(t,e,s)=>{var h;const n=ms(t),{hasLocales:r,locales:i}=n._i18n,l=!e,{fileName:o,locales:a}=e||{},u=o?(h=n.files)==null?void 0:h.find(({name:m})=>m===o):void 0,{fields:c}=u||n,f=G6(c,s),d=r?i:["default"];Ue.set({isNew:l,collectionName:t,collection:n,fileName:o,collectionFile:u,originalEntry:e,originalValues:Object.fromEntries(d.map(m=>{var g;return[m,mn.flatten(((g=a==null?void 0:a[m])==null?void 0:g.content)||f)]})),currentValues:Object.fromEntries(d.map(m=>{var g,b;return[m,d.length?qf({draft:{collectionName:t,fileName:o},prop:"currentValues",locale:m,target:mn.flatten(((g=a==null?void 0:a[m])==null?void 0:g.content)||f)}):mn.flatten(((b=a==null?void 0:a[m])==null?void 0:b.content)||f)]})),files:Object.fromEntries(d.map(m=>[m,d.length?qf({draft:{collectionName:t,fileName:o},prop:"files",locale:m,getValueMap:()=>ne(Ue).currentValues[m]}):{}])),validities:Object.fromEntries(d.map(m=>[m,{}]))})},Vk=(t,e,s)=>{const n=mn.unflatten(ne(Ue).currentValues[t]),r=e.split(".").reduce((i,l)=>{const o=l.match(/^\d+$/)?Number(l):l;return i[o]||(i[o]=[]),i[o]},n);s(r),Ue.update(i=>({...i,currentValues:{...i.currentValues,[t]:qf({draft:i,prop:"currentValues",locale:t,target:mn.flatten(n)})}}))},Yk=async(t,e,s="",n=!1)=>{var u,c;const{collectionName:r,fileName:i,currentValues:l}=ne(Ue),o=l[t],a=Object.fromEntries(Object.entries(o).filter(([f,d])=>{const h=mo(r,i,f,o);return!(s&&!f.startsWith(s)||typeof d!="string"||!["markdown","text","string","list"].includes(h==null?void 0:h.widget)||(h==null?void 0:h.widget)==="list"&&(h.field||h.fields)||!n&&d===l[e][f])}));if(Object.keys(a).length){if(n){const f=(c=ne(mt).apiKeys)==null?void 0:c[(u=ne(Va))==null?void 0:u.serviceId];if(!f)return;try{const d=await ne(Va).translate(Object.values(a),{apiKey:f,sourceLocale:t,targetLocale:e});Object.keys(a).forEach((h,m)=>{l[e][h]=d[m]})}catch{}}else Object.entries(a).forEach(([f,d])=>{l[e][f]=d});Ue.update(f=>({...f,currentValues:l}))}},sh=(t="",e="")=>{const{collection:s,currentValues:n,originalValues:r}=ne(Ue),{hasLocales:i,locales:l}=s._i18n;(t?[t]:i?l:["default"]).forEach(a=>{Object.keys(n[a]).forEach(u=>{(!e||u.startsWith(e))&&(n[a][u]=void 0)}),Object.entries(r[a]).forEach(([u,c])=>{(!e||u.startsWith(e))&&(n[a][u]=c)})}),Ue.update(a=>({...a,currentValues:n}))},W6=()=>{const{collection:t,fileName:e,currentValues:s,validities:n}=ne(Ue),{hasLocales:r,defaultLocale:i="default"}=t._i18n;let l=!0;return Object.entries(s).forEach(([o,a])=>{const u=Object.entries(a);u.forEach(([c,f])=>{const d=mo(t.name,e,c,a);if(!d)return;const h=c.match(/\.(\d+)$/),{widget:m,required:g=!0,i18n:b=!1,pattern:y,min:v,max:$}=d,O=g!==!1&&(o===i||r&&(b===!0||b==="translate"));let A=!1,I=!1,D=!1,L=!1;if(h){if(Number(h[1])>0)return;c=c.replace(/\.\d+$/,"");const F=new RegExp(`^${rn(c)}\\.\\d+$`),te=u.filter(([q])=>q.match(F)).map(([,q])=>q).filter(q=>q!==void 0)||[];O&&!te.length&&(A=!0),v&&Array.isArray(f)&&f.length<v&&(I=!0),$&&Array.isArray(f)&&f.length>$&&(D=!0)}["object","list"].includes(m)||(O&&(f===void 0||f==="")&&(A=!0),Array.isArray(y)&&y.length===2&&!String(f).match(new RegExp(rn(y[0])))&&(L=!0));const B={valueMissing:A,rangeUnderflow:I,rangeOverflow:D,patternMismatch:L},z=!Object.values(B).some(Boolean);n[o][c]={...B,valid:z},z||(l=!1)})}),Ue.update(o=>({...o,validities:n})),l},A_=(t,e,s)=>{var m;const{collection:n,collectionFile:r,originalEntry:i,currentValues:l}=t;if(r)return r.file;if(i!=null&&i.locales[e])return i==null?void 0:i.locales[e].path;const{structure:o,defaultLocale:a}=n._i18n,u=(m=n.folder)==null?void 0:m.replace(/\/$/,""),c=n.path?Jl(n.path,{collection:n,content:l[a],currentSlug:s}):s,f=Ok(n),d=`${u}/${c}.${f}`,h={multiple_folders:`${u}/${e}/${c}.${f}`,multiple_files:`${u}/${c}.${e}.${f}`,single_file:d};return h[o]||h.single_file},q6=async()=>{if(!W6())throw new Error("validation_failed");const t=ne(Sn),e=ne(Ue),{collection:s,isNew:n,originalEntry:r,collectionName:i,collectionFile:l,fileName:o,currentValues:a,files:u}=e,{structure:c,hasLocales:f,locales:d,defaultLocale:h="default"}=s._i18n,m={collection:s,content:a[h]},g=(r==null?void 0:r.slug)||Jl(s.slug||"{{title}}",m),{internalAssetFolder:b,publicAssetFolder:y}=RT(s,{...m,currentSlug:g,isMediaFolder:!0,entryFilePath:A_(e,h,g)}),v=ne(Rn).map(L=>L.path).filter(L=>L.match(new RegExp(`^\\/${rn(b)}\\/[^\\/]+$`))),$=[],C=[],O={text:null,collectionName:i,folder:b,commitAuthor:t.email?{name:t.name,email:t.email}:null,commitDate:new Date},A=Object.fromEntries(await Promise.all(Object.entries(a).map(async([L,B])=>{for(const[te,q]of Object.entries(B)){if(q===void 0){delete B[te];continue}if(typeof q!="string")continue;B[te]=q.trim();const[,ue,It]=q.match(/^data:(.+?\/.+?);base64,(.+)/)||[];if(ue){const dt=u[L][te]||await(async()=>{const Vn=await(await fetch(q)).blob(),[zt,An]=ue.split("/"),[bs]=An.split("+");return new File([Vn],`${zt}-${Date.now()}.${bs}`,{type:ue})})(),kt=await va(dt),Tt=C.find(en=>en.sha===kt);if(Tt){B[te]=y?`${y}/${Tt.name}`:Tt.name;continue}const wt=hy(dt.name,[...v,...C.map(en=>en.name)]),ee=`${b}/${wt}`;$.push({path:ee,data:dt,base64:It}),C.push({...O,url:URL.createObjectURL(dt),name:wt,path:ee,sha:kt,size:dt.size,kind:Nd(wt)}),B[te]=y?`${y}/${wt}`:wt}}const z=mn.unflatten(B),Q=await va(new Blob([z],{type:"text/plain"})),F=A_(e,L,g);return[L,{content:z,sha:Q,path:F}]}))),I={id:`${i}/${o}/${g}`,collectionName:i,fileName:o,slug:g,sha:A[h].sha,locales:A};if(l||!f||c==="single_file"){const{path:L,content:B}=A[h];$.push({slug:g,path:L,data:Wm({content:f?Object.fromEntries(Object.entries(A).map(([z,Q])=>[z,Q.content])):B,path:L,config:l?{extension:((l==null?void 0:l.file.match(/\.([a-zA-Z0-9]+)$/))||[])[1]}:s})})}else d.map(async L=>{const{path:B,content:z}=A[L];$.push({slug:g,path:B,data:Wm({content:z,path:B,config:s})})});try{await ne(Tr).saveFiles($,{commitType:n?"create":"update",collection:i})}catch{throw new Error("saving_failed")}const D=C.map(L=>L.path);Ts.update(L=>[...L.filter(B=>!(B.collectionName===i&&B.slug===g)),I]),Rn.update(L=>[...L.filter(B=>!D.includes(B.path)),...C]),Ue.set(null)};Ue.subscribe(t=>{ne(mt).devModeEnabled&&console.info("entryDraft",t)});yo.subscribe(t=>{const e=ne(yr).selectAssetsView||{};Un(t,e)||yr.update(s=>({...s,selectAssetsView:t}))});yr.subscribe(t=>{!t||!Object.keys(t).length||(async()=>{try{Un(t,await Jt.get(Wf))||await Jt.set(Wf,t)}catch{}})()});function K6(t){ge(t,"svelte-p6p3r0",'.outer.svelte-p6p3r0.svelte-p6p3r0{flex:auto;display:flex;flex-direction:column;overflow:hidden}.outer[hidden].svelte-p6p3r0.svelte-p6p3r0{display:none}.outer.svelte-p6p3r0>[role="toolbar"]{flex:none}.outer.svelte-p6p3r0>[role="toolbar"] [role="search"]{flex:auto;width:auto;max-width:480px}.outer.svelte-p6p3r0 .browser{flex:auto;display:flex;overflow:hidden}.outer.svelte-p6p3r0 .primary-sidebar{display:flex;flex-direction:column;flex:none;width:240px;overflow-y:auto;background-color:var(--sui-tertiary-background-color);border-width:0 1px 0 0;border-color:var(--sui-primary-border-color)}.outer.svelte-p6p3r0 .primary-sidebar [role="radiogroup"]{width:100%}.outer.svelte-p6p3r0 .primary-sidebar section{padding:8px 0}.outer.svelte-p6p3r0 .primary-sidebar section h2{position:absolute;left:-9999px}.outer.svelte-p6p3r0 .primary-sidebar section [role="search"]{margin:0 16px 16px}.outer.svelte-p6p3r0 .primary-sidebar section [role="listbox"]{margin:0 8px;border-width:0;gap:4px}.outer.svelte-p6p3r0 .primary-sidebar section [role="listbox"] button{display:flex;justify-content:flex-start;border-radius:var(--sui-control-medium-border-radius);padding:0 12px;height:32px;width:100%;text-align:left}.outer.svelte-p6p3r0 .primary-sidebar section [role="listbox"] button span{flex:none}.outer.svelte-p6p3r0 .primary-sidebar section [role="listbox"] button span.label{flex:auto;overflow:hidden;text-overflow:ellipsis}.outer.svelte-p6p3r0 .primary-sidebar section [role="listbox"] button span.icon.check{display:none}.outer.svelte-p6p3r0 .primary-sidebar section [role="listbox"] button:not(:first-child){margin-top:4px}.outer.svelte-p6p3r0 .primary-sidebar section [role="listbox"] button:not(:focus){border-color:transparent}.outer.svelte-p6p3r0 .primary-sidebar section [role="listbox"] [role="option"][aria-selected="true"]{color:var(--sui-highlight-foreground-color);background-color:var(--sui-highlight-background-color)}.outer.svelte-p6p3r0 .primary-sidebar section [role="listbox"] [role="option"].dragover{color:var(--sui-primary-accent-color-foreground) !important;background-color:var(--sui-primary-accent-color) !important}.outer.svelte-p6p3r0 .main{flex:auto;display:flex;flex-direction:column;overflow:hidden}.outer.svelte-p6p3r0 .main .primary.global[role="toolbar"]{justify-content:center}.outer.svelte-p6p3r0 .main .primary:not(.global)[role="toolbar"]{background-color:var(--sui-tertiary-background-color)}.outer.svelte-p6p3r0 .main .secondary[role="toolbar"]{border-width:0 0 1px;border-color:var(--sui-primary-border-color)}.outer.svelte-p6p3r0 .main .list-container{flex:auto;overflow-y:auto;overscroll-behavior-y:contain;padding:16px;border-radius:var(--sui-control-medium-border-radius)}.outer.svelte-p6p3r0 .main-inner.svelte-p6p3r0{flex:auto;display:flex;overflow:hidden}.outer.svelte-p6p3r0 .main-inner .main-inner-main.svelte-p6p3r0{flex:auto;display:flex;flex-direction:column;overflow:hidden}.outer.svelte-p6p3r0 .main-inner.svelte-p6p3r0 .secondary-sidebar{flex:none;overflow:auto;width:320px;border-left:1px solid var(--sui-primary-border-color)}')}const Z6=t=>({}),O_=t=>({}),X6=t=>({}),L_=t=>({}),J6=t=>({}),N_=t=>({}),Q6=t=>({}),P_=t=>({}),x6=t=>({}),I_=t=>({});function eP(t){let e,s,n,r,i,l;const o=t[3].primary_toolbar,a=Ae(o,t,t[4],P_),u=t[3].secondary_toolbar,c=Ae(u,t,t[4],N_),f=t[3].main,d=Ae(f,t,t[4],L_),h=t[3].secondary_sidebar,m=Ae(h,t,t[4],O_);return{c(){a&&a.c(),e=R(),s=P("div"),n=P("div"),c&&c.c(),r=R(),d&&d.c(),i=R(),m&&m.c(),M(n,"class","main-inner-main svelte-p6p3r0"),M(s,"class","main-inner svelte-p6p3r0")},m(g,b){a&&a.m(g,b),w(g,e,b),w(g,s,b),N(s,n),c&&c.m(n,null),N(n,r),d&&d.m(n,null),N(s,i),m&&m.m(s,null),l=!0},p(g,b){a&&a.p&&(!l||b&16)&&Le(a,o,g,g[4],l?Oe(o,g[4],b,Q6):Ne(g[4]),P_),c&&c.p&&(!l||b&16)&&Le(c,u,g,g[4],l?Oe(u,g[4],b,J6):Ne(g[4]),N_),d&&d.p&&(!l||b&16)&&Le(d,f,g,g[4],l?Oe(f,g[4],b,X6):Ne(g[4]),L_),m&&m.p&&(!l||b&16)&&Le(m,h,g,g[4],l?Oe(h,g[4],b,Z6):Ne(g[4]),O_)},i(g){l||(p(a,g),p(c,g),p(d,g),p(m,g),l=!0)},o(g){_(a,g),_(c,g),_(d,g),_(m,g),l=!1},d(g){g&&(k(e),k(s)),a&&a.d(g),c&&c.d(g),d&&d.d(g),m&&m.d(g)}}}function tP(t){let e,s,n;const r=t[3].primary_sidebar,i=Ae(r,t,t[4],I_);return s=new gn({props:{class:"main",$$slots:{default:[eP]},$$scope:{ctx:t}}}),{c(){i&&i.c(),e=R(),T(s.$$.fragment)},m(l,o){i&&i.m(l,o),w(l,e,o),S(s,l,o),n=!0},p(l,o){i&&i.p&&(!n||o&16)&&Le(i,r,l,l[4],n?Oe(r,l[4],o,x6):Ne(l[4]),I_);const a={};o&16&&(a.$$scope={dirty:o,ctx:l}),s.$set(a)},i(l){n||(p(i,l),p(s.$$.fragment,l),n=!0)},o(l){_(i,l),_(s.$$.fragment,l),n=!1},d(l){l&&k(e),i&&i.d(l),E(s,l)}}}function nP(t){let e,s,n,r;const i=[{class:"browser "+t[0]},t[2]];let l={$$slots:{default:[tP]},$$scope:{ctx:t}};for(let o=0;o<i.length;o+=1)l=x(l,i[o]);return s=new gn({props:l}),{c(){e=P("div"),T(s.$$.fragment),M(e,"class","outer svelte-p6p3r0"),e.hidden=n=t[1]?!0:void 0},m(o,a){w(o,e,a),S(s,e,null),r=!0},p(o,[a]){const u=a&5?He(i,[a&1&&{class:"browser "+o[0]},a&4&&Bn(o[2])]):{};a&16&&(u.$$scope={dirty:a,ctx:o}),s.$set(u),(!r||a&2&&n!==(n=o[1]?!0:void 0))&&(e.hidden=n)},i(o){r||(p(s.$$.fragment,o),r=!0)},o(o){_(s.$$.fragment,o),r=!1},d(o){o&&k(e),E(s)}}}function sP(t,e,s){const n=["class"];let r=he(e,n),i;U(t,Ue,u=>s(1,i=u));let{$$slots:l={},$$scope:o}=e,{class:a=""}=e;return t.$$set=u=>{e=x(x({},e),Ze(u)),s(2,r=he(e,n)),"class"in u&&s(0,a=u.class),"$$scope"in u&&s(4,o=u.$$scope)},[a,i,r,l,o]}class ko extends X{constructor(e){super(),Z(this,e,sP,nP,W,{class:0},K6)}}function rP(t){let e,s;return e=new t6({props:{slot:"primary_sidebar"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function iP(t){let e,s;return e=new o6({props:{slot:"primary_toolbar"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function lP(t){let e,s;return e=new R6({props:{slot:"secondary_toolbar"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function oP(t){let e,s;return e=new WN({props:{slot:"main"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function aP(t){let e,s;return e=new p6({props:{slot:"secondary_sidebar"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function C_(t){let e,s;return e=new nN({}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function uP(t){let e,s,n=t[1]&&t[0].match(/^\/assets\/(.+?)\.[a-zA-Z0-9]+$/),r,i,l,o;e=new ko({props:{class:"media",$$slots:{secondary_sidebar:[aP],main:[oP],secondary_toolbar:[lP],primary_toolbar:[iP],primary_sidebar:[rP]},$$scope:{ctx:t}}});let a=n&&C_();return{c(){T(e.$$.fragment),s=R(),a&&a.c(),r=J()},m(u,c){S(e,u,c),w(u,s,c),a&&a.m(u,c),w(u,r,c),i=!0,l||(o=Ce(window,"hashchange",t[3]),l=!0)},p(u,[c]){const f={};c&128&&(f.$$scope={dirty:c,ctx:u}),e.$set(f),c&3&&(n=u[1]&&u[0].match(/^\/assets\/(.+?)\.[a-zA-Z0-9]+$/)),n?a?c&3&&p(a,1):(a=C_(),a.c(),p(a,1),a.m(r.parentNode,r)):a&&(H(),_(a,1,1,()=>{a=null}),V())},i(u){i||(p(e.$$.fragment,u),p(a),i=!0)},o(u){_(e.$$.fragment,u),_(a),i=!1},d(u){u&&(k(s),k(r)),E(e,u),a&&a.d(u),l=!1,o()}}}function cP(t,e,s){let n,r,i,l;U(t,Rn,c=>s(4,n=c)),U(t,ei,c=>s(1,r=c)),U(t,rs,c=>s(5,i=c)),U(t,os,c=>s(6,l=c));let o="";const a=()=>{s(0,{path:o}=go(),o);const[c,f,d]=o.match(/^\/assets(?:\/([/\-\w]+))?(?:\/([^/]+.\w{3,4}))?$/)||[];c&&(f?l.some(({internalPath:h})=>f===h)&&i!==f&&De(rs,i=f,i):De(rs,i="",i),De(ei,r=d&&n.find(h=>h.path===`${f}/${d}`)||null,r))};return Qt(()=>{a()}),[o,r,a,()=>{a()}]}class fP extends X{constructor(e){super(),Z(this,e,cP,uP,W,{})}}function dP(t){let e=t[1]("confirm_uploading_files",{values:{number:t[3].files.length,folder:`/${t[3].folder}`}})+"",s;return{c(){s=Y(e)},m(n,r){w(n,s,r)},p(n,r){r&10&&e!==(e=n[1]("confirm_uploading_files",{values:{number:n[3].files.length,folder:`/${n[3].folder}`}})+"")&&G(s,e)},d(n){n&&k(s)}}}function hP(t){let e=t[1]("confirm_uploading_file",{values:{folder:`/${t[3].folder}`}})+"",s;return{c(){s=Y(e)},m(n,r){w(n,s,r)},p(n,r){r&10&&e!==(e=n[1]("confirm_uploading_file",{values:{folder:`/${n[3].folder}`}})+"")&&G(s,e)},d(n){n&&k(s)}}}function pP(t){let e,s,n,r,i;function l(f,d){return f[3].files.length===1?hP:dP}let o=l(t),a=o(t);function u(f){t[4](f)}let c={};return t[3].files!==void 0&&(c.files=t[3].files),n=new th({props:c}),de.push(()=>We(n,"files",u)),{c(){e=P("div"),a.c(),s=R(),T(n.$$.fragment)},m(f,d){w(f,e,d),a.m(e,null),w(f,s,d),S(n,f,d),i=!0},p(f,d){o===(o=l(f))&&a?a.p(f,d):(a.d(1),a=o(f),a&&(a.c(),a.m(e,null)));const h={};!r&&d&8&&(r=!0,h.files=f[3].files,Ke(()=>r=!1)),n.$set(h)},i(f){i||(p(n.$$.fragment,f),i=!0)},o(f){_(n.$$.fragment,f),i=!1},d(f){f&&(k(e),k(s)),a.d(),E(n,f)}}}function mP(t){var n;let e,s;return e=new ls({props:{open:t[0],title:t[1]("upload_files"),okLabel:t[1](((n=t[2])==null?void 0:n.backendName)==="local"?"save":"upload_and_publish"),$$slots:{default:[pP]},$$scope:{ctx:t}}}),e.$on("ok",t[5]),e.$on("cancel",t[6]),{c(){T(e.$$.fragment)},m(r,i){S(e,r,i),s=!0},p(r,[i]){var o;const l={};i&1&&(l.open=r[0]),i&2&&(l.title=r[1]("upload_files")),i&6&&(l.okLabel=r[1](((o=r[2])==null?void 0:o.backendName)==="local"?"save":"upload_and_publish")),i&138&&(l.$$scope={dirty:i,ctx:r}),e.$set(l)},i(r){s||(p(e.$$.fragment,r),s=!0)},o(r){_(e.$$.fragment,r),s=!1},d(r){E(e,r)}}}function _P(t,e,s){let n,r,i,l;U(t,MT,c=>s(0,n=c)),U(t,_e,c=>s(1,r=c)),U(t,Sn,c=>s(2,i=c)),U(t,Nn,c=>s(3,l=c));function o(c){t.$$.not_equal(l.files,c)&&(l.files=c,Nn.set(l))}return[n,r,i,l,o,async()=>{await _L(l,{commitType:"uploadMedia"}),De(Nn,l={folder:null,files:[]},l)},()=>{De(Nn,l={folder:null,files:[]},l)}]}class gP extends X{constructor(e){super(),Z(this,e,_P,mP,W,{})}}function bP(t){ge(t,"svelte-soravq","div.svelte-soravq{flex:auto;overflow:auto}pre.svelte-soravq{margin:0;padding:16px}")}function yP(t){let e,s,n=xi.stringify(t[1])+"",r,i;return{c(){e=P("div"),s=P("pre"),r=Y(n),M(s,"class","svelte-soravq"),M(e,"aria-label",i=t[0]("site_config")),M(e,"class","svelte-soravq")},m(l,o){w(l,e,o),N(e,s),N(s,r)},p(l,o){o&2&&n!==(n=xi.stringify(l[1])+"")&&G(r,n),o&1&&i!==(i=l[0]("site_config"))&&M(e,"aria-label",i)},d(l){l&&k(e)}}}function kP(t){let e,s;return e=new ko({props:{class:"content",$$slots:{main:[yP]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,[r]){const i={};r&7&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function wP(t,e,s){let n,r;return U(t,_e,i=>s(0,n=i)),U(t,ct,i=>s(1,r=i)),[n,r]}class vP extends X{constructor(e){super(),Z(this,e,wP,kP,W,{},bP)}}const $P={collections:"Collections",contents:"Contents",entries:"Entries",assets:"Assets",media:"Media",workflow:"Workflow",editorial_workflow:"Editorial Workflow",notifications:"Notifications",site_config:"Site Configuration",preferences:"Preferences",account:"Account",live_site:"Live Site",git_repository:"Git Repository",help:{documentation:"Documentation",issue:"Report Issue",feedback:"Share Feedback"},sign_in:"Sign In",sign_in_with_x:"Sign In with {name}",signed_in_as_x:"Signed In as {name}",work_with_local_repo:"Work with Local Repository",working_with_local_repo:"Working with Local Repository",sign_out:"Sign Out",create:"New",select:"Select",select_all:"Select All",clear_selection:"Clear Selection",upload:"Upload",upload_and_publish:"Upload & Publish",copy:"Copy",download:"Download",add:"Add",delete:"Delete",duplicate:"Duplicate",save:"Save",publish:"Publish",save_and_publish:"Save & Publish",saving:"Saving…",ok:"OK",cancel:"Cancel",replace:"Replace",remove:"Remove",clear:"Clear",expand:"Expand",collapse:"Collapse",close:"Close",insert:"Insert",show_menu:"Show Menu",hide_menu:"Hide Menu",move_to:"Move to…",search:"Search",searching:"Searching…",error:"error",loading_site_config:"Loading Site Configuration…",loading_site_data:"Loading Site Data…",search_placeholder:"Search for entries and assets…",asset:"Asset",collection_not_found:"Collection not found.",actions:"Actions",switch_view:"Switch View",list_view:"List View",grid_view:"Grid View",sort_by:"Sort by",sort_field:"Sort Field",sort_keys:{none:"None",name:"Name",commit_author:"Author",commit_date:"Last Modified"},sort_order:"Sort Order",ascending:"Ascending",descending:"Descending",filter_by:"Filter by",group_by:"Group by",file_type:"File Type",all:"All",image:"Image",video:"Video",audio:"Audio",document:"Document",other:"Other",show_assets:"Show Assets",show_info:"Show Info",default:"Default",all_files:"All Files",collection_files:"Collection Files",uncategorized:"Uncategorized",x_collection_media_folder:"{collection} Collection Media Folder",search_results_for_x:"Search Results for “{terms}”",no_files_found:"No files found.",no_entries_found:"No entries found.",drop_files_or_browse:"Drop a file here or click to browse:",drop_files_here:"Drop files here",delete_file:"Delete File",delete_files:"Delete Files",confirm_deleting_selected_file:"Are you sure to delete the selected file?",confirm_deleting_selected_files:"Are you sure to delete the selected {number} files?",confirm_deleting_all_files:"Are you sure to delete all the files?",delete_entry:"Delete Entry",delete_entries:"Delete Entries",confirm_deleting_this_entry:"Are you sure to delete this entry?",confirm_deleting_selected_entry:"Are you sure to delete the selected entry?",confirm_deleting_selected_entries:"Are you sure to delete the selected {number} entries?",confirm_deleting_all_entries:"Are you sure to delete all the entries?",upload_files:"Upload Files",uploading_files:"Uploading Files",confirm_uploading_file:"Are you sure to save the following file to the {folder} folder?",confirm_uploading_files:"Are you sure to save the following {number} files to the {folder} folder?",no_entries_created:"This collection has no entries yet.",create_new_entry:"Create New Entry",no_files_created:"This collection has no files.",multi_files_selected:"Multiple files are selected.",select_asset_show_info:"Select a file to show the info.",creating_x:"Creating {name}",editing_x:"Editing {name}",show_preview:"Show Preview",sync_scrolling:"Sync Scrolling",edit:"Edit",preview:"Preview",unsupported_widget_x:"Unsupported widget: {name}",copy_from:"Copy from…",copy_from_x:"Copy from {locale}",translate_from:"Translate from…",translate_from_x:"Translate from {locale}",revert_changes:"Revert Changes",revert_all_changes:"Revert All Changes",required:"Required",validation:{value_missing:"This field is required.",range_underflow:"You have to select at least {min} items.",range_overflow:"You cannot select more than {max} items."},saving_entry:{error:{title:"Error",description:"There was an error while saving the entry. Please try again later."}},no_preview_available:"No Preview Available.",public_url:"Public URL",file_path:"File Path",kind:"Kind",size:"Size",dimensions:"Dimensions",duration:"Duration",used_in:"Used in",move_up:"Move Up",move_down:"Move Down",today:"Today",current_time:"Current Time",add_x:"Add {name}",drag_to_sort_items:"Drag to sort items",select_file:"Select File",select_image:"Select Image",select_from_library:"Select from Library",library_locations:{this_repository:"This Repository",external_locations:"External Locations",stock_photos:"Stock Photos"},enter_url:"Enter URL",enter_image_url:"Enter URL of the image:",insert_stock_photo:"Insert Stock Photo",large_file:{title:"Large File",description:"This file exceeds the maximum size of {size}. Please choose another."},photo_credit:{title:"Photo Credit",description:"Use the following credit if possible:"},boolean:{true:"Yes",false:"No"},stock_photos:{not_found:"No photos found.",error:{invalid_key:"Your API Key is invalid or expired. Please double check and try again.",search_fetch_failed:"There was an error while searching photos. Please try again later.",image_fetch_failed:"There was an error while downloading the selected photo. Please try again later."}},config:{error:{fetch_failed:"The configuration file could not be retrieved.",parse_failed:"The configuration file could not be parsed.",no_collection:"Collections are not defined in the configuration file.",no_backend:"The backend is not defined in the configuration file.",unsupported_backend:"The configured “{name}” backend is not supported.",no_media_folder:"The media folder is not defined in the configuration file.",unexpected:"There was an unexpected error while validating the configuration file.",try_again:"Please solve the issue and try again."}},unsupported:{browser:"Local development is not supported in your browser. Please use Chrome or Edge instead.",storage:"Local storage is disabled in your browser. Please check your privacy (cookies) settings and try again.",unexpected:"There was an unexpected error while signing in. Please try again later."},general:"General",status:{drafts:"Drafts",in_review:"In Review",ready:"Ready"},prefs:{error:{permission_denied:"Browser storage (Cookie) access has been denied. Please check the permission and try again."},appearance:{title:"Appearance",theme:"Theme"},theme:{auto:"Auto",dark:"Dark",light:"Light"},languages:{title:"Languages",ui_language:{title:"User Interface Language"},translator:{title:"{service} Translator",field_label:"{service} API Authentication Key",description:"Sign up for <a {homeHref}>{service} API</a> and enter <a {apiKeyHref}>your Authentication Key</a> here to enable quick translation of text entry fields."}},media:{title:"Media",stock_photo:{title:"{service} Free Images",field_label:"{service} API Key",description:"Sign up for <a {homeHref}>{service} API</a> and enter <a {apiKeyHref}>your API Key</a> here to insert free stock photos to image entry fields.",credit:"Photos provided by {service}"}},advanced:{title:"Advanced",developer_mode:{title:"Developer Mode",description:"Enable some features, including detailed console logs and native context menus.",switch_label:"Enable Developer Mode"}}},file_type_labels:{avif:"AVIF image",bmp:"Bitmap image",gif:"GIF image",ico:"Icon",jpeg:"JPEG image",jpg:"JPEG image",png:"PNG image",svg:"SVG image",tiff:"TIFF image",webp:"WebP image",avi:"AVI video",mp4:"MP4 video",mpeg:"MPEG video",ogv:"OGG video",ts:"MPEG video",webm:"WebM video","3gp":"3GPP video","3g2":"3GPP2 video",aac:"AAC audio",mid:"MIDI",midi:"MIDI",mp3:"MP3 audio",opus:"OPUS audio",wav:"WAV audio",weba:"WebM audio",csv:"CSV spreadsheet",doc:"Word document",docx:"Word document",odp:"OpenDocument presentation",ods:"OpenDocument spreadsheet",odt:"OpenDocument text",pdf:"PDF document",ppt:"PowerPoint presentation",pptx:"PowerPoint presentation",rtf:"Rich text document",xls:"Excel spreadsheet",xlsx:"Excel spreadsheet"}},SP=Object.freeze(Object.defineProperty({__proto__:null,strings:$P},Symbol.toStringTag,{value:"Module"})),EP={collections:"コレクション",contents:"コンテンツ",entries:"エントリー",assets:"ファイル",media:"メディア",workflow:"ワークフロー",editorial_workflow:"編集ワークフロー",notifications:"通知",site_config:"サイト設定",preferences:"個人設定",account:"アカウント",live_site:"本番サイト",git_repository:"Git レポジトリ",help:{documentation:"ドキュメンテーション",issue:"問題を報告",feedback:"フィードバックを共有"},sign_in:"ログイン",sign_in_with_x:"{name} でログイン",signed_in_as_x:"{name} としてログイン中",work_with_local_repo:"ローカルレポジトリで作業",working_with_local_repo:"ローカルレポジトリで作業中",sign_out:"ログアウト",create:"新規作成",select:"選択",select_all:"すべて選択",clear_selection:"選択を解除",upload:"アップロード",upload_and_publish:"アップロードして公開",copy:"コピー",download:"ダウンロード",add:"追加",delete:"削除",duplicate:"複製",save:"保存",publish:"公開",save_and_publish:"保存して公開",saving:"保存中…",ok:"OK",cancel:"キャンセル",replace:"置き換え",remove:"削除",clear:"クリア",expand:"広げる",collapse:"折り畳む",close:"閉じる",insert:"挿入",show_menu:"メニューを開く",hide_menu:"メニューを閉じる",move_to:"フォルダへ移動…",search:"検索",searching:"検索中…",error:"エラー",loading_site_config:"サイト設定を読み込んでいます…",loading_site_data:"サイトデータを読み込んでいます…",search_placeholder:"エントリーとファイルを検索…",asset:"ファイル",collection_not_found:"コレクションが見つかりませんでした",actions:"アクション",switch_view:"ビューを切り替え",list_view:"リストビュー",grid_view:"グリッドビュー",sort_by:"並び替え",sort_field:"並べ替え項目",sort_keys:{none:"なし",name:"名前",commit_author:"作成者",commit_date:"最終更新日時"},sort_order:"並べ替え順",ascending:"昇順",descending:"降順",filter_by:"絞り込み",group_by:"グループ化",file_type:"ファイル形式",all:"すべて",image:"画像",video:"動画",audio:"音声",document:"書類",other:"その他",show_assets:"ファイルを表示",show_info:"情報を表示",default:"デフォルト",all_files:"すべてのファイル",collection_files:"コレクションファイル",uncategorized:"未分類",x_collection_media_folder:"{collection} コレクションメディアフォルダー",search_results_for_x:"「{terms}」の検索結果",no_files_found:"ファイルは見つかりませんでした。",no_entries_found:"エントリーは見つかりませんでした。",drop_files_or_browse:"ここにファイルをドロップするか下のボタンをクリックして参照:",drop_files_here:"ここにファイルをドロップ",delete_file:"ファイルを削除",delete_files:"ファイルを削除",confirm_deleting_selected_file:"選択されたファイルを削除してもよろしいですか?",confirm_deleting_selected_files:"選択された {number} ファイルを削除してもよろしいですか?",confirm_deleting_all_files:"すべてのファイルを削除してもよろしいですか?",delete_entry:"エントリーを削除",delete_entries:"エントリーを削除",confirm_deleting_this_entry:"このエントリーを削除してもよろしいですか?",confirm_deleting_selected_entry:"選択されたエントリーを削除してもよろしいですか?",confirm_deleting_selected_entries:"選択された {number} エントリーを削除してもよろしいですか?",confirm_deleting_all_entries:"すべてのエントリーを削除してもよろしいですか?",upload_files:"ファイルをアップロード",uploading_files:"ファイルをアップロードしています",confirm_uploading_file:"以下のファイルを {folder} フォルダーに保存してもよろしいですか?",confirm_uploading_files:"以下の {number} ファイルを {folder} フォルダーに保存してもよろしいですか?",no_entries_created:"このコレクションにはまだエントリーがありません。",create_new_entry:"新しいエントリーを作成",no_files_created:"このコレクションにはファイルがありません。",multi_files_selected:"複数のファイルが選択されています。",select_asset_show_info:"ファイルを選択すると情報が表示されます。",creating_x:"{name} を作成",editing_x:"{name} を編集",show_preview:"プレビューを表示",sync_scrolling:"スクロールを同期",edit:"編集",preview:"プレビュー",unsupported_widget_x:"非対応ウィジェット: {name}",copy_from:"他の言語からコピー…",copy_from_x:"{locale} からコピー",translate_from:"他の言語から翻訳…",translate_from_x:"{locale} から翻訳",revert_changes:"変更を取り消す",revert_all_changes:"すべての変更を取り消す",required:"必須",validation:{value_missing:"この項目は必須です。",range_underflow:"少なくとも {min} 個の項目を選択してください。",range_overflow:"選択できるのは最大で {max} 項目です。"},saving_entry:{error:{title:"エラー",description:"エントリーを保存中に問題が発生しました。後で再度お試しください。"}},no_preview_available:"プレビューは表示できません",public_url:"公開 URL",file_path:"ファイルパス",kind:"種類",size:"サイズ",dimensions:"大きさ",duration:"再生時間",used_in:"使われているエントリー",move_up:"上へ移動",move_down:"下へ移動",today:"今日",current_time:"現在時刻",add_x:"{name} を追加",drag_to_sort_items:"ドラッグしてアイテムを並び替え",select_file:"ファイルを選択",select_image:"画像を選択",select_from_library:"ライブラリから選択",library_locations:{this_repository:"このレポジトリ",external_locations:"外部の場所",stock_photos:"ストックフォト"},enter_url:"URL を入力",enter_image_url:"画像の URL を入力:",insert_stock_photo:"ストックフォトを挿入",large_file:{title:"大きなファイル",description:"このファイルは最大サイズ {size} を超えています。他のファイルを選んでください。"},photo_credit:{title:"写真クレジット",description:"可能であれば以下のクレジットを使ってください:"},boolean:{true:"はい",false:"いいえ"},stock_photos:{not_found:"写真は見つかりませんでした。",error:{invalid_key:"あなたの API Key は正しくないか期限切れです。確認の上、再度お試しください。",search_fetch_failed:"写真を検索中に問題が発生しました。後で再度お試しください。",image_fetch_failed:"選択された写真をダウンロード中に問題が発生しました。後で再度お試しください。"}},config:{error:{fetch_failed:"設定ファイルを読み込めませんでした。",parse_failed:"設定ファイルを解析できませんでした。",no_collection:"設定ファイル内でコレクションが定義されていません。",no_backend:"設定ファイル内でバックエンドが定義されていません。",unsupported_backend:"設定されている「{name}」バックエンドは非対応です。",no_media_folder:"設定ファイル内でメディアフォルダーが定義されていません。",unexpected:"設定ファイルを検証中に予期せぬ問題が発生しました。",try_again:"問題を解決してから再度お試しください。"}},unsupported:{browser:"お使いのブラウザーはローカル開発に対応していません。代わりに Chrome か Edge を使ってください。",storage:"お使いのブラウザーでローカルストレージが無効化されています。プライバシー (クッキー) 設定を確認の上、再度お試しください。",unexpected:"ログイン中に予期せぬ問題が発生しました。後で再度お試しください。"},general:"一般",status:{drafts:"下書き",in_review:"レビュー中",ready:"公開可"},prefs:{error:{permission_denied:"ブラウザーストレージ (Cookie) アクセスが拒否されました。許可設定を確認の上、再度お試しください。"},appearance:{title:"アピアランス",theme:"テーマ"},theme:{auto:"自動",dark:"ダーク",light:"ライト"},languages:{title:"言語",ui_language:{title:"ユーザーインターフェース言語"},translator:{title:"{service} 翻訳",field_label:"{service} API 認証キー",description:"<a {homeHref}>{service} API</a> にユーザー登録して、<a {apiKeyHref}>発行された認証キー</a> をここに入力すると、テキストエントリー項目の素早い翻訳が可能となります。"}},media:{title:"メディア",stock_photo:{title:"{service} 無料画像素材",field_label:"{service} API キー",description:"<a {homeHref}>{service} API</a> にユーザー登録して、<a {apiKeyHref}>発行された API キー</a> をここに入力すると、画像エントリー項目に無料のストックフォトを挿入できます。",credit:"写真提供: {service}"}},advanced:{title:"詳細",developer_mode:{title:"開発者モード",description:"詳細なコンソールログやネイティブコンテキストメニューなど、いくつかの機能を有効化します。",switch_label:"開発者モードを有効にする"}}},file_type_labels:{avif:"AVIF 画像",bmp:"Bitmap 画像",gif:"GIF 画像",ico:"アイコン",jpeg:"JPEG 画像",jpg:"JPEG 画像",png:"PNG 画像",svg:"SVG 画像",tiff:"TIFF 画像",webp:"WebP 画像",avi:"AVI 動画",mp4:"MP4 動画",mpeg:"MPEG 動画",ogv:"OGG 動画",ts:"MPEG 動画",webm:"WebM 動画","3gp":"3GPP 動画","3g2":"3GPP2 動画",aac:"AAC 音声",mid:"MIDI",midi:"MIDI",mp3:"MP3 音声",opus:"OPUS 音声",wav:"WAV 音声",weba:"WebM 音声",csv:"CSV スプレッドシート",doc:"Word ドキュメント",docx:"Word ドキュメント",odp:"OpenDocument プレゼンテーション",ods:"OpenDocument スプレッドシート",odt:"OpenDocument テキスト",pdf:"PDF ドキュメント",ppt:"PowerPoint プレゼンテーション",pptx:"PowerPoint プレゼンテーション",rtf:"リッチテキストドキュメント",xls:"Excel スプレッドシート",xlsx:"Excel スプレッドシート"}},TP=Object.freeze(Object.defineProperty({__proto__:null,strings:EP},Symbol.toStringTag,{value:"Module"})),AP=()=>{Object.entries(Object.assign({"../locales/en.js":SP,"../locales/ja.js":TP})).forEach(([e,{strings:s}])=>{const[,n]=e.match(/([a-zA-Z-]+)\.js/);ld(n,s)}),c0({fallbackLocale:"en",initialLocale:(K2()||"").split("-")[0]||"en"})},ni=t=>{try{return new Intl.DisplayNames(ne(Tn),{type:"language"}).of(t)}catch{return t}};function D_(t,e,s){const n=t.slice();return n[18]=e[s],n}function M_(t){let e,s;function n(){return t[14](t[18])}return e=new Wt({props:{label:t[5](t[1]?"translate_from_x":"copy_from_x",{values:{locale:ni(t[18])}}),disabled:t[1]&&(!t[3].includes(t[0].toUpperCase())||!t[2].includes(t[18].toUpperCase()))}}),e.$on("click",n),{c(){T(e.$$.fragment)},m(r,i){S(e,r,i),s=!0},p(r,i){t=r;const l={};i&50&&(l.label=t[5](t[1]?"translate_from_x":"copy_from_x",{values:{locale:ni(t[18])}})),i&31&&(l.disabled=t[1]&&(!t[3].includes(t[0].toUpperCase())||!t[2].includes(t[18].toUpperCase()))),e.$set(l)},i(r){s||(p(e.$$.fragment,r),s=!0)},o(r){_(e.$$.fragment,r),s=!1},d(r){E(e,r)}}}function OP(t){let e,s,n=ae(t[4]),r=[];for(let l=0;l<n.length;l+=1)r[l]=M_(D_(t,n,l));const i=l=>_(r[l],1,1,()=>{r[l]=null});return{c(){for(let l=0;l<r.length;l+=1)r[l].c();e=J()},m(l,o){for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(l,o);w(l,e,o),s=!0},p(l,[o]){if(o&127){n=ae(l[4]);let a;for(a=0;a<n.length;a+=1){const u=D_(l,n,a);r[a]?(r[a].p(u,o),p(r[a],1)):(r[a]=M_(u),r[a].c(),p(r[a],1),r[a].m(e.parentNode,e))}for(H(),a=n.length;a<r.length;a+=1)i(a);V()}},i(l){if(!s){for(let o=0;o<n.length;o+=1)p(r[o]);s=!0}},o(l){r=r.filter(Boolean);for(let o=0;o<r.length;o+=1)_(r[o]);s=!1},d(l){l&&k(e),fs(r,l)}}}function LP(t,e,s){let n,r,i,l,o,a,u,c,f,d,h,m,g;U(t,Bl,O=>s(16,c=O)),U(t,jl,O=>s(17,f=O)),U(t,mt,O=>s(11,d=O)),U(t,Va,O=>s(12,h=O)),U(t,Ue,O=>s(13,m=O)),U(t,_e,O=>s(5,g=O));let{locale:b=""}=e,{keyPath:y=""}=e,{translate:v=!1}=e;const $=async O=>{v&&!u?(De(jl,f=!0,f),De(Bl,c=[O,b,y,v],c)):Yk(O,b,y,v)},C=O=>{$(O)};return t.$$set=O=>{"locale"in O&&s(0,b=O.locale),"keyPath"in O&&s(7,y=O.keyPath),"translate"in O&&s(1,v=O.translate)},t.$$.update=()=>{t.$$.dirty&8192&&s(10,{hasLocales:n,locales:r}=m.collection._i18n,n,(s(9,r),s(13,m))),t.$$.dirty&1537&&s(4,i=n?r.filter(O=>O!==b):[]),t.$$.dirty&4096&&s(8,{serviceId:l,sourceLanguages:o=[],targetLanguages:a=[]}=h||{serviceId:void 0,sourceLanguages:void 0,targetLanguages:void 0},l,(s(3,o),s(12,h)),(s(2,a),s(12,h))),t.$$.dirty&2304&&(u=d.apiKeys[l]||"")},[b,v,a,o,i,g,$,y,l,r,n,d,h,m,C]}class Ya extends X{constructor(e){super(),Z(this,e,LP,OP,W,{locale:0,keyPath:7,translate:1})}}function NP(t){ge(t,"svelte-37f1h5",'.header.svelte-37f1h5{flex:none !important;background-color:var(--sui-tertiary-background-color)}.header.svelte-37f1h5>[role="toolbar"]{margin-right:auto;margin-left:auto;max-width:800px}.header.svelte-37f1h5>[role="toolbar"] h3{font-size:var(--sui-font-size-default)}.header.svelte-37f1h5>[role="toolbar"] button.error{color:var(--sui-error-foreground-color)}')}function R_(t,e,s){const n=t.slice();n[21]=e[s];const r=ni(n[21]);n[22]=r;const i=Object.values(n[9][n[21]]).some(({valid:l})=>!l);return n[23]=i,n}function PP(t){let e,s=(t[5].mode==="preview"?t[11]("preview"):t[11]("edit"))+"",n;return{c(){e=P("h3"),n=Y(s)},m(r,i){w(r,e,i),N(e,n)},p(r,i){i&2080&&s!==(s=(r[5].mode==="preview"?r[11]("preview"):r[11]("edit"))+"")&&G(n,s)},i:K,o:K,d(r){r&&k(e)}}}function IP(t){let e,s;return e=new od({props:{$$slots:{default:[DP]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&67116840&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function F_(t){let e,s;function n(){return t[18](t[21])}return e=new Wl({props:{selected:t[5].mode==="edit"&&t[5].locale===t[21],class:"tertiary small "+(t[23]?"error":""),label:t[22],$$slots:{default:[CP]},$$scope:{ctx:t}}}),e.$on("click",n),{c(){T(e.$$.fragment)},m(r,i){S(e,r,i),s=!0},p(r,i){t=r;const l={};i&40&&(l.selected=t[5].mode==="edit"&&t[5].locale===t[21]),i&520&&(l.class="tertiary small "+(t[23]?"error":"")),i&8&&(l.label=t[22]),i&67111432&&(l.$$scope={dirty:i,ctx:t}),e.$set(l)},i(r){s||(p(e.$$.fragment,r),s=!0)},o(r){_(e.$$.fragment,r),s=!1},d(r){E(e,r)}}}function U_(t){let e,s;return e=new ke({props:{slot:"end-icon",name:"error",label:t[11]("error")}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&2048&&(i.label=n[11]("error")),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function CP(t){let e,s,n=t[23]&&U_(t);return{c(){n&&n.c(),e=J()},m(r,i){n&&n.m(r,i),w(r,e,i),s=!0},p(r,i){r[23]?n?(n.p(r,i),i&520&&p(n,1)):(n=U_(r),n.c(),p(n,1),n.m(e.parentNode,e)):n&&(H(),_(n,1,1,()=>{n=null}),V())},i(r){s||(p(n),s=!0)},o(r){_(n),s=!1},d(r){r&&k(e),n&&n.d(r)}}}function j_(t){let e,s,n=!(t[10].mode==="edit"&&t[10].locale===t[21])&&F_(t);return{c(){n&&n.c(),e=J()},m(r,i){n&&n.m(r,i),w(r,e,i),s=!0},p(r,i){r[10].mode==="edit"&&r[10].locale===r[21]?n&&(H(),_(n,1,1,()=>{n=null}),V()):n?(n.p(r,i),i&1032&&p(n,1)):(n=F_(r),n.c(),p(n,1),n.m(e.parentNode,e))},i(r){s||(p(n),s=!0)},o(r){_(n),s=!1},d(r){r&&k(e),n&&n.d(r)}}}function B_(t){let e,s;return e=new Wl({props:{selected:t[5].mode==="preview",class:"tertiary small",label:t[11]("preview")}}),e.$on("click",t[19]),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&32&&(i.selected=n[5].mode==="preview"),r&2048&&(i.label=n[11]("preview")),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function DP(t){let e,s,n,r=ae(t[3]),i=[];for(let a=0;a<r.length;a+=1)i[a]=j_(R_(t,r,a));const l=a=>_(i[a],1,1,()=>{i[a]=null});let o=t[10].mode==="edit"&&t[8]&&t[12].showPreview&&B_(t);return{c(){for(let a=0;a<i.length;a+=1)i[a].c();e=R(),o&&o.c(),s=J()},m(a,u){for(let c=0;c<i.length;c+=1)i[c]&&i[c].m(a,u);w(a,e,u),o&&o.m(a,u),w(a,s,u),n=!0},p(a,u){if(u&3624){r=ae(a[3]);let c;for(c=0;c<r.length;c+=1){const f=R_(a,r,c);i[c]?(i[c].p(f,u),p(i[c],1)):(i[c]=j_(f),i[c].c(),p(i[c],1),i[c].m(e.parentNode,e))}for(H(),c=r.length;c<i.length;c+=1)l(c);V()}a[10].mode==="edit"&&a[8]&&a[12].showPreview?o?(o.p(a,u),u&5376&&p(o,1)):(o=B_(a),o.c(),p(o,1),o.m(s.parentNode,s)):o&&(H(),_(o,1,1,()=>{o=null}),V())},i(a){if(!n){for(let u=0;u<r.length;u+=1)p(i[u]);p(o),n=!0}},o(a){i=i.filter(Boolean);for(let u=0;u<i.length;u+=1)_(i[u]);_(o),n=!1},d(a){a&&(k(e),k(s)),fs(i,a),o&&o.d(a)}}}function z_(t){let e,s;return e=new er({props:{class:"ghost iconic",popupPosition:"bottom-right",$$slots:{popup:[FP],"start-icon":[MP]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&67111140&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function MP(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"more_vert",label:t[11]("show_menu")}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&2048&&(i.label=n[11]("show_menu")),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function H_(t){let e,s,n,r,i,l,o;e=new Ya({props:{locale:t[5].locale,translate:!0}});let a=t[2].length>1&&V_();return r=new Ya({props:{locale:t[5].locale}}),l=new wn({}),{c(){T(e.$$.fragment),s=R(),a&&a.c(),n=R(),T(r.$$.fragment),i=R(),T(l.$$.fragment)},m(u,c){S(e,u,c),w(u,s,c),a&&a.m(u,c),w(u,n,c),S(r,u,c),w(u,i,c),S(l,u,c),o=!0},p(u,c){const f={};c&32&&(f.locale=u[5].locale),e.$set(f),u[2].length>1?a?c&4&&p(a,1):(a=V_(),a.c(),p(a,1),a.m(n.parentNode,n)):a&&(H(),_(a,1,1,()=>{a=null}),V());const d={};c&32&&(d.locale=u[5].locale),r.$set(d)},i(u){o||(p(e.$$.fragment,u),p(a),p(r.$$.fragment,u),p(l.$$.fragment,u),o=!0)},o(u){_(e.$$.fragment,u),_(a),_(r.$$.fragment,u),_(l.$$.fragment,u),o=!1},d(u){u&&(k(s),k(n),k(i)),E(e,u),a&&a.d(u),E(r,u),E(l,u)}}}function V_(t){let e,s;return e=new wn({}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function RP(t){let e,s,n,r=t[7]&&H_(t);return s=new Wt({props:{label:t[11]("revert_changes"),disabled:!t[6]}}),s.$on("click",t[20]),{c(){r&&r.c(),e=R(),T(s.$$.fragment)},m(i,l){r&&r.m(i,l),w(i,e,l),S(s,i,l),n=!0},p(i,l){i[7]?r?(r.p(i,l),l&128&&p(r,1)):(r=H_(i),r.c(),p(r,1),r.m(e.parentNode,e)):r&&(H(),_(r,1,1,()=>{r=null}),V());const o={};l&2048&&(o.label=i[11]("revert_changes")),l&64&&(o.disabled=!i[6]),s.$set(o)},i(i){n||(p(r),p(s.$$.fragment,i),n=!0)},o(i){_(r),_(s.$$.fragment,i),n=!1},d(i){i&&k(e),r&&r.d(i),E(s,i)}}}function FP(t){let e,s;return e=new Ls({props:{slot:"popup",$$slots:{default:[RP]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&67111140&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function UP(t){let e,s,n,r,i,l,o;const a=[IP,PP],u=[];function c(d,h){return d[4]?0:1}e=c(t),s=u[e]=a[e](t),r=new _n({props:{flex:!0}});let f=t[5].mode==="edit"&&z_(t);return{c(){s.c(),n=R(),T(r.$$.fragment),i=R(),f&&f.c(),l=J()},m(d,h){u[e].m(d,h),w(d,n,h),S(r,d,h),w(d,i,h),f&&f.m(d,h),w(d,l,h),o=!0},p(d,h){let m=e;e=c(d),e===m?u[e].p(d,h):(H(),_(u[m],1,1,()=>{u[m]=null}),V(),s=u[e],s?s.p(d,h):(s=u[e]=a[e](d),s.c()),p(s,1),s.m(n.parentNode,n)),d[5].mode==="edit"?f?(f.p(d,h),h&32&&p(f,1)):(f=z_(d),f.c(),p(f,1),f.m(l.parentNode,l)):f&&(H(),_(f,1,1,()=>{f=null}),V())},i(d){o||(p(s),p(r.$$.fragment,d),p(f),o=!0)},o(d){_(s),_(r.$$.fragment,d),_(f),o=!1},d(d){d&&(k(n),k(i),k(l)),u[e].d(d),E(r,d),f&&f.d(d)}}}function jP(t){let e,s,n;return s=new tr({props:{class:"secondary",$$slots:{default:[UP]},$$scope:{ctx:t}}}),{c(){e=P("div"),T(s.$$.fragment),M(e,"class","header svelte-37f1h5")},m(r,i){w(r,e,i),S(s,e,null),n=!0},p(r,[i]){const l={};i&67117052&&(l.$$scope={dirty:i,ctx:r}),s.$set(l)},i(r){n||(p(s.$$.fragment,r),n=!0)},o(r){_(s.$$.fragment,r),n=!1},d(r){r&&k(e),E(s)}}}function BP(t,e,s){let n,r,i,l,o,a,u,c,f,d,h,m,g=K,b=()=>(g(),g=Mn(I,Q=>s(5,m=Q)),I),y,v,$=K,C=()=>($(),$=Mn(D,Q=>s(10,v=Q)),D),O,A;U(t,Ue,Q=>s(17,y=Q)),U(t,_e,Q=>s(11,O=Q)),U(t,yr,Q=>s(12,A=Q)),t.$$.on_destroy.push(()=>g()),t.$$.on_destroy.push(()=>$());let{thisPane:I=Me({})}=e;b();let{thatPane:D=Me({})}=e;C();const L=Q=>{De(I,m={mode:"edit",locale:Q},m),v.mode==="preview"&&De(D,v={mode:"preview",locale:Q},v)},B=()=>{De(I,m={mode:"preview",locale:v.locale},m)},z=()=>{sh(m.locale)};return t.$$set=Q=>{"thisPane"in Q&&b(s(0,I=Q.thisPane)),"thatPane"in Q&&C(s(1,D=Q.thatPane))},t.$$.update=()=>{var Q,F;t.$$.dirty&131072&&s(16,{collection:n,collectionFile:r,currentValues:i,originalValues:l,validities:o}=y||{collection:void 0,collectionFile:void 0,currentValues:void 0,originalValues:void 0,validities:void 0},n,(s(15,r),s(17,y)),(s(14,i),s(17,y)),(s(13,l),s(17,y)),(s(9,o),s(17,y))),t.$$.dirty&65536&&s(4,{hasLocales:a,locales:u}=n._i18n,a,(s(3,u),s(16,n),s(17,y))),t.$$.dirty&56&&s(2,c=a?u.filter(te=>te!==m.locale):[]),t.$$.dirty&98304&&s(8,f=((Q=n==null?void 0:n.editor)==null?void 0:Q.preview)!==!1&&((F=r==null?void 0:r.editor)==null?void 0:F.preview)!==!1),t.$$.dirty&4&&s(7,d=!!c.length),t.$$.dirty&24608&&s(6,h=!Un(i[m.locale],l[m.locale]))},[I,D,c,u,a,m,h,d,f,o,v,O,A,l,i,r,n,y,L,B,z]}class Gk extends X{constructor(e){super(),Z(this,e,BP,jP,W,{thisPane:0,thatPane:1},NP)}}function zP(t){let e,s,n;function r(l){t[8](l)}let i={disabled:t[1]};return t[0]!==void 0&&(i.checked=t[0]),e=new l0({props:i}),de.push(()=>We(e,"checked",r)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&2&&(a.disabled=l[1]),!s&&o&1&&(s=!0,a.checked=l[0],Ke(()=>s=!1)),e.$set(a)},i(l){n||(p(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function HP(t,e,s){let n,r,i,l;U(t,Ue,d=>s(7,l=d));let{locale:o=""}=e,{keyPath:a=""}=e,{fieldConfig:u=void 0}=e,{currentValue:c=void 0}=e;function f(d){c=d,s(0,c)}return t.$$set=d=>{"locale"in d&&s(2,o=d.locale),"keyPath"in d&&s(3,a=d.keyPath),"fieldConfig"in d&&s(4,u=d.fieldConfig),"currentValue"in d&&s(0,c=d.currentValue)},t.$$.update=()=>{t.$$.dirty&16&&s(6,{i18n:n}=u,n),t.$$.dirty&128&&s(5,{defaultLocale:r="default"}=l.collection._i18n,r),t.$$.dirty&100&&s(1,i=n==="duplicate"&&o!==r)},[c,i,o,a,u,r,n,l,f]}class VP extends X{constructor(e){super(),Z(this,e,HP,zP,W,{locale:2,keyPath:3,fieldConfig:4,currentValue:0})}}function YP(t){ge(t,"svelte-1r23g0y","div.svelte-1r23g0y.svelte-1r23g0y{display:flex;align-items:center;gap:8px}div.svelte-1r23g0y .value.svelte-1r23g0y{flex:auto}")}function GP(t){let e=(t[0]||"")+"",s;return{c(){s=Y(e)},m(n,r){w(n,s,r)},p(n,r){r&1&&e!==(e=(n[0]||"")+"")&&G(s,e)},i:K,o:K,d(n){n&&k(s)}}}function WP(t){let e,s,n;function r(l){t[11](l)}let i={};return t[0]!==void 0&&(i.value=t[0]),e=new hs({props:i}),de.push(()=>We(e,"value",r)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,o){const a={};!s&&o&1&&(s=!0,a.value=l[0],Ke(()=>s=!1)),e.$set(a)},i(l){n||(p(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function qP(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"delete",label:t[3]("clear")}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&8&&(i.label=n[3]("clear")),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function KP(t){let e,s,n,r,i,l,o,a,u,c,f;const d=[WP,GP],h=[];function m(g,b){return g[2]?0:1}return i=m(t),l=h[i]=d[i](t),a=new Ie({props:{class:"tertiary iconic",disabled:!t[0],$$slots:{"start-icon":[qP]},$$scope:{ctx:t}}}),a.$on("click",t[12]),{c(){e=P("div"),s=P("input"),n=R(),r=P("span"),l.c(),o=R(),T(a.$$.fragment),M(s,"type","color"),s.disabled=t[1],M(r,"class","value svelte-1r23g0y"),M(e,"class","svelte-1r23g0y")},m(g,b){w(g,e,b),N(e,s),Xn(s,t[0]),N(e,n),N(e,r),h[i].m(r,null),N(e,o),S(a,e,null),u=!0,c||(f=Ce(s,"input",t[10]),c=!0)},p(g,[b]){(!u||b&2)&&(s.disabled=g[1]),b&1&&Xn(s,g[0]);let y=i;i=m(g),i===y?h[i].p(g,b):(H(),_(h[y],1,1,()=>{h[y]=null}),V(),l=h[i],l?l.p(g,b):(l=h[i]=d[i](g),l.c()),p(l,1),l.m(r,null));const v={};b&1&&(v.disabled=!g[0]),b&8200&&(v.$$scope={dirty:b,ctx:g}),a.$set(v)},i(g){u||(p(l),p(a.$$.fragment,g),u=!0)},o(g){_(l),_(a.$$.fragment,g),u=!1},d(g){g&&k(e),h[i].d(),E(a),c=!1,f()}}}function ZP(t,e,s){let n,r,i,l,o,a;U(t,Ue,b=>s(9,o=b)),U(t,_e,b=>s(3,a=b));let{locale:u=""}=e,{keyPath:c=""}=e,{fieldConfig:f=void 0}=e,{currentValue:d=void 0}=e;function h(){d=this.value,s(0,d)}function m(b){d=b,s(0,d)}const g=()=>{s(0,d="")};return t.$$set=b=>{"locale"in b&&s(4,u=b.locale),"keyPath"in b&&s(5,c=b.keyPath),"fieldConfig"in b&&s(6,f=b.fieldConfig),"currentValue"in b&&s(0,d=b.currentValue)},t.$$.update=()=>{t.$$.dirty&64&&s(8,{i18n:n,allowInput:r=!1}=f,n,(s(2,r),s(6,f))),t.$$.dirty&512&&s(7,{defaultLocale:i="default"}=o.collection._i18n,i),t.$$.dirty&400&&s(1,l=n==="duplicate"&&u!==i)},[d,l,r,a,u,c,f,i,n,o,h,m,g]}class XP extends X{constructor(e){super(),Z(this,e,ZP,KP,W,{locale:4,keyPath:5,fieldConfig:6,currentValue:0},YP)}}//! moment.js
|
|
447
|
+
`),b=Y(g),y=R(),T(v.$$.fragment),$=R(),M(o,"class","name"),M(f,"class","size svelte-v02e1d"),M(l,"class","meta svelte-v02e1d"),M(e,"class","file svelte-v02e1d")},m(L,B){w(L,e,B),A[n].m(e,null),N(e,i),N(e,l),N(l,o),N(o,u),N(l,c),N(l,f),N(f,h),N(f,m),N(f,b),N(e,y),S(v,e,null),N(e,$),C=!0},p(L,B){t=L;let z=n;n=I(t,B),n===z?A[n].p(t,B):(H(),_(A[z],1,1,()=>{A[z]=null}),V(),r=A[n],r?r.p(t,B):(r=A[n]=O[n](t),r.c()),p(r,1),r.m(e,i)),(!C||B&1)&&a!==(a=t[4]+"")&&G(u,a),(!C||B&1)&&d!==(d=el(t[6])+"")&&G(h,d),(!C||B&3)&&g!==(g=t[1](`file_type_labels.${t[7]}`,{default:t[7].toUpperCase()})+"")&&G(b,g);const Q={};B&1026&&(Q.$$scope={dirty:B,ctx:t}),v.$set(Q)},i(L){C||(p(r),p(v.$$.fragment,L),C=!0)},o(L){_(r),_(v.$$.fragment,L),C=!1},d(L){L&&k(e),A[n].d(),E(v)}}}function yN(t){let e,s,n=ae(t[0]),r=[];for(let l=0;l<n.length;l+=1)r[l]=l_(i_(t,n,l));const i=l=>_(r[l],1,1,()=>{r[l]=null});return{c(){e=P("div");for(let l=0;l<r.length;l+=1)r[l].c();M(e,"class","files svelte-v02e1d")},m(l,o){w(l,e,o);for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(e,null);s=!0},p(l,[o]){if(o&3){n=ae(l[0]);let a;for(a=0;a<n.length;a+=1){const u=i_(l,n,a);r[a]?(r[a].p(u,o),p(r[a],1)):(r[a]=l_(u),r[a].c(),p(r[a],1),r[a].m(e,null))}for(H(),a=n.length;a<r.length;a+=1)i(a);V()}},i(l){if(!s){for(let o=0;o<n.length;o+=1)p(r[o]);s=!0}},o(l){r=r.filter(Boolean);for(let o=0;o<r.length;o+=1)_(r[o]);s=!1},d(l){l&&k(e),fs(r,l)}}}function kN(t,e,s){let n;U(t,_e,l=>s(1,n=l));let{files:r=[]}=e;const i=(l,o)=>{o.stopPropagation(),r.splice(l,1),s(0,r)};return t.$$set=l=>{"files"in l&&s(0,r=l.files)},[r,n,i]}class th extends X{constructor(e){super(),Z(this,e,kN,yN,W,{files:0},mN)}}function wN(t){ge(t,"svelte-f569ze",".drop-target.svelte-f569ze.svelte-f569ze{display:flex;flex-direction:column;height:100%;position:relative;overflow:auto;pointer-events:auto}.drop-target.svelte-f569ze .svelte-f569ze{pointer-events:none}.drop-indicator.svelte-f569ze.svelte-f569ze{position:absolute;inset:0;z-index:10;background-color:hsl(var(--sui-background-color-4-hsl)/80%);backdrop-filter:blur(8px);pointer-events:none}.drop-indicator.svelte-f569ze div.svelte-f569ze{position:absolute;inset:32px;display:flex;justify-content:center;align-items:center;font-size:var(--sui-font-size-xxx-large);border-width:8px;border-style:dashed;border-color:var(--sui-primary-accent-color-foreground);border-radius:8px}.content.svelte-f569ze.svelte-f569ze{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;overflow:auto;height:100%;min-height:320px}")}function vN(t){let e,s,n,r=t[2]&&o_(t),i=t[3]&&t[5].length&&a_(t);return{c(){e=P("div"),r&&r.c(),s=R(),i&&i.c(),M(e,"class","content svelte-f569ze")},m(l,o){w(l,e,o),r&&r.m(e,null),N(e,s),i&&i.m(e,null),n=!0},p(l,o){l[2]?r?(r.p(l,o),o&4&&p(r,1)):(r=o_(l),r.c(),p(r,1),r.m(e,s)):r&&(H(),_(r,1,1,()=>{r=null}),V()),l[3]&&l[5].length?i?(i.p(l,o),o&40&&p(i,1)):(i=a_(l),i.c(),p(i,1),i.m(e,null)):i&&(H(),_(i,1,1,()=>{i=null}),V())},i(l){n||(p(r),p(i),n=!0)},o(l){_(r),_(i),n=!1},d(l){l&&k(e),r&&r.d(),i&&i.d()}}}function $N(t){let e;const s=t[11].default,n=Ae(s,t,t[21],null);return{c(){n&&n.c()},m(r,i){n&&n.m(r,i),e=!0},p(r,i){n&&n.p&&(!e||i&2097152)&&Le(n,s,r,r[21],e?Oe(s,r[21],i,null):Ne(r[21]),null)},i(r){e||(p(n,r),e=!0)},o(r){_(n,r),e=!1},d(r){n&&n.d(r)}}}function SN(t){let e,s,n,r;function i(o){t[12](o)}let l={};return t[5]!==void 0&&(l.files=t[5]),s=new th({props:l}),de.push(()=>We(s,"files",i)),{c(){e=P("div"),T(s.$$.fragment),M(e,"class","content svelte-f569ze")},m(o,a){w(o,e,a),S(s,e,null),r=!0},p(o,a){const u={};!n&&a&32&&(n=!0,u.files=o[5],Ke(()=>n=!1)),s.$set(u)},i(o){r||(p(s.$$.fragment,o),r=!0)},o(o){_(s.$$.fragment,o),r=!1},d(o){o&&k(e),E(s)}}}function o_(t){let e,s=t[8]("drop_files_or_browse")+"",n,r,i,l,o;return l=new Ie({props:{class:"primary",label:t[8]("upload"),$$slots:{"start-icon":[EN]},$$scope:{ctx:t}}}),l.$on("click",t[13]),{c(){e=P("div"),n=Y(s),r=R(),i=P("div"),T(l.$$.fragment),M(e,"class","svelte-f569ze"),M(i,"class","svelte-f569ze")},m(a,u){w(a,e,u),N(e,n),w(a,r,u),w(a,i,u),S(l,i,null),o=!0},p(a,u){(!o||u&256)&&s!==(s=a[8]("drop_files_or_browse")+"")&&G(n,s);const c={};u&256&&(c.label=a[8]("upload")),u&2097152&&(c.$$scope={dirty:u,ctx:a}),l.$set(c)},i(a){o||(p(l.$$.fragment,a),o=!0)},o(a){_(l.$$.fragment,a),o=!1},d(a){a&&(k(e),k(r),k(i)),E(l)}}}function EN(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"cloud_upload"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function a_(t){let e,s,n;function r(l){t[14](l)}let i={};return t[5]!==void 0&&(i.files=t[5]),e=new th({props:i}),de.push(()=>We(e,"files",r)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,o){const a={};!s&&o&32&&(s=!0,a.files=l[5],Ke(()=>s=!1)),e.$set(a)},i(l){n||(p(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function u_(t){let e,s,n=t[8]("drop_files_here")+"",r;return{c(){e=P("div"),s=P("div"),r=Y(n),M(s,"class","svelte-f569ze"),M(e,"class","drop-indicator svelte-f569ze")},m(i,l){w(i,e,l),N(e,s),N(s,r)},p(i,l){l&256&&n!==(n=i[8]("drop_files_here")+"")&&G(r,n)},d(i){i&&k(e)}}}function TN(t){let e,s,n,r,i,l,o,a,u;const c=[SN,$N,vN],f=[];function d(g,b){return!g[2]&&g[3]&&g[5].length?0:g[10].default?1:2}s=d(t),n=f[s]=c[s](t);let h=t[6]&&u_(t),m={accept:t[0],multiple:t[1]};return l=new eh({props:m}),t[19](l),l.$on("change",t[20]),{c(){e=P("div"),n.c(),r=R(),h&&h.c(),i=R(),T(l.$$.fragment),M(e,"class","drop-target svelte-f569ze"),M(e,"role","none")},m(g,b){w(g,e,b),f[s].m(e,null),N(e,r),h&&h.m(e,null),w(g,i,b),S(l,g,b),o=!0,a||(u=[Ce(e,"dragover",Hs(t[15])),Ce(e,"dragleave",Hs(t[16])),Ce(e,"dragend",Hs(t[17])),Ce(e,"drop",Hs(t[18]))],a=!0)},p(g,[b]){let y=s;s=d(g),s===y?f[s].p(g,b):(H(),_(f[y],1,1,()=>{f[y]=null}),V(),n=f[s],n?n.p(g,b):(n=f[s]=c[s](g),n.c()),p(n,1),n.m(e,r)),g[6]?h?h.p(g,b):(h=u_(g),h.c(),h.m(e,null)):h&&(h.d(1),h=null);const v={};b&1&&(v.accept=g[0]),b&2&&(v.multiple=g[1]),l.$set(v)},i(g){o||(p(n),p(l.$$.fragment,g),o=!0)},o(g){_(n),_(l.$$.fragment,g),o=!1},d(g){g&&(k(e),k(i)),f[s].d(),h&&h.d(),t[19](null),E(l,g),a=!1,on(u)}}}function AN(t,e,s){let n;U(t,_e,B=>s(8,n=B));let{$$slots:r={},$$scope:i}=e;const l=ro(r);let{accept:o=void 0}=e,{multiple:a=!1}=e,{showUploadButton:u=!1}=e,{showFilePreview:c=!1}=e;const f=xs();let d=!1,h,m=[];const g=()=>{h.open()},b=B=>{s(5,m=a?B:B.slice(0,1))};function y(B){m=B,s(5,m)}const v=()=>{g()};function $(B){m=B,s(5,m)}const C=({dataTransfer:B})=>{B.dropEffect="copy",s(6,d=!0)},O=()=>{s(6,d=!1)},A=()=>{s(6,d=!1)},I=async({dataTransfer:B})=>{s(6,d=!1),b(await NT(B,{accept:o}))};function D(B){de[B?"unshift":"push"](()=>{h=B,s(7,h)})}const L=({target:B})=>{b([...B.files])};return t.$$set=B=>{"accept"in B&&s(0,o=B.accept),"multiple"in B&&s(1,a=B.multiple),"showUploadButton"in B&&s(2,u=B.showUploadButton),"showFilePreview"in B&&s(3,c=B.showFilePreview),"$$scope"in B&&s(21,i=B.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&f("select",{files:m})},[o,a,u,c,g,m,d,h,n,b,l,r,y,v,$,C,O,A,I,D,L,i]}class Pu extends X{constructor(e){super(),Z(this,e,AN,TN,W,{accept:0,multiple:1,showUploadButton:2,showFilePreview:3,openFilePicker:4},wN)}get openFilePicker(){return this.$$.ctx[4]}}function ON(t){ge(t,"svelte-uo4tby",'.basic-grid-view.svelte-uo4tby{display:contents}.basic-grid-view.svelte-uo4tby .table-body{display:grid;grid-template-columns:repeat(auto-fill, minmax(var(--grid-size, 200px), 1fr));gap:16px;border-width:0}.basic-grid-view.svelte-uo4tby [role="row"]{position:relative;overflow:hidden;border-width:1px;border-style:solid;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);padding:0;height:auto;aspect-ratio:1/1;text-align:left;cursor:pointer}.basic-grid-view.svelte-uo4tby [role="row"] .table-cell{display:block;position:absolute}.basic-grid-view.svelte-uo4tby [role="row"] .checkbox{inset:16px auto auto 16px;z-index:2}.basic-grid-view.svelte-uo4tby [role="row"] .title{inset:auto 0 0 0;z-index:1;padding:16px 16px 16px 16px;background-color:hsl(var(--sui-background-color-4-hsl)/80%)}.basic-grid-view.svelte-uo4tby [role="row"] .title span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;height:40px;line-height:1.5}.basic-grid-view.svelte-uo4tby [role="row"] .image{inset:0;z-index:1}.basic-grid-view.svelte-uo4tby [role="row"][aria-selected="true"]{border-color:var(--sui-primary-accent-color)}')}function LN(t){let e;const s=t[0].default,n=Ae(s,t,t[1],null);return{c(){n&&n.c()},m(r,i){n&&n.m(r,i),e=!0},p(r,i){n&&n.p&&(!e||i&2)&&Le(n,s,r,r[1],e?Oe(s,r[1],i,null):Ne(r[1]),null)},i(r){e||(p(n,r),e=!0)},o(r){_(n,r),e=!1},d(r){n&&n.d(r)}}}function NN(t){let e,s;return e=new o0({props:{$$slots:{default:[LN]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&2&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function PN(t){let e,s,n;return s=new a0({props:{"aria-multiselectable":"true",$$slots:{default:[NN]},$$scope:{ctx:t}}}),{c(){e=P("div"),T(s.$$.fragment),M(e,"class","basic-grid-view svelte-uo4tby")},m(r,i){w(r,e,i),S(s,e,null),n=!0},p(r,[i]){const l={};i&2&&(l.$$scope={dirty:i,ctx:r}),s.$set(l)},i(r){n||(p(s.$$.fragment,r),n=!0)},o(r){_(s.$$.fragment,r),n=!1},d(r){r&&k(e),E(s)}}}function IN(t,e,s){let{$$slots:n={},$$scope:r}=e;return t.$$set=i=>{"$$scope"in i&&s(1,r=i.$$scope)},[n,r]}class Ha extends X{constructor(e){super(),Z(this,e,IN,PN,W,{},ON)}}function CN(t){ge(t,"svelte-1as64c",'.basic-list-view.svelte-1as64c{display:contents}.basic-list-view.svelte-1as64c [role="grid"] [role="row"]{width:100%;height:48px;cursor:pointer}.basic-list-view.svelte-1as64c [role="grid"] [role="row"]:hover{background-color:var(--sui-highlight-background-color)}.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"]{vertical-align:middle;overflow:hidden;text-overflow:ellipsis;height:40px;padding:0 8px;max-width:100%;color:var(--sui-secondary-foreground-color);white-space:nowrap}.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"] .label{overflow:hidden;text-overflow:ellipsis}.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"]:first-child{padding-left:16px}.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"]:last-child{padding-right:16px}.basic-list-view.svelte-1as64c [role="grid"] [role="row"] [role="gridcell"]{border-width:1px 0 0;border-color:var(--sui-control-border-color)}.basic-list-view.svelte-1as64c [role="grid"] [role="row"]:last-child [role="gridcell"]{border-width:1px 0}.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"].checkbox{width:16px}.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"].title{width:100%;color:var(--sui-primary-foreground-color)}.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"].image{width:32px}.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"].image img{background-color:var(--sui-primary-accent-color-foreground)}.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"].image img,.basic-list-view.svelte-1as64c [role="grid"] [role="gridcell"].image video{width:32px;height:32px;border-radius:var(--sui-control-medium-border-radius)}')}function DN(t){let e;const s=t[0].default,n=Ae(s,t,t[1],null);return{c(){n&&n.c()},m(r,i){n&&n.m(r,i),e=!0},p(r,i){n&&n.p&&(!e||i&2)&&Le(n,s,r,r[1],e?Oe(s,r[1],i,null):Ne(r[1]),null)},i(r){e||(p(n,r),e=!0)},o(r){_(n,r),e=!1},d(r){n&&n.d(r)}}}function MN(t){let e,s;return e=new o0({props:{$$slots:{default:[DN]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&2&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function RN(t){let e,s,n;return s=new a0({props:{$$slots:{default:[MN]},$$scope:{ctx:t}}}),{c(){e=P("div"),T(s.$$.fragment),M(e,"class","basic-list-view svelte-1as64c")},m(r,i){w(r,e,i),S(s,e,null),n=!0},p(r,[i]){const l={};i&2&&(l.$$scope={dirty:i,ctx:r}),s.$set(l)},i(r){n||(p(s.$$.fragment,r),n=!0)},o(r){_(s.$$.fragment,r),n=!1},d(r){r&&k(e),E(s)}}}function FN(t,e,s){let{$$slots:n={},$$scope:r}=e;return t.$$set=i=>{"$$scope"in i&&s(1,r=i.$$scope)},[n,r]}class ti extends X{constructor(e){super(),Z(this,e,FN,RN,W,{},CN)}}function c_(t,e,s){const n=t.slice();return n[7]=e[s][0],n[8]=e[s][1],n}function f_(t,e,s){const n=t.slice();return n[11]=e[s],n}function UN(t){let e,s;return e=new zn({props:{$$slots:{default:[BN]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&16416&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function jN(t){let e,s;return e=new Pu({props:{multiple:!0,$$slots:{default:[VN]},$$scope:{ctx:t}}}),e.$on("select",t[6]),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&16401&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function BN(t){let e,s=t[5]("no_files_found")+"",n;return{c(){e=P("span"),n=Y(s)},m(r,i){w(r,e,i),N(e,n)},p(r,i){i&32&&s!==(s=r[5]("no_files_found")+"")&&G(n,s)},d(r){r&&k(e)}}}function d_(t){let e,s=t[7]+"",n;return{c(){e=P("h3"),n=Y(s)},m(r,i){w(r,e,i),N(e,n)},p(r,i){i&1&&s!==(s=r[7]+"")&&G(n,s)},d(r){r&&k(e)}}}function h_(t,e){let s,n,r;return n=new dN({props:{asset:e[11]}}),{key:t,first:null,c(){s=J(),T(n.$$.fragment),this.first=s},m(i,l){w(i,s,l),S(n,i,l),r=!0},p(i,l){e=i;const o={};l&1&&(o.asset=e[11]),n.$set(o)},i(i){r||(p(n.$$.fragment,i),r=!0)},o(i){_(n.$$.fragment,i),r=!1},d(i){i&&k(s),E(n,i)}}}function zN(t){let e=[],s=new Map,n,r,i=ae(t[8]);const l=o=>o[11].path;for(let o=0;o<i.length;o+=1){let a=f_(t,i,o),u=l(a);s.set(u,e[o]=h_(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=J()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);w(o,n,a),r=!0},p(o,a){a&1&&(i=ae(o[8]),H(),e=pt(e,a,l,1,o,i,s,n.parentNode,ht,h_,n,f_),V())},i(o){if(!r){for(let a=0;a<i.length;a+=1)p(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)_(e[a]);r=!1},d(o){o&&k(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function HN(t){let e,s,n,r,i=t[7]!=="*"&&d_(t);var l=t[4].type==="list"?ti:Ha;function o(a,u){return{props:{$$slots:{default:[zN]},$$scope:{ctx:a}}}}return l&&(s=Kt(l,o(t))),{c(){i&&i.c(),e=R(),s&&T(s.$$.fragment),n=R()},m(a,u){i&&i.m(a,u),w(a,e,u),s&&S(s,a,u),w(a,n,u),r=!0},p(a,u){if(a[7]!=="*"?i?i.p(a,u):(i=d_(a),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null),u&16&&l!==(l=a[4].type==="list"?ti:Ha)){if(s){H();const c=s;_(c.$$.fragment,1,0,()=>{E(c,1)}),V()}l?(s=Kt(l,o(a)),T(s.$$.fragment),p(s.$$.fragment,1),S(s,n.parentNode,n)):s=null}else if(l){const c={};u&16385&&(c.$$scope={dirty:u,ctx:a}),s.$set(c)}},i(a){r||(s&&p(s.$$.fragment,a),r=!0)},o(a){s&&_(s.$$.fragment,a),r=!1},d(a){a&&(k(e),k(n)),i&&i.d(a),s&&E(s,a)}}}function p_(t,e){let s,n,r;return n=new gn({props:{$$slots:{default:[HN]},$$scope:{ctx:e}}}),{key:t,first:null,c(){s=J(),T(n.$$.fragment),this.first=s},m(i,l){w(i,s,l),S(n,i,l),r=!0},p(i,l){e=i;const o={};l&16401&&(o.$$scope={dirty:l,ctx:e}),n.$set(o)},i(i){r||(p(n.$$.fragment,i),r=!0)},o(i){_(n.$$.fragment,i),r=!1},d(i){i&&k(s),E(n,i)}}}function VN(t){let e=[],s=new Map,n,r,i=ae(Object.entries(t[0]));const l=o=>o[7];for(let o=0;o<i.length;o+=1){let a=c_(t,i,o),u=l(a);s.set(u,e[o]=p_(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=J()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);w(o,n,a),r=!0},p(o,a){a&17&&(i=ae(Object.entries(o[0])),H(),e=pt(e,a,l,1,o,i,s,n.parentNode,ht,p_,n,c_),V())},i(o){if(!r){for(let a=0;a<i.length;a+=1)p(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)_(e[a]);r=!1},d(o){o&&k(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function YN(t){let e,s,n,r,i;const l=[jN,UN],o=[];function a(u,c){return c&1&&(s=null),s==null&&(s=!!Object.values(u[0]).flat(1).length),s?0:1}return n=a(t,-1),r=o[n]=l[n](t),{c(){e=P("div"),r.c(),M(e,"class","list-container")},m(u,c){w(u,e,c),o[n].m(e,null),i=!0},p(u,[c]){let f=n;n=a(u,c),n===f?o[n].p(u,c):(H(),_(o[f],1,1,()=>{o[f]=null}),V(),r=o[n],r?r.p(u,c):(r=o[n]=l[n](u),r.c()),p(r,1),r.m(e,null))},i(u){i||(p(r),i=!0)},o(u){_(r),i=!1},d(u){u&&k(e),o[n].d()}}}function GN(t,e,s){let n,r,i,l,o,a;return U(t,Rk,c=>s(0,n=c)),U(t,Nn,c=>s(1,r=c)),U(t,rs,c=>s(2,i=c)),U(t,ct,c=>s(3,l=c)),U(t,Dn,c=>s(4,o=c)),U(t,_e,c=>s(5,a=c)),[n,r,i,l,o,a,({detail:{files:c}})=>{De(Nn,r={folder:i||l.media_folder,files:c},r)}]}class WN extends X{constructor(e){super(),Z(this,e,GN,YN,W,{})}}function m_(t,e,s){const n=t.slice();n[6]=e[s].collectionName,n[7]=e[s].internalPath;const r=n[7]===n[2];return n[8]=r,n}function qN(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"folder"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function __(t,e){let s,n,r;function i(){return e[4](e[7])}function l(...o){return e[5](e[7],e[8],...o)}return n=new ds({props:{selected:e[8],label:Ul(e[6]),$$slots:{"start-icon":[qN]},$$scope:{ctx:e}}}),n.$on("click",i),n.$on("dragover",l),n.$on("dragleave",JN),n.$on("dragend",QN),n.$on("drop",xN),{key:t,first:null,c(){s=J(),T(n.$$.fragment),this.first=s},m(o,a){w(o,s,a),S(n,o,a),r=!0},p(o,a){e=o;const u={};a&5&&(u.selected=e[8]),a&1&&(u.label=Ul(e[6])),a&2048&&(u.$$scope={dirty:a,ctx:e}),n.$set(u)},i(o){r||(p(n.$$.fragment,o),r=!0)},o(o){_(n.$$.fragment,o),r=!1},d(o){o&&k(s),E(n,o)}}}function KN(t){let e=[],s=new Map,n,r,i=ae(t[0]);const l=o=>o[6];for(let o=0;o<i.length;o+=1){let a=m_(t,i,o),u=l(a);s.set(u,e[o]=__(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=J()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);w(o,n,a),r=!0},p(o,a){a&5&&(i=ae(o[0]),H(),e=pt(e,a,l,1,o,i,s,n.parentNode,ht,__,n,m_),V())},i(o){if(!r){for(let a=0;a<i.length;a+=1)p(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)_(e[a]);r=!1},d(o){o&&k(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function ZN(t){let e,s,n=t[1]("collections")+"",r,i,l,o;return l=new uo({props:{$$slots:{default:[KN]},$$scope:{ctx:t}}}),{c(){e=P("section"),s=P("h2"),r=Y(n),i=R(),T(l.$$.fragment)},m(a,u){w(a,e,u),N(e,s),N(s,r),N(e,i),S(l,e,null),o=!0},p(a,u){(!o||u&2)&&n!==(n=a[1]("collections")+"")&&G(r,n);const c={};u&2053&&(c.$$scope={dirty:u,ctx:a}),l.$set(c)},i(a){o||(p(l.$$.fragment,a),o=!0)},o(a){_(l.$$.fragment,a),o=!1},d(a){a&&k(e),E(l)}}}function XN(t){let e,s;return e=new gn({props:{class:"primary-sidebar",$$slots:{default:[ZN]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,[r]){const i={};r&2055&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}const JN=t=>{t.preventDefault(),t.target.classList.remove("dragover")},QN=t=>{t.preventDefault(),t.target.classList.remove("dragover")},xN=t=>{t.preventDefault(),t.target.classList.remove("dragover")};function e6(t,e,s){let n,r,i,l;U(t,os,u=>s(3,r=u)),U(t,_e,u=>s(1,i=u)),U(t,rs,u=>s(2,l=u));const o=u=>{qt(u?`/assets/${u}`:"/assets")},a=(u,c,f)=>{f.preventDefault(),!u||c?f.dataTransfer.dropEffect="none":(f.dataTransfer.dropEffect="move",f.target.classList.add("dragover"))};return t.$$.update=()=>{t.$$.dirty&8&&s(0,n=[{collectionName:"*",internalPath:void 0},...r])},[n,i,l,r,o,a]}let t6=class extends X{constructor(e){super(),Z(this,e,e6,XN,W,{})}};function g_(t){let e,s,n;return{c(){e=P("span"),s=Y("/"),n=Y(t[2])},m(r,i){w(r,e,i),N(e,s),N(e,n)},p(r,i){i&4&&G(n,r[2])},d(r){r&&k(e)}}}function n6(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"delete"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function s6(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"cloud_upload"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function r6(t){let e,s=Ba(t[2])+"",n,r,i,l,o,a,u,c,f,d=t[2]&&g_(t);return l=new _n({props:{flex:!0}}),a=new Ie({props:{class:"secondary",disabled:!t[3].length,label:t[4]("delete"),$$slots:{"start-icon":[n6]},$$scope:{ctx:t}}}),a.$on("click",t[7]),c=new Ie({props:{class:"primary",label:t[4]("upload"),$$slots:{"start-icon":[s6]},$$scope:{ctx:t}}}),c.$on("click",t[8]),{c(){e=P("h2"),n=Y(s),r=R(),d&&d.c(),i=R(),T(l.$$.fragment),o=R(),T(a.$$.fragment),u=R(),T(c.$$.fragment)},m(h,m){w(h,e,m),N(e,n),N(e,r),d&&d.m(e,null),w(h,i,m),S(l,h,m),w(h,o,m),S(a,h,m),w(h,u,m),S(c,h,m),f=!0},p(h,m){(!f||m&4)&&s!==(s=Ba(h[2])+"")&&G(n,s),h[2]?d?d.p(h,m):(d=g_(h),d.c(),d.m(e,null)):d&&(d.d(1),d=null);const g={};m&8&&(g.disabled=!h[3].length),m&16&&(g.label=h[4]("delete")),m&4096&&(g.$$scope={dirty:m,ctx:h}),a.$set(g);const b={};m&16&&(b.label=h[4]("upload")),m&4096&&(b.$$scope={dirty:m,ctx:h}),c.$set(b)},i(h){f||(p(l.$$.fragment,h),p(a.$$.fragment,h),p(c.$$.fragment,h),f=!0)},o(h){_(l.$$.fragment,h),_(a.$$.fragment,h),_(c.$$.fragment,h),f=!1},d(h){h&&(k(e),k(i),k(o),k(u)),d&&d.d(),E(l,h),E(a,h),E(c,h)}}}function i6(t){let e,s,n,r,i,l,o;e=new tr({props:{class:"primary",$$slots:{default:[r6]},$$scope:{ctx:t}}});let a={multiple:!0};n=new eh({props:a}),t[9](n),n.$on("change",t[10]);function u(f){t[11](f)}let c={assets:t[3]};return t[1]!==void 0&&(c.open=t[1]),i=new Fk({props:c}),de.push(()=>We(i,"open",u)),{c(){T(e.$$.fragment),s=R(),T(n.$$.fragment),r=R(),T(i.$$.fragment)},m(f,d){S(e,f,d),w(f,s,d),S(n,f,d),w(f,r,d),S(i,f,d),o=!0},p(f,[d]){const h={};d&4127&&(h.$$scope={dirty:d,ctx:f}),e.$set(h);const m={};n.$set(m);const g={};d&8&&(g.assets=f[3]),!l&&d&2&&(l=!0,g.open=f[1],Ke(()=>l=!1)),i.$set(g)},i(f){o||(p(e.$$.fragment,f),p(n.$$.fragment,f),p(i.$$.fragment,f),o=!0)},o(f){_(e.$$.fragment,f),_(n.$$.fragment,f),_(i.$$.fragment,f),o=!1},d(f){f&&(k(s),k(r)),E(e,f),t[9](null),E(n,f),E(i,f)}}}function l6(t,e,s){let n,r,i,l,o;U(t,rs,g=>s(2,n=g)),U(t,_r,g=>s(3,r=g)),U(t,_e,g=>s(4,i=g)),U(t,Nn,g=>s(5,l=g)),U(t,ct,g=>s(6,o=g));let a,u=!1;const c=()=>{s(1,u=!0)},f=()=>{a.open()};function d(g){de[g?"unshift":"push"](()=>{a=g,s(0,a)})}const h=({target:g})=>{De(Nn,l={folder:n||o.media_folder,files:[...g.files]},l)};function m(g){u=g,s(1,u)}return[a,u,n,r,i,l,o,c,f,d,h,m]}let o6=class extends X{constructor(e){super(),Z(this,e,l6,i6,W,{})}};function b_(t){let e,s;return e=new gn({props:{class:"secondary-sidebar",$$slots:{default:[f6]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&15&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function a6(t){let e,s;return e=new zn({props:{$$slots:{default:[c6]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&12&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function u6(t){let e,s;return e=new jk({props:{asset:t[1],showPreview:t[0].type==="list"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&2&&(i.asset=n[1]),r&1&&(i.showPreview=n[0].type==="list"),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function c6(t){let e,s=t[2]("select_asset_show_info")+"",n;return{c(){e=P("span"),n=Y(s)},m(r,i){w(r,e,i),N(e,n)},p(r,i){i&4&&s!==(s=r[2]("select_asset_show_info")+"")&&G(n,s)},d(r){r&&k(e)}}}function f6(t){let e,s,n,r;const i=[u6,a6],l=[];function o(a,u){return a[1]?0:1}return e=o(t),s=l[e]=i[e](t),{c(){s.c(),n=J()},m(a,u){l[e].m(a,u),w(a,n,u),r=!0},p(a,u){let c=e;e=o(a),e===c?l[e].p(a,u):(H(),_(l[c],1,1,()=>{l[c]=null}),V(),s=l[e],s?s.p(a,u):(s=l[e]=i[e](a),s.c()),p(s,1),s.m(n.parentNode,n))},i(a){r||(p(s),r=!0)},o(a){_(s),r=!1},d(a){a&&k(n),l[e].d(a)}}}function d6(t){var r;let e,s,n=((r=t[0])==null?void 0:r.showInfo)&&b_(t);return{c(){n&&n.c(),e=J()},m(i,l){n&&n.m(i,l),w(i,e,l),s=!0},p(i,[l]){var o;(o=i[0])!=null&&o.showInfo?n?(n.p(i,l),l&1&&p(n,1)):(n=b_(i),n.c(),p(n,1),n.m(e.parentNode,e)):n&&(H(),_(n,1,1,()=>{n=null}),V())},i(i){s||(p(n),s=!0)},o(i){_(n),s=!1},d(i){i&&k(e),n&&n.d(i)}}}function h6(t,e,s){let n,r,i;return U(t,Dn,l=>s(0,n=l)),U(t,ei,l=>s(1,r=l)),U(t,_e,l=>s(2,i=l)),[n,r,i]}let p6=class extends X{constructor(e){super(),Z(this,e,h6,d6,W,{})}};function y_(t,e,s){const n=t.slice();return n[9]=e[s].label,n[10]=e[s].field,n[11]=e[s].pattern,n}function m6(t){let e,s;return e=new ke({props:{slot:"end-icon",name:"arrow_drop_down"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function k_(t){var r,i;let e,s;function n(){return t[8](t[10],t[11])}return e=new rl({props:{label:t[9],checked:((r=t[6].filter)==null?void 0:r.field)===t[10]&&((i=t[6].filter)==null?void 0:i.pattern)===t[11]}}),e.$on("click",n),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),s=!0},p(l,o){var u,c;t=l;const a={};o&16&&(a.label=t[9]),o&80&&(a.checked=((u=t[6].filter)==null?void 0:u.field)===t[10]&&((c=t[6].filter)==null?void 0:c.pattern)===t[11]),e.$set(a)},i(l){s||(p(e.$$.fragment,l),s=!0)},o(l){_(e.$$.fragment,l),s=!1},d(l){E(e,l)}}}function _6(t){let e,s,n,r;e=new rl({props:{label:t[3]||t[5]("sort_keys.none"),checked:!t[6].filter}}),e.$on("click",t[7]);let i=ae(t[4]),l=[];for(let a=0;a<i.length;a+=1)l[a]=k_(y_(t,i,a));const o=a=>_(l[a],1,1,()=>{l[a]=null});return{c(){T(e.$$.fragment),s=R();for(let a=0;a<l.length;a+=1)l[a].c();n=J()},m(a,u){S(e,a,u),w(a,s,u);for(let c=0;c<l.length;c+=1)l[c]&&l[c].m(a,u);w(a,n,u),r=!0},p(a,u){const c={};if(u&40&&(c.label=a[3]||a[5]("sort_keys.none")),u&64&&(c.checked=!a[6].filter),e.$set(c),u&84){i=ae(a[4]);let f;for(f=0;f<i.length;f+=1){const d=y_(a,i,f);l[f]?(l[f].p(d,u),p(l[f],1)):(l[f]=k_(d),l[f].c(),p(l[f],1),l[f].m(n.parentNode,n))}for(H(),f=i.length;f<l.length;f+=1)o(f);V()}},i(a){if(!r){p(e.$$.fragment,a);for(let u=0;u<i.length;u+=1)p(l[u]);r=!0}},o(a){_(e.$$.fragment,a),l=l.filter(Boolean);for(let u=0;u<l.length;u+=1)_(l[u]);r=!1},d(a){a&&(k(s),k(n)),E(e,a),fs(l,a)}}}function g6(t){let e,s;return e=new Ls({props:{slot:"popup",$$slots:{default:[_6]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&16508&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function b6(t){let e,s;return e=new er({props:{class:"ghost",label:t[0]||t[5]("filter_by"),disabled:t[1],$$slots:{popup:[g6],"end-icon":[m6]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,[r]){const i={};r&33&&(i.label=n[0]||n[5]("filter_by")),r&2&&(i.disabled=n[1]),r&16508&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function y6(t,e,s){let n,r,i=K,l=()=>(i(),i=Mn(u,m=>s(6,r=m)),u);U(t,_e,m=>s(5,n=m)),t.$$.on_destroy.push(()=>i());let{label:o=""}=e,{disabled:a=!1}=e,{currentView:u=Me({})}=e;l();let{noneLabel:c=""}=e,{filters:f=[]}=e;const d=()=>{u.update(m=>({...m,filter:void 0}))},h=(m,g)=>{u.update(b=>({...b,filter:{field:m,pattern:g}}))};return t.$$set=m=>{"label"in m&&s(0,o=m.label),"disabled"in m&&s(1,a=m.disabled),"currentView"in m&&l(s(2,u=m.currentView)),"noneLabel"in m&&s(3,c=m.noneLabel),"filters"in m&&s(4,f=m.filters)},[o,a,u,c,f,n,r,d,h]}class Bk extends X{constructor(e){super(),Z(this,e,y6,b6,W,{label:0,disabled:1,currentView:2,noneLabel:3,filters:4})}}function w_(t,e,s){const n=t.slice();return n[8]=e[s],n}function v_(t,e,s){const n=t.slice();return n[11]=e[s].key,n[12]=e[s].label,n}function k6(t){let e,s;return e=new ke({props:{slot:"end-icon",name:"arrow_drop_down"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function $_(t,e){var l;let s,n,r;function i(){return e[6](e[11])}return n=new rl({props:{label:e[12],checked:((l=e[5].sort)==null?void 0:l.key)===e[11]}}),n.$on("click",i),{key:t,first:null,c(){s=J(),T(n.$$.fragment),this.first=s},m(o,a){w(o,s,a),S(n,o,a),r=!0},p(o,a){var c;e=o;const u={};a&8&&(u.label=e[12]),a&40&&(u.checked=((c=e[5].sort)==null?void 0:c.key)===e[11]),n.$set(u)},i(o){r||(p(n.$$.fragment,o),r=!0)},o(o){_(n.$$.fragment,o),r=!1},d(o){o&&k(s),E(n,o)}}}function w6(t){let e=[],s=new Map,n,r,i=ae(t[3]);const l=o=>o[11];for(let o=0;o<i.length;o+=1){let a=v_(t,i,o),u=l(a);s.set(u,e[o]=$_(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();n=J()},m(o,a){for(let u=0;u<e.length;u+=1)e[u]&&e[u].m(o,a);w(o,n,a),r=!0},p(o,a){a&44&&(i=ae(o[3]),H(),e=pt(e,a,l,1,o,i,s,n.parentNode,ht,$_,n,v_),V())},i(o){if(!r){for(let a=0;a<i.length;a+=1)p(e[a]);r=!0}},o(o){for(let a=0;a<e.length;a+=1)_(e[a]);r=!1},d(o){o&&k(n);for(let a=0;a<e.length;a+=1)e[a].d(o)}}}function S_(t){var r;let e,s;function n(){return t[7](t[8])}return e=new rl({props:{label:t[4](t[8]),disabled:!t[5].sort,checked:((r=t[5].sort)==null?void 0:r.order)===t[8]}}),e.$on("click",n),{c(){T(e.$$.fragment)},m(i,l){S(e,i,l),s=!0},p(i,l){var a;t=i;const o={};l&16&&(o.label=t[4](t[8])),l&32&&(o.disabled=!t[5].sort),l&32&&(o.checked=((a=t[5].sort)==null?void 0:a.order)===t[8]),e.$set(o)},i(i){s||(p(e.$$.fragment,i),s=!0)},o(i){_(e.$$.fragment,i),s=!1},d(i){E(e,i)}}}function v6(t){let e,s,n=ae(["ascending","descending"]),r=[];for(let l=0;l<2;l+=1)r[l]=S_(w_(t,n,l));const i=l=>_(r[l],1,1,()=>{r[l]=null});return{c(){for(let l=0;l<2;l+=1)r[l].c();e=J()},m(l,o){for(let a=0;a<2;a+=1)r[a]&&r[a].m(l,o);w(l,e,o),s=!0},p(l,o){if(o&52){n=ae(["ascending","descending"]);let a;for(a=0;a<2;a+=1){const u=w_(l,n,a);r[a]?(r[a].p(u,o),p(r[a],1)):(r[a]=S_(u),r[a].c(),p(r[a],1),r[a].m(e.parentNode,e))}for(H(),a=2;a<2;a+=1)i(a);V()}},i(l){if(!s){for(let o=0;o<2;o+=1)p(r[o]);s=!0}},o(l){r=r.filter(Boolean);for(let o=0;o<2;o+=1)_(r[o]);s=!1},d(l){l&&k(e),fs(r,l)}}}function $6(t){let e,s,n,r,i,l;return e=new Gp({props:{ariaLabel:t[4]("sort_field"),$$slots:{default:[w6]},$$scope:{ctx:t}}}),n=new wn({}),i=new Gp({props:{ariaLabel:t[4]("sort_order"),$$slots:{default:[v6]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment),s=R(),T(n.$$.fragment),r=R(),T(i.$$.fragment)},m(o,a){S(e,o,a),w(o,s,a),S(n,o,a),w(o,r,a),S(i,o,a),l=!0},p(o,a){const u={};a&16&&(u.ariaLabel=o[4]("sort_field")),a&32812&&(u.$$scope={dirty:a,ctx:o}),e.$set(u);const c={};a&16&&(c.ariaLabel=o[4]("sort_order")),a&32820&&(c.$$scope={dirty:a,ctx:o}),i.$set(c)},i(o){l||(p(e.$$.fragment,o),p(n.$$.fragment,o),p(i.$$.fragment,o),l=!0)},o(o){_(e.$$.fragment,o),_(n.$$.fragment,o),_(i.$$.fragment,o),l=!1},d(o){o&&(k(s),k(r)),E(e,o),E(n,o),E(i,o)}}}function S6(t){let e,s;return e=new Ls({props:{slot:"popup",$$slots:{default:[$6]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&32828&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function E6(t){let e,s;return e=new er({props:{class:"ghost",label:t[0]||t[4]("sort_by"),disabled:t[1],$$slots:{popup:[S6],"end-icon":[k6]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,[r]){const i={};r&17&&(i.label=n[0]||n[4]("sort_by")),r&2&&(i.disabled=n[1]),r&32828&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function T6(t,e,s){let n,r,i=K,l=()=>(i(),i=Mn(u,h=>s(5,r=h)),u);U(t,_e,h=>s(4,n=h)),t.$$.on_destroy.push(()=>i());let{label:o=""}=e,{disabled:a=!1}=e,{currentView:u=Me({})}=e;l();let{fields:c=[]}=e;const f=h=>{const m=["date","commit_date"].includes(h)?"descending":"ascending";u.update(g=>({...g,sort:{key:h,order:m}}))},d=h=>{u.update(m=>{var g;return{...m,sort:{key:(g=r.sort)==null?void 0:g.key,order:h}}})};return t.$$set=h=>{"label"in h&&s(0,o=h.label),"disabled"in h&&s(1,a=h.disabled),"currentView"in h&&l(s(2,u=h.currentView)),"fields"in h&&s(3,c=h.fields)},[o,a,u,c,n,r,f,d]}class zk extends X{constructor(e){super(),Z(this,e,T6,E6,W,{label:0,disabled:1,currentView:2,fields:3})}}function A6(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"format_list_bulleted",label:t[2]("list_view")}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&4&&(i.label=n[2]("list_view")),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function O6(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"grid_view",label:t[2]("grid_view")}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&4&&(i.label=n[2]("grid_view")),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function L6(t){let e,s,n,r;return e=new Wl({props:{disabled:t[0],selected:t[3].type!=="grid",class:"ghost iconic",$$slots:{"start-icon":[A6]},$$scope:{ctx:t}}}),e.$on("click",t[4]),n=new Wl({props:{disabled:t[0],selected:t[3].type==="grid",class:"ghost iconic",$$slots:{"start-icon":[O6]},$$scope:{ctx:t}}}),n.$on("click",t[5]),{c(){T(e.$$.fragment),s=R(),T(n.$$.fragment)},m(i,l){S(e,i,l),w(i,s,l),S(n,i,l),r=!0},p(i,l){const o={};l&1&&(o.disabled=i[0]),l&8&&(o.selected=i[3].type!=="grid"),l&68&&(o.$$scope={dirty:l,ctx:i}),e.$set(o);const a={};l&1&&(a.disabled=i[0]),l&8&&(a.selected=i[3].type==="grid"),l&68&&(a.$$scope={dirty:l,ctx:i}),n.$set(a)},i(i){r||(p(e.$$.fragment,i),p(n.$$.fragment,i),r=!0)},o(i){_(e.$$.fragment,i),_(n.$$.fragment,i),r=!1},d(i){i&&k(s),E(e,i),E(n,i)}}}function N6(t){let e,s;return e=new od({props:{disabled:t[0],ariaLabel:t[2]("switch_view"),$$slots:{default:[L6]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,[r]){const i={};r&1&&(i.disabled=n[0]),r&4&&(i.ariaLabel=n[2]("switch_view")),r&79&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function P6(t,e,s){let n,r,i=K,l=()=>(i(),i=Mn(a,f=>s(3,r=f)),a);U(t,_e,f=>s(2,n=f)),t.$$.on_destroy.push(()=>i());let{disabled:o=!1}=e,{currentView:a=Me({})}=e;l();const u=()=>{a.update(f=>({...f,type:"list"}))},c=()=>{a.update(f=>({...f,type:"grid"}))};return t.$$set=f=>{"disabled"in f&&s(0,o=f.disabled),"currentView"in f&&l(s(1,a=f.currentView))},[o,a,n,r,u,c]}class nh extends X{constructor(e){super(),Z(this,e,P6,N6,W,{disabled:0,currentView:1})}}function E_(t){let e,s;return e=new tr({props:{class:"secondary",$$slots:{default:[C6]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&8317&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function I6(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"info",label:t[4]("show_info")}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&16&&(i.label=n[4]("show_info")),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function C6(t){var y;let e,s,n,r,i,l,o,a,u,c,f,d,h,m,g,b;return e=new Ie({props:{class:"ghost",disabled:t[2].length===Object.values(t[3]).flat(1).length,label:t[4]("select_all")}}),e.$on("click",t[8]),n=new Ie({props:{class:"ghost",disabled:!t[2].length,label:t[4]("clear_selection")}}),n.$on("click",t[9]),i=new _n({props:{flex:!0}}),o=new zk({props:{disabled:!t[0],currentView:Dn,fields:t[5].map(t[10])}}),u=new Bk({props:{label:t[4]("file_type"),disabled:!t[0],currentView:Dn,noneLabel:t[4]("all"),filters:pm.map(t[11])}}),f=new nh({props:{disabled:!t[0],currentView:Dn}}),h=new wn({}),g=new Ie({props:{class:"ghost iconic",disabled:!t[0],pressed:!!((y=t[6])!=null&&y.showInfo),$$slots:{"start-icon":[I6]},$$scope:{ctx:t}}}),g.$on("click",t[12]),{c(){T(e.$$.fragment),s=R(),T(n.$$.fragment),r=R(),T(i.$$.fragment),l=R(),T(o.$$.fragment),a=R(),T(u.$$.fragment),c=R(),T(f.$$.fragment),d=R(),T(h.$$.fragment),m=R(),T(g.$$.fragment)},m(v,$){S(e,v,$),w(v,s,$),S(n,v,$),w(v,r,$),S(i,v,$),w(v,l,$),S(o,v,$),w(v,a,$),S(u,v,$),w(v,c,$),S(f,v,$),w(v,d,$),S(h,v,$),w(v,m,$),S(g,v,$),b=!0},p(v,$){var B;const C={};$&12&&(C.disabled=v[2].length===Object.values(v[3]).flat(1).length),$&16&&(C.label=v[4]("select_all")),e.$set(C);const O={};$&4&&(O.disabled=!v[2].length),$&16&&(O.label=v[4]("clear_selection")),n.$set(O);const A={};$&1&&(A.disabled=!v[0]),$&48&&(A.fields=v[5].map(v[10])),o.$set(A);const I={};$&16&&(I.label=v[4]("file_type")),$&1&&(I.disabled=!v[0]),$&16&&(I.noneLabel=v[4]("all")),$&16&&(I.filters=pm.map(v[11])),u.$set(I);const D={};$&1&&(D.disabled=!v[0]),f.$set(D);const L={};$&1&&(L.disabled=!v[0]),$&64&&(L.pressed=!!((B=v[6])!=null&&B.showInfo)),$&8208&&(L.$$scope={dirty:$,ctx:v}),g.$set(L)},i(v){b||(p(e.$$.fragment,v),p(n.$$.fragment,v),p(i.$$.fragment,v),p(o.$$.fragment,v),p(u.$$.fragment,v),p(f.$$.fragment,v),p(h.$$.fragment,v),p(g.$$.fragment,v),b=!0)},o(v){_(e.$$.fragment,v),_(n.$$.fragment,v),_(i.$$.fragment,v),_(o.$$.fragment,v),_(u.$$.fragment,v),_(f.$$.fragment,v),_(h.$$.fragment,v),_(g.$$.fragment,v),b=!1},d(v){v&&(k(s),k(r),k(l),k(a),k(c),k(d),k(m)),E(e,v),E(n,v),E(i,v),E(o,v),E(u,v),E(f,v),E(h,v),E(g,v)}}}function D6(t){let e,s,n=!t[1].files&&E_(t);return{c(){n&&n.c(),e=J()},m(r,i){n&&n.m(r,i),w(r,e,i),s=!0},p(r,[i]){r[1].files?n&&(H(),_(n,1,1,()=>{n=null}),V()):n?(n.p(r,i),i&2&&p(n,1)):(n=E_(r),n.c(),p(n,1),n.m(e.parentNode,e))},i(r){s||(p(n),s=!0)},o(r){_(n),s=!1},d(r){r&&k(e),n&&n.d(r)}}}function M6(t,e,s){let n,r,i,l,o,a,u,c;U(t,Nu,b=>s(7,r=b)),U(t,Lt,b=>s(1,i=b)),U(t,_r,b=>s(2,l=b)),U(t,Rk,b=>s(3,o=b)),U(t,_e,b=>s(4,a=b)),U(t,mL,b=>s(5,u=b)),U(t,Dn,b=>s(6,c=b));const f=()=>{De(_r,l=Object.values(o).flat(1),l)},d=()=>{De(_r,l=[],l)},h=b=>({key:b,label:a(`sort_keys.${b}`)}),m=b=>({label:a(b),field:"fileType",pattern:b}),g=()=>{Dn.update(b=>({...b,showInfo:!(c!=null&&c.showInfo)}))};return t.$$.update=()=>{t.$$.dirty&128&&s(0,n=!!r.length)},[n,i,l,o,a,u,c,r,f,d,h,m,g]}let R6=class extends X{constructor(e){super(),Z(this,e,M6,D6,W,{})}};const F6="deepl",U6="DeepL",j6="https://www.deepl.com/pro-api",B6="https://www.deepl.com/account/summary",z6=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?::fx)?/,H6=["BG,CS,DA,DE,EL,EN,ES,ET,FI,FR,HU,ID,IT,JA,KO,LT,LV,NB,NL,PL,PT,RO,RU,SK,SL,SV,TR,UK,ZH"].join(",").split(","),V6=["BG,CS,DA,DE,EL,EN,EN-GB,EN-US,ES,ET,FI,FR,HU,ID,IT,JA,KO,LT,LV,NB,NL,PL,PT,PT-BR,PT-PT,RO,RU,SK","SL,SV,TR,UK,ZH"].join(",").split(","),Y6=async(t,{sourceLocale:e="",targetLocale:s,apiKey:n})=>{const r=new URLSearchParams([...t.map(a=>["text",a]),["source_lang",e.toUpperCase()],["target_lang",s.toUpperCase()],["tag_handling","html"],["split_sentences","1"],["auth_key",n]]),l=`https://${n.endsWith(":fx")?"api-free.deepl.com":"api.deepl.com"}/v2/translate?${r.toString()}`,{translations:o}=await fetch(l).then(a=>a.json());return o.map(a=>a.text)},Hk={serviceId:F6,serviceLabel:U6,landingURL:j6,apiKeyURL:B6,apiKeyPattern:z6,sourceLanguages:H6,targetLanguages:V6,translate:Y6},T_={deepl:Hk},Va=Me(Hk),jl=Me(!1),Bl=Me(),Wf="sveltia-cms.entry-view",Hi=Me({}),Vi=Me({}),yo=Me({}),yr=Me({},t=>{(async()=>{try{const e={showPreview:!0,syncScrolling:!0,selectAssetsView:{type:"grid"},...await Jt.get(Wf)||{}};t(e),yo.set(e.selectAssetsView)}catch{}})()}),Ue=Me(),G6=(t,e={})=>{const s={},n=({fieldConfig:r,keyPath:i})=>{if(i in e){s[i]=e[i];return}const{widget:l,default:o}=r,a=Array.isArray(o)&&!!o.length;if(l==="list"){const{fields:u,field:c}=r;if(!a){s[i]=[];return}if(u||c){o.forEach((f,d)=>{Object.entries(f).forEach(([h,m])=>{s[[i,d,h].join(".")]=m})});return}o.forEach((f,d)=>{s[[i,d].join(".")]=f});return}if(l==="object"){const{fields:u}=r;u.forEach(c=>{n({keyPath:[i,c.name].join("."),fieldConfig:c})});return}if(l==="boolean"){s[i]=typeof o=="boolean"?o:!1;return}if(l==="relation"||l==="select"){const{multiple:u=!1}=r;if(u){s[i]=a?o:[];return}}s[i]=o!==void 0?o:""};return t.forEach(r=>{n({keyPath:r.name,fieldConfig:r})}),mn.unflatten(s)},qf=({draft:{collectionName:t,fileName:e},prop:s,locale:n,target:r={},getValueMap:i=void 0})=>{const l=ms(t),{defaultLocale:o="default"}=l._i18n;return new Proxy(r,{set:(a,u,c)=>{const f=typeof i=="function"?i():a,d=mo(t,e,u,f);return d?(d.i18n==="duplicate"&&n===o&&Object.entries(ne(Ue)[s]).forEach(([h,m])=>{h!==n&&m[u]!==c&&(m[u]=c)}),Reflect.set(a,u,c)):!0}})},Yo=(t,e,s)=>{var h;const n=ms(t),{hasLocales:r,locales:i}=n._i18n,l=!e,{fileName:o,locales:a}=e||{},u=o?(h=n.files)==null?void 0:h.find(({name:m})=>m===o):void 0,{fields:c}=u||n,f=G6(c,s),d=r?i:["default"];Ue.set({isNew:l,collectionName:t,collection:n,fileName:o,collectionFile:u,originalEntry:e,originalValues:Object.fromEntries(d.map(m=>{var g;return[m,mn.flatten(((g=a==null?void 0:a[m])==null?void 0:g.content)||f)]})),currentValues:Object.fromEntries(d.map(m=>{var g,b;return[m,d.length?qf({draft:{collectionName:t,fileName:o},prop:"currentValues",locale:m,target:mn.flatten(((g=a==null?void 0:a[m])==null?void 0:g.content)||f)}):mn.flatten(((b=a==null?void 0:a[m])==null?void 0:b.content)||f)]})),files:Object.fromEntries(d.map(m=>[m,d.length?qf({draft:{collectionName:t,fileName:o},prop:"files",locale:m,getValueMap:()=>ne(Ue).currentValues[m]}):{}])),validities:Object.fromEntries(d.map(m=>[m,{}]))})},Vk=(t,e,s)=>{const n=mn.unflatten(ne(Ue).currentValues[t]),r=e.split(".").reduce((i,l)=>{const o=l.match(/^\d+$/)?Number(l):l;return i[o]||(i[o]=[]),i[o]},n);s(r),Ue.update(i=>({...i,currentValues:{...i.currentValues,[t]:qf({draft:i,prop:"currentValues",locale:t,target:mn.flatten(n)})}}))},Yk=async(t,e,s="",n=!1)=>{var u,c;const{collectionName:r,fileName:i,currentValues:l}=ne(Ue),o=l[t],a=Object.fromEntries(Object.entries(o).filter(([f,d])=>{const h=mo(r,i,f,o);return!(s&&!f.startsWith(s)||typeof d!="string"||!["markdown","text","string","list"].includes(h==null?void 0:h.widget)||(h==null?void 0:h.widget)==="list"&&(h.field||h.fields)||!n&&d===l[e][f])}));if(Object.keys(a).length){if(n){const f=(c=ne(mt).apiKeys)==null?void 0:c[(u=ne(Va))==null?void 0:u.serviceId];if(!f)return;try{const d=await ne(Va).translate(Object.values(a),{apiKey:f,sourceLocale:t,targetLocale:e});Object.keys(a).forEach((h,m)=>{l[e][h]=d[m]})}catch{}}else Object.entries(a).forEach(([f,d])=>{l[e][f]=d});Ue.update(f=>({...f,currentValues:l}))}},sh=(t="",e="")=>{const{collection:s,currentValues:n,originalValues:r}=ne(Ue),{hasLocales:i,locales:l}=s._i18n;(t?[t]:i?l:["default"]).forEach(a=>{Object.keys(n[a]).forEach(u=>{(!e||u.startsWith(e))&&(n[a][u]=void 0)}),Object.entries(r[a]).forEach(([u,c])=>{(!e||u.startsWith(e))&&(n[a][u]=c)})}),Ue.update(a=>({...a,currentValues:n}))},W6=()=>{const{collection:t,fileName:e,currentValues:s,validities:n}=ne(Ue),{hasLocales:r,defaultLocale:i="default"}=t._i18n;let l=!0;return Object.entries(s).forEach(([o,a])=>{const u=Object.entries(a);u.forEach(([c,f])=>{const d=mo(t.name,e,c,a);if(!d)return;const h=c.match(/\.(\d+)$/),{widget:m,required:g=!0,i18n:b=!1,pattern:y,min:v,max:$}=d,O=g!==!1&&(o===i||r&&(b===!0||b==="translate"));let A=!1,I=!1,D=!1,L=!1;if(h){if(Number(h[1])>0)return;c=c.replace(/\.\d+$/,"");const F=new RegExp(`^${rn(c)}\\.\\d+$`),te=u.filter(([q])=>q.match(F)).map(([,q])=>q).filter(q=>q!==void 0)||[];O&&!te.length&&(A=!0),v&&Array.isArray(f)&&f.length<v&&(I=!0),$&&Array.isArray(f)&&f.length>$&&(D=!0)}["object","list"].includes(m)||(O&&(f===void 0||f==="")&&(A=!0),Array.isArray(y)&&y.length===2&&!String(f).match(new RegExp(rn(y[0])))&&(L=!0));const B={valueMissing:A,rangeUnderflow:I,rangeOverflow:D,patternMismatch:L},z=!Object.values(B).some(Boolean);n[o][c]={...B,valid:z},z||(l=!1)})}),Ue.update(o=>({...o,validities:n})),l},A_=(t,e,s)=>{var m;const{collection:n,collectionFile:r,originalEntry:i,currentValues:l}=t;if(r)return r.file;if(i!=null&&i.locales[e])return i==null?void 0:i.locales[e].path;const{structure:o,defaultLocale:a}=n._i18n,u=(m=n.folder)==null?void 0:m.replace(/\/$/,""),c=n.path?Jl(n.path,{collection:n,content:l[a],currentSlug:s}):s,f=Ok(n),d=`${u}/${c}.${f}`,h={multiple_folders:`${u}/${e}/${c}.${f}`,multiple_files:`${u}/${c}.${e}.${f}`,single_file:d};return h[o]||h.single_file},q6=async()=>{if(!W6())throw new Error("validation_failed");const t=ne(Sn),e=ne(Ue),{collection:s,isNew:n,originalEntry:r,collectionName:i,collectionFile:l,fileName:o,currentValues:a,files:u}=e,{structure:c,hasLocales:f,locales:d,defaultLocale:h="default"}=s._i18n,m={collection:s,content:a[h]},g=(r==null?void 0:r.slug)||Jl(s.slug||"{{title}}",m),{internalAssetFolder:b,publicAssetFolder:y}=RT(s,{...m,currentSlug:g,isMediaFolder:!0,entryFilePath:A_(e,h,g)}),v=ne(Rn).map(L=>L.path).filter(L=>L.match(new RegExp(`^\\/${rn(b)}\\/[^\\/]+$`))),$=[],C=[],O={text:null,collectionName:i,folder:b,commitAuthor:t.email?{name:t.name,email:t.email}:null,commitDate:new Date},A=Object.fromEntries(await Promise.all(Object.entries(a).map(async([L,B])=>{for(const[te,q]of Object.entries(B)){if(q===void 0){delete B[te];continue}if(typeof q!="string")continue;B[te]=q.trim();const[,ue,It]=q.match(/^data:(.+?\/.+?);base64,(.+)/)||[];if(ue){const dt=u[L][te]||await(async()=>{const Vn=await(await fetch(q)).blob(),[zt,An]=ue.split("/"),[bs]=An.split("+");return new File([Vn],`${zt}-${Date.now()}.${bs}`,{type:ue})})(),kt=await va(dt),Tt=C.find(en=>en.sha===kt);if(Tt){B[te]=y?`${y}/${Tt.name}`:Tt.name;continue}const wt=hy(dt.name,[...v,...C.map(en=>en.name)]),ee=`${b}/${wt}`;$.push({path:ee,data:dt,base64:It}),C.push({...O,url:URL.createObjectURL(dt),name:wt,path:ee,sha:kt,size:dt.size,kind:Nd(wt)}),B[te]=y?`${y}/${wt}`:wt}}const z=mn.unflatten(B),Q=await va(new Blob([z],{type:"text/plain"})),F=A_(e,L,g);return[L,{content:z,sha:Q,path:F}]}))),I={id:`${i}/${o}/${g}`,collectionName:i,fileName:o,slug:g,sha:A[h].sha,locales:A};if(l||!f||c==="single_file"){const{path:L,content:B}=A[h];$.push({slug:g,path:L,data:Wm({content:f?Object.fromEntries(Object.entries(A).map(([z,Q])=>[z,Q.content])):B,path:L,config:l?{extension:((l==null?void 0:l.file.match(/\.([a-zA-Z0-9]+)$/))||[])[1]}:s})})}else d.map(async L=>{const{path:B,content:z}=A[L];$.push({slug:g,path:B,data:Wm({content:z,path:B,config:s})})});try{await ne(Tr).saveFiles($,{commitType:n?"create":"update",collection:i})}catch{throw new Error("saving_failed")}const D=C.map(L=>L.path);Ts.update(L=>[...L.filter(B=>!(B.collectionName===i&&B.slug===g)),I]),Rn.update(L=>[...L.filter(B=>!D.includes(B.path)),...C]),Ue.set(null)};Ue.subscribe(t=>{ne(mt).devModeEnabled&&console.info("entryDraft",t)});yo.subscribe(t=>{const e=ne(yr).selectAssetsView||{};Un(t,e)||yr.update(s=>({...s,selectAssetsView:t}))});yr.subscribe(t=>{!t||!Object.keys(t).length||(async()=>{try{Un(t,await Jt.get(Wf))||await Jt.set(Wf,t)}catch{}})()});function K6(t){ge(t,"svelte-p6p3r0",'.outer.svelte-p6p3r0.svelte-p6p3r0{flex:auto;display:flex;flex-direction:column;overflow:hidden}.outer[hidden].svelte-p6p3r0.svelte-p6p3r0{display:none}.outer.svelte-p6p3r0>[role="toolbar"]{flex:none}.outer.svelte-p6p3r0>[role="toolbar"] [role="search"]{flex:auto;width:auto;max-width:480px}.outer.svelte-p6p3r0 .browser{flex:auto;display:flex;overflow:hidden}.outer.svelte-p6p3r0 .primary-sidebar{display:flex;flex-direction:column;flex:none;width:240px;overflow-y:auto;background-color:var(--sui-tertiary-background-color);border-width:0 1px 0 0;border-color:var(--sui-primary-border-color)}.outer.svelte-p6p3r0 .primary-sidebar [role="radiogroup"]{width:100%}.outer.svelte-p6p3r0 .primary-sidebar section{padding:8px 0}.outer.svelte-p6p3r0 .primary-sidebar section h2{position:absolute;left:-9999px}.outer.svelte-p6p3r0 .primary-sidebar section [role="search"]{margin:0 16px 16px}.outer.svelte-p6p3r0 .primary-sidebar section [role="listbox"]{margin:0 8px;border-width:0;gap:4px}.outer.svelte-p6p3r0 .primary-sidebar section [role="listbox"] button{display:flex;justify-content:flex-start;border-radius:var(--sui-control-medium-border-radius);padding:0 12px;height:32px;width:100%;text-align:left}.outer.svelte-p6p3r0 .primary-sidebar section [role="listbox"] button span{flex:none}.outer.svelte-p6p3r0 .primary-sidebar section [role="listbox"] button span.label{flex:auto;overflow:hidden;text-overflow:ellipsis}.outer.svelte-p6p3r0 .primary-sidebar section [role="listbox"] button span.icon.check{display:none}.outer.svelte-p6p3r0 .primary-sidebar section [role="listbox"] button:not(:first-child){margin-top:4px}.outer.svelte-p6p3r0 .primary-sidebar section [role="listbox"] button:not(:focus){border-color:transparent}.outer.svelte-p6p3r0 .primary-sidebar section [role="listbox"] [role="option"][aria-selected="true"]{color:var(--sui-highlight-foreground-color);background-color:var(--sui-highlight-background-color)}.outer.svelte-p6p3r0 .primary-sidebar section [role="listbox"] [role="option"].dragover{color:var(--sui-primary-accent-color-foreground) !important;background-color:var(--sui-primary-accent-color) !important}.outer.svelte-p6p3r0 .main{flex:auto;display:flex;flex-direction:column;overflow:hidden}.outer.svelte-p6p3r0 .main .primary.global[role="toolbar"]{justify-content:center}.outer.svelte-p6p3r0 .main .primary:not(.global)[role="toolbar"]{background-color:var(--sui-tertiary-background-color)}.outer.svelte-p6p3r0 .main .secondary[role="toolbar"]{border-width:0 0 1px;border-color:var(--sui-primary-border-color)}.outer.svelte-p6p3r0 .main .list-container{flex:auto;overflow-y:auto;overscroll-behavior-y:contain;padding:16px;border-radius:var(--sui-control-medium-border-radius)}.outer.svelte-p6p3r0 .main-inner.svelte-p6p3r0{flex:auto;display:flex;overflow:hidden}.outer.svelte-p6p3r0 .main-inner .main-inner-main.svelte-p6p3r0{flex:auto;display:flex;flex-direction:column;overflow:hidden}.outer.svelte-p6p3r0 .main-inner.svelte-p6p3r0 .secondary-sidebar{flex:none;overflow:auto;width:320px;border-left:1px solid var(--sui-primary-border-color)}')}const Z6=t=>({}),O_=t=>({}),X6=t=>({}),L_=t=>({}),J6=t=>({}),N_=t=>({}),Q6=t=>({}),P_=t=>({}),x6=t=>({}),I_=t=>({});function eP(t){let e,s,n,r,i,l;const o=t[3].primary_toolbar,a=Ae(o,t,t[4],P_),u=t[3].secondary_toolbar,c=Ae(u,t,t[4],N_),f=t[3].main,d=Ae(f,t,t[4],L_),h=t[3].secondary_sidebar,m=Ae(h,t,t[4],O_);return{c(){a&&a.c(),e=R(),s=P("div"),n=P("div"),c&&c.c(),r=R(),d&&d.c(),i=R(),m&&m.c(),M(n,"class","main-inner-main svelte-p6p3r0"),M(s,"class","main-inner svelte-p6p3r0")},m(g,b){a&&a.m(g,b),w(g,e,b),w(g,s,b),N(s,n),c&&c.m(n,null),N(n,r),d&&d.m(n,null),N(s,i),m&&m.m(s,null),l=!0},p(g,b){a&&a.p&&(!l||b&16)&&Le(a,o,g,g[4],l?Oe(o,g[4],b,Q6):Ne(g[4]),P_),c&&c.p&&(!l||b&16)&&Le(c,u,g,g[4],l?Oe(u,g[4],b,J6):Ne(g[4]),N_),d&&d.p&&(!l||b&16)&&Le(d,f,g,g[4],l?Oe(f,g[4],b,X6):Ne(g[4]),L_),m&&m.p&&(!l||b&16)&&Le(m,h,g,g[4],l?Oe(h,g[4],b,Z6):Ne(g[4]),O_)},i(g){l||(p(a,g),p(c,g),p(d,g),p(m,g),l=!0)},o(g){_(a,g),_(c,g),_(d,g),_(m,g),l=!1},d(g){g&&(k(e),k(s)),a&&a.d(g),c&&c.d(g),d&&d.d(g),m&&m.d(g)}}}function tP(t){let e,s,n;const r=t[3].primary_sidebar,i=Ae(r,t,t[4],I_);return s=new gn({props:{class:"main",$$slots:{default:[eP]},$$scope:{ctx:t}}}),{c(){i&&i.c(),e=R(),T(s.$$.fragment)},m(l,o){i&&i.m(l,o),w(l,e,o),S(s,l,o),n=!0},p(l,o){i&&i.p&&(!n||o&16)&&Le(i,r,l,l[4],n?Oe(r,l[4],o,x6):Ne(l[4]),I_);const a={};o&16&&(a.$$scope={dirty:o,ctx:l}),s.$set(a)},i(l){n||(p(i,l),p(s.$$.fragment,l),n=!0)},o(l){_(i,l),_(s.$$.fragment,l),n=!1},d(l){l&&k(e),i&&i.d(l),E(s,l)}}}function nP(t){let e,s,n,r;const i=[{class:"browser "+t[0]},t[2]];let l={$$slots:{default:[tP]},$$scope:{ctx:t}};for(let o=0;o<i.length;o+=1)l=x(l,i[o]);return s=new gn({props:l}),{c(){e=P("div"),T(s.$$.fragment),M(e,"class","outer svelte-p6p3r0"),e.hidden=n=t[1]?!0:void 0},m(o,a){w(o,e,a),S(s,e,null),r=!0},p(o,[a]){const u=a&5?He(i,[a&1&&{class:"browser "+o[0]},a&4&&Bn(o[2])]):{};a&16&&(u.$$scope={dirty:a,ctx:o}),s.$set(u),(!r||a&2&&n!==(n=o[1]?!0:void 0))&&(e.hidden=n)},i(o){r||(p(s.$$.fragment,o),r=!0)},o(o){_(s.$$.fragment,o),r=!1},d(o){o&&k(e),E(s)}}}function sP(t,e,s){const n=["class"];let r=he(e,n),i;U(t,Ue,u=>s(1,i=u));let{$$slots:l={},$$scope:o}=e,{class:a=""}=e;return t.$$set=u=>{e=x(x({},e),Ze(u)),s(2,r=he(e,n)),"class"in u&&s(0,a=u.class),"$$scope"in u&&s(4,o=u.$$scope)},[a,i,r,l,o]}class ko extends X{constructor(e){super(),Z(this,e,sP,nP,W,{class:0},K6)}}function rP(t){let e,s;return e=new t6({props:{slot:"primary_sidebar"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function iP(t){let e,s;return e=new o6({props:{slot:"primary_toolbar"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function lP(t){let e,s;return e=new R6({props:{slot:"secondary_toolbar"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function oP(t){let e,s;return e=new WN({props:{slot:"main"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function aP(t){let e,s;return e=new p6({props:{slot:"secondary_sidebar"}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p:K,i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function C_(t){let e,s;return e=new nN({}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function uP(t){let e,s,n=t[1]&&t[0].match(/^\/assets\/(.+?)\.[a-zA-Z0-9]+$/),r,i,l,o;e=new ko({props:{class:"media",$$slots:{secondary_sidebar:[aP],main:[oP],secondary_toolbar:[lP],primary_toolbar:[iP],primary_sidebar:[rP]},$$scope:{ctx:t}}});let a=n&&C_();return{c(){T(e.$$.fragment),s=R(),a&&a.c(),r=J()},m(u,c){S(e,u,c),w(u,s,c),a&&a.m(u,c),w(u,r,c),i=!0,l||(o=Ce(window,"hashchange",t[3]),l=!0)},p(u,[c]){const f={};c&128&&(f.$$scope={dirty:c,ctx:u}),e.$set(f),c&3&&(n=u[1]&&u[0].match(/^\/assets\/(.+?)\.[a-zA-Z0-9]+$/)),n?a?c&3&&p(a,1):(a=C_(),a.c(),p(a,1),a.m(r.parentNode,r)):a&&(H(),_(a,1,1,()=>{a=null}),V())},i(u){i||(p(e.$$.fragment,u),p(a),i=!0)},o(u){_(e.$$.fragment,u),_(a),i=!1},d(u){u&&(k(s),k(r)),E(e,u),a&&a.d(u),l=!1,o()}}}function cP(t,e,s){let n,r,i,l;U(t,Rn,c=>s(4,n=c)),U(t,ei,c=>s(1,r=c)),U(t,rs,c=>s(5,i=c)),U(t,os,c=>s(6,l=c));let o="";const a=()=>{s(0,{path:o}=go(),o);const[c,f,d]=o.match(/^\/assets(?:\/([/\-\w]+))?(?:\/([^/]+.\w{3,4}))?$/)||[];c&&(f?l.some(({internalPath:h})=>f===h)&&i!==f&&De(rs,i=f,i):De(rs,i="",i),De(ei,r=d&&n.find(h=>h.path===`${f}/${d}`)||null,r))};return Qt(()=>{a()}),[o,r,a,()=>{a()}]}class fP extends X{constructor(e){super(),Z(this,e,cP,uP,W,{})}}function dP(t){let e=t[1]("confirm_uploading_files",{values:{number:t[3].files.length,folder:`/${t[3].folder}`}})+"",s;return{c(){s=Y(e)},m(n,r){w(n,s,r)},p(n,r){r&10&&e!==(e=n[1]("confirm_uploading_files",{values:{number:n[3].files.length,folder:`/${n[3].folder}`}})+"")&&G(s,e)},d(n){n&&k(s)}}}function hP(t){let e=t[1]("confirm_uploading_file",{values:{folder:`/${t[3].folder}`}})+"",s;return{c(){s=Y(e)},m(n,r){w(n,s,r)},p(n,r){r&10&&e!==(e=n[1]("confirm_uploading_file",{values:{folder:`/${n[3].folder}`}})+"")&&G(s,e)},d(n){n&&k(s)}}}function pP(t){let e,s,n,r,i;function l(f,d){return f[3].files.length===1?hP:dP}let o=l(t),a=o(t);function u(f){t[4](f)}let c={};return t[3].files!==void 0&&(c.files=t[3].files),n=new th({props:c}),de.push(()=>We(n,"files",u)),{c(){e=P("div"),a.c(),s=R(),T(n.$$.fragment)},m(f,d){w(f,e,d),a.m(e,null),w(f,s,d),S(n,f,d),i=!0},p(f,d){o===(o=l(f))&&a?a.p(f,d):(a.d(1),a=o(f),a&&(a.c(),a.m(e,null)));const h={};!r&&d&8&&(r=!0,h.files=f[3].files,Ke(()=>r=!1)),n.$set(h)},i(f){i||(p(n.$$.fragment,f),i=!0)},o(f){_(n.$$.fragment,f),i=!1},d(f){f&&(k(e),k(s)),a.d(),E(n,f)}}}function mP(t){var n;let e,s;return e=new ls({props:{open:t[0],title:t[1]("upload_files"),okLabel:t[1](((n=t[2])==null?void 0:n.backendName)==="local"?"save":"upload_and_publish"),$$slots:{default:[pP]},$$scope:{ctx:t}}}),e.$on("ok",t[5]),e.$on("cancel",t[6]),{c(){T(e.$$.fragment)},m(r,i){S(e,r,i),s=!0},p(r,[i]){var o;const l={};i&1&&(l.open=r[0]),i&2&&(l.title=r[1]("upload_files")),i&6&&(l.okLabel=r[1](((o=r[2])==null?void 0:o.backendName)==="local"?"save":"upload_and_publish")),i&138&&(l.$$scope={dirty:i,ctx:r}),e.$set(l)},i(r){s||(p(e.$$.fragment,r),s=!0)},o(r){_(e.$$.fragment,r),s=!1},d(r){E(e,r)}}}function _P(t,e,s){let n,r,i,l;U(t,MT,c=>s(0,n=c)),U(t,_e,c=>s(1,r=c)),U(t,Sn,c=>s(2,i=c)),U(t,Nn,c=>s(3,l=c));function o(c){t.$$.not_equal(l.files,c)&&(l.files=c,Nn.set(l))}return[n,r,i,l,o,async()=>{await _L(l,{commitType:"uploadMedia"}),De(Nn,l={folder:null,files:[]},l)},()=>{De(Nn,l={folder:null,files:[]},l)}]}class gP extends X{constructor(e){super(),Z(this,e,_P,mP,W,{})}}function bP(t){ge(t,"svelte-soravq","div.svelte-soravq{flex:auto;overflow:auto}pre.svelte-soravq{margin:0;padding:16px}")}function yP(t){let e,s,n=xi.stringify(t[1])+"",r,i;return{c(){e=P("div"),s=P("pre"),r=Y(n),M(s,"class","svelte-soravq"),M(e,"aria-label",i=t[0]("site_config")),M(e,"class","svelte-soravq")},m(l,o){w(l,e,o),N(e,s),N(s,r)},p(l,o){o&2&&n!==(n=xi.stringify(l[1])+"")&&G(r,n),o&1&&i!==(i=l[0]("site_config"))&&M(e,"aria-label",i)},d(l){l&&k(e)}}}function kP(t){let e,s;return e=new ko({props:{class:"content",$$slots:{main:[yP]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,[r]){const i={};r&7&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function wP(t,e,s){let n,r;return U(t,_e,i=>s(0,n=i)),U(t,ct,i=>s(1,r=i)),[n,r]}class vP extends X{constructor(e){super(),Z(this,e,wP,kP,W,{},bP)}}const $P={collections:"Collections",contents:"Contents",entries:"Entries",assets:"Assets",media:"Media",workflow:"Workflow",editorial_workflow:"Editorial Workflow",notifications:"Notifications",site_config:"Site Configuration",preferences:"Preferences",account:"Account",live_site:"Live Site",git_repository:"Git Repository",help:{documentation:"Documentation",issue:"Report Issue",feedback:"Share Feedback"},sign_in:"Sign In",sign_in_with_x:"Sign In with {name}",signed_in_as_x:"Signed In as {name}",work_with_local_repo:"Work with Local Repository",working_with_local_repo:"Working with Local Repository",sign_out:"Sign Out",create:"New",select:"Select",select_all:"Select All",clear_selection:"Clear Selection",upload:"Upload",upload_and_publish:"Upload & Publish",copy:"Copy",download:"Download",add:"Add",delete:"Delete",duplicate:"Duplicate",save:"Save",publish:"Publish",save_and_publish:"Save & Publish",saving:"Saving…",ok:"OK",cancel:"Cancel",replace:"Replace",remove:"Remove",clear:"Clear",expand:"Expand",collapse:"Collapse",close:"Close",insert:"Insert",show_menu:"Show Menu",hide_menu:"Hide Menu",move_to:"Move to…",search:"Search",searching:"Searching…",error:"error",loading_site_config:"Loading Site Configuration…",loading_site_data:"Loading Site Data…",search_placeholder:"Search for entries and assets…",asset:"Asset",collection_not_found:"Collection not found.",actions:"Actions",switch_view:"Switch View",list_view:"List View",grid_view:"Grid View",sort_by:"Sort by",sort_field:"Sort Field",sort_keys:{none:"None",name:"Name",commit_author:"Author",commit_date:"Last Modified"},sort_order:"Sort Order",ascending:"Ascending",descending:"Descending",filter_by:"Filter by",group_by:"Group by",file_type:"File Type",all:"All",image:"Image",video:"Video",audio:"Audio",document:"Document",other:"Other",show_assets:"Show Assets",show_info:"Show Info",default:"Default",all_files:"All Files",collection_files:"Collection Files",uncategorized:"Uncategorized",x_collection_media_folder:"{collection} Collection Media Folder",search_results_for_x:"Search Results for “{terms}”",no_files_found:"No files found.",no_entries_found:"No entries found.",drop_files_or_browse:"Drop a file here or click to browse:",drop_files_here:"Drop files here",delete_file:"Delete File",delete_files:"Delete Files",confirm_deleting_selected_file:"Are you sure to delete the selected file?",confirm_deleting_selected_files:"Are you sure to delete the selected {number} files?",confirm_deleting_all_files:"Are you sure to delete all the files?",delete_entry:"Delete Entry",delete_entries:"Delete Entries",confirm_deleting_this_entry:"Are you sure to delete this entry?",confirm_deleting_selected_entry:"Are you sure to delete the selected entry?",confirm_deleting_selected_entries:"Are you sure to delete the selected {number} entries?",confirm_deleting_all_entries:"Are you sure to delete all the entries?",upload_files:"Upload Files",uploading_files:"Uploading Files",confirm_uploading_file:"Are you sure to save the following file to the {folder} folder?",confirm_uploading_files:"Are you sure to save the following {number} files to the {folder} folder?",no_entries_created:"This collection has no entries yet.",create_new_entry:"Create New Entry",no_files_created:"This collection has no files.",multi_files_selected:"Multiple files are selected.",select_asset_show_info:"Select a file to show the info.",creating_x:"Creating {name}",editing_x:"Editing {name}",show_preview:"Show Preview",sync_scrolling:"Sync Scrolling",edit:"Edit",preview:"Preview",unsupported_widget_x:"Unsupported widget: {name}",copy_from:"Copy from…",copy_from_x:"Copy from {locale}",translate_from:"Translate from…",translate_from_x:"Translate from {locale}",revert_changes:"Revert Changes",revert_all_changes:"Revert All Changes",required:"Required",validation:{value_missing:"This field is required.",range_underflow:"You have to select at least {min} items.",range_overflow:"You cannot select more than {max} items."},saving_entry:{error:{title:"Error",description:"There was an error while saving the entry. Please try again later."}},no_preview_available:"No Preview Available.",public_url:"Public URL",file_path:"File Path",kind:"Kind",size:"Size",dimensions:"Dimensions",duration:"Duration",used_in:"Used in",move_up:"Move Up",move_down:"Move Down",today:"Today",current_time:"Current Time",add_x:"Add {name}",drag_to_sort_items:"Drag to sort items",select_file:"Select File",select_image:"Select Image",select_from_library:"Select from Library",library_locations:{this_repository:"This Repository",external_locations:"External Locations",stock_photos:"Stock Photos"},enter_url:"Enter URL",enter_image_url:"Enter URL of the image:",insert_stock_photo:"Insert Stock Photo",large_file:{title:"Large File",description:"This file exceeds the maximum size of {size}. Please choose another."},photo_credit:{title:"Photo Credit",description:"Use the following credit if possible:"},boolean:{true:"Yes",false:"No"},stock_photos:{not_found:"No photos found.",error:{invalid_key:"Your API Key is invalid or expired. Please double check and try again.",search_fetch_failed:"There was an error while searching photos. Please try again later.",image_fetch_failed:"There was an error while downloading the selected photo. Please try again later."}},config:{error:{fetch_failed:"The configuration file could not be retrieved.",parse_failed:"The configuration file could not be parsed.",no_collection:"Collections are not defined in the configuration file.",no_backend:"The backend is not defined in the configuration file.",unsupported_backend:"The configured “{name}” backend is not supported.",no_media_folder:"The media folder is not defined in the configuration file.",unexpected:"There was an unexpected error while validating the configuration file.",try_again:"Please solve the issue and try again."}},unsupported:{browser:"Local development is not supported in your browser. Please use Chrome or Edge instead.",storage:"Local storage is disabled in your browser. Please check your privacy (cookies) settings and try again.",unexpected:"There was an unexpected error while signing in. Please try again later."},general:"General",status:{drafts:"Drafts",in_review:"In Review",ready:"Ready"},prefs:{error:{permission_denied:"Browser storage (Cookie) access has been denied. Please check the permission and try again."},appearance:{title:"Appearance",theme:"Theme"},theme:{auto:"Auto",dark:"Dark",light:"Light"},languages:{title:"Languages",ui_language:{title:"User Interface Language"},translator:{title:"{service} Translator",field_label:"{service} API Authentication Key",description:"Sign up for <a {homeHref}>{service} API</a> and enter <a {apiKeyHref}>your Authentication Key</a> here to enable quick translation of text entry fields."}},media:{title:"Media",stock_photo:{title:"{service} Free Images",field_label:"{service} API Key",description:"Sign up for <a {homeHref}>{service} API</a> and enter <a {apiKeyHref}>your API Key</a> here to insert free stock photos to image entry fields.",credit:"Photos provided by {service}"}},advanced:{title:"Advanced",developer_mode:{title:"Developer Mode",description:"Enable some features, including detailed console logs and native context menus.",switch_label:"Enable Developer Mode"}}},file_type_labels:{avif:"AVIF image",bmp:"Bitmap image",gif:"GIF image",ico:"Icon",jpeg:"JPEG image",jpg:"JPEG image",png:"PNG image",svg:"SVG image",tiff:"TIFF image",webp:"WebP image",avi:"AVI video",mp4:"MP4 video",mpeg:"MPEG video",ogv:"OGG video",ts:"MPEG video",webm:"WebM video","3gp":"3GPP video","3g2":"3GPP2 video",aac:"AAC audio",mid:"MIDI",midi:"MIDI",mp3:"MP3 audio",opus:"OPUS audio",wav:"WAV audio",weba:"WebM audio",csv:"CSV spreadsheet",doc:"Word document",docx:"Word document",odp:"OpenDocument presentation",ods:"OpenDocument spreadsheet",odt:"OpenDocument text",pdf:"PDF document",ppt:"PowerPoint presentation",pptx:"PowerPoint presentation",rtf:"Rich text document",xls:"Excel spreadsheet",xlsx:"Excel spreadsheet"}},SP=Object.freeze(Object.defineProperty({__proto__:null,strings:$P},Symbol.toStringTag,{value:"Module"})),EP={collections:"コレクション",contents:"コンテンツ",entries:"エントリー",assets:"ファイル",media:"メディア",workflow:"ワークフロー",editorial_workflow:"編集ワークフロー",notifications:"通知",site_config:"サイト設定",preferences:"個人設定",account:"アカウント",live_site:"本番サイト",git_repository:"Git レポジトリ",help:{documentation:"ドキュメンテーション",issue:"問題を報告",feedback:"フィードバックを共有"},sign_in:"ログイン",sign_in_with_x:"{name} でログイン",signed_in_as_x:"{name} としてログイン中",work_with_local_repo:"ローカルレポジトリで作業",working_with_local_repo:"ローカルレポジトリで作業中",sign_out:"ログアウト",create:"新規作成",select:"選択",select_all:"すべて選択",clear_selection:"選択を解除",upload:"アップロード",upload_and_publish:"アップロードして公開",copy:"コピー",download:"ダウンロード",add:"追加",delete:"削除",duplicate:"複製",save:"保存",publish:"公開",save_and_publish:"保存して公開",saving:"保存中…",ok:"OK",cancel:"キャンセル",replace:"置き換え",remove:"削除",clear:"クリア",expand:"広げる",collapse:"折り畳む",close:"閉じる",insert:"挿入",show_menu:"メニューを開く",hide_menu:"メニューを閉じる",move_to:"フォルダへ移動…",search:"検索",searching:"検索中…",error:"エラー",loading_site_config:"サイト設定を読み込んでいます…",loading_site_data:"サイトデータを読み込んでいます…",search_placeholder:"エントリーとファイルを検索…",asset:"ファイル",collection_not_found:"コレクションが見つかりませんでした",actions:"アクション",switch_view:"ビューを切り替え",list_view:"リストビュー",grid_view:"グリッドビュー",sort_by:"並び替え",sort_field:"並べ替え項目",sort_keys:{none:"なし",name:"名前",commit_author:"作成者",commit_date:"最終更新日時"},sort_order:"並べ替え順",ascending:"昇順",descending:"降順",filter_by:"絞り込み",group_by:"グループ化",file_type:"ファイル形式",all:"すべて",image:"画像",video:"動画",audio:"音声",document:"書類",other:"その他",show_assets:"ファイルを表示",show_info:"情報を表示",default:"デフォルト",all_files:"すべてのファイル",collection_files:"コレクションファイル",uncategorized:"未分類",x_collection_media_folder:"{collection} コレクションメディアフォルダー",search_results_for_x:"「{terms}」の検索結果",no_files_found:"ファイルは見つかりませんでした。",no_entries_found:"エントリーは見つかりませんでした。",drop_files_or_browse:"ここにファイルをドロップするか下のボタンをクリックして参照:",drop_files_here:"ここにファイルをドロップ",delete_file:"ファイルを削除",delete_files:"ファイルを削除",confirm_deleting_selected_file:"選択されたファイルを削除してもよろしいですか?",confirm_deleting_selected_files:"選択された {number} ファイルを削除してもよろしいですか?",confirm_deleting_all_files:"すべてのファイルを削除してもよろしいですか?",delete_entry:"エントリーを削除",delete_entries:"エントリーを削除",confirm_deleting_this_entry:"このエントリーを削除してもよろしいですか?",confirm_deleting_selected_entry:"選択されたエントリーを削除してもよろしいですか?",confirm_deleting_selected_entries:"選択された {number} エントリーを削除してもよろしいですか?",confirm_deleting_all_entries:"すべてのエントリーを削除してもよろしいですか?",upload_files:"ファイルをアップロード",uploading_files:"ファイルをアップロードしています",confirm_uploading_file:"以下のファイルを {folder} フォルダーに保存してもよろしいですか?",confirm_uploading_files:"以下の {number} ファイルを {folder} フォルダーに保存してもよろしいですか?",no_entries_created:"このコレクションにはまだエントリーがありません。",create_new_entry:"新しいエントリーを作成",no_files_created:"このコレクションにはファイルがありません。",multi_files_selected:"複数のファイルが選択されています。",select_asset_show_info:"ファイルを選択すると情報が表示されます。",creating_x:"{name} を作成",editing_x:"{name} を編集",show_preview:"プレビューを表示",sync_scrolling:"スクロールを同期",edit:"編集",preview:"プレビュー",unsupported_widget_x:"非対応ウィジェット: {name}",copy_from:"他の言語からコピー…",copy_from_x:"{locale} からコピー",translate_from:"他の言語から翻訳…",translate_from_x:"{locale} から翻訳",revert_changes:"変更を取り消す",revert_all_changes:"すべての変更を取り消す",required:"必須",validation:{value_missing:"この項目は必須です。",range_underflow:"少なくとも {min} 個の項目を選択してください。",range_overflow:"選択できるのは最大で {max} 項目です。"},saving_entry:{error:{title:"エラー",description:"エントリーを保存中に問題が発生しました。後で再度お試しください。"}},no_preview_available:"プレビューは表示できません",public_url:"公開 URL",file_path:"ファイルパス",kind:"種類",size:"サイズ",dimensions:"大きさ",duration:"再生時間",used_in:"使われているエントリー",move_up:"上へ移動",move_down:"下へ移動",today:"今日",current_time:"現在時刻",add_x:"{name} を追加",drag_to_sort_items:"ドラッグしてアイテムを並び替え",select_file:"ファイルを選択",select_image:"画像を選択",select_from_library:"ライブラリから選択",library_locations:{this_repository:"このレポジトリ",external_locations:"外部の場所",stock_photos:"ストックフォト"},enter_url:"URL を入力",enter_image_url:"画像の URL を入力:",insert_stock_photo:"ストックフォトを挿入",large_file:{title:"大きなファイル",description:"このファイルは最大サイズ {size} を超えています。他のファイルを選んでください。"},photo_credit:{title:"写真クレジット",description:"可能であれば以下のクレジットを使ってください:"},boolean:{true:"はい",false:"いいえ"},stock_photos:{not_found:"写真は見つかりませんでした。",error:{invalid_key:"あなたの API Key は正しくないか期限切れです。確認の上、再度お試しください。",search_fetch_failed:"写真を検索中に問題が発生しました。後で再度お試しください。",image_fetch_failed:"選択された写真をダウンロード中に問題が発生しました。後で再度お試しください。"}},config:{error:{fetch_failed:"設定ファイルを読み込めませんでした。",parse_failed:"設定ファイルを解析できませんでした。",no_collection:"設定ファイル内でコレクションが定義されていません。",no_backend:"設定ファイル内でバックエンドが定義されていません。",unsupported_backend:"設定されている「{name}」バックエンドは非対応です。",no_media_folder:"設定ファイル内でメディアフォルダーが定義されていません。",unexpected:"設定ファイルを検証中に予期せぬ問題が発生しました。",try_again:"問題を解決してから再度お試しください。"}},unsupported:{browser:"お使いのブラウザーはローカル開発に対応していません。代わりに Chrome か Edge を使ってください。",storage:"お使いのブラウザーでローカルストレージが無効化されています。プライバシー (クッキー) 設定を確認の上、再度お試しください。",unexpected:"ログイン中に予期せぬ問題が発生しました。後で再度お試しください。"},general:"一般",status:{drafts:"下書き",in_review:"レビュー中",ready:"公開可"},prefs:{error:{permission_denied:"ブラウザーストレージ (Cookie) アクセスが拒否されました。許可設定を確認の上、再度お試しください。"},appearance:{title:"アピアランス",theme:"テーマ"},theme:{auto:"自動",dark:"ダーク",light:"ライト"},languages:{title:"言語",ui_language:{title:"ユーザーインターフェース言語"},translator:{title:"{service} 翻訳",field_label:"{service} API 認証キー",description:"<a {homeHref}>{service} API</a> にユーザー登録して、<a {apiKeyHref}>発行された認証キー</a> をここに入力すると、テキストエントリー項目の素早い翻訳が可能となります。"}},media:{title:"メディア",stock_photo:{title:"{service} 無料画像素材",field_label:"{service} API キー",description:"<a {homeHref}>{service} API</a> にユーザー登録して、<a {apiKeyHref}>発行された API キー</a> をここに入力すると、画像エントリー項目に無料のストックフォトを挿入できます。",credit:"写真提供: {service}"}},advanced:{title:"詳細",developer_mode:{title:"開発者モード",description:"詳細なコンソールログやネイティブコンテキストメニューなど、いくつかの機能を有効化します。",switch_label:"開発者モードを有効にする"}}},file_type_labels:{avif:"AVIF 画像",bmp:"Bitmap 画像",gif:"GIF 画像",ico:"アイコン",jpeg:"JPEG 画像",jpg:"JPEG 画像",png:"PNG 画像",svg:"SVG 画像",tiff:"TIFF 画像",webp:"WebP 画像",avi:"AVI 動画",mp4:"MP4 動画",mpeg:"MPEG 動画",ogv:"OGG 動画",ts:"MPEG 動画",webm:"WebM 動画","3gp":"3GPP 動画","3g2":"3GPP2 動画",aac:"AAC 音声",mid:"MIDI",midi:"MIDI",mp3:"MP3 音声",opus:"OPUS 音声",wav:"WAV 音声",weba:"WebM 音声",csv:"CSV スプレッドシート",doc:"Word ドキュメント",docx:"Word ドキュメント",odp:"OpenDocument プレゼンテーション",ods:"OpenDocument スプレッドシート",odt:"OpenDocument テキスト",pdf:"PDF ドキュメント",ppt:"PowerPoint プレゼンテーション",pptx:"PowerPoint プレゼンテーション",rtf:"リッチテキストドキュメント",xls:"Excel スプレッドシート",xlsx:"Excel スプレッドシート"}},TP=Object.freeze(Object.defineProperty({__proto__:null,strings:EP},Symbol.toStringTag,{value:"Module"})),AP=()=>{Object.entries(Object.assign({"../locales/en.js":SP,"../locales/ja.js":TP})).forEach(([e,{strings:s}])=>{const[,n]=e.match(/([a-zA-Z-]+)\.js/);ld(n,s)}),c0({fallbackLocale:"en",initialLocale:(K2()||"").split("-")[0]||"en"})},ni=t=>{try{return new Intl.DisplayNames(ne(Tn),{type:"language"}).of(t)}catch{return t}};function D_(t,e,s){const n=t.slice();return n[18]=e[s],n}function M_(t){let e,s;function n(){return t[14](t[18])}return e=new Wt({props:{label:t[5](t[1]?"translate_from_x":"copy_from_x",{values:{locale:ni(t[18])}}),disabled:t[1]&&(!t[3].includes(t[0].toUpperCase())||!t[2].includes(t[18].toUpperCase()))}}),e.$on("click",n),{c(){T(e.$$.fragment)},m(r,i){S(e,r,i),s=!0},p(r,i){t=r;const l={};i&50&&(l.label=t[5](t[1]?"translate_from_x":"copy_from_x",{values:{locale:ni(t[18])}})),i&31&&(l.disabled=t[1]&&(!t[3].includes(t[0].toUpperCase())||!t[2].includes(t[18].toUpperCase()))),e.$set(l)},i(r){s||(p(e.$$.fragment,r),s=!0)},o(r){_(e.$$.fragment,r),s=!1},d(r){E(e,r)}}}function OP(t){let e,s,n=ae(t[4]),r=[];for(let l=0;l<n.length;l+=1)r[l]=M_(D_(t,n,l));const i=l=>_(r[l],1,1,()=>{r[l]=null});return{c(){for(let l=0;l<r.length;l+=1)r[l].c();e=J()},m(l,o){for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(l,o);w(l,e,o),s=!0},p(l,[o]){if(o&127){n=ae(l[4]);let a;for(a=0;a<n.length;a+=1){const u=D_(l,n,a);r[a]?(r[a].p(u,o),p(r[a],1)):(r[a]=M_(u),r[a].c(),p(r[a],1),r[a].m(e.parentNode,e))}for(H(),a=n.length;a<r.length;a+=1)i(a);V()}},i(l){if(!s){for(let o=0;o<n.length;o+=1)p(r[o]);s=!0}},o(l){r=r.filter(Boolean);for(let o=0;o<r.length;o+=1)_(r[o]);s=!1},d(l){l&&k(e),fs(r,l)}}}function LP(t,e,s){let n,r,i,l,o,a,u,c,f,d,h,m,g;U(t,Bl,O=>s(16,c=O)),U(t,jl,O=>s(17,f=O)),U(t,mt,O=>s(11,d=O)),U(t,Va,O=>s(12,h=O)),U(t,Ue,O=>s(13,m=O)),U(t,_e,O=>s(5,g=O));let{locale:b=""}=e,{keyPath:y=""}=e,{translate:v=!1}=e;const $=async O=>{v&&!u?(De(jl,f=!0,f),De(Bl,c=[O,b,y,v],c)):Yk(O,b,y,v)},C=O=>{$(O)};return t.$$set=O=>{"locale"in O&&s(0,b=O.locale),"keyPath"in O&&s(7,y=O.keyPath),"translate"in O&&s(1,v=O.translate)},t.$$.update=()=>{t.$$.dirty&8192&&s(10,{hasLocales:n,locales:r}=m.collection._i18n,n,(s(9,r),s(13,m))),t.$$.dirty&1537&&s(4,i=n?r.filter(O=>O!==b):[]),t.$$.dirty&4096&&s(8,{serviceId:l,sourceLanguages:o=[],targetLanguages:a=[]}=h||{serviceId:void 0,sourceLanguages:void 0,targetLanguages:void 0},l,(s(3,o),s(12,h)),(s(2,a),s(12,h))),t.$$.dirty&2304&&(u=d.apiKeys[l]||"")},[b,v,a,o,i,g,$,y,l,r,n,d,h,m,C]}class Ya extends X{constructor(e){super(),Z(this,e,LP,OP,W,{locale:0,keyPath:7,translate:1})}}function NP(t){ge(t,"svelte-37f1h5",'.header.svelte-37f1h5{flex:none !important;background-color:var(--sui-tertiary-background-color)}.header.svelte-37f1h5>[role="toolbar"]{margin-right:auto;margin-left:auto;max-width:800px}.header.svelte-37f1h5>[role="toolbar"] h3{font-size:var(--sui-font-size-default)}.header.svelte-37f1h5>[role="toolbar"] button.error{color:var(--sui-error-foreground-color)}')}function R_(t,e,s){const n=t.slice();n[21]=e[s];const r=ni(n[21]);n[22]=r;const i=Object.values(n[9][n[21]]).some(({valid:l})=>!l);return n[23]=i,n}function PP(t){let e,s=(t[5].mode==="preview"?t[11]("preview"):t[11]("edit"))+"",n;return{c(){e=P("h3"),n=Y(s)},m(r,i){w(r,e,i),N(e,n)},p(r,i){i&2080&&s!==(s=(r[5].mode==="preview"?r[11]("preview"):r[11]("edit"))+"")&&G(n,s)},i:K,o:K,d(r){r&&k(e)}}}function IP(t){let e,s;return e=new od({props:{$$slots:{default:[DP]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&67116840&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function F_(t){let e,s;function n(){return t[18](t[21])}return e=new Wl({props:{selected:t[5].mode==="edit"&&t[5].locale===t[21],class:"tertiary small "+(t[23]?"error":""),label:t[22],$$slots:{default:[CP]},$$scope:{ctx:t}}}),e.$on("click",n),{c(){T(e.$$.fragment)},m(r,i){S(e,r,i),s=!0},p(r,i){t=r;const l={};i&40&&(l.selected=t[5].mode==="edit"&&t[5].locale===t[21]),i&520&&(l.class="tertiary small "+(t[23]?"error":"")),i&8&&(l.label=t[22]),i&67111432&&(l.$$scope={dirty:i,ctx:t}),e.$set(l)},i(r){s||(p(e.$$.fragment,r),s=!0)},o(r){_(e.$$.fragment,r),s=!1},d(r){E(e,r)}}}function U_(t){let e,s;return e=new ke({props:{slot:"end-icon",name:"error",label:t[11]("error")}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&2048&&(i.label=n[11]("error")),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function CP(t){let e,s,n=t[23]&&U_(t);return{c(){n&&n.c(),e=J()},m(r,i){n&&n.m(r,i),w(r,e,i),s=!0},p(r,i){r[23]?n?(n.p(r,i),i&520&&p(n,1)):(n=U_(r),n.c(),p(n,1),n.m(e.parentNode,e)):n&&(H(),_(n,1,1,()=>{n=null}),V())},i(r){s||(p(n),s=!0)},o(r){_(n),s=!1},d(r){r&&k(e),n&&n.d(r)}}}function j_(t){let e,s,n=!(t[10].mode==="edit"&&t[10].locale===t[21])&&F_(t);return{c(){n&&n.c(),e=J()},m(r,i){n&&n.m(r,i),w(r,e,i),s=!0},p(r,i){r[10].mode==="edit"&&r[10].locale===r[21]?n&&(H(),_(n,1,1,()=>{n=null}),V()):n?(n.p(r,i),i&1032&&p(n,1)):(n=F_(r),n.c(),p(n,1),n.m(e.parentNode,e))},i(r){s||(p(n),s=!0)},o(r){_(n),s=!1},d(r){r&&k(e),n&&n.d(r)}}}function B_(t){let e,s;return e=new Wl({props:{selected:t[5].mode==="preview",class:"tertiary small",label:t[11]("preview")}}),e.$on("click",t[19]),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&32&&(i.selected=n[5].mode==="preview"),r&2048&&(i.label=n[11]("preview")),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function DP(t){let e,s,n,r=ae(t[3]),i=[];for(let a=0;a<r.length;a+=1)i[a]=j_(R_(t,r,a));const l=a=>_(i[a],1,1,()=>{i[a]=null});let o=t[10].mode==="edit"&&t[8]&&t[12].showPreview&&B_(t);return{c(){for(let a=0;a<i.length;a+=1)i[a].c();e=R(),o&&o.c(),s=J()},m(a,u){for(let c=0;c<i.length;c+=1)i[c]&&i[c].m(a,u);w(a,e,u),o&&o.m(a,u),w(a,s,u),n=!0},p(a,u){if(u&3624){r=ae(a[3]);let c;for(c=0;c<r.length;c+=1){const f=R_(a,r,c);i[c]?(i[c].p(f,u),p(i[c],1)):(i[c]=j_(f),i[c].c(),p(i[c],1),i[c].m(e.parentNode,e))}for(H(),c=r.length;c<i.length;c+=1)l(c);V()}a[10].mode==="edit"&&a[8]&&a[12].showPreview?o?(o.p(a,u),u&5376&&p(o,1)):(o=B_(a),o.c(),p(o,1),o.m(s.parentNode,s)):o&&(H(),_(o,1,1,()=>{o=null}),V())},i(a){if(!n){for(let u=0;u<r.length;u+=1)p(i[u]);p(o),n=!0}},o(a){i=i.filter(Boolean);for(let u=0;u<i.length;u+=1)_(i[u]);_(o),n=!1},d(a){a&&(k(e),k(s)),fs(i,a),o&&o.d(a)}}}function z_(t){let e,s;return e=new er({props:{class:"ghost iconic",popupPosition:"bottom-right",$$slots:{popup:[FP],"start-icon":[MP]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&67111140&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function MP(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"more_vert",label:t[11]("show_menu")}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&2048&&(i.label=n[11]("show_menu")),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function H_(t){let e,s,n,r,i,l,o;e=new Ya({props:{locale:t[5].locale,translate:!0}});let a=t[2].length>1&&V_();return r=new Ya({props:{locale:t[5].locale}}),l=new wn({}),{c(){T(e.$$.fragment),s=R(),a&&a.c(),n=R(),T(r.$$.fragment),i=R(),T(l.$$.fragment)},m(u,c){S(e,u,c),w(u,s,c),a&&a.m(u,c),w(u,n,c),S(r,u,c),w(u,i,c),S(l,u,c),o=!0},p(u,c){const f={};c&32&&(f.locale=u[5].locale),e.$set(f),u[2].length>1?a?c&4&&p(a,1):(a=V_(),a.c(),p(a,1),a.m(n.parentNode,n)):a&&(H(),_(a,1,1,()=>{a=null}),V());const d={};c&32&&(d.locale=u[5].locale),r.$set(d)},i(u){o||(p(e.$$.fragment,u),p(a),p(r.$$.fragment,u),p(l.$$.fragment,u),o=!0)},o(u){_(e.$$.fragment,u),_(a),_(r.$$.fragment,u),_(l.$$.fragment,u),o=!1},d(u){u&&(k(s),k(n),k(i)),E(e,u),a&&a.d(u),E(r,u),E(l,u)}}}function V_(t){let e,s;return e=new wn({}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function RP(t){let e,s,n,r=t[7]&&H_(t);return s=new Wt({props:{label:t[11]("revert_changes"),disabled:!t[6]}}),s.$on("click",t[20]),{c(){r&&r.c(),e=R(),T(s.$$.fragment)},m(i,l){r&&r.m(i,l),w(i,e,l),S(s,i,l),n=!0},p(i,l){i[7]?r?(r.p(i,l),l&128&&p(r,1)):(r=H_(i),r.c(),p(r,1),r.m(e.parentNode,e)):r&&(H(),_(r,1,1,()=>{r=null}),V());const o={};l&2048&&(o.label=i[11]("revert_changes")),l&64&&(o.disabled=!i[6]),s.$set(o)},i(i){n||(p(r),p(s.$$.fragment,i),n=!0)},o(i){_(r),_(s.$$.fragment,i),n=!1},d(i){i&&k(e),r&&r.d(i),E(s,i)}}}function FP(t){let e,s;return e=new Ls({props:{slot:"popup",$$slots:{default:[RP]},$$scope:{ctx:t}}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&67111140&&(i.$$scope={dirty:r,ctx:n}),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function UP(t){let e,s,n,r,i,l,o;const a=[IP,PP],u=[];function c(d,h){return d[4]?0:1}e=c(t),s=u[e]=a[e](t),r=new _n({props:{flex:!0}});let f=t[5].mode==="edit"&&z_(t);return{c(){s.c(),n=R(),T(r.$$.fragment),i=R(),f&&f.c(),l=J()},m(d,h){u[e].m(d,h),w(d,n,h),S(r,d,h),w(d,i,h),f&&f.m(d,h),w(d,l,h),o=!0},p(d,h){let m=e;e=c(d),e===m?u[e].p(d,h):(H(),_(u[m],1,1,()=>{u[m]=null}),V(),s=u[e],s?s.p(d,h):(s=u[e]=a[e](d),s.c()),p(s,1),s.m(n.parentNode,n)),d[5].mode==="edit"?f?(f.p(d,h),h&32&&p(f,1)):(f=z_(d),f.c(),p(f,1),f.m(l.parentNode,l)):f&&(H(),_(f,1,1,()=>{f=null}),V())},i(d){o||(p(s),p(r.$$.fragment,d),p(f),o=!0)},o(d){_(s),_(r.$$.fragment,d),_(f),o=!1},d(d){d&&(k(n),k(i),k(l)),u[e].d(d),E(r,d),f&&f.d(d)}}}function jP(t){let e,s,n;return s=new tr({props:{class:"secondary",$$slots:{default:[UP]},$$scope:{ctx:t}}}),{c(){e=P("div"),T(s.$$.fragment),M(e,"class","header svelte-37f1h5")},m(r,i){w(r,e,i),S(s,e,null),n=!0},p(r,[i]){const l={};i&67117052&&(l.$$scope={dirty:i,ctx:r}),s.$set(l)},i(r){n||(p(s.$$.fragment,r),n=!0)},o(r){_(s.$$.fragment,r),n=!1},d(r){r&&k(e),E(s)}}}function BP(t,e,s){let n,r,i,l,o,a,u,c,f,d,h,m,g=K,b=()=>(g(),g=Mn(I,Q=>s(5,m=Q)),I),y,v,$=K,C=()=>($(),$=Mn(D,Q=>s(10,v=Q)),D),O,A;U(t,Ue,Q=>s(17,y=Q)),U(t,_e,Q=>s(11,O=Q)),U(t,yr,Q=>s(12,A=Q)),t.$$.on_destroy.push(()=>g()),t.$$.on_destroy.push(()=>$());let{thisPane:I=Me({})}=e;b();let{thatPane:D=Me({})}=e;C();const L=Q=>{De(I,m={mode:"edit",locale:Q},m),v.mode==="preview"&&De(D,v={mode:"preview",locale:Q},v)},B=()=>{De(I,m={mode:"preview",locale:v.locale},m)},z=()=>{sh(m.locale)};return t.$$set=Q=>{"thisPane"in Q&&b(s(0,I=Q.thisPane)),"thatPane"in Q&&C(s(1,D=Q.thatPane))},t.$$.update=()=>{var Q,F;t.$$.dirty&131072&&s(16,{collection:n,collectionFile:r,currentValues:i,originalValues:l,validities:o}=y||{collection:void 0,collectionFile:void 0,currentValues:void 0,originalValues:void 0,validities:void 0},n,(s(15,r),s(17,y)),(s(14,i),s(17,y)),(s(13,l),s(17,y)),(s(9,o),s(17,y))),t.$$.dirty&65536&&s(4,{hasLocales:a,locales:u}=n._i18n,a,(s(3,u),s(16,n),s(17,y))),t.$$.dirty&56&&s(2,c=a?u.filter(te=>te!==m.locale):[]),t.$$.dirty&98304&&s(8,f=((Q=n==null?void 0:n.editor)==null?void 0:Q.preview)!==!1&&((F=r==null?void 0:r.editor)==null?void 0:F.preview)!==!1),t.$$.dirty&4&&s(7,d=!!c.length),t.$$.dirty&24608&&s(6,h=!Un(i[m.locale],l[m.locale]))},[I,D,c,u,a,m,h,d,f,o,v,O,A,l,i,r,n,y,L,B,z]}class Gk extends X{constructor(e){super(),Z(this,e,BP,jP,W,{thisPane:0,thatPane:1},NP)}}function zP(t){let e,s,n;function r(l){t[8](l)}let i={disabled:t[1]};return t[0]!==void 0&&(i.checked=t[0]),e=new l0({props:i}),de.push(()=>We(e,"checked",r)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,[o]){const a={};o&2&&(a.disabled=l[1]),!s&&o&1&&(s=!0,a.checked=l[0],Ke(()=>s=!1)),e.$set(a)},i(l){n||(p(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function HP(t,e,s){let n,r,i,l;U(t,Ue,d=>s(7,l=d));let{locale:o=""}=e,{keyPath:a=""}=e,{fieldConfig:u=void 0}=e,{currentValue:c=void 0}=e;function f(d){c=d,s(0,c)}return t.$$set=d=>{"locale"in d&&s(2,o=d.locale),"keyPath"in d&&s(3,a=d.keyPath),"fieldConfig"in d&&s(4,u=d.fieldConfig),"currentValue"in d&&s(0,c=d.currentValue)},t.$$.update=()=>{t.$$.dirty&16&&s(6,{i18n:n}=u,n),t.$$.dirty&128&&s(5,{defaultLocale:r="default"}=l.collection._i18n,r),t.$$.dirty&100&&s(1,i=n==="duplicate"&&o!==r)},[c,i,o,a,u,r,n,l,f]}class VP extends X{constructor(e){super(),Z(this,e,HP,zP,W,{locale:2,keyPath:3,fieldConfig:4,currentValue:0})}}function YP(t){ge(t,"svelte-1r23g0y","div.svelte-1r23g0y.svelte-1r23g0y{display:flex;align-items:center;gap:8px}div.svelte-1r23g0y .value.svelte-1r23g0y{flex:auto}")}function GP(t){let e=(t[0]||"")+"",s;return{c(){s=Y(e)},m(n,r){w(n,s,r)},p(n,r){r&1&&e!==(e=(n[0]||"")+"")&&G(s,e)},i:K,o:K,d(n){n&&k(s)}}}function WP(t){let e,s,n;function r(l){t[11](l)}let i={};return t[0]!==void 0&&(i.value=t[0]),e=new hs({props:i}),de.push(()=>We(e,"value",r)),{c(){T(e.$$.fragment)},m(l,o){S(e,l,o),n=!0},p(l,o){const a={};!s&&o&1&&(s=!0,a.value=l[0],Ke(()=>s=!1)),e.$set(a)},i(l){n||(p(e.$$.fragment,l),n=!0)},o(l){_(e.$$.fragment,l),n=!1},d(l){E(e,l)}}}function qP(t){let e,s;return e=new ke({props:{slot:"start-icon",name:"delete",label:t[3]("clear")}}),{c(){T(e.$$.fragment)},m(n,r){S(e,n,r),s=!0},p(n,r){const i={};r&8&&(i.label=n[3]("clear")),e.$set(i)},i(n){s||(p(e.$$.fragment,n),s=!0)},o(n){_(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function KP(t){let e,s,n,r,i,l,o,a,u,c,f;const d=[WP,GP],h=[];function m(g,b){return g[2]?0:1}return i=m(t),l=h[i]=d[i](t),a=new Ie({props:{class:"tertiary iconic",disabled:!t[0],$$slots:{"start-icon":[qP]},$$scope:{ctx:t}}}),a.$on("click",t[12]),{c(){e=P("div"),s=P("input"),n=R(),r=P("span"),l.c(),o=R(),T(a.$$.fragment),M(s,"type","color"),s.disabled=t[1],M(r,"class","value svelte-1r23g0y"),M(e,"class","svelte-1r23g0y")},m(g,b){w(g,e,b),N(e,s),Xn(s,t[0]),N(e,n),N(e,r),h[i].m(r,null),N(e,o),S(a,e,null),u=!0,c||(f=Ce(s,"input",t[10]),c=!0)},p(g,[b]){(!u||b&2)&&(s.disabled=g[1]),b&1&&Xn(s,g[0]);let y=i;i=m(g),i===y?h[i].p(g,b):(H(),_(h[y],1,1,()=>{h[y]=null}),V(),l=h[i],l?l.p(g,b):(l=h[i]=d[i](g),l.c()),p(l,1),l.m(r,null));const v={};b&1&&(v.disabled=!g[0]),b&8200&&(v.$$scope={dirty:b,ctx:g}),a.$set(v)},i(g){u||(p(l),p(a.$$.fragment,g),u=!0)},o(g){_(l),_(a.$$.fragment,g),u=!1},d(g){g&&k(e),h[i].d(),E(a),c=!1,f()}}}function ZP(t,e,s){let n,r,i,l,o,a;U(t,Ue,b=>s(9,o=b)),U(t,_e,b=>s(3,a=b));let{locale:u=""}=e,{keyPath:c=""}=e,{fieldConfig:f=void 0}=e,{currentValue:d=void 0}=e;function h(){d=this.value,s(0,d)}function m(b){d=b,s(0,d)}const g=()=>{s(0,d="")};return t.$$set=b=>{"locale"in b&&s(4,u=b.locale),"keyPath"in b&&s(5,c=b.keyPath),"fieldConfig"in b&&s(6,f=b.fieldConfig),"currentValue"in b&&s(0,d=b.currentValue)},t.$$.update=()=>{t.$$.dirty&64&&s(8,{i18n:n,allowInput:r=!1}=f,n,(s(2,r),s(6,f))),t.$$.dirty&512&&s(7,{defaultLocale:i="default"}=o.collection._i18n,i),t.$$.dirty&400&&s(1,l=n==="duplicate"&&u!==i)},[d,l,r,a,u,c,f,i,n,o,h,m,g]}class XP extends X{constructor(e){super(),Z(this,e,ZP,KP,W,{locale:4,keyPath:5,fieldConfig:6,currentValue:0},YP)}}//! moment.js
|
|
448
448
|
//! version : 2.29.4
|
|
449
449
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
450
450
|
//! license : MIT
|