@prismicio/editor-fields 0.4.49-alpha.feat-onboarding-guide.11 → 0.4.49-alpha.feat-onboarding-guide.12
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/index.cjs.js
CHANGED
|
@@ -31,10 +31,10 @@ ${g.map(y=>` - ${y}`).join(`
|
|
|
31
31
|
`)}
|
|
32
32
|
`}}function u(x){return r.exact(r.intersection([r.type({id:r.string,label:o.StringOrNull,repeatable:(0,i.withFallback)(r.boolean,!0),json:r.record(r.string,x),status:(0,i.withFallback)(r.boolean,!0)}),r.partial({format:(0,i.withFallback)(r.keyof(e.CustomTypeFormat),"custom")})]))}e.StaticCustomType=u(a.StaticSection),e.CustomType=u(a.DynamicSection);function c(x){return Object.entries(x.json).reduce((g,[,S])=>{const y=Object.entries(S);return g.concat(y)},[])}e.flattenWidgets=c;function l(x){return Object.entries(x.json).reduce((g,[,S])=>{const y=Object.entries(S);return g.concat(y)},[])}e.flattenSections=l;function d(x){return c(x).filter(([,y])=>y.type==="Slices").reduce((y,[,T])=>{const w=Object.entries(T.config&&T.config.choices?T.config.choices:{}).filter(([,O])=>O.type==="SharedSlice").map(([O])=>O);return y.concat(w)},[])}function p(x){const g=d(x);return function(S){return g.map(S)}}function A(x,g){const S=Object.entries(x.json).reduce((y,[T,w])=>({...y,[T]:a.Sections.toStatic(w,g)}),{});return{...x,json:S}}e.toStatic=A;function m(x,g){const S=p(x)(y=>{if(!g.get(y))return y}).filter(Boolean);return S.length>0?(0,n.left)(new s(S)):(0,n.right)(x)}e.validateSlices=m;function v(x,g){const S=Object.entries(x.json).reduce((y,[T,w])=>{const O=Object.entries(w).reduce((E,[F,W])=>{const K=g(F,W);return K?{...E,[F]:K}:E},{});return{...y,[T]:O}},{});return{...x,json:S}}e.collectWidgets=v;function _(x,g){return v(x,(S,y)=>{if(y.type==="Slices"){if(!y.config||!y.config.choices)return y;const T=Object.entries(y.config.choices).reduce((O,[E,F])=>F.type==="SharedSlice"&&!g.get(E)?O:{...O,[E]:F},{}),w={...y.config,choices:T};return{...y,config:w}}return y})}e.filterMissingSharedSlices=_;function C(x){return Object.values(x.json).reduce((g,S)=>({...g,...S}),{})}e.flattenCustomTypeFields=C;function I(x){return Object.entries(x.fields).reduce((g,[,S])=>{var y;return S.type==="Slices"||S.type==="Choice"?{...g,...Object.entries(((y=S.config)===null||y===void 0?void 0:y.choices)||{}).reduce((T,[w,O])=>O.type==="SharedSlice"?{...T,[w]:O}:T,{})}:g},{})}e.collectSharedSlices=I})(z9);var eq={},j0={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiffOperation=void 0,function(t){t.Added="added",t.Removed="removed",t.Updated="updated"}(e.DiffOperation||(e.DiffOperation={}))})(j0);var U0={},Xo={},B0={};Object.defineProperty(B0,"__esModule",{value:!0});B0.HexaColor=void 0;const wTe=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;B0.HexaColor={is:e=>wTe.test(e)};var P0={};Object.defineProperty(P0,"__esModule",{value:!0});P0.toRecord=void 0;function ETe(e,t){return e.reduce((n,r)=>{const i=t(r);return{...n,[i]:r}},{})}P0.toRecord=ETe;var Er={};Object.defineProperty(Er,"__esModule",{value:!0});Er.mapValues=Er.isObject=Er.withOptionals=Er.isNotEmpty=Er.zipObjects=void 0;const $Te=Q,RTe=ln,vb=(0,$Te.__importStar)(Z);function OTe(e,t){return[...new Set(Object.keys(e||{}).concat(Object.keys(t||{})))].reduce((r,i)=>{const o=e==null?void 0:e[i],a=t==null?void 0:t[i];return{...r,[i]:{left:o,right:a}}},{})}Er.zipObjects=OTe;function FTe(e){return!!Object.keys(e).length}Er.isNotEmpty=FTe;function kTe(e,t){return{...e,...t.reduce((n,[r,i])=>i?{...n,[r]:i}:n,{})}}Er.withOptionals=kTe;const MTe=vb.record(vb.string,vb.unknown);function LTe(e){return(0,RTe.isRight)(MTe.decode(e))}Er.isObject=LTe;function jTe(e,t){return Object.entries(e).reduce((n,[r,i])=>({...n,[r]:t(i,r)}),{})}Er.mapValues=jTe;Object.defineProperty(Xo,"__esModule",{value:!0});Xo.Objects=Xo.Arrays=Xo.HexaColorCode=void 0;const _R=Q;Xo.HexaColorCode=(0,_R.__importStar)(B0);Xo.Arrays=(0,_R.__importStar)(P0);Xo.Objects=(0,_R.__importStar)(Er);var Sh={};Object.defineProperty(Sh,"__esModule",{value:!0});Sh.VariationComparator=void 0;const Em=Xo,yb=Ad,Za=j0;function UTe(e,t){const n=Em.Objects.zipObjects(e,t);return Object.entries(n).reduce((r,[i,o])=>i==="primary"||i==="items"||(o==null?void 0:o.left)===(o==null?void 0:o.right)?r:{...r,[i]:o==null?void 0:o.right},{})}function $m(e,t){const n=Em.Objects.zipObjects(e,t),r=Object.entries(n).reduce((i,[o,a])=>{if(JSON.stringify(a==null?void 0:a.left)===JSON.stringify(a==null?void 0:a.right))return i;const s=(()=>{var u,c,l,d,p,A,m;if(!(!(a!=null&&a.left)&&!(a!=null&&a.right))){if(a!=null&&a.left&&!a.right)return{op:Za.DiffOperation.Removed};if(!(a!=null&&a.left)&&(a!=null&&a.right)){if(((u=a.right)===null||u===void 0?void 0:u.type)===yb.GroupFieldType){const v={...a.right,config:{...a.right.config,fields:{}}};return v.config.fields=$m(void 0,(c=a.right.config)===null||c===void 0?void 0:c.fields)||{},{op:Za.DiffOperation.Added,value:v}}return{op:Za.DiffOperation.Added,value:a.right}}if(((l=a.right)===null||l===void 0?void 0:l.type)===yb.GroupFieldType){const v={...a.right,config:{...a.right.config,fields:{}}};return v.config.fields=$m(((d=a.left)===null||d===void 0?void 0:d.type)===yb.GroupFieldType?(A=(p=a.left)===null||p===void 0?void 0:p.config)===null||A===void 0?void 0:A.fields:void 0,(m=a.right.config)===null||m===void 0?void 0:m.fields)||{},{op:Za.DiffOperation.Updated,value:v}}return{op:Za.DiffOperation.Updated,value:a.right}}})();return s?{...i,[o]:s}:i},{});return Em.Objects.isNotEmpty(r)?r:void 0}Sh.VariationComparator={compare(e,t){if(e&&!t)return{op:Za.DiffOperation.Removed};if(!e&&t)return{op:Za.DiffOperation.Added,value:t};const n=UTe(e,t),r=$m(e==null?void 0:e.primary,t==null?void 0:t.primary),i=$m(e==null?void 0:e.items,t==null?void 0:t.items),o={...n,...r?{primary:r}:{},...i?{items:i}:{}};if(Em.Objects.isNotEmpty(o))return{op:Za.DiffOperation.Updated,value:o}}};Object.defineProperty(U0,"__esModule",{value:!0});U0.SliceComparator=void 0;const nl=Xo,bb=j0,BTe=Sh;function PTe(e,t){const n=nl.Objects.zipObjects(e,t);return Object.entries(n).reduce((r,[i,o])=>i==="variations"||(o==null?void 0:o.left)===(o==null?void 0:o.right)?r:{...r,[i]:o==null?void 0:o.right},{})}U0.SliceComparator={compare(e,t){if(!e&&t)return{op:bb.DiffOperation.Added,value:t};if(e&&!t)return{op:bb.DiffOperation.Removed};const n=PTe(e,t),r=nl.Objects.zipObjects(e&&nl.Arrays.toRecord(e.variations,a=>a.id),t&&nl.Arrays.toRecord(t.variations,a=>a.id)),i=Object.entries(r).reduce((a,[s,u])=>{if(!u)return a;const c=BTe.VariationComparator.compare(u.left,u.right);return c?{...a,[s]:c}:a},{}),o={...n,...nl.Objects.isNotEmpty(i)?{variations:i}:{}};if(nl.Objects.isNotEmpty(o))return{op:bb.DiffOperation.Updated,value:o}}};var tq={};Object.defineProperty(tq,"__esModule",{value:!0});(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(j0,e),(0,t.__exportStar)(U0,e),(0,t.__exportStar)(Sh,e),(0,t.__exportStar)(tq,e)})(eq);var Mo={},nq={};(function(e){var t=me&&me.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0}),e.ImageConstraint=void 0;var n=vh;Object.defineProperty(e,"ImageConstraint",{enumerable:!0,get:function(){return t(n).default}})})(nq);var rq={},iq={};Object.defineProperty(iq,"__esModule",{value:!0});var W0={};Object.defineProperty(W0,"__esModule",{value:!0});W0.SlicesTypes=void 0;const WTe=Q,DTe=(0,WTe.__importStar)(Z),KTe=L0,NTe=bh;W0.SlicesTypes=DTe.keyof({[KTe.CompositeSliceType]:null,[NTe.SharedSliceType]:null});(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(L0,e),(0,t.__exportStar)(Ru,e),(0,t.__exportStar)(bh,e),(0,t.__exportStar)(Ch,e),(0,t.__exportStar)(iq,e),(0,t.__exportStar)(Ou,e),(0,t.__exportStar)(vR,e),(0,t.__exportStar)(W0,e)})(rq);(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(Ad,e),(0,t.__exportStar)(yh,e),(0,t.__exportStar)(nq,e),(0,t.__exportStar)(rq,e),(0,t.__exportStar)(yR,e),(0,t.__exportStar)(wr,e)})(Mo);(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(z9,e),(0,t.__exportStar)(eq,e),(0,t.__exportStar)(Ti,e),(0,t.__exportStar)(Mo,e)})(fe);var Cb={},Sb={},Xs={},tF;function Pt(){if(tF)return Xs;tF=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.hasContentType=Xs.hasFieldContentType=void 0;const e=ln,t=ER();function n(i){var o;return r(i)&&i.__TYPE__===t.FieldContentType&&((o=i)===null||o===void 0?void 0:o.type)!==void 0&&typeof i.type=="string"&&(0,e.isRight)(t.FieldType.decode(i.type))}Xs.hasFieldContentType=n;function r(i){return typeof i=="object"&&i!==null&&"__TYPE__"in i}return Xs.hasContentType=r,Xs}var nF;function oq(){return nF||(nF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyContent=e.EmptyLegacy=e.isEmptyContent=e.EmptyContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Pt();e.EmptyContentType="EmptyContent";const a=c=>(0,o.hasContentType)(c)&&c.__TYPE__===e.EmptyContentType;e.isEmptyContent=a;const s=i.union([i.null,i.type({value:i.null})]),u=c=>new i.Type("EmptyLegacy",e.isEmptyContent,l=>(0,r.pipe)(s.decode(l),n.either.map(()=>({type:c,__TYPE__:e.EmptyContentType}))),()=>null);e.EmptyLegacy=u,e.EmptyContent=i.strict({type:i.string,__TYPE__:i.literal(e.EmptyContentType)})}(Sb)),Sb}var _b={},Qn={};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.defaultCtx=Qn.getFieldCtx=Qn.LegacyContentCtx=Qn.FieldOrSliceType=void 0;const qTe=Q,VTe=(0,qTe.__importStar)(Z),rF=Mo;Qn.FieldOrSliceType=VTe.union([rF.FieldType,rF.SlicesTypes]);class IR{constructor(t,n,r){Object.defineProperty(this,"fieldKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"prefixedKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"keyOfType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fieldPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fieldType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"allTypes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fieldKey=t,this.fieldPath=n||[],this.allTypes=r||new Map;const i=Array.of(this.fieldPath,[this.fieldKey]).flat().join(".");this.prefixedKey=i,this.keyOfType=`${i}_TYPE`,this.fieldType=this.allTypes.get(this.prefixedKey)}}Qn.LegacyContentCtx=IR;function QTe(e,t,n){return new IR(e,[...t.fieldPath,t.fieldKey,...n||[]],t.allTypes)}Qn.getFieldCtx=QTe;function zTe(e,t=new Map){return new IR(e,[],t)}Qn.defaultCtx=zTe;var Ib={},Tb={},iF;function aq(){return iF||(iF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BooleanContentDefaultValue=e.BooleanContent=e.BooleanLegacy=e.isBooleanContent=e.BooleanContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Pt();e.BooleanContentType="BooleanContent";const a=c=>(0,o.hasContentType)(c)&&c.__TYPE__===e.BooleanContentType;e.isBooleanContent=a;const s=c=>new i.Type("BooleanLegacy",e.isBooleanContent,l=>(0,r.pipe)(i.boolean.decode(l),n.either.map(d=>e.BooleanContent.encode({value:d,__TYPE__:e.BooleanContentType}))),l=>({content:l.value,types:{[c.keyOfType]:"Boolean"}}));e.BooleanLegacy=s,e.BooleanContent=i.strict({__TYPE__:i.literal(e.BooleanContentType),value:i.boolean});const u=c=>{var l;return((l=c.config)===null||l===void 0?void 0:l.default_value)!==void 0?{__TYPE__:e.BooleanContentType,value:c.config.default_value||!1}:void 0};e.BooleanContentDefaultValue=u}(Tb)),Tb}var xb={},oF;function TR(){return oF||(oF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmbedContent=e.EmbedLegacy=e.EmbedContentLegacy=e.isEmbedContent=e.EmbedContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=ft(),a=Pt();e.EmbedContentType="EmbedContent";const s=c=>(0,a.hasContentType)(c)&&c.__TYPE__===e.EmbedContentType;e.isEmbedContent=s,e.EmbedContentLegacy=i.exact(i.intersection([i.type({embed_url:i.string,type:i.string}),i.partial({version:i.union([i.string,i.number,i.null]),title:o.StringOrNull,author_name:o.StringOrNull,author_url:o.StringOrNull,provider_name:o.StringOrNull,provider_url:o.StringOrNull,cache_age:i.union([i.string,i.number,i.null]),thumbnail_url:o.StringOrNull,thumbnail_width:o.NumberOrNull,thumbnail_height:o.NumberOrNull,html:o.StringOrNull})]));const u=c=>new i.Type("EmbedLegacy",e.isEmbedContent,l=>(0,r.pipe)(e.EmbedContentLegacy.decode(l),n.either.map(d=>({...d,all:l,__TYPE__:e.EmbedContentType}))),l=>({content:l.all,types:{[c.keyOfType]:"Embed"}}));e.EmbedLegacy=u,e.EmbedContent=i.intersection([e.EmbedContentLegacy,i.strict({__TYPE__:i.literal(e.EmbedContentType),all:i.unknown})])}(xb)),xb}var wb={},Eb={},Va={};Object.defineProperty(Va,"__esModule",{value:!0});const HTe=Q,YTe=Na,GTe=Xi,Kh=(0,HTe.__importStar)(Z);function JTe(e){let t=0;for(;t<e.length&&e[t]<=" ";)t++;let n=e.length;for(;t<n&&e[n-1]<=" ";)n--;return e.substring(t,n)}Va.default=new Kh.Type("TrimmedString",Kh.string.is,(e,t)=>(0,GTe.pipe)(Kh.string.validate(e,t),(0,YTe.chain)(n=>Kh.success(JTe(n)))),e=>e);var hi={};Object.defineProperty(hi,"__esModule",{value:!0});hi.FieldContentType=void 0;hi.FieldContentType="FieldContent";var aF;function sF(){return aF||(aF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContent=e.ColorLegacy=e.isColorContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(Va),s=Pt(),u=hi,c=d=>(0,s.hasContentType)(d)&&d.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(d)&&d.type==="Color";e.isColorContent=c;const l=d=>new i.Type("ColorLegacy",e.isColorContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.ColorContent.encode({value:A,type:o.ColorFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[d.keyOfType]:o.ColorFieldType}}));e.ColorLegacy=l,e.ColorContent=i.strict({type:i.literal(o.ColorFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(Eb)),Eb}var $b={},uF;function cF(){return uF||(uF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DateContent=e.DateLegacy=e.isDateContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(Va),s=Pt(),u=hi,c=d=>(0,s.hasContentType)(d)&&d.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(d)&&d.type==="Date";e.isDateContent=c;const l=d=>new i.Type("DateLegacy",e.isDateContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.DateContent.encode({value:A,type:o.DateFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[d.keyOfType]:o.DateFieldType}}));e.DateLegacy=l,e.DateContent=i.strict({type:i.literal(o.DateFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}($b)),$b}var Rb={},lF;function fF(){return lF||(lF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NumberContent=e.NumberLegacy=e.isNumberContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(Va),s=Pt(),u=hi,c=d=>(0,s.hasContentType)(d)&&d.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(d)&&d.type==="Number";e.isNumberContent=c;const l=d=>new i.Type("NumberLegacy",e.isNumberContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.NumberContent.encode({value:A,type:o.NumberFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[d.keyOfType]:o.NumberFieldType}}));e.NumberLegacy=l,e.NumberContent=i.strict({type:i.literal(o.NumberFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(Rb)),Rb}var Ob={},dF;function pF(){return dF||(dF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RangeContent=e.RangeLegacy=e.isRangeContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(Va),s=Pt(),u=hi,c=d=>(0,s.hasContentType)(d)&&d.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(d)&&d.type==="Range";e.isRangeContent=c;const l=d=>new i.Type("RangeLegacy",e.isRangeContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.RangeContent.encode({value:A,type:o.RangeFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[d.keyOfType]:o.RangeFieldType}}));e.RangeLegacy=l,e.RangeContent=i.strict({type:i.literal(o.RangeFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(Ob)),Ob}var Fb={},AF;function hF(){return AF||(AF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SelectContentDefaultValue=e.SelectContent=e.SelectLegacy=e.isSelectContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(Va),s=Pt(),u=hi,c=p=>(0,s.hasContentType)(p)&&p.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(p)&&p.type==="Select";e.isSelectContent=c;const l=p=>new i.Type("SelectLegacy",e.isSelectContent,A=>(0,r.pipe)(a.default.decode(A),n.either.map(m=>e.SelectContent.encode({value:m,type:o.SelectFieldType,__TYPE__:u.FieldContentType}))),A=>({content:A.value,types:{[p.keyOfType]:o.SelectFieldType}}));e.SelectLegacy=l,e.SelectContent=i.strict({type:i.literal(o.SelectFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)});const d=p=>{var A;return!((A=p.config)===null||A===void 0)&&A.default_value?{__TYPE__:u.FieldContentType,type:o.SelectFieldType,value:p.config.default_value||""}:void 0};e.SelectContentDefaultValue=d}(Fb)),Fb}var kb={},mF;function gF(){return mF||(mF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TextContent=e.TextLegacy=e.isTextContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(Va),s=Pt(),u=hi,c=d=>(0,s.hasContentType)(d)&&d.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(d)&&d.type==="Text";e.isTextContent=c;const l=d=>new i.Type("TextLegacy",e.isTextContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.TextContent.encode({value:A,type:o.TextFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[d.keyOfType]:o.TextFieldType}}));e.TextLegacy=l,e.TextContent=i.strict({type:i.literal(o.TextFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(kb)),kb}var Mb={},vF;function yF(){return vF||(vF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TimestampContent=e.TimestampLegacy=e.isTimestampContent=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Mo,a=(0,t.__importDefault)(Va),s=Pt(),u=hi,c=d=>(0,s.hasContentType)(d)&&d.__TYPE__===u.FieldContentType&&(0,s.hasFieldContentType)(d)&&d.type==="Timestamp";e.isTimestampContent=c;const l=d=>new i.Type("TimestampLegacy",e.isTimestampContent,p=>(0,r.pipe)(a.default.decode(p),n.either.map(A=>e.TimestampContent.encode({value:A,type:o.TimestampFieldType,__TYPE__:u.FieldContentType}))),p=>({content:p.value,types:{[d.keyOfType]:o.TimestampFieldType}}));e.TimestampLegacy=l,e.TimestampContent=i.strict({type:i.literal(o.TimestampFieldType),value:a.default,__TYPE__:i.literal(u.FieldContentType)})}(Mb)),Mb}var bF;function sq(){return bF||(bF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FieldContent=e.FieldType=void 0;const t=Q,n=(0,t.__importStar)(Z),r=sF(),i=cF(),o=fF(),a=pF(),s=hF(),u=gF(),c=yF();e.FieldType=n.keyof({Text:null,Date:null,Timestamp:null,Color:null,Number:null,Range:null,Select:null}),e.FieldContent=n.union([i.DateContent,r.ColorContent,o.NumberContent,a.RangeContent,s.SelectContent,u.TextContent,c.TimestampContent]),(0,t.__exportStar)(sF(),e),(0,t.__exportStar)(hi,e),(0,t.__exportStar)(cF(),e),(0,t.__exportStar)(fF(),e),(0,t.__exportStar)(pF(),e),(0,t.__exportStar)(hF(),e),(0,t.__exportStar)(gF(),e),(0,t.__exportStar)(yF(),e)}(wb)),wb}var Lb={},CF;function uq(){return CF||(CF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GeoPointContent=e.GeoPointLegacy=e.isGeoPointContent=e.GeoPointContentType=void 0;const t=Q,n=lt,r=Xi,i=(0,t.__importStar)(Z),o=Pt();e.GeoPointContentType="GeoPointContent";const a=c=>(0,o.hasContentType)(c)&&c.__TYPE__===e.GeoPointContentType;e.isGeoPointContent=a;const s=i.strict({position:i.strict({lat:i.number,lng:i.number})}),u=c=>new i.Type("GeoPointLegacy",e.isGeoPointContent,l=>(0,r.pipe)(s.decode(l),n.either.map(d=>e.GeoPointContent.encode({...d,__TYPE__:e.GeoPointContentType}))),l=>({content:{position:l.position},types:{[c.keyOfType]:"GeoPoint"}}));e.GeoPointLegacy=u,e.GeoPointContent=i.intersection([s,i.strict({__TYPE__:i.literal(e.GeoPointContentType)})])}(Lb)),Lb}var jb={},SF;function xR(){return SF||(SF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImageContent=e.ImageLegacy=e.ImageContentView=e.isImageContent=e.ImageContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Er,a=ft(),s=Pt();e.ImageContentType="ImageContent";const u=p=>(0,s.hasContentType)(p)&&p.__TYPE__===e.ImageContentType;e.isImageContent=u;const c=i.exact(i.type({id:i.string,url:i.string,width:i.number,height:i.number}));e.ImageContentView=i.exact(i.intersection([i.type({origin:c,width:i.number,height:i.number,edit:i.type({zoom:i.number,crop:i.type({x:i.number,y:i.number}),background:i.string})}),i.partial({url:i.string,credits:a.NonEmptyStringOrNull,alt:a.NonEmptyStringOrNull,provider:a.StringOrNull})]));const l=i.intersection([e.ImageContentView,i.partial({thumbnails:i.record(i.string,e.ImageContentView)})]),d=p=>new i.Type("ImageLegacy",e.isImageContent,A=>(0,r.pipe)(l.decode(A),n.either.map(m=>e.ImageContent.encode({...m,__TYPE__:e.ImageContentType}))),A=>({content:(0,o.withOptionals)({edit:A.edit,height:A.height,origin:A.origin,width:A.width},[["alt",A.alt],["credits",A.credits],["provider",A.provider],["thumbnails",A.thumbnails],["url",A.url]]),types:{[p.keyOfType]:"Image"}}));e.ImageLegacy=d,e.ImageContent=i.intersection([l,i.strict({__TYPE__:i.literal(e.ImageContentType)})])}(jb)),jb}var Ub={},_F;function cq(){return _F||(_F=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IntegrationFieldContent=e.IntegrationFieldLegacy=e.isIntegrationFieldContent=e.IntegrationFieldContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Pt();e.IntegrationFieldContentType="IntegrationFieldsContent";const a=u=>(0,o.hasContentType)(u)&&u.__TYPE__===e.IntegrationFieldContentType;e.isIntegrationFieldContent=a;const s=u=>new i.Type("IntegrationFieldLegacy",e.isIntegrationFieldContent,c=>(0,r.pipe)(i.string.decode(c),n.either.map(l=>e.IntegrationFieldContent.encode({value:l,__TYPE__:e.IntegrationFieldContentType}))),c=>({content:c.value,types:{[u.keyOfType]:"IntegrationFields"}}));e.IntegrationFieldLegacy=s,e.IntegrationFieldContent=i.strict({__TYPE__:i.literal(e.IntegrationFieldContentType),value:i.string})}(Ub)),Ub}var Bb={},IF;function wR(){return IF||(IF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FilledLinkContent=e.FilledLink=e.FilledLinkContentLegacy=e.FilledLinkLegacy=e.isFilledLinkContent=e.LinkContent=e.Link=e.LinkContentLegacy=e.LinkLegacy=e.isLinkContent=e.LinkContentType=e.AnyLinkContent=e.AnyLinkType=e.ExternalLinkContent=e.FilledExternalLinkContent=e.ExternalLinkType=e.DocumentLinkContent=e.FilledDocumentLinkContent=e.DocumentLinkType=e.MediaLinkContent=e.MediaLinkType=e.FileLinkContent=e.FilledFileLinkContent=e.FileLinkType=e.ImageLinkContent=e.FilledImageLinkContent=e.ImageLinkType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=R0,a=ft(),s=Xe,u=Pt();e.ImageLinkType="ImageLink";const c=i.intersection([i.strict({kind:i.string,id:i.string,url:i.string,height:i.string,width:i.string,size:i.string,name:i.string}),i.exact(i.partial({date:a.StringOrNull}))]),l=new i.Type("FilledImageLink",P=>(0,u.hasContentType)(P)&&P.__TYPE__===e.ImageLinkType,P=>(0,r.pipe)(c.decode(P),n.either.map(Y=>e.FilledImageLinkContent.encode({...Y,__TYPE__:e.ImageLinkType}))),P=>c.encode(P));e.FilledImageLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.ImageLinkType)}),c]);const d=i.union([i.intersection([c,i.exact(i.partial({text:i.string}))]),i.strict({kind:i.literal("image"),text:i.string})]),p=new i.Type("ImageLink",P=>(0,u.hasContentType)(P)&&P.__TYPE__===e.ImageLinkType,P=>(0,r.pipe)(d.decode(P),n.either.map(Y=>e.ImageLinkContent.encode({...Y,__TYPE__:e.ImageLinkType}))),P=>d.encode(P));e.ImageLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.ImageLinkType)}),d]),e.FileLinkType="FileLink";const A=i.exact(i.intersection([i.type({kind:i.string,id:i.string,url:i.string,name:i.string,size:(0,o.withFallback)(i.string,"0")}),i.partial({date:a.StringOrNull})])),m=new i.Type("FilledFileLink",P=>(0,u.hasContentType)(P)&&P.__TYPE__===e.FileLinkType,P=>(0,r.pipe)(A.decode(P),n.either.map(Y=>e.FilledFileLinkContent.encode({...Y,__TYPE__:e.FileLinkType}))),P=>A.encode(P));e.FilledFileLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.FileLinkType)}),A]);const v=i.union([i.intersection([A,i.exact(i.partial({text:i.string}))]),i.strict({kind:i.literal("file"),text:i.string})]),_=new i.Type("FileLink",P=>(0,u.hasContentType)(P)&&P.__TYPE__===e.FileLinkType,P=>(0,r.pipe)(v.decode(P),n.either.map(Y=>e.FileLinkContent.encode({...Y,__TYPE__:e.FileLinkType}))),P=>v.encode(P));e.FileLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.FileLinkType)}),v]),e.MediaLinkType="MediaLink";const C=i.strict({kind:i.literal("media"),text:i.string}),I=new i.Type("MediaLink",P=>(0,u.hasContentType)(P)&&P.__TYPE__===e.MediaLinkType,P=>(0,r.pipe)(C.decode(P),n.either.map(Y=>e.MediaLinkContent.encode({...Y,__TYPE__:e.MediaLinkType}))),P=>C.encode(P));e.MediaLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.MediaLinkType)}),C]),e.DocumentLinkType="DocumentLink";const x=i.strict({id:a.NonEmptyString}),g=new i.Type("FilledDocumentLink",P=>(0,u.hasContentType)(P)&&P.__TYPE__===e.DocumentLinkType,P=>(0,r.pipe)(x.decode(P),n.either.map(Y=>e.FilledDocumentLinkContent.encode({...Y,__TYPE__:e.DocumentLinkType}))),P=>x.encode(P));e.FilledDocumentLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.DocumentLinkType)}),x]);const S=i.union([i.intersection([x,i.exact(i.partial({text:i.string}))]),i.strict({kind:i.literal("document"),text:i.string})]),y=new i.Type("DocumentLink",P=>(0,u.hasContentType)(P)&&P.__TYPE__===e.DocumentLinkType,P=>(0,r.pipe)(S.decode(P),n.either.map(Y=>e.DocumentLinkContent.encode({...Y,__TYPE__:e.DocumentLinkType}))),P=>S.encode(P));e.DocumentLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.DocumentLinkType)}),S]),e.ExternalLinkType="ExternalLink";const T=i.exact(i.intersection([i.type({url:i.string}),i.partial({kind:i.literal("web"),target:a.StringOrNull,preview:(0,s.nullable)(i.partial({title:i.string}))})])),w=new i.Type("FilledExternalLink",P=>(0,u.hasContentType)(P)&&P.__TYPE__===e.ExternalLinkType,P=>(0,r.pipe)(T.decode(P),n.either.map(Y=>e.FilledExternalLinkContent.encode({...Y,__TYPE__:e.ExternalLinkType}))),P=>T.encode(P));e.FilledExternalLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.ExternalLinkType)}),T]);const O=i.union([i.intersection([T,i.exact(i.partial({text:i.string}))]),i.strict({kind:i.literal("web"),text:i.string})]),E=new i.Type("ExternalLink",P=>(0,u.hasContentType)(P)&&P.__TYPE__===e.ExternalLinkType,P=>(0,r.pipe)(O.decode(P),n.either.map(Y=>e.ExternalLinkContent.encode({...Y,__TYPE__:e.ExternalLinkType}))),P=>O.encode(P));e.ExternalLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.ExternalLinkType)}),O]),e.AnyLinkType="AnyLink";const F=i.strict({text:i.string}),W=new i.Type("AnyLink",P=>(0,u.hasContentType)(P)&&P.__TYPE__===e.AnyLinkType,P=>(0,r.pipe)(F.decode(P),n.either.map(Y=>e.AnyLinkContent.encode({...Y,__TYPE__:e.AnyLinkType}))),P=>F.encode(P));e.AnyLinkContent=i.intersection([i.strict({__TYPE__:i.literal(e.AnyLinkType)}),F]),e.LinkContentType="LinkContent";const K=P=>(0,u.hasContentType)(P)&&P.__TYPE__===e.LinkContentType;e.isLinkContent=K,e.LinkLegacy=i.union([p,_,y,E,I,W]);const J=P=>new i.Type("LinkLegacy",e.isLinkContent,Y=>(0,r.pipe)(e.LinkLegacy.decode(Y),n.either.map(M=>e.LinkContent.encode({value:M,__TYPE__:e.LinkContentType}))),Y=>({content:e.LinkLegacy.encode(Y.value),types:{[P.keyOfType]:"Link"}}));e.LinkContentLegacy=J,e.Link=i.union([e.ImageLinkContent,e.FileLinkContent,e.DocumentLinkContent,e.ExternalLinkContent,e.MediaLinkContent,e.AnyLinkContent]),e.LinkContent=i.strict({__TYPE__:i.literal(e.LinkContentType),value:e.Link});const ee=P=>(0,u.hasContentType)(P)&&P.__TYPE__===e.LinkContentType;e.isFilledLinkContent=ee,e.FilledLinkLegacy=i.union([l,m,g,w]);const re=P=>new i.Type("FilledLinkLegacy",e.isFilledLinkContent,Y=>(0,r.pipe)(e.FilledLinkLegacy.decode(Y),n.either.map(M=>e.FilledLinkContent.encode({value:M,__TYPE__:e.LinkContentType}))),Y=>({content:e.FilledLinkLegacy.encode(Y.value),types:{[P.keyOfType]:"Link"}}));e.FilledLinkContentLegacy=re,e.FilledLink=i.union([e.FilledImageLinkContent,e.FilledFileLinkContent,e.FilledDocumentLinkContent,e.FilledExternalLinkContent]),e.FilledLinkContent=i.strict({__TYPE__:i.literal(e.LinkContentType),value:e.FilledLink})}(Bb)),Bb}var Ci={},Pb={},Wb={},TF;function xF(){return TF||(TF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Block=e.BlockLegacy=e.TextBlock=e.checkEmbedBlock=e.EmbedBlock=e.checkImageBlock=e.ImageBlock=e.ValidatedSpans=e.SpanLegacy=e.Span=void 0;const t=Q,n=lt,r=ln,i=Ge,o=(0,t.__importStar)(Z),a=R0,s=yh,u=ft(),c=Xe,l=TR(),d=xR(),p=wR(),A=E=>o.strict({data:E,start:o.number,end:o.number,type:o.literal(s.RichTextNodeType.hyperlink)}),m=o.strict({data:(0,a.withFallback)(o.string,""),start:o.number,end:o.number,type:o.literal("label")}),v=o.strict({start:o.number,end:o.number,type:o.keyof({[s.RichTextNodeType.strong]:null,[s.RichTextNodeType.em]:null,"list-item":null})});e.Span=o.union([A(p.FilledLink),m,v]),e.SpanLegacy=o.union([A(p.FilledLinkLegacy),m,v]);const _=E=>new o.Type("ValidatedSpans",F=>Array.isArray(F)&&F.every(E.is),(F,W)=>{if(Array.isArray(F)){const K=F.reduce((J,ee)=>{const re=E.decode(ee);return(0,r.isLeft)(re)?J:[...J,re.right]},[]).sort((J,ee)=>J.start-ee.start);return o.success(K)}else return o.failure(F,W)},F=>F.reduce((W,K)=>{const J=E.encode(K);return[...W,J]},[]));e.ValidatedSpans=_;const C=E=>o.exact(o.intersection([o.type({type:o.literal(s.RichTextNodeType.image),data:o.intersection([d.ImageContentView,o.partial({linkTo:(0,c.nullable)(E)})])}),o.partial({label:u.StringOrNull,direction:u.StringOrNull})]));e.ImageBlock=C(p.FilledLink);const I=C(p.FilledLinkLegacy);function x(E){return E.type===s.RichTextNodeType.image}e.checkImageBlock=x;const g=o.exact(o.intersection([o.type({type:o.literal(s.RichTextNodeType.embed),data:o.unknown}),o.partial({label:u.StringOrNull,direction:u.StringOrNull})])),S=new o.Type("EmbedBlockLegacy",E=>E.type==="embed",E=>(0,i.pipe)(g.decode(E),n.either.chain(F=>n.either.map(W=>[F,W])(l.EmbedContentLegacy.decode(F.data))),n.either.map(([F,W])=>e.EmbedBlock.encode({...F,data:{...W,__TYPE__:l.EmbedContentType,all:F.data}}))),E=>({...g.encode(E),data:l.EmbedContentLegacy.encode(E.data)}));e.EmbedBlock=o.exact(o.intersection([o.type({type:o.literal(s.RichTextNodeType.embed),data:l.EmbedContent}),o.partial({label:u.StringOrNull,direction:u.StringOrNull})]));function y(E){return E.type===s.RichTextNodeType.embed}e.checkEmbedBlock=y;const T=E=>o.exact(o.intersection([o.type({type:(0,c.refineType)(s.RichTextNodeTypeCodec,`string which isn't ${s.RichTextNodeType.image} ${s.RichTextNodeType.embed}`,F=>F!==s.RichTextNodeType.image&&F!==s.RichTextNodeType.embed),content:o.intersection([o.type({text:o.string}),o.partial({spans:(0,e.ValidatedSpans)(E)})])}),o.partial({label:o.string,direction:o.string})]));e.TextBlock=T(e.Span);const w=T(e.SpanLegacy),O=o.union([S,I,w]);e.BlockLegacy=new o.Type("BlockLegacy",E=>S.is(E)||I.is(E)||w.is(E),E=>O.decode(E),E=>(()=>e.ImageBlock.is(E)?I.encode(E):e.EmbedBlock.is(E)?S.encode(E):w.encode(E))()),e.Block=o.union([e.ImageBlock,e.EmbedBlock,e.TextBlock])}(Wb)),Wb}var wF;function lq(){return wF||(wF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RichTextLegacy=e.RichTextContent=e.isRichTextContent=e.RichTextContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Pt(),a=xF();e.RichTextContentType="StructuredTextContent";const s=l=>(0,o.hasContentType)(l)&&l.__TYPE__===e.RichTextContentType;e.isRichTextContent=s;const u=i.array(a.BlockLegacy);e.RichTextContent=i.strict({__TYPE__:i.literal(e.RichTextContentType),value:i.array(a.Block)}),(0,t.__exportStar)(xF(),e);const c=l=>new i.Type("RichTextLegacy",e.isRichTextContent,d=>(0,r.pipe)(u.decode(d),n.either.map(p=>({value:p,__TYPE__:e.RichTextContentType}))),d=>({content:u.encode(d.value),types:{[l.keyOfType]:"StructuredText"}}));e.RichTextLegacy=c}(Pb)),Pb}var Db={},EF;function fq(){return EF||(EF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SeparatorContent=e.SeparatorLegacy=e.isSeparatorContent=e.SeparatorContentType=void 0;const n=(0,Q.__importStar)(Z),r=Pt();e.SeparatorContentType="SeparatorContent";const i=a=>(0,r.hasContentType)(a)&&a.__TYPE__===e.SeparatorContentType;e.isSeparatorContent=i;const o=a=>new n.Type("SeparatorLegacy",e.isSeparatorContent,()=>n.success(e.SeparatorContent.encode({__TYPE__:e.SeparatorContentType})),()=>({content:{},types:{[a.keyOfType]:"Separator"}}));e.SeparatorLegacy=o,e.SeparatorContent=n.strict({__TYPE__:n.literal(e.SeparatorContentType)})}(Db)),Db}var $F;function ZTe(){if($F)return Ci;$F=1,Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.NestableLegacy=Ci.isNestableContent=Ci.NestableContentDefaultValue=Ci.NestableContent=void 0;const e=Q,t=ln,n=(0,e.__importStar)(Z),r=oq(),i=aq(),o=TR(),a=sq(),s=hi,u=uq(),c=xR(),l=cq(),d=wR(),p=lq(),A=fq();Ci.NestableContent=n.union([r.EmptyContent,i.BooleanContent,o.EmbedContent,a.TextContent,a.TimestampContent,a.SelectContent,a.RangeContent,a.NumberContent,a.DateContent,a.ColorContent,u.GeoPointContent,c.ImageContent,l.IntegrationFieldContent,d.LinkContent,p.RichTextContent,A.SeparatorContent]);const m=C=>{switch(C.type){case"Boolean":return(0,i.BooleanContentDefaultValue)(C);case"Select":return(0,a.SelectContentDefaultValue)(C);default:return}};Ci.NestableContentDefaultValue=m;const v=C=>(0,a.isTextContent)(C)||(0,a.isColorContent)(C)||(0,a.isDateContent)(C)||(0,a.isTimestampContent)(C)||(0,a.isNumberContent)(C)||(0,a.isRangeContent)(C)||(0,a.isSelectContent)(C)||(0,u.isGeoPointContent)(C)||(0,p.isRichTextContent)(C)||(0,i.isBooleanContent)(C)||(0,o.isEmbedContent)(C)||(0,c.isImageContent)(C)||(0,l.isIntegrationFieldContent)(C)||(0,d.isLinkContent)(C)||(0,A.isSeparatorContent)(C)||(0,r.isEmptyContent)(C);Ci.isNestableContent=v;const _=C=>({decode(I){if(!C.fieldType)return;const x=(0,r.EmptyLegacy)(C.fieldType).decode(I);if((0,t.isRight)(x))return x;const g=(()=>{switch(C.fieldType){case"Text":return(0,a.TextLegacy)(C);case"Color":return(0,a.ColorLegacy)(C);case"Date":return(0,a.DateLegacy)(C);case"Timestamp":return(0,a.TimestampLegacy)(C);case"Number":return(0,a.NumberLegacy)(C);case"Range":return(0,a.RangeLegacy)(C);case"Select":return(0,a.SelectLegacy)(C);case"GeoPoint":return(0,u.GeoPointLegacy)(C);case"StructuredText":return(0,p.RichTextLegacy)(C);case"Boolean":return(0,i.BooleanLegacy)(C);case"Embed":return(0,o.EmbedLegacy)(C);case"Image":return(0,c.ImageLegacy)(C);case"IntegrationFields":return(0,l.IntegrationFieldLegacy)(C);case"Link":return(0,d.LinkContentLegacy)(C);case"Separator":return(0,A.SeparatorLegacy)(C);default:return}})();if(g)return g.decode(I)},encode(I){switch(I.__TYPE__){case s.FieldContentType:return I.type==="Text"?(0,a.TextLegacy)(C).encode(I):I.type==="Color"?(0,a.ColorLegacy)(C).encode(I):I.type==="Range"?(0,a.RangeLegacy)(C).encode(I):I.type==="Date"?(0,a.DateLegacy)(C).encode(I):I.type==="Number"?(0,a.NumberLegacy)(C).encode(I):I.type==="Timestamp"?(0,a.TimestampLegacy)(C).encode(I):I.type==="Select"?(0,a.SelectLegacy)(C).encode(I):void 0;case u.GeoPointContentType:return(0,u.GeoPointLegacy)(C).encode(I);case p.RichTextContentType:return(0,p.RichTextLegacy)(C).encode(I);case o.EmbedContentType:return(0,o.EmbedLegacy)(C).encode(I);case i.BooleanContentType:return(0,i.BooleanLegacy)(C).encode(I);case c.ImageContentType:return(0,c.ImageLegacy)(C).encode(I);case l.IntegrationFieldContentType:return(0,l.IntegrationFieldLegacy)(C).encode(I);case d.LinkContentType:return(0,d.LinkContentLegacy)(C).encode(I);case A.SeparatorContentType:return(0,A.SeparatorLegacy)(C).encode(I);default:return}}});return Ci.NestableLegacy=_,Ci}var RF;function Lo(){return RF||(RF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(aq(),e),(0,t.__exportStar)(TR(),e),(0,t.__exportStar)(sq(),e),(0,t.__exportStar)(uq(),e),(0,t.__exportStar)(xR(),e),(0,t.__exportStar)(cq(),e),(0,t.__exportStar)(wR(),e),(0,t.__exportStar)(ZTe(),e),(0,t.__exportStar)(lq(),e),(0,t.__exportStar)(fq(),e)}(Ib)),Ib}var Do={},OF;function D0(){if(OF)return Do;OF=1,Object.defineProperty(Do,"__esModule",{value:!0}),Do.repeatableContentWithDefaultNestableContentValues=Do.withDefaultNestableContentValues=Do.withDefaultSlicePrimaryContentValues=void 0;const e=fe,t=Qa(),n=Lo();function r(a,s){const u=s;for(const[c,l]of Object.entries(a)){const d=s[c];if(d===void 0){if(l.type===e.GroupFieldType)u[c]=(0,t.groupContentWithDefaultValues)(l,t.GroupContentDefaultValue);else{const p=(0,n.NestableContentDefaultValue)(l);p&&(u[c]=p)}continue}l.type===e.GroupFieldType&&(0,t.isGroupContent)(d)&&(u[c]=(0,t.groupContentWithDefaultValues)(l,d))}return u}Do.withDefaultSlicePrimaryContentValues=r;function i(a,s){return Object.entries(a).reduce((u,[c,l])=>{if(s[c]===void 0){const d=(0,n.NestableContentDefaultValue)(l);return d!==void 0?{...u,[c]:d}:u}return u},s)}Do.withDefaultNestableContentValues=i;function o(a,s){const u=Object.entries(a);return s.map(c=>u.reduce((l,[d,p])=>{var A;const m=c.value.find(([v])=>v===d);if(p.type==="Group"){const v=(0,t.groupContentWithDefaultValues)(p,(A=m==null?void 0:m[1])!==null&&A!==void 0?A:{__TYPE__:t.GroupContentType,value:[]});return{...l,value:[...l.value.filter(([_])=>_!==d),...v?[[d,v]]:[]]}}else if(!m){const v=(0,n.NestableContentDefaultValue)(p);return{...l,value:[...l.value,...v?[[d,v]]:[]]}}return l},c))}return Do.repeatableContentWithDefaultNestableContentValues=o,Do}var FF;function Qa(){return FF||(FF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseGroupItemsContent=e.traverseGroupContent=e.groupContentWithDefaultValues=e.GroupLegacy=e.GroupItemLegacy=e.GroupContentDefaultValue=e.isGroupContent=e.GroupContent=e.GroupItemContent=e.GroupContentType=e.GroupItemContentType=void 0;const t=Q,n=lt,r=ln,i=Ge,o=(0,t.__importStar)(Z),a=fe,s=Qn,u=Pt(),c=Lo(),l=D0();e.GroupItemContentType="GroupItemContent",e.GroupContentType="GroupContentType",e.GroupItemContent=o.recursion("GroupItemContent",()=>o.strict({__TYPE__:o.literal(e.GroupItemContentType),value:o.array(o.tuple([o.string,o.union([c.NestableContent,e.GroupContent])]))})),e.GroupContent=o.recursion("GroupContent",()=>o.strict({__TYPE__:o.literal(e.GroupContentType),value:o.array(e.GroupItemContent)})),e.isGroupContent=e.GroupContent.is,e.GroupContentDefaultValue={__TYPE__:e.GroupContentType,value:[]};const d=o.record(o.string,o.unknown),p=C=>new o.Type("GroupItemLegacy",I=>(0,u.hasContentType)(I)&&I.__TYPE__===e.GroupItemContentType,I=>(0,i.pipe)(d.decode(I),n.either.map(g=>({value:Object.entries(g).reduce((y,[T,w])=>{const O=(0,s.getFieldCtx)(T,C),E=O.fieldType===a.GroupFieldType?(0,e.GroupLegacy)(O).decode(w):(0,c.NestableLegacy)(O).decode(w);return!E||(0,r.isLeft)(E)?y:[...y,[T,E.right]]},[]),__TYPE__:e.GroupItemContentType}))),I=>I.value.reduce((x,[g,S])=>{const y=(0,s.getFieldCtx)(g,C),T=(0,e.isGroupContent)(S)?(0,e.GroupLegacy)(y).encode(S):(0,c.NestableLegacy)(y).encode(S);return T?{content:{...x.content,[g]:T.content},types:{...x.types,...T.types}}:x},{content:{},types:{}}));e.GroupItemLegacy=p;const A=C=>{const I=o.array(o.union([o.null,(0,e.GroupItemLegacy)(C)])),x=o.array((0,e.GroupItemLegacy)(C));return new o.Type("GroupLegacy",e.isGroupContent,g=>(0,i.pipe)(I.decode(g),n.either.map(S=>({value:S.map(y=>y===null?{__TYPE__:e.GroupItemContentType,value:[]}:y),__TYPE__:e.GroupContentType}))),g=>{const S=x.encode(g.value);return{content:S.map(y=>y.content),types:S.reduce((y,T)=>({...y,...T.types}),{[C.keyOfType]:a.GroupFieldType})}})};e.GroupLegacy=A;function m(C,I){var x;const g=(x=C.config)===null||x===void 0?void 0:x.fields;return g?{...I,value:(0,l.repeatableContentWithDefaultNestableContentValues)(g,I.value)}:I}e.groupContentWithDefaultValues=m;function v({path:C,key:I,apiId:x,model:g,content:S}){return y=>{var T;const w=_({path:C,model:(T=g==null?void 0:g.config)===null||T===void 0?void 0:T.fields,content:S.value})(y);return y({path:C,key:I,apiId:x,model:g,content:{__TYPE__:S.__TYPE__,value:w}})}}e.traverseGroupContent=v;function _({path:C,model:I,content:x}){return g=>x.map((S,y)=>{const T=C.concat([{key:y.toString(),type:"GroupItem"}]),w=S.value.reduce((O,[E,F])=>{const W=I==null?void 0:I[E];let K;return(!W||(W==null?void 0:W.type)===a.GroupFieldType)&&F.__TYPE__===e.GroupContentType?K=v({path:T.concat([{key:E,type:"Widget"}]),key:E,apiId:E,model:W,content:F})(g):K=g({path:T.concat([{key:E,type:"Widget"}]),key:E,apiId:E,model:W,content:F}),!K||!((0,c.isNestableContent)(K)||(0,e.isGroupContent)(K))?O:O.concat([[E,K]])},[]);return{__TYPE__:S.__TYPE__,value:w}})}e.traverseGroupItemsContent=_}(_b)),_b}var Kb={},Nb={},qb={},eu={},kF;function dq(){if(kF)return eu;kF=1,Object.defineProperty(eu,"__esModule",{value:!0}),eu.RepeatableWidgets=eu.RepeatableWidgetsLegacy=void 0;const t=(0,Q.__importStar)(Z),n=Qa(),r=Lo(),i=s=>t.array((0,n.GroupItemLegacy)(s));eu.RepeatableWidgetsLegacy=i;const o=t.tuple([t.string,t.union([r.NestableContent,n.GroupContent])]),a=t.strict({__TYPE__:t.literal(n.GroupItemContentType),value:t.array(o)});return eu.RepeatableWidgets=t.array(a),eu}var MF;function Rm(){return MF||(MF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.migrateCompositeSlice=e.traverseCompositeSliceContent=e.compositeSliceContentWithDefaultValues=e.CompositeSliceContent=e.CompositeSliceLegacy=e.isCompositeSliceContent=e.CompositeSliceContentType=void 0;const t=Q,n=lt,r=ln,i=Ge,o=(0,t.__importStar)(Z),a=Qn,s=Pt(),u=Qa(),c=Lo(),l=D0(),d=dq();e.CompositeSliceContentType="CompositeSliceContent";const p=I=>(0,s.hasContentType)(I)&&I.__TYPE__===e.CompositeSliceContentType;e.isCompositeSliceContent=p;const A=o.exact(o.partial({repeat:o.array(o.unknown),"non-repeat":o.UnknownRecord})),m=I=>new o.Type("CompositeSliceLegacy",e.isCompositeSliceContent,x=>(0,i.pipe)(A.decode(x),n.either.map(g=>{const S=(()=>{const T=(0,a.getFieldCtx)("repeat",I),w=(0,d.RepeatableWidgetsLegacy)(T).decode(g.repeat);if(!(!w||(0,r.isLeft)(w)))return w.right})()||[];return{nonRepeat:Object.entries(g["non-repeat"]||{}).reduce((T,[w,O])=>{const E=(0,a.getFieldCtx)(w,I,["non-repeat"]);if(!E)return T;const F=(0,c.NestableLegacy)(E).decode(O);return!F||(0,r.isLeft)(F)?T:{...T,[w]:F.right}},{}),repeat:S,__TYPE__:e.CompositeSliceContentType}})),x=>{const g=Object.entries(x.nonRepeat).reduce((y,[T,w])=>{const O=(0,a.getFieldCtx)(T,I,["non-repeat"]),E=(0,c.NestableLegacy)(O).encode(w);return E?{content:{...y.content,[T]:E.content},types:{...y.types,...E.types}}:y},{content:{},types:{}}),S=(()=>{const y=(0,a.getFieldCtx)("repeat",I);return(0,d.RepeatableWidgetsLegacy)(y).encode(x.repeat)})()||[];return{content:{"non-repeat":g.content,repeat:S.map(y=>y.content)},types:{[I.keyOfType]:"Slice",...g.types,...S.reduce((y,T)=>({...y,...T.types}),{})}}});e.CompositeSliceLegacy=m,e.CompositeSliceContent=o.strict({__TYPE__:o.literal(e.CompositeSliceContentType),nonRepeat:o.record(o.string,c.NestableContent),repeat:d.RepeatableWidgets});function v(I,x){var g,S;const y=(0,l.withDefaultNestableContentValues)((g=I["non-repeat"])!==null&&g!==void 0?g:{},x.nonRepeat),T=(0,l.repeatableContentWithDefaultNestableContentValues)((S=I.repeat)!==null&&S!==void 0?S:{},x.repeat);return{...x,nonRepeat:y,repeat:T}}e.compositeSliceContentWithDefaultValues=v;function _({path:I,sliceKey:x,sliceName:g,model:S,content:y}){return(T,w)=>{const O=Object.entries(y.widget.nonRepeat).reduce((F,[W,K])=>{const J=(()=>{var re,P,Y;return(S==null?void 0:S.type)==="SharedSlice"?(P=(re=S==null?void 0:S.fields)===null||re===void 0?void 0:re.primary)===null||P===void 0?void 0:P[W]:(Y=S==null?void 0:S["non-repeat"])===null||Y===void 0?void 0:Y[W]})(),ee=T({path:I.concat([{key:"non-repeat",type:"primary"},{key:W,type:"Widget"}]),key:W,apiId:g,model:J,content:K});return ee?(0,c.isNestableContent)(ee)?{...F,[W]:ee}:(console.warn(`Warn: Non nestable content with key [${W}] detected in a composite slice [${g}] with key [${x}]`),F):F},{}),E=(0,u.traverseGroupItemsContent)({path:I.concat([{key:"repeat",type:"items"}]),model:(S==null?void 0:S.type)==="SharedSlice"?S==null?void 0:S.fields.items:S==null?void 0:S.repeat,content:y.widget.repeat})(T);return w({key:x,apiId:g,path:I,model:S,content:{...y,widget:{__TYPE__:"CompositeSliceContent",repeat:E,nonRepeat:O}}})}}e.traverseCompositeSliceContent=_;function C(I,x){const[,g]=x.key.split("$");return{key:`${I.sliceName}$${g}`,name:I.sliceName,maybeLabel:x.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:I.variationId,primary:Object.entries(x.widget.nonRepeat).reduce((S,[y,T])=>{var w;return!((w=I.fields.primary)===null||w===void 0)&&w[y]?{...S,[y]:T}:(console.warn(`The widget ${y} in the non-repeat zone of the composite slice [${I.sliceName}] with key [${x.key}] doesn't exist in the model.`),S)},{}),items:x.widget.repeat.map(S=>({__TYPE__:"GroupItemContent",value:S.value.reduce((y,[T,w])=>{var O;return!((O=I.fields.items)===null||O===void 0)&&O[T]?y.concat([[T,w]]):(console.warn(`The widget ${T} in the repeat zone of the composite slice [${I.sliceName}] with key [${x.key}] doesn't exist in the model.`),y)},[])}),[])}}}e.migrateCompositeSlice=C}(qb)),qb}var Vb={},Ko={},LF;function pq(){if(LF)return Ko;LF=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.isSlicePrimaryContent=Ko.SlicePrimaryLegacy=Ko.SlicePrimaryContent=void 0;const t=(0,Q.__importStar)(Z),n=fe,r=Qa(),i=Lo();Ko.SlicePrimaryContent=t.union([i.NestableContent,r.GroupContent]);const o=s=>{const u=(0,r.GroupLegacy)(s),c=(0,i.NestableLegacy)(s);return{decode(l){return s.fieldType===n.GroupFieldType?u.decode(l):c.decode(l)},encode(l){return(0,r.isGroupContent)(l)?u.encode(l):c.encode(l)}}};Ko.SlicePrimaryLegacy=o;const a=s=>(0,i.isNestableContent)(s)||(0,r.isGroupContent)(s);return Ko.isSlicePrimaryContent=a,Ko}var jF;function Om(){return jF||(jF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseSharedSliceContent=e.sharedSliceContentWithDefaultValues=e.SharedSliceContent=e.SharedSliceLegacy=e.isSharedSliceContent=e.SharedSliceContentType=void 0;const t=Q,n=lt,r=ln,i=Ge,o=(0,t.__importStar)(Z),a=R0,s=fe,u=Qn,c=Pt(),l=Qa(),d=Lo(),p=D0(),A=dq(),m=pq();e.SharedSliceContentType="SharedSliceContent";const v=g=>(0,c.hasContentType)(g)&&g.__TYPE__===e.SharedSliceContentType;e.isSharedSliceContent=v;const _=o.exact(o.type({variation:o.string,items:(0,a.withFallback)(o.array(o.unknown),[]),primary:(0,a.withFallback)(o.UnknownRecord,{})})),C=g=>new o.Type("SharedSliceLegacy",e.isSharedSliceContent,S=>(0,i.pipe)(_.decode(S),n.either.map(y=>{const T=(()=>{const O=(0,u.getFieldCtx)("items",g,["variations",y.variation]),E=(0,A.RepeatableWidgetsLegacy)(O).decode(y.items);if(!(!E||(0,r.isLeft)(E)))return E.right})()||[],w=Object.entries(y.primary).reduce((O,[E,F])=>{const W=(0,u.getFieldCtx)(E,g,["variations",y.variation,"primary"]),K=(0,m.SlicePrimaryLegacy)(W).decode(F);return!K||(0,r.isLeft)(K)?O:{...O,[E]:K.right}},{});return{variation:y.variation,primary:w,items:T,__TYPE__:e.SharedSliceContentType}})),S=>{const y=Object.entries(S.primary).reduce((w,[O,E])=>{const F=(0,u.getFieldCtx)(O,g,["variations",S.variation,"primary"]),W=(0,m.SlicePrimaryLegacy)(F).encode(E);return W?{content:{...w.content,[O]:W.content},types:{...w.types,...W.types}}:w},{content:{},types:{}}),T=(()=>{const w=(0,u.getFieldCtx)("items",g,["variations",S.variation]);return(0,A.RepeatableWidgetsLegacy)(w).encode(S.items)})()||[];return{content:{primary:y.content,items:T.map(w=>w.content),variation:S.variation},types:{[g.keyOfType]:"SharedSlice",...y.types,...T.reduce((w,O)=>({...w,...O.types}),{})}}});e.SharedSliceLegacy=C,e.SharedSliceContent=o.strict({__TYPE__:o.literal(e.SharedSliceContentType),variation:o.string,primary:o.record(o.string,m.SlicePrimaryContent),items:A.RepeatableWidgets});function I(g,S){var y,T;const w=g.variations.find(K=>K.id===S.variation),O=(y=w==null?void 0:w.primary)!==null&&y!==void 0?y:{},E=(T=w==null?void 0:w.items)!==null&&T!==void 0?T:{},F=(0,p.withDefaultSlicePrimaryContentValues)(O,S.primary),W=(0,p.repeatableContentWithDefaultNestableContentValues)(E,S.items);return{...S,primary:F,items:W}}e.sharedSliceContentWithDefaultValues=I;function x({path:g,sliceKey:S,sliceName:y,model:T,content:w}){return(O,E)=>{const F=Object.entries(w.widget.primary).reduce((K,[J,ee])=>{var re,P;const Y=(P=(re=T==null?void 0:T.fields)===null||re===void 0?void 0:re.primary)===null||P===void 0?void 0:P[J],M=(()=>(0,l.isGroupContent)(ee)?(0,l.traverseGroupContent)({path:g.concat([{key:"primary",type:"primary"},{key:J,type:"Widget"}]),key:J,apiId:J,content:ee,model:(Y==null?void 0:Y.type)===s.GroupFieldType?Y:void 0})(O):(0,d.isNestableContent)(ee)?O({path:g.concat([{key:"primary",type:"primary"},{key:J,type:"Widget"}]),key:J,apiId:J,model:Y,content:ee}):void 0)();return M?((0,m.isSlicePrimaryContent)(M)||console.warn(`Warn: Non nestable or group content with key [${J}] detected in a shared slice [${y}] with key [${S}]`),{...K,[J]:M}):K},{}),W=(0,l.traverseGroupItemsContent)({path:g.concat([{key:"items",type:"items"}]),model:T==null?void 0:T.fields.items,content:w.widget.items})(O);return E({key:S,apiId:y,path:g,model:T,content:{...w,widget:{__TYPE__:"SharedSliceContent",variation:w.widget.variation,primary:F,items:W}}})}}e.traverseSharedSliceContent=x}(Vb)),Vb}var Tr={},UF;function Fm(){if(UF)return Tr;UF=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.migrateSimpleSlice=Tr.traverseSimpleSliceContent=Tr.SimpleSliceLegacy=Tr.isSimpleSliceContent=Tr.SimpleSliceContent=void 0;const t=(0,Q.__importStar)(Z),n=Qa(),r=Lo();Tr.SimpleSliceContent=t.union([r.NestableContent,n.GroupContent]);const i=u=>(0,r.isNestableContent)(u)||(0,n.isGroupContent)(u);Tr.isSimpleSliceContent=i;const o=u=>({decode:(()=>u.fieldType==="Group"?(0,n.GroupLegacy)(u).decode.bind(null):(0,r.NestableLegacy)(u).decode.bind(null))(),encode:c=>{switch(c.__TYPE__){case"GroupContentType":return(0,n.GroupLegacy)(u).encode(c);default:return(0,r.NestableLegacy)(u).encode(c)}}});Tr.SimpleSliceLegacy=o;function a({path:u,sliceKey:c,sliceName:l,model:d,content:p}){return(A,m)=>{if((0,n.isGroupContent)(p.widget)){const _=(0,n.traverseGroupContent)({path:u,key:p.key,apiId:p.name,model:(()=>{if((d==null?void 0:d.type)==="Group")return d;if((d==null?void 0:d.type)==="SharedSlice")return{type:"Group",config:{fields:d.fields.items||{}}}})(),content:p.widget})(A);return _&&m({key:p.key,apiId:p.name,path:u,model:d,content:{...p,widget:_}})}const v=A({key:p.key,apiId:p.name,path:u,model:(()=>{var _;if((d==null?void 0:d.type)==="SharedSlice")return(_=d.fields.primary)===null||_===void 0?void 0:_[p.name];if((d==null?void 0:d.type)!=="Group")return d})(),content:p.widget});return v&&m({key:c,apiId:l,path:u,model:d,content:{...p,widget:v}})}}Tr.traverseSimpleSliceContent=a;function s(u,c){var l;const[,d]=c.key.split("$"),p=`${u.sliceName}$${d}`;return c.widget.__TYPE__==="GroupContentType"?{key:p,name:u.sliceName,maybeLabel:c.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:u.variationId,primary:{},items:c.widget.value.map(A=>({__TYPE__:"GroupItemContent",value:A.value.reduce((m,[v,_])=>{var C;return!((C=u.fields.items)===null||C===void 0)&&C[v]?m.concat([[v,_]]):m},[])}),[])}}:{key:p,name:u.sliceName,maybeLabel:c.maybeLabel,widget:{__TYPE__:"SharedSliceContent",variation:u.variationId,primary:!((l=u.fields.primary)===null||l===void 0)&&l[c.name]?{[c.name]:c.widget}:{},items:[]}}}return Tr.migrateSimpleSlice=s,Tr}var BF;function Aq(){return BF||(BF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SliceContent=e.SliceLegacy=void 0;const t=Q,n=(0,t.__importStar)(Z),r=Rm(),i=Om(),o=Fm(),a=s=>({decode:u=>(()=>{switch(s.fieldType){case"Slice":return(0,r.CompositeSliceLegacy)(s);case"SharedSlice":return(0,i.SharedSliceLegacy)(s);default:return(0,o.SimpleSliceLegacy)(s)}})().decode(u),encode:u=>{switch(u.__TYPE__){case"SharedSliceContent":return(0,i.SharedSliceLegacy)(s).encode(u);case"CompositeSliceContent":return(0,r.CompositeSliceLegacy)(s).encode(u);default:return(0,o.SimpleSliceLegacy)(s).encode(u)}}});e.SliceLegacy=a,e.SliceContent=n.union([r.CompositeSliceContent,i.SharedSliceContent,o.SimpleSliceContent]),(0,t.__exportStar)(Rm(),e),(0,t.__exportStar)(Om(),e),(0,t.__exportStar)(Fm(),e),(0,t.__exportStar)(pq(),e)}(Nb)),Nb}var pn={},PF;function hq(){if(PF)return pn;PF=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.migrateSliceItem=pn.SlicesItemLegacy=pn.sliceItemContentWithDefaultValues=pn.isSimpleSliceItemContent=pn.isCompositeSliceItemContent=pn.isSharedSliceItemContent=pn.SliceItemContent=void 0;const e=Q,t=lt,n=ln,r=Ge,i=(0,e.__importStar)(Z),o=Xe,a=Qn,s=Qa(),u=Lo(),c=D0(),l=Aq(),d=Rm(),p=Om(),A=Fm();pn.SliceItemContent=i.type({key:i.string,name:i.string,maybeLabel:i.union([i.string,i.undefined]),widget:l.SliceContent});function m(S){return(0,p.isSharedSliceContent)(S.widget)}pn.isSharedSliceItemContent=m;function v(S){return(0,d.isCompositeSliceContent)(S.widget)}pn.isCompositeSliceItemContent=v;function _(S){return(0,s.isGroupContent)(S.widget)||(0,u.isNestableContent)(S.widget)}pn.isSimpleSliceItemContent=_;function C(S,y){var T;if(S.type==="SharedSlice"&&(0,p.isSharedSliceContent)(y))return(0,l.sharedSliceContentWithDefaultValues)(S,y);if(S.type==="Slice"&&(0,d.isCompositeSliceContent)(y))return(0,l.compositeSliceContentWithDefaultValues)(S,y);if(S.type==="Group"&&(0,s.isGroupContent)(y)&&(!((T=S.config)===null||T===void 0)&&T.fields)){const w=(0,c.repeatableContentWithDefaultNestableContentValues)(S.config.fields,y.value);return{...y,value:w}}return y}pn.sliceItemContentWithDefaultValues=C;const I=i.exact(i.intersection([i.type({key:i.string,value:i.unknown}),i.partial({label:(0,o.nullable)(i.string)})])),x=S=>new i.Type("SlicesItemLegacy",y=>((0,p.isSharedSliceContent)(y.widget),(0,d.isCompositeSliceContent)(y.widget),(0,A.isSimpleSliceContent)(y.widget)),(y,T)=>(0,r.pipe)(I.decode(y),t.either.chain(w=>{var O;const E=w.key.indexOf("$"),F=w.key.substring(0,E>0?E:void 0),W=(0,a.getFieldCtx)(F,S),K=(0,l.SliceLegacy)(W).decode(w.value);return!K||(0,n.isLeft)(K)?i.failure(y,T):i.success({key:w.key,name:F,maybeLabel:(O=w.label)!==null&&O!==void 0?O:void 0,widget:K.right})})),y=>{const T=(0,a.getFieldCtx)(y.name,S),w=(0,l.SliceLegacy)(T).encode(y.widget);return{content:{key:y.key,label:y.maybeLabel,value:(w==null?void 0:w.content)||{}},types:(w==null?void 0:w.types)||{}}});pn.SlicesItemLegacy=x;const g=({model:S,content:y})=>v(y)&&(S==null?void 0:S.type)==="SharedSlice"?(0,d.migrateCompositeSlice)(S,y):_(y)&&(S==null?void 0:S.type)==="SharedSlice"?(0,A.migrateSimpleSlice)(S,y):y;return pn.migrateSliceItem=g,pn}var Qb={},WF;function XTe(){return WF||(WF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.traverseSlices=e.slicesContentWithDefaultValues=e.SlicesContent=e.SlicesLegacy=e.isSlicesContent=e.SlicesContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=hh,a=fe,s=Pt(),u=Rm(),c=Om(),l=Fm(),d=hq();e.SlicesContentType="SliceContentType";const p=C=>(0,s.hasContentType)(C)&&C.__TYPE__===e.SlicesContentType;e.isSlicesContent=p;const A=C=>{const I=i.array((0,d.SlicesItemLegacy)(C));return new i.Type("SlicesLegacy",e.isSlicesContent,x=>(0,r.pipe)(I.decode(x),n.either.map(g=>({__TYPE__:e.SlicesContentType,value:g}))),x=>{const g=I.encode(x.value);return{content:g.map(S=>S.content),types:g.reduce((S,y)=>({...S,...y.types}),{[C.keyOfType]:"Slices"})}})};e.SlicesLegacy=A,e.SlicesContent=i.type({__TYPE__:i.literal(e.SlicesContentType),value:i.array(d.SliceItemContent)});function m(C,I){var x;const g=(x=C==null?void 0:C.config)===null||x===void 0?void 0:x.choices;if(g===void 0)return I;const S=I.value.map(y=>{const T=g[y.name];if(T){const w=(0,d.sliceItemContentWithDefaultValues)(T,y.widget);return{...y,widget:w}}return y});return{...I,value:S}}e.slicesContentWithDefaultValues=m;function v(C,I,x){var g,S;const y=(S=(g=I==null?void 0:I.config)===null||g===void 0?void 0:g.choices)===null||S===void 0?void 0:S[x.name],T=()=>{if((0,d.isSharedSliceItemContent)(x)&&y&&(0,a.isStaticSharedSlice)(y)){const E=y.variations.find(F=>F.id===x.widget.variation);return E?{type:"SharedSlice",sliceName:y.id,variationId:E.id,fields:{primary:E.primary||{},items:E.items||{}}}:void 0}},w=()=>{var E;const F=o.ContentPath.append(o.ContentPath.serialize(C),x.name),W=Object.values(((E=I==null?void 0:I.config)===null||E===void 0?void 0:E.choices)||{}).find(J=>{var ee;return(0,a.isStaticSharedSlice)(J)?!!(!((ee=J.legacyPaths)===null||ee===void 0)&&ee[F]):!1});if(!W)return;const K=W==null?void 0:W.variations.find(J=>{var ee;return J.id===((ee=W.legacyPaths)===null||ee===void 0?void 0:ee[F])});if(K)return{type:"SharedSlice",sliceName:W.id,variationId:K.id,fields:{primary:K.primary||{},items:K.items||{}}}},O=()=>{if(y){if((0,a.isCompositeSlice)(y))return{type:"Slice","non-repeat":y["non-repeat"]||{},repeat:y.repeat||{}};if((0,a.isLegacySlice)(y))return y}};return T()||w()||O()}function _({path:C,key:I,model:x,content:g}){return({transformWidget:S=({content:T})=>T,transformSlice:y=({content:T})=>T})=>{const T=g.value.reduce((w,O)=>{const E=x&&v(C,x,O),F=(()=>{if((0,d.isSharedSliceItemContent)(O))return(0,c.traverseSharedSliceContent)({path:C.concat({key:O.key,type:"SharedSlice"}),sliceKey:O.key,sliceName:O.name,model:(E==null?void 0:E.type)==="SharedSlice"?E:void 0,content:O})(S,y);if((0,d.isCompositeSliceItemContent)(O))return(0,u.traverseCompositeSliceContent)({path:C.concat({key:O.key,type:"Slice"}),sliceKey:O.key,sliceName:O.name,model:(E==null?void 0:E.type)==="Slice"||(E==null?void 0:E.type)==="SharedSlice"?E:void 0,content:O})(S,y);if((0,d.isSimpleSliceItemContent)(O))return(0,l.traverseSimpleSliceContent)({path:C.concat({key:O.key,type:"LegacySlice"}),sliceKey:O.key,sliceName:O.name,model:E&&(E==null?void 0:E.type)!=="Slice"?E:void 0,content:O})(S,y)})();return F?w.concat(F):w},[]);return S({path:C,key:I,apiId:I,model:x,content:{__TYPE__:g.__TYPE__,value:T}})}}e.traverseSlices=_}(Qb)),Qb}var DF;function mq(){return DF||(DF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(Aq(),e),(0,t.__exportStar)(hq(),e),(0,t.__exportStar)(XTe(),e)}(Kb)),Kb}var zb={},KF;function gq(){return KF||(KF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UIDContent=e.UIDLegacy=e.isUIDContent=e.UIDContentType=void 0;const t=Q,n=lt,r=Ge,i=(0,t.__importStar)(Z),o=Pt();e.UIDContentType="UIDContent";const a=u=>(0,o.hasContentType)(u)&&u.__TYPE__===e.UIDContentType;e.isUIDContent=a;const s=u=>new i.Type("UIDLegacy",e.isUIDContent,c=>(0,r.pipe)(i.string.decode(c),n.either.map(l=>e.UIDContent.encode({value:l,__TYPE__:e.UIDContentType}))),c=>({content:c.value,types:{[u.keyOfType]:"UID"}}));e.UIDLegacy=s,e.UIDContent=i.type({__TYPE__:i.literal(e.UIDContentType),value:i.string})}(zb)),zb}var No={},NF;function exe(){if(NF)return No;NF=1,Object.defineProperty(No,"__esModule",{value:!0}),No.WidgetLegacy=No.isWidgetContent=No.WidgetContent=void 0;const t=(0,Q.__importStar)(Z),n=Qa(),r=Lo(),i=mq(),o=gq();No.WidgetContent=t.union([n.GroupContent,r.NestableContent,o.UIDContent,i.SlicesContent]);const a=u=>(0,n.isGroupContent)(u)||(0,r.isNestableContent)(u)||(0,o.isUIDContent)(u)||(0,i.isSlicesContent)(u);No.isWidgetContent=a;const s=u=>({decode(c){if(!u.fieldType)return;const l=(()=>{switch(u.fieldType){case"UID":return(0,o.UIDLegacy)(u);case"Group":return(0,n.GroupLegacy)(u);case"Choice":case"Slices":return(0,i.SlicesLegacy)(u);default:return(0,r.NestableLegacy)(u)}})();if(l)return l.decode(c)},encode(c){switch(c.__TYPE__){case o.UIDContentType:return(0,o.UIDLegacy)(u).encode(c);case n.GroupContentType:return(0,n.GroupLegacy)(u).encode(c);case i.SlicesContentType:return(0,i.SlicesLegacy)(u).encode(c);default:return(0,r.NestableLegacy)(u).encode(c)}}});return No.WidgetLegacy=s,No}var qF;function ER(){return qF||(qF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(oq(),e),(0,t.__exportStar)(Qa(),e),(0,t.__exportStar)(Lo(),e),(0,t.__exportStar)(mq(),e),(0,t.__exportStar)(gq(),e),(0,t.__exportStar)(exe(),e)}(Cb)),Cb}Object.defineProperty(or,"__esModule",{value:!0});or.migrateDocument=or.collectWidgets=or.traverseDocument=or.fillDocumentWithDefaultValues=or.DocumentLegacy=or.Document=void 0;const txe=Q,vq=lt,$R=ln,yq=Ge,Fl=(0,txe.__importStar)(Z),bq=hh,RR=Lc,kl=fe,_i=ER(),tC=Qn;or.Document=Fl.record(RR.WidgetKey,_i.WidgetContent);const nxe=Fl.record(RR.WidgetKey,Fl.unknown),OR=e=>new Fl.Type("Document",t=>!!t&&typeof t=="object",t=>(0,yq.pipe)(nxe.decode(t),vq.either.map(n=>Object.entries(n).reduce((r,[i,o])=>{const a=(0,tC.defaultCtx)(i,e),s=(0,_i.WidgetLegacy)(a).decode(o);return!s||(0,$R.isLeft)(s)?r:{...r,[i]:s.right}},{}))),t=>Object.entries(t).reduce((n,[r,i])=>{const o=(0,tC.defaultCtx)(r,e),a=(0,_i.WidgetLegacy)(o).encode(i);return a?{content:{...n.content,[r]:a.content},types:{...n.types,...a.types}}:n},{content:{},types:{}}));function Cq(e){const t=Object.entries(e),{types:n,widgets:r}=t.reduce((a,[s,u])=>{if(s.endsWith("_TYPE")){const c=tC.FieldOrSliceType.decode(u);if((0,$R.isRight)(c))return{...a,types:a.types.set(s.substring(0,s.length-5),c.right)}}return!s.endsWith("_POSITION")&&!s.endsWith("_TYPE")?{...a,widgets:{...a.widgets,[s]:u}}:a},{types:new Map,widgets:{}}),i=e.slugs_INTERNAL||[],o=e.uid;return{widgets:r,types:n,uid:o,slugs:i}}function rxe(e,t){const n=(0,yq.pipe)(Fl.record(RR.WidgetKey,Fl.unknown).decode(e),vq.either.chain(r=>{const{types:i,widgets:o}=Cq(r);return OR(i).decode(o)}));return(0,$R.isLeft)(n)?void 0:Sq(n.right,t)}function ixe(e){const t=OR().encode(e);return{...t.content,...t.types}}or.DocumentLegacy={_codec:OR,extractMetadata:Cq,parse:rxe,encode:ixe};function FR(e){return{customTypeId:e==null?void 0:e.id,fields:Object.fromEntries((0,kl.flattenSections)(e))}}function oxe(e,t){const{fields:n}=e&&kl.StaticCustomType.is(e)?FR(e):e;return Object.entries(n).reduce((r,[i,o])=>{const a=t[i],s=(()=>{switch(o.type){case"Group":return(0,_i.isGroupContent)(a)?(0,_i.groupContentWithDefaultValues)(o,a):a;case"Choice":case"Slices":return(0,_i.isSlicesContent)(a)?(0,_i.slicesContentWithDefaultValues)(o,a):a;default:return a===void 0&&kl.NestableWidget.is(o)?(0,_i.NestableContentDefaultValue)(o):a}})();return s?{...r,[i]:s}:r},t)}or.fillDocumentWithDefaultValues=oxe;function kR({document:e,customType:t}){const n=t&&kl.StaticCustomType.is(t)?FR(t):t;return({transformWidget:r=({content:o})=>o,transformSlice:i=({content:o})=>o})=>{const o=n&&Object.entries(n.fields).reduce((a,[s,u])=>({...a,[s]:u}),{});return Object.entries(e).reduce((a,[s,u])=>{const c=o&&o[s],l=bq.ContentPath.make([{key:n==null?void 0:n.customTypeId,type:"CustomType"},{key:s,type:"Widget"}]),d=(()=>{switch(u.__TYPE__){case"SliceContentType":return(0,_i.traverseSlices)({path:l,key:s,model:(c==null?void 0:c.type)==="Slices"||(c==null?void 0:c.type)==="Choice"?c:void 0,content:u})({transformWidget:r,transformSlice:i});case"GroupContentType":return(0,_i.traverseGroupContent)({path:l,key:s,apiId:s,model:(c==null?void 0:c.type)==="Group"?c:void 0,content:u})(r);default:return r({path:l,key:s,apiId:s,model:(c==null?void 0:c.type)!=="Group"&&(c==null?void 0:c.type)!=="Slices"&&(c==null?void 0:c.type)!=="Choice"?c:void 0,content:u})}})();return{...a,...d?{[s]:d}:{}}},{})}}or.traverseDocument=kR;function axe(e,t){const n={};return kR({document:e})({transformWidget:({content:r,path:i})=>{const o=bq.ContentPath.serialize(i);return t(r,i)&&(n[o]=r),r}}),n}or.collectWidgets=axe;function Sq(e,t){const n=kl.StaticCustomType.is(t)?FR(t):t;return Object.values((0,kl.collectSharedSlices)(n)).some(i=>!!i.legacyPaths)?kR({document:e,customType:t})({transformSlice:_i.migrateSliceItem}):e}or.migrateDocument=Sq;(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Q;(0,t.__exportStar)(or,e),(0,t.__exportStar)(ER(),e),(0,t.__exportStar)(Qn,e)})(Ce);function sxe(e,t){const n=uxe(e,t),r=cxe(e,n);return Ce.fillDocumentWithDefaultValues(e,r)}function uxe(e,t){return fe.flattenSections(e).reduce((r,[i,o])=>!t[i]&&o.type==="Group"?{...r,[i]:_q}:r,t)}function cxe(e,t){return Ce.traverseDocument({document:t,customType:e})({transformWidget({model:n,content:r}){return n?r:void 0},transformSlice(n){return n.model?n.content:void 0}})}const _q={__TYPE__:"GroupContentType",value:[{__TYPE__:"GroupItemContent",value:[]}]},Iq={unclassified:{title:"Draft",color:"amber"},published:{title:"Live",color:"green"},release:{title:"Planned",color:"purple"},archived:{title:"Archived",color:"grey"}},Tq={unclassified:["unclassified","published"],archived:["unclassified","published"],release:["release","published"],published:["published"]};function MR(e){const{documentId:t,versionId:n,baseUrl:r,status:i,releaseId:o}=e,a={s:i,v:n,r:o},s=Fr.createRouteParams({params:a}),u=new URLSearchParams(s).toString();return new URL(`pages/${t}?${u}`,r)}function xq(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var lxe=Te.createContext(xq()),fxe=({children:e})=>{const[t]=Te.useState(()=>xq());return f.jsx(lxe.Provider,{value:t,children:typeof e=="function"?e(t):e})};function dxe(e){const{children:t,...n}=e;return f.jsx(fxe,{children:({reset:r})=>f.jsx(h.ErrorBoundary,{...n,onReset:r,children:t})})}const pxe="media-library-",VF=`${pxe}newMediaLibraryFeaturesBannerClosed`;function wq(e){const{maxWidth:t}=e,[n,r]=$.useState(()=>!(_d.localStorage.isAvailable()&&_d.localStorage.read(VF)));function i(){r(!1),_d.localStorage.isAvailable()&&_d.localStorage.write(VF,String(Date.now()))}return n?f.jsx(h.Box,{justifyContent:"center",padding:{inline:16,block:12},backgroundColor:"purple9",children:f.jsxs(h.Box,{maxWidth:t,width:"100%",alignItems:"center",gap:8,children:[f.jsx(h.CircleIcon,{color:"purple",name:"autoFixHigh",size:"extraSmall",variant:"solid"}),f.jsxs("div",{children:[f.jsx(h.Text,{color:"white",variant:"bold",children:"New features on the Media Library now available!"}),f.jsxs(h.Box,{gap:4,flexWrap:"wrap",children:[f.jsx(h.Text,{color:"white",children:"Media Tagging, Filtering, Improved Search & Bulk Deletion"}),f.jsx(h.Text,{color:"white",variant:"bold",href:"https://prismic.io/lp/new-media-library",target:"_blank",rel:"noopener noreferrer",underline:!0,children:"Find out More →"})]})]}),f.jsx(h.Button,{invisible:!0,color:"white",sx:{marginLeft:"auto",marginBottom:"auto",flexShrink:0},underline:!0,onClick:i,children:"Close"})]})}):null}const Eq=$.createContext(void 0),Axe={selectedIds:new Set,excludedIds:new Set,isAllSelected:!1};function $q(e){const{children:t,initialState:n,initialTotalItemCount:r,isSelectAllEnabled:i=!1}=e,o=$.useRef(),a=$.useRef(r||0);function s(){if(n&&n.selectedIds){const T=[...n.selectedIds].pop();T&&(o.current=T)}return{...Axe,...n}}const[u,c]=$.useState(s),l=$.useMemo(()=>{const{selectedIds:T,excludedIds:w,isAllSelected:O}=u;return O?a.current-w.size:T.size},[u]),d=$.useCallback(T=>{const{isAllSelected:w,selectedIds:O,excludedIds:E}=u;return w?!E.has(T):O.has(T)},[u]),p=$.useCallback(()=>{const{isAllSelected:T,selectedIds:w,excludedIds:O}=u;return{selectedIds:[...w],excludedIds:[...O],isAllSelected:T,selectedCount:l}},[u,l]),A=Ne.useStableCallback(()=>{i&&c({isAllSelected:!0,selectedIds:new Set,excludedIds:new Set})}),m=Ne.useStableCallback(()=>{c({isAllSelected:!1,selectedIds:new Set,excludedIds:new Set})});$.useEffect(()=>{const{isAllSelected:T,selectedIds:w,excludedIds:O}=u,E=a.current;if(!(E===0||!i)){if(T&&O.size===E){m();return}if(!T&&w.size===E){A();return}}},[u,i,A,m]);const v=Ne.useStableCallback(T=>{const{id:w,isSingleSelection:O,metaKey:E,shiftKey:F,ids:W}=T;return F&&W&&W.length>0&&o.current?C(w,W,o.current):O&&!E?_(w):d(w)?g([w]):x([w]),o.current=w,d(w)});function _(T){d(T)&&l===1?c(w=>({...w,selectedIds:new Set})):c({isAllSelected:!1,selectedIds:new Set([T]),excludedIds:new Set})}function C(T,w,O){const E=hxe(w,O,T),F=d(T);return F?g(E):x(E),F}const I=Ne.useStableCallback(()=>{l>0?m():A()});function x(T){const{isAllSelected:w}=u;if(w){c(O=>({...O,excludedIds:QF(O.excludedIds,T)}));return}c(O=>({...O,selectedIds:zF(O.selectedIds,T)}))}function g(T){const{isAllSelected:w}=u;if(w){c(O=>({...O,excludedIds:zF(O.excludedIds,T)}));return}c(O=>({...O,selectedIds:QF(O.selectedIds,T)}))}function S(T){a.current=T}const y=$.useMemo(()=>({selectedCount:l,state:u,totalItemCount:a.current,isSelected:d,isSelectAllEnabled:i,getSelectionState:p,toggleSelection:v,toggleSelectAll:I,clearSelection:m,setTotalItemCount:S}),[u,m,p,i,d,l,I,v]);return f.jsx(Eq.Provider,{value:y,children:t})}function Vs(e){const t=$.useContext(Eq);if(t===void 0)throw new Error("useSelectionManagerContext must be used within a SelectionManagerProvider");const{totalItemCount:n,onChangeSelection:r}=e||{},{setTotalItemCount:i,totalItemCount:o,state:a,getSelectionState:s,...u}=t;n!==void 0&&n!==o&&i(n);const c=Ne.useStableCallback(r);return $.useEffect(()=>{c==null||c(s())},[s,c,a]),{...u,getSelectionState:s,isAllSelected:a.isAllSelected}}function hxe(e,t,n){const r=e.indexOf(t),i=e.indexOf(n);if(r===-1||i===-1)throw new Error("Both startValue and endValue must be in the array");return r<=i?e.slice(r,i+1):e.slice(i,r+1)}function QF(e,t){const n=new Set(e);return t.forEach(r=>n.delete(r)),n}function zF(e,t){return new Set([...e,...t])}const K0=$.createContext(void 0);function Ee(){const e=$.useContext(K0);if(!e)throw new Error("Missing EditorConfigContext.Provider");return e}class nC extends Error{}function Jt(e){throw new nC(`Missing EditorConfig.${e}`)}function mxe(){if(new URL(location.href).searchParams.has("debug"))return;const n=console.error.bind(console);console.error=(...r)=>{r[0]instanceof nC||gxe(r)||n(...r)},window.addEventListener("error",r=>{r.error instanceof nC&&r.preventDefault(),vxe(r.error)&&r.preventDefault()})}function gxe(e){const t="Warning: flushSync was called from inside a lifecycle method",n=typeof e[0]=="string"&&e[0].includes(t),r=typeof e[1]=="string"&&e[1].includes("RichTextField");return n&&r}function vxe(e){const t=/Invalid content for node document: <(bulletList|orderedList)\(listItem*/,n=e.message;return!!(typeof n=="string"&&n.match(t))}var He;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(He||(He={}));var rC;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(rC||(rC={}));const ne=He.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xa=e=>{switch(typeof e){case"undefined":return ne.undefined;case"string":return ne.string;case"number":return isNaN(e)?ne.nan:ne.number;case"boolean":return ne.boolean;case"function":return ne.function;case"bigint":return ne.bigint;case"symbol":return ne.symbol;case"object":return Array.isArray(e)?ne.array:e===null?ne.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ne.promise:typeof Map<"u"&&e instanceof Map?ne.map:typeof Set<"u"&&e instanceof Set?ne.set:typeof Date<"u"&&e instanceof Date?ne.date:ne.object;default:return ne.unknown}},G=He.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),yxe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Ei extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,u=0;for(;u<a.path.length;){const c=a.path[u];u===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],u++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,He.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ei.create=e=>new Ei(e);const rp=(e,t)=>{let n;switch(e.code){case G.invalid_type:e.received===ne.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case G.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,He.jsonStringifyReplacer)}`;break;case G.unrecognized_keys:n=`Unrecognized key(s) in object: ${He.joinValues(e.keys,", ")}`;break;case G.invalid_union:n="Invalid input";break;case G.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${He.joinValues(e.options)}`;break;case G.invalid_enum_value:n=`Invalid enum value. Expected ${He.joinValues(e.options)}, received '${e.received}'`;break;case G.invalid_arguments:n="Invalid function arguments";break;case G.invalid_return_type:n="Invalid function return type";break;case G.invalid_date:n="Invalid date";break;case G.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:He.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case G.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case G.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case G.custom:n="Invalid input";break;case G.invalid_intersection_types:n="Intersection results could not be merged";break;case G.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case G.not_finite:n="Number must be finite";break;default:n=t.defaultError,He.assertNever(e)}return{message:n}};let Rq=rp;function bxe(e){Rq=e}function km(){return Rq}const Mm=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};let s="";const u=r.filter(c=>!!c).slice().reverse();for(const c of u)s=c(a,{data:t,defaultError:s}).message;return{...i,path:o,message:i.message||s}},Cxe=[];function oe(e,t){const n=Mm({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,km(),rp].filter(r=>!!r)});e.common.issues.push(n)}class Ln{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return xe;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return Ln.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return xe;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const xe=Object.freeze({status:"aborted"}),Oq=e=>({status:"dirty",value:e}),Hn=e=>({status:"valid",value:e}),iC=e=>e.status==="aborted",oC=e=>e.status==="dirty",Lm=e=>e.status==="valid",jm=e=>typeof Promise<"u"&&e instanceof Promise;var Ae;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ae||(Ae={}));class po{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const HF=(e,t)=>{if(Lm(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ei(e.common.issues);return this._error=n,this._error}}};function $e(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}class Fe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Xa(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Xa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ln,ctx:{common:t.parent.common,data:t.data,parsedType:Xa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(jm(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xa(t)},o=this._parseSync({data:t,path:i.path,parent:i});return HF(i,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xa(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(jm(i)?i:Promise.resolve(i));return HF(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:G.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Li({schema:this,typeName:ye.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return ea.create(this,this._def)}nullable(){return Mu.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $i.create(this,this._def)}promise(){return Ll.create(this,this._def)}or(t){return sp.create([this,t],this._def)}and(t){return up.create(this,t,this._def)}transform(t){return new Li({...$e(this._def),schema:this,typeName:ye.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new pp({...$e(this._def),innerType:this,defaultValue:n,typeName:ye.ZodDefault})}brand(){return new kq({typeName:ye.ZodBranded,type:this,...$e(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Wm({...$e(this._def),innerType:this,catchValue:n,typeName:ye.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return _h.create(this,t)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Sxe=/^c[^\s-]{8,}$/i,_xe=/^[a-z][a-z0-9]*$/,Ixe=/[0-9A-HJKMNP-TV-Z]{26}/,Txe=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,xxe=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,wxe=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),Exe=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,$xe=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Rxe=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function Oxe(e,t){return!!((t==="v4"||!t)&&Exe.test(e)||(t==="v6"||!t)&&$xe.test(e))}class xi extends Fe{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(i=>t.test(i),{validation:n,code:G.invalid_string,...Ae.errToObj(r)}),this.nonempty=t=>this.min(1,Ae.errToObj(t)),this.trim=()=>new xi({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new xi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new xi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ne.string){const o=this._getOrReturnCtx(t);return oe(o,{code:G.invalid_type,expected:ne.string,received:o.parsedType}),xe}const r=new Ln;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:G.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:G.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.length<o.value;(a||s)&&(i=this._getOrReturnCtx(t,i),a?oe(i,{code:G.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&oe(i,{code:G.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")xxe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"email",code:G.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")wxe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"emoji",code:G.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")Txe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"uuid",code:G.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")Sxe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"cuid",code:G.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")_xe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"cuid2",code:G.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")Ixe.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"ulid",code:G.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),oe(i,{validation:"url",code:G.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"regex",code:G.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),oe(i,{code:G.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),oe(i,{code:G.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),oe(i,{code:G.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?Rxe(o).test(t.data)||(i=this._getOrReturnCtx(t,i),oe(i,{code:G.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?Oxe(t.data,o.version)||(i=this._getOrReturnCtx(t,i),oe(i,{validation:"ip",code:G.invalid_string,message:o.message}),r.dirty()):He.assertNever(o);return{status:r.value,value:t.data}}_addCheck(t){return new xi({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ae.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ae.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ae.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ae.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ae.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ae.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ae.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ae.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...Ae.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ae.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ae.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ae.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ae.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ae.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ae.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ae.errToObj(n)})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}xi.create=e=>{var t;return new xi({checks:[],typeName:ye.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};function Fxe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class fs extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ne.number){const o=this._getOrReturnCtx(t);return oe(o,{code:G.invalid_type,expected:ne.number,received:o.parsedType}),xe}let r;const i=new Ln;for(const o of this._def.checks)o.kind==="int"?He.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:G.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:G.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:G.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?Fxe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),oe(r,{code:G.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),oe(r,{code:G.not_finite,message:o.message}),i.dirty()):He.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ae.toString(n))}setLimit(t,n,r,i){return new fs({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ae.toString(i)}]})}_addCheck(t){return new fs({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ae.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ae.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ae.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ae.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ae.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&He.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}fs.create=e=>new fs({checks:[],typeName:ye.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class ds extends Fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ne.bigint){const o=this._getOrReturnCtx(t);return oe(o,{code:G.invalid_type,expected:ne.bigint,received:o.parsedType}),xe}let r;const i=new Ln;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:G.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:G.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),oe(r,{code:G.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):He.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ae.toString(n))}setLimit(t,n,r,i){return new ds({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ae.toString(i)}]})}_addCheck(t){return new ds({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ae.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ds.create=e=>{var t;return new ds({checks:[],typeName:ye.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};class ip extends Fe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ne.boolean){const r=this._getOrReturnCtx(t);return oe(r,{code:G.invalid_type,expected:ne.boolean,received:r.parsedType}),xe}return Hn(t.data)}}ip.create=e=>new ip({typeName:ye.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class Fu extends Fe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ne.date){const o=this._getOrReturnCtx(t);return oe(o,{code:G.invalid_type,expected:ne.date,received:o.parsedType}),xe}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return oe(o,{code:G.invalid_date}),xe}const r=new Ln;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:G.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),oe(i,{code:G.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):He.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Fu({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ae.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ae.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Fu.create=e=>new Fu({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ye.ZodDate,...$e(e)});class Um extends Fe{_parse(t){if(this._getType(t)!==ne.symbol){const r=this._getOrReturnCtx(t);return oe(r,{code:G.invalid_type,expected:ne.symbol,received:r.parsedType}),xe}return Hn(t.data)}}Um.create=e=>new Um({typeName:ye.ZodSymbol,...$e(e)});class op extends Fe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:G.invalid_type,expected:ne.undefined,received:r.parsedType}),xe}return Hn(t.data)}}op.create=e=>new op({typeName:ye.ZodUndefined,...$e(e)});class ap extends Fe{_parse(t){if(this._getType(t)!==ne.null){const r=this._getOrReturnCtx(t);return oe(r,{code:G.invalid_type,expected:ne.null,received:r.parsedType}),xe}return Hn(t.data)}}ap.create=e=>new ap({typeName:ye.ZodNull,...$e(e)});class Ml extends Fe{constructor(){super(...arguments),this._any=!0}_parse(t){return Hn(t.data)}}Ml.create=e=>new Ml({typeName:ye.ZodAny,...$e(e)});class du extends Fe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Hn(t.data)}}du.create=e=>new du({typeName:ye.ZodUnknown,...$e(e)});class oa extends Fe{_parse(t){const n=this._getOrReturnCtx(t);return oe(n,{code:G.invalid_type,expected:ne.never,received:n.parsedType}),xe}}oa.create=e=>new oa({typeName:ye.ZodNever,...$e(e)});class Bm extends Fe{_parse(t){if(this._getType(t)!==ne.undefined){const r=this._getOrReturnCtx(t);return oe(r,{code:G.invalid_type,expected:ne.void,received:r.parsedType}),xe}return Hn(t.data)}}Bm.create=e=>new Bm({typeName:ye.ZodVoid,...$e(e)});class $i extends Fe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==ne.array)return oe(n,{code:G.invalid_type,expected:ne.array,received:n.parsedType}),xe;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(a||s)&&(oe(n,{code:a?G.too_big:G.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(oe(n,{code:G.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(oe(n,{code:G.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>i.type._parseAsync(new po(n,a,n.path,s)))).then(a=>Ln.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new po(n,a,n.path,s)));return Ln.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new $i({...this._def,minLength:{value:t,message:Ae.toString(n)}})}max(t,n){return new $i({...this._def,maxLength:{value:t,message:Ae.toString(n)}})}length(t,n){return new $i({...this._def,exactLength:{value:t,message:Ae.toString(n)}})}nonempty(t){return this.min(1,t)}}$i.create=(e,t)=>new $i({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ye.ZodArray,...$e(t)});function rl(e){if(e instanceof _t){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=ea.create(rl(r))}return new _t({...e._def,shape:()=>t})}else return e instanceof $i?new $i({...e._def,type:rl(e.element)}):e instanceof ea?ea.create(rl(e.unwrap())):e instanceof Mu?Mu.create(rl(e.unwrap())):e instanceof Ao?Ao.create(e.items.map(t=>rl(t))):e}class _t extends Fe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=He.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ne.object){const c=this._getOrReturnCtx(t);return oe(c,{code:G.invalid_type,expected:ne.object,received:c.parsedType}),xe}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof oa&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||s.push(c);const u=[];for(const c of a){const l=o[c],d=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new po(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof oa){const c=this._def.unknownKeys;if(c==="passthrough")for(const l of s)u.push({key:{status:"valid",value:l},value:{status:"valid",value:i.data[l]}});else if(c==="strict")s.length>0&&(oe(i,{code:G.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const l of s){const d=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new po(i,d,i.path,l)),alwaysSet:l in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const l of u){const d=await l.key;c.push({key:d,value:await l.value,alwaysSet:l.alwaysSet})}return c}).then(c=>Ln.mergeObjectSync(r,c)):Ln.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return Ae.errToObj,new _t({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,s;const u=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Ae.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new _t({...this._def,unknownKeys:"strip"})}passthrough(){return new _t({...this._def,unknownKeys:"passthrough"})}extend(t){return new _t({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new _t({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ye.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new _t({...this._def,catchall:t})}pick(t){const n={};return He.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new _t({...this._def,shape:()=>n})}omit(t){const n={};return He.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new _t({...this._def,shape:()=>n})}deepPartial(){return rl(this)}partial(t){const n={};return He.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new _t({...this._def,shape:()=>n})}required(t){const n={};return He.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof ea;)o=o._def.innerType;n[r]=o}}),new _t({...this._def,shape:()=>n})}keyof(){return Fq(He.objectKeys(this.shape))}}_t.create=(e,t)=>new _t({shape:()=>e,unknownKeys:"strip",catchall:oa.create(),typeName:ye.ZodObject,...$e(t)});_t.strictCreate=(e,t)=>new _t({shape:()=>e,unknownKeys:"strict",catchall:oa.create(),typeName:ye.ZodObject,...$e(t)});_t.lazycreate=(e,t)=>new _t({shape:e,unknownKeys:"strip",catchall:oa.create(),typeName:ye.ZodObject,...$e(t)});class sp extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new Ei(s.ctx.common.issues));return oe(n,{code:G.invalid_union,unionErrors:a}),xe}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const u of r){const c={...n,common:{...n.common,issues:[]},parent:null},l=u._parseSync({data:n.data,path:n.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!o&&(o={result:l,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(u=>new Ei(u));return oe(n,{code:G.invalid_union,unionErrors:s}),xe}}get options(){return this._def.options}}sp.create=(e,t)=>new sp({options:e,typeName:ye.ZodUnion,...$e(t)});const rm=e=>e instanceof lp?rm(e.schema):e instanceof Li?rm(e.innerType()):e instanceof fp?[e.value]:e instanceof ps?e.options:e instanceof dp?Object.keys(e.enum):e instanceof pp?rm(e._def.innerType):e instanceof op?[void 0]:e instanceof ap?[null]:null;class N0 extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.object)return oe(n,{code:G.invalid_type,expected:ne.object,received:n.parsedType}),xe;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(oe(n,{code:G.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),xe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=rm(o.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new N0({typeName:ye.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...$e(r)})}}function aC(e,t){const n=Xa(e),r=Xa(t);if(e===t)return{valid:!0,data:e};if(n===ne.object&&r===ne.object){const i=He.objectKeys(t),o=He.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const u=aC(e[s],t[s]);if(!u.valid)return{valid:!1};a[s]=u.data}return{valid:!0,data:a}}else if(n===ne.array&&r===ne.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o<e.length;o++){const a=e[o],s=t[o],u=aC(a,s);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===ne.date&&r===ne.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class up extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,a)=>{if(iC(o)||iC(a))return xe;const s=aC(o.value,a.value);return s.valid?((oC(o)||oC(a))&&n.dirty(),{status:n.value,value:s.data}):(oe(r,{code:G.invalid_intersection_types}),xe)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}up.create=(e,t,n)=>new up({left:e,right:t,typeName:ye.ZodIntersection,...$e(n)});class Ao extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.array)return oe(r,{code:G.invalid_type,expected:ne.array,received:r.parsedType}),xe;if(r.data.length<this._def.items.length)return oe(r,{code:G.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xe;!this._def.rest&&r.data.length>this._def.items.length&&(oe(r,{code:G.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new po(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>Ln.mergeArray(n,a)):Ln.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Ao({...this._def,rest:t})}}Ao.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ao({items:e,typeName:ye.ZodTuple,rest:null,...$e(t)})};class cp extends Fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.object)return oe(r,{code:G.invalid_type,expected:ne.object,received:r.parsedType}),xe;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new po(r,s,r.path,s)),value:a._parse(new po(r,r.data[s],r.path,s))});return r.common.async?Ln.mergeObjectAsync(n,i):Ln.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Fe?new cp({keyType:t,valueType:n,typeName:ye.ZodRecord,...$e(r)}):new cp({keyType:xi.create(),valueType:t,typeName:ye.ZodRecord,...$e(n)})}}class Pm extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.map)return oe(r,{code:G.invalid_type,expected:ne.map,received:r.parsedType}),xe;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,u],c)=>({key:i._parse(new po(r,s,r.path,[c,"key"])),value:o._parse(new po(r,u,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of a){const c=await u.key,l=await u.value;if(c.status==="aborted"||l.status==="aborted")return xe;(c.status==="dirty"||l.status==="dirty")&&n.dirty(),s.set(c.value,l.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of a){const c=u.key,l=u.value;if(c.status==="aborted"||l.status==="aborted")return xe;(c.status==="dirty"||l.status==="dirty")&&n.dirty(),s.set(c.value,l.value)}return{status:n.value,value:s}}}}Pm.create=(e,t,n)=>new Pm({valueType:t,keyType:e,typeName:ye.ZodMap,...$e(n)});class ku extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ne.set)return oe(r,{code:G.invalid_type,expected:ne.set,received:r.parsedType}),xe;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(oe(r,{code:G.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(oe(r,{code:G.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(u){const c=new Set;for(const l of u){if(l.status==="aborted")return xe;l.status==="dirty"&&n.dirty(),c.add(l.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((u,c)=>o._parse(new po(r,u,r.path,c)));return r.common.async?Promise.all(s).then(u=>a(u)):a(s)}min(t,n){return new ku({...this._def,minSize:{value:t,message:Ae.toString(n)}})}max(t,n){return new ku({...this._def,maxSize:{value:t,message:Ae.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ku.create=(e,t)=>new ku({valueType:e,minSize:null,maxSize:null,typeName:ye.ZodSet,...$e(t)});class Al extends Fe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.function)return oe(n,{code:G.invalid_type,expected:ne.function,received:n.parsedType}),xe;function r(s,u){return Mm({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,km(),rp].filter(c=>!!c),issueData:{code:G.invalid_arguments,argumentsError:u}})}function i(s,u){return Mm({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,km(),rp].filter(c=>!!c),issueData:{code:G.invalid_return_type,returnTypeError:u}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;return this._def.returns instanceof Ll?Hn(async(...s)=>{const u=new Ei([]),c=await this._def.args.parseAsync(s,o).catch(p=>{throw u.addIssue(r(s,p)),u}),l=await a(...c);return await this._def.returns._def.type.parseAsync(l,o).catch(p=>{throw u.addIssue(i(l,p)),u})}):Hn((...s)=>{const u=this._def.args.safeParse(s,o);if(!u.success)throw new Ei([r(s,u.error)]);const c=a(...u.data),l=this._def.returns.safeParse(c,o);if(!l.success)throw new Ei([i(c,l.error)]);return l.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Al({...this._def,args:Ao.create(t).rest(du.create())})}returns(t){return new Al({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Al({args:t||Ao.create([]).rest(du.create()),returns:n||du.create(),typeName:ye.ZodFunction,...$e(r)})}}class lp extends Fe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}lp.create=(e,t)=>new lp({getter:e,typeName:ye.ZodLazy,...$e(t)});class fp extends Fe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return oe(n,{received:n.data,code:G.invalid_literal,expected:this._def.value}),xe}return{status:"valid",value:t.data}}get value(){return this._def.value}}fp.create=(e,t)=>new fp({value:e,typeName:ye.ZodLiteral,...$e(t)});function Fq(e,t){return new ps({values:e,typeName:ye.ZodEnum,...$e(t)})}class ps extends Fe{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{expected:He.joinValues(r),received:n.parsedType,code:G.invalid_type}),xe}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return oe(n,{received:n.data,code:G.invalid_enum_value,options:r}),xe}return Hn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return ps.create(t)}exclude(t){return ps.create(this.options.filter(n=>!t.includes(n)))}}ps.create=Fq;class dp extends Fe{_parse(t){const n=He.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ne.string&&r.parsedType!==ne.number){const i=He.objectValues(n);return oe(r,{expected:He.joinValues(i),received:r.parsedType,code:G.invalid_type}),xe}if(n.indexOf(t.data)===-1){const i=He.objectValues(n);return oe(r,{received:r.data,code:G.invalid_enum_value,options:i}),xe}return Hn(t.data)}get enum(){return this._def.values}}dp.create=(e,t)=>new dp({values:e,typeName:ye.ZodNativeEnum,...$e(t)});class Ll extends Fe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ne.promise&&n.common.async===!1)return oe(n,{code:G.invalid_type,expected:ne.promise,received:n.parsedType}),xe;const r=n.parsedType===ne.promise?n.data:Promise.resolve(n.data);return Hn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ll.create=(e,t)=>new Ll({type:e,typeName:ye.ZodPromise,...$e(t)});class Li extends Fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ye.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null;if(i.type==="preprocess"){const a=i.transform(r.data);return r.common.async?Promise.resolve(a).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}const o={addIssue:a=>{oe(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="refinement"){const a=s=>{const u=i.refinement(s,o);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?xe:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?xe:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Lm(a))return a;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Lm(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);He.assertNever(i)}}Li.create=(e,t,n)=>new Li({schema:e,typeName:ye.ZodEffects,effect:t,...$e(n)});Li.createWithPreprocess=(e,t,n)=>new Li({schema:t,effect:{type:"preprocess",transform:e},typeName:ye.ZodEffects,...$e(n)});class ea extends Fe{_parse(t){return this._getType(t)===ne.undefined?Hn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ea.create=(e,t)=>new ea({innerType:e,typeName:ye.ZodOptional,...$e(t)});class Mu extends Fe{_parse(t){return this._getType(t)===ne.null?Hn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Mu.create=(e,t)=>new Mu({innerType:e,typeName:ye.ZodNullable,...$e(t)});class pp extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ne.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}pp.create=(e,t)=>new pp({innerType:e,typeName:ye.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$e(t)});class Wm extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return jm(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ei(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ei(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Wm.create=(e,t)=>new Wm({innerType:e,typeName:ye.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$e(t)});class Dm extends Fe{_parse(t){if(this._getType(t)!==ne.nan){const r=this._getOrReturnCtx(t);return oe(r,{code:G.invalid_type,expected:ne.nan,received:r.parsedType}),xe}return{status:"valid",value:t.data}}}Dm.create=e=>new Dm({typeName:ye.ZodNaN,...$e(e)});const kxe=Symbol("zod_brand");class kq extends Fe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class _h extends Fe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?xe:o.status==="dirty"?(n.dirty(),Oq(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?xe:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new _h({in:t,out:n,typeName:ye.ZodPipeline})}}const Mq=(e,t={},n)=>e?Ml.create().superRefine((r,i)=>{var o,a;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(a=(o=s.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,c=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...c,fatal:u})}}):Ml.create(),Mxe={object:_t.lazycreate};var ye;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline"})(ye||(ye={}));const Lxe=(e,t={message:`Input not instance of ${e.name}`})=>Mq(n=>n instanceof e,t),Yo=xi.create,Km=fs.create,jxe=Dm.create,Uxe=ds.create,Lq=ip.create,Bxe=Fu.create,Pxe=Um.create,Wxe=op.create,Dxe=ap.create,Kxe=Ml.create,Nxe=du.create,qxe=oa.create,Vxe=Bm.create,jq=$i.create,Ap=_t.create,Qxe=_t.strictCreate,zxe=sp.create,Hxe=N0.create,Yxe=up.create,Gxe=Ao.create,Jxe=cp.create,Zxe=Pm.create,Xxe=ku.create,ewe=Al.create,twe=lp.create,nwe=fp.create,rwe=ps.create,iwe=dp.create,owe=Ll.create,YF=Li.create,awe=ea.create,swe=Mu.create,uwe=Li.createWithPreprocess,cwe=_h.create,lwe=()=>Yo().optional(),fwe=()=>Km().optional(),dwe=()=>Lq().optional(),pwe={string:e=>xi.create({...e,coerce:!0}),number:e=>fs.create({...e,coerce:!0}),boolean:e=>ip.create({...e,coerce:!0}),bigint:e=>ds.create({...e,coerce:!0}),date:e=>Fu.create({...e,coerce:!0})},Awe=xe;var L=Object.freeze({__proto__:null,defaultErrorMap:rp,setErrorMap:bxe,getErrorMap:km,makeIssue:Mm,EMPTY_PATH:Cxe,addIssueToContext:oe,ParseStatus:Ln,INVALID:xe,DIRTY:Oq,OK:Hn,isAborted:iC,isDirty:oC,isValid:Lm,isAsync:jm,get util(){return He},get objectUtil(){return rC},ZodParsedType:ne,getParsedType:Xa,ZodType:Fe,ZodString:xi,ZodNumber:fs,ZodBigInt:ds,ZodBoolean:ip,ZodDate:Fu,ZodSymbol:Um,ZodUndefined:op,ZodNull:ap,ZodAny:Ml,ZodUnknown:du,ZodNever:oa,ZodVoid:Bm,ZodArray:$i,ZodObject:_t,ZodUnion:sp,ZodDiscriminatedUnion:N0,ZodIntersection:up,ZodTuple:Ao,ZodRecord:cp,ZodMap:Pm,ZodSet:ku,ZodFunction:Al,ZodLazy:lp,ZodLiteral:fp,ZodEnum:ps,ZodNativeEnum:dp,ZodPromise:Ll,ZodEffects:Li,ZodTransformer:Li,ZodOptional:ea,ZodNullable:Mu,ZodDefault:pp,ZodCatch:Wm,ZodNaN:Dm,BRAND:kxe,ZodBranded:kq,ZodPipeline:_h,custom:Mq,Schema:Fe,ZodSchema:Fe,late:Mxe,get ZodFirstPartyTypeKind(){return ye},coerce:pwe,any:Kxe,array:jq,bigint:Uxe,boolean:Lq,date:Bxe,discriminatedUnion:Hxe,effect:YF,enum:rwe,function:ewe,instanceof:Lxe,intersection:Yxe,lazy:twe,literal:nwe,map:Zxe,nan:jxe,nativeEnum:iwe,never:qxe,null:Dxe,nullable:swe,number:Km,object:Ap,oboolean:dwe,onumber:fwe,optional:awe,ostring:lwe,pipeline:cwe,preprocess:uwe,promise:owe,record:Jxe,set:Xxe,strictObject:Qxe,string:Yo,symbol:Pxe,transformer:YF,tuple:Gxe,undefined:Wxe,union:zxe,unknown:Nxe,void:Vxe,NEVER:Awe,ZodIssueCode:G,quotelessJson:yxe,ZodError:Ei});const hwe=L.object({id:L.string(),label:L.string(),repeatable:L.boolean(),status:L.boolean()}),mwe=L.array(hwe);function Uq(e,t,n){return pe.request(new URL("customtypes",e),{headers:{repository:t},credentials:pe.getRequestCredentials(n),okType:mwe})}const gwe=L.object({first_name:L.string().optional(),last_name:L.string().optional(),email:L.string().optional(),uploadedAvatar:L.string().optional()}),LR=L.object({id:L.string(),name:L.string(),is_master:L.boolean().optional()}),vwe=L.discriminatedUnion("status",[L.object({status:L.literal("unclassified")}),L.object({status:L.literal("published")}),L.object({status:L.literal("release"),release_id:L.string()}),L.object({status:L.literal("archived")})]).and(L.object({version_id:L.string(),tags:L.array(L.string()),custom_type_label:L.string(),preview_summary:L.string().optional(),preview_image:L.string().optional(),last_modified_date:L.coerce.date(),author:gwe,uid:L.string().optional()})),jR=L.object({id:L.string(),title:L.string().nullish().transform(e=>e??"Untitled"),custom_type_id:L.string(),group_lang_id:L.string(),language:LR,versions:L.array(vwe)}),Bq=L.object({total:L.number(),cursor:L.string().optional(),results:L.array(jR)}),ywe=L.object({id:L.string(),title:L.string(),repository_id:L.string(),tags:L.array(L.string()).optional()}).passthrough(),bwe=L.object({results:L.array(ywe)});function UR(e,t,n,r,i){const o=new URL("documents",e);return r&&o.searchParams.set("limit",r.toString()),i&&o.searchParams.set("cursor",i),o.search+=`&${n}`,pe.request(o,{credentials:pe.getRequestCredentials(t),okType:Bq})}function Pq(e){const{baseUrl:t,authStrategy:n,limit:r,cursor:i,status:o,authors:a,language:s,group_lang_id:u,document_id:c,customTypes:l,tags:d,term:p,signal:A}=e,m=new URL("documents",t),v=[];return r&&v.push({name:"limit",values:[r.toString()]}),i&&v.push({name:"cursor",values:[i]}),o!=null&&o.length&&v.push({name:"status",values:o}),a!=null&&a.length&&v.push({name:"authors",values:a}),s&&v.push({name:"language",values:[s]}),u&&v.push({name:"group_lang_id",values:[u]}),c!=null&&c.length&&v.push({name:"document_id",values:c}),l!=null&&l.length&&v.push({name:"customTypes",values:l}),d!=null&&d.length&&v.push({name:"tags",values:d}),p&&v.push({name:"term",values:[p]}),m.search=new URLSearchParams(q0(v)).toString(),pe.request(m,{credentials:pe.getRequestCredentials(n),okType:Bq,signal:A})}function Wq(e,t,n,r){const i=new URL(e);return i.search=n,pe.request(i,{credentials:pe.getRequestCredentials(t),okType:bwe,...r})}function Dq(e){const{repository:t,searchTerm:n,tags:r,localeId:i,customTypesIds:o}=e,a=new URLSearchParams;return a.append("repository",t),n&&a.append("searchTerm",n),r!=null&&r.length&&a.append("tags",r.toString()),i&&a.append("localeId",i),o!=null&&o.length&&a.append("customTypesIds",o.toString()),a.toString()}function q0(e){return e.reduce((t,n)=>{if(n.values.every(i=>i===""||i===void 0))return t;const r=n.values.map(i=>[n.name,i??""]);return t.concat(r)},[])}function Kq(e,t,n){return pe.request(new URL(`documents/${n}`,e),{credentials:pe.getRequestCredentials(t),okType:jR})}const Cwe=L.custom().transform((e,t)=>{const n=Ce.Document.decode(e);return n._tag==="Left"?(t.addIssue({code:L.ZodIssueCode.custom,message:"Invalid document."}),L.NEVER):n.right});function BR(e){const t=Vl.keys(e).flatMap(r=>{const i=e[r];return i?{name:r,values:i}:[]});return new URLSearchParams(q0(t)).toString()}async function Nq(e,t,n){if(n.length===0)return[];const r=n.slice(0,50).map(({id:a})=>a),i=await Pq({baseUrl:e,authStrategy:t,document_id:r}),o=new Map(r.map((a,s)=>[a,s]));return i.results.sort((a,s)=>{const u=o.get(a.id),c=o.get(s.id);return(u??1/0)-(c??1/0)})}const Swe=L.unknown().transform((e,t)=>{const n=Ce.SliceItemContent.decode(e);return n._tag==="Right"?n.right:(t.addIssue({code:L.ZodIssueCode.custom,message:"Invalid slice content."}),L.NEVER)}),Jo={all:()=>["documents"],lists:()=>[...Jo.all(),"list"],list:e=>[...Jo.lists(),e],infiniteLists:()=>[...Jo.all(),"list:infinite"],infiniteList:e=>[...Jo.infiniteLists(),e]};function _we(e,t){e.setQueriesData({queryKey:Jo.lists()},n=>n&&GF(n,t)),e.setQueriesData({queryKey:Jo.infiniteLists()},n=>n&&{...n,pages:n.pages.map(r=>GF(r,t))})}function GF(e,t){const n=e.results.flatMap(r=>{const i=t(r,e);return i?[i]:[]});return{...e,results:n,total:e.total+(n.length-e.results.length)}}async function Iwe(e){await e.invalidateQueries({queryKey:Jo.lists()}),await e.invalidateQueries({queryKey:Jo.infiniteLists()})}const Twe=["createPrismicProject","chooseLocale","createProject","setupSliceMachine","createPageType","codePage","createSlice","reviewAndPush","createContent","renderPage"],PR=L.enum(Twe),xwe=["next","nuxt","sveltekit","other"],wwe=L.enum(xwe),qq=L.object({completedSteps:L.array(PR),isDismissed:L.boolean(),context:L.object({framework:wwe,starterId:L.string().nullable()})}),Vq=L.object({completedSteps:L.array(PR)}),Qq=L.object({isDismissed:L.boolean()});function Ewe(e,t,n){const r=new URL("onboarding",e);return r.searchParams.append("repository",t),pe.request(r,{headers:{repository:t},credentials:pe.getRequestCredentials(n),okType:qq})}function $we(e,t,n,r){const i=new URL(`onboarding/${e}/toggle`,t);return i.searchParams.append("repository",n),pe.request(i,{method:"PATCH",headers:{repository:n},credentials:pe.getRequestCredentials(r),okType:Vq})}function Rwe(e,t,n){const r=new URL("onboarding/toggle",e);return r.searchParams.append("repository",t),pe.request(r,{method:"PATCH",headers:{repository:t},credentials:pe.getRequestCredentials(n),okType:Qq})}const Owe=L.object({id:L.string(),firstname:L.string().optional(),lastname:L.string().optional(),email:L.string(),uploadedAvatar:L.string().optional()}),Fwe=L.array(Owe),kwe=L.object({slicemachineEnabled:L.boolean()}),zq=["next","nuxt","sveltekit"];function Mwe(e){return zq.includes(e)}const Lwe=L.preprocess(e=>typeof e=="string"&&Mwe(e)?e:"other",L.enum([...zq,"other"])),jwe=L.object({simulator_url:L.string().url().nullish(),languages:L.array(LR).transform(e=>Qt.sort(e,t=>t.name)),authors:Fwe.optional().default([]),quotas:kwe.optional().default({slicemachineEnabled:!1}),framework:Lwe.optional().default("other"),starterId:L.string().optional(),storageVersion:L.object({major:L.number().int(),minor:L.number().int()})}).transform(({simulator_url:e,framework:t,...n})=>{const r=e&&Hq(e)?e:void 0;return{...n,framework:t,simulatorUrl:r,isSupportedFramework:t!=="other"}});function V0(e,t){return pe.request(new URL("repository",e),{credentials:pe.getRequestCredentials(t),okType:jwe})}function Hq(e){const t=Fr.toURL(e);return t?t.pathname.endsWith("/slice-simulator"):!1}const Uwe=L.object({results:L.array(L.string())});function Yq(e,t){return pe.request(new URL("repository/tags",e),{credentials:pe.getRequestCredentials(t),okType:Uwe})}const Gq=L.enum(["Owner","Administrator","Writer","Manager","Readonly"]),Bwe=L.record(Gq.optional()),Pwe=Gq.or(Bwe),Wwe={SuperUser:"SuperUser",Owner:"Owner",Administrator:"Administrator",Manager:"Publisher",Writer:"Writer",Readonly:"Contributor"},Jq=L.object({shortId:L.string(),intercomHash:L.string(),email:L.string(),firstName:L.string(),lastName:L.string(),superPower:L.boolean(),repositories:L.array(L.object({domain:L.string(),role:Pwe}))});function Zq(e,t){const n=new URL("profile",e);return pe.request(n,{credentials:pe.getRequestCredentials(t),okType:Jq})}function WR(){const e=Ee();e.userServiceBaseUrl||Jt("userServiceBaseUrl");const{authStrategy:t,userServiceBaseUrl:n}=e;return Ve.useRequest(Zq,[n,t])}const Dwe="https://prismic.io/docs/guides/manage-images#supported-media";function Ih(){const e=Ee();e.mediaLibrary||Jt("mediaLibrary");const{assetsApiBaseUrl:t,authStrategy:n,repository:r}=e,{items:i}=Ve.useRequest(Xq,[t,r,n]);return{tags:i}}function Xq(e,t,n){return pe.request(new URL("tags",e),{credentials:pe.getRequestCredentials(n),okType:Kwe,headers:{repository:t}})}const e7=1,t7=20,DR=L.string().min(e7).max(t7),KR=L.object({id:L.string(),name:DR,uploader_id:L.string().optional(),created_at:L.number(),last_modified:L.number(),count:L.number().optional().default(0)}),Kwe=L.object({items:L.array(KR)});function Th(e){Ve.updateFetcherData(Xq,t=>{const{items:n}=t,r=e(n);if(r)return{items:r}})}function Nwe(e){const{assetType:t,keyword:n,mode:r,tagIds:i}=e,o=Ee();o.mediaLibrary||Jt("mediaLibrary");const{onAnalyticsEvent:a}=o,s=Ve.useFetcherData(mi),u=s[s.length-1],c=$.useRef(u);c.current=u,$.useEffect(()=>{if(!a||!n||!c.current||c.current.keyword!==n)return;const l=String(n.split(" ").length),d=String(c.current.total),p=i.join(",");a("Media Library Search",{searchQuery:n,numberOfWords:l,numberOfResults:d,timeToGetResults:c.current.time,assetType:t,mode:r,tags:p})},[n,t,r,a,i])}function qwe(e){const{assetType:t,mediaDialogOpen:n}=e,r=Ee(),i=Ve.useFetcherData(mi),o=$.useRef(0);$.useEffect(()=>{n&&(o.current=performance.now())},[n]);function a(s){if(!r.onAnalyticsEvent||!r.mediaLibrary)return;const u=i[i.length-1];if(!u)return;const{keyword:c,uploaderId:l,tags:d}=u,p=i7(i,c,t,l,d),A=String(c.split(" ").length),m=String(u.total),v=p.findIndex(x=>x.id===s),_=String(v+1),C=[s].join(","),I=(performance.now()-o.current).toFixed(0);r.onAnalyticsEvent("Media Added To Page",{assetType:t,searchQuery:c,numberOfWords:A,numberOfResults:m,searchPosition:_,mediaIds:C,timeToAddMediaToPage:I,tags:d})}return a}const Nh=L.array(L.string()).optional().transform(e=>e==null?void 0:e[0]),Q0=L.object({id:L.string(),kind:L.string(),extension:L.string().optional(),filename:L.string(),width:L.number().optional(),height:L.number().optional(),last_modified:L.number(),url:L.string(),alt:L.string().optional(),uploader_id:L.string().optional(),size:L.number(),notes:L.string().optional(),credits:L.string().optional(),search_highlight:L.object({filename:Nh,alt:Nh,notes:Nh,credits:Nh}).optional(),tags:L.array(KR)}),n7={"X-Prismic-Source":"Wroom"},Vwe=L.object({total:L.number(),cursor:L.string().optional(),items:L.array(Q0)}),r7=30;function mi(e,t,n,r,i,o,a,s,u){const c=e?new URL("assets",e):void 0,l=new URLSearchParams(q0([{name:"limit",values:[`${r7}`]},{name:"cursor",values:[u]},{name:"keyword",values:[r]},{name:"assetType",values:[i]},{name:"uploaderId",values:[o]},{name:"tags",values:a.split(",")}])).toString(),d=Vwe.transform(A=>({...A,keyword:r,assetType:i,uploaderId:o,tags:a,page:s})),p=performance.now();return pe.request(`${(c==null?void 0:c.href)??""}?${l}`,{headers:{repository:t,...n7},credentials:pe.getRequestCredentials(n),okType:d}).then(A=>({...A,time:(performance.now()-p).toFixed(0)}))}Ve.cache.registerFetcherConfig(mi,{revalidationStrategy:{type:"never"}});const Vn={keyword:"",assetType:"all",uploaderId:void 0,tagIds:[]};function Qwe(e){const{initialAssetType:t=Vn.assetType,mode:n}=e,r=Ee(),[i,o]=$.useState({...Vn,assetType:t,page:0});r.mediaLibrary||Jt("mediaLibrary");const{assetsApiBaseUrl:a,authStrategy:s,repository:u}=r,{page:c,cursor:l,keyword:d,assetType:p,uploaderId:A,tagIds:m}=i,v=Ve.useRequest(mi,hp({assetsApiBaseUrl:a,authStrategy:s,repository:u,keyword:d,assetType:p,uploaderId:A,tagIds:m,page:c,cursor:l}));Nwe({assetType:p,keyword:d,tagIds:m,mode:n});const _=Gwe(d,p,A,m),C=v.total!==_.length;function I(){v.cursor!==void 0&&o(y=>({...y,page:y.page+1,cursor:v.cursor}))}function x(y){o(T=>({...T,page:0,cursor:void 0})),Lu((T,w)=>{if(w.page===0)return[...y,...T]})}function g(y){o(T=>({...T,...y,page:0,cursor:void 0}))}function S(){o(y=>({...y,...Vn,assetType:t==="all"?Vn.assetType:y.assetType,page:0,cursor:void 0}))}return{keyword:d,assetType:p,uploaderId:A,tagIds:m,setFilters:g,resetFilters:S,media:_,mediaTotal:v.total,limit:r7,hasNextPage:C,fetchNextPage:I,updateMedia:zwe,unshiftMedia:x,deleteMedia:Hwe,deleteSearchData:Ywe,revalidateFirstPage:o7}}function zwe(e){Lu(t=>t.flatMap(n=>{const r=e.find(i=>i.id===n.id);return r?r.response===void 0?[]:{...n,...r.response}:n}))}function Hwe(e){Lu(t=>t.filter(n=>!e.includes(n.id)))}function Ywe(e){const{keyword:t,assetType:n,uploaderId:r,tagIds:i}=e,o=i==null?void 0:i.join(",");Ve.updateFetcherData(mi,a=>{if(!(a.keyword===t&&a.assetType===n&&a.uploaderId===r&&a.tags===o))return a})}function i7(e,t,n,r,i){const o=e.filter(u=>u.keyword===t&&u.assetType===n&&u.uploaderId===r&&u.tags===i),s=Qt.sort(o,u=>u.page).flatMap(u=>u.items);return t?Qt.uniqBy(s,u=>u.id):s}function Gwe(e,t,n,r){const i=Ve.useFetcherData(mi);return i7(i,e,t,n,r.join(","))}function Lu(e){Ve.updateFetcherData(mi,t=>{const{items:n,total:r}=t,i=e(n,t);if(i)return{...t,total:r+(i.length-n.length),items:i}})}function o7(e){const{config:t,keyword:n=Vn.keyword,assetType:r=Vn.assetType,tagIds:i=Vn.tagIds}=e;if(!t.mediaLibrary)throw new Error("media library is not configured");const{assetsApiBaseUrl:o,authStrategy:a,repository:s}=t;Ve.revalidateData(mi,hp({assetsApiBaseUrl:o,repository:s,authStrategy:a,keyword:n,assetType:r,tagIds:i,page:0}))}function a7(e){const{config:t,keyword:n=Vn.keyword,assetType:r=Vn.assetType,tagIds:i=Vn.tagIds}=e;if(!t.mediaLibrary)throw new Error("media library is not configured");Ve.updateFetcherData(mi,o=>o.page===0?o:void 0),o7({config:t,keyword:n,assetType:r,tagIds:i})}function hp(e){return[e.assetsApiBaseUrl,e.repository,e.authStrategy,e.keyword,e.assetType,e.uploaderId,e.tagIds.join(","),e.page,e.cursor]}function s7(){const e=Ee();e.mediaLibrary||Jt("mediaLibrary");const{assetsApiBaseUrl:t,coreApiBaseUrl:n,authStrategy:r,repository:i}=e,{authors:o}=Ve.useRequest(V0,[n,r]),{items:a}=Ve.useRequest(u7,[t,i,r]),{shortId:s}=WR(),u=new Map(o.map(d=>[d.id,d])),c=[];for(const d of a){if(d.id==="ghost"){c.push({id:d.id,name:"Ghost",uploadedAvatar:"https://images.prismic.io/page-builder-assets/ZuAXWBoQrfVKl5sD_ghost_user.png?auto=format,compress&w=64"});continue}const p=u.get(d.id);if(!p)continue;let A;if(p.uploadedAvatar){const m=new URL(p.uploadedAvatar);m.searchParams.set("w","64"),A=m.toString()}c.push({id:d.id,name:[p.firstname,p.lastname].filter(Boolean).join(" "),firstName:p.firstname,lastName:p.lastname,email:p.email,uploadedAvatar:A})}const l=new Map(c.map(d=>[d.id,d]));return{uploaders:Qt.sort(c,d=>d.id===s?0:1,d=>d.name),uploadersById:l}}function u7(e,t,n){return pe.request(new URL("uploaders",e),{credentials:pe.getRequestCredentials(n),okType:Zwe,headers:{repository:t}})}const Jwe=L.object({id:L.string()}),Zwe=L.object({items:L.array(Jwe)});function c7(){const e=Ee();e.mediaLibrary||Jt("mediaLibrary");const{assetsApiBaseUrl:t,authStrategy:n,repository:r}=e;return()=>{Ve.revalidateData(u7,[t,r,n])}}function Xwe(e){const{revalidate:t,config:n,keyword:r,assetType:i,uploaderId:o,tagIds:a}=e,{assetsApiBaseUrl:s=void 0,repository:u="",authStrategy:c="token"}=n.mediaLibrary?n:{},[l,d]=$.useState(!1),[p,A]=$.useState(!1),m={assetsApiBaseUrl:s,repository:u,authStrategy:c,keyword:r,assetType:i,uploaderId:o,tagIds:a,page:0},{revalidateData:v}=Ve.useCacheRevalidation({fetcher:mi,requestParams:hp(m),validator:(I,x)=>{var y,T;const g=((y=I.items[0])==null?void 0:y.id)??"",S=((T=x.items[0])==null?void 0:T.id)??"";return g!==S||I.total!==(x==null?void 0:x.total)},onCacheInvalidated:()=>A(!0),every:6e4}),_=I=>{v(hp({...m,...I}))};$.useEffect(()=>{l&&(A(!1),d(!1))},[l]);function C(){d(!0),t()}return{isMediaRevalidationInProgress:l,isMediaCacheInvalid:p,revalidateMedia:C,revalidateWithParams:_}}function eEe(e){const{onBeforeUpload:t,onComplete:n}=e,[r,i]=$.useState([]),o=r.some(l=>l.status==="idle"||l.status==="uploading"),a=Ee();function s(){if(!r.length||r.some(A=>A.status==="uploading")||r.every(A=>A.status==="error"))return;const l=r.find(A=>A.status==="idle");if(!l)return;let d=r;function p(A){d=A(d),i(d),d.every(v=>v.status==="success"||v.status==="error")&&setTimeout(()=>{i([]),n==null||n(d)},1500)}p(A=>A.map(m=>m.id===l.id?{...m,status:"uploading"}:m)),tEe({file:l.file,config:a}).then(A=>{p(m=>m.map(v=>v.id===l.id?{...v,status:"success",response:A}:v))}).catch(()=>{p(A=>A.map(m=>m.id===l.id?{...m,status:"error"}:m))})}function u(l){const d=l.map(p=>({id:`temp-${crypto.randomUUID()}`,file:p,status:"idle"}));i(d),t(d)}const c=$.useCallback(l=>{const d=[{...l,status:"idle"},...r.filter(p=>p.id!==l.id)];i(d),t(d)},[t,r]);return $.useEffect(s,[a,r,n]),{isUploading:o,uploadingFiles:r,onFilesSelected:u,onRetry:c}}function tEe(e){const{file:t,config:n}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n,a=new FormData;return a.append(t.name,t),pe.request(new URL("assets",r),{headers:{repository:i,"Content-Type":"multipart/form-data",...n7},method:"POST",body:a,credentials:pe.getRequestCredentials(o),okType:Q0})}const l7=$.createContext(void 0);function nEe(e){const{children:t,assetType:n=Vn.assetType,onSelectedChange:r,actionContainerRef:i}=e,o=r?"select":"browse",[a,s]=$.useTransition(),[u,c]=$.useTransition(),l=Ee(),{showAlert:d}=h.useAlert(),p=WR(),A=c7(),{keyword:m,assetType:v,uploaderId:_,tagIds:C,setFilters:I,resetFilters:x,media:g,fetchNextPage:S,hasNextPage:y,updateMedia:T,unshiftMedia:w,deleteMedia:O,mediaTotal:E,deleteSearchData:F,revalidateFirstPage:W}=Qwe({initialAssetType:n,mode:o}),[K,J]=$.useState();function ee(){a7({config:l,keyword:m,assetType:v,uploaderId:_,tagIds:C})}const{isMediaRevalidationInProgress:re,isMediaCacheInvalid:P,revalidateMedia:Y,revalidateWithParams:M}=Xwe({config:l,revalidate:ee,keyword:m,assetType:v,uploaderId:_,tagIds:C});function k(De){const dt=De.keyword===Vn.keyword,St=De.assetType===n,st=De.uploaderId===Vn.uploaderId,Wt=De.tagIds.length===Vn.tagIds.length&&De.tagIds.every((gi,_r)=>gi===Vn.tagIds[_r]);return dt&&St&&st&&Wt}function q(De){const dt={keyword:m,assetType:v,tagIds:C,uploaderId:_,...De};k(dt)?M(De):F(dt),c(()=>{I(De),at.clearSelection()})}const{isUploading:ue,onFilesSelected:ke,uploadingFiles:Ie,onRetry:rt}=eEe({onBeforeUpload:De=>{x();const dt=De.filter(st=>st.status==="idle").map(st=>({id:st.id,url:URL.createObjectURL(st.file),filename:st.file.name,size:st.file.size,extension:st.file.type,kind:st.file.type,last_modified:st.file.lastModified,tags:[],uploader_id:p.shortId}));w(dt);const[St]=dt??[];St&&at.toggleSelection({id:St.id,isSingleSelection:!0})},onComplete:De=>{const dt=De.flatMap(Wt=>Wt.status==="success"?Wt:(dn(Wt),{id:Wt.id,response:void 0}));T(dt),W({config:l,assetType:v,tagIds:C}),A();const St=dt[0];!St||!St.response||!at.isSelected(St.id)||at.toggleSelection({id:St.response.id,isSingleSelection:!0})}}),at=Vs({totalItemCount:E,onChangeSelection:({selectedIds:De,selectedCount:dt})=>{if(Yr(!1),!!r){if(dt===1){const[St]=[...De];if(Ie.some(Wt=>Wt.id===St&&Wt.status!=="success")){r(new Set);return}}r(new Set(De))}}});function fn(De){ue||ke(De)}function Zt(){y&&s(S)}function rr(De,dt){T([{id:De,response:dt}])}function dn(De){const dt=$p.overflow(De.file.name,30);d({id:De.id,title:`The specified file "${dt}" could not be uploaded.`,subtitle:f.jsxs(h.Text,{color:"inherit",children:["Read more about our"," ",f.jsx(h.Text,{color:"tomato11",href:Dwe,underline:!0,children:"supported media"}),"."]}),buttons:{action:{text:"Retry upload",icon:"cloudUpload",onClick:()=>rt(De)}}})}const[Hr,Yr]=$.useState(!1);return f.jsx(l7.Provider,{value:{isFetchingMedia:a,media:g,mediaTotal:E,onScrollToBottom:Zt,actionContainerRef:i,onFilesUpload:fn,isUploading:ue,uploadingFiles:Ie,isMediaRevalidationInProgress:re,isMediaCacheInvalid:P,revalidateMedia:Y,deleteMedia:O,updateMedia:rr,keyword:m,isSearchingMedia:u,assetType:v,initialAssetType:n,uploaderId:_,tagManagerOpen:Hr,setTagManagerOpen:Yr,tagIds:C,onFilterChange:q,openMediaSection:K,setOpenMediaSection:J},children:t})}function Ct(){const e=$.useContext(l7);if(!e)throw new Error("useMediaLibrary must be used within a MediaLibraryProvider");return e}function rEe(){const e=Ee(),{initialAssetType:t}=Ct(),{assetsApiBaseUrl:n=void 0,repository:r="",authStrategy:i="token"}=e.mediaLibrary?e:{},{total:o}=Ve.useRequest(mi,hp({assetsApiBaseUrl:n,authStrategy:i,repository:r,assetType:t,keyword:"",tagIds:[],page:0}));return o}function f7(){return rEe()===0}function iEe(){return f7()?f.jsx(oEe,{}):f.jsx(p7,{})}function d7(e){const{children:t}=e;return f.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:t})}function p7(){return f.jsx(d7,{children:f.jsxs(h.BlankSlate,{children:[f.jsx(h.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),f.jsx(h.BlankSlateTitle,{size:"big",children:"Oops!"}),f.jsx(h.BlankSlateDescription,{width:360,children:"No items found matching your search"})]})})}function oEe(){const{onFilesUpload:e}=Ct();return f.jsx(d7,{children:f.jsxs(h.Box,{gap:20,flexDirection:"column",alignItems:"center",children:[f.jsx(h.Box,{maxWidth:375,children:f.jsx(h.BlankSlateTitle,{size:"big",children:"Start by uploading your files!"})}),f.jsx(h.Box,{border:!0,borderStyle:"dashed",borderRadius:4,justifyContent:"center",children:f.jsxs(h.BlankSlate,{sx:{marginBlock:80,marginInline:48},children:[f.jsx(h.BlankSlateIcon,{name:"cloudUpload",lineColor:"purple11",backgroundColor:"purple5",size:"large"}),f.jsx(h.BlankSlateTitle,{children:"Drop your files anywhere to upload or ..."}),f.jsx(h.FileUploadButton,{onFilesSelected:e,renderButton:t=>f.jsx(h.Box,{display:"inline-flex",as:"span",children:f.jsx(h.Button,{onClick:t,color:"grey",children:"Upload media"})})}),f.jsx(h.BlankSlateDescription,{children:"Maximum upload size file: 128 MB"})]})})]})})}const jl={warning:{uploadWhileUploading:{title:"Hang tight!",description:"Your current images are still being uploaded. Once they're all set, you'll be free to upload more."}}};function aEe(){const{actionContainerRef:e,isUploading:t,onFilesUpload:n,assetType:r}=Ct(),i=(e==null?void 0:e.current)!==void 0;return f.jsx(A7,{actionContainerRef:e,children:f.jsxs(h.Box,{width:"100%",gap:16,children:[f.jsx(sEe,{}),f.jsx(h.Tooltip,{title:jl.warning.uploadWhileUploading.title,content:jl.warning.uploadWhileUploading.description,visible:t,stableMount:!0,children:f.jsx(h.FileUploadButton,{disabled:t,onFilesSelected:n,startIcon:"cloudUpload",color:i?"purple":"grey",size:"large",assetType:r,children:"Upload media"})})]})})}function sEe(){const{keyword:e,onFilterChange:t,isFetchingMedia:n}=Ct(),[r,i]=$.useState(e);return Ne.useOnChange(e,()=>{e===""&&i("")}),Ne.useDebounce(r,300,Ne.useStableCallback(o=>t({keyword:o}))),f.jsx(h.Box,{width:"100%",flexDirection:"column",children:f.jsx(h.FormSearchInput,{value:r,placeholder:"Search",onValueChange:i,maxLength:200,isLoading:n&&e!==r})})}function A7(e){const{children:t,actionContainerRef:n}=e,r=(n==null?void 0:n.current)!==void 0,i=r?h.Portal:$.Fragment,o=r?{container:n.current,asChild:!0}:{},a=Ne.useForceUpdate();return $.useLayoutEffect(()=>{a()},[a]),f.jsx(i,{...o,children:t})}function uEe(e){const{children:t}=e,{onFilesUpload:n,assetType:r}=Ct();return f.jsx(h.FileDropZone,{overlay:f.jsx(cEe,{}),onFilesSelected:n,assetType:r,children:t})}function cEe(){const{isUploading:e}=Ct(),t=e?jl.warning.uploadWhileUploading.title:"Drop files here",n=e?jl.warning.uploadWhileUploading.description:"Drop your files to upload them instantly to the media library.";return f.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:f.jsxs(h.BlankSlate,{children:[f.jsx(h.BlankSlateIcon,{name:e?"block":"cloudUpload",lineColor:e?"tomato11":"purple10",backgroundColor:e?"tomato2":"purple3",borderColor:e?"tomato6":"purple6",borderStyle:"dashed",size:"xlarge"}),f.jsx(h.BlankSlateTitle,{size:"big",children:t}),f.jsx(h.BlankSlateDescription,{width:360,children:n})]})})}function h7(){return f.jsx(h.DefaultErrorMessage,{title:"Oops! Something went wrong",description:"An error occurred while searching for your image.",errorImageSrc:h.dialogErrorImage,sx:{marginBlock:"auto",marginInline:"auto"}})}function m7(e){const{mediaList:t,mediaActions:n,mediaToolbar:r,sidePane:i}=e,o=h.useMediaQuery({min:"medium"}),a=i&&o;return f.jsxs(h.Box,{display:"grid",gridTemplateRows:"auto auto 1fr",gridTemplateColumns:a?"1fr 380px":"1fr",width:"100%",height:"100%",children:[f.jsxs(h.Box,{position:"relative",display:"grid",gap:16,gridColumn:"1",gridRow:"1",padding:{right:16,bottom:16},children:[n,r]}),f.jsx(h.Box,{position:"relative",display:"grid",gridColumn:"1",gridRow:"2 / -1",children:t}),a&&i]})}function lEe(){var p;const{onScrollToBottom:e,media:t,isUploading:n,uploadingFiles:r,isSearchingMedia:i,isMediaRevalidationInProgress:o,setOpenMediaSection:a,isFetchingMedia:s}=Ct(),u=Vs(),c=$.useRef(null);function l(A){u.toggleSelection({id:A,isSingleSelection:!0}),a("tags")}(n||i||o)&&((p=c.current)==null||p.scrollTo({top:0,behavior:"instant"}));function d(A,m,v){const _=m.shiftKey?t.map(({id:C})=>C):void 0;u.toggleSelection({id:A,isSingleSelection:v==="single",metaKey:m.metaKey,shiftKey:m.shiftKey,ids:_})}return f.jsxs(g7,{onScrollToBottom:e,scrollAreaRef:c,children:[t.map(A=>{var m,v;return f.jsx(h.MediaCard,{"aria-label":"media item",...A,filenameHighlight:(m=A.search_highlight)==null?void 0:m.filename,loading:i,status:(v=r.find(_=>_.id===A.id))==null?void 0:v.status,selected:u.isSelected(A.id),onCardClick:_=>d(A.id,_,"single"),onCheckedChange:(_,C)=>d(A.id,C,"multi"),onAddTagClick:()=>l(A.id)},A.id)}),f.jsx(h.Box,{gridColumn:"1 / -1",justifyContent:"center",children:f.jsx(h.AnimatedElement,{animation:{name:"fade"},children:s&&f.jsx(h.Text,{align:"center",color:"grey11",sx:{marginBlock:8},children:"Loading more items ..."})})})]})}function g7(e){const{children:t,scrollAreaRef:n,onScrollToBottom:r}=e,i=16,o=4,a="250px",s=`calc((100% - ${i*(o-1)}px) / ${o})`;return f.jsx(h.ScrollArea,{"aria-label":"Media list",ref:n,style:{display:"grid",gridTemplateColumns:`repeat(auto-fill, minmax(max(${a}, ${s}), 1fr))`,gridTemplateRows:"1fr 1fr 1fr ",gap:i,padding:2,paddingBottom:16,position:"relative"},onScrollToBottom:r,threshold:500,children:t})}function v7(e){const{children:t,hasSelectedMedia:n}=e;return f.jsx(h.Box,{overflow:"hidden",gridColumn:"2 / -1",gridRow:"1 / -1",children:f.jsx(h.ScrollArea,{style:{display:"grid",height:"100%"},children:f.jsx(h.Box,{flexGrow:1,borderRadius:{topRight:8,topLeft:8},borderStyle:n?"solid":"dashed",border:{top:!0,right:!0,left:!0,bottom:!1},minWidth:0,children:t})})})}function y7(e){const{onFilesUpload:t,isUploading:n,isInitialLoad:r=!1}=e,i=r||n;return f.jsxs(h.Box,{flexDirection:"column",justifyContent:"center",alignItems:"center",padding:16,gap:16,width:"100%",children:[f.jsx(h.BlankSlateIcon,{name:"cloudUpload",lineColor:"purple11",backgroundColor:"purple5",size:"large"}),f.jsx(h.Box,{flexDirection:"column",gap:4,children:f.jsxs(h.Text,{align:"center",children:["Select or"," ",f.jsx(h.FileUploadButton,{disabled:i,onFilesSelected:t,renderButton:o=>f.jsx(h.Tooltip,{title:jl.warning.uploadWhileUploading.title,content:jl.warning.uploadWhileUploading.description,visible:n,children:f.jsx(h.Box,{display:"inline-flex",as:"span",children:f.jsx(h.Button,{disabled:i,onClick:o,invisible:!0,children:"upload"})})})})," ","media."]})}),f.jsx(h.FileUploadButton,{disabled:i,onFilesSelected:t,color:"grey",children:"Upload media"})]})}function b7(e){const{count:t}=e;return f.jsxs(h.Text,{variant:"bold",children:[t," item",t==1?"":"s"]})}function fEe(e){const{actionContainerRef:t}=e;return f.jsx(m7,{sidePane:f.jsx(AEe,{}),mediaActions:f.jsx(pEe,{actionContainerRef:t}),mediaToolbar:f.jsx(h.Skeleton,{color:"grey5",borderRadius:12,children:f.jsx(b7,{count:888})}),mediaList:f.jsx(dEe,{})})}function dEe(){return f.jsx(g7,{children:Qt.range(1,24).map(e=>f.jsx(C7,{},e))})}function pEe(e){const{actionContainerRef:t}=e,n=Ne.useForceUpdate();return $.useLayoutEffect(()=>{n()},[n]),f.jsx(A7,{actionContainerRef:t,children:f.jsxs(h.Box,{width:"100%",gap:16,children:[f.jsx(h.Box,{width:"100%",flexDirection:"column",children:f.jsx(h.FormSearchInput,{placeholder:"Search",maxLength:200,value:"",disabled:!0,onValueChange:()=>{}})}),f.jsx(h.FileUploadButton,{disabled:!0,onFilesSelected:()=>{},startIcon:"cloudUpload",color:t?"purple":"grey",size:"large",children:"Upload media"})]})})}function AEe(){return f.jsx(v7,{hasSelectedMedia:!1,children:f.jsx(y7,{onFilesUpload:()=>{},isUploading:!1,isInitialLoad:!0})})}function C7(){return f.jsxs(h.Box,{height:302,width:"100%",flexDirection:"column",padding:16,backgroundColor:"grey1",border:!0,borderStyle:"solid",borderRadius:6,children:[f.jsx(h.Skeleton,{height:164,width:"100%"}),f.jsx(h.Skeleton,{height:16,width:"100%",sx:{marginTop:12}}),f.jsx(h.Skeleton,{height:10,width:100,sx:{marginTop:8}}),f.jsx(h.Skeleton,{height:1,width:"100%",sx:{marginTop:20,marginBottom:16}}),f.jsxs(h.Box,{flexDirection:"row",gap:8,children:[f.jsx(h.Skeleton,{height:24,width:54}),f.jsx(h.Skeleton,{height:24,width:45}),f.jsx(h.Skeleton,{height:24,width:62})]})]})}const S7=$.createContext({showToast:()=>{}});function hEe(e){const{children:t}=e,[n,r]=$.useState({title:"",seconds:5}),[i,o]=$.useState(!1),{title:a,action:s,seconds:u=1,icon:c="check"}=n,l=$.useMemo(()=>({showToast:d=>{r({seconds:u,...d}),o(!0)}}),[u]);return f.jsxs(f.Fragment,{children:[f.jsx(mEe,{}),f.jsx(h.Toast,{anchor:f.jsx(h.Box,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),open:i,onOpenChange:o,title:a,action:s,seconds:u,icon:c}),f.jsx(S7.Provider,{value:l,children:t})]})}function _7(){return $.useContext(S7)}function mEe(){const{revalidateMedia:e,isMediaCacheInvalid:t}=Ct(),[n,r]=$.useState(t);return Ne.useOnChange(t,r),f.jsx(h.Toast,{anchor:f.jsx(h.Box,{position:"absolute",justifyContent:"center",width:"100%",bottom:72}),open:n,title:"There have been changes to your media library",action:{title:"Update",onClick:e},cancel:{onClick:()=>r(!1)}})}function Pc(){const{media:e}=Ct(),t=Vs();return e.filter(({id:n})=>t.isSelected(n))}function gEe(){const[e,t]=$.useState(!1),n=Pc(),r=Vs(),i=$.useMemo(()=>n.some(({id:a})=>a.startsWith("temp")),[n]),[o]=n;return o?r.selectedCount>1?f.jsxs(h.Box,{gap:8,alignItems:"center",children:[f.jsxs(h.Text,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:[r.selectedCount," media selected"]}),f.jsx(h.Tooltip,{content:"Open all selected media in new tabs",children:f.jsx(h.IconButton,{icon:"openInFull",variant:"solid",size:"small",onClick:()=>n.forEach(a=>window.open(a.url,"_blank"))})}),f.jsx(h.Tooltip,{content:"Remove selected media",children:f.jsx(h.IconButton,{icon:"delete",variant:"solid",color:"tomato",size:"small",hiddenLabel:"Remove media",onClick:()=>t(!0),disabled:i})}),f.jsx(JF,{open:e,onOpenChange:t,media:n})]}):f.jsxs(h.Box,{gap:8,alignItems:"center",children:[f.jsx(h.Text,{variant:"emphasized",noWrap:!0,sx:{flexGrow:1},children:o.filename}),f.jsxs(h.Box,{gap:8,children:[f.jsx(h.Tooltip,{content:"Open media in new tab",children:f.jsx(h.IconButton,{icon:"openInFull",variant:"solid",size:"small",hiddenLabel:"Open media in new tab",onClick:()=>window.open(o.url,"_blank"),disabled:i})}),f.jsx(h.Tooltip,{content:"Copy media URL",children:f.jsx(h.IconButton,{icon:"link",variant:"solid",size:"small",hiddenLabel:"Copy media URL",onClick:()=>navigator.clipboard.writeText(o.url),disabled:i})}),f.jsx(h.Tooltip,{content:"Remove media",children:f.jsx(h.IconButton,{icon:"delete",variant:"solid",color:"tomato",size:"small",hiddenLabel:"Remove media",onClick:()=>t(!0),disabled:i})}),f.jsx(JF,{open:e,onOpenChange:t,media:o})]})]}):null}function JF(e){const{open:t,onOpenChange:n,media:r}=e,i=Ee(),{showAlert:o}=h.useAlert(),{deleteMedia:a}=Ct(),s=Vs(),u=c7(),[c,l]=$.useState(!1),d=Array.isArray(r),p=d?"these items":"this item";function A(){l(!0);const v=s.getSelectionState().selectedIds;yEe({ids:v,config:i}).then(()=>{n(!1),a(v),s.clearSelection(),u()}).catch(()=>{n(!1),o({title:"Error",subtitle:`Something went wrong when removing ${p}.`})}).finally(()=>{l(!1)})}return f.jsxs(h.Dialog,{onOpenChange:n,open:t,size:"small",children:[f.jsx(h.DialogHeader,{icon:"alert",title:`Remove ${p} from your media library?`}),f.jsx(h.DialogContent,{children:f.jsxs(h.Box,{padding:16,flexDirection:"column",children:[f.jsxs(h.Text,{children:["You are about to delete ",p,": ",!d&&f.jsx("b",{children:r.filename})]}),d&&f.jsx(vEe,{media:r})]})}),f.jsxs(h.DialogActions,{children:[f.jsx(h.DialogCancelButton,{}),f.jsxs(h.DialogActionButton,{onClick:A,color:"tomato",loading:c,children:["Yes, I want to remove ",p]})]})]})}const Hb=15;function vEe(e){const{media:t}=e,n=t.slice(0,Hb),r=t.length>Hb,i=r?t.length-Hb:0,o=i===1?"item":"items";return f.jsxs(h.UnorderedList,{density:"compact",sx:{marginTop:8},children:[n.map((a,s)=>f.jsx(h.ListItem,{children:f.jsx("b",{children:a.filename})},s)),r&&f.jsxs(h.ListItem,{children:["And ",f.jsx("b",{children:i})," more ",o,"..."]})]})}function yEe(e){const{ids:t,config:n}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");if(t.length===0)throw new Error("No ids provided during media deletion");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;if(t.length===1){const[a]=t;return pe.request(new URL(`assets/${a}`,r),{headers:{repository:i},method:"DELETE",credentials:pe.getRequestCredentials(o),okType:L.unknown()})}return pe.request(new URL("assets/bulk-delete",r),{headers:{repository:i},method:"POST",credentials:pe.getRequestCredentials(o),okType:L.unknown(),body:{ids:t}})}function bEe(){var o;const e=Pc(),{uploadingFiles:t}=Ct(),[n]=e;if(!n)return null;if(e.length===2)return f.jsx(Yb,{children:e.map((a,s)=>f.jsx("div",{style:{position:"absolute",transform:s===0?"translateX(25%) rotate(15deg) ":"translateX(-25%) rotate(-15deg) "},children:f.jsx(ZF,{media:a})},a.id))});if(e.length>2)return f.jsx(Yb,{children:e.slice(-4).map((a,s)=>f.jsx("div",{style:{position:"absolute",paddingRight:s*16},children:f.jsx(ZF,{media:a})},a.id))});const r=(o=t.find(a=>a.id===n.id))==null?void 0:o.status,i=n.kind.startsWith("image");return f.jsx(h.Box,{flexDirection:"column",children:f.jsx(h.CheckerBoard,{children:f.jsx(Yb,{uploadStatus:r,hasImage:i,children:i?f.jsx(h.Image,{src:n.url,alt:n.alt,sizing:"contain"}):f.jsx(h.MediaCardPlaceholder,{kind:n.kind,filename:n.filename})})})})}function Yb(e){const{children:t,uploadStatus:n,hasImage:r}=e;return f.jsxs(h.Box,{flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",height:200,width:"100%",backgroundColor:r?"transparent":"purple2",children:[t,n&&f.jsx(CEe,{uploadStatus:n})]})}function CEe(e){const{uploadStatus:t}=e,{value:n,color:r,height:i,transition:o}=SEe(t);return f.jsx(h.Box,{position:"absolute",backgroundColor:"greyAlpha1",width:"100%",height:"100%",padding:{inline:16},justifyContent:"end",flexDirection:"column",children:f.jsx(h.ProgressBar,{value:n,color:r,height:i,transition:o})})}function SEe(e){switch(e){case"idle":return{value:0,height:"collapsed",color:"grey4"};case"uploading":return{value:90,transition:"slow",color:"purple9"};case"success":return{value:100,height:"collapsed",color:"purple9"};case"error":return{value:100,color:"tomato11"}}}function ZF(e){const{media:t}=e;return f.jsx(h.Box,{width:111,height:152,children:t.kind==="image"?f.jsx(h.Image,{borderRadius:8,src:t.url,alt:t.alt,sizing:"cover"}):f.jsx(h.MediaCardPlaceholder,{kind:t.kind,filename:t.filename})})}const es=2e3,md="__MAIN_THUMBNAIL__";function sC(e,t,n){const r=e.name===md?void 0:e.name;let i;return t?io.isDefined(n)?i=[n.width,n.height]:io.isDefined(e.width)||io.isDefined(e.height)?i=[e.width??void 0,e.height??void 0]:i=[t.origin.width,t.origin.height]:i=void 0,[r,i?`${i[0]??"auto"}×${i[1]??"auto"}px`:void 0]}function _Ee(e){var t,n;return[{...(t=e.config)==null?void 0:t.constraint,name:md}].concat(((n=e.config)==null?void 0:n.thumbnails)??[])}function IEe(e,t){var a,s;const{__TYPE__:n,thumbnails:r,...i}=t,o=(s=(a=e.config)==null?void 0:a.thumbnails)==null?void 0:s.map(({name:u})=>r==null?void 0:r[u]);return[i,...o??[]]}function TEe(e,t,n,r){const i=r.length===0?void 0:r;return e===md||!Ce.isImageContent(t)?{...t,alt:i}:{...t,thumbnails:{...t.thumbnails,[e]:{...n,alt:i}}}}function xEe(e,t){const{width:n,height:r}=t??{};return n&&r?[n,r]:n?[n,Math.round(e.height*(n/e.width))]:r?[Math.round(e.width*(r/e.height)),r]:[e.width,e.height]}function wEe(e,t,n,r,i){if(kEe(e)==="svg")return e;const o=new URL(e);if(i){const{x:a,y:s,width:u,height:c}=t,l=[...o.searchParams.entries(),["rect",[a,s,u,c].join(",")],["w",n],["h",r]];o.search=l.map(d=>d.join("=")).join("&")}return o.toString()}function I7(e){const t=new URL(e);return t.searchParams.delete("q"),t.searchParams.set("w","800"),t.searchParams.set("h","800"),t.searchParams.set("auto","compress,format"),t.searchParams.set("fit","max"),t.toString()}function EEe(e){const t=new URL(e);return t.searchParams.delete("q"),t.searchParams.delete("fm"),t.searchParams.set("w","300"),t.searchParams.set("auto","compress,format"),t.toString()}function $Ee(e){return e!=null&&e.url?I7(e.url):void 0}function REe(e,t,n,r){var s,u,c,l,d;if(!n||e===md){const p=(s=t.config)==null?void 0:s.thumbnails,A=p&&Object.fromEntries(p.map(m=>[m.name,im(r,m)]));return{__TYPE__:"ImageContent",...im(r,(u=t.config)==null?void 0:u.constraint),thumbnails:A}}const i=(l=(c=t.config)==null?void 0:c.thumbnails)==null?void 0:l.find(p=>p.name===e);if(!i)return n;const o=(d=n.thumbnails)==null?void 0:d[e],a=im(r,i);return a.url===(o==null?void 0:o.url)?n:{...n,thumbnails:Vl.mapValues(n.thumbnails??{},(p,A)=>A===e?a:p)}}function OEe(e){return"kind"in e&&"extension"in e}function im(e,t){const{width:n,height:r,rect:i}=FEe({...e,width:(e==null?void 0:e.width)??es,height:(e==null?void 0:e.height)??es},t),o=!!(t!=null&&t.width||t!=null&&t.height);return{provider:"imgix",url:wEe(e.url,i,n,r,o),alt:e.alt,...OEe(e)?{credits:e.credits}:{},origin:{id:e.id,url:e.url,width:e.width??es,height:e.height??es},width:n,height:r,edit:{background:"transparent",zoom:1,crop:{x:i.x,y:i.y}}}}function FEe(e,t){const[n,r]=xEe(e,t),i=Math.max(n/e.width,r/e.height),o=Math.round((e.width-n/i)/2),a=Math.round((e.height-r/i)/2),s=Math.round(n/i),u=Math.round(r/i);return{width:n,height:r,rect:{x:o,y:a,width:s,height:u}}}function kEe(e){const{pathname:t}=new URL(e),n=t.lastIndexOf(".");if(n!==-1)return t.substring(n).slice(1).toLowerCase()}function MEe(e){if(!e)return"";const{filename:t,extension:n}=e;if(!n)return t;const r=new RegExp(`\\.${n}$`);return t.replace(r,"")}function LEe(e){const t=e.length,n={},r=[];return e.forEach(o=>{o.tags.forEach(a=>{n[a.id]||(n[a.id]=0,r.push(a)),n[a.id]++})}),r.filter(o=>n[o.id]===t)}function T7(e){const{tags:t,toggleAssetTag:n,getTagsLabel:r}=e,{setTagManagerOpen:i}=Ct(),{showToast:o}=_7(),{showAlert:a}=h.useAlert(),[s,u]=$.useState("");async function c(l,d){u("");try{await n(l,d),o({title:"Media tags were updated",seconds:3})}catch{a({title:"Error",subtitle:"Something went wrong when updating media tags"})}}return f.jsxs(h.Box,{flexDirection:"column",children:[f.jsxs(h.Box,{justifyContent:"space-between",children:[f.jsx(h.Text,{color:"grey12",variant:"bold",children:r()}),f.jsx(h.Button,{startIcon:"edit",invisible:!0,color:"dark",onClick:()=>i(!0),children:"Manage tags"})]}),f.jsxs(h.ComboBox,{sx:{marginTop:4,marginBottom:8},children:[f.jsx(jEe,{searchTerm:s,setSearchTerm:u}),f.jsx(h.ComboBoxContent,{children:f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting tags"}),children:f.jsx($.Suspense,{fallback:f.jsx(h.Box,{padding:8,flexDirection:"column",gap:8,children:Qt.range(1,6).map(l=>f.jsx(h.Skeleton,{height:24,width:85},l))}),children:f.jsx(UEe,{searchTerm:s,assignedTags:t,onToggleAssetTag:c})})})})]}),f.jsx(h.Box,{flexDirection:"column",alignItems:"flex-start",gap:8,children:t.map(l=>f.jsx(h.Badge,{title:l.name,size:"medium",color:"purple",selected:!0,onClose:()=>c(l,"remove")},l.id))})]})}function jEe(e){const{searchTerm:t,setSearchTerm:n}=e,r=$.useRef(null),{openMediaSection:i,setOpenMediaSection:o}=Ct();return $.useEffect(()=>{var a;i==="tags"&&((a=r.current)==null||a.focus(),o(void 0))},[i,o]),f.jsx(h.ComboBoxInput,{value:t,onValueChange:n,placeholder:"Add or create a new tag",ref:r})}function UEe(e){const{searchTerm:t,assignedTags:n,onToggleAssetTag:r}=e,[i]=Pc(),o=Ee(),{showAlert:a}=h.useAlert(),{tags:s}=Ih(),u=$.useMemo(()=>{const p=t.toLowerCase();return s.filter(A=>A.name.toLowerCase().includes(p))},[s,t]),l=DR.safeParse(t).success&&s.every(p=>p.name!==t);async function d(){if(!t||!i)return;let p;try{p=await BEe({name:t,config:o}),Th(A=>[p,...A])}catch{a({title:"Error",subtitle:`Something went wrong when creating the tag ${t}`});return}await r(p,"add")}return i?f.jsxs(f.Fragment,{children:[!u.length&&f.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"}),u.map((p,A)=>f.jsx(h.ComboBoxItem,{value:p.id,onCheckedChange:m=>r(p,m?"add":"remove"),checked:n.some(m=>m.id===p.id),children:f.jsx(h.Badge,{title:p.name,color:"purple",size:"medium",sx:{marginInline:8,marginBottom:A===u.length-1?8:4,marginTop:A===0?8:4}})},p.id)),l&&f.jsx(h.ComboBoxItem,{value:"new",onCheckedChange:d,children:f.jsxs(h.Box,{padding:8,flexDirection:"row",alignItems:"center",gap:4,children:[f.jsx(h.Icon,{name:"add",size:"small",color:"grey11"}),f.jsxs(h.Text,{color:"grey12",children:['Create tag "',t,'"']})]})})]}):null}function BEe(e){const{name:t,config:n}=e;n.mediaLibrary||Jt("mediaLibrary");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return pe.request(new URL("tags",r),{headers:{repository:i},body:{name:t},method:"POST",credentials:pe.getRequestCredentials(o),okType:KR})}function PEe(e){const{selectedMedia:t}=e,n=Ee(),r=$.useMemo(()=>LEe(t),[t]);async function i(a,s){const u=s==="remove",c=t.map(d=>d.id);let l=[];Lu(d=>(l=d,d.map(p=>c.includes(p.id)?u?KEe(p,a):DEe(p,a):p)));try{await WEe({tagId:a.id,assetIds:c,operation:u?"remove":"add",config:n});const d=t.length*(u?-1:1);Th(p=>p.map(A=>A.id===a.id?{...A,count:A.count+d}:A))}catch(d){throw Lu(()=>l),d}}function o(){const a=r.length;return a>1?`${a} tags in common`:a===1?"1 tag in common":"Common tags"}return f.jsx(T7,{tags:r,getTagsLabel:o,toggleAssetTag:i})}function WEe(e){const{tagId:t,assetIds:n,config:r,operation:i}=e;if(!r.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:o,repository:a,authStrategy:s}=r;return pe.request(new URL(`tags/${t}/assets`,o),{headers:{repository:a},body:{assetIds:n},method:i==="add"?"POST":"DELETE",credentials:pe.getRequestCredentials(s),okType:L.unknown()})}function DEe(e,t){return e.tags.some(({id:r})=>r===t.id)?e:{...e,tags:[...e.tags,t]}}function KEe(e,t){const n=e.tags.filter(r=>r.id!==t.id);return{...e,tags:n}}function NEe(e){const{selectedMedia:t}=e,n=t.tags,r=Ee(),{updateMedia:i}=Ct();async function o(s,u){const c=t.tags,l=u==="remove",d=l?c.filter(p=>p.id!==s.id):[...c,s];i(t.id,{tags:d});try{await qEe({mediaId:t.id,config:r,tags:d.map(p=>p.id)}),Th(p=>p.map(A=>A.id===s.id?{...A,count:A.count+(l?-1:1)}:A))}catch(p){throw i(t.id,{tags:c}),p}}function a(){const s=n.length;return s>1?`${s} tags`:s===1?"1 tag":"Tags"}return f.jsx(T7,{tags:n,getTagsLabel:a,toggleAssetTag:o})}function qEe(e){const{mediaId:t,config:n,tags:r}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:i,repository:o,authStrategy:a}=n;return pe.request(new URL(`assets/${t}`,i),{headers:{repository:o},body:{tags:r},method:"PATCH",credentials:pe.getRequestCredentials(a),okType:Q0})}function VEe(){const[e,t]=$.useState("description");if(Pc().length!==1)return f.jsx(GEe,{});const r=e==="description",i=e==="more-info";return f.jsxs(f.Fragment,{children:[f.jsxs(h.Box,{display:"grid",gridTemplateColumns:"1fr 1fr",backgroundColor:"grey2",border:!0,borderStyle:"solid",borderRadius:8,children:[f.jsx(h.Tab,{selected:r,outline:r,transparent:!0,onClick:()=>t("description"),children:"Description"}),f.jsx(h.Tab,{selected:i,outline:i,transparent:!0,onClick:()=>t("more-info"),children:"More info"})]}),f.jsx(QEe,{tab:e})]})}function QEe(e){const{tab:t}=e;switch(t){case"description":return f.jsx(zEe,{});case"more-info":return f.jsx(HEe,{})}}function zEe(){const{title:e,alt:t,onBlur:n,isUploading:r,selectedMedia:i}=w7();if(!i)return null;const{extension:o}=i;return f.jsxs(h.Box,{flexDirection:"column",gap:16,children:[f.jsx(h.FormInput,{value:e.value,onValueChange:e.set,label:"Media title",placeholder:"Media title",onBlur:n,disabled:r,suffix:o?`.${o}`:void 0}),f.jsx(h.FormInputField,{label:"Alternative text",children:f.jsx(h.ContentEditable,{content:t.displayValue,contentVersion:t.version,readOnly:r,placeholder:"A short description of the media for accessibility",multiline:!0,decorations:{em:"highlight"},onChange:t.onChange,onBlur:n})}),!r&&f.jsx(NEe,{selectedMedia:i})]})}function HEe(){const{credits:e,notes:t,onBlur:n,isUploading:r,selectedMedia:i}=w7();if(!i)return null;const{uploader_id:o}=i,a=XEe(i);return f.jsxs(h.Box,{gap:8,flexDirection:"column",children:[a.map(s=>f.jsxs(h.Box,{gap:8,children:[f.jsxs(h.Text,{color:"grey11",children:[s.label,":"]}),f.jsx(h.Text,{children:s.value})]},s.label)),f.jsxs(h.Box,{gap:8,children:[f.jsx(h.Text,{color:"grey11",children:"Uploaded by:"}),f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(h.Text,{color:"grey11",children:"Error getting uploader"}),children:f.jsx($.Suspense,{fallback:f.jsx(x7,{}),children:f.jsx(YEe,{uploaderId:o})})})]}),f.jsx(h.FormInputField,{label:"Copyright",children:f.jsx(h.ContentEditable,{content:e.displayValue,contentVersion:e.version,readOnly:r,placeholder:"Media copyrights or credits",multiline:!0,decorations:{em:"highlight"},onChange:e.onChange,onBlur:n})}),f.jsx(h.FormInputField,{label:"Private notes",children:f.jsx(h.ContentEditable,{content:t.displayValue,contentVersion:t.version,readOnly:r,placeholder:"Private notes are never shared publicly",multiline:!0,decorations:{em:"highlight"},onChange:t.onChange,onBlur:n})})]})}function YEe(e){const{uploaderId:t}=e,{uploadersById:n}=s7(),r=n.get(t??"ghost");return t&&!r?f.jsx(x7,{}):r?f.jsxs(f.Fragment,{children:[f.jsx(h.Avatar,{size:24,firstName:r.firstName,lastName:r.lastName,imageUrl:r.uploadedAvatar,hasBorder:!1}),f.jsx(h.Text,{children:r.name})]}):null}function x7(){return f.jsx(h.Skeleton,{width:128})}function GEe(){const e=Pc(),{uploadingFiles:t}=Ct(),n=$.useMemo(()=>t.some(r=>e.some(i=>r.id===i.id)&&r.status!=="success"),[e,t]);return f.jsx(f.Fragment,{children:!n&&f.jsx(PEe,{selectedMedia:e})})}function w7(){const[e]=Pc(),{updateMedia:t,uploadingFiles:n}=Ct(),r=Ee(),{showToast:i}=_7(),o=(e==null?void 0:e.id)??"",a=qh(e,"alt"),s=qh(e,"notes"),u=qh(e,"credits"),c=qh(e,"filename",MEe),l=n.some(p=>p.id===(e==null?void 0:e.id)&&p.status!=="success");function d(){if(!e||!c.changed&&!a.changed&&!u.changed&&!s.changed)return;const{extension:p,search_highlight:A}=e,m=p?`${c.value}.${p}`:c.value;t(o,{filename:m,alt:a.value,credits:u.value,notes:s.value,search_highlight:{alt:a.changed||A==null?void 0:A.alt,credits:u.changed||A==null?void 0:A.credits,filename:c.changed||A==null?void 0:A.filename,notes:s.changed||A==null?void 0:A.notes}}),ZEe({id:o,config:r,metadata:{filename:m,alt:a.value,credits:u.value,notes:s.value}}).then(()=>{i({title:"Media metadata has been saved.",seconds:3})}).catch(v=>{console.error(v)})}return{selectedMedia:e,onBlur:d,isUploading:l,title:c,alt:a,credits:u,notes:s,extension:e==null?void 0:e.extension}}function qh(e,t,n=r=>r==null?void 0:r[t]){var c;const r=n(e)??"",[i,o]=$.useState(r);Ne.useOnChange(e==null?void 0:e.id,()=>o(r));const a=(c=e==null?void 0:e.search_highlight)==null?void 0:c[t],s=!!a;function u(l){const{from:d,to:p}=l.state.selection;l.commands.selectAll(),l.commands.unsetAllMarks(),l.commands.setTextSelection({from:d,to:p}),o(l.getText())}return{value:i,set:o,displayValue:JEe(a??i)??"",onChange:u,version:`${(e==null?void 0:e.id)??""}_${s}`,changed:i!==r}}function JEe(e){return e==null?void 0:e.replace(/\n/g,"<br>")}function ZEe(e){const{id:t,config:n,metadata:r}=e;if(!n.mediaLibrary)throw new Error("Media Library not configured.");const{assetsApiBaseUrl:i,repository:o,authStrategy:a}=n;return pe.request(new URL(`assets/${t}`,i),{headers:{repository:o},body:{...r},method:"PATCH",credentials:pe.getRequestCredentials(a),okType:Q0})}function XEe(e){const{width:t,height:n,last_modified:r,size:i,extension:o}=e,a=t&&n,s={label:"Date",value:ZC.prettyPrintDate(new Date(r))},u={label:"File size",value:$p.formatBytes(i)},c=a?{label:"Dimensions",value:`${t}×${n}`}:void 0,l=a?{label:"Ratio",value:((t??0)/(n??0)).toFixed(1)}:void 0,d=o?{label:"Extension",value:o.toUpperCase()}:void 0;return[s,u,c,l,d].filter(io.isDefined)}function e$e(){const{setTagManagerOpen:e}=Ct(),[t,n]=$.useState("");return f.jsxs(h.Box,{gap:20,flexDirection:"column",height:"100%",children:[f.jsxs(h.Box,{alignItems:"center",gap:4,children:[f.jsx(h.IconButton,{icon:"close",size:"small",hasPadding:!1,onClick:()=>e(!1)}),f.jsx(h.Text,{variant:"bold",children:"Tags management"})]}),f.jsxs(h.Box,{gap:16,flexDirection:"column",height:"100%",children:[f.jsx(h.FormSearchInput,{value:t,onValueChange:n,placeholder:"Search for tags",endAdornment:!1,autoFocus:!0}),f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(i$e,{}),children:f.jsx($.Suspense,{fallback:f.jsx(s$e,{}),children:f.jsx(t$e,{searchTerm:t})})})]})]})}function t$e(e){const{searchTerm:t}=e,{tags:n}=Ih(),r=n.filter(i=>i.name.toLowerCase().includes(t.toLowerCase()));return r.length===0?f.jsx(h.Text,{color:"grey9",variant:"small",children:"No tags found"}):f.jsx(h.AnimatedList,{ariaLabel:"Tags list",getItemKey:i=>i.id,gap:16,items:r,children:i=>f.jsx(n$e,{tag:i})})}function n$e(e){const{tag:t}=e,[n,r]=$.useState(!1),i=Ee(),{showAlert:o}=h.useAlert(),{showToast:a}=h.useToast(),{tags:s}=Ih();async function u(c){if(!DR.safeParse(c).success){o({title:"Error",subtitle:`Failed to rename tag "${t.name}" to "${c}". Tag name must be at least ${e7} and at maximum ${t7} characters long.`});return}if(s.some(p=>p.name===c)){o({title:"Error",subtitle:`Failed to rename tag "${t.name}" to "${c}". Tag with name "${c}" already exists.`});return}try{await a$e({id:t.id,name:c,config:i}),Th(p=>p.map(A=>A.id===t.id?{...A,name:c}:A)),Lu(p=>p.map(A=>{if(A.tags.findIndex(v=>v.id===t.id)!==-1){const v=A.tags.map(_=>_.id===t.id?{..._,name:c}:_);return{...A,tags:v}}return A})),a({title:`Tag "${t.name}" renamed to "${c}"`,seconds:3})}catch{o({title:"Error",subtitle:"Something went wrong when renaming the tag."})}}return f.jsxs(f.Fragment,{children:[f.jsxs(h.Box,{justifyContent:"space-between",children:[f.jsx(h.Badge,{title:t.name,color:"purple",size:"medium",onEdit:u}),f.jsx(h.Button,{invisible:!0,color:"tomato",textWeight:"normal",onClick:()=>r(!0),children:"Delete"})]}),f.jsx(r$e,{open:n,onOpenChange:r,tag:t})]})}function r$e(e){const{open:t,onOpenChange:n,tag:r}=e,{id:i,name:o,count:a}=r,s=Ee(),{showAlert:u}=h.useAlert(),[c,l]=$.useState(!1);async function d(){l(!0);try{await o$e({id:i,config:s}),Th(p=>p.filter(A=>A.id!==i)),Lu(p=>p.map(A=>{if(A.tags.findIndex(v=>v.id===i)!==-1){const v=A.tags.filter(_=>_.id!==i);return{...A,tags:v}}return A}))}catch{u({title:"Error",subtitle:"Something went wrong when removing the tag."})}finally{l(!1),n(!1)}}return f.jsxs(h.Dialog,{onOpenChange:n,open:t,size:"small",children:[f.jsx(h.DialogHeader,{title:`This tag is being used on ${a} media item${a===1?"":"s"}`}),f.jsx(h.DialogContent,{padding:16,children:f.jsxs(h.Text,{children:["You are about to delete the tag name ",f.jsx("b",{children:o}),"."," ",a>0&&`This tag is being
|
|
33
33
|
used on ${a} media item${a===1?"":"s"} and will be deleted
|
|
34
|
-
from ${a===1?"it":"them"}.`]})}),f.jsxs(h.DialogActions,{children:[f.jsx(h.DialogCancelButton,{}),f.jsx(h.DialogActionButton,{onClick:d,color:"tomato",loading:c,children:"Yes, I want to delete"})]})]})}function i$e(){const e=$.useContext(Ve.ErrorBoundaryContext);return f.jsx(h.Box,{flexDirection:"column",children:f.jsxs(h.BlankSlate,{children:[f.jsx(h.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed"}),f.jsx(h.BlankSlateTitle,{size:"big",children:"Oops!"}),f.jsx(h.BlankSlateDescription,{width:360,children:"We couldn't load your media tags."}),f.jsx(h.BlankSlateActions,{children:f.jsx(h.Button,{onClick:e==null?void 0:e.reset,size:"medium",children:"Try again"})})]})})}function o$e(e){const{id:t,config:n}=e;n.mediaLibrary||Jt("mediaLibrary");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return pe.request(new URL(`tags/${t}`,r),{headers:{repository:i},method:"DELETE",credentials:pe.getRequestCredentials(o),okType:L.unknown()})}function a$e(e){const{id:t,name:n,config:r}=e;r.mediaLibrary||Jt("mediaLibrary");const{assetsApiBaseUrl:i,repository:o,authStrategy:a}=r;return pe.request(new URL(`tags/${t}`,i),{headers:{repository:o},method:"PATCH",credentials:pe.getRequestCredentials(a),body:{name:n},okType:L.unknown()})}function s$e(){return f.jsx(h.Box,{flexDirection:"column",gap:16,children:Qt.range(1,6).map(e=>f.jsxs(h.Box,{justifyContent:"space-between",children:[f.jsx(h.Skeleton,{height:24,width:85}),f.jsx(h.Skeleton,{height:24,width:45})]},e))})}function u$e(){const e=Pc(),{onFilesUpload:t,isUploading:n,tagManagerOpen:r}=Ct();return e.length===0&&r===!1?f.jsx(y7,{onFilesUpload:t,isUploading:n}):f.jsx(h.Box,{flexDirection:"column",backgroundColor:"grey1",width:"100%",padding:16,gap:16,borderRadius:{topLeft:8,topRight:8},children:r?f.jsx(e$e,{}):f.jsxs(f.Fragment,{children:[f.jsx(gEe,{}),f.jsx(bEe,{}),f.jsx(VEe,{})]})})}function c$e(){const e=Vs();return f.jsx(v7,{hasSelectedMedia:e.selectedCount!==0,children:f.jsx(u$e,{})})}const uC={all:{name:"All media",icon:"public"},image:{name:"Images",icon:"image"},video:{name:"Videos",icon:"videocam"},document:{name:"Documents",icon:"insertDriveFile"},audio:{name:"Audio files",icon:"musicNote"}},l$e=Object.entries(uC);function f$e(){const{assetType:e,initialAssetType:t,onFilterChange:n}=Ct(),[r,i]=$.useState(e);Ne.useOnChange(e,()=>{i(e)});const[o,a]=$.useState(!1);function s(p){a(!1),i(p),n({assetType:p})}const{icon:u,name:c}=uC[r],l=uC[t].name,d=t!=="all";return f.jsxs(h.DropdownMenu,{open:o,onOpenChange:a,children:[f.jsx(h.DropdownMenuTrigger,{disabled:d,children:f.jsx(d$e,{icon:u,isDropdownDisabled:d,buttonName:c,tooltipAssetTypeName:l})}),f.jsx(h.DropdownMenuContent,{minWidth:256,align:"start",childrenFocusScope:!0,children:f.jsx(f.Fragment,{children:l$e.filter(([p])=>p!==r).map(([p,{icon:A,name:m}])=>f.jsx(h.DropdownMenuItem,{startIcon:f.jsx(h.Icon,{name:A}),onSelect:()=>s(p),children:m},p))})})]})}const d$e=$.forwardRef(function(t,n){const{icon:r,isDropdownDisabled:i,buttonName:o,tooltipAssetTypeName:a,...s}=t;return f.jsx(h.Tooltip,{content:`You can only pick ${(a==null?void 0:a.toLocaleLowerCase())??"this type of media"}`,visible:i,children:f.jsx(h.Button,{startIcon:r,endIcon:"arrowDropDown",size:"small",color:"grey",disabled:i,ref:n,...s,children:o})})});function p$e(e){const{optimisticTagIds:t,setOptimisticTagIds:n}=e,{onFilterChange:r}=Ct(),{tags:i}=Ih(),o=$.useMemo(()=>rz.groupBy(i,s=>s.id),[i]);function a(s){const u=t.filter(c=>c!==s.id);n(u),r({tagIds:u})}return f.jsx(f.Fragment,{children:t.map(s=>{var c;const u=(c=o.get(s))==null?void 0:c[0];return u?f.jsx(h.Badge,{title:u.name,size:"medium",color:"purple",onClose:()=>a(u),selected:!0},u.id):null})})}function A$e(){const{setTagManagerOpen:e,tagIds:t,onFilterChange:n}=Ct(),[r,i]=$.useState(""),[o,a]=$.useState(!1),[s,u]=$.useState(t);Ne.useOnChange(JSON.stringify(t),()=>{u(t)});function c(p){a(p),p||i("")}function l(p){const A=s.includes(p.id)?t.filter(m=>m!==p.id):[...t,p.id];u(A),n({tagIds:A}),a(!1)}function d(){a(!1),e(!0)}return f.jsxs(f.Fragment,{children:[f.jsxs(h.DropdownMenu,{open:o,onOpenChange:c,children:[f.jsx(h.DropdownMenuTrigger,{children:f.jsx(h.Button,{startIcon:"label",endIcon:"arrowDropDown",size:"small",color:"grey",children:"Tags"})}),f.jsx(h.DropdownMenuContent,{minWidth:256,align:"start",border:!1,childrenFocusScope:!0,children:f.jsxs(h.ComboBox,{variant:"attached",children:[f.jsx(h.ComboBoxInput,{value:r,onValueChange:i,placeholder:"Search for a tag",autoFocus:!0}),f.jsx(h.ComboBoxContent,{paddingBlock:4,children:f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting tags"}),children:f.jsx($.Suspense,{fallback:f.jsx(h.Box,{padding:8,flexDirection:"column",gap:8,children:Qt.range(1,6).map(p=>f.jsx(h.Skeleton,{height:24,width:85},p))}),children:f.jsx(h$e,{searchTerm:r,setSearchTerm:i,onTagToggle:l,optimisticTagIds:s})})})}),f.jsx(h.ComboboxAction,{children:f.jsx(h.Button,{invisible:!0,startIcon:"edit",textWeight:"normal",color:"dark",onClick:d,children:"Manage tags"})})]})})]}),s.length>0&&f.jsx(h.ErrorBoundary,{children:f.jsx($.Suspense,{children:f.jsx(p$e,{optimisticTagIds:s,setOptimisticTagIds:u})})})]})}function h$e(e){const{onTagToggle:t,searchTerm:n,optimisticTagIds:r}=e,{tags:i}=Ih(),o=$.useMemo(()=>{const a=n.toLowerCase();return i.filter(s=>s.name.toLowerCase().includes(a))},[i,n]);return f.jsxs(f.Fragment,{children:[!o.length&&f.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"}),o.map(a=>{const s=r.includes(a.id);return f.jsx(h.ComboBoxItem,{value:a.id,onCheckedChange:()=>t(a),checked:s,children:f.jsx(h.Badge,{title:a.name,color:"purple",sx:{marginLeft:8,marginBottom:4,marginTop:4},size:"medium"})},a.id)})]})}function m$e(){const{uploaderId:e,onFilterChange:t}=Ct(),[n,r]=$.useState(""),[i,o]=$.useState(!1),[a,s]=$.useState();Ne.useOnChange(e,()=>{e||s(void 0)});function u(l){o(l),l||r("")}function c(l){s(l),t({uploaderId:l==null?void 0:l.id}),o(!1)}return f.jsxs(h.DropdownMenu,{open:i,onOpenChange:u,children:[f.jsx(h.DropdownMenuTrigger,{children:f.jsx(h.Button,{startIcon:"people",renderStartIcon:l=>a?f.jsx(h.Avatar,{imageUrl:a==null?void 0:a.uploadedAvatar,firstName:a.firstName,lastName:a.lastName,size:16,hasBorder:!1}):l,endIcon:"arrowDropDown",size:"small",color:"grey",children:(a==null?void 0:a.name)??"All uploaders"})}),f.jsx(h.DropdownMenuContent,{minWidth:256,align:"start",border:!1,childrenFocusScope:!0,children:f.jsxs(h.ComboBox,{variant:"attached",children:[f.jsx(h.ComboBoxInput,{value:n,onValueChange:r,placeholder:"Search for uploaders",autoFocus:!0}),f.jsx(h.ComboBoxContent,{paddingBlock:4,children:f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting uploaders"}),children:f.jsx($.Suspense,{fallback:f.jsx(v$e,{}),children:f.jsx(g$e,{searchTerm:n,setSearchTerm:r,onUploaderToggle:c,optimisticUploader:a})})})})]})})]})}function g$e(e){const{searchTerm:t,optimisticUploader:n,onUploaderToggle:r}=e,{uploaders:i}=s7(),o=$.useMemo(()=>{const a=t.toLowerCase();return Qt.sort(i.filter(s=>{var u;return s.name.toLowerCase().includes(a)||((u=s.email)==null?void 0:u.toLowerCase().includes(a))}),s=>(n==null?void 0:n.id)===(s==null?void 0:s.id)?0:1)},[i,n,t]);return o.length?f.jsx(f.Fragment,{children:o.map(a=>{const s=a.id===(n==null?void 0:n.id);return f.jsx(h.ComboBoxItem,{value:a.id,onCheckedChange:()=>s?r():r(a),checked:s,children:f.jsxs(h.Box,{alignItems:"center",padding:{top:8,bottom:8,left:16,right:16},gap:8,children:[f.jsx(h.Avatar,{firstName:a.firstName,lastName:a.lastName,imageUrl:a.uploadedAvatar,hasBorder:!1}),f.jsxs(h.Box,{display:"flex",flexDirection:"column",children:[f.jsx(h.Text,{color:"grey12",variant:"normal",children:a.name}),a.email&&f.jsx(h.Text,{color:"grey10",variant:"small",children:a.email})]})]})},a.id)})}):f.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No uploaders found"})}function v$e(){return f.jsx(h.Box,{padding:8,flexDirection:"column",gap:8,children:Qt.range(1,4).map(e=>f.jsx(h.Skeleton,{height:48,width:"full"},e))})}function y$e(){const{media:e,mediaTotal:t}=Ct(),n=Vs();return f.jsxs(h.Box,{alignItems:"center",gap:16,children:[n.isSelectAllEnabled&&f.jsx(h.Checkbox,{onCheckedChange:n.toggleSelectAll,checked:n.selectedCount>0,indeterminate:n.selectedCount!==t,onClick:r=>r.stopPropagation(),disabled:e.length===0}),e.length!==0&&f.jsx(b7,{count:t}),f.jsxs(h.Box,{gap:8,alignItems:"center",children:[f.jsx(h.Text,{children:"Filter:"}),f.jsx(f$e,{}),f.jsx(m$e,{}),f.jsx(A$e,{})]})]})}function E7(e){const{assetType:t,onSelectedChange:n,actionContainerRef:r}=e;return f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(h7,{}),children:f.jsx($.Suspense,{fallback:f.jsx(fEe,{actionContainerRef:r}),children:f.jsx($q,{children:f.jsx(nEe,{assetType:t,actionContainerRef:r,onSelectedChange:n,children:f.jsx(uEe,{children:f.jsx(b$e,{})})})})})})}function b$e(){const{media:e}=Ct(),t=f7();return f.jsx(hEe,{children:f.jsx(m7,{sidePane:t?void 0:f.jsx(c$e,{}),mediaActions:f.jsx(aEe,{}),mediaToolbar:f.jsx(y$e,{}),mediaList:e.length===0?f.jsx(iEe,{}):f.jsx(lEe,{})})})}var $7={};Object.defineProperty($7,"__esModule",{value:!0});var C$e=$7.confetti=$$e,S$e=["#a864fd","#29cdff","#78ff44","#ff718d","#fdff6a"];function _$e(e,t,n,r,i){return Array.from({length:t}).map(function(o,a){var s=document.createElement("div"),u=n[a%n.length];return s.style["background-color"]=u,s.style.width=r,s.style.height=i,s.style.position="absolute",s.style.willChange="transform, opacity",s.style.visibility="hidden",e.appendChild(s),s})}function I$e(e,t,n,r){var i=e*(Math.PI/180),o=t*(Math.PI/180);return{x:0,y:0,z:0,wobble:r()*10,wobbleSpeed:.1+r()*.1,velocity:n*.5+r()*n,angle2D:-i+(.5*o-r()*o),angle3D:-(Math.PI/4)+r()*(Math.PI/2),tiltAngle:r()*Math.PI,tiltAngleSpeed:.1+r()*.3}}function T$e(e,t,n,r){e.physics.x+=Math.cos(e.physics.angle2D)*e.physics.velocity,e.physics.y+=Math.sin(e.physics.angle2D)*e.physics.velocity,e.physics.z+=Math.sin(e.physics.angle3D)*e.physics.velocity,e.physics.wobble+=e.physics.wobbleSpeed,r?e.physics.velocity*=r:e.physics.velocity-=e.physics.velocity*n,e.physics.y+=3,e.physics.tiltAngle+=e.physics.tiltAngleSpeed;var i=e.physics,o=i.x,a=i.y,s=i.z,u=i.tiltAngle,c=i.wobble,l=o+10*Math.cos(c),d=a+10*Math.sin(c),p="translate3d("+l+"px, "+d+"px, "+s+"px) rotate3d(1, 1, 1, "+u+"rad)";e.element.style.visibility="visible",e.element.style.transform=p,e.element.style.opacity=1-t}function x$e(e,t,n,r,i,o){var a=void 0;return new Promise(function(s){function u(c){a||(a=c);var l=c-a,d=a===c?0:(c-a)/i;t.slice(0,Math.ceil(l/o)).forEach(function(p){T$e(p,d,n,r)}),c-a<i?requestAnimationFrame(u):(t.forEach(function(p){if(p.element.parentNode===e)return e.removeChild(p.element)}),s())}requestAnimationFrame(u)})}var w$e={angle:90,spread:45,startVelocity:45,elementCount:50,width:"10px",height:"10px",perspective:"",colors:S$e,duration:3e3,stagger:0,dragFriction:.1,random:Math.random};function E$e(e){return!e.stagger&&e.delay&&(e.stagger=e.delay),e}function $$e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Object.assign({},w$e,E$e(t)),r=n.elementCount,i=n.colors,o=n.width,a=n.height,s=n.perspective,u=n.angle,c=n.spread,l=n.startVelocity,d=n.decay,p=n.dragFriction,A=n.duration,m=n.stagger,v=n.random;e.style.perspective=s;var _=_$e(e,r,i,o,a),C=_.map(function(I){return{element:I,physics:I$e(u,c,l,v)}});return x$e(e,C,p,d,A,m)}function R$e(e){const{href:t}=e;return f.jsx(h.Box,{justifyContent:"center",padding:{block:6},children:f.jsxs(h.Text,{href:t,variant:"smallBold",color:"grey11",children:["Or watch our in-depth course",f.jsx(h.Icon,{name:"playCircle",color:"grey11",size:"small",sx:{marginLeft:4}})]})})}function O$e(e){const{step:t,stepIndex:n,isOpen:r,isStepComplete:i,onActionClick:o,onClose:a}=e,[s,u]=$.useState(c);function c(){return i?"Undo step":"Mark as done"}function l(){r&&u(c())}return f.jsxs(h.Dialog,{open:r,onOpenChange:a,onAnimationEnd:l,onAnimationStart:l,size:"small",children:[f.jsx(h.DialogHeader,{title:"Onboarding"}),f.jsxs(h.DialogContent,{children:[f.jsx(h.ScrollArea,{children:f.jsxs(h.Box,{as:"article",flexDirection:"column",padding:16,gap:16,children:[f.jsxs("section",{children:[f.jsxs(h.Text,{sx:{marginBottom:4},color:"purple9",variant:"bold",children:["Step ",n]}),f.jsx(h.Text,{variant:"h3",children:t.title}),t.content]}),t.videoUrl&&f.jsx(h.Video,{src:t.videoUrl,sizing:"contain",autoPlay:!0,loop:!0})]})}),f.jsxs(h.DialogActions,{children:[f.jsx(h.DialogCancelButton,{size:"medium",children:"Close"}),f.jsx(h.DialogActionButton,{size:"medium",onClick:o,children:s})]})]})]})}function F$e(e){const{steps:t,completedSteps:n,completedStepsCount:r,onToggleStep:i,tracking:o}=e,[a,s]=$.useState(!1),[u,c]=$.useState(t[0]);if(!u)return null;function l(m){return t.findIndex(({id:v})=>v===m)}function d(m){return n.includes(m.id)}function p(m){c(m),s(!0),o.track({event:"onboarding:step-opened",stepId:m.id,stepTitle:m.title,source:o.source})}function A(){u&&i(u),s(!1)}return f.jsxs(f.Fragment,{children:[f.jsx(O$e,{isOpen:a,step:u,stepIndex:l(u.id)+1,isStepComplete:d(u),onClose:()=>s(!1),onActionClick:A}),f.jsxs(h.DropdownMenu,{children:[f.jsx(h.DropdownMenuTrigger,{children:f.jsx(h.Button,{size:"large",color:"grey",sx:{width:"100%"},renderStartIcon:k$e,children:r>0?"Continue":"Start now"})}),f.jsxs(h.DropdownMenuContent,{side:"right",minWidth:256,collisionPadding:8,children:[f.jsx(h.DropdownMenuLabel,{children:f.jsx(h.Text,{variant:"small",color:"grey11",sx:{marginInline:8},children:"Progress"})}),t.map((m,v)=>{const _=d(m);return f.jsx(h.DropdownMenuItem,{onSelect:()=>p(m),description:m.description,completed:_,endAdornment:f.jsx(h.Icon,{name:"chevronRight",size:"small",color:"grey11"}),children:`${v+1} ${m.title}`},m.id)})]})]})]})}function k$e(){return f.jsx(h.Icon,{name:"arrowForward",size:"small",color:"grey11"})}function M$e(e){const{steps:t,completedSteps:n,tutorialLink:r,tracking:i,onToggleStep:o,onClose:a}=e;return f.jsx(h.Card,{color:"grey2",variant:"animated-light",paddingBlock:16,onClose:a,children:f.jsxs(h.CardContent,{children:[f.jsxs("div",{children:[f.jsx(h.Text,{variant:"bold",children:`Build your first page in ${t.length.toString()} simple
|
|
34
|
+
from ${a===1?"it":"them"}.`]})}),f.jsxs(h.DialogActions,{children:[f.jsx(h.DialogCancelButton,{}),f.jsx(h.DialogActionButton,{onClick:d,color:"tomato",loading:c,children:"Yes, I want to delete"})]})]})}function i$e(){const e=$.useContext(Ve.ErrorBoundaryContext);return f.jsx(h.Box,{flexDirection:"column",children:f.jsxs(h.BlankSlate,{children:[f.jsx(h.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed"}),f.jsx(h.BlankSlateTitle,{size:"big",children:"Oops!"}),f.jsx(h.BlankSlateDescription,{width:360,children:"We couldn't load your media tags."}),f.jsx(h.BlankSlateActions,{children:f.jsx(h.Button,{onClick:e==null?void 0:e.reset,size:"medium",children:"Try again"})})]})})}function o$e(e){const{id:t,config:n}=e;n.mediaLibrary||Jt("mediaLibrary");const{assetsApiBaseUrl:r,repository:i,authStrategy:o}=n;return pe.request(new URL(`tags/${t}`,r),{headers:{repository:i},method:"DELETE",credentials:pe.getRequestCredentials(o),okType:L.unknown()})}function a$e(e){const{id:t,name:n,config:r}=e;r.mediaLibrary||Jt("mediaLibrary");const{assetsApiBaseUrl:i,repository:o,authStrategy:a}=r;return pe.request(new URL(`tags/${t}`,i),{headers:{repository:o},method:"PATCH",credentials:pe.getRequestCredentials(a),body:{name:n},okType:L.unknown()})}function s$e(){return f.jsx(h.Box,{flexDirection:"column",gap:16,children:Qt.range(1,6).map(e=>f.jsxs(h.Box,{justifyContent:"space-between",children:[f.jsx(h.Skeleton,{height:24,width:85}),f.jsx(h.Skeleton,{height:24,width:45})]},e))})}function u$e(){const e=Pc(),{onFilesUpload:t,isUploading:n,tagManagerOpen:r}=Ct();return e.length===0&&r===!1?f.jsx(y7,{onFilesUpload:t,isUploading:n}):f.jsx(h.Box,{flexDirection:"column",backgroundColor:"grey1",width:"100%",padding:16,gap:16,borderRadius:{topLeft:8,topRight:8},children:r?f.jsx(e$e,{}):f.jsxs(f.Fragment,{children:[f.jsx(gEe,{}),f.jsx(bEe,{}),f.jsx(VEe,{})]})})}function c$e(){const e=Vs();return f.jsx(v7,{hasSelectedMedia:e.selectedCount!==0,children:f.jsx(u$e,{})})}const uC={all:{name:"All media",icon:"public"},image:{name:"Images",icon:"image"},video:{name:"Videos",icon:"videocam"},document:{name:"Documents",icon:"insertDriveFile"},audio:{name:"Audio files",icon:"musicNote"}},l$e=Object.entries(uC);function f$e(){const{assetType:e,initialAssetType:t,onFilterChange:n}=Ct(),[r,i]=$.useState(e);Ne.useOnChange(e,()=>{i(e)});const[o,a]=$.useState(!1);function s(p){a(!1),i(p),n({assetType:p})}const{icon:u,name:c}=uC[r],l=uC[t].name,d=t!=="all";return f.jsxs(h.DropdownMenu,{open:o,onOpenChange:a,children:[f.jsx(h.DropdownMenuTrigger,{disabled:d,children:f.jsx(d$e,{icon:u,isDropdownDisabled:d,buttonName:c,tooltipAssetTypeName:l})}),f.jsx(h.DropdownMenuContent,{minWidth:256,align:"start",childrenFocusScope:!0,children:f.jsx(f.Fragment,{children:l$e.filter(([p])=>p!==r).map(([p,{icon:A,name:m}])=>f.jsx(h.DropdownMenuItem,{startIcon:f.jsx(h.Icon,{name:A}),onSelect:()=>s(p),children:m},p))})})]})}const d$e=$.forwardRef(function(t,n){const{icon:r,isDropdownDisabled:i,buttonName:o,tooltipAssetTypeName:a,...s}=t;return f.jsx(h.Tooltip,{content:`You can only pick ${(a==null?void 0:a.toLocaleLowerCase())??"this type of media"}`,visible:i,children:f.jsx(h.Button,{startIcon:r,endIcon:"arrowDropDown",size:"small",color:"grey",disabled:i,ref:n,...s,children:o})})});function p$e(e){const{optimisticTagIds:t,setOptimisticTagIds:n}=e,{onFilterChange:r}=Ct(),{tags:i}=Ih(),o=$.useMemo(()=>rz.groupBy(i,s=>s.id),[i]);function a(s){const u=t.filter(c=>c!==s.id);n(u),r({tagIds:u})}return f.jsx(f.Fragment,{children:t.map(s=>{var c;const u=(c=o.get(s))==null?void 0:c[0];return u?f.jsx(h.Badge,{title:u.name,size:"medium",color:"purple",onClose:()=>a(u),selected:!0},u.id):null})})}function A$e(){const{setTagManagerOpen:e,tagIds:t,onFilterChange:n}=Ct(),[r,i]=$.useState(""),[o,a]=$.useState(!1),[s,u]=$.useState(t);Ne.useOnChange(JSON.stringify(t),()=>{u(t)});function c(p){a(p),p||i("")}function l(p){const A=s.includes(p.id)?t.filter(m=>m!==p.id):[...t,p.id];u(A),n({tagIds:A}),a(!1)}function d(){a(!1),e(!0)}return f.jsxs(f.Fragment,{children:[f.jsxs(h.DropdownMenu,{open:o,onOpenChange:c,children:[f.jsx(h.DropdownMenuTrigger,{children:f.jsx(h.Button,{startIcon:"label",endIcon:"arrowDropDown",size:"small",color:"grey",children:"Tags"})}),f.jsx(h.DropdownMenuContent,{minWidth:256,align:"start",border:!1,childrenFocusScope:!0,children:f.jsxs(h.ComboBox,{variant:"attached",children:[f.jsx(h.ComboBoxInput,{value:r,onValueChange:i,placeholder:"Search for a tag",autoFocus:!0}),f.jsx(h.ComboBoxContent,{paddingBlock:4,children:f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting tags"}),children:f.jsx($.Suspense,{fallback:f.jsx(h.Box,{padding:8,flexDirection:"column",gap:8,children:Qt.range(1,6).map(p=>f.jsx(h.Skeleton,{height:24,width:85},p))}),children:f.jsx(h$e,{searchTerm:r,setSearchTerm:i,onTagToggle:l,optimisticTagIds:s})})})}),f.jsx(h.ComboboxAction,{children:f.jsx(h.Button,{invisible:!0,startIcon:"edit",textWeight:"normal",color:"dark",onClick:d,children:"Manage tags"})})]})})]}),s.length>0&&f.jsx(h.ErrorBoundary,{children:f.jsx($.Suspense,{children:f.jsx(p$e,{optimisticTagIds:s,setOptimisticTagIds:u})})})]})}function h$e(e){const{onTagToggle:t,searchTerm:n,optimisticTagIds:r}=e,{tags:i}=Ih(),o=$.useMemo(()=>{const a=n.toLowerCase();return i.filter(s=>s.name.toLowerCase().includes(a))},[i,n]);return f.jsxs(f.Fragment,{children:[!o.length&&f.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No tags found"}),o.map(a=>{const s=r.includes(a.id);return f.jsx(h.ComboBoxItem,{value:a.id,onCheckedChange:()=>t(a),checked:s,children:f.jsx(h.Badge,{title:a.name,color:"purple",sx:{marginLeft:8,marginBottom:4,marginTop:4},size:"medium"})},a.id)})]})}function m$e(){const{uploaderId:e,onFilterChange:t}=Ct(),[n,r]=$.useState(""),[i,o]=$.useState(!1),[a,s]=$.useState();Ne.useOnChange(e,()=>{e||s(void 0)});function u(l){o(l),l||r("")}function c(l){s(l),t({uploaderId:l==null?void 0:l.id}),o(!1)}return f.jsxs(h.DropdownMenu,{open:i,onOpenChange:u,children:[f.jsx(h.DropdownMenuTrigger,{children:f.jsx(h.Button,{startIcon:"people",renderStartIcon:l=>a?f.jsx(h.Avatar,{imageUrl:a==null?void 0:a.uploadedAvatar,firstName:a.firstName,lastName:a.lastName,size:16,hasBorder:!1}):l,endIcon:"arrowDropDown",size:"small",color:"grey",children:(a==null?void 0:a.name)??"All uploaders"})}),f.jsx(h.DropdownMenuContent,{minWidth:256,align:"start",border:!1,childrenFocusScope:!0,children:f.jsxs(h.ComboBox,{variant:"attached",children:[f.jsx(h.ComboBoxInput,{value:n,onValueChange:r,placeholder:"Search for uploaders",autoFocus:!0}),f.jsx(h.ComboBoxContent,{paddingBlock:4,children:f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"Error getting uploaders"}),children:f.jsx($.Suspense,{fallback:f.jsx(v$e,{}),children:f.jsx(g$e,{searchTerm:n,setSearchTerm:r,onUploaderToggle:c,optimisticUploader:a})})})})]})})]})}function g$e(e){const{searchTerm:t,optimisticUploader:n,onUploaderToggle:r}=e,{uploaders:i}=s7(),o=$.useMemo(()=>{const a=t.toLowerCase();return Qt.sort(i.filter(s=>{var u;return s.name.toLowerCase().includes(a)||((u=s.email)==null?void 0:u.toLowerCase().includes(a))}),s=>(n==null?void 0:n.id)===(s==null?void 0:s.id)?0:1)},[i,n,t]);return o.length?f.jsx(f.Fragment,{children:o.map(a=>{const s=a.id===(n==null?void 0:n.id);return f.jsx(h.ComboBoxItem,{value:a.id,onCheckedChange:()=>s?r():r(a),checked:s,children:f.jsxs(h.Box,{alignItems:"center",padding:{top:8,bottom:8,left:16,right:16},gap:8,children:[f.jsx(h.Avatar,{firstName:a.firstName,lastName:a.lastName,imageUrl:a.uploadedAvatar,hasBorder:!1}),f.jsxs(h.Box,{display:"flex",flexDirection:"column",children:[f.jsx(h.Text,{color:"grey12",variant:"normal",children:a.name}),a.email&&f.jsx(h.Text,{color:"grey10",variant:"small",children:a.email})]})]})},a.id)})}):f.jsx(h.Text,{color:"grey9",variant:"small",sx:{marginBlock:8,marginInline:8},children:"No uploaders found"})}function v$e(){return f.jsx(h.Box,{padding:8,flexDirection:"column",gap:8,children:Qt.range(1,4).map(e=>f.jsx(h.Skeleton,{height:48,width:"full"},e))})}function y$e(){const{media:e,mediaTotal:t}=Ct(),n=Vs();return f.jsxs(h.Box,{alignItems:"center",gap:16,children:[n.isSelectAllEnabled&&f.jsx(h.Checkbox,{onCheckedChange:n.toggleSelectAll,checked:n.selectedCount>0,indeterminate:n.selectedCount!==t,onClick:r=>r.stopPropagation(),disabled:e.length===0}),e.length!==0&&f.jsx(b7,{count:t}),f.jsxs(h.Box,{gap:8,alignItems:"center",children:[f.jsx(h.Text,{children:"Filter:"}),f.jsx(f$e,{}),f.jsx(m$e,{}),f.jsx(A$e,{})]})]})}function E7(e){const{assetType:t,onSelectedChange:n,actionContainerRef:r}=e;return f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(h7,{}),children:f.jsx($.Suspense,{fallback:f.jsx(fEe,{actionContainerRef:r}),children:f.jsx($q,{children:f.jsx(nEe,{assetType:t,actionContainerRef:r,onSelectedChange:n,children:f.jsx(uEe,{children:f.jsx(b$e,{})})})})})})}function b$e(){const{media:e}=Ct(),t=f7();return f.jsx(hEe,{children:f.jsx(m7,{sidePane:t?void 0:f.jsx(c$e,{}),mediaActions:f.jsx(aEe,{}),mediaToolbar:f.jsx(y$e,{}),mediaList:e.length===0?f.jsx(iEe,{}):f.jsx(lEe,{})})})}var $7={};Object.defineProperty($7,"__esModule",{value:!0});var C$e=$7.confetti=$$e,S$e=["#a864fd","#29cdff","#78ff44","#ff718d","#fdff6a"];function _$e(e,t,n,r,i){return Array.from({length:t}).map(function(o,a){var s=document.createElement("div"),u=n[a%n.length];return s.style["background-color"]=u,s.style.width=r,s.style.height=i,s.style.position="absolute",s.style.willChange="transform, opacity",s.style.visibility="hidden",e.appendChild(s),s})}function I$e(e,t,n,r){var i=e*(Math.PI/180),o=t*(Math.PI/180);return{x:0,y:0,z:0,wobble:r()*10,wobbleSpeed:.1+r()*.1,velocity:n*.5+r()*n,angle2D:-i+(.5*o-r()*o),angle3D:-(Math.PI/4)+r()*(Math.PI/2),tiltAngle:r()*Math.PI,tiltAngleSpeed:.1+r()*.3}}function T$e(e,t,n,r){e.physics.x+=Math.cos(e.physics.angle2D)*e.physics.velocity,e.physics.y+=Math.sin(e.physics.angle2D)*e.physics.velocity,e.physics.z+=Math.sin(e.physics.angle3D)*e.physics.velocity,e.physics.wobble+=e.physics.wobbleSpeed,r?e.physics.velocity*=r:e.physics.velocity-=e.physics.velocity*n,e.physics.y+=3,e.physics.tiltAngle+=e.physics.tiltAngleSpeed;var i=e.physics,o=i.x,a=i.y,s=i.z,u=i.tiltAngle,c=i.wobble,l=o+10*Math.cos(c),d=a+10*Math.sin(c),p="translate3d("+l+"px, "+d+"px, "+s+"px) rotate3d(1, 1, 1, "+u+"rad)";e.element.style.visibility="visible",e.element.style.transform=p,e.element.style.opacity=1-t}function x$e(e,t,n,r,i,o){var a=void 0;return new Promise(function(s){function u(c){a||(a=c);var l=c-a,d=a===c?0:(c-a)/i;t.slice(0,Math.ceil(l/o)).forEach(function(p){T$e(p,d,n,r)}),c-a<i?requestAnimationFrame(u):(t.forEach(function(p){if(p.element.parentNode===e)return e.removeChild(p.element)}),s())}requestAnimationFrame(u)})}var w$e={angle:90,spread:45,startVelocity:45,elementCount:50,width:"10px",height:"10px",perspective:"",colors:S$e,duration:3e3,stagger:0,dragFriction:.1,random:Math.random};function E$e(e){return!e.stagger&&e.delay&&(e.stagger=e.delay),e}function $$e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Object.assign({},w$e,E$e(t)),r=n.elementCount,i=n.colors,o=n.width,a=n.height,s=n.perspective,u=n.angle,c=n.spread,l=n.startVelocity,d=n.decay,p=n.dragFriction,A=n.duration,m=n.stagger,v=n.random;e.style.perspective=s;var _=_$e(e,r,i,o,a),C=_.map(function(I){return{element:I,physics:I$e(u,c,l,v)}});return x$e(e,C,p,d,A,m)}function R$e(e){const{href:t}=e;return f.jsx(h.Box,{justifyContent:"center",padding:{block:6},children:f.jsxs(h.Text,{href:t,variant:"smallBold",color:"grey11",children:["Or watch our in-depth course",f.jsx(h.Icon,{name:"playCircle",color:"grey11",size:"small",sx:{marginLeft:4}})]})})}function O$e(e){const{step:t,stepIndex:n,isOpen:r,isStepComplete:i,onActionClick:o,onClose:a}=e,[s,u]=$.useState(c);function c(){return i?"Undo step":"Mark as done"}function l(){r&&u(c())}return f.jsxs(h.Dialog,{open:r,onOpenChange:a,onAnimationEnd:l,onAnimationStart:l,size:"small",children:[f.jsx(h.DialogHeader,{title:"Onboarding"}),f.jsxs(h.DialogContent,{children:[f.jsx(h.ScrollArea,{children:f.jsxs(h.Box,{as:"article",flexDirection:"column",padding:16,gap:16,children:[f.jsxs("section",{children:[f.jsxs(h.Text,{sx:{marginBottom:4},color:"purple9",variant:"bold",children:["Step ",n]}),f.jsx(h.Text,{variant:"h3",children:t.title}),t.content]}),t.videoUrl&&f.jsx(h.Video,{src:t.videoUrl,sizing:"contain",autoPlay:!0,loop:!0})]})}),f.jsxs(h.DialogActions,{children:[f.jsx(h.DialogCancelButton,{size:"medium",children:"Close"}),f.jsx(h.DialogActionButton,{size:"medium",onClick:o,children:s})]})]})]})}function F$e(e){const{steps:t,completedSteps:n,completedStepsCount:r,onToggleStep:i,tracking:o}=e,[a,s]=$.useState(!1),[u,c]=$.useState(t[0]);if(!u)return null;function l(m){return t.findIndex(({id:v})=>v===m)}function d(m){return n.includes(m.id)}function p(m){c(m),s(!0),o.track({event:"shared-onboarding:step-opened",stepId:m.id,stepTitle:m.title,source:o.source})}function A(){u&&i(u),s(!1)}return f.jsxs(f.Fragment,{children:[f.jsx(O$e,{isOpen:a,step:u,stepIndex:l(u.id)+1,isStepComplete:d(u),onClose:()=>s(!1),onActionClick:A}),f.jsxs(h.DropdownMenu,{children:[f.jsx(h.DropdownMenuTrigger,{children:f.jsx(h.Button,{size:"large",color:"grey",sx:{width:"100%"},renderStartIcon:k$e,children:r>0?"Continue":"Start now"})}),f.jsxs(h.DropdownMenuContent,{side:"right",minWidth:256,collisionPadding:8,children:[f.jsx(h.DropdownMenuLabel,{children:f.jsx(h.Text,{variant:"small",color:"grey11",sx:{marginInline:8},children:"Progress"})}),t.map((m,v)=>{const _=d(m);return f.jsx(h.DropdownMenuItem,{onSelect:()=>p(m),description:m.description,completed:_,endAdornment:f.jsx(h.Icon,{name:"chevronRight",size:"small",color:"grey11"}),children:`${v+1} ${m.title}`},m.id)})]})]})]})}function k$e(){return f.jsx(h.Icon,{name:"arrowForward",size:"small",color:"grey11"})}function M$e(e){const{steps:t,completedSteps:n,tutorialLink:r,tracking:i,onToggleStep:o,onClose:a}=e;return f.jsx(h.Card,{color:"grey2",variant:"animated-light",paddingBlock:16,onClose:a,children:f.jsxs(h.CardContent,{children:[f.jsxs("div",{children:[f.jsx(h.Text,{variant:"bold",children:`Build your first page in ${t.length.toString()} simple
|
|
35
35
|
steps`}),f.jsx(h.Text,{color:"grey11",variant:"small",children:"Render a live page with content coming from Prismic."})]}),f.jsx(h.ProgressBar,{value:n.length,max:t.length,displayLabel:!0,getValueLabel:(s,u)=>`${s}/${u}`}),f.jsx(F$e,{steps:t,completedSteps:n,completedStepsCount:n.length,onToggleStep:o,tracking:i}),r&&f.jsx(R$e,{href:r})]})})}function L$e(e,t){const n=j$e(e);return{steps:[{id:"createPrismicProject",title:"Create your Prismic project",description:"Create and set up your project",content:f.jsx(h.Text,{children:"A Prismic project is a space for managing and organizing the content of your website."})},{id:"chooseLocale",title:"Select your main locale",description:"Choose your first locale",content:f.jsx(h.Text,{children:"Locales allow you to create and manage multilingual versions of your content within a single Prismic project."})},{id:"createProject",title:`Create a ${n} Project`,description:"Create and set up your project",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1727768069/DEV_TOOLS/ONBOARDING_GUIDE/Pagebuilder_onboarding_step_3_puh6fx.mp4",content:f.jsx(h.Text,{children:"Now that you have a Prismic project to manage the content of your website, let's create the code project that will be querying your content."})},{id:"setupSliceMachine",title:"Set Up & run Slice Machine",description:"Prepare the code to fetch content",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1727768069/DEV_TOOLS/ONBOARDING_GUIDE/page_builder_onboarding_step_4_yl8fb8.mp4",content:f.jsxs(f.Fragment,{children:[f.jsx(h.Text,{children:`Slice Machine is the Prismic tool for creating your content models.
|
|
36
36
|
Install it in your ${n} project by running these commands: `}),f.jsx(DM,{code:`cd <your project name>
|
|
37
|
-
npx @slicemachine/init@latest --repository <my-project>`,language:"bash",title:"Terminal",showLineNumbers:!1})]})},{id:"createPageType",title:"Create a Page Type",description:"Build the structure of your page",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/Create_page_type_xdn13j.mp4",content:f.jsx(h.Text,{children:"A page type is a base content structure editors will use to create pages in the Page Builder (Prismic's content creation UI). A page type can be reusable (e.g., for multiple blog posts) or single (e.g., for a one-time page like the homepage)."})},{id:"codePage",title:"Code Your Page Type",description:"Prepare code to fetch content",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/Step2_code_your_page_jatiur.mp4",content:f.jsx(h.Text,{children:"Prepare your code to query the content from the Prismic API."})},{id:"createSlice",title:"Create a Slice",description:"Build a reusable website section",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918322/DEV_TOOLS/ONBOARDING_GUIDE/Step3_add_slice_qzmvxf.mp4",content:f.jsx(h.Text,{children:"Slices are website sections that can be reused on different pages with different content. Each slice has a code component automatically generated by Slice Machine. Start with a template and look at your code to see how it's structured."})},{id:"reviewAndPush",title:"Review and Push changes",description:"Enable editors to create content",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/DevTools_Squad_push_changes_ovvmul.mp4",content:f.jsx(h.Text,{children:"Your page types and slices currently exist only in your local project. Push them to your repository to make them available for your content editors."})},{id:"createContent",title:"Create Content",description:"Publish a page to the Prismic API",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918324/DEV_TOOLS/ONBOARDING_GUIDE/Cre%CC%81er_contenu_e%CC%81tape_4_z9vlzt.mp4",content:f.jsx(h.Text,{children:"In Prismic, content creation takes place in the Prismic Page Builder UI. Open the Page Builder and start creating your first page."})},{id:"renderPage",title:"Render Your Page",description:"View your page in the browser",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918321/DEV_TOOLS/ONBOARDING_GUIDE/Step_6_Render_Page_tnauh9.mp4",content:f.jsxs(h.Text,{children:["Now that your content is published, you can run your project in your terminal and visit the page on your local server (e.g.,"," ",f.jsx(h.Text,{component:"code",children:"localhost:3000/example-page"}),"). Your content should now be visible!"]})}],defaultCompletedStepIds:t?["createPrismicProject","chooseLocale"]:["createPrismicProject"],tutorialLink:{next:"https://prismic.dev/course/next",nuxt:"https://prismic.dev/course/nuxt",sveltekit:"https://prismic.dev/course/sveltekit",other:""}[e||"other"]}}function j$e(e){switch(e){case"next":return"Next.js";case"nuxt":return"Nuxt";case"sveltekit":return"SvelteKit";default:return""}}function U$e(e){const{onboardingState:t,tracking:n,onToggleStep:r,onToggleGuide:i}=e,{steps:o,defaultCompletedStepIds:a,tutorialLink:s}=L$e(t.context.framework,t.context.starterId||void 0),u=S(t.completedSteps),[c,l]=$.useState(t.isDismissed),{throwConfetti:d,confettiCannonRef:p,confettiContainerRef:A}=B$e(mp),{isFadedOut:m,isFading:v,fadeOut:_,resetFadeOut:C}=D$e(x,P$e,W$e);function I(){i(),C(),l(!1)}function x(){i(),l(!0)}async function g(y){const T=await r(y.id);T.includes(y.id)&&n.track({event:"onboarding:step-completed",stepId:y.id,stepTitle:y.title,source:n.source}),S(T).length===o.length&&(n.track({event:"onboarding:completed",source:n.source}),d(),_())}function S(y){const T=o.map(({id:w})=>w);return Array.from(new Set([...y.filter(w=>T.includes(w)),...a]))}return f.jsxs(f.Fragment,{children:[c&&f.jsx(h.ActionListItem,{textVariant:"normal",backgroundColor:"transparent",startIcon:"notStarted",onClick:I,children:"Get started"}),!c&&f.jsx(h.AnimatedElement,{enterDuration:0,exitDuration:NR,children:!m&&f.jsxs("div",{ref:A,style:{position:"relative"},children:[f.jsx(M$e,{steps:o,completedSteps:u,tutorialLink:s,tracking:n,onToggleStep:g,onClose:v?void 0:x}),f.jsx("div",{ref:p,style:{position:"absolute",bottom:0,left:0}})]})})]})}const mp={colors:["#8E44EC","#E8C7FF","#59B5F8","#C3EEFE"],elementCount:300,width:"8px",height:"8px",stagger:.2,startVelocity:35,spread:90,duration:3e3};function B$e(e){const t=$.useRef(null),n=$.useRef(null);return{throwConfetti:$.useCallback(()=>{const i=t.current,o=n.current;i&&o&&(o.style.overflow="hidden",C$e(i,e))},[e]),confettiCannonRef:t,confettiContainerRef:n}}const NR=400,P$e=mp.duration?mp.duration-NR:0,W$e=mp.duration?mp.duration:NR;function D$e(e,t,n){const[r,i]=$.useState(!1),[o,a]=$.useState(!1),s=$.useRef(!1),u=$.useCallback(()=>{a(!0),setTimeout(()=>{i(!0)},t),s.current||(setTimeout(()=>{e()},n),s.current=!0)},[e,t,n]),c=$.useCallback(()=>{i(!1),a(!1),s.current=!1},[]);return{isFadedOut:r,isFading:o,fadeOut:u,resetFadeOut:c}}const R7=$.createContext({editedUID:{current:!1},onEditUID:()=>{}});function O7(e){return Object.values(e.json).some(t=>{var n;return((n=t.uid)==null?void 0:n.type)==="UID"})}function K$e(e){const{content:t,customType:n}=e;return O7(n)&&!t.uid}function F7(e){const{documentId:t,documentsWithUid:n,uid:r}=e;return n.filter(i=>t!==i.id&&q$e({document:i,uid:r})&&N$e({...e,document:i}))}function N$e(e){const{customTypeId:t,languageId:n,document:r}=e,i=t===r.custom_type_id,o=n===r.language.id;return i&&o}function q$e(e){const{document:t,uid:n}=e,r=t.versions.filter(i=>i.uid===n);return r.length===0?!0:r.some(i=>i.status!=="archived")}function z0(e,t){return`${e}___${t}`}const k7=$.createContext({ids:[],isSelected:()=>!1,update:()=>{}});function H0(){return $.useContext(k7)}function nr(e){var t;return((t=e.config)==null?void 0:t.label)??(e.type==="Boolean"||e.type==="Separator"?void 0:e.fieldset)??e.type}const qR="...";function V$e(e,t,n=qR){var r,i;return(t?(r=e.config)==null?void 0:r.placeholder_true:(i=e.config)==null?void 0:i.placeholder_false)||n}function Wc(e,t=qR){var n;return((n=e.config)==null?void 0:n.placeholder)||t}function Q$e(e){var s;const{content:t,field:n,id:r,readOnly:i,onContentChange:o}=e,a=(t==null?void 0:t.value)??((s=n.config)==null?void 0:s.default_value)??!1;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"biToggle"}),f.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),f.jsxs(h.FieldControl,{children:[f.jsx(h.Box,{padding:4,alignItems:"center",children:f.jsx(h.Text,{children:V$e(n,a)})}),f.jsx(h.Switch,{id:r,sx:{alignSelf:"center",marginLeft:"auto",marginRight:12},checked:a,onCheckedChange:u=>{i||o(z$e(u))}})]})]})}function z$e(e){return{__TYPE__:"BooleanContent",value:e}}function H$e(e){const{id:t,field:n,content:r,onContentChange:i}=e;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"colorLens"}),f.jsx(h.FieldLabel,{id:t,children:nr(n)}),f.jsx(h.FieldControl,{children:f.jsx(h.Box,{padding:{left:4},alignItems:"center",children:f.jsx(h.ColorInput,{onValueChange:o=>i(Y$e(o)),value:r==null?void 0:r.value,"aria-labelledby":t,placeholder:Wc(n)})})})]})}function Y$e(e){return e===void 0?void 0:{__TYPE__:"FieldContent",type:"Color",value:e}}function G$e(e){const{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=i!=null&&i.value?ZC.dateFromISOString(i.value):void 0;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"dateRange"}),f.jsx(h.FieldLabel,{id:t,children:nr(r)}),f.jsx(h.FieldControl,{children:f.jsx(h.Box,{padding:{left:4,right:12},width:"100%",flexDirection:"column",justifyContent:"center",children:f.jsx(h.DateInput,{mode:"date","aria-labelledby":t,disabled:n,value:a,onValueChange:s=>o(J$e(s))})})})]})}function J$e(e){if(e)return{__TYPE__:"FieldContent",type:"Date",value:Z$e(e)}}function Z$e(e){const t=`${e.getFullYear()}`.padStart(4,"0"),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0");return`${t}-${n}-${r}`}const Qs=$.forwardRef(function(t,n){return f.jsx(h.TextInput,{padding:M7,...t,ref:n,sx:{...t.sx,alignSelf:"stretch"}})}),M7={input:{inline:4},adornment:{inline:12}},X$e=({provider:e})=>eRe[e.toLowerCase()]??f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_6524_22412)",children:f.jsx("path",{d:"M7.99992 1.33333C4.31992 1.33333 1.33325 4.32 1.33325 8C1.33325 11.68 4.31992 14.6667 7.99992 14.6667C11.6799 14.6667 14.6666 11.68 14.6666 8C14.6666 4.32 11.6799 1.33333 7.99992 1.33333ZM2.66659 8C2.66659 7.59333 2.71992 7.19333 2.80659 6.81333L5.99325 10V10.6667C5.99325 11.4 6.59325 12 7.32658 12V13.2867C4.70658 12.9533 2.66659 10.7133 2.66659 8ZM11.9266 11.6C11.7533 11.06 11.2599 10.6667 10.6599 10.6667H9.99325V8.66667C9.99325 8.3 9.69325 8 9.32658 8H5.32658V6.66667H6.65992C7.02658 6.66667 7.32658 6.36667 7.32658 6V4.66667H8.65992C9.39325 4.66667 9.99325 4.06667 9.99325 3.33333V3.06C11.9466 3.84667 13.3333 5.76667 13.3333 8C13.3333 9.38667 12.7933 10.6533 11.9266 11.6Z",fill:"#6F6E77"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6524_22412",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),eRe={codepen:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_6523_22409)",children:f.jsx("path",{d:"M15.9879 5.44292C15.9843 5.42352 15.981 5.40413 15.9759 5.38517C15.9726 5.37375 15.9688 5.36298 15.9651 5.35177C15.9597 5.33497 15.9541 5.31816 15.9474 5.30179C15.9427 5.29037 15.9373 5.27938 15.9321 5.26839C15.9248 5.25288 15.9173 5.23758 15.9086 5.22271C15.9026 5.21172 15.8957 5.20138 15.889 5.19082C15.8798 5.1766 15.8703 5.1626 15.8599 5.14902C15.8524 5.13889 15.8446 5.1292 15.8365 5.1195C15.8257 5.10657 15.8141 5.09429 15.8024 5.08223C15.7934 5.07318 15.7843 5.06413 15.7748 5.05529C15.7623 5.04387 15.7494 5.0331 15.7358 5.02276C15.7255 5.01479 15.7154 5.0066 15.7046 4.99927C15.7007 4.99647 15.6973 4.99324 15.6932 4.99065L8.38116 0.115543C8.15039 -0.0385144 7.84939 -0.0385144 7.61863 0.115543L0.306176 4.99044C0.302082 4.99302 0.29885 4.99626 0.294756 4.99906C0.283983 5.0066 0.273856 5.01457 0.263514 5.02254C0.250155 5.0331 0.237011 5.04387 0.224515 5.05486C0.215034 5.06348 0.205985 5.07253 0.19715 5.0818C0.185084 5.09386 0.17388 5.10614 0.162892 5.11907C0.154704 5.12877 0.146947 5.13846 0.139406 5.14924C0.129064 5.16281 0.119583 5.1766 0.110318 5.19104C0.103639 5.20159 0.0969593 5.21194 0.0907108 5.22293C0.0820922 5.23779 0.0745509 5.25309 0.0674405 5.26817C0.0622694 5.27916 0.0566673 5.29037 0.0521425 5.30157C0.0454631 5.31795 0.0396456 5.33475 0.0342589 5.35156C0.030596 5.36276 0.0267177 5.37375 0.0237011 5.38388C0.0187455 5.40284 0.0150825 5.42201 0.0116351 5.44162C0.00969592 5.45153 0.00732581 5.46123 0.00603302 5.47136C0.00215465 5.50109 0 5.53082 0 5.56121V10.4372C0 10.4673 0.00215465 10.4975 0.00646395 10.527C0.00797221 10.5378 0.0107733 10.5464 0.0129279 10.5568C0.0163753 10.5762 0.0193919 10.5955 0.0258558 10.6149C0.0288723 10.6257 0.0323198 10.6365 0.0366291 10.6483C0.0420157 10.6656 0.0474023 10.6828 0.0538662 10.6985C0.058391 10.7093 0.0646395 10.7201 0.0689488 10.7309C0.0760591 10.7459 0.0840314 10.761 0.09265 10.7768C0.098683 10.7875 0.105578 10.7983 0.112042 10.8082C0.121307 10.8233 0.131434 10.8362 0.142207 10.8491C0.149748 10.8599 0.157289 10.8685 0.165908 10.8789C0.176897 10.8918 0.187455 10.9047 0.200382 10.9162C0.209217 10.9248 0.21762 10.9355 0.228393 10.942C0.24089 10.9528 0.254249 10.9636 0.267177 10.9748C0.277519 10.9834 0.288723 10.9898 0.297342 10.9982C0.301436 11.0004 0.303806 11.0047 0.308115 11.0067L7.61863 15.8841C7.73412 15.9617 7.86641 16.0005 8 15.9998C8.13359 15.9992 8.26588 15.9611 8.38137 15.8841L15.6938 11.0092C15.6979 11.0067 15.7014 11.0036 15.7052 11.0008C15.716 10.9933 15.7261 10.9853 15.7365 10.9773C15.7498 10.9668 15.763 10.9558 15.7755 10.9446C15.785 10.9362 15.794 10.9269 15.8031 10.9179C15.8149 10.9058 15.8263 10.8935 15.8371 10.8806C15.8453 10.8709 15.8531 10.8612 15.8606 10.8509C15.8709 10.8373 15.8804 10.8233 15.8897 10.8091C15.8964 10.7987 15.903 10.7882 15.9093 10.7776C15.9179 10.7625 15.9254 10.7472 15.9328 10.7317C15.9379 10.7207 15.9433 10.7097 15.9481 10.6985C15.9548 10.6819 15.9604 10.6651 15.9657 10.6483C15.9694 10.6371 15.9733 10.6261 15.9765 10.6149C15.9815 10.596 15.9849 10.5766 15.9886 10.5572C15.9903 10.5473 15.9929 10.5376 15.994 10.5275C15.9978 10.4977 16 10.468 16 10.4376V5.5625C16 5.53212 15.9976 5.50238 15.994 5.47265C15.9922 5.46209 15.989 5.45347 15.9869 5.44292H15.9879ZM7.99978 9.62638L5.56826 8.00005L7.99978 6.37351L10.4315 8.00005L7.99978 9.62638ZM7.31245 5.17919L4.33171 7.17288L1.92561 5.56336L7.31245 1.97221V5.17919ZM3.09515 7.99984L1.37531 9.15021V6.84947L3.09515 7.99984ZM4.33171 8.82765L7.31245 10.8211V14.0281L1.92561 10.4365L4.33171 8.82722V8.82765ZM8.68733 10.8207L11.6681 8.82722L14.0744 10.4365L8.68733 14.0277V10.8207ZM12.9046 8.00027L14.6247 6.84969V9.15064L12.9046 7.99984V8.00027ZM11.6681 7.17288L8.68733 5.1794V1.97221L14.0744 5.56336L11.6681 7.17288Z",fill:"black"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22409",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),codesandbox:f.jsxs("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_6523_22406)",children:f.jsx("path",{d:"M6.24312 14.1129V8.35021L1.28724 5.49888V8.78388L3.55732 10.0999V12.5702L6.24312 14.1129ZM7.53036 14.1468L10.2658 12.571V10.0422L12.5506 8.71812V5.47426L7.53036 8.3727V14.1468ZM11.8904 4.36906L9.25164 2.83995L6.93472 4.18436L4.60022 2.8386L1.93795 4.38817L6.90626 7.24665L11.8904 4.36906ZM0 12.0115V4.02675L6.91821 0L13.8378 4.00984V11.9988L6.91805 15.985L0 12.0115Z",fill:"black"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22406",children:f.jsx("rect",{width:"13.8378",height:"16",fill:"white"})})})]}),dailymotion:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_6523_22345)",children:[f.jsx("path",{d:"M16 0H0V16H16V0Z",fill:"white"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.73038 10.3003C8.40789 10.6268 8.00377 10.7901 7.51804 10.7901C7.04025 10.7901 6.64411 10.6308 6.32956 10.3122C6.01503 9.99367 5.85776 9.58351 5.85776 9.08176C5.85776 8.60389 6.01901 8.20766 6.3415 7.89306C6.66401 7.57847 7.06016 7.42118 7.52998 7.42118C7.84849 7.42118 8.13715 7.49484 8.39594 7.64219C8.65474 7.78953 8.8558 7.99063 8.99913 8.2455C9.14246 8.50034 9.21412 8.77908 9.21412 9.08176C9.21412 9.56757 9.05287 9.97376 8.73038 10.3003ZM9.10662 3.58632V6.35792C8.82791 6.07918 8.53131 5.87808 8.21678 5.75463C7.90223 5.63118 7.54988 5.56946 7.1597 5.56946C6.53062 5.56946 5.96527 5.72476 5.4636 6.03538C4.96193 6.34597 4.57176 6.77007 4.29305 7.30768C4.01435 7.84528 3.875 8.44062 3.875 9.09369C3.875 9.76269 4.01236 10.366 4.28708 10.9036C4.5618 11.4412 4.95197 11.8653 5.45763 12.1759C5.96328 12.4865 6.54258 12.6418 7.19553 12.6418C8.14312 12.6418 8.80403 12.3312 9.17831 11.71H9.20218V12.5595H11.0894V3.15625L9.10662 3.58632Z",fill:"#232323"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22345",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),flickr:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("rect",{width:"16",height:"16",fill:"white"}),f.jsxs("g",{clipPath:"url(#clip0_6523_22379)",children:[f.jsx("path",{d:"M8.43286 7.78387C8.43286 9.321 9.67925 10.5674 11.2166 10.5674C12.7538 10.5674 13.9999 9.321 13.9999 7.78387C13.9999 6.24675 12.7538 5.00061 11.2166 5.00061C9.67925 5.00061 8.43286 6.24675 8.43286 7.78387Z",fill:"#FF0084"}),f.jsx("path",{d:"M2 7.78408C2 9.32121 3.24614 10.5676 4.78352 10.5676C6.32089 10.5676 7.56703 9.32121 7.56703 7.78408C7.56703 6.24695 6.32089 5.00081 4.78352 5.00081C3.24614 5.00081 2 6.24695 2 7.78408Z",fill:"#0063DC"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22379",children:f.jsx("rect",{width:"12",height:"5.568",fill:"white",transform:"translate(2 5)"})})})]}),giphy:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("rect",{width:"16",height:"16",fill:"#121212"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3.38889V12.2778H5.11111V3.38889H4Z",fill:"#00FF99"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6663 5.61111V12.2778H11.7774V5.61111H10.6663Z",fill:"#9933FF"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.75 3H4V4.11111H8.83333V3H7.75Z",fill:"#FFF35C"}),f.jsx("path",{d:"M9.00041 4.11111H7.33374H8.83374V3.77778L9.00041 4.11111Z",fill:"#999999"}),f.jsx("path",{d:"M8.83374 4.11111H7.33374L8.44485 3L8.83374 3.77778V4.11111Z",fill:"#999237"}),f.jsx("path",{d:"M10.6663 7.44444V5.77778L11.7774 6.33333L10.6663 7.44444Z",fill:"#5C1F99"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6667 11.8889H4V13H11.7778V11.8889H10.6667Z",fill:"#00CCFF"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6668 5.22222V4.11111H9.55569V3H8.44458V3.90739V5.0185V6.33333H9.55569H10.6668H11.7779V5.22222H10.6668Z",fill:"#FF6666"})]}),instagram:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[f.jsxs("g",{clipPath:"url(#clip0_6523_22356)",children:[f.jsx("mask",{id:"mask0_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:f.jsx("path",{d:"M4.70325 0.0949238C3.85627 0.1349 3.27778 0.270564 2.77227 0.468642C2.24897 0.672648 1.80537 0.946046 1.36408 1.38914C0.922279 1.83249 0.650958 2.27688 0.448504 2.8007C0.252489 3.3075 0.119662 3.88627 0.0822604 4.73377C0.045126 5.58283 0.0366102 5.85363 0.0407495 8.01522C0.0448729 10.1765 0.0544124 10.4479 0.0949012 11.2972C0.135388 12.1439 0.270546 12.7222 0.468623 13.2279C0.672886 13.7512 0.946004 14.1946 1.38935 14.6361C1.83245 15.0777 2.27708 15.3487 2.80115 15.5515C3.30744 15.7472 3.88644 15.8806 4.73369 15.9177C5.58273 15.9551 5.85379 15.9634 8.01483 15.9592C10.1769 15.9551 10.448 15.9456 11.297 15.9053C12.144 15.8648 12.722 15.7292 13.228 15.5316C13.7513 15.3268 14.1949 15.0542 14.6362 14.6109C15.0775 14.1678 15.3488 13.7231 15.5512 13.199C15.7473 12.6927 15.8806 12.1137 15.9175 11.267C15.9546 10.4174 15.9634 10.1461 15.9593 7.98478C15.9551 5.8232 15.9453 5.55239 15.9051 4.7036C15.8649 3.85609 15.7292 3.27811 15.5314 2.77208C15.3269 2.24877 15.054 1.80567 14.6109 1.36387C14.1678 0.922574 13.7232 0.650729 13.1991 0.448785C12.6926 0.252768 12.1138 0.119166 11.2666 0.0825425C10.4175 0.0448876 10.1465 0.0366393 7.98465 0.0407642C5.82336 0.0448892 5.5523 0.0541772 4.70325 0.0949238ZM4.79611 14.485C4.02004 14.4512 3.59863 14.3222 3.31776 14.2142C2.94585 14.0703 2.68046 13.8977 2.40114 13.6205C2.12234 13.3422 1.94928 13.0776 1.80408 12.7064C1.69497 12.4255 1.5637 12.0046 1.52734 11.2286C1.48788 10.3896 1.47886 10.1378 1.47498 8.01237C1.47086 5.88742 1.47859 5.63569 1.51522 4.79593C1.54848 4.02038 1.67822 3.59843 1.78602 3.31782C1.92993 2.94539 2.10196 2.68051 2.37973 2.4012C2.65801 2.12187 2.92263 1.94933 3.29402 1.80412C3.57463 1.69451 3.99555 1.56426 4.77134 1.52738C5.61084 1.48766 5.8623 1.47915 7.98723 1.47502C10.1127 1.47089 10.3644 1.47838 11.2042 1.51526C11.9797 1.54904 12.4016 1.67749 12.682 1.78607C13.0541 1.92998 13.3195 2.1015 13.5986 2.37979C13.8777 2.65808 14.0507 2.92218 14.1959 3.29435C14.3055 3.57418 14.4358 3.99562 14.4724 4.77117C14.5124 5.61068 14.5214 5.8624 14.5253 7.98736C14.5294 10.1128 14.5217 10.3646 14.4848 11.2038C14.451 11.9799 14.3223 12.4016 14.214 12.6827C14.0701 13.0543 13.898 13.3197 13.62 13.5991C13.342 13.8773 13.0774 14.0509 12.7057 14.1961C12.4256 14.3055 12.0042 14.436 11.2289 14.4729C10.3894 14.5123 10.1379 14.5214 8.01225 14.5252C5.88732 14.5294 5.63586 14.5214 4.79611 14.485ZM11.2854 3.74493C11.2864 4.27211 11.7151 4.69896 12.2422 4.69792C12.7697 4.69689 13.1965 4.2685 13.1957 3.74132C13.1947 3.21414 12.7661 2.78704 12.2386 2.78807C11.7112 2.7891 11.2844 3.21775 11.2854 3.74493ZM3.91277 8.00773C3.91714 10.2653 5.75063 12.0913 8.0076 12.0869C10.2648 12.0825 12.0919 10.2495 12.0875 7.99201C12.0831 5.73526 10.2494 3.90819 7.99188 3.91257C5.73489 3.91696 3.90837 5.75073 3.91277 8.00773ZM5.34648 8.0049C5.3439 6.53969 6.52978 5.34942 7.99471 5.34683C9.45991 5.344 10.6504 6.52937 10.6533 7.99484C10.6561 9.46031 9.47022 10.6503 8.00477 10.6532C6.53984 10.656 5.34932 9.47037 5.34648 8.0049Z",fill:"white"})}),f.jsxs("g",{mask:"url(#mask0_6523_22356)",children:[f.jsx("mask",{id:"mask1_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:f.jsx("path",{d:"M16.5905 -0.583628H-0.603516V16.6106H16.5905V-0.583628Z",fill:"white"})}),f.jsxs("g",{mask:"url(#mask1_6523_22356)",children:[f.jsx("mask",{id:"mask2_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:f.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),f.jsxs("g",{mask:"url(#mask2_6523_22356)",children:[f.jsx("mask",{id:"mask3_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:f.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),f.jsx("g",{mask:"url(#mask3_6523_22356)",children:f.jsx("rect",{x:"-0.688721",y:"-0.665792",width:"17.3622",height:"17.3622",fill:"url(#pattern0)"})})]})]})]})]}),f.jsxs("defs",{children:[f.jsx("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:f.jsx("use",{xlinkHref:"#image0_6523_22356",transform:"scale(0.000439947)"})}),f.jsx("clipPath",{id:"clip0_6523_22356",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})}),f.jsx("image",{id:"image0_6523_22356",width:"2273",height:"2275",xlinkHref:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEAlgCWAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMAEAMCAwYAAFokAABijgAAd23/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoXHh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoaJjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEICOMI4QMBIgACEQEDEQH/xADDAAEBAQEBAQEBAAAAAAAAAAAAAQU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IFSygWASygWCksUCC1LBLFCoFiyksUCC1LBKtgIFSyksUKgWC2Aiy1LBLLQILYBLLUstAgtgpLFSygtgpLFCoLUsAqC1LALUALYAKgAtSwCgEpYKAAASygUAAAAD13w+/w43CDXkAAAALAAAAAAAAACiAAALLAAAIAoAABFCAALKABIAoAAKIAEAUAAIBQABAAABRFJFEURSwAACWUACwAVAqWACWWgQKlVARYqVUCxYJVsBBalgCwVAqWUCwEWWpYBbAJYqWUCwVAsFJYqWKllAsFQWpYJZallAsFsWUlipVQWwCWWhUCpZQVAqWUFqWAVAoUlgFqUQUACwUAAAllAoAAAAHrvh38HJ4IaMwAABYAAAAAAAAAAoQAABZYAABFlAAAhZUAAAoAAkAoAAKECAFlAAQBZQAIAAAUQAAAABLAFACoAFgAqBQIBLLQEsUKgEsUKgVLALYBLLUsAWCksVKILYBLLQIFgpLFSygWCoFiwSy1LFSqgWCoLUsEstSqgWCkstSxQqC2LBLLQqASy0KgVLKC1LAKgUKSwC0CACgVLAKAASiC0AAAddx5n6A9HK6csy4/8jy7QAAAAAAAAAAAKAAAAAIABKAAAAACgAAAAAoAAQIAUAAAAAKAAAAAAAAAAAAAAAABAAAQAApBQAEAACBQpAAAgAWAAgoBABUABCgEFAQAEALUABABUKAQAIFCoACAC1AAQApBQAIKAQAAtgAAEAKAAAQUAAAKAAAgAL6Mz8/YNnk//9oACAECAAEFAPV9NHpS26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0DboG3QNugbdA26Bt0Dbo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jh02Jh02Jh02Jh02Jh02Jh02Jh02Jhz+j7fweHn/AFd+fp9v6v8Ape79DDf1JLc930/LnmGfj9H0+v7/APAf6c32/wAQ/wCR+n/5f9383/iNaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca041pxrTjWnGtONaca0415xrzjXnGvONeca8415xrzjXnGvONeca8415xrzjXnGvONeca8415xrzjXnGvONeYa8w15hrzDXmGvMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMPBMNeYa8w15hrzDXnGvONeca8415xrzjXnGvONeca041pxrTjWnGtONaca041pxrTjWnGtONacas41ZxqzjVnGrONWcas41ZxqzjVnGrONScak41JxqTjUUGooNRQaig1FBqKDTUGmoNNQaag01BpqDTUGmoNNQaag0lBpKDSUGkoNJQaSg0lBpKDSUGioNFQaKg0VBoqDRVGiqNFUaKo0FRoKjQVGgqNBUaCo0FRoKjQVGgqPXqj16o9eqPXqj16o9eqPXqj16o9eqPXqj1yo9cqPXKj1yo9cqPXLD1yw9csPXLD1yw9csPWrD1qw9asPWrD1qw9asPWrD1qw9asPWrD1qw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrB34/8Ay/z/AH/53yHY/wDU/E/0v+P7/wCz/9k="})]})]}),pinterest:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_6570_25513)",children:[f.jsx("rect",{width:"15.996",height:"16",rx:"2",fill:"#CC2127"}),f.jsx("path",{d:"M7.999 2C4.68555 2 2 4.68555 2 7.999C2 10.5406 3.58174 12.7102 5.81336 13.5861C5.76137 13.1121 5.71338 12.3843 5.83336 11.8644C5.94134 11.3964 6.53724 8.88285 6.53724 8.88285C6.53724 8.88285 6.35727 8.52291 6.35727 7.993C6.35727 7.15914 6.84119 6.53524 7.44309 6.53524C7.95501 6.53524 8.20297 6.91918 8.20297 7.3811C8.20297 7.89502 7.87502 8.66489 7.70705 9.37877C7.56507 9.97667 8.007 10.4626 8.5949 10.4626C9.66072 10.4626 10.4806 9.33878 10.4806 7.71505C10.4806 6.27929 9.44876 5.27345 7.975 5.27345C6.26729 5.27345 5.26546 6.55324 5.26546 7.87702C5.26546 8.39293 5.46342 8.94484 5.71138 9.24679C5.75937 9.30678 5.76737 9.35877 5.75337 9.41876C5.70738 9.60873 5.6074 10.0167 5.5874 10.0987C5.56141 10.2086 5.50142 10.2326 5.38743 10.1786C4.63756 9.83069 4.16964 8.73488 4.16964 7.85502C4.16964 5.96334 5.54541 4.22563 8.13298 4.22563C10.2146 4.22563 11.8304 5.70938 11.8304 7.69105C11.8304 9.75871 10.5266 11.4224 8.71688 11.4224C8.10898 11.4224 7.53708 11.1065 7.34111 10.7345C7.34111 10.7345 7.04116 11.8804 6.96717 12.1603C6.83119 12.6822 6.46526 13.3341 6.2213 13.732C6.7832 13.906 7.3791 14 7.997 14C11.3104 14 13.996 11.3144 13.996 8.001C13.998 4.68555 11.3124 2 7.999 2Z",fill:"white"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6570_25513",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),spotify:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_6523_22402)",children:f.jsx("path",{d:"M12.6609 7.10585C10.121 5.59751 5.93158 5.45882 3.50697 6.1947C3.11759 6.31287 2.70584 6.09298 2.5879 5.70373C2.46988 5.31411 2.68945 4.90265 3.07911 4.78429C5.86241 3.93945 10.4892 4.1026 13.4132 5.83828C13.7634 6.04622 13.8782 6.49851 13.6707 6.84813C13.4629 7.19833 13.0103 7.31376 12.6609 7.10585ZM12.5777 9.33993C12.3995 9.62908 12.0215 9.71979 11.7327 9.54223C9.61522 8.24063 6.38637 7.86357 3.88123 8.624C3.55636 8.72218 3.21323 8.53899 3.11455 8.21475C3.01666 7.88989 3.19992 7.54738 3.5242 7.44859C6.38597 6.58018 9.9436 7.00081 12.3756 8.49536C12.6644 8.67322 12.7553 9.05146 12.5777 9.33993ZM11.6136 11.4855C11.472 11.7177 11.1697 11.7904 10.9383 11.6489C9.08801 10.518 6.75909 10.2627 4.01637 10.8891C3.75207 10.9497 3.48866 10.7841 3.42838 10.5198C3.36785 10.2556 3.53284 9.99217 3.79772 9.93186C6.79916 9.2457 9.37381 9.54101 11.4506 10.8101C11.6822 10.9515 11.7551 11.254 11.6136 11.4855ZM8.00002 0.120623C3.64839 0.120623 0.120605 3.64834 0.120605 7.99989C0.120605 12.352 3.64839 15.8794 8.00002 15.8794C12.3517 15.8794 15.8794 12.352 15.8794 7.99989C15.8794 3.64834 12.3517 0.120623 8.00002 0.120623Z",fill:"#1ED760"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22402",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),twitter:f.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M14.3193 4.31285C14.329 4.45301 14.329 4.59317 14.329 4.73462C14.329 9.04475 11.0516 14.0156 5.05865 14.0156V14.0131C3.28832 14.0156 1.55478 13.508 0.0644531 12.5507C0.321873 12.5817 0.580582 12.5972 0.839937 12.5979C2.30703 12.5992 3.7322 12.1063 4.88639 11.1988C3.4922 11.1724 2.26961 10.2623 1.84252 8.93366C2.3309 9.02796 2.83413 9.00858 3.31349 8.87746C1.79349 8.57001 0.699937 7.23299 0.699937 5.68023C0.699937 5.66602 0.699937 5.65246 0.699937 5.63889C1.15284 5.89144 1.65994 6.0316 2.17865 6.0471C0.747034 5.08923 0.305743 3.18251 1.17026 1.69176C2.82445 3.7296 5.2651 4.96844 7.8851 5.09956C7.62252 3.96664 7.98123 2.77947 8.82768 1.98307C10.1399 0.748096 12.2038 0.811395 13.4374 2.12452C14.167 1.98048 14.8664 1.71243 15.5064 1.33264C15.2632 2.0877 14.7541 2.72909 14.0741 3.13665C14.7199 3.06044 15.3509 2.88734 15.9451 2.62316C15.5077 3.2794 14.9567 3.85103 14.3193 4.31285Z",fill:"#1D9BF0"})}),vimeo:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_6523_22340)",children:[f.jsx("path",{d:"M16 14.4C16 15.28 15.28 16 14.4 16H1.6C0.72 16 0 15.28 0 14.4V1.6C0 0.72 0.72 0 1.6 0H14.4C15.28 0 16 0.72 16 1.6V14.4Z",fill:"#1AB7EA"}),f.jsx("path",{d:"M13.9945 5.3084C13.9391 6.42815 13.1229 7.97447 11.5458 9.93402C9.91331 11.9736 8.52987 13 7.40928 13C6.70372 13 6.12267 12.3735 5.63846 11.1338C5.32027 9.98735 4.98824 8.85427 4.67005 7.70786C4.31036 6.46814 3.92299 5.84161 3.50796 5.84161C3.42495 5.84161 3.10676 6.02824 2.56721 6.38816L2 5.68165C2.59488 5.1751 3.17593 4.68187 3.75698 4.17532C4.54554 3.52214 5.14042 3.17555 5.54162 3.13556C6.46853 3.05557 7.04958 3.66877 7.27093 4.97514C7.50612 6.40149 7.67213 7.28129 7.75514 7.62788C8.01799 8.80095 8.32235 9.40081 8.64054 9.40081C8.88956 9.40081 9.26309 9.01423 9.77497 8.2544C10.273 7.49457 10.5497 6.90804 10.5774 6.50813C10.6465 5.85494 10.3837 5.52169 9.77497 5.52169C9.48444 5.52169 9.19392 5.58834 8.88956 5.70831C9.48444 3.84206 10.605 2.94893 12.2652 3.00225C13.4826 3.02891 14.0637 3.80207 13.9945 5.3084Z",fill:"white"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22340",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),youtube:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M15.6656 3.75817C15.4816 3.06609 14.9395 2.5211 14.2511 2.33614C13.0034 2 8 2 8 2C8 2 2.99666 2 1.7489 2.33614C1.06051 2.5211 0.518324 3.06609 0.334339 3.75817C0 5.01251 0 7.62963 0 7.62963C0 7.62963 0 10.2467 0.334339 11.5012C0.518324 12.1932 1.06051 12.7381 1.7489 12.9232C2.99666 13.2593 8 13.2593 8 13.2593C8 13.2593 13.0034 13.2593 14.2511 12.9232C14.9395 12.7381 15.4816 12.1932 15.6656 11.5012C16 10.2467 16 7.62963 16 7.62963C16 7.62963 16 5.01251 15.6656 3.75817Z",fill:"#ED1D24"}),f.jsx("path",{d:"M6.36353 10.0058L10.5453 7.62974L6.36353 5.25349V10.0058Z",fill:"white"})]})};function L7(e){const{debouncedUrl:t,content:n,onContentChange:r,selected:i}=e,o=$.useRef(null),[a,s]=$.useState(!1);Ne.useOnChange(t,()=>{var c;a&&(s(!1),(c=o.current)==null||c.reset())});function u(){s(!0),r(void 0)}return Fr.toURL(t)?t===(n==null?void 0:n.embed_url)?f.jsx(cC,{content:n,selected:i}):f.jsx(h.ErrorBoundary,{ref:o,renderError:tRe,onError:u,children:f.jsx($.Suspense,{fallback:n&&f.jsx(cC,{content:n,selected:i}),children:f.jsx(nRe,{url:t,selected:i,onContentChange:r})})}):null}function tRe(){return f.jsxs(h.Box,{backgroundColor:"grey2",borderRadius:6,padding:16,gap:4,children:[f.jsx(h.Icon,{name:"alert",size:"small",color:"grey11"}),f.jsx(h.Text,{variant:"smallBold",color:"grey11",children:"There is no embed data available."})]})}function cC(e){const{content:t,selected:n}=e,{thumbnail:r,provider:i,author:o,url:a,subtitle:s}=aRe(t);return f.jsxs(h.PreviewCard,{selected:n,children:[f.jsx(h.PreviewImage,{src:r.url,aspectRatio:r.aspectRatio}),f.jsxs(h.PreviewContent,{children:[f.jsxs(h.Box,{display:"flex",alignItems:"center",gap:4,children:[f.jsx(X$e,{provider:i}),f.jsx(h.Text,{variant:"smallBold",color:"grey12",noWrap:!0,children:i}),o&&f.jsx(h.Text,{variant:"small",color:"grey11",noWrap:!0,children:o})]}),f.jsx(h.Text,{variant:"smallBold",href:a,children:s})]})]})}function nRe(e){const{url:t,onContentChange:n,selected:r}=e,i=rRe({url:t,onContentChange:n});return f.jsx(cC,{content:i,selected:r})}function rRe(e){const{url:t,onContentChange:n}=e,{embedApiEndpoint:r}=Ee(),i=Ve.useRequest(iRe,[t,r]),o=Ne.useStableCallback(n);return $.useEffect(()=>{const a=h.handleEditorFlushSyncError(()=>o(i));return()=>{clearTimeout(a)}},[i,o]),i}function iRe(e,t){const n=new URL(t);return n.searchParams.set("url",e),pe.request(n,{okType:oRe(e)})}function oRe(e){return L.object({type:L.string(),version:L.string().or(L.number()).nullish(),title:L.string().nullish(),author_name:L.string().nullish(),author_url:L.string().nullish(),provider_name:L.string().nullish(),provider_url:L.string().nullish(),cache_age:L.string().or(L.number()).nullish(),thumbnail_url:L.string().nullish(),thumbnail_width:L.number().nullish(),thumbnail_height:L.number().nullish(),html:L.string().nullish()}).passthrough().transform(t=>{const n={embed_url:e};return{...n,__TYPE__:"EmbedContent",type:t.type,version:t.version,title:t.title,author_name:t.author_name,author_url:t.author_url,provider_name:t.provider_name,provider_url:t.provider_url,cache_age:t.cache_age,thumbnail_url:t.thumbnail_url,thumbnail_width:t.thumbnail_width,thumbnail_height:t.thumbnail_height,html:t.html,all:{...n,...t}}})}function aRe(e){let t="";switch(e.type){case"video":t=e.title??"";break;case"photo":t=`View this post${e.provider_name?` on ${e.provider_name}`:""}`;break;default:t=`Open${e.provider_name?` on ${e.provider_name}`:""}`}return{url:e.embed_url,thumbnail:{url:e.thumbnail_url??"",aspectRatio:e.type==="video"?"16:9":"1:1"},provider:e.provider_name??"",author:e.author_name??"",subtitle:t}}function sRe(e){const{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=Ne.useDebounceState({initialState:(i==null?void 0:i.embed_url)??"",startTransition:$.startTransition});function s(u){a.set(u),Fr.toURL(u)||o(void 0)}return f.jsxs(h.Field,{footer:Fr.toURL(a.value)&&f.jsx(h.FieldFooter,{children:f.jsx(L7,{debouncedUrl:a.debouncedValue,content:i,onContentChange:o})}),children:[f.jsx(h.FieldIcon,{name:"cloud"}),f.jsx(h.FieldLabel,{htmlFor:t,children:nr(r)}),f.jsx(h.FieldControl,{children:f.jsx(Qs,{id:t,readOnly:n,placeholder:Wc(r),value:a.value,onValueChange:s,variant:Fr.toURL(a.value)?"link":"normal",endAdornment:f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:()=>s("")})})})]})}function j7(e){return!(e.lat>85||e.lat<-85||e.lng>180||e.lng<-180)}function Gb(e){const t=/^.*@(-?\d+.\d+),(-?\d+.\d+).*$/,n=e.match(t);if(!n)return;const r=parseFloat(n[1]??""),i=parseFloat(n[2]??"");if(isNaN(r)||isNaN(i))return;const o={lat:r,lng:i};if(j7(o))return o}function XF(e){return e?`${e.lat}, ${e.lng}`:""}function ek(e){const t=/\(?([\d|.|-]*)[\s+]*,[\s]*([\d|.|-]*)\)?/,n=e.match(t);if(!n)return Gb(e);const r=parseFloat(n[1]??""),i=parseFloat(n[2]??"");if(isNaN(r)||isNaN(i))return Gb(e);const o={lat:r,lng:i};return j7(o)?o:Gb(e)}function uRe(e){const{field:t,id:n,readOnly:r,...i}=e,{onValueChange:o,displayedValue:a,onBlur:s,clearValue:u,isValidCoordinates:c}=cRe(i);return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"place"}),f.jsx(h.FieldLabel,{htmlFor:n,children:nr(t)}),f.jsx(h.FieldControl,{children:f.jsx(Qs,{id:n,onValueChange:o,placeholder:qR,readOnly:r,value:a,onBlur:s,variant:c?"link":"normal",endAdornment:f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:u})})})]})}function cRe(e){const{content:t,onContentChange:n}=e,r=XF(t==null?void 0:t.position),[i,o]=$.useState(r);function a(){const c=ek(i);if(!c)return o(""),n(void 0);const{lat:l,lng:d}=c;o(XF({lat:l,lng:d})),n({__TYPE__:"GeoPointContent",position:{lat:l,lng:d}})}function s(){o(""),n(void 0)}const u=!!ek(i);return{displayedValue:i,isValidCoordinates:u,onValueChange:o,onBlur:a,clearValue:s}}function U7(e){const{fieldLabel:t,imageLabel:n=[]}=e;return f.jsxs(h.CardHeaderTitle,{children:[f.jsx(h.Text,{variant:"bold",noWrap:!0,children:$p.overflow(t,30)}),n.length!==0&&f.jsx(h.Text,{color:"grey11",noSelect:!0,children:` • ${n.join(" • ")}`})]})}function B7(e){const{fieldLabel:t,isUpdating:n,readOnly:r,onMediaDialogOpenChange:i}=e;return f.jsxs(f.Fragment,{children:[f.jsx(h.CardHeader,{sx:{flexWrap:"wrap"},children:f.jsx(U7,{fieldLabel:t})}),f.jsx(h.CardContent,{children:f.jsx(h.Card,{color:"grey2",variant:"dashed",paddingBlock:12,radius:4,sx:{width:"100%"},children:f.jsx(h.CardContent,{children:f.jsxs(h.BlankSlate,{variant:"horizontal",children:[f.jsx(h.BlankSlateIcon,{name:"cloudUpload",lineColor:"purple9",backgroundColor:"purple4",size:"small"}),f.jsx(h.BlankSlateTitle,{children:n?"Preparing your image...":"You haven't selected an image"}),!r&&f.jsx(h.BlankSlateActions,{children:f.jsx(h.Button,{disabled:n,onClick:()=>i(!0),size:"medium",children:"Select image"})})]})})})})]})}const lRe=Ap({id:Yo(),width:Km(),height:Km(),urls:Ap({full:Yo(),small:Yo().transform(EEe)}),alt_description:Yo().optional(),description:Yo().nullable()}),fRe=Ap({results:jq(lRe)}).transform(e=>e.results);function P7(e,t){const n=new URL("search/photos",e);return n.searchParams.set("page","1"),n.searchParams.set("per_page","28"),n.searchParams.set("query",t),pe.request(n,{okType:fRe})}Ve.cache.registerFetcherConfig(P7,{cacheCapacity:5,revalidationStrategy:{type:"never"}});function dRe(e,t){const n=$.useRef(),r=Ee(),i=Ve.useRequest(P7,[e,t]);return Ne.useDebounce(t,1e3,()=>{var o;n.current&&t!==n.current&&((o=r.onAnalyticsEvent)==null||o.call(r,"Unsplash Image Searched")),n.current=t}),i}function pRe(e){const{onSelectedChange:t}=e,[n,r]=$.useTransition(),i=Ne.useDebounceState({initialState:"",ms:300,startTransition:r});return f.jsxs(h.Box,{flexDirection:"column",gap:16,width:"100%",position:"relative",children:[f.jsx(h.FormSearchInput,{value:i.value,placeholder:"Search on Unsplash.com",onValueChange:i.set}),f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(h7,{}),children:f.jsx($.Suspense,{fallback:f.jsx(hRe,{}),children:f.jsx(ARe,{term:i.debouncedValue,loading:n,onSelectedChange:t})})})]})}function ARe(e){const{term:t,onSelectedChange:n,loading:r}=e,{media:i,toggleSelected:o,selectedImageId:a}=mRe({term:t,onSelectedChange:n});return f.jsxs(f.Fragment,{children:[i.length>0&&f.jsx(W7,{children:i==null?void 0:i.map(s=>{const c=new URL(s.urls.full).searchParams.get("fm")??"jpg";return f.jsx(h.MediaCard,{url:s.urls.small,filename:s.description??"Unsplash Image",selected:a===s.id,onCardClick:()=>o(s),onCheckedChange:()=>o(s),extension:c,kind:"image",width:s.width,height:s.height,loading:r},s.id)})}),i.length===0&&f.jsx(p7,{})]})}function W7(e){const{children:t}=e;return f.jsx(h.ScrollArea,{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(min(100%, 250px), 1fr))",gap:16,padding:2,paddingBottom:16,position:"relative",width:"100%"},children:t})}function hRe(){return f.jsx(W7,{children:Qt.range(1,24).map(e=>f.jsx(C7,{},e))})}function mRe(e){var c;const{term:t,onSelectedChange:n}=e,{unsplashApiBaseUrl:r}=Ee(),i=dRe(r,t||"citrus fruit"),o=(c=i==null?void 0:i[0])==null?void 0:c.id,[a,s]=$.useState();$.useEffect(()=>{n==null||n([]),s(void 0)},[o,n]);function u(l){if(l.id===a)return s(void 0),n==null?void 0:n([]);s(l.id),n==null||n([{...l,url:l.urls.full,alt:l.alt_description}])}return{media:i,toggleSelected:u,selectedImageId:a}}function VR(e){const{open:t,onOpenChange:n,onMediaSelected:r,assetType:i}=e,o=Ee(),a=o.mediaLibrary,[s,u]=$.useState(()=>a?"media":"unsplash"),[c,l]=$.useState(new Set),[d,p]=$.useState([]),A=c.size+d.length,m=Ve.useFetcherData(mi);$.useEffect(()=>{!t||!a||a7({config:o,assetType:i})},[t,o,i,a]);function v(S){if(S!=="media"&&S!=="unsplash")throw new Error(`Invalid option ${S}.`);u(S)}function _(S){S||l(new Set),n(S)}const C=qwe({assetType:i,mediaDialogOpen:t});function I(){var S;if(s==="unsplash"){const y=d[0];if(!y)return;r(y),(S=o.onAnalyticsEvent)==null||S.call(o,"Unsplash Image Added")}else if(s==="media"){const w=m.flatMap(O=>O.items).filter(O=>c.has(O.id))[0];if(!w)return;r(w),C(w.id)}_(!1)}function x(){if(A===0)return"Select a media item to add to the page";if(A>1)return"Only one media item can be added to the page"}const{containerRef:g}=h.useAlert();return f.jsxs(h.Dialog,{open:t,onOpenChange:_,size:{width:"min(calc(100% - 48px), 2000px)",height:"calc(100% - 30px)"},position:"center",onPointerDownOutside:S=>{g&&Ne.refContainsTarget(g,S.target)&&S.preventDefault()},children:[f.jsx(h.DialogHeader,{icon:"image",title:"Media library"}),f.jsxs(h.DialogOptions,{value:s,onValueChange:v,padding:"small",width:"auto",children:[a&&f.jsx(h.DialogOptionsItem,{value:"media",icon:"photo"}),f.jsx(h.DialogOptionsItem,{value:"unsplash",icon:"unsplash"})]}),f.jsx(h.DialogContent,{children:f.jsxs(h.Box,{flexDirection:"column",flexGrow:1,overflow:"hidden",children:[f.jsx(wq,{}),f.jsxs(h.Box,{overflow:"hidden",backgroundColor:"grey2",padding:{top:16,inline:16},flexGrow:1,children:[s==="media"&&f.jsx(E7,{assetType:i,onSelectedChange:l}),s==="unsplash"&&f.jsx(pRe,{onSelectedChange:p})]})]})}),f.jsxs(h.DialogActions,{children:[f.jsx(h.DialogCancelButton,{}),f.jsx(h.DialogActionButton,{onClick:I,disabled:A!==1,tooltipLabel:x(),children:"Add to page"})]})]})}const D7=$.forwardRef(function(t,n){const{isMediaDialogOpen:r,selected:i,children:o,onMediaSelected:a,onMediaDialogOpenChange:s}=t;return f.jsxs(h.Card,{ref:n,color:i?"indigo2":"grey2",variant:i?"selected":"dashed",paddingBlock:12,radius:4,children:[o,f.jsx(VR,{open:r,onOpenChange:s,onMediaSelected:a,assetType:"image"})]})});function K7(e){const{contentView:t,croppedImage:n}=e,{width:r,height:i,x:o,y:a,zoom:s}=n,u=vRe({origin:t.origin,croppedImage:n});return{...t,width:r,height:i,url:u,edit:{...t.edit,zoom:s,crop:{x:o,y:a}}}}function gRe(e){var c,l,d;const{field:t,content:n,thumbnail:r,croppedImage:i}=e;if(r===md)return N7({content:n,croppedImage:i});const o=Ce.isImageContent(n),a=(l=(c=t==null?void 0:t.config)==null?void 0:c.thumbnails)==null?void 0:l.find(p=>p.name===r),s=o?(d=n.thumbnails)==null?void 0:d[r]:void 0;if(!a||!s)return n;const u=K7({contentView:s,croppedImage:i});return u.url===s.url?n:{...n,thumbnails:o?{...n.thumbnails,[r]:u}:void 0}}function N7(e){const{content:t,croppedImage:n}=e,r=K7({contentView:t,croppedImage:n});return r.url===t.url?t:{...t,...r}}function vRe(e){const{origin:t,croppedImage:n}=e,{x:r,y:i,width:o,height:a,cropHeight:s,cropWidth:u}=n,c=new URL(t.url),l=t.height!==a||t.width!==o;if(r!==0||i!==0||s!==t.height||u!==t.width){const p=[r,i,u,s].map(Math.round).join(",");c.searchParams.set("rect",p),c.searchParams.set("w",o.toString()),c.searchParams.set("h",a.toString())}return l&&(c.searchParams.set("w",o.toString()),c.searchParams.set("h",a.toString())),c.toString()}function yRe(e){const{edit:{crop:{x:t,y:n},zoom:r},width:i,height:o,origin:{width:a,height:s}}=e;let u,c;const l=a/s,d=i/o;return d>=l?(u=a/r,c=u/d):(c=s/r,u=c*d),{x:t,y:n,width:i,height:o,zoom:r,cropWidth:u,cropHeight:c}}function bRe(e){const{selectedImage:t,imageCrop:n,setImageCrop:r}=e,{width:i,height:o,zoom:a,cropHeight:s,cropWidth:u}=n,c=t.contentView,l={x:n.x,y:n.y,width:u,height:s},[d,p]=$.useState(),A=(c==null?void 0:c.origin.url)??"",m=!(t!=null&&t.thumbnail.height&&(t!=null&&t.thumbnail.width));function v(g,S){const y=parseInt(S);isNaN(y)||y<=0||!m||r({...n,[g]:y})}function _(g){r({...n,cropWidth:g.width,cropHeight:g.height,x:g.x,y:g.y})}function C(g){r({...n,zoom:g})}function I(){p(Vh),r({...n,...Vh})}function x(){c&&(p(Vh),r({...n,...Vh,zoom:1,cropWidth:c.width,cropHeight:c.height}))}return f.jsxs(h.Box,{padding:{inline:24,block:16},flexDirection:"column",gap:16,height:"100%",overflowY:"auto",alignItems:"center",children:[f.jsxs(h.Box,{gap:8,height:32,alignItems:"flex-start",width:"100%",children:[f.jsx(h.Tooltip,{content:"Center",children:f.jsx(h.Button,{color:"grey",size:"medium",startIcon:"centerFocusWeak",onClick:I})}),f.jsx(h.Tooltip,{content:"Cover",children:f.jsx(h.Button,{color:"grey",size:"medium",startIcon:"zoomOutMap",onClick:x})}),f.jsx(h.Separator,{orientation:"vertical"}),f.jsx(h.FormInput,{prefix:"W",prefixTooltip:"Width",placeholder:"width",type:"number",size:"medium",value:String(i),onValueChange:g=>v("width",g),sx:{width:100},disabled:!m}),f.jsx(h.FormInput,{prefix:"H",prefixTooltip:"Height",placeholder:"height",type:"number",size:"medium",value:String(o),onValueChange:g=>v("height",g),sx:{width:100},disabled:!m})]}),f.jsx(h.Cropper,{image:A,aspect:i/o,crop:d??{x:0,y:0},onCropChange:p,zoom:a,onZoomChange:C,onCropAreaChange:(g,S)=>_(S),initialCroppedAreaPixels:l}),f.jsx(h.Box,{width:"100%",maxWidth:320,children:f.jsx(h.Slider,{min:1,max:3,step:.01,value:[a],onValueChange:([g])=>C(g??1)})})]})}const Vh={x:0,y:0};function CRe(e){const{trigger:t,initialImages:n,renderTooltip:r}=e,{open:i,onOpenChange:o,ready:a,option:s,selectedImage:u,croppedImage:c,setCroppedImage:l,setReady:d,setOption:p}=SRe(e);return f.jsxs(h.Dialog,{trigger:t,onAnimationEnd:()=>d(!0),open:i,onOpenChange:o,renderTooltip:r,children:[f.jsx(h.DialogHeader,{icon:"photo",title:"Image editor"}),f.jsx(h.DialogOptions,{value:String(s),onValueChange:A=>p(Number(A)),children:n.map((A,m)=>f.jsx(h.DialogOptionsItem,{value:String(m),icon:"photo",title:A.labels[0]??"Main",subtitle:A.labels[1]??""},A.thumbnail.name))}),u&&f.jsx(h.DialogContent,{children:a&&c&&f.jsx(bRe,{selectedImage:u,imageCrop:c,setImageCrop:l},u.thumbnail.name)})]})}function SRe(e){const{initialImages:t,initialOption:n,onClose:r}=e,[i,o]=$.useState(_),[a,s]=$.useState(!1),[u,c]=$.useState(!1),[l,d]=$.useState(n);function p(C){C?(d(n),o(_())):(c(!1),r({option:l,croppedImages:i})),s(C)}const A=t[l],m=i[(A==null?void 0:A.thumbnail.name)??""];function v(C){if(!A)return;const I=A.thumbnail.name;o({...i,[I]:C})}function _(){return t.reduce((C,I)=>(I.contentView&&(C[I.thumbnail.name]=yRe(I.contentView)),C),{})}return{open:a,ready:u,option:l,selectedImage:A,croppedImage:m,setCroppedImage:v,setReady:c,setOption:d,onClose:r,onOpenChange:p}}function _Re(e){const{readOnly:t,altText:n,selected:r,onValueChange:i}=e,o=$.useId();return f.jsxs(h.Field,{selected:r,children:[f.jsx(h.FieldLabel,{htmlFor:o,children:"Alt text"}),f.jsx(h.FieldControl,{children:f.jsx(h.Box,{flexGrow:1,height:40,children:f.jsx(Qs,{id:o,placeholder:"Short description for the visually impaired",readOnly:t,value:n,padding:{input:{inline:12}},onValueChange:i})})})]})}function IRe(e){const{fieldLabel:t,imageLabel:n,initialImages:r,page:i,displaySeparator:o=!0,isSVGContentView:a,visibility:s,onClear:u,onCropperDialogClose:c,onMediaDialogOpenChange:l}=e;return f.jsxs(h.Box,{display:"flex",flexDirection:"column",gap:12,children:[f.jsxs(h.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:4,children:[f.jsx(U7,{fieldLabel:t,imageLabel:n}),f.jsxs(h.CardHeaderActions,{sx:{visibility:s},children:[f.jsx(CRe,{trigger:f.jsx(h.Button,{startIcon:"crop",disabled:a,hiddenLabel:"Crop & Resize"}),renderTooltip:d=>f.jsx(h.Tooltip,{content:"Crop & Resize",children:d}),initialImages:r,initialOption:i,onClose:c}),f.jsx(h.Tooltip,{content:"Replace",children:f.jsx(h.Button,{startIcon:"imageSearch",hiddenLabel:"Replace",onClick:()=>l(!0)})}),f.jsx(h.Tooltip,{content:"Clear",children:f.jsx(h.Button,{onClick:u,startIcon:"delete",hiddenLabel:"Clear"})})]})]}),o&&f.jsx(h.Separator,{style:"dashed",decorative:!0})]})}function ju(e){const{description:t,largeIconName:n="public",loading:r,error:i,onEdit:o,onUnlink:a}=e,s=i?f.jsx($Re,{}):f.jsx(ERe,{...e,largeIconName:n,loading:r});return f.jsx(h.Card,{sx:{width:420},children:f.jsxs(h.CardContent,{gap:12,children:[f.jsxs(h.Box,{display:"grid",gridTemplateColumns:"max-content 1fr min-content",gridTemplateRows:"1fr",gap:8,children:[s,f.jsxs(h.ButtonGroup,{size:"medium",color:"grey",sx:{justifySelf:"end"},children:[o&&f.jsx(h.Button,{startIcon:"edit",onClick:o}),a&&f.jsx(h.Button,{startIcon:"linkOff",onClick:a})]})]}),!i&&f.jsx(wRe,{description:t,loading:r})]})})}function TRe(e){const{url:t,title:n,loading:r}=e;return r?f.jsx(q7,{height:16,width:80}):n?f.jsx(h.Text,{variant:"smallBold",href:t==null?void 0:t.toString(),children:n}):null}function xRe(e){const{subTitle:t,loading:n}=e;return n?f.jsx(h.Box,{padding:{block:2},children:f.jsx(q7,{height:12,width:60})}):t?f.jsx(h.Text,{variant:"small",color:"grey11",noWrap:!0,children:t}):null}function wRe(e){const{description:t,loading:n}=e;return!t||n?null:f.jsx(h.Text,{variant:"small",color:"grey11",children:t})}function ERe(e){const{largeIconName:t,title:n,url:r,loading:i,subTitle:o}=e;return f.jsxs(f.Fragment,{children:[f.jsx(h.ConjoinedIcons,{largeIconName:t,smallIconName:"link"}),f.jsxs(h.Box,{flexDirection:"column",minWidth:0,children:[f.jsx(TRe,{title:n,url:r,loading:i}),f.jsx(xRe,{subTitle:o,loading:i})]})]})}function $Re(){return f.jsxs(h.Box,{alignItems:"center",gap:8,children:[f.jsx(h.CircleIcon,{name:"alert",color:"tomato",size:"small"}),f.jsx(h.Text,{color:"tomato11",children:"Failed to load linked document data"})]})}function q7(e){const{width:t,height:n}=e;return f.jsx(h.Skeleton,{color:"grey5",borderRadius:6,width:t,height:n})}function RRe(e){const{documentType:t,documentUrl:n,title:r,statusColor:i,description:o,tags:a,tagsFilter:s,previewImageUrl:u,onSelect:c}=e;function l(d){return d.nativeEvent instanceof MouseEvent&&(d.metaKey||d.ctrlKey)?window.open(n,"_blank"):c()}return f.jsxs(h.Card,{paddingBlock:16,onSelect:l,children:[f.jsx(h.CardContent,{children:f.jsxs(h.Box,{justifyContent:"space-between",children:[f.jsxs(h.Box,{flexDirection:"column",gap:4,alignItems:"flex-start",flexGrow:1,children:[f.jsx(ORe,{documentType:t}),f.jsx(FRe,{title:r,statusColor:i}),f.jsx(kRe,{description:o})]}),f.jsx(MRe,{previewImageUrl:u})]})}),a.length>0&&f.jsx(LRe,{tags:a,tagsFilter:s})]})}function ORe(e){const{documentType:t}=e;return f.jsx(h.Badge,{maxWidth:150,size:"medium",title:`Type: ${t}`,icon:"description"})}function FRe(e){const{title:t,statusColor:n}=e;return f.jsxs(h.Box,{gap:8,alignItems:"center",children:[f.jsx(h.Dot,{color:n}),f.jsx(h.Text,{variant:"bold",children:t})]})}function kRe(e){const{description:t}=e,n=t==null?void 0:t.substring(0,150);return n?f.jsx(h.Text,{variant:"small",color:"grey11",children:`${n}${n!==t?"...":""}`}):f.jsx(h.Text,{variant:"smallItalic",color:"grey11",children:"No description available"})}function MRe(e){const{previewImageUrl:t}=e;return f.jsx(h.Box,{width:142,height:90,backgroundColor:"grey2",border:!0,borderRadius:6,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4,flexShrink:0,padding:8,children:t?f.jsx(h.Image,{src:t,sizing:"cover"}):f.jsxs(f.Fragment,{children:[f.jsx(h.Icon,{name:"hideImage",size:"large",color:"grey11"}),f.jsx(h.Text,{color:"grey11",variant:"small",children:"No preview available"})]})})}function LRe(e){const{tags:t}=e;return f.jsxs(h.CardFooter,{children:[f.jsxs(h.Box,{gap:4,alignItems:"center",children:[f.jsx(h.Icon,{name:"label",size:"small",color:"grey11"}),f.jsx(h.Text,{variant:"small",color:"grey11",children:"Tags:"})]}),f.jsx(h.TextOverflow,{children:t.map(n=>f.jsx(h.Badge,{size:"medium",title:n,sx:{marginRight:8}},n))})]})}function jRe(e){var g,S;const{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i}=e,o=Ee();o.searchDocuments||Jt("searchDocuments");const{coreApiBaseUrl:a,documentSearchBaseUrl:s,authStrategy:u,status:c,repository:l}=o,{storageVersion:d}=Ve.useRequest(V0,[a,u]),p=d.major>=7;function A(){return p?Dq({repository:l,searchTerm:t,customTypesIds:[...Fn.map(r,y=>y.id)],tags:[...Fn.map(n,y=>y.id)],localeId:[...Fn.map(i,y=>y.id)][0]}):BR({tags:[...Fn.map(n,y=>y.id)],customTypes:[...Fn.map(r,y=>y.id)],language:[...Fn.map(i,y=>y.id)],term:[t]})}const[m,v]=$.useState([]),[_,C]=$.useState(""),I=A(),x=Ve.useRequest(V7,[a,s,u,I,c,p]);return I!==_?(C(I),v(x.results)):x.results.length>0&&((g=Qt.last(m))==null?void 0:g.id)!==((S=Qt.last(x.results))==null?void 0:S.id)&&v(y=>y.concat(x.results)),{documents:m,response:x}}Ve.cache.registerFetcherConfig(V7,{cacheCapacity:500,revalidationStrategy:{type:"never"}});async function V7(e,t,n,r,i,o){const a=Tq[i];if(!o){const l=await UR(e,n,r,200);return tk(l.results,a)}const s=await Wq(t,n,r),u=await Nq(e,n,s.results);return tk(u,a)}function tk(e,t){return{results:e.flatMap(r=>{const i=r.versions.filter(o=>t.includes(o.status));return i.length===0?[]:{...r,versions:i}})}}function nk(){const e=Ee();e.searchDocuments||Jt("searchDocuments");const{coreApiBaseUrl:t,authStrategy:n}=e,r=Ve.useRequest(V0,[t,n]);return new Set(r.languages.map(i=>({id:i.id,label:i.name})))}function URe(){const e=Ee();e.searchDocuments||Jt("searchDocuments");const{coreApiBaseUrl:t,authStrategy:n}=e,r=Ve.useRequest(Yq,[t,n]);return new Set(r.results.map(i=>({id:i,label:i})))}function BRe(){const e=Ee();e.searchDocuments||Jt("searchDocuments");const{customTypesApiBaseUrl:t,repository:n,authStrategy:r}=e,i=Ve.useRequest(Uq,[t,n,r]);return new Set(i)}function PRe(e,t){const n=Ee(),r=Ne.useDebounceState({initialState:""}),[i,o]=$.useState(new Set),[a,s]=$.useState(new Set);function u(){return!n.searchDocuments||!n.localeId?new Set:new Set([{id:n.localeId,label:n.localeId}])}const[c,l]=$.useState(u),d=Fn.union(a,Nm(e)),p=Fn.union(i,Nm(t));return{searchTerm:r,filteredTags:i,setFilteredTags:o,filteredCustomTypes:a,setFilteredCustomTypes:s,filteredLocales:c,setFilteredLocales:l,typesFilter:d,tagsFilter:p}}function Nm(e){return e?Fn.map(e,t=>({id:t,label:t})):new Set}function WRe(e){const{filteredLocales:t,setFilteredLocales:n,filteredTags:r,setFilteredTags:i,filteredCustomTypes:o,setFilteredCustomTypes:a,fixedTags:s,fixedCustomTypes:u}=e;return f.jsxs(f.Fragment,{children:[f.jsx(KRe,{selectedValues:t,onSelectedValuesChange:n}),f.jsx(lC,{selectedValues:r,fixedSelectedValues:Nm(s),onSelectedValuesChange:i,label:"Tags",icon:"label",fetchFilters:URe}),f.jsx(lC,{selectedValues:o,fixedSelectedValues:Nm(u),onSelectedValuesChange:a,label:"Type",icon:"description",fetchFilters:BRe})]})}function lC(e){const[t,n]=$.useState(!1),r=$.useRef(null);return f.jsx(h.ErrorBoundary,{ref:r,renderError:()=>{var i;return f.jsx(h.FilterField,{mode:"error",onErrorRetry:(i=r.current)==null?void 0:i.reset,open:t,setOpen:n,values:new Set,...e})},children:f.jsx($.Suspense,{fallback:f.jsx(h.FilterField,{mode:"loading",open:t,setOpen:n,values:new Set,...e}),children:f.jsx(DRe,{open:t,setOpen:n,...e})})})}function DRe(e){const{open:t,setOpen:n,onSelectedValuesChange:r,fixedSelectedValues:i,selectedValues:o,label:a,icon:s,fetchFilters:u,multiple:c}=e,l=u();return f.jsx(h.FilterField,{open:t,setOpen:n,label:a,icon:s,selectedValues:o,values:new Set(l),fixedSelectedValues:i,onSelectedValuesChange:r,multiple:c})}function KRe(e){const{selectedValues:t,onSelectedValuesChange:n}=e,[r,i]=$.useState(Fn.first(t));function o(s){n(s),i(Fn.first(s))}const a=Fn.find(nk(),s=>{var u;return s.id===((u=Fn.first(t))==null?void 0:u.id)});return(a==null?void 0:a.label)!==(r==null?void 0:r.label)&&i(a),f.jsx(lC,{selectedValues:new Set(r?[r]:[]),onSelectedValuesChange:o,label:"Locale",icon:"public",fetchFilters:nk,multiple:!1})}function Q7(e){const{onSelectDocument:t,fixedCustomTypes:n,fixedTags:r,...i}=e,o=Ee(),{searchTerm:a,filteredTags:s,setFilteredTags:u,filteredCustomTypes:c,setFilteredCustomTypes:l,filteredLocales:d,setFilteredLocales:p,typesFilter:A,tagsFilter:m}=PRe(n,r),[v,_]=$.useTransition();return f.jsx(h.Dialog,{size:{height:727,width:656},hasClose:!1,...i,children:f.jsx(h.DialogContent,{children:f.jsxs(h.Box,{flexDirection:"column",height:"100%",children:[f.jsxs(h.Box,{padding:{top:16,inline:16,bottom:8},flexDirection:"column",gap:12,children:[f.jsx(h.FormInput,{value:a.value,onValueChange:a.set,placeholder:"Search a page",icon:"search"}),o.searchDocuments&&f.jsx(WRe,{filteredTags:s,setFilteredTags:u,filteredCustomTypes:c,setFilteredCustomTypes:l,filteredLocales:d,setFilteredLocales:p,fixedTags:r,fixedCustomTypes:n}),f.jsx(h.Text,{variant:"smallBold",color:"grey11",children:"Link to a document"})]}),o.searchDocuments?f.jsx(h.ErrorBoundary,{renderError:NRe,children:f.jsx($.Suspense,{fallback:f.jsx(VRe,{}),children:f.jsx(qRe,{searchTerm:a.debouncedValue,tagsFilter:m,typesFilter:A,localesFilter:d,startTransition:_,isLoadingDocuments:v,onSelectDocument:t})})}):f.jsx(z7,{message:"Slice Machine does not yet support mock data for linked documents in the simulator."})]})})})}function NRe(){return f.jsx(h.Box,{height:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center",children:f.jsx(h.DefaultErrorMessage,{title:"Request failed",description:"An error occurred while fetching documents.",errorImageSrc:h.dialogErrorImage})})}function qRe(e){const{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i,isLoadingDocuments:o,onSelectDocument:a}=e,{documents:s}=jRe({searchTerm:t,tagsFilter:n,localesFilter:i,typesFilter:r}),u=Ee();return f.jsxs(h.ScrollArea,{style:{flexGrow:1,paddingTop:h.theme.space[10],paddingBottom:h.theme.space[16],paddingInline:h.theme.space[16],display:"flex",flexDirection:"column",gap:h.theme.space[12]},children:[s.length===0&&f.jsx(z7,{}),s.map(c=>{const l=c.versions[0];if(!l)return null;const d=MR({documentId:c.id,versionId:l.status==="archived"?l.version_id:void 0,releaseId:l.status==="release"?l.release_id:void 0,status:l.status,baseUrl:u.baseUrl}),p=QRe({tags:l.tags,tagsFilter:n});return f.jsx(RRe,{documentType:l.custom_type_label,documentUrl:d,description:l.preview_summary,tags:p,title:c.title,previewImageUrl:l.preview_image,onSelect:()=>a(c.id),statusColor:Iq[l.status].color},`${c.id}-${l.status}`)}),f.jsx(h.AnimatedElement,{animation:{name:"fade"},children:o&&f.jsx(h.Text,{color:"grey11",align:"center",sx:{marginBlock:8},children:"Loading more results ..."})})]})}function z7(e){const{message:t="We can't find any versions matching this request"}=e,n="Oops!";return f.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:f.jsxs(h.BlankSlate,{children:[f.jsx(h.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),f.jsx(h.BlankSlateTitle,{size:"big",children:n}),f.jsx(h.BlankSlateDescription,{width:360,children:t})]})})}function VRe(){return f.jsx(h.Box,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:Qt.range(1,5).map(e=>f.jsx(h.Skeleton,{height:150},e))})}function QRe(e){const{tags:t,tagsFilter:n}=e,r=[...n].map(o=>o.label).reverse();return Qt.sort(t,o=>-r.indexOf(o))}function H7(e){const{hasLink:t,onUnlink:n,selectEnabled:r,selectedType:i,value:o,onOpenLinkModal:a,onValueChange:s,openInNewTab:u=!0,condensedButtons:c=!1,showNewTabButton:l=!1,displayTextEnabled:d}=e;return f.jsxs(f.Fragment,{children:[!d&&l&&u&&f.jsx(h.Badge,{title:"Open in a new tab",color:"indigo",size:"small",icon:"openInNew",onClick:a}),!t&&r&&f.jsxs(h.Select,{value:i==="any"?void 0:i,color:"grey",size:"small",boldTriggerText:!0,position:"popper",sideOffset:4,startIcon:om({selectType:i}),disabled:!r,onValueChange:s,placeholder:c?"":Xc("any"),onlyStartIcon:c&&i!==void 0,renderTrigger:({button:p})=>f.jsx(h.Tooltip,{content:Xc(i),visible:c,children:p}),children:[f.jsx(h.SelectItem,{value:"web",icon:"public",children:Xc("web")}),f.jsx(h.SelectItem,{value:"document",icon:"description",children:Xc("document")}),f.jsx(h.SelectItem,{value:"media",icon:"image",children:Xc("media")})]},i===void 0?"unlinked":"linked"),!t&&!r&&f.jsx(h.Button,{startIcon:om({selectType:i}),color:"grey",textColor:"link",textWeight:"normal",size:"small",onClick:a,children:Xc(i)}),t&&!d&&f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",onClick:n,"aria-label":"Close"}),t&&d&&f.jsxs(h.ButtonGroup,{density:"compact",children:[f.jsx(h.Button,{startIcon:om({selectType:i}),renderEndIcon:()=>u&&i==="web"?f.jsx(h.Icon,{name:"openInNew",size:"extraSmall",color:"indigo11"}):null,color:"grey",textColor:"link",textWeight:"normal",size:"small",disabled:!t,onClick:a,children:o.length>30?`${o.slice(0,30)}...`:o}),f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",onClick:n})]})]})}function Xc(e){if(!e||e==="any")return"Choose link type";switch(e){case"document":return"Link to Prismic page";case"web":return"Link to web page";case"media":return"Link to media"}}function Y7(e){const{onEdit:t,onUnlink:n,url:r,title:i,subTitle:o}=e;return f.jsx(h.Card,{paddingBlock:16,children:f.jsxs(h.CardContent,{sx:{width:433},children:[f.jsx(HRe,{url:r,title:i,subTitle:o,onEdit:t,onUnlink:n}),r&&f.jsx(h.CheckerBoard,{children:f.jsx(zRe,{children:f.jsx(h.Image,{src:r,alt:i,sizing:"contain"})})})]})})}function zRe(e){const{children:t}=e;return f.jsx(h.Box,{flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",height:327,children:t})}function HRe(e){const{url:t,title:n,subTitle:r,onEdit:i,onUnlink:o}=e;return f.jsxs(h.Box,{flexDirection:"row",justifyContent:"space-between",gap:8,children:[f.jsxs(h.Box,{gap:8,minWidth:0,children:[f.jsx(h.ConjoinedIcons,{largeIconName:"image",smallIconName:"link"}),f.jsxs(h.Box,{flexDirection:"column",minWidth:0,children:[f.jsx(h.Text,{noWrap:!0,variant:"smallBold",href:t,inline:!0,children:n}),f.jsx(h.Text,{variant:"small",color:"grey11",children:r})]})]}),f.jsxs(h.ButtonGroup,{size:"medium",color:"grey",children:[i&&f.jsx(YRe,{onEdit:i}),o&&f.jsx(GRe,{onUnlink:o})]})]})}function YRe(e){const{onEdit:t}=e;return f.jsx(h.Tooltip,{content:"Edit link",side:"top",stableMount:!0,zIndexHack:!0,children:f.jsx(h.Button,{startIcon:"edit",onClick:t})})}function GRe(e){const{onUnlink:t}=e;return f.jsx(h.Tooltip,{content:"Remove link",side:"top",stableMount:!0,zIndexHack:!0,children:f.jsx(h.Button,{startIcon:"linkOff",onClick:t})})}function JRe(e){var w,O;const{field:t,content:n,onContentChange:r}=e,i=v(),o=((w=t.config)==null?void 0:w.allowText)??!1,a=o&&(n==null?void 0:n.value.text)||void 0,[s,u]=$.useState(m),c=Ce.FilledExternalLinkContent.is(n==null?void 0:n.value)&&(n==null?void 0:n.value.target)||void 0,[l,d]=$.useState(!1),p=$.useRef(null);Ne.useOnChange(i,y);const A=s?ZRe[s]:void 0;function m(){var E,F;return!((E=t.config)!=null&&E.select)||n!=null&&n.value.__TYPE__?n==null?void 0:n.value.__TYPE__:rk[(F=t.config)==null?void 0:F.select]}function v(){return n?Ce.FilledDocumentLinkContent.is(n.value)?n.value.id:Ce.FilledExternalLinkContent.is(n.value)?n.value.url:Ce.FilledFileLinkContent.is(n.value)||Ce.FilledImageLinkContent.is(n.value)?n.value.name:"":""}function _(E){var F;if(!E)return r(void 0);switch((F=t.config)==null?void 0:F.select){case"web":return r({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",kind:"web",text:E}});case"document":return r({__TYPE__:"LinkContent",value:{__TYPE__:"DocumentLink",kind:"document",text:E}});case"media":return r({__TYPE__:"LinkContent",value:{__TYPE__:"MediaLink",kind:"media",text:E}});default:return r({__TYPE__:"LinkContent",value:{__TYPE__:"AnyLink",text:E}})}}function C(E,F){if(!E)return _(a);const W=F?"_blank":void 0;switch(s){case"ExternalLink":return r({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",url:E,target:W,text:a}});case"DocumentLink":return r({__TYPE__:"LinkContent",value:{__TYPE__:"DocumentLink",id:E,text:a}});default:return r(void 0)}}function I(E){return n?r({__TYPE__:n.__TYPE__,value:{...n.value,text:E}}):_(E)}function x(E){u(E?rk[E]:void 0),C("")}function g(E){C(E)}function S(){d(!0)}function y(){var E;l&&(d(!1),(E=p.current)==null||E.reset())}function T(E){const F=J7({media:E});switch(F.value.__TYPE__){case"ImageLink":return r({__TYPE__:F.__TYPE__,value:{...F.value,text:a}});case"FileLink":return r({__TYPE__:F.__TYPE__,value:{...F.value,text:a}})}}return{contentType:s,selectType:A,fieldValue:i,onDisplayTextChange:I,onValueChange:C,onTypeChange:x,placeholder:Wc(t),isTypeSelectEnabled:!((O=t.config)!=null&&O.select),onDocumentSelected:g,onError:S,errorBoundaryRef:p,isTargetNewTab:c==="_blank",onMediaSelected:T,displayTextEnabled:o,displayText:a??""}}const ZRe={AnyLink:"any",DocumentLink:"document",ExternalLink:"web",FileLink:"media",ImageLink:"media",MediaLink:"media"},rk={any:"AnyLink",document:"DocumentLink",web:"ExternalLink",media:"FileLink"};function XRe(e){const t=Ee();t.searchDocuments||Jt("searchDocuments");const{coreApiBaseUrl:n,authStrategy:r}=t;return Ve.useRequest(G7,[n,r,e]).title}const eOe=Ap({id:Yo(),title:Yo()});function G7(e,t,n){return pe.request(new URL(`documents/${n}`,e),{credentials:pe.getRequestCredentials(t),okType:eOe})}Ve.cache.registerFetcherConfig(G7,{concurrency:50});function J7(e){var i,o,a,s,u,c;const{media:t}=e,n="kind"in t;return n&&t.kind==="image"?{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:t.id,name:t.filename,url:t.url,kind:t.kind,size:t.size.toString(),height:((i=t.height)==null?void 0:i.toString())??`${es}`,width:((o=t.width)==null?void 0:o.toString())??`${es}`,date:((a=t.last_modified)==null?void 0:a.toString())??""}}:n?{__TYPE__:"LinkContent",value:{__TYPE__:"FileLink",id:t.id,name:t.filename,kind:t.kind,url:t.url,size:t.size.toString(),date:((s=t.last_modified)==null?void 0:s.toString())??""}}:{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:t.id,name:(t==null?void 0:t.alt)??t.url,kind:"image",url:t.url,size:"0",height:((u=t.height)==null?void 0:u.toString())??`${es}`,width:((c=t.width)==null?void 0:c.toString())??`${es}`}}}function tOe(e){const{open:t,setOpen:n,showNewTabButton:r}=e,{url:i,setUrl:o,openInNewTab:a,setOpenInNewTab:s,disabled:u,onUpdate:c}=nOe(e);return f.jsxs(h.Dialog,{open:t,onOpenChange:n,size:"small",children:[f.jsx(h.DialogHeader,{title:"Set Link URL"}),f.jsxs(h.DialogContent,{padding:16,children:[f.jsx(h.FormInput,{value:i,onValueChange:o,placeholder:"Paste URL",icon:"public"}),r&&f.jsx(h.InlineLabel,{value:"Open in a new tab",children:f.jsx(h.Checkbox,{checked:a,onCheckedChange:s})})]}),f.jsxs(h.DialogActions,{children:[f.jsx(h.DialogCancelButton,{}),f.jsx(h.DialogActionButton,{onClick:c,disabled:u,children:"Update"})]})]})}function nOe(e){const{url:t,openInNewTab:n,onUpdate:r,open:i,setOpen:o}=e,[a,s]=$.useState(t),[u,c]=$.useState(n);Ne.useOnChange(i,()=>{i&&(s(t),c(n))});const l=!a||a===t&&u===n;function d(){r(a,u),o(!1)}return{url:a,setUrl:s,openInNewTab:u,disabled:l,setOpenInNewTab:c,onUpdate:d}}function Z7(e){var ee,re,P,Y;const{content:t,field:n,id:r,onContentChange:i,condensedButtons:o=!1}=e,[a,s]=$.useState(!1),[u,c]=$.useState(!1),[l,d]=$.useState(),{contentType:p,fieldValue:A,errorBoundaryRef:m,onDocumentSelected:v,onError:_,onMediaSelected:C,onValueChange:I,selectType:x,onTypeChange:g,isTypeSelectEnabled:S,displayTextEnabled:y,...T}=JRe({content:t,field:n,onContentChange:i});Ne.useOnChange(l,()=>{x!==void 0&&!l&&!A&&S&&g(void 0)});const w=a||u,O=p==="DocumentLink"&&A!=="",F=p==="ExternalLink"&&Fr.toURL(A),W=!!((ee=n.config)!=null&&ee.allowTargetBlank),K={...T,id:r,onBlur:()=>s(!1),onFocus:()=>{s(!0)},onOpenLinkModal:()=>{switch(s(!0),p){case"DocumentLink":return d("document");case"ExternalLink":return d("web");case"FileLink":case"ImageLink":case"MediaLink":return d("media");default:return d(void 0)}},onUnlink:()=>{S?g(void 0):I("")},onSelectValueChange:M=>{g(M),d(M)},value:A,condensedButtons:o,allowTargetBlank:W,selectType:x,onValueChange:I,isTypeSelectEnabled:S,displayTextEnabled:y},{searchDocuments:J}=Ee();return f.jsxs(f.Fragment,{children:[f.jsxs(h.Popover,{onMouseOverChange:c,open:w,align:"start",sideOffset:-3,openDelay:100,closeDelay:200,focusOnEnter:!1,anchor:f.jsxs(h.Field,{onMouseOverChange:s,children:[f.jsx(h.FieldIcon,{name:om({selectType:x,displayTextEnabled:y})}),f.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),f.jsx(h.FieldControl,{children:O&&J?f.jsx(sOe,{errorBoundaryRef:m,onError:_,fallback:f.jsx(fC,{...K,value:"..."}),renderError:()=>rOe(K),children:f.jsx(aOe,{...K,documentId:A})}):f.jsx(fC,{...K})})]}),children:[F&&f.jsx(ju,{url:F,title:Fr.getUrlTitle(F)??"",subTitle:F.toString()}),t&&Ce.FilledImageLinkContent.is(t.value)&&f.jsx(Y7,{url:t.value.url,title:t.value.name,subTitle:`${t.value.width} x ${t.value.height} pixels`})]}),f.jsx(tOe,{open:l==="web",setOpen:M=>d(M?"web":void 0),url:A,openInNewTab:T.isTargetNewTab,showNewTabButton:!!((re=n.config)!=null&&re.allowTargetBlank),onUpdate:(M,k)=>I(M,k)}),f.jsx(VR,{open:l==="media",onOpenChange:M=>d(M?"media":void 0),onMediaSelected:C,assetType:"all"}),f.jsx(Q7,{open:l==="document",onOpenChange:M=>d(M?"document":void 0),onSelectDocument:M=>{d(void 0),v(M)},fixedCustomTypes:new Set((P=n.config)==null?void 0:P.customtypes),fixedTags:new Set((Y=n.config)==null?void 0:Y.tags)})]})}function rOe(e){return f.jsx(fC,{...e})}function iOe(e){return{onValueChange:e.displayTextEnabled?e.onDisplayTextChange:e.onValueChange,placeholder:e.displayTextEnabled?"Add your display text":e.placeholder,readOnly:!e.displayTextEnabled,value:e.displayTextEnabled?e.displayText:e.value,variant:e.displayTextEnabled?"normal":"link",onFocus:e.displayTextEnabled?e.onFocus:e.onOpenLinkModal,cursor:X7({displayTextEnabled:e.displayTextEnabled,isTypeSelectEnabled:e.isTypeSelectEnabled,value:e.value})}}function fC(e){const{id:t,value:n,onOpenLinkModal:r,onBlur:i,isTypeSelectEnabled:o,selectType:a,onSelectValueChange:s,onUnlink:u,isTargetNewTab:c,condensedButtons:l,allowTargetBlank:d,displayTextEnabled:p}=e,A=iOe(e);return f.jsx(Qs,{id:t,...A,onBlur:i,textOverflow:"ellipsis",endAdornment:f.jsx(H7,{hasLink:!!(n&&a),onUnlink:u,selectEnabled:o,selectedType:a,value:n,onOpenLinkModal:r,onValueChange:s,openInNewTab:c,condensedButtons:l,showNewTabButton:d&&a==="web",displayTextEnabled:p})})}function oOe(e,t){return{onValueChange:e.displayTextEnabled?e.onDisplayTextChange:void 0,placeholder:e.displayTextEnabled?"Add your display text":void 0,readOnly:!e.displayTextEnabled,value:e.displayTextEnabled?e.displayText:t,variant:e.displayTextEnabled?"normal":"link",onFocus:e.displayTextEnabled?e.onFocus:e.onOpenLinkModal,cursor:X7({displayTextEnabled:e.displayTextEnabled,isTypeSelectEnabled:e.isTypeSelectEnabled,value:t})}}function aOe(e){const{id:t,documentId:n,onOpenLinkModal:r,isTypeSelectEnabled:i,selectType:o,displayTextEnabled:a,condensedButtons:s,onSelectValueChange:u,onUnlink:c}=e,l=XRe(n),d=oOe(e,l);return f.jsx(Qs,{id:t,...d,textOverflow:"ellipsis",endAdornment:f.jsx(H7,{hasLink:!0,onUnlink:c,selectEnabled:i,selectedType:o,value:l,onOpenLinkModal:r,condensedButtons:s,onValueChange:u,displayTextEnabled:a})})}function sOe(e){const{errorBoundaryRef:t,onError:n,children:r,fallback:i,renderError:o}=e;return f.jsx(h.ErrorBoundary,{ref:t,onError:n,renderError:o,children:f.jsx($.Suspense,{fallback:i,children:r})})}function om(e){const{selectType:t,displayTextEnabled:n}=e;if(n)return"notes";switch(t){case"document":return"description";case"web":return"public";case"media":return"image";default:return"link"}}function X7(e){const{displayTextEnabled:t,isTypeSelectEnabled:n,value:r}=e;return t?"text":n&&!r?"default":"pointer"}function uOe(e){const{onContentChange:t,...n}=e;function r(i){const o=Ce.FilledLinkContent.is(i)?i:void 0;t(o)}return f.jsx(Z7,{...n,onContentChange:r})}function cOe(e){const{linkTo:t,onLinkToChange:n}=e;return f.jsx(uOe,{content:lOe(t),onContentChange:r=>n(fOe(r)),field:{type:"Link",config:{label:"Link",allowTargetBlank:!0,allowText:!1}},condensedButtons:!0})}function lOe(e){return e?{__TYPE__:"LinkContent",value:e}:void 0}function fOe(e){return e==null?void 0:e.value}function e8(e){var x,g;const{allContentViews:t,content:n,contentView:r,fieldLabel:i,imageLabel:o,initialImages:a,isUpdating:s,page:u=0,readOnly:c,thumbnailName:l,onClear:d,onContentChange:p,onCropperDialogClose:A,onPageChange:m,onMediaDialogOpenChange:v}=e,_=((g=(x=n==null?void 0:n.url)==null?void 0:x.split("?")[0])==null?void 0:g.slice(-4))===".svg",C=n!=null&&n.url&&!c?"visible":"hidden",I=!Ce.isImageContent(n);return f.jsxs(h.Box,{display:"flex",gap:12,padding:{inline:12},children:[f.jsx(h.Box,{children:f.jsx(h.Carousel,{getItemSource:$Ee,items:t,onPageChange:m,page:u,buttonSize:"small",renderPrevTooltip:S=>f.jsx(h.Tooltip,{content:"Previous",children:S}),renderNextTooltip:S=>f.jsx(h.Tooltip,{content:"Next",children:S}),style:I?{width:181,height:142}:{width:123,height:93},children:S=>(S==null?void 0:S.url)&&f.jsx(h.CarouselItem,{"aria-label":"Image Field Item",src:I7(S.url),alt:S.alt??void 0,isUpdating:s,disableAnimation:I},`${l}_${S.url}`)})}),f.jsxs(h.Box,{width:"100%",display:"flex",flexDirection:"column",gap:I?16:12,children:[f.jsx(IRe,{fieldLabel:i,imageLabel:o,initialImages:a,page:u,displaySeparator:!I,isSVGContentView:_,visibility:C,onClear:d,onCropperDialogClose:A,onMediaDialogOpenChange:v}),f.jsx(_Re,{readOnly:c||!r,altText:(r==null?void 0:r.alt)??"",onValueChange:S=>{r&&p(TEe(l,n,r,S))}}),I&&f.jsx(cOe,{linkTo:n.linkTo,onLinkToChange:S=>{p({...n,linkTo:S})}})]})]})}function dOe(e){const{content:t,onContentChange:n,field:r}=e,[i,o]=$.useState(0),[a,s]=$.useTransition(),u=_Ee(r),c=u[i],l=t?IEe(r,t):void 0,d=l==null?void 0:l[i];function p(_){if(!c)return;const C=REe(c.name,r,t,_);C!==t&&s(()=>n(C))}function A(_){s(()=>o(_))}function m({option:_,croppedImages:C}){if(o(_),!t)return;const I=Object.entries(C).reduce((x,[g,S])=>gRe({field:r,content:x,thumbnail:g,croppedImage:S}),t);I!==t&&s(()=>n(I))}function v(){o==null||o(0),n(void 0)}return{onCropperDialogClose:m,onPageChange:A,onMediaSelected:p,isUpdating:a,page:i,thumbnail:c,allThumbnails:u,allContentViews:l,contentView:d,onClear:v}}function pOe(e){const{content:t,field:n,readOnly:r,onContentChange:i}=e,o=t&&t.origin.url.length>0,{onCropperDialogClose:a,onPageChange:s,onMediaSelected:u,isUpdating:c,page:l,thumbnail:d,allThumbnails:p,allContentViews:A,contentView:m,onClear:v}=dOe({field:n,content:t,onContentChange:i}),[_,C]=$.useState(!1),I=nr(n),x=p.map((y,T)=>{const w=A==null?void 0:A[T];return{thumbnail:y,contentView:w,labels:sC(y,t,w)}}),g=d&&o?sC(d,t,m).filter(io.isDefined):[],S=d&&t&&o&&A;return f.jsx(D7,{isMediaDialogOpen:_,onMediaSelected:u,onMediaDialogOpenChange:C,children:f.jsx($.Suspense,{fallback:f.jsx("div",{style:{height:95}}),children:S?f.jsx(e8,{allContentViews:A,content:t,contentView:m,fieldLabel:I,imageLabel:g,initialImages:x,isUpdating:c,page:l,readOnly:r,thumbnailName:d.name,onClear:v,onContentChange:i,onCropperDialogClose:a,onMediaDialogOpenChange:C,onPageChange:s}):f.jsx(B7,{fieldLabel:I,isUpdating:c,readOnly:r,onMediaDialogOpenChange:C})})})}function AOe(e){var _,C;const{searchTerm:t,catalogId:n}=e,r=Ee();r.integrationFields||Jt("integrationFields");const{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,[s,u]=$.useState(1),[c,l]=$.useState([]),[d,p]=$.useState(""),A=Ve.useRequest(hOe,[i,a,o,n,t,t===d?s:1]);t!==d?(p(t),u(1),l(A.items)):A.items.length>0&&((_=Qt.last(c))==null?void 0:_.id)!==((C=Qt.last(A.items))==null?void 0:C.id)&&l(I=>I.concat(A.items));const m=s<A.totalPages;function v(){m&&u(I=>I+1)}return{items:c,response:A,fetchNextPage:v,hasNextPage:m}}function hOe(e,t,n,r,i,o=1,a=30){const s=new URL(`if/search/${r}`,e);return s.searchParams.set("searchTerm",i),s.searchParams.set("limit",a.toString()),s.searchParams.set("page",o.toString()),pe.request(s,{headers:{repository:n},credentials:pe.getRequestCredentials(t),okType:mOe})}const t8=L.object({id:L.string(),title:L.string(),imageURL:L.string().optional(),description:L.string().optional()}),mOe=L.object({items:L.array(t8),totalPages:L.number(),page:L.number()});function n8(e){const{itemId:t,catalogId:n}=e,r=Ee();r.integrationFields||Jt("integrationFields");const{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,u=Ve.useRequest(gOe,[i,a,o,n,t]).items[0];if(!u)throw new Error("Item not found");return{item:u}}function gOe(e,t,n,r,i){const o=new URL(`if/read/${r}`,e);return o.searchParams.set("ids",[i].toString()),pe.request(o,{headers:{repository:n},credentials:pe.getRequestCredentials(t),okType:vOe})}const vOe=L.object({items:L.array(t8)});function QR(e){const{item:t,onClick:n,catalogId:r}=e;return f.jsxs(h.PreviewCard,{variant:"large",onClick:n,children:[f.jsx(yOe,{src:t.imageURL??"",alt:t.title}),f.jsxs(h.PreviewContent,{children:[f.jsx(h.Badge,{title:`Catalog: ${r}`,icon:"multipleStop",size:"medium"}),f.jsx(h.Text,{variant:"bold",color:"grey12",sx:{marginTop:4},children:t.title}),f.jsx(h.Text,{variant:"small",color:"grey11",children:t.description??t.id})]})]})}const Qh=76;function yOe(e){const{src:t,alt:n}=e;return t?f.jsx(h.PreviewImage,{src:t,alt:n,width:Qh,height:Qh,framed:!0}):f.jsxs(h.Box,{borderRadius:6,backgroundColor:"grey2",height:Qh,width:Qh,flexDirection:"column",alignItems:"center",justifyContent:"center",border:!0,padding:{inline:4,block:8},children:[f.jsx(h.Icon,{name:"hideImage",size:"large",color:"grey11"}),f.jsx(h.Text,{color:"grey11",variant:"small",noSelect:!0,align:"center",children:"No preview image"})]})}function il(){return f.jsxs(h.PreviewCard,{variant:"large",children:[f.jsx(h.Skeleton,{height:76,width:76}),f.jsxs(h.PreviewContent,{children:[f.jsx(h.Skeleton,{height:24,width:168}),f.jsx(h.Skeleton,{height:24,width:240,sx:{marginTop:4}}),f.jsx(h.Skeleton,{height:16,width:144})]})]})}function bOe(e){const{open:t,onOpenChange:n,catalogId:r,onSelectItem:i}=e,o=Ne.useDebounceState({initialState:""}),a=Ee();return f.jsx(h.Dialog,{open:t,onOpenChange:n,hasClose:!1,size:{width:612,height:724},children:f.jsx(h.DialogContent,{children:f.jsxs(h.Box,{flexDirection:"column",height:"100%",children:[f.jsxs(h.Box,{padding:{top:16,inline:16},flexDirection:"column",gap:8,children:[f.jsx(h.FormSearchInput,{value:o.value,onValueChange:o.set,placeholder:"Search in your catalog"}),f.jsx(h.Text,{variant:"smallBold",color:"grey11",children:"Select an item"})]}),a.integrationFields?f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(dC,{message:"There was an error while fetching your catalog items."}),children:f.jsx($.Suspense,{fallback:f.jsxs(h.Box,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:[f.jsx(il,{}),f.jsx(il,{}),f.jsx(il,{}),f.jsx(il,{}),f.jsx(il,{})]}),children:f.jsx(COe,{searchTerm:o.debouncedValue,catalogId:r,onItemClick:i})})}):f.jsx(dC,{message:"Slice Machine does not yet support mock data for integration field in the simulator."})]})})})}function COe(e){const{catalogId:t,searchTerm:n,onItemClick:r}=e,[i,o]=$.useTransition(),{items:a,hasNextPage:s,fetchNextPage:u}=AOe({catalogId:t,searchTerm:n});return f.jsx(f.Fragment,{children:f.jsxs(h.ScrollArea,{onScrollToBottom:()=>s&&o(u),style:{flexGrow:1,paddingTop:h.theme.space[10],paddingBottom:h.theme.space[16],paddingInline:h.theme.space[16],display:"flex",flexDirection:"column",gap:h.theme.space[12]},threshold:252,children:[a.length===0?f.jsx(dC,{}):a.map(c=>f.jsx(QR,{item:c,catalogId:t,onClick:()=>r(c)},c.id)),f.jsx(h.AnimatedElement,{animation:{name:"fade"},children:i&&f.jsx(h.Text,{color:"grey11",align:"center",sx:{marginBlock:8},children:"Loading more results ..."})})]})})}function dC(e){const{message:t="We can't find any items matching your search"}=e,n="Oops!";return f.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:f.jsxs(h.BlankSlate,{children:[f.jsx(h.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),f.jsx(h.BlankSlateTitle,{size:"big",children:n}),f.jsx(h.BlankSlateDescription,{width:360,children:t})]})})}function SOe(e){const{itemId:t,item:n}=e,r=Ee();return t&&n&&n.id===t?f.jsx(ol,{...e,value:n.title}):t&&r.integrationFields?f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(ol,{...e,value:t}),children:f.jsx($.Suspense,{fallback:f.jsx(ol,{...e,value:t}),children:f.jsx(TOe,{...e,itemId:t})},t)},t):t&&!r.integrationFields?f.jsx(ol,{...e,value:t}):f.jsx(ol,{...e,value:""})}function _Oe(e){const{catalogId:t,itemId:n,item:r}=e,i=Ee();return n&&r&&r.id===n?f.jsx(h.FieldFooter,{children:f.jsx(QR,{catalogId:t,item:r})}):n&&i.integrationFields?f.jsx(h.ErrorBoundary,{renderError:()=>null,children:f.jsx(h.FieldFooter,{children:f.jsx($.Suspense,{fallback:f.jsx(il,{}),children:f.jsx(IOe,{catalogId:t,itemId:n})},n)})},n):null}function IOe(e){const{itemId:t,catalogId:n}=e,{item:r}=n8({catalogId:n,itemId:t});return f.jsx(QR,{catalogId:n,item:r})}function ol(e){const{id:t,field:n,readOnly:r,value:i,onFocus:o,onClearItem:a}=e;return f.jsx(Qs,{id:t,placeholder:Wc(n),readOnly:!0,variant:"link",value:i,...!r&&{cursor:"pointer",onFocus:o},endAdornment:f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!i,onClick:a})})}function TOe(e){const{itemId:t,catalogId:n}=e,{item:r}=n8({catalogId:n,itemId:t});return f.jsx(ol,{...e,value:r.title})}function xOe(e){var A;const{id:t,field:n,content:r,readOnly:i,onContentChange:o}=e,[a,s]=$.useState(!1),[u,c]=$.useState(),l=(A=n.config)==null?void 0:A.catalog;if(!l)return null;function d(m){o({value:m.id,__TYPE__:"IntegrationFieldsContent"}),c(m),s(!1)}function p(){o(void 0),c(void 0)}return f.jsxs(f.Fragment,{children:[f.jsxs(h.Field,{footer:f.jsx(_Oe,{catalogId:l,item:u,itemId:r==null?void 0:r.value}),children:[f.jsx(h.FieldIcon,{name:"multipleStop"}),f.jsx(h.FieldLabel,{htmlFor:t,children:nr(n)}),f.jsx(h.FieldControl,{children:f.jsx(SOe,{id:t,field:n,readOnly:i,catalogId:l,item:u,itemId:r==null?void 0:r.value,onFocus:()=>s(!0),onClearItem:p})})]}),f.jsx(bOe,{open:a,onOpenChange:s,catalogId:l,onSelectItem:d})]})}function wOe(e){const{content:t,field:n,id:r,onContentChange:i,readOnly:o}=e;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"notes"}),f.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),f.jsx(h.FieldControl,{children:f.jsx(h.TextArea,{id:r,placeholder:Wc(n),readOnly:o,paddingLeft:4,paddingRight:12,sx:{flexGrow:1},value:(t==null?void 0:t.value)??"",onChange:a=>{i(EOe(a))}})})]})}function EOe(e){return e.length===0?void 0:{__TYPE__:"FieldContent",type:"Text",value:e}}const $Oe=({content:e,field:t,id:n,onContentChange:r,readOnly:i})=>{var s,u;const o=Number(e==null?void 0:e.value),a=Number.isFinite(o)?o:void 0;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"pin"}),f.jsx(h.FieldLabel,{htmlFor:n,children:nr(t)}),f.jsx(h.FieldControl,{children:f.jsx(h.NumberInput,{id:n,value:a,min:(s=t.config)==null?void 0:s.min,max:(u=t.config)==null?void 0:u.max,padding:M7,placeholder:Wc(t),readOnly:i,onValueChange:c=>r(ROe(c))})})]})};function ROe(e){return e===void 0?void 0:{__TYPE__:"FieldContent",type:"Number",value:String(e)}}function An(e){this.content=e}An.prototype={constructor:An,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return i==-1?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new An(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new An(n)},addToStart:function(e,t){return new An([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new An(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(o==-1?i.length:o,0,t,n),new An(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=An.from(e),e.size?new An(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=An.from(e),e.size?new An(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=An.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};An.from=function(e){if(e instanceof An)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new An(t)};function r8(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let a=0;i.text[a]==o.text[a];a++)n++;return n}if(i.content.size||o.content.size){let a=r8(i.content,o.content,n+1);if(a!=null)return a}n+=i.nodeSize}}function i8(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let a=e.child(--i),s=t.child(--o),u=a.nodeSize;if(a==s){n-=u,r-=u;continue}if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){let c=0,l=Math.min(a.text.length,s.text.length);for(;c<l&&a.text[a.text.length-c-1]==s.text[s.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){let c=i8(a.content,s.content,n-1,r-1);if(c)return c}n-=u,r-=u}}class X{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,o){for(let a=0,s=0;s<n;a++){let u=this.content[a],c=s+u.nodeSize;if(c>t&&r(u,i+s,o||null,a)!==!1&&u.content.size){let l=s+1;u.nodesBetween(Math.max(0,t-l),Math.min(u.content.size,n-l),r,i+l)}s=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let o="",a=!0;return this.nodesBetween(t,n,(s,u)=>{s.isText?(o+=s.text.slice(Math.max(t,u)-u,n-u),a=!r):s.isLeaf?(i?o+=typeof i=="function"?i(s):i:s.type.spec.leafText&&(o+=s.type.spec.leafText(s)),a=!r):!a&&s.isBlock&&(o+=r,a=!0)},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<t.content.length;o++)i.push(t.content[o]);return new X(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let o=0,a=0;a<n;o++){let s=this.content[o],u=a+s.nodeSize;u>t&&((a<t||u>n)&&(s.isText?s=s.cut(Math.max(0,t-a),Math.min(s.text.length,n-a)):s=s.cut(Math.max(0,t-a-1),Math.min(s.content.size,n-a-1))),r.push(s),i+=s.nodeSize),a=u}return new X(r,i)}cutByIndex(t,n){return t==n?X.empty:t==0&&n==this.content.length?this:new X(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new X(i,o)}addToStart(t){return new X([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new X(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return r8(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return i8(this,t,n,r)}findIndex(t,n=-1){if(t==0)return zh(0,t);if(t==this.size)return zh(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),a=i+o.nodeSize;if(a>=t)return a==t||n>0?zh(r+1,a):zh(r,i);i=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return X.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new X(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return X.empty;let n,r=0;for(let i=0;i<t.length;i++){let o=t[i];r+=o.nodeSize,i&&o.isText&&t[i-1].sameMarkup(o)?(n||(n=t.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new X(n||t,r)}static from(t){if(!t)return X.empty;if(t instanceof X)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new X([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}X.empty=new X([],0);const Jb={index:0,offset:0};function zh(e,t){return Jb.index=e,Jb.offset=t,Jb}function qm(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!qm(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!qm(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}let vt=class pC{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let o=t[i];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,i));else{if(o.type.excludes(this.type))return t;!r&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&qm(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);return r.create(n.attrs)}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return pC.none;if(t instanceof pC)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};vt.none=[];class gp extends Error{}class ae{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=a8(this.content,t+this.openStart,n);return r&&new ae(r,this.openStart,this.openEnd)}removeBetween(t,n){return new ae(o8(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return ae.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ae(X.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new ae(t,r,i)}}ae.empty=new ae(X.empty,0,0);function o8(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:a,offset:s}=e.findIndex(n);if(i==t||o.isText){if(s!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(o8(o.content,t-i-1,n-i-1)))}function a8(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),a=e.maybeChild(i);if(o==t||a.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=a8(a.content,t-o-1,n);return s&&e.replaceChild(i,a.copy(s))}function OOe(e,t,n){if(n.openStart>e.depth)throw new gp("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new gp("Inconsistent open depths");return s8(e,t,n,0)}function s8(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let a=s8(e,t,n,r+1);return o.copy(o.content.replaceChild(i,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let a=e.parent,s=a.content;return Au(a,s.cut(0,e.parentOffset).append(n.content).append(s.cut(t.parentOffset)))}else{let{start:a,end:s}=FOe(n,e);return Au(o,c8(e,a,s,t,r))}else return Au(o,Vm(e,t,r))}function u8(e,t){if(!t.type.compatibleContent(e.type))throw new gp("Cannot join "+t.type.name+" onto "+e.type.name)}function AC(e,t,n){let r=e.node(n);return u8(r,t.node(n)),r}function pu(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Od(e,t,n,r){let i=(t||e).node(n),o=0,a=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(pu(e.nodeAfter,r),o++));for(let s=o;s<a;s++)pu(i.child(s),r);t&&t.depth==n&&t.textOffset&&pu(t.nodeBefore,r)}function Au(e,t){return e.type.checkContent(t),e.copy(t)}function c8(e,t,n,r,i){let o=e.depth>i&&AC(e,t,i+1),a=r.depth>i&&AC(n,r,i+1),s=[];return Od(null,e,i,s),o&&a&&t.index(i)==n.index(i)?(u8(o,a),pu(Au(o,c8(e,t,n,r,i+1)),s)):(o&&pu(Au(o,Vm(e,t,i+1)),s),Od(t,n,i,s),a&&pu(Au(a,Vm(n,r,i+1)),s)),Od(r,null,i,s),new X(s)}function Vm(e,t,n){let r=[];if(Od(null,e,n,r),e.depth>n){let i=AC(e,t,n+1);pu(Au(i,Vm(e,t,n+1)),r)}return Od(t,null,n,r),new X(r)}function FOe(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)i=t.node(o).copy(X.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class vp{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<t;o++)i+=r.child(o).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return vt.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let s=r;r=i,i=s}let o=r.marks;for(var a=0;a<o.length;a++)o[a].type.spec.inclusive===!1&&(!i||!o[a].isInSet(i.marks))&&(o=o[a--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Qm(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let a=t;;){let{index:s,offset:u}=a.content.findIndex(o),c=o-u;if(r.push(a,s,i+u),!c||(a=a.child(s),a.isText))break;o=c-1,i+=u+1}return new vp(n,r,o)}static resolveCached(t,n){for(let i=0;i<Zb.length;i++){let o=Zb[i];if(o.pos==n&&o.doc==t)return o}let r=Zb[Xb]=vp.resolve(t,n);return Xb=(Xb+1)%kOe,r}}let Zb=[],Xb=0,kOe=12;class Qm{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const MOe=Object.create(null);let hl=class hC{constructor(t,n,r,i=vt.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||X.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&qm(this.attrs,n||t.defaultAttrs||MOe)&&vt.sameSet(this.marks,r||vt.none)}copy(t=null){return t==this.content?this:new hC(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new hC(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return ae.empty;let i=this.resolve(t),o=this.resolve(n),a=r?0:i.sharedDepth(n),s=i.start(a),c=i.node(a).content.cut(i.pos-s,o.pos-s);return new ae(c,i.depth-a,o.depth-a)}replace(t,n,r){return OOe(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return vp.resolveCached(this,t)}resolveNoCache(t){return vp.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),l8(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=X.empty,i=0,o=r.childCount){let a=this.contentMatchAt(t).matchFragment(r,i,o),s=a&&a.matchFragment(this.content,n);if(!s||!s.validEnd)return!1;for(let u=i;u<o;u++)if(!this.type.allowsMarks(r.child(u).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(t).matchType(r),a=o&&o.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content);let t=vt.none;for(let n=0;n<this.marks.length;n++)t=this.marks[n].addToSet(t);if(!vt.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=X.fromJSON(t,n.content);return t.nodeType(n.type).create(n.attrs,i,r)}};hl.prototype.text=void 0;class zm extends hl{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):l8(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new zm(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new zm(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function l8(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Uu{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new LOe(t,n);if(r.next==null)return Uu.empty;let i=f8(r);r.next&&r.err("Unexpected trailing text");let o=KOe(DOe(i));return NOe(o,r),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(t.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function o(a,s){let u=a.matchFragment(t,r);if(u&&(!n||u.validEnd))return X.from(s.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:l,next:d}=a.next[c];if(!(l.isText||l.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let p=o(d,s.concat(l));if(p)return p}}return null}return o(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(t)){let a=[];for(let s=i;s.type;s=s.via)a.push(s.type);return a.reverse()}for(let a=0;a<o.next.length;a++){let{type:s,next:u}=o.next[a];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in n)&&(!i.type||u.validEnd)&&(r.push({match:s.contentMatch,type:s,via:i}),n[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)o+=(a?", ":"")+r.next[a].type.name+"->"+t.indexOf(r.next[a].next);return o}).join(`
|
|
37
|
+
npx @slicemachine/init@latest --repository <my-project>`,language:"bash",title:"Terminal",showLineNumbers:!1})]})},{id:"createPageType",title:"Create a Page Type",description:"Build the structure of your page",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/Create_page_type_xdn13j.mp4",content:f.jsx(h.Text,{children:"A page type is a base content structure editors will use to create pages in the Page Builder (Prismic's content creation UI). A page type can be reusable (e.g., for multiple blog posts) or single (e.g., for a one-time page like the homepage)."})},{id:"codePage",title:"Code Your Page Type",description:"Prepare code to fetch content",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/Step2_code_your_page_jatiur.mp4",content:f.jsx(h.Text,{children:"Prepare your code to query the content from the Prismic API."})},{id:"createSlice",title:"Create a Slice",description:"Build a reusable website section",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918322/DEV_TOOLS/ONBOARDING_GUIDE/Step3_add_slice_qzmvxf.mp4",content:f.jsx(h.Text,{children:"Slices are website sections that can be reused on different pages with different content. Each slice has a code component automatically generated by Slice Machine. Start with a template and look at your code to see how it's structured."})},{id:"reviewAndPush",title:"Review and Push changes",description:"Enable editors to create content",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918320/DEV_TOOLS/ONBOARDING_GUIDE/DevTools_Squad_push_changes_ovvmul.mp4",content:f.jsx(h.Text,{children:"Your page types and slices currently exist only in your local project. Push them to your repository to make them available for your content editors."})},{id:"createContent",title:"Create Content",description:"Publish a page to the Prismic API",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918324/DEV_TOOLS/ONBOARDING_GUIDE/Cre%CC%81er_contenu_e%CC%81tape_4_z9vlzt.mp4",content:f.jsx(h.Text,{children:"In Prismic, content creation takes place in the Prismic Page Builder UI. Open the Page Builder and start creating your first page."})},{id:"renderPage",title:"Render Your Page",description:"View your page in the browser",videoUrl:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1721918321/DEV_TOOLS/ONBOARDING_GUIDE/Step_6_Render_Page_tnauh9.mp4",content:f.jsxs(h.Text,{children:["Now that your content is published, you can run your project in your terminal and visit the page on your local server (e.g.,"," ",f.jsx(h.Text,{component:"code",children:"localhost:3000/example-page"}),"). Your content should now be visible!"]})}],defaultCompletedStepIds:t?["createPrismicProject","chooseLocale"]:["createPrismicProject"],tutorialLink:{next:"https://prismic.dev/course/next",nuxt:"https://prismic.dev/course/nuxt",sveltekit:"https://prismic.dev/course/sveltekit",other:""}[e||"other"]}}function j$e(e){switch(e){case"next":return"Next.js";case"nuxt":return"Nuxt";case"sveltekit":return"SvelteKit";default:return""}}function U$e(e){const{onboardingState:t,tracking:n,onToggleStep:r,onToggleGuide:i}=e,{steps:o,defaultCompletedStepIds:a,tutorialLink:s}=L$e(t.context.framework,t.context.starterId||void 0),u=S(t.completedSteps),[c,l]=$.useState(t.isDismissed),{throwConfetti:d,confettiCannonRef:p,confettiContainerRef:A}=B$e(mp),{isFadedOut:m,isFading:v,fadeOut:_,resetFadeOut:C}=D$e(x,P$e,W$e);function I(){i(),C(),l(!1)}function x(){i(),l(!0)}async function g(y){const T=await r(y.id);T.includes(y.id)&&n.track({event:"shared-onboarding:step-completed",stepId:y.id,stepTitle:y.title,source:n.source}),S(T).length===o.length&&(n.track({event:"shared-onboarding:completed",source:n.source}),d(),_())}function S(y){const T=o.map(({id:w})=>w);return Array.from(new Set([...y.filter(w=>T.includes(w)),...a]))}return f.jsxs(f.Fragment,{children:[c&&f.jsx(h.ActionListItem,{textVariant:"normal",backgroundColor:"transparent",startIcon:"notStarted",onClick:I,children:"Get started"}),!c&&f.jsx(h.AnimatedElement,{enterDuration:0,exitDuration:NR,children:!m&&f.jsxs("div",{ref:A,style:{position:"relative"},children:[f.jsx(M$e,{steps:o,completedSteps:u,tutorialLink:s,tracking:n,onToggleStep:g,onClose:v?void 0:x}),f.jsx("div",{ref:p,style:{position:"absolute",bottom:0,left:0}})]})})]})}const mp={colors:["#8E44EC","#E8C7FF","#59B5F8","#C3EEFE"],elementCount:300,width:"8px",height:"8px",stagger:.2,startVelocity:35,spread:90,duration:3e3};function B$e(e){const t=$.useRef(null),n=$.useRef(null);return{throwConfetti:$.useCallback(()=>{const i=t.current,o=n.current;i&&o&&(o.style.overflow="hidden",C$e(i,e))},[e]),confettiCannonRef:t,confettiContainerRef:n}}const NR=400,P$e=mp.duration?mp.duration-NR:0,W$e=mp.duration?mp.duration:NR;function D$e(e,t,n){const[r,i]=$.useState(!1),[o,a]=$.useState(!1),s=$.useRef(!1),u=$.useCallback(()=>{a(!0),setTimeout(()=>{i(!0)},t),s.current||(setTimeout(()=>{e()},n),s.current=!0)},[e,t,n]),c=$.useCallback(()=>{i(!1),a(!1),s.current=!1},[]);return{isFadedOut:r,isFading:o,fadeOut:u,resetFadeOut:c}}const R7=$.createContext({editedUID:{current:!1},onEditUID:()=>{}});function O7(e){return Object.values(e.json).some(t=>{var n;return((n=t.uid)==null?void 0:n.type)==="UID"})}function K$e(e){const{content:t,customType:n}=e;return O7(n)&&!t.uid}function F7(e){const{documentId:t,documentsWithUid:n,uid:r}=e;return n.filter(i=>t!==i.id&&q$e({document:i,uid:r})&&N$e({...e,document:i}))}function N$e(e){const{customTypeId:t,languageId:n,document:r}=e,i=t===r.custom_type_id,o=n===r.language.id;return i&&o}function q$e(e){const{document:t,uid:n}=e,r=t.versions.filter(i=>i.uid===n);return r.length===0?!0:r.some(i=>i.status!=="archived")}function z0(e,t){return`${e}___${t}`}const k7=$.createContext({ids:[],isSelected:()=>!1,update:()=>{}});function H0(){return $.useContext(k7)}function nr(e){var t;return((t=e.config)==null?void 0:t.label)??(e.type==="Boolean"||e.type==="Separator"?void 0:e.fieldset)??e.type}const qR="...";function V$e(e,t,n=qR){var r,i;return(t?(r=e.config)==null?void 0:r.placeholder_true:(i=e.config)==null?void 0:i.placeholder_false)||n}function Wc(e,t=qR){var n;return((n=e.config)==null?void 0:n.placeholder)||t}function Q$e(e){var s;const{content:t,field:n,id:r,readOnly:i,onContentChange:o}=e,a=(t==null?void 0:t.value)??((s=n.config)==null?void 0:s.default_value)??!1;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"biToggle"}),f.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),f.jsxs(h.FieldControl,{children:[f.jsx(h.Box,{padding:4,alignItems:"center",children:f.jsx(h.Text,{children:V$e(n,a)})}),f.jsx(h.Switch,{id:r,sx:{alignSelf:"center",marginLeft:"auto",marginRight:12},checked:a,onCheckedChange:u=>{i||o(z$e(u))}})]})]})}function z$e(e){return{__TYPE__:"BooleanContent",value:e}}function H$e(e){const{id:t,field:n,content:r,onContentChange:i}=e;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"colorLens"}),f.jsx(h.FieldLabel,{id:t,children:nr(n)}),f.jsx(h.FieldControl,{children:f.jsx(h.Box,{padding:{left:4},alignItems:"center",children:f.jsx(h.ColorInput,{onValueChange:o=>i(Y$e(o)),value:r==null?void 0:r.value,"aria-labelledby":t,placeholder:Wc(n)})})})]})}function Y$e(e){return e===void 0?void 0:{__TYPE__:"FieldContent",type:"Color",value:e}}function G$e(e){const{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=i!=null&&i.value?ZC.dateFromISOString(i.value):void 0;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"dateRange"}),f.jsx(h.FieldLabel,{id:t,children:nr(r)}),f.jsx(h.FieldControl,{children:f.jsx(h.Box,{padding:{left:4,right:12},width:"100%",flexDirection:"column",justifyContent:"center",children:f.jsx(h.DateInput,{mode:"date","aria-labelledby":t,disabled:n,value:a,onValueChange:s=>o(J$e(s))})})})]})}function J$e(e){if(e)return{__TYPE__:"FieldContent",type:"Date",value:Z$e(e)}}function Z$e(e){const t=`${e.getFullYear()}`.padStart(4,"0"),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0");return`${t}-${n}-${r}`}const Qs=$.forwardRef(function(t,n){return f.jsx(h.TextInput,{padding:M7,...t,ref:n,sx:{...t.sx,alignSelf:"stretch"}})}),M7={input:{inline:4},adornment:{inline:12}},X$e=({provider:e})=>eRe[e.toLowerCase()]??f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_6524_22412)",children:f.jsx("path",{d:"M7.99992 1.33333C4.31992 1.33333 1.33325 4.32 1.33325 8C1.33325 11.68 4.31992 14.6667 7.99992 14.6667C11.6799 14.6667 14.6666 11.68 14.6666 8C14.6666 4.32 11.6799 1.33333 7.99992 1.33333ZM2.66659 8C2.66659 7.59333 2.71992 7.19333 2.80659 6.81333L5.99325 10V10.6667C5.99325 11.4 6.59325 12 7.32658 12V13.2867C4.70658 12.9533 2.66659 10.7133 2.66659 8ZM11.9266 11.6C11.7533 11.06 11.2599 10.6667 10.6599 10.6667H9.99325V8.66667C9.99325 8.3 9.69325 8 9.32658 8H5.32658V6.66667H6.65992C7.02658 6.66667 7.32658 6.36667 7.32658 6V4.66667H8.65992C9.39325 4.66667 9.99325 4.06667 9.99325 3.33333V3.06C11.9466 3.84667 13.3333 5.76667 13.3333 8C13.3333 9.38667 12.7933 10.6533 11.9266 11.6Z",fill:"#6F6E77"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6524_22412",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),eRe={codepen:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_6523_22409)",children:f.jsx("path",{d:"M15.9879 5.44292C15.9843 5.42352 15.981 5.40413 15.9759 5.38517C15.9726 5.37375 15.9688 5.36298 15.9651 5.35177C15.9597 5.33497 15.9541 5.31816 15.9474 5.30179C15.9427 5.29037 15.9373 5.27938 15.9321 5.26839C15.9248 5.25288 15.9173 5.23758 15.9086 5.22271C15.9026 5.21172 15.8957 5.20138 15.889 5.19082C15.8798 5.1766 15.8703 5.1626 15.8599 5.14902C15.8524 5.13889 15.8446 5.1292 15.8365 5.1195C15.8257 5.10657 15.8141 5.09429 15.8024 5.08223C15.7934 5.07318 15.7843 5.06413 15.7748 5.05529C15.7623 5.04387 15.7494 5.0331 15.7358 5.02276C15.7255 5.01479 15.7154 5.0066 15.7046 4.99927C15.7007 4.99647 15.6973 4.99324 15.6932 4.99065L8.38116 0.115543C8.15039 -0.0385144 7.84939 -0.0385144 7.61863 0.115543L0.306176 4.99044C0.302082 4.99302 0.29885 4.99626 0.294756 4.99906C0.283983 5.0066 0.273856 5.01457 0.263514 5.02254C0.250155 5.0331 0.237011 5.04387 0.224515 5.05486C0.215034 5.06348 0.205985 5.07253 0.19715 5.0818C0.185084 5.09386 0.17388 5.10614 0.162892 5.11907C0.154704 5.12877 0.146947 5.13846 0.139406 5.14924C0.129064 5.16281 0.119583 5.1766 0.110318 5.19104C0.103639 5.20159 0.0969593 5.21194 0.0907108 5.22293C0.0820922 5.23779 0.0745509 5.25309 0.0674405 5.26817C0.0622694 5.27916 0.0566673 5.29037 0.0521425 5.30157C0.0454631 5.31795 0.0396456 5.33475 0.0342589 5.35156C0.030596 5.36276 0.0267177 5.37375 0.0237011 5.38388C0.0187455 5.40284 0.0150825 5.42201 0.0116351 5.44162C0.00969592 5.45153 0.00732581 5.46123 0.00603302 5.47136C0.00215465 5.50109 0 5.53082 0 5.56121V10.4372C0 10.4673 0.00215465 10.4975 0.00646395 10.527C0.00797221 10.5378 0.0107733 10.5464 0.0129279 10.5568C0.0163753 10.5762 0.0193919 10.5955 0.0258558 10.6149C0.0288723 10.6257 0.0323198 10.6365 0.0366291 10.6483C0.0420157 10.6656 0.0474023 10.6828 0.0538662 10.6985C0.058391 10.7093 0.0646395 10.7201 0.0689488 10.7309C0.0760591 10.7459 0.0840314 10.761 0.09265 10.7768C0.098683 10.7875 0.105578 10.7983 0.112042 10.8082C0.121307 10.8233 0.131434 10.8362 0.142207 10.8491C0.149748 10.8599 0.157289 10.8685 0.165908 10.8789C0.176897 10.8918 0.187455 10.9047 0.200382 10.9162C0.209217 10.9248 0.21762 10.9355 0.228393 10.942C0.24089 10.9528 0.254249 10.9636 0.267177 10.9748C0.277519 10.9834 0.288723 10.9898 0.297342 10.9982C0.301436 11.0004 0.303806 11.0047 0.308115 11.0067L7.61863 15.8841C7.73412 15.9617 7.86641 16.0005 8 15.9998C8.13359 15.9992 8.26588 15.9611 8.38137 15.8841L15.6938 11.0092C15.6979 11.0067 15.7014 11.0036 15.7052 11.0008C15.716 10.9933 15.7261 10.9853 15.7365 10.9773C15.7498 10.9668 15.763 10.9558 15.7755 10.9446C15.785 10.9362 15.794 10.9269 15.8031 10.9179C15.8149 10.9058 15.8263 10.8935 15.8371 10.8806C15.8453 10.8709 15.8531 10.8612 15.8606 10.8509C15.8709 10.8373 15.8804 10.8233 15.8897 10.8091C15.8964 10.7987 15.903 10.7882 15.9093 10.7776C15.9179 10.7625 15.9254 10.7472 15.9328 10.7317C15.9379 10.7207 15.9433 10.7097 15.9481 10.6985C15.9548 10.6819 15.9604 10.6651 15.9657 10.6483C15.9694 10.6371 15.9733 10.6261 15.9765 10.6149C15.9815 10.596 15.9849 10.5766 15.9886 10.5572C15.9903 10.5473 15.9929 10.5376 15.994 10.5275C15.9978 10.4977 16 10.468 16 10.4376V5.5625C16 5.53212 15.9976 5.50238 15.994 5.47265C15.9922 5.46209 15.989 5.45347 15.9869 5.44292H15.9879ZM7.99978 9.62638L5.56826 8.00005L7.99978 6.37351L10.4315 8.00005L7.99978 9.62638ZM7.31245 5.17919L4.33171 7.17288L1.92561 5.56336L7.31245 1.97221V5.17919ZM3.09515 7.99984L1.37531 9.15021V6.84947L3.09515 7.99984ZM4.33171 8.82765L7.31245 10.8211V14.0281L1.92561 10.4365L4.33171 8.82722V8.82765ZM8.68733 10.8207L11.6681 8.82722L14.0744 10.4365L8.68733 14.0277V10.8207ZM12.9046 8.00027L14.6247 6.84969V9.15064L12.9046 7.99984V8.00027ZM11.6681 7.17288L8.68733 5.1794V1.97221L14.0744 5.56336L11.6681 7.17288Z",fill:"black"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22409",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),codesandbox:f.jsxs("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_6523_22406)",children:f.jsx("path",{d:"M6.24312 14.1129V8.35021L1.28724 5.49888V8.78388L3.55732 10.0999V12.5702L6.24312 14.1129ZM7.53036 14.1468L10.2658 12.571V10.0422L12.5506 8.71812V5.47426L7.53036 8.3727V14.1468ZM11.8904 4.36906L9.25164 2.83995L6.93472 4.18436L4.60022 2.8386L1.93795 4.38817L6.90626 7.24665L11.8904 4.36906ZM0 12.0115V4.02675L6.91821 0L13.8378 4.00984V11.9988L6.91805 15.985L0 12.0115Z",fill:"black"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22406",children:f.jsx("rect",{width:"13.8378",height:"16",fill:"white"})})})]}),dailymotion:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_6523_22345)",children:[f.jsx("path",{d:"M16 0H0V16H16V0Z",fill:"white"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.73038 10.3003C8.40789 10.6268 8.00377 10.7901 7.51804 10.7901C7.04025 10.7901 6.64411 10.6308 6.32956 10.3122C6.01503 9.99367 5.85776 9.58351 5.85776 9.08176C5.85776 8.60389 6.01901 8.20766 6.3415 7.89306C6.66401 7.57847 7.06016 7.42118 7.52998 7.42118C7.84849 7.42118 8.13715 7.49484 8.39594 7.64219C8.65474 7.78953 8.8558 7.99063 8.99913 8.2455C9.14246 8.50034 9.21412 8.77908 9.21412 9.08176C9.21412 9.56757 9.05287 9.97376 8.73038 10.3003ZM9.10662 3.58632V6.35792C8.82791 6.07918 8.53131 5.87808 8.21678 5.75463C7.90223 5.63118 7.54988 5.56946 7.1597 5.56946C6.53062 5.56946 5.96527 5.72476 5.4636 6.03538C4.96193 6.34597 4.57176 6.77007 4.29305 7.30768C4.01435 7.84528 3.875 8.44062 3.875 9.09369C3.875 9.76269 4.01236 10.366 4.28708 10.9036C4.5618 11.4412 4.95197 11.8653 5.45763 12.1759C5.96328 12.4865 6.54258 12.6418 7.19553 12.6418C8.14312 12.6418 8.80403 12.3312 9.17831 11.71H9.20218V12.5595H11.0894V3.15625L9.10662 3.58632Z",fill:"#232323"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22345",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),flickr:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("rect",{width:"16",height:"16",fill:"white"}),f.jsxs("g",{clipPath:"url(#clip0_6523_22379)",children:[f.jsx("path",{d:"M8.43286 7.78387C8.43286 9.321 9.67925 10.5674 11.2166 10.5674C12.7538 10.5674 13.9999 9.321 13.9999 7.78387C13.9999 6.24675 12.7538 5.00061 11.2166 5.00061C9.67925 5.00061 8.43286 6.24675 8.43286 7.78387Z",fill:"#FF0084"}),f.jsx("path",{d:"M2 7.78408C2 9.32121 3.24614 10.5676 4.78352 10.5676C6.32089 10.5676 7.56703 9.32121 7.56703 7.78408C7.56703 6.24695 6.32089 5.00081 4.78352 5.00081C3.24614 5.00081 2 6.24695 2 7.78408Z",fill:"#0063DC"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22379",children:f.jsx("rect",{width:"12",height:"5.568",fill:"white",transform:"translate(2 5)"})})})]}),giphy:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("rect",{width:"16",height:"16",fill:"#121212"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3.38889V12.2778H5.11111V3.38889H4Z",fill:"#00FF99"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6663 5.61111V12.2778H11.7774V5.61111H10.6663Z",fill:"#9933FF"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.75 3H4V4.11111H8.83333V3H7.75Z",fill:"#FFF35C"}),f.jsx("path",{d:"M9.00041 4.11111H7.33374H8.83374V3.77778L9.00041 4.11111Z",fill:"#999999"}),f.jsx("path",{d:"M8.83374 4.11111H7.33374L8.44485 3L8.83374 3.77778V4.11111Z",fill:"#999237"}),f.jsx("path",{d:"M10.6663 7.44444V5.77778L11.7774 6.33333L10.6663 7.44444Z",fill:"#5C1F99"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6667 11.8889H4V13H11.7778V11.8889H10.6667Z",fill:"#00CCFF"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.6668 5.22222V4.11111H9.55569V3H8.44458V3.90739V5.0185V6.33333H9.55569H10.6668H11.7779V5.22222H10.6668Z",fill:"#FF6666"})]}),instagram:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[f.jsxs("g",{clipPath:"url(#clip0_6523_22356)",children:[f.jsx("mask",{id:"mask0_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:f.jsx("path",{d:"M4.70325 0.0949238C3.85627 0.1349 3.27778 0.270564 2.77227 0.468642C2.24897 0.672648 1.80537 0.946046 1.36408 1.38914C0.922279 1.83249 0.650958 2.27688 0.448504 2.8007C0.252489 3.3075 0.119662 3.88627 0.0822604 4.73377C0.045126 5.58283 0.0366102 5.85363 0.0407495 8.01522C0.0448729 10.1765 0.0544124 10.4479 0.0949012 11.2972C0.135388 12.1439 0.270546 12.7222 0.468623 13.2279C0.672886 13.7512 0.946004 14.1946 1.38935 14.6361C1.83245 15.0777 2.27708 15.3487 2.80115 15.5515C3.30744 15.7472 3.88644 15.8806 4.73369 15.9177C5.58273 15.9551 5.85379 15.9634 8.01483 15.9592C10.1769 15.9551 10.448 15.9456 11.297 15.9053C12.144 15.8648 12.722 15.7292 13.228 15.5316C13.7513 15.3268 14.1949 15.0542 14.6362 14.6109C15.0775 14.1678 15.3488 13.7231 15.5512 13.199C15.7473 12.6927 15.8806 12.1137 15.9175 11.267C15.9546 10.4174 15.9634 10.1461 15.9593 7.98478C15.9551 5.8232 15.9453 5.55239 15.9051 4.7036C15.8649 3.85609 15.7292 3.27811 15.5314 2.77208C15.3269 2.24877 15.054 1.80567 14.6109 1.36387C14.1678 0.922574 13.7232 0.650729 13.1991 0.448785C12.6926 0.252768 12.1138 0.119166 11.2666 0.0825425C10.4175 0.0448876 10.1465 0.0366393 7.98465 0.0407642C5.82336 0.0448892 5.5523 0.0541772 4.70325 0.0949238ZM4.79611 14.485C4.02004 14.4512 3.59863 14.3222 3.31776 14.2142C2.94585 14.0703 2.68046 13.8977 2.40114 13.6205C2.12234 13.3422 1.94928 13.0776 1.80408 12.7064C1.69497 12.4255 1.5637 12.0046 1.52734 11.2286C1.48788 10.3896 1.47886 10.1378 1.47498 8.01237C1.47086 5.88742 1.47859 5.63569 1.51522 4.79593C1.54848 4.02038 1.67822 3.59843 1.78602 3.31782C1.92993 2.94539 2.10196 2.68051 2.37973 2.4012C2.65801 2.12187 2.92263 1.94933 3.29402 1.80412C3.57463 1.69451 3.99555 1.56426 4.77134 1.52738C5.61084 1.48766 5.8623 1.47915 7.98723 1.47502C10.1127 1.47089 10.3644 1.47838 11.2042 1.51526C11.9797 1.54904 12.4016 1.67749 12.682 1.78607C13.0541 1.92998 13.3195 2.1015 13.5986 2.37979C13.8777 2.65808 14.0507 2.92218 14.1959 3.29435C14.3055 3.57418 14.4358 3.99562 14.4724 4.77117C14.5124 5.61068 14.5214 5.8624 14.5253 7.98736C14.5294 10.1128 14.5217 10.3646 14.4848 11.2038C14.451 11.9799 14.3223 12.4016 14.214 12.6827C14.0701 13.0543 13.898 13.3197 13.62 13.5991C13.342 13.8773 13.0774 14.0509 12.7057 14.1961C12.4256 14.3055 12.0042 14.436 11.2289 14.4729C10.3894 14.5123 10.1379 14.5214 8.01225 14.5252C5.88732 14.5294 5.63586 14.5214 4.79611 14.485ZM11.2854 3.74493C11.2864 4.27211 11.7151 4.69896 12.2422 4.69792C12.7697 4.69689 13.1965 4.2685 13.1957 3.74132C13.1947 3.21414 12.7661 2.78704 12.2386 2.78807C11.7112 2.7891 11.2844 3.21775 11.2854 3.74493ZM3.91277 8.00773C3.91714 10.2653 5.75063 12.0913 8.0076 12.0869C10.2648 12.0825 12.0919 10.2495 12.0875 7.99201C12.0831 5.73526 10.2494 3.90819 7.99188 3.91257C5.73489 3.91696 3.90837 5.75073 3.91277 8.00773ZM5.34648 8.0049C5.3439 6.53969 6.52978 5.34942 7.99471 5.34683C9.45991 5.344 10.6504 6.52937 10.6533 7.99484C10.6561 9.46031 9.47022 10.6503 8.00477 10.6532C6.53984 10.656 5.34932 9.47037 5.34648 8.0049Z",fill:"white"})}),f.jsxs("g",{mask:"url(#mask0_6523_22356)",children:[f.jsx("mask",{id:"mask1_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:f.jsx("path",{d:"M16.5905 -0.583628H-0.603516V16.6106H16.5905V-0.583628Z",fill:"white"})}),f.jsxs("g",{mask:"url(#mask1_6523_22356)",children:[f.jsx("mask",{id:"mask2_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:f.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),f.jsxs("g",{mask:"url(#mask2_6523_22356)",children:[f.jsx("mask",{id:"mask3_6523_22356",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"-1",y:"-1",width:"18",height:"18",children:f.jsx("path",{d:"M16.6701 -0.663237H-0.683105V16.6902H16.6701V-0.663237Z",fill:"white"})}),f.jsx("g",{mask:"url(#mask3_6523_22356)",children:f.jsx("rect",{x:"-0.688721",y:"-0.665792",width:"17.3622",height:"17.3622",fill:"url(#pattern0)"})})]})]})]})]}),f.jsxs("defs",{children:[f.jsx("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:f.jsx("use",{xlinkHref:"#image0_6523_22356",transform:"scale(0.000439947)"})}),f.jsx("clipPath",{id:"clip0_6523_22356",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})}),f.jsx("image",{id:"image0_6523_22356",width:"2273",height:"2275",xlinkHref:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEAlgCWAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMAEAMCAwYAAFokAABijgAAd23/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoXHh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoaJjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEICOMI4QMBIgACEQEDEQH/xADDAAEBAQEBAQEBAAAAAAAAAAAAAQUEBgMHAgEBAQADAQEAAAAAAAAAAAAAAAECAwUEBhAAAQIEBAcBAQEBAQAAAAAAAAMFcIA1FiIjMxQBEQIyEwQ0MRIGFZARAAADCAICAgEABwUJAQAAAAADo4ABcqLSBDREsXNDRcECESExQVGREjIQYdETM3GB8VJiksLiFBUSAAECBgEEAwABAwIHAAAAAAABAnCxcpIDM0QxMkNFcZFzERBBEmGCoCFRgUKDNP/aAAwDAQACEQMRAAAA9X5n5Z3e26jLei6jLRqMsajLGoyxqMsajLGoyxqMsajLJqMsajLGoyxqMsajLGoyxqMsalyqajLGoyxqMsajLJqMsajLGoyxqMsajLRqMsajLGoyxqMsajLGoyxqMsajLppswabMGmyxqMwumzIajLppsyGoyy6jLGoyxqMsuoyxqMsuoyxqTMhqzMi6jLGoyy6jLGoyy6jLGoyy6jLGoyxqMsuoyxqMuLqsoarKLqMsajLLqMsajLLqMsajLGoyi6rKGqyhqsouqyhqXKGoyy6jLGoyxqMouqyhqsoarKGqyi6rKGqyhqsouqyhqsoarKGqyhqMouqyhqsoarKGqyi6rKGqylarKGqyhqsoarKLqsoarJGsyRrMkazJGsyRrMka0yhqsouqyhqsoarKGqyhqsoarKGqylarKGqyi6rKGqyhqsqGsyRrMkazJGsyRrMkazJGsyRrMkazJ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osEq2ASrYBKqC2LBKqBUqoLUogpKWCkqoFiygEq2CkogtAiygEq2LAAKSiLALQAAAoCAKIogAAAAAPU8vVzfO8eK15xRFEURRFEURRFEURRFEURRFEVEURRFEUSgAAAAAAAAURVRRFEURRFJFEURVAAAAAABQAEURRFLFVFgAAlEVUURRFgFsURRABUUsWAVFEWALFVFgFRSwEVUWKlVFgBFWwEVUCpRBUUsFRRBbFEFRVsBFlAsWUlEFqVUCxZQEWWpVQKlVAJVsFJYBbFgFRZaAlVAoVFgFAsWUAAFRYAoAUAAAABFVFEoRRFEUeo5url+c44a8wAAAAAAACiKIoiiKIoiiKIoiiKIpJQAAAAAAAFIoiiKIoiiKIqgAAAAAAAoAAACKIqooiiLAAKSiKIpYogpKIoiwC2KIogpKIpYKiiLALYogIq2ASqiwBYqoCKtgIqoFiykoixUqosEq2LKSlgpKILYsEqostSiC2LAKiy1KILUqoBKtgIsoFiygqLFCkogtAiygAtSiACgEoiygUAAAKAAAAAAA9TzdPN87xg15gAAAAAAAAABAABRFEURRFEURRFEURQAAAACAACkURVRRFEUAAAAAABQAAAACURVRRFEURYBaAlEURRFlARSxZQCURRBalEUQVFLFglVFEFsUQEVbFglEWUlLFlJRFlqURZalEFRSwEWUFsWCVUWKlVAsWUFRYqVUFqUQVFipVQWpRBUWKFRZQLFlARZaAlVAoVFgFAJVsAAFAJRFgChQAAAAAAAHquXq5vneMGvMAABKAAAAAAAAAAQAAAAAoiiKIoigAAAAAAAUiiKIpIolAAAAKAAAAAAACkoiiKWKIqoAACKIqoogVKIqoBKIq2ASiKILYoiykoixQqKIFiqgEoiy1KIspKWCopYKiwC2LBKqBYqoFiygIstSqgWLKAiy1KqBUsoCLLUqoFSygIstCosAtiwCostASqgUCKqACgWLAKAAASqiwABQAAAAAPVc3VzfPcWK15xRFEURRFEURRFEURRKAAAAAQAAAAAURRFEUgAAAAAABRFEURQAFAAAAAAAgAWgAAJRFEVUURYAAJRFVFLAJRFVFglLFVFgBFWwEURZSUsWAVF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ww7ddj+GHbrsfww7d9j+GHbrsfww7ddj+GHbrsfww7ddj+GHbrsfww7ddj+GHbrsfww7ddj+GHbrsfww7ddj+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfww7d9j+GHbvsfw5h277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3fY/hh277H8MO3XY/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26jfww7dRv4Yduo38MO3Ub+GHbqN/DDt1G/hh26j+GHbqP4Yduo38MO3Ub+GHbqP4Yduo/hh26j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmP4YduY/hh25j+GHbmNh25jYduY2HbmNh25jYduY2HbmNh24jYduI2HbiNh24jYduI2H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eqPXqj16o9eqPXqj1yo9cqPXKj1yo9cqPXLD1yw9csPXLD1yw9csPWrD1qw9asPWrD1qw9asPWrD1qw9asPWrD1qw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1iw9YsPWLD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrD1aw9WsPVrB34/8Ay/z/AH/53yHY/wDU/E/0v+P7/wCz/9k="})]})]}),pinterest:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_6570_25513)",children:[f.jsx("rect",{width:"15.996",height:"16",rx:"2",fill:"#CC2127"}),f.jsx("path",{d:"M7.999 2C4.68555 2 2 4.68555 2 7.999C2 10.5406 3.58174 12.7102 5.81336 13.5861C5.76137 13.1121 5.71338 12.3843 5.83336 11.8644C5.94134 11.3964 6.53724 8.88285 6.53724 8.88285C6.53724 8.88285 6.35727 8.52291 6.35727 7.993C6.35727 7.15914 6.84119 6.53524 7.44309 6.53524C7.95501 6.53524 8.20297 6.91918 8.20297 7.3811C8.20297 7.89502 7.87502 8.66489 7.70705 9.37877C7.56507 9.97667 8.007 10.4626 8.5949 10.4626C9.66072 10.4626 10.4806 9.33878 10.4806 7.71505C10.4806 6.27929 9.44876 5.27345 7.975 5.27345C6.26729 5.27345 5.26546 6.55324 5.26546 7.87702C5.26546 8.39293 5.46342 8.94484 5.71138 9.24679C5.75937 9.30678 5.76737 9.35877 5.75337 9.41876C5.70738 9.60873 5.6074 10.0167 5.5874 10.0987C5.56141 10.2086 5.50142 10.2326 5.38743 10.1786C4.63756 9.83069 4.16964 8.73488 4.16964 7.85502C4.16964 5.96334 5.54541 4.22563 8.13298 4.22563C10.2146 4.22563 11.8304 5.70938 11.8304 7.69105C11.8304 9.75871 10.5266 11.4224 8.71688 11.4224C8.10898 11.4224 7.53708 11.1065 7.34111 10.7345C7.34111 10.7345 7.04116 11.8804 6.96717 12.1603C6.83119 12.6822 6.46526 13.3341 6.2213 13.732C6.7832 13.906 7.3791 14 7.997 14C11.3104 14 13.996 11.3144 13.996 8.001C13.998 4.68555 11.3124 2 7.999 2Z",fill:"white"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6570_25513",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),spotify:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_6523_22402)",children:f.jsx("path",{d:"M12.6609 7.10585C10.121 5.59751 5.93158 5.45882 3.50697 6.1947C3.11759 6.31287 2.70584 6.09298 2.5879 5.70373C2.46988 5.31411 2.68945 4.90265 3.07911 4.78429C5.86241 3.93945 10.4892 4.1026 13.4132 5.83828C13.7634 6.04622 13.8782 6.49851 13.6707 6.84813C13.4629 7.19833 13.0103 7.31376 12.6609 7.10585ZM12.5777 9.33993C12.3995 9.62908 12.0215 9.71979 11.7327 9.54223C9.61522 8.24063 6.38637 7.86357 3.88123 8.624C3.55636 8.72218 3.21323 8.53899 3.11455 8.21475C3.01666 7.88989 3.19992 7.54738 3.5242 7.44859C6.38597 6.58018 9.9436 7.00081 12.3756 8.49536C12.6644 8.67322 12.7553 9.05146 12.5777 9.33993ZM11.6136 11.4855C11.472 11.7177 11.1697 11.7904 10.9383 11.6489C9.08801 10.518 6.75909 10.2627 4.01637 10.8891C3.75207 10.9497 3.48866 10.7841 3.42838 10.5198C3.36785 10.2556 3.53284 9.99217 3.79772 9.93186C6.79916 9.2457 9.37381 9.54101 11.4506 10.8101C11.6822 10.9515 11.7551 11.254 11.6136 11.4855ZM8.00002 0.120623C3.64839 0.120623 0.120605 3.64834 0.120605 7.99989C0.120605 12.352 3.64839 15.8794 8.00002 15.8794C12.3517 15.8794 15.8794 12.352 15.8794 7.99989C15.8794 3.64834 12.3517 0.120623 8.00002 0.120623Z",fill:"#1ED760"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22402",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),twitter:f.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M14.3193 4.31285C14.329 4.45301 14.329 4.59317 14.329 4.73462C14.329 9.04475 11.0516 14.0156 5.05865 14.0156V14.0131C3.28832 14.0156 1.55478 13.508 0.0644531 12.5507C0.321873 12.5817 0.580582 12.5972 0.839937 12.5979C2.30703 12.5992 3.7322 12.1063 4.88639 11.1988C3.4922 11.1724 2.26961 10.2623 1.84252 8.93366C2.3309 9.02796 2.83413 9.00858 3.31349 8.87746C1.79349 8.57001 0.699937 7.23299 0.699937 5.68023C0.699937 5.66602 0.699937 5.65246 0.699937 5.63889C1.15284 5.89144 1.65994 6.0316 2.17865 6.0471C0.747034 5.08923 0.305743 3.18251 1.17026 1.69176C2.82445 3.7296 5.2651 4.96844 7.8851 5.09956C7.62252 3.96664 7.98123 2.77947 8.82768 1.98307C10.1399 0.748096 12.2038 0.811395 13.4374 2.12452C14.167 1.98048 14.8664 1.71243 15.5064 1.33264C15.2632 2.0877 14.7541 2.72909 14.0741 3.13665C14.7199 3.06044 15.3509 2.88734 15.9451 2.62316C15.5077 3.2794 14.9567 3.85103 14.3193 4.31285Z",fill:"#1D9BF0"})}),vimeo:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_6523_22340)",children:[f.jsx("path",{d:"M16 14.4C16 15.28 15.28 16 14.4 16H1.6C0.72 16 0 15.28 0 14.4V1.6C0 0.72 0.72 0 1.6 0H14.4C15.28 0 16 0.72 16 1.6V14.4Z",fill:"#1AB7EA"}),f.jsx("path",{d:"M13.9945 5.3084C13.9391 6.42815 13.1229 7.97447 11.5458 9.93402C9.91331 11.9736 8.52987 13 7.40928 13C6.70372 13 6.12267 12.3735 5.63846 11.1338C5.32027 9.98735 4.98824 8.85427 4.67005 7.70786C4.31036 6.46814 3.92299 5.84161 3.50796 5.84161C3.42495 5.84161 3.10676 6.02824 2.56721 6.38816L2 5.68165C2.59488 5.1751 3.17593 4.68187 3.75698 4.17532C4.54554 3.52214 5.14042 3.17555 5.54162 3.13556C6.46853 3.05557 7.04958 3.66877 7.27093 4.97514C7.50612 6.40149 7.67213 7.28129 7.75514 7.62788C8.01799 8.80095 8.32235 9.40081 8.64054 9.40081C8.88956 9.40081 9.26309 9.01423 9.77497 8.2544C10.273 7.49457 10.5497 6.90804 10.5774 6.50813C10.6465 5.85494 10.3837 5.52169 9.77497 5.52169C9.48444 5.52169 9.19392 5.58834 8.88956 5.70831C9.48444 3.84206 10.605 2.94893 12.2652 3.00225C13.4826 3.02891 14.0637 3.80207 13.9945 5.3084Z",fill:"white"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_6523_22340",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),youtube:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M15.6656 3.75817C15.4816 3.06609 14.9395 2.5211 14.2511 2.33614C13.0034 2 8 2 8 2C8 2 2.99666 2 1.7489 2.33614C1.06051 2.5211 0.518324 3.06609 0.334339 3.75817C0 5.01251 0 7.62963 0 7.62963C0 7.62963 0 10.2467 0.334339 11.5012C0.518324 12.1932 1.06051 12.7381 1.7489 12.9232C2.99666 13.2593 8 13.2593 8 13.2593C8 13.2593 13.0034 13.2593 14.2511 12.9232C14.9395 12.7381 15.4816 12.1932 15.6656 11.5012C16 10.2467 16 7.62963 16 7.62963C16 7.62963 16 5.01251 15.6656 3.75817Z",fill:"#ED1D24"}),f.jsx("path",{d:"M6.36353 10.0058L10.5453 7.62974L6.36353 5.25349V10.0058Z",fill:"white"})]})};function L7(e){const{debouncedUrl:t,content:n,onContentChange:r,selected:i}=e,o=$.useRef(null),[a,s]=$.useState(!1);Ne.useOnChange(t,()=>{var c;a&&(s(!1),(c=o.current)==null||c.reset())});function u(){s(!0),r(void 0)}return Fr.toURL(t)?t===(n==null?void 0:n.embed_url)?f.jsx(cC,{content:n,selected:i}):f.jsx(h.ErrorBoundary,{ref:o,renderError:tRe,onError:u,children:f.jsx($.Suspense,{fallback:n&&f.jsx(cC,{content:n,selected:i}),children:f.jsx(nRe,{url:t,selected:i,onContentChange:r})})}):null}function tRe(){return f.jsxs(h.Box,{backgroundColor:"grey2",borderRadius:6,padding:16,gap:4,children:[f.jsx(h.Icon,{name:"alert",size:"small",color:"grey11"}),f.jsx(h.Text,{variant:"smallBold",color:"grey11",children:"There is no embed data available."})]})}function cC(e){const{content:t,selected:n}=e,{thumbnail:r,provider:i,author:o,url:a,subtitle:s}=aRe(t);return f.jsxs(h.PreviewCard,{selected:n,children:[f.jsx(h.PreviewImage,{src:r.url,aspectRatio:r.aspectRatio}),f.jsxs(h.PreviewContent,{children:[f.jsxs(h.Box,{display:"flex",alignItems:"center",gap:4,children:[f.jsx(X$e,{provider:i}),f.jsx(h.Text,{variant:"smallBold",color:"grey12",noWrap:!0,children:i}),o&&f.jsx(h.Text,{variant:"small",color:"grey11",noWrap:!0,children:o})]}),f.jsx(h.Text,{variant:"smallBold",href:a,children:s})]})]})}function nRe(e){const{url:t,onContentChange:n,selected:r}=e,i=rRe({url:t,onContentChange:n});return f.jsx(cC,{content:i,selected:r})}function rRe(e){const{url:t,onContentChange:n}=e,{embedApiEndpoint:r}=Ee(),i=Ve.useRequest(iRe,[t,r]),o=Ne.useStableCallback(n);return $.useEffect(()=>{const a=h.handleEditorFlushSyncError(()=>o(i));return()=>{clearTimeout(a)}},[i,o]),i}function iRe(e,t){const n=new URL(t);return n.searchParams.set("url",e),pe.request(n,{okType:oRe(e)})}function oRe(e){return L.object({type:L.string(),version:L.string().or(L.number()).nullish(),title:L.string().nullish(),author_name:L.string().nullish(),author_url:L.string().nullish(),provider_name:L.string().nullish(),provider_url:L.string().nullish(),cache_age:L.string().or(L.number()).nullish(),thumbnail_url:L.string().nullish(),thumbnail_width:L.number().nullish(),thumbnail_height:L.number().nullish(),html:L.string().nullish()}).passthrough().transform(t=>{const n={embed_url:e};return{...n,__TYPE__:"EmbedContent",type:t.type,version:t.version,title:t.title,author_name:t.author_name,author_url:t.author_url,provider_name:t.provider_name,provider_url:t.provider_url,cache_age:t.cache_age,thumbnail_url:t.thumbnail_url,thumbnail_width:t.thumbnail_width,thumbnail_height:t.thumbnail_height,html:t.html,all:{...n,...t}}})}function aRe(e){let t="";switch(e.type){case"video":t=e.title??"";break;case"photo":t=`View this post${e.provider_name?` on ${e.provider_name}`:""}`;break;default:t=`Open${e.provider_name?` on ${e.provider_name}`:""}`}return{url:e.embed_url,thumbnail:{url:e.thumbnail_url??"",aspectRatio:e.type==="video"?"16:9":"1:1"},provider:e.provider_name??"",author:e.author_name??"",subtitle:t}}function sRe(e){const{id:t,readOnly:n,field:r,content:i,onContentChange:o}=e,a=Ne.useDebounceState({initialState:(i==null?void 0:i.embed_url)??"",startTransition:$.startTransition});function s(u){a.set(u),Fr.toURL(u)||o(void 0)}return f.jsxs(h.Field,{footer:Fr.toURL(a.value)&&f.jsx(h.FieldFooter,{children:f.jsx(L7,{debouncedUrl:a.debouncedValue,content:i,onContentChange:o})}),children:[f.jsx(h.FieldIcon,{name:"cloud"}),f.jsx(h.FieldLabel,{htmlFor:t,children:nr(r)}),f.jsx(h.FieldControl,{children:f.jsx(Qs,{id:t,readOnly:n,placeholder:Wc(r),value:a.value,onValueChange:s,variant:Fr.toURL(a.value)?"link":"normal",endAdornment:f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:()=>s("")})})})]})}function j7(e){return!(e.lat>85||e.lat<-85||e.lng>180||e.lng<-180)}function Gb(e){const t=/^.*@(-?\d+.\d+),(-?\d+.\d+).*$/,n=e.match(t);if(!n)return;const r=parseFloat(n[1]??""),i=parseFloat(n[2]??"");if(isNaN(r)||isNaN(i))return;const o={lat:r,lng:i};if(j7(o))return o}function XF(e){return e?`${e.lat}, ${e.lng}`:""}function ek(e){const t=/\(?([\d|.|-]*)[\s+]*,[\s]*([\d|.|-]*)\)?/,n=e.match(t);if(!n)return Gb(e);const r=parseFloat(n[1]??""),i=parseFloat(n[2]??"");if(isNaN(r)||isNaN(i))return Gb(e);const o={lat:r,lng:i};return j7(o)?o:Gb(e)}function uRe(e){const{field:t,id:n,readOnly:r,...i}=e,{onValueChange:o,displayedValue:a,onBlur:s,clearValue:u,isValidCoordinates:c}=cRe(i);return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"place"}),f.jsx(h.FieldLabel,{htmlFor:n,children:nr(t)}),f.jsx(h.FieldControl,{children:f.jsx(Qs,{id:n,onValueChange:o,placeholder:qR,readOnly:r,value:a,onBlur:s,variant:c?"link":"normal",endAdornment:f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!a,onClick:u})})})]})}function cRe(e){const{content:t,onContentChange:n}=e,r=XF(t==null?void 0:t.position),[i,o]=$.useState(r);function a(){const c=ek(i);if(!c)return o(""),n(void 0);const{lat:l,lng:d}=c;o(XF({lat:l,lng:d})),n({__TYPE__:"GeoPointContent",position:{lat:l,lng:d}})}function s(){o(""),n(void 0)}const u=!!ek(i);return{displayedValue:i,isValidCoordinates:u,onValueChange:o,onBlur:a,clearValue:s}}function U7(e){const{fieldLabel:t,imageLabel:n=[]}=e;return f.jsxs(h.CardHeaderTitle,{children:[f.jsx(h.Text,{variant:"bold",noWrap:!0,children:$p.overflow(t,30)}),n.length!==0&&f.jsx(h.Text,{color:"grey11",noSelect:!0,children:` • ${n.join(" • ")}`})]})}function B7(e){const{fieldLabel:t,isUpdating:n,readOnly:r,onMediaDialogOpenChange:i}=e;return f.jsxs(f.Fragment,{children:[f.jsx(h.CardHeader,{sx:{flexWrap:"wrap"},children:f.jsx(U7,{fieldLabel:t})}),f.jsx(h.CardContent,{children:f.jsx(h.Card,{color:"grey2",variant:"dashed",paddingBlock:12,radius:4,sx:{width:"100%"},children:f.jsx(h.CardContent,{children:f.jsxs(h.BlankSlate,{variant:"horizontal",children:[f.jsx(h.BlankSlateIcon,{name:"cloudUpload",lineColor:"purple9",backgroundColor:"purple4",size:"small"}),f.jsx(h.BlankSlateTitle,{children:n?"Preparing your image...":"You haven't selected an image"}),!r&&f.jsx(h.BlankSlateActions,{children:f.jsx(h.Button,{disabled:n,onClick:()=>i(!0),size:"medium",children:"Select image"})})]})})})})]})}const lRe=Ap({id:Yo(),width:Km(),height:Km(),urls:Ap({full:Yo(),small:Yo().transform(EEe)}),alt_description:Yo().optional(),description:Yo().nullable()}),fRe=Ap({results:jq(lRe)}).transform(e=>e.results);function P7(e,t){const n=new URL("search/photos",e);return n.searchParams.set("page","1"),n.searchParams.set("per_page","28"),n.searchParams.set("query",t),pe.request(n,{okType:fRe})}Ve.cache.registerFetcherConfig(P7,{cacheCapacity:5,revalidationStrategy:{type:"never"}});function dRe(e,t){const n=$.useRef(),r=Ee(),i=Ve.useRequest(P7,[e,t]);return Ne.useDebounce(t,1e3,()=>{var o;n.current&&t!==n.current&&((o=r.onAnalyticsEvent)==null||o.call(r,"Unsplash Image Searched")),n.current=t}),i}function pRe(e){const{onSelectedChange:t}=e,[n,r]=$.useTransition(),i=Ne.useDebounceState({initialState:"",ms:300,startTransition:r});return f.jsxs(h.Box,{flexDirection:"column",gap:16,width:"100%",position:"relative",children:[f.jsx(h.FormSearchInput,{value:i.value,placeholder:"Search on Unsplash.com",onValueChange:i.set}),f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(h7,{}),children:f.jsx($.Suspense,{fallback:f.jsx(hRe,{}),children:f.jsx(ARe,{term:i.debouncedValue,loading:n,onSelectedChange:t})})})]})}function ARe(e){const{term:t,onSelectedChange:n,loading:r}=e,{media:i,toggleSelected:o,selectedImageId:a}=mRe({term:t,onSelectedChange:n});return f.jsxs(f.Fragment,{children:[i.length>0&&f.jsx(W7,{children:i==null?void 0:i.map(s=>{const c=new URL(s.urls.full).searchParams.get("fm")??"jpg";return f.jsx(h.MediaCard,{url:s.urls.small,filename:s.description??"Unsplash Image",selected:a===s.id,onCardClick:()=>o(s),onCheckedChange:()=>o(s),extension:c,kind:"image",width:s.width,height:s.height,loading:r},s.id)})}),i.length===0&&f.jsx(p7,{})]})}function W7(e){const{children:t}=e;return f.jsx(h.ScrollArea,{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(min(100%, 250px), 1fr))",gap:16,padding:2,paddingBottom:16,position:"relative",width:"100%"},children:t})}function hRe(){return f.jsx(W7,{children:Qt.range(1,24).map(e=>f.jsx(C7,{},e))})}function mRe(e){var c;const{term:t,onSelectedChange:n}=e,{unsplashApiBaseUrl:r}=Ee(),i=dRe(r,t||"citrus fruit"),o=(c=i==null?void 0:i[0])==null?void 0:c.id,[a,s]=$.useState();$.useEffect(()=>{n==null||n([]),s(void 0)},[o,n]);function u(l){if(l.id===a)return s(void 0),n==null?void 0:n([]);s(l.id),n==null||n([{...l,url:l.urls.full,alt:l.alt_description}])}return{media:i,toggleSelected:u,selectedImageId:a}}function VR(e){const{open:t,onOpenChange:n,onMediaSelected:r,assetType:i}=e,o=Ee(),a=o.mediaLibrary,[s,u]=$.useState(()=>a?"media":"unsplash"),[c,l]=$.useState(new Set),[d,p]=$.useState([]),A=c.size+d.length,m=Ve.useFetcherData(mi);$.useEffect(()=>{!t||!a||a7({config:o,assetType:i})},[t,o,i,a]);function v(S){if(S!=="media"&&S!=="unsplash")throw new Error(`Invalid option ${S}.`);u(S)}function _(S){S||l(new Set),n(S)}const C=qwe({assetType:i,mediaDialogOpen:t});function I(){var S;if(s==="unsplash"){const y=d[0];if(!y)return;r(y),(S=o.onAnalyticsEvent)==null||S.call(o,"Unsplash Image Added")}else if(s==="media"){const w=m.flatMap(O=>O.items).filter(O=>c.has(O.id))[0];if(!w)return;r(w),C(w.id)}_(!1)}function x(){if(A===0)return"Select a media item to add to the page";if(A>1)return"Only one media item can be added to the page"}const{containerRef:g}=h.useAlert();return f.jsxs(h.Dialog,{open:t,onOpenChange:_,size:{width:"min(calc(100% - 48px), 2000px)",height:"calc(100% - 30px)"},position:"center",onPointerDownOutside:S=>{g&&Ne.refContainsTarget(g,S.target)&&S.preventDefault()},children:[f.jsx(h.DialogHeader,{icon:"image",title:"Media library"}),f.jsxs(h.DialogOptions,{value:s,onValueChange:v,padding:"small",width:"auto",children:[a&&f.jsx(h.DialogOptionsItem,{value:"media",icon:"photo"}),f.jsx(h.DialogOptionsItem,{value:"unsplash",icon:"unsplash"})]}),f.jsx(h.DialogContent,{children:f.jsxs(h.Box,{flexDirection:"column",flexGrow:1,overflow:"hidden",children:[f.jsx(wq,{}),f.jsxs(h.Box,{overflow:"hidden",backgroundColor:"grey2",padding:{top:16,inline:16},flexGrow:1,children:[s==="media"&&f.jsx(E7,{assetType:i,onSelectedChange:l}),s==="unsplash"&&f.jsx(pRe,{onSelectedChange:p})]})]})}),f.jsxs(h.DialogActions,{children:[f.jsx(h.DialogCancelButton,{}),f.jsx(h.DialogActionButton,{onClick:I,disabled:A!==1,tooltipLabel:x(),children:"Add to page"})]})]})}const D7=$.forwardRef(function(t,n){const{isMediaDialogOpen:r,selected:i,children:o,onMediaSelected:a,onMediaDialogOpenChange:s}=t;return f.jsxs(h.Card,{ref:n,color:i?"indigo2":"grey2",variant:i?"selected":"dashed",paddingBlock:12,radius:4,children:[o,f.jsx(VR,{open:r,onOpenChange:s,onMediaSelected:a,assetType:"image"})]})});function K7(e){const{contentView:t,croppedImage:n}=e,{width:r,height:i,x:o,y:a,zoom:s}=n,u=vRe({origin:t.origin,croppedImage:n});return{...t,width:r,height:i,url:u,edit:{...t.edit,zoom:s,crop:{x:o,y:a}}}}function gRe(e){var c,l,d;const{field:t,content:n,thumbnail:r,croppedImage:i}=e;if(r===md)return N7({content:n,croppedImage:i});const o=Ce.isImageContent(n),a=(l=(c=t==null?void 0:t.config)==null?void 0:c.thumbnails)==null?void 0:l.find(p=>p.name===r),s=o?(d=n.thumbnails)==null?void 0:d[r]:void 0;if(!a||!s)return n;const u=K7({contentView:s,croppedImage:i});return u.url===s.url?n:{...n,thumbnails:o?{...n.thumbnails,[r]:u}:void 0}}function N7(e){const{content:t,croppedImage:n}=e,r=K7({contentView:t,croppedImage:n});return r.url===t.url?t:{...t,...r}}function vRe(e){const{origin:t,croppedImage:n}=e,{x:r,y:i,width:o,height:a,cropHeight:s,cropWidth:u}=n,c=new URL(t.url),l=t.height!==a||t.width!==o;if(r!==0||i!==0||s!==t.height||u!==t.width){const p=[r,i,u,s].map(Math.round).join(",");c.searchParams.set("rect",p),c.searchParams.set("w",o.toString()),c.searchParams.set("h",a.toString())}return l&&(c.searchParams.set("w",o.toString()),c.searchParams.set("h",a.toString())),c.toString()}function yRe(e){const{edit:{crop:{x:t,y:n},zoom:r},width:i,height:o,origin:{width:a,height:s}}=e;let u,c;const l=a/s,d=i/o;return d>=l?(u=a/r,c=u/d):(c=s/r,u=c*d),{x:t,y:n,width:i,height:o,zoom:r,cropWidth:u,cropHeight:c}}function bRe(e){const{selectedImage:t,imageCrop:n,setImageCrop:r}=e,{width:i,height:o,zoom:a,cropHeight:s,cropWidth:u}=n,c=t.contentView,l={x:n.x,y:n.y,width:u,height:s},[d,p]=$.useState(),A=(c==null?void 0:c.origin.url)??"",m=!(t!=null&&t.thumbnail.height&&(t!=null&&t.thumbnail.width));function v(g,S){const y=parseInt(S);isNaN(y)||y<=0||!m||r({...n,[g]:y})}function _(g){r({...n,cropWidth:g.width,cropHeight:g.height,x:g.x,y:g.y})}function C(g){r({...n,zoom:g})}function I(){p(Vh),r({...n,...Vh})}function x(){c&&(p(Vh),r({...n,...Vh,zoom:1,cropWidth:c.width,cropHeight:c.height}))}return f.jsxs(h.Box,{padding:{inline:24,block:16},flexDirection:"column",gap:16,height:"100%",overflowY:"auto",alignItems:"center",children:[f.jsxs(h.Box,{gap:8,height:32,alignItems:"flex-start",width:"100%",children:[f.jsx(h.Tooltip,{content:"Center",children:f.jsx(h.Button,{color:"grey",size:"medium",startIcon:"centerFocusWeak",onClick:I})}),f.jsx(h.Tooltip,{content:"Cover",children:f.jsx(h.Button,{color:"grey",size:"medium",startIcon:"zoomOutMap",onClick:x})}),f.jsx(h.Separator,{orientation:"vertical"}),f.jsx(h.FormInput,{prefix:"W",prefixTooltip:"Width",placeholder:"width",type:"number",size:"medium",value:String(i),onValueChange:g=>v("width",g),sx:{width:100},disabled:!m}),f.jsx(h.FormInput,{prefix:"H",prefixTooltip:"Height",placeholder:"height",type:"number",size:"medium",value:String(o),onValueChange:g=>v("height",g),sx:{width:100},disabled:!m})]}),f.jsx(h.Cropper,{image:A,aspect:i/o,crop:d??{x:0,y:0},onCropChange:p,zoom:a,onZoomChange:C,onCropAreaChange:(g,S)=>_(S),initialCroppedAreaPixels:l}),f.jsx(h.Box,{width:"100%",maxWidth:320,children:f.jsx(h.Slider,{min:1,max:3,step:.01,value:[a],onValueChange:([g])=>C(g??1)})})]})}const Vh={x:0,y:0};function CRe(e){const{trigger:t,initialImages:n,renderTooltip:r}=e,{open:i,onOpenChange:o,ready:a,option:s,selectedImage:u,croppedImage:c,setCroppedImage:l,setReady:d,setOption:p}=SRe(e);return f.jsxs(h.Dialog,{trigger:t,onAnimationEnd:()=>d(!0),open:i,onOpenChange:o,renderTooltip:r,children:[f.jsx(h.DialogHeader,{icon:"photo",title:"Image editor"}),f.jsx(h.DialogOptions,{value:String(s),onValueChange:A=>p(Number(A)),children:n.map((A,m)=>f.jsx(h.DialogOptionsItem,{value:String(m),icon:"photo",title:A.labels[0]??"Main",subtitle:A.labels[1]??""},A.thumbnail.name))}),u&&f.jsx(h.DialogContent,{children:a&&c&&f.jsx(bRe,{selectedImage:u,imageCrop:c,setImageCrop:l},u.thumbnail.name)})]})}function SRe(e){const{initialImages:t,initialOption:n,onClose:r}=e,[i,o]=$.useState(_),[a,s]=$.useState(!1),[u,c]=$.useState(!1),[l,d]=$.useState(n);function p(C){C?(d(n),o(_())):(c(!1),r({option:l,croppedImages:i})),s(C)}const A=t[l],m=i[(A==null?void 0:A.thumbnail.name)??""];function v(C){if(!A)return;const I=A.thumbnail.name;o({...i,[I]:C})}function _(){return t.reduce((C,I)=>(I.contentView&&(C[I.thumbnail.name]=yRe(I.contentView)),C),{})}return{open:a,ready:u,option:l,selectedImage:A,croppedImage:m,setCroppedImage:v,setReady:c,setOption:d,onClose:r,onOpenChange:p}}function _Re(e){const{readOnly:t,altText:n,selected:r,onValueChange:i}=e,o=$.useId();return f.jsxs(h.Field,{selected:r,children:[f.jsx(h.FieldLabel,{htmlFor:o,children:"Alt text"}),f.jsx(h.FieldControl,{children:f.jsx(h.Box,{flexGrow:1,height:40,children:f.jsx(Qs,{id:o,placeholder:"Short description for the visually impaired",readOnly:t,value:n,padding:{input:{inline:12}},onValueChange:i})})})]})}function IRe(e){const{fieldLabel:t,imageLabel:n,initialImages:r,page:i,displaySeparator:o=!0,isSVGContentView:a,visibility:s,onClear:u,onCropperDialogClose:c,onMediaDialogOpenChange:l}=e;return f.jsxs(h.Box,{display:"flex",flexDirection:"column",gap:12,children:[f.jsxs(h.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:4,children:[f.jsx(U7,{fieldLabel:t,imageLabel:n}),f.jsxs(h.CardHeaderActions,{sx:{visibility:s},children:[f.jsx(CRe,{trigger:f.jsx(h.Button,{startIcon:"crop",disabled:a,hiddenLabel:"Crop & Resize"}),renderTooltip:d=>f.jsx(h.Tooltip,{content:"Crop & Resize",children:d}),initialImages:r,initialOption:i,onClose:c}),f.jsx(h.Tooltip,{content:"Replace",children:f.jsx(h.Button,{startIcon:"imageSearch",hiddenLabel:"Replace",onClick:()=>l(!0)})}),f.jsx(h.Tooltip,{content:"Clear",children:f.jsx(h.Button,{onClick:u,startIcon:"delete",hiddenLabel:"Clear"})})]})]}),o&&f.jsx(h.Separator,{style:"dashed",decorative:!0})]})}function ju(e){const{description:t,largeIconName:n="public",loading:r,error:i,onEdit:o,onUnlink:a}=e,s=i?f.jsx($Re,{}):f.jsx(ERe,{...e,largeIconName:n,loading:r});return f.jsx(h.Card,{sx:{width:420},children:f.jsxs(h.CardContent,{gap:12,children:[f.jsxs(h.Box,{display:"grid",gridTemplateColumns:"max-content 1fr min-content",gridTemplateRows:"1fr",gap:8,children:[s,f.jsxs(h.ButtonGroup,{size:"medium",color:"grey",sx:{justifySelf:"end"},children:[o&&f.jsx(h.Button,{startIcon:"edit",onClick:o}),a&&f.jsx(h.Button,{startIcon:"linkOff",onClick:a})]})]}),!i&&f.jsx(wRe,{description:t,loading:r})]})})}function TRe(e){const{url:t,title:n,loading:r}=e;return r?f.jsx(q7,{height:16,width:80}):n?f.jsx(h.Text,{variant:"smallBold",href:t==null?void 0:t.toString(),children:n}):null}function xRe(e){const{subTitle:t,loading:n}=e;return n?f.jsx(h.Box,{padding:{block:2},children:f.jsx(q7,{height:12,width:60})}):t?f.jsx(h.Text,{variant:"small",color:"grey11",noWrap:!0,children:t}):null}function wRe(e){const{description:t,loading:n}=e;return!t||n?null:f.jsx(h.Text,{variant:"small",color:"grey11",children:t})}function ERe(e){const{largeIconName:t,title:n,url:r,loading:i,subTitle:o}=e;return f.jsxs(f.Fragment,{children:[f.jsx(h.ConjoinedIcons,{largeIconName:t,smallIconName:"link"}),f.jsxs(h.Box,{flexDirection:"column",minWidth:0,children:[f.jsx(TRe,{title:n,url:r,loading:i}),f.jsx(xRe,{subTitle:o,loading:i})]})]})}function $Re(){return f.jsxs(h.Box,{alignItems:"center",gap:8,children:[f.jsx(h.CircleIcon,{name:"alert",color:"tomato",size:"small"}),f.jsx(h.Text,{color:"tomato11",children:"Failed to load linked document data"})]})}function q7(e){const{width:t,height:n}=e;return f.jsx(h.Skeleton,{color:"grey5",borderRadius:6,width:t,height:n})}function RRe(e){const{documentType:t,documentUrl:n,title:r,statusColor:i,description:o,tags:a,tagsFilter:s,previewImageUrl:u,onSelect:c}=e;function l(d){return d.nativeEvent instanceof MouseEvent&&(d.metaKey||d.ctrlKey)?window.open(n,"_blank"):c()}return f.jsxs(h.Card,{paddingBlock:16,onSelect:l,children:[f.jsx(h.CardContent,{children:f.jsxs(h.Box,{justifyContent:"space-between",children:[f.jsxs(h.Box,{flexDirection:"column",gap:4,alignItems:"flex-start",flexGrow:1,children:[f.jsx(ORe,{documentType:t}),f.jsx(FRe,{title:r,statusColor:i}),f.jsx(kRe,{description:o})]}),f.jsx(MRe,{previewImageUrl:u})]})}),a.length>0&&f.jsx(LRe,{tags:a,tagsFilter:s})]})}function ORe(e){const{documentType:t}=e;return f.jsx(h.Badge,{maxWidth:150,size:"medium",title:`Type: ${t}`,icon:"description"})}function FRe(e){const{title:t,statusColor:n}=e;return f.jsxs(h.Box,{gap:8,alignItems:"center",children:[f.jsx(h.Dot,{color:n}),f.jsx(h.Text,{variant:"bold",children:t})]})}function kRe(e){const{description:t}=e,n=t==null?void 0:t.substring(0,150);return n?f.jsx(h.Text,{variant:"small",color:"grey11",children:`${n}${n!==t?"...":""}`}):f.jsx(h.Text,{variant:"smallItalic",color:"grey11",children:"No description available"})}function MRe(e){const{previewImageUrl:t}=e;return f.jsx(h.Box,{width:142,height:90,backgroundColor:"grey2",border:!0,borderRadius:6,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4,flexShrink:0,padding:8,children:t?f.jsx(h.Image,{src:t,sizing:"cover"}):f.jsxs(f.Fragment,{children:[f.jsx(h.Icon,{name:"hideImage",size:"large",color:"grey11"}),f.jsx(h.Text,{color:"grey11",variant:"small",children:"No preview available"})]})})}function LRe(e){const{tags:t}=e;return f.jsxs(h.CardFooter,{children:[f.jsxs(h.Box,{gap:4,alignItems:"center",children:[f.jsx(h.Icon,{name:"label",size:"small",color:"grey11"}),f.jsx(h.Text,{variant:"small",color:"grey11",children:"Tags:"})]}),f.jsx(h.TextOverflow,{children:t.map(n=>f.jsx(h.Badge,{size:"medium",title:n,sx:{marginRight:8}},n))})]})}function jRe(e){var g,S;const{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i}=e,o=Ee();o.searchDocuments||Jt("searchDocuments");const{coreApiBaseUrl:a,documentSearchBaseUrl:s,authStrategy:u,status:c,repository:l}=o,{storageVersion:d}=Ve.useRequest(V0,[a,u]),p=d.major>=7;function A(){return p?Dq({repository:l,searchTerm:t,customTypesIds:[...Fn.map(r,y=>y.id)],tags:[...Fn.map(n,y=>y.id)],localeId:[...Fn.map(i,y=>y.id)][0]}):BR({tags:[...Fn.map(n,y=>y.id)],customTypes:[...Fn.map(r,y=>y.id)],language:[...Fn.map(i,y=>y.id)],term:[t]})}const[m,v]=$.useState([]),[_,C]=$.useState(""),I=A(),x=Ve.useRequest(V7,[a,s,u,I,c,p]);return I!==_?(C(I),v(x.results)):x.results.length>0&&((g=Qt.last(m))==null?void 0:g.id)!==((S=Qt.last(x.results))==null?void 0:S.id)&&v(y=>y.concat(x.results)),{documents:m,response:x}}Ve.cache.registerFetcherConfig(V7,{cacheCapacity:500,revalidationStrategy:{type:"never"}});async function V7(e,t,n,r,i,o){const a=Tq[i];if(!o){const l=await UR(e,n,r,200);return tk(l.results,a)}const s=await Wq(t,n,r),u=await Nq(e,n,s.results);return tk(u,a)}function tk(e,t){return{results:e.flatMap(r=>{const i=r.versions.filter(o=>t.includes(o.status));return i.length===0?[]:{...r,versions:i}})}}function nk(){const e=Ee();e.searchDocuments||Jt("searchDocuments");const{coreApiBaseUrl:t,authStrategy:n}=e,r=Ve.useRequest(V0,[t,n]);return new Set(r.languages.map(i=>({id:i.id,label:i.name})))}function URe(){const e=Ee();e.searchDocuments||Jt("searchDocuments");const{coreApiBaseUrl:t,authStrategy:n}=e,r=Ve.useRequest(Yq,[t,n]);return new Set(r.results.map(i=>({id:i,label:i})))}function BRe(){const e=Ee();e.searchDocuments||Jt("searchDocuments");const{customTypesApiBaseUrl:t,repository:n,authStrategy:r}=e,i=Ve.useRequest(Uq,[t,n,r]);return new Set(i)}function PRe(e,t){const n=Ee(),r=Ne.useDebounceState({initialState:""}),[i,o]=$.useState(new Set),[a,s]=$.useState(new Set);function u(){return!n.searchDocuments||!n.localeId?new Set:new Set([{id:n.localeId,label:n.localeId}])}const[c,l]=$.useState(u),d=Fn.union(a,Nm(e)),p=Fn.union(i,Nm(t));return{searchTerm:r,filteredTags:i,setFilteredTags:o,filteredCustomTypes:a,setFilteredCustomTypes:s,filteredLocales:c,setFilteredLocales:l,typesFilter:d,tagsFilter:p}}function Nm(e){return e?Fn.map(e,t=>({id:t,label:t})):new Set}function WRe(e){const{filteredLocales:t,setFilteredLocales:n,filteredTags:r,setFilteredTags:i,filteredCustomTypes:o,setFilteredCustomTypes:a,fixedTags:s,fixedCustomTypes:u}=e;return f.jsxs(f.Fragment,{children:[f.jsx(KRe,{selectedValues:t,onSelectedValuesChange:n}),f.jsx(lC,{selectedValues:r,fixedSelectedValues:Nm(s),onSelectedValuesChange:i,label:"Tags",icon:"label",fetchFilters:URe}),f.jsx(lC,{selectedValues:o,fixedSelectedValues:Nm(u),onSelectedValuesChange:a,label:"Type",icon:"description",fetchFilters:BRe})]})}function lC(e){const[t,n]=$.useState(!1),r=$.useRef(null);return f.jsx(h.ErrorBoundary,{ref:r,renderError:()=>{var i;return f.jsx(h.FilterField,{mode:"error",onErrorRetry:(i=r.current)==null?void 0:i.reset,open:t,setOpen:n,values:new Set,...e})},children:f.jsx($.Suspense,{fallback:f.jsx(h.FilterField,{mode:"loading",open:t,setOpen:n,values:new Set,...e}),children:f.jsx(DRe,{open:t,setOpen:n,...e})})})}function DRe(e){const{open:t,setOpen:n,onSelectedValuesChange:r,fixedSelectedValues:i,selectedValues:o,label:a,icon:s,fetchFilters:u,multiple:c}=e,l=u();return f.jsx(h.FilterField,{open:t,setOpen:n,label:a,icon:s,selectedValues:o,values:new Set(l),fixedSelectedValues:i,onSelectedValuesChange:r,multiple:c})}function KRe(e){const{selectedValues:t,onSelectedValuesChange:n}=e,[r,i]=$.useState(Fn.first(t));function o(s){n(s),i(Fn.first(s))}const a=Fn.find(nk(),s=>{var u;return s.id===((u=Fn.first(t))==null?void 0:u.id)});return(a==null?void 0:a.label)!==(r==null?void 0:r.label)&&i(a),f.jsx(lC,{selectedValues:new Set(r?[r]:[]),onSelectedValuesChange:o,label:"Locale",icon:"public",fetchFilters:nk,multiple:!1})}function Q7(e){const{onSelectDocument:t,fixedCustomTypes:n,fixedTags:r,...i}=e,o=Ee(),{searchTerm:a,filteredTags:s,setFilteredTags:u,filteredCustomTypes:c,setFilteredCustomTypes:l,filteredLocales:d,setFilteredLocales:p,typesFilter:A,tagsFilter:m}=PRe(n,r),[v,_]=$.useTransition();return f.jsx(h.Dialog,{size:{height:727,width:656},hasClose:!1,...i,children:f.jsx(h.DialogContent,{children:f.jsxs(h.Box,{flexDirection:"column",height:"100%",children:[f.jsxs(h.Box,{padding:{top:16,inline:16,bottom:8},flexDirection:"column",gap:12,children:[f.jsx(h.FormInput,{value:a.value,onValueChange:a.set,placeholder:"Search a page",icon:"search"}),o.searchDocuments&&f.jsx(WRe,{filteredTags:s,setFilteredTags:u,filteredCustomTypes:c,setFilteredCustomTypes:l,filteredLocales:d,setFilteredLocales:p,fixedTags:r,fixedCustomTypes:n}),f.jsx(h.Text,{variant:"smallBold",color:"grey11",children:"Link to a document"})]}),o.searchDocuments?f.jsx(h.ErrorBoundary,{renderError:NRe,children:f.jsx($.Suspense,{fallback:f.jsx(VRe,{}),children:f.jsx(qRe,{searchTerm:a.debouncedValue,tagsFilter:m,typesFilter:A,localesFilter:d,startTransition:_,isLoadingDocuments:v,onSelectDocument:t})})}):f.jsx(z7,{message:"Slice Machine does not yet support mock data for linked documents in the simulator."})]})})})}function NRe(){return f.jsx(h.Box,{height:"100%",flexDirection:"column",alignItems:"center",justifyContent:"center",children:f.jsx(h.DefaultErrorMessage,{title:"Request failed",description:"An error occurred while fetching documents.",errorImageSrc:h.dialogErrorImage})})}function qRe(e){const{searchTerm:t,tagsFilter:n,typesFilter:r,localesFilter:i,isLoadingDocuments:o,onSelectDocument:a}=e,{documents:s}=jRe({searchTerm:t,tagsFilter:n,localesFilter:i,typesFilter:r}),u=Ee();return f.jsxs(h.ScrollArea,{style:{flexGrow:1,paddingTop:h.theme.space[10],paddingBottom:h.theme.space[16],paddingInline:h.theme.space[16],display:"flex",flexDirection:"column",gap:h.theme.space[12]},children:[s.length===0&&f.jsx(z7,{}),s.map(c=>{const l=c.versions[0];if(!l)return null;const d=MR({documentId:c.id,versionId:l.status==="archived"?l.version_id:void 0,releaseId:l.status==="release"?l.release_id:void 0,status:l.status,baseUrl:u.baseUrl}),p=QRe({tags:l.tags,tagsFilter:n});return f.jsx(RRe,{documentType:l.custom_type_label,documentUrl:d,description:l.preview_summary,tags:p,title:c.title,previewImageUrl:l.preview_image,onSelect:()=>a(c.id),statusColor:Iq[l.status].color},`${c.id}-${l.status}`)}),f.jsx(h.AnimatedElement,{animation:{name:"fade"},children:o&&f.jsx(h.Text,{color:"grey11",align:"center",sx:{marginBlock:8},children:"Loading more results ..."})})]})}function z7(e){const{message:t="We can't find any versions matching this request"}=e,n="Oops!";return f.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:f.jsxs(h.BlankSlate,{children:[f.jsx(h.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),f.jsx(h.BlankSlateTitle,{size:"big",children:n}),f.jsx(h.BlankSlateDescription,{width:360,children:t})]})})}function VRe(){return f.jsx(h.Box,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:Qt.range(1,5).map(e=>f.jsx(h.Skeleton,{height:150},e))})}function QRe(e){const{tags:t,tagsFilter:n}=e,r=[...n].map(o=>o.label).reverse();return Qt.sort(t,o=>-r.indexOf(o))}function H7(e){const{hasLink:t,onUnlink:n,selectEnabled:r,selectedType:i,value:o,onOpenLinkModal:a,onValueChange:s,openInNewTab:u=!0,condensedButtons:c=!1,showNewTabButton:l=!1,displayTextEnabled:d}=e;return f.jsxs(f.Fragment,{children:[!d&&l&&u&&f.jsx(h.Badge,{title:"Open in a new tab",color:"indigo",size:"small",icon:"openInNew",onClick:a}),!t&&r&&f.jsxs(h.Select,{value:i==="any"?void 0:i,color:"grey",size:"small",boldTriggerText:!0,position:"popper",sideOffset:4,startIcon:om({selectType:i}),disabled:!r,onValueChange:s,placeholder:c?"":Xc("any"),onlyStartIcon:c&&i!==void 0,renderTrigger:({button:p})=>f.jsx(h.Tooltip,{content:Xc(i),visible:c,children:p}),children:[f.jsx(h.SelectItem,{value:"web",icon:"public",children:Xc("web")}),f.jsx(h.SelectItem,{value:"document",icon:"description",children:Xc("document")}),f.jsx(h.SelectItem,{value:"media",icon:"image",children:Xc("media")})]},i===void 0?"unlinked":"linked"),!t&&!r&&f.jsx(h.Button,{startIcon:om({selectType:i}),color:"grey",textColor:"link",textWeight:"normal",size:"small",onClick:a,children:Xc(i)}),t&&!d&&f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",onClick:n,"aria-label":"Close"}),t&&d&&f.jsxs(h.ButtonGroup,{density:"compact",children:[f.jsx(h.Button,{startIcon:om({selectType:i}),renderEndIcon:()=>u&&i==="web"?f.jsx(h.Icon,{name:"openInNew",size:"extraSmall",color:"indigo11"}):null,color:"grey",textColor:"link",textWeight:"normal",size:"small",disabled:!t,onClick:a,children:o.length>30?`${o.slice(0,30)}...`:o}),f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",onClick:n})]})]})}function Xc(e){if(!e||e==="any")return"Choose link type";switch(e){case"document":return"Link to Prismic page";case"web":return"Link to web page";case"media":return"Link to media"}}function Y7(e){const{onEdit:t,onUnlink:n,url:r,title:i,subTitle:o}=e;return f.jsx(h.Card,{paddingBlock:16,children:f.jsxs(h.CardContent,{sx:{width:433},children:[f.jsx(HRe,{url:r,title:i,subTitle:o,onEdit:t,onUnlink:n}),r&&f.jsx(h.CheckerBoard,{children:f.jsx(zRe,{children:f.jsx(h.Image,{src:r,alt:i,sizing:"contain"})})})]})})}function zRe(e){const{children:t}=e;return f.jsx(h.Box,{flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",height:327,children:t})}function HRe(e){const{url:t,title:n,subTitle:r,onEdit:i,onUnlink:o}=e;return f.jsxs(h.Box,{flexDirection:"row",justifyContent:"space-between",gap:8,children:[f.jsxs(h.Box,{gap:8,minWidth:0,children:[f.jsx(h.ConjoinedIcons,{largeIconName:"image",smallIconName:"link"}),f.jsxs(h.Box,{flexDirection:"column",minWidth:0,children:[f.jsx(h.Text,{noWrap:!0,variant:"smallBold",href:t,inline:!0,children:n}),f.jsx(h.Text,{variant:"small",color:"grey11",children:r})]})]}),f.jsxs(h.ButtonGroup,{size:"medium",color:"grey",children:[i&&f.jsx(YRe,{onEdit:i}),o&&f.jsx(GRe,{onUnlink:o})]})]})}function YRe(e){const{onEdit:t}=e;return f.jsx(h.Tooltip,{content:"Edit link",side:"top",stableMount:!0,zIndexHack:!0,children:f.jsx(h.Button,{startIcon:"edit",onClick:t})})}function GRe(e){const{onUnlink:t}=e;return f.jsx(h.Tooltip,{content:"Remove link",side:"top",stableMount:!0,zIndexHack:!0,children:f.jsx(h.Button,{startIcon:"linkOff",onClick:t})})}function JRe(e){var w,O;const{field:t,content:n,onContentChange:r}=e,i=v(),o=((w=t.config)==null?void 0:w.allowText)??!1,a=o&&(n==null?void 0:n.value.text)||void 0,[s,u]=$.useState(m),c=Ce.FilledExternalLinkContent.is(n==null?void 0:n.value)&&(n==null?void 0:n.value.target)||void 0,[l,d]=$.useState(!1),p=$.useRef(null);Ne.useOnChange(i,y);const A=s?ZRe[s]:void 0;function m(){var E,F;return!((E=t.config)!=null&&E.select)||n!=null&&n.value.__TYPE__?n==null?void 0:n.value.__TYPE__:rk[(F=t.config)==null?void 0:F.select]}function v(){return n?Ce.FilledDocumentLinkContent.is(n.value)?n.value.id:Ce.FilledExternalLinkContent.is(n.value)?n.value.url:Ce.FilledFileLinkContent.is(n.value)||Ce.FilledImageLinkContent.is(n.value)?n.value.name:"":""}function _(E){var F;if(!E)return r(void 0);switch((F=t.config)==null?void 0:F.select){case"web":return r({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",kind:"web",text:E}});case"document":return r({__TYPE__:"LinkContent",value:{__TYPE__:"DocumentLink",kind:"document",text:E}});case"media":return r({__TYPE__:"LinkContent",value:{__TYPE__:"MediaLink",kind:"media",text:E}});default:return r({__TYPE__:"LinkContent",value:{__TYPE__:"AnyLink",text:E}})}}function C(E,F){if(!E)return _(a);const W=F?"_blank":void 0;switch(s){case"ExternalLink":return r({__TYPE__:"LinkContent",value:{__TYPE__:"ExternalLink",url:E,target:W,text:a}});case"DocumentLink":return r({__TYPE__:"LinkContent",value:{__TYPE__:"DocumentLink",id:E,text:a}});default:return r(void 0)}}function I(E){return n?r({__TYPE__:n.__TYPE__,value:{...n.value,text:E}}):_(E)}function x(E){u(E?rk[E]:void 0),C("")}function g(E){C(E)}function S(){d(!0)}function y(){var E;l&&(d(!1),(E=p.current)==null||E.reset())}function T(E){const F=J7({media:E});switch(F.value.__TYPE__){case"ImageLink":return r({__TYPE__:F.__TYPE__,value:{...F.value,text:a}});case"FileLink":return r({__TYPE__:F.__TYPE__,value:{...F.value,text:a}})}}return{contentType:s,selectType:A,fieldValue:i,onDisplayTextChange:I,onValueChange:C,onTypeChange:x,placeholder:Wc(t),isTypeSelectEnabled:!((O=t.config)!=null&&O.select),onDocumentSelected:g,onError:S,errorBoundaryRef:p,isTargetNewTab:c==="_blank",onMediaSelected:T,displayTextEnabled:o,displayText:a??""}}const ZRe={AnyLink:"any",DocumentLink:"document",ExternalLink:"web",FileLink:"media",ImageLink:"media",MediaLink:"media"},rk={any:"AnyLink",document:"DocumentLink",web:"ExternalLink",media:"FileLink"};function XRe(e){const t=Ee();t.searchDocuments||Jt("searchDocuments");const{coreApiBaseUrl:n,authStrategy:r}=t;return Ve.useRequest(G7,[n,r,e]).title}const eOe=Ap({id:Yo(),title:Yo()});function G7(e,t,n){return pe.request(new URL(`documents/${n}`,e),{credentials:pe.getRequestCredentials(t),okType:eOe})}Ve.cache.registerFetcherConfig(G7,{concurrency:50});function J7(e){var i,o,a,s,u,c;const{media:t}=e,n="kind"in t;return n&&t.kind==="image"?{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:t.id,name:t.filename,url:t.url,kind:t.kind,size:t.size.toString(),height:((i=t.height)==null?void 0:i.toString())??`${es}`,width:((o=t.width)==null?void 0:o.toString())??`${es}`,date:((a=t.last_modified)==null?void 0:a.toString())??""}}:n?{__TYPE__:"LinkContent",value:{__TYPE__:"FileLink",id:t.id,name:t.filename,kind:t.kind,url:t.url,size:t.size.toString(),date:((s=t.last_modified)==null?void 0:s.toString())??""}}:{__TYPE__:"LinkContent",value:{__TYPE__:"ImageLink",id:t.id,name:(t==null?void 0:t.alt)??t.url,kind:"image",url:t.url,size:"0",height:((u=t.height)==null?void 0:u.toString())??`${es}`,width:((c=t.width)==null?void 0:c.toString())??`${es}`}}}function tOe(e){const{open:t,setOpen:n,showNewTabButton:r}=e,{url:i,setUrl:o,openInNewTab:a,setOpenInNewTab:s,disabled:u,onUpdate:c}=nOe(e);return f.jsxs(h.Dialog,{open:t,onOpenChange:n,size:"small",children:[f.jsx(h.DialogHeader,{title:"Set Link URL"}),f.jsxs(h.DialogContent,{padding:16,children:[f.jsx(h.FormInput,{value:i,onValueChange:o,placeholder:"Paste URL",icon:"public"}),r&&f.jsx(h.InlineLabel,{value:"Open in a new tab",children:f.jsx(h.Checkbox,{checked:a,onCheckedChange:s})})]}),f.jsxs(h.DialogActions,{children:[f.jsx(h.DialogCancelButton,{}),f.jsx(h.DialogActionButton,{onClick:c,disabled:u,children:"Update"})]})]})}function nOe(e){const{url:t,openInNewTab:n,onUpdate:r,open:i,setOpen:o}=e,[a,s]=$.useState(t),[u,c]=$.useState(n);Ne.useOnChange(i,()=>{i&&(s(t),c(n))});const l=!a||a===t&&u===n;function d(){r(a,u),o(!1)}return{url:a,setUrl:s,openInNewTab:u,disabled:l,setOpenInNewTab:c,onUpdate:d}}function Z7(e){var ee,re,P,Y;const{content:t,field:n,id:r,onContentChange:i,condensedButtons:o=!1}=e,[a,s]=$.useState(!1),[u,c]=$.useState(!1),[l,d]=$.useState(),{contentType:p,fieldValue:A,errorBoundaryRef:m,onDocumentSelected:v,onError:_,onMediaSelected:C,onValueChange:I,selectType:x,onTypeChange:g,isTypeSelectEnabled:S,displayTextEnabled:y,...T}=JRe({content:t,field:n,onContentChange:i});Ne.useOnChange(l,()=>{x!==void 0&&!l&&!A&&S&&g(void 0)});const w=a||u,O=p==="DocumentLink"&&A!=="",F=p==="ExternalLink"&&Fr.toURL(A),W=!!((ee=n.config)!=null&&ee.allowTargetBlank),K={...T,id:r,onBlur:()=>s(!1),onFocus:()=>{s(!0)},onOpenLinkModal:()=>{switch(s(!0),p){case"DocumentLink":return d("document");case"ExternalLink":return d("web");case"FileLink":case"ImageLink":case"MediaLink":return d("media");default:return d(void 0)}},onUnlink:()=>{S?g(void 0):I("")},onSelectValueChange:M=>{g(M),d(M)},value:A,condensedButtons:o,allowTargetBlank:W,selectType:x,onValueChange:I,isTypeSelectEnabled:S,displayTextEnabled:y},{searchDocuments:J}=Ee();return f.jsxs(f.Fragment,{children:[f.jsxs(h.Popover,{onMouseOverChange:c,open:w,align:"start",sideOffset:-3,openDelay:100,closeDelay:200,focusOnEnter:!1,anchor:f.jsxs(h.Field,{onMouseOverChange:s,children:[f.jsx(h.FieldIcon,{name:om({selectType:x,displayTextEnabled:y})}),f.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),f.jsx(h.FieldControl,{children:O&&J?f.jsx(sOe,{errorBoundaryRef:m,onError:_,fallback:f.jsx(fC,{...K,value:"..."}),renderError:()=>rOe(K),children:f.jsx(aOe,{...K,documentId:A})}):f.jsx(fC,{...K})})]}),children:[F&&f.jsx(ju,{url:F,title:Fr.getUrlTitle(F)??"",subTitle:F.toString()}),t&&Ce.FilledImageLinkContent.is(t.value)&&f.jsx(Y7,{url:t.value.url,title:t.value.name,subTitle:`${t.value.width} x ${t.value.height} pixels`})]}),f.jsx(tOe,{open:l==="web",setOpen:M=>d(M?"web":void 0),url:A,openInNewTab:T.isTargetNewTab,showNewTabButton:!!((re=n.config)!=null&&re.allowTargetBlank),onUpdate:(M,k)=>I(M,k)}),f.jsx(VR,{open:l==="media",onOpenChange:M=>d(M?"media":void 0),onMediaSelected:C,assetType:"all"}),f.jsx(Q7,{open:l==="document",onOpenChange:M=>d(M?"document":void 0),onSelectDocument:M=>{d(void 0),v(M)},fixedCustomTypes:new Set((P=n.config)==null?void 0:P.customtypes),fixedTags:new Set((Y=n.config)==null?void 0:Y.tags)})]})}function rOe(e){return f.jsx(fC,{...e})}function iOe(e){return{onValueChange:e.displayTextEnabled?e.onDisplayTextChange:e.onValueChange,placeholder:e.displayTextEnabled?"Add your display text":e.placeholder,readOnly:!e.displayTextEnabled,value:e.displayTextEnabled?e.displayText:e.value,variant:e.displayTextEnabled?"normal":"link",onFocus:e.displayTextEnabled?e.onFocus:e.onOpenLinkModal,cursor:X7({displayTextEnabled:e.displayTextEnabled,isTypeSelectEnabled:e.isTypeSelectEnabled,value:e.value})}}function fC(e){const{id:t,value:n,onOpenLinkModal:r,onBlur:i,isTypeSelectEnabled:o,selectType:a,onSelectValueChange:s,onUnlink:u,isTargetNewTab:c,condensedButtons:l,allowTargetBlank:d,displayTextEnabled:p}=e,A=iOe(e);return f.jsx(Qs,{id:t,...A,onBlur:i,textOverflow:"ellipsis",endAdornment:f.jsx(H7,{hasLink:!!(n&&a),onUnlink:u,selectEnabled:o,selectedType:a,value:n,onOpenLinkModal:r,onValueChange:s,openInNewTab:c,condensedButtons:l,showNewTabButton:d&&a==="web",displayTextEnabled:p})})}function oOe(e,t){return{onValueChange:e.displayTextEnabled?e.onDisplayTextChange:void 0,placeholder:e.displayTextEnabled?"Add your display text":void 0,readOnly:!e.displayTextEnabled,value:e.displayTextEnabled?e.displayText:t,variant:e.displayTextEnabled?"normal":"link",onFocus:e.displayTextEnabled?e.onFocus:e.onOpenLinkModal,cursor:X7({displayTextEnabled:e.displayTextEnabled,isTypeSelectEnabled:e.isTypeSelectEnabled,value:t})}}function aOe(e){const{id:t,documentId:n,onOpenLinkModal:r,isTypeSelectEnabled:i,selectType:o,displayTextEnabled:a,condensedButtons:s,onSelectValueChange:u,onUnlink:c}=e,l=XRe(n),d=oOe(e,l);return f.jsx(Qs,{id:t,...d,textOverflow:"ellipsis",endAdornment:f.jsx(H7,{hasLink:!0,onUnlink:c,selectEnabled:i,selectedType:o,value:l,onOpenLinkModal:r,condensedButtons:s,onValueChange:u,displayTextEnabled:a})})}function sOe(e){const{errorBoundaryRef:t,onError:n,children:r,fallback:i,renderError:o}=e;return f.jsx(h.ErrorBoundary,{ref:t,onError:n,renderError:o,children:f.jsx($.Suspense,{fallback:i,children:r})})}function om(e){const{selectType:t,displayTextEnabled:n}=e;if(n)return"notes";switch(t){case"document":return"description";case"web":return"public";case"media":return"image";default:return"link"}}function X7(e){const{displayTextEnabled:t,isTypeSelectEnabled:n,value:r}=e;return t?"text":n&&!r?"default":"pointer"}function uOe(e){const{onContentChange:t,...n}=e;function r(i){const o=Ce.FilledLinkContent.is(i)?i:void 0;t(o)}return f.jsx(Z7,{...n,onContentChange:r})}function cOe(e){const{linkTo:t,onLinkToChange:n}=e;return f.jsx(uOe,{content:lOe(t),onContentChange:r=>n(fOe(r)),field:{type:"Link",config:{label:"Link",allowTargetBlank:!0,allowText:!1}},condensedButtons:!0})}function lOe(e){return e?{__TYPE__:"LinkContent",value:e}:void 0}function fOe(e){return e==null?void 0:e.value}function e8(e){var x,g;const{allContentViews:t,content:n,contentView:r,fieldLabel:i,imageLabel:o,initialImages:a,isUpdating:s,page:u=0,readOnly:c,thumbnailName:l,onClear:d,onContentChange:p,onCropperDialogClose:A,onPageChange:m,onMediaDialogOpenChange:v}=e,_=((g=(x=n==null?void 0:n.url)==null?void 0:x.split("?")[0])==null?void 0:g.slice(-4))===".svg",C=n!=null&&n.url&&!c?"visible":"hidden",I=!Ce.isImageContent(n);return f.jsxs(h.Box,{display:"flex",gap:12,padding:{inline:12},children:[f.jsx(h.Box,{children:f.jsx(h.Carousel,{getItemSource:$Ee,items:t,onPageChange:m,page:u,buttonSize:"small",renderPrevTooltip:S=>f.jsx(h.Tooltip,{content:"Previous",children:S}),renderNextTooltip:S=>f.jsx(h.Tooltip,{content:"Next",children:S}),style:I?{width:181,height:142}:{width:123,height:93},children:S=>(S==null?void 0:S.url)&&f.jsx(h.CarouselItem,{"aria-label":"Image Field Item",src:I7(S.url),alt:S.alt??void 0,isUpdating:s,disableAnimation:I},`${l}_${S.url}`)})}),f.jsxs(h.Box,{width:"100%",display:"flex",flexDirection:"column",gap:I?16:12,children:[f.jsx(IRe,{fieldLabel:i,imageLabel:o,initialImages:a,page:u,displaySeparator:!I,isSVGContentView:_,visibility:C,onClear:d,onCropperDialogClose:A,onMediaDialogOpenChange:v}),f.jsx(_Re,{readOnly:c||!r,altText:(r==null?void 0:r.alt)??"",onValueChange:S=>{r&&p(TEe(l,n,r,S))}}),I&&f.jsx(cOe,{linkTo:n.linkTo,onLinkToChange:S=>{p({...n,linkTo:S})}})]})]})}function dOe(e){const{content:t,onContentChange:n,field:r}=e,[i,o]=$.useState(0),[a,s]=$.useTransition(),u=_Ee(r),c=u[i],l=t?IEe(r,t):void 0,d=l==null?void 0:l[i];function p(_){if(!c)return;const C=REe(c.name,r,t,_);C!==t&&s(()=>n(C))}function A(_){s(()=>o(_))}function m({option:_,croppedImages:C}){if(o(_),!t)return;const I=Object.entries(C).reduce((x,[g,S])=>gRe({field:r,content:x,thumbnail:g,croppedImage:S}),t);I!==t&&s(()=>n(I))}function v(){o==null||o(0),n(void 0)}return{onCropperDialogClose:m,onPageChange:A,onMediaSelected:p,isUpdating:a,page:i,thumbnail:c,allThumbnails:u,allContentViews:l,contentView:d,onClear:v}}function pOe(e){const{content:t,field:n,readOnly:r,onContentChange:i}=e,o=t&&t.origin.url.length>0,{onCropperDialogClose:a,onPageChange:s,onMediaSelected:u,isUpdating:c,page:l,thumbnail:d,allThumbnails:p,allContentViews:A,contentView:m,onClear:v}=dOe({field:n,content:t,onContentChange:i}),[_,C]=$.useState(!1),I=nr(n),x=p.map((y,T)=>{const w=A==null?void 0:A[T];return{thumbnail:y,contentView:w,labels:sC(y,t,w)}}),g=d&&o?sC(d,t,m).filter(io.isDefined):[],S=d&&t&&o&&A;return f.jsx(D7,{isMediaDialogOpen:_,onMediaSelected:u,onMediaDialogOpenChange:C,children:f.jsx($.Suspense,{fallback:f.jsx("div",{style:{height:95}}),children:S?f.jsx(e8,{allContentViews:A,content:t,contentView:m,fieldLabel:I,imageLabel:g,initialImages:x,isUpdating:c,page:l,readOnly:r,thumbnailName:d.name,onClear:v,onContentChange:i,onCropperDialogClose:a,onMediaDialogOpenChange:C,onPageChange:s}):f.jsx(B7,{fieldLabel:I,isUpdating:c,readOnly:r,onMediaDialogOpenChange:C})})})}function AOe(e){var _,C;const{searchTerm:t,catalogId:n}=e,r=Ee();r.integrationFields||Jt("integrationFields");const{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,[s,u]=$.useState(1),[c,l]=$.useState([]),[d,p]=$.useState(""),A=Ve.useRequest(hOe,[i,a,o,n,t,t===d?s:1]);t!==d?(p(t),u(1),l(A.items)):A.items.length>0&&((_=Qt.last(c))==null?void 0:_.id)!==((C=Qt.last(A.items))==null?void 0:C.id)&&l(I=>I.concat(A.items));const m=s<A.totalPages;function v(){m&&u(I=>I+1)}return{items:c,response:A,fetchNextPage:v,hasNextPage:m}}function hOe(e,t,n,r,i,o=1,a=30){const s=new URL(`if/search/${r}`,e);return s.searchParams.set("searchTerm",i),s.searchParams.set("limit",a.toString()),s.searchParams.set("page",o.toString()),pe.request(s,{headers:{repository:n},credentials:pe.getRequestCredentials(t),okType:mOe})}const t8=L.object({id:L.string(),title:L.string(),imageURL:L.string().optional(),description:L.string().optional()}),mOe=L.object({items:L.array(t8),totalPages:L.number(),page:L.number()});function n8(e){const{itemId:t,catalogId:n}=e,r=Ee();r.integrationFields||Jt("integrationFields");const{integrationFieldsApiBaseUrl:i,repository:o,authStrategy:a}=r,u=Ve.useRequest(gOe,[i,a,o,n,t]).items[0];if(!u)throw new Error("Item not found");return{item:u}}function gOe(e,t,n,r,i){const o=new URL(`if/read/${r}`,e);return o.searchParams.set("ids",[i].toString()),pe.request(o,{headers:{repository:n},credentials:pe.getRequestCredentials(t),okType:vOe})}const vOe=L.object({items:L.array(t8)});function QR(e){const{item:t,onClick:n,catalogId:r}=e;return f.jsxs(h.PreviewCard,{variant:"large",onClick:n,children:[f.jsx(yOe,{src:t.imageURL??"",alt:t.title}),f.jsxs(h.PreviewContent,{children:[f.jsx(h.Badge,{title:`Catalog: ${r}`,icon:"multipleStop",size:"medium"}),f.jsx(h.Text,{variant:"bold",color:"grey12",sx:{marginTop:4},children:t.title}),f.jsx(h.Text,{variant:"small",color:"grey11",children:t.description??t.id})]})]})}const Qh=76;function yOe(e){const{src:t,alt:n}=e;return t?f.jsx(h.PreviewImage,{src:t,alt:n,width:Qh,height:Qh,framed:!0}):f.jsxs(h.Box,{borderRadius:6,backgroundColor:"grey2",height:Qh,width:Qh,flexDirection:"column",alignItems:"center",justifyContent:"center",border:!0,padding:{inline:4,block:8},children:[f.jsx(h.Icon,{name:"hideImage",size:"large",color:"grey11"}),f.jsx(h.Text,{color:"grey11",variant:"small",noSelect:!0,align:"center",children:"No preview image"})]})}function il(){return f.jsxs(h.PreviewCard,{variant:"large",children:[f.jsx(h.Skeleton,{height:76,width:76}),f.jsxs(h.PreviewContent,{children:[f.jsx(h.Skeleton,{height:24,width:168}),f.jsx(h.Skeleton,{height:24,width:240,sx:{marginTop:4}}),f.jsx(h.Skeleton,{height:16,width:144})]})]})}function bOe(e){const{open:t,onOpenChange:n,catalogId:r,onSelectItem:i}=e,o=Ne.useDebounceState({initialState:""}),a=Ee();return f.jsx(h.Dialog,{open:t,onOpenChange:n,hasClose:!1,size:{width:612,height:724},children:f.jsx(h.DialogContent,{children:f.jsxs(h.Box,{flexDirection:"column",height:"100%",children:[f.jsxs(h.Box,{padding:{top:16,inline:16},flexDirection:"column",gap:8,children:[f.jsx(h.FormSearchInput,{value:o.value,onValueChange:o.set,placeholder:"Search in your catalog"}),f.jsx(h.Text,{variant:"smallBold",color:"grey11",children:"Select an item"})]}),a.integrationFields?f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(dC,{message:"There was an error while fetching your catalog items."}),children:f.jsx($.Suspense,{fallback:f.jsxs(h.Box,{flexDirection:"column",gap:12,padding:{top:10,inline:16,bottom:16},children:[f.jsx(il,{}),f.jsx(il,{}),f.jsx(il,{}),f.jsx(il,{}),f.jsx(il,{})]}),children:f.jsx(COe,{searchTerm:o.debouncedValue,catalogId:r,onItemClick:i})})}):f.jsx(dC,{message:"Slice Machine does not yet support mock data for integration field in the simulator."})]})})})}function COe(e){const{catalogId:t,searchTerm:n,onItemClick:r}=e,[i,o]=$.useTransition(),{items:a,hasNextPage:s,fetchNextPage:u}=AOe({catalogId:t,searchTerm:n});return f.jsx(f.Fragment,{children:f.jsxs(h.ScrollArea,{onScrollToBottom:()=>s&&o(u),style:{flexGrow:1,paddingTop:h.theme.space[10],paddingBottom:h.theme.space[16],paddingInline:h.theme.space[16],display:"flex",flexDirection:"column",gap:h.theme.space[12]},threshold:252,children:[a.length===0?f.jsx(dC,{}):a.map(c=>f.jsx(QR,{item:c,catalogId:t,onClick:()=>r(c)},c.id)),f.jsx(h.AnimatedElement,{animation:{name:"fade"},children:i&&f.jsx(h.Text,{color:"grey11",align:"center",sx:{marginBlock:8},children:"Loading more results ..."})})]})})}function dC(e){const{message:t="We can't find any items matching your search"}=e,n="Oops!";return f.jsx(h.Box,{justifyContent:"center",flexDirection:"column",height:"100%",children:f.jsxs(h.BlankSlate,{children:[f.jsx(h.BlankSlateIcon,{name:"close",lineColor:"purple10",backgroundColor:"purple3",borderColor:"purple6",borderStyle:"dashed",size:"xlarge"}),f.jsx(h.BlankSlateTitle,{size:"big",children:n}),f.jsx(h.BlankSlateDescription,{width:360,children:t})]})})}function SOe(e){const{itemId:t,item:n}=e,r=Ee();return t&&n&&n.id===t?f.jsx(ol,{...e,value:n.title}):t&&r.integrationFields?f.jsx(h.ErrorBoundary,{renderError:()=>f.jsx(ol,{...e,value:t}),children:f.jsx($.Suspense,{fallback:f.jsx(ol,{...e,value:t}),children:f.jsx(TOe,{...e,itemId:t})},t)},t):t&&!r.integrationFields?f.jsx(ol,{...e,value:t}):f.jsx(ol,{...e,value:""})}function _Oe(e){const{catalogId:t,itemId:n,item:r}=e,i=Ee();return n&&r&&r.id===n?f.jsx(h.FieldFooter,{children:f.jsx(QR,{catalogId:t,item:r})}):n&&i.integrationFields?f.jsx(h.ErrorBoundary,{renderError:()=>null,children:f.jsx(h.FieldFooter,{children:f.jsx($.Suspense,{fallback:f.jsx(il,{}),children:f.jsx(IOe,{catalogId:t,itemId:n})},n)})},n):null}function IOe(e){const{itemId:t,catalogId:n}=e,{item:r}=n8({catalogId:n,itemId:t});return f.jsx(QR,{catalogId:n,item:r})}function ol(e){const{id:t,field:n,readOnly:r,value:i,onFocus:o,onClearItem:a}=e;return f.jsx(Qs,{id:t,placeholder:Wc(n),readOnly:!0,variant:"link",value:i,...!r&&{cursor:"pointer",onFocus:o},endAdornment:f.jsx(h.Button,{startIcon:"close",color:"grey",size:"small",disabled:!i,onClick:a})})}function TOe(e){const{itemId:t,catalogId:n}=e,{item:r}=n8({catalogId:n,itemId:t});return f.jsx(ol,{...e,value:r.title})}function xOe(e){var A;const{id:t,field:n,content:r,readOnly:i,onContentChange:o}=e,[a,s]=$.useState(!1),[u,c]=$.useState(),l=(A=n.config)==null?void 0:A.catalog;if(!l)return null;function d(m){o({value:m.id,__TYPE__:"IntegrationFieldsContent"}),c(m),s(!1)}function p(){o(void 0),c(void 0)}return f.jsxs(f.Fragment,{children:[f.jsxs(h.Field,{footer:f.jsx(_Oe,{catalogId:l,item:u,itemId:r==null?void 0:r.value}),children:[f.jsx(h.FieldIcon,{name:"multipleStop"}),f.jsx(h.FieldLabel,{htmlFor:t,children:nr(n)}),f.jsx(h.FieldControl,{children:f.jsx(SOe,{id:t,field:n,readOnly:i,catalogId:l,item:u,itemId:r==null?void 0:r.value,onFocus:()=>s(!0),onClearItem:p})})]}),f.jsx(bOe,{open:a,onOpenChange:s,catalogId:l,onSelectItem:d})]})}function wOe(e){const{content:t,field:n,id:r,onContentChange:i,readOnly:o}=e;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"notes"}),f.jsx(h.FieldLabel,{htmlFor:r,children:nr(n)}),f.jsx(h.FieldControl,{children:f.jsx(h.TextArea,{id:r,placeholder:Wc(n),readOnly:o,paddingLeft:4,paddingRight:12,sx:{flexGrow:1},value:(t==null?void 0:t.value)??"",onChange:a=>{i(EOe(a))}})})]})}function EOe(e){return e.length===0?void 0:{__TYPE__:"FieldContent",type:"Text",value:e}}const $Oe=({content:e,field:t,id:n,onContentChange:r,readOnly:i})=>{var s,u;const o=Number(e==null?void 0:e.value),a=Number.isFinite(o)?o:void 0;return f.jsxs(h.Field,{children:[f.jsx(h.FieldIcon,{name:"pin"}),f.jsx(h.FieldLabel,{htmlFor:n,children:nr(t)}),f.jsx(h.FieldControl,{children:f.jsx(h.NumberInput,{id:n,value:a,min:(s=t.config)==null?void 0:s.min,max:(u=t.config)==null?void 0:u.max,padding:M7,placeholder:Wc(t),readOnly:i,onValueChange:c=>r(ROe(c))})})]})};function ROe(e){return e===void 0?void 0:{__TYPE__:"FieldContent",type:"Number",value:String(e)}}function An(e){this.content=e}An.prototype={constructor:An,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return i==-1?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new An(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new An(n)},addToStart:function(e,t){return new An([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new An(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(o==-1?i.length:o,0,t,n),new An(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=An.from(e),e.size?new An(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=An.from(e),e.size?new An(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=An.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};An.from=function(e){if(e instanceof An)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new An(t)};function r8(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let a=0;i.text[a]==o.text[a];a++)n++;return n}if(i.content.size||o.content.size){let a=r8(i.content,o.content,n+1);if(a!=null)return a}n+=i.nodeSize}}function i8(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let a=e.child(--i),s=t.child(--o),u=a.nodeSize;if(a==s){n-=u,r-=u;continue}if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){let c=0,l=Math.min(a.text.length,s.text.length);for(;c<l&&a.text[a.text.length-c-1]==s.text[s.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){let c=i8(a.content,s.content,n-1,r-1);if(c)return c}n-=u,r-=u}}class X{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,o){for(let a=0,s=0;s<n;a++){let u=this.content[a],c=s+u.nodeSize;if(c>t&&r(u,i+s,o||null,a)!==!1&&u.content.size){let l=s+1;u.nodesBetween(Math.max(0,t-l),Math.min(u.content.size,n-l),r,i+l)}s=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let o="",a=!0;return this.nodesBetween(t,n,(s,u)=>{s.isText?(o+=s.text.slice(Math.max(t,u)-u,n-u),a=!r):s.isLeaf?(i?o+=typeof i=="function"?i(s):i:s.type.spec.leafText&&(o+=s.type.spec.leafText(s)),a=!r):!a&&s.isBlock&&(o+=r,a=!0)},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<t.content.length;o++)i.push(t.content[o]);return new X(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let o=0,a=0;a<n;o++){let s=this.content[o],u=a+s.nodeSize;u>t&&((a<t||u>n)&&(s.isText?s=s.cut(Math.max(0,t-a),Math.min(s.text.length,n-a)):s=s.cut(Math.max(0,t-a-1),Math.min(s.content.size,n-a-1))),r.push(s),i+=s.nodeSize),a=u}return new X(r,i)}cutByIndex(t,n){return t==n?X.empty:t==0&&n==this.content.length?this:new X(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new X(i,o)}addToStart(t){return new X([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new X(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return r8(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return i8(this,t,n,r)}findIndex(t,n=-1){if(t==0)return zh(0,t);if(t==this.size)return zh(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),a=i+o.nodeSize;if(a>=t)return a==t||n>0?zh(r+1,a):zh(r,i);i=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return X.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new X(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return X.empty;let n,r=0;for(let i=0;i<t.length;i++){let o=t[i];r+=o.nodeSize,i&&o.isText&&t[i-1].sameMarkup(o)?(n||(n=t.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new X(n||t,r)}static from(t){if(!t)return X.empty;if(t instanceof X)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new X([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}X.empty=new X([],0);const Jb={index:0,offset:0};function zh(e,t){return Jb.index=e,Jb.offset=t,Jb}function qm(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!qm(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!qm(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}let vt=class pC{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let o=t[i];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,i));else{if(o.type.excludes(this.type))return t;!r&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&qm(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);return r.create(n.attrs)}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return pC.none;if(t instanceof pC)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};vt.none=[];class gp extends Error{}class ae{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=a8(this.content,t+this.openStart,n);return r&&new ae(r,this.openStart,this.openEnd)}removeBetween(t,n){return new ae(o8(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return ae.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ae(X.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new ae(t,r,i)}}ae.empty=new ae(X.empty,0,0);function o8(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:a,offset:s}=e.findIndex(n);if(i==t||o.isText){if(s!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(o8(o.content,t-i-1,n-i-1)))}function a8(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),a=e.maybeChild(i);if(o==t||a.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=a8(a.content,t-o-1,n);return s&&e.replaceChild(i,a.copy(s))}function OOe(e,t,n){if(n.openStart>e.depth)throw new gp("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new gp("Inconsistent open depths");return s8(e,t,n,0)}function s8(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let a=s8(e,t,n,r+1);return o.copy(o.content.replaceChild(i,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let a=e.parent,s=a.content;return Au(a,s.cut(0,e.parentOffset).append(n.content).append(s.cut(t.parentOffset)))}else{let{start:a,end:s}=FOe(n,e);return Au(o,c8(e,a,s,t,r))}else return Au(o,Vm(e,t,r))}function u8(e,t){if(!t.type.compatibleContent(e.type))throw new gp("Cannot join "+t.type.name+" onto "+e.type.name)}function AC(e,t,n){let r=e.node(n);return u8(r,t.node(n)),r}function pu(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Od(e,t,n,r){let i=(t||e).node(n),o=0,a=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(pu(e.nodeAfter,r),o++));for(let s=o;s<a;s++)pu(i.child(s),r);t&&t.depth==n&&t.textOffset&&pu(t.nodeBefore,r)}function Au(e,t){return e.type.checkContent(t),e.copy(t)}function c8(e,t,n,r,i){let o=e.depth>i&&AC(e,t,i+1),a=r.depth>i&&AC(n,r,i+1),s=[];return Od(null,e,i,s),o&&a&&t.index(i)==n.index(i)?(u8(o,a),pu(Au(o,c8(e,t,n,r,i+1)),s)):(o&&pu(Au(o,Vm(e,t,i+1)),s),Od(t,n,i,s),a&&pu(Au(a,Vm(n,r,i+1)),s)),Od(r,null,i,s),new X(s)}function Vm(e,t,n){let r=[];if(Od(null,e,n,r),e.depth>n){let i=AC(e,t,n+1);pu(Au(i,Vm(e,t,n+1)),r)}return Od(t,null,n,r),new X(r)}function FOe(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)i=t.node(o).copy(X.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class vp{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<t;o++)i+=r.child(o).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return vt.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let s=r;r=i,i=s}let o=r.marks;for(var a=0;a<o.length;a++)o[a].type.spec.inclusive===!1&&(!i||!o[a].isInSet(i.marks))&&(o=o[a--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Qm(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let a=t;;){let{index:s,offset:u}=a.content.findIndex(o),c=o-u;if(r.push(a,s,i+u),!c||(a=a.child(s),a.isText))break;o=c-1,i+=u+1}return new vp(n,r,o)}static resolveCached(t,n){for(let i=0;i<Zb.length;i++){let o=Zb[i];if(o.pos==n&&o.doc==t)return o}let r=Zb[Xb]=vp.resolve(t,n);return Xb=(Xb+1)%kOe,r}}let Zb=[],Xb=0,kOe=12;class Qm{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const MOe=Object.create(null);let hl=class hC{constructor(t,n,r,i=vt.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||X.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&qm(this.attrs,n||t.defaultAttrs||MOe)&&vt.sameSet(this.marks,r||vt.none)}copy(t=null){return t==this.content?this:new hC(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new hC(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return ae.empty;let i=this.resolve(t),o=this.resolve(n),a=r?0:i.sharedDepth(n),s=i.start(a),c=i.node(a).content.cut(i.pos-s,o.pos-s);return new ae(c,i.depth-a,o.depth-a)}replace(t,n,r){return OOe(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return vp.resolveCached(this,t)}resolveNoCache(t){return vp.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),l8(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=X.empty,i=0,o=r.childCount){let a=this.contentMatchAt(t).matchFragment(r,i,o),s=a&&a.matchFragment(this.content,n);if(!s||!s.validEnd)return!1;for(let u=i;u<o;u++)if(!this.type.allowsMarks(r.child(u).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(t).matchType(r),a=o&&o.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content);let t=vt.none;for(let n=0;n<this.marks.length;n++)t=this.marks[n].addToSet(t);if(!vt.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=X.fromJSON(t,n.content);return t.nodeType(n.type).create(n.attrs,i,r)}};hl.prototype.text=void 0;class zm extends hl{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):l8(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new zm(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new zm(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function l8(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Uu{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new LOe(t,n);if(r.next==null)return Uu.empty;let i=f8(r);r.next&&r.err("Unexpected trailing text");let o=KOe(DOe(i));return NOe(o,r),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(t.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function o(a,s){let u=a.matchFragment(t,r);if(u&&(!n||u.validEnd))return X.from(s.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:l,next:d}=a.next[c];if(!(l.isText||l.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let p=o(d,s.concat(l));if(p)return p}}return null}return o(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(t)){let a=[];for(let s=i;s.type;s=s.via)a.push(s.type);return a.reverse()}for(let a=0;a<o.next.length;a++){let{type:s,next:u}=o.next[a];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in n)&&(!i.type||u.validEnd)&&(r.push({match:s.contentMatch,type:s,via:i}),n[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)o+=(a?", ":"")+r.next[a].type.name+"->"+t.indexOf(r.next[a].next);return o}).join(`
|
|
38
38
|
`)}}Uu.empty=new Uu(!0);class LOe{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function f8(e){let t=[];do t.push(jOe(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function jOe(e){let t=[];do t.push(UOe(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function UOe(e){let t=WOe(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=BOe(e,t);else break;return t}function ik(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function BOe(e,t){let n=ik(e),r=n;return e.eat(",")&&(e.next!="}"?r=ik(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function POe(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let o in n){let a=n[o];a.groups.indexOf(t)>-1&&i.push(a)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function WOe(e){if(e.eat("(")){let t=f8(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=POe(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function DOe(e){let t=[[]];return i(o(e,0),n()),t;function n(){return t.push([])-1}function r(a,s,u){let c={term:u,to:s};return t[a].push(c),c}function i(a,s){a.forEach(u=>u.to=s)}function o(a,s){if(a.type=="choice")return a.exprs.reduce((u,c)=>u.concat(o(c,s)),[]);if(a.type=="seq")for(let u=0;;u++){let c=o(a.exprs[u],s);if(u==a.exprs.length-1)return c;i(c,s=n())}else if(a.type=="star"){let u=n();return r(s,u),i(o(a.expr,u),u),[r(u)]}else if(a.type=="plus"){let u=n();return i(o(a.expr,s),u),i(o(a.expr,u),u),[r(u)]}else{if(a.type=="opt")return[r(s)].concat(o(a.expr,s));if(a.type=="range"){let u=s;for(let c=0;c<a.min;c++){let l=n();i(o(a.expr,u),l),u=l}if(a.max==-1)i(o(a.expr,u),u);else for(let c=a.min;c<a.max;c++){let l=n();r(u,l),i(o(a.expr,u),l),u=l}return[r(u)]}else{if(a.type=="name")return[r(s,void 0,a.value)];throw new Error("Unknown expr type")}}}}function d8(e,t){return t-e}function ok(e,t){let n=[];return r(t),n.sort(d8);function r(i){let o=e[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let a=0;a<o.length;a++){let{term:s,to:u}=o[a];!s&&n.indexOf(u)==-1&&r(u)}}}function KOe(e){let t=Object.create(null);return n(ok(e,0));function n(r){let i=[];r.forEach(a=>{e[a].forEach(({term:s,to:u})=>{if(!s)return;let c;for(let l=0;l<i.length;l++)i[l][0]==s&&(c=i[l][1]);ok(e,u).forEach(l=>{c||i.push([s,c=[]]),c.indexOf(l)==-1&&c.push(l)})})});let o=t[r.join(",")]=new Uu(r.indexOf(e.length-1)>-1);for(let a=0;a<i.length;a++){let s=i[a][1].sort(d8);o.next.push({type:i[a][0],next:t[s.join(",")]||n(s)})}return o}}function NOe(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],o=!i.validEnd,a=[];for(let s=0;s<i.next.length;s++){let{type:u,next:c}=i.next[s];a.push(u.name),o&&!(u.isText||u.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function p8(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function A8(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let o=e[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function h8(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new qOe(e[n]);return t}let ak=class m8{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=h8(r.attrs),this.defaultAttrs=p8(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Uu.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:A8(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new hl(this,this.computeAttrs(t),X.from(n),vt.setFrom(r))}createChecked(t=null,n,r){return n=X.from(n),this.checkContent(n),new hl(this,this.computeAttrs(t),n,vt.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=X.from(n),n.size){let a=this.contentMatch.fillBefore(n);if(!a)return null;n=a.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(X.empty,!0);return o?new hl(this,t,n.append(o),vt.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:vt.none:t}static compile(t,n){let r=Object.create(null);t.forEach((o,a)=>r[o]=new m8(o,n,a));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class qOe{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class zR{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=h8(i.attrs),this.excluded=null;let o=p8(this.attrs);this.instance=o?new vt(this,o):null}create(t=null){return!t&&this.instance?this.instance:new vt(this,A8(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((o,a)=>r[o]=new zR(o,i++,n,a)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}excludes(t){return this.excluded.indexOf(t)>-1}}class g8{constructor(t){this.cached=Object.create(null);let n=this.spec={};for(let i in t)n[i]=t[i];n.nodes=An.from(t.nodes),n.marks=An.from(t.marks||{}),this.nodes=ak.compile(this.spec.nodes,this),this.marks=zR.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],a=o.spec.content||"",s=o.spec.marks;o.contentMatch=r[a]||(r[a]=Uu.parse(a,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet=s=="_"?null:s?sk(this,s.split(" ")):s==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],a=o.spec.excludes;o.excluded=a==null?[o]:a==""?[]:sk(this,a.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,i){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof ak){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,i)}text(t,n){let r=this.nodes.text;return new zm(r,r.defaultAttrs,t,vt.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return hl.fromJSON(this,t)}markFromJSON(t){return vt.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function sk(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],o=e.marks[i],a=o;if(o)n.push(o);else for(let s in e.marks){let u=e.marks[s];(i=="_"||u.spec.group&&u.spec.group.split(" ").indexOf(i)>-1)&&n.push(a=u)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class hu{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[],n.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let i=t.nodes[r.node];return i.contentMatch.matchType(i)})}parse(t,n={}){let r=new ck(this,n,!1);return r.addAll(t,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new ck(this,n,!0);return r.addAll(t,n.from,n.to),ae.maxOpen(r.finish())}matchTag(t,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(zOe(t,o.tag)&&(o.namespace===void 0||t.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}matchStyle(t,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let a=this.styles[o],s=a.style;if(!(s.indexOf(t)!=0||a.context&&!r.matchesContext(a.context)||s.length>t.length&&(s.charCodeAt(t.length)!=61||s.slice(t.length+1)!=n))){if(a.getAttrs){let u=a.getAttrs(n);if(u===!1)continue;a.attrs=u||void 0}return a}}}static schemaRules(t){let n=[];function r(i){let o=i.priority==null?50:i.priority,a=0;for(;a<n.length;a++){let s=n[a];if((s.priority==null?50:s.priority)<o)break}n.splice(a,0,i)}for(let i in t.marks){let o=t.marks[i].spec.parseDOM;o&&o.forEach(a=>{r(a=lk(a)),a.mark||a.ignore||a.clearMark||(a.mark=i)})}for(let i in t.nodes){let o=t.nodes[i].spec.parseDOM;o&&o.forEach(a=>{r(a=lk(a)),a.node||a.ignore||a.mark||(a.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new hu(t,hu.schemaRules(t)))}}const v8={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},VOe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},y8={ol:!0,ul:!0},Hm=1,Ym=2,Fd=4;function uk(e,t,n){return t!=null?(t?Hm:0)|(t==="full"?Ym:0):e&&e.whitespace=="pre"?Hm|Ym:n&~Fd}class Hh{constructor(t,n,r,i,o,a,s){this.type=t,this.attrs=n,this.marks=r,this.pendingMarks=i,this.solid=o,this.options=s,this.content=[],this.activeMarks=vt.none,this.stashMarks=[],this.match=a||(s&Fd?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(X.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(t.type))?(this.match=r,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Hm)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let n=X.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(X.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}popFromStashMark(t){for(let n=this.stashMarks.length-1;n>=0;n--)if(t.eq(this.stashMarks[n]))return this.stashMarks.splice(n,1)[0]}applyPending(t){for(let n=0,r=this.pendingMarks;n<r.length;n++){let i=r[n];(this.type?this.type.allowsMarkType(i.type):YOe(i.type,t))&&!i.isInSet(this.activeMarks)&&(this.activeMarks=i.addToSet(this.activeMarks),this.pendingMarks=i.removeFromSet(this.pendingMarks))}}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!v8.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class ck{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0;let i=n.topNode,o,a=uk(null,n.preserveWhitespace,0)|(r?Fd:0);i?o=new Hh(i.type,i.attrs,vt.none,vt.none,!0,n.topMatch||i.type.contentMatch,a):r?o=new Hh(null,null,vt.none,vt.none,!0,null,a):o=new Hh(t.schema.topNodeType,null,vt.none,vt.none,!0,null,a),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t){if(t.nodeType==3)this.addTextNode(t);else if(t.nodeType==1){let n=t.getAttribute("style");if(!n)this.addElement(t);else{let r=this.readStyles(HOe(n));if(!r)return;let[i,o]=r,a=this.top;for(let s=0;s<o.length;s++)this.removePendingMark(o[s],a);for(let s=0;s<i.length;s++)this.addPendingMark(i[s]);this.addElement(t);for(let s=0;s<i.length;s++)this.removePendingMark(i[s],a);for(let s=0;s<o.length;s++)this.addPendingMark(o[s])}}}addTextNode(t){let n=t.nodeValue,r=this.top;if(r.options&Ym||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(r.options&Hm)r.options&Ym?n=n.replace(/\r\n?/g,`
|
|
39
39
|
`):n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let i=r.content[r.content.length-1],o=t.previousSibling;(!i||o&&o.nodeName=="BR"||i.isText&&/[ \t\r\n\u000c]$/.test(i.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n)),this.findInText(t)}else this.findInside(t)}addElement(t,n){let r=t.nodeName.toLowerCase(),i;y8.hasOwnProperty(r)&&this.parser.normalizeLists&&QOe(t);let o=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(i=this.parser.matchTag(t,this,n));if(o?o.ignore:VOe.hasOwnProperty(r))this.findInside(t),this.ignoreFallback(t);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(t=o.skip);let a,s=this.top,u=this.needsBlock;if(v8.hasOwnProperty(r))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),a=!0,s.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t);return}this.addAll(t),a&&this.sync(s),this.needsBlock=u}else this.addElementByRule(t,o,o.consuming===!1?i:void 0)}leafFallback(t){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
|
|
40
40
|
`))}ignoreFallback(t){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(t){let n=vt.none,r=vt.none;e:for(let i=0;i<t.length;i+=2)for(let o=void 0;;){let a=this.parser.matchStyle(t[i],t[i+1],this,o);if(!a)continue e;if(a.ignore)return null;if(a.clearMark?this.top.pendingMarks.forEach(s=>{a.clearMark(s)&&(r=s.addToSet(r))}):n=this.parser.schema.marks[a.mark].create(a.attrs).addToSet(n),a.consuming===!1)o=a;else break}return[n,r]}addElementByRule(t,n,r){let i,o,a;n.node?(o=this.parser.schema.nodes[n.node],o.isLeaf?this.insertNode(o.create(n.attrs))||this.leafFallback(t):i=this.enter(o,n.attrs||null,n.preserveWhitespace)):(a=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(a));let s=this.top;if(o&&o.isLeaf)this.findInside(t);else if(r)this.addElement(t,r);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(u=>this.insertNode(u));else{let u=t;typeof n.contentElement=="string"?u=t.querySelector(n.contentElement):typeof n.contentElement=="function"?u=n.contentElement(t):n.contentElement&&(u=n.contentElement),this.findAround(t,u,!0),this.addAll(u)}i&&this.sync(s)&&this.open--,a&&this.removePendingMark(a,s)}addAll(t,n,r){let i=n||0;for(let o=n?t.childNodes[n]:t.firstChild,a=r==null?null:t.childNodes[r];o!=a;o=o.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(o);this.findAtPoint(t,i)}findPlace(t){let n,r;for(let i=this.open;i>=0;i--){let o=this.nodes[i],a=o.findWrapping(t);if(a&&(!n||n.length>a.length)&&(n=a,r=o,!a.length)||o.solid)break}if(!n)return!1;this.sync(r);for(let i=0;i<n.length;i++)this.enterInner(n[i],null,!1);return!0}insertNode(t){if(t.isInline&&this.needsBlock&&!this.top.type){let n=this.textblockFromContext();n&&this.enterInner(n)}if(this.findPlace(t)){this.closeExtra();let n=this.top;n.applyPending(t.type),n.match&&(n.match=n.match.matchType(t.type));let r=n.activeMarks;for(let i=0;i<t.marks.length;i++)(!n.type||n.type.allowsMarkType(t.marks[i].type))&&(r=t.marks[i].addToSet(r));return n.content.push(t.mark(r)),!0}return!1}enter(t,n,r){let i=this.findPlace(t.create(n));return i&&this.enterInner(t,n,!0,r),i}enterInner(t,n=null,r=!1,i){this.closeExtra();let o=this.top;o.applyPending(t),o.match=o.match&&o.match.matchType(t);let a=uk(t,i,o.options);o.options&Fd&&o.content.length==0&&(a|=Fd),this.nodes.push(new Hh(t,n,o.activeMarks,o.pendingMarks,r,null,a)),this.open++}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let n=this.open;n>=0;n--)if(this.nodes[n]==t)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),a=(s,u)=>{for(;s>=0;s--){let c=n[s];if(c==""){if(s==n.length-1||s==0)continue;for(;u>=o;u--)if(a(s-1,u))return!0;return!1}else{let l=u>0||u==0&&i?this.nodes[u].type:r&&u>=o?r.node(u-o).type:null;if(!l||l.name!=c&&l.groups.indexOf(c)==-1)return!1;u--}}return!0};return a(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(t){let n=GOe(t,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,n){for(let r=this.open;r>=0;r--){let i=this.nodes[r];if(i.pendingMarks.lastIndexOf(t)>-1)i.pendingMarks=t.removeFromSet(i.pendingMarks);else{i.activeMarks=t.removeFromSet(i.activeMarks);let a=i.popFromStashMark(t);a&&i.type&&i.type.allowsMarkType(a.type)&&(i.activeMarks=a.addToSet(i.activeMarks))}if(i==n)break}}}function QOe(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&y8.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function zOe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function HOe(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=t.exec(e);)r.push(n[1],n[2].trim());return r}function lk(e){let t={};for(let n in e)t[n]=e[n];return t}function YOe(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],a=s=>{o.push(s);for(let u=0;u<s.edgeCount;u++){let{type:c,next:l}=s.edge(u);if(c==t||o.indexOf(l)<0&&a(l))return!0}};if(a(i.contentMatch))return!0}}function GOe(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}class au{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=e1(n).createDocumentFragment());let i=r,o=[];return t.forEach(a=>{if(o.length||a.marks.length){let s=0,u=0;for(;s<o.length&&u<a.marks.length;){let c=a.marks[u];if(!this.marks[c.type.name]){u++;continue}if(!c.eq(o[s][0])||c.type.spec.spanning===!1)break;s++,u++}for(;s<o.length;)i=o.pop()[1];for(;u<a.marks.length;){let c=a.marks[u++],l=this.serializeMark(c,a.isInline,n);l&&(o.push([c,i]),i.appendChild(l.dom),i=l.contentDOM||l.dom)}}i.appendChild(this.serializeNodeInner(a,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:i}=au.renderSpec(e1(n),this.nodes[t.type.name](t));if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let i=t.marks.length-1;i>=0;i--){let o=this.serializeMark(t.marks[i],t.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(t,n,r={}){let i=this.marks[t.type.name];return i&&au.renderSpec(e1(r),i(t,n))}static renderSpec(t,n,r=null){if(typeof n=="string")return{dom:t.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let i=n[0],o=i.indexOf(" ");o>0&&(r=i.slice(0,o),i=i.slice(o+1));let a,s=r?t.createElementNS(r,i):t.createElement(i),u=n[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let l in u)if(u[l]!=null){let d=l.indexOf(" ");d>0?s.setAttributeNS(l.slice(0,d),l.slice(d+1),u[l]):s.setAttribute(l,u[l])}}for(let l=c;l<n.length;l++){let d=n[l];if(d===0){if(l<n.length-1||l>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}else{let{dom:p,contentDOM:A}=au.renderSpec(t,d,r);if(s.appendChild(p),A){if(a)throw new RangeError("Multiple content holes");a=A}}}return{dom:s,contentDOM:a}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new au(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=fk(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return fk(t.marks)}}function fk(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function e1(e){return e.document||window.document}const b8=65535,C8=Math.pow(2,16);function JOe(e,t){return e+t*C8}function dk(e){return e&b8}function ZOe(e){return(e-(e&b8))/C8}const S8=1,_8=2,am=4,I8=8;let mC=class{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&I8)>0}get deletedBefore(){return(this.delInfo&(S8|am))>0}get deletedAfter(){return(this.delInfo&(_8|am))>0}get deletedAcross(){return(this.delInfo&am)>0}},Ul=class al{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&al.empty)return al.empty}recover(t){let n=0,r=dk(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+ZOe(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,o=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let u=this.ranges[s]-(this.inverted?i:0);if(u>t)break;let c=this.ranges[s+o],l=this.ranges[s+a],d=u+c;if(t<=d){let p=c?t==u?-1:t==d?1:n:n,A=u+i+(p<0?0:l);if(r)return A;let m=t==(n<0?u:d)?null:JOe(s/3,t-u),v=t==u?_8:t==d?S8:am;return(n<0?t!=u:t!=d)&&(v|=I8),new mC(A,v,m)}i+=l-c}return r?t+i:new mC(t+i,0,null)}touches(t,n){let r=0,i=dk(n),o=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let u=this.ranges[s]-(this.inverted?r:0);if(u>t)break;let c=this.ranges[s+o],l=u+c;if(t<=l&&s==i*3)return!0;r+=this.ranges[s+a]-c}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let a=this.ranges[i],s=a-(this.inverted?o:0),u=a+(this.inverted?0:o),c=this.ranges[i+n],l=this.ranges[i+r];t(s,s+c,u,u+l),o+=l-c}}invert(){return new al(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?al.empty:new al(t<0?[0,-t,0]:[0,0,t])}};Ul.empty=new Ul([]);class kd{constructor(t=[],n,r=0,i=t.length){this.maps=t,this.mirror=n,this.from=r,this.to=i}slice(t=0,n=this.maps.length){return new kd(this.maps,this.mirror,t,n)}copy(){return new kd(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(t,n){this.to=this.maps.push(t),n!=null&&this.setMirror(this.maps.length-1,n)}appendMapping(t){for(let n=0,r=this.maps.length;n<t.maps.length;n++){let i=t.getMirror(n);this.appendMap(t.maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this.maps.length+t.maps.length;n>=0;n--){let i=t.getMirror(n);this.appendMap(t.maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let t=new kd;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this.maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let i=0;for(let o=this.from;o<this.to;o++){let a=this.maps[o],s=a.mapResult(t,n);if(s.recover!=null){let u=this.getMirror(o);if(u!=null&&u>o&&u<this.to){o=u,t=this.maps[u].recover(s.recover);continue}}i|=s.delInfo,t=s.pos}return r?t:new mC(t,i,null)}}const t1=Object.create(null);let Sr=class{getMap(){return Ul.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=t1[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in t1)throw new RangeError("Duplicate use of step JSON ID "+t);return t1[t]=n,n.prototype.jsonID=t,n}},sr=class Id{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new Id(t,null)}static fail(t){return new Id(null,t)}static fromReplace(t,n,r,i){try{return Id.ok(t.replace(n,r,i))}catch(o){if(o instanceof gp)return Id.fail(o.message);throw o}}};function HR(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(HR(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return X.fromArray(r)}let T8=class Td extends Sr{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new ae(HR(n.content,(a,s)=>!a.isAtom||!s.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),i),n.openStart,n.openEnd);return sr.fromReplace(t,this.from,this.to,o)}invert(){return new x8(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Td(n.pos,r.pos,this.mark)}merge(t){return t instanceof Td&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Td(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Td(n.from,n.to,t.markFromJSON(n.mark))}};Sr.jsonID("addMark",T8);let x8=class xd extends Sr{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new ae(HR(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return sr.fromReplace(t,this.from,this.to,r)}invert(){return new T8(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new xd(n.pos,r.pos,this.mark)}merge(t){return t instanceof xd&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new xd(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new xd(n.from,n.to,t.markFromJSON(n.mark))}};Sr.jsonID("removeMark",x8);let w8=class wd extends Sr{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return sr.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return sr.fromReplace(t,this.pos,this.pos+1,new ae(X.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new wd(this.pos,n.marks[i]);return new wd(this.pos,this.mark)}}return new E8(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new wd(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new wd(n.pos,t.markFromJSON(n.mark))}};Sr.jsonID("addNodeMark",w8);let E8=class gC extends Sr{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return sr.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return sr.fromReplace(t,this.pos,this.pos+1,new ae(X.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new w8(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new gC(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new gC(n.pos,t.markFromJSON(n.mark))}};Sr.jsonID("removeNodeMark",E8);let xh=class tu extends Sr{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&vC(t,this.from,this.to)?sr.fail("Structure replace would overwrite content"):sr.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new Ul([this.from,this.to-this.from,this.slice.size])}invert(t){return new tu(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new tu(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(t){if(!(t instanceof tu)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?ae.empty:new ae(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new tu(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?ae.empty:new ae(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new tu(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new tu(n.from,n.to,ae.fromJSON(t,n.slice),!!n.structure)}};Sr.jsonID("replace",xh);let aa=class sm extends Sr{constructor(t,n,r,i,o,a,s=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=a,this.structure=s}apply(t){if(this.structure&&(vC(t,this.from,this.gapFrom)||vC(t,this.gapTo,this.to)))return sr.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return sr.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?sr.fromReplace(t,this.from,this.to,r):sr.fail("Content does not fit in gap")}getMap(){return new Ul([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new sm(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=t.map(this.gapFrom,-1),o=t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new sm(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new sm(n.from,n.to,n.gapFrom,n.gapTo,ae.fromJSON(t,n.slice),n.insert,!!n.structure)}};Sr.jsonID("replaceAround",aa);function vC(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let a=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}}return!1}function XOe(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function wh(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let i=e.$from.node(r),o=e.$from.index(r),a=e.$to.indexAfter(r);if(r<e.depth&&i.canReplace(o,a,n))return r;if(r==0||i.type.spec.isolating||!XOe(i,o,a))break}return null}function $8(e,t,n=null,r=e){let i=eFe(e,t),o=i&&tFe(r,t);return o?i.map(pk).concat({type:t,attrs:n}).concat(o.map(pk)):null}function pk(e){return{type:e,attrs:null}}function eFe(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.contentMatchAt(r).findWrapping(t);if(!o)return null;let a=o.length?o[0]:t;return n.canReplaceWith(r,i,a)?o:null}function tFe(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.child(r),a=t.contentMatch.findWrapping(o.type);if(!a)return null;let u=(a.length?a[a.length-1]:t).contentMatch;for(let c=r;u&&c<i;c++)u=u.matchType(n.child(c).type);return!u||!u.validEnd?null:a}function R8(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,a=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!a.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,l=n-2;c>o;c--,l--){let d=i.node(c),p=i.index(c);if(d.type.spec.isolating)return!1;let A=d.content.cutByIndex(p,d.childCount),m=r&&r[l+1];m&&(A=A.replaceChild(0,m.type.create(m.attrs)));let v=r&&r[l]||d;if(!d.canReplace(p+1,d.childCount)||!v.type.validContent(A))return!1}let s=i.indexAfter(o),u=r&&r[0];return i.node(o).canReplaceWith(s,s,u?u.type:i.node(o+1).type)}function Eh(e,t){let n=e.resolve(t),r=n.index();return O8(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function O8(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function F8(e,t,n=-1){let r=e.resolve(t);for(let i=r.depth;;i--){let o,a,s=r.index(i);if(i==r.depth?(o=r.nodeBefore,a=r.nodeAfter):n>0?(o=r.node(i+1),s++,a=r.node(i).maybeChild(s)):(o=r.node(i).maybeChild(s-1),a=r.node(i+1)),o&&!o.isTextblock&&O8(o,a)&&r.node(i).canReplace(s,s+1))return t;if(i==0)break;t=n<0?r.before(i):r.after(i)}}function nFe(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let a=r.depth;a>=0;a--){let s=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,u=r.index(a)+(s>0?1:0),c=r.node(a),l=!1;if(o==1)l=c.canReplace(u,u,i);else{let d=c.contentMatchAt(u).findWrapping(i.firstChild.type);l=d&&c.canReplaceWith(u,u,d[0])}if(l)return s==0?r.pos:s<0?r.before(a+1):r.after(a+1)}return null}function YR(e,t,n=t,r=ae.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return rFe(i,o,r)?new xh(t,n,r):new iFe(i,o,r).fit()}function rFe(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class iFe{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=X.empty;for(let i=0;i<=t.depth;i++){let o=t.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=X.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let o=this.placed,a=r.depth,s=i.depth;for(;a&&s&&o.childCount==1;)o=o.firstChild.content,a--,s--;let u=new ae(o,a,s);return t>-1?new aa(r.pos,t,this.$to.pos,this.$to.end(),u,n):u.size||r.pos!=this.$to.pos?new xh(r.pos,i.pos,u):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){t=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=n1(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let a=i.firstChild;for(let s=this.depth;s>=0;s--){let{type:u,match:c}=this.frontier[s],l,d=null;if(n==1&&(a?c.matchType(a.type)||(d=c.fillBefore(X.from(a),!1)):o&&u.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:s,parent:o,inject:d};if(n==2&&a&&(l=c.findWrapping(a.type)))return{sliceDepth:r,frontierDepth:s,parent:o,wrap:l};if(o&&c.matchType(o.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=n1(t,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new ae(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=n1(t,n);if(i.childCount<=1&&n>0){let o=t.size-n<=n+i.size;this.unplaced=new ae(Ed(t,n-1,1),n-1,o?n-1:r)}else this.unplaced=new ae(Ed(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let v=0;v<o.length;v++)this.openFrontierNode(o[v]);let a=this.unplaced,s=r?r.content:a.content,u=a.openStart-t,c=0,l=[],{match:d,type:p}=this.frontier[n];if(i){for(let v=0;v<i.childCount;v++)l.push(i.child(v));d=d.matchFragment(i)}let A=s.size+t-(a.content.size-a.openEnd);for(;c<s.childCount;){let v=s.child(c),_=d.matchType(v.type);if(!_)break;c++,(c>1||u==0||v.content.size)&&(d=_,l.push(k8(v.mark(p.allowedMarks(v.marks)),c==1?u:0,c==s.childCount?A:-1)))}let m=c==s.childCount;m||(A=-1),this.placed=$d(this.placed,n,X.from(l)),this.frontier[n].match=d,m&&A<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let v=0,_=s;v<A;v++){let C=_.lastChild;this.frontier.push({type:C.type,match:C.contentMatchAt(C.childCount)}),_=C.content}this.unplaced=m?t==0?ae.empty:new ae(Ed(a.content,t-1,1),t-1,A<0?a.openEnd:t-1):new ae(Ed(a.content,t,c),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!r1(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),a=r1(t,n,i,r,o);if(a){for(let s=n-1;s>=0;s--){let{match:u,type:c}=this.frontier[s],l=r1(t,s,c,u,!0);if(!l||l.childCount)continue e}return{depth:n,fit:a,move:o?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=$d(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let i=t.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,t.index(r));this.openFrontierNode(i.type,i.attrs,o)}return t}openFrontierNode(t,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=$d(this.placed,this.depth,X.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(X.empty,!0);n.childCount&&(this.placed=$d(this.placed,this.frontier.length,n))}}function Ed(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Ed(e.firstChild.content,t-1,n)))}function $d(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy($d(e.lastChild.content,t-1,n)))}function n1(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function k8(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,k8(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(X.empty,!0)))),e.copy(r)}function r1(e,t,n,r,i){let o=e.node(t),a=i?e.indexAfter(t):e.index(t);if(a==o.childCount&&!n.compatibleContent(o.type))return null;let s=r.fillBefore(o.content,!0,a);return s&&!oFe(n,o.content,a)?s:null}function oFe(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}let aFe=class um extends Sr{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return sr.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return sr.fromReplace(t,this.pos,this.pos+1,new ae(X.from(i),0,n.isLeaf?0:1))}getMap(){return Ul.empty}invert(t){return new um(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new um(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new um(n.pos,n.attr,n.value)}};Sr.jsonID("attr",aFe);let yp=class extends Error{};yp=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};yp.prototype=Object.create(Error.prototype);yp.prototype.constructor=yp;yp.prototype.name="TransformError";const i1=Object.create(null);class ze{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new sFe(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=ae.empty){let r=n.content.lastChild,i=null;for(let s=0;s<n.openEnd;s++)i=r,r=r.lastChild;let o=t.steps.length,a=this.ranges;for(let s=0;s<a.length;s++){let{$from:u,$to:c}=a[s],l=t.mapping.slice(o);t.replaceRange(l.map(u.pos),l.map(c.pos),s?ae.empty:n),s==0&&mk(t,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:a,$to:s}=i[o],u=t.mapping.slice(r),c=u.map(a.pos),l=u.map(s.pos);o?t.deleteRange(c,l):(t.replaceRangeWith(c,l,n),mk(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let i=t.parent.inlineContent?new Be(t):sl(t.node(0),t.parent,t.pos,t.index(),n,r);if(i)return i;for(let o=t.depth-1;o>=0;o--){let a=n<0?sl(t.node(0),t.node(o),t.before(o+1),t.index(o),n,r):sl(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,n,r);if(a)return a}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new Ri(t.node(0))}static atStart(t){return sl(t,t,0,0,1)||new Ri(t)}static atEnd(t){return sl(t,t,t.content.size,t.childCount,-1)||new Ri(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=i1[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in i1)throw new RangeError("Duplicate use of selection JSON ID "+t);return i1[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Be.between(this.$anchor,this.$head).getBookmark()}}ze.prototype.visible=!0;class sFe{constructor(t,n){this.$from=t,this.$to=n}}let Ak=!1;function hk(e){!Ak&&!e.parent.inlineContent&&(Ak=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Be extends ze{constructor(t,n=t){hk(t),hk(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return ze.near(r);let i=t.resolve(n.map(this.anchor));return new Be(i.parent.inlineContent?i:r,r)}replace(t,n=ae.empty){if(super.replace(t,n),n==ae.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof Be&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Y0(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Be(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let i=t.resolve(n);return new this(i,r==n?i:t.resolve(r))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let o=ze.findFrom(n,r,!0)||ze.findFrom(n,-r,!0);if(o)n=o.$head;else return ze.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(ze.findFrom(t,-r,!0)||ze.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new Be(t,n)}}ze.jsonID("text",Be);class Y0{constructor(t,n){this.anchor=t,this.head=n}map(t){return new Y0(t.map(this.anchor),t.map(this.head))}resolve(t){return Be.between(t.resolve(this.anchor),t.resolve(this.head))}}class ve extends ze{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),o=t.resolve(i);return r?ze.near(o):new ve(o)}content(){return new ae(X.from(this.node),0,0)}eq(t){return t instanceof ve&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new GR(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new ve(t.resolve(n.anchor))}static create(t,n){return new ve(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}ve.prototype.visible=!1;ze.jsonID("node",ve);class GR{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new Y0(r,r):new GR(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&ve.isSelectable(r)?new ve(n):ze.near(n)}}class Ri extends ze{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=ae.empty){if(n==ae.empty){t.delete(0,t.doc.content.size);let r=ze.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new Ri(t)}map(t){return new Ri(t)}eq(t){return t instanceof Ri}getBookmark(){return uFe}}ze.jsonID("all",Ri);const uFe={map(){return this},resolve(e){return new Ri(e)}};function sl(e,t,n,r,i,o=!1){if(t.inlineContent)return Be.create(e,n);for(let a=r-(i>0?0:1);i>0?a<t.childCount:a>=0;a+=i){let s=t.child(a);if(s.isAtom){if(!o&&ve.isSelectable(s))return ve.create(e,n-(i<0?s.nodeSize:0))}else{let u=sl(e,s,n+i,i<0?s.childCount:0,i,o);if(u)return u}n+=s.nodeSize*i}return null}function mk(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof xh||i instanceof aa))return;let o=e.mapping.maps[r],a;o.forEach((s,u,c,l)=>{a==null&&(a=l)}),e.setSelection(ze.near(e.doc.resolve(a),n))}function gk(e,t){return!t||!e?e:e.bind(t)}class Yh{constructor(t,n,r){this.name=t,this.init=gk(n.init,r),this.apply=gk(n.apply,r)}}new Yh("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Yh("selection",{init(e,t){return e.selection||ze.atStart(t.doc)},apply(e){return e.selection}}),new Yh("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Yh("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}});function M8(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=M8(i,t,{})),n[r]=i}return n}class zr{constructor(t){this.spec=t,this.props={},t.props&&M8(t.props,this,this.props),this.key=t.key?t.key.key:L8("plugin")}getState(t){return t[this.key]}}const o1=Object.create(null);function L8(e){return e in o1?e+"$"+ ++o1[e]:(o1[e]=0,e+"$")}class eo{constructor(t="key"){this.key=L8(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const Dc=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},j8=function(e,t,n,r){return n&&(vk(e,t,n,r,-1)||vk(e,t,n,r,1))},cFe=/^(img|br|input|textarea|hr)$/i;function vk(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Gm(e))){let o=e.parentNode;if(!o||o.nodeType!=1||JR(e)||cFe.test(e.nodeName)||e.contentEditable=="false")return!1;t=Dc(e)+(i<0?0:1),e=o}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.contentEditable=="false")return!1;t=i<0?Gm(e):0}else return!1}}function Gm(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function lFe(e,t,n){for(let r=t==0,i=t==Gm(e);r||i;){if(e==n)return!0;let o=Dc(e);if(e=e.parentNode,!e)return!1;r=r&&o==0,i=i&&o==Gm(e)}}function JR(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const U8=function(e){return e.focusNode&&j8(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function B8(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const ho=typeof navigator<"u"?navigator:null,yk=typeof document<"u"?document:null,zs=ho&&ho.userAgent||"",yC=/Edge\/(\d+)/.exec(zs),P8=/MSIE \d/.exec(zs),bC=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(zs),$h=!!(P8||bC||yC),W8=P8?document.documentMode:bC?+bC[1]:yC?+yC[1]:0,G0=!$h&&/gecko\/(\d+)/i.test(zs);G0&&+(/Firefox\/(\d+)/.exec(zs)||[0,0])[1];const CC=!$h&&/Chrome\/(\d+)/.exec(zs),Hs=!!CC,D8=CC?+CC[1]:0,Kc=!$h&&!!ho&&/Apple Computer/.test(ho.vendor),ZR=Kc&&(/Mobile\/\w+/.test(zs)||!!ho&&ho.maxTouchPoints>2),Xr=ZR||(ho?/Mac/.test(ho.platform):!1),fFe=ho?/Win/.test(ho.platform):!1,Rh=/Android \d/.test(zs),XR=!!yk&&"webkitFontSmoothing"in yk.documentElement.style,dFe=XR?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function pFe(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&i.size==0,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let s=r.resolve(a),u,c;if(U8(n)){for(u=s;i&&!i.node;)i=i.parent;let l=i.node;if(i&&l.isAtom&&ve.isSelectable(l)&&i.parent&&!(l.isInline&&lFe(n.focusNode,n.focusOffset,i.dom))){let d=i.posBefore;c=new ve(a==d?s:r.resolve(d))}}else{let l=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null;u=r.resolve(l)}if(!c){let l=t=="pointer"||e.state.selection.head<s.pos&&!o?1:-1;c=N8(e,u,s,l)}return c}function K8(e){return e.editable?e.hasFocus():gFe(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function eO(e,t=!1){let n=e.state.selection;if(mFe(e,n),!!K8(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Hs){let r=e.domSelectionRange(),i=e.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&j8(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)hFe(e);else{let{anchor:r,head:i}=n,o,a;bk&&!(n instanceof Be)&&(n.$from.parent.inlineContent||(o=Ck(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(a=Ck(e,n.to))),e.docView.setSelection(r,i,e.root,t),bk&&(o&&Sk(o),a&&Sk(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&AFe(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const bk=Kc||Hs&&D8<63;function Ck(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(Kc&&i&&i.contentEditable=="false")return a1(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return a1(i);if(o)return a1(o)}}function a1(e){return e.contentEditable="true",Kc&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Sk(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function AFe(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!K8(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function hFe(e){let t=e.domSelection(),n=document.createRange();if(!t)return;let r=e.cursorWrapper.dom,i=r.nodeName=="IMG";i?n.setStart(r.parentNode,Dc(r)+1):n.setStart(r,0),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&$h&&W8<=11&&(r.disabled=!0,r.disabled=!1)}function mFe(e,t){if(t instanceof ve){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(_k(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else _k(e)}function _k(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function N8(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||Be.between(t,n,r)}function gFe(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function SC(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return o&&ze.findFrom(o,t)}function Ya(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Ik(e,t,n){let r=e.state.selection;if(r instanceof Be)if(n.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let a=e.state.doc.resolve(i.pos+o.nodeSize*(t<0?-1:1));return Ya(e,new Be(r.$anchor,a))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let i=SC(e.state,t);return i&&i instanceof ve?Ya(e,i):!1}else if(!(Xr&&n.indexOf("m")>-1)){let i=r.$head,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,a;if(!o||o.isText)return!1;let s=t<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(a=e.docView.descAt(s))&&!a.contentDOM?ve.isSelectable(o)?Ya(e,new ve(t<0?e.state.doc.resolve(i.pos-o.nodeSize):i)):XR?Ya(e,new Be(e.state.doc.resolve(t<0?s:s+o.nodeSize))):!1:!1}}else return!1;else{if(r instanceof ve&&r.node.isInline)return Ya(e,new Be(t>0?r.$to:r.$from));{let i=SC(e.state,t);return i?Ya(e,i):!1}}}function Jm(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Md(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function el(e,t){return t<0?vFe(e):yFe(e)}function vFe(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,a=!1;for(G0&&n.nodeType==1&&r<Jm(n)&&Md(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(n.nodeType!=1)break;{let s=n.childNodes[r-1];if(Md(s,-1))i=n,o=--r;else if(s.nodeType==3)n=s,r=n.nodeValue.length;else break}}else{if(q8(n))break;{let s=n.previousSibling;for(;s&&Md(s,-1);)i=n.parentNode,o=Dc(s),s=s.previousSibling;if(s)n=s,r=Jm(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}a?_C(e,n,r):i&&_C(e,i,o)}function yFe(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=Jm(n),o,a;for(;;)if(r<i){if(n.nodeType!=1)break;let s=n.childNodes[r];if(Md(s,1))o=n,a=++r;else break}else{if(q8(n))break;{let s=n.nextSibling;for(;s&&Md(s,1);)o=s.parentNode,a=Dc(s)+1,s=s.nextSibling;if(s)n=s,r=0,i=Jm(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}}o&&_C(e,o,a)}function q8(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function bFe(e,t){for(;e&&t==e.childNodes.length&&!JR(e);)t=Dc(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function CFe(e,t){for(;e&&!t&&!JR(e);)t=Dc(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function _C(e,t,n){if(t.nodeType!=3){let o,a;(a=bFe(t,n))?(t=a,n=0):(o=CFe(t,n))&&(t=o,n=o.nodeValue.length)}let r=e.domSelection();if(!r)return;if(U8(r)){let o=document.createRange();o.setEnd(t,n),o.setStart(t,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&eO(e)},50)}function Tk(e,t){let n=e.state.doc.resolve(t);if(!(Hs||fFe)&&n.parent.inlineContent){let i=e.coordsAtPos(t);if(t>n.start()){let o=e.coordsAtPos(t-1),a=(o.top+o.bottom)/2;if(a>i.top&&a<i.bottom&&Math.abs(o.left-i.left)>1)return o.left<i.left?"ltr":"rtl"}if(t<n.end()){let o=e.coordsAtPos(t+1),a=(o.top+o.bottom)/2;if(a>i.top&&a<i.bottom&&Math.abs(o.left-i.left)>1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function xk(e,t,n){let r=e.state.selection;if(r instanceof Be&&!r.empty||n.indexOf("s")>-1||Xr&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let a=SC(e.state,t);if(a&&a instanceof ve)return Ya(e,a)}if(!i.parent.inlineContent){let a=t<0?i:o,s=r instanceof Ri?ze.near(a,t):ze.findFrom(a,t);return s?Ya(e,s):!1}return!1}function wk(e,t){if(!(e.state.selection instanceof Be))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let a=e.state.tr;return t<0?a.delete(n.pos-o.nodeSize,n.pos):a.delete(n.pos,n.pos+o.nodeSize),e.dispatch(a),!0}return!1}function Ek(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function SFe(e){if(!Kc||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;Ek(e,r,"true"),setTimeout(()=>Ek(e,r,"false"),20)}return!1}function _Fe(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function IFe(e,t){let n=t.keyCode,r=_Fe(t);if(n==8||Xr&&n==72&&r=="c")return wk(e,-1)||el(e,-1);if(n==46&&!t.shiftKey||Xr&&n==68&&r=="c")return wk(e,1)||el(e,1);if(n==13||n==27)return!0;if(n==37||Xr&&n==66&&r=="c"){let i=n==37?Tk(e,e.state.selection.from)=="ltr"?-1:1:-1;return Ik(e,i,r)||el(e,i)}else if(n==39||Xr&&n==70&&r=="c"){let i=n==39?Tk(e,e.state.selection.from)=="ltr"?1:-1:1;return Ik(e,i,r)||el(e,i)}else{if(n==38||Xr&&n==80&&r=="c")return xk(e,-1,r)||el(e,-1);if(n==40||Xr&&n==78&&r=="c")return SFe(e)||xk(e,1,r)||el(e,1);if(r==(Xr?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function V8(e,t){e.someProp("transformCopied",A=>{t=A(t,e)});let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let A=r.firstChild;n.push(A.type.name,A.attrs!=A.type.defaultAttrs?A.attrs:null),r=A.content}let a=e.someProp("clipboardSerializer")||au.fromSchema(e.state.schema),s=J8(),u=s.createElement("div");u.appendChild(a.serializeFragment(r,{document:s}));let c=u.firstChild,l,d=0;for(;c&&c.nodeType==1&&(l=G8[c.nodeName.toLowerCase()]);){for(let A=l.length-1;A>=0;A--){let m=s.createElement(l[A]);for(;u.firstChild;)m.appendChild(u.firstChild);u.appendChild(m),d++}c=u.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let p=e.someProp("clipboardTextSerializer",A=>A(t,e))||t.content.textBetween(0,t.content.size,`
|