slice-machine-ui 2.20.5-alpha.jp-import-slices-2.1 → 2.20.5-alpha.lg-import-slices.1

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.
Files changed (53) hide show
  1. package/out/404.html +1 -1
  2. package/out/_next/static/GzPwmcuyHg0TUP7cX7YSA/_buildManifest.js +1 -0
  3. package/out/_next/static/chunks/{248-2902bda47821f37b.js → 248-84a5987f0499b074.js} +1 -1
  4. package/out/_next/static/chunks/422-c7a16d95b75c9e1c.js +1 -0
  5. package/out/_next/static/chunks/489-c9535ef34da63d1a.js +1 -0
  6. package/out/_next/static/chunks/585-c89bb2471e85b9f8.js +1 -0
  7. package/out/_next/static/chunks/{630-4fe1e982234bd925.js → 630-2bf927bca082a191.js} +1 -1
  8. package/out/_next/static/chunks/{647-a29bee23cb9ac7a2.js → 647-aa094286bc248d52.js} +1 -1
  9. package/out/_next/static/chunks/{882-8ab59c0c72307c87.js → 882-48d61b2fabee28d8.js} +1 -1
  10. package/out/_next/static/chunks/954-bedaaabf664584a0.js +1 -0
  11. package/out/_next/static/chunks/a6495ab1.00190ac98e794d8f.js +28 -0
  12. package/out/_next/static/chunks/pages/{_app-a60aecdbaa4efedd.js → _app-0668d41463a0a907.js} +217 -217
  13. package/out/_next/static/chunks/pages/{changelog-bc83e25e8d316ca9.js → changelog-8514e0696e90a1b2.js} +1 -1
  14. package/out/_next/static/chunks/pages/{changes-6f371ebe52dbe76a.js → changes-e66094f57453cf9c.js} +1 -1
  15. package/out/_next/static/chunks/pages/custom-types/{[customTypeId]-80defa14b6ea36f7.js → [customTypeId]-273e9a82c085b596.js} +1 -1
  16. package/out/_next/static/chunks/pages/{labs-16d118a80936d583.js → labs-56fd818a63553497.js} +1 -1
  17. package/out/_next/static/chunks/pages/page-types/{[pageTypeId]-f4ff9ad74b44bf09.js → [pageTypeId]-3fa7667de1a790d9.js} +1 -1
  18. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/[variation]/{simulator-873c0c89aaf50b3c.js → simulator-8c70298caf51bed0.js} +1 -1
  19. package/out/_next/static/chunks/pages/slices/[lib]/[sliceName]/{[variation]-0e9aa745ed9fe1ec.js → [variation]-22ffa2561ac66557.js} +1 -1
  20. package/out/_next/static/chunks/pages/slices-76679cf064761d2b.js +1 -0
  21. package/out/_next/static/chunks/{webpack-e986dd216b883a74.js → webpack-24ddb02bea621501.js} +1 -1
  22. package/out/_next/static/css/bc89f2cd4e4781f5.css +1 -0
  23. package/out/changelog.html +1 -1
  24. package/out/changes.html +1 -1
  25. package/out/custom-types/[customTypeId].html +1 -1
  26. package/out/custom-types.html +1 -1
  27. package/out/index.html +1 -1
  28. package/out/labs.html +1 -1
  29. package/out/page-types/[pageTypeId].html +1 -1
  30. package/out/slices/[lib]/[sliceName]/[variation]/simulator.html +1 -1
  31. package/out/slices/[lib]/[sliceName]/[variation].html +1 -1
  32. package/out/slices.html +1 -1
  33. package/package.json +6 -6
  34. package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/ImportSlicesFromLibraryModal.tsx +285 -104
  35. package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/hooks/useImportSlicesFromGithub.ts +4 -7
  36. package/src/features/customTypes/customTypesBuilder/SliceZoneBlankSlate.tsx +18 -4
  37. package/src/features/customTypes/customTypesBuilder/shared/getSubmitButtonLabel.ts +5 -3
  38. package/src/features/customTypes/customTypesBuilder/sliceCreationOptions.tsx +14 -0
  39. package/src/legacy/lib/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModal.tsx +72 -0
  40. package/src/legacy/lib/builders/CustomTypeBuilder/SliceZone/UpdateSliceZoneModalList.tsx +3 -1
  41. package/src/legacy/lib/builders/CustomTypeBuilder/SliceZone/index.tsx +79 -31
  42. package/src/pages/slices.tsx +30 -0
  43. package/out/_next/static/60BSwFmsh1-aNIyMe29hH/_buildManifest.js +0 -1
  44. package/out/_next/static/chunks/21-f3962d02eda0a46e.js +0 -1
  45. package/out/_next/static/chunks/633-2d20c3e815c79c7f.js +0 -1
  46. package/out/_next/static/chunks/660-a3ec593dcfbb44c9.js +0 -1
  47. package/out/_next/static/chunks/6611d287.1714222015f895ea.js +0 -28
  48. package/out/_next/static/chunks/pages/slices-93fc784c443a996c.js +0 -1
  49. package/out/_next/static/css/b30fbbc3ed00a725.css +0 -1
  50. package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/LibrarySlicesTab.tsx +0 -125
  51. package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/LocalSlicesTab.tsx +0 -67
  52. package/src/features/customTypes/customTypesBuilder/ImportSlicesFromLibraryModal/ReuseExistingSlicesContext.tsx +0 -279
  53. /package/out/_next/static/{60BSwFmsh1-aNIyMe29hH → GzPwmcuyHg0TUP7cX7YSA}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[630],{35289:function(e,t,n){"use strict";n.d(t,{aV:function(){return s},Bu:function(){return d}});var i=n(52322),l=n(18337),r=n(6277),o=n(13834),a=n.n(o);let s=e=>{let{border:t=!0,...n}=e;return(0,i.jsx)("div",{...n,className:(0,r.Z)(a().root,t&&a()["root-border"])})},d=e=>{let{actions:t,children:n,toggle:r,...o}=e;return(0,i.jsxs)("div",{...o,className:a().header,children:[(0,i.jsx)(l.bL,{color:"grey11",component:"span",noWrap:!0,variant:"bold",children:n}),r,t?(0,i.jsx)("div",{className:a().headerActions,children:t}):null]})}},6882:function(e,t,n){"use strict";n.d(t,{$S:function(){return x},$U:function(){return c},BB:function(){return f},Fj:function(){return b},J9:function(){return v},L0:function(){return u},Qr:function(){return i},U:function(){return y},UG:function(){return g},Wc:function(){return p},XU:function(){return k},_M:function(){return m},_n:function(){return h},gA:function(){return o},pG:function(){return l},pV:function(){return d},pt:function(){return r},tg:function(){return s},uG:function(){return a}});let i={name:"Boolean",description:"A true or false toggle.",icon:"toggleOff",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295526/DEV_TOOLS/SM_FIELDS/Type_Boolean_cbwg8k.png",type:"Boolean"},l={name:"Color",description:"A color in hex format.",icon:"colorLens",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295521/DEV_TOOLS/SM_FIELDS/Type_Color_nyoeit.png",type:"Color"},r={name:"Date",description:"A date without time.",icon:"dateRange",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295525/DEV_TOOLS/SM_FIELDS/Type_Date_dsuaeq.png",type:"Date"},o={name:"Embed",description:"A video, song, or oEmbed link.",icon:"code",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295523/DEV_TOOLS/SM_FIELDS/Type_Embed_wwssvd.png",type:"Embed"},a={name:"Geopoint",description:"A geographical coordinate.",icon:"place",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295522/DEV_TOOLS/SM_FIELDS/Type_GeoPoint_lpq0sm.png",type:"GeoPoint"},s={name:"Image",description:"A responsive image.",icon:"image",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295520/DEV_TOOLS/SM_FIELDS/Type_Image_zyatxy.png",type:"Image"},d={name:"Link",description:"A link to a website, asset, or document.",icon:"link",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295528/DEV_TOOLS/SM_FIELDS/Type_Link_bgslgy.png",type:"Link"},c={name:"Content Relationship",description:"A reference to a Prismic document.",icon:"settingsEthernet",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295527/DEV_TOOLS/SM_FIELDS/Type_Content_RelationShip_s4z4nh.png",type:"Link",variant:"ContentRelationship"},u={name:"Link to Media",description:"A link to a media asset.",icon:"attachFile",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295519/DEV_TOOLS/SM_FIELDS/Type_LinkToMedia_m2p0ce.png",type:"Link",variant:"LinkToMedia"},p={name:"Number",description:"An integer or float.",icon:"pin",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295522/DEV_TOOLS/SM_FIELDS/Type_Number_o3olop.png",type:"Number"},h={name:"Rich Text",description:"Text with formatting options.",icon:"textFields",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295530/DEV_TOOLS/SM_FIELDS/Type_Rich_Text_fxdyar.png",type:"StructuredText"},m={name:"Select",description:"A dropdown of options.",icon:"arrowDropDownCircle",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295527/DEV_TOOLS/SM_FIELDS/Type_Select_bedjei.png",type:"Select"},f={name:"Table",description:"A structured table.",icon:"table",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1737381854/FIELDS_SM/Table_f47jnq.png",type:"Table"},x={name:"Text",description:"A text string without formatting.",icon:"title",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295529/DEV_TOOLS/SM_FIELDS/Type_Key_Text_xrqf45.png",type:"Text"},g={name:"Timestamp",description:"A date and time.",icon:"schedule",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295524/DEV_TOOLS/SM_FIELDS/Type_Timestamp_fkr5iw.png",type:"Timestamp"},v=[s,x,h,i,p,m,d,u,l,r,f,g,o,a,c],b={name:"UID",description:"Unique Identifier",icon:"tag",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295519/DEV_TOOLS/SM_FIELDS/Type_UID_hrwzug.png",type:"UID"},y={name:"Repeatable Group",description:"A set of fields that editors can repeat.",icon:"createNewFolder",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721314577/DEV_TOOLS/SM_FIELDS/Type_Group_uwwco0.png",type:"Group"},j={...y,variant:"NestedGroup"},k=[...v,b,y,j]},34166:function(e,t,n){"use strict";n.d(t,{nZ:function(){return c},rT:function(){return p},tB:function(){return u}});var i=n(52322),l=n(18337),r=n(2784),o=n(30195),a=n(94160),s=n(76611),d=n(5683);function c(e){let{type:t,library:n,sliceId:i,variationId:l,langSmithUrl:r}=e,o=(0,d.iv)({type:t,library:n,sliceId:i,variationId:l}),a=JSON.stringify({langSmithUrl:r});localStorage.setItem(o,a)}function u(e){let{type:t,library:n,sliceId:i,variationId:l}=e,r=(0,d.iv)({type:t,library:n,sliceId:i,variationId:l});localStorage.removeItem(r)}function p(e){let{type:t,library:n,sliceId:c,variationId:u}=e,{key:p,value:h,done:m}=function(e){let{type:t,library:n,sliceId:i,variationId:l}=e,r=(0,d.iv)({type:t,library:n,sliceId:i,variationId:l}),[a,c]=(0,s.V)(r,void 0,{schema:o.z.object({langSmithUrl:o.z.string().url().optional()})});return{key:r,value:a,done:()=>c(void 0)}}({type:t,library:n,sliceId:c,variationId:u}),[f,x]=(0,r.useState)(),g=e=>()=>{h&&(x(p),a.Xe.track({event:"slice-generation-feedback",type:t,sliceId:c,variationId:u,feedback:e,langSmithUrl:h.langSmithUrl}),m())};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.be,{children:(0,i.jsx)(l.bQ,{anchor:(0,i.jsx)(l.D,{width:"100%",justifyContent:"center",position:"absolute",bottom:64}),icon:"check",title:"Thanks for your feedback!",seconds:2,open:!!f,onOpenChange:e=>{e||x(void 0)}},f)}),(0,i.jsx)(l.i,{children:h&&(0,i.jsxs)(l.D,{flexDirection:"row",justifyContent:"end",gap:8,alignItems:"center",children:[(0,i.jsx)(l.bL,{color:"grey11",children:"Did the AI get it right?"}),(0,i.jsxs)(l.D,{flexDirection:"row",gap:4,children:[(0,i.jsx)(l.c3,{side:"bottom",sideOffset:4,variant:"text",content:"Looks good",children:(0,i.jsx)(l.aZ,{variant:"solid",size:"small",icon:"thumbUp",onClick:g("up")})}),(0,i.jsx)(l.c3,{side:"bottom",sideOffset:4,variant:"text",content:"Needs improvement",children:(0,i.jsx)(l.aZ,{variant:"solid",size:"small",icon:"thumbDown",onClick:g("down")})})]})]})})]})}},23094:function(e,t,n){"use strict";n.d(t,{X:function(){return r}});var i=n(52322),l=n(18337);let r=e=>{let t;let{status:n}=e;switch(n){case"pending":t={icon:(0,i.jsx)(l.bg,{color:"grey11"}),text:"Saving..."};break;case"failed":t={icon:(0,i.jsx)(l.aX,{name:"close",color:"tomato11",size:"medium"}),text:"Failed to save"};break;case"done":t={icon:(0,i.jsx)(l.aX,{name:"check",color:"green11",size:"medium"}),text:"Auto-saved"}}return(0,i.jsxs)(l.D,{gap:8,alignItems:"center",children:[t.icon,(0,i.jsx)(l.bL,{color:"grey11",children:t.text})]})}},6609:function(e,t,n){"use strict";n.d(t,{S:function(){return o}});var i=n(52322),l=n(18337),r=n(6882);function o(e){let{open:t,onOpenChange:n,disabled:o=!1,onSelectField:s,fields:d,triggerDataTestId:c="add-field",trigger:u}=e,p=d.filter(e=>r.J9.some(t=>t.name===e.name)||e.name===r.Fj.name),h=d.find(e=>e.name===r.U.name);return(0,i.jsxs)(l.ar,{open:t,onOpenChange:n,children:[(0,i.jsx)(l.av,{disabled:o,children:null!=u?u:(0,i.jsx)(l.E,{startIcon:"add",color:"grey","data-testid":c,children:"Add a field"})}),(0,i.jsxs)(l.as,{align:"end",maxHeight:400,collisionPadding:8,children:[(0,i.jsx)(l.au,{children:"Single fields"}),p.map(e=>(0,i.jsx)(a,{field:e,onSelectField:s},e.name)),h&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.au,{children:"Set of fields"}),(0,i.jsx)(a,{field:h,onSelectField:s})]})]})]})}function a(e){let{field:t,onSelectField:n}=e,{type:r,variant:o,name:a,icon:s,description:d,thumbnail:c}=t;return(0,i.jsx)(l.at,{startIcon:(0,i.jsx)(l.aX,{name:s,size:"large"}),description:d,onSelect:()=>n(null!=o?o:r),renderTooltip:e=>(0,i.jsx)(l.c3,{visible:!0,variant:"custom",content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.a_,{src:c,borderRadius:4,sx:{height:170,width:278},animateOnLoad:!1}),(0,i.jsx)(l.bL,{color:"white",children:"How it will look for content editors."})]}),align:"start",side:"left",sideOffset:4,animation:"none",children:e}),children:a},"".concat(r).concat(o?"-".concat(o):""))}},41347:function(e,t,n){"use strict";n.d(t,{zE:function(){return d},Vg:function(){return j},WP:function(){return C}});var i=n(52322),l=n(47124),r=n(18337),o=n(2784),a=n(50477),s=n(87446);function d(e){return(0,i.jsx)(s.h,{renderError:()=>(0,i.jsxs)(r.D,{alignItems:"center",gap:8,children:[(0,i.jsx)(r.aX,{name:"alert",size:"small",color:"tomato10"}),(0,i.jsx)(r.bL,{color:"tomato10",children:"Error loading your types"})]}),children:(0,i.jsx)(r.bB,{fallback:(0,i.jsxs)(r.D,{flexDirection:"column",position:"relative",children:[(0,i.jsx)(r.bx,{height:240}),(0,i.jsxs)(r.D,{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",alignItems:"center",gap:8,children:[(0,i.jsx)(r.aX,{name:"autorenew",size:"small",color:"grey11"}),(0,i.jsx)(r.bL,{color:"grey11",children:"Loading your types..."})]})]}),children:(0,i.jsx)(c,{...e})})})}function c(e){let{value:t,onChange:n}=e,{allCustomTypes:l,pickedCustomTypes:s}=function(e){let{customTypes:t}=(0,a.xU)();if((0,o.useEffect)(()=>{(0,a.NG)()},[]),!e)return{allCustomTypes:t,pickedCustomTypes:[]};let n=e.flatMap(e=>{var n;return null!==(n=t.find(t=>t.id===L(e)))&&void 0!==n?n:[]});return{allCustomTypes:t,pickedCustomTypes:n}}(t),d=t?j({linkCustomtypes:t,allCustomTypes:l}):{};return(0,i.jsxs)(r.D,{overflow:"hidden",flexDirection:"column",border:!0,borderRadius:6,width:"100%",children:[(0,i.jsx)(r.D,{border:{bottom:!0},padding:{inline:16,bottom:16,top:12},flexDirection:"column",gap:8,children:s.length>0?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.D,{flexDirection:"column",children:[(0,i.jsx)(r.bL,{variant:"h4",color:"grey12",children:"Allowed type"}),(0,i.jsxs)(r.bL,{color:"grey11",children:["Select a single type that editors can link to in the Page Builder.",(0,i.jsx)("br",{}),"For the selected type, choose which fields to include in the API response."]}),s.length>1&&(0,i.jsx)(r.D,{margin:{block:12},children:(0,i.jsx)(r.f,{color:"warn",icon:"alert",subtitle:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.bL,{color:"inherit",variant:"bold",children:"Legacy mode. Keep only one type to enable the improved Content Relationship feature."}),(0,i.jsx)("br",{}),(0,i.jsxs)("a",{href:"https://prismic.io/docs/fields/content-relationship",target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"none",fontWeight:"bold",display:"flex",alignItems:"center",gap:4},children:[(0,i.jsx)(r.bL,{color:"inherit",variant:"bold",children:"See documentation"}),(0,i.jsx)(r.aX,{name:"arrowForward",size:"small",color:"inherit"})]})]})})})]}),s.map(e=>{var o;return(0,i.jsxs)(r.D,{gap:4,padding:8,border:!0,borderRadius:6,borderColor:"grey6",backgroundColor:"white",justifyContent:"space-between",children:[s.length>1?(0,i.jsx)(r.bL,{children:e.id}):(0,i.jsx)(r.c5,{children:(0,i.jsx)(h,{customType:e,onChange:i=>{n(function(e){let{linkCustomtypes:t,fieldCheckMap:n,newCustomType:i,customTypeId:l}=e,r=[],o=Object.entries({...n,[l]:i}).flatMap(e=>{let[t,n]=e,i=Object.entries(n).flatMap(e=>{let[t,n]=e;if("group"===n.type){let e=Object.entries(n.value).flatMap(e=>{let[t,n]=e;if("checkbox"===n.type)return n.value?t:[];let i=S(n.value);return i.length>0?{id:t,customtypes:i}:[]});return e.length>0?{id:t,fields:e}:[]}if("contentRelationship"===n.type){let e=S(n.value);return e.length>0?{id:t,customtypes:e}:[]}return n.value?t:[]});return i.length>0?{id:t,fields:i}:[]});if(!t)return o;for(let e of t){let t=o.find(t=>L(t)===L(e));void 0!==t?r.push(t):L(e)===l?r.push(L(e)):r.push(e)}return r}({fieldCheckMap:d,newCustomType:i,linkCustomtypes:t,customTypeId:e.id}))},fieldCheckMap:null!==(o=d[e.id])&&void 0!==o?o:{},allCustomTypes:l})}),(0,i.jsx)(r.aZ,{icon:"close",size:"small",onClick:()=>{var i;return i=e.id,void(t&&n(t.filter(e=>L(e)!==i)))},sx:{height:24,width:24},hiddenLabel:"Remove type"})]},e.id)})]}):(0,i.jsx)(u,{onSelect:function(e){n(t?[...t,e]:[e])},allCustomTypes:l})}),(0,i.jsx)(r.D,{backgroundColor:"white",flexDirection:"column",padding:12,children:(0,i.jsxs)(r.bL,{variant:"normal",color:"grey11",children:["Have ideas for improving this field?"," ",(0,i.jsx)("a",{href:"https://community.prismic.io/t/content-relationship-share-your-requests-and-feedback/19843",target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"underline"},children:"Please provide your feedback here"}),"."]})})]})}function u(e){let{allCustomTypes:t,onSelect:n}=e;return(0,i.jsxs)(r.D,{flexDirection:"column",gap:8,alignItems:"center",padding:{block:24},children:[(0,i.jsxs)(r.D,{flexDirection:"column",alignItems:"center",gap:4,children:[(0,i.jsx)(r.bL,{variant:"h5",color:"grey12",children:"No type selected"}),(0,i.jsxs)(r.bL,{color:"grey11",component:"p",align:"center",children:["Select the type editors can link to.",(0,i.jsx)("br",{}),"Then, choose which fields to return in the API."]})]}),(0,i.jsx)(r.D,{children:(0,i.jsx)(p,{allCustomTypes:t,onSelect:n})})]})}function p(e){let{allCustomTypes:t,onSelect:n}=e,l=(0,i.jsx)(r.E,{startIcon:"add",color:"grey",disabled:0===t.length,children:"Add type"});return 0===t.length?(0,i.jsx)(r.D,{children:(0,i.jsx)(r.c3,{content:"No type available",side:"bottom",align:"start",disableHoverableContent:!0,children:l})}):(0,i.jsx)(r.D,{children:(0,i.jsxs)(r.ar,{children:[(0,i.jsx)(r.av,{children:l}),(0,i.jsxs)(r.as,{maxHeight:400,minWidth:256,align:"center",children:[(0,i.jsx)(r.au,{children:(0,i.jsx)(r.bL,{color:"grey11",children:"Types"})}),t.map(e=>(0,i.jsx)(r.at,{onSelect:()=>n(e.id),children:(0,i.jsxs)(r.D,{alignItems:"center",justifyContent:"space-between",gap:8,children:[(0,i.jsx)(r.bO,{children:(0,i.jsx)(r.bL,{children:e.id})}),(0,i.jsx)(r.m,{title:(0,i.jsx)(r.bL,{variant:"extraSmall",color:"purple11",children:b(e.format)}),color:"purple",size:"small"})]})},e.id))]})]})})}function h(e){let{customType:t,fieldCheckMap:n,onChange:l,allCustomTypes:o}=e,a=I(t).map(e=>{var t,a,s;let[d,c]=e;if("Group"===c.type){let e=null!==(a=n[d])&&void 0!==a?a:{};return(0,i.jsx)(g,{group:c,groupId:d,onChange:e=>{l({...n,[d]:{type:"group",value:e}})},fieldCheckMap:"group"===e.type?e.value:{},allCustomTypes:o},d)}if(F(c,o)){let e=null!==(s=n[d])&&void 0!==s?s:{};return(0,i.jsx)(m,{field:c,fieldId:d,onChange:e=>{l({...n,[d]:{type:"contentRelationship",value:e}})},fieldCheckMap:"contentRelationship"===e.type?e.value:{},allCustomTypes:o},d)}return(0,i.jsx)(r.c6,{title:d,checked:(null===(t=n[d])||void 0===t?void 0:t.value)===!0,onCheckedChange:e=>{l({...n,[d]:{type:"checkbox",value:e}})}},d)}),s=C(n);return(0,i.jsx)(r.c7,{title:t.id,subtitle:s.pickedFields>0?v(s.pickedFields,"returned in the API"):"(No fields returned in the API)",badge:b(t.format),defaultOpen:!0,children:a.length>0?a:(0,i.jsx)(f,{})},t.id)}function m(e){var t,n;let{field:l,fieldId:o,fieldCheckMap:a,onChange:s,allCustomTypes:d}=e,[c]=y(null===(t=l.config)||void 0===t?void 0:t.customtypes,d),u=e=>{s({...a,[c.id]:e})},p=null!==(n=a[c.id])&&void 0!==n?n:{},h=I(c).map(e=>{var t,n;let[l,o]=e;if("Group"===o.type){let e=null!==(n=p[l])&&void 0!==n?n:{};return(0,i.jsx)(x,{group:o,groupId:l,onChange:e=>{u({...p,[l]:{type:"group",value:e}})},fieldCheckMap:"group"===e.type?e.value:{}},l)}return(0,i.jsx)(r.c6,{title:l,checked:(null===(t=p[l])||void 0===t?void 0:t.value)===!0,onCheckedChange:e=>{u({...p,[l]:{type:"checkbox",value:e}})}},l)});return(0,i.jsx)(r.c7,{title:(0,i.jsxs)(r.bL,{children:[o," ",(0,i.jsxs)(r.bL,{color:"grey11",children:["→ ",c.id]})]}),subtitle:v(C(p).pickedFields),badge:b(c.format),children:h.length>0?h:(0,i.jsx)(f,{})},c.id)}function f(){return(0,i.jsx)(r.bL,{color:"grey11",children:"No available fields to select"})}function x(e){let{group:t,groupId:n,fieldCheckMap:l,onChange:o}=e,a=w(t).map(e=>{var t;let{fieldId:n}=e;return(0,i.jsx)(r.c6,{title:n,checked:(null===(t=l[n])||void 0===t?void 0:t.value)===!0,onCheckedChange:e=>{o({...l,[n]:{type:"checkbox",value:e}})}},n)});return(0,i.jsx)(r.c7,{title:n,subtitle:v(C(l).pickedFields),badge:"Group",children:a.length>0?a:(0,i.jsx)(f,{})},n)}function g(e){let{group:t,groupId:n,fieldCheckMap:l,onChange:o,allCustomTypes:a}=e,s=w(t).map(e=>{var t,n;let{fieldId:s,field:d}=e;if(F(d,a)){let e=null!==(n=l[s])&&void 0!==n?n:{};return(0,i.jsx)(m,{field:d,fieldId:s,fieldCheckMap:"contentRelationship"===e.type?e.value:{},onChange:e=>{o({...l,[s]:{type:"contentRelationship",value:e}})},allCustomTypes:a},s)}return(0,i.jsx)(r.c6,{title:s,checked:(null===(t=l[s])||void 0===t?void 0:t.value)===!0,onCheckedChange:e=>{o({...l,[s]:{type:"checkbox",value:e}})}},s)});return(0,i.jsx)(r.c7,{title:n,subtitle:v(C(l).pickedFields),badge:"Group",children:s.length>0?s:(0,i.jsx)(f,{})},n)}function v(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"selected";if(0!==e)return"(".concat(e," ").concat((0,l._6)(e,"field","fields")," ").concat(t,")")}function b(e){return"page"===e?"Page type":"Custom type"}function y(e,t){return e?e.flatMap(e=>{var n;return null!==(n=t.find(t=>t.id===L(e)))&&void 0!==n?n:[]}):[]}function j(e){let{linkCustomtypes:t,allCustomTypes:n}=e,i=void 0!==n;return t.reduce((e,t)=>{if("string"==typeof t)return e;let l={};if(i){let i=n.find(e=>e.id===t.id);if(!i)return e;l=T(i)}let r=t.fields.reduce((e,t)=>{let r=l[L(t)];if(i&&void 0===r)return e;if("string"==typeof t)return i&&void 0!==r&&"Group"===r.type||(e[t]={type:"checkbox",value:!0}),e;if("fields"in t&&void 0!==t.fields){if(i&&void 0!==r&&"Group"!==r.type)return e;let o=function(e){let{group:t,ctFlatFieldMap:n,allCustomTypes:i}=e,l=void 0!==i,r=t.fields.reduce((e,r)=>{let o=E(n,t.id,L(r));if(l&&!o)return e;if("string"==typeof r)return l&&void 0!==o&&"Group"===o.type||(e[r]={type:"checkbox",value:!0}),e;if("customtypes"in r&&void 0!==r.customtypes){if(l&&void 0!==o&&!_(o))return e;let t=k({field:r,allCustomTypes:i});t&&(e[r.id]=t)}return e},{});if(0!==Object.keys(r).length)return{type:"group",value:r}}({group:t,allCustomTypes:n,ctFlatFieldMap:l});return o&&(e[t.id]=o),e}if("customtypes"in t&&void 0!==t.customtypes){if(i&&void 0!==r&&!_(r))return e;let l=k({field:t,allCustomTypes:n});l&&(e[t.id]=l)}return e},{});return Object.keys(r).length>0&&(e[t.id]=r),e},{})}function k(e){let{field:t,allCustomTypes:n}=e,i=void 0!==n,l=t.customtypes.reduce((e,t)=>{if("string"==typeof t)return e;let l={};if(i){let i=n.find(e=>e.id===t.id);if(!i)return e;l=T(i)}let r=t.fields.reduce((e,t)=>{if("string"==typeof t){let n=l[t];return i&&(void 0===n||"Group"===n.type)||(e[t]={type:"checkbox",value:!0}),e}if("fields"in t&&void 0!==t.fields){let n=t.fields.reduce((e,n)=>{let r=E(l,t.id,n);return i&&(void 0===r||"Group"===r.type)||(e[n]={type:"checkbox",value:!0}),e},{});Object.keys(n).length>0&&(e[t.id]={type:"group",value:n})}return e},{});return Object.keys(r).length>0&&(e[t.id]=r),e},{});if(0!==Object.keys(l).length)return{type:"contentRelationship",value:l}}function S(e){return Object.entries(e).flatMap(e=>{let[t,n]=e,i=Object.entries(n).flatMap(e=>{let[t,n]=e;if("group"===n.type){let e=Object.entries(n.value).flatMap(e=>{let[t,n]=e;return"checkbox"===n.type&&n.value?t:[]});return e.length>0?{id:t,fields:e}:[]}return n.value?t:[]});return i.length>0?{id:t,fields:i}:[]})}function C(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?Object.values(e).reduce((e,n)=>{if(!function(e){if("object"!=typeof e||null===e||Array.isArray(e)||e instanceof Date||e instanceof RegExp||e instanceof Error)return!1;for(let t in e)if("string"!=typeof t||!Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(n))return e;if("type"in n&&"checkbox"===n.type)return n.value?{pickedFields:e.pickedFields+1,nestedPickedFields:e.nestedPickedFields+(t?1:0)}:e;if("type"in n&&"contentRelationship"===n.type){let{pickedFields:t,nestedPickedFields:i}=C(n,!0);return{pickedFields:e.pickedFields+t,nestedPickedFields:e.nestedPickedFields+i}}let{pickedFields:i,nestedPickedFields:l}=C(n,t);return{pickedFields:e.pickedFields+i,nestedPickedFields:e.nestedPickedFields+l}},{pickedFields:0,nestedPickedFields:0}):{pickedFields:0,nestedPickedFields:0}}function _(e){var t;return"Link"===e.type&&(null===(t=e.config)||void 0===t?void 0:t.select)==="document"}function F(e,t){var n;return _(e)&&1===y(null===(n=e.config)||void 0===n?void 0:n.customtypes,t).length}function I(e){return Object.values(e.json).flatMap(e=>Object.entries(e).flatMap(e=>{let[t,n]=e;return"Slices"!==n.type&&"Choice"!==n.type&&"UID"!==n.type&&"uid"!==t?[[t,n]]:[]}))}function T(e){return Object.fromEntries(I(e))}function E(e,t,n){var i,l;let r=e[t];if(void 0!==r&&"Group"===r.type)return null===(l=r.config)||void 0===l?void 0:null===(i=l.fields)||void 0===i?void 0:i[n]}function w(e){var t;return(null===(t=e.config)||void 0===t?void 0:t.fields)?Object.entries(e.config.fields).map(e=>{let[t,n]=e;return{fieldId:t,field:n}}):[]}function L(e){return"string"==typeof e?e:e.id}},38193:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var i=n(52322),l=n(61183);n(2784);var r=n(59326),o=n(75289);l.Z.registerLanguage("svelte",e=>({subLanguage:"xml",contains:[e.COMMENT("<!--","-->",{relevance:10}),{begin:/^(\s*)(<script(\s*context="module")?>)/gm,end:/^(\s*)(<\/script>)/gm,subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,contains:[{begin:/^(\s*)(\$:)/gm,end:/(\s*)/gm,className:"keyword"}]},{begin:/^(\s*)(<style.*>)/gm,end:/^(\s*)(<\/style>)/gm,subLanguage:"css",excludeBegin:!0,excludeEnd:!0},{begin:/\{/gm,end:/\}/gm,subLanguage:"javascript",contains:[{begin:/[\{]/,end:/[\}]/,skip:!0},{begin:/([#:\/@])(if|else|each|await|then|catch|debug|html)/gm,className:"keyword",relevance:10}]}]}));let a=["javascript","bash","xml","html","json"];var s=e=>{var t;let{children:n,lang:s,sx:d,codeStyle:c,codeClass:u,Header:p}=e,{theme:h}=(0,r.B7)(),m=s?l.Z.highlight(n,{language:"vue"===s?"html":s}).value:l.Z.highlightAuto(n,a).value;return(0,i.jsxs)(o.kC,{as:"pre",sx:d,children:[p?(0,i.jsx)(p,{}):null,(0,i.jsx)("code",{className:"hljs".concat(u?" ".concat(u):""),style:{overflowX:"auto",padding:"3px 5px",borderRadius:"6px",border:"1px solid",borderColor:String(null===(t=h.colors)||void 0===t?void 0:t.textClear),...c},dangerouslySetInnerHTML:{__html:m}})]})}},80575:function(e,t,n){"use strict";n.d(t,{J:function(){return o},k:function(){return r}});var i=n(52322);n(2784);var l=n(75289);let r=e=>{let{children:t,sx:n,...r}=e;return(0,i.jsx)(l.xu,{sx:{display:["block","block","flex"],flexWrap:"wrap",justifyContent:"space-between",...n},...r,children:t})},o=e=>{let{children:t,cols:n=2}=e;return(0,i.jsx)(l.xu,{sx:{flex:"0 ".concat(100/n-1,"%"),mb:1},children:t})}},90167:function(e,t,n){"use strict";n.d(t,{kp:function(){return d},sP:function(){return c},w8:function(){return u},Hq:function(){return h}});var i,l,r=n(52322),o=n(63397),a=n(2784),s=n(75289),d=e=>{let{field:t,meta:n,fieldName:i,label:l,focusOnNewEntry:d=!0,inputPlaceholder:c,buttonLabel:u}=e,[p,h]=(0,a.useState)(n.value.length),m=(0,a.useRef)(Array(n.value.length));return(0,a.useEffect)(()=>{m.current=m.current.slice(0,n.value.length)},[n.value.length]),(0,a.useEffect)(()=>{let e=m.current.length;d&&e>p&&m.current[e-1].focus(),h(e)},[m.current.length,d,p]),(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)(s.__,{variant:"label.primary",htmlFor:i,children:[l,n.touched&&n.error?(0,r.jsx)(s.xv,{as:"span",variant:"text.labelError",children:n.error}):null]}),(0,r.jsx)(o.F2,{name:i,id:i,...t,render:e=>(0,r.jsxs)("div",{children:[t.value&&t.value.length>0?t.value.map((t,n)=>(0,r.jsxs)(s.kC,{my:2,children:[(0,r.jsx)(s.II,{placeholder:c,name:"".concat(i,".").concat(n),value:t,ref:e=>m.current[n]=e,onChange:t=>{let{target:{value:i}}=t;return e.replace(n,i)}}),(0,r.jsx)(s.zx,{ml:2,type:"button",variant:"secondary",onClick:()=>e.remove(n),children:"-"})]},"".concat(i,"-").concat(+n+1))):null,(0,r.jsx)(s.zx,{type:"button",onClick:()=>e.insert(t.value.length,""),children:u})]})})]})},c=e=>{let{initialValues:t,meta:n,label:i,fieldName:l,onChange:a,...d}=e;return(0,r.jsxs)(s.__,{variant:"label.border",...d,children:[(0,r.jsx)(o.gN,{as:s.XZ,type:"checkbox",name:l,onChange:()=>a(!n.value),checked:n.value}),i]})},u=e=>{let{field:t,label:n,defaultValue:i,onChange:l,controlledValue:o,setControlledValue:s,buildControlledValue:d}=e,[u,p]=(0,a.useState)(i||t.defaultValue||!1);return(0,a.useEffect)(()=>{d?s(d(o,u)):s(d)},[u,o,d]),(0,r.jsx)(c,{meta:{value:u},fieldName:t.name,onChange:e=>p(e)&&l&&l(e),label:"function"==typeof n?n(o,u):n})};(i=l||(l={}))[i.ERROR=0]="ERROR",i[i.DISABLED=1]="DISABLED",i[i.WARNING=2]="WARNING";let p=e=>{let t={"&::placeholder":{color:"#C9D0D8"}};switch(e){case 1:return{...t,border:"1px solid #E6E6EA",backgroundColor:"#F3F5F7"};case 0:return{...t,border:"1px solid #E26049","&:focus":{outline:"none",borderColor:"#E26049",boxShadow:"0 0 0 3px rgba(226, 96, 73, 0.2), inset 0 1px 2px rgba(226, 96, 73, 0.2)"}};case 2:return{...t,border:"1px solid orange","&:focus":{outline:"none",borderColor:"orange",boxShadow:"0 0 0 3px rgba(255, 165, 0, 0.2), inset 0 1px 2px rgba(255, 165, 0, 0.2)"}};default:return t}},h=e=>{let{sx:t={},field:n,meta:i,formField:l,fieldName:a,fields:d,initialValues:c,isDisabled:u,autoFocus:h}=e,m=i.error?0:u||l.disabled?1:void 0;return(0,r.jsxs)(s.xu,{sx:t,children:[(0,r.jsxs)(s.__,{variant:"label.primary",htmlFor:a,children:[l.label||a,i.touched&&i.error?(0,r.jsx)(s.xv,{as:"span",variant:"text.labelError",children:i.error}):null]}),(0,r.jsx)(o.gN,{id:a,name:a,type:"text",placeholder:l.placeholder||l.label||a,...l.fieldLevelValidation&&c?{validate:e=>l.fieldLevelValidation&&l.fieldLevelValidation({value:e,fields:d,initialId:c.id})}:null,...n,as:s.II,sx:p(m),disabled:u||l.disabled,autoFocus:null!=h?h:l.autoFocus})]})}},70705:function(e,t,n){"use strict";var i=n(52322),l=n(2784),r=n(75289);let o=(0,l.forwardRef)((e,t)=>{let{children:n,Component:l=r.kC,sx:o={},...a}=e;return(0,i.jsx)(l,{as:"li",sx:{p:3,mx:3,alignItems:"center",variant:"styles.listItem",...o},ref:t,...a,children:n})});t.Z=o},86355:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var i=n(52322),l=n(18337),r=n(5446),o=n(2784),a=n(40023),s=n(951),d=n(8799),c=n(18978),u=n(59326),p=n(75289),h=n(70705),m=n(66770),f=n(33710),x=n(28316),g=n(65077);let v=e=>{let{children:t}=e;return(0,x.createPortal)((0,i.jsx)(g.xR,{children:t}),document.body)},b=e=>{let{text:t,as:n,sx:l={},...r}=e,a=(0,o.useRef)(null),[s,d]=(0,o.useState)(null),c=()=>{d(a.current&&a.current.offsetWidth<a.current.scrollWidth)};return(0,o.useEffect)(()=>(c(),window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c)}),[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.xv,{"data-for":t,"data-tip":!0,sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...l},as:n,ref:a,...r,children:t}),s&&(0,i.jsx)(v,{children:(0,i.jsx)(f.Z,{id:t,type:"dark",multiline:!0,border:!0,borderColor:"black",place:"bottom",effect:"solid",children:t})})]})};var y=e=>{var t,n;let{text:r,sliceFieldName:o,theme:a,WidgetIcon:s,widgetIconTooltip:d}=e;return(0,i.jsxs)(p.kC,{sx:{alignItems:"center",position:"relative"},children:[(0,i.jsx)(l.c3,{content:d,sideOffset:2,disableHoverableContent:!0,children:(0,i.jsx)(l.D,{margin:{right:8},children:(0,i.jsx)(s,{size:28,style:{color:null===(t=a.colors)||void 0===t?void 0:t.primary,borderRadius:"4px",padding:"4px",border:"2px solid",borderColor:null===(n=a.colors)||void 0===n?void 0:n.primary,flexShrink:0}})})}),(0,i.jsx)(b,{text:r,as:"p",sx:{py:0,px:1,fontWeight:"label",fontSize:"15px"},"data-testid":"field-name"}),(0,i.jsx)(p.xv,{as:"p",sx:{display:["none","none","initial"],fontSize:"14px",ml:1,color:"textClear",overflow:"hidden",textOverflow:"ellipsis"},"data-testid":"field-id",children:o})]})},j=function(e){let{item:t,index:n,deleteItem:f,enterEditMode:x,modelFieldName:g,renderFieldAccessor:v,HintElement:b,CustomEditElement:j,CustomEditElements:k,widget:S,draggableId:C,testId:_,isRepeatableCustomType:F,children:I}=e,{theme:T}=(0,u.B7)(),{key:E,value:{config:w,type:L}}=t,D=!!(("Link"===L||"Group"===L)&&(null==w?void 0:w.repeat));return(0,i.jsx)(o.Fragment,{children:(0,i.jsx)(a._l,{draggableId:C,index:n,children:e=>{var a,u,C,M,O;return(0,i.jsx)(o.Fragment,{children:(0,i.jsxs)(h.Z,{"data-testid":_,ref:e.innerRef,...e.draggableProps,Component:p.xu,sx:{p:0,mx:0,my:3},children:[(0,i.jsxs)(p.kC,{sx:{width:"100%"},children:[(0,i.jsx)(m.Z,{label:"Reorder slice field (drag and drop)",Icon:c.Fm7,color:null===(a=T.colors)||void 0===a?void 0:a.icons,mr:1,mt:3,...e.dragHandleProps}),(0,i.jsxs)(p.xu,{sx:{bg:"headSection",width:"100%",borderRadius:"3px",border:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.borders))}},children:[(0,i.jsxs)(p.kC,{sx:{p:3,alignItems:"center",justifyContent:"space-between",width:"100%"},children:[(0,i.jsx)(y,{theme:T,text:(null==w?void 0:w.label)||E,sliceFieldName:v&&v(E),WidgetIcon:S.Meta.icon,widgetIconTooltip:S.label}),(0,i.jsxs)(p.kC,{sx:{flex:"0 0 auto"},children:[D&&(0,i.jsx)(l.m,{title:"Repeatable",color:"purple",size:"medium",sx:{alignSelf:"center",marginInline:16}}),k||null,j||(0,i.jsx)(m.Z,{size:22,Icon:s.$iz,label:"Edit field",sx:{cursor:"pointer",color:null===(u=T.colors)||void 0===u?void 0:u.icons,flexShrink:0},onClick:()=>x([E,t.value],g,n)}),!(!0===F&&"UID"==L)&&(0,i.jsxs)(r.v2,{children:[(0,i.jsx)(r.j2,{className:"sliceMenuButton","data-testid":"field-menu-button",style:{padding:"0",cursor:"pointer",width:"32px",height:"32px",border:"none",background:"transparent",outline:"0"},children:(0,i.jsx)(d.FQA,{size:20,color:null===(C=T.colors)||void 0===C?void 0:C.icons,style:{pointerEvents:"none"}})}),(0,i.jsx)(r.qy,{style:{background:null===(M=T.colors)||void 0===M?void 0:M.gray,border:"1px solid",borderRadius:"3px",borderColor:null===(O=T.colors)||void 0===O?void 0:O.borders,outline:"0"},children:(0,i.jsx)(r.sN,{style:{padding:"6px",cursor:"pointer"},onSelect:()=>f(E),children:"Delete field"})})]})]})]}),b||null]})]}),I]})})}})})}},66770:function(e,t,n){"use strict";var i=n(52322),l=n(75289);let r=(e,t)=>t?{border:e=>{let{colors:t}=e;return"1px solid ".concat(t.error)}}:e?{border:e=>{let{colors:t}=e;return"1px solid ".concat(t.primary)}}:{border:e=>{let{colors:t}=e;return"1px solid ".concat(t.borders)}};t.Z=e=>{let{sx:t=null,onClick:n=()=>null,label:o,Icon:a,error:s=null,size:d=16,fitButton:c=!1,active:u=!1,useActive:p=!1,activeSx:h=r,...m}=e;return(0,i.jsx)(l.hU,{onClick:n,"aria-label":o,type:"button",sx:{...c?{width:d,height:d}:null,...p&&h(u,s),...t},...m,children:(0,i.jsx)(a,{size:d})})}},89280:function(e,t,n){"use strict";var i=n(52322),l=n(63397),r=n(2784),o=n(75289),a=n(90167),s=n(79256);t.Z=e=>{let{fieldName:t,formField:n,fields:d,initialValues:c,autoFocus:u}=e,[p,h,m]=(0,l.U$)(t),f=n.component;return(0,i.jsx)(o.xu,{sx:{mt:2,alignItems:"center",...n.type===s.h.CHECKBOX?{display:"flex",height:"130%"}:null},children:f?(0,i.jsx)(f,{meta:h,field:p,helpers:m,fieldName:t,formField:n,initialValues:c}):(0,i.jsxs)(r.Fragment,{children:[n.type===s.h.INPUT?(0,i.jsx)(a.Hq,{meta:h,field:p,fields:d,formField:n,fieldName:t,initialValues:c,autoFocus:u}):null,n.type===s.h.CHECKBOX&&(0,i.jsx)(a.sP,{meta:h,label:n.label,fieldName:t,initialValues:c,onChange:e=>m.setValue(e)})]})})}},3285:function(e,t,n){"use strict";n.d(t,{Z:function(){return A}});var i=n(52322),l=n(37149),r=n.n(l),o=n(56580),a=n(59326),s=n(75289),d=n(65413),c=n(30527),u=n(2784),p=n(92928);let h=e=>{let{children:t,...n}=e;return(0,i.jsx)(s.xu,{as:"ul",sx:{p:0,m:0,px:e=>"calc(".concat(e.space[3],"px + 8px)"),borderBottom:"1px solid #DFE1E5",position:"relative"},...n,children:t})};h.tabsRole="TabList";let m=e=>{let{children:t,...n}=e,{theme:l}=(0,a.B7)();return(0,i.jsx)(p.OK,{...n,style:{margin:"0 32px 0 0",top:"0",padding:"8px 0px",border:"none",bottom:"-1px",opacity:"0.8",transition:"all 150ms cubic-bezier(0.215,0.60,0.355,1)",borderRadius:"0",...n.selected?{borderBottom:"3px solid ".concat(l.colors.primary),color:l.colors.text,fontWeight:"500",opacity:"1",backgroundColor:"transparent"}:{borderBottom:"3px solid transparent"}},children:t})};m.tabsRole="Tab";var f=(0,u.memo)(e=>{let{children:t,Footer:n,Header:l,tabs:r,bodySx:o,footerSx:a,defaultIndex:d=0}=e,[f,x]=(0,u.useState)(d);return(0,i.jsx)(c.Z,{borderFooter:!0,footerSx:{p:0,...a},bodySx:{p:0,...o},sx:{border:"none"},Header:l,Footer:n,children:(0,i.jsxs)(p.mQ,{defaultIndex:d,onSelect:e=>x(e),children:[(0,i.jsx)(h,{children:(r||[]).map(e=>(0,i.jsx)(m,{children:e},e))}),u.Children.map(t,(e,t)=>(0,i.jsx)(s.xu,{sx:{p:e=>"calc(".concat(e.space[3],"px + 8px)"),display:t===f?"block":"none"},children:(0,i.jsx)(p.x4,{children:e})}))]})})}),x=n(80575),g=e=>{var t,n;let{text:l,sliceFieldName:r,theme:o,WidgetIcon:a}=e;return(0,i.jsxs)(s.kC,{sx:{alignItems:"center"},children:[(0,i.jsx)(a,{size:28,style:{color:null===(t=o.colors)||void 0===t?void 0:t.primary,marginRight:"8px",borderRadius:"4px",padding:"4px",border:"2px solid",borderColor:null===(n=o.colors)||void 0===n?void 0:n.primary}}),(0,i.jsx)(s.xv,{as:"p","data-testid":"item-header-text",sx:{py:0,px:1,fontWeight:"label",fontSize:"15px"},children:l}),(0,i.jsx)(s.xv,{as:"p",sx:{display:["none","none","initial"],fontSize:"14px",ml:1,color:"textClear"},children:r})]})},v=n(55862),b=n(68169),y=n(5632),j=n(65186),k=n(7974);let S=()=>{let e=(0,y.useRouter)();return(0,i.jsxs)(s.xu,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:"60px"},children:[(0,i.jsx)(j.wr$,{size:48,color:"#C9D0D8"}),(0,i.jsx)(s.xu,{sx:{height:"12px"}}),(0,i.jsx)(s.xv,{color:"text",sx:{fontWeight:600,fontSize:"24px",lineHeight:"32px",textAlign:"center"},children:"Your mock data has moved"}),(0,i.jsx)(s.xu,{sx:{height:"8px"}}),(0,i.jsx)(s.xv,{color:"text",sx:{fontWeight:400,fontSize:"14px",lineHeight:"24px",textAlign:"center"},children:"You can now edit directly your mock data in the new Slice Simulator."}),(0,i.jsx)(s.xu,{sx:{height:"24px"}}),(0,i.jsx)(s.zx,{onClick:t=>{t.preventDefault(),window.open("".concat(e.asPath,"/simulator"),k.pq)},children:"Go to the Slice Simulator"})]})};var C=n(16442),_=n(45440),F=n(16086),I=n(78254),T=n(23134),E=n(89280),w=n(63397),L=n(358);function D(){let[{value:e}]=(0,w.U$)("config.label"),[{value:t},n,i]=(0,w.U$)("id"),l=(0,u.useRef)(null!=n.initialValue&&n.initialValue.length>0);(0,u.useEffect)(()=>{l.current||null==e||i.setValue((0,L.lV)(e),!1)},[e]),(0,u.useEffect)(()=>{let n=null==t||0===t.length;if(l.current){if(!n)return;l.current=!1}else n||null!=e&&t===(0,L.lV)(e)||(l.current=!0)},[t])}var M=(0,u.memo)(e=>{let{formId:t,initialValues:n,validationSchema:l,onSave:r,FormFields:o,children:a}=e;return(0,i.jsx)(s.xu,{children:(0,i.jsx)(w.J9,{initialValues:n,validationSchema:l,onSubmit:(e,t)=>{let{id:n,...i}=e;r({newKey:n,value:Object.entries(i).reduce((e,t)=>{let[n,i]=t;if(typeof i!==Boolean&&!i){var l;let t=null===(l=o[n])||void 0===l?void 0:l.defaultValue;if(void 0!==t)return{...e,[n]:t}}return{...e,[n]:i}},{})})},children:e=>(0,i.jsxs)(w.l0,{id:t,children:[(0,i.jsx)(D,{}),a({...e,initialValues:n})]})})})});function O(e){let{children:t}=e,n=(0,c.W)();return(0,i.jsx)(s.kC,{sx:{position:"sticky",zIndex:1,top:0,p:3,bg:"headSection",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:n,borderTopRightRadius:n},children:t})}r().setAppElement("#__next");var A=e=>{let{close:t,data:n,fields:l,onSave:r,zoneType:c}=e,{theme:u}=(0,a.B7)(),p=(0,o.v9)(I.Ch).filter(C.TG);if(!n.isOpen)return null;let{field:[h,m]}=n,y=(0,T.t)(_.C,m.config,m.type);if(!y)return(0,i.jsxs)("div",{children:[m.type," not found"]});let{Meta:{icon:j},FormFields:k,Form:w,schema:L,label:D}=y,A={...(0,b.f7)((0,F.B9)(k,"id")),...y.prepareInitialValues?y.prepareInitialValues(p,m.config):m.config},{res:N,err:R}=(()=>{try{return{res:L.validateSync({type:m.type,config:A},{stripUnknown:!0})}}catch(e){return{err:e}}})();R&&(console.error("[EditModal] Failed to validate field of type ".concat(m.type,".\n Please update model.json accordingly.")),console.error(R));let P={id:h,config:N?N.config:A},[q,z]=k.id.validate.matches,V=d.object().shape({id:d.string().matches(q,z).min(3).max(35).required(),config:L.fields.config}),B="".concat("edit-modal-form","-").concat(Math.random().toString());return(0,i.jsx)(v.Z,{isOpen:!0,shouldCloseOnOverlayClick:!0,onRequestClose:t,contentLabel:"Widget Form Modal",children:(0,i.jsx)(M,{apiId:h,formId:B,initialValues:P,validationSchema:V,FormFields:k,onSave:e=>{let{newKey:n,value:i}=e;r({apiId:h,newKey:n,value:{...m,...i},updateMeta:{fieldIdChanged:{previousPath:[h],newPath:[n]}}}),t()},children:e=>{let{isValid:n,isSubmitting:r,initialValues:o}=e,a=w?(0,i.jsx)(w,{...e,fields:l},"field-model-tab-content"):(0,i.jsx)(x.k,{children:Object.entries(k).map(e=>{let[t,n]=e;return(0,i.jsx)(x.J,{children:(0,i.jsx)(E.Z,{fieldName:(0,b.lm)(t),formField:n,fields:l,initialValues:o,autoFocus:""===h&&void 0})},t)})},"field-model-tab-content"),d=["Field Model"],p=[a];if("slice"===c){let e=(0,i.jsx)(s.xu,{children:(0,i.jsx)(S,{})},"mock-data-tab-content");d.push("Mock Data"),p.push(e)}return(0,i.jsx)(f,{borderFooter:!0,footerSx:{position:"sticky",bottom:0,p:0},tabs:d,Header:(0,i.jsxs)(O,{children:[(0,i.jsx)(g,{theme:u,text:D,WidgetIcon:j}),(0,i.jsx)(s.x8,{onClick:t,type:"button"})]}),Footer:(0,i.jsxs)(s.kC,{sx:{position:"sticky",bottom:0,alignItems:"space-between",bg:"headSection",p:3},children:[(0,i.jsx)(s.xu,{sx:{ml:"auto"}}),(0,i.jsx)(s.zx,{mr:2,type:"button",onClick:t,variant:"secondary",children:"Cancel"}),(0,i.jsx)(s.zx,{form:B,type:"submit",disabled:!n&&r,sx:{fontWeight:"400",paddingBlock:"8px",paddingInline:"16px",fontSize:"14px",borderRadius:"4px"},children:"Done"})]}),children:p})}})})}},16182:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var i=n(52322),l=n(2784),r=n(49857),o=n(18337);function a(e){return e.show?(0,i.jsx)(o.D,{padding:{block:8,inline:16},border:{top:!0},borderColor:"grey6",children:(0,i.jsxs)(o.bL,{variant:"normal",color:"grey11",children:["No code snippet for this field."," ",(0,i.jsx)(o.bL,{component:"a",href:"https://prismic.io/docs/fields/content-relationship",rel:"noopener noreferrer",target:"_blank",color:"grey11",underline:!0,children:"Check the docs"})," ","for an example."]})}):null}var s=n(80148),d=n(77245),c=n(8799),u=n(65186),p=n(59326),h=n(75289),m=n(38193);let f={position:"relative",top:"3px"};var x=e=>{var t,n,r;let{code:o,lang:a}=e,{theme:s}=(0,p.B7)(),[x,g]=(0,l.useState)(!1);return o?(0,i.jsxs)(h.kC,{sx:{p:2,px:3,alignItems:"center",borderTop:"1px solid",borderColor:"borders",justifyContent:"space-between"},children:[(0,i.jsxs)(h.kC,{sx:{alignItems:"center",display:["none","none","flex"],maxWidth:"80%"},children:[(0,i.jsx)(c.vcz,{size:26,color:null==s?void 0:null===(t=s.colors)||void 0===t?void 0:t.icons,style:{border:"1px solid",borderColor:null==s?void 0:null===(n=s.colors)||void 0===n?void 0:n.borders,borderRadius:"3px",padding:"4px",marginRight:"2px"}}),(0,i.jsx)(m.Z,{sx:{margin:"0px 8px",border:"none",borderRadius:"3px",fontSize:"13px"},lang:a,children:o})]}),(0,i.jsx)(h.xu,{children:(0,i.jsxs)(h.zx,{"aria-label":x?"Code snippet copied":"Copy code snippet",onClick:()=>{o&&navigator.clipboard.writeText(o).then(()=>{g(!0),setTimeout(()=>{g(!1)},1200)})},variant:"textButton",children:[x?(0,i.jsx)(u.HhX,{size:16,color:null==s?void 0:null===(r=s.colors)||void 0===r?void 0:r.success,style:f}):(0,i.jsx)(d.LhG,{size:16,style:f}),(0,i.jsx)(h.xv,{as:"span",sx:{display:["none","inline","none","inline"]},children:"\xa0Copy"})]})})]}):null};let g=e=>{let{show:t,renderHintBase:n,item:l,hintItemName:o}=e,a=n({item:l}),d=[a];if("Link"===l.value.type){var c,u,p,h,m;null!==(h=null===(c=l.value.config)||void 0===c?void 0:c.allowText)&&void 0!==h&&h&&d.push("allowText"),null!==(m=null===(u=l.value.config)||void 0===u?void 0:u.repeat)&&void 0!==m&&m&&d.push("repeat"),(null===(p=l.value.config)||void 0===p?void 0:p.variants)&&d.push("variants")}let{data:f,error:g}=(0,r.ZP)(d.join("$"),async()=>await s.managerClient.snippets.readSnippets({fieldPath:a.split("."),model:l.value,itemName:o}));if(g&&console.error(g),!f||g)return null;let v=f.snippets||[];return v[0]?(0,i.jsx)("div",{style:{display:t?"initial":"none"},children:(0,i.jsx)(x,{code:v[0].code,lang:v[0].language})}):null};var v=e=>{var t;let{item:n}=e;return"Link"===n.value.type&&(null===(t=n.value.config)||void 0===t?void 0:t.select)==="document"?(0,i.jsx)(a,{show:e.show}):(0,i.jsx)(g,{...e})}},40141:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var i=n(52322),l=n(18337),r=n(13980),o=n(2784),a=n(65077),s=n(94160),d=n(35289),c=n(6882),u=n(6609);function p(e){let{open:t,onOpenChange:n,onConfirm:r}=e;return(0,i.jsxs)(l.ae,{open:t,onOpenChange:n,size:"small",children:[(0,i.jsx)(l.al,{title:"Static zone"}),(0,i.jsx)(l.aj,{children:(0,i.jsx)(l.bn,{children:(0,i.jsxs)(l.D,{as:"article",flexDirection:"column",padding:16,gap:4,children:[(0,i.jsx)(l.bL,{sx:{marginBottom:4},color:"purple9",variant:"smallBold",children:"About"}),(0,i.jsx)(l.bL,{variant:"h3",children:"What is the static zone?"}),(0,i.jsx)(l.bL,{color:"grey11",children:"The static zone in Prismic page types contain fields that are always present on the page. Use it for essential information like a page's title, page design settings, or metadata. Unlike slices, which can be added or removed, static zone fields remain fixed."}),(0,i.jsx)(l.c8,{src:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1723540305/DEV_TOOLS/STATES/Explication_vide%CC%81o_zone_statique_phibeq.mp4",sizing:"contain",autoPlay:!0,loop:!0})]})})}),(0,i.jsx)(l.ah,{children:(0,i.jsx)(l.af,{size:"medium",sx:{flexGrow:1},onClick:()=>{r(),n(!1)},children:"Got it"})})]})}var h=n(76611),m=n(5683);let f=(0,o.forwardRef)((e,t)=>{var n;return(0,i.jsx)(l.E,{...e,ref:t,startIcon:"add",color:"grey","aria-label":"Add a field","data-testid":null!==(n=e["data-testid"])&&void 0!==n?n:"add-field"})});function x(e){let{zoneTypeFormat:t,...n}=e;return"page"===t?(0,i.jsx)(v,{...n}):(0,i.jsx)(b,{...n})}let g=(0,i.jsx)("div",{style:{position:"absolute",bottom:0,right:0}});function v(e){let{disabled:t,fields:n,triggerDataTestId:r,onSelectField:a}=e,[s,d]=(0,o.useState)(!1),[c,x]=(0,o.useState)(!1),[v,b]=(0,h.V)(m.vm,!1);return(0,i.jsxs)(l.D,{position:"relative",children:[(0,i.jsx)(f,{onClick:()=>{v?d(!0):x(!0)},"data-testid":r}),(0,i.jsx)(p,{open:c,onOpenChange:e=>{x(e),e||d(!0)},onConfirm:()=>b(!0)}),(0,i.jsx)(u.S,{open:s,onOpenChange:d,disabled:t,onSelectField:a,fields:n,trigger:g})]})}function b(e){let{disabled:t,fields:n,triggerDataTestId:l,onSelectField:r}=e;return(0,i.jsx)(u.S,{disabled:t,onSelectField:r,fields:n,trigger:(0,i.jsx)(f,{"data-testid":l})})}var y=n(45440),j=n(49919),k=n(40023),S=n(75289),C=n(70705),_=n(86355),F=n(23134),I=n(16182),T=e=>{let{fields:t,title:n,tabId:l,enterEditMode:r,enterSelectMode:o,onDragEnd:a,renderFieldAccessor:s,onDeleteItem:d,onSave:c,showHints:u,renderHintBase:p,isRepeatable:h,testId:m,isRepeatableCustomType:f}=e;return(0,i.jsx)(k.Z5,{onDragEnd:a,children:(0,i.jsx)(k.bK,{droppableId:n,children:(e,n)=>(0,i.jsxs)(S.xu,{as:"ul",ref:e.innerRef,...e.droppableProps,"data-testid":m,sx:{paddingInline:"16px !important"},children:[t.map((e,t)=>{let{value:{config:a,type:m}}=e,x=(0,F.t)(y.C,a,m);if(!x)return(0,i.jsx)(C.Z,{children:(0,i.jsxs)(S.xv,{children:['Field type "',m,'" not supported']})});let g={item:e,index:t,tabId:l,widget:x,showHints:u,key:e.key,enterSelectMode:o,renderFieldAccessor:s,enterEditMode:r,parentSnapshot:n,deleteItem:d,saveItem:c,draggableId:"list-item-".concat(e.key),isRepeatableCustomType:f,testId:"list-item-".concat(e.key)},v=(0,i.jsx)(I.Z,{item:e,show:u,isRepeatable:h,renderHintBase:p,hintItemName:x.hintItemName,Widgets:y.C,typeName:x.CUSTOM_NAME||x.TYPE_NAME});if(x.CustomListItem){let{CustomListItem:e}=x;return(0,i.jsx)(e,{...g,HintElement:v})}return(0,i.jsx)(_.Z,{...g,HintElement:v})}),e.placeholder]})})})},E=n(644),w=n.n(E);let L=e=>{let{zoneType:t,heading:n="Your ".concat(t," has no fields yet"),action:r}=e;return(0,i.jsxs)("div",{className:w().root,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(l.bL,{variant:"bold",children:n}),(0,i.jsx)(l.bL,{color:"grey11",children:"A field is an input for content (e.g. text, images, links)."})]}),r]})},D=e=>{let t,{zoneType:n,zoneTypeFormat:r,tabId:p,title:h,fields:m,poolOfFieldsToCheck:f,widgetsArray:g,isRepeatable:v,onDeleteItem:b,onDragEnd:k,EditModal:S,onSave:C,dataTip:_,renderHintBase:F,renderFieldAccessor:I,testId:E,isRepeatableCustomType:w,emptyStateHeading:D}=e,M=(()=>{let e=!!Object.entries(f).find(e=>{let[,{value:t}]=e;return"UID"===t.type}),t=g.filter(e=>{let{TYPE_NAME:t}=e;return"UID"!==t});return e?t:[...t,g.find(e=>{let{TYPE_NAME:t}=e;return"UID"===t})]})(),[O,A]=(0,o.useState)(!1),[N,R]=(0,o.useState)({isOpen:!1}),P={onSelectField:e=>{R({isOpen:!0,field:["",y.C[e].create("")]})},fields:M.filter(Boolean).map(e=>{let{TYPE_NAME:t,CUSTOM_NAME:n}=e;return c.XU.find(e=>e.type===t&&(void 0===n||e.variant===n))}),triggerDataTestId:v?"add-field-in-items":void 0};return"slice"===n&&m.length>0?t=(0,i.jsx)(u.S,{...P}):"customType"===n&&(t=(0,i.jsx)(x,{...P,zoneTypeFormat:r})),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.Bu,{actions:(0,i.jsxs)(i.Fragment,{children:[m.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.bL,{color:"grey11",component:"span",noWrap:!0,children:"Show code snippets?"}),(0,i.jsx)(l.bC,{checked:O,onCheckedChange:A,size:"small",style:{flexShrink:0},"data-testid":"code-snippets-switch"})]}),t]}),children:h}),0===m.length&&"slice"===n?(0,i.jsx)(L,{zoneType:"customType"===n?"page"===r?"page type":"custom type":n,heading:D,action:(0,i.jsx)(u.S,{...P})}):m.length>0?(0,i.jsx)(a.xR,{children:(0,i.jsx)(T,{tabId:p,isRepeatable:v,fields:m,showHints:O,dataTip:_,title:h,renderFieldAccessor:I,renderHintBase:F,enterEditMode:e=>{R({isOpen:!0,field:e});let[t,n]=e;s.Xe.track({event:"field:settings-opened",id:t,name:n.config.label,type:n.type,isInAGroup:!1,contentType:(0,j.T)(window.location.pathname)})},onDragEnd:k,onDeleteItem:b,onSave:C,testId:E,isRepeatableCustomType:w})}):void 0,(0,i.jsx)(S,{data:N,close:()=>{R({isOpen:!1})},onSave:C,fields:f,zoneType:n})]})};D.propTypes={isRepeatable:r.bool,title:r.string.isRequired,dataTip:r.string.isRequired,onSave:r.func.isRequired,onDragEnd:r.func.isRequired,onDeleteItem:r.func.isRequired,poolOfFieldsToCheck:(0,r.arrayOf)((0,r.shape)({key:r.string,value:r.object})),renderHintBase:r.func.isRequired,renderFieldAccessor:r.func.isRequired,widgetsArray:r.array.isRequired,fields:(0,r.arrayOf)((0,r.shape)({key:r.string.isRequired,value:(0,r.shape)({config:r.object,fields:r.array,type:r.string.isRequired})}))};var M=D},23134:function(e,t,n){"use strict";n.d(t,{t:function(){return l}});var i=n(59050);let l=(e,t,n)=>{if("Link"===n)switch(null==t?void 0:t.select){case"document":return e.ContentRelationship;case"media":return e.LinkToMedia;default:return e.Link}if(n===i.GroupFieldType){var l;return null!==(l=e.Group)&&void 0!==l?l:e.NestedGroup}return e[n]}},9889:function(e,t,n){"use strict";n.d(t,{Jp:function(){return o},OR:function(){return r}});var i=n(7974),l=n(49046);let r={label:(0,l.II)("Label",{required:"This field is required",max:!0},void 0,void 0,"Label for content creators (defaults to field type)",!0),id:(0,l.II)("API ID*",{min:!0,max:!0,required:"This field is required",matches:[i.xo,"No special characters allowed (except _)"]},e=>{let{value:t,fields:n,initialId:i}=e;return t?n.find(e=>{let{key:n}=e;return n===t})&&t!==i?'Field "'.concat(t,'" already exists.'):void 0:"Field is required"},void 0,"A unique identifier for the field (e.g. buttonLink)")},o={...r,placeholder:(0,l.II)("Placeholder",{required:"This field is required",max:[100,"String is too long. Max: 100"]},void 0,void 0,"Placeholder text for content creators")}},49046:function(e,t,n){"use strict";n.d(t,{II:function(){return d},Jg:function(){return r}});var i=n(68169),l=n(79256);let r=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return{type:l.h.CHECKBOX,validate:{required:(0,i.MJ)(t,s)},required:t,label:e,defaultValue:n,yupType:"boolean"}},o=[3,"String is too short. Min: 3"],a=[35,"String is too long. Max: 35"],s=["Field is required"],d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{min:o,max:a,required:s},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,d=arguments.length>4?arguments[4]:void 0,c=arguments.length>5&&void 0!==arguments[5]&&arguments[5],{min:u,max:p,required:h,matches:m}=t||{};return{type:l.h.INPUT,label:e,validate:{required:(0,i.MJ)(h,s),min:(0,i.MJ)(u,o),max:(0,i.MJ)(p,a),matches:m},defaultValue:r,fieldLevelValidation:n,yupType:"string",placeholder:d,autoFocus:c}}},68169:function(e,t,n){"use strict";n.d(t,{MJ:function(){return a},f7:function(){return s},gc:function(){return d},lm:function(){return o}});var i=n(65413),l=n(79256);let r=e=>null===e.defaultValue?void 0:void 0!==e.defaultValue?e.defaultValue:e.type===l.h.CHECKBOX||(e.type===l.h.INPUT?"":e.type===l.h.SELECT?[]:void 0),o=e=>"id"===e?"id":"config.".concat(e),a=(e,t)=>Array.isArray(e)?e:"boolean"==typeof e&&e?t:null,s=e=>Object.entries(e).reduce((e,t)=>{let[n,i]=t,l=r(i);return void 0!==l?{...e,[n]:l}:e},{}),d=e=>i.object().shape(Object.entries(e).filter(e=>e).reduce((e,t)=>{let[n,l]=t,{validate:r,yupType:o}=l;if(!r)return e;if("function"==typeof r)return{...e,[n]:r(n,l)};let a=i[o]();return Object.entries(r).filter(e=>e&&e[1]).forEach(e=>{let[t,i]=e;if(i&&a[t]){a=a[t](...Array.isArray(i)?i:[i]);return}console.warn('Invalid Yup validator for field "'.concat(n,'"'))}),{...e,[n]:a}},{})).required().default(void 0).noUnknown(!0)},79256:function(e,t,n){"use strict";var i,l;n.d(t,{h:function(){return i}}),(l=i||(i={})).CHECKBOX="checkbox",l.INPUT="input",l.SELECT="select"},45440:function(e,t,n){"use strict";n.d(t,{C:function(){return tc}});var i=n(52322),l=n(96317),r=n(65186),o=n(65413),a=n(6882),s=n(75289),d=n(80575),c=n(89280),u=n(68169),p=n(9889),h=n(49046);let m={...p.OR,repeat:(0,h.Jg)("Repeatable",!1,!0)};var f=e=>{let{initialValues:t,fields:n,values:l,setFieldValue:r}=e,{config:{repeat:o}}=l;return(0,i.jsxs)(d.k,{children:[Object.entries(m).filter(e=>{let[t]=e;return"repeat"!==t}).map(e=>{let[l,r]=e;return(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)(l),formField:r,fields:n,initialValues:t})},l)}),(0,i.jsx)(d.J,{children:(0,i.jsx)(s.xu,{sx:{mt:2,alignItems:"center",display:"flex",height:"130%"},children:(0,i.jsxs)(s.__,{variant:"label.border",sx:{mb:0},children:[(0,i.jsx)(s.XZ,{checked:o,onChange:()=>r("config.repeat",!o)}),"Repeatable"]})})})]})};let x={icon:r.iy3},g=e=>o.object().shape({type:o.string().matches(e,{excludeEmptyString:!0}).required(),config:o.object().shape({fields:o.array(),label:o.string(),repeat:o.boolean().optional()})});function v(e){let{schemaTypeRegex:t,customListItem:n,customName:i,hintItemName:l}=e;return{Meta:x,Form:f,FormFields:m,schema:g(t),create:e=>({type:"Group",config:{label:e,repeat:!0,fields:[]}}),CustomListItem:n,TYPE_NAME:"Group",CUSTOM_NAME:i,hintItemName:l,label:a.U.name}}var b=n(59050),y=n(2784),j=n(40023),k=n(28316),S=n(94160),C=n(6609),_=n(86355),F=n(3285),I=n(16182),T=n(23134),E=n(49219),w=n(16086),L=n(358),D=n(49919),M=n(5495),O=n(39302);let A=e=>{let{tabId:t,widget:n,Widgets:l,widgetsArray:r,hintBase:o,parentSnapshot:d,showHints:c,isRepeatable:u,item:p,draggableId:h,saveItem:m,HintElement:f,...x}=e,[g,v]=(0,y.useState)({isOpen:!1}),A=e=>{var t;let{apiId:n,value:i}=e;null===(t=i.config)||void 0===t||t.label;let l=function(e){var t,n,i;let l=structuredClone(e.group);return null!==(n=l.config)&&void 0!==n||(l.config={}),null!==(i=(t=l.config).fields)&&void 0!==i||(t.fields={}),l.config.fields[e.fieldId]=e.field,l}({group:E.Fl.fromSM(p.value),fieldId:n,field:i});m({apiId:p.key,newKey:p.key,value:E.Fl.toSM(l),inGroupFieldAction:"add"}),(0,M.V)({id:n,field:i,isInAGroup:!0})},N=e=>{let{apiId:t,newKey:n,value:i}=e,l=i.type===b.GroupFieldType?E.Fl.fromSM(i):i,r=function(e){var t,n;let i=structuredClone(e.group);if(!(null===(t=i.config)||void 0===t?void 0:t.fields)||!(null===(n=e.group.config)||void 0===n?void 0:n.fields))return i;for(let t in i.config.fields={},e.group.config.fields)t===e.previousFieldId?i.config.fields[e.newFieldId]=e.field:i.config.fields[t]=e.group.config.fields[t];return i}({group:E.Fl.fromSM(p.value),previousFieldId:t,newFieldId:n,field:l});m({apiId:p.key,newKey:p.key,value:E.Fl.toSM(r),inGroupFieldAction:"update",updateMeta:{fieldIdChanged:{previousPath:[p.key,t],newPath:[p.key,n]}}}),(0,O.Z)({previousId:t,id:n,field:l,isInAGroup:!0})},R=e=>{let t=function(e){var t,n;let i=structuredClone(e.group);return null===(n=i.config)||void 0===n||null===(t=n.fields)||void 0===t||delete t[e.fieldId],i}({group:E.Fl.fromSM(p.value),fieldId:e});m({apiId:p.key,newKey:p.key,value:E.Fl.toSM(t)})},P=e=>{v({isOpen:!0,field:e});let[t,n]=e;S.Xe.track({event:"field:settings-opened",id:t,name:n.config.label,type:n.type,isInAGroup:!0,contentType:(0,D.T)(window.location.pathname)})};return(0,i.jsxs)(y.Fragment,{children:[(0,i.jsx)(_.Z,{item:p,widget:n,draggableId:h,...x,HintElement:f,CustomEditElements:[(0,i.jsx)(C.S,{onSelectField:e=>{v({isOpen:!0,field:["",l[e].create("")]})},fields:r.filter(Boolean).map(e=>{let{TYPE_NAME:t,CUSTOM_NAME:n}=e,i=a.XU.find(e=>e.type===t&&(void 0===n||e.variant===n));if(!i)throw Error("Field not found for widget: ".concat(t," - ").concat(n));return i})},"add-field-dropdown")],children:(0,i.jsx)(s.xu,{sx:{ml:4},children:(0,i.jsx)(j.Z5,{onDragEnd:e=>{if((0,w.uS)(e))return;let{source:t,destination:n}=e;if(!n)return;let{index:i}=t,{index:l}=n,r=function(e){var t;let n=structuredClone(e.group);if(!(null===(t=n.config)||void 0===t?void 0:t.fields))return n;let i=Object.entries(n.config.fields),[l]=i.splice(e.sourceIndex,1);return i.splice(e.destinationIndex,0,l),n.config.fields=Object.fromEntries(i),n}({group:E.Fl.fromSM(p.value),sourceIndex:i,destinationIndex:l});(0,k.flushSync)(()=>{m({apiId:p.key,newKey:p.key,value:E.Fl.toSM(r)})})},children:(0,i.jsx)(j.bK,{droppableId:"".concat(t,"-").concat(p.key,"-zone"),children:e=>(0,i.jsxs)("ul",{ref:e.innerRef,...e.droppableProps,children:[p.value.config.fields.map((e,t)=>{let{value:{config:n,type:r}}=e,a=(0,T.t)(l,n,r);if(!a)return null;let s={item:e,index:t,widget:a,key:e.key,enterEditMode:P,deleteItem:R,saveItem:N,showHints:c,renderFieldAccessor:t=>"item".concat((0,L.Ti)(e.key)),draggableId:"group-".concat(p.key,"-").concat(e.key,"-").concat(t),testId:"list-item-group-".concat(p.key,"-").concat(e.key)},d=(0,i.jsx)(I.Z,{item:e,show:c,isRepeatable:u,renderHintBase:e=>{let{item:t}=e;return"".concat(o).concat((0,L.Ti)(t.key))},hintItemName:a.hintItemName,Widgets:l,typeName:a.CUSTOM_NAME||a.TYPE_NAME});if(a.CustomListItem){let{CustomListItem:e}=a;return(0,i.jsx)(e,{...s,HintElement:d})}return(0,i.jsx)(_.Z,{...s,HintElement:d})}),e.placeholder]})})})})}),(0,i.jsx)(F.Z,{data:g,close:()=>{v({isOpen:!1})},onSave:e=>""===e.apiId?A({...e,apiId:e.newKey}):N(e),fields:p.value.config.fields})]})},N={icon:r.hs8},R={label:p.Jp.label,id:p.Jp.id,placeholder_false:(0,h.II)("False Placeholder",{required:!1},null,"false","Value the content creator sees (Output as 'false' in the API)."),placeholder_true:(0,h.II)("True Placeholder",{required:!1},null,"true","Value the content creator sees (Output as 'true' in the API)"),default_value:(0,h.Jg)("Default to true")},P={TYPE_NAME:"Boolean",create:e=>({type:"Boolean",config:{label:e,default_value:!1,placeholder_true:"true",placeholder_false:"false"}}),Meta:N,schema:o.object().shape({type:o.string().matches(/^Boolean$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,w.B9)(R,"id"))}),FormFields:R,label:a.Qr.name},q={icon:r.U8L},{TYPE_NAME:z,FormFields:V,schema:B}=(0,w.zg)("Color"),G={create:e=>({type:"Color",config:{label:e,placeholder:""}}),FormFields:V,TYPE_NAME:z,schema:B,Meta:q,label:a.pG.name};var U=n(18337),J=n(63397);function Z(e){let{checked:t,height:n=130,setFieldValue:l}=e,[r,o]=(0,y.useState)(null);return(0,i.jsx)(d.J,{children:(0,i.jsx)(s.kC,{sx:{mt:2,alignItems:"center",height:"".concat(n,"%")},children:(0,i.jsx)(s.__,{variant:"label.border",children:(0,i.jsxs)(U.D,{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",ref:o,children:[(0,i.jsxs)(s.kC,{children:[(0,i.jsx)(s.XZ,{checked:t,onChange:e=>{l("config.allowText",e.target.checked)}}),"Allow display text"]}),(0,i.jsx)(U.c3,{container:r,align:"end",content:"Allow editors to customize the link display text",children:(0,i.jsx)(U.aX,{name:"alert",size:"medium",color:"grey11"})})]})})})})}function H(e){let{checked:t,setFieldValue:n}=e;return(0,i.jsxs)(U.D,{flexDirection:"column",children:[(0,i.jsx)(s.__,{htmlFor:"repeat",variant:"label.primary",children:"Repeatable"}),(0,i.jsxs)(s.__,{variant:"label.border",sx:{display:"flex"},children:[(0,i.jsx)(s.XZ,{name:"repeat",checked:t,onChange:e=>{n("config.repeat",e.target.checked)}}),"Make this link repeatable (allows editors to create lists of links)"]}),(0,i.jsxs)(U.D,{alignItems:"center",gap:4,children:[(0,i.jsx)(U.aX,{name:"alert",size:"medium",color:"grey11"}),(0,i.jsxs)(U.bL,{variant:"normal",color:"grey11",children:["Repeatable link fields are returned as an array of links by the API."," ",(0,i.jsx)("a",{href:"https://prismic.io/docs/field",style:{textDecoration:"none"},target:"_blank",rel:"noopener noreferrer",children:(0,i.jsx)(U.bL,{variant:"normal",color:"indigo11",children:"See documentation."})})]})]})]})}function W(e){var t,n;let{variants:l,onVariantsChange:r,error:o}=e,a=!!l,s=a?"Enabled":"Disabled",d="Options (".concat(null!==(t=null==l?void 0:l.length)&&void 0!==t?t:0,")"),c=(null!==(n=null==l?void 0:l.length)&&void 0!==n?n:0)>2,u=(0,y.useRef)();return(0,i.jsxs)(U.D,{overflow:"hidden",flexDirection:"column",border:!0,borderRadius:6,children:[(0,i.jsxs)(U.D,{border:{bottom:!0},padding:12,flexDirection:"column",gap:8,children:[(0,i.jsx)(U.bL,{variant:"h4",color:"grey12",children:"Variants"}),(0,i.jsx)(U.bL,{color:"grey12",children:'Add variants like "Primary" and "Secondary" to allow editors to choose the link\'s style by selecting one of them.'}),(0,i.jsxs)(U.D,{gap:8,children:[(0,i.jsx)(U.bC,{checked:a,onCheckedChange:e=>{r(e?["Primary","Secondary"]:void 0)}}),(0,i.jsx)(U.bL,{color:"grey11",children:s})]})]}),a&&(0,i.jsxs)(U.D,{border:{bottom:!0},padding:12,flexDirection:"column",gap:8,children:[(0,i.jsxs)(U.bL,{variant:"h5",color:"grey11",children:[d,!!o&&(0,i.jsx)(U.bL,{variant:"inherit",color:"tomato9",children:" ".concat(o)})]}),null==l?void 0:l.map((e,t)=>(0,i.jsxs)(U.D,{gap:4,alignItems:"center",children:[(0,i.jsx)(U.D,{flexGrow:1,backgroundColor:"white",padding:{inline:12,block:8},flexDirection:"column",border:!0,borderRadius:4,children:(0,i.jsx)(U.bN,{ref:e=>{u.current===t&&(u.current=void 0,null==e||e.focus())},placeholder:"Variant option (e.g. Primary)",value:e,onValueChange:e=>r(null==l?void 0:l.map((n,i)=>i===t?e:n))})}),c&&(0,i.jsx)(U.aZ,{type:"button",icon:"delete",onClick:()=>r(null==l?void 0:l.filter((e,n)=>n!==t))})]},t)),(0,i.jsx)(U.D,{children:(0,i.jsx)(U.E,{invisible:!0,startIcon:"add",onClick:()=>{u.current=null==l?void 0:l.length,r([...null!=l?l:[],""])},children:"Add option"})})]}),(0,i.jsx)(U.D,{backgroundColor:"white",flexDirection:"column",padding:12,children:(0,i.jsxs)(U.bL,{variant:"normal",color:"grey11",children:['Need additional properties similar to "Variants"?'," ",(0,i.jsx)("a",{href:"https://community.prismic.io/t/link-field-use-cases-share-your-requests-and-feedback/18146",target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"underline"},children:"Please provide your feedback here."})]})})]})}let $={...p.Jp};function X(e){var t;let{variants:n,setFieldValue:l}=e,r="config.variants",[o,a]=(0,J.U$)(r),s=null===(t=a.error)||void 0===t?void 0:t.find(e=>e);return(0,i.jsx)(W,{variants:n,onVariantsChange:e=>l(r,e),error:s})}let K={icon:r.$l_},Y=o.object().shape({label:o.string().optional(),useAsTitle:o.boolean().optional(),placeholder:o.string().optional(),select:o.string().optional().oneOf(["media","document","web",null]).nullable(),customtypes:o.array().strict().optional(),masks:o.array(o.string()).optional(),tags:o.array(o.string()).optional(),allowTargetBlank:o.boolean().strict().optional(),allowText:o.boolean().strict().optional(),repeat:o.boolean().strict().optional(),variants:o.array(o.string().trim().required("Values can't be empty")).optional()}).required().default(void 0).noUnknown(!0),Q={Meta:K,FormFields:$,schema:o.object().shape({type:o.string().matches(/^Link$/,{excludeEmptyString:!0}).required(),config:Y.optional()}),Form:e=>{let{initialValues:t,values:n,fields:l,setFieldValue:r}=e,{config:{allowText:o,repeat:a,variants:p}}=n;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(d.k,{children:[Object.entries($).map(e=>{let[n,r]=e;return(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)(n),formField:r,fields:l,initialValues:t})},n)}),(0,i.jsx)(d.J,{children:(0,i.jsxs)(s.kC,{sx:{gap:2,marginTop:3},style:{paddingTop:"1px"},children:[(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)("allowTargetBlank"),formField:(0,h.Jg)("Allow target blank",!1,!0),fields:l,initialValues:t})}),(0,i.jsx)(Z,{checked:o,setFieldValue:r})]})},"allowTargetBlank")]}),(0,i.jsx)(U.D,{height:8}),(0,i.jsxs)(U.D,{flexDirection:"column",gap:16,children:[(0,i.jsx)(H,{checked:a,setFieldValue:r}),(0,i.jsx)(X,{variants:p,setFieldValue:r})]})]})},create:e=>({type:"Link",config:{label:e,placeholder:"",select:null,allowTargetBlank:!0,allowText:!0,repeat:!1}}),TYPE_NAME:"Link",label:a.pV.name};var ee=n(41347);let et={label:p.Jp.label,id:p.Jp.id,customtypes:{validate:()=>o.array()}},en={icon:r.I2R},ei=Y.shape({label:o.string().max(35,"String is too long. Max: 35"),select:o.string().required().matches(/^document$/,{excludeEmptyString:!0}),customtypes:o.array().optional()}),el={create:e=>({type:"Link",config:{label:e,select:"document",repeat:!1,customtypes:[]}}),Meta:en,schema:o.object().shape({type:o.string().matches(/^Link$/,{excludeEmptyString:!0}).required(),config:ei}),TYPE_NAME:"Link",FormFields:et,CUSTOM_NAME:"ContentRelationship",Form:e=>{let{initialValues:t,values:n,setFieldValue:l,fields:r}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.k,{children:Object.entries(et).filter(e=>"customtypes"!==e[0]).map(e=>{let[n,l]=e;return(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)(n),formField:l,fields:r,initialValues:t})},n)})}),(0,i.jsx)(s.xu,{mt:20,children:(0,i.jsx)(ee.zE,{value:n.config.customtypes,onChange:e=>{l("config.customtypes",e)}})})]})},prepareInitialValues:(e,t)=>(null==t?void 0:t.customtypes)?{...t,customtypes:t.customtypes.filter(t=>e.find(e=>"string"==typeof t?e.local.id===t:e.local.id===t.id))}:t,label:a.$U.name},{FormFields:er,schema:eo}=(0,w.zg)("Date"),ea={create:e=>({type:"Date",config:{label:e,placeholder:""}}),FormFields:er,TYPE_NAME:"Date",schema:eo,Meta:{icon:r.f$3},label:a.pt.name},{FormFields:es,schema:ed}=(0,w.zg)("Embed"),ec={create:e=>({type:"Embed",config:{label:e,placeholder:""}}),FormFields:es,TYPE_NAME:"Embed",schema:ed,Meta:{icon:r.xoN},label:a.gA.name},eu={create:e=>({type:"GeoPoint",config:{label:e}}),FormFields:{label:p.Jp.label,id:p.Jp.id},TYPE_NAME:"GeoPoint",schema:o.object().shape({type:o.string().matches(/^GeoPoint$/,{excludeEmptyString:!0}).required(),config:o.object().shape({label:o.string()}).required().default(void 0).noUnknown(!0)}),Meta:{icon:r.lPv},label:a.uG.name};var ep=n(8799),eh=n(90167),em=n(66770);let ef=e=>{let{onClick:t,error:n,onDelete:l,active:o,text:a,sx:d}=e;return(0,i.jsx)(em.Z,{useActive:!0,fitButton:!0,error:n,onClick:t,active:o,sx:{position:"relative",width:"64px",height:"64px",...d},Icon:()=>(0,i.jsxs)(y.Fragment,{children:[(0,i.jsxs)(s.kC,{sx:{flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[(0,i.jsx)(ep.jnY,{size:22}),(0,i.jsx)(s.xv,{mt:1,children:a})]}),l?(0,i.jsx)(s.Ct,{onClick:l,variant:"circle-right",children:(0,i.jsx)(r.B4e,{})}):null]})})},ex=e=>{let{onClick:t}=e;return(0,i.jsx)(em.Z,{fitButton:!0,onClick:t,sx:{width:"64px",height:"64px",border:e=>{let{colors:t}=e;return"1px solid ".concat(String(null==t?void 0:t.borders))}},Icon:()=>(0,i.jsx)(s.kC,{sx:{flexDirection:"column",justifyContent:"center",alignItems:"center"},children:(0,i.jsx)(ep.iTs,{size:34,color:"#5263BA","aria-label":"Add a thumbnail"})})})},eg=e=>{let{prefix:t,required:n=!1,display:l}=e,[r,o]=(0,J.U$)(t),a=n?"*":"";return l?(0,i.jsxs)(y.Fragment,{children:[(0,i.jsx)(ev,{name:"".concat(t,".name"),label:"Name".concat(a),placeholder:"main",sx:{mb:3},isConstraint:"config.constraint"===t,meta:o}),(0,i.jsx)(eb,{name:"".concat(t,".width"),label:"Width (px)".concat(a),placeholder:" ",sx:{mb:3}}),(0,i.jsx)(eb,{name:"".concat(t,".height"),label:"Height (px)".concat(a),placeholder:" "})]}):null},ev=e=>{let{name:t,label:n,placeholder:l,meta:r,isConstraint:o,...a}=e,[s]=(0,J.U$)(t);return(0,i.jsx)(eh.Hq,{...a,fieldName:t,meta:r,formField:{label:n,placeholder:l},field:o?{value:"main",readOnly:!0}:{value:s.value},variant:o?"disabled":"primary"})},eb=e=>{let{name:t,label:n,placeholder:l,...r}=e,[o,a]=(0,J.U$)(t);return(0,i.jsx)(eh.Hq,{...r,fieldName:t,formField:{label:n,placeholder:l},meta:a,field:{min:0,type:"number",value:o.value||"",onKeyDown:e=>{("e"===e.key||"-"===e.key||"+"===e.key)&&e.preventDefault()}}})},ey=()=>o.number().nullable().transform((e,t)=>""===t?null:e),ej={label:p.Jp.label,id:p.Jp.id,constraint:{validate:()=>o.object().defined().shape({width:ey(),height:ey()})},thumbnails:{validate:()=>o.array().of(o.object().test({name:"Thumbnails",message:"Must set name and width or height at minimum",test:function(e){if(!e.name)return!1;let t="number"==typeof e.width&&e.width,n="number"==typeof e.height&&e.height;return e.name&&(t||n)}}))}},ek={name:"",width:"",height:""},eS=function(){let{width:e,height:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!n||e||t?e||t?"".concat(e||"auto","x").concat(t||"auto"):"...":"auto"},eC=o.object().shape({type:o.string().matches(/^Image$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,w.B9)(ej,"id"))}),e_={Meta:{icon:r.Fwj},Form:e=>{let{initialValues:t,values:n,errors:l,fields:r,touched:o}=e,[a,p]=(0,y.useState)(0),{config:{thumbnails:h=[],constraint:m}}=n;return(0,y.useEffect)(()=>{p(h.length)},[h.length]),(0,i.jsxs)(d.k,{children:[Object.entries(ej).map(e=>{let[n,l]=e;return(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)(n),formField:l,fields:r,initialValues:t})},n)}),(0,i.jsxs)(d.J,{children:[(0,i.jsx)(s.__,{htmlFor:"thumbnails",variant:"label.primary",sx:{mt:1,display:"flex",alignItems:"center"},children:"Responsive views*"}),(0,i.jsx)(s.Zb,{p:3,children:(0,i.jsx)(J.F2,{name:"config.thumbnails",render:t=>{let{push:n,remove:r}=t;return(0,i.jsxs)(y.Fragment,{children:[(0,i.jsxs)(s.kC,{mb:3,children:[(0,i.jsx)(ef,{active:0===a,text:eS(m,!0),sx:{mr:2},onClick:()=>p(0)}),h.map((e,t)=>(0,i.jsx)(ef,{sx:{mr:3},active:a===+t+1,text:eS(e),error:!!l.thumbnails&&!!o.thumbnails&&!!o.thumbnails[t]&&!!l.thumbnails&&!!l.thumbnails[t],onDelete:()=>r(t),onClick:()=>p(+t+1)},"thumbnail-button-".concat(+t+1))),(0,i.jsx)(ex,{onClick:()=>{n(ek)}})]}),(0,i.jsx)(eg,{...e,display:0===a,prefix:"config.constraint"}),h.map((t,n)=>(0,y.createElement)(eg,{...e,required:!0,key:"thumbnail-".concat(+n+1),display:a===+n+1,prefix:"config.thumbnails[".concat(n,"]")}))]})}})})]})]})},schema:eC,create:e=>({type:"Image",config:{label:e,constraint:{},thumbnails:[]}}),FormFields:ej,TYPE_NAME:"Image",label:a.tg.name},eF={...p.Jp},eI={icon:r._b$},eT=Y.shape({select:o.string().required().matches(/^media$/,{excludeEmptyString:!0})}),eE={Meta:eI,FormFields:eF,schema:o.object().shape({type:o.string().matches(/^Link$/,{excludeEmptyString:!0}).required(),config:eT.optional()}),Form:e=>{let{initialValues:t,values:n,fields:l,setFieldValue:r}=e,{config:{allowText:o,variants:a}}=n;return(0,i.jsxs)(U.D,{flexDirection:"column",gap:16,children:[(0,i.jsxs)(d.k,{children:[Object.entries(eF).map(e=>{let[n,r]=e;return(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)(n),formField:r,fields:l,initialValues:t})},n)}),(0,i.jsx)(Z,{checked:o,setFieldValue:r})]}),(0,i.jsx)(X,{variants:a,setFieldValue:r})]})},create:e=>({type:"Link",config:{label:e,placeholder:"",select:"media",allowText:!0}}),TYPE_NAME:"Link",CUSTOM_NAME:"LinkToMedia",label:a.L0.name},{FormFields:ew,schema:eL}=(0,w.zg)("Number"),eD={create:e=>({type:"Number",config:{label:e,placeholder:""}}),FormFields:ew,TYPE_NAME:"Number",schema:eL,Meta:{icon:r.KZU},label:a.Wc.name};var eM=n(79256);let eO=e=>"use first value as default ".concat(e?'("'.concat(e,'")'):""),eA=(e,t)=>t?e:void 0,eN={...p.Jp,default_value:{type:eM.h.CHECKBOX,yupType:"string",defaultValue:null,validate:function(){return o.string().test({name:"default_value",message:'Default value is not part of field "options" in Select',test:function(e){return void 0===e||this.parent&&this.parent.options&&this.parent.options.find(t=>t===e)}})},component:e=>{var t;let{values:n}=(0,J.u6)(),l=null===(t=n.config)||void 0===t?void 0:t.options[0];return(0,i.jsx)(eh.w8,{...e,defaultValue:e.field.value,controlledValue:l,setControlledValue:e.helpers.setValue,buildControlledValue:eA,label:eO})}},options:{yupType:"array",defaultValue:["1","2"],validate:{required:["Select requires a minimum of 2 options"],min:[2,"Choose at least 2 options"],test:{name:"non-empty values",message:"Values cannot be empty",test:e=>!e.some(e=>!e||!e.length)}},component:e=>(0,i.jsx)(eh.kp,{label:"Options",inputPlaceholder:"Select option output in API (e.g. 'blueTheme')",buttonLabel:"Add option",...e})}},eR={icon:r.nwY},eP=o.object().shape({type:o.string().matches(/^Select$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,w.B9)(eN,"id"))}),eq={FormFields:eN,create:e=>({type:"Select",config:{label:e,placeholder:"",options:["1","2"]}}),schema:eP,Meta:eR,TYPE_NAME:"Select",label:a._M.name};var ez=n(47927),eV=n(29259),eB=n.n(eV),eG=n(85505),eU=n.n(eG),eJ=n(34543);let eZ=e=>t=>{let{size:n}=t;return(0,i.jsx)("span",{style:{fontSize:n},children:e})},eH=[{value:"paragraph",label:"P",icon:eZ("p")},{value:"preformatted",label:"PRE",icon:eZ("pre")},{value:"heading1",label:"H1",icon:eZ("h1")},{value:"heading2",label:"H2",icon:eZ("h2")},{value:"heading3",label:"H3",icon:eZ("h3")},{value:"heading4",label:"H4",icon:eZ("h4")},{value:"heading5",label:"H5",icon:eZ("h5")},{value:"heading6",label:"H6",icon:eZ("h6")},{value:"strong",label:"Strong",icon:eZ((0,i.jsx)("b",{children:"b"}))},{value:"em",label:"em",icon:eZ((0,i.jsx)("em",{style:{fontFamily:"serif"},children:"I"}))},{value:"hyperlink",label:"hyperlink",icon:eZ((0,i.jsx)(eJ.eR7,{}))},{value:"image",label:"image",icon:eZ((0,i.jsx)(eJ.LFN,{}))},{value:"embed",label:"embed",icon:eZ((0,i.jsx)(eJ.xqv,{}))},{value:"list-item",label:"list",icon:eZ((0,i.jsx)(eJ.SnF,{}))},{value:"o-list-item",label:"o",icon:eZ((0,i.jsx)(ep.KyO,{}))},{value:"rtl",label:"rtl",icon:eZ("rtl")}],eW=eH.map(e=>e.value),e$=e=>!eW.find(t=>!e.includes(t)),eX=e=>{let t=e.split(",");return eH.reduce((e,n)=>{let{value:i}=n;return t.includes(i)?[...e,i]:e},[])};function eK(e,t){return(0,ez.has)("parent",e)&&eB()(e.parent)&&(0,ez.has)(t,e.parent)&&eU()(e.parent[t])?e.parent[t]:null}function eY(e){return()=>o.string().test({name:e,message:"Options cannot be empty",test:function(t,n){let i="single"===e?"multi":"single",l=eK(n,e),r=eK(n,i);return!!r&&"string"==typeof r||!("string"!=typeof l||(!l||!l.length)&&(!r||!r.length)||l.split(",").find(e=>!eW.includes(e)))}})}let eQ={...p.Jp,allowTargetBlank:(0,h.Jg)("Allow target blank for links"),single:{validate:eY("single")},multi:{validate:eY("multi")}},e0=["config.single","config.multi"],e1={icon:r.BAW},e2=o.object().shape({type:o.string().matches(/^StructuredText$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,w.B9)({...eQ,labels:{yupType:"array",validate:{}}},"id"))}),e5={create:e=>({type:"StructuredText",config:{label:e,placeholder:"",allowTargetBlank:!0,multi:eW.join(",")}}),FormFields:eQ,Meta:e1,schema:e2,TYPE_NAME:"StructuredText",Form:e=>{var t;let{initialValues:n,values:l,errors:r,fields:o,setFieldValue:a}=e,{config:{single:p,multi:h}}=l,m=p?eX(p):h?eX(h):eW,[f,x]=(0,y.useState)(!p),[g,v]=(0,y.useState)(m);return(0,y.useEffect)(()=>{let e=f?1:0;a(e0[e],g.join(",")),setTimeout(()=>{a(e0[1-e],void 0)},100)},[f,g]),(0,i.jsxs)(d.k,{children:[Object.entries(eQ).map(e=>{let[t,l]=e;return(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)(t),formField:l,fields:o,initialValues:n})},t)}),(0,i.jsxs)(d.J,{children:[(0,i.jsxs)(s.__,{htmlFor:"accept",variant:"label.primary",sx:{mt:1,display:"flex",alignItems:"center"},children:["Accept*",(0,i.jsx)(s.zx,{type:"button",variant:"buttons.textButton",onClick:()=>{if(e$(g))return v([]);v(eW)},children:e$(g)?"Unselect All":"Select all"})]}),eH.map(e=>(0,i.jsx)(em.Z,{fitButton:!0,useActive:!0,label:e.label,size:14,Icon:e.icon,sx:{p:"16px",mb:2,mr:2,variant:"buttons.selectIcon"},active:g.includes(e.value),onClick:()=>{if(g.find(t=>t===e.value))return v(g.filter(t=>t!==e.value));v([...g,e.value])}},e.value)),(null===(t=r.config)||void 0===t?void 0:t[f?"multi":"single"])?(0,i.jsx)(s.xu,{sx:{position:"absolute"},children:(0,i.jsx)(s.xv,{as:"span",variant:"text.labelError",pl:0,children:r.config[f?"multi":"single"]})}):null]}),(0,i.jsx)(d.J,{children:(0,i.jsx)(s.kC,{sx:{mt:2,alignItems:"center",height:"100%"},children:(0,i.jsxs)(s.__,{variant:"label.border",children:[(0,i.jsx)(s.XZ,{checked:f,onChange:()=>x(!f)}),"Allow multiple paragraphs"]})})})]})},label:a._n.name};var e3=n(18978);let e4={create:e=>({type:"Table",config:{label:e}}),FormFields:{label:p.Jp.label,id:p.Jp.id},TYPE_NAME:"Table",schema:o.object().shape({type:o.string().matches(/^Table$/,{excludeEmptyString:!0}).required(),config:o.object().shape({label:o.string()}).required().default(void 0).noUnknown(!0)}),Meta:{icon:e3.WHV},label:a.BB.name},e6=p.Jp,e8=o.object().shape({type:o.string().matches(/^Text$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,w.B9)(e6,"id"))}),e9={create:e=>({type:"Text",config:{label:e,placeholder:""}}),Meta:{icon:r.SQS},schema:e8,TYPE_NAME:"Text",FormFields:e6,label:a.$S.name},e7=p.Jp,te={create:e=>({type:"Timestamp",config:{label:e,placeholder:""}}),schema:o.object().shape({type:o.string().matches(/^Timestamp$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,w.B9)(e7,"id"))}),FormFields:e7,TYPE_NAME:"Timestamp",Meta:{icon:r.k71},label:a.UG.name},tt={label:p.Jp.label,id:{...p.Jp.id,validate:{required:"This field is required",matches:[/^uid$/,"Api ID must be 'uid' for this field."]},disabled:!0},placeholder:p.Jp.placeholder},tn=o.object().shape({type:o.string().matches(/^UID$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,w.B9)(tt,"id"))}),ti={Boolean:P,Color:G,ContentRelationship:el,Date:ea,Embed:ec,GeoPoint:eu,Image:e_,Link:Q,LinkToMedia:eE,Number:eD,Select:eq,StructuredText:e5,Table:e4,Text:e9,Timestamp:te,UID:{create:e=>({type:"UID",config:{label:e,placeholder:""}}),Meta:{icon:r.XN7},schema:tn,TYPE_NAME:"UID",FormFields:tt,label:a.Fj.name}},tl=[ti.Image,ti.Text,ti.StructuredText,ti.Link,ti.Select,ti.Boolean,ti.Number,ti.Color,ti.Date,ti.Table,ti.Embed,ti.Timestamp,ti.GeoPoint,ti.ContentRelationship,ti.LinkToMedia],tr="subItem",to=v({schemaTypeRegex:/^NestedGroup$/,customListItem:e=>(0,i.jsx)(A,{Widgets:ti,widgetsArray:tl,hintBase:tr,...e}),customName:"NestedGroup",hintItemName:tr}),ta={...ti,NestedGroup:to},ts=[ta.Image,ta.Text,ta.StructuredText,ta.Link,ta.Select,ta.Boolean,ta.Number,ta.Color,ta.Date,ta.Table,ta.Embed,ta.Timestamp,ta.GeoPoint,ta.ContentRelationship,ta.LinkToMedia,ta.NestedGroup],td="item",tc={Group:v({schemaTypeRegex:/^Group$/,customListItem:e=>{let t=function(){let e=(0,l.L)("slicemachine-nested-groups");return{eligible:(null==e?void 0:e.value)==="on"}}(),n=ts.filter(e=>!!t.eligible||"NestedGroup"!==e.CUSTOM_NAME);return(0,i.jsx)(A,{Widgets:ta,widgetsArray:n,hintBase:td,...e})},hintItemName:td}),NestedGroup:to,...ti}},16086:function(e,t,n){"use strict";n.d(t,{B9:function(){return o},Ss:function(){return s},uS:function(){return a},zg:function(){return d}});var i=n(65413),l=n(68169),r=n(9889);let o=(e,t)=>{let{[t]:n,...i}=e;return i},a=e=>!e.destination||e.source.index===e.destination.index||e.source.droppableId!==e.destination.droppableId,s=(e,t)=>!e[t]&&(console.log('Could not find widget with type name "'.concat(t,'".')),!0),d=e=>({TYPE_NAME:e,FormFields:r.Jp,schema:i.object().shape({type:i.string().test({name:"type",test:function(t){return t===e}}),config:(0,l.gc)(o(r.Jp,"id"))}),create:()=>({type:e,config:(0,l.f7)(o(r.Jp,"id"))})})},49919:function(e,t,n){"use strict";function i(e){if(e.startsWith("/slices/"))return"slice";if(e.startsWith("/custom-types/"))return"custom type";if(e.startsWith("/page-types/"))return"page type";throw Error("Did not detect a content type from: ".concat(e))}n.d(t,{T:function(){return i}})},93155:function(e,t,n){"use strict";n.d(t,{F:function(){return l}});var i=n(41347);function l(e){var t,n,l,r,o,a;return{allowText:null===(t=e.config)||void 0===t?void 0:t.allowText,repeat:null===(n=e.config)||void 0===n?void 0:n.repeat,variants:null===(l=e.config)||void 0===l?void 0:l.variants,linkSelect:null===(r=e.config)||void 0===r?void 0:r.select,...(null===(o=e.config)||void 0===o?void 0:o.select)==="document"&&(null===(a=e.config)||void 0===a?void 0:a.customtypes)&&(()=>{var t;let{pickedFields:n,nestedPickedFields:l}=(0,i.WP)((0,i.Vg)({linkCustomtypes:null===(t=e.config)||void 0===t?void 0:t.customtypes}));return{linkPickedFields:n,linkNestedPickedFields:l}})()}}},5495:function(e,t,n){"use strict";n.d(t,{V:function(){return o}});var i=n(94160),l=n(49919),r=n(93155);function o(e){var t,n;let{id:o,field:a,isInAGroup:s=!1}=e;i.Xe.track({event:"field:added",id:o,name:null!==(n=null===(t=a.config)||void 0===t?void 0:t.label)&&void 0!==n?n:"",type:a.type,isInAGroup:s,contentType:(0,l.T)(window.location.pathname),..."Link"===a.type&&(0,r.F)(a)})}},39302:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i=n(94160),l=n(49919),r=n(93155);function o(e){var t,n;let{id:o,previousId:a=o,field:s,isInAGroup:d=!1}=e;i.Xe.track({event:"field:updated",previousId:a,id:o,idUpdated:a!==o,name:null!==(n=null===(t=s.config)||void 0===t?void 0:t.label)&&void 0!==n?n:"",type:s.type,isInAGroup:d,contentType:(0,l.T)(window.location.pathname),..."Link"===s.type&&(0,r.F)(s)})}},13834:function(e){e.exports={flex:"List_flex__b6acG",row:"List_row__zKnOI List_flex__b6acG",root:"List_root__m_SiQ List_flex__b6acG","root-border":"List_root-border__UW3vp",child:"List_child__MJ49i List_row__zKnOI List_flex__b6acG",header:"List_header__T0WM5 List_child__MJ49i List_row__zKnOI List_flex__b6acG",headerActions:"List_headerActions__mNgLY List_row__zKnOI List_flex__b6acG",item:"List_item__LMBx4 List_child__MJ49i List_row__zKnOI List_flex__b6acG"}},644:function(e){e.exports={root:"ZoneEmptyState_root__DAfG2"}}}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[630],{35289:function(e,t,n){"use strict";n.d(t,{aV:function(){return s},Bu:function(){return d}});var i=n(52322),l=n(11699),r=n(6277),o=n(13834),a=n.n(o);let s=e=>{let{border:t=!0,...n}=e;return(0,i.jsx)("div",{...n,className:(0,r.Z)(a().root,t&&a()["root-border"])})},d=e=>{let{actions:t,children:n,toggle:r,...o}=e;return(0,i.jsxs)("div",{...o,className:a().header,children:[(0,i.jsx)(l.bL,{color:"grey11",component:"span",noWrap:!0,variant:"bold",children:n}),r,t?(0,i.jsx)("div",{className:a().headerActions,children:t}):null]})}},6882:function(e,t,n){"use strict";n.d(t,{$S:function(){return x},$U:function(){return c},BB:function(){return f},Fj:function(){return b},J9:function(){return v},L0:function(){return u},Qr:function(){return i},U:function(){return y},UG:function(){return g},Wc:function(){return p},XU:function(){return k},_M:function(){return m},_n:function(){return h},gA:function(){return o},pG:function(){return l},pV:function(){return d},pt:function(){return r},tg:function(){return s},uG:function(){return a}});let i={name:"Boolean",description:"A true or false toggle.",icon:"toggleOff",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295526/DEV_TOOLS/SM_FIELDS/Type_Boolean_cbwg8k.png",type:"Boolean"},l={name:"Color",description:"A color in hex format.",icon:"colorLens",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295521/DEV_TOOLS/SM_FIELDS/Type_Color_nyoeit.png",type:"Color"},r={name:"Date",description:"A date without time.",icon:"dateRange",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295525/DEV_TOOLS/SM_FIELDS/Type_Date_dsuaeq.png",type:"Date"},o={name:"Embed",description:"A video, song, or oEmbed link.",icon:"code",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295523/DEV_TOOLS/SM_FIELDS/Type_Embed_wwssvd.png",type:"Embed"},a={name:"Geopoint",description:"A geographical coordinate.",icon:"place",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295522/DEV_TOOLS/SM_FIELDS/Type_GeoPoint_lpq0sm.png",type:"GeoPoint"},s={name:"Image",description:"A responsive image.",icon:"image",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295520/DEV_TOOLS/SM_FIELDS/Type_Image_zyatxy.png",type:"Image"},d={name:"Link",description:"A link to a website, asset, or document.",icon:"link",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295528/DEV_TOOLS/SM_FIELDS/Type_Link_bgslgy.png",type:"Link"},c={name:"Content Relationship",description:"A reference to a Prismic document.",icon:"settingsEthernet",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295527/DEV_TOOLS/SM_FIELDS/Type_Content_RelationShip_s4z4nh.png",type:"Link",variant:"ContentRelationship"},u={name:"Link to Media",description:"A link to a media asset.",icon:"attachFile",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295519/DEV_TOOLS/SM_FIELDS/Type_LinkToMedia_m2p0ce.png",type:"Link",variant:"LinkToMedia"},p={name:"Number",description:"An integer or float.",icon:"pin",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295522/DEV_TOOLS/SM_FIELDS/Type_Number_o3olop.png",type:"Number"},h={name:"Rich Text",description:"Text with formatting options.",icon:"textFields",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295530/DEV_TOOLS/SM_FIELDS/Type_Rich_Text_fxdyar.png",type:"StructuredText"},m={name:"Select",description:"A dropdown of options.",icon:"arrowDropDownCircle",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295527/DEV_TOOLS/SM_FIELDS/Type_Select_bedjei.png",type:"Select"},f={name:"Table",description:"A structured table.",icon:"table",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1737381854/FIELDS_SM/Table_f47jnq.png",type:"Table"},x={name:"Text",description:"A text string without formatting.",icon:"title",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295529/DEV_TOOLS/SM_FIELDS/Type_Key_Text_xrqf45.png",type:"Text"},g={name:"Timestamp",description:"A date and time.",icon:"schedule",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295524/DEV_TOOLS/SM_FIELDS/Type_Timestamp_fkr5iw.png",type:"Timestamp"},v=[s,x,h,i,p,m,d,u,l,r,f,g,o,a,c],b={name:"UID",description:"Unique Identifier",icon:"tag",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721295519/DEV_TOOLS/SM_FIELDS/Type_UID_hrwzug.png",type:"UID"},y={name:"Repeatable Group",description:"A set of fields that editors can repeat.",icon:"createNewFolder",thumbnail:"https://res.cloudinary.com/dmtf1daqp/image/upload/v1721314577/DEV_TOOLS/SM_FIELDS/Type_Group_uwwco0.png",type:"Group"},j={...y,variant:"NestedGroup"},k=[...v,b,y,j]},34166:function(e,t,n){"use strict";n.d(t,{nZ:function(){return c},rT:function(){return p},tB:function(){return u}});var i=n(52322),l=n(11699),r=n(2784),o=n(30195),a=n(94160),s=n(76611),d=n(5683);function c(e){let{type:t,library:n,sliceId:i,variationId:l,langSmithUrl:r}=e,o=(0,d.iv)({type:t,library:n,sliceId:i,variationId:l}),a=JSON.stringify({langSmithUrl:r});localStorage.setItem(o,a)}function u(e){let{type:t,library:n,sliceId:i,variationId:l}=e,r=(0,d.iv)({type:t,library:n,sliceId:i,variationId:l});localStorage.removeItem(r)}function p(e){let{type:t,library:n,sliceId:c,variationId:u}=e,{key:p,value:h,done:m}=function(e){let{type:t,library:n,sliceId:i,variationId:l}=e,r=(0,d.iv)({type:t,library:n,sliceId:i,variationId:l}),[a,c]=(0,s.V)(r,void 0,{schema:o.z.object({langSmithUrl:o.z.string().url().optional()})});return{key:r,value:a,done:()=>c(void 0)}}({type:t,library:n,sliceId:c,variationId:u}),[f,x]=(0,r.useState)(),g=e=>()=>{h&&(x(p),a.Xe.track({event:"slice-generation-feedback",type:t,sliceId:c,variationId:u,feedback:e,langSmithUrl:h.langSmithUrl}),m())};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.be,{children:(0,i.jsx)(l.bQ,{anchor:(0,i.jsx)(l.D,{width:"100%",justifyContent:"center",position:"absolute",bottom:64}),icon:"check",title:"Thanks for your feedback!",seconds:2,open:!!f,onOpenChange:e=>{e||x(void 0)}},f)}),(0,i.jsx)(l.i,{children:h&&(0,i.jsxs)(l.D,{flexDirection:"row",justifyContent:"end",gap:8,alignItems:"center",children:[(0,i.jsx)(l.bL,{color:"grey11",children:"Did the AI get it right?"}),(0,i.jsxs)(l.D,{flexDirection:"row",gap:4,children:[(0,i.jsx)(l.c3,{side:"bottom",sideOffset:4,variant:"text",content:"Looks good",children:(0,i.jsx)(l.aZ,{variant:"solid",size:"small",icon:"thumbUp",onClick:g("up")})}),(0,i.jsx)(l.c3,{side:"bottom",sideOffset:4,variant:"text",content:"Needs improvement",children:(0,i.jsx)(l.aZ,{variant:"solid",size:"small",icon:"thumbDown",onClick:g("down")})})]})]})})]})}},23094:function(e,t,n){"use strict";n.d(t,{X:function(){return r}});var i=n(52322),l=n(11699);let r=e=>{let t;let{status:n}=e;switch(n){case"pending":t={icon:(0,i.jsx)(l.bg,{color:"grey11"}),text:"Saving..."};break;case"failed":t={icon:(0,i.jsx)(l.aX,{name:"close",color:"tomato11",size:"medium"}),text:"Failed to save"};break;case"done":t={icon:(0,i.jsx)(l.aX,{name:"check",color:"green11",size:"medium"}),text:"Auto-saved"}}return(0,i.jsxs)(l.D,{gap:8,alignItems:"center",children:[t.icon,(0,i.jsx)(l.bL,{color:"grey11",children:t.text})]})}},6609:function(e,t,n){"use strict";n.d(t,{S:function(){return o}});var i=n(52322),l=n(11699),r=n(6882);function o(e){let{open:t,onOpenChange:n,disabled:o=!1,onSelectField:s,fields:d,triggerDataTestId:c="add-field",trigger:u}=e,p=d.filter(e=>r.J9.some(t=>t.name===e.name)||e.name===r.Fj.name),h=d.find(e=>e.name===r.U.name);return(0,i.jsxs)(l.ar,{open:t,onOpenChange:n,children:[(0,i.jsx)(l.av,{disabled:o,children:null!=u?u:(0,i.jsx)(l.E,{startIcon:"add",color:"grey","data-testid":c,children:"Add a field"})}),(0,i.jsxs)(l.as,{align:"end",maxHeight:400,collisionPadding:8,children:[(0,i.jsx)(l.au,{children:"Single fields"}),p.map(e=>(0,i.jsx)(a,{field:e,onSelectField:s},e.name)),h&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.au,{children:"Set of fields"}),(0,i.jsx)(a,{field:h,onSelectField:s})]})]})]})}function a(e){let{field:t,onSelectField:n}=e,{type:r,variant:o,name:a,icon:s,description:d,thumbnail:c}=t;return(0,i.jsx)(l.at,{startIcon:(0,i.jsx)(l.aX,{name:s,size:"large"}),description:d,onSelect:()=>n(null!=o?o:r),renderTooltip:e=>(0,i.jsx)(l.c3,{visible:!0,variant:"custom",content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.a_,{src:c,borderRadius:4,sx:{height:170,width:278},animateOnLoad:!1}),(0,i.jsx)(l.bL,{color:"white",children:"How it will look for content editors."})]}),align:"start",side:"left",sideOffset:4,animation:"none",children:e}),children:a},"".concat(r).concat(o?"-".concat(o):""))}},41347:function(e,t,n){"use strict";n.d(t,{zE:function(){return d},Vg:function(){return j},WP:function(){return C}});var i=n(52322),l=n(47124),r=n(11699),o=n(2784),a=n(50477),s=n(87446);function d(e){return(0,i.jsx)(s.h,{renderError:()=>(0,i.jsxs)(r.D,{alignItems:"center",gap:8,children:[(0,i.jsx)(r.aX,{name:"alert",size:"small",color:"tomato10"}),(0,i.jsx)(r.bL,{color:"tomato10",children:"Error loading your types"})]}),children:(0,i.jsx)(r.bB,{fallback:(0,i.jsxs)(r.D,{flexDirection:"column",position:"relative",children:[(0,i.jsx)(r.bx,{height:240}),(0,i.jsxs)(r.D,{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",alignItems:"center",gap:8,children:[(0,i.jsx)(r.aX,{name:"autorenew",size:"small",color:"grey11"}),(0,i.jsx)(r.bL,{color:"grey11",children:"Loading your types..."})]})]}),children:(0,i.jsx)(c,{...e})})})}function c(e){let{value:t,onChange:n}=e,{allCustomTypes:l,pickedCustomTypes:s}=function(e){let{customTypes:t}=(0,a.xU)();if((0,o.useEffect)(()=>{(0,a.NG)()},[]),!e)return{allCustomTypes:t,pickedCustomTypes:[]};let n=e.flatMap(e=>{var n;return null!==(n=t.find(t=>t.id===L(e)))&&void 0!==n?n:[]});return{allCustomTypes:t,pickedCustomTypes:n}}(t),d=t?j({linkCustomtypes:t,allCustomTypes:l}):{};return(0,i.jsxs)(r.D,{overflow:"hidden",flexDirection:"column",border:!0,borderRadius:6,width:"100%",children:[(0,i.jsx)(r.D,{border:{bottom:!0},padding:{inline:16,bottom:16,top:12},flexDirection:"column",gap:8,children:s.length>0?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.D,{flexDirection:"column",children:[(0,i.jsx)(r.bL,{variant:"h4",color:"grey12",children:"Allowed type"}),(0,i.jsxs)(r.bL,{color:"grey11",children:["Select a single type that editors can link to in the Page Builder.",(0,i.jsx)("br",{}),"For the selected type, choose which fields to include in the API response."]}),s.length>1&&(0,i.jsx)(r.D,{margin:{block:12},children:(0,i.jsx)(r.f,{color:"warn",icon:"alert",subtitle:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.bL,{color:"inherit",variant:"bold",children:"Legacy mode. Keep only one type to enable the improved Content Relationship feature."}),(0,i.jsx)("br",{}),(0,i.jsxs)("a",{href:"https://prismic.io/docs/fields/content-relationship",target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"none",fontWeight:"bold",display:"flex",alignItems:"center",gap:4},children:[(0,i.jsx)(r.bL,{color:"inherit",variant:"bold",children:"See documentation"}),(0,i.jsx)(r.aX,{name:"arrowForward",size:"small",color:"inherit"})]})]})})})]}),s.map(e=>{var o;return(0,i.jsxs)(r.D,{gap:4,padding:8,border:!0,borderRadius:6,borderColor:"grey6",backgroundColor:"white",justifyContent:"space-between",children:[s.length>1?(0,i.jsx)(r.bL,{children:e.id}):(0,i.jsx)(r.c5,{children:(0,i.jsx)(h,{customType:e,onChange:i=>{n(function(e){let{linkCustomtypes:t,fieldCheckMap:n,newCustomType:i,customTypeId:l}=e,r=[],o=Object.entries({...n,[l]:i}).flatMap(e=>{let[t,n]=e,i=Object.entries(n).flatMap(e=>{let[t,n]=e;if("group"===n.type){let e=Object.entries(n.value).flatMap(e=>{let[t,n]=e;if("checkbox"===n.type)return n.value?t:[];let i=S(n.value);return i.length>0?{id:t,customtypes:i}:[]});return e.length>0?{id:t,fields:e}:[]}if("contentRelationship"===n.type){let e=S(n.value);return e.length>0?{id:t,customtypes:e}:[]}return n.value?t:[]});return i.length>0?{id:t,fields:i}:[]});if(!t)return o;for(let e of t){let t=o.find(t=>L(t)===L(e));void 0!==t?r.push(t):L(e)===l?r.push(L(e)):r.push(e)}return r}({fieldCheckMap:d,newCustomType:i,linkCustomtypes:t,customTypeId:e.id}))},fieldCheckMap:null!==(o=d[e.id])&&void 0!==o?o:{},allCustomTypes:l})}),(0,i.jsx)(r.aZ,{icon:"close",size:"small",onClick:()=>{var i;return i=e.id,void(t&&n(t.filter(e=>L(e)!==i)))},sx:{height:24,width:24},hiddenLabel:"Remove type"})]},e.id)})]}):(0,i.jsx)(u,{onSelect:function(e){n(t?[...t,e]:[e])},allCustomTypes:l})}),(0,i.jsx)(r.D,{backgroundColor:"white",flexDirection:"column",padding:12,children:(0,i.jsxs)(r.bL,{variant:"normal",color:"grey11",children:["Have ideas for improving this field?"," ",(0,i.jsx)("a",{href:"https://community.prismic.io/t/content-relationship-share-your-requests-and-feedback/19843",target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"underline"},children:"Please provide your feedback here"}),"."]})})]})}function u(e){let{allCustomTypes:t,onSelect:n}=e;return(0,i.jsxs)(r.D,{flexDirection:"column",gap:8,alignItems:"center",padding:{block:24},children:[(0,i.jsxs)(r.D,{flexDirection:"column",alignItems:"center",gap:4,children:[(0,i.jsx)(r.bL,{variant:"h5",color:"grey12",children:"No type selected"}),(0,i.jsxs)(r.bL,{color:"grey11",component:"p",align:"center",children:["Select the type editors can link to.",(0,i.jsx)("br",{}),"Then, choose which fields to return in the API."]})]}),(0,i.jsx)(r.D,{children:(0,i.jsx)(p,{allCustomTypes:t,onSelect:n})})]})}function p(e){let{allCustomTypes:t,onSelect:n}=e,l=(0,i.jsx)(r.E,{startIcon:"add",color:"grey",disabled:0===t.length,children:"Add type"});return 0===t.length?(0,i.jsx)(r.D,{children:(0,i.jsx)(r.c3,{content:"No type available",side:"bottom",align:"start",disableHoverableContent:!0,children:l})}):(0,i.jsx)(r.D,{children:(0,i.jsxs)(r.ar,{children:[(0,i.jsx)(r.av,{children:l}),(0,i.jsxs)(r.as,{maxHeight:400,minWidth:256,align:"center",children:[(0,i.jsx)(r.au,{children:(0,i.jsx)(r.bL,{color:"grey11",children:"Types"})}),t.map(e=>(0,i.jsx)(r.at,{onSelect:()=>n(e.id),children:(0,i.jsxs)(r.D,{alignItems:"center",justifyContent:"space-between",gap:8,children:[(0,i.jsx)(r.bO,{children:(0,i.jsx)(r.bL,{children:e.id})}),(0,i.jsx)(r.m,{title:(0,i.jsx)(r.bL,{variant:"extraSmall",color:"purple11",children:b(e.format)}),color:"purple",size:"small"})]})},e.id))]})]})})}function h(e){let{customType:t,fieldCheckMap:n,onChange:l,allCustomTypes:o}=e,a=I(t).map(e=>{var t,a,s;let[d,c]=e;if("Group"===c.type){let e=null!==(a=n[d])&&void 0!==a?a:{};return(0,i.jsx)(g,{group:c,groupId:d,onChange:e=>{l({...n,[d]:{type:"group",value:e}})},fieldCheckMap:"group"===e.type?e.value:{},allCustomTypes:o},d)}if(F(c,o)){let e=null!==(s=n[d])&&void 0!==s?s:{};return(0,i.jsx)(m,{field:c,fieldId:d,onChange:e=>{l({...n,[d]:{type:"contentRelationship",value:e}})},fieldCheckMap:"contentRelationship"===e.type?e.value:{},allCustomTypes:o},d)}return(0,i.jsx)(r.c6,{title:d,checked:(null===(t=n[d])||void 0===t?void 0:t.value)===!0,onCheckedChange:e=>{l({...n,[d]:{type:"checkbox",value:e}})}},d)}),s=C(n);return(0,i.jsx)(r.c7,{title:t.id,subtitle:s.pickedFields>0?v(s.pickedFields,"returned in the API"):"(No fields returned in the API)",badge:b(t.format),defaultOpen:!0,children:a.length>0?a:(0,i.jsx)(f,{})},t.id)}function m(e){var t,n;let{field:l,fieldId:o,fieldCheckMap:a,onChange:s,allCustomTypes:d}=e,[c]=y(null===(t=l.config)||void 0===t?void 0:t.customtypes,d),u=e=>{s({...a,[c.id]:e})},p=null!==(n=a[c.id])&&void 0!==n?n:{},h=I(c).map(e=>{var t,n;let[l,o]=e;if("Group"===o.type){let e=null!==(n=p[l])&&void 0!==n?n:{};return(0,i.jsx)(x,{group:o,groupId:l,onChange:e=>{u({...p,[l]:{type:"group",value:e}})},fieldCheckMap:"group"===e.type?e.value:{}},l)}return(0,i.jsx)(r.c6,{title:l,checked:(null===(t=p[l])||void 0===t?void 0:t.value)===!0,onCheckedChange:e=>{u({...p,[l]:{type:"checkbox",value:e}})}},l)});return(0,i.jsx)(r.c7,{title:(0,i.jsxs)(r.bL,{children:[o," ",(0,i.jsxs)(r.bL,{color:"grey11",children:["→ ",c.id]})]}),subtitle:v(C(p).pickedFields),badge:b(c.format),children:h.length>0?h:(0,i.jsx)(f,{})},c.id)}function f(){return(0,i.jsx)(r.bL,{color:"grey11",children:"No available fields to select"})}function x(e){let{group:t,groupId:n,fieldCheckMap:l,onChange:o}=e,a=w(t).map(e=>{var t;let{fieldId:n}=e;return(0,i.jsx)(r.c6,{title:n,checked:(null===(t=l[n])||void 0===t?void 0:t.value)===!0,onCheckedChange:e=>{o({...l,[n]:{type:"checkbox",value:e}})}},n)});return(0,i.jsx)(r.c7,{title:n,subtitle:v(C(l).pickedFields),badge:"Group",children:a.length>0?a:(0,i.jsx)(f,{})},n)}function g(e){let{group:t,groupId:n,fieldCheckMap:l,onChange:o,allCustomTypes:a}=e,s=w(t).map(e=>{var t,n;let{fieldId:s,field:d}=e;if(F(d,a)){let e=null!==(n=l[s])&&void 0!==n?n:{};return(0,i.jsx)(m,{field:d,fieldId:s,fieldCheckMap:"contentRelationship"===e.type?e.value:{},onChange:e=>{o({...l,[s]:{type:"contentRelationship",value:e}})},allCustomTypes:a},s)}return(0,i.jsx)(r.c6,{title:s,checked:(null===(t=l[s])||void 0===t?void 0:t.value)===!0,onCheckedChange:e=>{o({...l,[s]:{type:"checkbox",value:e}})}},s)});return(0,i.jsx)(r.c7,{title:n,subtitle:v(C(l).pickedFields),badge:"Group",children:s.length>0?s:(0,i.jsx)(f,{})},n)}function v(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"selected";if(0!==e)return"(".concat(e," ").concat((0,l._6)(e,"field","fields")," ").concat(t,")")}function b(e){return"page"===e?"Page type":"Custom type"}function y(e,t){return e?e.flatMap(e=>{var n;return null!==(n=t.find(t=>t.id===L(e)))&&void 0!==n?n:[]}):[]}function j(e){let{linkCustomtypes:t,allCustomTypes:n}=e,i=void 0!==n;return t.reduce((e,t)=>{if("string"==typeof t)return e;let l={};if(i){let i=n.find(e=>e.id===t.id);if(!i)return e;l=T(i)}let r=t.fields.reduce((e,t)=>{let r=l[L(t)];if(i&&void 0===r)return e;if("string"==typeof t)return i&&void 0!==r&&"Group"===r.type||(e[t]={type:"checkbox",value:!0}),e;if("fields"in t&&void 0!==t.fields){if(i&&void 0!==r&&"Group"!==r.type)return e;let o=function(e){let{group:t,ctFlatFieldMap:n,allCustomTypes:i}=e,l=void 0!==i,r=t.fields.reduce((e,r)=>{let o=E(n,t.id,L(r));if(l&&!o)return e;if("string"==typeof r)return l&&void 0!==o&&"Group"===o.type||(e[r]={type:"checkbox",value:!0}),e;if("customtypes"in r&&void 0!==r.customtypes){if(l&&void 0!==o&&!_(o))return e;let t=k({field:r,allCustomTypes:i});t&&(e[r.id]=t)}return e},{});if(0!==Object.keys(r).length)return{type:"group",value:r}}({group:t,allCustomTypes:n,ctFlatFieldMap:l});return o&&(e[t.id]=o),e}if("customtypes"in t&&void 0!==t.customtypes){if(i&&void 0!==r&&!_(r))return e;let l=k({field:t,allCustomTypes:n});l&&(e[t.id]=l)}return e},{});return Object.keys(r).length>0&&(e[t.id]=r),e},{})}function k(e){let{field:t,allCustomTypes:n}=e,i=void 0!==n,l=t.customtypes.reduce((e,t)=>{if("string"==typeof t)return e;let l={};if(i){let i=n.find(e=>e.id===t.id);if(!i)return e;l=T(i)}let r=t.fields.reduce((e,t)=>{if("string"==typeof t){let n=l[t];return i&&(void 0===n||"Group"===n.type)||(e[t]={type:"checkbox",value:!0}),e}if("fields"in t&&void 0!==t.fields){let n=t.fields.reduce((e,n)=>{let r=E(l,t.id,n);return i&&(void 0===r||"Group"===r.type)||(e[n]={type:"checkbox",value:!0}),e},{});Object.keys(n).length>0&&(e[t.id]={type:"group",value:n})}return e},{});return Object.keys(r).length>0&&(e[t.id]=r),e},{});if(0!==Object.keys(l).length)return{type:"contentRelationship",value:l}}function S(e){return Object.entries(e).flatMap(e=>{let[t,n]=e,i=Object.entries(n).flatMap(e=>{let[t,n]=e;if("group"===n.type){let e=Object.entries(n.value).flatMap(e=>{let[t,n]=e;return"checkbox"===n.type&&n.value?t:[]});return e.length>0?{id:t,fields:e}:[]}return n.value?t:[]});return i.length>0?{id:t,fields:i}:[]})}function C(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?Object.values(e).reduce((e,n)=>{if(!function(e){if("object"!=typeof e||null===e||Array.isArray(e)||e instanceof Date||e instanceof RegExp||e instanceof Error)return!1;for(let t in e)if("string"!=typeof t||!Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(n))return e;if("type"in n&&"checkbox"===n.type)return n.value?{pickedFields:e.pickedFields+1,nestedPickedFields:e.nestedPickedFields+(t?1:0)}:e;if("type"in n&&"contentRelationship"===n.type){let{pickedFields:t,nestedPickedFields:i}=C(n,!0);return{pickedFields:e.pickedFields+t,nestedPickedFields:e.nestedPickedFields+i}}let{pickedFields:i,nestedPickedFields:l}=C(n,t);return{pickedFields:e.pickedFields+i,nestedPickedFields:e.nestedPickedFields+l}},{pickedFields:0,nestedPickedFields:0}):{pickedFields:0,nestedPickedFields:0}}function _(e){var t;return"Link"===e.type&&(null===(t=e.config)||void 0===t?void 0:t.select)==="document"}function F(e,t){var n;return _(e)&&1===y(null===(n=e.config)||void 0===n?void 0:n.customtypes,t).length}function I(e){return Object.values(e.json).flatMap(e=>Object.entries(e).flatMap(e=>{let[t,n]=e;return"Slices"!==n.type&&"Choice"!==n.type&&"UID"!==n.type&&"uid"!==t?[[t,n]]:[]}))}function T(e){return Object.fromEntries(I(e))}function E(e,t,n){var i,l;let r=e[t];if(void 0!==r&&"Group"===r.type)return null===(l=r.config)||void 0===l?void 0:null===(i=l.fields)||void 0===i?void 0:i[n]}function w(e){var t;return(null===(t=e.config)||void 0===t?void 0:t.fields)?Object.entries(e.config.fields).map(e=>{let[t,n]=e;return{fieldId:t,field:n}}):[]}function L(e){return"string"==typeof e?e:e.id}},38193:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var i=n(52322),l=n(61183);n(2784);var r=n(59326),o=n(75289);l.Z.registerLanguage("svelte",e=>({subLanguage:"xml",contains:[e.COMMENT("<!--","-->",{relevance:10}),{begin:/^(\s*)(<script(\s*context="module")?>)/gm,end:/^(\s*)(<\/script>)/gm,subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,contains:[{begin:/^(\s*)(\$:)/gm,end:/(\s*)/gm,className:"keyword"}]},{begin:/^(\s*)(<style.*>)/gm,end:/^(\s*)(<\/style>)/gm,subLanguage:"css",excludeBegin:!0,excludeEnd:!0},{begin:/\{/gm,end:/\}/gm,subLanguage:"javascript",contains:[{begin:/[\{]/,end:/[\}]/,skip:!0},{begin:/([#:\/@])(if|else|each|await|then|catch|debug|html)/gm,className:"keyword",relevance:10}]}]}));let a=["javascript","bash","xml","html","json"];var s=e=>{var t;let{children:n,lang:s,sx:d,codeStyle:c,codeClass:u,Header:p}=e,{theme:h}=(0,r.B7)(),m=s?l.Z.highlight(n,{language:"vue"===s?"html":s}).value:l.Z.highlightAuto(n,a).value;return(0,i.jsxs)(o.kC,{as:"pre",sx:d,children:[p?(0,i.jsx)(p,{}):null,(0,i.jsx)("code",{className:"hljs".concat(u?" ".concat(u):""),style:{overflowX:"auto",padding:"3px 5px",borderRadius:"6px",border:"1px solid",borderColor:String(null===(t=h.colors)||void 0===t?void 0:t.textClear),...c},dangerouslySetInnerHTML:{__html:m}})]})}},80575:function(e,t,n){"use strict";n.d(t,{J:function(){return o},k:function(){return r}});var i=n(52322);n(2784);var l=n(75289);let r=e=>{let{children:t,sx:n,...r}=e;return(0,i.jsx)(l.xu,{sx:{display:["block","block","flex"],flexWrap:"wrap",justifyContent:"space-between",...n},...r,children:t})},o=e=>{let{children:t,cols:n=2}=e;return(0,i.jsx)(l.xu,{sx:{flex:"0 ".concat(100/n-1,"%"),mb:1},children:t})}},90167:function(e,t,n){"use strict";n.d(t,{kp:function(){return d},sP:function(){return c},w8:function(){return u},Hq:function(){return h}});var i,l,r=n(52322),o=n(63397),a=n(2784),s=n(75289),d=e=>{let{field:t,meta:n,fieldName:i,label:l,focusOnNewEntry:d=!0,inputPlaceholder:c,buttonLabel:u}=e,[p,h]=(0,a.useState)(n.value.length),m=(0,a.useRef)(Array(n.value.length));return(0,a.useEffect)(()=>{m.current=m.current.slice(0,n.value.length)},[n.value.length]),(0,a.useEffect)(()=>{let e=m.current.length;d&&e>p&&m.current[e-1].focus(),h(e)},[m.current.length,d,p]),(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)(s.__,{variant:"label.primary",htmlFor:i,children:[l,n.touched&&n.error?(0,r.jsx)(s.xv,{as:"span",variant:"text.labelError",children:n.error}):null]}),(0,r.jsx)(o.F2,{name:i,id:i,...t,render:e=>(0,r.jsxs)("div",{children:[t.value&&t.value.length>0?t.value.map((t,n)=>(0,r.jsxs)(s.kC,{my:2,children:[(0,r.jsx)(s.II,{placeholder:c,name:"".concat(i,".").concat(n),value:t,ref:e=>m.current[n]=e,onChange:t=>{let{target:{value:i}}=t;return e.replace(n,i)}}),(0,r.jsx)(s.zx,{ml:2,type:"button",variant:"secondary",onClick:()=>e.remove(n),children:"-"})]},"".concat(i,"-").concat(+n+1))):null,(0,r.jsx)(s.zx,{type:"button",onClick:()=>e.insert(t.value.length,""),children:u})]})})]})},c=e=>{let{initialValues:t,meta:n,label:i,fieldName:l,onChange:a,...d}=e;return(0,r.jsxs)(s.__,{variant:"label.border",...d,children:[(0,r.jsx)(o.gN,{as:s.XZ,type:"checkbox",name:l,onChange:()=>a(!n.value),checked:n.value}),i]})},u=e=>{let{field:t,label:n,defaultValue:i,onChange:l,controlledValue:o,setControlledValue:s,buildControlledValue:d}=e,[u,p]=(0,a.useState)(i||t.defaultValue||!1);return(0,a.useEffect)(()=>{d?s(d(o,u)):s(d)},[u,o,d]),(0,r.jsx)(c,{meta:{value:u},fieldName:t.name,onChange:e=>p(e)&&l&&l(e),label:"function"==typeof n?n(o,u):n})};(i=l||(l={}))[i.ERROR=0]="ERROR",i[i.DISABLED=1]="DISABLED",i[i.WARNING=2]="WARNING";let p=e=>{let t={"&::placeholder":{color:"#C9D0D8"}};switch(e){case 1:return{...t,border:"1px solid #E6E6EA",backgroundColor:"#F3F5F7"};case 0:return{...t,border:"1px solid #E26049","&:focus":{outline:"none",borderColor:"#E26049",boxShadow:"0 0 0 3px rgba(226, 96, 73, 0.2), inset 0 1px 2px rgba(226, 96, 73, 0.2)"}};case 2:return{...t,border:"1px solid orange","&:focus":{outline:"none",borderColor:"orange",boxShadow:"0 0 0 3px rgba(255, 165, 0, 0.2), inset 0 1px 2px rgba(255, 165, 0, 0.2)"}};default:return t}},h=e=>{let{sx:t={},field:n,meta:i,formField:l,fieldName:a,fields:d,initialValues:c,isDisabled:u,autoFocus:h}=e,m=i.error?0:u||l.disabled?1:void 0;return(0,r.jsxs)(s.xu,{sx:t,children:[(0,r.jsxs)(s.__,{variant:"label.primary",htmlFor:a,children:[l.label||a,i.touched&&i.error?(0,r.jsx)(s.xv,{as:"span",variant:"text.labelError",children:i.error}):null]}),(0,r.jsx)(o.gN,{id:a,name:a,type:"text",placeholder:l.placeholder||l.label||a,...l.fieldLevelValidation&&c?{validate:e=>l.fieldLevelValidation&&l.fieldLevelValidation({value:e,fields:d,initialId:c.id})}:null,...n,as:s.II,sx:p(m),disabled:u||l.disabled,autoFocus:null!=h?h:l.autoFocus})]})}},70705:function(e,t,n){"use strict";var i=n(52322),l=n(2784),r=n(75289);let o=(0,l.forwardRef)((e,t)=>{let{children:n,Component:l=r.kC,sx:o={},...a}=e;return(0,i.jsx)(l,{as:"li",sx:{p:3,mx:3,alignItems:"center",variant:"styles.listItem",...o},ref:t,...a,children:n})});t.Z=o},86355:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var i=n(52322),l=n(11699),r=n(5446),o=n(2784),a=n(40023),s=n(951),d=n(8799),c=n(18978),u=n(59326),p=n(75289),h=n(70705),m=n(66770),f=n(33710),x=n(28316),g=n(65077);let v=e=>{let{children:t}=e;return(0,x.createPortal)((0,i.jsx)(g.xR,{children:t}),document.body)},b=e=>{let{text:t,as:n,sx:l={},...r}=e,a=(0,o.useRef)(null),[s,d]=(0,o.useState)(null),c=()=>{d(a.current&&a.current.offsetWidth<a.current.scrollWidth)};return(0,o.useEffect)(()=>(c(),window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c)}),[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.xv,{"data-for":t,"data-tip":!0,sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...l},as:n,ref:a,...r,children:t}),s&&(0,i.jsx)(v,{children:(0,i.jsx)(f.Z,{id:t,type:"dark",multiline:!0,border:!0,borderColor:"black",place:"bottom",effect:"solid",children:t})})]})};var y=e=>{var t,n;let{text:r,sliceFieldName:o,theme:a,WidgetIcon:s,widgetIconTooltip:d}=e;return(0,i.jsxs)(p.kC,{sx:{alignItems:"center",position:"relative"},children:[(0,i.jsx)(l.c3,{content:d,sideOffset:2,disableHoverableContent:!0,children:(0,i.jsx)(l.D,{margin:{right:8},children:(0,i.jsx)(s,{size:28,style:{color:null===(t=a.colors)||void 0===t?void 0:t.primary,borderRadius:"4px",padding:"4px",border:"2px solid",borderColor:null===(n=a.colors)||void 0===n?void 0:n.primary,flexShrink:0}})})}),(0,i.jsx)(b,{text:r,as:"p",sx:{py:0,px:1,fontWeight:"label",fontSize:"15px"},"data-testid":"field-name"}),(0,i.jsx)(p.xv,{as:"p",sx:{display:["none","none","initial"],fontSize:"14px",ml:1,color:"textClear",overflow:"hidden",textOverflow:"ellipsis"},"data-testid":"field-id",children:o})]})},j=function(e){let{item:t,index:n,deleteItem:f,enterEditMode:x,modelFieldName:g,renderFieldAccessor:v,HintElement:b,CustomEditElement:j,CustomEditElements:k,widget:S,draggableId:C,testId:_,isRepeatableCustomType:F,children:I}=e,{theme:T}=(0,u.B7)(),{key:E,value:{config:w,type:L}}=t,D=!!(("Link"===L||"Group"===L)&&(null==w?void 0:w.repeat));return(0,i.jsx)(o.Fragment,{children:(0,i.jsx)(a._l,{draggableId:C,index:n,children:e=>{var a,u,C,M,O;return(0,i.jsx)(o.Fragment,{children:(0,i.jsxs)(h.Z,{"data-testid":_,ref:e.innerRef,...e.draggableProps,Component:p.xu,sx:{p:0,mx:0,my:3},children:[(0,i.jsxs)(p.kC,{sx:{width:"100%"},children:[(0,i.jsx)(m.Z,{label:"Reorder slice field (drag and drop)",Icon:c.Fm7,color:null===(a=T.colors)||void 0===a?void 0:a.icons,mr:1,mt:3,...e.dragHandleProps}),(0,i.jsxs)(p.xu,{sx:{bg:"headSection",width:"100%",borderRadius:"3px",border:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.borders))}},children:[(0,i.jsxs)(p.kC,{sx:{p:3,alignItems:"center",justifyContent:"space-between",width:"100%"},children:[(0,i.jsx)(y,{theme:T,text:(null==w?void 0:w.label)||E,sliceFieldName:v&&v(E),WidgetIcon:S.Meta.icon,widgetIconTooltip:S.label}),(0,i.jsxs)(p.kC,{sx:{flex:"0 0 auto"},children:[D&&(0,i.jsx)(l.m,{title:"Repeatable",color:"purple",size:"medium",sx:{alignSelf:"center",marginInline:16}}),k||null,j||(0,i.jsx)(m.Z,{size:22,Icon:s.$iz,label:"Edit field",sx:{cursor:"pointer",color:null===(u=T.colors)||void 0===u?void 0:u.icons,flexShrink:0},onClick:()=>x([E,t.value],g,n)}),!(!0===F&&"UID"==L)&&(0,i.jsxs)(r.v2,{children:[(0,i.jsx)(r.j2,{className:"sliceMenuButton","data-testid":"field-menu-button",style:{padding:"0",cursor:"pointer",width:"32px",height:"32px",border:"none",background:"transparent",outline:"0"},children:(0,i.jsx)(d.FQA,{size:20,color:null===(C=T.colors)||void 0===C?void 0:C.icons,style:{pointerEvents:"none"}})}),(0,i.jsx)(r.qy,{style:{background:null===(M=T.colors)||void 0===M?void 0:M.gray,border:"1px solid",borderRadius:"3px",borderColor:null===(O=T.colors)||void 0===O?void 0:O.borders,outline:"0"},children:(0,i.jsx)(r.sN,{style:{padding:"6px",cursor:"pointer"},onSelect:()=>f(E),children:"Delete field"})})]})]})]}),b||null]})]}),I]})})}})})}},66770:function(e,t,n){"use strict";var i=n(52322),l=n(75289);let r=(e,t)=>t?{border:e=>{let{colors:t}=e;return"1px solid ".concat(t.error)}}:e?{border:e=>{let{colors:t}=e;return"1px solid ".concat(t.primary)}}:{border:e=>{let{colors:t}=e;return"1px solid ".concat(t.borders)}};t.Z=e=>{let{sx:t=null,onClick:n=()=>null,label:o,Icon:a,error:s=null,size:d=16,fitButton:c=!1,active:u=!1,useActive:p=!1,activeSx:h=r,...m}=e;return(0,i.jsx)(l.hU,{onClick:n,"aria-label":o,type:"button",sx:{...c?{width:d,height:d}:null,...p&&h(u,s),...t},...m,children:(0,i.jsx)(a,{size:d})})}},89280:function(e,t,n){"use strict";var i=n(52322),l=n(63397),r=n(2784),o=n(75289),a=n(90167),s=n(79256);t.Z=e=>{let{fieldName:t,formField:n,fields:d,initialValues:c,autoFocus:u}=e,[p,h,m]=(0,l.U$)(t),f=n.component;return(0,i.jsx)(o.xu,{sx:{mt:2,alignItems:"center",...n.type===s.h.CHECKBOX?{display:"flex",height:"130%"}:null},children:f?(0,i.jsx)(f,{meta:h,field:p,helpers:m,fieldName:t,formField:n,initialValues:c}):(0,i.jsxs)(r.Fragment,{children:[n.type===s.h.INPUT?(0,i.jsx)(a.Hq,{meta:h,field:p,fields:d,formField:n,fieldName:t,initialValues:c,autoFocus:u}):null,n.type===s.h.CHECKBOX&&(0,i.jsx)(a.sP,{meta:h,label:n.label,fieldName:t,initialValues:c,onChange:e=>m.setValue(e)})]})})}},3285:function(e,t,n){"use strict";n.d(t,{Z:function(){return A}});var i=n(52322),l=n(37149),r=n.n(l),o=n(56580),a=n(59326),s=n(75289),d=n(65413),c=n(30527),u=n(2784),p=n(92928);let h=e=>{let{children:t,...n}=e;return(0,i.jsx)(s.xu,{as:"ul",sx:{p:0,m:0,px:e=>"calc(".concat(e.space[3],"px + 8px)"),borderBottom:"1px solid #DFE1E5",position:"relative"},...n,children:t})};h.tabsRole="TabList";let m=e=>{let{children:t,...n}=e,{theme:l}=(0,a.B7)();return(0,i.jsx)(p.OK,{...n,style:{margin:"0 32px 0 0",top:"0",padding:"8px 0px",border:"none",bottom:"-1px",opacity:"0.8",transition:"all 150ms cubic-bezier(0.215,0.60,0.355,1)",borderRadius:"0",...n.selected?{borderBottom:"3px solid ".concat(l.colors.primary),color:l.colors.text,fontWeight:"500",opacity:"1",backgroundColor:"transparent"}:{borderBottom:"3px solid transparent"}},children:t})};m.tabsRole="Tab";var f=(0,u.memo)(e=>{let{children:t,Footer:n,Header:l,tabs:r,bodySx:o,footerSx:a,defaultIndex:d=0}=e,[f,x]=(0,u.useState)(d);return(0,i.jsx)(c.Z,{borderFooter:!0,footerSx:{p:0,...a},bodySx:{p:0,...o},sx:{border:"none"},Header:l,Footer:n,children:(0,i.jsxs)(p.mQ,{defaultIndex:d,onSelect:e=>x(e),children:[(0,i.jsx)(h,{children:(r||[]).map(e=>(0,i.jsx)(m,{children:e},e))}),u.Children.map(t,(e,t)=>(0,i.jsx)(s.xu,{sx:{p:e=>"calc(".concat(e.space[3],"px + 8px)"),display:t===f?"block":"none"},children:(0,i.jsx)(p.x4,{children:e})}))]})})}),x=n(80575),g=e=>{var t,n;let{text:l,sliceFieldName:r,theme:o,WidgetIcon:a}=e;return(0,i.jsxs)(s.kC,{sx:{alignItems:"center"},children:[(0,i.jsx)(a,{size:28,style:{color:null===(t=o.colors)||void 0===t?void 0:t.primary,marginRight:"8px",borderRadius:"4px",padding:"4px",border:"2px solid",borderColor:null===(n=o.colors)||void 0===n?void 0:n.primary}}),(0,i.jsx)(s.xv,{as:"p","data-testid":"item-header-text",sx:{py:0,px:1,fontWeight:"label",fontSize:"15px"},children:l}),(0,i.jsx)(s.xv,{as:"p",sx:{display:["none","none","initial"],fontSize:"14px",ml:1,color:"textClear"},children:r})]})},v=n(55862),b=n(68169),y=n(5632),j=n(65186),k=n(7974);let S=()=>{let e=(0,y.useRouter)();return(0,i.jsxs)(s.xu,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:"60px"},children:[(0,i.jsx)(j.wr$,{size:48,color:"#C9D0D8"}),(0,i.jsx)(s.xu,{sx:{height:"12px"}}),(0,i.jsx)(s.xv,{color:"text",sx:{fontWeight:600,fontSize:"24px",lineHeight:"32px",textAlign:"center"},children:"Your mock data has moved"}),(0,i.jsx)(s.xu,{sx:{height:"8px"}}),(0,i.jsx)(s.xv,{color:"text",sx:{fontWeight:400,fontSize:"14px",lineHeight:"24px",textAlign:"center"},children:"You can now edit directly your mock data in the new Slice Simulator."}),(0,i.jsx)(s.xu,{sx:{height:"24px"}}),(0,i.jsx)(s.zx,{onClick:t=>{t.preventDefault(),window.open("".concat(e.asPath,"/simulator"),k.pq)},children:"Go to the Slice Simulator"})]})};var C=n(16442),_=n(45440),F=n(16086),I=n(78254),T=n(23134),E=n(89280),w=n(63397),L=n(358);function D(){let[{value:e}]=(0,w.U$)("config.label"),[{value:t},n,i]=(0,w.U$)("id"),l=(0,u.useRef)(null!=n.initialValue&&n.initialValue.length>0);(0,u.useEffect)(()=>{l.current||null==e||i.setValue((0,L.lV)(e),!1)},[e]),(0,u.useEffect)(()=>{let n=null==t||0===t.length;if(l.current){if(!n)return;l.current=!1}else n||null!=e&&t===(0,L.lV)(e)||(l.current=!0)},[t])}var M=(0,u.memo)(e=>{let{formId:t,initialValues:n,validationSchema:l,onSave:r,FormFields:o,children:a}=e;return(0,i.jsx)(s.xu,{children:(0,i.jsx)(w.J9,{initialValues:n,validationSchema:l,onSubmit:(e,t)=>{let{id:n,...i}=e;r({newKey:n,value:Object.entries(i).reduce((e,t)=>{let[n,i]=t;if(typeof i!==Boolean&&!i){var l;let t=null===(l=o[n])||void 0===l?void 0:l.defaultValue;if(void 0!==t)return{...e,[n]:t}}return{...e,[n]:i}},{})})},children:e=>(0,i.jsxs)(w.l0,{id:t,children:[(0,i.jsx)(D,{}),a({...e,initialValues:n})]})})})});function O(e){let{children:t}=e,n=(0,c.W)();return(0,i.jsx)(s.kC,{sx:{position:"sticky",zIndex:1,top:0,p:3,bg:"headSection",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:n,borderTopRightRadius:n},children:t})}r().setAppElement("#__next");var A=e=>{let{close:t,data:n,fields:l,onSave:r,zoneType:c}=e,{theme:u}=(0,a.B7)(),p=(0,o.v9)(I.Ch).filter(C.TG);if(!n.isOpen)return null;let{field:[h,m]}=n,y=(0,T.t)(_.C,m.config,m.type);if(!y)return(0,i.jsxs)("div",{children:[m.type," not found"]});let{Meta:{icon:j},FormFields:k,Form:w,schema:L,label:D}=y,A={...(0,b.f7)((0,F.B9)(k,"id")),...y.prepareInitialValues?y.prepareInitialValues(p,m.config):m.config},{res:N,err:R}=(()=>{try{return{res:L.validateSync({type:m.type,config:A},{stripUnknown:!0})}}catch(e){return{err:e}}})();R&&(console.error("[EditModal] Failed to validate field of type ".concat(m.type,".\n Please update model.json accordingly.")),console.error(R));let P={id:h,config:N?N.config:A},[q,z]=k.id.validate.matches,V=d.object().shape({id:d.string().matches(q,z).min(3).max(35).required(),config:L.fields.config}),B="".concat("edit-modal-form","-").concat(Math.random().toString());return(0,i.jsx)(v.Z,{isOpen:!0,shouldCloseOnOverlayClick:!0,onRequestClose:t,contentLabel:"Widget Form Modal",children:(0,i.jsx)(M,{apiId:h,formId:B,initialValues:P,validationSchema:V,FormFields:k,onSave:e=>{let{newKey:n,value:i}=e;r({apiId:h,newKey:n,value:{...m,...i},updateMeta:{fieldIdChanged:{previousPath:[h],newPath:[n]}}}),t()},children:e=>{let{isValid:n,isSubmitting:r,initialValues:o}=e,a=w?(0,i.jsx)(w,{...e,fields:l},"field-model-tab-content"):(0,i.jsx)(x.k,{children:Object.entries(k).map(e=>{let[t,n]=e;return(0,i.jsx)(x.J,{children:(0,i.jsx)(E.Z,{fieldName:(0,b.lm)(t),formField:n,fields:l,initialValues:o,autoFocus:""===h&&void 0})},t)})},"field-model-tab-content"),d=["Field Model"],p=[a];if("slice"===c){let e=(0,i.jsx)(s.xu,{children:(0,i.jsx)(S,{})},"mock-data-tab-content");d.push("Mock Data"),p.push(e)}return(0,i.jsx)(f,{borderFooter:!0,footerSx:{position:"sticky",bottom:0,p:0},tabs:d,Header:(0,i.jsxs)(O,{children:[(0,i.jsx)(g,{theme:u,text:D,WidgetIcon:j}),(0,i.jsx)(s.x8,{onClick:t,type:"button"})]}),Footer:(0,i.jsxs)(s.kC,{sx:{position:"sticky",bottom:0,alignItems:"space-between",bg:"headSection",p:3},children:[(0,i.jsx)(s.xu,{sx:{ml:"auto"}}),(0,i.jsx)(s.zx,{mr:2,type:"button",onClick:t,variant:"secondary",children:"Cancel"}),(0,i.jsx)(s.zx,{form:B,type:"submit",disabled:!n&&r,sx:{fontWeight:"400",paddingBlock:"8px",paddingInline:"16px",fontSize:"14px",borderRadius:"4px"},children:"Done"})]}),children:p})}})})}},16182:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var i=n(52322),l=n(2784),r=n(49857),o=n(11699);function a(e){return e.show?(0,i.jsx)(o.D,{padding:{block:8,inline:16},border:{top:!0},borderColor:"grey6",children:(0,i.jsxs)(o.bL,{variant:"normal",color:"grey11",children:["No code snippet for this field."," ",(0,i.jsx)(o.bL,{component:"a",href:"https://prismic.io/docs/fields/content-relationship",rel:"noopener noreferrer",target:"_blank",color:"grey11",underline:!0,children:"Check the docs"})," ","for an example."]})}):null}var s=n(80148),d=n(77245),c=n(8799),u=n(65186),p=n(59326),h=n(75289),m=n(38193);let f={position:"relative",top:"3px"};var x=e=>{var t,n,r;let{code:o,lang:a}=e,{theme:s}=(0,p.B7)(),[x,g]=(0,l.useState)(!1);return o?(0,i.jsxs)(h.kC,{sx:{p:2,px:3,alignItems:"center",borderTop:"1px solid",borderColor:"borders",justifyContent:"space-between"},children:[(0,i.jsxs)(h.kC,{sx:{alignItems:"center",display:["none","none","flex"],maxWidth:"80%"},children:[(0,i.jsx)(c.vcz,{size:26,color:null==s?void 0:null===(t=s.colors)||void 0===t?void 0:t.icons,style:{border:"1px solid",borderColor:null==s?void 0:null===(n=s.colors)||void 0===n?void 0:n.borders,borderRadius:"3px",padding:"4px",marginRight:"2px"}}),(0,i.jsx)(m.Z,{sx:{margin:"0px 8px",border:"none",borderRadius:"3px",fontSize:"13px"},lang:a,children:o})]}),(0,i.jsx)(h.xu,{children:(0,i.jsxs)(h.zx,{"aria-label":x?"Code snippet copied":"Copy code snippet",onClick:()=>{o&&navigator.clipboard.writeText(o).then(()=>{g(!0),setTimeout(()=>{g(!1)},1200)})},variant:"textButton",children:[x?(0,i.jsx)(u.HhX,{size:16,color:null==s?void 0:null===(r=s.colors)||void 0===r?void 0:r.success,style:f}):(0,i.jsx)(d.LhG,{size:16,style:f}),(0,i.jsx)(h.xv,{as:"span",sx:{display:["none","inline","none","inline"]},children:"\xa0Copy"})]})})]}):null};let g=e=>{let{show:t,renderHintBase:n,item:l,hintItemName:o}=e,a=n({item:l}),d=[a];if("Link"===l.value.type){var c,u,p,h,m;null!==(h=null===(c=l.value.config)||void 0===c?void 0:c.allowText)&&void 0!==h&&h&&d.push("allowText"),null!==(m=null===(u=l.value.config)||void 0===u?void 0:u.repeat)&&void 0!==m&&m&&d.push("repeat"),(null===(p=l.value.config)||void 0===p?void 0:p.variants)&&d.push("variants")}let{data:f,error:g}=(0,r.ZP)(d.join("$"),async()=>await s.managerClient.snippets.readSnippets({fieldPath:a.split("."),model:l.value,itemName:o}));if(g&&console.error(g),!f||g)return null;let v=f.snippets||[];return v[0]?(0,i.jsx)("div",{style:{display:t?"initial":"none"},children:(0,i.jsx)(x,{code:v[0].code,lang:v[0].language})}):null};var v=e=>{var t;let{item:n}=e;return"Link"===n.value.type&&(null===(t=n.value.config)||void 0===t?void 0:t.select)==="document"?(0,i.jsx)(a,{show:e.show}):(0,i.jsx)(g,{...e})}},40141:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var i=n(52322),l=n(11699),r=n(13980),o=n(2784),a=n(65077),s=n(94160),d=n(35289),c=n(6882),u=n(6609);function p(e){let{open:t,onOpenChange:n,onConfirm:r}=e;return(0,i.jsxs)(l.ae,{open:t,onOpenChange:n,size:"small",children:[(0,i.jsx)(l.al,{title:"Static zone"}),(0,i.jsx)(l.aj,{children:(0,i.jsx)(l.bn,{children:(0,i.jsxs)(l.D,{as:"article",flexDirection:"column",padding:16,gap:4,children:[(0,i.jsx)(l.bL,{sx:{marginBottom:4},color:"purple9",variant:"smallBold",children:"About"}),(0,i.jsx)(l.bL,{variant:"h3",children:"What is the static zone?"}),(0,i.jsx)(l.bL,{color:"grey11",children:"The static zone in Prismic page types contain fields that are always present on the page. Use it for essential information like a page's title, page design settings, or metadata. Unlike slices, which can be added or removed, static zone fields remain fixed."}),(0,i.jsx)(l.c8,{src:"https://res.cloudinary.com/dmtf1daqp/video/upload/v1723540305/DEV_TOOLS/STATES/Explication_vide%CC%81o_zone_statique_phibeq.mp4",sizing:"contain",autoPlay:!0,loop:!0})]})})}),(0,i.jsx)(l.ah,{children:(0,i.jsx)(l.af,{size:"medium",sx:{flexGrow:1},onClick:()=>{r(),n(!1)},children:"Got it"})})]})}var h=n(76611),m=n(5683);let f=(0,o.forwardRef)((e,t)=>{var n;return(0,i.jsx)(l.E,{...e,ref:t,startIcon:"add",color:"grey","aria-label":"Add a field","data-testid":null!==(n=e["data-testid"])&&void 0!==n?n:"add-field"})});function x(e){let{zoneTypeFormat:t,...n}=e;return"page"===t?(0,i.jsx)(v,{...n}):(0,i.jsx)(b,{...n})}let g=(0,i.jsx)("div",{style:{position:"absolute",bottom:0,right:0}});function v(e){let{disabled:t,fields:n,triggerDataTestId:r,onSelectField:a}=e,[s,d]=(0,o.useState)(!1),[c,x]=(0,o.useState)(!1),[v,b]=(0,h.V)(m.vm,!1);return(0,i.jsxs)(l.D,{position:"relative",children:[(0,i.jsx)(f,{onClick:()=>{v?d(!0):x(!0)},"data-testid":r}),(0,i.jsx)(p,{open:c,onOpenChange:e=>{x(e),e||d(!0)},onConfirm:()=>b(!0)}),(0,i.jsx)(u.S,{open:s,onOpenChange:d,disabled:t,onSelectField:a,fields:n,trigger:g})]})}function b(e){let{disabled:t,fields:n,triggerDataTestId:l,onSelectField:r}=e;return(0,i.jsx)(u.S,{disabled:t,onSelectField:r,fields:n,trigger:(0,i.jsx)(f,{"data-testid":l})})}var y=n(45440),j=n(49919),k=n(40023),S=n(75289),C=n(70705),_=n(86355),F=n(23134),I=n(16182),T=e=>{let{fields:t,title:n,tabId:l,enterEditMode:r,enterSelectMode:o,onDragEnd:a,renderFieldAccessor:s,onDeleteItem:d,onSave:c,showHints:u,renderHintBase:p,isRepeatable:h,testId:m,isRepeatableCustomType:f}=e;return(0,i.jsx)(k.Z5,{onDragEnd:a,children:(0,i.jsx)(k.bK,{droppableId:n,children:(e,n)=>(0,i.jsxs)(S.xu,{as:"ul",ref:e.innerRef,...e.droppableProps,"data-testid":m,sx:{paddingInline:"16px !important"},children:[t.map((e,t)=>{let{value:{config:a,type:m}}=e,x=(0,F.t)(y.C,a,m);if(!x)return(0,i.jsx)(C.Z,{children:(0,i.jsxs)(S.xv,{children:['Field type "',m,'" not supported']})});let g={item:e,index:t,tabId:l,widget:x,showHints:u,key:e.key,enterSelectMode:o,renderFieldAccessor:s,enterEditMode:r,parentSnapshot:n,deleteItem:d,saveItem:c,draggableId:"list-item-".concat(e.key),isRepeatableCustomType:f,testId:"list-item-".concat(e.key)},v=(0,i.jsx)(I.Z,{item:e,show:u,isRepeatable:h,renderHintBase:p,hintItemName:x.hintItemName,Widgets:y.C,typeName:x.CUSTOM_NAME||x.TYPE_NAME});if(x.CustomListItem){let{CustomListItem:e}=x;return(0,i.jsx)(e,{...g,HintElement:v})}return(0,i.jsx)(_.Z,{...g,HintElement:v})}),e.placeholder]})})})},E=n(644),w=n.n(E);let L=e=>{let{zoneType:t,heading:n="Your ".concat(t," has no fields yet"),action:r}=e;return(0,i.jsxs)("div",{className:w().root,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(l.bL,{variant:"bold",children:n}),(0,i.jsx)(l.bL,{color:"grey11",children:"A field is an input for content (e.g. text, images, links)."})]}),r]})},D=e=>{let t,{zoneType:n,zoneTypeFormat:r,tabId:p,title:h,fields:m,poolOfFieldsToCheck:f,widgetsArray:g,isRepeatable:v,onDeleteItem:b,onDragEnd:k,EditModal:S,onSave:C,dataTip:_,renderHintBase:F,renderFieldAccessor:I,testId:E,isRepeatableCustomType:w,emptyStateHeading:D}=e,M=(()=>{let e=!!Object.entries(f).find(e=>{let[,{value:t}]=e;return"UID"===t.type}),t=g.filter(e=>{let{TYPE_NAME:t}=e;return"UID"!==t});return e?t:[...t,g.find(e=>{let{TYPE_NAME:t}=e;return"UID"===t})]})(),[O,A]=(0,o.useState)(!1),[N,R]=(0,o.useState)({isOpen:!1}),P={onSelectField:e=>{R({isOpen:!0,field:["",y.C[e].create("")]})},fields:M.filter(Boolean).map(e=>{let{TYPE_NAME:t,CUSTOM_NAME:n}=e;return c.XU.find(e=>e.type===t&&(void 0===n||e.variant===n))}),triggerDataTestId:v?"add-field-in-items":void 0};return"slice"===n&&m.length>0?t=(0,i.jsx)(u.S,{...P}):"customType"===n&&(t=(0,i.jsx)(x,{...P,zoneTypeFormat:r})),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.Bu,{actions:(0,i.jsxs)(i.Fragment,{children:[m.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.bL,{color:"grey11",component:"span",noWrap:!0,children:"Show code snippets?"}),(0,i.jsx)(l.bC,{checked:O,onCheckedChange:A,size:"small",style:{flexShrink:0},"data-testid":"code-snippets-switch"})]}),t]}),children:h}),0===m.length&&"slice"===n?(0,i.jsx)(L,{zoneType:"customType"===n?"page"===r?"page type":"custom type":n,heading:D,action:(0,i.jsx)(u.S,{...P})}):m.length>0?(0,i.jsx)(a.xR,{children:(0,i.jsx)(T,{tabId:p,isRepeatable:v,fields:m,showHints:O,dataTip:_,title:h,renderFieldAccessor:I,renderHintBase:F,enterEditMode:e=>{R({isOpen:!0,field:e});let[t,n]=e;s.Xe.track({event:"field:settings-opened",id:t,name:n.config.label,type:n.type,isInAGroup:!1,contentType:(0,j.T)(window.location.pathname)})},onDragEnd:k,onDeleteItem:b,onSave:C,testId:E,isRepeatableCustomType:w})}):void 0,(0,i.jsx)(S,{data:N,close:()=>{R({isOpen:!1})},onSave:C,fields:f,zoneType:n})]})};D.propTypes={isRepeatable:r.bool,title:r.string.isRequired,dataTip:r.string.isRequired,onSave:r.func.isRequired,onDragEnd:r.func.isRequired,onDeleteItem:r.func.isRequired,poolOfFieldsToCheck:(0,r.arrayOf)((0,r.shape)({key:r.string,value:r.object})),renderHintBase:r.func.isRequired,renderFieldAccessor:r.func.isRequired,widgetsArray:r.array.isRequired,fields:(0,r.arrayOf)((0,r.shape)({key:r.string.isRequired,value:(0,r.shape)({config:r.object,fields:r.array,type:r.string.isRequired})}))};var M=D},23134:function(e,t,n){"use strict";n.d(t,{t:function(){return l}});var i=n(59050);let l=(e,t,n)=>{if("Link"===n)switch(null==t?void 0:t.select){case"document":return e.ContentRelationship;case"media":return e.LinkToMedia;default:return e.Link}if(n===i.GroupFieldType){var l;return null!==(l=e.Group)&&void 0!==l?l:e.NestedGroup}return e[n]}},9889:function(e,t,n){"use strict";n.d(t,{Jp:function(){return o},OR:function(){return r}});var i=n(7974),l=n(49046);let r={label:(0,l.II)("Label",{required:"This field is required",max:!0},void 0,void 0,"Label for content creators (defaults to field type)",!0),id:(0,l.II)("API ID*",{min:!0,max:!0,required:"This field is required",matches:[i.xo,"No special characters allowed (except _)"]},e=>{let{value:t,fields:n,initialId:i}=e;return t?n.find(e=>{let{key:n}=e;return n===t})&&t!==i?'Field "'.concat(t,'" already exists.'):void 0:"Field is required"},void 0,"A unique identifier for the field (e.g. buttonLink)")},o={...r,placeholder:(0,l.II)("Placeholder",{required:"This field is required",max:[100,"String is too long. Max: 100"]},void 0,void 0,"Placeholder text for content creators")}},49046:function(e,t,n){"use strict";n.d(t,{II:function(){return d},Jg:function(){return r}});var i=n(68169),l=n(79256);let r=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return{type:l.h.CHECKBOX,validate:{required:(0,i.MJ)(t,s)},required:t,label:e,defaultValue:n,yupType:"boolean"}},o=[3,"String is too short. Min: 3"],a=[35,"String is too long. Max: 35"],s=["Field is required"],d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{min:o,max:a,required:s},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,d=arguments.length>4?arguments[4]:void 0,c=arguments.length>5&&void 0!==arguments[5]&&arguments[5],{min:u,max:p,required:h,matches:m}=t||{};return{type:l.h.INPUT,label:e,validate:{required:(0,i.MJ)(h,s),min:(0,i.MJ)(u,o),max:(0,i.MJ)(p,a),matches:m},defaultValue:r,fieldLevelValidation:n,yupType:"string",placeholder:d,autoFocus:c}}},68169:function(e,t,n){"use strict";n.d(t,{MJ:function(){return a},f7:function(){return s},gc:function(){return d},lm:function(){return o}});var i=n(65413),l=n(79256);let r=e=>null===e.defaultValue?void 0:void 0!==e.defaultValue?e.defaultValue:e.type===l.h.CHECKBOX||(e.type===l.h.INPUT?"":e.type===l.h.SELECT?[]:void 0),o=e=>"id"===e?"id":"config.".concat(e),a=(e,t)=>Array.isArray(e)?e:"boolean"==typeof e&&e?t:null,s=e=>Object.entries(e).reduce((e,t)=>{let[n,i]=t,l=r(i);return void 0!==l?{...e,[n]:l}:e},{}),d=e=>i.object().shape(Object.entries(e).filter(e=>e).reduce((e,t)=>{let[n,l]=t,{validate:r,yupType:o}=l;if(!r)return e;if("function"==typeof r)return{...e,[n]:r(n,l)};let a=i[o]();return Object.entries(r).filter(e=>e&&e[1]).forEach(e=>{let[t,i]=e;if(i&&a[t]){a=a[t](...Array.isArray(i)?i:[i]);return}console.warn('Invalid Yup validator for field "'.concat(n,'"'))}),{...e,[n]:a}},{})).required().default(void 0).noUnknown(!0)},79256:function(e,t,n){"use strict";var i,l;n.d(t,{h:function(){return i}}),(l=i||(i={})).CHECKBOX="checkbox",l.INPUT="input",l.SELECT="select"},45440:function(e,t,n){"use strict";n.d(t,{C:function(){return tc}});var i=n(52322),l=n(96317),r=n(65186),o=n(65413),a=n(6882),s=n(75289),d=n(80575),c=n(89280),u=n(68169),p=n(9889),h=n(49046);let m={...p.OR,repeat:(0,h.Jg)("Repeatable",!1,!0)};var f=e=>{let{initialValues:t,fields:n,values:l,setFieldValue:r}=e,{config:{repeat:o}}=l;return(0,i.jsxs)(d.k,{children:[Object.entries(m).filter(e=>{let[t]=e;return"repeat"!==t}).map(e=>{let[l,r]=e;return(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)(l),formField:r,fields:n,initialValues:t})},l)}),(0,i.jsx)(d.J,{children:(0,i.jsx)(s.xu,{sx:{mt:2,alignItems:"center",display:"flex",height:"130%"},children:(0,i.jsxs)(s.__,{variant:"label.border",sx:{mb:0},children:[(0,i.jsx)(s.XZ,{checked:o,onChange:()=>r("config.repeat",!o)}),"Repeatable"]})})})]})};let x={icon:r.iy3},g=e=>o.object().shape({type:o.string().matches(e,{excludeEmptyString:!0}).required(),config:o.object().shape({fields:o.array(),label:o.string(),repeat:o.boolean().optional()})});function v(e){let{schemaTypeRegex:t,customListItem:n,customName:i,hintItemName:l}=e;return{Meta:x,Form:f,FormFields:m,schema:g(t),create:e=>({type:"Group",config:{label:e,repeat:!0,fields:[]}}),CustomListItem:n,TYPE_NAME:"Group",CUSTOM_NAME:i,hintItemName:l,label:a.U.name}}var b=n(59050),y=n(2784),j=n(40023),k=n(28316),S=n(94160),C=n(6609),_=n(86355),F=n(3285),I=n(16182),T=n(23134),E=n(49219),w=n(16086),L=n(358),D=n(49919),M=n(5495),O=n(39302);let A=e=>{let{tabId:t,widget:n,Widgets:l,widgetsArray:r,hintBase:o,parentSnapshot:d,showHints:c,isRepeatable:u,item:p,draggableId:h,saveItem:m,HintElement:f,...x}=e,[g,v]=(0,y.useState)({isOpen:!1}),A=e=>{var t;let{apiId:n,value:i}=e;null===(t=i.config)||void 0===t||t.label;let l=function(e){var t,n,i;let l=structuredClone(e.group);return null!==(n=l.config)&&void 0!==n||(l.config={}),null!==(i=(t=l.config).fields)&&void 0!==i||(t.fields={}),l.config.fields[e.fieldId]=e.field,l}({group:E.Fl.fromSM(p.value),fieldId:n,field:i});m({apiId:p.key,newKey:p.key,value:E.Fl.toSM(l),inGroupFieldAction:"add"}),(0,M.V)({id:n,field:i,isInAGroup:!0})},N=e=>{let{apiId:t,newKey:n,value:i}=e,l=i.type===b.GroupFieldType?E.Fl.fromSM(i):i,r=function(e){var t,n;let i=structuredClone(e.group);if(!(null===(t=i.config)||void 0===t?void 0:t.fields)||!(null===(n=e.group.config)||void 0===n?void 0:n.fields))return i;for(let t in i.config.fields={},e.group.config.fields)t===e.previousFieldId?i.config.fields[e.newFieldId]=e.field:i.config.fields[t]=e.group.config.fields[t];return i}({group:E.Fl.fromSM(p.value),previousFieldId:t,newFieldId:n,field:l});m({apiId:p.key,newKey:p.key,value:E.Fl.toSM(r),inGroupFieldAction:"update",updateMeta:{fieldIdChanged:{previousPath:[p.key,t],newPath:[p.key,n]}}}),(0,O.Z)({previousId:t,id:n,field:l,isInAGroup:!0})},R=e=>{let t=function(e){var t,n;let i=structuredClone(e.group);return null===(n=i.config)||void 0===n||null===(t=n.fields)||void 0===t||delete t[e.fieldId],i}({group:E.Fl.fromSM(p.value),fieldId:e});m({apiId:p.key,newKey:p.key,value:E.Fl.toSM(t)})},P=e=>{v({isOpen:!0,field:e});let[t,n]=e;S.Xe.track({event:"field:settings-opened",id:t,name:n.config.label,type:n.type,isInAGroup:!0,contentType:(0,D.T)(window.location.pathname)})};return(0,i.jsxs)(y.Fragment,{children:[(0,i.jsx)(_.Z,{item:p,widget:n,draggableId:h,...x,HintElement:f,CustomEditElements:[(0,i.jsx)(C.S,{onSelectField:e=>{v({isOpen:!0,field:["",l[e].create("")]})},fields:r.filter(Boolean).map(e=>{let{TYPE_NAME:t,CUSTOM_NAME:n}=e,i=a.XU.find(e=>e.type===t&&(void 0===n||e.variant===n));if(!i)throw Error("Field not found for widget: ".concat(t," - ").concat(n));return i})},"add-field-dropdown")],children:(0,i.jsx)(s.xu,{sx:{ml:4},children:(0,i.jsx)(j.Z5,{onDragEnd:e=>{if((0,w.uS)(e))return;let{source:t,destination:n}=e;if(!n)return;let{index:i}=t,{index:l}=n,r=function(e){var t;let n=structuredClone(e.group);if(!(null===(t=n.config)||void 0===t?void 0:t.fields))return n;let i=Object.entries(n.config.fields),[l]=i.splice(e.sourceIndex,1);return i.splice(e.destinationIndex,0,l),n.config.fields=Object.fromEntries(i),n}({group:E.Fl.fromSM(p.value),sourceIndex:i,destinationIndex:l});(0,k.flushSync)(()=>{m({apiId:p.key,newKey:p.key,value:E.Fl.toSM(r)})})},children:(0,i.jsx)(j.bK,{droppableId:"".concat(t,"-").concat(p.key,"-zone"),children:e=>(0,i.jsxs)("ul",{ref:e.innerRef,...e.droppableProps,children:[p.value.config.fields.map((e,t)=>{let{value:{config:n,type:r}}=e,a=(0,T.t)(l,n,r);if(!a)return null;let s={item:e,index:t,widget:a,key:e.key,enterEditMode:P,deleteItem:R,saveItem:N,showHints:c,renderFieldAccessor:t=>"item".concat((0,L.Ti)(e.key)),draggableId:"group-".concat(p.key,"-").concat(e.key,"-").concat(t),testId:"list-item-group-".concat(p.key,"-").concat(e.key)},d=(0,i.jsx)(I.Z,{item:e,show:c,isRepeatable:u,renderHintBase:e=>{let{item:t}=e;return"".concat(o).concat((0,L.Ti)(t.key))},hintItemName:a.hintItemName,Widgets:l,typeName:a.CUSTOM_NAME||a.TYPE_NAME});if(a.CustomListItem){let{CustomListItem:e}=a;return(0,i.jsx)(e,{...s,HintElement:d})}return(0,i.jsx)(_.Z,{...s,HintElement:d})}),e.placeholder]})})})})}),(0,i.jsx)(F.Z,{data:g,close:()=>{v({isOpen:!1})},onSave:e=>""===e.apiId?A({...e,apiId:e.newKey}):N(e),fields:p.value.config.fields})]})},N={icon:r.hs8},R={label:p.Jp.label,id:p.Jp.id,placeholder_false:(0,h.II)("False Placeholder",{required:!1},null,"false","Value the content creator sees (Output as 'false' in the API)."),placeholder_true:(0,h.II)("True Placeholder",{required:!1},null,"true","Value the content creator sees (Output as 'true' in the API)"),default_value:(0,h.Jg)("Default to true")},P={TYPE_NAME:"Boolean",create:e=>({type:"Boolean",config:{label:e,default_value:!1,placeholder_true:"true",placeholder_false:"false"}}),Meta:N,schema:o.object().shape({type:o.string().matches(/^Boolean$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,w.B9)(R,"id"))}),FormFields:R,label:a.Qr.name},q={icon:r.U8L},{TYPE_NAME:z,FormFields:V,schema:B}=(0,w.zg)("Color"),G={create:e=>({type:"Color",config:{label:e,placeholder:""}}),FormFields:V,TYPE_NAME:z,schema:B,Meta:q,label:a.pG.name};var U=n(11699),J=n(63397);function Z(e){let{checked:t,height:n=130,setFieldValue:l}=e,[r,o]=(0,y.useState)(null);return(0,i.jsx)(d.J,{children:(0,i.jsx)(s.kC,{sx:{mt:2,alignItems:"center",height:"".concat(n,"%")},children:(0,i.jsx)(s.__,{variant:"label.border",children:(0,i.jsxs)(U.D,{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",ref:o,children:[(0,i.jsxs)(s.kC,{children:[(0,i.jsx)(s.XZ,{checked:t,onChange:e=>{l("config.allowText",e.target.checked)}}),"Allow display text"]}),(0,i.jsx)(U.c3,{container:r,align:"end",content:"Allow editors to customize the link display text",children:(0,i.jsx)(U.aX,{name:"alert",size:"medium",color:"grey11"})})]})})})})}function H(e){let{checked:t,setFieldValue:n}=e;return(0,i.jsxs)(U.D,{flexDirection:"column",children:[(0,i.jsx)(s.__,{htmlFor:"repeat",variant:"label.primary",children:"Repeatable"}),(0,i.jsxs)(s.__,{variant:"label.border",sx:{display:"flex"},children:[(0,i.jsx)(s.XZ,{name:"repeat",checked:t,onChange:e=>{n("config.repeat",e.target.checked)}}),"Make this link repeatable (allows editors to create lists of links)"]}),(0,i.jsxs)(U.D,{alignItems:"center",gap:4,children:[(0,i.jsx)(U.aX,{name:"alert",size:"medium",color:"grey11"}),(0,i.jsxs)(U.bL,{variant:"normal",color:"grey11",children:["Repeatable link fields are returned as an array of links by the API."," ",(0,i.jsx)("a",{href:"https://prismic.io/docs/field",style:{textDecoration:"none"},target:"_blank",rel:"noopener noreferrer",children:(0,i.jsx)(U.bL,{variant:"normal",color:"indigo11",children:"See documentation."})})]})]})]})}function W(e){var t,n;let{variants:l,onVariantsChange:r,error:o}=e,a=!!l,s=a?"Enabled":"Disabled",d="Options (".concat(null!==(t=null==l?void 0:l.length)&&void 0!==t?t:0,")"),c=(null!==(n=null==l?void 0:l.length)&&void 0!==n?n:0)>2,u=(0,y.useRef)();return(0,i.jsxs)(U.D,{overflow:"hidden",flexDirection:"column",border:!0,borderRadius:6,children:[(0,i.jsxs)(U.D,{border:{bottom:!0},padding:12,flexDirection:"column",gap:8,children:[(0,i.jsx)(U.bL,{variant:"h4",color:"grey12",children:"Variants"}),(0,i.jsx)(U.bL,{color:"grey12",children:'Add variants like "Primary" and "Secondary" to allow editors to choose the link\'s style by selecting one of them.'}),(0,i.jsxs)(U.D,{gap:8,children:[(0,i.jsx)(U.bC,{checked:a,onCheckedChange:e=>{r(e?["Primary","Secondary"]:void 0)}}),(0,i.jsx)(U.bL,{color:"grey11",children:s})]})]}),a&&(0,i.jsxs)(U.D,{border:{bottom:!0},padding:12,flexDirection:"column",gap:8,children:[(0,i.jsxs)(U.bL,{variant:"h5",color:"grey11",children:[d,!!o&&(0,i.jsx)(U.bL,{variant:"inherit",color:"tomato9",children:" ".concat(o)})]}),null==l?void 0:l.map((e,t)=>(0,i.jsxs)(U.D,{gap:4,alignItems:"center",children:[(0,i.jsx)(U.D,{flexGrow:1,backgroundColor:"white",padding:{inline:12,block:8},flexDirection:"column",border:!0,borderRadius:4,children:(0,i.jsx)(U.bN,{ref:e=>{u.current===t&&(u.current=void 0,null==e||e.focus())},placeholder:"Variant option (e.g. Primary)",value:e,onValueChange:e=>r(null==l?void 0:l.map((n,i)=>i===t?e:n))})}),c&&(0,i.jsx)(U.aZ,{type:"button",icon:"delete",onClick:()=>r(null==l?void 0:l.filter((e,n)=>n!==t))})]},t)),(0,i.jsx)(U.D,{children:(0,i.jsx)(U.E,{invisible:!0,startIcon:"add",onClick:()=>{u.current=null==l?void 0:l.length,r([...null!=l?l:[],""])},children:"Add option"})})]}),(0,i.jsx)(U.D,{backgroundColor:"white",flexDirection:"column",padding:12,children:(0,i.jsxs)(U.bL,{variant:"normal",color:"grey11",children:['Need additional properties similar to "Variants"?'," ",(0,i.jsx)("a",{href:"https://community.prismic.io/t/link-field-use-cases-share-your-requests-and-feedback/18146",target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"underline"},children:"Please provide your feedback here."})]})})]})}let $={...p.Jp};function X(e){var t;let{variants:n,setFieldValue:l}=e,r="config.variants",[o,a]=(0,J.U$)(r),s=null===(t=a.error)||void 0===t?void 0:t.find(e=>e);return(0,i.jsx)(W,{variants:n,onVariantsChange:e=>l(r,e),error:s})}let K={icon:r.$l_},Y=o.object().shape({label:o.string().optional(),useAsTitle:o.boolean().optional(),placeholder:o.string().optional(),select:o.string().optional().oneOf(["media","document","web",null]).nullable(),customtypes:o.array().strict().optional(),masks:o.array(o.string()).optional(),tags:o.array(o.string()).optional(),allowTargetBlank:o.boolean().strict().optional(),allowText:o.boolean().strict().optional(),repeat:o.boolean().strict().optional(),variants:o.array(o.string().trim().required("Values can't be empty")).optional()}).required().default(void 0).noUnknown(!0),Q={Meta:K,FormFields:$,schema:o.object().shape({type:o.string().matches(/^Link$/,{excludeEmptyString:!0}).required(),config:Y.optional()}),Form:e=>{let{initialValues:t,values:n,fields:l,setFieldValue:r}=e,{config:{allowText:o,repeat:a,variants:p}}=n;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(d.k,{children:[Object.entries($).map(e=>{let[n,r]=e;return(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)(n),formField:r,fields:l,initialValues:t})},n)}),(0,i.jsx)(d.J,{children:(0,i.jsxs)(s.kC,{sx:{gap:2,marginTop:3},style:{paddingTop:"1px"},children:[(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)("allowTargetBlank"),formField:(0,h.Jg)("Allow target blank",!1,!0),fields:l,initialValues:t})}),(0,i.jsx)(Z,{checked:o,setFieldValue:r})]})},"allowTargetBlank")]}),(0,i.jsx)(U.D,{height:8}),(0,i.jsxs)(U.D,{flexDirection:"column",gap:16,children:[(0,i.jsx)(H,{checked:a,setFieldValue:r}),(0,i.jsx)(X,{variants:p,setFieldValue:r})]})]})},create:e=>({type:"Link",config:{label:e,placeholder:"",select:null,allowTargetBlank:!0,allowText:!0,repeat:!1}}),TYPE_NAME:"Link",label:a.pV.name};var ee=n(41347);let et={label:p.Jp.label,id:p.Jp.id,customtypes:{validate:()=>o.array()}},en={icon:r.I2R},ei=Y.shape({label:o.string().max(35,"String is too long. Max: 35"),select:o.string().required().matches(/^document$/,{excludeEmptyString:!0}),customtypes:o.array().optional()}),el={create:e=>({type:"Link",config:{label:e,select:"document",repeat:!1,customtypes:[]}}),Meta:en,schema:o.object().shape({type:o.string().matches(/^Link$/,{excludeEmptyString:!0}).required(),config:ei}),TYPE_NAME:"Link",FormFields:et,CUSTOM_NAME:"ContentRelationship",Form:e=>{let{initialValues:t,values:n,setFieldValue:l,fields:r}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.k,{children:Object.entries(et).filter(e=>"customtypes"!==e[0]).map(e=>{let[n,l]=e;return(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)(n),formField:l,fields:r,initialValues:t})},n)})}),(0,i.jsx)(s.xu,{mt:20,children:(0,i.jsx)(ee.zE,{value:n.config.customtypes,onChange:e=>{l("config.customtypes",e)}})})]})},prepareInitialValues:(e,t)=>(null==t?void 0:t.customtypes)?{...t,customtypes:t.customtypes.filter(t=>e.find(e=>"string"==typeof t?e.local.id===t:e.local.id===t.id))}:t,label:a.$U.name},{FormFields:er,schema:eo}=(0,w.zg)("Date"),ea={create:e=>({type:"Date",config:{label:e,placeholder:""}}),FormFields:er,TYPE_NAME:"Date",schema:eo,Meta:{icon:r.f$3},label:a.pt.name},{FormFields:es,schema:ed}=(0,w.zg)("Embed"),ec={create:e=>({type:"Embed",config:{label:e,placeholder:""}}),FormFields:es,TYPE_NAME:"Embed",schema:ed,Meta:{icon:r.xoN},label:a.gA.name},eu={create:e=>({type:"GeoPoint",config:{label:e}}),FormFields:{label:p.Jp.label,id:p.Jp.id},TYPE_NAME:"GeoPoint",schema:o.object().shape({type:o.string().matches(/^GeoPoint$/,{excludeEmptyString:!0}).required(),config:o.object().shape({label:o.string()}).required().default(void 0).noUnknown(!0)}),Meta:{icon:r.lPv},label:a.uG.name};var ep=n(8799),eh=n(90167),em=n(66770);let ef=e=>{let{onClick:t,error:n,onDelete:l,active:o,text:a,sx:d}=e;return(0,i.jsx)(em.Z,{useActive:!0,fitButton:!0,error:n,onClick:t,active:o,sx:{position:"relative",width:"64px",height:"64px",...d},Icon:()=>(0,i.jsxs)(y.Fragment,{children:[(0,i.jsxs)(s.kC,{sx:{flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[(0,i.jsx)(ep.jnY,{size:22}),(0,i.jsx)(s.xv,{mt:1,children:a})]}),l?(0,i.jsx)(s.Ct,{onClick:l,variant:"circle-right",children:(0,i.jsx)(r.B4e,{})}):null]})})},ex=e=>{let{onClick:t}=e;return(0,i.jsx)(em.Z,{fitButton:!0,onClick:t,sx:{width:"64px",height:"64px",border:e=>{let{colors:t}=e;return"1px solid ".concat(String(null==t?void 0:t.borders))}},Icon:()=>(0,i.jsx)(s.kC,{sx:{flexDirection:"column",justifyContent:"center",alignItems:"center"},children:(0,i.jsx)(ep.iTs,{size:34,color:"#5263BA","aria-label":"Add a thumbnail"})})})},eg=e=>{let{prefix:t,required:n=!1,display:l}=e,[r,o]=(0,J.U$)(t),a=n?"*":"";return l?(0,i.jsxs)(y.Fragment,{children:[(0,i.jsx)(ev,{name:"".concat(t,".name"),label:"Name".concat(a),placeholder:"main",sx:{mb:3},isConstraint:"config.constraint"===t,meta:o}),(0,i.jsx)(eb,{name:"".concat(t,".width"),label:"Width (px)".concat(a),placeholder:" ",sx:{mb:3}}),(0,i.jsx)(eb,{name:"".concat(t,".height"),label:"Height (px)".concat(a),placeholder:" "})]}):null},ev=e=>{let{name:t,label:n,placeholder:l,meta:r,isConstraint:o,...a}=e,[s]=(0,J.U$)(t);return(0,i.jsx)(eh.Hq,{...a,fieldName:t,meta:r,formField:{label:n,placeholder:l},field:o?{value:"main",readOnly:!0}:{value:s.value},variant:o?"disabled":"primary"})},eb=e=>{let{name:t,label:n,placeholder:l,...r}=e,[o,a]=(0,J.U$)(t);return(0,i.jsx)(eh.Hq,{...r,fieldName:t,formField:{label:n,placeholder:l},meta:a,field:{min:0,type:"number",value:o.value||"",onKeyDown:e=>{("e"===e.key||"-"===e.key||"+"===e.key)&&e.preventDefault()}}})},ey=()=>o.number().nullable().transform((e,t)=>""===t?null:e),ej={label:p.Jp.label,id:p.Jp.id,constraint:{validate:()=>o.object().defined().shape({width:ey(),height:ey()})},thumbnails:{validate:()=>o.array().of(o.object().test({name:"Thumbnails",message:"Must set name and width or height at minimum",test:function(e){if(!e.name)return!1;let t="number"==typeof e.width&&e.width,n="number"==typeof e.height&&e.height;return e.name&&(t||n)}}))}},ek={name:"",width:"",height:""},eS=function(){let{width:e,height:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!n||e||t?e||t?"".concat(e||"auto","x").concat(t||"auto"):"...":"auto"},eC=o.object().shape({type:o.string().matches(/^Image$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,w.B9)(ej,"id"))}),e_={Meta:{icon:r.Fwj},Form:e=>{let{initialValues:t,values:n,errors:l,fields:r,touched:o}=e,[a,p]=(0,y.useState)(0),{config:{thumbnails:h=[],constraint:m}}=n;return(0,y.useEffect)(()=>{p(h.length)},[h.length]),(0,i.jsxs)(d.k,{children:[Object.entries(ej).map(e=>{let[n,l]=e;return(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)(n),formField:l,fields:r,initialValues:t})},n)}),(0,i.jsxs)(d.J,{children:[(0,i.jsx)(s.__,{htmlFor:"thumbnails",variant:"label.primary",sx:{mt:1,display:"flex",alignItems:"center"},children:"Responsive views*"}),(0,i.jsx)(s.Zb,{p:3,children:(0,i.jsx)(J.F2,{name:"config.thumbnails",render:t=>{let{push:n,remove:r}=t;return(0,i.jsxs)(y.Fragment,{children:[(0,i.jsxs)(s.kC,{mb:3,children:[(0,i.jsx)(ef,{active:0===a,text:eS(m,!0),sx:{mr:2},onClick:()=>p(0)}),h.map((e,t)=>(0,i.jsx)(ef,{sx:{mr:3},active:a===+t+1,text:eS(e),error:!!l.thumbnails&&!!o.thumbnails&&!!o.thumbnails[t]&&!!l.thumbnails&&!!l.thumbnails[t],onDelete:()=>r(t),onClick:()=>p(+t+1)},"thumbnail-button-".concat(+t+1))),(0,i.jsx)(ex,{onClick:()=>{n(ek)}})]}),(0,i.jsx)(eg,{...e,display:0===a,prefix:"config.constraint"}),h.map((t,n)=>(0,y.createElement)(eg,{...e,required:!0,key:"thumbnail-".concat(+n+1),display:a===+n+1,prefix:"config.thumbnails[".concat(n,"]")}))]})}})})]})]})},schema:eC,create:e=>({type:"Image",config:{label:e,constraint:{},thumbnails:[]}}),FormFields:ej,TYPE_NAME:"Image",label:a.tg.name},eF={...p.Jp},eI={icon:r._b$},eT=Y.shape({select:o.string().required().matches(/^media$/,{excludeEmptyString:!0})}),eE={Meta:eI,FormFields:eF,schema:o.object().shape({type:o.string().matches(/^Link$/,{excludeEmptyString:!0}).required(),config:eT.optional()}),Form:e=>{let{initialValues:t,values:n,fields:l,setFieldValue:r}=e,{config:{allowText:o,variants:a}}=n;return(0,i.jsxs)(U.D,{flexDirection:"column",gap:16,children:[(0,i.jsxs)(d.k,{children:[Object.entries(eF).map(e=>{let[n,r]=e;return(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)(n),formField:r,fields:l,initialValues:t})},n)}),(0,i.jsx)(Z,{checked:o,setFieldValue:r})]}),(0,i.jsx)(X,{variants:a,setFieldValue:r})]})},create:e=>({type:"Link",config:{label:e,placeholder:"",select:"media",allowText:!0}}),TYPE_NAME:"Link",CUSTOM_NAME:"LinkToMedia",label:a.L0.name},{FormFields:ew,schema:eL}=(0,w.zg)("Number"),eD={create:e=>({type:"Number",config:{label:e,placeholder:""}}),FormFields:ew,TYPE_NAME:"Number",schema:eL,Meta:{icon:r.KZU},label:a.Wc.name};var eM=n(79256);let eO=e=>"use first value as default ".concat(e?'("'.concat(e,'")'):""),eA=(e,t)=>t?e:void 0,eN={...p.Jp,default_value:{type:eM.h.CHECKBOX,yupType:"string",defaultValue:null,validate:function(){return o.string().test({name:"default_value",message:'Default value is not part of field "options" in Select',test:function(e){return void 0===e||this.parent&&this.parent.options&&this.parent.options.find(t=>t===e)}})},component:e=>{var t;let{values:n}=(0,J.u6)(),l=null===(t=n.config)||void 0===t?void 0:t.options[0];return(0,i.jsx)(eh.w8,{...e,defaultValue:e.field.value,controlledValue:l,setControlledValue:e.helpers.setValue,buildControlledValue:eA,label:eO})}},options:{yupType:"array",defaultValue:["1","2"],validate:{required:["Select requires a minimum of 2 options"],min:[2,"Choose at least 2 options"],test:{name:"non-empty values",message:"Values cannot be empty",test:e=>!e.some(e=>!e||!e.length)}},component:e=>(0,i.jsx)(eh.kp,{label:"Options",inputPlaceholder:"Select option output in API (e.g. 'blueTheme')",buttonLabel:"Add option",...e})}},eR={icon:r.nwY},eP=o.object().shape({type:o.string().matches(/^Select$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,w.B9)(eN,"id"))}),eq={FormFields:eN,create:e=>({type:"Select",config:{label:e,placeholder:"",options:["1","2"]}}),schema:eP,Meta:eR,TYPE_NAME:"Select",label:a._M.name};var ez=n(47927),eV=n(29259),eB=n.n(eV),eG=n(85505),eU=n.n(eG),eJ=n(34543);let eZ=e=>t=>{let{size:n}=t;return(0,i.jsx)("span",{style:{fontSize:n},children:e})},eH=[{value:"paragraph",label:"P",icon:eZ("p")},{value:"preformatted",label:"PRE",icon:eZ("pre")},{value:"heading1",label:"H1",icon:eZ("h1")},{value:"heading2",label:"H2",icon:eZ("h2")},{value:"heading3",label:"H3",icon:eZ("h3")},{value:"heading4",label:"H4",icon:eZ("h4")},{value:"heading5",label:"H5",icon:eZ("h5")},{value:"heading6",label:"H6",icon:eZ("h6")},{value:"strong",label:"Strong",icon:eZ((0,i.jsx)("b",{children:"b"}))},{value:"em",label:"em",icon:eZ((0,i.jsx)("em",{style:{fontFamily:"serif"},children:"I"}))},{value:"hyperlink",label:"hyperlink",icon:eZ((0,i.jsx)(eJ.eR7,{}))},{value:"image",label:"image",icon:eZ((0,i.jsx)(eJ.LFN,{}))},{value:"embed",label:"embed",icon:eZ((0,i.jsx)(eJ.xqv,{}))},{value:"list-item",label:"list",icon:eZ((0,i.jsx)(eJ.SnF,{}))},{value:"o-list-item",label:"o",icon:eZ((0,i.jsx)(ep.KyO,{}))},{value:"rtl",label:"rtl",icon:eZ("rtl")}],eW=eH.map(e=>e.value),e$=e=>!eW.find(t=>!e.includes(t)),eX=e=>{let t=e.split(",");return eH.reduce((e,n)=>{let{value:i}=n;return t.includes(i)?[...e,i]:e},[])};function eK(e,t){return(0,ez.has)("parent",e)&&eB()(e.parent)&&(0,ez.has)(t,e.parent)&&eU()(e.parent[t])?e.parent[t]:null}function eY(e){return()=>o.string().test({name:e,message:"Options cannot be empty",test:function(t,n){let i="single"===e?"multi":"single",l=eK(n,e),r=eK(n,i);return!!r&&"string"==typeof r||!("string"!=typeof l||(!l||!l.length)&&(!r||!r.length)||l.split(",").find(e=>!eW.includes(e)))}})}let eQ={...p.Jp,allowTargetBlank:(0,h.Jg)("Allow target blank for links"),single:{validate:eY("single")},multi:{validate:eY("multi")}},e0=["config.single","config.multi"],e1={icon:r.BAW},e2=o.object().shape({type:o.string().matches(/^StructuredText$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,w.B9)({...eQ,labels:{yupType:"array",validate:{}}},"id"))}),e5={create:e=>({type:"StructuredText",config:{label:e,placeholder:"",allowTargetBlank:!0,multi:eW.join(",")}}),FormFields:eQ,Meta:e1,schema:e2,TYPE_NAME:"StructuredText",Form:e=>{var t;let{initialValues:n,values:l,errors:r,fields:o,setFieldValue:a}=e,{config:{single:p,multi:h}}=l,m=p?eX(p):h?eX(h):eW,[f,x]=(0,y.useState)(!p),[g,v]=(0,y.useState)(m);return(0,y.useEffect)(()=>{let e=f?1:0;a(e0[e],g.join(",")),setTimeout(()=>{a(e0[1-e],void 0)},100)},[f,g]),(0,i.jsxs)(d.k,{children:[Object.entries(eQ).map(e=>{let[t,l]=e;return(0,i.jsx)(d.J,{children:(0,i.jsx)(c.Z,{fieldName:(0,u.lm)(t),formField:l,fields:o,initialValues:n})},t)}),(0,i.jsxs)(d.J,{children:[(0,i.jsxs)(s.__,{htmlFor:"accept",variant:"label.primary",sx:{mt:1,display:"flex",alignItems:"center"},children:["Accept*",(0,i.jsx)(s.zx,{type:"button",variant:"buttons.textButton",onClick:()=>{if(e$(g))return v([]);v(eW)},children:e$(g)?"Unselect All":"Select all"})]}),eH.map(e=>(0,i.jsx)(em.Z,{fitButton:!0,useActive:!0,label:e.label,size:14,Icon:e.icon,sx:{p:"16px",mb:2,mr:2,variant:"buttons.selectIcon"},active:g.includes(e.value),onClick:()=>{if(g.find(t=>t===e.value))return v(g.filter(t=>t!==e.value));v([...g,e.value])}},e.value)),(null===(t=r.config)||void 0===t?void 0:t[f?"multi":"single"])?(0,i.jsx)(s.xu,{sx:{position:"absolute"},children:(0,i.jsx)(s.xv,{as:"span",variant:"text.labelError",pl:0,children:r.config[f?"multi":"single"]})}):null]}),(0,i.jsx)(d.J,{children:(0,i.jsx)(s.kC,{sx:{mt:2,alignItems:"center",height:"100%"},children:(0,i.jsxs)(s.__,{variant:"label.border",children:[(0,i.jsx)(s.XZ,{checked:f,onChange:()=>x(!f)}),"Allow multiple paragraphs"]})})})]})},label:a._n.name};var e9=n(18978);let e6={create:e=>({type:"Table",config:{label:e}}),FormFields:{label:p.Jp.label,id:p.Jp.id},TYPE_NAME:"Table",schema:o.object().shape({type:o.string().matches(/^Table$/,{excludeEmptyString:!0}).required(),config:o.object().shape({label:o.string()}).required().default(void 0).noUnknown(!0)}),Meta:{icon:e9.WHV},label:a.BB.name},e3=p.Jp,e4=o.object().shape({type:o.string().matches(/^Text$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,w.B9)(e3,"id"))}),e8={create:e=>({type:"Text",config:{label:e,placeholder:""}}),Meta:{icon:r.SQS},schema:e4,TYPE_NAME:"Text",FormFields:e3,label:a.$S.name},e7=p.Jp,te={create:e=>({type:"Timestamp",config:{label:e,placeholder:""}}),schema:o.object().shape({type:o.string().matches(/^Timestamp$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,w.B9)(e7,"id"))}),FormFields:e7,TYPE_NAME:"Timestamp",Meta:{icon:r.k71},label:a.UG.name},tt={label:p.Jp.label,id:{...p.Jp.id,validate:{required:"This field is required",matches:[/^uid$/,"Api ID must be 'uid' for this field."]},disabled:!0},placeholder:p.Jp.placeholder},tn=o.object().shape({type:o.string().matches(/^UID$/,{excludeEmptyString:!0}).required(),config:(0,u.gc)((0,w.B9)(tt,"id"))}),ti={Boolean:P,Color:G,ContentRelationship:el,Date:ea,Embed:ec,GeoPoint:eu,Image:e_,Link:Q,LinkToMedia:eE,Number:eD,Select:eq,StructuredText:e5,Table:e6,Text:e8,Timestamp:te,UID:{create:e=>({type:"UID",config:{label:e,placeholder:""}}),Meta:{icon:r.XN7},schema:tn,TYPE_NAME:"UID",FormFields:tt,label:a.Fj.name}},tl=[ti.Image,ti.Text,ti.StructuredText,ti.Link,ti.Select,ti.Boolean,ti.Number,ti.Color,ti.Date,ti.Table,ti.Embed,ti.Timestamp,ti.GeoPoint,ti.ContentRelationship,ti.LinkToMedia],tr="subItem",to=v({schemaTypeRegex:/^NestedGroup$/,customListItem:e=>(0,i.jsx)(A,{Widgets:ti,widgetsArray:tl,hintBase:tr,...e}),customName:"NestedGroup",hintItemName:tr}),ta={...ti,NestedGroup:to},ts=[ta.Image,ta.Text,ta.StructuredText,ta.Link,ta.Select,ta.Boolean,ta.Number,ta.Color,ta.Date,ta.Table,ta.Embed,ta.Timestamp,ta.GeoPoint,ta.ContentRelationship,ta.LinkToMedia,ta.NestedGroup],td="item",tc={Group:v({schemaTypeRegex:/^Group$/,customListItem:e=>{let t=function(){let e=(0,l.L)("slicemachine-nested-groups");return{eligible:(null==e?void 0:e.value)==="on"}}(),n=ts.filter(e=>!!t.eligible||"NestedGroup"!==e.CUSTOM_NAME);return(0,i.jsx)(A,{Widgets:ta,widgetsArray:n,hintBase:td,...e})},hintItemName:td}),NestedGroup:to,...ti}},16086:function(e,t,n){"use strict";n.d(t,{B9:function(){return o},Ss:function(){return s},uS:function(){return a},zg:function(){return d}});var i=n(65413),l=n(68169),r=n(9889);let o=(e,t)=>{let{[t]:n,...i}=e;return i},a=e=>!e.destination||e.source.index===e.destination.index||e.source.droppableId!==e.destination.droppableId,s=(e,t)=>!e[t]&&(console.log('Could not find widget with type name "'.concat(t,'".')),!0),d=e=>({TYPE_NAME:e,FormFields:r.Jp,schema:i.object().shape({type:i.string().test({name:"type",test:function(t){return t===e}}),config:(0,l.gc)(o(r.Jp,"id"))}),create:()=>({type:e,config:(0,l.f7)(o(r.Jp,"id"))})})},49919:function(e,t,n){"use strict";function i(e){if(e.startsWith("/slices/"))return"slice";if(e.startsWith("/custom-types/"))return"custom type";if(e.startsWith("/page-types/"))return"page type";throw Error("Did not detect a content type from: ".concat(e))}n.d(t,{T:function(){return i}})},93155:function(e,t,n){"use strict";n.d(t,{F:function(){return l}});var i=n(41347);function l(e){var t,n,l,r,o,a;return{allowText:null===(t=e.config)||void 0===t?void 0:t.allowText,repeat:null===(n=e.config)||void 0===n?void 0:n.repeat,variants:null===(l=e.config)||void 0===l?void 0:l.variants,linkSelect:null===(r=e.config)||void 0===r?void 0:r.select,...(null===(o=e.config)||void 0===o?void 0:o.select)==="document"&&(null===(a=e.config)||void 0===a?void 0:a.customtypes)&&(()=>{var t;let{pickedFields:n,nestedPickedFields:l}=(0,i.WP)((0,i.Vg)({linkCustomtypes:null===(t=e.config)||void 0===t?void 0:t.customtypes}));return{linkPickedFields:n,linkNestedPickedFields:l}})()}}},5495:function(e,t,n){"use strict";n.d(t,{V:function(){return o}});var i=n(94160),l=n(49919),r=n(93155);function o(e){var t,n;let{id:o,field:a,isInAGroup:s=!1}=e;i.Xe.track({event:"field:added",id:o,name:null!==(n=null===(t=a.config)||void 0===t?void 0:t.label)&&void 0!==n?n:"",type:a.type,isInAGroup:s,contentType:(0,l.T)(window.location.pathname),..."Link"===a.type&&(0,r.F)(a)})}},39302:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i=n(94160),l=n(49919),r=n(93155);function o(e){var t,n;let{id:o,previousId:a=o,field:s,isInAGroup:d=!1}=e;i.Xe.track({event:"field:updated",previousId:a,id:o,idUpdated:a!==o,name:null!==(n=null===(t=s.config)||void 0===t?void 0:t.label)&&void 0!==n?n:"",type:s.type,isInAGroup:d,contentType:(0,l.T)(window.location.pathname),..."Link"===s.type&&(0,r.F)(s)})}},13834:function(e){e.exports={flex:"List_flex__b6acG",row:"List_row__zKnOI List_flex__b6acG",root:"List_root__m_SiQ List_flex__b6acG","root-border":"List_root-border__UW3vp",child:"List_child__MJ49i List_row__zKnOI List_flex__b6acG",header:"List_header__T0WM5 List_child__MJ49i List_row__zKnOI List_flex__b6acG",headerActions:"List_headerActions__mNgLY List_row__zKnOI List_flex__b6acG",item:"List_item__LMBx4 List_child__MJ49i List_row__zKnOI List_flex__b6acG"}},644:function(e){e.exports={root:"ZoneEmptyState_root__DAfG2"}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[647],{77630:function(e,t,n){n.d(t,{AK:function(){return v},E3:function(){return p},EN:function(){return f},F$:function(){return x},H8:function(){return C},HO:function(){return h},L4:function(){return g},N3:function(){return c},Tr:function(){return d},Ue:function(){return I},eK:function(){return S},gR:function(){return b},j5:function(){return a},mf:function(){return m},vB:function(){return y},xS:function(){return j},y6:function(){return i}});var r=n(98863),o=n(88866);function i(e){var t;return null!==(t=e.format)&&void 0!==t?t:"custom"}function l(e){return Object.entries(e.json)}function s(e){return l(e).find(e=>{let[t,n]=e;return Object.values(n).some(e=>"UID"===e.type)})}function a(e){var t;let[n,r]=null!==(t=s(e))&&void 0!==t?t:[];return Object.entries(null!=r?r:{}).find(e=>{let[t,n]=e;return"UID"===n.type})}function c(e){var t,n;return null!==(n=null==e?void 0:null===(t=e.config)||void 0===t?void 0:t.label)&&void 0!==n?n:void 0}function u(e,t){let n=e.json[t];if(void 0!==n)return Object.entries(n).find(e=>{let[t,n]=e;return n.type===o.SlicesFieldType})}function d(e,t){if(function(e,t){var n;let r=u(e,t),[o,i]=null!=r?r:[];return null!==(n=null==i?void 0:i.config)&&void 0!==n?n:void 0}(e,t))return e;let n=function(e,t){let n;let r=l(e),i=r.findIndex(e=>{let[n]=e;return n===t}),s=r.flatMap(e=>{let[t,n]=e;return Object.keys(n).filter(e=>n[e].type===o.SlicesFieldType)}),a=i;do n="slices".concat(0!==a?a.toString():""),a++;while(s.includes(n));return n}(e,t);return{...e,json:{...e.json,[t]:{...e.json[t],[n]:{type:o.SlicesFieldType,fieldset:"Slice Zone"}}}}}function p(e,t){let n=e.json[t];if(void 0===n)return e;let i=Object.keys(n).find(e=>n[e].type===o.SlicesFieldType);if(void 0===i)return e;let l=(0,r.ud)(n,i);return{...e,json:{...e.json,[t]:l}}}function f(e){var t,n;let{customType:i,sectionId:l,sliceId:s}=e,a=i.json[l];if(void 0===a)return i;let c=Object.keys(a).find(e=>a[e].type===o.SlicesFieldType);if(void 0===c)return i;let u=a[c];if(u.type!==o.SlicesFieldType)return i;let d=(0,r.ud)(null!==(n=null===(t=u.config)||void 0===t?void 0:t.choices)&&void 0!==n?n:{},s);return{...i,json:{...i.json,[l]:{...a,[c]:{...u,config:{...u.config,choices:d}}}}}}function m(e){let t={...e,format:"page"},n=l(e)[0];if(n){let[e]=n;t=d(t,e)}return t}function y(e,t){return{...e,json:{...e.json,[t]:{}}}}function x(e,t){let n=(0,r.ud)(e.json,t);return{...e,json:n}}function h(e,t,n){if(t===n)return e;let r=Object.keys(e.json).reduce((r,o)=>(o===t?r[n]=e.json[o]:r[o]=e.json[o],r),{});return{...e,json:r}}function j(e){let{customType:t,sectionId:n,newField:r,newFieldId:i}=e,l=t.json[n],s=u(t,n),a={...Object.fromEntries(Object.entries(l).filter(e=>{let[t,n]=e;return n.type!==o.SlicesFieldType})),[i]:r};if(void 0!==s){let[e,t]=s;a[e]=t}return T({customType:t,sectionId:n,updatedSection:a})}function v(e){let{customType:t,sectionId:n,fieldId:o}=e,i=(0,r.ud)(t.json[n],o);return T({customType:t,sectionId:n,updatedSection:i})}function g(e){let{customType:t,sectionId:n,previousFieldId:r,newFieldId:o,newField:i}=e,l=w({fields:t.json[n],previousFieldId:r,newFieldId:o,newField:i});return T({customType:t,sectionId:n,updatedSection:l})}function b(e){let{customType:t,sectionId:n,sourceIndex:r,destinationIndex:i}=e,l=t.json[n],s=u(t,n),a=Object.fromEntries(Object.entries(l).filter(e=>{let[t,n]=e;return n.type!==o.SlicesFieldType})),c="page"===t.format&&t.repeatable,d=Object.fromEntries(Object.entries(a).filter(e=>{let[t,n]=e;return"UID"!==n.type})),p=function(e){let{fields:t,sourceIndex:n,destinationIndex:r}=e,o=Object.entries(t),[i]=o.splice(n,1);return o.splice(r,0,i),Object.fromEntries(o)}({fields:c?d:a,sourceIndex:r,destinationIndex:i});if(void 0!==s){let[e,t]=s;p[e]=t}let f=Object.entries(p),m=Object.entries(a).find(e=>{let[t,n]=e;return"UID"===n.type});m&&f.unshift(m);let y=Object.fromEntries(f);return T({customType:t,sectionId:n,updatedSection:c?y:p})}function C(e,t){let n=l(t)[0],[r]=null!=n?n:[];return void 0===r?t:j({customType:t,sectionId:r,newField:{type:"UID",config:{label:e}},newFieldId:"uid"})}function S(e,t){var n,r;let[o]=null!==(n=s(t))&&void 0!==n?n:[],[i,l]=null!==(r=a(t))&&void 0!==r?r:[];if(!l||void 0===i||void 0===o)return t;let c=w({fields:t.json[o],previousFieldId:i,newFieldId:i,newField:{...l,config:{...l.config,label:e}}});return T({customType:t,sectionId:o,updatedSection:c})}function T(e){let{customType:t,sectionId:n,updatedSection:r}=e;return{...t,json:{...t.json,[n]:r}}}function w(e){let{fields:t,previousFieldId:n,newFieldId:r,newField:o}=e;return Object.entries(t).reduce((e,t)=>{let[i,l]=t;return i===n?e[r]=o:i!==r&&(e[i]=l),e},{})}function I(e){let{id:t,label:n,repeatable:r,format:o}=e,i=!1===r&&"page"===o?{...O,...R}:!1===r?k:"page"===o?{...N,...R}:F;return{format:o,id:t,json:i,label:n,repeatable:r,status:!0}}let k={Main:{}},O={Main:{slices:{config:{choices:{}},fieldset:"Slice Zone",type:"Slices"}}},F={Main:{uid:{type:"UID",config:{label:"UID"}}}},N={Main:{...F.Main,...O.Main}},R={"SEO & Metadata":{meta_title:{config:{label:"Meta Title",placeholder:"A title of the page used for social media and search engines"},type:"Text"},meta_description:{config:{label:"Meta Description",placeholder:"A brief summary of the page"},type:"Text"},meta_image:{config:{constraint:{height:1260,width:2400},label:"Meta Image",thumbnails:[]},type:"Image"}}}},60867:function(e,t,n){n.d(t,{_:function(){return N}});var r=n(52322),o=n(18337),i=n(5632),l=n(2784),s=n(65186),a=n(59326),c=n(75289),u=n(88932),d=n(80148),p=n(98564);async function f(e){let{customType:t,onSuccess:n}=e,r=p.$[t.format];try{let{errors:e}=await d.managerClient.customTypes.deleteCustomType({id:t.id});if(e.length>0)throw e;n(),u.Am.success("".concat(r.name({start:!0,plural:!1})," deleted"))}catch(t){let e="Internal Error: ".concat(r.name({start:!0,plural:!1})," could not be deleted");console.error(e,t),u.Am.error(e)}}var m=n(33986),y=n(30527),x=n(55862),h=n(54597);let j=e=>{var t;let{customType:n,format:o,onClose:i,onDeleteCustomTypeSuccess:u}=e,d=p.$[o],[j,v]=(0,l.useState)(!1),{deleteCustomTypeSuccess:g}=(0,h.Z)(),b=async()=>{v(!0),await f({customType:n,onSuccess:()=>g(n.id)}),u()},{theme:C}=(0,a.B7)();return(0,r.jsx)(x.Z,{isOpen:!0,shouldCloseOnOverlayClick:!0,style:{content:{maxWidth:612}},onRequestClose:()=>i(),children:(0,r.jsx)(y.Z,{bodySx:{p:0,bg:"white",position:"relative",height:"100%",padding:16},footerSx:{position:"sticky",bottom:0,p:0},sx:{border:"none",overflow:"hidden"},borderFooter:!0,Header:(0,r.jsxs)(c.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",alignItems:"center",justifyContent:"space-between",borderBottom:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.borders))}},children:[(0,r.jsxs)(c.kC,{sx:{alignItems:"center"},children:[(0,r.jsx)(s.$vK,{size:20,color:null===(t=C.colors)||void 0===t?void 0:t.greyIcon}),(0,r.jsxs)(c.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:["Delete"," ",d.name({start:!1,plural:!1})]})]}),(0,r.jsx)(c.x8,{type:"button",onClick:()=>i()})]}),Footer:()=>(0,r.jsxs)(c.kC,{sx:{justifyContent:"flex-end",height:64,alignItems:"center",paddingRight:16,borderTop:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.darkBorders))},backgroundColor:"gray"},children:[(0,r.jsx)(m.z,{label:"Cancel",variant:"secondary",onClick:()=>i(),sx:{mr:"10px",fontWeight:"bold",color:"grey12",borderRadius:6}}),void 0!==n&&(0,r.jsx)(m.z,{label:"Delete",variant:"danger",isLoading:j,onClick:()=>void b(),sx:{minHeight:39,minWidth:78}})]}),children:(0,r.jsxs)("div",{children:["This action will immediately make the following change:",(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:["Delete the"," ",(0,r.jsxs)(c.xv,{sx:{fontWeight:"bold"},children:["customtypes/",null==n?void 0:n.id,"/"]})," ","directory."]})}),"The next time you push your changes to Prismic, the following change will happen:",(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:["Remove the"," ",d.name({start:!1,plural:!1})," and any associated Documents from your repository."]})})]})})})};var v=n(56580);async function g(e){let{model:t,newLabel:n,onSuccess:r}=e,o=p.$[t.format];try{let e={...t,label:n},{errors:i}=await d.managerClient.customTypes.renameCustomType({model:e});if(i.length>0)throw i;r(e),u.Am.success("".concat(o.name({start:!0,plural:!1})," renamed"))}catch(t){let e="Internal Error: ".concat(o.name({start:!0,plural:!1})," could not be renamed");console.error(e,t),u.Am.error(e)}}var b=n(68968),C=n(78254),S=n(59532),T=n(46999);let w=e=>{var t,n;let{isChangesLocal:o,customType:i,format:s,onClose:a,setLocalCustomType:u}=e,d=null!==(t=null==i?void 0:i.label)&&void 0!==t?t:"",f=null!==(n=null==i?void 0:i.id)&&void 0!==n?n:"",{renameCustomTypeSuccess:m}=(0,h.Z)(),{syncChanges:y}=(0,b.g)(),[x,j]=(0,l.useState)(!1),w=async e=>{j(!0),o&&u?u({customType:{...i,label:e.customTypeName}}):await g({model:i,newLabel:e.customTypeName,onSuccess:e=>{m(e),y()}}),j(!1),a()},{customTypeLabels:I}=(0,v.v9)(e=>({customTypeLabels:(0,C.YS)(e)})),k=p.$[s];return(0,r.jsx)(S.Z,{isOpen:!0,testId:"rename-custom-type-modal",widthInPx:"530px",formId:"rename-custom-type-modal-".concat(f),buttonLabel:"Rename",close:a,onSubmit:e=>void w(e),initialValues:{customTypeName:d},isLoading:x,content:{title:"Rename a ".concat(k.name({start:!1,plural:!1}))},validate:e=>{let{customTypeName:t}=e,n={};return t&&t.length||(n.customTypeName="Cannot be empty."),void 0!=n.customTypeName&&I.includes(t)&&d!==t&&(n.customTypeName="".concat(k.name({start:!0,plural:!1})," name is already taken.")),["update","insert"].includes(t.toLowerCase())&&(n.customTypeName='Name "'.concat(t,'" is reserved for Slice Machine use.')),Object.keys(n).length>0?n:void 0},children:e=>{let{errors:t}=e;return(0,r.jsx)(c.xu,{children:(0,r.jsx)(T.W,{name:"customTypeName",label:"".concat(k.name({start:!0,plural:!1})," Name"),placeholder:"A display name for the ".concat(k.name({start:!1,plural:!1})),error:t.customTypeName,testId:"custom-type-name-input"})})}})};var I=n(94160),k=n(77630);async function O(e,t){let n=p.$[e.format];try{let r=(0,k.mf)(e),{errors:o}=await (0,I.KA)({customType:r});if(o.length>0)throw o;t(r),u.Am.success("".concat(n.name({start:!0,plural:!1})," converted to page type"))}catch(t){let e="Internal Error: ".concat(n.name({start:!0,plural:!1})," not converted to page type");console.error(e,t),u.Am.error(e)}}var F=n(59294);let N=e=>{let{format:t,customType:n,isChangesLocal:s,setLocalCustomType:a}=e,c=(0,i.useRouter)(),{saveCustomTypeSuccess:u}=(0,h.Z)(),[d,p]=(0,l.useState)(!1),[f,m]=(0,l.useState)(!1),[y,x]=(0,l.useState)(!1),v=async()=>{x(!0),await O(n,u);let e=F.cd.custom.getBuilderPagePathname(n.id);if(c.asPath===e){let e=F.cd.page.getBuilderPagePathname(n.id);c.replace(e),x(!1)}else x(!1)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.ar,{children:[(0,r.jsx)(o.av,{disabled:y,children:(0,r.jsx)(o.aZ,{color:"grey","data-testid":"editDropdown",hiddenLabel:"Custom type actions",icon:"moreVert",loading:y,variant:"solid"})}),(0,r.jsxs)(o.as,{align:"end",children:[(0,r.jsx)(o.at,{startIcon:(0,r.jsx)(o.aX,{name:"edit"}),onSelect:()=>{m(!0)},children:"Rename"}),"custom"===t&&!s&&(0,r.jsx)(o.at,{startIcon:(0,r.jsx)(o.aX,{name:"driveFileMove"}),onSelect:()=>void v(),children:"Convert to page type"}),(0,r.jsx)(o.at,{color:"tomato",startIcon:(0,r.jsx)(o.aX,{name:"delete"}),onSelect:()=>{p(!0)},children:"Remove"})]})]}),d?(0,r.jsx)(j,{format:t,customType:n,onClose:()=>p(!1),onDeleteCustomTypeSuccess:()=>{var e;let{tablePagePathname:t}=F.cd[null!==(e=n.format)&&void 0!==e?e:"custom"];c.asPath!==t?c.replace(t):p(!1)}}):null,f?(0,r.jsx)(w,{format:t,customType:n,isChangesLocal:s,onClose:()=>m(!1),setLocalCustomType:a}):null]})}},50477:function(e,t,n){n.d(t,{NG:function(){return a},xU:function(){return l}});var r=n(18566),o=n(2784),i=n(80148);function l(e){let t=(0,o.useCallback)(t=>(0,r.VA)(s,[e],t),[e]);return{customTypes:(0,r.QT)(s,[e]),updateCustomTypes:t}}async function s(e){let{errors:t,models:n}=await i.managerClient.customTypes.readAllCustomTypes(e?{format:e}:void 0);if(t.length>0)throw t;return n.map(e=>{let{model:t}=e;return t})}function a(e){(0,r.gw)(s,[]),(0,r.gw)(s,[e])}},33986:function(e,t,n){n.d(t,{z:function(){return a}});var r=n(52322),o=n(2784),i=n(75289);let l=(e,t)=>e?"".concat(e,"-").concat(t):"",s=e=>{switch(e){case"white":case"secondaryMedium":case"secondarySmall":case"secondary":return"#1A1523";default:return"grey01"}},a=(0,o.forwardRef)((e,t)=>{let{label:n,Icon:o,type:a,form:c,isLoading:u=!1,disabled:d=!1,onClick:p,sx:f={},iconSize:m=16,iconFill:y,variant:x="primary",...h}=e;return(0,r.jsx)(i.zx,{ref:t,sx:{...f,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",...u?{cursor:"wait !important"}:{}},type:a,form:c,disabled:d||u,onClick:u?void 0:p,variant:x,...h,children:u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$j,{size:m,color:s(x),"data-testid":l(h["data-testid"],"spinner")}),o&&n]}):(0,r.jsxs)(r.Fragment,{children:[o&&(0,r.jsx)(o,{size:m,fill:y,"data-testid":l(h["data-testid"],"icon")}),n]})})})},46999:function(e,t,n){n.d(t,{W:function(){return l}});var r=n(52322),o=n(63397);n(2784);var i=n(75289);let l=e=>{let{name:t,label:n,placeholder:l,error:s,testId:a,onChange:c}=e;return(0,r.jsxs)(i.xu,{mb:3,children:[(0,r.jsx)(i.__,{htmlFor:t,mb:2,children:n}),(0,r.jsx)(o.gN,{name:t,type:"text",placeholder:l,as:i.II,autoComplete:"off",...c?{onChange:c}:null,...a?{"data-testid":a}:null}),s?(0,r.jsx)(i.xv,{"data-testid":a?"".concat(a,"-error"):"input-error",sx:{color:"error",mt:1},children:s}):null]})}},59532:function(e,t,n){var r=n(52322),o=n(63397),i=n(37149),l=n.n(i),s=n(75289),a=n(33986),c=n(55862),u=n(30527);function d(e){let{children:t}=e,n=(0,u.W)();return(0,r.jsx)(s.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",pl:4,bg:"headSection",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:n,borderTopRightRadius:n,borderBottom:e=>{var t;return"1px solid ".concat(null===(t=e.colors)||void 0===t?void 0:t.borders)}},children:t})}t.Z=function(e){let{children:t,close:n,isOpen:i,formId:p,validate:f,onSubmit:m,widthInPx:y,initialValues:x,content:{title:h},cardProps:j,omitFooter:v=!1,isLoading:g=!1,buttonLabel:b="Save",testId:C,actionMessage:S}=e;return l().setAppElement("#__next"),(0,r.jsx)(c.Z,{isOpen:i,shouldCloseOnOverlayClick:!0,onRequestClose:n,contentLabel:h,style:{content:{width:null!=y?y:"900px"}},children:(0,r.jsx)(o.J9,{initialValues:x,validate:e=>f?f(e):void 0,onSubmit:e=>{m(e)},children:e=>{let{isValid:i,isSubmitting:l,values:c,errors:f,touched:m,setFieldValue:y,setValues:x}=e;return(0,r.jsx)(o.l0,{id:p,...null!=C?{"data-testid":C}:null,children:(0,r.jsx)(u.Z,{borderFooter:!0,footerSx:{p:3,position:"sticky",bottom:0,background:"gray"},bodySx:{px:4,py:4},sx:{border:"none"},...j,Header:(0,r.jsxs)(d,{children:[(0,r.jsx)(s.X6,{sx:{fontSize:"20px"},children:h}),(0,r.jsx)(s.x8,{type:"button",onClick:n})]}),Footer:v?null:(0,r.jsxs)(s.kC,{sx:{alignItems:"space-between"},children:[(0,r.jsx)(s.kC,{sx:{fontSize:"14px",alignItems:"center"},children:"function"==typeof S?S(e):S}),(0,r.jsxs)(s.kC,{sx:{ml:"auto"},children:[(0,r.jsx)(s.zx,{mr:2,type:"button",onClick:n,variant:"secondary",disabled:l||g,children:"Cancel"}),(0,r.jsx)(a.z,{label:b,form:p,type:"submit",disabled:!i||l||g,isLoading:l||g,sx:{fontWeight:"400",paddingBlock:"8px",paddingInline:"16px",fontSize:"14px",borderRadius:"4px"}})]})]}),children:t({isValid:i,isSubmitting:l,values:c,errors:f,touched:m,setFieldValue:y,setValues:x})})})}})})}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[647],{77630:function(e,t,n){n.d(t,{AK:function(){return v},E3:function(){return p},EN:function(){return f},F$:function(){return x},H8:function(){return C},HO:function(){return h},L4:function(){return g},N3:function(){return c},Tr:function(){return d},Ue:function(){return I},eK:function(){return S},gR:function(){return b},j5:function(){return a},mf:function(){return m},vB:function(){return y},xS:function(){return j},y6:function(){return i}});var r=n(98863),o=n(88866);function i(e){var t;return null!==(t=e.format)&&void 0!==t?t:"custom"}function l(e){return Object.entries(e.json)}function s(e){return l(e).find(e=>{let[t,n]=e;return Object.values(n).some(e=>"UID"===e.type)})}function a(e){var t;let[n,r]=null!==(t=s(e))&&void 0!==t?t:[];return Object.entries(null!=r?r:{}).find(e=>{let[t,n]=e;return"UID"===n.type})}function c(e){var t,n;return null!==(n=null==e?void 0:null===(t=e.config)||void 0===t?void 0:t.label)&&void 0!==n?n:void 0}function u(e,t){let n=e.json[t];if(void 0!==n)return Object.entries(n).find(e=>{let[t,n]=e;return n.type===o.SlicesFieldType})}function d(e,t){if(function(e,t){var n;let r=u(e,t),[o,i]=null!=r?r:[];return null!==(n=null==i?void 0:i.config)&&void 0!==n?n:void 0}(e,t))return e;let n=function(e,t){let n;let r=l(e),i=r.findIndex(e=>{let[n]=e;return n===t}),s=r.flatMap(e=>{let[t,n]=e;return Object.keys(n).filter(e=>n[e].type===o.SlicesFieldType)}),a=i;do n="slices".concat(0!==a?a.toString():""),a++;while(s.includes(n));return n}(e,t);return{...e,json:{...e.json,[t]:{...e.json[t],[n]:{type:o.SlicesFieldType,fieldset:"Slice Zone"}}}}}function p(e,t){let n=e.json[t];if(void 0===n)return e;let i=Object.keys(n).find(e=>n[e].type===o.SlicesFieldType);if(void 0===i)return e;let l=(0,r.ud)(n,i);return{...e,json:{...e.json,[t]:l}}}function f(e){var t,n;let{customType:i,sectionId:l,sliceId:s}=e,a=i.json[l];if(void 0===a)return i;let c=Object.keys(a).find(e=>a[e].type===o.SlicesFieldType);if(void 0===c)return i;let u=a[c];if(u.type!==o.SlicesFieldType)return i;let d=(0,r.ud)(null!==(n=null===(t=u.config)||void 0===t?void 0:t.choices)&&void 0!==n?n:{},s);return{...i,json:{...i.json,[l]:{...a,[c]:{...u,config:{...u.config,choices:d}}}}}}function m(e){let t={...e,format:"page"},n=l(e)[0];if(n){let[e]=n;t=d(t,e)}return t}function y(e,t){return{...e,json:{...e.json,[t]:{}}}}function x(e,t){let n=(0,r.ud)(e.json,t);return{...e,json:n}}function h(e,t,n){if(t===n)return e;let r=Object.keys(e.json).reduce((r,o)=>(o===t?r[n]=e.json[o]:r[o]=e.json[o],r),{});return{...e,json:r}}function j(e){let{customType:t,sectionId:n,newField:r,newFieldId:i}=e,l=t.json[n],s=u(t,n),a={...Object.fromEntries(Object.entries(l).filter(e=>{let[t,n]=e;return n.type!==o.SlicesFieldType})),[i]:r};if(void 0!==s){let[e,t]=s;a[e]=t}return T({customType:t,sectionId:n,updatedSection:a})}function v(e){let{customType:t,sectionId:n,fieldId:o}=e,i=(0,r.ud)(t.json[n],o);return T({customType:t,sectionId:n,updatedSection:i})}function g(e){let{customType:t,sectionId:n,previousFieldId:r,newFieldId:o,newField:i}=e,l=w({fields:t.json[n],previousFieldId:r,newFieldId:o,newField:i});return T({customType:t,sectionId:n,updatedSection:l})}function b(e){let{customType:t,sectionId:n,sourceIndex:r,destinationIndex:i}=e,l=t.json[n],s=u(t,n),a=Object.fromEntries(Object.entries(l).filter(e=>{let[t,n]=e;return n.type!==o.SlicesFieldType})),c="page"===t.format&&t.repeatable,d=Object.fromEntries(Object.entries(a).filter(e=>{let[t,n]=e;return"UID"!==n.type})),p=function(e){let{fields:t,sourceIndex:n,destinationIndex:r}=e,o=Object.entries(t),[i]=o.splice(n,1);return o.splice(r,0,i),Object.fromEntries(o)}({fields:c?d:a,sourceIndex:r,destinationIndex:i});if(void 0!==s){let[e,t]=s;p[e]=t}let f=Object.entries(p),m=Object.entries(a).find(e=>{let[t,n]=e;return"UID"===n.type});m&&f.unshift(m);let y=Object.fromEntries(f);return T({customType:t,sectionId:n,updatedSection:c?y:p})}function C(e,t){let n=l(t)[0],[r]=null!=n?n:[];return void 0===r?t:j({customType:t,sectionId:r,newField:{type:"UID",config:{label:e}},newFieldId:"uid"})}function S(e,t){var n,r;let[o]=null!==(n=s(t))&&void 0!==n?n:[],[i,l]=null!==(r=a(t))&&void 0!==r?r:[];if(!l||void 0===i||void 0===o)return t;let c=w({fields:t.json[o],previousFieldId:i,newFieldId:i,newField:{...l,config:{...l.config,label:e}}});return T({customType:t,sectionId:o,updatedSection:c})}function T(e){let{customType:t,sectionId:n,updatedSection:r}=e;return{...t,json:{...t.json,[n]:r}}}function w(e){let{fields:t,previousFieldId:n,newFieldId:r,newField:o}=e;return Object.entries(t).reduce((e,t)=>{let[i,l]=t;return i===n?e[r]=o:i!==r&&(e[i]=l),e},{})}function I(e){let{id:t,label:n,repeatable:r,format:o}=e,i=!1===r&&"page"===o?{...O,...R}:!1===r?k:"page"===o?{...N,...R}:F;return{format:o,id:t,json:i,label:n,repeatable:r,status:!0}}let k={Main:{}},O={Main:{slices:{config:{choices:{}},fieldset:"Slice Zone",type:"Slices"}}},F={Main:{uid:{type:"UID",config:{label:"UID"}}}},N={Main:{...F.Main,...O.Main}},R={"SEO & Metadata":{meta_title:{config:{label:"Meta Title",placeholder:"A title of the page used for social media and search engines"},type:"Text"},meta_description:{config:{label:"Meta Description",placeholder:"A brief summary of the page"},type:"Text"},meta_image:{config:{constraint:{height:1260,width:2400},label:"Meta Image",thumbnails:[]},type:"Image"}}}},60867:function(e,t,n){n.d(t,{_:function(){return N}});var r=n(52322),o=n(11699),i=n(5632),l=n(2784),s=n(65186),a=n(59326),c=n(75289),u=n(88932),d=n(80148),p=n(98564);async function f(e){let{customType:t,onSuccess:n}=e,r=p.$[t.format];try{let{errors:e}=await d.managerClient.customTypes.deleteCustomType({id:t.id});if(e.length>0)throw e;n(),u.Am.success("".concat(r.name({start:!0,plural:!1})," deleted"))}catch(t){let e="Internal Error: ".concat(r.name({start:!0,plural:!1})," could not be deleted");console.error(e,t),u.Am.error(e)}}var m=n(33986),y=n(30527),x=n(55862),h=n(54597);let j=e=>{var t;let{customType:n,format:o,onClose:i,onDeleteCustomTypeSuccess:u}=e,d=p.$[o],[j,v]=(0,l.useState)(!1),{deleteCustomTypeSuccess:g}=(0,h.Z)(),b=async()=>{v(!0),await f({customType:n,onSuccess:()=>g(n.id)}),u()},{theme:C}=(0,a.B7)();return(0,r.jsx)(x.Z,{isOpen:!0,shouldCloseOnOverlayClick:!0,style:{content:{maxWidth:612}},onRequestClose:()=>i(),children:(0,r.jsx)(y.Z,{bodySx:{p:0,bg:"white",position:"relative",height:"100%",padding:16},footerSx:{position:"sticky",bottom:0,p:0},sx:{border:"none",overflow:"hidden"},borderFooter:!0,Header:(0,r.jsxs)(c.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",alignItems:"center",justifyContent:"space-between",borderBottom:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.borders))}},children:[(0,r.jsxs)(c.kC,{sx:{alignItems:"center"},children:[(0,r.jsx)(s.$vK,{size:20,color:null===(t=C.colors)||void 0===t?void 0:t.greyIcon}),(0,r.jsxs)(c.X6,{sx:{fontSize:"14px",fontWeight:"bold",ml:1},children:["Delete"," ",d.name({start:!1,plural:!1})]})]}),(0,r.jsx)(c.x8,{type:"button",onClick:()=>i()})]}),Footer:()=>(0,r.jsxs)(c.kC,{sx:{justifyContent:"flex-end",height:64,alignItems:"center",paddingRight:16,borderTop:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.darkBorders))},backgroundColor:"gray"},children:[(0,r.jsx)(m.z,{label:"Cancel",variant:"secondary",onClick:()=>i(),sx:{mr:"10px",fontWeight:"bold",color:"grey12",borderRadius:6}}),void 0!==n&&(0,r.jsx)(m.z,{label:"Delete",variant:"danger",isLoading:j,onClick:()=>void b(),sx:{minHeight:39,minWidth:78}})]}),children:(0,r.jsxs)("div",{children:["This action will immediately make the following change:",(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:["Delete the"," ",(0,r.jsxs)(c.xv,{sx:{fontWeight:"bold"},children:["customtypes/",null==n?void 0:n.id,"/"]})," ","directory."]})}),"The next time you push your changes to Prismic, the following change will happen:",(0,r.jsx)("ul",{children:(0,r.jsxs)("li",{children:["Remove the"," ",d.name({start:!1,plural:!1})," and any associated Documents from your repository."]})})]})})})};var v=n(56580);async function g(e){let{model:t,newLabel:n,onSuccess:r}=e,o=p.$[t.format];try{let e={...t,label:n},{errors:i}=await d.managerClient.customTypes.renameCustomType({model:e});if(i.length>0)throw i;r(e),u.Am.success("".concat(o.name({start:!0,plural:!1})," renamed"))}catch(t){let e="Internal Error: ".concat(o.name({start:!0,plural:!1})," could not be renamed");console.error(e,t),u.Am.error(e)}}var b=n(68968),C=n(78254),S=n(59532),T=n(46999);let w=e=>{var t,n;let{isChangesLocal:o,customType:i,format:s,onClose:a,setLocalCustomType:u}=e,d=null!==(t=null==i?void 0:i.label)&&void 0!==t?t:"",f=null!==(n=null==i?void 0:i.id)&&void 0!==n?n:"",{renameCustomTypeSuccess:m}=(0,h.Z)(),{syncChanges:y}=(0,b.g)(),[x,j]=(0,l.useState)(!1),w=async e=>{j(!0),o&&u?u({customType:{...i,label:e.customTypeName}}):await g({model:i,newLabel:e.customTypeName,onSuccess:e=>{m(e),y()}}),j(!1),a()},{customTypeLabels:I}=(0,v.v9)(e=>({customTypeLabels:(0,C.YS)(e)})),k=p.$[s];return(0,r.jsx)(S.Z,{isOpen:!0,testId:"rename-custom-type-modal",widthInPx:"530px",formId:"rename-custom-type-modal-".concat(f),buttonLabel:"Rename",close:a,onSubmit:e=>void w(e),initialValues:{customTypeName:d},isLoading:x,content:{title:"Rename a ".concat(k.name({start:!1,plural:!1}))},validate:e=>{let{customTypeName:t}=e,n={};return t&&t.length||(n.customTypeName="Cannot be empty."),void 0!=n.customTypeName&&I.includes(t)&&d!==t&&(n.customTypeName="".concat(k.name({start:!0,plural:!1})," name is already taken.")),["update","insert"].includes(t.toLowerCase())&&(n.customTypeName='Name "'.concat(t,'" is reserved for Slice Machine use.')),Object.keys(n).length>0?n:void 0},children:e=>{let{errors:t}=e;return(0,r.jsx)(c.xu,{children:(0,r.jsx)(T.W,{name:"customTypeName",label:"".concat(k.name({start:!0,plural:!1})," Name"),placeholder:"A display name for the ".concat(k.name({start:!1,plural:!1})),error:t.customTypeName,testId:"custom-type-name-input"})})}})};var I=n(94160),k=n(77630);async function O(e,t){let n=p.$[e.format];try{let r=(0,k.mf)(e),{errors:o}=await (0,I.KA)({customType:r});if(o.length>0)throw o;t(r),u.Am.success("".concat(n.name({start:!0,plural:!1})," converted to page type"))}catch(t){let e="Internal Error: ".concat(n.name({start:!0,plural:!1})," not converted to page type");console.error(e,t),u.Am.error(e)}}var F=n(59294);let N=e=>{let{format:t,customType:n,isChangesLocal:s,setLocalCustomType:a}=e,c=(0,i.useRouter)(),{saveCustomTypeSuccess:u}=(0,h.Z)(),[d,p]=(0,l.useState)(!1),[f,m]=(0,l.useState)(!1),[y,x]=(0,l.useState)(!1),v=async()=>{x(!0),await O(n,u);let e=F.cd.custom.getBuilderPagePathname(n.id);if(c.asPath===e){let e=F.cd.page.getBuilderPagePathname(n.id);c.replace(e),x(!1)}else x(!1)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.ar,{children:[(0,r.jsx)(o.av,{disabled:y,children:(0,r.jsx)(o.aZ,{color:"grey","data-testid":"editDropdown",hiddenLabel:"Custom type actions",icon:"moreVert",loading:y,variant:"solid"})}),(0,r.jsxs)(o.as,{align:"end",children:[(0,r.jsx)(o.at,{startIcon:(0,r.jsx)(o.aX,{name:"edit"}),onSelect:()=>{m(!0)},children:"Rename"}),"custom"===t&&!s&&(0,r.jsx)(o.at,{startIcon:(0,r.jsx)(o.aX,{name:"driveFileMove"}),onSelect:()=>void v(),children:"Convert to page type"}),(0,r.jsx)(o.at,{color:"tomato",startIcon:(0,r.jsx)(o.aX,{name:"delete"}),onSelect:()=>{p(!0)},children:"Remove"})]})]}),d?(0,r.jsx)(j,{format:t,customType:n,onClose:()=>p(!1),onDeleteCustomTypeSuccess:()=>{var e;let{tablePagePathname:t}=F.cd[null!==(e=n.format)&&void 0!==e?e:"custom"];c.asPath!==t?c.replace(t):p(!1)}}):null,f?(0,r.jsx)(w,{format:t,customType:n,isChangesLocal:s,onClose:()=>m(!1),setLocalCustomType:a}):null]})}},50477:function(e,t,n){n.d(t,{NG:function(){return a},xU:function(){return l}});var r=n(18566),o=n(2784),i=n(80148);function l(e){let t=(0,o.useCallback)(t=>(0,r.VA)(s,[e],t),[e]);return{customTypes:(0,r.QT)(s,[e]),updateCustomTypes:t}}async function s(e){let{errors:t,models:n}=await i.managerClient.customTypes.readAllCustomTypes(e?{format:e}:void 0);if(t.length>0)throw t;return n.map(e=>{let{model:t}=e;return t})}function a(e){(0,r.gw)(s,[]),(0,r.gw)(s,[e])}},33986:function(e,t,n){n.d(t,{z:function(){return a}});var r=n(52322),o=n(2784),i=n(75289);let l=(e,t)=>e?"".concat(e,"-").concat(t):"",s=e=>{switch(e){case"white":case"secondaryMedium":case"secondarySmall":case"secondary":return"#1A1523";default:return"grey01"}},a=(0,o.forwardRef)((e,t)=>{let{label:n,Icon:o,type:a,form:c,isLoading:u=!1,disabled:d=!1,onClick:p,sx:f={},iconSize:m=16,iconFill:y,variant:x="primary",...h}=e;return(0,r.jsx)(i.zx,{ref:t,sx:{...f,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",...u?{cursor:"wait !important"}:{}},type:a,form:c,disabled:d||u,onClick:u?void 0:p,variant:x,...h,children:u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$j,{size:m,color:s(x),"data-testid":l(h["data-testid"],"spinner")}),o&&n]}):(0,r.jsxs)(r.Fragment,{children:[o&&(0,r.jsx)(o,{size:m,fill:y,"data-testid":l(h["data-testid"],"icon")}),n]})})})},46999:function(e,t,n){n.d(t,{W:function(){return l}});var r=n(52322),o=n(63397);n(2784);var i=n(75289);let l=e=>{let{name:t,label:n,placeholder:l,error:s,testId:a,onChange:c}=e;return(0,r.jsxs)(i.xu,{mb:3,children:[(0,r.jsx)(i.__,{htmlFor:t,mb:2,children:n}),(0,r.jsx)(o.gN,{name:t,type:"text",placeholder:l,as:i.II,autoComplete:"off",...c?{onChange:c}:null,...a?{"data-testid":a}:null}),s?(0,r.jsx)(i.xv,{"data-testid":a?"".concat(a,"-error"):"input-error",sx:{color:"error",mt:1},children:s}):null]})}},59532:function(e,t,n){var r=n(52322),o=n(63397),i=n(37149),l=n.n(i),s=n(75289),a=n(33986),c=n(55862),u=n(30527);function d(e){let{children:t}=e,n=(0,u.W)();return(0,r.jsx)(s.kC,{sx:{position:"sticky",top:0,zIndex:1,p:"16px",pl:4,bg:"headSection",alignItems:"center",justifyContent:"space-between",borderTopLeftRadius:n,borderTopRightRadius:n,borderBottom:e=>{var t;return"1px solid ".concat(null===(t=e.colors)||void 0===t?void 0:t.borders)}},children:t})}t.Z=function(e){let{children:t,close:n,isOpen:i,formId:p,validate:f,onSubmit:m,widthInPx:y,initialValues:x,content:{title:h},cardProps:j,omitFooter:v=!1,isLoading:g=!1,buttonLabel:b="Save",testId:C,actionMessage:S}=e;return l().setAppElement("#__next"),(0,r.jsx)(c.Z,{isOpen:i,shouldCloseOnOverlayClick:!0,onRequestClose:n,contentLabel:h,style:{content:{width:null!=y?y:"900px"}},children:(0,r.jsx)(o.J9,{initialValues:x,validate:e=>f?f(e):void 0,onSubmit:e=>{m(e)},children:e=>{let{isValid:i,isSubmitting:l,values:c,errors:f,touched:m,setFieldValue:y,setValues:x}=e;return(0,r.jsx)(o.l0,{id:p,...null!=C?{"data-testid":C}:null,children:(0,r.jsx)(u.Z,{borderFooter:!0,footerSx:{p:3,position:"sticky",bottom:0,background:"gray"},bodySx:{px:4,py:4},sx:{border:"none"},...j,Header:(0,r.jsxs)(d,{children:[(0,r.jsx)(s.X6,{sx:{fontSize:"20px"},children:h}),(0,r.jsx)(s.x8,{type:"button",onClick:n})]}),Footer:v?null:(0,r.jsxs)(s.kC,{sx:{alignItems:"space-between"},children:[(0,r.jsx)(s.kC,{sx:{fontSize:"14px",alignItems:"center"},children:"function"==typeof S?S(e):S}),(0,r.jsxs)(s.kC,{sx:{ml:"auto"},children:[(0,r.jsx)(s.zx,{mr:2,type:"button",onClick:n,variant:"secondary",disabled:l||g,children:"Cancel"}),(0,r.jsx)(a.z,{label:b,form:p,type:"submit",disabled:!i||l||g,isLoading:l||g,sx:{fontWeight:"400",paddingBlock:"8px",paddingInline:"16px",fontSize:"14px",borderRadius:"4px"}})]})]}),children:t({isValid:i,isSubmitting:l,values:c,errors:f,touched:m,setFieldValue:y,setValues:x})})})}})})}}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[882],{62434:function(e,t,n){"use strict";n.d(t,{Zb:function(){return c},T$:function(){return m},eW:function(){return _},ZB:function(){return u},Lm:function(){return h}});var o=n(52322),r=n(50002),i=n(18337),a=n(6277),l=n(2784),d=n(67968),s=n.n(d);let c=e=>{let{checked:t=!1,size:n="medium",variant:i="solid",interactive:d,disabled:c,onClick:u,href:m,component:_="a",replace:h,...C}=e,x={...C,className:(0,a.W)(s().root,s()["size-".concat(n)],s()[i],{[s().interactive]:e.interactive}),"data-state":!0===t?"checked":void 0,"data-disabled":!0===e.disabled?"":void 0};return!0===e.interactive&&void 0===e.href?(0,o.jsx)("div",{...x,onClick:t=>{if(!0===e.disabled||void 0===e.onClick)return;let n=t.target;(0,r.JY)(n)===t.currentTarget&&e.onClick(t)},tabIndex:!0===e.disabled?void 0:0}):!0===e.interactive?(0,l.createElement)(_,{...x,href:e.href,onClick:e=>{let t=e.target;(0,r.JY)(t)!==e.currentTarget&&e.preventDefault()},..."a"===_?{}:{replace:e.replace}}):(0,o.jsx)("div",{...x})},u=e=>{let{className:t,component:n="img",overlay:r,...i}=e;return(0,o.jsxs)("div",{className:s().media,children:[(0,l.createElement)(n,{...i,className:(0,a.W)(s()["mediaComponent-".concat(n)],t)}),r?(0,o.jsx)("div",{className:s().mediaOverlay,children:r}):void 0]})},m=e=>(0,o.jsx)("div",{...e,className:s().actions}),_=e=>{let{action:t,loading:n=!1,startIcon:r,subtitle:a,title:l,error:d=!1,...c}=e,u=d?"tomato11":"grey11";return(0,o.jsxs)("div",{...c,className:s().footer,children:[(r||n)&&(0,o.jsxs)("div",{className:s().startIconBox,children:[n&&(0,o.jsx)(i.bg,{color:"grey11"}),!n&&r&&(0,o.jsx)(i.aX,{name:r,size:"small",color:u})]}),(0,o.jsxs)("div",{className:s().footerTexts,children:[(0,o.jsx)(i.bL,{component:"span",noWrap:!0,variant:"bold",children:l}),(0,o.jsx)(i.bL,{color:u,component:"span",noWrap:!0,variant:"small",children:a})]}),t]})},h=e=>{let{children:t,...n}=e;return(0,o.jsx)("div",{...n,className:s().status,children:(0,o.jsx)(i.bL,{align:"center",color:"inherit",component:"span",noWrap:!0,variant:"smallBold",children:t})})}},99195:function(e,t,n){"use strict";n.d(t,{O:function(){return l}});var o=n(52322),r=n(18337),i=n(56448),a=n(93671);let l=e=>{let{badgeColor:t,badgeTitle:n,tooltipContent:l}=function(e){let t=d[e.modelType];switch(e.modelStatus){case i.GJ.New:return{badgeColor:"green",badgeTitle:"New",tooltipContent:"This ".concat(t," exists only locally. Upon sync, it will be pushed to your remote repository.")};case i.GJ.Modified:return{badgeColor:"amber",badgeTitle:"Modified",tooltipContent:"This ".concat(t," has been modified locally. Upon sync, changes will be pushed to your remote repository.")};case i.GJ.Synced:return{badgeColor:"purple",badgeTitle:"Synced",tooltipContent:"This ".concat(t," is in sync with the remote repository.")};case i.GJ.Deleted:return{badgeColor:"tomato",badgeTitle:"Deleted",tooltipContent:"This ".concat(t," has been deleted locally.")};case i.GJ.Unknown:if(!e.isOnline)return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (no internet connection)."};if(e.authStatus===a.t.UNAUTHENTICATED)return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (not connected to Prismic)."};default:return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (unknown error)."}}}(e);return(0,o.jsx)(r.c3,{content:l,side:"bottom",children:(0,o.jsx)(r.m,{color:t,title:n})})},d={CustomType:"type",Slice:"slice"}},51507:function(e,t,n){"use strict";n.d(t,{b:function(){return C}});var o=n(52322),r=n(18337),i=n(39097),a=n.n(i),l=n(62434),d=n(63908),s=n(99195),c=n(27763);let u=e=>(0,o.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 5.5C4 4.67157 4.67157 4 5.5 4H18.5C19.3284 4 20 4.67157 20 5.5V12.4413C20 12.4512 19.9997 12.461 19.9991 12.4707C20.0072 12.6083 19.9586 12.7485 19.8536 12.8536C19.6583 13.0488 19.3417 13.0488 19.1464 12.8536L16.3536 10.0607C16.1583 9.8654 15.8417 9.8654 15.6464 10.0607L11.8536 13.8536C11.6583 14.0488 11.3417 14.0488 11.1464 13.8536L9.35355 12.0607C9.15829 11.8654 8.84171 11.8654 8.64645 12.0607L5 15.7071V18.5C5 18.7761 5.22386 19 5.5 19H12.5C12.7761 19 13 19.2239 13 19.5C13 19.7761 12.7761 20 12.5 20H5.5C4.67157 20 4 19.3284 4 18.5V15.5003V15.4997V5.5ZM11.5 12.7929L14.9393 9.35355C15.5251 8.76777 16.4749 8.76777 17.0607 9.35355L19 11.2929V5.5C19 5.22386 18.7761 5 18.5 5H5.5C5.22386 5 5 5.22386 5 5.5V14.2929L7.93934 11.3536C8.52513 10.7678 9.47487 10.7678 10.0607 11.3536L11.5 12.7929ZM16.5 13C16.7761 13 17 13.2239 17 13.5V16H19.5C19.7761 16 20 16.2239 20 16.5C20 16.7761 19.7761 17 19.5 17H17V19.5C17 19.7761 16.7761 20 16.5 20C16.2239 20 16 19.7761 16 19.5V17H13.5C13.2239 17 13 16.7761 13 16.5C13 16.2239 13.2239 16 13.5 16H16V13.5C16 13.2239 16.2239 13 16.5 13Z",fill:"currentColor"})}),m=e=>({hash:e.hash}),_=e=>e?Object.entries(e).reduce((e,t)=>{let[n,o]=t;return o.hash?{...e,[n]:{...o,...m(o)}}:e},{}):{},h={build:e=>({...e,screenshots:_(e.screenshots)}),variation(e,t){if(e.model.variations.length)return t?e.model.variations.find(e=>e.id===t):e.model.variations[0]}},C=e=>{let t;let{action:n,isDeleted:i=!1,onUpdateScreenshot:m,selected:_=!1,slice:C,variant:v,variationId:f}=e,b=h.variation(C,f);if(!b)return null;let g=(0,d.d7)(C,b),j=!i&&!!m,y="outlined"===v,w=void 0!==f;return t="selection"===e.mode?{disabled:i,interactive:!0,onClick:()=>{e.onSelectedChange(!_)}}:i?{interactive:!1}:{component:a(),href:c.Y.getBuilderPagePathname({libraryName:C.href,sliceName:C.model.name,variationId:b.id}),interactive:!0,replace:e.replace},(0,o.jsxs)(l.Zb,{"aria-label":"".concat(C.model.name," ").concat(b.name," slice card"),checked:_,"data-testid":"shared-slice-card",...t,..."outlined"===v?{size:"small",variant:"outlined"}:{},children:[void 0!==g?(0,o.jsx)(l.ZB,{alt:"Preview image",overlay:j&&!y?(0,o.jsx)(r.D,{alignItems:"center",justifyContent:"center",children:(0,o.jsx)(x,{onClick:m})}):void 0,src:g}):(0,o.jsx)(l.ZB,{component:"div",children:(0,o.jsxs)(r.D,{alignItems:"center",flexDirection:"column",gap:8,justifyContent:"center",children:[(0,o.jsx)(r.bL,{color:"grey11",component:"span",children:"No screenshot available"}),j&&!y?(0,o.jsx)(x,{onClick:m}):void 0]})}),(0,o.jsx)(l.eW,{action:"checkbox"===n.type&&"selection"===e.mode?(0,o.jsx)("div",{onClick:e=>e.stopPropagation(),children:(0,o.jsx)(r.U,{checked:_,disabled:i,onCheckedChange:e.onSelectedChange})}):"menu"===n.type?(0,o.jsxs)(r.ar,{modal:!0,children:[(0,o.jsx)(r.av,{disabled:i,children:(0,o.jsx)(r.aZ,{hiddenLabel:"Slice actions",icon:"moreVert"})}),(0,o.jsxs)(r.as,{align:"end","data-testid":"slice-action-icon-dropdown",children:[j&&y?(0,o.jsx)(r.at,{onSelect:m,startIcon:(0,o.jsx)(u,{}),children:"Update screenshot"}):void 0,(0,o.jsx)(r.at,{onSelect:n.onRename,startIcon:(0,o.jsx)(r.aX,{name:"edit"}),children:"Rename"}),!0===n.removeDisabled&&w?(0,o.jsx)(r.c3,{content:"The slice needs to have at least one variation.",side:"bottom",stableMount:!0,children:(0,o.jsx)(p,{disabled:!0,onSelect:n.onRemove})}):(0,o.jsx)(p,{disabled:!0===n.removeDisabled,onSelect:n.onRemove})]})]}):"remove"===n.type?(0,o.jsx)(r.aZ,{icon:"close",onClick:()=>!i&&n.onRemove(),hiddenLabel:"Remove slice"}):"status"===n.type?(0,o.jsx)(s.O,{authStatus:n.authStatus,isOnline:n.isOnline,modelStatus:n.modelStatus,modelType:"Slice"}):void 0,subtitle:(0,o.jsx)(o.Fragment,{children:w?b.id:"".concat(C.model.variations.length," variation").concat(C.model.variations.length>1?"s":"")}),title:w?b.name:C.model.name}),j&&!w&&(0,d.cx)(C)>0?(0,o.jsx)(l.Lm,{children:"Missing screenshot"}):void 0]})},x=e=>(0,o.jsx)(r.E,{onClick:e.onClick,renderStartIcon:()=>(0,o.jsx)(u,{color:r.t.color.grey11}),color:"grey",children:"Update screenshot"}),p=e=>(0,o.jsx)(r.at,{...e,color:"tomato",startIcon:(0,o.jsx)(r.aX,{name:"delete"}),children:"Delete"})},27763:function(e,t,n){"use strict";n.d(t,{Y:function(){return o}});let o={getBuilderPagePathname:e=>"/slices/".concat(e.libraryName.replaceAll("/","--"),"/").concat(e.sliceName,"/").concat(e.variationId)}},56141:function(e,t,n){"use strict";n.d(t,{S:function(){return r}});var o=n(52322);let r=e=>(0,o.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,o.jsxs)("g",{clipPath:"url(#clip0_5065_192538)",children:[(0,o.jsx)("path",{d:"M9.66862 19.9993C11.1406 19.9993 12.3353 18.8047 12.3353 17.3327V14.666H9.66862C8.19662 14.666 7.00195 15.8607 7.00195 17.3327C7.00195 18.8047 8.19662 19.9993 9.66862 19.9993Z",fill:"#0ACF83"}),(0,o.jsx)("path",{d:"M7.00195 12.0007C7.00195 10.5287 8.19662 9.33398 9.66862 9.33398H12.3353V14.6673H9.66862C8.19662 14.6673 7.00195 13.4727 7.00195 12.0007Z",fill:"#A259FF"}),(0,o.jsx)("path",{d:"M7.00195 6.66667C7.00195 5.19467 8.19662 4 9.66862 4H12.3353V9.33333H9.66862C8.19662 9.33333 7.00195 8.13867 7.00195 6.66667Z",fill:"#F24E1E"}),(0,o.jsx)("path",{d:"M12.334 4H15.0007C16.4727 4 17.6673 5.19467 17.6673 6.66667C17.6673 8.13867 16.4727 9.33333 15.0007 9.33333H12.334V4Z",fill:"#FF7262"}),(0,o.jsx)("path",{d:"M17.6673 12.0007C17.6673 13.4727 16.4727 14.6673 15.0007 14.6673C13.5287 14.6673 12.334 13.4727 12.334 12.0007C12.334 10.5287 13.5287 9.33398 15.0007 9.33398C16.4727 9.33398 17.6673 10.5287 17.6673 12.0007Z",fill:"#1ABCFE"})]}),(0,o.jsx)("defs",{children:(0,o.jsx)("clipPath",{id:"clip0_5065_192538",children:(0,o.jsx)("rect",{width:"10.6688",height:"16",fill:"white",transform:"translate(7 4)"})})})]})},30527:function(e,t,n){"use strict";n.d(t,{Z:function(){return s},W:function(){return d}});var o=n(52322),r=n(2784),i=n(75289);let a=e=>{let{bg:t,background:n,sx:r,withRadius:a,radius:l,children:d}=e;return(0,o.jsx)(i.xu,{sx:{p:4,bg:t||n,...a?{borderBottomLeftRadius:l,borderBottomRightRadius:l}:null,...r},children:d})},l=(0,r.createContext)("6px"),d=()=>(0,r.useContext)(l),s=e=>{let{Header:t=null,SubHeader:n=null,Body:r=null,Footer:d=null,borderFooter:s=!1,radius:c="6px",bodySx:u={},footerSx:m={},sx:_=null,bg:h,background:C,children:x,...p}=e;return(0,o.jsx)(l.Provider,{value:c,children:(0,o.jsxs)(i.Zb,{sx:{border:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.borders))},borderRadius:c,..._},...p,children:[t||null,n||null,(0,o.jsxs)(a,{bg:h,background:C,sx:u,withRadius:!d,children:[r?(0,o.jsx)(r,{}):null,x||null]}),d?(0,o.jsx)(a,{bg:h,background:C,sx:{...s?{borderTop:e=>{let{colors:t}=e;return"1px solid ".concat(String(null==t?void 0:t.borders))}}:null,...m},radius:c,withRadius:!0,children:"object"==typeof d?d:(0,o.jsx)(d,{})}):null]})})}},7974:function(e,t,n){"use strict";n.d(t,{Sn:function(){return l},lS:function(){return o},nG:function(){return r},pq:function(){return d},rd:function(){return a},xo:function(){return i}});let o=["components","update","insert"],r=["png","jpg","jpeg"],i=/^[A-Za-z0-9]+(?:_[A-Za-z0-9]+)*$/,a="placeholders/What_are_Slices_mrvome",l="SM_HELP_VIDEOS/mock_data",d="slice-machine-simulator"},67968:function(e){e.exports={flex:"Card_flex__opby1",grid:"Card_grid__VAvIS",column:"Card_column__W4ACG Card_flex__opby1",root:"Card_root__YVuvU Card_column__W4ACG Card_flex__opby1","size-small":"Card_size-small__aIlxd","size-medium":"Card_size-medium__xegz0",solid:"Card_solid__GNGar",outlined:"Card_outlined__W_dxI",interactive:"Card_interactive__rXw5L",media:"Card_media__l0kHL Card_column__W4ACG Card_flex__opby1","mediaComponent-div":"Card_mediaComponent-div__Y2_PZ Card_grid__VAvIS","mediaComponent-img":"Card_mediaComponent-img__ezOTu",mediaOverlay:"Card_mediaOverlay__Aa__Q Card_grid__VAvIS",nonMedia:"Card_nonMedia__Fv3Mz Card_flex__opby1",actions:"Card_actions__XdhOt Card_nonMedia__Fv3Mz Card_flex__opby1",footer:"Card_footer__U0HS1 Card_nonMedia__Fv3Mz Card_flex__opby1",footerTexts:"Card_footerTexts__rTXup Card_column__W4ACG Card_flex__opby1",status:"Card_status__PNN2a Card_column__W4ACG Card_flex__opby1",startIconBox:"Card_startIconBox__1_L4u"}}}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[882],{62434:function(e,t,n){"use strict";n.d(t,{Zb:function(){return c},T$:function(){return m},eW:function(){return _},ZB:function(){return u},Lm:function(){return h}});var o=n(52322),r=n(50002),i=n(11699),a=n(6277),l=n(2784),d=n(67968),s=n.n(d);let c=e=>{let{checked:t=!1,size:n="medium",variant:i="solid",interactive:d,disabled:c,onClick:u,href:m,component:_="a",replace:h,...C}=e,x={...C,className:(0,a.W)(s().root,s()["size-".concat(n)],s()[i],{[s().interactive]:e.interactive}),"data-state":!0===t?"checked":void 0,"data-disabled":!0===e.disabled?"":void 0};return!0===e.interactive&&void 0===e.href?(0,o.jsx)("div",{...x,onClick:t=>{if(!0===e.disabled||void 0===e.onClick)return;let n=t.target;(0,r.JY)(n)===t.currentTarget&&e.onClick(t)},tabIndex:!0===e.disabled?void 0:0}):!0===e.interactive?(0,l.createElement)(_,{...x,href:e.href,onClick:e=>{let t=e.target;(0,r.JY)(t)!==e.currentTarget&&e.preventDefault()},..."a"===_?{}:{replace:e.replace}}):(0,o.jsx)("div",{...x})},u=e=>{let{className:t,component:n="img",overlay:r,...i}=e;return(0,o.jsxs)("div",{className:s().media,children:[(0,l.createElement)(n,{...i,className:(0,a.W)(s()["mediaComponent-".concat(n)],t)}),r?(0,o.jsx)("div",{className:s().mediaOverlay,children:r}):void 0]})},m=e=>(0,o.jsx)("div",{...e,className:s().actions}),_=e=>{let{action:t,loading:n=!1,startIcon:r,subtitle:a,title:l,error:d=!1,...c}=e,u=d?"tomato11":"grey11";return(0,o.jsxs)("div",{...c,className:s().footer,children:[(r||n)&&(0,o.jsxs)("div",{className:s().startIconBox,children:[n&&(0,o.jsx)(i.bg,{color:"grey11"}),!n&&r&&(0,o.jsx)(i.aX,{name:r,size:"small",color:u})]}),(0,o.jsxs)("div",{className:s().footerTexts,children:[(0,o.jsx)(i.bL,{component:"span",noWrap:!0,variant:"bold",children:l}),(0,o.jsx)(i.bL,{color:u,component:"span",noWrap:!0,variant:"small",children:a})]}),t]})},h=e=>{let{children:t,...n}=e;return(0,o.jsx)("div",{...n,className:s().status,children:(0,o.jsx)(i.bL,{align:"center",color:"inherit",component:"span",noWrap:!0,variant:"smallBold",children:t})})}},99195:function(e,t,n){"use strict";n.d(t,{O:function(){return l}});var o=n(52322),r=n(11699),i=n(56448),a=n(93671);let l=e=>{let{badgeColor:t,badgeTitle:n,tooltipContent:l}=function(e){let t=d[e.modelType];switch(e.modelStatus){case i.GJ.New:return{badgeColor:"green",badgeTitle:"New",tooltipContent:"This ".concat(t," exists only locally. Upon sync, it will be pushed to your remote repository.")};case i.GJ.Modified:return{badgeColor:"amber",badgeTitle:"Modified",tooltipContent:"This ".concat(t," has been modified locally. Upon sync, changes will be pushed to your remote repository.")};case i.GJ.Synced:return{badgeColor:"purple",badgeTitle:"Synced",tooltipContent:"This ".concat(t," is in sync with the remote repository.")};case i.GJ.Deleted:return{badgeColor:"tomato",badgeTitle:"Deleted",tooltipContent:"This ".concat(t," has been deleted locally.")};case i.GJ.Unknown:if(!e.isOnline)return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (no internet connection)."};if(e.authStatus===a.t.UNAUTHENTICATED)return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (not connected to Prismic)."};default:return{badgeColor:"grey",badgeTitle:"Unknown",tooltipContent:"Data from the remote repository could not be fetched (unknown error)."}}}(e);return(0,o.jsx)(r.c3,{content:l,side:"bottom",children:(0,o.jsx)(r.m,{color:t,title:n})})},d={CustomType:"type",Slice:"slice"}},51507:function(e,t,n){"use strict";n.d(t,{b:function(){return C}});var o=n(52322),r=n(11699),i=n(39097),a=n.n(i),l=n(62434),d=n(63908),s=n(99195),c=n(27763);let u=e=>(0,o.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 5.5C4 4.67157 4.67157 4 5.5 4H18.5C19.3284 4 20 4.67157 20 5.5V12.4413C20 12.4512 19.9997 12.461 19.9991 12.4707C20.0072 12.6083 19.9586 12.7485 19.8536 12.8536C19.6583 13.0488 19.3417 13.0488 19.1464 12.8536L16.3536 10.0607C16.1583 9.8654 15.8417 9.8654 15.6464 10.0607L11.8536 13.8536C11.6583 14.0488 11.3417 14.0488 11.1464 13.8536L9.35355 12.0607C9.15829 11.8654 8.84171 11.8654 8.64645 12.0607L5 15.7071V18.5C5 18.7761 5.22386 19 5.5 19H12.5C12.7761 19 13 19.2239 13 19.5C13 19.7761 12.7761 20 12.5 20H5.5C4.67157 20 4 19.3284 4 18.5V15.5003V15.4997V5.5ZM11.5 12.7929L14.9393 9.35355C15.5251 8.76777 16.4749 8.76777 17.0607 9.35355L19 11.2929V5.5C19 5.22386 18.7761 5 18.5 5H5.5C5.22386 5 5 5.22386 5 5.5V14.2929L7.93934 11.3536C8.52513 10.7678 9.47487 10.7678 10.0607 11.3536L11.5 12.7929ZM16.5 13C16.7761 13 17 13.2239 17 13.5V16H19.5C19.7761 16 20 16.2239 20 16.5C20 16.7761 19.7761 17 19.5 17H17V19.5C17 19.7761 16.7761 20 16.5 20C16.2239 20 16 19.7761 16 19.5V17H13.5C13.2239 17 13 16.7761 13 16.5C13 16.2239 13.2239 16 13.5 16H16V13.5C16 13.2239 16.2239 13 16.5 13Z",fill:"currentColor"})}),m=e=>({hash:e.hash}),_=e=>e?Object.entries(e).reduce((e,t)=>{let[n,o]=t;return o.hash?{...e,[n]:{...o,...m(o)}}:e},{}):{},h={build:e=>({...e,screenshots:_(e.screenshots)}),variation(e,t){if(e.model.variations.length)return t?e.model.variations.find(e=>e.id===t):e.model.variations[0]}},C=e=>{let t;let{action:n,isDeleted:i=!1,onUpdateScreenshot:m,selected:_=!1,slice:C,variant:v,variationId:f}=e,b=h.variation(C,f);if(!b)return null;let g=(0,d.d7)(C,b),j=!i&&!!m,y="outlined"===v,w=void 0!==f;return t="selection"===e.mode?{disabled:i,interactive:!0,onClick:()=>{e.onSelectedChange(!_)}}:i?{interactive:!1}:{component:a(),href:c.Y.getBuilderPagePathname({libraryName:C.href,sliceName:C.model.name,variationId:b.id}),interactive:!0,replace:e.replace},(0,o.jsxs)(l.Zb,{"aria-label":"".concat(C.model.name," ").concat(b.name," slice card"),checked:_,"data-testid":"shared-slice-card",...t,..."outlined"===v?{size:"small",variant:"outlined"}:{},children:[void 0!==g?(0,o.jsx)(l.ZB,{alt:"Preview image",overlay:j&&!y?(0,o.jsx)(r.D,{alignItems:"center",justifyContent:"center",children:(0,o.jsx)(x,{onClick:m})}):void 0,src:g}):(0,o.jsx)(l.ZB,{component:"div",children:(0,o.jsxs)(r.D,{alignItems:"center",flexDirection:"column",gap:8,justifyContent:"center",children:[(0,o.jsx)(r.bL,{color:"grey11",component:"span",children:"No screenshot available"}),j&&!y?(0,o.jsx)(x,{onClick:m}):void 0]})}),(0,o.jsx)(l.eW,{action:"checkbox"===n.type&&"selection"===e.mode?(0,o.jsx)("div",{onClick:e=>e.stopPropagation(),children:(0,o.jsx)(r.U,{checked:_,disabled:i,onCheckedChange:e.onSelectedChange})}):"menu"===n.type?(0,o.jsxs)(r.ar,{modal:!0,children:[(0,o.jsx)(r.av,{disabled:i,children:(0,o.jsx)(r.aZ,{hiddenLabel:"Slice actions",icon:"moreVert"})}),(0,o.jsxs)(r.as,{align:"end","data-testid":"slice-action-icon-dropdown",children:[j&&y?(0,o.jsx)(r.at,{onSelect:m,startIcon:(0,o.jsx)(u,{}),children:"Update screenshot"}):void 0,(0,o.jsx)(r.at,{onSelect:n.onRename,startIcon:(0,o.jsx)(r.aX,{name:"edit"}),children:"Rename"}),!0===n.removeDisabled&&w?(0,o.jsx)(r.c3,{content:"The slice needs to have at least one variation.",side:"bottom",stableMount:!0,children:(0,o.jsx)(p,{disabled:!0,onSelect:n.onRemove})}):(0,o.jsx)(p,{disabled:!0===n.removeDisabled,onSelect:n.onRemove})]})]}):"remove"===n.type?(0,o.jsx)(r.aZ,{icon:"close",onClick:()=>!i&&n.onRemove(),hiddenLabel:"Remove slice"}):"status"===n.type?(0,o.jsx)(s.O,{authStatus:n.authStatus,isOnline:n.isOnline,modelStatus:n.modelStatus,modelType:"Slice"}):void 0,subtitle:(0,o.jsx)(o.Fragment,{children:w?b.id:"".concat(C.model.variations.length," variation").concat(C.model.variations.length>1?"s":"")}),title:w?b.name:C.model.name}),j&&!w&&(0,d.cx)(C)>0?(0,o.jsx)(l.Lm,{children:"Missing screenshot"}):void 0]})},x=e=>(0,o.jsx)(r.E,{onClick:e.onClick,renderStartIcon:()=>(0,o.jsx)(u,{color:r.t.color.grey11}),color:"grey",children:"Update screenshot"}),p=e=>(0,o.jsx)(r.at,{...e,color:"tomato",startIcon:(0,o.jsx)(r.aX,{name:"delete"}),children:"Delete"})},27763:function(e,t,n){"use strict";n.d(t,{Y:function(){return o}});let o={getBuilderPagePathname:e=>"/slices/".concat(e.libraryName.replaceAll("/","--"),"/").concat(e.sliceName,"/").concat(e.variationId)}},56141:function(e,t,n){"use strict";n.d(t,{S:function(){return r}});var o=n(52322);let r=e=>(0,o.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,o.jsxs)("g",{clipPath:"url(#clip0_5065_192538)",children:[(0,o.jsx)("path",{d:"M9.66862 19.9993C11.1406 19.9993 12.3353 18.8047 12.3353 17.3327V14.666H9.66862C8.19662 14.666 7.00195 15.8607 7.00195 17.3327C7.00195 18.8047 8.19662 19.9993 9.66862 19.9993Z",fill:"#0ACF83"}),(0,o.jsx)("path",{d:"M7.00195 12.0007C7.00195 10.5287 8.19662 9.33398 9.66862 9.33398H12.3353V14.6673H9.66862C8.19662 14.6673 7.00195 13.4727 7.00195 12.0007Z",fill:"#A259FF"}),(0,o.jsx)("path",{d:"M7.00195 6.66667C7.00195 5.19467 8.19662 4 9.66862 4H12.3353V9.33333H9.66862C8.19662 9.33333 7.00195 8.13867 7.00195 6.66667Z",fill:"#F24E1E"}),(0,o.jsx)("path",{d:"M12.334 4H15.0007C16.4727 4 17.6673 5.19467 17.6673 6.66667C17.6673 8.13867 16.4727 9.33333 15.0007 9.33333H12.334V4Z",fill:"#FF7262"}),(0,o.jsx)("path",{d:"M17.6673 12.0007C17.6673 13.4727 16.4727 14.6673 15.0007 14.6673C13.5287 14.6673 12.334 13.4727 12.334 12.0007C12.334 10.5287 13.5287 9.33398 15.0007 9.33398C16.4727 9.33398 17.6673 10.5287 17.6673 12.0007Z",fill:"#1ABCFE"})]}),(0,o.jsx)("defs",{children:(0,o.jsx)("clipPath",{id:"clip0_5065_192538",children:(0,o.jsx)("rect",{width:"10.6688",height:"16",fill:"white",transform:"translate(7 4)"})})})]})},30527:function(e,t,n){"use strict";n.d(t,{Z:function(){return s},W:function(){return d}});var o=n(52322),r=n(2784),i=n(75289);let a=e=>{let{bg:t,background:n,sx:r,withRadius:a,radius:l,children:d}=e;return(0,o.jsx)(i.xu,{sx:{p:4,bg:t||n,...a?{borderBottomLeftRadius:l,borderBottomRightRadius:l}:null,...r},children:d})},l=(0,r.createContext)("6px"),d=()=>(0,r.useContext)(l),s=e=>{let{Header:t=null,SubHeader:n=null,Body:r=null,Footer:d=null,borderFooter:s=!1,radius:c="6px",bodySx:u={},footerSx:m={},sx:_=null,bg:h,background:C,children:x,...p}=e;return(0,o.jsx)(l.Provider,{value:c,children:(0,o.jsxs)(i.Zb,{sx:{border:e=>{var t;return"1px solid ".concat(String(null===(t=e.colors)||void 0===t?void 0:t.borders))},borderRadius:c,..._},...p,children:[t||null,n||null,(0,o.jsxs)(a,{bg:h,background:C,sx:u,withRadius:!d,children:[r?(0,o.jsx)(r,{}):null,x||null]}),d?(0,o.jsx)(a,{bg:h,background:C,sx:{...s?{borderTop:e=>{let{colors:t}=e;return"1px solid ".concat(String(null==t?void 0:t.borders))}}:null,...m},radius:c,withRadius:!0,children:"object"==typeof d?d:(0,o.jsx)(d,{})}):null]})})}},7974:function(e,t,n){"use strict";n.d(t,{Sn:function(){return l},lS:function(){return o},nG:function(){return r},pq:function(){return d},rd:function(){return a},xo:function(){return i}});let o=["components","update","insert"],r=["png","jpg","jpeg"],i=/^[A-Za-z0-9]+(?:_[A-Za-z0-9]+)*$/,a="placeholders/What_are_Slices_mrvome",l="SM_HELP_VIDEOS/mock_data",d="slice-machine-simulator"},67968:function(e){e.exports={flex:"Card_flex__opby1",grid:"Card_grid__VAvIS",column:"Card_column__W4ACG Card_flex__opby1",root:"Card_root__YVuvU Card_column__W4ACG Card_flex__opby1","size-small":"Card_size-small__aIlxd","size-medium":"Card_size-medium__xegz0",solid:"Card_solid__GNGar",outlined:"Card_outlined__W_dxI",interactive:"Card_interactive__rXw5L",media:"Card_media__l0kHL Card_column__W4ACG Card_flex__opby1","mediaComponent-div":"Card_mediaComponent-div__Y2_PZ Card_grid__VAvIS","mediaComponent-img":"Card_mediaComponent-img__ezOTu",mediaOverlay:"Card_mediaOverlay__Aa__Q Card_grid__VAvIS",nonMedia:"Card_nonMedia__Fv3Mz Card_flex__opby1",actions:"Card_actions__XdhOt Card_nonMedia__Fv3Mz Card_flex__opby1",footer:"Card_footer__U0HS1 Card_nonMedia__Fv3Mz Card_flex__opby1",footerTexts:"Card_footerTexts__rTXup Card_column__W4ACG Card_flex__opby1",status:"Card_status__PNN2a Card_column__W4ACG Card_flex__opby1",startIconBox:"Card_startIconBox__1_L4u"}}}]);