@strapi/admin 4.12.1 → 4.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/src/content-manager/pages/EditSettingsView/index.js +1 -1
- package/admin/src/content-manager/pages/ListView/components/BulkActionButtons/SelectedEntriesModal/index.js +7 -2
- package/admin/src/content-manager/pages/ListView/index.js +7 -1
- package/admin/src/hooks/index.js +0 -3
- package/admin/src/hooks/useAdminRolePermissions/__mocks__/index.js +5 -0
- package/admin/src/hooks/useAdminRolePermissions/index.js +34 -0
- package/admin/src/hooks/useAdminRoles/__mocks__/index.js +5 -0
- package/admin/src/hooks/useAdminRoles/index.js +40 -0
- package/admin/src/pages/InstalledPluginsPage/Plugins.js +2 -2
- package/admin/src/pages/InstalledPluginsPage/hooks/usePlugins/index.js +29 -0
- package/admin/src/pages/MarketplacePage/hooks/useFetchMarketplacePlugins/index.js +44 -0
- package/admin/src/pages/MarketplacePage/hooks/useFetchMarketplaceProviders/index.js +44 -0
- package/admin/src/pages/MarketplacePage/utils/useMarketplaceData.js +2 -2
- package/admin/src/pages/SettingsPage/pages/Roles/CreatePage/index.js +24 -9
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/RoleForm/index.js +1 -0
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/index.js +34 -20
- package/admin/src/pages/SettingsPage/pages/Roles/ListPage/index.js +31 -84
- package/admin/src/pages/SettingsPage/pages/Roles/hooks/useAdminRolePermissionLayout/index.js +23 -0
- package/admin/src/translations/en.json +1 -1
- package/build/1049.f76cb14b.chunk.js +1 -0
- package/build/{2225.0e4f8c77.chunk.js → 2225.c6244756.chunk.js} +1 -1
- package/build/{Admin-authenticatedApp.8dfbc48d.chunk.js → Admin-authenticatedApp.3c585a0d.chunk.js} +2 -2
- package/build/{Admin_marketplace.f0b87fce.chunk.js → Admin_marketplace.dde9c148.chunk.js} +6 -6
- package/build/Admin_pluginsPage.bbe79434.chunk.js +6 -0
- package/build/{Admin_profilePage.ca82c67b.chunk.js → Admin_profilePage.192edc52.chunk.js} +1 -1
- package/build/{Admin_settingsPage.50c867bf.chunk.js → Admin_settingsPage.97cb9d41.chunk.js} +1 -1
- package/build/admin-app.91898385.chunk.js +36 -0
- package/build/admin-edit-roles-page.6d567273.chunk.js +267 -0
- package/build/admin-roles-list.23ddff26.chunk.js +22 -0
- package/build/content-manager.2af15f57.chunk.js +1099 -0
- package/build/content-type-builder.40534de5.chunk.js +170 -0
- package/build/{en-json.01456e61.chunk.js → en-json.08c05fcf.chunk.js} +1 -1
- package/build/index.html +1 -1
- package/build/{main.1f8cc299.js → main.f13fc96c.js} +204 -204
- package/build/{runtime~main.80a43c16.js → runtime~main.2902859a.js} +2 -2
- package/build/sso-settings-page.12b6d8ae.chunk.js +1 -0
- package/build/transfer-tokens-list-page.22147d2c.chunk.js +16 -0
- package/build/{upload.77d8a64c.chunk.js → upload.37488080.chunk.js} +3 -3
- package/ee/admin/pages/SettingsPage/pages/SingleSignOn/index.js +15 -24
- package/index.js +2 -0
- package/package.json +8 -8
- package/scripts/build.js +1 -0
- package/server/controllers/role.js +9 -1
- package/server/services/role.js +3 -2
- package/webpack.config.js +2 -1
- package/admin/src/hooks/marketplace/useFetchMarketplacePlugins/index.js +0 -44
- package/admin/src/hooks/marketplace/useFetchMarketplaceProviders/index.js +0 -44
- package/admin/src/hooks/useFetchEnabledPlugins/index.js +0 -24
- package/admin/src/hooks/useFetchEnabledPlugins/utils/api.js +0 -10
- package/admin/src/hooks/useFetchPermissionsLayout/index.js +0 -42
- package/admin/src/hooks/useFetchPermissionsLayout/reducer.js +0 -35
- package/admin/src/hooks/useFetchRole/index.js +0 -68
- package/admin/src/hooks/useFetchRole/reducer.js +0 -33
- package/admin/src/hooks/useRolesList/index.js +0 -58
- package/admin/src/hooks/useRolesList/init.js +0 -5
- package/admin/src/hooks/useRolesList/reducer.js +0 -31
- package/build/1049.c3d082e9.chunk.js +0 -1
- package/build/Admin_pluginsPage.8728ff6e.chunk.js +0 -6
- package/build/admin-app.041dcd81.chunk.js +0 -36
- package/build/admin-edit-roles-page.a49b9f4f.chunk.js +0 -267
- package/build/admin-roles-list.0c129e98.chunk.js +0 -23
- package/build/content-manager.098eb004.chunk.js +0 -1099
- package/build/content-type-builder.64f4d6ac.chunk.js +0 -170
- package/build/sso-settings-page.81152e62.chunk.js +0 -1
- package/build/transfer-tokens-list-page.692eee77.chunk.js +0 -16
- /package/admin/src/{hooks/marketplace → pages/MarketplacePage}/constants.js +0 -0
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[8880],{93953:function(Y,W,a){"use strict";a.d(W,{Z:function(){return Qe}});var t=a(32735),N=a(72850),p=a(19565),$=a(32031),S=a(73779),j=a(74512);const F=J=>(0,j.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 32 24",...J,children:[(0,j.jsx)("rect",{width:31,height:23,x:.5,y:.5,fill:"#4945FF",stroke:"#4945FF",rx:2.5}),(0,j.jsx)("path",{fill:"#fff",d:"M15.328 10.54h1.723c.012-.089.012-.165.012-.253 0-1.676-1.471-2.959-3.41-2.959-2.696 0-4.647 2.22-4.647 5.344 0 2.15 1.383 3.545 3.504 3.545 2.045 0 3.597-1.154 3.967-2.936h-1.752c-.276.826-1.102 1.371-2.063 1.371-1.137 0-1.846-.802-1.846-2.103 0-2.08 1.19-3.65 2.725-3.65 1.037 0 1.746.62 1.787 1.558v.082ZM21.053 16l1.488-6.943h2.531l.31-1.512H18.54l-.31 1.512h2.53L19.272 16h1.782Z"})]}),se=F;var ie=a(1176),Pe=a(88675),He=a(15431),Ge=a(22348),Ue=a(7184),z=a(43475),pe=a(872);const X=J=>(0,j.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 32 24",...J,children:[(0,j.jsx)("path",{fill:"#FDF4DC",stroke:"#FAE7B9",d:"M.5 3A2.5 2.5 0 0 1 3 .5h26A2.5 2.5 0 0 1 31.5 3v18a2.5 2.5 0 0 1-2.5 2.5H3A2.5 2.5 0 0 1 .5 21V3Z"}),(0,j.jsx)("path",{fill:"#D9822F",d:"M20.158 11.995c0-.591-.463-1.073-1.045-1.11H13.53V9.245a2.05 2.05 0 0 1 2.046-2.049c1.13 0 2.048.784 2.049 1.913 0 .24.194.433.433.433h.33a.433.433 0 0 0 .433-.433C18.82 7.32 17.365 5.999 15.577 6a3.246 3.246 0 0 0-3.241 3.244v1.642h-.223c-.615 0-1.113.499-1.113 1.114v4.887c.001.615.5 1.113 1.115 1.113l6.93-.003c.616 0 1.114-.5 1.114-1.115l-.001-4.887Z"})]}),Te=X;var A=a(82512);const k=J=>(0,j.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 32 24",...J,children:[(0,j.jsx)("rect",{width:31,height:23,x:.5,y:.5,fill:"#EAF5FF",stroke:"#B8E1FF",rx:2.5}),(0,j.jsx)("path",{fill:"#0C75AF",fillRule:"evenodd",d:"M19.286 9.286v-.857a.397.397 0 0 0-.138-.302A.465.465 0 0 0 18.82 8h-8.357a.465.465 0 0 0-.326.127.397.397 0 0 0-.138.302v.857c0 .116.046.216.138.301.092.085.2.127.326.127h8.357a.465.465 0 0 0 .327-.127.397.397 0 0 0 .138-.301Zm2.785 2.713v.857a.397.397 0 0 1-.137.301.465.465 0 0 1-.327.128H10.464a.465.465 0 0 1-.326-.128.397.397 0 0 1-.138-.301v-.857c0-.116.046-.217.138-.302a.465.465 0 0 1 .326-.127h11.143c.126 0 .235.043.327.127a.397.397 0 0 1 .137.302Zm-1.857 3.574v.857a.397.397 0 0 1-.137.302.465.465 0 0 1-.327.127h-9.286a.465.465 0 0 1-.326-.127.397.397 0 0 1-.138-.302v-.857c0-.116.046-.216.138-.301a.465.465 0 0 1 .326-.127h9.286c.126 0 .235.042.326.127a.397.397 0 0 1 .138.301Z",clipRule:"evenodd"})]}),Ae=k,xe=J=>(0,j.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 32 24",...J,children:[(0,j.jsx)("rect",{width:31,height:23,x:.5,y:.5,fill:"#0C75AF",stroke:"#0C75AF",rx:2.5}),(0,j.jsx)("path",{fill:"#fff",d:"M8.523 13.586c.106 1.64 1.418 2.63 3.34 2.63 2.098 0 3.516-1.113 3.516-2.788 0-1.143-.65-1.846-2.086-2.297l-.867-.27c-.797-.252-1.137-.597-1.137-1.066 0-.598.633-1.031 1.459-1.031.873 0 1.512.474 1.617 1.183h1.67c-.053-1.54-1.36-2.619-3.217-2.619-1.91 0-3.328 1.131-3.328 2.678 0 1.09.715 1.922 1.963 2.309l.879.275c.914.287 1.266.592 1.266 1.084 0 .662-.657 1.107-1.606 1.107-.914 0-1.635-.469-1.758-1.195h-1.71ZM20.107 16l1.489-6.943h2.531l.31-1.512h-6.843l-.31 1.512h2.53L18.326 16h1.781Z"})]}),ue=xe;var Le=a(83218),We=a(17757),ge=a(60216),Ie=a.n(ge),he=a(8471);const je={biginteger:$.Z,boolean:S.Z,collectionType:se,component:ie.Z,contentType:se,date:Pe.Z,datetime:Pe.Z,decimal:$.Z,dynamiczone:He.Z,email:Ge.Z,enum:Ue.Z,enumeration:Ue.Z,file:z.Z,files:z.Z,float:$.Z,integer:$.Z,json:pe.Z,JSON:pe.Z,media:z.Z,number:$.Z,password:Te,relation:A.Z,richtext:Ae,singleType:ue,string:Le.Z,text:Le.Z,time:Pe.Z,timestamp:Pe.Z,uid:We.Z},c=(0,he.ZP)(N.x)`
|
|
2
|
-
svg {
|
|
3
|
-
height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
}
|
|
6
|
-
`,qe=({type:J,customField:Oe,...H})=>{const Rt=(0,p.mZ)();let Je=je[J];if(Oe){const{icon:dt}=Rt.get(Oe);dt&&(Je=dt)}return je[J]?t.createElement(c,{height:(0,p.Q1)(24),width:(0,p.Q1)(32),shrink:0,...H,"aria-hidden":!0},t.createElement(N.x,{as:Je})):null};qe.defaultProps={customField:null},qe.propTypes={type:Ie().string.isRequired,customField:Ie().string};var Qe=qe},51401:function(Y,W,a){"use strict";a.d(W,{c:function(){return Ba}});var t=a(55805),N=a(31206),p=a(97075),$=a(14949),S=a(29439),j=a(8482),F=a(65261),se=a(55877),ie=a(84298),Pe=a(73906),He=a(37272),Ge=a(67121),Ue=a(39869),z=a(35635),pe=a(26366),X=a(98464),Te=a(2362),A=a(89992),k=a(10473),Ae=a(95971),xe=a(66456),ue=a(72536),Le=a(68312),We=a(80601),ge=a(45112),Ie=a(74464),he=a(70809),je=a(98148),c=a(81424),qe=a(69317),Qe=a(25789),J=a(77359),Oe=a(50416),H=a(20015),Rt=a(20276),Je=a(82068),dt=a(41645),qt=a(61294),Qt=a(65943),R=a(8606),Yt=a(7961),Xt=a(92967),Jt=a(18070),Ot=a(54894),ea=a(30285),ta=a(96011),aa=a(47041),s=a(60625),Se=a(5644),na=a(78150),sa=a(63717),Ke=a(24609),oa=a(86543),Pt=a(62864),At=a(92989),$e=a(49886),ct=a(47052),ze=a(50694),ra=a(81875),Q=a(92323),ia=a(49844),la=a(11631),da=a(9254),Dt=a(2669),yn=a(18709),Lt=a(20258),vn=a(43231),xt=a(45147),It=a(23154),ca=a(26253),ut=a(79634),xa=a(32548),mt=a(99482),ft=a(45323),et=a(76994),tt=a(88777),En=a(95703),St=a(8981),_t=a(7733),ua=a(10168),Mn=a(25449),Nt=a(83900),Ft=a(32645),ma=a(78429),fa=a(68625),Bt=a(9882),_a=a(11417),Ye=a(39698),pa=a(92168),ga=a(69621),ba=a(2438),ha=a(19406),ya=a(92254),va=a(2287),Ea=a(29685),Ma=a(65663),Tn=a(5502),Ta=a(31047),Cn=a(93307),Ca=a(78055),Ut=a(51239),Za=a(6792),at=a(75156),nt=a(80683),pt=a(2689),Ra=a(40202),Wt=a(36919),Oa=a(75444),gt=a(92003),bt=a(4511),jt=a(2847),Pa=a(83139),Kt=a(53779),ht=a(72890),Aa=a(84411),yt=a(37193),Da=a(74831),$t=a(99221),La=a(34119),vt=a(99283),Ia=a(21371),Et=a(70727),Sa=a(42213),zt=a(8611),Na=a(20448),Fa=a(73165);const Ba={alien:t.Z,apps:N.Z,archive:p.Z,arrowDown:$.Z,arrowLeft:S.Z,arrowRight:j.Z,arrowUp:F.Z,attachment:se.Z,bell:ie.Z,bold:Pe.Z,book:He.Z,briefcase:Ge.Z,brush:Ue.Z,bulletList:z.Z,calendar:pe.Z,car:X.Z,cast:Te.Z,chartBubble:A.Z,chartCircle:k.Z,chartPie:Ae.Z,check:xe.Z,clock:ue.Z,cloud:Le.Z,code:We.Z,cog:ge.Z,collapse:Ie.Z,command:he.Z,connector:je.Z,crop:c.Z,crown:qe.Z,cube:Qe.Z,cup:J.Z,cursor:Oe.Z,dashboard:H.Z,database:Rt.Z,discuss:Je.Z,doctor:dt.Z,earth:qt.Z,emotionHappy:Qt.Z,emotionUnhappy:R.Z,envelop:Yt.Z,exit:Xt.Z,expand:Jt.Z,eye:Ot.Z,feather:ea.Z,file:ta.Z,fileError:aa.Z,filePdf:s.Z,filter:Se.Z,folder:na.Z,gate:sa.Z,gift:Ke.Z,globe:oa.Z,grid:Pt.Z,handHeart:At.Z,hashtag:$e.Z,headphone:ct.Z,heart:ze.Z,house:ra.Z,information:Q.Z,italic:ia.Z,key:la.Z,landscape:da.Z,layer:Dt.Z,layout:yn.Z,lightbulb:Lt.Z,link:vn.Z,lock:xt.Z,magic:It.Z,manyToMany:ca.Z,manyToOne:ut.Z,manyWays:xa.Z,medium:mt.Z,message:ft.Z,microphone:et.Z,monitor:tt.Z,moon:En.Z,music:St.Z,oneToMany:_t.Z,oneToOne:ua.Z,oneWay:Mn.Z,paint:Nt.Z,paintBrush:Ft.Z,paperPlane:ma.Z,pencil:fa.Z,phone:Bt.Z,picture:_a.Z,pin:Ye.Z,pinMap:pa.Z,plane:ga.Z,play:ba.Z,plus:ha.Z,priceTag:ya.Z,puzzle:va.Z,question:Ea.Z,quote:Ma.Z,repeat:Tn.Z,restaurant:Ta.Z,rocket:Cn.Z,rotate:Ca.Z,scissors:Ut.Z,search:Za.Z,seed:at.Z,server:nt.Z,shield:pt.Z,shirt:Ra.Z,shoppingCart:Wt.Z,slideshow:Oa.Z,stack:gt.Z,star:bt.Z,store:jt.Z,strikeThrough:Pa.Z,sun:Kt.Z,television:ht.Z,thumbDown:Aa.Z,thumbUp:yt.Z,train:Da.Z,twitter:$t.Z,typhoon:La.Z,underline:vt.Z,user:Ia.Z,volumeMute:Et.Z,volumeUp:Sa.Z,walk:zt.Z,wheelchair:Na.Z,write:Fa.Z}},52219:function(Y,W,a){"use strict";var t=a(32735);const N=(0,t.createContext)();W.Z=N},89798:function(Y,W,a){"use strict";var t=a(32735);const N=(0,t.createContext)();W.Z=N},97782:function(Y,W,a){"use strict";var t=a(32735),N=a(52219);const p=()=>(0,t.useContext)(N.Z);W.Z=p},20666:function(Y,W,a){"use strict";var t=a(32735),N=a(89798);const p=()=>(0,t.useContext)(N.Z);W.Z=p},90520:function(Y,W,a){"use strict";a.r(W),a.d(W,{default:function(){return Ho}});var t=a(32735),N=a(96709),p=a(19565),$=a(74758),S=a(67879),j=a(53038),F=a(72850),se=a(7563),ie=a(99140),Pe=a(90700),He=a(78090),Ge=a(77013),Ue=a(79318),z=a(74512),pe=a(16899),X=a(8471),Te=a(74971),A=a(87933),k=a(49372);const Ae=(0,X.ZP)(F.x)`
|
|
7
|
-
svg {
|
|
8
|
-
height: ${4/16}rem;
|
|
9
|
-
path {
|
|
10
|
-
fill: ${({theme:e})=>e.colors.neutral700};
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
`,xe=X.ZP.button`
|
|
14
|
-
border: none;
|
|
15
|
-
padding: 0;
|
|
16
|
-
background: transparent;
|
|
17
|
-
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
`,ue=X.ZP.div`
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: center;
|
|
22
|
-
width: ${12/16}rem;
|
|
23
|
-
transform: rotateX(${({rotated:e})=>e?"0deg":"180deg"});
|
|
24
|
-
`,Le=({label:e,children:n,id:o})=>{const[i,r]=(0,t.useState)(!0),d=(0,Te.M)(o);return(0,z.jsxs)(F.x,{children:[(0,z.jsx)(Ae,{paddingLeft:7,paddingTop:2,paddingBottom:2,paddingRight:4,children:(0,z.jsx)(A.k,{justifyContent:"space-between",children:(0,z.jsxs)(xe,{onClick:()=>{r(l=>!l)},"aria-expanded":i,"aria-controls":d,children:[(0,z.jsx)(ue,{rotated:i,children:(0,z.jsx)(pe.Z,{"aria-hidden":!0})}),(0,z.jsx)(F.x,{paddingLeft:2,children:(0,z.jsx)(k.Z,{as:"span",fontWeight:"semiBold",textColor:"neutral800",children:e})})]})})}),i&&(0,z.jsx)("ul",{id:d,children:t.Children.map(n,(l,x)=>(0,z.jsx)("li",{children:l},x))})]})};var We=a(66618),ge=a(19406),Ie=a(23940),he=a.n(Ie),je=a(14911),c=a(32105),qe=a(89793),Qe=a.n(qe),J=a(97782),Oe=a(20666),H=a(53728),Je=()=>{const{components:e,componentsGroupedByCategory:n,contentTypes:o,isInDevelopmentMode:i,sortedContentTypesList:r,modifiedData:d,initialData:l}=(0,J.Z)(),x=(0,p.lm)(),{trackUsage:u}=(0,p.rS)(),[_,f]=(0,t.useState)(""),{onOpenModalCreateSchema:m,onOpenModalEditCategory:M}=(0,Oe.Z)(),{locale:E}=(0,S.Z)(),{startsWith:y}=(0,p.L0)(E,{sensitivity:"base"}),C=(0,p.Xe)(E,{sensitivity:"base"}),L=!Object.keys(o).some(B=>o[B].isTemporary===!0)&&!Object.keys(e).some(B=>e[B].isTemporary===!0)&&Qe()(d,l),v=()=>{L?(u("willCreateContentType"),m({modalType:"contentType",kind:"collectionType",actionType:"create",forTarget:"contentType"})):I()},O=()=>{L?(u("willCreateSingleType"),m({modalType:"contentType",kind:"singleType",actionType:"create",forTarget:"contentType"})):I()},D=()=>{L?(u("willCreateComponent"),m({modalType:"component",kind:null,actionType:"create",forTarget:"component"})):I()},I=()=>{x({type:"info",message:{id:(0,c.Z)("notification.info.creating.notSaved"),defaultMessage:"Please save your work before creating a new collection type or component"}})},G=Object.entries(n).map(([B,be])=>({name:B,title:B,isEditable:i,onClickEdit(q,ve){q.stopPropagation(),L?M(ve.name):I()},links:be.map(q=>({name:q.uid,to:`/plugins/${H.Z}/component-categories/${B}/${q.uid}`,title:q.schema.displayName})).sort((q,ve)=>C.compare(q.title,ve.title))})).sort((B,be)=>C.compare(B.title,be.title)),de=r.filter(B=>B.visible);return{menu:[{name:"models",title:{id:`${(0,c.Z)("menu.section.models.name")}`,defaultMessage:"Collection Types"},customLink:i&&{id:`${(0,c.Z)("button.model.create")}`,defaultMessage:"Create new collection type",onClick:v},links:de.filter(B=>B.kind==="collectionType")},{name:"singleTypes",title:{id:`${(0,c.Z)("menu.section.single-types.name")}`,defaultMessage:"Single Types"},customLink:i&&{id:`${(0,c.Z)("button.single-types.create")}`,defaultMessage:"Create new single type",onClick:O},links:de.filter(B=>B.kind==="singleType")},{name:"components",title:{id:`${(0,c.Z)("menu.section.components.name")}`,defaultMessage:"Components"},customLink:i&&{id:`${(0,c.Z)("button.component.create")}`,defaultMessage:"Create a new component",onClick:D},links:G}].map(B=>B.links.some(q=>Array.isArray(q.links))?{...B,links:B.links.map(q=>{const ve=q.links.filter(ae=>y(ae.title,_));return ve.length===0?null:{...q,links:ve.sort((ae,te)=>C.compare(ae.title,te.title))}}).filter(Boolean)}:{...B,links:B.links.filter(q=>y(q.title,_)).sort((q,ve)=>C.compare(q.title,ve.title))}),searchValue:_,onSearchChange:f}},qt=()=>{const{menu:e,searchValue:n,onSearchChange:o}=Je(),{formatMessage:i}=(0,S.Z)();return t.createElement(Pe.m,{ariaLabel:i({id:`${(0,c.Z)("plugin.name")}`,defaultMessage:"Content-Types Builder"})},t.createElement(He.p,{searchable:!0,value:n,onClear:()=>o(""),onChange:r=>o(r.target.value),label:i({id:`${(0,c.Z)("plugin.name")}`,defaultMessage:"Content-Types Builder"}),searchLabel:i({id:"global.search",defaultMessage:"Search"})}),t.createElement(Ge.Z,null,e.map(r=>t.createElement(t.Fragment,{key:r.name},t.createElement(Ue.D,{label:i({id:r.title.id,defaultMessage:r.title.defaultMessage}),collapsable:!0,badgeLabel:r.links.length.toString()},r.links.map(d=>d.links?t.createElement(Le,{key:d.name,label:he()(d.title)},d.links.map(l=>t.createElement(We.E,{as:je.OL,to:l.to,active:l.active,key:l.name,isSubSectionChild:!0},he()(i({id:l.name,defaultMessage:l.title}))))):t.createElement(We.E,{as:je.OL,to:d.to,active:d.active,key:d.name},he()(i({id:d.name,defaultMessage:d.title}))))),r.customLink&&t.createElement(F.x,{paddingLeft:7},t.createElement(se.A,{onClick:r.customLink.onClick,startIcon:t.createElement(ie.J,{as:ge.Z,width:(0,p.Q1)(8),height:(0,p.Q1)(8)}),marginTop:2},i({id:r.customLink.id,defaultMessage:r.customLink.defaultMessage})))))))},Qt=a(33795),R=a.n(Qt),Yt=a(81346),Xt=a.n(Yt),Jt=a(3040),Ot=a.n(Jt),ea=a(61868),ta=a.n(ea),aa=a(60216),s=a.n(aa),Se=a(15062),na=a(6680),sa=a(52219),Ke=a(19323),oa=a(85025),Pt=a(31600),At=a(91215),$e=a(90980),ct=a(9026),ze=a(3653),ra=a(11406),Q=a(41415),ia=a(23973),la=a.n(ia),da=a(59578),Dt=a.n(da),Lt=e=>e.kind==="collectionType"&&(e.restrictRelationsTo===null||Array.isArray(e.restrictRelationsTo)&&e.restrictRelationsTo.length>0),xt=(e,n)=>e.find(({name:o})=>o===n),It=a(27799);const ca=[{label:"All",children:[{label:"images (JPEG, PNG, GIF, SVG, TIFF, ICO, DVU)",value:"images"},{label:"videos (MPEG, MP4, Quicktime, WMV, AVI, FLV)",value:"videos"},{label:"audios (MP3, WAV, OGG)",value:"audios"},{label:"files (CSV, ZIP, PDF, Excel, JSON, ...)",value:"files"}]}],ut=({intlLabel:e,name:n,onChange:o,value:i})=>{const{formatMessage:r}=(0,S.Z)(),d=i===null||i.length===0?r({id:"global.none",defaultMessage:"None"}):[...i].sort().map(x=>he()(x)).join(", "),l=e.id?r({id:e.id,defaultMessage:e.defaultMessage}):n;return t.createElement(It.Q,{id:"select1",label:l,customizeContent:()=>d,onChange:x=>{x.length>0?o({target:{name:n,value:x,type:"allowed-types-select"}}):o({target:{name:n,value:null,type:"allowed-types-select"}})},options:ca,value:i||[]})};ut.defaultProps={value:null},ut.propTypes={intlLabel:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired,values:s().object}).isRequired,name:s().string.isRequired,onChange:s().func.isRequired,value:s().oneOfType([s().object,s().array])};var xa=ut,mt=a(861),ft=a(15335),et=a(5803),tt=a(93953),St=(0,X.ZP)(F.x)`
|
|
25
|
-
width: 100%;
|
|
26
|
-
height: 100%;
|
|
27
|
-
border: 1px solid ${({theme:e})=>e.colors.neutral200};
|
|
28
|
-
text-align: left;
|
|
29
|
-
&:hover {
|
|
30
|
-
background: ${({theme:e})=>e.colors.primary100};
|
|
31
|
-
border: 1px solid ${({theme:e})=>e.colors.primary200};
|
|
32
|
-
}
|
|
33
|
-
`;const _t=({type:e})=>{const{formatMessage:n}=(0,S.Z)(),{onClickSelectField:o}=(0,Oe.Z)(),i=()=>{o({attributeType:e,step:e==="component"?"1":null})};return t.createElement(St,{padding:4,as:"button",hasRadius:!0,type:"button",onClick:i},t.createElement(A.k,null,t.createElement(tt.Z,{type:e}),t.createElement(F.x,{paddingLeft:4},t.createElement(A.k,null,t.createElement(k.Z,{fontWeight:"bold"},n({id:(0,c.Z)(`attribute.${e}`),defaultMessage:e}))),t.createElement(A.k,null,t.createElement(k.Z,{variant:"pi",textColor:"neutral600"},n({id:(0,c.Z)(`attribute.${e}.description`),defaultMessage:"A type for modeling data"}))))))};_t.defaultProps={type:"text"},_t.propTypes={type:s().string};var ua=_t,Nt=e=>{const n=e%2===1;return{paddingLeft:n?2:0,paddingRight:n?0:2}};const Ft=({attributes:e})=>t.createElement(mt.k,{tagName:"button"},t.createElement(A.k,{direction:"column",alignItems:"stretch",gap:8},e.map((n,o)=>t.createElement(ft.r,{key:o,gap:0},n.map((i,r)=>{const{paddingLeft:d,paddingRight:l}=Nt(r);return t.createElement(et.P,{key:i,col:6,style:{height:"100%"}},t.createElement(F.x,{paddingLeft:d,paddingRight:l,paddingBottom:1,style:{height:"100%"}},t.createElement(ua,{type:i})))})))));Ft.propTypes={attributes:s().array.isRequired};var ma=Ft,fa=a(50428);const Bt=({customFieldUid:e,customField:n})=>{const{type:o,intlLabel:i,intlDescription:r}=n,{formatMessage:d}=(0,S.Z)(),{onClickSelectCustomField:l}=(0,Oe.Z)(),x=()=>{l({attributeType:o,customFieldUid:e})};return t.createElement(St,{padding:4,as:"button",hasRadius:!0,type:"button",onClick:x},t.createElement(A.k,null,t.createElement(tt.Z,{type:o,customField:e}),t.createElement(F.x,{paddingLeft:4},t.createElement(A.k,null,t.createElement(k.Z,{fontWeight:"bold"},d(i))),t.createElement(A.k,null,t.createElement(k.Z,{variant:"pi",textColor:"neutral600"},d(r))))))};Bt.propTypes={customFieldUid:s().string.isRequired,customField:s().shape({type:s().string.isRequired,icon:s().func,intlLabel:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired}).isRequired,intlDescription:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired}).isRequired}).isRequired};var _a=Bt,Ye=a(73342),pa=a(69783);const ga=(0,X.ZP)(pa.G)`
|
|
34
|
-
&[aria-disabled='true'] {
|
|
35
|
-
${Ye.sg}
|
|
36
|
-
&:active {
|
|
37
|
-
${Ye.sg}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
&:hover {
|
|
41
|
-
${Ye.yP}
|
|
42
|
-
}
|
|
43
|
-
&:active {
|
|
44
|
-
${Ye.tB}
|
|
45
|
-
}
|
|
46
|
-
${Ye.PD}
|
|
47
|
-
`,ba=t.forwardRef(({variant:e="default",startIcon:n,endIcon:o,disabled:i=!1,children:r,size:d="S",href:l,to:x,...u},_)=>{const f=l?"_blank":void 0,m=l?"noreferrer noopener":void 0,M=d==="S"?2:"10px",E=4;return(0,z.jsxs)(ga,{ref:_,"aria-disabled":i,size:d,variant:e,target:f,rel:m,to:i?void 0:x,href:i?"#":l,background:"buttonPrimary600",borderColor:"buttonPrimary600",hasRadius:!0,gap:2,inline:!0,paddingBottom:M,paddingLeft:E,paddingRight:E,paddingTop:M,pointerEvents:i?"none":void 0,...u,as:x&&!i?je.OL:"a",children:[n&&(0,z.jsx)(A.k,{"aria-hidden":!0,children:n}),(0,z.jsx)(k.Z,{variant:d==="S"?"pi":void 0,fontWeight:"bold",textColor:"buttonNeutral0",children:r}),o&&(0,z.jsx)(A.k,{"aria-hidden":!0,children:o})]})});var ha=a(54725),ya=a(33348),va=a.n(ya);const Ea=(0,X.ZP)(F.x)`
|
|
48
|
-
background: ${({theme:e})=>`linear-gradient(180deg, rgba(234, 234, 239, 0) 0%, ${e.colors.neutral150} 100%)`};
|
|
49
|
-
opacity: 0.33;
|
|
50
|
-
`,Ma=()=>t.createElement(A.k,{wrap:"wrap",gap:4},[...Array(4)].map((e,n)=>t.createElement(Ea,{key:`empty-card-${n}`,height:"138px",width:"375px",hasRadius:!0})));var Ta=()=>{const{formatMessage:e}=(0,S.Z)();return t.createElement(F.x,{position:"relative"},t.createElement(Ma,null),t.createElement(F.x,{position:"absolute",top:6,width:"100%"},t.createElement(A.k,{alignItems:"center",justifyContent:"center",direction:"column"},t.createElement(ie.J,{as:ha.Z,color:"",width:"160px",height:"88px"}),t.createElement(F.x,{paddingTop:6,paddingBottom:4},t.createElement(F.x,{textAlign:"center"},t.createElement(k.Z,{variant:"delta",as:"p",textColor:"neutral600"},e({id:(0,c.Z)("modalForm.empty.heading"),defaultMessage:"Nothing in here yet."})),t.createElement(F.x,{paddingTop:4},t.createElement(k.Z,{variant:"delta",as:"p",textColor:"neutral600"},e({id:(0,c.Z)("modalForm.empty.sub-heading"),defaultMessage:"Find what you are looking for through a wide range of extensions."}))))),t.createElement(ba,{to:`/marketplace?${va().stringify({categories:["Custom fields"]})}`,variant:"secondary",startIcon:t.createElement(ge.Z,null)},e({id:(0,c.Z)("modalForm.empty.button"),defaultMessage:"Add custom fields"})))))},Ca=()=>{const{formatMessage:e}=(0,S.Z)(),n=(0,p.mZ)(),o=Object.entries(n.getAll());if(!o.length)return t.createElement(Ta,null);const i=o.sort((r,d)=>r[1].name>d[1].name?1:-1);return t.createElement(mt.k,{tagName:"button"},t.createElement(A.k,{direction:"column",alignItems:"stretch",gap:3},t.createElement(ft.r,{gap:0},i.map(([r,d],l)=>{const{paddingLeft:x,paddingRight:u}=Nt(l);return t.createElement(et.P,{key:r,col:6,style:{height:"100%"}},t.createElement(F.x,{paddingLeft:x,paddingRight:u,paddingBottom:1,style:{height:"100%"}},t.createElement(_a,{key:r,customFieldUid:r,customField:d})))})),t.createElement(fa.r,{href:"https://docs.strapi.io/developer-docs/latest/development/custom-fields.html",isExternal:!0},e({id:(0,c.Z)("modalForm.tabs.custom.howToLink"),defaultMessage:"How to add custom fields"}))))};const Ut=({attributes:e,forTarget:n,kind:o})=>{const{formatMessage:i}=(0,S.Z)(),r=(0,c.Z)("modalForm.tabs.default"),d=(0,c.Z)("modalForm.tabs.custom"),l=n.includes("component")?"component":o,x=(0,c.Z)(`modalForm.sub-header.chooseAttribute.${l}`);return t.createElement(Pt.f,{padding:6},t.createElement(At.v,{label:i({id:(0,c.Z)("modalForm.tabs.label"),defaultMessage:"Default and Custom types tabs"}),id:"attribute-type-tabs",variant:"simple"},t.createElement(A.k,{justifyContent:"space-between"},t.createElement(k.Z,{variant:"beta",as:"h2"},i({id:x,defaultMessage:"Select a field"})),t.createElement($e.m,null,t.createElement($e.O,null,i({id:r,defaultMessage:"Default"})),t.createElement($e.O,null,i({id:d,defaultMessage:"Custom"})))),t.createElement(F.x,{paddingBottom:6},t.createElement(ct.i,null)),t.createElement(ze.n,null,t.createElement(ze.x,null,t.createElement(ma,{attributes:e})),t.createElement(ze.x,null,t.createElement(Ca,null)))))};Ut.propTypes={attributes:s().array.isRequired,forTarget:s().string.isRequired,kind:s().string.isRequired};var Za=Ut,at=a(68465),nt=a(84967);const pt=({intlLabel:e,name:n,options:o,onChange:i,value:r})=>{const{formatMessage:d}=(0,S.Z)(),l=e.id?d({id:e.id,defaultMessage:e.defaultMessage},{...e.values}):n,x=u=>{let _="";u==="true"&&(_=!0),u==="false"&&(_=!1),i({target:{name:n,value:_,type:"select-default-boolean"}})};return t.createElement(at.P,{label:l,id:n,name:n,onChange:x,value:(r===null?"":r).toString()},o.map(({metadatas:{intlLabel:u,disabled:_,hidden:f},key:m,value:M})=>t.createElement(nt.W,{key:m,value:M,disabled:_,hidden:f},u.defaultMessage)))};pt.defaultProps={value:null},pt.propTypes={intlLabel:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired,values:s().object}).isRequired,name:s().string.isRequired,onChange:s().func.isRequired,options:s().arrayOf(s().shape({metadatas:s().shape({intlLabel:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired}).isRequired,disabled:s().bool,hidden:s().bool}).isRequired,key:s().oneOfType([s().string,s().number]).isRequired,value:s().oneOfType([s().string,s().number]).isRequired}).isRequired).isRequired,value:s().any};var Ra=pt,Wt=a(30350);const Oa=(0,X.ZP)(A.k)`
|
|
51
|
-
position: relative;
|
|
52
|
-
align-items: stretch;
|
|
53
|
-
|
|
54
|
-
label {
|
|
55
|
-
border-radius: 4px;
|
|
56
|
-
max-width: 50%;
|
|
57
|
-
cursor: pointer;
|
|
58
|
-
user-select: none;
|
|
59
|
-
flex: 1;
|
|
60
|
-
${(0,Wt.k3)()}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
input {
|
|
64
|
-
position: absolute;
|
|
65
|
-
opacity: 0;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.option {
|
|
69
|
-
height: 100%;
|
|
70
|
-
border-radius: 4px;
|
|
71
|
-
border: 1px solid ${({theme:e})=>e.colors.neutral200};
|
|
72
|
-
will-change: transform, opacity;
|
|
73
|
-
background: ${({theme:e})=>e.colors.neutral0};
|
|
74
|
-
|
|
75
|
-
.checkmark {
|
|
76
|
-
position: relative;
|
|
77
|
-
display: block;
|
|
78
|
-
will-change: transform;
|
|
79
|
-
background: ${({theme:e})=>e.colors.neutral0};
|
|
80
|
-
width: ${({theme:e})=>e.spaces[5]};
|
|
81
|
-
height: ${({theme:e})=>e.spaces[5]};
|
|
82
|
-
border: solid 1px ${({theme:e})=>e.colors.neutral300};
|
|
83
|
-
border-radius: 50%;
|
|
84
|
-
|
|
85
|
-
&:before,
|
|
86
|
-
&:after {
|
|
87
|
-
content: '';
|
|
88
|
-
display: block;
|
|
89
|
-
border-radius: 50%;
|
|
90
|
-
width: ${({theme:e})=>e.spaces[3]};
|
|
91
|
-
height: ${({theme:e})=>e.spaces[3]};
|
|
92
|
-
position: absolute;
|
|
93
|
-
top: 3px;
|
|
94
|
-
left: 3px;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
&:after {
|
|
98
|
-
transform: scale(0);
|
|
99
|
-
transition: inherit;
|
|
100
|
-
will-change: transform;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.container input:checked ~ div {
|
|
106
|
-
background: ${({theme:e})=>e.colors.primary100};
|
|
107
|
-
${k.Z} {
|
|
108
|
-
color: ${({theme:e})=>e.colors.primary600};
|
|
109
|
-
}
|
|
110
|
-
border: 1px solid ${({theme:e})=>e.colors.primary200};
|
|
111
|
-
.checkmark {
|
|
112
|
-
border: solid 1px ${({theme:e})=>e.colors.primary600};
|
|
113
|
-
&::after {
|
|
114
|
-
background: ${({theme:e})=>e.colors.primary600};
|
|
115
|
-
transform: scale(1);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
`,gt=({intlLabel:e,name:n,onChange:o,radios:i,value:r})=>{const{formatMessage:d}=(0,S.Z)();return t.createElement(A.k,{direction:"column",alignItems:"stretch",gap:2},t.createElement(k.Z,{variant:"pi",fontWeight:"bold",textColor:"neutral800",htmlFor:n,as:"label"},d(e)),t.createElement(Oa,{gap:4,alignItems:"stretch"},i.map(l=>t.createElement("label",{htmlFor:l.value.toString(),key:l.value,className:"container"},t.createElement("input",{id:l.value.toString(),name:n,className:"option-input",checked:l.value===r,value:l.value,key:l.value,onChange:o,type:"radio"}),t.createElement(F.x,{className:"option",padding:4},t.createElement(A.k,null,t.createElement(F.x,{paddingRight:4},t.createElement("span",{className:"checkmark"})),t.createElement(A.k,{direction:"column",alignItems:"stretch",gap:2},t.createElement(k.Z,{fontWeight:"bold"},d(l.title)),t.createElement(k.Z,{variant:"pi",textColor:"neutral600"},d(l.description)))))))))};gt.defaultProps={radios:[]},gt.propTypes={intlLabel:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired,values:s().object}).isRequired,name:s().string.isRequired,onChange:s().func.isRequired,radios:s().arrayOf(s().shape({title:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired}),description:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired}),value:s().any.isRequired})),value:s().oneOfType([s().string,s().bool]).isRequired};var bt=gt;const jt=({onChange:e,name:n,...o})=>{const i=r=>{const d=r.target.value!=="false";e({target:{name:n,value:d,type:"boolean-radio-group"}})};return t.createElement(bt,{...o,name:n,onChange:i})};jt.propTypes={name:s().string.isRequired,onChange:s().func.isRequired};var Pa=jt,Kt=a(8284),ht=a(10369),Aa=a(32382);const yt=({error:e,intlLabel:n,modifiedData:o,name:i,onChange:r,value:d})=>{const{formatMessage:l}=(0,S.Z)(),[x,u]=(0,t.useState)(!!d||d===0),_=n.id?l({id:n.id,defaultMessage:n.defaultMessage},{...n.values}):i,f=o.type==="biginteger"?"text":"number",m=!o.type,M=e?l({id:e,defaultMessage:e}):"";return t.createElement(A.k,{direction:"column",alignItems:"stretch",gap:2},t.createElement(Kt.X,{id:i,name:i,onValueChange:E=>{r({target:{name:i,value:E?f==="text"?"0":0:null}}),u(L=>!L)},value:x},_),x&&t.createElement(F.x,{paddingLeft:6,style:{maxWidth:"200px"}},f==="text"?t.createElement(ht.o,{"aria-label":_,disabled:m,error:M,id:i,name:i,onChange:r,value:d===null?"":d}):t.createElement(Aa.Y,{"aria-label":_,disabled:m,error:M,id:i,name:i,onValueChange:E=>{r({target:{name:i,value:E,type:f}})},value:d||0})))};yt.defaultProps={error:null,value:null},yt.propTypes={error:s().string,intlLabel:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired,values:s().object}).isRequired,modifiedData:s().object.isRequired,name:s().string.isRequired,onChange:s().func.isRequired,value:s().oneOfType([s().string,s().object,s().bool,s().number])};var Da=yt;const $t=({onChange:e,...n})=>{const o=(0,p.lm)(),i=r=>{o({type:"info",message:{id:(0,c.Z)("contentType.kind.change.warning"),defaultMessage:"You just changed the kind of a content type: API will be reset (routes, controllers, and services will be overwritten)."}}),e(r)};return t.createElement(bt,{...n,onChange:i})};$t.propTypes={onChange:s().func.isRequired};var La=$t;const vt=({description:e,disabled:n,intlLabel:o,isCreating:i,name:r,onChange:d,value:l})=>{const{formatMessage:x}=(0,S.Z)(),[u,_]=(0,t.useState)(!1),f=o.id?x({id:o.id,defaultMessage:o.defaultMessage},{...o.values}):r,m=e?x({id:e.id,defaultMessage:e.defaultMessage},{...e.values}):"",M=()=>_(C=>!C),E=()=>{d({target:{name:r,value:!1}}),M()},y=({target:{checked:C}})=>{if(!C&&!i){M();return}d({target:{name:r,value:C}})};return t.createElement(t.Fragment,null,t.createElement(Kt.X,{checked:l,disabled:n,hint:m,name:r,onChange:y},f),t.createElement(p.QH,{isOpen:u,onToggleDialog:M,onConfirm:E,bodyText:{id:(0,c.Z)("popUpWarning.draft-publish.message"),defaultMessage:"If you disable the draft & publish, your drafts will be deleted."},leftButtonText:{id:"components.popUpWarning.button.cancel",defaultMessage:"No, cancel"},rightButtonText:{id:(0,c.Z)("popUpWarning.draft-publish.button.confirm"),defaultMessage:"Yes, disable"}}))};vt.defaultProps={description:null,disabled:!1,value:!1},vt.propTypes={description:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired,values:s().object}),disabled:s().bool,intlLabel:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired,values:s().object}).isRequired,isCreating:s().bool.isRequired,name:s().string.isRequired,onChange:s().func.isRequired,value:s().bool};var Ia=vt;const Et=({categoryName:e,deleteCategory:n,deleteComponent:o,deleteContentType:i,isAttributeModal:r,isCustomFieldModal:d,isComponentAttribute:l,isComponentToDzModal:x,isContentTypeModal:u,isCreatingComponent:_,isCreatingComponentAttribute:f,isCreatingComponentInDz:m,isCreatingComponentWhileAddingAField:M,isCreatingContentType:E,isCreatingDz:y,isComponentModal:C,isDzAttribute:L,isEditingAttribute:v,isEditingCategory:O,isInFirstComponentStep:D,onSubmitAddComponentAttribute:I,onSubmitAddComponentToDz:G,onSubmitCreateContentType:de,onSubmitCreateComponent:ye,onSubmitCreateDz:B,onSubmitEditAttribute:be,onSubmitEditCategory:q,onSubmitEditComponent:ve,onSubmitEditContentType:ae,onSubmitEditCustomFieldAttribute:te,onSubmitEditDz:Ne,onClickFinish:ce})=>{const{formatMessage:V}=(0,S.Z)();return x?m?t.createElement(Q.z,{variant:"secondary",type:"submit",onClick:T=>{T.preventDefault(),G(T,!0)},startIcon:t.createElement(ge.Z,null)},V({id:(0,c.Z)("form.button.add-first-field-to-created-component"),defaultMessage:"Add first field to the component"})):t.createElement(Q.z,{variant:"default",type:"submit",onClick:T=>{T.preventDefault(),G(T,!1)}},V({id:"global.finish",defaultMessage:"Finish"})):r&&L&&!y?t.createElement(Q.z,{variant:"default",type:"submit",onClick:T=>{T.preventDefault(),ce(),Ne(T,!1)}},V({id:"global.finish",defaultMessage:"Finish"})):r&&L&&y?t.createElement(t.Fragment,null,t.createElement(Q.z,{variant:"secondary",type:"submit",onClick:T=>{T.preventDefault(),B(T,!0)},startIcon:t.createElement(ge.Z,null)},V({id:(0,c.Z)("form.button.add-components-to-dynamiczone"),defaultMessage:"Add components to the zone"}))):r&&l?D?t.createElement(Q.z,{variant:"secondary",type:"submit",onClick:T=>{T.preventDefault(),I(T,!0)}},V(f?{id:(0,c.Z)("form.button.configure-component"),defaultMessage:"Configure the component"}:{id:(0,c.Z)("form.button.select-component"),defaultMessage:"Configure the component"})):t.createElement(t.Fragment,null,t.createElement(Q.z,{variant:"secondary",type:"submit",onClick:T=>{T.preventDefault(),I(T,!0)},startIcon:t.createElement(ge.Z,null)},V(M?{id:(0,c.Z)("form.button.add-first-field-to-created-component"),defaultMessage:"Add first field to the component"}:{id:(0,c.Z)("form.button.add-field"),defaultMessage:"Add another field"})),t.createElement(Q.z,{variant:"default",type:"button",onClick:T=>{T.preventDefault(),ce(),I(T,!1)}},V({id:"global.finish",defaultMessage:"Finish"}))):r&&!l&&!L?t.createElement(t.Fragment,null,t.createElement(Q.z,{type:v?"button":"submit",variant:"secondary",onClick:T=>{T.preventDefault(),be(T,!0)},startIcon:t.createElement(ge.Z,null)},V({id:(0,c.Z)("form.button.add-field"),defaultMessage:"Add another field"})),t.createElement(Q.z,{type:v?"submit":"button",variant:"default",onClick:T=>{T.preventDefault(),ce(),be(T,!1)}},V({id:"global.finish",defaultMessage:"Finish"}))):u?t.createElement(t.Fragment,null,!E&&t.createElement(t.Fragment,null,t.createElement(Q.z,{type:"button",variant:"danger",onClick:T=>{T.preventDefault(),i()}},V({id:"global.delete",defaultMessage:"Delete"})),t.createElement(Q.z,{type:"submit",variant:"default",onClick:T=>{T.preventDefault(),ae(T,!1)}},V({id:"global.finish",defaultMessage:"Finish"}))),E&&t.createElement(Q.z,{type:"submit",variant:"secondary",onClick:T=>{T.preventDefault(),de(T,!0)}},V({id:"global.continue",defaultMessage:"Continue"}))):C?t.createElement(t.Fragment,null,!_&&t.createElement(t.Fragment,null,t.createElement(Q.z,{type:"button",variant:"danger",onClick:T=>{T.preventDefault(),o()}},V({id:"global.delete",defaultMessage:"Delete"})),t.createElement(Q.z,{type:"submit",variant:"default",onClick:T=>{T.preventDefault(),ve(T,!1)}},V({id:"global.finish",defaultMessage:"Finish"}))),_&&t.createElement(Q.z,{type:"submit",variant:"secondary",onClick:T=>{T.preventDefault(),ye(T,!0)}},V({id:"global.continue",defaultMessage:"Continue"}))):O?t.createElement(t.Fragment,null,t.createElement(Q.z,{type:"button",variant:"danger",onClick:T=>{T.preventDefault(),n(e)}},V({id:"global.delete",defaultMessage:"Delete"})),t.createElement(Q.z,{type:"submit",variant:"default",onClick:T=>{T.preventDefault(),q(T)}},V({id:"global.finish",defaultMessage:"finish"}))):d?t.createElement(t.Fragment,null,t.createElement(Q.z,{type:v?"button":"submit",variant:"secondary",onClick:T=>{T.preventDefault(),te(T,!0)},startIcon:t.createElement(ge.Z,null)},V({id:(0,c.Z)("form.button.add-field"),defaultMessage:"Add another field"})),t.createElement(Q.z,{type:v?"submit":"button",variant:"default",onClick:T=>{T.preventDefault(),ce(),te(T,!1)}},V({id:"global.finish",defaultMessage:"Finish"}))):null};Et.defaultProps={categoryName:null,onClickFinish(){}},Et.propTypes={categoryName:s().string,deleteCategory:s().func.isRequired,deleteComponent:s().func.isRequired,deleteContentType:s().func.isRequired,isAttributeModal:s().bool.isRequired,isCustomFieldModal:s().bool.isRequired,isComponentAttribute:s().bool.isRequired,isComponentModal:s().bool.isRequired,isComponentToDzModal:s().bool.isRequired,isContentTypeModal:s().bool.isRequired,isCreatingComponent:s().bool.isRequired,isCreatingComponentAttribute:s().bool.isRequired,isCreatingComponentInDz:s().bool.isRequired,isCreatingComponentWhileAddingAField:s().bool.isRequired,isCreatingContentType:s().bool.isRequired,isCreatingDz:s().bool.isRequired,isDzAttribute:s().bool.isRequired,isEditingAttribute:s().bool.isRequired,isEditingCategory:s().bool.isRequired,isInFirstComponentStep:s().bool.isRequired,onSubmitAddComponentAttribute:s().func.isRequired,onSubmitAddComponentToDz:s().func.isRequired,onSubmitCreateContentType:s().func.isRequired,onSubmitCreateComponent:s().func.isRequired,onSubmitCreateDz:s().func.isRequired,onSubmitEditAttribute:s().func.isRequired,onSubmitEditCategory:s().func.isRequired,onSubmitEditComponent:s().func.isRequired,onSubmitEditContentType:s().func.isRequired,onSubmitEditCustomFieldAttribute:s().func.isRequired,onSubmitEditDz:s().func.isRequired,onClickFinish:s().func};var Sa=Et,zt=a(55225),Na=a(26858),Fa=a(51654),Ba=a(29439);const Ua=({actionType:e,attributeName:n,attributeType:o,categoryName:i,contentTypeKind:r,dynamicZoneTarget:d,forTarget:l,modalType:x,targetUid:u,customFieldUid:_,showBackLink:f})=>{const{formatMessage:m}=(0,S.Z)(),{modifiedData:M}=(0,J.Z)(),{onOpenModalAddField:E}=(0,Oe.Z)();let y,C=[];const L=M?.[l]?.[u]||M?.[l]||null;let v=L?.schema.displayName;if(x==="contentType"&&(y=r),["component","editCategory"].includes(x)&&(y="component"),["component","contentType"].includes(x)){let D=(0,c.Z)(`modalForm.component.header-${e}`);return x==="contentType"&&(D=(0,c.Z)(`modalForm.${r}.header-create`)),e==="edit"&&(D=(0,c.Z)("modalForm.header-edit")),t.createElement(zt.x,null,t.createElement(A.k,null,t.createElement(F.x,null,t.createElement(tt.Z,{type:y})),t.createElement(F.x,{paddingLeft:3},t.createElement(k.Z,{fontWeight:"bold",textColor:"neutral800",as:"h2",id:"title"},m({id:D},{name:v})))))}return C=[{label:v,info:{category:L?.category||null,name:L?.schema.displayName}}],x==="chooseAttribute"&&(y=["component","components"].includes(l)?"component":L.schema.kind),x==="addComponentToDynamicZone"&&(y="dynamiczone",C.push({label:d})),(x==="attribute"||x==="customField")&&(y=o,C.push({label:n})),x==="editCategory"&&(C=[{label:m({id:(0,c.Z)("modalForm.header.categories"),defaultMessage:"Categories"})},{label:i}]),t.createElement(zt.x,null,t.createElement(A.k,{gap:3},f&&t.createElement(p.rU,{"aria-label":m({id:(0,c.Z)("modalForm.header.back"),defaultMessage:"Back"}),startIcon:t.createElement(Ba.Z,null),onClick:()=>E({forTarget:l,targetUid:u}),to:"#back"}),t.createElement(tt.Z,{type:y,customField:_}),t.createElement(Na.O,{label:C.map(({label:D})=>D).join(",")},C.map(({label:D,info:I},G,de)=>{if(D=he()(D),!D)return null;const ye=`${D}.${G}`;return I?.category&&(D=`${D} (${he()(I.category)} - ${he()(I.name)})`),t.createElement(Fa.$,{isCurrent:G===de.length-1,key:ye},D)}))))};Ua.defaultProps={actionType:null,attributeName:null,attributeType:null,categoryName:null,dynamicZoneTarget:null,forTarget:null,contentTypeKind:null,targetUid:null,customFieldUid:null,showBackLink:!1},Ua.propTypes={actionType:s().string,attributeName:s().string,attributeType:s().string,categoryName:s().string,contentTypeKind:s().string,dynamicZoneTarget:s().string,forTarget:s().oneOf(["contentType","component","components"]),modalType:s().string.isRequired,targetUid:s().string,customFieldUid:s().string,showBackLink:s().bool};var cs=Ua,xs=({modalType:e,forTarget:n,kind:o,actionType:i,step:r})=>{switch(e){case"chooseAttribute":return(0,c.Z)(`modalForm.sub-header.chooseAttribute.${n.includes("component")?"component":o||"collectionType"}`);case"attribute":return(0,c.Z)(`modalForm.sub-header.attribute.${i}${r!=="null"&&r!==null&&i!=="edit"?".step":""}`);case"customField":return(0,c.Z)(`modalForm.sub-header.attribute.${i}`);case"addComponentToDynamicZone":return(0,c.Z)("modalForm.sub-header.addComponentToDynamicZone");default:return(0,c.Z)("configurations")}};const Wa=({actionType:e,modalType:n,forTarget:o,kind:i,step:r,attributeType:d,attributeName:l,customField:x})=>{const{formatMessage:u}=(0,S.Z)(),_=n==="customField"?x.intlLabel:{id:(0,c.Z)(`attribute.${d}`)};return t.createElement(A.k,{direction:"column",alignItems:"flex-start",paddingBottom:2,gap:1},t.createElement(k.Z,{as:"h2",variant:"beta"},u({id:xs({actionType:e,forTarget:o,kind:i,step:r,modalType:n}),defaultMessage:"Add new field"},{type:he()(u(_)),name:he()(l),step:r})),t.createElement(k.Z,{variant:"pi",textColor:"neutral600"},u({id:(0,c.Z)(`attribute.${d}.description`),defaultMessage:"A type for modeling data"})))};Wa.defaultProps={actionType:null,modalType:null,forTarget:null,kind:null,step:null,attributeType:null,attributeName:null,customField:null},Wa.propTypes={actionType:s().string,modalType:s().string,forTarget:s().string,kind:s().string,step:s().string,attributeType:s().string,attributeName:s().string,customField:s().object};var us=Wa,ms=a(87107),fs=a(76437),_s=a(3685),ps=a(98275),gs=a(61774),Zn=a(50563),bs=a(63919),hs=a(6792),ys=a(4038),Rn=a(51401);const vs=(0,X.ZP)(A.k)`
|
|
120
|
-
label {
|
|
121
|
-
${Wt.k3}
|
|
122
|
-
border-radius: ${({theme:e})=>e.borderRadius};
|
|
123
|
-
border: 1px solid ${({theme:e})=>e.colors.neutral100};
|
|
124
|
-
}
|
|
125
|
-
`,On=({iconKey:e,name:n,onChange:o,isSelected:i,ariaLabel:r})=>t.createElement(ms.g,{name:n,required:!1},t.createElement(fs.Q,{htmlFor:e,id:`${e}-label`},t.createElement(_s.T,null,t.createElement(ps._,{type:"radio",id:e,name:n,checked:i,onChange:o,value:e,"aria-checked":i,"aria-labelledby":`${e}-label`}),r),t.createElement(A.k,{padding:2,cursor:"pointer",hasRadius:!0,background:i&&"primary200"},t.createElement(ie.J,{as:Rn.c[e],color:i?"primary600":"neutral300"}))));On.propTypes={iconKey:s().string.isRequired,name:s().string.isRequired,onChange:s().func.isRequired,isSelected:s().bool.isRequired,ariaLabel:s().string.isRequired};const ja=({intlLabel:e,name:n,onChange:o,value:i})=>{const{formatMessage:r}=(0,S.Z)(),[d,l]=(0,t.useState)(!1),[x,u]=(0,t.useState)(""),_=Object.keys(Rn.c),[f,m]=(0,t.useState)(_),M=(0,t.useRef)(null),E=(0,t.useRef)(null),y=()=>{l(!d)},C=({target:{value:O}})=>{u(O),m(()=>_.filter(D=>D.toLowerCase().includes(O.toLowerCase())))},L=()=>{y(),u(""),m(_)},v=()=>{o({target:{name:n,value:""}})};return(0,t.useEffect)(()=>{d&&E.current.focus()},[d]),t.createElement(t.Fragment,null,t.createElement(A.k,{justifyContent:"space-between",paddingBottom:2},t.createElement(k.Z,{variant:"pi",fontWeight:"bold",textColor:"neutral800",as:"label"},r(e)),t.createElement(A.k,{gap:1},d?t.createElement(gs.w,{ref:E,name:"searchbar",size:"S",placeholder:r({id:(0,c.Z)("ComponentIconPicker.search.placeholder"),defaultMessage:"Search for an icon"}),onBlur:()=>{x||y()},onChange:C,value:x,onClear:L,clearLabel:r({id:(0,c.Z)("IconPicker.search.clear.label"),defaultMessage:"Clear the icon search"})},r({id:(0,c.Z)("IconPicker.search.placeholder.label"),defaultMessage:"Search for an icon"})):t.createElement(Zn.h,{ref:M,onClick:y,"aria-label":r({id:(0,c.Z)("IconPicker.search.button.label"),defaultMessage:"Search icon button"}),icon:t.createElement(hs.Z,null),noBorder:!0}),i&&t.createElement(bs.u,{description:r({id:(0,c.Z)("IconPicker.remove.tooltip"),defaultMessage:"Remove the selected icon"})},t.createElement(Zn.h,{onClick:v,"aria-label":r({id:(0,c.Z)("IconPicker.remove.button"),defaultMessage:"Remove the selected icon button"}),icon:t.createElement(ys.Z,null),noBorder:!0})))),t.createElement(vs,{position:"relative",padding:1,background:"neutral100",hasRadius:!0,wrap:"wrap",gap:2,maxHeight:"126px",overflow:"auto",textAlign:"center"},f.length>0?f.map(O=>t.createElement(On,{key:O,iconKey:O,name:n,onChange:o,isSelected:O===i,ariaLabel:r({id:(0,c.Z)("IconPicker.icon.label"),defaultMessage:"Select {icon} icon"},{icon:O})})):t.createElement(F.x,{padding:4,grow:2},t.createElement(k.Z,{variant:"delta",textColor:"neutral600",textAlign:"center"},r({id:(0,c.Z)("IconPicker.emptyState.label"),defaultMessage:"No icon found"})))))};ja.defaultProps={value:""},ja.propTypes={intlLabel:s().object.isRequired,name:s().string.isRequired,onChange:s().func.isRequired,value:s().string};var Es=ja,Ms=a(24443),Ka=a.n(Ms),Pn=a(43658);const $a=({description:e,error:n,intlLabel:o,modifiedData:i,name:r,onChange:d,value:l})=>{const{formatMessage:x}=(0,S.Z)(),u=(0,t.useRef)(d),_=i?.displayName||"";(0,t.useEffect)(()=>{if(_){const E=(0,Pn.Z)(_);try{const y=Ka()(E,2);u.current({target:{name:r,value:y}})}catch{u.current({target:{name:r,value:E}})}}else u.current({target:{name:r,value:""}})},[_,r]);const f=n?x({id:n,defaultMessage:n}):"",m=e?x({id:e.id,defaultMessage:e.defaultMessage},{...e.values}):"",M=x(o);return t.createElement(ht.o,{error:f,label:M,id:r,hint:m,name:r,onChange:d,value:l||""})};$a.defaultProps={description:null,error:null,value:null},$a.propTypes={description:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired,values:s().object}),error:s().string,intlLabel:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired,values:s().object}).isRequired,modifiedData:s().object.isRequired,name:s().string.isRequired,onChange:s().func.isRequired,value:s().string};var Ts=$a,za=a(11165),kt=a(14708),ee=a(52486);const ka=({oneThatIsCreatingARelationWithAnother:e,target:n})=>{const{contentTypes:o,sortedContentTypesList:i}=(0,J.Z)(),r=(0,Se.I0)(),d=i.filter(Lt),{plugin:l=null,schema:{displayName:x}={displayName:"error"}}=o?.[n]??{},u=({uid:_,plugin:f,title:m,restrictRelationsTo:M})=>()=>{const E=f?`${f}_${m}`:m;r({type:ee.aG,target:{value:_,oneThatIsCreatingARelationWithAnother:e,selectedContentTypeFriendlyName:E,targetContentTypeAllowedRelations:M}})};return t.createElement(kt.fC,null,t.createElement(Cs,null,`${x} ${l?`(from: ${l})`:""}`),t.createElement(kt.VY,{zIndex:5},d.map(({uid:_,title:f,restrictRelationsTo:m,plugin:M})=>t.createElement(kt.ck,{key:_,onSelect:u({uid:_,plugin:M,title:f,restrictRelationsTo:m})},f,"\xA0",M&&t.createElement(t.Fragment,null,"(from: ",M,")")))))};ka.defaultProps={target:null},ka.propTypes={oneThatIsCreatingARelationWithAnother:s().string.isRequired,target:s().string};const Cs=(0,X.ZP)(kt.xz)`
|
|
126
|
-
svg {
|
|
127
|
-
width: ${6/16}rem;
|
|
128
|
-
height: ${4/16}rem;
|
|
129
|
-
}
|
|
130
|
-
`;var Zs=ka;const wa=({disabled:e,error:n,header:o,isMain:i,name:r,onChange:d,oneThatIsCreatingARelationWithAnother:l,target:x,value:u})=>t.createElement(F.x,{background:"neutral100",hasRadius:!0,borderColor:"neutral200"},t.createElement(A.k,{paddingTop:i?4:1,paddingBottom:i?3:1,justifyContent:"center"},i?t.createElement(k.Z,{variant:"pi",fontWeight:"bold",textColor:"neutral800"},o):t.createElement(Zs,{target:x,oneThatIsCreatingARelationWithAnother:l})),t.createElement(ct.i,{background:"neutral200"}),t.createElement(F.x,{padding:4},t.createElement(p.jm,{disabled:e,error:n?.id||null,intlLabel:{id:(0,c.Z)("form.attribute.item.defineRelation.fieldName"),defaultMessage:"Field name"},name:r,onChange:d,type:"text",value:u})));wa.defaultProps={disabled:!1,error:null,header:null,isMain:!1,onChange(){},oneThatIsCreatingARelationWithAnother:null,target:null,value:""},wa.propTypes={disabled:s().bool,error:s().object,header:s().string,isMain:s().bool,name:s().string.isRequired,onChange:s().func,oneThatIsCreatingARelationWithAnother:s().string,target:s().string,value:s().string};var An=wa,Rs=a(25449),Os=a(10168),Ps=a(7733),As=a(79634),Ds=a(26253),Ls=a(32548),Is=a(51382),Dn=a.n(Is);const Ss=(0,X.ZP)(F.x)`
|
|
131
|
-
position: relative;
|
|
132
|
-
width: 100%;
|
|
133
|
-
&::before {
|
|
134
|
-
content: '';
|
|
135
|
-
position: absolute;
|
|
136
|
-
top: calc(50% - 0px);
|
|
137
|
-
height: 2px;
|
|
138
|
-
width: 100%;
|
|
139
|
-
background-color: ${({theme:e})=>e.colors.primary600};
|
|
140
|
-
z-index: 0;
|
|
141
|
-
}
|
|
142
|
-
`,Ns=(0,X.ZP)(F.x)`
|
|
143
|
-
background: ${({theme:e,isSelected:n})=>e.colors[n?"primary100":"neutral0"]};
|
|
144
|
-
border: 1px solid
|
|
145
|
-
${({theme:e,isSelected:n})=>e.colors[n?"primary700":"neutral200"]};
|
|
146
|
-
border-radius: ${({theme:e})=>e.borderRadius};
|
|
147
|
-
z-index: 1;
|
|
148
|
-
svg {
|
|
149
|
-
width: 1.5rem;
|
|
150
|
-
height: 100%;
|
|
151
|
-
path {
|
|
152
|
-
fill: ${({theme:e,isSelected:n})=>e.colors[n?"primary700":"neutral500"]};
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
&:disabled {
|
|
156
|
-
cursor: not-allowed;
|
|
157
|
-
}
|
|
158
|
-
`,Fs=(0,X.ZP)(A.k)`
|
|
159
|
-
position: absolute;
|
|
160
|
-
bottom: 0;
|
|
161
|
-
left: 0;
|
|
162
|
-
right: 0;
|
|
163
|
-
`,Bs={oneWay:Rs.Z,oneToOne:Os.Z,oneToMany:Ps.Z,manyToOne:As.Z,manyToMany:Ds.Z,manyWay:Ls.Z},Va=({naturePickerType:e,oneThatIsCreatingARelationWithAnother:n,relationType:o,target:i})=>{const r=(0,Se.I0)(),{formatMessage:d}=(0,S.Z)(),{contentTypes:l,modifiedData:x}=(0,J.Z)(),u=["oneWay","oneToOne","oneToMany","manyToOne","manyToMany","manyWay"],_=["oneWay","manyWay"],m=(e==="contentType"?R()(x,[e,"schema","kind"],""):e)==="collectionType"?u:_,M=o==="manyToOne",E=R()(l,[i,"schema","displayName"],"unknown"),y=M?E:n,C=M?n:E,L=Ka()(y,o==="manyToMany"?2:1),v=R()(l,[i,"schema","restrictRelationsTo"],null),O=Ka()(C,["manyToMany","oneToMany","manyToOne","manyWay"].includes(o)?2:1);return o?t.createElement(A.k,{style:{flex:1}},t.createElement(Ss,null,t.createElement(A.k,{paddingLeft:9,paddingRight:9,paddingTop:1,justifyContent:"center"},t.createElement(mt.k,{tagName:"button"},t.createElement(A.k,{gap:3},m.map(D=>{const I=Bs[D],G=v===null||v.includes(D);return t.createElement(Ns,{as:"button",isSelected:o===D,disabled:!G,key:D,onClick:()=>{G&&r({type:ee.QQ,target:{oneThatIsCreatingARelationWithAnother:n,targetContentType:i,value:D}})},padding:2,type:"button"},t.createElement(I,{key:D}))}))))),t.createElement(Fs,{justifyContent:"center"},t.createElement(k.Z,null,Dn()(L,{length:24}),"\xA0"),t.createElement(k.Z,{textColor:"primary600"},d({id:(0,c.Z)(`relation.${o}`)}),"\xA0"),t.createElement(k.Z,null,Dn()(O,{length:24})))):null};Va.defaultProps={relationType:null,target:null},Va.propTypes={naturePickerType:s().string.isRequired,oneThatIsCreatingARelationWithAnother:s().string.isRequired,relationType:s().string,target:s().string};var Us=Va;const Ln=({formErrors:e,mainBoxHeader:n,modifiedData:o,naturePickerType:i,onChange:r})=>{const d=(0,za.Z)(o.relation,o.targetAttribute);return t.createElement(A.k,{style:{position:"relative"}},t.createElement(An,{isMain:!0,header:n,error:e?.name||null,name:"name",onChange:r,value:o?.name||""}),t.createElement(Us,{naturePickerType:i,oneThatIsCreatingARelationWithAnother:n,relationType:d,target:o.target}),t.createElement(An,{disabled:["oneWay","manyWay"].includes(d),error:e?.targetAttribute||null,name:"targetAttribute",onChange:r,oneThatIsCreatingARelationWithAnother:n,target:o.target,value:o?.targetAttribute||""}))};Ln.propTypes={formErrors:s().object.isRequired,mainBoxHeader:s().string.isRequired,modifiedData:s().object.isRequired,naturePickerType:s().string.isRequired,onChange:s().func.isRequired};var Ws=Ln,js=a(21428),Ks=a(90333);const Ha=({error:e,intlLabel:n,name:o,onChange:i,value:r})=>{const{formatMessage:d}=(0,S.Z)(),{allComponentsCategories:l}=(0,J.Z)(),[x,u]=(0,t.useState)(l),_=e?d({id:e,defaultMessage:e}):"",f=d(n),m=E=>{i({target:{name:o,value:E,type:"select-category"}})},M=E=>{u(y=>[...y,E]),m(E)};return t.createElement(js.XU,{error:_,id:o,label:f,name:o,onChange:m,onCreateOption:M,value:r},x.map(E=>t.createElement(Ks.O,{key:E,value:E},E)))};Ha.defaultProps={error:null,value:null},Ha.propTypes={error:s().string,intlLabel:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired,values:s().object}).isRequired,name:s().string.isRequired,onChange:s().func.isRequired,value:s().string};var $s=Ha;const Ga=({error:e,intlLabel:n,isAddingAComponentToAnotherComponent:o,isCreating:i,isCreatingComponentWhileAddingAField:r,componentToCreate:d,name:l,onChange:x,targetUid:u,forTarget:_,value:f})=>{const{formatMessage:m}=(0,S.Z)(),M=e?m({id:e,defaultMessage:e}):"",E=m(n),{componentsGroupedByCategory:y,componentsThatHaveOtherComponentInTheirAttributes:C}=(0,J.Z)(),L=["component","components"].includes(_);let v=Object.entries(y).reduce((O,D)=>{const[I,G]=D,de=G.map(ye=>({uid:ye.uid,label:ye.schema.displayName,categoryName:I}));return[...O,...de]},[]);return o&&(v=v.filter(O=>!C.includes(O.uid))),L&&(v=v.filter(O=>O.uid!==u)),r&&(v=[{uid:f,label:d.displayName,categoryName:d.category}]),t.createElement(at.P,{disabled:r||!i,error:M,label:E,id:l,name:l,onChange:O=>{x({target:{name:l,value:O,type:"select-category"}})},value:f||""},v.map(O=>t.createElement(nt.W,{key:O.uid,value:O.uid},`${O.categoryName} - ${O.label}`)))};Ga.defaultProps={componentToCreate:null,error:null},Ga.propTypes={componentToCreate:s().object,forTarget:s().string.isRequired,error:s().string,intlLabel:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired,values:s().object}).isRequired,isAddingAComponentToAnotherComponent:s().bool.isRequired,isCreating:s().bool.isRequired,isCreatingComponentWhileAddingAField:s().bool.isRequired,name:s().string.isRequired,onChange:s().func.isRequired,targetUid:s().string.isRequired,value:s().string.isRequired};var zs=Ga;const In=({dynamicZoneTarget:e,intlLabel:n,name:o,onChange:i,value:r})=>{const{formatMessage:d}=(0,S.Z)(),{componentsGroupedByCategory:l,modifiedData:x}=(0,J.Z)(),_=(xt(x.contentType.schema.attributes,e)||{}).components||[],f=Object.keys(l).reduce((E,y)=>{const C=l[y].filter(({uid:L})=>!_.includes(L));return C.length>0&&(E[y]=C),E},{}),m=Object.entries(f).reduce((E,y)=>{const[C,L]=y,v={label:C,children:L.map(({uid:O,schema:{displayName:D}})=>({label:D,value:O}))};return E.push(v),E},[]),M=d({id:(0,c.Z)("components.SelectComponents.displayed-value"),defaultMessage:"{number, plural, =0 {# components} one {# component} other {# components}} selected"},{number:r.length});return t.createElement(It.Q,{id:"select1",label:d(n),customizeContent:()=>M,name:o,onChange:E=>{i({target:{name:o,value:E,type:"select-components"}})},options:m,value:r||[]})};In.propTypes={intlLabel:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired,values:s().object}).isRequired,dynamicZoneTarget:s().string.isRequired,name:s().string.isRequired,onChange:s().func.isRequired,value:s().array.isRequired};var ks=In;const qa=({intlLabel:e,error:n,modifiedData:o,name:i,onChange:r,options:d,value:l})=>{const{formatMessage:x}=(0,S.Z)(),u=x(e),_=n?x({id:n,defaultMessage:n}):"",f=m=>{r({target:{name:i,value:m,type:"select"}}),l&&o.default!==void 0&&o.default!==null&&r({target:{name:"default",value:null}})};return t.createElement(at.P,{error:_,label:u,id:i,name:i,onChange:f,value:l||""},d.map(({metadatas:{intlLabel:m,disabled:M,hidden:E},key:y,value:C})=>t.createElement(nt.W,{key:y,value:C,disabled:M,hidden:E},x({id:m.id,defaultMessage:m.defaultMessage},m.values))))};qa.defaultProps={error:void 0,value:""},qa.propTypes={error:s().string,intlLabel:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired,values:s().object}).isRequired,modifiedData:s().object.isRequired,name:s().string.isRequired,onChange:s().func.isRequired,options:s().arrayOf(s().shape({metadatas:s().shape({intlLabel:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired}).isRequired,disabled:s().bool,hidden:s().bool}).isRequired,key:s().oneOfType([s().string,s().number]).isRequired,value:s().oneOfType([s().string,s().number]).isRequired}).isRequired).isRequired,value:s().string};var ws=qa;const Qa=({intlLabel:e,error:n,modifiedData:o,name:i,onChange:r,options:d,value:l})=>{const{formatMessage:x}=(0,S.Z)(),u=x(e),_=n?x({id:n,defaultMessage:n}):"",f=m=>{r({target:{name:i,value:m,type:"select"}}),l&&(m==="biginteger"&&l!=="biginteger"&&(o.default!==void 0&&o.default!==null&&r({target:{name:"default",value:null}}),o.max!==void 0&&o.max!==null&&r({target:{name:"max",value:null}}),o.min!==void 0&&o.min!==null&&r({target:{name:"min",value:null}})),["decimal","float","integer"].includes(m)&&l==="biginteger"&&(o.default!==void 0&&o.default!==null&&r({target:{name:"default",value:null}}),o.max!==void 0&&o.max!==null&&r({target:{name:"max",value:null}}),o.min!==void 0&&o.min!==null&&r({target:{name:"min",value:null}})))};return t.createElement(at.P,{error:_,label:u,id:i,name:i,onChange:f,value:l||""},d.map(({metadatas:{intlLabel:m,disabled:M,hidden:E},key:y,value:C})=>t.createElement(nt.W,{key:y,value:C,disabled:M,hidden:E},x(m))))};Qa.defaultProps={error:void 0,value:""},Qa.propTypes={error:s().string,intlLabel:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired,values:s().object}).isRequired,modifiedData:s().object.isRequired,name:s().string.isRequired,onChange:s().func.isRequired,options:s().arrayOf(s().shape({metadatas:s().shape({intlLabel:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired}).isRequired,disabled:s().bool,hidden:s().bool}).isRequired,key:s().oneOfType([s().string,s().number]).isRequired,value:s().oneOfType([s().string,s().number]).isRequired}).isRequired).isRequired,value:s().string};var Vs=Qa;const Ya=({description:e,error:n,intlLabel:o,modifiedData:i,name:r,onChange:d,value:l})=>{const{formatMessage:x}=(0,S.Z)(),u=(0,t.useRef)(d),_=i?.displayName||"";(0,t.useEffect)(()=>{_?u.current({target:{name:r,value:(0,Pn.Z)(_)}}):u.current({target:{name:r,value:""}})},[_,r]);const f=n?x({id:n,defaultMessage:n}):"",m=e?x({id:e.id,defaultMessage:e.defaultMessage},{...e.values}):"",M=x(o);return t.createElement(ht.o,{error:f,label:M,id:r,hint:m,name:r,onChange:d,value:l||""})};Ya.defaultProps={description:null,error:null,value:null},Ya.propTypes={description:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired,values:s().object}),error:s().string,intlLabel:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired,values:s().object}).isRequired,modifiedData:s().object.isRequired,name:s().string.isRequired,onChange:s().func.isRequired,value:s().string};var Hs=Ya;const Sn=({form:e,formErrors:n,genericInputProps:o,modifiedData:i,onChange:r})=>{const{formatMessage:d}=(0,S.Z)();return e.map((l,x)=>l.items.length===0?null:t.createElement(F.x,{key:x},l.sectionTitle&&t.createElement(F.x,{paddingBottom:4},t.createElement(k.Z,{variant:"delta",as:"h3"},d(l.sectionTitle))),t.createElement(ft.r,{gap:4},l.items.map((u,_)=>{const f=`${x}.${_}`,m=R()(i,u.name,""),M=Object.keys(n).find(y=>y===u.name),E=M?n[M].id:R()(n,[...u.name.split(".").filter(y=>y!=="componentToCreate"),"id"],null);return u.type==="pushRight"?t.createElement(et.P,{col:u.size||6,key:u.name||f},t.createElement("div",null)):t.createElement(et.P,{col:u.size||6,key:u.name||f},t.createElement(p.jm,{...u,...o,error:E,onChange:r,value:m}))}))))};Sn.propTypes={form:s().arrayOf(s().object).isRequired,formErrors:s().object.isRequired,genericInputProps:s().object.isRequired,modifiedData:s().object.isRequired,onChange:s().func.isRequired};var Nn=Sn,Gs=a(33475);const Xa=({description:e,disabled:n,error:o,intlLabel:i,labelAction:r,name:d,onChange:l,placeholder:x,value:u})=>{const{formatMessage:_}=(0,S.Z)(),f=o?_({id:o,defaultMessage:o}):"",m=e?_({id:e.id,defaultMessage:e.defaultMessage},{...e.values}):"",M=_(i),E=x?_({id:x.id,defaultMessage:x.defaultMessage},{...x.values}):"",y=Array.isArray(u)?u.join(`
|
|
164
|
-
`):"",C=L=>{const v=L.target.value.split(`
|
|
165
|
-
`);l({target:{name:d,value:v}})};return t.createElement(Gs.g,{disabled:n,error:f,label:M,labelAction:r,id:d,hint:m,name:d,onChange:C,placeholder:E,value:y},y)};Xa.defaultProps={description:null,disabled:!1,error:"",labelAction:void 0,placeholder:null,value:""},Xa.propTypes={description:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired,values:s().object}),disabled:s().bool,error:s().string,intlLabel:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired,values:s().object}).isRequired,labelAction:s().element,name:s().string.isRequired,onChange:s().func.isRequired,placeholder:s().shape({id:s().string.isRequired,defaultMessage:s().string.isRequired,values:s().object}),value:s().oneOfType([s().array,s().string])};var qs=Xa;const De={name:"name",type:"text",intlLabel:{id:"global.name",defaultMessage:"Name"},description:{id:(0,c.Z)("modalForm.attribute.form.base.name.description"),defaultMessage:"No space is allowed for the name of the attribute"}};var Qs={sections:[{sectionTitle:null,items:[De]}]},Ja={intlLabel:{id:"global.type",defaultMessage:"Type"},name:"createComponent",type:"boolean-radio-group",size:12,radios:[{title:{id:(0,c.Z)("form.attribute.component.option.create"),defaultMessage:"Create a new component"},description:{id:(0,c.Z)("form.attribute.component.option.create.description"),defaultMessage:"A component is shared across types and components, it will be available and accessible everywhere."},value:!0},{title:{id:(0,c.Z)("form.attribute.component.option.reuse-existing"),defaultMessage:"Use an existing component"},description:{id:(0,c.Z)("form.attribute.component.option.reuse-existing.description"),defaultMessage:"Reuse a component already created to keep your data consistent across content-types."},value:!1}]},h=a(24346),Fn=/^[A-Za-z][-_0-9A-Za-z]*$/,Ys=e=>{const n={name:h.Z_().matches(Fn,p.I0.regex).test({name:"nameNotAllowed",message:p.I0.unique,test(o){return o?!e.includes(o?.toLowerCase()):!1}}).required(p.I0.required)};return h.Ry(n)},Xs={base:{sections:[{sectionTitle:null,items:[{autoFocus:!0,name:"name",type:"text",intlLabel:{id:"global.name",defaultMessage:"Name"},description:{id:(0,c.Z)("modalForm.editCategory.base.name.description"),defaultMessage:"No space is allowed for the name of the category"}}]}]}},st=a(72666),Js=(e,n,o)=>{const i={displayName:h.Z_().test({name:"nameAlreadyUsed",message:p.I0.unique,test(r){if(!r)return!1;const d=(0,st.N)(r,o);return!e.includes(d)}}).test({name:"nameNotAllowed",message:(0,c.Z)("error.contentTypeName.reserved-name"),test(r){return r?!n.includes(r?.trim()?.toLowerCase()):!1}}).required(p.I0.required),category:h.Z_().matches(Fn,p.I0.regex).required(p.I0.required),icon:h.Z_()};return h.Ry(i)},ot={base(e=""){return[{sectionTitle:null,items:[{name:`${e}displayName`,type:"text",intlLabel:{id:(0,c.Z)("contentType.displayName.label"),defaultMessage:"Display Name"}},{name:`${e}category`,type:"select-category",intlLabel:{id:(0,c.Z)("modalForm.components.create-component.category.label"),defaultMessage:"Select a category or enter a name to create a new one"}}]},{sectionTitle:null,items:[{name:`${e}icon`,type:"icon-picker",size:12,intlLabel:{id:(0,c.Z)("modalForm.components.icon.label"),defaultMessage:"Icon"}}]}]},advanced(){return[]}},P={default:{name:"default",type:"text",intlLabel:{id:(0,c.Z)("form.attribute.settings.default"),defaultMessage:"Default value"}},max:{name:"max",type:"checkbox-with-number-field",intlLabel:{id:(0,c.Z)("form.attribute.item.maximum"),defaultMessage:"Maximum value"}},maxLength:{name:"maxLength",type:"checkbox-with-number-field",intlLabel:{id:(0,c.Z)("form.attribute.item.maximumLength"),defaultMessage:"Maximum length"}},min:{name:"min",type:"checkbox-with-number-field",intlLabel:{id:(0,c.Z)("form.attribute.item.minimum"),defaultMessage:"Minimum value"}},minLength:{name:"minLength",type:"checkbox-with-number-field",intlLabel:{id:(0,c.Z)("form.attribute.item.minimumLength"),defaultMessage:"Minimum length"}},private:{name:"private",type:"checkbox",intlLabel:{id:(0,c.Z)("form.attribute.item.privateField"),defaultMessage:"Private field"},description:{id:(0,c.Z)("form.attribute.item.privateField.description"),defaultMessage:"This field will not show up in the API response"}},regex:{intlLabel:{id:(0,c.Z)("form.attribute.item.text.regex"),defaultMessage:"RegExp pattern"},name:"regex",type:"text",description:{id:(0,c.Z)("form.attribute.item.text.regex.description"),defaultMessage:"The text of the regular expression"}},required:{name:"required",type:"checkbox",intlLabel:{id:(0,c.Z)("form.attribute.item.requiredField"),defaultMessage:"Required field"},description:{id:(0,c.Z)("form.attribute.item.requiredField.description"),defaultMessage:"You won't be able to create an entry if this field is empty"}},unique:{name:"unique",type:"checkbox",intlLabel:{id:(0,c.Z)("form.attribute.item.uniqueField"),defaultMessage:"Unique field"},description:{id:(0,c.Z)("form.attribute.item.uniqueField.description"),defaultMessage:"You won't be able to create an entry if there is an existing entry with identical content"}}},eo={boolean(){return{sections:[{sectionTitle:null,items:[{autoFocus:!0,type:"select-default-boolean",intlLabel:{id:(0,c.Z)("form.attribute.settings.default"),defaultMessage:"Default value"},name:"default",options:[{value:"true",key:"true",metadatas:{intlLabel:{id:"true",defaultMessage:"true"}}},{value:"",key:"null",metadatas:{intlLabel:{id:"null",defaultMessage:"null"}}},{value:"false",key:"false",metadatas:{intlLabel:{id:"false",defaultMessage:"false"}}}]}]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[P.required,P.private]}]}},component({repeatable:e},n){return n==="1"?{sections:ot.advanced("componentToCreate")}:e?{sections:[{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[P.required,P.private,P.max,P.min]}]}:{sections:[{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[P.required,P.private]}]}},date({type:e}){return{sections:[{sectionTitle:null,items:[{...P.default,type:e||"date",value:null,withDefaultValue:!1,disabled:!e,autoFocus:!1}]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[P.required,P.unique,P.private]}]}},dynamiczone(){return{sections:[{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[P.required,P.max,P.min]}]}},email(){return{sections:[{sectionTitle:null,items:[{...P.default,type:"email"}]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[P.required,P.unique,P.maxLength,P.minLength,P.private]}]}},enumeration(e){return{sections:[{sectionTitle:null,items:[{name:"default",type:"select",intlLabel:{id:(0,c.Z)("form.attribute.settings.default"),defaultMessage:"Default value"},validations:{},options:[{key:"__null_reset_value__",value:"",metadatas:{intlLabel:{id:"components.InputSelect.option.placeholder",defaultMessage:"Choose here"}}},...(e.enum||[]).filter((n,o)=>e.enum.indexOf(n)===o&&n).map(n=>({key:n,value:n,metadatas:{intlLabel:{id:`${n}.no-override`,defaultMessage:n}}}))]},{intlLabel:{id:(0,c.Z)("form.attribute.item.enumeration.graphql"),defaultMessage:"Name override for GraphQL"},name:"enumName",type:"text",validations:{},description:{id:(0,c.Z)("form.attribute.item.enumeration.graphql.description"),defaultMessage:"Allows you to override the default generated name for GraphQL"}}]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[P.required,P.private]}]}},json(){return{sections:[{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[P.required,P.private]}]}},media(){return{sections:[{sectionTitle:null,items:[{intlLabel:{id:(0,c.Z)("form.attribute.media.allowed-types"),defaultMessage:"Select allowed types of media"},name:"allowedTypes",type:"allowed-types-select",size:7,value:"",validations:{}}]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[P.required,P.private]}]}},number(e){const n=e.type==="decimal"||e.type==="float"?"any":1;return{sections:[{sectionTitle:null,items:[{autoFocus:!0,name:"default",type:e.type==="biginteger"?"text":"number",step:n,intlLabel:{id:(0,c.Z)("form.attribute.settings.default"),defaultMessage:"Default value"},validations:{}}]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[P.required,P.unique,P.max,P.min,P.private]}]}},password(){return{sections:[{sectionTitle:null,items:[P.default]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[P.required,P.maxLength,P.minLength,P.private]}]}},relation(){return{sections:[{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[P.private]}]}},richtext(){return{sections:[{sectionTitle:null,items:[P.default]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[P.required,P.maxLength,P.minLength,P.private]}]}},text(){return{sections:[{sectionTitle:null,items:[P.default,P.regex]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[P.required,P.unique,P.maxLength,P.minLength,P.private]}]}},uid(e){return{sections:[{sectionTitle:null,items:[{...P.default,disabled:Boolean(e.targetField),type:"text"}]},{sectionTitle:{id:"global.settings",defaultMessage:"Settings"},items:[P.required,P.maxLength,P.minLength,P.private]}]}}},to={component(e,n){if(n==="1"){const o=e.createComponent===!0?ot.base("componentToCreate."):[];return{sections:[{sectionTitle:null,items:[Ja]},...o]}}return{sections:[{sectionTitle:null,items:[De,{name:"component",type:"select-component",intlLabel:{id:(0,c.Z)("modalForm.attributes.select-component"),defaultMessage:"Select a component"},isMultiple:!1}]},{sectionTitle:null,items:[{intlLabel:{id:"global.type",defaultMessage:"Type"},name:"repeatable",type:"boolean-radio-group",size:12,radios:[{title:{id:(0,c.Z)("form.attribute.component.option.repeatable"),defaultMessage:"Repeatable component"},description:{id:(0,c.Z)("form.attribute.component.option.repeatable.description"),defaultMessage:"Best for multiple instances (array) of ingredients, meta tags, etc.."},value:!0},{title:{id:(0,c.Z)("form.attribute.component.option.single"),defaultMessage:"Single component"},description:{id:(0,c.Z)("form.attribute.component.option.single.description"),defaultMessage:"Best for grouping fields like full address, main information, etc..."},value:!1}]}]}]}},date(){return{sections:[{sectionTitle:null,items:[De,{intlLabel:{id:"global.type",defaultMessage:"Type"},name:"type",type:"select-date",options:[{key:"__null_reset_value__",value:"",metadatas:{intlLabel:{id:"components.InputSelect.option.placeholder",defaultMessage:"Choose here"},hidden:!0}},{key:"date",value:"date",metadatas:{intlLabel:{id:(0,c.Z)("form.attribute.item.date.type.date"),defaultMessage:"date (ex: 01/01/{currentYear})",values:{currentYear:new Date().getFullYear()}}}},{key:"datetime",value:"datetime",metadatas:{intlLabel:{id:(0,c.Z)("form.attribute.item.date.type.datetime"),defaultMessage:"datetime (ex: 01/01/{currentYear} 00:00 AM)",values:{currentYear:new Date().getFullYear()}}}},{key:"time",value:"time",metadatas:{intlLabel:{id:(0,c.Z)("form.attribute.item.date.type.time"),defaultMessage:"time (ex: 00:00 AM)"}}}]}]}]}},enumeration(){return{sections:[{sectionTitle:null,items:[De]},{sectionTitle:null,items:[{name:"enum",type:"textarea-enum",size:6,intlLabel:{id:(0,c.Z)("form.attribute.item.enumeration.rules"),defaultMessage:"Values (one line per value)"},placeholder:{id:(0,c.Z)("form.attribute.item.enumeration.placeholder"),defaultMessage:`Ex:
|
|
166
|
-
morning
|
|
167
|
-
noon
|
|
168
|
-
evening`},validations:{required:!0}}]}]}},media(){return{sections:[{sectionTitle:null,items:[De]},{sectionTitle:null,items:[{intlLabel:{id:"global.type",defaultMessage:"Type"},name:"multiple",size:12,type:"boolean-radio-group",radios:[{title:{id:(0,c.Z)("form.attribute.media.option.multiple"),defaultMessage:"Multiple media"},description:{id:(0,c.Z)("form.attribute.media.option.multiple.description"),defaultMessage:"Best for sliders, carousels or multiple files download"},value:!0},{title:{id:(0,c.Z)("form.attribute.media.option.single"),defaultMessage:"Single media"},description:{id:(0,c.Z)("form.attribute.media.option.single.description"),defaultMessage:"Best for avatar, profile picture or cover"},value:!1}]}]}]}},number(){return{sections:[{sectionTitle:null,items:[De,{intlLabel:{id:(0,c.Z)("form.attribute.item.number.type"),defaultMessage:"Number format"},name:"type",type:"select-number",options:[{key:"__null_reset_value__",value:"",metadatas:{intlLabel:{id:"components.InputSelect.option.placeholder",defaultMessage:"Choose here"},hidden:!0}},{key:"integer",value:"integer",metadatas:{intlLabel:{id:(0,c.Z)("form.attribute.item.number.type.integer"),defaultMessage:"integer (ex: 10)"}}},{key:"biginteger",value:"biginteger",metadatas:{intlLabel:{id:(0,c.Z)("form.attribute.item.number.type.biginteger"),defaultMessage:"biginteger (ex: 123456789)"}}},{key:"decimal",value:"decimal",metadatas:{intlLabel:{id:(0,c.Z)("form.attribute.item.number.type.decimal"),defaultMessage:"decimal (ex: 2.22)"}}},{key:"float",value:"float",metadatas:{intlLabel:{id:(0,c.Z)("form.attribute.item.number.type.float"),defaultMessage:"decimal (ex: 3.3333333)"}}}]}]}]}},relation(){return{sections:[{sectionTitle:null,items:[{intlLabel:{id:"FIXME",defaultMessage:"FIXME"},name:"relation",size:12,type:"relation"}]}]}},string(){return{sections:[{sectionTitle:null,items:[De]},{sectionTitle:null,items:[{intlLabel:{id:"global.type",defaultMessage:"Type"},name:"type",size:12,type:"radio-group",radios:[{title:{id:(0,c.Z)("form.attribute.text.option.short-text"),defaultMessage:"Sort text"},description:{id:(0,c.Z)("form.attribute.text.option.short-text.description"),defaultMessage:"Best for titles, names, links (URL). It also enables exact search on the field."},value:"string"},{title:{id:(0,c.Z)("form.attribute.text.option.long-text"),defaultMessage:"Long text"},description:{id:(0,c.Z)("form.attribute.text.option.long-text.description"),defaultMessage:"Best for descriptions, biography. Exact search is disabled."},value:"text"}]}]}]}},text(){return{sections:[{sectionTitle:null,items:[De]},{sectionTitle:null,items:[{intlLabel:{id:"global.type",defaultMessage:"Type"},name:"type",size:12,type:"radio-group",radios:[{title:{id:(0,c.Z)("form.attribute.text.option.short-text"),defaultMessage:"Sort text"},description:{id:(0,c.Z)("form.attribute.text.option.short-text.description"),defaultMessage:"Best for titles, names, links (URL). It also enables exact search on the field."},value:"string"},{title:{id:(0,c.Z)("form.attribute.text.option.long-text"),defaultMessage:"Long text"},description:{id:(0,c.Z)("form.attribute.text.option.long-text.description"),defaultMessage:"Best for descriptions, biography. Exact search is disabled."},value:"text"}]}]}]}},uid(e,n,o){const i=o.filter(({type:r})=>["string","text"].includes(r)).map(({name:r})=>({key:r,value:r,metadatas:{intlLabel:{id:`${r}.no-override`,defaultMessage:r}}}));return{sections:[{sectionTitle:null,items:[{...De,placeholder:{id:(0,c.Z)("modalForm.attribute.form.base.name.placeholder"),defaultMessage:"e.g. slug, seoUrl, canonicalUrl"}},{intlLabel:{id:(0,c.Z)("modalForm.attribute.target-field"),defaultMessage:"Attached field"},name:"targetField",type:"select",options:[{key:"__null_reset_value__",value:"",metadatas:{intlLabel:{id:"global.none",defaultMessage:"None"}}},...i]}]}]}}},Bn={advanced:eo,base:to},ao=a(91815),no=a.n(ao),so=a(40791),oo=a.n(so),en=e=>oo()(e,{decamelize:!1,lowercase:!1,separator:"_"}),ro=a(78746),tn=a.n(ro);const Un=/^[A-Za-z][_0-9A-Za-z]*$/,Wn=e=>({name:"attributeNameAlreadyUsed",message:p.I0.unique,test(n){return n?!e.includes(n):!1}}),Tr=(e,n,o)=>{const i=e?.schema?.attributes??{};return Object.keys(i).filter(r=>n?r!==o:!0)},an=e=>({name:"forbiddenAttributeName",message:(0,c.Z)("error.attributeName.reserved-name"),test(n){return n?!e.includes(n):!1}}),b={default:()=>h.Z_().nullable(),max:()=>h.Rx().integer().nullable(),min:()=>h.Rx().integer().when("max",(e,n)=>e?n.max(e,(0,c.Z)("error.validation.minSupMax")):n).nullable(),maxLength:()=>h.Rx().integer().positive((0,c.Z)("error.validation.positive")).nullable(),minLength:()=>h.Rx().integer().min(0).when("maxLength",(e,n)=>e?n.max(e,(0,c.Z)("error.validation.minSupMax")):n).nullable(),name(e,n){return h.Z_().test(Wn(e)).test(an(n)).matches(Un,p.I0.regex).required(p.I0.required)},required:()=>h.O7(),type:()=>h.Z_().required(p.I0.required),unique:()=>h.O7().nullable()},nn=(e,n)=>({name:b.name(e,n),type:b.type(),default:b.default(),unique:b.unique(),required:b.required(),maxLength:b.maxLength(),minLength:b.minLength(),regex:h.Z_().test({name:"isValidRegExpPattern",message:(0,c.Z)("error.validation.regex"),test(i){return new RegExp(i)!==null}}).nullable()}),sn={name:"isMinSuperiorThanMax",message:(0,c.Z)("error.validation.minSupMax"),test(e){if(!e)return!0;const{max:n}=this.parent;return!n||Number.isNaN(tn()(e))?!0:tn()(n)>=tn()(e)}};var on={date(e,n){const o={name:b.name(e,n),type:b.type()};return h.Ry(o)},datetime(e,n){const o={name:b.name(e,n),type:b.type()};return h.Ry(o)},time(e,n){const o={name:b.name(e,n),type:b.type()};return h.Ry(o)},default(e,n){const o={name:b.name(e,n),type:b.type()};return h.Ry(o)},biginteger(e,n){const o={name:b.name(e,n),type:b.type(),default:h.Z_().nullable().matches(/^-?\d*$/),unique:b.unique(),required:b.required(),max:h.Z_().nullable().matches(/^-?\d*$/,p.I0.regex),min:h.Z_().nullable().test(sn).matches(/^-?\d*$/,p.I0.regex)};return h.Ry(o)},boolean(e,n){const o={name:b.name(e,n),default:h.O7().nullable(),required:b.required(),unique:b.unique()};return h.Ry(o)},component(e,n){const o={name:b.name(e,n),type:b.type(),required:b.required(),max:b.max(),min:b.min(),component:h.Z_().required(p.I0.required)};return h.Ry(o)},decimal(e,n){const o={name:b.name(e,n),type:b.type(),default:h.Rx(),required:b.required(),max:h.Rx(),min:h.Rx().test(sn)};return h.Ry(o)},dynamiczone(e,n){const o={name:b.name(e,n),type:b.type(),required:b.required(),max:b.max(),min:b.min()};return h.Ry(o)},email(e,n){const o={name:b.name(e,n),type:b.type(),default:h.Z_().email().nullable(),unique:b.unique(),required:b.required(),maxLength:b.maxLength(),minLength:b.minLength()};return h.Ry(o)},enumeration(e,n){const o=/^[_A-Za-z][_0-9A-Za-z]*$/,i={name:h.Z_().test(Wn(e)).test(an(n)).matches(o,p.I0.regex).required(p.I0.required),type:b.type(),default:b.default(),unique:b.unique(),required:b.required(),enum:h.IX().of(h.Z_()).min(1,p.I0.min).test({name:"areEnumValuesUnique",message:(0,c.Z)("error.validation.enum-duplicate"),test(r){return!no()(r.map(en).filter((l,x,u)=>u.indexOf(l)!==x)).length}}).test({name:"doesNotHaveEmptyValues",message:(0,c.Z)("error.validation.enum-empty-string"),test:r=>!r.map(en).some(d=>d==="")}).test({name:"doesMatchRegex",message:(0,c.Z)("error.validation.enum-regex"),test:r=>r.map(en).every(d=>o.test(d))}),enumName:h.Z_().nullable()};return h.Ry(i)},float(e,n){const o={name:b.name(e,n),type:b.type(),required:b.required(),default:h.Rx(),max:h.Rx(),min:h.Rx().test(sn)};return h.Ry(o)},integer(e,n){const o={name:b.name(e,n),type:b.type(),default:h.Rx().integer(),unique:b.unique(),required:b.required(),max:b.max(),min:b.min()};return h.Ry(o)},json(e,n){const o={name:b.name(e,n),type:b.type(),required:b.required(),unique:b.unique()};return h.Ry(o)},media(e,n){const o={name:b.name(e,n),type:b.type(),multiple:h.O7(),required:b.required(),allowedTypes:h.IX().of(h.Z_().oneOf(["images","videos","files","audios"])).min(1).nullable()};return h.Ry(o)},password(e,n){const o={name:b.name(e,n),type:b.type(),default:b.default(),unique:b.unique(),required:b.required(),maxLength:b.maxLength(),minLength:b.minLength()};return h.Ry(o)},relation(e,n,o,{initialData:i,modifiedData:r}){const d={name:b.name(e,n),target:h.Z_().required(p.I0.required),relation:h.Z_().required(),type:h.Z_().required(),targetAttribute:h.Vo(()=>{const l=(0,za.Z)(r.relation,r.targetAttribute);if(l==="oneWay"||l==="manyWay")return h.Z_().nullable();let x=h.Z_().test(an(n)),_=[...o.map(({name:f})=>f),r.name].filter(f=>f!==i.targetAttribute);return x.matches(Un,p.I0.regex).test({name:"forbiddenTargetAttributeName",message:(0,c.Z)("error.validation.relation.targetAttribute-taken"),test(f){return f?!_.includes(f):!1}}).required(p.I0.required)})};return h.Ry(d)},richtext(e,n){const o={name:b.name(e,n),type:b.type(),default:b.default(),unique:b.unique(),required:b.required(),maxLength:b.maxLength(),minLength:b.minLength()};return h.Ry(o)},string(e,n){const o=nn(e,n);return h.Ry(o)},text(e,n){const o=nn(e,n);return h.Ry(o)},uid(e,n){const o=nn(e,n);return h.Ry(o)}},io=({usedContentTypeNames:e=[],reservedModels:n=[],singularNames:o=[],pluralNames:i=[],collectionNames:r=[]})=>{const d={displayName:h.Z_().test({name:"nameAlreadyUsed",message:p.I0.unique,test(l){if(!l)return!1;const x=(0,st.E)(l);return!e.includes(x)}}).test({name:"nameNotAllowed",message:(0,c.Z)("error.contentTypeName.reserved-name"),test(l){return l?!n.includes(l?.trim()?.toLowerCase()):!1}}).required(p.I0.required),pluralName:h.Z_().test({name:"pluralNameAlreadyUsed",message:p.I0.unique,test(l){return l?!i.includes(l):!1}}).test({name:"pluralNameAlreadyUsedAsSingular",message:(0,c.Z)("error.contentType.pluralName-equals-singularName"),test(l){return l?!o.includes(l):!1}}).test({name:"pluralAndSingularAreUnique",message:(0,c.Z)("error.contentType.pluralName-used"),test(l,x){return l?x.parent.singularName!==l:!1}}).test({name:"pluralNameNotAllowed",message:(0,c.Z)("error.contentTypeName.reserved-name"),test(l){return l?!n.includes(l?.trim()?.toLowerCase()):!1}}).test({name:"pluralNameNotAlreadyUsedInCollectionName",message:(0,c.Z)("error.contentType.pluralName-equals-collectionName"),test(l){return l?!r.includes(l?.trim()?.toLowerCase()):!1}}).required(p.I0.required),singularName:h.Z_().test({name:"singularNameAlreadyUsed",message:p.I0.unique,test(l){return l?!o.includes(l):!1}}).test({name:"singularNameAlreadyUsedAsPlural",message:(0,c.Z)("error.contentType.singularName-equals-pluralName"),test(l){return l?!i.includes(l):!1}}).test({name:"pluralAndSingularAreUnique",message:(0,c.Z)("error.contentType.singularName-used"),test(l,x){return l?x.parent.pluralName!==l:!1}}).test({name:"singularNameNotAllowed",message:(0,c.Z)("error.contentTypeName.reserved-name"),test(l){return l?!n.includes(l?.trim()?.toLowerCase()):!1}}).required(p.I0.required),draftAndPublish:h.O7(),kind:h.Z_().oneOf(["singleType","collectionType"]),reviewWorkflows:h.O7()};return h.Ry(d)};const jn={name:"displayName",type:"text",intlLabel:{id:(0,c.Z)("contentType.displayName.label"),defaultMessage:"Display name"}};var rn={advanced:{default(){return{sections:[{items:[{intlLabel:{id:(0,c.Z)("contentType.draftAndPublish.label"),defaultMessage:"Draft & publish"},description:{id:(0,c.Z)("contentType.draftAndPublish.description"),defaultMessage:"Allows writing a draft version of an entry, before it is published"},name:"draftAndPublish",type:"toggle-draft-publish",validations:{}}]}]}}},base:{create(){return{sections:[{sectionTitle:null,items:[jn,{description:{id:(0,c.Z)("contentType.apiId-singular.description"),defaultMessage:"Used to generate the API routes and databases tables/collections"},intlLabel:{id:(0,c.Z)("contentType.apiId-singular.label"),defaultMessage:"API ID (Singular)"},name:"singularName",type:"text-singular"},{type:"pushRight",size:6,intlLabel:{id:"",defaultMessage:""},name:"pushRight"},{description:{id:(0,c.Z)("contentType.apiId-plural.description"),defaultMessage:"Pluralized API ID"},intlLabel:{id:(0,c.Z)("contentType.apiId-plural.label"),defaultMessage:"API ID (Plural)"},name:"pluralName",type:"text-plural"}]}]}},edit(){return{sections:[{sectionTitle:null,items:[jn,{disabled:!0,description:{id:(0,c.Z)("contentType.apiId-singular.description"),defaultMessage:"Used to generate the API routes and databases tables/collections"},intlLabel:{id:(0,c.Z)("contentType.apiId-singular.label"),defaultMessage:"API ID (Singular)"},name:"singularName",type:"text"},{type:"pushRight",size:6,intlLabel:{id:"",defaultMessage:""},name:"pushRight"},{disabled:!0,description:{id:(0,c.Z)("contentType.apiId-plural.description"),defaultMessage:"Pluralized API ID"},intlLabel:{id:(0,c.Z)("contentType.apiId-plural.label"),defaultMessage:"API ID (Plural)"},name:"pluralName",type:"text"},{intlLabel:{id:"global.type",defaultMessage:"Type"},name:"kind",type:"content-type-radio-group",size:12,radios:[{title:{id:(0,c.Z)("form.button.collection-type.name"),defaultMessage:"Collection Type"},description:{id:(0,c.Z)("form.button.collection-type.description"),defaultMessage:"Best for multiple instances like articles, products, comments, etc."},value:"collectionType"},{title:{id:(0,c.Z)("form.button.single-type.name"),defaultMessage:"Single Type"},description:{id:(0,c.Z)("form.button.single-type.description"),defaultMessage:"Best for single instance like about us, homepage, etc."},value:"singleType"}]}]}]}}}},ln={advanced:{default(){return{sections:ot.advanced("componentToCreate.")}}},base:{createComponent(){return{sections:[{sectionTitle:null,items:[Ja]},...ot.base("componentToCreate.")]}},default(){return{sections:[{sectionTitle:null,items:[Ja]},{sectionTitle:null,items:[{type:"pushRight",size:6,intlLabel:{id:"",defaultMessage:""},name:"pushRight"},{name:"components",type:"select-components",intlLabel:{id:(0,c.Z)("modalForm.attributes.select-components"),defaultMessage:"Select the components"},isMultiple:!0}]}]}}}},Kn=(e,n)=>{e.forEach(o=>{if(!("sectionTitle"in o)){n[0].items.push(o);return}n.push(o)})},$n=(e,n)=>e.filter(({name:o})=>o!==n.initialData.name).map(({name:o})=>o),ke={customField:{schema({schemaAttributes:e,attributeType:n,customFieldValidator:o,reservedNames:i,schemaData:r,ctbFormsAPI:d}){const l=$n(e,r),x=on[n](l,i.attributes);return d.makeCustomFieldValidator(x,o,l,i.attributes,r)},form:{base({customField:e}){const n=[{sectionTitle:null,items:[De]}];return e.options?.base&&Kn(e.options.base,n),{sections:n}},advanced({customField:e,data:n,step:o,extensions:i,...r}){const d=[{sectionTitle:null,items:[]}],l=i.getAdvancedForm(["attribute",e.type],{data:n,type:e.type,step:o,...r});if(e.options?.advanced&&Kn(e.options.advanced,d),l){const x={sectionTitle:{id:(0,c.Z)("modalForm.custom-fields.advanced.settings.extended"),defaultMessage:"Extended settings"},items:l};d.push(x)}return{sections:d}}}},attribute:{schema(e,n,o,i,r,d){const l=e?.schema?.attributes??[],x=$n(l,r);try{let u=on[n](x,o.attributes,i,r);return d.makeValidator(["attribute",n],u,x,o.attributes,i,r)}catch(u){return console.error("Error yup build schema",u),on.default(x,o.attributes)}},form:{advanced({data:e,type:n,step:o,extensions:i,...r}){try{const d=Bn.advanced[n](e,o).sections,l=i.getAdvancedForm(["attribute",n],{data:e,type:n,step:o,...r});return{sections:d.reduce((u,_)=>(_.sectionTitle===null?u.push(_):u.push({..._,items:[..._.items,...l]}),u),[])}}catch(d){return console.error(d),{sections:[]}}},base({data:e,type:n,step:o,attributes:i}){try{return Bn.base[n](e,o,i)}catch{return Qs}}}},contentType:{schema(e,n,o,i,r,d){const l=Object.values(d).map(y=>y.schema.singularName),x=Object.values(d).map(y=>y?.schema?.pluralName??""),u=n?e.filter(y=>y!==o):e,_=n?l.filter(y=>{const{schema:C}=d[o];return C.singularName!==y}):l,f=n?x.filter(y=>{const{schema:C}=d[o];return C.pluralName!==y}):x,m=Object.values(d).map(y=>y?.schema?.collectionName??""),M=n?m.filter(y=>{const{schema:C}=d[o],L=C.pluralName,v=C.collectionName;return y!==L||y!==v}):m,E=io({usedContentTypeNames:u,reservedModels:i.models,singularNames:_,pluralNames:f,collectionNames:M});return r.makeValidator(["contentType"],E,u,i.models,_,f)},form:{base({actionType:e}){return e==="create"?rn.base.create():rn.base.edit()},advanced({extensions:e}){const n=rn.advanced.default().sections.map(i=>i.items).flat(),o=e.getAdvancedForm(["contentType"]);return{sections:[{items:[...n,...o]}]}}}},component:{schema(e,n,o,i=!1,r=null){const d=i?e.filter(l=>l!==r):e;return Js(d,o.models,n)},form:{advanced(){return{sections:ot.advanced()}},base(){return{sections:ot.base()}}}},addComponentToDynamicZone:{form:{advanced(){return ln.advanced.default()},base({data:e}){return e?.createComponent??!1?ln.base.createComponent():ln.base.default()}}},editCategory:{schema(e,n){const o=e.filter(i=>i!==n.name).map(i=>i.toLowerCase());return Ys(o)},form:{advanced:()=>({sections:[]}),base(){return Xs.base}}}},zn=a(98178),lo=a(9260);const co=()=>e=>e[`${H.Z}_formModal`]||lo.E;var xo=()=>(0,zn.P1)(co(),e=>e),uo=(e,n)=>{const o=R()(e,["contentType","schema","kind"],"");return o==="singleType"||o===n.kind?!0:R()(e,["contentType","schema","attributes"],[]).filter(({relation:d,type:l,targetAttribute:x})=>{const u=(0,za.Z)(d,x);return l==="relation"&&!["oneWay","manyWay"].includes(u)}).length===0},mo=(e="",n,o)=>{const i=["text","email","richtext","password","number","enumeration","date","media","boolean","json","relation"],r=e==="contentType",d=o.includes(n),l=!r&&!d;return r?[[...i,"uid"],["component","dynamiczone"]]:l?[i,["component"]]:[i]},kn=e=>e.reduce((n,o)=>{const i=o.items.reduce((r,d)=>(d.name&&r.push(d.name),r),[]);return[...n,...i]},[]),fo=()=>{const{onCloseModal:e,onNavigateToChooseAttributeModal:n,onNavigateToAddCompoToDZModal:o,onNavigateToCreateComponentStep2:i,actionType:r,attributeName:d,attributeType:l,customFieldUid:x,categoryName:u,dynamicZoneTarget:_,forTarget:f,modalType:m,isOpen:M,showBackLink:E,kind:y,step:C,targetUid:L}=(0,Oe.Z)(),v=(0,p.mZ)().get(x),O=(0,t.useRef)(),D=(0,t.useMemo)(xo,[]),I=(0,Se.I0)(),G=(0,p.lm)(),de=(0,Se.v9)(K=>D(K),Se.wU),{push:ye}=(0,j.k6)(),{trackUsage:B}=(0,p.rS)(),{formatMessage:be}=(0,S.Z)(),{getPlugin:q}=(0,p.j1)(),ae=q(H.Z).apis.forms,te=ae.components.inputs,{addAttribute:Ne,addCustomFieldAttribute:ce,addCreatedComponentToDynamicZone:V,allComponentsCategories:T,changeDynamicZoneComponents:cn,contentTypes:rt,components:Tt,createSchema:it,deleteCategory:xn,deleteData:Ht,editCategory:un,editCustomFieldAttribute:mn,submitData:fn,modifiedData:me,nestedComponents:_n,setModifiedData:pn,sortedContentTypesList:gn,updateSchema:Gt,reservedNames:we}=(0,J.Z)(),{componentToCreate:Ct,formErrors:Fe,initialData:oe,isCreatingComponentWhileAddingAField:Zt,modifiedData:g}=de,Z=f==="contentType"||f==="component"?[f]:[f,L];(0,t.useEffect)(()=>{if(M){const K=gn.filter(Lt);m==="editCategory"&&pn(),r==="edit"&&m==="attribute"&&f==="contentType"&&B("willEditFieldOfContentType");const Me=[...Z,"schema","attributes"],Ze=xt(R()(me,Me,[]),_)||null;if(m==="editCategory"&&r==="edit"&&I({type:ee._H,modalType:m,actionType:r,data:{name:u}}),m==="contentType"&&r==="create"&&I({type:ee._H,modalType:m,actionType:r,data:{draftAndPublish:!0},pluginOptions:{}}),m==="contentType"&&r==="edit"){const{displayName:w,draftAndPublish:re,kind:Re,pluginOptions:_e,pluralName:lr,reviewWorkflows:dr,singularName:cr}=R()(me,[...Z,"schema"],{displayName:null,pluginOptions:{},singularName:null,pluralName:null});I({type:ee._H,actionType:r,modalType:m,data:{displayName:w,draftAndPublish:re,kind:Re,pluginOptions:_e,pluralName:lr,reviewWorkflows:dr??!1,singularName:cr}})}if(m==="component"&&r==="edit"){const w=R()(me,Z,{});I({type:ee._H,actionType:r,modalType:m,data:{displayName:w.schema.displayName,category:w.category,icon:w.schema.icon}})}if(m==="addComponentToDynamicZone"&&r==="edit"){const w={...Ze,components:[],name:_,createComponent:!1,componentToCreate:{type:"component"}};I({type:ee.VZ,attributeToEdit:w})}if(l){const re={...xt(R()(me,Me,[]),d),name:d};l==="component"&&r==="edit"&&(re.repeatable||Ot()(re,"repeatable",!1)),I(m==="customField"?{type:ee.OY,customField:v,isEditing:r==="edit",modifiedDataToSetForEditing:re,forTarget:f}:{type:ee.S0,attributeType:l,nameToSetForRelation:R()(K,["0","title"],"error"),targetUid:R()(K,["0","uid"],"error"),isEditing:r==="edit",modifiedDataToSetForEditing:re,step:C,forTarget:f})}}else I({type:ee.c2})},[r,d,l,u,_,f,M,m]);const U=m==="contentType",ne=m==="component",fe=m==="attribute",Ee=m==="customField",Be=l==="component"&&fe,Xe=r==="create",Ve=R()(g,"createComponent",!1)||Zt,lt=C==="1",as=m==="editCategory",ns=m==="chooseAttribute",bn=(0,st.E)(g.displayName||""),hn=R()(me,[...Z,"schema","attributes"],null),Go=async()=>{let K;const Me=Ve&&C==="1"?R()(g,"componentToCreate",{}):g;if(U)K=ke.contentType.schema(Object.keys(rt),r==="edit",R()(me,[...Z,"uid"],null),we,ae,rt);else if(ne)K=ke.component.schema(Object.keys(Tt),g.category||"",we,r==="edit",R()(me,[...Z,"uid"],null),ae);else if(Ee)K=ke.customField.schema({schemaAttributes:R()(me,[...Z,"schema","attributes"],[]),attributeType:v.type,reservedNames:we,schemaData:{modifiedData:g,initialData:oe},ctbFormsAPI:ae,customFieldValidator:v.options?.validator});else if(Be&&Ve&<)K=ke.component.schema(Object.keys(Tt),R()(g,"componentToCreate.category",""),we,ae);else if(fe&&!lt){const Ze=l==="relation"?"relation":g.type;let w=[];if(Ze==="relation"){const re=R()(g,["target"],null);w=R()(rt,[re,"schema","attributes"],[]).filter(({name:_e})=>r!=="edit"?!0:_e!==oe.targetAttribute)}K=ke.attribute.schema(R()(me,Z,{}),Ze,we,w,{modifiedData:g,initialData:oe},ae)}else if(as)K=ke.editCategory.schema(T,oe,ae);else if(lt&&Ve)K=ke.component.schema(Object.keys(Tt),R()(g,"componentToCreate.category",""),we,ae);else return;await K.validate(Me,{abortEarly:!1})},ss=(0,t.useCallback)(({target:{name:K,value:Me,type:Ze,...w}})=>{const re=["enumName","max","min","maxLength","minLength","regex","default"];let Re;re.includes(K)&&Me===""?Re=null:Re=Me;const _e=Object.assign({},Fe);K==="max"&&delete _e.min,K==="maxLength"&&delete _e.minLength,delete _e[K],I({type:ee.Ey,errors:_e}),I({type:ee.P0,keys:K.split("."),value:Re,...w})},[I,Fe]),Ce=async(K,Me=Xe)=>{K.preventDefault();try{await Go(),Yo(Me);const Ze=f==="components"?L:bn;if(U)if(Xe)it({...g,kind:y},m,bn),ye({pathname:`/plugins/${H.Z}/content-types/${bn}`}),n({forTarget:f,targetUid:Ze});else{uo(me,g)?(e(),fn(g)):G({type:"warning",message:{id:"notification.contentType.relations.conflict"}});return}else if(m==="component")if(Xe){const w=(0,st.N)(g.displayName,g.category),{category:re,...Re}=g;it(Re,"component",w,re),ye({pathname:`/plugins/${H.Z}/component-categories/${re}/${w}`}),n({forTarget:f,targetUid:w})}else{Gt(g,m,L),e();return}else if(as){if(Dt()(oe.name)===Dt()(g.name)){e();return}un(oe.name,g);return}else if(Ee){const w={attributeToSet:{...g,customField:x},forTarget:f,targetUid:L,initialAttribute:oe};r==="edit"?mn(w):ce(w),Me?n({forTarget:f,targetUid:Ze}):e();return}else if(fe&&!Ve){if(l==="dynamiczone"){Ne(g,f,L,r==="edit",oe),Xe?(I({type:ee.I}),O.current._handlers.setSelectedTabIndex(0),o({dynamicZoneTarget:g.name})):e();return}if(!Be){Ne(g,f,L,r==="edit",oe),Me?n({forTarget:f,targetUid:Ze}):e();return}if(lt){i(),I({type:ee.yC,forTarget:f});return}Ne(g,f,L,r==="edit",oe,!0),Me?n({forTarget:f,targetUid:L}):e()}else if(fe&&Ve){if(lt){B("willCreateComponentFromAttributesModal"),I({type:ee.oF,forTarget:f}),i();return}const{category:w,type:re,...Re}=Ct,_e=(0,st.N)(Ct.displayName,w);it(Re,re,_e,w,Ve),Ne(g,f,L,!1),I({type:ee.c2}),Me?n({forTarget:"components",targetUid:_e}):e();return}else{if(lt)if(Ve){const{category:w,type:re,...Re}=g.componentToCreate,_e=(0,st.N)(g.componentToCreate.displayName,w);it(Re,re,_e,w,Ve),V(_,[_e]),n({forTarget:"components",targetUid:_e})}else cn(_,g.components),e();else console.error("This case is not handled");return}I({type:ee.c2})}catch(Ze){const w=(0,p.CJ)(Ze);console.log(..._o("ed0d617d_0",{err:Ze,errors:w})),I({type:ee.Ey,errors:w})}},qo=()=>{window.confirm(be({id:"window.confirm.close-modal.file",defaultMessage:"Are you sure? Your changes will be lost."}))&&(e(),I({type:ee.c2}))},os=()=>{Qe()(g,oe)?(e(),I({type:ee.c2})):qo()},Qo=K=>{if(K==="advanced"){if(U){B("didSelectContentTypeSettings");return}f==="contentType"&&B("didSelectContentTypeFieldSettings")}},Yo=K=>{m==="attribute"&&f==="contentType"&&l!=="dynamiczone"&&K&&B("willAddMoreFieldToContentType")},Xo=()=>!!(m==="editCategory"||m==="component"||la()(g,"createComponent")),Jo=mo(f,L,_n);if(!M||!m)return null;const rs=R()(ke,[m,"form"],{advanced:()=>({sections:[]}),base:()=>({sections:[]})}),er=f==="components"||f==="component",is={customInputs:{"allowed-types-select":xa,"boolean-radio-group":Pa,"checkbox-with-number-field":Da,"icon-picker":Es,"content-type-radio-group":La,"radio-group":bt,relation:Ws,"select-category":$s,"select-component":zs,"select-components":ks,"select-default-boolean":Ra,"select-number":Vs,"select-date":ws,"toggle-draft-publish":Ia,"text-plural":Ts,"text-singular":Hs,"textarea-enum":qs,...te},componentToCreate:Ct,dynamicZoneTarget:_,formErrors:Fe,isAddingAComponentToAnotherComponent:er,isCreatingComponentWhileAddingAField:Zt,mainBoxHeader:R()(me,[...Z,"schema","displayName"],""),modifiedData:g,naturePickerType:f,isCreating:Xe,targetUid:L,forTarget:f},ls=rs.advanced({data:g,type:l,step:C,actionType:r,attributes:hn,extensions:ae,forTarget:f,contentTypeSchema:me.contentType||{},customField:v}).sections,ds=rs.base({data:g,type:l,step:C,actionType:r,attributes:hn,extensions:ae,forTarget:f,contentTypeSchema:me.contentType||{},customField:v}).sections,tr=kn(ds),ar=kn(ls),nr=Object.keys(Fe).some(K=>tr.includes(K)),sr=Object.keys(Fe).some(K=>ar.includes(K)),or=R()(rt,[L,"schema","kind"]),rr=()=>r==="edit"&&hn.every(({name:K})=>K!==g?.name),ir=()=>{rr()&&B("didEditFieldNameOnContentType")};return t.createElement(oa.P,{onClose:os,labelledBy:"title"},t.createElement(cs,{actionType:r,attributeName:d,categoryName:u,contentTypeKind:y,dynamicZoneTarget:_,modalType:m,forTarget:f,targetUid:L,attributeType:l,customFieldUid:x,showBackLink:E}),ns&&t.createElement(Za,{attributes:Jo,forTarget:f,kind:or||"collectionType"}),!ns&&t.createElement("form",{onSubmit:Ce},t.createElement(Pt.f,null,t.createElement(At.v,{label:"todo",id:"tabs",variant:"simple",ref:O,onTabChange:K=>{K===1&&Qo("advanced")}},t.createElement(A.k,{justifyContent:"space-between"},t.createElement(us,{actionType:r,forTarget:f,kind:y,step:C,modalType:m,attributeType:l,attributeName:d,customField:v}),t.createElement($e.m,null,t.createElement($e.O,{hasError:nr},be({id:(0,c.Z)("popUpForm.navContainer.base"),defaultMessage:"Basic settings"})),t.createElement($e.O,{hasError:sr,disabled:Xo()},be({id:(0,c.Z)("popUpForm.navContainer.advanced"),defaultMessage:"Advanced settings"})))),t.createElement(ct.i,null),t.createElement(F.x,{paddingTop:6},t.createElement(ze.n,null,t.createElement(ze.x,null,t.createElement(A.k,{direction:"column",alignItems:"stretch",gap:6},t.createElement(Nn,{form:ds,formErrors:Fe,genericInputProps:is,modifiedData:g,onChange:ss}))),t.createElement(ze.x,null,t.createElement(A.k,{direction:"column",alignItems:"stretch",gap:6},t.createElement(Nn,{form:ls,formErrors:Fe,genericInputProps:is,modifiedData:g,onChange:ss}))))))),t.createElement(ra.m,{endActions:t.createElement(Sa,{deleteCategory:xn,deleteContentType:Ht,deleteComponent:Ht,categoryName:oe.name,isAttributeModal:m==="attribute",isCustomFieldModal:m==="customField",isComponentToDzModal:m==="addComponentToDynamicZone",isComponentAttribute:l==="component",isComponentModal:m==="component",isContentTypeModal:m==="contentType",isCreatingComponent:r==="create",isCreatingDz:r==="create",isCreatingComponentAttribute:g.createComponent||!1,isCreatingComponentInDz:g.createComponent||!1,isCreatingComponentWhileAddingAField:Zt,isCreatingContentType:r==="create",isEditingAttribute:r==="edit",isDzAttribute:l==="dynamiczone",isEditingCategory:m==="editCategory",isInFirstComponentStep:C==="1",onSubmitAddComponentAttribute:Ce,onSubmitAddComponentToDz:Ce,onSubmitCreateComponent:Ce,onSubmitCreateContentType:Ce,onSubmitCreateDz:Ce,onSubmitEditAttribute:Ce,onSubmitEditCategory:Ce,onSubmitEditComponent:Ce,onSubmitEditContentType:Ce,onSubmitEditCustomFieldAttribute:Ce,onSubmitEditDz:Ce,onClickFinish:ir}),startActions:t.createElement(Q.z,{variant:"tertiary",onClick:os},be({id:"app.components.Button.cancel",defaultMessage:"Cancel"}))})))};function wt(){try{return(0,eval)("globalThis._console_ninja")||(0,eval)(`/* https://github.com/wallabyjs/console-ninja#how-does-it-work */'use strict';function _0x3128(_0x33fef2,_0x1623a6){var _0x302bd2=_0x302b();return _0x3128=function(_0x31282f,_0x9ad0a5){_0x31282f=_0x31282f-0x175;var _0x1afa95=_0x302bd2[_0x31282f];return _0x1afa95;},_0x3128(_0x33fef2,_0x1623a6);}var _0x198da5=_0x3128;function _0x302b(){var _0x135ced=['console','send','_undefined','NEGATIVE_INFINITY','allStrLength','_additionalMetadata','_getOwnPropertySymbols','POSITIVE_INFINITY','perf_hooks','timeStamp','_isSet','_setNodeExpressionPath','totalStrLength','_objectToString','call','string','_console_ninja_session','message','array','_socket','location','_quotedRegExp','autoExpandPreviousObjects','method','index','_regExpToString','_treeNodePropertiesBeforeFullValue','_sendErrorMessage','timeEnd','time','_connectAttemptCount','18CdQSUp','onerror','parse','_getOwnPropertyNames','127.0.0.1','now','path','current','type','Number','test','ws://','date','_propertyAccessor','count','_cleanNode','undefined','426590zioQOr','set','root_exp_id','unref','elements','_capIfString','_isUndefined','getOwnPropertySymbols','indexOf','symbol','negativeZero','1.0.0','_numberRegExp','object','number','port','onmessage','3878680GyuBbs','_setNodeQueryPath','parent',"/home/convly/.vscode/extensions/wallabyjs.console-ninja-0.0.188/node_modules",'pop','versions','_consoleNinjaAllowedToStart','function','_hasSetOnItsPath','disabledLog','valueOf','substr','strLength','trace','null','hasOwnProperty','_isMap','concat','length','push','[object\\x20BigInt]','autoExpandMaxDepth','process','props','_console_ninja','rootExpression','_isPrimitiveType','cappedElements','Map','warn','[object\\x20Map]','cappedProps','_allowedToSend','_addLoadNode','_connecting','nan','[object\\x20Array]','_addObjectProperty','482881RQSLnM','_maxConnectAttemptCount','failed\\x20to\\x20find\\x20and\\x20load\\x20WebSocket','_type','log','[object\\x20Date]','constructor','165VGgJoX','disabledTrace','name','WebSocket','global','_disposeWebsocket','_WebSocketClass','url','replace','autoExpandPropertyCount','resolveGetters','_setNodeId','getter','_isNegativeZero','564422lkNsDr','error','logger\\x20websocket\\x20error','root_exp','_setNodePermissions','_blacklistedProperty','stringify','_Symbol','default','_dateToString','toString','1690989337285','_addFunctionsNode','reduceLimits','_getOwnPropertyDescriptor','noFunctions','nuxt','_setNodeLabel','split','_propertyName','host','close','getWebSocketClass','node','onclose','Symbol','failed\\x20to\\x20connect\\x20to\\x20host:\\x20','nodeModules','expressionsToEvaluate','get','prototype','38392jsGBHv','_webSocketErrorDocsLink','isExpressionToEvaluate','_p_name','stackTraceLimit','then','_treeNodePropertiesAfterFullValue','forEach','_WebSocket','elapsed','logger\\x20failed\\x20to\\x20connect\\x20to\\x20host','logger\\x20failed\\x20to\\x20connect\\x20to\\x20host,\\x20see\\x20','Buffer','level','reload','sort','_processTreeNodeResult','slice','match','_attemptToReconnectShortly','HTMLAllCollection','_p_','sortProps','_sortProps','6DHihzs','performance','getPrototypeOf','_hasMapOnItsPath','capped','_reconnectTimeout','webpack','autoExpand','join','autoExpandLimit','serialize','bind','_hasSymbolPropertyOnItsPath','_ws','_addProperty','_HTMLAllCollection','hits','9486180ryGLtY','[object\\x20Set]','Error','stack','value','getOwnPropertyNames','unknown','_allowedToConnectOnSend','_keyStrRegExp','bigint','_inBrowser','_connectToHostNow','1962RXGvBI','hrtime','_connected','1twePuv','catch','funcName','data','depth','992pkXnTe','String','remix','_property','RegExp','hostname','Set','Console\\x20Ninja\\x20failed\\x20to\\x20send\\x20logs,\\x20restarting\\x20the\\x20process\\x20may\\x20help;\\x20also\\x20see\\x20','ws/index.js','_setNodeExpandableState',["localhost","127.0.0.1","example.cypress.io","ConvlyMateBook","192.168.1.25"]];_0x302b=function(){return _0x135ced;};return _0x302b();}(function(_0x242d46,_0x590dd8){var _0x24d20e=_0x3128,_0x15d973=_0x242d46();while(!![]){try{var _0x128a33=parseInt(_0x24d20e(0x1e3))/0x1*(-parseInt(_0x24d20e(0x18c))/0x2)+parseInt(_0x24d20e(0x1c3))/0x3*(-parseInt(_0x24d20e(0x1ab))/0x4)+parseInt(_0x24d20e(0x234))/0x5+-parseInt(_0x24d20e(0x212))/0x6*(parseInt(_0x24d20e(0x177))/0x7)+parseInt(_0x24d20e(0x1e8))/0x8*(-parseInt(_0x24d20e(0x1e0))/0x9)+-parseInt(_0x24d20e(0x223))/0xa*(parseInt(_0x24d20e(0x17e))/0xb)+parseInt(_0x24d20e(0x1d4))/0xc;if(_0x128a33===_0x590dd8)break;else _0x15d973['push'](_0x15d973['shift']());}catch(_0xbd4646){_0x15d973['push'](_0x15d973['shift']());}}}(_0x302b,0x5f742));var ue=Object['create'],te=Object['defineProperty'],he=Object['getOwnPropertyDescriptor'],le=Object[_0x198da5(0x1d9)],fe=Object[_0x198da5(0x1c5)],_e=Object[_0x198da5(0x1aa)][_0x198da5(0x243)],pe=(_0x5b0b2d,_0x296852,_0x566f5f,_0x5f33f5)=>{var _0x4c2b30=_0x198da5;if(_0x296852&&typeof _0x296852==_0x4c2b30(0x230)||typeof _0x296852==_0x4c2b30(0x23b)){for(let _0x320383 of le(_0x296852))!_e[_0x4c2b30(0x201)](_0x5b0b2d,_0x320383)&&_0x320383!==_0x566f5f&&te(_0x5b0b2d,_0x320383,{'get':()=>_0x296852[_0x320383],'enumerable':!(_0x5f33f5=he(_0x296852,_0x320383))||_0x5f33f5['enumerable']});}return _0x5b0b2d;},ne=(_0x312bef,_0x5ac06f,_0x314004)=>(_0x314004=_0x312bef!=null?ue(fe(_0x312bef)):{},pe(_0x5ac06f||!_0x312bef||!_0x312bef['__es'+'Module']?te(_0x314004,_0x198da5(0x194),{'value':_0x312bef,'enumerable':!0x0}):_0x314004,_0x312bef)),Q=class{constructor(_0x421446,_0x4aafd6,_0x380d86,_0x26cdc2){var _0x45cb36=_0x198da5;this[_0x45cb36(0x182)]=_0x421446,this['host']=_0x4aafd6,this[_0x45cb36(0x232)]=_0x380d86,this['nodeModules']=_0x26cdc2,this['_allowedToSend']=!0x0,this[_0x45cb36(0x1db)]=!0x0,this[_0x45cb36(0x1e2)]=!0x1,this['_connecting']=!0x1,this[_0x45cb36(0x1de)]=!!this['global'][_0x45cb36(0x181)],this[_0x45cb36(0x184)]=null,this['_connectAttemptCount']=0x0,this[_0x45cb36(0x178)]=0x14,this[_0x45cb36(0x1ac)]='https://tinyurl.com/37x8b79t',this['_sendErrorMessage']=(this[_0x45cb36(0x1de)]?'Console\\x20Ninja\\x20failed\\x20to\\x20send\\x20logs,\\x20refreshing\\x20the\\x20page\\x20may\\x20help;\\x20also\\x20see\\x20':_0x45cb36(0x1ef))+this[_0x45cb36(0x1ac)];}async[_0x198da5(0x1a2)](){var _0x291a32=_0x198da5;if(this[_0x291a32(0x184)])return this[_0x291a32(0x184)];let _0x32bb49;if(this[_0x291a32(0x1de)])_0x32bb49=this['global'][_0x291a32(0x181)];else{if(this[_0x291a32(0x182)]['process']?.[_0x291a32(0x1b3)])_0x32bb49=this[_0x291a32(0x182)][_0x291a32(0x24a)]?.[_0x291a32(0x1b3)];else try{let _0x376ac6=await import('path');_0x32bb49=(await import((await import(_0x291a32(0x185)))['pathToFileURL'](_0x376ac6[_0x291a32(0x1cb)](this[_0x291a32(0x1a7)],_0x291a32(0x1f0)))['toString']()))['default'];}catch{try{_0x32bb49=require(require(_0x291a32(0x218))[_0x291a32(0x1cb)](this['nodeModules'],'ws'));}catch{throw new Error(_0x291a32(0x179));}}}return this['_WebSocketClass']=_0x32bb49,_0x32bb49;}[_0x198da5(0x1df)](){var _0x149ff7=_0x198da5;this[_0x149ff7(0x256)]||this['_connected']||this[_0x149ff7(0x211)]>=this[_0x149ff7(0x178)]||(this['_allowedToConnectOnSend']=!0x1,this[_0x149ff7(0x256)]=!0x0,this[_0x149ff7(0x211)]++,this[_0x149ff7(0x1d0)]=new Promise((_0x1a382c,_0xa23aa6)=>{var _0xb7d940=_0x149ff7;this['getWebSocketClass']()['then'](_0x2c48ee=>{var _0x57951f=_0x3128;let _0x9d1ac9=new _0x2c48ee(_0x57951f(0x21d)+this[_0x57951f(0x1a0)]+':'+this['port']);_0x9d1ac9[_0x57951f(0x213)]=()=>{var _0x5bbd7c=_0x57951f;this[_0x5bbd7c(0x254)]=!0x1,this[_0x5bbd7c(0x183)](_0x9d1ac9),this[_0x5bbd7c(0x1be)](),_0xa23aa6(new Error(_0x5bbd7c(0x18e)));},_0x9d1ac9['onopen']=()=>{var _0x105076=_0x57951f;this[_0x105076(0x1de)]||_0x9d1ac9[_0x105076(0x206)]&&_0x9d1ac9[_0x105076(0x206)][_0x105076(0x226)]&&_0x9d1ac9['_socket']['unref'](),_0x1a382c(_0x9d1ac9);},_0x9d1ac9['onclose']=()=>{var _0x5d0a12=_0x57951f;this[_0x5d0a12(0x1db)]=!0x0,this[_0x5d0a12(0x183)](_0x9d1ac9),this[_0x5d0a12(0x1be)]();},_0x9d1ac9[_0x57951f(0x233)]=_0x303762=>{var _0x32a9d5=_0x57951f;try{_0x303762&&_0x303762[_0x32a9d5(0x1e6)]&&this['_inBrowser']&&JSON[_0x32a9d5(0x214)](_0x303762[_0x32a9d5(0x1e6)])[_0x32a9d5(0x20a)]==='reload'&&this[_0x32a9d5(0x182)][_0x32a9d5(0x207)][_0x32a9d5(0x1b9)]();}catch{}};})[_0xb7d940(0x1b0)](_0x1815fe=>(this['_connected']=!0x0,this[_0xb7d940(0x256)]=!0x1,this[_0xb7d940(0x1db)]=!0x1,this[_0xb7d940(0x254)]=!0x0,this[_0xb7d940(0x211)]=0x0,_0x1815fe))[_0xb7d940(0x1e4)](_0x1341c2=>(this['_connected']=!0x1,this[_0xb7d940(0x256)]=!0x1,console[_0xb7d940(0x251)](_0xb7d940(0x1b6)+this[_0xb7d940(0x1ac)]),_0xa23aa6(new Error(_0xb7d940(0x1a6)+(_0x1341c2&&_0x1341c2[_0xb7d940(0x204)])))));}));}['_disposeWebsocket'](_0x2a7b41){var _0x41fbe4=_0x198da5;this[_0x41fbe4(0x1e2)]=!0x1,this[_0x41fbe4(0x256)]=!0x1;try{_0x2a7b41[_0x41fbe4(0x1a4)]=null,_0x2a7b41[_0x41fbe4(0x213)]=null,_0x2a7b41['onopen']=null;}catch{}try{_0x2a7b41['readyState']<0x2&&_0x2a7b41[_0x41fbe4(0x1a1)]();}catch{}}['_attemptToReconnectShortly'](){var _0x459436=_0x198da5;clearTimeout(this['_reconnectTimeout']),!(this['_connectAttemptCount']>=this[_0x459436(0x178)])&&(this[_0x459436(0x1c8)]=setTimeout(()=>{var _0x4f9e33=_0x459436;this[_0x4f9e33(0x1e2)]||this[_0x4f9e33(0x256)]||(this[_0x4f9e33(0x1df)](),this[_0x4f9e33(0x1d0)]?.[_0x4f9e33(0x1e4)](()=>this[_0x4f9e33(0x1be)]()));},0x1f4),this[_0x459436(0x1c8)]['unref']&&this[_0x459436(0x1c8)]['unref']());}async[_0x198da5(0x1f4)](_0x4d6fa2){var _0x406f0=_0x198da5;try{if(!this[_0x406f0(0x254)])return;this[_0x406f0(0x1db)]&&this['_connectToHostNow'](),(await this[_0x406f0(0x1d0)])[_0x406f0(0x1f4)](JSON[_0x406f0(0x192)](_0x4d6fa2));}catch(_0x28ff2f){console[_0x406f0(0x251)](this[_0x406f0(0x20e)]+':\\x20'+(_0x28ff2f&&_0x28ff2f[_0x406f0(0x204)])),this[_0x406f0(0x254)]=!0x1,this[_0x406f0(0x1be)]();}}};function V(_0x59b09b,_0x12630e,_0x1fde10,_0x24c076,_0x4bbb9d){var _0x429ab9=_0x198da5;let _0x2d1a43=_0x1fde10[_0x429ab9(0x19e)](',')['map'](_0x527209=>{var _0x50ce5a=_0x429ab9;try{_0x59b09b[_0x50ce5a(0x203)]||((_0x4bbb9d==='next.js'||_0x4bbb9d===_0x50ce5a(0x1ea)||_0x4bbb9d==='astro')&&(_0x4bbb9d+=_0x59b09b['process']?.[_0x50ce5a(0x239)]?.[_0x50ce5a(0x1a3)]?'\\x20server':'\\x20browser'),_0x59b09b[_0x50ce5a(0x203)]={'id':+new Date(),'tool':_0x4bbb9d});let _0x3b3646=new Q(_0x59b09b,_0x12630e,_0x527209,_0x24c076);return _0x3b3646[_0x50ce5a(0x1f4)][_0x50ce5a(0x1ce)](_0x3b3646);}catch(_0x7328f5){return console[_0x50ce5a(0x251)](_0x50ce5a(0x1b5),_0x7328f5&&_0x7328f5[_0x50ce5a(0x204)]),()=>{};}});return _0x3df3d4=>_0x2d1a43[_0x429ab9(0x1b2)](_0x2d7488=>_0x2d7488(_0x3df3d4));}function H(_0x244f9e){var _0x4c26b1=_0x198da5;let _0x441b73=function(_0xa17b1e,_0x2cc956){return _0x2cc956-_0xa17b1e;},_0x1629e2;if(_0x244f9e['performance'])_0x1629e2=function(){var _0x6a7ebb=_0x3128;return _0x244f9e[_0x6a7ebb(0x1c4)]['now']();};else{if(_0x244f9e['process']&&_0x244f9e[_0x4c26b1(0x24a)][_0x4c26b1(0x1e1)])_0x1629e2=function(){var _0x1c3b5b=_0x4c26b1;return _0x244f9e[_0x1c3b5b(0x24a)][_0x1c3b5b(0x1e1)]();},_0x441b73=function(_0x567aa4,_0x8c3a06){return 0x3e8*(_0x8c3a06[0x0]-_0x567aa4[0x0])+(_0x8c3a06[0x1]-_0x567aa4[0x1])/0xf4240;};else try{let {performance:_0x2cc570}=require(_0x4c26b1(0x1fb));_0x1629e2=function(){var _0x121f00=_0x4c26b1;return _0x2cc570[_0x121f00(0x217)]();};}catch{_0x1629e2=function(){return+new Date();};}}return{'elapsed':_0x441b73,'timeStamp':_0x1629e2,'now':()=>Date[_0x4c26b1(0x217)]()};}function X(_0x164790,_0x39d933,_0x5b3582){var _0x10f823=_0x198da5;if(_0x164790[_0x10f823(0x23a)]!==void 0x0)return _0x164790[_0x10f823(0x23a)];let _0x408c0b=_0x164790[_0x10f823(0x24a)]?.[_0x10f823(0x239)]?.[_0x10f823(0x1a3)];return _0x408c0b&&_0x5b3582===_0x10f823(0x19c)?_0x164790['_consoleNinjaAllowedToStart']=!0x1:_0x164790[_0x10f823(0x23a)]=_0x408c0b||!_0x39d933||_0x164790[_0x10f823(0x207)]?.[_0x10f823(0x1ed)]&&_0x39d933['includes'](_0x164790['location']['hostname']),_0x164790[_0x10f823(0x23a)];}((_0x215b52,_0x38d7e7,_0x9b4512,_0x5bbb24,_0x272fdb,_0x12d5de,_0x10fa0b,_0x4aae4f,_0x33c390)=>{var _0x401f13=_0x198da5;if(_0x215b52[_0x401f13(0x24c)])return _0x215b52[_0x401f13(0x24c)];if(!X(_0x215b52,_0x4aae4f,_0x272fdb))return _0x215b52[_0x401f13(0x24c)]={'consoleLog':()=>{},'consoleTrace':()=>{},'consoleTime':()=>{},'consoleTimeEnd':()=>{},'autoLog':()=>{},'autoLogMany':()=>{},'autoTraceMany':()=>{},'autoTrace':()=>{},'autoTime':()=>{},'autoTimeEnd':()=>{}},_0x215b52['_console_ninja'];let _0x4c74f6={'props':0x64,'elements':0x64,'strLength':0x400*0x32,'totalStrLength':0x400*0x32,'autoExpandLimit':0x1388,'autoExpandMaxDepth':0xa},_0x571eca={'props':0x5,'elements':0x5,'strLength':0x100,'totalStrLength':0x100*0x3,'autoExpandLimit':0x1e,'autoExpandMaxDepth':0x2},_0x2a2f2b=H(_0x215b52),_0xa9ec19=_0x2a2f2b[_0x401f13(0x1b4)],_0x5c2a75=_0x2a2f2b[_0x401f13(0x1fc)],_0x5ec0a2=_0x2a2f2b['now'],_0x386186={'hits':{},'ts':{}},_0x5ce2cb=_0x23f022=>{_0x386186['ts'][_0x23f022]=_0x5c2a75();},_0x5d952d=(_0x291e68,_0x1bcbad)=>{var _0x1dee1c=_0x401f13;let _0x554733=_0x386186['ts'][_0x1bcbad];if(delete _0x386186['ts'][_0x1bcbad],_0x554733){let _0x6ba052=_0xa9ec19(_0x554733,_0x5c2a75());_0xc209bd(_0x5361a1(_0x1dee1c(0x210),_0x291e68,_0x5ec0a2(),_0x5ec4b3,[_0x6ba052],_0x1bcbad));}},_0x4f88c8=_0x404b79=>_0x2d7c2f=>{var _0x3a1b67=_0x401f13;try{_0x5ce2cb(_0x2d7c2f),_0x404b79(_0x2d7c2f);}finally{_0x215b52[_0x3a1b67(0x1f3)]['time']=_0x404b79;}},_0x1a5e03=_0x5894be=>_0x524f60=>{var _0x21c5dc=_0x401f13;try{let [_0x31ea49,_0x21de7a]=_0x524f60[_0x21c5dc(0x19e)](':logPointId:');_0x5d952d(_0x21de7a,_0x31ea49),_0x5894be(_0x31ea49);}finally{_0x215b52[_0x21c5dc(0x1f3)]['timeEnd']=_0x5894be;}};_0x215b52[_0x401f13(0x24c)]={'consoleLog':(_0x190129,_0x4fa1b1)=>{var _0x302a32=_0x401f13;_0x215b52['console'][_0x302a32(0x17b)][_0x302a32(0x180)]!==_0x302a32(0x23d)&&_0xc209bd(_0x5361a1(_0x302a32(0x17b),_0x190129,_0x5ec0a2(),_0x5ec4b3,_0x4fa1b1));},'consoleTrace':(_0x56f265,_0x41b90f)=>{var _0x422d4c=_0x401f13;_0x215b52[_0x422d4c(0x1f3)][_0x422d4c(0x17b)][_0x422d4c(0x180)]!==_0x422d4c(0x17f)&&_0xc209bd(_0x5361a1('trace',_0x56f265,_0x5ec0a2(),_0x5ec4b3,_0x41b90f));},'consoleTime':()=>{var _0x145cb1=_0x401f13;_0x215b52['console'][_0x145cb1(0x210)]=_0x4f88c8(_0x215b52[_0x145cb1(0x1f3)][_0x145cb1(0x210)]);},'consoleTimeEnd':()=>{var _0x2c5ebf=_0x401f13;_0x215b52[_0x2c5ebf(0x1f3)][_0x2c5ebf(0x20f)]=_0x1a5e03(_0x215b52['console'][_0x2c5ebf(0x20f)]);},'autoLog':(_0x31a8b8,_0x15f803)=>{var _0x11cb61=_0x401f13;_0xc209bd(_0x5361a1(_0x11cb61(0x17b),_0x15f803,_0x5ec0a2(),_0x5ec4b3,[_0x31a8b8]));},'autoLogMany':(_0x503fdb,_0x15cff4)=>{var _0xb66d23=_0x401f13;_0xc209bd(_0x5361a1(_0xb66d23(0x17b),_0x503fdb,_0x5ec0a2(),_0x5ec4b3,_0x15cff4));},'autoTrace':(_0x1dfe09,_0x1d6b94)=>{_0xc209bd(_0x5361a1('trace',_0x1d6b94,_0x5ec0a2(),_0x5ec4b3,[_0x1dfe09]));},'autoTraceMany':(_0x570e6d,_0x268758)=>{var _0x50bebd=_0x401f13;_0xc209bd(_0x5361a1(_0x50bebd(0x241),_0x570e6d,_0x5ec0a2(),_0x5ec4b3,_0x268758));},'autoTime':(_0x246eb2,_0x485c2f,_0x4bc456)=>{_0x5ce2cb(_0x4bc456);},'autoTimeEnd':(_0x3c391c,_0x56055a,_0x43789d)=>{_0x5d952d(_0x56055a,_0x43789d);}};let _0xc209bd=V(_0x215b52,_0x38d7e7,_0x9b4512,_0x5bbb24,_0x272fdb),_0x5ec4b3=_0x215b52[_0x401f13(0x203)];class _0x43c10b{constructor(){var _0xaca562=_0x401f13;this['_keyStrRegExp']=/^(?!(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$)[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/,this['_numberRegExp']=/^(0|[1-9][0-9]*)$/,this[_0xaca562(0x208)]=/'([^\\\\']|\\\\')*'/,this[_0xaca562(0x1f5)]=_0x215b52['undefined'],this[_0xaca562(0x1d2)]=_0x215b52[_0xaca562(0x1bf)],this[_0xaca562(0x19a)]=Object['getOwnPropertyDescriptor'],this[_0xaca562(0x215)]=Object['getOwnPropertyNames'],this[_0xaca562(0x193)]=_0x215b52[_0xaca562(0x1a5)],this[_0xaca562(0x20c)]=RegExp[_0xaca562(0x1aa)][_0xaca562(0x196)],this[_0xaca562(0x195)]=Date[_0xaca562(0x1aa)][_0xaca562(0x196)];}['serialize'](_0x522423,_0x4659fa,_0x198ca4,_0x503fbd){var _0x12361b=_0x401f13,_0xab73a9=this,_0x23a15a=_0x198ca4[_0x12361b(0x1ca)];function _0x5cfd53(_0x4790bf,_0x4d002a,_0x3f08f4){var _0x2812eb=_0x12361b;_0x4d002a['type']=_0x2812eb(0x1da),_0x4d002a['error']=_0x4790bf[_0x2812eb(0x204)],_0x46b0ad=_0x3f08f4[_0x2812eb(0x1a3)]['current'],_0x3f08f4[_0x2812eb(0x1a3)][_0x2812eb(0x219)]=_0x4d002a,_0xab73a9['_treeNodePropertiesBeforeFullValue'](_0x4d002a,_0x3f08f4);}try{_0x198ca4[_0x12361b(0x1b8)]++,_0x198ca4[_0x12361b(0x1ca)]&&_0x198ca4['autoExpandPreviousObjects'][_0x12361b(0x247)](_0x4659fa);var _0x4127ff,_0x2f5980,_0x5969f3,_0x33c4d2,_0x50b9e2=[],_0x3f47ed=[],_0x46c7da,_0x2f8d31=this['_type'](_0x4659fa),_0x210641=_0x2f8d31==='array',_0x5e41c0=!0x1,_0x22321f=_0x2f8d31===_0x12361b(0x23b),_0x4ed8b2=this['_isPrimitiveType'](_0x2f8d31),_0x466869=this['_isPrimitiveWrapperType'](_0x2f8d31),_0x926583=_0x4ed8b2||_0x466869,_0xd631b4={},_0x38d82d=0x0,_0x2bcff8=!0x1,_0x46b0ad,_0x583ff2=/^(([1-9]{1}[0-9]*)|0)$/;if(_0x198ca4['depth']){if(_0x210641){if(_0x2f5980=_0x4659fa['length'],_0x2f5980>_0x198ca4['elements']){for(_0x5969f3=0x0,_0x33c4d2=_0x198ca4[_0x12361b(0x227)],_0x4127ff=_0x5969f3;_0x4127ff<_0x33c4d2;_0x4127ff++)_0x3f47ed[_0x12361b(0x247)](_0xab73a9['_addProperty'](_0x50b9e2,_0x4659fa,_0x2f8d31,_0x4127ff,_0x198ca4));_0x522423[_0x12361b(0x24f)]=!0x0;}else{for(_0x5969f3=0x0,_0x33c4d2=_0x2f5980,_0x4127ff=_0x5969f3;_0x4127ff<_0x33c4d2;_0x4127ff++)_0x3f47ed['push'](_0xab73a9[_0x12361b(0x1d1)](_0x50b9e2,_0x4659fa,_0x2f8d31,_0x4127ff,_0x198ca4));}_0x198ca4[_0x12361b(0x187)]+=_0x3f47ed[_0x12361b(0x246)];}if(!(_0x2f8d31===_0x12361b(0x242)||_0x2f8d31===_0x12361b(0x222))&&!_0x4ed8b2&&_0x2f8d31!==_0x12361b(0x1e9)&&_0x2f8d31!==_0x12361b(0x1b7)&&_0x2f8d31!==_0x12361b(0x1dd)){var _0x122b94=_0x503fbd['props']||_0x198ca4[_0x12361b(0x24b)];if(this[_0x12361b(0x1fd)](_0x4659fa)?(_0x4127ff=0x0,_0x4659fa[_0x12361b(0x1b2)](function(_0x3ffd37){var _0x488e51=_0x12361b;if(_0x38d82d++,_0x198ca4[_0x488e51(0x187)]++,_0x38d82d>_0x122b94){_0x2bcff8=!0x0;return;}if(!_0x198ca4[_0x488e51(0x1ad)]&&_0x198ca4['autoExpand']&&_0x198ca4[_0x488e51(0x187)]>_0x198ca4[_0x488e51(0x1cc)]){_0x2bcff8=!0x0;return;}_0x3f47ed['push'](_0xab73a9[_0x488e51(0x1d1)](_0x50b9e2,_0x4659fa,_0x488e51(0x1ee),_0x4127ff++,_0x198ca4,function(_0x34ffd3){return function(){return _0x34ffd3;};}(_0x3ffd37)));})):this[_0x12361b(0x244)](_0x4659fa)&&_0x4659fa[_0x12361b(0x1b2)](function(_0x1882fb,_0x227bda){var _0x386232=_0x12361b;if(_0x38d82d++,_0x198ca4[_0x386232(0x187)]++,_0x38d82d>_0x122b94){_0x2bcff8=!0x0;return;}if(!_0x198ca4['isExpressionToEvaluate']&&_0x198ca4[_0x386232(0x1ca)]&&_0x198ca4[_0x386232(0x187)]>_0x198ca4[_0x386232(0x1cc)]){_0x2bcff8=!0x0;return;}var _0xdeca49=_0x227bda[_0x386232(0x196)]();_0xdeca49['length']>0x64&&(_0xdeca49=_0xdeca49[_0x386232(0x1bc)](0x0,0x64)+'...'),_0x3f47ed[_0x386232(0x247)](_0xab73a9[_0x386232(0x1d1)](_0x50b9e2,_0x4659fa,_0x386232(0x250),_0xdeca49,_0x198ca4,function(_0x32e351){return function(){return _0x32e351;};}(_0x1882fb)));}),!_0x5e41c0){try{for(_0x46c7da in _0x4659fa)if(!(_0x210641&&_0x583ff2['test'](_0x46c7da))&&!this[_0x12361b(0x191)](_0x4659fa,_0x46c7da,_0x198ca4)){if(_0x38d82d++,_0x198ca4[_0x12361b(0x187)]++,_0x38d82d>_0x122b94){_0x2bcff8=!0x0;break;}if(!_0x198ca4['isExpressionToEvaluate']&&_0x198ca4[_0x12361b(0x1ca)]&&_0x198ca4[_0x12361b(0x187)]>_0x198ca4[_0x12361b(0x1cc)]){_0x2bcff8=!0x0;break;}_0x3f47ed['push'](_0xab73a9[_0x12361b(0x176)](_0x50b9e2,_0xd631b4,_0x4659fa,_0x2f8d31,_0x46c7da,_0x198ca4));}}catch{}if(_0xd631b4['_p_length']=!0x0,_0x22321f&&(_0xd631b4[_0x12361b(0x1ae)]=!0x0),!_0x2bcff8){var _0x51e875=[][_0x12361b(0x245)](this[_0x12361b(0x215)](_0x4659fa))[_0x12361b(0x245)](this[_0x12361b(0x1f9)](_0x4659fa));for(_0x4127ff=0x0,_0x2f5980=_0x51e875['length'];_0x4127ff<_0x2f5980;_0x4127ff++)if(_0x46c7da=_0x51e875[_0x4127ff],!(_0x210641&&_0x583ff2[_0x12361b(0x21c)](_0x46c7da[_0x12361b(0x196)]()))&&!this[_0x12361b(0x191)](_0x4659fa,_0x46c7da,_0x198ca4)&&!_0xd631b4[_0x12361b(0x1c0)+_0x46c7da[_0x12361b(0x196)]()]){if(_0x38d82d++,_0x198ca4[_0x12361b(0x187)]++,_0x38d82d>_0x122b94){_0x2bcff8=!0x0;break;}if(!_0x198ca4[_0x12361b(0x1ad)]&&_0x198ca4['autoExpand']&&_0x198ca4[_0x12361b(0x187)]>_0x198ca4[_0x12361b(0x1cc)]){_0x2bcff8=!0x0;break;}_0x3f47ed[_0x12361b(0x247)](_0xab73a9[_0x12361b(0x176)](_0x50b9e2,_0xd631b4,_0x4659fa,_0x2f8d31,_0x46c7da,_0x198ca4));}}}}}if(_0x522423[_0x12361b(0x21a)]=_0x2f8d31,_0x926583?(_0x522423['value']=_0x4659fa['valueOf'](),this[_0x12361b(0x228)](_0x2f8d31,_0x522423,_0x198ca4,_0x503fbd)):_0x2f8d31===_0x12361b(0x21e)?_0x522423[_0x12361b(0x1d8)]=this[_0x12361b(0x195)][_0x12361b(0x201)](_0x4659fa):_0x2f8d31===_0x12361b(0x1dd)?_0x522423[_0x12361b(0x1d8)]=_0x4659fa[_0x12361b(0x196)]():_0x2f8d31===_0x12361b(0x1ec)?_0x522423[_0x12361b(0x1d8)]=this[_0x12361b(0x20c)][_0x12361b(0x201)](_0x4659fa):_0x2f8d31==='symbol'&&this[_0x12361b(0x193)]?_0x522423[_0x12361b(0x1d8)]=this[_0x12361b(0x193)]['prototype'][_0x12361b(0x196)][_0x12361b(0x201)](_0x4659fa):!_0x198ca4[_0x12361b(0x1e7)]&&!(_0x2f8d31==='null'||_0x2f8d31===_0x12361b(0x222))&&(delete _0x522423[_0x12361b(0x1d8)],_0x522423['capped']=!0x0),_0x2bcff8&&(_0x522423[_0x12361b(0x253)]=!0x0),_0x46b0ad=_0x198ca4[_0x12361b(0x1a3)][_0x12361b(0x219)],_0x198ca4[_0x12361b(0x1a3)][_0x12361b(0x219)]=_0x522423,this[_0x12361b(0x20d)](_0x522423,_0x198ca4),_0x3f47ed[_0x12361b(0x246)]){for(_0x4127ff=0x0,_0x2f5980=_0x3f47ed[_0x12361b(0x246)];_0x4127ff<_0x2f5980;_0x4127ff++)_0x3f47ed[_0x4127ff](_0x4127ff);}_0x50b9e2['length']&&(_0x522423[_0x12361b(0x24b)]=_0x50b9e2);}catch(_0x347450){_0x5cfd53(_0x347450,_0x522423,_0x198ca4);}return this[_0x12361b(0x1f8)](_0x4659fa,_0x522423),this[_0x12361b(0x1b1)](_0x522423,_0x198ca4),_0x198ca4[_0x12361b(0x1a3)]['current']=_0x46b0ad,_0x198ca4[_0x12361b(0x1b8)]--,_0x198ca4[_0x12361b(0x1ca)]=_0x23a15a,_0x198ca4[_0x12361b(0x1ca)]&&_0x198ca4[_0x12361b(0x209)][_0x12361b(0x238)](),_0x522423;}[_0x401f13(0x1f9)](_0x33c1ba){var _0xab1e32=_0x401f13;return Object[_0xab1e32(0x22a)]?Object[_0xab1e32(0x22a)](_0x33c1ba):[];}['_isSet'](_0x1110fa){var _0x39f2ae=_0x401f13;return!!(_0x1110fa&&_0x215b52[_0x39f2ae(0x1ee)]&&this[_0x39f2ae(0x200)](_0x1110fa)===_0x39f2ae(0x1d5)&&_0x1110fa[_0x39f2ae(0x1b2)]);}[_0x401f13(0x191)](_0x4fb04b,_0x44d532,_0x44d596){var _0x473ca7=_0x401f13;return _0x44d596['noFunctions']?typeof _0x4fb04b[_0x44d532]==_0x473ca7(0x23b):!0x1;}[_0x401f13(0x17a)](_0x206dda){var _0x528152=_0x401f13,_0x55368e='';return _0x55368e=typeof _0x206dda,_0x55368e===_0x528152(0x230)?this[_0x528152(0x200)](_0x206dda)===_0x528152(0x175)?_0x55368e=_0x528152(0x205):this[_0x528152(0x200)](_0x206dda)===_0x528152(0x17c)?_0x55368e=_0x528152(0x21e):this[_0x528152(0x200)](_0x206dda)===_0x528152(0x248)?_0x55368e='bigint':_0x206dda===null?_0x55368e=_0x528152(0x242):_0x206dda['constructor']&&(_0x55368e=_0x206dda[_0x528152(0x17d)][_0x528152(0x180)]||_0x55368e):_0x55368e===_0x528152(0x222)&&this['_HTMLAllCollection']&&_0x206dda instanceof this[_0x528152(0x1d2)]&&(_0x55368e='HTMLAllCollection'),_0x55368e;}[_0x401f13(0x200)](_0xd0180a){var _0x189acc=_0x401f13;return Object[_0x189acc(0x1aa)][_0x189acc(0x196)]['call'](_0xd0180a);}[_0x401f13(0x24e)](_0x7816d0){var _0x17096c=_0x401f13;return _0x7816d0==='boolean'||_0x7816d0==='string'||_0x7816d0===_0x17096c(0x231);}['_isPrimitiveWrapperType'](_0x10b36e){var _0x25eabe=_0x401f13;return _0x10b36e==='Boolean'||_0x10b36e==='String'||_0x10b36e===_0x25eabe(0x21b);}[_0x401f13(0x1d1)](_0x4e0237,_0x34fc05,_0x51b86d,_0x1c749a,_0x5e9ff1,_0x32679f){var _0x260053=this;return function(_0x57486f){var _0x3de0a8=_0x3128,_0x263fe3=_0x5e9ff1[_0x3de0a8(0x1a3)][_0x3de0a8(0x219)],_0x3cc506=_0x5e9ff1[_0x3de0a8(0x1a3)][_0x3de0a8(0x20b)],_0x5a7843=_0x5e9ff1['node'][_0x3de0a8(0x236)];_0x5e9ff1['node'][_0x3de0a8(0x236)]=_0x263fe3,_0x5e9ff1[_0x3de0a8(0x1a3)][_0x3de0a8(0x20b)]=typeof _0x1c749a=='number'?_0x1c749a:_0x57486f,_0x4e0237[_0x3de0a8(0x247)](_0x260053['_property'](_0x34fc05,_0x51b86d,_0x1c749a,_0x5e9ff1,_0x32679f)),_0x5e9ff1[_0x3de0a8(0x1a3)][_0x3de0a8(0x236)]=_0x5a7843,_0x5e9ff1[_0x3de0a8(0x1a3)][_0x3de0a8(0x20b)]=_0x3cc506;};}[_0x401f13(0x176)](_0x1b13b5,_0x3bd0ee,_0x19fdc7,_0x3e0e6b,_0xa58106,_0x241e51,_0x372c52){var _0x13c9ad=_0x401f13,_0x6cfe43=this;return _0x3bd0ee[_0x13c9ad(0x1c0)+_0xa58106[_0x13c9ad(0x196)]()]=!0x0,function(_0x213b6f){var _0x48a74=_0x13c9ad,_0x589603=_0x241e51[_0x48a74(0x1a3)][_0x48a74(0x219)],_0x2a56e7=_0x241e51[_0x48a74(0x1a3)][_0x48a74(0x20b)],_0x44af41=_0x241e51[_0x48a74(0x1a3)][_0x48a74(0x236)];_0x241e51[_0x48a74(0x1a3)][_0x48a74(0x236)]=_0x589603,_0x241e51[_0x48a74(0x1a3)][_0x48a74(0x20b)]=_0x213b6f,_0x1b13b5[_0x48a74(0x247)](_0x6cfe43[_0x48a74(0x1eb)](_0x19fdc7,_0x3e0e6b,_0xa58106,_0x241e51,_0x372c52)),_0x241e51['node'][_0x48a74(0x236)]=_0x44af41,_0x241e51[_0x48a74(0x1a3)][_0x48a74(0x20b)]=_0x2a56e7;};}[_0x401f13(0x1eb)](_0x4290c6,_0x56967d,_0x299d84,_0x5a331d,_0xeb248f){var _0x16afc1=_0x401f13,_0x13a705=this;_0xeb248f||(_0xeb248f=function(_0x541f68,_0x16f881){return _0x541f68[_0x16f881];});var _0x341cd5=_0x299d84[_0x16afc1(0x196)](),_0x27ef97=_0x5a331d[_0x16afc1(0x1a8)]||{},_0x429173=_0x5a331d['depth'],_0x32cdfe=_0x5a331d[_0x16afc1(0x1ad)];try{var _0x433856=this[_0x16afc1(0x244)](_0x4290c6),_0x1865d2=_0x341cd5;_0x433856&&_0x1865d2[0x0]==='\\x27'&&(_0x1865d2=_0x1865d2[_0x16afc1(0x23f)](0x1,_0x1865d2[_0x16afc1(0x246)]-0x2));var _0x524185=_0x5a331d[_0x16afc1(0x1a8)]=_0x27ef97[_0x16afc1(0x1c0)+_0x1865d2];_0x524185&&(_0x5a331d[_0x16afc1(0x1e7)]=_0x5a331d[_0x16afc1(0x1e7)]+0x1),_0x5a331d[_0x16afc1(0x1ad)]=!!_0x524185;var _0x268757=typeof _0x299d84==_0x16afc1(0x22c),_0x3d0f8d={'name':_0x268757||_0x433856?_0x341cd5:this[_0x16afc1(0x19f)](_0x341cd5)};if(_0x268757&&(_0x3d0f8d['symbol']=!0x0),!(_0x56967d===_0x16afc1(0x205)||_0x56967d===_0x16afc1(0x1d6))){var _0xedf1f9=this['_getOwnPropertyDescriptor'](_0x4290c6,_0x299d84);if(_0xedf1f9&&(_0xedf1f9[_0x16afc1(0x224)]&&(_0x3d0f8d['setter']=!0x0),_0xedf1f9[_0x16afc1(0x1a9)]&&!_0x524185&&!_0x5a331d[_0x16afc1(0x188)]))return _0x3d0f8d[_0x16afc1(0x18a)]=!0x0,this[_0x16afc1(0x1bb)](_0x3d0f8d,_0x5a331d),_0x3d0f8d;}var _0x1021aa;try{_0x1021aa=_0xeb248f(_0x4290c6,_0x299d84);}catch(_0x345384){return _0x3d0f8d={'name':_0x341cd5,'type':_0x16afc1(0x1da),'error':_0x345384[_0x16afc1(0x204)]},this[_0x16afc1(0x1bb)](_0x3d0f8d,_0x5a331d),_0x3d0f8d;}var _0x448f0e=this[_0x16afc1(0x17a)](_0x1021aa),_0x433812=this['_isPrimitiveType'](_0x448f0e);if(_0x3d0f8d[_0x16afc1(0x21a)]=_0x448f0e,_0x433812)this[_0x16afc1(0x1bb)](_0x3d0f8d,_0x5a331d,_0x1021aa,function(){var _0x310481=_0x16afc1;_0x3d0f8d[_0x310481(0x1d8)]=_0x1021aa[_0x310481(0x23e)](),!_0x524185&&_0x13a705[_0x310481(0x228)](_0x448f0e,_0x3d0f8d,_0x5a331d,{});});else{var _0x25efc9=_0x5a331d[_0x16afc1(0x1ca)]&&_0x5a331d[_0x16afc1(0x1b8)]<_0x5a331d[_0x16afc1(0x249)]&&_0x5a331d[_0x16afc1(0x209)][_0x16afc1(0x22b)](_0x1021aa)<0x0&&_0x448f0e!==_0x16afc1(0x23b)&&_0x5a331d['autoExpandPropertyCount']<_0x5a331d['autoExpandLimit'];_0x25efc9||_0x5a331d[_0x16afc1(0x1b8)]<_0x429173||_0x524185?(this[_0x16afc1(0x1cd)](_0x3d0f8d,_0x1021aa,_0x5a331d,_0x524185||{}),this[_0x16afc1(0x1f8)](_0x1021aa,_0x3d0f8d)):this[_0x16afc1(0x1bb)](_0x3d0f8d,_0x5a331d,_0x1021aa,function(){var _0x4e04c6=_0x16afc1;_0x448f0e==='null'||_0x448f0e===_0x4e04c6(0x222)||(delete _0x3d0f8d[_0x4e04c6(0x1d8)],_0x3d0f8d[_0x4e04c6(0x1c7)]=!0x0);});}return _0x3d0f8d;}finally{_0x5a331d[_0x16afc1(0x1a8)]=_0x27ef97,_0x5a331d[_0x16afc1(0x1e7)]=_0x429173,_0x5a331d[_0x16afc1(0x1ad)]=_0x32cdfe;}}[_0x401f13(0x228)](_0x5505d5,_0x4cb10c,_0x417122,_0x2e32c9){var _0x4b0bb6=_0x401f13,_0x1019e1=_0x2e32c9[_0x4b0bb6(0x240)]||_0x417122['strLength'];if((_0x5505d5===_0x4b0bb6(0x202)||_0x5505d5===_0x4b0bb6(0x1e9))&&_0x4cb10c['value']){let _0x2d3817=_0x4cb10c['value']['length'];_0x417122[_0x4b0bb6(0x1f7)]+=_0x2d3817,_0x417122[_0x4b0bb6(0x1f7)]>_0x417122[_0x4b0bb6(0x1ff)]?(_0x4cb10c[_0x4b0bb6(0x1c7)]='',delete _0x4cb10c[_0x4b0bb6(0x1d8)]):_0x2d3817>_0x1019e1&&(_0x4cb10c[_0x4b0bb6(0x1c7)]=_0x4cb10c[_0x4b0bb6(0x1d8)]['substr'](0x0,_0x1019e1),delete _0x4cb10c[_0x4b0bb6(0x1d8)]);}}[_0x401f13(0x244)](_0x49bef9){var _0x114f60=_0x401f13;return!!(_0x49bef9&&_0x215b52[_0x114f60(0x250)]&&this[_0x114f60(0x200)](_0x49bef9)===_0x114f60(0x252)&&_0x49bef9[_0x114f60(0x1b2)]);}['_propertyName'](_0x52f5d3){var _0x444795=_0x401f13;if(_0x52f5d3[_0x444795(0x1bd)](/^\\d+$/))return _0x52f5d3;var _0x2fc14d;try{_0x2fc14d=JSON[_0x444795(0x192)](''+_0x52f5d3);}catch{_0x2fc14d='\\x22'+this[_0x444795(0x200)](_0x52f5d3)+'\\x22';}return _0x2fc14d['match'](/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?_0x2fc14d=_0x2fc14d[_0x444795(0x23f)](0x1,_0x2fc14d[_0x444795(0x246)]-0x2):_0x2fc14d=_0x2fc14d['replace'](/'/g,'\\x5c\\x27')[_0x444795(0x186)](/\\\\"/g,'\\x22')[_0x444795(0x186)](/(^"|"$)/g,'\\x27'),_0x2fc14d;}['_processTreeNodeResult'](_0x1ebba4,_0x80c0c8,_0x18a7ac,_0x4699bd){var _0x5ddf2b=_0x401f13;this[_0x5ddf2b(0x20d)](_0x1ebba4,_0x80c0c8),_0x4699bd&&_0x4699bd(),this['_additionalMetadata'](_0x18a7ac,_0x1ebba4),this[_0x5ddf2b(0x1b1)](_0x1ebba4,_0x80c0c8);}[_0x401f13(0x20d)](_0x348e29,_0x391689){var _0xad02de=_0x401f13;this[_0xad02de(0x189)](_0x348e29,_0x391689),this[_0xad02de(0x235)](_0x348e29,_0x391689),this[_0xad02de(0x1fe)](_0x348e29,_0x391689),this[_0xad02de(0x190)](_0x348e29,_0x391689);}[_0x401f13(0x189)](_0x166c40,_0x4feb87){}[_0x401f13(0x235)](_0x5ba2e3,_0x425cb1){}[_0x401f13(0x19d)](_0x212222,_0xedda1a){}[_0x401f13(0x229)](_0x2a57e7){var _0x49ede9=_0x401f13;return _0x2a57e7===this[_0x49ede9(0x1f5)];}[_0x401f13(0x1b1)](_0x12f89f,_0x36acc6){var _0x25d99b=_0x401f13;this[_0x25d99b(0x19d)](_0x12f89f,_0x36acc6),this[_0x25d99b(0x1f1)](_0x12f89f),_0x36acc6[_0x25d99b(0x1c1)]&&this[_0x25d99b(0x1c2)](_0x12f89f),this['_addFunctionsNode'](_0x12f89f,_0x36acc6),this[_0x25d99b(0x255)](_0x12f89f,_0x36acc6),this['_cleanNode'](_0x12f89f);}[_0x401f13(0x1f8)](_0x7b96b8,_0x2d717e){var _0x711e0b=_0x401f13;let _0x339ff0;try{_0x215b52[_0x711e0b(0x1f3)]&&(_0x339ff0=_0x215b52[_0x711e0b(0x1f3)][_0x711e0b(0x18d)],_0x215b52[_0x711e0b(0x1f3)][_0x711e0b(0x18d)]=function(){}),_0x7b96b8&&typeof _0x7b96b8[_0x711e0b(0x246)]==_0x711e0b(0x231)&&(_0x2d717e[_0x711e0b(0x246)]=_0x7b96b8[_0x711e0b(0x246)]);}catch{}finally{_0x339ff0&&(_0x215b52[_0x711e0b(0x1f3)]['error']=_0x339ff0);}if(_0x2d717e[_0x711e0b(0x21a)]==='number'||_0x2d717e['type']===_0x711e0b(0x21b)){if(isNaN(_0x2d717e[_0x711e0b(0x1d8)]))_0x2d717e[_0x711e0b(0x257)]=!0x0,delete _0x2d717e[_0x711e0b(0x1d8)];else switch(_0x2d717e[_0x711e0b(0x1d8)]){case Number[_0x711e0b(0x1fa)]:_0x2d717e['positiveInfinity']=!0x0,delete _0x2d717e[_0x711e0b(0x1d8)];break;case Number[_0x711e0b(0x1f6)]:_0x2d717e['negativeInfinity']=!0x0,delete _0x2d717e[_0x711e0b(0x1d8)];break;case 0x0:this[_0x711e0b(0x18b)](_0x2d717e[_0x711e0b(0x1d8)])&&(_0x2d717e[_0x711e0b(0x22d)]=!0x0);break;}}else _0x2d717e[_0x711e0b(0x21a)]===_0x711e0b(0x23b)&&typeof _0x7b96b8[_0x711e0b(0x180)]==_0x711e0b(0x202)&&_0x7b96b8[_0x711e0b(0x180)]&&_0x2d717e['name']&&_0x7b96b8[_0x711e0b(0x180)]!==_0x2d717e['name']&&(_0x2d717e[_0x711e0b(0x1e5)]=_0x7b96b8[_0x711e0b(0x180)]);}[_0x401f13(0x18b)](_0x5e5525){return 0x1/_0x5e5525===Number['NEGATIVE_INFINITY'];}[_0x401f13(0x1c2)](_0x2ef586){var _0x18f502=_0x401f13;!_0x2ef586['props']||!_0x2ef586[_0x18f502(0x24b)][_0x18f502(0x246)]||_0x2ef586[_0x18f502(0x21a)]===_0x18f502(0x205)||_0x2ef586['type']===_0x18f502(0x250)||_0x2ef586[_0x18f502(0x21a)]===_0x18f502(0x1ee)||_0x2ef586['props'][_0x18f502(0x1ba)](function(_0x120298,_0x1f1bab){var _0x188272=_0x18f502,_0x2f2b82=_0x120298[_0x188272(0x180)]['toLowerCase'](),_0x4e0350=_0x1f1bab[_0x188272(0x180)]['toLowerCase']();return _0x2f2b82<_0x4e0350?-0x1:_0x2f2b82>_0x4e0350?0x1:0x0;});}[_0x401f13(0x198)](_0x43e64a,_0x10179f){var _0x194c72=_0x401f13;if(!(_0x10179f[_0x194c72(0x19b)]||!_0x43e64a[_0x194c72(0x24b)]||!_0x43e64a[_0x194c72(0x24b)][_0x194c72(0x246)])){for(var _0x581102=[],_0x275966=[],_0x31441e=0x0,_0x37c72f=_0x43e64a[_0x194c72(0x24b)]['length'];_0x31441e<_0x37c72f;_0x31441e++){var _0x2bd0ad=_0x43e64a[_0x194c72(0x24b)][_0x31441e];_0x2bd0ad[_0x194c72(0x21a)]===_0x194c72(0x23b)?_0x581102[_0x194c72(0x247)](_0x2bd0ad):_0x275966[_0x194c72(0x247)](_0x2bd0ad);}if(!(!_0x275966[_0x194c72(0x246)]||_0x581102[_0x194c72(0x246)]<=0x1)){_0x43e64a[_0x194c72(0x24b)]=_0x275966;var _0x28dfc9={'functionsNode':!0x0,'props':_0x581102};this[_0x194c72(0x189)](_0x28dfc9,_0x10179f),this[_0x194c72(0x19d)](_0x28dfc9,_0x10179f),this[_0x194c72(0x1f1)](_0x28dfc9),this['_setNodePermissions'](_0x28dfc9,_0x10179f),_0x28dfc9['id']+='\\x20f',_0x43e64a[_0x194c72(0x24b)]['unshift'](_0x28dfc9);}}}[_0x401f13(0x255)](_0x41b5d5,_0x1058e3){}[_0x401f13(0x1f1)](_0x559418){}['_isArray'](_0x1f44eb){var _0x1ca4f6=_0x401f13;return Array['isArray'](_0x1f44eb)||typeof _0x1f44eb==_0x1ca4f6(0x230)&&this[_0x1ca4f6(0x200)](_0x1f44eb)===_0x1ca4f6(0x175);}[_0x401f13(0x190)](_0x1c3189,_0x110f78){}[_0x401f13(0x221)](_0x1d8acc){var _0x3f2e2e=_0x401f13;delete _0x1d8acc[_0x3f2e2e(0x1cf)],delete _0x1d8acc[_0x3f2e2e(0x23c)],delete _0x1d8acc[_0x3f2e2e(0x1c6)];}[_0x401f13(0x1fe)](_0x35bbe5,_0x336079){}[_0x401f13(0x21f)](_0x30b8d8){var _0x3deac4=_0x401f13;return _0x30b8d8?_0x30b8d8['match'](this[_0x3deac4(0x22f)])?'['+_0x30b8d8+']':_0x30b8d8[_0x3deac4(0x1bd)](this[_0x3deac4(0x1dc)])?'.'+_0x30b8d8:_0x30b8d8[_0x3deac4(0x1bd)](this[_0x3deac4(0x208)])?'['+_0x30b8d8+']':'[\\x27'+_0x30b8d8+'\\x27]':'';}}let _0x35007d=new _0x43c10b();function _0x5361a1(_0x44c395,_0x563346,_0x2f5ec2,_0x17c82c,_0x1fbd61,_0x5ca88c){var _0x377fd4=_0x401f13;let _0x4e85c2,_0x233b34;try{_0x233b34=_0x5c2a75(),_0x4e85c2=_0x386186[_0x563346],!_0x4e85c2||_0x233b34-_0x4e85c2['ts']>0x1f4&&_0x4e85c2[_0x377fd4(0x220)]&&_0x4e85c2[_0x377fd4(0x210)]/_0x4e85c2[_0x377fd4(0x220)]<0x64?(_0x386186[_0x563346]=_0x4e85c2={'count':0x0,'time':0x0,'ts':_0x233b34},_0x386186[_0x377fd4(0x1d3)]={}):_0x233b34-_0x386186['hits']['ts']>0x32&&_0x386186[_0x377fd4(0x1d3)][_0x377fd4(0x220)]&&_0x386186[_0x377fd4(0x1d3)][_0x377fd4(0x210)]/_0x386186[_0x377fd4(0x1d3)][_0x377fd4(0x220)]<0x64&&(_0x386186[_0x377fd4(0x1d3)]={});let _0x40e198=[],_0x4e9017=_0x4e85c2['reduceLimits']||_0x386186[_0x377fd4(0x1d3)][_0x377fd4(0x199)]?_0x571eca:_0x4c74f6,_0x417b97=_0x5a157c=>{var _0x1323c2=_0x377fd4;let _0x59d612={};return _0x59d612['props']=_0x5a157c[_0x1323c2(0x24b)],_0x59d612[_0x1323c2(0x227)]=_0x5a157c[_0x1323c2(0x227)],_0x59d612[_0x1323c2(0x240)]=_0x5a157c[_0x1323c2(0x240)],_0x59d612[_0x1323c2(0x1ff)]=_0x5a157c[_0x1323c2(0x1ff)],_0x59d612[_0x1323c2(0x1cc)]=_0x5a157c[_0x1323c2(0x1cc)],_0x59d612[_0x1323c2(0x249)]=_0x5a157c['autoExpandMaxDepth'],_0x59d612[_0x1323c2(0x1c1)]=!0x1,_0x59d612['noFunctions']=!_0x33c390,_0x59d612['depth']=0x1,_0x59d612[_0x1323c2(0x1b8)]=0x0,_0x59d612['expId']=_0x1323c2(0x225),_0x59d612[_0x1323c2(0x24d)]=_0x1323c2(0x18f),_0x59d612[_0x1323c2(0x1ca)]=!0x0,_0x59d612[_0x1323c2(0x209)]=[],_0x59d612[_0x1323c2(0x187)]=0x0,_0x59d612[_0x1323c2(0x188)]=!0x0,_0x59d612['allStrLength']=0x0,_0x59d612[_0x1323c2(0x1a3)]={'current':void 0x0,'parent':void 0x0,'index':0x0},_0x59d612;};for(var _0x274761=0x0;_0x274761<_0x1fbd61[_0x377fd4(0x246)];_0x274761++)_0x40e198['push'](_0x35007d[_0x377fd4(0x1cd)]({'timeNode':_0x44c395==='time'||void 0x0},_0x1fbd61[_0x274761],_0x417b97(_0x4e9017),{}));if(_0x44c395===_0x377fd4(0x241)){let _0x55385c=Error[_0x377fd4(0x1af)];try{Error[_0x377fd4(0x1af)]=0x1/0x0,_0x40e198[_0x377fd4(0x247)](_0x35007d['serialize']({'stackNode':!0x0},new Error()[_0x377fd4(0x1d7)],_0x417b97(_0x4e9017),{'strLength':0x1/0x0}));}finally{Error[_0x377fd4(0x1af)]=_0x55385c;}}return{'method':_0x377fd4(0x17b),'version':_0x12d5de,'args':[{'ts':_0x2f5ec2,'session':_0x17c82c,'args':_0x40e198,'id':_0x563346,'context':_0x5ca88c}]};}catch(_0xe16010){return{'method':_0x377fd4(0x17b),'version':_0x12d5de,'args':[{'ts':_0x2f5ec2,'session':_0x17c82c,'args':[{'type':_0x377fd4(0x1da),'error':_0xe16010&&_0xe16010[_0x377fd4(0x204)]}],'id':_0x563346,'context':_0x5ca88c}]};}finally{try{if(_0x4e85c2&&_0x233b34){let _0x11081a=_0x5c2a75();_0x4e85c2[_0x377fd4(0x220)]++,_0x4e85c2[_0x377fd4(0x210)]+=_0xa9ec19(_0x233b34,_0x11081a),_0x4e85c2['ts']=_0x11081a,_0x386186[_0x377fd4(0x1d3)][_0x377fd4(0x220)]++,_0x386186[_0x377fd4(0x1d3)][_0x377fd4(0x210)]+=_0xa9ec19(_0x233b34,_0x11081a),_0x386186[_0x377fd4(0x1d3)]['ts']=_0x11081a,(_0x4e85c2[_0x377fd4(0x220)]>0x32||_0x4e85c2[_0x377fd4(0x210)]>0x64)&&(_0x4e85c2[_0x377fd4(0x199)]=!0x0),(_0x386186['hits'][_0x377fd4(0x220)]>0x3e8||_0x386186[_0x377fd4(0x1d3)]['time']>0x12c)&&(_0x386186[_0x377fd4(0x1d3)]['reduceLimits']=!0x0);}}catch{}}}return _0x215b52['_console_ninja'];})(globalThis,_0x198da5(0x216),'42651',_0x198da5(0x237),_0x198da5(0x1c9),_0x198da5(0x22e),_0x198da5(0x197),_0x198da5(0x1f2),'');`)}catch{}}function _o(e,...n){try{wt().consoleLog(e,n)}catch{}return n}function Br(e,...n){try{wt().consoleTrace(e,n)}catch{}return n}function Ur(){try{wt().consoleTime()}catch{}}function Wr(){try{wt().consoleTimeEnd()}catch{}}var le=a(98954),po=a(41486);const go=()=>e=>e[`${H.Z}_dataManagerProvider`]||po.E;var bo=()=>(0,zn.P1)(go(),e=>e),ho=a(39935),yo=a.n(ho),vo=a(9086),wn=a.n(vo),Eo=a(98978),Mo=a.n(Eo);const To=(e,n)=>{const o=Object.keys(e).filter(i=>{const r=R()(e,i,{}),d=R()(n,i,{}),l=R()(r,["isTemporary"],!1),x=!Qe()(r,d);return l||x});return(0,Ke.Z)(o)},Co=(e,n)=>{const o=Hn(R()(e,"schema.attributes",[]),n),i=R()(e,"isTemporary",!1)?{tmpUID:e.uid}:{uid:e.uid};return Object.assign({},i,{category:e.category},wn()(e.schema,"attributes"),{attributes:o})},Vn=(e,n=!1)=>{const o=R()(e,"uid",null),i=Hn(R()(e,"schema.attributes",[]),o),r=n?{category:R()(e,"category","")}:{},d=Object.assign(r,wn()(e.schema,"attributes"),{attributes:i});return delete d.uid,delete d.isTemporary,delete d.visible,delete d.restrictRelationsTo,d},Hn=(e,n)=>e.reduce((o,{name:i,...r})=>{const d=r,l=d.target===n,x=d.type==="relation",u=R()(d,"targetAttribute",null);if(!l)if(x){const _=Object.assign({},d,{targetAttribute:Gn(u)});o[i]=Vt(_)}else o[i]=Vt(d);if(l){const _=d.target,f=Object.assign({},d,{target:_,targetAttribute:Gn(u)});o[i]=Vt(f)}if(d.customField){const _={...d,type:"customField"};o[i]=Vt(_)}return o},{}),Gn=e=>e==="-"?null:e,Vt=e=>Object.keys(e).reduce((n,o)=>(e[o]!==null&&o!=="plugin"&&(n[o]=e[o]),n),{}),Zo=(e,n,o,i=!1)=>To(e,n).map(l=>{const x=R()(e,l,{});return Co(x,o,i)}),Ro=e=>Mo()(Object.keys(e).map(n=>({visible:e[n].schema.visible,name:n,title:e[n].schema.displayName,plugin:e[n].plugin||null,uid:n,to:`/plugins/${H.Z}/content-types/${n}`,kind:e[n].schema.kind,restrictRelationsTo:e[n].schema.restrictRelationsTo})).filter(n=>n!==null),n=>yo()(n.title));var qn=e=>e.reduce((n,o)=>(n[o.uid]=o,n),{}),Oo=(e,n,o,i)=>{const r=n.reduce((x,u)=>{const _=R()(o,u,{});return x[u]=_,x},{});return{[i?"contentType":"component"]:e,components:r}};const Po=e=>Object.keys(e).reduce((n,o)=>{const i=e[o].schema;return n[o]={...e[o],schema:{...i,attributes:Ao(i.attributes)}},n},{}),Ao=e=>Object.keys(e).reduce((n,o)=>(n.push({...e[o],name:o}),n),[]);var Qn=Po,Do=a(61730);const Lo=e=>{const n=Object.keys(e).reduce((o,i)=>{const r=R()(e,[i],{}),d=r.uid;return Io(r)&&o.push(d),o},[]);return(0,Ke.Z)(n)},Io=e=>R()(e,["schema","attributes"],[]).some(o=>{const{type:i}=o;return i==="component"}),So=e=>{const n=Object.keys(e).reduce((o,i)=>{const r=e?.[i]?.schema?.attributes??[],d=No(r);return[...o,...d]},[]);return(0,Ke.Z)(n)},No=e=>e.reduce((n,o)=>{const{type:i,component:r}=o;return i==="component"&&n.push(r),n},[]);var Yn=So,Fo=(e,n)=>{const o=Object.keys(e).map(i=>R()(e,[i,...n],""));return(0,Ke.Z)(o)};const Xn="did-not-kill-server",Bo="server is down";function Mt(e,n){return new Promise(o=>{fetch(`${window.strapi.backendURL}/_health`,{method:"HEAD",mode:"no-cors",headers:{"Content-Type":"application/json","Keep-Alive":!1}}).then(i=>{if(i.status>=400)throw new Error(Bo);if(!n)throw new Error(Xn);o(e)}).catch(i=>{setTimeout(()=>Mt(e,i.message!==Xn).then(o),100)})})}var Uo=e=>Object.values(e.attributes).filter(({type:o})=>o==="dynamiczone").every(({components:o})=>Array.isArray(o)&&o.length>0);const dn=({children:e,components:n,contentTypes:o,isLoading:i,isLoadingForDataToBeSet:r,initialData:d,modifiedData:l,reservedNames:x})=>{const u=(0,Se.I0)(),_=(0,p.lm)(),{lockAppWithAutoreload:f,unlockAppWithAutoreload:m}=(0,p.Vu)(),{setCurrentStep:M}=(0,p.c1)(),{getPlugin:E}=(0,p.j1)(),{apis:y}=E(H.Z),{autoReload:C}=(0,p.L7)(),{formatMessage:L}=(0,S.Z)(),{trackUsage:v}=(0,p.rS)(),{refetchPermissions:O}=(0,p.vn)(),{pathname:D}=(0,j.TH)(),{onCloseModal:I}=(0,Oe.Z)(),G=(0,j.$B)(`/plugins/${H.Z}/content-types/:uid`),de=(0,j.$B)(`/plugins/${H.Z}/component-categories/:categoryUid/:componentUid`),ye=(0,p.kY)(),{put:B,post:be,del:q}=ye,ve=(0,t.useRef)();ve.current=L;const ae=C,te=G!==null,Ne=te?"contentType":"component",ce=te?R()(G,"params.uid",null):R()(de,"params.componentUid",null),V=(0,t.useRef)(),T=te?"content-types":"components";V.current=async()=>{try{const[{data:{data:g}},{data:{data:Z}},{data:U}]=await Promise.all(["components","content-types","reserved-names"].map(Xe=>ye.get(`/${H.Z}/${Xe}`))),ne=qn(g),fe=Qn(ne),Ee=qn(Z),Be=Qn(Ee);u({type:le.Id,components:fe,contentTypes:Be,reservedNames:U})}catch(g){console.error({err:g}),_({type:"warning",message:{id:"notification.error"}})}},(0,t.useEffect)(()=>(V.current(),()=>{u({type:le.Zl})}),[]),(0,t.useEffect)(()=>{!i&&ce&&Gt()},[i,D,ce]),(0,t.useEffect)(()=>{C||_({type:"info",message:{id:(0,c.Z)("notification.info.autoreaload-disable")}})},[C,_]);const cn=(g,Z,U,ne=!1,fe,Ee=!1)=>{const Be=ne?le.JO:le.gz;u({type:Be,attributeToSet:g,forTarget:Z,targetUid:U,initialAttribute:fe,shouldAddComponentToData:Ee})},rt=({attributeToSet:g,forTarget:Z,targetUid:U,initialAttribute:ne})=>{u({type:le.Ir,attributeToSet:g,forTarget:Z,targetUid:U,initialAttribute:ne})},Tt=({attributeToSet:g,forTarget:Z,targetUid:U,initialAttribute:ne})=>{u({type:le.Ly,attributeToSet:g,forTarget:Z,targetUid:U,initialAttribute:ne})},it=(g,Z)=>{u({type:le.Uu,dynamicZoneTarget:g,componentsToAdd:Z})},xn=(g,Z,U,ne,fe=!1)=>{const Ee=Z==="contentType"?le.Sh:le.VR;u({type:Ee,data:g,componentCategory:ne,schemaType:Z,uid:U,shouldAddComponentToData:fe})},Ht=(g,Z)=>{u({type:le.o_,dynamicZoneTarget:g,newComponents:Z})},un=(g,Z,U="")=>{const ne=g==="components"?le.lw:le.ai;g==="contentType"&&v("willDeleteFieldOfContentType"),u({type:ne,mainDataKey:g,attributeToRemoveName:Z,componentUid:U})},mn=async g=>{try{const Z=`/${H.Z}/component-categories/${g}`,U=window.confirm(L({id:(0,c.Z)("popUpWarning.bodyMessage.category.delete")}));I(),U&&(f(),await q(Z),await Mt(!0),await m(),await oe())}catch(Z){console.error({err:Z}),_({type:"warning",message:{id:"notification.error"}})}finally{m()}},fn=async()=>{try{const g=`/${H.Z}/${T}/${ce}`,Z=R()(l,[Ne,"isTemporary"],!1),U=window.confirm(L({id:(0,c.Z)(`popUpWarning.bodyMessage.${te?"contentType":"component"}.delete`)}));if(I(),U){if(Z){u({type:le.Ap});return}f(),await q(g),await Mt(!0),await m(),await oe()}}catch(g){console.error({err:g}),_({type:"warning",message:{id:"notification.error"}})}finally{m()}},me=async(g,Z)=>{try{const U=`/${H.Z}/component-categories/${g}`;I(),f(),await B(U,Z),await Mt(!0),await m(),await oe()}catch(U){console.error({err:U}),_({type:"warning",message:{id:"notification.error"}})}finally{m()}},_n=()=>{const g=Object.assign({},n,l.components);if(!te){const U=R()(l,"component",{});Ot()(g,R()(U,["uid"],""),U)}const Z=Lo(g);return(0,Ke.Z)(Z)},pn=()=>{const g=Yn(n),Z=Yn(l.components||{});return(0,Ke.Z)([...Z,...g])},gn=(g,Z)=>{u({type:le.NG,dzName:g,componentToRemoveIndex:Z})},Gt=()=>{const g=te?o:n,Z=R()(g,ce,{schema:{attributes:[]}}),U=(0,Do.Z)(Z.schema.attributes,n),ne=Oo(Z,U,n,te),fe=R()(Z,"isTemporary",!1)&&ta()(R()(Z,"schema.attributes",[]))===0;u({type:le.xx,schemaToSet:ne,hasJustCreatedSchema:fe})},we=(0,t.useMemo)(()=>{const g=te?o:n;return ce==="create-content-type"?!1:!Object.keys(g).includes(ce)&&!i},[n,o,ce,te,i]),Ct=(0,t.useMemo)(()=>{const g=Object.keys(o).filter(Z=>R()(o,[Z,"schema","visible"],!0)).sort();return R()(g,"0","create-content-type")},[o]);if(we)return t.createElement(j.l_,{to:`/plugins/${H.Z}/content-types/${Ct}`});const Fe=async g=>{try{const Z=R()(l,[Ne,"isTemporary"],!1),U={components:Zo(l.components,n,ce,Z)};if(te){const Ee=y.forms.mutateContentTypeSchema({...Vn(l.contentType),...g},d.contentType);if(!Uo(Ee)){_({type:"warning",message:{id:(0,c.Z)("notification.error.dynamiczone-min.validation"),defaultMessage:"At least one component is required in a dynamic zone to be able to save a content type"}});return}U.contentType=Ee,v("willSaveContentType")}else U.component=Vn(l.component,!0),v("willSaveComponent");f();const ne=`/${H.Z}/${T}`,fe=Z?ne:`${ne}/${ce}`;if(Z?await be(fe,U):await B(fe,U),await Mt(!0),await m(),Z&&(d.contentType?.schema.kind==="collectionType"||d.contentType?.schema.kind==="singleType")&&M("contentTypeBuilder.success"),te){v("didSaveContentType");const Ee=R()(U,["contentType","schema","name"],""),Be=R()(d,["contentType","schema","name"],"");!Z&&Ee!==Be&&v("didEditNameOfContentType")}else v("didSaveComponent");await oe()}catch(Z){te||v("didNotSaveComponent"),console.error({err:Z.response}),_({type:"warning",message:{id:"notification.error"}})}finally{m()}},oe=async()=>{await O()},Zt=(g,Z,U)=>{u({type:le.bi,data:g,schemaType:Z,uid:U})};return t.createElement(sa.Z.Provider,{value:{addAttribute:cn,addCustomFieldAttribute:rt,addCreatedComponentToDynamicZone:it,allComponentsCategories:Fo(n,["category"]),changeDynamicZoneComponents:Ht,components:n,componentsGroupedByCategory:Xt()(n,"category"),componentsThatHaveOtherComponentInTheirAttributes:_n(),contentTypes:o,createSchema:xn,deleteCategory:mn,deleteData:fn,editCategory:me,editCustomFieldAttribute:Tt,isInDevelopmentMode:ae,initialData:d,isInContentTypeView:te,modifiedData:l,nestedComponents:pn(),removeAttribute:un,removeComponentFromDynamicZone:gn,reservedNames:x,setModifiedData:Gt,sortedContentTypesList:Ro(o),submitData:Fe,updateSchema:Zt}},r?t.createElement(p.dO,null):t.createElement(t.Fragment,null,e,ae&&t.createElement(fo,null)))};dn.defaultProps={components:{}},dn.propTypes={children:s().node.isRequired,components:s().object,contentTypes:s().object.isRequired,isLoading:s().bool.isRequired,isLoadingForDataToBeSet:s().bool.isRequired,initialData:s().object.isRequired,modifiedData:s().object.isRequired,reservedNames:s().object.isRequired};const Wo=bo(),jo=(0,Se.$j)(Wo,null);var Ko=(0,na.compose)(jo)((0,t.memo)(dn)),$o=a(89798);const Jn={actionType:null,attributeName:null,attributeType:null,categoryName:null,dynamicZoneTarget:null,forTarget:null,modalType:null,isOpen:!1,showBackLink:!1,kind:null,step:null,targetUid:null,customFieldUid:null},es=({children:e})=>{const[n,o]=(0,t.useState)(Jn),{trackUsage:i}=(0,p.rS)(),r=({attributeType:v,customFieldUid:O})=>{o(D=>({...D,actionType:"create",modalType:"customField",attributeType:v,customFieldUid:O}))},d=({attributeType:v,step:O})=>{n.forTarget==="contentType"&&i("didSelectContentTypeFieldType",{type:v}),o(D=>({...D,actionType:"create",modalType:"attribute",step:O,attributeType:v,showBackLink:!0}))},l=({dynamicZoneTarget:v,targetUid:O})=>{o(D=>({...D,dynamicZoneTarget:v,targetUid:O,modalType:"addComponentToDynamicZone",forTarget:"contentType",step:"1",actionType:"edit",isOpen:!0}))},x=({forTarget:v,targetUid:O})=>{o(D=>({...D,actionType:"create",forTarget:v,targetUid:O,modalType:"chooseAttribute",isOpen:!0,showBackLink:!1}))},u=v=>{o(O=>({...O,...v,isOpen:!0}))},_=v=>{o(O=>({...O,categoryName:v,actionType:"edit",modalType:"editCategory",isOpen:!0}))},f=({forTarget:v,targetUid:O,attributeName:D,attributeType:I,customFieldUid:G})=>{o(de=>({...de,modalType:"customField",customFieldUid:G,actionType:"edit",forTarget:v,targetUid:O,attributeName:D,attributeType:I,isOpen:!0}))},m=({forTarget:v,targetUid:O,attributeName:D,attributeType:I,step:G})=>{o(de=>({...de,modalType:"attribute",actionType:"edit",forTarget:v,targetUid:O,attributeName:D,attributeType:I,step:G,isOpen:!0}))},M=({modalType:v,forTarget:O,targetUid:D,kind:I})=>{o(G=>({...G,modalType:v,actionType:"edit",forTarget:O,targetUid:D,kind:I,isOpen:!0}))},E=()=>{o(Jn)},y=({forTarget:v,targetUid:O})=>{o(D=>({...D,forTarget:v,targetUid:O,modalType:"chooseAttribute"}))},C=()=>{o(v=>({...v,attributeType:"component",modalType:"attribute",step:"2"}))},L=({dynamicZoneTarget:v})=>{o(O=>({...O,dynamicZoneTarget:v,modalType:"addComponentToDynamicZone",actionType:"create",step:"1",attributeType:null,attributeName:null}))};return t.createElement($o.Z.Provider,{value:{...n,onClickSelectField:d,onClickSelectCustomField:r,onCloseModal:E,onNavigateToChooseAttributeModal:y,onNavigateToAddCompoToDZModal:L,onOpenModalAddComponentsToDZ:l,onNavigateToCreateComponentStep2:C,onOpenModalAddField:x,onOpenModalCreateSchema:u,onOpenModalEditCategory:_,onOpenModalEditField:m,onOpenModalEditCustomField:f,onOpenModalEditSchema:M,setFormModalNavigationState:o}},e)};es.propTypes={children:s().node.isRequired};var zo=es,ko=a(63338);const wo=(0,t.lazy)(()=>a.e(5905).then(a.bind(a,14417)));var Vo=()=>{const{url:e}=(0,j.$B)(),{categoryUid:n}=(0,j.UO)();return t.createElement(t.Suspense,{fallback:t.createElement(p.dO,null)},t.createElement(j.rs,null,t.createElement(j.AW,{path:`${e}/:componentUid`},t.createElement(wo,{categoryId:n}))))};const ts=(0,t.lazy)(()=>a.e(5905).then(a.bind(a,14417)));var Ho=()=>{const{formatMessage:e}=(0,S.Z)(),n=e({id:`${H.Z}.plugin.name`,defaultMessage:"Content Types Builder"}),{startSection:o}=(0,p.c1)(),i=(0,t.useRef)(o);return(0,t.useEffect)(()=>{i.current&&i.current("contentTypeBuilder")},[]),t.createElement(p.O4,{permissions:ko._.main},t.createElement($.q,{title:n}),t.createElement(zo,null,t.createElement(Ko,null,t.createElement(N.A,{sideNav:t.createElement(qt,null)},t.createElement(t.Suspense,{fallback:t.createElement(p.dO,null)},t.createElement(j.rs,null,t.createElement(j.AW,{path:`/plugins/${H.Z}/content-types/create-content-type`,component:ts}),t.createElement(j.AW,{path:`/plugins/${H.Z}/content-types/:uid`,component:ts}),t.createElement(j.AW,{path:`/plugins/${H.Z}/component-categories/:categoryUid`,component:Vo})))))))}},32105:function(Y,W,a){"use strict";var t=a(53728);const N=p=>`${t.Z}.${p}`;W.Z=N},91131:function(Y,W,a){var t=a(94318),N=a(3387),p="[object RegExp]";function $(S){return N(S)&&t(S)==p}Y.exports=$},52654:function(Y,W,a){var t=a(91131),N=a(76535),p=a(91782),$=p&&p.isRegExp,S=$?N($):t;Y.exports=S},51382:function(Y,W,a){var t=a(90454),N=a(24793),p=a(34327),$=a(85973),S=a(52654),j=a(38788),F=a(51119),se=a(25225),ie=a(41119),Pe=30,He="...",Ge=/\w*$/;function Ue(z,pe){var X=Pe,Te=He;if($(pe)){var A="separator"in pe?pe.separator:A;X="length"in pe?se(pe.length):X,Te="omission"in pe?t(pe.omission):Te}z=ie(z);var k=z.length;if(p(z)){var Ae=F(z);k=Ae.length}if(X>=k)return z;var xe=X-j(Te);if(xe<1)return Te;var ue=Ae?N(Ae,0,xe).join(""):z.slice(0,xe);if(A===void 0)return ue+Te;if(Ae&&(xe+=ue.length-xe),S(A)){if(z.slice(xe).search(A)){var Le,We=ue;for(A.global||(A=RegExp(A.source,ie(Ge.exec(A))+"g")),A.lastIndex=0;Le=A.exec(We);)var ge=Le.index;ue=ue.slice(0,ge===void 0?xe:ge)}}else if(z.indexOf(t(A),xe)!=xe){var Ie=ue.lastIndexOf(A);Ie>-1&&(ue=ue.slice(0,Ie))}return ue+Te}Y.exports=Ue},27799:function(Y,W,a){"use strict";a.d(W,{Q:function(){return $}});var t=a(74512),N=a(8471),p=a(6407);const $=({options:j,...F})=>(0,t.jsx)(p.NU,{...F,children:j.map(se=>"children"in se?(0,t.jsx)(p.Ab,{label:se.label,values:se.children.map(ie=>ie.value.toString()),children:se.children.map(ie=>(0,t.jsx)(S,{value:ie.value,children:ie.label},ie.value))},se.label):(0,t.jsx)(p.ML,{value:se.value,children:se.label},se.value))}),S=(0,N.ZP)(p.ML)`
|
|
169
|
-
padding-left: ${({theme:j})=>j.spaces[7]};
|
|
170
|
-
`},37272:function(Y,W,a){"use strict";a.d(W,{Z:function(){return p}});var t=a(74512);const N=$=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...$,children:(0,t.jsx)("path",{fill:"#212134",d:"M13 21v2.5l-3-2-3 2V21h-.5A3.5 3.5 0 0 1 3 17.5V5a3 3 0 0 1 3-3h14a1 1 0 0 1 1 1v17a1 1 0 0 1-1 1h-7Zm-6-2v-2h6v2h6v-3H6.5a1.5 1.5 0 1 0 0 3H7ZM7 5v2h2V5H7Zm0 3v2h2V8H7Zm0 3v2h2v-2H7Z"})}),p=N},92967:function(Y,W,a){"use strict";a.d(W,{Z:function(){return p}});var t=a(74512);const N=$=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...$,children:[(0,t.jsx)("path",{fill:"#212134",d:"M11.987 23.036v-.964H1.876V1.876h10.111V0H0v24h11.987v-.964Z"}),(0,t.jsx)("path",{fill:"#212134",d:"M8 11.2c0-.11.09-.2.2-.2h11.973l-5.445-5.445a.2.2 0 0 1 0-.283l1.13-1.13a.2.2 0 0 1 .283 0l7.718 7.717a.2.2 0 0 1 0 .282L16.14 19.86a.2.2 0 0 1-.282 0l-1.13-1.13a.2.2 0 0 1 0-.284L20.172 13H8.2a.2.2 0 0 1-.2-.2v-1.6Z"})]}),p=N},45323:function(Y,W,a){"use strict";a.d(W,{Z:function(){return p}});var t=a(74512);const N=$=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...$,children:(0,t.jsx)("path",{fill:"#212134",d:"M6.455 19 2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455ZM7 10v2h2v-2H7Zm4 0v2h2v-2h-2Zm4 0v2h2v-2h-2Z"})}),p=N},78429:function(Y,W,a){"use strict";a.d(W,{Z:function(){return p}});var t=a(74512);const N=$=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...$,children:(0,t.jsx)("path",{fill:"#212134",d:"M1.946 9.315c-.522-.174-.527-.455.01-.634l19.087-6.362c.53-.176.832.12.684.638l-5.454 19.086c-.15.529-.455.547-.679.045L12 14l6-8-8 6-8.054-2.685Z"})}),p=N},2438:function(Y,W,a){"use strict";a.d(W,{Z:function(){return p}});var t=a(74512);const N=$=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 8 8",...$,children:(0,t.jsx)("path",{fill:"#212134",d:"M2 .93c0-.4.45-.63.78-.41l4.6 3.06c.3.2.3.64 0 .84l-4.6 3.06A.5.5 0 0 1 2 7.07V.93Z"})}),p=N},29685:function(Y,W,a){"use strict";a.d(W,{Z:function(){return p}});var t=a(74512);const N=$=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 15 14",...$,children:(0,t.jsx)("path",{fill:"#212134",d:"M5.08 4.1c0-1.19 1.18-2.17 2.42-2.17s2.43.98 2.43 2.17c0 1.1-.56 1.61-1.31 2.28l-.03.03c-.75.65-1.66 1.47-1.66 3.09a.57.57 0 1 0 1.15 0c0-1.08.55-1.6 1.3-2.26l.02-.02c.75-.66 1.67-1.48 1.67-3.12C11.07 2.13 9.22.78 7.5.78 5.78.78 3.93 2.13 3.93 4.1a.57.57 0 1 0 1.15 0Zm2.42 9.26a.88.88 0 1 0 0-1.75.88.88 0 0 0 0 1.75Z"})}),p=N},73165:function(Y,W,a){"use strict";a.d(W,{Z:function(){return p}});var t=a(74512);const N=$=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...$,children:(0,t.jsx)("path",{fill:"#212134",fillRule:"evenodd",d:"M23.707.297A1 1 0 0 0 23 .004h-2a13.907 13.907 0 0 0-5.38 1.077 1 1 0 0 0-.615.923V4.92a.035.035 0 0 1-.022.038l-2-1.47a1 1 0 0 0-1.265.052A14 14 0 0 0 7 14.004v1.585l-2.707 2.707a1 1 0 1 0 1.415 1.415l2.707-2.708H10a14.014 14.014 0 0 0 14-14v-2a1 1 0 0 0-.293-.706ZM18 23.999H3a3 3 0 0 1-3-3V6A3 3 0 0 1 3 3h3a1 1 0 1 1 0 2H3a1 1 0 0 0-1 1v15a1 1 0 0 0 1 1h15a1 1 0 0 0 1-1v-3a1 1 0 1 1 2 0v3a3 3 0 0 1-3 3Z",clipRule:"evenodd"})}),p=N}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[302],{68951:function(j,m,e){e.r(m),e.d(m,{SingleSignOn:function(){return R},default:function(){return H}});var t=e(32735),E=e(96709),M=e(27649),y=e(82055),C=e(41415),O=e(17e3),I=e(87933),b=e(49372),A=e(15335),u=e(5803),P=e(71842),D=e(68465),T=e(84967),f=e(6407),o=e(19565),x=e(66456),k=e(89793),B=e.n(k),F=e(67879),h=e(15062),v=e(2160),S=e(30305),i=e(24346),G=i.Ry().shape({autoRegister:i.Xg().required(o.I0.required),defaultRole:i.nK().when("autoRegister",(a,l)=>a?l.required(o.I0.required):l.nullable()),ssoLockedRoles:i.IX().nullable().of(i.nK().when("ssoLockedRoles",(a,l)=>a?l.required(o.I0.required):l.nullable()))});const R=()=>{const{formatMessage:a}=(0,F.Z)(),l=(0,h.v9)(S._),{isLoading:Z,allowedActions:{canUpdate:g,canReadRoles:z}}=(0,o.ss)({...l.settings.sso,readRoles:l.settings.roles.read}),[{formErrors:n,initialData:K,isLoading:U,modifiedData:r,showHeaderButtonLoader:X},V,{handleChange:d,handleSubmit:N}]=(0,v.G4)("/admin/providers/options",G,()=>{},["autoRegister","defaultRole","ssoLockedRoles"]),{roles:p}=(0,v.bF)(z);(0,o.go)();const W=Z||U,L=B()(K,r);return t.createElement(E.A,null,t.createElement(o.SL,{name:"SSO"}),t.createElement(M.o,{tabIndex:-1},t.createElement("form",{onSubmit:s=>{if(L){s.preventDefault();return}N(s)}},t.createElement(y.T,{primaryAction:t.createElement(C.z,{"data-testid":"save-button",disabled:L,loading:X,startIcon:t.createElement(x.Z,null),type:"submit",size:"L"},a({id:"global.save",defaultMessage:"Save"})),title:a({id:"Settings.sso.title",defaultMessage:"Single Sign-On"}),subtitle:a({id:"Settings.sso.description",defaultMessage:"Configure the settings for the Single Sign-On feature."})}),t.createElement(O.D,null,W?t.createElement(o.dO,null):t.createElement(I.k,{direction:"column",alignItems:"stretch",gap:4,background:"neutral0",padding:6,shadow:"filterShadow",hasRadius:!0},t.createElement(b.Z,{variant:"delta",as:"h2"},a({id:"global.settings",defaultMessage:"Settings"})),t.createElement(A.r,{gap:4},t.createElement(u.P,{col:6,m:6,s:12},t.createElement(P.s,{"aria-label":"autoRegister","data-testid":"autoRegister",disabled:!g,checked:r.autoRegister,hint:a({id:"Settings.sso.form.registration.description",defaultMessage:"Create new user on SSO login if no account exists"}),label:a({id:"Settings.sso.form.registration.label",defaultMessage:"Auto-registration"}),name:"autoRegister",offLabel:a({id:"app.components.ToggleCheckbox.off-label",defaultMessage:"Off"}),onLabel:a({id:"app.components.ToggleCheckbox.on-label",defaultMessage:"On"}),onChange:s=>{d({target:{name:"autoRegister",value:s.target.checked}})}})),t.createElement(u.P,{col:6,m:6,s:12},t.createElement(D.P,{disabled:!g,hint:a({id:"Settings.sso.form.defaultRole.description",defaultMessage:"It will attach the new authenticated user to the selected role"}),error:n.defaultRole?a({id:n.defaultRole.id,defaultMessage:n.defaultRole.id}):"",label:a({id:"Settings.sso.form.defaultRole.label",defaultMessage:"Default role"}),name:"defaultRole",onChange:s=>{d({target:{name:"defaultRole",value:s}})},placeholder:a({id:"components.InputSelect.option.placeholder",defaultMessage:"Choose here"}),value:r.defaultRole},p.map(({id:s,name:c})=>t.createElement(T.W,{key:s,value:s.toString()},c)))),t.createElement(u.P,{col:6,m:6,s:12},t.createElement(f.NU,{disabled:!g,hint:a({id:"Settings.sso.form.localAuthenticationLock.description",defaultMessage:"Select the roles for which you want to disable the local authentication"}),error:n.ssoLockedRoles?a({id:n.ssoLockedRoles.id,defaultMessage:n.ssoLockedRoles.id}):"",label:a({id:"Settings.sso.form.localAuthenticationLock.label",defaultMessage:"Local authentication lock-out"}),name:"ssoLockedRoles",onChange:s=>{d({target:{name:"ssoLockedRoles",value:s}})},placeholder:a({id:"components.InputSelect.option.placeholder",defaultMessage:"Choose here"}),onClear:()=>{d({target:{name:"ssoLockedRoles",emptyArray:[]}})},value:r.ssoLockedRoles||[],withTags:!0},p.map(({id:s,name:c})=>t.createElement(f.ML,{key:s,value:s.toString()},c))))))))))};var H=()=>{const a=(0,h.v9)(S._);return t.createElement(o.O4,{permissions:a.settings.sso.main},t.createElement(R,null))}}}]);
|