text: (self.webpackChunkmy_project=self.webpackChunkmy_project||[]).push([[994],{89647:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(63038)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),l=r(n(45697)),u=n(97132),d=n(5493),s=n(19408),c=r(n(23980)),f=n(68547);function p(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}var m=function(e){var t=e.displayedFilters,n=(0,i.useState)(!1),r=(0,o.default)(n,2),a=r[0],l=r[1],p=(0,u.useIntl)().formatMessage,m=(0,i.useRef)(),g=(0,f.useTracking)().trackUsage,y=function(){a||g("willFilterEntries"),l((function(e){return!e}))};return i.default.createElement(i.default.Fragment,null,i.default.createElement(d.Box,{paddingTop:1,paddingBottom:1},i.default.createElement(s.Button,{variant:"tertiary",ref:m,startIcon:i.default.createElement(c.default,null),onClick:y,size:"S"},p({id:"app.utils.filters",defaultMessage:"Filters"})),a&&i.default.createElement(f.FilterPopoverURLQuery,{displayedFilters:t,isVisible:a,onToggle:y,source:m})),i.default.createElement(f.FilterListURLQuery,{filtersSchema:t}))};m.propTypes={displayedFilters:l.default.arrayOf(l.default.shape({name:l.default.string.isRequired,metadatas:l.default.shape({label:l.default.string}),fieldSchema:l.default.shape({type:l.default.string})})).isRequired};var g=m;t.default=g},27755:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(27361)),o=n(68547),i=["json","component","media","richtext","dynamiczone","password"],l=["createdAt","updatedAt"],u=function(e,t){var n=(0,o.useRBACProvider)().allPermissions,r=(0,o.findMatchingPermissions)(n,[{action:"plugin::content-manager.explorer.read",subject:t}]),u=(0,a.default)(r,["0","properties","fields"],[]);return Object.keys((0,a.default)(e,["attributes"]),{}).filter((function(t){var n=(0,a.default)(e,["attributes",t],{});return!!n.type&&(!i.includes(n.type)&&!(!u.includes(t)&&"id"!==t&&!l.includes(t)))})).sort()};t.default=u},72632:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=r(n(27755)),l=r(n(89647)),u=function(e){var t=e.contentType,n=e.slug,r=e.metadatas,o=(0,i.default)(t,n).map((function(e){var n=t.attributes[e],a=n.type,o=n.enum,i={name:"didFilterEntries",properties:{useRelation:"relation"===a}},l=r[e].list,u=l.mainField;return{name:e,metadatas:{label:l.label},fieldSchema:{type:a,options:o,mainField:u},trackedEvent:i}}));return a.default.createElement(l.default,{displayedFilters:o})};u.propTypes={contentType:o.default.object.isRequired,metadatas:o.default.object.isRequired,slug:o.default.string.isRequired};var d=u;t.default=d},56229:(e,t,n)=>{"use strict";var r=n(25108),a=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(87757)),i=a(n(59713)),l=a(n(48926)),u=a(n(63038)),d=n(67294),s=n(39711),c=a(n(9669)),f=a(n(27361)),p=n(68547),m=n(37424),g=a(n(45697)),y=a(n(69590)),b=n(53777),v=n(28564),h=n(14772),E=n(98744),O=a(n(22787));function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j=function(e){var t=e.allLayoutData,n=e.children,a=e.slug,i=e.id,g=e.origin,y=(0,p.useNotification)(),w=(0,p.useTracking)().trackUsage,j=(0,s.useHistory)(),P=j.push,C=j.replace,k=(0,p.useQueryParams)(),_=(0,u.default)(k,1)[0].rawQuery,R=(0,m.useDispatch)(),T=(0,m.useSelector)(O.default),x=T.componentsDataStructure,D=T.contentTypeDataStructure,S=T.data,I=T.isLoading,q=T.status,F=(0,h.useFindRedirectionLink)(a),L=(0,d.useRef)(!0),A=(0,d.useRef)(w),B=(0,d.useRef)(t),N=null===i,W=(0,d.useMemo)((function(){return N&&!g?null:(0,v.getRequestUrl)("collection-types/".concat(a,"/").concat(g||i))}),[a,i,N,g]),z=(0,d.useCallback)((function(e){return g?(0,p.contentManagementUtilRemoveFieldsFromData)(e,B.current.contentType,B.current.components):e}),[g]),U=(0,d.useCallback)((function(e){var t=(0,v.removePasswordFieldsFromData)(e,B.current.contentType,B.current.components);return(0,p.formatComponentData)(t,B.current.contentType,B.current.components)}),[]);(0,d.useEffect)((function(){var e=Object.keys(t.components).reduce((function(e,n){var r=(0,v.createDefaultForm)((0,f.default)(t,["components",n,"attributes"],{}),t.components);return e[n]=(0,p.formatComponentData)(r,t.components[n],t.components),e}),{}),n=(0,v.createDefaultForm)(t.contentType.attributes,t.components),r=(0,p.formatComponentData)(n,t.contentType,t.components);R((0,E.setDataStructures)(e,r))}),[t,R]),(0,d.useEffect)((function(){return function(){R((0,E.resetProps)())}}),[R]),(0,d.useEffect)((function(){var e=c.default.CancelToken.source(),t=function(){var e=(0,l.default)(o.default.mark((function e(t){var n,a,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return R((0,E.getData)()),e.prev=1,e.next=4,b.axiosInstance.get(W,{cancelToken:t.token});case 4:n=e.sent,a=n.data,R((0,E.getDataSucceeded)(U(z(a)))),e.next=19;break;case 9:if(e.prev=9,e.t0=e.catch(1),!c.default.isCancel(e.t0)){e.next=13;break}return e.abrupt("return");case 13:if(r.error(e.t0),404!==(i=(0,f.default)(e.t0,"response.status",null))){e.next=18;break}return P(F),e.abrupt("return");case 18:403===i&&(y({type:"info",message:{id:(0,v.getTrad)("permissions.not-allowed.update")}}),P(F));case 19:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}(),n=function(){var e=(0,l.default)(o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,R((0,E.getData)());case 2:return e.next=4,R((0,E.initForm)(_));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return L.current?(W?t(e):n(),function(){e.cancel("Operation canceled by the user.")}):function(){}}),[z,U,P,W,R,_,F,y]);var V=(0,d.useCallback)((function(e){var t=e.response.data;r.error(t);var n=(0,f.default)(t,["error","message"],"Bad Request");Array.isArray(n)&&(n=(0,f.default)(n,["0","messages","0","id"])),"string"===typeof n&&y({type:"warning",message:n})}),[y]),H=(0,d.useCallback)(function(){var e=(0,l.default)(o.default.mark((function e(t){var n,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,A.current("willDeleteEntry",t),e.next=4,b.axiosInstance.delete((0,v.getRequestUrl)("collection-types/".concat(a,"/").concat(i)));case 4:return n=e.sent,r=n.data,y({type:"success",message:{id:(0,v.getTrad)("success.record.delete")}}),A.current("didDeleteEntry",t),e.abrupt("return",Promise.resolve(r));case 11:return e.prev=11,e.t0=e.catch(0),A.current("didNotDeleteEntry",M({error:e.t0},t)),e.abrupt("return",Promise.reject(e.t0));case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t){return e.apply(this,arguments)}}(),[i,a,y]),G=(0,d.useCallback)((function(){C(F)}),[F,C]),Z=(0,d.useCallback)(function(){var e=(0,l.default)(o.default.mark((function e(t,n){var r,i,l;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="".concat((0,v.getRequestUrl)("collection-types/".concat(a))).concat(_),e.prev=1,R((0,E.setStatus)("submit-pending")),e.next=5,b.axiosInstance.post(r,t);case 5:i=e.sent,l=i.data,A.current("didCreateEntry",n),y({type:"success",message:{id:(0,v.getTrad)("success.record.save")}}),R((0,E.submitSucceeded)(U(l))),R((0,E.setStatus)("resolved")),C("/content-manager/collectionType/".concat(a,"/").concat(l.id).concat(_)),e.next=19;break;case 14:e.prev=14,e.t0=e.catch(1),A.current("didNotCreateEntry",{error:e.t0,trackerProperty:n}),V(e.t0),R((0,E.setStatus)("resolved"));case 19:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(t,n){return e.apply(this,arguments)}}(),[U,V,C,a,R,_,y]),$=(0,d.useCallback)((0,l.default)(o.default.mark((function e(){var t,n,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,A.current("willPublishEntry"),t=(0,v.getRequestUrl)("collection-types/".concat(a,"/").concat(i,"/actions/publish")),R((0,E.setStatus)("publish-pending")),e.next=6,b.axiosInstance.post(t);case 6:n=e.sent,r=n.data,A.current("didPublishEntry"),R((0,E.submitSucceeded)(U(r))),R((0,E.setStatus)("resolved")),y({type:"success",message:{id:(0,v.getTrad)("success.record.publish")}}),e.next=18;break;case 14:e.prev=14,e.t0=e.catch(0),V(e.t0),R((0,E.setStatus)("resolved"));case 18:case"end":return e.stop()}}),e,null,[[0,14]])}))),[U,V,i,a,R,y]),Q=(0,d.useCallback)(function(){var e=(0,l.default)(o.default.mark((function e(t,n){var r,l,u;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,v.getRequestUrl)("collection-types/".concat(a,"/").concat(i)),e.prev=1,A.current("willEditEntry",n),R((0,E.setStatus)("submit-pending")),e.next=6,b.axiosInstance.put(r,t);case 6:l=e.sent,u=l.data,A.current("didEditEntry",{trackerProperty:n}),y({type:"success",message:{id:(0,v.getTrad)("success.record.save")}}),R((0,E.submitSucceeded)(U(u))),R((0,E.setStatus)("resolved")),e.next=19;break;case 14:e.prev=14,e.t0=e.catch(1),A.current("didNotEditEntry",{error:e.t0,trackerProperty:n}),V(e.t0),R((0,E.setStatus)("resolved"));case 19:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(t,n){return e.apply(this,arguments)}}(),[U,V,a,i,R,y]),Y=(0,d.useCallback)((0,l.default)(o.default.mark((function e(){var t,n,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=(0,v.getRequestUrl)("collection-types/".concat(a,"/").concat(i,"/actions/unpublish")),R((0,E.setStatus)("unpublish-pending")),e.prev=2,A.current("willUnpublishEntry"),e.next=6,b.axiosInstance.post(t);case 6:n=e.sent,r=n.data,A.current("didUnpublishEntry"),y({type:"success",message:{id:(0,v.getTrad)("success.record.unpublish")}}),R((0,E.submitSucceeded)(U(r))),R((0,E.setStatus)("resolved")),e.next=18;break;case 14:e.prev=14,e.t0=e.catch(2),R((0,E.setStatus)("resolved")),V(e.t0);case 18:case"end":return e.stop()}}),e,null,[[2,14]])}))),[U,V,i,a,R,y]);return n({componentsDataStructure:x,contentTypeDataStructure:D,data:S,isCreatingEntry:N,isLoadingForData:I,onDelete:H,onDeleteSucceeded:G,onPost:Z,onPublish:$,onPut:Q,onUnpublish:Y,status:q,redirectionLink:F})};j.defaultProps={id:null,origin:null},j.propTypes={allLayoutData:g.default.exact({components:g.default.object.isRequired,contentType:g.default.shape({apiID:g.default.string.isRequired,attributes:g.default.object.isRequired,info:g.default.object.isRequired,isDisplayed:g.default.bool.isRequired,kind:g.default.string.isRequired,layouts:g.default.object.isRequired,metadatas:g.default.object.isRequired,options:g.default.object.isRequired,pluginOptions:g.default.object,settings:g.default.object.isRequired,uid:g.default.string.isRequired}).isRequired}).isRequired,children:g.default.func.isRequired,id:g.default.string,origin:g.default.string,slug:g.default.string.isRequired};var P=(0,d.memo)(j,y.default);t.default=P},4185:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=r(n(78384)),l=n(97132),u=r(n(83784)),d=n(5493),s=n(9008),c=n(67826),f=n(49425),p=n(68547),m=n(28564),g=i.default.span.withConfig({displayName:"ComponentInitializer__IconWrapper",componentId:"sc-t1smwi-0"})(["> svg{width:",";height:",";> circle{fill:",";}> path{fill:",";}}"],(0,p.pxToRem)(24),(0,p.pxToRem)(24),(function(e){return e.theme.colors.primary200}),(function(e){return e.theme.colors.primary600})),y=function(e){var t=e.error,n=e.isReadOnly,r=e.onClick,o=(0,l.useIntl)().formatMessage;return a.default.createElement(a.default.Fragment,null,a.default.createElement(d.Box,{as:"button",background:"neutral100",borderColor:t?"danger600":"neutral200",disabled:n,hasRadius:!0,onClick:r,paddingTop:9,paddingBottom:9,type:"button"},a.default.createElement(s.Stack,{size:2},a.default.createElement(c.Flex,{justifyContent:"center",style:{cursor:n?"not-allowed":"inherit"}},a.default.createElement(g,null,a.default.createElement(u.default,null))),a.default.createElement(c.Flex,{justifyContent:"center"},a.default.createElement(f.Typography,{textColor:"primary600",variant:"pi",fontWeight:"bold"},o({id:(0,m.getTrad)("components.empty-repeatable"),defaultMessage:"No entry yet. Click on the button below to add one."}))))),(null===t||void 0===t?void 0:t.id)&&a.default.createElement(f.Typography,{textColor:"danger600",variant:"pi"},o({id:t.id,defaultMessage:t.id})))};y.defaultProps={error:void 0,isReadOnly:!1},y.propTypes={error:o.default.shape({id:o.default.string.isRequired}),isReadOnly:o.default.bool,onClick:o.default.func.isRequired};var b=y;t.default=b},5969:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=n(99168),i=r(n(95758)),l=r(n(26135)),u=r(n(65506)),d=r(n(83715)),s={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"};function c(e,t,n){if(!e||!t)return{display:"none"};var r=n.x,a=n.y,o="translate(".concat(r,"px, ").concat(a,"px)");return{transform:o,WebkitTransform:o}}var f=function(){var e=(0,o.useDragLayer)((function(e){return{item:e.getItem(),itemType:e.getItemType(),initialOffset:e.getInitialSourceClientOffset(),currentOffset:e.getSourceClientOffset(),isDragging:e.isDragging(),mouseOffset:e.getClientOffset()}})),t=e.itemType,n=e.isDragging,r=e.item,f=e.initialOffset,p=e.currentOffset,m=e.mouseOffset;return n?a.default.createElement(i.default,null,a.default.createElement("div",{style:s},a.default.createElement("div",{style:c(f,p,m),className:"col-md-2"},[l.default.EDIT_RELATION,l.default.EDIT_FIELD,l.default.FIELD].includes(t)&&a.default.createElement(d.default,{labelField:r.labelField}),t===l.default.COMPONENT&&a.default.createElement(u.default,{displayedValue:r.displayedValue})))):null};t.default=f},7758:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(63038)),o=r(n(45697)),i=n(97132),l=r(n(79833)),u=n(39505),d=function(e){var t=e.type,n=e.value,r=(0,i.useIntl)(),o=r.formatDate,d=r.formatTime,s=r.formatNumber,c=n;if("date"===t&&(c=o(n,{dateStyle:"full"})),"datetime"===t&&(c=o(n,{dateStyle:"full",timeStyle:"short"})),"time"===t){var f=n.split(":"),p=(0,a.default)(f,3),m=p[0],g=p[1],y=p[2],b=new Date;b.setHours(m),b.setMinutes(g),b.setSeconds(y),c=d(b,{numeric:"auto",style:"short"})}if(["float","decimal"].includes(t)){var v=(0,u.getNumberOfDecimals)(n);c=s(n,{minimumFractionDigits:v,maximumFractionDigits:v})}return["integer","biginteger"].includes(t)&&(c=s(n,{maximumFractionDigits:0})),(0,l.default)(c)};d.propTypes={type:o.default.string.isRequired,value:o.default.any.isRequired};var s=d;t.default=s},34371:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67154)),o=r(n(6479)),i=r(n(67294)),l=r(n(45697)),u=r(n(78384)),d=n(67826),s=n(49425),c=["children"],f=(0,u.default)(d.Flex).withConfig({displayName:"FileWrapper__Wrapper",componentId:"sc-v6u1qm-0"})(["position:relative;border-radius:50%;width:26px;height:26px;border:1px solid ",";background:",";padding-left:1px;span{line-height:0.6rem;font-size:0.6rem;}"],(function(e){return e.theme.colors.neutral200}),(function(e){return e.theme.colors.neutral150})),p=function(e){var t=e.children,n=(0,o.default)(e,c);return i.default.createElement(f,(0,a.default)({justifyContent:"center",alignItems:"center",as:"span"},n),i.default.createElement(s.Typography,{variant:"sigma",textColor:"neutral600"},t))};p.propTypes={children:l.default.string.isRequired};var m=p;t.default=m},86955:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=n(86907),l=n(93355),u=n(68547),d=r(n(34371)),s=function(e){var t=e.url,n=e.mime,r=e.alternativeText,o=e.name,s=e.ext,c=e.formats,f=(0,u.prefixFileUrlWithBackendUrl)(t);if(n.includes("image")){var p,m=(null===c||void 0===c||null===(p=c.thumbnail)||void 0===p?void 0:p.url)||null,g=(0,u.prefixFileUrlWithBackendUrl)(m)||f;return a.default.createElement(i.Avatar,{src:g,alt:r||o,preview:!0})}var y=(0,u.getFileExtension)(s),b=o.length>100?"".concat(o.substring(0,100),"..."):o;return a.default.createElement(l.Tooltip,{description:b},a.default.createElement(d.default,null,y))};s.defaultProps={alternativeText:null,formats:null},s.propTypes={alternativeText:o.default.string,ext:o.default.string.isRequired,formats:o.default.object,mime:o.default.string.isRequired,name:o.default.string.isRequired,url:o.default.string.isRequired};var c=s;t.default=c},52114:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67154)),o=r(n(67294)),i=r(n(45697)),l=n(86907),u=r(n(86955)),d=r(n(34371)),s=function(e){var t=e.value;return o.default.createElement(l.AvatarGroup,null,t.map((function(e,n){var r="".concat(e.id).concat(n);if(3===n){var i="+".concat(t.length-3);return o.default.createElement(d.default,{key:r,preview:!1},i)}return n>3?null:o.default.createElement(u.default,(0,a.default)({key:r},e))})))};s.propTypes={value:i.default.arrayOf(i.default.shape({alternativeText:i.default.string,ext:i.default.string.isRequired,formats:i.default.object,mime:i.default.string.isRequired,name:i.default.string.isRequired,url:i.default.string.isRequired})).isRequired};var c=s;t.default=c},47276:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(87757)),o=r(n(48926)),i=r(n(67294)),l=n(23724),u=r(n(45697)),d=n(97132),s=n(5493),c=n(49425),f=n(40064),p=n(84686),m=n(53777),g=n(28564),y=r(n(7758)),b=function(){var e=(0,o.default)(a.default.mark((function e(t,n){var r,o,i,l;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m.axiosInstance.get(t);case 2:return r=e.sent,o=r.data,i=o.results,l=o.pagination,n(),e.abrupt("return",{results:i,pagination:l});case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),v=function(e){var t=e.fieldSchema,n=e.name,r=e.rowId,a=e.targetModel,o=e.queryInfos,u=(0,g.getRequestUrl)("".concat(o.endPoint,"/").concat(r,"/").concat(n.split(".")[0])),m=(0,p.useNotifyAT)().notifyStatus,v=(0,d.useIntl)().formatMessage,h=function(){var e=v({id:(0,g.getTrad)("DynamicTable.relation-loaded"),defaultMessage:"The relations have been loaded"});m(e)},E=(0,l.useQuery)([a,r],(function(){return b(u,h)}),{staleTime:0}),O=E.data;return"success"!==E.status?i.default.createElement(s.Box,null,i.default.createElement(f.Loader,null,"Loading content")):i.default.createElement("ul",null,null===O||void 0===O?void 0:O.results.map((function(e){var n=e[t.name];return i.default.createElement(s.Box,{as:"li",key:e.id,padding:3},i.default.createElement(c.Typography,null,n?i.default.createElement(y.default,{type:t.schema.type,value:e[t.name]}):"-"))})),(null===O||void 0===O?void 0:O.pagination.total)>10&&i.default.createElement(s.Box,{as:"li",padding:3},i.default.createElement(c.Typography,null,"[...]")))};v.propTypes={fieldSchema:u.default.shape({name:u.default.string,schema:u.default.shape({type:u.default.string}).isRequired}).isRequired,name:u.default.string.isRequired,rowId:u.default.oneOfType([u.default.string,u.default.number]).isRequired,targetModel:u.default.string.isRequired,queryInfos:u.default.shape({endPoint:u.default.string}).isRequired};var h=v;t.default=h},78363:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(63038)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),l=r(n(45697)),u=n(97132),d=n(30741),s=n(49425),c=n(5493),f=n(49903),p=n(67826),m=n(24955),g=n(68547),y=r(n(78384)),b=r(n(47276)),v=r(n(7758));function h(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}var E=["oneToOne","manyToOne"],O=y.default.span.withConfig({displayName:"Relation__ActionWrapper",componentId:"sc-8klqer-0"})(["svg{height:","rem;}"],.25),w=(0,y.default)(f.Badge).withConfig({displayName:"Relation__RelationCountBadge",componentId:"sc-8klqer-1"})(["display:flex;align-items:center;height:","rem;width:","rem;"],1.25,1),M=function(e){var t=e.fieldSchema,n=e.metadatas,r=e.queryInfos,a=e.name,l=e.rowId,f=e.value,y=(0,u.useIntl)().formatMessage,h=(0,i.useState)(!1),M=(0,o.default)(h,2),j=M[0],P=M[1],C=(0,i.useRef)();if(E.includes(t.relation))return i.default.createElement(s.Typography,{textColor:"neutral800"},i.default.createElement(v.default,{type:n.mainField.schema.type,value:f[n.mainField.name]}));return i.default.createElement(p.Flex,g.stopPropagation,i.default.createElement(w,null,f.count),i.default.createElement(c.Box,{paddingLeft:2},i.default.createElement(s.Typography,{textColor:"neutral800"},y({id:"content-manager.containers.ListPage.items",defaultMessage:"{number, plural, =0 {items} one {item} other {items}}"},{number:f.count}))),f.count>0&&i.default.createElement(O,null,i.default.createElement(d.IconButton,{onClick:function(){return P((function(e){return!e}))},ref:C,noBorder:!0,label:y({id:"content-manager.popover.display-relations.label",defaultMessage:"Display relations"}),icon:i.default.createElement(g.SortIcon,{isUp:j})}),j&&i.default.createElement(m.Popover,{source:C,spacing:16,centered:!0},i.default.createElement(b.default,{queryInfos:r,name:a,fieldSchema:n.mainField,targetModel:t.targetModel,rowId:l,count:f.count}))))};M.propTypes={fieldSchema:l.default.shape({relation:l.default.string,targetModel:l.default.string,type:l.default.string.isRequired}).isRequired,metadatas:l.default.shape({mainField:l.default.shape({name:l.default.string.isRequired,schema:l.default.shape({type:l.default.string.isRequired}).isRequired})}).isRequired,name:l.default.string.isRequired,rowId:l.default.oneOfType([l.default.string,l.default.number]).isRequired,queryInfos:l.default.shape({endPoint:l.default.string.isRequired}).isRequired,value:l.default.object.isRequired};var j=M;t.default=j},57397:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=r(n(78384)),l=n(49425),u=r(n(86955)),d=r(n(52114)),s=r(n(78363)),c=r(n(7758)),f=(0,i.default)(l.Typography).withConfig({displayName:"CellContent__TypographyMaxWidth",componentId:"sc-neafof-0"})(["max-width:300px;"]),p=function(e){var t=e.content,n=e.fieldSchema,r=e.metadatas,o=e.name,i=e.queryInfos,p=e.rowId;return null===t||void 0===t?a.default.createElement(l.Typography,{textColor:"neutral800"},"-"):"media"!==n.type||n.multiple?"media"===n.type&&n.multiple?a.default.createElement(d.default,{value:t}):"relation"===n.type?a.default.createElement(s.default,{fieldSchema:n,queryInfos:i,metadatas:r,value:t,name:o,rowId:p}):a.default.createElement(f,{ellipsis:!0,textColor:"neutral800"},a.default.createElement(c.default,{type:n.type,value:t})):a.default.createElement(u.default,t)};p.defaultProps={content:void 0,queryInfos:void 0},p.propTypes={content:o.default.any,fieldSchema:o.default.shape({multiple:o.default.bool,type:o.default.string.isRequired}).isRequired,metadatas:o.default.object.isRequired,name:o.default.string.isRequired,rowId:o.default.oneOfType([o.default.string,o.default.number]).isRequired,queryInfos:o.default.shape({endPoint:o.default.string.isRequired})};var m=p;t.default=m},39505:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNumberOfDecimals=void 0;t.getNumberOfDecimals=function(e){return e%1!==0?e.toString().split(".")[1].length:0}},35883:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=n(97132),l=n(16758),u=n(9008),d=n(67826),s=n(49425),c=n(19408),f=r(n(51359)),p=r(n(18568)),m=r(n(85117)),g=n(28564),y=function(e){var t=e.isConfirmButtonLoading,n=e.isOpen,r=e.onToggleDialog,o=e.onConfirm,y=(0,i.useIntl)().formatMessage;return a.default.createElement(l.Dialog,{onClose:r,title:y({id:"app.components.ConfirmDialog.title",defaultMessage:"Confirmation"}),labelledBy:"confirmation",describedBy:"confirm-description",isOpen:n},a.default.createElement(l.DialogBody,{icon:a.default.createElement(f.default,null)},a.default.createElement(u.Stack,{size:2},a.default.createElement(d.Flex,{justifyContent:"center"},a.default.createElement(s.Typography,{id:"confirm-description"},y({id:(0,g.getTrad)("popUpWarning.bodyMessage.contentType.delete.all"),defaultMessage:"Are you sure you want to delete these entries?"}))),a.default.createElement(d.Flex,null,a.default.createElement(m.default,{area:"contentManager.listView.deleteModalAdditionalInfos"})))),a.default.createElement(l.DialogFooter,{startAction:a.default.createElement(c.Button,{onClick:r,variant:"tertiary"},y({id:"app.components.Button.cancel",defaultMessage:"Cancel"})),endAction:a.default.createElement(c.Button,{onClick:o,variant:"danger-light",startIcon:a.default.createElement(p.default,null),id:"confirm-delete",loading:t},y({id:"app.components.Button.confirm",defaultMessage:"Confirm"}))}))};y.propTypes={isConfirmButtonLoading:o.default.bool.isRequired,isOpen:o.default.bool.isRequired,onConfirm:o.default.func.isRequired,onToggleDialog:o.default.func.isRequired};var b=y;t.default=b},86863:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=n(97132),l=n(16758),u=n(9008),d=n(67826),s=n(49425),c=n(19408),f=r(n(51359)),p=r(n(18568)),m=r(n(85117)),g=function(e){var t=e.isConfirmButtonLoading,n=e.isOpen,r=e.onToggleDialog,o=e.onConfirm,g=(0,i.useIntl)().formatMessage;return a.default.createElement(l.Dialog,{onClose:r,title:g({id:"app.components.ConfirmDialog.title",defaultMessage:"Confirmation"}),labelledBy:"confirmation",describedBy:"confirm-description",isOpen:n},a.default.createElement(l.DialogBody,{icon:a.default.createElement(f.default,null)},a.default.createElement(u.Stack,{size:2},a.default.createElement(d.Flex,{justifyContent:"center"},a.default.createElement(s.Typography,{id:"confirm-description"},g({id:"components.popUpWarning.message",defaultMessage:"Are you sure you want to delete this?"}))),a.default.createElement(d.Flex,null,a.default.createElement(m.default,{area:"contentManager.listView.deleteModalAdditionalInfos"})))),a.default.createElement(l.DialogFooter,{startAction:a.default.createElement(c.Button,{onClick:r,variant:"tertiary"},g({id:"app.components.Button.cancel",defaultMessage:"Cancel"})),endAction:a.default.createElement(c.Button,{onClick:o,variant:"danger-light",startIcon:a.default.createElement(p.default,null),id:"confirm-delete",loading:t},g({id:"app.components.Button.confirm",defaultMessage:"Confirm"}))}))};g.propTypes={isConfirmButtonLoading:o.default.bool.isRequired,isOpen:o.default.bool.isRequired,onConfirm:o.default.func.isRequired,onToggleDialog:o.default.func.isRequired};var y=g;t.default=y},90753:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67154)),o=r(n(59713)),i=r(n(6479)),l=r(n(67294)),u=r(n(45697)),d=n(59522),s=n(5493),c=n(30741),f=n(41798),p=n(67826),m=r(n(18568)),g=r(n(67483)),y=r(n(19352)),b=n(68547),v=n(39711),h=n(97132),E=n(14772),O=r(n(57397)),w=n(26595),M=["key","cellFormatter","name"];function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var P=function(e){var t=e.canCreate,n=e.canDelete,r=e.headers,u=e.entriesToDelete,P=e.onClickDelete,C=e.onSelectRow,k=e.withMainAction,_=e.withBulkActions,R=e.rows,T=(0,v.useHistory)(),x=T.push,D=T.location.pathname,S=(0,h.useIntl)().formatMessage,I=(0,b.useTracking)().trackUsage,q=(0,E.usePluginsQueryParams)();return l.default.createElement(f.Tbody,null,R.map((function(e,v){var h=-1!==u.findIndex((function(t){return t===e.id})),E=S({id:"content-manager.components.DynamicTable.row-line",defaultMessage:"item line {number}"},{number:v});return l.default.createElement(f.Tr,(0,a.default)({key:e.id},(0,b.onRowClick)({fn:function(){I("willEditEntryFromList"),x({pathname:"".concat(D,"/").concat(e.id),state:{from:D},search:q})},condition:_})),k&&l.default.createElement(f.Td,b.stopPropagation,l.default.createElement(d.BaseCheckbox,{"aria-label":S({id:"app.component.table.select.one-entry",defaultMessage:"Select {target}"},{target:(0,w.getFullName)(e.firstname,e.lastname)}),checked:h,onChange:function(){C({name:e.id,value:!h})}})),r.map((function(t){var n=t.key,r=t.cellFormatter,u=t.name,d=(0,i.default)(t,M);return l.default.createElement(f.Td,{key:n},"function"===typeof r?r(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({key:n,name:u},d)):l.default.createElement(O.default,(0,a.default)({content:e[u.split(".")[0]],name:u},d,{rowId:e.id})))})),_&&l.default.createElement(f.Td,null,l.default.createElement(p.Flex,(0,a.default)({justifyContent:"end"},b.stopPropagation),l.default.createElement(c.IconButton,{onClick:function(){I("willEditEntryFromButton"),x({pathname:"".concat(D,"/").concat(e.id),state:{from:D},search:q})},label:S({id:"app.component.table.edit",defaultMessage:"Edit {target}"},{target:E}),noBorder:!0,icon:l.default.createElement(y.default,null)}),t&&l.default.createElement(s.Box,{paddingLeft:1},l.default.createElement(c.IconButton,{onClick:function(){x({pathname:"".concat(D,"/create/clone/").concat(e.id),state:{from:D},search:q})},label:S({id:"app.component.table.duplicate",defaultMessage:"Duplicate {target}"},{target:E}),noBorder:!0,icon:l.default.createElement(g.default,null)})),n&&l.default.createElement(s.Box,{paddingLeft:1},l.default.createElement(c.IconButton,{onClick:function(){I("willDeleteEntryFromList"),P(e.id)},label:S({id:"app.component.table.delete",defaultMessage:"Delete {target}"},{target:E}),noBorder:!0,icon:l.default.createElement(m.default,null)})))))})))};P.defaultProps={canCreate:!1,canDelete:!1,entriesToDelete:[],onClickDelete:function(){},onSelectRow:function(){},rows:[],withBulkActions:!1,withMainAction:!1},P.propTypes={canCreate:u.default.bool,canDelete:u.default.bool,entriesToDelete:u.default.array,headers:u.default.array.isRequired,onClickDelete:u.default.func,onSelectRow:u.default.func,rows:u.default.array,withBulkActions:u.default.bool,withMainAction:u.default.bool};var C=P;t.default=C},18595:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(319)),i=r(n(59713)),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=E(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),u=r(n(45697)),d=n(97132),s=n(68547),c=n(37424),f=r(n(41609)),p=n(29499),m=n(51046),g=n(28564),y=r(n(27301)),b=r(n(90753)),v=r(n(35883)),h=r(n(86863));function E(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(E=function(e){return e?n:t})(e)}function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M=function(e){var t=e.canCreate,n=e.canDelete,r=e.contentTypeName,a=e.action,i=e.isBulkable,u=e.isLoading,E=e.onConfirmDelete,O=e.onConfirmDeleteAll,M=e.layout,j=e.rows,P=(0,s.useStrapiApp)().runHookWaterfall,C=M.contentType.options.draftAndPublish||!1,k=(0,d.useIntl)().formatMessage,_=(0,c.useSelector)(m.selectDisplayedHeaders),R=(0,l.useMemo)((function(){var e=P(p.INJECT_COLUMN_IN_TABLE,{displayedHeaders:_,layout:M}).displayedHeaders.map((function(e){if("relation"===e.fieldSchema.type){var t="".concat(e.name,".").concat(e.metadatas.mainField.name);return w(w({},e),{},{name:t})}return e}));return C?[].concat((0,o.default)(e),[{key:"__published_at_temp_key__",name:"publishedAt",fieldSchema:{type:"custom"},metadatas:{label:k({id:(0,g.getTrad)("containers.ListPage.table-headers.published_at")}),searchable:!1,sortable:!0},cellFormatter:function(e){var t=!(0,f.default)(e.publishedAt);return l.default.createElement(y.default,{isPublished:t})}}]):e}),[P,_,M,C,k]);return l.default.createElement(s.DynamicTable,{components:{ConfirmDialogDelete:h.default,ConfirmDialogDeleteAll:v.default},contentType:r,action:a,isLoading:u,headers:R,onConfirmDelete:E,onConfirmDeleteAll:O,onOpenDeleteAllModalTrackedEvent:"willBulkDeleteEntries",rows:j,withBulkActions:!0,withMainAction:n&&i},l.default.createElement(b.default,{canCreate:t,canDelete:n,headers:R,rows:j,withBulkActions:!0,withMainAction:n&&i}))};M.defaultProps={action:void 0},M.propTypes={canCreate:u.default.bool.isRequired,canDelete:u.default.bool.isRequired,contentTypeName:u.default.string.isRequired,action:u.default.node,isBulkable:u.default.bool.isRequired,isLoading:u.default.bool.isRequired,layout:u.default.exact({components:u.default.object.isRequired,contentType:u.default.shape({attributes:u.default.object.isRequired,metadatas:u.default.object.isRequired,layouts:u.default.shape({list:u.default.array.isRequired,editRelations:u.default.array}).isRequired,options:u.default.object.isRequired,settings:u.default.object.isRequired}).isRequired}).isRequired,onConfirmDelete:u.default.func.isRequired,onConfirmDeleteAll:u.default.func.isRequired,rows:u.default.array.isRequired};var j=M;t.default=j},33755:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=n(97132),l=r(n(78384)),u=r(n(83784)),d=n(18445),s=n(5493),c=n(67826),f=n(49425),p=n(28564),m=(0,l.default)(u.default).withConfig({displayName:"AddComponentButton__StyledAddIcon",componentId:"sc-1yhda8c-0"})(["transform:",";> circle{fill:",";}> path{fill:",";}"],(function(e){return e.$isOpen?"rotate(45deg)":"rotate(0deg)"}),(function(e){var t=e.theme;return e.$hasError?t.colors.danger200:t.colors.neutral150}),(function(e){var t=e.theme;return e.$hasError?t.colors.danger600:t.colors.neutral600})),g=(0,l.default)(d.BaseButton).withConfig({displayName:"AddComponentButton__StyledButton",componentId:"sc-1yhda8c-1"})(["border-radius:26px;border-color:",";background:",";padding-top:",";padding-right:",";padding-bottom:",";padding-left:",";box-shadow:",";svg{height:",";width:",";> path{fill:",";}}&:hover{color:"," !important;","{color:"," !important;}","{> circle{fill:",";}> path{fill:",";}}}&:active{","{color:",";}","{> circle{fill:",";}> path{fill:",";}}}"],(function(e){return e.theme.colors.neutral150}),(function(e){return e.theme.colors.neutral0}),(function(e){return e.theme.spaces[3]}),(function(e){return e.theme.spaces[4]}),(function(e){return e.theme.spaces[3]}),(function(e){return e.theme.spaces[4]}),(function(e){return e.theme.shadows.filterShadow}),(function(e){return e.theme.spaces[6]}),(function(e){return e.theme.spaces[6]}),(function(e){return e.theme.colors.neutral600}),(function(e){return e.theme.colors.primary600}),f.Typography,(function(e){return e.theme.colors.primary600}),m,(function(e){return e.theme.colors.primary600}),(function(e){return e.theme.colors.neutral100}),f.Typography,(function(e){return e.theme.colors.primary600}),m,(function(e){return e.theme.colors.primary600}),(function(e){return e.theme.colors.neutral100})),y=(0,l.default)(s.Box).withConfig({displayName:"AddComponentButton__BoxFullHeight",componentId:"sc-1yhda8c-2"})(["height:100%;"]),b=function(e){var t=e.hasError,n=e.hasMaxError,r=e.hasMinError,o=e.isDisabled,l=e.isOpen,u=e.label,d=e.missingComponentNumber,b=e.name,v=e.onClick,h=(0,i.useIntl)().formatMessage,E=h({id:(0,p.getTrad)("components.DynamicZone.add-component"),defaultMessage:"Add a component to {componentName}"},{componentName:u||b}),O=h({id:"app.utils.close-label",defaultMessage:"Close"}),w=l?O:E;return n&&!l&&(w=h({id:"components.Input.error.validation.max",defaultMessage:"The value is too high."})),r&&!l&&(w=h({id:(0,p.getTrad)("components.DynamicZone.missing-components"),defaultMessage:"There {number, plural, =0 {are # missing components} one {is # missing component} other {are # missing components}}"},{number:d})),a.default.createElement(a.default.Fragment,null,a.default.createElement(c.Flex,{justifyContent:"center"},a.default.createElement(s.Box,{style:{cursor:o?"not-allowed":"pointer"}},a.default.createElement(g,{type:"button",onClick:v,disabled:o,hasError:t},a.default.createElement(c.Flex,null,a.default.createElement(y,{"aria-hidden":!0,paddingRight:2},a.default.createElement(m,{$isOpen:l,$hasError:t&&!l})),a.default.createElement(f.Typography,{variant:"pi",fontWeight:"bold",textColor:t&&!l?"danger600":"neutral500"},w))))))};b.defaultProps={label:"",missingComponentNumber:0},b.propTypes={label:o.default.string,hasError:o.default.bool.isRequired,hasMaxError:o.default.bool.isRequired,hasMinError:o.default.bool.isRequired,isDisabled:o.default.bool.isRequired,isOpen:o.default.bool.isRequired,missingComponentNumber:o.default.number,name:o.default.string.isRequired,onClick:o.default.func.isRequired};var v=b;t.default=v},62761:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=n(5493),l=n(49425),u=n(9008),d=n(68547),s=n(67814),c=r(n(78384)),f=n(97132),p=(0,c.default)(s.FontAwesomeIcon).withConfig({displayName:"ComponentCard__StyledFontAwesomeIcon",componentId:"sc-fbfh8p-0"})(["width:"," !important;height:"," !important;padding:",";border-radius:",";background:",";path{fill:",";}"],(0,d.pxToRem)(32),(0,d.pxToRem)(32),(0,d.pxToRem)(9),(0,d.pxToRem)(64),(function(e){return e.theme.colors.neutral150}),(function(e){return e.theme.colors.neutral500})),m=(0,c.default)(i.Box).withConfig({displayName:"ComponentCard__ComponentBox",componentId:"sc-fbfh8p-1"})(["flex-shrink:0;height:",";border:1px solid ",";background:",";border-radius:",";display:flex;justify-content:center;align-items:center;&.active,&:hover{border:1px solid ",";background:",";","{background:",";path{fill:",";}}","{color:",";}}"],(0,d.pxToRem)(84),(function(e){return e.theme.colors.neutral200}),(function(e){return e.theme.colors.neutral100}),(function(e){return e.theme.borderRadius}),(function(e){return e.theme.colors.primary200}),(function(e){return e.theme.colors.primary100}),p,(function(e){return e.theme.colors.primary200}),(function(e){return e.theme.colors.primary600}),l.Typography,(function(e){return e.theme.colors.primary600}));function g(e){var t=e.componentUid,n=e.intlLabel,r=e.icon,o=e.onClick,i=(0,f.useIntl)().formatMessage;return a.default.createElement("button",{type:"button",onClick:function(){o(t)}},a.default.createElement(m,{borderRadius:"borderRadius"},a.default.createElement(u.Stack,{size:1,style:{justifyContent:"center",alignItems:"center"}},a.default.createElement(p,{icon:r}),a.default.createElement(l.Typography,{variant:"pi",fontWeight:"bold",textColor:"neutral600"},i(n)))))}g.defaultProps={icon:"smile",onClick:function(){}},g.propTypes={componentUid:o.default.string.isRequired,intlLabel:o.default.shape({id:o.default.string.isRequired,defaultMessage:o.default.string.isRequired}).isRequired,icon:o.default.string,onClick:o.default.func};var y=g;t.default=y},49735:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=n(96654),l=n(5493),u=r(n(78384)),d=r(n(62761)),s=u.default.div.withConfig({displayName:"Category__Grid",componentId:"sc-kn335s-0"})(["display:grid;grid-template-columns:repeat(auto-fit,","rem);grid-gap:",";"],8.75,(function(e){return e.theme.spaces[1]})),c=function(e){var t=e.category,n=e.components,r=e.isOdd,o=e.isOpen,u=e.onAddComponent,c=e.onToggle;return a.default.createElement(i.Accordion,{expanded:o,toggle:function(){c(t)},size:"S"},a.default.createElement(i.AccordionToggle,{variant:r?"primary":"secondary",title:t,togglePosition:"left"}),a.default.createElement(i.AccordionContent,null,a.default.createElement(l.Box,{paddingTop:4,paddingBottom:4,paddingLeft:3,paddingRight:3},a.default.createElement(s,null,n.map((function(e){var t=e.componentUid,n=e.info,r=n.displayName,o=n.icon;return a.default.createElement(d.default,{key:t,componentUid:t,intlLabel:{id:r,defaultMessage:r},icon:o,onClick:u})}))))))};c.propTypes={category:o.default.string.isRequired,components:o.default.array.isRequired,isOdd:o.default.bool.isRequired,isOpen:o.default.bool.isRequired,onAddComponent:o.default.func.isRequired,onToggle:o.default.func.isRequired};var f=c;t.default=f},54611:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(63038)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),l=r(n(7739)),u=r(n(45697)),d=n(97132),s=n(65967),c=n(5493),f=n(67826),p=n(49425),m=n(28564),g=n(14772),y=r(n(49735));function b(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}var v=function(e){var t=e.components,n=e.isOpen,r=e.onClickAddComponent,a=(0,d.useIntl)().formatMessage,u=(0,g.useContentTypeLayout)().getComponentLayout,b=(0,i.useState)(""),v=(0,o.default)(b,2),h=v[0],E=v[1],O=(0,i.useMemo)((function(){var e=t.map((function(e){var t=u(e);return{componentUid:e,category:t.category,info:t.info}})),n=(0,l.default)(e,"category");return Object.keys(n).reduce((function(e,t){return e.push({category:t,components:n[t]}),e}),[])}),[t,u]);(0,i.useEffect)((function(){n&&O.length&&E(O[0].category)}),[n,O]);var w=(0,i.useCallback)((function(e){r(e),E("")}),[r]),M=(0,i.useCallback)((function(e){E(h===e?"":e)}),[h]);return n?i.default.createElement(c.Box,{paddingBottom:6},i.default.createElement(c.Box,{paddingTop:6,paddingBottom:6,paddingLeft:5,paddingRight:5,background:"neutral0",shadow:"tableShadow",borderColor:"neutral150",hasRadius:!0},i.default.createElement(f.Flex,{justifyContent:"center"},i.default.createElement(p.Typography,{fontWeight:"bold",textColor:"neutral600"},a({id:(0,m.getTrad)("components.DynamicZone.ComponentPicker-label"),defaultMessage:"Pick one component"}))),i.default.createElement(c.Box,{paddingTop:2},i.default.createElement(s.KeyboardNavigable,{attributeName:"data-strapi-accordion-toggle"},O.map((function(e,t){var n=e.category,r=e.components;return i.default.createElement(y.default,{key:n,category:n,components:r,isOdd:t%2===1,isOpen:n===h,onAddComponent:w,onToggle:M})})))))):null};v.propTypes={components:u.default.array.isRequired,isOpen:u.default.bool.isRequired,onClickAddComponent:u.default.func.isRequired};var h=(0,i.memo)(v);t.default=h},61321:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(78384)),i=n(5493),l=n(67826),u=(0,o.default)(i.Box).withConfig({displayName:"Rectangle__StyledBox",componentId:"sc-1phtory-0"})(["width:",";height:",";"],(function(e){return e.theme.spaces[2]}),(function(e){return e.theme.spaces[4]})),d=function(){return a.default.createElement(l.Flex,{justifyContent:"center"},a.default.createElement(u,{background:"neutral200"}))};t.default=d},47330:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=M(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),i=r(n(45697)),l=r(n(78384)),u=r(n(69590)),d=n(97132),s=n(67814),c=n(96654),f=n(30741),p=n(24824),m=n(5493),g=n(9008),y=r(n(18568)),b=r(n(31513)),v=r(n(43888)),h=n(14772),E=n(28564),O=r(n(49925)),w=r(n(61321));function M(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(M=function(e){return e?n:t})(e)}var j=(0,l.default)(g.Stack).withConfig({displayName:"Component__ActionStack",componentId:"sc-1avgasp-0"})(["svg{path{fill:",";}}"],(function(e){var t=e.theme;return e.expanded?t.colors.primary600:t.colors.neutral600})),P=(0,l.default)(f.IconButton).withConfig({displayName:"Component__IconButtonCustom",componentId:"sc-1avgasp-1"})(["background-color:transparent;"]),C=(0,l.default)(m.Box).withConfig({displayName:"Component__StyledBox",componentId:"sc-1avgasp-2"})(["> div:first-child{box-shadow:",";}"],(function(e){return e.theme.shadows.tableShadow})),k=(0,l.default)(m.Box).withConfig({displayName:"Component__AccordionContentRadius",componentId:"sc-1avgasp-3"})(["border-radius:0 0 "," ",";"],(function(e){return e.theme.spaces[1]}),(function(e){return e.theme.spaces[1]})),_=function(e){var t,n=e.componentUid,r=e.formErrors,a=e.index,i=e.isOpen,l=e.isFieldAllowed,u=e.moveComponentDown,f=e.moveComponentUp,g=e.name,M=e.onToggle,_=e.removeComponentFromDynamicZone,R=e.showDownIcon,T=e.showUpIcon,x=(0,d.useIntl)().formatMessage,D=(0,h.useContentTypeLayout)().getComponentLayout,S=(0,o.useMemo)((function(){var e=D(n).info,t=e.icon;return{friendlyName:e.displayName,icon:t}}),[n,D]),I=S.icon,q=S.friendlyName,F=x({id:(0,E.getTrad)("components.DynamicZone.move-down-label"),defaultMessage:"Move component down"}),L=x({id:(0,E.getTrad)("components.DynamicZone.move-up-label"),defaultMessage:"Move component down"}),A=x({id:(0,E.getTrad)("components.DynamicZone.delete-label"),defaultMessage:"Delete {name}"},{name:q});return Object.keys(r).filter((function(e){var t=e.split(".");return"".concat(t[0],".").concat(t[1])==="".concat(g,".").concat(a)})).length>0&&(t=x({id:(0,E.getTrad)("components.DynamicZone.error-message"),defaultMessage:"The component contains error(s)"})),o.default.createElement(m.Box,null,o.default.createElement(w.default,null),o.default.createElement(C,{hasRadius:!0},o.default.createElement(c.Accordion,{expanded:i,toggle:function(){return M(a)},size:"S",error:t},o.default.createElement(c.AccordionToggle,{startIcon:o.default.createElement(s.FontAwesomeIcon,{icon:I}),action:o.default.createElement(j,{horizontal:!0,size:0,expanded:i},R&&o.default.createElement(P,{noBorder:!0,label:F,onClick:function(){return u(g,a)},icon:o.default.createElement(b.default,null)}),T&&o.default.createElement(P,{noBorder:!0,label:L,onClick:function(){return f(g,a)},icon:o.default.createElement(v.default,null)}),l&&o.default.createElement(P,{noBorder:!0,label:A,onClick:function(){return _(g,a)},icon:o.default.createElement(y.default,null)})),title:q,togglePosition:"left"}),o.default.createElement(c.AccordionContent,null,o.default.createElement(k,{background:"neutral0"},o.default.createElement(p.FocusTrap,{onEscape:function(){return M(a)}},o.default.createElement(O.default,{componentUid:n,icon:I,name:"".concat(g,".").concat(a),isFromDynamicZone:!0})))))))};_.propTypes={componentUid:i.default.string.isRequired,formErrors:i.default.object.isRequired,index:i.default.number.isRequired,isFieldAllowed:i.default.bool.isRequired,isOpen:i.default.bool.isRequired,moveComponentDown:i.default.func.isRequired,moveComponentUp:i.default.func.isRequired,name:i.default.string.isRequired,onToggle:i.default.func.isRequired,removeComponentFromDynamicZone:i.default.func.isRequired,showDownIcon:i.default.bool.isRequired,showUpIcon:i.default.bool.isRequired};var R=(0,o.memo)(_,u.default);t.default=R},82471:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=n(97132),i=r(n(45697)),l=r(n(78384)),u=n(68547),d=n(5493),s=n(67826),c=n(49425),f=(0,l.default)(d.Box).withConfig({displayName:"DzLabel__StyledBox",componentId:"sc-7qr6r0-0"})(["border-radius:",";"],(0,u.pxToRem)(26)),p=function(e){var t=e.label,n=e.labelAction,r=e.name,i=e.numberOfComponents,l=e.required,p=e.intlDescription,m=(0,o.useIntl)().formatMessage,g=m({id:t||r,defaultMessage:t||r});return a.default.createElement(s.Flex,{justifyContent:"center"},a.default.createElement(d.Box,null,a.default.createElement(f,{paddingTop:3,paddingBottom:3,paddingRight:4,paddingLeft:4,background:"neutral0",shadow:"filterShadow",color:"neutral500"},a.default.createElement(s.Flex,{direction:"column",justifyContent:"center"},a.default.createElement(s.Flex,{maxWidth:(0,u.pxToRem)(356)},a.default.createElement(c.Typography,{variant:"pi",textColor:"neutral600",fontWeight:"bold",ellipsis:!0},g,"\xa0"),a.default.createElement(c.Typography,{variant:"pi",textColor:"neutral600",fontWeight:"bold"},"(",i,")"),l&&a.default.createElement(c.Typography,{textColor:"danger600"},"*"),n&&a.default.createElement(d.Box,{paddingLeft:1},n)),p&&a.default.createElement(d.Box,{paddingTop:1,maxWidth:(0,u.pxToRem)(356)},a.default.createElement(c.Typography,{variant:"pi",textColor:"neutral600",ellipsis:!0},m(p)))))))};p.defaultProps={intlDescription:void 0,label:"",labelAction:void 0,required:!1},p.propTypes={intlDescription:i.default.shape({id:i.default.string.isRequired,defaultMessage:i.default.string.isRequired}),label:i.default.string,labelAction:i.default.element,name:i.default.string.isRequired,numberOfComponents:i.default.number.isRequired,required:i.default.bool};var m=p;t.default=m},58827:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DynamicZone=void 0;var o=r(n(59713)),i=r(n(63038)),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=O(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),u=r(n(27361)),d=r(n(69590)),s=r(n(45697)),c=n(9008),f=n(5493),p=n(68547),m=n(28564),g=r(n(28027)),y=r(n(24366)),b=r(n(33755)),v=r(n(82471)),h=r(n(47330)),E=r(n(54611));function O(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(O=function(e){return e?n:t})(e)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j=function(e){return Array.from({length:e}).map((function(){return{isOpen:!1}}))},P=function(e){var t=e.name,n=e.addComponentToDynamicZone,r=e.formErrors,a=e.isCreatingEntry,o=e.isFieldAllowed,d=e.isFieldReadable,s=e.labelAction,g=e.moveComponentUp,y=e.moveComponentDown,O=e.removeComponentFromDynamicZone,w=e.dynamicDisplayedComponents,P=e.fieldSchema,C=e.metadatas,k=(0,p.useNotification)(),_=(0,l.useState)(!1),R=(0,i.default)(_,2),T=R[0],x=R[1],D=(0,l.useState)(!1),S=(0,i.default)(D,2),I=S[0],q=S[1],F=w.length,L=C.description?{id:C.description,defaultMessage:C.description}:null,A=(0,l.useState)(j(F)),B=(0,i.default)(A,2),N=B[0],W=B[1];(0,l.useEffect)((function(){W(j(F))}),[F]),(0,l.useEffect)((function(){I&&(W((function(e){return e.map((function(t,n){return n===e.length-1?M(M({},t),{},{isOpen:!0}):t}))})),q(!1))}),[I]);var z=P.max,U=void 0===z?1/0:z,V=P.min,H=void 0===V?-1/0:V,G=(0,l.useMemo)((function(){return Object.keys(r).filter((function(e){return e===t})).map((function(e){return r[e]}))}),[r,t]),Z=(0,l.useMemo)((function(){return P.components||[]}),[P]),$=H-F,Q=G.length>0,Y=G.length>0&&(0,u.default)(G,[0,"id"],"").includes("min"),J=Q&&"components.Input.error.validation.max"===(0,u.default)(G,[0,"id"],""),K=(0,l.useCallback)((function(e){x(!1),n(t,e,Q),q(!0)}),[n,Q,t]),X=function(e){W((function(t){return t.map((function(t,n){var r=t.isOpen;return n===e?{isOpen:!r}:{isOpen:r}}))}))},ee=function(e,t){y(e,t),W((function(e){return e.map((function(e,n,r){var a=e.isOpen;return n===t+1?{isOpen:r[t].isOpen}:n===t?{isOpen:r[n+1].isOpen}:{isOpen:a}}))}))},te=function(e,t){g(e,t),W((function(e){return e.map((function(e,n,r){var a=e.isOpen;return n===t-1?{isOpen:r[t].isOpen}:n===t?{isOpen:r[n-1].isOpen}:{isOpen:a}}))}))},ne=function(e,t){O(e,t)};return!o&&a?l.default.createElement(p.NotAllowedInput,{description:L,intlLabel:{id:C.label,defaultMessage:C.label},labelAction:s,name:t}):o||d||a?l.default.createElement(c.Stack,{size:6},F>0&&l.default.createElement(f.Box,null,l.default.createElement(v.default,{intlDescription:L,label:C.label,labelAction:s,name:t,numberOfComponents:F,required:P.required||!1}),w.map((function(e,n){var a,i=o&&F>0&&n<F-1,u=o&&F>0&&n>0,d=(null===(a=N[n])||void 0===a?void 0:a.isOpen)||!1;return l.default.createElement(h.default,{componentUid:e,formErrors:r,key:n,index:n,isOpen:d,isFieldAllowed:o,moveComponentDown:ee,moveComponentUp:te,onToggle:X,name:t,removeComponentFromDynamicZone:ne,showDownIcon:i,showUpIcon:u})}))),l.default.createElement(b.default,{hasError:Q,hasMaxError:J,hasMinError:Y,isDisabled:!o,label:C.label,missingComponentNumber:$,isOpen:T,name:t,onClick:function(){F<U?x((function(e){return!e})):k({type:"info",message:{id:(0,m.getTrad)("components.notification.info.maximum-requirement")}})}}),l.default.createElement(E.default,{isOpen:T,components:Z,onClickAddComponent:K})):l.default.createElement(p.NotAllowedInput,{description:L,intlLabel:{id:C.label,defaultMessage:C.label},labelAction:s,name:t})};t.DynamicZone=P,P.defaultProps={dynamicDisplayedComponents:[],fieldSchema:{max:1/0,min:-1/0},labelAction:null},P.propTypes={addComponentToDynamicZone:s.default.func.isRequired,dynamicDisplayedComponents:s.default.array,fieldSchema:s.default.shape({components:s.default.array.isRequired,max:s.default.number,min:s.default.number,required:s.default.bool}),formErrors:s.default.object.isRequired,isCreatingEntry:s.default.bool.isRequired,isFieldAllowed:s.default.bool.isRequired,isFieldReadable:s.default.bool.isRequired,labelAction:s.default.element,metadatas:s.default.shape({description:s.default.string,label:s.default.string}).isRequired,moveComponentUp:s.default.func.isRequired,moveComponentDown:s.default.func.isRequired,name:s.default.string.isRequired,removeComponentFromDynamicZone:s.default.func.isRequired};var C=(0,l.memo)(P,d.default),k=(0,g.default)(C,y.default);t.default=k},28027:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67154)),o=r(n(67294));var i=function(e,t){return function(n){var r=t(n.name);return o.default.createElement(e,(0,a.default)({},n,r))}};t.default=i},24366:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(67294),a=n(96486),o=n(68547);var i=function(e){var t=(0,o.useCMEditViewDataManager)(),n=t.addComponentToDynamicZone,i=t.createActionAllowedFields,l=t.isCreatingEntry,u=t.formErrors,d=t.modifiedData,s=t.moveComponentUp,c=t.moveComponentDown,f=t.removeComponentFromDynamicZone,p=t.readActionAllowedFields,m=t.updateActionAllowedFields,g=(0,r.useMemo)((function(){return(0,a.get)(d,[e],[]).map((function(e){return e.__component}))}),[d,e]),y=(0,r.useMemo)((function(){return(l?i:m).includes(e)}),[e,l,i,m]),b=(0,r.useMemo)((function(){return(l?[]:p).includes(e)}),[e,l,p]);return{addComponentToDynamicZone:n,formErrors:u,isCreatingEntry:l,isFieldAllowed:y,isFieldReadable:b,moveComponentUp:s,moveComponentDown:c,removeComponentFromDynamicZone:f,dynamicDisplayedComponents:g}};t.default=i},80249:(e,t,n)=>{"use strict";var r=n(25108),a=n(95318),o=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(87757)),l=a(n(48926)),u=a(n(63038)),d=E(n(67294)),s=n(96486),c=a(n(45697)),f=n(97132),p=n(39711),m=n(62031),g=n(68547),y=n(28564),b=E(n(47360)),v=n(80300);function h(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function E(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!==typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}var O=function(e){var t=e.allLayoutData,n=e.allowedActions,a=n.canRead,o=n.canUpdate,c=e.children,h=e.componentsDataStructure,E=e.contentTypeDataStructure,O=e.createActionAllowedFields,w=e.from,M=e.initialValues,j=e.isCreatingEntry,P=e.isLoadingForData,C=e.isSingleType,k=e.onPost,_=e.onPublish,R=e.onPut,T=e.onUnpublish,x=e.readActionAllowedFields,D=e.redirectToPreviousPage,S=e.slug,I=e.status,q=e.updateActionAllowedFields,F=(0,d.useReducer)(b.default,b.initialState),L=(0,u.default)(F,2),A=L[0],B=L[1],N=A.formErrors,W=A.initialData,z=A.modifiedData,U=A.modifiedDZName,V=A.shouldCheckErrors,H=(0,g.useNotification)(),G=(0,g.useOverlayBlocker)(),Z=G.lockApp,$=G.unlockApp,Q=(0,s.get)(t,["contentType"],{}),Y=(0,d.useMemo)((function(){return(0,s.get)(Q,["options","draftAndPublish"],!1)}),[Q]),J=(0,d.useMemo)((function(){return Y&&!W.publishedAt}),[Y,W.publishedAt]),K=(0,g.useTracking)().trackUsage,X=(0,f.useIntl)().formatMessage,ee=(0,d.useRef)(K),te=(0,d.useMemo)((function(){return!P&&(!j&&(!1===a&&!1===o))}),[P,j,a,o]);(0,d.useEffect)((function(){"resolved"===I?$():Z()}),[Z,$,I]),(0,d.useEffect)((function(){P||le()}),[V]),(0,d.useEffect)((function(){var e=Object.keys(N);if(e.length>0){var t=e[0],n=document.getElementById(t);n&&n.focus()}}),[N]),(0,d.useEffect)((function(){te&&H({type:"info",message:{id:(0,y.getTrad)("permissions.not-allowed.update")}})}),[te,H]),(0,d.useEffect)((function(){B({type:"SET_DEFAULT_DATA_STRUCTURES",componentsDataStructure:h,contentTypeDataStructure:E})}),[h,E]),(0,d.useEffect)((function(){M&&B({type:"INIT_FORM",initialValues:M})}),[M]);var ne=(0,d.useCallback)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];ee.current("didAddComponentToDynamicZone"),B({type:"ADD_COMPONENT_TO_DYNAMIC_ZONE",keys:e.split("."),componentUid:t,shouldCheckErrors:n})}),[]),re=(0,d.useCallback)((function(e,t){B({type:"ADD_NON_REPEATABLE_COMPONENT_TO_FIELD",keys:e.split("."),componentUid:t})}),[]),ae=(0,d.useCallback)((function(e){var t=e.target,n=t.name,r=t.value;B({type:"ADD_RELATION",keys:n.split("."),value:r})}),[]),oe=(0,d.useCallback)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];B({type:"ADD_REPEATABLE_COMPONENT_TO_FIELD",keys:e.split("."),componentUid:t,shouldCheckErrors:n})}),[]),ie=(0,d.useMemo)((function(){var e={isCreatingEntry:j,isDraft:J,isFromComponent:!1};return(0,v.createYupSchema)(Q,{components:t.components||{}},e)}),[t.components,Q,j,J]),le=(0,d.useCallback)((0,l.default)(i.default.mark((function e(){var t,n,r,a=arguments;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},n={},r=(0,s.cloneDeep)(z),(0,s.isEmpty)(r)||(0,s.set)(r,t.path,t.value),e.prev=4,e.next=7,ie.validate(r,{abortEarly:!1});case 7:e.next=13;break;case 9:e.prev=9,e.t0=e.catch(4),n=(0,v.getYupInnerErrors)(e.t0),U&&(n=Object.keys(n).reduce((function(e,t){return t.split(".")[0]!==U&&(e[t]=n[t]),e}),{}));case 13:B({type:"SET_FORM_ERRORS",errors:n});case 14:case"end":return e.stop()}}),e,null,[[4,9]])}))),[U,z,ie]),ue=(0,d.useCallback)((function(e){var t=e.target,n=t.name,r=t.value,a=t.type,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=r;"date"===a&&""===r&&(i=null),"password"!==a||r?("select-one"===a&&""===r&&(i=null),"number"===a&&""===r&&(i=null),B({type:"ON_CHANGE",keys:n.split("."),value:i,shouldSetInitialValue:o})):B({type:"REMOVE_PASSWORD_FIELD",keys:n.split(".")})}),[]),de=(0,d.useCallback)((function(e){var n=(0,y.removeKeyInObject)((0,s.cloneDeep)(e),"__temp_key__");return(0,v.cleanData)(n,Q,t.components)}),[t.components,Q]),se=(0,d.useMemo)((function(){return Y&&J?{status:"draft"}:{}}),[Y,J]),ce=(0,d.useCallback)(function(){var e=(0,l.default)(i.default.mark((function e(t){var n,a;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),n={},e.prev=2,e.next=5,ie.validate(z,{abortEarly:!1});case 5:a=de(z),j?k(a,se):R(a,se),e.next=15;break;case 9:e.prev=9,e.t0=e.catch(2),r.log("ValidationError"),r.log(e.t0),n=(0,v.getYupInnerErrors)(e.t0),H({type:"warning",message:{id:(0,y.getTrad)("containers.EditView.notification.errors"),defaultMessage:"The form contains some errors"}});case 15:B({type:"SET_FORM_ERRORS",errors:n});case 16:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}(),[de,j,z,k,R,H,se,ie]),fe=(0,d.useCallback)((0,l.default)(i.default.mark((function e(){var n,a;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,v.createYupSchema)(Q,{components:(0,s.get)(t,"components",{})},{isCreatingEntry:j,isDraft:!1,isFromComponent:!1}),a={},e.prev=2,e.next=5,n.validate(z,{abortEarly:!1});case 5:_(),e.next=13;break;case 8:e.prev=8,e.t0=e.catch(2),r.error("ValidationError"),r.error(e.t0),a=(0,v.getYupInnerErrors)(e.t0);case 13:B({type:"SET_FORM_ERRORS",errors:a});case 14:case"end":return e.stop()}}),e,null,[[2,8]])}))),[t,Q,j,z,_]),pe=(0,d.useCallback)((function(e){var t=Object.keys(N).some((function(t){return t.split(".")[0]===e}));return!(0,s.isEmpty)(N)&&t}),[N]),me=(0,d.useCallback)((function(e,t){ee.current("changeComponentsOrder"),B({type:"MOVE_COMPONENT_DOWN",dynamicZoneName:e,currentIndex:t,shouldCheckErrors:pe(e)})}),[pe]),ge=(0,d.useCallback)((function(e,t){ee.current("changeComponentsOrder"),B({type:"MOVE_COMPONENT_UP",dynamicZoneName:e,currentIndex:t,shouldCheckErrors:pe(e)})}),[pe]),ye=(0,d.useCallback)((function(e,t,n){B({type:"MOVE_COMPONENT_FIELD",pathToComponent:e,dragIndex:t,hoverIndex:n})}),[]),be=(0,d.useCallback)((function(e,t,n){B({type:"MOVE_FIELD",dragIndex:e,overIndex:t,keys:n.split(".")})}),[]),ve=(0,d.useCallback)((function(e){B({type:"REMOVE_RELATION",keys:e})}),[]),he=(0,d.useCallback)((function(e,t){ee.current("removeComponentFromDynamicZone"),B({type:"REMOVE_COMPONENT_FROM_DYNAMIC_ZONE",dynamicZoneName:e,index:t,shouldCheckErrors:pe(e)})}),[pe]),Ee=(0,d.useCallback)((function(e,t){B({type:"REMOVE_COMPONENT_FROM_FIELD",keys:e.split("."),componentUid:t})}),[]),Oe=(0,d.useCallback)((function(e,t){B({type:"REMOVE_REPEATABLE_FIELD",keys:e.split("."),componentUid:t})}),[]),we=(0,d.useCallback)((function(){B({type:"TRIGGER_FORM_VALIDATION"})}),[]);return te?d.default.createElement(p.Redirect,{to:w}):z?d.default.createElement(g.ContentManagerEditViewDataManagerContext.Provider,{value:{addComponentToDynamicZone:ne,addNonRepeatableComponentToField:re,addRelation:ae,addRepeatableComponentToField:oe,allLayoutData:t,checkFormErrors:le,createActionAllowedFields:O,formErrors:N,hasDraftAndPublish:Y,initialData:W,isCreatingEntry:j,isSingleType:C,shouldNotRunValidations:J,status:I,layout:Q,modifiedData:z,moveComponentDown:me,moveComponentField:ye,moveComponentUp:ge,moveRelation:be,onChange:ue,onPublish:fe,onUnpublish:T,onRemoveRelation:ve,readActionAllowedFields:x,redirectToPreviousPage:D,removeComponentFromDynamicZone:he,removeComponentFromField:Ee,removeRepeatableField:Oe,slug:S,triggerFormValidation:we,updateActionAllowedFields:q}},d.default.createElement(d.default.Fragment,null,P||!j&&!W.id?d.default.createElement(m.Main,{"aria-busy":"true"},d.default.createElement(g.LoadingIndicatorPage,null)):d.default.createElement(d.default.Fragment,null,d.default.createElement(p.Prompt,{when:!(0,s.isEqual)(z,W),message:X({id:"global.prompt.unsaved"})}),d.default.createElement("form",{noValidate:!0,onSubmit:ce},c)))):null};O.defaultProps={from:"/",initialValues:null,redirectToPreviousPage:function(){}},O.propTypes={allLayoutData:c.default.object.isRequired,allowedActions:c.default.object.isRequired,children:c.default.node.isRequired,componentsDataStructure:c.default.object.isRequired,contentTypeDataStructure:c.default.object.isRequired,createActionAllowedFields:c.default.array.isRequired,from:c.default.string,initialValues:c.default.object,isCreatingEntry:c.default.bool.isRequired,isLoadingForData:c.default.bool.isRequired,isSingleType:c.default.bool.isRequired,onPost:c.default.func.isRequired,onPublish:c.default.func.isRequired,onPut:c.default.func.isRequired,onUnpublish:c.default.func.isRequired,readActionAllowedFields:c.default.array.isRequired,redirectToPreviousPage:c.default.func,slug:c.default.string.isRequired,status:c.default.string.isRequired,updateActionAllowedFields:c.default.array.isRequired};var w=O;t.default=w},47360:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.initialState=t.default=void 0;var a=r(n(63038)),o=r(n(59713)),i=r(n(319)),l=r(n(66312)),u=r(n(98601)),d=r(n(27361)),s=r(n(36968)),c=r(n(69572)),f=n(80300),p=n(28564);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.initialState={componentsDataStructure:{},contentTypeDataStructure:{},formErrors:{},initialData:{},modifiedData:null,shouldCheckErrors:!1,modifiedDZName:null};var y=function(e,t){return(0,l.default)(e,(function(n){switch(t.type){case"ADD_NON_REPEATABLE_COMPONENT_TO_FIELD":(0,s.default)(n,["modifiedData"].concat((0,i.default)(t.keys)),e.componentsDataStructure[t.componentUid]);break;case"ADD_REPEATABLE_COMPONENT_TO_FIELD":var r=(0,d.default)(e,["modifiedData"].concat((0,i.default)(t.keys)),[]).slice(),l=g(g({},e.componentsDataStructure[t.componentUid]),{},{__temp_key__:(0,p.getMaxTempKey)(r)+1});Array.isArray(r)?r.push(l):r=[l],(0,s.default)(n,["modifiedData"].concat((0,i.default)(t.keys)),r),t.shouldCheckErrors&&(n.shouldCheckErrors=!e.shouldCheckErrors);break;case"ADD_COMPONENT_TO_DYNAMIC_ZONE":n.modifiedDZName=t.keys[0],t.shouldCheckErrors&&(n.shouldCheckErrors=!e.shouldCheckErrors);var m=g(g({},e.componentsDataStructure[t.componentUid]),{},{__component:t.componentUid}),y=(0,d.default)(e,["modifiedData"].concat((0,i.default)(t.keys)),null),b=y?[].concat((0,i.default)(y),[m]):[m];(0,s.default)(n,["modifiedData"].concat((0,i.default)(t.keys)),b);break;case"ADD_RELATION":if(!Array.isArray(t.value)||!t.value.length)break;var v=t.value[0].value,h=(0,d.default)(e,["modifiedData"].concat((0,i.default)(t.keys)),null);if(!h){(0,s.default)(n,["modifiedData"].concat((0,i.default)(t.keys)),[v]);break}(0,s.default)(n,["modifiedData"].concat((0,i.default)(t.keys)),[].concat((0,i.default)(h),[v]));break;case"INIT_FORM":n.formErrors={},n.initialData=t.initialValues,n.modifiedData=t.initialValues,n.modifiedDZName=null,n.shouldCheckErrors=!1;break;case"MOVE_COMPONENT_FIELD":var E=(0,d.default)(e,["modifiedData"].concat((0,i.default)(t.pathToComponent))),O=(0,d.default)(e,["modifiedData"].concat((0,i.default)(t.pathToComponent),[t.dragIndex])),w=(0,f.moveFields)(E,t.dragIndex,t.hoverIndex,O);(0,s.default)(n,["modifiedData"].concat((0,i.default)(t.pathToComponent)),w);break;case"MOVE_COMPONENT_UP":case"MOVE_COMPONENT_DOWN":var M=t.currentIndex,j=t.dynamicZoneName;t.shouldCheckErrors&&(n.shouldCheckErrors=!e.shouldCheckErrors);var P=e.modifiedData[j],C="MOVE_COMPONENT_UP"===t.type?M-1:M+1,k=e.modifiedData[j][M],_=(0,f.moveFields)(P,M,C,k);(0,s.default)(n,["modifiedData",t.dynamicZoneName],_);break;case"MOVE_FIELD":var R=(0,d.default)(e,["modifiedData"].concat((0,i.default)(t.keys)),[]).slice(),T=(0,d.default)(e,["modifiedData"].concat((0,i.default)(t.keys),[t.dragIndex])),x=(0,f.moveFields)(R,t.dragIndex,t.overIndex,T);(0,s.default)(n,["modifiedData"].concat((0,i.default)(t.keys)),x);break;case"ON_CHANGE":var D=(0,a.default)(t.keys,1)[0];if(t.shouldSetInitialValue&&(0,s.default)(n,["initialData"].concat((0,i.default)(t.keys)),t.value),2===t.keys.length&&null===(0,d.default)(e,["modifiedData",D])){(0,s.default)(n,["modifiedData",D],(0,o.default)({},t.keys[1],t.value));break}(0,s.default)(n,["modifiedData"].concat((0,i.default)(t.keys)),t.value);break;case"REMOVE_COMPONENT_FROM_DYNAMIC_ZONE":t.shouldCheckErrors&&(n.shouldCheckErrors=!e.shouldCheckErrors),n.modifiedData[t.dynamicZoneName].splice(t.index,1);break;case"REMOVE_COMPONENT_FROM_FIELD":var S=["modifiedData"].concat((0,i.default)(t.keys));(0,s.default)(n,S,null);break;case"REMOVE_PASSWORD_FIELD":(0,u.default)(n,["modifiedData"].concat((0,i.default)(t.keys)));break;case"REMOVE_REPEATABLE_FIELD":var I=t.keys.length-1,q=["modifiedData"].concat((0,i.default)((0,c.default)(t.keys,I)));Object.keys(e.formErrors).length>0&&(n.shouldCheckErrors=!e.shouldCheckErrors);var F=(0,d.default)(e,q).slice();F.splice(parseInt(t.keys[I],10),1),(0,s.default)(n,q,F);break;case"REMOVE_RELATION":var L=t.keys.split("."),A=L.length-1,B=["modifiedData"].concat((0,i.default)((0,c.default)(L,A))),N=(0,d.default)(e,B).slice(),W=parseInt(L[A],10);N.splice(W,1),(0,s.default)(n,B,N);break;case"SET_DEFAULT_DATA_STRUCTURES":n.componentsDataStructure=t.componentsDataStructure,n.contentTypeDataStructure=t.contentTypeDataStructure;break;case"SET_FORM_ERRORS":n.modifiedDZName=null,n.formErrors=t.errors;break;case"TRIGGER_FORM_VALIDATION":Object.keys(e.formErrors).length>0&&(n.shouldCheckErrors=!e.shouldCheckErrors);break;default:return n}}))};t.default=y},62170:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.helperCleanData=t.default=void 0;var a=r(n(319)),o=r(n(27361)),i=r(n(1469)),l=r(n(13218)),u=function(e,t){return(0,i.default)(e)?e.map((function(e){return e[t]?e[t]:e})):(0,l.default)(e)?e[t]:e};t.helperCleanData=u;var d=function(e,t,n){var r=function(e,t){return(0,o.default)(e,["attributes"].concat((0,a.default)(t)),"")};return function e(t,a){return Object.keys(t).reduce((function(i,l){var d,s=function(e,t){return(0,o.default)(e,["attributes",t,"type"],"")}(a,l),c=(0,o.default)(t,l),f=r(a,[l,"component"]),p=r(a,[l,"repeatable"]);switch(s){case"json":try{d=JSON.parse(c)}catch(m){d=c}break;case"time":d=c,c&&c.split(":").length<3&&(d="".concat(c,":00"));break;case"media":d=!0===r(a,[l,"multiple"])?c?c.filter((function(e){return!(e instanceof File)})):null:(0,o.default)(c,0)instanceof File?null:(0,o.default)(c,"id",null);break;case"component":d=p?c?c.map((function(t){return e(t,n[f])})):c:c?e(c,n[f]):c;break;case"dynamiczone":d=c.map((function(t){return e(t,n[t.__component])}));break;default:d=u(c,"id")}return i[l]=d,i}),{})}(e,t)};t.default=d},19918:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(96486),a=function(e){return(0,r.get)(e,"inner",[]).reduce((function(e,t){return e[t.path.split("[").join(".").split("]").join("")]={id:t.message},e}),{})};t.default=a},80300:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"cleanData",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"createYupSchema",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"getYupInnerErrors",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"moveFields",{enumerable:!0,get:function(){return a.default}});var a=r(n(23650)),o=r(n(62170)),i=r(n(19918)),l=r(n(9210))},70802:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){if("string"===typeof e&&e.startsWith('"')&&e.endsWith('"'))try{return JSON.parse(e),!0}catch(t){return!1}return!1};t.default=n},23650:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e,t,n,r){var a=e.slice();return a.splice(t,1),a.splice(n,0,r),a};t.default=n},9210:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(59713)),i=r(n(27361)),l=r(n(51584)),u=r(n(81763)),d=r(n(45220)),s=r(n(13218)),c=r(n(41609)),f=r(n(7654)),p=r(n(14841)),m=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(53209)),g=n(68547),y=r(n(70802));function b(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}m.addMethod(m.mixed,"defined",(function(){return this.test("defined",g.translatedErrors.required,(function(e){return void 0!==e}))})),m.addMethod(m.array,"notEmptyMin",(function(e){return this.test("notEmptyMin",g.translatedErrors.min,(function(t){return!!(0,c.default)(t)||t.length>=e}))})),m.addMethod(m.string,"isInferior",(function(e,t){return this.test("isInferior",e,(function(e){return!e||(!!Number.isNaN((0,p.default)(e))||(0,p.default)(t)>=(0,p.default)(e))}))})),m.addMethod(m.string,"isSuperior",(function(e,t){return this.test("isSuperior",e,(function(e){return!e||(!!Number.isNaN((0,p.default)(e))||(0,p.default)(e)>=(0,p.default)(t))}))}));var E=function(e){return(0,i.default)(e,["attributes"],{})},O=function(e,t,n){var r=m.mixed();return["string","uid","text","richtext","email","password","enumeration"].includes(e)&&(r=m.string()),"json"===e&&(r=m.mixed(g.translatedErrors.json).test("isJSON",g.translatedErrors.json,(function(e){if(void 0===e)return!0;if((0,y.default)(e)||(0,u.default)(e)||(0,d.default)(e)||(0,s.default)(e))return!0;try{return JSON.parse(e),!0}catch(t){return!1}})).nullable()),"email"===e&&(r=r.email(g.translatedErrors.email)),["number","integer","float","decimal"].includes(e)&&(r=m.number().transform((function(e){return(0,f.default)(e)?void 0:e})).typeError()),["date","datetime"].includes(e)&&(r=m.date()),"biginteger"===e&&(r=m.string().matches(/^-?\d*$/)),Object.keys(t).forEach((function(a){var o=t[a];if(o||!(0,l.default)(o)&&Number.isInteger(Math.floor(o))||0===o)switch(a){case"required":n.isDraft||("password"===e&&n.isCreatingEntry&&(r=r.required(g.translatedErrors.required)),"password"!==e&&(r=n.isCreatingEntry?r.required(g.translatedErrors.required):r.test("required",g.translatedErrors.required,(function(t){return void 0===t&&!n.isFromComponent||(["number","integer","biginteger","float","decimal"].includes(e)?0===t||!!t:"boolean"===e?null!==t:"date"===e||"datetime"===e?"string"===typeof t?!(0,c.default)(t):!(0,c.default)(null===t||void 0===t?void 0:t.toString()):!(0,c.default)(t))}))));break;case"max":r="biginteger"===e?r.isInferior(g.translatedErrors.max,o):r.max(o,g.translatedErrors.max);break;case"maxLength":r=r.max(o,g.translatedErrors.maxLength);break;case"min":r="biginteger"===e?r.isSuperior(g.translatedErrors.min,o):r.min(o,g.translatedErrors.min);break;case"minLength":n.isDraft||(r=r.min(o,g.translatedErrors.minLength));break;case"regex":r=r.matches(new RegExp(o),{message:g.translatedErrors.regex,excludeEmptyString:!t.required});break;case"lowercase":["text","textarea","email","string"].includes(e)&&(r=r.strict().lowercase());break;case"uppercase":["text","textarea","email","string"].includes(e)&&(r=r.strict().uppercase());break;case"positive":["number","integer","bigint","float","decimal"].includes(e)&&(r=r.positive());break;case"negative":["number","integer","bigint","float","decimal"].includes(e)&&(r=r.negative());break;default:r=r.nullable()}})),r},w=function e(t,n){var r=n.components,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isCreatingEntry:!0,isDraft:!0,isFromComponent:!1},o=E(t);return m.object().shape(Object.keys(o).reduce((function(t,n){var i=o[n];if("relation"!==i.type&&"component"!==i.type&&"dynamiczone"!==i.type){var l=O(i.type,i,a);t[n]=l}if("relation"===i.type&&(t[n]=["oneWay","oneToOne","manyToOne","oneToManyMorph","oneToOneMorph"].includes(i.relationType)?m.object().nullable():m.array().nullable()),"component"===i.type){var u=e(r[i.component],{components:r},h(h({},a),{},{isFromComponent:!0}));if(!0===i.repeatable){var d=i.min,s=i.max,f=i.required,p=m.lazy((function(e){var t=m.array().of(u);return d?t=f?t.min(d,g.translatedErrors.min):!0!==f&&(0,c.default)(e)?t.nullable():t.min(d,g.translatedErrors.min):f&&!a.isDraft&&(t=t.min(1,g.translatedErrors.required)),s&&(t=t.max(s,g.translatedErrors.max)),t}));return t[n]=p,t}var y=m.lazy((function(e){return void 0!==e?!0!==i.required||a.isDraft?u.nullable():u.defined():!0===i.required?m.object().defined():m.object().nullable()}));return t[n]=y,t}if("dynamiczone"===i.type){var b=m.array().of(m.lazy((function(t){var n=t.__component;return e(r[n],{components:r},h(h({},a),{},{isFromComponent:!0}))}))),v=i.max,E=i.min;E?b=i.required?b.test("min",g.translatedErrors.min,(function(e){return a.isCreatingEntry?e&&e.length>=E:void 0===e||null!==e&&e.length>=E})).test("required",g.translatedErrors.required,(function(e){return a.isCreatingEntry?null!==e||void 0!==e:void 0===e||null!==e})):b.notEmptyMin(E):i.required&&!a.isDraft&&(b=b.test("required",g.translatedErrors.required,(function(e){return a.isCreatingEntry?null!==e||void 0!==e:void 0===e||null!==e}))),v&&(b=b.max(v,g.translatedErrors.max)),t[n]=b}return t}),{}))};t.default=w},69817:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=n(97132),l=r(n(78384)),u=n(5493),d=n(67826),s=n(49425),c=(0,l.default)(u.Box).withConfig({displayName:"Label__LabelAction",componentId:"sc-fda47w-0"})(["svg path{fill:",";}"],(function(e){return e.theme.colors.neutral500})),f=function(e){var t=e.intlLabel,n=e.id,r=e.labelAction,o=e.name,l=e.numberOfEntries,f=e.showNumberOfEntries,p=e.required,m=(0,i.useIntl)().formatMessage,g=null!==t&&void 0!==t&&t.id?m(t):o;return a.default.createElement(u.Box,{paddingBottom:1},a.default.createElement(d.Flex,null,a.default.createElement(s.Typography,{textColor:"neutral800",htmlFor:n||o,variant:"pi",fontWeight:"bold",as:"label"},g,f&&a.default.createElement(a.default.Fragment,null,"\xa0(",l,")"),p&&a.default.createElement(s.Typography,{textColor:"danger600"},"*")),r&&a.default.createElement(c,{paddingLeft:1},r)))};f.defaultProps={id:void 0,labelAction:void 0,numberOfEntries:0,required:!1,showNumberOfEntries:!1},f.propTypes={id:o.default.string,intlLabel:o.default.shape({id:o.default.string.isRequired,defaultMessage:o.default.string.isRequired,values:o.default.object}).isRequired,labelAction:o.default.element,name:o.default.string.isRequired,numberOfEntries:o.default.number,required:o.default.bool,showNumberOfEntries:o.default.bool};var p=f;t.default=p},49925:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=M(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),i=r(n(45697)),l=r(n(84238)),u=r(n(69590)),d=n(97132),s=n(68547),c=r(n(18568)),f=n(5493),p=n(30741),m=n(67826),g=n(9008),y=n(28564),b=r(n(4185)),v=r(n(13269)),h=r(n(14832)),E=r(n(51271)),O=r(n(52574)),w=r(n(69817));function M(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(M=function(e){return e?n:t})(e)}var j=function(e){var t=e.addNonRepeatableComponentToField,n=e.componentUid,r=e.intlLabel,a=e.isCreatingEntry,i=e.isFromDynamicZone,u=e.isRepeatable,E=e.isNested,O=e.labelAction,M=e.max,j=e.min,P=e.name,C=e.hasChildrenAllowedFields,k=e.hasChildrenReadableFields,_=e.isReadOnly,R=e.componentValue,T=e.removeComponentFromField,x=e.required,D=(0,d.useIntl)().formatMessage,S=(0,l.default)(R),I=null!==R||i,q=!u&&I&&!i&&C;if(!C&&a)return o.default.createElement(s.NotAllowedInput,{labelAction:O,intlLabel:r,name:P});if(!C&&!a&&!k)return o.default.createElement(s.NotAllowedInput,{labelAction:O,intlLabel:r,name:P});return o.default.createElement(f.Box,null,o.default.createElement(m.Flex,{justifyContent:"space-between"},r&&o.default.createElement(w.default,{intlLabel:r,labelAction:O,name:P,numberOfEntries:S,showNumberOfEntries:u,required:x}),q&&o.default.createElement(p.IconButton,{label:D({id:(0,y.getTrad)("components.reset-entry"),defaultMessage:"Reset Entry"}),icon:o.default.createElement(c.default,null),noBorder:!0,onClick:function(){T(P,n)}})),o.default.createElement(g.Stack,{size:1},!u&&!I&&o.default.createElement(b.default,{isReadOnly:_,onClick:function(){t(P,n)}}),!u&&I&&o.default.createElement(v.default,{componentUid:n,isFromDynamicZone:i,isNested:E,name:P}),u&&o.default.createElement(h.default,{componentValue:R,componentValueLength:S,componentUid:n,isNested:E,isReadOnly:_,max:M,min:j,name:P})))};j.defaultProps={componentValue:null,hasChildrenAllowedFields:!1,hasChildrenReadableFields:!1,intlLabel:void 0,isFromDynamicZone:!1,isReadOnly:!1,isRepeatable:!1,isNested:!1,labelAction:void 0,max:1/0,min:-1/0,required:!1},j.propTypes={addNonRepeatableComponentToField:i.default.func.isRequired,componentUid:i.default.string.isRequired,componentValue:i.default.oneOfType([i.default.object,i.default.array]),hasChildrenAllowedFields:i.default.bool,hasChildrenReadableFields:i.default.bool,isCreatingEntry:i.default.bool.isRequired,isFromDynamicZone:i.default.bool,isReadOnly:i.default.bool,isRepeatable:i.default.bool,isNested:i.default.bool,intlLabel:i.default.shape({id:i.default.string.isRequired,defaultMessage:i.default.string.isRequired,values:i.default.object}),labelAction:i.default.element,max:i.default.number,min:i.default.number,name:i.default.string.isRequired,removeComponentFromField:i.default.func.isRequired,required:i.default.bool};var P=(0,o.memo)(j,u.default),C=(0,E.default)(P,O.default);t.default=C},51271:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67154)),o=r(n(67294));var i=function(e,t){return function(n){var r=t(n);return o.default.createElement(e,(0,a.default)({},n,r))}};t.default=i},52574:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(67294),a=n(96486),o=n(68547),i=n(28564),l=n(14772);var u=function(e){var t=e.isFromDynamicZone,n=e.name,u=(0,o.useCMEditViewDataManager)(),d=u.addNonRepeatableComponentToField,s=u.createActionAllowedFields,c=u.isCreatingEntry,f=u.modifiedData,p=u.removeComponentFromField,m=u.readActionAllowedFields,g=u.updateActionAllowedFields,y=u.formErrors,b=(0,l.useContentTypeLayout)().contentType,v=(0,r.useMemo)((function(){var e=(0,a.get)(b,["attributes"],{});return Object.keys(e).filter((function(t){return"dynamiczone"===(0,a.get)(e,[t,"type"],"")}))}),[b]),h=(0,r.useMemo)((function(){return c?s:g}),[c,s,g]),E=(0,a.get)(f,n,null),O=(0,r.useMemo)((function(){return(0,i.getFieldName)(n)}),[n]),w=(0,r.useMemo)((function(){if(t&&c)return!0;var e=h.filter((function(e){return e===O[0]}));return e.length>0||h.map((function(e){return e.split(".")})).filter((function(e){return!(e.length<O.length)&&(0,a.take)(e,O.length).join(".")===O.join(".")})).length>0}),[t,c,h,O]),M=(0,r.useMemo)((function(){return!!t||(!!v.includes(O[0])||(c?[]:m).map((function(e){return e.split(".")})).filter((function(e){return!(e.length<O.length)&&(0,a.take)(e,O.length).join(".")===O.join(".")})).length>0)}),[t,v,O,c,m]),j=(0,r.useMemo)((function(){return!c&&(!w&&M)}),[w,M,c]);return{addNonRepeatableComponentToField:d,formErrors:y,hasChildrenAllowedFields:w,hasChildrenReadableFields:M,isCreatingEntry:c,isReadOnly:j,removeComponentFromField:p,componentValue:E}};t.default=u},74373:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=r(n(99544)),l=r(n(18561)),u=r(n(74642)),d=r(n(60178)),s=r(n(46966)),c=r(n(81641)),f=r(n(18772)),p=r(n(10301)),m=r(n(35020)),g=r(n(60493)),y=r(n(29685)),b=r(n(71066)),v={biginteger:a.default.createElement(m.default,null),boolean:a.default.createElement(l.default,null),date:a.default.createElement(i.default,null),datetime:a.default.createElement(i.default,null),decimal:a.default.createElement(m.default,null),email:a.default.createElement(u.default,null),enum:a.default.createElement(d.default,null),enumeration:a.default.createElement(d.default,null),file:a.default.createElement(s.default,null),files:a.default.createElement(s.default,null),float:a.default.createElement(m.default,null),integer:a.default.createElement(m.default,null),media:a.default.createElement(s.default,null),number:a.default.createElement(m.default,null),relation:a.default.createElement(c.default,null),string:a.default.createElement(f.default,null),text:a.default.createElement(f.default,null),richtext:a.default.createElement(f.default,null),time:a.default.createElement(i.default,null),timestamp:a.default.createElement(i.default,null),json:a.default.createElement(g.default,null),uid:a.default.createElement(p.default,null),component:a.default.createElement(y.default,null),dynamiczone:a.default.createElement(b.default,null)},h=function(e){var t=e.type;return v[t]||null};h.propTypes={type:o.default.string.isRequired};var E=h;t.default=E},32266:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Hint=void 0;var a=r(n(59713)),o=r(n(67294)),i=r(n(45697)),l=n(97132),u=n(49425);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var s=function(e){var t=e.id,n=e.error,r=e.name,i=e.description,s=(0,l.useIntl)().formatMessage,c=i?s({id:i.id,defaultMessage:i.defaultMessage},function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},i.values)):"";return!c||n?null:o.default.createElement(u.Typography,{as:"p",variant:"pi",id:"".concat(t||r,"-hint"),textColor:"neutral600"},c)};t.Hint=s,s.defaultProps={id:void 0,description:void 0,error:void 0},s.propTypes={description:i.default.shape({id:i.default.string.isRequired,defaultMessage:i.default.string.isRequired,values:i.default.object}),error:i.default.string,id:i.default.string,name:i.default.string.isRequired};var c=s;t.default=c},85117:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(6479)),o=r(n(67294)),i=r(n(45697)),l=n(5493),u=n(73460),d=["area"],s=function(e){var t=e.area,n=(0,a.default)(e,d),r=(0,u.useInjectionZone)(t);return r?o.default.createElement("ul",null,r.map((function(e){return e.Component(n)?o.default.createElement(l.Box,{key:e.name,padding:3,style:{textAlign:"center"}},o.default.createElement(e.Component,n)):null}))):null};s.propTypes={area:i.default.string.isRequired};var c=s;t.default=c},99614:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=n(97132),l=n(91767),u=function(e){var t=e.name,n=e.hint,r=e.error,o=e.children,u=(0,i.useIntl)().formatMessage,d=r?u({id:r,defaultMessage:r}):"";return a.default.createElement(l.Field,{name:t,hint:n&&u(n),error:d,id:t},o)};u.defaultProps={hint:void 0,error:""},u.propTypes={name:o.default.string.isRequired,hint:o.default.shape({id:o.default.string,defaultMessage:o.default.string}),error:o.default.string,children:o.default.node.isRequired};var d=u;t.default=d},36464:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(59713)),o=r(n(67294)),i=r(n(45697)),l=r(n(78384)),u=n(97132),d=n(91767),s=n(5493),c=n(67826);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var p=(0,l.default)(s.Box).withConfig({displayName:"Label__LabelAction",componentId:"sc-103sbml-0"})(["svg path{fill:",";}"],(function(e){return e.theme.colors.neutral500})),m=function(e){var t=e.intlLabel,n=e.labelAction,r=e.name,i=e.required,l=(0,u.useIntl)().formatMessage,s=null!==t&&void 0!==t&&t.id?l({id:t.id,defaultMessage:t.defaultMessage},function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t.values)):r;return o.default.createElement(c.Flex,null,o.default.createElement(d.FieldLabel,{required:i},s),n&&o.default.createElement(p,{paddingLeft:1},n))};m.defaultProps={id:void 0,intlLabel:void 0,labelAction:void 0,required:!1},m.propTypes={id:i.default.string,intlLabel:i.default.shape({id:i.default.string.isRequired,defaultMessage:i.default.string.isRequired,values:i.default.object}),labelAction:i.default.element,name:i.default.string.isRequired,required:i.default.bool};var g=m;t.default=g},39480:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.StyledBox=t.EditorWrapper=void 0;var a=r(n(78384)),o=n(5493),i=a.default.div.withConfig({displayName:"components__EditorWrapper",componentId:"sc-1ydjvfp-0"})(["cursor:",";.colored{background-color:yellow;color:black !important;}> div{border-radius:3px;> div:last-of-type{min-height:253px;max-height:506px;}}.CodeMirror{font-size:","rem;direction:ltr;z-index:0;}"],(function(e){return e.disabled?"not-allowed !important":"auto"}),.875);t.EditorWrapper=i;var l=(0,a.default)(o.Box).withConfig({displayName:"components__StyledBox",componentId:"sc-1ydjvfp-1"})(["border-radius:",";border:1px solid ",";"],(function(e){return e.theme.borderRadius}),(function(e){var t=e.theme;return e.error?t.colors.danger600:"transparent"}));t.StyledBox=l},80989:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(87757)),o=r(n(34575)),i=r(n(93913)),l=r(n(81506)),u=r(n(2205)),d=r(n(78585)),s=r(n(29754)),c=r(n(59713)),f=r(n(48926)),p=r(n(67294)),m=r(n(45697)),g=r(n(4631)),y=r(n(95659)),b=n(9008),v=n(91767),h=r(n(73741)),E=n(39480),O=r(n(36464)),w=r(n(99614));function M(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,s.default)(e);if(t){var a=(0,s.default)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return(0,d.default)(this,n)}}var j=JSON.stringify;(function(){var e=(0,f.default)(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.e(3860).then(n.t.bind(n,17319,23));case 2:return e.next=4,n.e(2781).then(n.t.bind(n,3256,23));case 4:return e.next=6,n.e(953).then(n.t.bind(n,96477,23));case 6:return e.next=8,n.e(5178).then(n.t.bind(n,82801,23));case 8:return e.next=10,n.e(5509).then(n.t.bind(n,64020,23));case 10:return e.next=12,n.e(3973).then(n.bind(n,91380));case 12:return e.next=14,n.e(2218).then(n.bind(n,69039));case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()();var P=function(e){(0,u.default)(n,e);var t=M(n);function n(e){var r;return(0,o.default)(this,n),r=t.call(this,e),(0,c.default)((0,l.default)(r),"timer",null),(0,c.default)((0,l.default)(r),"setInitValue",(function(){var e=r.props.value;try{if(null===e)return r.codeMirror.setValue("");var t=j(e,null,2);return r.codeMirror.setValue(t)}catch(n){return r.setState({error:!0})}})),(0,c.default)((0,l.default)(r),"setSize",(function(){return r.codeMirror.setSize("100%","auto")})),(0,c.default)((0,l.default)(r),"getContentAtLine",(function(e){return r.codeMirror.getLine(e)})),(0,c.default)((0,l.default)(r),"getEditorOption",(function(e){return r.codeMirror.getOption(e)})),(0,c.default)((0,l.default)(r),"getValue",(function(){return r.codeMirror.getValue()})),(0,c.default)((0,l.default)(r),"markSelection",(function(e){var t=e.message,n=parseInt(t.split(":")[0].split("line ")[1],10)-1,a=r.getContentAtLine(n);"{"===a&&(n+=1,a=r.getContentAtLine(n));var o=a.length,i=o-(0,y.default)(a," ").length,l=r.codeMirror.markText({line:n,ch:i},{line:n,ch:o},{className:"colored"});r.setState({markedText:l})})),(0,c.default)((0,l.default)(r),"handleChange",(function(e,t){if("setValue"!==t.origin){var n=r.props,a=n.name,o=n.onChange,i=e.getValue();""===i&&(i=null),o({target:{name:a,value:i,type:"json"}}),r.state.markedText&&(r.state.markedText.clear(),r.setState({markedText:null,error:null})),clearTimeout(r.timer),r.timer=setTimeout((function(){return r.testJSON(e.getValue())}),600)}})),(0,c.default)((0,l.default)(r),"testJSON",(function(e){try{h.default.parse(e)}catch(t){r.markSelection(t)}})),r.editor=p.default.createRef(),r.state={error:!1,markedText:null},r}return(0,i.default)(n,[{key:"componentDidMount",value:function(){this.codeMirror=g.default.fromTextArea(this.editor.current,{autoCloseBrackets:!0,lineNumbers:!0,matchBrackets:!0,mode:"application/json",readOnly:this.props.disabled,smartIndent:!0,styleSelectedText:!0,tabSize:2,theme:"blackboard",fontSize:"13px"}),this.codeMirror.on("change",this.handleChange),this.setSize(),this.setInitValue()}},{key:"componentDidUpdate",value:function(e){e.value===this.props.value||this.codeMirror.state.focused||this.setInitValue()}},{key:"render",value:function(){return this.state.error?p.default.createElement("div",null,"error json"):p.default.createElement(w.default,{name:this.props.name,hint:this.props.description,error:this.props.error},p.default.createElement(b.Stack,{size:1},p.default.createElement(O.default,{intlLabel:this.props.intlLabel,labelAction:this.props.labelAction,name:this.props.name,required:this.props.required}),p.default.createElement(E.StyledBox,{error:this.props.error},p.default.createElement(E.EditorWrapper,{disabled:this.props.disabled},p.default.createElement("textarea",{ref:this.editor,autoComplete:"off",id:this.props.id||this.props.name,defaultValue:""}))),p.default.createElement(v.FieldHint,null),p.default.createElement(v.FieldError,null)))}}]),n}(p.default.Component);P.defaultProps={description:null,disabled:!1,id:void 0,error:void 0,intlLabel:void 0,labelAction:void 0,onChange:function(){},value:null,required:!1},P.propTypes={description:m.default.shape({id:m.default.string.isRequired,defaultMessage:m.default.string.isRequired,values:m.default.object}),disabled:m.default.bool,error:m.default.string,id:m.default.string,intlLabel:m.default.shape({id:m.default.string.isRequired,defaultMessage:m.default.string.isRequired,values:m.default.object}),labelAction:m.default.element,name:m.default.string.isRequired,onChange:m.default.func,value:m.default.any,required:m.default.bool};var C=P;t.default=C},73741:(e,t)=>{"use strict";var n=function(){var e={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(e,t,n,r,a,o,i){var l=o.length-1;switch(a){case 1:this.$=e.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(e);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=o[l-1];case 13:this.$={};break;case 14:case 19:this.$=o[l-1];break;case 15:this.$=[o[l-2],o[l]];break;case 16:this.$={},this.$[o[l][0]]=o[l][1];break;case 17:this.$=o[l-2],o[l-2][o[l][0]]=o[l][1];break;case 18:this.$=[];break;case 20:this.$=[o[l]];break;case 21:this.$=o[l-2],o[l-2].push(o[l])}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(e,t){throw new Error(e)},parse:function(e){var t=this,n=[0],r=[null],a=[],o=this.table,i="",l=0,u=0,d=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var s=this.lexer.yylloc;function c(){var e;return"number"!==typeof(e=t.lexer.lex()||1)&&(e=t.symbols_[e]||e),e}a.push(s),"function"===typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var f,p,m,g,y,b,v,h,E,O,w={};;){if(m=n[n.length-1],this.defaultActions[m]?g=this.defaultActions[m]:(null==f&&(f=c()),g=o[m]&&o[m][f]),"undefined"===typeof g||!g.length||!g[0]){if(!d){for(b in E=[],o[m])this.terminals_[b]&&b>2&&E.push("'"+this.terminals_[b]+"'");var M="";M=this.lexer.showPosition?"Parse error on line "+(l+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+E.join(", ")+", got '"+this.terminals_[f]+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(M,{text:this.lexer.match,token:this.terminals_[f]||f,line:this.lexer.yylineno,loc:s,expected:E})}if(3==d){if(1==f)throw new Error(M||"Parsing halted.");u=this.lexer.yyleng,i=this.lexer.yytext,l=this.lexer.yylineno,s=this.lexer.yylloc,f=c()}for(;!(2..toString()in o[m]);){if(0==m)throw new Error(M||"Parsing halted.");O=1,n.length=n.length-2*O,r.length=r.length-O,a.length=a.length-O,m=n[n.length-1]}p=f,f=2,g=o[m=n[n.length-1]]&&o[m][2],d=3}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+f);switch(g[0]){case 1:n.push(f),r.push(this.lexer.yytext),a.push(this.lexer.yylloc),n.push(g[1]),f=null,p?(f=p,p=null):(u=this.lexer.yyleng,i=this.lexer.yytext,l=this.lexer.yylineno,s=this.lexer.yylloc,d>0&&d--);break;case 2:if(v=this.productions_[g[1]][1],w.$=r[r.length-v],w._$={first_line:a[a.length-(v||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(v||1)].first_column,last_column:a[a.length-1].last_column},"undefined"!==typeof(y=this.performAction.call(w,i,u,l,this.yy,g[1],r,a)))return y;v&&(n=n.slice(0,-1*v*2),r=r.slice(0,-1*v),a=a.slice(0,-1*v)),n.push(this.productions_[g[1]][0]),r.push(w.$),a.push(w._$),h=o[n[n.length-2]][n[n.length-1]],n.push(h);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parseError)throw new Error(e);this.yy.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e,e.match(/\n/)&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},less:function(e){this._input=this.match.slice(e)+this._input},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;var e,t,n,r,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),i=0;i<o.length&&(!(n=this._input.match(this.rules[o[i]]))||t&&!(n[0].length>t[0].length)||(t=n,r=i,this.options.flex));i++);return t?((a=t[0].match(/\n.*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-1:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,o[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e||void 0):""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return"undefined"!==typeof e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)},options:{},performAction:function(e,t,n,r){switch(n){case 0:break;case 1:return 6;case 2:return t.yytext=t.yytext.substr(1,t.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return e}();return e.lexer=t,e}();t.parser=n,t.parse=function(){return n.parse.apply(n,arguments)},t.main=function(e){if(!e[1])throw new Error("Usage: "+e[0]+" FILE")}},50032:(e,t,n)=>{"use strict";var r=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.TextValidation=t.LoadingWrapper=t.FieldActionWrapper=t.EndActionWrapper=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(a,i,l):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(78384)),o=n(5493),i=n(67826),l=n(91767);function u(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}var d=(0,a.default)(o.Box).withConfig({displayName:"endActionStyle__EndActionWrapper",componentId:"sc-1nwzcuq-0"})(["position:relative;"]);t.EndActionWrapper=d;var s=(0,a.default)(l.FieldAction).withConfig({displayName:"endActionStyle__FieldActionWrapper",componentId:"sc-1nwzcuq-1"})(["svg{height:1rem;width:1rem;path{fill:",";}}svg:hover{path{fill:",";}}"],(function(e){return e.theme.colors.neutral400}),(function(e){return e.theme.colors.primary600}));t.FieldActionWrapper=s;var c=(0,a.default)(i.Flex).withConfig({displayName:"endActionStyle__TextValidation",componentId:"sc-1nwzcuq-2"})(["position:absolute;right:",";width:100px;pointer-events:none;svg{margin-right:",";height:","rem;width:","rem;path{fill:",";}}"],(function(e){return e.theme.spaces[6]}),(function(e){return e.theme.spaces[1]}),.75,.75,(function(e){var t=e.theme;return e.notAvailable?t.colors.danger600:t.colors.success600}));t.TextValidation=c;var f=(0,a.keyframes)(["from{transform:rotate(0deg);}to{transform:rotate(359deg);}"]),p=(0,a.default)(i.Flex).withConfig({displayName:"endActionStyle__LoadingWrapper",componentId:"sc-1nwzcuq-3"})(["animation:"," 2s infinite linear;"],f);t.LoadingWrapper=p},95414:(e,t,n)=>{"use strict";var r=n(25108),a=n(95318),o=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(87757)),l=a(n(48926)),u=a(n(59713)),d=a(n(63038)),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!==typeof e)return{default:e};var n=C(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),c=a(n(45697)),f=n(68547),p=n(97132),m=a(n(27361)),g=n(55967),y=n(49425),b=a(n(27590)),v=a(n(23942)),h=a(n(51359)),E=a(n(57572)),O=n(53777),w=n(28564),M=a(n(9730)),j=a(n(74665)),P=n(50032);function C(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(C=function(e){return e?n:t})(e)}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){(0,u.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var R=function(e){var t=e.attribute,n=e.contentTypeUID,a=e.description,o=e.disabled,u=e.error,c=e.intlLabel,C=e.labelAction,k=e.name,R=e.onChange,T=e.value,x=e.placeholder,D=e.required,S=(0,f.useCMEditViewDataManager)(),I=S.modifiedData,q=S.initialData,F=S.layout,L=(0,s.useState)(!1),A=(0,d.default)(L,2),B=A[0],N=A[1],W=(0,s.useState)(null),z=(0,d.default)(W,2),U=z[0],V=z[1],H=(0,M.default)(T,300),G=(0,s.useRef)(),Z=q[k],$=(0,p.useIntl)().formatMessage,Q=!q[(0,m.default)(F,["options","timestamps",0])],Y=(0,M.default)(I[t.targetField],300),J=(0,s.useState)(!1),K=(0,d.default)(J,2),X=K[0],ee=K[1],te=(0,s.useState)(null),ne=(0,d.default)(te,2),re=ne[0],ae=ne[1],oe=c.id?$({id:c.id,defaultMessage:c.defaultMessage},_({},c.values)):k,ie=a?$({id:a.id,defaultMessage:a.defaultMessage},_({},a.values)):"",le=x?$({id:x.id,defaultMessage:x.defaultMessage},_({},x.values)):"";G.current=(0,l.default)(i.default.mark((function e(){var t,a,o,l,u=arguments;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=u.length>0&&void 0!==u[0]&&u[0],N(!0),a=(0,w.getRequestUrl)("uid/generate"),e.prev=3,e.next=6,O.axiosInstance.post(a,{contentTypeUID:n,field:k,data:I});case 6:o=e.sent,l=o.data.data,R({target:{name:k,value:l,type:"text"}},t),N(!1),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(3),r.error({err:e.t0}),N(!1);case 16:case"end":return e.stop()}}),e,null,[[3,12]])})));var ue=function(){var e=(0,l.default)(i.default.mark((function e(){var t,a,o;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(N(!0),t=(0,w.getRequestUrl)("uid/check-availability"),T){e.next=4;break}return e.abrupt("return");case 4:return e.prev=4,e.next=7,O.axiosInstance.post(t,{contentTypeUID:n,field:k,value:T?T.trim():""});case 7:a=e.sent,o=a.data,V(o),N(!1),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(4),r.error({err:e.t0}),N(!1);case 17:case"end":return e.stop()}}),e,null,[[4,13]])})));return function(){return e.apply(this,arguments)}}();(0,s.useEffect)((function(){!T&&t.required&&G.current(!0)}),[]),(0,s.useEffect)((function(){H&&H.trim().match(j.default)&&H!==Z&&!T&&ue(),H||V(null)}),[H,Z]),(0,s.useEffect)((function(){var e;return U&&U.isAvailable&&(e=setTimeout((function(){V(null)}),4e3)),function(){e&&clearTimeout(e)}}),[U]),(0,s.useEffect)((function(){!X&&Q&&Y&&I[t.targetField]&&!T&&G.current(!0)}),[Y,X,Q]);var de=u?$({id:u,defaultMessage:u}):void 0;return s.default.createElement(g.TextInput,{disabled:o,error:de,endAction:s.default.createElement(P.EndActionWrapper,null,U&&U.isAvailable&&!re&&s.default.createElement(P.TextValidation,{alignItems:"center",justifyContent:"flex-end"},s.default.createElement(v.default,null),s.default.createElement(y.Typography,{textColor:"success600",variant:"pi"},$({id:"content-manager.components.uid.available",defaultMessage:"Available"}))),U&&!U.isAvailable&&!re&&s.default.createElement(P.TextValidation,{notAvailable:!0,alignItems:"center",justifyContent:"flex-end"},s.default.createElement(h.default,null),s.default.createElement(y.Typography,{textColor:"danger600",variant:"pi"},$({id:"content-manager.components.uid.unavailable",defaultMessage:"Unavailable"}))),re&&s.default.createElement(P.TextValidation,{alignItems:"center",justifyContent:"flex-end"},s.default.createElement(y.Typography,{textColor:"primary600",variant:"pi"},re)),s.default.createElement(P.FieldActionWrapper,{onClick:function(){return G.current()},label:"regenerate",onMouseEnter:function(){ae($({id:"content-manager.components.uid.regenerate",defaultMessage:"Regenerate"}))},onMouseLeave:function(){ae(null)}},B?s.default.createElement(P.LoadingWrapper,null,s.default.createElement(E.default,null)):s.default.createElement(b.default,null))),hint:ie,label:oe,labelAction:C,name:k,onChange:function(e){e.target.value&&Q&&ee(!0),R(e)},placeholder:le,value:T||"",required:D})};R.propTypes={attribute:c.default.shape({targetField:c.default.string,required:c.default.bool}).isRequired,contentTypeUID:c.default.string.isRequired,description:c.default.shape({id:c.default.string.isRequired,defaultMessage:c.default.string.isRequired,values:c.default.object}),disabled:c.default.bool,error:c.default.string,intlLabel:c.default.shape({id:c.default.string.isRequired,defaultMessage:c.default.string.isRequired,values:c.default.object}).isRequired,labelAction:c.default.element,name:c.default.string.isRequired,onChange:c.default.func.isRequired,value:c.default.string,placeholder:c.default.shape({id:c.default.string.isRequired,defaultMessage:c.default.string.isRequired,values:c.default.object}),required:c.default.bool},R.defaultProps={description:void 0,disabled:!1,error:void 0,labelAction:void 0,placeholder:void 0,value:"",required:!1};var T=R;t.default=T},74665:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=new RegExp(/^[A-Za-z0-9-_.~]*$/);t.default=n},9730:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(63038)),o=n(67294),i=function(e,t){var n=(0,o.useState)(e),r=(0,a.default)(n,2),i=r[0],l=r[1];return(0,o.useEffect)((function(){var n=setTimeout((function(){l(e)}),t);return function(){clearTimeout(n)}}),[e,t]),i};t.default=i},15141:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(59713)),i=r(n(67154)),l=r(n(319)),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=M(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),d=r(n(45697)),s=n(97132),c=r(n(27361)),f=r(n(57557)),p=r(n(69572)),m=r(n(69590)),g=n(68547),y=n(14772),b=n(28564),v=r(n(50424)),h=r(n(80989)),E=r(n(95414)),O=r(n(54865)),w=n(80434);function M(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(M=function(e){return e?n:t})(e)}function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function C(e){var t=e.allowedFields,n=e.fieldSchema,r=e.formErrors,a=e.isCreatingEntry,o=e.keys,d=e.labelAction,m=e.metadatas,M=e.onChange,j=e.readableFields,C=e.shouldNotRunValidations,k=e.queryInfos,_=e.value,R=(0,g.useLibrary)().fields,T=(0,s.useIntl)().formatMessage,x=(0,y.useContentTypeLayout)().contentType,D=(0,u.useMemo)((function(){return!(0,c.default)(m,"editable",!0)}),[m]),S=n.type,I=(0,u.useMemo)((function(){return(0,c.default)(r,[o,"id"],null)}),[r,o]),q=(0,u.useMemo)((function(){return(0,b.getFieldName)(o)}),[o]),F=(0,u.useMemo)((function(){var e=(0,f.default)(n,C?[].concat((0,l.default)(w.VALIDATIONS_TO_OMIT),["required","minLength"]):w.VALIDATIONS_TO_OMIT),t=n.regex||null;if(t){var r=new RegExp(t);r&&(e.regex=r)}return e}),[n,C]),L=(0,u.useMemo)((function(){return(0,c.default)(F,["required"],!1)}),[F]),A=(0,u.useMemo)((function(){var e=(0,c.default)(x,["attributes"],{});return"dynamiczone"===(0,c.default)(e,[q[0],"type"],null)}),[x,q]),B=(0,u.useMemo)((function(){return(0,w.getInputType)(S)}),[S]),N=(0,u.useMemo)((function(){return"media"!==S||_?_:[]}),[S,_]),W=(0,u.useMemo)((function(){return(0,w.getStep)(S)}),[S]),z=(0,u.useMemo)((function(){var e=q.join(".");if(t.includes(e))return!0;if(A)return t.includes(q[0]);if(q.length>1){var n=(0,p.default)(q,q.length-1).join(".");return t.includes(n)}return!1}),[t,q,A]),U=(0,u.useMemo)((function(){var e=q.join(".");if(j.includes(e))return!0;if(A)return j.includes(q[0]);if(q.length>1){var t=(0,p.default)(q,q.length-1).join(".");return j.includes(t)}return!1}),[j,q,A]),V=(0,u.useMemo)((function(){return U||z}),[z,U]),H=(0,u.useMemo)((function(){return a?D:!(!U||z)||D}),[D,a,z,U]),G=(0,u.useMemo)((function(){return(0,w.generateOptions)(n.enum||[],L)}),[n,L]),Z=m.label,$=m.description,Q=m.placeholder;return!1===m.visible?null:V?"relation"===S?u.default.createElement(O.default,(0,i.default)({},m,n,{description:m.description?T({id:m.description,defaultMessage:m.description}):void 0,intlLabel:{id:m.label,defaultMessage:m.label},labelAction:d,isUserAllowedToEditField:z,isUserAllowedToReadField:U,name:o,placeholder:m.placeholder?{id:m.placeholder,defaultMessage:m.placeholder}:null,queryInfos:k,value:_})):u.default.createElement(g.GenericInput,{attribute:n,autoComplete:"new-password",intlLabel:{id:Z,defaultMessage:Z},description:$?{id:$,defaultMessage:$}:null,disabled:H,error:I,labelAction:d,contentTypeUID:x.uid,customInputs:P({json:h.default,uid:E.default,media:R.media,wysiwyg:v.default},R),multiple:n.multiple||!1,name:o,onChange:M,options:G,placeholder:Q?{id:Q,defaultMessage:Q}:null,required:n.required||!1,step:W,type:B,value:N,withDefaultValue:!1}):u.default.createElement(g.NotAllowedInput,{description:$?{id:$,defaultMessage:$}:null,intlLabel:{id:Z,defaultMessage:Z},labelAction:d,error:I,name:o,required:L})}C.defaultProps={formErrors:{},labelAction:void 0,queryInfos:{},value:null},C.propTypes={allowedFields:d.default.array.isRequired,fieldSchema:d.default.object.isRequired,formErrors:d.default.object,keys:d.default.string.isRequired,isCreatingEntry:d.default.bool.isRequired,labelAction:d.default.element,metadatas:d.default.object.isRequired,onChange:d.default.func.isRequired,readableFields:d.default.array.isRequired,shouldNotRunValidations:d.default.bool.isRequired,queryInfos:d.default.shape({containsKey:d.default.string,defaultParams:d.default.object,endPoint:d.default.string}),value:d.default.any};var k=(0,u.memo)(C,m.default),_=(0,w.connect)(k,w.select);t.default=_},3160:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=["type","model","via","collection","default","plugin","enum","regex","pluginOptions"];t.default=n},57781:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67154)),o=r(n(67294));var i=function(e,t){return function(n){var r=t(n.keys);return o.default.createElement(e,(0,a.default)({},n,r))}};t.default=i},28080:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(319)),o=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return[{metadatas:{intlLabel:{id:"components.InputSelect.option.placeholder",defaultMessage:"Choose here"},disabled:t,hidden:t},key:"__enum_option_null",value:""}].concat((0,a.default)(e.map((function(e){return{metadatas:{intlLabel:{id:e,defaultMessage:e},hidden:!1,disabled:!1},key:e,value:e}}))))};t.default=o},48986:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(96486),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";switch((0,r.toLower)(e)){case"boolean":return"bool";case"biginteger":case"string":return"text";case"decimal":case"float":case"integer":return"number";case"date":case"datetime":case"time":return e;case"email":return"email";case"enumeration":return"select";case"password":return"password";case"text":return"textarea";case"media":case"file":case"files":return"media";case"json":return"json";case"wysiwyg":case"WYSIWYG":case"richtext":return"wysiwyg";case"uid":return"uid";default:return e||"text"}};t.default=a},12994:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){return"float"===e||"decimal"===e?.01:1};t.default=n},80434:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"VALIDATIONS_TO_OMIT",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"generateOptions",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"getInputType",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"getStep",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"select",{enumerable:!0,get:function(){return u.default}});var a=r(n(57781)),o=r(n(28080)),i=r(n(48986)),l=r(n(12994)),u=r(n(57319)),d=r(n(3160))},57319:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(67294),a=n(96486),o=n(68547);var i=function(e){var t=(0,o.useCMEditViewDataManager)(),n=t.createActionAllowedFields,i=t.formErrors,l=t.isCreatingEntry,u=t.modifiedData,d=t.onChange,s=t.readActionAllowedFields,c=t.shouldNotRunValidations,f=t.updateActionAllowedFields,p=(0,r.useMemo)((function(){return l?n:f}),[l,n,f]),m=(0,r.useMemo)((function(){return l?[]:s}),[l,s]),g=(0,a.get)(u,e,null);return{allowedFields:p,formErrors:i,isCreatingEntry:l,onChange:d,readableFields:m,shouldNotRunValidations:c,value:g}};t.default=i},95758:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(59713)),o=r(n(6479)),i=r(n(67294)),l=r(n(45697)),u=r(n(22869)),d=["attributes","buttonData","children","goTo","layout","metadatas","moveItem","moveRow","onAddData","relationsLayout","removeField","selectedItemName","setEditFieldToSelect"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e){var t=e.attributes,n=e.buttonData,r=e.children,a=e.goTo,l=e.layout,s=e.metadatas,f=e.moveItem,p=e.moveRow,m=e.onAddData,g=e.relationsLayout,y=e.removeField,b=e.selectedItemName,v=e.setEditFieldToSelect,h=(0,o.default)(e,d);return i.default.createElement(u.default.Provider,{value:c({attributes:t,buttonData:n,goTo:a,layout:l,metadatas:s,moveItem:f,moveRow:p,onAddData:m,relationsLayout:g,removeField:y,selectedItemName:b,setEditFieldToSelect:v},h)},r)}f.defaultProps={attributes:{},buttonData:[],goTo:function(){},layout:[],metadatas:{},moveItem:function(){},moveRow:function(){},onAddData:function(){},relationsLayout:[],removeField:function(){},selectedItemName:null,setEditFieldToSelect:function(){}},f.propTypes={attributes:l.default.object,buttonData:l.default.array,children:l.default.node.isRequired,goTo:l.default.func,layout:l.default.array,metadatas:l.default.object,moveItem:l.default.func,moveRow:l.default.func,onAddData:l.default.func,relationsLayout:l.default.array,removeField:l.default.func,selectedItemName:l.default.string,setEditFieldToSelect:l.default.func};var p=f;t.default=p},13269:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),i=r(n(45697)),l=n(5493),u=n(34626),d=n(9008),s=n(14772),c=r(n(49925)),f=r(n(15141));function p(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}var m=function(e){var t=e.componentUid,n=e.isFromDynamicZone,r=e.isNested,a=e.name,i=(0,s.useContentTypeLayout)().getComponentLayout,p=(0,o.useMemo)((function(){return i(t)}),[t,i]).layouts.edit;return o.default.createElement(l.Box,{background:n?"":"neutral100",paddingLeft:6,paddingRight:6,paddingTop:6,paddingBottom:6,hasRadius:r,borderColor:r?"neutral200":""},o.default.createElement(d.Stack,{size:6},p.map((function(e,t){return o.default.createElement(u.Grid,{gap:4,key:t},e.map((function(e){var t=e.name,n=e.size,r=e.metadatas,i=e.fieldSchema,l=e.queryInfos,d="component"===i.type,s="".concat(a,".").concat(t);if(d){var p=i.component;return o.default.createElement(u.GridItem,{col:n,s:12,xs:12,key:t},o.default.createElement(c.default,{componentUid:p,intlLabel:{id:r.label,defaultMessage:r.label},isNested:!0,isRepeatable:i.repeatable,max:i.max,min:i.min,name:s,required:i.required||!1}))}return o.default.createElement(u.GridItem,{col:n,key:t,s:12,xs:12},o.default.createElement(f.default,{keys:s,fieldSchema:i,metadatas:r,queryInfos:l}))})))}))))};m.defaultProps={isFromDynamicZone:!1,isNested:!1},m.propTypes={componentUid:i.default.string.isRequired,isFromDynamicZone:i.default.bool,isNested:i.default.bool,name:i.default.string.isRequired};var g=m;t.default=g},92150:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(78384)).default.div.withConfig({displayName:"Wrapper",componentId:"sc-1dz4vrk-0"})(["position:absolute;top:0;width:100%;height:100%;overflow:auto;padding:",";font-size:","rem;background-color:",";z-index:2;cursor:not-allowed;color:",";h1,h2,h3,h4,h5,h6{margin-block-start:10px;margin-block-end:10px;}p{margin-bottom:10px;}h1{font-size:","rem;font-weight:600;}h2{font-size:","rem;font-weight:500;}h3{font-size:","rem;font-weight:500;}h4{font-size:","rem;font-weight:500;}strong{font-weight:800;}em{font-style:italic;}blockquote{margin-top:41px;margin-bottom:34px;font-size:","rem;font-weight:400;border-left:5px solid #eee;font-style:italic;padding:10px 20px;}img{max-width:100%;}table{font-size:13px;thead{background:rgb(243,243,243);tr{height:43px;}}tr{border:1px solid #c6cbd1;}th,td{padding:0 25px;border:1px solid #c6cbd1;border-bottom:0;border-top:0;}tbody{tr{height:54px;}}}pre,code{font-size:13px;border-radius:3px;background-color:#002b36;}p,pre,td{> code{color:#839496;}}.warning{background-color:#faa684;padding:30px;border-radius:3px;}.tip{padding:30px;border-radius:3px;}.footnote-ref,.footnote-backref{color:#007bff;}ol{list-style-type:decimal;margin-block-start:",";margin-block-end:",";margin-inline-start:0px;margin-inline-end:0px;padding-inline-start:",";ol,ul{margin-block-start:0px;margin-block-end:0px;}}ul{list-style-type:disc;margin-block-start:",";margin-block-end:",";margin-inline-start:0px;margin-inline-end:0px;padding-inline-start:",";ul,ol{margin-block-start:0px;margin-block-end:0px;}}"],(function(e){var t=e.theme;return"".concat(t.spaces[3]," ").concat(t.spaces[4])}),.875,(function(e){return e.theme.colors.neutral0}),(function(e){return e.theme.colors.neutral800}),2.25,1.875,1.5,1.25,.875,(function(e){return e.theme.spaces[4]}),(function(e){return e.theme.spaces[4]}),(function(e){return e.theme.spaces[4]}),(function(e){return e.theme.spaces[4]}),(function(e){return e.theme.spaces[4]}),(function(e){return e.theme.spaces[4]}));t.default=a},76957:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),i=r(n(45697)),l=r(n(50183)),u=r(n(66814)),d=r(n(92150));function s(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}var c=function(e){var t=e.data,n=(0,o.useMemo)((function(){return(0,u.default)(l.default.render(t||""))}),[t]);return o.default.createElement(d.default,null,o.default.createElement("div",{dangerouslySetInnerHTML:{__html:n}}))};c.defaultProps={data:""},c.propTypes={data:i.default.string};var f=(0,o.memo)(c);t.default=f},50183:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(87757)),o=r(n(48926)),i=r(n(9980)),l=n(77869),u=r(n(79411)),d=r(n(40591)),s=r(n(30645)),c=r(n(46635)),f=r(n(52384)),p=r(n(44266)),m=r(n(94574)),g=r(n(40700)),y=r(n(97003));(function(){var e=(0,o.default)(a.default.mark((function e(){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.e(7347).then(n.bind(n,24840));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()();var b=new i.default({html:!0,xhtmlOut:!1,breaks:!0,langPrefix:"language-",linkify:!0,typographer:!0,highlight:function(e,t){if(t&&"auto"!==t&&(0,l.getLanguage)(t))return'<pre class="hljs language-'+b.utils.escapeHtml(t.toLowerCase())+'"><code>'+(0,l.highlight)(t,e,!0).value+"</code></pre>";if("auto"===t){var n=(0,l.highlightAuto)(e);return'<pre class="hljs language-'+b.utils.escapeHtml(n.language)+'"><code>'+n.value+"</code></pre>"}return'<pre class="hljs"><code>'+b.utils.escapeHtml(e)+"</code></pre>"}}).use(u.default).use(d.default,"warning").use(d.default,"tip").use(s.default).use(c.default).use(f.default).use(p.default).use(m.default).use(g.default).use(y.default);b.renderer.rules.footnote_ref=function(e,t,n,r,a){return'<sup class="footnote-ref"><span>'+a.rules.footnote_caption(e,t,n,r,a)+"</span></sup>"},b.renderer.rules.footnote_anchor=function(){return' <span class="footnote-backref">\u21a9\ufe0e</span>'};var v=b;t.default=v},66814:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(59713)),o=r(n(91036));function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=l(l({},o.default.defaults),{},{allowedTags:!1,allowedAttributes:{"*":["href","align","alt","center","width","height","type","controls","target"],img:["src","alt"],source:["src","type"]}}),d=function(e){return(0,o.default)(e,u)};t.default=d},60977:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),i=r(n(45697)),l=n(97132),u=r(n(78384)),d=n(5493),s=n(49425),c=n(67826),f=n(65967);function p(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}var m=(0,u.default)(d.Box).withConfig({displayName:"AccordionGroupCustom__AccordionFooter",componentId:"sc-pcvz8-0"})(["overflow:hidden;border-bottom:1px solid ",";border-right:1px solid ",";border-left:1px solid ",";border-radius:0 0 "," ",";"],(function(e){return e.theme.colors.neutral200}),(function(e){return e.theme.colors.neutral200}),(function(e){return e.theme.colors.neutral200}),(function(e){return e.theme.borderRadius}),(function(e){return e.theme.borderRadius})),g=(0,u.default)(d.Box).withConfig({displayName:"AccordionGroupCustom__EnhancedGroup",componentId:"sc-pcvz8-1"})(["> div{& > *{border-radius:unset;border-right:1px solid ",";border-left:1px solid ",";border-bottom:1px solid ",";}> div{> div:first-of-type{border-radius:unset;}}}> div:first-of-type{> div{border-radius:"," "," 0 0;> div:first-of-type{border-radius:"," "," 0 0;}}> div:not([data-strapi-expanded='true']){border-top:1px solid ",";&:hover{border-top:1px solid ",";}}> span{border-radius:"," "," 0 0;border-top:1px solid ",";}}& [data-strapi-expanded='true']{border:1px solid ",";}",""],(function(e){return e.theme.colors.neutral200}),(function(e){return e.theme.colors.neutral200}),(function(e){return e.theme.colors.neutral200}),(function(e){return e.theme.borderRadius}),(function(e){return e.theme.borderRadius}),(function(e){return e.theme.borderRadius}),(function(e){return e.theme.borderRadius}),(function(e){return e.theme.colors.neutral200}),(function(e){return e.theme.colors.primary600}),(function(e){return e.theme.borderRadius}),(function(e){return e.theme.borderRadius}),(function(e){return e.theme.colors.neutral200}),(function(e){return e.theme.colors.primary600}),(function(e){var t=e.theme,n=e.footer;return"\n    &:not(".concat(n,") {\n      & > *:last-of-type {\n        border-radius: 0 0 ").concat(t.borderRadius," ").concat(t.borderRadius,";\n      }\n    }\n  ")})),y=(0,u.default)(d.Box).withConfig({displayName:"AccordionGroupCustom__LabelAction",componentId:"sc-pcvz8-2"})(["svg path{fill:",";}"],(function(e){return e.theme.colors.neutral500})),b=function(e){var t=e.children,n=e.footer,r=e.label,a=e.labelAction,i=e.error,u=(0,l.useIntl)().formatMessage,p=o.Children.toArray(t).map((function(e){return(0,o.cloneElement)(e,{hasErrorMessage:!1})}));return o.default.createElement(f.KeyboardNavigable,{attributeName:"data-strapi-accordion-toggle"},r&&o.default.createElement(c.Flex,{paddingBottom:1},o.default.createElement(s.Typography,{as:"label",textColor:"neutral800",variant:"pi",fontWeight:"bold"},r),a&&o.default.createElement(y,{paddingLeft:1},a)),o.default.createElement(g,{footer:n},p),n&&o.default.createElement(m,null,n),i&&o.default.createElement(d.Box,{paddingTop:1},o.default.createElement(s.Typography,{variant:"pi",textColor:"danger600"},u({id:i.id,defaultMessage:i.id}))))};b.defaultProps={error:void 0,footer:null,label:null,labelAction:void 0},b.propTypes={children:i.default.node.isRequired,error:i.default.shape({id:i.default.string.isRequired}),footer:i.default.node,label:i.default.string,labelAction:i.default.node};var v=b;t.default=v},65506:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=r(n(78384)),l=n(68547),u=n(5493),d=n(67826),s=n(49425),c=n(30741),f=r(n(18568)),p=r(n(88049)),m=r(n(99962)),g=(0,i.default)(u.Box).withConfig({displayName:"DragPreview__DragPreviewBox",componentId:"sc-63x7ge-0"})(["border:1px solid ",";"],(function(e){return e.theme.colors.neutral200})),y=(0,i.default)(u.Box).withConfig({displayName:"DragPreview__DropdownIconWrapper",componentId:"sc-63x7ge-1"})(["height:","rem;width:","rem;border-radius:50%;display:flex;align-items:center;justify-content:center;svg{height:","rem;width:","rem;> path{fill:",";}}"],2,2,6/16,11/16,(function(e){return e.theme.colors.neutral600})),b=i.default.button.withConfig({displayName:"DragPreview__ToggleButton",componentId:"sc-63x7ge-2"})(["border:none;background:transparent;display:block;width:100%;text-align:unset;padding:0;"]),v=function(e){var t=e.displayedValue;return a.default.createElement(g,{paddingLeft:3,paddingRight:3,paddingTop:3,paddingBottom:3,hasRadius:!0,background:"neutral0",width:(0,l.pxToRem)(300)},a.default.createElement(d.Flex,{justifyContent:"space-between"},a.default.createElement(b,{type:"button"},a.default.createElement(d.Flex,null,a.default.createElement(y,{background:"neutral200"},a.default.createElement(m.default,null)),a.default.createElement(u.Box,{paddingLeft:6,maxWidth:(0,l.pxToRem)(150)},a.default.createElement(s.Typography,{textColor:"neutral700",ellipsis:!0},t)))),a.default.createElement(u.Box,{paddingLeft:3},a.default.createElement(d.Flex,null,a.default.createElement(c.IconButton,{icon:a.default.createElement(f.default,null)}),a.default.createElement(u.Box,{paddingLeft:2},a.default.createElement(c.IconButton,{icon:a.default.createElement(p.default,null)}))))))};v.propTypes={displayedValue:o.default.string.isRequired};var h=v;t.default=h},17407:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(78384)),i=r(n(45697)),l=n(9008),u=n(67826),d=n(83662),s=n(15804),c=n(49425),f=r(n(18568)),p=r(n(88049)),m=r(n(99962)),g=n(57061),y=o.default.span.withConfig({displayName:"DraggingSibling__SiblingWrapper",componentId:"sc-xitlmo-0"})(["display:flex;justify-content:space-between;padding-left:",";padding-right:",";background-color:",";height:","rem;"],(function(e){return e.theme.spaces[4]}),(function(e){return e.theme.spaces[4]}),(function(e){return e.theme.colors.neutral0}),3.125),b=(0,o.default)(d.TextButton).withConfig({displayName:"DraggingSibling__ToggleButton",componentId:"sc-xitlmo-1"})(["text-align:left;svg{width:","rem;height:","rem;path{fill:",";}}"],.875,.875,(function(e){var t=e.theme;return e.expanded?t.colors.primary600:t.colors.neutral500})),v=function(e){var t=e.displayedValue;return a.default.createElement(y,null,a.default.createElement(l.Stack,{horizontal:!0,size:3,flex:1},a.default.createElement(u.Flex,{justifyContent:"center",borderRadius:"50%",height:"".concat(1.5,"rem}"),width:"".concat(1.5,"rem}"),"aria-hidden":!0,as:"span",background:"neutral200"},a.default.createElement(s.Icon,{as:m.default,width:"".concat(.5,"rem}"),color:"neutral600"})),a.default.createElement(b,{onClick:function(){},flex:1},a.default.createElement(c.Typography,{fontWeight:"bold",textColor:"neutral700"},t))),a.default.createElement(l.Stack,{horizontal:!0,size:0},a.default.createElement(g.CustomIconButtonSibling,{noBorder:!0,onClick:function(){},icon:a.default.createElement(f.default,null)}),a.default.createElement(g.CustomIconButtonSibling,{icon:a.default.createElement(p.default,null),noBorder:!0})))};v.propTypes={displayedValue:i.default.string.isRequired};var h=v;t.default=h},57061:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.CustomIconButtonSibling=t.CustomIconButton=void 0;var a=r(n(78384)),o=n(30741),i=(0,a.default)(o.IconButton).withConfig({displayName:"IconButtonCustoms__CustomIconButton",componentId:"sc-dz6xvz-0"})(["background-color:transparent;svg{path{fill:",";}}&:hover{svg{path{fill:",";}}}"],(function(e){var t=e.theme;return e.expanded?t.colors.primary600:t.colors.neutral600}),(function(e){return e.theme.colors.primary600}));t.CustomIconButton=i;var l=(0,a.default)(o.IconButton).withConfig({displayName:"IconButtonCustoms__CustomIconButtonSibling",componentId:"sc-dz6xvz-1"})(["background-color:transparent;svg{path{fill:",";}}"],(function(e){var t=e.theme;return e.expanded?t.colors.primary600:t.colors.neutral600}));t.CustomIconButtonSibling=l},19566:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(78384)).default.span.withConfig({displayName:"Preview__StyledSpan",componentId:"sc-rdi4ej-0"})(["display:block;background-color:",";outline:1px dashed ",";outline-offset:-1px;padding:",";"],(function(e){return e.theme.colors.primary100}),(function(e){return e.theme.colors.primary500}),(function(e){return e.theme.spaces[6]})),i=function(){return a.default.createElement(o,{padding:6,background:"primary100"})};t.default=i},9525:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DraggedItem=void 0;var o=r(n(63038)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=_(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),l=r(n(45697)),u=n(99168),d=n(61080),s=r(n(78384)),c=n(97132),f=r(n(79833)),p=n(96654),m=n(34626),g=n(9008),y=n(5493),b=n(93355),v=r(n(18568)),h=r(n(88049)),E=r(n(26135)),O=r(n(36169)),w=r(n(15141)),M=r(n(49925)),j=r(n(19566)),P=r(n(17407)),C=n(57061),k=n(38122);function _(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(_=function(e){return e?n:t})(e)}var R=s.default.span.withConfig({displayName:"DraggedItem__DragButton",componentId:"sc-1nd44df-0"})(["display:flex;align-items:center;height:",";padding:0 ",";cursor:all-scroll;svg{width:","rem;height:","rem;}"],(function(e){return e.theme.spaces[7]}),(function(e){return e.theme.spaces[3]}),.75,.75),T=function(e){var t=e.componentFieldName,n=e.hasErrorMessage,r=e.hasErrors,a=e.isDraggingSibling,l=e.isOpen,s=e.isReadOnly,k=e.onClickToggle,_=e.schema,T=e.toggleCollapses,x=e.moveComponentField,D=e.removeRepeatableField,S=e.setIsDraggingSibling,I=e.triggerFormValidation,q=e.displayedValue,F=(0,i.useRef)(null),L=(0,i.useRef)(null),A=(0,i.useState)(!1),B=(0,o.default)(A,2)[1],N=(0,c.useIntl)().formatMessage,W=_.layouts.edit,z=(0,u.useDrop)({accept:E.default.COMPONENT,canDrop:function(){return!1},hover:function(e,n){if(L.current){var r=e.originalPath,a=t,o=r.split("."),i=o.slice().splice(-1).join(""),l=a.split(".").splice(-1).join(""),u=o.slice(0,o.length-1),d=parseInt(i,10),s=parseInt(l,10);if(d!==s){var c=L.current.getBoundingClientRect(),f=(c.bottom-c.top)/2,p=n.getClientOffset().y-c.top;d<s&&p<f||d>s&&p>f||r.split(".").length===a.split(".").length&&(x(u,d,s),e.originalPath=a)}}}}),U=(0,o.default)(z,2)[1],V=(0,u.useDrag)({type:E.default.COMPONENT,item:function(){return T(-1),{displayedValue:q,originalPath:t}},end:function(){I(),S(!1)},collect:function(e){return{isDragging:e.isDragging()}}}),H=(0,o.default)(V,3),G=H[0].isDragging,Z=H[1],$=H[2];(0,i.useEffect)((function(){$((0,d.getEmptyImage)(),{captureDraggingState:!1})}),[$]),(0,i.useEffect)((function(){G&&S(!0)}),[G,S]),(0,i.useEffect)((function(){a||B((function(e){return!e}))}),[a]);var Q={dragRef:Z(F),dropRef:U(L)},Y=(0,f.default)(q),J=r?"error":void 0;return i.default.createElement(y.Box,{ref:Q?Q.dropRef:null},G&&i.default.createElement(j.default,null),!G&&a&&i.default.createElement(P.default,{displayedValue:Y,componentFieldName:t}),!G&&!a&&i.default.createElement(p.Accordion,{error:J,hasErrorMessage:n,expanded:l,toggle:k,id:t,size:"S"},i.default.createElement(p.AccordionToggle,{action:s?null:i.default.createElement(g.Stack,{horizontal:!0,size:0},i.default.createElement(C.CustomIconButton,{expanded:l,noBorder:!0,onClick:function(){D(t),T()},label:N({id:(0,O.default)("containers.Edit.delete"),defaultMessage:"Delete"}),icon:i.default.createElement(v.default,null)}),i.default.createElement(b.Tooltip,{description:N({id:(0,O.default)("components.DragHandle-label"),defaultMessage:"Drag"})},i.default.createElement(R,{role:"button",tabIndex:-1,ref:Q.dragRef,onClick:function(e){return e.stopPropagation()}},i.default.createElement(h.default,null)))),title:Y,togglePosition:"left"}),i.default.createElement(p.AccordionContent,null,i.default.createElement(g.Stack,{background:"neutral100",padding:6,size:6},W.map((function(e,n){return i.default.createElement(m.Grid,{gap:4,key:n},e.map((function(e){var n=e.name,r=e.fieldSchema,a=e.metadatas,o=e.queryInfos,l=e.size,u="component"===r.type,d="".concat(t,".").concat(n);if(u){var s=r.component;return i.default.createElement(m.GridItem,{col:l,s:12,xs:12,key:n},i.default.createElement(M.default,{componentUid:s,intlLabel:{id:a.label,defaultMessage:a.label},isRepeatable:r.repeatable,isNested:!0,name:d,max:r.max,min:r.min,required:r.required}))}return i.default.createElement(m.GridItem,{key:d,col:l,s:12,xs:12},i.default.createElement(w.default,{fieldSchema:r,keys:d,metadatas:a,queryInfos:o}))})))}))))))};t.DraggedItem=T,T.defaultProps={isDraggingSibling:!1,isOpen:!1,setIsDraggingSibling:function(){},toggleCollapses:function(){}},T.propTypes={componentFieldName:l.default.string.isRequired,hasErrorMessage:l.default.bool.isRequired,hasErrors:l.default.bool.isRequired,isDraggingSibling:l.default.bool,isOpen:l.default.bool,isReadOnly:l.default.bool.isRequired,onClickToggle:l.default.func.isRequired,schema:l.default.object.isRequired,toggleCollapses:l.default.func,moveComponentField:l.default.func.isRequired,removeRepeatableField:l.default.func.isRequired,setIsDraggingSibling:l.default.func,triggerFormValidation:l.default.func.isRequired,displayedValue:l.default.string.isRequired};var x=(0,i.memo)(T),D=(0,k.connect)(x,k.select);t.default=D},49972:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67154)),o=r(n(67294));var i=function(e,t){return function(n){var r=t(n);return o.default.createElement(e,(0,a.default)({},n,r))}};t.default=i},38122:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"select",{enumerable:!0,get:function(){return o.default}});var a=r(n(49972)),o=r(n(60257))},60257:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(319)),o=n(67294),i=n(96486),l=n(68547);var u=function(e){var t=e.schema,n=e.componentFieldName,r=(0,l.useCMEditViewDataManager)(),u=r.checkFormErrors,d=r.modifiedData,s=r.moveComponentField,c=r.removeRepeatableField,f=r.triggerFormValidation,p=(0,o.useMemo)((function(){return(0,i.get)(t,["settings","mainField"],"id")}),[t]);return{displayedValue:(0,i.toString)((0,i.get)(d,[].concat((0,a.default)(n.split(".")),[p]),"")),mainField:p,checkFormErrors:u,moveComponentField:s,removeRepeatableField:c,schema:t,triggerFormValidation:f}};t.default=u},14832:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.RepeatableComponent=void 0;var o=r(n(63038)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=C(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),l=n(99168),u=n(97132),d=r(n(78384)),s=r(n(45697)),c=r(n(27361)),f=r(n(69572)),p=n(68547),m=n(5493),g=n(67826),y=n(83662),b=r(n(80768)),v=n(28564),h=n(14772),E=r(n(26135)),O=r(n(4185)),w=r(n(44743)),M=r(n(49247)),j=r(n(9525)),P=r(n(60977));function C(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(C=function(e){return e?n:t})(e)}var k=(0,d.default)(y.TextButton).withConfig({displayName:"RepeatableComponent__TextButtonCustom",componentId:"sc-1h62y5j-0"})(["height:100%;width:100%;border-radius:0 0 4px 4px;display:flex;justify-content:center;span{font-weight:600;font-size:14px;}"]),_=function(e){var t=e.addRepeatableComponentToField,n=e.formErrors,r=e.componentUid,a=e.componentValue,d=e.componentValueLength,s=e.isNested,y=e.isReadOnly,w=e.max,M=e.min,C=e.name,_=(0,p.useNotification)(),R=(0,u.useIntl)().formatMessage,T=(0,i.useState)(""),x=(0,o.default)(T,2),D=x[0],S=x[1],I=(0,i.useState)(!1),q=(0,o.default)(I,2),F=q[0],L=q[1],A=(0,l.useDrop)({accept:E.default.COMPONENT}),B=(0,o.default)(A,2)[1],N=(0,h.useContentTypeLayout)().getComponentLayout,W=(0,i.useMemo)((function(){return N(r)}),[r,N]),z=(0,i.useMemo)((function(){return(0,v.getMaxTempKey)(a||[])+1}),[a]),U=Object.keys(n).filter((function(e){return(0,f.default)(e.split("."),s?3:1).join(".")===C})).map((function(e){return e.split(".").slice(0,C.split(".").length+1).join(".")})),V=function(){S("")},H=M-d,G=(0,c.default)(n,C,{id:""}).id.includes("min"),Z=(0,i.useCallback)((function(){y||(d<w?(t(C,r,G),S(z)):d>=w&&_({type:"info",message:{id:(0,v.getTrad)("components.notification.info.maximum-requirement")}}))}),[t,r,d,G,y,w,C,z,_]),$=n[C];return G&&($={id:(0,v.getTrad)("components.DynamicZone.missing-components"),defaultMessage:"There {number, plural, =0 {are # missing components} one {is # missing component} other {are # missing components}}",values:{number:H}}),0===d?i.default.createElement(O.default,{error:$,isReadOnly:y,onClick:Z}):(U.some((function(e){return e.split(".").length>1}))&&!G&&($={id:(0,v.getTrad)("components.RepeatableComponent.error-message"),defaultMessage:"The component(s) contain error(s)"}),i.default.createElement(m.Box,{hasRadius:!0,ref:B},i.default.createElement(P.default,{error:$,footer:i.default.createElement(g.Flex,{justifyContent:"center",height:"48px",background:"neutral0"},i.default.createElement(k,{disabled:y,onClick:Z,startIcon:i.default.createElement(b.default,null)},R({id:(0,v.getTrad)("containers.EditView.add.new-entry"),defaultMessage:"Add an entry"})))},a.map((function(e,t){var n=e.__temp_key__,a=D===n,o="".concat(C,".").concat(t),l=U.includes(o);return i.default.createElement(j.default,{componentFieldName:o,componentUid:r,hasErrors:l,hasMinError:G,isDraggingSibling:F,isOpen:a,isReadOnly:y,key:n,onClickToggle:function(){S(a?"":n)},parentName:C,schema:W,setIsDraggingSibling:L,toggleCollapses:V})})))))};t.RepeatableComponent=_,_.defaultProps={componentValue:null,componentValueLength:0,formErrors:{},isNested:!1,max:1/0,min:0},_.propTypes={addRepeatableComponentToField:s.default.func.isRequired,componentUid:s.default.string.isRequired,componentValue:s.default.oneOfType([s.default.array,s.default.object]),componentValueLength:s.default.number,formErrors:s.default.object,isNested:s.default.bool,isReadOnly:s.default.bool.isRequired,max:s.default.number,min:s.default.number,name:s.default.string.isRequired};var R=(0,i.memo)(_),T=(0,w.default)(R,M.default);t.default=T},44743:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67154)),o=r(n(67294));var i=function(e,t){return function(n){var r=t(n);return o.default.createElement(e,(0,a.default)({},n,r))}};t.default=i},49247:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(68547);var a=function(){var e=(0,r.useCMEditViewDataManager)();return{addRepeatableComponentToField:e.addRepeatableComponentToField,formErrors:e.formErrors}};t.default=a},42874:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),i=r(n(45697)),l=r(n(78384)),u=n(68547),d=n(97132),s=n(39711),c=r(n(18721)),f=r(n(41609)),p=n(5493),m=n(67826),g=n(49425),y=n(85104),b=n(28564);function v(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}var h=l.default.div.withConfig({displayName:"ListItem__StyledBullet",componentId:"sc-jenzd4-0"})(["width:",";height:",";background:",";border-radius:50%;cursor:pointer;"],(0,u.pxToRem)(6),(0,u.pxToRem)(6),(function(e){var t=e.theme,n=e.isDraft;return t.colors[n?"secondary600":"success600"]}));function E(e){var t=e.data,n=e.displayNavigationLink,r=e.isDisabled,a=e.mainField,i=e.onRemove,l=e.searchToPersist,v=e.targetModel,E=(0,d.useIntl)().formatMessage,O="/content-manager/collectionType/".concat(v,"/").concat(t.id),w="pointer";r&&(w="not-allowed"),n||(w="default");var M=(0,c.default)(t,"publishedAt"),j=(0,f.default)(t.publishedAt),P=t[a.name],C={id:(0,b.getTrad)("components.Select.draft-info-title"),defaultMessage:"State: Draft"},k={id:(0,b.getTrad)("components.Select.publish-info-title"),defaultMessage:"State: Published"},_=E(j?C:k),R=(0,s.useLocation)().pathname;return o.default.createElement(m.Flex,{as:"li",alignItems:"center"},o.default.createElement(m.Flex,{style:{flex:1},alignItems:"center"},M&&o.default.createElement(p.Box,{paddingRight:2},o.default.createElement(h,{isDraft:j,title:_})),n?o.default.createElement(y.Link,{to:{pathname:O,state:{from:R},search:l},style:{textTransform:"none"}},P||t.id):o.default.createElement(g.Typography,{variant:"pi"},P||t.id)),o.default.createElement(u.RemoveRoundedButton,{onClick:i,label:"Remove",style:{cursor:w}}))}E.defaultProps={onRemove:function(){},searchToPersist:null,targetModel:""},E.propTypes={data:i.default.object.isRequired,displayNavigationLink:i.default.bool.isRequired,isDisabled:i.default.bool.isRequired,mainField:i.default.shape({name:i.default.string.isRequired,schema:i.default.shape({type:i.default.string.isRequired}).isRequired}).isRequired,onRemove:i.default.func,searchToPersist:i.default.string,targetModel:i.default.string};var O=(0,o.memo)(E);t.default=O},63293:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=g(n(67294)),i=r(n(45697)),l=n(97132),u=r(n(41609)),d=g(n(23947)),s=n(5493),c=n(9008),f=n(49425),p=r(n(42874));function m(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(m=function(e){return e?n:t})(e)}function g(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=m(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function y(e){var t=e.addRelation,n=e.components,r=e.displayNavigationLink,a=e.mainField,i=e.name,m=e.isDisabled,g=e.isLoading,y=e.onInputChange,b=e.onMenuClose,v=e.onMenuOpen,h=e.onMenuScrollToBottom,E=e.onRemove,O=e.options,w=e.placeholder,M=e.searchToPersist,j=e.styles,P=e.targetModel,C=e.value,k=e.description,_=(0,l.useIntl)().formatMessage,R={ignoreCase:!0,ignoreAccents:!0,trim:!1,matchFrom:"any"};return o.default.createElement(c.Stack,{size:1},o.default.createElement(d.default,{components:n,isDisabled:m,id:i,filterOption:function(e,t){if(!(0,u.default)(C)&&-1!==C.findIndex((function(t){return t.id===e.value.id})))return!1;return!t||(0,d.createFilter)(R)(e,t)},mainField:a,isLoading:g,isMulti:!0,isSearchable:!0,options:O,onChange:t,onInputChange:y,onMenuClose:b,onMenuOpen:v,onMenuScrollToBottom:h,placeholder:_(w||{id:"components.Select.placeholder",defaultMessage:"Select..."}),styles:j,value:[]}),o.default.createElement(s.Box,{paddingTop:3,style:{overflow:"auto"}},o.default.createElement(c.Stack,{as:"ul",size:4,style:{maxHeight:"128px",overflowX:"hidden"}},null===C||void 0===C?void 0:C.map((function(e,t){return o.default.createElement(p.default,{key:e.id,data:e,displayNavigationLink:r,isDisabled:m,mainField:a,onRemove:function(){m||E("".concat(i,".").concat(t))},searchToPersist:M,targetModel:P})})))),k&&o.default.createElement(f.Typography,{variant:"pi",textColor:"neutral600"},k))}y.defaultProps={description:"",components:{},placeholder:null,searchToPersist:null,value:null},y.propTypes={addRelation:i.default.func.isRequired,components:i.default.object,displayNavigationLink:i.default.bool.isRequired,isDisabled:i.default.bool.isRequired,isLoading:i.default.bool.isRequired,mainField:i.default.shape({name:i.default.string.isRequired,schema:i.default.shape({type:i.default.string.isRequired}).isRequired}).isRequired,name:i.default.string.isRequired,onInputChange:i.default.func.isRequired,onMenuClose:i.default.func.isRequired,onMenuOpen:i.default.func.isRequired,onMenuScrollToBottom:i.default.func.isRequired,onRemove:i.default.func.isRequired,options:i.default.array.isRequired,placeholder:i.default.shape({id:i.default.string.isRequired,defaultMessage:i.default.string.isRequired}),searchToPersist:i.default.string,styles:i.default.object.isRequired,targetModel:i.default.string.isRequired,value:i.default.array,description:i.default.string};var b=(0,o.memo)(y);t.default=b},28293:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=n(23947),i=r(n(45697)),l=r(n(78384)),u=n(97132),d=n(68547),s=n(67826),c=n(49425),f=r(n(27361)),p=r(n(18721)),m=r(n(41609)),g=n(28564),y=l.default.div.withConfig({displayName:"SingleValue__StyledBullet",componentId:"sc-etc1ei-0"})(["width:",";height:",";margin-right:",";background:",";border-radius:50%;cursor:pointer;"],(0,d.pxToRem)(6),(0,d.pxToRem)(6),(function(e){return e.theme.spaces[2]}),(function(e){var t=e.theme,n=e.isDraft;return t.colors[n?"secondary700":"success200"]})),b=function(e){var t=(0,u.useIntl)().formatMessage,n=o.components.SingleValue,r=(0,p.default)((0,f.default)(e,"data.value"),"publishedAt"),i=(0,m.default)((0,f.default)(e,"data.value.publishedAt"));if(r){var l={id:(0,g.getTrad)("components.Select.draft-info-title"),defaultMessage:"State: Draft"},d={id:(0,g.getTrad)("components.Select.publish-info-title"),defaultMessage:"State: Published"},b=t(i?l:d);return a.default.createElement(n,e,a.default.createElement(s.Flex,null,a.default.createElement(y,{title:b,isDraft:i}),a.default.createElement(c.Typography,{ellipsis:!0},e.data.label||"-")))}return a.default.createElement(n,e,e.data.label||"-")};b.propTypes={data:i.default.object.isRequired,selectProps:i.default.shape({mainField:i.default.shape({name:i.default.string.isRequired,schema:i.default.shape({type:i.default.string.isRequired}).isRequired}).isRequired}).isRequired};var v=b;t.default=v},77570:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(59713)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),l=r(n(45697)),u=n(97132),d=n(9008),s=n(49425),c=r(n(27361)),f=r(n(45220)),p=r(n(23947)),m=r(n(28293));function g(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e){var t=e.components,n=e.mainField,r=e.name,a=e.isDisabled,o=e.isLoading,l=e.onChange,g=e.onInputChange,y=e.onMenuClose,v=e.onMenuOpen,h=e.onMenuScrollToBottom,E=e.options,O=e.placeholder,w=e.styles,M=e.value,j=e.description,P=(0,u.useIntl)().formatMessage;return i.default.createElement(d.Stack,{size:1},i.default.createElement(p.default,{components:b(b({},t),{},{SingleValue:m.default}),id:r,isClearable:!0,isDisabled:a,isLoading:o,mainField:n,options:E,onChange:l,onInputChange:g,onMenuClose:y,onMenuOpen:v,onMenuScrollToBottom:h,placeholder:P(O||{id:"components.Select.placeholder",defaultMessage:"Select..."}),styles:w,value:(0,f.default)(M)?null:{label:(0,c.default)(M,[n.name],""),value:M}}),j&&i.default.createElement(s.Typography,{variant:"pi",textColor:"neutral600"},j))}v.defaultProps={description:"",components:{},placeholder:null,value:null},v.propTypes={components:l.default.object,isDisabled:l.default.bool.isRequired,isLoading:l.default.bool.isRequired,mainField:l.default.shape({name:l.default.string.isRequired,schema:l.default.shape({type:l.default.string.isRequired}).isRequired}).isRequired,name:l.default.string.isRequired,onChange:l.default.func.isRequired,onInputChange:l.default.func.isRequired,onMenuClose:l.default.func.isRequired,onMenuOpen:l.default.func.isRequired,onMenuScrollToBottom:l.default.func.isRequired,options:l.default.array.isRequired,placeholder:l.default.shape({id:l.default.string.isRequired,defaultMessage:l.default.string.isRequired}),styles:l.default.object.isRequired,value:l.default.object,description:l.default.string};var h=(0,i.memo)(v);t.default=h},35645:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=n(23947),i=r(n(84040)),l=r(n(5323)),u=function(e){var t=o.components.ClearIndicator;return a.default.createElement(t,e,a.default.createElement(l.default,{as:"button",type:"button"},a.default.createElement(i.default,null)))};t.default=u},62773:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CarretBox=void 0;var a=r(n(67294)),o=r(n(78384)),i=r(n(99962)),l=r(n(5323)),u=(0,o.default)(l.default).withConfig({displayName:"DropdownIndicator__CarretBox",componentId:"sc-1i2lvx4-0"})(["display:flex;background:none;border:none;svg{width:","rem;}"],6/16);t.CarretBox=u;var d=function(){return a.default.createElement(u,{as:"button",type:"button",paddingRight:3},a.default.createElement(i.default,null))};t.default=d},5323:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.IconBox=void 0;var a=r(n(78384)),o=n(5493),i=(0,a.default)(o.Box).withConfig({displayName:"IconBox",componentId:"sc-13mo22w-0"})(["background:transparent;border:none;position:relative;z-index:1;svg{height:","rem;width:","rem;}svg path{fill:",";}"],11/16,11/16,(function(e){return e.theme.colors.neutral600}));t.IconBox=i;var l=i;t.default=l},5998:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(){return null};t.default=n},89964:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=n(97132),l=r(n(78384)),u=n(5493),d=n(67826),s=n(49425),c=(0,l.default)(u.Box).withConfig({displayName:"Label__LabelAction",componentId:"sc-dwnjom-0"})(["svg path{fill:",";}"],(function(e){return e.theme.colors.neutral500})),f=function(e){var t=e.intlLabel,n=e.id,r=e.labelAction,o=e.link,l=e.name,u=e.numberOfEntries,f=e.isSingle,p=(0,i.useIntl)().formatMessage,m=null!==t&&void 0!==t&&t.id?p(t):l;return a.default.createElement(d.Flex,{justifyContent:"space-between"},a.default.createElement(d.Flex,null,a.default.createElement(s.Typography,{textColor:"neutral800",htmlFor:n||l,variant:"pi",fontWeight:"bold",as:"label"},m,!f&&a.default.createElement(a.default.Fragment,null,"\xa0(",u,")")),r&&a.default.createElement(c,{paddingLeft:1},r)),o)};f.defaultProps={id:void 0,labelAction:void 0,link:null,numberOfEntries:0},f.propTypes={id:o.default.string,intlLabel:o.default.shape({id:o.default.string.isRequired,defaultMessage:o.default.string.isRequired,values:o.default.object}).isRequired,isSingle:o.default.bool.isRequired,labelAction:o.default.element,link:o.default.element,name:o.default.string.isRequired,numberOfEntries:o.default.number};var p=f;t.default=p},51121:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(78384)),i=n(23947),l=n(97132),u=r(n(45697)),d=n(96486),s=n(67826),c=n(49425),f=n(68547),p=n(28564),m=o.default.div.withConfig({displayName:"Option__StyledBullet",componentId:"sc-qolgge-0"})(["width:",";height:",";margin-right:",";background:",";border-radius:50%;cursor:pointer;"],(0,f.pxToRem)(6),(0,f.pxToRem)(6),(function(e){return e.theme.spaces[2]}),(function(e){var t=e.theme,n=e.isDraft;return t.colors[n?"secondary600":"success600"]})),g=function(e){var t=(0,l.useIntl)().formatMessage,n=i.components.Option,r=(0,d.has)((0,d.get)(e,"data.value"),"publishedAt"),o=(0,d.isEmpty)((0,d.get)(e,"data.value.publishedAt"));if(r&&r){var u={id:(0,p.getTrad)("components.Select.draft-info-title"),defaultMessage:"State: Draft"},f={id:(0,p.getTrad)("components.Select.publish-info-title"),defaultMessage:"State: Published"},g=t(o?u:f);return a.default.createElement(n,e,a.default.createElement(s.Flex,null,a.default.createElement(m,{title:g,isDraft:o}),a.default.createElement(c.Typography,{ellipsis:!0},e.label||"-")))}return a.default.createElement(n,e,e.label||"-")};g.defaultProps={label:""},g.propTypes={label:u.default.oneOfType([u.default.string,u.default.number]),isFocused:u.default.bool.isRequired,selectProps:u.default.shape({hasDraftAndPublish:u.default.bool,mainField:u.default.shape({name:u.default.string.isRequired,schema:u.default.shape({type:u.default.string.isRequired}).isRequired}).isRequired}).isRequired};var y=g;t.default=y},54865:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(87757)),i=r(n(59713)),l=r(n(48926)),u=r(n(63038)),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=q(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),s=r(n(45697)),c=n(97132),f=n(39711),p=n(85104),m=n(9008),g=n(78384),y=r(n(30998)),b=r(n(27361)),v=r(n(1469)),h=r(n(41609)),E=r(n(36968)),O=n(68547),w=n(36232),M=r(n(9669)),j=n(53777),P=n(28564),C=r(n(89964)),k=r(n(77570)),_=r(n(63293)),R=r(n(35645)),T=r(n(62773)),x=r(n(5998)),D=r(n(51121)),S=n(58888),I=r(n(11647));function q(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(q=function(e){return e?n:t})(e)}function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A={contains:"",limit:20,start:0};function B(e){var t=e.description,n=e.editable,r=e.labelAction,a=e.intlLabel,i=e.isCreatingEntry,s=e.isFieldAllowed,S=e.isFieldReadable,q=e.mainField,F=e.name,B=e.relationType,N=e.targetModel,W=e.placeholder,z=e.queryInfos,U=(0,c.useIntl)().formatMessage,V=(0,O.useQueryParams)(),H=(0,u.default)(V,1)[0].query,G=(0,d.useMemo)((function(){return B.toLowerCase().includes("morph")}),[B]),Z=(0,O.useCMEditViewDataManager)(),$=Z.addRelation,Q=Z.modifiedData,Y=Z.moveRelation,J=Z.onChange,K=Z.onRemoveRelation,X=(0,f.useLocation)().pathname,ee=(0,g.useTheme)(),te=(0,b.default)(Q,F,null),ne=(0,d.useState)(A),re=(0,u.default)(ne,2),ae=re[0],oe=re[1],ie=(0,d.useState)([]),le=(0,u.default)(ie,2),ue=le[0],de=le[1],se=(0,d.useState)(!1),ce=(0,u.default)(se,2),fe=ce[0],pe=ce[1],me=(0,d.useState)(!1),ge=(0,u.default)(me,2),ye=ge[0],be=ge[1],ve=(0,d.useMemo)((function(){return ue.filter((function(e){return!!(0,h.default)(te)||(Array.isArray(te)?-1===(0,y.default)(te,(function(t){return t.id===e.value.id})):(0,b.default)(te,"id","")!==e.value.id)}))}),[ue,te]),he=z.endPoint,Ee=z.containsKey,Oe=z.defaultParams,we=z.shouldDisplayRelationLink,Me=z.paramsToKeep,je=["oneWay","oneToOne","manyToOne","oneToManyMorph","oneToOneMorph"].includes(B),Pe=(0,d.useMemo)((function(){return te?je?[te.id]:te.map((function(e){return e.id})):[]}),[je,te]),Ce=(0,d.useCallback)(function(){var e=(0,l.default)(o.default.mark((function e(t){var n,r,a,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!G){e.next=3;break}return pe(!1),e.abrupt("return");case 3:if(s){e.next=6;break}return pe(!1),e.abrupt("return");case 6:return pe(!0),n=L(L({limit:ae.limit},Oe),{},{start:ae.start}),ae.contains&&(n["filters[".concat(Ee,"][$contains]")]=ae.contains),e.prev=9,e.next=12,j.axiosInstance.post(he,{idsToOmit:Pe},{params:n,cancelToken:t.token});case 12:r=e.sent,a=r.data,i=a.map((function(e){return{value:e,label:e[q.name]}})),de((function(e){return e.concat(i).filter((function(t,n){return-1===e.findIndex((function(e){return e.value.id===t.value.id}))||e.findIndex((function(e){return e.value.id===t.value.id}))===n}))})),pe(!1),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(9),pe(!1);case 22:case"end":return e.stop()}}),e,null,[[9,19]])})));return function(t){return e.apply(this,arguments)}}(),[Ee,Oe,he,Pe,s,G,q.name,ae.contains,ae.limit,ae.start]);(0,d.useEffect)((function(){var e=M.default.CancelToken.source();return ye&&Ce(e),function(){return e.cancel("Operation canceled by the user.")}}),[Ce,ye]);var ke="/content-manager/collectionType/".concat(N,"/").concat(te?te.id:null),_e=(0,w.stringify)(function(e,t){return t?t.reduce((function(t,n){var r=(0,b.default)(e,n,null);return r&&(0,E.default)(t,n,r),t}),{}):{}}(H,Me),{encode:!1}),Re=null;je&&te&&we&&(Re=d.default.createElement(p.Link,{to:{pathname:ke,state:{from:X},search:_e}},U({id:(0,P.getTrad)("containers.Edit.seeDetails"),defaultMessage:"Details"})));var Te=je?k.default:_.default,xe=(0,v.default)(te)?te.length:0,De=(0,d.useMemo)((function(){return!!G||(i?!n:!s&&S||!n)}),[G,i,n,s,S]);if(!s&&i)return d.default.createElement(O.NotAllowedInput,{intlLabel:a,labelAction:r});if(!i&&!s&&!S)return d.default.createElement(O.NotAllowedInput,{intlLabel:a,labelAction:r});var Se=(0,I.default)(ee);return d.default.createElement(m.Stack,{size:1},d.default.createElement(C.default,{intlLabel:a,isSingle:je,labelAction:r,link:Re,name:F,numberOfEntries:xe}),d.default.createElement(Te,{addRelation:function(e){(0,h.default)(e)||$({target:{name:F,value:e}})},components:{ClearIndicator:R.default,DropdownIndicator:T.default,IndicatorSeparator:x.default,Option:D.default},displayNavigationLink:we,id:F,isDisabled:De,isLoading:fe,isClearable:!0,mainField:q,move:Y,name:F,options:ve,onChange:function(e){J({target:{name:F,value:e?e.value:e}})},onInputChange:function(e,t){return"input-change"===t.action&&oe((function(t){return t.contains===e?t:L(L({},t),{},{contains:e,start:0})})),e},onMenuClose:function(){oe(A),be(!1)},onMenuOpen:function(){be(!0)},onMenuScrollToBottom:function(){oe((function(e){return L(L({},e),{},{start:e.start+20})}))},onRemove:K,placeholder:W,searchToPersist:_e,styles:Se,targetModel:N,value:te,description:t}))}B.defaultProps={editable:!0,description:"",labelAction:null,isFieldAllowed:!0,placeholder:null},B.propTypes={editable:s.default.bool,description:s.default.string,intlLabel:s.default.shape({id:s.default.string.isRequired,defaultMessage:s.default.string.isRequired,values:s.default.object}).isRequired,labelAction:s.default.element,isCreatingEntry:s.default.bool.isRequired,isFieldAllowed:s.default.bool,isFieldReadable:s.default.bool.isRequired,mainField:s.default.shape({name:s.default.string.isRequired,schema:s.default.shape({type:s.default.string.isRequired}).isRequired}).isRequired,name:s.default.string.isRequired,placeholder:s.default.shape({id:s.default.string.isRequired,defaultMessage:s.default.string.isRequired,values:s.default.object}),relationType:s.default.string.isRequired,targetModel:s.default.string.isRequired,queryInfos:s.default.shape({containsKey:s.default.string.isRequired,defaultParams:s.default.object,endPoint:s.default.string.isRequired,shouldDisplayRelationLink:s.default.bool.isRequired,paramsToKeep:s.default.array}).isRequired};var N=(0,d.memo)(B),W=(0,S.connect)(N,S.select);t.default=W},32869:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67154)),o=r(n(67294));var i=function(e,t){return function(n){var r=t(n);return o.default.createElement(e,(0,a.default)({},n,r))}};t.default=i},11647:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(59713));function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l=function(e){return{clearIndicator:function(t){return i(i({},t),{},{padding:0,paddingRight:e.spaces[3]})},container:function(t){return i(i({},t),{},{background:e.colors.neutral0,fontFamily:"Arial",lineHeight:"normal"})},control:function(t,n){var r,a,o;return r=n.isFocused?"1px solid ".concat(e.colors.primary600," !important"):"1px solid ".concat(e.colors.neutral200," !important"),!0===n.menuIsOpen&&(a="1px solid ".concat(e.colors.primary600," !important")),n.isDisabled&&(o="#fafafb !important"),i(i({},t),{},{fontSize:14,height:40,border:r,outline:0,boxShadow:0,borderRadius:"2px !important",borderBottom:a,backgroundColor:o,borderTopLeftRadius:"4px !important",borderTopRightRadius:"4px !important",borderBottomLeftRadius:"4px !important",borderBottomRightRadius:"4px !important"})},indicatorContainer:function(t){return i(i({},t),{},{padding:0,paddingRight:e.spaces[3]})},input:function(e){return i(i({},e),{},{margin:0,padding:0})},menu:function(t){return i(i({},t),{},{width:"100%",marginTop:e.spaces[1],borderRadius:"4px !important",borderTopLeftRadius:"4px !important",borderTopRightRadius:"4px !important",border:"1px solid ".concat(e.colors.neutral200," !important"),boxShadow:0,fontSize:"14px",fontFamily:"Arial",zIndex:2})},menuList:function(t){return i(i({},t),{},{paddingLeft:e.spaces[1],paddingTop:e.spaces[1],paddingRight:e.spaces[1],paddingBottom:e.spaces[1]})},option:function(t,n){var r=t.backgroundColor;return n.isFocused&&(r=e.colors.primary100),i(i({},t),{},{lineHeight:e.spaces[5],backgroundColor:r,borderRadius:4})},placeholder:function(e){return i(i({},e),{},{marginLeft:0})},singleValue:function(e){return i(i({},e),{},{marginLeft:0})},valueContainer:function(t){return i(i({},t),{},{padding:0,paddingLeft:e.spaces[4],marginLeft:0,marginRight:0})}}};t.default=l},58888:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"select",{enumerable:!0,get:function(){return o.default}});var a=r(n(32869)),o=r(n(19124))},19124:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(67294),a=n(68547);var o=function(e){var t=e.isUserAllowedToEditField,n=e.isUserAllowedToReadField,o=e.name,i=(0,a.useCMEditViewDataManager)(),l=i.isCreatingEntry,u=i.createActionAllowedFields,d=i.readActionAllowedFields,s=i.updateActionAllowedFields,c=(0,r.useMemo)((function(){return!0===t||(l?u:s).includes(o)}),[l,u,o,t,s]),f=(0,r.useMemo)((function(){return!!n||(l?[]:d).includes(o)}),[l,n,o,d]);return{isCreatingEntry:l,isFieldAllowed:c,isFieldReadable:f}};t.default=o},13995:(e,t,n)=>{"use strict";var r=n(25108),a=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(87757)),i=a(n(59713)),l=a(n(48926)),u=a(n(63038)),d=n(67294),s=n(39711),c=a(n(27361)),f=n(68547),p=n(37424),m=a(n(45697)),g=a(n(9669)),y=n(53777),b=n(28564),v=n(98744),h=a(n(22787)),E=n(40079),O=a(n(62616));function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j=function(e){var t=e.allLayoutData,n=e.children,a=e.slug,i=(0,f.useTracking)().trackUsage,m=(0,s.useHistory)().push,w=(0,d.useRef)(i),j=(0,d.useState)(!0),P=(0,u.default)(j,2),C=P[0],k=P[1],_=(0,f.useQueryParams)(),R=(0,u.default)(_,1)[0],T=R.query,x=R.rawQuery,D=(0,O.default)(T),S=(0,f.useNotification)(),I=(0,p.useDispatch)(),q=(0,p.useSelector)(h.default),F=q.componentsDataStructure,L=q.contentTypeDataStructure,A=q.data,B=q.isLoading,N=q.status,W=(0,d.useCallback)((function(e){var n=(0,b.removePasswordFieldsFromData)(e,t.contentType,t.components);return(0,f.formatComponentData)(n,t.contentType,t.components)}),[t]);(0,d.useEffect)((function(){return function(){I((0,v.resetProps)())}}),[I]),(0,d.useEffect)((function(){var e=Object.keys(t.components).reduce((function(e,n){var r=(0,b.createDefaultForm)((0,c.default)(t,["components",n,"attributes"],{}),t.components);return e[n]=(0,f.formatComponentData)(r,t.components[n],t.components),e}),{}),n=(0,b.createDefaultForm)(t.contentType.attributes,t.components),r=(0,f.formatComponentData)(n,t.contentType,t.components);I((0,v.setDataStructures)(e,r))}),[t,I]),(0,d.useEffect)((function(){var e=g.default.CancelToken.source(),t=function(){var e=(0,l.default)(o.default.mark((function e(t){var n,r,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I((0,v.getData)()),k(!0),e.prev=2,e.next=5,(0,y.axiosInstance)((0,E.getRequestUrl)("".concat(a).concat(D)),{cancelToken:t.token});case 5:n=e.sent,r=n.data,I((0,v.getDataSucceeded)(W(r))),k(!1),e.next=18;break;case 11:if(e.prev=11,e.t0=e.catch(2),!g.default.isCancel(e.t0)){e.next=15;break}return e.abrupt("return");case 15:404===(i=(0,c.default)(e.t0,"response.status",null))&&I((0,v.initForm)(x,!0)),403===i&&(S({type:"info",message:{id:(0,b.getTrad)("permissions.not-allowed.update")}}),m("/"));case 18:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}();return t(e),function(){return e.cancel("Operation canceled by the user.")}}),[W,m,a,I,D,x,S]);var z=(0,d.useCallback)((function(e){var t=e.response.payload;r.error(t);var n=(0,c.default)(t,["message"],"Bad Request");Array.isArray(n)&&(n=(0,c.default)(n,["0","messages","0","id"])),"string"===typeof n&&S({type:"warning",message:n})}),[S]),U=(0,d.useCallback)(function(){var e=(0,l.default)(o.default.mark((function e(t){var n,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,w.current("willDeleteEntry",t),e.next=4,y.axiosInstance.delete((0,E.getRequestUrl)("".concat(a).concat(D)));case 4:return n=e.sent,r=n.data,S({type:"success",message:{id:(0,b.getTrad)("success.record.delete")}}),w.current("didDeleteEntry",t),e.abrupt("return",Promise.resolve(r));case 11:return e.prev=11,e.t0=e.catch(0),w.current("didNotDeleteEntry",M({error:e.t0},t)),e.abrupt("return",Promise.reject(e.t0));case 15:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(t){return e.apply(this,arguments)}}(),[a,S,D]),V=(0,d.useCallback)((function(){k(!0),I((0,v.initForm)(x,!0))}),[I,x]),H=(0,d.useCallback)(function(){var e=(0,l.default)(o.default.mark((function e(t,n){var r,i,l;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,E.getRequestUrl)("".concat(a).concat(x)),e.prev=1,I((0,v.setStatus)("submit-pending")),e.next=5,y.axiosInstance.put(r,t);case 5:i=e.sent,l=i.data,w.current("didCreateEntry",n),S({type:"success",message:{id:(0,b.getTrad)("success.record.save")}}),I((0,v.submitSucceeded)(W(l))),k(!1),I((0,v.setStatus)("resolved")),e.next=19;break;case 14:e.prev=14,e.t0=e.catch(1),w.current("didNotCreateEntry",{error:e.t0,trackerProperty:n}),z(e.t0),I((0,v.setStatus)("resolved"));case 19:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(t,n){return e.apply(this,arguments)}}(),[W,z,a,I,x,S]),G=(0,d.useCallback)((0,l.default)(o.default.mark((function e(){var t,n,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,w.current("willPublishEntry"),t=(0,E.getRequestUrl)("".concat(a,"/actions/publish").concat(D)),I((0,v.setStatus)("publish-pending")),e.next=6,y.axiosInstance.post(t);case 6:n=e.sent,r=n.data,w.current("didPublishEntry"),S({type:"success",message:{id:(0,b.getTrad)("success.record.publish")}}),I((0,v.submitSucceeded)(W(r))),I((0,v.setStatus)("resolved")),e.next=18;break;case 14:e.prev=14,e.t0=e.catch(0),z(e.t0),I((0,v.setStatus)("resolved"));case 18:case"end":return e.stop()}}),e,null,[[0,14]])}))),[W,z,a,D,I,S]),Z=(0,d.useCallback)(function(){var e=(0,l.default)(o.default.mark((function e(t,n){var r,i,l;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,E.getRequestUrl)("".concat(a).concat(x)),e.prev=1,w.current("willEditEntry",n),I((0,v.setStatus)("submit-pending")),e.next=6,y.axiosInstance.put(r,t);case 6:i=e.sent,l=i.data,S({type:"success",message:{id:(0,b.getTrad)("success.record.save")}}),w.current("didEditEntry",{trackerProperty:n}),I((0,v.submitSucceeded)(W(l))),I((0,v.setStatus)("resolved")),e.next=19;break;case 14:e.prev=14,e.t0=e.catch(1),z(e.t0),w.current("didNotEditEntry",{error:e.t0,trackerProperty:n}),I((0,v.setStatus)("resolved"));case 19:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(t,n){return e.apply(this,arguments)}}(),[W,z,a,I,x,S]);return n({componentsDataStructure:F,contentTypeDataStructure:L,data:A,isCreatingEntry:C,isLoadingForData:B,onDelete:U,onDeleteSucceeded:V,onPost:H,onPublish:G,onPut:Z,onUnpublish:(0,d.useCallback)((0,l.default)(o.default.mark((function e(){var t,n,r;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=(0,E.getRequestUrl)("".concat(a,"/actions/unpublish").concat(D)),I((0,v.setStatus)("unpublish-pending")),e.prev=2,w.current("willUnpublishEntry"),e.next=6,y.axiosInstance.post(t);case 6:n=e.sent,r=n.data,w.current("didUnpublishEntry"),S({type:"success",message:{id:(0,b.getTrad)("success.record.unpublish")}}),I((0,v.submitSucceeded)(W(r))),I((0,v.setStatus)("resolved")),e.next=18;break;case 14:e.prev=14,e.t0=e.catch(2),I((0,v.setStatus)("resolved")),z(e.t0);case 18:case"end":return e.stop()}}),e,null,[[2,14]])}))),[W,S,z,a,I,D]),redirectionLink:"/",status:N})};j.propTypes={allLayoutData:m.default.shape({components:m.default.object.isRequired,contentType:m.default.object.isRequired}).isRequired,children:m.default.func.isRequired,slug:m.default.string.isRequired};var P=(0,d.memo)(j);t.default=P},14261:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(28564),a=function(e){return(0,r.getRequestUrl)("single-types/".concat(e))};t.default=a},40079:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRequestUrl",{enumerable:!0,get:function(){return a.default}});var a=r(n(14261))},27301:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=n(97132),l=n(49425),u=n(5493),d=n(28564),s=function(e){var t=e.isPublished,n=(0,(0,i.useIntl)().formatMessage)({id:(0,d.getTrad)("containers.List.".concat(t?"published":"draft"))}),r=t?"success100":"secondary100",o=t?"success700":"secondary700";return a.default.createElement(u.Box,{background:r,hasRadius:!0,paddingTop:1,paddingBottom:1,paddingLeft:2,paddingRight:2,style:{width:"fit-content"}},a.default.createElement(l.Typography,{fontWeight:"bold",textColor:o},n))};s.propTypes={isPublished:o.default.bool.isRequired};var c=s;t.default=c},69030:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),i=r(n(45697)),l=r(n(4631));n(88386);var u=r(n(76957)),d=n(71281),s=n(54273),c=r(n(25734));function f(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}var p=function(e){var t=e.disabled,n=e.editorRef,r=e.error,a=e.isPreviewMode,i=e.isExpandMode,f=e.name,p=e.onChange,m=e.placeholder,g=e.textareaRef,y=e.value,b=(0,o.useRef)(p);return(0,o.useEffect)((function(){n.current=l.default.fromTextArea(g.current,{lineWrapping:!0,extraKeys:{Enter:"newlineAndIndentContinueMarkdownList",Tab:!1,"Shift-Tab":!1},readOnly:!1,smartIndent:!1,placeholder:m}),l.default.commands.newlineAndIndentContinueMarkdownList=c.default,n.current.on("change",(function(e){b.current({target:{name:f,value:e.getValue(),type:"wysiwyg"}})}))}),[n,g,f,m]),(0,o.useEffect)((function(){y&&!n.current.state.focused&&n.current.setValue(y)}),[n,y]),(0,o.useEffect)((function(){a||t?n.current.setOption("readOnly","nocursor"):n.current.setOption("readOnly",!1)}),[t,a,n]),(0,o.useEffect)((function(){r?n.current.setOption("screenReaderLabel",r):n.current.setOption("screenReaderLabel","Editor")}),[n,r]),o.default.createElement(s.EditorAndPreviewWrapper,null,o.default.createElement(d.EditorStylesContainer,{isExpandMode:i,disabled:t||a},o.default.createElement("textarea",{ref:g})),a&&o.default.createElement(u.default,{data:y}))};p.defaultProps={disabled:!1,error:void 0,isPreviewMode:!1,isExpandMode:!1,placeholder:"",value:""},p.propTypes={disabled:i.default.bool,editorRef:i.default.shape({current:i.default.any}).isRequired,error:i.default.string,isPreviewMode:i.default.bool,isExpandMode:i.default.bool,name:i.default.string.isRequired,onChange:i.default.func.isRequired,placeholder:i.default.string,textareaRef:i.default.shape({current:i.default.any}).isRequired,value:i.default.string};var m=p;t.default=m},57321:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.ExpandButton=t.EditorLayout=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),i=r(n(45697)),l=r(n(78384)),u=n(67826),d=n(5493),s=n(24824),c=n(59471),f=n(18445),p=n(49425),m=n(68547),g=r(n(76149)),y=n(97132),b=r(n(76957));function v(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}var h=(0,l.default)(u.Flex).withConfig({displayName:"EditorLayout__ExpandWrapper",componentId:"sc-qmn252-0"})(["background:",";"],(function(e){var t,n,r=e.theme;return t=r.colors.neutral800,n=.2,"".concat(t).concat(Math.floor(255*n).toString(16).padStart(2,0))})),E=(0,l.default)(d.Box).withConfig({displayName:"EditorLayout__BoxWithBorder",componentId:"sc-qmn252-1"})(["border-right:1px solid ",";"],(function(e){return e.theme.colors.neutral200})),O=(0,l.default)(f.BaseButton).withConfig({displayName:"EditorLayout__ExpandButton",componentId:"sc-qmn252-2"})(["background-color:transparent;border:none;align-items:center;svg{margin-left:",";path{fill:",";width:","rem;height:","rem;}}"],(function(e){var t=e.theme;return"".concat(t.spaces[2])}),(function(e){return e.theme.colors.neutral700}),.75,.75);t.ExpandButton=O;var w=function(e){var t=e.children,n=e.isExpandMode,r=e.error,a=e.previewContent,i=e.onCollapse,l=(0,y.useIntl)().formatMessage;return(0,o.useEffect)((function(){var e=document.body;return n&&e.classList.add("lock-body-scroll"),function(){n&&e.classList.remove("lock-body-scroll")}}),[n]),n?o.default.createElement(c.Portal,{role:"dialog","aria-modal":!1},o.default.createElement(s.FocusTrap,{onEscape:i},o.default.createElement(h,{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:4,justifyContent:"center",onClick:i},o.default.createElement(d.Box,{id:"wysiwyg-expand",background:"neutral0",hasRadius:!0,shadow:"popupShadow",overflow:"hidden",width:"70%",height:"70%",onClick:function(e){return e.stopPropagation()}},o.default.createElement(u.Flex,{height:"100%",alignItems:"flex-start"},o.default.createElement(E,{flex:"1",height:"100%"},t),o.default.createElement(d.Box,{flex:"1",height:"100%"},o.default.createElement(u.Flex,{height:(0,m.pxToRem)(48),background:"neutral100",justifyContent:"flex-end"},o.default.createElement(O,{id:"collapse",onClick:i},o.default.createElement(p.Typography,null,l({id:"components.Wysiwyg.collapse",defaultMessage:"Collapse"})),o.default.createElement(g.default,null))),o.default.createElement(d.Box,{position:"relative",height:"100%"},o.default.createElement(b.default,{data:a})))))))):o.default.createElement(d.Box,{borderColor:r?"danger600":"neutral200",borderStyle:"solid",borderWidth:"1px",hasRadius:!0},t)};t.EditorLayout=w,w.defaultProps={error:void 0,previewContent:""},w.propTypes={children:i.default.node.isRequired,error:i.default.string,isExpandMode:i.default.bool.isRequired,previewContent:i.default.string,onCollapse:i.default.func.isRequired}},71281:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.EditorStylesContainer=void 0;var a=r(n(78384)).default.div.withConfig({displayName:"EditorStylesContainer",componentId:"sc-kl3z57-0"})(["cursor:",";height:100%;.CodeMirror-placeholder{color:"," !important;}.CodeMirror{font-size:","rem;height:",";color:",";direction:ltr;font-family:--apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;}.CodeMirror-lines{padding:",";}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white;}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap;}.CodeMirror-linenumbers{}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap;}.CodeMirror-guttermarker{color:black;}.CodeMirror-guttermarker-subtle{color:#999;}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0;}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver;}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7;}.cm-fat-cursor div.CodeMirror-cursors{}.cm-fat-cursor-mark{background-color:rgba(20,255,20,0.5);-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7;}.CodeMirror-overwrite .CodeMirror-cursor{}.cm-tab{display:inline-block;text-decoration:inherit;}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden;}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute;}.cm-header,.cm-strong{font-weight:bold;}.cm-em{font-style:italic;}.cm-link{text-decoration:underline;}.cm-strikethrough{text-decoration:line-through;}.CodeMirror-composing{border-bottom:2px solid;}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0;}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22;}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3);}.CodeMirror-activeline-background{background:#e8f2ff;}.CodeMirror{position:relative;overflow:hidden;background:white;}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative;}.CodeMirror-sizer{position:relative;border-right:50px solid transparent;}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:1;display:none;outline:none;}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll;}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll;}.CodeMirror-scrollbar-filler{right:0;bottom:0;}.CodeMirror-lines{cursor:text;min-height:1px;}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual;}.CodeMirror pre.CodeMirror-line-like{z-index:2;}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal;}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0;}.CodeMirror-linewidget{position:relative;padding:0.1px;}.CodeMirror-widget{}.CodeMirror-rtl pre{direction:rtl;}.CodeMirror-code{outline:none;}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box;}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden;}.CodeMirror-cursor{position:absolute;pointer-events:none;}.CodeMirror-measure pre{position:static;}div.CodeMirror-cursors{visibility:hidden;position:relative;+ div{z-index:0 !important;}}div.CodeMirror-dragcursors{visibility:visible;}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible;}.CodeMirror-selected{background:",";}.CodeMirror-crosshair{cursor:crosshair;}.cm-force-border{padding-right:0.1px;}.cm-tab-wrap-hack:after{content:'';}span.CodeMirror-selectedtext{background:none;}span{color:"," !important;}"],(function(e){return e.disabled?"not-allowed !important":"auto"}),(function(e){return e.theme.colors.neutral600}),.875,(function(e){return e.isExpandMode?"100%":"290px"}),(function(e){return e.theme.colors.neutral800}),(function(e){var t=e.theme;return"".concat(t.spaces[3]," ").concat(t.spaces[4])}),(function(e){return e.theme.colors.neutral200}),(function(e){return e.theme.colors.neutral800}));t.EditorStylesContainer=a},27705:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=n(97132),l=n(5493),u=n(67826),d=n(49425),s=r(n(52286)),c=n(54273),f=function(e){var t=e.onToggleExpand,n=(0,i.useIntl)().formatMessage;return a.default.createElement(l.Box,{padding:2,background:"neutral100",hasRadius:!0},a.default.createElement(u.Flex,{justifyContent:"flex-end",alignItems:"flex-end"},a.default.createElement(c.ExpandButton,{id:"expand",onClick:t},a.default.createElement(d.Typography,null,n({id:"components.WysiwygBottomControls.fullscreen",defaultMessage:"Expand"})),a.default.createElement(s.default,null))))};f.defaultProps={onToggleExpand:function(){}},f.propTypes={onToggleExpand:o.default.func};var p=f;t.default=p},17403:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(63038)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=_(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),l=r(n(45697)),u=n(97132),d=n(24824),s=n(5493),c=n(19408),f=n(30741),p=n(43808),m=n(24955),g=n(67826),y=r(n(53418)),b=r(n(36531)),v=r(n(89084)),h=r(n(76096)),E=r(n(61517)),O=r(n(24509)),w=r(n(74389)),M=r(n(16305)),j=r(n(42724)),P=r(n(50086)),C=r(n(83657)),k=n(54273);function _(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(_=function(e){return e?n:t})(e)}var R=function(e){var t=e.disabled,n=e.editorRef,r=e.isExpandMode,a=e.isPreviewMode,l=e.onActionClick,_=e.onToggleMediaLib,R=e.onTogglePreviewMode,T=(0,i.useState)(!1),x=(0,o.default)(T,2),D=x[0],S=x[1],I=(0,u.useIntl)().formatMessage,q=I({id:"components.Wysiwyg.selectOptions.title",defaultMessage:"Add a title"}),F=(0,i.useRef)(),L=function(){S((function(e){return!e}))};return t||a?i.default.createElement(s.Box,{padding:2,background:"neutral100"},i.default.createElement(g.Flex,{justifyContent:"space-between"},i.default.createElement(g.Flex,null,i.default.createElement(p.Select,{disabled:!0,id:"selectTitle",placeholder:q,size:"S","aria-label":q},i.default.createElement(p.Option,{value:"h1"},"h1"),i.default.createElement(p.Option,{value:"h2"},"h2"),i.default.createElement(p.Option,{value:"h3"},"h3"),i.default.createElement(p.Option,{value:"h4"},"h4"),i.default.createElement(p.Option,{value:"h5"},"h5"),i.default.createElement(p.Option,{value:"h6"},"h6")),i.default.createElement(k.MainButtons,null,i.default.createElement(k.CustomIconButton,{disabled:!0,id:"Bold",label:"Bold",name:"Bold",icon:i.default.createElement(y.default,null)}),i.default.createElement(k.CustomIconButton,{disabled:!0,id:"Italic",label:"Italic",name:"Italic",icon:i.default.createElement(b.default,null)}),i.default.createElement(k.CustomIconButton,{disabled:!0,id:"Underline",label:"Underline",name:"Underline",icon:i.default.createElement(v.default,null)})),i.default.createElement(k.MoreButton,{disabled:!0,id:"more",label:"More",icon:i.default.createElement(C.default,null)})),!r&&i.default.createElement(c.Button,{onClick:R,variant:"tertiary",id:"preview"},I({id:"components.Wysiwyg.ToggleMode.markdown-mode",defaultMessage:"Markdown mode"})))):i.default.createElement(s.Box,{padding:2,background:"neutral100"},i.default.createElement(g.Flex,{justifyContent:"space-between"},i.default.createElement(g.Flex,null,i.default.createElement(p.Select,{id:"selectTitle",placeholder:q,size:"S",onChange:function(e){return l(e,n)}},i.default.createElement(p.Option,{value:"h1"},"h1"),i.default.createElement(p.Option,{value:"h2"},"h2"),i.default.createElement(p.Option,{value:"h3"},"h3"),i.default.createElement(p.Option,{value:"h4"},"h4"),i.default.createElement(p.Option,{value:"h5"},"h5"),i.default.createElement(p.Option,{value:"h6"},"h6")),i.default.createElement(k.MainButtons,null,i.default.createElement(k.CustomIconButton,{onClick:function(){return l("Bold",n)},id:"Bold",label:"Bold",name:"Bold",icon:i.default.createElement(y.default,null)}),i.default.createElement(k.CustomIconButton,{onClick:function(){return l("Italic",n)},id:"Italic",label:"Italic",name:"Italic",icon:i.default.createElement(b.default,null)}),i.default.createElement(k.CustomIconButton,{onClick:function(){return l("Underline",n)},id:"Underline",label:"Underline",name:"Underline",icon:i.default.createElement(v.default,null)})),i.default.createElement(k.MoreButton,{ref:F,onClick:L,id:"more",label:"More",icon:i.default.createElement(C.default,null)}),D&&i.default.createElement(m.Popover,{centered:!0,source:F,spacing:4,id:"popover"},i.default.createElement(d.FocusTrap,{onEscape:L,restoreFocus:!1},i.default.createElement(g.Flex,null,i.default.createElement(k.IconButtonGroupMargin,null,i.default.createElement(k.CustomIconButton,{onClick:function(){return l("Strikethrough",n,L)},id:"Strikethrough",label:"Strikethrough",name:"Strikethrough",icon:i.default.createElement(h.default,null)}),i.default.createElement(k.CustomIconButton,{onClick:function(){return l("BulletList",n,L)},id:"BulletList",label:"BulletList",name:"BulletList",icon:i.default.createElement(E.default,null)}),i.default.createElement(k.CustomIconButton,{onClick:function(){return l("NumberList",n,L)},id:"NumberList",label:"NumberList",name:"NumberList",icon:i.default.createElement(O.default,null)})),i.default.createElement(f.IconButtonGroup,null,i.default.createElement(k.CustomIconButton,{onClick:function(){return l("Code",n,L)},id:"Code",label:"Code",name:"Code",icon:i.default.createElement(w.default,null)}),i.default.createElement(k.CustomIconButton,{onClick:function(){L(),_()},id:"Image",label:"Image",name:"Image",icon:i.default.createElement(M.default,null)}),i.default.createElement(k.CustomLinkIconButton,{onClick:function(){return l("Link",n,L)},id:"Link",label:"Link",name:"Link",icon:i.default.createElement(j.default,null)}),i.default.createElement(k.CustomIconButton,{onClick:function(){return l("Quote",n,L)},id:"Quote",label:"Quote",name:"Quote",icon:i.default.createElement(P.default,null)})))))),R&&i.default.createElement(c.Button,{onClick:R,variant:"tertiary",id:"preview"},I({id:"components.Wysiwyg.ToggleMode.preview-mode",defaultMessage:"Preview mode"}))))};R.defaultProps={isPreviewMode:!1,onActionClick:function(){},onToggleMediaLib:function(){},onTogglePreviewMode:void 0},R.propTypes={disabled:l.default.bool.isRequired,editorRef:l.default.shape({current:l.default.any}).isRequired,isExpandMode:l.default.bool.isRequired,isPreviewMode:l.default.bool,onActionClick:l.default.func,onToggleMediaLib:l.default.func,onTogglePreviewMode:l.default.func};var T=R;t.default=T},54273:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.MoreButton=t.MainButtons=t.IconButtonGroupMargin=t.ExpandButton=t.EditorAndPreviewWrapper=t.CustomLinkIconButton=t.CustomIconButton=void 0;var a=r(n(78384)),o=n(30741),i=n(18445),l=(0,a.default)(o.IconButton).withConfig({displayName:"WysiwygStyles__CustomIconButton",componentId:"sc-1omeuq1-0"})(["padding:",";outline-offset:-2px !important;svg{width:","rem;height:","rem;}"],(function(e){return e.theme.spaces[2]}),1.125,1.125);t.CustomIconButton=l;var u=(0,a.default)(l).withConfig({displayName:"WysiwygStyles__CustomLinkIconButton",componentId:"sc-1omeuq1-1"})(["svg{width:","rem;height:","rem;}"],.5,.5);t.CustomLinkIconButton=u;var d=(0,a.default)(o.IconButtonGroup).withConfig({displayName:"WysiwygStyles__MainButtons",componentId:"sc-1omeuq1-2"})(["margin-left:",";"],(function(e){return e.theme.spaces[4]}));t.MainButtons=d;var s=(0,a.default)(o.IconButton).withConfig({displayName:"WysiwygStyles__MoreButton",componentId:"sc-1omeuq1-3"})(["margin:",";padding:",";svg{width:","rem;height:","rem;}"],(function(e){var t=e.theme;return"0 ".concat(t.spaces[2])}),(function(e){return e.theme.spaces[2]}),1.125,1.125);t.MoreButton=s;var c=(0,a.default)(o.IconButtonGroup).withConfig({displayName:"WysiwygStyles__IconButtonGroupMargin",componentId:"sc-1omeuq1-4"})(["margin-right:",";"],(function(e){var t=e.theme;return"".concat(t.spaces[2])}));t.IconButtonGroupMargin=c;var f=a.default.div.withConfig({displayName:"WysiwygStyles__EditorAndPreviewWrapper",componentId:"sc-1omeuq1-5"})(["position:relative;height:calc(100% - 48px);"]);t.EditorAndPreviewWrapper=f;var p=(0,a.default)(i.BaseButton).withConfig({displayName:"WysiwygStyles__ExpandButton",componentId:"sc-1omeuq1-6"})(["background-color:transparent;border:none;align-items:center;svg{margin-left:",";path{fill:",";width:","rem;height:","rem;}}"],(function(e){var t=e.theme;return"".concat(t.spaces[2])}),(function(e){return e.theme.colors.neutral700}),.75,.75);t.ExpandButton=p},50424:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(59713)),i=r(n(63038)),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=O(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),u=r(n(45697)),d=r(n(78384)),s=n(97132),c=n(49425),f=n(5493),p=n(9008),m=n(68547),g=r(n(69030)),y=r(n(17403)),b=r(n(27705)),v=r(n(32266)),h=n(15612),E=n(57321);function O(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(O=function(e){return e?n:t})(e)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j=(0,d.default)(f.Box).withConfig({displayName:"Wysiwyg__LabelAction",componentId:"sc-c0p90q-0"})(["svg path{fill:",";}"],(function(e){return e.theme.colors.neutral500})),P=(0,d.default)(c.Typography).withConfig({displayName:"Wysiwyg__TypographyAsterisk",componentId:"sc-c0p90q-1"})(["line-height:0;"]),C=function(e){var t=e.description,n=e.disabled,r=e.error,a=e.intlLabel,o=e.labelAction,u=e.name,d=e.onChange,O=e.placeholder,w=e.value,C=e.required,k=(0,s.useIntl)().formatMessage,_=(0,l.useRef)(null),R=(0,l.useRef)(null),T=(0,l.useState)(!1),x=(0,i.default)(T,2),D=x[0],S=x[1],I=(0,l.useState)(!1),q=(0,i.default)(I,2),F=q[0],L=q[1],A=(0,l.useState)(!1),B=(0,i.default)(A,2),N=B[0],W=B[1],z=(0,m.useLibrary)().components["media-library"],U=function(){return L((function(e){return!e}))},V=function(){S(!1),W((function(e){return!e}))},H=O?k({id:O.id,defaultMessage:O.defaultMessage},M({},O.values)):"",G=r?k({id:r,defaultMessage:r}):"",Z=a.id?k({id:a.id,defaultMessage:a.defaultMessage},M({},a.values)):u;return l.default.createElement(l.default.Fragment,null,l.default.createElement(p.Stack,{size:1},l.default.createElement(p.Stack,{horizontal:!0,size:1},l.default.createElement(c.Typography,{variant:"pi",fontWeight:"bold",textColor:"neutral800"},Z,C&&l.default.createElement(P,{textColor:"danger600"},"*")),o&&l.default.createElement(j,{paddingLeft:1},o)),l.default.createElement(E.EditorLayout,{isExpandMode:N,error:r,previewContent:w,onCollapse:V},l.default.createElement(y.default,{isExpandMode:N,editorRef:R,isPreviewMode:D,onActionClick:function(e,t,n){switch(e){case"Link":case"Strikethrough":(0,h.markdownHandler)(t,e),n();break;case"Code":case"Quote":(0,h.quoteAndCodeHandler)(t,e),n();break;case"Bold":case"Italic":case"Underline":(0,h.markdownHandler)(t,e);break;case"BulletList":case"NumberList":(0,h.listHandler)(t,e),n();break;case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":(0,h.titleHandler)(t,e)}},onToggleMediaLib:U,onTogglePreviewMode:N?void 0:function(){return S((function(e){return!e}))},disabled:n}),l.default.createElement(g.default,{disabled:n,isExpandMode:N,editorRef:R,error:G,isPreviewMode:D,name:u,onChange:d,placeholder:H,textareaRef:_,value:w}),!N&&l.default.createElement(b.default,{onToggleExpand:V})),l.default.createElement(v.default,{description:t,name:u,error:r})),G&&l.default.createElement(f.Box,{paddingTop:1},l.default.createElement(c.Typography,{variant:"pi",textColor:"danger600","data-strapi-field-error":!0},G)),F&&l.default.createElement(z,{onClose:U,onSelectAssets:function(e){var t=e.map((function(e){return{alt:e.alternativeText||e.name,url:(0,m.prefixFileUrlWithBackendUrl)(e.url),mime:e.mime}}));(0,h.insertFile)(R,t),L(!1)}}))};C.defaultProps={description:null,disabled:!1,error:"",labelAction:void 0,placeholder:null,required:!1,value:""},C.propTypes={description:u.default.shape({id:u.default.string.isRequired,defaultMessage:u.default.string.isRequired,values:u.default.object}),disabled:u.default.bool,error:u.default.string,intlLabel:u.default.shape({id:u.default.string.isRequired,defaultMessage:u.default.string.isRequired,values:u.default.object}).isRequired,labelAction:u.default.element,name:u.default.string.isRequired,onChange:u.default.func.isRequired,placeholder:u.default.shape({id:u.default.string.isRequired,defaultMessage:u.default.string.isRequired,values:u.default.object}),required:u.default.bool,value:u.default.string};var k=C;t.default=k},25734:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(4631)),o=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,i=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,l=/[*+-]\s/;function u(e,t){var n=t.line,r=0,a=0,i=o.exec(e.getLine(n)),l=i[1];do{var u=n+(r+=1),d=e.getLine(u),s=o.exec(d);if(s){var c=s[1],f=parseInt(i[3],10)+r-a,p=parseInt(s[3],10),m=p;if(l!==c||isNaN(p)){if(l.length>c.length)return;if(l.length<c.length&&1===r)return;a+=1}else f===p&&(m=p+1),f>p&&(m=f+1),e.replaceRange(d.replace(o,c+m+s[4]+s[5]),{line:u,ch:0},{line:u,ch:d.length})}}while(s)}var d=function(e){if(e.getOption("disableInput"))return a.default.Pass;for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){var d=t[r].head,s=e.getStateAfter(d.line),c=!1!==s.list,f=0!==s.quote,p=e.getLine(d.line),m=o.exec(p),g=/^\s*$/.test(p.slice(0,d.ch));if(!t[r].empty()||!c&&!f||!m||g)return void e.execCommand("newlineAndIndent");if(i.test(p)){var y=f&&/>\s*$/.test(p),b=!/>\s*$/.test(p);(y||b)&&e.replaceRange("",{line:d.line,ch:0},{line:d.line,ch:d.ch+1}),n[r]="\n"}else{var v=m[1],h=m[5],E=!(l.test(m[2])||m[2].indexOf(">")>=0),O=E?parseInt(m[3],10)+1+m[4]:m[2].replace("x"," ");n[r]="\n"+v+O+h,E&&u(e,d)}}e.replaceSelections(n)};t.default=d},15612:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.titleHandler=t.replaceText=t.quoteAndCodeHandler=t.markdownHandler=t.listHandler=t.insertText=t.insertListOrTitle=t.insertFile=void 0;var n=function(e,t){var n;switch(e){case"Strikethrough":n="~~".concat(t,"~~");break;case"Bold":n="**".concat(t,"**");break;case"Italic":n="_".concat(t,"_");break;case"Underline":n="<u>".concat(t,"</u>");break;case"Code":n="```\n".concat(t,"\n```");break;case"Link":n="[".concat(t,"](link)");break;case"Quote":n=">".concat(t);break;default:n=t}return n};t.replaceText=n;var r=function(e){var t,n={start:e.length,end:0};switch(e){case"Strikethrough":t="~~".concat(e,"~~"),n.end=2;break;case"Bold":t="**".concat(e,"**"),n.end=2;break;case"Italic":t="_".concat(e,"_"),n.end=1;break;case"alt":t="[".concat(e,"]()"),n.end=3;break;case"Underline":t="<u>".concat(e,"</u>"),n.end=4;break;case"Code":t="```\n".concat(e,"\n```"),n.end=3;break;case"Link":t="[".concat(e,"](link)"),n.end=7;break;case"Quote":t=">".concat(e),n.end=0;break;default:t=""}return{editedText:t,selection:n}};t.insertText=r;var a=function(e){var t;switch(e){case"BulletList":t="- ";break;case"NumberList":t="1. ";break;case"h1":t="# ";break;case"h2":t="## ";break;case"h3":t="### ";break;case"h4":t="#### ";break;case"h5":t="##### ";break;case"h6":t="###### ";break;default:return""}return t};t.insertListOrTitle=a;t.markdownHandler=function(e,t){var a,o=e.current.getSelection();if(o){var i=n(t,o);e.current.replaceSelection(i),e.current.focus()}else{a=r(t),e.current.replaceSelection(a.editedText),e.current.focus();var l=e.current.getCursor(),u=l.line,d=l.ch,s=d-a.selection.end,c=d-a.selection.end-a.selection.start;e.current.setSelection({line:u,ch:c},{line:u,ch:s})}};t.listHandler=function(e,t){var n=e.current.getDoc(),r="BulletList"===t?"- ":"1. ";if(n.somethingSelected()){var o=n.listSelections(),i=null;e.current.operation((function(){o.forEach((function(e){var a=[e.head.line,e.anchor.line].sort();null==i&&(i=n.getLine(a[0]).startsWith(r));for(var o=a[0];o<=a[1];o++)if(i)n.getLine(o).startsWith(r)&&n.replaceRange("",{line:o,ch:0},{line:o,ch:r.length});else{var l="BulletList"===t?"- ":"".concat(o+1,". ");n.replaceRange(l,{line:o,ch:0})}}))}))}else{var l=n.getCursor().line,u=a(t),d=e.current.getLine(l),s=u+d;e.current.setSelection({line:l,ch:0},{line:l,ch:d.length}),e.current.replaceSelection(s)}e.current.focus()};t.titleHandler=function(e,t){var n=e.current.getCursor().line,r=a(t),o=e.current.getLine(n),i=r+o.replace(/#{1,6}\s/g,"").trim();e.current.setSelection({line:n,ch:0},{line:n,ch:o.length}),e.current.replaceSelection(i),setTimeout((function(){var t=e.current.getLine(n).length;e.current.focus(),e.current.setCursor({line:n,ch:t})}),0)};t.insertFile=function(e,t){var n=e.current.getCursor(),r=n.line,a=n.ch;t.forEach((function(t,n){var o=e.current.getLine(r).length;e.current.setCursor({line:r,ch:o}),(n>0||0===n&&0!==a)&&(o=e.current.getLine(r).length,e.current.setCursor({line:r,ch:o}),r++,e.current.replaceSelection("\n")),t.mime.includes("image")?e.current.replaceSelection("![".concat(t.alt,"](").concat(t.url,")")):e.current.replaceSelection("[".concat(t.alt,"](").concat(t.url,")"))})),setTimeout((function(){return e.current.focus()}),0)};t.quoteAndCodeHandler=function(e,t){var a=e.current.getSelection(),o=e.current.getCursor().line,i=e.current.getLine(o).length;a?function(e,t,r,a,o){var i=n(t,o),l=e.current.getRange({line:r+1,ch:0},{line:1/0,ch:1/0});if(e.current.replaceRange("",{line:r+1,ch:0},{line:1/0,ch:1/0}),e.current.replaceSelection(""),e.current.setCursor({line:r,ch:a}),e.current.replaceSelection("\n"),e.current.replaceSelection(i),"Code"===t){var u=e.current.getCursor().line;e.current.setCursor({line:u-1,ch:o.length})}e.current.replaceRange(l,{line:r+4,ch:0},{line:1/0,ch:1/0}),e.current.focus()}(e,t,o,i,a):function(e,t,n,a){var o=r(t),i=e.current.getRange({line:n+1,ch:0},{line:1/0,ch:1/0});if(e.current.replaceRange("",{line:n+1,ch:0},{line:1/0,ch:1/0}),e.current.setCursor({line:n,ch:a}),e.current.replaceSelection("\n"),e.current.replaceSelection(o.editedText),"Code"===t)n+=2,e.current.setSelection({line:n,ch:0},{line:n,ch:4});else{n+=1;var l=e.current.getCursor().ch,u=l-o.selection.end,d=l-o.selection.end-o.selection.start;e.current.setSelection({line:n,ch:d},{line:n,ch:u})}e.current.replaceRange(i,{line:n+2,ch:0},{line:1/0,ch:1/0}),e.current.focus()}(e,t,o,i)}},66755:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(67294).createContext)();t.default=r},22869:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(67294).createContext)();t.default=r},66973:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(67294).createContext)();t.default=r},91896:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=(0,n(67294).createContext)();t.default=r},42688:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ContentTypeLayoutContext",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"LayoutDndContext",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"WysiwygContext",{enumerable:!0,get:function(){return i.default}});var a=r(n(66755)),o=r(n(22869)),i=r(n(91896))},14772:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useContentTypeLayout",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"useFetchContentTypeLayout",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"useFindRedirectionLink",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"useLayoutDnd",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"usePluginsQueryParams",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"useSyncRbac",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"useWysiwyg",{enumerable:!0,get:function(){return s.default}});var a=r(n(97094)),o=r(n(12222)),i=r(n(2550)),l=r(n(9196)),u=r(n(30995)),d=r(n(30598)),s=r(n(32392))},97094:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(59713)),o=n(67294),i=n(96486),l=n(37424),u=r(n(94622));function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c=function(){var e=(0,l.useSelector)(u.default),t=(0,o.useCallback)((function(t){return(0,i.get)(e,["components",t],{})}),[e]);return s(s({},e),{},{getComponentLayout:t})};t.default=c},12222:(e,t,n)=>{"use strict";var r=n(25108),a=n(95318),o=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(87757)),l=a(n(48926)),u=a(n(63038)),d=n(67294),s=n(37424),c=a(n(9669)),f=n(53777),p=a(n(14674)),m=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!==typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(50670)),g=n(19763),y=n(28564);function b(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}var v=function(e){var t=(0,d.useReducer)(m.default,m.initialState),n=(0,u.default)(t,2),a=n[0],o=a.error,b=a.isLoading,v=a.layout,h=a.layouts,E=n[1],O=(0,d.useMemo)(g.makeSelectModelAndComponentSchemas,[]),w=(0,s.useSelector)((function(e){return O(e)}),s.shallowEqual).schemas,M=(0,d.useRef)(!0),j=(0,d.useCallback)(function(){var e=(0,l.default)(i.default.mark((function e(t,n){var a,o,l;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!h[t]){e.next=3;break}return E({type:"SET_LAYOUT_FROM_STATE",uid:t}),e.abrupt("return");case 3:return E({type:"GET_DATA"}),e.prev=4,a=(0,y.getRequestUrl)("content-types/".concat(t,"/configuration")),e.next=8,f.axiosInstance.get(a,{cancelToken:n.token});case 8:o=e.sent,l=o.data.data,E({type:"GET_DATA_SUCCEEDED",data:(0,p.default)(l,w)}),e.next=19;break;case 13:if(e.prev=13,e.t0=e.catch(4),!c.default.isCancel(e.t0)){e.next=17;break}return e.abrupt("return");case 17:M.current&&r.error(e.t0),M.current&&E({type:"GET_DATA_ERROR",error:e.t0});case 19:case"end":return e.stop()}}),e,null,[[4,13]])})));return function(t,n){return e.apply(this,arguments)}}(),[h,w]);return(0,d.useEffect)((function(){return function(){M.current=!1}}),[]),(0,d.useEffect)((function(){var t=c.default.CancelToken.source();return j(e,t),function(){t.cancel("Operation canceled by the user.")}}),[e,j]),{error:o,isLoading:b,layout:v,updateLayout:(0,d.useCallback)((function(e){E({type:"UPDATE_LAYOUT",newLayout:(0,p.default)({contentType:e,components:{}},w)})}),[w])}};t.default=v},50670:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.initialState=t.default=void 0;var a=r(n(59713)),o=r(n(66312));function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.initialState={error:null,isLoading:!0,layout:{},layouts:{}};var u=function(e,t){return(0,o.default)(e,(function(n){switch(t.type){case"GET_DATA":n.isLoading=!0,n.error=null,n.layout={};break;case"GET_DATA_SUCCEEDED":var r=t.data.contentType.uid;n.layout=t.data,n.layouts[r]=t.data,n.isLoading=!1;break;case"GET_DATA_ERROR":n.isLoading=!1,n.error=t.error;break;case"SET_LAYOUT_FROM_STATE":n.error=null,n.layout=e.layouts[t.uid];break;case"UPDATE_LAYOUT":var a=e.layout;n.layout=l(l({},a),{},{contentType:l({uid:a.contentType.uid},t.newLayout.contentType)}),n.layouts[a.contentType.uid]=l(l({},a),{},{contentType:l({uid:a.contentType.uid},t.newLayout.contentType)});break;default:return n}}))};t.default=u},14674:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.getDisplayedModels=t.generateRelationQueryInfosForComponents=t.generateRelationQueryInfos=t.formatListLayoutWithMetas=t.formatLayoutWithMetas=t.formatEditRelationsLayoutWithMetas=t.default=void 0;var a=r(n(59713)),o=n(96486),i=n(28564);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(e,t){return t.find((function(t){return t.uid===e}))},s=function(e,t){return e.layouts.editRelations.reduce((function(n,r){var a=(0,o.get)(e,["attributes",r],{}),i=(0,o.get)(e,["attributes",r,"targetModel"],null),l=d(i,t).pluginOptions||{},u=(0,o.get)(e,["metadatas",r,"edit"],{}),s=m(e,r,t);return n.push({name:r,size:6,fieldSchema:a,metadatas:u,queryInfos:s,targetModelPluginOptions:l}),n}),[])};t.formatEditRelationsLayoutWithMetas=s;var c=function(e,t){var n=(0,i.mergeMetasWithSchema)((0,o.cloneDeep)(e),t,"contentType"),r=n.components,a=n.contentType,l=function(e){return Object.keys(e.metadatas).reduce((function(n,r){var a=(0,o.get)(e,["attributes",r],{}),i=e.metadatas[r];if("relation"===a.type){var l=d(a.targetModel,t),s=i.edit.mainField,c={name:s,schema:(0,o.get)(l,["attributes",s])};i={list:u(u({},i.list),{},{mainField:c}),edit:u(u({},i.edit),{},{mainField:c})}}return n[r]=i,n}),{})};return(0,o.set)(n,["contentType","metadatas"],l(a)),Object.keys(r).forEach((function(e){var t=r[e],a=l(t);(0,o.set)(n,["components",e,"metadatas"],a)})),n},f=function(e,t,n){return e.layouts.edit.reduce((function(r,a){var i=a.map((function(r){var a=(0,o.get)(e,["attributes",r.name],{}),i=u(u({},r),{},{fieldSchema:a,metadatas:(0,o.get)(e,["metadatas",r.name,"edit"],{})});if("relation"===a.type){var l=a.targetModel,s=d(l,n).pluginOptions||{},c=t?g(e,r.name,t,n):m(e,r.name,n);(0,o.set)(i,"targetModelPluginOptions",s),(0,o.set)(i,"queryInfos",c)}return i}));return r.push(i),r}),[])};t.formatLayoutWithMetas=f;var p=function(e){return e.layouts.list.reduce((function(t,n){var r=(0,o.get)(e,["attributes",n],{}),a=(0,o.get)(e,["metadatas",n,"list"],{});if("relation"===r.type){var i={endPoint:"collection-types/".concat(e.uid),defaultParams:{}};return t.push({key:"__".concat(n,"_key__"),name:n,fieldSchema:r,metadatas:a,queryInfos:i}),t}return t.push({key:"__".concat(n,"_key__"),name:n,fieldSchema:r,metadatas:a}),t}),[])};t.formatListLayoutWithMetas=p;var m=function(e,t,n){var r=e.uid,a=(0,i.getRequestUrl)("relations/".concat(r,"/").concat(t)),l=(0,o.get)(e,["metadatas",t,"edit","mainField","name"],""),u=(0,o.get)(e,["attributes",t,"targetModel"],""),d=-1!==y(n).indexOf(u);return{endPoint:a,containsKey:"".concat(l),defaultParams:{},shouldDisplayRelationLink:d}};t.generateRelationQueryInfos=m;var g=function(e,t,n,r){var a=(0,i.getRequestUrl)("relations/".concat(n,"/").concat(t)),l=(0,o.get)(e,["metadatas",t,"edit","mainField","name"],""),u=(0,o.get)(e,["attributes",t,"targetModel"],""),d=-1!==y(r).indexOf(u);return{endPoint:a,containsKey:"".concat(l),defaultParams:{_component:e.uid},shouldDisplayRelationLink:d}};t.generateRelationQueryInfosForComponents=g;var y=function(e){return e.filter((function(e){return e.isDisplayed})).map((function(e){return e.uid}))};t.getDisplayedModels=y;var b=function(e,t){var n=c(e,t),r=f(n.contentType,null,t),a=n.contentType.uid,i=s(n.contentType,t),l=p(n.contentType,t);return(0,o.set)(n,["contentType","layouts","edit"],r),(0,o.set)(n,["contentType","layouts","editRelations"],i),(0,o.set)(n,["contentType","layouts","list"],l),Object.keys(n.components).forEach((function(e){var r=f(n.components[e],a,t);(0,o.set)(n,["components",e,"layouts","edit"],r)})),n};t.default=b},2550:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(63038)),o=n(37424),i=n(68547),l=r(n(70869)),u=r(n(25263)),d=function(e){var t=(0,i.useQueryParams)(),n=(0,a.default)(t,1)[0].rawQuery,r=(0,o.useSelector)(l.default);return(0,u.default)(r,e,n)};t.default=d},70869:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){return e["content-manager_app"].collectionTypeLinks};t.default=n},25263:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.mergeParams=t.default=void 0;var a=r(n(59713)),o=n(36232),i=r(n(27361)),l=r(n(13218));function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s=function e(t,n){return Object.keys(t).reduce((function(r,o){var u=t[o],s=(0,i.default)(n,[o],u);return(0,l.default)(u)?d(d({},r),{},(0,a.default)({},o,e(u,s))):(r[o]=s,r)}),{})};t.mergeParams=s;var c=function(e,t,n){var r=e.find((function(e){return e.to.includes(t)}));if(!r)return"/";var a=r.to,i=r.search,l=(0,o.parse)(i),u=(0,o.parse)(n.substring(1)),d=s(l,u);return"".concat(a,"?").concat((0,o.stringify)(d,{encode:!1}))};t.default=c},9196:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(67294),o=r(n(22869)),i=function(){return(0,a.useContext)(o.default)};t.default=i},30995:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(39711),a=n(36232),o=function(){var e=(0,r.useLocation)().search,t=e?(0,a.parse)(e.substring(1)):{};return t.plugins?(0,a.stringify)({plugins:t.plugins},{encode:!1}):""};t.default=o},59974:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setPermissions=t.resetPermissions=void 0;var r=n(14338);t.setPermissions=function(e,t,n){return{type:r.SET_PERMISSIONS,permissions:e,__meta__:{plugins:t,containerName:n}}};t.resetPermissions=function(){return{type:r.RESET_PERMISSIONS}}},30598:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(67294),a=n(37424),o=n(59974),i=n(52169),l=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"listView",l=(0,a.useSelector)(i.selectCollectionTypePermissions),u=(0,a.useSelector)(i.selectPermissions),d=(0,a.useDispatch)(),s=l[t];return(0,r.useEffect)((function(){return s?(d((0,o.setPermissions)(s,e?e.plugins:null,n)),function(){d((0,o.resetPermissions)())}):function(){}}),[s,d,e,n]),u};t.default=l},52169:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectPermissions=t.selectCollectionTypePermissions=void 0;t.selectPermissions=function(e){return e["content-manager_rbacManager"].permissions};t.selectCollectionTypePermissions=function(e){return e.rbacProvider.collectionTypesRelatedPermissions}},32392:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(67294),o=r(n(91896)),i=function(){return(0,a.useContext)(o.default)};t.default=i},40551:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(59713)),i=r(n(63038)),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),u=n(4021),d=n(37424),s=n(97132),c=r(n(63852)),f=r(n(89734)),p=r(n(7334)),m=r(n(36169)),g=n(19763);function y(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=function(e,t){return(0,c.default)(e,(0,p.default)(t),{keys:[function(e){return(0,p.default)(e.title)}]})},E=function(){var e=(0,l.useState)(""),t=(0,i.default)(e,2),n=t[0],r=t[1],a=(0,s.useIntl)().formatMessage,o=(0,l.useMemo)(g.makeSelectModelLinks,[]),c=(0,d.useSelector)((function(e){return o(e)}),d.shallowEqual),p=c.collectionTypeLinks,y=c.singleTypeLinks,b=function(e){return e.map((function(e){return v(v({},e),{},{title:a({id:e.title,defaultMessage:e.title})})}))},E=b(p),O=b(y),w=[{id:"collectionTypes",title:{id:(0,m.default)("components.LeftMenu.collection-types"),defaultMessage:"Collection Types"},searchable:!0,links:(0,f.default)(h(E,n),(function(e){return e.title.toLowerCase()}))},{id:"singleTypes",title:{id:(0,m.default)("components.LeftMenu.single-types"),defaultMessage:"Single Types"},searchable:!0,links:(0,f.default)(h(O,n),(function(e){return e.title.toLowerCase()}))}],M=a({id:(0,m.default)("header.name"),defaultMessage:"Content"});return l.default.createElement(u.SubNav,{ariaLabel:M},l.default.createElement(u.SubNavHeader,{label:M,searchable:!0,value:n,onChange:function(e){var t=e.target.value;r(t)},onClear:function(){r("")},searchLabel:a({id:"content-manager.components.LeftMenu.Search.label",defaultMessage:"Search for a content type"})}),l.default.createElement(u.SubNavSections,null,w.map((function(e){var t=a({id:e.title.id,defaultMessage:e.title.defaultMessage},e.title.values);return l.default.createElement(u.SubNavSection,{key:e.id,label:t,badgeLabel:e.links.length.toString()},e.links.map((function(e){var t=e.search?"?".concat(e.search):"";return l.default.createElement(u.SubNavLink,{key:e.uid,to:"".concat(e.to).concat(t)},e.title)})))}))))};t.default=E},67877:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setContentTypeLinks=t.resetProps=t.getData=void 0;var r=n(54617);t.getData=function(){return{type:r.GET_DATA}};t.resetProps=function(){return{type:r.RESET_PROPS}};t.setContentTypeLinks=function(e,t,n,a){return{type:r.SET_CONTENT_TYPE_LINKS,data:{authorizedCtLinks:e,authorizedStLinks:t,components:a,contentTypeSchemas:n}}}},45161:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.App=void 0;var a=r(n(319)),o=r(n(67294)),i=n(15482),l=n(39711),u=n(68547),d=n(78862),s=n(62031),c=n(97132),f=r(n(89734)),p=r(n(13240)),m=r(n(36169)),g=r(n(5969)),y=r(n(66973)),b=r(n(79396)),v=r(n(25195)),h=r(n(65639)),E=r(n(20755)),O=r(n(88468)),w=r(n(40551)),M=r(n(3267)),j=p.default.contentManager,P=function(){var e=(0,l.useRouteMatch)("/content-manager/:kind/:uid"),t=(0,M.default)(),n=t.status,r=t.collectionTypeLinks,i=t.singleTypeLinks,p=t.models,P=t.refetchData,C=(0,f.default)([].concat((0,a.default)(r),(0,a.default)(i)),(function(e){return e.title.toLowerCase()})),k=(0,l.useLocation)().pathname,_=(0,c.useIntl)().formatMessage;if("loading"===n)return o.default.createElement(s.Main,{"aria-busy":"true"},o.default.createElement(d.HeaderLayout,{title:_({id:(0,m.default)("header.name"),defaultMessage:"Content"})}),o.default.createElement(u.LoadingIndicatorPage,null));var R=p.filter((function(e){return e.isDisplayed}));return 0===C.length&&R.length>0&&"/content-manager/403"!==k?o.default.createElement(l.Redirect,{to:"/content-manager/403"}):0===R.length&&"/content-manager/no-content-types"!==k?o.default.createElement(l.Redirect,{to:"/content-manager/no-content-types"}):!e&&C.length>0?o.default.createElement(l.Redirect,{to:"".concat(C[0].to).concat(C[0].search?"?".concat(C[0].search):"")}):o.default.createElement(d.Layout,{sideNav:o.default.createElement(w.default,null)},o.default.createElement(g.default,null),o.default.createElement(y.default.Provider,{value:{refetchData:P}},o.default.createElement(l.Switch,null,o.default.createElement(l.Route,{path:"/content-manager/components/:uid/configurations/edit"},o.default.createElement(u.CheckPagePermissions,{permissions:j.componentsConfigurations},o.default.createElement(v.default,null))),o.default.createElement(l.Route,{path:"/content-manager/collectionType/:slug",component:b.default}),o.default.createElement(l.Route,{path:"/content-manager/singleType/:slug",component:O.default}),o.default.createElement(l.Route,{path:"/content-manager/403"},o.default.createElement(E.default,null)),o.default.createElement(l.Route,{path:"/content-manager/no-content-types"},o.default.createElement(h.default,null)),o.default.createElement(l.Route,{path:"",component:u.NotFound}))))};t.App=P;t.default=function(){var e=(0,c.useIntl)().formatMessage;return o.default.createElement(o.default.Fragment,null,o.default.createElement(i.Helmet,{title:e({id:(0,m.default)("plugin.name"),defaultMessage:"Content Manager"})}),o.default.createElement(P,null))}},19763:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.selectAppDomain=t.makeSelectModels=t.makeSelectModelLinks=t.makeSelectModelAndComponentSchemas=t.default=void 0;var a=r(n(319)),o=n(42279),i=n(6446),l=function(){return function(e){return e["content-manager_app"]||i.initialState}};t.selectAppDomain=l;t.makeSelectModels=function(){return(0,o.createSelector)(l(),(function(e){return e.models}))};t.makeSelectModelLinks=function(){return(0,o.createSelector)(l(),(function(e){return{collectionTypeLinks:e.collectionTypeLinks,singleTypeLinks:e.singleTypeLinks}}))};t.makeSelectModelAndComponentSchemas=function(){return(0,o.createSelector)(l(),(function(e){var t=e.components,n=e.models;return{schemas:[].concat((0,a.default)(t),(0,a.default)(n))}}))};var u=function(){return(0,o.createSelector)(l(),(function(e){return e}))};t.default=u},3267:(e,t,n)=>{"use strict";var r=n(25108),a=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(87757)),i=a(n(59713)),l=a(n(63038)),u=a(n(48926)),d=n(68547),s=n(67294),c=n(37424),f=n(84686),p=a(n(9669)),m=n(97132),g=n(53777),y=n(29499),b=n(28564),v=n(67877),h=n(19763),E=a(n(26036));function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M=function(){var e=(0,c.useDispatch)(),t=(0,d.useNotification)(),n=(0,c.useSelector)((0,h.selectAppDomain)()),a=(0,s.useRef)(),i=(0,d.useRBACProvider)().allPermissions,O=(0,d.useStrapiApp)().runHookWaterfall,M=p.default.CancelToken.source(),j=(0,f.useNotifyAT)().notifyStatus,P=(0,m.useIntl)().formatMessage,C=function(){var n=(0,u.default)(o.default.mark((function n(){var a,u,d,s,c,f,m,h,w,C,k,_;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e((0,v.getData)()),n.prev=1,n.next=4,Promise.all(["components","content-types"].map((function(e){return g.axiosInstance.get((0,b.getRequestUrl)(e),{cancelToken:M.token})})));case 4:return a=n.sent,u=(0,l.default)(a,2),d=u[0].data.data,s=u[1].data.data,j(P({id:(0,b.getTrad)("App.schemas.data-loaded"),defaultMessage:"The schemas have been successfully loaded."})),n.next=11,(0,E.default)(s,i,t);case 11:c=n.sent,f=c.authorizedCtLinks,m=c.authorizedStLinks,h=O(y.MUTATE_COLLECTION_TYPES_LINKS,{ctLinks:f,models:s}),w=h.ctLinks,C=O(y.MUTATE_SINGLE_TYPES_LINKS,{stLinks:m,models:s}),k=C.stLinks,_=(0,v.setContentTypeLinks)(w,k,s,d),e(_),n.next=26;break;case 20:if(n.prev=20,n.t0=n.catch(1),!p.default.isCancel(n.t0)){n.next=24;break}return n.abrupt("return");case 24:r.error(n.t0),t({type:"warning",message:{id:"notification.error"}});case 26:case"end":return n.stop()}}),n,null,[[1,20]])})));return function(){return n.apply(this,arguments)}}();return a.current=C,(0,s.useEffect)((function(){return a.current(),function(){M.cancel("Operation canceled by the user."),e((0,v.resetProps)())}}),[e,t]),w(w({},n),{},{refetchData:a.current})};t.default=M},75274:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(68547),a=function(e,t){return t.map((function(t){var n=t.permissions;return(0,r.hasPermissions)(e,n)}))};t.default=a},98891:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.generateLinks=t.default=void 0;var a=r(n(63038)),o=n(96486),i=n(36232),l=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return e.filter((function(e){return e.isDisplayed})).map((function(e){var r=[{action:"plugin::content-manager.explorer.create",subject:e.uid},{action:"plugin::content-manager.explorer.read",subject:e.uid}],a=[{action:"plugin::content-manager.explorer.read",subject:e.uid}],o="collectionTypes"===t?r:a,l=n.find((function(t){return t.uid===e.uid})),u=null;if(l){var d={page:1,pageSize:l.settings.pageSize,sort:"".concat(l.settings.defaultSortBy,":").concat(l.settings.defaultSortOrder)};u=(0,i.stringify)(d,{encode:!1})}return{permissions:o,search:u,kind:e.kind,title:e.info.displayName,to:"/content-manager/".concat(e.kind,"/").concat(e.uid),uid:e.uid,name:e.uid,isDisplayed:e.isDisplayed}}))};t.generateLinks=l;var u=function(e,t){var n=(0,o.chain)(e).groupBy("kind").map((function(e,t){return{name:t,links:e}})).sortBy("name").value(),r=(0,a.default)(n,2),i=r[0],u=r[1];return{collectionTypesSectionLinks:l((0,o.get)(i,"links",[]),"collectionTypes",t),singleTypesSectionLinks:l((0,o.get)(u,"links",[]),"singleTypes")}};t.default=u},26036:(e,t,n)=>{"use strict";var r=n(25108),a=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(87757)),i=a(n(48926)),l=n(53777),u=a(n(98891)),d=a(n(75274)),s=n(28564),c=function(){var e=(0,i.default)(o.default.mark((function e(t,n,a){var i,c,f,p,m,g,y,b,v,h,E;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,l.axiosInstance.get((0,s.getRequestUrl)("content-types-settings"));case 3:return i=e.sent,c=i.data.data,f=(0,u.default)(t,c),p=f.collectionTypesSectionLinks,m=f.singleTypesSectionLinks,g=(0,d.default)(n,p),e.next=9,Promise.all(g);case 9:return y=e.sent,b=p.filter((function(e,t){return y[t]})),v=(0,d.default)(n,m),e.next=14,Promise.all(v);case 14:return h=e.sent,E=m.filter((function(e,t){return h[t]})),e.abrupt("return",{authorizedCtLinks:b,authorizedStLinks:E});case 19:return e.prev=19,e.t0=e.catch(0),r.error(e.t0),a({type:"warning",message:{id:"notification.error"}}),e.abrupt("return",{authorizedCtLinks:[],authorizedStLinks:[],contentTypes:[]});case 24:case"end":return e.stop()}}),e,null,[[0,19]])})));return function(t,n,r){return e.apply(this,arguments)}}();t.default=c},79396:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),i=n(39711),l=n(66730),u=n(96486),d=r(n(45697)),s=n(68547),c=r(n(13240)),f=n(42688),p=n(14772),m=n(28564),g=r(n(11427)),y=r(n(40224)),b=r(n(9017)),v=r(n(41540));function h(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}var E=c.default.contentManager,O=function(e){var t=e.match,n=t.params.slug,r=t.url,a=(0,p.useFetchContentTypeLayout)(n),d=a.isLoading,c=a.layout,h=a.updateLayout,O=(0,o.useMemo)((function(){var e={},t={};return c.contentType&&(e=(0,m.formatLayoutToApi)(c.contentType)),c.components&&(t=Object.keys(c.components).reduce((function(e,t){return e[t]=(0,m.formatLayoutToApi)(c.components[t]),e}),{})),{rawContentTypeLayout:e,rawComponentsLayouts:t}}),[c]),w=O.rawContentTypeLayout,M=O.rawComponentsLayouts;if((0,u.get)(c,["contentType","uid"],null)!==n||d)return o.default.createElement(s.LoadingIndicatorPage,null);var j=[{path:"create/clone/:origin",comp:g.default},{path:"create",comp:g.default},{path:":id",comp:g.default},{path:"",comp:b.default}].map((function(e){var t=e.path,a=e.comp;return o.default.createElement(i.Route,{key:t,path:"".concat(r,"/").concat(t),render:function(e){return function(e,t){var r=e.location.state,a=e.history.goBack,i=e.match.params,l=i.id,u=i.origin;return o.default.createElement(t,{slug:n,layout:c,state:r,goBack:a,id:l,origin:u})}(e,a)}})}));return o.default.createElement(l.ErrorBoundary,{FallbackComponent:s.ErrorFallback},o.default.createElement(f.ContentTypeLayoutContext.Provider,{value:c},o.default.createElement(i.Switch,null,o.default.createElement(i.Route,{path:"".concat(r,"/configurations/list")},o.default.createElement(s.CheckPagePermissions,{permissions:E.collectionTypesConfigurations},o.default.createElement(v.default,{layout:w,slug:n,updateLayout:h}))),o.default.createElement(i.Route,{path:"".concat(r,"/configurations/edit")},o.default.createElement(s.CheckPagePermissions,{permissions:E.collectionTypesConfigurations},o.default.createElement(y.default,{components:M,isContentTypeView:!0,mainLayout:w,slug:n,updateLayout:h}))),j)))};O.propTypes={match:d.default.shape({url:d.default.string.isRequired,params:d.default.shape({slug:d.default.string.isRequired}).isRequired}).isRequired};var w=(0,o.memo)(O);t.default=w},25195:(e,t,n)=>{"use strict";var r=n(25108),a=n(95318),o=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(n(87757)),l=a(n(48926)),u=a(n(63038)),d=w(n(67294)),s=n(39711),c=n(68547),f=n(37424),p=a(n(9669)),m=n(53777),g=n(28564),y=n(19763),b=a(n(13240)),v=w(n(62476)),h=n(98744),E=a(n(40224));function O(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(O=function(e){return e?n:t})(e)}function w(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!==typeof e)return{default:e};var n=O(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}var M=b.default.contentManager,j=function(){var e=(0,d.useReducer)(v.default,v.crudInitialState),t=(0,u.default)(e,2),n=t[0],a=n.isLoading,o=n.data,b=t[1],O=(0,d.useMemo)(y.makeSelectModelAndComponentSchemas,[]),w=(0,f.useSelector)((function(e){return O(e)}),f.shallowEqual).schemas,j=(0,s.useParams)().uid;return(0,d.useEffect)((function(){var e=p.default.CancelToken.source(),t=function(){var e=(0,l.default)(i.default.mark((function e(t){var n,a;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,b((0,h.getData)()),e.next=4,m.axiosInstance.get((0,g.getRequestUrl)("components/".concat(j,"/configuration")),{cancelToken:t.token});case 4:n=e.sent,a=n.data.data,b((0,h.getDataSucceeded)((0,g.mergeMetasWithSchema)(a,w,"component"))),e.next=14;break;case 9:if(e.prev=9,e.t0=e.catch(0),!p.default.isCancel(e.t0)){e.next=13;break}return e.abrupt("return");case 13:r.error(e.t0);case 14:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}();return t(e),function(){e.cancel("Operation canceled by the user.")}}),[j,w]),a?d.default.createElement(c.LoadingIndicatorPage,null):d.default.createElement(c.CheckPagePermissions,{permissions:M.componentsConfigurations},d.default.createElement(E.default,{components:o.components,mainLayout:o.component,slug:j}))},P=(0,d.memo)(j);t.default=P},65067:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=n(5493),l=n(67826),u=n(85104),d=n(49425),s=r(n(70736)),c=n(97132),f=r(n(27361)),p=n(34626),m=r(n(9196)),g=r(n(36169)),y=function(e){var t=e.componentUid,n=(0,m.default)().componentLayouts,r=(0,c.useIntl)().formatMessage,o=(0,f.default)(n,[t],{}),y=(0,f.default)(o,["layouts","edit"],[]);return a.default.createElement(i.Box,{padding:3},y.map((function(e,t){return a.default.createElement(p.Grid,{gap:4,key:t},e.map((function(e){return a.default.createElement(p.GridItem,{key:e.name,col:e.size},a.default.createElement(i.Box,{paddingTop:2},a.default.createElement(l.Flex,{alignItems:"center",background:"neutral0",paddingLeft:3,paddingRight:3,height:"".concat(2,"rem"),hasRadius:!0,borderColor:"neutral200"},a.default.createElement(d.Typography,{textColor:"neutral800"},e.name))))})))})),a.default.createElement(i.Box,{paddingTop:2},a.default.createElement(u.Link,{startIcon:a.default.createElement(s.default,null),to:"/content-manager/components/".concat(t,"/configurations/edit")},r({id:(0,g.default)("components.FieldItem.linkToComponentLayout"),defaultMessage:"Set the component's layout"}))))};y.propTypes={componentUid:o.default.string.isRequired};var b=y;t.default=b},73566:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(63038)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),l=r(n(78384)),u=r(n(45697)),d=n(99168),s=n(61080),c=n(67826),f=n(5493),p=n(34626),m=r(n(88049)),g=n(28564),y=r(n(95684)),b=n(14772);function v(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}var h=(0,l.default)(c.Flex).withConfig({displayName:"DisplayedFieldButton__Wrapper",componentId:"sc-19kzwqt-0"})(["position:relative;"," ",";"],(function(e){var t=e.isFirst,n=e.isLast,r=e.hasHorizontalPadding;return t?"\n        padding-right: 4px;\n      ":n?"\n        padding-left: 4px;\n      ":r?"\n        padding: 0 4px;\n      ":""}),(function(e){var t=e.showRightCarret,n=e.showLeftCarret,r=e.theme;return t?"\n        &:after {\n          content: '';\n          position: absolute;\n          right: -1px;\n          background-color: ".concat(r.colors.primary600,";\n          width: 2px;\n          height: 100%;\n          align-self: stretch;\n          z-index: 1;\n        }\n      "):n?"\n        &:before {\n          content: '';\n          position: absolute;\n          left: -1px;\n          background-color: ".concat(r.colors.primary600,";\n          width: 2px;\n          height: 100%;\n          align-self: stretch;\n          z-index: 1;\n        }\n      "):""})),E=(0,l.default)(m.default).withConfig({displayName:"DisplayedFieldButton__CustomDragIcon",componentId:"sc-19kzwqt-1"})(["height:","rem;width:","rem;path{fill:",";}"],.75,.75,(function(e){return e.theme.colors.neutral600})),O=(0,l.default)(c.Flex).withConfig({displayName:"DisplayedFieldButton__CustomFlex",componentId:"sc-19kzwqt-2"})(["display:",";opacity:",";"],(function(e){return e.dragStart?"none":"flex"}),(function(e){var t=e.isDragging,n=e.isFullSize,r=e.isHidden;return t&&!n?.2:t&&n||r?0:1})),w=(0,l.default)(c.Flex).withConfig({displayName:"DisplayedFieldButton__DragButton",componentId:"sc-19kzwqt-3"})(["cursor:all-scroll;border-right:1px solid ",";"],(function(e){return e.theme.colors.neutral200})),M=function(e){var t=e.attribute,n=e.children,r=e.index,a=e.lastIndex,l=e.moveItem,u=e.moveRow,c=e.name,m=e.onDeleteField,v=e.onEditField,M=e.rowIndex,j=e.size,P=(0,i.useState)(!1),C=(0,o.default)(P,2),k=C[0],_=C[1],R="_TEMP_"===c,T=(0,b.useLayoutDnd)().setIsDraggingSibling,x=12===j,D=(0,i.useRef)(null),S=(0,i.useRef)(null),I=(0,d.useDrop)({accept:g.ItemTypes.EDIT_FIELD,hover:function(e,t){if(S.current&&12===e.size){var n=t.getItem().index,a=r,o=t.getItem().rowIndex,i=M;if(n!==a||o!==i){var l=S.current.getBoundingClientRect(),d=(l.bottom-l.top)/2,s=t.getClientOffset().y-l.top;o<i&&s<d||o>i&&s>d||(u(o,i),e.rowIndex=i,e.itemIndex=a)}}},drop:function(e,t){if(S.current){var n=t.getItem().index,a=r,o=t.getItem().rowIndex,i=M;if(12!==e.size&&(n!==a||o!==i)){var u=S.current.getBoundingClientRect();if(Math.abs(t.getClientOffset().x-u.left)>u.width/1.8)return l(n,a+1,o,i),e.itemIndex=a+1,void(e.rowIndex=i);l(n,a,o,i),e.itemIndex=a,e.rowIndex=i}}},collect:function(e){return{canDrop:e.canDrop(),clientOffset:e.getClientOffset(),isOver:e.isOver(),isOverCurrent:e.isOver({shallow:!0}),itemType:e.getItemType()}}}),q=(0,o.default)(I,2),F=q[0],L=F.clientOffset,A=F.isOver,B=q[1],N=(0,d.useDrag)({type:g.ItemTypes.EDIT_FIELD,item:function(){return T(!0),{index:r,labelField:n,rowIndex:M,name:c,size:j}},canDrag:function(){return"_TEMP_"!==c},collect:function(e){return{isDragging:e.isDragging(),getItem:e.getItem()}},end:function(){T(!1)}}),W=(0,o.default)(N,3),z=W[0],U=z.isDragging,V=z.getItem,H=W[1],G=W[2];(0,i.useEffect)((function(){G((0,s.getEmptyImage)(),{captureDraggingState:!0})}),[G]);var Z={dragRef:H(D),dropRef:B(S)},$=!1,Q=!1;if(S.current&&L){var Y=S.current.getBoundingClientRect();$=A&&12!==V.size&&Math.abs(L.x-Y.left)<Y.width/2,Q=A&&12!==V.size&&Math.abs(L.x-Y.left)>Y.width/2,"_TEMP_"===c&&($=A&&12!==V.size,Q=!1)}var J=0===r&&!x,K=r===a&&!x,X=0!==r&&!x;return i.default.createElement(p.GridItem,{col:j},i.default.createElement(h,{ref:Z.dropRef,showLeftCarret:$,showRightCarret:Q,isFirst:J,isLast:K,hasHorizontalPadding:X,onDrag:function(){x&&!k&&_(!0)},onDragEnd:function(){x&&_(!1)}},k&&x&&i.default.createElement(f.Box,{width:"100%",height:"2px",background:"primary600"}),i.default.createElement(O,{width:x&&k?0:"100%",borderColor:"neutral150",hasRadius:!0,background:"neutral100",minHeight:"".concat(t&&x?4.625:2,"rem"),alignItems:"stretch",isDragging:U,dragStart:k,isFullSize:x,isHidden:R},i.default.createElement(w,{as:"span",type:"button",ref:Z.dragRef,onClick:function(e){return e.stopPropagation()},alignItems:"center",paddingLeft:3,paddingRight:3,tabIndex:-1},i.default.createElement(E,null)),!R&&i.default.createElement(y.default,{attribute:t,onEditField:v,onDeleteField:m},n))))};M.defaultProps={attribute:void 0},M.propTypes={attribute:u.default.shape({components:u.default.array,component:u.default.string,type:u.default.string}),children:u.default.string.isRequired,index:u.default.number.isRequired,moveItem:u.default.func.isRequired,moveRow:u.default.func.isRequired,name:u.default.string.isRequired,onDeleteField:u.default.func.isRequired,onEditField:u.default.func.isRequired,rowIndex:u.default.number.isRequired,lastIndex:u.default.number.isRequired,size:u.default.number.isRequired};var j=M;t.default=j},66650:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=n(97132),l=n(19408),u=n(5493),d=n(49425),s=n(9008),c=n(67826),f=n(33097),p=r(n(80768)),m=n(28564),g=r(n(79075)),y=r(n(20519)),b=function(e){var t=e.editLayout,n=e.editLayoutRemainingFields,r=e.onRemoveField,o=e.onAddField,b=(0,i.useIntl)().formatMessage;return a.default.createElement(s.Stack,{size:4},a.default.createElement(c.Flex,{justifyContent:"space-between"},a.default.createElement("div",null,a.default.createElement(u.Box,null,a.default.createElement(d.Typography,{fontWeight:"bold"},b({id:(0,m.getTrad)("containers.ListPage.displayedFields"),defaultMessage:"Displayed fields"}))),a.default.createElement(u.Box,null,a.default.createElement(d.Typography,{variant:"pi",textColor:"neutral600"},b({id:"containers.SettingPage.editSettings.description",defaultMessage:"Drag & drop the fields to build the layout"})))),a.default.createElement(y.default,null)),a.default.createElement(u.Box,{padding:4,hasRadius:!0,borderStyle:"dashed",borderWidth:"1px",borderColor:"neutral300"},a.default.createElement(s.Stack,{size:2},t.map((function(e,t){return a.default.createElement(g.default,{key:e.rowId,row:e,rowIndex:t,onRemoveField:r})})),a.default.createElement(f.SimpleMenu,{id:"label",label:b({id:(0,m.getTrad)("containers.SettingPage.add.field"),defaultMessage:"Insert another field"}),as:l.Button,"data-testid":"add-field",fullWidth:!0,startIcon:a.default.createElement(p.default,null),endIcon:null,variant:"secondary",disabled:0===n.length},n.map((function(e){return a.default.createElement(f.MenuItem,{key:e,onClick:function(){return o(e)}},e)}))))))};b.propTypes={editLayout:o.default.array.isRequired,editLayoutRemainingFields:o.default.array.isRequired,onAddField:o.default.func.isRequired,onRemoveField:o.default.func.isRequired};var v=b;t.default=v},19039:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(27361)),i=r(n(45697)),l=n(67826),u=n(49425),d=n(5493),s=n(9008),c=n(67814),f=r(n(78384)),p=n(39711),m=r(n(9196)),g=(0,f.default)(l.Flex).withConfig({displayName:"DynamicZoneList__CustomFlex",componentId:"sc-1v54jae-0"})(["border-radius:50%;svg{& > *{fill:",";}width:12px;height:12px;}"],(function(e){return e.theme.colors.neutral500})),y=(0,f.default)(l.Flex).withConfig({displayName:"DynamicZoneList__CustomLink",componentId:"sc-1v54jae-1"})(["text-decoration:none;&:hover{","}"],(function(e){var t=e.theme;return"\n      background: ".concat(t.colors.primary100,";\n      svg {\n        & > * {\n          fill: ").concat(t.colors.primary600,";\n        }\n      }\n      ").concat(u.Typography," {\n          color: ").concat(t.colors.primary600,";\n      }\n      ").concat(g," {\n        background: ").concat(t.colors.primary200,";\n      }\n      border-color: ").concat(t.colors.primary200,";\n    ")})),b=function(e){var t=e.components,n=(0,m.default)().componentLayouts;return a.default.createElement(s.Stack,{size:2,horizontal:!0,overflow:"scroll hidden",padding:3},t.map((function(e){return a.default.createElement(y,{hasRadius:!0,background:"neutral0",justifyContent:"center",alignItems:"center",height:"".concat(5.25,"rem"),minWidth:"".concat(8.75,"rem"),key:e,padding:2,direction:"column",borderColor:"neutral200",as:p.Link,to:"/content-manager/components/".concat(e,"/configurations/edit")},a.default.createElement(g,{width:"".concat(2,"rem"),height:"".concat(2,"rem"),background:"neutral150",justifyContent:"center",alignItems:"center",padding:2},a.default.createElement(c.FontAwesomeIcon,{icon:(0,o.default)(n,[e,"info","icon"],"")})),a.default.createElement(d.Box,{paddingTop:1},a.default.createElement(u.Typography,{fontSize:1,textColor:"neutral600",fontWeight:"bold"},(0,o.default)(n,[e,"info","displayName"],""))))})))};b.propTypes={components:i.default.arrayOf(i.default.string).isRequired};var v=b;t.default=v},95684:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(78384)),i=r(n(45697)),l=n(97132),u=n(5493),d=n(67826),s=n(30741),c=n(49425),f=r(n(19352)),p=r(n(18568)),m=n(28564),g=r(n(65067)),y=r(n(19039)),b=(0,o.default)(s.IconButton).withConfig({displayName:"FieldButtonContent__CustomIconButton",componentId:"sc-fps4fp-0"})(["background-color:transparent;path{fill:",";}"],(function(e){return e.theme.colors.neutral600})),v=function(e){var t=e.attribute,n=e.onEditField,r=e.onDeleteField,o=e.children,i=(0,l.useIntl)().formatMessage;return a.default.createElement(u.Box,{overflow:"hidden",width:"100%"},a.default.createElement(d.Flex,{paddingLeft:3,alignItems:"center",justifyContent:"space-between"},a.default.createElement(c.Typography,{fontWeight:"semiBold",textColor:"neutral800",ellipsis:!0},o),a.default.createElement(d.Flex,null,a.default.createElement(b,{label:i({id:(0,m.getTrad)("containers.ListSettingsView.modal-form.edit-label"),defaultMessage:"Edit {fieldName}"},{fieldName:o}),onClick:n,icon:a.default.createElement(f.default,null),noBorder:!0}),a.default.createElement(b,{label:i({id:(0,m.getTrad)("app.component.table.delete"),defaultMessage:"Delete {target}"},{target:o}),"data-testid":"delete-field",onClick:r,icon:a.default.createElement(p.default,null),noBorder:!0}))),"component"===(null===t||void 0===t?void 0:t.type)&&a.default.createElement(g.default,{componentUid:t.component}),"dynamiczone"===(null===t||void 0===t?void 0:t.type)&&a.default.createElement(y.default,{components:t.components}))};v.defaultProps={attribute:void 0},v.propTypes={attribute:i.default.shape({components:i.default.array,component:i.default.string,type:i.default.string}),onEditField:i.default.func.isRequired,onDeleteField:i.default.func.isRequired,children:i.default.string.isRequired};var h=v;t.default=h},71667:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=n(97132),l=r(n(11700)),u=n(75146),d=n(49425),s=n(19408),c=n(67826),f=n(34626),p=r(n(78384)),m=n(28564),g=n(14772),y=r(n(74373)),b=r(n(75007)),v=(0,p.default)(c.Flex).withConfig({displayName:"FormModal__HeaderContainer",componentId:"sc-jabfhd-0"})(["svg{width:","rem;height:","rem;margin-right:",";}"],2,1.5,(function(e){return e.theme.spaces[3]})),h=function(e){var t=e.onToggle,n=e.onMetaChange,r=e.onSizeChange,o=e.onSubmit,c=e.type,p=(0,g.useLayoutDnd)().selectedField,h=(0,i.useIntl)().formatMessage;return a.default.createElement(u.ModalLayout,{onClose:t,labelledBy:"title"},a.default.createElement("form",{onSubmit:o},a.default.createElement(u.ModalHeader,null,a.default.createElement(v,null,a.default.createElement(y.default,{type:"timestamp"===c?"date":["decimal","float","integer","biginter"].includes(c)?"number":c}),a.default.createElement(d.Typography,{fontWeight:"bold",textColor:"neutral800",as:"h2",id:"title"},h({id:(0,m.getTrad)("containers.ListSettingsView.modal-form.edit-label"),defaultMessage:"Edit {fieldName}"},{fieldName:(0,l.default)(p)})))),a.default.createElement(u.ModalBody,null,a.default.createElement(f.Grid,{gap:4},a.default.createElement(b.default,{onMetaChange:n,onSizeChange:r}))),a.default.createElement(u.ModalFooter,{startActions:a.default.createElement(s.Button,{onClick:t,variant:"tertiary"},h({id:"app.components.Button.cancel",defaultMessage:"Cancel"})),endActions:a.default.createElement(s.Button,{type:"submit"},h({id:"form.button.finish",defaultMessage:"Finish"}))})))};h.propTypes={onSubmit:o.default.func.isRequired,onToggle:o.default.func.isRequired,onMetaChange:o.default.func.isRequired,onSizeChange:o.default.func.isRequired,type:o.default.string.isRequired};var E=h;t.default=E},88544:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67154)),o=r(n(6479)),i=r(n(67294)),l=r(n(45697)),u=n(55967),d=n(47857),s=n(43808),c=n(97132),f=["type","options","onChange","value","name"],p=function(e){var t=e.type,n=e.options,r=e.onChange,l=e.value,p=e.name,m=(0,o.default)(e,f),g=(0,c.useIntl)().formatMessage;switch(t){case"text":return i.default.createElement(u.TextInput,(0,a.default)({onChange:r,value:l,name:p},m));case"bool":return i.default.createElement(d.ToggleInput,(0,a.default)({onChange:function(e){r({target:{name:p,value:e.target.checked}})},checked:l,name:p,onLabel:g({id:"app.components.ToggleCheckbox.on-label",defaultMessage:"On"}),offLabel:g({id:"app.components.ToggleCheckbox.off-label",defaultMessage:"Off"})},m));case"select":return i.default.createElement(s.Select,(0,a.default)({value:l,name:p,onChange:function(e){return r({target:{name:p,value:e}})}},m),n.map((function(e){return i.default.createElement(s.Option,{key:e,value:e},e)})));default:return null}};p.defaultProps={options:void 0},p.propTypes={type:l.default.string.isRequired,options:l.default.arrayOf(l.default.string),onChange:l.default.func.isRequired,value:l.default.oneOfType([l.default.string,l.default.bool]).isRequired,name:l.default.string.isRequired};var m=p;t.default=m},20519:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=n(68547),i=n(97132),l=r(n(27361)),u=n(60985),d=r(n(19352)),s=r(n(36169)),c=r(n(9196)),f=[{action:"plugin::content-type-builder.read",subject:null}],p=function(){var e=(0,o.useTracking)().trackUsage,t=(0,i.useIntl)().formatMessage,n=(0,c.default)(),r=n.slug,p=n.modifiedData,m=n.isContentTypeView?"content-types":"components",g="/plugins/content-type-builder/".concat("content-types"===m?m:"component-categories"),y=(0,l.default)(p,"category",""),b="content-types"===m?r:"".concat(y,"/").concat(r);return"strapi::administrator"===r?null:a.default.createElement(o.CheckPermissions,{permissions:f},a.default.createElement(u.LinkButton,{to:"".concat(g,"/").concat(b),onClick:function(){e("willEditEditLayout")},size:"S",startIcon:a.default.createElement(d.default,null),variant:"secondary"},t({id:(0,s.default)("edit-settings-view.link-to-ctb.".concat(m)),defaultMessage:"Edit the content type"})))};t.default=p},75007:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(63038)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),l=r(n(45697)),u=r(n(27361)),d=n(34626),s=n(43808),c=n(37424),f=n(97132),p=n(14772),m=n(13107),g=n(19763),y=r(n(36169)),b=r(n(88544));function v(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}var h=[[4,"33%"],[6,"50%"],[8,"66%"],[12,"100%"]],E=["dynamiczone","component","json","richtext"],O=function(e){var t=e.onMetaChange,n=e.onSizeChange,r=(0,f.useIntl)().formatMessage,a=(0,p.useLayoutDnd)(),l=a.modifiedData,v=a.selectedField,O=a.attributes,w=a.fieldForm,M=(0,i.useMemo)(g.makeSelectModelAndComponentSchemas,[]),j=(0,c.useSelector)((function(e){return M(e)}),c.shallowEqual).schemas,P=(0,i.useMemo)((function(){if(!v)return[];var e=(0,u.default)(l,["metadatas",v,"edit"],{});return Object.keys(e).filter((function(e){return"visible"!==e}))}),[v,l]),C=(0,i.useMemo)((function(){return(0,m.createPossibleMainFieldsForModelsAndComponents)(j)}),[j]),k=(0,i.useCallback)((function(e){if("relation"!==e&&"component"!==e)return[];var t="component"===e?"component":"targetModel",n=(0,u.default)(l,["attributes",v,t],"");return(0,u.default)(C,[n],[])}),[v,C,l]),_=P.map((function(e){var n=(0,u.default)(O,[v,"type"]);return"dynamiczone"===n||"component"===n&&!["label","description"].includes(e)||"component"===n&&"label"!==e||["media","json","boolean"].includes(n)&&"placeholder"===e?null:i.default.createElement(d.GridItem,{col:6,key:e},i.default.createElement(b.default,{type:(0,m.getInputProps)(e).type,hint:"mainField"===e?r({id:(0,y.default)("containers.SettingPage.editSettings.relation-field.description")}):"",label:r({id:(0,u.default)((0,m.getInputProps)(e),"label.id","app.utils.defaultMessage")}),name:e,onChange:t,value:(0,u.default)(w,["metadata",e],""),options:k(n)}))})),R=!E.includes(O[v].type),T=i.default.createElement(d.GridItem,{col:6,key:"size"},i.default.createElement(s.Select,{value:null===w||void 0===w?void 0:w.size,name:"size",onChange:function(e){n({name:v,value:e})},label:r({id:(0,y.default)("containers.SettingPage.editSettings.size.label"),defaultMessage:"Size"})},h.map((function(e){var t=(0,o.default)(e,2),n=t[0],r=t[1];return i.default.createElement(s.Option,{key:n,value:n},r)}))));return i.default.createElement(i.default.Fragment,null,_,R&&T)};O.propTypes={onMetaChange:l.default.func.isRequired,onSizeChange:l.default.func.isRequired};var w=O;t.default=w},50225:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(63038)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),l=r(n(78384)),u=r(n(45697)),d=n(99168),s=n(61080),c=n(67826),f=r(n(88049)),p=n(28564),m=r(n(95684));function g(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}var y=(0,l.default)(f.default).withConfig({displayName:"RelationalFieldButton__CustomDragIcon",componentId:"sc-1fz9b02-0"})(["height:","rem;width:","rem;path{fill:",";}"],.75,.75,(function(e){return e.theme.colors.neutral600})),b=(0,l.default)(c.Flex).withConfig({displayName:"RelationalFieldButton__CustomFlex",componentId:"sc-1fz9b02-1"})(["opacity:",";"],(function(e){return e.isDragging?0:1})),v=(0,l.default)(c.Flex).withConfig({displayName:"RelationalFieldButton__DragButton",componentId:"sc-1fz9b02-2"})(["cursor:all-scroll;border-right:1px solid ",";"],(function(e){return e.theme.colors.neutral200})),h=function(e){var t=e.attribute,n=e.onEditField,r=e.onDeleteField,a=e.children,l=e.index,u=e.name,c=e.onMoveField,f=(0,i.useRef)(),g=(0,d.useDrop)({accept:p.ItemTypes.EDIT_RELATION,hover:function(e){if(f.current){var t=e.index,n=l;t!==n&&(c(t,n),e.index=n)}}}),h=(0,o.default)(g,2)[1],E=(0,d.useDrag)({type:p.ItemTypes.EDIT_RELATION,item:function(){return{index:l,labelField:a,name:u}},collect:function(e){return{isDragging:e.isDragging()}}}),O=(0,o.default)(E,3),w=O[0].isDragging,M=O[1],j=O[2];(0,i.useEffect)((function(){j((0,s.getEmptyImage)(),{captureDraggingState:!0})}),[j]),M(h(f));return i.default.createElement(b,{width:"100%",borderColor:"neutral150",hasRadius:!0,background:"neutral100",minHeight:t&&["json","text","file","media","component","richtext","dynamiczone"].includes(t.type)?"".concat(4.625,"rem"):"".concat(2,"rem"),alignItems:"stretch",isDragging:w},i.default.createElement(v,{as:"span",type:"button",ref:f,onClick:function(e){return e.stopPropagation()},alignItems:"center",paddingLeft:3,paddingRight:3,tabIndex:-1},i.default.createElement(y,null)),i.default.createElement(m.default,{attribute:t,onEditField:n,onDeleteField:r},a))};h.defaultProps={attribute:void 0},h.propTypes={attribute:u.default.shape({components:u.default.array,component:u.default.string,type:u.default.string}),onEditField:u.default.func.isRequired,onDeleteField:u.default.func.isRequired,children:u.default.string.isRequired,index:u.default.number.isRequired,name:u.default.string.isRequired,onMoveField:u.default.func.isRequired};var E=h;t.default=E},8010:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=r(n(27361)),l=n(97132),u=n(19408),d=n(5493),s=n(49425),c=n(9008),f=n(33097),p=r(n(80768)),m=n(28564),g=n(14772),y=r(n(50225)),b=function(e){var t=e.relationsLayout,n=e.editRelationsLayoutRemainingFields,r=e.onRemoveField,o=e.onAddField,b=(0,l.useIntl)().formatMessage,v=(0,g.useLayoutDnd)(),h=v.setEditFieldToSelect,E=v.modifiedData,O=v.onMoveRelation;return a.default.createElement(c.Stack,{size:4},a.default.createElement("div",null,a.default.createElement(d.Box,null,a.default.createElement(s.Typography,{fontWeight:"bold"},b({id:(0,m.getTrad)("containers.SettingPage.relations"),defaultMessage:"Relational fields"}))),a.default.createElement(d.Box,null,a.default.createElement(s.Typography,{variant:"pi",textColor:"neutral600"},b({id:"containers.SettingPage.editSettings.description",defaultMessage:"Drag & drop the fields to build the layout"})))),a.default.createElement(d.Box,{padding:4,hasRadius:!0,borderStyle:"dashed",borderWidth:"1px",borderColor:"neutral300"},a.default.createElement(c.Stack,{size:2},t.map((function(e,t){var n=(0,i.default)(E,["metadatas",e,"edit","label"],"");return a.default.createElement(y.default,{onEditField:function(){return h(e)},onDeleteField:function(){return r(t)},key:e,index:t,name:e,onMoveField:O},n||e)})),a.default.createElement(f.SimpleMenu,{id:"label",label:b({id:"containers.SettingPage.add.relational-field",defaultMessage:"Insert another relational field"}),"data-testid":"add-relation",as:u.Button,fullWidth:!0,startIcon:a.default.createElement(p.default,null),endIcon:null,variant:"secondary",disabled:0===n.length},n.map((function(e){return a.default.createElement(f.MenuItem,{id:"menuItem-".concat(e),key:"menuItem-".concat(e),onClick:function(){return o(e)}},e)}))))))};b.propTypes={relationsLayout:o.default.array.isRequired,editRelationsLayoutRemainingFields:o.default.array.isRequired,onRemoveField:o.default.func.isRequired,onAddField:o.default.func.isRequired};var v=b;t.default=v},10198:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=r(n(27361)),l=n(14772),u=r(n(73566)),d=function(e){var t=e.rowItem,n=e.onRemoveField,r=e.rowId,o=e.rowIndex,d=e.index,s=e.lastIndex,c=(0,l.useLayoutDnd)(),f=c.setEditFieldToSelect,p=c.attributes,m=c.modifiedData,g=c.moveRow,y=c.moveItem,b=(0,i.default)(p,[t.name],{}),v=(0,i.default)(m,["metadatas",t.name,"edit","label"],"");return a.default.createElement(u.default,{onEditField:function(){return f(t.name)},onDeleteField:function(){return n(r,d)},attribute:b,index:d,lastIndex:s,rowIndex:o,name:t.name,size:t.size,moveRow:g,moveItem:y},v||t.name)};d.propTypes={index:o.default.number.isRequired,lastIndex:o.default.number.isRequired,onRemoveField:o.default.func.isRequired,rowId:o.default.number.isRequired,rowIndex:o.default.number.isRequired,rowItem:o.default.object.isRequired};var s=d;t.default=s},79075:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=n(34626),l=r(n(10198)),u=function(e){var t=e.row,n=e.onRemoveField,r=e.rowIndex;return a.default.createElement(i.Grid,null,t.rowContent.map((function(e,o){return a.default.createElement(l.default,{key:e.name,rowItem:e,index:o,rowId:t.rowId,onRemoveField:n,rowIndex:r,lastIndex:t.rowContent.length-1})})))};u.propTypes={onRemoveField:o.default.func.isRequired,row:o.default.object.isRequired,rowIndex:o.default.number.isRequired};var d=u;t.default=d},40224:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(63038)),i=W(n(67294)),l=r(n(45697)),u=n(97132),d=n(23724),s=r(n(11700)),c=r(n(78718)),f=r(n(50361)),p=r(n(94654)),m=r(n(18446)),g=r(n(27361)),y=r(n(36968)),b=n(68547),v=n(39711),h=n(62031),E=n(78862),O=n(85104),w=n(19408),M=n(5493),j=n(49425),P=n(34626),C=n(43808),k=n(9008),_=n(14276),R=r(n(68717)),T=r(n(84734)),x=n(28564),D=W(n(74569)),S=r(n(98608)),I=r(n(66650)),q=r(n(8010)),F=r(n(71667)),L=r(n(95758)),A=n(28550),B=r(n(1189));function N(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(N=function(e){return e?n:t})(e)}function W(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=N(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}var z=function(e){var t=e.mainLayout,n=e.components,r=e.isContentTypeView,a=e.slug,l=e.updateLayout,N=(0,i.useReducer)(D.default,D.initialState,(function(){return(0,S.default)(D.initialState,t,n)})),W=(0,o.default)(N,2),z=W[0],U=W[1],V=(0,i.useState)(!1),H=(0,o.default)(V,2),G=H[0],Z=H[1],$=(0,b.useTracking)().trackUsage,Q=(0,b.useNotification)(),Y=(0,v.useHistory)().goBack,J=(0,i.useState)(!1),K=(0,o.default)(J,2),X=K[0],ee=K[1],te=(0,i.useState)(!1),ne=(0,o.default)(te,2),re=ne[0],ae=ne[1],oe=z.componentLayouts,ie=z.initialData,le=z.modifiedData,ue=z.metaToEdit,de=z.metaForm,se=(0,u.useIntl)().formatMessage,ce=(0,g.default)(t,["info","displayName"],""),fe=(0,g.default)(le,["attributes"],{}),pe=Object.keys(fe).filter((function(e){var t=(0,g.default)(fe,[e,"type"],"");return!["dynamiczone","json","text","relation","component","boolean","date","media","richtext","timestamp"].includes(t)&&!!t})),me=(0,g.default)(le,["layouts","edit"],[]),ge=(0,p.default)(me,"rowContent"),ye=Object.keys(le.attributes).filter((function(e){return!r||"relation"!==(0,g.default)(le,["attributes",e,"type"],"")})).filter((function(e){return!0===(0,g.default)(le,["metadatas",e,"edit","visible"],!1)})).filter((function(e){return-1===ge.findIndex((function(t){return t.name===e}))})).sort(),be=(0,g.default)(le,["layouts","editRelations"],[]),ve=Object.keys(fe).filter((function(e){return"relation"===fe[e].type})).filter((function(e){return-1===be.indexOf(e)})),he=function(){ee((function(e){return!e}))},Ee=function(){ae((function(e){return!e}))},Oe=(0,d.useMutation)((function(e){return(0,B.default)(e,a,r)}),{onSuccess:function(e){var t=e.data;l&&l(t.data),U({type:"SUBMIT_SUCCEEDED"}),Ee(),$("didEditEditSettings")},onError:function(){Q({type:"warning",message:{id:"notification.error"}})}}),we=Oe.isLoading;return i.default.createElement(L.default,{isContentTypeView:r,attributes:fe,modifiedData:le,slug:a,componentLayouts:oe,selectedField:ue,fieldForm:de,onMoveRelation:function(e,t){U({type:"MOVE_RELATION",fromIndex:e,toIndex:t})},onMoveField:function(e,t){U({type:"MOVE_FIELD",fromIndex:e,toIndex:t})},moveRow:function(e,t){U({type:"MOVE_ROW",fromIndex:e,toIndex:t})},moveItem:function(e,t,n,r){U(n===r?{type:"REORDER_ROW",dragRowIndex:n,dragIndex:e,hoverIndex:t}:{type:"REORDER_DIFF_ROW",dragIndex:e,hoverIndex:t,dragRowIndex:n,hoverRowIndex:r})},setEditFieldToSelect:function(e){U({type:"SET_FIELD_TO_EDIT",name:e}),he()},isDraggingSibling:G,setIsDraggingSibling:Z},i.default.createElement(h.Main,null,i.default.createElement("form",{onSubmit:function(e){e.preventDefault(),Ee()}},i.default.createElement(E.HeaderLayout,{title:se({id:(0,x.getTrad)("components.SettingsViewWrapper.pluginHeader.title"),defaultMessage:"Configure the view - ".concat((0,s.default)(ce))},{name:(0,s.default)(ce)}),subtitle:se({id:(0,x.getTrad)("components.SettingsViewWrapper.pluginHeader.description.edit-settings"),defaultMessage:"Customize how the edit view will look like."}),navigationAction:i.default.createElement(O.Link,{startIcon:i.default.createElement(R.default,null),onClick:function(e){e.preventDefault(),Y()},to:"/"},se({id:"app.components.go-back",defaultMessage:"Back"})),primaryAction:i.default.createElement(w.Button,{disabled:(0,m.default)(ie,le),startIcon:i.default.createElement(T.default,null),type:"submit"},se({id:"form.button.save",defaultMessage:"Save"}))}),i.default.createElement(E.ContentLayout,null,i.default.createElement(M.Box,{background:"neutral0",hasRadius:!0,shadow:"filterShadow",paddingTop:6,paddingBottom:6,paddingLeft:7,paddingRight:7},i.default.createElement(k.Stack,{size:4},i.default.createElement(j.Typography,{variant:"delta",as:"h2"},se({id:(0,x.getTrad)("containers.SettingPage.settings"),defaultMessage:"Settings"})),i.default.createElement(P.Grid,null,i.default.createElement(P.GridItem,{col:6,s:12},i.default.createElement(C.Select,{label:se({id:(0,x.getTrad)("containers.SettingPage.editSettings.entry.title"),defaultMessage:"Entry title"}),hint:se({id:(0,x.getTrad)("containers.SettingPage.editSettings.entry.title.description"),defaultMessage:"Set the display field of your entry"}),onChange:function(e){!function(e){var t=e.target,n=t.name,r=t.value;U({type:"ON_CHANGE",keys:n.split("."),value:r})}({target:{name:"settings.mainField",value:""===e?null:e}})},value:le.settings.mainField},pe.map((function(e){return i.default.createElement(C.Option,{key:e,value:e},e)}))))),i.default.createElement(M.Box,{paddingTop:2,paddingBottom:2},i.default.createElement(_.Divider,null)),i.default.createElement(j.Typography,{variant:"delta",as:"h3"},se({id:(0,x.getTrad)("containers.SettingPage.view"),defaultMessage:"View"})),i.default.createElement(P.Grid,{gap:4},i.default.createElement(P.GridItem,{col:r?8:12,s:12},i.default.createElement(I.default,{attributes:fe,editLayout:me,editLayoutRemainingFields:ye,onAddField:function(e){U({type:"ON_ADD_FIELD",name:e})},onRemoveField:function(e,t){U({type:"REMOVE_FIELD",rowIndex:e,fieldIndex:t})}})),r&&i.default.createElement(P.GridItem,{col:4,s:12},i.default.createElement(q.default,{editRelationsLayoutRemainingFields:ve,relationsLayout:be,onAddField:function(e){return U({type:"ADD_RELATION",name:e})},onRemoveField:function(e){return U({type:"REMOVE_RELATION",index:e})}})))))),i.default.createElement(b.ConfirmDialog,{bodyText:{id:(0,x.getTrad)("popUpWarning.warning.updateAllSettings"),defaultMessage:"This will modify all your settings"},iconRightButton:i.default.createElement(T.default,null),isConfirmButtonLoading:we,isOpen:re,onToggleDialog:Ee,onConfirm:function(){var e=(0,c.default)((0,f.default)(le),["layouts","metadatas","settings"]);(0,y.default)(e,"layouts.edit",(0,A.unformatLayout)(e.layouts.edit)),Oe.mutate(e)},variantRightButton:"success-light"})),X&&i.default.createElement(F.default,{onSubmit:function(e){e.preventDefault(),U({type:"SUBMIT_META_FORM"}),he()},onToggle:he,type:(0,g.default)(fe,[ue,"type"],""),onMetaChange:function(e){var t=e.target,n=t.name,r=t.value;U({type:"ON_CHANGE_META",keys:n.split("."),value:r})},onSizeChange:function(e){var t=e.name,n=e.value;U({type:"ON_CHANGE_SIZE",name:t,value:n})}})))};z.defaultProps={isContentTypeView:!1,updateLayout:null},z.propTypes={components:l.default.object.isRequired,isContentTypeView:l.default.bool,mainLayout:l.default.shape({attributes:l.default.object.isRequired,info:l.default.object.isRequired,layouts:l.default.shape({list:l.default.array.isRequired,editRelations:l.default.array.isRequired,edit:l.default.array.isRequired}).isRequired,metadatas:l.default.object.isRequired,options:l.default.object.isRequired}).isRequired,slug:l.default.string.isRequired,updateLayout:l.default.func};var U=z;t.default=U},98608:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(59713)),o=n(96486),i=n(28550);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(e,t,n){var r=(0,o.cloneDeep)(t);return(0,o.set)(r,["layouts","edit"],(0,i.formatLayout)((0,i.createLayout)(t.layouts.edit))),u(u({},e),{},{initialData:r,modifiedData:r,componentLayouts:n})};t.default=d},74569:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.initialState=t.default=void 0;var a=r(n(319)),o=r(n(66312)),i=r(n(36968)),l=r(n(27361)),u=r(n(50361)),d=n(28564),s=n(28550),c={fieldForm:{},componentLayouts:{},metaToEdit:"",initialData:{},metaForm:{},modifiedData:{}};t.initialState=c;var f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=arguments.length>1?arguments[1]:void 0;return(0,o.default)(e,(function(n){var r=["modifiedData","layouts","edit"],o=["modifiedData","layouts","editRelations"];switch(t.type){case"ADD_RELATION":var c=(0,l.default)(e,o,[]);(0,i.default)(n,o,[].concat((0,a.default)(c),[t.name]));break;case"MOVE_RELATION":var f=(0,l.default)(e,o,[]),p=t.fromIndex,m=t.toIndex;(0,i.default)(n,o,(0,d.arrayMoveItem)(f,p,m));break;case"MOVE_ROW":var g=(0,l.default)(e,r,[]),y=t.fromIndex,b=t.toIndex;(0,i.default)(n,r,(0,d.arrayMoveItem)(g,y,b));break;case"ON_ADD_FIELD":var v=(0,u.default)(e),h=(0,s.getDefaultInputSize)((0,l.default)(v,["modifiedData","attributes",t.name,"type"],"")),E=(0,l.default)(v,r,[]).length,O=[].concat(r,[E-1,"rowContent"]),w=(0,l.default)(v,O,[]),M=(0,l.default)(v,r,[]);Array.isArray(w)?(0,i.default)(M,[E>0?E-1:0,"rowContent"],[].concat((0,a.default)(w),[{name:t.name,size:h}])):(0,i.default)(M,[E>0?E-1:0,"rowContent"],[{name:t.name,size:h}]);var j=(0,s.formatLayout)(M);(0,i.default)(n,r,j);break;case"ON_CHANGE":(0,i.default)(n,["modifiedData"].concat((0,a.default)(t.keys)),t.value);break;case"ON_CHANGE_META":(0,i.default)(n,["metaForm","metadata"].concat((0,a.default)(t.keys)),t.value);break;case"ON_CHANGE_SIZE":(0,i.default)(n,["metaForm","size"],t.value);break;case"ON_RESET":n.modifiedData=e.initialData;break;case"REMOVE_FIELD":var P=(0,l.default)(e,[].concat(r,[t.rowIndex,"rowContent"]),[]),C=(0,u.default)(e);if(1===P.length||2===P.length&&"_TEMP_"===(0,l.default)(P,[1,"name"],"")){var k=(0,l.default)(e,r,[]);(0,i.default)(C,r,k.filter((function(e,n){return t.rowIndex!==n})))}else(0,i.default)(C,[].concat(r,[t.rowIndex,"rowContent"]),P.filter((function(e,n){return n!==t.fieldIndex})));var _=(0,s.formatLayout)((0,l.default)(C,r,[]));(0,i.default)(n,r,_);break;case"REMOVE_RELATION":var R=(0,l.default)(e,o,[]);(0,i.default)(n,o,R.filter((function(e,n){return t.index!==n})));break;case"REORDER_DIFF_ROW":var T=(0,l.default)(e,[].concat(r,[t.dragRowIndex,"rowContent"]),[]),x=(0,l.default)(e,[].concat(r,[t.hoverRowIndex,"rowContent"]),[]),D=(0,l.default)(e,[].concat(r,[t.dragRowIndex,"rowContent",t.dragIndex]),{}),S=[].concat((0,a.default)(x),[D]),I=(0,u.default)(e);(0,i.default)(I,[].concat(r,[t.dragRowIndex,"rowContent"]),T.filter((function(e,n){return t.dragIndex!==n}))),(0,i.default)(I,[].concat(r,[t.hoverRowIndex,"rowContent"]),(0,d.arrayMoveItem)(S,S.length-1,t.hoverIndex));var q=(0,s.formatLayout)((0,l.default)(I,r,[]));(0,i.default)(n,r,q);break;case"REORDER_ROW":var F=(0,u.default)(e),L=(0,l.default)(F,[].concat(r,[t.dragRowIndex,"rowContent"]),[]);(0,i.default)(F,[].concat(r,[t.dragRowIndex,"rowContent"]),(0,d.arrayMoveItem)(L,t.dragIndex,t.hoverIndex));var A=(0,s.formatLayout)((0,l.default)(F,r,[]));(0,i.default)(n,r,A);break;case"SET_FIELD_TO_EDIT":var B,N,W;n.metaToEdit=t.name,n.metaForm={metadata:(0,l.default)(e,["modifiedData","metadatas",t.name,"edit"],{}),size:null!==(B=(0,s.getFieldSize)(t.name,null===(N=e.modifiedData)||void 0===N||null===(W=N.layouts)||void 0===W?void 0:W.edit))&&void 0!==B?B:(0,s.getDefaultInputSize)()};break;case"SUBMIT_META_FORM":(0,i.default)(n,["modifiedData","metadatas",e.metaToEdit,"edit"],e.metaForm.metadata);var z=(0,u.default)((0,l.default)(e,r,[])),U=(0,s.setFieldSize)(e.metaToEdit,e.metaForm.size,z);U.length>0&&(0,i.default)(n,r,(0,s.formatLayout)(U));break;case"SUBMIT_SUCCEEDED":n.initialData=e.modifiedData;break;case"UNSET_FIELD_TO_EDIT":n.metaToEdit="",n.metaForm={};break;default:return n}}))};t.default=f},1189:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(53777),a=n(28564),o=function(e,t,n){return r.axiosInstance.put((0,a.getRequestUrl)(n?"content-types/".concat(t,"/configuration"):"components/".concat(t,"/configuration")),e)};t.default=o},71830:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(96486),a=function(e){return e.reduce((function(e,t){var n=(0,r.get)(t,["attributes"],{}),a=Object.keys(n).filter((function(e){return!["boolean","component","dynamiczone","json","media","password","relation","text","richtext"].includes((0,r.get)(n,[e,"type"],""))}));return e[t.uid]=a,e}),{})};t.default=a},357:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(28564),a=function(e){var t;switch(e){case"description":case"label":case"placeholder":t="text";break;case"mainField":t="select";break;case"editable":t="bool";break;default:t=""}return{type:t,label:{id:"mainField"===e?(0,r.getTrad)("containers.SettingPage.editSettings.entry.title"):(0,r.getTrad)("form.Input.".concat(e))}}};t.default=a},13107:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createPossibleMainFieldsForModelsAndComponents",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"getInputProps",{enumerable:!0,get:function(){return o.default}});var a=r(n(71830)),o=r(n(357))},28550:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.unformatLayout=t.setFieldSize=t.getRowSize=t.getFieldSize=t.getDefaultInputSize=t.formatLayout=t.createLayout=void 0;var a=r(n(59713));function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l=function(e){return e.reduce((function(e,t){return e+t.size}),0)};t.getRowSize=l;t.createLayout=function(e){return e.reduce((function(e,t,n){var r={rowId:n,rowContent:t};return e.concat(r)}),[])};t.formatLayout=function(e){return e.reduce((function(e,t){var n=[],r=t.rowContent.reduce((function(e,t){var r=l(e);return"_TEMP_"===t.name||(r+t.size<=12?e.push(t):n.push(t)),e}),[]),a=0===e.length?0:Math.max.apply(Math,e.map((function(e){return e.rowId})))+1,o=l(r);if(o<12&&r.push({name:"_TEMP_",size:12-o}),e.push({rowId:a,rowContent:r}),n.length>0){var i=l(n);i<12&&n.push({name:"_TEMP_",size:12-i}),e.push({rowId:a+1,rowContent:n}),n=[]}return e}),[]).filter((function(e){return e.rowContent.length>0})).filter((function(e){return 1!==e.rowContent.length||"_TEMP_"!==e.rowContent[0].name}))};t.unformatLayout=function(e){return e.reduce((function(e,t){var n=t.rowContent.filter((function(e){return"_TEMP_"!==e.name}));return e.concat([n])}),[])};t.getDefaultInputSize=function(e){switch(e){case"boolean":case"date":case"integer":case"float":case"biginteger":case"decimal":case"time":return 4;case"json":case"component":case"richtext":case"dynamiczone":return 12;default:return 6}};t.getFieldSize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce((function(t,n){var r,a,o=null!==(r=null===(a=n.rowContent.find((function(t){return t.name===e})))||void 0===a?void 0:a.size)&&void 0!==r?r:null;return o&&(t=o),t}),null)};t.setFieldSize=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return n.map((function(n){return n.rowContent=n.rowContent.map((function(n){return n.name===e?i(i({},n),{},{size:t}):n})),n}))}},1260:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(67154)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),l=r(n(45697)),u=n(68547),d=r(n(69590)),s=r(n(13420)),c=n(28564);function f(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}var p=function(e){var t=(0,i.useMemo)((function(){return(0,c.generatePermissionsObject)(e.slug)}),[e.slug]),n=(0,u.useRBAC)(t,e.userPermissions),r=n.isLoading,a=n.allowedActions;return r?i.default.createElement(u.LoadingIndicatorPage,null):i.default.createElement(s.default,(0,o.default)({},e,{allowedActions:a}))};p.defaultProps={permissions:[]},p.propTypes={permissions:l.default.array,slug:l.default.string.isRequired,userPermissions:l.default.array.isRequired};var m=(0,i.memo)(p,d.default);t.default=m},70595:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setLayout=t.resetProps=void 0;var r=n(79906);t.resetProps=function(){return{type:r.RESET_PROPS}};t.setLayout=function(e,t){return{type:r.SET_LAYOUT,layout:e,query:t}}},11427:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(67154)),i=r(n(63038)),l=r(n(6479)),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),d=r(n(45697)),s=n(37424),c=n(68547),f=n(29499),p=n(14772),m=n(70595),g=r(n(94622)),y=r(n(1260)),b=["layout"];function v(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}var h=function(e){var t=e.layout,n=(0,l.default)(e,b),r=(0,s.useSelector)(g.default),a=(0,s.useDispatch)(),d=(0,c.useQueryParams)(),v=(0,i.default)(d,1)[0].query,h=(0,c.useStrapiApp)().runHookWaterfall,E=(0,p.useSyncRbac)(v,n.slug,"editView");return(0,u.useEffect)((function(){var e=h(f.MUTATE_EDIT_VIEW_LAYOUT,{layout:t,query:v});return a((0,m.setLayout)(e.layout,v)),function(){a((0,m.resetProps)())}}),[t,a,v,h]),r&&E?u.default.createElement(y.default,(0,o.default)({},n,{layout:r,userPermissions:E})):u.default.createElement(c.LoadingIndicatorPage,null)};h.propTypes={layout:d.default.shape({components:d.default.object.isRequired,contentType:d.default.shape({uid:d.default.string.isRequired,settings:d.default.object.isRequired,metadatas:d.default.object.isRequired,options:d.default.object.isRequired,attributes:d.default.object.isRequired}).isRequired}).isRequired};var E=h;t.default=E},94622:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){return e["content-manager_editViewLayoutManager"].currentLayout};t.default=n},64791:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(87757)),i=r(n(48926)),l=r(n(63038)),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),d=n(97132),s=r(n(27361)),c=r(n(69590)),f=n(19408),p=r(n(18568)),m=n(68547),g=r(n(45697)),y=n(28564),b=n(87227);function v(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}var h=function(e){var t=e.isCreatingEntry,n=e.onDelete,r=e.onDeleteSucceeded,a=e.trackerProperty,c=(0,u.useState)(!1),g=(0,l.default)(c,2),b=g[0],v=g[1],h=(0,u.useState)(!1),E=(0,l.default)(h,2),O=E[0],w=E[1],M=(0,d.useIntl)().formatMessage,j=(0,m.useNotification)(),P=function(){return v((function(e){return!e}))},C=function(){var e=(0,i.default)(o.default.mark((function e(){var t;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,w(!0),e.next=4,n(a);case 4:w(!1),P(),r(),e.next=15;break;case 9:e.prev=9,e.t0=e.catch(0),t=(0,s.default)(e.t0,"response.payload.message",M({id:(0,y.getTrad)("error.record.delete")})),w(!1),P(),j({type:"warning",message:t});case 15:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}();return t?null:u.default.createElement(u.default.Fragment,null,u.default.createElement(f.Button,{onClick:P,size:"S",startIcon:u.default.createElement(p.default,null),variant:"danger-light"},M({id:(0,y.getTrad)("containers.Edit.delete-entry"),defaultMessage:"Delete this entry"})),u.default.createElement(m.ConfirmDialog,{isConfirmButtonLoading:O,isOpen:b,onConfirm:C,onToggleDialog:P}))};h.propTypes={isCreatingEntry:g.default.bool.isRequired,onDelete:g.default.func.isRequired,onDeleteSucceeded:g.default.func.isRequired,trackerProperty:g.default.object.isRequired};var E=(0,u.memo)(h,c.default),O=(0,b.connect)(E,b.select);t.default=O},42404:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67154)),o=r(n(67294));var i=function(e,t){return function(n){var r=t();return o.default.createElement(e,(0,a.default)({},n,r))}};t.default=i},87227:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"select",{enumerable:!0,get:function(){return o.default}});var a=r(n(42404)),o=r(n(35591))},35591:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(96486),a=n(68547);var o=function(){var e=(0,a.useCMEditViewDataManager)(),t=e.hasDraftAndPublish,n=e.modifiedData,o={};return t&&(o=(0,r.isEmpty)(n.publishedAt)?{status:"draft"}:{status:"published"}),{hasDraftAndPublish:t,trackerProperty:o}};t.default=o},18382:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DraftAndPublishBadge=void 0;var a=r(n(67154)),o=r(n(67294)),i=r(n(45697)),l=n(97132),u=r(n(78384)),d=n(5493),s=n(67826),c=n(49425),f=r(n(8743)),p=n(68547),m=n(28564),g=n(62090),y=(0,u.default)(f.default).withConfig({displayName:"DraftAndPublishBadge__CustomBullet",componentId:"sc-q3ebj8-0"})(["width:",";height:",";*{fill:",";}"],(0,p.pxToRem)(6),(0,p.pxToRem)(6),(function(e){var t=e.theme,n=e.$bulletColor;return t.colors[n]})),b=function(e){var t=e.hasDraftAndPublish,n=e.isPublished,r=(0,l.useIntl)().formatMessage;if(!t)return null;var i={draft:{textColor:"secondary700",bulletColor:"secondary600",box:{background:"secondary100",borderColor:"secondary200"}},published:{textColor:"success700",bulletColor:"success600",box:{background:"success100",borderColor:"success200"}}},u=n?i.published:i.draft;return o.default.createElement(d.Box,(0,a.default)({hasRadius:!0,as:"aside",paddingTop:4,paddingBottom:4,paddingLeft:5,paddingRight:5},u.box),o.default.createElement(d.Box,{as:s.Flex},o.default.createElement(y,{$bulletColor:u.bulletColor}),o.default.createElement(d.Box,{paddingLeft:3},o.default.createElement(c.Typography,{textColor:u.textColor},r({id:(0,m.getTrad)("containers.Edit.information.editing"),defaultMessage:"Editing"}),"\xa0"),o.default.createElement(c.Typography,{fontWeight:"bold",textColor:u.textColor},n&&r({id:(0,m.getTrad)("containers.Edit.information.publishedVersion"),defaultMessage:"published version"}),!n&&r({id:(0,m.getTrad)("containers.Edit.information.draftVersion"),defaultMessage:"draft version"})))))};t.DraftAndPublishBadge=b,b.propTypes={hasDraftAndPublish:i.default.bool.isRequired,isPublished:i.default.bool.isRequired};var v=(0,g.connect)(b,g.select);t.default=v},27951:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67154)),o=r(n(67294));var i=function(e,t){return function(n){var r=t();return o.default.createElement(e,(0,a.default)({},n,r))}};t.default=i},62090:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"select",{enumerable:!0,get:function(){return o.default}});var a=r(n(27951)),o=r(n(43237))},43237:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(68547);var a=function(){var e=(0,r.useCMEditViewDataManager)(),t=e.initialData;return{hasDraftAndPublish:e.hasDraftAndPublish,isPublished:void 0!==t.publishedAt&&null!==t.publishedAt}};t.default=a},22543:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Header=void 0;var o=r(n(63038)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=k(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),l=n(97132),u=n(39711),d=r(n(27361)),s=r(n(18446)),c=r(n(41609)),f=r(n(68717)),p=n(78862),m=n(5493),g=n(19408),y=n(16758),b=n(85104),v=n(67826),h=n(49425),E=n(9008),O=r(n(51359)),w=r(n(84734)),M=r(n(45697)),j=r(n(69590)),P=n(28564),C=n(87172);function k(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(k=function(e){return e?n:t})(e)}var _=function(e){var t=e.allowedActions,n=t.canUpdate,r=t.canCreate,a=t.canPublish,M=e.componentLayouts,j=e.initialData,k=e.isCreatingEntry,_=e.isSingleType,R=e.hasDraftAndPublish,T=e.layout,x=e.modifiedData,D=e.onPublish,S=e.onUnpublish,I=e.status,q=(0,u.useHistory)().goBack,F=(0,i.useState)(!1),L=(0,o.default)(F,2),A=L[0],B=L[1],N=(0,i.useState)(!1),W=(0,o.default)(N,2),z=W[0],U=W[1],V=(0,l.useIntl)().formatMessage,H=(0,i.useRef)(0),G=(0,d.default)(T,["settings","mainField"],"id"),Z=(0,d.default)(T,["info","displayName"],"NOT FOUND"),$=!(0,s.default)(j,x)||k&&!(0,c.default)(x),Q=V({id:(0,P.getTrad)("containers.Edit.pluginHeader.title.new"),defaultMessage:"Create an entry"});k||_||(Q=j[G]||Z),_&&(Q=Z);var Y=null;if(k&&r&&(Y=i.default.createElement(E.Stack,{horizontal:!0,size:2},R&&i.default.createElement(g.Button,{disabled:!0,startIcon:i.default.createElement(w.default,null),variant:"secondary"},V({id:"app.utils.publish",defaultMessage:"Publish"})),i.default.createElement(g.Button,{disabled:!$,isLoading:"submit-pending"===I,type:"submit"},V({id:(0,P.getTrad)("containers.Edit.submit"),defaultMessage:"Save"})))),!k&&n){var J=R&&a,K=!(0,c.default)(j.publishedAt),X=K?"unpublish-pending"===I:"publish-pending"===I,ee=K?{id:"app.utils.unpublish",defaultMessage:"Unpublish"}:{id:"app.utils.publish",defaultMessage:"Publish"},te=K?function(){return B(!0)}:function(){0===function(){var e=(0,C.getDraftRelations)(x,T,M);return H.current=e,e}()?D():U(!0)};Y=i.default.createElement(v.Flex,null,J&&i.default.createElement(g.Button,{disabled:$,loading:X,onClick:te,startIcon:i.default.createElement(w.default,null),variant:"secondary"},V(ee)),i.default.createElement(m.Box,{paddingLeft:J?2:0},i.default.createElement(g.Button,{disabled:!$,loading:"submit-pending"===I,type:"submit"},V({id:(0,P.getTrad)("containers.Edit.submit"),defaultMessage:"Save"}))))}var ne=function(){return B((function(e){return!e}))},re=function(){return U((function(e){return!e}))},ae="".concat(V({id:(0,P.getTrad)("api.id"),defaultMessage:"API ID "})," : ").concat(T.apiID);return i.default.createElement(i.default.Fragment,null,i.default.createElement(p.HeaderLayout,{title:Q.toString(),primaryAction:Y,subtitle:ae,navigationAction:i.default.createElement(b.Link,{startIcon:i.default.createElement(f.default,null),onClick:function(e){e.preventDefault(),q()},to:"/"},V({id:"app.components.HeaderLayout.link.go-back",defaultMessage:"Back"}))}),A&&i.default.createElement(y.Dialog,{onClose:ne,title:"Confirmation",labelledBy:"confirmation",describedBy:"confirm-description",isOpen:A},i.default.createElement(y.DialogBody,{icon:i.default.createElement(O.default,null)},i.default.createElement(E.Stack,{size:2},i.default.createElement(v.Flex,{justifyContent:"center",style:{textAlign:"center"}},i.default.createElement(h.Typography,{id:"confirm-description"},V({id:(0,P.getTrad)("popUpWarning.warning.unpublish"),defaultMessage:"Unpublish this content will automatically change it to a draft."},{br:function(){return i.default.createElement("br",null)}}))),i.default.createElement(v.Flex,{justifyContent:"center",style:{textAlign:"center"}},i.default.createElement(h.Typography,{id:"confirm-description"},V({id:(0,P.getTrad)("popUpWarning.warning.unpublish-question"),defaultMessage:"Are you sure you want to unpublish it?"}))))),i.default.createElement(y.DialogFooter,{startAction:i.default.createElement(g.Button,{onClick:ne,variant:"tertiary"},V({id:"components.popUpWarning.button.cancel",defaultMessage:"No, cancel"})),endAction:i.default.createElement(g.Button,{variant:"danger-light",onClick:function(){ne(),S()}},V({id:"components.popUpWarning.button.confirm",defaultMessage:"Yes, confirm"}))})),z&&i.default.createElement(y.Dialog,{onClose:re,title:"Confirmation",labelledBy:"confirmation",describedBy:"confirm-description",isOpen:z},i.default.createElement(y.DialogBody,{icon:i.default.createElement(O.default,null)},i.default.createElement(E.Stack,{size:2},i.default.createElement(v.Flex,{justifyContent:"center",style:{textAlign:"center"}},i.default.createElement(h.Typography,{id:"confirm-description"},H.current,V({id:(0,P.getTrad)("popUpwarning.warning.has-draft-relations.message"),defaultMessage:"<b>{count, plural, =0 { of your content relations is} one { of your content relations is} other { of your content relations are}}</b> not published yet.<br></br>It might engender broken links and errors on your project."},{br:function(){return i.default.createElement("br",null)},b:function(e){return i.default.createElement(h.Typography,{fontWeight:"bold"},e)},count:H.current}))),i.default.createElement(v.Flex,{justifyContent:"center",style:{textAlign:"center"}},i.default.createElement(h.Typography,{id:"confirm-description"},V({id:(0,P.getTrad)("popUpWarning.warning.publish-question"),defaultMessage:"Do you still want to publish it?"}))))),i.default.createElement(y.DialogFooter,{startAction:i.default.createElement(g.Button,{onClick:re,variant:"tertiary"},V({id:"components.popUpWarning.button.cancel",defaultMessage:"No, cancel"})),endAction:i.default.createElement(g.Button,{variant:"success",onClick:function(){re(),H.current=0,D()}},V({id:(0,P.getTrad)("popUpwarning.warning.has-draft-relations.button-confirm"),defaultMessage:"Yes, publish"}))})))};t.Header=_,_.propTypes={allowedActions:M.default.shape({canUpdate:M.default.bool.isRequired,canCreate:M.default.bool.isRequired,canPublish:M.default.bool.isRequired}).isRequired,componentLayouts:M.default.object.isRequired,initialData:M.default.object.isRequired,isCreatingEntry:M.default.bool.isRequired,isSingleType:M.default.bool.isRequired,status:M.default.string.isRequired,layout:M.default.object.isRequired,hasDraftAndPublish:M.default.bool.isRequired,modifiedData:M.default.object.isRequired,onPublish:M.default.func.isRequired,onUnpublish:M.default.func.isRequired};var R=(0,i.memo)(_,j.default),T=(0,C.connect)(R,C.select);t.default=T},96860:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67154)),o=r(n(67294));var i=function(e,t){return function(n){var r=t();return o.default.createElement(e,(0,a.default)({},n,r))}};t.default=i},81375:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(96486),a=function(e,t,n){var a=function e(t,a){return Object.keys(t).reduce((function(o,i){var l=(0,r.get)(a,["attributes",i,"type"],"string"),u=(0,r.get)(a,["attributes",i,"relationType"],""),d=u.toLowerCase().includes("morph"),s=t[i];if((0,r.isNil)(s))return o;if("dynamiczone"===l&&s.forEach((function(t){var a=(0,r.get)(n,t.__component,{});o+=e(t,a)})),"component"===l){var c=(0,r.get)(a,["attributes",i,"repeatable"],!1),f=(0,r.get)(a,["attributes",i,"component"],""),p=(0,r.get)(n,f,{});c?s.forEach((function(t){o+=e(t,p)})):o+=e(s,p)}"relation"!==l||d||(["oneWay","oneToOne","manyToOne"].includes(u)?(0,r.has)(s,"publishedAt")&&(0,r.isEmpty)(s.publishedAt)&&(o+=1):s.forEach((function(e){(0,r.has)(e,"publishedAt")&&(0,r.isEmpty)(e.publishedAt)&&(o+=1)})));return o}),0)}(e,t);return a};t.default=a},87172:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"getDraftRelations",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"select",{enumerable:!0,get:function(){return i.default}});var a=r(n(96860)),o=r(n(81375)),i=r(n(26041))},26041:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(68547);var a=function(){var e=(0,r.useCMEditViewDataManager)(),t=e.allLayoutData,n=e.initialData,a=e.isCreatingEntry,o=e.isSingleType,i=e.status,l=e.layout,u=e.hasDraftAndPublish,d=e.modifiedData,s=e.onPublish,c=e.onUnpublish;return{componentLayouts:t.components,initialData:n,isCreatingEntry:a,isSingleType:o,status:i,layout:l,hasDraftAndPublish:u,modifiedData:d,onPublish:s,onUnpublish:c}};t.default=a},61154:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),i=n(97132),l=n(68547),u=n(5493),d=n(14276),s=n(49425),c=n(67826),f=n(9008),p=n(28564),m=r(n(20962)),g=n(26595);function y(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}var b=function(){var e=(0,i.useIntl)(),t=e.formatMessage,n=e.formatRelativeTime,r=(0,l.useCMEditViewDataManager)(),a=r.initialData,y=r.isCreatingEntry,b=(0,o.useRef)(Date.now()),v=function(e,t){var r,o,i,l=(null===(r=a[t])||void 0===r?void 0:r.firstname)||"",u=(null===(o=a[t])||void 0===o?void 0:o.lastname)||"",d=(null===(i=a[t])||void 0===i?void 0:i.username)||(0,g.getFullName)(l,u),s=(a[e]?new Date(a[e]).getTime():Date.now())-b.current,c=(0,m.default)(-s),f=c.unit,p=c.value;return{at:n(p,f,{numeric:"auto"}),by:y?"-":d}},h=v("updatedAt","updatedBy"),E=v("createdAt","createdBy");return o.default.createElement(u.Box,null,o.default.createElement(s.Typography,{variant:"sigma",textColor:"neutral600",id:"additional-informations"},t({id:(0,p.getTrad)("containers.Edit.information"),defaultMessage:"Information"})),o.default.createElement(u.Box,{paddingTop:2,paddingBottom:6},o.default.createElement(d.Divider,null)),o.default.createElement(f.Stack,{size:4},o.default.createElement(c.Flex,{justifyContent:"space-between"},o.default.createElement(s.Typography,{fontWeight:"bold"},t({id:(0,p.getTrad)("containers.Edit.information.created"),defaultMessage:"Created"})),o.default.createElement(s.Typography,null,E.at)),o.default.createElement(c.Flex,{justifyContent:"space-between"},o.default.createElement(s.Typography,{fontWeight:"bold"},t({id:(0,p.getTrad)("containers.Edit.information.by"),defaultMessage:"By"})),o.default.createElement(s.Typography,null,E.by)),o.default.createElement(c.Flex,{justifyContent:"space-between"},o.default.createElement(s.Typography,{fontWeight:"bold"},t({id:(0,p.getTrad)("containers.Edit.information.lastUpdate"),defaultMessage:"Last update"})),o.default.createElement(s.Typography,null,h.at)),o.default.createElement(c.Flex,{justifyContent:"space-between"},o.default.createElement(s.Typography,{fontWeight:"bold"},t({id:(0,p.getTrad)("containers.Edit.information.by"),defaultMessage:"By"})),o.default.createElement(s.Typography,null,h.by))))};t.default=b},20962:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=6e4,r=36e5,a=864e5,o=2592e6,i=31536e6,l=function(e){return e<n?{unit:"second",value:-Math.round(e/1e3)}:e<r?{unit:"minute",value:-Math.round(e/n)}:e<a?{unit:"hour",value:-Math.round(e/r)}:e<o?{unit:"day",value:-Math.round(e/a)}:e<i?{unit:"month",value:-Math.round(e/o)}:{unit:"year",value:-Math.round(e/i)}};t.default=l},13420:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.EditView=void 0;var o=r(n(67154)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=F(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),l=r(n(45697)),u=r(n(27361)),d=n(68547),s=n(97132),c=n(78862),f=n(5493),p=n(14276),m=n(34626),g=n(60985),y=n(62031),b=n(9008),v=n(49425),h=r(n(85557)),E=r(n(19352)),O=n(78024),w=r(n(13240)),M=r(n(58827)),j=r(n(49925)),P=r(n(15141)),C=r(n(54865)),k=r(n(56229)),_=r(n(80249)),R=r(n(13995)),T=n(28564),x=r(n(18382)),D=r(n(61154)),S=r(n(22543)),I=n(73391),q=r(n(64791));function F(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(F=function(e){return e?n:t})(e)}var L=w.default.contentManager,A=[{action:"plugin::content-type-builder.read",subject:null}],B=function(e){var t=e.allowedActions,n=e.isSingleType,r=e.goBack,a=e.layout,l=e.slug,w=e.id,F=e.origin,B=e.userPermissions,N=(0,d.useTracking)().trackUsage,W=(0,s.useIntl)().formatMessage,z=(0,i.useMemo)((function(){return(0,I.getFieldsActionMatchingPermissions)(B,l)}),[B,l]),U=z.createActionAllowedFields,V=z.readActionAllowedFields,H=z.updateActionAllowedFields,G=(0,i.useMemo)((function(){return n?L.singleTypesConfigurations:L.collectionTypesConfigurations}),[n]),Z="/content-manager/".concat(n?"singleType":"collectionType","/").concat(l,"/configurations/edit"),$=(0,u.default)(a,["contentType"],{}),Q=(0,i.useMemo)((function(){return n?R.default:k.default}),[n]),Y=(0,i.useCallback)((function(e){return e.every((function(e){return e.every((function(e){return"dynamiczone"===e.fieldSchema.type}))}))}),[]),J=(0,i.useMemo)((function(){return $.layouts?(0,I.createAttributesLayout)($.layouts.edit,$.attributes):[]}),[$]),K=$.layouts.editRelations,X=K.length;return i.default.createElement(Q,{allLayoutData:a,slug:l,id:w,origin:F},(function(e){var u=e.componentsDataStructure,s=e.contentTypeDataStructure,w=e.data,k=e.isCreatingEntry,R=e.isLoadingForData,I=e.onDelete,F=e.onDeleteSucceeded,L=e.onPost,B=e.onPublish,z=e.onPut,$=e.onUnpublish,Q=e.redirectionLink,ee=e.status;return i.default.createElement(_.default,{allowedActions:t,allLayoutData:a,createActionAllowedFields:U,componentsDataStructure:u,contentTypeDataStructure:s,from:Q,initialValues:w,isCreatingEntry:k,isLoadingForData:R,isSingleType:n,onPost:L,onPublish:B,onPut:z,onUnpublish:$,readActionAllowedFields:V,redirectToPreviousPage:r,slug:l,status:ee,updateActionAllowedFields:H},i.default.createElement(y.Main,{"aria-busy":"resolved"!==ee},i.default.createElement(S.default,{allowedActions:t}),i.default.createElement(c.ContentLayout,null,i.default.createElement(m.Grid,{gap:4},i.default.createElement(m.GridItem,{col:9,s:12},i.default.createElement(b.Stack,{size:6},J.map((function(e,t){if(Y(e)){var n=e[0][0],r=n.name,a=n.fieldSchema,o=n.metadatas,l=n.labelAction;return i.default.createElement(f.Box,{key:t},i.default.createElement(m.Grid,{gap:4},i.default.createElement(m.GridItem,{col:12,s:12,xs:12},i.default.createElement(M.default,{name:r,fieldSchema:a,labelAction:l,metadatas:o}))))}return i.default.createElement(f.Box,{key:t,hasRadius:!0,background:"neutral0",shadow:"tableShadow",paddingLeft:6,paddingRight:6,paddingTop:6,paddingBottom:6,borderColor:"neutral150"},i.default.createElement(b.Stack,{size:6},e.map((function(e,t){return i.default.createElement(m.Grid,{gap:4,key:t},e.map((function(e){var t=e.fieldSchema,n=e.labelAction,r=e.metadatas,a=e.name,o=e.size;if("component"===t.type){var l=t.component,u=t.max,d=t.min,s=t.repeatable,c=void 0!==s&&s,f=t.required,p=void 0!==f&&f;return i.default.createElement(m.GridItem,{col:o,s:12,xs:12,key:l},i.default.createElement(j.default,{componentUid:l,labelAction:n,isRepeatable:c,intlLabel:{id:r.label,defaultMessage:r.label},max:u,min:d,name:a,required:p}))}return i.default.createElement(m.GridItem,{col:o,key:a,s:12,xs:12},i.default.createElement(P.default,{fieldSchema:t,keys:a,labelAction:n,metadatas:r}))})))}))))})))),i.default.createElement(m.GridItem,{col:3,s:12},i.default.createElement(b.Stack,{size:2},i.default.createElement(x.default,null),i.default.createElement(f.Box,{as:"aside","aria-labelledby":"additional-informations",background:"neutral0",borderColor:"neutral150",hasRadius:!0,paddingBottom:4,paddingLeft:4,paddingRight:4,paddingTop:6,shadow:"tableShadow"},i.default.createElement(D.default,null),i.default.createElement(O.InjectionZone,{area:"contentManager.editView.informations"})),X>0&&i.default.createElement(f.Box,{as:"aside","aria-labelledby":"relations-title",background:"neutral0",borderColor:"neutral150",hasRadius:!0,paddingBottom:4,paddingLeft:4,paddingRight:4,paddingTop:6,shadow:"tableShadow"},i.default.createElement(v.Typography,{variant:"sigma",textColor:"neutral600",id:"relations-title"},W({id:(0,T.getTrad)("containers.Edit.relations"),defaultMessage:"{number, plural, =0 {relations} one {relation} other {relations}}"},{number:X})),i.default.createElement(f.Box,{paddingTop:2,paddingBottom:6},i.default.createElement(p.Divider,null)),i.default.createElement(b.Stack,{size:4},K.map((function(e){var t=e.name,n=e.fieldSchema,r=e.labelAction,a=e.metadatas,l=e.queryInfos;return i.default.createElement(C.default,(0,o.default)({},n,a,{key:t,description:a.description,intlLabel:{id:a.label,defaultMessage:a.label},labelAction:r,name:t,relationsType:n.relationType,queryInfos:l,placeholder:a.placeholder?{id:a.placeholder,defaultMessage:a.placeholder}:null}))})))),i.default.createElement(f.Box,{as:"aside","aria-labelledby":"links"},i.default.createElement(b.Stack,{size:2},i.default.createElement(O.InjectionZone,{area:"contentManager.editView.right-links",slug:l}),"strapi::administrator"!==l&&i.default.createElement(d.CheckPermissions,{permissions:A},i.default.createElement(g.LinkButton,{onClick:function(){N("willEditEditLayout")},size:"S",startIcon:i.default.createElement(E.default,null),style:{width:"100%"},to:"/plugins/content-type-builder/content-types/".concat(l),variant:"secondary"},W({id:(0,T.getTrad)("link-to-ctb"),defaultMessage:"Edit the model"}))),i.default.createElement(d.CheckPermissions,{permissions:G},i.default.createElement(g.LinkButton,{size:"S",startIcon:i.default.createElement(h.default,null),style:{width:"100%"},to:Z,variant:"secondary"},W({id:"app.links.configure-view",defaultMessage:"Configure the view"}))),t.canDelete&&i.default.createElement(q.default,{isCreatingEntry:k,onDelete:I,onDeleteSucceeded:F})))))))))}))};t.EditView=B,B.defaultProps={id:null,isSingleType:!1,origin:null,userPermissions:[]},B.propTypes={allowedActions:l.default.shape({canRead:l.default.bool.isRequired,canUpdate:l.default.bool.isRequired,canCreate:l.default.bool.isRequired,canDelete:l.default.bool.isRequired}).isRequired,layout:l.default.shape({components:l.default.object.isRequired,contentType:l.default.shape({uid:l.default.string.isRequired,settings:l.default.object.isRequired,metadatas:l.default.object.isRequired,options:l.default.object.isRequired,attributes:l.default.object.isRequired}).isRequired}).isRequired,id:l.default.string,isSingleType:l.default.bool,goBack:l.default.func.isRequired,origin:l.default.string,slug:l.default.string.isRequired,userPermissions:l.default.array};var N=(0,i.memo)(B);t.default=N},22653:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(96486);function a(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){u=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(u)throw i}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var i=function(e,t){var n,o=function(e){return(0,r.get)(t,[e,"type"],"")},i=0,l=[],u=a(e);try{for(u.s();!(n=u.n()).done;){var d=n.value,s=d.some((function(e){var t=e.name;return"dynamiczone"===o(t)}));l[i]||(l[i]=[]),s?(l[i=0===i&&(0,r.isEmpty)(l[0])?0:i+1]||(l[i]=[]),l[i].push(d),i+=1):l[i].push(d)}}catch(c){u.e(c)}finally{u.f()}return l.filter((function(e){return e.length>0}))};t.default=i},15834:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(96486),a=n(68547),o=function(e,t){var n=function(n){var o=(0,a.findMatchingPermissions)(e,[{action:"plugin::content-manager.explorer.".concat(n),subject:t}]);return(0,r.uniq)((0,r.flatMap)(o,"properties.fields"))};return{createActionAllowedFields:n("create"),readActionAllowedFields:n("read"),updateActionAllowedFields:n("update")}};t.default=o},73391:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAttributesLayout",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"getFieldsActionMatchingPermissions",{enumerable:!0,get:function(){return o.default}});var a=r(n(22653)),o=r(n(15834))},83715:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=r(n(78384)),l=n(67826),u=n(49425),d=n(9008),s=r(n(19352)),c=r(n(84040)),f=r(n(88049)),p=r(n(77236)),m=(0,i.default)(l.Flex).withConfig({displayName:"CardPreview__ActionBox",componentId:"sc-15sgsby-0"})(["height:",";&:last-child{padding:0 ",";}"],(function(e){return e.theme.spaces[7]}),(function(e){return e.theme.spaces[3]})),g=(0,i.default)(m).withConfig({displayName:"CardPreview__DragButton",componentId:"sc-15sgsby-1"})(["padding:0 ",";border-right:1px solid ",";cursor:all-scroll;svg{width:","rem;height:","rem;}"],(function(e){return e.theme.spaces[3]}),(function(e){return e.theme.colors.neutral150}),.75,.75),y=(0,i.default)(l.Flex).withConfig({displayName:"CardPreview__FieldContainer",componentId:"sc-15sgsby-2"})(["display:inline-flex;max-height:","rem;opacity:",";background-color:",";border:1px solid ",";svg{width:","rem;height:","rem;path{fill:",";}}","{color:",";}","{border-right:1px solid ",";}"],2,(function(e){return e.transparent?0:1}),(function(e){var t=e.theme;return e.isSibling?t.colors.neutral100:t.colors.primary100}),(function(e){var t=e.theme;return e.isSibling?t.colors.neutral150:t.colors.primary200}),.625,.625,(function(e){var t=e.theme;return e.isSibling?void 0:t.colors.primary600}),u.Typography,(function(e){var t=e.theme;return e.isSibling?void 0:t.colors.primary600}),g,(function(e){var t=e.theme;return e.isSibling?t.colors.neutral150:t.colors.primary200})),b=function(e){var t=e.labelField,n=e.transparent,r=e.isSibling,o=(0,p.default)(t);return a.default.createElement(y,{hasRadius:!0,justifyContent:"space-between",transparent:n,isSibling:r},a.default.createElement(d.Stack,{horizontal:!0,size:3},a.default.createElement(g,{alignItems:"center"},a.default.createElement(f.default,null)),a.default.createElement(u.Typography,{fontWeight:"bold"},o)),a.default.createElement(l.Flex,{paddingLeft:3},a.default.createElement(m,{alignItems:"center"},a.default.createElement(s.default,null)),a.default.createElement(m,{alignItems:"center"},a.default.createElement(c.default,null))))};b.defaultProps={isSibling:!1,transparent:!1},b.propTypes={isSibling:o.default.bool,labelField:o.default.string.isRequired,transparent:o.default.bool};var v=b;t.default=v},46328:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(63038)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=w(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),l=r(n(78384)),u=r(n(45697)),d=n(99168),s=n(61080),c=n(97132),f=n(67826),p=n(5493),m=n(49425),g=n(9008),y=r(n(19352)),b=r(n(84040)),v=r(n(88049)),h=r(n(83715)),E=r(n(77236)),O=n(28564);function w(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(w=function(e){return e?n:t})(e)}var M=l.default.button.withConfig({displayName:"DraggableCard__ActionButton",componentId:"sc-gn1l5y-0"})(["display:flex;align-items:center;height:",";&:last-child{padding:0 ",";}"],(function(e){return e.theme.spaces[7]}),(function(e){return e.theme.spaces[3]})),j=(0,l.default)(M).withConfig({displayName:"DraggableCard__DragButton",componentId:"sc-gn1l5y-1"})(["padding:0 ",";border-right:1px solid ",";cursor:all-scroll;svg{width:","rem;height:","rem;}"],(function(e){return e.theme.spaces[3]}),(function(e){return e.theme.colors.neutral150}),.75,.75),P=(0,l.default)(f.Flex).withConfig({displayName:"DraggableCard__FieldContainer",componentId:"sc-gn1l5y-2"})(["max-height:","rem;cursor:pointer;svg{width:","rem;height:","rem;path{fill:",";}}&:hover{background-color:",";border-color:",";svg{path{fill:",";}}","{color:",";}","{border-right:1px solid ",";}}"],2,.625,.625,(function(e){return e.theme.colors.neutral600}),(function(e){return e.theme.colors.primary100}),(function(e){return e.theme.colors.primary200}),(function(e){return e.theme.colors.primary600}),m.Typography,(function(e){return e.theme.colors.primary600}),j,(function(e){return e.theme.colors.primary200})),C=(0,l.default)(p.Box).withConfig({displayName:"DraggableCard__FieldWrapper",componentId:"sc-gn1l5y-3"})(["&:last-child{padding-right:",";}"],(function(e){return e.theme.spaces[3]})),k=function(e){var t=e.index,n=e.isDraggingSibling,r=e.labelField,a=e.onClickEditField,l=e.onMoveField,u=e.onRemoveField,p=e.name,w=e.setIsDraggingSibling,k=(0,c.useIntl)().formatMessage,_=(0,i.useRef)(null),R=(0,i.useRef)(null),T=(0,i.useState)(!1),x=(0,o.default)(T,2)[1],D=(0,i.useRef)(),S=(0,E.default)(r),I=(0,d.useDrop)({accept:O.ItemTypes.FIELD,hover:function(e,n){if(R.current){var r=e.index,a=t;if(r!==a){var o=R.current.getBoundingClientRect(),i=(o.right-o.left)/2,u=n.getClientOffset().x-o.left;r>a&&u>i||r<a&&u<i||(l(r,a),e.index=a)}}}}),q=(0,o.default)(I,2)[1],F=(0,d.useDrag)({type:O.ItemTypes.FIELD,item:function(){return{index:t,labelField:r,name:p}},collect:function(e){return{isDragging:e.isDragging()}},end:function(){w(!1)}}),L=(0,o.default)(F,3),A=L[0].isDragging,B=L[1],N=L[2];(0,i.useEffect)((function(){N((0,s.getEmptyImage)(),{captureDraggingState:!1})}),[N]),(0,i.useEffect)((function(){A&&w(!0)}),[A,w]),(0,i.useEffect)((function(){n||x((function(e){return!e}))}),[n]);var W={dragRef:B(_),dropRef:q(R)};return i.default.createElement(C,{ref:W?W.dropRef:null},A&&i.default.createElement(h.default,{transparent:!0,labelField:S}),!A&&n&&i.default.createElement(h.default,{isSibling:!0,labelField:S}),!A&&!n&&i.default.createElement(P,{borderColor:"neutral150",background:"neutral100",hasRadius:!0,justifyContent:"space-between",onClick:function(){D.current&&D.current.click()},isDragging:A},i.default.createElement(g.Stack,{horizontal:!0,size:3},i.default.createElement(j,{as:"span","aria-label":k({id:(0,O.getTrad)("components.DraggableCard.move.field"),defaultMessage:"Move {item}"},{item:p}),onClick:function(e){return e.stopPropagation()},ref:W.dragRef,type:"button"},i.default.createElement(v.default,null)),i.default.createElement(m.Typography,{fontWeight:"bold"},S)),i.default.createElement(f.Flex,{paddingLeft:3},i.default.createElement(M,{ref:D,onClick:function(e){e.stopPropagation(),a(p)},"aria-label":k({id:(0,O.getTrad)("components.DraggableCard.edit.field"),defaultMessage:"Edit {item}"},{item:p}),type:"button"},i.default.createElement(y.default,null)),i.default.createElement(M,{onClick:u,"data-testid":"delete-".concat(p),"aria-label":k({id:(0,O.getTrad)("components.DraggableCard.delete.field"),defaultMessage:"Delete {item}"},{item:p}),type:"button"},i.default.createElement(b.default,null)))))};k.propTypes={index:u.default.number.isRequired,isDraggingSibling:u.default.bool.isRequired,labelField:u.default.string.isRequired,name:u.default.string.isRequired,onClickEditField:u.default.func.isRequired,onMoveField:u.default.func.isRequired,onRemoveField:u.default.func.isRequired,setIsDraggingSibling:u.default.func.isRequired};var _=k;t.default=_},68222:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=n(97132),l=r(n(11700)),u=r(n(78384)),d=n(75146),s=n(49425),c=n(19408),f=n(67826),p=n(34626),m=n(55967),g=n(47857),y=n(28564),b=r(n(74373)),v=(0,u.default)(f.Flex).withConfig({displayName:"EditFieldForm__HeaderContainer",componentId:"sc-fftkcj-0"})(["svg{width:","rem;height:","rem;margin-right:",";}"],2,1.5,(function(e){return e.theme.spaces[3]})),h=function(e){var t=e.attributes,n=e.fieldForm,r=e.fieldToEdit,o=e.onCloseModal,u=e.onChangeEditLabel,f=e.onSubmit,h=e.type,E=(0,i.useIntl)().formatMessage,O=t[r].relationType,w=!["media","relation"].includes(h);return["oneWay","oneToOne","manyToOne"].includes(O)&&(w=!0),a.default.createElement(d.ModalLayout,{onClose:o,labelledBy:"title"},a.default.createElement("form",{onSubmit:f},a.default.createElement(d.ModalHeader,null,a.default.createElement(v,null,a.default.createElement(b.default,{type:h}),a.default.createElement(s.Typography,{fontWeight:"bold",textColor:"neutral800",as:"h2",id:"title"},E({id:(0,y.getTrad)("containers.ListSettingsView.modal-form.edit-label"),defaultMessage:"Edit {fieldName}"},{fieldName:(0,l.default)(r)})))),a.default.createElement(d.ModalBody,null,a.default.createElement(p.Grid,{gap:4},a.default.createElement(p.GridItem,{s:12,col:6},a.default.createElement(m.TextInput,{id:"label-input",label:E({id:(0,y.getTrad)("form.Input.label"),defaultMessage:"Label"}),name:"label",onChange:function(e){return u(e)},value:n.label,hint:E({id:(0,y.getTrad)("form.Input.label.inputDescription"),defaultMessage:"This value overrides the label displayed in the table's head"})})),w&&a.default.createElement(p.GridItem,{s:12,col:6},a.default.createElement(g.ToggleInput,{"data-testid":"Enable sort on this field",checked:n.sortable,label:E({id:(0,y.getTrad)("form.Input.sort.field"),defaultMessage:"Enable sort on this field"}),name:"sortable",onChange:function(e){return u({target:{name:"sortable",value:e.target.checked}})},onLabel:E({id:"app.components.ToggleCheckbox.on-label",defaultMessage:"on"}),offLabel:E({id:"app.components.ToggleCheckbox.off-label",defaultMessage:"off"})})))),a.default.createElement(d.ModalFooter,{startActions:a.default.createElement(c.Button,{onClick:o,variant:"tertiary"},E({id:"app.components.Button.cancel",defaultMessage:"Cancel"})),endActions:a.default.createElement(c.Button,{type:"submit"},E({id:"form.button.finish",defaultMessage:"Finish"}))})))};h.propTypes={attributes:o.default.objectOf(o.default.shape({relationType:o.default.string})).isRequired,fieldForm:o.default.shape({label:o.default.string,sortable:o.default.bool}).isRequired,fieldToEdit:o.default.string.isRequired,onChangeEditLabel:o.default.func.isRequired,onCloseModal:o.default.func.isRequired,onSubmit:o.default.func.isRequired,type:o.default.string.isRequired};var E=h;t.default=E},25183:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=r(n(78384)),l=n(97132),u=n(67826),d=n(34626),s=n(43808),c=n(47857),f=n(5493),p=n(49425),m=n(28564),g=(0,i.default)(u.Flex).withConfig({displayName:"Settings__FlexGap",componentId:"sc-j3a1zy-0"})(["gap:",";"],(function(e){return e.theme.spaces[4]})),y=function(e){var t=e.modifiedData,n=e.onChange,r=e.sortOptions,o=(0,l.useIntl)().formatMessage,i=t.settings;return a.default.createElement(a.default.Fragment,null,a.default.createElement(f.Box,{paddingBottom:4},a.default.createElement(p.Typography,{variant:"delta",as:"h2"},o({id:(0,m.getTrad)("containers.SettingPage.settings"),defaultMessage:"Settings"}))),a.default.createElement(g,{justifyContent:"space-between",wrap:"wrap",paddingBottom:6},a.default.createElement(c.ToggleInput,{label:o({id:(0,m.getTrad)("form.Input.search"),defaultMessage:"Enable search"}),onChange:function(e){n({target:{name:"settings.searchable",value:e.target.checked}})},onLabel:o({id:"app.components.ToggleCheckbox.on-label",defaultMessage:"on"}),offLabel:o({id:"app.components.ToggleCheckbox.off-label",defaultMessage:"off"}),name:"settings.searchable",checked:i.searchable}),a.default.createElement(c.ToggleInput,{label:o({id:(0,m.getTrad)("form.Input.filters"),defaultMessage:"Enable filters"}),onChange:function(e){n({target:{name:"settings.filterable",value:e.target.checked}})},onLabel:o({id:"app.components.ToggleCheckbox.on-label",defaultMessage:"on"}),offLabel:o({id:"app.components.ToggleCheckbox.off-label",defaultMessage:"off"}),name:"settings.filterable",checked:i.filterable}),a.default.createElement(c.ToggleInput,{label:o({id:(0,m.getTrad)("form.Input.bulkActions"),defaultMessage:"Enable bulk actions"}),onChange:function(e){n({target:{name:"settings.bulkable",value:e.target.checked}})},onLabel:o({id:"app.components.ToggleCheckbox.on-label",defaultMessage:"on"}),offLabel:o({id:"app.components.ToggleCheckbox.off-label",defaultMessage:"off"}),name:"settings.bulkable",checked:i.bulkable})),a.default.createElement(d.Grid,{gap:4},a.default.createElement(d.GridItem,{s:12,col:6},a.default.createElement(s.Select,{label:o({id:(0,m.getTrad)("form.Input.pageEntries"),defaultMessage:"Entries per page"}),hint:o({id:(0,m.getTrad)("form.Input.pageEntries.inputDescription"),defaultMessage:"Note: You can override this value in the Collection Type settings page."}),onChange:function(e){return n({target:{name:"settings.pageSize",value:e}})},name:"settings.pageSize",value:t.settings.pageSize||""},[10,20,50,100].map((function(e){return a.default.createElement(s.Option,{key:e,value:e},e)})))),a.default.createElement(d.GridItem,{s:12,col:3},a.default.createElement(s.Select,{label:o({id:(0,m.getTrad)("form.Input.defaultSort"),defaultMessage:"Default sort attribute"}),onChange:function(e){return n({target:{name:"settings.defaultSortBy",value:e}})},name:"settings.defaultSortBy",value:t.settings.defaultSortBy||""},r.map((function(e){return a.default.createElement(s.Option,{key:e,value:e},e)})))),a.default.createElement(d.GridItem,{s:12,col:3},a.default.createElement(s.Select,{label:o({id:(0,m.getTrad)("form.Input.sort.order"),defaultMessage:"Default sort order"}),onChange:function(e){return n({target:{name:"settings.defaultSortOrder",value:e}})},name:"settings.defaultSortOrder",value:t.settings.defaultSortOrder||""},["ASC","DESC"].map((function(e){return a.default.createElement(s.Option,{key:e,value:e},e)}))))))};y.defaultProps={modifiedData:{},sortOptions:[]},y.propTypes={modifiedData:o.default.object,onChange:o.default.func.isRequired,sortOptions:o.default.array};var b=y;t.default=b},42506:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(63038)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),l=r(n(78384)),u=n(45697),d=n(97132),s=n(5493),c=n(67826),f=n(9008),p=n(49425),m=n(33097),g=n(30741),y=r(n(80768)),b=r(n(46328)),v=n(28564);function h(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}var E=(0,l.default)(s.Box).withConfig({displayName:"SortDisplayedFields__FlexWrapper",componentId:"sc-fx02f9-0"})(["flex:",";"],(function(e){return e.size})),O=(0,l.default)(E).withConfig({displayName:"SortDisplayedFields__ScrollableContainer",componentId:"sc-fx02f9-1"})(["overflow-x:scroll;overflow-y:hidden;"]),w=(0,l.default)(E).withConfig({displayName:"SortDisplayedFields__SelectContainer",componentId:"sc-fx02f9-2"})(["max-width:","rem;"],2),M=function(e){var t=e.displayedFields,n=e.listRemainingFields,r=e.metadatas,a=e.onAddField,l=e.onClickEditField,u=e.onMoveField,h=e.onRemoveField,E=(0,d.useIntl)().formatMessage,M=(0,i.useState)(!1),j=(0,o.default)(M,2),P=j[0],C=j[1];return i.default.createElement(i.default.Fragment,null,i.default.createElement(s.Box,{paddingBottom:4},i.default.createElement(p.Typography,{variant:"delta",as:"h2"},E({id:(0,v.getTrad)("containers.SettingPage.view"),defaultMessage:"View"}))),i.default.createElement(c.Flex,{paddingTop:4,paddingLeft:4,paddingRight:4,borderColor:"neutral300",borderStyle:"dashed",borderWidth:"1px",hasRadius:!0},i.default.createElement(O,{size:"1",paddingBottom:4},i.default.createElement(f.Stack,{horizontal:!0,size:3},t.map((function(e,t){return i.default.createElement(b.default,{key:e,index:t,isDraggingSibling:P,onMoveField:u,onClickEditField:l,onRemoveField:function(e){return h(e,t)},name:e,labelField:r[e].list.label||e,setIsDraggingSibling:C})})))),i.default.createElement(w,{size:"auto",paddingBottom:4},i.default.createElement(m.SimpleMenu,{label:E({id:(0,v.getTrad)("components.FieldSelect.label"),defaultMessage:"Add a field"}),as:g.IconButton,icon:i.default.createElement(y.default,null),disabled:n.length<=0,"data-testid":"add-field"},n.map((function(e){return i.default.createElement(m.MenuItem,{key:e,onClick:function(){return a(e)}},e)}))))))};M.propTypes={displayedFields:u.PropTypes.array.isRequired,listRemainingFields:u.PropTypes.array.isRequired,metadatas:u.PropTypes.objectOf(u.PropTypes.shape({list:u.PropTypes.shape({label:u.PropTypes.string})})).isRequired,onAddField:u.PropTypes.func.isRequired,onClickEditField:u.PropTypes.func.isRequired,onMoveField:u.PropTypes.func.isRequired,onRemoveField:u.PropTypes.func.isRequired};var j=M;t.default=j},41540:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(87757)),i=r(n(48926)),l=r(n(63038)),u=L(n(67294)),d=r(n(45697)),s=n(23724),c=r(n(18446)),f=r(n(11700)),p=r(n(78718)),m=r(n(27361)),g=n(36232),y=n(68547),b=n(97132),v=n(5493),h=n(14276),E=n(78862),O=n(85104),w=n(62031),M=n(19408),j=r(n(84734)),P=r(n(68717)),C=n(28564),k=r(n(66973)),_=n(14772),R=r(n(69477)),T=r(n(25183)),x=r(n(42506)),D=r(n(68222)),S=r(n(98543)),I=L(n(19645)),q=n(9822);function F(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(F=function(e){return e?n:t})(e)}function L(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=F(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}var A=function(e){var t=e.layout,n=e.slug,r=(0,b.useIntl)().formatMessage,a=(0,y.useTracking)().trackUsage,d=(0,_.usePluginsQueryParams)(),F=(0,y.useNotification)(),L=(0,u.useContext)(k.default).refetchData,A=(0,u.useState)(!1),B=(0,l.default)(A,2),N=B[0],W=B[1],z=function(){return W((function(e){return!e}))},U=(0,u.useState)(!1),V=(0,l.default)(U,2),H=V[0],G=V[1],Z=function(){return G((function(e){return!e}))},$=(0,u.useReducer)(I.default,I.initialState,(function(){return(0,S.default)(I.initialState,t)})),Q=(0,l.default)($,2),Y=Q[0],J=Q[1],K=Y.fieldToEdit,X=Y.fieldForm,ee=Y.initialData,te=Y.modifiedData,ne=t.attributes,re=te.layouts.list,ae=function(){var e=(0,i.default)(o.default.mark((function e(){var t;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=(0,p.default)(te,["layouts","settings","metadatas"]),oe.mutate(t);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),oe=(0,s.useMutation)((function(e){return(0,R.default)(e,n)}),{onSuccess:function(){a("didEditListSettings"),L()},onError:function(){F({type:"warning",message:{id:"notification.error"}})}}),ie=oe.isLoading,le=Object.entries(ne).reduce((function(e,t){var n=(0,l.default)(t,2),r=n[0],a=n[1],o=(0,C.checkIfAttributeIsDisplayable)(a),i=re.includes(r);return o&&!i&&e.push(r),e}),[]).sort(),ue=Object.entries(ne).reduce((function(e,t){var n=(0,l.default)(t,2),r=n[0],a=n[1].type;return q.EXCLUDED_SORT_OPTIONS.includes(a)||e.push(r),e}),[]);return u.default.createElement(E.Layout,null,u.default.createElement(w.Main,{"aria-busy":ie},u.default.createElement("form",{onSubmit:function(e){e.preventDefault(),z(),a("willSaveContentTypeLayout")}},u.default.createElement(E.HeaderLayout,{navigationAction:u.default.createElement(O.Link,{startIcon:u.default.createElement(P.default,null),to:function(){var e=ee.settings,t=e.pageSize,n=e.defaultSortBy,r=e.defaultSortOrder,a=ee.kind,o=ee.uid,i="".concat(n,":").concat(r),l="".concat((0,g.stringify)({page:1,pageSize:t,sort:i},{encode:!1})).concat(d?"&".concat(d):"");return"/content-manager/".concat(a,"/").concat(o,"?").concat(l)},id:"go-back"},r({id:"app.components.go-back",defaultMessage:"Back"})),primaryAction:u.default.createElement(M.Button,{size:"L",startIcon:u.default.createElement(j.default,null),disabled:(0,c.default)(te,ee),type:"submit"},r({id:"form.button.save",defaultMessage:"Save"})),subtitle:r({id:(0,C.getTrad)("components.SettingsViewWrapper.pluginHeader.description.list-settings"),defaultMessage:"Define the settings of the list view."}),title:r({id:(0,C.getTrad)("components.SettingsViewWrapper.pluginHeader.title"),defaultMessage:"Configure the view - {name}"},{name:(0,f.default)(te.info.displayName)})}),u.default.createElement(E.ContentLayout,null,u.default.createElement(v.Box,{background:"neutral0",hasRadius:!0,shadow:"tableShadow",paddingTop:6,paddingBottom:6,paddingLeft:7,paddingRight:7},u.default.createElement(T.default,{modifiedData:te,onChange:function(e){var t=e.target,n=t.name,r=t.value;J({type:"ON_CHANGE",keys:n,value:"settings.pageSize"===n?parseInt(r,10):r})},sortOptions:ue}),u.default.createElement(v.Box,{paddingTop:6,paddingBottom:6},u.default.createElement(h.Divider,null)),u.default.createElement(x.default,{listRemainingFields:le,displayedFields:re,onAddField:function(e){J({type:"ADD_FIELD",item:e})},onClickEditField:function(e){J({type:"SET_FIELD_TO_EDIT",fieldToEdit:e}),Z()},onMoveField:function(e,t){J({type:"MOVE_FIELD",originalIndex:e,atIndex:t})},onRemoveField:function(e,t){e.stopPropagation(),1===re.length?F({type:"info",message:{id:(0,C.getTrad)("notification.info.minimumFields")}}):J({type:"REMOVE_FIELD",index:t})},metadatas:te.metadatas}))),u.default.createElement(y.ConfirmDialog,{bodyText:{id:(0,C.getTrad)("popUpWarning.warning.updateAllSettings"),defaultMessage:"This will modify all your settings"},iconRightButton:u.default.createElement(j.default,null),isConfirmButtonLoading:ie,isOpen:N,onToggleDialog:z,onConfirm:ae,variantRightButton:"success-light"})),H&&u.default.createElement(D.default,{attributes:ne,fieldForm:X,fieldToEdit:K,onChangeEditLabel:function(e){var t=e.target,n=t.name,r=t.value;J({type:"ON_CHANGE_FIELD_METAS",name:n,value:r})},onCloseModal:function(){J({type:"UNSET_FIELD_TO_EDIT"}),Z()},onSubmit:function(e){e.preventDefault(),Z(),J({type:"SUBMIT_FIELD_FORM"})},type:(0,m.default)(ne,[K,"type"],"text")})))};A.propTypes={layout:d.default.shape({uid:d.default.string.isRequired,settings:d.default.shape({bulkable:d.default.bool,defaultSortBy:d.default.string,defaultSortOrder:d.default.string,filterable:d.default.bool,pageSize:d.default.number,searchable:d.default.bool}).isRequired,metadatas:d.default.object.isRequired,options:d.default.object.isRequired,attributes:d.default.objectOf(d.default.shape({type:d.default.string})).isRequired}).isRequired,slug:d.default.string.isRequired};var B=(0,u.memo)(A);t.default=B},98543:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(59713));function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l=function(e,t){return i(i({},e),{},{initialData:t,modifiedData:t})};t.default=l},19645:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.initialState=t.default=void 0;var a=r(n(319)),o=r(n(66312)),i=r(n(36968)),l=r(n(27361)),u=n(28564),d={fieldForm:{},fieldToEdit:"",initialData:{},modifiedData:{}};t.initialState=d;var s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,t=arguments.length>1?arguments[1]:void 0;return(0,o.default)(e,(function(n){var r=["modifiedData","layouts","list"];switch(t.type){case"ADD_FIELD":var o=(0,l.default)(e,r,[]);(0,i.default)(n,r,[t.item].concat((0,a.default)(o)));break;case"MOVE_FIELD":var d=(0,l.default)(e,r,[]),s=t.originalIndex,c=t.atIndex;(0,i.default)(n,r,(0,u.arrayMoveItem)(d,s,c));break;case"ON_CHANGE":(0,i.default)(n,["modifiedData"].concat((0,a.default)(t.keys.split("."))),t.value);break;case"ON_CHANGE_FIELD_METAS":(0,i.default)(n,["fieldForm",t.name],t.value);break;case"REMOVE_FIELD":var f=(0,l.default)(e,r,[]);(0,i.default)(n,r,f.filter((function(e,n){return t.index!==n})));break;case"SET_FIELD_TO_EDIT":var p=t.fieldToEdit;n.fieldToEdit=p,n.fieldForm.label=(0,l.default)(n,["modifiedData","metadatas",p,"list","label"],""),n.fieldForm.sortable=(0,l.default)(n,["modifiedData","metadatas",p,"list","sortable"],"");break;case"UNSET_FIELD_TO_EDIT":n.fieldForm={},n.fieldToEdit="";break;case"SUBMIT_FIELD_FORM":var m=["modifiedData","metadatas",e.fieldToEdit,"list"];(0,i.default)(n,[].concat(m,["label"]),e.fieldForm.label),(0,i.default)(n,[].concat(m,["sortable"]),e.fieldForm.sortable);break;default:return n}}))};t.default=s},69477:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(53777),a=n(28564),o=function(e,t){return r.axiosInstance.put((0,a.getRequestUrl)("content-types/".concat(t,"/configuration")),e)};t.default=o},77236:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){return e.length>20?"".concat(e.substring(0,20),"..."):e};t.default=n},9822:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXCLUDED_SORT_OPTIONS=void 0;t.EXCLUDED_SORT_OPTIONS=["media","richtext","dynamiczone","relation","component","json"]},68893:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(67154)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),l=r(n(45697)),u=n(68547),d=r(n(66473)),s=n(28564);function c(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}var f=function(e){var t=(0,i.useMemo)((function(){return(0,s.generatePermissionsObject)(e.slug)}),[e.slug]),n=(0,u.useRBAC)(t,e.permissions),r=n.isLoading,a=n.allowedActions;return r?i.default.createElement(u.LoadingIndicatorPage,null):i.default.createElement(d.default,(0,o.default)({},e,a))};f.defaultProps={permissions:[]},f.propTypes={permissions:l.default.array,slug:l.default.string.isRequired};var p=(0,i.memo)(f,(function(e,t){var n=(0,u.difference)(e,t);return Object.keys(n).filter((function(e){return"state"!==e})).length>0}));t.default=p},9017:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(67154)),i=r(n(63038)),l=r(n(6479)),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),d=n(37424),s=r(n(45697)),c=n(39711),f=n(68547),p=n(14772),m=n(14285),g=r(n(68893)),y=["layout"];function b(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}var v=function(e){var t=e.layout,n=(0,l.default)(e,y),r=(0,d.useDispatch)(),a=(0,c.useHistory)().replace,s=(0,f.useQueryParams)(),b=(0,i.default)(s,1)[0],v=b.query,h=b.rawQuery,E=(0,p.useSyncRbac)(v,n.slug,"listView"),O=(0,p.useFindRedirectionLink)(n.slug);return(0,u.useEffect)((function(){h||a(O)}),[h,a,O]),(0,u.useEffect)((function(){r((0,m.setLayout)(t.contentType))}),[r,t]),(0,u.useEffect)((function(){return function(){r((0,m.resetProps)())}}),[r]),E?u.default.createElement(g.default,(0,o.default)({},n,{layout:t,permissions:E})):null};v.propTypes={layout:s.default.exact({components:s.default.object.isRequired,contentType:s.default.shape({attributes:s.default.object.isRequired,metadatas:s.default.object.isRequired,layouts:s.default.shape({list:s.default.array.isRequired,editRelations:s.default.array}).isRequired,options:s.default.object.isRequired,settings:s.default.object.isRequired,pluginOptions:s.default.object}).isRequired}).isRequired,slug:s.default.string.isRequired};var h=v;t.default=h},17170:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),i=r(n(45697)),l=n(37424),u=n(97132),d=n(43808),s=n(5493),c=n(68547),f=n(14285),p=n(51046),m=r(n(38092));function g(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}var y=function(e){var t=e.layout,n=(0,l.useDispatch)(),r=(0,l.useSelector)(p.selectDisplayedHeaders),a=(0,c.useTracking)().trackUsage,i=(0,u.useIntl)().formatMessage,g=(0,m.default)(t.contentType.attributes).map((function(e){var n=t.contentType.metadatas[e].list;return{name:e,intlLabel:{id:n.label,defaultMessage:n.label}}})),y=r.map((function(e){return e.name}));return o.default.createElement(s.Box,{paddingTop:1,paddingBottom:1},o.default.createElement(d.Select,{"aria-label":"change displayed fields",value:y,onChange:function(e){if(a("didChangeDisplayedFields"),e.length<y.length){var t=y.filter((function(t){return-1===e.indexOf(t)}));n((0,f.onChangeListHeaders)({name:t[0],value:!0}))}else{var r=e.filter((function(e){return-1===y.indexOf(e)}));n((0,f.onChangeListHeaders)({name:r[0],value:!1}))}},customizeContent:function(e){return"".concat(e.length," currently selected")},multi:!0,size:"S"},g.map((function(e){return o.default.createElement(d.Option,{key:e.name,value:e.name},i({id:e.intlLabel.id||e.name,defaultMessage:e.intlLabel.defaultMessage||e.name}))}))))};y.propTypes={layout:i.default.shape({contentType:i.default.shape({attributes:i.default.object.isRequired,metadatas:i.default.object.isRequired,layouts:i.default.shape({list:i.default.array.isRequired,editRelations:i.default.array}).isRequired,options:i.default.object.isRequired,settings:i.default.object.isRequired}).isRequired}).isRequired};var b=(0,o.memo)(y);t.default=b},38092:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(28564),a=function(e){return Object.keys(e).reduce((function(t,n){var a=e[n];return(0,r.checkIfAttributeIsDisplayable)(a)&&t.push(n),t}),[]).sort()};t.default=a},34933:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=r(n(45697)),i=n(5493),l=n(67826),u=n(68547),d=function(e){var t=e.pagination;return a.default.createElement(i.Box,{paddingTop:4},a.default.createElement(l.Flex,{alignItems:"flex-end",justifyContent:"space-between"},a.default.createElement(u.PageSizeURLQuery,{trackedEvent:"willChangeNumberOfEntriesPerPage"}),a.default.createElement(u.PaginationURLQuery,{pagination:t})))};d.defaultProps={pagination:{pageCount:0,pageSize:10,total:0}},d.propTypes={pagination:o.default.shape({page:o.default.number,pageCount:o.default.number,pageSize:o.default.number,total:o.default.number})};var s=d;t.default=s},14285:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onResetListHeaders=t.onChangeListHeaders=t.getDataSucceeded=t.getData=void 0,t.resetProps=function(){return{type:r.RESET_PROPS}},t.setLayout=void 0;var r=n(8660);t.getData=function(){return{type:r.GET_DATA}};t.getDataSucceeded=function(e,t){return{type:r.GET_DATA_SUCCEEDED,pagination:e,data:t}};t.onResetListHeaders=function(){return{type:r.ON_RESET_LIST_HEADERS}};t.setLayout=function(e){return{contentType:e,displayedHeaders:e.layouts.list,type:r.SET_LIST_LAYOUT}};t.onChangeListHeaders=function(e){return{type:r.ON_CHANGE_LIST_HEADERS,target:e}}},66473:(e,t,n)=>{"use strict";var r=n(25108),a=n(95318),o=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.mapDispatchToProps=$;var i=a(n(87757)),l=a(n(67154)),u=a(n(48926)),d=a(n(63038)),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!==typeof e)return{default:e};var n=U(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),c=a(n(45697)),f=a(n(78384)),p=n(37424),m=a(n(69590)),g=n(35281),y=n(97132),b=n(39711),v=a(n(27361)),h=n(36232),E=n(68547),O=n(30741),w=n(62031),M=n(5493),j=n(78862),P=n(84686),C=n(19408),k=n(85104),_=a(n(68717)),R=a(n(80768)),T=a(n(70736)),x=a(n(9669)),D=n(53777),S=n(78024),I=a(n(18595)),q=a(n(13240)),F=n(28564),L=a(n(17170)),A=a(n(34933)),B=n(14285),N=a(n(51046)),W=n(85771),z=a(n(72632));function U(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(U=function(e){return e?n:t})(e)}var V=q.default.contentManager,H=(0,f.default)(O.IconButton).withConfig({displayName:"ListView__IconButtonCustom",componentId:"sc-1owh71w-0"})(["svg{path{fill:",";}}"],(function(e){return e.theme.colors.neutral900}));function G(e){var t=e.canCreate,n=e.canDelete,a=e.canRead,o=e.data,c=e.getData,f=e.getDataSucceeded,p=e.isLoading,m=e.layout,g=e.pagination,O=e.slug,q=g.total,B=m.contentType,N=B.metadatas,U=B.settings,G=U.bulkable,Z=U.filterable,$=U.searchable,Q=(0,E.useNotification)(),Y=(0,E.useTracking)().trackUsage,J=(0,E.useRBACProvider)().refetchPermissions,K=(0,s.useRef)(Y),X=(0,s.useRef)(J),ee=(0,P.useNotifyAT)().notifyStatus;(0,E.useFocusWhenNavigate)();var te=(0,E.useQueryParams)(),ne=(0,d.default)(te,1)[0].query,re=(0,W.buildQueryString)(ne),ae=(0,h.stringify)({plugins:ne.plugins},{encode:!1}),oe=(0,b.useLocation)().pathname,ie=(0,b.useHistory)().push,le=(0,y.useIntl)().formatMessage,ue=m.contentType,de=(0,v.default)(ue,"options.draftAndPublish",!1),se=(0,s.useRef)(""),ce=(0,s.useCallback)(function(){var e=(0,u.default)(i.default.mark((function e(t,n){var a,o,l,u,d;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c(),e.prev=1,a=n?{cancelToken:n.token}:null,e.next=5,D.axiosInstance.get(t,a);case 5:o=e.sent,l=o.data,u=l.results,d=l.pagination,ee(le({id:(0,F.getTrad)("utils.data-loaded"),defaultMessage:"{number, plural, =1 {# entry has} other {# entries have}} successfully been loaded"},{number:d.count})),f(d,u),e.next=26;break;case 13:if(e.prev=13,e.t0=e.catch(1),!x.default.isCancel(e.t0)){e.next=17;break}return e.abrupt("return");case 17:if(403!==(0,v.default)(e.t0,"response.status",null)){e.next=24;break}return e.next=21,X.current();case 21:return Q({type:"info",message:{id:(0,F.getTrad)("permissions.not-allowed.update")}}),ie("/"),e.abrupt("return");case 24:r.error(e.t0),Q({type:"warning",message:{id:(0,F.getTrad)("error.model.fetch")}});case 26:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(t,n){return e.apply(this,arguments)}}(),[le,c,f,ee,ie,Q]),fe=(0,s.useCallback)(function(){var e=(0,u.default)(i.default.mark((function e(t){var n;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,D.axiosInstance.post((0,F.getRequestUrl)("collection-types/".concat(O,"/actions/bulkDelete")),{ids:t});case 3:n=(0,F.getRequestUrl)("collection-types/".concat(O).concat(re)),ce(n),K.current("didBulkDeleteEntries"),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),Q({type:"warning",message:{id:(0,F.getTrad)("error.record.delete")}});case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),[ce,re,O,Q]),pe=(0,s.useCallback)(function(){var e=(0,u.default)(i.default.mark((function e(t){var n,r;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,D.axiosInstance.delete((0,F.getRequestUrl)("collection-types/".concat(O,"/").concat(t)));case 3:n=(0,F.getRequestUrl)("collection-types/".concat(O).concat(re)),ce(n),Q({type:"success",message:{id:(0,F.getTrad)("success.record.delete")}}),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),r=(0,v.default)(e.t0,"response.payload.message",le({id:(0,F.getTrad)("error.record.delete")})),Q({type:"warning",message:r});case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),[O,re,ce,Q,le]);(0,s.useEffect)((function(){var e=x.default.CancelToken.source(),t=a,n=(0,F.getRequestUrl)("collection-types/".concat(O).concat(re));return t&&n.includes(se.current)&&ce(n,e),function(){se.current=O,e.cancel("Operation canceled by the user.")}}),[a,c,O,re,f,ce]);var me=le({id:(0,F.getTrad)("header.name"),defaultMessage:"Content"}),ge=le({id:ue.info.displayName,defaultMessage:ue.info.displayName||me}),ye=a?le({id:(0,F.getTrad)("pages.ListView.header-subtitle"),defaultMessage:"{number, plural, =0 {# entries} one {# entry} other {# entries}} found"},{number:q}):null,be=function(e){return t?s.default.createElement(C.Button,(0,l.default)({},e,{onClick:function(){var e=de?{status:"draft"}:{};K.current("willCreateEntry",e),ie({pathname:"".concat(oe,"/create"),search:ne.plugins?ae:""})},startIcon:s.default.createElement(R.default,null)}),le({id:(0,F.getTrad)("HeaderLayout.button.label-add-entry"),defaultMessage:"Create new entry"})):null};return s.default.createElement(w.Main,{"aria-busy":p},s.default.createElement(j.HeaderLayout,{primaryAction:be(),subtitle:ye,title:ge,navigationAction:s.default.createElement(k.Link,{startIcon:s.default.createElement(_.default,null),to:"/content-manager/"},le({id:"app.components.HeaderLayout.link.go-back",defaultMessage:"Back"}))}),!a&&s.default.createElement(j.ActionLayout,{endActions:s.default.createElement(S.InjectionZone,{area:"contentManager.listView.actions"})}),a&&s.default.createElement(j.ActionLayout,{endActions:s.default.createElement(s.default.Fragment,null,s.default.createElement(S.InjectionZone,{area:"contentManager.listView.actions"}),s.default.createElement(L.default,{layout:m}),s.default.createElement(E.CheckPermissions,{permissions:V.collectionTypesConfigurations},s.default.createElement(M.Box,{paddingTop:1,paddingBottom:1},s.default.createElement(H,{onClick:function(){Y("willEditListLayout"),ie({pathname:"".concat(O,"/configurations/list"),search:ae})},icon:s.default.createElement(T.default,null),label:le({id:"app.links.configure-view",defaultMessage:"Configure the view"})})))),startActions:s.default.createElement(s.default.Fragment,null,$&&s.default.createElement(E.SearchURLQuery,{label:le({id:"app.component.search.label",defaultMessage:"Search for {target}"},{target:ge}),placeholder:le({id:"app.component.search.placeholder",defaultMessage:"Search..."}),trackedEvent:"didSearch"}),Z&&s.default.createElement(z.default,{contentType:ue,slug:O,metadatas:N}))}),s.default.createElement(j.ContentLayout,null,a?s.default.createElement(s.default.Fragment,null,s.default.createElement(I.default,{canCreate:t,canDelete:n,contentTypeName:ge,onConfirmDeleteAll:fe,onConfirmDelete:pe,isBulkable:G,isLoading:p,layout:m,rows:o,action:be({variant:"secondary"})}),s.default.createElement(A.default,{pagination:{pageCount:(null===g||void 0===g?void 0:g.pageCount)||1}})):s.default.createElement(E.NoPermissions,null)))}G.propTypes={canCreate:c.default.bool.isRequired,canDelete:c.default.bool.isRequired,canRead:c.default.bool.isRequired,data:c.default.array.isRequired,layout:c.default.exact({components:c.default.object.isRequired,contentType:c.default.shape({attributes:c.default.object.isRequired,metadatas:c.default.object.isRequired,info:c.default.shape({displayName:c.default.string.isRequired}).isRequired,layouts:c.default.shape({list:c.default.array.isRequired,editRelations:c.default.array}).isRequired,options:c.default.object.isRequired,settings:c.default.object.isRequired}).isRequired}).isRequired,isLoading:c.default.bool.isRequired,getData:c.default.func.isRequired,getDataSucceeded:c.default.func.isRequired,pagination:c.default.shape({total:c.default.number.isRequired,pageCount:c.default.number}).isRequired,slug:c.default.string.isRequired};var Z=(0,N.default)();function $(e){return(0,g.bindActionCreators)({getData:B.getData,getDataSucceeded:B.getDataSucceeded,onChangeListHeaders:B.onChangeListHeaders,onResetListHeaders:B.onResetListHeaders},e)}var Q=(0,p.connect)(Z,$),Y=(0,g.compose)(Q)((0,s.memo)(G,m.default));t.default=Y},51046:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectDisplayedHeaders=t.listViewDomain=t.default=void 0;var r=n(42279),a=n(97506),o=function(){return function(e){return e["content-manager_listView"]||a.initialState}};t.listViewDomain=o;t.selectDisplayedHeaders=function(e){return e["content-manager_listView"].displayedHeaders};var i=function(){return(0,r.createSelector)(o(),(function(e){return e}))};t.default=i},62616:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(59713)),o=r(n(6479)),i=n(36232),l=r(n(58927)),u=["plugins"];function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=s(s({},e),(0,l.default)(e.plugins)),n=(t.plugins,(0,o.default)(t,u));return"?".concat((0,i.stringify)(n,{encode:!1}))};t.default=c},58927:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){return Object.values(e||{}).reduce((function(e,t){return Object.assign(e,t)}),{})};t.default=n},85771:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"buildQueryString",{enumerable:!0,get:function(){return a.default}});var a=r(n(62616))},65639:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=n(68547),i=n(62031),l=n(60985),u=n(78862),d=n(62791),s=r(n(80768)),c=r(n(85407)),f=n(97132),p=n(28564),m=function(){var e=(0,f.useIntl)().formatMessage;return(0,o.useFocusWhenNavigate)(),a.default.createElement(i.Main,null,a.default.createElement(u.HeaderLayout,{title:e({id:(0,p.getTrad)("header.name"),defaultMessage:"Content"})}),a.default.createElement(u.ContentLayout,null,a.default.createElement(d.EmptyStateLayout,{action:a.default.createElement(l.LinkButton,{variant:"secondary",startIcon:a.default.createElement(s.default,null),to:"/plugins/content-type-builder/content-types/create-content-type"},e({id:"app.components.HomePage.create",defaultMessage:"Create your first Content-type"})),content:e({id:"content-manager.pages.NoContentType.text",defaultMessage:"You don't have any content yet, we recommend you to create your first Content-Type."}),hasRadius:!0,icon:a.default.createElement(c.default,{width:"10rem"}),shadow:"tableShadow"})))};t.default=m},20755:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67294)),o=n(68547),i=n(62031),l=n(78862),u=n(97132),d=n(28564),s=function(){var e=(0,u.useIntl)().formatMessage;return(0,o.useFocusWhenNavigate)(),a.default.createElement(i.Main,null,a.default.createElement(l.HeaderLayout,{title:e({id:(0,d.getTrad)("header.name"),defaultMessage:"Content"})}),a.default.createElement(l.ContentLayout,null,a.default.createElement(o.NoPermissions,null)))};t.default=s},88468:(e,t,n)=>{"use strict";var r=n(95318),a=n(50008);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(67294)),i=n(39711),l=r(n(45697)),u=n(68547),d=r(n(13240)),s=n(42688),c=n(14772),f=n(28564),p=r(n(11427)),m=r(n(40224));function g(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}var y=d.default.contentManager,b=function(e){var t=e.match,n=t.params.slug,r=t.url,a=(0,c.useFetchContentTypeLayout)(n),l=a.isLoading,d=a.layout,g=a.updateLayout,b=(0,o.useMemo)((function(){var e={},t={};return d.contentType&&(t=(0,f.formatLayoutToApi)(d.contentType)),d.components&&(e=Object.keys(d.components).reduce((function(e,t){return e[t]=(0,f.formatLayoutToApi)(d.components[t]),e}),{})),{rawContentTypeLayout:t,rawComponentsLayouts:e}}),[d]),v=b.rawContentTypeLayout,h=b.rawComponentsLayouts;return l?o.default.createElement(u.LoadingIndicatorPage,null):o.default.createElement(s.ContentTypeLayoutContext.Provider,{value:d},o.default.createElement(i.Switch,null,o.default.createElement(i.Route,{path:"".concat(r,"/configurations/edit")},o.default.createElement(u.CheckPagePermissions,{permissions:y.singleTypesConfigurations},o.default.createElement(m.default,{components:h,isContentTypeView:!0,mainLayout:v,slug:n,updateLayout:g}))),o.default.createElement(i.Route,{path:r,render:function(e){var t=e.location.state,r=e.history.goBack;return o.default.createElement(p.default,{layout:d,slug:n,isSingleType:!0,state:t,goBack:r})}})))};b.propTypes={match:l.default.shape({url:l.default.string.isRequired,params:l.default.shape({slug:l.default.string.isRequired}).isRequired}).isRequired};var v=(0,o.memo)(b);t.default=v},98744:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.submitSucceeded=t.setStatus=t.setDataStructures=t.resetProps=t.initForm=t.getDataSucceeded=t.getData=void 0;var r=n(90305);t.getData=function(){return{type:r.GET_DATA}};t.getDataSucceeded=function(e){return{type:r.GET_DATA_SUCCEEDED,data:e}};t.initForm=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:r.INIT_FORM,rawQuery:e,isSingleType:t}};t.resetProps=function(){return{type:r.RESET_PROPS}};t.setDataStructures=function(e,t){return{type:r.SET_DATA_STRUCTURES,componentsDataStructure:e,contentTypeDataStructure:t}};t.setStatus=function(e){return{type:r.SET_STATUS,status:e}};t.submitSucceeded=function(e){return{type:r.SUBMIT_SUCCEEDED,data:e}}},22787:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){return e["content-manager_editViewCrudReducer"]};t.default=n},26135:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={COMPONENT:"component",EDIT_FIELD:"editField",EDIT_RELATION:"editRelation",FIELD:"field",RELATION:"relation"}},75780:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(50361)),o=function(e,t,n){if(Array.isArray(e)&&t>=0&&n>=0&&t<=e.length-1&&n<=e.length-1){var r=(0,a.default)(e),o=r.splice(t,1);return r.splice(n,0,o[0]),r}return e};t.default=o},97635:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(96486),a=function(e){var t=e.type;return"relation"===t?!(0,r.toLower)(e.relationType).includes("morph"):!["json","component","dynamiczone","richtext","password"].includes(t)&&!!t};t.default=a},9882:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(96486),a=function e(t,n){return Object.keys(t).reduce((function(a,o){var i=(0,r.get)(t,[o],{}),l=i.default,u=i.component,d=i.type,s=i.required,c=i.min,f=i.repeatable;if("json"===d&&(a[o]=null),"json"===d&&!0===s&&(a[o]={}),void 0!==l&&(a[o]=l),"component"===d){var p=(0,r.get)(n,[u,"attributes"],{}),m=e(p,n);if(!0===s&&(a[o]=!0===f?[]:m),c&&!0===f&&s){a[o]=[];for(var g=0;g<c;g+=1)a[o].push(m)}}return"dynamiczone"===d&&!0===s&&(a[o]=[]),a}),{})};t.default=a},85410:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(59713)),o=r(n(6479)),i=n(96486),l=["layouts","metadatas"];function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s=function(e){var t=e.layouts,n=e.metadatas,r=(0,o.default)(e,l),u=t.list.map((function(e){return e.name?e.name:e})),s=t.editRelations.map((function(e){return e.name})),c=Object.keys(n).reduce((function(e,t){var r=(0,i.get)(n,[t],{}),o=r.edit;return o.mainField&&(o=d(d({},o),{},{mainField:r.edit.mainField.name})),d(d({},e),{},(0,a.default)({},t,{edit:o,list:(0,i.omit)(r.list,["mainField"])}))}),{}),f=t.edit.map((function(e){return e.map((function(e){return{name:e.name,size:e.size}}))}));return d(d({},r),{},{layouts:{edit:f,editRelations:s,list:u},metadatas:c})};t.default=s},38913:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.addSubjectToPermissionsArray=void 0;var a=r(n(59713));function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l=function(e,t){return e.map((function(e){return i(i({},e),{},{subject:t})}))};t.addSubjectToPermissionsArray=l;var u=function(e){var t={create:[{action:"plugin::content-manager.explorer.create",subject:null}],delete:[{action:"plugin::content-manager.explorer.delete",subject:null}],publish:[{action:"plugin::content-manager.explorer.publish",subject:null}],read:[{action:"plugin::content-manager.explorer.read",subject:null}],update:[{action:"plugin::content-manager.explorer.update",subject:null}]};return Object.keys(t).reduce((function(n,r){return n[r]=l(t[r],e),n}),{})};t.default=u},77700:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(96486),a=function(e){return e.split(".").filter((function(e){return(0,r.isNaN)(parseInt(e,10))}))};t.default=a},1256:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){return 0===e.length?-1:Math.max.apply(Math,e.map((function(e){return e.__temp_key__})))};t.default=n},56102:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){return"/content-manager/".concat(e)};t.default=n},36169:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){return"content-manager.".concat(e)};t.default=n},28564:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ItemTypes",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"arrayMoveItem",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"checkIfAttributeIsDisplayable",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"createDefaultForm",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"formatLayoutToApi",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"generatePermissionsObject",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"getFieldName",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"getMaxTempKey",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"getRequestUrl",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"getTrad",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"mergeMetasWithSchema",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(t,"removeKeyInObject",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"removePasswordFieldsFromData",{enumerable:!0,get:function(){return y.default}});var a=r(n(75780)),o=r(n(97635)),i=r(n(9882)),l=r(n(85410)),u=r(n(38913)),d=r(n(77700)),s=r(n(1256)),c=r(n(56102)),f=r(n(36169)),p=r(n(26135)),m=r(n(25312)),g=r(n(84856)),y=r(n(91945))},25312:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(59713)),o=n(96486);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(e,t,n){var r=function(e){return t.find((function(t){return t.uid===e}))},a=Object.assign({},e),i=e[n].uid,u=r(i);return(0,o.set)(a,[n],l(l({},e[n]),u)),Object.keys(e.components).forEach((function(t){var n=r(t);(0,o.set)(a,["components",t],l(l({},e.components[t]),n))})),a};t.default=u},84856:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(50008)),o=r(n(59713));function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function e(t,n){return t?Object.keys(t).reduce((function(t,r){var i=t[r];return null===i?t:Array.isArray(i)?Array.isArray(t)?(t[r]=e(i,n),t):l(l({},t),{},(0,o.default)({},r,i.map((function(t){return e(t,n)})))):"object"===(0,a.default)(i)?!0===i._isAMomentObject?l(l({},t),{},(0,o.default)({},r,i)):Array.isArray(t)?(t[r]=e(i,n),t):l(l({},t),{},(0,o.default)({},r,e(i,n))):(r===n&&delete t[r],t)}),t):t};t.default=u},91945:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(96486),a=n(68547),o=function(e,t,n){return function e(t,o){return Object.keys(t).reduce((function(i,l){var u=(0,a.getType)(o,l),d=(0,r.get)(t,l),s=(0,a.getOtherInfos)(o,[l,"component"]),c=(0,a.getOtherInfos)(o,[l,"repeatable"]);return"dynamiczone"===u?(i[l]=d.map((function(t){return e(t,n[t.__component])})),i):"component"===u?(i[l]=c?d?d.map((function(t){return e(t,n[s])})):d:d?e(d,n[s]):d,i):("password"!==u&&(i[l]=d),i)}),{})}(e,t)};t.default=o},5531:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(67154)),o=r(n(6479)),i=r(n(67294)),l=r(n(45697)),u=n(73460),d=["area"],s=function(e){var t=e.area,n=(0,o.default)(e,d);return(0,u.useInjectionZone)(t).map((function(e){return i.default.createElement(e.Component,(0,a.default)({key:e.name},n))}))};s.propTypes={area:l.default.string.isRequired};var c=s;t.default=c},78024:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"InjectionZone",{enumerable:!0,get:function(){return a.default}});var a=r(n(5531))},73460:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useAdminProvider",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"useInjectionZone",{enumerable:!0,get:function(){return o.default}});var a=r(n(76710)),o=r(n(48721))},76710:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(67294),a=n(66592),o=function(){return(0,r.useContext)(a.AdminContext)};t.default=o},48721:(e,t,n)=>{"use strict";var r=n(95318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(63038)),o=r(n(76710)),i=function(e){var t=(0,o.default)().getAdminInjectedComponents,n=e.split("."),r=(0,a.default)(n,3);return t(r[0],r[1],r[2])};t.default=i},22868:()=>{},14777:()=>{},99830:()=>{},70209:()=>{},87414:()=>{}}]);