cft-builder 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cft-builder.js
CHANGED
package/dist/cft-builder.umd.cjs
CHANGED
|
@@ -1828,7 +1828,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
1828
1828
|
`:`;
|
|
1829
1829
|
`)+hn+`return __p
|
|
1830
1830
|
}`;var ei=uY(function(){return ft(Be,sr+"return "+hn).apply(n,Ge)});if(ei.source=hn,Rx(ei))throw ei;return ei}function NNe(p){return Qi(p).toLowerCase()}function FNe(p){return Qi(p).toUpperCase()}function kNe(p,b,D){if(p=Qi(p),p&&(D||b===n))return er(p);if(!p||!(b=Ml(b)))return p;var R=Vo(p),Ae=Vo(b),Be=ai(R,Ae),Ge=ja(R,Ae)+1;return O0(R,Be,Ge).join("")}function PNe(p,b,D){if(p=Qi(p),p&&(D||b===n))return p.slice(0,zh(p)+1);if(!p||!(b=Ml(b)))return p;var R=Vo(p),Ae=ja(R,Vo(b))+1;return O0(R,0,Ae).join("")}function MNe(p,b,D){if(p=Qi(p),p&&(D||b===n))return p.replace(Gn,"");if(!p||!(b=Ml(b)))return p;var R=Vo(p),Ae=ai(R,Vo(b));return O0(R,Ae).join("")}function LNe(p,b){var D=V,R=L;if(Ha(b)){var Ae="separator"in b?b.separator:Ae;D="length"in b?Rr(b.length):D,R="omission"in b?Ml(b.omission):R}p=Qi(p);var Be=p.length;if(kl(p)){var Ge=Vo(p);Be=Ge.length}if(D>=Be)return p;var lt=D-Bu(R);if(lt<1)return R;var wt=Ge?O0(Ge,0,lt).join(""):p.slice(0,lt);if(Ae===n)return wt+R;if(Ge&&(lt+=wt.length-lt),Gx(Ae)){if(p.slice(lt).search(Ae)){var en,rn=wt;for(Ae.global||(Ae=kn(Ae.source,Qi(Ft.exec(Ae))+"g")),Ae.lastIndex=0;en=Ae.exec(rn);)var hn=en.index;wt=wt.slice(0,hn===n?lt:hn)}}else if(p.indexOf(Ml(Ae),lt)!=lt){var Pn=wt.lastIndexOf(Ae);Pn>-1&&(wt=wt.slice(0,Pn))}return wt+R}function BNe(p){return p=Qi(p),p&&$n.test(p)?p.replace(yn,Xg):p}var VNe=Rh(function(p,b,D){return p+(D?" ":"")+b.toUpperCase()}),Jx=dz("toUpperCase");function cY(p,b,D){return p=Qi(p),b=D?n:b,b===n?Nd(p)?Wg(p):Od(p):p.match(b)||[]}var uY=oi(function(p,b){try{return ci(p,n,b)}catch(D){return Rx(D)?D:new rt(D)}}),UNe=Bd(function(p,b){return Ra(b,function(D){D=Hu(D),Md(p,D,Kx(p[D],p))}),p});function qNe(p){var b=p==null?0:p.length,D=wr();return p=b?ki(p,function(R){if(typeof R[1]!="function")throw new lr(s);return[D(R[0]),R[1]]}):[],oi(function(R){for(var Ae=-1;++Ae<b;){var Be=p[Ae];if(ci(Be[0],this,R))return ci(Be[1],this,R)}})}function jNe(p){return fIe(hc(p,f))}function Zx(p){return function(){return p}}function $Ne(p,b){return p==null||p!==p?b:p}var HNe=hz(),zNe=hz(!0);function ll(p){return p}function eC(p){return HH(typeof p=="function"?p:hc(p,f))}function YNe(p){return YH(hc(p,f))}function KNe(p,b){return KH(p,hc(b,f))}var XNe=oi(function(p,b){return function(D){return em(D,p,b)}}),RNe=oi(function(p,b){return function(D){return em(p,D,b)}});function tC(p,b,D){var R=js(b),Ae=r9(b,R);D==null&&!(Ha(b)&&(Ae.length||!R.length))&&(D=b,b=p,p=this,Ae=r9(b,js(b)));var Be=!(Ha(D)&&"chain"in D)||!!D.chain,Ge=Ud(p);return Ra(Ae,function(lt){var wt=b[lt];p[lt]=wt,Ge&&(p.prototype[lt]=function(){var en=this.__chain__;if(Be||en){var rn=p(this.__wrapped__),hn=rn.__actions__=al(this.__actions__);return hn.push({func:wt,args:arguments,thisArg:p}),rn.__chain__=en,rn}return wt.apply(p,Bs([this.value()],arguments))})}),p}function GNe(){return Fr._===this&&(Fr._=Vu),this}function nC(){}function WNe(p){return p=Rr(p),oi(function(b){return XH(b,p)})}var QNe=kx(ki),JNe=kx(Pu),ZNe=kx(Nl);function dY(p){return qx(p)?vt(Hu(p)):DIe(p)}function eFe(p){return function(b){return p==null?n:V1(p,b)}}var tFe=gz(),nFe=gz(!0);function rC(){return[]}function iC(){return!1}function rFe(){return{}}function iFe(){return""}function aFe(){return!0}function sFe(p,b){if(p=Rr(p),p<1||p>G)return[];var D=pe,R=qs(p,pe);b=wr(b),p-=pe;for(var Ae=gn(R,b);++D<p;)b(D);return Ae}function oFe(p){return Ur(p)?ki(p,Hu):Ll(p)?[p]:al(Nz(Qi(p)))}function lFe(p){var b=++ui;return Qi(p)+b}var cFe=c9(function(p,b){return p+b},0),uFe=Px("ceil"),dFe=c9(function(p,b){return p/b},1),fFe=Px("floor");function hFe(p){return p&&p.length?n9(p,ll,yx):n}function pFe(p,b){return p&&p.length?n9(p,wr(b,2),yx):n}function gFe(p){return He(p,ll)}function mFe(p,b){return He(p,wr(b,2))}function vFe(p){return p&&p.length?n9(p,ll,xx):n}function bFe(p,b){return p&&p.length?n9(p,wr(b,2),xx):n}var yFe=c9(function(p,b){return p*b},1),AFe=Px("round"),wFe=c9(function(p,b){return p-b},0);function SFe(p){return p&&p.length?on(p,ll):0}function xFe(p,b){return p&&p.length?on(p,wr(b,2)):0}return Ee.after=YDe,Ee.ary=$z,Ee.assign=FOe,Ee.assignIn=nY,Ee.assignInWith=S9,Ee.assignWith=kOe,Ee.at=POe,Ee.before=Hz,Ee.bind=Kx,Ee.bindAll=UNe,Ee.bindKey=zz,Ee.castArray=rOe,Ee.chain=Uz,Ee.chunk=f_e,Ee.compact=h_e,Ee.concat=p_e,Ee.cond=qNe,Ee.conforms=jNe,Ee.constant=Zx,Ee.countBy=SDe,Ee.create=MOe,Ee.curry=Yz,Ee.curryRight=Kz,Ee.debounce=Xz,Ee.defaults=LOe,Ee.defaultsDeep=BOe,Ee.defer=KDe,Ee.delay=XDe,Ee.difference=g_e,Ee.differenceBy=m_e,Ee.differenceWith=v_e,Ee.drop=b_e,Ee.dropRight=y_e,Ee.dropRightWhile=A_e,Ee.dropWhile=w_e,Ee.fill=S_e,Ee.filter=CDe,Ee.flatMap=IDe,Ee.flatMapDeep=_De,Ee.flatMapDepth=DDe,Ee.flatten=Mz,Ee.flattenDeep=x_e,Ee.flattenDepth=C_e,Ee.flip=RDe,Ee.flow=HNe,Ee.flowRight=zNe,Ee.fromPairs=T_e,Ee.functions=zOe,Ee.functionsIn=YOe,Ee.groupBy=ODe,Ee.initial=I_e,Ee.intersection=__e,Ee.intersectionBy=D_e,Ee.intersectionWith=O_e,Ee.invert=XOe,Ee.invertBy=ROe,Ee.invokeMap=FDe,Ee.iteratee=eC,Ee.keyBy=kDe,Ee.keys=js,Ee.keysIn=ol,Ee.map=m9,Ee.mapKeys=WOe,Ee.mapValues=QOe,Ee.matches=YNe,Ee.matchesProperty=KNe,Ee.memoize=b9,Ee.merge=JOe,Ee.mergeWith=rY,Ee.method=XNe,Ee.methodOf=RNe,Ee.mixin=tC,Ee.negate=y9,Ee.nthArg=WNe,Ee.omit=ZOe,Ee.omitBy=eNe,Ee.once=GDe,Ee.orderBy=PDe,Ee.over=QNe,Ee.overArgs=WDe,Ee.overEvery=JNe,Ee.overSome=ZNe,Ee.partial=Xx,Ee.partialRight=Rz,Ee.partition=MDe,Ee.pick=tNe,Ee.pickBy=iY,Ee.property=dY,Ee.propertyOf=eFe,Ee.pull=P_e,Ee.pullAll=Bz,Ee.pullAllBy=M_e,Ee.pullAllWith=L_e,Ee.pullAt=B_e,Ee.range=tFe,Ee.rangeRight=nFe,Ee.rearg=QDe,Ee.reject=VDe,Ee.remove=V_e,Ee.rest=JDe,Ee.reverse=zx,Ee.sampleSize=qDe,Ee.set=rNe,Ee.setWith=iNe,Ee.shuffle=jDe,Ee.slice=U_e,Ee.sortBy=zDe,Ee.sortedUniq=K_e,Ee.sortedUniqBy=X_e,Ee.split=INe,Ee.spread=ZDe,Ee.tail=R_e,Ee.take=G_e,Ee.takeRight=W_e,Ee.takeRightWhile=Q_e,Ee.takeWhile=J_e,Ee.tap=hDe,Ee.throttle=eOe,Ee.thru=g9,Ee.toArray=Zz,Ee.toPairs=aY,Ee.toPairsIn=sY,Ee.toPath=oFe,Ee.toPlainObject=tY,Ee.transform=aNe,Ee.unary=tOe,Ee.union=Z_e,Ee.unionBy=eDe,Ee.unionWith=tDe,Ee.uniq=nDe,Ee.uniqBy=rDe,Ee.uniqWith=iDe,Ee.unset=sNe,Ee.unzip=Yx,Ee.unzipWith=Vz,Ee.update=oNe,Ee.updateWith=lNe,Ee.values=Qh,Ee.valuesIn=cNe,Ee.without=aDe,Ee.words=cY,Ee.wrap=nOe,Ee.xor=sDe,Ee.xorBy=oDe,Ee.xorWith=lDe,Ee.zip=cDe,Ee.zipObject=uDe,Ee.zipObjectDeep=dDe,Ee.zipWith=fDe,Ee.entries=aY,Ee.entriesIn=sY,Ee.extend=nY,Ee.extendWith=S9,tC(Ee,Ee),Ee.add=cFe,Ee.attempt=uY,Ee.camelCase=hNe,Ee.capitalize=oY,Ee.ceil=uFe,Ee.clamp=uNe,Ee.clone=iOe,Ee.cloneDeep=sOe,Ee.cloneDeepWith=oOe,Ee.cloneWith=aOe,Ee.conformsTo=lOe,Ee.deburr=lY,Ee.defaultTo=$Ne,Ee.divide=dFe,Ee.endsWith=pNe,Ee.eq=Zc,Ee.escape=gNe,Ee.escapeRegExp=mNe,Ee.every=xDe,Ee.find=TDe,Ee.findIndex=kz,Ee.findKey=VOe,Ee.findLast=EDe,Ee.findLastIndex=Pz,Ee.findLastKey=UOe,Ee.floor=fFe,Ee.forEach=qz,Ee.forEachRight=jz,Ee.forIn=qOe,Ee.forInRight=jOe,Ee.forOwn=$Oe,Ee.forOwnRight=HOe,Ee.get=Wx,Ee.gt=cOe,Ee.gte=uOe,Ee.has=KOe,Ee.hasIn=Qx,Ee.head=Lz,Ee.identity=ll,Ee.includes=NDe,Ee.indexOf=E_e,Ee.inRange=dNe,Ee.invoke=GOe,Ee.isArguments=j1,Ee.isArray=Ur,Ee.isArrayBuffer=dOe,Ee.isArrayLike=sl,Ee.isArrayLikeObject=is,Ee.isBoolean=fOe,Ee.isBuffer=N0,Ee.isDate=hOe,Ee.isElement=pOe,Ee.isEmpty=gOe,Ee.isEqual=mOe,Ee.isEqualWith=vOe,Ee.isError=Rx,Ee.isFinite=bOe,Ee.isFunction=Ud,Ee.isInteger=Gz,Ee.isLength=A9,Ee.isMap=Wz,Ee.isMatch=yOe,Ee.isMatchWith=AOe,Ee.isNaN=wOe,Ee.isNative=SOe,Ee.isNil=COe,Ee.isNull=xOe,Ee.isNumber=Qz,Ee.isObject=Ha,Ee.isObjectLike=Ga,Ee.isPlainObject=sm,Ee.isRegExp=Gx,Ee.isSafeInteger=TOe,Ee.isSet=Jz,Ee.isString=w9,Ee.isSymbol=Ll,Ee.isTypedArray=Wh,Ee.isUndefined=EOe,Ee.isWeakMap=IOe,Ee.isWeakSet=_Oe,Ee.join=N_e,Ee.kebabCase=vNe,Ee.last=gc,Ee.lastIndexOf=F_e,Ee.lowerCase=bNe,Ee.lowerFirst=yNe,Ee.lt=DOe,Ee.lte=OOe,Ee.max=hFe,Ee.maxBy=pFe,Ee.mean=gFe,Ee.meanBy=mFe,Ee.min=vFe,Ee.minBy=bFe,Ee.stubArray=rC,Ee.stubFalse=iC,Ee.stubObject=rFe,Ee.stubString=iFe,Ee.stubTrue=aFe,Ee.multiply=yFe,Ee.nth=k_e,Ee.noConflict=GNe,Ee.noop=nC,Ee.now=v9,Ee.pad=ANe,Ee.padEnd=wNe,Ee.padStart=SNe,Ee.parseInt=xNe,Ee.random=fNe,Ee.reduce=LDe,Ee.reduceRight=BDe,Ee.repeat=CNe,Ee.replace=TNe,Ee.result=nNe,Ee.round=AFe,Ee.runInContext=P,Ee.sample=UDe,Ee.size=$De,Ee.snakeCase=ENe,Ee.some=HDe,Ee.sortedIndex=q_e,Ee.sortedIndexBy=j_e,Ee.sortedIndexOf=$_e,Ee.sortedLastIndex=H_e,Ee.sortedLastIndexBy=z_e,Ee.sortedLastIndexOf=Y_e,Ee.startCase=_Ne,Ee.startsWith=DNe,Ee.subtract=wFe,Ee.sum=SFe,Ee.sumBy=xFe,Ee.template=ONe,Ee.times=sFe,Ee.toFinite=qd,Ee.toInteger=Rr,Ee.toLength=eY,Ee.toLower=NNe,Ee.toNumber=mc,Ee.toSafeInteger=NOe,Ee.toString=Qi,Ee.toUpper=FNe,Ee.trim=kNe,Ee.trimEnd=PNe,Ee.trimStart=MNe,Ee.truncate=LNe,Ee.unescape=BNe,Ee.uniqueId=lFe,Ee.upperCase=VNe,Ee.upperFirst=Jx,Ee.each=qz,Ee.eachRight=jz,Ee.first=Lz,tC(Ee,function(){var p={};return ju(Ee,function(b,D){Er.call(Ee.prototype,D)||(p[D]=b)}),p}(),{chain:!1}),Ee.VERSION=r,Ra(["bind","bindKey","curry","curryRight","partial","partialRight"],function(p){Ee[p].placeholder=Ee}),Ra(["drop","take"],function(p,b){si.prototype[p]=function(D){D=D===n?1:rs(Rr(D),0);var R=this.__filtered__&&!b?new si(this):this.clone();return R.__filtered__?R.__takeCount__=qs(D,R.__takeCount__):R.__views__.push({size:qs(D,pe),type:p+(R.__dir__<0?"Right":"")}),R},si.prototype[p+"Right"]=function(D){return this.reverse()[p](D).reverse()}}),Ra(["filter","map","takeWhile"],function(p,b){var D=b+1,R=D==$||D==me;si.prototype[p]=function(Ae){var Be=this.clone();return Be.__iteratees__.push({iteratee:wr(Ae,3),type:D}),Be.__filtered__=Be.__filtered__||R,Be}}),Ra(["head","last"],function(p,b){var D="take"+(b?"Right":"");si.prototype[p]=function(){return this[D](1).value()[0]}}),Ra(["initial","tail"],function(p,b){var D="drop"+(b?"":"Right");si.prototype[p]=function(){return this.__filtered__?new si(this):this[D](1)}}),si.prototype.compact=function(){return this.filter(ll)},si.prototype.find=function(p){return this.filter(p).head()},si.prototype.findLast=function(p){return this.reverse().find(p)},si.prototype.invokeMap=oi(function(p,b){return typeof p=="function"?new si(this):this.map(function(D){return em(D,p,b)})}),si.prototype.reject=function(p){return this.filter(y9(wr(p)))},si.prototype.slice=function(p,b){p=Rr(p);var D=this;return D.__filtered__&&(p>0||b<0)?new si(D):(p<0?D=D.takeRight(-p):p&&(D=D.drop(p)),b!==n&&(b=Rr(b),D=b<0?D.dropRight(-b):D.take(b-p)),D)},si.prototype.takeRightWhile=function(p){return this.reverse().takeWhile(p).reverse()},si.prototype.toArray=function(){return this.take(pe)},ju(si.prototype,function(p,b){var D=/^(?:filter|find|map|reject)|While$/.test(b),R=/^(?:head|last)$/.test(b),Ae=Ee[R?"take"+(b=="last"?"Right":""):b],Be=R||/^find/.test(b);Ae&&(Ee.prototype[b]=function(){var Ge=this.__wrapped__,lt=R?[1]:arguments,wt=Ge instanceof si,en=lt[0],rn=wt||Ur(Ge),hn=function(gi){var xi=Ae.apply(Ee,Bs([gi],lt));return R&&Pn?xi[0]:xi};rn&&D&&typeof en=="function"&&en.length!=1&&(wt=rn=!1);var Pn=this.__chain__,sr=!!this.__actions__.length,Sr=Be&&!Pn,ei=wt&&!sr;if(!Be&&rn){Ge=ei?Ge:new si(this);var xr=p.apply(Ge,lt);return xr.__actions__.push({func:g9,args:[hn],thisArg:n}),new gs(xr,Pn)}return Sr&&ei?p.apply(this,lt):(xr=this.thru(hn),Sr?R?xr.value()[0]:xr.value():xr)})}),Ra(["pop","push","shift","sort","splice","unshift"],function(p){var b=In[p],D=/^(?:push|sort|unshift)$/.test(p)?"tap":"thru",R=/^(?:pop|shift)$/.test(p);Ee.prototype[p]=function(){var Ae=arguments;if(R&&!this.__chain__){var Be=this.value();return b.apply(Ur(Be)?Be:[],Ae)}return this[D](function(Ge){return b.apply(Ur(Ge)?Ge:[],Ae)})}}),ju(si.prototype,function(p,b){var D=Ee[b];if(D){var R=D.name+"";Er.call(Ve,R)||(Ve[R]=[]),Ve[R].push({name:b,func:D})}}),Ve[l9(n,w).name]=[{name:"wrapper",func:n}],si.prototype.clone=Jv,si.prototype.reverse=Zv,si.prototype.value=Qg,Ee.prototype.at=pDe,Ee.prototype.chain=gDe,Ee.prototype.commit=mDe,Ee.prototype.next=vDe,Ee.prototype.plant=yDe,Ee.prototype.reverse=ADe,Ee.prototype.toJSON=Ee.prototype.valueOf=Ee.prototype.value=wDe,Ee.prototype.first=Ee.prototype.head,Ws&&(Ee.prototype[Ws]=bDe),Ee},gt=C0();Zr?((Zr.exports=gt)._=gt,Vr._=gt):Fr._=gt}).call(Ni)}(Zm,Zm.exports);var _t=Zm.exports;const b_=bs(_t),e3={type:cC,isCoverPage:!1,margin:{left:0,right:0,top:0,bottom:0},isVisible:!0,isHidden:!1,isValid:!1,displayRules:[],title:{english:"Page 1"}},lf={type:na,showSectionHeader:!1,isVisible:!0,isHidden:!1,isValid:!1,showSectionTitle:!1,showSectionSubTitle:!1,heading:{english:"Section header"},subHeadingText:{english:""},isCollapsed:!1},nu={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:[]},Sc={type:ms,isCollapsed:!1},MQ=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={...e3,uuid:nt(),title:{english:`Page ${t+1}`},children:[{...lf,uuid:nt(),children:[{...nu,uuid:nt(),children:[{...Sc,uuid:nt(),children:[]}]}]}]};e({type:JI,payLoad:n})}}function BQ(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:v_,payLoad:{tableFields:n}})}}function VQ(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=MQ(a),n({type:n_,payLoad:{page:a,pageIndex:e}})}}function UQ(t,e){return n=>{n({type:m_,payLoad:{pageIndex:t,page:e}})}}function qQ(t){return e=>{e({type:YI,payLoad:{pageIndex:t}})}}const y_=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 jQ(t,e){return n=>{n({type:KI,payLoad:{pageIndex:t,sectionIndex:e}})}}function $Q(t){return e=>{const n={...lf,uuid:nt(),children:[{...nu,uuid:nt(),children:[{...Sc,uuid:nt(),children:[]}]}]};e({type:ZI,payLoad:{pageIndex:t,section:n}})}}function HQ(t,e,n){return r=>{r({type:QI,payLoad:{pageIndex:t,sectionIndex:e,section:n}})}}function zQ(t,e,n){return r=>{const i=t;let a=_t.cloneDeep(i);a=y_(a),r({type:r_,payLoad:{section:a,pageIndex:e,sectionIndex:n}})}}function YQ(t,e){return n=>{const r=t;let i=_t.cloneDeep(r);i=y_(i),n({type:i_,payLoad:{section:i,pageIndex:e}})}}const KQ=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 XQ(t,e,n,r){return i=>{const a=t;let s=_t.cloneDeep(a);s=KQ(s),i({type:a_,payLoad:{row:s,pageIndex:e,sectionIndex:n,rowIndex:r}})}}function RQ(t,e,n,r){return i=>{i({type:f8,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,row:r}})}}function GQ(t,e,n){return r=>{r({type:XI,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n}})}}function WQ(t,e){return n=>{const r={...nu,uuid:nt(),isCollapsed:!1,children:[{...Sc,uuid:nt(),children:[]}]};n({type:e_,payLoad:{pageIndex:t,sectionIndex:e,row:r}})}}function QQ(t,e,n,r){return i=>{i({type:c_,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,fieldItem:r}})}}const JQ=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 ZQ(t,e,n){return r=>{const i={...Sc,uuid:nt(),children:[]};r({type:t_,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,column:i}})}}function eJ(t,e,n,r,i){return a=>{const s=t;let l=_t.cloneDeep(s);l=JQ(l),a({type:s_,payLoad:{column:l,pageIndex:e,sectionIndex:n,rowIndex:r,columnIndex:i}})}}function tJ(t,e,n,r){return i=>{i({type:RI,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r}})}}function A_(t,e,n,r){return i=>{i({type:f8,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,row:r}})}}function nJ(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 w=[...u.repeatableFields],x=_t.findIndex(w,function(S){return S.uuid===(d==null?void 0:d.uuid)});w.splice(x,1),u={...u,repeatableFields:w},a(A_(t,e,n,u))}const f=_t.findIndex(c,function(w){return w.uuid===(d==null?void 0:d.uuid)});c.splice(f,1),a({type:GI,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i}})}}function rJ(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 w=(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],S=_t.findIndex(x,function(E){return E.uuid===(w==null?void 0:w.uuid)});S===-1?x.splice(i,0,a):x[S]=a,x[S]=a,d={...d,repeatableFields:x},s(A_(t,e,n,d))}const f={type:WI,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,field:a}},h=u.findIndex(w=>w.uuid===a.uuid);h>=0&&(u[h]=a),s(f)}}function iJ(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:o_,payLoad:{field:c,pageIndex:e,sectionIndex:n,rowIndex:r,columnIndex:i,fieldIndex:a}})}}function aJ(t,e,n,r,i,a,s,l){return c=>{c({type:u_,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,ruleIndex:a,conditionIndex:s,field:l}})}}function sJ(t,e,n,r,i,a,s,l){return c=>{c({type:d_,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,gridColumnIndex:s,gridRowIndex:a,field:l}})}}function oJ(t,e,n,r,i,a,s,l,c){return u=>{u({type:p_,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,gridRowIndex:a,gridColumnIndex:s,fieldChildrenIndex:l,field:c}})}}function lJ(t,e,n,r,i,a,s,l){return c=>{c({type:g_,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,gridRowIndex:a,gridColumnIndex:s,fieldChildrenIndex:l}})}}function cJ(t,e,n,r,i,a,s,l,c){return u=>{u({type:f_,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,ruleIndex:a,conditionIndex:s,inlineFieldIndex:l,field:c}})}}function uJ(t,e,n,r,i,a,s,l){return c=>{c({type:h_,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,ruleIndex:a,conditionIndex:s,inlineFieldIndex:l}})}}function dJ(t){return e=>{e({type:of,payLoad:{formSchema:t}})}}function fJ(t){return e=>{e({type:of,payLoad:{layout:t}})}}function hJ(t){return(e,n)=>{const{languages:r}=n,i={type:of,payLoad:{languages:[...r,t]}};e(i)}}function pJ(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:of,payLoad:{languages:a}})}}function gJ(t){return e=>{const n={type:of,payLoad:{userSelectedLanguage:t.value}};e(n)}}function mJ(t){return e=>{e({type:Jm,payLoad:{formType:t}})}}function vJ(t){return e=>{e({type:Jm,payLoad:t})}}function bJ(t){return e=>{e({type:Jm,payLoad:{editing_by:t}})}}function yJ(){return t=>{t({type:l_,payLoad:null})}}const h8={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(),...e3,children:[{uuid:nt(),...lf,children:[{uuid:nt(),...nu,children:[{uuid:nt(),...Sc,children:[]}]}]}]}],conditionalTabsRules:[],conditionalSectionsRules:[]},AJ=(t=h8,e)=>{var n,r;switch(e.type){case kQ:return{...t,...e.payLoad};case FQ:return{...t,...e.payLoad};case l_:return{...t,...h8};case of:return console.log("action",e),{...t,...e.payLoad};case Jm:return{...t,...e.payLoad};case YI:{const{pageIndex:i}=e.payLoad;return{...t,layout:t.layout.filter((a,s)=>s!==i)}}case JI:return{...t,layout:[...t.layout,e.payLoad]};case ZI:{const{pageIndex:i,section:a}=e.payLoad,s=[...t.layout];return s[i].children=[...s[i].children,a],{...t,layout:s}}case c_:{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 PQ:{const{fieldItem:i}=e.payLoad;let a=[...t.tableFields];return a=[...a,i],{...t,tableFields:a}}case v_:return{...t,...e.payLoad};case e_:{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 t_:{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 u_:{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 d_:{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 f_:{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 p_:{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 h_:{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 g_:{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 KI:{const{pageIndex:i,sectionIndex:a}=e.payLoad,s=[...t.layout];return s[i].children.splice(a,1),{...t,layout:s}}case XI:{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 RI:{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 GI:{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 WI:{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 QI:{const{pageIndex:i,sectionIndex:a,section:s}=e.payLoad,l=[...t.layout];return l[i].children[a]=s,{...t,layout:l}}case f8:{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 m_:{const{pageIndex:i,page:a}=e.payLoad,s=[...t.layout];return s[i]=a,{...t,layout:s}}case n_:{const{page:i,pageIndex:a}=e.payLoad,s=[...t.layout];return s.splice(a+1,0,i),{...t,layout:s}}case r_:{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 i_:{const{section:i,pageIndex:a}=e.payLoad,s=[...t.layout];return s[a].children.push(i),{...t,layout:s}}case a_:{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 s_:{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 o_:{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},w_=k.createContext({dragDropManager:void 0});function ru(t){"@babel/helpers - typeof";return ru=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},ru(t)}function wJ(t,e){if(ru(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(ru(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function SJ(t){var e=wJ(t,"string");return ru(e)=="symbol"?e:e+""}function xJ(t,e,n){return(e=SJ(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function S_(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 x_(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?S_(Object(n),!0).forEach(function(r){xJ(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):S_(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function jl(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 C_=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),p8=function(){return Math.random().toString(36).substring(7).split("").join(".")},T_={INIT:"@@redux/INIT"+p8(),REPLACE:"@@redux/REPLACE"+p8(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+p8()}};function CJ(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 TJ(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(_J(t))return"date";if(IJ(t))return"error";var n=EJ(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 EJ(t){return typeof t.constructor=="function"?t.constructor.name:null}function IJ(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function _J(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function cf(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=TJ(t)),e}function E_(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"?jl(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"?jl(1):"Expected the enhancer to be a function. Instead, received: '"+cf(n)+"'");return n(E_)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?jl(2):"Expected the root reducer to be a function. Instead, received: '"+cf(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"?jl(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"?jl(4):"Expected the listener to be a function. Instead, received: '"+cf(v)+"'");if(c)throw new Error(process.env.NODE_ENV==="production"?jl(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"?jl(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(!CJ(v))throw new Error(process.env.NODE_ENV==="production"?jl(7):"Actions must be plain objects. Instead, the actual type was: '"+cf(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"?jl(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"?jl(9):"Reducers may not dispatch actions.");try{c=!0,a=i(a,v)}finally{c=!1}for(var A=s=l,w=0;w<A.length;w++){var x=A[w];x()}return v}function m(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?jl(10):"Expected the nextReducer to be a function. Instead, received: '"+cf(v));i=v,h({type:T_.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"?jl(11):"Expected the observer to be an object. Instead, received: '"+cf(x)+"'");function S(){x.next&&x.next(d())}S();var E=A(S);return{unsubscribe:E}}},v[C_]=function(){return this},v}return h({type:T_.INIT}),r={dispatch:h,subscribe:f,getState:d,replaceReducer:m},r[C_]=g,r}function qr(t,e,...n){if(DJ()&&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 DJ(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function OJ(t,e,n){return e.split(".").reduce((r,i)=>r&&r[i]?r[i]:n||null,t)}function NJ(t,e){return t.filter(n=>n!==e)}function I_(t){return typeof t=="object"}function FJ(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 kJ(t,e){return t.filter(n=>e.indexOf(n)>-1)}const g8="dnd-core/INIT_COORDS",t3="dnd-core/BEGIN_DRAG",m8="dnd-core/PUBLISH_DRAG_SOURCE",n3="dnd-core/HOVER",r3="dnd-core/DROP",i3="dnd-core/END_DRAG";function __(t,e){return{type:g8,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const PJ={type:g8,payload:{clientOffset:null,sourceClientOffset:null}};function MJ(t){return function(n=[],r={publishSource:!0}){const{publishSource:i=!0,clientOffset:a,getSourceClientOffset:s}=r,l=t.getMonitor(),c=t.getRegistry();t.dispatch(__(a)),LJ(n,l,c);const u=UJ(n,l);if(u==null){t.dispatch(PJ);return}let d=null;if(a){if(!s)throw new Error("getSourceClientOffset must be defined");BJ(s),d=s(u)}t.dispatch(__(a,d));const h=c.getSource(u).beginDrag(l,u);if(h==null)return;VJ(h),c.pinSource(u);const m=c.getSourceType(u);return{type:t3,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 BJ(t){qr(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function VJ(t){qr(I_(t),"Item must be an object.")}function UJ(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 qJ(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function jJ(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){qJ(t,i,n[i])})}return t}function $J(t){return function(n={}){const r=t.getMonitor(),i=t.getRegistry();HJ(r),KJ(r).forEach((s,l)=>{const c=zJ(s,l,i,r),u={type:r3,payload:{dropResult:jJ({},n,c)}};t.dispatch(u)})}}function HJ(t){qr(t.isDragging(),"Cannot call drop while not dragging."),qr(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function zJ(t,e,n,r){const i=n.getTarget(t);let a=i?i.drop(r,t):void 0;return YJ(a),typeof a>"u"&&(a=e===0?{}:r.getDropResult()),a}function YJ(t){qr(typeof t>"u"||I_(t),"Drop result must either be an object or undefined.")}function KJ(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function XJ(t){return function(){const n=t.getMonitor(),r=t.getRegistry();RJ(n);const i=n.getSourceId();return i!=null&&(r.getSource(i,!0).endDrag(n,i),r.unpinSource()),{type:i3}}}function RJ(t){qr(t.isDragging(),"Cannot call endDrag while not dragging.")}function v8(t,e){return e===null?t===null:Array.isArray(t)?t.some(n=>n===e):t===e}function GJ(t){return function(n,{clientOffset:r}={}){WJ(n);const i=n.slice(0),a=t.getMonitor(),s=t.getRegistry(),l=a.getItemType();return JJ(i,s,l),QJ(i,a,s),ZJ(i,a,s),{type:n3,payload:{targetIds:i,clientOffset:r||null}}}}function WJ(t){qr(Array.isArray(t),"Expected targetIds to be an array.")}function QJ(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 JJ(t,e,n){for(let r=t.length-1;r>=0;r--){const i=t[r],a=e.getTargetType(i);v8(a,n)||t.splice(r,1)}}function ZJ(t,e,n){t.forEach(function(r){n.getTarget(r).hover(e,r)})}function eZ(t){return function(){if(t.getMonitor().isDragging())return{type:m8}}}function tZ(t){return{beginDrag:MJ(t),publishDragSource:eZ(t),hover:GJ(t),drop:$J(t),endDrag:XJ(t)}}class nZ{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=tZ(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 rZ(t,e){return{x:t.x+e.x,y:t.y+e.y}}function D_(t,e){return{x:t.x-e.x,y:t.y-e.y}}function iZ(t){const{clientOffset:e,initialClientOffset:n,initialSourceClientOffset:r}=t;return!e||!n||!r?null:D_(rZ(e,r),n)}function aZ(t){const{clientOffset:e,initialClientOffset:n}=t;return!e||!n?null:D_(e,n)}const Np=[],b8=[];Np.__IS_NONE__=!0,b8.__IS_ALL__=!0;function sZ(t,e){return t===Np?!1:t===b8||typeof e>"u"?!0:kJ(e,t).length>0}class oZ{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&&!sZ(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 v8(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&&!v8(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 iZ(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return aZ(this.store.getState().dragOffset)}constructor(e,n){this.store=e,this.registry=n}}const O_=typeof global<"u"?global:self,N_=O_.MutationObserver||O_.WebKitMutationObserver;function F_(t){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),t()}}}function lZ(t){let e=1;const n=new N_(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const cZ=typeof N_=="function"?lZ:F_;class uZ{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=cZ(this.flush),this.requestErrorThrow=F_(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class dZ{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 fZ{create(e){const n=this.freeTasks,r=n.length?n.pop():new dZ(this.onError,i=>n[n.length]=i);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const k_=new uZ,hZ=new fZ(k_.registerPendingError);function pZ(t){k_.enqueueTask(hZ.create(t))}const y8="dnd-core/ADD_SOURCE",A8="dnd-core/ADD_TARGET",w8="dnd-core/REMOVE_SOURCE",a3="dnd-core/REMOVE_TARGET";function gZ(t){return{type:y8,payload:{sourceId:t}}}function mZ(t){return{type:A8,payload:{targetId:t}}}function vZ(t){return{type:w8,payload:{sourceId:t}}}function bZ(t){return{type:a3,payload:{targetId:t}}}function yZ(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 AZ(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 S8(t,e){if(e&&Array.isArray(t)){t.forEach(n=>S8(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 $l;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})($l||($l={}));let wZ=0;function SZ(){return wZ++}function xZ(t){const e=SZ().toString();switch(t){case $l.SOURCE:return`S${e}`;case $l.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function P_(t){switch(t[0]){case"S":return $l.SOURCE;case"T":return $l.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function M_(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 CZ{addSource(e,n){S8(e),yZ(n);const r=this.addHandler($l.SOURCE,e,n);return this.store.dispatch(gZ(r)),r}addTarget(e,n){S8(e,!0),AZ(n);const r=this.addHandler($l.TARGET,e,n);return this.store.dispatch(mZ(r)),r}containsHandler(e){return M_(this.dragSources,e)||M_(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)===$l.SOURCE}isTargetId(e){return P_(e)===$l.TARGET}removeSource(e){qr(this.getSource(e),"Expected an existing source."),this.store.dispatch(vZ(e)),pZ(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){qr(this.getTarget(e),"Expected an existing target."),this.store.dispatch(bZ(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=xZ(e);return this.types.set(i,n),e===$l.SOURCE?this.dragSources.set(i,r):e===$l.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 TZ=(t,e)=>t===e;function EZ(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function IZ(t,e,n=TZ){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 _Z(t=Np,e){switch(e.type){case n3:break;case y8:case A8:case a3:case w8:return Np;case t3:case m8:case i3:case r3:default:return b8}const{targetIds:n=[],prevTargetIds:r=[]}=e.payload,i=FJ(n,r);if(!(i.length>0||!IZ(n,r)))return Np;const s=r[r.length-1],l=n[n.length-1];return s!==l&&(s&&i.push(s),l&&i.push(l)),i}function DZ(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function OZ(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){DZ(t,i,n[i])})}return t}const L_={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function NZ(t=L_,e){const{payload:n}=e;switch(e.type){case g8:case t3:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case n3:return EZ(t.clientOffset,n.clientOffset)?t:OZ({},t,{clientOffset:n.clientOffset});case i3:case r3:return L_;default:return t}}function FZ(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function uf(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){FZ(t,i,n[i])})}return t}const kZ={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function PZ(t=kZ,e){const{payload:n}=e;switch(e.type){case t3:return uf({},t,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case m8:return uf({},t,{isSourcePublic:!0});case n3:return uf({},t,{targetIds:n.targetIds});case a3:return t.targetIds.indexOf(n.targetId)===-1?t:uf({},t,{targetIds:NJ(t.targetIds,n.targetId)});case r3:return uf({},t,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case i3:return uf({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function MZ(t=0,e){switch(e.type){case y8:case A8:return t+1;case w8:case a3:return t-1;default:return t}}function LZ(t=0){return t+1}function BZ(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function VZ(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){BZ(t,i,n[i])})}return t}function UZ(t={},e){return{dirtyHandlerIds:_Z(t.dirtyHandlerIds,{type:e.type,payload:VZ({},e.payload,{prevTargetIds:OJ(t,"dragOperation.targetIds",[])})}),dragOffset:NZ(t.dragOffset,e),refCount:MZ(t.refCount,e),dragOperation:PZ(t.dragOperation,e),stateId:LZ(t.stateId)}}function qZ(t,e=void 0,n={},r=!1){const i=jZ(r),a=new oZ(i,new CZ(i)),s=new nZ(i,a),l=t(s,e,n);return s.receiveBackend(l),s}function jZ(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return E_(UZ,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function $Z(t,e){if(t==null)return{};var n=HZ(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 HZ(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 B_=0;const s3=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var df=k.memo(function(e){var{children:n}=e,r=$Z(e,["children"]);const[i,a]=zZ(r);return k.useEffect(()=>{if(a){const s=V_();return++B_,()=>{--B_===0&&(s[s3]=null)}}},[]),o.jsx(w_.Provider,{value:i,children:n})});function zZ(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=YZ(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function YZ(t,e=V_(),n,r){const i=e;return i[s3]||(i[s3]={dragDropManager:qZ(t,e,n,r)}),i[s3]}function V_(){return typeof global<"u"?global:window}var U_=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 KZ=bs(U_),$0=typeof window<"u"?k.useLayoutEffect:k.useEffect;function XZ(t,e,n){const[r,i]=k.useState(()=>e(t)),a=k.useCallback(()=>{const s=e(t);KZ(r,s)||(i(s),n&&n())},[r,t,n]);return $0(a),[r,a]}function RZ(t,e,n){const[r,i]=XZ(t,e,n);return $0(function(){const s=t.getHandlerId();if(s!=null)return t.subscribeToStateChange(i,{handlerIds:[s]})},[t,i]),r}function q_(t,e,n){return RZ(e,t||(()=>({})),()=>n.reconnect())}function j_(t,e){const n=[...e||[]];return e==null&&typeof t!="function"&&n.push(t),k.useMemo(()=>typeof t=="function"?t():t,n)}function GZ(t){return k.useMemo(()=>t.hooks.dragSource(),[t])}function WZ(t){return k.useMemo(()=>t.hooks.dragPreview(),[t])}let x8=!1,C8=!1;class QZ{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){qr(!x8,"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 x8=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{x8=!1}}isDragging(){if(!this.sourceId)return!1;qr(!C8,"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 C8=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{C8=!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 T8=!1;class JZ{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(!T8,"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 T8=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{T8=!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 ZZ(t,e,n){const r=n.getRegistry(),i=r.addTarget(t,e);return[i,()=>r.removeTarget(i)]}function eee(t,e,n){const r=n.getRegistry(),i=r.addSource(t,e);return[i,()=>r.removeSource(i)]}function E8(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 I8(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function tee(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 nee(t){return(e=null,n=null)=>{if(!k.isValidElement(e)){const a=e;return t(a,n),a}const r=e;return tee(r),ree(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=nee(r);e[n]=()=>i}}),e}function H_(t,e){typeof t=="function"?t(e):t.current=e}function ree(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?k.cloneElement(t,{ref:r=>{H_(n,r),H_(e,r)}}):k.cloneElement(t,{ref:e})}class iee{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!E8(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!E8(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,I8(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,I8(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 aee{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!E8(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,I8(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 ff(){const{dragDropManager:t}=k.useContext(w_);return qr(t!=null,"Expected drag drop context"),t}function see(t,e){const n=ff(),r=k.useMemo(()=>new iee(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 oee(){const t=ff();return k.useMemo(()=>new QZ(t),[t])}class lee{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 cee(t,e,n){const r=k.useMemo(()=>new lee(t,e,n),[e,n]);return k.useEffect(()=>{r.spec=t},[t]),r}function uee(t){return k.useMemo(()=>{const e=t.type;return qr(e!=null,"spec.type must be defined"),e},[t])}function dee(t,e,n){const r=ff(),i=cee(t,e,n),a=uee(t);$0(function(){if(a!=null){const[l,c]=eee(a,i,r);return e.receiveHandlerId(l),n.receiveHandlerId(l),c}},[r,e,n,i,a])}function Ji(t,e){const n=j_(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=oee(),i=see(n.options,n.previewOptions);return dee(n,r,i),[q_(n.collect,r,i),GZ(i),WZ(i)]}function fee(t){return k.useMemo(()=>t.hooks.dropTarget(),[t])}function hee(t){const e=ff(),n=k.useMemo(()=>new aee(e.getBackend()),[e]);return $0(()=>(n.dropTargetOptions=t||null,n.reconnect(),()=>n.disconnectDropTarget()),[t]),n}function pee(){const t=ff();return k.useMemo(()=>new JZ(t),[t])}function gee(t){const{accept:e}=t;return k.useMemo(()=>(qr(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class mee{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 vee(t,e){const n=k.useMemo(()=>new mee(t,e),[e]);return k.useEffect(()=>{n.spec=t},[t]),n}function bee(t,e,n){const r=ff(),i=vee(t,e),a=gee(t);$0(function(){const[l,c]=ZZ(a,i,r);return e.receiveHandlerId(l),n.receiveHandlerId(l),c},[r,e,i,n,a.map(s=>s.toString()).join("|")])}function yee(t,e){const n=j_(t,e),r=pee(),i=hee(n.options);return bee(n,r,i),[q_(n.collect,r,i),fee(i)]}function z_(t){let e=null;return()=>(e==null&&(e=t()),e)}function Aee(t,e){return t.filter(n=>n!==e)}function wee(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 See{enter(e){const n=this.entered.length,r=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(e));return this.entered=wee(this.entered.filter(r),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=Aee(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class xee{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 Y_="__NATIVE_FILE__",K_="__NATIVE_URL__",X_="__NATIVE_TEXT__",R_="__NATIVE_HTML__",G_=Object.freeze(Object.defineProperty({__proto__:null,FILE:Y_,HTML:R_,TEXT:X_,URL:K_},Symbol.toStringTag,{value:"Module"}));function _8(t,e,n){const r=e.reduce((i,a)=>i||t.getData(a),"");return r??n}const D8={[Y_]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[R_]:{exposeProperties:{html:(t,e)=>_8(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[K_]:{exposeProperties:{urls:(t,e)=>_8(t,e,"").split(`
|
|
1831
|
-
`),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[X_]:{exposeProperties:{text:(t,e)=>_8(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function Cee(t,e){const n=D8[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new xee(n);return r.loadDataTransfer(e),r}function O8(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(D8).filter(n=>{const r=D8[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(i=>e.indexOf(i)>-1):!1})[0]||null}const Tee=z_(()=>/firefox/i.test(navigator.userAgent)),W_=z_(()=>!!window.safari);class Q_{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],w=l+A;u.push(3*w/((w+A)/g+(w+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 Eee=1;function J_(t){const e=t.nodeType===Eee?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function o3(t){return{x:t.clientX,y:t.clientY}}function Iee(t){var e;return t.nodeName==="IMG"&&(Tee()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function _ee(t,e,n,r){let i=t?e.width:n,a=t?e.height:r;return W_()&&t&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}function Dee(t,e,n,r,i){const a=Iee(e),l=J_(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}=_ee(a,e,u,d),v=()=>{let _=new Q_([0,.5,1],[c.y,c.y/d*g,c.y+g-d]).interpolate(h);return W_()&&a&&(_+=(window.devicePixelRatio-1)*g),_},A=()=>new Q_([0,.5,1],[c.x,c.x/u*m,c.x+m-u]).interpolate(f),{offsetX:w,offsetY:x}=i,S=w===0||w,E=x===0||x;return{x:S?w:A(),y:E?x:v()}}class Oee{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 Nee(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Z_(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){Nee(t,i,n[i])})}return t}class Fee{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 Z_({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 Z_({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=Cee(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&&J_(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=o3(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=O8(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(),S=Dee(f,h,s,{anchorX:m,anchorY:g},{offsetX:v,offsetY:A});l.setDragImage(h,S.x,S.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=O8(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:o3(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=o3(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 O8(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:a}=this;this.dropTargetIds=[],this.actions.hover(a,{clientOffset:o3(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 Oee(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new See(this.isNodeInDocument)}}const hf=function(e,n,r){return new Fee(e,n,r)},eD=k.createContext(void 0),tD=({children:t,option:e,onChange:n})=>{const[r,i]=k.useReducer(AJ,h8),{isPreview:a,isAdmin:s,isRenderView:l,renderType:c,isAdvanceView:u,globalAlignment:d="ltr",emitSocketData:f,media:h,reusableComponent:m}=e;return o.jsx(eD.Provider,{value:{media:h,isPreview:a,isAdmin:s,isRenderView:l,renderType:c,isAdvanceView:u,globalAlignment:d,emitSocketData:f,reusableComponent:m,state:r,dispatch:i,onChange:n},children:o.jsx(cK,{children:o.jsx(df,{backend:hf,children:t})})})},nD=()=>k.useContext(eD),kee=(t,e,n)=>{const r=Array.from(t),[i]=r.splice(e,1);return r.splice(n,0,i),r},Pee=(t,e)=>[...t.slice(0,e),...t.slice(e+1)],Mee=(t,e,n)=>[...t.slice(0,e),n,...t.slice(e)],rD=(t,e,n)=>{if(e.length===1){const c=Number(e[0]),u=Number(n[0]);return kee(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:rD(l.children,a,s)},r},iD=(t,e)=>{if(e.length===1){const s=Number(e[0]);return Pee(t,s)}const n=[...t],r=Number(e.slice(0,1)),i=e.slice(1),a=n[r];return n[r]={...a,children:iD(a.children,i)},n},N8=(t,e,n)=>{if(e.length===1){const l=Number(e[0]);return Mee(t,l,n)}const r=[...t],i=Number(e.slice(0,1)),a=e.slice(1),s=r[i];return r[i]={...s,children:N8(s.children,a,n)},r},Lee=(t,e,n)=>{let r=[...t],i=r[n[ca]].children[n[ua]].children[n[ha]].children[n[pa]].children[n[ga]].inlineConditionalRules.rules[n[Sa]].conditions[n[$o]].children[n[yo]];return r[n[ca]].children[n[ua]].children[n[ha]].children[n[pa]].children[n[ga]].inlineConditionalRules.rules[n[Sa]].conditions[n[$o]].children.splice([n[yo]],1),r[e[ca]].children[e[ua]].children[e[ha]].children[e[pa]].children[e[ga]].inlineConditionalRules.rules[e[Sa]].conditions[e[$o]].children.splice(e[yo],0,i),r},Bee=(t,e,n)=>rD(t,e,n),Vee=t=>{const e=[...t],n={type:ms,uuid:nt(),children:[]};return e.map(r=>(r.children.length||(r.children=[n]),r))},aD=(t,e,n,r)=>{var h,m,g,v,A,w;let i;const a={...Sc,uuid:nt(),children:[r]},s={...nu,uuid:nt()},l={...nu,uuid:nt(),children:[a]},c={...lf,uuid:nt(),children:[l]},u={...e3,uuid:nt(),children:[c]};switch(e.length){case 1:{r.type===cC?i={...c,children:[r]}:i={...c,children:[s]};break}case 2:{r.type===na?i={...u,children:[c]}:i={...u,children:[c]};break}case 3:{r.type===bo?i={...c,children:[l]}:i={...nu,uuid:nt(),children:[{...Sc,uuid:nt(),children:[r]}]};break}case 4:{r.type===$1?i=a:i=r;break}case 5:{i=r;break}default:i=r}let d=t;return n.length>5?(w=(A=(v=(g=(m=(h=d[n[ca]])==null?void 0:h.children[n[ua]])==null?void 0:m.children[n[ha]])==null?void 0:g.children[n[pa]])==null?void 0:v.children[n[ga]])==null?void 0:A.inlineConditionalRules)==null||w.rules[n[Sa]].conditions[n[$o]].children.splice(n[yo],1):d=iD(d,n),d=Vee(d),d=N8(d,e,i),d},Uee=(t,e,n)=>{let r;switch(e.length){case 1:{r={...e3,uuid:nt(),children:[{...lf,uuid:nt(),children:[{...nu,uuid:nt(),children:[{...Sc,uuid:nt(),children:[n]}]}]}]};break}case 2:{r={...lf,uuid:nt(),children:[{...nu,uuid:nt(),children:[{...Sc,uuid:nt(),children:[n]}]}]};break}case 3:{r={...nu,uuid:nt(),children:[{...Sc,uuid:nt(),children:[n]}]};break}case 4:{r={...Sc,uuid:nt(),children:[n]};break}default:r=n}return N8(t,e,r)},ln=()=>{const{state:t,dispatch:e,onChange:n}=nD();if(t===void 0)throw new Error("Must be wrapped in builder provider");const r=t.builderTemplateName,i=t.isChangesSaved,a=t.editing_by,s=t.version_name,l=t.loading,c=t.published_status,u=t,d=t,f=t.renderType,h=t==null?void 0:t.userSelectedLanguage,m=t==null?void 0:t.languages,g=t.layout;k.useEffect(()=>(console.log("update state"),n(t),()=>{}),[t]);const v=k.useCallback(ge=>dJ(ge)(e),[e]),A=k.useCallback(ge=>BQ(ge)(e),[e]),w=ge=>(Oe,Me)=>(console.log("Updating form schema:",ge),console.log("Dispatch:",Oe),console.log("State:",Me),ge),x=k.useCallback(ge=>w(ge)(e,t),[e,t]),S=k.useCallback(ge=>fJ(ge)(e),[e]),E=k.useCallback((ge,Oe)=>{var Gt,bn,yn,An,$n,Rn,Bn,mn;const Me=[...g],ce=ge.path.split("-"),B=ce.slice(0,-1).join("-"),ee={uuid:Oe.uuid,type:Oe.type,reviewerChecklist:[]},te=0,ue=1,fe=2,Ie=3,De=4,Ye=5,pt=6,Bt=8,ut=7,Dt=5,st=6,St=8;if(Oe.type===na&&(Oe==null?void 0:Oe.schema)!==void 0){L(JSON.parse(Oe==null?void 0:Oe.schema),parseInt(ce[te]));return}if(((Gt=Oe==null?void 0:Oe.schema)==null?void 0:Gt.componentType)==="question"&&((Rn=($n=(An=(yn=(bn=Me[0])==null?void 0:bn.children[0])==null?void 0:yn.children[0])==null?void 0:An.children[0])==null?void 0:$n.children)!=null&&Rn.some(Re=>{var tt,dt,jt;return((tt=Re==null?void 0:Re.questionText)==null?void 0:tt[h.type])===((jt=(dt=Oe==null?void 0:Oe.schema)==null?void 0:dt.questionText)==null?void 0:jt[h.type])})))return;if(Oe.type===tr){let Re={type:$1,reviewerChecklist:[],..._t.cloneDeep(Oe.schema)};if(Re!=null&&Re.options&&(Re={...Re,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:{}}]}),Re.componentType==="grid-component"&&(Re={...Re,children:[],options:[{uuid:nt(),custom_values:{}}]}),Re.componentType==="radio-hierarchal"&&(Re={...Re,type:"radio",children:[],options:[{uuid:nt(),label:"Yes",value:null,enableConditionalField:!0,children:[]},{uuid:nt(),label:"No",value:null,enableConditionalField:!0,children:[]}]}),Re={...Re,uuid:nt()},ce.length===Bt){Z(parseInt(ce[te]),parseInt(ce[ue]),parseInt(ce[fe]),parseInt(ce[Ie]),parseInt(ce[De]),parseInt(ce[Ye]),parseInt(ce[pt]),Re);return}if(ce.length===ut){K(parseInt(ce[te]),parseInt(ce[ue]),parseInt(ce[fe]),parseInt(ce[Ie]),parseInt(ce[De]),parseInt(ce[Dt]),parseInt(ce[st]),Re);return}if((mn=(Bn=Me[ce[te]].children[ce[ue]])==null?void 0:Bn.children[ce[fe]])!=null&&mn.rowIsRepeatable&&(Re==null?void 0:Re.componentType)==="editor")return;S(Uee(Me,ce,Re)),ce.length>1&&Se(ce[te],ce[ue],ce[fe],Re);return}const ct=Oe.path.split("-"),Ke=ct.slice(0,-1).join("-");if(ct.length===ce.length){if(Ke===B){if((ct==null?void 0:ct.length)===St){S(Lee(Me,ce,ct));return}S(Bee(Me,ce,ct));return}const Re={...ee,...Oe};(Oe==null?void 0:Oe.id)===void 0&&(Re.id=nt()),S(aD(Me,ce,ct,Re));return}if((ct==null?void 0:ct.length)===8){const Re={type:$1,reviewerChecklist:[],...Oe};K(parseInt(ce[te]),parseInt(ce[ue]),parseInt(ce[fe]),parseInt(ce[Ie]),parseInt(ce[De]),parseInt(ce[Dt]),parseInt(ce[st]),Re),ne(ct[ca],ct[ua],ct[ha],ct[pa],ct[ga],ct[Dt],ct[st],ct[Ul]);return}const Tt={...ee,...Oe};(Oe==null?void 0:Oe.id)===void 0&&(Tt.id=nt()),S(aD(Me,ce,ct,Tt))},[g,S,h.type]),T=k.useCallback(()=>yJ()(e),[e]),_=k.useCallback(ge=>hJ(ge)(e,t),[e]),C=k.useCallback(ge=>pJ(ge)(e,t),[e]),O=k.useCallback(ge=>gJ(ge)(e),[e]),F=k.useCallback(ge=>LQ(ge)(e),[e]),V=k.useCallback(ge=>$Q(ge)(e),[e]),L=k.useCallback((ge,Oe)=>YQ(ge,Oe)(e),[e]),z=k.useCallback((ge,Oe)=>WQ(ge,Oe)(e),[e]),N=k.useCallback((ge,Oe,Me)=>ZQ(ge,Oe,Me)(e),[e]),$=k.useCallback(ge=>qQ(ge)(e),[e]),de=k.useCallback((ge,Oe)=>jQ(ge,Oe)(e),[e]),me=k.useCallback((ge,Oe,Me)=>GQ(ge,Oe,Me)(e),[e]),ae=k.useCallback((ge,Oe,Me,ce)=>tJ(ge,Oe,Me,ce)(e),[e]),G=k.useCallback((ge,Oe,Me,ce,B)=>nJ(ge,Oe,Me,ce,B)(e,t),[e]),ie=k.useCallback((ge,Oe,Me,ce,B,ee)=>rJ(ge,Oe,Me,ce,B,ee)(e,t),[e]),Y=k.useCallback((ge,Oe,Me)=>HQ(ge,Oe,Me)(e),[e]),pe=k.useCallback((ge,Oe,Me,ce)=>RQ(ge,Oe,Me,ce)(e),[e]),se=k.useCallback((ge,Oe)=>UQ(ge,Oe)(e),[e]),Q=k.useCallback((ge,Oe,Me,ce,B,ee)=>iJ(ge,Oe,Me,ce,B,ee)(e),[e]),W=k.useCallback((ge,Oe,Me,ce,B)=>eJ(ge,Oe,Me,ce,B)(e),[e]),re=k.useCallback((ge,Oe,Me,ce)=>XQ(ge,Oe,Me,ce)(e),[e]),ve=k.useCallback((ge,Oe,Me)=>zQ(ge,Oe,Me)(e),[e]),xe=k.useCallback((ge,Oe)=>VQ(ge,Oe)(e,t),[e]),Se=k.useCallback((ge,Oe,Me,ce)=>QQ(ge,Oe,Me,ce)(e),[e]),be=k.useCallback((ge,Oe,Me,ce,B,ee,te,ue,fe)=>cJ(ge,Oe,Me,ce,B,ee,te,ue,fe)(e),[e]),ye=k.useCallback((ge,Oe,Me,ce,B,ee,te,ue,fe)=>oJ(ge,Oe,Me,ce,B,ee,te,ue,fe)(e),[e]),ne=k.useCallback((ge,Oe,Me,ce,B,ee,te,ue)=>lJ(ge,Oe,Me,ce,B,ee,te,ue)(e),[e]),U=k.useCallback((ge,Oe,Me,ce,B,ee,te,ue)=>uJ(ge,Oe,Me,ce,B,ee,te,ue)(e),[e]),Z=k.useCallback((ge,Oe,Me,ce,B,ee,te,ue)=>aJ(ge,Oe,Me,ce,B,ee,te,ue)(e),[e]),K=k.useCallback((ge,Oe,Me,ce,B,ee,te,ue)=>sJ(ge,Oe,Me,ce,B,ee,te,ue)(e),[e]),he=k.useCallback(ge=>mJ(ge)(e),[e]),_e=k.useCallback(ge=>vJ(ge)(e),[e]),Ce=k.useCallback(ge=>bJ(ge)(e),[e]);return{builderIsChangesSaved:i,builderTemplateName:r,formBuilderFormSchema:u,formBuilderFormLayout:g,formBuilderSchemaLanguages:m,saveFormTemplateNewVersion:d,userSelectedLanguage:h,formBuilderConfigurationType:f,formBuilderLoading:l,formBuilderPublishedStatus:c,builderEditingBy:a,builderVersionName:s,handleDrop:E,formatTableFieldsHook:A,saveFormBuilderSchema:v,removePage:$,removeSection:de,removeRow:me,removeColumn:ae,removeField:G,updateEditingBy:Ce,addTabs:F,addSection:V,addRow:z,addColumn:N,cloneField:Q,cloneColumn:W,cloneRow:re,cloneSection:ve,clonePage:xe,sectionImport:L,setLayout:S,fieldSettingUpdate:ie,selectFormBuilderLanguage:_,unselectFormBuilderLanguage:C,updateUserFormSelectedLanguage:O,updateFormType:he,schemaBuilderUpdate:_e,pageSettingUpdate:se,saveFormProgress:x,sectionSettingUpdate:Y,rowSettingUpdate:pe,clearBuilderSchema:T,addFieldToRowRepeaptable:Se,addFieldToInlineRuleCondtionFields:Z,fieldSettingUpdateInlineConditional:be,fieldSettingDeleteInlineConditional:U,addFieldToGridComponentHook:K,gridComponentFieldSettingUpdate:ye,gridComponentFieldDelete:ne}};function Fp(t){"@babel/helpers - typeof";return Fp=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},Fp(t)}function qee(t,e){if(Fp(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Fp(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function jee(t){var e=qee(t,"string");return Fp(e)==="symbol"?e:String(e)}function $ee(t,e,n){return e=jee(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function H0(){return H0=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},H0.apply(this,arguments)}function Hee(t){if(Array.isArray(t))return t}function zee(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 sD(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 Yee(t,e){if(t){if(typeof t=="string")return sD(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 sD(t,e)}}function Kee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1831
|
+
`),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[X_]:{exposeProperties:{text:(t,e)=>_8(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function Cee(t,e){const n=D8[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new xee(n);return r.loadDataTransfer(e),r}function O8(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(D8).filter(n=>{const r=D8[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(i=>e.indexOf(i)>-1):!1})[0]||null}const Tee=z_(()=>/firefox/i.test(navigator.userAgent)),W_=z_(()=>!!window.safari);class Q_{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],w=l+A;u.push(3*w/((w+A)/g+(w+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 Eee=1;function J_(t){const e=t.nodeType===Eee?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function o3(t){return{x:t.clientX,y:t.clientY}}function Iee(t){var e;return t.nodeName==="IMG"&&(Tee()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function _ee(t,e,n,r){let i=t?e.width:n,a=t?e.height:r;return W_()&&t&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}function Dee(t,e,n,r,i){const a=Iee(e),l=J_(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}=_ee(a,e,u,d),v=()=>{let _=new Q_([0,.5,1],[c.y,c.y/d*g,c.y+g-d]).interpolate(h);return W_()&&a&&(_+=(window.devicePixelRatio-1)*g),_},A=()=>new Q_([0,.5,1],[c.x,c.x/u*m,c.x+m-u]).interpolate(f),{offsetX:w,offsetY:x}=i,S=w===0||w,E=x===0||x;return{x:S?w:A(),y:E?x:v()}}class Oee{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 Nee(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Z_(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){Nee(t,i,n[i])})}return t}class Fee{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 Z_({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 Z_({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=Cee(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&&J_(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=o3(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=O8(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(),S=Dee(f,h,s,{anchorX:m,anchorY:g},{offsetX:v,offsetY:A});l.setDragImage(h,S.x,S.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=O8(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:o3(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=o3(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 O8(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:a}=this;this.dropTargetIds=[],this.actions.hover(a,{clientOffset:o3(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 Oee(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new See(this.isNodeInDocument)}}const hf=function(e,n,r){return new Fee(e,n,r)},eD=k.createContext(void 0),tD=({children:t,option:e,templateSchema:n,onChange:r})=>{console.log("FormBuilderProvider templateSchema",n);const[i,a]=k.useReducer(AJ,{...h8,...n}),{isPreview:s,isAdmin:l,isRenderView:c,renderType:u,isAdvanceView:d,globalAlignment:f="ltr",emitSocketData:h,media:m,reusableComponent:g}=e;return o.jsx(eD.Provider,{value:{media:m,isPreview:s,isAdmin:l,isRenderView:c,renderType:u,isAdvanceView:d,globalAlignment:f,emitSocketData:h,reusableComponent:g,state:i,dispatch:a,onChange:r},children:o.jsx(cK,{children:o.jsx(df,{backend:hf,children:t})})})},nD=()=>k.useContext(eD),kee=(t,e,n)=>{const r=Array.from(t),[i]=r.splice(e,1);return r.splice(n,0,i),r},Pee=(t,e)=>[...t.slice(0,e),...t.slice(e+1)],Mee=(t,e,n)=>[...t.slice(0,e),n,...t.slice(e)],rD=(t,e,n)=>{if(e.length===1){const c=Number(e[0]),u=Number(n[0]);return kee(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:rD(l.children,a,s)},r},iD=(t,e)=>{if(e.length===1){const s=Number(e[0]);return Pee(t,s)}const n=[...t],r=Number(e.slice(0,1)),i=e.slice(1),a=n[r];return n[r]={...a,children:iD(a.children,i)},n},N8=(t,e,n)=>{if(e.length===1){const l=Number(e[0]);return Mee(t,l,n)}const r=[...t],i=Number(e.slice(0,1)),a=e.slice(1),s=r[i];return r[i]={...s,children:N8(s.children,a,n)},r},Lee=(t,e,n)=>{let r=[...t],i=r[n[ca]].children[n[ua]].children[n[ha]].children[n[pa]].children[n[ga]].inlineConditionalRules.rules[n[Sa]].conditions[n[$o]].children[n[yo]];return r[n[ca]].children[n[ua]].children[n[ha]].children[n[pa]].children[n[ga]].inlineConditionalRules.rules[n[Sa]].conditions[n[$o]].children.splice([n[yo]],1),r[e[ca]].children[e[ua]].children[e[ha]].children[e[pa]].children[e[ga]].inlineConditionalRules.rules[e[Sa]].conditions[e[$o]].children.splice(e[yo],0,i),r},Bee=(t,e,n)=>rD(t,e,n),Vee=t=>{const e=[...t],n={type:ms,uuid:nt(),children:[]};return e.map(r=>(r.children.length||(r.children=[n]),r))},aD=(t,e,n,r)=>{var h,m,g,v,A,w;let i;const a={...Sc,uuid:nt(),children:[r]},s={...nu,uuid:nt()},l={...nu,uuid:nt(),children:[a]},c={...lf,uuid:nt(),children:[l]},u={...e3,uuid:nt(),children:[c]};switch(e.length){case 1:{r.type===cC?i={...c,children:[r]}:i={...c,children:[s]};break}case 2:{r.type===na?i={...u,children:[c]}:i={...u,children:[c]};break}case 3:{r.type===bo?i={...c,children:[l]}:i={...nu,uuid:nt(),children:[{...Sc,uuid:nt(),children:[r]}]};break}case 4:{r.type===$1?i=a:i=r;break}case 5:{i=r;break}default:i=r}let d=t;return n.length>5?(w=(A=(v=(g=(m=(h=d[n[ca]])==null?void 0:h.children[n[ua]])==null?void 0:m.children[n[ha]])==null?void 0:g.children[n[pa]])==null?void 0:v.children[n[ga]])==null?void 0:A.inlineConditionalRules)==null||w.rules[n[Sa]].conditions[n[$o]].children.splice(n[yo],1):d=iD(d,n),d=Vee(d),d=N8(d,e,i),d},Uee=(t,e,n)=>{let r;switch(e.length){case 1:{r={...e3,uuid:nt(),children:[{...lf,uuid:nt(),children:[{...nu,uuid:nt(),children:[{...Sc,uuid:nt(),children:[n]}]}]}]};break}case 2:{r={...lf,uuid:nt(),children:[{...nu,uuid:nt(),children:[{...Sc,uuid:nt(),children:[n]}]}]};break}case 3:{r={...nu,uuid:nt(),children:[{...Sc,uuid:nt(),children:[n]}]};break}case 4:{r={...Sc,uuid:nt(),children:[n]};break}default:r=n}return N8(t,e,r)},ln=()=>{const{state:t,dispatch:e,onChange:n}=nD();if(t===void 0)throw new Error("Must be wrapped in builder provider");const r=t.builderTemplateName,i=t.isChangesSaved,a=t.editing_by,s=t.version_name,l=t.loading,c=t.published_status,u=t,d=t,f=t.renderType,h=t==null?void 0:t.userSelectedLanguage,m=t==null?void 0:t.languages,g=t.layout,v=k.useCallback(ge=>dJ(ge)(e),[e]),A=k.useCallback(ge=>BQ(ge)(e),[e]),w=ge=>(Oe,Me)=>(console.log("Updating form schema:",ge),console.log("Dispatch:",Oe),console.log("State:",Me),ge),x=k.useCallback(ge=>w(ge)(e,t),[e,t]),S=k.useCallback(ge=>fJ(ge)(e),[e]),E=k.useCallback((ge,Oe)=>{var Gt,bn,yn,An,$n,Rn,Bn,mn;const Me=[...g],ce=ge.path.split("-"),B=ce.slice(0,-1).join("-"),ee={uuid:Oe.uuid,type:Oe.type,reviewerChecklist:[]},te=0,ue=1,fe=2,Ie=3,De=4,Ye=5,pt=6,Bt=8,ut=7,Dt=5,st=6,St=8;if(Oe.type===na&&(Oe==null?void 0:Oe.schema)!==void 0){L(JSON.parse(Oe==null?void 0:Oe.schema),parseInt(ce[te]));return}if(((Gt=Oe==null?void 0:Oe.schema)==null?void 0:Gt.componentType)==="question"&&((Rn=($n=(An=(yn=(bn=Me[0])==null?void 0:bn.children[0])==null?void 0:yn.children[0])==null?void 0:An.children[0])==null?void 0:$n.children)!=null&&Rn.some(Re=>{var tt,dt,jt;return((tt=Re==null?void 0:Re.questionText)==null?void 0:tt[h.type])===((jt=(dt=Oe==null?void 0:Oe.schema)==null?void 0:dt.questionText)==null?void 0:jt[h.type])})))return;if(Oe.type===tr){let Re={type:$1,reviewerChecklist:[],..._t.cloneDeep(Oe.schema)};if(Re!=null&&Re.options&&(Re={...Re,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:{}}]}),Re.componentType==="grid-component"&&(Re={...Re,children:[],options:[{uuid:nt(),custom_values:{}}]}),Re.componentType==="radio-hierarchal"&&(Re={...Re,type:"radio",children:[],options:[{uuid:nt(),label:"Yes",value:null,enableConditionalField:!0,children:[]},{uuid:nt(),label:"No",value:null,enableConditionalField:!0,children:[]}]}),Re={...Re,uuid:nt()},ce.length===Bt){Z(parseInt(ce[te]),parseInt(ce[ue]),parseInt(ce[fe]),parseInt(ce[Ie]),parseInt(ce[De]),parseInt(ce[Ye]),parseInt(ce[pt]),Re);return}if(ce.length===ut){K(parseInt(ce[te]),parseInt(ce[ue]),parseInt(ce[fe]),parseInt(ce[Ie]),parseInt(ce[De]),parseInt(ce[Dt]),parseInt(ce[st]),Re);return}if((mn=(Bn=Me[ce[te]].children[ce[ue]])==null?void 0:Bn.children[ce[fe]])!=null&&mn.rowIsRepeatable&&(Re==null?void 0:Re.componentType)==="editor")return;S(Uee(Me,ce,Re)),ce.length>1&&Se(ce[te],ce[ue],ce[fe],Re);return}const ct=Oe.path.split("-"),Ke=ct.slice(0,-1).join("-");if(ct.length===ce.length){if(Ke===B){if((ct==null?void 0:ct.length)===St){S(Lee(Me,ce,ct));return}S(Bee(Me,ce,ct));return}const Re={...ee,...Oe};(Oe==null?void 0:Oe.id)===void 0&&(Re.id=nt()),S(aD(Me,ce,ct,Re));return}if((ct==null?void 0:ct.length)===8){const Re={type:$1,reviewerChecklist:[],...Oe};K(parseInt(ce[te]),parseInt(ce[ue]),parseInt(ce[fe]),parseInt(ce[Ie]),parseInt(ce[De]),parseInt(ce[Dt]),parseInt(ce[st]),Re),ne(ct[ca],ct[ua],ct[ha],ct[pa],ct[ga],ct[Dt],ct[st],ct[Ul]);return}const Tt={...ee,...Oe};(Oe==null?void 0:Oe.id)===void 0&&(Tt.id=nt()),S(aD(Me,ce,ct,Tt))},[g,S,h.type]),T=k.useCallback(()=>yJ()(e),[e]),_=k.useCallback(ge=>hJ(ge)(e,t),[e]),C=k.useCallback(ge=>pJ(ge)(e,t),[e]),O=k.useCallback(ge=>gJ(ge)(e),[e]),F=k.useCallback(ge=>LQ(ge)(e),[e]),V=k.useCallback(ge=>$Q(ge)(e),[e]),L=k.useCallback((ge,Oe)=>YQ(ge,Oe)(e),[e]),z=k.useCallback((ge,Oe)=>WQ(ge,Oe)(e),[e]),N=k.useCallback((ge,Oe,Me)=>ZQ(ge,Oe,Me)(e),[e]),$=k.useCallback(ge=>qQ(ge)(e),[e]),de=k.useCallback((ge,Oe)=>jQ(ge,Oe)(e),[e]),me=k.useCallback((ge,Oe,Me)=>GQ(ge,Oe,Me)(e),[e]),ae=k.useCallback((ge,Oe,Me,ce)=>tJ(ge,Oe,Me,ce)(e),[e]),G=k.useCallback((ge,Oe,Me,ce,B)=>nJ(ge,Oe,Me,ce,B)(e,t),[e]),ie=k.useCallback((ge,Oe,Me,ce,B,ee)=>rJ(ge,Oe,Me,ce,B,ee)(e,t),[e]),Y=k.useCallback((ge,Oe,Me)=>HQ(ge,Oe,Me)(e),[e]),pe=k.useCallback((ge,Oe,Me,ce)=>RQ(ge,Oe,Me,ce)(e),[e]),se=k.useCallback((ge,Oe)=>UQ(ge,Oe)(e),[e]),Q=k.useCallback((ge,Oe,Me,ce,B,ee)=>iJ(ge,Oe,Me,ce,B,ee)(e),[e]),W=k.useCallback((ge,Oe,Me,ce,B)=>eJ(ge,Oe,Me,ce,B)(e),[e]),re=k.useCallback((ge,Oe,Me,ce)=>XQ(ge,Oe,Me,ce)(e),[e]),ve=k.useCallback((ge,Oe,Me)=>zQ(ge,Oe,Me)(e),[e]),xe=k.useCallback((ge,Oe)=>VQ(ge,Oe)(e,t),[e]),Se=k.useCallback((ge,Oe,Me,ce)=>QQ(ge,Oe,Me,ce)(e),[e]),be=k.useCallback((ge,Oe,Me,ce,B,ee,te,ue,fe)=>cJ(ge,Oe,Me,ce,B,ee,te,ue,fe)(e),[e]),ye=k.useCallback((ge,Oe,Me,ce,B,ee,te,ue,fe)=>oJ(ge,Oe,Me,ce,B,ee,te,ue,fe)(e),[e]),ne=k.useCallback((ge,Oe,Me,ce,B,ee,te,ue)=>lJ(ge,Oe,Me,ce,B,ee,te,ue)(e),[e]),U=k.useCallback((ge,Oe,Me,ce,B,ee,te,ue)=>uJ(ge,Oe,Me,ce,B,ee,te,ue)(e),[e]),Z=k.useCallback((ge,Oe,Me,ce,B,ee,te,ue)=>aJ(ge,Oe,Me,ce,B,ee,te,ue)(e),[e]),K=k.useCallback((ge,Oe,Me,ce,B,ee,te,ue)=>sJ(ge,Oe,Me,ce,B,ee,te,ue)(e),[e]),he=k.useCallback(ge=>mJ(ge)(e),[e]),_e=k.useCallback(ge=>vJ(ge)(e),[e]),Ce=k.useCallback(ge=>bJ(ge)(e),[e]);return{builderIsChangesSaved:i,builderTemplateName:r,formBuilderFormSchema:u,formBuilderFormLayout:g,formBuilderSchemaLanguages:m,saveFormTemplateNewVersion:d,userSelectedLanguage:h,formBuilderConfigurationType:f,formBuilderLoading:l,formBuilderPublishedStatus:c,builderEditingBy:a,builderVersionName:s,handleDrop:E,formatTableFieldsHook:A,saveFormBuilderSchema:v,removePage:$,removeSection:de,removeRow:me,removeColumn:ae,removeField:G,updateEditingBy:Ce,addTabs:F,addSection:V,addRow:z,addColumn:N,cloneField:Q,cloneColumn:W,cloneRow:re,cloneSection:ve,clonePage:xe,sectionImport:L,setLayout:S,fieldSettingUpdate:ie,selectFormBuilderLanguage:_,unselectFormBuilderLanguage:C,updateUserFormSelectedLanguage:O,updateFormType:he,schemaBuilderUpdate:_e,pageSettingUpdate:se,saveFormProgress:x,sectionSettingUpdate:Y,rowSettingUpdate:pe,clearBuilderSchema:T,addFieldToRowRepeaptable:Se,addFieldToInlineRuleCondtionFields:Z,fieldSettingUpdateInlineConditional:be,fieldSettingDeleteInlineConditional:U,addFieldToGridComponentHook:K,gridComponentFieldSettingUpdate:ye,gridComponentFieldDelete:ne}};function Fp(t){"@babel/helpers - typeof";return Fp=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},Fp(t)}function qee(t,e){if(Fp(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Fp(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function jee(t){var e=qee(t,"string");return Fp(e)==="symbol"?e:String(e)}function $ee(t,e,n){return e=jee(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function H0(){return H0=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},H0.apply(this,arguments)}function Hee(t){if(Array.isArray(t))return t}function zee(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 sD(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 Yee(t,e){if(t){if(typeof t=="string")return sD(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 sD(t,e)}}function Kee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1832
1832
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l3(t,e){return Hee(t)||zee(t,e)||Yee(t,e)||Kee()}var Xee={root:function(e){var n=e.props;return mt("p-colorpicker p-component",{"p-colorpicker-overlay":!n.inline})},input:function(e){var n=e.props;return mt("p-colorpicker-preview p-inputtext",n.inputClassName,{"p-disabled":n.disabled})},panel:function(e){var n=e.panelProps,r=e.context;return mt("p-colorpicker-panel",n.panelClassName,{"p-colorpicker-overlay-panel":!n.inline,"p-disabled":n.disabled,"p-input-filled":r&&r.inputStyle==="filled"||Un.inputStyle==="filled","p-ripple-disabled":r&&r.ripple===!1||Un.ripple===!1})},content:"p-colorpicker-content",hueHandle:"p-colorpicker-hue-handle",hue:"p-colorpicker-hue",colorHandle:"p-colorpicker-color-handle",color:"p-colorpicker-color",selector:"p-colorpicker-color-selector",transition:"p-connected-overlay"},Ree=`
|
|
1833
1833
|
@layer primereact {
|
|
1834
1834
|
.p-colorpicker {
|
|
@@ -1921,7 +1921,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1921
1921
|
}
|
|
1922
1922
|
}
|
|
1923
1923
|
`,kp=Mn.extend({defaultProps:{__TYPE:"ColorPicker",appendTo:null,autoFocus:!1,children:void 0,className:null,defaultColor:"ff0000",disabled:!1,format:"hex",id:null,inline:!1,inputClassName:null,inputId:null,inputRef:null,inputStyle:null,onChange:null,onHide:null,onShow:null,panelClassName:null,panelStyle:null,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,transitionOptions:null,value:null},css:{classes:Xee,styles:Ree}}),oD=y.forwardRef(function(t,e){var n=jn(),r=y.useContext(rr),i=t.ptm,a=t.cx,s=function(){var u=n({className:a("panel",{panelProps:t,context:r}),style:t.panelStyle,onClick:t.onClick},i("panel",{hostName:t.hostName})),d=n({classNames:a("transition"),in:t.in,timeout:{enter:120,exit:100},options:t.transitionOptions,unmountOnExit:!0,onEnter:t.onEnter,onEntered:t.onEntered,onExit:t.onExit,onExited:t.onExited},i("transition",{hostName:t.hostName}));return y.createElement(zo,H0({nodeRef:e},d),y.createElement("div",H0({ref:e},u),t.children))},l=s();return t.inline?l:y.createElement(ql,{element:l,appendTo:t.appendTo})});oD.displayName="ColorPickerPanel";function lD(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 Gee(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?lD(Object(n),!0).forEach(function(r){$ee(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lD(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Wd=y.memo(y.forwardRef(function(t,e){var n=jn(),r=y.useContext(rr),i=kp.getProps(t,r),a=y.useState(!1),s=l3(a,2),l=s[0],c=s[1],u=kp.setMetaData({props:i,state:{overlayVisible:l}}),d=u.ptm,f=u.cx,h=u.isUnstyled,m=l&&i.closeOnEscape,g=P9("overlay-panel",m);mi(kp.css.styles,h,{name:"colorpicker"}),sp({callback:function(){B()},when:l&&g,priority:[ap.OVERLAY_PANEL,g]});var v=y.useRef(null),A=y.useRef(null),w=y.useRef(i.inputRef),x=y.useRef(null),S=y.useRef(null),E=y.useRef(null),T=y.useRef(null),_=y.useRef(!1),C=y.useRef(null),O=y.useRef(!1),F=op({target:v,overlay:A,listener:function(tt,dt){var jt=dt.valid;jt&&B()},when:l}),V=l3(F,2),L=V[0],z=V[1],N=ls({type:"mousemove",listener:function(tt){O.current&&U(tt),_.current&&re(tt)}}),$=l3(N,2),de=$[0],me=$[1],ae=ls({type:"mouseup",listener:function(){O.current=_.current=!1,Te.removeClass(v.current,"p-colorpicker-dragging"),me(),Y()}}),G=l3(ae,2),ie=G[0],Y=G[1],pe=function(tt){i.inline||vs.emit("overlay-click",{originalEvent:tt,target:v.current})},se=function(tt){i.disabled||(ye(),Q(tt))},Q=function(tt){i.disabled||(_.current=!0,re(tt),!h&&Te.addClass(v.current,"p-colorpicker-dragging"))},W=function(tt){return tt.pageY!==void 0?tt.pageY:tt.changedTouches!==void 0?tt.changedTouches[0].pageY:0},re=function(tt){var dt=T.current.getBoundingClientRect().top+(window.scrollY||document.documentElement.scrollTop||document.body.scrollTop||0),jt=W(tt),Cn=Math.floor(360*(150-Math.max(0,Math.min(150,jt-dt)))/150);C.current=pt({h:Cn,s:C.current.s,b:C.current.b}),Ce(),Oe(),Z()},ve=function(tt){i.disabled||(ye(),xe(tt))},xe=function(tt){i.disabled||(O.current=!0,U(tt),!h&&Te.addClass(v.current,"p-colorpicker-dragging"),tt.preventDefault())},Se=function(tt){O.current&&(U(tt),tt.preventDefault()),_.current&&(re(tt),tt.preventDefault())},be=function(){O.current=!1,_.current=!1,!h&&Te.removeClass(v.current,"p-colorpicker-dragging"),ne()},ye=function(){de(),ie()},ne=function(){me(),Y()},U=function(tt){var dt=x.current.getBoundingClientRect(),jt=dt.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),Cn=dt.left+document.body.scrollLeft,Nn=Math.floor(100*Math.max(0,Math.min(150,(tt.pageX||tt.changedTouches[0].pageX)-Cn))/150),Gn=Math.floor(100*(150-Math.max(0,Math.min(150,(tt.pageY||tt.changedTouches[0].pageY)-jt)))/150);C.current=pt({h:C.current.h,s:Nn,b:Gn}),ge(),Me(),Z()},Z=function(){switch(i.format){case"hex":_e(ct(C.current));break;case"rgb":_e(st(C.current));break;case"hsb":_e(C.current);break}},K=function(tt){var dt;if(tt)switch(i.format){case"hex":dt=ut(tt);break;case"rgb":dt=Dt(tt);break;case"hsb":dt=tt;break}else dt=ut(i.defaultColor);return dt},he=function(tt){C.current=K(tt)},_e=function(tt){i.onChange&&i.onChange({value:tt,stopPropagation:function(){},preventDefault:function(){},target:{name:i.name,id:i.id,value:tt}})},Ce=function(){if(x.current){var tt=pt({h:C.current.h,s:100,b:100});x.current.style.backgroundColor="#"+ct(tt)}},ge=function(){S.current&&(S.current.style.left=Math.floor(150*C.current.s/100)+"px",S.current.style.top=Math.floor(150*(100-C.current.b)/100)+"px")},Oe=function(){E.current&&(E.current.style.top=Math.floor(150-150*C.current.h/360)+"px")},Me=function(){w.current&&(w.current.style.backgroundColor="#"+ct(C.current))},ce=function(){c(!0)},B=function(){c(!1)},ee=function(){var tt=i.inline?void 0:{position:"absolute",top:"0",left:"0"};Ci.set("overlay",A.current,r&&r.autoZIndex||Un.autoZIndex,r&&r.zIndex.overlay||Un.zIndex.overlay),Te.addStyles(A.current,tt),Tt()},te=function(){L(),i.onShow&&i.onShow()},ue=function(){z()},fe=function(){Ci.clear(A.current),i.onHide&&i.onHide()},Ie=function(){De()},De=function(){l?B():ce()},Ye=function(tt){switch(tt.which){case 32:De(),tt.preventDefault();break;case 27:case 9:B();break}},pt=function(tt){return{h:Math.min(360,Math.max(0,tt.h)),s:Math.min(100,Math.max(0,tt.s)),b:Math.min(100,Math.max(0,tt.b))}},Bt=function(tt){var dt=parseInt(tt.indexOf("#")>-1?tt.substring(1):tt,16);return{r:dt>>16,g:(dt&65280)>>8,b:dt&255}},ut=function(tt){return Dt(Bt(tt))},Dt=function(tt){var dt={h:0,s:0,b:0},jt=Math.min(tt.r,tt.g,tt.b),Cn=Math.max(tt.r,tt.g,tt.b),Nn=Cn-jt;return dt.b=Cn,dt.s=Cn!==0?255*Nn/Cn:0,dt.s!==0?tt.r===Cn?dt.h=(tt.g-tt.b)/Nn:tt.g===Cn?dt.h=2+(tt.b-tt.r)/Nn:dt.h=4+(tt.r-tt.g)/Nn:dt.h=-1,dt.h=dt.h*60,dt.h<0&&(dt.h=dt.h+360),dt.s=dt.s*(100/255),dt.b=dt.b*(100/255),dt},st=function(tt){var dt={r:null,g:null,b:null},jt=Math.round(tt.h),Cn=Math.round(tt.s*255/100),Nn=Math.round(tt.b*255/100);if(Cn===0)dt={r:Nn,g:Nn,b:Nn};else{var Gn=Nn,cr=(255-Cn)*Nn/255,Zn=(Gn-cr)*(jt%60)/60;jt===360&&(jt=0),jt<60?(dt.r=Gn,dt.b=cr,dt.g=cr+Zn):jt<120?(dt.g=Gn,dt.b=cr,dt.r=Gn-Zn):jt<180?(dt.g=Gn,dt.r=cr,dt.b=cr+Zn):jt<240?(dt.b=Gn,dt.r=cr,dt.g=Gn-Zn):jt<300?(dt.b=Gn,dt.g=cr,dt.r=cr+Zn):jt<360?(dt.r=Gn,dt.g=cr,dt.b=Gn-Zn):(dt.r=0,dt.g=0,dt.b=0)}return{r:Math.round(dt.r),g:Math.round(dt.g),b:Math.round(dt.b)}},St=function(tt){var dt=[tt.r.toString(16),tt.g.toString(16),tt.b.toString(16)];for(var jt in dt)dt[jt].length===1&&(dt[jt]="0"+dt[jt]);return dt.join("")},ct=function(tt){return St(st(tt))},Ke=function(){Oe(),ge(),Me(),Ce()},Tt=function(){w.current&&Te.alignOverlay(A.current,w.current.parentElement,i.appendTo||r&&r.appendTo||Un.appendTo)};y.useImperativeHandle(e,function(){return{props:i,show:ce,hide:B,focus:function(){return Te.focus(w.current)},getElement:function(){return v.current},getOverlay:function(){return A.current},getInput:function(){return w.current}}}),y.useEffect(function(){Fe.combinedRefs(w,i.inputRef)},[w,i.inputRef]),Mi(function(){he(i.value),Ke(),i.autoFocus&&Te.focus(w.current,i.autoFocus),Tt()}),dr(function(){!O.current&&!_.current&&he(i.value)},[i.value]),dr(function(){Ke()}),za(function(){Ci.clear(A.current)});var Gt=function(){var tt=n({ref:x,className:f("selector"),onMouseDown:function(Nn){return ve(Nn)},onTouchStart:function(Nn){return xe(Nn)},onTouchMove:function(Nn){return Se(Nn)},onTouchEnd:be},d("selector")),dt=n({className:f("color")},d("color")),jt=n({ref:S,className:f("colorHandle")},d("colorHandle"));return y.createElement("div",tt,y.createElement("div",dt,y.createElement("div",jt)))},bn=function(){var tt=n({className:f("hue"),onMouseDown:function(Cn){return se(Cn)},onTouchStart:function(Cn){return Q(Cn)},onTouchMove:function(Cn){return Se(Cn)},onTouchEnd:be},d("hue")),dt=n({className:f("hueHandle")},d("hueHandle"));return y.createElement("div",H0({ref:T},tt),y.createElement("div",H0({ref:E},dt)))},yn=function(){var tt=Gt(),dt=bn(),jt=n({className:f("content")},d("content"));return y.createElement("div",jt,tt,dt)},An=function(){if(!i.inline){var tt=kp.getOtherProps(i),dt=n(Gee({ref:w,type:"text",readOnly:!0,className:f("input"),style:i.inputStyle,id:i.inputId,tabIndex:i.tabIndex,disabled:i.disabled,onClick:Ie,onKeyDown:Ye},tt),d("input"));return y.createElement("input",dt)}return null},$n=Fe.isNotEmpty(i.tooltip),Rn=yn(),Bn=An(),mn=n({id:i.id,ref:v,style:i.style,className:mt(i.className,f("root"))},kp.getOtherProps(i),d("root"));return y.createElement(y.Fragment,null,y.createElement("div",mn,Bn,y.createElement(oD,{hostName:"ColorPicker",ref:A,appendTo:i.appendTo,inline:i.inline,disabled:i.disabled,panelStyle:i.panelStyle,panelClassName:i.panelClassName,onClick:pe,in:i.inline||l,onEnter:ee,onEntered:te,onExit:ue,onExited:fe,transitionOptions:i.transitionOptions,ptm:d,cx:f},Rn)),$n&&y.createElement(tn,H0({target:v,content:i.tooltip,pt:d("tooltip")},i.tooltipOptions)))}));Wd.displayName="ColorPicker";function Pp(){return Pp=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},Pp.apply(this,arguments)}function Mp(t){"@babel/helpers - typeof";return Mp=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},Mp(t)}function Wee(t,e){if(Mp(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Mp(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Qee(t){var e=Wee(t,"string");return Mp(e)==="symbol"?e:String(e)}function Jee(t,e,n){return e=Qee(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Zee(t){if(Array.isArray(t))return t}function ete(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 cD(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 tte(t,e){if(t){if(typeof t=="string")return cD(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 cD(t,e)}}function nte(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1924
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rte(t,e){return Zee(t)||ete(t,e)||tte(t,e)||nte()}var ite={box:"p-checkbox-box",input:"p-checkbox-input",icon:"p-checkbox-icon",root:function(e){var n=e.props,r=e.checked,i=e.context;return mt("p-checkbox p-component",{"p-highlight":r,"p-disabled":n.disabled,"p-invalid":n.invalid,"p-variant-filled":n.variant?n.variant==="filled":i&&i.inputStyle==="filled"})}},c3=Mn.extend({defaultProps:{__TYPE:"Checkbox",autoFocus:!1,checked:!1,className:null,disabled:!1,falseValue:!1,icon:null,id:null,inputId:null,inputRef:null,invalid:!1,variant:null,name:null,onChange:null,onContextMenu:null,onMouseDown:null,readOnly:!1,required:!1,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,trueValue:!0,value:null,children:void 0},css:{classes:ite}});function uD(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 dD(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?uD(Object(n),!0).forEach(function(r){Jee(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):uD(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var kr=y.memo(y.forwardRef(function(t,e){var n=jn(),r=y.useContext(rr),i=c3.getProps(t,r),a=y.useState(!1),s=rte(a,2),l=s[0],c=s[1],u=c3.setMetaData({props:i,state:{focused:l},context:{checked:i.checked===i.trueValue,disabled:i.disabled}}),d=u.ptm,f=u.cx,h=u.isUnstyled;mi(c3.css.styles,h,{name:"checkbox"});var m=y.useRef(null),g=y.useRef(i.inputRef),v=function(){return i.checked===i.trueValue},A=function(V){if(!(i.disabled||i.readonly)&&i.onChange){var L,z=v(),N=z?i.falseValue:i.trueValue,$={originalEvent:V,value:i.value,checked:N,stopPropagation:function(){V==null||V.stopPropagation()},preventDefault:function(){V==null||V.preventDefault()},target:{type:"checkbox",name:i.name,id:i.id,value:i.value,checked:N}};if(i==null||(L=i.onChange)===null||L===void 0||L.call(i,$),V.defaultPrevented)return;Te.focus(g.current)}},w=function(){var V;c(!0),i==null||(V=i.onFocus)===null||V===void 0||V.call(i)},x=function(){var V;c(!1),i==null||(V=i.onBlur)===null||V===void 0||V.call(i)};y.useImperativeHandle(e,function(){return{props:i,focus:function(){return Te.focus(g.current)},getElement:function(){return m.current},getInput:function(){return g.current}}}),y.useEffect(function(){Fe.combinedRefs(g,i.inputRef)},[g,i.inputRef]),dr(function(){g.current.checked=v()},[i.checked,i.trueValue]),Mi(function(){i.autoFocus&&Te.focus(g.current,i.autoFocus)});var S=v(),E=Fe.isNotEmpty(i.tooltip),T=c3.getOtherProps(i),_=n({id:i.id,className:mt(i.className,f("root",{checked:S,context:r})),style:i.style,"data-p-highlight":S,"data-p-disabled":i.disabled,onContextMenu:i.onContextMenu,onMouseDown:i.onMouseDown},T,d("root")),C=function(){var V=Fe.reduceKeys(T,Te.ARIA_PROPS),L=n(dD({id:i.inputId,type:"checkbox",className:f("input"),name:i.name,tabIndex:i.tabIndex,onFocus:function(N){return w()},onBlur:function(N){return x()},onChange:function(N){return A(N)},disabled:i.disabled,readOnly:i.readOnly,required:i.required,"aria-invalid":i.invalid,checked:S},V),d("input"));return y.createElement("input",Pp({ref:g},L))},O=function(){var V=n({className:f("icon")},d("icon")),L=n({className:f("box",{checked:S}),"data-p-highlight":S,"data-p-disabled":i.disabled},d("box")),z=S?i.icon||y.createElement(yc,V):null,N=Qn.getJSXIcon(z,dD({},V),{props:i,checked:S});return y.createElement("div",L,N)};return y.createElement(y.Fragment,null,y.createElement("div",Pp({ref:m},_),C(),O()),E&&y.createElement(tn,Pp({target:m,content:i.tooltip,pt:d("tooltip")},i.tooltipOptions)))}));kr.displayName="Checkbox";const ate=t=>{var c,u,d,f;const{onHandleChange:e,tabState:n,onHandleChangePageMargin:r}=t,[,i]=k.useState("");k.useEffect(()=>{},[]);const a=()=>{},s=[{icon:"pi pi-image",value:"image"},{icon:"pi pi-palette ",value:"color"},{icon:"pi pi-microsoft ",value:"gradient"}],l=h=>o.jsx("i",{className:h.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(Na,{value:(c=n==null?void 0:n.margin)==null?void 0:c.left,onChange:h=>{r("left",h.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(Na,{value:(u=n==null?void 0:n.margin)==null?void 0:u.right,onChange:h=>{r("right",h.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(Na,{value:(d=n==null?void 0:n.margin)==null?void 0:d.top,onChange:h=>{r("top",h.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(Na,{value:(f=n==null?void 0:n.margin)==null?void 0:f.bottom,onChange:h=>{r("bottom",h.value)},mode:"decimal",showButtons:!0,min:0,max:100})]})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(kr,{inputId:"binary",checked:n==null?void 0:n.isCoverPage,onChange:h=>e("isCoverPage",h.checked?"true":"false")}),o.jsx("label",{htmlFor:"binary",children:"Enable Cover Page"})]}),o.jsx("label",{children:"Background Type"}),o.jsx(j0,{value:n==null?void 0:n.bgType,options:s,onChange:h=>e("bgType",h.value),itemTemplate:l,optionLabel:"value"})]}),(n==null?void 0:n.bgType)==="color"&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"p-fluid field",children:o.jsx(Wd,{value:(n==null?void 0:n.bgColor)||"",onChange:h=>e("bgColor",h.value)})}),o.jsx(Wd,{value:(n==null?void 0:n.bgColor)||"",onChange:h=>e("bgColor",h.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(pn,{value:(n==null?void 0:n.bgImage)||"",onChange:h=>e("bgImage",h.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(pn,{placeholder:"Keyword",onChange:h=>i(h.target.value)}),o.jsx(Mt,{text:!0,icon:"pi pi-search",className:"p-button-info",onClick:()=>a()})]})}),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"})]})]})]})]})},un=()=>{const{isPreview:t,isAdmin:e,isRenderView:n,renderType:r,isAdvanceView:i,media:a,globalAlignment:s,reusableComponent:l}=nD();if(t===void 0)throw new Error("Must be wrapped in builder provider");const c=r==null?void 0:r.key,{saveComponent:u,componentList:d}=l;return{isPreview:t,isAdmin:e,isRenderView:n,renderType:c,isAdvanceView:i,globalAlignment:s,media:a,saveComponent:u,componentList:d,emitSocketData:()=>{},updateGlobalToast:m=>{console.log(m)}}},z0=t=>{var A;const{visibilty:e,setVisibility:n,pageIndex:r,page:i}=t,{emitSocketData:a,updateGlobalToast:s}=un(),[l,c]=k.useState(i),{formBuilderSchemaLanguages:u,pageSettingUpdate:d,formBuilderPublishedStatus:f}=ln(),h=()=>{const w={...l,children:i==null?void 0:i.children};d(r,w),a(),s({showToast:!0,toastMessage:"Updated",toastDetail:"Page Updated",toastType:"success"})},m=(w,x,S)=>{c(E=>Object.assign({},E,{[w]:Object.assign({},E[w],{[x==null?void 0:x.type]:S})}))},g=(w,x)=>{let S=l;S={...S,margin:{...S.margin,[w]:x}},c(S)},v=(w,x)=>{c(S=>({...S,[w]:x}))};return o.jsx(o.Fragment,{children:o.jsxs(To,{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",{className:"mb-0",children:["Page Settings - ",(A=l==null?void 0:l.title)==null?void 0:A.english," "]})]}),!f&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(Mt,{className:"mt-3",label:"Update",onClick:()=>h(),"aria-label":"Update"})})]}),o.jsxs(Ka,{children:[o.jsx(hr,{header:"Text",children:o.jsx(ro,{activeIndex:0,children:u!=null&&u.length?u.map((w,x)=>o.jsx(no,{tabIndex:x,header:w==null?void 0:w.language,children:o.jsx(NQ,{language:w,tabState:l,onHandleChange:m,...t})},x)):""})}),o.jsx(hr,{header:"Styling",children:o.jsx(ate,{tabState:l,onHandleChange:v,onHandleChangePageMargin:g,...t})})]})]})})},ste="TASKS_LOADING",ote="TASKS_ADD",lte="TASKS_GET_PAGINATED_LIST",cte="TASKS_DELETE",ute="TASKS_PAGNIATION_UPDATE",dte="TASKS_UPDATE",fte="TASKS_SUCCESS_GET",hte="TASK_GET_TEMPLATE",pte="TASK_SET_DATA",gte="TASKS_FORM_SUBMIT",mte="TASKS_FORM_HTTP_REQUEST",F8="TASK_SET_PROGRESS_VALUE",fD="TASK_SET_MAX_PROGRESS_VALUE",hD="TASK_SET_REGISTER_DATA",vte="TASK_SET_SCHEMA",k8="TASK_UPDATE_USER_FORM_SUBMIT_DATA",pD="CLEAR_TASK",gD="TASK_USER_SUBMIT_FORM_REPEATABLE_ADD",mD="TASK_USER_SUBMIT_FORM_REPEATABLE_REMOVE_INDEX",vD="TASK_USER_TRAINING_DATA",bD="TASK_FIELD_UPDATE",bte=6,yD=1;function yte(t,e,n,r,i,a){return s=>{s({type:bD,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,field:a}})}}function AD(t){return(e,n)=>{const r={type:k8,payLoad:{userTaskSubmitFormData:[...t]}};e(r)}}function Ate(t){return(e,n)=>{const{TasksReducer:r}=n(),{taskData:i}=r,a={type:k8,payLoad:{taskData:{...i,...t}}};e(a)}}function wte(t,e){return(n,r)=>{const{TasksReducer:i}=r(),{userTaskSubmitFormData:a}=i,s=_t.findIndex(a,function(c){return c.rowId===t});n({type:mD,payLoad:{userSubmitFormIndex:s,repeatableDataRowIndex:e}})}}function Ste(t,e){return(n,r)=>{const{TasksReducer:i}=r(),{userTaskSubmitFormData:a}=i,s=_t.findIndex(a,function(c){return c.rowId===t});n({type:gD,payLoad:{userSubmitFormIndex:s,repeatableData:e}})}}function xte(){return t=>{t({type:pD,payLoad:null})}}const wD=t=>e=>{e({type:F8,payLoad:{progressValue:t}})},Cte=t=>e=>{e({type:F8,payLoad:t})},Tte=t=>e=>{e({type:vD,payLoad:{userTrainingSaveData:t}})},SD=t=>e=>{e({type:hD,payLoad:{registerData:t}})},Ete=(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(AD(l))},Ite=(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(SD(u));const d=Object.keys(u).length;r(wD(d))},_te=t=>e=>{e({type:fD,payLoad:{progressMaxValue:t}})},P8={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},Dte=(t=P8,e)=>{switch(e.type){case pD:return{...t,...P8,list:[...t.list],page:t.page,per_page:t.per_page,filter:t.filter,sort:t.sort,total_records:t.total_records};case fte:return{...t,...e.payLoad};case k8:return{...t,...e.payLoad};case vte:return{...t,...e.payLoad};case F8:return{...t,...e.payLoad};case hD:return{...t,registerData:e.payLoad.registerData};case fD:return{...t,...e.payLoad};case ste:return{...t,...e.payLoad};case gte:return{...t,...e.payLoad};case mte:return{...t,...e.payLoad};case ote:{const{record:n}=e.payLoad;return{...t,list:[...n,...t.list]}}case lte:return{...t,...e.payLoad};case pte:return{...t,taskData:e.payLoad};case ute:return{...t,...e.payLoad};case cte:{const n=t.list.filter(r=>r.task_id!==e.payLoad.task_id);return{...t,list:[...n]}}case vD:return{...t,...e.payLoad};case bD:{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 gD:{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 mD:{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 dte:{const{row:n,eventIndex:r}=e.payLoad,i=t.list[r];return t.list[r]={...i,...n},t}case hte:return{...t,...e.payLoad}}return t},xD=k.createContext(void 0),Ote=({option:t,taskValue:e,children:n})=>{const[r,i]=k.useReducer(Dte,{...P8,...e});return o.jsx(xD.Provider,{value:{state:r,dispatch:i},children:o.jsx(tD,{option:t,onChange:()=>{},children:n})})},Nte=()=>k.useContext(xD),Lr=()=>{const{state:n,dispatch:r}=Nte();if(n===void 0)throw new Error("Must be wrapped in task render provider");const i=n.task_status,a=n.task_status,s=n.userTaskSubmitFormData,l=n.userTrainingSaveData,c=n.taskSchema,u=n.assessmentData,d=n.progressLoading,f=n.submitting,h=n.httpRequest,m=n.taskData,g=n.progressMaxValue,v=n.maxTabs,A=n.tabNoOfFieldsData,w=n.registerData,x=n.progressValue,S=n.noOfTotalElements,E=n.menuList,T=n.loading,_=n.submitting,C=n.success,O=n.success_message,F=k.useCallback(re=>r(Ate(re)),[r]),V=k.useCallback((re,ve,xe,Se,be,ye)=>{},[r]),L=k.useCallback((re,ve,xe)=>{console.log("formData",re)},[r]),z=k.useCallback((re,ve,xe)=>{console.log("form",re)},[r]),N=k.useCallback(()=>r(xte()),[r]),$=k.useCallback((re,ve)=>r(Ste(re,ve)),[r]),de=k.useCallback((re,ve)=>r(wte(re,ve)),[r]),me=k.useCallback(re=>r(wD(re)),[r]),ae=k.useCallback(re=>r(Cte(re)),[r]),G=k.useCallback(re=>r(SD(re)),[r]),ie=k.useCallback(re=>r(AD(re)),[r]),Y=k.useCallback(re=>r(_te(re)),[r]),pe=k.useCallback(re=>r(Tte(re)),[r]),se=k.useCallback((re,ve,xe)=>r(Ete(re,ve,xe)),[r]),Q=k.useCallback((re,ve,xe)=>r(Ite(re,ve)),[r]),W=k.useCallback((re,ve,xe,Se,be,ye)=>r(yte(re,ve,xe,Se,be,ye)),[r]);return{TASK_PUBLISHED:6,TASK_PENDING:1,taskStatus:a,assessmentData:u,taskSchema:c,taskData:m,TasksList:E,TasksLoading:T,TasksSuccess:C,TasksSuccessMessage:O,taskProgressMaxValue:g,taskRegisterData:w,taskProgressValue:x,taskMaxTabs:v,noOfTotalElements:S,taskTabRequiredFieldsData:A,userTaskSubmitFormData:s,userTrainingSaveData:l,TasksSubmitLoading:_,updateTaskDataSchema:F,submitTaskFormData:L,updateTaskFormData:V,TasksSubmit:f,TasksHTTPRequest:h,updateTaskRegisterData:G,updateTaskProgressValue:me,updateTaskProgressMaxValue:Y,updateUserFormDataSubmit:ie,removeUserDataFormSectionRepeatableData:de,addUserDataFormSectionRepeatableData:$,onSetValuetoRepeatableData:se,onSetValuetoPostDataHook:Q,clearTaskSchema:N,taskProgressLoading:d,task_status:i,updateUserTraining:pe,taskFieldUpdateHook:W,updateProgressDataValuesHook:ae,saveProgressDataHook:z}};var Fte=function(){function t(n){this.subscriber=n}var e=t.prototype;return e.remove=function(){this.subscriber&&(this.subscriber.removeSubscription(this),this.subscriber=null)},t}(),kte=Fte;function Pte(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var Mte=kte,Lte=function(t){Pte(e,t);function e(n,r,i){var a;return a=t.call(this,n)||this,a.listener=r,a.context=i,a}return e}(Mte),CD=Lte,Bte=process.env.NODE_ENV!=="production"?function(t){if(t===void 0)throw new Error("invariant(...): Second argument must be a string.")}:function(t){};function Vte(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(Bte(e),!t){var a;if(e===void 0)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;a=new Error(e.replace(/%s/g,function(){return String(r[s++])})),a.name="Invariant Violation"}throw a.framesToPop=1,a}}var TD=Vte,ED=TD,Ute=function(){function t(){this._subscriptionsForType={},this._currentSubscription=null}var e=t.prototype;return e.addSubscription=function(r,i){i.subscriber!==this&&(process.env.NODE_ENV!=="production"?ED(!1,"The subscriber of the subscription is incorrectly set."):ED(!1)),this._subscriptionsForType[r]||(this._subscriptionsForType[r]=[]);var a=this._subscriptionsForType[r].length;return this._subscriptionsForType[r].push(i),i.eventType=r,i.key=a,i},e.removeAllSubscriptions=function(r){r===void 0?this._subscriptionsForType={}:delete this._subscriptionsForType[r]},e.removeSubscription=function(r){var i=r.eventType,a=r.key,s=this._subscriptionsForType[i];s&&delete s[a]},e.getSubscriptionsForType=function(r){return this._subscriptionsForType[r]},t}(),qte=Ute;function u3(t){return function(){return t}}var Y0=function(){};Y0.thatReturns=u3,Y0.thatReturnsFalse=u3(!1),Y0.thatReturnsTrue=u3(!0),Y0.thatReturnsNull=u3(null),Y0.thatReturnsThis=function(){return this},Y0.thatReturnsArgument=function(t){return t};var jte=Y0,$te=CD,Hte=qte,ID=TD,zte=jte,Yte=function(){function t(){this._subscriber=new Hte,this._currentSubscription=null}var e=t.prototype;return e.addListener=function(r,i,a){return this._subscriber.addSubscription(r,new $te(this._subscriber,i,a))},e.once=function(r,i,a){var s=this;return this.addListener(r,function(){s.removeCurrentListener(),i.apply(a,arguments)})},e.removeAllListeners=function(r){this._subscriber.removeAllSubscriptions(r)},e.removeCurrentListener=function(){this._currentSubscription||(process.env.NODE_ENV!=="production"?ID(!1,"Not in an emitting cycle; there is no current subscription"):ID(!1)),this._subscriber.removeSubscription(this._currentSubscription)},e.listeners=function(r){var i=this._subscriber.getSubscriptionsForType(r);return i?i.filter(zte.thatReturnsTrue).map(function(a){return a.listener}):[]},e.emit=function(r){var i=this._subscriber.getSubscriptionsForType(r);if(i){for(var a=Object.keys(i),s=0;s<a.length;s++){var l=a[s],c=i[l];c&&(this._currentSubscription=c,this.__emitToSubscription.apply(this,[c].concat(Array.prototype.slice.call(arguments))))}this._currentSubscription=null}},e.__emitToSubscription=function(r,i){var a=Array.prototype.slice.call(arguments,2);r.listener.apply(r.context,a)},t}(),Kte=Yte,Xte={EventEmitter:Kte,EmitterSubscription:CD},Rte=Xte;const Xt=new Rte.EventEmitter,M8=t=>{var T,_,C;const{options:e,pageIndex:n,page:r,setTabSidebarSetting:i,setPageActiveIndex:a,pages:s}=t,{taskRegisterData:l,updateUserFormDataSubmit:c,userTaskSubmitFormData:u,updateProgressDataValuesHook:d,taskStatus:f,TASK_PENDING:h}=Lr(),{formBuilderFormLayout:m,userSelectedLanguage:g,addTabs:v,clonePage:A,removePage:w}=ln(),{emitSocketData:x,isPreview:S}=un(),E=(O,F,V)=>{var z,N,$;const L=u;if(L!=null&&L.length){const de=l;for(const[ae,G]of F.children.entries())for(const[ie,Y]of G.children.entries())if(Y!=null&&Y.rowIsRepeatable){const pe=_t.findIndex(L,function(se){return se.rowId===Y.uuid});O?pe===-1&&(L.push({postData:[],tabId:F.uuid,rowId:Y==null?void 0:Y.uuid,tabIndex:V,sectionId:G.uuid,minimumEntries:G==null?void 0:G.minimumEntries,sectionIndex:ae,sectionHeading:G.heading,subHeadingText:G.subHeadingText,repeatableFields:{},repeatableFieldsData:[],language:"english",isHiddenSection:G.isHidden&&G.isHidden===1?1:0}),de[Y==null?void 0:Y.uuid]&&delete de[Y==null?void 0:Y.uuid]):L.splice(pe,1)}else for(const[pe,se]of Y.children.entries())for(const[Q,W]of se.children.entries())if(!(Y!=null&&Y.rowIsRepeatable)&&(W==null?void 0:W.isPostField)===!0)if(((z=W.children)==null?void 0:z.length)>0)for(const[,re]of W.children.entries()){const ve=Object.keys(re);if(ve[0]){const xe=re[ve[0]],Se=_t.findIndex(L,function(be){return be.fieldId===re.uuid});O?Se===-1&&(L.push({postData:[],logs:[],isSeen:!1,seenTime:null,tabId:F.uuid,tabIndex:V,componentType:W==null?void 0:W.componentType,sectionId:G.uuid,sectionIndex:ae,sectionHeading:G.heading,subHeadingText:G.subHeadingText,rowId:Y.uuid,rowIndex:ie,columnId:G.uuid,columnIndex:pe,fieldIndex:Q,fieldId:xe.uuid,fieldInputType:xe.componentType,fieldTitle:(N=xe.label)==null?void 0:N.english,fieldDescription:xe.description||null,fieldHelperText:xe.helperText||null,fieldHeaderText:xe.headerText||null,fieldFooterText:xe.footerText||null,fieldTitleAbb:xe.abbreviationLabel||xe.label,question_abb_table:xe.textForTable||null,language:"english",isHiddenfield:xe.isHidden&&xe.isHidden===1?1:0,isHiddenSection:G.isHidden&&G.isHidden===1?1:0}),de[re==null?void 0:re.uuid]&&delete de[re==null?void 0:re.uuid]):(de[re==null?void 0:re.uuid]&&delete de[re==null?void 0:re.uuid],Se>=0&&L.splice(Se,1))}}else{const re=_t.findIndex(L,function(ve){return ve.fieldId===W.uuid});O?re===-1&&(L.push({postData:[],tabId:F.uuid,tabIndex:V,componentType:W==null?void 0:W.componentType,...W.inlineConditionalRules?{inlineConditionalRules:W.inlineConditionalRules}:{},...W.conditionalTabRules?{conditionalTabRules:W.conditionalTabRules}:{},...W.conditionalSectionRules?{conditionalSectionRules:W.conditionalSectionRules}:{},sectionId:G.uuid,sectionIndex:ae,sectionHeading:G.heading,subHeadingText:G.subHeadingText,reviewerChecklist:W==null?void 0:W.reviewerChecklist,rowId:Y.uuid,rowIndex:ie,columnId:G.uuid,columnIndex:pe,fieldIndex:Q,fieldId:W.uuid,fieldInputType:W.componentType,fieldTitle:($=W.label)==null?void 0:$.english,fieldDescription:W.description||null,fieldHelperText:W.helperText||null,fieldHeaderText:W.headerText||null,fieldFooterText:W.footerText||null,fieldTitleAbb:W.abbreviationLabel||W.label,question_abb_table:W.textForTable||null,language:"english",isHiddenfield:W.isHidden&&W.isHidden===1?1:0,isHiddenSection:G.isHidden&&G.isHidden===1?1:0}),de[W==null?void 0:W.uuid]&&delete de[W==null?void 0:W.uuid]):(de[W==null?void 0:W.uuid]&&delete de[W==null?void 0:W.uuid],re>=0&&f===h&&L.splice(re,1))}const me=Object.keys(de).length;d({progressMaxValue:L==null?void 0:L.length,progressValue:me}),c(L)}};return k.useEffect(()=>{const O=Xt.addListener("updatePageRender",()=>{E(!(r!=null&&r.isHidden),r,n)});return()=>{O.remove()}}),k.useEffect(()=>(E(!(r!=null&&r.isHidden),r,n),()=>{}),[]),o.jsxs("div",{className:`${e.className} page-panel`,onClick:e.onClick,children:[o.jsx(tn,{target:".clone-tool"}),o.jsx(tn,{target:".del-tool"}),o.jsx(tn,{target:".setting-tool"}),o.jsx(tn,{target:".addpage-tool"}),S===!1&&o.jsxs("span",{className:"page-pannel-icons",children:[o.jsx("i",{className:"pi pi-plus mr-1 p-text-secondary addpage-tool ",onClick:()=>{v(s==null?void 0:s.length),x()},"data-pr-tooltip":"Add Page"}),o.jsx("i",{className:"pi pi-cog mr-1 p-text-secondary setting-tool ",onClick:()=>i(!0),"data-pr-tooltip":"Settings"})," ",o.jsx("i",{className:"pi pi-clone mr-1 p-text-secondary clone-tool ",onClick:()=>{A(r,n),x()},"data-pr-tooltip":"Clone"})," ",(m==null?void 0:m.length)>1&&o.jsx("i",{className:"pi pi-trash mr-1 p-text-danger del-tool",onClick:()=>{w(n),setTimeout(()=>{a(s.length-2)},100),x()},"data-pr-tooltip":"Delete"})]})," ",o.jsx(o.Fragment,{children:((T=r==null?void 0:r.title)==null?void 0:T[g==null?void 0:g.type])===null||((_=r==null?void 0:r.title)==null?void 0:_[g==null?void 0:g.type])===void 0?o.jsxs("span",{style:{width:"100px"},children:["Tab ",n+1]}):(C=r==null?void 0:r.title)==null?void 0:C[g==null?void 0:g.type]})]},`pannel-${n}`)};function L8(){return L8=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},L8.apply(this,arguments)}var _D=y.memo(y.forwardRef(function(t,e){var n=ti.getPTI(t);return y.createElement("svg",L8({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 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z",fill:"currentColor"}))}));_D.displayName="WindowMaximizeIcon";function B8(){return B8=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},B8.apply(this,arguments)}var DD=y.memo(y.forwardRef(function(t,e){var n=ti.getPTI(t);return y.createElement("svg",B8({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:"M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z",fill:"currentColor"}))}));DD.displayName="WindowMinimizeIcon";function V8(){return V8=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},V8.apply(this,arguments)}function Lp(t){"@babel/helpers - typeof";return Lp=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},Lp(t)}function U8(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 Gte(t){if(Array.isArray(t))return U8(t)}function Wte(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function OD(t,e){if(t){if(typeof t=="string")return U8(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 U8(t,e)}}function Qte(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1924
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rte(t,e){return Zee(t)||ete(t,e)||tte(t,e)||nte()}var ite={box:"p-checkbox-box",input:"p-checkbox-input",icon:"p-checkbox-icon",root:function(e){var n=e.props,r=e.checked,i=e.context;return mt("p-checkbox p-component",{"p-highlight":r,"p-disabled":n.disabled,"p-invalid":n.invalid,"p-variant-filled":n.variant?n.variant==="filled":i&&i.inputStyle==="filled"})}},c3=Mn.extend({defaultProps:{__TYPE:"Checkbox",autoFocus:!1,checked:!1,className:null,disabled:!1,falseValue:!1,icon:null,id:null,inputId:null,inputRef:null,invalid:!1,variant:null,name:null,onChange:null,onContextMenu:null,onMouseDown:null,readOnly:!1,required:!1,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,trueValue:!0,value:null,children:void 0},css:{classes:ite}});function uD(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 dD(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?uD(Object(n),!0).forEach(function(r){Jee(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):uD(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var kr=y.memo(y.forwardRef(function(t,e){var n=jn(),r=y.useContext(rr),i=c3.getProps(t,r),a=y.useState(!1),s=rte(a,2),l=s[0],c=s[1],u=c3.setMetaData({props:i,state:{focused:l},context:{checked:i.checked===i.trueValue,disabled:i.disabled}}),d=u.ptm,f=u.cx,h=u.isUnstyled;mi(c3.css.styles,h,{name:"checkbox"});var m=y.useRef(null),g=y.useRef(i.inputRef),v=function(){return i.checked===i.trueValue},A=function(V){if(!(i.disabled||i.readonly)&&i.onChange){var L,z=v(),N=z?i.falseValue:i.trueValue,$={originalEvent:V,value:i.value,checked:N,stopPropagation:function(){V==null||V.stopPropagation()},preventDefault:function(){V==null||V.preventDefault()},target:{type:"checkbox",name:i.name,id:i.id,value:i.value,checked:N}};if(i==null||(L=i.onChange)===null||L===void 0||L.call(i,$),V.defaultPrevented)return;Te.focus(g.current)}},w=function(){var V;c(!0),i==null||(V=i.onFocus)===null||V===void 0||V.call(i)},x=function(){var V;c(!1),i==null||(V=i.onBlur)===null||V===void 0||V.call(i)};y.useImperativeHandle(e,function(){return{props:i,focus:function(){return Te.focus(g.current)},getElement:function(){return m.current},getInput:function(){return g.current}}}),y.useEffect(function(){Fe.combinedRefs(g,i.inputRef)},[g,i.inputRef]),dr(function(){g.current.checked=v()},[i.checked,i.trueValue]),Mi(function(){i.autoFocus&&Te.focus(g.current,i.autoFocus)});var S=v(),E=Fe.isNotEmpty(i.tooltip),T=c3.getOtherProps(i),_=n({id:i.id,className:mt(i.className,f("root",{checked:S,context:r})),style:i.style,"data-p-highlight":S,"data-p-disabled":i.disabled,onContextMenu:i.onContextMenu,onMouseDown:i.onMouseDown},T,d("root")),C=function(){var V=Fe.reduceKeys(T,Te.ARIA_PROPS),L=n(dD({id:i.inputId,type:"checkbox",className:f("input"),name:i.name,tabIndex:i.tabIndex,onFocus:function(N){return w()},onBlur:function(N){return x()},onChange:function(N){return A(N)},disabled:i.disabled,readOnly:i.readOnly,required:i.required,"aria-invalid":i.invalid,checked:S},V),d("input"));return y.createElement("input",Pp({ref:g},L))},O=function(){var V=n({className:f("icon")},d("icon")),L=n({className:f("box",{checked:S}),"data-p-highlight":S,"data-p-disabled":i.disabled},d("box")),z=S?i.icon||y.createElement(yc,V):null,N=Qn.getJSXIcon(z,dD({},V),{props:i,checked:S});return y.createElement("div",L,N)};return y.createElement(y.Fragment,null,y.createElement("div",Pp({ref:m},_),C(),O()),E&&y.createElement(tn,Pp({target:m,content:i.tooltip,pt:d("tooltip")},i.tooltipOptions)))}));kr.displayName="Checkbox";const ate=t=>{var c,u,d,f;const{onHandleChange:e,tabState:n,onHandleChangePageMargin:r}=t,[,i]=k.useState("");k.useEffect(()=>{},[]);const a=()=>{},s=[{icon:"pi pi-image",value:"image"},{icon:"pi pi-palette ",value:"color"},{icon:"pi pi-microsoft ",value:"gradient"}],l=h=>o.jsx("i",{className:h.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(Na,{value:(c=n==null?void 0:n.margin)==null?void 0:c.left,onChange:h=>{r("left",h.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(Na,{value:(u=n==null?void 0:n.margin)==null?void 0:u.right,onChange:h=>{r("right",h.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(Na,{value:(d=n==null?void 0:n.margin)==null?void 0:d.top,onChange:h=>{r("top",h.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(Na,{value:(f=n==null?void 0:n.margin)==null?void 0:f.bottom,onChange:h=>{r("bottom",h.value)},mode:"decimal",showButtons:!0,min:0,max:100})]})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(kr,{inputId:"binary",checked:n==null?void 0:n.isCoverPage,onChange:h=>e("isCoverPage",h.checked?"true":"false")}),o.jsx("label",{htmlFor:"binary",children:"Enable Cover Page"})]}),o.jsx("label",{children:"Background Type"}),o.jsx(j0,{value:n==null?void 0:n.bgType,options:s,onChange:h=>e("bgType",h.value),itemTemplate:l,optionLabel:"value"})]}),(n==null?void 0:n.bgType)==="color"&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"p-fluid field",children:o.jsx(Wd,{value:(n==null?void 0:n.bgColor)||"",onChange:h=>e("bgColor",h.value)})}),o.jsx(Wd,{value:(n==null?void 0:n.bgColor)||"",onChange:h=>e("bgColor",h.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(pn,{value:(n==null?void 0:n.bgImage)||"",onChange:h=>e("bgImage",h.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(pn,{placeholder:"Keyword",onChange:h=>i(h.target.value)}),o.jsx(Mt,{text:!0,icon:"pi pi-search",className:"p-button-info",onClick:()=>a()})]})}),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"})]})]})]})]})},un=()=>{const{isPreview:t,isAdmin:e,isRenderView:n,renderType:r,isAdvanceView:i,media:a,globalAlignment:s,reusableComponent:l}=nD();if(t===void 0)throw new Error("Must be wrapped in builder provider");const c=r==null?void 0:r.key,{saveComponent:u,componentList:d}=l;return{isPreview:t,isAdmin:e,isRenderView:n,renderType:c,isAdvanceView:i,globalAlignment:s,media:a,saveComponent:u,componentList:d,emitSocketData:()=>{},updateGlobalToast:m=>{console.log(m)}}},z0=t=>{var A;const{visibilty:e,setVisibility:n,pageIndex:r,page:i}=t,{emitSocketData:a,updateGlobalToast:s}=un(),[l,c]=k.useState(i),{formBuilderSchemaLanguages:u,pageSettingUpdate:d,formBuilderPublishedStatus:f}=ln(),h=()=>{const w={...l,children:i==null?void 0:i.children};d(r,w),a(),s({showToast:!0,toastMessage:"Updated",toastDetail:"Page Updated",toastType:"success"})},m=(w,x,S)=>{c(E=>Object.assign({},E,{[w]:Object.assign({},E[w],{[x==null?void 0:x.type]:S})}))},g=(w,x)=>{let S=l;S={...S,margin:{...S.margin,[w]:x}},c(S)},v=(w,x)=>{c(S=>({...S,[w]:x}))};return o.jsx(o.Fragment,{children:o.jsxs(To,{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",{className:"mb-0",children:["Page Settings - ",(A=l==null?void 0:l.title)==null?void 0:A.english," "]})]}),!f&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(Mt,{className:"mt-3",label:"Update",onClick:()=>h(),"aria-label":"Update"})})]}),o.jsxs(Ka,{children:[o.jsx(hr,{header:"Text",children:o.jsx(ro,{activeIndex:0,children:u!=null&&u.length?u.map((w,x)=>o.jsx(no,{tabIndex:x,header:w==null?void 0:w.language,children:o.jsx(NQ,{language:w,tabState:l,onHandleChange:m,...t})},x)):""})}),o.jsx(hr,{header:"Styling",children:o.jsx(ate,{tabState:l,onHandleChange:v,onHandleChangePageMargin:g,...t})})]})]})})},ste="TASKS_LOADING",ote="TASKS_ADD",lte="TASKS_GET_PAGINATED_LIST",cte="TASKS_DELETE",ute="TASKS_PAGNIATION_UPDATE",dte="TASKS_UPDATE",fte="TASKS_SUCCESS_GET",hte="TASK_GET_TEMPLATE",pte="TASK_SET_DATA",gte="TASKS_FORM_SUBMIT",mte="TASKS_FORM_HTTP_REQUEST",F8="TASK_SET_PROGRESS_VALUE",fD="TASK_SET_MAX_PROGRESS_VALUE",hD="TASK_SET_REGISTER_DATA",vte="TASK_SET_SCHEMA",k8="TASK_UPDATE_USER_FORM_SUBMIT_DATA",pD="CLEAR_TASK",gD="TASK_USER_SUBMIT_FORM_REPEATABLE_ADD",mD="TASK_USER_SUBMIT_FORM_REPEATABLE_REMOVE_INDEX",vD="TASK_USER_TRAINING_DATA",bD="TASK_FIELD_UPDATE",bte=6,yD=1;function yte(t,e,n,r,i,a){return s=>{s({type:bD,payLoad:{pageIndex:t,sectionIndex:e,rowIndex:n,columnIndex:r,fieldIndex:i,field:a}})}}function AD(t){return(e,n)=>{const r={type:k8,payLoad:{userTaskSubmitFormData:[...t]}};e(r)}}function Ate(t){return(e,n)=>{const{TasksReducer:r}=n(),{taskData:i}=r,a={type:k8,payLoad:{taskData:{...i,...t}}};e(a)}}function wte(t,e){return(n,r)=>{const{TasksReducer:i}=r(),{userTaskSubmitFormData:a}=i,s=_t.findIndex(a,function(c){return c.rowId===t});n({type:mD,payLoad:{userSubmitFormIndex:s,repeatableDataRowIndex:e}})}}function Ste(t,e){return(n,r)=>{const{TasksReducer:i}=r(),{userTaskSubmitFormData:a}=i,s=_t.findIndex(a,function(c){return c.rowId===t});n({type:gD,payLoad:{userSubmitFormIndex:s,repeatableData:e}})}}function xte(){return t=>{t({type:pD,payLoad:null})}}const wD=t=>e=>{e({type:F8,payLoad:{progressValue:t}})},Cte=t=>e=>{e({type:F8,payLoad:t})},Tte=t=>e=>{e({type:vD,payLoad:{userTrainingSaveData:t}})},SD=t=>e=>{e({type:hD,payLoad:{registerData:t}})},Ete=(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(AD(l))},Ite=(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(SD(u));const d=Object.keys(u).length;r(wD(d))},_te=t=>e=>{e({type:fD,payLoad:{progressMaxValue:t}})},P8={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},Dte=(t=P8,e)=>{switch(e.type){case pD:return{...t,...P8,list:[...t.list],page:t.page,per_page:t.per_page,filter:t.filter,sort:t.sort,total_records:t.total_records};case fte:return{...t,...e.payLoad};case k8:return{...t,...e.payLoad};case vte:return{...t,...e.payLoad};case F8:return{...t,...e.payLoad};case hD:return{...t,registerData:e.payLoad.registerData};case fD:return{...t,...e.payLoad};case ste:return{...t,...e.payLoad};case gte:return{...t,...e.payLoad};case mte:return{...t,...e.payLoad};case ote:{const{record:n}=e.payLoad;return{...t,list:[...n,...t.list]}}case lte:return{...t,...e.payLoad};case pte:return{...t,taskData:e.payLoad};case ute:return{...t,...e.payLoad};case cte:{const n=t.list.filter(r=>r.task_id!==e.payLoad.task_id);return{...t,list:[...n]}}case vD:return{...t,...e.payLoad};case bD:{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 gD:{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 mD:{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 dte:{const{row:n,eventIndex:r}=e.payLoad,i=t.list[r];return t.list[r]={...i,...n},t}case hte:return{...t,...e.payLoad}}return t},xD=k.createContext(void 0),Ote=({option:t,templateSchema:e,taskValue:n,children:r})=>{const[i,a]=k.useReducer(Dte,{...P8,...n});return o.jsx(xD.Provider,{value:{state:i,dispatch:a},children:o.jsx(tD,{option:t,templateSchema:e,onChange:()=>{},children:r})})},Nte=()=>k.useContext(xD),Lr=()=>{const{state:n,dispatch:r}=Nte();if(n===void 0)throw new Error("Must be wrapped in task render provider");const i=n.task_status,a=n.task_status,s=n.userTaskSubmitFormData,l=n.userTrainingSaveData,c=n.taskSchema,u=n.assessmentData,d=n.progressLoading,f=n.submitting,h=n.httpRequest,m=n.taskData,g=n.progressMaxValue,v=n.maxTabs,A=n.tabNoOfFieldsData,w=n.registerData,x=n.progressValue,S=n.noOfTotalElements,E=n.menuList,T=n.loading,_=n.submitting,C=n.success,O=n.success_message,F=k.useCallback(re=>r(Ate(re)),[r]),V=k.useCallback((re,ve,xe,Se,be,ye)=>{},[r]),L=k.useCallback((re,ve,xe)=>{console.log("formData",re)},[r]),z=k.useCallback((re,ve,xe)=>{console.log("form",re)},[r]),N=k.useCallback(()=>r(xte()),[r]),$=k.useCallback((re,ve)=>r(Ste(re,ve)),[r]),de=k.useCallback((re,ve)=>r(wte(re,ve)),[r]),me=k.useCallback(re=>r(wD(re)),[r]),ae=k.useCallback(re=>r(Cte(re)),[r]),G=k.useCallback(re=>r(SD(re)),[r]),ie=k.useCallback(re=>r(AD(re)),[r]),Y=k.useCallback(re=>r(_te(re)),[r]),pe=k.useCallback(re=>r(Tte(re)),[r]),se=k.useCallback((re,ve,xe)=>r(Ete(re,ve,xe)),[r]),Q=k.useCallback((re,ve,xe)=>r(Ite(re,ve)),[r]),W=k.useCallback((re,ve,xe,Se,be,ye)=>r(yte(re,ve,xe,Se,be,ye)),[r]);return{TASK_PUBLISHED:6,TASK_PENDING:1,taskStatus:a,assessmentData:u,taskSchema:c,taskData:m,TasksList:E,TasksLoading:T,TasksSuccess:C,TasksSuccessMessage:O,taskProgressMaxValue:g,taskRegisterData:w,taskProgressValue:x,taskMaxTabs:v,noOfTotalElements:S,taskTabRequiredFieldsData:A,userTaskSubmitFormData:s,userTrainingSaveData:l,TasksSubmitLoading:_,updateTaskDataSchema:F,submitTaskFormData:L,updateTaskFormData:V,TasksSubmit:f,TasksHTTPRequest:h,updateTaskRegisterData:G,updateTaskProgressValue:me,updateTaskProgressMaxValue:Y,updateUserFormDataSubmit:ie,removeUserDataFormSectionRepeatableData:de,addUserDataFormSectionRepeatableData:$,onSetValuetoRepeatableData:se,onSetValuetoPostDataHook:Q,clearTaskSchema:N,taskProgressLoading:d,task_status:i,updateUserTraining:pe,taskFieldUpdateHook:W,updateProgressDataValuesHook:ae,saveProgressDataHook:z}};var Fte=function(){function t(n){this.subscriber=n}var e=t.prototype;return e.remove=function(){this.subscriber&&(this.subscriber.removeSubscription(this),this.subscriber=null)},t}(),kte=Fte;function Pte(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var Mte=kte,Lte=function(t){Pte(e,t);function e(n,r,i){var a;return a=t.call(this,n)||this,a.listener=r,a.context=i,a}return e}(Mte),CD=Lte,Bte=process.env.NODE_ENV!=="production"?function(t){if(t===void 0)throw new Error("invariant(...): Second argument must be a string.")}:function(t){};function Vte(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(Bte(e),!t){var a;if(e===void 0)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;a=new Error(e.replace(/%s/g,function(){return String(r[s++])})),a.name="Invariant Violation"}throw a.framesToPop=1,a}}var TD=Vte,ED=TD,Ute=function(){function t(){this._subscriptionsForType={},this._currentSubscription=null}var e=t.prototype;return e.addSubscription=function(r,i){i.subscriber!==this&&(process.env.NODE_ENV!=="production"?ED(!1,"The subscriber of the subscription is incorrectly set."):ED(!1)),this._subscriptionsForType[r]||(this._subscriptionsForType[r]=[]);var a=this._subscriptionsForType[r].length;return this._subscriptionsForType[r].push(i),i.eventType=r,i.key=a,i},e.removeAllSubscriptions=function(r){r===void 0?this._subscriptionsForType={}:delete this._subscriptionsForType[r]},e.removeSubscription=function(r){var i=r.eventType,a=r.key,s=this._subscriptionsForType[i];s&&delete s[a]},e.getSubscriptionsForType=function(r){return this._subscriptionsForType[r]},t}(),qte=Ute;function u3(t){return function(){return t}}var Y0=function(){};Y0.thatReturns=u3,Y0.thatReturnsFalse=u3(!1),Y0.thatReturnsTrue=u3(!0),Y0.thatReturnsNull=u3(null),Y0.thatReturnsThis=function(){return this},Y0.thatReturnsArgument=function(t){return t};var jte=Y0,$te=CD,Hte=qte,ID=TD,zte=jte,Yte=function(){function t(){this._subscriber=new Hte,this._currentSubscription=null}var e=t.prototype;return e.addListener=function(r,i,a){return this._subscriber.addSubscription(r,new $te(this._subscriber,i,a))},e.once=function(r,i,a){var s=this;return this.addListener(r,function(){s.removeCurrentListener(),i.apply(a,arguments)})},e.removeAllListeners=function(r){this._subscriber.removeAllSubscriptions(r)},e.removeCurrentListener=function(){this._currentSubscription||(process.env.NODE_ENV!=="production"?ID(!1,"Not in an emitting cycle; there is no current subscription"):ID(!1)),this._subscriber.removeSubscription(this._currentSubscription)},e.listeners=function(r){var i=this._subscriber.getSubscriptionsForType(r);return i?i.filter(zte.thatReturnsTrue).map(function(a){return a.listener}):[]},e.emit=function(r){var i=this._subscriber.getSubscriptionsForType(r);if(i){for(var a=Object.keys(i),s=0;s<a.length;s++){var l=a[s],c=i[l];c&&(this._currentSubscription=c,this.__emitToSubscription.apply(this,[c].concat(Array.prototype.slice.call(arguments))))}this._currentSubscription=null}},e.__emitToSubscription=function(r,i){var a=Array.prototype.slice.call(arguments,2);r.listener.apply(r.context,a)},t}(),Kte=Yte,Xte={EventEmitter:Kte,EmitterSubscription:CD},Rte=Xte;const Xt=new Rte.EventEmitter,M8=t=>{var T,_,C;const{options:e,pageIndex:n,page:r,setTabSidebarSetting:i,setPageActiveIndex:a,pages:s}=t,{taskRegisterData:l,updateUserFormDataSubmit:c,userTaskSubmitFormData:u,updateProgressDataValuesHook:d,taskStatus:f,TASK_PENDING:h}=Lr(),{formBuilderFormLayout:m,userSelectedLanguage:g,addTabs:v,clonePage:A,removePage:w}=ln(),{emitSocketData:x,isPreview:S}=un(),E=(O,F,V)=>{var z,N,$;const L=u;if(L!=null&&L.length){const de=l;for(const[ae,G]of F.children.entries())for(const[ie,Y]of G.children.entries())if(Y!=null&&Y.rowIsRepeatable){const pe=_t.findIndex(L,function(se){return se.rowId===Y.uuid});O?pe===-1&&(L.push({postData:[],tabId:F.uuid,rowId:Y==null?void 0:Y.uuid,tabIndex:V,sectionId:G.uuid,minimumEntries:G==null?void 0:G.minimumEntries,sectionIndex:ae,sectionHeading:G.heading,subHeadingText:G.subHeadingText,repeatableFields:{},repeatableFieldsData:[],language:"english",isHiddenSection:G.isHidden&&G.isHidden===1?1:0}),de[Y==null?void 0:Y.uuid]&&delete de[Y==null?void 0:Y.uuid]):L.splice(pe,1)}else for(const[pe,se]of Y.children.entries())for(const[Q,W]of se.children.entries())if(!(Y!=null&&Y.rowIsRepeatable)&&(W==null?void 0:W.isPostField)===!0)if(((z=W.children)==null?void 0:z.length)>0)for(const[,re]of W.children.entries()){const ve=Object.keys(re);if(ve[0]){const xe=re[ve[0]],Se=_t.findIndex(L,function(be){return be.fieldId===re.uuid});O?Se===-1&&(L.push({postData:[],logs:[],isSeen:!1,seenTime:null,tabId:F.uuid,tabIndex:V,componentType:W==null?void 0:W.componentType,sectionId:G.uuid,sectionIndex:ae,sectionHeading:G.heading,subHeadingText:G.subHeadingText,rowId:Y.uuid,rowIndex:ie,columnId:G.uuid,columnIndex:pe,fieldIndex:Q,fieldId:xe.uuid,fieldInputType:xe.componentType,fieldTitle:(N=xe.label)==null?void 0:N.english,fieldDescription:xe.description||null,fieldHelperText:xe.helperText||null,fieldHeaderText:xe.headerText||null,fieldFooterText:xe.footerText||null,fieldTitleAbb:xe.abbreviationLabel||xe.label,question_abb_table:xe.textForTable||null,language:"english",isHiddenfield:xe.isHidden&&xe.isHidden===1?1:0,isHiddenSection:G.isHidden&&G.isHidden===1?1:0}),de[re==null?void 0:re.uuid]&&delete de[re==null?void 0:re.uuid]):(de[re==null?void 0:re.uuid]&&delete de[re==null?void 0:re.uuid],Se>=0&&L.splice(Se,1))}}else{const re=_t.findIndex(L,function(ve){return ve.fieldId===W.uuid});O?re===-1&&(L.push({postData:[],tabId:F.uuid,tabIndex:V,componentType:W==null?void 0:W.componentType,...W.inlineConditionalRules?{inlineConditionalRules:W.inlineConditionalRules}:{},...W.conditionalTabRules?{conditionalTabRules:W.conditionalTabRules}:{},...W.conditionalSectionRules?{conditionalSectionRules:W.conditionalSectionRules}:{},sectionId:G.uuid,sectionIndex:ae,sectionHeading:G.heading,subHeadingText:G.subHeadingText,reviewerChecklist:W==null?void 0:W.reviewerChecklist,rowId:Y.uuid,rowIndex:ie,columnId:G.uuid,columnIndex:pe,fieldIndex:Q,fieldId:W.uuid,fieldInputType:W.componentType,fieldTitle:($=W.label)==null?void 0:$.english,fieldDescription:W.description||null,fieldHelperText:W.helperText||null,fieldHeaderText:W.headerText||null,fieldFooterText:W.footerText||null,fieldTitleAbb:W.abbreviationLabel||W.label,question_abb_table:W.textForTable||null,language:"english",isHiddenfield:W.isHidden&&W.isHidden===1?1:0,isHiddenSection:G.isHidden&&G.isHidden===1?1:0}),de[W==null?void 0:W.uuid]&&delete de[W==null?void 0:W.uuid]):(de[W==null?void 0:W.uuid]&&delete de[W==null?void 0:W.uuid],re>=0&&f===h&&L.splice(re,1))}const me=Object.keys(de).length;d({progressMaxValue:L==null?void 0:L.length,progressValue:me}),c(L)}};return k.useEffect(()=>{const O=Xt.addListener("updatePageRender",()=>{E(!(r!=null&&r.isHidden),r,n)});return()=>{O.remove()}}),k.useEffect(()=>(E(!(r!=null&&r.isHidden),r,n),()=>{}),[]),o.jsxs("div",{className:`${e.className} page-panel`,onClick:e.onClick,children:[o.jsx(tn,{target:".clone-tool"}),o.jsx(tn,{target:".del-tool"}),o.jsx(tn,{target:".setting-tool"}),o.jsx(tn,{target:".addpage-tool"}),S===!1&&o.jsxs("span",{className:"page-pannel-icons",children:[o.jsx("i",{className:"pi pi-plus mr-1 p-text-secondary addpage-tool ",onClick:()=>{v(s==null?void 0:s.length),x()},"data-pr-tooltip":"Add Page"}),o.jsx("i",{className:"pi pi-cog mr-1 p-text-secondary setting-tool ",onClick:()=>i(!0),"data-pr-tooltip":"Settings"})," ",o.jsx("i",{className:"pi pi-clone mr-1 p-text-secondary clone-tool ",onClick:()=>{A(r,n),x()},"data-pr-tooltip":"Clone"})," ",(m==null?void 0:m.length)>1&&o.jsx("i",{className:"pi pi-trash mr-1 p-text-danger del-tool",onClick:()=>{w(n),setTimeout(()=>{a(s.length-2)},100),x()},"data-pr-tooltip":"Delete"})]})," ",o.jsx(o.Fragment,{children:((T=r==null?void 0:r.title)==null?void 0:T[g==null?void 0:g.type])===null||((_=r==null?void 0:r.title)==null?void 0:_[g==null?void 0:g.type])===void 0?o.jsxs("span",{style:{width:"100px"},children:["Tab ",n+1]}):(C=r==null?void 0:r.title)==null?void 0:C[g==null?void 0:g.type]})]},`pannel-${n}`)};function L8(){return L8=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},L8.apply(this,arguments)}var _D=y.memo(y.forwardRef(function(t,e){var n=ti.getPTI(t);return y.createElement("svg",L8({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 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z",fill:"currentColor"}))}));_D.displayName="WindowMaximizeIcon";function B8(){return B8=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},B8.apply(this,arguments)}var DD=y.memo(y.forwardRef(function(t,e){var n=ti.getPTI(t);return y.createElement("svg",B8({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:"M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z",fill:"currentColor"}))}));DD.displayName="WindowMinimizeIcon";function V8(){return V8=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},V8.apply(this,arguments)}function Lp(t){"@babel/helpers - typeof";return Lp=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},Lp(t)}function U8(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 Gte(t){if(Array.isArray(t))return U8(t)}function Wte(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function OD(t,e){if(t){if(typeof t=="string")return U8(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 U8(t,e)}}function Qte(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1925
1925
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jte(t){return Gte(t)||Wte(t)||OD(t)||Qte()}function Zte(t,e){if(Lp(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Lp(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ene(t){var e=Zte(t,"string");return Lp(e)==="symbol"?e:String(e)}function q8(t,e,n){return e=ene(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tne(t){if(Array.isArray(t))return t}function nne(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 rne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1926
1926
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qd(t,e){return tne(t)||nne(t,e)||OD(t,e)||rne()}var ine="",Bp=Mn.extend({defaultProps:{__TYPE:"FocusTrap",children:void 0},css:{styles:ine},getProps:function(e){return Fe.getMergedProps(e,Bp.defaultProps)},getOtherProps:function(e){return Fe.getDiffProps(e,Bp.defaultProps)}});function ND(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 ane(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ND(Object(n),!0).forEach(function(r){q8(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ND(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var sne=k.memo(k.forwardRef(function(t,e){var n=k.useRef(null),r=k.useRef(null),i=k.useRef(null),a=k.useContext(rr),s=Bp.getProps(t,a),l={props:s};zd(Bp.css.styles,{name:"focustrap"});var c=Bp.setMetaData(ane({},l));c.ptm,k.useImperativeHandle(e,function(){return{props:s,getInk:function(){return r.current},getTarget:function(){return n.current}}}),Mi(function(){s.disabled||(n.current=u(),d(n.current))});var u=function(){return r.current&&r.current.parentElement},d=function(A){var w=s||{},x=w.autoFocusSelector,S=x===void 0?"":x,E=w.firstFocusableSelector,T=E===void 0?"":E,_=w.autoFocus,C=_===void 0?!1:_,O="".concat(f(S)),F="[autofocus]".concat(O,", [data-pc-autofocus='true']").concat(O),V=Te.getFirstFocusableElement(A,F);C&&!V&&(V=Te.getFirstFocusableElement(A,f(T))),Te.focus(V)},f=function(A){return':not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])'.concat(A??"")},h=function(A){var w,x=A.currentTarget,S=A.relatedTarget,E=S===x.$_pfocustrap_lasthiddenfocusableelement||!((w=n.current)!==null&&w!==void 0&&w.contains(S))?Te.getFirstFocusableElement(x.parentElement,f(x.$_pfocustrap_focusableselector)):x.$_pfocustrap_lasthiddenfocusableelement;Te.focus(E)},m=function(A){var w,x=A.currentTarget,S=A.relatedTarget,E=S===x.$_pfocustrap_firsthiddenfocusableelement||!((w=n.current)!==null&&w!==void 0&&w.contains(S))?Te.getLastFocusableElement(x.parentElement,f(x.$_pfocustrap_focusableselector)):x.$_pfocustrap_firsthiddenfocusableelement;Te.focus(E)},g=function(){var A=s||{},w=A.tabIndex,x=w===void 0?0:w,S=function(C,O){return k.createElement("span",{ref:O==="firstfocusableelement"?r:i,className:"p-hidden-accessible p-hidden-focusable",tabIndex:x,role:"presentation","aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:C,"data-pc-section":O})},E=S(h,"firstfocusableelement"),T=S(m,"lastfocusableelement");return E.ref.current&&T.ref.current&&(E.ref.current.$_pfocustrap_lasthiddenfocusableelement=T.ref.current,T.ref.current.$_pfocustrap_firsthiddenfocusableelement=E.ref.current),k.createElement(k.Fragment,null,E,s.children,T)};return g()})),one=sne;function FD(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 lne(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?FD(Object(n),!0).forEach(function(r){q8(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):FD(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var cne={closeButtonIcon:"p-dialog-header-close-icon",closeButton:"p-dialog-header-icon p-dialog-header-close p-link",maximizableIcon:"p-dialog-header-maximize-icon",maximizableButton:"p-dialog-header-icon p-dialog-header-maximize p-link",header:function(e){var n=e.props;return mt("p-dialog-header",n.headerClassName)},headerTitle:"p-dialog-title",headerIcons:"p-dialog-header-icons",content:function(e){var n=e.props;return mt("p-dialog-content",n.contentClassName)},footer:function(e){var n=e.props;return mt("p-dialog-footer",n.footerClassName)},mask:function(e){var n=e.props,r=e.maskVisibleState,i=["center","left","right","top","top-left","top-right","bottom","bottom-left","bottom-right"],a=i.find(function(s){return s===n.position||s.replace("-","")===n.position});return mt("p-dialog-mask",a?"p-dialog-".concat(a):"",{"p-component-overlay p-component-overlay-enter":n.modal,"p-dialog-visible":r,"p-dialog-draggable":n.draggable,"p-dialog-resizable":n.resizable},n.maskClassName)},root:function(e){var n=e.props,r=e.maximized,i=e.context;return mt("p-dialog p-component",{"p-dialog-rtl":n.rtl,"p-dialog-maximized":r,"p-dialog-default":!r,"p-input-filled":i&&i.inputStyle==="filled"||Un.inputStyle==="filled","p-ripple-disabled":i&&i.ripple===!1||Un.ripple===!1})},transition:"p-dialog"},une=`
|
|
1927
1927
|
@layer primereact {
|