cft-builder 0.1.95 → 0.1.96

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.
@@ -1594,7 +1594,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1594
1594
  }
1595
1595
  }
1596
1596
  `}}),m8=y.forwardRef(function(t,e){var n=$n(),r=y.useContext(rr),i=Qm.getProps(t,r),a=y.useState(i.id),s=v_(a,2),l=s[0],c=s[1],u=y.useState(i.collapsed),d=v_(u,2),f=d[0],h=d[1],m=i.toggleable?i.onToggle?i.collapsed:f:!1,g=y.useRef(null),v=y.useRef(null),A=l+"_header",S=l+"_content",x=Qm.setMetaData({props:i,state:{id:l,collapsed:m}}),w=x.ptm,T=x.cx,C=x.isUnstyled;fi(Qm.css.styles,C,{name:"fieldset"});var _=function(G){i.toggleable&&(m?E(G):D(G),i.onToggle&&i.onToggle({originalEvent:G,value:!m})),G.preventDefault()},E=function(G){i.onToggle||h(!1),i.onExpand&&i.onExpand(G)},D=function(G){i.onToggle||h(!0),i.onCollapse&&i.onCollapse(G)};ki(function(){i.id||c(jo())});var B=function(G){(G.code==="Enter"||G.code==="NumpadEnter"||G.code==="Space")&&(_(G),G.preventDefault())},k=function(){var G=n({className:T("content")},w("content")),ae=n({ref:v,id:S,role:"region","aria-labelledby":A,className:T("toggleableContent")},w("toggleableContent")),Y=n({classNames:T("transition"),timeout:{enter:1e3,exit:450},in:!m,unmountOnExit:!0,options:i.transitionOptions},w("transition"));return y.createElement(zo,Wm({nodeRef:v},Y),y.createElement("div",ae,y.createElement("div",G,i.children)))},P=function(){if(i.toggleable){var G=n({className:T("togglericon")},w("togglericon")),ae=m?i.expandIcon||y.createElement(Hm,G):i.collapseIcon||y.createElement(g8,G),Y=Wn.getJSXIcon(ae,G,{props:i});return Y}return null},j=function(){var G=n({className:T("legendTitle")},w("legendTitle")),ae=n({id:A,role:"button","aria-expanded":!m,"aria-controls":S,onKeyDown:B,onClick:_,"aria-label":i.legend,tabIndex:0},w("toggler"));if(i.toggleable){var Y=P();return y.createElement("a",ae,Y,y.createElement("span",G,i.legend),y.createElement(Qt,null))}return y.createElement("span",Wm({},G,{id:A}),i.legend)},M=function(){var G=n({className:T("legend")},w("legend"));if(i.legend!=null||i.toggleable){var ae=j();return y.createElement("legend",G,ae)}};y.useImperativeHandle(e,function(){return{props:i,getElement:function(){return g.current},getContent:function(){return v.current}}});var H=n({id:l,ref:g,style:i.style,className:ht(i.className,T("root")),onClick:i.onClick},Qm.getOtherProps(i),w("root")),de=M(),fe=k();return y.createElement("fieldset",H,de,fe)});m8.displayName="Fieldset";const JW=t=>o.jsx(rn,{target:`.${t==null?void 0:t.element}`,position:"right",children:o.jsxs("div",{style:{width:400},className:"card m-3",children:[o.jsx("div",{className:"text-900 font-medium text-2xl mb-2",children:t==null?void 0:t.label}),o.jsx("div",{children:"Dynamic Listing Component"}),o.jsx(na,{}),o.jsxs("div",{className:"p-fluid",children:[o.jsx("label",{children:t==null?void 0:t.label}),o.jsxs("div",{children:[o.jsxs(m8,{children:[o.jsx("div",{className:"pi pi-circle",children:" Option 1"}),o.jsx("br",{})]}),o.jsx("br",{}),o.jsx(m8,{children:o.jsx("div",{className:"pi pi-circle",children:" Option 2"})})]})]})]})}),ZW=t=>o.jsx(rn,{target:`.${t==null?void 0:t.element}`,position:"right",children:o.jsxs("div",{style:{width:400},className:"card m-3",children:[o.jsx("div",{className:"text-900 font-medium text-2xl mb-2",children:t==null?void 0:t.label}),o.jsx("div",{children:"Documents"}),o.jsx(na,{}),o.jsxs("div",{className:"p-fluid",children:[o.jsx("label",{children:t==null?void 0:t.label}),o.jsxs("div",{children:["1.Hr Cv.docx",o.jsx("br",{}),"2.Readme.txt",o.jsx("br",{}),"3.Cover.jpg"]})]})]})}),eQ=[{label:"Free form inputs",icon:"pi pi-fw pi-file",expanded:!0,items:[{label:"Text",icon:"pi pi-fw pi-plus",element:"input",schema:zY,uuid:nt(),type:Zn,toolTip:t=>bX(t)},{label:"Number",icon:"pi pi-fw pi-trash",element:"number",schema:jY,uuid:nt(),type:Zn,toolTip:t=>yX(t)},{label:"Email",icon:"pi pi-fw pi-external-link",element:"email",schema:$Y,uuid:nt(),type:Zn,toolTip:t=>AX(t)},{label:"Text Area",icon:"pi pi-fw pi-external-link",element:"textArea",schema:RY,uuid:nt(),type:Zn,toolTip:t=>wX(t)},{label:"Text Editor",icon:"pi pi-fw pi-external-link",element:"textHtmlEditor",schema:qY,uuid:nt(),type:Zn,toolTip:t=>SX(t)},{label:"Date Picker",icon:"pi pi-fw pi-user-plus",element:"date-picker",schema:PY,uuid:nt(),type:Zn,toolTip:t=>xG(t)},{label:"Draw Signature",icon:"pi pi-fw pi-trash",element:"signature",schema:fT,uuid:nt(),type:Zn,toolTip:t=>_G(t)},{label:"Type Signature",icon:"pi pi-fw pi-trash",element:"type-signature",schema:WY,uuid:nt(),type:Zn,toolTip:t=>DG(t)},{label:"File Upload",icon:"pi pi-fw pi-trash",element:"file-upload",schema:BY,uuid:nt(),type:Zn,toolTip:t=>OG(t)},{label:"Phone Number",icon:"pi pi-fw pi-trash",element:"phone",schema:YY,uuid:nt(),type:Zn,PhoneNumberToolTip:yE,toolTip:t=>yE(t)},{label:"Website Url",icon:"pi pi-fw pi-trash",element:"web-url",schema:JY,uuid:nt(),type:Zn,toolTip:t=>FG(t)},{label:"Hidden Field",icon:"pi pi-fw pi-trash",element:"hidden-field",schema:UY,uuid:nt(),type:Zn,toolTip:t=>uR(t)},{label:"Address",icon:"pi pi-fw pi-trash",element:"address",schema:NY,uuid:nt(),type:Zn,toolTip:t=>dR(t)},{label:"Grid Component",icon:"pi pi-fw pi-trash",element:"grid-component",schema:VY,uuid:nt(),type:Zn,toolTip:t=>KW(t)},{label:"Matrix Dropdown",icon:"pi pi-fw pi-trash",element:"matrix-dropdown",schema:HY,uuid:nt(),type:Zn,toolTip:t=>XW(t)}]},{label:"Controlled inputs",icon:"pi pi-fw pi-pencil",items:[{label:"Countries",icon:"pi pi-fw pi-align-left",element:"country",schema:ZC,uuid:nt(),type:Zn,toolTip:t=>f_(t)},{label:"Dropdown",icon:"pi pi-fw pi-align-left",element:"select",schema:dT,uuid:nt(),type:Zn,toolTip:t=>h_(t)},{label:"Multi Select",icon:"pi pi-fw pi-align-right",element:"multi-select",schema:oT,uuid:nt(),type:Zn,toolTip:t=>p_(t)},{label:"CheckBox",icon:"pi pi-fw pi-align-left",element:"checkbox",schema:JC,uuid:nt(),type:Zn,toolTip:t=>g_(t)},{label:"Radio Button",icon:"pi pi-fw pi-align-left",element:"radio",schema:cT,uuid:nt(),type:Zn,toolTip:t=>h8(t)},{label:"Hierarchal Radio",icon:"pi pi-fw pi-align-left",element:"radio-hierarchal",schema:XY,uuid:nt(),type:Zn,toolTip:t=>h8(t)},{label:"Dynamic Radio",icon:"pi pi-fw pi-align-left",element:"dynamic-listing",schema:kY,uuid:nt(),type:Zn,toolTip:t=>JW(t)}]},{label:"Rating Inputs",icon:"pi pi-fw pi-pencil",items:[{label:"Likert Scale",icon:"pi pi-fw pi-trash",element:"likert-scale",schema:sT,uuid:nt(),type:Zn,toolTip:t=>B6(t)},{label:"Slider",icon:"pi pi-fw pi-trash",element:"slider",schema:hT,uuid:nt(),type:Zn,toolTip:t=>DE(t)},{label:"Rating",icon:"pi pi-fw pi-trash",element:"rating",schema:uT,uuid:nt(),type:Zn,toolTip:t=>EE(t)},{label:"Thumbs Up and Down",icon:"pi pi-fw pi-align-left",element:"thumbs",schema:pT,uuid:nt(),type:Zn,toolTip:t=>lR(t)},{label:"Likert Emoji Scale",icon:"pi pi-fw pi-align-left",element:"likert-emoji-scale",schema:aT,uuid:nt(),type:Zn,toolTip:t=>cR(t)}]},{label:"Social Logins",icon:"pi pi-fw pi-pencil",items:[{label:"Facebook Login",icon:"pi pi-fw pi-trash",element:"facebook-login",schema:LY,uuid:nt(),type:Zn,toolTip:t=>B6(t)}]},{label:"Media",icon:"pi pi-fw pi-user",items:[{label:"Document",icon:"pi pi-fw pi-trash",element:"document",schema:eT,uuid:nt(),type:Zn,toolTip:t=>ZW(t)}]}],tQ=[{label:"HTML",icon:"pi pi-fw pi-file",expanded:!0,items:[{label:"<a>",icon:"pi pi-fw pi-plus",element:"a",schema:rT,uuid:nt(),type:Zn},{label:"<p>",icon:"pi pi-fw pi-trash",element:"paragraph",schema:lT,uuid:nt(),type:Zn},{label:"<heading>",icon:"pi pi-fw pi-external-link",element:"h",schema:tT,uuid:nt(),type:Zn},{label:"<li>",icon:"pi pi-fw pi-external-link",element:"list",schema:QY,uuid:nt(),type:Zn},{label:"divider",icon:"pi pi-fw pi-external-link",element:"hr",schema:nT,uuid:nt(),type:Zn},{label:"Image",icon:"pi pi-fw pi-user-plus",element:"image",schema:M9,uuid:nt(),type:Zn},{label:"Image Gallery",icon:"pi pi-fw pi-user-plus",element:"image-gallery",schema:iT,uuid:nt(),type:Zn},{label:"Video",icon:"pi pi-fw pi-user-minus",element:"video",schema:L9,uuid:nt(),type:Zn}]}],nQ=[{label:"Controlled inputs",icon:"pi pi-fw pi-pencil",items:[{label:"Countries",icon:"pi pi-fw pi-align-left",element:"country",schema:ZC,uuid:nt(),type:Zn,toolTip:t=>f_(t)},{label:"Dropdown",icon:"pi pi-fw pi-align-left",element:"select",schema:dT,uuid:nt(),type:Zn,toolTip:t=>h_(t)},{label:"Multi Select",icon:"pi pi-fw pi-align-right",element:"multi-select",schema:oT,uuid:nt(),type:Zn,toolTip:t=>p_(t)},{label:"CheckBox",icon:"pi pi-fw pi-align-left",element:"checkbox",schema:JC,uuid:nt(),type:Zn,toolTip:t=>g_(t)},{label:"Radio Button",icon:"pi pi-fw pi-align-left",element:"radio",schema:cT,uuid:nt(),type:Zn,toolTip:t=>h8(t)}]},{label:"Rating Inputs",icon:"pi pi-fw pi-pencil",items:[{label:"Likert Scale",icon:"pi pi-fw pi-trash",element:"likert-scale",schema:sT,uuid:nt(),type:Zn,toolTip:t=>B6(t)},{label:"Slider",icon:"pi pi-fw pi-trash",element:"slider",schema:hT,uuid:nt(),type:Zn,toolTip:t=>DE(t)},{label:"Rating",icon:"pi pi-fw pi-trash",element:"rating",schema:uT,uuid:nt(),type:Zn,toolTip:t=>EE(t)},{label:"Thumbs Up and Down",icon:"pi pi-fw pi-align-left",element:"thumbs",schema:pT,uuid:nt(),type:Zn},{label:"Likert Emoji Scale",icon:"pi pi-fw pi-align-left",element:"likert-emoji-scale",schema:aT,uuid:nt(),type:Zn}]}],rQ=[{label:"Media",icon:"pi pi-fw pi-user",items:[{label:"Image",icon:"pi pi-fw pi-user-plus",element:"image",schema:M9,uuid:nt(),type:Zn},{label:"Video",icon:"pi pi-fw pi-user-minus",element:"video",schema:L9,uuid:nt(),type:Zn},{label:"Quiz",icon:"pi pi-fw pi-trash",element:"quiz",schema:KY,uuid:nt(),type:Zn},{label:"Document",icon:"pi pi-fw pi-trash",element:"document",schema:eT,uuid:nt(),type:Zn}]}],iQ=[{label:"Left",icon:"pi pi-align-left",value:"left"},{label:"Right",icon:"pi pi-align-right",value:"right"}],aQ=[{key:1,language:"English",type:"english"},{key:2,language:"Urdu",type:"urdu"},{key:3,language:"Hindi",type:"hindi"},{key:4,language:"Arabic",type:"arabic"},{key:5,language:"French",type:"french"},{key:6,language:"Italian",type:"italian"},{key:7,language:"Spanish",type:"spanish"}],sQ=[{name:"Bad Script",font:"bad-script"},{name:"Bilbo Swash Caps",font:"bilbo-swash-caps"},{name:"caveat",font:"caveat"},{name:"Covered By Your Grace",font:"covered-by-your-grace"},{name:"Dancing Script",font:"dancing-script"},{name:"Gochi Hand",font:"gochi-hand"},{name:"Great Vibes",font:"great-vibes"},{name:"Handlee",font:"handlee"},{name:"Just Another Hand",font:"just-another-hand"},{name:"Kalam",font:"kalam"},{name:"La Belle Aurore",font:"la-belle-aurore"},{name:"Marck Script",font:"marck-script"},{name:"Nothing You Could Do",font:"nothing-you-could-do"},{name:"Qwigley",font:"qwigley"},{name:"Sacramento",font:"sacramento"},{name:"Shadows Into Light",font:"shadows-into-light"},{name:"Stalemate",font:"stalemate"},{name:"Yellowtail",font:"yellowtail"}],Jm={type:XC,isCoverPage:!1,margin:{left:0,right:0,top:0,bottom:0},isVisible:!0,isHidden:!1,isValid:!1,displayRules:[],title:{english:"Page 1"}},af={type:ta,showSectionHeader:!1,isVisible:!0,isHidden:!1,isValid:!1,showSectionTitle:!1,showSectionSubTitle:!1,heading:{english:"Section header"},subHeadingText:{english:""},isCollapsed:!1},tu={type:bo,isHidden:!1,isValid:!1,isRequired:!1,isCollapsed:!1,showRowTitle:!0,showRowSubTitle:!0,heading:{english:""},subHeadingText:{english:""},rowIsRepeatable:!1,repeatableFields:[],repeatableFieldsData:[],isMinimumEntries:!1,minimumEntries:5,addToListButtonLabel:{english:"Add To List"},reviewerChecklist:[]},Ac={type:ms,isCollapsed:!1},oQ=t=>{let e=t;e={...e,uuid:nt()};const n=e.children.map(r=>({...r,uuid:nt(),children:r.children.map(i=>({...i,uuid:nt(),children:i.children.map(a=>{var s;return{...a,uuid:nt(),...((s=a==null?void 0:a.children)==null?void 0:s.length)>0?{children:a.children.map(l=>{var c;return{...l,uuid:nt(),...((c=l.options)==null?void 0:c.length)>0?{options:l.options.map(u=>({...u,uuid:nt()}))}:{}}})}:{}}})}))}));return e={...e,children:n},e};function lQ(t){return e=>{const n={...Jm,uuid:nt(),title:{english:`Page ${t+1}`},children:[{...af,uuid:nt(),children:[{...tu,uuid:nt(),children:[{...Ac,uuid:nt(),children:[]}]}]}]};e({type:TC,payLoad:n})}}function cQ(t){return e=>{const n=[];for(const[,i]of t.entries())for(const[,a]of i.children.entries())for(const[,s]of a.children.entries())for(const[,l]of s.children.entries())for(const[,c]of l.children.entries())s!=null&&s.rowIsRepeatable||n.push(c);e({type:HC,payLoad:{tableFields:n}})}}function uQ(t,e){return(n,r)=>{const i=t;let a=_t.cloneDeep(i);const{layout:s}=r;a={...a,title:{english:`Page ${(s==null?void 0:s.length)+1}`}},a=oQ(a),n({type:DC,payLoad:{page:a,pageIndex:e}})}}function dQ(t,e){return n=>{n({type:zC,payLoad:{pageIndex:t,page:e}})}}function fQ(t){return e=>{e({type:bC,payLoad:{pageIndex:t}})}}const b_=t=>{let e=t;e={...e,uuid:nt()};const n=e.children.map(r=>({...r,uuid:nt(),children:r.children.map(i=>{var a;return{...i,uuid:nt(),...((a=i==null?void 0:i.children)==null?void 0:a.length)>0?{children:i.children.map(s=>{var l;return{...s,uuid:nt(),...((l=s.options)==null?void 0:l.length)>0?{options:s.options.map(c=>({...c,uuid:nt()}))}:{}}})}:{}}})}));return e={...e,children:n},e};function hQ(t,e){return n=>{n({type:yC,payLoad:{pageIndex:t,sectionIndex:e}})}}function pQ(t){return e=>{const n={...af,uuid:nt(),children:[{...tu,uuid:nt(),children:[{...Ac,uuid:nt(),children:[]}]}]};e({type:EC,payLoad:{pageIndex:t,section:n}})}}function gQ(t,e,n){return r=>{r({type:CC,payLoad:{pageIndex:t,sectionIndex:e,section:n}})}}function mQ(t,e,n){return r=>{const i=t;let a=_t.cloneDeep(i);a=b_(a),r({type:OC,payLoad:{section:a,pageIndex:e,sectionIndex:n}})}}function vQ(t,e){return n=>{const r=t;let i=_t.cloneDeep(r);i=b_(i),n({type:NC,payLoad:{section:i,pageIndex:e}})}}const bQ=t=>{let e=t;e={...e,uuid:nt()};const n=e.children.map(r=>{var i;return{...r,uuid:nt(),...((i=r==null?void 0:r.children)==null?void 0:i.length)>0?{children:r.children.map(a=>{var s;return{...a,uuid:nt(),...((s=a.options)==null?void 0:s.length)>0?{options:a.options.map(l=>({...l,uuid:nt()}))}:{}}})}:{}}});return e={...e,children:n},e};function yQ(t,e,n,r){return i=>{const a=t;let s=_t.cloneDeep(a);s=bQ(s),i({type:FC,payLoad:{row:s,pageIndex:e,sectionIndex:n,rowIndex:r}})}}function AQ(t,e,n,r){return i=>{i({type:N9,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,row:r}})}}function wQ(t,e,n){return r=>{r({type:AC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n}})}}function SQ(t,e){return n=>{const r={...tu,uuid:nt(),isCollapsed:!1,children:[{...Ac,uuid:nt(),children:[]}]};n({type:IC,payLoad:{pageIndex:t,sectionIndex:e,row:r}})}}function xQ(t,e,n,r){return i=>{i({type:LC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,fieldItem:r}})}}const CQ=t=>{var r;let e=t;e={...e,uuid:nt()};const n=((r=e==null?void 0:e.children)==null?void 0:r.length)>0?e.children.map((i,a)=>{var s;return{...i,uuid:nt(),...((s=i.options)==null?void 0:s.length)>0?{options:i.options.map((l,c)=>({...l,uuid:nt()}))}:{}}}):[];return e={...e,children:n},e};function TQ(t,e,n){return r=>{const i={...Ac,uuid:nt(),children:[]};r({type:_C,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,column:i}})}}function EQ(t,e,n,r,i){return a=>{const s=t;let l=_t.cloneDeep(s);l=CQ(l),a({type:PC,payLoad:{column:l,pageIndex:e,sectionIndex:n,rowIndex:r,columnIndex:i}})}}function IQ(t,e,n,r){return i=>{i({type:wC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r}})}}function y_(t,e,n,r){return i=>{i({type:N9,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,row:r}})}}function _Q(t,e,n,r,i){return(a,s)=>{var m,g,v,A;const{layout:l,tableFields:c}=s;let u=(m=l[t])==null?void 0:m.children[e].children[n];const d=(A=(v=(g=l[t])==null?void 0:g.children[e])==null?void 0:v.children[n])==null?void 0:A.children[r].children[i];if((u==null?void 0:u.rowIsRepeatable)===!0){const S=[...u.repeatableFields],x=_t.findIndex(S,function(w){return w.uuid===(d==null?void 0:d.uuid)});S.splice(x,1),u={...u,repeatableFields:S},a(y_(t,e,n,u))}const f=_t.findIndex(c,function(S){return S.uuid===(d==null?void 0:d.uuid)});c.splice(f,1),a({type:SC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i}})}}function DQ(t,e,n,r,i,a){return(s,l)=>{var m,g,v,A;const{layout:c,tableFields:u}=l;let d=(m=c[t])==null?void 0:m.children[e].children[n];if((d==null?void 0:d.rowIsRepeatable)===!0){const S=(A=(v=(g=c[t])==null?void 0:g.children[e])==null?void 0:v.children[n])==null?void 0:A.children[r].children[i],x=[...d.repeatableFields],w=_t.findIndex(x,function(T){return T.uuid===(S==null?void 0:S.uuid)});w===-1?x.splice(i,0,a):x[w]=a,x[w]=a,d={...d,repeatableFields:x},s(y_(t,e,n,d))}const f={type:xC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,field:a}},h=u.findIndex(S=>S.uuid===a.uuid);h>=0&&(u[h]=a),s(f)}}function OQ(t,e,n,r,i,a){return s=>{var d;const l=t;let c=_t.cloneDeep(l);if(c={...c,uuid:nt()},c!=null&&c.options&&((d=c==null?void 0:c.options)==null?void 0:d.length)>0){const f=c==null?void 0:c.options.map(h=>({...h,uuid:nt()}));c={...c,options:f}}s({type:kC,payLoad:{field:c,pageIndex:e,sectionIndex:n,rowIndex:r,columnIndex:i,fieldIndex:a}})}}function NQ(t,e,n,r,i,a,s,l){return c=>{c({type:BC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,ruleIndex:a,conditionIndex:s,field:l}})}}function FQ(t,e,n,r,i,a,s,l){return c=>{c({type:VC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,gridColumnIndex:s,gridRowIndex:a,field:l}})}}function PQ(t,e,n,r,i,a,s,l,c){return u=>{u({type:$C,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,gridRowIndex:a,gridColumnIndex:s,fieldChildrenIndex:l,field:c}})}}function kQ(t,e,n,r,i,a,s,l){return c=>{c({type:jC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,gridRowIndex:a,gridColumnIndex:s,fieldChildrenIndex:l}})}}function MQ(t,e,n,r,i,a,s,l,c){return u=>{u({type:UC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,ruleIndex:a,conditionIndex:s,inlineFieldIndex:l,field:c}})}}function LQ(t,e,n,r,i,a,s,l){return c=>{c({type:qC,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,ruleIndex:a,conditionIndex:s,inlineFieldIndex:l}})}}function BQ(t){return e=>{e({type:$1,payLoad:{formSchema:t}})}}function VQ(t){return e=>{e({type:$1,payLoad:{layout:t}})}}function UQ(t){return(e,n)=>{const{languages:r}=n,i={type:$1,payLoad:{languages:[...r,t]}};e(i)}}function qQ(t){return(e,n)=>{const{languages:r}=n,i=_t.findIndex(r,l=>l.key===t.key),a=[...r];a.splice(i,1),e({type:$1,payLoad:{languages:a}})}}function $Q(t){return e=>{const n={type:$1,payLoad:{userSelectedLanguage:t.value}};e(n)}}function jQ(t){return e=>{e({type:cm,payLoad:{formType:t}})}}function zQ(t){return e=>{e({type:cm,payLoad:t})}}function HQ(t){return e=>{e({type:cm,payLoad:{editing_by:t}})}}function YQ(){return t=>{t({type:MC,payLoad:null})}}const v8={loading:!1,intro:"",editing_by:0,isChangesSaved:!1,enableReviewTask:!1,enableAutoSave:!1,enableAutoSaveBuilderSetting:!1,surveyQuestionSlide:!1,enableFormFluid:!0,showConditionalFields:!0,isAdvanceView:!1,models:[],fieldMappings:[],version_name:null,showIntroTab:!1,published_status:!1,formType:null,randomiseQuestions:!1,randomiseAnswers:!1,enableNoOfAssessmentQuestions:!1,noOfAssessmentQuestions:null,tableFields:[],tableConfiguration:{stripedRows:!1,gridLines:!1,flexScroll:!1,isResponsive:!1,rowReorder:!1},builderTemplateName:"",quizConfiguration:{quizPassMark:75,quizTimeLimit:2,quizMaxAttempts:99,quizSequentialAnswer:0,isAllCorrectMandatory:!0,quizRandomiseQuestions:1,quizUniqueAnswersPerAttempt:"1"},header:[],languages:[{key:1,language:"English",type:"english"}],userSelectedLanguage:{key:1,language:"English",type:"english"},layout:[{uuid:nt(),...Jm,children:[{uuid:nt(),...af,children:[{uuid:nt(),...tu,children:[{uuid:nt(),...Ac,children:[]}]}]}]}],conditionalTabsRules:[],conditionalSectionsRules:[]},KQ=(t=v8,e)=>{var n,r;switch(e.type){case _Y:return{...t,...e.payLoad};case IY:return{...t,...e.payLoad};case MC:return{...t,...v8};case $1:return{...t,...e.payLoad};case cm:return{...t,...e.payLoad};case bC:{const{pageIndex:i}=e.payLoad;return{...t,layout:t.layout.filter((a,s)=>s!==i)}}case TC:return{...t,layout:[...t.layout,e.payLoad]};case EC:{const{pageIndex:i,section:a}=e.payLoad,s=[...t.layout];return s[i].children=[...s[i].children,a],{...t,layout:s}}case LC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,fieldItem:l}=e.payLoad,c=[...t.layout],u=Array.isArray((n=c[i].children[a].children[s])==null?void 0:n.repeatableFields)?[...((r=c[i].children[a].children[s])==null?void 0:r.repeatableFields)||[],l]:l?[l]:[];return c[i].children[a].children[s]={...c[i].children[a].children[s],repeatableFields:u},{...t,layout:c}}case DY:{const{fieldItem:i}=e.payLoad;let a=[...t.tableFields];return a=[...a,i],{...t,tableFields:a}}case HC:return{...t,...e.payLoad};case IC:{const{pageIndex:i,sectionIndex:a,row:s}=e.payLoad,l=[...t.layout];return l[i].children[a].children=[...l[i].children[a].children,s],{...t,layout:l}}case _C:{const{pageIndex:i,sectionIndex:a,rowIndex:s,column:l}=e.payLoad,c=[...t.layout];return c[i].children[a].children[s].children=[...c[i].children[a].children[s].children,l],{...t,layout:c}}case BC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,ruleIndex:u,conditionIndex:d,field:f}=e.payLoad,h=[...t.layout];return h[i].children[a].children[s].children[l].children[c].inlineConditionalRules.rules[u].conditions[d].children=[...h[i].children[a].children[s].children[l].children[c].inlineConditionalRules.rules[u].conditions[d].children,f],{...t,layout:h}}case VC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,gridRowIndex:u,gridColumnIndex:d,field:f}=e.payLoad,h=[...t.layout];return h[i].children[a].children[s].children[l].children[c].children.push({[`${u}-${d}`]:f}),{...t,layout:h}}case UC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,ruleIndex:u,conditionIndex:d,inlineFieldIndex:f,field:h}=e.payLoad,m=[...t.layout];return m[i].children[a].children[s].children[l].children[c].inlineConditionalRules.rules[u].conditions[d].children[f]=h,{...t,layout:m}}case $C:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,gridRowIndex:u,gridColumnIndex:d,fieldChildrenIndex:f,field:h}=e.payLoad,m=[...t.layout];return m[i].children[a].children[s].children[l].children[c].children[f]={[`${u}-${d}`]:h},{...t,layout:m}}case qC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,ruleIndex:u,conditionIndex:d,inlineFieldIndex:f}=e.payLoad,h=[...t.layout];return h[i].children[a].children[s].children[l].children[c].inlineConditionalRules.rules[u].conditions[d].children.splice(f,1),{...t,layout:h}}case jC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,fieldChildrenIndex:u}=e.payLoad,d=[...t.layout];return d[i].children[a].children[s].children[l].children[c].children.splice(u,1),{...t,layout:d}}case yC:{const{pageIndex:i,sectionIndex:a}=e.payLoad,s=[...t.layout];return s[i].children.splice(a,1),{...t,layout:s}}case AC:{const{pageIndex:i,sectionIndex:a,rowIndex:s}=e.payLoad,l=[...t.layout];return l[i].children[a].children.splice(s,1),{...t,layout:l}}case wC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l}=e.payLoad,c=[...t.layout];return c[i].children[a].children[s].children.splice(l,1),{...t,layout:c}}case SC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c}=e.payLoad,u=[...t.layout];return u[i].children[a].children[s].children[l].children.splice(c,1),{...t,layout:u}}case xC:{const{pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,fieldIndex:c,field:u}=e.payLoad,d=[...t.layout];return d[i].children[a].children[s].children[l].children[c]=u,{...t,layout:d}}case CC:{const{pageIndex:i,sectionIndex:a,section:s}=e.payLoad,l=[...t.layout];return l[i].children[a]=s,{...t,layout:l}}case N9:{const{pageIndex:i,sectionIndex:a,rowIndex:s,row:l}=e.payLoad,c=[...t.layout];return c[i].children[a].children[s]=l,{...t,layout:c}}case zC:{const{pageIndex:i,page:a}=e.payLoad,s=[...t.layout];return s[i]=a,{...t,layout:s}}case DC:{const{page:i,pageIndex:a}=e.payLoad,s=[...t.layout];return s.splice(a+1,0,i),{...t,layout:s}}case OC:{const{section:i,pageIndex:a,sectionIndex:s}=e.payLoad,l=[...t.layout];return l[a].children.splice(s+1,0,i),{...t,layout:l}}case NC:{const{section:i,pageIndex:a}=e.payLoad,s=[...t.layout];return s[a].children.push(i),{...t,layout:s}}case FC:{const{row:i,pageIndex:a,sectionIndex:s,rowIndex:l}=e.payLoad,c=[...t.layout];return c[a].children[s].children.splice(l+1,0,i),{...t,layout:c}}case PC:{const{column:i,pageIndex:a,sectionIndex:s,rowIndex:l,columnIndex:c}=e.payLoad,u=[...t.layout];return u[a].children[s].children[l].children.splice(c+1,0,i),{...t,layout:u}}case kC:{const{field:i,pageIndex:a,sectionIndex:s,rowIndex:l,columnIndex:c,fieldIndex:u}=e.payLoad,d=[...t.layout];return d[a].children[s].children[l].children[c].children.splice(u+1,0,i),{...t,layout:d}}}return t},A_=N.createContext({dragDropManager:void 0});function nu(t){"@babel/helpers - typeof";return nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nu(t)}function XQ(t,e){if(nu(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(nu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function GQ(t){var e=XQ(t,"string");return nu(e)=="symbol"?e:e+""}function RQ(t,e,n){return(e=GQ(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function w_(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function S_(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?w_(Object(n),!0).forEach(function(r){RQ(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):w_(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ul(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var x_=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),b8=function(){return Math.random().toString(36).substring(7).split("").join(".")},C_={INIT:"@@redux/INIT"+b8(),REPLACE:"@@redux/REPLACE"+b8(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+b8()}};function WQ(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function QQ(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(eJ(t))return"date";if(ZQ(t))return"error";var n=JQ(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function JQ(t){return typeof t.constructor=="function"?t.constructor.name:null}function ZQ(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function eJ(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function sf(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=QQ(t)),e}function T_(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Ul(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?Ul(1):"Expected the enhancer to be a function. Instead, received: '"+sf(n)+"'");return n(T_)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?Ul(2):"Expected the root reducer to be a function. Instead, received: '"+sf(t)+"'");var i=t,a=e,s=[],l=s,c=!1;function u(){l===s&&(l=s.slice())}function d(){if(c)throw new Error(process.env.NODE_ENV==="production"?Ul(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return a}function f(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?Ul(4):"Expected the listener to be a function. Instead, received: '"+sf(v)+"'");if(c)throw new Error(process.env.NODE_ENV==="production"?Ul(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var A=!0;return u(),l.push(v),function(){if(A){if(c)throw new Error(process.env.NODE_ENV==="production"?Ul(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");A=!1,u();var x=l.indexOf(v);l.splice(x,1),s=null}}}function h(v){if(!WQ(v))throw new Error(process.env.NODE_ENV==="production"?Ul(7):"Actions must be plain objects. Instead, the actual type was: '"+sf(v)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof v.type>"u")throw new Error(process.env.NODE_ENV==="production"?Ul(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(c)throw new Error(process.env.NODE_ENV==="production"?Ul(9):"Reducers may not dispatch actions.");try{c=!0,a=i(a,v)}finally{c=!1}for(var A=s=l,S=0;S<A.length;S++){var x=A[S];x()}return v}function m(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?Ul(10):"Expected the nextReducer to be a function. Instead, received: '"+sf(v));i=v,h({type:C_.REPLACE})}function g(){var v,A=f;return v={subscribe:function(x){if(typeof x!="object"||x===null)throw new Error(process.env.NODE_ENV==="production"?Ul(11):"Expected the observer to be an object. Instead, received: '"+sf(x)+"'");function w(){x.next&&x.next(d())}w();var T=A(w);return{unsubscribe:T}}},v[x_]=function(){return this},v}return h({type:C_.INIT}),r={dispatch:h,subscribe:f,getState:d,replaceReducer:m},r[x_]=g,r}function qr(t,e,...n){if(tJ()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let r;if(e===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;r=new Error(e.replace(/%s/g,function(){return n[i++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function tJ(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function nJ(t,e,n){return e.split(".").reduce((r,i)=>r&&r[i]?r[i]:n||null,t)}function rJ(t,e){return t.filter(n=>n!==e)}function E_(t){return typeof t=="object"}function iJ(t,e){const n=new Map,r=a=>{n.set(a,n.has(a)?n.get(a)+1:1)};t.forEach(r),e.forEach(r);const i=[];return n.forEach((a,s)=>{a===1&&i.push(s)}),i}function aJ(t,e){return t.filter(n=>e.indexOf(n)>-1)}const y8="dnd-core/INIT_COORDS",Zm="dnd-core/BEGIN_DRAG",A8="dnd-core/PUBLISH_DRAG_SOURCE",e3="dnd-core/HOVER",t3="dnd-core/DROP",n3="dnd-core/END_DRAG";function I_(t,e){return{type:y8,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const sJ={type:y8,payload:{clientOffset:null,sourceClientOffset:null}};function oJ(t){return function(n=[],r={publishSource:!0}){const{publishSource:i=!0,clientOffset:a,getSourceClientOffset:s}=r,l=t.getMonitor(),c=t.getRegistry();t.dispatch(I_(a)),lJ(n,l,c);const u=dJ(n,l);if(u==null){t.dispatch(sJ);return}let d=null;if(a){if(!s)throw new Error("getSourceClientOffset must be defined");cJ(s),d=s(u)}t.dispatch(I_(a,d));const h=c.getSource(u).beginDrag(l,u);if(h==null)return;uJ(h),c.pinSource(u);const m=c.getSourceType(u);return{type:Zm,payload:{itemType:m,item:h,sourceId:u,clientOffset:a||null,sourceClientOffset:d||null,isSourcePublic:!!i}}}}function lJ(t,e,n){qr(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){qr(n.getSource(r),"Expected sourceIds to be registered.")})}function cJ(t){qr(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function uJ(t){qr(E_(t),"Item must be an object.")}function dJ(t,e){let n=null;for(let r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function fJ(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function hJ(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){fJ(t,i,n[i])})}return t}function pJ(t){return function(n={}){const r=t.getMonitor(),i=t.getRegistry();gJ(r),bJ(r).forEach((s,l)=>{const c=mJ(s,l,i,r),u={type:t3,payload:{dropResult:hJ({},n,c)}};t.dispatch(u)})}}function gJ(t){qr(t.isDragging(),"Cannot call drop while not dragging."),qr(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function mJ(t,e,n,r){const i=n.getTarget(t);let a=i?i.drop(r,t):void 0;return vJ(a),typeof a>"u"&&(a=e===0?{}:r.getDropResult()),a}function vJ(t){qr(typeof t>"u"||E_(t),"Drop result must either be an object or undefined.")}function bJ(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function yJ(t){return function(){const n=t.getMonitor(),r=t.getRegistry();AJ(n);const i=n.getSourceId();return i!=null&&(r.getSource(i,!0).endDrag(n,i),r.unpinSource()),{type:n3}}}function AJ(t){qr(t.isDragging(),"Cannot call endDrag while not dragging.")}function w8(t,e){return e===null?t===null:Array.isArray(t)?t.some(n=>n===e):t===e}function wJ(t){return function(n,{clientOffset:r}={}){SJ(n);const i=n.slice(0),a=t.getMonitor(),s=t.getRegistry(),l=a.getItemType();return CJ(i,s,l),xJ(i,a,s),TJ(i,a,s),{type:e3,payload:{targetIds:i,clientOffset:r||null}}}}function SJ(t){qr(Array.isArray(t),"Expected targetIds to be an array.")}function xJ(t,e,n){qr(e.isDragging(),"Cannot call hover while not dragging."),qr(!e.didDrop(),"Cannot call hover after drop.");for(let r=0;r<t.length;r++){const i=t[r];qr(t.lastIndexOf(i)===r,"Expected targetIds to be unique in the passed array.");const a=n.getTarget(i);qr(a,"Expected targetIds to be registered.")}}function CJ(t,e,n){for(let r=t.length-1;r>=0;r--){const i=t[r],a=e.getTargetType(i);w8(a,n)||t.splice(r,1)}}function TJ(t,e,n){t.forEach(function(r){n.getTarget(r).hover(e,r)})}function EJ(t){return function(){if(t.getMonitor().isDragging())return{type:A8}}}function IJ(t){return{beginDrag:oJ(t),publishDragSource:EJ(t),hover:wJ(t),drop:pJ(t),endDrag:yJ(t)}}class _J{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:n}=this.store;function r(a){return(...s)=>{const l=a.apply(e,s);typeof l<"u"&&n(l)}}const i=IJ(this);return Object.keys(i).reduce((a,s)=>{const l=i[s];return a[s]=r(l),a},{})}dispatch(e){this.store.dispatch(e)}constructor(e,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}}function DJ(t,e){return{x:t.x+e.x,y:t.y+e.y}}function __(t,e){return{x:t.x-e.x,y:t.y-e.y}}function OJ(t){const{clientOffset:e,initialClientOffset:n,initialSourceClientOffset:r}=t;return!e||!n||!r?null:__(DJ(e,r),n)}function NJ(t){const{clientOffset:e,initialClientOffset:n}=t;return!e||!n?null:__(e,n)}const Ep=[],S8=[];Ep.__IS_NONE__=!0,S8.__IS_ALL__=!0;function FJ(t,e){return t===Ep?!1:t===S8||typeof e>"u"?!0:aJ(e,t).length>0}class PJ{subscribeToStateChange(e,n={}){const{handlerIds:r}=n;qr(typeof e=="function","listener must be a function."),qr(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const a=()=>{const s=this.store.getState(),l=s.stateId;try{l===i||l===i+1&&!FJ(s.dirtyHandlerIds,r)||e()}finally{i=l}};return this.store.subscribe(a)}subscribeToOffsetChange(e){qr(typeof e=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const i=this.store.getState().dragOffset;i!==n&&(n=i,e())};return this.store.subscribe(r)}canDragSource(e){if(!e)return!1;const n=this.registry.getSource(e);return qr(n,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:n.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const n=this.registry.getTarget(e);if(qr(n,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(e),i=this.getItemType();return w8(r,i)&&n.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const n=this.registry.getSource(e,!0);if(qr(n,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(e),i=this.getItemType();return r!==i?!1:n.isDragging(this,e)}isOverTarget(e,n={shallow:!1}){if(!e)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const i=this.registry.getTargetType(e),a=this.getItemType();if(a&&!w8(i,a))return!1;const s=this.getTargetIds();if(!s.length)return!1;const l=s.indexOf(e);return r?l===s.length-1:l>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return OJ(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return NJ(this.store.getState().dragOffset)}constructor(e,n){this.store=e,this.registry=n}}const D_=typeof global<"u"?global:self,O_=D_.MutationObserver||D_.WebKitMutationObserver;function N_(t){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),t()}}}function kJ(t){let e=1;const n=new O_(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const MJ=typeof O_=="function"?kJ:N_;class LJ{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,i=e.length-this.index;r<i;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=MJ(this.flush),this.requestErrorThrow=N_(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class BJ{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class VJ{create(e){const n=this.freeTasks,r=n.length?n.pop():new BJ(this.onError,i=>n[n.length]=i);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const F_=new LJ,UJ=new VJ(F_.registerPendingError);function qJ(t){F_.enqueueTask(UJ.create(t))}const x8="dnd-core/ADD_SOURCE",C8="dnd-core/ADD_TARGET",T8="dnd-core/REMOVE_SOURCE",r3="dnd-core/REMOVE_TARGET";function $J(t){return{type:x8,payload:{sourceId:t}}}function jJ(t){return{type:C8,payload:{targetId:t}}}function zJ(t){return{type:T8,payload:{sourceId:t}}}function HJ(t){return{type:r3,payload:{targetId:t}}}function YJ(t){qr(typeof t.canDrag=="function","Expected canDrag to be a function."),qr(typeof t.beginDrag=="function","Expected beginDrag to be a function."),qr(typeof t.endDrag=="function","Expected endDrag to be a function.")}function KJ(t){qr(typeof t.canDrop=="function","Expected canDrop to be a function."),qr(typeof t.hover=="function","Expected hover to be a function."),qr(typeof t.drop=="function","Expected beginDrag to be a function.")}function E8(t,e){if(e&&Array.isArray(t)){t.forEach(n=>E8(n,!1));return}qr(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var ql;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(ql||(ql={}));let XJ=0;function GJ(){return XJ++}function RJ(t){const e=GJ().toString();switch(t){case ql.SOURCE:return`S${e}`;case ql.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function P_(t){switch(t[0]){case"S":return ql.SOURCE;case"T":return ql.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function k_(t,e){const n=t.entries();let r=!1;do{const{done:i,value:[,a]}=n.next();if(a===e)return!0;r=!!i}while(!r);return!1}class WJ{addSource(e,n){E8(e),YJ(n);const r=this.addHandler(ql.SOURCE,e,n);return this.store.dispatch($J(r)),r}addTarget(e,n){E8(e,!0),KJ(n);const r=this.addHandler(ql.TARGET,e,n);return this.store.dispatch(jJ(r)),r}containsHandler(e){return k_(this.dragSources,e)||k_(this.dropTargets,e)}getSource(e,n=!1){return qr(this.isSourceId(e),"Expected a valid source ID."),n&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return qr(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return qr(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return qr(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return P_(e)===ql.SOURCE}isTargetId(e){return P_(e)===ql.TARGET}removeSource(e){qr(this.getSource(e),"Expected an existing source."),this.store.dispatch(zJ(e)),qJ(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){qr(this.getTarget(e),"Expected an existing target."),this.store.dispatch(HJ(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const n=this.getSource(e);qr(n,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=n}unpinSource(){qr(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,n,r){const i=RJ(e);return this.types.set(i,n),e===ql.SOURCE?this.dragSources.set(i,r):e===ql.TARGET&&this.dropTargets.set(i,r),i}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const QJ=(t,e)=>t===e;function JJ(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function ZJ(t,e,n=QJ){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function eZ(t=Ep,e){switch(e.type){case e3:break;case x8:case C8:case r3:case T8:return Ep;case Zm:case A8:case n3:case t3:default:return S8}const{targetIds:n=[],prevTargetIds:r=[]}=e.payload,i=iJ(n,r);if(!(i.length>0||!ZJ(n,r)))return Ep;const s=r[r.length-1],l=n[n.length-1];return s!==l&&(s&&i.push(s),l&&i.push(l)),i}function tZ(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nZ(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){tZ(t,i,n[i])})}return t}const M_={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function rZ(t=M_,e){const{payload:n}=e;switch(e.type){case y8:case Zm:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case e3:return JJ(t.clientOffset,n.clientOffset)?t:nZ({},t,{clientOffset:n.clientOffset});case n3:case t3:return M_;default:return t}}function iZ(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function of(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){iZ(t,i,n[i])})}return t}const aZ={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function sZ(t=aZ,e){const{payload:n}=e;switch(e.type){case Zm:return of({},t,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case A8:return of({},t,{isSourcePublic:!0});case e3:return of({},t,{targetIds:n.targetIds});case r3:return t.targetIds.indexOf(n.targetId)===-1?t:of({},t,{targetIds:rJ(t.targetIds,n.targetId)});case t3:return of({},t,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case n3:return of({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function oZ(t=0,e){switch(e.type){case x8:case C8:return t+1;case T8:case r3:return t-1;default:return t}}function lZ(t=0){return t+1}function cZ(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function uZ(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){cZ(t,i,n[i])})}return t}function dZ(t={},e){return{dirtyHandlerIds:eZ(t.dirtyHandlerIds,{type:e.type,payload:uZ({},e.payload,{prevTargetIds:nJ(t,"dragOperation.targetIds",[])})}),dragOffset:rZ(t.dragOffset,e),refCount:oZ(t.refCount,e),dragOperation:sZ(t.dragOperation,e),stateId:lZ(t.stateId)}}function fZ(t,e=void 0,n={},r=!1){const i=hZ(r),a=new PJ(i,new WJ(i)),s=new _J(i,a),l=t(s,e,n);return s.receiveBackend(l),s}function hZ(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return T_(dZ,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function pZ(t,e){if(t==null)return{};var n=gZ(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function gZ(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}let L_=0;const i3=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var lf=N.memo(function(e){var{children:n}=e,r=pZ(e,["children"]);const[i,a]=mZ(r);return N.useEffect(()=>{if(a){const s=B_();return++L_,()=>{--L_===0&&(s[i3]=null)}}},[]),o.jsx(A_.Provider,{value:i,children:n})});function mZ(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=vZ(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function vZ(t,e=B_(),n,r){const i=e;return i[i3]||(i[i3]={dragDropManager:fZ(t,e,n,r)}),i[i3]}function B_(){return typeof global<"u"?global:window}var V_=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(a=Object.keys(e),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var s=a[i];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n};const bZ=gs(V_),$0=typeof window<"u"?N.useLayoutEffect:N.useEffect;function yZ(t,e,n){const[r,i]=N.useState(()=>e(t)),a=N.useCallback(()=>{const s=e(t);bZ(r,s)||(i(s),n&&n())},[r,t,n]);return $0(a),[r,a]}function AZ(t,e,n){const[r,i]=yZ(t,e,n);return $0(function(){const s=t.getHandlerId();if(s!=null)return t.subscribeToStateChange(i,{handlerIds:[s]})},[t,i]),r}function U_(t,e,n){return AZ(e,t||(()=>({})),()=>n.reconnect())}function q_(t,e){const n=[...e||[]];return e==null&&typeof t!="function"&&n.push(t),N.useMemo(()=>typeof t=="function"?t():t,n)}function wZ(t){return N.useMemo(()=>t.hooks.dragSource(),[t])}function SZ(t){return N.useMemo(()=>t.hooks.dragPreview(),[t])}let I8=!1,_8=!1;class xZ{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){qr(!I8,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return I8=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{I8=!1}}isDragging(){if(!this.sourceId)return!1;qr(!_8,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return _8=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{_8=!1}}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,n){return this.internalMonitor.isOverTarget(e,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let D8=!1;class CZ{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}canDrop(){if(!this.targetId)return!1;qr(!D8,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return D8=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{D8=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function TZ(t,e,n){const r=n.getRegistry(),i=r.addTarget(t,e);return[i,()=>r.removeTarget(i)]}function EZ(t,e,n){const r=n.getRegistry(),i=r.addSource(t,e);return[i,()=>r.removeSource(i)]}function O8(t,e,n,r){let i=n?n.call(r,t,e):void 0;if(i!==void 0)return!!i;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const a=Object.keys(t),s=Object.keys(e);if(a.length!==s.length)return!1;const l=Object.prototype.hasOwnProperty.bind(e);for(let c=0;c<a.length;c++){const u=a[c];if(!l(u))return!1;const d=t[u],f=e[u];if(i=n?n.call(r,d,f,u):void 0,i===!1||i===void 0&&d!==f)return!1}return!0}function N8(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function IZ(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function _Z(t){return(e=null,n=null)=>{if(!N.isValidElement(e)){const a=e;return t(a,n),a}const r=e;return IZ(r),DZ(r,n?a=>t(a,n):t)}}function $_(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{const i=_Z(r);e[n]=()=>i}}),e}function j_(t,e){typeof t=="function"?t(e):t.current=e}function DZ(t,e){const n=t.ref;return qr(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?N.cloneElement(t,{ref:r=>{j_(n,r),j_(e,r)}}):N.cloneElement(t,{ref:e})}class OZ{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?e?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),n):(this.lastConnectedDragSource=e,n):n}reconnectDragPreview(e=!1){const n=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!O8(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!O8(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=$_({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,N8(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,N8(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class NZ{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!O8(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=$_({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,N8(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function cf(){const{dragDropManager:t}=N.useContext(A_);return qr(t!=null,"Expected drag drop context"),t}function FZ(t,e){const n=cf(),r=N.useMemo(()=>new OZ(n.getBackend()),[n]);return $0(()=>(r.dragSourceOptions=t||null,r.reconnect(),()=>r.disconnectDragSource()),[r,t]),$0(()=>(r.dragPreviewOptions=e||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,e]),r}function PZ(){const t=cf();return N.useMemo(()=>new xZ(t),[t])}class kZ{beginDrag(){const e=this.spec,n=this.monitor;let r=null;return typeof e.item=="object"?r=e.item:typeof e.item=="function"?r=e.item(n):r={},r??null}canDrag(){const e=this.spec,n=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(n):!0}isDragging(e,n){const r=this.spec,i=this.monitor,{isDragging:a}=r;return a?a(i):n===e.getSourceId()}endDrag(){const e=this.spec,n=this.monitor,r=this.connector,{end:i}=e;i&&i(n.getItem(),n),r.reconnect()}constructor(e,n,r){this.spec=e,this.monitor=n,this.connector=r}}function MZ(t,e,n){const r=N.useMemo(()=>new kZ(t,e,n),[e,n]);return N.useEffect(()=>{r.spec=t},[t]),r}function LZ(t){return N.useMemo(()=>{const e=t.type;return qr(e!=null,"spec.type must be defined"),e},[t])}function BZ(t,e,n){const r=cf(),i=MZ(t,e,n),a=LZ(t);$0(function(){if(a!=null){const[l,c]=EZ(a,i,r);return e.receiveHandlerId(l),n.receiveHandlerId(l),c}},[r,e,n,i,a])}function Qi(t,e){const n=q_(t,e);qr(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=PZ(),i=FZ(n.options,n.previewOptions);return BZ(n,r,i),[U_(n.collect,r,i),wZ(i),SZ(i)]}function VZ(t){return N.useMemo(()=>t.hooks.dropTarget(),[t])}function UZ(t){const e=cf(),n=N.useMemo(()=>new NZ(e.getBackend()),[e]);return $0(()=>(n.dropTargetOptions=t||null,n.reconnect(),()=>n.disconnectDropTarget()),[t]),n}function qZ(){const t=cf();return N.useMemo(()=>new CZ(t),[t])}function $Z(t){const{accept:e}=t;return N.useMemo(()=>(qr(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class jZ{canDrop(){const e=this.spec,n=this.monitor;return e.canDrop?e.canDrop(n.getItem(),n):!0}hover(){const e=this.spec,n=this.monitor;e.hover&&e.hover(n.getItem(),n)}drop(){const e=this.spec,n=this.monitor;if(e.drop)return e.drop(n.getItem(),n)}constructor(e,n){this.spec=e,this.monitor=n}}function zZ(t,e){const n=N.useMemo(()=>new jZ(t,e),[e]);return N.useEffect(()=>{n.spec=t},[t]),n}function HZ(t,e,n){const r=cf(),i=zZ(t,e),a=$Z(t);$0(function(){const[l,c]=TZ(a,i,r);return e.receiveHandlerId(l),n.receiveHandlerId(l),c},[r,e,i,n,a.map(s=>s.toString()).join("|")])}function YZ(t,e){const n=q_(t,e),r=qZ(),i=UZ(n.options);return HZ(n,r,i),[U_(n.collect,r,i),VZ(i)]}function z_(t){let e=null;return()=>(e==null&&(e=t()),e)}function KZ(t,e){return t.filter(n=>n!==e)}function XZ(t,e){const n=new Set,r=a=>n.add(a);t.forEach(r),e.forEach(r);const i=[];return n.forEach(a=>i.push(a)),i}class GZ{enter(e){const n=this.entered.length,r=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(e));return this.entered=XZ(this.entered.filter(r),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=KZ(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class RZ{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const i=this.config.exposeProperties[r];i!=null&&(n[r]={value:i(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,n){return n===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const H_="__NATIVE_FILE__",Y_="__NATIVE_URL__",K_="__NATIVE_TEXT__",X_="__NATIVE_HTML__",G_=Object.freeze(Object.defineProperty({__proto__:null,FILE:H_,HTML:X_,TEXT:K_,URL:Y_},Symbol.toStringTag,{value:"Module"}));function F8(t,e,n){const r=e.reduce((i,a)=>i||t.getData(a),"");return r??n}const P8={[H_]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[X_]:{exposeProperties:{html:(t,e)=>F8(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[Y_]:{exposeProperties:{urls:(t,e)=>F8(t,e,"").split(`
1597
- `),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[K_]:{exposeProperties:{text:(t,e)=>F8(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function WZ(t,e){const n=P8[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new RZ(n);return r.loadDataTransfer(e),r}function k8(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(P8).filter(n=>{const r=P8[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(i=>e.indexOf(i)>-1):!1})[0]||null}const QZ=z_(()=>/firefox/i.test(navigator.userAgent)),R_=z_(()=>!!window.safari);class W_{interpolate(e){const{xs:n,ys:r,c1s:i,c2s:a,c3s:s}=this;let l=n.length-1;if(e===n[l])return r[l];let c=0,u=s.length-1,d;for(;c<=u;){d=Math.floor(.5*(c+u));const m=n[d];if(m<e)c=d+1;else if(m>e)u=d-1;else return r[d]}l=Math.max(0,u);const f=e-n[l],h=f*f;return r[l]+i[l]*f+a[l]*h+s[l]*f*h}constructor(e,n){const{length:r}=e,i=[];for(let m=0;m<r;m++)i.push(m);i.sort((m,g)=>e[m]<e[g]?-1:1);const a=[],s=[];let l,c;for(let m=0;m<r-1;m++)l=e[m+1]-e[m],c=n[m+1]-n[m],a.push(l),s.push(c/l);const u=[s[0]];for(let m=0;m<a.length-1;m++){const g=s[m],v=s[m+1];if(g*v<=0)u.push(0);else{l=a[m];const A=a[m+1],S=l+A;u.push(3*S/((S+A)/g+(S+l)/v))}}u.push(s[s.length-1]);const d=[],f=[];let h;for(let m=0;m<u.length-1;m++){h=s[m];const g=u[m],v=1/a[m],A=g+u[m+1]-h-h;d.push((h-g-A)*v),f.push(A*v*v)}this.xs=e,this.ys=n,this.c1s=u,this.c2s=d,this.c3s=f}}const JZ=1;function Q_(t){const e=t.nodeType===JZ?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function a3(t){return{x:t.clientX,y:t.clientY}}function ZZ(t){var e;return t.nodeName==="IMG"&&(QZ()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function eee(t,e,n,r){let i=t?e.width:n,a=t?e.height:r;return R_()&&t&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}function tee(t,e,n,r,i){const a=ZZ(e),l=Q_(a?t:e),c={x:n.x-l.x,y:n.y-l.y},{offsetWidth:u,offsetHeight:d}=t,{anchorX:f,anchorY:h}=r,{dragPreviewWidth:m,dragPreviewHeight:g}=eee(a,e,u,d),v=()=>{let _=new W_([0,.5,1],[c.y,c.y/d*g,c.y+g-d]).interpolate(h);return R_()&&a&&(_+=(window.devicePixelRatio-1)*g),_},A=()=>new W_([0,.5,1],[c.x,c.x/u*m,c.x+m-u]).interpolate(f),{offsetX:S,offsetY:x}=i,w=S===0||S,T=x===0||x;return{x:w?S:A(),y:T?x:v()}}class nee{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}}function ree(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function J_(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){ree(t,i,n[i])})}return t}class iee{profile(){var e,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,n,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,r){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,r);const i=s=>this.handleDragStart(s,e),a=s=>this.handleSelectStart(s);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",i),n.addEventListener("selectstart",a),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",i),n.removeEventListener("selectstart",a),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const r=s=>this.handleDragEnter(s,e),i=s=>this.handleDragOver(s,e),a=s=>this.handleDrop(s,e);return n.addEventListener("dragenter",r),n.addEventListener("dragover",i),n.addEventListener("drop",a),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",i),n.removeEventListener("drop",a)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return J_({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return J_({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(G_).some(n=>G_[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=WZ(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const a=this.sourceNodes.get(i);return a&&Q_(a)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:a}=this;this.dragStartSourceIds=null;const s=a3(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(a||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:s});const{dataTransfer:l}=i,c=k8(l);if(this.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){const d=this.monitor.getSourceId(),f=this.sourceNodes.get(d),h=this.sourcePreviewNodes.get(d)||f;if(h){const{anchorX:m,anchorY:g,offsetX:v,offsetY:A}=this.getCurrentSourcePreviewNodeOptions(),w=tee(f,h,s,{anchorX:m,anchorY:g},{offsetX:v,offsetY:A});l.setDragImage(h,w.x,w.y)}}try{l==null||l.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:u}=this.getCurrentSourcePreviewNodeOptions();u?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(c)this.beginDragNativeItem(c);else{if(l&&!l.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var a;(a=this.currentNativeSource)===null||a===void 0||a.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:l}=i,c=k8(l);c&&this.beginDragNativeItem(c,l)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:a}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,a.length>0&&this.actions.hover(a,{clientOffset:a3(i)}),a.some(l=>this.monitor.canDropOnTarget(l))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var a;(a=this.currentNativeSource)===null||a===void 0||a.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:a}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=a3(i),this.scheduleHover(a),(a||[]).some(l=>this.monitor.canDropOnTarget(l))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var a;i.preventDefault(),(a=this.currentNativeSource)===null||a===void 0||a.loadDataTransfer(i.dataTransfer)}else k8(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:a}=this;this.dropTargetIds=[],this.actions.hover(a,{clientOffset:a3(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const a=i.target;typeof a.dragDrop=="function"&&(a.tagName==="INPUT"||a.tagName==="SELECT"||a.tagName==="TEXTAREA"||a.isContentEditable||(i.preventDefault(),a.dragDrop()))},this.options=new nee(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new GZ(this.isNodeInDocument)}}const uf=function(e,n,r){return new iee(e,n,r)},Z_=N.createContext(void 0),eD=({children:t,option:e,saveFormBuilderSchema:n,templateSchema:r,onChange:i})=>{const a={...v8,...r},[s,l]=N.useReducer(KQ,a);N.useEffect(()=>{n&&n(s)},[s]);const{isPreview:c,isAdmin:u,isRenderView:d,renderType:f,isAdvanceView:h,globalAlignment:m="ltr",emitSocketData:g,media:v,reusableComponent:A,saveFormProgress:S,showSettings:x}=e;return o.jsx(Z_.Provider,{value:{media:v,isPreview:c,isAdmin:u,isRenderView:d,renderType:f,isAdvanceView:h,globalAlignment:m,emitSocketData:g,reusableComponent:A,state:s,dispatch:l,onChange:i,saveFormProgress:S,showSettings:x},children:o.jsx(lf,{backend:uf,children:t})})},tD=()=>N.useContext(Z_),aee=(t,e,n)=>{const r=Array.from(t),[i]=r.splice(e,1);return r.splice(n,0,i),r},see=(t,e)=>[...t.slice(0,e),...t.slice(e+1)],oee=(t,e,n)=>[...t.slice(0,e),n,...t.slice(e)],nD=(t,e,n)=>{if(e.length===1){const c=Number(e[0]),u=Number(n[0]);return aee(t,u,c)}const r=[...t],i=Number(e.slice(0,1)),a=e.slice(1),s=n.slice(1),l=r[i];return r[i]={...l,children:nD(l.children,a,s)},r},rD=(t,e)=>{if(e.length===1){const s=Number(e[0]);return see(t,s)}const n=[...t],r=Number(e.slice(0,1)),i=e.slice(1),a=n[r];return n[r]={...a,children:rD(a.children,i)},n},M8=(t,e,n)=>{if(e.length===1){const l=Number(e[0]);return oee(t,l,n)}const r=[...t],i=Number(e.slice(0,1)),a=e.slice(1),s=r[i];return r[i]={...s,children:M8(s.children,a,n)},r},lee=(t,e,n)=>{let r=[...t],i=r[n[oa]].children[n[la]].children[n[fa]].children[n[ha]].children[n[pa]].inlineConditionalRules.rules[n[wa]].conditions[n[$o]].children[n[yo]];return r[n[oa]].children[n[la]].children[n[fa]].children[n[ha]].children[n[pa]].inlineConditionalRules.rules[n[wa]].conditions[n[$o]].children.splice([n[yo]],1),r[e[oa]].children[e[la]].children[e[fa]].children[e[ha]].children[e[pa]].inlineConditionalRules.rules[e[wa]].conditions[e[$o]].children.splice(e[yo],0,i),r},cee=(t,e,n)=>nD(t,e,n),uee=t=>{const e=[...t],n={type:ms,uuid:nt(),children:[]};return e.map(r=>(r.children.length||(r.children=[n]),r))},iD=(t,e,n,r)=>{var h,m,g,v,A,S;let i;const a={...Ac,uuid:nt(),children:[r]},s={...tu,uuid:nt()},l={...tu,uuid:nt(),children:[a]},c={...af,uuid:nt(),children:[l]},u={...Jm,uuid:nt(),children:[c]};switch(e.length){case 1:{r.type===XC?i={...c,children:[r]}:i={...c,children:[s]};break}case 2:{r.type===ta?i={...u,children:[c]}:i={...u,children:[c]};break}case 3:{r.type===bo?i={...c,children:[l]}:i={...tu,uuid:nt(),children:[{...Ac,uuid:nt(),children:[r]}]};break}case 4:{r.type===j1?i=a:i=r;break}case 5:{i=r;break}default:i=r}let d=t;return n.length>5?(S=(A=(v=(g=(m=(h=d[n[oa]])==null?void 0:h.children[n[la]])==null?void 0:m.children[n[fa]])==null?void 0:g.children[n[ha]])==null?void 0:v.children[n[pa]])==null?void 0:A.inlineConditionalRules)==null||S.rules[n[wa]].conditions[n[$o]].children.splice(n[yo],1):d=rD(d,n),d=uee(d),d=M8(d,e,i),d},dee=(t,e,n)=>{let r;switch(e.length){case 1:{r={...Jm,uuid:nt(),children:[{...af,uuid:nt(),children:[{...tu,uuid:nt(),children:[{...Ac,uuid:nt(),children:[n]}]}]}]};break}case 2:{r={...af,uuid:nt(),children:[{...tu,uuid:nt(),children:[{...Ac,uuid:nt(),children:[n]}]}]};break}case 3:{r={...tu,uuid:nt(),children:[{...Ac,uuid:nt(),children:[n]}]};break}case 4:{r={...Ac,uuid:nt(),children:[n]};break}default:r=n}return M8(t,e,r)},on=()=>{const{state:t,dispatch:e,onChange:n,saveFormProgress:r}=tD();if(t===void 0)throw new Error("Must be wrapped in builder provider");const i=t.builderTemplateName,a=t.isChangesSaved,s=t.editing_by,l=t.version_name,c=t.loading,u=t.published_status,d=t,f=t,h=t.formType,m=t==null?void 0:t.userSelectedLanguage,g=t==null?void 0:t.languages,v=t.layout,A=N.useCallback(me=>BQ(me)(e),[e]),S=N.useCallback(me=>cQ(me)(e),[e]),x=N.useCallback(me=>VQ(me)(e),[e]),w=N.useCallback((me,ye)=>{var Tt,Gt,xn,bn,wn,yn,Gn,On;const Ie=[...v],Ee=me.path.split("-"),he=Ee.slice(0,-1).join("-"),V={uuid:ye.uuid,type:ye.type,reviewerChecklist:[]},te=0,W=1,ue=2,Ae=3,pe=4,ke=5,Le=6,We=8,gt=7,At=5,st=6,Je=8;if(ye.type===ta&&(ye==null?void 0:ye.schema)!==void 0){k(JSON.parse(ye==null?void 0:ye.schema),parseInt(Ee[te]));return}if(((Tt=ye==null?void 0:ye.schema)==null?void 0:Tt.componentType)==="question"&&((yn=(wn=(bn=(xn=(Gt=Ie[0])==null?void 0:Gt.children[0])==null?void 0:xn.children[0])==null?void 0:bn.children[0])==null?void 0:wn.children)!=null&&yn.some(qt=>{var at,et,ut;return((at=qt==null?void 0:qt.questionText)==null?void 0:at[m.type])===((ut=(et=ye==null?void 0:ye.schema)==null?void 0:et.questionText)==null?void 0:ut[m.type])})))return;if(ye.type===Zn){let qt={type:j1,reviewerChecklist:[],..._t.cloneDeep(ye.schema)};if(qt!=null&&qt.options&&(qt={...qt,options:[{uuid:nt(),optionText:{english:"Option 1"},value:"Option1",hyperlinkText:{english:""},abbreviationText:{english:"Option 1"},custom_values:{}},{uuid:nt(),optionText:{english:"Option 2"},value:"Option2",hyperlinkText:{english:""},abbreviationText:{english:"Option 1"},custom_values:{}}]}),qt.componentType==="grid-component"&&(qt={...qt,children:[],options:[{uuid:nt(),custom_values:{}}]}),qt.componentType==="radio-hierarchal"&&(qt={...qt,type:"radio",children:[],options:[{uuid:nt(),label:"Yes",value:null,enableConditionalField:!0,children:[]},{uuid:nt(),label:"No",value:null,enableConditionalField:!0,children:[]}]}),qt={...qt,uuid:nt()},Ee.length===We){U(parseInt(Ee[te]),parseInt(Ee[W]),parseInt(Ee[ue]),parseInt(Ee[Ae]),parseInt(Ee[pe]),parseInt(Ee[ke]),parseInt(Ee[Le]),qt);return}if(Ee.length===gt){re(parseInt(Ee[te]),parseInt(Ee[W]),parseInt(Ee[ue]),parseInt(Ee[Ae]),parseInt(Ee[pe]),parseInt(Ee[At]),parseInt(Ee[st]),qt);return}if((On=(Gn=Ie[Ee[te]].children[Ee[W]])==null?void 0:Gn.children[Ee[ue]])!=null&&On.rowIsRepeatable&&(qt==null?void 0:qt.componentType)==="editor")return;x(dee(Ie,Ee,qt)),Ee.length>1&&Ce(Ee[te],Ee[W],Ee[ue],qt);return}const Ct=ye.path.split("-"),mt=Ct.slice(0,-1).join("-");if(Ct.length===Ee.length){if(mt===he){if((Ct==null?void 0:Ct.length)===Je){x(lee(Ie,Ee,Ct));return}x(cee(Ie,Ee,Ct));return}const qt={...V,...ye};(ye==null?void 0:ye.id)===void 0&&(qt.id=nt()),x(iD(Ie,Ee,Ct,qt));return}if((Ct==null?void 0:Ct.length)===8){const qt={type:j1,reviewerChecklist:[],...ye};re(parseInt(Ee[te]),parseInt(Ee[W]),parseInt(Ee[ue]),parseInt(Ee[Ae]),parseInt(Ee[pe]),parseInt(Ee[At]),parseInt(Ee[st]),qt),De(Ct[oa],Ct[la],Ct[fa],Ct[ha],Ct[pa],Ct[At],Ct[st],Ct[Bl]);return}const Ge={...V,...ye};(ye==null?void 0:ye.id)===void 0&&(Ge.id=nt()),x(iD(Ie,Ee,Ct,Ge))},[v,x,m.type]),T=N.useCallback(()=>YQ()(e),[e]),C=N.useCallback(me=>UQ(me)(e,t),[e]),_=N.useCallback(me=>qQ(me)(e,t),[e]),E=N.useCallback(me=>$Q(me)(e),[e]),D=N.useCallback(me=>lQ(me)(e),[e]),B=N.useCallback(me=>pQ(me)(e),[e]),k=N.useCallback((me,ye)=>vQ(me,ye)(e),[e]),P=N.useCallback((me,ye)=>SQ(me,ye)(e),[e]),j=N.useCallback((me,ye,Ie)=>TQ(me,ye,Ie)(e),[e]),M=N.useCallback(me=>fQ(me)(e),[e]),H=N.useCallback((me,ye)=>hQ(me,ye)(e),[e]),de=N.useCallback((me,ye,Ie)=>wQ(me,ye,Ie)(e),[e]),fe=N.useCallback((me,ye,Ie,Ee)=>IQ(me,ye,Ie,Ee)(e),[e]),ee=N.useCallback((me,ye,Ie,Ee,he)=>_Q(me,ye,Ie,Ee,he)(e,t),[e]),G=N.useCallback((me,ye,Ie,Ee,he,V)=>DQ(me,ye,Ie,Ee,he,V)(e,t),[e]),ae=N.useCallback((me,ye,Ie)=>gQ(me,ye,Ie)(e),[e]),Y=N.useCallback((me,ye,Ie,Ee)=>AQ(me,ye,Ie,Ee)(e),[e]),ge=N.useCallback((me,ye)=>dQ(me,ye)(e),[e]),ne=N.useCallback((me,ye,Ie,Ee,he,V)=>OQ(me,ye,Ie,Ee,he,V)(e),[e]),J=N.useCallback((me,ye,Ie,Ee,he)=>EQ(me,ye,Ie,Ee,he)(e),[e]),K=N.useCallback((me,ye,Ie,Ee)=>yQ(me,ye,Ie,Ee)(e),[e]),oe=N.useCallback((me,ye,Ie)=>mQ(me,ye,Ie)(e),[e]),ve=N.useCallback((me,ye)=>uQ(me,ye)(e,t),[e]),Ce=N.useCallback((me,ye,Ie,Ee)=>xQ(me,ye,Ie,Ee)(e),[e]),Se=N.useCallback((me,ye,Ie,Ee,he,V,te,W,ue)=>MQ(me,ye,Ie,Ee,he,V,te,W,ue)(e),[e]),Te=N.useCallback((me,ye,Ie,Ee,he,V,te,W,ue)=>PQ(me,ye,Ie,Ee,he,V,te,W,ue)(e),[e]),De=N.useCallback((me,ye,Ie,Ee,he,V,te,W)=>kQ(me,ye,Ie,Ee,he,V,te,W)(e),[e]),ie=N.useCallback((me,ye,Ie,Ee,he,V,te,W)=>LQ(me,ye,Ie,Ee,he,V,te,W)(e),[e]),U=N.useCallback((me,ye,Ie,Ee,he,V,te,W)=>NQ(me,ye,Ie,Ee,he,V,te,W)(e),[e]),re=N.useCallback((me,ye,Ie,Ee,he,V,te,W)=>FQ(me,ye,Ie,Ee,he,V,te,W)(e),[e]),Q=N.useCallback(me=>jQ(me)(e),[e]),se=N.useCallback(me=>zQ(me)(e),[e]),be=N.useCallback(me=>HQ(me)(e),[e]);return{builderIsChangesSaved:a,builderTemplateName:i,formBuilderFormSchema:d,formBuilderFormLayout:v,formBuilderSchemaLanguages:g,saveFormTemplateNewVersion:f,userSelectedLanguage:m,formBuilderConfigurationType:h,formBuilderLoading:c,formBuilderPublishedStatus:u,builderEditingBy:s,builderVersionName:l,handleDrop:w,formatTableFieldsHook:S,saveFormBuilderSchema:A,removePage:M,removeSection:H,removeRow:de,removeColumn:fe,removeField:ee,updateEditingBy:be,addTabs:D,addSection:B,addRow:P,addColumn:j,cloneField:ne,cloneColumn:J,cloneRow:K,cloneSection:oe,clonePage:ve,sectionImport:k,setLayout:x,fieldSettingUpdate:G,selectFormBuilderLanguage:C,unselectFormBuilderLanguage:_,updateUserFormSelectedLanguage:E,updateFormType:Q,schemaBuilderUpdate:se,pageSettingUpdate:ge,saveFormProgress:r,sectionSettingUpdate:ae,rowSettingUpdate:Y,clearBuilderSchema:T,addFieldToRowRepeaptable:Ce,addFieldToInlineRuleCondtionFields:U,fieldSettingUpdateInlineConditional:Se,fieldSettingDeleteInlineConditional:ie,addFieldToGridComponentHook:re,gridComponentFieldSettingUpdate:Te,gridComponentFieldDelete:De}},Zt=()=>{const{isPreview:t,isAdmin:e,isRenderView:n,renderType:r,isAdvanceView:i,media:a,globalAlignment:s,reusableComponent:l,showSettings:c}=tD();if(t===void 0)throw new Error("Must be wrapped in builder provider");const u=r==null?void 0:r.key,{saveComponent:d,componentList:f}=l;return{isPreview:t,isAdmin:e,isRenderView:n,renderType:u,isAdvanceView:i,globalAlignment:s,media:a,saveComponent:d,componentList:f,emitSocketData:()=>{},updateGlobalToast:g=>{console.log("showSettings",c),c!=null&&c.showToast&&(c==null||c.showToast(g))}}},fee="TASKS_LOADING",hee="TASKS_ADD",pee="TASKS_GET_PAGINATED_LIST",gee="TASKS_DELETE",mee="TASKS_PAGNIATION_UPDATE",vee="TASKS_UPDATE",bee="TASKS_SUCCESS_GET",yee="TASK_GET_TEMPLATE",Aee="TASK_SET_DATA",wee="TASKS_FORM_SUBMIT",See="TASKS_FORM_HTTP_REQUEST",L8="TASK_SET_PROGRESS_VALUE",aD="TASK_SET_MAX_PROGRESS_VALUE",sD="TASK_SET_REGISTER_DATA",oD="TASK_SET_SCHEMA",B8="TASK_UPDATE_USER_FORM_SUBMIT_DATA",lD="CLEAR_TASK",cD="TASK_USER_SUBMIT_FORM_REPEATABLE_ADD",uD="TASK_USER_SUBMIT_FORM_REPEATABLE_REMOVE_INDEX",dD="TASK_USER_TRAINING_DATA",fD="TASK_FIELD_UPDATE",xee=6,s3=1,Ip="DISPLAY_TYPE_START_DETAILS",V8="DISPLAY_TYPE_QUIZ",U8="DISPLAY_TYPE_START_TIMER";function Cee(t,e,n,r,i,a){return s=>{s({type:fD,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,field:a}})}}function hD(t){return(e,n)=>{const r={type:B8,payLoad:{userTaskSubmitFormData:[...t]}};e(r)}}function Tee(t){return(e,n)=>{const{TasksReducer:r}=n(),{taskData:i}=r,a={type:B8,payLoad:{taskData:{...i,...t}}};e(a)}}function Eee(t,e){return(n,r)=>{const{TasksReducer:i}=r(),{userTaskSubmitFormData:a}=i,s=_t.findIndex(a,function(c){return c.rowId===t});n({type:uD,payLoad:{userSubmitFormIndex:s,repeatableDataRowIndex:e}})}}function Iee(t,e){return(n,r)=>{const{TasksReducer:i}=r(),{userTaskSubmitFormData:a}=i,s=_t.findIndex(a,function(c){return c.rowId===t});n({type:cD,payLoad:{userSubmitFormIndex:s,repeatableData:e}})}}function _ee(){return t=>{t({type:lD,payLoad:null})}}const pD=t=>e=>{e({type:L8,payLoad:{progressValue:t}})},Dee=t=>e=>{e({type:L8,payLoad:t})},Oee=t=>e=>{e({type:dD,payLoad:{userTrainingSaveData:t}})},gD=t=>e=>{e({type:sD,payLoad:{registerData:t}})},Nee=(t,e,n)=>(r,i)=>{var d;const{TasksReducer:a}=i(),{userTaskSubmitFormData:s}=a,l=[...s],c=_t.findIndex(l,function(f){var h;return f.rowId===((h=t==null?void 0:t.row)==null?void 0:h.uuid)});let u=(d=s[c])==null?void 0:d.repeatableFields;u={...u,[e==null?void 0:e.uuid]:`<div>${n}</div>`},l[c]={...l[c],repeatableFields:u},r(hD(l))},Fee=(t,e,n)=>(r,i)=>{const{TasksReducer:a}=i(),{userTaskSubmitFormData:s,registerData:l}=a,c=s,u=_t.cloneDeep(l);if(n&&(c==null?void 0:c.length)>0){u[e==null?void 0:e.uuid]=n;for(const f of c)f.fieldId===e.uuid&&(f.postData[0]={postValue:n})}else if((c==null?void 0:c.length)>0){for(const f of c)f.fieldId===e.uuid&&(f.postData[0]={postValue:""});delete u[e==null?void 0:e.uuid]}r(gD(u));const d=Object.keys(u).length;r(pD(d))},Pee=t=>e=>{e({type:aD,payLoad:{progressMaxValue:t}})},q8={submitting:!1,httpRequest:!1,taskData:null,taskUpdateLoading:!1,loading:!1,progressLoading:!1,list:[],filter:"",sort:"task.created_at|desc",total_records:0,page:1,per_page:10,success:!1,success_message:"",userTaskSubmitFormData:null,taskSchema:null,progressMaxValue:0,maxTabs:0,registerData:{},progressValue:0,tabNoOfFieldsData:[],noOfTotalElements:0,sortField:null,sortOrder:null,userTrainingSaveData:null,assessmentData:null,task_status:1},kee=(t=q8,e)=>{switch(e.type){case lD:return{...t,...q8,list:[...t.list],page:t.page,per_page:t.per_page,filter:t.filter,sort:t.sort,total_records:t.total_records};case bee:return{...t,...e.payLoad};case B8:return{...t,...e.payLoad};case oD:return{...t,...e.payLoad};case L8:return{...t,...e.payLoad};case sD:return{...t,registerData:e.payLoad.registerData};case aD:return{...t,...e.payLoad};case fee:return{...t,...e.payLoad};case wee:return{...t,...e.payLoad};case See:return{...t,...e.payLoad};case hee:{const{record:n}=e.payLoad;return{...t,list:[...n,...t.list]}}case pee:return{...t,...e.payLoad};case Aee:return{...t,taskData:e.payLoad};case mee:return{...t,...e.payLoad};case gee:{const n=t.list.filter(r=>r.task_id!==e.payLoad.task_id);return{...t,list:[...n]}}case dD:return{...t,...e.payLoad};case fD:{const{pageIndex:n,sectionIndex:r,rowIndex:i,columnIndex:a,fieldIndex:s,field:l}=e.payLoad,c=[...t.taskSchema.layout];c[n].children[r].children[i].children[a].children[s]=l;const u={...t.taskSchema,layout:c};return{...t,taskSchema:u}}case cD:{const{userSubmitFormIndex:n,repeatableData:r}=e.payLoad,i=t.userTaskSubmitFormData[n].repeatableFieldsData?t.userTaskSubmitFormData[n].repeatableFieldsData:[];return i.push(r),t.userTaskSubmitFormData[n].repeatableFieldsData=i,t}case uD:{const{userSubmitFormIndex:n,repeatableDataRowIndex:r}=e.payLoad,i=[...t.userTaskSubmitFormData],a=[...i[n].repeatableFieldsData];return a.splice(r,1),i[n]={...i[n],repeatableFieldsData:a},{...t,userTaskSubmitFormData:i}}case vee:{const{row:n,eventIndex:r}=e.payLoad,i=t.list[r];return t.list[r]={...i,...n},t}case yee:return{...t,...e.payLoad}}return t},mD=N.createContext(void 0),Mee=({option:t,taskOptions:e,saveFormBuilderSchema:n,templateSchema:r,taskValue:i,children:a})=>{const[s,l]=N.useReducer(kee,{...q8,...i});return N.useEffect(()=>{l({type:oD,payLoad:i})},[i]),o.jsx(mD.Provider,{value:{taskOptions:e,state:s,dispatch:l},children:o.jsx(eD,{option:t,saveFormBuilderSchema:n,templateSchema:r,onChange:()=>{},children:a})})},Lee=()=>N.useContext(mD),mr=()=>{var De,ie,U,re,Q,se,be,me;const{taskOptions:n,state:r,dispatch:i}=Lee();if(r===void 0)throw new Error("Must be wrapped in task render provider");const a=r.task_status,s=r.task_status,l=r.userTaskSubmitFormData,c=r.userTrainingSaveData,u=r.taskSchema,d=r.assessmentData,f=r.progressLoading,h=r.submitting,m=r.httpRequest,g=r.taskData,v=r.progressMaxValue,A=r.maxTabs,S=r.tabNoOfFieldsData,x=r.registerData,w=r.progressValue,T=r.noOfTotalElements,C=r.menuList,_=r.loading,E=r.submitting,D=r.success,B=r.success_message,k=(De=n==null?void 0:n.exam)!=null&&De.startQuiz?(ie=n==null?void 0:n.exam)==null?void 0:ie.startQuiz:()=>{},P=(U=n==null?void 0:n.exam)!=null&&U.AddUserAssessmentAnswer?(re=n==null?void 0:n.exam)==null?void 0:re.AddUserAssessmentAnswer:()=>{},j=(Q=n==null?void 0:n.exam)!=null&&Q.endQuiz?(se=n==null?void 0:n.exam)==null?void 0:se.endQuiz:()=>{},M=(be=n==null?void 0:n.exam)!=null&&be.examComplete?(me=n==null?void 0:n.exam)==null?void 0:me.examComplete:ye=>{},H=n!=null&&n.updateTaskFormData?n==null?void 0:n.updateTaskFormData:(ye,Ie,Ee,he,V,te)=>{},de=n!=null&&n.submitTaskFormData?n==null?void 0:n.submitTaskFormData:(ye,Ie,Ee)=>{},fe=N.useCallback(ye=>i(Tee(ye)),[i]),ee=N.useCallback((ye,Ie,Ee)=>{console.log("form",ye)},[i]),G=N.useCallback(()=>i(_ee()),[i]),ae=N.useCallback((ye,Ie)=>i(Iee(ye,Ie)),[i]),Y=N.useCallback((ye,Ie)=>i(Eee(ye,Ie)),[i]),ge=N.useCallback(ye=>i(pD(ye)),[i]),ne=N.useCallback(ye=>i(Dee(ye)),[i]),J=N.useCallback(ye=>i(gD(ye)),[i]),K=N.useCallback(ye=>i(hD(ye)),[i]),oe=N.useCallback(ye=>i(Pee(ye)),[i]),ve=N.useCallback(ye=>i(Oee(ye)),[i]),Ce=N.useCallback((ye,Ie,Ee)=>i(Nee(ye,Ie,Ee)),[i]),Se=N.useCallback((ye,Ie,Ee)=>i(Fee(ye,Ie,Ee)),[i]),Te=N.useCallback((ye,Ie,Ee,he,V,te)=>i(Cee(ye,Ie,Ee,he,V,te)),[i]);return{examComplete:M,taskOptions:n,TASK_PUBLISHED:6,TASK_PENDING:1,taskStatus:s,assessmentData:d,taskSchema:u,taskData:g,TasksList:C,TasksLoading:_,TasksSuccess:D,TasksSuccessMessage:B,taskProgressMaxValue:v,taskRegisterData:x,taskProgressValue:w,taskMaxTabs:A,noOfTotalElements:T,taskTabRequiredFieldsData:S,userTaskSubmitFormData:l,userTrainingSaveData:c,TasksSubmitLoading:E,updateTaskDataSchema:fe,submitTaskFormData:de,updateTaskFormData:H,TasksSubmit:h,TasksHTTPRequest:m,updateTaskRegisterData:J,updateTaskProgressValue:ge,updateTaskProgressMaxValue:oe,updateUserFormDataSubmit:K,removeUserDataFormSectionRepeatableData:Y,addUserDataFormSectionRepeatableData:ae,onSetValuetoRepeatableData:Ce,onSetValuetoPostDataHook:Se,clearTaskSchema:G,taskProgressLoading:f,task_status:a,startQuiz:k,endQuiz:j,AddUserAssessmentAnswer:P,updateUserTraining:ve,taskFieldUpdateHook:Te,updateProgressDataValuesHook:ne,saveProgressDataHook:ee}};function $8(){return $8=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},$8.apply(this,arguments)}var vD=y.memo(y.forwardRef(function(t,e){var n=ti.getPTI(t);return y.createElement("svg",$8({ref:e,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),y.createElement("path",{d:"M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z",fill:"currentColor"}),y.createElement("path",{d:"M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z",fill:"currentColor"}),y.createElement("path",{d:"M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z",fill:"currentColor"}))}));vD.displayName="ExclamationTriangleIcon";function j8(){return j8=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},j8.apply(this,arguments)}var bD=y.memo(y.forwardRef(function(t,e){var n=ti.getPTI(t);return y.createElement("svg",j8({ref:e,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z",fill:"currentColor"}))}));bD.displayName="InfoCircleIcon";function z8(){return z8=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},z8.apply(this,arguments)}var H8=y.memo(y.forwardRef(function(t,e){var n=ti.getPTI(t);return y.createElement("svg",z8({ref:e,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z",fill:"currentColor"}))}));H8.displayName="TimesCircleIcon";function Y8(){return Y8=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Y8.apply(this,arguments)}function K8(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Bee(t){if(Array.isArray(t))return K8(t)}function Vee(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function yD(t,e){if(t){if(typeof t=="string")return K8(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K8(t,e)}}function Uee(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1597
+ `),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[K_]:{exposeProperties:{text:(t,e)=>F8(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function WZ(t,e){const n=P8[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new RZ(n);return r.loadDataTransfer(e),r}function k8(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(P8).filter(n=>{const r=P8[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(i=>e.indexOf(i)>-1):!1})[0]||null}const QZ=z_(()=>/firefox/i.test(navigator.userAgent)),R_=z_(()=>!!window.safari);class W_{interpolate(e){const{xs:n,ys:r,c1s:i,c2s:a,c3s:s}=this;let l=n.length-1;if(e===n[l])return r[l];let c=0,u=s.length-1,d;for(;c<=u;){d=Math.floor(.5*(c+u));const m=n[d];if(m<e)c=d+1;else if(m>e)u=d-1;else return r[d]}l=Math.max(0,u);const f=e-n[l],h=f*f;return r[l]+i[l]*f+a[l]*h+s[l]*f*h}constructor(e,n){const{length:r}=e,i=[];for(let m=0;m<r;m++)i.push(m);i.sort((m,g)=>e[m]<e[g]?-1:1);const a=[],s=[];let l,c;for(let m=0;m<r-1;m++)l=e[m+1]-e[m],c=n[m+1]-n[m],a.push(l),s.push(c/l);const u=[s[0]];for(let m=0;m<a.length-1;m++){const g=s[m],v=s[m+1];if(g*v<=0)u.push(0);else{l=a[m];const A=a[m+1],S=l+A;u.push(3*S/((S+A)/g+(S+l)/v))}}u.push(s[s.length-1]);const d=[],f=[];let h;for(let m=0;m<u.length-1;m++){h=s[m];const g=u[m],v=1/a[m],A=g+u[m+1]-h-h;d.push((h-g-A)*v),f.push(A*v*v)}this.xs=e,this.ys=n,this.c1s=u,this.c2s=d,this.c3s=f}}const JZ=1;function Q_(t){const e=t.nodeType===JZ?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function a3(t){return{x:t.clientX,y:t.clientY}}function ZZ(t){var e;return t.nodeName==="IMG"&&(QZ()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function eee(t,e,n,r){let i=t?e.width:n,a=t?e.height:r;return R_()&&t&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}function tee(t,e,n,r,i){const a=ZZ(e),l=Q_(a?t:e),c={x:n.x-l.x,y:n.y-l.y},{offsetWidth:u,offsetHeight:d}=t,{anchorX:f,anchorY:h}=r,{dragPreviewWidth:m,dragPreviewHeight:g}=eee(a,e,u,d),v=()=>{let _=new W_([0,.5,1],[c.y,c.y/d*g,c.y+g-d]).interpolate(h);return R_()&&a&&(_+=(window.devicePixelRatio-1)*g),_},A=()=>new W_([0,.5,1],[c.x,c.x/u*m,c.x+m-u]).interpolate(f),{offsetX:S,offsetY:x}=i,w=S===0||S,T=x===0||x;return{x:w?S:A(),y:T?x:v()}}class nee{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}}function ree(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function J_(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){ree(t,i,n[i])})}return t}class iee{profile(){var e,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,n,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,r){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,r);const i=s=>this.handleDragStart(s,e),a=s=>this.handleSelectStart(s);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",i),n.addEventListener("selectstart",a),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",i),n.removeEventListener("selectstart",a),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const r=s=>this.handleDragEnter(s,e),i=s=>this.handleDragOver(s,e),a=s=>this.handleDrop(s,e);return n.addEventListener("dragenter",r),n.addEventListener("dragover",i),n.addEventListener("drop",a),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",i),n.removeEventListener("drop",a)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return J_({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return J_({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(G_).some(n=>G_[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=WZ(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const a=this.sourceNodes.get(i);return a&&Q_(a)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:a}=this;this.dragStartSourceIds=null;const s=a3(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(a||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:s});const{dataTransfer:l}=i,c=k8(l);if(this.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){const d=this.monitor.getSourceId(),f=this.sourceNodes.get(d),h=this.sourcePreviewNodes.get(d)||f;if(h){const{anchorX:m,anchorY:g,offsetX:v,offsetY:A}=this.getCurrentSourcePreviewNodeOptions(),w=tee(f,h,s,{anchorX:m,anchorY:g},{offsetX:v,offsetY:A});l.setDragImage(h,w.x,w.y)}}try{l==null||l.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:u}=this.getCurrentSourcePreviewNodeOptions();u?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(c)this.beginDragNativeItem(c);else{if(l&&!l.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var a;(a=this.currentNativeSource)===null||a===void 0||a.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:l}=i,c=k8(l);c&&this.beginDragNativeItem(c,l)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:a}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,a.length>0&&this.actions.hover(a,{clientOffset:a3(i)}),a.some(l=>this.monitor.canDropOnTarget(l))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var a;(a=this.currentNativeSource)===null||a===void 0||a.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:a}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=a3(i),this.scheduleHover(a),(a||[]).some(l=>this.monitor.canDropOnTarget(l))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var a;i.preventDefault(),(a=this.currentNativeSource)===null||a===void 0||a.loadDataTransfer(i.dataTransfer)}else k8(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:a}=this;this.dropTargetIds=[],this.actions.hover(a,{clientOffset:a3(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const a=i.target;typeof a.dragDrop=="function"&&(a.tagName==="INPUT"||a.tagName==="SELECT"||a.tagName==="TEXTAREA"||a.isContentEditable||(i.preventDefault(),a.dragDrop()))},this.options=new nee(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new GZ(this.isNodeInDocument)}}const uf=function(e,n,r){return new iee(e,n,r)},Z_=N.createContext(void 0),eD=({children:t,option:e,saveFormBuilderSchema:n,templateSchema:r,onChange:i})=>{const a={...v8,...r},[s,l]=N.useReducer(KQ,a);N.useEffect(()=>{n&&n(s)},[s]);const{isPreview:c,isAdmin:u,isRenderView:d,renderType:f,isAdvanceView:h,globalAlignment:m="ltr",emitSocketData:g,media:v,reusableComponent:A,saveFormProgress:S,showSettings:x}=e;return console.log("FormBuilderProvider",h),o.jsx(Z_.Provider,{value:{media:v,isPreview:c,isAdmin:u,isRenderView:d,renderType:f,isAdvanceView:h,globalAlignment:m,emitSocketData:g,reusableComponent:A,state:s,dispatch:l,onChange:i,saveFormProgress:S,showSettings:x},children:o.jsx(lf,{backend:uf,children:t})})},tD=()=>N.useContext(Z_),aee=(t,e,n)=>{const r=Array.from(t),[i]=r.splice(e,1);return r.splice(n,0,i),r},see=(t,e)=>[...t.slice(0,e),...t.slice(e+1)],oee=(t,e,n)=>[...t.slice(0,e),n,...t.slice(e)],nD=(t,e,n)=>{if(e.length===1){const c=Number(e[0]),u=Number(n[0]);return aee(t,u,c)}const r=[...t],i=Number(e.slice(0,1)),a=e.slice(1),s=n.slice(1),l=r[i];return r[i]={...l,children:nD(l.children,a,s)},r},rD=(t,e)=>{if(e.length===1){const s=Number(e[0]);return see(t,s)}const n=[...t],r=Number(e.slice(0,1)),i=e.slice(1),a=n[r];return n[r]={...a,children:rD(a.children,i)},n},M8=(t,e,n)=>{if(e.length===1){const l=Number(e[0]);return oee(t,l,n)}const r=[...t],i=Number(e.slice(0,1)),a=e.slice(1),s=r[i];return r[i]={...s,children:M8(s.children,a,n)},r},lee=(t,e,n)=>{let r=[...t],i=r[n[oa]].children[n[la]].children[n[fa]].children[n[ha]].children[n[pa]].inlineConditionalRules.rules[n[wa]].conditions[n[$o]].children[n[yo]];return r[n[oa]].children[n[la]].children[n[fa]].children[n[ha]].children[n[pa]].inlineConditionalRules.rules[n[wa]].conditions[n[$o]].children.splice([n[yo]],1),r[e[oa]].children[e[la]].children[e[fa]].children[e[ha]].children[e[pa]].inlineConditionalRules.rules[e[wa]].conditions[e[$o]].children.splice(e[yo],0,i),r},cee=(t,e,n)=>nD(t,e,n),uee=t=>{const e=[...t],n={type:ms,uuid:nt(),children:[]};return e.map(r=>(r.children.length||(r.children=[n]),r))},iD=(t,e,n,r)=>{var h,m,g,v,A,S;let i;const a={...Ac,uuid:nt(),children:[r]},s={...tu,uuid:nt()},l={...tu,uuid:nt(),children:[a]},c={...af,uuid:nt(),children:[l]},u={...Jm,uuid:nt(),children:[c]};switch(e.length){case 1:{r.type===XC?i={...c,children:[r]}:i={...c,children:[s]};break}case 2:{r.type===ta?i={...u,children:[c]}:i={...u,children:[c]};break}case 3:{r.type===bo?i={...c,children:[l]}:i={...tu,uuid:nt(),children:[{...Ac,uuid:nt(),children:[r]}]};break}case 4:{r.type===j1?i=a:i=r;break}case 5:{i=r;break}default:i=r}let d=t;return n.length>5?(S=(A=(v=(g=(m=(h=d[n[oa]])==null?void 0:h.children[n[la]])==null?void 0:m.children[n[fa]])==null?void 0:g.children[n[ha]])==null?void 0:v.children[n[pa]])==null?void 0:A.inlineConditionalRules)==null||S.rules[n[wa]].conditions[n[$o]].children.splice(n[yo],1):d=rD(d,n),d=uee(d),d=M8(d,e,i),d},dee=(t,e,n)=>{let r;switch(e.length){case 1:{r={...Jm,uuid:nt(),children:[{...af,uuid:nt(),children:[{...tu,uuid:nt(),children:[{...Ac,uuid:nt(),children:[n]}]}]}]};break}case 2:{r={...af,uuid:nt(),children:[{...tu,uuid:nt(),children:[{...Ac,uuid:nt(),children:[n]}]}]};break}case 3:{r={...tu,uuid:nt(),children:[{...Ac,uuid:nt(),children:[n]}]};break}case 4:{r={...Ac,uuid:nt(),children:[n]};break}default:r=n}return M8(t,e,r)},on=()=>{const{state:t,dispatch:e,onChange:n,saveFormProgress:r}=tD();if(t===void 0)throw new Error("Must be wrapped in builder provider");const i=t.builderTemplateName,a=t.isChangesSaved,s=t.editing_by,l=t.version_name,c=t.loading,u=t.published_status,d=t,f=t,h=t.formType,m=t==null?void 0:t.userSelectedLanguage,g=t==null?void 0:t.languages,v=t.layout,A=N.useCallback(me=>BQ(me)(e),[e]),S=N.useCallback(me=>cQ(me)(e),[e]),x=N.useCallback(me=>VQ(me)(e),[e]),w=N.useCallback((me,ye)=>{var Tt,Gt,xn,bn,wn,yn,Gn,On;const Ie=[...v],Ee=me.path.split("-"),he=Ee.slice(0,-1).join("-"),V={uuid:ye.uuid,type:ye.type,reviewerChecklist:[]},te=0,W=1,ue=2,Ae=3,pe=4,ke=5,Le=6,We=8,gt=7,At=5,st=6,Je=8;if(ye.type===ta&&(ye==null?void 0:ye.schema)!==void 0){k(JSON.parse(ye==null?void 0:ye.schema),parseInt(Ee[te]));return}if(((Tt=ye==null?void 0:ye.schema)==null?void 0:Tt.componentType)==="question"&&((yn=(wn=(bn=(xn=(Gt=Ie[0])==null?void 0:Gt.children[0])==null?void 0:xn.children[0])==null?void 0:bn.children[0])==null?void 0:wn.children)!=null&&yn.some(qt=>{var at,et,ut;return((at=qt==null?void 0:qt.questionText)==null?void 0:at[m.type])===((ut=(et=ye==null?void 0:ye.schema)==null?void 0:et.questionText)==null?void 0:ut[m.type])})))return;if(ye.type===Zn){let qt={type:j1,reviewerChecklist:[],..._t.cloneDeep(ye.schema)};if(qt!=null&&qt.options&&(qt={...qt,options:[{uuid:nt(),optionText:{english:"Option 1"},value:"Option1",hyperlinkText:{english:""},abbreviationText:{english:"Option 1"},custom_values:{}},{uuid:nt(),optionText:{english:"Option 2"},value:"Option2",hyperlinkText:{english:""},abbreviationText:{english:"Option 1"},custom_values:{}}]}),qt.componentType==="grid-component"&&(qt={...qt,children:[],options:[{uuid:nt(),custom_values:{}}]}),qt.componentType==="radio-hierarchal"&&(qt={...qt,type:"radio",children:[],options:[{uuid:nt(),label:"Yes",value:null,enableConditionalField:!0,children:[]},{uuid:nt(),label:"No",value:null,enableConditionalField:!0,children:[]}]}),qt={...qt,uuid:nt()},Ee.length===We){U(parseInt(Ee[te]),parseInt(Ee[W]),parseInt(Ee[ue]),parseInt(Ee[Ae]),parseInt(Ee[pe]),parseInt(Ee[ke]),parseInt(Ee[Le]),qt);return}if(Ee.length===gt){re(parseInt(Ee[te]),parseInt(Ee[W]),parseInt(Ee[ue]),parseInt(Ee[Ae]),parseInt(Ee[pe]),parseInt(Ee[At]),parseInt(Ee[st]),qt);return}if((On=(Gn=Ie[Ee[te]].children[Ee[W]])==null?void 0:Gn.children[Ee[ue]])!=null&&On.rowIsRepeatable&&(qt==null?void 0:qt.componentType)==="editor")return;x(dee(Ie,Ee,qt)),Ee.length>1&&Ce(Ee[te],Ee[W],Ee[ue],qt);return}const Ct=ye.path.split("-"),mt=Ct.slice(0,-1).join("-");if(Ct.length===Ee.length){if(mt===he){if((Ct==null?void 0:Ct.length)===Je){x(lee(Ie,Ee,Ct));return}x(cee(Ie,Ee,Ct));return}const qt={...V,...ye};(ye==null?void 0:ye.id)===void 0&&(qt.id=nt()),x(iD(Ie,Ee,Ct,qt));return}if((Ct==null?void 0:Ct.length)===8){const qt={type:j1,reviewerChecklist:[],...ye};re(parseInt(Ee[te]),parseInt(Ee[W]),parseInt(Ee[ue]),parseInt(Ee[Ae]),parseInt(Ee[pe]),parseInt(Ee[At]),parseInt(Ee[st]),qt),De(Ct[oa],Ct[la],Ct[fa],Ct[ha],Ct[pa],Ct[At],Ct[st],Ct[Bl]);return}const Ge={...V,...ye};(ye==null?void 0:ye.id)===void 0&&(Ge.id=nt()),x(iD(Ie,Ee,Ct,Ge))},[v,x,m.type]),T=N.useCallback(()=>YQ()(e),[e]),C=N.useCallback(me=>UQ(me)(e,t),[e]),_=N.useCallback(me=>qQ(me)(e,t),[e]),E=N.useCallback(me=>$Q(me)(e),[e]),D=N.useCallback(me=>lQ(me)(e),[e]),B=N.useCallback(me=>pQ(me)(e),[e]),k=N.useCallback((me,ye)=>vQ(me,ye)(e),[e]),P=N.useCallback((me,ye)=>SQ(me,ye)(e),[e]),j=N.useCallback((me,ye,Ie)=>TQ(me,ye,Ie)(e),[e]),M=N.useCallback(me=>fQ(me)(e),[e]),H=N.useCallback((me,ye)=>hQ(me,ye)(e),[e]),de=N.useCallback((me,ye,Ie)=>wQ(me,ye,Ie)(e),[e]),fe=N.useCallback((me,ye,Ie,Ee)=>IQ(me,ye,Ie,Ee)(e),[e]),ee=N.useCallback((me,ye,Ie,Ee,he)=>_Q(me,ye,Ie,Ee,he)(e,t),[e]),G=N.useCallback((me,ye,Ie,Ee,he,V)=>DQ(me,ye,Ie,Ee,he,V)(e,t),[e]),ae=N.useCallback((me,ye,Ie)=>gQ(me,ye,Ie)(e),[e]),Y=N.useCallback((me,ye,Ie,Ee)=>AQ(me,ye,Ie,Ee)(e),[e]),ge=N.useCallback((me,ye)=>dQ(me,ye)(e),[e]),ne=N.useCallback((me,ye,Ie,Ee,he,V)=>OQ(me,ye,Ie,Ee,he,V)(e),[e]),J=N.useCallback((me,ye,Ie,Ee,he)=>EQ(me,ye,Ie,Ee,he)(e),[e]),K=N.useCallback((me,ye,Ie,Ee)=>yQ(me,ye,Ie,Ee)(e),[e]),oe=N.useCallback((me,ye,Ie)=>mQ(me,ye,Ie)(e),[e]),ve=N.useCallback((me,ye)=>uQ(me,ye)(e,t),[e]),Ce=N.useCallback((me,ye,Ie,Ee)=>xQ(me,ye,Ie,Ee)(e),[e]),Se=N.useCallback((me,ye,Ie,Ee,he,V,te,W,ue)=>MQ(me,ye,Ie,Ee,he,V,te,W,ue)(e),[e]),Te=N.useCallback((me,ye,Ie,Ee,he,V,te,W,ue)=>PQ(me,ye,Ie,Ee,he,V,te,W,ue)(e),[e]),De=N.useCallback((me,ye,Ie,Ee,he,V,te,W)=>kQ(me,ye,Ie,Ee,he,V,te,W)(e),[e]),ie=N.useCallback((me,ye,Ie,Ee,he,V,te,W)=>LQ(me,ye,Ie,Ee,he,V,te,W)(e),[e]),U=N.useCallback((me,ye,Ie,Ee,he,V,te,W)=>NQ(me,ye,Ie,Ee,he,V,te,W)(e),[e]),re=N.useCallback((me,ye,Ie,Ee,he,V,te,W)=>FQ(me,ye,Ie,Ee,he,V,te,W)(e),[e]),Q=N.useCallback(me=>jQ(me)(e),[e]),se=N.useCallback(me=>zQ(me)(e),[e]),be=N.useCallback(me=>HQ(me)(e),[e]);return{builderIsChangesSaved:a,builderTemplateName:i,formBuilderFormSchema:d,formBuilderFormLayout:v,formBuilderSchemaLanguages:g,saveFormTemplateNewVersion:f,userSelectedLanguage:m,formBuilderConfigurationType:h,formBuilderLoading:c,formBuilderPublishedStatus:u,builderEditingBy:s,builderVersionName:l,handleDrop:w,formatTableFieldsHook:S,saveFormBuilderSchema:A,removePage:M,removeSection:H,removeRow:de,removeColumn:fe,removeField:ee,updateEditingBy:be,addTabs:D,addSection:B,addRow:P,addColumn:j,cloneField:ne,cloneColumn:J,cloneRow:K,cloneSection:oe,clonePage:ve,sectionImport:k,setLayout:x,fieldSettingUpdate:G,selectFormBuilderLanguage:C,unselectFormBuilderLanguage:_,updateUserFormSelectedLanguage:E,updateFormType:Q,schemaBuilderUpdate:se,pageSettingUpdate:ge,saveFormProgress:r,sectionSettingUpdate:ae,rowSettingUpdate:Y,clearBuilderSchema:T,addFieldToRowRepeaptable:Ce,addFieldToInlineRuleCondtionFields:U,fieldSettingUpdateInlineConditional:Se,fieldSettingDeleteInlineConditional:ie,addFieldToGridComponentHook:re,gridComponentFieldSettingUpdate:Te,gridComponentFieldDelete:De}},Zt=()=>{const{isPreview:t,isAdmin:e,isRenderView:n,renderType:r,isAdvanceView:i,media:a,globalAlignment:s,reusableComponent:l,showSettings:c}=tD();if(t===void 0)throw new Error("Must be wrapped in builder provider");const u=r==null?void 0:r.key,{saveComponent:d,componentList:f}=l;return{isPreview:t,isAdmin:e,isRenderView:n,renderType:u,isAdvanceView:i,globalAlignment:s,media:a,saveComponent:d,componentList:f,emitSocketData:()=>{},updateGlobalToast:g=>{console.log("showSettings",c),c!=null&&c.showToast&&(c==null||c.showToast(g))}}},fee="TASKS_LOADING",hee="TASKS_ADD",pee="TASKS_GET_PAGINATED_LIST",gee="TASKS_DELETE",mee="TASKS_PAGNIATION_UPDATE",vee="TASKS_UPDATE",bee="TASKS_SUCCESS_GET",yee="TASK_GET_TEMPLATE",Aee="TASK_SET_DATA",wee="TASKS_FORM_SUBMIT",See="TASKS_FORM_HTTP_REQUEST",L8="TASK_SET_PROGRESS_VALUE",aD="TASK_SET_MAX_PROGRESS_VALUE",sD="TASK_SET_REGISTER_DATA",oD="TASK_SET_SCHEMA",B8="TASK_UPDATE_USER_FORM_SUBMIT_DATA",lD="CLEAR_TASK",cD="TASK_USER_SUBMIT_FORM_REPEATABLE_ADD",uD="TASK_USER_SUBMIT_FORM_REPEATABLE_REMOVE_INDEX",dD="TASK_USER_TRAINING_DATA",fD="TASK_FIELD_UPDATE",xee=6,s3=1,Ip="DISPLAY_TYPE_START_DETAILS",V8="DISPLAY_TYPE_QUIZ",U8="DISPLAY_TYPE_START_TIMER";function Cee(t,e,n,r,i,a){return s=>{s({type:fD,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,field:a}})}}function hD(t){return(e,n)=>{const r={type:B8,payLoad:{userTaskSubmitFormData:[...t]}};e(r)}}function Tee(t){return(e,n)=>{const{TasksReducer:r}=n(),{taskData:i}=r,a={type:B8,payLoad:{taskData:{...i,...t}}};e(a)}}function Eee(t,e){return(n,r)=>{const{TasksReducer:i}=r(),{userTaskSubmitFormData:a}=i,s=_t.findIndex(a,function(c){return c.rowId===t});n({type:uD,payLoad:{userSubmitFormIndex:s,repeatableDataRowIndex:e}})}}function Iee(t,e){return(n,r)=>{const{TasksReducer:i}=r(),{userTaskSubmitFormData:a}=i,s=_t.findIndex(a,function(c){return c.rowId===t});n({type:cD,payLoad:{userSubmitFormIndex:s,repeatableData:e}})}}function _ee(){return t=>{t({type:lD,payLoad:null})}}const pD=t=>e=>{e({type:L8,payLoad:{progressValue:t}})},Dee=t=>e=>{e({type:L8,payLoad:t})},Oee=t=>e=>{e({type:dD,payLoad:{userTrainingSaveData:t}})},gD=t=>e=>{e({type:sD,payLoad:{registerData:t}})},Nee=(t,e,n)=>(r,i)=>{var d;const{TasksReducer:a}=i(),{userTaskSubmitFormData:s}=a,l=[...s],c=_t.findIndex(l,function(f){var h;return f.rowId===((h=t==null?void 0:t.row)==null?void 0:h.uuid)});let u=(d=s[c])==null?void 0:d.repeatableFields;u={...u,[e==null?void 0:e.uuid]:`<div>${n}</div>`},l[c]={...l[c],repeatableFields:u},r(hD(l))},Fee=(t,e,n)=>(r,i)=>{const{TasksReducer:a}=i(),{userTaskSubmitFormData:s,registerData:l}=a,c=s,u=_t.cloneDeep(l);if(n&&(c==null?void 0:c.length)>0){u[e==null?void 0:e.uuid]=n;for(const f of c)f.fieldId===e.uuid&&(f.postData[0]={postValue:n})}else if((c==null?void 0:c.length)>0){for(const f of c)f.fieldId===e.uuid&&(f.postData[0]={postValue:""});delete u[e==null?void 0:e.uuid]}r(gD(u));const d=Object.keys(u).length;r(pD(d))},Pee=t=>e=>{e({type:aD,payLoad:{progressMaxValue:t}})},q8={submitting:!1,httpRequest:!1,taskData:null,taskUpdateLoading:!1,loading:!1,progressLoading:!1,list:[],filter:"",sort:"task.created_at|desc",total_records:0,page:1,per_page:10,success:!1,success_message:"",userTaskSubmitFormData:null,taskSchema:null,progressMaxValue:0,maxTabs:0,registerData:{},progressValue:0,tabNoOfFieldsData:[],noOfTotalElements:0,sortField:null,sortOrder:null,userTrainingSaveData:null,assessmentData:null,task_status:1},kee=(t=q8,e)=>{switch(e.type){case lD:return{...t,...q8,list:[...t.list],page:t.page,per_page:t.per_page,filter:t.filter,sort:t.sort,total_records:t.total_records};case bee:return{...t,...e.payLoad};case B8:return{...t,...e.payLoad};case oD:return{...t,...e.payLoad};case L8:return{...t,...e.payLoad};case sD:return{...t,registerData:e.payLoad.registerData};case aD:return{...t,...e.payLoad};case fee:return{...t,...e.payLoad};case wee:return{...t,...e.payLoad};case See:return{...t,...e.payLoad};case hee:{const{record:n}=e.payLoad;return{...t,list:[...n,...t.list]}}case pee:return{...t,...e.payLoad};case Aee:return{...t,taskData:e.payLoad};case mee:return{...t,...e.payLoad};case gee:{const n=t.list.filter(r=>r.task_id!==e.payLoad.task_id);return{...t,list:[...n]}}case dD:return{...t,...e.payLoad};case fD:{const{pageIndex:n,sectionIndex:r,rowIndex:i,columnIndex:a,fieldIndex:s,field:l}=e.payLoad,c=[...t.taskSchema.layout];c[n].children[r].children[i].children[a].children[s]=l;const u={...t.taskSchema,layout:c};return{...t,taskSchema:u}}case cD:{const{userSubmitFormIndex:n,repeatableData:r}=e.payLoad,i=t.userTaskSubmitFormData[n].repeatableFieldsData?t.userTaskSubmitFormData[n].repeatableFieldsData:[];return i.push(r),t.userTaskSubmitFormData[n].repeatableFieldsData=i,t}case uD:{const{userSubmitFormIndex:n,repeatableDataRowIndex:r}=e.payLoad,i=[...t.userTaskSubmitFormData],a=[...i[n].repeatableFieldsData];return a.splice(r,1),i[n]={...i[n],repeatableFieldsData:a},{...t,userTaskSubmitFormData:i}}case vee:{const{row:n,eventIndex:r}=e.payLoad,i=t.list[r];return t.list[r]={...i,...n},t}case yee:return{...t,...e.payLoad}}return t},mD=N.createContext(void 0),Mee=({option:t,taskOptions:e,saveFormBuilderSchema:n,templateSchema:r,taskValue:i,children:a})=>{const[s,l]=N.useReducer(kee,{...q8,...i});return N.useEffect(()=>{l({type:oD,payLoad:i})},[i]),o.jsx(mD.Provider,{value:{taskOptions:e,state:s,dispatch:l},children:o.jsx(eD,{option:t,saveFormBuilderSchema:n,templateSchema:r,onChange:()=>{},children:a})})},Lee=()=>N.useContext(mD),mr=()=>{var De,ie,U,re,Q,se,be,me;const{taskOptions:n,state:r,dispatch:i}=Lee();if(r===void 0)throw new Error("Must be wrapped in task render provider");const a=r.task_status,s=r.task_status,l=r.userTaskSubmitFormData,c=r.userTrainingSaveData,u=r.taskSchema,d=r.assessmentData,f=r.progressLoading,h=r.submitting,m=r.httpRequest,g=r.taskData,v=r.progressMaxValue,A=r.maxTabs,S=r.tabNoOfFieldsData,x=r.registerData,w=r.progressValue,T=r.noOfTotalElements,C=r.menuList,_=r.loading,E=r.submitting,D=r.success,B=r.success_message,k=(De=n==null?void 0:n.exam)!=null&&De.startQuiz?(ie=n==null?void 0:n.exam)==null?void 0:ie.startQuiz:()=>{},P=(U=n==null?void 0:n.exam)!=null&&U.AddUserAssessmentAnswer?(re=n==null?void 0:n.exam)==null?void 0:re.AddUserAssessmentAnswer:()=>{},j=(Q=n==null?void 0:n.exam)!=null&&Q.endQuiz?(se=n==null?void 0:n.exam)==null?void 0:se.endQuiz:()=>{},M=(be=n==null?void 0:n.exam)!=null&&be.examComplete?(me=n==null?void 0:n.exam)==null?void 0:me.examComplete:ye=>{},H=n!=null&&n.updateTaskFormData?n==null?void 0:n.updateTaskFormData:(ye,Ie,Ee,he,V,te)=>{},de=n!=null&&n.submitTaskFormData?n==null?void 0:n.submitTaskFormData:(ye,Ie,Ee)=>{},fe=N.useCallback(ye=>i(Tee(ye)),[i]),ee=N.useCallback((ye,Ie,Ee)=>{console.log("form",ye)},[i]),G=N.useCallback(()=>i(_ee()),[i]),ae=N.useCallback((ye,Ie)=>i(Iee(ye,Ie)),[i]),Y=N.useCallback((ye,Ie)=>i(Eee(ye,Ie)),[i]),ge=N.useCallback(ye=>i(pD(ye)),[i]),ne=N.useCallback(ye=>i(Dee(ye)),[i]),J=N.useCallback(ye=>i(gD(ye)),[i]),K=N.useCallback(ye=>i(hD(ye)),[i]),oe=N.useCallback(ye=>i(Pee(ye)),[i]),ve=N.useCallback(ye=>i(Oee(ye)),[i]),Ce=N.useCallback((ye,Ie,Ee)=>i(Nee(ye,Ie,Ee)),[i]),Se=N.useCallback((ye,Ie,Ee)=>i(Fee(ye,Ie,Ee)),[i]),Te=N.useCallback((ye,Ie,Ee,he,V,te)=>i(Cee(ye,Ie,Ee,he,V,te)),[i]);return{examComplete:M,taskOptions:n,TASK_PUBLISHED:6,TASK_PENDING:1,taskStatus:s,assessmentData:d,taskSchema:u,taskData:g,TasksList:C,TasksLoading:_,TasksSuccess:D,TasksSuccessMessage:B,taskProgressMaxValue:v,taskRegisterData:x,taskProgressValue:w,taskMaxTabs:A,noOfTotalElements:T,taskTabRequiredFieldsData:S,userTaskSubmitFormData:l,userTrainingSaveData:c,TasksSubmitLoading:E,updateTaskDataSchema:fe,submitTaskFormData:de,updateTaskFormData:H,TasksSubmit:h,TasksHTTPRequest:m,updateTaskRegisterData:J,updateTaskProgressValue:ge,updateTaskProgressMaxValue:oe,updateUserFormDataSubmit:K,removeUserDataFormSectionRepeatableData:Y,addUserDataFormSectionRepeatableData:ae,onSetValuetoRepeatableData:Ce,onSetValuetoPostDataHook:Se,clearTaskSchema:G,taskProgressLoading:f,task_status:a,startQuiz:k,endQuiz:j,AddUserAssessmentAnswer:P,updateUserTraining:ve,taskFieldUpdateHook:Te,updateProgressDataValuesHook:ne,saveProgressDataHook:ee}};function $8(){return $8=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},$8.apply(this,arguments)}var vD=y.memo(y.forwardRef(function(t,e){var n=ti.getPTI(t);return y.createElement("svg",$8({ref:e,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),y.createElement("path",{d:"M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z",fill:"currentColor"}),y.createElement("path",{d:"M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z",fill:"currentColor"}),y.createElement("path",{d:"M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z",fill:"currentColor"}))}));vD.displayName="ExclamationTriangleIcon";function j8(){return j8=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},j8.apply(this,arguments)}var bD=y.memo(y.forwardRef(function(t,e){var n=ti.getPTI(t);return y.createElement("svg",j8({ref:e,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z",fill:"currentColor"}))}));bD.displayName="InfoCircleIcon";function z8(){return z8=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},z8.apply(this,arguments)}var H8=y.memo(y.forwardRef(function(t,e){var n=ti.getPTI(t);return y.createElement("svg",z8({ref:e,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z",fill:"currentColor"}))}));H8.displayName="TimesCircleIcon";function Y8(){return Y8=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Y8.apply(this,arguments)}function K8(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Bee(t){if(Array.isArray(t))return K8(t)}function Vee(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function yD(t,e){if(t){if(typeof t=="string")return K8(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K8(t,e)}}function Uee(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1598
1598
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X8(t){return Bee(t)||Vee(t)||yD(t)||Uee()}function qee(t){if(Array.isArray(t))return t}function $ee(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,l=[],c=!0,u=!1;try{if(a=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return l}}function jee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1599
1599
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G8(t,e){return qee(t)||$ee(t,e)||yD(t,e)||jee()}function _p(t){"@babel/helpers - typeof";return _p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_p(t)}function zee(t,e){if(_p(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(_p(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function AD(t){var e=zee(t,"string");return _p(e)==="symbol"?e:String(e)}function Co(t,e,n){return e=AD(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Hee=`
1600
1600
  @layer primereact {
@@ -4159,7 +4159,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
4159
4159
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $Ae(t,e){if(t){if(typeof t=="string")return $$(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $$(t,e)}}function $$(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function jAe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,s,l;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(c){a=!0,l=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw l}}return r}}function zAe(t){if(Array.isArray(t))return t}function HAe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function j$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function YAe(t,e,n){return e&&j$(t.prototype,e),n&&j$(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var KAe="["+h0+Tg+"]+",XAe=new RegExp("^"+KAe+"$","i"),GAe="(?:["+hye+"]["+h0+Tg+"]*|["+h0+Tg+"]+)",RAe=new RegExp("[^"+h0+Tg+"]+.*$"),WAe=/[^\d\[\]]/,QAe=function(){function t(e){var n=e.defaultCountry,r=e.defaultCallingCode,i=e.metadata,a=e.onNationalSignificantNumberChange;HAe(this,t),this.defaultCountry=n,this.defaultCallingCode=r,this.metadata=i,this.onNationalSignificantNumberChange=a}return YAe(t,[{key:"input",value:function(n,r){var i=ewe(n),a=q$(i,2),s=a[0],l=a[1],c=Ih(s),u;return l&&(r.digits||(r.startInternationalNumber(),c||(u=!0))),c&&this.inputDigits(c,r),{digits:c,justLeadingPlus:u}}},{key:"inputDigits",value:function(n,r){var i=r.digits,a=i.length<3&&i.length+n.length>=3;if(r.appendDigits(n),a&&this.extractIddPrefix(r),this.isWaitingForCountryCallingCode(r)){if(!this.extractCountryCallingCode(r))return}else r.appendNationalSignificantNumberDigits(n);r.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(r.getNationalDigits(),function(s){return r.update(s)})}},{key:"isWaitingForCountryCallingCode",value:function(n){var r=n.international,i=n.callingCode;return r&&!i}},{key:"extractCountryCallingCode",value:function(n){var r=iAe("+"+n.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=r.countryCallingCode,a=r.number;if(i)return n.setCallingCode(i),n.update({nationalSignificantNumber:a}),!0}},{key:"reset",value:function(n){if(n){this.hasSelectedNumberingPlan=!0;var r=n._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=r&&WAe.test(r)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(n,r){if(this.hasSelectedNumberingPlan){var i=mS(n,this.metadata),a=i.nationalPrefix,s=i.nationalNumber,l=i.carrierCode;if(s!==n)return this.onExtractedNationalNumber(a,l,s,n,r),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(n,r,i){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(n,i);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var a=mS(n,this.metadata),s=a.nationalPrefix,l=a.nationalNumber,c=a.carrierCode;if(l!==r)return this.onExtractedNationalNumber(s,c,l,n,i),!0}}},{key:"onExtractedNationalNumber",value:function(n,r,i,a,s){var l,c,u=a.lastIndexOf(i);if(u>=0&&u===a.length-i.length){c=!0;var d=a.slice(0,u);d!==n&&(l=d)}s({nationalPrefix:n,carrierCode:r,nationalSignificantNumber:i,nationalSignificantNumberMatchesInput:c,complexPrefixBeforeNationalSignificantNumber:l}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(n){if(this.extractAnotherNationalSignificantNumber(n.getNationalDigits(),n.nationalSignificantNumber,function(r){return n.update(r)}))return!0;if(this.extractIddPrefix(n))return this.extractCallingCodeAndNationalSignificantNumber(n),!0;if(this.fixMissingPlus(n))return this.extractCallingCodeAndNationalSignificantNumber(n),!0}},{key:"extractIddPrefix",value:function(n){var r=n.international,i=n.IDDPrefix,a=n.digits;if(n.nationalSignificantNumber,!(r||i)){var s=x$(a,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);if(s!==void 0&&s!==a)return n.update({IDDPrefix:a.slice(0,a.length-s.length)}),this.startInternationalNumber(n,{country:void 0,callingCode:void 0}),!0}}},{key:"fixMissingPlus",value:function(n){if(!n.international){var r=T$(n.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=r.countryCallingCode;if(r.number,i)return n.update({missingPlus:!0}),this.startInternationalNumber(n,{country:n.country,callingCode:i}),!0}}},{key:"startInternationalNumber",value:function(n,r){var i=r.country,a=r.callingCode;n.startInternationalNumber(i,a),n.nationalSignificantNumber&&(n.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(n){this.extractCountryCallingCode(n)&&this.extractNationalSignificantNumber(n.getNationalDigits(),function(r){return n.update(r)})}}]),t}();function JAe(t){var e=t.search(GAe);if(!(e<0)){t=t.slice(e);var n;return t[0]==="+"&&(n=!0,t=t.slice(1)),t=t.replace(RAe,""),n&&(t="+"+t),t}}function ZAe(t){var e=JAe(t)||"";return e[0]==="+"?[e.slice(1),!0]:[e]}function ewe(t){var e=ZAe(t),n=q$(e,2),r=n[0],i=n[1];return XAe.test(r)||(r=""),[r,i]}function twe(t,e){return awe(t)||iwe(t,e)||rwe(t,e)||nwe()}function nwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4160
4160
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rwe(t,e){if(t){if(typeof t=="string")return z$(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z$(t,e)}}function z$(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function iwe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,s,l;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(c){a=!0,l=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw l}}return r}}function awe(t){if(Array.isArray(t))return t}function swe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function H$(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function owe(t,e,n){return e&&H$(t.prototype,e),n&&H$(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var E5=function(){function t(e,n){swe(this,t),this.metadata=new uo(n);var r=this.getCountryAndCallingCode(e),i=twe(r,2),a=i[0],s=i[1];this.defaultCountry=a,this.defaultCallingCode=s,this.reset()}return owe(t,[{key:"getCountryAndCallingCode",value:function(n){var r,i;return n&&(A5(n)?(r=n.defaultCountry,i=n.defaultCallingCode):r=n),r&&!this.metadata.hasCountry(r)&&(r=void 0),[r,i]}},{key:"input",value:function(n){var r=this.parser.input(n,this.state),i=r.digits,a=r.justLeadingPlus;if(a)this.formattedOutput="+";else if(i){this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state);var s;if(this.metadata.hasSelectedNumberingPlan()&&(s=this.formatter.format(i,this.state)),s===void 0&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var l=this.state.getNationalDigits();l&&(s=this.formatter.format(l,this.state))}this.formattedOutput=s?this.getFullNumber(s):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var n=this;return this.state=new dAe({onCountryChange:function(i){n.country=i},onCallingCodeChange:function(i,a){n.metadata.selectNumberingPlan(a,i),n.formatter.reset(n.metadata.numberingPlan,n.state),n.parser.reset(n.metadata.numberingPlan)}}),this.formatter=new UAe({state:this.state,metadata:this.metadata}),this.parser=new QAe({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){n.determineTheCountryIfNeeded(),n.formatter.reset(n.metadata.numberingPlan,n.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){var n=this.state.digits;if(n)return this._getCountry()}},{key:"_getCountry",value:function(){var n=this.state.country;return n}},{key:"determineTheCountryIfNeeded",value:function(){(!this.state.country||this.isCountryCallingCodeAmbiguous())&&this.determineTheCountry()}},{key:"getFullNumber",value:function(n){var r=this;if(this.isInternational()){var i=function(l){return r.formatter.getInternationalPrefixBeforeCountryCallingCode(r.state,{spacing:!!l})+l},a=this.state.callingCode;return i(a?n?"".concat(a," ").concat(n):a:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return n}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var n=this.state,r=n.nationalSignificantNumber,i=n.complexPrefixBeforeNationalSignificantNumber,a=n.nationalPrefix,s=r,l=i||a;return l&&(s=l+s),s}},{key:"getNonFormattedNumber",value:function(){var n=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(n?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:"getNonFormattedTemplate",value:function(){var n=this.getNonFormattedNumber();if(n)return n.replace(/[\+\d]/g,Uc)}},{key:"isCountryCallingCodeAmbiguous",value:function(){var n=this.state.callingCode,r=this.metadata.getCountryCodesForCallingCode(n);return r&&r.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(lAe(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,defaultCountry:this.defaultCountry,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var n=this.state,r=n.digits,i=n.callingCode,a=n.country,s=n.nationalSignificantNumber;if(r){if(this.isInternational())return i?"+"+i+s:"+"+r;if(a||i){var l=a?this.metadata.countryCallingCode():i;return"+"+l+s}}}},{key:"getNumber",value:function(){var n=this.state,r=n.nationalSignificantNumber,i=n.carrierCode,a=n.callingCode,s=this._getCountry();if(r&&!(!s&&!a)){if(s&&s===this.defaultCountry){var l=new uo(this.metadata.metadata);l.selectNumberingPlan(s);var c=l.numberingPlan.callingCode(),u=this.metadata.getCountryCodesForCallingCode(c);if(u.length>1){var d=I$(r,{countries:u,defaultCountry:this.defaultCountry,metadata:this.metadata.metadata});d&&(s=d)}}var f=new Jye(s||a,r,this.metadata.metadata);return i&&(f.carrierCode=i),f}}},{key:"isPossible",value:function(){var n=this.getNumber();return n?n.isPossible():!1}},{key:"isValid",value:function(){var n=this.getNumber();return n?n.isValid():!1}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}]),t}();function lwe(t,e,n){return n||(n=e,e=void 0),new E5(e,n).input(t)}function Y$(t){var e=t.country,n=t.international,r=t.withCountryCallingCode,i=t.metadata;return e&&n&&!r?"+".concat(D1(e,i)):""}function wS(t,e){return e&&(t=t.slice(e.length),t[0]===" "&&(t=t.slice(1))),t}function cwe(t,e,n){if(!(n&&n.ignoreRest)){var r=function(a){if(n)switch(a){case"end":n.ignoreRest=!0;break}};return c$(t,e,r)}}function K$(t){var e=t.onKeyDown,n=t.international;return N.useCallback(function(r){if(r.keyCode===uwe&&n&&r.target instanceof HTMLInputElement&&dwe(r.target)===fwe){r.preventDefault();return}e&&e(r)},[e,n])}var uwe=8;function dwe(t){return t.selectionStart}var fwe=1,hwe=["onKeyDown","country","international","withCountryCallingCode","metadata"];function SS(){return SS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},SS.apply(this,arguments)}function pwe(t,e){if(t==null)return{};var n=gwe(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function gwe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function mwe(t){function e(n,r){var i=n.onKeyDown,a=n.country,s=n.international,l=n.withCountryCallingCode,c=n.metadata,u=c===void 0?t:c,d=pwe(n,hwe),f=N.useCallback(function(m){var g=new E5(a,u),v=Y$({country:a,international:s,withCountryCallingCode:l,metadata:u}),A=g.input(v+m),S=g.getTemplate();return v&&(A=wS(A,v),S&&(S=wS(S,v))),{text:A,template:S}},[a,u]),h=K$({onKeyDown:i,international:s});return N.createElement(iye,SS({},d,{ref:r,parse:cwe,format:f,onKeyDown:h}))}return e=N.forwardRef(e),e.propTypes={value:vn.string.isRequired,onChange:vn.func.isRequired,onKeyDown:vn.func,country:vn.string,international:vn.bool,withCountryCallingCode:vn.bool,metadata:vn.object},e}const vwe=mwe();var bwe=["value","onChange","onKeyDown","country","international","withCountryCallingCode","metadata","inputComponent"];function xS(){return xS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},xS.apply(this,arguments)}function ywe(t,e){if(t==null)return{};var n=Awe(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Awe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function wwe(t){function e(n,r){var i=n.value,a=n.onChange,s=n.onKeyDown,l=n.country,c=n.international,u=n.withCountryCallingCode,d=n.metadata,f=d===void 0?t:d,h=n.inputComponent,m=h===void 0?"input":h,g=ywe(n,bwe),v=Y$({country:l,international:c,withCountryCallingCode:u,metadata:f}),A=N.useCallback(function(x){var w=_ye(x.target.value);if(w===i){var T=X$(v,w,l,f);T.indexOf(x.target.value)===0&&(w=w.slice(0,-1))}a(w)},[v,i,a,l,f]),S=K$({onKeyDown:s,international:c});return N.createElement(m,xS({},g,{ref:r,value:X$(v,i,l,f),onChange:A,onKeyDown:S}))}return e=N.forwardRef(e),e.propTypes={value:vn.string.isRequired,onChange:vn.func.isRequired,onKeyDown:vn.func,country:vn.string,international:vn.bool,withCountryCallingCode:vn.bool,metadata:vn.object,inputComponent:vn.elementType},e}const Swe=wwe();function X$(t,e,n,r){return wS(lwe(t+e,n,r),t)}var xwe=vn.shape({country_calling_codes:vn.object.isRequired,countries:vn.object.isRequired});vn.objectOf(vn.string);function G$(t,e){var n="+"+D1(t,e);return n}function Eg(t,e){return Iwe(t)||Ewe(t,e)||Twe(t,e)||Cwe()}function Cwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4161
4161
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Twe(t,e){if(t){if(typeof t=="string")return R$(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return R$(t,e)}}function R$(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ewe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,l=[],c=!0,u=!1;try{if(a=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return l}}function Iwe(t){if(Array.isArray(t))return t}function _we(t){var e=this,n=t.value,r=t.onChange,i=t.country,a=t.defaultCountry,s=t.international,l=t.withCountryCallingCode,c=t.useNationalFormatForDefaultCountryValue,u=t.metadata,d=N.useRef(),f=function(Y,ge,ne){console.error("[react-phone-number-input] Expected phone number ".concat(Y," to correspond to country ").concat(ge," but ").concat(ne?"in reality it corresponds to country "+ne:"it doesn't",".")),d.current=!0},h=function(Y){return Dwe(n,i,s,l,a,c,u,function(){Y&&Y.onCountryMismatch&&Y.onCountryMismatch();for(var ge=arguments.length,ne=new Array(ge),J=0;J<ge;J++)ne[J]=arguments[J];f.apply(e,ne)})},m=N.useState(i),g=Eg(m,2),v=g[0],A=g[1],S=N.useState(a),x=Eg(S,2),w=x[0],T=x[1],C=N.useState(h()),_=Eg(C,2),E=_[0],D=_[1],B=N.useState(n),k=Eg(B,2),P=k[0],j=k[1],M=N.useState(),H=Eg(M,2);H[0];var de=H[1],fe=N.useCallback(function(){return de({})},[de]);function ee(ae){if(ae){i&&s&&!l&&(ae="+".concat(D1(i,u)).concat(ae));var Y=new E5(i||a,u);return Y.input(ae),Y.getNumberValue()}}N.useEffect(function(){n!==P&&(j(n),D(h()))},[n]),N.useEffect(function(){if(i!==v){A(i);var ae,Y=h({onCountryMismatch:function(){ae=!0}});D(Y),ae&&j(ee(Y))}},[i]),N.useEffect(function(){a!==w&&(T(a),D(h()))},[a]),N.useEffect(function(){P!==n&&r(P)},[P]);var G=N.useCallback(function(ae){var Y;if(i)if(s&&l){var ge=G$(i,u);if(ae.indexOf(ge)!==0){if(ae&&ae[0]!=="+")ae=ge+ae;else if(!d.current)return D(ge),j(void 0),fe()}}else ae&&ae[0]==="+"&&(ae=ae.slice(1));else a||ae&&ae[0]!=="+"&&(ae="+"+ae);ae&&(Y=ee(ae)),D(ae),j(Y)},[i,s,l,a,u,D,j,fe,d]);return[E,G]}function Dwe(t,e,n,r,i,a,s,l){if(e&&n&&r){var c=G$(e,s);return t?(t.indexOf(c)!==0&&l(t,e),t):c}if(!t)return"";if(!e&&!i)return t;var u=new E5(void 0,s);u.input(t);var d=u.getNumber();return d?e?(d.country&&d.country!==e?l(t,e,d.country):d.countryCallingCode!==D1(e,s)&&l(t,e),n?d.nationalNumber:Ih(d.formatNational())):d.countryCallingCode&&d.countryCallingCode===D1(i,s)&&a?Ih(d.formatNational()):t:""}var Owe=["Component","country","defaultCountry","useNationalFormatForDefaultCountryValue","value","onChange","metadata","international","withCountryCallingCode"];function CS(){return CS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},CS.apply(this,arguments)}function Nwe(t,e){return Mwe(t)||kwe(t,e)||Pwe(t,e)||Fwe()}function Fwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4162
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pwe(t,e){if(t){if(typeof t=="string")return W$(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return W$(t,e)}}function W$(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function kwe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,l=[],c=!0,u=!1;try{if(a=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return l}}function Mwe(t){if(Array.isArray(t))return t}function Lwe(t,e){if(t==null)return{};var n=Bwe(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Bwe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function I5(t,e){var n=t.Component,r=t.country,i=t.defaultCountry,a=t.useNationalFormatForDefaultCountryValue,s=a===void 0?!0:a,l=t.value,c=t.onChange,u=t.metadata,d=t.international,f=t.withCountryCallingCode,h=Lwe(t,Owe),m=_we({value:l,onChange:c,country:r,defaultCountry:i,international:d,withCountryCallingCode:f,useNationalFormatForDefaultCountryValue:s,metadata:u}),g=Nwe(m,2),v=g[0],A=g[1];return N.createElement(n,CS({},h,{ref:e,metadata:u,international:d,withCountryCallingCode:f,country:r||i,value:v,onChange:A}))}I5=N.forwardRef(I5),I5.propTypes={value:vn.string,onChange:vn.func.isRequired,country:vn.string,defaultCountry:vn.string,international:vn.bool,withCountryCallingCode:vn.bool,Component:vn.elementType.isRequired,useNationalFormatForDefaultCountryValue:vn.bool,metadata:xwe};const Vwe=I5;var Uwe=["type","autoComplete","smartCaret","metadata"];function TS(){return TS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},TS.apply(this,arguments)}function qwe(t,e){if(t==null)return{};var n=$we(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function $we(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Q$(t){function e(n,r){var i=n.type,a=i===void 0?"tel":i,s=n.autoComplete,l=s===void 0?"tel":s,c=n.smartCaret,u=c===void 0?!0:c,d=n.metadata,f=d===void 0?t:d,h=qwe(n,Uwe);return N.createElement(Vwe,TS({},h,{type:a,autoComplete:l,metadata:f,ref:r,Component:u?vwe:Swe}))}return e=N.forwardRef(e),e.propTypes={type:vn.string,autoComplete:vn.string,smartCaret:vn.bool,metadata:vn.object},e}Q$();const jwe=Q$(Lbe),zwe=t=>{var K,oe,ve,Ce,Se,Te,De,ie,U,re,Q;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a,TASK_PUBLISHED:s,task_status:l}=mr(),{userSelectedLanguage:c,fieldSettingUpdate:u}=on(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:m,row:g,rowIndex:v,columnIndex:A,isDisabled:S}=t,{isAdmin:x,isRenderView:w,isPreview:T}=Zt(),[C,_]=N.useState(!1),[E,D]=N.useState(""),[B,k]=N.useState(0),[P,j]=N.useState(!1),[M,H]=N.useState(!1),de=()=>{H(!0)},fe=()=>{H(!1)},ee=()=>{var se,be,me;if(g!=null&&g.rowIsRepeatable){if(g!=null&&g.repeatableFields){const ye=[...g.repeatableFields],Ie=_t.findIndex(ye,function(Ee){return Ee.uuid===(d==null?void 0:d.uuid)});Ie>=0&&ye[Ie].fieldData?D(ye[Ie].fieldData):D("")}}else{const ye=a;if(ye!=null&&ye.length){for(const Ie of ye)if(Ie.fieldId===t.field.uuid&&((se=Ie==null?void 0:Ie.postData[0])==null?void 0:se.postValue)!==""&&((be=Ie==null?void 0:Ie.postData[0])!=null&&be.postValue)){D((me=Ie==null?void 0:Ie.postData[0])==null?void 0:me.postValue);break}}}j(!0)};N.useEffect(()=>{P||ee();const se=Xt.addListener("clearRepeatableFields",Ie=>{Ie===(g==null?void 0:g.uuid)&&(D(""),k(0),d.isValid=0,u(m,h,v,A,f,d))}),be=Xt.addListener("onSubmitUserForm",()=>{var Ie;(Ie=d==null?void 0:d.attributes)!=null&&Ie.required?E?d.isValid=1:d.isValid=0:d.isValid=1}),me=Xt.addListener("OnInvalidFieldCatch",Ie=>{d.uuid===(Ie==null?void 0:Ie.fieldId)?k(1):k(0)}),ye=Xt.addListener("OnGetFieldValue",Ie=>{var he;const Ee=(he=Ie==null?void 0:Ie.repeatableColumn)==null?void 0:he.filter(V=>(V==null?void 0:V.fieldUuid)===(d==null?void 0:d.uuid));Ee!=null&&Ee.length});return()=>{be.remove(),me.remove(),ye.remove(),se.remove()}});const G=se=>{_(se)},ae=()=>{_(!1)},Y=(se,be)=>{const me=a,ye=_t.cloneDeep(e);if(be){if(ye[d==null?void 0:d.uuid]=se,(me==null?void 0:me.length)>0)for(const Ie of me)Ie.fieldId===t.field.uuid&&(Ie.postData[0]={postValue:se})}else if(delete ye[d==null?void 0:d.uuid],(me==null?void 0:me.length)>0)for(const Ie of me)Ie.fieldId===t.field.uuid&&(Ie.postData[0]={postValue:se});if(!(g!=null&&g.rowIsRepeatable)){n(ye);const Ie=Object.keys(ye).length;r(Ie)}},ge=(se,be)=>{var me;if(a){const ye=[...a],Ie=_t.findIndex(ye,function(he){return he.rowId===(g==null?void 0:g.uuid)});let Ee=(me=a[Ie])==null?void 0:me.repeatableFields;Ee={...Ee,[se==null?void 0:se.uuid]:be},ye[Ie]={...ye[Ie],repeatableFields:Ee},i(ye)}D(be),be!==""?se.isValid=1:se.isValid=0},ne=se=>{g!=null&&g.rowIsRepeatable?ge(d,se):Y(se,!0)},J=o.jsxs("div",{onMouseOver:de,onMouseOut:fe,children:[!w&&!T&&M&&o.jsx(jr,{handleFieldSettingsSidebar:G,...t}),o.jsxs("div",{className:`field ${T?" ":" builder-element-wrapper "}${(d==null?void 0:d.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:T?"col-12 ":"col-12 p-fluid",children:[(d==null?void 0:d.showHeaderText)&&o.jsx("h6",{children:(K=d==null?void 0:d.headerText)==null?void 0:K[c==null?void 0:c.type]}),(d==null?void 0:d.showLabel)&&o.jsxs("label",{htmlFor:f,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((oe=d==null?void 0:d.attributes)==null?void 0:oe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",T?o.jsx(o.Fragment,{children:(ve=d==null?void 0:d.label)==null?void 0:ve[c==null?void 0:c.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(d==null?void 0:d.showToolTip)&&o.jsx(Mi,{message:(Ce=d==null?void 0:d.toolTip)==null?void 0:Ce[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(d==null?void 0:d.iconAlignment),children:[(d==null?void 0:d.showIcon)&&o.jsx("i",{className:"pi pi-"+((Te=(Se=d==null?void 0:d.icon)==null?void 0:Se.properties)==null?void 0:Te.name)}),o.jsx(jwe,{id:d==null?void 0:d.uuid,placeholder:(De=d==null?void 0:d.placeholder)==null?void 0:De[c==null?void 0:c.type],value:E,onFocus:()=>k(1),onChange:ne,international:!0,className:`${B===1&&((ie=d==null?void 0:d.attributes)!=null&&ie.required)?E?"valid":"invalid":"valid'"} p-inputtext`,readOnly:S})]}),o.jsx("div",{children:((U=d==null?void 0:d.attributes)==null?void 0:U.required)&&o.jsx("small",{className:"error",children:B===1&&!E?(re=d==null?void 0:d.validationMesssage)==null?void 0:re.english:""})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(Q=d==null?void 0:d.helperText)==null?void 0:Q[c==null?void 0:c.type]})})]})]})}),x&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[C===!0&&o.jsx(Xi,{visibilty:C,closeSettingFieldSidebar:ae,...t}),o.jsx(wi,{...t,fieldWrap:J})]})},Hwe=t=>{var Y,ge,ne,J,K,oe,ve,Ce,Se,Te,De;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,row:a,isDisabled:s}=t,{isPreview:l,isAdmin:c,isRenderView:u}=Zt(),{task_status:d,taskRegisterData:f,updateTaskRegisterData:h,updateTaskProgressValue:m,updateUserFormDataSubmit:g,userTaskSubmitFormData:v,TASK_PUBLISHED:A}=mr(),{userSelectedLanguage:S}=on(),[x,w]=N.useState(!1),[T,C]=N.useState(""),[_,E]=N.useState(0),[D,B]=N.useState(!1),k=()=>{B(!0)},P=()=>{B(!1)};N.useEffect(()=>{x||fe();const ie=Xt.addListener("clearRepeatableFields",re=>{re===(a==null?void 0:a.uuid)&&(C(""),E(0),e.isValid=0)}),U=Xt.addListener("onSubmitUserForm",()=>{var re;(re=e==null?void 0:e.attributes)!=null&&re.required?T!==""&&lu.test(T)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{U.remove(),ie.remove()}});const[j,M]=N.useState(!1),H=ie=>{M(ie)},de=()=>{M(!1)},fe=()=>{var ie,U,re;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const Q=[...a.repeatableFields],se=_t.findIndex(Q,function(be){return be.uuid===(e==null?void 0:e.uuid)});se>=0&&Q[se].fieldData?C(Q[se].fieldData):C("")}}else{const Q=v;if(Q!=null&&Q.length){for(const se of Q)if(se.fieldId===t.field.uuid&&((ie=se==null?void 0:se.postData[0])==null?void 0:ie.postValue)!==""&&((U=se==null?void 0:se.postData[0])!=null&&U.postValue)){C((re=se==null?void 0:se.postData[0])==null?void 0:re.postValue),w(!0);break}}}w(!0)},ee=ie=>{C(ie);const U=v,re=_t.cloneDeep(f);if(ie!==""&&lu.test(ie)===!0){if(re[e==null?void 0:e.uuid]=ie,(U==null?void 0:U.length)>0)for(const Q of U)Q.fieldId===t.field.uuid&&(Q.postData[0]={postValue:ie})}else if(delete re[e==null?void 0:e.uuid],(U==null?void 0:U.length)>0)for(const Q of U)Q.fieldId===t.field.uuid&&(Q.postData[0]={postValue:""});if(!(a!=null&&a.rowIsRepeatable)){h(re);const Q=Object.keys(re).length;m(Q)}},G=(ie,U)=>{var ye;const re=[...v],Q=_t.findIndex(re,function(Ie){return Ie.rowId===(a==null?void 0:a.uuid)});let se=(ye=v[Q])==null?void 0:ye.repeatableFields;const be=ie,me=be==null?void 0:be.uuid;se={...se,[me]:U},re[Q]={...re[Q],repeatableFields:se},g(re),C(U),U!==""&&lu.test(U)===!0?e.isValid=1:e.isValid=0},ae=o.jsxs("div",{onMouseOver:k,onMouseOut:P,children:[!u&&!l&&D&&o.jsx(jr,{handleFieldSettingsSidebar:H,...t}),o.jsxs("div",{className:`field ${l?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid"}),(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(Y=e==null?void 0:e.headerText)==null?void 0:Y[S==null?void 0:S.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((ge=e==null?void 0:e.attributes)==null?void 0:ge.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",l?o.jsx(o.Fragment,{children:(ne=e==null?void 0:e.label)==null?void 0:ne[S==null?void 0:S.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(J=e==null?void 0:e.toolTip)==null?void 0:J[S==null?void 0:S.type],position:"right"})})]}),o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((oe=(K=e==null?void 0:e.icon)==null?void 0:K.properties)==null?void 0:oe.name)}),o.jsx(gn,{id:e==null?void 0:e.uuid,placeholder:(ve=e==null?void 0:e.placeholder)==null?void 0:ve[S==null?void 0:S.type],value:T,onFocus:()=>E(1),onChange:ie=>{a!=null&&a.rowIsRepeatable?G(r,i):ee(ie.target.value)},className:_===1&&((Ce=e==null?void 0:e.attributes)!=null&&Ce.required)?T?"valid":"invalid":"valid'",readOnly:s})]}),((Se=e==null?void 0:e.attributes)==null?void 0:Se.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:_===1&&!T?(Te=e==null?void 0:e.validationMesssage)==null?void 0:Te[S==null?void 0:S.type]:""})}),T!==""&&_===1&&lu.test(T)===!1&&o.jsx("small",{className:"error",children:"Please enter correct url"}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(De=e==null?void 0:e.helperText)==null?void 0:De[S==null?void 0:S.type]})})]}),c&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]});return o.jsxs(o.Fragment,{children:[j===!0&&o.jsx(Xi,{visibilty:j,closeSettingFieldSidebar:de,...t},e==null?void 0:e.uuid),o.jsx(wi,{...t,fieldWrap:ae})]})},Ywe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAwAAAAMACAYAAACTgQCOAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAACAAElEQVR42u3deXxcdb3/8ffnTLaWthSUVVuaTMIWKc2cpLWi/oqIeK+4XisuoKDodUNx38H9Ku67IhdwB6NeF1xBqQrWNjOTUgxbM0kLyKp0b7PMnM/vj1ZFtiazZc7M6/l4+LhXxTZ5nzPnfN9zvt/vMQEAakI6DJv3j6L5gft8NTfPN/f5cp8fuR+gIJhv7vNdag7M5sm91aXZkvaTe4uk/c2sSdL+kuRSQtK8h/hr5khqfsB/Nilpx0P8s9tMKuz9/7e6e17SVplNSNpp0i6ZjUfu20yadLMtiqItgdlmmW1xsy2anNwSmW3ZGgRbejOZSY4yAMw8IwIAqAxfuTKxcePGg6IoOsjMDlUUHeJBcJBJh8n9YHc/2MwOdelgSfMl7VfnkeyUtMWke1y606R73f1uBcFdFkX3Kgjudve7giC4d9GiRfdaf3+BswgAKAAAUDM2HXfcARNtbYcH0mFeKHRYEBxu0mEeRR1m1uHSQklNJFW0zZJGJI2YdKdLd5g04tKdhSC4o2tgYKNJETEBAAUAAMoiHYbN892PkNQZSEkPgk65d7qUNKldUhspzagxl0bNbFhRNGxSzqThgpTbYraJKUcAQAEAgIc0vHjxwWpu7jbpGEndkjolJSUdIb7Bj6u8pE0uDZvZsNyHXLrJo+gvXYOD9xIPAAoAADSATccdd0C+paXb3Y8NzLrd/ViZdUs6jHQaymZJI+5+g5kNmfsN+URiqGtgYNQkJx4AFAAAiKFbe3oOz5uFHgSh3ENJvZIOJRk8gi2ShkzKRGYZN8t0DgzcyDoDABQAAKghvnJlYmRk5Fh3DwOzHpd6JB2vh94CE5iubTJbJ/dBlwZNyn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Pfp8SRWXhnk98AfAO3p0iVsZZfXU2Sj1mQUgozTC4cAPSRzQxY99kOB3osk1XfxMSTWWhjmHySJweBc/9iGCVb4GOB+3ADKKJr8isRa6chveGME6tnCck7+kbooW15M4AbgSunKA+CESb3Pyz8sVgAJIP+YQxvkz4PRZfsRNwGejxb90MZYkvUIa5njgi8DaWX7EdxjgQz5/JD8LQEFMvbnrIyR+l+kvs/0UuDxa/GUPo0nSK6Rh3kPiKoKl0/wt9xD8O1bwxxF0ehpO02IBKJipw4HvBN4NrAZez4tvDxwD/pnE90n8T9p8128kSbmkRINh3gScT3AqcAIwb+qXJ4C7gO8Df8kG/tqH/RSLBaDg0nUMcByLATiJzU74kooqJRr8hL0B+BmjTviSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJKnG/n/K52f+BC6LdAAAAABJRU5ErkJggg==",Gwe=t=>{var ae,Y,ge,ne,J,K,oe,ve,Ce;const{field:e,pageIndex:n,sectionIndex:r,row:i,isDisabled:a}=t,{isAdmin:s,isPreview:l,isRenderView:c}=Zt(),{task_status:u,taskRegisterData:d,updateTaskRegisterData:f,updateTaskProgressValue:h,updateUserFormDataSubmit:m,userTaskSubmitFormData:g,TASK_PUBLISHED:v}=mr(),{userSelectedLanguage:A}=on(),[S,x]=N.useState(!1),[w,T]=N.useState(""),[C,_]=N.useState(0),[E,D]=N.useState(!1),B=()=>{D(!0)},k=()=>{D(!1)};N.useEffect(()=>{S||de();const Se=Xt.addListener("clearRepeatableFields",De=>{De===(i==null?void 0:i.uuid)&&(T(""),_(0),e.isValid=0)}),Te=Xt.addListener("onSubmitUserForm",()=>{var De;(De=e==null?void 0:e.attributes)!=null&&De.required?w!==""&&lu.test(w)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{Te.remove(),Se.remove()}});const[P,j]=N.useState(!1),M=Se=>{j(Se)},H=()=>{j(!1)},de=()=>{var Se,Te,De;if(i!=null&&i.rowIsRepeatable){const ie=[...(i==null?void 0:i.repeatableFields)||[]],U=_t.findIndex(ie,function(re){return re.uuid===(e==null?void 0:e.uuid)});U>=0&&ie[U].fieldData?T(ie[U].fieldData):T("")}else{const ie=g;if(ie!=null&&ie.length){for(const U of ie)if(U.fieldId===t.field.uuid&&((Se=U==null?void 0:U.postData[0])==null?void 0:Se.postValue)!==""&&((Te=U==null?void 0:U.postData[0])!=null&&Te.postValue)){T((De=U==null?void 0:U.postData[0])==null?void 0:De.postValue),x(!0);break}}}x(!0)},fe=(Se,Te)=>{T(Te);const De=g,ie=_t.cloneDeep(d);if(De!==null){if(Te){if(ie[e==null?void 0:e.uuid]=Te,(De==null?void 0:De.length)>0)for(const U of De)U.fieldId===t.field.uuid&&(U.postData[0]={postValue:Te})}else if(delete ie[e==null?void 0:e.uuid],(De==null?void 0:De.length)>0)for(const U of De)U.fieldId===t.field.uuid&&(U.postData[0]={postValue:""})}if(!(i!=null&&i.rowIsRepeatable)){f(ie);const U=Object.keys(ie).length;h(U)}},ee=(Se,Te,De,ie)=>{var se;const U=[...g],re=_t.findIndex(U,function(be){return be.rowId===(i==null?void 0:i.uuid)});let Q=(se=g[re])==null?void 0:se.repeatableFields;Q={...Q,[De==null?void 0:De.uuid]:ie},U[re]={...U[re],repeatableFields:Q},m(U),T(ie),ie!==""&&lu.test(ie)===!0?e.isValid=1:e.isValid=0},G=o.jsxs("div",{onMouseOver:B,onMouseOut:k,children:[!c&&!l&&E&&o.jsx(jr,{handleFieldSettingsSidebar:M,...t}),o.jsxs("div",{className:`field ${l?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:s?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(ae=e==null?void 0:e.headerText)==null?void 0:ae[A==null?void 0:A.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((Y=e==null?void 0:e.attributes)==null?void 0:Y.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",l?o.jsx(o.Fragment,{children:(ge=e==null?void 0:e.label)==null?void 0:ge[A==null?void 0:A.type]}):o.jsx(Zi,{...t}),(e==null?void 0:e.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(Mi,{message:(ne=e==null?void 0:e.toolTip)==null?void 0:ne[A==null?void 0:A.type],position:"right"})})]}),o.jsx("div",{children:o.jsx(N6,{cancelIcon:o.jsx("img",{src:Ywe,alt:"custom-cancel-image",width:"25px",height:"25px"}),offIcon:o.jsx("img",{src:Kwe,alt:"custom-image-active",width:"25px",height:"25px"}),onIcon:o.jsx("img",{src:Xwe,alt:"custom-image",width:"25px",height:"25px"}),id:e==null?void 0:e.uuid,placeholder:(J=e==null?void 0:e.placeholder)==null?void 0:J[A==null?void 0:A.type],value:w,onFocus:()=>_(1),onChange:Se=>{i!=null&&i.rowIsRepeatable?ee(n,r,e,Se.value):fe(Se,Se.value)},className:C===1&&((K=e==null?void 0:e.attributes)!=null&&K.required)?w?"valid":"invalid":"valid'",readOnly:a})}),((oe=e==null?void 0:e.attributes)==null?void 0:oe.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:C===1&&!w?(ve=e==null?void 0:e.validationMesssage)==null?void 0:ve[A==null?void 0:A.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(Ce=e==null?void 0:e.helperText)==null?void 0:Ce[A==null?void 0:A.type]})})]})}),s&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[P===!0&&o.jsx(Xi,{visibilty:P,closeSettingFieldSidebar:H,...t},e==null?void 0:e.uuid),o.jsx(wi,{...t,fieldWrap:G})]})},Rwe=t=>{var ae,Y,ge,ne,J,K,oe,ve,Ce;const{field:e,pageIndex:n,sectionIndex:r,row:i,isDisabled:a}=t,{isPreview:s,isAdmin:l,isRenderView:c}=Zt(),{task_status:u,taskRegisterData:d,updateTaskRegisterData:f,updateTaskProgressValue:h,updateUserFormDataSubmit:m,userTaskSubmitFormData:g,TASK_PUBLISHED:v}=mr(),{userSelectedLanguage:A}=on(),[S,x]=N.useState(!1),[w,T]=N.useState(""),[C,_]=N.useState(0),[E,D]=N.useState(!1),B=()=>{D(!0)},k=()=>{D(!1)};N.useEffect(()=>{S||de();const Se=Xt.addListener("clearRepeatableFields",De=>{De===(i==null?void 0:i.uuid)&&(T(""),_(0),e.isValid=0)}),Te=Xt.addListener("onSubmitUserForm",()=>{var De;(De=e==null?void 0:e.attributes)!=null&&De.required?w!==""&&lu.test(w)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{Te.remove(),Se.remove()}});const[P,j]=N.useState(!1),M=Se=>{j(Se)},H=()=>{j(!1)},de=()=>{var Se,Te,De;if(i!=null&&i.rowIsRepeatable){if(i!=null&&i.repeatableFields){const ie=[...i.repeatableFields],U=_t.findIndex(ie,function(re){return re.uuid===(e==null?void 0:e.uuid)});U>=0&&ie[U].fieldData?T(ie[U].fieldData):T("")}}else{const ie=g;if(ie!=null&&ie.length){for(const U of ie)if(U.fieldId===t.field.uuid&&((Se=U==null?void 0:U.postData[0])==null?void 0:Se.postValue)!==""&&((Te=U==null?void 0:U.postData[0])!=null&&Te.postValue)){T((De=U==null?void 0:U.postData[0])==null?void 0:De.postValue),x(!0);break}}}x(!0)},fe=(Se,Te)=>{T(Te);const De=g,ie=_t.cloneDeep(d);if(De!==null){if(Te){if(ie[e==null?void 0:e.uuid]=Te,(De==null?void 0:De.length)>0)for(const U of De)U.fieldId===t.field.uuid&&(U.postData[0]={postValue:Te})}else if(delete ie[e==null?void 0:e.uuid],(De==null?void 0:De.length)>0)for(const U of De)U.fieldId===t.field.uuid&&(U.postData[0]={postValue:""})}if(!(i!=null&&i.rowIsRepeatable)){f(ie);const U=Object.keys(ie).length;h(U)}},ee=(Se,Te,De,ie)=>{var se;const U=[...g],re=_t.findIndex(U,function(be){return be.rowId===(i==null?void 0:i.uuid)});let Q=(se=g[re])==null?void 0:se.repeatableFields;Q={...Q,[De==null?void 0:De.uuid]:ie},U[re]={...U[re],repeatableFields:Q},m(U),T(ie),ie!==""&&lu.test(ie)===!0?e.isValid=1:e.isValid=0},G=o.jsxs("div",{onMouseOver:B,onMouseOut:k,children:[!c&&!s&&E&&o.jsx(jr,{handleFieldSettingsSidebar:M,...t}),o.jsx("div",{className:`field ${s?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:s?"col-12 p-fluid":"col-12 p-fluid field-form-builder",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(ae=e==null?void 0:e.headerText)==null?void 0:ae[A==null?void 0:A.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((Y=e==null?void 0:e.attributes)==null?void 0:Y.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",s?o.jsx(o.Fragment,{children:(ge=e==null?void 0:e.label)==null?void 0:ge[A==null?void 0:A.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(ne=e==null?void 0:e.toolTip)==null?void 0:ne[A==null?void 0:A.type],position:"right"})})]}),o.jsx(k6,{id:e==null?void 0:e.uuid,placeholder:(J=e==null?void 0:e.placeholder)==null?void 0:J[A==null?void 0:A.type],value:w,onFocus:()=>_(1),onChange:Se=>{i!=null&&i.rowIsRepeatable?ee(n,r,e,Se.value):fe(Se,Se.value)},className:C===1&&((K=e==null?void 0:e.attributes)!=null&&K.required)?w?"valid":"invalid":"valid'",readOnly:a}),((oe=e==null?void 0:e.attributes)==null?void 0:oe.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:C===1&&!w?(ve=e==null?void 0:e.validationMesssage)==null?void 0:ve[A==null?void 0:A.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(Ce=e==null?void 0:e.helperText)==null?void 0:Ce[A==null?void 0:A.type]})})]}),l&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[P===!0&&o.jsx(Xi,{visibilty:P,closeSettingFieldSidebar:H,...t},e==null?void 0:e.uuid),o.jsx(wi,{...t,fieldWrap:G})]})},Wwe=t=>{var G,ae,Y,ge,ne,J;const{field:e,pageIndex:n,sectionIndex:r,row:i}=t,{isPreview:a,isAdmin:s,isRenderView:l}=Zt(),{task_status:c,taskRegisterData:u,updateTaskRegisterData:d,updateTaskProgressValue:f,updateUserFormDataSubmit:h,userTaskSubmitFormData:m,TASK_PUBLISHED:g}=mr(),{userSelectedLanguage:v}=on(),[A,S]=N.useState(!1),[x,w]=N.useState(""),[T,C]=N.useState(0),[_,E]=N.useState(!1),D=()=>{E(!0)},B=()=>{E(!1)};N.useEffect(()=>{A||H();const K=Xt.addListener("clearRepeatableFields",ve=>{ve===(i==null?void 0:i.uuid)&&(w(""),C(0),e.isValid=0)}),oe=Xt.addListener("onSubmitUserForm",()=>{var ve;(ve=e==null?void 0:e.attributes)!=null&&ve.required&&(x!==""&&lu.test(x)===!0?e.isValid=1:e.isValid=0)});return()=>{oe.remove(),K.remove()}});const[k,P]=N.useState(!1),j=K=>{P(K)},M=()=>{P(!1)},H=()=>{var K,oe,ve;if(i!=null&&i.rowIsRepeatable){if(i!=null&&i.repeatableFields){const Ce=[...i.repeatableFields],Se=_t.findIndex(Ce,function(Te){return Te.uuid===(e==null?void 0:e.uuid)});Se>=0&&Ce[Se].fieldData?w(Ce[Se].fieldData):w("")}}else{const Ce=m;if(Ce!=null&&Ce.length){for(const Se of Ce)if(Se.fieldId===t.field.uuid&&((K=Se==null?void 0:Se.postData[0])==null?void 0:K.postValue)!==""&&((oe=Se==null?void 0:Se.postData[0])!=null&&oe.postValue)){w((ve=Se==null?void 0:Se.postData[0])==null?void 0:ve.postValue),S(!0);break}}}S(!0)},de=(K,oe)=>{w(oe);const ve=m,Ce=_t.cloneDeep(u);if(oe){if(Ce[e==null?void 0:e.uuid]=oe,(ve==null?void 0:ve.length)>0)for(const Se of ve)Se.fieldId===t.field.uuid&&(Se.postData[0]={postValue:oe})}else if(delete Ce[e==null?void 0:e.uuid],(ve==null?void 0:ve.length)>0)for(const Se of ve)Se.fieldId===t.field.uuid&&(Se.postData[0]={postValue:""});if(!(i!=null&&i.rowIsRepeatable)){d(Ce);const Se=Object.keys(Ce).length;f(Se)}},fe=(K,oe,ve,Ce)=>{var ie;const Se=[...m],Te=_t.findIndex(Se,function(U){return U.rowId===(i==null?void 0:i.uuid)});let De=(ie=m[Te])==null?void 0:ie.repeatableFields;De={...De,[ve==null?void 0:ve.uuid]:Ce},Se[Te]={...Se[Te],repeatableFields:De},h(Se),w(Ce),Ce!==""&&lu.test(Ce)===!0?e.isValid=1:e.isValid=0},ee=o.jsxs("div",{onMouseOver:D,onMouseOut:B,children:[!l&&!a&&_&&o.jsx(jr,{handleFieldSettingsSidebar:j,...t}),o.jsxs("div",{className:`field ${a?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" p-fluid ":" "} ${l?" ":" py-6 px-4 card"}`,children:[o.jsxs("div",{className:a?"p-fluid":"card p-fluid field-form-builder",children:[!a&&o.jsx("label",{className:"block font-medium mb-3 text-700 text-2xl",children:"Hidden field"}),o.jsx(gn,{type:a===!0?"hidden":"text",id:e==null?void 0:e.uuid,placeholder:(G=e==null?void 0:e.placeholder)==null?void 0:G[v==null?void 0:v.type],value:(ae=e==null?void 0:e.defaultValue)==null?void 0:ae[v==null?void 0:v.type],onFocus:()=>C(1),onLoad:()=>{i!=null&&i.rowIsRepeatable?fe(n,r,e,e==null?void 0:e.defaultValue):de("",e==null?void 0:e.defaultValue)},className:T===1&&((Y=e==null?void 0:e.attributes)!=null&&Y.required)?x?"valid":"invalid":"valid'",readOnly:c===g}),((ge=e==null?void 0:e.attributes)==null?void 0:ge.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:T===1&&!x?(ne=e==null?void 0:e.validationMesssage)==null?void 0:ne[v==null?void 0:v.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(J=e==null?void 0:e.helperText)==null?void 0:J[v==null?void 0:v.type]})})]}),s&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[k===!0&&o.jsx(Xi,{visibilty:k,closeSettingFieldSidebar:M,...t}),o.jsx(wi,{...t,fieldWrap:ee})]})},J$=t=>{var T;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,path:l,labelType:c}=t,[u,d]=N.useState(e),{isPreview:f}=Zt();N.useEffect(()=>{var C;return x((C=e[c])==null?void 0:C[h==null?void 0:h.type]),()=>{}},[e]);const{userSelectedLanguage:h,fieldSettingUpdate:m,fieldSettingUpdateInlineConditional:g,gridComponentFieldSettingUpdate:v}=on(),A=(C,_,E)=>{d(D=>({...D,[C]:{...D[C],[_==null?void 0:_.type]:E}}))},[S,x]=N.useState((T=e[c])==null?void 0:T[h==null?void 0:h.type]);N.useEffect(()=>(w(),()=>{}),[u]);const w=()=>{const C=l.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?g(C[oa],C[la],C[fa],C[ha],C[pa],C[wa],C[$o],C[yo],u):(C==null?void 0:C.length)>wa&&(C==null?void 0:C.length)===Bl+1&&(e!=null&&e.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?v(C[oa],C[la],C[fa],C[ha],C[pa],C[5],C[6],C[7],u):m(r,i,a,s,n,{...e,[c]:u[c]})};return o.jsx(o.Fragment,{children:o.jsx(L3,{style:{display:"inline-block"},className:"builder-input-label-edit",html:S,disabled:f,onChange:C=>{var _;x($3.sanitize((_=C==null?void 0:C.target)==null?void 0:_.value))},onBlur:C=>{var E;const _=$3.sanitize((E=C==null?void 0:C.target)==null?void 0:E.innerText);x(_),A(c,h,_)},tagName:"article"})})},Qwe=t=>{var J,K,oe,ve,Ce,Se,Te;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a}=mr(),{userSelectedLanguage:s,fieldSettingUpdate:l}=on(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:m,columnIndex:g,isDisabled:v}=t,{isPreview:A,isAdmin:S,isRenderView:x}=Zt(),[w,T]=N.useState(!1),[C,_]=N.useState(""),[E,D]=N.useState(0),[B,k]=N.useState(!1),[P,j]=N.useState(!1),M=()=>{j(!0)},H=()=>{j(!1)},de=()=>{var De,ie,U;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const re=[...h.repeatableFields],Q=_t.findIndex(re,function(se){return se.uuid===(c==null?void 0:c.uuid)});Q>=0&&re[Q].fieldData?_(re[Q].fieldData):_("")}}else{const re=a;if(re!=null&&re.length){for(const Q of re)if(Q.fieldId===t.field.uuid&&((De=Q==null?void 0:Q.postData[0])==null?void 0:De.postValue)!==""&&((ie=Q==null?void 0:Q.postData[0])!=null&&ie.postValue)){_((U=Q==null?void 0:Q.postData[0])==null?void 0:U.postValue);break}}}k(!0)};N.useEffect(()=>{B||de();const De=Xt.addListener("clearRepeatableFields",Q=>{Q===(h==null?void 0:h.uuid)&&(_(""),D(0),c.isValid=0,l(f,d,m,g,u,c))}),ie=Xt.addListener("onSubmitUserForm",()=>{var Q;(Q=c==null?void 0:c.attributes)!=null&&Q.required?C?c.isValid=1:c.isValid=0:c.isValid=1}),U=Xt.addListener("OnInvalidFieldCatch",Q=>{c.uuid===(Q==null?void 0:Q.fieldId)?D(1):D(0)}),re=Xt.addListener("OnGetFieldValue",Q=>{var be;const se=(be=Q==null?void 0:Q.repeatableColumn)==null?void 0:be.filter(me=>(me==null?void 0:me.fieldUuid)===(c==null?void 0:c.uuid));se!=null&&se.length});return()=>{ie.remove(),U.remove(),re.remove(),De.remove()}});const fe=De=>{T(De)},ee=()=>{T(!1)},G=De=>{var re,Q;_(De.target.value);const ie=a,U=_t.cloneDeep(e);if(ie!==null){if((re=De==null?void 0:De.target)!=null&&re.value){if(U[c==null?void 0:c.uuid]=(Q=De==null?void 0:De.target)==null?void 0:Q.value,(ie==null?void 0:ie.length)>0)for(const se of ie)se.fieldId===t.field.uuid&&(se.postData[0]={postValue:De.target.value})}else if(delete U[c==null?void 0:c.uuid],(ie==null?void 0:ie.length)>0)for(const se of ie)se.fieldId===t.field.uuid&&(se.postData[0]={postValue:""})}if(!(h!=null&&h.rowIsRepeatable)){n(U);const se=Object.keys(U).length;r(se)}},ae=(De,ie,U,re)=>{var Q;if(a){const se=[...a],be=_t.findIndex(se,function(ye){return ye.rowId===(h==null?void 0:h.uuid)});let me=(Q=a[be])==null?void 0:Q.repeatableFields;me={...me,[U==null?void 0:U.uuid]:re},se[be]={...se[be],repeatableFields:me},i(se)}_(re),re!==""?U.isValid=1:U.isValid=0},Y=10,ge=()=>{const De=[];for(let ie=0;ie<=Y;ie++)De.push(o.jsxs("label",{children:[o.jsx("input",{onChange:U=>{h!=null&&h.rowIsRepeatable?ae(f,d,c,U.target.value):G(U)},checked:parseInt(C)===ie,name:"liker-scale"+(c==null?void 0:c.uuid),type:"radio",value:ie,disabled:v}),o.jsx("span",{children:ie})]},`field-${c==null?void 0:c.uuid}-likertScale-${ie} ${parseInt(C)===ie?"scale-selected":""}`));return De},ne=o.jsxs("div",{onMouseOver:M,onMouseOut:H,children:[!x&&!A&&P&&o.jsx(jr,{handleFieldSettingsSidebar:fe,...t}),o.jsxs("div",{className:`field ${A?" ":" builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsxs("div",{className:"",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(J=c==null?void 0:c.headerText)==null?void 0:J[s==null?void 0:s.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((K=c==null?void 0:c.attributes)==null?void 0:K.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",A?o.jsx(o.Fragment,{children:(oe=c==null?void 0:c.label)==null?void 0:oe[s==null?void 0:s.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(c==null?void 0:c.showToolTip)&&o.jsx(Mi,{message:(ve=c==null?void 0:c.toolTip)==null?void 0:ve[s==null?void 0:s.type],position:"right"})})]}),o.jsx("div",{children:o.jsxs("div",{className:"mt-4",children:[o.jsxs("div",{className:"flex justify-content-between mb-3",children:[o.jsx("div",{className:"font-medium text-900 ",children:o.jsx(J$,{...t,labelType:"startingMessage"})}),o.jsx("div",{className:"font-medium text-900",children:o.jsx(J$,{...t,labelType:"endingMessage"})})]}),o.jsx("div",{className:"likert",children:ge()})]})}),o.jsx("div",{children:((Ce=c==null?void 0:c.attributes)==null?void 0:Ce.required)&&o.jsx("small",{className:"error",children:E===1&&!C?(Se=c==null?void 0:c.validationMesssage)==null?void 0:Se.language:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(Te=c==null?void 0:c.helperText)==null?void 0:Te[s==null?void 0:s.type]})})]}),S&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[w===!0&&o.jsx(Xi,{visibilty:w,closeSettingFieldSidebar:ee,...t}),o.jsx(wi,{...t,fieldWrap:ne})]})},Jwe=t=>{var J,K,oe,ve,Ce,Se,Te,De,ie,U,re,Q;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a,task_status:s,TASK_PUBLISHED:l}=mr(),{userSelectedLanguage:c,fieldSettingUpdate:u}=on(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:m,row:g,rowIndex:v,columnIndex:A,isDisabled:S}=t,{isPreview:x,isAdmin:w,isRenderView:T}=Zt(),[C,_]=N.useState(!1),[E,D]=N.useState(""),[B,k]=N.useState(0),[P,j]=N.useState(!1),[M,H]=N.useState(!1),de=()=>{H(!0)},fe=()=>{H(!1)},ee=()=>{var se,be,me;if(g!=null&&g.rowIsRepeatable){if(g!=null&&g.repeatableFields){const ye=[...g.repeatableFields],Ie=_t.findIndex(ye,function(Ee){return Ee.uuid===(d==null?void 0:d.uuid)});Ie>=0&&ye[Ie].fieldData?D(ye[Ie].fieldData):D("")}}else{const ye=a;if(ye!=null&&ye.length){for(const Ie of ye)if(Ie.fieldId===t.field.uuid&&((se=Ie==null?void 0:Ie.postData[0])==null?void 0:se.postValue)!==""&&((be=Ie==null?void 0:Ie.postData[0])!=null&&be.postValue)){D((me=Ie==null?void 0:Ie.postData[0])==null?void 0:me.postValue);break}}}j(!0)};N.useEffect(()=>{P||ee();const se=Xt.addListener("clearRepeatableFields",Ie=>{Ie===(g==null?void 0:g.uuid)&&(D(""),k(0),d.isValid=0,u(m,h,v,A,f,d))}),be=Xt.addListener("onSubmitUserForm",()=>{var Ie;(Ie=d==null?void 0:d.attributes)!=null&&Ie.required?E?d.isValid=1:d.isValid=0:d.isValid=1}),me=Xt.addListener("OnInvalidFieldCatch",Ie=>{d.uuid===(Ie==null?void 0:Ie.fieldId)?k(1):k(0)}),ye=Xt.addListener("OnGetFieldValue",Ie=>{var he;const Ee=(he=Ie==null?void 0:Ie.repeatableColumn)==null?void 0:he.filter(V=>(V==null?void 0:V.fieldUuid)===(d==null?void 0:d.uuid));Ee!=null&&Ee.length});return()=>{be.remove(),me.remove(),ye.remove(),se.remove()}});const G=se=>{_(se)},ae=()=>{_(!1)},Y=se=>{var ye,Ie;D(se.target.value);const be=a,me=_t.cloneDeep(e);if(be!==null){if((ye=se==null?void 0:se.target)!=null&&ye.value){if(me[d==null?void 0:d.uuid]=(Ie=se==null?void 0:se.target)==null?void 0:Ie.value,(be==null?void 0:be.length)>0)for(const Ee of be)Ee.fieldId===t.field.uuid&&(Ee.postData[0]={postValue:se.target.value})}else if(delete me[d==null?void 0:d.uuid],(be==null?void 0:be.length)>0)for(const Ee of be)Ee.fieldId===t.field.uuid&&(Ee.postData[0]={postValue:""})}if(!(g!=null&&g.rowIsRepeatable)){n(me);const Ee=Object.keys(me).length;r(Ee)}},ge=(se,be)=>{var me;if(a){const ye=[...a],Ie=_t.findIndex(ye,function(he){return he.rowId===(g==null?void 0:g.uuid)});let Ee=(me=a[Ie])==null?void 0:me.repeatableFields;Ee={...Ee,[se==null?void 0:se.uuid]:be},ye[Ie]={...ye[Ie],repeatableFields:Ee},i(ye)}D(be),be!==""?se.isValid=1:se.isValid=0},ne=o.jsxs("div",{onMouseOver:de,onMouseOut:fe,children:[!T&&!x&&M&&o.jsx(jr,{handleFieldSettingsSidebar:G,...t}),o.jsxs("div",{className:`field ${x?" ":" builder-element-wrapper "}${(d==null?void 0:d.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:x?"col-12 ":"col-12 p-fluid",children:[(d==null?void 0:d.showHeaderText)&&o.jsx("h6",{children:(J=d==null?void 0:d.headerText)==null?void 0:J[c==null?void 0:c.type]}),(d==null?void 0:d.showLabel)&&o.jsxs("label",{htmlFor:f,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((K=d==null?void 0:d.attributes)==null?void 0:K.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",x?o.jsx(o.Fragment,{children:(oe=d==null?void 0:d.label)==null?void 0:oe[c==null?void 0:c.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(d==null?void 0:d.showToolTip)&&o.jsx(Mi,{message:(ve=d==null?void 0:d.toolTip)==null?void 0:ve[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(d==null?void 0:d.iconAlignment),children:[(d==null?void 0:d.showIcon)&&o.jsx("i",{className:"pi pi-"+((Se=(Ce=d==null?void 0:d.icon)==null?void 0:Ce.properties)==null?void 0:Se.name)}),o.jsx(gn,{id:d==null?void 0:d.uuid,placeholder:(Te=d==null?void 0:d.placeholder)==null?void 0:Te[c==null?void 0:c.type],value:E,onFocus:()=>k(1),onChange:se=>{g!=null&&g.rowIsRepeatable?ge(d,se.target.value):Y(se)},className:B===1&&((De=d==null?void 0:d.attributes)!=null&&De.required)?E?"valid mt-2 mr-2":"invalid mt-2":"valid mt-2",readOnly:S})]}),o.jsx("div",{children:((ie=d==null?void 0:d.attributes)==null?void 0:ie.required)&&o.jsx("small",{className:"error",children:B===1&&!E?(U=d==null?void 0:d.validationMesssage)==null?void 0:U.english:""})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(re=d==null?void 0:d.helperText)==null?void 0:re[c==null?void 0:c.type]})})]})]})}),o.jsx("p",{className:"text-center",children:o.jsx("span",{className:`${(Q=d==null?void 0:d.fontStyle)==null?void 0:Q.font} text-center`,style:{fontSize:d==null?void 0:d.fontSize},children:E})}),w&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[C===!0&&o.jsx(Xi,{visibilty:C,closeSettingFieldSidebar:ae,...t}),o.jsx(wi,{...t,fieldWrap:ne})]})},Zwe=t=>{var De,ie,U,re,Q,se,be,me,ye,Ie,Ee,he,V,te,W,ue,Ae;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i,TASK_PUBLISHED:a,task_status:s}=mr(),{globalAlignment:l}=Zt(),{userSelectedLanguage:c,fieldSettingUpdate:u}=on(),{isRenderView:d,isAdmin:f,isPreview:h}=Zt(),m=pe=>{const ke=pe.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Le=`${pe.className} justify-content-start`,We=`${pe.titleClassName} pl-1`;return o.jsxs("div",{className:Le,children:[o.jsxs("button",{className:pe.togglerClassName,onClick:pe.onTogglerClick,children:[o.jsx("span",{className:ke}),o.jsx(Qt,{})]}),o.jsx("span",{className:We,children:ee})]})},{field:g,fieldIndex:v,sectionIndex:A,pageIndex:S,row:x,rowIndex:w,columnIndex:T,isDisabled:C}=t,[_,E]=N.useState(!1),[D,B]=N.useState(null),[k,P]=N.useState({country:null,city:null,state:null,addressOne:null,addressTwo:null,zipcode:null,isBillingAddressSame:!1,billingCountry:null,billingCity:null,billingState:null,billingAddressOne:null,billingAddressTwo:null,billingZipcode:null}),[j,M]=N.useState(!1),H=()=>{M(!0)},de=()=>{M(!1)},fe=(pe,ke)=>{let Le={...k};Le={...Le,[pe]:ke},P(Le),(Le==null?void 0:Le.addressOne)!==""&&(Le!=null&&Le.addressTwo)&&(Le!=null&&Le.zipcode)&&Se(Le==null?void 0:Le.zipcode)?(g.isValid=1,oe(Le,!0)):(g.isValid=0,oe(null,!1))},[ee]=N.useState((De=g==null?void 0:g.label)==null?void 0:De[c==null?void 0:c.type]),[G,ae]=N.useState(0),[Y,ge]=N.useState(!1),ne=()=>{var pe,ke;if(!(x!=null&&x.rowIsRepeatable)){const Le=i;if(Le!=null&&Le.length){for(const We of Le)if(We.fieldId===t.field.uuid&&((pe=We==null?void 0:We.postData[0])!=null&&pe.postValue)){P((ke=We==null?void 0:We.postData[0])==null?void 0:ke.postValue);break}}}ge(!0)};N.useEffect(()=>{Y||ne();const pe=Xt.addListener("clearRepeatableFields",At=>{At===(x==null?void 0:x.uuid)&&(ae(0),g.isValid=0,u(S,A,w,T,v,g))}),ke=Xt.addListener("onSubmitUserForm",()=>{var At;(At=g==null?void 0:g.attributes)!=null&&At.required?(k==null?void 0:k.addressOne)!==""&&(k==null?void 0:k.zipcode)!==""&&Se(k==null?void 0:k.zipcode)?g.isValid=1:g.isValid=0:g.isValid=1}),Le=Xt.addListener("OnInvalidFieldCatch",At=>{g.uuid===(At==null?void 0:At.fieldId)?ae(1):ae(0)}),We=Xt.addListener("OnGetFieldValue",At=>{var Je;const st=(Je=At==null?void 0:At.repeatableColumn)==null?void 0:Je.filter(Ct=>(Ct==null?void 0:Ct.fieldUuid)===(g==null?void 0:g.uuid));st!=null&&st.length}),gt=Xt.addListener("formFieldAdded",At=>{D===null&&B(At.uuid)});return()=>{ke.remove(),Le.remove(),We.remove(),pe.remove(),gt.remove()}});const J=pe=>{E(pe)},K=()=>{E(!1)},oe=(pe,ke)=>{const Le=i,We=_t.cloneDeep(e);if(ke){if(We[g==null?void 0:g.uuid]=pe,(Le==null?void 0:Le.length)>0)for(const gt of Le)gt.fieldId===t.field.uuid&&(gt.postData[0]={postValue:pe})}else if(delete We[g==null?void 0:g.uuid],(Le==null?void 0:Le.length)>0)for(const gt of Le)gt.fieldId===t.field.uuid&&(gt.postData[0]={postValue:pe});if(!(x!=null&&x.rowIsRepeatable)){n(We);const gt=Object.keys(We).length;r(gt)}},ve=()=>{let pe="";return h||(pe=pe+" field-form-builder"),s===a&&f===!0&&(pe=pe+" card"),pe},Ce=()=>{let pe=!1;return k.addressOne!==""&&k.zipcode!==""&&Se(k.zipcode)&&(pe=!0),pe};function Se(pe){const ke=/\d/.test(pe),Le=/[a-zA-Z]/.test(pe);return ke&&Le?!0:!!ke}N.useEffect(()=>(D!==null&&setTimeout(()=>{B(null)},1e3),()=>{}),[D]);const Te=o.jsxs("div",{onMouseOver:H,onMouseOut:de,children:[!d&&!h&&j&&o.jsx(jr,{handleFieldSettingsSidebar:J,...t}),o.jsxs("div",{className:`field ${h?" ":" builder-element-wrapper "} ${(g==null?void 0:g.isFluid)===!0?" card py-3 px-4 p-fluid":"card p-4"} ${D===(g==null?void 0:g.uuid)?" new-field ":" card "}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:h?"col-12 ":"col-11 p-fluid",children:[(g==null?void 0:g.showHeaderText)&&o.jsx("h6",{children:(ie=g==null?void 0:g.headerText)==null?void 0:ie[c==null?void 0:c.type]}),(g==null?void 0:g.showLabel)&&o.jsxs("label",{htmlFor:v,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((U=g==null?void 0:g.attributes)==null?void 0:U.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",h?o.jsx(o.Fragment,{children:(re=g==null?void 0:g.label)==null?void 0:re[c==null?void 0:c.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(g==null?void 0:g.showToolTip)&&o.jsx(Mi,{message:(Q=g==null?void 0:g.toolTip)==null?void 0:Q[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3 p-fluid",children:[o.jsx("div",{children:o.jsx("label",{className:"w-full",htmlFor:"",children:(se=g==null?void 0:g.addresslineFirstLabel)==null?void 0:se[c==null?void 0:c.type]})}),o.jsx(gn,{value:k.addressOne||"",onChange:pe=>fe("addressOne",pe.target.value),className:"my-2 ",readOnly:C}),o.jsx("div",{children:o.jsx("label",{htmlFor:"",children:(be=g==null?void 0:g.addresslineSecondLabel)==null?void 0:be[c==null?void 0:c.type]})}),o.jsx(gn,{value:k.addressTwo||"",onChange:pe=>fe("addressTwo",pe.target.value),className:"my-2",readOnly:C}),o.jsx("div",{children:o.jsx("label",{htmlFor:"",children:(me=g==null?void 0:g.postalcodeLabel)==null?void 0:me[c==null?void 0:c.type]})}),o.jsx(gn,{value:k.zipcode||"",onChange:pe=>fe("zipcode",pe.target.value),className:"my-2",readOnly:C}),o.jsx("p",{children:!Se(k.zipcode)&&o.jsx("small",{children:"Cannot be alphabetical only."})}),((ye=g==null?void 0:g.attributes)==null?void 0:ye.required)&&!Ce()&&o.jsx("small",{className:"error",children:G===1?(Ie=g==null?void 0:g.validationMesssage)==null?void 0:Ie.language:""}),(g==null?void 0:g.showBillingAddress)===!0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Or,{inputId:"binary",checked:k.isBillingAddressSame,onChange:pe=>{fe("isBillingAddressSame",pe.checked),pe.checked?P(ke=>({...ke,billingCountry:k.country,billingCity:k.city,billingState:k.state,billingAddressOne:k.addressOne,billingAddressTwo:k.addressTwo,billingZipcode:k.zipcode})):P(ke=>({...ke,billingCountry:null,billingCity:null,billingState:null,billingAddressOne:null,billingAddressTwo:null,billingZipcode:null}))},disabled:C}),o.jsx("label",{htmlFor:"binary",children:"Is Billing Address Same"})]}),k.isBillingAddressSame===!1&&o.jsxs(o.Fragment,{children:[(g==null?void 0:g.showLabel)&&o.jsxs("label",{htmlFor:v,className:"flex font-medium mb-3 text-700 text-2xl",children:[((Ee=g==null?void 0:g.attributes)==null?void 0:Ee.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",(he=g==null?void 0:g.billingLabel)==null?void 0:he[c==null?void 0:c.type],o.jsx("span",{className:"ml-3",children:(g==null?void 0:g.showToolTip)&&o.jsx(Mi,{message:(V=g==null?void 0:g.toolTip)==null?void 0:V[c==null?void 0:c.type],position:"right"})})]}),o.jsx("label",{htmlFor:"",children:(te=g==null?void 0:g.addresslineFirstLabel)==null?void 0:te[c==null?void 0:c.type]}),o.jsx(gn,{value:k.billingAddressOne||"",onChange:pe=>fe("billingAddressOne",pe.target.value),className:"my-2",readOnly:C}),o.jsx("label",{htmlFor:"",children:(W=g==null?void 0:g.addresslineSecondLabel)==null?void 0:W[c==null?void 0:c.type]}),o.jsx(gn,{value:k.billingAddressTwo||"",onChange:pe=>fe("billingAddressTwo",pe.target.value),className:"my-2",readOnly:C}),o.jsx("label",{htmlFor:"",children:(ue=g==null?void 0:g.postalcodeLabel)==null?void 0:ue[c==null?void 0:c.type]}),o.jsx(gn,{value:k.billingZipcode||"",onChange:pe=>fe("billingZipcode",pe.target.value),className:"my-2",readOnly:C}),!Se(k.billingZipcode)&&o.jsx("small",{children:"Cannot be alphabetical only."})]})]}),o.jsx("div",{}),o.jsx("div",{children:(g==null?void 0:g.showHelperText)&&o.jsx("small",{children:(Ae=g==null?void 0:g.helperText)==null?void 0:Ae[c==null?void 0:c.type]})})]})]})}),f&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[_===!0&&o.jsx(Xi,{visibilty:_,closeSettingFieldSidebar:K,...t}),o.jsx("div",{dir:l?"rtl":"ltr",className:ve(),children:s===a&&f===!0?o.jsx(li,{headerTemplate:m,toggleable:!0,children:Te}):Te})]})},eSe=t=>{var w;const{customColumn:e,indexes:n,customColumnIndex:r,path:i,field:a,onSetValuetoPostData:s,sectionIndex:l,page:c,row:u,column:d,section:f,pageIndex:h,rowIndex:m,columnIndex:g}=t,{handleDrop:v}=on(),{isPreview:A,isAdvanceView:S}=Zt(),x=(T,C)=>{s(T,C)};return o.jsxs("div",{className:"p-2 py-4",children:[n&&((w=a.children)==null?void 0:w.length)>0&&a.children.map((T,C)=>{const _=T[`${n.rowIndex}-${n.columnIndex}`];return _?o.jsx("div",{children:o.jsx(qc,{type:"grid",showFieldIcons:!1,onChange:x,data:_,field:_,path:`${i}-${n.rowIndex}-${n.columnIndex}-${C}`,sectionIndex:l,page:c,column:d,row:u,section:f,pageIndex:h,rowIndex:m,columnIndex:g,fieldIndex:C,fieldContainer:"grid-container"})},`${n.rowIndex}-${n.columnIndex}-${C}`):null}),n&&A===!1&&o.jsx("div",{className:"py-5",children:o.jsx(Tr,{isAdvanceView:S,fieldDropArea:!0,data:{path:`${i}-${n.rowIndex}-${r}`,childrenCount:1,droppedField:e},onDrop:v})})]})},Z$=t=>{var P,j,M,H,de,fe,ee;const{field:e,column:n,section:r,row:i,rowIndex:a,columnIndex:s,sectionIndex:l,isPreview:c,userSelectedLanguage:u,fieldIndex:d,customColumnHeaderTemplate:f,onSetValuetoPostData:h,setAllFields:m,allFields:g,actionHeaderTemplate:v,actionBodyTemplate:A,isFocus:S,inputValue:x,handleFieldSettingsSidebar:w,isAdmin:T,emitSocketData:C,isRenderView:_}=t,[E,D]=N.useState(!1),B=()=>{D(!0)},k=()=>{D(!1)};return o.jsxs("div",{onMouseOver:B,onMouseOut:k,children:[!_&&!c&&E&&o.jsx(jr,{handleFieldSettingsSidebar:w,...t}),o.jsxs("div",{className:`field ${c?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 ":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 ",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(P=e==null?void 0:e.headerText)==null?void 0:P[u==null?void 0:u.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:d,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((j=e==null?void 0:e.attributes)==null?void 0:j.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",c?o.jsx(o.Fragment,{children:(M=e==null?void 0:e.label)==null?void 0:M[u==null?void 0:u.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(H=e==null?void 0:e.toolTip)==null?void 0:H[u==null?void 0:u.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs(zs,{scrollable:!0,showGridlines:!0,columnResizeMode:"expand",resizableColumns:!0,value:e==null?void 0:e.options,tableStyle:{minWidth:"50rem"},children:[e==null?void 0:e.customColumnsForOptions.map((G,ae)=>o.jsx(dr,{style:{minWidth:350},header:f(G,ae),body:(Y,ge)=>o.jsx(eSe,{customColumn:G,section:r,column:n,columnIndex:s,row:i,rowIndex:a,sectionIndex:l,e:Y,indexes:ge,customColumnIndex:ae,onSetValuetoPostData:h,setAllFields:m,allFields:g,emitSocketData:C,field:e,...t})},G==null?void 0:G.uuid)),!c&&o.jsx(dr,{frozen:!0,header:G=>v(G),body:(G,ae)=>A(G,ae),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((de=e==null?void 0:e.attributes)==null?void 0:de.required)&&o.jsx("small",{className:"error",children:S===1&&!x?(fe=e==null?void 0:e.validationMesssage)==null?void 0:fe.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(ee=e==null?void 0:e.helperText)==null?void 0:ee[u==null?void 0:u.type]})})]})]})}),T&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]})},ej=t=>{var De;const{globalAlignment:e}=Zt(),n=ie=>{const U=ie.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",re=`${ie.className} justify-content-start`,Q=`${ie.titleClassName} pl-1`;return o.jsxs("div",{className:re,children:[o.jsxs("button",{className:ie.togglerClassName,onClick:ie.onTogglerClick,children:[o.jsx("span",{className:U}),o.jsx(Qt,{})]}),o.jsx("span",{className:Q,children:C})]})},{userTaskSubmitFormData:r,TASK_PUBLISHED:i,task_status:a}=mr(),{userSelectedLanguage:s,fieldSettingUpdate:l}=on(),{isPreview:c,field:u,fieldIndex:d,sectionIndex:f,pageIndex:h,row:m,rowIndex:g,columnIndex:v,isAdmin:A}=t,[S,x]=N.useState(!1),[w,T]=N.useState(""),[C]=N.useState((De=u==null?void 0:u.label)==null?void 0:De[s==null?void 0:s.type]),[_,E]=N.useState(0),[D,B]=N.useState(!1),[k,P]=N.useState(null),[j,M]=N.useState([]),H=()=>{var ie,U,re;if(m!=null&&m.rowIsRepeatable){if(m!=null&&m.repeatableFields){const Q=[...m.repeatableFields],se=_t.findIndex(Q,function(be){return be.uuid===(u==null?void 0:u.uuid)});se>=0&&Q[se].fieldData?T(Q[se].fieldData):T("")}}else{const Q=r;if(Q!=null&&Q.length){for(const se of Q)if(se.fieldId===t.field.uuid&&((ie=se==null?void 0:se.postData[0])==null?void 0:ie.postValue)!==""&&((U=se==null?void 0:se.postData[0])!=null&&U.postValue)){T((re=se==null?void 0:se.postData[0])==null?void 0:re.postValue);break}}}B(!0)},de=()=>{const ie=u;ie.customColumnsForOptions=[...ie.customColumnsForOptions,{customKey:"Column",uuid:nt()}],Te(ie)},[fe,ee]=N.useState(!1),G=(ie,U)=>{var re;return o.jsxs(o.Fragment,{children:[((re=u==null?void 0:u.options)==null?void 0:re.length)>1&&o.jsx(Pt,{text:!0,type:"button",className:"p-button-danger left-space ",icon:"pi pi-trash",onClick:()=>ge(ie==null?void 0:ie.uuid,U==null?void 0:U.rowIndex),rounded:!0,severity:"secondary","aria-label":"Bookmark",size:"small"}),o.jsx(Pt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>Ce(),"aria-label":"Add Row",size:"small"})]})},ae=(ie,U)=>{var re;return o.jsxs(o.Fragment,{children:[ie==null?void 0:ie.customKey,c===!1&&o.jsxs(o.Fragment,{children:[((re=u==null?void 0:u.customColumnsForOptions)==null?void 0:re.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>ne(ie==null?void 0:ie.uuid,U)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{P(ie),ee(!0)}})]})]})},Y=()=>o.jsx(o.Fragment,{children:o.jsx(Pt,{text:!0,icon:"pi pi-plus",onClick:()=>de(),rounded:!0,severity:"secondary","aria-label":"Cancel"})}),ge=(ie,U)=>{var me,ye;const re=(me=u==null?void 0:u.customColumnsForOptions)==null?void 0:me.length,Q=[...(u==null?void 0:u.children)||[]];(ye=u==null?void 0:u.children)==null||ye.map(Ie=>{for(let Ee=0;Ee<re;Ee++)if(Ie[`${U}-${Ee}`]!==void 0){const he=_t.findIndex(Q,function(V){return V[`${U}-${Ee}`]!==void 0});Q.splice(he,1)}});for(let Ie=0;Ie<(Q==null?void 0:Q.length);Ie++){const Ee=Q[Ie],V=Object.keys(Ee)[0].split("-");parseInt(V[0])>U&&(Q[Ie]={[`${parseInt(V[0])-1}-${V[1]}`]:Q[Ie][`${parseInt(V[0])}-${V[1]}`]})}const se=u==null?void 0:u.options.filter(function(Ie){return(Ie==null?void 0:Ie.uuid)!==ie}),be={...u,children:[...Q]};be.options=se,Te(be)},ne=(ie,U)=>{var ye,Ie;const re=_t.findIndex(u==null?void 0:u.customColumnsForOptions,Ee=>Ee.uuid===ie),Q=u==null?void 0:u.customColumnsForOptions.filter(function(Ee,he){return he!==re}),se=(ye=u==null?void 0:u.options)==null?void 0:ye.length,be=[...(u==null?void 0:u.children)||[]];(Ie=u==null?void 0:u.children)==null||Ie.map(Ee=>{for(let he=0;he<se;he++)if(Ee[`${he}-${U}`]!==void 0){const V=_t.findIndex(be,function(te){return te[`${he}-${U}`]!==void 0});be.splice(V,1)}});for(let Ee=0;Ee<(be==null?void 0:be.length);Ee++){const he=be[Ee],te=Object.keys(he)[0].split("-");parseInt(te[1])>U&&(be[Ee]={[`${parseInt(te[0])}-${parseInt(te[1])-1}`]:be[Ee][`${parseInt(te[0])}-${te[1]}`]})}const me={...u,children:[...be]};me.customColumnsForOptions=Q,Te(me)};N.useEffect(()=>{D||H();const ie=Xt.addListener("clearRepeatableFields",se=>{se===(m==null?void 0:m.uuid)&&(T(""),E(0),u.isValid=0,l(h,f,g,v,d,u))}),U=Xt.addListener("onSubmitUserForm",()=>{var se;(se=u==null?void 0:u.attributes)!=null&&se.required&&(u.isValid=1)}),re=Xt.addListener("OnInvalidFieldCatch",se=>{u.uuid===(se==null?void 0:se.fieldId)?E(1):E(0)}),Q=Xt.addListener("OnGetFieldValue",se=>{var me;const be=(me=se==null?void 0:se.repeatableColumn)==null?void 0:me.filter(ye=>(ye==null?void 0:ye.fieldUuid)===(u==null?void 0:u.uuid));be!=null&&be.length});return()=>{U.remove(),re.remove(),Q.remove(),ie.remove()}});const J=ie=>{x(ie)},K=()=>{x(!1)},oe=(ie,U)=>{var Q;const re=r;if((re==null?void 0:re.length)>0)for(const se of re)se.fieldId===t.field.uuid&&(se.postData[0]={postValue:{...(Q=se.postData[0])==null?void 0:Q.postValue,[ie]:U}})},ve=()=>{let ie="";return c||(ie=ie+" field-form-builder"),a===i&&A===!0&&(ie=ie+" card"),ie},Ce=()=>{const ie=u;ie.options=[...ie.options,{uuid:nt(),custom_values:{}}],Te(ie)},Se=(ie,U)=>{P(be=>be===null?{customKey:U,uuid:""}:{...be,customKey:U});const re=u.customColumnsForOptions,Q=re.findIndex(be=>be.uuid===ie.uuid);re[Q]={...re[Q],customKey:U};const se=u;se.customColumnsForOptions=re,Te(se)},Te=ie=>{l(h,f,g,v,d,ie)};return o.jsxs(o.Fragment,{children:[o.jsx(Is,{maximizable:!0,header:"Update Column Title",visible:fe,style:{width:"20vw"},footer:()=>o.jsx(Pt,{text:!0,label:"Save",onClick:()=>ee(!1)}),onHide:()=>ee(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(gn,{value:(k==null?void 0:k.customKey)||"",onChange:ie=>Se(k,ie.target.value)})})}),o.jsx(Xi,{visibilty:S,closeSettingFieldSidebar:K,...t}),o.jsx("div",{dir:e,className:ve(),children:a===i&&A===!0?o.jsx(li,{headerTemplate:n,toggleable:!0,children:o.jsx(Z$,{...t,field:u,isPreview:c,userSelectedLanguage:s,fieldIndex:d,pageIndex:h,columnIndex:v,customColumnHeaderTemplate:ae,onSetValuetoPostData:oe,setAllFields:ie=>M(ie),allFields:j,actionHeaderTemplate:Y,actionBodyTemplate:G,addOption:Ce,isFocus:_,inputValue:w,handleFieldSettingsSidebar:J,isAdmin:A})}):o.jsx(Z$,{...t,field:u,isPreview:c,userSelectedLanguage:s,fieldIndex:d,pageIndex:h,columnIndex:v,customColumnHeaderTemplate:ae,onSetValuetoPostData:oe,setAllFields:ie=>M(ie),allFields:j,actionHeaderTemplate:Y,actionBodyTemplate:G,addOption:Ce,isFocus:_,inputValue:w,handleFieldSettingsSidebar:J,isAdmin:A})})]})},tSe=t=>{const{customColumn:e,indexes:n,customColumnIndex:r,setAllFields:i,allFields:a}=t,s=l=>{const c={...a};c[`${n==null?void 0:n.rowIndex}-${r}`]=l,i(c)};return o.jsx("div",{children:o.jsx(Sa,{value:a[`${n==null?void 0:n.rowIndex}-${r}`],options:e.options,onChange:l=>s(l.value),optionLabel:"label",placeholder:"Select"})})},tj=t=>{var T,C,_,E,D,B,k;const{field:e,isPreview:n,userSelectedLanguage:r,fieldIndex:i,customColumnHeaderTemplate:a,customColumnRowBodyTemplate:s,setAllFields:l,allFields:c,actionHeaderTemplate:u,actionBodyTemplate:d,isFocus:f,inputValue:h,handleFieldSettingsSidebar:m,isAdmin:g,isRenderView:v}=t,[A,S]=N.useState(!1),x=()=>{S(!0)},w=()=>{S(!1)};return o.jsxs("div",{onMouseOver:x,onMouseOut:w,children:[!v&&!n&&A&&o.jsx(jr,{handleFieldSettingsSidebar:m,...t}),o.jsxs("div",{className:`field ${n?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:n?"col-12 ":"col-11 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(T=e==null?void 0:e.headerText)==null?void 0:T[r==null?void 0:r.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:i,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((C=e==null?void 0:e.attributes)==null?void 0:C.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",n?o.jsx(o.Fragment,{children:(_=e==null?void 0:e.label)==null?void 0:_[r==null?void 0:r.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(E=e==null?void 0:e.toolTip)==null?void 0:E[r==null?void 0:r.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs(zs,{showGridlines:!0,value:e==null?void 0:e.rows,children:[o.jsx(dr,{frozen:!0,header:"",headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:P=>s(P)}),e==null?void 0:e.customColumns.map((P,j)=>o.jsx(dr,{header:a(P),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(M,H)=>o.jsx(tSe,{customColumn:P,e:M,indexes:H,customColumnIndex:j,setAllFields:l,allFields:c,...t})},P==null?void 0:P.uuid)),n===!1&&o.jsx(dr,{frozen:!0,header:P=>u(P),body:P=>d(P),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((D=e==null?void 0:e.attributes)==null?void 0:D.required)&&o.jsx("small",{className:"error",children:f===1&&!h?(B=e==null?void 0:e.validationMesssage)==null?void 0:B.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(k=e==null?void 0:e.helperText)==null?void 0:k[r==null?void 0:r.type]})})]})]})}),g&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]})},nSe=(t,e)=>{var Ie,Ee;const n=he=>{const V=he.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",te=`${he.className} justify-content-start`,W=`${he.titleClassName} pl-1`;return o.jsxs("div",{className:te,children:[o.jsxs("button",{className:he.togglerClassName,onClick:he.onTogglerClick,children:[o.jsx("span",{className:V}),o.jsx(Qt,{})]}),o.jsx("span",{className:W,children:_})]})},{userTaskSubmitFormData:r,TASK_PUBLISHED:i,task_status:a}=mr(),{globalAlignment:s,isPreview:l,isAdmin:c}=Zt(),{userSelectedLanguage:u,fieldSettingUpdate:d}=on(),{field:f,fieldIndex:h,sectionIndex:m,pageIndex:g,row:v,rowIndex:A,columnIndex:S}=t,[x,w]=N.useState(!1),[T,C]=N.useState(""),[_]=N.useState((Ie=f==null?void 0:f.label)==null?void 0:Ie[u==null?void 0:u.type]),[E,D]=N.useState(0),[B,k]=N.useState(!1),[P,j]=N.useState(null),[M,H]=N.useState(null),[de,fe]=N.useState({}),ee=()=>{var he,V,te;if(v!=null&&v.rowIsRepeatable){if(v!=null&&v.repeatableFields){const W=[...v.repeatableFields],ue=_t.findIndex(W,function(Ae){return Ae.uuid===(f==null?void 0:f.uuid)});ue>=0&&W[ue].fieldData?C(W[ue].fieldData):C("")}}else{const W=r;if(W!=null&&W.length){for(const ue of W)if(ue.fieldId===t.field.uuid&&((he=ue==null?void 0:ue.postData[0])==null?void 0:he.postValue)!==""&&((V=ue==null?void 0:ue.postData[0])!=null&&V.postValue)){C((te=ue==null?void 0:ue.postData[0])==null?void 0:te.postValue);break}}}k(!0)},G=()=>{const he=f;he.customColumns=[...he.customColumns,{customKey:"Column",uuid:nt(),options:[]}],se(he)},[ae,Y]=N.useState(!1),[ge,ne]=N.useState(!1),J=he=>{var V;return o.jsxs(o.Fragment,{children:[((V=f==null?void 0:f.options)==null?void 0:V.length)>1&&o.jsx(Pt,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>Ce(he==null?void 0:he.uuid),"aria-label":"Add Row"}),o.jsx(Pt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>U(),"aria-label":"Add Row"})]})},K=he=>{var V;return o.jsxs(o.Fragment,{children:[he==null?void 0:he.customKey,l===!1&&o.jsxs(o.Fragment,{children:[((V=f==null?void 0:f.customColumns)==null?void 0:V.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>Se(he==null?void 0:he.uuid)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{j(he),Y(!0)}})]})]})},oe=()=>o.jsx(o.Fragment,{children:o.jsx(Pt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>G(),"aria-label":"Add Column"})}),ve=he=>o.jsxs(o.Fragment,{children:[he==null?void 0:he.rowHeading,l===!1&&o.jsx(o.Fragment,{children:o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{H(he),ne(!0)}})})]}),Ce=he=>{const V=f==null?void 0:f.rows.filter(function(W){return(W==null?void 0:W.uuid)!==he}),te=f;te.rows=V,se(te)},Se=he=>{const V=_t.findIndex(f==null?void 0:f.customColumns,ue=>ue.uuid===he),te=f==null?void 0:f.customColumns.filter(function(ue,Ae){return Ae!==V}),W=f;W.customColumns=te,se(W)};N.useEffect(()=>{B||ee();const he=Xt.addListener("clearRepeatableFields",W=>{W===(v==null?void 0:v.uuid)&&(C(""),D(0),f.isValid=0,d(g,m,A,S,h,f))}),V=Xt.addListener("OnInvalidFieldCatch",W=>{f.uuid===(W==null?void 0:W.fieldId)?D(1):D(0)}),te=Xt.addListener("OnGetFieldValue",W=>{var Ae;const ue=(Ae=W==null?void 0:W.repeatableColumn)==null?void 0:Ae.filter(pe=>(pe==null?void 0:pe.fieldUuid)===(f==null?void 0:f.uuid));ue!=null&&ue.length});return()=>{V.remove(),te.remove(),he.remove()}});const Te=he=>{w(he)},De=()=>{w(!1)},ie=()=>{let he="";return l||(he=he+" field-form-builder"),a===i&&c===!0&&(he=he+" card"),he},U=()=>{const he=f;he.rows=[...he.rows,{rowHeading:"Row",uuid:nt(),custom_values:{}}],se(he)},re=(he,V)=>{j(Ae=>Ae===null?{customKey:V,uuid:""}:{...Ae,customKey:V});const te=f.customColumns,W=te.findIndex(Ae=>Ae.uuid===he.uuid);te[W]={...te[W],customKey:V};const ue=f;ue.customColumns=te,se(ue)},Q=(he,V)=>{H(Ae=>Ae===null?{uuid:"",rowHeading:V}:{...Ae,rowHeading:V});const te=f.rows,W=te.findIndex(Ae=>Ae.uuid===he.uuid);te[W]={...te[W],rowHeading:V};const ue=f;ue.rows=te,se(ue)},se=he=>{d(g,m,A,S,h,he)};function be(he){return he.toLowerCase().replace(/ /g,"-").replace(/[^\w-]+/g,"")}const me=(he,V,te)=>{const W=f.customColumns,ue=W.findIndex(pe=>P&&pe.uuid===P.uuid);W[ue].options[te][V]=he,W[ue].options[te].value=be(he);const Ae=f;Ae.customColumns=W,se(Ae)},ye=()=>{const he=f.customColumns,V=he.findIndex(W=>P&&W.uuid===P.uuid);he[V].options.push({label:"",value:"",uuid:nt()});const te=f;te.customColumns=he,se(te)};return o.jsxs(o.Fragment,{children:[o.jsxs(Is,{maximizable:!0,header:"Update Column Title",visible:ae,style:{width:"20vw"},footer:()=>o.jsxs(o.Fragment,{children:[" ",o.jsx(Pt,{text:!0,label:"Add Option",icon:"pi pi-plus",onClick:()=>ye()}),o.jsx(Pt,{text:!0,label:"Save",onClick:()=>Y(!1)})]}),onHide:()=>Y(!1),children:[o.jsx("div",{className:"p-fluid",children:o.jsx(gn,{value:(P==null?void 0:P.customKey)||"",onChange:he=>re(P,he.target.value)})}),o.jsx("hr",{}),o.jsx("h5",{children:"Options"}),(P==null?void 0:P.options)&&((Ee=P==null?void 0:P.options)==null?void 0:Ee.length)>0&&(P==null?void 0:P.options.map((he,V)=>o.jsxs("div",{className:"my-2 flex p-fluid",children:[o.jsx("span",{children:V+1}),o.jsx(gn,{value:(he==null?void 0:he.label)||"",className:"ml-2",onChange:te=>me(te.target.value,"label",V)})]},`custom_column_option_${V}`)))]}),o.jsx(Is,{maximizable:!0,header:"Update Row Title",visible:ge,style:{width:"20vw"},footer:()=>o.jsx(Pt,{text:!0,label:"Save",onClick:()=>ne(!1)}),onHide:()=>ne(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(gn,{value:(M==null?void 0:M.rowHeading)||"",onChange:he=>Q(M,he.target.value)})})}),o.jsx(Xi,{visibilty:x,closeSettingFieldSidebar:De,...t}),o.jsx("div",{dir:s,className:ie(),children:a===i&&c===!0?o.jsx(li,{headerTemplate:n,toggleable:!0,children:o.jsx(tj,{ref:e,...t,field:f,isPreview:l,userSelectedLanguage:u,fieldIndex:h,customColumnHeaderTemplate:K,customColumnRowBodyTemplate:ve,setAllFields:fe,allFields:de,actionHeaderTemplate:oe,actionBodyTemplate:J,isFocus:E,inputValue:T,handleFieldSettingsSidebar:Te,isAdmin:c})}):o.jsx(tj,{ref:e,...t,field:f,isPreview:l,userSelectedLanguage:u,fieldIndex:h,customColumnHeaderTemplate:K,customColumnRowBodyTemplate:ve,setAllFields:fe,allFields:de,actionHeaderTemplate:oe,actionBodyTemplate:J,isFocus:E,inputValue:T,handleFieldSettingsSidebar:Te,isAdmin:c})})]})},rSe=t=>{const{indexes:e,customColumnIndex:n,allFields:r}=t;return o.jsx("div",{children:o.jsx(gn,{value:r[`${e==null?void 0:e.rowIndex}-${n}`]})})},nj=t=>{var m,g,v,A,S,x,w;const{field:e,isPreview:n,userSelectedLanguage:r,fieldIndex:i,customColumnHeaderTemplate:a,setAllFields:s,allFields:l,actionHeaderTemplate:c,actionBodyTemplate:u,isFocus:d,inputValue:f,isAdmin:h}=t;return o.jsxs("div",{className:`field ${n?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card p-fluid py-6 px-4":"card py-3 px-4"}`,children:[" ",o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(m=e==null?void 0:e.headerText)==null?void 0:m[r==null?void 0:r.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:i,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((g=e==null?void 0:e.attributes)==null?void 0:g.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",n?o.jsx(o.Fragment,{children:(v=e==null?void 0:e.label)==null?void 0:v[r==null?void 0:r.type]}):o.jsx(Zi,{path:"",...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(A=e==null?void 0:e.toolTip)==null?void 0:A[r==null?void 0:r.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",style:{backgroundColor:"#0a061a"},children:[o.jsxs(zs,{scrollable:!0,showGridlines:!0,value:e==null?void 0:e.rows,children:[e==null?void 0:e.customColumns.map((T,C)=>o.jsx(dr,{header:a(T),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(_,E)=>o.jsx(rSe,{customColumn:T,e:_,indexes:E,customColumnIndex:C,setAllFields:s,allFields:l,...t})},T==null?void 0:T.uuid)),n===!1&&o.jsx(dr,{frozen:!0,header:T=>c(T),body:T=>u(T),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((S=e==null?void 0:e.attributes)==null?void 0:S.required)&&o.jsx("small",{className:"error",children:d===1&&!f?(x=e==null?void 0:e.validationMesssage)==null?void 0:x.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(w=e==null?void 0:e.helperText)==null?void 0:w[r==null?void 0:r.type]})})]})]})}),h&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})},iSe=t=>{var Ee;const e=he=>{const V=he.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",te=`${he.className} justify-content-start`,W=`${he.titleClassName} pl-1`;return o.jsxs("div",{className:te,children:[o.jsxs("button",{className:he.togglerClassName,onClick:he.onTogglerClick,children:[o.jsx("span",{className:V}),o.jsx(Qt,{})]}),o.jsx("span",{className:W,children:_})]})},{userTaskSubmitFormData:n,TASK_PUBLISHED:r,task_status:i}=mr(),{userSelectedLanguage:a,fieldSettingUpdate:s}=on(),{globalAlignment:l,isPreview:c,isAdmin:u,isRenderView:d}=Zt(),{field:f,fieldIndex:h,sectionIndex:m,pageIndex:g,row:v,rowIndex:A,columnIndex:S}=t,[x,w]=N.useState(!1),[T,C]=N.useState(""),[_]=N.useState((Ee=f==null?void 0:f.label)==null?void 0:Ee[a==null?void 0:a.type]),[E,D]=N.useState(0),[B,k]=N.useState(!1),[P,j]=N.useState(null),[M,H]=N.useState(null),[de,fe]=N.useState({}),[ee,G]=N.useState(!1),ae=()=>{var he,V,te;if(v!=null&&v.rowIsRepeatable){if(v!=null&&v.repeatableFields){const W=[...v.repeatableFields],ue=_t.findIndex(W,function(Ae){return Ae.uuid===(f==null?void 0:f.uuid)});ue>=0&&W[ue].fieldData?C(W[ue].fieldData):C("")}}else{const W=n;if(W!=null&&W.length){for(const ue of W)if(ue.fieldId===t.field.uuid&&((he=ue==null?void 0:ue.postData[0])==null?void 0:he.postValue)!==""&&((V=ue==null?void 0:ue.postData[0])!=null&&V.postValue)){C((te=ue==null?void 0:ue.postData[0])==null?void 0:te.postValue);break}}}k(!0)},Y=()=>{const he=f;he.customColumns=[...he.customColumns,{customKey:"Column",uuid:nt(),options:[]}],me(he)},[ge,ne]=N.useState(!1),[J,K]=N.useState(!1),oe=he=>{var V;return o.jsxs(o.Fragment,{children:[((V=f==null?void 0:f.options)==null?void 0:V.length)>1&&o.jsx(Pt,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>Te(he==null?void 0:he.uuid),"aria-label":"Add Row",size:"small"}),o.jsx(Pt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>Q(),"aria-label":"Add Row",size:"small"})]})},ve=he=>{var V;return o.jsxs(o.Fragment,{children:[he==null?void 0:he.customKey,c===!1&&o.jsxs(o.Fragment,{children:[((V=f==null?void 0:f.customColumns)==null?void 0:V.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>De(he==null?void 0:he.uuid)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{j(he),ne(!0)}})]})]})},Ce=()=>o.jsx(o.Fragment,{children:o.jsx(Pt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>Y(),"aria-label":"Add Column"})}),Se=he=>o.jsxs(o.Fragment,{children:[he==null?void 0:he.rowHeading,c===!1&&o.jsx(o.Fragment,{children:o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{H(he),K(!0)}})})]}),Te=he=>{const V=f==null?void 0:f.rows.filter(function(W){return(W==null?void 0:W.uuid)!==he}),te=f;te.rows=V,me(te)},De=he=>{const V=_t.findIndex(f==null?void 0:f.customColumns,ue=>ue.uuid===he),te=f==null?void 0:f.customColumns.filter(function(ue,Ae){return Ae!==V}),W=f;W.customColumns=te,me(W)};N.useEffect(()=>{B||ae();const he=Xt.addListener("clearRepeatableFields",ue=>{ue===(v==null?void 0:v.uuid)&&(C(""),D(0),f.isValid=0,s(g,m,A,S,h,f))}),V=Xt.addListener("onSubmitUserForm",()=>{}),te=Xt.addListener("OnInvalidFieldCatch",ue=>{f.uuid===(ue==null?void 0:ue.fieldId)?D(1):D(0)}),W=Xt.addListener("OnGetFieldValue",ue=>{var pe;const Ae=(pe=ue==null?void 0:ue.repeatableColumn)==null?void 0:pe.filter(ke=>(ke==null?void 0:ke.fieldUuid)===(f==null?void 0:f.uuid));Ae!=null&&Ae.length});return()=>{V.remove(),te.remove(),W.remove(),he.remove()}});const ie=he=>{w(he)},U=()=>{w(!1)},re=()=>{let he="";return c||(he=he+" field-form-builder"),i===r&&u===!0&&(he=he+" card"),he},Q=()=>{const he=f;he.rows=[...he.rows,{rowHeading:"Row",uuid:nt(),custom_values:{}}],me(he)},se=(he,V)=>{j(Ae=>Ae===null?{customKey:V,uuid:""}:{...Ae,customKey:V});const te=f.customColumns,W=te.findIndex(Ae=>Ae.uuid===he.uuid);te[W]={...te[W],customKey:V};const ue=f;ue.customColumns=te,me(ue)},be=(he,V)=>{H(Ae=>Ae===null?{uuid:"",rowHeading:V}:{...Ae,rowHeading:V});const te=f.rows,W=te.findIndex(Ae=>Ae.uuid===he.uuid);te[W]={...te[W],rowHeading:V};const ue=f;ue.rows=te,me(ue)},me=he=>{s(g,m,A,S,h,he)},ye=()=>{G(!0)},Ie=()=>{G(!1)};return o.jsxs(o.Fragment,{children:[o.jsx(Is,{maximizable:!0,header:"Update Column Title",visible:ge,style:{width:"20vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsx(Pt,{text:!0,label:"Save",onClick:()=>ne(!1)})}),onHide:()=>ne(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(gn,{value:(P==null?void 0:P.customKey)||"",onChange:he=>se(P,he.target.value)})})}),o.jsx(Is,{maximizable:!0,header:"Update Row Title",visible:J,style:{width:"20vw"},footer:()=>o.jsx(Pt,{text:!0,label:"Save",onClick:()=>K(!1)}),onHide:()=>K(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(gn,{value:(M==null?void 0:M.rowHeading)||"",onChange:he=>be(M,he.target.value)})})}),o.jsx(Xi,{visibilty:x,closeSettingFieldSidebar:U,...t}),o.jsx("div",{className:"field-form-builder",children:o.jsxs("div",{onMouseOver:ye,onMouseOut:Ie,children:[!d&&!c&&ee&&o.jsx(jr,{handleFieldSettingsSidebar:ie,...t}),o.jsx("div",{dir:l,className:re(),children:i===r&&u===!0?o.jsx(li,{headerTemplate:e,toggleable:!0,children:o.jsx(nj,{...t,field:f,isPreview:c,userSelectedLanguage:a,fieldIndex:h,customColumnHeaderTemplate:ve,customColumnRowBodyTemplate:Se,setAllFields:fe,allFields:de,actionHeaderTemplate:Ce,actionBodyTemplate:oe,isFocus:E,inputValue:T,handleFieldSettingsSidebar:ie,isAdmin:u})}):o.jsx(nj,{...t,field:f,isPreview:c,userSelectedLanguage:a,fieldIndex:h,customColumnHeaderTemplate:ve,customColumnRowBodyTemplate:Se,setAllFields:fe,allFields:de,actionHeaderTemplate:Ce,actionBodyTemplate:oe,isFocus:E,inputValue:T,handleFieldSettingsSidebar:ie,isAdmin:u})})]})})]})},aSe=t=>{var De,ie,U,re,Q,se,be,me,ye,Ie,Ee;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i,updateUserFormDataSubmit:a}=mr(),[s,l]=N.useState([]),{field:c,fieldIndex:u,row:d,pageIndex:f,sectionIndex:h,section:m,page:g,rowIndex:v,columnIndex:A,path:S,update:x,value:w}=t,{isRenderView:T,isAdmin:C,isPreview:_}=Zt(),{userSelectedLanguage:E}=on(),[D,B]=N.useState(!1),[k,P]=N.useState(""),[j,M]=N.useState(0),[H,de]=N.useState(!1),[fe,ee]=N.useState(!1),G=()=>{ee(!0)},ae=()=>{ee(!1)},Y=he=>{B(he)},ge=()=>{B(!1)};N.useEffect(()=>((c==null?void 0:c.dataSourceType)==="custom"&&l(c==null?void 0:c.options),c==null||c.dataSourceType,()=>{}));const ne=()=>{var V,te,W,ue;let he=null;if(d!=null&&d.rowIsRepeatable){if(d!=null&&d.repeatableFields){const Ae=[...d.repeatableFields],pe=_t.findIndex(Ae,function(ke){return ke.uuid===(c==null?void 0:c.uuid)});pe>=0&&Ae[pe].fieldData?(he=Ae[pe].fieldData,P(Ae[pe].fieldData)):(c.isValid=0,P(""))}}else{const Ae=i,pe=_t.cloneDeep(e);if(Ae!=null&&Ae.length){for(const ke of Ae)if(ke.fieldId===t.field.uuid&&((V=ke==null?void 0:ke.postData)!=null&&V.length)){he=(te=ke==null?void 0:ke.postData[0])==null?void 0:te.postValue,P((W=ke==null?void 0:ke.postData[0])==null?void 0:W.postValue),pe[c==null?void 0:c.uuid]=(ue=ke==null?void 0:ke.postData[0])==null?void 0:ue.postValue;const Le=Object.keys(pe).length;r(Le);break}}}P(he),setTimeout(()=>{de(!0)},2e3)};N.useEffect(()=>{!H&&(i==null?void 0:i.length)>0&&ne();const he=Xt.addListener("clearRepeatableFields",W=>{W===(d==null?void 0:d.uuid)&&(P(""),M(0),c.isValid=1)}),V=Xt.addListener("onSubmitUserForm",()=>{var W;(W=c==null?void 0:c.attributes)!=null&&W.required?k?c.isValid=1:c.isValid=0:c.isValid=1}),te=Xt.addListener("OnInvalidFieldCatch",W=>{c.uuid===(W==null?void 0:W.fieldId)?M(1):M(0)});return()=>{V.remove(),te.remove(),he.remove()}});const J=(he,V)=>{var te;if(i){const W=[...i],ue=_t.findIndex(W,function(pe){return pe.rowId===(d==null?void 0:d.uuid)});let Ae=(te=i[ue])==null?void 0:te.repeatableFields;Ae={...Ae,[he==null?void 0:he.uuid]:V},W[ue]={...W[ue],repeatableFields:Ae},a(W)}P(V),V?he.isValid=1:he.isValid=0},K=he=>{var V;P(he.target.value),d!=null&&d.rowIsRepeatable?J(c,(V=he==null?void 0:he.target)==null?void 0:V.value):Se(he.target.value)},oe=()=>(c==null?void 0:c.dataSourceType)==="custom"?`optionText.${E.type}`:(c==null?void 0:c.dataSourceType)==="database"?`${c==null?void 0:c.optionLabel}`:"",ve=()=>(c==null?void 0:c.dataSourceType)==="custom"?`optionText.${E.type}`:(c==null?void 0:c.dataSourceType)==="database"?`${c==null?void 0:c.optionLabel}`:"",Ce=()=>{var he,V,te;if(((he=c==null?void 0:c.fieldType)==null?void 0:he.type)==="radio"){const W=[];return s.map((ue,Ae)=>{var ke,Le,We,gt;const pe=k;W.push(o.jsxs("div",{className:"field-radiobutton field-radiobutton-builder",onClick:()=>{K({value:ue,target:{value:ue}})},style:(pe==null?void 0:pe.uuid)===(ue==null?void 0:ue.uuid)?{backgroundColor:"#0F8BFD",padding:15,borderRadius:8}:{padding:15},children:[o.jsx(Ji,{onFocus:()=>M(1),inputId:`radio-option-${Ae}-${ue==null?void 0:ue.uuid}-${_?"preview":"builder-radio"}`,onChange:At=>{K(At)},value:ue,name:`radio-option-${Ae}-${ue==null?void 0:ue.uuid}-${_?"preview":"builder"}`,checked:(pe==null?void 0:pe.uuid)===(ue==null?void 0:ue.uuid),disabled:isDisabled}),((ke=ue==null?void 0:ue.hyperlinkText)==null?void 0:ke[E==null?void 0:E.type])===""?o.jsx("label",{htmlFor:`radio-option-${Ae}-${ue==null?void 0:ue.uuid}-${_?"preview":"builder"}`,children:(Le=ue==null?void 0:ue.optionText)==null?void 0:Le[E==null?void 0:E.type]}):o.jsx("label",{children:o.jsx("a",{href:(We=ue==null?void 0:ue.hyperlinkText)==null?void 0:We[E==null?void 0:E.type],target:"_blank",rel:"noreferrer",children:(gt=ue==null?void 0:ue.optionText)==null?void 0:gt[E==null?void 0:E.type]})})]},Ae))}),W}if(((V=c==null?void 0:c.fieldType)==null?void 0:V.type)==="dropdown")return o.jsx(Sa,{onFocus:()=>M(1),onChange:W=>{d!=null&&d.rowIsRepeatable?J(c,W.target.value):Se(W.target.value)},options:s,optionLabel:ve(),optionValue:oe(),value:k,placeholder:(te=c==null?void 0:c.placeholder)==null?void 0:te[E==null?void 0:E.type],disabled:isDisabled})},Se=he=>{var W,ue;P(he.target.value);const V=i,te=_t.cloneDeep(e);if(V!==null){if((W=he==null?void 0:he.target)!=null&&W.value){if(te[c==null?void 0:c.uuid]=(ue=he==null?void 0:he.target)==null?void 0:ue.value,(V==null?void 0:V.length)>0)for(const Ae of V)Ae.fieldId===t.field.uuid&&(Ae.postData[0]={postValue:he.target.value})}else if(delete te[c==null?void 0:c.uuid],(V==null?void 0:V.length)>0)for(const Ae of V)Ae.fieldId===t.field.uuid&&(Ae.postData[0]={postValue:""})}if(!(d!=null&&d.rowIsRepeatable)){n(te);const Ae=Object.keys(te).length;r(Ae)}},Te=o.jsxs("div",{onMouseOver:G,onMouseOut:ae,children:[!T&&!_&&fe&&o.jsx(jr,{handleFieldSettingsSidebar:Y,...t}),o.jsx("div",{className:`field-${(c==null?void 0:c.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(De=c==null?void 0:c.headerText)==null?void 0:De[E==null?void 0:E.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-medium mb-5 text-700 text-2xl",children:[o.jsx(ia,{sectionIndex:h,fieldIndex:u,field:c,update:x,value:w}),((ie=c==null?void 0:c.attributes)==null?void 0:ie.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",_?o.jsx(o.Fragment,{children:(U=c==null?void 0:c.label)==null?void 0:U[E==null?void 0:E.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:c!=null&&c.showToolTip?o.jsx(o.Fragment,{children:o.jsx(Mi,{message:(re=c==null?void 0:c.toolTip)==null?void 0:re[E==null?void 0:E.type],position:"right"})}):""})]}),Ce(),o.jsx("div",{children:((Q=c==null?void 0:c.attributes)==null?void 0:Q.required)&&o.jsx("small",{className:"error",children:j===1&&!k?(se=c==null?void 0:c.validationMesssage)==null?void 0:se.language:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(be=c==null?void 0:c.helperText)==null?void 0:be[E==null?void 0:E.type]})}),((me=c==null?void 0:c.inlineConditionalRules)==null?void 0:me.rules.length)>0&&_===!1&&o.jsx("p",{children:"Inline conditional rules"}),H===!0&&((Ie=(ye=c==null?void 0:c.inlineConditionalRules)==null?void 0:ye.rules)==null?void 0:Ie.length)>0&&((Ee=c==null?void 0:c.inlineConditionalRules)==null?void 0:Ee.rules.map((he,V)=>{const te=k;return _===!0?o.jsx("div",{children:he==null?void 0:he.conditions.map((W,ue)=>o.jsx(N.Fragment,{children:o.jsx(Qd,{isConditionTrue:(te==null?void 0:te.value)==W.value||!_,inputValue:k,condition:W,ruleIndex:V,conditionIndex:ue,field:c,section:m,page:g,row:d,pageIndex:f,sectionIndex:h,rowIndex:v,columnIndex:A,path:S,...t})},`select-rule-${V}-`+ue))},`rule-${V}`):o.jsx(li,{className:"mt-4",header:`Rule ${V+1}`,children:o.jsx("div",{children:he==null?void 0:he.conditions.map((W,ue)=>o.jsx(N.Fragment,{children:o.jsx(Qd,{isConditionTrue:(te==null?void 0:te.value)===W.value||!_,inputValue:k,condition:W,ruleIndex:V,conditionIndex:ue,isPreview:_,field:c,section:m,page:g,row:d,pageIndex:f,sectionIndex:h,rowIndex:v,columnIndex:A,path:S,...t})},`select-rule-${V}-`+ue))},`rule-${V}`)},V)}))]}),C&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[D===!0&&o.jsx(Xi,{visibilty:D,closeSettingFieldSidebar:ge,...t},c==null?void 0:c.uuid),o.jsx(wi,{...t,fieldWrap:Te})]})},sSe=t=>{var de,fe,ee,G;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i}=mr(),{field:a,row:s,isDisabled:l}=t,{isPreview:c,isRenderView:u,isAdmin:d}=Zt(),{userSelectedLanguage:f}=on(),[h,m]=N.useState(!1),[g,v]=N.useState(""),[A,S]=N.useState(0),[x,w]=N.useState(!1),[T,C]=N.useState(!1),_=()=>{C(!0)},E=()=>{C(!1)},D=ae=>{m(ae)},B=()=>{m(!1)},k=()=>{var Y,ge,ne,J;let ae=null;if(s!=null&&s.rowIsRepeatable){if(s!=null&&s.repeatableFields){const K=[...s.repeatableFields],oe=_t.findIndex(K,function(ve){return ve.uuid===(a==null?void 0:a.uuid)});oe>=0&&K[oe].fieldData?(ae=K[oe].fieldData,v(K[oe].fieldData)):(a.isValid=0,v(""))}}else{const K=i,oe=_t.cloneDeep(e);if(K!=null&&K.length){for(const ve of K)if(ve.fieldId===t.field.uuid&&((Y=ve==null?void 0:ve.postData)!=null&&Y.length)){ae=(ge=ve==null?void 0:ve.postData[0])==null?void 0:ge.postValue,v((ne=ve==null?void 0:ve.postData[0])==null?void 0:ne.postValue),oe[a==null?void 0:a.uuid]=(J=ve==null?void 0:ve.postData[0])==null?void 0:J.postValue;const Ce=Object.keys(oe).length;r(Ce);break}}}v(ae),setTimeout(()=>{w(!0)},2e3)};N.useEffect(()=>{x||k();const ae=Xt.addListener("clearRepeatableFields",ne=>{ne===(s==null?void 0:s.uuid)&&(v(""),S(0),a.isValid=1)}),Y=Xt.addListener("onSubmitUserForm",()=>{var ne;if((ne=a==null?void 0:a.attributes)!=null&&ne.required){const J=g;J!=null&&J[a.uuid]?a.isValid=1:a.isValid=0}else a.isValid=1}),ge=Xt.addListener("OnInvalidFieldCatch",ne=>{a.uuid===(ne==null?void 0:ne.fieldId)?S(1):S(0)});return()=>{Y.remove(),ge.remove(),ae.remove()}});const P=(ae,Y,ge,ne,J)=>ne==null?void 0:ne.map(K=>{var oe,ve;return{...K,children:K!=null&&K.children&&((oe=K==null?void 0:K.children)==null?void 0:oe.length)>0?[...((ve=K==null?void 0:K.children)==null?void 0:ve.map(Ce=>Y===(K==null?void 0:K.uuid)||J===!0?(ge!=null&&ge[Ce==null?void 0:Ce.uuid]&&delete ge[Ce==null?void 0:Ce.uuid],{...Ce,options:P(ae,Y,ge,(Ce==null?void 0:Ce.options)||[],!0)}):{...Ce,options:P(ae,Y,ge,(Ce==null?void 0:Ce.options)||[],!1)}))||[]]:[]}}),j=(ae,Y)=>{const ge={...g};P(ae,Y,ge,a==null?void 0:a.options,!1),ge[ae]=Y,v(ge),s!=null&&s.rowIsRepeatable||M(ge)},M=ae=>{const Y=i,ge=_t.cloneDeep(e);if(Y!==null){if(ae){if(ge[a==null?void 0:a.uuid]=ae,(Y==null?void 0:Y.length)>0)for(const ne of Y)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:ae})}else if(delete ge[a==null?void 0:a.uuid],(Y==null?void 0:Y.length)>0)for(const ne of Y)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:""})}if(!(s!=null&&s.rowIsRepeatable)){n(ge);const ne=Object.keys(ge).length;r(ne)}},H=o.jsxs("div",{onMouseOver:_,onMouseOut:E,children:[!u&&!c&&T&&o.jsx(jr,{handleFieldSettingsSidebar:D,...t}),o.jsx("div",{className:`field-${(a==null?void 0:a.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(a==null?void 0:a.showHeaderText)&&o.jsx("h6",{children:(de=a==null?void 0:a.headerText)==null?void 0:de[f==null?void 0:f.type]}),o.jsx(q7,{...t,isDisabled:l,isFirst:!0,isPreview:c,schema:a,field:a,value:g,update:(ae,Y)=>{j(ae,Y)}}),o.jsx("div",{children:((fe=a==null?void 0:a.attributes)==null?void 0:fe.required)&&o.jsx("small",{className:"error",children:A===1&&!g?(ee=a==null?void 0:a.validationMesssage)==null?void 0:ee.english:""})}),o.jsx("div",{children:(a==null?void 0:a.showHelperText)&&o.jsx("small",{children:(G=a==null?void 0:a.helperText)==null?void 0:G[f==null?void 0:f.type]})})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[o.jsx(Xi,{visibilty:h,closeSettingFieldSidebar:B,...t},a==null?void 0:a.uuid),o.jsx(wi,{...t,fieldWrap:H})]})},oSe=t=>{var oe,ve,Ce,Se,Te,De,ie,U,re,Q;const{field:e,fieldIndex:n,sectionIndex:r,pageIndex:i,row:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isRenderView:u,isAdmin:d,isPreview:f}=Zt(),{taskRegisterData:h,updateTaskRegisterData:m,updateTaskProgressValue:g,updateUserFormDataSubmit:v,userTaskSubmitFormData:A,task_status:S,TASK_PUBLISHED:x}=mr(),[w,T]=N.useState(!1),{userSelectedLanguage:C,fieldSettingUpdate:_}=on(),[E,D]=N.useState(!1),[B,k]=N.useState(0),[P,j]=N.useState(),[M,H]=N.useState(!1),de=()=>{H(!0)},fe=()=>{H(!1)},ee=[{icon:"pi pi-thumbs-up",thumbValue:"up"},{icon:"pi pi-thumbs-down",thumbValue:"down"}],G=se=>o.jsx("span",{className:"m-2",children:o.jsx("i",{style:{fontSize:30},className:se.icon})}),ae=()=>{var se,be,me;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ye=[...a.repeatableFields],Ie=_t.findIndex(ye,function(Ee){return Ee.uuid===(e==null?void 0:e.uuid)});Ie>=0&&ye[Ie].fieldData?j(ye[Ie].fieldData):j("")}}else{const ye=A;if(ye!=null&&ye.length){for(const Ie of ye)if(Ie.fieldId===t.field.uuid&&((se=Ie==null?void 0:Ie.postData[0])==null?void 0:se.postValue)!==""&&((be=Ie==null?void 0:Ie.postData[0])!=null&&be.postValue)){j((me=Ie==null?void 0:Ie.postData[0])==null?void 0:me.postValue);break}}}D(!0)};N.useEffect(()=>{E||ae();const se=Xt.addListener("clearRepeatableFields",Ie=>{Ie===(a==null?void 0:a.uuid)&&(j(""),k(0),e.isValid=0,_(i,r,s,l,n,e))}),be=Xt.addListener("onSubmitUserForm",()=>{var Ie;(Ie=e==null?void 0:e.attributes)!=null&&Ie.required?P?e.isValid=1:e.isValid=0:e.isValid=1}),me=Xt.addListener("OnInvalidFieldCatch",Ie=>{e.uuid===(Ie==null?void 0:Ie.fieldId)?k(1):k(0)}),ye=Xt.addListener("OnGetFieldValue",Ie=>{var he;const Ee=(he=Ie==null?void 0:Ie.repeatableColumn)==null?void 0:he.filter((V,te)=>(V==null?void 0:V.fieldUuid)===(e==null?void 0:e.uuid));Ee!=null&&Ee.length});return()=>{be.remove(),me.remove(),ye.remove(),se.remove()}});const Y=se=>{j(se.value);const be=A,me=_t.cloneDeep(h);if(be!==null){if(se!=null&&se.value){if(me[e==null?void 0:e.uuid]=se==null?void 0:se.value,(be==null?void 0:be.length)>0)for(const ye of be)ye.fieldId===t.field.uuid&&(ye.postData[0]={postValue:se.value})}else if(delete me[e==null?void 0:e.uuid],(be==null?void 0:be.length)>0)for(const ye of be)ye.fieldId===t.field.uuid&&(ye.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){m(me);const ye=Object.keys(me).length;g(ye)}},ge=(se,be)=>{var me;if(A){const ye=[...A],Ie=_t.findIndex(ye,function(he){return he.rowId===(a==null?void 0:a.uuid)});let Ee=(me=A[Ie])==null?void 0:me.repeatableFields;Ee={...Ee,[se==null?void 0:se.uuid]:be},ye[Ie]={...ye[Ie],repeatableFields:Ee},v(ye)}j(be),be!==""?se.isValid=1:se.isValid=0},ne=se=>{T(se)},J=()=>{T(!1)},K=o.jsxs("div",{onMouseOver:de,onMouseOut:fe,children:[!u&&!f&&M&&o.jsx(jr,{handleFieldSettingsSidebar:ne,...t}),o.jsx("div",{className:`field ${f?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:d?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(oe=e==null?void 0:e.headerText)==null?void 0:oe[C==null?void 0:C.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((ve=e==null?void 0:e.attributes)==null?void 0:ve.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",f?o.jsx(o.Fragment,{children:(Ce=e==null?void 0:e.label)==null?void 0:Ce[C==null?void 0:C.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(Se=e==null?void 0:e.toolTip)==null?void 0:Se[C==null?void 0:C.type],position:"right"})})]}),o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((De=(Te=e==null?void 0:e.icon)==null?void 0:Te.properties)==null?void 0:De.name)}),o.jsx("div",{className:"card flex justify-content-start",children:o.jsx(q0,{value:P,onChange:se=>{j(se.value),a!=null&&a.rowIsRepeatable?ge(e,se.value):Y(se)},itemTemplate:G,optionLabel:"value",onFocus:()=>k(1),options:ee,readOnly:c,className:B===1&&((ie=e==null?void 0:e.attributes)!=null&&ie.required)?P?"valid":"invalid":"valid'"})})]}),o.jsx("div",{children:((U=e==null?void 0:e.attributes)==null?void 0:U.required)&&o.jsx(o.Fragment,{children:o.jsx("small",{className:"error",children:B===1&&!P?(re=e==null?void 0:e.validationMesssage)==null?void 0:re.english:""})})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(Q=e==null?void 0:e.helperText)==null?void 0:Q[C==null?void 0:C.type]})})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[o.jsx(Xi,{visibilty:w,closeSettingFieldSidebar:J,...t}),o.jsx(wi,{...t,fieldWrap:K})]})},lSe=t=>{var ne,J,K,oe,ve,Ce,Se;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a}=mr(),{userSelectedLanguage:s,fieldSettingUpdate:l}=on(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:m,columnIndex:g}=t,{isRenderView:v,isAdmin:A,isPreview:S}=Zt(),[x,w]=N.useState(!1),[T,C]=N.useState(""),[_,E]=N.useState(0),[D,B]=N.useState(!1),[k,P]=N.useState(!1),j=()=>{P(!0)},M=()=>{P(!1)},H=()=>{var Te,De,ie;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const U=[...h.repeatableFields],re=_t.findIndex(U,function(Q){return Q.uuid===(c==null?void 0:c.uuid)});re>=0&&U[re].fieldData?C(U[re].fieldData):C("")}}else{const U=a;if(U!=null&&U.length){for(const re of U)if(re.fieldId===t.field.uuid&&((Te=re==null?void 0:re.postData[0])==null?void 0:Te.postValue)!==""&&((De=re==null?void 0:re.postData[0])!=null&&De.postValue)){C((ie=re==null?void 0:re.postData[0])==null?void 0:ie.postValue);break}}}B(!0)};N.useEffect(()=>{D||H();const Te=Xt.addListener("clearRepeatableFields",re=>{re===(h==null?void 0:h.uuid)&&(C(""),E(0),c.isValid=0,l(f,d,m,g,u,c))}),De=Xt.addListener("onSubmitUserForm",()=>{var re;(re=c==null?void 0:c.attributes)!=null&&re.required?T?c.isValid=1:c.isValid=0:c.isValid=1}),ie=Xt.addListener("OnInvalidFieldCatch",re=>{c.uuid===(re==null?void 0:re.fieldId)?E(1):E(0)}),U=Xt.addListener("OnGetFieldValue",re=>{var se;const Q=(se=re==null?void 0:re.repeatableColumn)==null?void 0:se.filter(be=>(be==null?void 0:be.fieldUuid)===(c==null?void 0:c.uuid));Q!=null&&Q.length});return()=>{De.remove(),ie.remove(),U.remove(),Te.remove()}});const de=Te=>{w(Te)},fe=()=>{w(!1)},ee=Te=>{var U,re;C(Te.target.value);const De=a,ie=_t.cloneDeep(e);if(De!==null){if((U=Te==null?void 0:Te.target)!=null&&U.value){if(ie[c==null?void 0:c.uuid]=(re=Te==null?void 0:Te.target)==null?void 0:re.value,(De==null?void 0:De.length)>0)for(const Q of De)Q.fieldId===t.field.uuid&&(Q.postData[0]={postValue:Te.target.value})}else if(delete ie[c==null?void 0:c.uuid],(De==null?void 0:De.length)>0)for(const Q of De)Q.fieldId===t.field.uuid&&(Q.postData[0]={postValue:""})}if(!(h!=null&&h.rowIsRepeatable)){n(ie);const Q=Object.keys(ie).length;r(Q)}},G=(Te,De,ie,U)=>{var re;if(a){const Q=[...a],se=_t.findIndex(Q,function(me){return me.rowId===(h==null?void 0:h.uuid)});let be=(re=a[se])==null?void 0:re.repeatableFields;be={...be,[ie==null?void 0:ie.uuid]:U},Q[se]={...Q[se],repeatableFields:be},i(Q)}C(U),U!==""?ie.isValid=1:ie.isValid=0},ae=5,Y=()=>{const Te=[],De=[BE,LE,VE,kE,ME],ie=["Awful","Not Very Good","Okay","Really Good","Fantastic"];for(let U=0;U<ae;U++)Te.push(o.jsxs("label",{children:[o.jsx("input",{onChange:re=>{h!=null&&h.rowIsRepeatable?G(f,d,c,re.target.value):ee(re)},checked:parseInt(T)===U,name:"liker-Emoji-scale"+(c==null?void 0:c.uuid),type:"radio",value:U}),o.jsxs("span",{className:"grid m-0",children:[o.jsx("div",{className:"col-12 flex justify-content-center",children:o.jsx("img",{src:De[U]})}),o.jsx("div",{children:ie[U]})]})]},`field-${c==null?void 0:c.uuid}-likertEmojiScale-${U} ${parseInt(T)===U?"scale-selected":""}`));return Te},ge=o.jsxs("div",{onMouseOver:j,onMouseOut:M,children:[!v&&!S&&k&&o.jsx(jr,{handleFieldSettingsSidebar:de,...t}),o.jsxs("div",{className:`field ${S?" ":" builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 ",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(ne=c==null?void 0:c.headerText)==null?void 0:ne[s==null?void 0:s.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:`label${u}`,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((J=c==null?void 0:c.attributes)==null?void 0:J.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",S?o.jsx(o.Fragment,{children:(K=c==null?void 0:c.label)==null?void 0:K[s==null?void 0:s.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(c==null?void 0:c.showToolTip)&&o.jsx(Mi,{message:(oe=c==null?void 0:c.toolTip)==null?void 0:oe[s==null?void 0:s.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("div",{children:o.jsx("div",{className:"emoji",children:Y()})}),o.jsx("div",{children:((ve=c==null?void 0:c.attributes)==null?void 0:ve.required)&&o.jsx("small",{className:"error",children:_===1&&!T?(Ce=c==null?void 0:c.validationMesssage)==null?void 0:Ce.english:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(Se=c==null?void 0:c.helperText)==null?void 0:Se[s==null?void 0:s.type]})})]})]})}),A&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(Xi,{visibilty:x,closeSettingFieldSidebar:fe,...t}),o.jsx(wi,{...t,fieldWrap:ge})]})},cSe=t=>{var H,de,fe,ee,G,ae,Y,ge,ne,J,K;const{userTaskSubmitFormData:e}=mr(),{userSelectedLanguage:n,fieldSettingUpdate:r}=on(),{isPreview:i,isAdmin:a,isRenderView:s}=Zt(),{field:l,fieldIndex:c,sectionIndex:u,pageIndex:d,row:f,rowIndex:h,columnIndex:m}=t,[g,v]=N.useState(!1),[A,S]=N.useState(""),[x,w]=N.useState(0),[T,C]=N.useState(!1),[_,E]=N.useState(!1),D=()=>{E(!0)},B=()=>{E(!1)},k=()=>{var oe,ve,Ce;if(f!=null&&f.rowIsRepeatable){if(f!=null&&f.repeatableFields){const Se=[...f.repeatableFields],Te=_t.findIndex(Se,function(De){return De.uuid===(l==null?void 0:l.uuid)});Te>=0&&Se[Te].fieldData?S(Se[Te].fieldData):S("")}}else{const Se=e;if(Se!=null&&Se.length){for(const Te of Se)if(Te.fieldId===t.field.uuid&&((oe=Te==null?void 0:Te.postData[0])==null?void 0:oe.postValue)!==""&&((ve=Te==null?void 0:Te.postData[0])!=null&&ve.postValue)){S((Ce=Te==null?void 0:Te.postData[0])==null?void 0:Ce.postValue);break}}}C(!0)};N.useEffect(()=>{T||k();const oe=Xt.addListener("clearRepeatableFields",Te=>{Te===(f==null?void 0:f.uuid)&&(S(""),w(0),l.isValid=0,r(d,u,h,m,c,l))}),ve=Xt.addListener("onSubmitUserForm",()=>{var Te,De;(Te=l==null?void 0:l.attributes)!=null&&Te.required?A&&(A==null?void 0:A.length)<((De=l==null?void 0:l.attributes)==null?void 0:De.minLength)?l.isValid=1:l.isValid=0:l.isValid=1}),Ce=Xt.addListener("OnInvalidFieldCatch",Te=>{l.uuid===(Te==null?void 0:Te.fieldId)?w(1):w(0)}),Se=Xt.addListener("OnGetFieldValue",Te=>{var ie;const De=(ie=Te==null?void 0:Te.repeatableColumn)==null?void 0:ie.filter(U=>(U==null?void 0:U.fieldUuid)===(l==null?void 0:l.uuid));De!=null&&De.length});return()=>{ve.remove(),Ce.remove(),Se.remove(),oe.remove()}});const P=oe=>{v(oe)},j=()=>{v(!1)},M=o.jsxs("div",{onMouseOver:D,onMouseOut:B,children:[!s&&!i&&_&&o.jsx(jr,{handleFieldSettingsSidebar:P,...t}),o.jsxs("div",{className:`field ${i?" ":" builder-element-wrapper "}${(l==null?void 0:l.isFluid)===!0?" card p-fluid ":"card"} ${s?" ":" py-6 px-4 "}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:a?"col-6 ":"col-12 p-fluid",children:[(l==null?void 0:l.showHeaderText)&&o.jsx("h6",{children:(H=l==null?void 0:l.headerText)==null?void 0:H[n==null?void 0:n.type]}),(l==null?void 0:l.showLabel)&&o.jsxs("label",{htmlFor:c,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((de=l==null?void 0:l.attributes)==null?void 0:de.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",i?o.jsx(o.Fragment,{children:(fe=l==null?void 0:l.label)==null?void 0:fe[n==null?void 0:n.type]}):o.jsx(Zi,{...t}),(l==null?void 0:l.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(Mi,{message:(ee=l==null?void 0:l.toolTip)==null?void 0:ee[n==null?void 0:n.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("span",{className:"p-input-icon-"+(l==null?void 0:l.iconAlignment),children:(l==null?void 0:l.showIcon)&&o.jsx("i",{className:"pi pi-"+((ae=(G=l==null?void 0:l.icon)==null?void 0:G.properties)==null?void 0:ae.name)})}),o.jsx("div",{children:((Y=l==null?void 0:l.attributes)==null?void 0:Y.required)&&o.jsxs(o.Fragment,{children:[o.jsx("small",{className:"error",children:x===1&&!A?(ge=l==null?void 0:l.validationMesssage)==null?void 0:ge.english:""}),o.jsx("small",{className:"error",children:x===1&&(A==null?void 0:A.length)<((ne=l==null?void 0:l.attributes)==null?void 0:ne.minLength)?`Mini length ${(J=l==null?void 0:l.attributes)==null?void 0:J.minLength}`:""})]})}),o.jsx("div",{children:(l==null?void 0:l.showHelperText)&&o.jsx("small",{children:(K=l==null?void 0:l.helperText)==null?void 0:K[n==null?void 0:n.type]})})]})]})}),a&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(Xi,{visibilty:g,closeSettingFieldSidebar:j,...t}),o.jsx(wi,{...t,fieldWrap:M})]})},uSe=t=>{var j,M,H,de,fe,ee,G;const{field:e,fieldIndex:n,columnIndex:r,sectionIndex:i,rowIndex:a,pageIndex:s,ref:l}=t,{isPreview:c}=Zt(),{userSelectedLanguage:u,fieldSettingUpdate:d}=on(),{userTaskSubmitFormData:f}=mr(),[h,m]=N.useState(!1),[g,v]=N.useState(""),[A,S]=N.useState(0),[x,w]=N.useState(!1),[T,C]=N.useState(!1),_=()=>{C(!0)},E=()=>{C(!1)},D=()=>{var Y;const ae=f;if(ae.length){for(const ge of ae)if(ge.fieldId===t.field.uuid){v((Y=ge==null?void 0:ge.postData[0])==null?void 0:Y.postValue),w(!0);break}}};N.useEffect(()=>{x||D();const ae=Xt.addListener("onSubmitUserForm",()=>{var ge;(ge=e==null?void 0:e.attributes)!=null&&ge.required&&(g?e.isValid=1:e.isValid=0,d(s,i,a,r,n,e))}),Y=Xt.addListener("OnInvalidFieldCatch",ge=>{e.uuid===(ge==null?void 0:ge.fieldId)?S(1):S(0)});return()=>{ae.remove(),Y.remove()}});const B=ae=>{m(ae)},k=()=>{m(!1)},P=o.jsxs("div",{onMouseOver:_,onMouseOut:E,children:[!c&&T&&o.jsx(jr,{handleFieldSettingsSidebar:B,...t}),o.jsx("div",{className:c?"":"field-form-builder",ref:l,children:o.jsx("div",{className:"field",children:o.jsx("div",{className:"grid",children:o.jsxs("div",{className:c?"col-12":"col-11",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(j=e==null?void 0:e.headerText)==null?void 0:j[u==null?void 0:u.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:`${n}`,className:"flex font-medium mb-3 text-700 text-2xl",children:[((M=e==null?void 0:e.attributes)==null?void 0:M.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",i+1,".",r+1,".",n+1," ",(H=e==null?void 0:e.label)==null?void 0:H[u==null?void 0:u.type],o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(de=e==null?void 0:e.toolTip)==null?void 0:de[u==null?void 0:u.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("p",{children:"Anchor Tag"}),o.jsx("div",{children:((fe=e==null?void 0:e.attributes)==null?void 0:fe.required)&&o.jsx("small",{className:"error",children:A===1&&!g?(ee=e==null?void 0:e.validationMesssage)==null?void 0:ee.language:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(G=e==null?void 0:e.helperText)==null?void 0:G[u==null?void 0:u.type]})})]})]})})})})]});return o.jsxs(o.Fragment,{children:[h===!0&&o.jsx(Xi,{visibilty:h,closeSettingFieldSidebar:k,...t}),o.jsx(wi,{...t,fieldWrap:P})]})},qc=t=>{const{data:e,path:n,field:r}=t,{renderType:i,isPreview:a,isAdmin:s}=Zt(),{task_status:l,TASK_PUBLISHED:c}=mr(),u=N.useRef(null),[d,f]=N.useState(!1),[{isDragging:h},m]=Qi({item:{...e,type:j1,uuid:e==null?void 0:e.uuid,path:n},type:j1,collect:T=>({isDragging:T.isDragging()})}),g=h?.25:1;m(u);const v=l===c||s;console.log("isDisabled",v);const A=T=>{switch(r==null?void 0:r.componentType){case"text":return o.jsx(wle,{typeName:"Text",field:r,...T});case"number":return o.jsx(Ele,{typeName:"Number",field:r,...T});case"email":return o.jsx(Ile,{typeName:"Email",field:r,...T});case"textarea":return o.jsx(_le,{typeName:"Text Area",field:r,...T});case"editor":return o.jsx(Xle,{typeName:"Editor",field:r,...T});case"question":return o.jsx(xce,{typeName:"Exam",field:r,...T});case"select":return o.jsx(Mle,{typeName:"Select",field:r,...T});case"multi-select":return o.jsx(cce,{typeName:"Multi Select",field:r,...T});case"checkbox":return o.jsx(uce,{typeName:"Checkbox",field:r,...T});case"radio":return o.jsx(fce,{typeName:"Radio",field:r,...T});case"radio-hierarchal":return o.jsx(sSe,{typeName:"Radio Progressive",field:r,...T});case"href":return o.jsx(Tle,{typeName:"Href",field:r,...T});case"heading":return o.jsx(mce,{typeName:"Heading",field:r,...T});case"paragraph":return o.jsx(Ive,{typeName:"Paragraph",field:r,...T});case"image":return o.jsx(KF,{typeName:"Image",field:r,...T});case"video":return o.jsx(D3e,{typeName:"Video",field:r,...T});case"hr":return o.jsx(O3e,{typeName:"Hr",field:r,...T});case"date-picker":return o.jsx(N3e,{typeName:"Date Picker",field:r,...T});case"signature":return o.jsx(F3e,{typeName:"Signature",field:r,...T});case"file-upload":return o.jsx(Dbe,{typeName:"File Upload",field:r,...T});case"facebook-login":return o.jsx(cSe,{typeName:"Facebook Login",field:r,...T});case"anchor":return o.jsx(uSe,{ref:u,typeName:"Anchor Tag",field:r,...T});case"image-gallery":return o.jsx(Cve,{typeName:"Image Gallery",field:r,...T});case"quiz":return o.jsx(Fbe,{typeName:"Quiz",field:r,...T});case"document":return o.jsx(Obe,{typeName:"Document",field:r,...T});case"list":return o.jsx(Mbe,{typeName:"List",field:r,...T});case"country":return o.jsx(Ale,{typeName:"Country",field:r,...T});case"phone":return o.jsx(zwe,{typeName:"Phone",field:r,...T});case"web-url":return o.jsx(Hwe,{typeName:"Website Url",field:r,...T});case"rating":return o.jsx(Gwe,{typeName:"Rating",field:r,...T});case"slider":return o.jsx(Rwe,{typeName:"Rating",field:r,...T});case"hidden-field":return o.jsx(Wwe,{typeName:"Hidden Field",field:r,...T});case"likert-scale":return o.jsx(Qwe,{typeName:"Likert Scale Field",field:r,...T});case"type-signature":return o.jsx(Jwe,{typeName:"Likert Scale Field",field:r,...T});case"address":return o.jsx(Zwe,{typeName:"Address",field:r,...T});case"grid-component":return o.jsx(ej,{typeName:"Grid",field:r,...T});case"matrix-scale":return o.jsx(ej,{typeName:"Grid",field:r,...T});case"matrix-dropdown":return o.jsx(nSe,{typeName:"Grid",field:r,...T});case"thumbs":return o.jsx(oSe,{typeName:"Thumbs Up and Down",field:r,...T});case"likert-emoji-scale":return o.jsx(lSe,{typeName:"Thumbs Up and Down",field:r,...T});case"table":return o.jsx(iSe,{typeName:"Grid",field:r,...T});case"dynamic-listing":return o.jsx(aSe,{typeName:"Grid",field:r,...T});default:return o.jsx(o.Fragment,{children:"Empty"})}},S=()=>{f(!0)},x=()=>{f(!1)},w=()=>{let T="";return a?(T=T+" component ",i===H1?T=T+" ":T=T+" px-2 "):(T=T+" component draggable field-form-builder-not-preview",i===H1?T=T+" pdf-component":T=T+" px-2 pdf-component"),T};return o.jsx(o.Fragment,{children:o.jsxs("div",{style:{opacity:g},className:w(),onMouseOver:S,onMouseOut:x,children:[!a&&d&&o.jsx("i",{ref:a===!1?u:null,className:"elementDrag-icon pi pi-arrows-alt cursor-move",style:{fontSize:"1em"}}),A({...t,isDisabled:v})]})})},dSe={position:"relative"},fSe=t=>{var B,k,P,j,M;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=N.useRef(null),{removeColumn:f,addColumn:h,cloneColumn:m,formBuilderFormLayout:g,handleDrop:v}=on(),{isPreview:A,isRenderView:S,isAdvanceView:x,emitSocketData:w}=Zt(),[{isDragging:T},C]=Qi({type:ms,item:{type:ms,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:H=>({isDragging:H.isDragging()})}),_=T&&!S?.25:1;C(d);const E=(H,de,fe,ee,G,ae,Y)=>o.jsx(qc,{page:u,type:"field",row:c,column:e,section:l,field:H,data:H,path:de,pageIndex:fe,sectionIndex:ee,rowIndex:G,columnIndex:ae,fieldIndex:Y},`component-${n}-${H==null?void 0:H.uuid}`),D=(H,de,fe,ee,G)=>{var ne,J,K,oe;const ae=H.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Y=`${H.className} justify-content-space-between`,ge=`${H.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".add-column-tool"}),o.jsxs("div",{className:Y,children:[o.jsxs("span",{ref:A===!1?d:null,children:[o.jsx("button",{className:H.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:H.togglerClassName,onClick:H.onTogglerClick,children:[o.jsx("span",{className:ae}),o.jsx(Qt,{})]}),o.jsx("span",{className:ge,children:"Column"})]}),A===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{h(de,fe,ee),w()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((oe=(K=(J=(ne=g[de])==null?void 0:ne.children[fe])==null?void 0:J.children[ee])==null?void 0:K.children)==null?void 0:oe.length)>1&&o.jsxs("button",{className:H.togglerClassName,onClick:()=>{f(de,fe,ee,G),w()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{m(e,de,fe,ee,G),w()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsx("div",{style:x?{...dSe,opacity:_}:{},className:S?"form-builder-column container-column":"draggable form-builder-column container-column",children:A===!1?o.jsx(o.Fragment,{children:x===!0?o.jsxs(li,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:H=>D(H,r,i,a,s),children:[((B=e==null?void 0:e.children)==null?void 0:B.length)>0?(k=e==null?void 0:e.children)==null?void 0:k.map((H,de)=>{const fe=`${n}-${de}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:x,fieldDropArea:!0,data:{path:fe,childrenCount:e.children.length,droppedField:e},onDrop:v}),E(H,fe,r,i,a,s,de)]},fe)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Tr,{isAdvanceView:x,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:v,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((P=e==null?void 0:e.children)==null?void 0:P.length)>0?(j=e==null?void 0:e.children)==null?void 0:j.map((H,de)=>{const fe=`${n}-${de}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:x,fieldDropArea:!0,data:{path:fe,childrenCount:e.children.length,droppedField:e},onDrop:v}),E(H,fe,r,i,a,s,de)]},fe)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Tr,{isAdvanceView:x,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:v,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(M=e==null?void 0:e.children)==null?void 0:M.map((H,de)=>{const fe=`${n}-${de}`;return o.jsx(N.Fragment,{children:E(H,fe,r,i,a,s,de)},fe)})})})},hSe=t=>{var i,a,s;const{language:e,onHandleChange:n,stateRow:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Row Heading"}),o.jsx(gn,{value:(i=r==null?void 0:r.heading)==null?void 0:i[e==null?void 0:e.type],onChange:l=>n("heading",e,l.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Row Description"}),o.jsx(_s,{value:(a=r==null?void 0:r.subHeadingText)==null?void 0:a[e==null?void 0:e.type],onChange:l=>n("subHeadingText",e,l.target.value)})]}),(r==null?void 0:r.rowIsRepeatable)===!0&&o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Add To List Button Label"}),o.jsx(gn,{value:(s=r.addToListButtonLabel)==null?void 0:s[e==null?void 0:e.type],onChange:l=>n("addToListButtonLabel",e,l.target.value)})]})]})},pSe=t=>{const{stateRow:e,onHandleChangeAdvanceSettings:n}=t,{renderType:r}=Zt();return o.jsxs("div",{className:"p-fluid",children:[r===F0&&o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Or,{inputId:"rowIsRepeatable",checked:e==null?void 0:e.rowIsRepeatable,onChange:i=>n("rowIsRepeatable",i==null?void 0:i.checked)}),o.jsx("label",{htmlFor:"isRepeatable",children:"Row is repeatable ?"})]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Row Minimum Entries"}),o.jsx(Oa,{value:e==null?void 0:e.minimumEntries,onChange:i=>n("minimumEntries",i.value)})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Or,{inputId:"isManualEnumerationEnabled",checked:(e==null?void 0:e.isManualEnumerationEnabled)||!1,onChange:i=>n("isManualEnumerationEnabled",i==null?void 0:i.checked)}),o.jsx("label",{htmlFor:"isManualEnumerationEnabled",children:"Enable manual enumeration for row components?"}),o.jsxs("small",{children:[" ","You need to set mannual enumeration for every component from its settings."," "]})]})]})},gSe=t=>{var f,h,m,g;const{onHandleChange:e,stateRow:n,onHandleChangePageMargin:r}=t,i=new Vb,[,a]=N.useState("");N.useEffect(()=>{},[]);const[s]=N.useState(null),l=()=>{},c=v=>{e("bgImage",v==null?void 0:v.url)},u=[{icon:"pi pi-image",value:"image"},{icon:"pi pi-palette ",value:"color"},{icon:"pi pi-microsoft ",value:"gradient"}],d=v=>o.jsx("i",{className:v.icon});return o.jsxs("div",{className:"",children:[o.jsxs("div",{className:" field",children:[o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"field col-2 md:col-3",children:[o.jsx("label",{children:"Left"}),o.jsx(Oa,{value:(f=n==null?void 0:n.margin)==null?void 0:f.left,onChange:v=>{r("left",v.value)},mode:"decimal",showButtons:!0,min:0,max:100})]}),o.jsxs("div",{className:"field col-2 md:col-3",children:[o.jsx("label",{children:"Right"}),o.jsx(Oa,{value:(h=n==null?void 0:n.margin)==null?void 0:h.right,onChange:v=>{r("right",v.value)},mode:"decimal",showButtons:!0,min:0,max:100})]}),o.jsxs("div",{className:"field col-2 md:col-3",children:[o.jsx("label",{children:"Top"}),o.jsx(Oa,{value:(m=n==null?void 0:n.margin)==null?void 0:m.top,onChange:v=>{r("top",v.value)},mode:"decimal",showButtons:!0,min:0,max:100})]}),o.jsxs("div",{className:"field col-2 md:col-3",children:[o.jsx("label",{children:"Bottom"}),o.jsx(Oa,{value:(g=n==null?void 0:n.margin)==null?void 0:g.bottom,onChange:v=>{r("bottom",v.value)},mode:"decimal",showButtons:!0,min:0,max:100})]})]}),o.jsx("label",{children:"Background Type"}),o.jsx(q0,{value:n==null?void 0:n.bgType,options:u,onChange:v=>e("bgType",v.value),itemTemplate:d,optionLabel:"value"})]}),(n==null?void 0:n.bgType)==="color"&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"p-fluid field",children:o.jsx(Rd,{value:(n==null?void 0:n.bgColor)||"",onChange:v=>e("bgColor",v.value)})}),o.jsx(Rd,{value:(n==null?void 0:n.bgColor)||"",onChange:v=>e("bgColor",v.value),inline:!0})]}),(n==null?void 0:n.bgType)==="image"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"p-fluid field",children:[o.jsx("span",{className:"must-required",children:"*"}),o.jsx("label",{children:"Background image"}),o.jsx(gn,{value:(n==null?void 0:n.bgImage)||"",onChange:v=>e("bgImage",v.target.value),placeholder:"enter page title",id:"page_title",name:"page_title"})]}),o.jsxs("div",{className:"shadow-2 border-round surface-card p-4",children:[o.jsx("div",{className:"flex align-items-center justify-content-between mb-4",children:o.jsx("span",{className:"text-xl font-medium text-900",children:"Selected Files"})}),o.jsx("h5",{children:"Media Library"}),o.jsxs("div",{className:"grid",children:[o.jsx("div",{className:"col-8",children:o.jsxs("div",{className:"grid",children:[o.jsx("div",{className:"col-12 mb-5",children:o.jsxs("div",{className:"p-inputgroup",children:[o.jsx(gn,{placeholder:"Keyword",onChange:v=>a(v.target.value)}),o.jsx(Pt,{text:!0,icon:"pi pi-search",className:"p-button-info",onClick:()=>l()})]})}),o.jsx("div",{className:"col-12 mb-5",children:o.jsx("div",{className:"surface-section ",children:o.jsx("div",{className:"grid -mt-3 -ml-3 -mr-3"})})})]})}),o.jsx("div",{className:"col-4 card",children:s!==null&&o.jsxs("div",{className:"surface-card p-4 shadow-2 border-round",children:[o.jsx("img",{style:{height:"150px",width:"150px",objectFit:"contain"},src:s==null?void 0:s.url,className:"w-full mb-3 border-round-2xl",onError:v=>v.target.src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png",alt:"https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png"}),o.jsxs("ul",{className:"list-none p-0 m-0 border-top-1 surface-border",children:[o.jsxs("li",{className:"flex align-items-center py-1 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-4 font-medium",children:"Name"}),o.jsx("div",{className:"text-900 w-full md:w-8",children:s==null?void 0:s.name})]}),o.jsxs("li",{className:"flex align-items-center py-1 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-4 font-medium",children:"Base URL:"}),o.jsx("div",{className:"text-900 w-full md:w-8 line-height-3",style:{wordWrap:"break-word"},children:o.jsx("a",{href:s==null?void 0:s.url,children:s==null?void 0:s.url})})]}),o.jsxs("li",{className:"flex align-items-center py-1 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-4 font-medium",children:"Base Name:"}),o.jsx("div",{className:"text-900 w-full md:w-8",children:s==null?void 0:s.basename})]}),o.jsxs("li",{className:"flex align-items-center py-1 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-4 font-medium",children:"Dir Name:"}),o.jsx("div",{className:"text-900 w-full md:w-8",children:s==null?void 0:s.dirname})]}),o.jsxs("li",{className:"flex align-items-center py-1 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-4 font-medium",children:"Size:"}),o.jsx("div",{className:"text-900 w-full md:w-8",children:i.formatBytes(s==null?void 0:s.size)})]}),o.jsxs("li",{className:"flex align-items-center py-1 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-4 font-medium",children:"Creation Date:"}),o.jsx("div",{className:"text-900 w-full md:w-8",children:_n(s==null?void 0:s.created_at).format("Do MMM YYYY - HH:mm")})]})]}),o.jsx(Pt,{text:!0,className:"mt-3 w-full",label:"Set Image",onClick:()=>c(s),"aria-label":"Update"})]})})]})]})]})]})},mSe=t=>{const{stateRow:e,setStateRow:n}=t,[r,i]=N.useState(""),[a,s]=N.useState([""]),[l,c]=N.useState(!1),[u,d]=N.useState(0),[f,h]=N.useState(!1),{updateGlobalToast:m}=Zt(),g=()=>{h(!0)},v=()=>{var H;const j=((H=e==null?void 0:e.reviewerChecklist)==null?void 0:H.length)>=0?[...e.reviewerChecklist]:[];j.push({uuid:nt(),checklist:r,action:a,agree:null,selectAction:[],other:{isOther:!1,description:""},reviewerComments:""});const M={...e,reviewerChecklist:j};n(M),h(!1),i(""),s([""])},A=()=>{h(!1),i(""),s([""])},S=j=>{const M=[...e.reviewerChecklist];M.splice(j,1);const H={...e,reviewerChecklist:M};n(H)},x=(j,M)=>{c(!0);const{checklist:H,action:de}=j;h(!0),d(M),setTimeout(()=>{i(H),s(de)},1e3)},w=(j,M)=>o.jsxs(o.Fragment,{children:[o.jsx(Pt,{text:!0,type:"button",className:"p-button-info",icon:"pi pi-pencil",onClick:()=>x(j,M==null?void 0:M.rowIndex),size:"small"}),o.jsx(Pt,{text:!0,type:"button",className:"p-button-danger",icon:"pi pi-trash",onClick:()=>S(M==null?void 0:M.rowIndex),size:"small"})]}),T=j=>{var M;return o.jsx(o.Fragment,{children:(M=j==null?void 0:j.action)==null?void 0:M.length})},C=j=>{const M=[...a];M.splice(j,1),s(M)},_=()=>{const j=[...e.reviewerChecklist];j[u]={checklist:r,action:a};const M={...e,reviewerChecklist:j};n(M),h(!1),c(!1)},E=()=>o.jsx("div",{children:l?o.jsx(Pt,{text:!0,className:"mb-5 p-button-success",label:"Edit Checklist",onClick:()=>{_()}}):o.jsx(Pt,{text:!0,className:"mb-5 p-button-success",label:"Add Checklist",onClick:()=>{v()}})}),D=j=>{n(M=>Object.assign({},M,{reviewerChecklist:j==null?void 0:j.value}))},B=j=>{navigator.clipboard.writeText(JSON.stringify(j)),m({showToast:!0,toastMessage:"Copied to clipboard",toastDetail:"",toastType:"success"})};function k(j){try{JSON.parse(j)}catch{return!1}return!0}const P=async()=>{var H;const j=await navigator.clipboard.readText();let M="";if(k(j)){const de=JSON.parse(j);if((H=de[0])!=null&&H.checklist){const fe={..._t.cloneDeep(e),reviewerChecklist:de};n(fe),m({showToast:!0,toastMessage:"Checklist pasted",toastDetail:"",toastType:"success"});return}else M=" Empty or Invalid Schema"}else M="Invalid Schema";m({showToast:!0,toastMessage:M,toastDetail:"",toastType:"error"})};return o.jsxs("div",{children:[o.jsxs(Is,{maximizable:!0,header:"Add Checklist",visible:f,style:{width:"30vw"},onHide:()=>A(),footer:E(),children:[o.jsx("h5",{children:"Checklist"}),o.jsx(_s,{rows:2,cols:50,value:r,onChange:j=>{var M;i((M=j==null?void 0:j.target)==null?void 0:M.value)}}),o.jsx("h5",{children:"Actions when user selects No"}),a.map((j,M)=>o.jsxs("div",{children:[M+1,"."," ",o.jsx(_s,{value:j,onChange:H=>{var fe;const de=[...a];de[M]=(fe=H==null?void 0:H.target)==null?void 0:fe.value,s(de)},rows:2,cols:50})," ",o.jsx(Pt,{text:!0,type:"button",icon:"pi pi-trash",className:"p-button-danger",onClick:()=>C(M)}),o.jsx("br",{}),o.jsx("br",{})]},`actionIndex-${M}`)),o.jsx(Pt,{text:!0,className:" p-button-info mr-2",onClick:()=>{s([...a,""])},children:"Add Action"})]})," ",o.jsx("h5",{children:"Reviewer Checklist"}),o.jsx(Pt,{text:!0,className:"mb-5 mr-2 p-button-success",label:"Add Review Checklist",onClick:()=>{g()}}),o.jsx(Pt,{text:!0,label:"Copy Schema ",onClick:()=>{B([...(e==null?void 0:e.reviewerChecklist)||[]])},className:"mb-5 mr-2"}),o.jsx(Pt,{text:!0,label:"Paste Checklist ",onClick:()=>{P()},className:"mb-5 p-button-info"}),o.jsx("div",{className:"card",children:o.jsxs(zs,{value:e==null?void 0:e.reviewerChecklist,reorderableRows:!0,onRowReorder:D,children:[o.jsx(dr,{rowReorder:!0,style:{width:"3em"}}),o.jsx(dr,{field:"checklist",header:"Checklist"}),o.jsx(dr,{field:"actions",header:"Actions",body:j=>T(j)}),o.jsx(dr,{header:"",body:(j,M)=>w(j,M)})]})})]})},Ig=t=>{var T;const{visibilty:e,setVisibility:n,row:r,pageIndex:i,sectionIndex:a,rowIndex:s}=t,{formBuilderSchemaLanguages:l,rowSettingUpdate:c,userSelectedLanguage:u,formBuilderPublishedStatus:d}=on(),[f,h]=N.useState(r),{updateGlobalToast:m,emitSocketData:g}=Zt(),v=(C,_,E)=>{h(D=>{const B=D[C];return Object.assign({},D,{[C]:Object.assign({},B,{[_==null?void 0:_.type]:E})})})},A=(C,_)=>{h(E=>({...E,[C]:_}))},S=()=>{const C={...f,children:r==null?void 0:r.children};c(i,a,s,C),g(),m({showToast:!0,toastMessage:"Updated",toastDetail:"Row Updated",toastType:"success"})},x=(C,_)=>{let E=f;E={...E,margin:{...E.margin,[C]:_}},h(E)},w=(C,_)=>{h(E=>({...E,[C]:_}))};return o.jsx(o.Fragment,{children:o.jsxs(Eo,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>n(!1),children:[o.jsxs("div",{className:"flex justify-content-between flex-wrap card-container ",children:[o.jsxs("div",{className:"flex align-items-center justify-content-center ",children:[" ",o.jsxs("h5",{children:["Row Settings - ",(T=r==null?void 0:r.heading)==null?void 0:T[u==null?void 0:u.type]]})," "]}),!d&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(Pt,{className:"mt-3",label:"Update",onClick:()=>S(),"aria-label":"Update"})})]}),o.jsxs(Ya,{children:[o.jsx(fr,{header:"Text",children:o.jsx(io,{activeIndex:0,children:l!=null&&l.length?l.map((C,_)=>o.jsx(ro,{tabIndex:_,header:C==null?void 0:C.language,children:o.jsx(hSe,{language:C,stateRow:f,onHandleChange:v,...t})},_)):""})}),o.jsx(fr,{header:"Advance",children:o.jsx(pSe,{stateRow:f,onHandleChangeAdvanceSettings:A})}),o.jsx(fr,{header:"Layout",children:o.jsxs("div",{className:"p-fluid",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Or,{inputId:"showRowTitle",checked:f==null?void 0:f.showRowTitle,onChange:C=>A("showRowTitle",C==null?void 0:C.checked)}),o.jsx("label",{htmlFor:"showRowTitle",children:"Show Row Title?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Or,{inputId:"showRowSubTitle",checked:f==null?void 0:f.showRowSubTitle,onChange:C=>A("showRowSubTitle",C==null?void 0:C.checked)}),o.jsx("label",{htmlFor:"showRowSubTitle",children:"Show Row Sub Title?"})]})]})}),o.jsx(fr,{header:"Styling",children:o.jsx(gSe,{stateRow:f,onHandleChange:w,onHandleChangePageMargin:x,...t})}),(f==null?void 0:f.rowIsRepeatable)===!0&&o.jsx(fr,{header:"Admin",children:o.jsx(mSe,{stateRow:f,setStateRow:h})})]})]})})},vSe={},bSe=t=>{var ve,Ce,Se,Te,De,ie,U,re,Q,se,be;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=N.useRef(null),{removeRow:u,addRow:d,cloneRow:f,formBuilderFormLayout:h,userSelectedLanguage:m,handleDrop:g}=on(),{userTaskSubmitFormData:v,taskRegisterData:A,updateTaskRegisterData:S,updateTaskProgressValue:x,addUserDataFormSectionRepeatableData:w,removeUserDataFormSectionRepeatableData:T,task_status:C,TASK_PUBLISHED:_}=mr(),{isPreview:E,isRenderView:D,isAdvanceView:B,renderType:k,isAdmin:P,emitSocketData:j}=Zt(),[M,H]=N.useState(!1),[{isDragging:de},fe]=Qi({type:bo,item:{type:bo,uuid:e.uuid,children:e.children,path:n,data:e},collect:me=>({isDragging:me.isDragging()})}),ee=de?.25:1;fe(c);const G=(me,ye,Ie,Ee,he,V)=>o.jsx(fSe,{page:l,row:e,section:s,data:me,path:ye,pageIndex:Ie,sectionIndex:Ee,rowIndex:he,columnIndex:V,isAdmin:P,emitSocketData:j},`column-${n}-${me.uuid}`),ae=(me,ye,Ie,Ee)=>{var W,ue,Ae,pe;const he=me.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",V=`${me.className} justify-content-space-between`,te=`${me.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".setting-tool"}),o.jsx(rn,{target:".add-row-tool"}),o.jsxs("div",{className:V,children:[o.jsxs("span",{ref:E===!1?c:null,children:[o.jsx("button",{className:me.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:me.togglerClassName,onClick:me.onTogglerClick,children:[o.jsx("span",{className:he}),o.jsx(Qt,{})]}),o.jsxs("span",{className:te,children:["Row:"," ",((W=e==null?void 0:e.heading)==null?void 0:W[m==null?void 0:m.type])!==""?(ue=e==null?void 0:e.heading)==null?void 0:ue[m==null?void 0:m.type]:"Untitled"]})]}),E===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:me.togglerClassName,onClick:()=>{d(ye,Ie),j()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((pe=(Ae=h[ye])==null?void 0:Ae.children[Ie])==null?void 0:pe.children.length)>1&&o.jsxs("button",{className:me.togglerClassName,onClick:()=>{u(ye,Ie,Ee),j()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:me.togglerClassName,onClick:()=>{f(e,ye,Ie,Ee),j()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>H(!0),className:me.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})},Y=_t.findIndex(v,function(me){return(me==null?void 0:me.rowId)===(e==null?void 0:e.uuid)}),ge=()=>{var Ie,Ee,he;const me=_t.cloneDeep(A);((Ee=(Ie=v[Y])==null?void 0:Ie.repeatableFieldsData)==null?void 0:Ee.length)>=(e==null?void 0:e.minimumEntries)?me[e==null?void 0:e.uuid]=(he=v[Y])==null?void 0:he.repeatableFields:delete me[e==null?void 0:e.uuid];const ye=Object.keys(me).length;S(me),x(ye)},ne=(ve=e==null?void 0:e.repeatableFields)==null?void 0:ve.map(me=>{var ye;return{fieldUuid:me==null?void 0:me.uuid,field:me==null?void 0:me.uuid,header:(ye=me==null?void 0:me.label)==null?void 0:ye.english}}),J=ne==null?void 0:ne.map(me=>o.jsx(dr,{field:me.field,header:me.header,body:ye=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:ye[me==null?void 0:me.field]}})})},me.field)),K=()=>{var Ee;const me=[...v],ye=[];let Ie=!0;e:for(const[,he]of e.children.entries()){for(const[,V]of he.children.entries())if(console.log("field.isValid",V.isValid),V!=null&&V.isPostField&&V.isValid!==1){const te={fieldId:V.uuid,rowIndex:a};console.log("inValidData",te),ye.push(te),Xt.emit("OnInvalidFieldCatch",te),Ie=!1;break e}Ie=!0}Ie&&(ye==null?void 0:ye.length)===0&&(w(e==null?void 0:e.uuid,(Ee=me[Y])==null?void 0:Ee.repeatableFields),Xt.emit("clearRepeatableFields",e==null?void 0:e.uuid),ge())},oe=me=>o.jsx(o.Fragment,{children:o.jsx(Pt,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{T(e==null?void 0:e.uuid,me==null?void 0:me.rowIndex),setTimeout(()=>{ge()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...vSe,opacity:ee,marginTop:`${(Ce=e==null?void 0:e.margin)==null?void 0:Ce.top}px`,marginBottom:`${(Se=e==null?void 0:e.margin)==null?void 0:Se.bottom}px`,marginLeft:`${(Te=e==null?void 0:e.margin)==null?void 0:Te.left}px`,marginRight:`${(De=e==null?void 0:e.margin)==null?void 0:De.right}px`},className:D?"row container-row":"draggable row container-row",children:[M&&o.jsx(Ig,{renderType:k,visibilty:M,setVisibility:H,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:j},"row_settings_"+r+i+a),E===!1?o.jsx(o.Fragment,{children:B===!0?o.jsx(li,{header:"Row",toggleable:!0,headerTemplate:me=>ae(me,r,i,a),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(ie=e==null?void 0:e.children)==null?void 0:ie.map((me,ye)=>{const Ie=`${n}-${ye}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:B,data:{path:Ie,childrenCount:e.children.length},onDrop:g,className:"horizontalDrag"}),G(me,Ie,r,i,a,ye)]},Ie)}),o.jsx(Tr,{isAdvanceView:B,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:g,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:B?"form-builder-columns":"",style:B?{overflowX:"auto"}:{},children:(U=e==null?void 0:e.children)==null?void 0:U.map((me,ye)=>{const Ie=`${n}-${ye}`;return o.jsx(N.Fragment,{children:G(me,Ie,r,i,a,ye)},Ie)})})})}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&C===_)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(re=e==null?void 0:e.heading)==null?void 0:re[m==null?void 0:m.type]}),o.jsx("span",{children:(Q=e==null?void 0:e.subHeadingText)==null?void 0:Q[m==null?void 0:m.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((me,ye)=>{const Ie=`${n}-${ye}`;return o.jsx(N.Fragment,{children:G(me,Ie,r,i,a,ye)},Ie)})})]})}),(e==null?void 0:e.rowIsRepeatable)&&C!==_&&o.jsx(Pt,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>K(),label:(se=e.addToListButtonLabel)==null?void 0:se[m==null?void 0:m.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(zs,{value:(v==null?void 0:v.length)>0?(be=v[Y])==null?void 0:be.repeatableFieldsData:[],children:[J,C!==_&&o.jsx(dr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(me,ye)=>oe(ye)})]}),P&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{field:e})]})]})]})},ySe=t=>{var i,a;const{language:e,onHandleChange:n,stateSection:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Section Heading"}),o.jsx(gn,{value:(i=r.heading)==null?void 0:i[e==null?void 0:e.type],onChange:s=>n("heading",e,s.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Section Description"}),o.jsx(_s,{value:(a=r.subHeadingText)==null?void 0:a[e==null?void 0:e.type],onChange:s=>n("subHeadingText",e,s.target.value)})]})]})},ASe={uuid:"",type:"",showSectionHeader:!0,isVisible:!1,isHidden:!1,isCollapsed:!0,isValid:!1,showSectionSubTitle:!1,showSectionTitle:!1,heading:{english:""},subHeadingText:{english:""},children:[]},_h=t=>{const{visibilty:e,setVisibility:n,section:r,pageIndex:i,sectionIndex:a}=t,[s,l]=N.useState(r??ASe),{formBuilderSchemaLanguages:c,sectionSettingUpdate:u,userSelectedLanguage:d,formBuilderPublishedStatus:f}=on(),{emitSocketData:h}=Zt(),{updateGlobalToast:m}=Zt();console.log("StateSection",r);const g=(S,x,w)=>{l(T=>Object.assign({},T,{[S]:Object.assign({},T[S],{[x==null?void 0:x.type]:w})}))},v=(S,x)=>{l(w=>({...w,[S]:x}))},A=()=>{const S={...s,children:r==null?void 0:r.children};u(i,a,S),h(),m({showToast:!0,toastMessage:"Updated",toastDetail:"Section Updated",toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(Eo,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>n(!1),children:[o.jsxs("div",{className:"flex justify-content-between flex-wrap card-container ",children:[o.jsxs("div",{className:"flex align-items-center justify-content-center ",children:[" ",o.jsxs("h5",{children:["Section Settings - ",r==null?void 0:r.heading[d==null?void 0:d.type]," "]})," "]}),!f&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(Pt,{className:"mt-3",label:"Update",onClick:()=>A(),"aria-label":"Update"})})]}),o.jsxs(Ya,{children:[o.jsx(fr,{header:"Text",children:o.jsx(io,{activeIndex:0,children:c!=null&&c.length?c.map((S,x,w)=>o.jsx(ro,{tabIndex:x,header:S==null?void 0:S.language,children:o.jsx(ySe,{language:S,stateSection:w,onHandleChange:g,...t})},x)):""})}),o.jsx(fr,{header:"Layout",children:o.jsxs("div",{className:"p-fluid",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Or,{inputId:"showSectionTitle",checked:s==null?void 0:s.showSectionHeader,onChange:S=>v("showSectionHeader",S==null?void 0:S.checked)}),o.jsx("label",{htmlFor:"showSectionTitle",children:"Show Section header?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Or,{inputId:"showSectionTitle",checked:s==null?void 0:s.showSectionTitle,onChange:S=>v("showSectionTitle",S==null?void 0:S.checked)}),o.jsx("label",{htmlFor:"showSectionTitle",children:"Show Section Title?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Or,{inputId:"showSectionSubTitle",checked:s==null?void 0:s.showSectionSubTitle,onChange:S=>v("showSectionSubTitle",S==null?void 0:S.checked)}),o.jsx("label",{htmlFor:"showSectionSubTitle",children:"Show Section Sub Title?"})]})]})})]})]})})},Dh=t=>{const{saveBuilderElementModalData:e,saveElementModal:n,setSaveElementModal:r}=t,{saveComponent:i}=Zt(),a=M7({initialValues:{builder_element_title:"",builder_element_description:""},validate:c=>{const u={};return c.builder_element_title||(u.builder_element_title="Title is required."),c.builder_element_description||(u.builder_element_description="Description is required."),u},onSubmit:c=>{const u={...c,reusable_template_schema:e==null?void 0:e.reusable_template_schema};i(u,a.resetForm),r(!1)}}),s=c=>!!(a.touched[c]&&a.errors[c]),l=()=>o.jsx("div",{children:o.jsx(Pt,{text:!0,className:"p-button-success",label:"Save",icon:"pi pi-file",onClick:()=>{a.handleSubmit()},autoFocus:!0})});return o.jsxs(Is,{header:"Save Custom Element",visible:n,style:{width:"20vw"},footer:l(),onHide:()=>r(!1),children:[o.jsxs("div",{className:"p-field field",children:[o.jsxs("label",{htmlFor:"username",children:[o.jsx("span",{className:"must-required",children:"*"})," Builder element title"]}),o.jsx(gn,{id:"builder_element_title",name:"builder_element_title",value:a.values.builder_element_title,onChange:a.handleChange,className:`${w3({invalid:s("builder_element_title")})} w-full`})]}),o.jsxs("div",{className:"p-field field",children:[o.jsxs("label",{htmlFor:"username",children:[o.jsx("span",{className:"must-required",children:"*"})," Builder element description"]}),o.jsx(_s,{id:"builder_element_description",name:"builder_element_description",value:a.values.builder_element_description,onChange:a.handleChange,className:`${w3({invalid:s("builder_element_title")})} w-full`})]})]})},wSe=t=>{var fe,ee,G,ae,Y,ge,ne,J;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{removeSection:l,addSection:c,cloneSection:u,formBuilderFormLayout:d,userSelectedLanguage:f,handleDrop:h}=on(),{isPreview:m,isAdvanceView:g,renderType:v,emitSocketData:A}=Zt(),[S,x]=N.useState(!1),[w,T]=N.useState(!1),[C,_]=N.useState(null),[E,D]=N.useState(!1),B=N.useRef(null),k=(K,oe)=>{_(ve=>({...ve,[K]:oe}))},[{isDragging:P},j]=Qi({type:ta,item:{type:ta,uuid:e.uuid,children:e.children,path:n},collect:K=>({isDragging:K.isDragging()})}),M=P?.25:1;j(B);const H=(K,oe,ve,Ce,Se)=>o.jsx(bSe,{page:s,section:a,data:K,path:oe,pageIndex:ve,sectionIndex:Ce,rowIndex:Se},`row-${n}-${K.uuid}`),de=(K,oe,ve)=>{var De,ie;const Ce=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Se=`${K.className} justify-content-space-between panel-tab-section`,Te=`${K.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Se,children:[o.jsxs("span",{ref:m===!1?B:null,children:[o.jsx("button",{className:K.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:Ce}),o.jsx(Qt,{})]}),o.jsxs("span",{className:Te,children:[ve+1," ",(De=e==null?void 0:e.heading)==null?void 0:De[f==null?void 0:f.type]]})]}),m===!1&&o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".del-tool"}),o.jsx(rn,{target:".setting-tool"}),o.jsx(rn,{target:".add-section-tool"}),o.jsx(rn,{target:".save-tool"}),o.jsx(rn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{c(oe),A()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((ie=d[oe])==null?void 0:ie.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{l(oe,ve),A()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{k("reusable_template_schema",e),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{u(e,oe,ve),A()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:M,marginBottom:20},className:g?"draggable row":"",children:[m===!1&&o.jsx(Dh,{saveBuilderElementModalData:C,setSaveBuilderElementModalData:_,saveElementModal:w,setSaveElementModal:T}),S===!0&&o.jsx(_h,{renderType:v,visibilty:S,setVisibility:x,section:e,pageIndex:r,sectionIndex:i,emitSocketData:A},"section_settings_"+r+i),m===!1?o.jsx(o.Fragment,{children:g===!0?o.jsxs(li,{header:(fe=e==null?void 0:e.heading)==null?void 0:fe.english,toggleable:!0,headerTemplate:K=>de(K,r,i),onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:[((ee=e==null?void 0:e.subHeadingText)==null?void 0:ee[f==null?void 0:f.type])&&o.jsx("p",{children:(G=e==null?void 0:e.subHeadingText)==null?void 0:G[f==null?void 0:f.type]}),o.jsxs("div",{children:[e.children.map((K,oe)=>{const ve=`${n}-${oe}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:g,data:{path:ve,childrenCount:e.children.length},onDrop:h}),H(K,ve,r,i,oe)]},ve)}),o.jsx(Tr,{isAdvanceView:g,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:h,isLast:!0})]}),E&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{c(r),A()},children:o.jsx(Qt,{})})}),((ae=d[r])==null?void 0:ae.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{l(r,i),A()},children:o.jsx(Qt,{})})})]})]}):o.jsxs(o.Fragment,{children:[((Y=e==null?void 0:e.subHeadingText)==null?void 0:Y[f==null?void 0:f.type])&&o.jsx("p",{children:(ge=e==null?void 0:e.subHeadingText)==null?void 0:ge[f==null?void 0:f.type]}),o.jsx("div",{children:e.children.map((K,oe)=>{const ve=`${n}-${oe}`;return o.jsx(N.Fragment,{children:H(K,ve,r,i,oe)},ve)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(e==null?void 0:e.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(ne=e==null?void 0:e.heading)==null?void 0:ne[f==null?void 0:f.type]}),o.jsx("p",{children:(J=e==null?void 0:e.subHeadingText)==null?void 0:J[f==null?void 0:f.type]}),o.jsx("hr",{})]}),e.children.map((K,oe)=>{const ve=`${n}-${oe}`;return o.jsx(N.Fragment,{children:o.jsx("div",{className:"",children:H(K,ve,r,i,oe)},ve)},ve)})]})})]})},SSe={position:"relative"},xSe=t=>{var T,C,_;const{data:e,data:n,path:r,pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,section:c,row:u,page:d}=t,f=N.useRef(null),{handleDrop:h}=on(),{isRenderView:m,isAdvanceView:g,isPreview:v}=Zt(),[{isDragging:A},S]=Qi({type:ms,item:{type:ms,uuid:e==null?void 0:e.uuid,children:e.children,path:r},collect:E=>({isDragging:E.isDragging()})}),x=A&&!m?.25:1;S(f);const w=(E,D,B,k,P,j,M)=>o.jsx(qc,{page:d,section:c,row:u,column:n,field:E,pageIndex:B,sectionIndex:k,rowIndex:P,columnIndex:j,fieldIndex:M,type:"field",data:E,path:D},`component-${r}-${E==null?void 0:E.uuid}`);return o.jsx("div",{style:g?{...SSe,opacity:x}:{},className:m?"":"draggable column container-column",children:v===!1?o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((T=e==null?void 0:e.children)==null?void 0:T.length)>0?(C=e==null?void 0:e.children)==null?void 0:C.map((E,D)=>{const B=`${r}-${D}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:g,fieldDropArea:!0,data:{path:B,childrenCount:e.children.length,droppedField:e},onDrop:h}),w(E,B,i,a,s,l,D)]},B)}):o.jsx(o.Fragment,{}),o.jsx(Tr,{isAdvanceView:g,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${r}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:h,isLast:!0})]})}):o.jsx(o.Fragment,{children:(_=e==null?void 0:e.children)==null?void 0:_.map((E,D)=>{const B=`${r}-${D}`;return o.jsx(N.Fragment,{children:w(E,B,i,a,s,l,D)},B)})})})},CSe=t=>{var l;const{isAdvanceView:e}=Zt(),{data:n,page:r,path:i,pageIndex:a}=t,s=(c,u,d,f,h,m,g,v)=>o.jsx(xSe,{page:r,row:v,section:g,data:c,path:`${d}-${f}-${h}-${m}`,pageIndex:d,sectionIndex:f,rowIndex:h,columnIndex:m},`column-${i}-${c.uuid}`);return o.jsx(o.Fragment,{children:(l=n==null?void 0:n.children)==null?void 0:l.map((c,u)=>{var d;return(d=c==null?void 0:c.children)==null?void 0:d.map((f,h)=>{var m;return o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"columns":"",style:e?{overflowX:"auto"}:{},children:(m=f==null?void 0:f.children)==null?void 0:m.map((g,v)=>{const A=`${i}-${u}-${h}-${v}`;return o.jsx(N.Fragment,{children:s(g,A,a,u,h,v,c,f)},A)})})})})})})},TSe=t=>{const{data:e,path:n,pageIndex:r}=t,{isPreview:i,isRenderView:a,isAdvanceView:s}=Zt(),{formBuilderFormSchema:l,handleDrop:c}=on(),u=N.useRef(null),[d,f]=Qi({type:ta,item:{type:ta,uuid:e.uuid,children:e.children,path:n},collect:m=>({isDragging:m.isDragging()})});f(u);const h=(m,g,v,A)=>o.jsx(wSe,{data:m,page:e,section:m,path:g,pageIndex:v,sectionIndex:A},`section_${v}_${A}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${a?"":"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:i===!1?o.jsx(o.Fragment,{children:s?o.jsxs(o.Fragment,{children:[e.children.map((m,g)=>{const v=`${n}-${g}`;return o.jsxs(N.Fragment,{children:[s===!0&&o.jsx(Tr,{isAdvanceView:s,data:{path:v,childrenCount:e.children.length},onDrop:c}),h(m,v,r,g)]},`section-${g}-${m.uuid}`)}),s===!0&&o.jsx(Tr,{isAdvanceView:s,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:c,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsx(CSe,{page:e,path:n,data:e,pageIndex:r})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"p-1",children:e.children.map((m,g)=>{const v=`${n}-${g}`;return o.jsx(N.Fragment,{children:l!=null&&l.showConditionalFields?o.jsx(o.Fragment,{children:o.jsx("div",{children:h(m,v,r,g)})}):((m==null?void 0:m.isHidden)===!1||!i)&&h(m,v,r,g)},`section-${g}-${m.uuid}`)})})})})},ESe=()=>{const{isPreview:t,isAdvanceView:e}=Zt(),[n,r]=N.useState(!1),[i,a]=N.useState(!1),[s,l]=N.useState(0),{formBuilderFormLayout:c}=on(),{emitSocketData:u}=Zt(),d=(f,h,m)=>o.jsx(TSe,{data:f,path:h,pageIndex:m},`page-${f.uuid}`);return o.jsx("div",{className:"page",children:(c==null?void 0:c.length)===k9&&t===!0?o.jsx(o.Fragment,{children:(c==null?void 0:c.length)&&c.map((f,h)=>{const m=`${h}`;return o.jsx("div",{children:d(f,m,h)},`${f.uuid}-${h}`)})}):o.jsx(o.Fragment,{children:e===!0||t===!0?o.jsx(Ya,{activeIndex:s,onTabChange:f=>l(f.index),children:(c==null?void 0:c.length)&&c.map((f,h)=>{const m=`${h}`;return o.jsxs(fr,{disabled:!((f==null?void 0:f.isHidden)===!1||!t),header:"Page",headerTemplate:g=>o.jsx(o7,{options:g,pageIndex:h,setTabSidebarSetting:r,setPageActiveIndex:l,page:f,pages:c}),children:[t===!1&&o.jsx(gf,{reusableBuilderElementModalVisibility:i,setReusableBuilderElementModalVisibility:a,pageIndex:h}),o.jsx(H0,{setVisibility:r,visibilty:n,pageIndex:h,page:f,emitSocketData:u}),d(f,m,h)]},`${f.uuid}-${h}`)})}):o.jsx(o.Fragment,{children:(c==null?void 0:c.length)>0&&(c==null?void 0:c.map((f,h)=>{const m=`${h}`;return o.jsxs(N.Fragment,{children:[t===!1&&o.jsx(gf,{reusableBuilderElementModalVisibility:i,setReusableBuilderElementModalVisibility:a,pageIndex:h}),o.jsx(H0,{setVisibility:r,visibilty:n,pageIndex:h,page:f,emitSocketData:u}),d(f,m,h)]},`${f.uuid}-${h}`)}))})})})},ISe={position:"relative"},_Se=t=>{var B,k,P,j,M;const{isAdvanceView:e,isPreview:n,emitSocketData:r,isRenderView:i}=Zt(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:m}=t,g=N.useRef(null),{removeColumn:v,addColumn:A,cloneColumn:S,formBuilderFormLayout:x,handleDrop:w}=on(),[{isDragging:T},C]=Qi({type:ms,item:{type:ms,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:H=>({isDragging:H.isDragging()})}),_=T&&!i?.25:1;C(g);const E=(H,de,fe,ee,G,ae,Y)=>o.jsx(qc,{page:m,column:a,type:"field",row:h,section:f,field:H,data:H,path:de,pageIndex:fe,sectionIndex:ee,rowIndex:G,columnIndex:ae,fieldIndex:Y},`component-${s}-${H==null?void 0:H.uuid}`),D=(H,de,fe,ee,G)=>{var ne,J,K,oe;const ae=H.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Y=`${H.className} justify-content-space-between`,ge=`${H.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".add-column-tool"}),o.jsxs("div",{className:Y,children:[o.jsxs("span",{ref:n===!1?g:null,children:[o.jsx("button",{className:H.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:H.togglerClassName,onClick:H.onTogglerClick,children:[o.jsx("span",{className:ae}),o.jsx(Qt,{})]}),o.jsx("span",{className:ge,children:"Column"})]}),n===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{A(de,fe,ee),r()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((oe=(K=(J=(ne=x[de])==null?void 0:ne.children[fe])==null?void 0:J.children[ee])==null?void 0:K.children)==null?void 0:oe.length)>1&&o.jsxs("button",{className:H.togglerClassName,onClick:()=>{v(de,fe,ee,G),r()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{S(a,de,fe,ee,G),r()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsx("div",{style:e?{...ISe,opacity:_}:{},className:i?"form-builder-column container-column":"draggable form-builder-column container-column",children:n===!1?o.jsx(o.Fragment,{children:e===!0?o.jsxs(li,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:H=>D(H,l,c,u,d),children:[((B=a==null?void 0:a.children)==null?void 0:B.length)>0?(k=a==null?void 0:a.children)==null?void 0:k.map((H,de)=>{const fe=`${s}-${de}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:e,fieldDropArea:!0,data:{path:fe,childrenCount:a.children.length,droppedField:a},onDrop:w}),E(H,fe,l,c,u,d,de)]},fe)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Tr,{isAdvanceView:e,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:w,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((P=a==null?void 0:a.children)==null?void 0:P.length)>0?(j=a==null?void 0:a.children)==null?void 0:j.map((H,de)=>{const fe=`${s}-${de}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:e,fieldDropArea:!0,data:{path:fe,childrenCount:a.children.length,droppedField:a},onDrop:w}),E(H,fe,l,c,u,d,de)]},fe)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Tr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:w,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(M=a==null?void 0:a.children)==null?void 0:M.map((H,de)=>{const fe=`${s}-${de}`;return o.jsx(N.Fragment,{children:E(H,fe,l,c,u,d,de)},fe)})})})},DSe={},OSe=t=>{var ve,Ce,Se,Te,De,ie,U,re,Q,se,be,me,ye,Ie,Ee,he;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,{isRenderView:c,isAdvanceView:u,isAdmin:d,isPreview:f,emitSocketData:h,renderType:m}=Zt(),g=N.useRef(null),{removeRow:v,addRow:A,cloneRow:S,formBuilderFormLayout:x,userSelectedLanguage:w,handleDrop:T}=on(),{userTaskSubmitFormData:C,taskRegisterData:_,updateTaskRegisterData:E,updateTaskProgressValue:D,addUserDataFormSectionRepeatableData:B,removeUserDataFormSectionRepeatableData:k,task_status:P,TASK_PUBLISHED:j}=mr(),[M,H]=N.useState(!1),[{isDragging:de},fe]=Qi({type:bo,item:{type:bo,uuid:e.uuid,children:e.children,path:n,data:e},collect:V=>({isDragging:V.isDragging()})}),ee=de?.25:1;fe(g);const G=(V,te,W,ue,Ae,pe)=>o.jsx(_Se,{page:l,row:e,section:s,data:V,path:te,pageIndex:W,sectionIndex:ue,rowIndex:Ae,columnIndex:pe,isAdmin:d,emitSocketData:h},`column-${n}-${V.uuid}`),ae=(V,te,W,ue)=>{var Le,We,gt,At;const Ae=V.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",pe=`${V.className} justify-content-space-between`,ke=`${V.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".setting-tool"}),o.jsx(rn,{target:".add-row-tool"}),o.jsxs("div",{className:pe,children:[o.jsxs("span",{ref:f===!1?g:null,children:[o.jsx("button",{className:V.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:V.togglerClassName,onClick:V.onTogglerClick,children:[o.jsx("span",{className:Ae}),o.jsx(Qt,{})]}),o.jsxs("span",{className:ke,children:["Row:"," ",((Le=e==null?void 0:e.heading)==null?void 0:Le[w==null?void 0:w.type])!==""?(We=e==null?void 0:e.heading)==null?void 0:We[w==null?void 0:w.type]:"Untitled"]})]}),f===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:V.togglerClassName,onClick:()=>{A(te,W),h()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((At=(gt=x[te])==null?void 0:gt.children[W])==null?void 0:At.children.length)>1&&o.jsxs("button",{className:V.togglerClassName,onClick:()=>{v(te,W,ue),h()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:V.togglerClassName,onClick:()=>{S(e,te,W,ue),h()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>H(!0),className:V.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})},Y=_t.findIndex(C,function(V){return(V==null?void 0:V.rowId)===(e==null?void 0:e.uuid)}),ge=()=>{var W,ue,Ae;const V=_t.cloneDeep(_);((ue=(W=C[Y])==null?void 0:W.repeatableFieldsData)==null?void 0:ue.length)>=(e==null?void 0:e.minimumEntries)?V[e==null?void 0:e.uuid]=(Ae=C[Y])==null?void 0:Ae.repeatableFields:delete V[e==null?void 0:e.uuid];const te=Object.keys(V).length;E(V),D(te)},ne=(ve=e==null?void 0:e.repeatableFields)==null?void 0:ve.map(V=>{var te;return{fieldUuid:V==null?void 0:V.uuid,field:V==null?void 0:V.uuid,header:(te=V==null?void 0:V.label)==null?void 0:te.english}}),J=ne==null?void 0:ne.map(V=>o.jsx(dr,{field:V.field,header:V.header,body:te=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:te[V==null?void 0:V.field]}})})},V.field)),K=()=>{var ue;const V=[...C],te=[];let W=!0;e:for(const[,Ae]of e.children.entries()){for(const[,pe]of Ae.children.entries())if(console.log("field.isValid",pe.isValid),pe!=null&&pe.isPostField&&pe.isValid!==1){const ke={fieldId:pe.uuid,rowIndex:a};console.log("inValidData",ke),te.push(ke),Xt.emit("OnInvalidFieldCatch",ke),W=!1;break e}W=!0}W&&(te==null?void 0:te.length)===0&&(B(e==null?void 0:e.uuid,(ue=V[Y])==null?void 0:ue.repeatableFields),Xt.emit("clearRepeatableFields",e==null?void 0:e.uuid),ge())},oe=V=>o.jsx(o.Fragment,{children:o.jsx(Pt,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{k(e==null?void 0:e.uuid,V==null?void 0:V.rowIndex),setTimeout(()=>{ge()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...DSe,opacity:ee,marginTop:`${(Ce=e==null?void 0:e.margin)==null?void 0:Ce.top}px`,marginBottom:`${(Se=e==null?void 0:e.margin)==null?void 0:Se.bottom}px`,marginLeft:`${(Te=e==null?void 0:e.margin)==null?void 0:Te.left}px`,marginRight:`${(De=e==null?void 0:e.margin)==null?void 0:De.right}px`},className:c?"row container-row":"draggable row container-row",children:[M&&o.jsx(Ig,{renderType:m,visibilty:M,setVisibility:H,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:h},"row_settings_"+r+i+a),m===pm&&o.jsxs("div",{className:"form-builder-columns",children:[e.children.map((V,te)=>{const W=`${n}-${te}`;return o.jsxs(N.Fragment,{children:[m===Y1&&o.jsx(Tr,{isAdvanceView:u,data:{path:W,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag"}),G(V,W,r,i,a,te)]},W)}),o.jsx(Tr,{isAdvanceView:u,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag",isLast:!0})]}),(m===z1||m===F0||m===hm||m===P9||m===ep)&&(f===!1?o.jsx(o.Fragment,{children:u===!0?o.jsx(li,{header:"Row",toggleable:!0,headerTemplate:V=>ae(V,r,i,a),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(ie=e==null?void 0:e.children)==null?void 0:ie.map((V,te)=>{const W=`${n}-${te}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:u,data:{path:W,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag"}),G(V,W,r,i,a,te)]},W)}),o.jsx(Tr,{isAdvanceView:u,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:u?"form-builder-columns":"",style:u?{overflowX:"auto"}:{},children:(U=e==null?void 0:e.children)==null?void 0:U.map((V,te)=>{const W=`${n}-${te}`;return o.jsx(N.Fragment,{children:G(V,W,r,i,a,te)},W)})})})}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&P===j)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(re=e==null?void 0:e.heading)==null?void 0:re[w==null?void 0:w.type]}),o.jsx("span",{children:(Q=e==null?void 0:e.subHeadingText)==null?void 0:Q[w==null?void 0:w.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((V,te)=>{const W=`${n}-${te}`;return o.jsx(N.Fragment,{children:G(V,W,r,i,a,te)},W)})})]})})),m===H1&&(f===!1?o.jsxs("div",{children:[o.jsx("span",{className:"row-setting-block-pdf-editor",children:o.jsxs("div",{className:"pdf-setting-container",children:[o.jsxs("button",{onClick:()=>{A(r,i),h()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]}),((be=(se=x[r])==null?void 0:se.children[i])==null?void 0:be.children.length)>1&&o.jsxs("button",{onClick:()=>{v(r,i,a),h()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>{S(e,r,i,a),h()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>H(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})]})}),o.jsx("div",{className:"form-builder-columns",children:(me=e==null?void 0:e.children)==null?void 0:me.map((V,te)=>{const W=`${n}-${te}`;return o.jsx(N.Fragment,{children:G(V,W,r,i,a,te)},W)})})]}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&P===j)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(ye=e==null?void 0:e.heading)==null?void 0:ye[w==null?void 0:w.type]}),o.jsx("span",{children:(Ie=e==null?void 0:e.subHeadingText)==null?void 0:Ie[w==null?void 0:w.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((V,te)=>{const W=`${n}-${te}`;return o.jsx(N.Fragment,{children:G(V,W,r,i,a,te)},W)})})]})})),m===Y1&&o.jsx("div",{className:"form-builder-columns",children:e.children.map((V,te)=>{const W=`${n}-${te}`;return o.jsx(N.Fragment,{children:G(V,W,r,i,a,te)},W)})}),(e==null?void 0:e.rowIsRepeatable)&&P!==j&&o.jsx(Pt,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>K(),label:(Ee=e.addToListButtonLabel)==null?void 0:Ee[w==null?void 0:w.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(zs,{value:(C==null?void 0:C.length)>0?(he=C[Y])==null?void 0:he.repeatableFieldsData:[],children:[J,P!==j&&o.jsx(dr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:V=>oe(V)})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{field:e})]})]})]})},NSe=t=>{var fe,ee,G,ae,Y,ge,ne,J;const{isAdvanceView:e,isPreview:n,renderType:r,emitSocketData:i}=Zt(),{handleDrop:a}=on(),{data:s,path:l,pageIndex:c,sectionIndex:u,section:d,page:f}=t,{removeSection:h,addSection:m,cloneSection:g,formBuilderFormLayout:v,userSelectedLanguage:A}=on(),[S,x]=N.useState(!1),[w,T]=N.useState(!1),[C,_]=N.useState({reusable_template_schema:""}),[E,D]=N.useState(!1),B=N.useRef(null),k=(K,oe)=>{_(ve=>({...ve,[K]:oe}))},[{isDragging:P},j]=Qi({type:ta,item:{type:ta,uuid:s.uuid,children:s.children,path:l},collect:K=>({isDragging:K.isDragging()})}),M=P?.25:1;j(B);const H=(K,oe,ve,Ce,Se)=>o.jsx(OSe,{page:f,section:d,data:K,path:oe,pageIndex:ve,sectionIndex:Ce,rowIndex:Se},`row-${l}-${K.uuid}`),de=(K,oe,ve)=>{var De,ie;const Ce=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Se=`${K.className} justify-content-space-between panel-tab-section`,Te=`${K.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Se,children:[o.jsxs("span",{ref:n===!1?B:null,children:[o.jsx("button",{className:K.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:Ce}),o.jsx(Qt,{})]}),o.jsxs("span",{className:Te,children:[ve+1," ",(De=s==null?void 0:s.heading)==null?void 0:De[A==null?void 0:A.type]]})]}),n===!1&&o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".del-tool"}),o.jsx(rn,{target:".setting-tool"}),o.jsx(rn,{target:".add-section-tool"}),o.jsx(rn,{target:".save-tool"}),o.jsx(rn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{m(oe),i()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((ie=v[oe])==null?void 0:ie.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{h(oe,ve),i()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{k("reusable_template_schema",s),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{g(s,oe,ve),i()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:M,marginBottom:20},className:e?"draggable row":"",children:[n===!1&&o.jsx(Dh,{saveBuilderElementModalData:C,setSaveBuilderElementModalData:_,saveElementModal:w,setSaveElementModal:T}),S===!0&&o.jsx(_h,{renderType:r,visibilty:S,setVisibility:x,section:s,pageIndex:c,sectionIndex:u,emitSocketData:i},"section_settings_"+c+u),n===!1?o.jsx(o.Fragment,{children:e===!0?o.jsxs(li,{header:(fe=s==null?void 0:s.heading)==null?void 0:fe.english,toggleable:!0,headerTemplate:K=>de(K,c,u),onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:[((ee=s==null?void 0:s.subHeadingText)==null?void 0:ee[A==null?void 0:A.type])&&o.jsx("p",{children:(G=s==null?void 0:s.subHeadingText)==null?void 0:G[A==null?void 0:A.type]}),o.jsxs("div",{children:[s.children.map((K,oe)=>{const ve=`${l}-${oe}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:e,data:{path:ve,childrenCount:s.children.length},onDrop:a}),H(K,ve,c,u,oe)]},ve)}),o.jsx(Tr,{isAdvanceView:e,data:{path:`${l}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:a,isLast:!0})]}),E&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{m(c),i()},children:o.jsx(Qt,{})})}),((ae=v[c])==null?void 0:ae.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{h(c,u),i()},children:o.jsx(Qt,{})})})]})]}):o.jsxs(o.Fragment,{children:[((Y=s==null?void 0:s.subHeadingText)==null?void 0:Y[A==null?void 0:A.type])&&o.jsx("p",{children:(ge=s==null?void 0:s.subHeadingText)==null?void 0:ge[A==null?void 0:A.type]}),o.jsx("div",{children:s.children.map((K,oe)=>{const ve=`${l}-${oe}`;return o.jsx(N.Fragment,{children:H(K,ve,c,u,oe)},ve)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(s==null?void 0:s.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(ne=s==null?void 0:s.heading)==null?void 0:ne[A==null?void 0:A.type]}),o.jsx("p",{children:(J=s==null?void 0:s.subHeadingText)==null?void 0:J[A==null?void 0:A.type]}),o.jsx("hr",{})]}),s.children.map((K,oe)=>{const ve=`${l}-${oe}`;return o.jsx(N.Fragment,{children:o.jsx("div",{className:"",children:H(K,ve,c,u,oe)},ve)},ve)})]})})]})},FSe=t=>{var s;const{data:e,currentPath:n,pageIndex:r,page:i}=t,a=N.useRef(null);return o.jsx(o.Fragment,{children:o.jsxs(sw,{ref:a,modules:[dV,wve],spaceBetween:50,slidesPerView:1,navigation:{prevEl:".prev",nextEl:".next"},pagination:{clickable:!1},scrollbar:{el:".swiper-scrollbar",draggable:!1},onSwiper:l=>console.log(l),onSlideChange:()=>console.log("slide change"),children:[(s=e==null?void 0:e.children)==null?void 0:s.map((l,c)=>{var u;return(u=l==null?void 0:l.children)==null?void 0:u.map((d,f)=>{var h;return(h=d==null?void 0:d.children)==null?void 0:h.map((m,g)=>{var v;return(v=m==null?void 0:m.children)==null?void 0:v.map((A,S)=>{const x=`${n}-${c}-${f}-${g}-${S}`;return o.jsx(ow,{children:o.jsx("div",{className:"",children:o.jsx(qc,{page:i,column:m,type:"field",row:d,section:l,field:A,data:A,path:x,pageIndex:r,sectionIndex:c,rowIndex:f,columnIndex:g,fieldIndex:S},`component-${x}-${A==null?void 0:A.uuid}`)})},`swiper_slide_${x}`)})})})}),o.jsxs("div",{className:"flex justify-content-center",children:[o.jsx(Pt,{className:"mr-2 p-button-info prev",size:"large",label:"Previous",icon:"pi pi-arrow-left",onClick:()=>{}}),o.jsx(Pt,{size:"large",className:"p-button-info next",icon:"pi pi-arrow-right",label:"Next"})]})]})})},PSe=t=>{const{isAdvanceView:e,isRenderView:n,isPreview:r}=Zt(),{handleDrop:i}=on(),{data:a,path:s,pageIndex:l}=t,{formBuilderFormSchema:c}=on(),u=N.useRef(null),[{},d]=Qi({type:ta,item:{type:ta,uuid:a.uuid,children:a.children,path:s},collect:h=>({isDragging:h.isDragging()})});d(u);const f=(h,m,g,v)=>o.jsx(NSe,{data:h,section:h,path:m,page:a,pageIndex:g,sectionIndex:v},`section_${g}_${v}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${n?"":"draggable page-css p-3 pb-4"}`,"data-image-src":a==null?void 0:a.bgImage,"data-bg-color":`#${a==null?void 0:a.bgColor}`,children:r===!1?o.jsxs(o.Fragment,{children:[a.children.map((h,m)=>{const g=`${s}-${m}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:e,data:{path:g,childrenCount:a.children.length},onDrop:i}),f(h,g,l,m)]},`section-${m}-${h.uuid}`)}),o.jsx(Tr,{isAdvanceView:e,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]}):o.jsx(o.Fragment,{children:(c==null?void 0:c.surveyQuestionSlide)===!0?o.jsx(o.Fragment,{children:o.jsx(FSe,{page:a,data:a,currentPath:s,pageIndex:l})}):o.jsx("div",{className:"p-1",children:a.children.map((h,m)=>{const g=`${s}-${m}`;return o.jsx(N.Fragment,{children:((h==null?void 0:h.isHidden)===!1||!r)&&f(h,g,l,m)},`section-${m}-${h.uuid}`)})})})})},kSe=()=>{const[t,e]=N.useState(!1),{isAdvanceView:n,isPreview:r,emitSocketData:i}=Zt(),[a,s]=N.useState(!1),[l,c]=N.useState(0),{removePage:u,userSelectedLanguage:d,formBuilderFormLayout:f,formBuilderFormLayout:h,clonePage:m}=on(),g=(v,A,S)=>o.jsx(PSe,{data:v,path:A,pageIndex:S},`page-${v.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(h==null?void 0:h.length)===k9&&r===!0?o.jsx(o.Fragment,{children:(h==null?void 0:h.length)&&h.map((v,A)=>{const S=`${A}`;return o.jsx("div",{children:g(v,S,A)},`${v.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:n===!0||r===!0?o.jsx(Ya,{activeIndex:l,onTabChange:v=>c(v.index),children:(h==null?void 0:h.length)&&h.map((v,A)=>{const S=`${A}`;return o.jsxs(fr,{disabled:!((v==null?void 0:v.isHidden)===!1||!r),header:"Page",headerTemplate:x=>o.jsx(o7,{options:x,pageIndex:A,page:v,isPreview:r,setTabSidebarSetting:s,clonePage:m,emitSocketData:i,formBuilderFormLayout:f,userSelectedLanguage:d,removePage:u,setPageActiveIndex:c,pages:h}),children:[r===!1&&o.jsx(gf,{reusableBuilderElementModalVisibility:t,setReusableBuilderElementModalVisibility:e,pageIndex:A}),o.jsx(H0,{setVisibility:s,visibilty:a,pageIndex:A,page:v,emitSocketData:i}),g(v,S,A)]},`${v.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:(h==null?void 0:h.length)>0&&(h==null?void 0:h.map((v,A)=>{const S=`${A}`;return o.jsxs(N.Fragment,{children:[r===!1&&o.jsx(gf,{reusableBuilderElementModalVisibility:t,setReusableBuilderElementModalVisibility:e,pageIndex:A}),o.jsx(H0,{setVisibility:s,visibilty:a,pageIndex:A,page:v,emitSocketData:i}),g(v,S,A)]},`${v.uuid}-${A}`)}))})})})})},MSe={position:"relative"},LSe=t=>{var w,T,C;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=N.useRef(null),{handleDrop:f}=on(),{isPreview:h,isRenderView:m,isAdvanceView:g}=Zt(),[{isDragging:v},A]=Qi({type:ms,item:{type:ms,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:_=>({isDragging:_.isDragging()})}),S=v&&!m?.25:1;A(d);const x=(_,E,D,B,k,P,j)=>o.jsx(qc,{page:u,type:"field",row:c,section:l,field:_,data:_,path:E,pageIndex:D,sectionIndex:B,rowIndex:k,columnIndex:P,fieldIndex:j},`component-${n}-${_==null?void 0:_.uuid}`);return o.jsx("div",{style:g?{...MSe,opacity:S}:{},className:m?"form-builder-column container-column":"draggable form-builder-column container-column",children:h===!1?o.jsxs("div",{className:"builder-row-column",children:[((w=e==null?void 0:e.children)==null?void 0:w.length)>0?(T=e==null?void 0:e.children)==null?void 0:T.map((_,E)=>{const D=`${n}-${E}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:g,data:{path:D,childrenCount:e.children.length,droppedField:e},onDrop:f}),x(_,D,r,i,a,s,E)]},D)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Tr,{isAdvanceView:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},isLast:!0,onDrop:f})]}):o.jsx(o.Fragment,{children:(C=e==null?void 0:e.children)==null?void 0:C.map((_,E)=>{const D=`${n}-${E}`;return o.jsx(N.Fragment,{children:x(_,D,r,i,a,s,E)},D)})})})},BSe={},VSe=t=>{var D,B,k,P,j,M,H,de,fe;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=N.useRef(null),{removeRow:u,addRow:d,cloneRow:f,formBuilderFormLayout:h,userSelectedLanguage:m}=on(),{isPreview:g,isRenderView:v}=Zt(),{task_status:A,TASK_PUBLISHED:S}=mr(),[x,w]=N.useState(!1),[{isDragging:T},C]=Qi({type:bo,item:{type:bo,uuid:e.uuid,children:e.children,path:n,data:e},collect:ee=>({isDragging:ee.isDragging()})}),_=T?.25:1;C(c);const E=(ee,G,ae,Y,ge,ne)=>o.jsx(LSe,{page:l,row:e,section:s,data:ee,path:G,pageIndex:ae,sectionIndex:Y,rowIndex:ge,columnIndex:ne},`column-${n}-${ee.uuid}`);return o.jsxs("div",{style:{...BSe,opacity:_,marginTop:`${(D=e==null?void 0:e.margin)==null?void 0:D.top}px`,marginBottom:`${(B=e==null?void 0:e.margin)==null?void 0:B.bottom}px`,marginLeft:`${(k=e==null?void 0:e.margin)==null?void 0:k.left}px`,marginRight:`${(P=e==null?void 0:e.margin)==null?void 0:P.right}px`},className:v?"row container-row":"draggable row container-row",children:[x&&o.jsx(Ig,{visibilty:x,setVisibility:w,row:e,pageIndex:r,sectionIndex:i,rowIndex:a},"row_settings_"+r+i+a),g===!1?o.jsxs("div",{children:[o.jsx("span",{className:"row-setting-block-pdf-editor",children:o.jsxs("div",{className:"pdf-setting-container",children:[o.jsxs("button",{onClick:()=>{d(r,i)},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]}),((M=(j=h[r])==null?void 0:j.children[i])==null?void 0:M.children.length)>1&&o.jsxs("button",{onClick:()=>{u(r,i,a)},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>{f(e,r,i,a)},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>w(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})]})}),o.jsx("div",{className:"form-builder-columns",children:(H=e==null?void 0:e.children)==null?void 0:H.map((ee,G)=>{const ae=`${n}-${G}`;return o.jsx(N.Fragment,{children:E(ee,ae,r,i,a,G)},ae)})})]}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&A===S)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(de=e==null?void 0:e.heading)==null?void 0:de[m==null?void 0:m.type]}),o.jsx("span",{children:(fe=e==null?void 0:e.subHeadingText)==null?void 0:fe[m==null?void 0:m.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((ee,G)=>{const ae=`${n}-${G}`;return o.jsx(N.Fragment,{children:E(ee,ae,r,i,a,G)},ae)})})]})})]})},USe=t=>{var C,_,E;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{userSelectedLanguage:l}=on(),{isPreview:c,isAdvanceView:u}=Zt(),[d,f]=N.useState(!1),[h,m]=N.useState(!1),[g,v]=N.useState(null),A=N.useRef(null),[{isDragging:S},x]=Qi({type:ta,item:{type:ta,uuid:e.uuid,children:e.children,path:n},collect:D=>({isDragging:D.isDragging()})}),w=S?.25:1;x(A);const T=(D,B,k,P,j)=>o.jsx(VSe,{page:s,section:a,data:D,path:B,pageIndex:k,sectionIndex:P,rowIndex:j},`row-${n}-${D.uuid}`);return o.jsxs("div",{style:{opacity:w,marginBottom:20},className:u?"draggable row":"",children:[c===!1&&o.jsx(Dh,{saveBuilderElementModalData:g,setSaveBuilderElementModalData:v,saveElementModal:h,setSaveElementModal:m}),d===!0&&o.jsx(_h,{visibilty:d,setVisibility:f,section:e,pageIndex:r,sectionIndex:i},"section_settings_"+r+i),c===!1?o.jsx("div",{children:o.jsx("div",{children:e.children.map((D,B)=>{const k=`${n}-${B}`;return o.jsx(N.Fragment,{children:T(D,k,r,i,B)},k)})})}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[(e==null?void 0:e.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(C=e==null?void 0:e.heading)==null?void 0:C[l==null?void 0:l.type]}),((_=e==null?void 0:e.subHeadingText)==null?void 0:_[l==null?void 0:l.type])&&o.jsx("p",{children:(E=e==null?void 0:e.subHeadingText)==null?void 0:E[l==null?void 0:l.type]}),o.jsx("hr",{})]}),e.children.map((D,B)=>{const k=`${n}-${B}`;return o.jsx(N.Fragment,{children:o.jsx("div",{className:"",children:T(D,k,r,i,B)},k)},k)})]})})]})},_5={},D5={height:"1280px",width:"100%"},qSe=t=>{var f,h,m,g;const{data:e,path:n,pageIndex:r}=t,{isPreview:i,isRenderView:a}=Zt(),s=N.useRef(null),[{isDragging:l},c]=Qi({type:ta,item:{type:ta,uuid:e.uuid,children:e.children,path:n},collect:v=>({isDragging:v.isDragging()})}),u=l?0:1;c(s);const d=(v,A,S,x)=>o.jsx(USe,{data:v,section:v,path:A,page:e,pageIndex:S,sectionIndex:x},`section_${S}_${x}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${a?"":"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:o.jsx("div",{className:"pdf flex justify-content-center",children:i===!1?o.jsx("div",{id:e==null?void 0:e.uuid,className:"page-block ",style:(e==null?void 0:e.bgType)==="image"?{..._5,...D5,opacity:u,backgroundImage:`url("${e==null?void 0:e.bgImage}")`}:{..._5,...D5,opacity:u,backgroundColor:`#${e==null?void 0:e.bgColor}`},children:((e==null?void 0:e.isCoverPage)===!1||(e==null?void 0:e.isCoverPage)===void 0)&&o.jsx(o.Fragment,{children:e.children.map((v,A)=>{const S=`${n}-${A}`;return o.jsx(N.Fragment,{children:d(v,S,r,A)},`section-${A}-${v.uuid}`)})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"page-block",style:(e==null?void 0:e.bgType)==="image"?{..._5,...D5,opacity:u,backgroundImage:`url("${e==null?void 0:e.bgImage}")`,backgroundSize:"cover"}:{..._5,...D5,opacity:u,backgroundColor:`#${e==null?void 0:e.bgColor}`},children:o.jsx("div",{style:{marginTop:`${(f=e==null?void 0:e.margin)==null?void 0:f.top}px`,marginBottom:`${(h=e==null?void 0:e.margin)==null?void 0:h.bottom}px`,marginLeft:`${(m=e==null?void 0:e.margin)==null?void 0:m.left}px`,marginRight:`${(g=e==null?void 0:e.margin)==null?void 0:g.right}px`},children:e.children.map((v,A)=>{const S=`${n}-${A}`;return o.jsx(N.Fragment,{children:((v==null?void 0:v.isHidden)===!1||!i)&&d(v,S,r,A)},`section-${A}-${v.uuid}`)})})})})})})},$Se=()=>{const{isPreview:t}=Zt(),[e,n]=N.useState(!1),[r,i]=N.useState(0),[a,s]=N.useState(!1),{formBuilderFormLayout:l}=on(),c=(u,d,f)=>o.jsx(qSe,{data:u,path:d,pageIndex:f},`page-${u.uuid}`);return o.jsx("div",{className:"page",children:(l==null?void 0:l.length)===k9&&t===!0?o.jsx(o.Fragment,{children:(l==null?void 0:l.length)&&l.map((u,d)=>{const f=`${d}`;return o.jsx("div",{className:"scroll-height-400",children:c(u,f,d)},`${u.uuid}-${d}`)})}):o.jsx(o.Fragment,{children:t===!1?o.jsx(Ya,{activeIndex:r,onTabChange:u=>i(u.index),children:(l==null?void 0:l.length)&&l.map((u,d)=>{const f=`${d}`;if((u==null?void 0:u.isHidden)===!1||!t)return o.jsxs(fr,{header:"Page",headerTemplate:h=>o.jsx(o7,{options:h,pageIndex:d,page:u,setTabSidebarSetting:n,setPageActiveIndex:i,pages:l}),children:[t===!1&&o.jsx(gf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:d}),o.jsxs("div",{className:"p-3",children:[o.jsx(H0,{setVisibility:n,visibilty:e,pageIndex:d,page:u}),o.jsx("div",{children:c(u,f,d)})]})]},`${u.uuid}-${d}`)})}):o.jsx("div",{className:"",children:(l==null?void 0:l.length)&&l.map((u,d)=>{var h;const f=`${d}`;if((u==null?void 0:u.isHidden)===!1||!t)return o.jsxs("section",{id:u==null?void 0:u.uuid,"data-nav-title":(h=u==null?void 0:u.title)==null?void 0:h.english,"data-scrollspy":!0,children:[t===!1&&o.jsx(gf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:d}),o.jsxs("div",{className:"p-3",children:[o.jsx(H0,{setVisibility:n,visibilty:e,pageIndex:d,page:u}),o.jsx("div",{children:c(u,f,d)})]})]},`${u.uuid}-${d}`)})})})})},jSe=t=>{var S,x,w,T;const e=N.useRef(null),{removeColumn:n,addColumn:r,cloneColumn:i,formBuilderFormLayout:a}=on(),{isPreview:s,emitSocketData:l}=Zt(),{options:c,pageIndex:u,sectionIndex:d,rowIndex:f,columnIndex:h,data:m}=t,g=c.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",v=`${c.className} justify-content-space-between`,A=`${c.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".add-column-tool"}),o.jsxs("div",{className:v,children:[o.jsxs("span",{ref:s===!1?e:null,children:[o.jsx("button",{className:c.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:c.togglerClassName,onClick:c.onTogglerClick,children:[o.jsx("span",{className:g}),o.jsx(Qt,{})]}),o.jsx("span",{className:A,children:"Column"})]}),s===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:c.togglerClassName,onClick:()=>{r(u,d,f),l()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((T=(w=(x=(S=a[u])==null?void 0:S.children[d])==null?void 0:x.children[f])==null?void 0:w.children)==null?void 0:T.length)>1&&o.jsxs("button",{className:c.togglerClassName,onClick:()=>{n(u,d,f,h),l()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:c.togglerClassName,onClick:()=>{i(m,u,d,f,h),l()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})})]})]})]})},zSe={position:"relative"},HSe=t=>{var w,T,C,_,E;const{isAdvanceView:e,isRenderView:n,isPreview:r}=Zt(),{handleDrop:i}=on(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:m}=t,g=N.useRef(null),[{isDragging:v},A]=Qi({type:ms,item:{type:ms,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:D=>({isDragging:D.isDragging()})}),S=v&&!n?.25:1;A(g);const x=(D,B,k,P,j,M,H)=>o.jsx(qc,{page:m,column:a,type:"field",row:h,section:f,field:D,data:D,path:B,pageIndex:k,sectionIndex:P,rowIndex:j,columnIndex:M,fieldIndex:H},`component-${s}-${D==null?void 0:D.uuid}`);return o.jsx("div",{style:e?{...zSe,opacity:S}:{},className:n?"form-builder-column container-column":"draggable form-builder-column container-column",children:r===!1?o.jsx(o.Fragment,{children:e===!0?o.jsxs(li,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:D=>o.jsx(jSe,{options:D,pageIndex:l,sectionIndex:c,rowIndex:u,data:a,columnIndex:d}),children:[((w=a==null?void 0:a.children)==null?void 0:w.length)>0?(T=a==null?void 0:a.children)==null?void 0:T.map((D,B)=>{const k=`${s}-${B}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:e,fieldDropArea:!0,data:{path:k,childrenCount:a.children.length,droppedField:a},onDrop:i}),x(D,k,l,c,u,d,B)]},k)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Tr,{isAdvanceView:e,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((C=a==null?void 0:a.children)==null?void 0:C.length)>0?(_=a==null?void 0:a.children)==null?void 0:_.map((D,B)=>{const k=`${s}-${B}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:e,fieldDropArea:!0,data:{path:k,childrenCount:a.children.length,droppedField:a},onDrop:i}),x(D,k,l,c,u,d,B)]},k)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Tr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(E=a==null?void 0:a.children)==null?void 0:E.map((D,B)=>{const k=`${s}-${B}`;return o.jsx(N.Fragment,{children:x(D,k,l,c,u,d,B)},k)})})})},YSe=t=>{var x,w,T,C;const{options:e,pageIndex:n,sectionIndex:r,rowIndex:i,data:a}=t,[,s]=N.useState(!1),l=N.useRef(null),{isPreview:c,emitSocketData:u}=Zt(),{removeRow:d,addRow:f,cloneRow:h,formBuilderFormLayout:m,userSelectedLanguage:g}=on(),v=e!=null&&e.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",A=`${e==null?void 0:e.className} justify-content-space-between`,S=`${e==null?void 0:e.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".setting-tool"}),o.jsx(rn,{target:".add-row-tool"}),o.jsxs("div",{className:A,children:[o.jsxs("span",{ref:c===!1?l:null,children:[o.jsx("button",{className:e==null?void 0:e.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:e==null?void 0:e.onTogglerClick,children:[o.jsx("span",{className:v}),o.jsx(Qt,{})]}),o.jsxs("span",{className:S,children:["Row:"," ",((x=a==null?void 0:a.heading)==null?void 0:x[g==null?void 0:g.type])!==""?(w=a==null?void 0:a.heading)==null?void 0:w[g==null?void 0:g.type]:"Untitled"]})]}),c===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{f(n,r),u()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((C=(T=m[n])==null?void 0:T.children[r])==null?void 0:C.children.length)>1&&o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{d(n,r,i),u()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{h(a,n,r,i),u()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>s(!0),className:e==null?void 0:e.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})},KSe={},XSe=t=>{var ge,ne,J,K,oe,ve,Ce,Se,Te,De,ie;const{isAdvanceView:e,isRenderView:n,isPreview:r,isAdmin:i,renderType:a,emitSocketData:s}=Zt(),{handleDrop:l}=on(),{data:c,path:u,pageIndex:d,sectionIndex:f,rowIndex:h,section:m,page:g}=t,v=N.useRef(null),{userSelectedLanguage:A}=on(),{userTaskSubmitFormData:S,taskRegisterData:x,updateTaskRegisterData:w,updateTaskProgressValue:T,addUserDataFormSectionRepeatableData:C,removeUserDataFormSectionRepeatableData:_,task_status:E,TASK_PUBLISHED:D}=mr(),[B,k]=N.useState(!1),[{isDragging:P},j]=Qi({type:bo,item:{type:bo,uuid:c.uuid,children:c.children,path:u,data:c},collect:U=>({isDragging:U.isDragging()})}),M=P?.25:1;j(v);const H=(U,re,Q,se,be,me)=>o.jsx(HSe,{page:g,row:c,section:m,data:U,path:re,pageIndex:Q,sectionIndex:se,rowIndex:be,columnIndex:me,emitSocketData:s},`column-${u}-${U.uuid}`),de=_t.findIndex(S,function(U){return(U==null?void 0:U.rowId)===(c==null?void 0:c.uuid)}),fe=()=>{var Q,se,be;const U=_t.cloneDeep(x);((se=(Q=S[de])==null?void 0:Q.repeatableFieldsData)==null?void 0:se.length)>=(c==null?void 0:c.minimumEntries)?U[c==null?void 0:c.uuid]=(be=S[de])==null?void 0:be.repeatableFields:delete U[c==null?void 0:c.uuid];const re=Object.keys(U).length;w(U),T(re)},ee=(ge=c==null?void 0:c.repeatableFields)==null?void 0:ge.map(U=>{var re;return{fieldUuid:U==null?void 0:U.uuid,field:U==null?void 0:U.uuid,header:(re=U==null?void 0:U.label)==null?void 0:re.english}}),G=ee==null?void 0:ee.map(U=>o.jsx(dr,{field:U.field,header:U.header,body:re=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:re[U==null?void 0:U.field]}})})},U.field)),ae=()=>{var se;const U=[...S],re=[];let Q=!0;e:for(const[,be]of c.children.entries()){for(const[,me]of be.children.entries())if(console.log("field.isValid",me.isValid),me!=null&&me.isPostField&&me.isValid!==1){const ye={fieldId:me.uuid,rowIndex:h};console.log("inValidData",ye),re.push(ye),Xt.emit("OnInvalidFieldCatch",ye),Q=!1;break e}Q=!0}Q&&(re==null?void 0:re.length)===0&&(C(c==null?void 0:c.uuid,(se=U[de])==null?void 0:se.repeatableFields),Xt.emit("clearRepeatableFields",c==null?void 0:c.uuid),fe())},Y=U=>o.jsx(o.Fragment,{children:o.jsx(Pt,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{_(c==null?void 0:c.uuid,U==null?void 0:U.rowIndex),setTimeout(()=>{fe()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...KSe,opacity:M,marginTop:`${(ne=c==null?void 0:c.margin)==null?void 0:ne.top}px`,marginBottom:`${(J=c==null?void 0:c.margin)==null?void 0:J.bottom}px`,marginLeft:`${(K=c==null?void 0:c.margin)==null?void 0:K.left}px`,marginRight:`${(oe=c==null?void 0:c.margin)==null?void 0:oe.right}px`},className:n?"row container-row":"draggable row container-row",children:[B&&o.jsx(Ig,{renderType:a,visibilty:B,setVisibility:k,row:c,pageIndex:d,sectionIndex:f,rowIndex:h,emitSocketData:s},"row_settings_"+d+f+h),r===!1?o.jsx(o.Fragment,{children:e===!0?o.jsx(li,{header:"Row",toggleable:!0,headerTemplate:U=>o.jsx(YSe,{options:U,pageIndex:d,sectionIndex:f,rowIndex:h,data:c}),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(ve=c==null?void 0:c.children)==null?void 0:ve.map((U,re)=>{const Q=`${u}-${re}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:e,data:{path:Q,childrenCount:c.children.length},onDrop:l,className:"horizontalDrag"}),H(U,Q,d,f,h,re)]},Q)}),o.jsx(Tr,{isAdvanceView:e,data:{path:`${u}-${c.children.length}`,childrenCount:c.children.length},onDrop:l,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"form-builder-columns":"",style:e?{overflowX:"auto"}:{},children:(Ce=c==null?void 0:c.children)==null?void 0:Ce.map((U,re)=>{const Q=`${u}-${re}`;return o.jsx(N.Fragment,{children:H(U,Q,d,f,h,re)},Q)})})})}):o.jsx(o.Fragment,{children:!(c!=null&&c.rowIsRepeatable&&E===D)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(Se=c==null?void 0:c.heading)==null?void 0:Se[A==null?void 0:A.type]}),o.jsx("span",{children:(Te=c==null?void 0:c.subHeadingText)==null?void 0:Te[A==null?void 0:A.type]}),o.jsx("div",{className:"form-builder-columns",children:c.children.map((U,re)=>{const Q=`${u}-${re}`;return o.jsx(N.Fragment,{children:H(U,Q,d,f,h,re)},Q)})})]})}),(c==null?void 0:c.rowIsRepeatable)&&E!==D&&o.jsx(Pt,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>ae(),label:(De=c.addToListButtonLabel)==null?void 0:De[A==null?void 0:A.type]}),(c==null?void 0:c.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(zs,{value:(S==null?void 0:S.length)>0?(ie=S[de])==null?void 0:ie.repeatableFieldsData:[],children:[G,E!==D&&o.jsx(dr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:U=>Y(U)})]}),i&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{field:c})]})]})]})},GSe=t=>{var fe,ee,G,ae,Y,ge,ne,J;const{isAdvanceView:e,isPreview:n,renderType:r,emitSocketData:i}=Zt(),{handleDrop:a}=on(),{data:s,path:l,pageIndex:c,sectionIndex:u,section:d,page:f}=t,{removeSection:h,addSection:m,cloneSection:g,formBuilderFormLayout:v,userSelectedLanguage:A}=on(),[S,x]=N.useState(!1),[w,T]=N.useState(!1),[C,_]=N.useState({reusable_template_schema:""}),[E,D]=N.useState(!1),B=N.useRef(null),k=(K,oe)=>{_(ve=>({...ve,[K]:oe}))},[{isDragging:P},j]=Qi({type:ta,item:{type:ta,uuid:s.uuid,children:s.children,path:l},collect:K=>({isDragging:K.isDragging()})}),M=P?.25:1;j(B);const H=(K,oe,ve,Ce,Se)=>o.jsx(XSe,{page:f,section:d,data:K,path:oe,pageIndex:ve,sectionIndex:Ce,rowIndex:Se,emitSocketData:i},`row-${l}-${K.uuid}`),de=(K,oe,ve)=>{var De,ie;const Ce=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Se=`${K.className} justify-content-space-between panel-tab-section`,Te=`${K.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Se,children:[o.jsxs("span",{ref:n===!1?B:null,children:[o.jsx("button",{className:K.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:Ce}),o.jsx(Qt,{})]}),o.jsxs("span",{className:Te,children:[ve+1," ",(De=s==null?void 0:s.heading)==null?void 0:De[A==null?void 0:A.type]]})]}),n===!1&&o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".del-tool"}),o.jsx(rn,{target:".setting-tool"}),o.jsx(rn,{target:".add-section-tool"}),o.jsx(rn,{target:".save-tool"}),o.jsx(rn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{m(oe),i()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((ie=v[oe])==null?void 0:ie.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{h(oe,ve),i()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{k("reusable_template_schema",s),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{g(s,oe,ve),i()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:M,marginBottom:20},className:e?"draggable row":"",children:[n===!1&&o.jsx(Dh,{saveBuilderElementModalData:C,setSaveBuilderElementModalData:_,saveElementModal:w,setSaveElementModal:T}),S===!0&&o.jsx(_h,{renderType:r,visibilty:S,setVisibility:x,section:s,pageIndex:c,sectionIndex:u,emitSocketData:i},"section_settings_"+c+u),n===!1?o.jsx(o.Fragment,{children:e===!0?o.jsxs(li,{header:(fe=s==null?void 0:s.heading)==null?void 0:fe.english,toggleable:!0,headerTemplate:K=>de(K,c,u),onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:[((ee=s==null?void 0:s.subHeadingText)==null?void 0:ee[A==null?void 0:A.type])&&o.jsx("p",{children:(G=s==null?void 0:s.subHeadingText)==null?void 0:G[A==null?void 0:A.type]}),o.jsxs("div",{children:[s.children.map((K,oe)=>{const ve=`${l}-${oe}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:e,data:{path:ve,childrenCount:s.children.length},onDrop:a}),H(K,ve,c,u,oe)]},ve)}),o.jsx(Tr,{isAdvanceView:e,data:{path:`${l}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:a,isLast:!0})]}),E&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{m(c),i()},children:o.jsx(Qt,{})})}),((ae=v[c])==null?void 0:ae.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{h(c,u),i()},children:o.jsx(Qt,{})})})]})]}):o.jsxs(o.Fragment,{children:[((Y=s==null?void 0:s.subHeadingText)==null?void 0:Y[A==null?void 0:A.type])&&o.jsx("p",{children:(ge=s==null?void 0:s.subHeadingText)==null?void 0:ge[A==null?void 0:A.type]}),o.jsx("div",{children:s.children.map((K,oe)=>{const ve=`${l}-${oe}`;return o.jsx(N.Fragment,{children:H(K,ve,c,u,oe)},ve)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(s==null?void 0:s.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(ne=s==null?void 0:s.heading)==null?void 0:ne[A==null?void 0:A.type]}),o.jsx("p",{children:(J=s==null?void 0:s.subHeadingText)==null?void 0:J[A==null?void 0:A.type]}),o.jsx("hr",{})]}),s.children.map((K,oe)=>{const ve=`${l}-${oe}`;return o.jsx(N.Fragment,{children:o.jsx("div",{className:"",children:H(K,ve,c,u,oe)},ve)},ve)})]})})]})},RSe={position:"relative"},WSe=t=>{var w,T,C;const{isAdvanceView:e,isRenderView:n,isPreview:r}=Zt(),{handleDrop:i}=on(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:m}=t,g=N.useRef(null),[{isDragging:v},A]=Qi({type:ms,item:{type:ms,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:_=>({isDragging:_.isDragging()})}),S=v&&!n?.25:1;A(g);const x=(_,E,D,B,k,P,j)=>o.jsx(qc,{page:m,type:"field",row:h,column:a,section:f,field:_,data:_,path:E,pageIndex:D,sectionIndex:B,rowIndex:k,columnIndex:P,fieldIndex:j},`component-${s}-${_==null?void 0:_.uuid}`);return o.jsx("div",{style:e?{...RSe,opacity:S}:{},className:n?"":"draggable column container-column",children:r===!1?o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((w=a==null?void 0:a.children)==null?void 0:w.length)>0?(T=a==null?void 0:a.children)==null?void 0:T.map((_,E)=>{const D=`${s}-${E}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:e,fieldDropArea:!0,data:{path:D,childrenCount:a.children.length,droppedField:a},onDrop:i}),x(_,D,l,c,u,d,E)]},D)}):o.jsx(o.Fragment,{}),o.jsx(Tr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]})}):o.jsx(o.Fragment,{children:(C=a==null?void 0:a.children)==null?void 0:C.map((_,E)=>{const D=`${s}-${E}`;return o.jsx(N.Fragment,{children:x(_,D,l,c,u,d,E)},D)})})})},QSe=t=>{var l;const{isAdvanceView:e}=Zt(),{data:n,page:r,currentPath:i,pageIndex:a}=t,s=(c,u,d,f,h,m,g,v)=>o.jsx(WSe,{page:r,row:v,section:g,data:c,path:`${d}-${f}-${h}-${m}`,pageIndex:d,sectionIndex:f,rowIndex:h,columnIndex:m},`column-${i}-${c.uuid}`);return o.jsx(o.Fragment,{children:(l=n==null?void 0:n.children)==null?void 0:l.map((c,u)=>{var d;return(d=c==null?void 0:c.children)==null?void 0:d.map((f,h)=>{var m;return o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"columns":"",style:e?{overflowX:"auto"}:{},children:(m=f==null?void 0:f.children)==null?void 0:m.map((g,v)=>{const A=`${i}-${u}-${h}-${v}`;return o.jsx(N.Fragment,{children:s(g,A,a,u,h,v,c,f)},A)})})})})})})},JSe=t=>{const{data:e,path:n,pageIndex:r}=t,{isAdvanceView:i,isRenderView:a,isPreview:s}=Zt(),{formBuilderFormSchema:l,handleDrop:c}=on(),u=N.useRef(null),[{},d]=Qi({type:ta,item:{type:ta,uuid:e.uuid,children:e.children,path:n},collect:h=>({isDragging:h.isDragging()})});d(u);const f=(h,m,g,v)=>o.jsx(GSe,{data:h,section:h,path:m,page:e,pageIndex:g,sectionIndex:v},`section_${g}_${v}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${a?"":"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:s===!1?o.jsx(o.Fragment,{children:i?o.jsxs(o.Fragment,{children:[e.children.map((h,m)=>{const g=`${n}-${m}`;return o.jsxs(N.Fragment,{children:[i===!0&&o.jsx(Tr,{isAdvanceView:i,data:{path:g,childrenCount:e.children.length},onDrop:c}),f(h,g,r,m)]},`section-${m}-${h.uuid}`)}),i===!0&&o.jsx(Tr,{isAdvanceView:i,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:c,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsx(QSe,{page:e,data:e,path:n,pageIndex:r})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"p-1",children:e.children.map((h,m)=>{const g=`${n}-${m}`;return o.jsx(N.Fragment,{children:l!=null&&l.showConditionalFields?o.jsx(o.Fragment,{children:o.jsx("div",{children:f(h,g,r,m)})}):((h==null?void 0:h.isHidden)===!1||!s)&&f(h,g,r,m)},`section-${m}-${h.uuid}`)})})})})},ZSe=()=>{const[t,e]=N.useState(!1),{formBuilderFormLayout:n}=on(),{isPreview:r}=Zt(),i=()=>{},a=(s,l,c)=>o.jsx(JSe,{data:s,path:l,pageIndex:c},`page-${s.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:o.jsx("div",{children:(n==null?void 0:n.length)&&n.map((s,l)=>{const c=`${l}`;if((s==null?void 0:s.isHidden)===!1||!r)return o.jsxs("div",{children:[o.jsx(H0,{setVisibility:e,visibilty:t,pageIndex:l,page:s,emitSocketData:i}),a(s,c,l)]},`policie-page-${l}`)})})})})},exe={position:"relative"},txe=t=>{var w;const{isPreview:e,isRenderView:n,isAdvanceView:r}=Zt(),{data:i,path:a,pageIndex:s,sectionIndex:l,rowIndex:c,columnIndex:u,section:d,row:f,page:h}=t,m=N.useRef(null),{handleDrop:g}=on(),[{isDragging:v},A]=Qi({type:ms,item:{type:ms,uuid:i==null?void 0:i.uuid,children:i.children,path:a},collect:T=>({isDragging:T.isDragging()})}),S=v&&!n?.25:1;A(m);const x=(T,C,_,E,D,B,k)=>o.jsx(qc,{page:h,type:"field",row:f,section:d,field:T,data:T,path:C,pageIndex:_,sectionIndex:E,rowIndex:D,columnIndex:B,fieldIndex:k},`component-${a}-${T==null?void 0:T.uuid}`);return o.jsx("div",{style:r?{...exe,opacity:S}:{},className:n?"form-builder-column container-column":"draggable form-builder-column container-column",children:!e&&o.jsxs("div",{children:[(w=i==null?void 0:i.children)==null?void 0:w.map((T,C)=>{const _=`${a}-${C}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{fieldDropArea:!0,isAdvanceView:r,data:{path:_,childrenCount:i.children.length,droppedField:i},onDrop:g}),x(T,_,s,l,c,u,C)]},_)}),i.children.length===0&&o.jsx("p",{className:"text-center",children:"Add element by dragging and dropping element from the sidebar into the dropzone area"}),o.jsx(Tr,{fieldDropArea:!0,isAdvanceView:r,data:{path:`${a}-${i.children.length}`,childrenCount:i.children.length,droppedField:i},onDrop:g,isLast:!0})]})})},nxe={},rxe=t=>{var Y,ge,ne,J,K,oe,ve;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=N.useRef(null),{userSelectedLanguage:u,handleDrop:d}=on(),{userTaskSubmitFormData:f,taskRegisterData:h,updateTaskRegisterData:m,updateTaskProgressValue:g,addUserDataFormSectionRepeatableData:v,removeUserDataFormSectionRepeatableData:A,task_status:S,TASK_PUBLISHED:x}=mr(),{isRenderView:w,isAdmin:T,isAdvanceView:C,emitSocketData:_,renderType:E}=Zt(),[D,B]=N.useState(!1),[{isDragging:k},P]=Qi({type:bo,item:{type:bo,uuid:e.uuid,children:e.children,path:n,data:e},collect:Ce=>({isDragging:Ce.isDragging()})}),j=k?.25:1;P(c);const M=(Ce,Se,Te,De,ie,U)=>o.jsx(txe,{page:l,row:e,section:s,data:Ce,path:Se,pageIndex:Te,sectionIndex:De,rowIndex:ie,columnIndex:U},`column-${n}-${Ce.uuid}`),H=_t.findIndex(f,function(Ce){return(Ce==null?void 0:Ce.rowId)===(e==null?void 0:e.uuid)}),de=()=>{var Te,De,ie;const Ce=_t.cloneDeep(h);((De=(Te=f[H])==null?void 0:Te.repeatableFieldsData)==null?void 0:De.length)>=(e==null?void 0:e.minimumEntries)?Ce[e==null?void 0:e.uuid]=(ie=f[H])==null?void 0:ie.repeatableFields:delete Ce[e==null?void 0:e.uuid];const Se=Object.keys(Ce).length;m(Ce),g(Se)},fe=(Y=e==null?void 0:e.repeatableFields)==null?void 0:Y.map(Ce=>{var Se;return{fieldUuid:Ce==null?void 0:Ce.uuid,field:Ce==null?void 0:Ce.uuid,header:(Se=Ce==null?void 0:Ce.label)==null?void 0:Se.english}}),ee=fe==null?void 0:fe.map(Ce=>o.jsx(dr,{field:Ce.field,header:Ce.header,body:Se=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:Se[Ce==null?void 0:Ce.field]}})})},Ce.field)),G=()=>{var De;const Ce=[...f],Se=[];let Te=!0;e:for(const[,ie]of e.children.entries()){for(const[,U]of ie.children.entries())if(console.log("field.isValid",U.isValid),U!=null&&U.isPostField&&U.isValid!==1){const re={fieldId:U.uuid,rowIndex:a};console.log("inValidData",re),Se.push(re),Xt.emit("OnInvalidFieldCatch",re),Te=!1;break e}Te=!0}Te&&(Se==null?void 0:Se.length)===0&&(v(e==null?void 0:e.uuid,(De=Ce[H])==null?void 0:De.repeatableFields),Xt.emit("clearRepeatableFields",e==null?void 0:e.uuid),de())},ae=Ce=>o.jsx(o.Fragment,{children:o.jsx(Pt,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{A(e==null?void 0:e.uuid,Ce==null?void 0:Ce.rowIndex),setTimeout(()=>{de()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...nxe,opacity:j,marginTop:`${(ge=e==null?void 0:e.margin)==null?void 0:ge.top}px`,marginBottom:`${(ne=e==null?void 0:e.margin)==null?void 0:ne.bottom}px`,marginLeft:`${(J=e==null?void 0:e.margin)==null?void 0:J.left}px`,marginRight:`${(K=e==null?void 0:e.margin)==null?void 0:K.right}px`},className:w?"row container-row":"draggable row container-row",children:[D&&o.jsx(Ig,{renderType:E,visibilty:D,setVisibility:B,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:_},"row_settings_"+r+i+a),o.jsxs("div",{className:"form-builder-columns",children:[e.children.map((Ce,Se)=>{const Te=`${n}-${Se}`;return o.jsxs(N.Fragment,{children:[E===Y1&&o.jsx(Tr,{isAdvanceView:C,data:{path:Te,childrenCount:e.children.length},onDrop:d,className:"horizontalDrag"}),M(Ce,Te,r,i,a,Se)]},Te)}),o.jsx(Tr,{isAdvanceView:C,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:d,className:"horizontalDrag",isLast:!0})]}),(e==null?void 0:e.rowIsRepeatable)&&S!==x&&o.jsx(Pt,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>G(),label:(oe=e.addToListButtonLabel)==null?void 0:oe[u==null?void 0:u.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(zs,{value:(f==null?void 0:f.length)>0?(ve=f[H])==null?void 0:ve.repeatableFieldsData:[],children:[ee,S!==x&&o.jsx(dr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:Ce=>ae(Ce)})]}),T&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{field:e})]})]})]})},ixe=t=>{var H,de;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{removeSection:l,addSection:c,cloneSection:u,formBuilderFormLayout:d,userSelectedLanguage:f,handleDrop:h}=on(),{isPreview:m,isAdvanceView:g,renderType:v,emitSocketData:A}=Zt(),[S,x]=N.useState(!1),[w,T]=N.useState(!1),[C,_]=N.useState({reusable_template_schema:""}),E=N.useRef(null),D=(fe,ee)=>{_(G=>({...G,[fe]:ee}))},[{isDragging:B},k]=Qi({type:ta,item:{type:ta,uuid:e.uuid,children:e.children,path:n},collect:fe=>({isDragging:fe.isDragging()})}),P=B?.25:1;k(E);const j=(fe,ee,G,ae,Y)=>o.jsx(rxe,{page:s,section:a,data:fe,path:ee,pageIndex:G,sectionIndex:ae,rowIndex:Y},`row-${n}-${fe.uuid}`),M=(fe,ee,G)=>{var ne,J;const ae=fe.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Y=`${fe.className} justify-content-space-between panel-tab-section`,ge=`${fe.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Y,children:[o.jsxs("span",{ref:m===!1?E:null,children:[o.jsx("button",{className:fe.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:fe.togglerClassName,onClick:fe.onTogglerClick,children:[o.jsx("span",{className:ae}),o.jsx(Qt,{})]}),o.jsxs("span",{className:ge,children:[G+1," ",(ne=e==null?void 0:e.heading)==null?void 0:ne[f==null?void 0:f.type]]})]}),m===!1&&o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".del-tool"}),o.jsx(rn,{target:".setting-tool"}),o.jsx(rn,{target:".add-section-tool"}),o.jsx(rn,{target:".save-tool"}),o.jsx(rn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:fe.togglerClassName,onClick:()=>{c(ee),A()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((J=d[ee])==null?void 0:J.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:fe.togglerClassName,onClick:()=>{l(ee,G),A()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:fe.togglerClassName,onClick:()=>{D("reusable_template_schema",e),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:fe.togglerClassName,onClick:()=>{u(e,ee,G),A()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:fe.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:P,marginBottom:20},className:g?"draggable row":"",children:[m===!1&&o.jsx(Dh,{saveBuilderElementModalData:C,setSaveBuilderElementModalData:_,saveElementModal:w,setSaveElementModal:T}),S===!0&&o.jsx(_h,{renderType:v,visibilty:S,setVisibility:x,section:e,pageIndex:r,sectionIndex:i,emitSocketData:A},"section_settings_"+r+i),m===!1?o.jsxs(li,{className:"mb-5",header:(H=e==null?void 0:e.heading)==null?void 0:H.english,toggleable:!0,headerTemplate:fe=>M(fe,r,i),children:[o.jsx("p",{children:(de=e==null?void 0:e.subHeadingText)==null?void 0:de[f==null?void 0:f.type]}),o.jsxs("div",{className:"",children:[e.children.map((fe,ee)=>{const G=`${n}-${ee}`;return o.jsx(N.Fragment,{children:j(fe,G,r,i,ee)},G)}),o.jsx(Tr,{isAdvanceView:g,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:h,className:"horizontalDrag",isLast:!0})]})]}):o.jsx(o.Fragment,{})]})},axe=t=>{const{isRenderView:e,isPreview:n}=Zt(),{data:r,path:i,pageIndex:a}=t,s=N.useRef(null),[,l]=Qi({type:ta,item:{type:ta,uuid:r.uuid,children:r.children,path:i},collect:u=>({isDragging:u.isDragging()})});l(s);const c=(u,d,f,h)=>o.jsx(ixe,{data:u,section:u,path:d,pageIndex:f,sectionIndex:h,page:r},`section_${f}_${h}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${e?"":"draggable page-css p-3 pb-4"}`,"data-image-src":r==null?void 0:r.bgImage,"data-bg-color":`#${r==null?void 0:r.bgColor}`,children:n?o.jsx(o.Fragment,{}):o.jsx("div",{className:"p-1",children:r.children.map((u,d)=>{const f=`${i}-${d}`;return o.jsx(N.Fragment,{children:c(u,f,a,d)},`section-${d}-${u.uuid}`)})})})},sxe=()=>{const{formBuilderFormLayout:t}=on(),e=(n,r,i)=>o.jsx(axe,{data:n,path:r,pageIndex:i},`page-${n.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(t==null?void 0:t.length)&&t.map((n,r)=>{const i=`${r}`;return o.jsx("div",{children:e(n,i,r)},`exam-page-${r}`)})})})},oxe=t=>{var _,E,D,B,k;const{userSelectedLanguage:e,formBuilderConfigurationType:n,builderTemplateName:r,formBuilderFormSchema:i}=on(),a=[{label:{english:"List main maintenance safety tips? "},componentType:"question",questionText:{french:"Quels sont les principaux conseils de sécurité pour la maintenance?? ",english:"List main maintenance safety tips? "},answerOptions:[],isHidden:!1,uuid:"rtest",options:[],underLined:!1,isAllowMultipleAnswer:!1,resizableColumns:!1,reorderableColumns:!1,timeLimit:0,score:0,subject_id:0,course_category_id:0,TextEditorProps:!1}],{questions:s}=t,[l,c]=N.useState(),[u,d]=N.useState([]),{media:f}=Zt(),h=(_=f==null?void 0:f.image)!=null&&_.MediaImage?(E=f==null?void 0:f.image)==null?void 0:E.MediaImage:o.jsx(o.Fragment,{}),m={assessment_id:"abc123",name:`${n==null?void 0:n.name} - ${r}`,label:"Quiz 1",quizConfiguration:{quizPassMark:75,quizTimeLimit:2,quizMaxAttempts:99,quizSequentialAnswer:0,isAllCorrectMandatory:!0,quizRandomiseQuestions:1,quizUniqueAnswersPerAttempt:"1"},quizElements:(s==null?void 0:s.length)>0?s:a},[g,v]=N.useState(0),[A,S]=N.useState(!1);function x(P,j){return(P==null?void 0:P.length)<=j?P:(P==null?void 0:P.slice(0,j))+"..."}N.useEffect(()=>{S(!0)},[]);const w=()=>{g!==0&&v(g-1)},T=()=>{if(m!=null&&m.quizElements&&g+1!==(m==null?void 0:m.quizElements.length))v(g+1);else if((m==null?void 0:m.quizElements.length)===g+1)return},C=(P,j)=>{let M=[...u];P.checked?M.push(j):M=M.filter(H=>(H==null?void 0:H[e==null?void 0:e.type])!==(j==null?void 0:j[e==null?void 0:e.type])),d(M)};return o.jsxs("div",{className:"scroll-height-200 mb-2",children:[A&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[o.jsxs("h3",{children:[m==null?void 0:m.name," "]}),(D=m==null?void 0:m.quizElements)==null?void 0:D.map((P,j)=>{var M,H,de,fe,ee,G,ae,Y,ge;return(P==null?void 0:P.answerInputType)==="radio"?o.jsxs("div",{className:g===j?"card":" flex align-items-center p-field-radiobutton",children:[((M=P==null?void 0:P.questionTextImage)==null?void 0:M[e==null?void 0:e.type])&&((H=P==null?void 0:P.questionTextImage)==null?void 0:H[e==null?void 0:e.type])!==""&&o.jsx("div",{className:"text-center assessment_image_container",children:o.jsx(h,{mediaId:(de=P==null?void 0:P.questionTextImage)==null?void 0:de[e==null?void 0:e.type],style:{height:"100px",width:"100px",objectFit:"cover",borderRadius:100},className:"text-center",alt:"questionImage"})}),o.jsx("h3",{className:"mb-5",children:g===j&&((fe=P==null?void 0:P.questionText)==null?void 0:fe[e==null?void 0:e.type])}),g===j&&((ee=P==null?void 0:P.answerOptions)==null?void 0:ee.map((ne,J)=>{var K,oe,ve,Ce;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(Ji,{inputId:`${J}-preview`,value:ne==null?void 0:ne.answersText,checked:l===J,onChange:()=>{c(J)}}),((K=ne.answersTextImage)==null?void 0:K[e==null?void 0:e.type])&&((oe=ne.answersTextImage)==null?void 0:oe[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(ve=ne.answersTextImage)==null?void 0:ve[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:`${J}-preview`,children:(Ce=ne.answersText)==null?void 0:Ce[e==null?void 0:e.type]})]},J)}))]},j):(P==null?void 0:P.answerInputType)==="checkbox"?o.jsxs("div",{className:g===j?"card":" flex align-items-center p-field-radiobutton",children:[o.jsx("h3",{className:"mb-5",children:g===j&&((G=P==null?void 0:P.questionText)==null?void 0:G[e==null?void 0:e.type])}),g===j&&((ae=P==null?void 0:P.answerOptions)==null?void 0:ae.map((ne,J)=>{var K,oe,ve,Ce;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(Or,{inputId:J,value:ne==null?void 0:ne.answersText,onChange:Se=>{C(Se,ne==null?void 0:ne.answersText)},checked:u.some(Se=>{var Te;return(Se==null?void 0:Se[e==null?void 0:e.type])===((Te=ne==null?void 0:ne.answersText)==null?void 0:Te[e==null?void 0:e.type])})}),((K=ne.answersTextImage)==null?void 0:K[e==null?void 0:e.type])&&((oe=ne.answersTextImage)==null?void 0:oe[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(ve=ne.answersTextImage)==null?void 0:ve[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:J,children:(Ce=ne.answersText)==null?void 0:Ce[e==null?void 0:e.type]})]},J)}))]},j):o.jsxs("div",{className:g===j?"card":"",children:[o.jsx("h3",{className:"mb-5",children:g===j&&((Y=P==null?void 0:P.questionText)==null?void 0:Y[e==null?void 0:e.type])}),g===j&&((ge=P==null?void 0:P.answerOptions)==null?void 0:ge.map((ne,J)=>{var K,oe,ve,Ce;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(Ji,{inputId:J,value:ne==null?void 0:ne.answersText,onChange:()=>{}}),((K=ne.answersTextImage)==null?void 0:K[e==null?void 0:e.type])&&((oe=ne.answersTextImage)==null?void 0:oe[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(ve=ne.answersTextImage)==null?void 0:ve[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:J,children:(Ce=ne.answersText)==null?void 0:Ce[e==null?void 0:e.type]})]},J)}))]},j)})]})}),o.jsxs("div",{className:"text-center my-5",children:[o.jsxs("div",{className:"mb-1",children:["Viewing:"," ",g+1+"/"+(m==null?void 0:m.quizElements.length)]}),o.jsx("br",{}),g>0&&o.jsx(Pt,{text:!0,className:"mx-2",label:"Previous",onClick:()=>w()}),o.jsx(Pt,{text:!0,label:(m==null?void 0:m.quizElements.length)===g+1?"Finish":"Next",onClick:()=>T()})]})]}),o.jsxs("div",{className:"surface-card p-4 shadow-2 border-round",children:[o.jsx("div",{className:"font-medium text-3xl text-900 mb-3",children:"Summary"}),o.jsx("div",{className:"text-500 mb-5",children:`${n==null?void 0:n.name} - ${r}`}),o.jsxs("ul",{className:"list-none p-0 m-0 border-top-1 surface-border",children:[o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Total Questions:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:(B=m==null?void 0:m.quizElements)==null?void 0:B.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Has Maximum Number of questions:"}),o.jsxs("div",{className:"text-900 w-full md:w-9 line-height-3",children:[i==null?void 0:i.noOfAssessmentQuestions," "]})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Show Answers Randomly"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:i!=null&&i.randomiseAnswers?o.jsx(xc,{className:"mr-2",severity:"success",value:"True"}):o.jsx(xc,{className:"mr-2",severity:"warning",value:"False"})})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Question Time Limit"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:"0.45 seconds"})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Exam Time Limit:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:"2 mins"})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Show Questions Randomly:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:o.jsx("div",{className:"grid mt-0 mr-0",children:(k=m==null?void 0:m.quizElements)==null?void 0:k.map((P,j)=>{var M;return o.jsx("div",{className:"col-12 md:col-6",children:o.jsx("div",{className:"p-3 border-1 surface-border border-round surface-card",children:o.jsx("div",{className:"text-700",children:x(((M=P==null?void 0:P.questionText)==null?void 0:M[e==null?void 0:e.type])||"",30)})})},`preview-question-${j}`)})})})]})]})]})]})},lxe=t=>{var T;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=N.useRef(null),{handleDrop:f}=on(),{isRenderView:h,isAdvanceView:m,isPreview:g}=Zt(),[{isDragging:v},A]=Qi({type:ms,item:{type:ms,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:C=>({isDragging:C.isDragging()})}),x={position:"relative",opacity:v&&!h?.25:1};A(d);const w=(C,_,E,D,B,k,P)=>o.jsx(qc,{page:u,type:"field",row:c,section:l,field:C,data:C,path:_,pageIndex:E,sectionIndex:D,rowIndex:B,columnIndex:k,fieldIndex:P},`component-${n}-${C==null?void 0:C.uuid}`);return o.jsx("div",{style:m?x:{},className:h?"form-builder-column container-column":"draggable form-builder-column container-column",children:g===!1?o.jsxs("div",{children:[e.children.length>0&&((T=e==null?void 0:e.children)==null?void 0:T.map((C,_)=>{const E=`${n}-${_}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:m,fieldDropArea:!0,data:{path:E,childrenCount:e.children.length,droppedField:e},onDrop:f}),w(C,E,r,i,a,s,_)]},E)})),e.children.length===0&&o.jsx("p",{className:"text-center",children:"Drag and drop from sidebar items"}),o.jsx(Tr,{isAdvanceView:m,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:f,isLast:!0})]}):o.jsx(o.Fragment,{children:e.children.length>0?o.jsx(oxe,{questions:e.children}):o.jsx("p",{className:"text-center",children:"No items to show"})})})},cxe={},uxe=t=>{var g,v,A,S;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=N.useRef(null),{isRenderView:u}=Zt(),[{isDragging:d},f]=Qi({type:bo,item:{type:bo,uuid:e.uuid,children:e.children,path:n,data:e},collect:x=>({isDragging:x.isDragging()})}),h=d?.25:1;f(c);const m=(x,w,T,C,_,E)=>o.jsx(lxe,{page:l,row:e,section:s,data:x,path:w,pageIndex:T,sectionIndex:C,rowIndex:_,columnIndex:E},`column-${n}-${x.uuid}`);return o.jsx("div",{style:{...cxe,opacity:h,marginTop:`${(g=e==null?void 0:e.margin)==null?void 0:g.top}px`,marginBottom:`${(v=e==null?void 0:e.margin)==null?void 0:v.bottom}px`,marginLeft:`${(A=e==null?void 0:e.margin)==null?void 0:A.left}px`,marginRight:`${(S=e==null?void 0:e.margin)==null?void 0:S.right}px`},className:u?"row container-row":"draggable row container-row",children:o.jsx("div",{className:"form-builder-columns",children:e.children.map((x,w)=>{const T=`${n}-${w}`;return o.jsx(N.Fragment,{children:m(x,T,r,i,a,w)},T)})})})},dxe=t=>{const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{renderType:l,emitSocketData:c,isAdvanceView:u,isPreview:d}=Zt(),[f,h]=N.useState(!1),[m,g]=N.useState(!1),[v,A]=N.useState(null),S=N.useRef(null),[{isDragging:x},w]=Qi({type:ta,item:{type:ta,uuid:e.uuid,children:e.children,path:n},collect:_=>({isDragging:_.isDragging()})}),T=x?.25:1;w(S);const C=(_,E,D,B,k)=>o.jsx(uxe,{page:s,section:a,data:_,path:E,pageIndex:D,sectionIndex:B,rowIndex:k},`row-${n}-${_.uuid}`);return o.jsxs("div",{style:{opacity:T,marginBottom:20},className:u?"draggable row":"",children:[d===!1&&o.jsx(Dh,{saveBuilderElementModalData:v,setSaveBuilderElementModalData:A,saveElementModal:m,setSaveElementModal:g}),f===!0&&o.jsx(_h,{renderType:l,visibilty:f,setVisibility:h,section:e,pageIndex:r,sectionIndex:i,emitSocketData:c},"section_settings_"+r+i),o.jsx("div",{className:"",children:e.children.map((_,E)=>{const D=`${n}-${E}`;return o.jsx(N.Fragment,{children:C(_,D,r,i,E)},D)})})]})},fxe=t=>{const{data:e,path:n,pageIndex:r}=t,{isRenderView:i}=Zt(),a=N.useRef(null),[{},s]=Qi({type:ta,item:{type:ta,uuid:e.uuid,children:e.children,path:n},collect:c=>({isDragging:c.isDragging()})});s(a);const l=(c,u,d,f)=>o.jsx(dxe,{data:c,section:c,path:u,page:e,pageIndex:d,sectionIndex:f},`section_${d}_${f}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${i?"":"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:o.jsx("div",{className:"",children:e.children.map((c,u)=>{const d=`${n}-${u}`;return o.jsx(N.Fragment,{children:l(c,d,r,u)},`section-${u}-${c.uuid}`)})})})},hxe=()=>{const{formBuilderFormLayout:t}=on(),e=(n,r,i)=>o.jsx(fxe,{data:n,path:r,pageIndex:i},`page-${n.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(t==null?void 0:t.length)&&t.map((n,r)=>{const i=`${r}`;return o.jsx("div",{children:e(n,i,r)},`exam-page-${r}`)})})})},O5=()=>{const{renderType:t}=Zt();switch(t){case F0:return o.jsx(ESe,{});case z1:return o.jsx(kSe,{});case H1:return o.jsx($Se,{});case hm:return o.jsx(ZSe,{});case pm:return o.jsx(sxe,{});case Y1:return o.jsx(hxe,{})}},N5=t=>{const{handleSelectCourseItem:e,icon:n,currentItem:r,field:i,fieldIndex:a,title:s}=t,[l,c]=N.useState(!1),{userTrainingSaveData:u}=mr(),d=h=>{var m,g;if(u!==null&&h){const v=u==null?void 0:u.findIndex(A=>(A==null?void 0:A.fieldId)===(h==null?void 0:h.uuid));return(m=u[v])!=null&&m.isSeen?(g=u[v])==null?void 0:g.isSeen:!1}else return!1},f=()=>{let h=[];if(u!==null){const g=u.findIndex(v=>(v==null?void 0:v.fieldId)===(i==null?void 0:i.uuid));h=u[g].logs}else h=[];return h==null?void 0:h.map((g,v)=>o.jsxs("li",{className:"flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-4",children:[o.jsxs("div",{className:"mr-8 md:mr-8",children:[o.jsxs("span",{className:"inline-block text-900 font-medium mr-2 mb-1 md:mb-0",children:[g==null?void 0:g.action," on ",((g==null?void 0:g.videoTime)/60).toFixed(3)," seconds"]}),o.jsx("span",{className:"text-600",children:_n(g==null?void 0:g.timeState).format("Do, MMMM, YYYY HH:ss")})]}),o.jsxs("div",{className:"mt-2 md:mt-0 ml-0 md:ml-8 flex align-items-center",children:[o.jsx("div",{className:"surface-300 border-round overflow-hidden",style:{height:"8px",width:"200px"},children:o.jsx("div",{className:(g==null?void 0:g.action)==="Play"?"bg-green-500 h-full":"bg-orange-500 h-full",style:{width:`${Math.floor((g==null?void 0:g.videoTime)/(g==null?void 0:g.totalTime)*100)}%`}})}),o.jsxs("span",{className:"text-orange-500 ml-3 font-medium",children:[Math.floor((g==null?void 0:g.videoTime)/(g==null?void 0:g.totalTime)*100),"%"]})]})]},`logs_${v}`))};return o.jsxs("ul",{className:"list-none p-0 m-0 cursor-pointer",onClick:()=>{e(i)},children:[o.jsxs("li",{className:" flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-3",style:{borderRadius:"10px"},children:[o.jsx("div",{children:o.jsxs("div",{children:[d(i)?o.jsx(Pt,{text:!0,icon:"pi pi-check",className:"p-button-rounded p-button-primary mr-2 p-button-outlined","aria-label":"Search"}):o.jsx(Pt,{text:!0,icon:"pi pi-dot",className:"p-button-rounded p-button-secondary mr-2 p-button-outlined","aria-label":"Search"}),(i==null?void 0:i.uuid)===(r==null?void 0:r.uuid)?o.jsxs("span",{children:[o.jsx(Pt,{text:!0,icon:n,className:"p-button-rounded p-button-primary mr-2 inline-flex justify-content-center align-items-center w-2rem h-2rem","aria-label":"Search"}),o.jsxs("span",{className:"inline-flex justify-content-center align-items-center h-2rem",style:{color:"#0f8bfd"},children:[a+1," - ",s]})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"inline-flex justify-content-center align-items-center w-2rem h-2rem border-circle border-1",children:o.jsx("i",{className:n})}),o.jsxs("span",{className:"font-medium text-500 ml-2 hoverSelect",children:[a+1," - ",s]})]})]})}),o.jsxs("div",{className:"flex align-items-center justify-content-between md:justify-content-end mt-3 md:mt-0",children:[o.jsx("div",{className:"text-right mr-3",children:o.jsxs("span",{className:" font-bold",children:[" ",i==null?void 0:i.videoDuration]})}),o.jsx(Pt,{text:!0,onClick:()=>c(!l),icon:"pi pi-eye",className:"p-button-rounded p-button-secondary mr-2 ","aria-label":"Search"})]})]}),l&&o.jsxs("div",{className:"surface-card shadow-2 border-round p-4",children:[o.jsx("div",{className:"flex justify-content-between align-items-center mb-5",children:o.jsx("span",{className:"text-xl text-900 font-medium",children:"Logs"})}),o.jsx("ul",{className:"list-none p-0 m-0",children:f()})]})]},`ul-list-${a}`)},pxe=t=>{var w,T,C,_,E,D;const{field:e,fieldIndex:n,currentItem:r,setCurrentItem:i,setCurrentSection:a,setvideoJsOptions:s,section:l,setImage:c,setDocuments:u}=t,{taskOptions:d,userTrainingSaveData:f,updateUserTraining:h}=mr(),m=(w=d==null?void 0:d.training)!=null&&w.getAssessmentSelectedQuiz?(T=d==null?void 0:d.training)==null?void 0:T.getAssessmentSelectedQuiz:()=>{},g=B=>{if(f!==null){const k=[...f],P=k.findIndex(j=>(j==null?void 0:j.fieldId)===(B==null?void 0:B.uuid));P>=0&&(k[P]={...k[P],isSeen:!0}),h([...k])}},v=B=>{var k;i(B),a(l),s({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:(k=B==null?void 0:B.media_url)==null?void 0:k.english}]})},A=B=>{var k;g(B),i(B),c((k=B==null?void 0:B.media_url)==null?void 0:k.english),a(l)},S=B=>{g(B),i(B),u(B==null?void 0:B.documents),a(l)},x=B=>{var k,P;(k=B==null?void 0:B.quizSchema)!=null&&k.assessment_id&&(m((P=B==null?void 0:B.quizSchema)==null?void 0:P.assessment_id),a(l),i(B))};switch(e==null?void 0:e.componentType){case"video":return o.jsx(N5,{title:(C=e==null?void 0:e.title)==null?void 0:C.english,type:"video",icon:"pi pi-video",handleSelectCourseItem:v,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"image":return o.jsx(N5,{title:(_=e==null?void 0:e.title)==null?void 0:_.english,type:"image",icon:"pi pi-image",handleSelectCourseItem:A,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"document":return o.jsx(N5,{title:(E=e==null?void 0:e.title)==null?void 0:E.english,type:"document",icon:"pi pi-image",handleSelectCourseItem:S,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"quiz":return o.jsx(N5,{title:(D=e==null?void 0:e.quizSchema)==null?void 0:D.assessment_title,type:"quiz",icon:"pi pi-image",handleSelectCourseItem:x,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);default:return o.jsx(o.Fragment,{})}},gxe=t=>{const{fields:e,setImage:n,setvideoJsOptions:r,setDocuments:i,setQuizSchema:a,setCurrentItem:s,currentItem:l,setCurrentSection:c,section:u,updateTrainingProgress:d}=t;return o.jsx(o.Fragment,{children:o.jsx("div",{className:"surface-card border-round p-4 ",children:e==null?void 0:e.map((f,h)=>o.jsxs("div",{children:[o.jsx(pxe,{field:f,fieldIndex:h,currentItem:l,setCurrentItem:s,setCurrentSection:c,setvideoJsOptions:r,section:u,setImage:n,setDocuments:i,setQuizSchema:a,updateTrainingProgress:d},`${h}-list-sidebar`)," ",o.jsx("hr",{})," "]},`sidebar-item-card-${h}`))})})},mxe=t=>{var g,v,A,S,x,w,T,C,_,E;const{setSelectedOption:e,quiz:n,userSelectedLanguage:r,onSetAnswer:i,setIsOptionSelected:a,index:s,eleIndex:l,ele:c,setCorrectAnswerCheck:u,correctAnswerCheck:d,selectedOption:f}=t,{media:h}=Zt(),m=(g=h==null?void 0:h.image)!=null&&g.MediaImage?(v=h==null?void 0:h.image)==null?void 0:v.MediaImage:o.jsx(o.Fragment,{});return o.jsxs("div",{onClick:D=>{e(B=>{var k;return(k=n==null?void 0:n.answersText)==null?void 0:k[r==null?void 0:r.type]}),i(D,s,l,n,c),a(!0),u({isCorrect:null,text:null})},className:"field-radiobutton card",style:(d==null?void 0:d.text)===((A=n.answersText)==null?void 0:A[r==null?void 0:r.type])?(d==null?void 0:d.isCorrect)===!0?{borderColor:"green",borderWidth:1,borderStyle:"solid",position:"relative"}:{borderColor:"red",borderWidth:1,borderStyle:"solid",position:"relative"}:((S=n.answersText)==null?void 0:S[r==null?void 0:r.type])===f?{backgroundColor:"#0F8BFD",color:"#fff"}:{},children:[o.jsx(Ji,{inputId:s,value:n.answersText,checked:((x=n.answersText)==null?void 0:x[r==null?void 0:r.type])===f,onChange:D=>{u({isCorrect:null,text:null}),e(B=>{var k;return(k=D.target.value)==null?void 0:k[r==null?void 0:r.type]}),i(D,s,l,n,c),a(!0)}}),((w=n.answersTextImage)==null?void 0:w[r==null?void 0:r.type])&&((T=n.answersTextImage)==null?void 0:T[r==null?void 0:r.type])!==""&&o.jsx(m,{mediaId:(C=n.answersTextImage)==null?void 0:C[r==null?void 0:r.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:s,children:(_=n.answersText)==null?void 0:_[r==null?void 0:r.type]}),o.jsx("span",{style:{position:"absolute",right:10},children:(d==null?void 0:d.text)===((E=n.answersText)==null?void 0:E[r==null?void 0:r.type])?(d==null?void 0:d.isCorrect)===!0?o.jsxs("span",{style:{color:"green"},children:[" ","Correct Answer"]}):o.jsxs("span",{style:{color:"red"},children:[" ","Wrong Answer"]}):""})]},s)},vxe=t=>{var m,g,v,A,S,x,w;const{media:e}=Zt(),n=(m=e==null?void 0:e.image)!=null&&m.MediaImage?(g=e==null?void 0:e.image)==null?void 0:g.MediaImage:o.jsx(o.Fragment,{}),{setSelectedOption:r,quiz:i,userSelectedLanguage:a,setIsOptionSelected:s,index:l,ele:c,setCorrectAnswerCheck:u,correctAnswerCheck:d,selectedOption:f,onChangeCheckbox:h}=t;return N.useEffect(()=>(Array.isArray(f)||r([]),()=>{}),[]),o.jsx(o.Fragment,{children:Array.isArray(f)&&o.jsxs("div",{onClick:()=>{var T;h(!(f!=null&&f.some(C=>{var _;return C===((_=i.answersText)==null?void 0:_[a==null?void 0:a.type])})),(T=i==null?void 0:i.answersText)==null?void 0:T[a==null?void 0:a.type]),s(!0),u({isCorrect:null,text:null})},className:"field-radiobutton card",style:d!=null&&d.length&&(d!=null&&d.some(T=>{var C;return(T==null?void 0:T.text)===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])}))?d!=null&&d.some(T=>{var C;return(T==null?void 0:T.text)===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])&&(T==null?void 0:T.isCorrect)===!0})?{borderColor:"green",borderWidth:1,borderStyle:"solid",position:"relative"}:{borderColor:"red",borderWidth:1,borderStyle:"solid",position:"relative"}:((v=i.answersText)==null?void 0:v[a==null?void 0:a.type])===f?{backgroundColor:"#0F8BFD"}:{},children:[o.jsx(Or,{inputId:l,value:i.answersText,checked:f==null?void 0:f.some(T=>{var C;return T===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])}),onChange:T=>{var C;h(T.checked,(C=T.target.value)==null?void 0:C[a==null?void 0:a.type],i,c),s(!0)}}),((A=i.answersTextImage)==null?void 0:A[a==null?void 0:a.type])&&((S=i.answersTextImage)==null?void 0:S[a==null?void 0:a.type])!==""&&o.jsx(n,{mediaId:(x=i.answersTextImage)==null?void 0:x[a==null?void 0:a.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:l,children:(w=i.answersText)==null?void 0:w[a==null?void 0:a.type]}),o.jsx("span",{style:{position:"absolute",right:10},children:d!=null&&d.length&&(d!=null&&d.some(T=>{var C;return(T==null?void 0:T.text)===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])}))?d!=null&&d.some(T=>{var C;return(T==null?void 0:T.text)===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])&&(T==null?void 0:T.isCorrect)===!0})?o.jsx("span",{style:{color:"green"},children:" Correct Answer"}):o.jsx("span",{style:{color:"red"},children:" Wrong Answer"}):""})]},l)})};function rj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ij(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function aj(t,e,n){return e&&ij(t.prototype,e),n&&ij(t,n),t}function sj(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ES(t,e)}function F5(t){return F5=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},F5(t)}function ES(t,e){return ES=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},ES(t,e)}function bxe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function yxe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Axe(t,e){return e&&(typeof e=="object"||typeof e=="function")?e:yxe(t)}function oj(t){var e=bxe();return function(){var r=F5(t),i;if(e){var a=F5(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return Axe(this,i)}}function wxe(t){return Sxe(t)||xxe(t)||Cxe(t)||Txe()}function Sxe(t){if(Array.isArray(t))return IS(t)}function xxe(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function Cxe(t,e){if(t){if(typeof t=="string")return IS(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IS(t,e)}}function IS(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Txe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4162
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pwe(t,e){if(t){if(typeof t=="string")return W$(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return W$(t,e)}}function W$(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function kwe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,l=[],c=!0,u=!1;try{if(a=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return l}}function Mwe(t){if(Array.isArray(t))return t}function Lwe(t,e){if(t==null)return{};var n=Bwe(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Bwe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function I5(t,e){var n=t.Component,r=t.country,i=t.defaultCountry,a=t.useNationalFormatForDefaultCountryValue,s=a===void 0?!0:a,l=t.value,c=t.onChange,u=t.metadata,d=t.international,f=t.withCountryCallingCode,h=Lwe(t,Owe),m=_we({value:l,onChange:c,country:r,defaultCountry:i,international:d,withCountryCallingCode:f,useNationalFormatForDefaultCountryValue:s,metadata:u}),g=Nwe(m,2),v=g[0],A=g[1];return N.createElement(n,CS({},h,{ref:e,metadata:u,international:d,withCountryCallingCode:f,country:r||i,value:v,onChange:A}))}I5=N.forwardRef(I5),I5.propTypes={value:vn.string,onChange:vn.func.isRequired,country:vn.string,defaultCountry:vn.string,international:vn.bool,withCountryCallingCode:vn.bool,Component:vn.elementType.isRequired,useNationalFormatForDefaultCountryValue:vn.bool,metadata:xwe};const Vwe=I5;var Uwe=["type","autoComplete","smartCaret","metadata"];function TS(){return TS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},TS.apply(this,arguments)}function qwe(t,e){if(t==null)return{};var n=$we(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function $we(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Q$(t){function e(n,r){var i=n.type,a=i===void 0?"tel":i,s=n.autoComplete,l=s===void 0?"tel":s,c=n.smartCaret,u=c===void 0?!0:c,d=n.metadata,f=d===void 0?t:d,h=qwe(n,Uwe);return N.createElement(Vwe,TS({},h,{type:a,autoComplete:l,metadata:f,ref:r,Component:u?vwe:Swe}))}return e=N.forwardRef(e),e.propTypes={type:vn.string,autoComplete:vn.string,smartCaret:vn.bool,metadata:vn.object},e}Q$();const jwe=Q$(Lbe),zwe=t=>{var K,oe,ve,Ce,Se,Te,De,ie,U,re,Q;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a,TASK_PUBLISHED:s,task_status:l}=mr(),{userSelectedLanguage:c,fieldSettingUpdate:u}=on(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:m,row:g,rowIndex:v,columnIndex:A,isDisabled:S}=t,{isAdmin:x,isRenderView:w,isPreview:T}=Zt(),[C,_]=N.useState(!1),[E,D]=N.useState(""),[B,k]=N.useState(0),[P,j]=N.useState(!1),[M,H]=N.useState(!1),de=()=>{H(!0)},fe=()=>{H(!1)},ee=()=>{var se,be,me;if(g!=null&&g.rowIsRepeatable){if(g!=null&&g.repeatableFields){const ye=[...g.repeatableFields],Ie=_t.findIndex(ye,function(Ee){return Ee.uuid===(d==null?void 0:d.uuid)});Ie>=0&&ye[Ie].fieldData?D(ye[Ie].fieldData):D("")}}else{const ye=a;if(ye!=null&&ye.length){for(const Ie of ye)if(Ie.fieldId===t.field.uuid&&((se=Ie==null?void 0:Ie.postData[0])==null?void 0:se.postValue)!==""&&((be=Ie==null?void 0:Ie.postData[0])!=null&&be.postValue)){D((me=Ie==null?void 0:Ie.postData[0])==null?void 0:me.postValue);break}}}j(!0)};N.useEffect(()=>{P||ee();const se=Xt.addListener("clearRepeatableFields",Ie=>{Ie===(g==null?void 0:g.uuid)&&(D(""),k(0),d.isValid=0,u(m,h,v,A,f,d))}),be=Xt.addListener("onSubmitUserForm",()=>{var Ie;(Ie=d==null?void 0:d.attributes)!=null&&Ie.required?E?d.isValid=1:d.isValid=0:d.isValid=1}),me=Xt.addListener("OnInvalidFieldCatch",Ie=>{d.uuid===(Ie==null?void 0:Ie.fieldId)?k(1):k(0)}),ye=Xt.addListener("OnGetFieldValue",Ie=>{var he;const Ee=(he=Ie==null?void 0:Ie.repeatableColumn)==null?void 0:he.filter(V=>(V==null?void 0:V.fieldUuid)===(d==null?void 0:d.uuid));Ee!=null&&Ee.length});return()=>{be.remove(),me.remove(),ye.remove(),se.remove()}});const G=se=>{_(se)},ae=()=>{_(!1)},Y=(se,be)=>{const me=a,ye=_t.cloneDeep(e);if(be){if(ye[d==null?void 0:d.uuid]=se,(me==null?void 0:me.length)>0)for(const Ie of me)Ie.fieldId===t.field.uuid&&(Ie.postData[0]={postValue:se})}else if(delete ye[d==null?void 0:d.uuid],(me==null?void 0:me.length)>0)for(const Ie of me)Ie.fieldId===t.field.uuid&&(Ie.postData[0]={postValue:se});if(!(g!=null&&g.rowIsRepeatable)){n(ye);const Ie=Object.keys(ye).length;r(Ie)}},ge=(se,be)=>{var me;if(a){const ye=[...a],Ie=_t.findIndex(ye,function(he){return he.rowId===(g==null?void 0:g.uuid)});let Ee=(me=a[Ie])==null?void 0:me.repeatableFields;Ee={...Ee,[se==null?void 0:se.uuid]:be},ye[Ie]={...ye[Ie],repeatableFields:Ee},i(ye)}D(be),be!==""?se.isValid=1:se.isValid=0},ne=se=>{g!=null&&g.rowIsRepeatable?ge(d,se):Y(se,!0)},J=o.jsxs("div",{onMouseOver:de,onMouseOut:fe,children:[!w&&!T&&M&&o.jsx(jr,{handleFieldSettingsSidebar:G,...t}),o.jsxs("div",{className:`field ${T?" ":" builder-element-wrapper "}${(d==null?void 0:d.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:T?"col-12 ":"col-12 p-fluid",children:[(d==null?void 0:d.showHeaderText)&&o.jsx("h6",{children:(K=d==null?void 0:d.headerText)==null?void 0:K[c==null?void 0:c.type]}),(d==null?void 0:d.showLabel)&&o.jsxs("label",{htmlFor:f,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((oe=d==null?void 0:d.attributes)==null?void 0:oe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",T?o.jsx(o.Fragment,{children:(ve=d==null?void 0:d.label)==null?void 0:ve[c==null?void 0:c.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(d==null?void 0:d.showToolTip)&&o.jsx(Mi,{message:(Ce=d==null?void 0:d.toolTip)==null?void 0:Ce[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(d==null?void 0:d.iconAlignment),children:[(d==null?void 0:d.showIcon)&&o.jsx("i",{className:"pi pi-"+((Te=(Se=d==null?void 0:d.icon)==null?void 0:Se.properties)==null?void 0:Te.name)}),o.jsx(jwe,{id:d==null?void 0:d.uuid,placeholder:(De=d==null?void 0:d.placeholder)==null?void 0:De[c==null?void 0:c.type],value:E,onFocus:()=>k(1),onChange:ne,international:!0,className:`${B===1&&((ie=d==null?void 0:d.attributes)!=null&&ie.required)?E?"valid":"invalid":"valid'"} p-inputtext`,readOnly:S})]}),o.jsx("div",{children:((U=d==null?void 0:d.attributes)==null?void 0:U.required)&&o.jsx("small",{className:"error",children:B===1&&!E?(re=d==null?void 0:d.validationMesssage)==null?void 0:re.english:""})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(Q=d==null?void 0:d.helperText)==null?void 0:Q[c==null?void 0:c.type]})})]})]})}),x&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[C===!0&&o.jsx(Xi,{visibilty:C,closeSettingFieldSidebar:ae,...t}),o.jsx(wi,{...t,fieldWrap:J})]})},Hwe=t=>{var Y,ge,ne,J,K,oe,ve,Ce,Se,Te,De;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,row:a,isDisabled:s}=t,{isPreview:l,isAdmin:c,isRenderView:u}=Zt(),{task_status:d,taskRegisterData:f,updateTaskRegisterData:h,updateTaskProgressValue:m,updateUserFormDataSubmit:g,userTaskSubmitFormData:v,TASK_PUBLISHED:A}=mr(),{userSelectedLanguage:S}=on(),[x,w]=N.useState(!1),[T,C]=N.useState(""),[_,E]=N.useState(0),[D,B]=N.useState(!1),k=()=>{B(!0)},P=()=>{B(!1)};N.useEffect(()=>{x||fe();const ie=Xt.addListener("clearRepeatableFields",re=>{re===(a==null?void 0:a.uuid)&&(C(""),E(0),e.isValid=0)}),U=Xt.addListener("onSubmitUserForm",()=>{var re;(re=e==null?void 0:e.attributes)!=null&&re.required?T!==""&&lu.test(T)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{U.remove(),ie.remove()}});const[j,M]=N.useState(!1),H=ie=>{M(ie)},de=()=>{M(!1)},fe=()=>{var ie,U,re;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const Q=[...a.repeatableFields],se=_t.findIndex(Q,function(be){return be.uuid===(e==null?void 0:e.uuid)});se>=0&&Q[se].fieldData?C(Q[se].fieldData):C("")}}else{const Q=v;if(Q!=null&&Q.length){for(const se of Q)if(se.fieldId===t.field.uuid&&((ie=se==null?void 0:se.postData[0])==null?void 0:ie.postValue)!==""&&((U=se==null?void 0:se.postData[0])!=null&&U.postValue)){C((re=se==null?void 0:se.postData[0])==null?void 0:re.postValue),w(!0);break}}}w(!0)},ee=ie=>{C(ie);const U=v,re=_t.cloneDeep(f);if(ie!==""&&lu.test(ie)===!0){if(re[e==null?void 0:e.uuid]=ie,(U==null?void 0:U.length)>0)for(const Q of U)Q.fieldId===t.field.uuid&&(Q.postData[0]={postValue:ie})}else if(delete re[e==null?void 0:e.uuid],(U==null?void 0:U.length)>0)for(const Q of U)Q.fieldId===t.field.uuid&&(Q.postData[0]={postValue:""});if(!(a!=null&&a.rowIsRepeatable)){h(re);const Q=Object.keys(re).length;m(Q)}},G=(ie,U)=>{var ye;const re=[...v],Q=_t.findIndex(re,function(Ie){return Ie.rowId===(a==null?void 0:a.uuid)});let se=(ye=v[Q])==null?void 0:ye.repeatableFields;const be=ie,me=be==null?void 0:be.uuid;se={...se,[me]:U},re[Q]={...re[Q],repeatableFields:se},g(re),C(U),U!==""&&lu.test(U)===!0?e.isValid=1:e.isValid=0},ae=o.jsxs("div",{onMouseOver:k,onMouseOut:P,children:[!u&&!l&&D&&o.jsx(jr,{handleFieldSettingsSidebar:H,...t}),o.jsxs("div",{className:`field ${l?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid"}),(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(Y=e==null?void 0:e.headerText)==null?void 0:Y[S==null?void 0:S.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((ge=e==null?void 0:e.attributes)==null?void 0:ge.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",l?o.jsx(o.Fragment,{children:(ne=e==null?void 0:e.label)==null?void 0:ne[S==null?void 0:S.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(J=e==null?void 0:e.toolTip)==null?void 0:J[S==null?void 0:S.type],position:"right"})})]}),o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((oe=(K=e==null?void 0:e.icon)==null?void 0:K.properties)==null?void 0:oe.name)}),o.jsx(gn,{id:e==null?void 0:e.uuid,placeholder:(ve=e==null?void 0:e.placeholder)==null?void 0:ve[S==null?void 0:S.type],value:T,onFocus:()=>E(1),onChange:ie=>{a!=null&&a.rowIsRepeatable?G(r,i):ee(ie.target.value)},className:_===1&&((Ce=e==null?void 0:e.attributes)!=null&&Ce.required)?T?"valid":"invalid":"valid'",readOnly:s})]}),((Se=e==null?void 0:e.attributes)==null?void 0:Se.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:_===1&&!T?(Te=e==null?void 0:e.validationMesssage)==null?void 0:Te[S==null?void 0:S.type]:""})}),T!==""&&_===1&&lu.test(T)===!1&&o.jsx("small",{className:"error",children:"Please enter correct url"}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(De=e==null?void 0:e.helperText)==null?void 0:De[S==null?void 0:S.type]})})]}),c&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]});return o.jsxs(o.Fragment,{children:[j===!0&&o.jsx(Xi,{visibilty:j,closeSettingFieldSidebar:de,...t},e==null?void 0:e.uuid),o.jsx(wi,{...t,fieldWrap:ae})]})},Ywe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAwAAAAMACAYAAACTgQCOAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAACAAElEQVR42u3deXxcdb3/8ffnTLaWthSUVVuaTMIWKc2cpLWi/oqIeK+4XisuoKDodUNx38H9Ku67IhdwB6NeF1xBqQrWNjOTUgxbM0kLyKp0b7PMnM/vj1ZFtiazZc7M6/l4+LhXxTZ5nzPnfN9zvt/vMQEAakI6DJv3j6L5gft8NTfPN/f5cp8fuR+gIJhv7vNdag7M5sm91aXZkvaTe4uk/c2sSdL+kuRSQtK8h/hr5khqfsB/Nilpx0P8s9tMKuz9/7e6e17SVplNSNpp0i6ZjUfu20yadLMtiqItgdlmmW1xsy2anNwSmW3ZGgRbejOZSY4yAMw8IwIAqAxfuTKxcePGg6IoOsjMDlUUHeJBcJBJh8n9YHc/2MwOdelgSfMl7VfnkeyUtMWke1y606R73f1uBcFdFkX3Kgjudve7giC4d9GiRfdaf3+BswgAKAAAUDM2HXfcARNtbYcH0mFeKHRYEBxu0mEeRR1m1uHSQklNJFW0zZJGJI2YdKdLd5g04tKdhSC4o2tgYKNJETEBAAUAAMoiHYbN892PkNQZSEkPgk65d7qUNKldUhspzagxl0bNbFhRNGxSzqThgpTbYraJKUcAQAEAgIc0vHjxwWpu7jbpGEndkjolJSUdIb7Bj6u8pE0uDZvZsNyHXLrJo+gvXYOD9xIPAAoAADSATccdd0C+paXb3Y8NzLrd/ViZdUs6jHQaymZJI+5+g5kNmfsN+URiqGtgYNQkJx4AFAAAiKFbe3oOz5uFHgSh3ENJvZIOJRk8gi2ShkzKRGYZN8t0DgzcyDoDABQAAKghvnJlYmRk5Fh3DwOzHpd6J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NJNDLKY7wPtHl3iW8Al0eIXPfp8SRWXhnk98AfAO3p0iVsZZfXU2Sj1mQUgozTC4cAPSRzQxY99kOB3osk1XfxMSTWWhjmHySJweBc/9iGCVb4GOB+3ADKKJr8isRa6chveGME6tnCck7+kbooW15M4AbgSunKA+CESb3Pyz8sVgAJIP+YQxvkz4PRZfsRNwGejxb90MZYkvUIa5njgi8DaWX7EdxjgQz5/JD8LQEFMvbnrIyR+l+kvs/0UuDxa/GUPo0nSK6Rh3kPiKoKl0/wt9xD8O1bwxxF0ehpO02IBKJipw4HvBN4NrAZez4tvDxwD/pnE90n8T9p8128kSbmkRINh3gScT3AqcAIwb+qXJ4C7gO8Df8kG/tqH/RSLBaDg0nUMcByLATiJzU74kooqJRr8hL0B+BmjTviSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJKnG/n/K52f+BC6LdAAAAABJRU5ErkJggg==",Gwe=t=>{var ae,Y,ge,ne,J,K,oe,ve,Ce;const{field:e,pageIndex:n,sectionIndex:r,row:i,isDisabled:a}=t,{isAdmin:s,isPreview:l,isRenderView:c}=Zt(),{task_status:u,taskRegisterData:d,updateTaskRegisterData:f,updateTaskProgressValue:h,updateUserFormDataSubmit:m,userTaskSubmitFormData:g,TASK_PUBLISHED:v}=mr(),{userSelectedLanguage:A}=on(),[S,x]=N.useState(!1),[w,T]=N.useState(""),[C,_]=N.useState(0),[E,D]=N.useState(!1),B=()=>{D(!0)},k=()=>{D(!1)};N.useEffect(()=>{S||de();const Se=Xt.addListener("clearRepeatableFields",De=>{De===(i==null?void 0:i.uuid)&&(T(""),_(0),e.isValid=0)}),Te=Xt.addListener("onSubmitUserForm",()=>{var De;(De=e==null?void 0:e.attributes)!=null&&De.required?w!==""&&lu.test(w)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{Te.remove(),Se.remove()}});const[P,j]=N.useState(!1),M=Se=>{j(Se)},H=()=>{j(!1)},de=()=>{var Se,Te,De;if(i!=null&&i.rowIsRepeatable){const ie=[...(i==null?void 0:i.repeatableFields)||[]],U=_t.findIndex(ie,function(re){return re.uuid===(e==null?void 0:e.uuid)});U>=0&&ie[U].fieldData?T(ie[U].fieldData):T("")}else{const ie=g;if(ie!=null&&ie.length){for(const U of ie)if(U.fieldId===t.field.uuid&&((Se=U==null?void 0:U.postData[0])==null?void 0:Se.postValue)!==""&&((Te=U==null?void 0:U.postData[0])!=null&&Te.postValue)){T((De=U==null?void 0:U.postData[0])==null?void 0:De.postValue),x(!0);break}}}x(!0)},fe=(Se,Te)=>{T(Te);const De=g,ie=_t.cloneDeep(d);if(De!==null){if(Te){if(ie[e==null?void 0:e.uuid]=Te,(De==null?void 0:De.length)>0)for(const U of De)U.fieldId===t.field.uuid&&(U.postData[0]={postValue:Te})}else if(delete ie[e==null?void 0:e.uuid],(De==null?void 0:De.length)>0)for(const U of De)U.fieldId===t.field.uuid&&(U.postData[0]={postValue:""})}if(!(i!=null&&i.rowIsRepeatable)){f(ie);const U=Object.keys(ie).length;h(U)}},ee=(Se,Te,De,ie)=>{var se;const U=[...g],re=_t.findIndex(U,function(be){return be.rowId===(i==null?void 0:i.uuid)});let Q=(se=g[re])==null?void 0:se.repeatableFields;Q={...Q,[De==null?void 0:De.uuid]:ie},U[re]={...U[re],repeatableFields:Q},m(U),T(ie),ie!==""&&lu.test(ie)===!0?e.isValid=1:e.isValid=0},G=o.jsxs("div",{onMouseOver:B,onMouseOut:k,children:[!c&&!l&&E&&o.jsx(jr,{handleFieldSettingsSidebar:M,...t}),o.jsxs("div",{className:`field ${l?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:s?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(ae=e==null?void 0:e.headerText)==null?void 0:ae[A==null?void 0:A.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((Y=e==null?void 0:e.attributes)==null?void 0:Y.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",l?o.jsx(o.Fragment,{children:(ge=e==null?void 0:e.label)==null?void 0:ge[A==null?void 0:A.type]}):o.jsx(Zi,{...t}),(e==null?void 0:e.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(Mi,{message:(ne=e==null?void 0:e.toolTip)==null?void 0:ne[A==null?void 0:A.type],position:"right"})})]}),o.jsx("div",{children:o.jsx(N6,{cancelIcon:o.jsx("img",{src:Ywe,alt:"custom-cancel-image",width:"25px",height:"25px"}),offIcon:o.jsx("img",{src:Kwe,alt:"custom-image-active",width:"25px",height:"25px"}),onIcon:o.jsx("img",{src:Xwe,alt:"custom-image",width:"25px",height:"25px"}),id:e==null?void 0:e.uuid,placeholder:(J=e==null?void 0:e.placeholder)==null?void 0:J[A==null?void 0:A.type],value:w,onFocus:()=>_(1),onChange:Se=>{i!=null&&i.rowIsRepeatable?ee(n,r,e,Se.value):fe(Se,Se.value)},className:C===1&&((K=e==null?void 0:e.attributes)!=null&&K.required)?w?"valid":"invalid":"valid'",readOnly:a})}),((oe=e==null?void 0:e.attributes)==null?void 0:oe.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:C===1&&!w?(ve=e==null?void 0:e.validationMesssage)==null?void 0:ve[A==null?void 0:A.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(Ce=e==null?void 0:e.helperText)==null?void 0:Ce[A==null?void 0:A.type]})})]})}),s&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[P===!0&&o.jsx(Xi,{visibilty:P,closeSettingFieldSidebar:H,...t},e==null?void 0:e.uuid),o.jsx(wi,{...t,fieldWrap:G})]})},Rwe=t=>{var ae,Y,ge,ne,J,K,oe,ve,Ce;const{field:e,pageIndex:n,sectionIndex:r,row:i,isDisabled:a}=t,{isPreview:s,isAdmin:l,isRenderView:c}=Zt(),{task_status:u,taskRegisterData:d,updateTaskRegisterData:f,updateTaskProgressValue:h,updateUserFormDataSubmit:m,userTaskSubmitFormData:g,TASK_PUBLISHED:v}=mr(),{userSelectedLanguage:A}=on(),[S,x]=N.useState(!1),[w,T]=N.useState(""),[C,_]=N.useState(0),[E,D]=N.useState(!1),B=()=>{D(!0)},k=()=>{D(!1)};N.useEffect(()=>{S||de();const Se=Xt.addListener("clearRepeatableFields",De=>{De===(i==null?void 0:i.uuid)&&(T(""),_(0),e.isValid=0)}),Te=Xt.addListener("onSubmitUserForm",()=>{var De;(De=e==null?void 0:e.attributes)!=null&&De.required?w!==""&&lu.test(w)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{Te.remove(),Se.remove()}});const[P,j]=N.useState(!1),M=Se=>{j(Se)},H=()=>{j(!1)},de=()=>{var Se,Te,De;if(i!=null&&i.rowIsRepeatable){if(i!=null&&i.repeatableFields){const ie=[...i.repeatableFields],U=_t.findIndex(ie,function(re){return re.uuid===(e==null?void 0:e.uuid)});U>=0&&ie[U].fieldData?T(ie[U].fieldData):T("")}}else{const ie=g;if(ie!=null&&ie.length){for(const U of ie)if(U.fieldId===t.field.uuid&&((Se=U==null?void 0:U.postData[0])==null?void 0:Se.postValue)!==""&&((Te=U==null?void 0:U.postData[0])!=null&&Te.postValue)){T((De=U==null?void 0:U.postData[0])==null?void 0:De.postValue),x(!0);break}}}x(!0)},fe=(Se,Te)=>{T(Te);const De=g,ie=_t.cloneDeep(d);if(De!==null){if(Te){if(ie[e==null?void 0:e.uuid]=Te,(De==null?void 0:De.length)>0)for(const U of De)U.fieldId===t.field.uuid&&(U.postData[0]={postValue:Te})}else if(delete ie[e==null?void 0:e.uuid],(De==null?void 0:De.length)>0)for(const U of De)U.fieldId===t.field.uuid&&(U.postData[0]={postValue:""})}if(!(i!=null&&i.rowIsRepeatable)){f(ie);const U=Object.keys(ie).length;h(U)}},ee=(Se,Te,De,ie)=>{var se;const U=[...g],re=_t.findIndex(U,function(be){return be.rowId===(i==null?void 0:i.uuid)});let Q=(se=g[re])==null?void 0:se.repeatableFields;Q={...Q,[De==null?void 0:De.uuid]:ie},U[re]={...U[re],repeatableFields:Q},m(U),T(ie),ie!==""&&lu.test(ie)===!0?e.isValid=1:e.isValid=0},G=o.jsxs("div",{onMouseOver:B,onMouseOut:k,children:[!c&&!s&&E&&o.jsx(jr,{handleFieldSettingsSidebar:M,...t}),o.jsx("div",{className:`field ${s?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:s?"col-12 p-fluid":"col-12 p-fluid field-form-builder",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(ae=e==null?void 0:e.headerText)==null?void 0:ae[A==null?void 0:A.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((Y=e==null?void 0:e.attributes)==null?void 0:Y.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",s?o.jsx(o.Fragment,{children:(ge=e==null?void 0:e.label)==null?void 0:ge[A==null?void 0:A.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(ne=e==null?void 0:e.toolTip)==null?void 0:ne[A==null?void 0:A.type],position:"right"})})]}),o.jsx(k6,{id:e==null?void 0:e.uuid,placeholder:(J=e==null?void 0:e.placeholder)==null?void 0:J[A==null?void 0:A.type],value:w,onFocus:()=>_(1),onChange:Se=>{i!=null&&i.rowIsRepeatable?ee(n,r,e,Se.value):fe(Se,Se.value)},className:C===1&&((K=e==null?void 0:e.attributes)!=null&&K.required)?w?"valid":"invalid":"valid'",readOnly:a}),((oe=e==null?void 0:e.attributes)==null?void 0:oe.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:C===1&&!w?(ve=e==null?void 0:e.validationMesssage)==null?void 0:ve[A==null?void 0:A.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(Ce=e==null?void 0:e.helperText)==null?void 0:Ce[A==null?void 0:A.type]})})]}),l&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[P===!0&&o.jsx(Xi,{visibilty:P,closeSettingFieldSidebar:H,...t},e==null?void 0:e.uuid),o.jsx(wi,{...t,fieldWrap:G})]})},Wwe=t=>{var G,ae,Y,ge,ne,J;const{field:e,pageIndex:n,sectionIndex:r,row:i}=t,{isPreview:a,isAdmin:s,isRenderView:l}=Zt(),{task_status:c,taskRegisterData:u,updateTaskRegisterData:d,updateTaskProgressValue:f,updateUserFormDataSubmit:h,userTaskSubmitFormData:m,TASK_PUBLISHED:g}=mr(),{userSelectedLanguage:v}=on(),[A,S]=N.useState(!1),[x,w]=N.useState(""),[T,C]=N.useState(0),[_,E]=N.useState(!1),D=()=>{E(!0)},B=()=>{E(!1)};N.useEffect(()=>{A||H();const K=Xt.addListener("clearRepeatableFields",ve=>{ve===(i==null?void 0:i.uuid)&&(w(""),C(0),e.isValid=0)}),oe=Xt.addListener("onSubmitUserForm",()=>{var ve;(ve=e==null?void 0:e.attributes)!=null&&ve.required&&(x!==""&&lu.test(x)===!0?e.isValid=1:e.isValid=0)});return()=>{oe.remove(),K.remove()}});const[k,P]=N.useState(!1),j=K=>{P(K)},M=()=>{P(!1)},H=()=>{var K,oe,ve;if(i!=null&&i.rowIsRepeatable){if(i!=null&&i.repeatableFields){const Ce=[...i.repeatableFields],Se=_t.findIndex(Ce,function(Te){return Te.uuid===(e==null?void 0:e.uuid)});Se>=0&&Ce[Se].fieldData?w(Ce[Se].fieldData):w("")}}else{const Ce=m;if(Ce!=null&&Ce.length){for(const Se of Ce)if(Se.fieldId===t.field.uuid&&((K=Se==null?void 0:Se.postData[0])==null?void 0:K.postValue)!==""&&((oe=Se==null?void 0:Se.postData[0])!=null&&oe.postValue)){w((ve=Se==null?void 0:Se.postData[0])==null?void 0:ve.postValue),S(!0);break}}}S(!0)},de=(K,oe)=>{w(oe);const ve=m,Ce=_t.cloneDeep(u);if(oe){if(Ce[e==null?void 0:e.uuid]=oe,(ve==null?void 0:ve.length)>0)for(const Se of ve)Se.fieldId===t.field.uuid&&(Se.postData[0]={postValue:oe})}else if(delete Ce[e==null?void 0:e.uuid],(ve==null?void 0:ve.length)>0)for(const Se of ve)Se.fieldId===t.field.uuid&&(Se.postData[0]={postValue:""});if(!(i!=null&&i.rowIsRepeatable)){d(Ce);const Se=Object.keys(Ce).length;f(Se)}},fe=(K,oe,ve,Ce)=>{var ie;const Se=[...m],Te=_t.findIndex(Se,function(U){return U.rowId===(i==null?void 0:i.uuid)});let De=(ie=m[Te])==null?void 0:ie.repeatableFields;De={...De,[ve==null?void 0:ve.uuid]:Ce},Se[Te]={...Se[Te],repeatableFields:De},h(Se),w(Ce),Ce!==""&&lu.test(Ce)===!0?e.isValid=1:e.isValid=0},ee=o.jsxs("div",{onMouseOver:D,onMouseOut:B,children:[!l&&!a&&_&&o.jsx(jr,{handleFieldSettingsSidebar:j,...t}),o.jsxs("div",{className:`field ${a?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" p-fluid ":" "} ${l?" ":" py-6 px-4 card"}`,children:[o.jsxs("div",{className:a?"p-fluid":"card p-fluid field-form-builder",children:[!a&&o.jsx("label",{className:"block font-medium mb-3 text-700 text-2xl",children:"Hidden field"}),o.jsx(gn,{type:a===!0?"hidden":"text",id:e==null?void 0:e.uuid,placeholder:(G=e==null?void 0:e.placeholder)==null?void 0:G[v==null?void 0:v.type],value:(ae=e==null?void 0:e.defaultValue)==null?void 0:ae[v==null?void 0:v.type],onFocus:()=>C(1),onLoad:()=>{i!=null&&i.rowIsRepeatable?fe(n,r,e,e==null?void 0:e.defaultValue):de("",e==null?void 0:e.defaultValue)},className:T===1&&((Y=e==null?void 0:e.attributes)!=null&&Y.required)?x?"valid":"invalid":"valid'",readOnly:c===g}),((ge=e==null?void 0:e.attributes)==null?void 0:ge.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:T===1&&!x?(ne=e==null?void 0:e.validationMesssage)==null?void 0:ne[v==null?void 0:v.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(J=e==null?void 0:e.helperText)==null?void 0:J[v==null?void 0:v.type]})})]}),s&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[k===!0&&o.jsx(Xi,{visibilty:k,closeSettingFieldSidebar:M,...t}),o.jsx(wi,{...t,fieldWrap:ee})]})},J$=t=>{var T;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,path:l,labelType:c}=t,[u,d]=N.useState(e),{isPreview:f}=Zt();N.useEffect(()=>{var C;return x((C=e[c])==null?void 0:C[h==null?void 0:h.type]),()=>{}},[e]);const{userSelectedLanguage:h,fieldSettingUpdate:m,fieldSettingUpdateInlineConditional:g,gridComponentFieldSettingUpdate:v}=on(),A=(C,_,E)=>{d(D=>({...D,[C]:{...D[C],[_==null?void 0:_.type]:E}}))},[S,x]=N.useState((T=e[c])==null?void 0:T[h==null?void 0:h.type]);N.useEffect(()=>(w(),()=>{}),[u]);const w=()=>{const C=l.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?g(C[oa],C[la],C[fa],C[ha],C[pa],C[wa],C[$o],C[yo],u):(C==null?void 0:C.length)>wa&&(C==null?void 0:C.length)===Bl+1&&(e!=null&&e.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?v(C[oa],C[la],C[fa],C[ha],C[pa],C[5],C[6],C[7],u):m(r,i,a,s,n,{...e,[c]:u[c]})};return o.jsx(o.Fragment,{children:o.jsx(L3,{style:{display:"inline-block"},className:"builder-input-label-edit",html:S,disabled:f,onChange:C=>{var _;x($3.sanitize((_=C==null?void 0:C.target)==null?void 0:_.value))},onBlur:C=>{var E;const _=$3.sanitize((E=C==null?void 0:C.target)==null?void 0:E.innerText);x(_),A(c,h,_)},tagName:"article"})})},Qwe=t=>{var J,K,oe,ve,Ce,Se,Te;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a}=mr(),{userSelectedLanguage:s,fieldSettingUpdate:l}=on(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:m,columnIndex:g,isDisabled:v}=t,{isPreview:A,isAdmin:S,isRenderView:x}=Zt(),[w,T]=N.useState(!1),[C,_]=N.useState(""),[E,D]=N.useState(0),[B,k]=N.useState(!1),[P,j]=N.useState(!1),M=()=>{j(!0)},H=()=>{j(!1)},de=()=>{var De,ie,U;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const re=[...h.repeatableFields],Q=_t.findIndex(re,function(se){return se.uuid===(c==null?void 0:c.uuid)});Q>=0&&re[Q].fieldData?_(re[Q].fieldData):_("")}}else{const re=a;if(re!=null&&re.length){for(const Q of re)if(Q.fieldId===t.field.uuid&&((De=Q==null?void 0:Q.postData[0])==null?void 0:De.postValue)!==""&&((ie=Q==null?void 0:Q.postData[0])!=null&&ie.postValue)){_((U=Q==null?void 0:Q.postData[0])==null?void 0:U.postValue);break}}}k(!0)};N.useEffect(()=>{B||de();const De=Xt.addListener("clearRepeatableFields",Q=>{Q===(h==null?void 0:h.uuid)&&(_(""),D(0),c.isValid=0,l(f,d,m,g,u,c))}),ie=Xt.addListener("onSubmitUserForm",()=>{var Q;(Q=c==null?void 0:c.attributes)!=null&&Q.required?C?c.isValid=1:c.isValid=0:c.isValid=1}),U=Xt.addListener("OnInvalidFieldCatch",Q=>{c.uuid===(Q==null?void 0:Q.fieldId)?D(1):D(0)}),re=Xt.addListener("OnGetFieldValue",Q=>{var be;const se=(be=Q==null?void 0:Q.repeatableColumn)==null?void 0:be.filter(me=>(me==null?void 0:me.fieldUuid)===(c==null?void 0:c.uuid));se!=null&&se.length});return()=>{ie.remove(),U.remove(),re.remove(),De.remove()}});const fe=De=>{T(De)},ee=()=>{T(!1)},G=De=>{var re,Q;_(De.target.value);const ie=a,U=_t.cloneDeep(e);if(ie!==null){if((re=De==null?void 0:De.target)!=null&&re.value){if(U[c==null?void 0:c.uuid]=(Q=De==null?void 0:De.target)==null?void 0:Q.value,(ie==null?void 0:ie.length)>0)for(const se of ie)se.fieldId===t.field.uuid&&(se.postData[0]={postValue:De.target.value})}else if(delete U[c==null?void 0:c.uuid],(ie==null?void 0:ie.length)>0)for(const se of ie)se.fieldId===t.field.uuid&&(se.postData[0]={postValue:""})}if(!(h!=null&&h.rowIsRepeatable)){n(U);const se=Object.keys(U).length;r(se)}},ae=(De,ie,U,re)=>{var Q;if(a){const se=[...a],be=_t.findIndex(se,function(ye){return ye.rowId===(h==null?void 0:h.uuid)});let me=(Q=a[be])==null?void 0:Q.repeatableFields;me={...me,[U==null?void 0:U.uuid]:re},se[be]={...se[be],repeatableFields:me},i(se)}_(re),re!==""?U.isValid=1:U.isValid=0},Y=10,ge=()=>{const De=[];for(let ie=0;ie<=Y;ie++)De.push(o.jsxs("label",{children:[o.jsx("input",{onChange:U=>{h!=null&&h.rowIsRepeatable?ae(f,d,c,U.target.value):G(U)},checked:parseInt(C)===ie,name:"liker-scale"+(c==null?void 0:c.uuid),type:"radio",value:ie,disabled:v}),o.jsx("span",{children:ie})]},`field-${c==null?void 0:c.uuid}-likertScale-${ie} ${parseInt(C)===ie?"scale-selected":""}`));return De},ne=o.jsxs("div",{onMouseOver:M,onMouseOut:H,children:[!x&&!A&&P&&o.jsx(jr,{handleFieldSettingsSidebar:fe,...t}),o.jsxs("div",{className:`field ${A?" ":" builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsxs("div",{className:"",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(J=c==null?void 0:c.headerText)==null?void 0:J[s==null?void 0:s.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((K=c==null?void 0:c.attributes)==null?void 0:K.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",A?o.jsx(o.Fragment,{children:(oe=c==null?void 0:c.label)==null?void 0:oe[s==null?void 0:s.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(c==null?void 0:c.showToolTip)&&o.jsx(Mi,{message:(ve=c==null?void 0:c.toolTip)==null?void 0:ve[s==null?void 0:s.type],position:"right"})})]}),o.jsx("div",{children:o.jsxs("div",{className:"mt-4",children:[o.jsxs("div",{className:"flex justify-content-between mb-3",children:[o.jsx("div",{className:"font-medium text-900 ",children:o.jsx(J$,{...t,labelType:"startingMessage"})}),o.jsx("div",{className:"font-medium text-900",children:o.jsx(J$,{...t,labelType:"endingMessage"})})]}),o.jsx("div",{className:"likert",children:ge()})]})}),o.jsx("div",{children:((Ce=c==null?void 0:c.attributes)==null?void 0:Ce.required)&&o.jsx("small",{className:"error",children:E===1&&!C?(Se=c==null?void 0:c.validationMesssage)==null?void 0:Se.language:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(Te=c==null?void 0:c.helperText)==null?void 0:Te[s==null?void 0:s.type]})})]}),S&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[w===!0&&o.jsx(Xi,{visibilty:w,closeSettingFieldSidebar:ee,...t}),o.jsx(wi,{...t,fieldWrap:ne})]})},Jwe=t=>{var J,K,oe,ve,Ce,Se,Te,De,ie,U,re,Q;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a,task_status:s,TASK_PUBLISHED:l}=mr(),{userSelectedLanguage:c,fieldSettingUpdate:u}=on(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:m,row:g,rowIndex:v,columnIndex:A,isDisabled:S}=t,{isPreview:x,isAdmin:w,isRenderView:T}=Zt(),[C,_]=N.useState(!1),[E,D]=N.useState(""),[B,k]=N.useState(0),[P,j]=N.useState(!1),[M,H]=N.useState(!1),de=()=>{H(!0)},fe=()=>{H(!1)},ee=()=>{var se,be,me;if(g!=null&&g.rowIsRepeatable){if(g!=null&&g.repeatableFields){const ye=[...g.repeatableFields],Ie=_t.findIndex(ye,function(Ee){return Ee.uuid===(d==null?void 0:d.uuid)});Ie>=0&&ye[Ie].fieldData?D(ye[Ie].fieldData):D("")}}else{const ye=a;if(ye!=null&&ye.length){for(const Ie of ye)if(Ie.fieldId===t.field.uuid&&((se=Ie==null?void 0:Ie.postData[0])==null?void 0:se.postValue)!==""&&((be=Ie==null?void 0:Ie.postData[0])!=null&&be.postValue)){D((me=Ie==null?void 0:Ie.postData[0])==null?void 0:me.postValue);break}}}j(!0)};N.useEffect(()=>{P||ee();const se=Xt.addListener("clearRepeatableFields",Ie=>{Ie===(g==null?void 0:g.uuid)&&(D(""),k(0),d.isValid=0,u(m,h,v,A,f,d))}),be=Xt.addListener("onSubmitUserForm",()=>{var Ie;(Ie=d==null?void 0:d.attributes)!=null&&Ie.required?E?d.isValid=1:d.isValid=0:d.isValid=1}),me=Xt.addListener("OnInvalidFieldCatch",Ie=>{d.uuid===(Ie==null?void 0:Ie.fieldId)?k(1):k(0)}),ye=Xt.addListener("OnGetFieldValue",Ie=>{var he;const Ee=(he=Ie==null?void 0:Ie.repeatableColumn)==null?void 0:he.filter(V=>(V==null?void 0:V.fieldUuid)===(d==null?void 0:d.uuid));Ee!=null&&Ee.length});return()=>{be.remove(),me.remove(),ye.remove(),se.remove()}});const G=se=>{_(se)},ae=()=>{_(!1)},Y=se=>{var ye,Ie;D(se.target.value);const be=a,me=_t.cloneDeep(e);if(be!==null){if((ye=se==null?void 0:se.target)!=null&&ye.value){if(me[d==null?void 0:d.uuid]=(Ie=se==null?void 0:se.target)==null?void 0:Ie.value,(be==null?void 0:be.length)>0)for(const Ee of be)Ee.fieldId===t.field.uuid&&(Ee.postData[0]={postValue:se.target.value})}else if(delete me[d==null?void 0:d.uuid],(be==null?void 0:be.length)>0)for(const Ee of be)Ee.fieldId===t.field.uuid&&(Ee.postData[0]={postValue:""})}if(!(g!=null&&g.rowIsRepeatable)){n(me);const Ee=Object.keys(me).length;r(Ee)}},ge=(se,be)=>{var me;if(a){const ye=[...a],Ie=_t.findIndex(ye,function(he){return he.rowId===(g==null?void 0:g.uuid)});let Ee=(me=a[Ie])==null?void 0:me.repeatableFields;Ee={...Ee,[se==null?void 0:se.uuid]:be},ye[Ie]={...ye[Ie],repeatableFields:Ee},i(ye)}D(be),be!==""?se.isValid=1:se.isValid=0},ne=o.jsxs("div",{onMouseOver:de,onMouseOut:fe,children:[!T&&!x&&M&&o.jsx(jr,{handleFieldSettingsSidebar:G,...t}),o.jsxs("div",{className:`field ${x?" ":" builder-element-wrapper "}${(d==null?void 0:d.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:x?"col-12 ":"col-12 p-fluid",children:[(d==null?void 0:d.showHeaderText)&&o.jsx("h6",{children:(J=d==null?void 0:d.headerText)==null?void 0:J[c==null?void 0:c.type]}),(d==null?void 0:d.showLabel)&&o.jsxs("label",{htmlFor:f,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((K=d==null?void 0:d.attributes)==null?void 0:K.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",x?o.jsx(o.Fragment,{children:(oe=d==null?void 0:d.label)==null?void 0:oe[c==null?void 0:c.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(d==null?void 0:d.showToolTip)&&o.jsx(Mi,{message:(ve=d==null?void 0:d.toolTip)==null?void 0:ve[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(d==null?void 0:d.iconAlignment),children:[(d==null?void 0:d.showIcon)&&o.jsx("i",{className:"pi pi-"+((Se=(Ce=d==null?void 0:d.icon)==null?void 0:Ce.properties)==null?void 0:Se.name)}),o.jsx(gn,{id:d==null?void 0:d.uuid,placeholder:(Te=d==null?void 0:d.placeholder)==null?void 0:Te[c==null?void 0:c.type],value:E,onFocus:()=>k(1),onChange:se=>{g!=null&&g.rowIsRepeatable?ge(d,se.target.value):Y(se)},className:B===1&&((De=d==null?void 0:d.attributes)!=null&&De.required)?E?"valid mt-2 mr-2":"invalid mt-2":"valid mt-2",readOnly:S})]}),o.jsx("div",{children:((ie=d==null?void 0:d.attributes)==null?void 0:ie.required)&&o.jsx("small",{className:"error",children:B===1&&!E?(U=d==null?void 0:d.validationMesssage)==null?void 0:U.english:""})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(re=d==null?void 0:d.helperText)==null?void 0:re[c==null?void 0:c.type]})})]})]})}),o.jsx("p",{className:"text-center",children:o.jsx("span",{className:`${(Q=d==null?void 0:d.fontStyle)==null?void 0:Q.font} text-center`,style:{fontSize:d==null?void 0:d.fontSize},children:E})}),w&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[C===!0&&o.jsx(Xi,{visibilty:C,closeSettingFieldSidebar:ae,...t}),o.jsx(wi,{...t,fieldWrap:ne})]})},Zwe=t=>{var De,ie,U,re,Q,se,be,me,ye,Ie,Ee,he,V,te,W,ue,Ae;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i,TASK_PUBLISHED:a,task_status:s}=mr(),{globalAlignment:l}=Zt(),{userSelectedLanguage:c,fieldSettingUpdate:u}=on(),{isRenderView:d,isAdmin:f,isPreview:h}=Zt(),m=pe=>{const ke=pe.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Le=`${pe.className} justify-content-start`,We=`${pe.titleClassName} pl-1`;return o.jsxs("div",{className:Le,children:[o.jsxs("button",{className:pe.togglerClassName,onClick:pe.onTogglerClick,children:[o.jsx("span",{className:ke}),o.jsx(Qt,{})]}),o.jsx("span",{className:We,children:ee})]})},{field:g,fieldIndex:v,sectionIndex:A,pageIndex:S,row:x,rowIndex:w,columnIndex:T,isDisabled:C}=t,[_,E]=N.useState(!1),[D,B]=N.useState(null),[k,P]=N.useState({country:null,city:null,state:null,addressOne:null,addressTwo:null,zipcode:null,isBillingAddressSame:!1,billingCountry:null,billingCity:null,billingState:null,billingAddressOne:null,billingAddressTwo:null,billingZipcode:null}),[j,M]=N.useState(!1),H=()=>{M(!0)},de=()=>{M(!1)},fe=(pe,ke)=>{let Le={...k};Le={...Le,[pe]:ke},P(Le),(Le==null?void 0:Le.addressOne)!==""&&(Le!=null&&Le.addressTwo)&&(Le!=null&&Le.zipcode)&&Se(Le==null?void 0:Le.zipcode)?(g.isValid=1,oe(Le,!0)):(g.isValid=0,oe(null,!1))},[ee]=N.useState((De=g==null?void 0:g.label)==null?void 0:De[c==null?void 0:c.type]),[G,ae]=N.useState(0),[Y,ge]=N.useState(!1),ne=()=>{var pe,ke;if(!(x!=null&&x.rowIsRepeatable)){const Le=i;if(Le!=null&&Le.length){for(const We of Le)if(We.fieldId===t.field.uuid&&((pe=We==null?void 0:We.postData[0])!=null&&pe.postValue)){P((ke=We==null?void 0:We.postData[0])==null?void 0:ke.postValue);break}}}ge(!0)};N.useEffect(()=>{Y||ne();const pe=Xt.addListener("clearRepeatableFields",At=>{At===(x==null?void 0:x.uuid)&&(ae(0),g.isValid=0,u(S,A,w,T,v,g))}),ke=Xt.addListener("onSubmitUserForm",()=>{var At;(At=g==null?void 0:g.attributes)!=null&&At.required?(k==null?void 0:k.addressOne)!==""&&(k==null?void 0:k.zipcode)!==""&&Se(k==null?void 0:k.zipcode)?g.isValid=1:g.isValid=0:g.isValid=1}),Le=Xt.addListener("OnInvalidFieldCatch",At=>{g.uuid===(At==null?void 0:At.fieldId)?ae(1):ae(0)}),We=Xt.addListener("OnGetFieldValue",At=>{var Je;const st=(Je=At==null?void 0:At.repeatableColumn)==null?void 0:Je.filter(Ct=>(Ct==null?void 0:Ct.fieldUuid)===(g==null?void 0:g.uuid));st!=null&&st.length}),gt=Xt.addListener("formFieldAdded",At=>{D===null&&B(At.uuid)});return()=>{ke.remove(),Le.remove(),We.remove(),pe.remove(),gt.remove()}});const J=pe=>{E(pe)},K=()=>{E(!1)},oe=(pe,ke)=>{const Le=i,We=_t.cloneDeep(e);if(ke){if(We[g==null?void 0:g.uuid]=pe,(Le==null?void 0:Le.length)>0)for(const gt of Le)gt.fieldId===t.field.uuid&&(gt.postData[0]={postValue:pe})}else if(delete We[g==null?void 0:g.uuid],(Le==null?void 0:Le.length)>0)for(const gt of Le)gt.fieldId===t.field.uuid&&(gt.postData[0]={postValue:pe});if(!(x!=null&&x.rowIsRepeatable)){n(We);const gt=Object.keys(We).length;r(gt)}},ve=()=>{let pe="";return h||(pe=pe+" field-form-builder"),s===a&&f===!0&&(pe=pe+" card"),pe},Ce=()=>{let pe=!1;return k.addressOne!==""&&k.zipcode!==""&&Se(k.zipcode)&&(pe=!0),pe};function Se(pe){const ke=/\d/.test(pe),Le=/[a-zA-Z]/.test(pe);return ke&&Le?!0:!!ke}N.useEffect(()=>(D!==null&&setTimeout(()=>{B(null)},1e3),()=>{}),[D]);const Te=o.jsxs("div",{onMouseOver:H,onMouseOut:de,children:[!d&&!h&&j&&o.jsx(jr,{handleFieldSettingsSidebar:J,...t}),o.jsxs("div",{className:`field ${h?" ":" builder-element-wrapper "} ${(g==null?void 0:g.isFluid)===!0?" card py-3 px-4 p-fluid":"card p-4"} ${D===(g==null?void 0:g.uuid)?" new-field ":" card "}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:h?"col-12 ":"col-11 p-fluid",children:[(g==null?void 0:g.showHeaderText)&&o.jsx("h6",{children:(ie=g==null?void 0:g.headerText)==null?void 0:ie[c==null?void 0:c.type]}),(g==null?void 0:g.showLabel)&&o.jsxs("label",{htmlFor:v,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((U=g==null?void 0:g.attributes)==null?void 0:U.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",h?o.jsx(o.Fragment,{children:(re=g==null?void 0:g.label)==null?void 0:re[c==null?void 0:c.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(g==null?void 0:g.showToolTip)&&o.jsx(Mi,{message:(Q=g==null?void 0:g.toolTip)==null?void 0:Q[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3 p-fluid",children:[o.jsx("div",{children:o.jsx("label",{className:"w-full",htmlFor:"",children:(se=g==null?void 0:g.addresslineFirstLabel)==null?void 0:se[c==null?void 0:c.type]})}),o.jsx(gn,{value:k.addressOne||"",onChange:pe=>fe("addressOne",pe.target.value),className:"my-2 ",readOnly:C}),o.jsx("div",{children:o.jsx("label",{htmlFor:"",children:(be=g==null?void 0:g.addresslineSecondLabel)==null?void 0:be[c==null?void 0:c.type]})}),o.jsx(gn,{value:k.addressTwo||"",onChange:pe=>fe("addressTwo",pe.target.value),className:"my-2",readOnly:C}),o.jsx("div",{children:o.jsx("label",{htmlFor:"",children:(me=g==null?void 0:g.postalcodeLabel)==null?void 0:me[c==null?void 0:c.type]})}),o.jsx(gn,{value:k.zipcode||"",onChange:pe=>fe("zipcode",pe.target.value),className:"my-2",readOnly:C}),o.jsx("p",{children:!Se(k.zipcode)&&o.jsx("small",{children:"Cannot be alphabetical only."})}),((ye=g==null?void 0:g.attributes)==null?void 0:ye.required)&&!Ce()&&o.jsx("small",{className:"error",children:G===1?(Ie=g==null?void 0:g.validationMesssage)==null?void 0:Ie.language:""}),(g==null?void 0:g.showBillingAddress)===!0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Or,{inputId:"binary",checked:k.isBillingAddressSame,onChange:pe=>{fe("isBillingAddressSame",pe.checked),pe.checked?P(ke=>({...ke,billingCountry:k.country,billingCity:k.city,billingState:k.state,billingAddressOne:k.addressOne,billingAddressTwo:k.addressTwo,billingZipcode:k.zipcode})):P(ke=>({...ke,billingCountry:null,billingCity:null,billingState:null,billingAddressOne:null,billingAddressTwo:null,billingZipcode:null}))},disabled:C}),o.jsx("label",{htmlFor:"binary",children:"Is Billing Address Same"})]}),k.isBillingAddressSame===!1&&o.jsxs(o.Fragment,{children:[(g==null?void 0:g.showLabel)&&o.jsxs("label",{htmlFor:v,className:"flex font-medium mb-3 text-700 text-2xl",children:[((Ee=g==null?void 0:g.attributes)==null?void 0:Ee.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",(he=g==null?void 0:g.billingLabel)==null?void 0:he[c==null?void 0:c.type],o.jsx("span",{className:"ml-3",children:(g==null?void 0:g.showToolTip)&&o.jsx(Mi,{message:(V=g==null?void 0:g.toolTip)==null?void 0:V[c==null?void 0:c.type],position:"right"})})]}),o.jsx("label",{htmlFor:"",children:(te=g==null?void 0:g.addresslineFirstLabel)==null?void 0:te[c==null?void 0:c.type]}),o.jsx(gn,{value:k.billingAddressOne||"",onChange:pe=>fe("billingAddressOne",pe.target.value),className:"my-2",readOnly:C}),o.jsx("label",{htmlFor:"",children:(W=g==null?void 0:g.addresslineSecondLabel)==null?void 0:W[c==null?void 0:c.type]}),o.jsx(gn,{value:k.billingAddressTwo||"",onChange:pe=>fe("billingAddressTwo",pe.target.value),className:"my-2",readOnly:C}),o.jsx("label",{htmlFor:"",children:(ue=g==null?void 0:g.postalcodeLabel)==null?void 0:ue[c==null?void 0:c.type]}),o.jsx(gn,{value:k.billingZipcode||"",onChange:pe=>fe("billingZipcode",pe.target.value),className:"my-2",readOnly:C}),!Se(k.billingZipcode)&&o.jsx("small",{children:"Cannot be alphabetical only."})]})]}),o.jsx("div",{}),o.jsx("div",{children:(g==null?void 0:g.showHelperText)&&o.jsx("small",{children:(Ae=g==null?void 0:g.helperText)==null?void 0:Ae[c==null?void 0:c.type]})})]})]})}),f&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[_===!0&&o.jsx(Xi,{visibilty:_,closeSettingFieldSidebar:K,...t}),o.jsx("div",{dir:l?"rtl":"ltr",className:ve(),children:s===a&&f===!0?o.jsx(li,{headerTemplate:m,toggleable:!0,children:Te}):Te})]})},eSe=t=>{var w;const{customColumn:e,indexes:n,customColumnIndex:r,path:i,field:a,onSetValuetoPostData:s,sectionIndex:l,page:c,row:u,column:d,section:f,pageIndex:h,rowIndex:m,columnIndex:g}=t,{handleDrop:v}=on(),{isPreview:A,isAdvanceView:S}=Zt(),x=(T,C)=>{s(T,C)};return o.jsxs("div",{className:"p-2 py-4",children:[n&&((w=a.children)==null?void 0:w.length)>0&&a.children.map((T,C)=>{const _=T[`${n.rowIndex}-${n.columnIndex}`];return _?o.jsx("div",{children:o.jsx(qc,{type:"grid",showFieldIcons:!1,onChange:x,data:_,field:_,path:`${i}-${n.rowIndex}-${n.columnIndex}-${C}`,sectionIndex:l,page:c,column:d,row:u,section:f,pageIndex:h,rowIndex:m,columnIndex:g,fieldIndex:C,fieldContainer:"grid-container"})},`${n.rowIndex}-${n.columnIndex}-${C}`):null}),n&&A===!1&&o.jsx("div",{className:"py-5",children:o.jsx(Tr,{isAdvanceView:S,fieldDropArea:!0,data:{path:`${i}-${n.rowIndex}-${r}`,childrenCount:1,droppedField:e},onDrop:v})})]})},Z$=t=>{var P,j,M,H,de,fe,ee;const{field:e,column:n,section:r,row:i,rowIndex:a,columnIndex:s,sectionIndex:l,isPreview:c,userSelectedLanguage:u,fieldIndex:d,customColumnHeaderTemplate:f,onSetValuetoPostData:h,setAllFields:m,allFields:g,actionHeaderTemplate:v,actionBodyTemplate:A,isFocus:S,inputValue:x,handleFieldSettingsSidebar:w,isAdmin:T,emitSocketData:C,isRenderView:_}=t,[E,D]=N.useState(!1),B=()=>{D(!0)},k=()=>{D(!1)};return o.jsxs("div",{onMouseOver:B,onMouseOut:k,children:[!_&&!c&&E&&o.jsx(jr,{handleFieldSettingsSidebar:w,...t}),o.jsxs("div",{className:`field ${c?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 ":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 ",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(P=e==null?void 0:e.headerText)==null?void 0:P[u==null?void 0:u.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:d,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((j=e==null?void 0:e.attributes)==null?void 0:j.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",c?o.jsx(o.Fragment,{children:(M=e==null?void 0:e.label)==null?void 0:M[u==null?void 0:u.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(H=e==null?void 0:e.toolTip)==null?void 0:H[u==null?void 0:u.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs(zs,{scrollable:!0,showGridlines:!0,columnResizeMode:"expand",resizableColumns:!0,value:e==null?void 0:e.options,tableStyle:{minWidth:"50rem"},children:[e==null?void 0:e.customColumnsForOptions.map((G,ae)=>o.jsx(dr,{style:{minWidth:350},header:f(G,ae),body:(Y,ge)=>o.jsx(eSe,{customColumn:G,section:r,column:n,columnIndex:s,row:i,rowIndex:a,sectionIndex:l,e:Y,indexes:ge,customColumnIndex:ae,onSetValuetoPostData:h,setAllFields:m,allFields:g,emitSocketData:C,field:e,...t})},G==null?void 0:G.uuid)),!c&&o.jsx(dr,{frozen:!0,header:G=>v(G),body:(G,ae)=>A(G,ae),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((de=e==null?void 0:e.attributes)==null?void 0:de.required)&&o.jsx("small",{className:"error",children:S===1&&!x?(fe=e==null?void 0:e.validationMesssage)==null?void 0:fe.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(ee=e==null?void 0:e.helperText)==null?void 0:ee[u==null?void 0:u.type]})})]})]})}),T&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]})},ej=t=>{var De;const{globalAlignment:e}=Zt(),n=ie=>{const U=ie.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",re=`${ie.className} justify-content-start`,Q=`${ie.titleClassName} pl-1`;return o.jsxs("div",{className:re,children:[o.jsxs("button",{className:ie.togglerClassName,onClick:ie.onTogglerClick,children:[o.jsx("span",{className:U}),o.jsx(Qt,{})]}),o.jsx("span",{className:Q,children:C})]})},{userTaskSubmitFormData:r,TASK_PUBLISHED:i,task_status:a}=mr(),{userSelectedLanguage:s,fieldSettingUpdate:l}=on(),{isPreview:c,field:u,fieldIndex:d,sectionIndex:f,pageIndex:h,row:m,rowIndex:g,columnIndex:v,isAdmin:A}=t,[S,x]=N.useState(!1),[w,T]=N.useState(""),[C]=N.useState((De=u==null?void 0:u.label)==null?void 0:De[s==null?void 0:s.type]),[_,E]=N.useState(0),[D,B]=N.useState(!1),[k,P]=N.useState(null),[j,M]=N.useState([]),H=()=>{var ie,U,re;if(m!=null&&m.rowIsRepeatable){if(m!=null&&m.repeatableFields){const Q=[...m.repeatableFields],se=_t.findIndex(Q,function(be){return be.uuid===(u==null?void 0:u.uuid)});se>=0&&Q[se].fieldData?T(Q[se].fieldData):T("")}}else{const Q=r;if(Q!=null&&Q.length){for(const se of Q)if(se.fieldId===t.field.uuid&&((ie=se==null?void 0:se.postData[0])==null?void 0:ie.postValue)!==""&&((U=se==null?void 0:se.postData[0])!=null&&U.postValue)){T((re=se==null?void 0:se.postData[0])==null?void 0:re.postValue);break}}}B(!0)},de=()=>{const ie=u;ie.customColumnsForOptions=[...ie.customColumnsForOptions,{customKey:"Column",uuid:nt()}],Te(ie)},[fe,ee]=N.useState(!1),G=(ie,U)=>{var re;return o.jsxs(o.Fragment,{children:[((re=u==null?void 0:u.options)==null?void 0:re.length)>1&&o.jsx(Pt,{text:!0,type:"button",className:"p-button-danger left-space ",icon:"pi pi-trash",onClick:()=>ge(ie==null?void 0:ie.uuid,U==null?void 0:U.rowIndex),rounded:!0,severity:"secondary","aria-label":"Bookmark",size:"small"}),o.jsx(Pt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>Ce(),"aria-label":"Add Row",size:"small"})]})},ae=(ie,U)=>{var re;return o.jsxs(o.Fragment,{children:[ie==null?void 0:ie.customKey,c===!1&&o.jsxs(o.Fragment,{children:[((re=u==null?void 0:u.customColumnsForOptions)==null?void 0:re.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>ne(ie==null?void 0:ie.uuid,U)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{P(ie),ee(!0)}})]})]})},Y=()=>o.jsx(o.Fragment,{children:o.jsx(Pt,{text:!0,icon:"pi pi-plus",onClick:()=>de(),rounded:!0,severity:"secondary","aria-label":"Cancel"})}),ge=(ie,U)=>{var me,ye;const re=(me=u==null?void 0:u.customColumnsForOptions)==null?void 0:me.length,Q=[...(u==null?void 0:u.children)||[]];(ye=u==null?void 0:u.children)==null||ye.map(Ie=>{for(let Ee=0;Ee<re;Ee++)if(Ie[`${U}-${Ee}`]!==void 0){const he=_t.findIndex(Q,function(V){return V[`${U}-${Ee}`]!==void 0});Q.splice(he,1)}});for(let Ie=0;Ie<(Q==null?void 0:Q.length);Ie++){const Ee=Q[Ie],V=Object.keys(Ee)[0].split("-");parseInt(V[0])>U&&(Q[Ie]={[`${parseInt(V[0])-1}-${V[1]}`]:Q[Ie][`${parseInt(V[0])}-${V[1]}`]})}const se=u==null?void 0:u.options.filter(function(Ie){return(Ie==null?void 0:Ie.uuid)!==ie}),be={...u,children:[...Q]};be.options=se,Te(be)},ne=(ie,U)=>{var ye,Ie;const re=_t.findIndex(u==null?void 0:u.customColumnsForOptions,Ee=>Ee.uuid===ie),Q=u==null?void 0:u.customColumnsForOptions.filter(function(Ee,he){return he!==re}),se=(ye=u==null?void 0:u.options)==null?void 0:ye.length,be=[...(u==null?void 0:u.children)||[]];(Ie=u==null?void 0:u.children)==null||Ie.map(Ee=>{for(let he=0;he<se;he++)if(Ee[`${he}-${U}`]!==void 0){const V=_t.findIndex(be,function(te){return te[`${he}-${U}`]!==void 0});be.splice(V,1)}});for(let Ee=0;Ee<(be==null?void 0:be.length);Ee++){const he=be[Ee],te=Object.keys(he)[0].split("-");parseInt(te[1])>U&&(be[Ee]={[`${parseInt(te[0])}-${parseInt(te[1])-1}`]:be[Ee][`${parseInt(te[0])}-${te[1]}`]})}const me={...u,children:[...be]};me.customColumnsForOptions=Q,Te(me)};N.useEffect(()=>{D||H();const ie=Xt.addListener("clearRepeatableFields",se=>{se===(m==null?void 0:m.uuid)&&(T(""),E(0),u.isValid=0,l(h,f,g,v,d,u))}),U=Xt.addListener("onSubmitUserForm",()=>{var se;(se=u==null?void 0:u.attributes)!=null&&se.required&&(u.isValid=1)}),re=Xt.addListener("OnInvalidFieldCatch",se=>{u.uuid===(se==null?void 0:se.fieldId)?E(1):E(0)}),Q=Xt.addListener("OnGetFieldValue",se=>{var me;const be=(me=se==null?void 0:se.repeatableColumn)==null?void 0:me.filter(ye=>(ye==null?void 0:ye.fieldUuid)===(u==null?void 0:u.uuid));be!=null&&be.length});return()=>{U.remove(),re.remove(),Q.remove(),ie.remove()}});const J=ie=>{x(ie)},K=()=>{x(!1)},oe=(ie,U)=>{var Q;const re=r;if((re==null?void 0:re.length)>0)for(const se of re)se.fieldId===t.field.uuid&&(se.postData[0]={postValue:{...(Q=se.postData[0])==null?void 0:Q.postValue,[ie]:U}})},ve=()=>{let ie="";return c||(ie=ie+" field-form-builder"),a===i&&A===!0&&(ie=ie+" card"),ie},Ce=()=>{const ie=u;ie.options=[...ie.options,{uuid:nt(),custom_values:{}}],Te(ie)},Se=(ie,U)=>{P(be=>be===null?{customKey:U,uuid:""}:{...be,customKey:U});const re=u.customColumnsForOptions,Q=re.findIndex(be=>be.uuid===ie.uuid);re[Q]={...re[Q],customKey:U};const se=u;se.customColumnsForOptions=re,Te(se)},Te=ie=>{l(h,f,g,v,d,ie)};return o.jsxs(o.Fragment,{children:[o.jsx(Is,{maximizable:!0,header:"Update Column Title",visible:fe,style:{width:"20vw"},footer:()=>o.jsx(Pt,{text:!0,label:"Save",onClick:()=>ee(!1)}),onHide:()=>ee(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(gn,{value:(k==null?void 0:k.customKey)||"",onChange:ie=>Se(k,ie.target.value)})})}),o.jsx(Xi,{visibilty:S,closeSettingFieldSidebar:K,...t}),o.jsx("div",{dir:e,className:ve(),children:a===i&&A===!0?o.jsx(li,{headerTemplate:n,toggleable:!0,children:o.jsx(Z$,{...t,field:u,isPreview:c,userSelectedLanguage:s,fieldIndex:d,pageIndex:h,columnIndex:v,customColumnHeaderTemplate:ae,onSetValuetoPostData:oe,setAllFields:ie=>M(ie),allFields:j,actionHeaderTemplate:Y,actionBodyTemplate:G,addOption:Ce,isFocus:_,inputValue:w,handleFieldSettingsSidebar:J,isAdmin:A})}):o.jsx(Z$,{...t,field:u,isPreview:c,userSelectedLanguage:s,fieldIndex:d,pageIndex:h,columnIndex:v,customColumnHeaderTemplate:ae,onSetValuetoPostData:oe,setAllFields:ie=>M(ie),allFields:j,actionHeaderTemplate:Y,actionBodyTemplate:G,addOption:Ce,isFocus:_,inputValue:w,handleFieldSettingsSidebar:J,isAdmin:A})})]})},tSe=t=>{const{customColumn:e,indexes:n,customColumnIndex:r,setAllFields:i,allFields:a}=t,s=l=>{const c={...a};c[`${n==null?void 0:n.rowIndex}-${r}`]=l,i(c)};return o.jsx("div",{children:o.jsx(Sa,{value:a[`${n==null?void 0:n.rowIndex}-${r}`],options:e.options,onChange:l=>s(l.value),optionLabel:"label",placeholder:"Select"})})},tj=t=>{var T,C,_,E,D,B,k;const{field:e,isPreview:n,userSelectedLanguage:r,fieldIndex:i,customColumnHeaderTemplate:a,customColumnRowBodyTemplate:s,setAllFields:l,allFields:c,actionHeaderTemplate:u,actionBodyTemplate:d,isFocus:f,inputValue:h,handleFieldSettingsSidebar:m,isAdmin:g,isRenderView:v}=t,[A,S]=N.useState(!1),x=()=>{S(!0)},w=()=>{S(!1)};return o.jsxs("div",{onMouseOver:x,onMouseOut:w,children:[!v&&!n&&A&&o.jsx(jr,{handleFieldSettingsSidebar:m,...t}),o.jsxs("div",{className:`field ${n?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:n?"col-12 ":"col-11 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(T=e==null?void 0:e.headerText)==null?void 0:T[r==null?void 0:r.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:i,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((C=e==null?void 0:e.attributes)==null?void 0:C.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",n?o.jsx(o.Fragment,{children:(_=e==null?void 0:e.label)==null?void 0:_[r==null?void 0:r.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(E=e==null?void 0:e.toolTip)==null?void 0:E[r==null?void 0:r.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs(zs,{showGridlines:!0,value:e==null?void 0:e.rows,children:[o.jsx(dr,{frozen:!0,header:"",headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:P=>s(P)}),e==null?void 0:e.customColumns.map((P,j)=>o.jsx(dr,{header:a(P),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(M,H)=>o.jsx(tSe,{customColumn:P,e:M,indexes:H,customColumnIndex:j,setAllFields:l,allFields:c,...t})},P==null?void 0:P.uuid)),n===!1&&o.jsx(dr,{frozen:!0,header:P=>u(P),body:P=>d(P),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((D=e==null?void 0:e.attributes)==null?void 0:D.required)&&o.jsx("small",{className:"error",children:f===1&&!h?(B=e==null?void 0:e.validationMesssage)==null?void 0:B.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(k=e==null?void 0:e.helperText)==null?void 0:k[r==null?void 0:r.type]})})]})]})}),g&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]})},nSe=(t,e)=>{var Ie,Ee;const n=he=>{const V=he.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",te=`${he.className} justify-content-start`,W=`${he.titleClassName} pl-1`;return o.jsxs("div",{className:te,children:[o.jsxs("button",{className:he.togglerClassName,onClick:he.onTogglerClick,children:[o.jsx("span",{className:V}),o.jsx(Qt,{})]}),o.jsx("span",{className:W,children:_})]})},{userTaskSubmitFormData:r,TASK_PUBLISHED:i,task_status:a}=mr(),{globalAlignment:s,isPreview:l,isAdmin:c}=Zt(),{userSelectedLanguage:u,fieldSettingUpdate:d}=on(),{field:f,fieldIndex:h,sectionIndex:m,pageIndex:g,row:v,rowIndex:A,columnIndex:S}=t,[x,w]=N.useState(!1),[T,C]=N.useState(""),[_]=N.useState((Ie=f==null?void 0:f.label)==null?void 0:Ie[u==null?void 0:u.type]),[E,D]=N.useState(0),[B,k]=N.useState(!1),[P,j]=N.useState(null),[M,H]=N.useState(null),[de,fe]=N.useState({}),ee=()=>{var he,V,te;if(v!=null&&v.rowIsRepeatable){if(v!=null&&v.repeatableFields){const W=[...v.repeatableFields],ue=_t.findIndex(W,function(Ae){return Ae.uuid===(f==null?void 0:f.uuid)});ue>=0&&W[ue].fieldData?C(W[ue].fieldData):C("")}}else{const W=r;if(W!=null&&W.length){for(const ue of W)if(ue.fieldId===t.field.uuid&&((he=ue==null?void 0:ue.postData[0])==null?void 0:he.postValue)!==""&&((V=ue==null?void 0:ue.postData[0])!=null&&V.postValue)){C((te=ue==null?void 0:ue.postData[0])==null?void 0:te.postValue);break}}}k(!0)},G=()=>{const he=f;he.customColumns=[...he.customColumns,{customKey:"Column",uuid:nt(),options:[]}],se(he)},[ae,Y]=N.useState(!1),[ge,ne]=N.useState(!1),J=he=>{var V;return o.jsxs(o.Fragment,{children:[((V=f==null?void 0:f.options)==null?void 0:V.length)>1&&o.jsx(Pt,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>Ce(he==null?void 0:he.uuid),"aria-label":"Add Row"}),o.jsx(Pt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>U(),"aria-label":"Add Row"})]})},K=he=>{var V;return o.jsxs(o.Fragment,{children:[he==null?void 0:he.customKey,l===!1&&o.jsxs(o.Fragment,{children:[((V=f==null?void 0:f.customColumns)==null?void 0:V.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>Se(he==null?void 0:he.uuid)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{j(he),Y(!0)}})]})]})},oe=()=>o.jsx(o.Fragment,{children:o.jsx(Pt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>G(),"aria-label":"Add Column"})}),ve=he=>o.jsxs(o.Fragment,{children:[he==null?void 0:he.rowHeading,l===!1&&o.jsx(o.Fragment,{children:o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{H(he),ne(!0)}})})]}),Ce=he=>{const V=f==null?void 0:f.rows.filter(function(W){return(W==null?void 0:W.uuid)!==he}),te=f;te.rows=V,se(te)},Se=he=>{const V=_t.findIndex(f==null?void 0:f.customColumns,ue=>ue.uuid===he),te=f==null?void 0:f.customColumns.filter(function(ue,Ae){return Ae!==V}),W=f;W.customColumns=te,se(W)};N.useEffect(()=>{B||ee();const he=Xt.addListener("clearRepeatableFields",W=>{W===(v==null?void 0:v.uuid)&&(C(""),D(0),f.isValid=0,d(g,m,A,S,h,f))}),V=Xt.addListener("OnInvalidFieldCatch",W=>{f.uuid===(W==null?void 0:W.fieldId)?D(1):D(0)}),te=Xt.addListener("OnGetFieldValue",W=>{var Ae;const ue=(Ae=W==null?void 0:W.repeatableColumn)==null?void 0:Ae.filter(pe=>(pe==null?void 0:pe.fieldUuid)===(f==null?void 0:f.uuid));ue!=null&&ue.length});return()=>{V.remove(),te.remove(),he.remove()}});const Te=he=>{w(he)},De=()=>{w(!1)},ie=()=>{let he="";return l||(he=he+" field-form-builder"),a===i&&c===!0&&(he=he+" card"),he},U=()=>{const he=f;he.rows=[...he.rows,{rowHeading:"Row",uuid:nt(),custom_values:{}}],se(he)},re=(he,V)=>{j(Ae=>Ae===null?{customKey:V,uuid:""}:{...Ae,customKey:V});const te=f.customColumns,W=te.findIndex(Ae=>Ae.uuid===he.uuid);te[W]={...te[W],customKey:V};const ue=f;ue.customColumns=te,se(ue)},Q=(he,V)=>{H(Ae=>Ae===null?{uuid:"",rowHeading:V}:{...Ae,rowHeading:V});const te=f.rows,W=te.findIndex(Ae=>Ae.uuid===he.uuid);te[W]={...te[W],rowHeading:V};const ue=f;ue.rows=te,se(ue)},se=he=>{d(g,m,A,S,h,he)};function be(he){return he.toLowerCase().replace(/ /g,"-").replace(/[^\w-]+/g,"")}const me=(he,V,te)=>{const W=f.customColumns,ue=W.findIndex(pe=>P&&pe.uuid===P.uuid);W[ue].options[te][V]=he,W[ue].options[te].value=be(he);const Ae=f;Ae.customColumns=W,se(Ae)},ye=()=>{const he=f.customColumns,V=he.findIndex(W=>P&&W.uuid===P.uuid);he[V].options.push({label:"",value:"",uuid:nt()});const te=f;te.customColumns=he,se(te)};return o.jsxs(o.Fragment,{children:[o.jsxs(Is,{maximizable:!0,header:"Update Column Title",visible:ae,style:{width:"20vw"},footer:()=>o.jsxs(o.Fragment,{children:[" ",o.jsx(Pt,{text:!0,label:"Add Option",icon:"pi pi-plus",onClick:()=>ye()}),o.jsx(Pt,{text:!0,label:"Save",onClick:()=>Y(!1)})]}),onHide:()=>Y(!1),children:[o.jsx("div",{className:"p-fluid",children:o.jsx(gn,{value:(P==null?void 0:P.customKey)||"",onChange:he=>re(P,he.target.value)})}),o.jsx("hr",{}),o.jsx("h5",{children:"Options"}),(P==null?void 0:P.options)&&((Ee=P==null?void 0:P.options)==null?void 0:Ee.length)>0&&(P==null?void 0:P.options.map((he,V)=>o.jsxs("div",{className:"my-2 flex p-fluid",children:[o.jsx("span",{children:V+1}),o.jsx(gn,{value:(he==null?void 0:he.label)||"",className:"ml-2",onChange:te=>me(te.target.value,"label",V)})]},`custom_column_option_${V}`)))]}),o.jsx(Is,{maximizable:!0,header:"Update Row Title",visible:ge,style:{width:"20vw"},footer:()=>o.jsx(Pt,{text:!0,label:"Save",onClick:()=>ne(!1)}),onHide:()=>ne(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(gn,{value:(M==null?void 0:M.rowHeading)||"",onChange:he=>Q(M,he.target.value)})})}),o.jsx(Xi,{visibilty:x,closeSettingFieldSidebar:De,...t}),o.jsx("div",{dir:s,className:ie(),children:a===i&&c===!0?o.jsx(li,{headerTemplate:n,toggleable:!0,children:o.jsx(tj,{ref:e,...t,field:f,isPreview:l,userSelectedLanguage:u,fieldIndex:h,customColumnHeaderTemplate:K,customColumnRowBodyTemplate:ve,setAllFields:fe,allFields:de,actionHeaderTemplate:oe,actionBodyTemplate:J,isFocus:E,inputValue:T,handleFieldSettingsSidebar:Te,isAdmin:c})}):o.jsx(tj,{ref:e,...t,field:f,isPreview:l,userSelectedLanguage:u,fieldIndex:h,customColumnHeaderTemplate:K,customColumnRowBodyTemplate:ve,setAllFields:fe,allFields:de,actionHeaderTemplate:oe,actionBodyTemplate:J,isFocus:E,inputValue:T,handleFieldSettingsSidebar:Te,isAdmin:c})})]})},rSe=t=>{const{indexes:e,customColumnIndex:n,allFields:r}=t;return o.jsx("div",{children:o.jsx(gn,{value:r[`${e==null?void 0:e.rowIndex}-${n}`]})})},nj=t=>{var m,g,v,A,S,x,w;const{field:e,isPreview:n,userSelectedLanguage:r,fieldIndex:i,customColumnHeaderTemplate:a,setAllFields:s,allFields:l,actionHeaderTemplate:c,actionBodyTemplate:u,isFocus:d,inputValue:f,isAdmin:h}=t;return o.jsxs("div",{className:`field ${n?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card p-fluid py-6 px-4":"card py-3 px-4"}`,children:[" ",o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(m=e==null?void 0:e.headerText)==null?void 0:m[r==null?void 0:r.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:i,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((g=e==null?void 0:e.attributes)==null?void 0:g.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",n?o.jsx(o.Fragment,{children:(v=e==null?void 0:e.label)==null?void 0:v[r==null?void 0:r.type]}):o.jsx(Zi,{path:"",...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(A=e==null?void 0:e.toolTip)==null?void 0:A[r==null?void 0:r.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",style:{backgroundColor:"#0a061a"},children:[o.jsxs(zs,{scrollable:!0,showGridlines:!0,value:e==null?void 0:e.rows,children:[e==null?void 0:e.customColumns.map((T,C)=>o.jsx(dr,{header:a(T),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(_,E)=>o.jsx(rSe,{customColumn:T,e:_,indexes:E,customColumnIndex:C,setAllFields:s,allFields:l,...t})},T==null?void 0:T.uuid)),n===!1&&o.jsx(dr,{frozen:!0,header:T=>c(T),body:T=>u(T),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((S=e==null?void 0:e.attributes)==null?void 0:S.required)&&o.jsx("small",{className:"error",children:d===1&&!f?(x=e==null?void 0:e.validationMesssage)==null?void 0:x.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(w=e==null?void 0:e.helperText)==null?void 0:w[r==null?void 0:r.type]})})]})]})}),h&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})},iSe=t=>{var Ee;const e=he=>{const V=he.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",te=`${he.className} justify-content-start`,W=`${he.titleClassName} pl-1`;return o.jsxs("div",{className:te,children:[o.jsxs("button",{className:he.togglerClassName,onClick:he.onTogglerClick,children:[o.jsx("span",{className:V}),o.jsx(Qt,{})]}),o.jsx("span",{className:W,children:_})]})},{userTaskSubmitFormData:n,TASK_PUBLISHED:r,task_status:i}=mr(),{userSelectedLanguage:a,fieldSettingUpdate:s}=on(),{globalAlignment:l,isPreview:c,isAdmin:u,isRenderView:d}=Zt(),{field:f,fieldIndex:h,sectionIndex:m,pageIndex:g,row:v,rowIndex:A,columnIndex:S}=t,[x,w]=N.useState(!1),[T,C]=N.useState(""),[_]=N.useState((Ee=f==null?void 0:f.label)==null?void 0:Ee[a==null?void 0:a.type]),[E,D]=N.useState(0),[B,k]=N.useState(!1),[P,j]=N.useState(null),[M,H]=N.useState(null),[de,fe]=N.useState({}),[ee,G]=N.useState(!1),ae=()=>{var he,V,te;if(v!=null&&v.rowIsRepeatable){if(v!=null&&v.repeatableFields){const W=[...v.repeatableFields],ue=_t.findIndex(W,function(Ae){return Ae.uuid===(f==null?void 0:f.uuid)});ue>=0&&W[ue].fieldData?C(W[ue].fieldData):C("")}}else{const W=n;if(W!=null&&W.length){for(const ue of W)if(ue.fieldId===t.field.uuid&&((he=ue==null?void 0:ue.postData[0])==null?void 0:he.postValue)!==""&&((V=ue==null?void 0:ue.postData[0])!=null&&V.postValue)){C((te=ue==null?void 0:ue.postData[0])==null?void 0:te.postValue);break}}}k(!0)},Y=()=>{const he=f;he.customColumns=[...he.customColumns,{customKey:"Column",uuid:nt(),options:[]}],me(he)},[ge,ne]=N.useState(!1),[J,K]=N.useState(!1),oe=he=>{var V;return o.jsxs(o.Fragment,{children:[((V=f==null?void 0:f.options)==null?void 0:V.length)>1&&o.jsx(Pt,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>Te(he==null?void 0:he.uuid),"aria-label":"Add Row",size:"small"}),o.jsx(Pt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>Q(),"aria-label":"Add Row",size:"small"})]})},ve=he=>{var V;return o.jsxs(o.Fragment,{children:[he==null?void 0:he.customKey,c===!1&&o.jsxs(o.Fragment,{children:[((V=f==null?void 0:f.customColumns)==null?void 0:V.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>De(he==null?void 0:he.uuid)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{j(he),ne(!0)}})]})]})},Ce=()=>o.jsx(o.Fragment,{children:o.jsx(Pt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>Y(),"aria-label":"Add Column"})}),Se=he=>o.jsxs(o.Fragment,{children:[he==null?void 0:he.rowHeading,c===!1&&o.jsx(o.Fragment,{children:o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{H(he),K(!0)}})})]}),Te=he=>{const V=f==null?void 0:f.rows.filter(function(W){return(W==null?void 0:W.uuid)!==he}),te=f;te.rows=V,me(te)},De=he=>{const V=_t.findIndex(f==null?void 0:f.customColumns,ue=>ue.uuid===he),te=f==null?void 0:f.customColumns.filter(function(ue,Ae){return Ae!==V}),W=f;W.customColumns=te,me(W)};N.useEffect(()=>{B||ae();const he=Xt.addListener("clearRepeatableFields",ue=>{ue===(v==null?void 0:v.uuid)&&(C(""),D(0),f.isValid=0,s(g,m,A,S,h,f))}),V=Xt.addListener("onSubmitUserForm",()=>{}),te=Xt.addListener("OnInvalidFieldCatch",ue=>{f.uuid===(ue==null?void 0:ue.fieldId)?D(1):D(0)}),W=Xt.addListener("OnGetFieldValue",ue=>{var pe;const Ae=(pe=ue==null?void 0:ue.repeatableColumn)==null?void 0:pe.filter(ke=>(ke==null?void 0:ke.fieldUuid)===(f==null?void 0:f.uuid));Ae!=null&&Ae.length});return()=>{V.remove(),te.remove(),W.remove(),he.remove()}});const ie=he=>{w(he)},U=()=>{w(!1)},re=()=>{let he="";return c||(he=he+" field-form-builder"),i===r&&u===!0&&(he=he+" card"),he},Q=()=>{const he=f;he.rows=[...he.rows,{rowHeading:"Row",uuid:nt(),custom_values:{}}],me(he)},se=(he,V)=>{j(Ae=>Ae===null?{customKey:V,uuid:""}:{...Ae,customKey:V});const te=f.customColumns,W=te.findIndex(Ae=>Ae.uuid===he.uuid);te[W]={...te[W],customKey:V};const ue=f;ue.customColumns=te,me(ue)},be=(he,V)=>{H(Ae=>Ae===null?{uuid:"",rowHeading:V}:{...Ae,rowHeading:V});const te=f.rows,W=te.findIndex(Ae=>Ae.uuid===he.uuid);te[W]={...te[W],rowHeading:V};const ue=f;ue.rows=te,me(ue)},me=he=>{s(g,m,A,S,h,he)},ye=()=>{G(!0)},Ie=()=>{G(!1)};return o.jsxs(o.Fragment,{children:[o.jsx(Is,{maximizable:!0,header:"Update Column Title",visible:ge,style:{width:"20vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsx(Pt,{text:!0,label:"Save",onClick:()=>ne(!1)})}),onHide:()=>ne(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(gn,{value:(P==null?void 0:P.customKey)||"",onChange:he=>se(P,he.target.value)})})}),o.jsx(Is,{maximizable:!0,header:"Update Row Title",visible:J,style:{width:"20vw"},footer:()=>o.jsx(Pt,{text:!0,label:"Save",onClick:()=>K(!1)}),onHide:()=>K(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(gn,{value:(M==null?void 0:M.rowHeading)||"",onChange:he=>be(M,he.target.value)})})}),o.jsx(Xi,{visibilty:x,closeSettingFieldSidebar:U,...t}),o.jsx("div",{className:"field-form-builder",children:o.jsxs("div",{onMouseOver:ye,onMouseOut:Ie,children:[!d&&!c&&ee&&o.jsx(jr,{handleFieldSettingsSidebar:ie,...t}),o.jsx("div",{dir:l,className:re(),children:i===r&&u===!0?o.jsx(li,{headerTemplate:e,toggleable:!0,children:o.jsx(nj,{...t,field:f,isPreview:c,userSelectedLanguage:a,fieldIndex:h,customColumnHeaderTemplate:ve,customColumnRowBodyTemplate:Se,setAllFields:fe,allFields:de,actionHeaderTemplate:Ce,actionBodyTemplate:oe,isFocus:E,inputValue:T,handleFieldSettingsSidebar:ie,isAdmin:u})}):o.jsx(nj,{...t,field:f,isPreview:c,userSelectedLanguage:a,fieldIndex:h,customColumnHeaderTemplate:ve,customColumnRowBodyTemplate:Se,setAllFields:fe,allFields:de,actionHeaderTemplate:Ce,actionBodyTemplate:oe,isFocus:E,inputValue:T,handleFieldSettingsSidebar:ie,isAdmin:u})})]})})]})},aSe=t=>{var De,ie,U,re,Q,se,be,me,ye,Ie,Ee;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i,updateUserFormDataSubmit:a}=mr(),[s,l]=N.useState([]),{field:c,fieldIndex:u,row:d,pageIndex:f,sectionIndex:h,section:m,page:g,rowIndex:v,columnIndex:A,path:S,update:x,value:w}=t,{isRenderView:T,isAdmin:C,isPreview:_}=Zt(),{userSelectedLanguage:E}=on(),[D,B]=N.useState(!1),[k,P]=N.useState(""),[j,M]=N.useState(0),[H,de]=N.useState(!1),[fe,ee]=N.useState(!1),G=()=>{ee(!0)},ae=()=>{ee(!1)},Y=he=>{B(he)},ge=()=>{B(!1)};N.useEffect(()=>((c==null?void 0:c.dataSourceType)==="custom"&&l(c==null?void 0:c.options),c==null||c.dataSourceType,()=>{}));const ne=()=>{var V,te,W,ue;let he=null;if(d!=null&&d.rowIsRepeatable){if(d!=null&&d.repeatableFields){const Ae=[...d.repeatableFields],pe=_t.findIndex(Ae,function(ke){return ke.uuid===(c==null?void 0:c.uuid)});pe>=0&&Ae[pe].fieldData?(he=Ae[pe].fieldData,P(Ae[pe].fieldData)):(c.isValid=0,P(""))}}else{const Ae=i,pe=_t.cloneDeep(e);if(Ae!=null&&Ae.length){for(const ke of Ae)if(ke.fieldId===t.field.uuid&&((V=ke==null?void 0:ke.postData)!=null&&V.length)){he=(te=ke==null?void 0:ke.postData[0])==null?void 0:te.postValue,P((W=ke==null?void 0:ke.postData[0])==null?void 0:W.postValue),pe[c==null?void 0:c.uuid]=(ue=ke==null?void 0:ke.postData[0])==null?void 0:ue.postValue;const Le=Object.keys(pe).length;r(Le);break}}}P(he),setTimeout(()=>{de(!0)},2e3)};N.useEffect(()=>{!H&&(i==null?void 0:i.length)>0&&ne();const he=Xt.addListener("clearRepeatableFields",W=>{W===(d==null?void 0:d.uuid)&&(P(""),M(0),c.isValid=1)}),V=Xt.addListener("onSubmitUserForm",()=>{var W;(W=c==null?void 0:c.attributes)!=null&&W.required?k?c.isValid=1:c.isValid=0:c.isValid=1}),te=Xt.addListener("OnInvalidFieldCatch",W=>{c.uuid===(W==null?void 0:W.fieldId)?M(1):M(0)});return()=>{V.remove(),te.remove(),he.remove()}});const J=(he,V)=>{var te;if(i){const W=[...i],ue=_t.findIndex(W,function(pe){return pe.rowId===(d==null?void 0:d.uuid)});let Ae=(te=i[ue])==null?void 0:te.repeatableFields;Ae={...Ae,[he==null?void 0:he.uuid]:V},W[ue]={...W[ue],repeatableFields:Ae},a(W)}P(V),V?he.isValid=1:he.isValid=0},K=he=>{var V;P(he.target.value),d!=null&&d.rowIsRepeatable?J(c,(V=he==null?void 0:he.target)==null?void 0:V.value):Se(he.target.value)},oe=()=>(c==null?void 0:c.dataSourceType)==="custom"?`optionText.${E.type}`:(c==null?void 0:c.dataSourceType)==="database"?`${c==null?void 0:c.optionLabel}`:"",ve=()=>(c==null?void 0:c.dataSourceType)==="custom"?`optionText.${E.type}`:(c==null?void 0:c.dataSourceType)==="database"?`${c==null?void 0:c.optionLabel}`:"",Ce=()=>{var he,V,te;if(((he=c==null?void 0:c.fieldType)==null?void 0:he.type)==="radio"){const W=[];return s.map((ue,Ae)=>{var ke,Le,We,gt;const pe=k;W.push(o.jsxs("div",{className:"field-radiobutton field-radiobutton-builder",onClick:()=>{K({value:ue,target:{value:ue}})},style:(pe==null?void 0:pe.uuid)===(ue==null?void 0:ue.uuid)?{backgroundColor:"#0F8BFD",padding:15,borderRadius:8}:{padding:15},children:[o.jsx(Ji,{onFocus:()=>M(1),inputId:`radio-option-${Ae}-${ue==null?void 0:ue.uuid}-${_?"preview":"builder-radio"}`,onChange:At=>{K(At)},value:ue,name:`radio-option-${Ae}-${ue==null?void 0:ue.uuid}-${_?"preview":"builder"}`,checked:(pe==null?void 0:pe.uuid)===(ue==null?void 0:ue.uuid),disabled:isDisabled}),((ke=ue==null?void 0:ue.hyperlinkText)==null?void 0:ke[E==null?void 0:E.type])===""?o.jsx("label",{htmlFor:`radio-option-${Ae}-${ue==null?void 0:ue.uuid}-${_?"preview":"builder"}`,children:(Le=ue==null?void 0:ue.optionText)==null?void 0:Le[E==null?void 0:E.type]}):o.jsx("label",{children:o.jsx("a",{href:(We=ue==null?void 0:ue.hyperlinkText)==null?void 0:We[E==null?void 0:E.type],target:"_blank",rel:"noreferrer",children:(gt=ue==null?void 0:ue.optionText)==null?void 0:gt[E==null?void 0:E.type]})})]},Ae))}),W}if(((V=c==null?void 0:c.fieldType)==null?void 0:V.type)==="dropdown")return o.jsx(Sa,{onFocus:()=>M(1),onChange:W=>{d!=null&&d.rowIsRepeatable?J(c,W.target.value):Se(W.target.value)},options:s,optionLabel:ve(),optionValue:oe(),value:k,placeholder:(te=c==null?void 0:c.placeholder)==null?void 0:te[E==null?void 0:E.type],disabled:isDisabled})},Se=he=>{var W,ue;P(he.target.value);const V=i,te=_t.cloneDeep(e);if(V!==null){if((W=he==null?void 0:he.target)!=null&&W.value){if(te[c==null?void 0:c.uuid]=(ue=he==null?void 0:he.target)==null?void 0:ue.value,(V==null?void 0:V.length)>0)for(const Ae of V)Ae.fieldId===t.field.uuid&&(Ae.postData[0]={postValue:he.target.value})}else if(delete te[c==null?void 0:c.uuid],(V==null?void 0:V.length)>0)for(const Ae of V)Ae.fieldId===t.field.uuid&&(Ae.postData[0]={postValue:""})}if(!(d!=null&&d.rowIsRepeatable)){n(te);const Ae=Object.keys(te).length;r(Ae)}},Te=o.jsxs("div",{onMouseOver:G,onMouseOut:ae,children:[!T&&!_&&fe&&o.jsx(jr,{handleFieldSettingsSidebar:Y,...t}),o.jsx("div",{className:`field-${(c==null?void 0:c.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(De=c==null?void 0:c.headerText)==null?void 0:De[E==null?void 0:E.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-medium mb-5 text-700 text-2xl",children:[o.jsx(ia,{sectionIndex:h,fieldIndex:u,field:c,update:x,value:w}),((ie=c==null?void 0:c.attributes)==null?void 0:ie.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",_?o.jsx(o.Fragment,{children:(U=c==null?void 0:c.label)==null?void 0:U[E==null?void 0:E.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:c!=null&&c.showToolTip?o.jsx(o.Fragment,{children:o.jsx(Mi,{message:(re=c==null?void 0:c.toolTip)==null?void 0:re[E==null?void 0:E.type],position:"right"})}):""})]}),Ce(),o.jsx("div",{children:((Q=c==null?void 0:c.attributes)==null?void 0:Q.required)&&o.jsx("small",{className:"error",children:j===1&&!k?(se=c==null?void 0:c.validationMesssage)==null?void 0:se.language:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(be=c==null?void 0:c.helperText)==null?void 0:be[E==null?void 0:E.type]})}),((me=c==null?void 0:c.inlineConditionalRules)==null?void 0:me.rules.length)>0&&_===!1&&o.jsx("p",{children:"Inline conditional rules"}),H===!0&&((Ie=(ye=c==null?void 0:c.inlineConditionalRules)==null?void 0:ye.rules)==null?void 0:Ie.length)>0&&((Ee=c==null?void 0:c.inlineConditionalRules)==null?void 0:Ee.rules.map((he,V)=>{const te=k;return _===!0?o.jsx("div",{children:he==null?void 0:he.conditions.map((W,ue)=>o.jsx(N.Fragment,{children:o.jsx(Qd,{isConditionTrue:(te==null?void 0:te.value)==W.value||!_,inputValue:k,condition:W,ruleIndex:V,conditionIndex:ue,field:c,section:m,page:g,row:d,pageIndex:f,sectionIndex:h,rowIndex:v,columnIndex:A,path:S,...t})},`select-rule-${V}-`+ue))},`rule-${V}`):o.jsx(li,{className:"mt-4",header:`Rule ${V+1}`,children:o.jsx("div",{children:he==null?void 0:he.conditions.map((W,ue)=>o.jsx(N.Fragment,{children:o.jsx(Qd,{isConditionTrue:(te==null?void 0:te.value)===W.value||!_,inputValue:k,condition:W,ruleIndex:V,conditionIndex:ue,isPreview:_,field:c,section:m,page:g,row:d,pageIndex:f,sectionIndex:h,rowIndex:v,columnIndex:A,path:S,...t})},`select-rule-${V}-`+ue))},`rule-${V}`)},V)}))]}),C&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[D===!0&&o.jsx(Xi,{visibilty:D,closeSettingFieldSidebar:ge,...t},c==null?void 0:c.uuid),o.jsx(wi,{...t,fieldWrap:Te})]})},sSe=t=>{var de,fe,ee,G;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i}=mr(),{field:a,row:s,isDisabled:l}=t,{isPreview:c,isRenderView:u,isAdmin:d}=Zt(),{userSelectedLanguage:f}=on(),[h,m]=N.useState(!1),[g,v]=N.useState(""),[A,S]=N.useState(0),[x,w]=N.useState(!1),[T,C]=N.useState(!1),_=()=>{C(!0)},E=()=>{C(!1)},D=ae=>{m(ae)},B=()=>{m(!1)},k=()=>{var Y,ge,ne,J;let ae=null;if(s!=null&&s.rowIsRepeatable){if(s!=null&&s.repeatableFields){const K=[...s.repeatableFields],oe=_t.findIndex(K,function(ve){return ve.uuid===(a==null?void 0:a.uuid)});oe>=0&&K[oe].fieldData?(ae=K[oe].fieldData,v(K[oe].fieldData)):(a.isValid=0,v(""))}}else{const K=i,oe=_t.cloneDeep(e);if(K!=null&&K.length){for(const ve of K)if(ve.fieldId===t.field.uuid&&((Y=ve==null?void 0:ve.postData)!=null&&Y.length)){ae=(ge=ve==null?void 0:ve.postData[0])==null?void 0:ge.postValue,v((ne=ve==null?void 0:ve.postData[0])==null?void 0:ne.postValue),oe[a==null?void 0:a.uuid]=(J=ve==null?void 0:ve.postData[0])==null?void 0:J.postValue;const Ce=Object.keys(oe).length;r(Ce);break}}}v(ae),setTimeout(()=>{w(!0)},2e3)};N.useEffect(()=>{x||k();const ae=Xt.addListener("clearRepeatableFields",ne=>{ne===(s==null?void 0:s.uuid)&&(v(""),S(0),a.isValid=1)}),Y=Xt.addListener("onSubmitUserForm",()=>{var ne;if((ne=a==null?void 0:a.attributes)!=null&&ne.required){const J=g;J!=null&&J[a.uuid]?a.isValid=1:a.isValid=0}else a.isValid=1}),ge=Xt.addListener("OnInvalidFieldCatch",ne=>{a.uuid===(ne==null?void 0:ne.fieldId)?S(1):S(0)});return()=>{Y.remove(),ge.remove(),ae.remove()}});const P=(ae,Y,ge,ne,J)=>ne==null?void 0:ne.map(K=>{var oe,ve;return{...K,children:K!=null&&K.children&&((oe=K==null?void 0:K.children)==null?void 0:oe.length)>0?[...((ve=K==null?void 0:K.children)==null?void 0:ve.map(Ce=>Y===(K==null?void 0:K.uuid)||J===!0?(ge!=null&&ge[Ce==null?void 0:Ce.uuid]&&delete ge[Ce==null?void 0:Ce.uuid],{...Ce,options:P(ae,Y,ge,(Ce==null?void 0:Ce.options)||[],!0)}):{...Ce,options:P(ae,Y,ge,(Ce==null?void 0:Ce.options)||[],!1)}))||[]]:[]}}),j=(ae,Y)=>{const ge={...g};P(ae,Y,ge,a==null?void 0:a.options,!1),ge[ae]=Y,v(ge),s!=null&&s.rowIsRepeatable||M(ge)},M=ae=>{const Y=i,ge=_t.cloneDeep(e);if(Y!==null){if(ae){if(ge[a==null?void 0:a.uuid]=ae,(Y==null?void 0:Y.length)>0)for(const ne of Y)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:ae})}else if(delete ge[a==null?void 0:a.uuid],(Y==null?void 0:Y.length)>0)for(const ne of Y)ne.fieldId===t.field.uuid&&(ne.postData[0]={postValue:""})}if(!(s!=null&&s.rowIsRepeatable)){n(ge);const ne=Object.keys(ge).length;r(ne)}},H=o.jsxs("div",{onMouseOver:_,onMouseOut:E,children:[!u&&!c&&T&&o.jsx(jr,{handleFieldSettingsSidebar:D,...t}),o.jsx("div",{className:`field-${(a==null?void 0:a.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(a==null?void 0:a.showHeaderText)&&o.jsx("h6",{children:(de=a==null?void 0:a.headerText)==null?void 0:de[f==null?void 0:f.type]}),o.jsx(q7,{...t,isDisabled:l,isFirst:!0,isPreview:c,schema:a,field:a,value:g,update:(ae,Y)=>{j(ae,Y)}}),o.jsx("div",{children:((fe=a==null?void 0:a.attributes)==null?void 0:fe.required)&&o.jsx("small",{className:"error",children:A===1&&!g?(ee=a==null?void 0:a.validationMesssage)==null?void 0:ee.english:""})}),o.jsx("div",{children:(a==null?void 0:a.showHelperText)&&o.jsx("small",{children:(G=a==null?void 0:a.helperText)==null?void 0:G[f==null?void 0:f.type]})})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[o.jsx(Xi,{visibilty:h,closeSettingFieldSidebar:B,...t},a==null?void 0:a.uuid),o.jsx(wi,{...t,fieldWrap:H})]})},oSe=t=>{var oe,ve,Ce,Se,Te,De,ie,U,re,Q;const{field:e,fieldIndex:n,sectionIndex:r,pageIndex:i,row:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isRenderView:u,isAdmin:d,isPreview:f}=Zt(),{taskRegisterData:h,updateTaskRegisterData:m,updateTaskProgressValue:g,updateUserFormDataSubmit:v,userTaskSubmitFormData:A,task_status:S,TASK_PUBLISHED:x}=mr(),[w,T]=N.useState(!1),{userSelectedLanguage:C,fieldSettingUpdate:_}=on(),[E,D]=N.useState(!1),[B,k]=N.useState(0),[P,j]=N.useState(),[M,H]=N.useState(!1),de=()=>{H(!0)},fe=()=>{H(!1)},ee=[{icon:"pi pi-thumbs-up",thumbValue:"up"},{icon:"pi pi-thumbs-down",thumbValue:"down"}],G=se=>o.jsx("span",{className:"m-2",children:o.jsx("i",{style:{fontSize:30},className:se.icon})}),ae=()=>{var se,be,me;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ye=[...a.repeatableFields],Ie=_t.findIndex(ye,function(Ee){return Ee.uuid===(e==null?void 0:e.uuid)});Ie>=0&&ye[Ie].fieldData?j(ye[Ie].fieldData):j("")}}else{const ye=A;if(ye!=null&&ye.length){for(const Ie of ye)if(Ie.fieldId===t.field.uuid&&((se=Ie==null?void 0:Ie.postData[0])==null?void 0:se.postValue)!==""&&((be=Ie==null?void 0:Ie.postData[0])!=null&&be.postValue)){j((me=Ie==null?void 0:Ie.postData[0])==null?void 0:me.postValue);break}}}D(!0)};N.useEffect(()=>{E||ae();const se=Xt.addListener("clearRepeatableFields",Ie=>{Ie===(a==null?void 0:a.uuid)&&(j(""),k(0),e.isValid=0,_(i,r,s,l,n,e))}),be=Xt.addListener("onSubmitUserForm",()=>{var Ie;(Ie=e==null?void 0:e.attributes)!=null&&Ie.required?P?e.isValid=1:e.isValid=0:e.isValid=1}),me=Xt.addListener("OnInvalidFieldCatch",Ie=>{e.uuid===(Ie==null?void 0:Ie.fieldId)?k(1):k(0)}),ye=Xt.addListener("OnGetFieldValue",Ie=>{var he;const Ee=(he=Ie==null?void 0:Ie.repeatableColumn)==null?void 0:he.filter((V,te)=>(V==null?void 0:V.fieldUuid)===(e==null?void 0:e.uuid));Ee!=null&&Ee.length});return()=>{be.remove(),me.remove(),ye.remove(),se.remove()}});const Y=se=>{j(se.value);const be=A,me=_t.cloneDeep(h);if(be!==null){if(se!=null&&se.value){if(me[e==null?void 0:e.uuid]=se==null?void 0:se.value,(be==null?void 0:be.length)>0)for(const ye of be)ye.fieldId===t.field.uuid&&(ye.postData[0]={postValue:se.value})}else if(delete me[e==null?void 0:e.uuid],(be==null?void 0:be.length)>0)for(const ye of be)ye.fieldId===t.field.uuid&&(ye.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){m(me);const ye=Object.keys(me).length;g(ye)}},ge=(se,be)=>{var me;if(A){const ye=[...A],Ie=_t.findIndex(ye,function(he){return he.rowId===(a==null?void 0:a.uuid)});let Ee=(me=A[Ie])==null?void 0:me.repeatableFields;Ee={...Ee,[se==null?void 0:se.uuid]:be},ye[Ie]={...ye[Ie],repeatableFields:Ee},v(ye)}j(be),be!==""?se.isValid=1:se.isValid=0},ne=se=>{T(se)},J=()=>{T(!1)},K=o.jsxs("div",{onMouseOver:de,onMouseOut:fe,children:[!u&&!f&&M&&o.jsx(jr,{handleFieldSettingsSidebar:ne,...t}),o.jsx("div",{className:`field ${f?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:d?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(oe=e==null?void 0:e.headerText)==null?void 0:oe[C==null?void 0:C.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((ve=e==null?void 0:e.attributes)==null?void 0:ve.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",f?o.jsx(o.Fragment,{children:(Ce=e==null?void 0:e.label)==null?void 0:Ce[C==null?void 0:C.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(Se=e==null?void 0:e.toolTip)==null?void 0:Se[C==null?void 0:C.type],position:"right"})})]}),o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((De=(Te=e==null?void 0:e.icon)==null?void 0:Te.properties)==null?void 0:De.name)}),o.jsx("div",{className:"card flex justify-content-start",children:o.jsx(q0,{value:P,onChange:se=>{j(se.value),a!=null&&a.rowIsRepeatable?ge(e,se.value):Y(se)},itemTemplate:G,optionLabel:"value",onFocus:()=>k(1),options:ee,readOnly:c,className:B===1&&((ie=e==null?void 0:e.attributes)!=null&&ie.required)?P?"valid":"invalid":"valid'"})})]}),o.jsx("div",{children:((U=e==null?void 0:e.attributes)==null?void 0:U.required)&&o.jsx(o.Fragment,{children:o.jsx("small",{className:"error",children:B===1&&!P?(re=e==null?void 0:e.validationMesssage)==null?void 0:re.english:""})})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(Q=e==null?void 0:e.helperText)==null?void 0:Q[C==null?void 0:C.type]})})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[o.jsx(Xi,{visibilty:w,closeSettingFieldSidebar:J,...t}),o.jsx(wi,{...t,fieldWrap:K})]})},lSe=t=>{var ne,J,K,oe,ve,Ce,Se;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a}=mr(),{userSelectedLanguage:s,fieldSettingUpdate:l}=on(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:m,columnIndex:g}=t,{isRenderView:v,isAdmin:A,isPreview:S}=Zt(),[x,w]=N.useState(!1),[T,C]=N.useState(""),[_,E]=N.useState(0),[D,B]=N.useState(!1),[k,P]=N.useState(!1),j=()=>{P(!0)},M=()=>{P(!1)},H=()=>{var Te,De,ie;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const U=[...h.repeatableFields],re=_t.findIndex(U,function(Q){return Q.uuid===(c==null?void 0:c.uuid)});re>=0&&U[re].fieldData?C(U[re].fieldData):C("")}}else{const U=a;if(U!=null&&U.length){for(const re of U)if(re.fieldId===t.field.uuid&&((Te=re==null?void 0:re.postData[0])==null?void 0:Te.postValue)!==""&&((De=re==null?void 0:re.postData[0])!=null&&De.postValue)){C((ie=re==null?void 0:re.postData[0])==null?void 0:ie.postValue);break}}}B(!0)};N.useEffect(()=>{D||H();const Te=Xt.addListener("clearRepeatableFields",re=>{re===(h==null?void 0:h.uuid)&&(C(""),E(0),c.isValid=0,l(f,d,m,g,u,c))}),De=Xt.addListener("onSubmitUserForm",()=>{var re;(re=c==null?void 0:c.attributes)!=null&&re.required?T?c.isValid=1:c.isValid=0:c.isValid=1}),ie=Xt.addListener("OnInvalidFieldCatch",re=>{c.uuid===(re==null?void 0:re.fieldId)?E(1):E(0)}),U=Xt.addListener("OnGetFieldValue",re=>{var se;const Q=(se=re==null?void 0:re.repeatableColumn)==null?void 0:se.filter(be=>(be==null?void 0:be.fieldUuid)===(c==null?void 0:c.uuid));Q!=null&&Q.length});return()=>{De.remove(),ie.remove(),U.remove(),Te.remove()}});const de=Te=>{w(Te)},fe=()=>{w(!1)},ee=Te=>{var U,re;C(Te.target.value);const De=a,ie=_t.cloneDeep(e);if(De!==null){if((U=Te==null?void 0:Te.target)!=null&&U.value){if(ie[c==null?void 0:c.uuid]=(re=Te==null?void 0:Te.target)==null?void 0:re.value,(De==null?void 0:De.length)>0)for(const Q of De)Q.fieldId===t.field.uuid&&(Q.postData[0]={postValue:Te.target.value})}else if(delete ie[c==null?void 0:c.uuid],(De==null?void 0:De.length)>0)for(const Q of De)Q.fieldId===t.field.uuid&&(Q.postData[0]={postValue:""})}if(!(h!=null&&h.rowIsRepeatable)){n(ie);const Q=Object.keys(ie).length;r(Q)}},G=(Te,De,ie,U)=>{var re;if(a){const Q=[...a],se=_t.findIndex(Q,function(me){return me.rowId===(h==null?void 0:h.uuid)});let be=(re=a[se])==null?void 0:re.repeatableFields;be={...be,[ie==null?void 0:ie.uuid]:U},Q[se]={...Q[se],repeatableFields:be},i(Q)}C(U),U!==""?ie.isValid=1:ie.isValid=0},ae=5,Y=()=>{const Te=[],De=[BE,LE,VE,kE,ME],ie=["Awful","Not Very Good","Okay","Really Good","Fantastic"];for(let U=0;U<ae;U++)Te.push(o.jsxs("label",{children:[o.jsx("input",{onChange:re=>{h!=null&&h.rowIsRepeatable?G(f,d,c,re.target.value):ee(re)},checked:parseInt(T)===U,name:"liker-Emoji-scale"+(c==null?void 0:c.uuid),type:"radio",value:U}),o.jsxs("span",{className:"grid m-0",children:[o.jsx("div",{className:"col-12 flex justify-content-center",children:o.jsx("img",{src:De[U]})}),o.jsx("div",{children:ie[U]})]})]},`field-${c==null?void 0:c.uuid}-likertEmojiScale-${U} ${parseInt(T)===U?"scale-selected":""}`));return Te},ge=o.jsxs("div",{onMouseOver:j,onMouseOut:M,children:[!v&&!S&&k&&o.jsx(jr,{handleFieldSettingsSidebar:de,...t}),o.jsxs("div",{className:`field ${S?" ":" builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 ",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(ne=c==null?void 0:c.headerText)==null?void 0:ne[s==null?void 0:s.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:`label${u}`,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((J=c==null?void 0:c.attributes)==null?void 0:J.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",S?o.jsx(o.Fragment,{children:(K=c==null?void 0:c.label)==null?void 0:K[s==null?void 0:s.type]}):o.jsx(Zi,{...t}),o.jsx("span",{className:"ml-3",children:(c==null?void 0:c.showToolTip)&&o.jsx(Mi,{message:(oe=c==null?void 0:c.toolTip)==null?void 0:oe[s==null?void 0:s.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("div",{children:o.jsx("div",{className:"emoji",children:Y()})}),o.jsx("div",{children:((ve=c==null?void 0:c.attributes)==null?void 0:ve.required)&&o.jsx("small",{className:"error",children:_===1&&!T?(Ce=c==null?void 0:c.validationMesssage)==null?void 0:Ce.english:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(Se=c==null?void 0:c.helperText)==null?void 0:Se[s==null?void 0:s.type]})})]})]})}),A&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(Xi,{visibilty:x,closeSettingFieldSidebar:fe,...t}),o.jsx(wi,{...t,fieldWrap:ge})]})},cSe=t=>{var H,de,fe,ee,G,ae,Y,ge,ne,J,K;const{userTaskSubmitFormData:e}=mr(),{userSelectedLanguage:n,fieldSettingUpdate:r}=on(),{isPreview:i,isAdmin:a,isRenderView:s}=Zt(),{field:l,fieldIndex:c,sectionIndex:u,pageIndex:d,row:f,rowIndex:h,columnIndex:m}=t,[g,v]=N.useState(!1),[A,S]=N.useState(""),[x,w]=N.useState(0),[T,C]=N.useState(!1),[_,E]=N.useState(!1),D=()=>{E(!0)},B=()=>{E(!1)},k=()=>{var oe,ve,Ce;if(f!=null&&f.rowIsRepeatable){if(f!=null&&f.repeatableFields){const Se=[...f.repeatableFields],Te=_t.findIndex(Se,function(De){return De.uuid===(l==null?void 0:l.uuid)});Te>=0&&Se[Te].fieldData?S(Se[Te].fieldData):S("")}}else{const Se=e;if(Se!=null&&Se.length){for(const Te of Se)if(Te.fieldId===t.field.uuid&&((oe=Te==null?void 0:Te.postData[0])==null?void 0:oe.postValue)!==""&&((ve=Te==null?void 0:Te.postData[0])!=null&&ve.postValue)){S((Ce=Te==null?void 0:Te.postData[0])==null?void 0:Ce.postValue);break}}}C(!0)};N.useEffect(()=>{T||k();const oe=Xt.addListener("clearRepeatableFields",Te=>{Te===(f==null?void 0:f.uuid)&&(S(""),w(0),l.isValid=0,r(d,u,h,m,c,l))}),ve=Xt.addListener("onSubmitUserForm",()=>{var Te,De;(Te=l==null?void 0:l.attributes)!=null&&Te.required?A&&(A==null?void 0:A.length)<((De=l==null?void 0:l.attributes)==null?void 0:De.minLength)?l.isValid=1:l.isValid=0:l.isValid=1}),Ce=Xt.addListener("OnInvalidFieldCatch",Te=>{l.uuid===(Te==null?void 0:Te.fieldId)?w(1):w(0)}),Se=Xt.addListener("OnGetFieldValue",Te=>{var ie;const De=(ie=Te==null?void 0:Te.repeatableColumn)==null?void 0:ie.filter(U=>(U==null?void 0:U.fieldUuid)===(l==null?void 0:l.uuid));De!=null&&De.length});return()=>{ve.remove(),Ce.remove(),Se.remove(),oe.remove()}});const P=oe=>{v(oe)},j=()=>{v(!1)},M=o.jsxs("div",{onMouseOver:D,onMouseOut:B,children:[!s&&!i&&_&&o.jsx(jr,{handleFieldSettingsSidebar:P,...t}),o.jsxs("div",{className:`field ${i?" ":" builder-element-wrapper "}${(l==null?void 0:l.isFluid)===!0?" card p-fluid ":"card"} ${s?" ":" py-6 px-4 "}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:a?"col-6 ":"col-12 p-fluid",children:[(l==null?void 0:l.showHeaderText)&&o.jsx("h6",{children:(H=l==null?void 0:l.headerText)==null?void 0:H[n==null?void 0:n.type]}),(l==null?void 0:l.showLabel)&&o.jsxs("label",{htmlFor:c,className:"flex font-medium mb-3 text-700 text-2xl",children:[o.jsx(ia,{...t}),((de=l==null?void 0:l.attributes)==null?void 0:de.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",i?o.jsx(o.Fragment,{children:(fe=l==null?void 0:l.label)==null?void 0:fe[n==null?void 0:n.type]}):o.jsx(Zi,{...t}),(l==null?void 0:l.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(Mi,{message:(ee=l==null?void 0:l.toolTip)==null?void 0:ee[n==null?void 0:n.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("span",{className:"p-input-icon-"+(l==null?void 0:l.iconAlignment),children:(l==null?void 0:l.showIcon)&&o.jsx("i",{className:"pi pi-"+((ae=(G=l==null?void 0:l.icon)==null?void 0:G.properties)==null?void 0:ae.name)})}),o.jsx("div",{children:((Y=l==null?void 0:l.attributes)==null?void 0:Y.required)&&o.jsxs(o.Fragment,{children:[o.jsx("small",{className:"error",children:x===1&&!A?(ge=l==null?void 0:l.validationMesssage)==null?void 0:ge.english:""}),o.jsx("small",{className:"error",children:x===1&&(A==null?void 0:A.length)<((ne=l==null?void 0:l.attributes)==null?void 0:ne.minLength)?`Mini length ${(J=l==null?void 0:l.attributes)==null?void 0:J.minLength}`:""})]})}),o.jsx("div",{children:(l==null?void 0:l.showHelperText)&&o.jsx("small",{children:(K=l==null?void 0:l.helperText)==null?void 0:K[n==null?void 0:n.type]})})]})]})}),a&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(Xi,{visibilty:g,closeSettingFieldSidebar:j,...t}),o.jsx(wi,{...t,fieldWrap:M})]})},uSe=t=>{var j,M,H,de,fe,ee,G;const{field:e,fieldIndex:n,columnIndex:r,sectionIndex:i,rowIndex:a,pageIndex:s,ref:l}=t,{isPreview:c}=Zt(),{userSelectedLanguage:u,fieldSettingUpdate:d}=on(),{userTaskSubmitFormData:f}=mr(),[h,m]=N.useState(!1),[g,v]=N.useState(""),[A,S]=N.useState(0),[x,w]=N.useState(!1),[T,C]=N.useState(!1),_=()=>{C(!0)},E=()=>{C(!1)},D=()=>{var Y;const ae=f;if(ae.length){for(const ge of ae)if(ge.fieldId===t.field.uuid){v((Y=ge==null?void 0:ge.postData[0])==null?void 0:Y.postValue),w(!0);break}}};N.useEffect(()=>{x||D();const ae=Xt.addListener("onSubmitUserForm",()=>{var ge;(ge=e==null?void 0:e.attributes)!=null&&ge.required&&(g?e.isValid=1:e.isValid=0,d(s,i,a,r,n,e))}),Y=Xt.addListener("OnInvalidFieldCatch",ge=>{e.uuid===(ge==null?void 0:ge.fieldId)?S(1):S(0)});return()=>{ae.remove(),Y.remove()}});const B=ae=>{m(ae)},k=()=>{m(!1)},P=o.jsxs("div",{onMouseOver:_,onMouseOut:E,children:[!c&&T&&o.jsx(jr,{handleFieldSettingsSidebar:B,...t}),o.jsx("div",{className:c?"":"field-form-builder",ref:l,children:o.jsx("div",{className:"field",children:o.jsx("div",{className:"grid",children:o.jsxs("div",{className:c?"col-12":"col-11",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(j=e==null?void 0:e.headerText)==null?void 0:j[u==null?void 0:u.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:`${n}`,className:"flex font-medium mb-3 text-700 text-2xl",children:[((M=e==null?void 0:e.attributes)==null?void 0:M.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",i+1,".",r+1,".",n+1," ",(H=e==null?void 0:e.label)==null?void 0:H[u==null?void 0:u.type],o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(Mi,{message:(de=e==null?void 0:e.toolTip)==null?void 0:de[u==null?void 0:u.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("p",{children:"Anchor Tag"}),o.jsx("div",{children:((fe=e==null?void 0:e.attributes)==null?void 0:fe.required)&&o.jsx("small",{className:"error",children:A===1&&!g?(ee=e==null?void 0:e.validationMesssage)==null?void 0:ee.language:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(G=e==null?void 0:e.helperText)==null?void 0:G[u==null?void 0:u.type]})})]})]})})})})]});return o.jsxs(o.Fragment,{children:[h===!0&&o.jsx(Xi,{visibilty:h,closeSettingFieldSidebar:k,...t}),o.jsx(wi,{...t,fieldWrap:P})]})},qc=t=>{const{data:e,path:n,field:r}=t,{renderType:i,isPreview:a,isAdmin:s}=Zt(),{task_status:l,TASK_PUBLISHED:c}=mr(),u=N.useRef(null),[d,f]=N.useState(!1),[{isDragging:h},m]=Qi({item:{...e,type:j1,uuid:e==null?void 0:e.uuid,path:n},type:j1,collect:T=>({isDragging:T.isDragging()})}),g=h?.25:1;m(u);const v=l===c||s;console.log("isDisabled",v);const A=T=>{switch(r==null?void 0:r.componentType){case"text":return o.jsx(wle,{typeName:"Text",field:r,...T});case"number":return o.jsx(Ele,{typeName:"Number",field:r,...T});case"email":return o.jsx(Ile,{typeName:"Email",field:r,...T});case"textarea":return o.jsx(_le,{typeName:"Text Area",field:r,...T});case"editor":return o.jsx(Xle,{typeName:"Editor",field:r,...T});case"question":return o.jsx(xce,{typeName:"Exam",field:r,...T});case"select":return o.jsx(Mle,{typeName:"Select",field:r,...T});case"multi-select":return o.jsx(cce,{typeName:"Multi Select",field:r,...T});case"checkbox":return o.jsx(uce,{typeName:"Checkbox",field:r,...T});case"radio":return o.jsx(fce,{typeName:"Radio",field:r,...T});case"radio-hierarchal":return o.jsx(sSe,{typeName:"Radio Progressive",field:r,...T});case"href":return o.jsx(Tle,{typeName:"Href",field:r,...T});case"heading":return o.jsx(mce,{typeName:"Heading",field:r,...T});case"paragraph":return o.jsx(Ive,{typeName:"Paragraph",field:r,...T});case"image":return o.jsx(KF,{typeName:"Image",field:r,...T});case"video":return o.jsx(D3e,{typeName:"Video",field:r,...T});case"hr":return o.jsx(O3e,{typeName:"Hr",field:r,...T});case"date-picker":return o.jsx(N3e,{typeName:"Date Picker",field:r,...T});case"signature":return o.jsx(F3e,{typeName:"Signature",field:r,...T});case"file-upload":return o.jsx(Dbe,{typeName:"File Upload",field:r,...T});case"facebook-login":return o.jsx(cSe,{typeName:"Facebook Login",field:r,...T});case"anchor":return o.jsx(uSe,{ref:u,typeName:"Anchor Tag",field:r,...T});case"image-gallery":return o.jsx(Cve,{typeName:"Image Gallery",field:r,...T});case"quiz":return o.jsx(Fbe,{typeName:"Quiz",field:r,...T});case"document":return o.jsx(Obe,{typeName:"Document",field:r,...T});case"list":return o.jsx(Mbe,{typeName:"List",field:r,...T});case"country":return o.jsx(Ale,{typeName:"Country",field:r,...T});case"phone":return o.jsx(zwe,{typeName:"Phone",field:r,...T});case"web-url":return o.jsx(Hwe,{typeName:"Website Url",field:r,...T});case"rating":return o.jsx(Gwe,{typeName:"Rating",field:r,...T});case"slider":return o.jsx(Rwe,{typeName:"Rating",field:r,...T});case"hidden-field":return o.jsx(Wwe,{typeName:"Hidden Field",field:r,...T});case"likert-scale":return o.jsx(Qwe,{typeName:"Likert Scale Field",field:r,...T});case"type-signature":return o.jsx(Jwe,{typeName:"Likert Scale Field",field:r,...T});case"address":return o.jsx(Zwe,{typeName:"Address",field:r,...T});case"grid-component":return o.jsx(ej,{typeName:"Grid",field:r,...T});case"matrix-scale":return o.jsx(ej,{typeName:"Grid",field:r,...T});case"matrix-dropdown":return o.jsx(nSe,{typeName:"Grid",field:r,...T});case"thumbs":return o.jsx(oSe,{typeName:"Thumbs Up and Down",field:r,...T});case"likert-emoji-scale":return o.jsx(lSe,{typeName:"Thumbs Up and Down",field:r,...T});case"table":return o.jsx(iSe,{typeName:"Grid",field:r,...T});case"dynamic-listing":return o.jsx(aSe,{typeName:"Grid",field:r,...T});default:return o.jsx(o.Fragment,{children:"Empty"})}},S=()=>{f(!0)},x=()=>{f(!1)},w=()=>{let T="";return a?(T=T+" component ",i===H1?T=T+" ":T=T+" px-2 "):(T=T+" component draggable field-form-builder-not-preview",i===H1?T=T+" pdf-component":T=T+" px-2 pdf-component"),T};return o.jsx(o.Fragment,{children:o.jsxs("div",{style:{opacity:g},className:w(),onMouseOver:S,onMouseOut:x,children:[!a&&d&&o.jsx("i",{ref:a===!1?u:null,className:"elementDrag-icon pi pi-arrows-alt cursor-move",style:{fontSize:"1em"}}),A({...t,isDisabled:v})]})})},dSe={position:"relative"},fSe=t=>{var B,k,P,j,M;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=N.useRef(null),{removeColumn:f,addColumn:h,cloneColumn:m,formBuilderFormLayout:g,handleDrop:v}=on(),{isPreview:A,isRenderView:S,isAdvanceView:x,emitSocketData:w}=Zt(),[{isDragging:T},C]=Qi({type:ms,item:{type:ms,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:H=>({isDragging:H.isDragging()})}),_=T&&!S?.25:1;C(d);const E=(H,de,fe,ee,G,ae,Y)=>o.jsx(qc,{page:u,type:"field",row:c,column:e,section:l,field:H,data:H,path:de,pageIndex:fe,sectionIndex:ee,rowIndex:G,columnIndex:ae,fieldIndex:Y},`component-${n}-${H==null?void 0:H.uuid}`),D=(H,de,fe,ee,G)=>{var ne,J,K,oe;const ae=H.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Y=`${H.className} justify-content-space-between`,ge=`${H.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".add-column-tool"}),o.jsxs("div",{className:Y,children:[o.jsxs("span",{ref:A===!1?d:null,children:[o.jsx("button",{className:H.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:H.togglerClassName,onClick:H.onTogglerClick,children:[o.jsx("span",{className:ae}),o.jsx(Qt,{})]}),o.jsx("span",{className:ge,children:"Column"})]}),A===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{h(de,fe,ee),w()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((oe=(K=(J=(ne=g[de])==null?void 0:ne.children[fe])==null?void 0:J.children[ee])==null?void 0:K.children)==null?void 0:oe.length)>1&&o.jsxs("button",{className:H.togglerClassName,onClick:()=>{f(de,fe,ee,G),w()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{m(e,de,fe,ee,G),w()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsx("div",{style:x?{...dSe,opacity:_}:{},className:S?"form-builder-column container-column":"draggable form-builder-column container-column",children:A===!1?o.jsx(o.Fragment,{children:x===!0?o.jsxs(li,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:H=>D(H,r,i,a,s),children:[((B=e==null?void 0:e.children)==null?void 0:B.length)>0?(k=e==null?void 0:e.children)==null?void 0:k.map((H,de)=>{const fe=`${n}-${de}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:x,fieldDropArea:!0,data:{path:fe,childrenCount:e.children.length,droppedField:e},onDrop:v}),E(H,fe,r,i,a,s,de)]},fe)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Tr,{isAdvanceView:x,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:v,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((P=e==null?void 0:e.children)==null?void 0:P.length)>0?(j=e==null?void 0:e.children)==null?void 0:j.map((H,de)=>{const fe=`${n}-${de}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:x,fieldDropArea:!0,data:{path:fe,childrenCount:e.children.length,droppedField:e},onDrop:v}),E(H,fe,r,i,a,s,de)]},fe)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Tr,{isAdvanceView:x,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:v,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(M=e==null?void 0:e.children)==null?void 0:M.map((H,de)=>{const fe=`${n}-${de}`;return o.jsx(N.Fragment,{children:E(H,fe,r,i,a,s,de)},fe)})})})},hSe=t=>{var i,a,s;const{language:e,onHandleChange:n,stateRow:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Row Heading"}),o.jsx(gn,{value:(i=r==null?void 0:r.heading)==null?void 0:i[e==null?void 0:e.type],onChange:l=>n("heading",e,l.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Row Description"}),o.jsx(_s,{value:(a=r==null?void 0:r.subHeadingText)==null?void 0:a[e==null?void 0:e.type],onChange:l=>n("subHeadingText",e,l.target.value)})]}),(r==null?void 0:r.rowIsRepeatable)===!0&&o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Add To List Button Label"}),o.jsx(gn,{value:(s=r.addToListButtonLabel)==null?void 0:s[e==null?void 0:e.type],onChange:l=>n("addToListButtonLabel",e,l.target.value)})]})]})},pSe=t=>{const{stateRow:e,onHandleChangeAdvanceSettings:n}=t,{renderType:r}=Zt();return o.jsxs("div",{className:"p-fluid",children:[r===F0&&o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Or,{inputId:"rowIsRepeatable",checked:e==null?void 0:e.rowIsRepeatable,onChange:i=>n("rowIsRepeatable",i==null?void 0:i.checked)}),o.jsx("label",{htmlFor:"isRepeatable",children:"Row is repeatable ?"})]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Row Minimum Entries"}),o.jsx(Oa,{value:e==null?void 0:e.minimumEntries,onChange:i=>n("minimumEntries",i.value)})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Or,{inputId:"isManualEnumerationEnabled",checked:(e==null?void 0:e.isManualEnumerationEnabled)||!1,onChange:i=>n("isManualEnumerationEnabled",i==null?void 0:i.checked)}),o.jsx("label",{htmlFor:"isManualEnumerationEnabled",children:"Enable manual enumeration for row components?"}),o.jsxs("small",{children:[" ","You need to set mannual enumeration for every component from its settings."," "]})]})]})},gSe=t=>{var f,h,m,g;const{onHandleChange:e,stateRow:n,onHandleChangePageMargin:r}=t,i=new Vb,[,a]=N.useState("");N.useEffect(()=>{},[]);const[s]=N.useState(null),l=()=>{},c=v=>{e("bgImage",v==null?void 0:v.url)},u=[{icon:"pi pi-image",value:"image"},{icon:"pi pi-palette ",value:"color"},{icon:"pi pi-microsoft ",value:"gradient"}],d=v=>o.jsx("i",{className:v.icon});return o.jsxs("div",{className:"",children:[o.jsxs("div",{className:" field",children:[o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"field col-2 md:col-3",children:[o.jsx("label",{children:"Left"}),o.jsx(Oa,{value:(f=n==null?void 0:n.margin)==null?void 0:f.left,onChange:v=>{r("left",v.value)},mode:"decimal",showButtons:!0,min:0,max:100})]}),o.jsxs("div",{className:"field col-2 md:col-3",children:[o.jsx("label",{children:"Right"}),o.jsx(Oa,{value:(h=n==null?void 0:n.margin)==null?void 0:h.right,onChange:v=>{r("right",v.value)},mode:"decimal",showButtons:!0,min:0,max:100})]}),o.jsxs("div",{className:"field col-2 md:col-3",children:[o.jsx("label",{children:"Top"}),o.jsx(Oa,{value:(m=n==null?void 0:n.margin)==null?void 0:m.top,onChange:v=>{r("top",v.value)},mode:"decimal",showButtons:!0,min:0,max:100})]}),o.jsxs("div",{className:"field col-2 md:col-3",children:[o.jsx("label",{children:"Bottom"}),o.jsx(Oa,{value:(g=n==null?void 0:n.margin)==null?void 0:g.bottom,onChange:v=>{r("bottom",v.value)},mode:"decimal",showButtons:!0,min:0,max:100})]})]}),o.jsx("label",{children:"Background Type"}),o.jsx(q0,{value:n==null?void 0:n.bgType,options:u,onChange:v=>e("bgType",v.value),itemTemplate:d,optionLabel:"value"})]}),(n==null?void 0:n.bgType)==="color"&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"p-fluid field",children:o.jsx(Rd,{value:(n==null?void 0:n.bgColor)||"",onChange:v=>e("bgColor",v.value)})}),o.jsx(Rd,{value:(n==null?void 0:n.bgColor)||"",onChange:v=>e("bgColor",v.value),inline:!0})]}),(n==null?void 0:n.bgType)==="image"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"p-fluid field",children:[o.jsx("span",{className:"must-required",children:"*"}),o.jsx("label",{children:"Background image"}),o.jsx(gn,{value:(n==null?void 0:n.bgImage)||"",onChange:v=>e("bgImage",v.target.value),placeholder:"enter page title",id:"page_title",name:"page_title"})]}),o.jsxs("div",{className:"shadow-2 border-round surface-card p-4",children:[o.jsx("div",{className:"flex align-items-center justify-content-between mb-4",children:o.jsx("span",{className:"text-xl font-medium text-900",children:"Selected Files"})}),o.jsx("h5",{children:"Media Library"}),o.jsxs("div",{className:"grid",children:[o.jsx("div",{className:"col-8",children:o.jsxs("div",{className:"grid",children:[o.jsx("div",{className:"col-12 mb-5",children:o.jsxs("div",{className:"p-inputgroup",children:[o.jsx(gn,{placeholder:"Keyword",onChange:v=>a(v.target.value)}),o.jsx(Pt,{text:!0,icon:"pi pi-search",className:"p-button-info",onClick:()=>l()})]})}),o.jsx("div",{className:"col-12 mb-5",children:o.jsx("div",{className:"surface-section ",children:o.jsx("div",{className:"grid -mt-3 -ml-3 -mr-3"})})})]})}),o.jsx("div",{className:"col-4 card",children:s!==null&&o.jsxs("div",{className:"surface-card p-4 shadow-2 border-round",children:[o.jsx("img",{style:{height:"150px",width:"150px",objectFit:"contain"},src:s==null?void 0:s.url,className:"w-full mb-3 border-round-2xl",onError:v=>v.target.src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png",alt:"https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png"}),o.jsxs("ul",{className:"list-none p-0 m-0 border-top-1 surface-border",children:[o.jsxs("li",{className:"flex align-items-center py-1 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-4 font-medium",children:"Name"}),o.jsx("div",{className:"text-900 w-full md:w-8",children:s==null?void 0:s.name})]}),o.jsxs("li",{className:"flex align-items-center py-1 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-4 font-medium",children:"Base URL:"}),o.jsx("div",{className:"text-900 w-full md:w-8 line-height-3",style:{wordWrap:"break-word"},children:o.jsx("a",{href:s==null?void 0:s.url,children:s==null?void 0:s.url})})]}),o.jsxs("li",{className:"flex align-items-center py-1 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-4 font-medium",children:"Base Name:"}),o.jsx("div",{className:"text-900 w-full md:w-8",children:s==null?void 0:s.basename})]}),o.jsxs("li",{className:"flex align-items-center py-1 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-4 font-medium",children:"Dir Name:"}),o.jsx("div",{className:"text-900 w-full md:w-8",children:s==null?void 0:s.dirname})]}),o.jsxs("li",{className:"flex align-items-center py-1 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-4 font-medium",children:"Size:"}),o.jsx("div",{className:"text-900 w-full md:w-8",children:i.formatBytes(s==null?void 0:s.size)})]}),o.jsxs("li",{className:"flex align-items-center py-1 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-4 font-medium",children:"Creation Date:"}),o.jsx("div",{className:"text-900 w-full md:w-8",children:_n(s==null?void 0:s.created_at).format("Do MMM YYYY - HH:mm")})]})]}),o.jsx(Pt,{text:!0,className:"mt-3 w-full",label:"Set Image",onClick:()=>c(s),"aria-label":"Update"})]})})]})]})]})]})},mSe=t=>{const{stateRow:e,setStateRow:n}=t,[r,i]=N.useState(""),[a,s]=N.useState([""]),[l,c]=N.useState(!1),[u,d]=N.useState(0),[f,h]=N.useState(!1),{updateGlobalToast:m}=Zt(),g=()=>{h(!0)},v=()=>{var H;const j=((H=e==null?void 0:e.reviewerChecklist)==null?void 0:H.length)>=0?[...e.reviewerChecklist]:[];j.push({uuid:nt(),checklist:r,action:a,agree:null,selectAction:[],other:{isOther:!1,description:""},reviewerComments:""});const M={...e,reviewerChecklist:j};n(M),h(!1),i(""),s([""])},A=()=>{h(!1),i(""),s([""])},S=j=>{const M=[...e.reviewerChecklist];M.splice(j,1);const H={...e,reviewerChecklist:M};n(H)},x=(j,M)=>{c(!0);const{checklist:H,action:de}=j;h(!0),d(M),setTimeout(()=>{i(H),s(de)},1e3)},w=(j,M)=>o.jsxs(o.Fragment,{children:[o.jsx(Pt,{text:!0,type:"button",className:"p-button-info",icon:"pi pi-pencil",onClick:()=>x(j,M==null?void 0:M.rowIndex),size:"small"}),o.jsx(Pt,{text:!0,type:"button",className:"p-button-danger",icon:"pi pi-trash",onClick:()=>S(M==null?void 0:M.rowIndex),size:"small"})]}),T=j=>{var M;return o.jsx(o.Fragment,{children:(M=j==null?void 0:j.action)==null?void 0:M.length})},C=j=>{const M=[...a];M.splice(j,1),s(M)},_=()=>{const j=[...e.reviewerChecklist];j[u]={checklist:r,action:a};const M={...e,reviewerChecklist:j};n(M),h(!1),c(!1)},E=()=>o.jsx("div",{children:l?o.jsx(Pt,{text:!0,className:"mb-5 p-button-success",label:"Edit Checklist",onClick:()=>{_()}}):o.jsx(Pt,{text:!0,className:"mb-5 p-button-success",label:"Add Checklist",onClick:()=>{v()}})}),D=j=>{n(M=>Object.assign({},M,{reviewerChecklist:j==null?void 0:j.value}))},B=j=>{navigator.clipboard.writeText(JSON.stringify(j)),m({showToast:!0,toastMessage:"Copied to clipboard",toastDetail:"",toastType:"success"})};function k(j){try{JSON.parse(j)}catch{return!1}return!0}const P=async()=>{var H;const j=await navigator.clipboard.readText();let M="";if(k(j)){const de=JSON.parse(j);if((H=de[0])!=null&&H.checklist){const fe={..._t.cloneDeep(e),reviewerChecklist:de};n(fe),m({showToast:!0,toastMessage:"Checklist pasted",toastDetail:"",toastType:"success"});return}else M=" Empty or Invalid Schema"}else M="Invalid Schema";m({showToast:!0,toastMessage:M,toastDetail:"",toastType:"error"})};return o.jsxs("div",{children:[o.jsxs(Is,{maximizable:!0,header:"Add Checklist",visible:f,style:{width:"30vw"},onHide:()=>A(),footer:E(),children:[o.jsx("h5",{children:"Checklist"}),o.jsx(_s,{rows:2,cols:50,value:r,onChange:j=>{var M;i((M=j==null?void 0:j.target)==null?void 0:M.value)}}),o.jsx("h5",{children:"Actions when user selects No"}),a.map((j,M)=>o.jsxs("div",{children:[M+1,"."," ",o.jsx(_s,{value:j,onChange:H=>{var fe;const de=[...a];de[M]=(fe=H==null?void 0:H.target)==null?void 0:fe.value,s(de)},rows:2,cols:50})," ",o.jsx(Pt,{text:!0,type:"button",icon:"pi pi-trash",className:"p-button-danger",onClick:()=>C(M)}),o.jsx("br",{}),o.jsx("br",{})]},`actionIndex-${M}`)),o.jsx(Pt,{text:!0,className:" p-button-info mr-2",onClick:()=>{s([...a,""])},children:"Add Action"})]})," ",o.jsx("h5",{children:"Reviewer Checklist"}),o.jsx(Pt,{text:!0,className:"mb-5 mr-2 p-button-success",label:"Add Review Checklist",onClick:()=>{g()}}),o.jsx(Pt,{text:!0,label:"Copy Schema ",onClick:()=>{B([...(e==null?void 0:e.reviewerChecklist)||[]])},className:"mb-5 mr-2"}),o.jsx(Pt,{text:!0,label:"Paste Checklist ",onClick:()=>{P()},className:"mb-5 p-button-info"}),o.jsx("div",{className:"card",children:o.jsxs(zs,{value:e==null?void 0:e.reviewerChecklist,reorderableRows:!0,onRowReorder:D,children:[o.jsx(dr,{rowReorder:!0,style:{width:"3em"}}),o.jsx(dr,{field:"checklist",header:"Checklist"}),o.jsx(dr,{field:"actions",header:"Actions",body:j=>T(j)}),o.jsx(dr,{header:"",body:(j,M)=>w(j,M)})]})})]})},Ig=t=>{var T;const{visibilty:e,setVisibility:n,row:r,pageIndex:i,sectionIndex:a,rowIndex:s}=t,{formBuilderSchemaLanguages:l,rowSettingUpdate:c,userSelectedLanguage:u,formBuilderPublishedStatus:d}=on(),[f,h]=N.useState(r),{updateGlobalToast:m,emitSocketData:g}=Zt(),v=(C,_,E)=>{h(D=>{const B=D[C];return Object.assign({},D,{[C]:Object.assign({},B,{[_==null?void 0:_.type]:E})})})},A=(C,_)=>{h(E=>({...E,[C]:_}))},S=()=>{const C={...f,children:r==null?void 0:r.children};c(i,a,s,C),g(),m({showToast:!0,toastMessage:"Updated",toastDetail:"Row Updated",toastType:"success"})},x=(C,_)=>{let E=f;E={...E,margin:{...E.margin,[C]:_}},h(E)},w=(C,_)=>{h(E=>({...E,[C]:_}))};return o.jsx(o.Fragment,{children:o.jsxs(Eo,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>n(!1),children:[o.jsxs("div",{className:"flex justify-content-between flex-wrap card-container ",children:[o.jsxs("div",{className:"flex align-items-center justify-content-center ",children:[" ",o.jsxs("h5",{children:["Row Settings - ",(T=r==null?void 0:r.heading)==null?void 0:T[u==null?void 0:u.type]]})," "]}),!d&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(Pt,{className:"mt-3",label:"Update",onClick:()=>S(),"aria-label":"Update"})})]}),o.jsxs(Ya,{children:[o.jsx(fr,{header:"Text",children:o.jsx(io,{activeIndex:0,children:l!=null&&l.length?l.map((C,_)=>o.jsx(ro,{tabIndex:_,header:C==null?void 0:C.language,children:o.jsx(hSe,{language:C,stateRow:f,onHandleChange:v,...t})},_)):""})}),o.jsx(fr,{header:"Advance",children:o.jsx(pSe,{stateRow:f,onHandleChangeAdvanceSettings:A})}),o.jsx(fr,{header:"Layout",children:o.jsxs("div",{className:"p-fluid",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Or,{inputId:"showRowTitle",checked:f==null?void 0:f.showRowTitle,onChange:C=>A("showRowTitle",C==null?void 0:C.checked)}),o.jsx("label",{htmlFor:"showRowTitle",children:"Show Row Title?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Or,{inputId:"showRowSubTitle",checked:f==null?void 0:f.showRowSubTitle,onChange:C=>A("showRowSubTitle",C==null?void 0:C.checked)}),o.jsx("label",{htmlFor:"showRowSubTitle",children:"Show Row Sub Title?"})]})]})}),o.jsx(fr,{header:"Styling",children:o.jsx(gSe,{stateRow:f,onHandleChange:w,onHandleChangePageMargin:x,...t})}),(f==null?void 0:f.rowIsRepeatable)===!0&&o.jsx(fr,{header:"Admin",children:o.jsx(mSe,{stateRow:f,setStateRow:h})})]})]})})},vSe={},bSe=t=>{var ve,Ce,Se,Te,De,ie,U,re,Q,se,be;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=N.useRef(null),{removeRow:u,addRow:d,cloneRow:f,formBuilderFormLayout:h,userSelectedLanguage:m,handleDrop:g}=on(),{userTaskSubmitFormData:v,taskRegisterData:A,updateTaskRegisterData:S,updateTaskProgressValue:x,addUserDataFormSectionRepeatableData:w,removeUserDataFormSectionRepeatableData:T,task_status:C,TASK_PUBLISHED:_}=mr(),{isPreview:E,isRenderView:D,isAdvanceView:B,renderType:k,isAdmin:P,emitSocketData:j}=Zt(),[M,H]=N.useState(!1),[{isDragging:de},fe]=Qi({type:bo,item:{type:bo,uuid:e.uuid,children:e.children,path:n,data:e},collect:me=>({isDragging:me.isDragging()})}),ee=de?.25:1;fe(c);const G=(me,ye,Ie,Ee,he,V)=>o.jsx(fSe,{page:l,row:e,section:s,data:me,path:ye,pageIndex:Ie,sectionIndex:Ee,rowIndex:he,columnIndex:V,isAdmin:P,emitSocketData:j},`column-${n}-${me.uuid}`),ae=(me,ye,Ie,Ee)=>{var W,ue,Ae,pe;const he=me.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",V=`${me.className} justify-content-space-between`,te=`${me.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".setting-tool"}),o.jsx(rn,{target:".add-row-tool"}),o.jsxs("div",{className:V,children:[o.jsxs("span",{ref:E===!1?c:null,children:[o.jsx("button",{className:me.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:me.togglerClassName,onClick:me.onTogglerClick,children:[o.jsx("span",{className:he}),o.jsx(Qt,{})]}),o.jsxs("span",{className:te,children:["Row:"," ",((W=e==null?void 0:e.heading)==null?void 0:W[m==null?void 0:m.type])!==""?(ue=e==null?void 0:e.heading)==null?void 0:ue[m==null?void 0:m.type]:"Untitled"]})]}),E===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:me.togglerClassName,onClick:()=>{d(ye,Ie),j()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((pe=(Ae=h[ye])==null?void 0:Ae.children[Ie])==null?void 0:pe.children.length)>1&&o.jsxs("button",{className:me.togglerClassName,onClick:()=>{u(ye,Ie,Ee),j()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:me.togglerClassName,onClick:()=>{f(e,ye,Ie,Ee),j()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>H(!0),className:me.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})},Y=_t.findIndex(v,function(me){return(me==null?void 0:me.rowId)===(e==null?void 0:e.uuid)}),ge=()=>{var Ie,Ee,he;const me=_t.cloneDeep(A);((Ee=(Ie=v[Y])==null?void 0:Ie.repeatableFieldsData)==null?void 0:Ee.length)>=(e==null?void 0:e.minimumEntries)?me[e==null?void 0:e.uuid]=(he=v[Y])==null?void 0:he.repeatableFields:delete me[e==null?void 0:e.uuid];const ye=Object.keys(me).length;S(me),x(ye)},ne=(ve=e==null?void 0:e.repeatableFields)==null?void 0:ve.map(me=>{var ye;return{fieldUuid:me==null?void 0:me.uuid,field:me==null?void 0:me.uuid,header:(ye=me==null?void 0:me.label)==null?void 0:ye.english}}),J=ne==null?void 0:ne.map(me=>o.jsx(dr,{field:me.field,header:me.header,body:ye=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:ye[me==null?void 0:me.field]}})})},me.field)),K=()=>{var Ee;const me=[...v],ye=[];let Ie=!0;e:for(const[,he]of e.children.entries()){for(const[,V]of he.children.entries())if(console.log("field.isValid",V.isValid),V!=null&&V.isPostField&&V.isValid!==1){const te={fieldId:V.uuid,rowIndex:a};console.log("inValidData",te),ye.push(te),Xt.emit("OnInvalidFieldCatch",te),Ie=!1;break e}Ie=!0}Ie&&(ye==null?void 0:ye.length)===0&&(w(e==null?void 0:e.uuid,(Ee=me[Y])==null?void 0:Ee.repeatableFields),Xt.emit("clearRepeatableFields",e==null?void 0:e.uuid),ge())},oe=me=>o.jsx(o.Fragment,{children:o.jsx(Pt,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{T(e==null?void 0:e.uuid,me==null?void 0:me.rowIndex),setTimeout(()=>{ge()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...vSe,opacity:ee,marginTop:`${(Ce=e==null?void 0:e.margin)==null?void 0:Ce.top}px`,marginBottom:`${(Se=e==null?void 0:e.margin)==null?void 0:Se.bottom}px`,marginLeft:`${(Te=e==null?void 0:e.margin)==null?void 0:Te.left}px`,marginRight:`${(De=e==null?void 0:e.margin)==null?void 0:De.right}px`},className:D?"row container-row":"draggable row container-row",children:[M&&o.jsx(Ig,{renderType:k,visibilty:M,setVisibility:H,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:j},"row_settings_"+r+i+a),E===!1?o.jsx(o.Fragment,{children:B===!0?o.jsx(li,{header:"Row",toggleable:!0,headerTemplate:me=>ae(me,r,i,a),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(ie=e==null?void 0:e.children)==null?void 0:ie.map((me,ye)=>{const Ie=`${n}-${ye}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:B,data:{path:Ie,childrenCount:e.children.length},onDrop:g,className:"horizontalDrag"}),G(me,Ie,r,i,a,ye)]},Ie)}),o.jsx(Tr,{isAdvanceView:B,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:g,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:B?"form-builder-columns":"",style:B?{overflowX:"auto"}:{},children:(U=e==null?void 0:e.children)==null?void 0:U.map((me,ye)=>{const Ie=`${n}-${ye}`;return o.jsx(N.Fragment,{children:G(me,Ie,r,i,a,ye)},Ie)})})})}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&C===_)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(re=e==null?void 0:e.heading)==null?void 0:re[m==null?void 0:m.type]}),o.jsx("span",{children:(Q=e==null?void 0:e.subHeadingText)==null?void 0:Q[m==null?void 0:m.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((me,ye)=>{const Ie=`${n}-${ye}`;return o.jsx(N.Fragment,{children:G(me,Ie,r,i,a,ye)},Ie)})})]})}),(e==null?void 0:e.rowIsRepeatable)&&C!==_&&o.jsx(Pt,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>K(),label:(se=e.addToListButtonLabel)==null?void 0:se[m==null?void 0:m.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(zs,{value:(v==null?void 0:v.length)>0?(be=v[Y])==null?void 0:be.repeatableFieldsData:[],children:[J,C!==_&&o.jsx(dr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(me,ye)=>oe(ye)})]}),P&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{field:e})]})]})]})},ySe=t=>{var i,a;const{language:e,onHandleChange:n,stateSection:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Section Heading"}),o.jsx(gn,{value:(i=r.heading)==null?void 0:i[e==null?void 0:e.type],onChange:s=>n("heading",e,s.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Section Description"}),o.jsx(_s,{value:(a=r.subHeadingText)==null?void 0:a[e==null?void 0:e.type],onChange:s=>n("subHeadingText",e,s.target.value)})]})]})},ASe={uuid:"",type:"",showSectionHeader:!0,isVisible:!1,isHidden:!1,isCollapsed:!0,isValid:!1,showSectionSubTitle:!1,showSectionTitle:!1,heading:{english:""},subHeadingText:{english:""},children:[]},_h=t=>{const{visibilty:e,setVisibility:n,section:r,pageIndex:i,sectionIndex:a}=t,[s,l]=N.useState(r??ASe),{formBuilderSchemaLanguages:c,sectionSettingUpdate:u,userSelectedLanguage:d,formBuilderPublishedStatus:f}=on(),{emitSocketData:h}=Zt(),{updateGlobalToast:m}=Zt();console.log("StateSection",r);const g=(S,x,w)=>{l(T=>Object.assign({},T,{[S]:Object.assign({},T[S],{[x==null?void 0:x.type]:w})}))},v=(S,x)=>{l(w=>({...w,[S]:x}))},A=()=>{const S={...s,children:r==null?void 0:r.children};u(i,a,S),h(),m({showToast:!0,toastMessage:"Updated",toastDetail:"Section Updated",toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(Eo,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>n(!1),children:[o.jsxs("div",{className:"flex justify-content-between flex-wrap card-container ",children:[o.jsxs("div",{className:"flex align-items-center justify-content-center ",children:[" ",o.jsxs("h5",{children:["Section Settings - ",r==null?void 0:r.heading[d==null?void 0:d.type]," "]})," "]}),!f&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(Pt,{className:"mt-3",label:"Update",onClick:()=>A(),"aria-label":"Update"})})]}),o.jsxs(Ya,{children:[o.jsx(fr,{header:"Text",children:o.jsx(io,{activeIndex:0,children:c!=null&&c.length?c.map((S,x,w)=>o.jsx(ro,{tabIndex:x,header:S==null?void 0:S.language,children:o.jsx(ySe,{language:S,stateSection:w,onHandleChange:g,...t})},x)):""})}),o.jsx(fr,{header:"Layout",children:o.jsxs("div",{className:"p-fluid",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Or,{inputId:"showSectionTitle",checked:s==null?void 0:s.showSectionHeader,onChange:S=>v("showSectionHeader",S==null?void 0:S.checked)}),o.jsx("label",{htmlFor:"showSectionTitle",children:"Show Section header?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Or,{inputId:"showSectionTitle",checked:s==null?void 0:s.showSectionTitle,onChange:S=>v("showSectionTitle",S==null?void 0:S.checked)}),o.jsx("label",{htmlFor:"showSectionTitle",children:"Show Section Title?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Or,{inputId:"showSectionSubTitle",checked:s==null?void 0:s.showSectionSubTitle,onChange:S=>v("showSectionSubTitle",S==null?void 0:S.checked)}),o.jsx("label",{htmlFor:"showSectionSubTitle",children:"Show Section Sub Title?"})]})]})})]})]})})},Dh=t=>{const{saveBuilderElementModalData:e,saveElementModal:n,setSaveElementModal:r}=t,{saveComponent:i}=Zt(),a=M7({initialValues:{builder_element_title:"",builder_element_description:""},validate:c=>{const u={};return c.builder_element_title||(u.builder_element_title="Title is required."),c.builder_element_description||(u.builder_element_description="Description is required."),u},onSubmit:c=>{const u={...c,reusable_template_schema:e==null?void 0:e.reusable_template_schema};i(u,a.resetForm),r(!1)}}),s=c=>!!(a.touched[c]&&a.errors[c]),l=()=>o.jsx("div",{children:o.jsx(Pt,{text:!0,className:"p-button-success",label:"Save",icon:"pi pi-file",onClick:()=>{a.handleSubmit()},autoFocus:!0})});return o.jsxs(Is,{header:"Save Custom Element",visible:n,style:{width:"20vw"},footer:l(),onHide:()=>r(!1),children:[o.jsxs("div",{className:"p-field field",children:[o.jsxs("label",{htmlFor:"username",children:[o.jsx("span",{className:"must-required",children:"*"})," Builder element title"]}),o.jsx(gn,{id:"builder_element_title",name:"builder_element_title",value:a.values.builder_element_title,onChange:a.handleChange,className:`${w3({invalid:s("builder_element_title")})} w-full`})]}),o.jsxs("div",{className:"p-field field",children:[o.jsxs("label",{htmlFor:"username",children:[o.jsx("span",{className:"must-required",children:"*"})," Builder element description"]}),o.jsx(_s,{id:"builder_element_description",name:"builder_element_description",value:a.values.builder_element_description,onChange:a.handleChange,className:`${w3({invalid:s("builder_element_title")})} w-full`})]})]})},wSe=t=>{var fe,ee,G,ae,Y,ge,ne,J;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{removeSection:l,addSection:c,cloneSection:u,formBuilderFormLayout:d,userSelectedLanguage:f,handleDrop:h}=on(),{isPreview:m,isAdvanceView:g,renderType:v,emitSocketData:A}=Zt(),[S,x]=N.useState(!1),[w,T]=N.useState(!1),[C,_]=N.useState(null),[E,D]=N.useState(!1),B=N.useRef(null),k=(K,oe)=>{_(ve=>({...ve,[K]:oe}))},[{isDragging:P},j]=Qi({type:ta,item:{type:ta,uuid:e.uuid,children:e.children,path:n},collect:K=>({isDragging:K.isDragging()})}),M=P?.25:1;j(B);const H=(K,oe,ve,Ce,Se)=>o.jsx(bSe,{page:s,section:a,data:K,path:oe,pageIndex:ve,sectionIndex:Ce,rowIndex:Se},`row-${n}-${K.uuid}`),de=(K,oe,ve)=>{var De,ie;const Ce=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Se=`${K.className} justify-content-space-between panel-tab-section`,Te=`${K.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Se,children:[o.jsxs("span",{ref:m===!1?B:null,children:[o.jsx("button",{className:K.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:Ce}),o.jsx(Qt,{})]}),o.jsxs("span",{className:Te,children:[ve+1," ",(De=e==null?void 0:e.heading)==null?void 0:De[f==null?void 0:f.type]]})]}),m===!1&&o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".del-tool"}),o.jsx(rn,{target:".setting-tool"}),o.jsx(rn,{target:".add-section-tool"}),o.jsx(rn,{target:".save-tool"}),o.jsx(rn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{c(oe),A()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((ie=d[oe])==null?void 0:ie.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{l(oe,ve),A()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{k("reusable_template_schema",e),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{u(e,oe,ve),A()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:M,marginBottom:20},className:g?"draggable row":"",children:[m===!1&&o.jsx(Dh,{saveBuilderElementModalData:C,setSaveBuilderElementModalData:_,saveElementModal:w,setSaveElementModal:T}),S===!0&&o.jsx(_h,{renderType:v,visibilty:S,setVisibility:x,section:e,pageIndex:r,sectionIndex:i,emitSocketData:A},"section_settings_"+r+i),m===!1?o.jsx(o.Fragment,{children:g===!0?o.jsxs(li,{header:(fe=e==null?void 0:e.heading)==null?void 0:fe.english,toggleable:!0,headerTemplate:K=>de(K,r,i),onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:[((ee=e==null?void 0:e.subHeadingText)==null?void 0:ee[f==null?void 0:f.type])&&o.jsx("p",{children:(G=e==null?void 0:e.subHeadingText)==null?void 0:G[f==null?void 0:f.type]}),o.jsxs("div",{children:[e.children.map((K,oe)=>{const ve=`${n}-${oe}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:g,data:{path:ve,childrenCount:e.children.length},onDrop:h}),H(K,ve,r,i,oe)]},ve)}),o.jsx(Tr,{isAdvanceView:g,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:h,isLast:!0})]}),E&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{c(r),A()},children:o.jsx(Qt,{})})}),((ae=d[r])==null?void 0:ae.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{l(r,i),A()},children:o.jsx(Qt,{})})})]})]}):o.jsxs(o.Fragment,{children:[((Y=e==null?void 0:e.subHeadingText)==null?void 0:Y[f==null?void 0:f.type])&&o.jsx("p",{children:(ge=e==null?void 0:e.subHeadingText)==null?void 0:ge[f==null?void 0:f.type]}),o.jsx("div",{children:e.children.map((K,oe)=>{const ve=`${n}-${oe}`;return o.jsx(N.Fragment,{children:H(K,ve,r,i,oe)},ve)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(e==null?void 0:e.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(ne=e==null?void 0:e.heading)==null?void 0:ne[f==null?void 0:f.type]}),o.jsx("p",{children:(J=e==null?void 0:e.subHeadingText)==null?void 0:J[f==null?void 0:f.type]}),o.jsx("hr",{})]}),e.children.map((K,oe)=>{const ve=`${n}-${oe}`;return o.jsx(N.Fragment,{children:o.jsx("div",{className:"",children:H(K,ve,r,i,oe)},ve)},ve)})]})})]})},SSe={position:"relative"},xSe=t=>{var T,C,_;const{data:e,data:n,path:r,pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,section:c,row:u,page:d}=t,f=N.useRef(null),{handleDrop:h}=on(),{isRenderView:m,isAdvanceView:g,isPreview:v}=Zt(),[{isDragging:A},S]=Qi({type:ms,item:{type:ms,uuid:e==null?void 0:e.uuid,children:e.children,path:r},collect:E=>({isDragging:E.isDragging()})}),x=A&&!m?.25:1;S(f);const w=(E,D,B,k,P,j,M)=>o.jsx(qc,{page:d,section:c,row:u,column:n,field:E,pageIndex:B,sectionIndex:k,rowIndex:P,columnIndex:j,fieldIndex:M,type:"field",data:E,path:D},`component-${r}-${E==null?void 0:E.uuid}`);return o.jsx("div",{style:g?{...SSe,opacity:x}:{},className:m?"":"draggable column container-column",children:v===!1?o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((T=e==null?void 0:e.children)==null?void 0:T.length)>0?(C=e==null?void 0:e.children)==null?void 0:C.map((E,D)=>{const B=`${r}-${D}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:g,fieldDropArea:!0,data:{path:B,childrenCount:e.children.length,droppedField:e},onDrop:h}),w(E,B,i,a,s,l,D)]},B)}):o.jsx(o.Fragment,{}),o.jsx(Tr,{isAdvanceView:g,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${r}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:h,isLast:!0})]})}):o.jsx(o.Fragment,{children:(_=e==null?void 0:e.children)==null?void 0:_.map((E,D)=>{const B=`${r}-${D}`;return o.jsx(N.Fragment,{children:w(E,B,i,a,s,l,D)},B)})})})},CSe=t=>{var l;const{isAdvanceView:e}=Zt(),{data:n,page:r,path:i,pageIndex:a}=t,s=(c,u,d,f,h,m,g,v)=>o.jsx(xSe,{page:r,row:v,section:g,data:c,path:`${d}-${f}-${h}-${m}`,pageIndex:d,sectionIndex:f,rowIndex:h,columnIndex:m},`column-${i}-${c.uuid}`);return o.jsx(o.Fragment,{children:(l=n==null?void 0:n.children)==null?void 0:l.map((c,u)=>{var d;return(d=c==null?void 0:c.children)==null?void 0:d.map((f,h)=>{var m;return o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"columns":"",style:e?{overflowX:"auto"}:{},children:(m=f==null?void 0:f.children)==null?void 0:m.map((g,v)=>{const A=`${i}-${u}-${h}-${v}`;return o.jsx(N.Fragment,{children:s(g,A,a,u,h,v,c,f)},A)})})})})})})},TSe=t=>{const{data:e,path:n,pageIndex:r}=t,{isPreview:i,isRenderView:a,isAdvanceView:s}=Zt(),{formBuilderFormSchema:l,handleDrop:c}=on(),u=N.useRef(null),[d,f]=Qi({type:ta,item:{type:ta,uuid:e.uuid,children:e.children,path:n},collect:m=>({isDragging:m.isDragging()})});f(u);const h=(m,g,v,A)=>o.jsx(wSe,{data:m,page:e,section:m,path:g,pageIndex:v,sectionIndex:A},`section_${v}_${A}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${a?"":"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:i===!1?o.jsx(o.Fragment,{children:s?o.jsxs(o.Fragment,{children:[e.children.map((m,g)=>{const v=`${n}-${g}`;return o.jsxs(N.Fragment,{children:[s===!0&&o.jsx(Tr,{isAdvanceView:s,data:{path:v,childrenCount:e.children.length},onDrop:c}),h(m,v,r,g)]},`section-${g}-${m.uuid}`)}),s===!0&&o.jsx(Tr,{isAdvanceView:s,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:c,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsx(CSe,{page:e,path:n,data:e,pageIndex:r})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"p-1",children:e.children.map((m,g)=>{const v=`${n}-${g}`;return o.jsx(N.Fragment,{children:l!=null&&l.showConditionalFields?o.jsx(o.Fragment,{children:o.jsx("div",{children:h(m,v,r,g)})}):((m==null?void 0:m.isHidden)===!1||!i)&&h(m,v,r,g)},`section-${g}-${m.uuid}`)})})})})},ESe=()=>{const{isPreview:t,isAdvanceView:e}=Zt(),[n,r]=N.useState(!1),[i,a]=N.useState(!1),[s,l]=N.useState(0),{formBuilderFormLayout:c}=on(),{emitSocketData:u}=Zt(),d=(f,h,m)=>o.jsx(TSe,{data:f,path:h,pageIndex:m},`page-${f.uuid}`);return o.jsx("div",{className:"page",children:(c==null?void 0:c.length)===k9&&t===!0?o.jsx(o.Fragment,{children:(c==null?void 0:c.length)&&c.map((f,h)=>{const m=`${h}`;return o.jsx("div",{children:d(f,m,h)},`${f.uuid}-${h}`)})}):o.jsx(o.Fragment,{children:e===!0||t===!0?o.jsx(Ya,{activeIndex:s,onTabChange:f=>l(f.index),children:(c==null?void 0:c.length)&&c.map((f,h)=>{const m=`${h}`;return o.jsxs(fr,{disabled:!((f==null?void 0:f.isHidden)===!1||!t),header:"Page",headerTemplate:g=>o.jsx(o7,{options:g,pageIndex:h,setTabSidebarSetting:r,setPageActiveIndex:l,page:f,pages:c}),children:[t===!1&&o.jsx(gf,{reusableBuilderElementModalVisibility:i,setReusableBuilderElementModalVisibility:a,pageIndex:h}),o.jsx(H0,{setVisibility:r,visibilty:n,pageIndex:h,page:f,emitSocketData:u}),d(f,m,h)]},`${f.uuid}-${h}`)})}):o.jsx(o.Fragment,{children:(c==null?void 0:c.length)>0&&(c==null?void 0:c.map((f,h)=>{const m=`${h}`;return o.jsxs(N.Fragment,{children:[t===!1&&o.jsx(gf,{reusableBuilderElementModalVisibility:i,setReusableBuilderElementModalVisibility:a,pageIndex:h}),o.jsx(H0,{setVisibility:r,visibilty:n,pageIndex:h,page:f,emitSocketData:u}),d(f,m,h)]},`${f.uuid}-${h}`)}))})})})},ISe={position:"relative"},_Se=t=>{var B,k,P,j,M;const{isAdvanceView:e,isPreview:n,emitSocketData:r,isRenderView:i}=Zt(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:m}=t,g=N.useRef(null),{removeColumn:v,addColumn:A,cloneColumn:S,formBuilderFormLayout:x,handleDrop:w}=on(),[{isDragging:T},C]=Qi({type:ms,item:{type:ms,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:H=>({isDragging:H.isDragging()})}),_=T&&!i?.25:1;C(g);const E=(H,de,fe,ee,G,ae,Y)=>o.jsx(qc,{page:m,column:a,type:"field",row:h,section:f,field:H,data:H,path:de,pageIndex:fe,sectionIndex:ee,rowIndex:G,columnIndex:ae,fieldIndex:Y},`component-${s}-${H==null?void 0:H.uuid}`),D=(H,de,fe,ee,G)=>{var ne,J,K,oe;const ae=H.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Y=`${H.className} justify-content-space-between`,ge=`${H.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".add-column-tool"}),o.jsxs("div",{className:Y,children:[o.jsxs("span",{ref:n===!1?g:null,children:[o.jsx("button",{className:H.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:H.togglerClassName,onClick:H.onTogglerClick,children:[o.jsx("span",{className:ae}),o.jsx(Qt,{})]}),o.jsx("span",{className:ge,children:"Column"})]}),n===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{A(de,fe,ee),r()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((oe=(K=(J=(ne=x[de])==null?void 0:ne.children[fe])==null?void 0:J.children[ee])==null?void 0:K.children)==null?void 0:oe.length)>1&&o.jsxs("button",{className:H.togglerClassName,onClick:()=>{v(de,fe,ee,G),r()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{S(a,de,fe,ee,G),r()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsx("div",{style:e?{...ISe,opacity:_}:{},className:i?"form-builder-column container-column":"draggable form-builder-column container-column",children:n===!1?o.jsx(o.Fragment,{children:e===!0?o.jsxs(li,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:H=>D(H,l,c,u,d),children:[((B=a==null?void 0:a.children)==null?void 0:B.length)>0?(k=a==null?void 0:a.children)==null?void 0:k.map((H,de)=>{const fe=`${s}-${de}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:e,fieldDropArea:!0,data:{path:fe,childrenCount:a.children.length,droppedField:a},onDrop:w}),E(H,fe,l,c,u,d,de)]},fe)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Tr,{isAdvanceView:e,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:w,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((P=a==null?void 0:a.children)==null?void 0:P.length)>0?(j=a==null?void 0:a.children)==null?void 0:j.map((H,de)=>{const fe=`${s}-${de}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:e,fieldDropArea:!0,data:{path:fe,childrenCount:a.children.length,droppedField:a},onDrop:w}),E(H,fe,l,c,u,d,de)]},fe)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Tr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:w,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(M=a==null?void 0:a.children)==null?void 0:M.map((H,de)=>{const fe=`${s}-${de}`;return o.jsx(N.Fragment,{children:E(H,fe,l,c,u,d,de)},fe)})})})},DSe={},OSe=t=>{var ve,Ce,Se,Te,De,ie,U,re,Q,se,be,me,ye,Ie,Ee,he;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,{isRenderView:c,isAdvanceView:u,isAdmin:d,isPreview:f,emitSocketData:h,renderType:m}=Zt(),g=N.useRef(null),{removeRow:v,addRow:A,cloneRow:S,formBuilderFormLayout:x,userSelectedLanguage:w,handleDrop:T}=on(),{userTaskSubmitFormData:C,taskRegisterData:_,updateTaskRegisterData:E,updateTaskProgressValue:D,addUserDataFormSectionRepeatableData:B,removeUserDataFormSectionRepeatableData:k,task_status:P,TASK_PUBLISHED:j}=mr(),[M,H]=N.useState(!1),[{isDragging:de},fe]=Qi({type:bo,item:{type:bo,uuid:e.uuid,children:e.children,path:n,data:e},collect:V=>({isDragging:V.isDragging()})}),ee=de?.25:1;fe(g);const G=(V,te,W,ue,Ae,pe)=>o.jsx(_Se,{page:l,row:e,section:s,data:V,path:te,pageIndex:W,sectionIndex:ue,rowIndex:Ae,columnIndex:pe,isAdmin:d,emitSocketData:h},`column-${n}-${V.uuid}`),ae=(V,te,W,ue)=>{var Le,We,gt,At;const Ae=V.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",pe=`${V.className} justify-content-space-between`,ke=`${V.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".setting-tool"}),o.jsx(rn,{target:".add-row-tool"}),o.jsxs("div",{className:pe,children:[o.jsxs("span",{ref:f===!1?g:null,children:[o.jsx("button",{className:V.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:V.togglerClassName,onClick:V.onTogglerClick,children:[o.jsx("span",{className:Ae}),o.jsx(Qt,{})]}),o.jsxs("span",{className:ke,children:["Row:"," ",((Le=e==null?void 0:e.heading)==null?void 0:Le[w==null?void 0:w.type])!==""?(We=e==null?void 0:e.heading)==null?void 0:We[w==null?void 0:w.type]:"Untitled"]})]}),f===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:V.togglerClassName,onClick:()=>{A(te,W),h()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((At=(gt=x[te])==null?void 0:gt.children[W])==null?void 0:At.children.length)>1&&o.jsxs("button",{className:V.togglerClassName,onClick:()=>{v(te,W,ue),h()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:V.togglerClassName,onClick:()=>{S(e,te,W,ue),h()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>H(!0),className:V.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})},Y=_t.findIndex(C,function(V){return(V==null?void 0:V.rowId)===(e==null?void 0:e.uuid)}),ge=()=>{var W,ue,Ae;const V=_t.cloneDeep(_);((ue=(W=C[Y])==null?void 0:W.repeatableFieldsData)==null?void 0:ue.length)>=(e==null?void 0:e.minimumEntries)?V[e==null?void 0:e.uuid]=(Ae=C[Y])==null?void 0:Ae.repeatableFields:delete V[e==null?void 0:e.uuid];const te=Object.keys(V).length;E(V),D(te)},ne=(ve=e==null?void 0:e.repeatableFields)==null?void 0:ve.map(V=>{var te;return{fieldUuid:V==null?void 0:V.uuid,field:V==null?void 0:V.uuid,header:(te=V==null?void 0:V.label)==null?void 0:te.english}}),J=ne==null?void 0:ne.map(V=>o.jsx(dr,{field:V.field,header:V.header,body:te=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:te[V==null?void 0:V.field]}})})},V.field)),K=()=>{var ue;const V=[...C],te=[];let W=!0;e:for(const[,Ae]of e.children.entries()){for(const[,pe]of Ae.children.entries())if(console.log("field.isValid",pe.isValid),pe!=null&&pe.isPostField&&pe.isValid!==1){const ke={fieldId:pe.uuid,rowIndex:a};console.log("inValidData",ke),te.push(ke),Xt.emit("OnInvalidFieldCatch",ke),W=!1;break e}W=!0}W&&(te==null?void 0:te.length)===0&&(B(e==null?void 0:e.uuid,(ue=V[Y])==null?void 0:ue.repeatableFields),Xt.emit("clearRepeatableFields",e==null?void 0:e.uuid),ge())},oe=V=>o.jsx(o.Fragment,{children:o.jsx(Pt,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{k(e==null?void 0:e.uuid,V==null?void 0:V.rowIndex),setTimeout(()=>{ge()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...DSe,opacity:ee,marginTop:`${(Ce=e==null?void 0:e.margin)==null?void 0:Ce.top}px`,marginBottom:`${(Se=e==null?void 0:e.margin)==null?void 0:Se.bottom}px`,marginLeft:`${(Te=e==null?void 0:e.margin)==null?void 0:Te.left}px`,marginRight:`${(De=e==null?void 0:e.margin)==null?void 0:De.right}px`},className:c?"row container-row":"draggable row container-row",children:[M&&o.jsx(Ig,{renderType:m,visibilty:M,setVisibility:H,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:h},"row_settings_"+r+i+a),m===pm&&o.jsxs("div",{className:"form-builder-columns",children:[e.children.map((V,te)=>{const W=`${n}-${te}`;return o.jsxs(N.Fragment,{children:[m===Y1&&o.jsx(Tr,{isAdvanceView:u,data:{path:W,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag"}),G(V,W,r,i,a,te)]},W)}),o.jsx(Tr,{isAdvanceView:u,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag",isLast:!0})]}),(m===z1||m===F0||m===hm||m===P9||m===ep)&&(f===!1?o.jsx(o.Fragment,{children:u===!0?o.jsx(li,{header:"Row",toggleable:!0,headerTemplate:V=>ae(V,r,i,a),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(ie=e==null?void 0:e.children)==null?void 0:ie.map((V,te)=>{const W=`${n}-${te}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:u,data:{path:W,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag"}),G(V,W,r,i,a,te)]},W)}),o.jsx(Tr,{isAdvanceView:u,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:T,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:u?"form-builder-columns":"",style:u?{overflowX:"auto"}:{},children:(U=e==null?void 0:e.children)==null?void 0:U.map((V,te)=>{const W=`${n}-${te}`;return o.jsx(N.Fragment,{children:G(V,W,r,i,a,te)},W)})})})}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&P===j)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(re=e==null?void 0:e.heading)==null?void 0:re[w==null?void 0:w.type]}),o.jsx("span",{children:(Q=e==null?void 0:e.subHeadingText)==null?void 0:Q[w==null?void 0:w.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((V,te)=>{const W=`${n}-${te}`;return o.jsx(N.Fragment,{children:G(V,W,r,i,a,te)},W)})})]})})),m===H1&&(f===!1?o.jsxs("div",{children:[o.jsx("span",{className:"row-setting-block-pdf-editor",children:o.jsxs("div",{className:"pdf-setting-container",children:[o.jsxs("button",{onClick:()=>{A(r,i),h()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]}),((be=(se=x[r])==null?void 0:se.children[i])==null?void 0:be.children.length)>1&&o.jsxs("button",{onClick:()=>{v(r,i,a),h()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>{S(e,r,i,a),h()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>H(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})]})}),o.jsx("div",{className:"form-builder-columns",children:(me=e==null?void 0:e.children)==null?void 0:me.map((V,te)=>{const W=`${n}-${te}`;return o.jsx(N.Fragment,{children:G(V,W,r,i,a,te)},W)})})]}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&P===j)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(ye=e==null?void 0:e.heading)==null?void 0:ye[w==null?void 0:w.type]}),o.jsx("span",{children:(Ie=e==null?void 0:e.subHeadingText)==null?void 0:Ie[w==null?void 0:w.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((V,te)=>{const W=`${n}-${te}`;return o.jsx(N.Fragment,{children:G(V,W,r,i,a,te)},W)})})]})})),m===Y1&&o.jsx("div",{className:"form-builder-columns",children:e.children.map((V,te)=>{const W=`${n}-${te}`;return o.jsx(N.Fragment,{children:G(V,W,r,i,a,te)},W)})}),(e==null?void 0:e.rowIsRepeatable)&&P!==j&&o.jsx(Pt,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>K(),label:(Ee=e.addToListButtonLabel)==null?void 0:Ee[w==null?void 0:w.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(zs,{value:(C==null?void 0:C.length)>0?(he=C[Y])==null?void 0:he.repeatableFieldsData:[],children:[J,P!==j&&o.jsx(dr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:V=>oe(V)})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{field:e})]})]})]})},NSe=t=>{var fe,ee,G,ae,Y,ge,ne,J;const{isAdvanceView:e,isPreview:n,renderType:r,emitSocketData:i}=Zt(),{handleDrop:a}=on(),{data:s,path:l,pageIndex:c,sectionIndex:u,section:d,page:f}=t,{removeSection:h,addSection:m,cloneSection:g,formBuilderFormLayout:v,userSelectedLanguage:A}=on(),[S,x]=N.useState(!1),[w,T]=N.useState(!1),[C,_]=N.useState({reusable_template_schema:""}),[E,D]=N.useState(!1),B=N.useRef(null),k=(K,oe)=>{_(ve=>({...ve,[K]:oe}))},[{isDragging:P},j]=Qi({type:ta,item:{type:ta,uuid:s.uuid,children:s.children,path:l},collect:K=>({isDragging:K.isDragging()})}),M=P?.25:1;j(B);const H=(K,oe,ve,Ce,Se)=>o.jsx(OSe,{page:f,section:d,data:K,path:oe,pageIndex:ve,sectionIndex:Ce,rowIndex:Se},`row-${l}-${K.uuid}`),de=(K,oe,ve)=>{var De,ie;const Ce=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Se=`${K.className} justify-content-space-between panel-tab-section`,Te=`${K.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Se,children:[o.jsxs("span",{ref:n===!1?B:null,children:[o.jsx("button",{className:K.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:Ce}),o.jsx(Qt,{})]}),o.jsxs("span",{className:Te,children:[ve+1," ",(De=s==null?void 0:s.heading)==null?void 0:De[A==null?void 0:A.type]]})]}),n===!1&&o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".del-tool"}),o.jsx(rn,{target:".setting-tool"}),o.jsx(rn,{target:".add-section-tool"}),o.jsx(rn,{target:".save-tool"}),o.jsx(rn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{m(oe),i()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((ie=v[oe])==null?void 0:ie.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{h(oe,ve),i()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{k("reusable_template_schema",s),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{g(s,oe,ve),i()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:M,marginBottom:20},className:e?"draggable row":"",children:[n===!1&&o.jsx(Dh,{saveBuilderElementModalData:C,setSaveBuilderElementModalData:_,saveElementModal:w,setSaveElementModal:T}),S===!0&&o.jsx(_h,{renderType:r,visibilty:S,setVisibility:x,section:s,pageIndex:c,sectionIndex:u,emitSocketData:i},"section_settings_"+c+u),n===!1?o.jsx(o.Fragment,{children:e===!0?o.jsxs(li,{header:(fe=s==null?void 0:s.heading)==null?void 0:fe.english,toggleable:!0,headerTemplate:K=>de(K,c,u),onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:[((ee=s==null?void 0:s.subHeadingText)==null?void 0:ee[A==null?void 0:A.type])&&o.jsx("p",{children:(G=s==null?void 0:s.subHeadingText)==null?void 0:G[A==null?void 0:A.type]}),o.jsxs("div",{children:[s.children.map((K,oe)=>{const ve=`${l}-${oe}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:e,data:{path:ve,childrenCount:s.children.length},onDrop:a}),H(K,ve,c,u,oe)]},ve)}),o.jsx(Tr,{isAdvanceView:e,data:{path:`${l}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:a,isLast:!0})]}),E&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{m(c),i()},children:o.jsx(Qt,{})})}),((ae=v[c])==null?void 0:ae.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{h(c,u),i()},children:o.jsx(Qt,{})})})]})]}):o.jsxs(o.Fragment,{children:[((Y=s==null?void 0:s.subHeadingText)==null?void 0:Y[A==null?void 0:A.type])&&o.jsx("p",{children:(ge=s==null?void 0:s.subHeadingText)==null?void 0:ge[A==null?void 0:A.type]}),o.jsx("div",{children:s.children.map((K,oe)=>{const ve=`${l}-${oe}`;return o.jsx(N.Fragment,{children:H(K,ve,c,u,oe)},ve)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(s==null?void 0:s.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(ne=s==null?void 0:s.heading)==null?void 0:ne[A==null?void 0:A.type]}),o.jsx("p",{children:(J=s==null?void 0:s.subHeadingText)==null?void 0:J[A==null?void 0:A.type]}),o.jsx("hr",{})]}),s.children.map((K,oe)=>{const ve=`${l}-${oe}`;return o.jsx(N.Fragment,{children:o.jsx("div",{className:"",children:H(K,ve,c,u,oe)},ve)},ve)})]})})]})},FSe=t=>{var s;const{data:e,currentPath:n,pageIndex:r,page:i}=t,a=N.useRef(null);return o.jsx(o.Fragment,{children:o.jsxs(sw,{ref:a,modules:[dV,wve],spaceBetween:50,slidesPerView:1,navigation:{prevEl:".prev",nextEl:".next"},pagination:{clickable:!1},scrollbar:{el:".swiper-scrollbar",draggable:!1},onSwiper:l=>console.log(l),onSlideChange:()=>console.log("slide change"),children:[(s=e==null?void 0:e.children)==null?void 0:s.map((l,c)=>{var u;return(u=l==null?void 0:l.children)==null?void 0:u.map((d,f)=>{var h;return(h=d==null?void 0:d.children)==null?void 0:h.map((m,g)=>{var v;return(v=m==null?void 0:m.children)==null?void 0:v.map((A,S)=>{const x=`${n}-${c}-${f}-${g}-${S}`;return o.jsx(ow,{children:o.jsx("div",{className:"",children:o.jsx(qc,{page:i,column:m,type:"field",row:d,section:l,field:A,data:A,path:x,pageIndex:r,sectionIndex:c,rowIndex:f,columnIndex:g,fieldIndex:S},`component-${x}-${A==null?void 0:A.uuid}`)})},`swiper_slide_${x}`)})})})}),o.jsxs("div",{className:"flex justify-content-center",children:[o.jsx(Pt,{className:"mr-2 p-button-info prev",size:"large",label:"Previous",icon:"pi pi-arrow-left",onClick:()=>{}}),o.jsx(Pt,{size:"large",className:"p-button-info next",icon:"pi pi-arrow-right",label:"Next"})]})]})})},PSe=t=>{const{isAdvanceView:e,isRenderView:n,isPreview:r}=Zt(),{handleDrop:i}=on(),{data:a,path:s,pageIndex:l}=t,{formBuilderFormSchema:c}=on(),u=N.useRef(null),[{},d]=Qi({type:ta,item:{type:ta,uuid:a.uuid,children:a.children,path:s},collect:h=>({isDragging:h.isDragging()})});d(u);const f=(h,m,g,v)=>o.jsx(NSe,{data:h,section:h,path:m,page:a,pageIndex:g,sectionIndex:v},`section_${g}_${v}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${n?"":"draggable page-css p-3 pb-4"}`,"data-image-src":a==null?void 0:a.bgImage,"data-bg-color":`#${a==null?void 0:a.bgColor}`,children:r===!1?o.jsxs(o.Fragment,{children:[a.children.map((h,m)=>{const g=`${s}-${m}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:e,data:{path:g,childrenCount:a.children.length},onDrop:i}),f(h,g,l,m)]},`section-${m}-${h.uuid}`)}),o.jsx(Tr,{isAdvanceView:e,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]}):o.jsx(o.Fragment,{children:(c==null?void 0:c.surveyQuestionSlide)===!0?o.jsx(o.Fragment,{children:o.jsx(FSe,{page:a,data:a,currentPath:s,pageIndex:l})}):o.jsx("div",{className:"p-1",children:a.children.map((h,m)=>{const g=`${s}-${m}`;return o.jsx(N.Fragment,{children:((h==null?void 0:h.isHidden)===!1||!r)&&f(h,g,l,m)},`section-${m}-${h.uuid}`)})})})})},kSe=()=>{const[t,e]=N.useState(!1),{isAdvanceView:n,isPreview:r,emitSocketData:i}=Zt(),[a,s]=N.useState(!1),[l,c]=N.useState(0),{removePage:u,userSelectedLanguage:d,formBuilderFormLayout:f,formBuilderFormLayout:h,clonePage:m}=on(),g=(v,A,S)=>o.jsx(PSe,{data:v,path:A,pageIndex:S},`page-${v.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(h==null?void 0:h.length)===k9&&r===!0?o.jsx(o.Fragment,{children:(h==null?void 0:h.length)&&h.map((v,A)=>{const S=`${A}`;return o.jsx("div",{children:g(v,S,A)},`${v.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:n===!0||r===!0?o.jsx(Ya,{activeIndex:l,onTabChange:v=>c(v.index),children:(h==null?void 0:h.length)&&h.map((v,A)=>{const S=`${A}`;return o.jsxs(fr,{disabled:!((v==null?void 0:v.isHidden)===!1||!r),header:"Page",headerTemplate:x=>o.jsx(o7,{options:x,pageIndex:A,page:v,isPreview:r,setTabSidebarSetting:s,clonePage:m,emitSocketData:i,formBuilderFormLayout:f,userSelectedLanguage:d,removePage:u,setPageActiveIndex:c,pages:h}),children:[r===!1&&o.jsx(gf,{reusableBuilderElementModalVisibility:t,setReusableBuilderElementModalVisibility:e,pageIndex:A}),o.jsx(H0,{setVisibility:s,visibilty:a,pageIndex:A,page:v,emitSocketData:i}),g(v,S,A)]},`${v.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:(h==null?void 0:h.length)>0&&(h==null?void 0:h.map((v,A)=>{const S=`${A}`;return o.jsxs(N.Fragment,{children:[r===!1&&o.jsx(gf,{reusableBuilderElementModalVisibility:t,setReusableBuilderElementModalVisibility:e,pageIndex:A}),o.jsx(H0,{setVisibility:s,visibilty:a,pageIndex:A,page:v,emitSocketData:i}),g(v,S,A)]},`${v.uuid}-${A}`)}))})})})})},MSe={position:"relative"},LSe=t=>{var w,T,C;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=N.useRef(null),{handleDrop:f}=on(),{isPreview:h,isRenderView:m,isAdvanceView:g}=Zt(),[{isDragging:v},A]=Qi({type:ms,item:{type:ms,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:_=>({isDragging:_.isDragging()})}),S=v&&!m?.25:1;A(d);const x=(_,E,D,B,k,P,j)=>o.jsx(qc,{page:u,type:"field",row:c,section:l,field:_,data:_,path:E,pageIndex:D,sectionIndex:B,rowIndex:k,columnIndex:P,fieldIndex:j},`component-${n}-${_==null?void 0:_.uuid}`);return o.jsx("div",{style:g?{...MSe,opacity:S}:{},className:m?"form-builder-column container-column":"draggable form-builder-column container-column",children:h===!1?o.jsxs("div",{className:"builder-row-column",children:[((w=e==null?void 0:e.children)==null?void 0:w.length)>0?(T=e==null?void 0:e.children)==null?void 0:T.map((_,E)=>{const D=`${n}-${E}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:g,data:{path:D,childrenCount:e.children.length,droppedField:e},onDrop:f}),x(_,D,r,i,a,s,E)]},D)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Tr,{isAdvanceView:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},isLast:!0,onDrop:f})]}):o.jsx(o.Fragment,{children:(C=e==null?void 0:e.children)==null?void 0:C.map((_,E)=>{const D=`${n}-${E}`;return o.jsx(N.Fragment,{children:x(_,D,r,i,a,s,E)},D)})})})},BSe={},VSe=t=>{var D,B,k,P,j,M,H,de,fe;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=N.useRef(null),{removeRow:u,addRow:d,cloneRow:f,formBuilderFormLayout:h,userSelectedLanguage:m}=on(),{isPreview:g,isRenderView:v}=Zt(),{task_status:A,TASK_PUBLISHED:S}=mr(),[x,w]=N.useState(!1),[{isDragging:T},C]=Qi({type:bo,item:{type:bo,uuid:e.uuid,children:e.children,path:n,data:e},collect:ee=>({isDragging:ee.isDragging()})}),_=T?.25:1;C(c);const E=(ee,G,ae,Y,ge,ne)=>o.jsx(LSe,{page:l,row:e,section:s,data:ee,path:G,pageIndex:ae,sectionIndex:Y,rowIndex:ge,columnIndex:ne},`column-${n}-${ee.uuid}`);return o.jsxs("div",{style:{...BSe,opacity:_,marginTop:`${(D=e==null?void 0:e.margin)==null?void 0:D.top}px`,marginBottom:`${(B=e==null?void 0:e.margin)==null?void 0:B.bottom}px`,marginLeft:`${(k=e==null?void 0:e.margin)==null?void 0:k.left}px`,marginRight:`${(P=e==null?void 0:e.margin)==null?void 0:P.right}px`},className:v?"row container-row":"draggable row container-row",children:[x&&o.jsx(Ig,{visibilty:x,setVisibility:w,row:e,pageIndex:r,sectionIndex:i,rowIndex:a},"row_settings_"+r+i+a),g===!1?o.jsxs("div",{children:[o.jsx("span",{className:"row-setting-block-pdf-editor",children:o.jsxs("div",{className:"pdf-setting-container",children:[o.jsxs("button",{onClick:()=>{d(r,i)},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]}),((M=(j=h[r])==null?void 0:j.children[i])==null?void 0:M.children.length)>1&&o.jsxs("button",{onClick:()=>{u(r,i,a)},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>{f(e,r,i,a)},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]}),o.jsxs("button",{onClick:()=>w(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})]})}),o.jsx("div",{className:"form-builder-columns",children:(H=e==null?void 0:e.children)==null?void 0:H.map((ee,G)=>{const ae=`${n}-${G}`;return o.jsx(N.Fragment,{children:E(ee,ae,r,i,a,G)},ae)})})]}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&A===S)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(de=e==null?void 0:e.heading)==null?void 0:de[m==null?void 0:m.type]}),o.jsx("span",{children:(fe=e==null?void 0:e.subHeadingText)==null?void 0:fe[m==null?void 0:m.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((ee,G)=>{const ae=`${n}-${G}`;return o.jsx(N.Fragment,{children:E(ee,ae,r,i,a,G)},ae)})})]})})]})},USe=t=>{var C,_,E;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{userSelectedLanguage:l}=on(),{isPreview:c,isAdvanceView:u}=Zt(),[d,f]=N.useState(!1),[h,m]=N.useState(!1),[g,v]=N.useState(null),A=N.useRef(null),[{isDragging:S},x]=Qi({type:ta,item:{type:ta,uuid:e.uuid,children:e.children,path:n},collect:D=>({isDragging:D.isDragging()})}),w=S?.25:1;x(A);const T=(D,B,k,P,j)=>o.jsx(VSe,{page:s,section:a,data:D,path:B,pageIndex:k,sectionIndex:P,rowIndex:j},`row-${n}-${D.uuid}`);return o.jsxs("div",{style:{opacity:w,marginBottom:20},className:u?"draggable row":"",children:[c===!1&&o.jsx(Dh,{saveBuilderElementModalData:g,setSaveBuilderElementModalData:v,saveElementModal:h,setSaveElementModal:m}),d===!0&&o.jsx(_h,{visibilty:d,setVisibility:f,section:e,pageIndex:r,sectionIndex:i},"section_settings_"+r+i),c===!1?o.jsx("div",{children:o.jsx("div",{children:e.children.map((D,B)=>{const k=`${n}-${B}`;return o.jsx(N.Fragment,{children:T(D,k,r,i,B)},k)})})}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[(e==null?void 0:e.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(C=e==null?void 0:e.heading)==null?void 0:C[l==null?void 0:l.type]}),((_=e==null?void 0:e.subHeadingText)==null?void 0:_[l==null?void 0:l.type])&&o.jsx("p",{children:(E=e==null?void 0:e.subHeadingText)==null?void 0:E[l==null?void 0:l.type]}),o.jsx("hr",{})]}),e.children.map((D,B)=>{const k=`${n}-${B}`;return o.jsx(N.Fragment,{children:o.jsx("div",{className:"",children:T(D,k,r,i,B)},k)},k)})]})})]})},_5={},D5={height:"1280px",width:"100%"},qSe=t=>{var f,h,m,g;const{data:e,path:n,pageIndex:r}=t,{isPreview:i,isRenderView:a}=Zt(),s=N.useRef(null),[{isDragging:l},c]=Qi({type:ta,item:{type:ta,uuid:e.uuid,children:e.children,path:n},collect:v=>({isDragging:v.isDragging()})}),u=l?0:1;c(s);const d=(v,A,S,x)=>o.jsx(USe,{data:v,section:v,path:A,page:e,pageIndex:S,sectionIndex:x},`section_${S}_${x}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${a?"":"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:o.jsx("div",{className:"pdf flex justify-content-center",children:i===!1?o.jsx("div",{id:e==null?void 0:e.uuid,className:"page-block ",style:(e==null?void 0:e.bgType)==="image"?{..._5,...D5,opacity:u,backgroundImage:`url("${e==null?void 0:e.bgImage}")`}:{..._5,...D5,opacity:u,backgroundColor:`#${e==null?void 0:e.bgColor}`},children:((e==null?void 0:e.isCoverPage)===!1||(e==null?void 0:e.isCoverPage)===void 0)&&o.jsx(o.Fragment,{children:e.children.map((v,A)=>{const S=`${n}-${A}`;return o.jsx(N.Fragment,{children:d(v,S,r,A)},`section-${A}-${v.uuid}`)})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"page-block",style:(e==null?void 0:e.bgType)==="image"?{..._5,...D5,opacity:u,backgroundImage:`url("${e==null?void 0:e.bgImage}")`,backgroundSize:"cover"}:{..._5,...D5,opacity:u,backgroundColor:`#${e==null?void 0:e.bgColor}`},children:o.jsx("div",{style:{marginTop:`${(f=e==null?void 0:e.margin)==null?void 0:f.top}px`,marginBottom:`${(h=e==null?void 0:e.margin)==null?void 0:h.bottom}px`,marginLeft:`${(m=e==null?void 0:e.margin)==null?void 0:m.left}px`,marginRight:`${(g=e==null?void 0:e.margin)==null?void 0:g.right}px`},children:e.children.map((v,A)=>{const S=`${n}-${A}`;return o.jsx(N.Fragment,{children:((v==null?void 0:v.isHidden)===!1||!i)&&d(v,S,r,A)},`section-${A}-${v.uuid}`)})})})})})})},$Se=()=>{const{isPreview:t}=Zt(),[e,n]=N.useState(!1),[r,i]=N.useState(0),[a,s]=N.useState(!1),{formBuilderFormLayout:l}=on(),c=(u,d,f)=>o.jsx(qSe,{data:u,path:d,pageIndex:f},`page-${u.uuid}`);return o.jsx("div",{className:"page",children:(l==null?void 0:l.length)===k9&&t===!0?o.jsx(o.Fragment,{children:(l==null?void 0:l.length)&&l.map((u,d)=>{const f=`${d}`;return o.jsx("div",{className:"scroll-height-400",children:c(u,f,d)},`${u.uuid}-${d}`)})}):o.jsx(o.Fragment,{children:t===!1?o.jsx(Ya,{activeIndex:r,onTabChange:u=>i(u.index),children:(l==null?void 0:l.length)&&l.map((u,d)=>{const f=`${d}`;if((u==null?void 0:u.isHidden)===!1||!t)return o.jsxs(fr,{header:"Page",headerTemplate:h=>o.jsx(o7,{options:h,pageIndex:d,page:u,setTabSidebarSetting:n,setPageActiveIndex:i,pages:l}),children:[t===!1&&o.jsx(gf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:d}),o.jsxs("div",{className:"p-3",children:[o.jsx(H0,{setVisibility:n,visibilty:e,pageIndex:d,page:u}),o.jsx("div",{children:c(u,f,d)})]})]},`${u.uuid}-${d}`)})}):o.jsx("div",{className:"",children:(l==null?void 0:l.length)&&l.map((u,d)=>{var h;const f=`${d}`;if((u==null?void 0:u.isHidden)===!1||!t)return o.jsxs("section",{id:u==null?void 0:u.uuid,"data-nav-title":(h=u==null?void 0:u.title)==null?void 0:h.english,"data-scrollspy":!0,children:[t===!1&&o.jsx(gf,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:d}),o.jsxs("div",{className:"p-3",children:[o.jsx(H0,{setVisibility:n,visibilty:e,pageIndex:d,page:u}),o.jsx("div",{children:c(u,f,d)})]})]},`${u.uuid}-${d}`)})})})})},jSe=t=>{var S,x,w,T;const e=N.useRef(null),{removeColumn:n,addColumn:r,cloneColumn:i,formBuilderFormLayout:a}=on(),{isPreview:s,emitSocketData:l}=Zt(),{options:c,pageIndex:u,sectionIndex:d,rowIndex:f,columnIndex:h,data:m}=t,g=c.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",v=`${c.className} justify-content-space-between`,A=`${c.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".add-column-tool"}),o.jsxs("div",{className:v,children:[o.jsxs("span",{ref:s===!1?e:null,children:[o.jsx("button",{className:c.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:c.togglerClassName,onClick:c.onTogglerClick,children:[o.jsx("span",{className:g}),o.jsx(Qt,{})]}),o.jsx("span",{className:A,children:"Column"})]}),s===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:c.togglerClassName,onClick:()=>{r(u,d,f),l()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((T=(w=(x=(S=a[u])==null?void 0:S.children[d])==null?void 0:x.children[f])==null?void 0:w.children)==null?void 0:T.length)>1&&o.jsxs("button",{className:c.togglerClassName,onClick:()=>{n(u,d,f,h),l()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:c.togglerClassName,onClick:()=>{i(m,u,d,f,h),l()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})})]})]})]})},zSe={position:"relative"},HSe=t=>{var w,T,C,_,E;const{isAdvanceView:e,isRenderView:n,isPreview:r}=Zt(),{handleDrop:i}=on(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:m}=t,g=N.useRef(null),[{isDragging:v},A]=Qi({type:ms,item:{type:ms,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:D=>({isDragging:D.isDragging()})}),S=v&&!n?.25:1;A(g);const x=(D,B,k,P,j,M,H)=>o.jsx(qc,{page:m,column:a,type:"field",row:h,section:f,field:D,data:D,path:B,pageIndex:k,sectionIndex:P,rowIndex:j,columnIndex:M,fieldIndex:H},`component-${s}-${D==null?void 0:D.uuid}`);return o.jsx("div",{style:e?{...zSe,opacity:S}:{},className:n?"form-builder-column container-column":"draggable form-builder-column container-column",children:r===!1?o.jsx(o.Fragment,{children:e===!0?o.jsxs(li,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:D=>o.jsx(jSe,{options:D,pageIndex:l,sectionIndex:c,rowIndex:u,data:a,columnIndex:d}),children:[((w=a==null?void 0:a.children)==null?void 0:w.length)>0?(T=a==null?void 0:a.children)==null?void 0:T.map((D,B)=>{const k=`${s}-${B}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:e,fieldDropArea:!0,data:{path:k,childrenCount:a.children.length,droppedField:a},onDrop:i}),x(D,k,l,c,u,d,B)]},k)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(Tr,{isAdvanceView:e,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((C=a==null?void 0:a.children)==null?void 0:C.length)>0?(_=a==null?void 0:a.children)==null?void 0:_.map((D,B)=>{const k=`${s}-${B}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:e,fieldDropArea:!0,data:{path:k,childrenCount:a.children.length,droppedField:a},onDrop:i}),x(D,k,l,c,u,d,B)]},k)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(Tr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(E=a==null?void 0:a.children)==null?void 0:E.map((D,B)=>{const k=`${s}-${B}`;return o.jsx(N.Fragment,{children:x(D,k,l,c,u,d,B)},k)})})})},YSe=t=>{var x,w,T,C;const{options:e,pageIndex:n,sectionIndex:r,rowIndex:i,data:a}=t,[,s]=N.useState(!1),l=N.useRef(null),{isPreview:c,emitSocketData:u}=Zt(),{removeRow:d,addRow:f,cloneRow:h,formBuilderFormLayout:m,userSelectedLanguage:g}=on(),v=e!=null&&e.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",A=`${e==null?void 0:e.className} justify-content-space-between`,S=`${e==null?void 0:e.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".setting-tool"}),o.jsx(rn,{target:".add-row-tool"}),o.jsxs("div",{className:A,children:[o.jsxs("span",{ref:c===!1?l:null,children:[o.jsx("button",{className:e==null?void 0:e.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:e==null?void 0:e.onTogglerClick,children:[o.jsx("span",{className:v}),o.jsx(Qt,{})]}),o.jsxs("span",{className:S,children:["Row:"," ",((x=a==null?void 0:a.heading)==null?void 0:x[g==null?void 0:g.type])!==""?(w=a==null?void 0:a.heading)==null?void 0:w[g==null?void 0:g.type]:"Untitled"]})]}),c===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{f(n,r),u()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((C=(T=m[n])==null?void 0:T.children[r])==null?void 0:C.children.length)>1&&o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{d(n,r,i),u()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{h(a,n,r,i),u()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>s(!0),className:e==null?void 0:e.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})},KSe={},XSe=t=>{var ge,ne,J,K,oe,ve,Ce,Se,Te,De,ie;const{isAdvanceView:e,isRenderView:n,isPreview:r,isAdmin:i,renderType:a,emitSocketData:s}=Zt(),{handleDrop:l}=on(),{data:c,path:u,pageIndex:d,sectionIndex:f,rowIndex:h,section:m,page:g}=t,v=N.useRef(null),{userSelectedLanguage:A}=on(),{userTaskSubmitFormData:S,taskRegisterData:x,updateTaskRegisterData:w,updateTaskProgressValue:T,addUserDataFormSectionRepeatableData:C,removeUserDataFormSectionRepeatableData:_,task_status:E,TASK_PUBLISHED:D}=mr(),[B,k]=N.useState(!1),[{isDragging:P},j]=Qi({type:bo,item:{type:bo,uuid:c.uuid,children:c.children,path:u,data:c},collect:U=>({isDragging:U.isDragging()})}),M=P?.25:1;j(v);const H=(U,re,Q,se,be,me)=>o.jsx(HSe,{page:g,row:c,section:m,data:U,path:re,pageIndex:Q,sectionIndex:se,rowIndex:be,columnIndex:me,emitSocketData:s},`column-${u}-${U.uuid}`),de=_t.findIndex(S,function(U){return(U==null?void 0:U.rowId)===(c==null?void 0:c.uuid)}),fe=()=>{var Q,se,be;const U=_t.cloneDeep(x);((se=(Q=S[de])==null?void 0:Q.repeatableFieldsData)==null?void 0:se.length)>=(c==null?void 0:c.minimumEntries)?U[c==null?void 0:c.uuid]=(be=S[de])==null?void 0:be.repeatableFields:delete U[c==null?void 0:c.uuid];const re=Object.keys(U).length;w(U),T(re)},ee=(ge=c==null?void 0:c.repeatableFields)==null?void 0:ge.map(U=>{var re;return{fieldUuid:U==null?void 0:U.uuid,field:U==null?void 0:U.uuid,header:(re=U==null?void 0:U.label)==null?void 0:re.english}}),G=ee==null?void 0:ee.map(U=>o.jsx(dr,{field:U.field,header:U.header,body:re=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:re[U==null?void 0:U.field]}})})},U.field)),ae=()=>{var se;const U=[...S],re=[];let Q=!0;e:for(const[,be]of c.children.entries()){for(const[,me]of be.children.entries())if(console.log("field.isValid",me.isValid),me!=null&&me.isPostField&&me.isValid!==1){const ye={fieldId:me.uuid,rowIndex:h};console.log("inValidData",ye),re.push(ye),Xt.emit("OnInvalidFieldCatch",ye),Q=!1;break e}Q=!0}Q&&(re==null?void 0:re.length)===0&&(C(c==null?void 0:c.uuid,(se=U[de])==null?void 0:se.repeatableFields),Xt.emit("clearRepeatableFields",c==null?void 0:c.uuid),fe())},Y=U=>o.jsx(o.Fragment,{children:o.jsx(Pt,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{_(c==null?void 0:c.uuid,U==null?void 0:U.rowIndex),setTimeout(()=>{fe()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...KSe,opacity:M,marginTop:`${(ne=c==null?void 0:c.margin)==null?void 0:ne.top}px`,marginBottom:`${(J=c==null?void 0:c.margin)==null?void 0:J.bottom}px`,marginLeft:`${(K=c==null?void 0:c.margin)==null?void 0:K.left}px`,marginRight:`${(oe=c==null?void 0:c.margin)==null?void 0:oe.right}px`},className:n?"row container-row":"draggable row container-row",children:[B&&o.jsx(Ig,{renderType:a,visibilty:B,setVisibility:k,row:c,pageIndex:d,sectionIndex:f,rowIndex:h,emitSocketData:s},"row_settings_"+d+f+h),r===!1?o.jsx(o.Fragment,{children:e===!0?o.jsx(li,{header:"Row",toggleable:!0,headerTemplate:U=>o.jsx(YSe,{options:U,pageIndex:d,sectionIndex:f,rowIndex:h,data:c}),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(ve=c==null?void 0:c.children)==null?void 0:ve.map((U,re)=>{const Q=`${u}-${re}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:e,data:{path:Q,childrenCount:c.children.length},onDrop:l,className:"horizontalDrag"}),H(U,Q,d,f,h,re)]},Q)}),o.jsx(Tr,{isAdvanceView:e,data:{path:`${u}-${c.children.length}`,childrenCount:c.children.length},onDrop:l,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"form-builder-columns":"",style:e?{overflowX:"auto"}:{},children:(Ce=c==null?void 0:c.children)==null?void 0:Ce.map((U,re)=>{const Q=`${u}-${re}`;return o.jsx(N.Fragment,{children:H(U,Q,d,f,h,re)},Q)})})})}):o.jsx(o.Fragment,{children:!(c!=null&&c.rowIsRepeatable&&E===D)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(Se=c==null?void 0:c.heading)==null?void 0:Se[A==null?void 0:A.type]}),o.jsx("span",{children:(Te=c==null?void 0:c.subHeadingText)==null?void 0:Te[A==null?void 0:A.type]}),o.jsx("div",{className:"form-builder-columns",children:c.children.map((U,re)=>{const Q=`${u}-${re}`;return o.jsx(N.Fragment,{children:H(U,Q,d,f,h,re)},Q)})})]})}),(c==null?void 0:c.rowIsRepeatable)&&E!==D&&o.jsx(Pt,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>ae(),label:(De=c.addToListButtonLabel)==null?void 0:De[A==null?void 0:A.type]}),(c==null?void 0:c.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(zs,{value:(S==null?void 0:S.length)>0?(ie=S[de])==null?void 0:ie.repeatableFieldsData:[],children:[G,E!==D&&o.jsx(dr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:U=>Y(U)})]}),i&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{field:c})]})]})]})},GSe=t=>{var fe,ee,G,ae,Y,ge,ne,J;const{isAdvanceView:e,isPreview:n,renderType:r,emitSocketData:i}=Zt(),{handleDrop:a}=on(),{data:s,path:l,pageIndex:c,sectionIndex:u,section:d,page:f}=t,{removeSection:h,addSection:m,cloneSection:g,formBuilderFormLayout:v,userSelectedLanguage:A}=on(),[S,x]=N.useState(!1),[w,T]=N.useState(!1),[C,_]=N.useState({reusable_template_schema:""}),[E,D]=N.useState(!1),B=N.useRef(null),k=(K,oe)=>{_(ve=>({...ve,[K]:oe}))},[{isDragging:P},j]=Qi({type:ta,item:{type:ta,uuid:s.uuid,children:s.children,path:l},collect:K=>({isDragging:K.isDragging()})}),M=P?.25:1;j(B);const H=(K,oe,ve,Ce,Se)=>o.jsx(XSe,{page:f,section:d,data:K,path:oe,pageIndex:ve,sectionIndex:Ce,rowIndex:Se,emitSocketData:i},`row-${l}-${K.uuid}`),de=(K,oe,ve)=>{var De,ie;const Ce=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Se=`${K.className} justify-content-space-between panel-tab-section`,Te=`${K.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Se,children:[o.jsxs("span",{ref:n===!1?B:null,children:[o.jsx("button",{className:K.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:Ce}),o.jsx(Qt,{})]}),o.jsxs("span",{className:Te,children:[ve+1," ",(De=s==null?void 0:s.heading)==null?void 0:De[A==null?void 0:A.type]]})]}),n===!1&&o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".del-tool"}),o.jsx(rn,{target:".setting-tool"}),o.jsx(rn,{target:".add-section-tool"}),o.jsx(rn,{target:".save-tool"}),o.jsx(rn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{m(oe),i()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((ie=v[oe])==null?void 0:ie.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{h(oe,ve),i()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{k("reusable_template_schema",s),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{g(s,oe,ve),i()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:M,marginBottom:20},className:e?"draggable row":"",children:[n===!1&&o.jsx(Dh,{saveBuilderElementModalData:C,setSaveBuilderElementModalData:_,saveElementModal:w,setSaveElementModal:T}),S===!0&&o.jsx(_h,{renderType:r,visibilty:S,setVisibility:x,section:s,pageIndex:c,sectionIndex:u,emitSocketData:i},"section_settings_"+c+u),n===!1?o.jsx(o.Fragment,{children:e===!0?o.jsxs(li,{header:(fe=s==null?void 0:s.heading)==null?void 0:fe.english,toggleable:!0,headerTemplate:K=>de(K,c,u),onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:[((ee=s==null?void 0:s.subHeadingText)==null?void 0:ee[A==null?void 0:A.type])&&o.jsx("p",{children:(G=s==null?void 0:s.subHeadingText)==null?void 0:G[A==null?void 0:A.type]}),o.jsxs("div",{children:[s.children.map((K,oe)=>{const ve=`${l}-${oe}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:e,data:{path:ve,childrenCount:s.children.length},onDrop:a}),H(K,ve,c,u,oe)]},ve)}),o.jsx(Tr,{isAdvanceView:e,data:{path:`${l}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:a,isLast:!0})]}),E&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{m(c),i()},children:o.jsx(Qt,{})})}),((ae=v[c])==null?void 0:ae.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{h(c,u),i()},children:o.jsx(Qt,{})})})]})]}):o.jsxs(o.Fragment,{children:[((Y=s==null?void 0:s.subHeadingText)==null?void 0:Y[A==null?void 0:A.type])&&o.jsx("p",{children:(ge=s==null?void 0:s.subHeadingText)==null?void 0:ge[A==null?void 0:A.type]}),o.jsx("div",{children:s.children.map((K,oe)=>{const ve=`${l}-${oe}`;return o.jsx(N.Fragment,{children:H(K,ve,c,u,oe)},ve)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(s==null?void 0:s.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(ne=s==null?void 0:s.heading)==null?void 0:ne[A==null?void 0:A.type]}),o.jsx("p",{children:(J=s==null?void 0:s.subHeadingText)==null?void 0:J[A==null?void 0:A.type]}),o.jsx("hr",{})]}),s.children.map((K,oe)=>{const ve=`${l}-${oe}`;return o.jsx(N.Fragment,{children:o.jsx("div",{className:"",children:H(K,ve,c,u,oe)},ve)},ve)})]})})]})},RSe={position:"relative"},WSe=t=>{var w,T,C;const{isAdvanceView:e,isRenderView:n,isPreview:r}=Zt(),{handleDrop:i}=on(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:m}=t,g=N.useRef(null),[{isDragging:v},A]=Qi({type:ms,item:{type:ms,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:_=>({isDragging:_.isDragging()})}),S=v&&!n?.25:1;A(g);const x=(_,E,D,B,k,P,j)=>o.jsx(qc,{page:m,type:"field",row:h,column:a,section:f,field:_,data:_,path:E,pageIndex:D,sectionIndex:B,rowIndex:k,columnIndex:P,fieldIndex:j},`component-${s}-${_==null?void 0:_.uuid}`);return o.jsx("div",{style:e?{...RSe,opacity:S}:{},className:n?"":"draggable column container-column",children:r===!1?o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((w=a==null?void 0:a.children)==null?void 0:w.length)>0?(T=a==null?void 0:a.children)==null?void 0:T.map((_,E)=>{const D=`${s}-${E}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:e,fieldDropArea:!0,data:{path:D,childrenCount:a.children.length,droppedField:a},onDrop:i}),x(_,D,l,c,u,d,E)]},D)}):o.jsx(o.Fragment,{}),o.jsx(Tr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]})}):o.jsx(o.Fragment,{children:(C=a==null?void 0:a.children)==null?void 0:C.map((_,E)=>{const D=`${s}-${E}`;return o.jsx(N.Fragment,{children:x(_,D,l,c,u,d,E)},D)})})})},QSe=t=>{var l;const{isAdvanceView:e}=Zt(),{data:n,page:r,currentPath:i,pageIndex:a}=t,s=(c,u,d,f,h,m,g,v)=>o.jsx(WSe,{page:r,row:v,section:g,data:c,path:`${d}-${f}-${h}-${m}`,pageIndex:d,sectionIndex:f,rowIndex:h,columnIndex:m},`column-${i}-${c.uuid}`);return o.jsx(o.Fragment,{children:(l=n==null?void 0:n.children)==null?void 0:l.map((c,u)=>{var d;return(d=c==null?void 0:c.children)==null?void 0:d.map((f,h)=>{var m;return o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"columns":"",style:e?{overflowX:"auto"}:{},children:(m=f==null?void 0:f.children)==null?void 0:m.map((g,v)=>{const A=`${i}-${u}-${h}-${v}`;return o.jsx(N.Fragment,{children:s(g,A,a,u,h,v,c,f)},A)})})})})})})},JSe=t=>{const{data:e,path:n,pageIndex:r}=t,{isAdvanceView:i,isRenderView:a,isPreview:s}=Zt(),{formBuilderFormSchema:l,handleDrop:c}=on(),u=N.useRef(null),[{},d]=Qi({type:ta,item:{type:ta,uuid:e.uuid,children:e.children,path:n},collect:h=>({isDragging:h.isDragging()})});d(u);const f=(h,m,g,v)=>o.jsx(GSe,{data:h,section:h,path:m,page:e,pageIndex:g,sectionIndex:v},`section_${g}_${v}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${a?"":"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:s===!1?o.jsx(o.Fragment,{children:i?o.jsxs(o.Fragment,{children:[e.children.map((h,m)=>{const g=`${n}-${m}`;return o.jsxs(N.Fragment,{children:[i===!0&&o.jsx(Tr,{isAdvanceView:i,data:{path:g,childrenCount:e.children.length},onDrop:c}),f(h,g,r,m)]},`section-${m}-${h.uuid}`)}),i===!0&&o.jsx(Tr,{isAdvanceView:i,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:c,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsx(QSe,{page:e,data:e,path:n,pageIndex:r})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"p-1",children:e.children.map((h,m)=>{const g=`${n}-${m}`;return o.jsx(N.Fragment,{children:l!=null&&l.showConditionalFields?o.jsx(o.Fragment,{children:o.jsx("div",{children:f(h,g,r,m)})}):((h==null?void 0:h.isHidden)===!1||!s)&&f(h,g,r,m)},`section-${m}-${h.uuid}`)})})})})},ZSe=()=>{const[t,e]=N.useState(!1),{formBuilderFormLayout:n}=on(),{isPreview:r}=Zt(),i=()=>{},a=(s,l,c)=>o.jsx(JSe,{data:s,path:l,pageIndex:c},`page-${s.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:o.jsx("div",{children:(n==null?void 0:n.length)&&n.map((s,l)=>{const c=`${l}`;if((s==null?void 0:s.isHidden)===!1||!r)return o.jsxs("div",{children:[o.jsx(H0,{setVisibility:e,visibilty:t,pageIndex:l,page:s,emitSocketData:i}),a(s,c,l)]},`policie-page-${l}`)})})})})},exe={position:"relative"},txe=t=>{var w;const{isPreview:e,isRenderView:n,isAdvanceView:r}=Zt(),{data:i,path:a,pageIndex:s,sectionIndex:l,rowIndex:c,columnIndex:u,section:d,row:f,page:h}=t,m=N.useRef(null),{handleDrop:g}=on(),[{isDragging:v},A]=Qi({type:ms,item:{type:ms,uuid:i==null?void 0:i.uuid,children:i.children,path:a},collect:T=>({isDragging:T.isDragging()})}),S=v&&!n?.25:1;A(m);const x=(T,C,_,E,D,B,k)=>o.jsx(qc,{page:h,type:"field",row:f,section:d,field:T,data:T,path:C,pageIndex:_,sectionIndex:E,rowIndex:D,columnIndex:B,fieldIndex:k},`component-${a}-${T==null?void 0:T.uuid}`);return o.jsx("div",{style:r?{...exe,opacity:S}:{},className:n?"form-builder-column container-column":"draggable form-builder-column container-column",children:!e&&o.jsxs("div",{children:[(w=i==null?void 0:i.children)==null?void 0:w.map((T,C)=>{const _=`${a}-${C}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{fieldDropArea:!0,isAdvanceView:r,data:{path:_,childrenCount:i.children.length,droppedField:i},onDrop:g}),x(T,_,s,l,c,u,C)]},_)}),i.children.length===0&&o.jsx("p",{className:"text-center",children:"Add element by dragging and dropping element from the sidebar into the dropzone area"}),o.jsx(Tr,{fieldDropArea:!0,isAdvanceView:r,data:{path:`${a}-${i.children.length}`,childrenCount:i.children.length,droppedField:i},onDrop:g,isLast:!0})]})})},nxe={},rxe=t=>{var Y,ge,ne,J,K,oe,ve;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=N.useRef(null),{userSelectedLanguage:u,handleDrop:d}=on(),{userTaskSubmitFormData:f,taskRegisterData:h,updateTaskRegisterData:m,updateTaskProgressValue:g,addUserDataFormSectionRepeatableData:v,removeUserDataFormSectionRepeatableData:A,task_status:S,TASK_PUBLISHED:x}=mr(),{isRenderView:w,isAdmin:T,isAdvanceView:C,emitSocketData:_,renderType:E}=Zt(),[D,B]=N.useState(!1),[{isDragging:k},P]=Qi({type:bo,item:{type:bo,uuid:e.uuid,children:e.children,path:n,data:e},collect:Ce=>({isDragging:Ce.isDragging()})}),j=k?.25:1;P(c);const M=(Ce,Se,Te,De,ie,U)=>o.jsx(txe,{page:l,row:e,section:s,data:Ce,path:Se,pageIndex:Te,sectionIndex:De,rowIndex:ie,columnIndex:U},`column-${n}-${Ce.uuid}`),H=_t.findIndex(f,function(Ce){return(Ce==null?void 0:Ce.rowId)===(e==null?void 0:e.uuid)}),de=()=>{var Te,De,ie;const Ce=_t.cloneDeep(h);((De=(Te=f[H])==null?void 0:Te.repeatableFieldsData)==null?void 0:De.length)>=(e==null?void 0:e.minimumEntries)?Ce[e==null?void 0:e.uuid]=(ie=f[H])==null?void 0:ie.repeatableFields:delete Ce[e==null?void 0:e.uuid];const Se=Object.keys(Ce).length;m(Ce),g(Se)},fe=(Y=e==null?void 0:e.repeatableFields)==null?void 0:Y.map(Ce=>{var Se;return{fieldUuid:Ce==null?void 0:Ce.uuid,field:Ce==null?void 0:Ce.uuid,header:(Se=Ce==null?void 0:Ce.label)==null?void 0:Se.english}}),ee=fe==null?void 0:fe.map(Ce=>o.jsx(dr,{field:Ce.field,header:Ce.header,body:Se=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:Se[Ce==null?void 0:Ce.field]}})})},Ce.field)),G=()=>{var De;const Ce=[...f],Se=[];let Te=!0;e:for(const[,ie]of e.children.entries()){for(const[,U]of ie.children.entries())if(console.log("field.isValid",U.isValid),U!=null&&U.isPostField&&U.isValid!==1){const re={fieldId:U.uuid,rowIndex:a};console.log("inValidData",re),Se.push(re),Xt.emit("OnInvalidFieldCatch",re),Te=!1;break e}Te=!0}Te&&(Se==null?void 0:Se.length)===0&&(v(e==null?void 0:e.uuid,(De=Ce[H])==null?void 0:De.repeatableFields),Xt.emit("clearRepeatableFields",e==null?void 0:e.uuid),de())},ae=Ce=>o.jsx(o.Fragment,{children:o.jsx(Pt,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{A(e==null?void 0:e.uuid,Ce==null?void 0:Ce.rowIndex),setTimeout(()=>{de()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...nxe,opacity:j,marginTop:`${(ge=e==null?void 0:e.margin)==null?void 0:ge.top}px`,marginBottom:`${(ne=e==null?void 0:e.margin)==null?void 0:ne.bottom}px`,marginLeft:`${(J=e==null?void 0:e.margin)==null?void 0:J.left}px`,marginRight:`${(K=e==null?void 0:e.margin)==null?void 0:K.right}px`},className:w?"row container-row":"draggable row container-row",children:[D&&o.jsx(Ig,{renderType:E,visibilty:D,setVisibility:B,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:_},"row_settings_"+r+i+a),o.jsxs("div",{className:"form-builder-columns",children:[e.children.map((Ce,Se)=>{const Te=`${n}-${Se}`;return o.jsxs(N.Fragment,{children:[E===Y1&&o.jsx(Tr,{isAdvanceView:C,data:{path:Te,childrenCount:e.children.length},onDrop:d,className:"horizontalDrag"}),M(Ce,Te,r,i,a,Se)]},Te)}),o.jsx(Tr,{isAdvanceView:C,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:d,className:"horizontalDrag",isLast:!0})]}),(e==null?void 0:e.rowIsRepeatable)&&S!==x&&o.jsx(Pt,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>G(),label:(oe=e.addToListButtonLabel)==null?void 0:oe[u==null?void 0:u.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(zs,{value:(f==null?void 0:f.length)>0?(ve=f[H])==null?void 0:ve.repeatableFieldsData:[],children:[ee,S!==x&&o.jsx(dr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:Ce=>ae(Ce)})]}),T&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Ni,{field:e})]})]})]})},ixe=t=>{var H,de;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{removeSection:l,addSection:c,cloneSection:u,formBuilderFormLayout:d,userSelectedLanguage:f,handleDrop:h}=on(),{isPreview:m,isAdvanceView:g,renderType:v,emitSocketData:A}=Zt(),[S,x]=N.useState(!1),[w,T]=N.useState(!1),[C,_]=N.useState({reusable_template_schema:""}),E=N.useRef(null),D=(fe,ee)=>{_(G=>({...G,[fe]:ee}))},[{isDragging:B},k]=Qi({type:ta,item:{type:ta,uuid:e.uuid,children:e.children,path:n},collect:fe=>({isDragging:fe.isDragging()})}),P=B?.25:1;k(E);const j=(fe,ee,G,ae,Y)=>o.jsx(rxe,{page:s,section:a,data:fe,path:ee,pageIndex:G,sectionIndex:ae,rowIndex:Y},`row-${n}-${fe.uuid}`),M=(fe,ee,G)=>{var ne,J;const ae=fe.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Y=`${fe.className} justify-content-space-between panel-tab-section`,ge=`${fe.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Y,children:[o.jsxs("span",{ref:m===!1?E:null,children:[o.jsx("button",{className:fe.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:fe.togglerClassName,onClick:fe.onTogglerClick,children:[o.jsx("span",{className:ae}),o.jsx(Qt,{})]}),o.jsxs("span",{className:ge,children:[G+1," ",(ne=e==null?void 0:e.heading)==null?void 0:ne[f==null?void 0:f.type]]})]}),m===!1&&o.jsxs(o.Fragment,{children:[o.jsx(rn,{target:".clone-tool"}),o.jsx(rn,{target:".del-tool"}),o.jsx(rn,{target:".setting-tool"}),o.jsx(rn,{target:".add-section-tool"}),o.jsx(rn,{target:".save-tool"}),o.jsx(rn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:fe.togglerClassName,onClick:()=>{c(ee),A()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(Qt,{})]})}),((J=d[ee])==null?void 0:J.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:fe.togglerClassName,onClick:()=>{l(ee,G),A()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:fe.togglerClassName,onClick:()=>{D("reusable_template_schema",e),T(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:fe.togglerClassName,onClick:()=>{u(e,ee,G),A()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(Qt,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:fe.togglerClassName,onClick:()=>x(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(Qt,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:P,marginBottom:20},className:g?"draggable row":"",children:[m===!1&&o.jsx(Dh,{saveBuilderElementModalData:C,setSaveBuilderElementModalData:_,saveElementModal:w,setSaveElementModal:T}),S===!0&&o.jsx(_h,{renderType:v,visibilty:S,setVisibility:x,section:e,pageIndex:r,sectionIndex:i,emitSocketData:A},"section_settings_"+r+i),m===!1?o.jsxs(li,{className:"mb-5",header:(H=e==null?void 0:e.heading)==null?void 0:H.english,toggleable:!0,headerTemplate:fe=>M(fe,r,i),children:[o.jsx("p",{children:(de=e==null?void 0:e.subHeadingText)==null?void 0:de[f==null?void 0:f.type]}),o.jsxs("div",{className:"",children:[e.children.map((fe,ee)=>{const G=`${n}-${ee}`;return o.jsx(N.Fragment,{children:j(fe,G,r,i,ee)},G)}),o.jsx(Tr,{isAdvanceView:g,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:h,className:"horizontalDrag",isLast:!0})]})]}):o.jsx(o.Fragment,{})]})},axe=t=>{const{isRenderView:e,isPreview:n}=Zt(),{data:r,path:i,pageIndex:a}=t,s=N.useRef(null),[,l]=Qi({type:ta,item:{type:ta,uuid:r.uuid,children:r.children,path:i},collect:u=>({isDragging:u.isDragging()})});l(s);const c=(u,d,f,h)=>o.jsx(ixe,{data:u,section:u,path:d,pageIndex:f,sectionIndex:h,page:r},`section_${f}_${h}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${e?"":"draggable page-css p-3 pb-4"}`,"data-image-src":r==null?void 0:r.bgImage,"data-bg-color":`#${r==null?void 0:r.bgColor}`,children:n?o.jsx(o.Fragment,{}):o.jsx("div",{className:"p-1",children:r.children.map((u,d)=>{const f=`${i}-${d}`;return o.jsx(N.Fragment,{children:c(u,f,a,d)},`section-${d}-${u.uuid}`)})})})},sxe=()=>{const{formBuilderFormLayout:t}=on(),e=(n,r,i)=>o.jsx(axe,{data:n,path:r,pageIndex:i},`page-${n.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(t==null?void 0:t.length)&&t.map((n,r)=>{const i=`${r}`;return o.jsx("div",{children:e(n,i,r)},`exam-page-${r}`)})})})},oxe=t=>{var _,E,D,B,k;const{userSelectedLanguage:e,formBuilderConfigurationType:n,builderTemplateName:r,formBuilderFormSchema:i}=on(),a=[{label:{english:"List main maintenance safety tips? "},componentType:"question",questionText:{french:"Quels sont les principaux conseils de sécurité pour la maintenance?? ",english:"List main maintenance safety tips? "},answerOptions:[],isHidden:!1,uuid:"rtest",options:[],underLined:!1,isAllowMultipleAnswer:!1,resizableColumns:!1,reorderableColumns:!1,timeLimit:0,score:0,subject_id:0,course_category_id:0,TextEditorProps:!1}],{questions:s}=t,[l,c]=N.useState(),[u,d]=N.useState([]),{media:f}=Zt(),h=(_=f==null?void 0:f.image)!=null&&_.MediaImage?(E=f==null?void 0:f.image)==null?void 0:E.MediaImage:o.jsx(o.Fragment,{}),m={assessment_id:"abc123",name:`${n==null?void 0:n.name} - ${r}`,label:"Quiz 1",quizConfiguration:{quizPassMark:75,quizTimeLimit:2,quizMaxAttempts:99,quizSequentialAnswer:0,isAllCorrectMandatory:!0,quizRandomiseQuestions:1,quizUniqueAnswersPerAttempt:"1"},quizElements:(s==null?void 0:s.length)>0?s:a},[g,v]=N.useState(0),[A,S]=N.useState(!1);function x(P,j){return(P==null?void 0:P.length)<=j?P:(P==null?void 0:P.slice(0,j))+"..."}N.useEffect(()=>{S(!0)},[]);const w=()=>{g!==0&&v(g-1)},T=()=>{if(m!=null&&m.quizElements&&g+1!==(m==null?void 0:m.quizElements.length))v(g+1);else if((m==null?void 0:m.quizElements.length)===g+1)return},C=(P,j)=>{let M=[...u];P.checked?M.push(j):M=M.filter(H=>(H==null?void 0:H[e==null?void 0:e.type])!==(j==null?void 0:j[e==null?void 0:e.type])),d(M)};return o.jsxs("div",{className:"scroll-height-200 mb-2",children:[A&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[o.jsxs("h3",{children:[m==null?void 0:m.name," "]}),(D=m==null?void 0:m.quizElements)==null?void 0:D.map((P,j)=>{var M,H,de,fe,ee,G,ae,Y,ge;return(P==null?void 0:P.answerInputType)==="radio"?o.jsxs("div",{className:g===j?"card":" flex align-items-center p-field-radiobutton",children:[((M=P==null?void 0:P.questionTextImage)==null?void 0:M[e==null?void 0:e.type])&&((H=P==null?void 0:P.questionTextImage)==null?void 0:H[e==null?void 0:e.type])!==""&&o.jsx("div",{className:"text-center assessment_image_container",children:o.jsx(h,{mediaId:(de=P==null?void 0:P.questionTextImage)==null?void 0:de[e==null?void 0:e.type],style:{height:"100px",width:"100px",objectFit:"cover",borderRadius:100},className:"text-center",alt:"questionImage"})}),o.jsx("h3",{className:"mb-5",children:g===j&&((fe=P==null?void 0:P.questionText)==null?void 0:fe[e==null?void 0:e.type])}),g===j&&((ee=P==null?void 0:P.answerOptions)==null?void 0:ee.map((ne,J)=>{var K,oe,ve,Ce;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(Ji,{inputId:`${J}-preview`,value:ne==null?void 0:ne.answersText,checked:l===J,onChange:()=>{c(J)}}),((K=ne.answersTextImage)==null?void 0:K[e==null?void 0:e.type])&&((oe=ne.answersTextImage)==null?void 0:oe[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(ve=ne.answersTextImage)==null?void 0:ve[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:`${J}-preview`,children:(Ce=ne.answersText)==null?void 0:Ce[e==null?void 0:e.type]})]},J)}))]},j):(P==null?void 0:P.answerInputType)==="checkbox"?o.jsxs("div",{className:g===j?"card":" flex align-items-center p-field-radiobutton",children:[o.jsx("h3",{className:"mb-5",children:g===j&&((G=P==null?void 0:P.questionText)==null?void 0:G[e==null?void 0:e.type])}),g===j&&((ae=P==null?void 0:P.answerOptions)==null?void 0:ae.map((ne,J)=>{var K,oe,ve,Ce;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(Or,{inputId:J,value:ne==null?void 0:ne.answersText,onChange:Se=>{C(Se,ne==null?void 0:ne.answersText)},checked:u.some(Se=>{var Te;return(Se==null?void 0:Se[e==null?void 0:e.type])===((Te=ne==null?void 0:ne.answersText)==null?void 0:Te[e==null?void 0:e.type])})}),((K=ne.answersTextImage)==null?void 0:K[e==null?void 0:e.type])&&((oe=ne.answersTextImage)==null?void 0:oe[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(ve=ne.answersTextImage)==null?void 0:ve[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:J,children:(Ce=ne.answersText)==null?void 0:Ce[e==null?void 0:e.type]})]},J)}))]},j):o.jsxs("div",{className:g===j?"card":"",children:[o.jsx("h3",{className:"mb-5",children:g===j&&((Y=P==null?void 0:P.questionText)==null?void 0:Y[e==null?void 0:e.type])}),g===j&&((ge=P==null?void 0:P.answerOptions)==null?void 0:ge.map((ne,J)=>{var K,oe,ve,Ce;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(Ji,{inputId:J,value:ne==null?void 0:ne.answersText,onChange:()=>{}}),((K=ne.answersTextImage)==null?void 0:K[e==null?void 0:e.type])&&((oe=ne.answersTextImage)==null?void 0:oe[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(ve=ne.answersTextImage)==null?void 0:ve[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:J,children:(Ce=ne.answersText)==null?void 0:Ce[e==null?void 0:e.type]})]},J)}))]},j)})]})}),o.jsxs("div",{className:"text-center my-5",children:[o.jsxs("div",{className:"mb-1",children:["Viewing:"," ",g+1+"/"+(m==null?void 0:m.quizElements.length)]}),o.jsx("br",{}),g>0&&o.jsx(Pt,{text:!0,className:"mx-2",label:"Previous",onClick:()=>w()}),o.jsx(Pt,{text:!0,label:(m==null?void 0:m.quizElements.length)===g+1?"Finish":"Next",onClick:()=>T()})]})]}),o.jsxs("div",{className:"surface-card p-4 shadow-2 border-round",children:[o.jsx("div",{className:"font-medium text-3xl text-900 mb-3",children:"Summary"}),o.jsx("div",{className:"text-500 mb-5",children:`${n==null?void 0:n.name} - ${r}`}),o.jsxs("ul",{className:"list-none p-0 m-0 border-top-1 surface-border",children:[o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Total Questions:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:(B=m==null?void 0:m.quizElements)==null?void 0:B.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Has Maximum Number of questions:"}),o.jsxs("div",{className:"text-900 w-full md:w-9 line-height-3",children:[i==null?void 0:i.noOfAssessmentQuestions," "]})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Show Answers Randomly"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:i!=null&&i.randomiseAnswers?o.jsx(xc,{className:"mr-2",severity:"success",value:"True"}):o.jsx(xc,{className:"mr-2",severity:"warning",value:"False"})})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Question Time Limit"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:"0.45 seconds"})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Exam Time Limit:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:"2 mins"})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Show Questions Randomly:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:o.jsx("div",{className:"grid mt-0 mr-0",children:(k=m==null?void 0:m.quizElements)==null?void 0:k.map((P,j)=>{var M;return o.jsx("div",{className:"col-12 md:col-6",children:o.jsx("div",{className:"p-3 border-1 surface-border border-round surface-card",children:o.jsx("div",{className:"text-700",children:x(((M=P==null?void 0:P.questionText)==null?void 0:M[e==null?void 0:e.type])||"",30)})})},`preview-question-${j}`)})})})]})]})]})]})},lxe=t=>{var T;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=N.useRef(null),{handleDrop:f}=on(),{isRenderView:h,isAdvanceView:m,isPreview:g}=Zt(),[{isDragging:v},A]=Qi({type:ms,item:{type:ms,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:C=>({isDragging:C.isDragging()})}),x={position:"relative",opacity:v&&!h?.25:1};A(d);const w=(C,_,E,D,B,k,P)=>o.jsx(qc,{page:u,type:"field",row:c,section:l,field:C,data:C,path:_,pageIndex:E,sectionIndex:D,rowIndex:B,columnIndex:k,fieldIndex:P},`component-${n}-${C==null?void 0:C.uuid}`);return o.jsx("div",{style:m?x:{},className:h?"form-builder-column container-column":"draggable form-builder-column container-column",children:g===!1?o.jsxs("div",{children:[e.children.length>0&&((T=e==null?void 0:e.children)==null?void 0:T.map((C,_)=>{const E=`${n}-${_}`;return o.jsxs(N.Fragment,{children:[o.jsx(Tr,{isAdvanceView:m,fieldDropArea:!0,data:{path:E,childrenCount:e.children.length,droppedField:e},onDrop:f}),w(C,E,r,i,a,s,_)]},E)})),e.children.length===0&&o.jsx("p",{className:"text-center",children:"Drag and drop from sidebar items"}),o.jsx(Tr,{isAdvanceView:m,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:f,isLast:!0})]}):o.jsx(o.Fragment,{children:e.children.length>0?o.jsx(oxe,{questions:e.children}):o.jsx("p",{className:"text-center",children:"No items to show"})})})},cxe={},uxe=t=>{var g,v,A,S;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=N.useRef(null),{isRenderView:u}=Zt(),[{isDragging:d},f]=Qi({type:bo,item:{type:bo,uuid:e.uuid,children:e.children,path:n,data:e},collect:x=>({isDragging:x.isDragging()})}),h=d?.25:1;f(c);const m=(x,w,T,C,_,E)=>o.jsx(lxe,{page:l,row:e,section:s,data:x,path:w,pageIndex:T,sectionIndex:C,rowIndex:_,columnIndex:E},`column-${n}-${x.uuid}`);return o.jsx("div",{style:{...cxe,opacity:h,marginTop:`${(g=e==null?void 0:e.margin)==null?void 0:g.top}px`,marginBottom:`${(v=e==null?void 0:e.margin)==null?void 0:v.bottom}px`,marginLeft:`${(A=e==null?void 0:e.margin)==null?void 0:A.left}px`,marginRight:`${(S=e==null?void 0:e.margin)==null?void 0:S.right}px`},className:u?"row container-row":"draggable row container-row",children:o.jsx("div",{className:"form-builder-columns",children:e.children.map((x,w)=>{const T=`${n}-${w}`;return o.jsx(N.Fragment,{children:m(x,T,r,i,a,w)},T)})})})},dxe=t=>{const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{renderType:l,emitSocketData:c,isAdvanceView:u,isPreview:d}=Zt(),[f,h]=N.useState(!1),[m,g]=N.useState(!1),[v,A]=N.useState(null),S=N.useRef(null),[{isDragging:x},w]=Qi({type:ta,item:{type:ta,uuid:e.uuid,children:e.children,path:n},collect:_=>({isDragging:_.isDragging()})}),T=x?.25:1;w(S);const C=(_,E,D,B,k)=>o.jsx(uxe,{page:s,section:a,data:_,path:E,pageIndex:D,sectionIndex:B,rowIndex:k},`row-${n}-${_.uuid}`);return o.jsxs("div",{style:{opacity:T,marginBottom:20},className:u?"draggable row":"",children:[d===!1&&o.jsx(Dh,{saveBuilderElementModalData:v,setSaveBuilderElementModalData:A,saveElementModal:m,setSaveElementModal:g}),f===!0&&o.jsx(_h,{renderType:l,visibilty:f,setVisibility:h,section:e,pageIndex:r,sectionIndex:i,emitSocketData:c},"section_settings_"+r+i),o.jsx("div",{className:"",children:e.children.map((_,E)=>{const D=`${n}-${E}`;return o.jsx(N.Fragment,{children:C(_,D,r,i,E)},D)})})]})},fxe=t=>{const{data:e,path:n,pageIndex:r}=t,{isRenderView:i}=Zt(),a=N.useRef(null),[{},s]=Qi({type:ta,item:{type:ta,uuid:e.uuid,children:e.children,path:n},collect:c=>({isDragging:c.isDragging()})});s(a);const l=(c,u,d,f)=>o.jsx(dxe,{data:c,section:c,path:u,page:e,pageIndex:d,sectionIndex:f},`section_${d}_${f}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${i?"":"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:o.jsx("div",{className:"",children:e.children.map((c,u)=>{const d=`${n}-${u}`;return o.jsx(N.Fragment,{children:l(c,d,r,u)},`section-${u}-${c.uuid}`)})})})},hxe=()=>{const{formBuilderFormLayout:t}=on(),e=(n,r,i)=>o.jsx(fxe,{data:n,path:r,pageIndex:i},`page-${n.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(t==null?void 0:t.length)&&t.map((n,r)=>{const i=`${r}`;return o.jsx("div",{children:e(n,i,r)},`exam-page-${r}`)})})})},O5=()=>{const{renderType:t,isAdvanceView:e}=Zt();switch(console.log("Render Builder isAdvanceView",e),t){case F0:return o.jsx(ESe,{});case z1:return o.jsx(kSe,{});case H1:return o.jsx($Se,{});case hm:return o.jsx(ZSe,{});case pm:return o.jsx(sxe,{});case Y1:return o.jsx(hxe,{})}},N5=t=>{const{handleSelectCourseItem:e,icon:n,currentItem:r,field:i,fieldIndex:a,title:s}=t,[l,c]=N.useState(!1),{userTrainingSaveData:u}=mr(),d=h=>{var m,g;if(u!==null&&h){const v=u==null?void 0:u.findIndex(A=>(A==null?void 0:A.fieldId)===(h==null?void 0:h.uuid));return(m=u[v])!=null&&m.isSeen?(g=u[v])==null?void 0:g.isSeen:!1}else return!1},f=()=>{let h=[];if(u!==null){const g=u.findIndex(v=>(v==null?void 0:v.fieldId)===(i==null?void 0:i.uuid));h=u[g].logs}else h=[];return h==null?void 0:h.map((g,v)=>o.jsxs("li",{className:"flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-4",children:[o.jsxs("div",{className:"mr-8 md:mr-8",children:[o.jsxs("span",{className:"inline-block text-900 font-medium mr-2 mb-1 md:mb-0",children:[g==null?void 0:g.action," on ",((g==null?void 0:g.videoTime)/60).toFixed(3)," seconds"]}),o.jsx("span",{className:"text-600",children:_n(g==null?void 0:g.timeState).format("Do, MMMM, YYYY HH:ss")})]}),o.jsxs("div",{className:"mt-2 md:mt-0 ml-0 md:ml-8 flex align-items-center",children:[o.jsx("div",{className:"surface-300 border-round overflow-hidden",style:{height:"8px",width:"200px"},children:o.jsx("div",{className:(g==null?void 0:g.action)==="Play"?"bg-green-500 h-full":"bg-orange-500 h-full",style:{width:`${Math.floor((g==null?void 0:g.videoTime)/(g==null?void 0:g.totalTime)*100)}%`}})}),o.jsxs("span",{className:"text-orange-500 ml-3 font-medium",children:[Math.floor((g==null?void 0:g.videoTime)/(g==null?void 0:g.totalTime)*100),"%"]})]})]},`logs_${v}`))};return o.jsxs("ul",{className:"list-none p-0 m-0 cursor-pointer",onClick:()=>{e(i)},children:[o.jsxs("li",{className:" flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-3",style:{borderRadius:"10px"},children:[o.jsx("div",{children:o.jsxs("div",{children:[d(i)?o.jsx(Pt,{text:!0,icon:"pi pi-check",className:"p-button-rounded p-button-primary mr-2 p-button-outlined","aria-label":"Search"}):o.jsx(Pt,{text:!0,icon:"pi pi-dot",className:"p-button-rounded p-button-secondary mr-2 p-button-outlined","aria-label":"Search"}),(i==null?void 0:i.uuid)===(r==null?void 0:r.uuid)?o.jsxs("span",{children:[o.jsx(Pt,{text:!0,icon:n,className:"p-button-rounded p-button-primary mr-2 inline-flex justify-content-center align-items-center w-2rem h-2rem","aria-label":"Search"}),o.jsxs("span",{className:"inline-flex justify-content-center align-items-center h-2rem",style:{color:"#0f8bfd"},children:[a+1," - ",s]})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"inline-flex justify-content-center align-items-center w-2rem h-2rem border-circle border-1",children:o.jsx("i",{className:n})}),o.jsxs("span",{className:"font-medium text-500 ml-2 hoverSelect",children:[a+1," - ",s]})]})]})}),o.jsxs("div",{className:"flex align-items-center justify-content-between md:justify-content-end mt-3 md:mt-0",children:[o.jsx("div",{className:"text-right mr-3",children:o.jsxs("span",{className:" font-bold",children:[" ",i==null?void 0:i.videoDuration]})}),o.jsx(Pt,{text:!0,onClick:()=>c(!l),icon:"pi pi-eye",className:"p-button-rounded p-button-secondary mr-2 ","aria-label":"Search"})]})]}),l&&o.jsxs("div",{className:"surface-card shadow-2 border-round p-4",children:[o.jsx("div",{className:"flex justify-content-between align-items-center mb-5",children:o.jsx("span",{className:"text-xl text-900 font-medium",children:"Logs"})}),o.jsx("ul",{className:"list-none p-0 m-0",children:f()})]})]},`ul-list-${a}`)},pxe=t=>{var w,T,C,_,E,D;const{field:e,fieldIndex:n,currentItem:r,setCurrentItem:i,setCurrentSection:a,setvideoJsOptions:s,section:l,setImage:c,setDocuments:u}=t,{taskOptions:d,userTrainingSaveData:f,updateUserTraining:h}=mr(),m=(w=d==null?void 0:d.training)!=null&&w.getAssessmentSelectedQuiz?(T=d==null?void 0:d.training)==null?void 0:T.getAssessmentSelectedQuiz:()=>{},g=B=>{if(f!==null){const k=[...f],P=k.findIndex(j=>(j==null?void 0:j.fieldId)===(B==null?void 0:B.uuid));P>=0&&(k[P]={...k[P],isSeen:!0}),h([...k])}},v=B=>{var k;i(B),a(l),s({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:(k=B==null?void 0:B.media_url)==null?void 0:k.english}]})},A=B=>{var k;g(B),i(B),c((k=B==null?void 0:B.media_url)==null?void 0:k.english),a(l)},S=B=>{g(B),i(B),u(B==null?void 0:B.documents),a(l)},x=B=>{var k,P;(k=B==null?void 0:B.quizSchema)!=null&&k.assessment_id&&(m((P=B==null?void 0:B.quizSchema)==null?void 0:P.assessment_id),a(l),i(B))};switch(e==null?void 0:e.componentType){case"video":return o.jsx(N5,{title:(C=e==null?void 0:e.title)==null?void 0:C.english,type:"video",icon:"pi pi-video",handleSelectCourseItem:v,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"image":return o.jsx(N5,{title:(_=e==null?void 0:e.title)==null?void 0:_.english,type:"image",icon:"pi pi-image",handleSelectCourseItem:A,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"document":return o.jsx(N5,{title:(E=e==null?void 0:e.title)==null?void 0:E.english,type:"document",icon:"pi pi-image",handleSelectCourseItem:S,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"quiz":return o.jsx(N5,{title:(D=e==null?void 0:e.quizSchema)==null?void 0:D.assessment_title,type:"quiz",icon:"pi pi-image",handleSelectCourseItem:x,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);default:return o.jsx(o.Fragment,{})}},gxe=t=>{const{fields:e,setImage:n,setvideoJsOptions:r,setDocuments:i,setQuizSchema:a,setCurrentItem:s,currentItem:l,setCurrentSection:c,section:u,updateTrainingProgress:d}=t;return o.jsx(o.Fragment,{children:o.jsx("div",{className:"surface-card border-round p-4 ",children:e==null?void 0:e.map((f,h)=>o.jsxs("div",{children:[o.jsx(pxe,{field:f,fieldIndex:h,currentItem:l,setCurrentItem:s,setCurrentSection:c,setvideoJsOptions:r,section:u,setImage:n,setDocuments:i,setQuizSchema:a,updateTrainingProgress:d},`${h}-list-sidebar`)," ",o.jsx("hr",{})," "]},`sidebar-item-card-${h}`))})})},mxe=t=>{var g,v,A,S,x,w,T,C,_,E;const{setSelectedOption:e,quiz:n,userSelectedLanguage:r,onSetAnswer:i,setIsOptionSelected:a,index:s,eleIndex:l,ele:c,setCorrectAnswerCheck:u,correctAnswerCheck:d,selectedOption:f}=t,{media:h}=Zt(),m=(g=h==null?void 0:h.image)!=null&&g.MediaImage?(v=h==null?void 0:h.image)==null?void 0:v.MediaImage:o.jsx(o.Fragment,{});return o.jsxs("div",{onClick:D=>{e(B=>{var k;return(k=n==null?void 0:n.answersText)==null?void 0:k[r==null?void 0:r.type]}),i(D,s,l,n,c),a(!0),u({isCorrect:null,text:null})},className:"field-radiobutton card",style:(d==null?void 0:d.text)===((A=n.answersText)==null?void 0:A[r==null?void 0:r.type])?(d==null?void 0:d.isCorrect)===!0?{borderColor:"green",borderWidth:1,borderStyle:"solid",position:"relative"}:{borderColor:"red",borderWidth:1,borderStyle:"solid",position:"relative"}:((S=n.answersText)==null?void 0:S[r==null?void 0:r.type])===f?{backgroundColor:"#0F8BFD",color:"#fff"}:{},children:[o.jsx(Ji,{inputId:s,value:n.answersText,checked:((x=n.answersText)==null?void 0:x[r==null?void 0:r.type])===f,onChange:D=>{u({isCorrect:null,text:null}),e(B=>{var k;return(k=D.target.value)==null?void 0:k[r==null?void 0:r.type]}),i(D,s,l,n,c),a(!0)}}),((w=n.answersTextImage)==null?void 0:w[r==null?void 0:r.type])&&((T=n.answersTextImage)==null?void 0:T[r==null?void 0:r.type])!==""&&o.jsx(m,{mediaId:(C=n.answersTextImage)==null?void 0:C[r==null?void 0:r.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:s,children:(_=n.answersText)==null?void 0:_[r==null?void 0:r.type]}),o.jsx("span",{style:{position:"absolute",right:10},children:(d==null?void 0:d.text)===((E=n.answersText)==null?void 0:E[r==null?void 0:r.type])?(d==null?void 0:d.isCorrect)===!0?o.jsxs("span",{style:{color:"green"},children:[" ","Correct Answer"]}):o.jsxs("span",{style:{color:"red"},children:[" ","Wrong Answer"]}):""})]},s)},vxe=t=>{var m,g,v,A,S,x,w;const{media:e}=Zt(),n=(m=e==null?void 0:e.image)!=null&&m.MediaImage?(g=e==null?void 0:e.image)==null?void 0:g.MediaImage:o.jsx(o.Fragment,{}),{setSelectedOption:r,quiz:i,userSelectedLanguage:a,setIsOptionSelected:s,index:l,ele:c,setCorrectAnswerCheck:u,correctAnswerCheck:d,selectedOption:f,onChangeCheckbox:h}=t;return N.useEffect(()=>(Array.isArray(f)||r([]),()=>{}),[]),o.jsx(o.Fragment,{children:Array.isArray(f)&&o.jsxs("div",{onClick:()=>{var T;h(!(f!=null&&f.some(C=>{var _;return C===((_=i.answersText)==null?void 0:_[a==null?void 0:a.type])})),(T=i==null?void 0:i.answersText)==null?void 0:T[a==null?void 0:a.type]),s(!0),u({isCorrect:null,text:null})},className:"field-radiobutton card",style:d!=null&&d.length&&(d!=null&&d.some(T=>{var C;return(T==null?void 0:T.text)===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])}))?d!=null&&d.some(T=>{var C;return(T==null?void 0:T.text)===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])&&(T==null?void 0:T.isCorrect)===!0})?{borderColor:"green",borderWidth:1,borderStyle:"solid",position:"relative"}:{borderColor:"red",borderWidth:1,borderStyle:"solid",position:"relative"}:((v=i.answersText)==null?void 0:v[a==null?void 0:a.type])===f?{backgroundColor:"#0F8BFD"}:{},children:[o.jsx(Or,{inputId:l,value:i.answersText,checked:f==null?void 0:f.some(T=>{var C;return T===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])}),onChange:T=>{var C;h(T.checked,(C=T.target.value)==null?void 0:C[a==null?void 0:a.type],i,c),s(!0)}}),((A=i.answersTextImage)==null?void 0:A[a==null?void 0:a.type])&&((S=i.answersTextImage)==null?void 0:S[a==null?void 0:a.type])!==""&&o.jsx(n,{mediaId:(x=i.answersTextImage)==null?void 0:x[a==null?void 0:a.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:l,children:(w=i.answersText)==null?void 0:w[a==null?void 0:a.type]}),o.jsx("span",{style:{position:"absolute",right:10},children:d!=null&&d.length&&(d!=null&&d.some(T=>{var C;return(T==null?void 0:T.text)===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])}))?d!=null&&d.some(T=>{var C;return(T==null?void 0:T.text)===((C=i.answersText)==null?void 0:C[a==null?void 0:a.type])&&(T==null?void 0:T.isCorrect)===!0})?o.jsx("span",{style:{color:"green"},children:" Correct Answer"}):o.jsx("span",{style:{color:"red"},children:" Wrong Answer"}):""})]},l)})};function rj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ij(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function aj(t,e,n){return e&&ij(t.prototype,e),n&&ij(t,n),t}function sj(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ES(t,e)}function F5(t){return F5=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},F5(t)}function ES(t,e){return ES=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},ES(t,e)}function bxe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function yxe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Axe(t,e){return e&&(typeof e=="object"||typeof e=="function")?e:yxe(t)}function oj(t){var e=bxe();return function(){var r=F5(t),i;if(e){var a=F5(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return Axe(this,i)}}function wxe(t){return Sxe(t)||xxe(t)||Cxe(t)||Txe()}function Sxe(t){if(Array.isArray(t))return IS(t)}function xxe(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function Cxe(t,e){if(t){if(typeof t=="string")return IS(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IS(t,e)}}function IS(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Txe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4163
4163
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _g(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,n=String(t);if(e===0)return n;var r=n.match(/(.*?)([0-9]+)(.*)/),i=r?r[1]:"",a=r?r[3]:"",s=r?r[2]:n,l=s.length>=e?s:(wxe(Array(e)).map(function(){return"0"}).join("")+s).slice(e*-1);return"".concat(i).concat(l).concat(a)}var lj={daysInHours:!1,zeroPadTime:2};function Exe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.now,r=n===void 0?Date.now:n,i=e.precision,a=i===void 0?0:i,s=e.controlled,l=e.offsetTime,c=l===void 0?0:l,u=e.overtime,d;typeof t=="string"?d=new Date(t).getTime():t instanceof Date?d=t.getTime():d=t,s||(d+=c);var f=s?d:d-r(),h=Math.min(20,Math.max(0,a)),m=Math.round(parseFloat(((u?f:Math.max(0,f))/1e3).toFixed(h))*1e3),g=Math.abs(m)/1e3;return{total:m,days:Math.floor(g/(3600*24)),hours:Math.floor(g/3600%24),minutes:Math.floor(g/60%60),seconds:Math.floor(g%60),milliseconds:Number((g%1*1e3).toFixed()),completed:m<=0}}function Ixe(t,e){var n=t.days,r=t.hours,i=t.minutes,a=t.seconds,s=Object.assign(Object.assign({},lj),e),l=s.daysInHours,c=s.zeroPadTime,u=s.zeroPadDays,d=u===void 0?c:u,f=Math.min(2,c),h=l?_g(r+n*24,c):_g(r,f);return{days:l?"":_g(n,d),hours:h,minutes:_g(i,f),seconds:_g(a,f)}}var cj=function(t){sj(n,t);var e=oj(n);function n(){var r;return rj(this,n),r=e.apply(this,arguments),r.state={count:r.props.count||3},r.startCountdown=function(){r.interval=window.setInterval(function(){var i=r.state.count-1;i===0?(r.stopCountdown(),r.props.onComplete&&r.props.onComplete()):r.setState(function(a){return{count:a.count-1}})},1e3)},r.stopCountdown=function(){clearInterval(r.interval)},r.addTime=function(i){r.stopCountdown(),r.setState(function(a){return{count:a.count+i}},r.startCountdown)},r}return aj(n,[{key:"componentDidMount",value:function(){this.startCountdown()}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"render",value:function(){return this.props.children?N.cloneElement(this.props.children,{count:this.state.count}):null}}]),n}(N.Component);cj.propTypes={count:ra.number,children:ra.element,onComplete:ra.func};var Dg=function(t){sj(n,t);var e=oj(n);function n(r){var i;if(rj(this,n),i=e.call(this,r),i.mounted=!1,i.initialTimestamp=i.calcOffsetStartTimestamp(),i.offsetStartTimestamp=i.props.autoStart?0:i.initialTimestamp,i.offsetTime=0,i.legacyMode=!1,i.legacyCountdownRef=null,i.tick=function(){var s=i.calcTimeDelta(),l=s.completed&&!i.props.overtime?void 0:i.props.onTick;i.setTimeDeltaState(s,void 0,l)},i.setLegacyCountdownRef=function(s){i.legacyCountdownRef=s},i.start=function(){if(!i.isStarted()){var s=i.offsetStartTimestamp;i.offsetStartTimestamp=0,i.offsetTime+=s?i.calcOffsetStartTimestamp()-s:0;var l=i.calcTimeDelta();i.setTimeDeltaState(l,"STARTED",i.props.onStart),!i.props.controlled&&(!l.completed||i.props.overtime)&&(i.clearTimer(),i.interval=window.setInterval(i.tick,i.props.intervalDelay))}},i.pause=function(){i.isPaused()||(i.clearTimer(),i.offsetStartTimestamp=i.calcOffsetStartTimestamp(),i.setTimeDeltaState(i.state.timeDelta,"PAUSED",i.props.onPause))},i.stop=function(){i.isStopped()||(i.clearTimer(),i.offsetStartTimestamp=i.calcOffsetStartTimestamp(),i.offsetTime=i.offsetStartTimestamp-i.initialTimestamp,i.setTimeDeltaState(i.calcTimeDelta(),"STOPPED",i.props.onStop))},i.isStarted=function(){return i.isStatus("STARTED")},i.isPaused=function(){return i.isStatus("PAUSED")},i.isStopped=function(){return i.isStatus("STOPPED")},i.isCompleted=function(){return i.isStatus("COMPLETED")},r.date){var a=i.calcTimeDelta();i.state={timeDelta:a,status:a.completed?"COMPLETED":"STOPPED"}}else i.legacyMode=!0;return i}return aj(n,[{key:"componentDidMount",value:function(){this.legacyMode||(this.mounted=!0,this.props.onMount&&this.props.onMount(this.calcTimeDelta()),this.props.autoStart&&this.start())}},{key:"componentDidUpdate",value:function(i){this.legacyMode||this.props.date!==i.date&&(this.initialTimestamp=this.calcOffsetStartTimestamp(),this.offsetStartTimestamp=this.initialTimestamp,this.offsetTime=0,this.setTimeDeltaState(this.calcTimeDelta()))}},{key:"componentWillUnmount",value:function(){this.legacyMode||(this.mounted=!1,this.clearTimer())}},{key:"calcTimeDelta",value:function(){var i=this.props,a=i.date,s=i.now,l=i.precision,c=i.controlled,u=i.overtime;return Exe(a,{now:s,precision:l,controlled:c,offsetTime:this.offsetTime,overtime:u})}},{key:"calcOffsetStartTimestamp",value:function(){return Date.now()}},{key:"addTime",value:function(i){this.legacyCountdownRef.addTime(i)}},{key:"clearTimer",value:function(){window.clearInterval(this.interval)}},{key:"isStatus",value:function(i){return this.state.status===i}},{key:"setTimeDeltaState",value:function(i,a,s){var l=this;if(this.mounted){var c=i.completed&&!this.state.timeDelta.completed,u=i.completed&&a==="STARTED";c&&!this.props.overtime&&this.clearTimer();var d=function(){s&&s(l.state.timeDelta),l.props.onComplete&&(c||u)&&l.props.onComplete(i,u)};return this.setState(function(f){var h=a||f.status;return i.completed&&!l.props.overtime?h="COMPLETED":!a&&h==="COMPLETED"&&(h="STOPPED"),{timeDelta:i,status:h}},d)}}},{key:"getApi",value:function(){return this.api=this.api||{start:this.start,pause:this.pause,stop:this.stop,isStarted:this.isStarted,isPaused:this.isPaused,isStopped:this.isStopped,isCompleted:this.isCompleted}}},{key:"getRenderProps",value:function(){var i=this.props,a=i.daysInHours,s=i.zeroPadTime,l=i.zeroPadDays,c=this.state.timeDelta;return Object.assign(Object.assign({},c),{api:this.getApi(),props:this.props,formatted:Ixe(c,{daysInHours:a,zeroPadTime:s,zeroPadDays:l})})}},{key:"render",value:function(){if(this.legacyMode){var i=this.props,a=i.count,s=i.children,l=i.onComplete;return N.createElement(cj,{ref:this.setLegacyCountdownRef,count:a,onComplete:l},s)}var c=this.props,u=c.className,d=c.overtime,f=c.children,h=c.renderer,m=this.getRenderProps();if(h)return h(m);if(f&&this.state.timeDelta.completed&&!d)return N.cloneElement(f,{countdown:m});var g=m.formatted,v=g.days,A=g.hours,S=g.minutes,x=g.seconds;return N.createElement("span",{className:u},m.total<0?"-":"",v,v?":":"",A,":",S,":",x)}}]),n}(N.Component);Dg.defaultProps=Object.assign(Object.assign({},lj),{controlled:!1,intervalDelay:1e3,precision:0,autoStart:!0}),Dg.propTypes={date:ra.oneOfType([ra.instanceOf(Date),ra.string,ra.number]),daysInHours:ra.bool,zeroPadTime:ra.number,zeroPadDays:ra.number,controlled:ra.bool,intervalDelay:ra.number,precision:ra.number,autoStart:ra.bool,overtime:ra.bool,className:ra.string,children:ra.element,renderer:ra.func,now:ra.func,onMount:ra.func,onStart:ra.func,onPause:ra.func,onStop:ra.func,onTick:ra.func,onComplete:ra.func};const _xe=({assessmentData:t,setDisplaySummary:e})=>{var r,i,a,s;const n=l=>{if(l.seconds<10&&(l.seconds="0"+l.seconds),l.minutes===0&&(l.minutes="0"+l.minutes),l.completed)e(!0);else return o.jsxs("span",{children:["Time Remaining:"," ",o.jsxs("span",{style:l.minutes===0?{color:"black"}:{color:"black"},children:[l.minutes,":",l.seconds]})]})};return o.jsx(o.Fragment,{children:t&&((i=(r=t==null?void 0:t.time_limit)==null?void 0:r.type)==null?void 0:i.key)==="PerExam"&&o.jsx(Dg,{renderer:n,date:Date.now()+parseInt((s=(a=t==null?void 0:t.time_limit)==null?void 0:a.time_limit_info)==null?void 0:s.num_of_mins)*60*1e3})})},Dxe=N.memo(_xe),Oxe=t=>{var d,f,h,m;const{assessmentData:e,onNextQuestion:n,currentQuestionIndex:r}=t,[i,a]=N.useState(Date.now()),[s,l]=N.useState(!1),c=N.useCallback(()=>{a(Date.now()),l(!1)},[r]);N.useEffect(()=>{c()},[r,c]);const u=g=>(g.seconds<10&&(g.seconds="0"+g.seconds),g.minutes===0&&(g.minutes="0"+g.minutes),g.completed&&!s?(l(!0),setTimeout(()=>{n()},500),o.jsx(o.Fragment,{})):o.jsxs("span",{children:["Time Remaining:"," ",o.jsxs("span",{style:{color:"black"},children:[g.minutes,":",g.seconds]})]}));return o.jsx(o.Fragment,{children:((f=(d=e==null?void 0:e.time_limit)==null?void 0:d.type)==null?void 0:f.key)==="PerQuestion"&&o.jsx(Dg,{renderer:u,date:i+parseInt((m=(h=e==null?void 0:e.time_limit)==null?void 0:h.time_limit_info)==null?void 0:m.time_per_question)*1e3,intervalDelay:0},i)})},Nxe=()=>{const t=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound4.mp3");i(a)},e=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound2.mp3");i(a)},n=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound8.mp3");i(a)},r=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound6.mp3");i(a)},i=a=>{a.play().then(()=>{console.info("Played")}).catch(s=>{console.info("Not Played,"+s.error+s.name)})};return{socketConnection:t,socketDisconnect:e,errorOcurred:n,quizStartAlert:r}},Fxe="1",uj=t=>{var be,me,ye,Ie,Ee,he,V,te;const e=W=>{const[ue,Ae]=N.useState(W),pe=N.useRef(ue);return N.useEffect(()=>{pe.current=ue},[ue]),[ue,pe,Ae]},{endQuiz:n,AddUserAssessmentAnswer:r,assessmentData:i,taskData:a}=mr(),[s,l]=N.useState(new Date),{session_id:c,quizData:u,saveProgress:d,renderIn:f,onOpenQuiz:h,setDisplay:m,setAssessmentModal:g=()=>{}}=t,{quizStartAlert:v}=Nxe(),{userSelectedLanguage:A}=on(),[S,,x]=e(0),{media:w}=Zt(),T=(be=w==null?void 0:w.image)!=null&&be.MediaImage?(me=w==null?void 0:w.image)==null?void 0:me.MediaImage:o.jsx(o.Fragment,{}),[C,_,E]=e(null),[D,B]=N.useState(!1),[k,,P]=e([]),[j,M]=N.useState(!1),[H,de]=N.useState(!1),[fe,ee]=N.useState(0),[G,ae]=N.useState(0),[Y,ge]=N.useState(0),[ne,J]=N.useState(!1),[K,oe]=N.useState({isCorrect:null,text:null});window.onbeforeunload=function(){return!1},N.useEffect(()=>{j||M(!0)},[k,D,j]),N.useEffect(()=>{u!==null&&(v(),ve())},[]);const ve=()=>{ae(u.quizConfiguration.quizPassMark)},Ce=N.useCallback((W,ue,Ae,pe,ke)=>{const Le=[...k];if((ke==null?void 0:ke.answerInputType)!=="checkbox"){const We={uuid:ke==null?void 0:ke.uuid,question:ke==null?void 0:ke.questionText,isCorrect:pe.isCorrect,selectedAnswer:pe.answersText,viewed:!0},gt=k.findIndex(At=>(At==null?void 0:At.uuid)===ke.uuid);gt>=0?(Le[gt]={...Le[gt],...We},P(Le)):P([...k,We])}},[C]),Se=W=>{var ue;if(S!==0){const Ae=[...k],pe=S-1;E((ue=Ae[pe])==null?void 0:ue.selectedAnswer[A==null?void 0:A.type]),B(!0),x(pe),Te(0)}},Te=W=>{for(const ue of k)if(ue.questionIndex===S+W){E(ue.selectedAnswerEnglish);break}},De=(W,ue,Ae,pe)=>{var We;const ke=[...C];if(W)ke.push(ue);else{const gt=ke.findIndex(At=>At===ue);gt>=0&&ke.splice(gt,1)}E(ke);const Le=[...k];if((pe==null?void 0:pe.answerInputType)==="checkbox"){let gt=!1;for(const[,Je]of(pe==null?void 0:pe.answerOptions.entries())||[])if(Je.isCorrect===!0)if(_t.includes(ke,(We=Je==null?void 0:Je.answersText)==null?void 0:We[A==null?void 0:A.type]))gt=!0;else{gt=!1;break}const At={uuid:pe==null?void 0:pe.uuid,question:pe==null?void 0:pe.questionText,isCorrect:gt,selectedAnswer:Ae.answersText,viewed:!0},st=k.findIndex(Je=>(Je==null?void 0:Je.uuid)===pe.uuid);st>=0?(Le[st]={...Le[st],...At},P(Le)):P([...k,At])}},ie=N.useCallback(()=>{var ke,Le,We,gt,At,st,Je,Ct,mt,Ge,Tt,Gt,xn,bn;const W=_.current,ue=_t.findIndex((ke=u==null?void 0:u.quizElements[S])==null?void 0:ke.answerOptions,function(wn){return wn.isCorrect===!0}),Ae=(gt=(We=(Le=u==null?void 0:u.quizElements[S])==null?void 0:Le.answerOptions[ue])==null?void 0:We.answersText)!=null&&gt[A==null?void 0:A.type]?(Je=(st=(At=u==null?void 0:u.quizElements[S])==null?void 0:At.answerOptions[ue])==null?void 0:st.answersText)==null?void 0:Je[A==null?void 0:A.type]:"",pe=(Ct=k[S])!=null&&Ct.isCorrect?1:0;if(u!=null&&u.quizElements&&S+1!==(u==null?void 0:u.quizElements.length)){const wn={assessment_user_attempt_id:(Ge=i==null?void 0:i.assesment_user_attempts[((mt=i==null?void 0:i.assesment_user_attempts)==null?void 0:mt.length)-1])==null?void 0:Ge.assessment_user_attempt_id,session_id:c,assessment_id:1,question:(Tt=u==null?void 0:u.quizElements[S].questionText)==null?void 0:Tt[A==null?void 0:A.type],start_time:s,finish_time:new Date,correct_answer:Ae,selected_answer:Array.isArray(W)?W.toString():W,is_correct_answer:pe};r(wn),E(null),x(S+1),l(new Date),Te(2)}else if((u==null?void 0:u.quizElements.length)===S+1){const wn={assessment_user_attempt_id:(xn=i==null?void 0:i.assesment_user_attempts[((Gt=i==null?void 0:i.assesment_user_attempts)==null?void 0:Gt.length)-1])==null?void 0:xn.assessment_user_attempt_id,session_id:c,assessment_id:1,question:(bn=u==null?void 0:u.quizElements[S].questionText)==null?void 0:bn[A==null?void 0:A.type],start_time:s,finish_time:new Date,correct_answer:Ae,selected_answer:Array.isArray(W)?W.toString():W,is_correct_answer:pe};r(wn),U(),Q()}B(!1)},[S,k]),U=()=>{de(!0)},re=()=>{var W;(i==null?void 0:i.noOfAttempts)-((W=i==null?void 0:i.assesment_user_attempts)==null?void 0:W.length)>0&&!ne?(h(),M(!0),v(),ve(),x(0),E(null),B(!1),P([]),de(!1),ee(0),ge(0),J(!1),oe({isCorrect:null,text:null})):(m(Ip),g(!1))},Q=()=>{var ke,Le;let W=0,ue=0,Ae=!1;for(const We of k)We!=null&&We.isCorrect&&W++;ee(W),ue=W/((ke=u==null?void 0:u.quizElements)==null?void 0:ke.length)*100,ue=Math.round(ue),ge(ue),Ae=ue>=G,J(Ae);const pe={...u,...i,result:ue,status:Ae,selectedAnswers:k};console.log("Saving Progess for task and Updating the quiz end time and status"),d(pe),n({session_id:c,is_pass:Ae?1:0,score:W,out_of:(Le=u==null?void 0:u.quizElements)==null?void 0:Le.length,finish_time:new Date,status:1})},se=()=>{var W,ue,Ae,pe,ke,Le,We;if(((W=u==null?void 0:u.quizElements[S])==null?void 0:W.answerInputType)==="radio"){const gt=_t.findIndex((ue=u==null?void 0:u.quizElements[S])==null?void 0:ue.answerOptions,function(At){return At.isCorrect===!0});C===((ke=(pe=(Ae=u==null?void 0:u.quizElements[S])==null?void 0:Ae.answerOptions[gt])==null?void 0:pe.answersText)==null?void 0:ke[A==null?void 0:A.type])?oe({isCorrect:!0,text:C}):oe({isCorrect:!1,text:C})}if(((Le=u==null?void 0:u.quizElements[S])==null?void 0:Le.answerInputType)==="checkbox"){const gt=(We=u==null?void 0:u.quizElements[S])==null?void 0:We.answerOptions.filter(At=>At.isCorrect===!0);if(C!=null&&C.length){const At=C==null?void 0:C.map(st=>({isCorrect:gt==null?void 0:gt.some(Je=>{var Ct;return((Ct=Je==null?void 0:Je.answersText)==null?void 0:Ct[A==null?void 0:A.type])===st}),text:st}));oe(At)}}};return o.jsx(o.Fragment,{children:u!==null&&o.jsxs("div",{children:[H&&o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:o.jsxs("div",{className:"card text-center",children:[o.jsxs("h5",{children:["Assessment Result for"," ",(ye=a==null?void 0:a.assessment)==null?void 0:ye.assessment_title]}),o.jsxs("div",{children:[o.jsxs("p",{children:["You answered ",fe," out of"," ",(Ie=u==null?void 0:u.quizElements)==null?void 0:Ie.length," questions"]}),o.jsxs("p",{children:["Your assessment result: ",Y,"%"]}),o.jsxs("p",{children:["Score Needed To Pass: ",G,"%"]}),o.jsx("br",{}),o.jsxs("p",{children:["Status:"," ",ne?o.jsx(xc,{severity:"success",value:"Passed"}):o.jsx(xc,{severity:"danger",value:"Failed"})]}),ne&&o.jsx("p",{children:"Congratulations you have passed!"}),f!==r7?o.jsx(o.Fragment,{children:H&&o.jsx("div",{className:"text-center my-5",children:o.jsx(Pt,{label:(i==null?void 0:i.noOfAttempts)-((Ee=i==null?void 0:i.assesment_user_attempts)==null?void 0:Ee.length)>0&&!ne?"Restart":"End",onClick:()=>re()})})}):o.jsx("div",{className:"text-center my-5",children:o.jsx(Pt,{label:"Restart",onClick:()=>{v(),ve(),de(!1),x(0),M(!1)}})})]})]})})}),H&&((he=i==null?void 0:i.assessment_type)==null?void 0:he.key)===Fxe&&o.jsxs("div",{children:[o.jsx("h5",{className:"text-center",children:"Summary "}),o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:k==null?void 0:k.map((W,ue)=>{var Ae,pe;return o.jsxs("div",{className:"card",children:[o.jsxs("span",{className:"text-strong",children:[o.jsx("b",{children:"Question:"})," ",o.jsx("br",{}),(Ae=W==null?void 0:W.question)==null?void 0:Ae[A==null?void 0:A.type]]}),o.jsx("br",{}),o.jsx("br",{}),o.jsxs("span",{children:[o.jsx("b",{children:"Selected Answer:"})," ",o.jsx("br",{}),(pe=W==null?void 0:W.selectedAnswer)==null?void 0:pe[A==null?void 0:A.type]]}),o.jsx("br",{}),o.jsx("br",{}),o.jsx("p",{children:"In Correct:"}),W!=null&&W.isCorrect?o.jsxs(o.Fragment,{children:[o.jsx(m4,{value:"",severity:"success",className:"mr-2"})," ","Yes"]}):o.jsxs(o.Fragment,{children:[o.jsx(m4,{value:"",severity:"danger",className:"mr-2"})," ","No"]})]},ue)})})})]}),f!==r7?o.jsx(o.Fragment,{children:H&&o.jsx("div",{className:"text-center my-5",children:o.jsx(Pt,{text:!0,className:"p-button-danger",icon:"pi pi-times",label:"Close",onClick:()=>{m(Ip)}})})}):o.jsx(o.Fragment,{}),j&&!H&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-6 col-offset-3",children:[o.jsx("h5",{className:"text-center",children:o.jsxs("span",{children:[o.jsx(Dxe,{assessmentData:i,setDisplaySummary:de}),o.jsx(Oxe,{currentQuestionIndex:S,assessmentData:i,onNextQuestion:ie})]})}),o.jsxs("h2",{className:"text-center pb-6",children:[u==null?void 0:u.name," "]}),(V=u==null?void 0:u.quizElements)==null?void 0:V.map((W,ue)=>{var Ae,pe,ke,Le,We;return o.jsxs("div",{className:"quiz-card-box",children:[S===ue&&((Ae=W==null?void 0:W.questionTextImage)==null?void 0:Ae[A==null?void 0:A.type])&&((pe=W==null?void 0:W.questionTextImage)==null?void 0:pe[A==null?void 0:A.type])!==""&&o.jsx("div",{className:"text-center assessment_image_container",children:o.jsx(T,{mediaId:(ke=W==null?void 0:W.questionTextImage)==null?void 0:ke[A==null?void 0:A.type],style:{height:"100px",width:"100px",objectFit:"cover",borderRadius:100},className:"text-center",alt:"questionImage"})}),o.jsx("h3",{className:"mb-5",children:S===ue&&((Le=W==null?void 0:W.questionText)==null?void 0:Le[A==null?void 0:A.type])}),S===ue&&((We=W==null?void 0:W.answerOptions)==null?void 0:We.map((gt,At)=>(W==null?void 0:W.answerInputType)==="checkbox"?o.jsx(N.Fragment,{children:o.jsx(vxe,{onChangeCheckbox:De,setSelectedOption:E,quiz:gt,userSelectedLanguage:A,onSetAnswer:Ce,setIsOptionSelected:B,index:At,eleIndex:ue,ele:W,setCorrectAnswerCheck:oe,correctAnswerCheck:K,selectedOption:C})},`checkbox-question-${At}`):o.jsx(N.Fragment,{children:o.jsx(mxe,{setSelectedOption:E,quiz:gt,userSelectedLanguage:A,onSetAnswer:Ce,setIsOptionSelected:B,index:At,eleIndex:ue,ele:W,setCorrectAnswerCheck:oe,correctAnswerCheck:K,selectedOption:C})},`radio-question-${At}`)))]},ue)})]})}),o.jsxs("div",{className:"text-center my-5",children:[o.jsxs("div",{className:"mb-1",children:["Question :"," ",S+1+"/"+(u==null?void 0:u.quizElements.length)]}),o.jsx("br",{}),S>0&&o.jsx(Pt,{size:"large",className:"mx-2",label:"Previous",onClick:W=>Se()}),((i==null?void 0:i.skippable)===!0||D===!0)&&o.jsx(Pt,{size:"large",label:(u==null?void 0:u.quizElements.length)===S+1?"Finish":D===!0?"Next":"Skip",onClick:ie}),D===!0&&((te=i==null?void 0:i.assessment_type)==null?void 0:te.key)==="1"&&o.jsx(Pt,{size:"large",className:"ml-2 p-button-info",label:"Check Answer",onClick:()=>se()})]})]})]})})},Pxe=t=>{const{getAssessmentByIdFromStore:e,quizSchema:n,setQuizSchema:r,renderIn:i,updateTrainingProgress:a,currentItem:s}=t,{userTrainingSaveData:l}=mr();N.useEffect(()=>(c(),()=>{}),[]);const c=()=>{var m,g,v,A;const d=JSON.parse(e.form_template_schema),f=JSON.parse(e.assessment_meta_data);let h=[...((A=(v=(g=(m=d==null?void 0:d.layout[0])==null?void 0:m.children[0])==null?void 0:g.children[0])==null?void 0:v.children[0])==null?void 0:A.children)||[]];f!=null&&f.randomiseQuestions&&(h=dm.shuffle(h).map((S,x)=>({...S}))),f!=null&&f.randomiseAnswers&&(h=h.map((S,x)=>({...S,answerOptions:dm.shuffle(S==null?void 0:S.answerOptions)}))),f!=null&&f.enableNoOfAssessmentQuestions&&(h=h.slice(0,parseInt(f==null?void 0:f.noOfAssessmentQuestions))),r({assessment_id:1,name:e==null?void 0:e.assessment_title,label:"assessment_title",quizConfiguration:d==null?void 0:d.quizConfiguration,quizElements:h})},u=d=>{if((d==null?void 0:d.status)===!0){if(l!==null){const h=l.findIndex(m=>(m==null?void 0:m.fieldId)===(s==null?void 0:s.uuid));h>=0&&(l[h]={...l[h],isSeen:!0})}a()}};return o.jsx("div",{children:n&&o.jsx(uj,{renderIn:i,quizData:n,taskSchema:e==null?void 0:e.form_template_schema,saveProgress:d=>{u(d)}})})},kxe=t=>{var v,A;const{currentItem:e,videoJsOptions:n}=t,r=N.useRef(null),{userTrainingSaveData:i,updateUserTraining:a,taskRegisterData:s}=mr(),{media:l}=Zt(),c=(v=l==null?void 0:l.video)!=null&&v.MediaVideo?(A=l==null?void 0:l.video)==null?void 0:A.MediaVideo:()=>o.jsx(o.Fragment,{}),u=S=>{r.current=S,S.on("waiting",()=>{Nt.log("player is waiting")}),S.on("dispose",()=>{Nt.log("player will dispose")})},d=S=>{if(i!==null){const x=[...i],w=x==null?void 0:x.findIndex(T=>(T==null?void 0:T.fieldId)===(e==null?void 0:e.uuid));w>=0&&(x[w].seenTime=S==null?void 0:S.target.currentTime)}},f=S=>{const x=[...i],w=x==null?void 0:x.findIndex(T=>(T==null?void 0:T.fieldId)===(S==null?void 0:S.uuid));w>=0&&(i[w]={...i[w],isSeen:!0},a(x),h("Ended"))},h=S=>{const x=r.current,w=i!==null?i==null?void 0:i.findIndex(T=>(T==null?void 0:T.fieldId)===(e==null?void 0:e.uuid)):-1;w>=0&&i[w].logs.push({action:S,videoTime:i[w].seenTime,totalTime:x.duration,timeState:new Date})},m=S=>{const{mediaId:x}=S,[w,T]=N.useState(!1);return N.useEffect(()=>{if(!w&&i!==null){const C=i.findIndex(_=>(_==null?void 0:_.fieldId)===(e==null?void 0:e.uuid));if(C>=0){T(!0);const _=r.current;_.currentTime=i[C].seenTime}T(!0)}return()=>{}},[i]),o.jsx(c,{mediaId:x,ref:r,className:"my-video",style:{borderRadius:"10px"},onPlay:()=>h("Play"),onPause:()=>h("Pause"),onEnded:()=>f(e),onTimeUpdate:d,controls:!0})},g=N.useCallback(S=>o.jsx(m,{mediaId:S}),[e==null?void 0:e.media_file_id]);return o.jsx("div",{children:(e==null?void 0:e.isExternalSource)===!1&&(e==null?void 0:e.media_file_id)!==void 0&&(e==null?void 0:e.media_file_id)!==null?o.jsx(o.Fragment,{children:g(e==null?void 0:e.media_file_id)}):o.jsx(o.Fragment,{children:o.jsx(MB,{options:n,onReady:u,currentItem:e},e==null?void 0:e.uuid)})})},_S=t=>{var D,B,k,P,j,M;const{sections:e,showInfoPanel:n,updateTrainingProgress:r}=t,{taskOptions:i,taskSchema:a,taskData:s}=mr(),[l]=N.useState(!1),[,c]=N.useState(Ub),[u,d]=N.useState([]),[f,h]=N.useState(null),{userSelectedLanguage:m}=on(),[g,v]=N.useState(null),[A,S]=N.useState(null),x=(D=i==null?void 0:i.training)!=null&&D.getAssessmentByIdFromStore?(B=i==null?void 0:i.training)==null?void 0:B.getAssessmentByIdFromStore:()=>{},w=(k=i==null?void 0:i.training)!=null&&k.TrainingOverView?(P=i==null?void 0:i.training)==null?void 0:P.TrainingOverView:()=>o.jsx(o.Fragment,{}),[T,C]=N.useState({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"}]});N.useEffect(()=>{l||_()},[l]);const _=()=>{var H,de,fe,ee,G,ae,Y,ge,ne,J,K,oe,ve,Ce,Se,Te,De,ie,U,re,Q;switch(v((fe=(de=(H=e[0])==null?void 0:H.children[0])==null?void 0:de.children[0])==null?void 0:fe.children[0]),S(e[0]),(Y=(ae=(G=(ee=e[0])==null?void 0:ee.children[0])==null?void 0:G.children[0])==null?void 0:ae.children[0])==null?void 0:Y.componentType){case"video":C({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:(oe=(K=(J=(ne=(ge=e[0])==null?void 0:ge.children[0])==null?void 0:ne.children[0])==null?void 0:J.children[0])==null?void 0:K.media_url)==null?void 0:oe.english}]});break;case"image":c((De=(Te=(Se=(Ce=(ve=e[0])==null?void 0:ve.children[0])==null?void 0:Ce.children[0])==null?void 0:Se.children[0])==null?void 0:Te.media_url)==null?void 0:De.english);break;case"document":d((Q=(re=(U=(ie=e[0])==null?void 0:ie.children[0])==null?void 0:U.children[0])==null?void 0:re.children[0])==null?void 0:Q.documents);break}},E=H=>{switch(H==null?void 0:H.componentType){case"video":return o.jsx("div",{children:o.jsx(kxe,{videoJsOptions:T,currentItem:H},H==null?void 0:H.uuid)});case"image":return o.jsx(KF,{field:H,isPreview:!0});case"document":return o.jsxs("div",{children:[o.jsx("h6",{children:"Documents"}),o.jsx("ul",{children:(u==null?void 0:u.length)>0&&u.map((de,fe)=>o.jsx("li",{children:o.jsx("a",{href:de==null?void 0:de.url,children:de==null?void 0:de.url})},`document-item-${fe}`))})]});case"quiz":return x!=null&&x.form_template_schema?o.jsx(Pxe,{renderIn:r7,getAssessmentByIdFromStore:x,quizSchema:f,setQuizSchema:h,updateTrainingProgress:r,currentItem:H}):o.jsx("div",{});case"slides":return o.jsx("div",{children:"Show slides"});case"html":return o.jsx("div",{children:"Show custom HTML Here"});default:return o.jsx("div",{})}};return o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-8 scroll-height-100",children:[o.jsxs("h3",{children:[(j=A==null?void 0:A.heading)==null?void 0:j[m==null?void 0:m.type]," -"," ",(M=g==null?void 0:g.title)==null?void 0:M[m==null?void 0:m.type]," "]}),E(g),n&&o.jsx(w,{})]}),o.jsx("div",{className:"col-4 scroll-height-100",children:e.map((H,de)=>{var fe,ee;return o.jsxs(li,{className:"mb-5",header:(fe=H==null?void 0:H.heading)==null?void 0:fe.english,toggleable:!0,children:[o.jsx("p",{children:(ee=H==null?void 0:H.subHeadingText)==null?void 0:ee[m==null?void 0:m.type]}),H.children.map((G,ae)=>{const Y=`${ae}`;return o.jsx("div",{children:G.children.map((ge,ne)=>{const J=`${ae}-${Y}`;return o.jsx(gxe,{setCurrentSection:S,section:H,setCurrentItem:v,currentItem:g,path:J,fields:ge.children,setvideoJsOptions:C,setImage:c,setDocuments:d,setQuizSchema:h,updateTrainingProgress:r},`training-sidebar-${ne}`)})},`training-sidebar-container-${ae}`)})]},`train-sidebar-panel-${de}`)})})]})};_S.defaultProps={showInfoPanel:!0,sections:{},updateTrainingProgress:()=>{}},_S.propTypes={showInfoPanel:vn.bool,sections:vn.array,updateTrainingProgress:vn.func};const Mxe=t=>{var l;const{taskSchema:e,taskId:n,endPoints:r}=t,{userTrainingSaveData:i,saveProgressDataHook:a,updateTaskProgressValue:s}=mr();return N.useEffect(()=>{const c=setTimeout(()=>{const u=i==null?void 0:i.filter(d=>(d==null?void 0:d.isSeen)===!0).length;s(u),a(i,n,r==null?void 0:r.submitFormData)},1e3);return()=>clearTimeout(c)},[i]),o.jsx("div",{children:e!==null&&o.jsx(_S,{updateTrainingProgress:()=>{},sections:(l=e==null?void 0:e.layout[0])==null?void 0:l.children})})},Lxe=({taskId:t,onStart:e})=>{var S,x,w,T,C,_,E,D,B,k,P,j,M,H,de,fe,ee;const[n,r]=N.useState(Ip),[i,a]=N.useState(null),{examComplete:s,assessmentData:l,taskSchema:c,taskData:u,startQuiz:d}=mr();N.useEffect(()=>{var G,ae,Y,ge,ne;if(((G=c==null?void 0:c.formType)==null?void 0:G.key)==="exam"){let J=[...((ge=(Y=(ae=c==null?void 0:c.layout[0])==null?void 0:ae.children[0])==null?void 0:Y.children[0])==null?void 0:ge.children[0].children)||[]];l!=null&&l.randomiseQuestions&&(J=dm.shuffle(J).map(K=>({...K}))),l!=null&&l.randomiseAnswers&&(J=J.map(K=>({...K,answerOptions:dm.shuffle(K==null?void 0:K.answerOptions)}))),l!=null&&l.enableNoOfAssessmentQuestions&&(J=J.slice(0,parseInt(l==null?void 0:l.noOfAssessmentQuestions))),a({assessment_id:1,name:(ne=u==null?void 0:u.assessment)==null?void 0:ne.assessment_title,label:"assessment_title",quizConfiguration:c==null?void 0:c.quizConfiguration,quizElements:J})}},[c]);const f=o.jsxs("div",{children:[o.jsx(Pt,{text:!0,label:"Cancel",icon:"pi pi-times",className:"mx-2 p-button-danger",onClick:()=>r(Ip)}),o.jsx(Pt,{label:"Start Immediately",onClick:()=>{m(),r(V8)}})]}),h=G=>G.completed?(m(),r(V8),o.jsx(o.Fragment,{})):o.jsxs("span",{className:"text-2xl",children:["Your Quiz is about to start in ",G.seconds," seconds"]}),m=()=>{const G={task_id:t,session_id:nt(),start_time:new Date,finish_time:new Date};console.log("saveNewQuizData formData",G),a(ae=>({...ae,...G})),d(G,a)},g=()=>{r(U8),m()},v=((S=l==null?void 0:l.assesment_user_attempts)==null?void 0:S.length)>0?(x=l==null?void 0:l.assesment_user_attempts)==null?void 0:x.some(G=>(G==null?void 0:G.is_pass)===1):!1;console.log("assessmentData?.assesment_user_attempts",l==null?void 0:l.assesment_user_attempts);function A(){var K;const G=l==null?void 0:l.assesment_user_attempts[((K=l==null?void 0:l.assesment_user_attempts)==null?void 0:K.length)-1],ae=G==null?void 0:G.start_time,Y=G==null?void 0:G.finish_time;if(!G)return"";const ge=_n(ae),J=_n(Y).diff(ge,"seconds");return J<60?J+" seconds":Math.floor(J/60)+" minutes"}return o.jsxs(o.Fragment,{children:[n===U8&&o.jsx(o.Fragment,{children:o.jsx("div",{className:"card surface-section flex justify-content-center align-items-center",style:{minHeight:"100vh"},children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:o.jsxs("div",{className:"text-center",children:[o.jsx(Dg,{date:Date.now()+15e3,renderer:h}),f]})})})})}),o.jsxs("div",{children:[n===Ip&&o.jsx("div",{className:" fadein animation-duration-500 animation-iteration-1 surface-section px-4 py-5 md:px-6 lg:px-8 scroll-height-150",children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:o.jsxs("div",{className:"text-center",children:[o.jsxs("div",{children:[o.jsx("h3",{children:(w=u==null?void 0:u.assessment)==null?void 0:w.assessment_title}),o.jsxs("div",{className:"card",children:[o.jsx("h3",{children:"Overview"}),o.jsx("div",{dangerouslySetInnerHTML:{__html:c==null?void 0:c.intro}})]}),o.jsxs("div",{className:"surface-card p-4 shadow-2 border-round",children:[o.jsx("div",{className:"font-medium text-3xl text-900 mb-3",children:"Guidance"}),o.jsxs("div",{className:"text-500 mb-5",children:["You have a total of ",l==null?void 0:l.noOfAttempts," ","attempts for the entire Quiz"," "]}),o.jsxs("ul",{className:"list-none p-0 m-0 border-top-1 surface-border",children:[o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Expires on:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:_n(u==null?void 0:u.task_due_date).format("Do MMM YYYY ")})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Total Attempts:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:l==null?void 0:l.noOfAttempts})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Attempts Made:"}),o.jsx("div",{className:"text-900 w-full md:w-9 line-height-3",children:(T=l==null?void 0:l.assesment_user_attempts)==null?void 0:T.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Remaining Attempts:"}),o.jsx("div",{className:"text-900 w-full md:w-9 line-height-3",children:(l==null?void 0:l.noOfAttempts)-((C=l==null?void 0:l.assesment_user_attempts)==null?void 0:C.length)})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Number of Questions:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:(_=i==null?void 0:i.quizElements)==null?void 0:_.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Exam Time:"}),o.jsxs("div",{className:"text-900 w-full md:w-9",children:[" ",l&&((D=(E=l==null?void 0:l.time_limit)==null?void 0:E.type)==null?void 0:D.key)==="PerExam"&&o.jsxs(o.Fragment,{children:[Math.floor((k=(B=l==null?void 0:l.time_limit)==null?void 0:B.time_limit_info)==null?void 0:k.num_of_mins)," ","mins"]}),l&&((j=(P=l==null?void 0:l.time_limit)==null?void 0:P.type)==null?void 0:j.key)==="PerQuestion"&&o.jsxs(o.Fragment,{children:[Math.floor(((H=(M=l==null?void 0:l.time_limit)==null?void 0:M.time_limit_info)==null?void 0:H.time_per_question)*((de=i==null?void 0:i.quizElements)==null?void 0:de.length)/60)," ","mins"]})]})]}),((fe=l==null?void 0:l.assesment_user_attempts)==null?void 0:fe.length)>0&&o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Time Taken:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:A()})]})]})]})]}),o.jsx("div",{className:"my-5",children:(l==null?void 0:l.noOfAttempts)-((ee=l==null?void 0:l.assesment_user_attempts)==null?void 0:ee.length)>0?o.jsx(o.Fragment,{children:o.jsx(Pt,{size:"large",label:v===!0?"Passed":"Start Now",disabled:v,className:"p-button-info",onClick:()=>{r(U8),e&&e()}})}):o.jsx(Pt,{text:!0,label:"No Attempts Remaining",className:"p-button-info"})})]})})})}),n===V8&&i!==null&&o.jsx("div",{className:"fadein animation-duration-500",children:o.jsx(uj,{session_id:i==null?void 0:i.session_id,setDisplay:r,onOpenQuiz:g,quizData:i,taskSchema:c,saveProgress:s,setAssessmentModal:()=>{}})})]})]})},Bxe=t=>{var J,K,oe,ve,Ce,Se,Te,De,ie,U,re,Q;const[e,n]=N.useState(!1),r=N.useRef(!1),{taskId:i,endPoints:a,isRenderView:s,showFieldsAfterSubmit:l,messageWhileSubmittingForm:c,enableFormScroll:u,formScrollHeight:d="scroll-height-225",onStart:f,setAssessmentModal:h=()=>{}}=t,{setLayout:m}=on(),{taskProgressValue:g,taskRegisterData:v,task_status:A,assessmentData:S,taskProgressLoading:x,taskSchema:w,taskData:T,updateTaskFormData:C,submitTaskFormData:_,TasksLoading:E,userTaskSubmitFormData:D,TasksHTTPRequest:B,TasksSubmitLoading:k,clearTaskSchema:P,startQuiz:j,TASK_PUBLISHED:M,saveProgressDataHook:H}=mr();N.useEffect(()=>{if(w!==null&&m((w==null?void 0:w.layout)||[]),i){const be={viewed_at:new Date().toISOString()};C(D,i,a==null?void 0:a.updateFormData,s3,()=>{},be)}return()=>{P()}},[i]);const de=(se="One or more field is required")=>{r.current.show({severity:"error",summary:"Alert",detail:se,life:3e3})},fe=()=>{Xt.emit("onSubmitUserForm","complete"),Y()},ee=()=>{_(D,i,a==null?void 0:a.submitFormData),n(!1)},G=se=>{C(se,i,a==null?void 0:a.updateFormData,s3,()=>{r.current.show({severity:"success",summary:"Progress Saved",detail:"",life:3e3})})};N.useEffect(()=>{const se=setTimeout(()=>{var be;D!==null&&((w==null?void 0:w.enableAutoSave)===!0||((be=w==null?void 0:w.formType)==null?void 0:be.key)===n7)&&H(D,i,a==null?void 0:a.updateFormData)},2e3);return()=>clearTimeout(se)},[v,g]);const ae=(se,be,me,ye)=>{var he,V;let Ie=ye;const Ee={fieldId:se.uuid};if(me!=null&&me[se==null?void 0:se.uuid]){if((be==null?void 0:be.length)>0){e:for(const[,te]of be.entries())if(((he=te==null?void 0:te.children)==null?void 0:he.length)>0&&(te==null?void 0:te.enableConditionalField)===!0){for(const[,W]of(te==null?void 0:te.children.entries())||[])if((V=W==null?void 0:W.attributes)!=null&&V.required&&(Ie=ae(W,W==null?void 0:W.options,me,Ie),Ie===!1))break e}}}else Xt.emit("OnInvalidFieldCatch",Ee),Ie=!1,de();return Ie},Y=N.useCallback(()=>{var be,me,ye,Ie,Ee,he,V,te,W,ue,Ae,pe,ke,Le,We,gt,At,st,Je,Ct,mt;let se=!1;e:for(const[Ge,Tt]of w.layout.entries())if((Tt==null?void 0:Tt.isHidden)===!1)for(const[Gt,xn]of Tt.children.entries())for(const[,bn]of xn.children.entries())if(bn!=null&&bn.rowIsRepeatable){const wn=D.findIndex(yn=>(yn==null?void 0:yn.rowId)===bn.uuid);if(wn>=0){if(((be=D[wn].repeatableFieldsData)==null?void 0:be.length)<(bn==null?void 0:bn.minimumEntries)){de(`Need minimun ${bn==null?void 0:bn.minimumEntries} entries`),se=!1;break e}se=!0}}else for(const[,wn]of bn.children.entries())for(const[,yn]of wn.children.entries()){if(yn.isValid===0&&yn.isPostField===!0&&(yn==null?void 0:yn.componentType)!=="hidden-field"){const Gn={pageIndex:Ge,fieldId:yn.uuid,sectionIndex:Gt},On=D.findIndex(qt=>(qt==null?void 0:qt.fieldId)===yn.uuid);if(!(On===-1||(me=D[On])!=null&&me.postData[0]&&(((Ie=(ye=D[On])==null?void 0:ye.postData[0].postValue)==null?void 0:Ie.length)>0||((Ee=D[On])==null?void 0:Ee.postData[0].postValue)>0))){console.log("inValidData",Gn),Xt.emit("OnInvalidFieldCatch",Gn),se=!1,de();break e}}if((yn==null?void 0:yn.componentType)==="radio-hierarchal"){const Gn=D.findIndex(On=>(On==null?void 0:On.fieldId)===yn.uuid);if(Gn>=0&&(se=ae(yn,yn==null?void 0:yn.options,(he=D[Gn])==null?void 0:he.postData[0].postValue,!0),!se))break e}if(((V=yn==null?void 0:yn.children)==null?void 0:V.length)>0)for(const[,Gn]of yn.children.entries()){const On=Object.keys(Gn);if(On[0]){const qt=Gn[On[0]],at={fieldId:qt.uuid,sectionIndex:Gt},et=D.findIndex(ut=>(ut==null?void 0:ut.fieldId)===qt.uuid);if(!((te=D[et])!=null&&te.postData[0]&&(((ue=(W=D[et])==null?void 0:W.postData[0].postValue)==null?void 0:ue.length)>0||((Ae=D[et])==null?void 0:Ae.postData[0].postValue)>0||((Le=(ke=(pe=D[et])==null?void 0:pe.postData[0])==null?void 0:ke.postValue)==null?void 0:Le.addressOne)!==""))){Xt.emit("OnInvalidFieldCatch",at),se=!1,de();break e}}}if(yn!=null&&yn.inlineConditionalRules&&((gt=(We=yn==null?void 0:yn.inlineConditionalRules)==null?void 0:We.rules)==null?void 0:gt.length)>0){for(const[,Gn]of((At=yn==null?void 0:yn.inlineConditionalRules)==null?void 0:At.rules.entries())||[])for(const[,On]of(Gn==null?void 0:Gn.conditions.entries())||[])for(const[,qt]of(On==null?void 0:On.children.entries())||[])if(qt.isValid===0){const at={fieldId:qt.uuid,sectionIndex:Gt},et=D.findIndex(ut=>(ut==null?void 0:ut.fieldId)===qt.uuid);if(et>=0&&!((st=D[et])!=null&&st.postData[0]&&(((Ct=(Je=D[et])==null?void 0:Je.postData[0].postValue)==null?void 0:Ct.length)>0||((mt=D[et])==null?void 0:mt.postData[0].postValue)>0))){Xt.emit("OnInvalidFieldCatch",at),se=!1,de();break e}}}se=!0}se&&n(!0)},[D]),ge=()=>o.jsx(o.Fragment,{children:o.jsxs("div",{className:"w-full",children:[o.jsx("p",{children:"Loading form data....."}),o.jsx(ua,{className:"mb-2"}),o.jsx(ua,{className:"mb-2"}),o.jsx(ua,{className:"mb-2"}),o.jsx(ua,{className:"mb-5"}),o.jsx(ua,{className:"mb-2"}),o.jsx(ua,{className:"mb-2"}),o.jsx(ua,{className:"mb-2"}),o.jsx(ua,{className:"mb-2"}),o.jsx(ua,{className:"mb-2"}),o.jsx(ua,{className:"mb-2"}),o.jsx(ua,{className:"mb-2"})]})}),ne=()=>o.jsxs("div",{children:[o.jsx(Pt,{text:!0,label:"No",icon:"pi pi-times",onClick:()=>n(!1),className:"p-button-danger"}),o.jsx(Pt,{label:"Yes",icon:"pi pi-check",onClick:()=>ee(),autoFocus:!0})]});return o.jsxs("div",{children:[o.jsx(Is,{header:()=>o.jsx(o.Fragment,{}),visible:e,style:{width:"30vw"},footer:ne,onHide:()=>n(!1),children:o.jsx("p",{className:"text-center",children:c})}),E||k||B?o.jsx("div",{className:"w-full",children:o.jsx(ge,{})}):o.jsxs(o.Fragment,{children:[(((J=w==null?void 0:w.formType)==null?void 0:J.key)===t7||((K=w==null?void 0:w.formType)==null?void 0:K.key)==="survey")&&o.jsx(o.Fragment,{children:o.jsxs("div",{className:`px-0 ${s===!1?"builder_container":""}`,children:[o.jsxs("div",{className:"flex justify-content-center mb-2 align-items-center",children:[o.jsx("div",{className:"text-center text-900 text-3xl font-medium",children:T==null?void 0:T.task_title}),o.jsx("div",{className:"ml-4 ",children:(T==null?void 0:T.task_status)===xee&&o.jsx(BD,{classes:"",value:"COMPLETED",level:"success"})})]}),l===!1&&A===M?o.jsx(o.Fragment,{children:o.jsx("h3",{className:"text-center mt-5",children:"Thank you for completing the survey"})}):o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[E&&o.jsx(ge,{}),!E&&o.jsxs(o.Fragment,{children:[o.jsx(Xte,{}),o.jsx("div",{className:`${u===!0?d:" "} mt-2 mb-2`,children:o.jsx(lf,{backend:uf,children:w!==null&&((oe=w==null?void 0:w.layout)==null?void 0:oe.length)&&o.jsx(O5,{})})}),o.jsx(l3,{ref:r}),((ve=w==null?void 0:w.formType)==null?void 0:ve.key)!==""&&(A===s3||A===null)&&o.jsx("span",{children:ll.createPortal(o.jsx("div",{style:{zIndex:9999999},className:"card surface-card shadow-1 border-round py-2 render-form-footer",children:o.jsxs("div",{className:" flex justify-content-center",children:[o.jsx(Pt,{text:!0,className:"mr-2 p-button-info",label:"Save Progress",onClick:()=>G(D),loading:x,disabled:k}),o.jsx(Pt,{label:"Submit",onClick:()=>fe(),disabled:x,loading:k})]})}),document.body)})]})]})})]})}),((Ce=w==null?void 0:w.formType)==null?void 0:Ce.key)==="policies"&&o.jsx("div",{className:"layout-invoice-page",children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12",children:o.jsx("div",{className:"card",children:o.jsx("div",{id:"invoice-content",children:o.jsxs("div",{className:"invoice",children:[o.jsxs("div",{className:"invoice-header",children:[o.jsx("div",{className:"invoice-company flex align-items-center",children:o.jsxs("h3",{children:[T==null?void 0:T.task_title," "]})}),o.jsxs("div",{className:"ml-2",children:[o.jsx("div",{className:"customer-id",children:"Customer ID: C1613"}),o.jsx("div",{className:"invoice-address",children:"9137 3rd Lane California City CA 93504, U.S.A."})]})]}),o.jsx("div",{className:"scroll-height-300 mt-2 mb-2",children:o.jsx(lf,{backend:uf,children:w!==null&&((Se=w==null?void 0:w.layout)==null?void 0:Se.length)&&o.jsx(O5,{})})}),((Te=w==null?void 0:w.formType)==null?void 0:Te.key)!==""&&(A===1||A===null)&&o.jsx(o.Fragment,{children:o.jsx("div",{className:"flex justify-content-center",children:o.jsx(Pt,{className:"p-button-primary",label:"Accept",onClick:()=>fe(),loading:x})})})]})})})})})}),(((De=w==null?void 0:w.formType)==null?void 0:De.key)==="page"||((ie=w==null?void 0:w.formType)==null?void 0:ie.key)==="pdf")&&o.jsx("div",{className:"layout-invoice-page",children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12",children:o.jsx("div",{className:"card",children:o.jsx(lf,{backend:uf,children:w!==null&&((U=w==null?void 0:w.layout)==null?void 0:U.length)&&o.jsx(O5,{})})})})})}),((re=w==null?void 0:w.formType)==null?void 0:re.key)==="training"&&o.jsx(Mxe,{renderIn:Ute,taskSchema:w,taskId:i,endPoints:a}),((Q=w==null?void 0:w.formType)==null?void 0:Q.key)==="exam"&&o.jsx(Lxe,{taskId:i,endPoints:a,onStart:f})]})]})};/**
4164
4164
  * React Router v6.23.1
4165
4165
  *
@@ -4170,7 +4170,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
4170
4170
  *
4171
4171
  * @license MIT
4172
4172
  */const Vxe=y.createContext(null);process.env.NODE_ENV!=="production"&&(Vxe.displayName="DataRouter");const Uxe=y.createContext(null);process.env.NODE_ENV!=="production"&&(Uxe.displayName="DataRouterState");const qxe=y.createContext(null);process.env.NODE_ENV!=="production"&&(qxe.displayName="Await");const $xe=y.createContext(null);process.env.NODE_ENV!=="production"&&($xe.displayName="Navigation");const jxe=y.createContext(null);process.env.NODE_ENV!=="production"&&(jxe.displayName="Location");const dj=y.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(dj.displayName="Route");const zxe=y.createContext(null);process.env.NODE_ENV!=="production"&&(zxe.displayName="RouteError");function fj(){let{matches:t}=y.useContext(dj),e=t[t.length-1];return e?e.params:{}}new Promise(()=>{});const Hxe=t=>{var r;const{section:e}=t,{userSelectedLanguage:n}=on();return o.jsxs("div",{children:["   ",(r=e==null?void 0:e.heading)==null?void 0:r[n==null?void 0:n.type]," : "," ",o.jsx(Oa,{placeholder:"enter weight",max:100,min:0}),o.jsx("br",{}),o.jsx("br",{})]})};function DS(){return DS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},DS.apply(this,arguments)}function Yxe(t){if(Array.isArray(t))return t}function Kxe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,l=[],c=!0,u=!1;try{if(a=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return l}}function hj(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Xxe(t,e){if(t){if(typeof t=="string")return hj(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hj(t,e)}}function Gxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4173
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pj(t,e){return Yxe(t)||Kxe(t,e)||Xxe(t,e)||Gxe()}function Og(t){"@babel/helpers - typeof";return Og=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Og(t)}function Rxe(t,e){if(Og(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Og(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Wxe(t){var e=Rxe(t,"string");return Og(e)==="symbol"?e:String(e)}function Qxe(t,e,n){return e=Wxe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Jxe={root:"p-confirm-dialog",message:"p-confirm-dialog-message",icon:"p-confirm-dialog-icon",acceptButton:"p-confirm-dialog-accept",rejectButton:function(e){var n=e.getPropValue;return ht("p-confirm-dialog-reject",{"p-button-text":!n("rejectClassName")})}},P5=Ln.extend({defaultProps:{__TYPE:"ConfirmDialog",accept:null,acceptClassName:null,acceptIcon:null,acceptLabel:null,appendTo:null,breakpoints:null,children:void 0,className:null,content:null,defaultFocus:"accept",footer:null,icon:null,message:null,onHide:null,reject:null,rejectClassName:null,rejectIcon:null,rejectLabel:null,tagKey:void 0,visible:void 0},css:{classes:Jxe}});function gj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Oh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gj(Object(n),!0).forEach(function(r){Qxe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var mj=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e=Oh(Oh({},e),{visible:e.visible===void 0?!0:e.visible}),e.visible&&vs.emit("confirm-dialog",e);var n=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};vs.emit("confirm-dialog",Oh(Oh(Oh({},e),a),{visible:!0}))},r=function(){vs.emit("confirm-dialog",{visible:!1})};return{show:n,hide:r}},Zxe=y.memo(y.forwardRef(function(t,e){var n=$n(),r=y.useContext(rr),i=P5.getProps(t,r),a=y.useState(i.visible),s=pj(a,2),l=s[0],c=s[1],u=y.useState(!1),d=pj(u,2),f=d[0],h=d[1],m=y.useRef(null),g=y.useRef(!1),v=y.useRef(null),A=function(){var ae=i.group;return m.current&&(ae=m.current.group),Object.assign({},i,m.current,{group:ae})},S=function(ae){return A()[ae]},x=function(ae){for(var Y=arguments.length,ge=new Array(Y>1?Y-1:0),ne=1;ne<Y;ne++)ge[ne-1]=arguments[ne];return Ne.getPropValue(S(ae),ge)},w=S("acceptLabel")||Rr("accept"),T=S("rejectLabel")||Rr("reject"),C={props:i,state:{visible:l}},_=P5.setMetaData(C),E=_.ptm,D=_.cx,B=_.isUnstyled;fi(P5.css.styles,B,{name:"confirmdialog"});var k=function(){g.current||(g.current=!0,x("accept"),M("accept"))},P=function(){g.current||(g.current=!0,x("reject"),M("reject"))},j=function(){var ae=A();ae.group===i.group&&(c(!0),g.current=!1,v.current=document.activeElement)},M=function(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"cancel";c(!1),x("onHide",{result:ae}),_e.focus(v.current),v.current=null},H=function(ae){if(ae.tagKey===i.tagKey){var Y=l!==ae.visible,ge=S("target")!==ae.target;ge&&!i.target?(M(),m.current=ae,h(!0)):Y&&(m.current=ae,ae.visible?j():M())}};y.useEffect(function(){i.visible?j():M()},[i.visible]),y.useEffect(function(){return!i.target&&!i.message&&vs.on("confirm-dialog",H),function(){vs.off("confirm-dialog",H)}},[i.target]),ur(function(){f&&j()},[f]),za(function(){vs.off("confirm-dialog",H)}),y.useImperativeHandle(e,function(){return{props:i,confirm:H}});var de=function(){var ae=S("defaultFocus"),Y=ht("p-confirm-dialog-accept",S("acceptClassName")),ge=ht("p-confirm-dialog-reject",{"p-button-text":!S("rejectClassName")},S("rejectClassName")),ne={label:T,autoFocus:ae==="reject",icon:S("rejectIcon"),className:ht(S("rejectClassName"),D("rejectButton",{getPropValue:S})),onClick:P,pt:E("rejectButton"),unstyled:i.unstyled,__parentMetadata:{parent:C}},J=n({label:w,autoFocus:ae===void 0||ae==="accept",icon:S("acceptIcon"),className:ht(S("acceptClassName"),D("acceptButton")),onClick:k,pt:E("acceptButton"),unstyled:i.unstyled,__parentMetadata:{parent:C}},E("acceptButton")),K=y.createElement(y.Fragment,null,y.createElement(Pt,ne),y.createElement(Pt,J));if(S("footer")){var oe={accept:k,reject:P,acceptClassName:Y,rejectClassName:ge,acceptLabel:w,rejectLabel:T,element:K,props:A()};return Ne.getJSXElement(S("footer"),oe)}return K},fe=function(){var ae=A(),Y=Ne.getJSXElement(S("message"),ae),ge=n({className:D("icon")},E("icon")),ne=Wn.getJSXIcon(S("icon"),Oh({},ge),{props:ae}),J=de(),K=n({className:D("message")},E("message")),oe=n({visible:l,className:ht(S("className"),D("root")),footer:J,onHide:M,breakpoints:S("breakpoints"),pt:ae.pt,unstyled:i.unstyled,appendTo:S("appendTo"),__parentMetadata:{parent:C}},P5.getOtherProps(ae));return y.createElement(Is,DS({},oe,{content:t==null?void 0:t.content}),ne,y.createElement("span",K,Y))},ee=fe();return y.createElement(Vl,{element:ee,appendTo:S("appendTo")})}));Zxe.displayName="ConfirmDialog";const eCe=()=>{const[t]=N.useState([]);return N.useEffect(()=>()=>{},[]),o.jsx("div",{className:"card",children:(t==null?void 0:t.length)>0&&(t==null?void 0:t.map((e,n)=>o.jsxs("div",{children:[o.jsx("ul",{className:"list-none p-0 m-0",children:o.jsxs("li",{className:"flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-3",style:{borderRadius:"10px"},children:[o.jsx("div",{children:o.jsxs("div",{children:[o.jsx("span",{className:"inline-flex justify-content-center align-items-center w-2rem h-2rem border-circle border-1",children:(e==null?void 0:e.is_active)===1?o.jsx("i",{style:{color:"green"},className:"pi pi-check"}):o.jsx("i",{className:"pi pi-check"})}),o.jsxs("span",{className:" font-bold ml-2",children:[e==null?void 0:e.version_name,(e==null?void 0:e.is_active)===1?" - Active ":""]})]})}),o.jsx("div",{className:"flex align-items-center justify-content-between md:justify-content-end mt-3 md:mt-0",children:o.jsx("div",{className:"text-right ml-3",children:o.jsx("span",{className:" font-bold",children:(e==null?void 0:e.is_active)===1?"":o.jsx(Pt,{text:!0,onClick:()=>{setTimeout(()=>{},3e3)},severity:"success",label:"Make this version active",icon:"pi pi-check",size:"small"})})})})]})}),o.jsx("hr",{})]},`version-item-${n}`)))})},tCe=()=>{const{setLayout:t,formBuilderConfigurationType:e}=on(),n=N.useRef(null),r=s=>{var l;switch((l=s==null?void 0:s.formType)==null?void 0:l.key){case(e==null?void 0:e.key):t(s==null?void 0:s.layout);break}},i=async s=>{const l=s.target.files;if(l&&l.length>0){const c=await a(l[0]);r(c)}};async function a(s){return new Promise((l,c)=>{const u=new FileReader;u.onload=d=>{var f;return l(JSON.parse((f=d.target)==null?void 0:f.result))},u.onerror=d=>c(d),u.readAsText(s)})}return o.jsxs(o.Fragment,{children:[o.jsx("input",{ref:n,type:"file",style:{display:"none"},id:"schema",name:"schema",onChange:i}),o.jsx(Pt,{text:!0,size:"small",className:"p-button-primary ml-3 mr-3",onClick:()=>{var s;(s=n.current)==null||s.click()},label:"Import Template"})]})},nCe=()=>{const{builderTemplateName:t,formBuilderFormSchema:e}=on(),n=function(){const r=document.createElement("a");return function(i,a){const s=JSON.stringify(i),l=new Blob([s],{type:"octet/stream"}),c=window.URL.createObjectURL(l);r.href=c,r.download=a,r.click(),window.URL.revokeObjectURL(c)}}();return o.jsx(Pt,{text:!0,size:"small",className:"p-button-info ml-3",onClick:()=>{const r=e,i=t+".json";n(r,i)},label:"Export Template"})};function Ng(){return Ng=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ng.apply(this,arguments)}function Fg(t){"@babel/helpers - typeof";return Fg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fg(t)}function rCe(t,e){if(Fg(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Fg(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function iCe(t){var e=rCe(t,"string");return Fg(e)==="symbol"?e:String(e)}function aCe(t,e,n){return e=iCe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var sCe={root:function(e){var n=e.props,r=e.checked;return ht("p-inputswitch p-component",{"p-highlight":r,"p-disabled":n.disabled,"p-invalid":n.invalid})},input:"p-inputswitch-input",slider:"p-inputswitch-slider"},k5=Ln.extend({defaultProps:{__TYPE:"InputSwitch",autoFocus:!1,checked:!1,className:null,disabled:!1,falseValue:!1,id:null,inputId:null,inputRef:null,invalid:!1,name:null,onBlur:null,onChange:null,onFocus:null,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,trueValue:!0,children:void 0},css:{classes:sCe}});function vj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function oCe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?vj(Object(n),!0).forEach(function(r){aCe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Ks=y.memo(y.forwardRef(function(t,e){var n=$n(),r=y.useContext(rr),i=k5.getProps(t,r),a=k5.setMetaData({props:i}),s=a.ptm,l=a.cx,c=a.isUnstyled;fi(k5.css.styles,c,{name:"inputswitch"});var u=y.useRef(null),d=y.useRef(i.inputRef),f=i.checked===i.trueValue,h=function(_){if(i.onChange){var E=f?i.falseValue:i.trueValue;i.onChange({originalEvent:_,value:E,stopPropagation:function(){_==null||_.stopPropagation()},preventDefault:function(){_==null||_.preventDefault()},target:{name:i.name,id:i.id,value:E}})}},m=function(_){var E;i==null||(E=i.onFocus)===null||E===void 0||E.call(i,_)},g=function(_){var E;i==null||(E=i.onBlur)===null||E===void 0||E.call(i,_)};y.useImperativeHandle(e,function(){return{props:i,focus:function(){return _e.focus(d.current)},getElement:function(){return u.current},getInput:function(){return d.current}}}),y.useEffect(function(){Ne.combinedRefs(d,i.inputRef)},[d,i.inputRef]),ki(function(){i.autoFocus&&_e.focus(d.current,i.autoFocus)});var v=Ne.isNotEmpty(i.tooltip),A=k5.getOtherProps(i),S=Ne.reduceKeys(A,_e.ARIA_PROPS),x=n({className:ht(i.className,l("root",{checked:f})),style:i.style,role:"checkbox","aria-checked":f,"data-p-highlight":f,"data-p-disabled":i.disabled},A,s("root")),w=n(oCe({type:"checkbox",id:i.inputId,name:i.name,checked:f,onChange:h,onFocus:m,onBlur:g,disabled:i.disabled,role:"switch",tabIndex:i.tabIndex,"aria-checked":f,className:l("input")},S),s("input")),T=n({className:l("slider")},s("slider"));return y.createElement(y.Fragment,null,y.createElement("div",Ng({id:i.id,ref:u},x),y.createElement("input",Ng({ref:d},w)),y.createElement("span",T)),v&&y.createElement(rn,Ng({target:u,content:i.tooltip,pt:s("tooltip")},i.tooltipOptions)))}));Ks.displayName="InputSwitch";const lCe=()=>{var x,w,T,C,_;const{formBuilderFormSchema:t,selectFormBuilderLanguage:e,formBuilderSchemaLanguages:n,unselectFormBuilderLanguage:r,schemaBuilderUpdate:i,builderTemplateName:a,formBuilderLoading:s,formBuilderConfigurationType:l,saveFormTemplateNewVersion:c}=on(),[u,d]=N.useState(),f=fj(),h=f==null?void 0:f.form_template_id,m=M7({initialValues:{firstName:"",lastName:"",contact:"",email:""},validate:()=>{const E={};return m.values.application_url="",E},onSubmit:()=>{}}),g=l==null?void 0:l.key,v=(E,D)=>{E!=null&&E.value?e(D):r(D),d(!u)},A=E=>{for(const[,D]of t.layout.entries())for(const[,B]of D.children.entries())for(const[,k]of B.children.entries())for(const[,P]of k.children.entries())for(const[,j]of P.children.entries())j.isFluid=E.value},S=()=>{mj({message:"Are you sure you want to a new version for this form?",header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:()=>{c(h,t)},reject:()=>{}})};return o.jsx(o.Fragment,{children:o.jsx("form",{onSubmit:m.handleSubmit,className:"p-fluid",children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-6",children:[s===!0?o.jsx(o.Fragment,{children:o.jsx(ua,{height:"15rem"})}):o.jsxs(li,{header:"General",children:[o.jsxs("h5",{children:["Form Title : ",a||""," "]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"binary",onChange:E=>{i({showIntroTab:E.value})},checked:t==null?void 0:t.showIntroTab}),o.jsx("label",{htmlFor:"binary",children:"Show Intro Page"}),"  "]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"auto-save",onChange:E=>{i({enableAutoSave:E.value})},checked:t==null?void 0:t.enableAutoSave}),o.jsx("label",{htmlFor:"auto-save",children:"Auto Save Task Render Form User Data"})]}),g===n7&&o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"auto-save",onChange:E=>{i({surveyQuestionSlide:E.value})},checked:t==null?void 0:t.surveyQuestionSlide}),o.jsx("label",{htmlFor:"auto-save",children:"Survey Slide Per Question"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"showConditionalFields",onChange:E=>{i({showConditionalFields:E.value})},checked:t==null?void 0:t.showConditionalFields,disabled:t==null?void 0:t.surveyQuestionSlide}),o.jsxs("label",{htmlFor:"showConditionalFields",children:["Show Conditional Fields ",(t==null?void 0:t.surveyQuestionSlide)===!0&&o.jsx("small",{className:"error",children:"Cant use Survey Slide Per Question with Conditional Fields"})]})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"enableReviewTask",onChange:E=>{i({enableReviewTask:E.value})},checked:t==null?void 0:t.enableReviewTask}),o.jsx("label",{htmlFor:"enableReviewTask",children:"Enable Admin Review Task"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"enableFormFluid",onChange:E=>{i({enableFormFluid:E.value}),A(E)},checked:t==null?void 0:t.enableFormFluid}),o.jsx("label",{htmlFor:"enableFormFluid",children:"Enable Form Fluid"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"enableFieldEnumeration",onChange:E=>{i({enableFieldEnumeration:E.value}),A(E)},checked:t==null?void 0:t.enableFieldEnumeration}),o.jsx("label",{htmlFor:"enableFormFluid",children:"Enable Field Enumeration"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"isOnboardingForm",onChange:E=>{i({isOnboardingForm:E.value}),A(E)},checked:t==null?void 0:t.isOnboardingForm}),o.jsx("label",{htmlFor:"isOnboardingForm",children:"Is Onboarding Form"})]})]}),s===!0?o.jsx(o.Fragment,{children:o.jsx(ua,{className:"mt-3",height:"8rem"})}):o.jsxs(li,{className:"mt-3",header:"Auto Save Settings",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"auto-save",onChange:E=>{i({enableAutoSave:E.value})},checked:t==null?void 0:t.enableAutoSave}),o.jsx("label",{htmlFor:"auto-save",children:"Auto Save User Data"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"auto-save",onChange:E=>{i({enableAutoSaveBuilderSetting:E.value})},checked:t==null?void 0:t.enableAutoSaveBuilderSetting}),o.jsx("label",{htmlFor:"auto-save",children:"Auto Save Form Builder Settings"})]})]}),s===!0?o.jsx(o.Fragment,{children:o.jsx(ua,{className:"mt-3",height:"16rem"})}):o.jsxs(li,{className:"mt-3",header:"Form Table Configuration",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"stripedRows",onChange:E=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,stripedRows:E.value}})},checked:(x=t==null?void 0:t.tableConfiguration)==null?void 0:x.stripedRows}),o.jsx("label",{htmlFor:"stripedRows",children:"Striped Rows"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"gridLines",onChange:E=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,gridLines:E.value}})},checked:(w=t==null?void 0:t.tableConfiguration)==null?void 0:w.gridLines}),o.jsx("label",{htmlFor:"gridLines",children:"Grid Lines"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"flexScroll",onChange:E=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,flexScroll:E.value}})},checked:(T=t==null?void 0:t.tableConfiguration)==null?void 0:T.flexScroll}),o.jsx("label",{htmlFor:"flexScroll",children:"Flex Scroll "})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"isResponsive",onChange:E=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,isResponsive:E.value}})},checked:(C=t==null?void 0:t.tableConfiguration)==null?void 0:C.isResponsive}),o.jsx("label",{htmlFor:"isResponsive",children:"isResponsive Rows"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"rowReorder",onChange:E=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,rowReorder:E.value}})},checked:(_=t==null?void 0:t.tableConfiguration)==null?void 0:_.rowReorder}),o.jsx("label",{htmlFor:"rowReorder",children:"Row Reorder"})]})]})]}),o.jsxs("div",{className:"col-6",children:[s===!0?o.jsx(o.Fragment,{children:o.jsx(ua,{height:"18rem"})}):o.jsx(li,{header:"Languages",children:aQ.map((E,D)=>{const B=n.filter(function(k){return(E==null?void 0:E.key)===(k==null?void 0:k.key)});return o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:D,name:"lagnuage",checked:B.length>0,onChange:k=>v(k,E)}),o.jsx("label",{htmlFor:D,children:E.language})]},D)})}),s===!0?o.jsx(o.Fragment,{children:o.jsx(ua,{className:"mt-3",height:"16rem"})}):o.jsxs(li,{className:"mt-3",header:"Versioning",children:[o.jsx("h5",{children:"Change Form Version Title"}),o.jsx("div",{className:"field",children:o.jsx(gn,{value:(t==null?void 0:t.version_name)||"",minLength:2,placeholder:"Enter form version",maxLength:50,onChange:E=>{var D;i({version_name:(D=E==null?void 0:E.target)==null?void 0:D.value})}})}),o.jsx("h5",{children:"All Forms Version"}),o.jsx(eCe,{}),o.jsx(Pt,{text:!0,size:"small",className:"p-button-info ml-3",onClick:()=>S(),label:"Create New Version",loading:s})]}),s===!0?o.jsx(o.Fragment,{children:o.jsx(ua,{className:"mt-3",height:"8rem"})}):o.jsx(li,{className:"mt-3",header:"Export/Import",children:o.jsxs("span",{className:"flex",children:[o.jsx(nCe,{}),o.jsx(tCe,{})]})})]}),o.jsx("div",{className:"col-6"})]})})})},cCe=t=>{var g,v,A;const{fieldIndex:e,field:n,models:r,setfieldMappings:i,fieldMappings:a}=t,[s,l]=N.useState(null),[c,u]=N.useState(null),d=()=>{var w;const S=[...a],x=S.findIndex(T=>T.fieldId===(n==null?void 0:n.uuid));if(x!==-1){const T=[...r],C=T.findIndex(_=>{var E;return _.modelName===((E=S[x])==null?void 0:E.modelName)});u((w=S[x])==null?void 0:w.column_name),C!==-1&&l(T[C])}};N.useEffect(()=>(d(),()=>{}),[]);const[f,h]=N.useState(!1),m=S=>{const x=[...a],w=x.findIndex(C=>C.fieldId===S),T={fieldId:S,modelName:(s==null?void 0:s.modelName)||"",class:s==null?void 0:s.class,column_name:c||""};w!==-1?x[w]=T:x.push(T),i([...x])};return o.jsxs("div",{className:"grid",children:[o.jsxs(Is,{header:`Map ${(g=n==null?void 0:n.label)==null?void 0:g.english} Field with Model`,visible:f,style:{width:"40vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsx(Pt,{text:!0,label:"Set Field","aria-label":"Submit",onClick:()=>{m((n==null?void 0:n.uuid)||""),h(!1)}})}),onHide:()=>h(!1),children:[o.jsxs("p",{children:["Map ",(v=n==null?void 0:n.label)==null?void 0:v.english," Field with Model"]}),o.jsxs("div",{className:"flex justify-content-between",children:[o.jsx(Sa,{value:s,onChange:S=>l(S.value),options:r,optionLabel:"modelName",className:"w-full md:w-14rem",placeholder:"Select a model field",filter:!0,showClear:!0}),o.jsx(Sa,{value:c,onChange:S=>u(S.value),options:(s==null?void 0:s.columns)||[],className:"w-full md:w-14rem",placeholder:"Select a column",filter:!0,showClear:!0})]})]}),o.jsx("div",{className:"col-6",children:o.jsxs("p",{children:[o.jsxs("strong",{children:[e+1," "]}),"Field ",n==null?void 0:n.componentType,": ",(A=n==null?void 0:n.label)==null?void 0:A.english," Is Mapped to"," ",o.jsx(xc,{className:"mr-2",severity:s!=null&&s.modelName?"success":"warning",value:(s==null?void 0:s.modelName)||"Nothing"}),"with column"," ",o.jsx(xc,{className:"mr-2",severity:c?"success":"danger",value:c||"Nothing"})]})}),o.jsx("div",{className:"col-6",children:o.jsx(Pt,{text:!0,label:"Set Model","aria-label":"Submit",onClick:()=>{h(!0)}})})]},e+"-table-field-item")},uCe=t=>{const{fields:e}=t,[n]=N.useState([]),[r,i]=N.useState(!1),{formBuilderFormSchema:a,schemaBuilderUpdate:s}=on(),l=()=>{i(!0)},c=()=>{let d=[...(a==null?void 0:a.fieldMappings)||[]];console.log("tempFieldsMappings",d),d!=null&&d.length&&(d=d==null?void 0:d.filter(f=>e.some(h=>h.uuid===(f==null?void 0:f.fieldId)))),u(d)};N.useEffect(()=>(l(),c(),()=>{}),[]);const u=d=>{s({fieldMappings:d})};return o.jsx("div",{children:r===!0?o.jsxs(o.Fragment,{children:[o.jsx(ua,{className:"mt-3",height:"5rem"}),o.jsx(ua,{className:"mt-3",height:"5rem"}),o.jsx(ua,{className:"mt-3",height:"5rem"}),o.jsx(ua,{className:"mt-3",height:"5rem"}),o.jsx(ua,{className:"mt-3",height:"5rem"}),o.jsx(ua,{className:"mt-3",height:"5rem"}),o.jsx(ua,{className:"mt-3",height:"5rem"}),o.jsx(ua,{className:"mt-3",height:"5rem"})]}):o.jsx(o.Fragment,{children:(e==null?void 0:e.length)>0&&(n==null?void 0:n.length)>0&&(e==null?void 0:e.map((d,f)=>o.jsx("div",{className:"card",children:o.jsx(cCe,{fieldMappings:a!=null&&a.fieldMappings?a==null?void 0:a.fieldMappings:[],setfieldMappings:u,field:d,fieldIndex:f,models:n})},f+"-table-field-itemc-component")))})})},dCe=0,fCe=t=>{const{setShowPreview:e,activeIndex:n,userFormBuilderSettings:r}=t,{builderIsChangesSaved:i,builderTemplateName:a,formBuilderConfigurationType:s,formBuilderFormSchema:l,formBuilderLoading:c,formBuilderPublishedStatus:u,builderVersionName:d,saveFormProgress:f,schemaBuilderUpdate:h}=on(),m=N.useRef(null),g=()=>{f(l)},v=["Basic","Advanced"],[A,S]=N.useState((r==null?void 0:r.isAdvanceView)!==void 0&&r!=null&&r.isAdvanceView?"Advanced":"Basic"),x=C=>{S(C.value),h({isAdvanceView:C.value==="Advanced"})},w=o.jsx(N.Fragment,{children:o.jsxs("div",{className:"flex",children:[((s==null?void 0:s.key)===t7||(s==null?void 0:s.key)===n7||(s==null?void 0:s.key)===Vte)&&o.jsx(q0,{className:"mr-3",value:A,onChange:C=>x(C),options:v,disabled:c}),o.jsx(Pt,{text:!0,icon:"pi pi-eye",size:"small",className:"mr-2",onClick:()=>e(!0),label:"Preview"}),!u&&o.jsx(o.Fragment,{children:(l==null?void 0:l.enableAutoSaveBuilderSetting)===!1&&o.jsx(Pt,{text:!0,disabled:i,size:"small",className:i?"p-button-secondary":"p-button-info",onClick:()=>g(),label:"Save Progress",loading:c})})]})}),T=o.jsx(N.Fragment,{children:c===!0?o.jsx(o.Fragment,{children:o.jsx(ua,{width:"25rem",height:"1.5rem"})}):o.jsxs("div",{className:"font-medium text-900",children:["Builder - ",s==null?void 0:s.name," - ",a," ","- Version : ",d]})});return o.jsxs(o.Fragment,{children:[o.jsx(l3,{ref:m}),o.jsxs("div",{className:"flex",children:[o.jsx("div",{className:"flex w-5 justify-content-left align-items-start",children:T}),o.jsx("div",{className:"flex w-7 justify-content-right align-items-end",children:n===dCe&&w})]})]})};function hCe(){const{formBuilderFormLayout:t,formBuilderFormSchema:e,clearBuilderSchema:n,schemaBuilderUpdate:r,saveFormProgress:i,userSelectedLanguage:a,builderIsChangesSaved:s}=on(),l=fj(),c=l==null?void 0:l.form_template_id,[u]=N.useState(!0),[d]=N.useState(null),[f,h]=N.useState(!0),[m,g]=N.useState(!1),[v,A]=N.useState(0),[S,x]=N.useState(null),w=async()=>{},T=N.useCallback(()=>{w()},[t,e]),C=D=>{const B={...e,intro:D};r(B)},_=()=>{i(e)},E=()=>{s===!1?mj({message:"You have unsaved changes, would you like to to save them or discard them?",header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:()=>{_(),h(!1),setTimeout(()=>{n()},1e3)},rejectLabel:"Close and discard changes",acceptLabel:"Close and save changes",reject:()=>{h(!1),setTimeout(()=>{n()},1e3)}}):(h(!1),setTimeout(()=>{n()},1e3))};return o.jsx(Is,{maximizable:!0,header:()=>o.jsx(fCe,{setUserFormBuilderSettings:x,userFormBuilderSettings:S,formBuilderFormLayout:t,formTemplateId:c,showPreview:m,setShowPreview:g,activeIndex:v,emitSocketData:T}),visible:f,style:{width:"100vw",height:"100vh",maxHeight:"100%"},onHide:()=>E(),children:o.jsxs("div",{id:"form-builder",className:"grid",style:{overflow:"hidden",height:"100%"},children:[!u&&o.jsx(Pt,{text:!0,label:"Request Access",onClick:()=>{},className:"p-button-info"}),d&&o.jsxs("div",{children:[d==null?void 0:d.username," is editing so you have to wait to edits and leaves."]}),o.jsx("div",{className:"flex justify-content-end"}),o.jsx("div",{id:"users-arrow"}),o.jsx("div",{className:"col-12",style:{overflow:"hidden"},children:o.jsxs(Ya,{activeIndex:v,onTabChange:D=>A(D.index),children:[o.jsxs(fr,{header:"Builder",children:[o.jsx(lf,{backend:uf}),o.jsx(Eo,{style:{width:"75vw"},visible:m,onHide:()=>g(!1),position:"right",children:o.jsx(lf,{backend:uf,children:o.jsx("div",{className:"scroll-height-200"})})})]}),o.jsx(fr,{header:"Configuration",children:o.jsx("div",{className:"scroll-height-250",children:o.jsx(lCe,{})})}),o.jsx(fr,{header:"Intro",disabled:(e==null?void 0:e.showIntroTab)===!1,children:o.jsx(Y3,{style:{height:"320px"},value:(e==null?void 0:e.intro)||"<p></p>",onTextChange:D=>{C(D==null?void 0:D.htmlValue)}})}),o.jsx(fr,{header:"Data Model Binding",children:o.jsx(uCe,{fields:e==null?void 0:e.tableFields})}),o.jsxs(fr,{header:"Weighting",children:[o.jsx("h3",{children:"Weighting"}),(t==null?void 0:t.length)>0&&t.map((D,B)=>{var k,P,j;return o.jsxs("div",{children:[o.jsx("h5",{children:(k=D==null?void 0:D.title)==null?void 0:k[a==null?void 0:a.type]}),((P=D==null?void 0:D.children)==null?void 0:P.length)>0&&((j=D==null?void 0:D.children)==null?void 0:j.map((M,H)=>o.jsx("div",{children:o.jsx(Hxe,{page:D,section:M})},`weighting-section-${H}`)))]},`weighting-page-${B}`)}),o.jsx("hr",{}),"Total ",o.jsx(Oa,{placeholder:"0",readOnly:!0})," %"]})]})})]})})}const pCe=()=>o.jsx(hCe,{}),gCe=t=>{const{className:e=""}=t,{builderIsChangesSaved:n,schemaBuilderUpdate:r,formBuilderFormLayout:i,formBuilderFormSchema:a,formatTableFieldsHook:s,formBuilderLoading:l,saveFormProgress:c}=on(),u=d=>{n===!1?(d.preventDefault(),d.returnValue=!1):window.location.reload()};return N.useEffect(()=>(window.addEventListener("beforeunload",u),()=>{window.removeEventListener("beforeunload",u)}),[n]),N.useEffect(()=>((a==null?void 0:a.enableAutoSaveBuilderSetting)===!0&&l===!1?c(!1):r({isChangesSaved:!1}),s(i),()=>{}),[i]),o.jsx("div",{className:e,children:o.jsx(O5,{})})},mCe={padding:"1rem 0.5rem",cursor:"move",textAlign:"center"},Nh=t=>{const{data:e,showIcon:n,tags:r}=t,[{opacity:i},a]=Qi({type:Zn,item:e,collect:l=>({opacity:l.isDragging()?0:1})});function s(l,c){return l.length<=c?l:l.slice(0,c)+"..."}return o.jsxs("div",{ref:a,className:`card shadow-2 question builder-sidebar-item ${e==null?void 0:e.element}`,style:{...mCe,opacity:i},children:[i&&(e!=null&&e.toolTip)?e==null?void 0:e.toolTip(e):"",s(e==null?void 0:e.label,80),o.jsxs("div",{className:"mt-2",children:[n&&o.jsx(xc,{icon:"pi pi-check",severity:"warning",className:"mr-2",rounded:!0}),r&&o.jsx(o.Fragment,{children:(r==null?void 0:r.length)>0&&(r==null?void 0:r.map((l,c)=>o.jsx(xc,{severity:l==null?void 0:l.severity,className:"mr-2",value:l==null?void 0:l.label},`tagIndex-${c}`)))})]})]})},vCe=()=>{const{renderType:t}=Zt(),e=4,n=0,r=1,i=2,a=5,s=()=>{const l=t;let c=0;return l===Y1?c=e:l===pm?c=a:l===hm||l===P9||l===H1?c=i:l===F0||l===ep?c=r:l===z1&&(c=n),console.log("Selected Tab Index:",c),c};return o.jsx(o.Fragment,{children:o.jsxs(Ya,{activeIndex:s(),scrollable:!0,children:[t===z1&&o.jsx(fr,{header:"Survey",children:nQ.map((l,c)=>o.jsx(li,{header:l==null?void 0:l.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:l==null?void 0:l.items.map((u,d)=>o.jsx("div",{className:"xl:col-6 lg:col-12 md:col-12 sm:col-12",children:o.jsx(Nh,{data:u},u.uuid)},"form_elements_"+d))})},`pannel-tab-${c}`))}),(t===F0||t===ep)&&o.jsx(fr,{header:"Form",children:eQ.map((l,c)=>o.jsx(li,{header:l==null?void 0:l.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:l==null?void 0:l.items.map((u,d)=>o.jsx("div",{className:"xl:col-6 lg:col-12 md:col-12 sm:col-12",children:o.jsx(Nh,{data:u},u.uuid)},"form_elements_"+d))})},`pannel-tab-${c}`))}),(t===hm||t===P9||t===H1)&&o.jsx(fr,{header:"Layout",children:eK.map((l,c)=>o.jsx(li,{header:l==null?void 0:l.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:l==null?void 0:l.items.map((u,d)=>o.jsx("div",{className:"col-6",children:o.jsx(Nh,{data:u},u.uuid)},"form_elements_"+d))})},`pannel-tab-${c}`))}),(t===z1||t===F0||t===ep)&&o.jsx(fr,{header:"Layout",children:tQ.map((l,c)=>o.jsx(li,{header:l==null?void 0:l.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:l==null?void 0:l.items.map((u,d)=>o.jsx("div",{className:"col-6",children:o.jsx(Nh,{data:u},u.uuid)},"form_elements_"+d))})},`pannel-tab-${c}`))}),t===Y1&&o.jsx(fr,{header:"Question Bank",children:o.jsxs("div",{className:"grid",children:[o.jsx("div",{className:"col-12",children:ZY.map((l,c)=>o.jsx("div",{className:"grid",children:l==null?void 0:l.items.map((u,d)=>{const f=_t.cloneDeep(u);return o.jsx("div",{className:"col-6",children:o.jsx(Nh,{data:f},u.uuid)},"form_elements_"+d)})},`new-quiz-${c}`))}),o.jsx("div",{className:"col-12 ",children:o.jsxs("div",{className:"p-inputgroup",children:[o.jsx(gn,{placeholder:"Keyword"}),o.jsx(Pt,{icon:"pi pi-search",className:"p-button-info"})]})})]})}),t===pm&&o.jsx(fr,{header:"Training",children:rQ.map((l,c)=>o.jsx(li,{header:l==null?void 0:l.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:l==null?void 0:l.items.map((u,d)=>o.jsx("div",{className:"col-6",children:o.jsx(Nh,{data:u},u.uuid)},"form_elements_"+d))})},`pannel-tab-${c}`))}),(t===z1||t===F0||t===ep)&&o.jsxs(fr,{header:"Custom",children:[o.jsx("h6",{children:"Custom Sections"}),o.jsx("div",{className:"grid"}),o.jsx("h6",{children:"Custom Matrix"}),o.jsx("div",{className:"grid"})]})]})})};function bj(t){return t}function bCe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var yCe=800,ACe=16,wCe=Date.now;function SCe(t){var e=0,n=0;return function(){var r=wCe(),i=ACe-(r-n);if(n=r,i>0){if(++e>=yCe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function xCe(t){return function(){return t}}var CCe=_3?function(t,e){return _3(t,"toString",{configurable:!0,enumerable:!1,value:xCe(e),writable:!0})}:bj,TCe=SCe(CCe),yj=Math.max;function ECe(t,e,n){return e=yj(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=yj(r.length-e,0),s=Array(a);++i<a;)s[i]=r[e+i];i=-1;for(var l=Array(e+1);++i<e;)l[i]=r[i];return l[e]=n(s),bCe(t,this,l)}}function ICe(t,e){return TCe(ECe(t,e,bj),t+"")}function _Ce(t,e,n){if(!Wd(n))return!1;var r=typeof e;return(r=="number"?D3(n)&&yO(e,n.length):r=="string"&&e in n)?Rp(n[e],t):!1}function DCe(t){return ICe(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,s&&_Ce(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var l=n[r];l&&t(e,l,r,a)}return e})}var OCe="__lodash_hash_undefined__";function NCe(t){return this.__data__.set(t,OCe),this}function FCe(t){return this.__data__.has(t)}function M5(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Qu;++e<n;)this.add(t[e])}M5.prototype.add=M5.prototype.push=NCe,M5.prototype.has=FCe;function PCe(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function kCe(t,e){return t.has(e)}var MCe=1,LCe=2;function Aj(t,e,n,r,i,a){var s=n&MCe,l=t.length,c=e.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(t),d=a.get(e);if(u&&d)return u==e&&d==t;var f=-1,h=!0,m=n&LCe?new M5:void 0;for(a.set(t,e),a.set(e,t);++f<l;){var g=t[f],v=e[f];if(r)var A=s?r(v,g,f,e,t,a):r(g,v,f,t,e,a);if(A!==void 0){if(A)continue;h=!1;break}if(m){if(!PCe(e,function(S,x){if(!kCe(m,x)&&(g===S||i(g,S,n,r,a)))return m.push(x)})){h=!1;break}}else if(!(g===v||i(g,v,n,r,a))){h=!1;break}}return a.delete(t),a.delete(e),h}function BCe(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function VCe(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var UCe=1,qCe=2,$Ce="[object Boolean]",jCe="[object Date]",zCe="[object Error]",HCe="[object Map]",YCe="[object Number]",KCe="[object RegExp]",XCe="[object Set]",GCe="[object String]",RCe="[object Symbol]",WCe="[object ArrayBuffer]",QCe="[object DataView]",wj=iu?iu.prototype:void 0,OS=wj?wj.valueOf:void 0;function JCe(t,e,n,r,i,a,s){switch(n){case QCe:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case WCe:return!(t.byteLength!=e.byteLength||!a(new O3(t),new O3(e)));case $Ce:case jCe:case YCe:return Rp(+t,+e);case zCe:return t.name==e.name&&t.message==e.message;case KCe:case GCe:return t==e+"";case HCe:var l=BCe;case XCe:var c=r&UCe;if(l||(l=VCe),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;r|=qCe,s.set(t,e);var d=Aj(l(t),l(e),r,i,a,s);return s.delete(t),d;case RCe:if(OS)return OS.call(t)==OS.call(e)}return!1}var ZCe=1,eTe=Object.prototype,tTe=eTe.hasOwnProperty;function nTe(t,e,n,r,i,a){var s=n&ZCe,l=C7(t),c=l.length,u=C7(e),d=u.length;if(c!=d&&!s)return!1;for(var f=c;f--;){var h=l[f];if(!(s?h in e:tTe.call(e,h)))return!1}var m=a.get(t),g=a.get(e);if(m&&g)return m==e&&g==t;var v=!0;a.set(t,e),a.set(e,t);for(var A=s;++f<c;){h=l[f];var S=t[h],x=e[h];if(r)var w=s?r(x,S,h,e,t,a):r(S,x,h,t,e,a);if(!(w===void 0?S===x||i(S,x,n,r,a):w)){v=!1;break}A||(A=h=="constructor")}if(v&&!A){var T=t.constructor,C=e.constructor;T!=C&&"constructor"in t&&"constructor"in e&&!(typeof T=="function"&&T instanceof T&&typeof C=="function"&&C instanceof C)&&(v=!1)}return a.delete(t),a.delete(e),v}var rTe=1,Sj="[object Arguments]",xj="[object Array]",L5="[object Object]",iTe=Object.prototype,Cj=iTe.hasOwnProperty;function aTe(t,e,n,r,i,a){var s=Ju(t),l=Ju(e),c=s?xj:n2(t),u=l?xj:n2(e);c=c==Sj?L5:c,u=u==Sj?L5:u;var d=c==L5,f=u==L5,h=c==u;if(h&&Zp(t)){if(!Zp(e))return!1;s=!0,d=!1}if(h&&!d)return a||(a=new su),s||y7(t)?Aj(t,e,n,r,i,a):JCe(t,e,c,n,r,i,a);if(!(n&rTe)){var m=d&&Cj.call(t,"__wrapped__"),g=f&&Cj.call(e,"__wrapped__");if(m||g){var v=m?t.value():t,A=g?e.value():e;return a||(a=new su),i(v,A,n,r,a)}}return h?(a||(a=new su),nTe(t,e,n,r,i,a)):!1}function Tj(t,e,n,r,i){return t===e?!0:t==null||e==null||!au(t)&&!au(e)?t!==t&&e!==e:aTe(t,e,n,r,Tj,i)}function sTe(t){return function(e,n,r){for(var i=-1,a=Object(e),s=r(e),l=s.length;l--;){var c=s[t?l:++i];if(n(a[c],c,a)===!1)break}return e}}var oTe=sTe();function NS(t,e,n){(n!==void 0&&!Rp(t[e],n)||n===void 0&&!(e in t))&&g7(t,e,n)}function lTe(t){return au(t)&&D3(t)}function FS(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function cTe(t){return Jp(t,t2(t))}function uTe(t,e,n,r,i,a,s){var l=FS(t,n),c=FS(e,n),u=s.get(c);if(u){NS(t,n,u);return}var d=a?a(l,c,n+"",t,e,s):void 0,f=d===void 0;if(f){var h=Ju(c),m=!h&&Zp(c),g=!h&&!m&&y7(c);d=c,h||m||g?Ju(l)?d=l:lTe(l)?d=S7(l):m?(f=!1,d=_O(c,!0)):g?(f=!1,d=$O(c,!0)):d=[]:f7(c)||m7(c)?(d=l,m7(l)?d=cTe(l):(!Wd(l)||h7(l))&&(d=zO(c))):f=!1}f&&(s.set(c,d),i(d,c,r,a,s),s.delete(c)),NS(t,n,d)}function Ej(t,e,n,r,i){t!==e&&oTe(e,function(a,s){if(i||(i=new su),Wd(a))uTe(t,e,s,n,Ej,r,i);else{var l=r?r(FS(t,s),a,s+"",t,e,i):void 0;l===void 0&&(l=a),NS(t,s,l)}},t2)}function PS(t,e){return Tj(t,e)}var g0=DCe(function(t,e,n){Ej(t,e,n)}),ir=(t=>(t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY",t))(ir||{});class Du{constructor(e,n,r={}){this.attrName=e,this.keyName=n;const i=ir.TYPE&ir.ATTRIBUTE;this.scope=r.scope!=null?r.scope&ir.LEVEL|i:ir.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(e){return Array.from(e.attributes).map(n=>n.name)}add(e,n){return this.canAdd(e,n)?(e.setAttribute(this.keyName,n),!0):!1}canAdd(e,n){return this.whitelist==null?!0:typeof n=="string"?this.whitelist.indexOf(n.replace(/["']/g,""))>-1:this.whitelist.indexOf(n)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const n=e.getAttribute(this.keyName);return this.canAdd(e,n)&&n?n:""}}class Fh extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const Ij=class mC{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,n=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(n){let r=null;try{r=e.parentNode}catch{return null}return this.find(r,n)}return null}create(e,n,r){const i=this.query(n);if(i==null)throw new Fh(`Unable to create ${n} blot`);const a=i,s=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:a.create(r),l=new a(e,s,r);return mC.blots.set(l.domNode,l),l}find(e,n=!1){return mC.find(e,n)}query(e,n=ir.ANY){let r;return typeof e=="string"?r=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?r=this.types.text:typeof e=="number"?e&ir.LEVEL&ir.BLOCK?r=this.types.block:e&ir.LEVEL&ir.INLINE&&(r=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(i=>(r=this.classes[i],!!r)),r=r||this.tags[e.tagName]),r==null?null:"scope"in r&&n&ir.LEVEL&r.scope&&n&ir.TYPE&r.scope?r:null}register(...e){return e.map(n=>{const r="blotName"in n,i="attrName"in n;if(!r&&!i)throw new Fh("Invalid definition");if(r&&n.blotName==="abstract")throw new Fh("Cannot register abstract class");const a=r?n.blotName:i?n.attrName:void 0;return this.types[a]=n,i?typeof n.keyName=="string"&&(this.attributes[n.keyName]=n):r&&(n.className&&(this.classes[n.className]=n),n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map(s=>s.toUpperCase()):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEach(s=>{(this.tags[s]==null||n.className==null)&&(this.tags[s]=n)}))),n})}};Ij.blots=new WeakMap;let Ph=Ij;function _j(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter(n=>n.indexOf(`${e}-`)===0)}class dTe extends Du{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(n=>n.split("-").slice(0,-1).join("-"))}add(e,n){return this.canAdd(e,n)?(this.remove(e),e.classList.add(`${this.keyName}-${n}`),!0):!1}remove(e){_j(e,this.keyName).forEach(n=>{e.classList.remove(n)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const n=(_j(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,n)?n:""}}const $c=dTe;function kS(t){const e=t.split("-"),n=e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return e[0]+n}class fTe extends Du{static keys(e){return(e.getAttribute("style")||"").split(";").map(n=>n.split(":")[0].trim())}add(e,n){return this.canAdd(e,n)?(e.style[kS(this.keyName)]=n,!0):!1}remove(e){e.style[kS(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const n=e.style[kS(this.keyName)];return this.canAdd(e,n)?n:""}}const m0=fTe;class hTe{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,n){n?e.add(this.domNode,n)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=Ph.find(this.domNode);if(e==null)return;const n=Du.keys(this.domNode),r=$c.keys(this.domNode),i=m0.keys(this.domNode);n.concat(r).concat(i).forEach(a=>{const s=e.scroll.query(a,ir.ATTRIBUTE);s instanceof Du&&(this.attributes[s.attrName]=s)})}copy(e){Object.keys(this.attributes).forEach(n=>{const r=this.attributes[n].value(this.domNode);e.format(n,r)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(n=>{this.attributes[n].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,n)=>(e[n]=this.attributes[n].value(this.domNode),e),{})}}const B5=hTe,Dj=class{constructor(e,n){this.scroll=e,this.domNode=n,Ph.blots.set(n,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new Fh("Blot definition missing tagName");let n,r;return Array.isArray(this.tagName)?(typeof e=="string"?(r=e.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof e=="number"&&(r=e),typeof r=="number"?n=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?n=document.createElement(r):n=document.createElement(this.tagName[0])):n=document.createElement(this.tagName),this.className&&n.classList.add(this.className),n}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),Ph.blots.delete(this.domNode)}deleteAt(e,n){this.isolate(e,n).remove()}formatAt(e,n,r,i){const a=this.isolate(e,n);if(this.scroll.query(r,ir.BLOT)!=null&&i)a.wrap(r,i);else if(this.scroll.query(r,ir.ATTRIBUTE)!=null){const s=this.scroll.create(this.statics.scope);a.wrap(s),s.format(r,i)}}insertAt(e,n,r){const i=r==null?this.scroll.create("text",n):this.scroll.create(n,r),a=this.split(e);this.parent.insertBefore(i,a||void 0)}isolate(e,n){const r=this.split(e);if(r==null)throw new Error("Attempt to isolate at end");return r.split(n),r}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,n){const r=typeof e=="string"?this.scroll.create(e,n):e;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(e,n){return e===0?this:this.next}update(e,n){}wrap(e,n){const r=typeof e=="string"?this.scroll.create(e,n):e;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new Fh(`Cannot wrap ${e}`);return r.appendChild(this),r}};Dj.blotName="abstract";let Oj=Dj;const Nj=class extends Oj{static value(e){return!0}index(e,n){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(n,1):-1}position(e,n){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Nj.scope=ir.INLINE_BLOT;const fo=Nj;class pTe{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const n=e.slice(1);this.append(...n)}}at(e){const n=this.iterator();let r=n();for(;r&&e>0;)e-=1,r=n();return r}contains(e){const n=this.iterator();let r=n();for(;r;){if(r===e)return!0;r=n()}return!1}indexOf(e){const n=this.iterator();let r=n(),i=0;for(;r;){if(r===e)return i;i+=1,r=n()}return-1}insertBefore(e,n){e!=null&&(this.remove(e),e.next=n,n!=null?(e.prev=n.prev,n.prev!=null&&(n.prev.next=e),n.prev=e,n===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let n=0,r=this.head;for(;r!=null;){if(r===e)return n;n+=r.length(),r=r.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const n=e;return e!=null&&(e=e.next),n}}find(e,n=!1){const r=this.iterator();let i=r();for(;i;){const a=i.length();if(e<a||n&&e===a&&(i.next==null||i.next.length()!==0))return[i,e];e-=a,i=r()}return[null,0]}forEach(e){const n=this.iterator();let r=n();for(;r;)e(r),r=n()}forEachAt(e,n,r){if(n<=0)return;const[i,a]=this.find(e);let s=e-a;const l=this.iterator(i);let c=l();for(;c&&s<e+n;){const u=c.length();e>s?r(c,e-s,Math.min(n,s+u-e)):r(c,0,Math.min(u,e+n-s)),s+=u,c=l()}}map(e){return this.reduce((n,r)=>(n.push(e(r)),n),[])}reduce(e,n){const r=this.iterator();let i=r();for(;i;)n=e(n,i),i=r();return n}}function Fj(t,e){const n=e.find(t);if(n)return n;try{return e.create(t)}catch{const r=e.create(ir.INLINE);return Array.from(t.childNodes).forEach(i=>{r.domNode.appendChild(i)}),t.parentNode&&t.parentNode.replaceChild(r.domNode,t),r.attach(),r}}const Pj=class O0 extends Oj{constructor(e,n){super(e,n),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,O0.uiClass&&this.uiNode.classList.add(O0.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new pTe,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const n=Fj(e,this.scroll);this.insertBefore(n,this.children.head||void 0)}catch(n){if(n instanceof Fh)return;throw n}})}deleteAt(e,n){if(e===0&&n===this.length())return this.remove();this.children.forEachAt(e,n,(r,i,a)=>{r.deleteAt(i,a)})}descendant(e,n=0){const[r,i]=this.children.find(n);return e.blotName==null&&e(r)||e.blotName!=null&&r instanceof e?[r,i]:r instanceof O0?r.descendant(e,i):[null,-1]}descendants(e,n=0,r=Number.MAX_VALUE){let i=[],a=r;return this.children.forEachAt(n,r,(s,l,c)=>{(e.blotName==null&&e(s)||e.blotName!=null&&s instanceof e)&&i.push(s),s instanceof O0&&(i=i.concat(s.descendants(e,l,a))),a-=c}),i}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(n=>{e||this.statics.allowedChildren.some(r=>n instanceof r)||(n.statics.scope===ir.BLOCK_BLOT?(n.next!=null&&this.splitAfter(n),n.prev!=null&&this.splitAfter(n.prev),n.parent.unwrap(),e=!0):n instanceof O0?n.unwrap():n.remove())})}formatAt(e,n,r,i){this.children.forEachAt(e,n,(a,s,l)=>{a.formatAt(s,l,r,i)})}insertAt(e,n,r){const[i,a]=this.children.find(e);if(i)i.insertAt(a,n,r);else{const s=r==null?this.scroll.create("text",n):this.scroll.create(n,r);this.appendChild(s)}}insertBefore(e,n){e.parent!=null&&e.parent.children.remove(e);let r=null;this.children.insertBefore(e,n||null),e.parent=this,n!=null&&(r=n.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(e.domNode,r),e.attach()}length(){return this.children.reduce((e,n)=>e+n.length(),0)}moveChildren(e,n){this.children.forEach(r=>{e.insertBefore(r,n)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n)}else this.remove()}path(e,n=!1){const[r,i]=this.children.find(e,n),a=[[this,e]];return r instanceof O0?a.concat(r.path(i,n)):(r!=null&&a.push([r,i]),a)}removeChild(e){this.children.remove(e)}replaceWith(e,n){const r=typeof e=="string"?this.scroll.create(e,n):e;return r instanceof O0&&this.moveChildren(r),super.replaceWith(r)}split(e,n=!1){if(!n){if(e===0)return this;if(e===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(e,this.length(),(i,a,s)=>{const l=i.split(a,n);l!=null&&r.appendChild(l)}),r}splitAfter(e){const n=this.clone();for(;e.next!=null;)n.appendChild(e.next);return this.parent&&this.parent.insertBefore(n,this.next||void 0),n}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,n){const r=[],i=[];e.forEach(a=>{a.target===this.domNode&&a.type==="childList"&&(r.push(...a.addedNodes),i.push(...a.removedNodes))}),i.forEach(a=>{if(a.parentNode!=null&&a.tagName!=="IFRAME"&&document.body.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const s=this.scroll.find(a);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(a=>a.parentNode===this.domNode&&a!==this.uiNode).sort((a,s)=>a===s?0:a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(a=>{let s=null;a.nextSibling!=null&&(s=this.scroll.find(a.nextSibling));const l=Fj(a,this.scroll);(l.next!==s||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,s||void 0))}),this.enforceAllowedChildren()}};Pj.uiClass="";const jc=Pj;function gTe(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}const kh=class Zh extends jc{static create(e){return super.create(e)}static formats(e,n){const r=n.query(Zh.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,n){super(e,n),this.attributes=new B5(this.domNode)}format(e,n){if(e===this.statics.blotName&&!n)this.children.forEach(r=>{r instanceof Zh||(r=r.wrap(Zh.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(e,ir.INLINE);if(r==null)return;r instanceof Du?this.attributes.attribute(r,n):n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n)}}formats(){const e=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(e[this.statics.blotName]=n),e}formatAt(e,n,r,i){this.formats()[r]!=null||this.scroll.query(r,ir.ATTRIBUTE)?this.isolate(e,n).format(r,i):super.formatAt(e,n,r,i)}optimize(e){super.optimize(e);const n=this.formats();if(Object.keys(n).length===0)return this.unwrap();const r=this.next;r instanceof Zh&&r.prev===this&&gTe(n,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(e,n){const r=super.replaceWith(e,n);return this.attributes.copy(r),r}update(e,n){super.update(e,n),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(e,n){const r=super.wrap(e,n);return r instanceof Zh&&this.attributes.move(r),r}};kh.allowedChildren=[kh,fo],kh.blotName="inline",kh.scope=ir.INLINE_BLOT,kh.tagName="SPAN";const MS=kh,Mh=class vC extends jc{static create(e){return super.create(e)}static formats(e,n){const r=n.query(vC.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,n){super(e,n),this.attributes=new B5(this.domNode)}format(e,n){const r=this.scroll.query(e,ir.BLOCK);r!=null&&(r instanceof Du?this.attributes.attribute(r,n):e===this.statics.blotName&&!n?this.replaceWith(vC.blotName):n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n))}formats(){const e=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(e[this.statics.blotName]=n),e}formatAt(e,n,r,i){this.scroll.query(r,ir.BLOCK)!=null?this.format(r,i):super.formatAt(e,n,r,i)}insertAt(e,n,r){if(r==null||this.scroll.query(n,ir.INLINE)!=null)super.insertAt(e,n,r);else{const i=this.split(e);if(i!=null){const a=this.scroll.create(n,r);i.parent.insertBefore(a,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,n){const r=super.replaceWith(e,n);return this.attributes.copy(r),r}update(e,n){super.update(e,n),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Mh.blotName="block",Mh.scope=ir.BLOCK_BLOT,Mh.tagName="P",Mh.allowedChildren=[MS,Mh,fo];const Pg=Mh,LS=class extends jc{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,n){super.deleteAt(e,n),this.enforceAllowedChildren()}formatAt(e,n,r,i){super.formatAt(e,n,r,i),this.enforceAllowedChildren()}insertAt(e,n,r){super.insertAt(e,n,r),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};LS.blotName="container",LS.scope=ir.BLOCK_BLOT;const V5=LS;class mTe extends fo{static formats(e,n){}format(e,n){super.formatAt(0,this.length(),e,n)}formatAt(e,n,r,i){e===0&&n===this.length()?this.format(r,i):super.formatAt(e,n,r,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const xl=mTe,vTe={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},bTe=100,Lh=class extends jc{constructor(e,n){super(null,n),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,vTe),this.attach()}create(e,n){return this.registry.create(this,e,n)}find(e,n=!1){const r=this.registry.find(e,n);return r?r.scroll===this?r:n?this.find(r.scroll.domNode.parentNode,!0):null:null}query(e,n=ir.ANY){return this.registry.query(e,n)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,n){this.update(),e===0&&n===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(e,n)}formatAt(e,n,r,i){this.update(),super.formatAt(e,n,r,i)}insertAt(e,n,r){this.update(),super.insertAt(e,n,r)}optimize(e=[],n={}){super.optimize(n);const r=n.mutationsMap||new WeakMap;let i=Array.from(this.observer.takeRecords());for(;i.length>0;)e.push(i.pop());const a=(c,u=!0)=>{c==null||c===this||c.domNode.parentNode!=null&&(r.has(c.domNode)||r.set(c.domNode,[]),u&&a(c.parent))},s=c=>{r.has(c.domNode)&&(c instanceof jc&&c.children.forEach(s),r.delete(c.domNode),c.optimize(n))};let l=e;for(let c=0;l.length>0;c+=1){if(c>=bTe)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(u=>{const d=this.find(u.target,!0);d!=null&&(d.domNode===u.target&&(u.type==="childList"?(a(this.find(u.previousSibling,!1)),Array.from(u.addedNodes).forEach(f=>{const h=this.find(f,!1);a(h,!1),h instanceof jc&&h.children.forEach(m=>{a(m,!1)})})):u.type==="attributes"&&a(d.prev)),a(d))}),this.children.forEach(s),l=Array.from(this.observer.takeRecords()),i=l.slice();i.length>0;)e.push(i.pop())}}update(e,n={}){e=e||this.observer.takeRecords();const r=new WeakMap;e.map(i=>{const a=this.find(i.target,!0);return a==null?null:r.has(a.domNode)?(r.get(a.domNode).push(i),null):(r.set(a.domNode,[i]),a)}).forEach(i=>{i!=null&&i!==this&&r.has(i.domNode)&&i.update(r.get(i.domNode)||[],n)}),n.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),n),this.optimize(e,n)}};Lh.blotName="scroll",Lh.defaultChild=Pg,Lh.allowedChildren=[Pg,V5],Lh.scope=ir.BLOCK_BLOT,Lh.tagName="DIV";const BS=Lh,VS=class TY extends fo{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,n){super(e,n),this.text=this.statics.value(this.domNode)}deleteAt(e,n){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+n)}index(e,n){return this.domNode===e?n:-1}insertAt(e,n,r){r==null?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,n,r)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof TY&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,n=!1){return[this.domNode,e]}split(e,n=!1){if(!n){if(e===0)return this;if(e===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(e,n){e.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};VS.blotName="text",VS.scope=ir.INLINE_BLOT;const U5=VS,kj=Object.freeze(Object.defineProperty({__proto__:null,Attributor:Du,AttributorStore:B5,BlockBlot:Pg,ClassAttributor:$c,ContainerBlot:V5,EmbedBlot:xl,InlineBlot:MS,LeafBlot:fo,ParentBlot:jc,Registry:Ph,Scope:ir,ScrollBlot:BS,StyleAttributor:m0,TextBlot:U5},Symbol.toStringTag,{value:"Module"}));var US={exports:{}},Cl=-1,ko=1,As=0;function kg(t,e,n,r,i){if(t===e)return t?[[As,t]]:[];if(n!=null){var a=ITe(t,e,n);if(a)return a}var s=qS(t,e),l=t.substring(0,s);t=t.substring(s),e=e.substring(s),s=q5(t,e);var c=t.substring(t.length-s);t=t.substring(0,t.length-s),e=e.substring(0,e.length-s);var u=yTe(t,e);return l&&u.unshift([As,l]),c&&u.push([As,c]),$S(u,i),r&&STe(u),u}function yTe(t,e){var n;if(!t)return[[ko,e]];if(!e)return[[Cl,t]];var r=t.length>e.length?t:e,i=t.length>e.length?e:t,a=r.indexOf(i);if(a!==-1)return n=[[ko,r.substring(0,a)],[As,i],[ko,r.substring(a+i.length)]],t.length>e.length&&(n[0][0]=n[2][0]=Cl),n;if(i.length===1)return[[Cl,t],[ko,e]];var s=wTe(t,e);if(s){var l=s[0],c=s[1],u=s[2],d=s[3],f=s[4],h=kg(l,u),m=kg(c,d);return h.concat([[As,f]],m)}return ATe(t,e)}function ATe(t,e){for(var n=t.length,r=e.length,i=Math.ceil((n+r)/2),a=i,s=2*i,l=new Array(s),c=new Array(s),u=0;u<s;u++)l[u]=-1,c[u]=-1;l[a+1]=0,c[a+1]=0;for(var d=n-r,f=d%2!==0,h=0,m=0,g=0,v=0,A=0;A<i;A++){for(var S=-A+h;S<=A-m;S+=2){var x=a+S,w;S===-A||S!==A&&l[x-1]<l[x+1]?w=l[x+1]:w=l[x-1]+1;for(var T=w-S;w<n&&T<r&&t.charAt(w)===e.charAt(T);)w++,T++;if(l[x]=w,w>n)m+=2;else if(T>r)h+=2;else if(f){var C=a+d-S;if(C>=0&&C<s&&c[C]!==-1){var _=n-c[C];if(w>=_)return Mj(t,e,w,T)}}}for(var E=-A+g;E<=A-v;E+=2){var C=a+E,_;E===-A||E!==A&&c[C-1]<c[C+1]?_=c[C+1]:_=c[C-1]+1;for(var D=_-E;_<n&&D<r&&t.charAt(n-_-1)===e.charAt(r-D-1);)_++,D++;if(c[C]=_,_>n)v+=2;else if(D>r)g+=2;else if(!f){var x=a+d-E;if(x>=0&&x<s&&l[x]!==-1){var w=l[x],T=a+w-x;if(_=n-_,w>=_)return Mj(t,e,w,T)}}}}return[[Cl,t],[ko,e]]}function Mj(t,e,n,r){var i=t.substring(0,n),a=e.substring(0,r),s=t.substring(n),l=e.substring(r),c=kg(i,a),u=kg(s,l);return c.concat(u)}function qS(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,a=0;n<i;)t.substring(a,i)==e.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return qj(t.charCodeAt(i-1))&&i--,i}function Lj(t,e){var n=t.length,r=e.length;if(n==0||r==0)return 0;n>r?t=t.substring(n-r):n<r&&(e=e.substring(0,n));var i=Math.min(n,r);if(t==e)return i;for(var a=0,s=1;;){var l=t.substring(i-s),c=e.indexOf(l);if(c==-1)return a;s+=c,(c==0||t.substring(i-s)==e.substring(0,s))&&(a=s,s++)}}function q5(t,e){if(!t||!e||t.slice(-1)!==e.slice(-1))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,a=0;n<i;)t.substring(t.length-i,t.length-a)==e.substring(e.length-i,e.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return $j(t.charCodeAt(t.length-i))&&i--,i}function wTe(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||r.length*2<n.length)return null;function i(m,g,v){for(var A=m.substring(v,v+Math.floor(m.length/4)),S=-1,x="",w,T,C,_;(S=g.indexOf(A,S+1))!==-1;){var E=qS(m.substring(v),g.substring(S)),D=q5(m.substring(0,v),g.substring(0,S));x.length<D+E&&(x=g.substring(S-D,S)+g.substring(S,S+E),w=m.substring(0,v-D),T=m.substring(v+E),C=g.substring(0,S-D),_=g.substring(S+E))}return x.length*2>=m.length?[w,T,C,_,x]:null}var a=i(n,r,Math.ceil(n.length/4)),s=i(n,r,Math.ceil(n.length/2)),l;if(!a&&!s)return null;s?a?l=a[4].length>s[4].length?a:s:l=s:l=a;var c,u,d,f;t.length>e.length?(c=l[0],u=l[1],d=l[2],f=l[3]):(d=l[0],f=l[1],c=l[2],u=l[3]);var h=l[4];return[c,u,d,f,h]}function STe(t){for(var e=!1,n=[],r=0,i=null,a=0,s=0,l=0,c=0,u=0;a<t.length;)t[a][0]==As?(n[r++]=a,s=c,l=u,c=0,u=0,i=t[a][1]):(t[a][0]==ko?c+=t[a][1].length:u+=t[a][1].length,i&&i.length<=Math.max(s,l)&&i.length<=Math.max(c,u)&&(t.splice(n[r-1],0,[Cl,i]),t[n[r-1]+1][0]=ko,r--,r--,a=r>0?n[r-1]:-1,s=0,l=0,c=0,u=0,i=null,e=!0)),a++;for(e&&$S(t),TTe(t),a=1;a<t.length;){if(t[a-1][0]==Cl&&t[a][0]==ko){var d=t[a-1][1],f=t[a][1],h=Lj(d,f),m=Lj(f,d);h>=m?(h>=d.length/2||h>=f.length/2)&&(t.splice(a,0,[As,f.substring(0,h)]),t[a-1][1]=d.substring(0,d.length-h),t[a+1][1]=f.substring(h),a++):(m>=d.length/2||m>=f.length/2)&&(t.splice(a,0,[As,d.substring(0,m)]),t[a-1][0]=ko,t[a-1][1]=f.substring(0,f.length-m),t[a+1][0]=Cl,t[a+1][1]=d.substring(m),a++),a++}a++}}var Bj=/[^a-zA-Z0-9]/,Vj=/\s/,Uj=/[\r\n]/,xTe=/\n\r?\n$/,CTe=/^\r?\n\r?\n/;function TTe(t){function e(m,g){if(!m||!g)return 6;var v=m.charAt(m.length-1),A=g.charAt(0),S=v.match(Bj),x=A.match(Bj),w=S&&v.match(Vj),T=x&&A.match(Vj),C=w&&v.match(Uj),_=T&&A.match(Uj),E=C&&m.match(xTe),D=_&&g.match(CTe);return E||D?5:C||_?4:S&&!w&&T?3:w||T?2:S||x?1:0}for(var n=1;n<t.length-1;){if(t[n-1][0]==As&&t[n+1][0]==As){var r=t[n-1][1],i=t[n][1],a=t[n+1][1],s=q5(r,i);if(s){var l=i.substring(i.length-s);r=r.substring(0,r.length-s),i=l+i.substring(0,i.length-s),a=l+a}for(var c=r,u=i,d=a,f=e(r,i)+e(i,a);i.charAt(0)===a.charAt(0);){r+=i.charAt(0),i=i.substring(1)+a.charAt(0),a=a.substring(1);var h=e(r,i)+e(i,a);h>=f&&(f=h,c=r,u=i,d=a)}t[n-1][1]!=c&&(c?t[n-1][1]=c:(t.splice(n-1,1),n--),t[n][1]=u,d?t[n+1][1]=d:(t.splice(n+1,1),n--))}n++}}function $S(t,e){t.push([As,""]);for(var n=0,r=0,i=0,a="",s="",l;n<t.length;){if(n<t.length-1&&!t[n][1]){t.splice(n,1);continue}switch(t[n][0]){case ko:i++,s+=t[n][1],n++;break;case Cl:r++,a+=t[n][1],n++;break;case As:var c=n-i-r-1;if(e){if(c>=0&&zj(t[c][1])){var u=t[c][1].slice(-1);if(t[c][1]=t[c][1].slice(0,-1),a=u+a,s=u+s,!t[c][1]){t.splice(c,1),n--;var d=c-1;t[d]&&t[d][0]===ko&&(i++,s=t[d][1]+s,d--),t[d]&&t[d][0]===Cl&&(r++,a=t[d][1]+a,d--),c=d}}if(jj(t[n][1])){var u=t[n][1].charAt(0);t[n][1]=t[n][1].slice(1),a+=u,s+=u}}if(n<t.length-1&&!t[n][1]){t.splice(n,1);break}if(a.length>0||s.length>0){a.length>0&&s.length>0&&(l=qS(s,a),l!==0&&(c>=0?t[c][1]+=s.substring(0,l):(t.splice(0,0,[As,s.substring(0,l)]),n++),s=s.substring(l),a=a.substring(l)),l=q5(s,a),l!==0&&(t[n][1]=s.substring(s.length-l)+t[n][1],s=s.substring(0,s.length-l),a=a.substring(0,a.length-l)));var f=i+r;a.length===0&&s.length===0?(t.splice(n-f,f),n=n-f):a.length===0?(t.splice(n-f,f,[ko,s]),n=n-f+1):s.length===0?(t.splice(n-f,f,[Cl,a]),n=n-f+1):(t.splice(n-f,f,[Cl,a],[ko,s]),n=n-f+2)}n!==0&&t[n-1][0]===As?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,i=0,r=0,a="",s="";break}}t[t.length-1][1]===""&&t.pop();var h=!1;for(n=1;n<t.length-1;)t[n-1][0]===As&&t[n+1][0]===As&&(t[n][1].substring(t[n][1].length-t[n-1][1].length)===t[n-1][1]?(t[n][1]=t[n-1][1]+t[n][1].substring(0,t[n][1].length-t[n-1][1].length),t[n+1][1]=t[n-1][1]+t[n+1][1],t.splice(n-1,1),h=!0):t[n][1].substring(0,t[n+1][1].length)==t[n+1][1]&&(t[n-1][1]+=t[n+1][1],t[n][1]=t[n][1].substring(t[n+1][1].length)+t[n+1][1],t.splice(n+1,1),h=!0)),n++;h&&$S(t,e)}function qj(t){return t>=55296&&t<=56319}function $j(t){return t>=56320&&t<=57343}function jj(t){return $j(t.charCodeAt(0))}function zj(t){return qj(t.charCodeAt(t.length-1))}function ETe(t){for(var e=[],n=0;n<t.length;n++)t[n][1].length>0&&e.push(t[n]);return e}function jS(t,e,n,r){return zj(t)||jj(r)?null:ETe([[As,t],[Cl,e],[ko,n],[As,r]])}function ITe(t,e,n){var r=typeof n=="number"?{index:n,length:0}:n.oldRange,i=typeof n=="number"?null:n.newRange,a=t.length,s=e.length;if(r.length===0&&(i===null||i.length===0)){var l=r.index,c=t.slice(0,l),u=t.slice(l),d=i?i.index:null;e:{var f=l+s-a;if(d!==null&&d!==f||f<0||f>s)break e;var h=e.slice(0,f),m=e.slice(f);if(m!==u)break e;var g=Math.min(l,f),v=c.slice(0,g),A=h.slice(0,g);if(v!==A)break e;var S=c.slice(g),x=h.slice(g);return jS(v,S,x,u)}e:{if(d!==null&&d!==l)break e;var w=l,h=e.slice(0,w),m=e.slice(w);if(h!==c)break e;var T=Math.min(a-w,s-w),C=u.slice(u.length-T),_=m.slice(m.length-T);if(C!==_)break e;var S=u.slice(0,u.length-T),x=m.slice(0,m.length-T);return jS(c,S,x,C)}}if(r.length>0&&i&&i.length===0)e:{var v=t.slice(0,r.index),C=t.slice(r.index+r.length),g=v.length,T=C.length;if(s<g+T)break e;var A=e.slice(0,g),_=e.slice(s-T);if(v!==A||C!==_)break e;var S=t.slice(g,a-T),x=e.slice(g,s-T);return jS(v,S,x,C)}return null}function $5(t,e,n,r){return kg(t,e,n,r,!0)}$5.INSERT=ko,$5.DELETE=Cl,$5.EQUAL=As;var _Te=$5,j5={exports:{}};j5.exports,function(t,e){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,a="[object Arguments]",s="[object Array]",l="[object Boolean]",c="[object Date]",u="[object Error]",d="[object Function]",f="[object GeneratorFunction]",h="[object Map]",m="[object Number]",g="[object Object]",v="[object Promise]",A="[object RegExp]",S="[object Set]",x="[object String]",w="[object Symbol]",T="[object WeakMap]",C="[object ArrayBuffer]",_="[object DataView]",E="[object Float32Array]",D="[object Float64Array]",B="[object Int8Array]",k="[object Int16Array]",P="[object Int32Array]",j="[object Uint8Array]",M="[object Uint8ClampedArray]",H="[object Uint16Array]",de="[object Uint32Array]",fe=/[\\^$.*+?()[\]{}|]/g,ee=/\w*$/,G=/^\[object .+?Constructor\]$/,ae=/^(?:0|[1-9]\d*)$/,Y={};Y[a]=Y[s]=Y[C]=Y[_]=Y[l]=Y[c]=Y[E]=Y[D]=Y[B]=Y[k]=Y[P]=Y[h]=Y[m]=Y[g]=Y[A]=Y[S]=Y[x]=Y[w]=Y[j]=Y[M]=Y[H]=Y[de]=!0,Y[u]=Y[d]=Y[T]=!1;var ge=typeof Oi=="object"&&Oi&&Oi.Object===Object&&Oi,ne=typeof self=="object"&&self&&self.Object===Object&&self,J=ge||ne||Function("return this")(),K=e&&!e.nodeType&&e,oe=K&&!0&&t&&!t.nodeType&&t,ve=oe&&oe.exports===K;function Ce(Z,Fe){return Z.set(Fe[0],Fe[1]),Z}function Se(Z,Fe){return Z.add(Fe),Z}function Te(Z,Fe){for(var tt=-1,Lt=Z?Z.length:0;++tt<Lt&&Fe(Z[tt],tt,Z)!==!1;);return Z}function De(Z,Fe){for(var tt=-1,Lt=Fe.length,or=Z.length;++tt<Lt;)Z[or+tt]=Fe[tt];return Z}function ie(Z,Fe,tt,Lt){var or=-1,Rn=Z?Z.length:0;for(Lt&&Rn&&(tt=Z[++or]);++or<Rn;)tt=Fe(tt,Z[or],or,Z);return tt}function U(Z,Fe){for(var tt=-1,Lt=Array(Z);++tt<Z;)Lt[tt]=Fe(tt);return Lt}function re(Z,Fe){return Z==null?void 0:Z[Fe]}function Q(Z){var Fe=!1;if(Z!=null&&typeof Z.toString!="function")try{Fe=!!(Z+"")}catch{}return Fe}function se(Z){var Fe=-1,tt=Array(Z.size);return Z.forEach(function(Lt,or){tt[++Fe]=[or,Lt]}),tt}function be(Z,Fe){return function(tt){return Z(Fe(tt))}}function me(Z){var Fe=-1,tt=Array(Z.size);return Z.forEach(function(Lt){tt[++Fe]=Lt}),tt}var ye=Array.prototype,Ie=Function.prototype,Ee=Object.prototype,he=J["__core-js_shared__"],V=function(){var Z=/[^.]+$/.exec(he&&he.keys&&he.keys.IE_PROTO||"");return Z?"Symbol(src)_1."+Z:""}(),te=Ie.toString,W=Ee.hasOwnProperty,ue=Ee.toString,Ae=RegExp("^"+te.call(W).replace(fe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pe=ve?J.Buffer:void 0,ke=J.Symbol,Le=J.Uint8Array,We=be(Object.getPrototypeOf,Object),gt=Object.create,At=Ee.propertyIsEnumerable,st=ye.splice,Je=Object.getOwnPropertySymbols,Ct=pe?pe.isBuffer:void 0,mt=be(Object.keys,Object),Ge=en(J,"DataView"),Tt=en(J,"Map"),Gt=en(J,"Promise"),xn=en(J,"Set"),bn=en(J,"WeakMap"),wn=en(Object,"create"),yn=Dn(Ge),Gn=Dn(Tt),On=Dn(Gt),qt=Dn(xn),at=Dn(bn),et=ke?ke.prototype:void 0,ut=et?et.valueOf:void 0;function Ht(Z){var Fe=-1,tt=Z?Z.length:0;for(this.clear();++Fe<tt;){var Lt=Z[Fe];this.set(Lt[0],Lt[1])}}function Nn(){this.__data__=wn?wn(null):{}}function Vn(Z){return this.has(Z)&&delete this.__data__[Z]}function er(Z){var Fe=this.__data__;if(wn){var tt=Fe[Z];return tt===r?void 0:tt}return W.call(Fe,Z)?Fe[Z]:void 0}function pr(Z){var Fe=this.__data__;return wn?Fe[Z]!==void 0:W.call(Fe,Z)}function tr(Z,Fe){var tt=this.__data__;return tt[Z]=wn&&Fe===void 0?r:Fe,this}Ht.prototype.clear=Nn,Ht.prototype.delete=Vn,Ht.prototype.get=er,Ht.prototype.has=pr,Ht.prototype.set=tr;function Cr(Z){var Fe=-1,tt=Z?Z.length:0;for(this.clear();++Fe<tt;){var Lt=Z[Fe];this.set(Lt[0],Lt[1])}}function Mr(){this.__data__=[]}function dn(Z){var Fe=this.__data__,tt=Pe(Fe,Z);if(tt<0)return!1;var Lt=Fe.length-1;return tt==Lt?Fe.pop():st.call(Fe,tt,1),!0}function lt(Z){var Fe=this.__data__,tt=Pe(Fe,Z);return tt<0?void 0:Fe[tt][1]}function ot(Z){return Pe(this.__data__,Z)>-1}function St(Z,Fe){var tt=this.__data__,Lt=Pe(tt,Z);return Lt<0?tt.push([Z,Fe]):tt[Lt][1]=Fe,this}Cr.prototype.clear=Mr,Cr.prototype.delete=dn,Cr.prototype.get=lt,Cr.prototype.has=ot,Cr.prototype.set=St;function Bt(Z){var Fe=-1,tt=Z?Z.length:0;for(this.clear();++Fe<tt;){var Lt=Z[Fe];this.set(Lt[0],Lt[1])}}function Vt(){this.__data__={hash:new Ht,map:new(Tt||Cr),string:new Ht}}function Ye(Z){return Ui(this,Z).delete(Z)}function Me(Z){return Ui(this,Z).get(Z)}function it(Z){return Ui(this,Z).has(Z)}function dt(Z,Fe){return Ui(this,Z).set(Z,Fe),this}Bt.prototype.clear=Vt,Bt.prototype.delete=Ye,Bt.prototype.get=Me,Bt.prototype.has=it,Bt.prototype.set=dt;function $t(Z){this.__data__=new Cr(Z)}function Wt(){this.__data__=new Cr}function bt(Z){return this.__data__.delete(Z)}function Be(Z){return this.__data__.get(Z)}function Ze(Z){return this.__data__.has(Z)}function Ft(Z,Fe){var tt=this.__data__;if(tt instanceof Cr){var Lt=tt.__data__;if(!Tt||Lt.length<n-1)return Lt.push([Z,Fe]),this;tt=this.__data__=new Bt(Lt)}return tt.set(Z,Fe),this}$t.prototype.clear=Wt,$t.prototype.delete=bt,$t.prototype.get=Be,$t.prototype.has=Ze,$t.prototype.set=Ft;function zt(Z,Fe){var tt=Va(Z)||ii(Z)?U(Z.length,String):[],Lt=tt.length,or=!!Lt;for(var Rn in Z)(Fe||W.call(Z,Rn))&&!(or&&(Rn=="length"||an(Rn,Lt)))&&tt.push(Rn);return tt}function wt(Z,Fe,tt){var Lt=Z[Fe];(!(W.call(Z,Fe)&&Yr(Lt,tt))||tt===void 0&&!(Fe in Z))&&(Z[Fe]=tt)}function Pe(Z,Fe){for(var tt=Z.length;tt--;)if(Yr(Z[tt][0],Fe))return tt;return-1}function Ke(Z,Fe){return Z&&Ei(Fe,po(Fe),Z)}function Et(Z,Fe,tt,Lt,or,Rn,_r){var Lr;if(Lt&&(Lr=Rn?Lt(Z,or,Rn,_r):Lt(Z)),Lr!==void 0)return Lr;if(!Ms(Z))return Z;var Pr=Va(Z);if(Pr){if(Lr=Fn(Z),!Fe)return ri(Z,Lr)}else{var Vr=Kt(Z),Zr=Vr==d||Vr==f;if(ws(Z))return Yn(Z,Fe);if(Vr==g||Vr==a||Zr&&!Rn){if(Q(Z))return Rn?Z:{};if(Lr=ar(Zr?{}:Z),!Fe)return _a(Z,Ke(Lr,Z))}else{if(!Y[Vr])return Rn?Z:{};Lr=Jr(Z,Vr,Et,Fe)}}_r||(_r=new $t);var _i=_r.get(Z);if(_i)return _i;if(_r.set(Z,Lr),!Pr)var qi=tt?Ii(Z):po(Z);return Te(qi||Z,function(Kr,Si){qi&&(Si=Kr,Kr=Z[Si]),wt(Lr,Si,Et(Kr,Fe,tt,Lt,Si,Z,_r))}),Lr}function Ut(Z){return Ms(Z)?gt(Z):{}}function Yt(Z,Fe,tt){var Lt=Fe(Z);return Va(Z)?Lt:De(Lt,tt(Z))}function Pn(Z){return ue.call(Z)}function zn(Z){if(!Ms(Z)||It(Z))return!1;var Fe=Ss(Z)||Q(Z)?Ae:G;return Fe.test(Dn(Z))}function Er(Z){if(!ln(Z))return mt(Z);var Fe=[];for(var tt in Object(Z))W.call(Z,tt)&&tt!="constructor"&&Fe.push(tt);return Fe}function Yn(Z,Fe){if(Fe)return Z.slice();var tt=new Z.constructor(Z.length);return Z.copy(tt),tt}function En(Z){var Fe=new Z.constructor(Z.byteLength);return new Le(Fe).set(new Le(Z)),Fe}function Fr(Z,Fe){var tt=Fe?En(Z.buffer):Z.buffer;return new Z.constructor(tt,Z.byteOffset,Z.byteLength)}function Kn(Z,Fe,tt){var Lt=Fe?tt(se(Z),!0):se(Z);return ie(Lt,Ce,new Z.constructor)}function cr(Z){var Fe=new Z.constructor(Z.source,ee.exec(Z));return Fe.lastIndex=Z.lastIndex,Fe}function Bn(Z,Fe,tt){var Lt=Fe?tt(me(Z),!0):me(Z);return ie(Lt,Se,new Z.constructor)}function pi(Z){return ut?Object(ut.call(Z)):{}}function ci(Z,Fe){var tt=Fe?En(Z.buffer):Z.buffer;return new Z.constructor(tt,Z.byteOffset,Z.length)}function ri(Z,Fe){var tt=-1,Lt=Z.length;for(Fe||(Fe=Array(Lt));++tt<Lt;)Fe[tt]=Z[tt];return Fe}function Ei(Z,Fe,tt,Lt){tt||(tt={});for(var or=-1,Rn=Fe.length;++or<Rn;){var _r=Fe[or],Lr=Lt?Lt(tt[_r],Z[_r],_r,tt,Z):void 0;wt(tt,_r,Lr===void 0?Z[_r]:Lr)}return tt}function _a(Z,Fe){return Ei(Z,qe(Z),Fe)}function Ii(Z){return Yt(Z,po,qe)}function Ui(Z,Fe){var tt=Z.__data__;return He(Fe)?tt[typeof Fe=="string"?"string":"hash"]:tt.map}function en(Z,Fe){var tt=re(Z,Fe);return zn(tt)?tt:void 0}var qe=Je?be(Je,Object):bi,Kt=Pn;(Ge&&Kt(new Ge(new ArrayBuffer(1)))!=_||Tt&&Kt(new Tt)!=h||Gt&&Kt(Gt.resolve())!=v||xn&&Kt(new xn)!=S||bn&&Kt(new bn)!=T)&&(Kt=function(Z){var Fe=ue.call(Z),tt=Fe==g?Z.constructor:void 0,Lt=tt?Dn(tt):void 0;if(Lt)switch(Lt){case yn:return _;case Gn:return h;case On:return v;case qt:return S;case at:return T}return Fe});function Fn(Z){var Fe=Z.length,tt=Z.constructor(Fe);return Fe&&typeof Z[0]=="string"&&W.call(Z,"index")&&(tt.index=Z.index,tt.input=Z.input),tt}function ar(Z){return typeof Z.constructor=="function"&&!ln(Z)?Ut(We(Z)):{}}function Jr(Z,Fe,tt,Lt){var or=Z.constructor;switch(Fe){case C:return En(Z);case l:case c:return new or(+Z);case _:return Fr(Z,Lt);case E:case D:case B:case k:case P:case j:case M:case H:case de:return ci(Z,Lt);case h:return Kn(Z,Lt,tt);case m:case x:return new or(Z);case A:return cr(Z);case S:return Bn(Z,Lt,tt);case w:return pi(Z)}}function an(Z,Fe){return Fe=Fe??i,!!Fe&&(typeof Z=="number"||ae.test(Z))&&Z>-1&&Z%1==0&&Z<Fe}function He(Z){var Fe=typeof Z;return Fe=="string"||Fe=="number"||Fe=="symbol"||Fe=="boolean"?Z!=="__proto__":Z===null}function It(Z){return!!V&&V in Z}function ln(Z){var Fe=Z&&Z.constructor,tt=typeof Fe=="function"&&Fe.prototype||Ee;return Z===tt}function Dn(Z){if(Z!=null){try{return te.call(Z)}catch{}try{return Z+""}catch{}}return""}function br(Z){return Et(Z,!0,!0)}function Yr(Z,Fe){return Z===Fe||Z!==Z&&Fe!==Fe}function ii(Z){return El(Z)&&W.call(Z,"callee")&&(!At.call(Z,"callee")||ue.call(Z)==a)}var Va=Array.isArray;function ds(Z){return Z!=null&&ks(Z.length)&&!Ss(Z)}function El(Z){return Il(Z)&&ds(Z)}var ws=Ct||yi;function Ss(Z){var Fe=Ms(Z)?ue.call(Z):"";return Fe==d||Fe==f}function ks(Z){return typeof Z=="number"&&Z>-1&&Z%1==0&&Z<=i}function Ms(Z){var Fe=typeof Z;return!!Z&&(Fe=="object"||Fe=="function")}function Il(Z){return!!Z&&typeof Z=="object"}function po(Z){return ds(Z)?zt(Z):Er(Z)}function bi(){return[]}function yi(){return!1}t.exports=br}(j5,j5.exports);var Hj=j5.exports,z5={exports:{}};z5.exports,function(t,e){var n=200,r="__lodash_hash_undefined__",i=1,a=2,s=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",d="[object Boolean]",f="[object Date]",h="[object Error]",m="[object Function]",g="[object GeneratorFunction]",v="[object Map]",A="[object Number]",S="[object Null]",x="[object Object]",w="[object Promise]",T="[object Proxy]",C="[object RegExp]",_="[object Set]",E="[object String]",D="[object Symbol]",B="[object Undefined]",k="[object WeakMap]",P="[object ArrayBuffer]",j="[object DataView]",M="[object Float32Array]",H="[object Float64Array]",de="[object Int8Array]",fe="[object Int16Array]",ee="[object Int32Array]",G="[object Uint8Array]",ae="[object Uint8ClampedArray]",Y="[object Uint16Array]",ge="[object Uint32Array]",ne=/[\\^$.*+?()[\]{}|]/g,J=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,oe={};oe[M]=oe[H]=oe[de]=oe[fe]=oe[ee]=oe[G]=oe[ae]=oe[Y]=oe[ge]=!0,oe[l]=oe[c]=oe[P]=oe[d]=oe[j]=oe[f]=oe[h]=oe[m]=oe[v]=oe[A]=oe[x]=oe[C]=oe[_]=oe[E]=oe[k]=!1;var ve=typeof Oi=="object"&&Oi&&Oi.Object===Object&&Oi,Ce=typeof self=="object"&&self&&self.Object===Object&&self,Se=ve||Ce||Function("return this")(),Te=e&&!e.nodeType&&e,De=Te&&!0&&t&&!t.nodeType&&t,ie=De&&De.exports===Te,U=ie&&ve.process,re=function(){try{return U&&U.binding&&U.binding("util")}catch{}}(),Q=re&&re.isTypedArray;function se(Z,Fe){for(var tt=-1,Lt=Z==null?0:Z.length,or=0,Rn=[];++tt<Lt;){var _r=Z[tt];Fe(_r,tt,Z)&&(Rn[or++]=_r)}return Rn}function be(Z,Fe){for(var tt=-1,Lt=Fe.length,or=Z.length;++tt<Lt;)Z[or+tt]=Fe[tt];return Z}function me(Z,Fe){for(var tt=-1,Lt=Z==null?0:Z.length;++tt<Lt;)if(Fe(Z[tt],tt,Z))return!0;return!1}function ye(Z,Fe){for(var tt=-1,Lt=Array(Z);++tt<Z;)Lt[tt]=Fe(tt);return Lt}function Ie(Z){return function(Fe){return Z(Fe)}}function Ee(Z,Fe){return Z.has(Fe)}function he(Z,Fe){return Z==null?void 0:Z[Fe]}function V(Z){var Fe=-1,tt=Array(Z.size);return Z.forEach(function(Lt,or){tt[++Fe]=[or,Lt]}),tt}function te(Z,Fe){return function(tt){return Z(Fe(tt))}}function W(Z){var Fe=-1,tt=Array(Z.size);return Z.forEach(function(Lt){tt[++Fe]=Lt}),tt}var ue=Array.prototype,Ae=Function.prototype,pe=Object.prototype,ke=Se["__core-js_shared__"],Le=Ae.toString,We=pe.hasOwnProperty,gt=function(){var Z=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||"");return Z?"Symbol(src)_1."+Z:""}(),At=pe.toString,st=RegExp("^"+Le.call(We).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Je=ie?Se.Buffer:void 0,Ct=Se.Symbol,mt=Se.Uint8Array,Ge=pe.propertyIsEnumerable,Tt=ue.splice,Gt=Ct?Ct.toStringTag:void 0,xn=Object.getOwnPropertySymbols,bn=Je?Je.isBuffer:void 0,wn=te(Object.keys,Object),yn=qe(Se,"DataView"),Gn=qe(Se,"Map"),On=qe(Se,"Promise"),qt=qe(Se,"Set"),at=qe(Se,"WeakMap"),et=qe(Object,"create"),ut=Dn(yn),Ht=Dn(Gn),Nn=Dn(On),Vn=Dn(qt),er=Dn(at),pr=Ct?Ct.prototype:void 0,tr=pr?pr.valueOf:void 0;function Cr(Z){var Fe=-1,tt=Z==null?0:Z.length;for(this.clear();++Fe<tt;){var Lt=Z[Fe];this.set(Lt[0],Lt[1])}}function Mr(){this.__data__=et?et(null):{},this.size=0}function dn(Z){var Fe=this.has(Z)&&delete this.__data__[Z];return this.size-=Fe?1:0,Fe}function lt(Z){var Fe=this.__data__;if(et){var tt=Fe[Z];return tt===r?void 0:tt}return We.call(Fe,Z)?Fe[Z]:void 0}function ot(Z){var Fe=this.__data__;return et?Fe[Z]!==void 0:We.call(Fe,Z)}function St(Z,Fe){var tt=this.__data__;return this.size+=this.has(Z)?0:1,tt[Z]=et&&Fe===void 0?r:Fe,this}Cr.prototype.clear=Mr,Cr.prototype.delete=dn,Cr.prototype.get=lt,Cr.prototype.has=ot,Cr.prototype.set=St;function Bt(Z){var Fe=-1,tt=Z==null?0:Z.length;for(this.clear();++Fe<tt;){var Lt=Z[Fe];this.set(Lt[0],Lt[1])}}function Vt(){this.__data__=[],this.size=0}function Ye(Z){var Fe=this.__data__,tt=Yn(Fe,Z);if(tt<0)return!1;var Lt=Fe.length-1;return tt==Lt?Fe.pop():Tt.call(Fe,tt,1),--this.size,!0}function Me(Z){var Fe=this.__data__,tt=Yn(Fe,Z);return tt<0?void 0:Fe[tt][1]}function it(Z){return Yn(this.__data__,Z)>-1}function dt(Z,Fe){var tt=this.__data__,Lt=Yn(tt,Z);return Lt<0?(++this.size,tt.push([Z,Fe])):tt[Lt][1]=Fe,this}Bt.prototype.clear=Vt,Bt.prototype.delete=Ye,Bt.prototype.get=Me,Bt.prototype.has=it,Bt.prototype.set=dt;function $t(Z){var Fe=-1,tt=Z==null?0:Z.length;for(this.clear();++Fe<tt;){var Lt=Z[Fe];this.set(Lt[0],Lt[1])}}function Wt(){this.size=0,this.__data__={hash:new Cr,map:new(Gn||Bt),string:new Cr}}function bt(Z){var Fe=en(this,Z).delete(Z);return this.size-=Fe?1:0,Fe}function Be(Z){return en(this,Z).get(Z)}function Ze(Z){return en(this,Z).has(Z)}function Ft(Z,Fe){var tt=en(this,Z),Lt=tt.size;return tt.set(Z,Fe),this.size+=tt.size==Lt?0:1,this}$t.prototype.clear=Wt,$t.prototype.delete=bt,$t.prototype.get=Be,$t.prototype.has=Ze,$t.prototype.set=Ft;function zt(Z){var Fe=-1,tt=Z==null?0:Z.length;for(this.__data__=new $t;++Fe<tt;)this.add(Z[Fe])}function wt(Z){return this.__data__.set(Z,r),this}function Pe(Z){return this.__data__.has(Z)}zt.prototype.add=zt.prototype.push=wt,zt.prototype.has=Pe;function Ke(Z){var Fe=this.__data__=new Bt(Z);this.size=Fe.size}function Et(){this.__data__=new Bt,this.size=0}function Ut(Z){var Fe=this.__data__,tt=Fe.delete(Z);return this.size=Fe.size,tt}function Yt(Z){return this.__data__.get(Z)}function Pn(Z){return this.__data__.has(Z)}function zn(Z,Fe){var tt=this.__data__;if(tt instanceof Bt){var Lt=tt.__data__;if(!Gn||Lt.length<n-1)return Lt.push([Z,Fe]),this.size=++tt.size,this;tt=this.__data__=new $t(Lt)}return tt.set(Z,Fe),this.size=tt.size,this}Ke.prototype.clear=Et,Ke.prototype.delete=Ut,Ke.prototype.get=Yt,Ke.prototype.has=Pn,Ke.prototype.set=zn;function Er(Z,Fe){var tt=ii(Z),Lt=!tt&&Yr(Z),or=!tt&&!Lt&&ds(Z),Rn=!tt&&!Lt&&!or&&Il(Z),_r=tt||Lt||or||Rn,Lr=_r?ye(Z.length,String):[],Pr=Lr.length;for(var Vr in Z)(Fe||We.call(Z,Vr))&&!(_r&&(Vr=="length"||or&&(Vr=="offset"||Vr=="parent")||Rn&&(Vr=="buffer"||Vr=="byteLength"||Vr=="byteOffset")||Jr(Vr,Pr)))&&Lr.push(Vr);return Lr}function Yn(Z,Fe){for(var tt=Z.length;tt--;)if(br(Z[tt][0],Fe))return tt;return-1}function En(Z,Fe,tt){var Lt=Fe(Z);return ii(Z)?Lt:be(Lt,tt(Z))}function Fr(Z){return Z==null?Z===void 0?B:S:Gt&&Gt in Object(Z)?Kt(Z):ln(Z)}function Kn(Z){return Ms(Z)&&Fr(Z)==l}function cr(Z,Fe,tt,Lt,or){return Z===Fe?!0:Z==null||Fe==null||!Ms(Z)&&!Ms(Fe)?Z!==Z&&Fe!==Fe:Bn(Z,Fe,tt,Lt,cr,or)}function Bn(Z,Fe,tt,Lt,or,Rn){var _r=ii(Z),Lr=ii(Fe),Pr=_r?c:ar(Z),Vr=Lr?c:ar(Fe);Pr=Pr==l?x:Pr,Vr=Vr==l?x:Vr;var Zr=Pr==x,_i=Vr==x,qi=Pr==Vr;if(qi&&ds(Z)){if(!ds(Fe))return!1;_r=!0,Zr=!1}if(qi&&!Zr)return Rn||(Rn=new Ke),_r||Il(Z)?Ei(Z,Fe,tt,Lt,or,Rn):_a(Z,Fe,Pr,tt,Lt,or,Rn);if(!(tt&i)){var Kr=Zr&&We.call(Z,"__wrapped__"),Si=_i&&We.call(Fe,"__wrapped__");if(Kr||Si){var ba=Kr?Z.value():Z,Ma=Si?Fe.value():Fe;return Rn||(Rn=new Ke),or(ba,Ma,tt,Lt,Rn)}}return qi?(Rn||(Rn=new Ke),Ii(Z,Fe,tt,Lt,or,Rn)):!1}function pi(Z){if(!ks(Z)||He(Z))return!1;var Fe=ws(Z)?st:J;return Fe.test(Dn(Z))}function ci(Z){return Ms(Z)&&Ss(Z.length)&&!!oe[Fr(Z)]}function ri(Z){if(!It(Z))return wn(Z);var Fe=[];for(var tt in Object(Z))We.call(Z,tt)&&tt!="constructor"&&Fe.push(tt);return Fe}function Ei(Z,Fe,tt,Lt,or,Rn){var _r=tt&i,Lr=Z.length,Pr=Fe.length;if(Lr!=Pr&&!(_r&&Pr>Lr))return!1;var Vr=Rn.get(Z);if(Vr&&Rn.get(Fe))return Vr==Fe;var Zr=-1,_i=!0,qi=tt&a?new zt:void 0;for(Rn.set(Z,Fe),Rn.set(Fe,Z);++Zr<Lr;){var Kr=Z[Zr],Si=Fe[Zr];if(Lt)var ba=_r?Lt(Si,Kr,Zr,Fe,Z,Rn):Lt(Kr,Si,Zr,Z,Fe,Rn);if(ba!==void 0){if(ba)continue;_i=!1;break}if(qi){if(!me(Fe,function(Ma,fs){if(!Ee(qi,fs)&&(Kr===Ma||or(Kr,Ma,tt,Lt,Rn)))return qi.push(fs)})){_i=!1;break}}else if(!(Kr===Si||or(Kr,Si,tt,Lt,Rn))){_i=!1;break}}return Rn.delete(Z),Rn.delete(Fe),_i}function _a(Z,Fe,tt,Lt,or,Rn,_r){switch(tt){case j:if(Z.byteLength!=Fe.byteLength||Z.byteOffset!=Fe.byteOffset)return!1;Z=Z.buffer,Fe=Fe.buffer;case P:return!(Z.byteLength!=Fe.byteLength||!Rn(new mt(Z),new mt(Fe)));case d:case f:case A:return br(+Z,+Fe);case h:return Z.name==Fe.name&&Z.message==Fe.message;case C:case E:return Z==Fe+"";case v:var Lr=V;case _:var Pr=Lt&i;if(Lr||(Lr=W),Z.size!=Fe.size&&!Pr)return!1;var Vr=_r.get(Z);if(Vr)return Vr==Fe;Lt|=a,_r.set(Z,Fe);var Zr=Ei(Lr(Z),Lr(Fe),Lt,or,Rn,_r);return _r.delete(Z),Zr;case D:if(tr)return tr.call(Z)==tr.call(Fe)}return!1}function Ii(Z,Fe,tt,Lt,or,Rn){var _r=tt&i,Lr=Ui(Z),Pr=Lr.length,Vr=Ui(Fe),Zr=Vr.length;if(Pr!=Zr&&!_r)return!1;for(var _i=Pr;_i--;){var qi=Lr[_i];if(!(_r?qi in Fe:We.call(Fe,qi)))return!1}var Kr=Rn.get(Z);if(Kr&&Rn.get(Fe))return Kr==Fe;var Si=!0;Rn.set(Z,Fe),Rn.set(Fe,Z);for(var ba=_r;++_i<Pr;){qi=Lr[_i];var Ma=Z[qi],fs=Fe[qi];if(Lt)var hs=_r?Lt(fs,Ma,qi,Fe,Z,Rn):Lt(Ma,fs,qi,Z,Fe,Rn);if(!(hs===void 0?Ma===fs||or(Ma,fs,tt,Lt,Rn):hs)){Si=!1;break}ba||(ba=qi=="constructor")}if(Si&&!ba){var Ua=Z.constructor,ui=Fe.constructor;Ua!=ui&&"constructor"in Z&&"constructor"in Fe&&!(typeof Ua=="function"&&Ua instanceof Ua&&typeof ui=="function"&&ui instanceof ui)&&(Si=!1)}return Rn.delete(Z),Rn.delete(Fe),Si}function Ui(Z){return En(Z,po,Fn)}function en(Z,Fe){var tt=Z.__data__;return an(Fe)?tt[typeof Fe=="string"?"string":"hash"]:tt.map}function qe(Z,Fe){var tt=he(Z,Fe);return pi(tt)?tt:void 0}function Kt(Z){var Fe=We.call(Z,Gt),tt=Z[Gt];try{Z[Gt]=void 0;var Lt=!0}catch{}var or=At.call(Z);return Lt&&(Fe?Z[Gt]=tt:delete Z[Gt]),or}var Fn=xn?function(Z){return Z==null?[]:(Z=Object(Z),se(xn(Z),function(Fe){return Ge.call(Z,Fe)}))}:bi,ar=Fr;(yn&&ar(new yn(new ArrayBuffer(1)))!=j||Gn&&ar(new Gn)!=v||On&&ar(On.resolve())!=w||qt&&ar(new qt)!=_||at&&ar(new at)!=k)&&(ar=function(Z){var Fe=Fr(Z),tt=Fe==x?Z.constructor:void 0,Lt=tt?Dn(tt):"";if(Lt)switch(Lt){case ut:return j;case Ht:return v;case Nn:return w;case Vn:return _;case er:return k}return Fe});function Jr(Z,Fe){return Fe=Fe??s,!!Fe&&(typeof Z=="number"||K.test(Z))&&Z>-1&&Z%1==0&&Z<Fe}function an(Z){var Fe=typeof Z;return Fe=="string"||Fe=="number"||Fe=="symbol"||Fe=="boolean"?Z!=="__proto__":Z===null}function He(Z){return!!gt&&gt in Z}function It(Z){var Fe=Z&&Z.constructor,tt=typeof Fe=="function"&&Fe.prototype||pe;return Z===tt}function ln(Z){return At.call(Z)}function Dn(Z){if(Z!=null){try{return Le.call(Z)}catch{}try{return Z+""}catch{}}return""}function br(Z,Fe){return Z===Fe||Z!==Z&&Fe!==Fe}var Yr=Kn(function(){return arguments}())?Kn:function(Z){return Ms(Z)&&We.call(Z,"callee")&&!Ge.call(Z,"callee")},ii=Array.isArray;function Va(Z){return Z!=null&&Ss(Z.length)&&!ws(Z)}var ds=bn||yi;function El(Z,Fe){return cr(Z,Fe)}function ws(Z){if(!ks(Z))return!1;var Fe=Fr(Z);return Fe==m||Fe==g||Fe==u||Fe==T}function Ss(Z){return typeof Z=="number"&&Z>-1&&Z%1==0&&Z<=s}function ks(Z){var Fe=typeof Z;return Z!=null&&(Fe=="object"||Fe=="function")}function Ms(Z){return Z!=null&&typeof Z=="object"}var Il=Q?Ie(Q):ci;function po(Z){return Va(Z)?Er(Z):ri(Z)}function bi(){return[]}function yi(){return!1}t.exports=El}(z5,z5.exports);var Yj=z5.exports,zS={};Object.defineProperty(zS,"__esModule",{value:!0});const DTe=Hj,OTe=Yj;var HS;(function(t){function e(a={},s={},l=!1){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let c=DTe(s);l||(c=Object.keys(c).reduce((u,d)=>(c[d]!=null&&(u[d]=c[d]),u),{}));for(const u in a)a[u]!==void 0&&s[u]===void 0&&(c[u]=a[u]);return Object.keys(c).length>0?c:void 0}t.compose=e;function n(a={},s={}){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});const l=Object.keys(a).concat(Object.keys(s)).reduce((c,u)=>(OTe(a[u],s[u])||(c[u]=s[u]===void 0?null:s[u]),c),{});return Object.keys(l).length>0?l:void 0}t.diff=n;function r(a={},s={}){a=a||{};const l=Object.keys(s).reduce((c,u)=>(s[u]!==a[u]&&a[u]!==void 0&&(c[u]=s[u]),c),{});return Object.keys(a).reduce((c,u)=>(a[u]!==s[u]&&s[u]===void 0&&(c[u]=null),c),l)}t.invert=r;function i(a,s,l=!1){if(typeof a!="object")return s;if(typeof s!="object")return;if(!l)return s;const c=Object.keys(s).reduce((u,d)=>(a[d]===void 0&&(u[d]=s[d]),u),{});return Object.keys(c).length>0?c:void 0}t.transform=i})(HS||(HS={})),zS.default=HS;var H5={};Object.defineProperty(H5,"__esModule",{value:!0});var YS;(function(t){function e(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}t.length=e})(YS||(YS={})),H5.default=YS;var KS={};Object.defineProperty(KS,"__esModule",{value:!0});const Kj=H5;class NTe{constructor(e){this.ops=e,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(e){e||(e=1/0);const n=this.ops[this.index];if(n){const r=this.offset,i=Kj.default.length(n);if(e>=i-r?(e=i-r,this.index+=1,this.offset=0):this.offset+=e,typeof n.delete=="number")return{delete:e};{const a={};return n.attributes&&(a.attributes=n.attributes),typeof n.retain=="number"?a.retain=e:typeof n.retain=="object"&&n.retain!==null?a.retain=n.retain:typeof n.insert=="string"?a.insert=n.insert.substr(r,e):a.insert=n.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?Kj.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const e=this.ops[this.index];return e?typeof e.delete=="number"?"delete":typeof e.retain=="number"||typeof e.retain=="object"&&e.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const e=this.offset,n=this.index,r=this.next(),i=this.ops.slice(this.index);return this.offset=e,this.index=n,[r].concat(i)}}else return[]}}KS.default=NTe,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const n=_Te,r=Hj,i=Yj,a=zS;e.AttributeMap=a.default;const s=H5;e.Op=s.default;const l=KS;e.OpIterator=l.default;const c="\0",u=(f,h)=>{if(typeof f!="object"||f===null)throw new Error(`cannot retain a ${typeof f}`);if(typeof h!="object"||h===null)throw new Error(`cannot retain a ${typeof h}`);const m=Object.keys(f)[0];if(!m||m!==Object.keys(h)[0])throw new Error(`embed types not matched: ${m} != ${Object.keys(h)[0]}`);return[m,f[m],h[m]]};class d{constructor(h){Array.isArray(h)?this.ops=h:h!=null&&Array.isArray(h.ops)?this.ops=h.ops:this.ops=[]}static registerEmbed(h,m){this.handlers[h]=m}static unregisterEmbed(h){delete this.handlers[h]}static getHandler(h){const m=this.handlers[h];if(!m)throw new Error(`no handlers for embed type "${h}"`);return m}insert(h,m){const g={};return typeof h=="string"&&h.length===0?this:(g.insert=h,m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(g.attributes=m),this.push(g))}delete(h){return h<=0?this:this.push({delete:h})}retain(h,m){if(typeof h=="number"&&h<=0)return this;const g={retain:h};return m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(g.attributes=m),this.push(g)}push(h){let m=this.ops.length,g=this.ops[m-1];if(h=r(h),typeof g=="object"){if(typeof h.delete=="number"&&typeof g.delete=="number")return this.ops[m-1]={delete:g.delete+h.delete},this;if(typeof g.delete=="number"&&h.insert!=null&&(m-=1,g=this.ops[m-1],typeof g!="object"))return this.ops.unshift(h),this;if(i(h.attributes,g.attributes)){if(typeof h.insert=="string"&&typeof g.insert=="string")return this.ops[m-1]={insert:g.insert+h.insert},typeof h.attributes=="object"&&(this.ops[m-1].attributes=h.attributes),this;if(typeof h.retain=="number"&&typeof g.retain=="number")return this.ops[m-1]={retain:g.retain+h.retain},typeof h.attributes=="object"&&(this.ops[m-1].attributes=h.attributes),this}}return m===this.ops.length?this.ops.push(h):this.ops.splice(m,0,h),this}chop(){const h=this.ops[this.ops.length-1];return h&&typeof h.retain=="number"&&!h.attributes&&this.ops.pop(),this}filter(h){return this.ops.filter(h)}forEach(h){this.ops.forEach(h)}map(h){return this.ops.map(h)}partition(h){const m=[],g=[];return this.forEach(v=>{(h(v)?m:g).push(v)}),[m,g]}reduce(h,m){return this.ops.reduce(h,m)}changeLength(){return this.reduce((h,m)=>m.insert?h+s.default.length(m):m.delete?h-m.delete:h,0)}length(){return this.reduce((h,m)=>h+s.default.length(m),0)}slice(h=0,m=1/0){const g=[],v=new l.default(this.ops);let A=0;for(;A<m&&v.hasNext();){let S;A<h?S=v.next(h-A):(S=v.next(m-A),g.push(S)),A+=s.default.length(S)}return new d(g)}compose(h){const m=new l.default(this.ops),g=new l.default(h.ops),v=[],A=g.peek();if(A!=null&&typeof A.retain=="number"&&A.attributes==null){let x=A.retain;for(;m.peekType()==="insert"&&m.peekLength()<=x;)x-=m.peekLength(),v.push(m.next());A.retain-x>0&&g.next(A.retain-x)}const S=new d(v);for(;m.hasNext()||g.hasNext();)if(g.peekType()==="insert")S.push(g.next());else if(m.peekType()==="delete")S.push(m.next());else{const x=Math.min(m.peekLength(),g.peekLength()),w=m.next(x),T=g.next(x);if(T.retain){const C={};if(typeof w.retain=="number")C.retain=typeof T.retain=="number"?x:T.retain;else if(typeof T.retain=="number")w.retain==null?C.insert=w.insert:C.retain=w.retain;else{const E=w.retain==null?"insert":"retain",[D,B,k]=u(w[E],T.retain),P=d.getHandler(D);C[E]={[D]:P.compose(B,k,E==="retain")}}const _=a.default.compose(w.attributes,T.attributes,typeof w.retain=="number");if(_&&(C.attributes=_),S.push(C),!g.hasNext()&&i(S.ops[S.ops.length-1],C)){const E=new d(m.rest());return S.concat(E).chop()}}else typeof T.delete=="number"&&(typeof w.retain=="number"||typeof w.retain=="object"&&w.retain!==null)&&S.push(T)}return S.chop()}concat(h){const m=new d(this.ops.slice());return h.ops.length>0&&(m.push(h.ops[0]),m.ops=m.ops.concat(h.ops.slice(1))),m}diff(h,m){if(this.ops===h.ops)return new d;const g=[this,h].map(w=>w.map(T=>{if(T.insert!=null)return typeof T.insert=="string"?T.insert:c;const C=w===h?"on":"with";throw new Error("diff() called "+C+" non-document")}).join("")),v=new d,A=n(g[0],g[1],m,!0),S=new l.default(this.ops),x=new l.default(h.ops);return A.forEach(w=>{let T=w[1].length;for(;T>0;){let C=0;switch(w[0]){case n.INSERT:C=Math.min(x.peekLength(),T),v.push(x.next(C));break;case n.DELETE:C=Math.min(T,S.peekLength()),S.next(C),v.delete(C);break;case n.EQUAL:C=Math.min(S.peekLength(),x.peekLength(),T);const _=S.next(C),E=x.next(C);i(_.insert,E.insert)?v.retain(C,a.default.diff(_.attributes,E.attributes)):v.push(E).delete(C);break}T-=C}}),v.chop()}eachLine(h,m=`
4173
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pj(t,e){return Yxe(t)||Kxe(t,e)||Xxe(t,e)||Gxe()}function Og(t){"@babel/helpers - typeof";return Og=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Og(t)}function Rxe(t,e){if(Og(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Og(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Wxe(t){var e=Rxe(t,"string");return Og(e)==="symbol"?e:String(e)}function Qxe(t,e,n){return e=Wxe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Jxe={root:"p-confirm-dialog",message:"p-confirm-dialog-message",icon:"p-confirm-dialog-icon",acceptButton:"p-confirm-dialog-accept",rejectButton:function(e){var n=e.getPropValue;return ht("p-confirm-dialog-reject",{"p-button-text":!n("rejectClassName")})}},P5=Ln.extend({defaultProps:{__TYPE:"ConfirmDialog",accept:null,acceptClassName:null,acceptIcon:null,acceptLabel:null,appendTo:null,breakpoints:null,children:void 0,className:null,content:null,defaultFocus:"accept",footer:null,icon:null,message:null,onHide:null,reject:null,rejectClassName:null,rejectIcon:null,rejectLabel:null,tagKey:void 0,visible:void 0},css:{classes:Jxe}});function gj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Oh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gj(Object(n),!0).forEach(function(r){Qxe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var mj=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e=Oh(Oh({},e),{visible:e.visible===void 0?!0:e.visible}),e.visible&&vs.emit("confirm-dialog",e);var n=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};vs.emit("confirm-dialog",Oh(Oh(Oh({},e),a),{visible:!0}))},r=function(){vs.emit("confirm-dialog",{visible:!1})};return{show:n,hide:r}},Zxe=y.memo(y.forwardRef(function(t,e){var n=$n(),r=y.useContext(rr),i=P5.getProps(t,r),a=y.useState(i.visible),s=pj(a,2),l=s[0],c=s[1],u=y.useState(!1),d=pj(u,2),f=d[0],h=d[1],m=y.useRef(null),g=y.useRef(!1),v=y.useRef(null),A=function(){var ae=i.group;return m.current&&(ae=m.current.group),Object.assign({},i,m.current,{group:ae})},S=function(ae){return A()[ae]},x=function(ae){for(var Y=arguments.length,ge=new Array(Y>1?Y-1:0),ne=1;ne<Y;ne++)ge[ne-1]=arguments[ne];return Ne.getPropValue(S(ae),ge)},w=S("acceptLabel")||Rr("accept"),T=S("rejectLabel")||Rr("reject"),C={props:i,state:{visible:l}},_=P5.setMetaData(C),E=_.ptm,D=_.cx,B=_.isUnstyled;fi(P5.css.styles,B,{name:"confirmdialog"});var k=function(){g.current||(g.current=!0,x("accept"),M("accept"))},P=function(){g.current||(g.current=!0,x("reject"),M("reject"))},j=function(){var ae=A();ae.group===i.group&&(c(!0),g.current=!1,v.current=document.activeElement)},M=function(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"cancel";c(!1),x("onHide",{result:ae}),_e.focus(v.current),v.current=null},H=function(ae){if(ae.tagKey===i.tagKey){var Y=l!==ae.visible,ge=S("target")!==ae.target;ge&&!i.target?(M(),m.current=ae,h(!0)):Y&&(m.current=ae,ae.visible?j():M())}};y.useEffect(function(){i.visible?j():M()},[i.visible]),y.useEffect(function(){return!i.target&&!i.message&&vs.on("confirm-dialog",H),function(){vs.off("confirm-dialog",H)}},[i.target]),ur(function(){f&&j()},[f]),za(function(){vs.off("confirm-dialog",H)}),y.useImperativeHandle(e,function(){return{props:i,confirm:H}});var de=function(){var ae=S("defaultFocus"),Y=ht("p-confirm-dialog-accept",S("acceptClassName")),ge=ht("p-confirm-dialog-reject",{"p-button-text":!S("rejectClassName")},S("rejectClassName")),ne={label:T,autoFocus:ae==="reject",icon:S("rejectIcon"),className:ht(S("rejectClassName"),D("rejectButton",{getPropValue:S})),onClick:P,pt:E("rejectButton"),unstyled:i.unstyled,__parentMetadata:{parent:C}},J=n({label:w,autoFocus:ae===void 0||ae==="accept",icon:S("acceptIcon"),className:ht(S("acceptClassName"),D("acceptButton")),onClick:k,pt:E("acceptButton"),unstyled:i.unstyled,__parentMetadata:{parent:C}},E("acceptButton")),K=y.createElement(y.Fragment,null,y.createElement(Pt,ne),y.createElement(Pt,J));if(S("footer")){var oe={accept:k,reject:P,acceptClassName:Y,rejectClassName:ge,acceptLabel:w,rejectLabel:T,element:K,props:A()};return Ne.getJSXElement(S("footer"),oe)}return K},fe=function(){var ae=A(),Y=Ne.getJSXElement(S("message"),ae),ge=n({className:D("icon")},E("icon")),ne=Wn.getJSXIcon(S("icon"),Oh({},ge),{props:ae}),J=de(),K=n({className:D("message")},E("message")),oe=n({visible:l,className:ht(S("className"),D("root")),footer:J,onHide:M,breakpoints:S("breakpoints"),pt:ae.pt,unstyled:i.unstyled,appendTo:S("appendTo"),__parentMetadata:{parent:C}},P5.getOtherProps(ae));return y.createElement(Is,DS({},oe,{content:t==null?void 0:t.content}),ne,y.createElement("span",K,Y))},ee=fe();return y.createElement(Vl,{element:ee,appendTo:S("appendTo")})}));Zxe.displayName="ConfirmDialog";const eCe=()=>{const[t]=N.useState([]);return N.useEffect(()=>()=>{},[]),o.jsx("div",{className:"card",children:(t==null?void 0:t.length)>0&&(t==null?void 0:t.map((e,n)=>o.jsxs("div",{children:[o.jsx("ul",{className:"list-none p-0 m-0",children:o.jsxs("li",{className:"flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-3",style:{borderRadius:"10px"},children:[o.jsx("div",{children:o.jsxs("div",{children:[o.jsx("span",{className:"inline-flex justify-content-center align-items-center w-2rem h-2rem border-circle border-1",children:(e==null?void 0:e.is_active)===1?o.jsx("i",{style:{color:"green"},className:"pi pi-check"}):o.jsx("i",{className:"pi pi-check"})}),o.jsxs("span",{className:" font-bold ml-2",children:[e==null?void 0:e.version_name,(e==null?void 0:e.is_active)===1?" - Active ":""]})]})}),o.jsx("div",{className:"flex align-items-center justify-content-between md:justify-content-end mt-3 md:mt-0",children:o.jsx("div",{className:"text-right ml-3",children:o.jsx("span",{className:" font-bold",children:(e==null?void 0:e.is_active)===1?"":o.jsx(Pt,{text:!0,onClick:()=>{setTimeout(()=>{},3e3)},severity:"success",label:"Make this version active",icon:"pi pi-check",size:"small"})})})})]})}),o.jsx("hr",{})]},`version-item-${n}`)))})},tCe=()=>{const{setLayout:t,formBuilderConfigurationType:e}=on(),n=N.useRef(null),r=s=>{var l;switch((l=s==null?void 0:s.formType)==null?void 0:l.key){case(e==null?void 0:e.key):t(s==null?void 0:s.layout);break}},i=async s=>{const l=s.target.files;if(l&&l.length>0){const c=await a(l[0]);r(c)}};async function a(s){return new Promise((l,c)=>{const u=new FileReader;u.onload=d=>{var f;return l(JSON.parse((f=d.target)==null?void 0:f.result))},u.onerror=d=>c(d),u.readAsText(s)})}return o.jsxs(o.Fragment,{children:[o.jsx("input",{ref:n,type:"file",style:{display:"none"},id:"schema",name:"schema",onChange:i}),o.jsx(Pt,{text:!0,size:"small",className:"p-button-primary ml-3 mr-3",onClick:()=>{var s;(s=n.current)==null||s.click()},label:"Import Template"})]})},nCe=()=>{const{builderTemplateName:t,formBuilderFormSchema:e}=on(),n=function(){const r=document.createElement("a");return function(i,a){const s=JSON.stringify(i),l=new Blob([s],{type:"octet/stream"}),c=window.URL.createObjectURL(l);r.href=c,r.download=a,r.click(),window.URL.revokeObjectURL(c)}}();return o.jsx(Pt,{text:!0,size:"small",className:"p-button-info ml-3",onClick:()=>{const r=e,i=t+".json";n(r,i)},label:"Export Template"})};function Ng(){return Ng=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ng.apply(this,arguments)}function Fg(t){"@babel/helpers - typeof";return Fg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fg(t)}function rCe(t,e){if(Fg(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Fg(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function iCe(t){var e=rCe(t,"string");return Fg(e)==="symbol"?e:String(e)}function aCe(t,e,n){return e=iCe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var sCe={root:function(e){var n=e.props,r=e.checked;return ht("p-inputswitch p-component",{"p-highlight":r,"p-disabled":n.disabled,"p-invalid":n.invalid})},input:"p-inputswitch-input",slider:"p-inputswitch-slider"},k5=Ln.extend({defaultProps:{__TYPE:"InputSwitch",autoFocus:!1,checked:!1,className:null,disabled:!1,falseValue:!1,id:null,inputId:null,inputRef:null,invalid:!1,name:null,onBlur:null,onChange:null,onFocus:null,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,trueValue:!0,children:void 0},css:{classes:sCe}});function vj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function oCe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?vj(Object(n),!0).forEach(function(r){aCe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Ks=y.memo(y.forwardRef(function(t,e){var n=$n(),r=y.useContext(rr),i=k5.getProps(t,r),a=k5.setMetaData({props:i}),s=a.ptm,l=a.cx,c=a.isUnstyled;fi(k5.css.styles,c,{name:"inputswitch"});var u=y.useRef(null),d=y.useRef(i.inputRef),f=i.checked===i.trueValue,h=function(_){if(i.onChange){var E=f?i.falseValue:i.trueValue;i.onChange({originalEvent:_,value:E,stopPropagation:function(){_==null||_.stopPropagation()},preventDefault:function(){_==null||_.preventDefault()},target:{name:i.name,id:i.id,value:E}})}},m=function(_){var E;i==null||(E=i.onFocus)===null||E===void 0||E.call(i,_)},g=function(_){var E;i==null||(E=i.onBlur)===null||E===void 0||E.call(i,_)};y.useImperativeHandle(e,function(){return{props:i,focus:function(){return _e.focus(d.current)},getElement:function(){return u.current},getInput:function(){return d.current}}}),y.useEffect(function(){Ne.combinedRefs(d,i.inputRef)},[d,i.inputRef]),ki(function(){i.autoFocus&&_e.focus(d.current,i.autoFocus)});var v=Ne.isNotEmpty(i.tooltip),A=k5.getOtherProps(i),S=Ne.reduceKeys(A,_e.ARIA_PROPS),x=n({className:ht(i.className,l("root",{checked:f})),style:i.style,role:"checkbox","aria-checked":f,"data-p-highlight":f,"data-p-disabled":i.disabled},A,s("root")),w=n(oCe({type:"checkbox",id:i.inputId,name:i.name,checked:f,onChange:h,onFocus:m,onBlur:g,disabled:i.disabled,role:"switch",tabIndex:i.tabIndex,"aria-checked":f,className:l("input")},S),s("input")),T=n({className:l("slider")},s("slider"));return y.createElement(y.Fragment,null,y.createElement("div",Ng({id:i.id,ref:u},x),y.createElement("input",Ng({ref:d},w)),y.createElement("span",T)),v&&y.createElement(rn,Ng({target:u,content:i.tooltip,pt:s("tooltip")},i.tooltipOptions)))}));Ks.displayName="InputSwitch";const lCe=()=>{var x,w,T,C,_;const{formBuilderFormSchema:t,selectFormBuilderLanguage:e,formBuilderSchemaLanguages:n,unselectFormBuilderLanguage:r,schemaBuilderUpdate:i,builderTemplateName:a,formBuilderLoading:s,formBuilderConfigurationType:l,saveFormTemplateNewVersion:c}=on(),[u,d]=N.useState(),f=fj(),h=f==null?void 0:f.form_template_id,m=M7({initialValues:{firstName:"",lastName:"",contact:"",email:""},validate:()=>{const E={};return m.values.application_url="",E},onSubmit:()=>{}}),g=l==null?void 0:l.key,v=(E,D)=>{E!=null&&E.value?e(D):r(D),d(!u)},A=E=>{for(const[,D]of t.layout.entries())for(const[,B]of D.children.entries())for(const[,k]of B.children.entries())for(const[,P]of k.children.entries())for(const[,j]of P.children.entries())j.isFluid=E.value},S=()=>{mj({message:"Are you sure you want to a new version for this form?",header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:()=>{c(h,t)},reject:()=>{}})};return o.jsx(o.Fragment,{children:o.jsx("form",{onSubmit:m.handleSubmit,className:"p-fluid",children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-6",children:[s===!0?o.jsx(o.Fragment,{children:o.jsx(ua,{height:"15rem"})}):o.jsxs(li,{header:"General",children:[o.jsxs("h5",{children:["Form Title : ",a||""," "]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"binary",onChange:E=>{i({showIntroTab:E.value})},checked:t==null?void 0:t.showIntroTab}),o.jsx("label",{htmlFor:"binary",children:"Show Intro Page"}),"  "]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"auto-save",onChange:E=>{i({enableAutoSave:E.value})},checked:t==null?void 0:t.enableAutoSave}),o.jsx("label",{htmlFor:"auto-save",children:"Auto Save Task Render Form User Data"})]}),g===n7&&o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"auto-save",onChange:E=>{i({surveyQuestionSlide:E.value})},checked:t==null?void 0:t.surveyQuestionSlide}),o.jsx("label",{htmlFor:"auto-save",children:"Survey Slide Per Question"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"showConditionalFields",onChange:E=>{i({showConditionalFields:E.value})},checked:t==null?void 0:t.showConditionalFields,disabled:t==null?void 0:t.surveyQuestionSlide}),o.jsxs("label",{htmlFor:"showConditionalFields",children:["Show Conditional Fields ",(t==null?void 0:t.surveyQuestionSlide)===!0&&o.jsx("small",{className:"error",children:"Cant use Survey Slide Per Question with Conditional Fields"})]})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"enableReviewTask",onChange:E=>{i({enableReviewTask:E.value})},checked:t==null?void 0:t.enableReviewTask}),o.jsx("label",{htmlFor:"enableReviewTask",children:"Enable Admin Review Task"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"enableFormFluid",onChange:E=>{i({enableFormFluid:E.value}),A(E)},checked:t==null?void 0:t.enableFormFluid}),o.jsx("label",{htmlFor:"enableFormFluid",children:"Enable Form Fluid"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"enableFieldEnumeration",onChange:E=>{i({enableFieldEnumeration:E.value}),A(E)},checked:t==null?void 0:t.enableFieldEnumeration}),o.jsx("label",{htmlFor:"enableFormFluid",children:"Enable Field Enumeration"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"isOnboardingForm",onChange:E=>{i({isOnboardingForm:E.value}),A(E)},checked:t==null?void 0:t.isOnboardingForm}),o.jsx("label",{htmlFor:"isOnboardingForm",children:"Is Onboarding Form"})]})]}),s===!0?o.jsx(o.Fragment,{children:o.jsx(ua,{className:"mt-3",height:"8rem"})}):o.jsxs(li,{className:"mt-3",header:"Auto Save Settings",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"auto-save",onChange:E=>{i({enableAutoSave:E.value})},checked:t==null?void 0:t.enableAutoSave}),o.jsx("label",{htmlFor:"auto-save",children:"Auto Save User Data"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"auto-save",onChange:E=>{i({enableAutoSaveBuilderSetting:E.value})},checked:t==null?void 0:t.enableAutoSaveBuilderSetting}),o.jsx("label",{htmlFor:"auto-save",children:"Auto Save Form Builder Settings"})]})]}),s===!0?o.jsx(o.Fragment,{children:o.jsx(ua,{className:"mt-3",height:"16rem"})}):o.jsxs(li,{className:"mt-3",header:"Form Table Configuration",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"stripedRows",onChange:E=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,stripedRows:E.value}})},checked:(x=t==null?void 0:t.tableConfiguration)==null?void 0:x.stripedRows}),o.jsx("label",{htmlFor:"stripedRows",children:"Striped Rows"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"gridLines",onChange:E=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,gridLines:E.value}})},checked:(w=t==null?void 0:t.tableConfiguration)==null?void 0:w.gridLines}),o.jsx("label",{htmlFor:"gridLines",children:"Grid Lines"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"flexScroll",onChange:E=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,flexScroll:E.value}})},checked:(T=t==null?void 0:t.tableConfiguration)==null?void 0:T.flexScroll}),o.jsx("label",{htmlFor:"flexScroll",children:"Flex Scroll "})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"isResponsive",onChange:E=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,isResponsive:E.value}})},checked:(C=t==null?void 0:t.tableConfiguration)==null?void 0:C.isResponsive}),o.jsx("label",{htmlFor:"isResponsive",children:"isResponsive Rows"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:"rowReorder",onChange:E=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,rowReorder:E.value}})},checked:(_=t==null?void 0:t.tableConfiguration)==null?void 0:_.rowReorder}),o.jsx("label",{htmlFor:"rowReorder",children:"Row Reorder"})]})]})]}),o.jsxs("div",{className:"col-6",children:[s===!0?o.jsx(o.Fragment,{children:o.jsx(ua,{height:"18rem"})}):o.jsx(li,{header:"Languages",children:aQ.map((E,D)=>{const B=n.filter(function(k){return(E==null?void 0:E.key)===(k==null?void 0:k.key)});return o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Ks,{inputId:D,name:"lagnuage",checked:B.length>0,onChange:k=>v(k,E)}),o.jsx("label",{htmlFor:D,children:E.language})]},D)})}),s===!0?o.jsx(o.Fragment,{children:o.jsx(ua,{className:"mt-3",height:"16rem"})}):o.jsxs(li,{className:"mt-3",header:"Versioning",children:[o.jsx("h5",{children:"Change Form Version Title"}),o.jsx("div",{className:"field",children:o.jsx(gn,{value:(t==null?void 0:t.version_name)||"",minLength:2,placeholder:"Enter form version",maxLength:50,onChange:E=>{var D;i({version_name:(D=E==null?void 0:E.target)==null?void 0:D.value})}})}),o.jsx("h5",{children:"All Forms Version"}),o.jsx(eCe,{}),o.jsx(Pt,{text:!0,size:"small",className:"p-button-info ml-3",onClick:()=>S(),label:"Create New Version",loading:s})]}),s===!0?o.jsx(o.Fragment,{children:o.jsx(ua,{className:"mt-3",height:"8rem"})}):o.jsx(li,{className:"mt-3",header:"Export/Import",children:o.jsxs("span",{className:"flex",children:[o.jsx(nCe,{}),o.jsx(tCe,{})]})})]}),o.jsx("div",{className:"col-6"})]})})})},cCe=t=>{var g,v,A;const{fieldIndex:e,field:n,models:r,setfieldMappings:i,fieldMappings:a}=t,[s,l]=N.useState(null),[c,u]=N.useState(null),d=()=>{var w;const S=[...a],x=S.findIndex(T=>T.fieldId===(n==null?void 0:n.uuid));if(x!==-1){const T=[...r],C=T.findIndex(_=>{var E;return _.modelName===((E=S[x])==null?void 0:E.modelName)});u((w=S[x])==null?void 0:w.column_name),C!==-1&&l(T[C])}};N.useEffect(()=>(d(),()=>{}),[]);const[f,h]=N.useState(!1),m=S=>{const x=[...a],w=x.findIndex(C=>C.fieldId===S),T={fieldId:S,modelName:(s==null?void 0:s.modelName)||"",class:s==null?void 0:s.class,column_name:c||""};w!==-1?x[w]=T:x.push(T),i([...x])};return o.jsxs("div",{className:"grid",children:[o.jsxs(Is,{header:`Map ${(g=n==null?void 0:n.label)==null?void 0:g.english} Field with Model`,visible:f,style:{width:"40vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsx(Pt,{text:!0,label:"Set Field","aria-label":"Submit",onClick:()=>{m((n==null?void 0:n.uuid)||""),h(!1)}})}),onHide:()=>h(!1),children:[o.jsxs("p",{children:["Map ",(v=n==null?void 0:n.label)==null?void 0:v.english," Field with Model"]}),o.jsxs("div",{className:"flex justify-content-between",children:[o.jsx(Sa,{value:s,onChange:S=>l(S.value),options:r,optionLabel:"modelName",className:"w-full md:w-14rem",placeholder:"Select a model field",filter:!0,showClear:!0}),o.jsx(Sa,{value:c,onChange:S=>u(S.value),options:(s==null?void 0:s.columns)||[],className:"w-full md:w-14rem",placeholder:"Select a column",filter:!0,showClear:!0})]})]}),o.jsx("div",{className:"col-6",children:o.jsxs("p",{children:[o.jsxs("strong",{children:[e+1," "]}),"Field ",n==null?void 0:n.componentType,": ",(A=n==null?void 0:n.label)==null?void 0:A.english," Is Mapped to"," ",o.jsx(xc,{className:"mr-2",severity:s!=null&&s.modelName?"success":"warning",value:(s==null?void 0:s.modelName)||"Nothing"}),"with column"," ",o.jsx(xc,{className:"mr-2",severity:c?"success":"danger",value:c||"Nothing"})]})}),o.jsx("div",{className:"col-6",children:o.jsx(Pt,{text:!0,label:"Set Model","aria-label":"Submit",onClick:()=>{h(!0)}})})]},e+"-table-field-item")},uCe=t=>{const{fields:e}=t,[n]=N.useState([]),[r,i]=N.useState(!1),{formBuilderFormSchema:a,schemaBuilderUpdate:s}=on(),l=()=>{i(!0)},c=()=>{let d=[...(a==null?void 0:a.fieldMappings)||[]];console.log("tempFieldsMappings",d),d!=null&&d.length&&(d=d==null?void 0:d.filter(f=>e.some(h=>h.uuid===(f==null?void 0:f.fieldId)))),u(d)};N.useEffect(()=>(l(),c(),()=>{}),[]);const u=d=>{s({fieldMappings:d})};return o.jsx("div",{children:r===!0?o.jsxs(o.Fragment,{children:[o.jsx(ua,{className:"mt-3",height:"5rem"}),o.jsx(ua,{className:"mt-3",height:"5rem"}),o.jsx(ua,{className:"mt-3",height:"5rem"}),o.jsx(ua,{className:"mt-3",height:"5rem"}),o.jsx(ua,{className:"mt-3",height:"5rem"}),o.jsx(ua,{className:"mt-3",height:"5rem"}),o.jsx(ua,{className:"mt-3",height:"5rem"}),o.jsx(ua,{className:"mt-3",height:"5rem"})]}):o.jsx(o.Fragment,{children:(e==null?void 0:e.length)>0&&(n==null?void 0:n.length)>0&&(e==null?void 0:e.map((d,f)=>o.jsx("div",{className:"card",children:o.jsx(cCe,{fieldMappings:a!=null&&a.fieldMappings?a==null?void 0:a.fieldMappings:[],setfieldMappings:u,field:d,fieldIndex:f,models:n})},f+"-table-field-itemc-component")))})})},dCe=0,fCe=t=>{const{setShowPreview:e,activeIndex:n,userFormBuilderSettings:r}=t,{builderIsChangesSaved:i,builderTemplateName:a,formBuilderConfigurationType:s,formBuilderFormSchema:l,formBuilderLoading:c,formBuilderPublishedStatus:u,builderVersionName:d,saveFormProgress:f,schemaBuilderUpdate:h}=on(),m=N.useRef(null),g=()=>{f(l)},v=["Basic","Advanced"],[A,S]=N.useState((r==null?void 0:r.isAdvanceView)!==void 0&&r!=null&&r.isAdvanceView?"Advanced":"Basic"),x=C=>{S(C.value),h({isAdvanceView:C.value==="Advanced"})},w=o.jsx(N.Fragment,{children:o.jsxs("div",{className:"flex",children:[((s==null?void 0:s.key)===t7||(s==null?void 0:s.key)===n7||(s==null?void 0:s.key)===Vte)&&o.jsx(q0,{className:"mr-3",value:A,onChange:C=>x(C),options:v,disabled:c}),o.jsx(Pt,{text:!0,icon:"pi pi-eye",size:"small",className:"mr-2",onClick:()=>e(!0),label:"Preview"}),!u&&o.jsx(o.Fragment,{children:(l==null?void 0:l.enableAutoSaveBuilderSetting)===!1&&o.jsx(Pt,{text:!0,disabled:i,size:"small",className:i?"p-button-secondary":"p-button-info",onClick:()=>g(),label:"Save Progress",loading:c})})]})}),T=o.jsx(N.Fragment,{children:c===!0?o.jsx(o.Fragment,{children:o.jsx(ua,{width:"25rem",height:"1.5rem"})}):o.jsxs("div",{className:"font-medium text-900",children:["Builder - ",s==null?void 0:s.name," - ",a," ","- Version : ",d]})});return o.jsxs(o.Fragment,{children:[o.jsx(l3,{ref:m}),o.jsxs("div",{className:"flex",children:[o.jsx("div",{className:"flex w-5 justify-content-left align-items-start",children:T}),o.jsx("div",{className:"flex w-7 justify-content-right align-items-end",children:n===dCe&&w})]})]})};function hCe(){const{formBuilderFormLayout:t,formBuilderFormSchema:e,clearBuilderSchema:n,schemaBuilderUpdate:r,saveFormProgress:i,userSelectedLanguage:a,builderIsChangesSaved:s}=on(),l=fj(),c=l==null?void 0:l.form_template_id,[u]=N.useState(!0),[d]=N.useState(null),[f,h]=N.useState(!0),[m,g]=N.useState(!1),[v,A]=N.useState(0),[S,x]=N.useState(null),w=async()=>{},T=N.useCallback(()=>{w()},[t,e]),C=D=>{const B={...e,intro:D};r(B)},_=()=>{i(e)},E=()=>{s===!1?mj({message:"You have unsaved changes, would you like to to save them or discard them?",header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:()=>{_(),h(!1),setTimeout(()=>{n()},1e3)},rejectLabel:"Close and discard changes",acceptLabel:"Close and save changes",reject:()=>{h(!1),setTimeout(()=>{n()},1e3)}}):(h(!1),setTimeout(()=>{n()},1e3))};return o.jsx(Is,{maximizable:!0,header:()=>o.jsx(fCe,{setUserFormBuilderSettings:x,userFormBuilderSettings:S,formBuilderFormLayout:t,formTemplateId:c,showPreview:m,setShowPreview:g,activeIndex:v,emitSocketData:T}),visible:f,style:{width:"100vw",height:"100vh",maxHeight:"100%"},onHide:()=>E(),children:o.jsxs("div",{id:"form-builder",className:"grid",style:{overflow:"hidden",height:"100%"},children:[!u&&o.jsx(Pt,{text:!0,label:"Request Access",onClick:()=>{},className:"p-button-info"}),d&&o.jsxs("div",{children:[d==null?void 0:d.username," is editing so you have to wait to edits and leaves."]}),o.jsx("div",{className:"flex justify-content-end"}),o.jsx("div",{id:"users-arrow"}),o.jsx("div",{className:"col-12",style:{overflow:"hidden"},children:o.jsxs(Ya,{activeIndex:v,onTabChange:D=>A(D.index),children:[o.jsxs(fr,{header:"Builder",children:[o.jsx(lf,{backend:uf}),o.jsx(Eo,{style:{width:"75vw"},visible:m,onHide:()=>g(!1),position:"right",children:o.jsx(lf,{backend:uf,children:o.jsx("div",{className:"scroll-height-200"})})})]}),o.jsx(fr,{header:"Configuration",children:o.jsx("div",{className:"scroll-height-250",children:o.jsx(lCe,{})})}),o.jsx(fr,{header:"Intro",disabled:(e==null?void 0:e.showIntroTab)===!1,children:o.jsx(Y3,{style:{height:"320px"},value:(e==null?void 0:e.intro)||"<p></p>",onTextChange:D=>{C(D==null?void 0:D.htmlValue)}})}),o.jsx(fr,{header:"Data Model Binding",children:o.jsx(uCe,{fields:e==null?void 0:e.tableFields})}),o.jsxs(fr,{header:"Weighting",children:[o.jsx("h3",{children:"Weighting"}),(t==null?void 0:t.length)>0&&t.map((D,B)=>{var k,P,j;return o.jsxs("div",{children:[o.jsx("h5",{children:(k=D==null?void 0:D.title)==null?void 0:k[a==null?void 0:a.type]}),((P=D==null?void 0:D.children)==null?void 0:P.length)>0&&((j=D==null?void 0:D.children)==null?void 0:j.map((M,H)=>o.jsx("div",{children:o.jsx(Hxe,{page:D,section:M})},`weighting-section-${H}`)))]},`weighting-page-${B}`)}),o.jsx("hr",{}),"Total ",o.jsx(Oa,{placeholder:"0",readOnly:!0})," %"]})]})})]})})}const pCe=()=>o.jsx(hCe,{}),gCe=t=>{const{className:e=""}=t,{builderIsChangesSaved:n,schemaBuilderUpdate:r,formBuilderFormLayout:i,formBuilderFormSchema:a,formatTableFieldsHook:s,formBuilderLoading:l,saveFormProgress:c}=on(),u=d=>{n===!1?(d.preventDefault(),d.returnValue=!1):window.location.reload()};return N.useEffect(()=>(window.addEventListener("beforeunload",u),()=>{window.removeEventListener("beforeunload",u)}),[n]),N.useEffect(()=>((a==null?void 0:a.enableAutoSaveBuilderSetting)===!0&&l===!1?c(!1):r({isChangesSaved:!1}),s(i),()=>{}),[i]),o.jsx("div",{className:e,children:o.jsx(O5,{})})},mCe={padding:"1rem 0.5rem",cursor:"move",textAlign:"center"},Nh=t=>{const{data:e,showIcon:n,tags:r}=t,[{opacity:i},a]=Qi({type:Zn,item:e,collect:l=>({opacity:l.isDragging()?0:1})});function s(l,c){return l.length<=c?l:l.slice(0,c)+"..."}return o.jsxs("div",{ref:a,className:`card shadow-2 question builder-sidebar-item ${e==null?void 0:e.element}`,style:{...mCe,opacity:i},children:[i&&(e!=null&&e.toolTip)?e==null?void 0:e.toolTip(e):"",s(e==null?void 0:e.label,80),o.jsxs("div",{className:"mt-2",children:[n&&o.jsx(xc,{icon:"pi pi-check",severity:"warning",className:"mr-2",rounded:!0}),r&&o.jsx(o.Fragment,{children:(r==null?void 0:r.length)>0&&(r==null?void 0:r.map((l,c)=>o.jsx(xc,{severity:l==null?void 0:l.severity,className:"mr-2",value:l==null?void 0:l.label},`tagIndex-${c}`)))})]})]})},vCe=()=>{const{renderType:t}=Zt(),e=4,n=0,r=1,i=2,a=5,s=()=>{const l=t;let c=0;return l===Y1?c=e:l===pm?c=a:l===hm||l===P9||l===H1?c=i:l===F0||l===ep?c=r:l===z1&&(c=n),c};return o.jsx(o.Fragment,{children:o.jsxs(Ya,{activeIndex:s(),scrollable:!0,children:[t===z1&&o.jsx(fr,{header:"Survey",children:nQ.map((l,c)=>o.jsx(li,{header:l==null?void 0:l.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:l==null?void 0:l.items.map((u,d)=>o.jsx("div",{className:"xl:col-6 lg:col-12 md:col-12 sm:col-12",children:o.jsx(Nh,{data:u},u.uuid)},"form_elements_"+d))})},`pannel-tab-${c}`))}),(t===F0||t===ep)&&o.jsx(fr,{header:"Form",children:eQ.map((l,c)=>o.jsx(li,{header:l==null?void 0:l.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:l==null?void 0:l.items.map((u,d)=>o.jsx("div",{className:"xl:col-6 lg:col-12 md:col-12 sm:col-12",children:o.jsx(Nh,{data:u},u.uuid)},"form_elements_"+d))})},`pannel-tab-${c}`))}),(t===hm||t===P9||t===H1)&&o.jsx(fr,{header:"Layout",children:eK.map((l,c)=>o.jsx(li,{header:l==null?void 0:l.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:l==null?void 0:l.items.map((u,d)=>o.jsx("div",{className:"col-6",children:o.jsx(Nh,{data:u},u.uuid)},"form_elements_"+d))})},`pannel-tab-${c}`))}),(t===z1||t===F0||t===ep)&&o.jsx(fr,{header:"Layout",children:tQ.map((l,c)=>o.jsx(li,{header:l==null?void 0:l.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:l==null?void 0:l.items.map((u,d)=>o.jsx("div",{className:"col-6",children:o.jsx(Nh,{data:u},u.uuid)},"form_elements_"+d))})},`pannel-tab-${c}`))}),t===Y1&&o.jsx(fr,{header:"Question Bank",children:o.jsxs("div",{className:"grid",children:[o.jsx("div",{className:"col-12",children:ZY.map((l,c)=>o.jsx("div",{className:"grid",children:l==null?void 0:l.items.map((u,d)=>{const f=_t.cloneDeep(u);return o.jsx("div",{className:"col-6",children:o.jsx(Nh,{data:f},u.uuid)},"form_elements_"+d)})},`new-quiz-${c}`))}),o.jsx("div",{className:"col-12 ",children:o.jsxs("div",{className:"p-inputgroup",children:[o.jsx(gn,{placeholder:"Keyword"}),o.jsx(Pt,{icon:"pi pi-search",className:"p-button-info"})]})})]})}),t===pm&&o.jsx(fr,{header:"Training",children:rQ.map((l,c)=>o.jsx(li,{header:l==null?void 0:l.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:l==null?void 0:l.items.map((u,d)=>o.jsx("div",{className:"col-6",children:o.jsx(Nh,{data:u},u.uuid)},"form_elements_"+d))})},`pannel-tab-${c}`))}),(t===z1||t===F0||t===ep)&&o.jsxs(fr,{header:"Custom",children:[o.jsx("h6",{children:"Custom Sections"}),o.jsx("div",{className:"grid"}),o.jsx("h6",{children:"Custom Matrix"}),o.jsx("div",{className:"grid"})]})]})})};function bj(t){return t}function bCe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var yCe=800,ACe=16,wCe=Date.now;function SCe(t){var e=0,n=0;return function(){var r=wCe(),i=ACe-(r-n);if(n=r,i>0){if(++e>=yCe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function xCe(t){return function(){return t}}var CCe=_3?function(t,e){return _3(t,"toString",{configurable:!0,enumerable:!1,value:xCe(e),writable:!0})}:bj,TCe=SCe(CCe),yj=Math.max;function ECe(t,e,n){return e=yj(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=yj(r.length-e,0),s=Array(a);++i<a;)s[i]=r[e+i];i=-1;for(var l=Array(e+1);++i<e;)l[i]=r[i];return l[e]=n(s),bCe(t,this,l)}}function ICe(t,e){return TCe(ECe(t,e,bj),t+"")}function _Ce(t,e,n){if(!Wd(n))return!1;var r=typeof e;return(r=="number"?D3(n)&&yO(e,n.length):r=="string"&&e in n)?Rp(n[e],t):!1}function DCe(t){return ICe(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,s&&_Ce(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var l=n[r];l&&t(e,l,r,a)}return e})}var OCe="__lodash_hash_undefined__";function NCe(t){return this.__data__.set(t,OCe),this}function FCe(t){return this.__data__.has(t)}function M5(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Qu;++e<n;)this.add(t[e])}M5.prototype.add=M5.prototype.push=NCe,M5.prototype.has=FCe;function PCe(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function kCe(t,e){return t.has(e)}var MCe=1,LCe=2;function Aj(t,e,n,r,i,a){var s=n&MCe,l=t.length,c=e.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(t),d=a.get(e);if(u&&d)return u==e&&d==t;var f=-1,h=!0,m=n&LCe?new M5:void 0;for(a.set(t,e),a.set(e,t);++f<l;){var g=t[f],v=e[f];if(r)var A=s?r(v,g,f,e,t,a):r(g,v,f,t,e,a);if(A!==void 0){if(A)continue;h=!1;break}if(m){if(!PCe(e,function(S,x){if(!kCe(m,x)&&(g===S||i(g,S,n,r,a)))return m.push(x)})){h=!1;break}}else if(!(g===v||i(g,v,n,r,a))){h=!1;break}}return a.delete(t),a.delete(e),h}function BCe(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function VCe(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var UCe=1,qCe=2,$Ce="[object Boolean]",jCe="[object Date]",zCe="[object Error]",HCe="[object Map]",YCe="[object Number]",KCe="[object RegExp]",XCe="[object Set]",GCe="[object String]",RCe="[object Symbol]",WCe="[object ArrayBuffer]",QCe="[object DataView]",wj=iu?iu.prototype:void 0,OS=wj?wj.valueOf:void 0;function JCe(t,e,n,r,i,a,s){switch(n){case QCe:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case WCe:return!(t.byteLength!=e.byteLength||!a(new O3(t),new O3(e)));case $Ce:case jCe:case YCe:return Rp(+t,+e);case zCe:return t.name==e.name&&t.message==e.message;case KCe:case GCe:return t==e+"";case HCe:var l=BCe;case XCe:var c=r&UCe;if(l||(l=VCe),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;r|=qCe,s.set(t,e);var d=Aj(l(t),l(e),r,i,a,s);return s.delete(t),d;case RCe:if(OS)return OS.call(t)==OS.call(e)}return!1}var ZCe=1,eTe=Object.prototype,tTe=eTe.hasOwnProperty;function nTe(t,e,n,r,i,a){var s=n&ZCe,l=C7(t),c=l.length,u=C7(e),d=u.length;if(c!=d&&!s)return!1;for(var f=c;f--;){var h=l[f];if(!(s?h in e:tTe.call(e,h)))return!1}var m=a.get(t),g=a.get(e);if(m&&g)return m==e&&g==t;var v=!0;a.set(t,e),a.set(e,t);for(var A=s;++f<c;){h=l[f];var S=t[h],x=e[h];if(r)var w=s?r(x,S,h,e,t,a):r(S,x,h,t,e,a);if(!(w===void 0?S===x||i(S,x,n,r,a):w)){v=!1;break}A||(A=h=="constructor")}if(v&&!A){var T=t.constructor,C=e.constructor;T!=C&&"constructor"in t&&"constructor"in e&&!(typeof T=="function"&&T instanceof T&&typeof C=="function"&&C instanceof C)&&(v=!1)}return a.delete(t),a.delete(e),v}var rTe=1,Sj="[object Arguments]",xj="[object Array]",L5="[object Object]",iTe=Object.prototype,Cj=iTe.hasOwnProperty;function aTe(t,e,n,r,i,a){var s=Ju(t),l=Ju(e),c=s?xj:n2(t),u=l?xj:n2(e);c=c==Sj?L5:c,u=u==Sj?L5:u;var d=c==L5,f=u==L5,h=c==u;if(h&&Zp(t)){if(!Zp(e))return!1;s=!0,d=!1}if(h&&!d)return a||(a=new su),s||y7(t)?Aj(t,e,n,r,i,a):JCe(t,e,c,n,r,i,a);if(!(n&rTe)){var m=d&&Cj.call(t,"__wrapped__"),g=f&&Cj.call(e,"__wrapped__");if(m||g){var v=m?t.value():t,A=g?e.value():e;return a||(a=new su),i(v,A,n,r,a)}}return h?(a||(a=new su),nTe(t,e,n,r,i,a)):!1}function Tj(t,e,n,r,i){return t===e?!0:t==null||e==null||!au(t)&&!au(e)?t!==t&&e!==e:aTe(t,e,n,r,Tj,i)}function sTe(t){return function(e,n,r){for(var i=-1,a=Object(e),s=r(e),l=s.length;l--;){var c=s[t?l:++i];if(n(a[c],c,a)===!1)break}return e}}var oTe=sTe();function NS(t,e,n){(n!==void 0&&!Rp(t[e],n)||n===void 0&&!(e in t))&&g7(t,e,n)}function lTe(t){return au(t)&&D3(t)}function FS(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function cTe(t){return Jp(t,t2(t))}function uTe(t,e,n,r,i,a,s){var l=FS(t,n),c=FS(e,n),u=s.get(c);if(u){NS(t,n,u);return}var d=a?a(l,c,n+"",t,e,s):void 0,f=d===void 0;if(f){var h=Ju(c),m=!h&&Zp(c),g=!h&&!m&&y7(c);d=c,h||m||g?Ju(l)?d=l:lTe(l)?d=S7(l):m?(f=!1,d=_O(c,!0)):g?(f=!1,d=$O(c,!0)):d=[]:f7(c)||m7(c)?(d=l,m7(l)?d=cTe(l):(!Wd(l)||h7(l))&&(d=zO(c))):f=!1}f&&(s.set(c,d),i(d,c,r,a,s),s.delete(c)),NS(t,n,d)}function Ej(t,e,n,r,i){t!==e&&oTe(e,function(a,s){if(i||(i=new su),Wd(a))uTe(t,e,s,n,Ej,r,i);else{var l=r?r(FS(t,s),a,s+"",t,e,i):void 0;l===void 0&&(l=a),NS(t,s,l)}},t2)}function PS(t,e){return Tj(t,e)}var g0=DCe(function(t,e,n){Ej(t,e,n)}),ir=(t=>(t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY",t))(ir||{});class Du{constructor(e,n,r={}){this.attrName=e,this.keyName=n;const i=ir.TYPE&ir.ATTRIBUTE;this.scope=r.scope!=null?r.scope&ir.LEVEL|i:ir.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(e){return Array.from(e.attributes).map(n=>n.name)}add(e,n){return this.canAdd(e,n)?(e.setAttribute(this.keyName,n),!0):!1}canAdd(e,n){return this.whitelist==null?!0:typeof n=="string"?this.whitelist.indexOf(n.replace(/["']/g,""))>-1:this.whitelist.indexOf(n)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const n=e.getAttribute(this.keyName);return this.canAdd(e,n)&&n?n:""}}class Fh extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const Ij=class mC{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,n=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(n){let r=null;try{r=e.parentNode}catch{return null}return this.find(r,n)}return null}create(e,n,r){const i=this.query(n);if(i==null)throw new Fh(`Unable to create ${n} blot`);const a=i,s=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:a.create(r),l=new a(e,s,r);return mC.blots.set(l.domNode,l),l}find(e,n=!1){return mC.find(e,n)}query(e,n=ir.ANY){let r;return typeof e=="string"?r=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?r=this.types.text:typeof e=="number"?e&ir.LEVEL&ir.BLOCK?r=this.types.block:e&ir.LEVEL&ir.INLINE&&(r=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(i=>(r=this.classes[i],!!r)),r=r||this.tags[e.tagName]),r==null?null:"scope"in r&&n&ir.LEVEL&r.scope&&n&ir.TYPE&r.scope?r:null}register(...e){return e.map(n=>{const r="blotName"in n,i="attrName"in n;if(!r&&!i)throw new Fh("Invalid definition");if(r&&n.blotName==="abstract")throw new Fh("Cannot register abstract class");const a=r?n.blotName:i?n.attrName:void 0;return this.types[a]=n,i?typeof n.keyName=="string"&&(this.attributes[n.keyName]=n):r&&(n.className&&(this.classes[n.className]=n),n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map(s=>s.toUpperCase()):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEach(s=>{(this.tags[s]==null||n.className==null)&&(this.tags[s]=n)}))),n})}};Ij.blots=new WeakMap;let Ph=Ij;function _j(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter(n=>n.indexOf(`${e}-`)===0)}class dTe extends Du{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(n=>n.split("-").slice(0,-1).join("-"))}add(e,n){return this.canAdd(e,n)?(this.remove(e),e.classList.add(`${this.keyName}-${n}`),!0):!1}remove(e){_j(e,this.keyName).forEach(n=>{e.classList.remove(n)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const n=(_j(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,n)?n:""}}const $c=dTe;function kS(t){const e=t.split("-"),n=e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return e[0]+n}class fTe extends Du{static keys(e){return(e.getAttribute("style")||"").split(";").map(n=>n.split(":")[0].trim())}add(e,n){return this.canAdd(e,n)?(e.style[kS(this.keyName)]=n,!0):!1}remove(e){e.style[kS(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const n=e.style[kS(this.keyName)];return this.canAdd(e,n)?n:""}}const m0=fTe;class hTe{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,n){n?e.add(this.domNode,n)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=Ph.find(this.domNode);if(e==null)return;const n=Du.keys(this.domNode),r=$c.keys(this.domNode),i=m0.keys(this.domNode);n.concat(r).concat(i).forEach(a=>{const s=e.scroll.query(a,ir.ATTRIBUTE);s instanceof Du&&(this.attributes[s.attrName]=s)})}copy(e){Object.keys(this.attributes).forEach(n=>{const r=this.attributes[n].value(this.domNode);e.format(n,r)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(n=>{this.attributes[n].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,n)=>(e[n]=this.attributes[n].value(this.domNode),e),{})}}const B5=hTe,Dj=class{constructor(e,n){this.scroll=e,this.domNode=n,Ph.blots.set(n,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new Fh("Blot definition missing tagName");let n,r;return Array.isArray(this.tagName)?(typeof e=="string"?(r=e.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof e=="number"&&(r=e),typeof r=="number"?n=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?n=document.createElement(r):n=document.createElement(this.tagName[0])):n=document.createElement(this.tagName),this.className&&n.classList.add(this.className),n}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),Ph.blots.delete(this.domNode)}deleteAt(e,n){this.isolate(e,n).remove()}formatAt(e,n,r,i){const a=this.isolate(e,n);if(this.scroll.query(r,ir.BLOT)!=null&&i)a.wrap(r,i);else if(this.scroll.query(r,ir.ATTRIBUTE)!=null){const s=this.scroll.create(this.statics.scope);a.wrap(s),s.format(r,i)}}insertAt(e,n,r){const i=r==null?this.scroll.create("text",n):this.scroll.create(n,r),a=this.split(e);this.parent.insertBefore(i,a||void 0)}isolate(e,n){const r=this.split(e);if(r==null)throw new Error("Attempt to isolate at end");return r.split(n),r}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,n){const r=typeof e=="string"?this.scroll.create(e,n):e;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(e,n){return e===0?this:this.next}update(e,n){}wrap(e,n){const r=typeof e=="string"?this.scroll.create(e,n):e;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new Fh(`Cannot wrap ${e}`);return r.appendChild(this),r}};Dj.blotName="abstract";let Oj=Dj;const Nj=class extends Oj{static value(e){return!0}index(e,n){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(n,1):-1}position(e,n){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Nj.scope=ir.INLINE_BLOT;const fo=Nj;class pTe{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const n=e.slice(1);this.append(...n)}}at(e){const n=this.iterator();let r=n();for(;r&&e>0;)e-=1,r=n();return r}contains(e){const n=this.iterator();let r=n();for(;r;){if(r===e)return!0;r=n()}return!1}indexOf(e){const n=this.iterator();let r=n(),i=0;for(;r;){if(r===e)return i;i+=1,r=n()}return-1}insertBefore(e,n){e!=null&&(this.remove(e),e.next=n,n!=null?(e.prev=n.prev,n.prev!=null&&(n.prev.next=e),n.prev=e,n===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let n=0,r=this.head;for(;r!=null;){if(r===e)return n;n+=r.length(),r=r.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const n=e;return e!=null&&(e=e.next),n}}find(e,n=!1){const r=this.iterator();let i=r();for(;i;){const a=i.length();if(e<a||n&&e===a&&(i.next==null||i.next.length()!==0))return[i,e];e-=a,i=r()}return[null,0]}forEach(e){const n=this.iterator();let r=n();for(;r;)e(r),r=n()}forEachAt(e,n,r){if(n<=0)return;const[i,a]=this.find(e);let s=e-a;const l=this.iterator(i);let c=l();for(;c&&s<e+n;){const u=c.length();e>s?r(c,e-s,Math.min(n,s+u-e)):r(c,0,Math.min(u,e+n-s)),s+=u,c=l()}}map(e){return this.reduce((n,r)=>(n.push(e(r)),n),[])}reduce(e,n){const r=this.iterator();let i=r();for(;i;)n=e(n,i),i=r();return n}}function Fj(t,e){const n=e.find(t);if(n)return n;try{return e.create(t)}catch{const r=e.create(ir.INLINE);return Array.from(t.childNodes).forEach(i=>{r.domNode.appendChild(i)}),t.parentNode&&t.parentNode.replaceChild(r.domNode,t),r.attach(),r}}const Pj=class O0 extends Oj{constructor(e,n){super(e,n),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,O0.uiClass&&this.uiNode.classList.add(O0.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new pTe,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const n=Fj(e,this.scroll);this.insertBefore(n,this.children.head||void 0)}catch(n){if(n instanceof Fh)return;throw n}})}deleteAt(e,n){if(e===0&&n===this.length())return this.remove();this.children.forEachAt(e,n,(r,i,a)=>{r.deleteAt(i,a)})}descendant(e,n=0){const[r,i]=this.children.find(n);return e.blotName==null&&e(r)||e.blotName!=null&&r instanceof e?[r,i]:r instanceof O0?r.descendant(e,i):[null,-1]}descendants(e,n=0,r=Number.MAX_VALUE){let i=[],a=r;return this.children.forEachAt(n,r,(s,l,c)=>{(e.blotName==null&&e(s)||e.blotName!=null&&s instanceof e)&&i.push(s),s instanceof O0&&(i=i.concat(s.descendants(e,l,a))),a-=c}),i}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(n=>{e||this.statics.allowedChildren.some(r=>n instanceof r)||(n.statics.scope===ir.BLOCK_BLOT?(n.next!=null&&this.splitAfter(n),n.prev!=null&&this.splitAfter(n.prev),n.parent.unwrap(),e=!0):n instanceof O0?n.unwrap():n.remove())})}formatAt(e,n,r,i){this.children.forEachAt(e,n,(a,s,l)=>{a.formatAt(s,l,r,i)})}insertAt(e,n,r){const[i,a]=this.children.find(e);if(i)i.insertAt(a,n,r);else{const s=r==null?this.scroll.create("text",n):this.scroll.create(n,r);this.appendChild(s)}}insertBefore(e,n){e.parent!=null&&e.parent.children.remove(e);let r=null;this.children.insertBefore(e,n||null),e.parent=this,n!=null&&(r=n.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(e.domNode,r),e.attach()}length(){return this.children.reduce((e,n)=>e+n.length(),0)}moveChildren(e,n){this.children.forEach(r=>{e.insertBefore(r,n)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n)}else this.remove()}path(e,n=!1){const[r,i]=this.children.find(e,n),a=[[this,e]];return r instanceof O0?a.concat(r.path(i,n)):(r!=null&&a.push([r,i]),a)}removeChild(e){this.children.remove(e)}replaceWith(e,n){const r=typeof e=="string"?this.scroll.create(e,n):e;return r instanceof O0&&this.moveChildren(r),super.replaceWith(r)}split(e,n=!1){if(!n){if(e===0)return this;if(e===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(e,this.length(),(i,a,s)=>{const l=i.split(a,n);l!=null&&r.appendChild(l)}),r}splitAfter(e){const n=this.clone();for(;e.next!=null;)n.appendChild(e.next);return this.parent&&this.parent.insertBefore(n,this.next||void 0),n}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,n){const r=[],i=[];e.forEach(a=>{a.target===this.domNode&&a.type==="childList"&&(r.push(...a.addedNodes),i.push(...a.removedNodes))}),i.forEach(a=>{if(a.parentNode!=null&&a.tagName!=="IFRAME"&&document.body.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const s=this.scroll.find(a);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(a=>a.parentNode===this.domNode&&a!==this.uiNode).sort((a,s)=>a===s?0:a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(a=>{let s=null;a.nextSibling!=null&&(s=this.scroll.find(a.nextSibling));const l=Fj(a,this.scroll);(l.next!==s||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,s||void 0))}),this.enforceAllowedChildren()}};Pj.uiClass="";const jc=Pj;function gTe(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}const kh=class Zh extends jc{static create(e){return super.create(e)}static formats(e,n){const r=n.query(Zh.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,n){super(e,n),this.attributes=new B5(this.domNode)}format(e,n){if(e===this.statics.blotName&&!n)this.children.forEach(r=>{r instanceof Zh||(r=r.wrap(Zh.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(e,ir.INLINE);if(r==null)return;r instanceof Du?this.attributes.attribute(r,n):n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n)}}formats(){const e=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(e[this.statics.blotName]=n),e}formatAt(e,n,r,i){this.formats()[r]!=null||this.scroll.query(r,ir.ATTRIBUTE)?this.isolate(e,n).format(r,i):super.formatAt(e,n,r,i)}optimize(e){super.optimize(e);const n=this.formats();if(Object.keys(n).length===0)return this.unwrap();const r=this.next;r instanceof Zh&&r.prev===this&&gTe(n,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(e,n){const r=super.replaceWith(e,n);return this.attributes.copy(r),r}update(e,n){super.update(e,n),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(e,n){const r=super.wrap(e,n);return r instanceof Zh&&this.attributes.move(r),r}};kh.allowedChildren=[kh,fo],kh.blotName="inline",kh.scope=ir.INLINE_BLOT,kh.tagName="SPAN";const MS=kh,Mh=class vC extends jc{static create(e){return super.create(e)}static formats(e,n){const r=n.query(vC.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,n){super(e,n),this.attributes=new B5(this.domNode)}format(e,n){const r=this.scroll.query(e,ir.BLOCK);r!=null&&(r instanceof Du?this.attributes.attribute(r,n):e===this.statics.blotName&&!n?this.replaceWith(vC.blotName):n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n))}formats(){const e=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(e[this.statics.blotName]=n),e}formatAt(e,n,r,i){this.scroll.query(r,ir.BLOCK)!=null?this.format(r,i):super.formatAt(e,n,r,i)}insertAt(e,n,r){if(r==null||this.scroll.query(n,ir.INLINE)!=null)super.insertAt(e,n,r);else{const i=this.split(e);if(i!=null){const a=this.scroll.create(n,r);i.parent.insertBefore(a,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,n){const r=super.replaceWith(e,n);return this.attributes.copy(r),r}update(e,n){super.update(e,n),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Mh.blotName="block",Mh.scope=ir.BLOCK_BLOT,Mh.tagName="P",Mh.allowedChildren=[MS,Mh,fo];const Pg=Mh,LS=class extends jc{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,n){super.deleteAt(e,n),this.enforceAllowedChildren()}formatAt(e,n,r,i){super.formatAt(e,n,r,i),this.enforceAllowedChildren()}insertAt(e,n,r){super.insertAt(e,n,r),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};LS.blotName="container",LS.scope=ir.BLOCK_BLOT;const V5=LS;class mTe extends fo{static formats(e,n){}format(e,n){super.formatAt(0,this.length(),e,n)}formatAt(e,n,r,i){e===0&&n===this.length()?this.format(r,i):super.formatAt(e,n,r,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const xl=mTe,vTe={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},bTe=100,Lh=class extends jc{constructor(e,n){super(null,n),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,vTe),this.attach()}create(e,n){return this.registry.create(this,e,n)}find(e,n=!1){const r=this.registry.find(e,n);return r?r.scroll===this?r:n?this.find(r.scroll.domNode.parentNode,!0):null:null}query(e,n=ir.ANY){return this.registry.query(e,n)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,n){this.update(),e===0&&n===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(e,n)}formatAt(e,n,r,i){this.update(),super.formatAt(e,n,r,i)}insertAt(e,n,r){this.update(),super.insertAt(e,n,r)}optimize(e=[],n={}){super.optimize(n);const r=n.mutationsMap||new WeakMap;let i=Array.from(this.observer.takeRecords());for(;i.length>0;)e.push(i.pop());const a=(c,u=!0)=>{c==null||c===this||c.domNode.parentNode!=null&&(r.has(c.domNode)||r.set(c.domNode,[]),u&&a(c.parent))},s=c=>{r.has(c.domNode)&&(c instanceof jc&&c.children.forEach(s),r.delete(c.domNode),c.optimize(n))};let l=e;for(let c=0;l.length>0;c+=1){if(c>=bTe)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(u=>{const d=this.find(u.target,!0);d!=null&&(d.domNode===u.target&&(u.type==="childList"?(a(this.find(u.previousSibling,!1)),Array.from(u.addedNodes).forEach(f=>{const h=this.find(f,!1);a(h,!1),h instanceof jc&&h.children.forEach(m=>{a(m,!1)})})):u.type==="attributes"&&a(d.prev)),a(d))}),this.children.forEach(s),l=Array.from(this.observer.takeRecords()),i=l.slice();i.length>0;)e.push(i.pop())}}update(e,n={}){e=e||this.observer.takeRecords();const r=new WeakMap;e.map(i=>{const a=this.find(i.target,!0);return a==null?null:r.has(a.domNode)?(r.get(a.domNode).push(i),null):(r.set(a.domNode,[i]),a)}).forEach(i=>{i!=null&&i!==this&&r.has(i.domNode)&&i.update(r.get(i.domNode)||[],n)}),n.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),n),this.optimize(e,n)}};Lh.blotName="scroll",Lh.defaultChild=Pg,Lh.allowedChildren=[Pg,V5],Lh.scope=ir.BLOCK_BLOT,Lh.tagName="DIV";const BS=Lh,VS=class TY extends fo{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,n){super(e,n),this.text=this.statics.value(this.domNode)}deleteAt(e,n){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+n)}index(e,n){return this.domNode===e?n:-1}insertAt(e,n,r){r==null?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,n,r)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof TY&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,n=!1){return[this.domNode,e]}split(e,n=!1){if(!n){if(e===0)return this;if(e===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(e,n){e.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};VS.blotName="text",VS.scope=ir.INLINE_BLOT;const U5=VS,kj=Object.freeze(Object.defineProperty({__proto__:null,Attributor:Du,AttributorStore:B5,BlockBlot:Pg,ClassAttributor:$c,ContainerBlot:V5,EmbedBlot:xl,InlineBlot:MS,LeafBlot:fo,ParentBlot:jc,Registry:Ph,Scope:ir,ScrollBlot:BS,StyleAttributor:m0,TextBlot:U5},Symbol.toStringTag,{value:"Module"}));var US={exports:{}},Cl=-1,ko=1,As=0;function kg(t,e,n,r,i){if(t===e)return t?[[As,t]]:[];if(n!=null){var a=ITe(t,e,n);if(a)return a}var s=qS(t,e),l=t.substring(0,s);t=t.substring(s),e=e.substring(s),s=q5(t,e);var c=t.substring(t.length-s);t=t.substring(0,t.length-s),e=e.substring(0,e.length-s);var u=yTe(t,e);return l&&u.unshift([As,l]),c&&u.push([As,c]),$S(u,i),r&&STe(u),u}function yTe(t,e){var n;if(!t)return[[ko,e]];if(!e)return[[Cl,t]];var r=t.length>e.length?t:e,i=t.length>e.length?e:t,a=r.indexOf(i);if(a!==-1)return n=[[ko,r.substring(0,a)],[As,i],[ko,r.substring(a+i.length)]],t.length>e.length&&(n[0][0]=n[2][0]=Cl),n;if(i.length===1)return[[Cl,t],[ko,e]];var s=wTe(t,e);if(s){var l=s[0],c=s[1],u=s[2],d=s[3],f=s[4],h=kg(l,u),m=kg(c,d);return h.concat([[As,f]],m)}return ATe(t,e)}function ATe(t,e){for(var n=t.length,r=e.length,i=Math.ceil((n+r)/2),a=i,s=2*i,l=new Array(s),c=new Array(s),u=0;u<s;u++)l[u]=-1,c[u]=-1;l[a+1]=0,c[a+1]=0;for(var d=n-r,f=d%2!==0,h=0,m=0,g=0,v=0,A=0;A<i;A++){for(var S=-A+h;S<=A-m;S+=2){var x=a+S,w;S===-A||S!==A&&l[x-1]<l[x+1]?w=l[x+1]:w=l[x-1]+1;for(var T=w-S;w<n&&T<r&&t.charAt(w)===e.charAt(T);)w++,T++;if(l[x]=w,w>n)m+=2;else if(T>r)h+=2;else if(f){var C=a+d-S;if(C>=0&&C<s&&c[C]!==-1){var _=n-c[C];if(w>=_)return Mj(t,e,w,T)}}}for(var E=-A+g;E<=A-v;E+=2){var C=a+E,_;E===-A||E!==A&&c[C-1]<c[C+1]?_=c[C+1]:_=c[C-1]+1;for(var D=_-E;_<n&&D<r&&t.charAt(n-_-1)===e.charAt(r-D-1);)_++,D++;if(c[C]=_,_>n)v+=2;else if(D>r)g+=2;else if(!f){var x=a+d-E;if(x>=0&&x<s&&l[x]!==-1){var w=l[x],T=a+w-x;if(_=n-_,w>=_)return Mj(t,e,w,T)}}}}return[[Cl,t],[ko,e]]}function Mj(t,e,n,r){var i=t.substring(0,n),a=e.substring(0,r),s=t.substring(n),l=e.substring(r),c=kg(i,a),u=kg(s,l);return c.concat(u)}function qS(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,a=0;n<i;)t.substring(a,i)==e.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return qj(t.charCodeAt(i-1))&&i--,i}function Lj(t,e){var n=t.length,r=e.length;if(n==0||r==0)return 0;n>r?t=t.substring(n-r):n<r&&(e=e.substring(0,n));var i=Math.min(n,r);if(t==e)return i;for(var a=0,s=1;;){var l=t.substring(i-s),c=e.indexOf(l);if(c==-1)return a;s+=c,(c==0||t.substring(i-s)==e.substring(0,s))&&(a=s,s++)}}function q5(t,e){if(!t||!e||t.slice(-1)!==e.slice(-1))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,a=0;n<i;)t.substring(t.length-i,t.length-a)==e.substring(e.length-i,e.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return $j(t.charCodeAt(t.length-i))&&i--,i}function wTe(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||r.length*2<n.length)return null;function i(m,g,v){for(var A=m.substring(v,v+Math.floor(m.length/4)),S=-1,x="",w,T,C,_;(S=g.indexOf(A,S+1))!==-1;){var E=qS(m.substring(v),g.substring(S)),D=q5(m.substring(0,v),g.substring(0,S));x.length<D+E&&(x=g.substring(S-D,S)+g.substring(S,S+E),w=m.substring(0,v-D),T=m.substring(v+E),C=g.substring(0,S-D),_=g.substring(S+E))}return x.length*2>=m.length?[w,T,C,_,x]:null}var a=i(n,r,Math.ceil(n.length/4)),s=i(n,r,Math.ceil(n.length/2)),l;if(!a&&!s)return null;s?a?l=a[4].length>s[4].length?a:s:l=s:l=a;var c,u,d,f;t.length>e.length?(c=l[0],u=l[1],d=l[2],f=l[3]):(d=l[0],f=l[1],c=l[2],u=l[3]);var h=l[4];return[c,u,d,f,h]}function STe(t){for(var e=!1,n=[],r=0,i=null,a=0,s=0,l=0,c=0,u=0;a<t.length;)t[a][0]==As?(n[r++]=a,s=c,l=u,c=0,u=0,i=t[a][1]):(t[a][0]==ko?c+=t[a][1].length:u+=t[a][1].length,i&&i.length<=Math.max(s,l)&&i.length<=Math.max(c,u)&&(t.splice(n[r-1],0,[Cl,i]),t[n[r-1]+1][0]=ko,r--,r--,a=r>0?n[r-1]:-1,s=0,l=0,c=0,u=0,i=null,e=!0)),a++;for(e&&$S(t),TTe(t),a=1;a<t.length;){if(t[a-1][0]==Cl&&t[a][0]==ko){var d=t[a-1][1],f=t[a][1],h=Lj(d,f),m=Lj(f,d);h>=m?(h>=d.length/2||h>=f.length/2)&&(t.splice(a,0,[As,f.substring(0,h)]),t[a-1][1]=d.substring(0,d.length-h),t[a+1][1]=f.substring(h),a++):(m>=d.length/2||m>=f.length/2)&&(t.splice(a,0,[As,d.substring(0,m)]),t[a-1][0]=ko,t[a-1][1]=f.substring(0,f.length-m),t[a+1][0]=Cl,t[a+1][1]=d.substring(m),a++),a++}a++}}var Bj=/[^a-zA-Z0-9]/,Vj=/\s/,Uj=/[\r\n]/,xTe=/\n\r?\n$/,CTe=/^\r?\n\r?\n/;function TTe(t){function e(m,g){if(!m||!g)return 6;var v=m.charAt(m.length-1),A=g.charAt(0),S=v.match(Bj),x=A.match(Bj),w=S&&v.match(Vj),T=x&&A.match(Vj),C=w&&v.match(Uj),_=T&&A.match(Uj),E=C&&m.match(xTe),D=_&&g.match(CTe);return E||D?5:C||_?4:S&&!w&&T?3:w||T?2:S||x?1:0}for(var n=1;n<t.length-1;){if(t[n-1][0]==As&&t[n+1][0]==As){var r=t[n-1][1],i=t[n][1],a=t[n+1][1],s=q5(r,i);if(s){var l=i.substring(i.length-s);r=r.substring(0,r.length-s),i=l+i.substring(0,i.length-s),a=l+a}for(var c=r,u=i,d=a,f=e(r,i)+e(i,a);i.charAt(0)===a.charAt(0);){r+=i.charAt(0),i=i.substring(1)+a.charAt(0),a=a.substring(1);var h=e(r,i)+e(i,a);h>=f&&(f=h,c=r,u=i,d=a)}t[n-1][1]!=c&&(c?t[n-1][1]=c:(t.splice(n-1,1),n--),t[n][1]=u,d?t[n+1][1]=d:(t.splice(n+1,1),n--))}n++}}function $S(t,e){t.push([As,""]);for(var n=0,r=0,i=0,a="",s="",l;n<t.length;){if(n<t.length-1&&!t[n][1]){t.splice(n,1);continue}switch(t[n][0]){case ko:i++,s+=t[n][1],n++;break;case Cl:r++,a+=t[n][1],n++;break;case As:var c=n-i-r-1;if(e){if(c>=0&&zj(t[c][1])){var u=t[c][1].slice(-1);if(t[c][1]=t[c][1].slice(0,-1),a=u+a,s=u+s,!t[c][1]){t.splice(c,1),n--;var d=c-1;t[d]&&t[d][0]===ko&&(i++,s=t[d][1]+s,d--),t[d]&&t[d][0]===Cl&&(r++,a=t[d][1]+a,d--),c=d}}if(jj(t[n][1])){var u=t[n][1].charAt(0);t[n][1]=t[n][1].slice(1),a+=u,s+=u}}if(n<t.length-1&&!t[n][1]){t.splice(n,1);break}if(a.length>0||s.length>0){a.length>0&&s.length>0&&(l=qS(s,a),l!==0&&(c>=0?t[c][1]+=s.substring(0,l):(t.splice(0,0,[As,s.substring(0,l)]),n++),s=s.substring(l),a=a.substring(l)),l=q5(s,a),l!==0&&(t[n][1]=s.substring(s.length-l)+t[n][1],s=s.substring(0,s.length-l),a=a.substring(0,a.length-l)));var f=i+r;a.length===0&&s.length===0?(t.splice(n-f,f),n=n-f):a.length===0?(t.splice(n-f,f,[ko,s]),n=n-f+1):s.length===0?(t.splice(n-f,f,[Cl,a]),n=n-f+1):(t.splice(n-f,f,[Cl,a],[ko,s]),n=n-f+2)}n!==0&&t[n-1][0]===As?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,i=0,r=0,a="",s="";break}}t[t.length-1][1]===""&&t.pop();var h=!1;for(n=1;n<t.length-1;)t[n-1][0]===As&&t[n+1][0]===As&&(t[n][1].substring(t[n][1].length-t[n-1][1].length)===t[n-1][1]?(t[n][1]=t[n-1][1]+t[n][1].substring(0,t[n][1].length-t[n-1][1].length),t[n+1][1]=t[n-1][1]+t[n+1][1],t.splice(n-1,1),h=!0):t[n][1].substring(0,t[n+1][1].length)==t[n+1][1]&&(t[n-1][1]+=t[n+1][1],t[n][1]=t[n][1].substring(t[n+1][1].length)+t[n+1][1],t.splice(n+1,1),h=!0)),n++;h&&$S(t,e)}function qj(t){return t>=55296&&t<=56319}function $j(t){return t>=56320&&t<=57343}function jj(t){return $j(t.charCodeAt(0))}function zj(t){return qj(t.charCodeAt(t.length-1))}function ETe(t){for(var e=[],n=0;n<t.length;n++)t[n][1].length>0&&e.push(t[n]);return e}function jS(t,e,n,r){return zj(t)||jj(r)?null:ETe([[As,t],[Cl,e],[ko,n],[As,r]])}function ITe(t,e,n){var r=typeof n=="number"?{index:n,length:0}:n.oldRange,i=typeof n=="number"?null:n.newRange,a=t.length,s=e.length;if(r.length===0&&(i===null||i.length===0)){var l=r.index,c=t.slice(0,l),u=t.slice(l),d=i?i.index:null;e:{var f=l+s-a;if(d!==null&&d!==f||f<0||f>s)break e;var h=e.slice(0,f),m=e.slice(f);if(m!==u)break e;var g=Math.min(l,f),v=c.slice(0,g),A=h.slice(0,g);if(v!==A)break e;var S=c.slice(g),x=h.slice(g);return jS(v,S,x,u)}e:{if(d!==null&&d!==l)break e;var w=l,h=e.slice(0,w),m=e.slice(w);if(h!==c)break e;var T=Math.min(a-w,s-w),C=u.slice(u.length-T),_=m.slice(m.length-T);if(C!==_)break e;var S=u.slice(0,u.length-T),x=m.slice(0,m.length-T);return jS(c,S,x,C)}}if(r.length>0&&i&&i.length===0)e:{var v=t.slice(0,r.index),C=t.slice(r.index+r.length),g=v.length,T=C.length;if(s<g+T)break e;var A=e.slice(0,g),_=e.slice(s-T);if(v!==A||C!==_)break e;var S=t.slice(g,a-T),x=e.slice(g,s-T);return jS(v,S,x,C)}return null}function $5(t,e,n,r){return kg(t,e,n,r,!0)}$5.INSERT=ko,$5.DELETE=Cl,$5.EQUAL=As;var _Te=$5,j5={exports:{}};j5.exports,function(t,e){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,a="[object Arguments]",s="[object Array]",l="[object Boolean]",c="[object Date]",u="[object Error]",d="[object Function]",f="[object GeneratorFunction]",h="[object Map]",m="[object Number]",g="[object Object]",v="[object Promise]",A="[object RegExp]",S="[object Set]",x="[object String]",w="[object Symbol]",T="[object WeakMap]",C="[object ArrayBuffer]",_="[object DataView]",E="[object Float32Array]",D="[object Float64Array]",B="[object Int8Array]",k="[object Int16Array]",P="[object Int32Array]",j="[object Uint8Array]",M="[object Uint8ClampedArray]",H="[object Uint16Array]",de="[object Uint32Array]",fe=/[\\^$.*+?()[\]{}|]/g,ee=/\w*$/,G=/^\[object .+?Constructor\]$/,ae=/^(?:0|[1-9]\d*)$/,Y={};Y[a]=Y[s]=Y[C]=Y[_]=Y[l]=Y[c]=Y[E]=Y[D]=Y[B]=Y[k]=Y[P]=Y[h]=Y[m]=Y[g]=Y[A]=Y[S]=Y[x]=Y[w]=Y[j]=Y[M]=Y[H]=Y[de]=!0,Y[u]=Y[d]=Y[T]=!1;var ge=typeof Oi=="object"&&Oi&&Oi.Object===Object&&Oi,ne=typeof self=="object"&&self&&self.Object===Object&&self,J=ge||ne||Function("return this")(),K=e&&!e.nodeType&&e,oe=K&&!0&&t&&!t.nodeType&&t,ve=oe&&oe.exports===K;function Ce(Z,Fe){return Z.set(Fe[0],Fe[1]),Z}function Se(Z,Fe){return Z.add(Fe),Z}function Te(Z,Fe){for(var tt=-1,Lt=Z?Z.length:0;++tt<Lt&&Fe(Z[tt],tt,Z)!==!1;);return Z}function De(Z,Fe){for(var tt=-1,Lt=Fe.length,or=Z.length;++tt<Lt;)Z[or+tt]=Fe[tt];return Z}function ie(Z,Fe,tt,Lt){var or=-1,Rn=Z?Z.length:0;for(Lt&&Rn&&(tt=Z[++or]);++or<Rn;)tt=Fe(tt,Z[or],or,Z);return tt}function U(Z,Fe){for(var tt=-1,Lt=Array(Z);++tt<Z;)Lt[tt]=Fe(tt);return Lt}function re(Z,Fe){return Z==null?void 0:Z[Fe]}function Q(Z){var Fe=!1;if(Z!=null&&typeof Z.toString!="function")try{Fe=!!(Z+"")}catch{}return Fe}function se(Z){var Fe=-1,tt=Array(Z.size);return Z.forEach(function(Lt,or){tt[++Fe]=[or,Lt]}),tt}function be(Z,Fe){return function(tt){return Z(Fe(tt))}}function me(Z){var Fe=-1,tt=Array(Z.size);return Z.forEach(function(Lt){tt[++Fe]=Lt}),tt}var ye=Array.prototype,Ie=Function.prototype,Ee=Object.prototype,he=J["__core-js_shared__"],V=function(){var Z=/[^.]+$/.exec(he&&he.keys&&he.keys.IE_PROTO||"");return Z?"Symbol(src)_1."+Z:""}(),te=Ie.toString,W=Ee.hasOwnProperty,ue=Ee.toString,Ae=RegExp("^"+te.call(W).replace(fe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pe=ve?J.Buffer:void 0,ke=J.Symbol,Le=J.Uint8Array,We=be(Object.getPrototypeOf,Object),gt=Object.create,At=Ee.propertyIsEnumerable,st=ye.splice,Je=Object.getOwnPropertySymbols,Ct=pe?pe.isBuffer:void 0,mt=be(Object.keys,Object),Ge=en(J,"DataView"),Tt=en(J,"Map"),Gt=en(J,"Promise"),xn=en(J,"Set"),bn=en(J,"WeakMap"),wn=en(Object,"create"),yn=Dn(Ge),Gn=Dn(Tt),On=Dn(Gt),qt=Dn(xn),at=Dn(bn),et=ke?ke.prototype:void 0,ut=et?et.valueOf:void 0;function Ht(Z){var Fe=-1,tt=Z?Z.length:0;for(this.clear();++Fe<tt;){var Lt=Z[Fe];this.set(Lt[0],Lt[1])}}function Nn(){this.__data__=wn?wn(null):{}}function Vn(Z){return this.has(Z)&&delete this.__data__[Z]}function er(Z){var Fe=this.__data__;if(wn){var tt=Fe[Z];return tt===r?void 0:tt}return W.call(Fe,Z)?Fe[Z]:void 0}function pr(Z){var Fe=this.__data__;return wn?Fe[Z]!==void 0:W.call(Fe,Z)}function tr(Z,Fe){var tt=this.__data__;return tt[Z]=wn&&Fe===void 0?r:Fe,this}Ht.prototype.clear=Nn,Ht.prototype.delete=Vn,Ht.prototype.get=er,Ht.prototype.has=pr,Ht.prototype.set=tr;function Cr(Z){var Fe=-1,tt=Z?Z.length:0;for(this.clear();++Fe<tt;){var Lt=Z[Fe];this.set(Lt[0],Lt[1])}}function Mr(){this.__data__=[]}function dn(Z){var Fe=this.__data__,tt=Pe(Fe,Z);if(tt<0)return!1;var Lt=Fe.length-1;return tt==Lt?Fe.pop():st.call(Fe,tt,1),!0}function lt(Z){var Fe=this.__data__,tt=Pe(Fe,Z);return tt<0?void 0:Fe[tt][1]}function ot(Z){return Pe(this.__data__,Z)>-1}function St(Z,Fe){var tt=this.__data__,Lt=Pe(tt,Z);return Lt<0?tt.push([Z,Fe]):tt[Lt][1]=Fe,this}Cr.prototype.clear=Mr,Cr.prototype.delete=dn,Cr.prototype.get=lt,Cr.prototype.has=ot,Cr.prototype.set=St;function Bt(Z){var Fe=-1,tt=Z?Z.length:0;for(this.clear();++Fe<tt;){var Lt=Z[Fe];this.set(Lt[0],Lt[1])}}function Vt(){this.__data__={hash:new Ht,map:new(Tt||Cr),string:new Ht}}function Ye(Z){return Ui(this,Z).delete(Z)}function Me(Z){return Ui(this,Z).get(Z)}function it(Z){return Ui(this,Z).has(Z)}function dt(Z,Fe){return Ui(this,Z).set(Z,Fe),this}Bt.prototype.clear=Vt,Bt.prototype.delete=Ye,Bt.prototype.get=Me,Bt.prototype.has=it,Bt.prototype.set=dt;function $t(Z){this.__data__=new Cr(Z)}function Wt(){this.__data__=new Cr}function bt(Z){return this.__data__.delete(Z)}function Be(Z){return this.__data__.get(Z)}function Ze(Z){return this.__data__.has(Z)}function Ft(Z,Fe){var tt=this.__data__;if(tt instanceof Cr){var Lt=tt.__data__;if(!Tt||Lt.length<n-1)return Lt.push([Z,Fe]),this;tt=this.__data__=new Bt(Lt)}return tt.set(Z,Fe),this}$t.prototype.clear=Wt,$t.prototype.delete=bt,$t.prototype.get=Be,$t.prototype.has=Ze,$t.prototype.set=Ft;function zt(Z,Fe){var tt=Va(Z)||ii(Z)?U(Z.length,String):[],Lt=tt.length,or=!!Lt;for(var Rn in Z)(Fe||W.call(Z,Rn))&&!(or&&(Rn=="length"||an(Rn,Lt)))&&tt.push(Rn);return tt}function wt(Z,Fe,tt){var Lt=Z[Fe];(!(W.call(Z,Fe)&&Yr(Lt,tt))||tt===void 0&&!(Fe in Z))&&(Z[Fe]=tt)}function Pe(Z,Fe){for(var tt=Z.length;tt--;)if(Yr(Z[tt][0],Fe))return tt;return-1}function Ke(Z,Fe){return Z&&Ei(Fe,po(Fe),Z)}function Et(Z,Fe,tt,Lt,or,Rn,_r){var Lr;if(Lt&&(Lr=Rn?Lt(Z,or,Rn,_r):Lt(Z)),Lr!==void 0)return Lr;if(!Ms(Z))return Z;var Pr=Va(Z);if(Pr){if(Lr=Fn(Z),!Fe)return ri(Z,Lr)}else{var Vr=Kt(Z),Zr=Vr==d||Vr==f;if(ws(Z))return Yn(Z,Fe);if(Vr==g||Vr==a||Zr&&!Rn){if(Q(Z))return Rn?Z:{};if(Lr=ar(Zr?{}:Z),!Fe)return _a(Z,Ke(Lr,Z))}else{if(!Y[Vr])return Rn?Z:{};Lr=Jr(Z,Vr,Et,Fe)}}_r||(_r=new $t);var _i=_r.get(Z);if(_i)return _i;if(_r.set(Z,Lr),!Pr)var qi=tt?Ii(Z):po(Z);return Te(qi||Z,function(Kr,Si){qi&&(Si=Kr,Kr=Z[Si]),wt(Lr,Si,Et(Kr,Fe,tt,Lt,Si,Z,_r))}),Lr}function Ut(Z){return Ms(Z)?gt(Z):{}}function Yt(Z,Fe,tt){var Lt=Fe(Z);return Va(Z)?Lt:De(Lt,tt(Z))}function Pn(Z){return ue.call(Z)}function zn(Z){if(!Ms(Z)||It(Z))return!1;var Fe=Ss(Z)||Q(Z)?Ae:G;return Fe.test(Dn(Z))}function Er(Z){if(!ln(Z))return mt(Z);var Fe=[];for(var tt in Object(Z))W.call(Z,tt)&&tt!="constructor"&&Fe.push(tt);return Fe}function Yn(Z,Fe){if(Fe)return Z.slice();var tt=new Z.constructor(Z.length);return Z.copy(tt),tt}function En(Z){var Fe=new Z.constructor(Z.byteLength);return new Le(Fe).set(new Le(Z)),Fe}function Fr(Z,Fe){var tt=Fe?En(Z.buffer):Z.buffer;return new Z.constructor(tt,Z.byteOffset,Z.byteLength)}function Kn(Z,Fe,tt){var Lt=Fe?tt(se(Z),!0):se(Z);return ie(Lt,Ce,new Z.constructor)}function cr(Z){var Fe=new Z.constructor(Z.source,ee.exec(Z));return Fe.lastIndex=Z.lastIndex,Fe}function Bn(Z,Fe,tt){var Lt=Fe?tt(me(Z),!0):me(Z);return ie(Lt,Se,new Z.constructor)}function pi(Z){return ut?Object(ut.call(Z)):{}}function ci(Z,Fe){var tt=Fe?En(Z.buffer):Z.buffer;return new Z.constructor(tt,Z.byteOffset,Z.length)}function ri(Z,Fe){var tt=-1,Lt=Z.length;for(Fe||(Fe=Array(Lt));++tt<Lt;)Fe[tt]=Z[tt];return Fe}function Ei(Z,Fe,tt,Lt){tt||(tt={});for(var or=-1,Rn=Fe.length;++or<Rn;){var _r=Fe[or],Lr=Lt?Lt(tt[_r],Z[_r],_r,tt,Z):void 0;wt(tt,_r,Lr===void 0?Z[_r]:Lr)}return tt}function _a(Z,Fe){return Ei(Z,qe(Z),Fe)}function Ii(Z){return Yt(Z,po,qe)}function Ui(Z,Fe){var tt=Z.__data__;return He(Fe)?tt[typeof Fe=="string"?"string":"hash"]:tt.map}function en(Z,Fe){var tt=re(Z,Fe);return zn(tt)?tt:void 0}var qe=Je?be(Je,Object):bi,Kt=Pn;(Ge&&Kt(new Ge(new ArrayBuffer(1)))!=_||Tt&&Kt(new Tt)!=h||Gt&&Kt(Gt.resolve())!=v||xn&&Kt(new xn)!=S||bn&&Kt(new bn)!=T)&&(Kt=function(Z){var Fe=ue.call(Z),tt=Fe==g?Z.constructor:void 0,Lt=tt?Dn(tt):void 0;if(Lt)switch(Lt){case yn:return _;case Gn:return h;case On:return v;case qt:return S;case at:return T}return Fe});function Fn(Z){var Fe=Z.length,tt=Z.constructor(Fe);return Fe&&typeof Z[0]=="string"&&W.call(Z,"index")&&(tt.index=Z.index,tt.input=Z.input),tt}function ar(Z){return typeof Z.constructor=="function"&&!ln(Z)?Ut(We(Z)):{}}function Jr(Z,Fe,tt,Lt){var or=Z.constructor;switch(Fe){case C:return En(Z);case l:case c:return new or(+Z);case _:return Fr(Z,Lt);case E:case D:case B:case k:case P:case j:case M:case H:case de:return ci(Z,Lt);case h:return Kn(Z,Lt,tt);case m:case x:return new or(Z);case A:return cr(Z);case S:return Bn(Z,Lt,tt);case w:return pi(Z)}}function an(Z,Fe){return Fe=Fe??i,!!Fe&&(typeof Z=="number"||ae.test(Z))&&Z>-1&&Z%1==0&&Z<Fe}function He(Z){var Fe=typeof Z;return Fe=="string"||Fe=="number"||Fe=="symbol"||Fe=="boolean"?Z!=="__proto__":Z===null}function It(Z){return!!V&&V in Z}function ln(Z){var Fe=Z&&Z.constructor,tt=typeof Fe=="function"&&Fe.prototype||Ee;return Z===tt}function Dn(Z){if(Z!=null){try{return te.call(Z)}catch{}try{return Z+""}catch{}}return""}function br(Z){return Et(Z,!0,!0)}function Yr(Z,Fe){return Z===Fe||Z!==Z&&Fe!==Fe}function ii(Z){return El(Z)&&W.call(Z,"callee")&&(!At.call(Z,"callee")||ue.call(Z)==a)}var Va=Array.isArray;function ds(Z){return Z!=null&&ks(Z.length)&&!Ss(Z)}function El(Z){return Il(Z)&&ds(Z)}var ws=Ct||yi;function Ss(Z){var Fe=Ms(Z)?ue.call(Z):"";return Fe==d||Fe==f}function ks(Z){return typeof Z=="number"&&Z>-1&&Z%1==0&&Z<=i}function Ms(Z){var Fe=typeof Z;return!!Z&&(Fe=="object"||Fe=="function")}function Il(Z){return!!Z&&typeof Z=="object"}function po(Z){return ds(Z)?zt(Z):Er(Z)}function bi(){return[]}function yi(){return!1}t.exports=br}(j5,j5.exports);var Hj=j5.exports,z5={exports:{}};z5.exports,function(t,e){var n=200,r="__lodash_hash_undefined__",i=1,a=2,s=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",d="[object Boolean]",f="[object Date]",h="[object Error]",m="[object Function]",g="[object GeneratorFunction]",v="[object Map]",A="[object Number]",S="[object Null]",x="[object Object]",w="[object Promise]",T="[object Proxy]",C="[object RegExp]",_="[object Set]",E="[object String]",D="[object Symbol]",B="[object Undefined]",k="[object WeakMap]",P="[object ArrayBuffer]",j="[object DataView]",M="[object Float32Array]",H="[object Float64Array]",de="[object Int8Array]",fe="[object Int16Array]",ee="[object Int32Array]",G="[object Uint8Array]",ae="[object Uint8ClampedArray]",Y="[object Uint16Array]",ge="[object Uint32Array]",ne=/[\\^$.*+?()[\]{}|]/g,J=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,oe={};oe[M]=oe[H]=oe[de]=oe[fe]=oe[ee]=oe[G]=oe[ae]=oe[Y]=oe[ge]=!0,oe[l]=oe[c]=oe[P]=oe[d]=oe[j]=oe[f]=oe[h]=oe[m]=oe[v]=oe[A]=oe[x]=oe[C]=oe[_]=oe[E]=oe[k]=!1;var ve=typeof Oi=="object"&&Oi&&Oi.Object===Object&&Oi,Ce=typeof self=="object"&&self&&self.Object===Object&&self,Se=ve||Ce||Function("return this")(),Te=e&&!e.nodeType&&e,De=Te&&!0&&t&&!t.nodeType&&t,ie=De&&De.exports===Te,U=ie&&ve.process,re=function(){try{return U&&U.binding&&U.binding("util")}catch{}}(),Q=re&&re.isTypedArray;function se(Z,Fe){for(var tt=-1,Lt=Z==null?0:Z.length,or=0,Rn=[];++tt<Lt;){var _r=Z[tt];Fe(_r,tt,Z)&&(Rn[or++]=_r)}return Rn}function be(Z,Fe){for(var tt=-1,Lt=Fe.length,or=Z.length;++tt<Lt;)Z[or+tt]=Fe[tt];return Z}function me(Z,Fe){for(var tt=-1,Lt=Z==null?0:Z.length;++tt<Lt;)if(Fe(Z[tt],tt,Z))return!0;return!1}function ye(Z,Fe){for(var tt=-1,Lt=Array(Z);++tt<Z;)Lt[tt]=Fe(tt);return Lt}function Ie(Z){return function(Fe){return Z(Fe)}}function Ee(Z,Fe){return Z.has(Fe)}function he(Z,Fe){return Z==null?void 0:Z[Fe]}function V(Z){var Fe=-1,tt=Array(Z.size);return Z.forEach(function(Lt,or){tt[++Fe]=[or,Lt]}),tt}function te(Z,Fe){return function(tt){return Z(Fe(tt))}}function W(Z){var Fe=-1,tt=Array(Z.size);return Z.forEach(function(Lt){tt[++Fe]=Lt}),tt}var ue=Array.prototype,Ae=Function.prototype,pe=Object.prototype,ke=Se["__core-js_shared__"],Le=Ae.toString,We=pe.hasOwnProperty,gt=function(){var Z=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||"");return Z?"Symbol(src)_1."+Z:""}(),At=pe.toString,st=RegExp("^"+Le.call(We).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Je=ie?Se.Buffer:void 0,Ct=Se.Symbol,mt=Se.Uint8Array,Ge=pe.propertyIsEnumerable,Tt=ue.splice,Gt=Ct?Ct.toStringTag:void 0,xn=Object.getOwnPropertySymbols,bn=Je?Je.isBuffer:void 0,wn=te(Object.keys,Object),yn=qe(Se,"DataView"),Gn=qe(Se,"Map"),On=qe(Se,"Promise"),qt=qe(Se,"Set"),at=qe(Se,"WeakMap"),et=qe(Object,"create"),ut=Dn(yn),Ht=Dn(Gn),Nn=Dn(On),Vn=Dn(qt),er=Dn(at),pr=Ct?Ct.prototype:void 0,tr=pr?pr.valueOf:void 0;function Cr(Z){var Fe=-1,tt=Z==null?0:Z.length;for(this.clear();++Fe<tt;){var Lt=Z[Fe];this.set(Lt[0],Lt[1])}}function Mr(){this.__data__=et?et(null):{},this.size=0}function dn(Z){var Fe=this.has(Z)&&delete this.__data__[Z];return this.size-=Fe?1:0,Fe}function lt(Z){var Fe=this.__data__;if(et){var tt=Fe[Z];return tt===r?void 0:tt}return We.call(Fe,Z)?Fe[Z]:void 0}function ot(Z){var Fe=this.__data__;return et?Fe[Z]!==void 0:We.call(Fe,Z)}function St(Z,Fe){var tt=this.__data__;return this.size+=this.has(Z)?0:1,tt[Z]=et&&Fe===void 0?r:Fe,this}Cr.prototype.clear=Mr,Cr.prototype.delete=dn,Cr.prototype.get=lt,Cr.prototype.has=ot,Cr.prototype.set=St;function Bt(Z){var Fe=-1,tt=Z==null?0:Z.length;for(this.clear();++Fe<tt;){var Lt=Z[Fe];this.set(Lt[0],Lt[1])}}function Vt(){this.__data__=[],this.size=0}function Ye(Z){var Fe=this.__data__,tt=Yn(Fe,Z);if(tt<0)return!1;var Lt=Fe.length-1;return tt==Lt?Fe.pop():Tt.call(Fe,tt,1),--this.size,!0}function Me(Z){var Fe=this.__data__,tt=Yn(Fe,Z);return tt<0?void 0:Fe[tt][1]}function it(Z){return Yn(this.__data__,Z)>-1}function dt(Z,Fe){var tt=this.__data__,Lt=Yn(tt,Z);return Lt<0?(++this.size,tt.push([Z,Fe])):tt[Lt][1]=Fe,this}Bt.prototype.clear=Vt,Bt.prototype.delete=Ye,Bt.prototype.get=Me,Bt.prototype.has=it,Bt.prototype.set=dt;function $t(Z){var Fe=-1,tt=Z==null?0:Z.length;for(this.clear();++Fe<tt;){var Lt=Z[Fe];this.set(Lt[0],Lt[1])}}function Wt(){this.size=0,this.__data__={hash:new Cr,map:new(Gn||Bt),string:new Cr}}function bt(Z){var Fe=en(this,Z).delete(Z);return this.size-=Fe?1:0,Fe}function Be(Z){return en(this,Z).get(Z)}function Ze(Z){return en(this,Z).has(Z)}function Ft(Z,Fe){var tt=en(this,Z),Lt=tt.size;return tt.set(Z,Fe),this.size+=tt.size==Lt?0:1,this}$t.prototype.clear=Wt,$t.prototype.delete=bt,$t.prototype.get=Be,$t.prototype.has=Ze,$t.prototype.set=Ft;function zt(Z){var Fe=-1,tt=Z==null?0:Z.length;for(this.__data__=new $t;++Fe<tt;)this.add(Z[Fe])}function wt(Z){return this.__data__.set(Z,r),this}function Pe(Z){return this.__data__.has(Z)}zt.prototype.add=zt.prototype.push=wt,zt.prototype.has=Pe;function Ke(Z){var Fe=this.__data__=new Bt(Z);this.size=Fe.size}function Et(){this.__data__=new Bt,this.size=0}function Ut(Z){var Fe=this.__data__,tt=Fe.delete(Z);return this.size=Fe.size,tt}function Yt(Z){return this.__data__.get(Z)}function Pn(Z){return this.__data__.has(Z)}function zn(Z,Fe){var tt=this.__data__;if(tt instanceof Bt){var Lt=tt.__data__;if(!Gn||Lt.length<n-1)return Lt.push([Z,Fe]),this.size=++tt.size,this;tt=this.__data__=new $t(Lt)}return tt.set(Z,Fe),this.size=tt.size,this}Ke.prototype.clear=Et,Ke.prototype.delete=Ut,Ke.prototype.get=Yt,Ke.prototype.has=Pn,Ke.prototype.set=zn;function Er(Z,Fe){var tt=ii(Z),Lt=!tt&&Yr(Z),or=!tt&&!Lt&&ds(Z),Rn=!tt&&!Lt&&!or&&Il(Z),_r=tt||Lt||or||Rn,Lr=_r?ye(Z.length,String):[],Pr=Lr.length;for(var Vr in Z)(Fe||We.call(Z,Vr))&&!(_r&&(Vr=="length"||or&&(Vr=="offset"||Vr=="parent")||Rn&&(Vr=="buffer"||Vr=="byteLength"||Vr=="byteOffset")||Jr(Vr,Pr)))&&Lr.push(Vr);return Lr}function Yn(Z,Fe){for(var tt=Z.length;tt--;)if(br(Z[tt][0],Fe))return tt;return-1}function En(Z,Fe,tt){var Lt=Fe(Z);return ii(Z)?Lt:be(Lt,tt(Z))}function Fr(Z){return Z==null?Z===void 0?B:S:Gt&&Gt in Object(Z)?Kt(Z):ln(Z)}function Kn(Z){return Ms(Z)&&Fr(Z)==l}function cr(Z,Fe,tt,Lt,or){return Z===Fe?!0:Z==null||Fe==null||!Ms(Z)&&!Ms(Fe)?Z!==Z&&Fe!==Fe:Bn(Z,Fe,tt,Lt,cr,or)}function Bn(Z,Fe,tt,Lt,or,Rn){var _r=ii(Z),Lr=ii(Fe),Pr=_r?c:ar(Z),Vr=Lr?c:ar(Fe);Pr=Pr==l?x:Pr,Vr=Vr==l?x:Vr;var Zr=Pr==x,_i=Vr==x,qi=Pr==Vr;if(qi&&ds(Z)){if(!ds(Fe))return!1;_r=!0,Zr=!1}if(qi&&!Zr)return Rn||(Rn=new Ke),_r||Il(Z)?Ei(Z,Fe,tt,Lt,or,Rn):_a(Z,Fe,Pr,tt,Lt,or,Rn);if(!(tt&i)){var Kr=Zr&&We.call(Z,"__wrapped__"),Si=_i&&We.call(Fe,"__wrapped__");if(Kr||Si){var ba=Kr?Z.value():Z,Ma=Si?Fe.value():Fe;return Rn||(Rn=new Ke),or(ba,Ma,tt,Lt,Rn)}}return qi?(Rn||(Rn=new Ke),Ii(Z,Fe,tt,Lt,or,Rn)):!1}function pi(Z){if(!ks(Z)||He(Z))return!1;var Fe=ws(Z)?st:J;return Fe.test(Dn(Z))}function ci(Z){return Ms(Z)&&Ss(Z.length)&&!!oe[Fr(Z)]}function ri(Z){if(!It(Z))return wn(Z);var Fe=[];for(var tt in Object(Z))We.call(Z,tt)&&tt!="constructor"&&Fe.push(tt);return Fe}function Ei(Z,Fe,tt,Lt,or,Rn){var _r=tt&i,Lr=Z.length,Pr=Fe.length;if(Lr!=Pr&&!(_r&&Pr>Lr))return!1;var Vr=Rn.get(Z);if(Vr&&Rn.get(Fe))return Vr==Fe;var Zr=-1,_i=!0,qi=tt&a?new zt:void 0;for(Rn.set(Z,Fe),Rn.set(Fe,Z);++Zr<Lr;){var Kr=Z[Zr],Si=Fe[Zr];if(Lt)var ba=_r?Lt(Si,Kr,Zr,Fe,Z,Rn):Lt(Kr,Si,Zr,Z,Fe,Rn);if(ba!==void 0){if(ba)continue;_i=!1;break}if(qi){if(!me(Fe,function(Ma,fs){if(!Ee(qi,fs)&&(Kr===Ma||or(Kr,Ma,tt,Lt,Rn)))return qi.push(fs)})){_i=!1;break}}else if(!(Kr===Si||or(Kr,Si,tt,Lt,Rn))){_i=!1;break}}return Rn.delete(Z),Rn.delete(Fe),_i}function _a(Z,Fe,tt,Lt,or,Rn,_r){switch(tt){case j:if(Z.byteLength!=Fe.byteLength||Z.byteOffset!=Fe.byteOffset)return!1;Z=Z.buffer,Fe=Fe.buffer;case P:return!(Z.byteLength!=Fe.byteLength||!Rn(new mt(Z),new mt(Fe)));case d:case f:case A:return br(+Z,+Fe);case h:return Z.name==Fe.name&&Z.message==Fe.message;case C:case E:return Z==Fe+"";case v:var Lr=V;case _:var Pr=Lt&i;if(Lr||(Lr=W),Z.size!=Fe.size&&!Pr)return!1;var Vr=_r.get(Z);if(Vr)return Vr==Fe;Lt|=a,_r.set(Z,Fe);var Zr=Ei(Lr(Z),Lr(Fe),Lt,or,Rn,_r);return _r.delete(Z),Zr;case D:if(tr)return tr.call(Z)==tr.call(Fe)}return!1}function Ii(Z,Fe,tt,Lt,or,Rn){var _r=tt&i,Lr=Ui(Z),Pr=Lr.length,Vr=Ui(Fe),Zr=Vr.length;if(Pr!=Zr&&!_r)return!1;for(var _i=Pr;_i--;){var qi=Lr[_i];if(!(_r?qi in Fe:We.call(Fe,qi)))return!1}var Kr=Rn.get(Z);if(Kr&&Rn.get(Fe))return Kr==Fe;var Si=!0;Rn.set(Z,Fe),Rn.set(Fe,Z);for(var ba=_r;++_i<Pr;){qi=Lr[_i];var Ma=Z[qi],fs=Fe[qi];if(Lt)var hs=_r?Lt(fs,Ma,qi,Fe,Z,Rn):Lt(Ma,fs,qi,Z,Fe,Rn);if(!(hs===void 0?Ma===fs||or(Ma,fs,tt,Lt,Rn):hs)){Si=!1;break}ba||(ba=qi=="constructor")}if(Si&&!ba){var Ua=Z.constructor,ui=Fe.constructor;Ua!=ui&&"constructor"in Z&&"constructor"in Fe&&!(typeof Ua=="function"&&Ua instanceof Ua&&typeof ui=="function"&&ui instanceof ui)&&(Si=!1)}return Rn.delete(Z),Rn.delete(Fe),Si}function Ui(Z){return En(Z,po,Fn)}function en(Z,Fe){var tt=Z.__data__;return an(Fe)?tt[typeof Fe=="string"?"string":"hash"]:tt.map}function qe(Z,Fe){var tt=he(Z,Fe);return pi(tt)?tt:void 0}function Kt(Z){var Fe=We.call(Z,Gt),tt=Z[Gt];try{Z[Gt]=void 0;var Lt=!0}catch{}var or=At.call(Z);return Lt&&(Fe?Z[Gt]=tt:delete Z[Gt]),or}var Fn=xn?function(Z){return Z==null?[]:(Z=Object(Z),se(xn(Z),function(Fe){return Ge.call(Z,Fe)}))}:bi,ar=Fr;(yn&&ar(new yn(new ArrayBuffer(1)))!=j||Gn&&ar(new Gn)!=v||On&&ar(On.resolve())!=w||qt&&ar(new qt)!=_||at&&ar(new at)!=k)&&(ar=function(Z){var Fe=Fr(Z),tt=Fe==x?Z.constructor:void 0,Lt=tt?Dn(tt):"";if(Lt)switch(Lt){case ut:return j;case Ht:return v;case Nn:return w;case Vn:return _;case er:return k}return Fe});function Jr(Z,Fe){return Fe=Fe??s,!!Fe&&(typeof Z=="number"||K.test(Z))&&Z>-1&&Z%1==0&&Z<Fe}function an(Z){var Fe=typeof Z;return Fe=="string"||Fe=="number"||Fe=="symbol"||Fe=="boolean"?Z!=="__proto__":Z===null}function He(Z){return!!gt&&gt in Z}function It(Z){var Fe=Z&&Z.constructor,tt=typeof Fe=="function"&&Fe.prototype||pe;return Z===tt}function ln(Z){return At.call(Z)}function Dn(Z){if(Z!=null){try{return Le.call(Z)}catch{}try{return Z+""}catch{}}return""}function br(Z,Fe){return Z===Fe||Z!==Z&&Fe!==Fe}var Yr=Kn(function(){return arguments}())?Kn:function(Z){return Ms(Z)&&We.call(Z,"callee")&&!Ge.call(Z,"callee")},ii=Array.isArray;function Va(Z){return Z!=null&&Ss(Z.length)&&!ws(Z)}var ds=bn||yi;function El(Z,Fe){return cr(Z,Fe)}function ws(Z){if(!ks(Z))return!1;var Fe=Fr(Z);return Fe==m||Fe==g||Fe==u||Fe==T}function Ss(Z){return typeof Z=="number"&&Z>-1&&Z%1==0&&Z<=s}function ks(Z){var Fe=typeof Z;return Z!=null&&(Fe=="object"||Fe=="function")}function Ms(Z){return Z!=null&&typeof Z=="object"}var Il=Q?Ie(Q):ci;function po(Z){return Va(Z)?Er(Z):ri(Z)}function bi(){return[]}function yi(){return!1}t.exports=El}(z5,z5.exports);var Yj=z5.exports,zS={};Object.defineProperty(zS,"__esModule",{value:!0});const DTe=Hj,OTe=Yj;var HS;(function(t){function e(a={},s={},l=!1){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let c=DTe(s);l||(c=Object.keys(c).reduce((u,d)=>(c[d]!=null&&(u[d]=c[d]),u),{}));for(const u in a)a[u]!==void 0&&s[u]===void 0&&(c[u]=a[u]);return Object.keys(c).length>0?c:void 0}t.compose=e;function n(a={},s={}){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});const l=Object.keys(a).concat(Object.keys(s)).reduce((c,u)=>(OTe(a[u],s[u])||(c[u]=s[u]===void 0?null:s[u]),c),{});return Object.keys(l).length>0?l:void 0}t.diff=n;function r(a={},s={}){a=a||{};const l=Object.keys(s).reduce((c,u)=>(s[u]!==a[u]&&a[u]!==void 0&&(c[u]=s[u]),c),{});return Object.keys(a).reduce((c,u)=>(a[u]!==s[u]&&s[u]===void 0&&(c[u]=null),c),l)}t.invert=r;function i(a,s,l=!1){if(typeof a!="object")return s;if(typeof s!="object")return;if(!l)return s;const c=Object.keys(s).reduce((u,d)=>(a[d]===void 0&&(u[d]=s[d]),u),{});return Object.keys(c).length>0?c:void 0}t.transform=i})(HS||(HS={})),zS.default=HS;var H5={};Object.defineProperty(H5,"__esModule",{value:!0});var YS;(function(t){function e(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}t.length=e})(YS||(YS={})),H5.default=YS;var KS={};Object.defineProperty(KS,"__esModule",{value:!0});const Kj=H5;class NTe{constructor(e){this.ops=e,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(e){e||(e=1/0);const n=this.ops[this.index];if(n){const r=this.offset,i=Kj.default.length(n);if(e>=i-r?(e=i-r,this.index+=1,this.offset=0):this.offset+=e,typeof n.delete=="number")return{delete:e};{const a={};return n.attributes&&(a.attributes=n.attributes),typeof n.retain=="number"?a.retain=e:typeof n.retain=="object"&&n.retain!==null?a.retain=n.retain:typeof n.insert=="string"?a.insert=n.insert.substr(r,e):a.insert=n.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?Kj.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const e=this.ops[this.index];return e?typeof e.delete=="number"?"delete":typeof e.retain=="number"||typeof e.retain=="object"&&e.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const e=this.offset,n=this.index,r=this.next(),i=this.ops.slice(this.index);return this.offset=e,this.index=n,[r].concat(i)}}else return[]}}KS.default=NTe,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const n=_Te,r=Hj,i=Yj,a=zS;e.AttributeMap=a.default;const s=H5;e.Op=s.default;const l=KS;e.OpIterator=l.default;const c="\0",u=(f,h)=>{if(typeof f!="object"||f===null)throw new Error(`cannot retain a ${typeof f}`);if(typeof h!="object"||h===null)throw new Error(`cannot retain a ${typeof h}`);const m=Object.keys(f)[0];if(!m||m!==Object.keys(h)[0])throw new Error(`embed types not matched: ${m} != ${Object.keys(h)[0]}`);return[m,f[m],h[m]]};class d{constructor(h){Array.isArray(h)?this.ops=h:h!=null&&Array.isArray(h.ops)?this.ops=h.ops:this.ops=[]}static registerEmbed(h,m){this.handlers[h]=m}static unregisterEmbed(h){delete this.handlers[h]}static getHandler(h){const m=this.handlers[h];if(!m)throw new Error(`no handlers for embed type "${h}"`);return m}insert(h,m){const g={};return typeof h=="string"&&h.length===0?this:(g.insert=h,m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(g.attributes=m),this.push(g))}delete(h){return h<=0?this:this.push({delete:h})}retain(h,m){if(typeof h=="number"&&h<=0)return this;const g={retain:h};return m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(g.attributes=m),this.push(g)}push(h){let m=this.ops.length,g=this.ops[m-1];if(h=r(h),typeof g=="object"){if(typeof h.delete=="number"&&typeof g.delete=="number")return this.ops[m-1]={delete:g.delete+h.delete},this;if(typeof g.delete=="number"&&h.insert!=null&&(m-=1,g=this.ops[m-1],typeof g!="object"))return this.ops.unshift(h),this;if(i(h.attributes,g.attributes)){if(typeof h.insert=="string"&&typeof g.insert=="string")return this.ops[m-1]={insert:g.insert+h.insert},typeof h.attributes=="object"&&(this.ops[m-1].attributes=h.attributes),this;if(typeof h.retain=="number"&&typeof g.retain=="number")return this.ops[m-1]={retain:g.retain+h.retain},typeof h.attributes=="object"&&(this.ops[m-1].attributes=h.attributes),this}}return m===this.ops.length?this.ops.push(h):this.ops.splice(m,0,h),this}chop(){const h=this.ops[this.ops.length-1];return h&&typeof h.retain=="number"&&!h.attributes&&this.ops.pop(),this}filter(h){return this.ops.filter(h)}forEach(h){this.ops.forEach(h)}map(h){return this.ops.map(h)}partition(h){const m=[],g=[];return this.forEach(v=>{(h(v)?m:g).push(v)}),[m,g]}reduce(h,m){return this.ops.reduce(h,m)}changeLength(){return this.reduce((h,m)=>m.insert?h+s.default.length(m):m.delete?h-m.delete:h,0)}length(){return this.reduce((h,m)=>h+s.default.length(m),0)}slice(h=0,m=1/0){const g=[],v=new l.default(this.ops);let A=0;for(;A<m&&v.hasNext();){let S;A<h?S=v.next(h-A):(S=v.next(m-A),g.push(S)),A+=s.default.length(S)}return new d(g)}compose(h){const m=new l.default(this.ops),g=new l.default(h.ops),v=[],A=g.peek();if(A!=null&&typeof A.retain=="number"&&A.attributes==null){let x=A.retain;for(;m.peekType()==="insert"&&m.peekLength()<=x;)x-=m.peekLength(),v.push(m.next());A.retain-x>0&&g.next(A.retain-x)}const S=new d(v);for(;m.hasNext()||g.hasNext();)if(g.peekType()==="insert")S.push(g.next());else if(m.peekType()==="delete")S.push(m.next());else{const x=Math.min(m.peekLength(),g.peekLength()),w=m.next(x),T=g.next(x);if(T.retain){const C={};if(typeof w.retain=="number")C.retain=typeof T.retain=="number"?x:T.retain;else if(typeof T.retain=="number")w.retain==null?C.insert=w.insert:C.retain=w.retain;else{const E=w.retain==null?"insert":"retain",[D,B,k]=u(w[E],T.retain),P=d.getHandler(D);C[E]={[D]:P.compose(B,k,E==="retain")}}const _=a.default.compose(w.attributes,T.attributes,typeof w.retain=="number");if(_&&(C.attributes=_),S.push(C),!g.hasNext()&&i(S.ops[S.ops.length-1],C)){const E=new d(m.rest());return S.concat(E).chop()}}else typeof T.delete=="number"&&(typeof w.retain=="number"||typeof w.retain=="object"&&w.retain!==null)&&S.push(T)}return S.chop()}concat(h){const m=new d(this.ops.slice());return h.ops.length>0&&(m.push(h.ops[0]),m.ops=m.ops.concat(h.ops.slice(1))),m}diff(h,m){if(this.ops===h.ops)return new d;const g=[this,h].map(w=>w.map(T=>{if(T.insert!=null)return typeof T.insert=="string"?T.insert:c;const C=w===h?"on":"with";throw new Error("diff() called "+C+" non-document")}).join("")),v=new d,A=n(g[0],g[1],m,!0),S=new l.default(this.ops),x=new l.default(h.ops);return A.forEach(w=>{let T=w[1].length;for(;T>0;){let C=0;switch(w[0]){case n.INSERT:C=Math.min(x.peekLength(),T),v.push(x.next(C));break;case n.DELETE:C=Math.min(T,S.peekLength()),S.next(C),v.delete(C);break;case n.EQUAL:C=Math.min(S.peekLength(),x.peekLength(),T);const _=S.next(C),E=x.next(C);i(_.insert,E.insert)?v.retain(C,a.default.diff(_.attributes,E.attributes)):v.push(E).delete(C);break}T-=C}}),v.chop()}eachLine(h,m=`
4174
4174
  `){const g=new l.default(this.ops);let v=new d,A=0;for(;g.hasNext();){if(g.peekType()!=="insert")return;const S=g.peek(),x=s.default.length(S)-g.peekLength(),w=typeof S.insert=="string"?S.insert.indexOf(m,x)-x:-1;if(w<0)v.push(g.next());else if(w>0)v.push(g.next(w));else{if(h(v,g.next(1).attributes||{},A)===!1)return;A+=1,v=new d}}v.length()>0&&h(v,{},A)}invert(h){const m=new d;return this.reduce((g,v)=>{if(v.insert)m.delete(s.default.length(v));else{if(typeof v.retain=="number"&&v.attributes==null)return m.retain(v.retain),g+v.retain;if(v.delete||typeof v.retain=="number"){const A=v.delete||v.retain;return h.slice(g,g+A).forEach(x=>{v.delete?m.push(x):v.retain&&v.attributes&&m.retain(s.default.length(x),a.default.invert(v.attributes,x.attributes))}),g+A}else if(typeof v.retain=="object"&&v.retain!==null){const A=h.slice(g,g+1),S=new l.default(A.ops).next(),[x,w,T]=u(v.retain,S.insert),C=d.getHandler(x);return m.retain({[x]:C.invert(w,T)},a.default.invert(v.attributes,S.attributes)),g+1}}return g},0),m.chop()}transform(h,m=!1){if(m=!!m,typeof h=="number")return this.transformPosition(h,m);const g=h,v=new l.default(this.ops),A=new l.default(g.ops),S=new d;for(;v.hasNext()||A.hasNext();)if(v.peekType()==="insert"&&(m||A.peekType()!=="insert"))S.retain(s.default.length(v.next()));else if(A.peekType()==="insert")S.push(A.next());else{const x=Math.min(v.peekLength(),A.peekLength()),w=v.next(x),T=A.next(x);if(w.delete)continue;if(T.delete)S.push(T);else{const C=w.retain,_=T.retain;let E=typeof _=="object"&&_!==null?_:x;if(typeof C=="object"&&C!==null&&typeof _=="object"&&_!==null){const D=Object.keys(C)[0];if(D===Object.keys(_)[0]){const B=d.getHandler(D);B&&(E={[D]:B.transform(C[D],_[D],m)})}}S.retain(E,a.default.transform(w.attributes,T.attributes,m))}}return S.chop()}transformPosition(h,m=!1){m=!!m;const g=new l.default(this.ops);let v=0;for(;g.hasNext()&&v<=h;){const A=g.peekLength(),S=g.peekType();if(g.next(),S==="delete"){h-=Math.min(A,h-v);continue}else S==="insert"&&(v<h||!m)&&(h+=A);v+=A}return h}}d.Op=s.default,d.OpIterator=l.default,d.AttributeMap=a.default,d.handlers={},e.default=d,t.exports=d,t.exports.default=d}(US,US.exports);var Zl=US.exports;const nr=gs(Zl);class zc extends xl{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}zc.blotName="break",zc.tagName="BR";let Hc=class extends U5{};function Y5(t){return t.replace(/[&<>"']/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[e])}const Fu=class Fu extends MS{static compare(e,n){const r=Fu.order.indexOf(e),i=Fu.order.indexOf(n);return r>=0||i>=0?r-i:e===n?0:e<n?-1:1}formatAt(e,n,r,i){if(Fu.compare(this.statics.blotName,r)<0&&this.scroll.query(r,ir.BLOT)){const a=this.isolate(e,n);i&&a.wrap(r,i)}else super.formatAt(e,n,r,i)}optimize(e){if(super.optimize(e),this.parent instanceof Fu&&Fu.compare(this.statics.blotName,this.parent.statics.blotName)>0){const n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}};Un(Fu,"allowedChildren",[Fu,zc,xl,Hc]),Un(Fu,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let Ou=Fu;const Xj=1;class Xs extends Pg{constructor(){super(...arguments);Un(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=Gj(this)),this.cache.delta}deleteAt(n,r){super.deleteAt(n,r),this.cache={}}formatAt(n,r,i,a){r<=0||(this.scroll.query(i,ir.BLOCK)?n+r===this.length()&&this.format(i,a):super.formatAt(n,Math.min(r,this.length()-n-1),i,a),this.cache={})}insertAt(n,r,i){if(i!=null){super.insertAt(n,r,i),this.cache={};return}if(r.length===0)return;const a=r.split(`
4175
4175
  `),s=a.shift();s.length>0&&(n<this.length()-1||this.children.tail==null?super.insertAt(Math.min(n,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});let l=this;a.reduce((c,u)=>(l=l.split(c,!0),l.insertAt(0,u),u.length),n+s.length)}insertBefore(n,r){const{head:i}=this.children;super.insertBefore(n,r),i instanceof zc&&i.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+Xj),this.cache.length}moveChildren(n,r){super.moveChildren(n,r),this.cache={}}optimize(n){super.optimize(n),this.cache={}}path(n){return super.path(n,!0)}removeChild(n){super.removeChild(n),this.cache={}}split(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(n===0||n>=this.length()-Xj)){const a=this.clone();return n===0?(this.parent.insertBefore(a,this),this):(this.parent.insertBefore(a,this.next),a)}const i=super.split(n,r);return this.cache={},i}}Xs.blotName="block",Xs.tagName="P",Xs.defaultChild=zc,Xs.allowedChildren=[zc,Ou,xl,Hc];class ec extends xl{attach(){super.attach(),this.attributes=new B5(this.domNode)}delta(){return new nr().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,n){const r=this.scroll.query(e,ir.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,n)}formatAt(e,n,r,i){this.format(r,i)}insertAt(e,n,r){if(r!=null){super.insertAt(e,n,r);return}const i=n.split(`
4176
4176
  `),a=i.pop(),s=i.map(c=>{const u=this.scroll.create(Xs.blotName);return u.insertAt(0,c),u}),l=this.split(e);s.forEach(c=>{this.parent.insertBefore(c,l)}),a&&this.parent.insertBefore(this.scroll.create("text",a),l)}}ec.scope=ir.BLOCK_BLOT;function Gj(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return t.descendants(fo).reduce((n,r)=>r.length()===0?n:n.insert(r.value(),tc(r,{},e)),new nr).insert(`